@dereekb/dbx-core 5.3.0 → 7.0.1
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/directive/state/action.enforce.modified.directive.mjs +1 -1
- package/esm2020/lib/auth/router/provider/uirouter/hook.mjs +6 -4
- package/esm2020/lib/auth/router/provider/uirouter/redirect.mjs +1 -1
- package/esm2020/lib/auth/router/provider/uirouter/role.hook.mjs +3 -4
- package/esm2020/lib/auth/router/provider/uirouter/state.hook.mjs +3 -3
- package/fesm2015/dereekb-dbx-core.mjs +8 -7
- package/fesm2015/dereekb-dbx-core.mjs.map +1 -1
- package/fesm2020/dereekb-dbx-core.mjs +8 -7
- package/fesm2020/dereekb-dbx-core.mjs.map +1 -1
- package/lib/auth/router/provider/uirouter/hook.d.ts +4 -4
- package/lib/auth/router/provider/uirouter/state.hook.d.ts +2 -2
- package/package.json +4 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TransitionHookFn, Transition, UIInjector } from '@uirouter/core';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import {
|
|
3
|
+
import { SegueRefOrSegueRefRouterLink } from './../../../../router/segue';
|
|
4
4
|
import { DbxAuthService } from '../../../service/auth.service';
|
|
5
5
|
import { FactoryWithRequiredInput, Maybe } from '@dereekb/util';
|
|
6
6
|
import { Injector } from '@angular/core';
|
|
@@ -10,15 +10,15 @@ import { Injector } from '@angular/core';
|
|
|
10
10
|
* - false: redirect to the login page.
|
|
11
11
|
* - StateOrName: redirect to the target page instead.
|
|
12
12
|
*/
|
|
13
|
-
export declare type AuthTransitionDecision = true | false |
|
|
13
|
+
export declare type AuthTransitionDecision = true | false | SegueRefOrSegueRefRouterLink;
|
|
14
14
|
export interface AuthTransitionDecisionGetterInput {
|
|
15
15
|
readonly transition: Transition;
|
|
16
16
|
readonly injector: Injector;
|
|
17
17
|
readonly authService: DbxAuthService;
|
|
18
18
|
}
|
|
19
|
-
export declare type AuthTransitionRedirectTarget = Observable<Maybe<
|
|
19
|
+
export declare type AuthTransitionRedirectTarget = Observable<Maybe<SegueRefOrSegueRefRouterLink>>;
|
|
20
20
|
export declare type AuthTransitionRedirectTargetGetter = FactoryWithRequiredInput<AuthTransitionRedirectTarget, AuthTransitionDecisionGetterInput>;
|
|
21
|
-
export declare type AuthTransitionRedirectTargetOrGetter = Maybe<
|
|
21
|
+
export declare type AuthTransitionRedirectTargetOrGetter = Maybe<SegueRefOrSegueRefRouterLink> | AuthTransitionRedirectTargetGetter;
|
|
22
22
|
export interface AuthTransitionHookOptions {
|
|
23
23
|
/**
|
|
24
24
|
* The state to redirect the user to when their auth fails.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ArrayOrValue } from '@dereekb/util';
|
|
2
2
|
import { TransitionService } from '@uirouter/core';
|
|
3
3
|
import { AuthUserState } from '../../../auth.user';
|
|
4
|
-
import { AuthTransitionHookOptions } from './hook';
|
|
4
|
+
import { AuthTransitionHookOptions, AuthTransitionStateData } from './hook';
|
|
5
5
|
export interface HasAuthStateHookConfig {
|
|
6
6
|
options: AuthTransitionHookOptions;
|
|
7
7
|
}
|
|
@@ -16,7 +16,7 @@ export interface HasAuthStateObjectConfig {
|
|
|
16
16
|
*/
|
|
17
17
|
disallowedStates?: ArrayOrValue<AuthUserState>;
|
|
18
18
|
}
|
|
19
|
-
export interface HasAuthStateData {
|
|
19
|
+
export interface HasAuthStateData extends AuthTransitionStateData {
|
|
20
20
|
/**
|
|
21
21
|
* Configuration for the hasAuthStateHook.
|
|
22
22
|
*/
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/dbx-core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.1",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^13.0.0",
|
|
6
6
|
"@angular/core": "^13.0.0",
|
|
7
|
-
"@dereekb/util": "
|
|
8
|
-
"@dereekb/rxjs": "
|
|
7
|
+
"@dereekb/util": "7.0.1",
|
|
8
|
+
"@dereekb/rxjs": "7.0.1",
|
|
9
9
|
"@ngrx/component-store": "^13.0.2",
|
|
10
10
|
"@angular/platform-browser": "^13.0.0",
|
|
11
11
|
"@ngrx/effects": "^13.0.2",
|
|
12
12
|
"@ngrx/store": "^13.0.2",
|
|
13
13
|
"@uirouter/core": "^6.0.8",
|
|
14
14
|
"date-fns": "^2.28.0",
|
|
15
|
-
"@dereekb/date": "
|
|
15
|
+
"@dereekb/date": "7.0.1",
|
|
16
16
|
"@angular/router": "^13.0.0"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|