@coolon/angular-ui-powerups 0.0.70 → 0.0.72

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.
Files changed (27) hide show
  1. package/bundles/coolon-angular-ui-powerups.umd.js +197 -142
  2. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  3. package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
  4. package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
  5. package/coolon-angular-ui-powerups.metadata.json +1 -1
  6. package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +50 -24
  7. package/esm2015/lib/place/place-router.js +42 -27
  8. package/esm2015/lib/place/place.decorator.js +3 -1
  9. package/esm5/lib/place/components/place-outlet/place-outlet.component.js +56 -27
  10. package/esm5/lib/place/place-router.js +57 -32
  11. package/esm5/lib/place/place.decorator.js +3 -1
  12. package/fesm2015/coolon-angular-ui-powerups.js +162 -121
  13. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  14. package/fesm5/coolon-angular-ui-powerups.js +200 -145
  15. package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
  16. package/lib/place/components/place-outlet/place-outlet.component.d.ts +5 -5
  17. package/lib/place/place-router.d.ts +5 -2
  18. package/lib/place/place.decorator.d.ts +1 -0
  19. package/package.json +1 -1
  20. package/schematics/place-routes/place-builder.js +1 -0
  21. package/schematics/place-routes/place-builder.js.map +1 -1
  22. package/schematics/place-routes/place-class-scanner.d.ts +1 -0
  23. package/schematics/place-routes/place-class-scanner.js +7 -1
  24. package/schematics/place-routes/place-class-scanner.js.map +1 -1
  25. package/schematics/place-routes/place-def.d.ts +4 -1
  26. package/schematics/place-routes/place-def.js +33 -19
  27. package/schematics/place-routes/place-def.js.map +1 -1
