@angular/fire 17.1.0 → 18.0.0-canary.c866d08

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 (128) hide show
  1. package/README.md +10 -0
  2. package/compat/proxy.d.ts +2 -2
  3. package/compat/storage/pipes/storageUrl.pipe.d.ts +1 -2
  4. package/docs/analytics.md +14 -20
  5. package/docs/app-check.md +12 -9
  6. package/docs/auth.md +44 -9
  7. package/docs/database.md +12 -12
  8. package/docs/firestore.md +15 -23
  9. package/docs/functions.md +11 -9
  10. package/docs/messaging.md +30 -8
  11. package/docs/performance.md +11 -9
  12. package/docs/remote-config.md +11 -9
  13. package/docs/storage.md +11 -10
  14. package/docs/vertexai.md +53 -0
  15. package/esm2022/analytics/analytics.module.mjs +5 -5
  16. package/esm2022/analytics/is-analytics-supported-factory.mjs +1 -1
  17. package/esm2022/analytics/screen-tracking.service.mjs +4 -4
  18. package/esm2022/analytics/user-tracking.service.mjs +4 -4
  19. package/esm2022/app/app.module.mjs +5 -5
  20. package/esm2022/app-check/app-check.module.mjs +5 -5
  21. package/esm2022/auth/auth.module.mjs +5 -5
  22. package/esm2022/auth-guard/auth-guard.mjs +4 -4
  23. package/esm2022/auth-guard/auth-guard.module.mjs +5 -5
  24. package/esm2022/compat/analytics/analytics.mjs +4 -4
  25. package/esm2022/compat/analytics/analytics.module.mjs +5 -5
  26. package/esm2022/compat/analytics/screen-tracking.service.mjs +4 -4
  27. package/esm2022/compat/analytics/user-tracking.service.mjs +4 -4
  28. package/esm2022/compat/auth/auth.mjs +4 -4
  29. package/esm2022/compat/auth/auth.module.mjs +5 -5
  30. package/esm2022/compat/auth-guard/auth-guard.mjs +4 -4
  31. package/esm2022/compat/auth-guard/auth-guard.module.mjs +5 -5
  32. package/esm2022/compat/cache.mjs +1 -1
  33. package/esm2022/compat/database/database.mjs +4 -4
  34. package/esm2022/compat/database/database.module.mjs +5 -5
  35. package/esm2022/compat/database/list/changes.mjs +1 -1
  36. package/esm2022/compat/database/list/create-reference.mjs +1 -1
  37. package/esm2022/compat/database/list/remove.mjs +1 -1
  38. package/esm2022/compat/database/list/utils.mjs +1 -1
  39. package/esm2022/compat/database/observable/fromRef.mjs +1 -1
  40. package/esm2022/compat/database/utils.mjs +1 -1
  41. package/esm2022/compat/firebase.app.module.mjs +5 -5
  42. package/esm2022/compat/firestore/collection/changes.mjs +1 -1
  43. package/esm2022/compat/firestore/collection/collection.mjs +1 -1
  44. package/esm2022/compat/firestore/collection-group/collection-group.mjs +1 -1
  45. package/esm2022/compat/firestore/firestore.mjs +4 -4
  46. package/esm2022/compat/firestore/firestore.module.mjs +5 -5
  47. package/esm2022/compat/firestore/observable/fromRef.mjs +1 -1
  48. package/esm2022/compat/functions/functions.mjs +4 -4
  49. package/esm2022/compat/functions/functions.module.mjs +5 -5
  50. package/esm2022/compat/messaging/messaging.mjs +4 -4
  51. package/esm2022/compat/messaging/messaging.module.mjs +5 -5
  52. package/esm2022/compat/performance/performance.mjs +4 -4
  53. package/esm2022/compat/performance/performance.module.mjs +5 -5
  54. package/esm2022/compat/performance/performance.service.mjs +4 -4
  55. package/esm2022/compat/proxy.mjs +1 -1
  56. package/esm2022/compat/remote-config/remote-config.mjs +4 -4
  57. package/esm2022/compat/remote-config/remote-config.module.mjs +5 -5
  58. package/esm2022/compat/storage/pipes/storageUrl.pipe.mjs +10 -12
  59. package/esm2022/compat/storage/storage.mjs +4 -4
  60. package/esm2022/compat/storage/storage.module.mjs +5 -5
  61. package/esm2022/core.mjs +1 -1
  62. package/esm2022/database/database.module.mjs +5 -5
  63. package/esm2022/firestore/firestore.module.mjs +5 -5
  64. package/esm2022/firestore/lite/lite.module.mjs +5 -5
  65. package/esm2022/functions/functions.module.mjs +5 -5
  66. package/esm2022/messaging/is-messaging-supported-factory.mjs +1 -1
  67. package/esm2022/messaging/messaging.module.mjs +5 -5
  68. package/esm2022/performance/performance.module.mjs +5 -5
  69. package/esm2022/remote-config/is-remote-config-supported-factory.mjs +1 -1
  70. package/esm2022/remote-config/remote-config.module.mjs +5 -5
  71. package/esm2022/storage/storage.module.mjs +5 -5
  72. package/esm2022/vertexai-preview/vertexai.module.mjs +5 -5
  73. package/esm2022/zones.mjs +4 -4
  74. package/fesm2022/angular-fire-analytics.mjs +410 -297
  75. package/fesm2022/angular-fire-analytics.mjs.map +7 -1
  76. package/fesm2022/angular-fire-app-check.mjs +162 -91
  77. package/fesm2022/angular-fire-app-check.mjs.map +7 -1
  78. package/fesm2022/angular-fire-app.mjs +181 -108
  79. package/fesm2022/angular-fire-app.mjs.map +7 -1
  80. package/fesm2022/angular-fire-auth-guard.mjs +83 -73
  81. package/fesm2022/angular-fire-auth-guard.mjs.map +7 -1
  82. package/fesm2022/angular-fire-auth.mjs +421 -142
  83. package/fesm2022/angular-fire-auth.mjs.map +7 -1
  84. package/fesm2022/angular-fire-compat-analytics.mjs +261 -270
  85. package/fesm2022/angular-fire-compat-analytics.mjs.map +7 -1
  86. package/fesm2022/angular-fire-compat-auth-guard.mjs +83 -72
  87. package/fesm2022/angular-fire-compat-auth-guard.mjs.map +7 -1
  88. package/fesm2022/angular-fire-compat-auth.mjs +214 -213
  89. package/fesm2022/angular-fire-compat-auth.mjs.map +7 -1
  90. package/fesm2022/angular-fire-compat-database.mjs +375 -378
  91. package/fesm2022/angular-fire-compat-database.mjs.map +7 -1
  92. package/fesm2022/angular-fire-compat-firestore.mjs +537 -677
  93. package/fesm2022/angular-fire-compat-firestore.mjs.map +7 -1
  94. package/fesm2022/angular-fire-compat-functions.mjs +97 -93
  95. package/fesm2022/angular-fire-compat-functions.mjs.map +7 -1
  96. package/fesm2022/angular-fire-compat-messaging.mjs +106 -106
  97. package/fesm2022/angular-fire-compat-messaging.mjs.map +7 -1
  98. package/fesm2022/angular-fire-compat-performance.mjs +157 -151
  99. package/fesm2022/angular-fire-compat-performance.mjs.map +7 -1
  100. package/fesm2022/angular-fire-compat-remote-config.mjs +215 -231
  101. package/fesm2022/angular-fire-compat-remote-config.mjs.map +7 -1
  102. package/fesm2022/angular-fire-compat-storage.mjs +226 -233
  103. package/fesm2022/angular-fire-compat-storage.mjs.map +7 -1
  104. package/fesm2022/angular-fire-compat.mjs +140 -153
  105. package/fesm2022/angular-fire-compat.mjs.map +7 -1
  106. package/fesm2022/angular-fire-database.mjs +376 -136
  107. package/fesm2022/angular-fire-database.mjs.map +7 -1
  108. package/fesm2022/angular-fire-firestore-lite.mjs +388 -139
  109. package/fesm2022/angular-fire-firestore-lite.mjs.map +7 -1
  110. package/fesm2022/angular-fire-firestore.mjs +526 -167
  111. package/fesm2022/angular-fire-firestore.mjs.map +7 -1
  112. package/fesm2022/angular-fire-functions.mjs +166 -93
  113. package/fesm2022/angular-fire-functions.mjs.map +7 -1
  114. package/fesm2022/angular-fire-messaging.mjs +196 -118
  115. package/fesm2022/angular-fire-messaging.mjs.map +7 -1
  116. package/fesm2022/angular-fire-performance.mjs +178 -104
  117. package/fesm2022/angular-fire-performance.mjs.map +7 -1
  118. package/fesm2022/angular-fire-remote-config.mjs +254 -132
  119. package/fesm2022/angular-fire-remote-config.mjs.map +7 -1
  120. package/fesm2022/angular-fire-storage.mjs +225 -105
  121. package/fesm2022/angular-fire-storage.mjs.map +7 -1
  122. package/fesm2022/angular-fire-vertexai-preview.mjs +146 -85
  123. package/fesm2022/angular-fire-vertexai-preview.mjs.map +7 -1
  124. package/fesm2022/angular-fire.mjs +183 -213
  125. package/fesm2022/angular-fire.mjs.map +7 -1
  126. package/package.json +7 -7
  127. package/schematics/deploy/actions.js +2 -2
  128. package/schematics/setup/prompts.js +1 -1
