@coolon/angular-ui-powerups 3.7.0-alpha.2 → 3.7.0-alpha.4
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/CHANGELOG.md +14 -0
- package/bundles/coolon-angular-ui-powerups.umd.js +67 -73
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +12 -1
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.js.map +1 -1
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.metadata.json +1 -1
- package/esm2015/lib/place/guards/place.guard.js +31 -41
- package/esm2015/lib/place/guards/place.guard.js.map +1 -1
- package/esm2015/lib/place/guards/place.guard.metadata.json +1 -1
- package/esm2015/lib/place/place-auth-service.js.map +1 -1
- package/esm2015/lib/place/place-auth-service.metadata.json +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +39 -40
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/place/components/place-outlet/place-outlet.component.d.ts +3 -1
- package/lib/place/guards/place.guard.d.ts +2 -1
- package/lib/place/place-auth-service.d.ts +4 -4
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@ import { EventEmitter, OnInit } from '@angular/core';
|
|
|
2
2
|
import { ActivatedRoute, Router, RouterOutlet } from '@angular/router';
|
|
3
3
|
import { BooleanValueModelChain, Constructable, ListModel, ValueModel, ValueModelChain } from '@coolon/pectin';
|
|
4
4
|
import { DisposableComponent } from '../../../components/disposable-component';
|
|
5
|
+
import { PlaceAuthService } from '../../place-auth-service';
|
|
5
6
|
import { PlaceComponent } from '../../place-component';
|
|
6
7
|
import { PlaceConfig } from '../../place-config';
|
|
7
8
|
import { PlaceRouter } from '../../place-router';
|
|
@@ -9,6 +10,7 @@ import { Visit } from '../../visit';
|
|
|
9
10
|
export declare class PlaceOutletComponent extends DisposableComponent implements OnInit {
|
|
10
11
|
private readonly router;
|
|
11
12
|
private readonly placeRouter;
|
|
13
|
+
private readonly placeAuthService;
|
|
12
14
|
readonly placeConfig: PlaceConfig;
|
|
13
15
|
animate: boolean;
|
|
14
16
|
animateModel: ValueModel<boolean>;
|
|
@@ -31,7 +33,7 @@ export declare class PlaceOutletComponent extends DisposableComponent implements
|
|
|
31
33
|
private placesInAnimationOrder;
|
|
32
34
|
private animationSupported;
|
|
33
35
|
readonly animationEnabled: BooleanValueModelChain;
|
|
34
|
-
constructor(router: Router, placeRouter: PlaceRouter, placeConfig: PlaceConfig, parentOutlet: PlaceOutletComponent);
|
|
36
|
+
constructor(router: Router, placeRouter: PlaceRouter, placeAuthService: PlaceAuthService, placeConfig: PlaceConfig, parentOutlet: PlaceOutletComponent);
|
|
35
37
|
ngOnInit(): void;
|
|
36
38
|
getAnimationOrder(): number;
|
|
37
39
|
get animationDuration(): string;
|
|
@@ -18,6 +18,7 @@ export declare class PlaceGuard implements CanActivate, CanDeactivate<PlaceCompo
|
|
|
18
18
|
constructor(router: Router, urlService: UrlService, placeRouter: PlaceRouter, placeHistory: PlaceHistory, placeAuthService: PlaceAuthService, interactionService: InteractionService, injector: Injector);
|
|
19
19
|
canActivate(activatedRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): Promise<boolean | UrlTree>;
|
|
20
20
|
canDeactivate(component: PlaceComponent, currentRoute: ActivatedRouteSnapshot, currentState: RouterStateSnapshot, nextState?: RouterStateSnapshot): Promise<boolean | UrlTree>;
|
|
21
|
-
private
|
|
21
|
+
private getPlaceDefinition;
|
|
22
|
+
private createUrlTree;
|
|
22
23
|
cleanInteractionState(route: ActivatedRouteSnapshot, state: RouterStateSnapshot, next: () => Promise<boolean | UrlSnapshot>): Promise<boolean | UrlSnapshot>;
|
|
23
24
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { InjectionToken } from '@angular/core';
|
|
2
2
|
import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
|
3
|
-
import { ValueModel } from '@coolon/pectin';
|
|
3
|
+
import { Constructable, ValueModel } from '@coolon/pectin';
|
|
4
|
+
import { PlaceComponent } from './place-component';
|
|
4
5
|
import { PlaceDefinition } from './place-definition';
|
|
5
|
-
import { UrlSnapshot } from './url-snapshot';
|
|
6
6
|
import { Visit } from './visit';
|
|
7
7
|
export declare const PLACE_AUTH_SERVICE: InjectionToken<PlaceAuthService>;
|
|
8
8
|
/**
|
|
@@ -28,8 +28,8 @@ export interface PlaceAuthService {
|
|
|
28
28
|
* @param placeDefinition
|
|
29
29
|
*/
|
|
30
30
|
isAuthorised(placeDefinition: PlaceDefinition): boolean;
|
|
31
|
-
handleNotAuthenticated(activatedRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot):
|
|
32
|
-
handleNotAuthorised(activatedRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot):
|
|
31
|
+
handleNotAuthenticated(activatedRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): Constructable<PlaceComponent> | Visit;
|
|
32
|
+
handleNotAuthorised(activatedRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): Constructable<PlaceComponent> | Visit;
|
|
33
33
|
}
|
|
34
34
|
export declare namespace PlaceAuthService {
|
|
35
35
|
type AuthoriserCallback = (placeDef: PlaceDefinition) => boolean;
|