@@ -45,6 +45,8 @@ export function Place(options) {
45
45
  Options.prototype.authenticate;
46
46
  /** @type {?|undefined} */
47
47
  Options.prototype.children;
48
+ /** @type {?|undefined} */
49
+ Options.prototype.defaultCh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k7XG5cbiAgICB9IGVsc2Uge1xuICAgICAgbGFuZy5pbGxlZ2FsU3RhdGUoYCR7dGFyZ2V0fSBtdXN0IGV4dGVuZCBQbGFjZUNvbXBvbmVudCB0byB1c2UgdGhlIEBQbGFjZSBkZWNvcmF0b3JgKTtcbiAgICB9XG4gIH07XG59XG5cbmV4cG9ydCBuYW1lc3BhY2UgUGxhY2Uge1xuXG4gIGV4cG9ydCBpbnRlcmZhY2UgT3B0aW9ucyB7XG4gICAgcGF0aDogc3RyaW5nLFxuICAgIG9yZGVyOiBudW1iZXI7XG4gICAgZGF0YT86IHsgW2tleTogc3RyaW5nXTogYW55IH0sIC8vIGRlZmF1bHRzIHRvIHRydWVcbiAgICBhdXRoZW50aWNhdGU/OiBib29sZWFuLCAvLyBkZWZhdWx0cyB0byB0cnVlXG4gICAgY2hpbGRyZW4/OiBDb25zdHJ1Y3RhYmxlPFBsYWNlQ29tcG9uZW50PltdXG4gICAgZGVmYXVsdENoaWxkPzogQ29uc3RydWN0YWJsZTxQbGFjZUNvbXBvbmVudD5cbiAgfVxuXG59XG4iXX0=
@@ -1,5 +1,5 @@
1
1
  import { DOCUMENT, Location, CommonModule } from '@angular/common';
2
- import { EventEmitter, Input, Output, HostListener, Component, Directive, ElementRef, Inject, NgZone, InjectionToken, Injector, ComponentFactoryResolver, ViewContainerRef, ViewChild, ViewChildren, Injectable, Optional, ɵɵdefineInjectable, ɵɵinject, NgModule, HostBinding, INJECTOR } from '@angular/core';
2
+ import { EventEmitter, Input, Output, HostListener, Component, Directive, ElementRef, Inject, NgZone, InjectionToken, Injector, ComponentFactoryResolver, ViewContainerRef, ViewChild, ViewChildren, Injectable, Optional, ɵɵdefineInjectable, ɵɵinject, NgModule, HostBinding, SkipSelf, INJECTOR } from '@angular/core';
3
3
  import { FormsModule } from '@angular/forms';
4
4
  import { MatDialog, MatButtonModule, MatDialogModule, MatTabsModule, MatProgressSpinnerModule, MatInputModule, MatFormFieldModule, MatSelectModule } from '@angular/material';
5
5
  import { MatTabsModule as MatTabsModule$1 } from '@angular/material/tabs';
@@ -7,7 +7,7 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
7
7
  import { __decorate, __metadata, __awaiter } from 'tslib';
8
8
  import { GarbageCollector, DelegatingFormValueModel, UseDelegate, ValueModel, ListModel, StoreInListModel, assert, UnaryCommand, lang, Dsl, Logger, DelegatingValueModel, MutableStream, MutableListModel, DelegatingListModel, StoreInValueModel, Binding, MutableValueModel, Trace, Guard as Guard$1, OptionsHelper, ValueHolder } from '@coolon/pectin';
9
9
  import { PortalModule } from '@angular/cdk/portal';
10
- import { Router, RouterModule, NavigationStart, NavigationEnd, NavigationError, ActivatedRoute, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
10
+ import { Router, RouterModule, NavigationStart, NavigationEnd, NavigationError, ActivatedRoute, RouterOutlet, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
11
11
  import ___default, { last, isNil, isEqual } from 'lodash';
12
12
  import { assert as assert$1, Opts, Klass } from '@coolon/typescript-utilities';
13
13
  import { MatDialogConfig, MAT_DIALOG_DEFAULT_OPTIONS, MatDialog as MatDialog$1 } from '@angular/material/dialog';
@@ -2616,79 +2616,6 @@ if (false) {
2616
2616
  ListPlaceNavComponent.prototype.expanded;
2617
2617
  }
2618
2618
 
2619
- /**
2620
- * @fileoverview added by tsickle
2621
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2622
- */
2623
- class PlaceHistory {
2624
- /**
2625
- * @param {?} router
2626
- */
2627
- constructor(router) {
2628
- this.router = router;
2629
- this._history = new Map();
2630
- }
2631
- // @Trace()
2632
- /**
2633
- * @param {?} state
2634
- * @return {?}
2635
- */
2636
- add(state) {
2637
- /** @type {?} */
2638
- const history = this.getHistory(state.placeDefinition);
2639
- /** @type {?} */
2640
- const previousState = ___default.last(history);
2641
- if (!previousState || state.hasChangedFrom(previousState)) {
2642
- history.unshift(state); // LIFO
2643
- this.setHistory(state.placeDefinition, history.slice(0, 3)); // limit our history to 4 visits
2644
- }
2645
- }
2646
- /**
2647
- * @param {?} placeDef
2648
- * @return {?}
2649
- */
2650
- getHistory(placeDef) {
2651
- /** @type {?} */
2652
- let history = this._history.get(placeDef);
2653
- if (!history) {
2654
- history = [];
2655
- this.setHistory(placeDef, history);
2656
- }
2657
- return history;
2658
- }
2659
- /**
2660
- * @private
2661
- * @param {?} placeDef
2662
- * @param {?} history
2663
- * @return {?}
2664
- */
2665
- setHistory(placeDef, history) {
2666
- this._history.set(placeDef, history);
2667
- }
2668
- }
2669
- PlaceHistory.decorators = [
2670
- { type: Injectable, args: [{
2671
- providedIn: 'root'
2672
- },] }
2673
- ];
2674
- /** @nocollapse */
2675
- PlaceHistory.ctorParameters = () => [
2676
- { type: Router }
2677
- ];
2678
- /** @nocollapse */ PlaceHistory.ngInjectableDef = ɵɵdefineInjectable({ factory: function PlaceHistory_Factory() { return new PlaceHistory(ɵɵinject(Router)); }, token: PlaceHistory, providedIn: "root" });
2679
- if (false) {
2680
- /**
2681
- * @type {?}
2682
- * @private
2683
- */
2684
- PlaceHistory.prototype._history;
2685
- /**
2686
- * @type {?}
2687
- * @private
2688
- */
2689
- PlaceHistory.prototype.router;
2690
- }
2691
-
2692
2619
  /**
2693
2620
  * @fileoverview added by tsickle
2694
2621
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
@@ -2836,6 +2763,79 @@ if (false) {
2836
2763
  NavigationSession.createExternal = createExternal;
2837
2764
  })(NavigationSession || (NavigationSession = {}));
2838
2765
 
2766
+ /**
2767
+ * @fileoverview added by tsickle
2768
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2769
+ */
2770
+ class PlaceHistory {
2771
+ /**
2772
+ * @param {?} router
2773
+ */
2774
+ constructor(router) {
2775
+ this.router = router;
2776
+ this._history = new Map();
2777
+ }
2778
+ // @Trace()
2779
+ /**
2780
+ * @param {?} state
2781
+ * @return {?}
2782
+ */
2783
+ add(state) {
2784
+ /** @type {?} */
2785
+ const history = this.getHistory(state.placeDefinition);
2786
+ /** @type {?} */
2787
+ const previousState = ___default.last(history);
2788
+ if (!previousState || state.hasChangedFrom(previousState)) {
2789
+ history.unshift(state); // LIFO
2790
+ this.setHistory(state.placeDefinition, history.slice(0, 3)); // limit our history to 4 visits
2791
+ }
2792
+ }
2793
+ /**
2794
+ * @param {?} placeDef
2795
+ * @return {?}
2796
+ */
2797
+ getHistory(placeDef) {
2798
+ /** @type {?} */
2799
+ let history = this._history.get(placeDef);
2800
+ if (!history) {
2801
+ history = [];
2802
+ this.setHistory(placeDef, history);
2803
+ }
2804
+ return history;
2805
+ }
2806
+ /**
2807
+ * @private
2808
+ * @param {?} placeDef
2809
+ * @param {?} history
2810
+ * @return {?}
2811
+ */
2812
+ setHistory(placeDef, history) {
2813
+ this._history.set(placeDef, history);
2814
+ }
2815
+ }
2816
+ PlaceHistory.decorators = [
2817
+ { type: Injectable, args: [{
2818
+ providedIn: 'root'
2819
+ },] }
2820
+ ];
2821
+ /** @nocollapse */
2822
+ PlaceHistory.ctorParameters = () => [
2823
+ { type: Router }
2824
+ ];
2825
+ /** @nocollapse */ PlaceHistory.ngInjectableDef = ɵɵdefineInjectable({ factory: function PlaceHistory_Factory() { return new PlaceHistory(ɵɵinject(Router)); }, token: PlaceHistory, providedIn: "root" });
2826
+ if (false) {
2827
+ /**
2828
+ * @type {?}
2829
+ * @private
2830
+ */
2831
+ PlaceHistory.prototype._history;
2832
+ /**
2833
+ * @type {?}
2834
+ * @private
2835
+ */
2836
+ PlaceHistory.prototype.router;
2837
+ }
2838
+
2839
2839
  /**
2840
2840
  * @fileoverview added by tsickle
2841
2841
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
@@ -3034,12 +3034,25 @@ class PlaceRouter extends GarbageCollector {
3034
3034
  /**
3035
3035
  * placeRouter.navigate(placeDestinations.somePlace.createVisit(routeId, ...visitParams));
3036
3036
  * @param {?} visit
3037
+ * @param {?=} options
3037
3038
  * @return {?}
3038
3039
  */
3039
- // @Trace()
3040
- navigate(visit) {
3040
+ navigate(visit, options) {
3041
3041
  return __awaiter(this, void 0, void 0, function* () {
3042
- this.doNavigation(visit);
3042
+ this.doNavigation(visit, (/**
3043
+ * @param {?} router
3044
+ * @return {?}
3045
+ */
3046
+ (router) => __awaiter(this, void 0, void 0, function* () {
3047
+ /** @type {?} */
3048
+ const commands = [
3049
+ visit.placeDefinition.path,
3050
+ ...this.createRouteParameters(visit)
3051
+ ];
3052
+ yield this.router.navigate(commands, {
3053
+ relativeTo: options ? options.relativeTo : null
3054
+ });
3055
+ })));
3043
3056
  });
3044
3057
  }
3045
3058
  /**
@@ -3063,13 +3076,11 @@ class PlaceRouter extends GarbageCollector {
3063
3076
  /** @type {?} */
3064
3077
  const relativePath = !!previous.placeDefinition.hasRouteId() ? '..' : '.';
3065
3078
  /** @type {?} */
3066
- const def = next.placeDefinition;
3067
- /** @type {?} */
3068
- const params = next.hasRouteId() ?
3069
- [def.getFormattedRouteId(next), def.getFormattedRouteParameters(next)] :
3070
- [def.getFormattedRouteParameters(next)];
3071
- /** @type {?} */
3072
- const commands = [relativePath].concat(params, this.extractChildPath(activatedRoute.snapshot));
3079
+ const commands = [
3080
+ relativePath,
3081
+ ...this.createRouteParameters(next),
3082
+ ...this.extractChildPath(activatedRoute.snapshot)
3083
+ ];
3073
3084
  console.log('### Redirect', commands);
3074
3085
  return router.navigate(commands, {
3075
3086
  relativeTo: activatedRoute
@@ -3080,28 +3091,14 @@ class PlaceRouter extends GarbageCollector {
3080
3091
  }
3081
3092
  /**
3082
3093
  * @param {?} visit
3083
- * @param {?=} customNavigation
3094
+ * @param {?} customNavigation
3084
3095
  * @return {?}
3085
3096
  */
3086
3097
  doNavigation(visit, customNavigation) {
3087
3098
  return __awaiter(this, void 0, void 0, function* () {
3088
3099
  this._navigationSessionModel.value = NavigationSession.createInternal(visit);
3089
3100
  try {
3090
- if (customNavigation) {
3091
- yield customNavigation(this.router);
3092
- }
3093
- else {
3094
- /** @type {?} */
3095
- const def = visit.placeDefinition;
3096
- /** @type {?} */
3097
- const parameterCommands = visit.hasRouteId() ?
3098
- [def.getFormattedRouteId(visit), def.getFormattedRouteParameters(visit)] :
3099
- [def.getFormattedRouteParameters(visit)];
3100
- /** @type {?} */
3101
- const commands = [def.path].concat(parameterCommands);
3102
- console.log('_doNavigation', visit, commands);
3103
- yield this.router.navigate(commands);
3104
- }
3101
+ yield customNavigation(this.router);
3105
3102
  }
3106
3103
  finally {
3107
3104
  if (this.navigationSession && !this.router.getCurrentNavigation()) {
@@ -3110,6 +3107,18 @@ class PlaceRouter extends GarbageCollector {
3110
3107
  }
3111
3108
  });
3112
3109
  }
3110
+ /**
3111
+ * @private
3112
+ * @param {?} visit
3113
+ * @return {?}
3114
+ */
3115
+ createRouteParameters(visit) {
3116
+ /** @type {?} */
3117
+ const def = visit.placeDefinition;
3118
+ return visit.hasRouteId() ?
3119
+ [def.getFormattedRouteId(visit), def.getFormattedRouteParameters(visit)] :
3120
+ [def.getFormattedRouteParameters(visit)];
3121
+ }
3113
3122
  // @Trace()
3114
3123
  /**
3115
3124
  * @private
@@ -3174,6 +3183,12 @@ PlaceRouter.ctorParameters = () => [
3174
3183
  { type: PlaceHistory }
3175
3184
  ];
3176
3185
  /** @nocollapse */ PlaceRouter.ngInjectableDef = ɵɵdefineInjectable({ factory: function PlaceRouter_Factory() { return new PlaceRouter(ɵɵinject(Router), ɵɵinject(Location), ɵɵinject(PlaceHistory)); }, token: PlaceRouter, providedIn: "root" });
3186
+ __decorate([
3187
+ Trace(),
3188
+ __metadata("design:type", Function),
3189
+ __metadata("design:paramtypes", [Visit, Object]),
3190
+ __metadata("design:returntype", Promise)
3191
+ ], PlaceRouter.prototype, "navigate", null);
3177
3192
  __decorate([
3178
3193
  Trace(),
3179
3194
  __metadata("design:type", Function),
@@ -3289,13 +3304,13 @@ class PlaceOutletComponent extends DisposableComponent {
3289
3304
  /**
3290
3305
  * @param {?} router
3291
3306
  * @param {?} placeRouter
3292
- * @param {?} placeHistory
3307
+ * @param {?} parentOutlet
3293
3308
  */
3294
- constructor(router, placeRouter, placeHistory) {
3309
+ constructor(router, placeRouter, parentOutlet) {
3295
3310
  super();
3296
3311
  this.router = router;
3297
3312
  this.placeRouter = placeRouter;
3298
- this.placeHistory = placeHistory;
3313
+ this.parentOutlet = parentOutlet;
3299
3314
  this.animate = true;
3300
3315
  this.placeChanged = new EventEmitter();
3301
3316
  this._activePlace = new MutableValueModel();
@@ -3307,17 +3322,17 @@ class PlaceOutletComponent extends DisposableComponent {
3307
3322
  */
3308
3323
  this._placeVisit = new MutableValueModel();
3309
3324
  const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
3310
- // Handle incoming route changes.
3311
- /** @type {?} */
3312
- const inRouteVisitUpdate = new Guard$1();
3325
+ // Push incoming changes into the component
3313
3326
  /** @type {?} */
3314
3327
  const routeVisit = chain(this._activePlace).pluck('placeDefinition').findIn(placeRouter.activeVisitIndex);
3328
+ /** @type {?} */
3329
+ const inRouteVisitUpdate = new Guard$1();
3315
3330
  when.valueOf(routeVisit).changes((/**
3316
3331
  * @param {?} visit
3317
3332
  * @return {?}
3318
3333
  */
3319
3334
  (visit) => {
3320
- if (visit) {
3335
+ if (visit) { // can be null while the place and index sync up
3321
3336
  inRouteVisitUpdate.whileTrue((/**
3322
3337
  * @return {?}
3323
3338
  */
@@ -3352,6 +3367,16 @@ class PlaceOutletComponent extends DisposableComponent {
3352
3367
  */
3353
3368
  ngOnInit() {
3354
3369
  }
3370
+ /**
3371
+ * @param {?} visit
3372
+ * @return {?}
3373
+ */
3374
+ navigate(visit) {
3375
+ console.log({ activatedRoute: this._activatedRouteModel.value });
3376
+ this.placeRouter.navigate(visit, {
3377
+ relativeTo: this.parentOutlet ? this.parentOutlet.activatedRouteModel.value : null
3378
+ });
3379
+ }
3355
3380
  /**
3356
3381
  * @param {?} next
3357
3382
  * @param {?} previous
@@ -3368,6 +3393,12 @@ class PlaceOutletComponent extends DisposableComponent {
3368
3393
  get activePlaceModel() {
3369
3394
  return this._activePlace.readonly;
3370
3395
  }
3396
+ /**
3397
+ * @return {?}
3398
+ */
3399
+ get activatedRouteModel() {
3400
+ return this._activatedRouteModel.readonly;
3401
+ }
3371
3402
  /**
3372
3403
  * @param {?} routerOutlet
3373
3404
  * @param {?} place
@@ -3423,13 +3454,6 @@ class PlaceOutletComponent extends DisposableComponent {
3423
3454
  this._activePlace.value.onPlaceReady();
3424
3455
  }
3425
3456
  }
3426
- /**
3427
- * @param {?} placeDestination
3428
- * @return {?}
3429
- */
3430
- activate(placeDestination) {
3431
- // this.router.
3432
- }
3433
3457
  }
3434
3458
  PlaceOutletComponent.decorators = [
3435
3459
  { type: Component, args: [{
@@ -3443,13 +3467,31 @@ PlaceOutletComponent.decorators = [
3443
3467
  PlaceOutletComponent.ctorParameters = () => [
3444
3468
  { type: Router },
3445
3469
  { type: PlaceRouter },
3446
- { type: PlaceHistory }
3470
+ { type: PlaceOutletComponent, decorators: [{ type: SkipSelf }, { type: Optional }] }
3447
3471
  ];
3448
3472
  PlaceOutletComponent.propDecorators = {
3449
3473
  animate: [{ type: Input }],
3450
3474
  placeChanged: [{ type: Output }],
3451
3475
  routerOut: [{ type: ViewChild, args: ['routeOutlet', { static: true },] }]
3452
3476
  };
3477
+ __decorate([
3478
+ Trace(),
3479
+ __metadata("design:type", Function),
3480
+ __metadata("design:paramtypes", [Visit]),
3481
+ __metadata("design:returntype", void 0)
3482
+ ], PlaceOutletComponent.prototype, "navigate", null);
3483
+ __decorate([
3484
+ Trace(),
3485
+ __metadata("design:type", Function),
3486
+ __metadata("design:paramtypes", [RouterOutlet, PlaceComponent]),
3487
+ __metadata("design:returntype", void 0)
3488
+ ], PlaceOutletComponent.prototype, "onOutletActivated", null);
3489
+ __decorate([
3490
+ Trace(),
3491
+ __metadata("design:type", Function),
3492
+ __metadata("design:paramtypes", [RouterOutlet, Object]),
3493
+ __metadata("design:returntype", void 0)
3494
+ ], PlaceOutletComponent.prototype, "onOutletDeactivated", null);
3453
3495
  if (false) {
3454
3496
  /** @type {?} */
3455
3497
  PlaceOutletComponent.prototype.animate;
@@ -3492,11 +3534,8 @@ if (false) {
3492
3534
  * @private
3493
3535
  */
3494
3536
  PlaceOutletComponent.prototype.placeRouter;
3495
- /**
3496
- * @type {?}
3497
- * @private
3498
- */
3499
- PlaceOutletComponent.prototype.placeHistory;
3537
+ /** @type {?} */
3538
+ PlaceOutletComponent.prototype.parentOutlet;
3500
3539
  }
3501
3540
 
3502
3541
  /**
@@ -4075,6 +4114,8 @@ function Place(options) {
4075
4114
  Options.prototype.authenticate;
4076
4115
  /** @type {?|undefined} */
4077
4116
  Options.prototype.children;
4117
+ /** @type {?|undefined} */
4118
+ Options.prototype.defaultChild;
4078
4119
  }
4079
4120
  })(Place || (Place = {}));
4080
4121