@@ -1 +1,7 @@
1
- {"version":3,"file":"angular-fire-compat-remote-config.mjs","sources":["../../../src/compat/remote-config/base.ts","../../../src/compat/remote-config/remote-config.ts","../../../src/compat/remote-config/remote-config.module.ts","../../../src/compat/remote-config/angular-fire-compat-remote-config.ts"],"sourcesContent":["// DO NOT MODIFY, this file is autogenerated by tools/build.ts\n// Export a null object with the same keys as firebase/compat/remote-config, so Proxy can work with proxy-polyfill in Internet Explorer\nexport const proxyPolyfillCompat = {\n app: null,\n settings: null,\n defaultConfig: null,\n fetchTimeMillis: null,\n lastFetchStatus: null,\n activate: null,\n ensureInitialized: null,\n fetch: null,\n fetchAndActivate: null,\n getAll: null,\n getBoolean: null,\n getNumber: null,\n getString: null,\n getValue: null,\n setLogLevel: null,\n};\n","import { Inject, Injectable, InjectionToken, NgZone, Optional, PLATFORM_ID } from '@angular/core';\nimport { keepUnstableUntilFirst, ɵAngularFireSchedulers } from '@angular/fire';\nimport { ɵPromiseProxy, ɵapplyMixins, ɵlazySDKProxy } from '@angular/fire/compat';\nimport { FIREBASE_APP_NAME, FIREBASE_OPTIONS, ɵcacheInstance, ɵfirebaseAppFactory } from '@angular/fire/compat';\nimport { FirebaseOptions } from 'firebase/app';\nimport firebase from 'firebase/compat/app';\nimport { isSupported } from 'firebase/remote-config';\nimport { EMPTY, MonoTypeOperatorFunction, Observable, OperatorFunction, concat, of, pipe } from 'rxjs';\nimport {\n debounceTime,\n distinctUntilChanged,\n filter,\n groupBy,\n map,\n mergeMap,\n observeOn,\n scan,\n shareReplay,\n startWith,\n switchMap,\n withLatestFrom\n} from 'rxjs/operators';\nimport { proxyPolyfillCompat } from './base';\nimport { Settings } from './interfaces';\n\nexport type ConfigTemplate = Record<string, string | number | boolean>;\n\nexport const SETTINGS = new InjectionToken<Settings>('angularfire2.remoteConfig.settings');\nexport const DEFAULTS = new InjectionToken<ConfigTemplate>('angularfire2.remoteConfig.defaultConfig');\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface AngularFireRemoteConfig extends ɵPromiseProxy<firebase.remoteConfig.RemoteConfig> {\n}\n\nconst AS_TO_FN = { strings: 'asString', numbers: 'asNumber', booleans: 'asBoolean' };\nconst STATIC_VALUES = { numbers: 0, booleans: false, strings: undefined };\n\n// TODO look into the types here, I don't like the anys\nconst proxyAll = (observable: Observable<Parameter[]>, as: 'numbers' | 'booleans' | 'strings') => new Proxy(\n observable.pipe(mapToObject(as as any)), {\n get: (self, name: string) => self[name] || observable.pipe(\n map(all => all.find(p => p.key === name)),\n map(param => param ? param[AS_TO_FN[as]]() : STATIC_VALUES[as]),\n distinctUntilChanged()\n )\n }\n) as any;\n\n// TODO export as implements Partial<...> so minor doesn't break us\nexport class Value implements firebase.remoteConfig.Value {\n asBoolean() {\n return ['1', 'true', 't', 'y', 'yes', 'on'].indexOf(this._value.toLowerCase()) > -1;\n }\n\n asString() {\n return this._value;\n }\n\n asNumber() {\n return Number(this._value) || 0;\n }\n\n getSource() {\n return this._source;\n }\n\n constructor(public _source: firebase.remoteConfig.ValueSource, public _value: string) {\n }\n}\n\n// SEMVER use ConstructorParameters when we can support Typescript 3.6\nexport class Parameter extends Value {\n constructor(public key: string, public fetchTimeMillis: number, source: firebase.remoteConfig.ValueSource, value: string) {\n super(source, value);\n }\n}\n\n// If it's a Parameter array, test any, else test the individual Parameter\nconst filterTest = (fn: (param: Parameter) => boolean) => filter<Parameter | Parameter[]>(it => Array.isArray(it) ? it.some(fn) : fn(it));\n\n// Allow the user to bypass the default values and wait till they get something from the server, even if it's a cached copy;\n// if used in conjuntion with first() it will only fetch RC values from the server if they aren't cached locally\nexport const filterRemote = () => filterTest(p => p.getSource() === 'remote');\n\n// filterFresh allows the developer to effectively set up a maximum cache time\nexport const filterFresh = (howRecentInMillis: number) => filterTest(p => p.fetchTimeMillis + howRecentInMillis >= new Date().getTime());\n\n\n// I ditched loading the defaults into RC and a simple map for scan since we already have our own defaults implementation.\n// The idea here being that if they have a default that never loads from the server, they will be able to tell via fetchTimeMillis\n// on the Parameter. Also if it doesn't come from the server it won't emit again in .changes, due to the distinctUntilChanged,\n// which we can simplify to === rather than deep comparison\nconst scanToParametersArray = (\n remoteConfig: Observable<firebase.remoteConfig.RemoteConfig | undefined>\n): OperatorFunction<Record<string, firebase.remoteConfig.Value>, Parameter[]> => pipe(\n withLatestFrom(remoteConfig),\n scan((existing, [all, rc]) => {\n // SEMVER use \"new Set\" to unique once we're only targeting es6\n // at the scale we expect remote config to be at, we probably won't see a performance hit from this unoptimized uniqueness\n // implementation.\n // const allKeys = [...new Set([...existing.map(p => p.key), ...Object.keys(all)])];\n const allKeys = [...existing.map(p => p.key), ...Object.keys(all)].filter((v, i, a) => a.indexOf(v) === i);\n return allKeys.map(key => {\n const updatedValue = all[key];\n return updatedValue ? new Parameter(key, rc ? rc.fetchTimeMillis : -1, updatedValue.getSource(), updatedValue.asString())\n : existing.find(p => p.key === key);\n });\n }, [] as Parameter[])\n);\n\n\n@Injectable({\n providedIn: 'any'\n})\nexport class AngularFireRemoteConfig {\n\n readonly changes: Observable<Parameter>;\n readonly parameters: Observable<Parameter[]>;\n readonly numbers: Observable<Record<string, number | undefined>> & Record<string, Observable<number>>;\n readonly booleans: Observable<Record<string, boolean | undefined>> & Record<string, Observable<boolean>>;\n readonly strings: Observable<Record<string, string | undefined>> & Record<string, Observable<string | undefined>>;\n\n constructor(\n @Inject(FIREBASE_OPTIONS) options: FirebaseOptions,\n @Optional() @Inject(FIREBASE_APP_NAME) name: string | null | undefined,\n @Optional() @Inject(SETTINGS) settings: Settings | null,\n @Optional() @Inject(DEFAULTS) defaultConfig: ConfigTemplate | null,\n private zone: NgZone,\n schedulers: ɵAngularFireSchedulers,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-types\n @Inject(PLATFORM_ID) platformId: Object\n ) {\n const remoteConfig$ = of(undefined).pipe(\n observeOn(schedulers.outsideAngular),\n switchMap(() => isSupported()),\n switchMap(isSupported => isSupported ? import('firebase/compat/remote-config') : EMPTY),\n map(() => ɵfirebaseAppFactory(options, zone, name)),\n map(app => ɵcacheInstance(`${app.name}.remote-config`, 'AngularFireRemoteConfig', app.name, () => {\n const rc = app.remoteConfig();\n if (settings) {\n rc.settings = settings;\n }\n if (defaultConfig) {\n rc.defaultConfig = defaultConfig;\n }\n return rc;\n }, [settings, defaultConfig])),\n startWith<firebase.remoteConfig.RemoteConfig, undefined>(undefined),\n shareReplay({ bufferSize: 1, refCount: false })\n ) as Observable<any>;\n\n const loadedRemoteConfig$ = remoteConfig$.pipe(\n filter<firebase.remoteConfig.RemoteConfig>(rc => !!rc)\n );\n\n const default$: Observable<Record<string, firebase.remoteConfig.Value>> = of(Object.keys(defaultConfig || {}).reduce(\n (c, k) => ({ ...c, [k]: new Value('default', defaultConfig[k].toString()) }), {}\n ));\n\n // we should filter out the defaults we provided to RC, since we have our own implementation\n // that gives us a -1 for fetchTimeMillis (so filterFresh can filter them out)\n const filterOutDefaults = map<Record<string, firebase.remoteConfig.Value>, Record<string, firebase.remoteConfig.Value>>(all =>\n Object.keys(all)\n .filter(key => all[key].getSource() !== 'default')\n .reduce((acc, key) => ({ ...acc, [key]: all[key] }), {})\n );\n\n const existing$ = loadedRemoteConfig$.pipe(\n switchMap(rc =>\n rc.activate()\n .then(() => rc.ensureInitialized())\n .then(() => rc.getAll())\n ),\n filterOutDefaults\n );\n\n const fresh$ = loadedRemoteConfig$.pipe(\n switchMap(rc => zone.runOutsideAngular(() =>\n rc.fetchAndActivate()\n .then(() => rc.ensureInitialized())\n .then(() => rc.getAll())\n )),\n filterOutDefaults\n );\n\n this.parameters = concat(default$, existing$, fresh$).pipe(\n scanToParametersArray(remoteConfig$),\n keepUnstableUntilFirst,\n shareReplay({ bufferSize: 1, refCount: true })\n );\n\n this.changes = this.parameters.pipe(\n switchMap(params => of(...params)),\n groupBy(param => param.key),\n mergeMap(group => group.pipe(\n distinctUntilChanged()\n ))\n );\n\n this.strings = proxyAll(this.parameters, 'strings');\n this.booleans = proxyAll(this.parameters, 'booleans');\n this.numbers = proxyAll(this.parameters, 'numbers');\n\n return ɵlazySDKProxy(this, loadedRemoteConfig$, zone);\n }\n\n}\n\n\nexport const budget = <T>(interval: number): MonoTypeOperatorFunction<T> => (source: Observable<T>) => new Observable<T>(observer => {\n let timedOut = false;\n // TODO use scheduler task rather than settimeout\n const timeout = setTimeout(() => {\n observer.complete();\n timedOut = true;\n }, interval);\n return source.subscribe({\n next(val) {\n if (!timedOut) {\n observer.next(val);\n }\n },\n error(err) {\n if (!timedOut) {\n clearTimeout(timeout);\n observer.error(err);\n }\n },\n complete() {\n if (!timedOut) {\n clearTimeout(timeout);\n observer.complete();\n }\n }\n });\n});\n\nconst typedMethod = (it: any) => {\n switch (typeof it) {\n case 'string':\n return 'asString';\n case 'boolean':\n return 'asBoolean';\n case 'number':\n return 'asNumber';\n default:\n return 'asString';\n }\n};\n\n\nexport function scanToObject(): OperatorFunction<Parameter, Record<string, string | undefined>>;\nexport function scanToObject(to: 'numbers'): OperatorFunction<Parameter, Record<string, number | undefined>>;\nexport function scanToObject(to: 'booleans'): OperatorFunction<Parameter, Record<string, boolean | undefined>>;\n// eslint-disable-next-line @typescript-eslint/unified-signatures\nexport function scanToObject(to: 'strings'): OperatorFunction<Parameter, Record<string, string | undefined>>;\nexport function scanToObject<T extends ConfigTemplate>(template: T): OperatorFunction<Parameter, T & Record<string, string | undefined>>;\nexport function scanToObject<T extends ConfigTemplate>(to: 'numbers' | 'booleans' | 'strings' | T = 'strings') {\n return pipe(\n // TODO cleanup\n scan(\n (c, p: Parameter) => ({\n ...c, [p.key]: typeof to === 'object' ?\n p[typedMethod(to[p.key])]() :\n p[AS_TO_FN[to]]()\n }),\n typeof to === 'object' ?\n to as T & Record<string, string | undefined> :\n {} as Record<string, number | boolean | string>\n ),\n debounceTime(1),\n budget(10),\n distinctUntilChanged((a, b) => JSON.stringify(a) === JSON.stringify(b))\n );\n}\n\nexport function mapToObject(): OperatorFunction<Parameter[], Record<string, string | undefined>>;\nexport function mapToObject(to: 'numbers'): OperatorFunction<Parameter[], Record<string, number | undefined>>;\nexport function mapToObject(to: 'booleans'): OperatorFunction<Parameter[], Record<string, boolean | undefined>>;\n// eslint-disable-next-line @typescript-eslint/unified-signatures\nexport function mapToObject(to: 'strings'): OperatorFunction<Parameter[], Record<string, string | undefined>>;\nexport function mapToObject<T extends ConfigTemplate>(template: T):\n OperatorFunction<Parameter[], T & Record<string, string | undefined>>;\nexport function mapToObject<T extends ConfigTemplate>(to: 'numbers' | 'booleans' | 'strings' | T = 'strings') {\n return pipe(\n // TODO this is getting a little long, cleanup\n map((params: Parameter[]) => params.reduce(\n (c, p) => ({\n ...c, [p.key]: typeof to === 'object' ?\n p[typedMethod(to[p.key])]() :\n p[AS_TO_FN[to]]()\n }),\n typeof to === 'object' ?\n to as T & Record<string, string | undefined> :\n {} as Record<string, number | boolean | string>\n )),\n distinctUntilChanged((a, b) => JSON.stringify(a) === JSON.stringify(b))\n );\n}\n\nɵapplyMixins(AngularFireRemoteConfig, [proxyPolyfillCompat]);\n","import { NgModule } from '@angular/core';\nimport { VERSION } from '@angular/fire';\nimport firebase from 'firebase/compat/app';\nimport { AngularFireRemoteConfig } from './remote-config';\n\n@NgModule({\n providers: [ AngularFireRemoteConfig ]\n})\nexport class AngularFireRemoteConfigModule {\n constructor() {\n firebase.registerVersion('angularfire', VERSION.full, 'rc-compat');\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;AAAA;AACA;AACO,MAAM,mBAAmB,GAAG;AACjC,IAAA,GAAG,EAAE,IAAI;AACT,IAAA,QAAQ,EAAE,IAAI;AACd,IAAA,aAAa,EAAE,IAAI;AACnB,IAAA,eAAe,EAAE,IAAI;AACrB,IAAA,eAAe,EAAE,IAAI;AACrB,IAAA,QAAQ,EAAE,IAAI;AACd,IAAA,iBAAiB,EAAE,IAAI;AACvB,IAAA,KAAK,EAAE,IAAI;AACX,IAAA,gBAAgB,EAAE,IAAI;AACtB,IAAA,MAAM,EAAE,IAAI;AACZ,IAAA,UAAU,EAAE,IAAI;AAChB,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,QAAQ,EAAE,IAAI;AACd,IAAA,WAAW,EAAE,IAAI;CAClB;;MCSY,QAAQ,GAAG,IAAI,cAAc,CAAW,oCAAoC,EA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AI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CACxE,CAAC;AACJ,CAAC;AAED,YAAY,CAAC,uBAAuB,EAAE,CAAC,mBAAmB,CAAC,CAAC;;MCpS/C,6BAA6B,CAAA;AACtC,IAAA,WAAA,GAAA;QACI,QAAQ,CAAC,eAAe,CAAC,aAAa,EAAE,OAAO,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;KACtE;uGAHQ,6BAA6B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;wGAA7B,6BAA6B,EAAA,CAAA,CAAA;wGAA7B,6BAA6B,EAAA,SAAA,EAF7B,CAAE,uBAAuB,CAAE,EAAA,CAAA,CAAA;;2FAE3B,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBAHzC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,SAAS,EAAE,CAAE,uBAAuB,CAAE;AACvC,iBAAA,CAAA;;;ACPD;;AAEG;;;;"}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/compat/remote-config/base.ts", "../../../src/compat/remote-config/remote-config.ts", "../../../src/compat/remote-config/remote-config.module.ts"],
4
+ "sourcesContent": ["// DO NOT MODIFY, this file is autogenerated by tools/build.ts\n// Export a null object with the same keys as firebase/compat/remote-config, so Proxy can work with proxy-polyfill in Internet Explorer\nexport const proxyPolyfillCompat = {\n app: null,\n settings: null,\n defaultConfig: null,\n fetchTimeMillis: null,\n lastFetchStatus: null,\n activate: null,\n ensureInitialized: null,\n fetch: null,\n fetchAndActivate: null,\n getAll: null,\n getBoolean: null,\n getNumber: null,\n getString: null,\n getValue: null,\n setLogLevel: null,\n};\n", "import { Inject, Injectable, InjectionToken, NgZone, Optional, PLATFORM_ID } from '@angular/core';\nimport { keepUnstableUntilFirst, ɵAngularFireSchedulers } from '@angular/fire';\nimport { ɵPromiseProxy, ɵapplyMixins, ɵlazySDKProxy } from '@angular/fire/compat';\nimport { FIREBASE_APP_NAME, FIREBASE_OPTIONS, ɵcacheInstance, ɵfirebaseAppFactory } from '@angular/fire/compat';\nimport { FirebaseOptions } from 'firebase/app';\nimport firebase from 'firebase/compat/app';\nimport { isSupported } from 'firebase/remote-config';\nimport { EMPTY, MonoTypeOperatorFunction, Observable, OperatorFunction, concat, of, pipe } from 'rxjs';\nimport {\n debounceTime,\n distinctUntilChanged,\n filter,\n groupBy,\n map,\n mergeMap,\n observeOn,\n scan,\n shareReplay,\n startWith,\n switchMap,\n withLatestFrom\n} from 'rxjs/operators';\nimport { proxyPolyfillCompat } from './base';\nimport { Settings } from './interfaces';\n\nexport type ConfigTemplate = Record<string, string | number | boolean>;\n\nexport const SETTINGS = new InjectionToken<Settings>('angularfire2.remoteConfig.settings');\nexport const DEFAULTS = new InjectionToken<ConfigTemplate>('angularfire2.remoteConfig.defaultConfig');\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface AngularFireRemoteConfig extends ɵPromiseProxy<firebase.remoteConfig.RemoteConfig> {\n}\n\nconst AS_TO_FN = { strings: 'asString', numbers: 'asNumber', booleans: 'asBoolean' };\nconst STATIC_VALUES = { numbers: 0, booleans: false, strings: undefined };\n\n// TODO look into the types here, I don't like the anys\nconst proxyAll = (observable: Observable<Parameter[]>, as: 'numbers' | 'booleans' | 'strings') => new Proxy(\n observable.pipe(mapToObject(as as any)), {\n get: (self, name: string) => self[name] || observable.pipe(\n map(all => all.find(p => p.key === name)),\n map(param => param ? param[AS_TO_FN[as]]() : STATIC_VALUES[as]),\n distinctUntilChanged()\n )\n }\n) as any;\n\n// TODO export as implements Partial<...> so minor doesn't break us\nexport class Value implements firebase.remoteConfig.Value {\n asBoolean() {\n return ['1', 'true', 't', 'y', 'yes', 'on'].indexOf(this._value.toLowerCase()) > -1;\n }\n\n asString() {\n return this._value;\n }\n\n asNumber() {\n return Number(this._value) || 0;\n }\n\n getSource() {\n return this._source;\n }\n\n constructor(public _source: firebase.remoteConfig.ValueSource, public _value: string) {\n }\n}\n\n// SEMVER use ConstructorParameters when we can support Typescript 3.6\nexport class Parameter extends Value {\n constructor(public key: string, public fetchTimeMillis: number, source: firebase.remoteConfig.ValueSource, value: string) {\n super(source, value);\n }\n}\n\n// If it's a Parameter array, test any, else test the individual Parameter\nconst filterTest = (fn: (param: Parameter) => boolean) => filter<Parameter | Parameter[]>(it => Array.isArray(it) ? it.some(fn) : fn(it));\n\n// Allow the user to bypass the default values and wait till they get something from the server, even if it's a cached copy;\n// if used in conjuntion with first() it will only fetch RC values from the server if they aren't cached locally\nexport const filterRemote = () => filterTest(p => p.getSource() === 'remote');\n\n// filterFresh allows the developer to effectively set up a maximum cache time\nexport const filterFresh = (howRecentInMillis: number) => filterTest(p => p.fetchTimeMillis + howRecentInMillis >= new Date().getTime());\n\n\n// I ditched loading the defaults into RC and a simple map for scan since we already have our own defaults implementation.\n// The idea here being that if they have a default that never loads from the server, they will be able to tell via fetchTimeMillis\n// on the Parameter. Also if it doesn't come from the server it won't emit again in .changes, due to the distinctUntilChanged,\n// which we can simplify to === rather than deep comparison\nconst scanToParametersArray = (\n remoteConfig: Observable<firebase.remoteConfig.RemoteConfig | undefined>\n): OperatorFunction<Record<string, firebase.remoteConfig.Value>, Parameter[]> => pipe(\n withLatestFrom(remoteConfig),\n scan((existing, [all, rc]) => {\n // SEMVER use \"new Set\" to unique once we're only targeting es6\n // at the scale we expect remote config to be at, we probably won't see a performance hit from this unoptimized uniqueness\n // implementation.\n // const allKeys = [...new Set([...existing.map(p => p.key), ...Object.keys(all)])];\n const allKeys = [...existing.map(p => p.key), ...Object.keys(all)].filter((v, i, a) => a.indexOf(v) === i);\n return allKeys.map(key => {\n const updatedValue = all[key];\n return updatedValue ? new Parameter(key, rc ? rc.fetchTimeMillis : -1, updatedValue.getSource(), updatedValue.asString())\n : existing.find(p => p.key === key);\n });\n }, [] as Parameter[])\n);\n\n\n@Injectable({\n providedIn: 'any'\n})\nexport class AngularFireRemoteConfig {\n\n readonly changes: Observable<Parameter>;\n readonly parameters: Observable<Parameter[]>;\n readonly numbers: Observable<Record<string, number | undefined>> & Record<string, Observable<number>>;\n readonly booleans: Observable<Record<string, boolean | undefined>> & Record<string, Observable<boolean>>;\n readonly strings: Observable<Record<string, string | undefined>> & Record<string, Observable<string | undefined>>;\n\n constructor(\n @Inject(FIREBASE_OPTIONS) options: FirebaseOptions,\n @Optional() @Inject(FIREBASE_APP_NAME) name: string | null | undefined,\n @Optional() @Inject(SETTINGS) settings: Settings | null,\n @Optional() @Inject(DEFAULTS) defaultConfig: ConfigTemplate | null,\n private zone: NgZone,\n schedulers: ɵAngularFireSchedulers,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-types\n @Inject(PLATFORM_ID) platformId: Object\n ) {\n const remoteConfig$ = of(undefined).pipe(\n observeOn(schedulers.outsideAngular),\n switchMap(() => isSupported()),\n switchMap(isSupported => isSupported ? import('firebase/compat/remote-config') : EMPTY),\n map(() => ɵfirebaseAppFactory(options, zone, name)),\n map(app => ɵcacheInstance(`${app.name}.remote-config`, 'AngularFireRemoteConfig', app.name, () => {\n const rc = app.remoteConfig();\n if (settings) {\n rc.settings = settings;\n }\n if (defaultConfig) {\n rc.defaultConfig = defaultConfig;\n }\n return rc;\n }, [settings, defaultConfig])),\n startWith<firebase.remoteConfig.RemoteConfig, undefined>(undefined),\n shareReplay({ bufferSize: 1, refCount: false })\n ) as Observable<any>;\n\n const loadedRemoteConfig$ = remoteConfig$.pipe(\n filter<firebase.remoteConfig.RemoteConfig>(rc => !!rc)\n );\n\n const default$: Observable<Record<string, firebase.remoteConfig.Value>> = of(Object.keys(defaultConfig || {}).reduce(\n (c, k) => ({ ...c, [k]: new Value('default', defaultConfig[k].toString()) }), {}\n ));\n\n // we should filter out the defaults we provided to RC, since we have our own implementation\n // that gives us a -1 for fetchTimeMillis (so filterFresh can filter them out)\n const filterOutDefaults = map<Record<string, firebase.remoteConfig.Value>, Record<string, firebase.remoteConfig.Value>>(all =>\n Object.keys(all)\n .filter(key => all[key].getSource() !== 'default')\n .reduce((acc, key) => ({ ...acc, [key]: all[key] }), {})\n );\n\n const existing$ = loadedRemoteConfig$.pipe(\n switchMap(rc =>\n rc.activate()\n .then(() => rc.ensureInitialized())\n .then(() => rc.getAll())\n ),\n filterOutDefaults\n );\n\n const fresh$ = loadedRemoteConfig$.pipe(\n switchMap(rc => zone.runOutsideAngular(() =>\n rc.fetchAndActivate()\n .then(() => rc.ensureInitialized())\n .then(() => rc.getAll())\n )),\n filterOutDefaults\n );\n\n this.parameters = concat(default$, existing$, fresh$).pipe(\n scanToParametersArray(remoteConfig$),\n keepUnstableUntilFirst,\n shareReplay({ bufferSize: 1, refCount: true })\n );\n\n this.changes = this.parameters.pipe(\n switchMap(params => of(...params)),\n groupBy(param => param.key),\n mergeMap(group => group.pipe(\n distinctUntilChanged()\n ))\n );\n\n this.strings = proxyAll(this.parameters, 'strings');\n this.booleans = proxyAll(this.parameters, 'booleans');\n this.numbers = proxyAll(this.parameters, 'numbers');\n\n return ɵlazySDKProxy(this, loadedRemoteConfig$, zone);\n }\n\n}\n\n\nexport const budget = <T>(interval: number): MonoTypeOperatorFunction<T> => (source: Observable<T>) => new Observable<T>(observer => {\n let timedOut = false;\n // TODO use scheduler task rather than settimeout\n const timeout = setTimeout(() => {\n observer.complete();\n timedOut = true;\n }, interval);\n return source.subscribe({\n next(val) {\n if (!timedOut) {\n observer.next(val);\n }\n },\n error(err) {\n if (!timedOut) {\n clearTimeout(timeout);\n observer.error(err);\n }\n },\n complete() {\n if (!timedOut) {\n clearTimeout(timeout);\n observer.complete();\n }\n }\n });\n});\n\nconst typedMethod = (it: any) => {\n switch (typeof it) {\n case 'string':\n return 'asString';\n case 'boolean':\n return 'asBoolean';\n case 'number':\n return 'asNumber';\n default:\n return 'asString';\n }\n};\n\n\nexport function scanToObject(): OperatorFunction<Parameter, Record<string, string | undefined>>;\nexport function scanToObject(to: 'numbers'): OperatorFunction<Parameter, Record<string, number | undefined>>;\nexport function scanToObject(to: 'booleans'): OperatorFunction<Parameter, Record<string, boolean | undefined>>;\n// eslint-disable-next-line @typescript-eslint/unified-signatures\nexport function scanToObject(to: 'strings'): OperatorFunction<Parameter, Record<string, string | undefined>>;\nexport function scanToObject<T extends ConfigTemplate>(template: T): OperatorFunction<Parameter, T & Record<string, string | undefined>>;\nexport function scanToObject<T extends ConfigTemplate>(to: 'numbers' | 'booleans' | 'strings' | T = 'strings') {\n return pipe(\n // TODO cleanup\n scan(\n (c, p: Parameter) => ({\n ...c, [p.key]: typeof to === 'object' ?\n p[typedMethod(to[p.key])]() :\n p[AS_TO_FN[to]]()\n }),\n typeof to === 'object' ?\n to as T & Record<string, string | undefined> :\n {} as Record<string, number | boolean | string>\n ),\n debounceTime(1),\n budget(10),\n distinctUntilChanged((a, b) => JSON.stringify(a) === JSON.stringify(b))\n );\n}\n\nexport function mapToObject(): OperatorFunction<Parameter[], Record<string, string | undefined>>;\nexport function mapToObject(to: 'numbers'): OperatorFunction<Parameter[], Record<string, number | undefined>>;\nexport function mapToObject(to: 'booleans'): OperatorFunction<Parameter[], Record<string, boolean | undefined>>;\n// eslint-disable-next-line @typescript-eslint/unified-signatures\nexport function mapToObject(to: 'strings'): OperatorFunction<Parameter[], Record<string, string | undefined>>;\nexport function mapToObject<T extends ConfigTemplate>(template: T):\n OperatorFunction<Parameter[], T & Record<string, string | undefined>>;\nexport function mapToObject<T extends ConfigTemplate>(to: 'numbers' | 'booleans' | 'strings' | T = 'strings') {\n return pipe(\n // TODO this is getting a little long, cleanup\n map((params: Parameter[]) => params.reduce(\n (c, p) => ({\n ...c, [p.key]: typeof to === 'object' ?\n p[typedMethod(to[p.key])]() :\n p[AS_TO_FN[to]]()\n }),\n typeof to === 'object' ?\n to as T & Record<string, string | undefined> :\n {} as Record<string, number | boolean | string>\n )),\n distinctUntilChanged((a, b) => JSON.stringify(a) === JSON.stringify(b))\n );\n}\n\nɵapplyMixins(AngularFireRemoteConfig, [proxyPolyfillCompat]);\n", "import { NgModule } from '@angular/core';\nimport { VERSION } from '@angular/fire';\nimport firebase from 'firebase/compat/app';\nimport { AngularFireRemoteConfig } from './remote-config';\n\n@NgModule({\n providers: [ AngularFireRemoteConfig ]\n})\nexport class AngularFireRemoteConfigModule {\n constructor() {\n firebase.registerVersion('angularfire', VERSION.full, 'rc-compat');\n }\n}\n"],
5
+ "mappings": ";AAEO,IAAM,sBAAsB;EACjC,KAAK;EACL,UAAU;EACV,eAAe;EACf,iBAAiB;EACjB,iBAAiB;EACjB,UAAU;EACV,mBAAmB;EACnB,OAAO;EACP,kBAAkB;EAClB,QAAQ;EACR,YAAY;EACZ,WAAW;EACX,WAAW;EACX,UAAU;EACV,aAAa;;;;ACjBf,SAAS,QAAQ,YAAY,gBAAgB,QAAQ,UAAU,mBAAmB;AAClF,SAAS,wBAAwB,8BAA8B;AAC/D,SAAwB,cAAc,qBAAqB;AAC3D,SAAS,mBAAmB,kBAAkB,gBAAgB,2BAA2B;AAGzF,SAAS,mBAAmB;AAC5B,SAAS,OAAiC,YAA8B,QAAQ,IAAI,YAAY;AAChG,SACE,cACA,sBACA,QACA,SACA,KACA,UACA,WACA,MACA,aACA,WACA,WACA,sBACK;;;AAMA,IAAM,WAAW,IAAI,eAAyB,oCAAoC;AAClF,IAAM,WAAW,IAAI,eAA+B,yCAAyC;AAMpG,IAAM,WAAW,EAAE,SAAS,YAAY,SAAS,YAAY,UAAU,YAAW;AAClF,IAAM,gBAAgB,EAAE,SAAS,GAAG,UAAU,OAAO,SAAS,OAAS;AAGvE,IAAM,WAAW,CAAC,YAAqC,OAA2C,IAAI,MACpG,WAAW,KAAK,YAAY,EAAS,CAAC,GAAG;EACvC,KAAK,CAAC,MAAM,SAAiB,KAAK,IAAI,KAAK,WAAW,KACpD,IAAI,SAAO,IAAI,KAAK,OAAK,EAAE,QAAQ,IAAI,CAAC,GACxC,IAAI,WAAS,QAAQ,MAAM,SAAS,EAAE,CAAC,EAAC,IAAK,cAAc,EAAE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O,OAAO,WAC3B,EAAE,YAAY,GAAG,EAAE,GAAG,CAAC,CAAC,EAAC,IACzB,EAAE,SAAS,EAAE,CAAC,EAAC;QAEnB,OAAO,OAAO,WACZ,KACA,CAAA,CAA+C,CAClD;IACD,qBAAqB,CAAC,GAAG,MAAM,KAAK,UAAU,CAAC,MAAM,KAAK,UAAU,CAAC,CAAC;EAAC;AAE3E;AAEA,aAAa,yBAAyB,CAAC,mBAAmB,CAAC;;;AC5S3D,SAAS,gBAAgB;AACzB,SAAS,eAAe;AACxB,OAAO,cAAc;;AAMf,IAAO,gCAAP,MAAO,+BAA6B;EACtC,cAAA;AACI,aAAS,gBAAgB,eAAe,QAAQ,MAAM,WAAW;EACrE;4GAHS,gCAA6B,MAAA,CAAA,GAAA,QAAA,oBAAA,SAAA,CAAA;6GAA7B,+BAA6B,CAAA;6GAA7B,gCAA6B,WAF7B,CAAE,uBAAuB,EAAE,CAAA;;kGAE3B,+BAA6B,YAAA,CAAA;QAHzC;SAAS;IACR,WAAW,CAAE,uBAAuB;GACrC;;",
6
+ "names": ["isSupported"]
7
+ }
@@ -1,248 +1,241 @@
1
- import * as i1 from '@angular/fire';
2
- import { observeOutsideAngular, keepUnstableUntilFirst, VERSION } from '@angular/fire';
3
- import { Observable, of, from } from 'rxjs';
4
- import { debounceTime, map, switchMap, tap } from 'rxjs/operators';
5
- import * as i0 from '@angular/core';
6
- import { InjectionToken, PLATFORM_ID, Injectable, Inject, Optional, Pipe, NgModule } from '@angular/core';
7
- import * as i2 from '@angular/fire/app-check';
8
- import { ɵfirebaseAppFactory, ɵcacheInstance, FIREBASE_OPTIONS, FIREBASE_APP_NAME } from '@angular/fire/compat';
9
- import 'firebase/compat/storage';
10
- import firebase from 'firebase/compat/app';
11
- import { AsyncPipe } from '@angular/common';
12
- import * as i2$1 from '@angular/platform-browser';
13
- import { makeStateKey } from '@angular/platform-browser';
14
-
15
- // need to import, else the types become import('firebase/compat/app').default.storage.UploadTask
16
- // and it no longer works w/Firebase v7
17
- // Things aren't working great, I'm having to put in a lot of work-arounds for what
18
- // appear to be Firebase JS SDK bugs https://github.com/firebase/firebase-js-sdk/issues/4158
1
+ // observable/fromTask.mjs
2
+ import { Observable } from "rxjs";
3
+ import { debounceTime } from "rxjs/operators";
19
4
  function fromTask(task) {
20
- return new Observable(subscriber => {
21
- const progress = (snap) => subscriber.next(snap);
22
- const error = e => subscriber.error(e);
23
- const complete = () => subscriber.complete();
24
- // emit the current snapshot, so they don't have to wait for state_changes
25
- // to fire next... this is stale if the task is no longer running :(
26
- progress(task.snapshot);
27
- const unsub = task.on('state_changed', progress);
28
- // it turns out that neither task snapshot nor 'state_changed' fire the last
29
- // snapshot before completion, the one with status 'success" and 100% progress
30
- // so let's use the promise form of the task for that
31
- task.then(snapshot => {
32
- progress(snapshot);
33
- complete();
34
- }, e => {
35
- // TODO investigate, again this is stale, we never fire a canceled or error it seems
36
- progress(task.snapshot);
37
- error(e);
38
- });
39
- // on's type if Function, rather than () => void, need to wrap
40
- return function unsubscribe() {
41
- unsub();
42
- };
43
- }).pipe(
5
+ return new Observable((subscriber) => {
6
+ const progress = (snap) => subscriber.next(snap);
7
+ const error = (e) => subscriber.error(e);
8
+ const complete = () => subscriber.complete();
9
+ progress(task.snapshot);
10
+ const unsub = task.on("state_changed", progress);
11
+ task.then((snapshot) => {
12
+ progress(snapshot);
13
+ complete();
14
+ }, (e) => {
15
+ progress(task.snapshot);
16
+ error(e);
17
+ });
18
+ return function unsubscribe() {
19
+ unsub();
20
+ };
21
+ }).pipe(
44
22
  // deal with sync emissions from first emitting `task.snapshot`, this makes sure
45
23
  // that if the task is already finished we don't emit the old running state
46
- debounceTime(0));
24
+ debounceTime(0)
25
+ );
47
26
  }
