@coolon/angular-ui-powerups 0.0.38 → 0.0.41
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 +180 -63
- 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/angular-ui-powerups.module.js +3 -1
- package/esm2015/lib/place/components/abstract-place-navigation.component.js +4 -4
- package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.js +2 -2
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +110 -16
- package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +2 -2
- package/esm2015/lib/place/guards/leave-place.guard.js +12 -4
- package/esm2015/lib/place/guards/place-route.guard.js +2 -2
- package/esm2015/lib/place/place-component.js +3 -8
- package/esm2015/lib/place/place.service.js +6 -28
- package/esm5/lib/angular-ui-powerups.module.js +3 -1
- package/esm5/lib/place/components/abstract-place-navigation.component.js +4 -4
- package/esm5/lib/place/components/list-place-nav/list-place-nav.component.js +2 -2
- package/esm5/lib/place/components/place-outlet/place-outlet.component.js +141 -20
- package/esm5/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +2 -2
- package/esm5/lib/place/guards/leave-place.guard.js +11 -3
- package/esm5/lib/place/guards/place-route.guard.js +2 -2
- package/esm5/lib/place/place-component.js +7 -9
- package/esm5/lib/place/place.service.js +22 -32
- package/fesm2015/coolon-angular-ui-powerups.js +129 -53
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +178 -61
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/place/components/abstract-place-navigation.component.d.ts +1 -1
- package/lib/place/components/place-outlet/place-outlet.component.d.ts +16 -8
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@ import { DOCUMENT, CommonModule } from '@angular/common';
|
|
|
2
2
|
import { EventEmitter, Input, Output, HostListener, Component, Directive, ElementRef, Inject, NgZone, InjectionToken, Injector, ComponentFactoryResolver, ViewContainerRef, ViewChild, ViewChildren, Injectable, ɵɵdefineInjectable, ɵɵinject, NgModule, HostBinding, 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
|
+
import { MatTabsModule as MatTabsModule$1 } from '@angular/material/tabs';
|
|
5
6
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
6
7
|
import { __extends, __decorate, __metadata, __assign, __awaiter, __generator, __values } from 'tslib';
|
|
7
8
|
import { GarbageCollector, DelegatingFormValueModel, UseDelegate, ValueModel, ListModel, StoreInListModel, assert, UnaryCommand, lang, Dsl, Logger, EventListenerList, DelegatingValueModel, Trace, MutableListModel, StoreInValueModel, MutableValueModel, Binding, OptionsHelper, ValueHolder } from '@coolon/pectin';
|
|
@@ -11,9 +12,8 @@ import { assert as assert$1, Klass, Opts } from '@coolon/typescript-utilities';
|
|
|
11
12
|
import { MatDialog as MatDialog$1 } from '@angular/material/dialog';
|
|
12
13
|
import { MatIconModule } from '@angular/material/icon';
|
|
13
14
|
import { MatListModule } from '@angular/material/list';
|
|
14
|
-
import { MatTabsModule as MatTabsModule$1 } from '@angular/material/tabs';
|
|
15
15
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
16
|
-
import { Router, RouterModule } from '@angular/router';
|
|
16
|
+
import { Router, ActivatedRoute, RouterOutlet, RouterModule, PRIMARY_OUTLET } from '@angular/router';
|
|
17
17
|
import { Memoize } from '@typescript-plus/fast-memoize-decorator/dist/src';
|
|
18
18
|
import { Memoize as Memoize$1 } from '@typescript-plus/fast-memoize-decorator';
|
|
19
19
|
import { isNil, isEqual, isEmpty, isFunction } from 'lodash';
|
|
@@ -2336,10 +2336,14 @@ var PlaceComponent = /** @class */ (function (_super) {
|
|
|
2336
2336
|
function () {
|
|
2337
2337
|
return true;
|
|
2338
2338
|
};
|
|
2339
|
+
// @Trace()
|
|
2340
|
+
// @Trace()
|
|
2339
2341
|
/**
|
|
2340
2342
|
* @return {?}
|
|
2341
2343
|
*/
|
|
2342
|
-
PlaceComponent.prototype.onPlaceReady =
|
|
2344
|
+
PlaceComponent.prototype.onPlaceReady =
|
|
2345
|
+
// @Trace()
|
|
2346
|
+
/**
|
|
2343
2347
|
* @return {?}
|
|
2344
2348
|
*/
|
|
2345
2349
|
function () {
|
|
@@ -2349,12 +2353,6 @@ var PlaceComponent = /** @class */ (function (_super) {
|
|
|
2349
2353
|
__metadata("design:type", PlaceComponent.Definition),
|
|
2350
2354
|
__metadata("design:paramtypes", [])
|
|
2351
2355
|
], PlaceComponent.prototype, "placeDefinition", null);
|
|
2352
|
-
__decorate([
|
|
2353
|
-
Trace(),
|
|
2354
|
-
__metadata("design:type", Function),
|
|
2355
|
-
__metadata("design:paramtypes", []),
|
|
2356
|
-
__metadata("design:returntype", void 0)
|
|
2357
|
-
], PlaceComponent.prototype, "onPlaceReady", null);
|
|
2358
2356
|
return PlaceComponent;
|
|
2359
2357
|
}(DisposableComponent));
|
|
2360
2358
|
if (false) {
|
|
@@ -2546,13 +2544,13 @@ var AbstractPlaceNavigationComponent = /** @class */ (function (_super) {
|
|
|
2546
2544
|
* @param {?} placeDef
|
|
2547
2545
|
* @return {?}
|
|
2548
2546
|
*/
|
|
2549
|
-
AbstractPlaceNavigationComponent.prototype.
|
|
2547
|
+
AbstractPlaceNavigationComponent.prototype.getNav = /**
|
|
2550
2548
|
* @param {?} placeDef
|
|
2551
2549
|
* @return {?}
|
|
2552
2550
|
*/
|
|
2553
2551
|
function (placeDef) {
|
|
2554
2552
|
/** @type {?} */
|
|
2555
|
-
var navItem = (/** @type {?} */ (placeDef.getData('
|
|
2553
|
+
var navItem = (/** @type {?} */ (placeDef.getData('nav')));
|
|
2556
2554
|
return {
|
|
2557
2555
|
title: (/**
|
|
2558
2556
|
* @return {?}
|
|
@@ -2593,7 +2591,7 @@ var AbstractPlaceNavigationComponent = /** @class */ (function (_super) {
|
|
|
2593
2591
|
__metadata("design:type", Function),
|
|
2594
2592
|
__metadata("design:paramtypes", [PlaceComponent.Definition]),
|
|
2595
2593
|
__metadata("design:returntype", Object)
|
|
2596
|
-
], AbstractPlaceNavigationComponent.prototype, "
|
|
2594
|
+
], AbstractPlaceNavigationComponent.prototype, "getNav", null);
|
|
2597
2595
|
return AbstractPlaceNavigationComponent;
|
|
2598
2596
|
}(DisposableComponent));
|
|
2599
2597
|
if (false) {
|
|
@@ -2646,7 +2644,7 @@ var ListPlaceNavComponent = /** @class */ (function (_super) {
|
|
|
2646
2644
|
ListPlaceNavComponent.decorators = [
|
|
2647
2645
|
{ type: Component, args: [{
|
|
2648
2646
|
selector: 'angular-ui-powerups-list-place-nav',
|
|
2649
|
-
template: "<mat-nav-list class=\"app-menu\">\n <a mat-list-item *ngFor=\"let place of placeDefinitions.value\"\n [routerLink]='place.path'\n routerLinkActive #rla=\"routerLinkActive\"\n [matTooltip]=\"
|
|
2647
|
+
template: "<mat-nav-list class=\"app-menu\">\n <a mat-list-item *ngFor=\"let place of placeDefinitions.value\"\n [routerLink]='place.path'\n routerLinkActive #rla=\"routerLinkActive\"\n [matTooltip]=\"getNav(place).tooltip()\">\n <mat-icon *ngIf=\"getNav(place).icon()\">{{getNav(place).icon()}}</mat-icon>\n <span class=\"expanded-only\">{{getNav(place).title()}}</span>\n </a>\n</mat-nav-list>\n",
|
|
2650
2648
|
styles: [":host{display:flex;flex-direction:column;--expanded-width:235px;--nav-item-width:var(--nav-bar-height);width:var(--nav-item-width);transition:width 125ms linear}:host.expanded{width:var(--expanded-width);max-width:var(--expanded-width)}.expanded-only{max-width:0;overflow:hidden}.collapsed-only{max-width:100%;overflow:hidden}.header{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;height:var(--nav-bar-height);border-bottom:var(--pinstripe-border);cursor:pointer}.header .menu{flex:1}.header button{color:inherit;width:var(--nav-item-width);height:var(--nav-bar-height)}mat-nav-list{flex:1;display:flex;flex-direction:column}.mat-list-item{width:var(--nav-item-width);height:var(--nav-bar-height);color:inherit}mat-icon{color:inherit}mat-icon.flip-horizontal{transform:scaleX(-1)}:host-context(.expanded) .expanded-only{max-width:100%}:host-context(.expanded) .collapsed-only{max-width:0}:host-context(.expanded) .mat-list-item mat-icon{margin-right:12px}:host-context(.expanded) .mat-list-item span{text-wrap:none;white-space:nowrap}a[ng-reflect-router-link=manage-instruments] mat-icon{transform:rotate(90deg)}.app-menu{padding-top:0}"]
|
|
2651
2649
|
}] }
|
|
2652
2650
|
];
|
|
@@ -2685,33 +2683,45 @@ var PlaceService = /** @class */ (function (_super) {
|
|
|
2685
2683
|
enumerable: true,
|
|
2686
2684
|
configurable: true
|
|
2687
2685
|
});
|
|
2686
|
+
// @Trace()
|
|
2687
|
+
// @Trace()
|
|
2688
2688
|
/**
|
|
2689
2689
|
* @param {?} place
|
|
2690
2690
|
* @return {?}
|
|
2691
2691
|
*/
|
|
2692
|
-
PlaceService.prototype.onActivate =
|
|
2692
|
+
PlaceService.prototype.onActivate =
|
|
2693
|
+
// @Trace()
|
|
2694
|
+
/**
|
|
2693
2695
|
* @param {?} place
|
|
2694
2696
|
* @return {?}
|
|
2695
2697
|
*/
|
|
2696
2698
|
function (place) {
|
|
2697
2699
|
this._activePlaces.push(place);
|
|
2698
2700
|
};
|
|
2701
|
+
// @Trace()
|
|
2702
|
+
// @Trace()
|
|
2699
2703
|
/**
|
|
2700
2704
|
* @param {?} place
|
|
2701
2705
|
* @return {?}
|
|
2702
2706
|
*/
|
|
2703
|
-
PlaceService.prototype.onDeactivate =
|
|
2707
|
+
PlaceService.prototype.onDeactivate =
|
|
2708
|
+
// @Trace()
|
|
2709
|
+
/**
|
|
2704
2710
|
* @param {?} place
|
|
2705
2711
|
* @return {?}
|
|
2706
2712
|
*/
|
|
2707
2713
|
function (place) {
|
|
2708
2714
|
this._activePlaces.remove(place);
|
|
2709
2715
|
};
|
|
2716
|
+
// @Trace()
|
|
2717
|
+
// @Trace()
|
|
2710
2718
|
/**
|
|
2711
2719
|
* @param {?} params
|
|
2712
2720
|
* @return {?}
|
|
2713
2721
|
*/
|
|
2714
|
-
PlaceService.prototype.notifyRouteParametersChanged =
|
|
2722
|
+
PlaceService.prototype.notifyRouteParametersChanged =
|
|
2723
|
+
// @Trace()
|
|
2724
|
+
/**
|
|
2715
2725
|
* @param {?} params
|
|
2716
2726
|
* @return {?}
|
|
2717
2727
|
*/
|
|
@@ -2729,11 +2739,15 @@ var PlaceService = /** @class */ (function (_super) {
|
|
|
2729
2739
|
});
|
|
2730
2740
|
}
|
|
2731
2741
|
};
|
|
2742
|
+
// @Trace()
|
|
2743
|
+
// @Trace()
|
|
2732
2744
|
/**
|
|
2733
2745
|
* @param {?} snapshot
|
|
2734
2746
|
* @return {?}
|
|
2735
2747
|
*/
|
|
2736
|
-
PlaceService.prototype.sanitise =
|
|
2748
|
+
PlaceService.prototype.sanitise =
|
|
2749
|
+
// @Trace()
|
|
2750
|
+
/**
|
|
2737
2751
|
* @param {?} snapshot
|
|
2738
2752
|
* @return {?}
|
|
2739
2753
|
*/
|
|
@@ -2755,30 +2769,6 @@ var PlaceService = /** @class */ (function (_super) {
|
|
|
2755
2769
|
{ type: Injector }
|
|
2756
2770
|
]; };
|
|
2757
2771
|
/** @nocollapse */ PlaceService.ngInjectableDef = ɵɵdefineInjectable({ factory: function PlaceService_Factory() { return new PlaceService(ɵɵinject(Router), ɵɵinject(INJECTOR)); }, token: PlaceService, providedIn: "root" });
|
|
2758
|
-
__decorate([
|
|
2759
|
-
Trace(),
|
|
2760
|
-
__metadata("design:type", Function),
|
|
2761
|
-
__metadata("design:paramtypes", [PlaceComponent]),
|
|
2762
|
-
__metadata("design:returntype", void 0)
|
|
2763
|
-
], PlaceService.prototype, "onActivate", null);
|
|
2764
|
-
__decorate([
|
|
2765
|
-
Trace(),
|
|
2766
|
-
__metadata("design:type", Function),
|
|
2767
|
-
__metadata("design:paramtypes", [PlaceComponent]),
|
|
2768
|
-
__metadata("design:returntype", void 0)
|
|
2769
|
-
], PlaceService.prototype, "onDeactivate", null);
|
|
2770
|
-
__decorate([
|
|
2771
|
-
Trace(),
|
|
2772
|
-
__metadata("design:type", Function),
|
|
2773
|
-
__metadata("design:paramtypes", [Object]),
|
|
2774
|
-
__metadata("design:returntype", void 0)
|
|
2775
|
-
], PlaceService.prototype, "notifyRouteParametersChanged", null);
|
|
2776
|
-
__decorate([
|
|
2777
|
-
Trace(),
|
|
2778
|
-
__metadata("design:type", Function),
|
|
2779
|
-
__metadata("design:paramtypes", [ParameterSnapshot]),
|
|
2780
|
-
__metadata("design:returntype", Promise)
|
|
2781
|
-
], PlaceService.prototype, "sanitise", null);
|
|
2782
2772
|
return PlaceService;
|
|
2783
2773
|
}(GarbageCollector));
|
|
2784
2774
|
if (false) {
|
|
@@ -2856,10 +2846,49 @@ var LEFT_RIGHT_PLACE_ANIMATION = leftRightPlaceAnimation("0.3s");
|
|
|
2856
2846
|
* @fileoverview added by tsickle
|
|
2857
2847
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2858
2848
|
*/
|
|
2859
|
-
var PlaceOutletComponent = /** @class */ (function () {
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2849
|
+
var PlaceOutletComponent = /** @class */ (function (_super) {
|
|
2850
|
+
__extends(PlaceOutletComponent, _super);
|
|
2851
|
+
function PlaceOutletComponent(placeService, activatedRoute) {
|
|
2852
|
+
var _this = _super.call(this) || this;
|
|
2853
|
+
_this.placeService = placeService;
|
|
2854
|
+
_this.activatedRoute = activatedRoute;
|
|
2855
|
+
_this.animate = true;
|
|
2856
|
+
_this.outletUrlSegment = new MutableListModel();
|
|
2857
|
+
var _a = Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
2858
|
+
_this.myPath = observe.listsFrom(activatedRoute.url).last().map((/**
|
|
2859
|
+
* @param {?} s
|
|
2860
|
+
* @return {?}
|
|
2861
|
+
*/
|
|
2862
|
+
function (s) { return s.toString(); })).reduce((/**
|
|
2863
|
+
* @param {?} bits
|
|
2864
|
+
* @return {?}
|
|
2865
|
+
*/
|
|
2866
|
+
function (bits) { return bits.join(','); }));
|
|
2867
|
+
console.log("new outlet@(" + _this.myPath.value + ")");
|
|
2868
|
+
_this.outletChildPath = chain(_this.outletUrlSegment).map((/**
|
|
2869
|
+
* @param {?} s
|
|
2870
|
+
* @return {?}
|
|
2871
|
+
*/
|
|
2872
|
+
function (s) { return s.toString(); })).reduce((/**
|
|
2873
|
+
* @param {?} bits
|
|
2874
|
+
* @return {?}
|
|
2875
|
+
*/
|
|
2876
|
+
function (bits) { return bits.join(","); }));
|
|
2877
|
+
_this.state = chain(_this.myPath).map((/**
|
|
2878
|
+
* @param {?} path
|
|
2879
|
+
* @return {?}
|
|
2880
|
+
*/
|
|
2881
|
+
function (path) {
|
|
2882
|
+
return "outlet@(" + path + "), child path->" + _this.outletChildPath.value;
|
|
2883
|
+
}), { dependsOn: _this.outletChildPath });
|
|
2884
|
+
when.valueOf(_this.state).changes((/**
|
|
2885
|
+
* @param {?} debug
|
|
2886
|
+
* @return {?}
|
|
2887
|
+
*/
|
|
2888
|
+
function (debug) {
|
|
2889
|
+
console.log("Outlet Changed -> " + debug);
|
|
2890
|
+
}));
|
|
2891
|
+
return _this;
|
|
2863
2892
|
}
|
|
2864
2893
|
/**
|
|
2865
2894
|
* @return {?}
|
|
@@ -2869,26 +2898,71 @@ var PlaceOutletComponent = /** @class */ (function () {
|
|
|
2869
2898
|
*/
|
|
2870
2899
|
function () {
|
|
2871
2900
|
};
|
|
2901
|
+
/**
|
|
2902
|
+
* @return {?}
|
|
2903
|
+
*/
|
|
2904
|
+
PlaceOutletComponent.prototype.ngAfterViewInit = /**
|
|
2905
|
+
* @return {?}
|
|
2906
|
+
*/
|
|
2907
|
+
function () {
|
|
2908
|
+
// this.routerOutLetQuery.changes.subscribe(() => {
|
|
2909
|
+
// this.updateRouterOutlet(this.routerOutLetQuery.first);
|
|
2910
|
+
// });
|
|
2911
|
+
};
|
|
2912
|
+
/**
|
|
2913
|
+
* @return {?}
|
|
2914
|
+
*/
|
|
2915
|
+
PlaceOutletComponent.prototype.ngAfterViewChecked = /**
|
|
2916
|
+
* @return {?}
|
|
2917
|
+
*/
|
|
2918
|
+
function () {
|
|
2919
|
+
// console.log(`@AfterViewChecked: ${this.state.value}`);
|
|
2920
|
+
this.updateRouterOutlet(this.routerOutLetQuery.first);
|
|
2921
|
+
};
|
|
2922
|
+
// @Trace()
|
|
2923
|
+
// ngOnDestroy(): void {
|
|
2924
|
+
// console.log('outletSegments', this.outletUrlSegment.value);
|
|
2925
|
+
// console.log('mySegments', this.myPath.value);
|
|
2926
|
+
// super.ngOnDestroy();
|
|
2927
|
+
// }
|
|
2928
|
+
// @Trace()
|
|
2929
|
+
// @Trace()
|
|
2930
|
+
// ngOnDestroy(): void {
|
|
2931
|
+
// console.log('outletSegments', this.outletUrlSegment.value);
|
|
2932
|
+
// console.log('mySegments', this.myPath.value);
|
|
2933
|
+
// super.ngOnDestroy();
|
|
2934
|
+
// }
|
|
2935
|
+
// @Trace()
|
|
2872
2936
|
/**
|
|
2873
2937
|
* @param {?} $event
|
|
2874
2938
|
* @return {?}
|
|
2875
2939
|
*/
|
|
2876
|
-
PlaceOutletComponent.prototype.
|
|
2940
|
+
PlaceOutletComponent.prototype.onOutletActivated =
|
|
2941
|
+
// @Trace()
|
|
2942
|
+
// ngOnDestroy(): void {
|
|
2943
|
+
// console.log('outletSegments', this.outletUrlSegment.value);
|
|
2944
|
+
// console.log('mySegments', this.myPath.value);
|
|
2945
|
+
// super.ngOnDestroy();
|
|
2946
|
+
// }
|
|
2947
|
+
// @Trace()
|
|
2948
|
+
/**
|
|
2877
2949
|
* @param {?} $event
|
|
2878
2950
|
* @return {?}
|
|
2879
2951
|
*/
|
|
2880
2952
|
function ($event) {
|
|
2953
|
+
// console.log(this.routerOutLet.activatedRoute.snapshot.url);
|
|
2881
2954
|
this.currentPlace = $event;
|
|
2882
2955
|
this.placeService.onActivate($event);
|
|
2883
2956
|
if (!this.animate) {
|
|
2884
|
-
|
|
2957
|
+
// we're not animating so trigger any post animation callbacks now.
|
|
2958
|
+
this.animationDone();
|
|
2885
2959
|
}
|
|
2886
2960
|
};
|
|
2887
2961
|
/**
|
|
2888
2962
|
* @param {?} $event
|
|
2889
2963
|
* @return {?}
|
|
2890
2964
|
*/
|
|
2891
|
-
PlaceOutletComponent.prototype.
|
|
2965
|
+
PlaceOutletComponent.prototype.onOutletDeactivated = /**
|
|
2892
2966
|
* @param {?} $event
|
|
2893
2967
|
* @return {?}
|
|
2894
2968
|
*/
|
|
@@ -2914,54 +2988,88 @@ var PlaceOutletComponent = /** @class */ (function () {
|
|
|
2914
2988
|
* @return {?}
|
|
2915
2989
|
*/
|
|
2916
2990
|
function () {
|
|
2917
|
-
this.
|
|
2991
|
+
if (this.currentPlace) {
|
|
2992
|
+
this.currentPlace.onPlaceReady();
|
|
2993
|
+
}
|
|
2918
2994
|
};
|
|
2995
|
+
// @Trace()
|
|
2996
|
+
// @Trace()
|
|
2919
2997
|
/**
|
|
2920
2998
|
* @private
|
|
2999
|
+
* @param {?} first
|
|
2921
3000
|
* @return {?}
|
|
2922
3001
|
*/
|
|
2923
|
-
PlaceOutletComponent.prototype.
|
|
3002
|
+
PlaceOutletComponent.prototype.updateRouterOutlet =
|
|
3003
|
+
// @Trace()
|
|
3004
|
+
/**
|
|
2924
3005
|
* @private
|
|
3006
|
+
* @param {?} first
|
|
2925
3007
|
* @return {?}
|
|
2926
3008
|
*/
|
|
2927
|
-
function () {
|
|
2928
|
-
if (
|
|
2929
|
-
this.
|
|
3009
|
+
function (first) {
|
|
3010
|
+
if (first.isActivated) {
|
|
3011
|
+
this.outletUrlSegment.value = first.activatedRoute.snapshot.url;
|
|
2930
3012
|
}
|
|
2931
3013
|
};
|
|
2932
3014
|
PlaceOutletComponent.decorators = [
|
|
2933
3015
|
{ type: Component, args: [{
|
|
2934
3016
|
selector: 'angular-ui-powerups-place-outlet',
|
|
2935
|
-
template: "<div class=\"router-outlet-container\"\n [@routeAnimations]=\"getPlaceOrder(routerOutlet)\"\n (@routeAnimations.done)=\"animationDone()\"\n>\n <router-outlet #routerOutlet=\"outlet\"\n (activate)=\"
|
|
3017
|
+
template: "<div class=\"router-outlet-container\"\n [@routeAnimations]=\"getPlaceOrder(routerOutlet)\"\n (@routeAnimations.done)=\"animationDone()\"\n>\n <router-outlet #routerOutlet=\"outlet\"\n (activate)=\"onOutletActivated($event)\"\n (deactivate)=\"onOutletDeactivated($event)\">\n </router-outlet>\n</div>\n\n",
|
|
2936
3018
|
animations: [LEFT_RIGHT_PLACE_ANIMATION],
|
|
2937
3019
|
styles: [":host{display:flex;flex-direction:column;min-height:0}.router-outlet-container{flex:1;display:block;position:relative;min-height:0}router-outlet{display:none}"]
|
|
2938
3020
|
}] }
|
|
2939
3021
|
];
|
|
2940
3022
|
/** @nocollapse */
|
|
2941
3023
|
PlaceOutletComponent.ctorParameters = function () { return [
|
|
2942
|
-
{ type: PlaceService }
|
|
3024
|
+
{ type: PlaceService },
|
|
3025
|
+
{ type: ActivatedRoute }
|
|
2943
3026
|
]; };
|
|
2944
3027
|
PlaceOutletComponent.propDecorators = {
|
|
2945
3028
|
animate: [{ type: Input }],
|
|
2946
|
-
|
|
3029
|
+
routerOutLetQuery: [{ type: ViewChildren, args: [RouterOutlet,] }]
|
|
2947
3030
|
};
|
|
2948
3031
|
return PlaceOutletComponent;
|
|
2949
|
-
}());
|
|
3032
|
+
}(DisposableComponent));
|
|
2950
3033
|
if (false) {
|
|
2951
3034
|
/** @type {?} */
|
|
2952
3035
|
PlaceOutletComponent.prototype.animate;
|
|
2953
3036
|
/** @type {?} */
|
|
2954
|
-
PlaceOutletComponent.prototype.
|
|
3037
|
+
PlaceOutletComponent.prototype.routerOutLetQuery;
|
|
2955
3038
|
/**
|
|
2956
3039
|
* @type {?}
|
|
2957
3040
|
* @private
|
|
2958
3041
|
*/
|
|
2959
3042
|
PlaceOutletComponent.prototype.currentPlace;
|
|
3043
|
+
/**
|
|
3044
|
+
* @type {?}
|
|
3045
|
+
* @private
|
|
3046
|
+
*/
|
|
3047
|
+
PlaceOutletComponent.prototype.myPath;
|
|
3048
|
+
/**
|
|
3049
|
+
* @type {?}
|
|
3050
|
+
* @private
|
|
3051
|
+
*/
|
|
3052
|
+
PlaceOutletComponent.prototype.outletUrlSegment;
|
|
3053
|
+
/**
|
|
3054
|
+
* @type {?}
|
|
3055
|
+
* @private
|
|
3056
|
+
*/
|
|
3057
|
+
PlaceOutletComponent.prototype.outletChildPath;
|
|
3058
|
+
/**
|
|
3059
|
+
* @type {?}
|
|
3060
|
+
* @private
|
|
3061
|
+
*/
|
|
3062
|
+
PlaceOutletComponent.prototype.state;
|
|
2960
3063
|
/**
|
|
2961
3064
|
* @type {?}
|
|
2962
3065
|
* @private
|
|
2963
3066
|
*/
|
|
2964
3067
|
PlaceOutletComponent.prototype.placeService;
|
|
3068
|
+
/**
|
|
3069
|
+
* @type {?}
|
|
3070
|
+
* @private
|
|
3071
|
+
*/
|
|
3072
|
+
PlaceOutletComponent.prototype.activatedRoute;
|
|
2965
3073
|
}
|
|
2966
3074
|
|
|
2967
3075
|
/**
|
|
@@ -2976,7 +3084,7 @@ var TabbedPlaceNavigationComponent = /** @class */ (function (_super) {
|
|
|
2976
3084
|
TabbedPlaceNavigationComponent.decorators = [
|
|
2977
3085
|
{ type: Component, args: [{
|
|
2978
3086
|
selector: 'angular-ui-powerups-tabbed-place-navigation',
|
|
2979
|
-
template: "<nav mat-tab-nav-bar>\n <a mat-tab-link *ngFor=\"let place of placeDefinitions.value\"\n [routerLink]='place.path'\n routerLinkActive #rla=\"routerLinkActive\"\n [active]=\"rla.isActive\"\n [matTooltip]=\"
|
|
3087
|
+
template: "<nav mat-tab-nav-bar>\n <a mat-tab-link *ngFor=\"let place of placeDefinitions.value\"\n [routerLink]='place.path'\n routerLinkActive #rla=\"routerLinkActive\"\n [active]=\"rla.isActive\"\n [matTooltip]=\"getNav(place).tooltip()\">\n <mat-icon *ngIf=\"getNav(place).icon()\">{{getNav(place).icon()}}</mat-icon>\n <span>{{getNav(place).title()}}</span>\n </a>\n</nav>\n",
|
|
2980
3088
|
styles: [""]
|
|
2981
3089
|
}] }
|
|
2982
3090
|
];
|
|
@@ -3051,6 +3159,7 @@ var AngularUiPowerupsModule = /** @class */ (function () {
|
|
|
3051
3159
|
MatInputModule,
|
|
3052
3160
|
MatFormFieldModule,
|
|
3053
3161
|
MatSelectModule,
|
|
3162
|
+
MatTabsModule$1,
|
|
3054
3163
|
PlaceModule,
|
|
3055
3164
|
InteractionModule
|
|
3056
3165
|
],
|
|
@@ -3562,7 +3671,15 @@ var LeavePlaceGuard = /** @class */ (function () {
|
|
|
3562
3671
|
// HACK: this will break with child routes...
|
|
3563
3672
|
/** @type {?} */
|
|
3564
3673
|
var path = "/" + component.placeDefinition.path;
|
|
3565
|
-
console.log({
|
|
3674
|
+
console.log({
|
|
3675
|
+
placePath: path,
|
|
3676
|
+
currentRoute: currentRoute.toString(),
|
|
3677
|
+
currentStateUrl: currentState.url,
|
|
3678
|
+
nextStateUrl: nextState.url,
|
|
3679
|
+
currentStateUrlTree: this.router.parseUrl(currentState.url).root.children[PRIMARY_OUTLET].segments,
|
|
3680
|
+
nextStateUrlTree: this.router.parseUrl(nextState.url).root.children[PRIMARY_OUTLET].segments
|
|
3681
|
+
});
|
|
3682
|
+
// nextState is the full path...
|
|
3566
3683
|
if (!nextState.url.startsWith(path)) {
|
|
3567
3684
|
return component.canDeactivate();
|
|
3568
3685
|
}
|
|
@@ -3621,7 +3738,7 @@ var PlaceRouteGuard = /** @class */ (function () {
|
|
|
3621
3738
|
// Id snapshot are repesented by 2 url segments
|
|
3622
3739
|
// ID => [{'/basePath', params}, {'id', params}]
|
|
3623
3740
|
// NO ID => [{'/basePath', params}]
|
|
3624
|
-
console.log({
|
|
3741
|
+
// console.log({urlSegments: route.url});
|
|
3625
3742
|
// const snapshot = ParameterSnapshot.create(PlaceComponent.getDefinition(route.component as Constructable<PlaceComponent>), route.paramMap);
|
|
3626
3743
|
// return this.placeService.sanitise(snapshot).then(sanitised => {
|
|
3627
3744
|
// if (sanitised.hasChanged(snapshot)) {
|