@angular/fire 7.6.1 → 16.0.0-canary.e04cd7f

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 (455) hide show
  1. package/analytics/is-analytics-supported-factory.d.ts +4 -0
  2. package/auth-guard/auth-guard.d.ts +4 -4
  3. package/compat/auth/auth.d.ts +1 -1
  4. package/compat/auth-guard/auth-guard.d.ts +6 -4
  5. package/compat/database/interfaces.d.ts +12 -12
  6. package/compat/firestore/interfaces.d.ts +17 -17
  7. package/compat/proxy.d.ts +8 -8
  8. package/compat/remote-config/interfaces.d.ts +1 -1
  9. package/compat/storage/interfaces.d.ts +8 -8
  10. package/compat/storage/pipes/storageUrl.pipe.d.ts +1 -1
  11. package/core.d.ts +1 -12
  12. package/esm2022/analytics/analytics.module.mjs +94 -0
  13. package/esm2022/analytics/is-analytics-supported-factory.mjs +16 -0
  14. package/esm2022/analytics/overrides.mjs +3 -0
  15. package/esm2022/analytics/screen-tracking.service.mjs +147 -0
  16. package/esm2022/analytics/user-tracking.service.mjs +44 -0
  17. package/esm2022/app/app.module.mjs +84 -0
  18. package/esm2022/app-check/app-check.module.mjs +80 -0
  19. package/{esm2015/auth/auth.module.js → esm2022/auth/auth.module.mjs} +8 -8
  20. package/esm2022/auth-guard/auth-guard.mjs +51 -0
  21. package/{esm2015/auth-guard/auth-guard.module.js → esm2022/auth-guard/auth-guard.module.mjs} +5 -5
  22. package/esm2022/compat/analytics/analytics.mjs +161 -0
  23. package/{esm2015/compat/analytics/analytics.module.js → esm2022/compat/analytics/analytics.module.mjs} +5 -5
  24. package/esm2022/compat/analytics/screen-tracking.service.mjs +49 -0
  25. package/esm2022/compat/analytics/user-tracking.service.mjs +53 -0
  26. package/esm2022/compat/auth/auth.mjs +161 -0
  27. package/{esm2015/compat/auth/auth.module.js → esm2022/compat/auth/auth.module.mjs} +5 -5
  28. package/{esm2015/compat/auth/public_api.js → esm2022/compat/auth/public_api.mjs} +1 -1
  29. package/esm2022/compat/auth-guard/auth-guard.mjs +51 -0
  30. package/{esm2015/compat/auth-guard/auth-guard.module.js → esm2022/compat/auth-guard/auth-guard.module.mjs} +5 -5
  31. package/{esm2015/compat/cache.js → esm2022/compat/cache.mjs} +3 -3
  32. package/esm2022/compat/database/database.mjs +119 -0
  33. package/{esm2015/compat/database/database.module.js → esm2022/compat/database/database.module.mjs} +5 -5
  34. package/esm2022/compat/database/list/create-reference.mjs +44 -0
  35. package/{esm2015/compat/firebase.app.module.js → esm2022/compat/firebase.app.module.mjs} +11 -11
  36. package/esm2022/compat/firestore/collection/changes.mjs +108 -0
  37. package/esm2022/compat/firestore/collection/collection.mjs +123 -0
  38. package/esm2022/compat/firestore/collection-group/collection-group.mjs +86 -0
  39. package/esm2022/compat/firestore/document/document.mjs +87 -0
  40. package/esm2022/compat/firestore/firestore.mjs +257 -0
  41. package/{esm2015/compat/firestore/firestore.module.js → esm2022/compat/firestore/firestore.module.mjs} +5 -5
  42. package/esm2022/compat/firestore/interfaces.mjs +2 -0
  43. package/esm2022/compat/firestore/observable/fromRef.mjs +40 -0
  44. package/esm2022/compat/functions/functions.mjs +69 -0
  45. package/{esm2015/compat/functions/functions.module.js → esm2022/compat/functions/functions.module.mjs} +5 -5
  46. package/{esm2015/compat/functions/public_api.js → esm2022/compat/functions/public_api.mjs} +1 -1
  47. package/esm2022/compat/messaging/messaging.mjs +80 -0
  48. package/{esm2015/compat/messaging/messaging.module.js → esm2022/compat/messaging/messaging.module.mjs} +5 -5
  49. package/{esm2015/compat/performance/performance.js → esm2022/compat/performance/performance.mjs} +7 -6
  50. package/{esm2015/compat/performance/performance.module.js → esm2022/compat/performance/performance.module.mjs} +5 -5
  51. package/esm2022/compat/performance/performance.service.mjs +27 -0
  52. package/esm2022/compat/proxy.mjs +59 -0
  53. package/esm2022/compat/remote-config/remote-config.mjs +207 -0
  54. package/{esm2015/compat/remote-config/remote-config.module.js → esm2022/compat/remote-config/remote-config.module.mjs} +5 -5
  55. package/esm2022/compat/storage/pipes/storageUrl.pipe.mjs +58 -0
  56. package/esm2022/compat/storage/storage.mjs +95 -0
  57. package/{esm2015/compat/storage/storage.module.js → esm2022/compat/storage/storage.module.mjs} +5 -5
  58. package/esm2022/core.mjs +37 -0
  59. package/{esm2015/database/database.module.js → esm2022/database/database.module.mjs} +8 -8
  60. package/{esm2015/firestore/firestore.module.js → esm2022/firestore/firestore.module.mjs} +8 -8
  61. package/{esm2015/firestore/lite/lite.module.js → esm2022/firestore/lite/lite.module.mjs} +8 -8
  62. package/esm2022/firestore/rxfire.mjs +15 -0
  63. package/{esm2015/functions/functions.module.js → esm2022/functions/functions.module.mjs} +8 -8
  64. package/esm2022/messaging/is-messaging-supported-factory.mjs +16 -0
  65. package/esm2022/messaging/messaging.module.mjs +86 -0
  66. package/esm2022/messaging/overrides.mjs +3 -0
  67. package/{esm2015/performance/performance.module.js → esm2022/performance/performance.module.mjs} +8 -8
  68. package/esm2022/remote-config/is-remote-config-supported-factory.mjs +16 -0
  69. package/esm2022/remote-config/overrides.mjs +3 -0
  70. package/esm2022/remote-config/remote-config.module.mjs +86 -0
  71. package/{esm2015/storage/storage.module.js → esm2022/storage/storage.module.mjs} +8 -8
  72. package/esm2022/zones.mjs +196 -0
  73. package/{fesm2015/angular-fire-analytics.js → fesm2022/angular-fire-analytics.mjs} +61 -38
  74. package/fesm2022/angular-fire-analytics.mjs.map +1 -0
  75. package/{fesm2015/angular-fire-app-check.js → fesm2022/angular-fire-app-check.mjs} +9 -10
  76. package/fesm2022/angular-fire-app-check.mjs.map +1 -0
  77. package/{fesm2015/angular-fire-app.js → fesm2022/angular-fire-app.mjs} +8 -8
  78. package/fesm2022/angular-fire-app.mjs.map +1 -0
  79. package/{fesm2015/angular-fire-auth-guard.js → fesm2022/angular-fire-auth-guard.mjs} +25 -23
  80. package/fesm2022/angular-fire-auth-guard.mjs.map +1 -0
  81. package/{fesm2015/angular-fire-auth.js → fesm2022/angular-fire-auth.mjs} +8 -8
  82. package/fesm2022/angular-fire-auth.mjs.map +1 -0
  83. package/{fesm2015/angular-fire-compat-analytics.js → fesm2022/angular-fire-compat-analytics.mjs} +28 -28
  84. package/fesm2022/angular-fire-compat-analytics.mjs.map +1 -0
  85. package/{fesm2015/angular-fire-compat-auth-guard.js → fesm2022/angular-fire-compat-auth-guard.mjs} +25 -23
  86. package/fesm2022/angular-fire-compat-auth-guard.mjs.map +1 -0
  87. package/{fesm2015/angular-fire-compat-auth.js → fesm2022/angular-fire-compat-auth.mjs} +32 -10
  88. package/fesm2022/angular-fire-compat-auth.mjs.map +1 -0
  89. package/{fesm2015/angular-fire-compat-database.js → fesm2022/angular-fire-compat-database.mjs} +17 -12
  90. package/fesm2022/angular-fire-compat-database.mjs.map +1 -0
  91. package/{fesm2015/angular-fire-compat-firestore.js → fesm2022/angular-fire-compat-firestore.mjs} +37 -16
  92. package/fesm2022/angular-fire-compat-firestore.mjs.map +1 -0
  93. package/{fesm2015/angular-fire-compat-functions.js → fesm2022/angular-fire-compat-functions.mjs} +10 -9
  94. package/fesm2022/angular-fire-compat-functions.mjs.map +1 -0
  95. package/{fesm2015/angular-fire-compat-messaging.js → fesm2022/angular-fire-compat-messaging.mjs} +20 -15
  96. package/fesm2022/angular-fire-compat-messaging.mjs.map +1 -0
  97. package/{fesm2015/angular-fire-compat-performance.js → fesm2022/angular-fire-compat-performance.mjs} +16 -15
  98. package/fesm2022/angular-fire-compat-performance.mjs.map +1 -0
  99. package/{fesm2015/angular-fire-compat-remote-config.js → fesm2022/angular-fire-compat-remote-config.mjs} +33 -19
  100. package/fesm2022/angular-fire-compat-remote-config.mjs.map +1 -0
  101. package/{fesm2015/angular-fire-compat-storage.js → fesm2022/angular-fire-compat-storage.mjs} +23 -18
  102. package/fesm2022/angular-fire-compat-storage.mjs.map +1 -0
  103. package/{fesm2015/angular-fire-compat.js → fesm2022/angular-fire-compat.mjs} +15 -17
  104. package/fesm2022/angular-fire-compat.mjs.map +1 -0
  105. package/{fesm2015/angular-fire-database.js → fesm2022/angular-fire-database.mjs} +8 -8
  106. package/fesm2022/angular-fire-database.mjs.map +1 -0
  107. package/{fesm2015/angular-fire-firestore-lite.js → fesm2022/angular-fire-firestore-lite.mjs} +8 -8
  108. package/fesm2022/angular-fire-firestore-lite.mjs.map +1 -0
  109. package/{fesm2015/angular-fire-firestore.js → fesm2022/angular-fire-firestore.mjs} +12 -10
  110. package/fesm2022/angular-fire-firestore.mjs.map +1 -0
  111. package/{fesm2015/angular-fire-functions.js → fesm2022/angular-fire-functions.mjs} +8 -8
  112. package/fesm2022/angular-fire-functions.mjs.map +1 -0
  113. package/{fesm2015/angular-fire-messaging.js → fesm2022/angular-fire-messaging.mjs} +33 -19
  114. package/fesm2022/angular-fire-messaging.mjs.map +1 -0
  115. package/{fesm2015/angular-fire-performance.js → fesm2022/angular-fire-performance.mjs} +8 -8
  116. package/fesm2022/angular-fire-performance.mjs.map +1 -0
  117. package/{fesm2015/angular-fire-remote-config.js → fesm2022/angular-fire-remote-config.mjs} +34 -20
  118. package/fesm2022/angular-fire-remote-config.mjs.map +1 -0
  119. package/{fesm2015/angular-fire-storage.js → fesm2022/angular-fire-storage.mjs} +8 -8
  120. package/fesm2022/angular-fire-storage.mjs.map +1 -0
  121. package/{fesm2015/angular-fire.js → fesm2022/angular-fire.mjs} +23 -52
  122. package/fesm2022/angular-fire.mjs.map +1 -0
  123. package/firestore/rxfire.d.ts +3 -1
  124. package/messaging/is-messaging-supported-factory.d.ts +4 -0
  125. package/package.json +158 -7
  126. package/publish.sh +1 -0
  127. package/remote-config/is-remote-config-supported-factory.d.ts +4 -0
  128. package/schematics/add/index.js +1 -1
  129. package/schematics/common.js +8 -4
  130. package/schematics/deploy/actions.js +59 -59
  131. package/schematics/deploy/builder.js +5 -5
  132. package/schematics/firebaseTools.js +9 -5
  133. package/schematics/setup/index.js +24 -23
  134. package/schematics/setup/prompts.js +20 -15
  135. package/schematics/update/v7/index.js +5 -5
  136. package/schematics/utils.js +30 -30
  137. package/README.md +0 -216
  138. package/analytics/package.json +0 -11
  139. package/app/package.json +0 -11
  140. package/app-check/package.json +0 -11
  141. package/auth/package.json +0 -11
  142. package/auth-guard/package.json +0 -11
  143. package/bundles/angular-fire-analytics.umd.js +0 -673
  144. package/bundles/angular-fire-analytics.umd.js.map +0 -1
  145. package/bundles/angular-fire-app-check.umd.js +0 -465
  146. package/bundles/angular-fire-app-check.umd.js.map +0 -1
  147. package/bundles/angular-fire-app.umd.js +0 -477
  148. package/bundles/angular-fire-app.umd.js.map +0 -1
  149. package/bundles/angular-fire-auth-guard.umd.js +0 -109
  150. package/bundles/angular-fire-auth-guard.umd.js.map +0 -1
  151. package/bundles/angular-fire-auth.umd.js +0 -557
  152. package/bundles/angular-fire-auth.umd.js.map +0 -1
  153. package/bundles/angular-fire-compat-analytics.umd.js +0 -672
  154. package/bundles/angular-fire-compat-analytics.umd.js.map +0 -1
  155. package/bundles/angular-fire-compat-auth-guard.umd.js +0 -112
  156. package/bundles/angular-fire-compat-auth-guard.umd.js.map +0 -1
  157. package/bundles/angular-fire-compat-auth.umd.js +0 -559
  158. package/bundles/angular-fire-compat-auth.umd.js.map +0 -1
  159. package/bundles/angular-fire-compat-database.umd.js +0 -799
  160. package/bundles/angular-fire-compat-database.umd.js.map +0 -1
  161. package/bundles/angular-fire-compat-firestore.umd.js +0 -1073
  162. package/bundles/angular-fire-compat-firestore.umd.js.map +0 -1
  163. package/bundles/angular-fire-compat-functions.umd.js +0 -443
  164. package/bundles/angular-fire-compat-functions.umd.js.map +0 -1
  165. package/bundles/angular-fire-compat-messaging.umd.js +0 -465
  166. package/bundles/angular-fire-compat-messaging.umd.js.map +0 -1
  167. package/bundles/angular-fire-compat-performance.umd.js +0 -212
  168. package/bundles/angular-fire-compat-performance.umd.js.map +0 -1
  169. package/bundles/angular-fire-compat-remote-config.umd.js +0 -605
  170. package/bundles/angular-fire-compat-remote-config.umd.js.map +0 -1
  171. package/bundles/angular-fire-compat-storage.umd.js +0 -598
  172. package/bundles/angular-fire-compat-storage.umd.js.map +0 -1
  173. package/bundles/angular-fire-compat.umd.js +0 -535
  174. package/bundles/angular-fire-compat.umd.js.map +0 -1
  175. package/bundles/angular-fire-database.umd.js +0 -557
  176. package/bundles/angular-fire-database.umd.js.map +0 -1
  177. package/bundles/angular-fire-firestore-lite.umd.js +0 -531
  178. package/bundles/angular-fire-firestore-lite.umd.js.map +0 -1
  179. package/bundles/angular-fire-firestore.umd.js +0 -565
  180. package/bundles/angular-fire-firestore.umd.js.map +0 -1
  181. package/bundles/angular-fire-functions.umd.js +0 -461
  182. package/bundles/angular-fire-functions.umd.js.map +0 -1
  183. package/bundles/angular-fire-messaging.umd.js +0 -473
  184. package/bundles/angular-fire-messaging.umd.js.map +0 -1
  185. package/bundles/angular-fire-performance.umd.js +0 -473
  186. package/bundles/angular-fire-performance.umd.js.map +0 -1
  187. package/bundles/angular-fire-remote-config.umd.js +0 -499
  188. package/bundles/angular-fire-remote-config.umd.js.map +0 -1
  189. package/bundles/angular-fire-storage.umd.js +0 -485
  190. package/bundles/angular-fire-storage.umd.js.map +0 -1
  191. package/bundles/angular-fire.umd.js +0 -308
  192. package/bundles/angular-fire.umd.js.map +0 -1
  193. package/compat/analytics/package.json +0 -11
  194. package/compat/auth/package.json +0 -11
  195. package/compat/auth-guard/package.json +0 -11
  196. package/compat/database/package.json +0 -11
  197. package/compat/firestore/package.json +0 -11
  198. package/compat/functions/package.json +0 -11
  199. package/compat/messaging/package.json +0 -11
  200. package/compat/package.json +0 -11
  201. package/compat/performance/package.json +0 -11
  202. package/compat/remote-config/package.json +0 -11
  203. package/compat/storage/package.json +0 -11
  204. package/database/package.json +0 -11
  205. package/docs/analytics.md +0 -67
  206. package/docs/app-check.md +0 -53
  207. package/docs/auth.md +0 -165
  208. package/docs/compat/analytics/getting-started.md +0 -137
  209. package/docs/compat/auth/getting-started.md +0 -162
  210. package/docs/compat/auth/router-guards.md +0 -104
  211. package/docs/compat/emulators/emulators.md +0 -134
  212. package/docs/compat/firestore/collections.md +0 -326
  213. package/docs/compat/firestore/documents.md +0 -115
  214. package/docs/compat/firestore/offline-data.md +0 -39
  215. package/docs/compat/firestore/querying-collections.md +0 -204
  216. package/docs/compat/functions/functions.md +0 -166
  217. package/docs/compat/messaging/messaging.md +0 -232
  218. package/docs/compat/performance/getting-started.md +0 -132
  219. package/docs/compat/remote-config/getting-started.md +0 -134
  220. package/docs/compat/rtdb/lists.md +0 -257
  221. package/docs/compat/rtdb/objects.md +0 -182
  222. package/docs/compat/rtdb/querying-lists.md +0 -155
  223. package/docs/compat/storage/storage.md +0 -257
  224. package/docs/compat.md +0 -70
  225. package/docs/database.md +0 -175
  226. package/docs/deploy/getting-started.md +0 -204
  227. package/docs/firebase.json +0 -16
  228. package/docs/firestore.md +0 -148
  229. package/docs/functions.md +0 -52
  230. package/docs/images/analytics-illo_1x.png +0 -0
  231. package/docs/images/auth-illo_1x.png +0 -0
  232. package/docs/images/cloud-messaging-illo_1x.png +0 -0
  233. package/docs/images/database-illo_1x.png +0 -0
  234. package/docs/images/firestore-illo_1x.png +0 -0
  235. package/docs/images/functions-illo_1x.png +0 -0
  236. package/docs/images/hosting-illo_1x.png +0 -0
  237. package/docs/images/performance-illo_1x.png +0 -0
  238. package/docs/images/reCAPTCHA-logo@1x.png +0 -0
  239. package/docs/images/remote-config-illo_1x.png +0 -0
  240. package/docs/images/storage-illo_1x.png +0 -0
  241. package/docs/install-and-setup.md +0 -114
  242. package/docs/install-angular-cli-windows10.md +0 -82
  243. package/docs/messaging.md +0 -25
  244. package/docs/performance.md +0 -57
  245. package/docs/remote-config.md +0 -53
  246. package/docs/storage.md +0 -90
  247. package/docs/universal/cloud-functions.md +0 -75
  248. package/docs/universal/getting-started.md +0 -153
  249. package/docs/universal/prerendering.md +0 -72
  250. package/docs/version-4-upgrade.md +0 -119
  251. package/docs/version-5-upgrade.md +0 -82
  252. package/docs/version-6-upgrade.md +0 -16
  253. package/docs/version-7-upgrade.md +0 -298
  254. package/esm2015/analytics/analytics.module.js +0 -93
  255. package/esm2015/analytics/overrides.js +0 -3
  256. package/esm2015/analytics/screen-tracking.service.js +0 -139
  257. package/esm2015/analytics/user-tracking.service.js +0 -43
  258. package/esm2015/app/app.module.js +0 -84
  259. package/esm2015/app-check/app-check.module.js +0 -81
  260. package/esm2015/auth-guard/auth-guard.js +0 -49
  261. package/esm2015/compat/analytics/analytics.js +0 -163
  262. package/esm2015/compat/analytics/screen-tracking.service.js +0 -49
  263. package/esm2015/compat/analytics/user-tracking.service.js +0 -52
  264. package/esm2015/compat/auth/auth.js +0 -139
  265. package/esm2015/compat/auth-guard/auth-guard.js +0 -49
  266. package/esm2015/compat/database/database.js +0 -117
  267. package/esm2015/compat/database/list/create-reference.js +0 -41
  268. package/esm2015/compat/firestore/collection/changes.js +0 -107
  269. package/esm2015/compat/firestore/collection/collection.js +0 -117
  270. package/esm2015/compat/firestore/collection-group/collection-group.js +0 -81
  271. package/esm2015/compat/firestore/document/document.js +0 -82
  272. package/esm2015/compat/firestore/firestore.js +0 -254
  273. package/esm2015/compat/firestore/interfaces.js +0 -2
  274. package/esm2015/compat/firestore/observable/fromRef.js +0 -39
  275. package/esm2015/compat/functions/functions.js +0 -68
  276. package/esm2015/compat/messaging/messaging.js +0 -75
  277. package/esm2015/compat/performance/performance.service.js +0 -27
  278. package/esm2015/compat/proxy.js +0 -61
  279. package/esm2015/compat/remote-config/remote-config.js +0 -193
  280. package/esm2015/compat/storage/pipes/storageUrl.pipe.js +0 -54
  281. package/esm2015/compat/storage/storage.js +0 -94
  282. package/esm2015/core.js +0 -79
  283. package/esm2015/firestore/rxfire.js +0 -13
  284. package/esm2015/messaging/messaging.module.js +0 -85
  285. package/esm2015/messaging/overrides.js +0 -3
  286. package/esm2015/remote-config/overrides.js +0 -3
  287. package/esm2015/remote-config/remote-config.module.js +0 -85
  288. package/esm2015/zones.js +0 -183
  289. package/fesm2015/angular-fire-analytics.js.map +0 -1
  290. package/fesm2015/angular-fire-app-check.js.map +0 -1
  291. package/fesm2015/angular-fire-app.js.map +0 -1
  292. package/fesm2015/angular-fire-auth-guard.js.map +0 -1
  293. package/fesm2015/angular-fire-auth.js.map +0 -1
  294. package/fesm2015/angular-fire-compat-analytics.js.map +0 -1
  295. package/fesm2015/angular-fire-compat-auth-guard.js.map +0 -1
  296. package/fesm2015/angular-fire-compat-auth.js.map +0 -1
  297. package/fesm2015/angular-fire-compat-database.js.map +0 -1
  298. package/fesm2015/angular-fire-compat-firestore.js.map +0 -1
  299. package/fesm2015/angular-fire-compat-functions.js.map +0 -1
  300. package/fesm2015/angular-fire-compat-messaging.js.map +0 -1
  301. package/fesm2015/angular-fire-compat-performance.js.map +0 -1
  302. package/fesm2015/angular-fire-compat-remote-config.js.map +0 -1
  303. package/fesm2015/angular-fire-compat-storage.js.map +0 -1
  304. package/fesm2015/angular-fire-compat.js.map +0 -1
  305. package/fesm2015/angular-fire-database.js.map +0 -1
  306. package/fesm2015/angular-fire-firestore-lite.js.map +0 -1
  307. package/fesm2015/angular-fire-firestore.js.map +0 -1
  308. package/fesm2015/angular-fire-functions.js.map +0 -1
  309. package/fesm2015/angular-fire-messaging.js.map +0 -1
  310. package/fesm2015/angular-fire-performance.js.map +0 -1
  311. package/fesm2015/angular-fire-remote-config.js.map +0 -1
  312. package/fesm2015/angular-fire-storage.js.map +0 -1
  313. package/fesm2015/angular-fire.js.map +0 -1
  314. package/firestore/lite/package.json +0 -11
  315. package/firestore/package.json +0 -11
  316. package/firestore-protos.js +0 -4
  317. package/functions/package.json +0 -11
  318. package/messaging/package.json +0 -11
  319. package/performance/package.json +0 -11
  320. package/remote-config/package.json +0 -11
  321. package/schematics/add/schema.json +0 -16
  322. package/schematics/builders.json +0 -10
  323. package/schematics/collection.json +0 -15
  324. package/schematics/deploy/schema.json +0 -119
  325. package/schematics/migration.json +0 -15
  326. package/schematics/setup/schema.json +0 -16
  327. package/storage/package.json +0 -11
  328. /package/analytics/{angular-fire-analytics.d.ts → index.d.ts} +0 -0
  329. /package/app/{angular-fire-app.d.ts → index.d.ts} +0 -0
  330. /package/app-check/{angular-fire-app-check.d.ts → index.d.ts} +0 -0
  331. /package/auth/{angular-fire-auth.d.ts → index.d.ts} +0 -0
  332. /package/auth-guard/{angular-fire-auth-guard.d.ts → index.d.ts} +0 -0
  333. /package/compat/analytics/{angular-fire-compat-analytics.d.ts → index.d.ts} +0 -0
  334. /package/compat/auth/{angular-fire-compat-auth.d.ts → index.d.ts} +0 -0
  335. /package/compat/auth-guard/{angular-fire-compat-auth-guard.d.ts → index.d.ts} +0 -0
  336. /package/compat/database/{angular-fire-compat-database.d.ts → index.d.ts} +0 -0
  337. /package/compat/firestore/{angular-fire-compat-firestore.d.ts → index.d.ts} +0 -0
  338. /package/compat/functions/{angular-fire-compat-functions.d.ts → index.d.ts} +0 -0
  339. /package/compat/{angular-fire-compat.d.ts → index.d.ts} +0 -0
  340. /package/compat/messaging/{angular-fire-compat-messaging.d.ts → index.d.ts} +0 -0
  341. /package/compat/performance/{angular-fire-compat-performance.d.ts → index.d.ts} +0 -0
  342. /package/compat/remote-config/{angular-fire-compat-remote-config.d.ts → index.d.ts} +0 -0
  343. /package/compat/storage/{angular-fire-compat-storage.d.ts → index.d.ts} +0 -0
  344. /package/database/{angular-fire-database.d.ts → index.d.ts} +0 -0
  345. /package/{esm2015/analytics/analytics.js → esm2022/analytics/analytics.mjs} +0 -0
  346. /package/{esm2015/analytics/angular-fire-analytics.js → esm2022/analytics/angular-fire-analytics.mjs} +0 -0
  347. /package/{esm2015/analytics/firebase.js → esm2022/analytics/firebase.mjs} +0 -0
  348. /package/{esm2015/analytics/public_api.js → esm2022/analytics/public_api.mjs} +0 -0
  349. /package/{esm2015/angular-fire.js → esm2022/angular-fire.mjs} +0 -0
  350. /package/{esm2015/app/angular-fire-app.js → esm2022/app/angular-fire-app.mjs} +0 -0
  351. /package/{esm2015/app/app.js → esm2022/app/app.mjs} +0 -0
  352. /package/{esm2015/app/firebase.js → esm2022/app/firebase.mjs} +0 -0
  353. /package/{esm2015/app/public_api.js → esm2022/app/public_api.mjs} +0 -0
  354. /package/{esm2015/app-check/angular-fire-app-check.js → esm2022/app-check/angular-fire-app-check.mjs} +0 -0
  355. /package/{esm2015/app-check/app-check.js → esm2022/app-check/app-check.mjs} +0 -0
  356. /package/{esm2015/app-check/firebase.js → esm2022/app-check/firebase.mjs} +0 -0
  357. /package/{esm2015/app-check/public_api.js → esm2022/app-check/public_api.mjs} +0 -0
  358. /package/{esm2015/auth/angular-fire-auth.js → esm2022/auth/angular-fire-auth.mjs} +0 -0
  359. /package/{esm2015/auth/auth.js → esm2022/auth/auth.mjs} +0 -0
  360. /package/{esm2015/auth/firebase.js → esm2022/auth/firebase.mjs} +0 -0
  361. /package/{esm2015/auth/public_api.js → esm2022/auth/public_api.mjs} +0 -0
  362. /package/{esm2015/auth/rxfire.js → esm2022/auth/rxfire.mjs} +0 -0
  363. /package/{esm2015/auth-guard/angular-fire-auth-guard.js → esm2022/auth-guard/angular-fire-auth-guard.mjs} +0 -0
  364. /package/{esm2015/auth-guard/public_api.js → esm2022/auth-guard/public_api.mjs} +0 -0
  365. /package/{esm2015/compat/analytics/angular-fire-compat-analytics.js → esm2022/compat/analytics/angular-fire-compat-analytics.mjs} +0 -0
  366. /package/{esm2015/compat/analytics/base.js → esm2022/compat/analytics/base.mjs} +0 -0
  367. /package/{esm2015/compat/analytics/public_api.js → esm2022/compat/analytics/public_api.mjs} +0 -0
  368. /package/{esm2015/compat/angular-fire-compat.js → esm2022/compat/angular-fire-compat.mjs} +0 -0
  369. /package/{esm2015/compat/auth/angular-fire-compat-auth.js → esm2022/compat/auth/angular-fire-compat-auth.mjs} +0 -0
  370. /package/{esm2015/compat/auth/base.js → esm2022/compat/auth/base.mjs} +0 -0
  371. /package/{esm2015/compat/auth-guard/angular-fire-compat-auth-guard.js → esm2022/compat/auth-guard/angular-fire-compat-auth-guard.mjs} +0 -0
  372. /package/{esm2015/compat/auth-guard/public_api.js → esm2022/compat/auth-guard/public_api.mjs} +0 -0
  373. /package/{esm2015/compat/database/angular-fire-compat-database.js → esm2022/compat/database/angular-fire-compat-database.mjs} +0 -0
  374. /package/{esm2015/compat/database/interfaces.js → esm2022/compat/database/interfaces.mjs} +0 -0
  375. /package/{esm2015/compat/database/list/audit-trail.js → esm2022/compat/database/list/audit-trail.mjs} +0 -0
  376. /package/{esm2015/compat/database/list/changes.js → esm2022/compat/database/list/changes.mjs} +0 -0
  377. /package/{esm2015/compat/database/list/data-operation.js → esm2022/compat/database/list/data-operation.mjs} +0 -0
  378. /package/{esm2015/compat/database/list/remove.js → esm2022/compat/database/list/remove.mjs} +0 -0
  379. /package/{esm2015/compat/database/list/snapshot-changes.js → esm2022/compat/database/list/snapshot-changes.mjs} +0 -0
  380. /package/{esm2015/compat/database/list/state-changes.js → esm2022/compat/database/list/state-changes.mjs} +0 -0
  381. /package/{esm2015/compat/database/list/utils.js → esm2022/compat/database/list/utils.mjs} +0 -0
  382. /package/{esm2015/compat/database/object/create-reference.js → esm2022/compat/database/object/create-reference.mjs} +0 -0
  383. /package/{esm2015/compat/database/object/snapshot-changes.js → esm2022/compat/database/object/snapshot-changes.mjs} +0 -0
  384. /package/{esm2015/compat/database/observable/fromRef.js → esm2022/compat/database/observable/fromRef.mjs} +0 -0
  385. /package/{esm2015/compat/database/public_api.js → esm2022/compat/database/public_api.mjs} +0 -0
  386. /package/{esm2015/compat/database/utils.js → esm2022/compat/database/utils.mjs} +0 -0
  387. /package/{esm2015/compat/firebase.app.js → esm2022/compat/firebase.app.mjs} +0 -0
  388. /package/{esm2015/compat/firestore/angular-fire-compat-firestore.js → esm2022/compat/firestore/angular-fire-compat-firestore.mjs} +0 -0
  389. /package/{esm2015/compat/firestore/public_api.js → esm2022/compat/firestore/public_api.mjs} +0 -0
  390. /package/{esm2015/compat/functions/angular-fire-compat-functions.js → esm2022/compat/functions/angular-fire-compat-functions.mjs} +0 -0
  391. /package/{esm2015/compat/functions/base.js → esm2022/compat/functions/base.mjs} +0 -0
  392. /package/{esm2015/compat/messaging/angular-fire-compat-messaging.js → esm2022/compat/messaging/angular-fire-compat-messaging.mjs} +0 -0
  393. /package/{esm2015/compat/messaging/base.js → esm2022/compat/messaging/base.mjs} +0 -0
  394. /package/{esm2015/compat/messaging/public_api.js → esm2022/compat/messaging/public_api.mjs} +0 -0
  395. /package/{esm2015/compat/performance/angular-fire-compat-performance.js → esm2022/compat/performance/angular-fire-compat-performance.mjs} +0 -0
  396. /package/{esm2015/compat/performance/base.js → esm2022/compat/performance/base.mjs} +0 -0
  397. /package/{esm2015/compat/performance/public_api.js → esm2022/compat/performance/public_api.mjs} +0 -0
  398. /package/{esm2015/compat/public_api.js → esm2022/compat/public_api.mjs} +0 -0
  399. /package/{esm2015/compat/remote-config/angular-fire-compat-remote-config.js → esm2022/compat/remote-config/angular-fire-compat-remote-config.mjs} +0 -0
  400. /package/{esm2015/compat/remote-config/base.js → esm2022/compat/remote-config/base.mjs} +0 -0
  401. /package/{esm2015/compat/remote-config/interfaces.js → esm2022/compat/remote-config/interfaces.mjs} +0 -0
  402. /package/{esm2015/compat/remote-config/public_api.js → esm2022/compat/remote-config/public_api.mjs} +0 -0
  403. /package/{esm2015/compat/storage/angular-fire-compat-storage.js → esm2022/compat/storage/angular-fire-compat-storage.mjs} +0 -0
  404. /package/{esm2015/compat/storage/interfaces.js → esm2022/compat/storage/interfaces.mjs} +0 -0
  405. /package/{esm2015/compat/storage/observable/fromTask.js → esm2022/compat/storage/observable/fromTask.mjs} +0 -0
  406. /package/{esm2015/compat/storage/public_api.js → esm2022/compat/storage/public_api.mjs} +0 -0
  407. /package/{esm2015/compat/storage/ref.js → esm2022/compat/storage/ref.mjs} +0 -0
  408. /package/{esm2015/compat/storage/task.js → esm2022/compat/storage/task.mjs} +0 -0
  409. /package/{esm2015/database/angular-fire-database.js → esm2022/database/angular-fire-database.mjs} +0 -0
  410. /package/{esm2015/database/database.js → esm2022/database/database.mjs} +0 -0
  411. /package/{esm2015/database/firebase.js → esm2022/database/firebase.mjs} +0 -0
  412. /package/{esm2015/database/public_api.js → esm2022/database/public_api.mjs} +0 -0
  413. /package/{esm2015/database/rxfire.js → esm2022/database/rxfire.mjs} +0 -0
  414. /package/{esm2015/firestore/angular-fire-firestore.js → esm2022/firestore/angular-fire-firestore.mjs} +0 -0
  415. /package/{esm2015/firestore/firebase.js → esm2022/firestore/firebase.mjs} +0 -0
  416. /package/{esm2015/firestore/firestore.js → esm2022/firestore/firestore.mjs} +0 -0
  417. /package/{esm2015/firestore/lite/angular-fire-firestore-lite.js → esm2022/firestore/lite/angular-fire-firestore-lite.mjs} +0 -0
  418. /package/{esm2015/firestore/lite/firebase.js → esm2022/firestore/lite/firebase.mjs} +0 -0
  419. /package/{esm2015/firestore/lite/lite.js → esm2022/firestore/lite/lite.mjs} +0 -0
  420. /package/{esm2015/firestore/lite/public_api.js → esm2022/firestore/lite/public_api.mjs} +0 -0
  421. /package/{esm2015/firestore/lite/rxfire.js → esm2022/firestore/lite/rxfire.mjs} +0 -0
  422. /package/{esm2015/firestore/public_api.js → esm2022/firestore/public_api.mjs} +0 -0
  423. /package/{esm2015/functions/angular-fire-functions.js → esm2022/functions/angular-fire-functions.mjs} +0 -0
  424. /package/{esm2015/functions/firebase.js → esm2022/functions/firebase.mjs} +0 -0
  425. /package/{esm2015/functions/functions.js → esm2022/functions/functions.mjs} +0 -0
  426. /package/{esm2015/functions/public_api.js → esm2022/functions/public_api.mjs} +0 -0
  427. /package/{esm2015/functions/rxfire.js → esm2022/functions/rxfire.mjs} +0 -0
  428. /package/{esm2015/messaging/angular-fire-messaging.js → esm2022/messaging/angular-fire-messaging.mjs} +0 -0
  429. /package/{esm2015/messaging/firebase.js → esm2022/messaging/firebase.mjs} +0 -0
  430. /package/{esm2015/messaging/messaging.js → esm2022/messaging/messaging.mjs} +0 -0
  431. /package/{esm2015/messaging/public_api.js → esm2022/messaging/public_api.mjs} +0 -0
  432. /package/{esm2015/performance/angular-fire-performance.js → esm2022/performance/angular-fire-performance.mjs} +0 -0
  433. /package/{esm2015/performance/firebase.js → esm2022/performance/firebase.mjs} +0 -0
  434. /package/{esm2015/performance/performance.js → esm2022/performance/performance.mjs} +0 -0
  435. /package/{esm2015/performance/public_api.js → esm2022/performance/public_api.mjs} +0 -0
  436. /package/{esm2015/performance/rxfire.js → esm2022/performance/rxfire.mjs} +0 -0
  437. /package/{esm2015/public_api.js → esm2022/public_api.mjs} +0 -0
  438. /package/{esm2015/remote-config/angular-fire-remote-config.js → esm2022/remote-config/angular-fire-remote-config.mjs} +0 -0
  439. /package/{esm2015/remote-config/firebase.js → esm2022/remote-config/firebase.mjs} +0 -0
  440. /package/{esm2015/remote-config/public_api.js → esm2022/remote-config/public_api.mjs} +0 -0
  441. /package/{esm2015/remote-config/remote-config.js → esm2022/remote-config/remote-config.mjs} +0 -0
  442. /package/{esm2015/remote-config/rxfire.js → esm2022/remote-config/rxfire.mjs} +0 -0
  443. /package/{esm2015/storage/angular-fire-storage.js → esm2022/storage/angular-fire-storage.mjs} +0 -0
  444. /package/{esm2015/storage/firebase.js → esm2022/storage/firebase.mjs} +0 -0
  445. /package/{esm2015/storage/public_api.js → esm2022/storage/public_api.mjs} +0 -0
  446. /package/{esm2015/storage/rxfire.js → esm2022/storage/rxfire.mjs} +0 -0
  447. /package/{esm2015/storage/storage.js → esm2022/storage/storage.mjs} +0 -0
  448. /package/firestore/{angular-fire-firestore.d.ts → index.d.ts} +0 -0
  449. /package/firestore/lite/{angular-fire-firestore-lite.d.ts → index.d.ts} +0 -0
  450. /package/functions/{angular-fire-functions.d.ts → index.d.ts} +0 -0
  451. /package/{angular-fire.d.ts → index.d.ts} +0 -0
  452. /package/messaging/{angular-fire-messaging.d.ts → index.d.ts} +0 -0
  453. /package/performance/{angular-fire-performance.d.ts → index.d.ts} +0 -0
  454. /package/remote-config/{angular-fire-remote-config.d.ts → index.d.ts} +0 -0
  455. /package/storage/{angular-fire-storage.d.ts → index.d.ts} +0 -0