48
27
 
49
- /**
50
- * Create an AngularFireUploadTask from a regular UploadTask from the Storage SDK.
51
- * This method creates an observable of the upload and returns on object that provides
52
- * multiple methods for controlling and monitoring the file upload.
53
- */
28
+ // task.mjs
29
+ import { map } from "rxjs/operators";
54
30
  function createUploadTask(task) {
55
- const inner$ = fromTask(task);
56
- return {
57
- task,
58
- then: task.then.bind(task),
59
- catch: task.catch.bind(task),
60
- pause: task.pause.bind(task),
61
- cancel: task.cancel.bind(task),
62
- resume: task.resume.bind(task),
63
- snapshotChanges: () => inner$,
64
- percentageChanges: () => inner$.pipe(map(s => s.bytesTransferred / s.totalBytes * 100))
65
- };
31
+ const inner$ = fromTask(task);
32
+ return {
33
+ task,
34
+ then: task.then.bind(task),
35
+ catch: task.catch.bind(task),
36
+ pause: task.pause.bind(task),
37
+ cancel: task.cancel.bind(task),
38
+ resume: task.resume.bind(task),
39
+ snapshotChanges: () => inner$,
40
+ percentageChanges: () => inner$.pipe(map((s) => s.bytesTransferred / s.totalBytes * 100))
41
+ };
66
42
  }
