@dereekb/dbx-core 2.1.0 → 3.0.0
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/esm2020/lib/action/action.handler.mjs +3 -125
- package/esm2020/lib/action/action.machine.mjs +8 -7
- package/esm2020/lib/action/action.module.mjs +10 -10
- package/esm2020/lib/action/action.store.mjs +3 -3
- package/esm2020/lib/action/action.store.source.mjs +3 -3
- package/esm2020/lib/action/directive/auto/action.automodify.directive.mjs +4 -4
- package/esm2020/lib/action/directive/auto/action.autotrigger.directive.mjs +7 -6
- package/esm2020/lib/action/directive/context/action.directive.mjs +3 -3
- package/esm2020/lib/action/directive/context/action.source.directive.mjs +3 -3
- package/esm2020/lib/action/directive/debug/action.logger.directive.mjs +3 -3
- package/esm2020/lib/action/directive/map/action.map.directive.mjs +3 -3
- package/esm2020/lib/action/directive/map/action.map.key.directive.mjs +3 -3
- package/esm2020/lib/action/directive/map/action.map.source.directive.mjs +3 -3
- package/esm2020/lib/action/directive/map/action.map.working.disable.directive.mjs +3 -3
- package/esm2020/lib/action/directive/state/action.disabled.directive.mjs +5 -6
- package/esm2020/lib/action/directive/state/action.enforce.modified.directive.mjs +6 -6
- package/esm2020/lib/action/directive/state/action.handler.directive.mjs +10 -9
- package/esm2020/lib/action/directive/state/action.success.directive.mjs +23 -35
- package/esm2020/lib/action/directive/state/action.success.handler.directive.mjs +48 -0
- package/esm2020/lib/action/directive/state/action.value.directive.mjs +8 -8
- package/esm2020/lib/action/directive/state/action.value.stream.directive.mjs +3 -3
- package/esm2020/lib/action/directive/state/action.value.trigger.directive.mjs +6 -6
- package/esm2020/lib/action/directive/state/action.value.trigger.instance.mjs +2 -1
- package/esm2020/lib/action/directive/state/action.working.component.mjs +28 -22
- package/esm2020/lib/action/directive/state/index.mjs +2 -2
- package/esm2020/lib/auth/auth.module.mjs +26 -0
- package/esm2020/lib/auth/auth.role.any.directive.mjs +36 -0
- package/esm2020/lib/auth/auth.role.has.directive.mjs +36 -0
- package/esm2020/lib/auth/auth.state.module.mjs +28 -0
- package/esm2020/lib/auth/auth.state.service.mjs +23 -0
- package/esm2020/lib/auth/auth.user.mjs +11 -0
- package/esm2020/lib/auth/index.mjs +10 -0
- package/esm2020/lib/auth/router/auth.router.mjs +6 -0
- package/esm2020/lib/auth/router/auth.router.module.mjs +26 -0
- package/esm2020/lib/auth/router/auth.router.service.mjs +61 -0
- package/esm2020/lib/auth/router/index.mjs +6 -0
- package/esm2020/lib/auth/router/provider/uirouter/auth.hook.mjs +23 -0
- package/esm2020/lib/auth/router/provider/uirouter/hook.mjs +65 -0
- package/esm2020/lib/auth/router/provider/uirouter/index.mjs +6 -0
- package/esm2020/lib/auth/router/provider/uirouter/redirect.mjs +29 -0
- package/esm2020/lib/auth/router/provider/uirouter/role.hook.mjs +32 -0
- package/esm2020/lib/auth/router/provider/uirouter/state.hook.mjs +53 -0
- package/esm2020/lib/auth/router/state/auth.router.state.module.mjs +32 -0
- package/esm2020/lib/auth/router/state/effect/auth.router.state.effect.mjs +46 -0
- package/esm2020/lib/auth/router/state/effect/index.mjs +2 -0
- package/esm2020/lib/auth/router/state/index.mjs +3 -0
- package/esm2020/lib/auth/service/auth.service.mjs +6 -0
- package/esm2020/lib/auth/service/auth.service.rxjs.mjs +27 -0
- package/esm2020/lib/auth/service/index.mjs +3 -0
- package/esm2020/lib/auth/state/action/auth.action.mjs +14 -0
- package/esm2020/lib/auth/state/action/index.mjs +12 -0
- package/esm2020/lib/auth/state/action/user.action.mjs +18 -0
- package/esm2020/lib/auth/state/effect/auth.effect.mjs +44 -0
- package/esm2020/lib/auth/state/index.mjs +13 -0
- package/esm2020/lib/auth/state/reducer/index.mjs +23 -0
- package/esm2020/lib/auth/state/reducer/user.reducer.mjs +12 -0
- package/esm2020/lib/auth/state/state.mjs +2 -0
- package/esm2020/lib/button/action/action.button.directive.mjs +3 -3
- package/esm2020/lib/button/action/action.button.trigger.directive.mjs +3 -3
- package/esm2020/lib/button/button.directive.mjs +6 -6
- package/esm2020/lib/button/button.loading.directive.mjs +3 -3
- package/esm2020/lib/button/button.mjs +1 -1
- package/esm2020/lib/button/button.module.mjs +4 -4
- package/esm2020/lib/button/router/button.segue.directive.mjs +8 -4
- package/esm2020/lib/context/context.directive.mjs +41 -0
- package/esm2020/lib/context/context.mjs +22 -0
- package/esm2020/lib/context/context.module.mjs +28 -0
- package/esm2020/lib/context/context.service.mjs +29 -0
- package/esm2020/lib/context/index.mjs +6 -0
- package/esm2020/lib/context/state/action/data.action.mjs +10 -0
- package/esm2020/lib/context/state/action/index.mjs +7 -0
- package/esm2020/lib/context/state/effect/index.mjs +38 -0
- package/esm2020/lib/context/state/index.mjs +13 -0
- package/esm2020/lib/context/state/reducer/data.reducer.mjs +16 -0
- package/esm2020/lib/context/state/reducer/index.mjs +25 -0
- package/esm2020/lib/context/state/state.mjs +2 -0
- package/esm2020/lib/filter/action/action.filter.source.directive.mjs +3 -3
- package/esm2020/lib/filter/filter.abstract.connector.directive.mjs +3 -3
- package/esm2020/lib/filter/filter.abstract.source.directive.mjs +4 -4
- package/esm2020/lib/filter/filter.connector.directive.mjs +3 -3
- package/esm2020/lib/filter/filter.map.connector.directive.mjs +3 -3
- package/esm2020/lib/filter/filter.map.directive.mjs +3 -3
- package/esm2020/lib/filter/filter.map.instance.directive.mjs +3 -3
- package/esm2020/lib/filter/filter.map.source.directive.mjs +3 -3
- package/esm2020/lib/filter/filter.module.mjs +4 -4
- package/esm2020/lib/filter/filter.source.directive.mjs +3 -3
- package/esm2020/lib/index.mjs +6 -2
- package/esm2020/lib/injection/index.mjs +9 -0
- package/esm2020/lib/injection/injection.component.mjs +34 -0
- package/esm2020/lib/injection/injection.component.module.mjs +31 -0
- package/esm2020/lib/injection/injection.context.directive.mjs +124 -0
- package/esm2020/lib/injection/injection.context.forward.directive.mjs +30 -0
- package/esm2020/lib/injection/injection.context.mjs +18 -0
- package/esm2020/lib/injection/injection.directive.mjs +33 -0
- package/esm2020/lib/injection/injection.instance.mjs +116 -0
- package/esm2020/lib/injection/injection.mjs +16 -0
- package/esm2020/lib/ngrx/index.mjs +2 -0
- package/esm2020/lib/ngrx/store.lockset.mjs +64 -0
- package/esm2020/lib/pipe/date/date.pipe.module.mjs +4 -4
- package/esm2020/lib/pipe/date/datedistance.pipe.mjs +3 -3
- package/esm2020/lib/pipe/date/dateformatdistance.pipe.mjs +3 -3
- package/esm2020/lib/pipe/date/datefromtoformat.pipe.mjs +3 -3
- package/esm2020/lib/pipe/date/minutesstring.pipe.mjs +3 -3
- package/esm2020/lib/pipe/date/timedistance.pipe.mjs +6 -6
- package/esm2020/lib/pipe/date/tojsdate.pipe.mjs +13 -5
- package/esm2020/lib/pipe/date/tominutes.pipe.mjs +3 -3
- package/esm2020/lib/pipe/index.mjs +3 -1
- package/esm2020/lib/pipe/misc/index.mjs +3 -0
- package/esm2020/lib/pipe/misc/misc.pipe.module.mjs +20 -0
- package/esm2020/lib/pipe/misc/prettyjson.pipe.mjs +27 -0
- package/esm2020/lib/pipe/pipe.module.mjs +21 -0
- package/esm2020/lib/router/anchor/anchor.directive.mjs +18 -5
- package/esm2020/lib/router/anchor/anchor.mjs +1 -1
- package/esm2020/lib/router/router/provider/angular/angular.router.service.mjs +8 -5
- package/esm2020/lib/router/router/provider/angular/angular.router.service.module.mjs +4 -4
- package/esm2020/lib/router/router/provider/uirouter/uirouter.router.service.mjs +32 -10
- package/esm2020/lib/router/router/provider/uirouter/uirouter.router.service.module.mjs +4 -4
- package/esm2020/lib/router/router/service/index.mjs +2 -1
- package/esm2020/lib/router/router/service/router.go.mjs +14 -0
- package/esm2020/lib/router/router/service/router.service.mjs +1 -1
- package/esm2020/lib/router/router/transition/transition.directive.mjs +7 -7
- package/esm2020/lib/router/router/transition/transition.watcher.directive.mjs +6 -6
- package/esm2020/lib/router/segue.mjs +17 -2
- package/esm2020/lib/storage/storage.accessor.simple.factory.mjs +3 -3
- package/esm2020/lib/storage/storage.module.mjs +4 -4
- package/esm2020/lib/subscription/subscription.directive.mjs +6 -6
- package/esm2020/lib/util/view.mjs +18 -2
- package/esm2020/lib/view/if.directive.mjs +30 -0
- package/esm2020/lib/view/index.mjs +2 -0
- package/fesm2015/dereekb-dbx-core.mjs +1672 -575
- package/fesm2015/dereekb-dbx-core.mjs.map +1 -1
- package/fesm2020/dereekb-dbx-core.mjs +1682 -585
- package/fesm2020/dereekb-dbx-core.mjs.map +1 -1
- package/lib/action/action.handler.d.ts +4 -72
- package/lib/action/action.module.d.ts +3 -3
- package/lib/action/directive/auto/action.automodify.directive.d.ts +1 -1
- package/lib/action/directive/auto/action.autotrigger.directive.d.ts +3 -3
- package/lib/action/directive/state/action.disabled.directive.d.ts +1 -1
- package/lib/action/directive/state/action.enforce.modified.directive.d.ts +3 -2
- package/lib/action/directive/state/action.success.directive.d.ts +9 -17
- package/lib/action/directive/state/action.success.handler.directive.d.ts +24 -0
- package/lib/action/directive/state/action.value.directive.d.ts +5 -5
- package/lib/action/directive/state/action.value.trigger.instance.d.ts +2 -2
- package/lib/action/directive/state/action.working.component.d.ts +11 -5
- package/lib/action/directive/state/index.d.ts +1 -1
- package/lib/auth/auth.module.d.ts +8 -0
- package/lib/auth/auth.role.any.directive.d.ts +20 -0
- package/lib/auth/auth.role.has.directive.d.ts +20 -0
- package/lib/auth/auth.state.module.d.ts +8 -0
- package/lib/auth/auth.state.service.d.ts +13 -0
- package/lib/auth/auth.user.d.ts +28 -0
- package/lib/auth/index.d.ts +9 -0
- package/lib/auth/router/auth.router.d.ts +10 -0
- package/lib/auth/router/auth.router.module.d.ts +9 -0
- package/lib/auth/router/auth.router.service.d.ts +38 -0
- package/lib/auth/router/index.d.ts +5 -0
- package/lib/auth/router/provider/uirouter/auth.hook.d.ts +18 -0
- package/lib/auth/router/provider/uirouter/hook.d.ts +46 -0
- package/lib/auth/router/provider/uirouter/index.d.ts +5 -0
- package/lib/auth/router/provider/uirouter/redirect.d.ts +9 -0
- package/lib/auth/router/provider/uirouter/role.hook.d.ts +26 -0
- package/lib/auth/router/provider/uirouter/state.hook.d.ts +31 -0
- package/lib/auth/router/state/auth.router.state.module.d.ts +14 -0
- package/lib/auth/router/state/effect/auth.router.state.effect.d.ts +32 -0
- package/lib/auth/router/state/effect/index.d.ts +1 -0
- package/lib/auth/router/state/index.d.ts +2 -0
- package/lib/auth/service/auth.service.d.ts +46 -0
- package/lib/auth/service/auth.service.rxjs.d.ts +18 -0
- package/lib/auth/service/index.d.ts +2 -0
- package/lib/auth/state/action/auth.action.d.ts +12 -0
- package/lib/auth/state/action/index.d.ts +11 -0
- package/lib/auth/state/action/user.action.d.ts +34 -0
- package/lib/auth/state/effect/auth.effect.d.ts +31 -0
- package/lib/auth/state/index.d.ts +12 -0
- package/lib/auth/state/reducer/index.d.ts +29 -0
- package/lib/auth/state/reducer/user.reducer.d.ts +11 -0
- package/lib/auth/state/state.d.ts +5 -0
- package/lib/button/button.d.ts +3 -3
- package/lib/button/router/button.segue.directive.d.ts +1 -0
- package/lib/context/context.d.ts +39 -0
- package/lib/context/context.directive.d.ts +19 -0
- package/lib/context/context.module.d.ts +8 -0
- package/lib/context/context.service.d.ts +16 -0
- package/lib/context/index.d.ts +5 -0
- package/lib/context/state/action/data.action.d.ts +13 -0
- package/lib/context/state/action/index.d.ts +6 -0
- package/lib/context/state/effect/index.d.ts +39 -0
- package/lib/context/state/index.d.ts +12 -0
- package/lib/context/state/reducer/data.reducer.d.ts +13 -0
- package/lib/context/state/reducer/index.d.ts +34 -0
- package/lib/context/state/state.d.ts +9 -0
- package/lib/filter/filter.abstract.source.directive.d.ts +2 -2
- package/lib/index.d.ts +5 -1
- package/lib/injection/index.d.ts +8 -0
- package/lib/injection/injection.component.d.ts +15 -0
- package/lib/injection/injection.component.module.d.ts +9 -0
- package/lib/injection/injection.context.d.ts +39 -0
- package/lib/injection/injection.context.directive.d.ts +25 -0
- package/lib/injection/injection.context.forward.directive.d.ts +16 -0
- package/lib/{injected/injected.d.ts → injection/injection.d.ts} +4 -4
- package/lib/injection/injection.directive.d.ts +19 -0
- package/lib/{injected/injected.instance.d.ts → injection/injection.instance.d.ts} +8 -8
- package/lib/ngrx/index.d.ts +1 -0
- package/lib/ngrx/store.lockset.d.ts +36 -0
- package/lib/pipe/index.d.ts +2 -0
- package/lib/pipe/misc/index.d.ts +2 -0
- package/lib/pipe/misc/misc.pipe.module.d.ts +7 -0
- package/lib/pipe/misc/prettyjson.pipe.d.ts +9 -0
- package/lib/pipe/pipe.module.d.ts +8 -0
- package/lib/router/anchor/anchor.d.ts +5 -1
- package/lib/router/anchor/anchor.directive.d.ts +10 -2
- package/lib/router/router/provider/angular/angular.router.service.d.ts +7 -5
- package/lib/router/router/provider/uirouter/uirouter.router.service.d.ts +11 -5
- package/lib/router/router/service/index.d.ts +1 -0
- package/lib/router/router/service/router.go.d.ts +14 -0
- package/lib/router/router/service/router.service.d.ts +10 -4
- package/lib/router/router/transition/transition.directive.d.ts +2 -2
- package/lib/router/router/transition/transition.watcher.directive.d.ts +1 -1
- package/lib/router/segue.d.ts +10 -3
- package/lib/util/view.d.ts +12 -0
- package/lib/view/if.directive.d.ts +19 -0
- package/lib/view/index.d.ts +1 -0
- package/package.json +6 -13
- package/esm2020/lib/action/directive/state/action.success.component.mjs +0 -50
- package/esm2020/lib/injected/index.mjs +0 -6
- package/esm2020/lib/injected/injected.component.mjs +0 -34
- package/esm2020/lib/injected/injected.component.module.mjs +0 -26
- package/esm2020/lib/injected/injected.directive.mjs +0 -33
- package/esm2020/lib/injected/injected.instance.mjs +0 -116
- package/esm2020/lib/injected/injected.mjs +0 -16
- package/lib/action/directive/state/action.success.component.d.ts +0 -15
- package/lib/injected/index.d.ts +0 -5
- package/lib/injected/injected.component.d.ts +0 -15
- package/lib/injected/injected.component.module.d.ts +0 -8
- package/lib/injected/injected.directive.d.ts +0 -19
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
+
import { ArrayOrValue } from '@dereekb/util';
|
|
3
|
+
import { DbxAppContextState } from '../../../context';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "@ngrx/effects";
|
|
6
|
+
export interface DbxAppAuthRouterStateModuleConfig {
|
|
7
|
+
readonly activeRoutesToApplyEffects: ArrayOrValue<DbxAppContextState>;
|
|
8
|
+
}
|
|
9
|
+
export declare class DbxAppAuthRouterStateModule {
|
|
10
|
+
static forRoot(config: DbxAppAuthRouterStateModuleConfig): ModuleWithProviders<DbxAppAuthRouterStateModule>;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxAppAuthRouterStateModule, never>;
|
|
12
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DbxAppAuthRouterStateModule, never, [typeof i1.EffectsFeatureModule], never>;
|
|
13
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DbxAppAuthRouterStateModule>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
import { ArrayOrValue, Maybe } from '@dereekb/util';
|
|
3
|
+
import { Actions } from '@ngrx/effects';
|
|
4
|
+
import { Store } from '@ngrx/store';
|
|
5
|
+
import { DbxAppContextState } from '../../../../context/context';
|
|
6
|
+
import { AbstractOnDbxAppContextStateEffects } from '../../../../context/state/effect';
|
|
7
|
+
import { fromDbxAppAuth } from '../../../state';
|
|
8
|
+
import { DbxAppAuthRouterService } from '../../auth.router.service';
|
|
9
|
+
import * as i0 from "@angular/core";
|
|
10
|
+
/**
|
|
11
|
+
* Used by DbxAppAuthRouterEffects to configure the states that should be activve by default.
|
|
12
|
+
*/
|
|
13
|
+
export declare const DBX_APP_AUTH_ROUTER_EFFECTS_TOKEN: InjectionToken<unknown>;
|
|
14
|
+
/**
|
|
15
|
+
* Set of ngrx effects that handle navigation in the app when the auth changes in certain ways.
|
|
16
|
+
*
|
|
17
|
+
* Is configurable via the DBX_APP_AUTH_ROUTER_EFFECTS_TOKEN to choose which states this effect is active or not. By default is equal to DBX_KNOWN_APP_CONTEXT_STATES.
|
|
18
|
+
*/
|
|
19
|
+
export declare class DbxAppAuthRouterEffects extends AbstractOnDbxAppContextStateEffects<fromDbxAppAuth.State> {
|
|
20
|
+
readonly dbxAppAuthRouterService: DbxAppAuthRouterService;
|
|
21
|
+
constructor(activeStates: Maybe<ArrayOrValue<DbxAppContextState>>, actions$: Actions, store: Store<fromDbxAppAuth.State>, dbxAppAuthRouterService: DbxAppAuthRouterService);
|
|
22
|
+
/**
|
|
23
|
+
* Effect to redirect to the login when logout occurs.
|
|
24
|
+
*/
|
|
25
|
+
readonly redirectToLoginOnLogout: import("rxjs").Observable<boolean> & import("@ngrx/effects").CreateEffectMetadata;
|
|
26
|
+
/**
|
|
27
|
+
* Effect to redirect to the app when login occurs.
|
|
28
|
+
*/
|
|
29
|
+
readonly redirectToOnboardOnLogIn: import("rxjs").Observable<boolean> & import("@ngrx/effects").CreateEffectMetadata;
|
|
30
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxAppAuthRouterEffects, [{ optional: true; }, null, null, null]>;
|
|
31
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DbxAppAuthRouterEffects>;
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './auth.router.state.effect';
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { AuthRoleSet } from '@dereekb/util';
|
|
3
|
+
import { AuthUserIdentifier, AuthUserState } from '../auth.user';
|
|
4
|
+
/**
|
|
5
|
+
* Client auth service used to retrieve info about the current state of client authentication and client roles they may have.
|
|
6
|
+
*/
|
|
7
|
+
export declare abstract class DbxAuthService {
|
|
8
|
+
/**
|
|
9
|
+
* Whether or not the user is logged in.
|
|
10
|
+
*
|
|
11
|
+
* This will only emit once the authentication has been determined, preventing issues with premature decision making.
|
|
12
|
+
*
|
|
13
|
+
* A user is considered logged in even if there is an anonymous user. For more detailed info, consider using authUserState$.
|
|
14
|
+
*/
|
|
15
|
+
abstract readonly isLoggedIn$: Observable<boolean>;
|
|
16
|
+
/**
|
|
17
|
+
* Whether or not the user has finished onboarding.
|
|
18
|
+
*
|
|
19
|
+
* This will only emit once the onboarding status has been determined, preventing issues with premature decision making.
|
|
20
|
+
*/
|
|
21
|
+
abstract readonly isOnboarded$: Observable<boolean>;
|
|
22
|
+
/**
|
|
23
|
+
* Emits an event every time the user logs in.
|
|
24
|
+
*/
|
|
25
|
+
abstract readonly onLogIn$: Observable<void>;
|
|
26
|
+
/**
|
|
27
|
+
* Emits an event every time the user logs out.
|
|
28
|
+
*/
|
|
29
|
+
abstract readonly onLogOut$: Observable<void>;
|
|
30
|
+
/**
|
|
31
|
+
* Current state of the user.
|
|
32
|
+
*/
|
|
33
|
+
abstract readonly authUserState$: Observable<AuthUserState>;
|
|
34
|
+
/**
|
|
35
|
+
* Role set for the current user.
|
|
36
|
+
*/
|
|
37
|
+
abstract readonly authRoles$: Observable<AuthRoleSet>;
|
|
38
|
+
/**
|
|
39
|
+
* Identifier for the current user.
|
|
40
|
+
*/
|
|
41
|
+
abstract readonly userIdentifier$: Observable<AuthUserIdentifier>;
|
|
42
|
+
/**
|
|
43
|
+
* Performs the logout action.
|
|
44
|
+
*/
|
|
45
|
+
abstract logOut(): Promise<void>;
|
|
46
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AuthRole, AuthRoleSet, Maybe } from '@dereekb/util';
|
|
2
|
+
import { Observable, OperatorFunction } from 'rxjs';
|
|
3
|
+
/**
|
|
4
|
+
* Convenience operator that emits events when the input observable goes from false to true.
|
|
5
|
+
*
|
|
6
|
+
* @param isLoggedInObs
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
export declare function loggedInObsFromIsLoggedIn(isLoggedInObs: Observable<boolean>): Observable<void>;
|
|
10
|
+
/**
|
|
11
|
+
* Convenience operator that emits events when the input observable goes from true to false.
|
|
12
|
+
*
|
|
13
|
+
* @param isLoggedInObs
|
|
14
|
+
* @returns
|
|
15
|
+
*/
|
|
16
|
+
export declare function loggedOutObsFromIsLoggedIn(isLoggedInObs: Observable<boolean>): Observable<void>;
|
|
17
|
+
export declare function authRolesSetContainsAllRolesFrom(roles: Observable<Maybe<Iterable<AuthRole>>>): OperatorFunction<AuthRoleSet, boolean>;
|
|
18
|
+
export declare function authRolesSetContainsAnyRoleFrom(roles: Observable<Maybe<Iterable<AuthRole>>>): OperatorFunction<AuthRoleSet, boolean>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Action for when the user has logged in.
|
|
3
|
+
*/
|
|
4
|
+
export declare const loggedIn: import("@ngrx/store").ActionCreator<"[App/Auth] Auth Logged In", () => import("@ngrx/store/src/models").TypedAction<"[App/Auth] Auth Logged In">>;
|
|
5
|
+
/**
|
|
6
|
+
* Action for when the user has logged out.
|
|
7
|
+
*/
|
|
8
|
+
export declare const loggedOut: import("@ngrx/store").ActionCreator<"[App/Auth] Auth Logged Out", () => import("@ngrx/store/src/models").TypedAction<"[App/Auth] Auth Logged Out">>;
|
|
9
|
+
/**
|
|
10
|
+
* Action to log the user out.
|
|
11
|
+
*/
|
|
12
|
+
export declare const logout: import("@ngrx/store").ActionCreator<"[App/Auth] Auth Logout", () => import("@ngrx/store/src/models").TypedAction<"[App/Auth] Auth Logout">>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as DbxAppAuthActions from './auth.action';
|
|
2
|
+
import * as DbxAppAuthUserActions from './user.action';
|
|
3
|
+
export {
|
|
4
|
+
/**
|
|
5
|
+
* Actions related to the auth state.
|
|
6
|
+
*/
|
|
7
|
+
DbxAppAuthActions,
|
|
8
|
+
/**
|
|
9
|
+
* Actions related to the user.
|
|
10
|
+
*/
|
|
11
|
+
DbxAppAuthUserActions };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { AuthRole } from '@dereekb/util';
|
|
2
|
+
import { AuthUserIdentifier, AuthUserState } from '../../auth.user';
|
|
3
|
+
/**
|
|
4
|
+
* Sets the user's identifier in the auth.
|
|
5
|
+
*/
|
|
6
|
+
export declare const setUserIdentifier: import("@ngrx/store").ActionCreator<"[App/Auth] Set User Identifier", (props: {
|
|
7
|
+
id: AuthUserIdentifier;
|
|
8
|
+
}) => {
|
|
9
|
+
id: AuthUserIdentifier;
|
|
10
|
+
} & import("@ngrx/store/src/models").TypedAction<"[App/Auth] Set User Identifier">>;
|
|
11
|
+
/**
|
|
12
|
+
* Sets the user's state in the auth.
|
|
13
|
+
*/
|
|
14
|
+
export declare const setUserState: import("@ngrx/store").ActionCreator<"[App/Auth] Set User State", (props: {
|
|
15
|
+
state: AuthUserState;
|
|
16
|
+
}) => {
|
|
17
|
+
state: AuthUserState;
|
|
18
|
+
} & import("@ngrx/store/src/models").TypedAction<"[App/Auth] Set User State">>;
|
|
19
|
+
/**
|
|
20
|
+
* Sets the user's roles in the auth.
|
|
21
|
+
*/
|
|
22
|
+
export declare const setUserRoles: import("@ngrx/store").ActionCreator<"[App/Auth] Set User Roles", (props: {
|
|
23
|
+
roles: AuthRole[];
|
|
24
|
+
}) => {
|
|
25
|
+
roles: AuthRole[];
|
|
26
|
+
} & import("@ngrx/store/src/models").TypedAction<"[App/Auth] Set User Roles">>;
|
|
27
|
+
/**
|
|
28
|
+
* Sets the user's onboarding state.
|
|
29
|
+
*/
|
|
30
|
+
export declare const setUserIsOnboarded: import("@ngrx/store").ActionCreator<"[App/Auth] Set User Is Onboarded", (props: {
|
|
31
|
+
isOnboarded: boolean;
|
|
32
|
+
}) => {
|
|
33
|
+
isOnboarded: boolean;
|
|
34
|
+
} & import("@ngrx/store/src/models").TypedAction<"[App/Auth] Set User Is Onboarded">>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Actions } from '@ngrx/effects';
|
|
2
|
+
import { Store } from '@ngrx/store';
|
|
3
|
+
import { DbxAuthService } from '../../service';
|
|
4
|
+
import * as fromDbxAppAuth from '../reducer';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
/**
|
|
7
|
+
* Set of ngrx effects that repeat events from DbxAuthService.
|
|
8
|
+
*/
|
|
9
|
+
export declare class DbxAppAuthEffects {
|
|
10
|
+
private readonly actions$;
|
|
11
|
+
private readonly store;
|
|
12
|
+
private readonly dbxAuthService;
|
|
13
|
+
constructor(actions$: Actions, store: Store<fromDbxAppAuth.State>, dbxAuthService: DbxAuthService);
|
|
14
|
+
readonly emitLoggedIn: import("rxjs").Observable<import("@ngrx/store/src/models").TypedAction<"[App/Auth] Auth Logged In">> & import("@ngrx/effects").CreateEffectMetadata;
|
|
15
|
+
readonly emitLoggedOut: import("rxjs").Observable<import("@ngrx/store/src/models").TypedAction<"[App/Auth] Auth Logged Out">> & import("@ngrx/effects").CreateEffectMetadata;
|
|
16
|
+
readonly forwardLogoutToAuthService: import("rxjs").Observable<import("@ngrx/store/src/models").TypedAction<"[App/Auth] Auth Logout">> & import("@ngrx/effects").CreateEffectMetadata;
|
|
17
|
+
readonly setUserIdentifier: import("rxjs").Observable<{
|
|
18
|
+
id: string;
|
|
19
|
+
} & import("@ngrx/store/src/models").TypedAction<"[App/Auth] Set User Identifier">> & import("@ngrx/effects").CreateEffectMetadata;
|
|
20
|
+
readonly setUserState: import("rxjs").Observable<{
|
|
21
|
+
state: import("@dereekb/dbx-core").AuthUserState;
|
|
22
|
+
} & import("@ngrx/store/src/models").TypedAction<"[App/Auth] Set User State">> & import("@ngrx/effects").CreateEffectMetadata;
|
|
23
|
+
readonly setUserRoles: import("rxjs").Observable<{
|
|
24
|
+
roles: string[];
|
|
25
|
+
} & import("@ngrx/store/src/models").TypedAction<"[App/Auth] Set User Roles">> & import("@ngrx/effects").CreateEffectMetadata;
|
|
26
|
+
readonly setUserIsOnboarded: import("rxjs").Observable<{
|
|
27
|
+
isOnboarded: boolean;
|
|
28
|
+
} & import("@ngrx/store/src/models").TypedAction<"[App/Auth] Set User Is Onboarded">> & import("@ngrx/effects").CreateEffectMetadata;
|
|
29
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxAppAuthEffects, never>;
|
|
30
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DbxAppAuthEffects>;
|
|
31
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as fromDbxAppAuth from './reducer';
|
|
2
|
+
import * as onDbxAppAuth from './action';
|
|
3
|
+
export * from './state';
|
|
4
|
+
export {
|
|
5
|
+
/**
|
|
6
|
+
* Accessor for the DbxAppAuthFeatureState reducers.
|
|
7
|
+
*/
|
|
8
|
+
fromDbxAppAuth,
|
|
9
|
+
/**
|
|
10
|
+
* Accessor for the DbxAppAuthFeatureState actions.
|
|
11
|
+
*/
|
|
12
|
+
onDbxAppAuth };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Action } from '@ngrx/store';
|
|
2
|
+
import * as fromDbxAppAuthUserState from './user.reducer';
|
|
3
|
+
/**
|
|
4
|
+
* Global feature key
|
|
5
|
+
*/
|
|
6
|
+
export declare const featureKey = "app.auth";
|
|
7
|
+
export interface DbxAppAuthFeatureState {
|
|
8
|
+
[fromDbxAppAuthUserState.dbxAppAuthUserFeatureKey]: fromDbxAppAuthUserState.DbxAppAuthStateUser;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Interface typing extension for the DbxAppAuthFeatureState, and the typing information for how this feature extends the base state.
|
|
12
|
+
*/
|
|
13
|
+
export interface State {
|
|
14
|
+
[featureKey]: DbxAppAuthFeatureState;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Reducers mapping for the DbxAppAuthFeatureState
|
|
18
|
+
*/
|
|
19
|
+
export declare function reducers(state: DbxAppAuthFeatureState | undefined, action: Action): {
|
|
20
|
+
user: fromDbxAppAuthUserState.DbxAppAuthStateUser;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Selects the DbxAppAuthFeatureState feature context.
|
|
24
|
+
*/
|
|
25
|
+
export declare const selectAppAuthFeature: import("@ngrx/store").MemoizedSelector<object, DbxAppAuthFeatureState, import("@ngrx/store").DefaultProjectorFn<DbxAppAuthFeatureState>>;
|
|
26
|
+
/**
|
|
27
|
+
* Selector to retrieve the state value from our DbxAppContextStateData in our DbxAppContextFeatureState.
|
|
28
|
+
*/
|
|
29
|
+
export declare const selectDbxAppAuthUser: import("@ngrx/store").MemoizedSelector<object, fromDbxAppAuthUserState.DbxAppAuthStateUser, import("@ngrx/store").DefaultProjectorFn<fromDbxAppAuthUserState.DbxAppAuthStateUser>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AuthUserIdentifier, AuthUserState } from '../../auth.user';
|
|
2
|
+
import { AuthRole } from '@dereekb/util';
|
|
3
|
+
export declare const dbxAppAuthUserFeatureKey = "user";
|
|
4
|
+
export interface DbxAppAuthStateUser {
|
|
5
|
+
userId: AuthUserIdentifier;
|
|
6
|
+
isOnboarded: boolean;
|
|
7
|
+
userState: AuthUserState;
|
|
8
|
+
userRoles: AuthRole[];
|
|
9
|
+
}
|
|
10
|
+
export declare const initialState: DbxAppAuthStateUser;
|
|
11
|
+
export declare const reducer: import("@ngrx/store").ActionReducer<DbxAppAuthStateUser, import("@ngrx/store").Action>;
|
package/lib/button/button.d.ts
CHANGED
|
@@ -13,13 +13,13 @@ export interface DbxButtonInterceptor {
|
|
|
13
13
|
interceptButtonClick: () => Observable<boolean>;
|
|
14
14
|
}
|
|
15
15
|
export declare abstract class DbxButton {
|
|
16
|
-
abstract disabled$: Observable<boolean>;
|
|
17
|
-
abstract working$: Observable<boolean>;
|
|
16
|
+
abstract readonly disabled$: Observable<boolean>;
|
|
17
|
+
abstract readonly working$: Observable<boolean>;
|
|
18
18
|
abstract disabled: Maybe<boolean>;
|
|
19
19
|
abstract working: Maybe<boolean>;
|
|
20
20
|
abstract icon?: Maybe<string>;
|
|
21
21
|
abstract text?: Maybe<string>;
|
|
22
|
-
abstract clicked$: Observable<any>;
|
|
22
|
+
abstract readonly clicked$: Observable<any>;
|
|
23
23
|
abstract setButtonInterceptor(interceptor: DbxButtonInterceptor): void;
|
|
24
24
|
abstract clickButton(): void;
|
|
25
25
|
}
|
|
@@ -13,6 +13,7 @@ export declare class DbxButtonSegueDirective extends AbstractSubscriptionDirecti
|
|
|
13
13
|
set segueRef(segueRef: Maybe<SegueRef>);
|
|
14
14
|
constructor(dbxButton: DbxButton, dbxRouterService: DbxRouterService);
|
|
15
15
|
ngOnInit(): void;
|
|
16
|
+
ngOnDestroy(): void;
|
|
16
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxButtonSegueDirective, never>;
|
|
17
18
|
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxButtonSegueDirective, "[dbxButtonSegue]", never, { "segueRef": "dbxButtonSegue"; }, {}, never>;
|
|
18
19
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A contextual state identifier for a specific section of the app.
|
|
3
|
+
*
|
|
4
|
+
* Some examples are:
|
|
5
|
+
* - init: The default context that is initialized.
|
|
6
|
+
* - public: A public part of the app.
|
|
7
|
+
* - onboarding: The onboarding section of the app.
|
|
8
|
+
* - app: The main portion of the app.
|
|
9
|
+
*
|
|
10
|
+
* More complex apps may have more sub-sections or app portions that could each have their own context state.
|
|
11
|
+
*/
|
|
12
|
+
export declare type DbxAppContextState = string;
|
|
13
|
+
export declare const DBX_INIT_APP_CONTEXT_STATE = "init";
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
export declare const DBX_PUBLIC_APP_CONTEXT_STATE = "public";
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
export declare const DBX_AUTH_APP_CONTEXT_STATE = "auth";
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
export declare const DBX_ONBOARDING_APP_CONTEXT_STATE = "onboarding";
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
export declare const DBX_APP_APP_CONTEXT_STATE = "app";
|
|
30
|
+
/**
|
|
31
|
+
* Default AppContextStates.
|
|
32
|
+
*
|
|
33
|
+
* Your app may not use these, but this type is available for convenience.
|
|
34
|
+
*/
|
|
35
|
+
export declare type DbxKnownAppContextState = typeof DBX_INIT_APP_CONTEXT_STATE | typeof DBX_PUBLIC_APP_CONTEXT_STATE | typeof DBX_AUTH_APP_CONTEXT_STATE | typeof DBX_ONBOARDING_APP_CONTEXT_STATE | typeof DBX_APP_APP_CONTEXT_STATE;
|
|
36
|
+
/**
|
|
37
|
+
* Array of all DbxKnownAppContextState values, minus the init state.
|
|
38
|
+
*/
|
|
39
|
+
export declare const DBX_KNOWN_APP_CONTEXT_STATES: DbxKnownAppContextState[];
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { OnDestroy, OnInit } from "@angular/core";
|
|
2
|
+
import { DbxAppContextService } from "./context.service";
|
|
3
|
+
import { AbstractSubscriptionDirective } from '../subscription';
|
|
4
|
+
import { DbxAppContextState } from './context';
|
|
5
|
+
import { Maybe } from '@dereekb/util';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
/**
|
|
8
|
+
* Used to set the DbxAppContextState for an app to the input state using the DbxAppContextService.
|
|
9
|
+
*/
|
|
10
|
+
export declare class DbxAppContextStateDirective extends AbstractSubscriptionDirective implements OnInit, OnDestroy {
|
|
11
|
+
readonly dbxAppContextStateService: DbxAppContextService;
|
|
12
|
+
private _state;
|
|
13
|
+
constructor(dbxAppContextStateService: DbxAppContextService);
|
|
14
|
+
ngOnInit(): void;
|
|
15
|
+
ngOnDestroy(): void;
|
|
16
|
+
set state(state: Maybe<DbxAppContextState>);
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxAppContextStateDirective, never>;
|
|
18
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxAppContextStateDirective, "[dbxAppContextState]", never, { "state": "dbxAppContextState"; }, {}, never>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./context.directive";
|
|
3
|
+
import * as i2 from "@ngrx/store";
|
|
4
|
+
export declare class DbxAppContextStateModule {
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxAppContextStateModule, never>;
|
|
6
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DbxAppContextStateModule, [typeof i1.DbxAppContextStateDirective], [typeof i2.StoreFeatureModule], [typeof i1.DbxAppContextStateDirective]>;
|
|
7
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DbxAppContextStateModule>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Store } from "@ngrx/store";
|
|
2
|
+
import { DbxAppContextState } from './context';
|
|
3
|
+
import { DbxAppContextFullState } from "./state/state";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* State for accessing the app's DbxAppContextState defined within the DbxAppContextFullState for the ngrx store.
|
|
7
|
+
*/
|
|
8
|
+
export declare class DbxAppContextService {
|
|
9
|
+
readonly store: Store<DbxAppContextFullState>;
|
|
10
|
+
readonly state$: import("rxjs").Observable<string>;
|
|
11
|
+
constructor(store: Store<DbxAppContextFullState>);
|
|
12
|
+
setState(state: DbxAppContextState): void;
|
|
13
|
+
resetState(): void;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxAppContextService, never>;
|
|
15
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DbxAppContextService>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DbxAppContextState } from '../../context';
|
|
2
|
+
/**
|
|
3
|
+
* Action to set the current DbxAppContextState value.
|
|
4
|
+
*/
|
|
5
|
+
export declare const setState: import("@ngrx/store").ActionCreator<"[App/Context] Set State", (props: {
|
|
6
|
+
state: DbxAppContextState;
|
|
7
|
+
}) => {
|
|
8
|
+
state: DbxAppContextState;
|
|
9
|
+
} & import("@ngrx/store/src/models").TypedAction<"[App/Context] Set State">>;
|
|
10
|
+
/**
|
|
11
|
+
* Resets the app back to the init context.
|
|
12
|
+
*/
|
|
13
|
+
export declare const resetState: import("@ngrx/store").ActionCreator<"[App/Context] Reset", () => import("@ngrx/store/src/models").TypedAction<"[App/Context] Reset">>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { OnRunEffects, Actions, EffectNotification } from '@ngrx/effects';
|
|
2
|
+
import { Store } from '@ngrx/store';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import { DbxAppContextState } from '../../context';
|
|
5
|
+
import { ArrayOrValue } from '@dereekb/util';
|
|
6
|
+
/**
|
|
7
|
+
* Abstract effects class that only runs/allows effects when the DbxAppContextState in the ngrx state matches input activeState value.
|
|
8
|
+
*/
|
|
9
|
+
export declare abstract class AbstractOnDbxAppContextStateEffects<S = any> implements OnRunEffects {
|
|
10
|
+
/**
|
|
11
|
+
* ngrx Actions
|
|
12
|
+
*/
|
|
13
|
+
protected readonly actions$: Actions;
|
|
14
|
+
/**
|
|
15
|
+
* ngrx Store
|
|
16
|
+
*/
|
|
17
|
+
protected readonly store: Store<S>;
|
|
18
|
+
private _activeStatesSet;
|
|
19
|
+
constructor(
|
|
20
|
+
/**
|
|
21
|
+
* The state(s) to activate on.
|
|
22
|
+
*/
|
|
23
|
+
activeStates: ArrayOrValue<DbxAppContextState>,
|
|
24
|
+
/**
|
|
25
|
+
* ngrx Actions
|
|
26
|
+
*/
|
|
27
|
+
actions$: Actions,
|
|
28
|
+
/**
|
|
29
|
+
* ngrx Store
|
|
30
|
+
*/
|
|
31
|
+
store: Store<S>);
|
|
32
|
+
/**
|
|
33
|
+
* Configures all actions of the sub-class to only activate when the DbxAppContextState in App
|
|
34
|
+
*
|
|
35
|
+
* @param resolvedEffects$
|
|
36
|
+
* @returns
|
|
37
|
+
*/
|
|
38
|
+
ngrxOnRunEffects(resolvedEffects$: Observable<EffectNotification>): Observable<EffectNotification>;
|
|
39
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as fromDbxAppContext from './reducer';
|
|
2
|
+
import * as onDbxAppContext from './action';
|
|
3
|
+
export * from './state';
|
|
4
|
+
export {
|
|
5
|
+
/**
|
|
6
|
+
* Accessor for the DbxAppContextFeatureState reducers.
|
|
7
|
+
*/
|
|
8
|
+
fromDbxAppContext,
|
|
9
|
+
/**
|
|
10
|
+
* Accessor for the DbxAppContextFeatureState actions.
|
|
11
|
+
*/
|
|
12
|
+
onDbxAppContext };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DbxAppContextState } from '../../context';
|
|
2
|
+
/**
|
|
3
|
+
* The feature key for these items/reducers.
|
|
4
|
+
*/
|
|
5
|
+
export declare const dbxAppContextStateFeatureKey = "data";
|
|
6
|
+
/**
|
|
7
|
+
* The typings for this feature.
|
|
8
|
+
*/
|
|
9
|
+
export interface DbxAppContextStateData {
|
|
10
|
+
state: DbxAppContextState;
|
|
11
|
+
}
|
|
12
|
+
export declare const initialState: DbxAppContextStateData;
|
|
13
|
+
export declare const reducer: import("@ngrx/store").ActionReducer<DbxAppContextStateData, import("@ngrx/store").Action>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Action } from '@ngrx/store';
|
|
2
|
+
import * as fromDbxAppContextState from './data.reducer';
|
|
3
|
+
/**
|
|
4
|
+
* Global feature key for our app.
|
|
5
|
+
*/
|
|
6
|
+
export declare const featureKey = "app.context";
|
|
7
|
+
/**
|
|
8
|
+
* This is a "feature state", which in this case is a single feature (our app state), but could include keys/states within this feature.
|
|
9
|
+
*/
|
|
10
|
+
export interface DbxAppContextFeatureState {
|
|
11
|
+
[fromDbxAppContextState.dbxAppContextStateFeatureKey]: fromDbxAppContextState.DbxAppContextStateData;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Interface typing extension for the DbxAppContextFeatureState, and the typing information for how this feature extends the base state.
|
|
15
|
+
*/
|
|
16
|
+
export interface State {
|
|
17
|
+
[featureKey]: DbxAppContextFeatureState;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Reducers mapping for the DbxAppContextFeatureState
|
|
21
|
+
*/
|
|
22
|
+
export declare function reducers(state: DbxAppContextFeatureState | undefined, action: Action): {
|
|
23
|
+
data: fromDbxAppContextState.DbxAppContextStateData;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Selects the DbxAppContextFeatureState feature context.
|
|
27
|
+
*
|
|
28
|
+
* Used by createSelector() to retrieve more specific data from the DbxAppContextFeatureState.
|
|
29
|
+
*/
|
|
30
|
+
export declare const selectAppContextFeature: import("@ngrx/store").MemoizedSelector<object, DbxAppContextFeatureState, import("@ngrx/store").DefaultProjectorFn<DbxAppContextFeatureState>>;
|
|
31
|
+
/**
|
|
32
|
+
* Selector to retrieve the state value from our DbxAppContextStateData in our DbxAppContextFeatureState.
|
|
33
|
+
*/
|
|
34
|
+
export declare const selectDbxAppContextState: import("@ngrx/store").MemoizedSelector<object, string, import("@ngrx/store").DefaultProjectorFn<string>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as fromDbxAppContext from './reducer';
|
|
2
|
+
/**
|
|
3
|
+
* Type that contains the dbx-core contextual ngrx state information about an app's context.
|
|
4
|
+
*
|
|
5
|
+
* This is the "full state" of our DbxAppContext. It is the sum of the fromDbxContext.State interface.
|
|
6
|
+
*
|
|
7
|
+
* Sub-state types that need to be aware of this typeing may extend (via union) this type.
|
|
8
|
+
*/
|
|
9
|
+
export declare type DbxAppContextFullState = fromDbxAppContext.State;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
2
|
import { OnDestroy, OnInit } from '@angular/core';
|
|
3
|
-
import { FilterSource, FilterSourceInstance,
|
|
3
|
+
import { FilterSource, FilterSourceInstance, ObservableOrValue } from '@dereekb/rxjs';
|
|
4
4
|
import { Maybe } from '@dereekb/util';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
/**
|
|
@@ -14,7 +14,7 @@ export declare abstract class AbstractFilterSourceDirective<F> implements Filter
|
|
|
14
14
|
initWithFilter(filterObs: Observable<F>): void;
|
|
15
15
|
setFilter(filter: F): void;
|
|
16
16
|
resetFilter(): void;
|
|
17
|
-
protected makeDefaultFilter():
|
|
17
|
+
protected makeDefaultFilter(): ObservableOrValue<Maybe<F>>;
|
|
18
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<AbstractFilterSourceDirective<any>, never>;
|
|
19
19
|
static ɵdir: i0.ɵɵDirectiveDeclaration<AbstractFilterSourceDirective<any>, never, never, {}, {}, never>;
|
|
20
20
|
}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
export * from './action';
|
|
2
|
+
export * from './auth';
|
|
2
3
|
export * from './button';
|
|
4
|
+
export * from './context';
|
|
3
5
|
export * from './router';
|
|
4
6
|
export * from './pipe';
|
|
5
7
|
export * from './filter';
|
|
6
|
-
export * from './
|
|
8
|
+
export * from './injection';
|
|
9
|
+
export * from './ngrx';
|
|
7
10
|
export * from './storage';
|
|
8
11
|
export * from './subscription';
|
|
9
12
|
export * from './util';
|
|
13
|
+
export * from './view';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './injection.component.module';
|
|
2
|
+
export * from './injection.component';
|
|
3
|
+
export * from './injection.context.directive';
|
|
4
|
+
export * from './injection.context.forward.directive';
|
|
5
|
+
export * from './injection.context';
|
|
6
|
+
export * from './injection.instance';
|
|
7
|
+
export * from './injection.directive';
|
|
8
|
+
export * from './injection';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ViewContainerRef } from '@angular/core';
|
|
2
|
+
import { DbxInjectionComponentConfig, DbxInjectionTemplateConfig } from './injection';
|
|
3
|
+
import { AbstractDbxInjectionDirective } from './injection.directive';
|
|
4
|
+
import { Maybe } from '@dereekb/util';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
/**
|
|
7
|
+
* Component that injects content based on the configuration into the view.
|
|
8
|
+
*/
|
|
9
|
+
export declare class DbxInjectionComponent<T> extends AbstractDbxInjectionDirective<T> {
|
|
10
|
+
set config(config: Maybe<DbxInjectionComponentConfig<T>>);
|
|
11
|
+
set template(template: Maybe<DbxInjectionTemplateConfig<T>>);
|
|
12
|
+
set content(content: Maybe<ViewContainerRef>);
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxInjectionComponent<any>, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DbxInjectionComponent<any>, "dbx-injection, [dbxInjection], [dbx-injection]", never, { "config": "config"; "template": "template"; }, {}, never, never>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./injection.component";
|
|
3
|
+
import * as i2 from "./injection.context.directive";
|
|
4
|
+
import * as i3 from "@angular/common";
|
|
5
|
+
export declare class DbxInjectionComponentModule {
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxInjectionComponentModule, never>;
|
|
7
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DbxInjectionComponentModule, [typeof i1.DbxInjectionComponent, typeof i2.DbxInjectionContextDirective], [typeof i3.CommonModule], [typeof i1.DbxInjectionComponent, typeof i2.DbxInjectionContextDirective]>;
|
|
8
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DbxInjectionComponentModule>;
|
|
9
|
+
}
|