@coolon/angular-ui-powerups 11.0.0-alpha.16 → 11.0.0-alpha.2
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/assets/table.scss +6 -13
- package/bundles/coolon-angular-ui-powerups.umd.js +97 -193
- 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/components/card-container/card-container.component.js +1 -1
- package/esm2015/lib/components/card-container/card-container.component.metadata.json +1 -1
- package/esm2015/lib/components/commands/command/command.component.js +1 -5
- package/esm2015/lib/components/commands/command/command.component.js.map +1 -1
- package/esm2015/lib/components/commands/command/command.component.metadata.json +1 -1
- package/esm2015/lib/components/components.module.js +3 -0
- package/esm2015/lib/components/components.module.js.map +1 -1
- package/esm2015/lib/components/components.module.metadata.json +1 -1
- package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
- package/esm2015/lib/components/table/column-model.js +1 -2
- package/esm2015/lib/components/table/column-model.js.map +1 -1
- package/esm2015/lib/components/table/column-model.metadata.json +1 -1
- package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.js.map +1 -1
- package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.metadata.json +1 -1
- package/esm2015/lib/components/table/table-model.js +0 -9
- package/esm2015/lib/components/table/table-model.js.map +1 -1
- package/esm2015/lib/components/table/table-model.metadata.json +1 -1
- package/esm2015/lib/components/table/table.component.js +3 -30
- package/esm2015/lib/components/table/table.component.js.map +1 -1
- package/esm2015/lib/components/table/table.component.metadata.json +1 -1
- package/esm2015/lib/components/track-by.js +1 -5
- package/esm2015/lib/components/track-by.js.map +1 -1
- package/esm2015/lib/components/tree-table/decorated-tree-node.js +22 -19
- package/esm2015/lib/components/tree-table/decorated-tree-node.js.map +1 -1
- package/esm2015/lib/components/tree-table/tree-table-component.js +4 -21
- package/esm2015/lib/components/tree-table/tree-table-component.js.map +1 -1
- package/esm2015/lib/components/tree-table/tree-table-component.metadata.json +1 -1
- package/esm2015/lib/place/components/abstract-place-navigation.component.js +11 -21
- 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/list-place-nav/list-place-nav.component.js +1 -1
- package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.js.map +1 -1
- package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.metadata.json +1 -1
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +14 -23
- 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/components/side-place-navigation/side-place-navigation.component.js +1 -1
- package/esm2015/lib/place/components/side-place-navigation/side-place-navigation.component.js.map +1 -1
- package/esm2015/lib/place/components/side-place-navigation/side-place-navigation.component.metadata.json +1 -1
- package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +1 -1
- package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js.map +1 -1
- package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.metadata.json +1 -1
- package/esm2015/lib/place/exports.js +0 -1
- 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 +8 -5
- package/esm2015/lib/place/guards/place.guard.js.map +1 -1
- package/esm2015/lib/place/navigation/place-component-deactivation-handler.js +0 -2
- package/esm2015/lib/place/navigation/place-component-deactivation-handler.js.map +1 -1
- package/esm2015/lib/place/place-component.js +3 -1
- package/esm2015/lib/place/place-component.js.map +1 -1
- package/esm2015/lib/place/place-component.metadata.json +1 -1
- package/esm2015/lib/place/place-router.js +4 -15
- 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 +2 -6
- 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 +79 -173
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/commands/command/command.component.d.ts +1 -2
- package/lib/components/table/column-model.d.ts +0 -1
- package/lib/components/table/table-model.d.ts +0 -9
- package/lib/components/table/table.component.d.ts +6 -24
- package/lib/components/track-by.d.ts +1 -3
- package/lib/components/tree-table/tree-table-component.d.ts +0 -9
- package/lib/place/components/abstract-place-navigation.component.d.ts +2 -9
- package/lib/place/components/place-outlet/place-outlet.component.d.ts +3 -10
- package/lib/place/exports.d.ts +0 -1
- package/lib/place/place-component.d.ts +1 -1
- package/lib/place/place-router.d.ts +6 -10
- package/package.json +1 -1
- package/schematics/aup-i18n/index.js +28 -8
- package/schematics/aup-i18n/index.js.map +1 -1
- package/schematics/aup-i18n/templates/i18n/aup/components.yml.template +69 -0
- package/schematics/bootstrap-app/index.js +4 -5
- package/schematics/bootstrap-app/index.js.map +1 -1
- package/schematics/bootstrap-app/templates/{i18n.config.json.template → i18n/config.json.template} +0 -2
- package/schematics/bootstrap-app/templates/i18n/notifications.yml.template +19 -0
- package/schematics/ng-add/index.js +2 -2
- package/schematics/ng-add/index.js.map +1 -1
- package/schematics/place-add/index.js +5 -4
- package/schematics/place-add/index.js.map +1 -1
- package/schematics/place-add/templates/component/__name@dasherize__.component.ts.template +1 -3
- package/schematics/place-add/templates/files/i18n/places/__name@dasherize__.yml.template +7 -0
- package/schematics/utils/build-context.d.ts +5 -4
- package/schematics/utils/workspace.d.ts +4 -3
- package/schematics/utils/workspace.js.map +1 -1
- package/esm2015/lib/place/components/not-authorised-notice/not-authorised-notice.component.js +0 -14
- package/esm2015/lib/place/components/not-authorised-notice/not-authorised-notice.component.js.map +0 -1
- package/esm2015/lib/place/components/not-authorised-notice/not-authorised-notice.component.metadata.json +0 -1
- package/esm2015/lib/place/components/not-authorised-notice/not-authorised-notice.component.ngfactory.js.map +0 -1
- package/esm2015/lib/place/components/not-authorised-notice/not-authorised-notice.component.scss.shim.ngstyle.js.map +0 -1
- package/lib/place/components/not-authorised-notice/not-authorised-notice.component.d.ts +0 -3
- package/schematics/aup-i18n/templates/app/aup.i18n.yml.template +0 -80
- package/schematics/place-add/templates/component/__name@dasherize__.i18n.yml.template +0 -5
- /package/schematics/bootstrap-app/templates/{src/app → app}/app-routing.module.ts.template +0 -0
- /package/schematics/bootstrap-app/templates/{src/app → app}/app.component.html.template +0 -0
- /package/schematics/bootstrap-app/templates/{src/app → app}/app.component.scss.template +0 -0
- /package/schematics/bootstrap-app/templates/{src/app → app}/app.component.ts.template +0 -0
- /package/schematics/bootstrap-app/templates/{src/app → app}/app.module.ts.template +0 -0
- /package/schematics/bootstrap-app/templates/{src/app → app}/i18n.ts.template +0 -0
- /package/schematics/bootstrap-app/templates/{src/assets → assets}/fonts/material-design-icons/MaterialIcons-Regular.eot +0 -0
- /package/schematics/bootstrap-app/templates/{src/assets → assets}/fonts/material-design-icons/MaterialIcons-Regular.ijmap +0 -0
- /package/schematics/bootstrap-app/templates/{src/assets → assets}/fonts/material-design-icons/MaterialIcons-Regular.svg +0 -0
- /package/schematics/bootstrap-app/templates/{src/assets → assets}/fonts/material-design-icons/MaterialIcons-Regular.ttf +0 -0
- /package/schematics/bootstrap-app/templates/{src/assets → assets}/fonts/material-design-icons/MaterialIcons-Regular.woff +0 -0
- /package/schematics/bootstrap-app/templates/{src/assets → assets}/fonts/material-design-icons/MaterialIcons-Regular.woff2 +0 -0
- /package/schematics/bootstrap-app/templates/{src/assets → assets}/fonts/material-design-icons/README.md +0 -0
- /package/schematics/bootstrap-app/templates/{src/assets → assets}/fonts/material-design-icons/codepoints +0 -0
- /package/schematics/bootstrap-app/templates/{src/assets → assets}/fonts/material-design-icons/material-icons.css +0 -0
- /package/schematics/bootstrap-app/templates/{src/index.html.template → index.html.template} +0 -0
- /package/schematics/bootstrap-app/templates/{src/styles → styles}/global-variables.scss.template +0 -0
- /package/schematics/bootstrap-app/templates/{src/styles.scss.template → styles.scss.template} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AfterViewInit, ElementRef, OnInit } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { Command, ListModelChain, ValueModel, ValueModelChain } from '@coolon/pectin';
|
|
3
3
|
import { CommandFace } from '../command-face';
|
|
4
4
|
import { PopupAwareComponent } from '../group/popup-aware.component';
|
|
5
5
|
import { PopupContainer } from '../group/popup-container';
|
|
@@ -17,7 +17,6 @@ export declare class CommandComponent extends PopupAwareComponent implements OnI
|
|
|
17
17
|
readonly buttonStyle: ValueModelChain<string>;
|
|
18
18
|
readonly colorModel: ValueModelChain<'primary' | 'accent' | 'warn' | undefined>;
|
|
19
19
|
private activeFace;
|
|
20
|
-
readonly iconOnly: BooleanValueModelChain;
|
|
21
20
|
constructor(element: ElementRef, parent?: PopupContainer);
|
|
22
21
|
isActive(face: CommandFace): boolean;
|
|
23
22
|
ngOnInit(): void;
|
|
@@ -32,7 +32,6 @@ export declare class ColumnModel<Row> {
|
|
|
32
32
|
private _selectRowOnClick;
|
|
33
33
|
private _flex;
|
|
34
34
|
private _visibleModel;
|
|
35
|
-
readonly dasherisedColumnId: string;
|
|
36
35
|
constructor(columnId: string, textPropertiesProvider: ColumnModel.TextPropertiesProvider);
|
|
37
36
|
protected installHeaderRenderer(): void;
|
|
38
37
|
getHeaderText(): string;
|
|
@@ -54,15 +54,6 @@ import { SelectionColumnModel } from './column-model';
|
|
|
54
54
|
* table.addCustomColumn("fullName", hero => `${hero.firstName} ${hero.lastName}`);
|
|
55
55
|
* });
|
|
56
56
|
*
|
|
57
|
-
* Template columns
|
|
58
|
-
* @example
|
|
59
|
-
* const model = TableModel.fromList(heroList, table => {
|
|
60
|
-
* table.addSelectionColumn(selectionModel); // <- can be single or multiple selection model
|
|
61
|
-
* table.addTemplateColumn("myTemplate");
|
|
62
|
-
* });
|
|
63
|
-
*
|
|
64
|
-
* <div *aupColumnTemplate="let hero; columnId: 'myTemplate'">{{hero.age}}</div>
|
|
65
|
-
*
|
|
66
57
|
* I18n
|
|
67
58
|
* @example
|
|
68
59
|
* [table.yml]
|
|
@@ -31,32 +31,15 @@ import { ColumnModel } from './column-model';
|
|
|
31
31
|
*
|
|
32
32
|
* Styling
|
|
33
33
|
* @example
|
|
34
|
-
* // global settings
|
|
35
|
-
* :root {
|
|
36
|
-
* --aup-table-column-gap: 10px; // defaults to 24px
|
|
37
|
-
* --aup-table-row-hover-background-color, rgba(0, 0, 0, 0.05)
|
|
38
|
-
* --aup-table-row-selected-background-color: rebeccapurple; // defaults to transparent
|
|
39
|
-
* --aup-table-first-column-padding-left: 18px // defaults to --column-gap
|
|
40
|
-
* --aup-table-last-column-padding-right: 18px // defaults to --column-gap
|
|
41
|
-
* }
|
|
42
|
-
*
|
|
43
|
-
* // per table settings.
|
|
44
34
|
* aup-table {
|
|
45
35
|
* --column-gap: 10px; // defaults to 24px
|
|
46
36
|
* --row-hover-background-color, rgba(0, 0, 0, 0.05)
|
|
47
37
|
* --row-selected-background-color: rebeccapurple; // defaults to transparent
|
|
48
|
-
* --first-column-padding-left: 18px // defaults to --column-gap
|
|
49
|
-
* --last-column-padding-right: 18px // defaults to --column-gap
|
|
50
|
-
*
|
|
51
|
-
* aup-table-header-cell-renderer,
|
|
52
38
|
* aup-table-cell-renderer {
|
|
53
|
-
*
|
|
39
|
+
* &:first-column {
|
|
54
40
|
* // do stuff
|
|
55
41
|
* }
|
|
56
|
-
*
|
|
57
|
-
* // do stuff
|
|
58
|
-
* }
|
|
59
|
-
* &.last-visible-column {
|
|
42
|
+
* &:last-column {
|
|
60
43
|
* // do stuff
|
|
61
44
|
* }
|
|
62
45
|
* }
|
|
@@ -66,16 +49,16 @@ export declare class TableComponent<Row> extends ResizeAwareComponent implements
|
|
|
66
49
|
tableModel: AbstractTableModel<Row>;
|
|
67
50
|
showHeaderModel: ValueModel<boolean>;
|
|
68
51
|
showHeader: boolean;
|
|
52
|
+
columns: ListModelChain<ColumnModel<Row>>;
|
|
53
|
+
columnIds: ListModelChain<string>;
|
|
54
|
+
private columnsById;
|
|
55
|
+
readonly visibleRowCount: ValueModel<number>;
|
|
69
56
|
/**
|
|
70
57
|
* Set to true to enable scrolling. Once enabled the table will have 0 implicit height. You will either
|
|
71
58
|
* need to set it explicitly e.g. height: 400px; or by using flex or grid layout to make it fill it's
|
|
72
59
|
* containment area.
|
|
73
60
|
*/
|
|
74
61
|
enableScrolling: boolean;
|
|
75
|
-
columns: ListModelChain<ColumnModel<Row>>;
|
|
76
|
-
columnIds: ListModelChain<string>;
|
|
77
|
-
private columnsById;
|
|
78
|
-
readonly visibleRowCount: ValueModel<number>;
|
|
79
62
|
private readonly headerHeight;
|
|
80
63
|
private readonly rowHeight;
|
|
81
64
|
constructor(elementRef: ElementRef, ngZone: NgZone);
|
|
@@ -86,5 +69,4 @@ export declare class TableComponent<Row> extends ResizeAwareComponent implements
|
|
|
86
69
|
notifyCellClicked(columnModel: ColumnModel<Row>, row: Row): void;
|
|
87
70
|
isFirstVisibleColumn(columnId: string): boolean;
|
|
88
71
|
isLastVisibleColumn(columnId: string): boolean;
|
|
89
|
-
getColumnClasses(columnId: string): string[];
|
|
90
72
|
}
|
|
@@ -1,16 +1,7 @@
|
|
|
1
|
-
import { ValueModel } from '@coolon/pectin';
|
|
2
1
|
import { DisposableComponent } from '../disposable-component';
|
|
3
2
|
import { TreeNode } from './tree-node';
|
|
4
3
|
import { TreeTableModel } from './tree-table-model';
|
|
5
4
|
export declare class TreeTableComponent<T extends TreeNode<T>> extends DisposableComponent {
|
|
6
5
|
treeTableModel: TreeTableModel<T>;
|
|
7
|
-
showHeaderModel: ValueModel<boolean>;
|
|
8
|
-
showHeader: boolean;
|
|
9
|
-
/**
|
|
10
|
-
* Set to true to enable scrolling. Once enabled the table will have 0 implicit height. You will either
|
|
11
|
-
* need to set it explicitly e.g. height: 400px; or by using flex or grid layout to make it fill it's
|
|
12
|
-
* containment area.
|
|
13
|
-
*/
|
|
14
|
-
enableScrolling: boolean;
|
|
15
6
|
constructor();
|
|
16
7
|
}
|
|
@@ -6,25 +6,18 @@ import { PlaceComponent } from '../place-component';
|
|
|
6
6
|
import { PlaceDefinition } from '../place-definition';
|
|
7
7
|
import { PlaceRouter } from '../place-router';
|
|
8
8
|
import { PlaceOutletComponent } from './place-outlet/place-outlet.component';
|
|
9
|
-
interface MenuItem {
|
|
10
|
-
active: boolean;
|
|
11
|
-
place: PlaceDefinition;
|
|
12
|
-
}
|
|
13
9
|
export declare class AbstractPlaceNavigationComponent extends DisposableComponent implements OnInit {
|
|
14
10
|
readonly placeRouter: PlaceRouter;
|
|
15
11
|
places: Constructable<PlaceComponent>[];
|
|
16
12
|
placesModel: ListModel<Constructable<PlaceComponent>>;
|
|
17
13
|
placeOutlet: PlaceOutletComponent;
|
|
18
14
|
placeOutletModel: ValueModel<PlaceOutletComponent>;
|
|
19
|
-
|
|
20
|
-
readonly menuItems: ListModelChain<MenuItem>;
|
|
15
|
+
readonly placeDefinitions: ListModelChain<PlaceDefinition>;
|
|
21
16
|
readonly commandFactory: Command.Factory<PlaceDefinition, void>;
|
|
22
17
|
readonly _activePlaceComponent: DelegatingValueModel<PlaceComponent>;
|
|
23
18
|
private activePlaceDefinition;
|
|
24
|
-
readonly trackByPlaceDef: (data: MenuItem) => PlaceDefinition;
|
|
25
19
|
constructor(placeRouter: PlaceRouter);
|
|
26
|
-
protected handlePlaceOutLetChanged(outlet: PlaceOutletComponent): void;
|
|
27
20
|
getNavigationFace(placeDef: PlaceDefinition): CommandFace;
|
|
21
|
+
isActive(place: PlaceDefinition): boolean;
|
|
28
22
|
ngOnInit(): void;
|
|
29
23
|
}
|
|
30
|
-
export {};
|
|
@@ -1,19 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ChangeDetectorRef, EventEmitter, InjectionToken, OnInit } from '@angular/core';
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
3
2
|
import { ActivatedRoute, Router, RouterOutlet } from '@angular/router';
|
|
4
3
|
import { BooleanValueModelChain, Constructable, ListModel, ValueModel, ValueModelChain } from '@coolon/pectin';
|
|
5
4
|
import { DisposableComponent } from '../../../components/disposable-component';
|
|
6
5
|
import { PlaceComponent } from '../../place-component';
|
|
7
6
|
import { PlaceConfig } from '../../place-config';
|
|
8
|
-
import { PlaceDefinition } from '../../place-definition';
|
|
9
7
|
import { PlaceRouter } from '../../place-router';
|
|
10
8
|
import { Visit } from '../../visit';
|
|
11
|
-
export declare const AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT: InjectionToken<Constructable<any>>;
|
|
12
9
|
export declare class PlaceOutletComponent extends DisposableComponent implements OnInit {
|
|
13
10
|
private readonly router;
|
|
14
11
|
private readonly placeRouter;
|
|
15
12
|
readonly placeConfig: PlaceConfig;
|
|
16
|
-
private readonly cdr;
|
|
17
13
|
animate: boolean;
|
|
18
14
|
animateModel: ValueModel<boolean>;
|
|
19
15
|
customPlaceAnimationOrderModel: ListModel<Constructable<PlaceComponent>>;
|
|
@@ -24,7 +20,7 @@ export declare class PlaceOutletComponent extends DisposableComponent implements
|
|
|
24
20
|
private outletActivated;
|
|
25
21
|
private readonly _activatedRouteModel;
|
|
26
22
|
private readonly _activePlaceModel;
|
|
27
|
-
readonly _activePlaceDefinition
|
|
23
|
+
private readonly _activePlaceDefinition;
|
|
28
24
|
private parentOutletModel;
|
|
29
25
|
readonly activePlaceAnimationPosition: ValueModelChain<number>;
|
|
30
26
|
private initialPlaceIndex;
|
|
@@ -35,13 +31,10 @@ export declare class PlaceOutletComponent extends DisposableComponent implements
|
|
|
35
31
|
private placesInAnimationOrder;
|
|
36
32
|
private animationSupported;
|
|
37
33
|
readonly animationEnabled: BooleanValueModelChain;
|
|
38
|
-
|
|
39
|
-
readonly notAuthorisedNoticePortal: ComponentPortal<any>;
|
|
40
|
-
constructor(router: Router, placeRouter: PlaceRouter, placeConfig: PlaceConfig, unauthorisedPlaceNotice: Constructable<any>, parentOutlet: PlaceOutletComponent, cdr: ChangeDetectorRef);
|
|
34
|
+
constructor(router: Router, placeRouter: PlaceRouter, placeConfig: PlaceConfig, parentOutlet: PlaceOutletComponent);
|
|
41
35
|
ngOnInit(): void;
|
|
42
36
|
getAnimationOrder(): number;
|
|
43
37
|
get animationDuration(): string;
|
|
44
|
-
get isAuthorised(): boolean;
|
|
45
38
|
navigate(visit: Visit): void;
|
|
46
39
|
get parentOutlet(): PlaceOutletComponent;
|
|
47
40
|
get activePlaceModel(): ValueModel<PlaceComponent>;
|
package/lib/place/exports.d.ts
CHANGED
|
@@ -15,7 +15,6 @@ 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";
|
|
19
18
|
export * from "./components/place-outlet/place-outlet.component";
|
|
20
19
|
export * from "./components/place-outlet/route-animations";
|
|
21
20
|
export * from "./components/side-place-navigation/side-place-navigation.component";
|
|
@@ -13,7 +13,6 @@ export declare class PlaceComponent extends DisposableComponent {
|
|
|
13
13
|
private _inVisitUpdate;
|
|
14
14
|
private _active;
|
|
15
15
|
interactionContext?: InteractionContext;
|
|
16
|
-
readonly childPlaces: ReadonlyArray<Constructable<PlaceComponent>>;
|
|
17
16
|
canDeactivate?(interactionContext: InteractionContext): boolean | Promise<boolean>;
|
|
18
17
|
constructor();
|
|
19
18
|
initialiseVisit(visit: Visit, notifyVisitChanged: (current: Visit, previous: Visit) => void): void;
|
|
@@ -21,6 +20,7 @@ export declare class PlaceComponent extends DisposableComponent {
|
|
|
21
20
|
isInitialised(): boolean;
|
|
22
21
|
private installBinding;
|
|
23
22
|
get placeDefinition(): PlaceDefinition;
|
|
23
|
+
get childPlaces(): Constructable<PlaceComponent>[];
|
|
24
24
|
get active(): import("@coolon/pectin").ValueModel<boolean>;
|
|
25
25
|
/**
|
|
26
26
|
* Called by the router when the place is ready to interact after any animations have run.
|
|
@@ -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, MutableValueModel, ValueModel, ValueModelChain } from '@coolon/pectin';
|
|
3
|
+
import { GarbageCollector, ListModel, MapModelChain, 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,19 +20,20 @@ export declare class PlaceRouter extends GarbageCollector {
|
|
|
20
20
|
readonly navigationSessionName: ValueModelChain<string>;
|
|
21
21
|
private readonly navigationContext;
|
|
22
22
|
private readonly _activeVisits;
|
|
23
|
-
|
|
23
|
+
readonly activeVisitsByPlaceDefinition: MapModelChain<PlaceDefinition, Visit>;
|
|
24
|
+
private routerInteractionAdapter;
|
|
24
25
|
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
|
|
30
|
+
private _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;
|
|
36
37
|
get navigationSession(): NavigationSession;
|
|
37
38
|
get currentSession(): NavigationSession;
|
|
38
39
|
isNavigating(): boolean;
|
|
@@ -65,11 +66,6 @@ export declare class PlaceRouter extends GarbageCollector {
|
|
|
65
66
|
export declare namespace PlaceRouter {
|
|
66
67
|
interface Redirections {
|
|
67
68
|
onAuthenticationFailure(activatedRoute?: ActivatedRouteSnapshot, state?: RouterStateSnapshot): Visit;
|
|
68
|
-
|
|
69
|
-
class State {
|
|
70
|
-
private readonly activeVisits;
|
|
71
|
-
constructor(activeVisits: Visit[]);
|
|
72
|
-
isPlaceActive(placeDefinition: PlaceDefinition): boolean;
|
|
73
|
-
getVisitFor(placeDefinition: PlaceDefinition): Visit;
|
|
69
|
+
onAuthorisationFailure(activatedRoute?: ActivatedRouteSnapshot, state?: RouterStateSnapshot): Visit;
|
|
74
70
|
}
|
|
75
71
|
}
|
package/package.json
CHANGED
|
@@ -4,7 +4,6 @@ exports.applyWithOverwrite = exports.run = void 0;
|
|
|
4
4
|
const core_1 = require("@angular-devkit/core");
|
|
5
5
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
6
6
|
const workspace_1 = require("../utils/workspace");
|
|
7
|
-
const package_util_1 = require("../package-util");
|
|
8
7
|
// @see https://javascript-conference.com/blog/how-to-create-your-own-angular-schematics/
|
|
9
8
|
function run(_options) {
|
|
10
9
|
return (tree, _context) => {
|
|
@@ -14,17 +13,38 @@ function run(_options) {
|
|
|
14
13
|
schematics_1.applyTemplates(Object.assign(Object.assign({}, _options), core_1.strings)),
|
|
15
14
|
schematics_1.move(buildContext.sourceRoot)
|
|
16
15
|
]);
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
16
|
+
const rules = [templateSource];
|
|
17
|
+
// if (_options.initialPlaceName) {
|
|
18
|
+
// rules.push(externalSchematic('@coolon/angular-ui-powerups', 'place-add', {
|
|
19
|
+
// project: _options.project,
|
|
20
|
+
// name: `places/${_options.initialPlaceName}`
|
|
21
|
+
// })
|
|
22
|
+
// );
|
|
23
|
+
// }
|
|
24
24
|
return schematics_1.chain(rules)(tree, _context);
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
27
|
exports.run = run;
|
|
28
|
+
// function updatePackageJsonScripts(_options: Schema): Rule {
|
|
29
|
+
// return (tree: Tree, _: SchematicContext): Tree => {
|
|
30
|
+
// return updatePackageJson(tree, draft => {
|
|
31
|
+
// draft.scripts = {
|
|
32
|
+
// ...draft.scripts,
|
|
33
|
+
// [`i18n:${_options.project}`]: `i18n-resource-generator apps/${_options.project}/src/i18n apps/${_options.project}/src/app`,
|
|
34
|
+
// [`place-routes:${_options.project}`]: `ng generate @coolon/angular-ui-powerups:place-routes --project ${_options.project}`,
|
|
35
|
+
// [`build:${_options.project}`]: `nx build --prod --project ${_options.project}`,
|
|
36
|
+
// [`start:${_options.project}`]: `nx serve --project ${_options.project}`
|
|
37
|
+
// };
|
|
38
|
+
// draft.watch = {
|
|
39
|
+
// ...draft.watch,
|
|
40
|
+
// [`i18n:${_options.project}`]: {
|
|
41
|
+
// "patterns": [`apps/${_options.project}/src/i18n`],
|
|
42
|
+
// "extensions": "yml"
|
|
43
|
+
// }
|
|
44
|
+
// }
|
|
45
|
+
// });
|
|
46
|
+
// };
|
|
47
|
+
// }
|
|
28
48
|
// See https://stackoverflow.com/a/53230034
|
|
29
49
|
function applyWithOverwrite(source, rules) {
|
|
30
50
|
return (tree, _context) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/angular-ui-powerups/schematics/aup-i18n/index.ts"],"names":[],"mappings":";;;AAAA,+CAA6D;AAC7D,2DAaoC;AACpC,kDAA+C;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/angular-ui-powerups/schematics/aup-i18n/index.ts"],"names":[],"mappings":";;;AAAA,+CAA6D;AAC7D,2DAaoC;AACpC,kDAA+C;AAG/C,yFAAyF;AAEzF,SAAgB,GAAG,CAAC,QAAgB;IAElC,OAAO,CAAC,IAAU,EAAE,QAA0B,EAAE,EAAE;QAEhD,MAAM,SAAS,GAAG,qBAAS,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QACjD,MAAM,YAAY,GAAG,SAAS,CAAC,uBAAuB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;QAExE,MAAM,cAAc,GAAG,kBAAkB,CACvC,gBAAG,CAAC,aAAa,CAAC,EAAE;YAClB,2BAAc,iCAAM,QAAQ,GAAK,cAAO,EAAG;YAC3C,iBAAI,CAAC,YAAY,CAAC,UAAU,CAAC;SAC9B,CAAC,CAAC;QAEL,MAAM,KAAK,GAAG,CAAC,cAAc,CAAC,CAAC;QAC/B,mCAAmC;QACnC,+EAA+E;QAC/E,mCAAmC;QACnC,oDAAoD;QACpD,SAAS;QACT,OAAO;QACP,IAAI;QACJ,OAAO,kBAAK,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,QAAQ,CAAS,CAAC;IAC9C,CAAC,CAAC;AACJ,CAAC;AAvBD,kBAuBC;AAED,8DAA8D;AAC9D,wDAAwD;AACxD,gDAAgD;AAChD,0BAA0B;AAC1B,4BAA4B;AAC5B,sIAAsI;AACtI,sIAAsI;AACtI,0FAA0F;AAC1F,kFAAkF;AAClF,WAAW;AACX,wBAAwB;AACxB,0BAA0B;AAC1B,0CAA0C;AAC1C,+DAA+D;AAC/D,gCAAgC;AAChC,YAAY;AACZ,UAAU;AACV,UAAU;AACV,OAAO;AACP,IAAI;AAEJ,2CAA2C;AA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
|
+
okCancel:
|
|
6
|
+
confirm(CommandFace):
|
|
7
|
+
text: Ok
|
|
8
|
+
cancel(CommandFace):
|
|
9
|
+
text: Cancel
|
|
10
|
+
okCancelStrokedPrimary:
|
|
11
|
+
confirm(CommandFace):
|
|
12
|
+
text: Ok
|
|
13
|
+
style: stroked
|
|
14
|
+
color: primary
|
|
15
|
+
cancel(CommandFace):
|
|
16
|
+
text: Cancel
|
|
17
|
+
okCancelRaisedPrimary:
|
|
18
|
+
confirm(CommandFace):
|
|
19
|
+
text: Ok
|
|
20
|
+
style: raised
|
|
21
|
+
color: primary
|
|
22
|
+
cancel(CommandFace):
|
|
23
|
+
text: Cancel
|
|
24
|
+
okCancelIcons:
|
|
25
|
+
confirm(CommandFace):
|
|
26
|
+
icon: mat:done
|
|
27
|
+
cancel(CommandFace):
|
|
28
|
+
icon: mat:clear
|
|
29
|
+
|
|
30
|
+
doneCancel:
|
|
31
|
+
confirm(CommandFace):
|
|
32
|
+
text: Done
|
|
33
|
+
cancel(CommandFace):
|
|
34
|
+
text: Cancel
|
|
35
|
+
doneCancelStrokedPrimary:
|
|
36
|
+
confirm(CommandFace):
|
|
37
|
+
text: Done
|
|
38
|
+
style: stroked
|
|
39
|
+
color: primary
|
|
40
|
+
cancel(CommandFace):
|
|
41
|
+
text: Cancel
|
|
42
|
+
doneCancelRaisedPrimary:
|
|
43
|
+
confirm(CommandFace):
|
|
44
|
+
text: Done
|
|
45
|
+
style: raised
|
|
46
|
+
color: primary
|
|
47
|
+
cancel(CommandFace):
|
|
48
|
+
text: Cancel
|
|
49
|
+
|
|
50
|
+
saveCancel:
|
|
51
|
+
confirm(CommandFace):
|
|
52
|
+
text: Save
|
|
53
|
+
cancel(CommandFace):
|
|
54
|
+
text: Cancel
|
|
55
|
+
saveCancelStrokedPrimary:
|
|
56
|
+
confirm(CommandFace):
|
|
57
|
+
text: Save
|
|
58
|
+
style: stroked
|
|
59
|
+
color: primary
|
|
60
|
+
cancel(CommandFace):
|
|
61
|
+
text: Cancel
|
|
62
|
+
saveCancelRaisedPrimary:
|
|
63
|
+
confirm(CommandFace):
|
|
64
|
+
text: Save
|
|
65
|
+
style: raised
|
|
66
|
+
color: primary
|
|
67
|
+
cancel(CommandFace):
|
|
68
|
+
text: Cancel
|
|
69
|
+
|
|
@@ -12,7 +12,7 @@ function bootstrapApp(_options) {
|
|
|
12
12
|
const buildContext = workspace.getApplicationOrDefault(_options.project);
|
|
13
13
|
const templateSource = applyWithOverwrite(schematics_1.url('./templates'), [
|
|
14
14
|
schematics_1.applyTemplates(Object.assign(Object.assign({}, _options), core_1.strings)),
|
|
15
|
-
schematics_1.move(buildContext.
|
|
15
|
+
schematics_1.move(buildContext.sourceRoot)
|
|
16
16
|
]);
|
|
17
17
|
const rules = [
|
|
18
18
|
templateSource,
|
|
@@ -39,11 +39,10 @@ exports.bootstrapApp = bootstrapApp;
|
|
|
39
39
|
function updatePackageJsonScripts(context) {
|
|
40
40
|
return (tree, _) => {
|
|
41
41
|
return package_util_1.updatePackageJson(tree, draft => {
|
|
42
|
-
draft.scripts = Object.assign(Object.assign({}, draft.scripts), { [`i18n:${context.projectName}`]: `i18n-resource-generator ${context.
|
|
42
|
+
draft.scripts = Object.assign(Object.assign({}, draft.scripts), { [`i18n:${context.projectName}`]: `i18n-resource-generator ${context.sourceRoot}/i18n ${context.sourceCodeRoot}`, [`place-routes:${context.projectName}`]: `ng generate @coolon/angular-ui-powerups:place-routes --project ${context.projectName} places`, [`build:${context.projectName}`]: `nx build --prod --project ${context.projectName}`, [`start:${context.projectName}`]: `nx serve --project ${context.projectName}`, [`e2e:${context.projectName}-e2e`]: `nx e2e --watch --project ${context.projectName}-e2e`, [`e2e-headless:${context.projectName}-e2e`]: `nx e2e --headless --project ${context.projectName}-e2e` });
|
|
43
43
|
draft.watch = Object.assign(Object.assign({}, draft.watch), { [`i18n:${context.projectName}`]: {
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"extensions": "i18n.yml"
|
|
44
|
+
"patterns": [`${context.sourceRoot}/i18n`],
|
|
45
|
+
"extensions": "yml"
|
|
47
46
|
} });
|
|
48
47
|
});
|
|
49
48
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/angular-ui-powerups/schematics/bootstrap-app/index.ts"],"names":[],"mappings":";;;AAAA,+CAA6D;AAC7D,2DAaoC;AACpC,kDAAoD;AAEpD,kDAA+C;AAG/C,yFAAyF;AAEzF,SAAgB,YAAY,CAAC,QAAgB;IAE3C,OAAO,CAAC,IAAU,EAAE,QAA0B,EAAE,EAAE;QAEhD,MAAM,SAAS,GAAG,qBAAS,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QACjD,MAAM,YAAY,GAAG,SAAS,CAAC,uBAAuB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;QAExE,MAAM,cAAc,GAAG,kBAAkB,CACvC,gBAAG,CAAC,aAAa,CAAC,EAAE;YAClB,2BAAc,iCAAM,QAAQ,GAAK,cAAO,EAAG;YAC3C,iBAAI,CAAC,YAAY,CAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/angular-ui-powerups/schematics/bootstrap-app/index.ts"],"names":[],"mappings":";;;AAAA,+CAA6D;AAC7D,2DAaoC;AACpC,kDAAoD;AAEpD,kDAA+C;AAG/C,yFAAyF;AAEzF,SAAgB,YAAY,CAAC,QAAgB;IAE3C,OAAO,CAAC,IAAU,EAAE,QAA0B,EAAE,EAAE;QAEhD,MAAM,SAAS,GAAG,qBAAS,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QACjD,MAAM,YAAY,GAAG,SAAS,CAAC,uBAAuB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;QAExE,MAAM,cAAc,GAAG,kBAAkB,CACvC,gBAAG,CAAC,aAAa,CAAC,EAAE;YAClB,2BAAc,iCAAM,QAAQ,GAAK,cAAO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C5E,EAAE;AACF,2BAA2B;AAC3B,kBAAkB;AAClB,UAAU;AACV,EAAE;AACF,2CAA2C;AAC3C,OAAO;AACP,IAAI;AAGJ,oDAAoD;AACpD,yDAAyD;AACzD,2EAA2E;AAC3E,mBAAmB;AACnB,OAAO;AACP,IAAI;AACJ,EAAE;AACF,qDAAqD;AACrD,yDAAyD;AACzD,oEAAoE;AACpE,mBAAmB;AACnB,OAAO;AACP,IAAI"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
alerts(Alert[]):
|
|
2
|
+
unknown_error:
|
|
3
|
+
content:
|
|
4
|
+
- "Yikes, this is a bit embarrassing, we've had an error condition we weren't expecting."
|
|
5
|
+
- "It's with great shame an loathing that we can only suggest reloading the page to see if that helps..."
|
|
6
|
+
ok: "Ok, try reloading it..."
|
|
7
|
+
not_implemented:
|
|
8
|
+
content:
|
|
9
|
+
- "We haven't got around to doing this yet."
|
|
10
|
+
ok: "Bugger"
|
|
11
|
+
|
|
12
|
+
confirm(Confirm[]):
|
|
13
|
+
leave_this_page:
|
|
14
|
+
content:
|
|
15
|
+
- "Would you like to go to {name}?"
|
|
16
|
+
ok: "Yep"
|
|
17
|
+
cancel: "Nope"
|
|
18
|
+
|
|
19
|
+
|
|
@@ -19,8 +19,8 @@ function installDependencies(_options) {
|
|
|
19
19
|
return (tree, _) => {
|
|
20
20
|
return package_util_1.updatePackageJson(tree, draft => {
|
|
21
21
|
draft.scripts = Object.assign(Object.assign({}, draft.scripts), { "place-routes": "run-s place-routes:**", "i18n": "run-s i18n:**", "watch": "npm-watch" });
|
|
22
|
-
draft.dependencies = Object.assign(Object.assign({}, draft.dependencies), { "@coolon/pectin": "^3.10.1", "@coolon/typescript-utilities": "^2.0.2", "roboto-fontface": "^0.10.0", "@js-joda/core": "^3.2.0", "@js-joda/locale": "^3.2.0", "@js-joda/timezone": "^2.3.0", "immer": "^7.0.5", "typescript-string-enums": "^1.0.0", "format-message-interpret": "^6.2.3", "moment": "^2.18.1" });
|
|
23
|
-
draft.devDependencies = Object.assign(Object.assign({}, draft.devDependencies), { "husky": "^4.2.0", "cypress-wait-until": "^1.6.1", "barrelsby": "^2.1.1", "dotenv": "6.2.0", "cz-conventional-changelog": "^3.1.0", "@commitlint/cli": "^8.3.5", "git-is-clean": "^3.0.1", "shx": "^0.3.2", 'standard-version': '^8.0.0', "npm-watch": "^0.7.0" });
|
|
22
|
+
draft.dependencies = Object.assign(Object.assign({}, draft.dependencies), { "@coolon/pectin": "^3.10.1", "@coolon/typescript-utilities": "^2.0.2", "roboto-fontface": "^0.10.0", "@js-joda/core": "^3.2.0", "@js-joda/locale": "^3.2.0", "@js-joda/timezone": "^2.3.0", "cldr-data": "^36.0.0", "cldrjs": "^0.5.4", "immer": "^7.0.5", "typescript-string-enums": "^1.0.0", "format-message-interpret": "^6.2.3", "moment": "^2.18.1" });
|
|
23
|
+
draft.devDependencies = Object.assign(Object.assign({}, draft.devDependencies), { "husky": "^4.2.0", "@coolon/i18n-resource-generator": "^2.0.13", "cypress-wait-until": "^1.6.1", "barrelsby": "^2.1.1", "dotenv": "6.2.0", "cz-conventional-changelog": "^3.1.0", "@commitlint/cli": "^8.3.5", "git-is-clean": "^3.0.1", "shx": "^0.3.2", 'standard-version': '^8.0.0', "npm-watch": "^0.7.0" });
|
|
24
24
|
draft.watch = Object.assign({}, draft.watch);
|
|
25
25
|
draft.config = Object.assign(Object.assign({}, draft.config), { commitizen: {
|
|
26
26
|
path: './node_modules/cz-conventional-changelog'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/angular-ui-powerups/schematics/ng-add/index.ts"],"names":[],"mappings":";;;AAAA,2DAAiF;AACjF,4DAA0E;AAC1E,kDAAoD;AAEpD,uBAAuB;AACvB,SAAgB,KAAK,CAAC,QAAa;IACjC,OAAO,kBAAK,CAAC;QACX,CAAC,IAAU,EAAE,QAA0B,EAAE,EAAE;YACzC,QAAQ,CAAC,OAAO,CAA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,EAAE,SAAS,GACpB,CAAC;YAEF,KAAK,CAAC,eAAe,mCAChB,KAAK,CAAC,eAAe,KACxB,OAAO,EAAE,QAAQ,EACjB,iCAAiC,EAAE,SAAS,EAC5C,oBAAoB,EAAE,QAAQ,EAC9B,WAAW,EAAE,QAAQ,EACrB,QAAQ,EAAE,OAAO,EACjB,2BAA2B,EAAE,QAAQ,EACrC,iBAAiB,EAAE,QAAQ,EAC3B,cAAc,EAAE,QAAQ,EACxB,KAAK,EAAE,QAAQ,EACf,kBAAkB,EAAE,QAAQ,EAC5B,WAAW,EAAE,QAAQ,GACtB,CAAC;YAEF,KAAK,CAAC,KAAK,qBACN,KAAK,CAAC,KAAK,CACf,CAAA;YAED,KAAK,CAAC,MAAM,mCACP,KAAK,CAAC,MAAM,KACf,UAAU,EAAE;oBACV,IAAI,EAAE,0CAA0C;iBACjD,GACF,CAAC;YAEF,KAAK,CAAC,KAAK,GAAG;gBACZ,OAAO,EAAE;oBACP,YAAY,EAAE,gCAAgC;iBAC/C;aACF,CAAC;QAEJ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AA5DD,kDA4DC"}
|
|
@@ -22,14 +22,15 @@ function addPlace(_options) {
|
|
|
22
22
|
name: _options.name,
|
|
23
23
|
module: placeModulePath.slice(buildContext.sourceCodeRoot.length)
|
|
24
24
|
});
|
|
25
|
-
const i18nNamespace = `I18n.${componentPathParts.concat(componentName).join('.')}`;
|
|
26
25
|
const componentFiles = template_utilities_1.applyTemplatesWithOverwrite(tree, 'templates/component', {
|
|
27
26
|
name: componentName,
|
|
28
27
|
selectorPrefix: buildContext.selectorPrefix,
|
|
29
|
-
pathToRoot: pathToSourceRoot.map(p => '..').join('/')
|
|
30
|
-
i18nNamespace
|
|
28
|
+
pathToRoot: pathToSourceRoot.map(p => '..').join('/')
|
|
31
29
|
}, `${(pathToSourceRoot.join('/'))}/${componentName}`);
|
|
32
|
-
|
|
30
|
+
const additionalFiles = template_utilities_1.applyTemplatesWithOverwrite(tree, 'templates/files', {
|
|
31
|
+
name: componentName
|
|
32
|
+
}, buildContext.sourceRoot);
|
|
33
|
+
return schematics_1.chain([updateModule, componentFiles, additionalFiles])(tree, context);
|
|
33
34
|
};
|
|
34
35
|
}
|
|
35
36
|
exports.addPlace = addPlace;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/angular-ui-powerups/schematics/place-add/index.ts"],"names":[],"mappings":";;;AAAA,2DAAoG;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/angular-ui-powerups/schematics/place-add/index.ts"],"names":[],"mappings":";;;AAAA,2DAAoG;AAIpG,oEAA0E;AAC1E,kDAA+C;AAI/C,SAAgB,QAAQ,CAAC,QAAgB;IAEvC,OAAO,CAAC,IAAU,EAAE,OAAyB,EAAE,EAAE;QAE/C,MAAM,SAAS,GAAG,qBAAS,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAChD,MAAM,YAAY,GAAG,SAAS,CAAC,cAAc,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAEhE,MAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC3C,MAAM,aAAa,GAAG,SAAS,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACtD,MAAM,kBAAkB,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACpE,MAAM,gBAAgB,GAAG,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;QAClF,MAAM,eAAe,GAAG,YAAY,CAAC,sBAAsB,CAAC,gBAAgB,EAAE,kBAAkB,CAAC,CAAC;QAClG,IAAI,CAAC,eAAe,EAAE;YACpB,MAAM,IAAI,KAAK,CAAC,2GAA2G,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,6HAA6H,CAAC,CAAC;SACrR;QACD,kHAAkH;QAClH,MAAM,YAAY,GAAG,8BAAiB,CAAC,qBAAqB,EAAE,WAAW,EAAE;YACzE,OAAO,EAAE,QAAQ,CAAC,OAAO;YACzB,IAAI,EAAE,QAAQ,CAAC,IAAI;YACnB,MAAM,EAAE,eAAe,CAAC,KAAK,CAAC,YAAY,CAAC,cAAc,CAAC,MAAM,CAAC;SAClE,CAAC,CAAC;QAEH,MAAM,cAAc,GAAG,gDAA2B,CAChD,IAAI,EACJ,qBAAqB,EACrB;YACE,IAAI,EAAE,aAAa;YACnB,cAAc,EAAE,YAAY,CAAC,cAAc;YAC3C,UAAU,EAAE,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;SACtD,EACD,GAAG,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,aAAa,EAAE,CACnD,CAAC;QAGF,MAAM,eAAe,GAAG,gDAA2B,CACjD,IAAI,EACJ,iBAAiB,EACjB;YACE,IAAI,EAAE,aAAa;SACpB,EACD,YAAY,CAAC,UAAU,CAAC,CAAC;QAE3B,OAAO,kBAAK,CAAC,CAAC,YAAY,EAAE,cAAc,EAAE,eAAe,CAAC,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAE/E,CAAC,CAAC;AAEJ,CAAC;AA9CD,4BA8CC"}
|
|
@@ -8,7 +8,7 @@ import { I18n } from '<%=pathToRoot%>/i18n';
|
|
|
8
8
|
@Place({
|
|
9
9
|
path: '<%=dasherize(name)%>',
|
|
10
10
|
data: {
|
|
11
|
-
nav:
|
|
11
|
+
nav: I18n.places.<%=camelize(name)%>.nav
|
|
12
12
|
},
|
|
13
13
|
authenticate: true
|
|
14
14
|
})
|
|
@@ -19,8 +19,6 @@ import { I18n } from '<%=pathToRoot%>/i18n';
|
|
|
19
19
|
})
|
|
20
20
|
export class <%=capitalize(camelize(name))%>Component extends PlaceComponent implements OnInit {
|
|
21
21
|
|
|
22
|
-
readonly i18n = <%=i18nNamespace%>;
|
|
23
|
-
|
|
24
22
|
constructor() {
|
|
25
23
|
super();
|
|
26
24
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { experimental } from '@angular-devkit/core';
|
|
1
2
|
import { SchematicContext, Tree } from '@angular-devkit/schematics';
|
|
2
3
|
import { ClassDeclaration, SourceFile } from 'ts-morph';
|
|
3
4
|
import { DecoratedSourceFile } from './decorators/decorated-source-file';
|
|
@@ -11,8 +12,8 @@ export declare abstract class BuildContext {
|
|
|
11
12
|
get logger(): import("@angular-devkit/core/src/logger").LoggerApi;
|
|
12
13
|
get tsConfigPath(): string;
|
|
13
14
|
get sourceCodeRoot(): string;
|
|
14
|
-
get sourceRoot():
|
|
15
|
-
get rootDir():
|
|
15
|
+
get sourceRoot(): string;
|
|
16
|
+
get rootDir(): string;
|
|
16
17
|
private loadTypeScriptProject;
|
|
17
18
|
scanClassesInTree(tree: Tree, scanRootDirectory: string, scanClass: (sourceFile: SourceFile, classDeclaration: ClassDeclaration, path: string) => void): void;
|
|
18
19
|
findFileInAncestorPath(pathToSourceRoot: string[], fileName: string): string;
|
|
@@ -20,12 +21,12 @@ export declare abstract class BuildContext {
|
|
|
20
21
|
}
|
|
21
22
|
export declare namespace BuildContext {
|
|
22
23
|
interface Settings {
|
|
23
|
-
readonly workspaceProject:
|
|
24
|
+
readonly workspaceProject: experimental.workspace.WorkspaceProject;
|
|
24
25
|
readonly projectType: string;
|
|
25
26
|
readonly tsConfigPath: string;
|
|
26
27
|
}
|
|
27
28
|
class App extends BuildContext {
|
|
28
|
-
get selectorPrefix():
|
|
29
|
+
get selectorPrefix(): string;
|
|
29
30
|
}
|
|
30
31
|
class Lib extends BuildContext {
|
|
31
32
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import { experimental } from '@angular-devkit/core';
|
|
1
2
|
import { SchematicContext, Tree } from '@angular-devkit/schematics';
|
|
2
3
|
import { BuildContext } from './build-context';
|
|
3
4
|
export declare class Workspace {
|
|
4
|
-
readonly schema:
|
|
5
|
+
readonly schema: experimental.workspace.WorkspaceSchema;
|
|
5
6
|
readonly tree: Tree;
|
|
6
7
|
readonly context: SchematicContext;
|
|
7
|
-
get defaultProject():
|
|
8
|
-
constructor(schema:
|
|
8
|
+
get defaultProject(): string;
|
|
9
|
+
constructor(schema: experimental.workspace.WorkspaceSchema, tree: Tree, context: SchematicContext);
|
|
9
10
|
static load(tree: Tree, _context: SchematicContext): Workspace;
|
|
10
11
|
getApplication(projectName: string): BuildContext.App;
|
|
11
12
|
getApplicationOrDefault(projectName: string | undefined): BuildContext.App;
|