67
43
 
68
- /**
69
- * Create an AngularFire wrapped Storage Reference. This object
70
- * creates observable methods from promise based methods.
71
- */
44
+ // ref.mjs
45
+ import { keepUnstableUntilFirst, observeOutsideAngular } from "@angular/fire";
46
+ import { from, of } from "rxjs";
47
+ import { switchMap } from "rxjs/operators";
72
48
  function createStorageRef(ref) {
73
- return {
74
- getDownloadURL: () => of(undefined).pipe(observeOutsideAngular, switchMap(() => ref.getDownloadURL()), keepUnstableUntilFirst),
75
- getMetadata: () => of(undefined).pipe(observeOutsideAngular, switchMap(() => ref.getMetadata()), keepUnstableUntilFirst),
76
- delete: () => from(ref.delete()),
77
- child: (path) => createStorageRef(ref.child(path)),
78
- updateMetadata: (meta) => from(ref.updateMetadata(meta)),
79
- put: (data, metadata) => {
80
- const task = ref.put(data, metadata);
81
- return createUploadTask(task);
82
- },
83
- putString: (data, format, metadata) => {
84
- const task = ref.putString(data, format, metadata);
85
- return createUploadTask(task);
86
- },
87
- list: (options) => from(ref.list(options)),
88
- listAll: () => from(ref.listAll())
89
- };
49
+ return {
50
+ getDownloadURL: () => of(void 0).pipe(observeOutsideAngular, switchMap(() => ref.getDownloadURL()), keepUnstableUntilFirst),
51
+ getMetadata: () => of(void 0).pipe(observeOutsideAngular, switchMap(() => ref.getMetadata()), keepUnstableUntilFirst),
52
+ delete: () => from(ref.delete()),
53
+ child: (path) => createStorageRef(ref.child(path)),
54
+ updateMetadata: (meta) => from(ref.updateMetadata(meta)),
55
+ put: (data, metadata) => {
56
+ const task = ref.put(data, metadata);
57
+ return createUploadTask(task);
58
+ },
59
+ putString: (data, format, metadata) => {
60
+ const task = ref.putString(data, format, metadata);
61
+ return createUploadTask(task);
62
+ },
63
+ list: (options) => from(ref.list(options)),
64
+ listAll: () => from(ref.listAll())
65
+ };
90
66
  }