@@ -1,1073 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('@angular/fire'), require('rxjs/operators'), require('@angular/fire/compat'), require('@angular/common'), require('firebase/compat/auth'), require('firebase/compat/firestore'), require('@angular/fire/compat/auth'), require('@angular/fire/app-check'), require('firebase/compat/app')) :
3
- typeof define === 'function' && define.amd ? define('@angular/fire/compat/firestore', ['exports', '@angular/core', 'rxjs', '@angular/fire', 'rxjs/operators', '@angular/fire/compat', '@angular/common', 'firebase/compat/auth', 'firebase/compat/firestore', '@angular/fire/compat/auth', '@angular/fire/app-check', 'firebase/compat/app'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.angular = global.angular || {}, global.angular.fire = global.angular.fire || {}, global.angular.fire.compat = global.angular.fire.compat || {}, global.angular.fire.compat.firestore = {}), global.ng.core, global.rxjs, global.angular.fire, global.rxjs.operators, global.angular.fire.compat, global.ng.common, null, null, global.angular.fire.compat.auth, global.angular.fire['app-check'], global.firebase));
5
- }(this, (function (exports, i0, rxjs, i1, operators, compat, common, auth, firestore, i2, i3, firebase) { 'use strict';
6
-
7
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
-
9
- function _interopNamespace(e) {
10
- if (e && e.__esModule) return e;
11
- var n = Object.create(null);
12
- if (e) {
13
- Object.keys(e).forEach(function (k) {
14
- if (k !== 'default') {
15
- var d = Object.getOwnPropertyDescriptor(e, k);
16
- Object.defineProperty(n, k, d.get ? d : {
17
- enumerable: true,
18
- get: function () {
19
- return e[k];
20
- }
21
- });
22
- }
23
- });
24
- }
25
- n['default'] = e;
26
- return Object.freeze(n);
27
- }
28
-
29
- var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
30
- var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
31
- var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
32
- var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
33
- var firebase__default = /*#__PURE__*/_interopDefaultLegacy(firebase);
34
-
35
- /*! *****************************************************************************
36
- Copyright (c) Microsoft Corporation.
37
-
38
- Permission to use, copy, modify, and/or distribute this software for any
39
- purpose with or without fee is hereby granted.
40
-
41
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
42
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
43
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
44
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
45
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
46
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
47
- PERFORMANCE OF THIS SOFTWARE.
48
- ***************************************************************************** */
49
- /* global Reflect, Promise */
50
- var extendStatics = function (d, b) {
51
- extendStatics = Object.setPrototypeOf ||
52
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
53
- function (d, b) { for (var p in b)
54
- if (Object.prototype.hasOwnProperty.call(b, p))
55
- d[p] = b[p]; };
56
- return extendStatics(d, b);
57
- };
58
- function __extends(d, b) {
59
- if (typeof b !== "function" && b !== null)
60
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
61
- extendStatics(d, b);
62
- function __() { this.constructor = d; }
63
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
64
- }
65
- var __assign = function () {
66
- __assign = Object.assign || function __assign(t) {
67
- for (var s, i = 1, n = arguments.length; i < n; i++) {
68
- s = arguments[i];
69
- for (var p in s)
70
- if (Object.prototype.hasOwnProperty.call(s, p))
71
- t[p] = s[p];
72
- }
73
- return t;
74
- };
75
- return __assign.apply(this, arguments);
76
- };
77
- function __rest(s, e) {
78
- var t = {};
79
- for (var p in s)
80
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
81
- t[p] = s[p];
82
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
83
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
84
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
85
- t[p[i]] = s[p[i]];
86
- }
87
- return t;
88
- }
89
- function __decorate(decorators, target, key, desc) {
90
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
91
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
92
- r = Reflect.decorate(decorators, target, key, desc);
93
- else
94
- for (var i = decorators.length - 1; i >= 0; i--)
95
- if (d = decorators[i])
96
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
97
- return c > 3 && r && Object.defineProperty(target, key, r), r;
98
- }
99
- function __param(paramIndex, decorator) {
100
- return function (target, key) { decorator(target, key, paramIndex); };
101
- }
102
- function __metadata(metadataKey, metadataValue) {
103
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
104
- return Reflect.metadata(metadataKey, metadataValue);
105
- }
106
- function __awaiter(thisArg, _arguments, P, generator) {
107
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
108
- return new (P || (P = Promise))(function (resolve, reject) {
109
- function fulfilled(value) { try {
110
- step(generator.next(value));
111
- }
112
- catch (e) {
113
- reject(e);
114
- } }
115
- function rejected(value) { try {
116
- step(generator["throw"](value));
117
- }
118
- catch (e) {
119
- reject(e);
120
- } }
121
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
122
- step((generator = generator.apply(thisArg, _arguments || [])).next());
123
- });
124
- }
125
- function __generator(thisArg, body) {
126
- var _ = { label: 0, sent: function () { if (t[0] & 1)
127
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
128
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
129
- function verb(n) { return function (v) { return step([n, v]); }; }
130
- function step(op) {
131
- if (f)
132
- throw new TypeError("Generator is already executing.");
133
- while (_)
134
- try {
135
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
136
- return t;
137
- if (y = 0, t)
138
- op = [op[0] & 2, t.value];
139
- switch (op[0]) {
140
- case 0:
141
- case 1:
142
- t = op;
143
- break;
144
- case 4:
145
- _.label++;
146
- return { value: op[1], done: false };
147
- case 5:
148
- _.label++;
149
- y = op[1];
150
- op = [0];
151
- continue;
152
- case 7:
153
- op = _.ops.pop();
154
- _.trys.pop();
155
- continue;
156
- default:
157
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
158
- _ = 0;
159
- continue;
160
- }
161
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
162
- _.label = op[1];
163
- break;
164
- }
165
- if (op[0] === 6 && _.label < t[1]) {
166
- _.label = t[1];
167
- t = op;
168
- break;
169
- }
170
- if (t && _.label < t[2]) {
171
- _.label = t[2];
172
- _.ops.push(op);
173
- break;
174
- }
175
- if (t[2])
176
- _.ops.pop();
177
- _.trys.pop();
178
- continue;
179
- }
180
- op = body.call(thisArg, _);
181
- }
182
- catch (e) {
183
- op = [6, e];
184
- y = 0;
185
- }
186
- finally {
187
- f = t = 0;
188
- }
189
- if (op[0] & 5)
190
- throw op[1];
191
- return { value: op[0] ? op[1] : void 0, done: true };
192
- }
193
- }
194
- var __createBinding = Object.create ? (function (o, m, k, k2) {
195
- if (k2 === undefined)
196
- k2 = k;
197
- Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
198
- }) : (function (o, m, k, k2) {
199
- if (k2 === undefined)
200
- k2 = k;
201
- o[k2] = m[k];
202
- });
203
- function __exportStar(m, o) {
204
- for (var p in m)
205
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
206
- __createBinding(o, m, p);
207
- }
208
- function __values(o) {
209
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
210
- if (m)
211
- return m.call(o);
212
- if (o && typeof o.length === "number")
213
- return {
214
- next: function () {
215
- if (o && i >= o.length)
216
- o = void 0;
217
- return { value: o && o[i++], done: !o };
218
- }
219
- };
220
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
221
- }
222
- function __read(o, n) {
223
- var m = typeof Symbol === "function" && o[Symbol.iterator];
224
- if (!m)
225
- return o;
226
- var i = m.call(o), r, ar = [], e;
227
- try {
228
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
229
- ar.push(r.value);
230
- }
231
- catch (error) {
232
- e = { error: error };
233
- }
234
- finally {
235
- try {
236
- if (r && !r.done && (m = i["return"]))
237
- m.call(i);
238
- }
239
- finally {
240
- if (e)
241
- throw e.error;
242
- }
243
- }
244
- return ar;
245
- }
246
- /** @deprecated */
247
- function __spread() {
248
- for (var ar = [], i = 0; i < arguments.length; i++)
249
- ar = ar.concat(__read(arguments[i]));
250
- return ar;
251
- }
252
- /** @deprecated */
253
- function __spreadArrays() {
254
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
255
- s += arguments[i].length;
256
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
257
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
258
- r[k] = a[j];
259
- return r;
260
- }
261
- function __spreadArray(to, from) {
262
- for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
263
- to[j] = from[i];
264
- return to;
265
- }
266
- function __await(v) {
267
- return this instanceof __await ? (this.v = v, this) : new __await(v);
268
- }
269
- function __asyncGenerator(thisArg, _arguments, generator) {
270
- if (!Symbol.asyncIterator)
271
- throw new TypeError("Symbol.asyncIterator is not defined.");
272
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
273
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
274
- function verb(n) { if (g[n])
275
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
276
- function resume(n, v) { try {
277
- step(g[n](v));
278
- }
279
- catch (e) {
280
- settle(q[0][3], e);
281
- } }
282
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
283
- function fulfill(value) { resume("next", value); }
284
- function reject(value) { resume("throw", value); }
285
- function settle(f, v) { if (f(v), q.shift(), q.length)
286
- resume(q[0][0], q[0][1]); }
287
- }
288
- function __asyncDelegator(o) {
289
- var i, p;
290
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
291
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
292
- }
293
- function __asyncValues(o) {
294
- if (!Symbol.asyncIterator)
295
- throw new TypeError("Symbol.asyncIterator is not defined.");
296
- var m = o[Symbol.asyncIterator], i;
297
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
298
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
299
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
300
- }
301
- function __makeTemplateObject(cooked, raw) {
302
- if (Object.defineProperty) {
303
- Object.defineProperty(cooked, "raw", { value: raw });
304
- }
305
- else {
306
- cooked.raw = raw;
307
- }
308
- return cooked;
309
- }
310
- ;
311
- var __setModuleDefault = Object.create ? (function (o, v) {
312
- Object.defineProperty(o, "default", { enumerable: true, value: v });
313
- }) : function (o, v) {
314
- o["default"] = v;
315
- };
316
- function __importStar(mod) {
317
- if (mod && mod.__esModule)
318
- return mod;
319
- var result = {};
320
- if (mod != null)
321
- for (var k in mod)
322
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
323
- __createBinding(result, mod, k);
324
- __setModuleDefault(result, mod);
325
- return result;
326
- }
327
- function __importDefault(mod) {
328
- return (mod && mod.__esModule) ? mod : { default: mod };
329
- }
330
- function __classPrivateFieldGet(receiver, state, kind, f) {
331
- if (kind === "a" && !f)
332
- throw new TypeError("Private accessor was defined without a getter");
333
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
334
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
335
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
336
- }
337
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
338
- if (kind === "m")
339
- throw new TypeError("Private method is not writable");
340
- if (kind === "a" && !f)
341
- throw new TypeError("Private accessor was defined without a setter");
342
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
343
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
344
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
345
- }
346
-
347
- function _fromRef(ref, scheduler) {
348
- if (scheduler === void 0) { scheduler = rxjs.asyncScheduler; }
349
- return new rxjs.Observable(function (subscriber) {
350
- var unsubscribe;
351
- if (scheduler != null) {
352
- scheduler.schedule(function () {
353
- unsubscribe = ref.onSnapshot({ includeMetadataChanges: true }, subscriber);
354
- });
355
- }
356
- else {
357
- unsubscribe = ref.onSnapshot({ includeMetadataChanges: true }, subscriber);
358
- }
359
- return function () {
360
- if (unsubscribe != null) {
361
- unsubscribe();
362
- }
363
- };
364
- });
365
- }
366
- function fromRef(ref, scheduler) {
367
- return _fromRef(ref, scheduler);
368
- }
369
- function fromDocRef(ref, scheduler) {
370
- return fromRef(ref, scheduler)
371
- .pipe(operators.startWith(undefined), operators.pairwise(), operators.map(function (_a) {
372
- var _b = __read(_a, 2), priorPayload = _b[0], payload = _b[1];
373
- if (!payload.exists) {
374
- return { payload: payload, type: 'removed' };
375
- }
376
- if (!(priorPayload === null || priorPayload === void 0 ? void 0 : priorPayload.exists)) {
377
- return { payload: payload, type: 'added' };
378
- }
379
- return { payload: payload, type: 'modified' };
380
- }));
381
- }
382
- function fromCollectionRef(ref, scheduler) {
383
- return fromRef(ref, scheduler).pipe(operators.map(function (payload) { return ({ payload: payload, type: 'query' }); }));
384
- }
385
-
386
- /**
387
- * Return a stream of document changes on a query. These results are not in sort order but in
388
- * order of occurence.
389
- */
390
- function docChanges(query, scheduler) {
391
- return fromCollectionRef(query, scheduler)
392
- .pipe(operators.startWith(undefined), operators.pairwise(), operators.map(function (_a) {
393
- var _b = __read(_a, 2), priorAction = _b[0], action = _b[1];
394
- var docChanges = action.payload.docChanges();
395
- var actions = docChanges.map(function (change) { return ({ type: change.type, payload: change }); });
396
- // the metadata has changed from the prior emission
397
- if (priorAction && JSON.stringify(priorAction.payload.metadata) !== JSON.stringify(action.payload.metadata)) {
398
- // go through all the docs in payload and figure out which ones changed
399
- action.payload.docs.forEach(function (currentDoc, currentIndex) {
400
- var docChange = docChanges.find(function (d) { return d.doc.ref.isEqual(currentDoc.ref); });
401
- var priorDoc = priorAction === null || priorAction === void 0 ? void 0 : priorAction.payload.docs.find(function (d) { return d.ref.isEqual(currentDoc.ref); });
402
- if (docChange && JSON.stringify(docChange.doc.metadata) === JSON.stringify(currentDoc.metadata) ||
403
- !docChange && priorDoc && JSON.stringify(priorDoc.metadata) === JSON.stringify(currentDoc.metadata)) {
404
- // document doesn't appear to have changed, don't log another action
405
- }
406
- else {
407
- // since the actions are processed in order just push onto the array
408
- actions.push({
409
- type: 'modified',
410
- payload: {
411
- oldIndex: currentIndex,
412
- newIndex: currentIndex,
413
- type: 'modified',
414
- doc: currentDoc
415
- }
416
- });
417
- }
418
- });
419
- }
420
- return actions;
421
- }));
422
- }
423
- /**
424
- * Return a stream of document changes on a query. These results are in sort order.
425
- */
426
- function sortedChanges(query, events, scheduler) {
427
- return docChanges(query, scheduler)
428
- .pipe(operators.scan(function (current, changes) { return combineChanges(current, changes.map(function (it) { return it.payload; }), events); }, []), operators.distinctUntilChanged(), // cut down on unneed change cycles
429
- operators.map(function (changes) { return changes.map(function (c) { return ({ type: c.type, payload: c }); }); }));
430
- }
431
- /**
432
- * Combines the total result set from the current set of changes from an incoming set
433
- * of changes.
434
- */
435
- function combineChanges(current, changes, events) {
436
- changes.forEach(function (change) {
437
- // skip unwanted change types
438
- if (events.indexOf(change.type) > -1) {
439
- current = combineChange(current, change);
440
- }
441
- });
442
- return current;
443
- }
444
- /**
445
- * Splice arguments on top of a sliced array, to break top-level ===
446
- * this is useful for change-detection
447
- */
448
- function sliceAndSplice(original, start, deleteCount) {
449
- var args = [];
450
- for (var _i = 3; _i < arguments.length; _i++) {
451
- args[_i - 3] = arguments[_i];
452
- }
453
- var returnArray = original.slice();
454
- returnArray.splice.apply(returnArray, __spreadArray([start, deleteCount], __read(args)));
455
- return returnArray;
456
- }
457
- /**
458
- * Creates a new sorted array from a new change.
459
- * Build our own because we allow filtering of action types ('added', 'removed', 'modified') before scanning
460
- * and so we have greater control over change detection (by breaking ===)
461
- */
462
- function combineChange(combined, change) {
463
- switch (change.type) {
464
- case 'added':
465
- if (combined[change.newIndex] && combined[change.newIndex].doc.ref.isEqual(change.doc.ref)) {
466
- // Not sure why the duplicates are getting fired
467
- }
468
- else {
469
- return sliceAndSplice(combined, change.newIndex, 0, change);
470
- }
471
- break;
472
- case 'modified':
473
- if (combined[change.oldIndex] == null || combined[change.oldIndex].doc.ref.isEqual(change.doc.ref)) {
474
- // When an item changes position we first remove it
475
- // and then add it's new position
476
- if (change.oldIndex !== change.newIndex) {
477
- var copiedArray = combined.slice();
478
- copiedArray.splice(change.oldIndex, 1);
479
- copiedArray.splice(change.newIndex, 0, change);
480
- return copiedArray;
481
- }
482
- else {
483
- return sliceAndSplice(combined, change.newIndex, 1, change);
484
- }
485
- }
486
- break;
487
- case 'removed':
488
- if (combined[change.oldIndex] && combined[change.oldIndex].doc.ref.isEqual(change.doc.ref)) {
489
- return sliceAndSplice(combined, change.oldIndex, 1);
490
- }
491
- break;
492
- }
493
- return combined;
494
- }
495
-
496
- function validateEventsArray(events) {
497
- if (!events || events.length === 0) {
498
- events = ['added', 'removed', 'modified'];
499
- }
500
- return events;
501
- }
502
- /**
503
- * AngularFirestoreCollection service
504
- *
505
- * This class creates a reference to a Firestore Collection. A reference and a query are provided in
506
- * in the constructor. The query can be the unqueried reference if no query is desired.The class
507
- * is generic which gives you type safety for data update methods and data streaming.
508
- *
509
- * This class uses Symbol.observable to transform into Observable using Observable.from().
510
- *
511
- * This class is rarely used directly and should be created from the AngularFirestore service.
512
- *
513
- * Example:
514
- *
515
- * const collectionRef = firebase.firestore.collection('stocks');
516
- * const query = collectionRef.where('price', '>', '0.01');
517
- * const fakeStock = new AngularFirestoreCollection<Stock>(collectionRef, query);
518
- *
519
- * // NOTE!: the updates are performed on the reference not the query
520
- * await fakeStock.add({ name: 'FAKE', price: 0.01 });
521
- *
522
- * // Subscribe to changes as snapshots. This provides you data updates as well as delta updates.
523
- * fakeStock.valueChanges().subscribe(value => console.log(value));
524
- */
525
- var AngularFirestoreCollection = /** @class */ (function () {
526
- /**
527
- * The constructor takes in a CollectionReference and Query to provide wrapper methods
528
- * for data operations and data streaming.
529
- *
530
- * Note: Data operation methods are done on the reference not the query. This means
531
- * when you update data it is not updating data to the window of your query unless
532
- * the data fits the criteria of the query. See the AssociatedRefence type for details
533
- * on this implication.
534
- */
535
- function AngularFirestoreCollection(ref, query, afs) {
536
- this.ref = ref;
537
- this.query = query;
538
- this.afs = afs;
539
- }
540
- /**
541
- * Listen to the latest change in the stream. This method returns changes
542
- * as they occur and they are not sorted by query order. This allows you to construct
543
- * your own data structure.
544
- */
545
- AngularFirestoreCollection.prototype.stateChanges = function (events) {
546
- var source = docChanges(this.query, this.afs.schedulers.outsideAngular);
547
- if (events && events.length > 0) {
548
- source = source.pipe(operators.map(function (actions) { return actions.filter(function (change) { return events.indexOf(change.type) > -1; }); }));
549
- }
550
- return source.pipe(
551
- // We want to filter out empty arrays, but always emit at first, so the developer knows
552
- // that the collection has been resolve; even if it's empty
553
- operators.startWith(undefined), operators.pairwise(), operators.filter(function (_a) {
554
- var _b = __read(_a, 2), prior = _b[0], current = _b[1];
555
- return current.length > 0 || !prior;
556
- }), operators.map(function (_a) {
557
- var _b = __read(_a, 2), prior = _b[0], current = _b[1];
558
- return current;
559
- }), i1.keepUnstableUntilFirst);
560
- };
561
- /**
562
- * Create a stream of changes as they occur it time. This method is similar to stateChanges()
563
- * but it collects each event in an array over time.
564
- */
565
- AngularFirestoreCollection.prototype.auditTrail = function (events) {
566
- return this.stateChanges(events).pipe(operators.scan(function (current, action) { return __spreadArray(__spreadArray([], __read(current)), __read(action)); }, []));
567
- };
568
- /**
569
- * Create a stream of synchronized changes. This method keeps the local array in sorted
570
- * query order.
571
- */
572
- AngularFirestoreCollection.prototype.snapshotChanges = function (events) {
573
- var validatedEvents = validateEventsArray(events);
574
- var scheduledSortedChanges$ = sortedChanges(this.query, validatedEvents, this.afs.schedulers.outsideAngular);
575
- return scheduledSortedChanges$.pipe(i1.keepUnstableUntilFirst);
576
- };
577
- AngularFirestoreCollection.prototype.valueChanges = function (options) {
578
- if (options === void 0) { options = {}; }
579
- return fromCollectionRef(this.query, this.afs.schedulers.outsideAngular)
580
- .pipe(operators.map(function (actions) { return actions.payload.docs.map(function (a) {
581
- var _a;
582
- if (options.idField) {
583
- return Object.assign(Object.assign({}, a.data()), (_a = {}, _a[options.idField] = a.id, _a));
584
- }
585
- else {
586
- return a.data();
587
- }
588
- }); }), i1.keepUnstableUntilFirst);
589
- };
590
- /**
591
- * Retrieve the results of the query once.
592
- */
593
- AngularFirestoreCollection.prototype.get = function (options) {
594
- return rxjs.from(this.query.get(options)).pipe(i1.keepUnstableUntilFirst);
595
- };
596
- /**
597
- * Add data to a collection reference.
598
- *
599
- * Note: Data operation methods are done on the reference not the query. This means
600
- * when you update data it is not updating data to the window of your query unless
601
- * the data fits the criteria of the query.
602
- */
603
- AngularFirestoreCollection.prototype.add = function (data) {
604
- return this.ref.add(data);
605
- };
606
- /**
607
- * Create a reference to a single document in a collection.
608
- */
609
- AngularFirestoreCollection.prototype.doc = function (path) {
610
- // TODO is there a better way to solve this type issue
611
- return new AngularFirestoreDocument(this.ref.doc(path), this.afs);
612
- };
613
- return AngularFirestoreCollection;
614
- }());
615
-
616
- /**
617
- * AngularFirestoreDocument service
618
- *
619
- * This class creates a reference to a Firestore Document. A reference is provided in
620
- * in the constructor. The class is generic which gives you type safety for data update
621
- * methods and data streaming.
622
- *
623
- * This class uses Symbol.observable to transform into Observable using Observable.from().
624
- *
625
- * This class is rarely used directly and should be created from the AngularFirestore service.
626
- *
627
- * Example:
628
- *
629
- * const fakeStock = new AngularFirestoreDocument<Stock>(doc('stocks/FAKE'));
630
- * await fakeStock.set({ name: 'FAKE', price: 0.01 });
631
- * fakeStock.valueChanges().map(snap => {
632
- * if(snap.exists) return snap.data();
633
- * return null;
634
- * }).subscribe(value => console.log(value));
635
- * // OR! Transform using Observable.from() and the data is unwrapped for you
636
- * Observable.from(fakeStock).subscribe(value => console.log(value));
637
- */
638
- var AngularFirestoreDocument = /** @class */ (function () {
639
- /**
640
- * The constructor takes in a DocumentReference to provide wrapper methods
641
- * for data operations, data streaming, and Symbol.observable.
642
- */
643
- function AngularFirestoreDocument(ref, afs) {
644
- this.ref = ref;
645
- this.afs = afs;
646
- }
647
- /**
648
- * Create or overwrite a single document.
649
- */
650
- AngularFirestoreDocument.prototype.set = function (data, options) {
651
- return this.ref.set(data, options);
652
- };
653
- /**
654
- * Update some fields of a document without overwriting the entire document.
655
- */
656
- AngularFirestoreDocument.prototype.update = function (data) {
657
- return this.ref.update(data);
658
- };
659
- /**
660
- * Delete a document.
661
- */
662
- AngularFirestoreDocument.prototype.delete = function () {
663
- return this.ref.delete();
664
- };
665
- /**
666
- * Create a reference to a sub-collection given a path and an optional query
667
- * function.
668
- */
669
- AngularFirestoreDocument.prototype.collection = function (path, queryFn) {
670
- var collectionRef = this.ref.collection(path);
671
- var _a = associateQuery(collectionRef, queryFn), ref = _a.ref, query = _a.query;
672
- return new AngularFirestoreCollection(ref, query, this.afs);
673
- };
674
- /**
675
- * Listen to snapshot updates from the document.
676
- */
677
- AngularFirestoreDocument.prototype.snapshotChanges = function () {
678
- var scheduledFromDocRef$ = fromDocRef(this.ref, this.afs.schedulers.outsideAngular);
679
- return scheduledFromDocRef$.pipe(i1.keepUnstableUntilFirst);
680
- };
681
- AngularFirestoreDocument.prototype.valueChanges = function (options) {
682
- if (options === void 0) { options = {}; }
683
- return this.snapshotChanges().pipe(operators.map(function (_a) {
684
- var _b;
685
- var payload = _a.payload;
686
- return options.idField ? Object.assign(Object.assign({}, payload.data()), (_b = {}, _b[options.idField] = payload.id, _b)) : payload.data();
687
- }));
688
- };
689
- /**
690
- * Retrieve the document once.
691
- */
692
- AngularFirestoreDocument.prototype.get = function (options) {
693
- return rxjs.from(this.ref.get(options)).pipe(i1.keepUnstableUntilFirst);
694
- };
695
- return AngularFirestoreDocument;
696
- }());
697
-
698
- /**
699
- * AngularFirestoreCollectionGroup service
700
- *
701
- * This class holds a reference to a Firestore Collection Group Query.
702
- *
703
- * This class uses Symbol.observable to transform into Observable using Observable.from().
704
- *
705
- * This class is rarely used directly and should be created from the AngularFirestore service.
706
- *
707
- * Example:
708
- *
709
- * const collectionGroup = firebase.firestore.collectionGroup('stocks');
710
- * const query = collectionRef.where('price', '>', '0.01');
711
- * const fakeStock = new AngularFirestoreCollectionGroup<Stock>(query, afs);
712
- *
713
- * // Subscribe to changes as snapshots. This provides you data updates as well as delta updates.
714
- * fakeStock.valueChanges().subscribe(value => console.log(value));
715
- */
716
- var AngularFirestoreCollectionGroup = /** @class */ (function () {
717
- /**
718
- * The constructor takes in a CollectionGroupQuery to provide wrapper methods
719
- * for data operations and data streaming.
720
- */
721
- function AngularFirestoreCollectionGroup(query, afs) {
722
- this.query = query;
723
- this.afs = afs;
724
- }
725
- /**
726
- * Listen to the latest change in the stream. This method returns changes
727
- * as they occur and they are not sorted by query order. This allows you to construct
728
- * your own data structure.
729
- */
730
- AngularFirestoreCollectionGroup.prototype.stateChanges = function (events) {
731
- if (!events || events.length === 0) {
732
- return docChanges(this.query, this.afs.schedulers.outsideAngular).pipe(i1.keepUnstableUntilFirst);
733
- }
734
- return docChanges(this.query, this.afs.schedulers.outsideAngular)
735
- .pipe(operators.map(function (actions) { return actions.filter(function (change) { return events.indexOf(change.type) > -1; }); }), operators.filter(function (changes) { return changes.length > 0; }), i1.keepUnstableUntilFirst);
736
- };
737
- /**
738
- * Create a stream of changes as they occur it time. This method is similar to stateChanges()
739
- * but it collects each event in an array over time.
740
- */
741
- AngularFirestoreCollectionGroup.prototype.auditTrail = function (events) {
742
- return this.stateChanges(events).pipe(operators.scan(function (current, action) { return __spreadArray(__spreadArray([], __read(current)), __read(action)); }, []));
743
- };
744
- /**
745
- * Create a stream of synchronized changes. This method keeps the local array in sorted
746
- * query order.
747
- */
748
- AngularFirestoreCollectionGroup.prototype.snapshotChanges = function (events) {
749
- var validatedEvents = validateEventsArray(events);
750
- var scheduledSortedChanges$ = sortedChanges(this.query, validatedEvents, this.afs.schedulers.outsideAngular);
751
- return scheduledSortedChanges$.pipe(i1.keepUnstableUntilFirst);
752
- };
753
- AngularFirestoreCollectionGroup.prototype.valueChanges = function (options) {
754
- if (options === void 0) { options = {}; }
755
- var fromCollectionRefScheduled$ = fromCollectionRef(this.query, this.afs.schedulers.outsideAngular);
756
- return fromCollectionRefScheduled$
757
- .pipe(operators.map(function (actions) { return actions.payload.docs.map(function (a) {
758
- var _a;
759
- if (options.idField) {
760
- return Object.assign((_a = {}, _a[options.idField] = a.id, _a), a.data());
761
- }
762
- else {
763
- return a.data();
764
- }
765
- }); }), i1.keepUnstableUntilFirst);
766
- };
767
- /**
768
- * Retrieve the results of the query once.
769
- */
770
- AngularFirestoreCollectionGroup.prototype.get = function (options) {
771
- return rxjs.from(this.query.get(options)).pipe(i1.keepUnstableUntilFirst);
772
- };
773
- return AngularFirestoreCollectionGroup;
774
- }());
775
-
776
- /**
777
- * The value of this token determines whether or not the firestore will have persistance enabled
778
- */
779
- var ENABLE_PERSISTENCE = new i0.InjectionToken('angularfire2.enableFirestorePersistence');
780
- var PERSISTENCE_SETTINGS = new i0.InjectionToken('angularfire2.firestore.persistenceSettings');
781
- var SETTINGS = new i0.InjectionToken('angularfire2.firestore.settings');
782
- var USE_EMULATOR = new i0.InjectionToken('angularfire2.firestore.use-emulator');
783
- /**
784
- * A utility methods for associating a collection reference with
785
- * a query.
786
- *
787
- * @param collectionRef - A collection reference to query
788
- * @param queryFn - The callback to create a query
789
- *
790
- * Example:
791
- * const { query, ref } = associateQuery(docRef.collection('items'), ref => {
792
- * return ref.where('age', '<', 200);
793
- * });
794
- */
795
- function associateQuery(collectionRef, queryFn) {
796
- if (queryFn === void 0) { queryFn = function (ref) { return ref; }; }
797
- var query = queryFn(collectionRef);
798
- var ref = collectionRef;
799
- return { query: query, ref: ref };
800
- }
801
- /**
802
- * AngularFirestore Service
803
- *
804
- * This service is the main entry point for this feature module. It provides
805
- * an API for creating Collection and Reference services. These services can
806
- * then be used to do data updates and observable streams of the data.
807
- *
808
- * Example:
809
- *
810
- * import { Component } from '@angular/core';
811
- * import { AngularFirestore, AngularFirestoreCollection, AngularFirestoreDocument } from '@angular/fire/firestore';
812
- * import { Observable } from 'rxjs/Observable';
813
- * import { from } from 'rxjs/observable';
814
- *
815
- * @Component({
816
- * selector: 'app-my-component',
817
- * template: `
818
- * <h2>Items for {{ (profile | async)?.name }}
819
- * <ul>
820
- * <li *ngFor="let item of items | async">{{ item.name }}</li>
821
- * </ul>
822
- * <div class="control-input">
823
- * <input type="text" #itemname />
824
- * <button (click)="addItem(itemname.value)">Add Item</button>
825
- * </div>
826
- * `
827
- * })
828
- * export class MyComponent implements OnInit {
829
- *
830
- * // services for data operations and data streaming
831
- * private readonly itemsRef: AngularFirestoreCollection<Item>;
832
- * private readonly profileRef: AngularFirestoreDocument<Profile>;
833
- *
834
- * // observables for template
835
- * items: Observable<Item[]>;
836
- * profile: Observable<Profile>;
837
- *
838
- * // inject main service
839
- * constructor(private readonly afs: AngularFirestore) {}
840
- *
841
- * ngOnInit() {
842
- * this.itemsRef = afs.collection('items', ref => ref.where('user', '==', 'davideast').limit(10));
843
- * this.items = this.itemsRef.valueChanges().map(snap => snap.docs.map(data => doc.data()));
844
- * // this.items = from(this.itemsRef); // you can also do this with no mapping
845
- *
846
- * this.profileRef = afs.doc('users/davideast');
847
- * this.profile = this.profileRef.valueChanges();
848
- * }
849
- *
850
- * addItem(name: string) {
851
- * const user = 'davideast';
852
- * this.itemsRef.add({ name, user });
853
- * }
854
- * }
855
- */
856
- var AngularFirestore = /** @class */ (function () {
857
- /**
858
- * Each Feature of AngularFire has a FirebaseApp injected. This way we
859
- * don't rely on the main Firebase App instance and we can create named
860
- * apps and use multiple apps.
861
- */
862
- function AngularFirestore(options, name, shouldEnablePersistence, settings,
863
- // tslint:disable-next-line:ban-types
864
- platformId, zone, schedulers, persistenceSettings, _useEmulator, auth, useAuthEmulator, authSettings, // can't use firebase.auth.AuthSettings here
865
- tenantId, languageCode, useDeviceLanguage, persistence, _appCheckInstances) {
866
- var _a;
867
- this.schedulers = schedulers;
868
- var app = compat.ɵfirebaseAppFactory(options, zone, name);
869
- var useEmulator = _useEmulator;
870
- if (auth) {
871
- i2.ɵauthFactory(app, zone, useAuthEmulator, tenantId, languageCode, useDeviceLanguage, authSettings, persistence);
872
- }
873
- _a = __read(compat.ɵcacheInstance(app.name + ".firestore", 'AngularFirestore', app.name, function () {
874
- var firestore = zone.runOutsideAngular(function () { return app.firestore(); });
875
- if (settings) {
876
- firestore.settings(settings);
877
- }
878
- if (useEmulator) {
879
- firestore.useEmulator.apply(firestore, __spreadArray([], __read(useEmulator)));
880
- }
881
- if (shouldEnablePersistence && !common.isPlatformServer(platformId)) {
882
- // We need to try/catch here because not all enablePersistence() failures are caught
883
- // https://github.com/firebase/firebase-js-sdk/issues/608
884
- var enablePersistence = function () {
885
- try {
886
- return rxjs.from(firestore.enablePersistence(persistenceSettings || undefined).then(function () { return true; }, function () { return false; }));
887
- }
888
- catch (e) {
889
- if (typeof console !== 'undefined') {
890
- console.warn(e);
891
- }
892
- return rxjs.of(false);
893
- }
894
- };
895
- return [firestore, zone.runOutsideAngular(enablePersistence)];
896
- }
897
- else {
898
- return [firestore, rxjs.of(false)];
899
- }
900
- }, [settings, useEmulator, shouldEnablePersistence]), 2), this.firestore = _a[0], this.persistenceEnabled$ = _a[1];
901
- }
902
- AngularFirestore.prototype.collection = function (pathOrRef, queryFn) {
903
- var collectionRef;
904
- if (typeof pathOrRef === 'string') {
905
- collectionRef = this.firestore.collection(pathOrRef);
906
- }
907
- else {
908
- collectionRef = pathOrRef;
909
- }
910
- var _a = associateQuery(collectionRef, queryFn), ref = _a.ref, query = _a.query;
911
- var refInZone = this.schedulers.ngZone.run(function () { return ref; });
912
- return new AngularFirestoreCollection(refInZone, query, this);
913
- };
914
- /**
915
- * Create a reference to a Firestore Collection Group based on a collectionId
916
- * and an optional query function to narrow the result
917
- * set.
918
- */
919
- AngularFirestore.prototype.collectionGroup = function (collectionId, queryGroupFn) {
920
- var queryFn = queryGroupFn || (function (ref) { return ref; });
921
- var collectionGroup = this.firestore.collectionGroup(collectionId);
922
- return new AngularFirestoreCollectionGroup(queryFn(collectionGroup), this);
923
- };
924
- AngularFirestore.prototype.doc = function (pathOrRef) {
925
- var ref;
926
- if (typeof pathOrRef === 'string') {
927
- ref = this.firestore.doc(pathOrRef);
928
- }
929
- else {
930
- ref = pathOrRef;
931
- }
932
- var refInZone = this.schedulers.ngZone.run(function () { return ref; });
933
- return new AngularFirestoreDocument(refInZone, this);
934
- };
935
- /**
936
- * Returns a generated Firestore Document Id.
937
- */
938
- AngularFirestore.prototype.createId = function () {
939
- return this.firestore.collection('_').doc().id;
940
- };
941
- return AngularFirestore;
942
- }());
943
- AngularFirestore.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0__namespace, type: AngularFirestore, deps: [{ token: compat.FIREBASE_OPTIONS }, { token: compat.FIREBASE_APP_NAME, optional: true }, { token: ENABLE_PERSISTENCE, optional: true }, { token: SETTINGS, optional: true }, { token: i0.PLATFORM_ID }, { token: i0__namespace.NgZone }, { token: i1__namespace.ɵAngularFireSchedulers }, { token: PERSISTENCE_SETTINGS, optional: true }, { token: USE_EMULATOR, optional: true }, { token: i2__namespace.AngularFireAuth, optional: true }, { token: i2.USE_EMULATOR, optional: true }, { token: i2.SETTINGS, optional: true }, { token: i2.TENANT_ID, optional: true }, { token: i2.LANGUAGE_CODE, optional: true }, { token: i2.USE_DEVICE_LANGUAGE, optional: true }, { token: i2.PERSISTENCE, optional: true }, { token: i3__namespace.AppCheckInstances, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
944
- AngularFirestore.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0__namespace, type: AngularFirestore, providedIn: 'any' });
945
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0__namespace, type: AngularFirestore, decorators: [{
946
- type: i0.Injectable,
947
- args: [{
948
- providedIn: 'any'
949
- }]
950
- }], ctorParameters: function () {
951
- return [{ type: undefined, decorators: [{
952
- type: i0.Inject,
953
- args: [compat.FIREBASE_OPTIONS]
954
- }] }, { type: undefined, decorators: [{
955
- type: i0.Optional
956
- }, {
957
- type: i0.Inject,
958
- args: [compat.FIREBASE_APP_NAME]
959
- }] }, { type: undefined, decorators: [{
960
- type: i0.Optional
961
- }, {
962
- type: i0.Inject,
963
- args: [ENABLE_PERSISTENCE]
964
- }] }, { type: undefined, decorators: [{
965
- type: i0.Optional
966
- }, {
967
- type: i0.Inject,
968
- args: [SETTINGS]
969
- }] }, { type: Object, decorators: [{
970
- type: i0.Inject,
971
- args: [i0.PLATFORM_ID]
972
- }] }, { type: i0__namespace.NgZone }, { type: i1__namespace.ɵAngularFireSchedulers }, { type: undefined, decorators: [{
973
- type: i0.Optional
974
- }, {
975
- type: i0.Inject,
976
- args: [PERSISTENCE_SETTINGS]
977
- }] }, { type: undefined, decorators: [{
978
- type: i0.Optional
979
- }, {
980
- type: i0.Inject,
981
- args: [USE_EMULATOR]
982
- }] }, { type: i2__namespace.AngularFireAuth, decorators: [{
983
- type: i0.Optional
984
- }] }, { type: undefined, decorators: [{
985
- type: i0.Optional
986
- }, {
987
- type: i0.Inject,
988
- args: [i2.USE_EMULATOR]
989
- }] }, { type: undefined, decorators: [{
990
- type: i0.Optional
991
- }, {
992
- type: i0.Inject,
993
- args: [i2.SETTINGS]
994
- }] }, { type: undefined, decorators: [{
995
- type: i0.Optional
996
- }, {
997
- type: i0.Inject,
998
- args: [i2.TENANT_ID]
999
- }] }, { type: undefined, decorators: [{
1000
- type: i0.Optional
1001
- }, {
1002
- type: i0.Inject,
1003
- args: [i2.LANGUAGE_CODE]
1004
- }] }, { type: undefined, decorators: [{
1005
- type: i0.Optional
1006
- }, {
1007
- type: i0.Inject,
1008
- args: [i2.USE_DEVICE_LANGUAGE]
1009
- }] }, { type: undefined, decorators: [{
1010
- type: i0.Optional
1011
- }, {
1012
- type: i0.Inject,
1013
- args: [i2.PERSISTENCE]
1014
- }] }, { type: i3__namespace.AppCheckInstances, decorators: [{
1015
- type: i0.Optional
1016
- }] }];
1017
- } });
1018
-
1019
- var AngularFirestoreModule = /** @class */ (function () {
1020
- function AngularFirestoreModule() {
1021
- firebase__default['default'].registerVersion('angularfire', i1.VERSION.full, 'fst-compat');
1022
- }
1023
- /**
1024
- * Attempt to enable persistent storage, if possible
1025
- */
1026
- AngularFirestoreModule.enablePersistence = function (persistenceSettings) {
1027
- return {
1028
- ngModule: AngularFirestoreModule,
1029
- providers: [
1030
- { provide: ENABLE_PERSISTENCE, useValue: true },
1031
- { provide: PERSISTENCE_SETTINGS, useValue: persistenceSettings },
1032
- ]
1033
- };
1034
- };
1035
- return AngularFirestoreModule;
1036
- }());
1037
- AngularFirestoreModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0__namespace, type: AngularFirestoreModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1038
- AngularFirestoreModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0__namespace, type: AngularFirestoreModule });
1039
- AngularFirestoreModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0__namespace, type: AngularFirestoreModule, providers: [AngularFirestore] });
1040
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.3", ngImport: i0__namespace, type: AngularFirestoreModule, decorators: [{
1041
- type: i0.NgModule,
1042
- args: [{
1043
- providers: [AngularFirestore]
1044
- }]
1045
- }], ctorParameters: function () { return []; } });
1046
-
1047
- /**
1048
- * Generated bundle index. Do not edit.
1049
- */
1050
-
1051
- exports.AngularFirestore = AngularFirestore;
1052
- exports.AngularFirestoreCollection = AngularFirestoreCollection;
1053
- exports.AngularFirestoreCollectionGroup = AngularFirestoreCollectionGroup;
1054
- exports.AngularFirestoreDocument = AngularFirestoreDocument;
1055
- exports.AngularFirestoreModule = AngularFirestoreModule;
1056
- exports.ENABLE_PERSISTENCE = ENABLE_PERSISTENCE;
1057
- exports.PERSISTENCE_SETTINGS = PERSISTENCE_SETTINGS;
1058
- exports.SETTINGS = SETTINGS;
1059
- exports.USE_EMULATOR = USE_EMULATOR;
1060
- exports.associateQuery = associateQuery;
1061
- exports.combineChange = combineChange;
1062
- exports.combineChanges = combineChanges;
1063
- exports.docChanges = docChanges;
1064
- exports.fromCollectionRef = fromCollectionRef;
1065
- exports.fromDocRef = fromDocRef;
1066
- exports.fromRef = fromRef;
1067
- exports.sortedChanges = sortedChanges;
1068
- exports.validateEventsArray = validateEventsArray;
1069
-
1070
- Object.defineProperty(exports, '__esModule', { value: true });
1071
-
1072
- })));
1073
- //# sourceMappingURL=angular-fire-compat-firestore.umd.js.map