@coolon/angular-ui-powerups 11.0.0-alpha.2 → 11.0.0-alpha.3
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/bundles/coolon-angular-ui-powerups.umd.js +81 -42
- 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/abstract-place-navigation.component.js +3 -2
- package/esm2015/lib/place/components/abstract-place-navigation.component.js.map +1 -1
- package/esm2015/lib/place/components/abstract-place-navigation.component.metadata.json +1 -1
- package/esm2015/lib/place/components/not-authorised-notice/not-authorised-notice.component.js +14 -0
- package/esm2015/lib/place/components/not-authorised-notice/not-authorised-notice.component.js.map +1 -0
- package/esm2015/lib/place/components/not-authorised-notice/not-authorised-notice.component.metadata.json +1 -0
- package/esm2015/lib/place/components/not-authorised-notice/not-authorised-notice.component.ngfactory.js.map +1 -0
- package/esm2015/lib/place/components/not-authorised-notice/not-authorised-notice.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +23 -14
- 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/exports.js +1 -0
- package/esm2015/lib/place/exports.js.map +1 -1
- package/esm2015/lib/place/exports.metadata.json +1 -1
- package/esm2015/lib/place/guards/place.guard.js +5 -8
- package/esm2015/lib/place/guards/place.guard.js.map +1 -1
- package/esm2015/lib/place/navigation/place-component-deactivation-handler.js +2 -0
- package/esm2015/lib/place/navigation/place-component-deactivation-handler.js.map +1 -1
- package/esm2015/lib/place/place-router.js +15 -4
- package/esm2015/lib/place/place-router.js.map +1 -1
- package/esm2015/lib/place/place-router.metadata.json +1 -1
- package/esm2015/lib/place/place.module.js +6 -2
- package/esm2015/lib/place/place.module.js.map +1 -1
- package/esm2015/lib/place/place.module.metadata.json +1 -1
- package/esm2015/lib/place/place.module.ngfactory.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +62 -30
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/place/components/not-authorised-notice/not-authorised-notice.component.d.ts +3 -0
- package/lib/place/components/place-outlet/place-outlet.component.d.ts +10 -3
- package/lib/place/exports.d.ts +1 -0
- package/lib/place/place-router.d.ts +10 -6
- package/package.json +1 -1
- package/schematics/utils/build-context.d.ts +4 -5
- package/schematics/utils/workspace.d.ts +3 -4
- package/schematics/utils/workspace.js.map +1 -1
|
@@ -1,15 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentPortal } from '@angular/cdk/portal';
|
|
2
|
+
import { ChangeDetectorRef, EventEmitter, InjectionToken, OnInit } from '@angular/core';
|
|
2
3
|
import { ActivatedRoute, Router, RouterOutlet } from '@angular/router';
|
|
3
4
|
import { BooleanValueModelChain, Constructable, ListModel, ValueModel, ValueModelChain } from '@coolon/pectin';
|
|
4
5
|
import { DisposableComponent } from '../../../components/disposable-component';
|
|
5
6
|
import { PlaceComponent } from '../../place-component';
|
|
6
7
|
import { PlaceConfig } from '../../place-config';
|
|
8
|
+
import { PlaceDefinition } from '../../place-definition';
|
|
7
9
|
import { PlaceRouter } from '../../place-router';
|
|
8
10
|
import { Visit } from '../../visit';
|
|
11
|
+
export declare const AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT: InjectionToken<Constructable<any>>;
|
|
9
12
|
export declare class PlaceOutletComponent extends DisposableComponent implements OnInit {
|
|
10
13
|
private readonly router;
|
|
11
14
|
private readonly placeRouter;
|
|
12
15
|
readonly placeConfig: PlaceConfig;
|
|
16
|
+
private readonly cdr;
|
|
13
17
|
animate: boolean;
|
|
14
18
|
animateModel: ValueModel<boolean>;
|
|
15
19
|
customPlaceAnimationOrderModel: ListModel<Constructable<PlaceComponent>>;
|
|
@@ -20,7 +24,7 @@ export declare class PlaceOutletComponent extends DisposableComponent implements
|
|
|
20
24
|
private outletActivated;
|
|
21
25
|
private readonly _activatedRouteModel;
|
|
22
26
|
private readonly _activePlaceModel;
|
|
23
|
-
|
|
27
|
+
readonly _activePlaceDefinition: ValueModelChain<PlaceDefinition>;
|
|
24
28
|
private parentOutletModel;
|
|
25
29
|
readonly activePlaceAnimationPosition: ValueModelChain<number>;
|
|
26
30
|
private initialPlaceIndex;
|
|
@@ -31,10 +35,13 @@ export declare class PlaceOutletComponent extends DisposableComponent implements
|
|
|
31
35
|
private placesInAnimationOrder;
|
|
32
36
|
private animationSupported;
|
|
33
37
|
readonly animationEnabled: BooleanValueModelChain;
|
|
34
|
-
|
|
38
|
+
readonly authorised: ValueModelChain<boolean>;
|
|
39
|
+
readonly notAuthorisedNoticePortal: ComponentPortal<any>;
|
|
40
|
+
constructor(router: Router, placeRouter: PlaceRouter, placeConfig: PlaceConfig, unauthorisedPlaceNotice: Constructable<any>, parentOutlet: PlaceOutletComponent, cdr: ChangeDetectorRef);
|
|
35
41
|
ngOnInit(): void;
|
|
36
42
|
getAnimationOrder(): number;
|
|
37
43
|
get animationDuration(): string;
|
|
44
|
+
get isAuthorised(): boolean;
|
|
38
45
|
navigate(visit: Visit): void;
|
|
39
46
|
get parentOutlet(): PlaceOutletComponent;
|
|
40
47
|
get activePlaceModel(): ValueModel<PlaceComponent>;
|
package/lib/place/exports.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export * from "./url-snapshot";
|
|
|
15
15
|
export * from "./visit";
|
|
16
16
|
export * from "./components/abstract-place-navigation.component";
|
|
17
17
|
export * from "./components/list-place-nav/list-place-nav.component";
|
|
18
|
+
export * from "./components/not-authorised-notice/not-authorised-notice.component";
|
|
18
19
|
export * from "./components/place-outlet/place-outlet.component";
|
|
19
20
|
export * from "./components/place-outlet/route-animations";
|
|
20
21
|
export * from "./components/side-place-navigation/side-place-navigation.component";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Location } from '@angular/common';
|
|
2
2
|
import { ActivatedRoute, ActivatedRouteSnapshot, NavigationCancel, NavigationEnd, NavigationError, NavigationExtras, NavigationStart, Router, RouterStateSnapshot } from '@angular/router';
|
|
3
|
-
import { GarbageCollector, ListModel,
|
|
3
|
+
import { GarbageCollector, ListModel, MutableValueModel, ValueModel, ValueModelChain } from '@coolon/pectin';
|
|
4
4
|
import { InteractionService } from '../interaction/services/interaction.service';
|
|
5
5
|
import { NavigationSession } from './navigation/session/navigation-session';
|
|
6
6
|
import { PlaceAccessGuard } from './place-access-guard';
|
|
@@ -20,20 +20,19 @@ export declare class PlaceRouter extends GarbageCollector {
|
|
|
20
20
|
readonly navigationSessionName: ValueModelChain<string>;
|
|
21
21
|
private readonly navigationContext;
|
|
22
22
|
private readonly _activeVisits;
|
|
23
|
-
readonly
|
|
24
|
-
private routerInteractionAdapter;
|
|
23
|
+
private readonly routerInteractionAdapter;
|
|
25
24
|
private sessionFinishedJobs;
|
|
25
|
+
readonly state: ValueModel<PlaceRouter.State>;
|
|
26
26
|
/**
|
|
27
27
|
* An observable model containing the authoriser function. This allows places to react to changes
|
|
28
28
|
* in permissions when any underlying auth logic changes, e.g. a role being removed from a user.
|
|
29
29
|
*/
|
|
30
|
-
private _accessGuard;
|
|
30
|
+
private readonly _accessGuard;
|
|
31
31
|
private redirections;
|
|
32
32
|
constructor(angularRouter: Router, angularLocation: Location, interactionService: InteractionService, urlService: UrlService, placeHistory: PlaceHistory);
|
|
33
33
|
get accessGuard(): ValueModel<PlaceAccessGuard>;
|
|
34
34
|
configureAuth(accessGrant: ValueModel<PlaceAccessGuard>, redirections: PlaceRouter.Redirections): void;
|
|
35
35
|
getAuthenticationFailureRedirect(activatedRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): Visit;
|
|
36
|
-
getAuthorisationFailureRedirect(activatedRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): Visit;
|
|
37
36
|
get navigationSession(): NavigationSession;
|
|
38
37
|
get currentSession(): NavigationSession;
|
|
39
38
|
isNavigating(): boolean;
|
|
@@ -66,6 +65,11 @@ export declare class PlaceRouter extends GarbageCollector {
|
|
|
66
65
|
export declare namespace PlaceRouter {
|
|
67
66
|
interface Redirections {
|
|
68
67
|
onAuthenticationFailure(activatedRoute?: ActivatedRouteSnapshot, state?: RouterStateSnapshot): Visit;
|
|
69
|
-
|
|
68
|
+
}
|
|
69
|
+
class State {
|
|
70
|
+
private readonly activeVisits;
|
|
71
|
+
constructor(activeVisits: Visit[]);
|
|
72
|
+
isPlaceActive(placeDefinition: PlaceDefinition): boolean;
|
|
73
|
+
getVisitFor(placeDefinition: PlaceDefinition): Visit;
|
|
70
74
|
}
|
|
71
75
|
}
|
package/package.json
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { experimental } from '@angular-devkit/core';
|
|
2
1
|
import { SchematicContext, Tree } from '@angular-devkit/schematics';
|
|
3
2
|
import { ClassDeclaration, SourceFile } from 'ts-morph';
|
|
4
3
|
import { DecoratedSourceFile } from './decorators/decorated-source-file';
|
|
@@ -12,8 +11,8 @@ export declare abstract class BuildContext {
|
|
|
12
11
|
get logger(): import("@angular-devkit/core/src/logger").LoggerApi;
|
|
13
12
|
get tsConfigPath(): string;
|
|
14
13
|
get sourceCodeRoot(): string;
|
|
15
|
-
get sourceRoot():
|
|
16
|
-
get rootDir():
|
|
14
|
+
get sourceRoot(): any;
|
|
15
|
+
get rootDir(): any;
|
|
17
16
|
private loadTypeScriptProject;
|
|
18
17
|
scanClassesInTree(tree: Tree, scanRootDirectory: string, scanClass: (sourceFile: SourceFile, classDeclaration: ClassDeclaration, path: string) => void): void;
|
|
19
18
|
findFileInAncestorPath(pathToSourceRoot: string[], fileName: string): string;
|
|
@@ -21,12 +20,12 @@ export declare abstract class BuildContext {
|
|
|
21
20
|
}
|
|
22
21
|
export declare namespace BuildContext {
|
|
23
22
|
interface Settings {
|
|
24
|
-
readonly workspaceProject:
|
|
23
|
+
readonly workspaceProject: any;
|
|
25
24
|
readonly projectType: string;
|
|
26
25
|
readonly tsConfigPath: string;
|
|
27
26
|
}
|
|
28
27
|
class App extends BuildContext {
|
|
29
|
-
get selectorPrefix():
|
|
28
|
+
get selectorPrefix(): any;
|
|
30
29
|
}
|
|
31
30
|
class Lib extends BuildContext {
|
|
32
31
|
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { experimental } from '@angular-devkit/core';
|
|
2
1
|
import { SchematicContext, Tree } from '@angular-devkit/schematics';
|
|
3
2
|
import { BuildContext } from './build-context';
|
|
4
3
|
export declare class Workspace {
|
|
5
|
-
readonly schema:
|
|
4
|
+
readonly schema: any;
|
|
6
5
|
readonly tree: Tree;
|
|
7
6
|
readonly context: SchematicContext;
|
|
8
|
-
get defaultProject():
|
|
9
|
-
constructor(schema:
|
|
7
|
+
get defaultProject(): any;
|
|
8
|
+
constructor(schema: any, tree: Tree, context: SchematicContext);
|
|
10
9
|
static load(tree: Tree, _context: SchematicContext): Workspace;
|
|
11
10
|
getApplication(projectName: string): BuildContext.App;
|
|
12
11
|
getApplicationOrDefault(projectName: string | undefined): BuildContext.App;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace.js","sourceRoot":"","sources":["../../../../../libs/angular-ui-powerups/schematics/utils/workspace.ts"],"names":[],"mappings":";;;AAEA,mDAA+C;
|
|
1
|
+
{"version":3,"file":"workspace.js","sourceRoot":"","sources":["../../../../../libs/angular-ui-powerups/schematics/utils/workspace.ts"],"names":[],"mappings":";;;AAEA,mDAA+C;AAE/C,MAAa,SAAS;IAMpB,YAAqB,MAAW,EAAW,IAAU,EAAW,OAAyB;QAApE,WAAM,GAAN,MAAM,CAAK;QAAW,SAAI,GAAJ,IAAI,CAAM;QAAW,YAAO,GAAP,OAAO,CAAkB;IACzF,CAAC;IALD,IAAI,cAAc;QAChB,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC;IACpC,CAAC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