91
67
 
92
- const BUCKET = new InjectionToken('angularfire2.storageBucket');
93
- const MAX_UPLOAD_RETRY_TIME = new InjectionToken('angularfire2.storage.maxUploadRetryTime');
94
- const MAX_OPERATION_RETRY_TIME = new InjectionToken('angularfire2.storage.maxOperationRetryTime');
95
- const USE_EMULATOR = new InjectionToken('angularfire2.storage.use-emulator');
96
- /**
97
- * AngularFireStorage Service
98
- *
99
- * This service is the main entry point for this feature module. It provides
100
- * an API for uploading and downloading binary files from Cloud Storage for
101
- * Firebase.
102
- */
103
- class AngularFireStorage {
104
- storage;
105
- constructor(options, name, storageBucket,
106
- // eslint-disable-next-line @typescript-eslint/ban-types
107
- platformId, zone, schedulers, maxUploadRetryTime, maxOperationRetryTime, _useEmulator, _appCheckInstances) {
108
- const app = ɵfirebaseAppFactory(options, zone, name);
109
- this.storage = ɵcacheInstance(`${app.name}.storage.${storageBucket}`, 'AngularFireStorage', app.name, () => {
110
- const storage = zone.runOutsideAngular(() => app.storage(storageBucket || undefined));
111
- const useEmulator = _useEmulator;
112
- if (useEmulator) {
113
- storage.useEmulator(...useEmulator);
114
- }
115
- if (maxUploadRetryTime) {
116
- storage.setMaxUploadRetryTime(maxUploadRetryTime);
117
- }
118
- if (maxOperationRetryTime) {
119
- storage.setMaxOperationRetryTime(maxOperationRetryTime);
120
- }
121
- return storage;
122
- }, [maxUploadRetryTime, maxOperationRetryTime]);
123
- }
124
- ref(path) {
125
- return createStorageRef(this.storage.ref(path));
126
- }
127
- refFromURL(path) {
128
- return createStorageRef(this.storage.refFromURL(path));
129
- }
130
- upload(path, data, metadata) {
131
- const storageRef = this.storage.ref(path);
132
- const ref = createStorageRef(storageRef);
133
- return ref.put(data, metadata);
134
- }
135
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: AngularFireStorage, deps: [{ token: FIREBASE_OPTIONS }, { token: FIREBASE_APP_NAME, optional: true }, { token: BUCKET, optional: true }, { token: PLATFORM_ID }, { token: i0.NgZone }, { token: i1.ɵAngularFireSchedulers }, { token: MAX_UPLOAD_RETRY_TIME, optional: true }, { token: MAX_OPERATION_RETRY_TIME, optional: true }, { token: USE_EMULATOR, optional: true }, { token: i2.AppCheckInstances, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
136
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: AngularFireStorage, providedIn: 'any' });
137
- }
138
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: AngularFireStorage, decorators: [{
139
- type: Injectable,
140
- args: [{
141
- providedIn: 'any'
142
- }]
143
- }], ctorParameters: () => [{ type: undefined, decorators: [{
144
- type: Inject,
145
- args: [FIREBASE_OPTIONS]
146
- }] }, { type: undefined, decorators: [{
147
- type: Optional
148
- }, {
149
- type: Inject,
150
- args: [FIREBASE_APP_NAME]
151
- }] }, { type: undefined, decorators: [{
152
- type: Optional
153
- }, {
154
- type: Inject,
155
- args: [BUCKET]
156
- }] }, { type: Object, decorators: [{
157
- type: Inject,
158
- args: [PLATFORM_ID]
159
- }] }, { type: i0.NgZone }, { type: i1.ɵAngularFireSchedulers }, { type: undefined, decorators: [{
160
- type: Optional
161
- }, {
162
- type: Inject,
163
- args: [MAX_UPLOAD_RETRY_TIME]
164
- }] }, { type: undefined, decorators: [{
165
- type: Optional
166
- }, {
167
- type: Inject,
168
- args: [MAX_OPERATION_RETRY_TIME]
169
- }] }, { type: undefined, decorators: [{
170
- type: Optional
171
- }, {
172
- type: Inject,
173
- args: [USE_EMULATOR]
174
- }] }, { type: i2.AppCheckInstances, decorators: [{
175
- type: Optional
176
- }] }] });
68
+ // storage.mjs
69
+ import { Inject, Injectable, InjectionToken, NgZone, Optional, PLATFORM_ID } from "@angular/core";
70
+ import { ɵAngularFireSchedulers } from "@angular/fire";
71
+ import { AppCheckInstances } from "@angular/fire/app-check";
72
+ import { FIREBASE_APP_NAME, FIREBASE_OPTIONS, ɵcacheInstance, ɵfirebaseAppFactory } from "@angular/fire/compat";
73
+ import "firebase/compat/storage";
74
+ import * as i0 from "@angular/core";
75
+ import * as i1 from "@angular/fire";
76
+ import * as i2 from "@angular/fire/app-check";
77
+ var BUCKET = new InjectionToken("angularfire2.storageBucket");
78
+ var MAX_UPLOAD_RETRY_TIME = new InjectionToken("angularfire2.storage.maxUploadRetryTime");
79
+ var MAX_OPERATION_RETRY_TIME = new InjectionToken("angularfire2.storage.maxOperationRetryTime");
80
+ var USE_EMULATOR = new InjectionToken("angularfire2.storage.use-emulator");
81
+ var AngularFireStorage = class _AngularFireStorage {
82
+ storage;
83
+ constructor(options, name, storageBucket, platformId, zone, schedulers, maxUploadRetryTime, maxOperationRetryTime, _useEmulator, _appCheckInstances) {
84
+ const app = ɵfirebaseAppFactory(options, zone, name);
85
+ this.storage = ɵcacheInstance(`${app.name}.storage.${storageBucket}`, "AngularFireStorage", app.name, () => {
86
+ const storage = zone.runOutsideAngular(() => app.storage(storageBucket || void 0));
87
+ const useEmulator = _useEmulator;
88
+ if (useEmulator) {
89
+ storage.useEmulator(...useEmulator);
90
+ }
91
+ if (maxUploadRetryTime) {
92
+ storage.setMaxUploadRetryTime(maxUploadRetryTime);
93
+ }
94
+ if (maxOperationRetryTime) {
95
+ storage.setMaxOperationRetryTime(maxOperationRetryTime);
96
+ }
97
+ return storage;
98
+ }, [maxUploadRetryTime, maxOperationRetryTime]);
99
+ }
100
+ ref(path) {
101
+ return createStorageRef(this.storage.ref(path));
102
+ }
103
+ refFromURL(path) {
104
+ return createStorageRef(this.storage.refFromURL(path));
105
+ }
106
+ upload(path, data, metadata) {
107
+ const storageRef = this.storage.ref(path);
108
+ const ref = createStorageRef(storageRef);
109
+ return ref.put(data, metadata);
110
+ }
111
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-rc.3", ngImport: i0, type: _AngularFireStorage, deps: [{ token: FIREBASE_OPTIONS }, { token: FIREBASE_APP_NAME, optional: true }, { token: BUCKET, optional: true }, { token: PLATFORM_ID }, { token: i0.NgZone }, { token: i1.ɵAngularFireSchedulers }, { token: MAX_UPLOAD_RETRY_TIME, optional: true }, { token: MAX_OPERATION_RETRY_TIME, optional: true }, { token: USE_EMULATOR, optional: true }, { token: i2.AppCheckInstances, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
112
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-rc.3", ngImport: i0, type: _AngularFireStorage, providedIn: "any" });
113
+ };
114
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-rc.3", ngImport: i0, type: AngularFireStorage, decorators: [{
115
+ type: Injectable,
116
+ args: [{
117
+ providedIn: "any"
118
+ }]
119
+ }], ctorParameters: () => [{ type: void 0, decorators: [{
120
+ type: Inject,
121
+ args: [FIREBASE_OPTIONS]
122
+ }] }, { type: void 0, decorators: [{
123
+ type: Optional
124
+ }, {
125
+ type: Inject,
126
+ args: [FIREBASE_APP_NAME]
127
+ }] }, { type: void 0, decorators: [{
128
+ type: Optional
129
+ }, {
130
+ type: Inject,
131
+ args: [BUCKET]
132
+ }] }, { type: Object, decorators: [{
133
+ type: Inject,
134
+ args: [PLATFORM_ID]
135
+ }] }, { type: i0.NgZone }, { type: i1.ɵAngularFireSchedulers }, { type: void 0, decorators: [{
136
+ type: Optional
137
+ }, {
138
+ type: Inject,
139
+ args: [MAX_UPLOAD_RETRY_TIME]
140
+ }] }, { type: void 0, decorators: [{
141
+ type: Optional
142
+ }, {
143
+ type: Inject,
144
+ args: [MAX_OPERATION_RETRY_TIME]
145
+ }] }, { type: void 0, decorators: [{
146
+ type: Optional
147
+ }, {
148
+ type: Inject,
149
+ args: [USE_EMULATOR]
150
+ }] }, { type: i2.AppCheckInstances, decorators: [{
151
+ type: Optional
152
+ }] }] });
177
153
 
