@coolon/angular-ui-powerups 0.0.38 → 0.0.42
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 +183 -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/interaction/interaction.module.js +4 -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/interaction/interaction.module.js +4 -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 +132 -53
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +181 -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';
|
|
@@ -1665,6 +1665,9 @@ var InteractionModule = /** @class */ (function () {
|
|
|
1665
1665
|
AlertDialogComponent,
|
|
1666
1666
|
ActivityOutletComponent
|
|
1667
1667
|
],
|
|
1668
|
+
exports: [
|
|
1669
|
+
ActivityContainerComponent,
|
|
1670
|
+
],
|
|
1668
1671
|
entryComponents: [
|
|
1669
1672
|
ActivityContainerComponent,
|
|
1670
1673
|
ConfirmationDialogComponent,
|
|
@@ -2336,10 +2339,14 @@ var PlaceComponent = /** @class */ (function (_super) {
|
|
|
2336
2339
|
function () {
|
|
2337
2340
|
return true;
|
|
2338
2341
|
};
|
|
2342
|
+
// @Trace()
|
|
2343
|
+
// @Trace()
|
|
2339
2344
|
/**
|
|
2340
2345
|
* @return {?}
|
|
2341
2346
|
*/
|
|
2342
|
-
PlaceComponent.prototype.onPlaceReady =
|
|
2347
|
+
PlaceComponent.prototype.onPlaceReady =
|
|
2348
|
+
// @Trace()
|
|
2349
|
+
/**
|
|
2343
2350
|
* @return {?}
|
|
2344
2351
|
*/
|
|
2345
2352
|
function () {
|
|
@@ -2349,12 +2356,6 @@ var PlaceComponent = /** @class */ (function (_super) {
|
|
|
2349
2356
|
__metadata("design:type", PlaceComponent.Definition),
|
|
2350
2357
|
__metadata("design:paramtypes", [])
|
|
2351
2358
|
], 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
2359
|
return PlaceComponent;
|
|
2359
2360
|
}(DisposableComponent));
|
|
2360
2361
|
if (false) {
|
|
@@ -2546,13 +2547,13 @@ var AbstractPlaceNavigationComponent = /** @class */ (function (_super) {
|
|
|
2546
2547
|
* @param {?} placeDef
|
|
2547
2548
|
* @return {?}
|
|
2548
2549
|
*/
|
|
2549
|
-
AbstractPlaceNavigationComponent.prototype.
|
|
2550
|
+
AbstractPlaceNavigationComponent.prototype.getNav = /**
|
|
2550
2551
|
* @param {?} placeDef
|
|
2551
2552
|
* @return {?}
|
|
2552
2553
|
*/
|
|
2553
2554
|
function (placeDef) {
|
|
2554
2555
|
/** @type {?} */
|
|
2555
|
-
var navItem = (/** @type {?} */ (placeDef.getData('
|
|
2556
|
+
var navItem = (/** @type {?} */ (placeDef.getData('nav')));
|
|
2556
2557
|
return {
|
|
2557
2558
|
title: (/**
|
|
2558
2559
|
* @return {?}
|
|
@@ -2593,7 +2594,7 @@ var AbstractPlaceNavigationComponent = /** @class */ (function (_super) {
|
|
|
2593
2594
|
__metadata("design:type", Function),
|
|
2594
2595
|
__metadata("design:paramtypes", [PlaceComponent.Definition]),
|
|
2595
2596
|
__metadata("design:returntype", Object)
|
|
2596
|
-
], AbstractPlaceNavigationComponent.prototype, "
|
|
2597
|
+
], AbstractPlaceNavigationComponent.prototype, "getNav", null);
|
|
2597
2598
|
return AbstractPlaceNavigationComponent;
|
|
2598
2599
|
}(DisposableComponent));
|
|
2599
2600
|
if (false) {
|
|
@@ -2646,7 +2647,7 @@ var ListPlaceNavComponent = /** @class */ (function (_super) {
|
|
|
2646
2647
|
ListPlaceNavComponent.decorators = [
|
|
2647
2648
|
{ type: Component, args: [{
|
|
2648
2649
|
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]=\"
|
|
2650
|
+
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
2651
|
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
2652
|
}] }
|
|
2652
2653
|
];
|
|
@@ -2685,33 +2686,45 @@ var PlaceService = /** @class */ (function (_super) {
|
|
|
2685
2686
|
enumerable: true,
|
|
2686
2687
|
configurable: true
|
|
2687
2688
|
});
|
|
2689
|
+
// @Trace()
|
|
2690
|
+
// @Trace()
|
|
2688
2691
|
/**
|
|
2689
2692
|
* @param {?} place
|
|
2690
2693
|
* @return {?}
|
|
2691
2694
|
*/
|
|
2692
|
-
PlaceService.prototype.onActivate =
|
|
2695
|
+
PlaceService.prototype.onActivate =
|
|
2696
|
+
// @Trace()
|
|
2697
|
+
/**
|
|
2693
2698
|
* @param {?} place
|
|
2694
2699
|
* @return {?}
|
|
2695
2700
|
*/
|
|
2696
2701
|
function (place) {
|
|
2697
2702
|
this._activePlaces.push(place);
|
|
2698
2703
|
};
|
|
2704
|
+
// @Trace()
|
|
2705
|
+
// @Trace()
|
|
2699
2706
|
/**
|
|
2700
2707
|
* @param {?} place
|
|
2701
2708
|
* @return {?}
|
|
2702
2709
|
*/
|
|
2703
|
-
PlaceService.prototype.onDeactivate =
|
|
2710
|
+
PlaceService.prototype.onDeactivate =
|
|
2711
|
+
// @Trace()
|
|
2712
|
+
/**
|
|
2704
2713
|
* @param {?} place
|
|
2705
2714
|
* @return {?}
|
|
2706
2715
|
*/
|
|
2707
2716
|
function (place) {
|
|
2708
2717
|
this._activePlaces.remove(place);
|
|
2709
2718
|
};
|
|
2719
|
+
// @Trace()
|
|
2720
|
+
// @Trace()
|
|
2710
2721
|
/**
|
|
2711
2722
|
* @param {?} params
|
|
2712
2723
|
* @return {?}
|
|
2713
2724
|
*/
|
|
2714
|
-
PlaceService.prototype.notifyRouteParametersChanged =
|
|
2725
|
+
PlaceService.prototype.notifyRouteParametersChanged =
|
|
2726
|
+
// @Trace()
|
|
2727
|
+
/**
|
|
2715
2728
|
* @param {?} params
|
|
2716
2729
|
* @return {?}
|
|
2717
2730
|
*/
|
|
@@ -2729,11 +2742,15 @@ var PlaceService = /** @class */ (function (_super) {
|
|
|
2729
2742
|
});
|
|
2730
2743
|
}
|
|
2731
2744
|
};
|
|
2745
|
+
// @Trace()
|
|
2746
|
+
// @Trace()
|
|
2732
2747
|
/**
|
|
2733
2748
|
* @param {?} snapshot
|
|
2734
2749
|
* @return {?}
|
|
2735
2750
|
*/
|
|
2736
|
-
PlaceService.prototype.sanitise =
|
|
2751
|
+
PlaceService.prototype.sanitise =
|
|
2752
|
+
// @Trace()
|
|
2753
|
+
/**
|
|
2737
2754
|
* @param {?} snapshot
|
|
2738
2755
|
* @return {?}
|
|
2739
2756
|
*/
|
|
@@ -2755,30 +2772,6 @@ var PlaceService = /** @class */ (function (_super) {
|
|
|
2755
2772
|
{ type: Injector }
|
|
2756
2773
|
]; };
|
|
2757
2774
|
/** @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
2775
|
return PlaceService;
|
|
2783
2776
|
}(GarbageCollector));
|
|
2784
2777
|
if (false) {
|
|
@@ -2856,10 +2849,49 @@ var LEFT_RIGHT_PLACE_ANIMATION = leftRightPlaceAnimation("0.3s");
|
|
|
2856
2849
|
* @fileoverview added by tsickle
|
|
2857
2850
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2858
2851
|
*/
|
|
2859
|
-
var PlaceOutletComponent = /** @class */ (function () {
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2852
|
+
var PlaceOutletComponent = /** @class */ (function (_super) {
|
|
2853
|
+
__extends(PlaceOutletComponent, _super);
|
|
2854
|
+
function PlaceOutletComponent(placeService, activatedRoute) {
|
|
2855
|
+
var _this = _super.call(this) || this;
|
|
2856
|
+
_this.placeService = placeService;
|
|
2857
|
+
_this.activatedRoute = activatedRoute;
|
|
2858
|
+
_this.animate = true;
|
|
2859
|
+
_this.outletUrlSegment = new MutableListModel();
|
|
2860
|
+
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;
|
|
2861
|
+
_this.myPath = observe.listsFrom(activatedRoute.url).last().map((/**
|
|
2862
|
+
* @param {?} s
|
|
2863
|
+
* @return {?}
|
|
2864
|
+
*/
|
|
2865
|
+
function (s) { return s.toString(); })).reduce((/**
|
|
2866
|
+
* @param {?} bits
|
|
2867
|
+
* @return {?}
|
|
2868
|
+
*/
|
|
2869
|
+
function (bits) { return bits.join(','); }));
|
|
2870
|
+
console.log("new outlet@(" + _this.myPath.value + ")");
|
|
2871
|
+
_this.outletChildPath = chain(_this.outletUrlSegment).map((/**
|
|
2872
|
+
* @param {?} s
|
|
2873
|
+
* @return {?}
|
|
2874
|
+
*/
|
|
2875
|
+
function (s) { return s.toString(); })).reduce((/**
|
|
2876
|
+
* @param {?} bits
|
|
2877
|
+
* @return {?}
|
|
2878
|
+
*/
|
|
2879
|
+
function (bits) { return bits.join(","); }));
|
|
2880
|
+
_this.state = chain(_this.myPath).map((/**
|
|
2881
|
+
* @param {?} path
|
|
2882
|
+
* @return {?}
|
|
2883
|
+
*/
|
|
2884
|
+
function (path) {
|
|
2885
|
+
return "outlet@(" + path + "), child path->" + _this.outletChildPath.value;
|
|
2886
|
+
}), { dependsOn: _this.outletChildPath });
|
|
2887
|
+
when.valueOf(_this.state).changes((/**
|
|
2888
|
+
* @param {?} debug
|
|
2889
|
+
* @return {?}
|
|
2890
|
+
*/
|
|
2891
|
+
function (debug) {
|
|
2892
|
+
console.log("Outlet Changed -> " + debug);
|
|
2893
|
+
}));
|
|
2894
|
+
return _this;
|
|
2863
2895
|
}
|
|
2864
2896
|
/**
|
|
2865
2897
|
* @return {?}
|
|
@@ -2869,26 +2901,71 @@ var PlaceOutletComponent = /** @class */ (function () {
|
|
|
2869
2901
|
*/
|
|
2870
2902
|
function () {
|
|
2871
2903
|
};
|
|
2904
|
+
/**
|
|
2905
|
+
* @return {?}
|
|
2906
|
+
*/
|
|
2907
|
+
PlaceOutletComponent.prototype.ngAfterViewInit = /**
|
|
2908
|
+
* @return {?}
|
|
2909
|
+
*/
|
|
2910
|
+
function () {
|
|
2911
|
+
// this.routerOutLetQuery.changes.subscribe(() => {
|
|
2912
|
+
// this.updateRouterOutlet(this.routerOutLetQuery.first);
|
|
2913
|
+
// });
|
|
2914
|
+
};
|
|
2915
|
+
/**
|
|
2916
|
+
* @return {?}
|
|
2917
|
+
*/
|
|
2918
|
+
PlaceOutletComponent.prototype.ngAfterViewChecked = /**
|
|
2919
|
+
* @return {?}
|
|
2920
|
+
*/
|
|
2921
|
+
function () {
|
|
2922
|
+
// console.log(`@AfterViewChecked: ${this.state.value}`);
|
|
2923
|
+
this.updateRouterOutlet(this.routerOutLetQuery.first);
|
|
2924
|
+
};
|
|
2925
|
+
// @Trace()
|
|
2926
|
+
// ngOnDestroy(): void {
|
|
2927
|
+
// console.log('outletSegments', this.outletUrlSegment.value);
|
|
2928
|
+
// console.log('mySegments', this.myPath.value);
|
|
2929
|
+
// super.ngOnDestroy();
|
|
2930
|
+
// }
|
|
2931
|
+
// @Trace()
|
|
2932
|
+
// @Trace()
|
|
2933
|
+
// ngOnDestroy(): void {
|
|
2934
|
+
// console.log('outletSegments', this.outletUrlSegment.value);
|
|
2935
|
+
// console.log('mySegments', this.myPath.value);
|
|
2936
|
+
// super.ngOnDestroy();
|
|
2937
|
+
// }
|
|
2938
|
+
// @Trace()
|
|
2872
2939
|
/**
|
|
2873
2940
|
* @param {?} $event
|
|
2874
2941
|
* @return {?}
|
|
2875
2942
|
*/
|
|
2876
|
-
PlaceOutletComponent.prototype.
|
|
2943
|
+
PlaceOutletComponent.prototype.onOutletActivated =
|
|
2944
|
+
// @Trace()
|
|
2945
|
+
// ngOnDestroy(): void {
|
|
2946
|
+
// console.log('outletSegments', this.outletUrlSegment.value);
|
|
2947
|
+
// console.log('mySegments', this.myPath.value);
|
|
2948
|
+
// super.ngOnDestroy();
|
|
2949
|
+
// }
|
|
2950
|
+
// @Trace()
|
|
2951
|
+
/**
|
|
2877
2952
|
* @param {?} $event
|
|
2878
2953
|
* @return {?}
|
|
2879
2954
|
*/
|
|
2880
2955
|
function ($event) {
|
|
2956
|
+
// console.log(this.routerOutLet.activatedRoute.snapshot.url);
|
|
2881
2957
|
this.currentPlace = $event;
|
|
2882
2958
|
this.placeService.onActivate($event);
|
|
2883
2959
|
if (!this.animate) {
|
|
2884
|
-
|
|
2960
|
+
// we're not animating so trigger any post animation callbacks now.
|
|
2961
|
+
this.animationDone();
|
|
2885
2962
|
}
|
|
2886
2963
|
};
|
|
2887
2964
|
/**
|
|
2888
2965
|
* @param {?} $event
|
|
2889
2966
|
* @return {?}
|
|
2890
2967
|
*/
|
|
2891
|
-
PlaceOutletComponent.prototype.
|
|
2968
|
+
PlaceOutletComponent.prototype.onOutletDeactivated = /**
|
|
2892
2969
|
* @param {?} $event
|
|
2893
2970
|
* @return {?}
|
|
2894
2971
|
*/
|
|
@@ -2914,54 +2991,88 @@ var PlaceOutletComponent = /** @class */ (function () {
|
|
|
2914
2991
|
* @return {?}
|
|
2915
2992
|
*/
|
|
2916
2993
|
function () {
|
|
2917
|
-
this.
|
|
2994
|
+
if (this.currentPlace) {
|
|
2995
|
+
this.currentPlace.onPlaceReady();
|
|
2996
|
+
}
|
|
2918
2997
|
};
|
|
2998
|
+
// @Trace()
|
|
2999
|
+
// @Trace()
|
|
2919
3000
|
/**
|
|
2920
3001
|
* @private
|
|
3002
|
+
* @param {?} first
|
|
2921
3003
|
* @return {?}
|
|
2922
3004
|
*/
|
|
2923
|
-
PlaceOutletComponent.prototype.
|
|
3005
|
+
PlaceOutletComponent.prototype.updateRouterOutlet =
|
|
3006
|
+
// @Trace()
|
|
3007
|
+
/**
|
|
2924
3008
|
* @private
|
|
3009
|
+
* @param {?} first
|
|
2925
3010
|
* @return {?}
|
|
2926
3011
|
*/
|
|
2927
|
-
function () {
|
|
2928
|
-
if (
|
|
2929
|
-
this.
|
|
3012
|
+
function (first) {
|
|
3013
|
+
if (first.isActivated) {
|
|
3014
|
+
this.outletUrlSegment.value = first.activatedRoute.snapshot.url;
|
|
2930
3015
|
}
|
|
2931
3016
|
};
|
|
2932
3017
|
PlaceOutletComponent.decorators = [
|
|
2933
3018
|
{ type: Component, args: [{
|
|
2934
3019
|
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)=\"
|
|
3020
|
+
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
3021
|
animations: [LEFT_RIGHT_PLACE_ANIMATION],
|
|
2937
3022
|
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
3023
|
}] }
|
|
2939
3024
|
];
|
|
2940
3025
|
/** @nocollapse */
|
|
2941
3026
|
PlaceOutletComponent.ctorParameters = function () { return [
|
|
2942
|
-
{ type: PlaceService }
|
|
3027
|
+
{ type: PlaceService },
|
|
3028
|
+
{ type: ActivatedRoute }
|
|
2943
3029
|
]; };
|
|
2944
3030
|
PlaceOutletComponent.propDecorators = {
|
|
2945
3031
|
animate: [{ type: Input }],
|
|
2946
|
-
|
|
3032
|
+
routerOutLetQuery: [{ type: ViewChildren, args: [RouterOutlet,] }]
|
|
2947
3033
|
};
|
|
2948
3034
|
return PlaceOutletComponent;
|
|
2949
|
-
}());
|
|
3035
|
+
}(DisposableComponent));
|
|
2950
3036
|
if (false) {
|
|
2951
3037
|
/** @type {?} */
|
|
2952
3038
|
PlaceOutletComponent.prototype.animate;
|
|
2953
3039
|
/** @type {?} */
|
|
2954
|
-
PlaceOutletComponent.prototype.
|
|
3040
|
+
PlaceOutletComponent.prototype.routerOutLetQuery;
|
|
2955
3041
|
/**
|
|
2956
3042
|
* @type {?}
|
|
2957
3043
|
* @private
|
|
2958
3044
|
*/
|
|
2959
3045
|
PlaceOutletComponent.prototype.currentPlace;
|
|
3046
|
+
/**
|
|
3047
|
+
* @type {?}
|
|
3048
|
+
* @private
|
|
3049
|
+
*/
|
|
3050
|
+
PlaceOutletComponent.prototype.myPath;
|
|
3051
|
+
/**
|
|
3052
|
+
* @type {?}
|
|
3053
|
+
* @private
|
|
3054
|
+
*/
|
|
3055
|
+
PlaceOutletComponent.prototype.outletUrlSegment;
|
|
3056
|
+
/**
|
|
3057
|
+
* @type {?}
|
|
3058
|
+
* @private
|
|
3059
|
+
*/
|
|
3060
|
+
PlaceOutletComponent.prototype.outletChildPath;
|
|
3061
|
+
/**
|
|
3062
|
+
* @type {?}
|
|
3063
|
+
* @private
|
|
3064
|
+
*/
|
|
3065
|
+
PlaceOutletComponent.prototype.state;
|
|
2960
3066
|
/**
|
|
2961
3067
|
* @type {?}
|
|
2962
3068
|
* @private
|
|
2963
3069
|
*/
|
|
2964
3070
|
PlaceOutletComponent.prototype.placeService;
|
|
3071
|
+
/**
|
|
3072
|
+
* @type {?}
|
|
3073
|
+
* @private
|
|
3074
|
+
*/
|
|
3075
|
+
PlaceOutletComponent.prototype.activatedRoute;
|
|
2965
3076
|
}
|
|
2966
3077
|
|
|
2967
3078
|
/**
|
|
@@ -2976,7 +3087,7 @@ var TabbedPlaceNavigationComponent = /** @class */ (function (_super) {
|
|
|
2976
3087
|
TabbedPlaceNavigationComponent.decorators = [
|
|
2977
3088
|
{ type: Component, args: [{
|
|
2978
3089
|
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]=\"
|
|
3090
|
+
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
3091
|
styles: [""]
|
|
2981
3092
|
}] }
|
|
2982
3093
|
];
|
|
@@ -3051,6 +3162,7 @@ var AngularUiPowerupsModule = /** @class */ (function () {
|
|
|
3051
3162
|
MatInputModule,
|
|
3052
3163
|
MatFormFieldModule,
|
|
3053
3164
|
MatSelectModule,
|
|
3165
|
+
MatTabsModule$1,
|
|
3054
3166
|
PlaceModule,
|
|
3055
3167
|
InteractionModule
|
|
3056
3168
|
],
|
|
@@ -3562,7 +3674,15 @@ var LeavePlaceGuard = /** @class */ (function () {
|
|
|
3562
3674
|
// HACK: this will break with child routes...
|
|
3563
3675
|
/** @type {?} */
|
|
3564
3676
|
var path = "/" + component.placeDefinition.path;
|
|
3565
|
-
console.log({
|
|
3677
|
+
console.log({
|
|
3678
|
+
placePath: path,
|
|
3679
|
+
currentRoute: currentRoute.toString(),
|
|
3680
|
+
currentStateUrl: currentState.url,
|
|
3681
|
+
nextStateUrl: nextState.url,
|
|
3682
|
+
currentStateUrlTree: this.router.parseUrl(currentState.url).root.children[PRIMARY_OUTLET].segments,
|
|
3683
|
+
nextStateUrlTree: this.router.parseUrl(nextState.url).root.children[PRIMARY_OUTLET].segments
|
|
3684
|
+
});
|
|
3685
|
+
// nextState is the full path...
|
|
3566
3686
|
if (!nextState.url.startsWith(path)) {
|
|
3567
3687
|
return component.canDeactivate();
|
|
3568
3688
|
}
|
|
@@ -3621,7 +3741,7 @@ var PlaceRouteGuard = /** @class */ (function () {
|
|
|
3621
3741
|
// Id snapshot are repesented by 2 url segments
|
|
3622
3742
|
// ID => [{'/basePath', params}, {'id', params}]
|
|
3623
3743
|
// NO ID => [{'/basePath', params}]
|
|
3624
|
-
console.log({
|
|
3744
|
+
// console.log({urlSegments: route.url});
|
|
3625
3745
|
// const snapshot = ParameterSnapshot.create(PlaceComponent.getDefinition(route.component as Constructable<PlaceComponent>), route.paramMap);
|
|
3626
3746
|
// return this.placeService.sanitise(snapshot).then(sanitised => {
|
|
3627
3747
|
// if (sanitised.hasChanged(snapshot)) {
|