@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.
@@ -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 handleGuardResult;
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): UrlSnapshot | Visit;
32
- handleNotAuthorised(activatedRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): UrlSnapshot | Visit;
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coolon/angular-ui-powerups",
3
- "version": "3.7.0-alpha.2",
3
+ "version": "3.7.0-alpha.4",
4
4
  "schematics": "./schematics/collection.json",
5
5
  "dependencies": {
6
6
  "@coolon/typescript-utilities": "^2.2.0",