@dereekb/dbx-firebase 13.4.0 → 13.4.2
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.
- package/fesm2022/dereekb-dbx-firebase-oidc.mjs +98 -13
- package/fesm2022/dereekb-dbx-firebase-oidc.mjs.map +1 -1
- package/fesm2022/dereekb-dbx-firebase.mjs +410 -131
- package/fesm2022/dereekb-dbx-firebase.mjs.map +1 -1
- package/package.json +10 -10
- package/types/dereekb-dbx-firebase-oidc.d.ts +97 -10
- package/types/dereekb-dbx-firebase.d.ts +419 -92
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, Injectable, provideAppInitializer, makeEnvironmentProviders, InjectionToken, Component, model, computed, ChangeDetectionStrategy, signal, Directive, EventEmitter, input, output, Injector,
|
|
2
|
+
import { inject, Injectable, provideAppInitializer, makeEnvironmentProviders, InjectionToken, Component, model, computed, ChangeDetectionStrategy, signal, Directive, EventEmitter, input, output, Injector, viewChild, HostListener, NgModule, ElementRef, forwardRef, effect, DestroyRef, Inject, Optional, Pipe } from '@angular/core';
|
|
3
3
|
import { DbxAnalyticsService } from '@dereekb/dbx-analytics';
|
|
4
4
|
import { asObservable, timeoutStartWith, filterMaybe, isNot, SubscriptionObject, lazyFrom, switchMapWhileTrue, loadingStateFromObs, distinctUntilKeysChange, cleanupDestroyable, iterationHasNextAndCanLoadMore, pageItemAccumulatorCurrentPage, accumulatorFlattenPageListLoadingState, useFirst, itemAccumulatorNextPageUntilResultsCount, iteratorNextPageUntilPage, iteratorNextPageUntilMaxPageLoadLimit, pageLoadingStateFromObs, useAsObservable, filterMaybeArray, mapEachAsync, invertObservableDecision, filterItemsWithObservableDecision, switchMapMaybe, beginLoading, mapLoadingStateValueWithOperator, valueFromFinishedLoadingState, skipInitialMaybe, distinctUntilModelKeyChange, successResult, errorResult, isLoadingStateLoading, cleanup, mapLoadingState, throwErrorFromLoadingStateError, maybeValueFromObservableOrValue, distinctUntilHasDifferentValues, MultiSubscriptionObject, startWithBeginLoading, skipAllInitialMaybe } from '@dereekb/rxjs';
|
|
5
5
|
import { switchMap, of, shareReplay, map, distinctUntilChanged, EMPTY, catchError, firstValueFrom, BehaviorSubject, combineLatest, first, from, tap, interval, exhaustMap, filter, take, startWith, Subject, throttleTime, NEVER, defaultIfEmpty, combineLatestWith, mergeMap, Observable } from 'rxjs';
|
|
@@ -35,6 +35,12 @@ import { __decorate, __param } from 'tslib';
|
|
|
35
35
|
import { MatDialog } from '@angular/material/dialog';
|
|
36
36
|
import { BaseError } from 'make-error';
|
|
37
37
|
|
|
38
|
+
/**
|
|
39
|
+
* Converts a Firebase Auth {@link User} into an {@link AuthUserInfo} containing display name, email, phone, photo URL, UID, and metadata timestamps.
|
|
40
|
+
*
|
|
41
|
+
* @param user - The Firebase Auth user to convert.
|
|
42
|
+
* @returns An AuthUserInfo object with the user's profile and metadata.
|
|
43
|
+
*/
|
|
38
44
|
function authUserInfoFromAuthUser(user) {
|
|
39
45
|
return {
|
|
40
46
|
displayName: user?.displayName,
|
|
@@ -46,6 +52,12 @@ function authUserInfoFromAuthUser(user) {
|
|
|
46
52
|
lastSignInTime: safeFormatToISO8601DateString(user.metadata.lastSignInTime)
|
|
47
53
|
};
|
|
48
54
|
}
|
|
55
|
+
/**
|
|
56
|
+
* Extracts a {@link FirebaseAuthToken} from a Firebase Auth {@link User}, including email verification status and metadata timestamps.
|
|
57
|
+
*
|
|
58
|
+
* @param user - The Firebase Auth user to extract token info from.
|
|
59
|
+
* @returns A FirebaseAuthToken with the user's auth-related properties.
|
|
60
|
+
*/
|
|
49
61
|
function firebaseAuthTokenFromUser(user) {
|
|
50
62
|
return {
|
|
51
63
|
email: user.email,
|
|
@@ -76,6 +88,13 @@ function authUserStateFromFirebaseAuthServiceFunction(stateForLoggedInUser = ()
|
|
|
76
88
|
}), shareReplay(1));
|
|
77
89
|
};
|
|
78
90
|
}
|
|
91
|
+
/**
|
|
92
|
+
* Creates an AuthUserStateObsFunction that derives the user state from the current ID token using the provided mapping function.
|
|
93
|
+
*
|
|
94
|
+
* @param stateFromToken - Function that maps an IdTokenResult to an AuthUserState.
|
|
95
|
+
* @param defaultState - The fallback state when no token is available. Defaults to 'user'.
|
|
96
|
+
* @returns An AuthUserStateObsFunction that reads state from the ID token.
|
|
97
|
+
*/
|
|
79
98
|
function stateFromTokenForLoggedInUserFunction(stateFromToken, defaultState = 'user') {
|
|
80
99
|
return (dbxFirebaseAuthService) => {
|
|
81
100
|
return readValueFromIdToken(dbxFirebaseAuthService, stateFromToken, defaultState);
|
|
@@ -283,6 +302,12 @@ function dbxFirebaseAuthContextInfo(service, user, jwtToken) {
|
|
|
283
302
|
return result;
|
|
284
303
|
}
|
|
285
304
|
|
|
305
|
+
/**
|
|
306
|
+
* Extracts analytics user properties (name, email, creation time) from an {@link AuthUserInfo} instance.
|
|
307
|
+
*
|
|
308
|
+
* @param user - The authenticated user info to extract properties from.
|
|
309
|
+
* @returns AnalyticsUserProperties populated from the user info.
|
|
310
|
+
*/
|
|
286
311
|
function readDbxAnalyticsUserPropertiesFromAuthUserInfo(user) {
|
|
287
312
|
const properties = {
|
|
288
313
|
name: user.displayName ?? '',
|
|
@@ -461,7 +486,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
461
486
|
*/
|
|
462
487
|
const DBX_FIREBASE_LOGIN_TERMS_OF_SERVICE_URLS_CONFIG = new InjectionToken('DBX_FIREBASE_LOGIN_TERMS_OF_SERVICE_URLS_CONFIG');
|
|
463
488
|
|
|
464
|
-
/**
|
|
489
|
+
/**
|
|
490
|
+
* Default terms of service display component with links to Terms and Privacy Policy URLs.
|
|
491
|
+
*/
|
|
465
492
|
class DbxFirebaseLoginTermsSimpleComponent {
|
|
466
493
|
dbxFirebaseLoginTermsConfig = inject(DBX_FIREBASE_LOGIN_TERMS_OF_SERVICE_URLS_CONFIG);
|
|
467
494
|
tosAnchor = {
|
|
@@ -496,7 +523,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
496
523
|
}]
|
|
497
524
|
}] });
|
|
498
525
|
|
|
499
|
-
/**
|
|
526
|
+
/**
|
|
527
|
+
* Default password config requiring a minimum of 6 characters (Firebase Auth minimum).
|
|
528
|
+
*/
|
|
500
529
|
const DEFAULT_FIREBASE_AUTH_LOGIN_PASSWORD_CONFIG = {
|
|
501
530
|
minLength: 6
|
|
502
531
|
};
|
|
@@ -530,8 +559,9 @@ class DbxFirebaseAuthLoginService {
|
|
|
530
559
|
/**
|
|
531
560
|
* Used to register a provider. If a provider is already registered, this will override it by default.
|
|
532
561
|
*
|
|
533
|
-
* @param provider
|
|
534
|
-
* @param override
|
|
562
|
+
* @param provider - The login provider to register.
|
|
563
|
+
* @param override - Whether to override an existing provider of the same type. Defaults to true.
|
|
564
|
+
* @returns True if the provider was registered, false if it already existed and override was false.
|
|
535
565
|
*/
|
|
536
566
|
register(provider, override = true) {
|
|
537
567
|
if (override || !this._providers.has(provider.loginMethodType)) {
|
|
@@ -562,6 +592,8 @@ class DbxFirebaseAuthLoginService {
|
|
|
562
592
|
// MARK: Enable/Disable
|
|
563
593
|
/**
|
|
564
594
|
* Enables all providers and any providers that will be registered.
|
|
595
|
+
*
|
|
596
|
+
* @param enableAll - Whether to enable all providers. Defaults to true.
|
|
565
597
|
*/
|
|
566
598
|
setEnableAll(enableAll = true) {
|
|
567
599
|
this._enableAll = enableAll;
|
|
@@ -582,10 +614,10 @@ class DbxFirebaseAuthLoginService {
|
|
|
582
614
|
}
|
|
583
615
|
// MARK: Get
|
|
584
616
|
getRegisteredTypes() {
|
|
585
|
-
return
|
|
617
|
+
return [...this._providers.keys()];
|
|
586
618
|
}
|
|
587
619
|
getEnabledTypes() {
|
|
588
|
-
return this._enableAll ? this.getRegisteredTypes() :
|
|
620
|
+
return this._enableAll ? this.getRegisteredTypes() : [...this._enabled];
|
|
589
621
|
}
|
|
590
622
|
getLoginProvider(type) {
|
|
591
623
|
return this._providers.get(type);
|
|
@@ -615,9 +647,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
615
647
|
type: Injectable
|
|
616
648
|
}], ctorParameters: () => [] });
|
|
617
649
|
|
|
618
|
-
/**
|
|
650
|
+
/**
|
|
651
|
+
* Category for built-in login methods (email, phone, anonymous).
|
|
652
|
+
*/
|
|
619
653
|
const DEFAULT_FIREBASE_LOGIN_METHOD_CATEGORY = 'default';
|
|
620
|
-
/**
|
|
654
|
+
/**
|
|
655
|
+
* Category for OAuth-based login methods (Google, Facebook, etc.).
|
|
656
|
+
*/
|
|
621
657
|
const OAUTH_FIREBASE_LOGIN_METHOD_CATEGORY = 'oauth';
|
|
622
658
|
|
|
623
659
|
/**
|
|
@@ -661,7 +697,7 @@ class DbxFirebaseLoginButtonComponent {
|
|
|
661
697
|
<div class="dbx-firebase-login-button-content">
|
|
662
698
|
<span class="dbx-firebase-login-button-icon dbx-icon-spacer">
|
|
663
699
|
@if (iconUrlSignal()) {
|
|
664
|
-
<img [src]="iconUrlSignal()" />
|
|
700
|
+
<img [src]="iconUrlSignal()" alt="" />
|
|
665
701
|
}
|
|
666
702
|
@if (iconSignal()) {
|
|
667
703
|
<mat-icon>{{ iconSignal() }}</mat-icon>
|
|
@@ -683,7 +719,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
683
719
|
<div class="dbx-firebase-login-button-content">
|
|
684
720
|
<span class="dbx-firebase-login-button-icon dbx-icon-spacer">
|
|
685
721
|
@if (iconUrlSignal()) {
|
|
686
|
-
<img [src]="iconUrlSignal()" />
|
|
722
|
+
<img [src]="iconUrlSignal()" alt="" />
|
|
687
723
|
}
|
|
688
724
|
@if (iconSignal()) {
|
|
689
725
|
<mat-icon>{{ iconSignal() }}</mat-icon>
|
|
@@ -702,7 +738,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
702
738
|
changeDetection: ChangeDetectionStrategy.OnPush
|
|
703
739
|
}]
|
|
704
740
|
}], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }, { type: i0.Output, args: ["configChange"] }] } });
|
|
705
|
-
/**
|
|
741
|
+
/**
|
|
742
|
+
* Container component that wraps login button content with consistent spacing.
|
|
743
|
+
*/
|
|
706
744
|
class DbxFirebaseLoginButtonContainerComponent {
|
|
707
745
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: DbxFirebaseLoginButtonContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
708
746
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.0", type: DbxFirebaseLoginButtonContainerComponent, isStandalone: true, selector: "dbx-firebase-login-button-container", ngImport: i0, template: `
|
|
@@ -723,13 +761,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
723
761
|
standalone: true
|
|
724
762
|
}]
|
|
725
763
|
}] });
|
|
726
|
-
/**
|
|
764
|
+
/**
|
|
765
|
+
* Default template for configured login button components.
|
|
766
|
+
*/
|
|
727
767
|
const DEFAULT_CONFIGURED_DBX_FIREBASE_LOGIN_BUTTON_TEMPLATE = `
|
|
728
768
|
<dbx-firebase-login-button-container>
|
|
729
769
|
<dbx-firebase-login-button [config]="configSignal()"></dbx-firebase-login-button>
|
|
730
770
|
</dbx-firebase-login-button-container>
|
|
731
771
|
`;
|
|
732
|
-
/**
|
|
772
|
+
/**
|
|
773
|
+
* Shared component configuration for OAuth-style login button components.
|
|
774
|
+
*/
|
|
733
775
|
const DBX_CONFIGURED_DBX_FIREBASE_LOGIN_BUTTON_COMPONENT_CONFIGURATION = {
|
|
734
776
|
template: DEFAULT_CONFIGURED_DBX_FIREBASE_LOGIN_BUTTON_TEMPLATE,
|
|
735
777
|
imports: [DbxFirebaseLoginButtonComponent, DbxFirebaseLoginButtonContainerComponent],
|
|
@@ -773,7 +815,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
773
815
|
type: Directive
|
|
774
816
|
}] });
|
|
775
817
|
|
|
776
|
-
/**
|
|
818
|
+
/**
|
|
819
|
+
* Login button component for anonymous (guest) authentication.
|
|
820
|
+
*/
|
|
777
821
|
class DbxFirebaseLoginAnonymousComponent extends AbstractConfiguredDbxFirebaseLoginButtonDirective {
|
|
778
822
|
loginProvider = 'anonymous';
|
|
779
823
|
handleLogin() {
|
|
@@ -793,7 +837,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
793
837
|
}]
|
|
794
838
|
}] });
|
|
795
839
|
|
|
796
|
-
/**
|
|
840
|
+
/**
|
|
841
|
+
* Formly-based form component for password recovery, containing a single email field.
|
|
842
|
+
*/
|
|
797
843
|
class DbxFirebaseEmailRecoveryFormComponent extends AbstractSyncFormlyFormDirective {
|
|
798
844
|
fields = [emailField({ required: true })];
|
|
799
845
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: DbxFirebaseEmailRecoveryFormComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -910,7 +956,7 @@ class DbxFirebaseLoginEmailContentComponent {
|
|
|
910
956
|
context.startWorkingWithPromise(this.dbxFirebaseAuthService.sendPasswordResetEmail(value.email));
|
|
911
957
|
};
|
|
912
958
|
// MARK: Recovering
|
|
913
|
-
handleRecoverySuccess = (
|
|
959
|
+
handleRecoverySuccess = (_x) => {
|
|
914
960
|
this._emailModeSignal.set('recoversent');
|
|
915
961
|
};
|
|
916
962
|
clickedRecoveryAcknowledged() {
|
|
@@ -931,7 +977,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
931
977
|
args: [{ imports: [NgTemplateOutlet, DbxErrorComponent, DbxLinkComponent, DbxActionErrorDirective, DbxActionFormDirective, MatButtonModule, DbxActionModule, DbxButtonComponent, DbxButtonSpacerDirective, DbxFirebaseEmailFormComponent, DbxFirebaseEmailRecoveryFormComponent, DbxFormSourceDirective], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "<div class=\"dbx-firebase-login-email-content\">\n @switch (emailModeSignal()) {\n @case ('login') {\n <ng-container *ngTemplateOutlet=\"loginView\"></ng-container>\n }\n @case ('recover') {\n <ng-container *ngTemplateOutlet=\"resetPassword\"></ng-container>\n }\n @case ('recoversent') {\n <ng-container *ngTemplateOutlet=\"resetPasswordSent\"></ng-container>\n }\n }\n</div>\n\n<!-- Login View -->\n<ng-template #loginView>\n <ng-container dbxAction [dbxActionHandler]=\"handleLoginAction\">\n <dbx-firebase-email-form [config]=\"formConfig\" dbxActionForm [dbxFormSource]=\"emailFormValueSignal()\"></dbx-firebase-email-form>\n @if (isLoginMode) {\n <div class=\"dbx-firebase-login-email-forgot-prompt\">\n <dbx-link [anchor]=\"forgotAnchor\">Forgot Password?</dbx-link>\n </div>\n }\n <div class=\"dbx-flex\">\n <dbx-button class=\"dbx-button-wide\" [text]=\"buttonText\" [raised]=\"true\" color=\"primary\" dbxActionButton></dbx-button>\n <dbx-button-spacer></dbx-button-spacer>\n <span class=\"dbx-spacer\"></span>\n <button mat-flat-button (click)=\"onCancel()\">Cancel</button>\n </div>\n <dbx-error dbxActionError></dbx-error>\n </ng-container>\n</ng-template>\n\n<!-- Reset Password View -->\n<ng-template #resetPassword>\n <div class=\"dbx-firebase-login-email-content-recovery\" dbxAction [dbxActionHandler]=\"handleRecoveryAction\" [dbxActionSuccessHandler]=\"handleRecoverySuccess\">\n <dbx-firebase-email-recovery-form dbxActionForm [dbxFormSource]=\"recoveryFormValueSignal()\"></dbx-firebase-email-recovery-form>\n <p class=\"dbx-hint\">An email will be sent to the above address to help you reset your password.</p>\n <div class=\"dbx-flex\">\n <dbx-button class=\"dbx-button-wide\" text=\"Send Recovery Email\" [raised]=\"true\" color=\"primary\" dbxActionButton></dbx-button>\n <span class=\"dbx-spacer\"></span>\n <button mat-flat-button (click)=\"onCancelReset()\">Cancel Recovery</button>\n </div>\n <dbx-error dbxActionError></dbx-error>\n </div>\n</ng-template>\n\n<!-- Reset Password Sent -->\n<ng-template #resetPasswordSent>\n <div class=\"dbx-firebase-login-email-content-recovery-sent\">\n <p class=\"dbx-hint\">A recovery email was sent to the specified address. Please check your email for next steps.</p>\n <button mat-raised-button (click)=\"clickedRecoveryAcknowledged()\">Ok</button>\n </div>\n</ng-template>\n" }]
|
|
932
978
|
}] });
|
|
933
979
|
|
|
934
|
-
/**
|
|
980
|
+
/**
|
|
981
|
+
* Login button component for email/password authentication. Opens the email login context on click.
|
|
982
|
+
*/
|
|
935
983
|
class DbxFirebaseLoginEmailComponent extends AbstractConfiguredDbxFirebaseLoginButtonDirective {
|
|
936
984
|
loginProvider = 'email';
|
|
937
985
|
handleLogin() {
|
|
@@ -951,7 +999,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
951
999
|
}]
|
|
952
1000
|
}] });
|
|
953
1001
|
|
|
954
|
-
/**
|
|
1002
|
+
/**
|
|
1003
|
+
* Login button component for Facebook OAuth authentication.
|
|
1004
|
+
*/
|
|
955
1005
|
class DbxFirebaseLoginFacebookComponent extends AbstractConfiguredDbxFirebaseLoginButtonDirective {
|
|
956
1006
|
loginProvider = 'facebook';
|
|
957
1007
|
handleLogin() {
|
|
@@ -971,7 +1021,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
971
1021
|
}]
|
|
972
1022
|
}] });
|
|
973
1023
|
|
|
974
|
-
/**
|
|
1024
|
+
/**
|
|
1025
|
+
* Login button component for GitHub OAuth authentication.
|
|
1026
|
+
*/
|
|
975
1027
|
class DbxFirebaseLoginGitHubComponent extends AbstractConfiguredDbxFirebaseLoginButtonDirective {
|
|
976
1028
|
loginProvider = 'github';
|
|
977
1029
|
handleLogin() {
|
|
@@ -991,7 +1043,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
991
1043
|
}]
|
|
992
1044
|
}] });
|
|
993
1045
|
|
|
994
|
-
/**
|
|
1046
|
+
/**
|
|
1047
|
+
* Login button component for Google OAuth authentication.
|
|
1048
|
+
*/
|
|
995
1049
|
class DbxFirebaseLoginGoogleComponent extends AbstractConfiguredDbxFirebaseLoginButtonDirective {
|
|
996
1050
|
loginProvider = 'google';
|
|
997
1051
|
handleLogin() {
|
|
@@ -1011,7 +1065,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
1011
1065
|
}]
|
|
1012
1066
|
}] });
|
|
1013
1067
|
|
|
1014
|
-
/**
|
|
1068
|
+
/**
|
|
1069
|
+
* Login button component for Twitter OAuth authentication.
|
|
1070
|
+
*/
|
|
1015
1071
|
class DbxFirebaseLoginTwitterComponent extends AbstractConfiguredDbxFirebaseLoginButtonDirective {
|
|
1016
1072
|
loginProvider = 'twitter';
|
|
1017
1073
|
handleLogin() {
|
|
@@ -1031,7 +1087,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
1031
1087
|
}]
|
|
1032
1088
|
}] });
|
|
1033
1089
|
|
|
1034
|
-
/**
|
|
1090
|
+
/**
|
|
1091
|
+
* Registration button component for email/password. Opens the email login context in register mode.
|
|
1092
|
+
*/
|
|
1035
1093
|
class DbxFirebaseRegisterEmailComponent extends AbstractConfiguredDbxFirebaseLoginButtonDirective {
|
|
1036
1094
|
loginProvider = 'email';
|
|
1037
1095
|
handleLogin() {
|
|
@@ -1199,7 +1257,9 @@ function provideDbxFirebaseLogin(config) {
|
|
|
1199
1257
|
return makeEnvironmentProviders(providers);
|
|
1200
1258
|
}
|
|
1201
1259
|
|
|
1202
|
-
/**
|
|
1260
|
+
/**
|
|
1261
|
+
* Login button component for Apple OAuth authentication.
|
|
1262
|
+
*/
|
|
1203
1263
|
class DbxFirebaseLoginAppleComponent extends AbstractConfiguredDbxFirebaseLoginButtonDirective {
|
|
1204
1264
|
loginProvider = 'apple';
|
|
1205
1265
|
handleLogin() {
|
|
@@ -1234,8 +1294,7 @@ class DbxFirebaseLoginListComponent {
|
|
|
1234
1294
|
const providerTypes = this.providerTypes();
|
|
1235
1295
|
const omitProviderTypes = this.omitProviderTypes();
|
|
1236
1296
|
const baseTypes = providerTypes ? asArray(providerTypes) : this.dbxFirebaseAuthLoginService.getEnabledTypes();
|
|
1237
|
-
|
|
1238
|
-
return types;
|
|
1297
|
+
return omitProviderTypes ? excludeValuesFromArray(baseTypes, asArray(omitProviderTypes)) : baseTypes;
|
|
1239
1298
|
}, ...(ngDevMode ? [{ debugName: "providerTypesSignal" }] : []));
|
|
1240
1299
|
providersSignal = computed(() => {
|
|
1241
1300
|
const providerCategories = asArray(this.providerCategories());
|
|
@@ -1256,8 +1315,7 @@ class DbxFirebaseLoginListComponent {
|
|
|
1256
1315
|
else {
|
|
1257
1316
|
mapFn = (x) => ({ componentClass: x.componentClass, loginMethodType: x.loginMethodType });
|
|
1258
1317
|
}
|
|
1259
|
-
|
|
1260
|
-
return configs;
|
|
1318
|
+
return providers.map(mapFn);
|
|
1261
1319
|
}, ...(ngDevMode ? [{ debugName: "providersInjectionConfigsSignal" }] : []));
|
|
1262
1320
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: DbxFirebaseLoginListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1263
1321
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.0", type: DbxFirebaseLoginListComponent, isStandalone: true, selector: "dbx-firebase-login-list", inputs: { loginMode: { classPropertyName: "loginMode", publicName: "loginMode", isSignal: true, isRequired: false, transformFunction: null }, providerTypes: { classPropertyName: "providerTypes", publicName: "providerTypes", isSignal: true, isRequired: false, transformFunction: null }, omitProviderTypes: { classPropertyName: "omitProviderTypes", publicName: "omitProviderTypes", isSignal: true, isRequired: false, transformFunction: null }, providerCategories: { classPropertyName: "providerCategories", publicName: "providerCategories", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "dbx-firebase-login-list" }, ngImport: i0, template: `
|
|
@@ -1349,7 +1407,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
1349
1407
|
}]
|
|
1350
1408
|
}], propDecorators: { loginMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "loginMode", required: false }] }], providerTypes: [{ type: i0.Input, args: [{ isSignal: true, alias: "providerTypes", required: false }] }], omitProviderTypes: [{ type: i0.Input, args: [{ isSignal: true, alias: "omitProviderTypes", required: false }] }], providerCategories: [{ type: i0.Input, args: [{ isSignal: true, alias: "providerCategories", required: false }] }] } });
|
|
1351
1409
|
|
|
1352
|
-
/**
|
|
1410
|
+
/**
|
|
1411
|
+
* Navigation component that allows users to return to the login method selection list.
|
|
1412
|
+
*/
|
|
1353
1413
|
class DbxFirebaseLoginContextBackButtonComponent {
|
|
1354
1414
|
cancelLogin = output();
|
|
1355
1415
|
anchor = {
|
|
@@ -1372,7 +1432,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
1372
1432
|
}]
|
|
1373
1433
|
}], propDecorators: { cancelLogin: [{ type: i0.Output, args: ["cancelLogin"] }] } });
|
|
1374
1434
|
|
|
1375
|
-
/**
|
|
1435
|
+
/**
|
|
1436
|
+
* Login button component for Microsoft OAuth authentication.
|
|
1437
|
+
*/
|
|
1376
1438
|
class DbxFirebaseLoginMicrosoftComponent extends AbstractConfiguredDbxFirebaseLoginButtonDirective {
|
|
1377
1439
|
loginProvider = 'microsoft';
|
|
1378
1440
|
handleLogin() {
|
|
@@ -1392,7 +1454,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
1392
1454
|
}]
|
|
1393
1455
|
}] });
|
|
1394
1456
|
|
|
1395
|
-
/**
|
|
1457
|
+
/**
|
|
1458
|
+
* Renders the configured terms of service component via dynamic injection from the login service.
|
|
1459
|
+
*/
|
|
1396
1460
|
class DbxFirebaseLoginTermsComponent {
|
|
1397
1461
|
dbxFirebaseAuthLoginService = inject(DbxFirebaseAuthLoginService);
|
|
1398
1462
|
config = {
|
|
@@ -1442,6 +1506,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
1442
1506
|
}]
|
|
1443
1507
|
}], propDecorators: { providerTypes: [{ type: i0.Input, args: [{ isSignal: true, alias: "providerTypes", required: false }] }], omitProviderTypes: [{ type: i0.Input, args: [{ isSignal: true, alias: "omitProviderTypes", required: false }] }], providerCategories: [{ type: i0.Input, args: [{ isSignal: true, alias: "providerCategories", required: false }] }] } });
|
|
1444
1508
|
|
|
1509
|
+
/**
|
|
1510
|
+
* Creates a function that derives an {@link AuthRoleSet} observable from the current user's ID token claims using the configured claims service.
|
|
1511
|
+
*
|
|
1512
|
+
* Optionally adds the current AuthUserState to the role set.
|
|
1513
|
+
*
|
|
1514
|
+
* @param config - Configuration specifying the claims service and optional auth user state inclusion.
|
|
1515
|
+
* @returns A function that, given a DbxFirebaseAuthService, returns an Observable of the decoded AuthRoleSet.
|
|
1516
|
+
*/
|
|
1445
1517
|
function authRolesObsWithClaimsService(config) {
|
|
1446
1518
|
const { addAuthUserStateToRoles: addAuthUserState, claimsService } = config;
|
|
1447
1519
|
return (dbxFirebaseAuthService) => {
|
|
@@ -1452,6 +1524,14 @@ function authRolesObsWithClaimsService(config) {
|
|
|
1452
1524
|
return obs;
|
|
1453
1525
|
};
|
|
1454
1526
|
}
|
|
1527
|
+
/**
|
|
1528
|
+
* Creates a {@link DbxFirebaseAuthServiceDelegate} that derives auth roles and user state from the given claims service configuration.
|
|
1529
|
+
*
|
|
1530
|
+
* Only one of `stateForLoggedInUser`, `stateForLoggedInUserToken`, or `authUserStateObs` may be specified.
|
|
1531
|
+
*
|
|
1532
|
+
* @param config - Configuration with the claims service and optional auth state customization.
|
|
1533
|
+
* @returns A DbxFirebaseAuthServiceDelegate configured for claims-based auth.
|
|
1534
|
+
*/
|
|
1455
1535
|
function defaultDbxFirebaseAuthServiceDelegateWithClaimsService(config) {
|
|
1456
1536
|
if (filterMaybeArrayValues([config.stateForLoggedInUser, config.stateForLoggedInUserToken, config.authUserStateObs]).length > 1) {
|
|
1457
1537
|
throw new Error('Cannot specify a combination of "stateForLoggedInUserToken", "stateForLoggedInUser" and "authUserStateObs". Must specify one at max.');
|
|
@@ -1502,16 +1582,18 @@ const DEFAULT_FIREBASE_DEVELOPMENT_WIDGET_PROVIDERS_TOKEN = new InjectionToken('
|
|
|
1502
1582
|
class DbxFirebaseDevelopmentWidgetService {
|
|
1503
1583
|
dbxWidgetService = inject(DbxWidgetService);
|
|
1504
1584
|
_entries = new Map();
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1585
|
+
_defaultEntries = inject(DEFAULT_FIREBASE_DEVELOPMENT_WIDGET_PROVIDERS_TOKEN, { optional: true });
|
|
1586
|
+
constructor() {
|
|
1587
|
+
if (this._defaultEntries) {
|
|
1588
|
+
this._defaultEntries.forEach((x) => this.register(x, false));
|
|
1508
1589
|
}
|
|
1509
1590
|
}
|
|
1510
1591
|
/**
|
|
1511
1592
|
* Used to register a provider. If a provider is already registered, this will override it by default.
|
|
1512
1593
|
*
|
|
1513
|
-
* @param provider
|
|
1514
|
-
* @param override
|
|
1594
|
+
* @param provider - The development widget entry to register.
|
|
1595
|
+
* @param override - Whether to override an existing entry of the same type. Defaults to true.
|
|
1596
|
+
* @returns True if the entry was registered, false if it already existed and override was false.
|
|
1515
1597
|
*/
|
|
1516
1598
|
register(provider, override = true) {
|
|
1517
1599
|
const type = provider.widget.type;
|
|
@@ -1525,22 +1607,17 @@ class DbxFirebaseDevelopmentWidgetService {
|
|
|
1525
1607
|
}
|
|
1526
1608
|
}
|
|
1527
1609
|
getEntryWidgetIdentifiers() {
|
|
1528
|
-
return
|
|
1610
|
+
return [...this._entries.keys()];
|
|
1529
1611
|
}
|
|
1530
1612
|
getEntries() {
|
|
1531
1613
|
return iterableToArray(this._entries.values());
|
|
1532
1614
|
}
|
|
1533
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: DbxFirebaseDevelopmentWidgetService, deps: [
|
|
1615
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: DbxFirebaseDevelopmentWidgetService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1534
1616
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: DbxFirebaseDevelopmentWidgetService });
|
|
1535
1617
|
}
|
|
1536
1618
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: DbxFirebaseDevelopmentWidgetService, decorators: [{
|
|
1537
1619
|
type: Injectable
|
|
1538
|
-
}], ctorParameters: () => [
|
|
1539
|
-
type: Optional
|
|
1540
|
-
}, {
|
|
1541
|
-
type: Inject,
|
|
1542
|
-
args: [DEFAULT_FIREBASE_DEVELOPMENT_WIDGET_PROVIDERS_TOKEN]
|
|
1543
|
-
}] }] });
|
|
1620
|
+
}], ctorParameters: () => [] });
|
|
1544
1621
|
|
|
1545
1622
|
/**
|
|
1546
1623
|
* Whether or not the scheduler should be enabled.
|
|
@@ -1719,6 +1796,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
1719
1796
|
}] });
|
|
1720
1797
|
|
|
1721
1798
|
const DEVELOPMENT_FIREBASE_SERVER_SCHEDULER_WIDGET_KEY = 'DEVELOPMENT_FIREBASE_SERVER_SCHEDULER_WIDGET';
|
|
1799
|
+
/**
|
|
1800
|
+
* Creates a development widget entry for the Firebase server scheduler, allowing scheduled tasks to be triggered from the development UI.
|
|
1801
|
+
*
|
|
1802
|
+
* @returns A DbxFirebaseDevelopmentWidgetEntry for the scheduler widget.
|
|
1803
|
+
*/
|
|
1722
1804
|
function developmentFirebaseServerSchedulerWidgetEntry() {
|
|
1723
1805
|
return {
|
|
1724
1806
|
label: 'Run Scheduled Task',
|
|
@@ -1804,7 +1886,7 @@ class DbxFirebaseDevelopmentPopupContentComponent {
|
|
|
1804
1886
|
entries = this.dbxFirebaseDevelopmentWidgetService.getEntries();
|
|
1805
1887
|
_activeEntrySelector = completeOnDestroy(new BehaviorSubject(DEVELOPMENT_FIREBASE_SERVER_SCHEDULER_WIDGET_KEY));
|
|
1806
1888
|
isLoggedIn$ = this.dbxAuthService.isLoggedIn$;
|
|
1807
|
-
entries$ = this.isLoggedIn$.pipe(distinctUntilChanged(), map((
|
|
1889
|
+
entries$ = this.isLoggedIn$.pipe(distinctUntilChanged(), map((_isLoggedIn) => this.entries), shareReplay(1));
|
|
1808
1890
|
formConfig$ = this.entries$.pipe(map((entries) => ({ entries })));
|
|
1809
1891
|
activeEntrySelector$ = this._activeEntrySelector.pipe(distinctUntilChanged());
|
|
1810
1892
|
currentActiveEntry$ = combineLatest([this.entries$, this.activeEntrySelector$]).pipe(map(([entries, selector]) => (selector ? entries.find((e) => e.widget.type === selector) : undefined)), shareReplay(1));
|
|
@@ -1981,7 +2063,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
1981
2063
|
args: ['window:keydown', ['$event']]
|
|
1982
2064
|
}] } });
|
|
1983
2065
|
|
|
1984
|
-
const importsAndExports$
|
|
2066
|
+
const importsAndExports$1 = [
|
|
1985
2067
|
//
|
|
1986
2068
|
DbxFirebaseDevelopmentPopupContentFormComponent,
|
|
1987
2069
|
DbxFirebaseDevelopmentDirective,
|
|
@@ -2029,8 +2111,8 @@ class DbxFirebaseDevelopmentModule {
|
|
|
2029
2111
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: DbxFirebaseDevelopmentModule, decorators: [{
|
|
2030
2112
|
type: NgModule,
|
|
2031
2113
|
args: [{
|
|
2032
|
-
imports: importsAndExports$
|
|
2033
|
-
exports: importsAndExports$
|
|
2114
|
+
imports: importsAndExports$1,
|
|
2115
|
+
exports: importsAndExports$1
|
|
2034
2116
|
}]
|
|
2035
2117
|
}] });
|
|
2036
2118
|
|
|
@@ -2386,6 +2468,13 @@ function provideDbxFirebaseFunctions(config) {
|
|
|
2386
2468
|
return makeEnvironmentProviders(providers);
|
|
2387
2469
|
}
|
|
2388
2470
|
|
|
2471
|
+
/**
|
|
2472
|
+
* Creates a {@link DbxFirebaseCollectionChangeWatcherInstance} that monitors a store's query for document changes and can trigger actions based on those changes.
|
|
2473
|
+
*
|
|
2474
|
+
* @param store - The collection loader accessor to watch for changes.
|
|
2475
|
+
* @param initialMode - The initial trigger mode ('auto' or 'off'). Defaults to 'off'.
|
|
2476
|
+
* @returns A new change watcher instance with observable change state and configurable trigger mode.
|
|
2477
|
+
*/
|
|
2389
2478
|
function dbxFirebaseCollectionChangeWatcher(store, initialMode) {
|
|
2390
2479
|
const _mode = new BehaviorSubject(initialMode ?? 'off');
|
|
2391
2480
|
const _sub = new SubscriptionObject();
|
|
@@ -2485,6 +2574,13 @@ function dbxFirebaseCollectionChangeTriggerForStore(store, triggerFunction) {
|
|
|
2485
2574
|
})
|
|
2486
2575
|
});
|
|
2487
2576
|
}
|
|
2577
|
+
/**
|
|
2578
|
+
* Creates a {@link DbxFirebaseCollectionChangeTriggerInstance} for an existing watcher without taking ownership of its lifecycle.
|
|
2579
|
+
*
|
|
2580
|
+
* @param watcher - The collection change watcher to attach the trigger to.
|
|
2581
|
+
* @param triggerFunction - Optional custom trigger function. Defaults to restarting the store.
|
|
2582
|
+
* @returns A new trigger instance bound to the given watcher.
|
|
2583
|
+
*/
|
|
2488
2584
|
function dbxFirebaseCollectionChangeTriggerForWatcher(watcher, triggerFunction) {
|
|
2489
2585
|
return dbxFirebaseCollectionChangeTrigger({
|
|
2490
2586
|
watcher,
|
|
@@ -2492,6 +2588,12 @@ function dbxFirebaseCollectionChangeTriggerForWatcher(watcher, triggerFunction)
|
|
|
2492
2588
|
triggerFunction
|
|
2493
2589
|
});
|
|
2494
2590
|
}
|
|
2591
|
+
/**
|
|
2592
|
+
* Creates a new {@link DbxFirebaseCollectionChangeTriggerInstance} from the provided configuration.
|
|
2593
|
+
*
|
|
2594
|
+
* @param config - Configuration specifying the watcher, lifecycle options, and trigger function.
|
|
2595
|
+
* @returns A new trigger instance ready to be initialized.
|
|
2596
|
+
*/
|
|
2495
2597
|
function dbxFirebaseCollectionChangeTrigger(config) {
|
|
2496
2598
|
return new DbxFirebaseCollectionChangeTriggerInstance(config);
|
|
2497
2599
|
}
|
|
@@ -2712,9 +2814,21 @@ class DbxFirebaseCollectionLoaderInstance {
|
|
|
2712
2814
|
return this.accumulator$.pipe(switchMap((accumulator) => iteratorNextPageUntilMaxPageLoadLimit(accumulator.itemIteration)));
|
|
2713
2815
|
}
|
|
2714
2816
|
}
|
|
2817
|
+
/**
|
|
2818
|
+
* Creates a new {@link DbxFirebaseCollectionLoaderInstance} from the given configuration.
|
|
2819
|
+
*
|
|
2820
|
+
* @param config - Initial configuration including collection, constraints, pagination, and mode settings.
|
|
2821
|
+
* @returns A new collection loader instance.
|
|
2822
|
+
*/
|
|
2715
2823
|
function dbxFirebaseCollectionLoaderInstance(config) {
|
|
2716
2824
|
return new DbxFirebaseCollectionLoaderInstance(config);
|
|
2717
2825
|
}
|
|
2826
|
+
/**
|
|
2827
|
+
* Convenience function that creates a {@link DbxFirebaseCollectionLoaderInstance} initialized with the given Firestore collection.
|
|
2828
|
+
*
|
|
2829
|
+
* @param collection - The Firestore collection to load from.
|
|
2830
|
+
* @returns A new collection loader instance using the specified collection.
|
|
2831
|
+
*/
|
|
2718
2832
|
function dbxFirebaseCollectionLoaderInstanceWithCollection(collection) {
|
|
2719
2833
|
return new DbxFirebaseCollectionLoaderInstance({ collection });
|
|
2720
2834
|
}
|
|
@@ -2764,9 +2878,21 @@ class DbxLimitedFirebaseDocumentLoaderInstance {
|
|
|
2764
2878
|
this._sub.subscription = useAsObservable(docs, (x) => this._documents.next(asArray(x)));
|
|
2765
2879
|
}
|
|
2766
2880
|
}
|
|
2881
|
+
/**
|
|
2882
|
+
* Creates a new {@link DbxLimitedFirebaseDocumentLoaderInstance} from the given configuration.
|
|
2883
|
+
*
|
|
2884
|
+
* @param config - Configuration providing the limited document accessor.
|
|
2885
|
+
* @returns A new limited document loader instance.
|
|
2886
|
+
*/
|
|
2767
2887
|
function dbxLimitedFirebaseDocumentLoaderInstance(config) {
|
|
2768
2888
|
return new DbxLimitedFirebaseDocumentLoaderInstance(config);
|
|
2769
2889
|
}
|
|
2890
|
+
/**
|
|
2891
|
+
* Convenience function that creates a {@link DbxLimitedFirebaseDocumentLoaderInstance} initialized with the given accessor.
|
|
2892
|
+
*
|
|
2893
|
+
* @param accessor - The limited Firestore document accessor to use.
|
|
2894
|
+
* @returns A new limited document loader instance.
|
|
2895
|
+
*/
|
|
2770
2896
|
function dbxLimitedFirebaseDocumentLoaderInstanceWithAccessor(accessor) {
|
|
2771
2897
|
return new DbxLimitedFirebaseDocumentLoaderInstance({ accessor });
|
|
2772
2898
|
}
|
|
@@ -2776,13 +2902,31 @@ class DbxFirebaseDocumentLoaderInstance extends DbxLimitedFirebaseDocumentLoader
|
|
|
2776
2902
|
this.setDocuments(asObservable(ids).pipe(map((x) => loadDocumentsForIds(this.accessor, asArray(x)))));
|
|
2777
2903
|
}
|
|
2778
2904
|
}
|
|
2905
|
+
/**
|
|
2906
|
+
* Creates a new {@link DbxFirebaseDocumentLoaderInstance} from the given configuration.
|
|
2907
|
+
*
|
|
2908
|
+
* @param config - Configuration providing the full document accessor.
|
|
2909
|
+
* @returns A new document loader instance with full accessor capabilities.
|
|
2910
|
+
*/
|
|
2779
2911
|
function dbxFirebaseDocumentLoaderInstance(config) {
|
|
2780
2912
|
return new DbxFirebaseDocumentLoaderInstance(config);
|
|
2781
2913
|
}
|
|
2914
|
+
/**
|
|
2915
|
+
* Convenience function that creates a {@link DbxFirebaseDocumentLoaderInstance} initialized with the given accessor.
|
|
2916
|
+
*
|
|
2917
|
+
* @param accessor - The full Firestore document accessor to use.
|
|
2918
|
+
* @returns A new document loader instance.
|
|
2919
|
+
*/
|
|
2782
2920
|
function dbxFirebaseDocumentLoaderInstanceWithAccessor(accessor) {
|
|
2783
2921
|
return new DbxFirebaseDocumentLoaderInstance({ accessor });
|
|
2784
2922
|
}
|
|
2785
2923
|
|
|
2924
|
+
/**
|
|
2925
|
+
* Factory function that creates typed model service instance accessors from an observable context.
|
|
2926
|
+
*
|
|
2927
|
+
* @param context$ - Observable of the in-context Firebase models service.
|
|
2928
|
+
* @returns A factory function for creating model service instances by type and key.
|
|
2929
|
+
*/
|
|
2786
2930
|
function dbxFirebaseInContextFirebaseModelServiceInstanceFactory(context$) {
|
|
2787
2931
|
return (type, keyObs) => {
|
|
2788
2932
|
const key$ = asObservable(keyObs);
|
|
@@ -2794,6 +2938,9 @@ function dbxFirebaseInContextFirebaseModelServiceInstanceFactory(context$) {
|
|
|
2794
2938
|
* Creates a new DbxFirebaseInContextFirebaseModelServiceInstance.
|
|
2795
2939
|
*
|
|
2796
2940
|
* Wraps an InModelContextFirebaseModelService observable and provides different piped observables.
|
|
2941
|
+
*
|
|
2942
|
+
* @param modelService$ - Observable of the in-model-context Firebase model service to wrap.
|
|
2943
|
+
* @returns A DbxFirebaseInContextFirebaseModelServiceInstance with derived observables for model data, roles, and permissions.
|
|
2797
2944
|
*/
|
|
2798
2945
|
function dbxFirebaseInContextFirebaseModelServiceInstance(modelService$) {
|
|
2799
2946
|
const key$ = modelService$.pipe(map((x) => x.model.key));
|
|
@@ -2804,7 +2951,7 @@ function dbxFirebaseInContextFirebaseModelServiceInstance(modelService$) {
|
|
|
2804
2951
|
function snapshotStream(mode) {
|
|
2805
2952
|
return model$.pipe(switchMap((x) => x.snapshotStream(mode)), shareReplay(1));
|
|
2806
2953
|
}
|
|
2807
|
-
function snapshotDataStream(mode,
|
|
2954
|
+
function snapshotDataStream(mode, _options) {
|
|
2808
2955
|
return model$.pipe(switchMap((x) => x.snapshotDataStream(mode)), shareReplay(1));
|
|
2809
2956
|
}
|
|
2810
2957
|
// MARK: Roles
|
|
@@ -2859,6 +3006,12 @@ function dbxFirebaseInContextFirebaseModelServiceInstance(modelService$) {
|
|
|
2859
3006
|
*/
|
|
2860
3007
|
class DbxFirebaseModelContextService {
|
|
2861
3008
|
}
|
|
3009
|
+
/**
|
|
3010
|
+
* Creates a factory that resolves model info instances by looking up the collection type from a model key and delegating to the model service.
|
|
3011
|
+
*
|
|
3012
|
+
* @param config - Configuration providing the model service factory and entity map observable.
|
|
3013
|
+
* @returns A factory function that creates model info instances from observable model keys.
|
|
3014
|
+
*/
|
|
2862
3015
|
function dbxFirebaseModelContextServiceInfoInstanceFactory(config) {
|
|
2863
3016
|
const { modelService, entityMap$ } = config;
|
|
2864
3017
|
return (keyObs) => {
|
|
@@ -2932,9 +3085,10 @@ class DbxFirebaseModelTypesServiceConfig {
|
|
|
2932
3085
|
class DbxFirebaseModelTypesService {
|
|
2933
3086
|
dbxFirebaseModelContextService = inject(DbxFirebaseModelContextService);
|
|
2934
3087
|
dbxModelTypesService = inject((DbxModelTypesService));
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
3088
|
+
_initialConfig = inject(DbxFirebaseModelTypesServiceConfig);
|
|
3089
|
+
constructor() {
|
|
3090
|
+
if (this._initialConfig.entries) {
|
|
3091
|
+
this.register(this._initialConfig.entries);
|
|
2938
3092
|
}
|
|
2939
3093
|
}
|
|
2940
3094
|
getDisplayInfo(typeInfo, data) {
|
|
@@ -2979,21 +3133,31 @@ class DbxFirebaseModelTypesService {
|
|
|
2979
3133
|
instancePairsForKeys(keys) {
|
|
2980
3134
|
return dbxFirebaseModelTypesServiceInstancePairForKeysFactory(this)(keys);
|
|
2981
3135
|
}
|
|
2982
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: DbxFirebaseModelTypesService, deps: [
|
|
3136
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: DbxFirebaseModelTypesService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2983
3137
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: DbxFirebaseModelTypesService });
|
|
2984
3138
|
}
|
|
2985
3139
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: DbxFirebaseModelTypesService, decorators: [{
|
|
2986
3140
|
type: Injectable
|
|
2987
|
-
}], ctorParameters: () => [
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
3141
|
+
}], ctorParameters: () => [] });
|
|
3142
|
+
/**
|
|
3143
|
+
* Creates a factory function that produces an observable of instance pairs for the given model keys.
|
|
3144
|
+
*
|
|
3145
|
+
* @param service - The model types service used to resolve type info and instances.
|
|
3146
|
+
* @returns A factory that accepts model keys and returns an Observable of instance pairs with display info and segue refs.
|
|
3147
|
+
*/
|
|
2991
3148
|
function dbxFirebaseModelTypesServiceInstancePairForKeysFactory(service) {
|
|
2992
3149
|
return (keys) => {
|
|
2993
3150
|
const instances = asArray(keys).map((x) => service.instanceForKey(x).safeInstancePair$);
|
|
2994
3151
|
return instances.length ? combineLatest(instances).pipe(filterMaybeArray(), shareReplay(1)) : of([]);
|
|
2995
3152
|
};
|
|
2996
3153
|
}
|
|
3154
|
+
/**
|
|
3155
|
+
* Creates a {@link DbxFirebaseModelTypesServiceInstance} that provides observables for type info, display info, segue refs, and instance pairs for a single model.
|
|
3156
|
+
*
|
|
3157
|
+
* @param modelInfoInstance$ - Observable of the model info service instance providing data and role access.
|
|
3158
|
+
* @param dbxFirebaseModelTypesService - The model types service for resolving type configurations and display info.
|
|
3159
|
+
* @returns A DbxFirebaseModelTypesServiceInstance with derived observables.
|
|
3160
|
+
*/
|
|
2997
3161
|
function dbxFirebaseModelTypesServiceInstance(modelInfoInstance$, dbxFirebaseModelTypesService) {
|
|
2998
3162
|
const key$ = modelInfoInstance$.pipe(switchMap((x) => x.key$));
|
|
2999
3163
|
const modelType$ = modelInfoInstance$.pipe(switchMap((x) => x.modelType$));
|
|
@@ -3329,7 +3493,7 @@ class DbxFirebaseModelEntitiesWidgetService {
|
|
|
3329
3493
|
}
|
|
3330
3494
|
// MARK: Get
|
|
3331
3495
|
getAllRegisteredWidgetIdentities() {
|
|
3332
|
-
return
|
|
3496
|
+
return [...this._entries.keys()];
|
|
3333
3497
|
}
|
|
3334
3498
|
getWidgetEntry(identity) {
|
|
3335
3499
|
const entry = this._entries.get(identity);
|
|
@@ -3590,7 +3754,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
3590
3754
|
}], propDecorators: { multi: [{ type: i0.Input, args: [{ isSignal: true, alias: "multi", required: false }] }], onlyShowRegisteredTypes: [{ type: i0.Input, args: [{ isSignal: true, alias: "onlyShowRegisteredTypes", required: false }] }], entities: [{ type: i0.Input, args: [{ isSignal: true, alias: "entities", required: false }] }] } });
|
|
3591
3755
|
|
|
3592
3756
|
const DEFAULT_DBX_FIREBASE_MODEL_ENTITIES_COMPONENT_POPOVER_KEY = 'entities';
|
|
3593
|
-
/**
|
|
3757
|
+
/**
|
|
3758
|
+
* Popover component that displays model entities in a scrollable panel with configurable header and empty text.
|
|
3759
|
+
*/
|
|
3594
3760
|
class DbxFirebaseModelEntitiesPopoverComponent extends AbstractPopoverDirective {
|
|
3595
3761
|
entities$ = this.popover.data?.entities$;
|
|
3596
3762
|
static openPopover(popupService, config, popoverKey) {
|
|
@@ -3628,7 +3794,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
3628
3794
|
args: [{ imports: [DbxPopoverContentComponent, DbxPopoverHeaderComponent, DbxPopoverScrollContentDirective, DbxFirebaseModelEntitiesComponent], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "<dbx-popover-content>\n <!-- Header -->\n <dbx-popover-header [icon]=\"icon\" [header]=\"header\"></dbx-popover-header>\n <!-- Content -->\n <dbx-popover-scroll-content>\n <dbx-firebase-model-entities [entities]=\"entities$\" [onlyShowRegisteredTypes]=\"onlyShowRegisteredTypes\">\n <p empty>{{ emptyText }}</p>\n </dbx-firebase-model-entities>\n </dbx-popover-scroll-content>\n</dbx-popover-content>\n" }]
|
|
3629
3795
|
}] });
|
|
3630
3796
|
|
|
3631
|
-
/**
|
|
3797
|
+
/**
|
|
3798
|
+
* Button component that opens an entities popover showing model entities from the injected source.
|
|
3799
|
+
*/
|
|
3632
3800
|
class DbxFirebaseModelEntitiesPopoverButtonComponent extends AbstractPopoverRefDirective {
|
|
3633
3801
|
_dbxPopoverService = inject(DbxPopoverService);
|
|
3634
3802
|
entitiesSource = inject(DbxFirebaseModelEntitiesSource);
|
|
@@ -3708,7 +3876,7 @@ class DbxFirebaseDocumentStoreContextStore extends ComponentStore {
|
|
|
3708
3876
|
lastStoresChangeAt$ = this.select((state) => state.lastStoresChangeAt).pipe(distinctUntilChanged(isSameDate), shareReplay(1));
|
|
3709
3877
|
entriesGroupedByIdentity$ = this.stores$.pipe(switchMap((stores) => {
|
|
3710
3878
|
let entriesObs;
|
|
3711
|
-
const allEntries =
|
|
3879
|
+
const allEntries = [...stores.values()];
|
|
3712
3880
|
const { included: hasIdentity, excluded: noIdentity } = separateValues(allEntries, (x) => x.modelIdentity != null);
|
|
3713
3881
|
if (noIdentity.length > 0) {
|
|
3714
3882
|
entriesObs = combineLatest(noIdentity.map((entryWithoutCachedIdentity) => entryWithoutCachedIdentity.store.modelIdentity$.pipe(first(), map((z) => {
|
|
@@ -3774,6 +3942,9 @@ function removeStore(state, store) {
|
|
|
3774
3942
|
/**
|
|
3775
3943
|
* Factory that creates a {@link DbxFirebaseModelEntitiesSource} from a {@link DbxFirebaseDocumentStoreContextStore},
|
|
3776
3944
|
* mapping its entries into model entities grouped by identity.
|
|
3945
|
+
*
|
|
3946
|
+
* @param storeContextStore - The document store context store providing entries grouped by identity.
|
|
3947
|
+
* @returns A DbxFirebaseModelEntitiesSource backed by the given store context.
|
|
3777
3948
|
*/
|
|
3778
3949
|
const dbxFirebaseDocumentStoreContextModelEntitiesSourceFactory = (storeContextStore) => {
|
|
3779
3950
|
const entities$ = storeContextStore.entriesGroupedByIdentity$.pipe(map((entries) => entries.map((entry) => ({ store: entry.store, modelIdentity: entry.modelIdentity }))));
|
|
@@ -3782,7 +3953,9 @@ const dbxFirebaseDocumentStoreContextModelEntitiesSourceFactory = (storeContextS
|
|
|
3782
3953
|
};
|
|
3783
3954
|
return source;
|
|
3784
3955
|
};
|
|
3785
|
-
/**
|
|
3956
|
+
/**
|
|
3957
|
+
* Directive that provides a {@link DbxFirebaseModelEntitiesSource} from the current document store context.
|
|
3958
|
+
*/
|
|
3786
3959
|
class DbxFirebaseDocumentStoreContextModelEntitiesSourceDirective {
|
|
3787
3960
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: DbxFirebaseDocumentStoreContextModelEntitiesSourceDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3788
3961
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.0", type: DbxFirebaseDocumentStoreContextModelEntitiesSourceDirective, isStandalone: true, selector: "[dbxFirebaseDocumentStoreContextModelEntitiesSource]", providers: [
|
|
@@ -3925,6 +4098,7 @@ class DbxFirebaseDocumentStoreDirective {
|
|
|
3925
4098
|
modelIdentity$ = this.store$.pipe(switchMap((x) => x.modelIdentity$));
|
|
3926
4099
|
data$ = this.store$.pipe(switchMap((x) => x.data$));
|
|
3927
4100
|
loadingState$ = this.store$.pipe(switchMap((x) => x.dataLoadingState$));
|
|
4101
|
+
// eslint-disable-next-line @angular-eslint/prefer-inject -- abstract class receives store from subclass constructors
|
|
3928
4102
|
constructor(store) {
|
|
3929
4103
|
this.replaceStore(store);
|
|
3930
4104
|
// sync inputs to store any time the store changes
|
|
@@ -3963,6 +4137,8 @@ class DbxFirebaseDocumentStoreDirective {
|
|
|
3963
4137
|
}
|
|
3964
4138
|
/**
|
|
3965
4139
|
* Replaces the internal store.
|
|
4140
|
+
*
|
|
4141
|
+
* @param store - The new document store to use.
|
|
3966
4142
|
*/
|
|
3967
4143
|
replaceStore(store) {
|
|
3968
4144
|
this._store.next(store);
|
|
@@ -4055,6 +4231,7 @@ class DbxFirebaseCollectionStoreDirective {
|
|
|
4055
4231
|
_store = completeOnDestroy(new BehaviorSubject(undefined));
|
|
4056
4232
|
store$ = this._store.pipe(filterMaybe(), shareReplay(1));
|
|
4057
4233
|
pageLoadingState$ = this.store$.pipe(switchMap((x) => x.pageLoadingState$));
|
|
4234
|
+
// eslint-disable-next-line @angular-eslint/prefer-inject -- abstract class receives store from subclass constructors
|
|
4058
4235
|
constructor(store) {
|
|
4059
4236
|
this.replaceStore(store);
|
|
4060
4237
|
// sync inputs to store any time the store changes
|
|
@@ -4073,6 +4250,8 @@ class DbxFirebaseCollectionStoreDirective {
|
|
|
4073
4250
|
}
|
|
4074
4251
|
/**
|
|
4075
4252
|
* Replaces the internal store.
|
|
4253
|
+
*
|
|
4254
|
+
* @param store - The new collection store to use.
|
|
4076
4255
|
*/
|
|
4077
4256
|
replaceStore(store) {
|
|
4078
4257
|
this._store.next(store);
|
|
@@ -4224,6 +4403,9 @@ class DbxFirebaseDocumentStoreTwoWayKeyProvider {
|
|
|
4224
4403
|
}
|
|
4225
4404
|
/**
|
|
4226
4405
|
* Configures Providers for a DbxFirebaseDocumentStoreTwoWayKeyProvider.
|
|
4406
|
+
*
|
|
4407
|
+
* @param sourceType - The type to register as the DbxFirebaseDocumentStoreTwoWayKeyProvider.
|
|
4408
|
+
* @returns Array of Angular providers for the two-way key provider.
|
|
4227
4409
|
*/
|
|
4228
4410
|
function provideDbxFirebaseDocumentStoreTwoWayKeyProvider(sourceType) {
|
|
4229
4411
|
const providers = [
|
|
@@ -4273,7 +4455,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
4273
4455
|
}]
|
|
4274
4456
|
}], ctorParameters: () => [] });
|
|
4275
4457
|
|
|
4276
|
-
const importsAndExports
|
|
4458
|
+
const importsAndExports = [DbxFirebaseCollectionListDirective, DbxFirebaseCollectionChangeDirective, DbxFirebaseCollectionHasChangeDirective, DbxFirebaseDocumentStoreTwoWayModelKeySourceDirective, DbxFirebaseDocumentStoreIdFromTwoWayModelKeyDirective];
|
|
4277
4459
|
class DbxFirebaseModelStoreModule {
|
|
4278
4460
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: DbxFirebaseModelStoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4279
4461
|
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.0", ngImport: i0, type: DbxFirebaseModelStoreModule, imports: [DbxFirebaseCollectionListDirective, DbxFirebaseCollectionChangeDirective, DbxFirebaseCollectionHasChangeDirective, DbxFirebaseDocumentStoreTwoWayModelKeySourceDirective, DbxFirebaseDocumentStoreIdFromTwoWayModelKeyDirective], exports: [DbxFirebaseCollectionListDirective, DbxFirebaseCollectionChangeDirective, DbxFirebaseCollectionHasChangeDirective, DbxFirebaseDocumentStoreTwoWayModelKeySourceDirective, DbxFirebaseDocumentStoreIdFromTwoWayModelKeyDirective] });
|
|
@@ -4282,8 +4464,8 @@ class DbxFirebaseModelStoreModule {
|
|
|
4282
4464
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: DbxFirebaseModelStoreModule, decorators: [{
|
|
4283
4465
|
type: NgModule,
|
|
4284
4466
|
args: [{
|
|
4285
|
-
imports: importsAndExports
|
|
4286
|
-
exports: importsAndExports
|
|
4467
|
+
imports: importsAndExports,
|
|
4468
|
+
exports: importsAndExports
|
|
4287
4469
|
}]
|
|
4288
4470
|
}] });
|
|
4289
4471
|
|
|
@@ -4386,6 +4568,11 @@ function firebaseCollectionStoreCrudFunction(fn) {
|
|
|
4386
4568
|
}
|
|
4387
4569
|
|
|
4388
4570
|
const DBX_FIREBASE_MODEL_DOES_NOT_EXIST_ERROR = 'DOES_NOT_EXIST';
|
|
4571
|
+
/**
|
|
4572
|
+
* Creates a readable error indicating that the requested Firebase model document does not exist.
|
|
4573
|
+
*
|
|
4574
|
+
* @returns A readable error with the 'DOES_NOT_EXIST' code and a descriptive message.
|
|
4575
|
+
*/
|
|
4389
4576
|
function modelDoesNotExistError() {
|
|
4390
4577
|
return readableError(DBX_FIREBASE_MODEL_DOES_NOT_EXIST_ERROR, 'The document does not exist.');
|
|
4391
4578
|
}
|
|
@@ -4396,6 +4583,8 @@ function modelDoesNotExistError() {
|
|
|
4396
4583
|
const DBX_FIREBASE_DOCUMENT_STORE_CONTEXT_STORE_TOKEN = new InjectionToken('DBX_FIREBASE_DOCUMENT_STORE_CONTEXT_STORE_TOKEN');
|
|
4397
4584
|
/**
|
|
4398
4585
|
* Provides the DbxFirebaseDocumentStoreContextStore.
|
|
4586
|
+
*
|
|
4587
|
+
* @returns Array of Angular providers that create and register a DbxFirebaseDocumentStoreContextStore.
|
|
4399
4588
|
*/
|
|
4400
4589
|
function provideDbxFirebaseDocumentStoreContextStore() {
|
|
4401
4590
|
return [
|
|
@@ -4415,6 +4604,8 @@ function provideDbxFirebaseDocumentStoreContextStore() {
|
|
|
4415
4604
|
* Links a DbxFirebaseDocumentStore to parent DbxFirebaseDocumentStoreContextStore instances.
|
|
4416
4605
|
*
|
|
4417
4606
|
* This should be called in an Angular injection context.
|
|
4607
|
+
*
|
|
4608
|
+
* @param store - The document store to register with all available parent context stores.
|
|
4418
4609
|
*/
|
|
4419
4610
|
function linkDocumentStoreToParentContextStores(store) {
|
|
4420
4611
|
const contextStores = inject(DBX_FIREBASE_DOCUMENT_STORE_CONTEXT_STORE_TOKEN, { optional: true });
|
|
@@ -4596,19 +4787,19 @@ let AbstractRootSingleItemDbxFirebaseDocument = class AbstractRootSingleItemDbxF
|
|
|
4596
4787
|
*
|
|
4597
4788
|
* Ref is set with the FirestoreCollection
|
|
4598
4789
|
*/
|
|
4599
|
-
setId = this.updater((state,
|
|
4790
|
+
setId = this.updater((state, _id) => state);
|
|
4600
4791
|
/**
|
|
4601
4792
|
* Does nothing on a AbstractRootSingleItemDbxFirebaseDocument.
|
|
4602
4793
|
*
|
|
4603
4794
|
* Ref is set with the FirestoreCollection
|
|
4604
4795
|
*/
|
|
4605
|
-
setKey = this.updater((state,
|
|
4796
|
+
setKey = this.updater((state, _key) => state);
|
|
4606
4797
|
/**
|
|
4607
4798
|
* Does nothing on a AbstractRootSingleItemDbxFirebaseDocument.
|
|
4608
4799
|
*
|
|
4609
4800
|
* Ref is set with the FirestoreCollection
|
|
4610
4801
|
*/
|
|
4611
|
-
setRef = this.updater((state,
|
|
4802
|
+
setRef = this.updater((state, _ref) => state);
|
|
4612
4803
|
clearRefs = this.updater((state) => state);
|
|
4613
4804
|
};
|
|
4614
4805
|
AbstractRootSingleItemDbxFirebaseDocument = __decorate([
|
|
@@ -4619,10 +4810,10 @@ AbstractRootSingleItemDbxFirebaseDocument = __decorate([
|
|
|
4619
4810
|
/**
|
|
4620
4811
|
* Creates a function for a store that DbxFirebaseDocumentStore captures the ModelFirebaseCreateFunction result and sets the key of the created value.
|
|
4621
4812
|
*
|
|
4622
|
-
* @param store
|
|
4623
|
-
* @param fn
|
|
4813
|
+
* @param store - The document store to capture the created model's key into.
|
|
4814
|
+
* @param fn - The Firebase create function to wrap.
|
|
4624
4815
|
* @param config - Optional config with an `onResult` callback.
|
|
4625
|
-
* @returns
|
|
4816
|
+
* @returns A function that executes the create and sets the resulting key on the store.
|
|
4626
4817
|
*/
|
|
4627
4818
|
function firebaseDocumentStoreCreateFunction(store, fn, config) {
|
|
4628
4819
|
return (params) => loadingStateFromObs(lazyFrom(() => fn(params).then((result) => {
|
|
@@ -4665,9 +4856,10 @@ function firebaseDocumentStoreReadFunction(store, fn) {
|
|
|
4665
4856
|
*
|
|
4666
4857
|
* The store's current key is always injected into the params of the request.
|
|
4667
4858
|
*
|
|
4668
|
-
* @param store
|
|
4669
|
-
* @param fn
|
|
4670
|
-
* @
|
|
4859
|
+
* @param store - The document store whose current key is injected into the request params.
|
|
4860
|
+
* @param fn - The Firebase update function to wrap.
|
|
4861
|
+
* @param config - Optional config with an `onResult` callback.
|
|
4862
|
+
* @returns A function that executes the update with the store's key injected.
|
|
4671
4863
|
*/
|
|
4672
4864
|
function firebaseDocumentStoreUpdateFunction(store, fn, config) {
|
|
4673
4865
|
return (params) => loadingStateFromObs(store.key$.pipe(first(), exhaustMap((key) => fn({
|
|
@@ -4698,6 +4890,12 @@ function firebaseDocumentStoreDeleteFunction(store, fn) {
|
|
|
4698
4890
|
})), shareReplay(1)));
|
|
4699
4891
|
}
|
|
4700
4892
|
|
|
4893
|
+
/**
|
|
4894
|
+
* Creates a component store effect that links a parent document store to a subcollection store, propagating the parent document and lock set.
|
|
4895
|
+
*
|
|
4896
|
+
* @param store - The subcollection component store to connect to a parent store.
|
|
4897
|
+
* @returns An effect function that accepts an observable parent document store and manages the subscription lifecycle.
|
|
4898
|
+
*/
|
|
4701
4899
|
function setParentStoreEffect(store) {
|
|
4702
4900
|
return store.effect((input) => {
|
|
4703
4901
|
return input.pipe(map((parentStore) => {
|
|
@@ -4870,19 +5068,19 @@ class AbstractSingleItemDbxFirebaseDocument extends AbstractDbxFirebaseDocumentW
|
|
|
4870
5068
|
*
|
|
4871
5069
|
* Ref is set with the FirestoreCollection
|
|
4872
5070
|
*/
|
|
4873
|
-
setId = this.updater((state,
|
|
5071
|
+
setId = this.updater((state, _id) => state);
|
|
4874
5072
|
/**
|
|
4875
5073
|
* Does nothing on a AbstractSingleItemDbxFirebaseDocument.
|
|
4876
5074
|
*
|
|
4877
5075
|
* Ref is set with the FirestoreCollection
|
|
4878
5076
|
*/
|
|
4879
|
-
setKey = this.updater((state,
|
|
5077
|
+
setKey = this.updater((state, _key) => state);
|
|
4880
5078
|
/**
|
|
4881
5079
|
* Does nothing on a AbstractSingleItemDbxFirebaseDocument.
|
|
4882
5080
|
*
|
|
4883
5081
|
* Ref is set with the FirestoreCollection
|
|
4884
5082
|
*/
|
|
4885
|
-
setRef = this.updater((state,
|
|
5083
|
+
setRef = this.updater((state, _ref) => state);
|
|
4886
5084
|
clearRefs = this.updater((state) => state);
|
|
4887
5085
|
}
|
|
4888
5086
|
|
|
@@ -4892,6 +5090,7 @@ class AbstractSingleItemDbxFirebaseDocument extends AbstractDbxFirebaseDocumentW
|
|
|
4892
5090
|
class DbxFirebaseCollectionWithParentStoreDirective extends DbxFirebaseCollectionStoreDirective {
|
|
4893
5091
|
sourceMode = model(undefined, ...(ngDevMode ? [{ debugName: "sourceMode" }] : []));
|
|
4894
5092
|
_sourceMode$ = toObservable(this.sourceMode).pipe(skipInitialMaybe());
|
|
5093
|
+
// eslint-disable-next-line @angular-eslint/prefer-inject -- abstract class receives store from subclass constructors
|
|
4895
5094
|
constructor(store) {
|
|
4896
5095
|
super(store);
|
|
4897
5096
|
// sync inputs to store any time the store changes
|
|
@@ -4936,7 +5135,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
4936
5135
|
}]
|
|
4937
5136
|
}] });
|
|
4938
5137
|
|
|
4939
|
-
/**
|
|
5138
|
+
/**
|
|
5139
|
+
* Collection store for querying SystemState documents.
|
|
5140
|
+
*/
|
|
4940
5141
|
class SystemStateCollectionStore extends AbstractDbxFirebaseCollectionStore {
|
|
4941
5142
|
constructor() {
|
|
4942
5143
|
super({ firestoreCollection: inject(SystemStateFirestoreCollections).systemStateCollection });
|
|
@@ -4948,7 +5149,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
4948
5149
|
type: Injectable
|
|
4949
5150
|
}], ctorParameters: () => [] });
|
|
4950
5151
|
|
|
4951
|
-
/**
|
|
5152
|
+
/**
|
|
5153
|
+
* Directive providing a {@link SystemStateCollectionStore} for querying system state documents.
|
|
5154
|
+
*/
|
|
4952
5155
|
class DbxFirebaseSystemStateCollectionStoreDirective extends DbxFirebaseCollectionStoreDirective {
|
|
4953
5156
|
constructor() {
|
|
4954
5157
|
super(inject(SystemStateCollectionStore));
|
|
@@ -4964,7 +5167,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
4964
5167
|
}]
|
|
4965
5168
|
}], ctorParameters: () => [] });
|
|
4966
5169
|
|
|
4967
|
-
/**
|
|
5170
|
+
/**
|
|
5171
|
+
* Document store for a single typed SystemState document.
|
|
5172
|
+
*/
|
|
4968
5173
|
class SystemStateDocumentStore extends AbstractDbxFirebaseDocumentStore {
|
|
4969
5174
|
constructor() {
|
|
4970
5175
|
super({ firestoreCollection: inject(SystemStateFirestoreCollections).systemStateCollection });
|
|
@@ -4987,22 +5192,20 @@ class AbstractSystemStateDocumentStoreAccessor {
|
|
|
4987
5192
|
exists$ = this.systemStateDocumentStore.exists$;
|
|
4988
5193
|
doesNotExist$ = this.systemStateDocumentStore.doesNotExist$;
|
|
4989
5194
|
type$ = this.systemStateDocumentStore.id$;
|
|
5195
|
+
// eslint-disable-next-line @angular-eslint/prefer-inject -- abstract class receives type identifier from subclass constructors
|
|
4990
5196
|
constructor(type) {
|
|
4991
5197
|
this.systemStateDocumentStore.setId(type);
|
|
4992
5198
|
}
|
|
4993
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: AbstractSystemStateDocumentStoreAccessor, deps:
|
|
5199
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: AbstractSystemStateDocumentStoreAccessor, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
|
|
4994
5200
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: AbstractSystemStateDocumentStoreAccessor });
|
|
4995
5201
|
}
|
|
4996
5202
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: AbstractSystemStateDocumentStoreAccessor, decorators: [{
|
|
4997
5203
|
type: Injectable
|
|
4998
|
-
}], ctorParameters: () => [{ type: undefined
|
|
4999
|
-
type: Inject,
|
|
5000
|
-
args: [null]
|
|
5001
|
-
}, {
|
|
5002
|
-
type: Optional
|
|
5003
|
-
}] }] });
|
|
5204
|
+
}], ctorParameters: () => [{ type: undefined }] });
|
|
5004
5205
|
|
|
5005
|
-
/**
|
|
5206
|
+
/**
|
|
5207
|
+
* Directive providing a {@link SystemStateDocumentStore} for accessing a single system state document.
|
|
5208
|
+
*/
|
|
5006
5209
|
class DbxFirebaseSystemStateDocumentStoreDirective extends DbxFirebaseDocumentStoreDirective {
|
|
5007
5210
|
constructor() {
|
|
5008
5211
|
super(inject((SystemStateDocumentStore)));
|
|
@@ -5055,7 +5258,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
5055
5258
|
type: Injectable
|
|
5056
5259
|
}] });
|
|
5057
5260
|
|
|
5058
|
-
/**
|
|
5261
|
+
/**
|
|
5262
|
+
* Selection list wrapper for notification items with view-only default selection mode.
|
|
5263
|
+
*/
|
|
5059
5264
|
class DbxFirebaseNotificationItemListComponent extends AbstractDbxSelectionListWrapperDirective {
|
|
5060
5265
|
constructor() {
|
|
5061
5266
|
super({
|
|
@@ -5077,7 +5282,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
5077
5282
|
standalone: true
|
|
5078
5283
|
}]
|
|
5079
5284
|
}], ctorParameters: () => [] });
|
|
5080
|
-
/**
|
|
5285
|
+
/**
|
|
5286
|
+
* List view component that renders notification items using the selection list pattern.
|
|
5287
|
+
*/
|
|
5081
5288
|
class DbxFirebaseNotificationItemListViewComponent extends AbstractDbxSelectionListViewDirective {
|
|
5082
5289
|
config = {
|
|
5083
5290
|
componentClass: DbxFirebaseNotificationItemListViewItemComponent,
|
|
@@ -5097,7 +5304,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
5097
5304
|
standalone: true
|
|
5098
5305
|
}]
|
|
5099
5306
|
}] });
|
|
5100
|
-
/**
|
|
5307
|
+
/**
|
|
5308
|
+
* Individual list view item component rendering a notification's subject, message, and date.
|
|
5309
|
+
*/
|
|
5101
5310
|
class DbxFirebaseNotificationItemListViewItemComponent extends AbstractDbxValueListViewItemComponent {
|
|
5102
5311
|
dbxFirebaseNotificationTemplateService = inject(DbxFirebaseNotificationTemplateService);
|
|
5103
5312
|
pairGetter = cachedGetter(() => this.dbxFirebaseNotificationTemplateService.notificationItemSubjectMessagePairForNotificationSummaryItem(this.itemValue));
|
|
@@ -5139,7 +5348,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
5139
5348
|
}]
|
|
5140
5349
|
}] });
|
|
5141
5350
|
|
|
5142
|
-
/**
|
|
5351
|
+
/**
|
|
5352
|
+
* Presentational component for notification item content, displaying subject, message, and date.
|
|
5353
|
+
*/
|
|
5143
5354
|
class DbxFirebaseNotificationItemContentComponent {
|
|
5144
5355
|
subject = input(...(ngDevMode ? [undefined, { debugName: "subject" }] : []));
|
|
5145
5356
|
message = input(...(ngDevMode ? [undefined, { debugName: "message" }] : []));
|
|
@@ -5159,6 +5370,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
5159
5370
|
*/
|
|
5160
5371
|
const FIREBASE_NOTIFICATION_ITEM_WIDGET_TYPE_PREFIX = 'dbxFirebaseNotificationItem';
|
|
5161
5372
|
const DEFAULT_FIREBASE_NOTIFICATION_ITEM_WIDGET_TYPE = `${FIREBASE_NOTIFICATION_ITEM_WIDGET_TYPE_PREFIX}Default`;
|
|
5373
|
+
/**
|
|
5374
|
+
* Derives the widget type string for a given notification template type by prepending the standard prefix.
|
|
5375
|
+
*
|
|
5376
|
+
* @param notificationTemplateType - The notification template type to generate a widget type for.
|
|
5377
|
+
* @returns The prefixed widget type string.
|
|
5378
|
+
*/
|
|
5162
5379
|
function dbxWidgetTypeForNotificationTemplateType(notificationTemplateType) {
|
|
5163
5380
|
return `${FIREBASE_NOTIFICATION_ITEM_WIDGET_TYPE_PREFIX}-${notificationTemplateType}`;
|
|
5164
5381
|
}
|
|
@@ -5173,8 +5390,9 @@ class DbxFirebaseNotificationItemWidgetService {
|
|
|
5173
5390
|
/**
|
|
5174
5391
|
* Used to register a item widget. If widget for the given type is already registered, this will override it by default.
|
|
5175
5392
|
*
|
|
5176
|
-
* @param provider
|
|
5177
|
-
* @param override
|
|
5393
|
+
* @param provider - The notification item widget entry to register.
|
|
5394
|
+
* @param override - Whether to override an existing widget for the same notification template type. Defaults to true.
|
|
5395
|
+
* @returns True if the widget was registered, false if it already existed and override was false or the template type was unknown.
|
|
5178
5396
|
*/
|
|
5179
5397
|
register(provider, override = true) {
|
|
5180
5398
|
const { componentClass, notificationTemplateType } = provider;
|
|
@@ -5266,7 +5484,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
5266
5484
|
type: Directive
|
|
5267
5485
|
}] });
|
|
5268
5486
|
|
|
5269
|
-
/**
|
|
5487
|
+
/**
|
|
5488
|
+
* Default notification item view component that renders subject, message, and creation date.
|
|
5489
|
+
*/
|
|
5270
5490
|
class DbxFirebaseNotificationItemDefaultViewComponent extends AbstractDbxFirebaseNotificationItemWidgetComponent {
|
|
5271
5491
|
get subject() {
|
|
5272
5492
|
return this.notificationItem.s;
|
|
@@ -5388,7 +5608,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
5388
5608
|
}]
|
|
5389
5609
|
}], propDecorators: { buttonElement: [{ type: i0.ViewChild, args: ['button', { ...{ read: ElementRef }, isSignal: true }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }] } });
|
|
5390
5610
|
|
|
5391
|
-
/**
|
|
5611
|
+
/**
|
|
5612
|
+
* Document store for a single NotificationBox, providing derived observables for creation date, recipients, and update functions.
|
|
5613
|
+
*/
|
|
5392
5614
|
class NotificationBoxDocumentStore extends AbstractDbxFirebaseDocumentStore {
|
|
5393
5615
|
notificationFunctions = inject(NotificationFunctions);
|
|
5394
5616
|
constructor() {
|
|
@@ -5405,7 +5627,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
5405
5627
|
type: Injectable
|
|
5406
5628
|
}], ctorParameters: () => [] });
|
|
5407
5629
|
|
|
5408
|
-
/**
|
|
5630
|
+
/**
|
|
5631
|
+
* Document store for a single Notification, providing derived observables for creation date, send state, and update functions.
|
|
5632
|
+
*/
|
|
5409
5633
|
class NotificationDocumentStore extends AbstractDbxFirebaseDocumentWithParentStore {
|
|
5410
5634
|
notificationFunctions = inject(NotificationFunctions);
|
|
5411
5635
|
constructor() {
|
|
@@ -5428,7 +5652,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
5428
5652
|
type: Injectable
|
|
5429
5653
|
}], ctorParameters: () => [] });
|
|
5430
5654
|
|
|
5431
|
-
/**
|
|
5655
|
+
/**
|
|
5656
|
+
* Directive providing a {@link NotificationDocumentStore} for accessing a single notification document.
|
|
5657
|
+
*/
|
|
5432
5658
|
class DbxFirebaseNotificationDocumentStoreDirective extends DbxFirebaseDocumentStoreDirective {
|
|
5433
5659
|
constructor() {
|
|
5434
5660
|
super(inject(NotificationDocumentStore));
|
|
@@ -5445,7 +5671,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
5445
5671
|
}]
|
|
5446
5672
|
}], ctorParameters: () => [] });
|
|
5447
5673
|
|
|
5448
|
-
/**
|
|
5674
|
+
/**
|
|
5675
|
+
* Collection store for Notification documents, scoped to a parent NotificationBox when available.
|
|
5676
|
+
*/
|
|
5449
5677
|
class NotificationCollectionStore extends AbstractDbxFirebaseCollectionWithParentStore {
|
|
5450
5678
|
constructor() {
|
|
5451
5679
|
super({ collectionFactory: inject(NotificationFirestoreCollections).notificationCollectionFactory, collectionGroup: inject(NotificationFirestoreCollections).notificationCollectionGroup });
|
|
@@ -5461,7 +5689,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
5461
5689
|
type: Injectable
|
|
5462
5690
|
}], ctorParameters: () => [] });
|
|
5463
5691
|
|
|
5464
|
-
/**
|
|
5692
|
+
/**
|
|
5693
|
+
* Directive providing a {@link NotificationCollectionStore} for querying notifications within a template.
|
|
5694
|
+
*/
|
|
5465
5695
|
class DbxFirebaseNotificationCollectionStoreDirective extends DbxFirebaseCollectionWithParentStoreDirective {
|
|
5466
5696
|
constructor() {
|
|
5467
5697
|
super(inject(NotificationCollectionStore));
|
|
@@ -5478,7 +5708,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
5478
5708
|
}]
|
|
5479
5709
|
}], ctorParameters: () => [] });
|
|
5480
5710
|
|
|
5481
|
-
/**
|
|
5711
|
+
/**
|
|
5712
|
+
* Directive providing a {@link NotificationBoxDocumentStore} for accessing a single notification box document.
|
|
5713
|
+
*/
|
|
5482
5714
|
class DbxFirebaseNotificationBoxDocumentStoreDirective extends DbxFirebaseDocumentStoreDirective {
|
|
5483
5715
|
constructor() {
|
|
5484
5716
|
super(inject(NotificationBoxDocumentStore));
|
|
@@ -5495,7 +5727,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
5495
5727
|
}]
|
|
5496
5728
|
}], ctorParameters: () => [] });
|
|
5497
5729
|
|
|
5498
|
-
/**
|
|
5730
|
+
/**
|
|
5731
|
+
* Collection store for querying NotificationBox documents.
|
|
5732
|
+
*/
|
|
5499
5733
|
class NotificationBoxCollectionStore extends AbstractDbxFirebaseCollectionStore {
|
|
5500
5734
|
constructor() {
|
|
5501
5735
|
super({ firestoreCollection: inject(NotificationFirestoreCollections).notificationBoxCollection });
|
|
@@ -5507,7 +5741,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
5507
5741
|
type: Injectable
|
|
5508
5742
|
}], ctorParameters: () => [] });
|
|
5509
5743
|
|
|
5510
|
-
/**
|
|
5744
|
+
/**
|
|
5745
|
+
* Directive providing a {@link NotificationBoxCollectionStore} for querying notification boxes.
|
|
5746
|
+
*/
|
|
5511
5747
|
class DbxFirebaseNotificationBoxCollectionStoreDirective extends DbxFirebaseCollectionStoreDirective {
|
|
5512
5748
|
constructor() {
|
|
5513
5749
|
super(inject(NotificationBoxCollectionStore));
|
|
@@ -5524,7 +5760,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
5524
5760
|
}]
|
|
5525
5761
|
}], ctorParameters: () => [] });
|
|
5526
5762
|
|
|
5527
|
-
/**
|
|
5763
|
+
/**
|
|
5764
|
+
* Collection store for querying NotificationSummary documents.
|
|
5765
|
+
*/
|
|
5528
5766
|
class NotificationSummaryCollectionStore extends AbstractDbxFirebaseCollectionStore {
|
|
5529
5767
|
constructor() {
|
|
5530
5768
|
super({ firestoreCollection: inject(NotificationFirestoreCollections).notificationSummaryCollection });
|
|
@@ -5536,7 +5774,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
5536
5774
|
type: Injectable
|
|
5537
5775
|
}], ctorParameters: () => [] });
|
|
5538
5776
|
|
|
5539
|
-
/**
|
|
5777
|
+
/**
|
|
5778
|
+
* Directive providing a {@link NotificationSummaryCollectionStore} for querying notification summaries.
|
|
5779
|
+
*/
|
|
5540
5780
|
class DbxFirebaseNotificationSummaryCollectionStoreDirective extends DbxFirebaseCollectionStoreDirective {
|
|
5541
5781
|
constructor() {
|
|
5542
5782
|
super(inject(NotificationSummaryCollectionStore));
|
|
@@ -5553,7 +5793,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
5553
5793
|
}]
|
|
5554
5794
|
}], ctorParameters: () => [] });
|
|
5555
5795
|
|
|
5556
|
-
/**
|
|
5796
|
+
/**
|
|
5797
|
+
* Document store for a single NotificationSummary, providing derived observables for items, timestamps, sync state, and update functions.
|
|
5798
|
+
*/
|
|
5557
5799
|
class NotificationSummaryDocumentStore extends AbstractDbxFirebaseDocumentStore {
|
|
5558
5800
|
notificationFunctions = inject(NotificationFunctions);
|
|
5559
5801
|
constructor() {
|
|
@@ -5581,7 +5823,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
5581
5823
|
type: Injectable
|
|
5582
5824
|
}], ctorParameters: () => [] });
|
|
5583
5825
|
|
|
5584
|
-
/**
|
|
5826
|
+
/**
|
|
5827
|
+
* Directive providing a {@link NotificationSummaryDocumentStore} for accessing a single notification summary.
|
|
5828
|
+
*/
|
|
5585
5829
|
class DbxFirebaseNotificationSummaryDocumentStoreDirective extends DbxFirebaseDocumentStoreDirective {
|
|
5586
5830
|
constructor() {
|
|
5587
5831
|
super(inject(NotificationSummaryDocumentStore));
|
|
@@ -5598,7 +5842,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
5598
5842
|
}]
|
|
5599
5843
|
}], ctorParameters: () => [] });
|
|
5600
5844
|
|
|
5601
|
-
/**
|
|
5845
|
+
/**
|
|
5846
|
+
* Collection store for querying NotificationUser documents.
|
|
5847
|
+
*/
|
|
5602
5848
|
class NotificationUserCollectionStore extends AbstractDbxFirebaseCollectionStore {
|
|
5603
5849
|
constructor() {
|
|
5604
5850
|
super({ firestoreCollection: inject(NotificationFirestoreCollections).notificationUserCollection });
|
|
@@ -5610,7 +5856,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
5610
5856
|
type: Injectable
|
|
5611
5857
|
}], ctorParameters: () => [] });
|
|
5612
5858
|
|
|
5613
|
-
/**
|
|
5859
|
+
/**
|
|
5860
|
+
* Directive providing a {@link NotificationUserCollectionStore} for querying notification user documents.
|
|
5861
|
+
*/
|
|
5614
5862
|
class DbxFirebaseNotificationUserCollectionStoreDirective extends DbxFirebaseCollectionStoreDirective {
|
|
5615
5863
|
constructor() {
|
|
5616
5864
|
super(inject(NotificationUserCollectionStore));
|
|
@@ -5627,7 +5875,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
5627
5875
|
}]
|
|
5628
5876
|
}], ctorParameters: () => [] });
|
|
5629
5877
|
|
|
5630
|
-
/**
|
|
5878
|
+
/**
|
|
5879
|
+
* Document store for a single NotificationUser with update and resync functions.
|
|
5880
|
+
*/
|
|
5631
5881
|
class NotificationUserDocumentStore extends AbstractDbxFirebaseDocumentStore {
|
|
5632
5882
|
notificationFunctions = inject(NotificationFunctions);
|
|
5633
5883
|
constructor() {
|
|
@@ -5642,7 +5892,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
5642
5892
|
type: Injectable
|
|
5643
5893
|
}], ctorParameters: () => [] });
|
|
5644
5894
|
|
|
5645
|
-
/**
|
|
5895
|
+
/**
|
|
5896
|
+
* Directive providing a {@link NotificationUserDocumentStore} for accessing a single notification user document.
|
|
5897
|
+
*/
|
|
5646
5898
|
class DbxFirebaseNotificationUserDocumentStoreDirective extends DbxFirebaseDocumentStoreDirective {
|
|
5647
5899
|
constructor() {
|
|
5648
5900
|
super(inject(NotificationUserDocumentStore));
|
|
@@ -5725,8 +5977,8 @@ class DbxFirebaseStorageFileDownloadStorage {
|
|
|
5725
5977
|
*
|
|
5726
5978
|
* The pair may be expired.
|
|
5727
5979
|
*
|
|
5728
|
-
* @param key
|
|
5729
|
-
* @returns
|
|
5980
|
+
* @param input - The Firestore model ID or key identifying the storage file.
|
|
5981
|
+
* @returns Observable that emits the cached download URL pair, or undefined if not found.
|
|
5730
5982
|
*/
|
|
5731
5983
|
getDownloadUrlPair(input) {
|
|
5732
5984
|
const id = firestoreModelId(input);
|
|
@@ -5765,13 +6017,12 @@ class DbxFirebaseStorageFileDownloadStorage {
|
|
|
5765
6017
|
return this.storageAccessor.remove(storageKey);
|
|
5766
6018
|
}
|
|
5767
6019
|
_getUserDownloadCacheForStorageKey(storageKey, uid) {
|
|
5768
|
-
return this.storageAccessor.get(storageKey).pipe(catchError((
|
|
6020
|
+
return this.storageAccessor.get(storageKey).pipe(catchError((_e) => {
|
|
5769
6021
|
return of(undefined);
|
|
5770
6022
|
}), map((result) => result ?? { uid, pairs: {} }));
|
|
5771
6023
|
}
|
|
5772
6024
|
getStorageKeyForUid(uid) {
|
|
5773
|
-
|
|
5774
|
-
return storageKey;
|
|
6025
|
+
return `sf_dl_cache_${uid}`;
|
|
5775
6026
|
}
|
|
5776
6027
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: DbxFirebaseStorageFileDownloadStorage, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5777
6028
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: DbxFirebaseStorageFileDownloadStorage });
|
|
@@ -5780,6 +6031,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
5780
6031
|
type: Injectable
|
|
5781
6032
|
}] });
|
|
5782
6033
|
|
|
6034
|
+
/**
|
|
6035
|
+
* Creates a {@link DbxFirebaseStorageFileDownloadServiceCustomSource} from a function that returns a LoadingState observable.
|
|
6036
|
+
*
|
|
6037
|
+
* @param obsForInput - Function that produces a LoadingState observable for the given download params and storage file ID.
|
|
6038
|
+
* @returns A custom source adapter that bridges observable-based downloads to the promise-based interface.
|
|
6039
|
+
*/
|
|
5783
6040
|
function dbxFirebaseStorageFileDownloadServiceCustomSourceFromObs(obsForInput) {
|
|
5784
6041
|
return {
|
|
5785
6042
|
downloadStorageFileResult: (params, storageFileId) => firstValueFrom(obsForInput(params, storageFileId).pipe(throwErrorFromLoadingStateError(), valueFromFinishedLoadingState()))
|
|
@@ -5866,8 +6123,9 @@ class DbxFirebaseStorageFileDownloadService {
|
|
|
5866
6123
|
*
|
|
5867
6124
|
* These URLs are cached locally to prevent extra/redundant calls to the server.
|
|
5868
6125
|
*
|
|
5869
|
-
* @param storageFileIdOrKey
|
|
5870
|
-
* @
|
|
6126
|
+
* @param storageFileIdOrKey - The storage file ID or key to download.
|
|
6127
|
+
* @param source - Optional custom download source. Falls back to the default internal source if not provided.
|
|
6128
|
+
* @returns Observable that emits the cached or freshly downloaded URL pair.
|
|
5871
6129
|
*/
|
|
5872
6130
|
downloadPairForStorageFileUsingSource(storageFileIdOrKey, source) {
|
|
5873
6131
|
const storageFileId = firestoreModelId(storageFileIdOrKey);
|
|
@@ -5890,6 +6148,8 @@ class DbxFirebaseStorageFileDownloadService {
|
|
|
5890
6148
|
}
|
|
5891
6149
|
/**
|
|
5892
6150
|
* Adds the given download URL pair to the cache.
|
|
6151
|
+
*
|
|
6152
|
+
* @param downloadUrlPair - The download URL pair to store in the local cache.
|
|
5893
6153
|
*/
|
|
5894
6154
|
addPairForStorageFileToCache(downloadUrlPair) {
|
|
5895
6155
|
this.storageFileDownloadStorage.addDownloadUrl(downloadUrlPair).pipe(first()).subscribe();
|
|
@@ -6248,6 +6508,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
6248
6508
|
|
|
6249
6509
|
/**
|
|
6250
6510
|
* Default implementation of StorageFileUploadHandler.
|
|
6511
|
+
*
|
|
6512
|
+
* @param config - Configuration providing the storage service and file upload config factory.
|
|
6513
|
+
* @returns A StorageFileUploadHandler that manages resumable file uploads.
|
|
6251
6514
|
*/
|
|
6252
6515
|
function storageFileUploadHandler(config) {
|
|
6253
6516
|
const { storageService, storageFileUploadConfigFactory } = config;
|
|
@@ -6316,7 +6579,7 @@ function storageFileUploadFiles(input) {
|
|
|
6316
6579
|
const maxParallelTasks = inputMaxParallelUploads ?? 3;
|
|
6317
6580
|
const multiUploadsSubscriptionObject = new MultiSubscriptionObject();
|
|
6318
6581
|
// begin the upload for each file
|
|
6319
|
-
const allFiles =
|
|
6582
|
+
const allFiles = [...files];
|
|
6320
6583
|
// unsubscribe from all previous uploads
|
|
6321
6584
|
multiUploadsSubscriptionObject.unsub();
|
|
6322
6585
|
const allFilesAndLatestProgress = new Array(allFiles.length);
|
|
@@ -6488,7 +6751,7 @@ function storageFileUploadFiles(input) {
|
|
|
6488
6751
|
}
|
|
6489
6752
|
// run upload task for each file
|
|
6490
6753
|
const fileTuples = allFiles.map((file, index) => [file, index]);
|
|
6491
|
-
runAsyncTasksForValues(fileTuples, runUploadTaskForFile, {
|
|
6754
|
+
void runAsyncTasksForValues(fileTuples, runUploadTaskForFile, {
|
|
6492
6755
|
maxParallelTasks,
|
|
6493
6756
|
retriesAllowed: 0 // no retries allowed
|
|
6494
6757
|
}).then(() => {
|
|
@@ -6548,7 +6811,7 @@ class DbxFirebaseStorageFileUploadActionHandlerDirective {
|
|
|
6548
6811
|
let handlerFunction;
|
|
6549
6812
|
if (uploadHandler) {
|
|
6550
6813
|
handlerFunction = (files, context) => {
|
|
6551
|
-
const { upload, cancel } = storageFileUploadFiles({
|
|
6814
|
+
const { upload, cancel: _cancel } = storageFileUploadFiles({
|
|
6552
6815
|
files,
|
|
6553
6816
|
uploadHandler
|
|
6554
6817
|
});
|
|
@@ -6733,7 +6996,7 @@ class DbxFirebaseStorageFileUploadInitializeDocumentDirective {
|
|
|
6733
6996
|
_dbxActionHandlerInstance = clean(new DbxActionHandlerInstance(this.source));
|
|
6734
6997
|
constructor() {
|
|
6735
6998
|
// set the trigger
|
|
6736
|
-
cleanSubscription(this.uploadStore.uploadResult$.subscribe(
|
|
6999
|
+
cleanSubscription(this.uploadStore.uploadResult$.subscribe((result) => {
|
|
6737
7000
|
const successFileResult = result.successFileResults.find((x) => x.fileRef != null);
|
|
6738
7001
|
const fileRef = successFileResult?.fileRef;
|
|
6739
7002
|
if (fileRef) {
|
|
@@ -6811,7 +7074,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
6811
7074
|
}]
|
|
6812
7075
|
}], ctorParameters: () => [] });
|
|
6813
7076
|
|
|
6814
|
-
const
|
|
7077
|
+
const IMPORTS_AND_EXPORTS = [
|
|
6815
7078
|
// dbx-core/dbx-web modules/components
|
|
6816
7079
|
DbxActionModule,
|
|
6817
7080
|
DbxLoadingComponent,
|
|
@@ -6883,24 +7146,26 @@ class DbxFirebaseStorageFileUploadModule {
|
|
|
6883
7146
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: DbxFirebaseStorageFileUploadModule, decorators: [{
|
|
6884
7147
|
type: NgModule,
|
|
6885
7148
|
args: [{
|
|
6886
|
-
imports:
|
|
6887
|
-
exports:
|
|
7149
|
+
imports: IMPORTS_AND_EXPORTS,
|
|
7150
|
+
exports: IMPORTS_AND_EXPORTS
|
|
6888
7151
|
}]
|
|
6889
7152
|
}] });
|
|
6890
7153
|
|
|
6891
7154
|
/**
|
|
6892
|
-
* Factory function for creating a StorageAccessor for the
|
|
7155
|
+
* Factory function for creating a StorageAccessor for the storage file download cache.
|
|
7156
|
+
*
|
|
7157
|
+
* @param storageAccessorFactory - The factory used to create prefixed storage accessors.
|
|
7158
|
+
* @returns A StorageAccessor scoped to the storage file download cache.
|
|
6893
7159
|
*/
|
|
6894
7160
|
function defaultDbxFirebaseStorageFileDownloadStorageAccessorFactory(storageAccessorFactory) {
|
|
6895
|
-
|
|
7161
|
+
return storageAccessorFactory.createStorageAccessor({
|
|
6896
7162
|
prefix: 'sfds'
|
|
6897
7163
|
});
|
|
6898
|
-
return accessor;
|
|
6899
7164
|
}
|
|
6900
7165
|
/**
|
|
6901
|
-
* Creates EnvironmentProviders for
|
|
7166
|
+
* Creates EnvironmentProviders for the storage file download service and its dependencies.
|
|
6902
7167
|
*
|
|
6903
|
-
* @returns EnvironmentProviders
|
|
7168
|
+
* @returns EnvironmentProviders that register the storage file download storage accessor, storage, and service.
|
|
6904
7169
|
*/
|
|
6905
7170
|
function provideDbxFirebaseStorageFileService() {
|
|
6906
7171
|
const providers = [
|
|
@@ -6975,9 +7240,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
6975
7240
|
const DBX_FIREBASE_ID_ROUTER_PARAM_DEFAULT_ID_PARAM_KEY = 'id';
|
|
6976
7241
|
const DBX_FIREBASE_ID_ROUTER_PARAM_DEFAULT_KEY_PARAM_KEY = 'key';
|
|
6977
7242
|
const DBX_FIREBASE_ID_ROUTER_PARAM_DEFAULT_USE_PARAM_VALUE = '0';
|
|
7243
|
+
/**
|
|
7244
|
+
* Creates a {@link DbxFirebaseIdRouteParamRedirectInstance} configured to read a model key from route params.
|
|
7245
|
+
*
|
|
7246
|
+
* @param dbxRouterService - The router service used to read route parameters.
|
|
7247
|
+
* @param defaultParamKey - The route parameter key to read. Defaults to 'key'.
|
|
7248
|
+
* @returns A new route param redirect instance for model keys.
|
|
7249
|
+
*/
|
|
6978
7250
|
function dbxFirebaseKeyRouteParamRedirect(dbxRouterService, defaultParamKey = DBX_FIREBASE_ID_ROUTER_PARAM_DEFAULT_KEY_PARAM_KEY) {
|
|
6979
7251
|
return dbxFirebaseIdRouteParamRedirect(dbxRouterService, defaultParamKey);
|
|
6980
7252
|
}
|
|
7253
|
+
/**
|
|
7254
|
+
* Creates a {@link DbxFirebaseIdRouteParamRedirectInstance} that reads a model ID from route params and optionally redirects to a default value.
|
|
7255
|
+
*
|
|
7256
|
+
* @param dbxRouterService - The router service used to read route parameters.
|
|
7257
|
+
* @param defaultParamKey - The route parameter key to read. Defaults to 'id'.
|
|
7258
|
+
* @returns A new route param redirect instance for model IDs with configurable redirect behavior.
|
|
7259
|
+
*/
|
|
6981
7260
|
function dbxFirebaseIdRouteParamRedirect(dbxRouterService, defaultParamKey = DBX_FIREBASE_ID_ROUTER_PARAM_DEFAULT_ID_PARAM_KEY) {
|
|
6982
7261
|
const _paramReader = dbxRouteParamReaderInstance(dbxRouterService, defaultParamKey);
|
|
6983
7262
|
const _paramRedirect = new DbxRouteParamDefaultRedirectInstance(_paramReader);
|
|
@@ -7172,5 +7451,5 @@ function provideDbxFirebase(config) {
|
|
|
7172
7451
|
* Generated bundle index. Do not edit.
|
|
7173
7452
|
*/
|
|
7174
7453
|
|
|
7175
|
-
export { AbstractConfiguredDbxFirebaseLoginButtonDirective, AbstractDbxFirebaseCollectionStore, AbstractDbxFirebaseCollectionWithParentStore, AbstractDbxFirebaseDocumentStore, AbstractDbxFirebaseDocumentWithParentStore, AbstractDbxFirebaseModelEntityWidgetDirective, AbstractDbxFirebaseNotificationItemWidgetComponent, AbstractRootSingleItemDbxFirebaseDocument, AbstractSingleItemDbxFirebaseDocument, AbstractSystemStateDocumentStoreAccessor, DBX_CONFIGURED_DBX_FIREBASE_LOGIN_BUTTON_COMPONENT_CONFIGURATION, DBX_FIREBASE_APP_OPTIONS_TOKEN, DBX_FIREBASE_DOCUMENT_STORE_CONTEXT_STORE_TOKEN, DBX_FIREBASE_ID_ROUTER_PARAM_DEFAULT_ID_PARAM_KEY, DBX_FIREBASE_ID_ROUTER_PARAM_DEFAULT_KEY_PARAM_KEY, DBX_FIREBASE_ID_ROUTER_PARAM_DEFAULT_USE_PARAM_VALUE, DBX_FIREBASE_MODEL_DOES_NOT_EXIST_ERROR, DBX_FIREBASE_MODEL_ENTITY_WITH_STORE_TOKEN, DBX_FIREBASE_STORAGEFILE_DOWNLOAD_STORAGE_ACCESSOR_TOKEN, DBX_FIREBASE_STORAGE_CONTEXT_CONFIG_TOKEN, DBX_FIREBASE_STORAGE_CONTEXT_TOKEN, DBX_FIRESTORE_CONTEXT_TOKEN, DEFAULT_CONFIGURED_DBX_FIREBASE_LOGIN_BUTTON_TEMPLATE, DEFAULT_DBX_FIREBASE_ANALYTICS_USER_PROPERTIES_FACTORY, DEFAULT_DBX_FIREBASE_AUTH_SERVICE_DELEGATE, DEFAULT_DBX_FIREBASE_MODEL_ENTITIES_COMPONENT_POPOVER_KEY, DEFAULT_DBX_FIREBASE_MODEL_HISTORY_COMPONENT_POPOVER_KEY, DEFAULT_DBX_FIREBASE_NOTIFICATION_ITEM_STORE_POPOVER_KEY, DEFAULT_FIREBASE_AUTH_LOGIN_PASSWORD_CONFIG, DEFAULT_FIREBASE_AUTH_LOGIN_PASSWORD_CONFIG_TOKEN, DEFAULT_FIREBASE_AUTH_LOGIN_PROVIDERS_TOKEN, DEFAULT_FIREBASE_AUTH_LOGIN_TERMS_COMPONENT_CLASS_TOKEN, DEFAULT_FIREBASE_COLLECTION_CHANGE_TRIGGER_FUNCTION, DEFAULT_FIREBASE_DEVELOPMENT_ENABLED_TOKEN, DEFAULT_FIREBASE_DEVELOPMENT_POPUP_KEY, DEFAULT_FIREBASE_DEVELOPMENT_SCHEDULER_ENABLED_TOKEN, DEFAULT_FIREBASE_DEVELOPMENT_WIDGET_PROVIDERS_TOKEN, DEFAULT_FIREBASE_LOGIN_METHOD_CATEGORY, DEFAULT_FIREBASE_NOTIFICATION_ITEM_WIDGET_TYPE, DEVELOPMENT_FIREBASE_SERVER_SCHEDULER_WIDGET_KEY, DbxFirebaseAnalyticsUserEventsListenerService, DbxFirebaseAnalyticsUserSource, DbxFirebaseAppCheckHttpInterceptor, DbxFirebaseAuthLoginService, DbxFirebaseAuthService, DbxFirebaseAuthServiceDelegate, DbxFirebaseCollectionChangeDirective, DbxFirebaseCollectionChangeTriggerInstance, DbxFirebaseCollectionHasChangeDirective, DbxFirebaseCollectionListDirective, DbxFirebaseCollectionLoaderInstance, DbxFirebaseCollectionStoreDirective, DbxFirebaseCollectionWithParentStoreDirective, DbxFirebaseDevelopmentDirective, DbxFirebaseDevelopmentModule, DbxFirebaseDevelopmentPopupComponent, DbxFirebaseDevelopmentPopupContentComponent, DbxFirebaseDevelopmentPopupContentFormComponent, DbxFirebaseDevelopmentSchedulerListComponent, DbxFirebaseDevelopmentSchedulerListViewComponent, DbxFirebaseDevelopmentSchedulerListViewItemComponent, DbxFirebaseDevelopmentSchedulerService, DbxFirebaseDevelopmentSchedulerWidgetComponent, DbxFirebaseDevelopmentService, DbxFirebaseDevelopmentWidgetService, DbxFirebaseDocumentLoaderInstance, DbxFirebaseDocumentStoreContextModelEntitiesSourceDirective, DbxFirebaseDocumentStoreContextStore, DbxFirebaseDocumentStoreContextStoreDirective, DbxFirebaseDocumentStoreDirective, DbxFirebaseDocumentStoreIdFromTwoWayModelKeyDirective, DbxFirebaseDocumentStoreTwoWayKeyProvider, DbxFirebaseDocumentStoreTwoWayModelKeySourceDirective, DbxFirebaseEmailFormComponent, DbxFirebaseEmailRecoveryFormComponent, DbxFirebaseEmulatorService, DbxFirebaseLoginAnonymousComponent, DbxFirebaseLoginAppleComponent, DbxFirebaseLoginButtonComponent, DbxFirebaseLoginButtonContainerComponent, DbxFirebaseLoginComponent, DbxFirebaseLoginContext, DbxFirebaseLoginContextBackButtonComponent, DbxFirebaseLoginContextDirective, DbxFirebaseLoginEmailComponent, DbxFirebaseLoginEmailContentComponent, DbxFirebaseLoginFacebookComponent, DbxFirebaseLoginGitHubComponent, DbxFirebaseLoginGoogleComponent, DbxFirebaseLoginListComponent, DbxFirebaseLoginMicrosoftComponent, DbxFirebaseLoginTermsComponent, DbxFirebaseLoginTermsSimpleComponent, DbxFirebaseLoginTwitterComponent, DbxFirebaseModelContextService, DbxFirebaseModelEntitiesComponent, DbxFirebaseModelEntitiesDebugWidgetComponent, DbxFirebaseModelEntitiesPopoverButtonComponent, DbxFirebaseModelEntitiesPopoverComponent, DbxFirebaseModelEntitiesSource, DbxFirebaseModelEntitiesWidgetService, DbxFirebaseModelEntitiesWidgetServiceConfig, DbxFirebaseModelHistoryComponent, DbxFirebaseModelHistoryPopoverButtonComponent, DbxFirebaseModelHistoryPopoverComponent, DbxFirebaseModelKeyComponent, DbxFirebaseModelModule, DbxFirebaseModelStoreModule, DbxFirebaseModelTrackerService, DbxFirebaseModelTypeInstanceListComponent, DbxFirebaseModelTypeInstanceListViewComponent, DbxFirebaseModelTypeInstanceListViewItemComponent, DbxFirebaseModelTypesService, DbxFirebaseModelTypesServiceConfig, DbxFirebaseModelViewedEventDirective, DbxFirebaseModule, DbxFirebaseNotificationBoxCollectionStoreDirective, DbxFirebaseNotificationBoxDocumentStoreDirective, DbxFirebaseNotificationCollectionStoreDirective, DbxFirebaseNotificationDocumentStoreDirective, DbxFirebaseNotificationItemContentComponent, DbxFirebaseNotificationItemDefaultViewComponent, DbxFirebaseNotificationItemListComponent, DbxFirebaseNotificationItemListViewComponent, DbxFirebaseNotificationItemListViewItemComponent, DbxFirebaseNotificationItemStore, DbxFirebaseNotificationItemStorePopoverButtonComponent, DbxFirebaseNotificationItemStorePopoverComponent, DbxFirebaseNotificationItemViewComponent, DbxFirebaseNotificationItemWidgetService, DbxFirebaseNotificationSummaryCollectionStoreDirective, DbxFirebaseNotificationSummaryDocumentStoreDirective, DbxFirebaseNotificationTemplateService, DbxFirebaseNotificationUserCollectionStoreDirective, DbxFirebaseNotificationUserDocumentStoreDirective, DbxFirebaseParsedEmulatorsConfig, DbxFirebaseRegisterComponent, DbxFirebaseRegisterEmailComponent, DbxFirebaseStorageFileCollectionStoreDirective, DbxFirebaseStorageFileDocumentStoreDirective, DbxFirebaseStorageFileDownloadButtonComponent, DbxFirebaseStorageFileDownloadService, DbxFirebaseStorageFileDownloadStorage, DbxFirebaseStorageFileGroupDocumentStoreDirective, DbxFirebaseStorageFileUploadActionHandlerDirective, DbxFirebaseStorageFileUploadInitializeDocumentDirective, DbxFirebaseStorageFileUploadModule, DbxFirebaseStorageFileUploadStore, DbxFirebaseStorageFileUploadStoreDirective, DbxFirebaseStorageFileUploadSyncDirective, DbxFirebaseStorageService, DbxFirebaseSystemStateCollectionStoreDirective, DbxFirebaseSystemStateDocumentStoreDirective, DbxFirestoreContextService, DbxLimitedFirebaseDocumentLoaderInstance, FIREBASE_NOTIFICATION_ITEM_WIDGET_TYPE_PREFIX, FlatFirestoreModelKeyPipe, NotificationBoxCollectionStore, NotificationBoxDocumentStore, NotificationCollectionStore, NotificationDocumentStore, NotificationSummaryCollectionStore, NotificationSummaryDocumentStore, NotificationUserCollectionStore, NotificationUserDocumentStore, OAUTH_FIREBASE_LOGIN_METHOD_CATEGORY, StorageFileCollectionStore, StorageFileDocumentStore, StorageFileGroupDocumentStore, StorageFileUploadFilesError, SystemStateCollectionStore, SystemStateDocumentStore, TwoWayFlatFirestoreModelKeyPipe, authRolesObsWithClaimsService, authUserInfoFromAuthUser, authUserStateFromFirebaseAuthServiceFunction, dbxFirebaseAuthContextInfo, dbxFirebaseCollectionChangeTrigger, dbxFirebaseCollectionChangeTriggerForStore, dbxFirebaseCollectionChangeTriggerForWatcher, dbxFirebaseCollectionChangeWatcher, dbxFirebaseCollectionLoaderInstance, dbxFirebaseCollectionLoaderInstanceWithCollection, dbxFirebaseDocumentLoaderInstance, dbxFirebaseDocumentLoaderInstanceWithAccessor, dbxFirebaseDocumentStoreContextModelEntitiesSourceFactory, dbxFirebaseIdRouteParamRedirect, dbxFirebaseInContextFirebaseModelServiceInstance, dbxFirebaseInContextFirebaseModelServiceInstanceFactory, dbxFirebaseKeyRouteParamRedirect, dbxFirebaseModelContextServiceInfoInstanceFactory, dbxFirebaseModelEntityWidgetInjectionConfigFactory, dbxFirebaseModelTypesServiceInstance, dbxFirebaseModelTypesServiceInstancePairForKeysFactory, dbxFirebaseSourceSelectLoadSource, dbxFirebaseStorageFileDownloadServiceCustomSourceFromObs, dbxFirebaseStorageProvidersContextConfigFactory, dbxLimitedFirebaseDocumentLoaderInstance, dbxLimitedFirebaseDocumentLoaderInstanceWithAccessor, dbxWidgetTypeForNotificationTemplateType, defaultDbxFirebaseAuthServiceDelegateWithClaimsService, defaultDbxFirebaseStorageFileDownloadStorageAccessorFactory, developmentFirebaseServerSchedulerWidgetEntry, enableAppCheckDebugTokenGeneration, firebaseAuthTokenFromUser, firebaseCollectionStoreCreateFunction, firebaseCollectionStoreCrudFunction, firebaseContextServiceEntityMap, firebaseDocumentStoreCreateFunction, firebaseDocumentStoreCrudFunction, firebaseDocumentStoreDeleteFunction, firebaseDocumentStoreReadFunction, firebaseDocumentStoreUpdateFunction,
|
|
7454
|
+
export { AbstractConfiguredDbxFirebaseLoginButtonDirective, AbstractDbxFirebaseCollectionStore, AbstractDbxFirebaseCollectionWithParentStore, AbstractDbxFirebaseDocumentStore, AbstractDbxFirebaseDocumentWithParentStore, AbstractDbxFirebaseModelEntityWidgetDirective, AbstractDbxFirebaseNotificationItemWidgetComponent, AbstractRootSingleItemDbxFirebaseDocument, AbstractSingleItemDbxFirebaseDocument, AbstractSystemStateDocumentStoreAccessor, DBX_CONFIGURED_DBX_FIREBASE_LOGIN_BUTTON_COMPONENT_CONFIGURATION, DBX_FIREBASE_APP_OPTIONS_TOKEN, DBX_FIREBASE_DOCUMENT_STORE_CONTEXT_STORE_TOKEN, DBX_FIREBASE_ID_ROUTER_PARAM_DEFAULT_ID_PARAM_KEY, DBX_FIREBASE_ID_ROUTER_PARAM_DEFAULT_KEY_PARAM_KEY, DBX_FIREBASE_ID_ROUTER_PARAM_DEFAULT_USE_PARAM_VALUE, DBX_FIREBASE_MODEL_DOES_NOT_EXIST_ERROR, DBX_FIREBASE_MODEL_ENTITY_WITH_STORE_TOKEN, DBX_FIREBASE_STORAGEFILE_DOWNLOAD_STORAGE_ACCESSOR_TOKEN, DBX_FIREBASE_STORAGE_CONTEXT_CONFIG_TOKEN, DBX_FIREBASE_STORAGE_CONTEXT_TOKEN, DBX_FIRESTORE_CONTEXT_TOKEN, DEFAULT_CONFIGURED_DBX_FIREBASE_LOGIN_BUTTON_TEMPLATE, DEFAULT_DBX_FIREBASE_ANALYTICS_USER_PROPERTIES_FACTORY, DEFAULT_DBX_FIREBASE_AUTH_SERVICE_DELEGATE, DEFAULT_DBX_FIREBASE_MODEL_ENTITIES_COMPONENT_POPOVER_KEY, DEFAULT_DBX_FIREBASE_MODEL_HISTORY_COMPONENT_POPOVER_KEY, DEFAULT_DBX_FIREBASE_NOTIFICATION_ITEM_STORE_POPOVER_KEY, DEFAULT_FIREBASE_AUTH_LOGIN_PASSWORD_CONFIG, DEFAULT_FIREBASE_AUTH_LOGIN_PASSWORD_CONFIG_TOKEN, DEFAULT_FIREBASE_AUTH_LOGIN_PROVIDERS_TOKEN, DEFAULT_FIREBASE_AUTH_LOGIN_TERMS_COMPONENT_CLASS_TOKEN, DEFAULT_FIREBASE_COLLECTION_CHANGE_TRIGGER_FUNCTION, DEFAULT_FIREBASE_DEVELOPMENT_ENABLED_TOKEN, DEFAULT_FIREBASE_DEVELOPMENT_POPUP_KEY, DEFAULT_FIREBASE_DEVELOPMENT_SCHEDULER_ENABLED_TOKEN, DEFAULT_FIREBASE_DEVELOPMENT_WIDGET_PROVIDERS_TOKEN, DEFAULT_FIREBASE_LOGIN_METHOD_CATEGORY, DEFAULT_FIREBASE_NOTIFICATION_ITEM_WIDGET_TYPE, DEVELOPMENT_FIREBASE_SERVER_SCHEDULER_WIDGET_KEY, DbxFirebaseAnalyticsUserEventsListenerService, DbxFirebaseAnalyticsUserSource, DbxFirebaseAppCheckHttpInterceptor, DbxFirebaseAuthLoginService, DbxFirebaseAuthService, DbxFirebaseAuthServiceDelegate, DbxFirebaseCollectionChangeDirective, DbxFirebaseCollectionChangeTriggerInstance, DbxFirebaseCollectionHasChangeDirective, DbxFirebaseCollectionListDirective, DbxFirebaseCollectionLoaderInstance, DbxFirebaseCollectionStoreDirective, DbxFirebaseCollectionWithParentStoreDirective, DbxFirebaseDevelopmentDirective, DbxFirebaseDevelopmentModule, DbxFirebaseDevelopmentPopupComponent, DbxFirebaseDevelopmentPopupContentComponent, DbxFirebaseDevelopmentPopupContentFormComponent, DbxFirebaseDevelopmentSchedulerListComponent, DbxFirebaseDevelopmentSchedulerListViewComponent, DbxFirebaseDevelopmentSchedulerListViewItemComponent, DbxFirebaseDevelopmentSchedulerService, DbxFirebaseDevelopmentSchedulerWidgetComponent, DbxFirebaseDevelopmentService, DbxFirebaseDevelopmentWidgetService, DbxFirebaseDocumentLoaderInstance, DbxFirebaseDocumentStoreContextModelEntitiesSourceDirective, DbxFirebaseDocumentStoreContextStore, DbxFirebaseDocumentStoreContextStoreDirective, DbxFirebaseDocumentStoreDirective, DbxFirebaseDocumentStoreIdFromTwoWayModelKeyDirective, DbxFirebaseDocumentStoreTwoWayKeyProvider, DbxFirebaseDocumentStoreTwoWayModelKeySourceDirective, DbxFirebaseEmailFormComponent, DbxFirebaseEmailRecoveryFormComponent, DbxFirebaseEmulatorService, DbxFirebaseLoginAnonymousComponent, DbxFirebaseLoginAppleComponent, DbxFirebaseLoginButtonComponent, DbxFirebaseLoginButtonContainerComponent, DbxFirebaseLoginComponent, DbxFirebaseLoginContext, DbxFirebaseLoginContextBackButtonComponent, DbxFirebaseLoginContextDirective, DbxFirebaseLoginEmailComponent, DbxFirebaseLoginEmailContentComponent, DbxFirebaseLoginFacebookComponent, DbxFirebaseLoginGitHubComponent, DbxFirebaseLoginGoogleComponent, DbxFirebaseLoginListComponent, DbxFirebaseLoginMicrosoftComponent, DbxFirebaseLoginTermsComponent, DbxFirebaseLoginTermsSimpleComponent, DbxFirebaseLoginTwitterComponent, DbxFirebaseModelContextService, DbxFirebaseModelEntitiesComponent, DbxFirebaseModelEntitiesDebugWidgetComponent, DbxFirebaseModelEntitiesPopoverButtonComponent, DbxFirebaseModelEntitiesPopoverComponent, DbxFirebaseModelEntitiesSource, DbxFirebaseModelEntitiesWidgetService, DbxFirebaseModelEntitiesWidgetServiceConfig, DbxFirebaseModelHistoryComponent, DbxFirebaseModelHistoryPopoverButtonComponent, DbxFirebaseModelHistoryPopoverComponent, DbxFirebaseModelKeyComponent, DbxFirebaseModelModule, DbxFirebaseModelStoreModule, DbxFirebaseModelTrackerService, DbxFirebaseModelTypeInstanceListComponent, DbxFirebaseModelTypeInstanceListViewComponent, DbxFirebaseModelTypeInstanceListViewItemComponent, DbxFirebaseModelTypesService, DbxFirebaseModelTypesServiceConfig, DbxFirebaseModelViewedEventDirective, DbxFirebaseModule, DbxFirebaseNotificationBoxCollectionStoreDirective, DbxFirebaseNotificationBoxDocumentStoreDirective, DbxFirebaseNotificationCollectionStoreDirective, DbxFirebaseNotificationDocumentStoreDirective, DbxFirebaseNotificationItemContentComponent, DbxFirebaseNotificationItemDefaultViewComponent, DbxFirebaseNotificationItemListComponent, DbxFirebaseNotificationItemListViewComponent, DbxFirebaseNotificationItemListViewItemComponent, DbxFirebaseNotificationItemStore, DbxFirebaseNotificationItemStorePopoverButtonComponent, DbxFirebaseNotificationItemStorePopoverComponent, DbxFirebaseNotificationItemViewComponent, DbxFirebaseNotificationItemWidgetService, DbxFirebaseNotificationSummaryCollectionStoreDirective, DbxFirebaseNotificationSummaryDocumentStoreDirective, DbxFirebaseNotificationTemplateService, DbxFirebaseNotificationUserCollectionStoreDirective, DbxFirebaseNotificationUserDocumentStoreDirective, DbxFirebaseParsedEmulatorsConfig, DbxFirebaseRegisterComponent, DbxFirebaseRegisterEmailComponent, DbxFirebaseStorageFileCollectionStoreDirective, DbxFirebaseStorageFileDocumentStoreDirective, DbxFirebaseStorageFileDownloadButtonComponent, DbxFirebaseStorageFileDownloadService, DbxFirebaseStorageFileDownloadStorage, DbxFirebaseStorageFileGroupDocumentStoreDirective, DbxFirebaseStorageFileUploadActionHandlerDirective, DbxFirebaseStorageFileUploadInitializeDocumentDirective, DbxFirebaseStorageFileUploadModule, DbxFirebaseStorageFileUploadStore, DbxFirebaseStorageFileUploadStoreDirective, DbxFirebaseStorageFileUploadSyncDirective, DbxFirebaseStorageService, DbxFirebaseSystemStateCollectionStoreDirective, DbxFirebaseSystemStateDocumentStoreDirective, DbxFirestoreContextService, DbxLimitedFirebaseDocumentLoaderInstance, FIREBASE_NOTIFICATION_ITEM_WIDGET_TYPE_PREFIX, FlatFirestoreModelKeyPipe, IMPORTS_AND_EXPORTS, NotificationBoxCollectionStore, NotificationBoxDocumentStore, NotificationCollectionStore, NotificationDocumentStore, NotificationSummaryCollectionStore, NotificationSummaryDocumentStore, NotificationUserCollectionStore, NotificationUserDocumentStore, OAUTH_FIREBASE_LOGIN_METHOD_CATEGORY, StorageFileCollectionStore, StorageFileDocumentStore, StorageFileGroupDocumentStore, StorageFileUploadFilesError, SystemStateCollectionStore, SystemStateDocumentStore, TwoWayFlatFirestoreModelKeyPipe, authRolesObsWithClaimsService, authUserInfoFromAuthUser, authUserStateFromFirebaseAuthServiceFunction, dbxFirebaseAuthContextInfo, dbxFirebaseCollectionChangeTrigger, dbxFirebaseCollectionChangeTriggerForStore, dbxFirebaseCollectionChangeTriggerForWatcher, dbxFirebaseCollectionChangeWatcher, dbxFirebaseCollectionLoaderInstance, dbxFirebaseCollectionLoaderInstanceWithCollection, dbxFirebaseDocumentLoaderInstance, dbxFirebaseDocumentLoaderInstanceWithAccessor, dbxFirebaseDocumentStoreContextModelEntitiesSourceFactory, dbxFirebaseIdRouteParamRedirect, dbxFirebaseInContextFirebaseModelServiceInstance, dbxFirebaseInContextFirebaseModelServiceInstanceFactory, dbxFirebaseKeyRouteParamRedirect, dbxFirebaseModelContextServiceInfoInstanceFactory, dbxFirebaseModelEntityWidgetInjectionConfigFactory, dbxFirebaseModelTypesServiceInstance, dbxFirebaseModelTypesServiceInstancePairForKeysFactory, dbxFirebaseSourceSelectLoadSource, dbxFirebaseStorageFileDownloadServiceCustomSourceFromObs, dbxFirebaseStorageProvidersContextConfigFactory, dbxLimitedFirebaseDocumentLoaderInstance, dbxLimitedFirebaseDocumentLoaderInstanceWithAccessor, dbxWidgetTypeForNotificationTemplateType, defaultDbxFirebaseAuthServiceDelegateWithClaimsService, defaultDbxFirebaseStorageFileDownloadStorageAccessorFactory, developmentFirebaseServerSchedulerWidgetEntry, enableAppCheckDebugTokenGeneration, firebaseAuthTokenFromUser, firebaseCollectionStoreCreateFunction, firebaseCollectionStoreCrudFunction, firebaseContextServiceEntityMap, firebaseDocumentStoreCreateFunction, firebaseDocumentStoreCrudFunction, firebaseDocumentStoreDeleteFunction, firebaseDocumentStoreReadFunction, firebaseDocumentStoreUpdateFunction, isDbxFirebaseModelEntityWithStore, linkDocumentStoreToParentContextStores, modelDoesNotExistError, provideDbxFirebase, provideDbxFirebaseAnalyticsUserEventsListenerService, provideDbxFirebaseApp, provideDbxFirebaseAuth, provideDbxFirebaseCollectionStoreDirective, provideDbxFirebaseCollectionWithParentStoreDirective, provideDbxFirebaseDevelopment, provideDbxFirebaseDocumentStoreContextStore, provideDbxFirebaseDocumentStoreDirective, provideDbxFirebaseDocumentStoreTwoWayKeyProvider, provideDbxFirebaseEmulator, provideDbxFirebaseFunctions, provideDbxFirebaseLogin, provideDbxFirebaseModelContextService, provideDbxFirebaseModelEntitiesWidgetService, provideDbxFirebaseNotifications, provideDbxFirebaseStorageFileService, provideDbxFirestoreCollection, provideNotificationFirestoreCollections, provideStorageFileFirestoreCollections, provideSystemStateFirestoreCollections, providedDbxFirebaseStorage, readDbxAnalyticsUserPropertiesFromAuthUserInfo, readValueFromIdToken, setParentStoreEffect, stateFromTokenForLoggedInUserFunction, storageFileUploadFiles, storageFileUploadHandler };
|
|
7176
7455
|
//# sourceMappingURL=dereekb-dbx-firebase.mjs.map
|