178
- /** to be used with in combination with | async */
179
- class GetDownloadURLPipe {
180
- storage;
181
- state;
182
- asyncPipe;
183
- path;
184
- downloadUrl$;
185
- constructor(storage, cdr, state) {
186
- this.storage = storage;
187
- this.state = state;
188
- this.asyncPipe = new AsyncPipe(cdr);
154
+ // pipes/storageUrl.pipe.mjs
155
+ import { AsyncPipe } from "@angular/common";
156
+ import { ChangeDetectorRef, NgModule, Optional as Optional2, Pipe, TransferState, makeStateKey } from "@angular/core";
157
+ import { of as of2 } from "rxjs";
158
+ import { tap } from "rxjs/operators";
159
+ import * as i02 from "@angular/core";
160
+ var GetDownloadURLPipe = class _GetDownloadURLPipe {
161
+ storage;
162
+ state;
163
+ asyncPipe;
164
+ path;
165
+ downloadUrl$;
166
+ constructor(storage, cdr, state) {
167
+ this.storage = storage;
168
+ this.state = state;
169
+ this.asyncPipe = new AsyncPipe(cdr);
170
+ }
171
+ transform(path) {
172
+ if (path !== this.path) {
173
+ this.path = path;
174
+ const key = makeStateKey(`|getDownloadURL|${path}`);
175
+ const existing = this.state?.get(key, void 0);
176
+ this.downloadUrl$ = existing ? of2(existing) : this.storage.ref(path).getDownloadURL().pipe(tap((it) => this.state?.set(key, it)));
189
177
  }
190
- transform(path) {
191
- if (path !== this.path) {
192
- this.path = path;
193
- const key = makeStateKey(`|getDownloadURL|${path}`);
194
- const existing = this.state?.get(key, undefined);
195
- this.downloadUrl$ = existing ? of(existing) : this.storage.ref(path).getDownloadURL().pipe(tap(it => this.state?.set(key, it)));
196
- }
197
- return this.asyncPipe.transform(this.downloadUrl$);
198
- }
199
- ngOnDestroy() {
200
- this.asyncPipe.ngOnDestroy();
201
- }
202
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: GetDownloadURLPipe, deps: [{ token: AngularFireStorage }, { token: i0.ChangeDetectorRef }, { token: i2$1.TransferState, optional: true }], target: i0.ɵɵFactoryTarget.Pipe });
203
- static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.0.6", ngImport: i0, type: GetDownloadURLPipe, name: "getDownloadURL", pure: false });
204
- }
205
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: GetDownloadURLPipe, decorators: [{
206
- type: Pipe,
207
- args: [{
208
- name: 'getDownloadURL',
209
- pure: false,
210
- }]
211
- }], ctorParameters: () => [{ type: AngularFireStorage }, { type: i0.ChangeDetectorRef }, { type: i2$1.TransferState, decorators: [{
212
- type: Optional
213
- }] }] });
214
- class GetDownloadURLPipeModule {
215
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: GetDownloadURLPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
216
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.6", ngImport: i0, type: GetDownloadURLPipeModule, declarations: [GetDownloadURLPipe], exports: [GetDownloadURLPipe] });
217
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: GetDownloadURLPipeModule });
218
- }
219
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: GetDownloadURLPipeModule, decorators: [{
220
- type: NgModule,
221
- args: [{
222
- declarations: [GetDownloadURLPipe],
223
- exports: [GetDownloadURLPipe],
224
- }]
225
- }] });
226
-
227
- class AngularFireStorageModule {
228
- constructor() {
229
- firebase.registerVersion('angularfire', VERSION.full, 'gcs-compat');
230
- }
231
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: AngularFireStorageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
232
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.6", ngImport: i0, type: AngularFireStorageModule, exports: [GetDownloadURLPipeModule] });
233
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: AngularFireStorageModule, providers: [AngularFireStorage], imports: [GetDownloadURLPipeModule] });
234
- }
235
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: AngularFireStorageModule, decorators: [{
236
- type: NgModule,
237
- args: [{
238
- exports: [GetDownloadURLPipeModule],
239
- providers: [AngularFireStorage]
240
- }]
241
- }], ctorParameters: () => [] });
242
-
243
- /**
244
- * Generated bundle index. Do not edit.
245
- */
178
+ return this.asyncPipe.transform(this.downloadUrl$);
179
+ }
180
+ ngOnDestroy() {
181
+ this.asyncPipe.ngOnDestroy();
182
+ }
183
+ static ɵfac = i02.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-rc.3", ngImport: i02, type: _GetDownloadURLPipe, deps: [{ token: AngularFireStorage }, { token: i02.ChangeDetectorRef }, { token: i02.TransferState, optional: true }], target: i02.ɵɵFactoryTarget.Pipe });
184
+ static ɵpipe = i02.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.0.0-rc.3", ngImport: i02, type: _GetDownloadURLPipe, name: "getDownloadURL", pure: false });
185
+ };
186
+ i02.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-rc.3", ngImport: i02, type: GetDownloadURLPipe, decorators: [{
187
+ type: Pipe,
188
+ args: [{
189
+ name: "getDownloadURL",
190
+ pure: false
191
+ }]
192
+ }], ctorParameters: () => [{ type: AngularFireStorage }, { type: i02.ChangeDetectorRef }, { type: i02.TransferState, decorators: [{
193
+ type: Optional2
194
+ }] }] });
195
+ var GetDownloadURLPipeModule = class _GetDownloadURLPipeModule {
196
+ static ɵfac = i02.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-rc.3", ngImport: i02, type: _GetDownloadURLPipeModule, deps: [], target: i02.ɵɵFactoryTarget.NgModule });
197
+ static ɵmod = i02.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.0-rc.3", ngImport: i02, type: _GetDownloadURLPipeModule, declarations: [GetDownloadURLPipe], exports: [GetDownloadURLPipe] });
198
+ static ɵinj = i02.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.0-rc.3", ngImport: i02, type: _GetDownloadURLPipeModule });
199
+ };
200
+ i02.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-rc.3", ngImport: i02, type: GetDownloadURLPipeModule, decorators: [{
201
+ type: NgModule,
202
+ args: [{
203
+ declarations: [GetDownloadURLPipe],
204
+ exports: [GetDownloadURLPipe]
205
+ }]
206
+ }] });
246
207
 
