@coolon/angular-ui-powerups 0.0.43 → 0.0.44
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 +1165 -1181
- 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.d.ts +16 -15
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/coolon-angular-ui-powerups.js +16 -15
- package/esm2015/index.js +2 -2
- package/esm2015/lib/components/disposable-component.js +1 -1
- package/esm2015/lib/components/forms/number-input/number-input.component.js +1 -1
- package/esm2015/lib/components/forms/password-input/password-input.component.js +1 -1
- package/esm2015/lib/components/forms/string-input/string-input.component.js +1 -1
- package/esm2015/lib/components/resize-aware.component.js +1 -1
- package/esm2015/lib/components/types/bounds.class.js +1 -1
- package/esm2015/lib/components/types/dimension.class.js +1 -1
- package/esm2015/lib/components/types/point.class.js +1 -1
- package/esm2015/lib/directives/command.directive.js +1 -1
- package/esm2015/lib/directives/focus-binding.directive.js +2 -2
- package/esm2015/lib/interaction/alert.js +1 -1
- package/esm2015/lib/interaction/components/activity-container/activity-container.component.js +2 -2
- package/esm2015/lib/interaction/components/activity-outlet/activity-outlet.component.js +6 -1
- package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js +2 -2
- package/esm2015/lib/interaction/confirm.js +1 -1
- package/esm2015/lib/interaction/interaction.module.js +2 -2
- package/esm2015/lib/interaction/result.js +1 -1
- package/esm2015/lib/interaction/services/dialog-interaction.service.js +2 -2
- package/esm2015/lib/place/components/abstract-place-navigation.component.js +3 -2
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +132 -86
- package/esm2015/lib/place/components/place-outlet/route-animations.js +2 -2
- package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +1 -1
- package/esm2015/lib/place/guards/leave-place.guard.js +12 -10
- package/esm2015/lib/place/guards/place-route.guard.js +40 -33
- package/esm2015/lib/place/index.js +5 -5
- package/esm2015/lib/place/nav-item.js +1 -1
- package/esm2015/lib/place/place-component.js +38 -168
- package/esm2015/lib/place/place-definition.js +79 -0
- package/esm2015/lib/place/place-history.js +54 -0
- package/esm2015/lib/place/place-router.js +83 -0
- package/esm2015/lib/place/place.decorator.js +30 -3
- package/esm2015/lib/place/place.module.js +2 -5
- package/esm2015/lib/place/route/default-parameter-sanitiser.js +10 -22
- package/esm2015/lib/place/route/json-types.js +1 -1
- package/esm2015/lib/place/route/parameter-decorators.js +7 -60
- package/esm2015/lib/place/route/parameter-definition.class.js +103 -8
- package/esm2015/lib/place/route/parameter-sanitiser.js +1 -15
- package/esm2015/lib/place/route/parameter-snapshot.js +13 -55
- package/esm2015/lib/place/route/parameter-type.js +2 -2
- package/esm2015/lib/place/route/route-parameter-sanitiser.js +6 -20
- package/esm2015/lib/place/visit.js +1 -1
- package/esm2015/public_api.js +2 -2
- package/esm5/coolon-angular-ui-powerups.js +16 -15
- package/esm5/index.js +2 -2
- package/esm5/lib/components/disposable-component.js +1 -1
- package/esm5/lib/components/forms/number-input/number-input.component.js +1 -1
- package/esm5/lib/components/forms/password-input/password-input.component.js +1 -1
- package/esm5/lib/components/forms/string-input/string-input.component.js +1 -1
- package/esm5/lib/components/resize-aware.component.js +1 -1
- package/esm5/lib/components/types/bounds.class.js +1 -1
- package/esm5/lib/components/types/dimension.class.js +1 -1
- package/esm5/lib/components/types/point.class.js +1 -1
- package/esm5/lib/directives/command.directive.js +1 -1
- package/esm5/lib/directives/focus-binding.directive.js +2 -2
- package/esm5/lib/interaction/alert.js +1 -1
- package/esm5/lib/interaction/components/activity-container/activity-container.component.js +2 -2
- package/esm5/lib/interaction/components/activity-outlet/activity-outlet.component.js +6 -1
- package/esm5/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js +2 -2
- package/esm5/lib/interaction/confirm.js +1 -1
- package/esm5/lib/interaction/interaction.module.js +2 -2
- package/esm5/lib/interaction/result.js +1 -1
- package/esm5/lib/interaction/services/dialog-interaction.service.js +2 -2
- package/esm5/lib/place/components/abstract-place-navigation.component.js +3 -2
- package/esm5/lib/place/components/place-outlet/place-outlet.component.js +150 -115
- package/esm5/lib/place/components/place-outlet/route-animations.js +2 -2
- package/esm5/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +1 -1
- package/esm5/lib/place/guards/leave-place.guard.js +12 -10
- package/esm5/lib/place/guards/place-route.guard.js +40 -32
- package/esm5/lib/place/index.js +5 -5
- package/esm5/lib/place/nav-item.js +1 -1
- package/esm5/lib/place/place-component.js +52 -198
- package/esm5/lib/place/place-definition.js +88 -0
- package/esm5/lib/place/place-history.js +57 -0
- package/esm5/lib/place/place-router.js +101 -0
- package/esm5/lib/place/place.decorator.js +30 -3
- package/esm5/lib/place/place.module.js +2 -5
- package/esm5/lib/place/route/default-parameter-sanitiser.js +8 -20
- package/esm5/lib/place/route/json-types.js +1 -1
- package/esm5/lib/place/route/parameter-decorators.js +7 -60
- package/esm5/lib/place/route/parameter-definition.class.js +131 -8
- package/esm5/lib/place/route/parameter-sanitiser.js +1 -15
- package/esm5/lib/place/route/parameter-snapshot.js +25 -63
- package/esm5/lib/place/route/parameter-type.js +2 -2
- package/esm5/lib/place/route/route-parameter-sanitiser.js +6 -19
- package/esm5/lib/place/visit.js +1 -1
- package/esm5/public_api.js +2 -2
- package/fesm2015/coolon-angular-ui-powerups.js +944 -959
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +1147 -1167
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/index.d.ts +1 -1
- package/lib/interaction/components/activity-outlet/activity-outlet.component.d.ts +7 -0
- package/lib/place/components/abstract-place-navigation.component.d.ts +3 -2
- package/lib/place/components/place-outlet/place-outlet.component.d.ts +31 -19
- package/lib/place/guards/place-route.guard.d.ts +7 -6
- package/lib/place/index.d.ts +3 -3
- package/lib/place/place-component.d.ts +13 -41
- package/lib/place/place-definition.d.ts +20 -0
- package/lib/place/place-history.d.ts +10 -0
- package/lib/place/place-router.d.ts +9 -0
- package/lib/place/place.decorator.d.ts +13 -1
- package/lib/place/route/default-parameter-sanitiser.d.ts +3 -5
- package/lib/place/route/parameter-decorators.d.ts +0 -4
- package/lib/place/route/parameter-definition.class.d.ts +29 -6
- package/lib/place/route/parameter-sanitiser.d.ts +0 -6
- package/lib/place/route/parameter-snapshot.d.ts +7 -7
- package/lib/place/route/route-parameter-sanitiser.d.ts +1 -3
- package/lib/place/visit.d.ts +2 -2
- package/package.json +1 -1
- package/schematics/place-routes/index.js.map +1 -1
- package/schematics/place-routes/place-def.js +1 -1
- package/schematics/place-routes/place-def.js.map +1 -1
- package/schematics/place-routes/templates/place-destinations.ts.template +21 -0
- package/schematics/place-routes/templates/{places.ts.template → place-routes.ts.template} +1 -13
- package/esm2015/lib/place/place-component-like.js +0 -17
- package/esm2015/lib/place/place-updates-service.js +0 -16
- package/esm2015/lib/place/place.service.js +0 -102
- package/esm5/lib/place/place-component-like.js +0 -17
- package/esm5/lib/place/place-updates-service.js +0 -16
- package/esm5/lib/place/place.service.js +0 -136
- package/lib/place/place-component-like.d.ts +0 -5
- package/lib/place/place-updates-service.d.ts +0 -10
- package/lib/place/place.service.d.ts +0 -22
package/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from './public_api';
|
|
@@ -5,6 +5,13 @@ import { Alert } from '../../alert';
|
|
|
5
5
|
import { Confirm } from '../../confirm';
|
|
6
6
|
import { InteractionContext } from '../../interaction-context';
|
|
7
7
|
import { ActivityOutletContext } from './activity-outlet-context';
|
|
8
|
+
/**
|
|
9
|
+
* ActivityOutletComponent creates and displays an activity and delegates the interaction context functionality to an
|
|
10
|
+
* external service.
|
|
11
|
+
*
|
|
12
|
+
* It might be nice to have wrapper component that allows more declarative use, i.e.
|
|
13
|
+
* <activity-view [activityClass]="...", [activityData]="..." (done)=".." (cancel)="..."></activity-view>
|
|
14
|
+
*/
|
|
8
15
|
export declare class ActivityOutletComponent<D, R, E> implements OnInit, InteractionContext {
|
|
9
16
|
private componentFactoryResolver;
|
|
10
17
|
private viewContainerRef;
|
|
@@ -3,11 +3,12 @@ import { Constructable, ListModel, ListModelChain } from '@coolon/pectin';
|
|
|
3
3
|
import { DisposableComponent } from '../../components/disposable-component';
|
|
4
4
|
import { NavItem } from '../nav-item';
|
|
5
5
|
import { PlaceComponent } from '../place-component';
|
|
6
|
+
import { PlaceDefinition } from '../place-definition';
|
|
6
7
|
export declare class AbstractPlaceNavigationComponent extends DisposableComponent implements OnInit {
|
|
7
8
|
places: Constructable<PlaceComponent>[];
|
|
8
9
|
placesModel: ListModel<Constructable<PlaceComponent>>;
|
|
9
|
-
readonly placeDefinitions: ListModelChain<
|
|
10
|
+
readonly placeDefinitions: ListModelChain<PlaceDefinition>;
|
|
10
11
|
constructor();
|
|
11
|
-
getNav(placeDef:
|
|
12
|
+
getNav(placeDef: PlaceDefinition): NavItem;
|
|
12
13
|
ngOnInit(): void;
|
|
13
14
|
}
|
|
@@ -1,25 +1,37 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { RouterOutlet } from '@angular/router';
|
|
3
|
+
import { MutableValueModel, ValueModel } from '@coolon/pectin';
|
|
3
4
|
import { DisposableComponent } from '../../../components/disposable-component';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
import { PlaceDefinition } from '../../place-definition';
|
|
6
|
+
import { PlaceHistory } from '../../place-history';
|
|
7
|
+
import { PlaceRouter } from '../../place-router';
|
|
8
|
+
import { ParameterSnapshot } from '../../route/parameter-snapshot';
|
|
9
|
+
interface PlaceRef {
|
|
10
|
+
readonly placeDefinition: PlaceDefinition;
|
|
11
|
+
initialiseBindings(param: ValueModel<ParameterSnapshot>): void;
|
|
12
|
+
onPlaceReady(): void;
|
|
13
|
+
}
|
|
14
|
+
export declare class PlaceOutletComponent extends DisposableComponent implements OnInit {
|
|
15
|
+
private readonly router;
|
|
16
|
+
private readonly placeHistory;
|
|
9
17
|
animate: boolean;
|
|
10
|
-
|
|
11
|
-
private
|
|
12
|
-
private
|
|
13
|
-
private
|
|
14
|
-
private
|
|
15
|
-
private
|
|
16
|
-
|
|
18
|
+
routerOut: RouterOutlet;
|
|
19
|
+
private _currentPlace;
|
|
20
|
+
private readonly _incomingRouteChange;
|
|
21
|
+
private readonly _inOutletUpdate;
|
|
22
|
+
private readonly _activatedRouteModel;
|
|
23
|
+
private readonly _placeDefinition;
|
|
24
|
+
private readonly _paramMap;
|
|
25
|
+
readonly _resolvedParameters: MutableValueModel<ParameterSnapshot>;
|
|
26
|
+
private placeConfigured;
|
|
27
|
+
constructor(router: PlaceRouter, placeHistory: PlaceHistory);
|
|
28
|
+
readonly incomingRouteChange: ValueModel<boolean>;
|
|
17
29
|
ngOnInit(): void;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
onOutletActivated($event: PlaceComponent): void;
|
|
21
|
-
onOutletDeactivated($event: PlaceComponent): void;
|
|
30
|
+
onOutletActivated(routerOutlet: RouterOutlet, place: PlaceRef): void;
|
|
31
|
+
onOutletDeactivated(routerOutlet: RouterOutlet, $event: PlaceRef): void;
|
|
22
32
|
getPlaceOrder(outlet: RouterOutlet): any;
|
|
23
33
|
animationDone(): void;
|
|
24
|
-
|
|
34
|
+
pushChangesToRoute(next: ParameterSnapshot, previous: ParameterSnapshot): void;
|
|
35
|
+
sanitise(snapshot: ParameterSnapshot, callback: (sanitised: ParameterSnapshot) => void): ParameterSnapshot;
|
|
25
36
|
}
|
|
37
|
+
export {};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Injector } from '@angular/core';
|
|
2
|
+
import { ActivatedRouteSnapshot, CanActivate, RouterStateSnapshot, UrlTree } from '@angular/router';
|
|
2
3
|
import { Observable } from 'rxjs';
|
|
3
|
-
import {
|
|
4
|
+
import { PlaceRouter } from '../place-router';
|
|
4
5
|
export declare class PlaceRouteGuard implements CanActivate {
|
|
5
|
-
private readonly
|
|
6
|
-
private readonly
|
|
7
|
-
constructor(
|
|
8
|
-
canActivate(
|
|
6
|
+
private readonly placeRouter;
|
|
7
|
+
private readonly injector;
|
|
8
|
+
constructor(placeRouter: PlaceRouter, injector: Injector);
|
|
9
|
+
canActivate(activatedRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree;
|
|
9
10
|
}
|
package/lib/place/index.d.ts
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
* @file Automatically generated by barrelsby.
|
|
3
3
|
*/
|
|
4
4
|
export * from "./nav-item";
|
|
5
|
-
export * from "./place-component-like";
|
|
6
5
|
export * from "./place-component";
|
|
7
|
-
export * from "./place-
|
|
6
|
+
export * from "./place-definition";
|
|
7
|
+
export * from "./place-history";
|
|
8
|
+
export * from "./place-router";
|
|
8
9
|
export * from "./place.decorator";
|
|
9
10
|
export * from "./place.module";
|
|
10
|
-
export * from "./place.service";
|
|
11
11
|
export * from "./visit";
|
|
12
12
|
export * from "./components/abstract-place-navigation.component";
|
|
13
13
|
export * from "./components/busy-overlay/busy-overlay.component";
|
|
@@ -1,52 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Constructable, MutableValueModel, ValueModel } from '@coolon/pectin';
|
|
1
|
+
import { Constructable, ValueModel } from '@coolon/pectin';
|
|
3
2
|
import 'reflect-metadata';
|
|
4
3
|
import { DisposableComponent } from '../components/disposable-component';
|
|
5
|
-
import {
|
|
6
|
-
import { PlaceUpdatesService } from './place-updates-service';
|
|
4
|
+
import { PlaceDefinition } from './place-definition';
|
|
7
5
|
import { ParameterDefinition } from './route/parameter-definition.class';
|
|
6
|
+
import { ParameterSnapshot } from './route/parameter-snapshot';
|
|
8
7
|
export declare const DEFINITION_META_DATA_KEY = "PLACE_DEFINITION_OPTIONS";
|
|
9
8
|
export declare const ROUTE_PARAMETER_LIST_KEY: unique symbol;
|
|
10
|
-
export declare class PlaceComponent extends DisposableComponent
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
constructor(activatedRoute: ActivatedRoute, placeService: PlaceUpdatesService);
|
|
15
|
-
readonly incomingRouteChange: ValueModel<boolean>;
|
|
9
|
+
export declare class PlaceComponent extends DisposableComponent {
|
|
10
|
+
private resolvedParameters;
|
|
11
|
+
constructor();
|
|
12
|
+
initialiseBindings(resolvedParameters: ValueModel<ParameterSnapshot>): void;
|
|
16
13
|
private installBinding;
|
|
17
|
-
readonly placeDefinition:
|
|
14
|
+
readonly placeDefinition: PlaceDefinition;
|
|
15
|
+
readonly childPlaces: Constructable<PlaceComponent>[];
|
|
18
16
|
canDeactivate(): boolean | Promise<boolean>;
|
|
19
17
|
onPlaceReady(): void;
|
|
20
18
|
}
|
|
21
19
|
export declare namespace PlaceComponent {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
readonly order: number;
|
|
27
|
-
readonly data: {
|
|
28
|
-
[key: string]: any;
|
|
29
|
-
};
|
|
30
|
-
readonly children: Constructable<PlaceComponent>[];
|
|
31
|
-
constructor(component: Constructable<PlaceComponent>, options: PlaceComponent.Options);
|
|
32
|
-
getRouteParameters(): ParameterDefinition<any>[];
|
|
33
|
-
isDescriptorForType(constructable: Constructable<PlaceComponent>): boolean;
|
|
34
|
-
isDescriptorFor(placeComponent: PlaceComponent): boolean;
|
|
35
|
-
getData<T>(key: string, defaultValue?: T): T;
|
|
36
|
-
searchData<T>(keys: string[], defaultValue?: T): T;
|
|
37
|
-
}
|
|
38
|
-
interface Options {
|
|
39
|
-
path: string;
|
|
40
|
-
order: number;
|
|
41
|
-
data?: {
|
|
42
|
-
[key: string]: any;
|
|
43
|
-
};
|
|
44
|
-
authenticate?: boolean;
|
|
45
|
-
children?: Constructable<PlaceComponent>[];
|
|
46
|
-
}
|
|
47
|
-
interface ChildOptions extends Options {
|
|
48
|
-
parent: Constructable<PlaceComponent>;
|
|
49
|
-
}
|
|
50
|
-
function getDefinition(klass: Constructable<PlaceComponent>): Definition;
|
|
51
|
-
function injectDefinition(klass: Constructable<PlaceComponent>, options: Options): void;
|
|
20
|
+
function isPlaceComponentConstructor(target: any): target is Constructable<PlaceComponent>;
|
|
21
|
+
function getRouteParameters(klass: Constructable<PlaceComponent>): ParameterDefinition<any>[];
|
|
22
|
+
function getDefinition(klass: Constructable<PlaceComponent>): PlaceDefinition;
|
|
23
|
+
function injectDefinition(klass: Constructable<PlaceComponent>, definition: PlaceDefinition): void;
|
|
52
24
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Constructable } from '@coolon/pectin';
|
|
2
|
+
import { PlaceComponent } from './place-component';
|
|
3
|
+
import { ParameterDefinition } from './route/parameter-definition.class';
|
|
4
|
+
export declare class PlaceDefinition {
|
|
5
|
+
readonly component: Constructable<PlaceComponent>;
|
|
6
|
+
readonly path: string;
|
|
7
|
+
readonly authenticate: boolean;
|
|
8
|
+
readonly order: number;
|
|
9
|
+
readonly data: {
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
};
|
|
12
|
+
readonly routeParameters: ParameterDefinition<any>[];
|
|
13
|
+
readonly children: PlaceDefinition[];
|
|
14
|
+
constructor(component: Constructable<PlaceComponent>, path: string, authenticate: boolean, order: number, data: {
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
}, routeParameters: ParameterDefinition<any>[], children: PlaceDefinition[]);
|
|
17
|
+
getRouteParameters(): ParameterDefinition<any>[];
|
|
18
|
+
getData<T>(key: string, defaultValue?: T): T;
|
|
19
|
+
searchData<T>(keys: string[], defaultValue?: T): T;
|
|
20
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Router } from '@angular/router';
|
|
2
|
+
import { ParameterSnapshot } from './route/parameter-snapshot';
|
|
3
|
+
export declare class PlaceHistory {
|
|
4
|
+
private readonly router;
|
|
5
|
+
private _history;
|
|
6
|
+
constructor(router: Router);
|
|
7
|
+
add(state: ParameterSnapshot): void;
|
|
8
|
+
}
|
|
9
|
+
export declare namespace VisitHistory {
|
|
10
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ActivatedRoute, ActivatedRouteSnapshot, Router } from '@angular/router';
|
|
2
|
+
import { ParameterSnapshot } from './route/parameter-snapshot';
|
|
3
|
+
export declare class PlaceRouter {
|
|
4
|
+
private readonly router;
|
|
5
|
+
constructor(router: Router);
|
|
6
|
+
pushParameterChangesToRoute(activatedRoute: ActivatedRoute, previous: ParameterSnapshot, next: ParameterSnapshot): void;
|
|
7
|
+
createUrlTree(activatedRoute: ActivatedRouteSnapshot, sanitised: ParameterSnapshot, snapshot: ParameterSnapshot): import("@angular/router").UrlTree;
|
|
8
|
+
protected redirect(activatedRoute: ActivatedRouteSnapshot, previous: ParameterSnapshot, next: ParameterSnapshot): {}[];
|
|
9
|
+
}
|
|
@@ -1,2 +1,14 @@
|
|
|
1
|
+
import { Constructable } from '@coolon/pectin';
|
|
1
2
|
import { PlaceComponent } from './place-component';
|
|
2
|
-
export declare function Place(options:
|
|
3
|
+
export declare function Place(options: Place.Options): (target: Function) => void;
|
|
4
|
+
export declare namespace Place {
|
|
5
|
+
interface Options {
|
|
6
|
+
path: string;
|
|
7
|
+
order: number;
|
|
8
|
+
data?: {
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
};
|
|
11
|
+
authenticate?: boolean;
|
|
12
|
+
children?: Constructable<PlaceComponent>[];
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import { PlaceService } from '../place.service';
|
|
2
1
|
import { Visit } from '../visit';
|
|
3
2
|
import { ParameterDefinition } from './parameter-definition.class';
|
|
4
3
|
import { ParameterSanitiser } from './parameter-sanitiser';
|
|
5
4
|
export declare class DefaultParameterSanitiser<T, S> implements ParameterSanitiser<S> {
|
|
6
5
|
private def;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
constructor(def: ParameterDefinition<T, S>, placeService: PlaceService, options: ParameterSanitiser.Options<S>);
|
|
6
|
+
readonly remember: boolean;
|
|
7
|
+
readonly defaultValue: S;
|
|
8
|
+
constructor(def: ParameterDefinition<T, S>, remember: boolean, defaultValue: S);
|
|
11
9
|
sanitise(value: S, visit: Visit): Promise<S> | S;
|
|
12
10
|
private isBlank;
|
|
13
11
|
}
|
|
@@ -1,19 +1,15 @@
|
|
|
1
|
-
import { Constructable } from '@coolon/pectin';
|
|
2
|
-
import { ParameterSanitiser } from './parameter-sanitiser';
|
|
3
1
|
import { ParameterType } from './parameter-type';
|
|
4
2
|
export interface ParameterOptions<T> {
|
|
5
3
|
as?: string;
|
|
6
4
|
optional?: boolean;
|
|
7
5
|
remember?: boolean;
|
|
8
6
|
defaultValue?: T;
|
|
9
|
-
sanitiser?: Constructable<ParameterSanitiser<T>> | ParameterSanitiser.Options<T>;
|
|
10
7
|
}
|
|
11
8
|
export interface ListParameterOptions<T> {
|
|
12
9
|
as?: string;
|
|
13
10
|
optional?: boolean;
|
|
14
11
|
remember?: boolean;
|
|
15
12
|
defaultValue?: T[];
|
|
16
|
-
sanitiser?: Constructable<ParameterSanitiser<T[]>> | ParameterSanitiser.Options<T[]>;
|
|
17
13
|
}
|
|
18
14
|
export declare function RouteId<T extends string | number>(type: ParameterType<T>, options?: ParameterOptions<T>): PropertyDecorator;
|
|
19
15
|
export declare function RouteParameter<T>(type: ParameterType<T>, options?: ParameterOptions<T>): PropertyDecorator;
|
|
@@ -1,11 +1,34 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Injector } from '@angular/core';
|
|
2
|
+
import { DefaultParameterSanitiser } from './default-parameter-sanitiser';
|
|
2
3
|
import { ParameterSanitiser } from './parameter-sanitiser';
|
|
3
4
|
import { ParameterType } from './parameter-type';
|
|
4
|
-
export
|
|
5
|
-
readonly name: string;
|
|
5
|
+
export declare abstract class ParameterDefinition<T, S = T> {
|
|
6
6
|
readonly propertyName: string;
|
|
7
7
|
readonly type: ParameterType<T>;
|
|
8
|
-
readonly
|
|
9
|
-
readonly
|
|
10
|
-
readonly
|
|
8
|
+
abstract readonly isRouteId: boolean;
|
|
9
|
+
abstract readonly isArray: boolean;
|
|
10
|
+
readonly name: string;
|
|
11
|
+
readonly sanitiser: DefaultParameterSanitiser<T, S>;
|
|
12
|
+
constructor(propertyName: string, type: ParameterType<T>, options: ParameterDefinition.Options<S>);
|
|
13
|
+
getSanitiser(injector: Injector): ParameterSanitiser<S>;
|
|
14
|
+
}
|
|
15
|
+
export declare namespace ParameterDefinition {
|
|
16
|
+
interface Options<T> {
|
|
17
|
+
as?: string;
|
|
18
|
+
optional?: boolean;
|
|
19
|
+
remember?: boolean;
|
|
20
|
+
defaultValue?: T;
|
|
21
|
+
}
|
|
22
|
+
class RouteId<T> extends ParameterDefinition<T> {
|
|
23
|
+
readonly isRouteId = true;
|
|
24
|
+
readonly isArray = false;
|
|
25
|
+
}
|
|
26
|
+
class ValueParameter<T> extends ParameterDefinition<T> {
|
|
27
|
+
readonly isRouteId = false;
|
|
28
|
+
readonly isArray = false;
|
|
29
|
+
}
|
|
30
|
+
class ArrayParameter<T> extends ParameterDefinition<T, T[]> {
|
|
31
|
+
readonly isRouteId = false;
|
|
32
|
+
readonly isArray = true;
|
|
33
|
+
}
|
|
11
34
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Injector } from '@angular/core';
|
|
2
|
+
import { ParamMap } from '@angular/router';
|
|
3
|
+
import { PlaceDefinition } from '../place-definition';
|
|
3
4
|
import { Visit } from '../visit';
|
|
4
5
|
import { ParameterDefinition } from './parameter-definition.class';
|
|
5
6
|
export declare class ParameterSnapshot implements Visit {
|
|
6
|
-
readonly placeDefinition:
|
|
7
|
+
readonly placeDefinition: PlaceDefinition;
|
|
7
8
|
private readonly resolved;
|
|
8
|
-
constructor(placeDefinition:
|
|
9
|
+
constructor(placeDefinition: PlaceDefinition, resolved: ParameterSnapshot.ResolvedParameter<any, any>[]);
|
|
9
10
|
hasChanged(other: ParameterSnapshot): boolean;
|
|
10
|
-
asUrlSegment(other: ParameterSnapshot): any[];
|
|
11
11
|
getResolvedParameter<T, S>(parameterDef: ParameterDefinition<T, S>): ParameterSnapshot.ResolvedParameter<T, S>;
|
|
12
12
|
getResolvedParameterValue<T, S>(parameterDef: ParameterDefinition<T, S>): S;
|
|
13
13
|
getRouteId(): any;
|
|
@@ -17,10 +17,10 @@ export declare class ParameterSnapshot implements Visit {
|
|
|
17
17
|
getFormattedRouteId(): string;
|
|
18
18
|
getFormattedParameters(): {};
|
|
19
19
|
replace<T, S>(parameter: ParameterDefinition<T, S>, value: S): ParameterSnapshot;
|
|
20
|
-
|
|
20
|
+
sanitise(injector: Injector): Promise<ParameterSnapshot>;
|
|
21
21
|
}
|
|
22
22
|
export declare namespace ParameterSnapshot {
|
|
23
|
-
function create(placeDef:
|
|
23
|
+
function create(placeDef: PlaceDefinition, paramMap: ParamMap): ParameterSnapshot;
|
|
24
24
|
abstract class ResolvedParameter<T, S = T> {
|
|
25
25
|
readonly parameterDef: ParameterDefinition<T, S>;
|
|
26
26
|
readonly value: S;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Injector } from '@angular/core';
|
|
2
2
|
import { ActivatedRouteSnapshot } from '@angular/router';
|
|
3
|
-
import { PlaceService } from '../place.service';
|
|
4
3
|
import { ParameterDefinition } from './parameter-definition.class';
|
|
5
4
|
import { ParameterSanitiser } from './parameter-sanitiser';
|
|
6
5
|
export declare class Sanitiser<T, S> {
|
|
@@ -21,11 +20,10 @@ export declare class Sanitiser<T, S> {
|
|
|
21
20
|
export declare class RouteParameterSanitiser {
|
|
22
21
|
readonly parameterDefs: ParameterDefinition<any>[];
|
|
23
22
|
readonly snapshot: ActivatedRouteSnapshot;
|
|
24
|
-
readonly placeService: PlaceService;
|
|
25
23
|
readonly injector: Injector;
|
|
26
24
|
private readonly routeIdSanitiser;
|
|
27
25
|
private readonly parameterSanitisers;
|
|
28
|
-
constructor(parameterDefs: ParameterDefinition<any>[], snapshot: ActivatedRouteSnapshot,
|
|
26
|
+
constructor(parameterDefs: ParameterDefinition<any>[], snapshot: ActivatedRouteSnapshot, injector: Injector);
|
|
29
27
|
sanitise(): Promise<boolean>;
|
|
30
28
|
private getSanitiser;
|
|
31
29
|
routeIdHasChanged(): boolean;
|
package/lib/place/visit.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PlaceDefinition } from './place-definition';
|
|
2
2
|
export interface Visit {
|
|
3
|
-
readonly placeDefinition:
|
|
3
|
+
readonly placeDefinition: PlaceDefinition;
|
|
4
4
|
getRouteId(): any;
|
|
5
5
|
getRouteParameter(name: string): any;
|
|
6
6
|
}
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/angular-ui-powerups/schematics/place-routes/index.ts"],"names":[],"mappings":";;AAEA,2CAAwC;AACxC,mDAA+C;AAG/C,SAAgB,cAAc,CAAC,OAAe;IAE5C,OAAO,CAAC,IAAU,EAAE,OAAyB,EAAE,EAAE;QAE/C,eAAM,CAAC,KAAK,CAAC;YACX,EAAE,CAAC,GAAiB;gBAClB,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;YACnC,CAAC;SACF,CAAC,CAAC;QAEH,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QACnD,IAAI,CAAC,eAAe,EAAE;YACpB,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;SACnE;QAED,8BAA8B;QAC9B,MAAM,gBAA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E,SAAS,EAAE,OAAO,CAAC,CAAC;QAEnE,IAAI;YACF,OAAO,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;SACnC;QAAC,OAAO,CAAC,EAAE;YACV,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;SAClB;IACH,CAAC,CAAC;AAEJ,CAAC;AAlCD,wCAkCC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"place-def.js","sourceRoot":"","sources":["../../../../../libs/angular-ui-powerups/schematics/place-routes/place-def.ts"],"names":[],"mappings":";;;;;;;;AACA,0EAA2E;AAE3E,+DAA0D;AAE1D,MAAa,QAAQ;IAInB,YACW,cAAsB,EACtB,UAAkB,EAClB,cAAsB,EACtB,UAA4B,EAC5B,QAA4B,EAC5B,eAAqC,EACrC,SAA8B;QAN9B,mBAAc,GAAd,cAAc,CAAQ;QACtB,eAAU,GAAV,UAAU,CAAQ;QAClB,mBAAc,GAAd,cAAc,CAAQ;QACtB,eAAU,GAAV,UAAU,CAAkB;QAC5B,aAAQ,GAAR,QAAQ,CAAoB;QAC5B,oBAAe,GAAf,eAAe,CAAsB;QACrC,cAAS,GAAT,SAAS,CAAqB;IAEzC,CAAC;IAGD,IAAI,IAAI;QACN,OAAO,QAAQ,CAAC,oBAAoB,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAC7D,CAAC;IAED,IAAI,eAAe;QACjB,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED,IAAI,QAAQ;QACV,OAAO,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;YAC7B,GAAG,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,eAAe,CAAC,aAAa,EAAE,CAAC,CAAC;YACvD,IAAI,CAAC,IAAI,CAAC;IACd,CAAC;IAED,oBAAoB;QAClB,MAAM,IAAI,GAAa,EAAE,CAAC;QAC1B,IAAI,IAAI,CAAC,eAAe,EAAE;YACxB,IAAI,CAAC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
|
1
|
+
{"version":3,"file":"place-def.js","sourceRoot":"","sources":["../../../../../libs/angular-ui-powerups/schematics/place-routes/place-def.ts"],"names":[],"mappings":";;;;;;;;AACA,0EAA2E;AAE3E,+DAA0D;AAE1D,MAAa,QAAQ;IAInB,YACW,cAAsB,EACtB,UAAkB,EAClB,cAAsB,EACtB,UAA4B,EAC5B,QAA4B,EAC5B,eAAqC,EACrC,SAA8B;QAN9B,mBAAc,GAAd,cAAc,CAAQ;QACtB,eAAU,GAAV,UAAU,CAAQ;QAClB,mBAAc,GAAd,cAAc,CAAQ;QACtB,eAAU,GAAV,UAAU,CAAkB;QAC5B,aAAQ,GAAR,QAAQ,CAAoB;QAC5B,oBAAe,GAAf,eAAe,CAAsB;QACrC,cAAS,GAAT,SAAS,CAAqB;IAEzC,CAAC;IAGD,IAAI,IAAI;QACN,OAAO,QAAQ,CAAC,oBAAoB,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAC7D,CAAC;IAED,IAAI,eAAe;QACjB,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED,IAAI,QAAQ;QACV,OAAO,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;YAC7B,GAAG,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,eAAe,CAAC,aAAa,EAAE,CAAC,CAAC;YACvD,IAAI,CAAC,IAAI,CAAC;IACd,CAAC;IAED,oBAAoB;QAClB,MAAM,IAAI,GAAa,EAAE,CAAC;QAC1B,IAAI,IAAI,CAAC,eAAe,EAAE;YACxB,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,eAAe,CAAC,SAAS,IAAI,IAAI,CAAC,eAAe,CAAC,QAAQ,EAAE,CAAC,CAAC;SACjF;QACD,IAAI,IAAI,CAAC,eAAe,IAAI,IAAI,CAAC,eAAe,CAAC,MAAM,GAAG,CAAC,EAAE;YAC3D,MAAM,UAAU,GAAG,IAAI,CAAC,eAAe,CAAC,GAAG,CAA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AK,IAAI,CAAC,cAAc,CAAC,CAAC;YACrH,OAAO,IAAI,CAAC,SAAS,CAAC;QACxB,CAAC;KACF;IAdY,iBAAQ,WAcpB,CAAA;AAGH,CAAC,EA1CgB,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QA0CxB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// DO NOT EDIT!!!
|
|
2
|
+
// This file is automatically generated using:
|
|
3
|
+
// ng generate @coolon/angular-ui-powerups:place-routes --project=<%=project%>
|
|
4
|
+
//
|
|
5
|
+
// Configuration file must be located in `places.json` or `places.json5` in your app root e.g. `apps/my-project`.
|
|
6
|
+
// {
|
|
7
|
+
// authGuard: {
|
|
8
|
+
// className: "MyApplicationAuthGuardClass",
|
|
9
|
+
// moduleImport: "./guards/myApplicationAuthGuardClass.ts" // a path relative to `apps/my-project/src/app/`
|
|
10
|
+
// }
|
|
11
|
+
// }
|
|
12
|
+
|
|
13
|
+
export const placeDestinations = {
|
|
14
|
+
<% placeDefs.forEach(def => { %>
|
|
15
|
+
<%= def.placeName %>: {
|
|
16
|
+
routeParams(<%=def.getPlaceRouterGoArgs()%>) {
|
|
17
|
+
return <%=def.getPlaceRouterGoRouteParams()%>;
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
<% }) %>
|
|
21
|
+
};
|
|
@@ -17,19 +17,7 @@ import { <%= config.authGuard.className %> } from '<%= config.authGuard.importPa
|
|
|
17
17
|
<% placeDefs.forEach(def => { %>import {<%= def.componentClass %>} from "<%= def.importPath %>";
|
|
18
18
|
<% }); %>
|
|
19
19
|
|
|
20
|
-
export const
|
|
20
|
+
export const placeRoutes = [<% placeDefs.filter(def=> !def.isChild()).forEach(def => { %>
|
|
21
21
|
<%= def.getRouteTemplate() %>,
|
|
22
22
|
<% }) %>
|
|
23
23
|
];
|
|
24
|
-
|
|
25
|
-
export const ROUTE_PARAMS = {
|
|
26
|
-
<% placeDefs.forEach(def => { %>
|
|
27
|
-
<%= def.placeName %>: {
|
|
28
|
-
component: <%= def.componentClass %>,
|
|
29
|
-
routeParams(<%=def.getPlaceRouterGoArgs()%>) {
|
|
30
|
-
return <%=def.getPlaceRouterGoRouteParams()%>;
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
<% }) %>
|
|
34
|
-
};
|
|
35
|
-
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview added by tsickle
|
|
3
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @record
|
|
7
|
-
*/
|
|
8
|
-
export function PlaceComponentLike() { }
|
|
9
|
-
if (false) {
|
|
10
|
-
/** @type {?} */
|
|
11
|
-
PlaceComponentLike.prototype.activatedRoute;
|
|
12
|
-
/**
|
|
13
|
-
* @return {?}
|
|
14
|
-
*/
|
|
15
|
-
PlaceComponentLike.prototype.onPlaceReady = function () { };
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGxhY2UtY29tcG9uZW50LWxpa2UuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AY29vbG9uL2FuZ3VsYXItdWktcG93ZXJ1cHMvIiwic291cmNlcyI6WyJsaWIvcGxhY2UvcGxhY2UtY29tcG9uZW50LWxpa2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7OztBQUVBLHdDQUdDOzs7SUFGQyw0Q0FBd0M7Ozs7SUFDeEMsNERBQWUiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBBY3RpdmF0ZWRSb3V0ZSB9IGZyb20gJ0Bhbmd1bGFyL3JvdXRlcic7XG5cbmV4cG9ydCBpbnRlcmZhY2UgUGxhY2VDb21wb25lbnRMaWtlIHtcbiAgcmVhZG9ubHkgYWN0aXZhdGVkUm91dGU6IEFjdGl2YXRlZFJvdXRlO1xuICBvblBsYWNlUmVhZHkoKTtcbn1cbiJdfQ==
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview added by tsickle
|
|
3
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @record
|
|
7
|
-
*/
|
|
8
|
-
export function PlaceUpdatesService() { }
|
|
9
|
-
if (false) {
|
|
10
|
-
/**
|
|
11
|
-
* @param {?} params
|
|
12
|
-
* @return {?}
|
|
13
|
-
*/
|
|
14
|
-
PlaceUpdatesService.prototype.notifyRouteParametersChanged = function (params) { };
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGxhY2UtdXBkYXRlcy1zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQGNvb2xvbi9hbmd1bGFyLXVpLXBvd2VydXBzLyIsInNvdXJjZXMiOlsibGliL3BsYWNlL3BsYWNlLXVwZGF0ZXMtc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBSUEseUNBT0M7Ozs7OztJQU5DLG1GQUtHIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgQWN0aXZhdGVkUm91dGUgfSBmcm9tICdAYW5ndWxhci9yb3V0ZXInO1xuaW1wb3J0IHsgUGxhY2VDb21wb25lbnRMaWtlIH0gZnJvbSAnLi9wbGFjZS1jb21wb25lbnQtbGlrZSc7XG5pbXBvcnQgeyBQYXJhbWV0ZXJTbmFwc2hvdCB9IGZyb20gJy4vcm91dGUvcGFyYW1ldGVyLXNuYXBzaG90JztcblxuZXhwb3J0IGludGVyZmFjZSBQbGFjZVVwZGF0ZXNTZXJ2aWNlIHtcbiAgbm90aWZ5Um91dGVQYXJhbWV0ZXJzQ2hhbmdlZChwYXJhbXM6IHtcbiAgICBhY3RpdmF0ZWRSb3V0ZTogQWN0aXZhdGVkUm91dGUsXG4gICAgbmV4dDogUGFyYW1ldGVyU25hcHNob3QsXG4gICAgcHJldmlvdXM6IFBhcmFtZXRlclNuYXBzaG90LFxuICAgIHVwZGF0ZVJvdXRlOiBib29sZWFuXG4gIH0pO1xufVxuIl19
|