247
- export { AngularFireStorage, AngularFireStorageModule, BUCKET, GetDownloadURLPipe, GetDownloadURLPipeModule, MAX_OPERATION_RETRY_TIME, MAX_UPLOAD_RETRY_TIME, USE_EMULATOR, createStorageRef, createUploadTask, fromTask };
208
+ // storage.module.mjs
209
+ import { NgModule as NgModule2 } from "@angular/core";
210
+ import { VERSION } from "@angular/fire";
211
+ import firebase from "firebase/compat/app";
212
+ import * as i03 from "@angular/core";
213
+ var AngularFireStorageModule = class _AngularFireStorageModule {
214
+ constructor() {
215
+ firebase.registerVersion("angularfire", VERSION.full, "gcs-compat");
216
+ }
217
+ static ɵfac = i03.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-rc.3", ngImport: i03, type: _AngularFireStorageModule, deps: [], target: i03.ɵɵFactoryTarget.NgModule });
218
+ static ɵmod = i03.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.0-rc.3", ngImport: i03, type: _AngularFireStorageModule, exports: [GetDownloadURLPipeModule] });
219
+ static ɵinj = i03.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.0-rc.3", ngImport: i03, type: _AngularFireStorageModule, providers: [AngularFireStorage], imports: [GetDownloadURLPipeModule] });
220
+ };
221
+ i03.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-rc.3", ngImport: i03, type: AngularFireStorageModule, decorators: [{
222
+ type: NgModule2,
223
+ args: [{
224
+ exports: [GetDownloadURLPipeModule],
225
+ providers: [AngularFireStorage]
226
+ }]
227
+ }], ctorParameters: () => [] });
228
+ export {
229
+ AngularFireStorage,
230
+ AngularFireStorageModule,
231
+ BUCKET,
232
+ GetDownloadURLPipe,
233
+ GetDownloadURLPipeModule,
234
+ MAX_OPERATION_RETRY_TIME,
235
+ MAX_UPLOAD_RETRY_TIME,
236
+ USE_EMULATOR,
237
+ createStorageRef,
238
+ createUploadTask,
239
+ fromTask
240
+ };
248
241
  //# sourceMappingURL=angular-fire-compat-storage.mjs.map