@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
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/forms'), require('@angular/material'), require('@angular/platform-browser/animations'), require('@coolon/pectin'), require('@angular/cdk/portal'), require('@coolon/pectin/lib/promise/deferred.class'), require('@coolon/typescript-utilities'), require('@angular/material/dialog'), require('@angular/material/icon'), require('@angular/material/list'), require('@angular/material/
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@coolon/angular-ui-powerups', ['exports', '@angular/common', '@angular/core', '@angular/forms', '@angular/material', '@angular/platform-browser/animations', '@coolon/pectin', '@angular/cdk/portal', '@coolon/pectin/lib/promise/deferred.class', '@coolon/typescript-utilities', '@angular/material/dialog', '@angular/material/icon', '@angular/material/list', '@angular/material/
|
|
4
|
-
(global = global || self, factory((global.coolon = global.coolon || {}, global.coolon['angular-ui-powerups'] = {}), global.ng.common, global.ng.core, global.ng.forms, global.ng.material, global.ng.platformBrowser.animations, global.pectin, global.ng.cdk.portal, global.deferred_class, global.typescriptUtilities, global.ng.material.dialog, global.ng.material.icon, global.ng.material.list, global.ng.material.
|
|
5
|
-
}(this, function (exports, common, core, forms, material, animations, pectin, portal, deferred_class, typescriptUtilities, dialog, icon, list,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/forms'), require('@angular/material'), require('@angular/material/tabs'), require('@angular/platform-browser/animations'), require('@coolon/pectin'), require('@angular/cdk/portal'), require('@coolon/pectin/lib/promise/deferred.class'), require('@coolon/typescript-utilities'), require('@angular/material/dialog'), require('@angular/material/icon'), require('@angular/material/list'), require('@angular/material/tooltip'), require('@angular/router'), require('@typescript-plus/fast-memoize-decorator/dist/src'), require('@typescript-plus/fast-memoize-decorator'), require('lodash'), require('reflect-metadata'), require('@angular/animations'), require('resize-observer-polyfill')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@coolon/angular-ui-powerups', ['exports', '@angular/common', '@angular/core', '@angular/forms', '@angular/material', '@angular/material/tabs', '@angular/platform-browser/animations', '@coolon/pectin', '@angular/cdk/portal', '@coolon/pectin/lib/promise/deferred.class', '@coolon/typescript-utilities', '@angular/material/dialog', '@angular/material/icon', '@angular/material/list', '@angular/material/tooltip', '@angular/router', '@typescript-plus/fast-memoize-decorator/dist/src', '@typescript-plus/fast-memoize-decorator', 'lodash', 'reflect-metadata', '@angular/animations', 'resize-observer-polyfill'], factory) :
|
|
4
|
+
(global = global || self, factory((global.coolon = global.coolon || {}, global.coolon['angular-ui-powerups'] = {}), global.ng.common, global.ng.core, global.ng.forms, global.ng.material, global.ng.material.tabs, global.ng.platformBrowser.animations, global.pectin, global.ng.cdk.portal, global.deferred_class, global.typescriptUtilities, global.ng.material.dialog, global.ng.material.icon, global.ng.material.list, global.ng.material.tooltip, global.ng.router, global.src, global.fastMemoizeDecorator, global.lodash, null, global.ng.animations, global.ResizeObserver));
|
|
5
|
+
}(this, function (exports, common, core, forms, material, tabs, animations, pectin, portal, deferred_class, typescriptUtilities, dialog, icon, list, tooltip, router, src, fastMemoizeDecorator, lodash, reflectMetadata, animations$1, ResizeObserver) { 'use strict';
|
|
6
6
|
|
|
7
7
|
ResizeObserver = ResizeObserver && ResizeObserver.hasOwnProperty('default') ? ResizeObserver['default'] : ResizeObserver;
|
|
8
8
|
|
|
@@ -2518,10 +2518,14 @@
|
|
|
2518
2518
|
function () {
|
|
2519
2519
|
return true;
|
|
2520
2520
|
};
|
|
2521
|
+
// @Trace()
|
|
2522
|
+
// @Trace()
|
|
2521
2523
|
/**
|
|
2522
2524
|
* @return {?}
|
|
2523
2525
|
*/
|
|
2524
|
-
PlaceComponent.prototype.onPlaceReady =
|
|
2526
|
+
PlaceComponent.prototype.onPlaceReady =
|
|
2527
|
+
// @Trace()
|
|
2528
|
+
/**
|
|
2525
2529
|
* @return {?}
|
|
2526
2530
|
*/
|
|
2527
2531
|
function () {
|
|
@@ -2531,12 +2535,6 @@
|
|
|
2531
2535
|
__metadata("design:type", PlaceComponent.Definition),
|
|
2532
2536
|
__metadata("design:paramtypes", [])
|
|
2533
2537
|
], PlaceComponent.prototype, "placeDefinition", null);
|
|
2534
|
-
__decorate([
|
|
2535
|
-
pectin.Trace(),
|
|
2536
|
-
__metadata("design:type", Function),
|
|
2537
|
-
__metadata("design:paramtypes", []),
|
|
2538
|
-
__metadata("design:returntype", void 0)
|
|
2539
|
-
], PlaceComponent.prototype, "onPlaceReady", null);
|
|
2540
2538
|
return PlaceComponent;
|
|
2541
2539
|
}(DisposableComponent));
|
|
2542
2540
|
if (false) {
|
|
@@ -2728,13 +2726,13 @@
|
|
|
2728
2726
|
* @param {?} placeDef
|
|
2729
2727
|
* @return {?}
|
|
2730
2728
|
*/
|
|
2731
|
-
AbstractPlaceNavigationComponent.prototype.
|
|
2729
|
+
AbstractPlaceNavigationComponent.prototype.getNav = /**
|
|
2732
2730
|
* @param {?} placeDef
|
|
2733
2731
|
* @return {?}
|
|
2734
2732
|
*/
|
|
2735
2733
|
function (placeDef) {
|
|
2736
2734
|
/** @type {?} */
|
|
2737
|
-
var navItem = (/** @type {?} */ (placeDef.getData('
|
|
2735
|
+
var navItem = (/** @type {?} */ (placeDef.getData('nav')));
|
|
2738
2736
|
return {
|
|
2739
2737
|
title: (/**
|
|
2740
2738
|
* @return {?}
|
|
@@ -2775,7 +2773,7 @@
|
|
|
2775
2773
|
__metadata("design:type", Function),
|
|
2776
2774
|
__metadata("design:paramtypes", [exports.PlaceComponent.Definition]),
|
|
2777
2775
|
__metadata("design:returntype", Object)
|
|
2778
|
-
], AbstractPlaceNavigationComponent.prototype, "
|
|
2776
|
+
], AbstractPlaceNavigationComponent.prototype, "getNav", null);
|
|
2779
2777
|
return AbstractPlaceNavigationComponent;
|
|
2780
2778
|
}(DisposableComponent));
|
|
2781
2779
|
if (false) {
|
|
@@ -2828,7 +2826,7 @@
|
|
|
2828
2826
|
ListPlaceNavComponent.decorators = [
|
|
2829
2827
|
{ type: core.Component, args: [{
|
|
2830
2828
|
selector: 'angular-ui-powerups-list-place-nav',
|
|
2831
|
-
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]=\"
|
|
2829
|
+
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",
|
|
2832
2830
|
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}"]
|
|
2833
2831
|
}] }
|
|
2834
2832
|
];
|
|
@@ -2867,33 +2865,45 @@
|
|
|
2867
2865
|
enumerable: true,
|
|
2868
2866
|
configurable: true
|
|
2869
2867
|
});
|
|
2868
|
+
// @Trace()
|
|
2869
|
+
// @Trace()
|
|
2870
2870
|
/**
|
|
2871
2871
|
* @param {?} place
|
|
2872
2872
|
* @return {?}
|
|
2873
2873
|
*/
|
|
2874
|
-
PlaceService.prototype.onActivate =
|
|
2874
|
+
PlaceService.prototype.onActivate =
|
|
2875
|
+
// @Trace()
|
|
2876
|
+
/**
|
|
2875
2877
|
* @param {?} place
|
|
2876
2878
|
* @return {?}
|
|
2877
2879
|
*/
|
|
2878
2880
|
function (place) {
|
|
2879
2881
|
this._activePlaces.push(place);
|
|
2880
2882
|
};
|
|
2883
|
+
// @Trace()
|
|
2884
|
+
// @Trace()
|
|
2881
2885
|
/**
|
|
2882
2886
|
* @param {?} place
|
|
2883
2887
|
* @return {?}
|
|
2884
2888
|
*/
|
|
2885
|
-
PlaceService.prototype.onDeactivate =
|
|
2889
|
+
PlaceService.prototype.onDeactivate =
|
|
2890
|
+
// @Trace()
|
|
2891
|
+
/**
|
|
2886
2892
|
* @param {?} place
|
|
2887
2893
|
* @return {?}
|
|
2888
2894
|
*/
|
|
2889
2895
|
function (place) {
|
|
2890
2896
|
this._activePlaces.remove(place);
|
|
2891
2897
|
};
|
|
2898
|
+
// @Trace()
|
|
2899
|
+
// @Trace()
|
|
2892
2900
|
/**
|
|
2893
2901
|
* @param {?} params
|
|
2894
2902
|
* @return {?}
|
|
2895
2903
|
*/
|
|
2896
|
-
PlaceService.prototype.notifyRouteParametersChanged =
|
|
2904
|
+
PlaceService.prototype.notifyRouteParametersChanged =
|
|
2905
|
+
// @Trace()
|
|
2906
|
+
/**
|
|
2897
2907
|
* @param {?} params
|
|
2898
2908
|
* @return {?}
|
|
2899
2909
|
*/
|
|
@@ -2911,11 +2921,15 @@
|
|
|
2911
2921
|
});
|
|
2912
2922
|
}
|
|
2913
2923
|
};
|
|
2924
|
+
// @Trace()
|
|
2925
|
+
// @Trace()
|
|
2914
2926
|
/**
|
|
2915
2927
|
* @param {?} snapshot
|
|
2916
2928
|
* @return {?}
|
|
2917
2929
|
*/
|
|
2918
|
-
PlaceService.prototype.sanitise =
|
|
2930
|
+
PlaceService.prototype.sanitise =
|
|
2931
|
+
// @Trace()
|
|
2932
|
+
/**
|
|
2919
2933
|
* @param {?} snapshot
|
|
2920
2934
|
* @return {?}
|
|
2921
2935
|
*/
|
|
@@ -2937,30 +2951,6 @@
|
|
|
2937
2951
|
{ type: core.Injector }
|
|
2938
2952
|
]; };
|
|
2939
2953
|
/** @nocollapse */ PlaceService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function PlaceService_Factory() { return new PlaceService(core.ɵɵinject(router.Router), core.ɵɵinject(core.INJECTOR)); }, token: PlaceService, providedIn: "root" });
|
|
2940
|
-
__decorate([
|
|
2941
|
-
pectin.Trace(),
|
|
2942
|
-
__metadata("design:type", Function),
|
|
2943
|
-
__metadata("design:paramtypes", [exports.PlaceComponent]),
|
|
2944
|
-
__metadata("design:returntype", void 0)
|
|
2945
|
-
], PlaceService.prototype, "onActivate", null);
|
|
2946
|
-
__decorate([
|
|
2947
|
-
pectin.Trace(),
|
|
2948
|
-
__metadata("design:type", Function),
|
|
2949
|
-
__metadata("design:paramtypes", [exports.PlaceComponent]),
|
|
2950
|
-
__metadata("design:returntype", void 0)
|
|
2951
|
-
], PlaceService.prototype, "onDeactivate", null);
|
|
2952
|
-
__decorate([
|
|
2953
|
-
pectin.Trace(),
|
|
2954
|
-
__metadata("design:type", Function),
|
|
2955
|
-
__metadata("design:paramtypes", [Object]),
|
|
2956
|
-
__metadata("design:returntype", void 0)
|
|
2957
|
-
], PlaceService.prototype, "notifyRouteParametersChanged", null);
|
|
2958
|
-
__decorate([
|
|
2959
|
-
pectin.Trace(),
|
|
2960
|
-
__metadata("design:type", Function),
|
|
2961
|
-
__metadata("design:paramtypes", [exports.ParameterSnapshot]),
|
|
2962
|
-
__metadata("design:returntype", Promise)
|
|
2963
|
-
], PlaceService.prototype, "sanitise", null);
|
|
2964
2954
|
return PlaceService;
|
|
2965
2955
|
}(pectin.GarbageCollector));
|
|
2966
2956
|
if (false) {
|
|
@@ -3038,10 +3028,49 @@
|
|
|
3038
3028
|
* @fileoverview added by tsickle
|
|
3039
3029
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3040
3030
|
*/
|
|
3041
|
-
var PlaceOutletComponent = /** @class */ (function () {
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3031
|
+
var PlaceOutletComponent = /** @class */ (function (_super) {
|
|
3032
|
+
__extends(PlaceOutletComponent, _super);
|
|
3033
|
+
function PlaceOutletComponent(placeService, activatedRoute) {
|
|
3034
|
+
var _this = _super.call(this) || this;
|
|
3035
|
+
_this.placeService = placeService;
|
|
3036
|
+
_this.activatedRoute = activatedRoute;
|
|
3037
|
+
_this.animate = true;
|
|
3038
|
+
_this.outletUrlSegment = new pectin.MutableListModel();
|
|
3039
|
+
var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
3040
|
+
_this.myPath = observe.listsFrom(activatedRoute.url).last().map((/**
|
|
3041
|
+
* @param {?} s
|
|
3042
|
+
* @return {?}
|
|
3043
|
+
*/
|
|
3044
|
+
function (s) { return s.toString(); })).reduce((/**
|
|
3045
|
+
* @param {?} bits
|
|
3046
|
+
* @return {?}
|
|
3047
|
+
*/
|
|
3048
|
+
function (bits) { return bits.join(','); }));
|
|
3049
|
+
console.log("new outlet@(" + _this.myPath.value + ")");
|
|
3050
|
+
_this.outletChildPath = chain(_this.outletUrlSegment).map((/**
|
|
3051
|
+
* @param {?} s
|
|
3052
|
+
* @return {?}
|
|
3053
|
+
*/
|
|
3054
|
+
function (s) { return s.toString(); })).reduce((/**
|
|
3055
|
+
* @param {?} bits
|
|
3056
|
+
* @return {?}
|
|
3057
|
+
*/
|
|
3058
|
+
function (bits) { return bits.join(","); }));
|
|
3059
|
+
_this.state = chain(_this.myPath).map((/**
|
|
3060
|
+
* @param {?} path
|
|
3061
|
+
* @return {?}
|
|
3062
|
+
*/
|
|
3063
|
+
function (path) {
|
|
3064
|
+
return "outlet@(" + path + "), child path->" + _this.outletChildPath.value;
|
|
3065
|
+
}), { dependsOn: _this.outletChildPath });
|
|
3066
|
+
when.valueOf(_this.state).changes((/**
|
|
3067
|
+
* @param {?} debug
|
|
3068
|
+
* @return {?}
|
|
3069
|
+
*/
|
|
3070
|
+
function (debug) {
|
|
3071
|
+
console.log("Outlet Changed -> " + debug);
|
|
3072
|
+
}));
|
|
3073
|
+
return _this;
|
|
3045
3074
|
}
|
|
3046
3075
|
/**
|
|
3047
3076
|
* @return {?}
|
|
@@ -3051,26 +3080,71 @@
|
|
|
3051
3080
|
*/
|
|
3052
3081
|
function () {
|
|
3053
3082
|
};
|
|
3083
|
+
/**
|
|
3084
|
+
* @return {?}
|
|
3085
|
+
*/
|
|
3086
|
+
PlaceOutletComponent.prototype.ngAfterViewInit = /**
|
|
3087
|
+
* @return {?}
|
|
3088
|
+
*/
|
|
3089
|
+
function () {
|
|
3090
|
+
// this.routerOutLetQuery.changes.subscribe(() => {
|
|
3091
|
+
// this.updateRouterOutlet(this.routerOutLetQuery.first);
|
|
3092
|
+
// });
|
|
3093
|
+
};
|
|
3094
|
+
/**
|
|
3095
|
+
* @return {?}
|
|
3096
|
+
*/
|
|
3097
|
+
PlaceOutletComponent.prototype.ngAfterViewChecked = /**
|
|
3098
|
+
* @return {?}
|
|
3099
|
+
*/
|
|
3100
|
+
function () {
|
|
3101
|
+
// console.log(`@AfterViewChecked: ${this.state.value}`);
|
|
3102
|
+
this.updateRouterOutlet(this.routerOutLetQuery.first);
|
|
3103
|
+
};
|
|
3104
|
+
// @Trace()
|
|
3105
|
+
// ngOnDestroy(): void {
|
|
3106
|
+
// console.log('outletSegments', this.outletUrlSegment.value);
|
|
3107
|
+
// console.log('mySegments', this.myPath.value);
|
|
3108
|
+
// super.ngOnDestroy();
|
|
3109
|
+
// }
|
|
3110
|
+
// @Trace()
|
|
3111
|
+
// @Trace()
|
|
3112
|
+
// ngOnDestroy(): void {
|
|
3113
|
+
// console.log('outletSegments', this.outletUrlSegment.value);
|
|
3114
|
+
// console.log('mySegments', this.myPath.value);
|
|
3115
|
+
// super.ngOnDestroy();
|
|
3116
|
+
// }
|
|
3117
|
+
// @Trace()
|
|
3054
3118
|
/**
|
|
3055
3119
|
* @param {?} $event
|
|
3056
3120
|
* @return {?}
|
|
3057
3121
|
*/
|
|
3058
|
-
PlaceOutletComponent.prototype.
|
|
3122
|
+
PlaceOutletComponent.prototype.onOutletActivated =
|
|
3123
|
+
// @Trace()
|
|
3124
|
+
// ngOnDestroy(): void {
|
|
3125
|
+
// console.log('outletSegments', this.outletUrlSegment.value);
|
|
3126
|
+
// console.log('mySegments', this.myPath.value);
|
|
3127
|
+
// super.ngOnDestroy();
|
|
3128
|
+
// }
|
|
3129
|
+
// @Trace()
|
|
3130
|
+
/**
|
|
3059
3131
|
* @param {?} $event
|
|
3060
3132
|
* @return {?}
|
|
3061
3133
|
*/
|
|
3062
3134
|
function ($event) {
|
|
3135
|
+
// console.log(this.routerOutLet.activatedRoute.snapshot.url);
|
|
3063
3136
|
this.currentPlace = $event;
|
|
3064
3137
|
this.placeService.onActivate($event);
|
|
3065
3138
|
if (!this.animate) {
|
|
3066
|
-
|
|
3139
|
+
// we're not animating so trigger any post animation callbacks now.
|
|
3140
|
+
this.animationDone();
|
|
3067
3141
|
}
|
|
3068
3142
|
};
|
|
3069
3143
|
/**
|
|
3070
3144
|
* @param {?} $event
|
|
3071
3145
|
* @return {?}
|
|
3072
3146
|
*/
|
|
3073
|
-
PlaceOutletComponent.prototype.
|
|
3147
|
+
PlaceOutletComponent.prototype.onOutletDeactivated = /**
|
|
3074
3148
|
* @param {?} $event
|
|
3075
3149
|
* @return {?}
|
|
3076
3150
|
*/
|
|
@@ -3096,54 +3170,88 @@
|
|
|
3096
3170
|
* @return {?}
|
|
3097
3171
|
*/
|
|
3098
3172
|
function () {
|
|
3099
|
-
this.
|
|
3173
|
+
if (this.currentPlace) {
|
|
3174
|
+
this.currentPlace.onPlaceReady();
|
|
3175
|
+
}
|
|
3100
3176
|
};
|
|
3177
|
+
// @Trace()
|
|
3178
|
+
// @Trace()
|
|
3101
3179
|
/**
|
|
3102
3180
|
* @private
|
|
3181
|
+
* @param {?} first
|
|
3103
3182
|
* @return {?}
|
|
3104
3183
|
*/
|
|
3105
|
-
PlaceOutletComponent.prototype.
|
|
3184
|
+
PlaceOutletComponent.prototype.updateRouterOutlet =
|
|
3185
|
+
// @Trace()
|
|
3186
|
+
/**
|
|
3106
3187
|
* @private
|
|
3188
|
+
* @param {?} first
|
|
3107
3189
|
* @return {?}
|
|
3108
3190
|
*/
|
|
3109
|
-
function () {
|
|
3110
|
-
if (
|
|
3111
|
-
this.
|
|
3191
|
+
function (first) {
|
|
3192
|
+
if (first.isActivated) {
|
|
3193
|
+
this.outletUrlSegment.value = first.activatedRoute.snapshot.url;
|
|
3112
3194
|
}
|
|
3113
3195
|
};
|
|
3114
3196
|
PlaceOutletComponent.decorators = [
|
|
3115
3197
|
{ type: core.Component, args: [{
|
|
3116
3198
|
selector: 'angular-ui-powerups-place-outlet',
|
|
3117
|
-
template: "<div class=\"router-outlet-container\"\n [@routeAnimations]=\"getPlaceOrder(routerOutlet)\"\n (@routeAnimations.done)=\"animationDone()\"\n>\n <router-outlet #routerOutlet=\"outlet\"\n (activate)=\"
|
|
3199
|
+
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",
|
|
3118
3200
|
animations: [LEFT_RIGHT_PLACE_ANIMATION],
|
|
3119
3201
|
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}"]
|
|
3120
3202
|
}] }
|
|
3121
3203
|
];
|
|
3122
3204
|
/** @nocollapse */
|
|
3123
3205
|
PlaceOutletComponent.ctorParameters = function () { return [
|
|
3124
|
-
{ type: PlaceService }
|
|
3206
|
+
{ type: PlaceService },
|
|
3207
|
+
{ type: router.ActivatedRoute }
|
|
3125
3208
|
]; };
|
|
3126
3209
|
PlaceOutletComponent.propDecorators = {
|
|
3127
3210
|
animate: [{ type: core.Input }],
|
|
3128
|
-
|
|
3211
|
+
routerOutLetQuery: [{ type: core.ViewChildren, args: [router.RouterOutlet,] }]
|
|
3129
3212
|
};
|
|
3130
3213
|
return PlaceOutletComponent;
|
|
3131
|
-
}());
|
|
3214
|
+
}(DisposableComponent));
|
|
3132
3215
|
if (false) {
|
|
3133
3216
|
/** @type {?} */
|
|
3134
3217
|
PlaceOutletComponent.prototype.animate;
|
|
3135
3218
|
/** @type {?} */
|
|
3136
|
-
PlaceOutletComponent.prototype.
|
|
3219
|
+
PlaceOutletComponent.prototype.routerOutLetQuery;
|
|
3137
3220
|
/**
|
|
3138
3221
|
* @type {?}
|
|
3139
3222
|
* @private
|
|
3140
3223
|
*/
|
|
3141
3224
|
PlaceOutletComponent.prototype.currentPlace;
|
|
3225
|
+
/**
|
|
3226
|
+
* @type {?}
|
|
3227
|
+
* @private
|
|
3228
|
+
*/
|
|
3229
|
+
PlaceOutletComponent.prototype.myPath;
|
|
3230
|
+
/**
|
|
3231
|
+
* @type {?}
|
|
3232
|
+
* @private
|
|
3233
|
+
*/
|
|
3234
|
+
PlaceOutletComponent.prototype.outletUrlSegment;
|
|
3235
|
+
/**
|
|
3236
|
+
* @type {?}
|
|
3237
|
+
* @private
|
|
3238
|
+
*/
|
|
3239
|
+
PlaceOutletComponent.prototype.outletChildPath;
|
|
3240
|
+
/**
|
|
3241
|
+
* @type {?}
|
|
3242
|
+
* @private
|
|
3243
|
+
*/
|
|
3244
|
+
PlaceOutletComponent.prototype.state;
|
|
3142
3245
|
/**
|
|
3143
3246
|
* @type {?}
|
|
3144
3247
|
* @private
|
|
3145
3248
|
*/
|
|
3146
3249
|
PlaceOutletComponent.prototype.placeService;
|
|
3250
|
+
/**
|
|
3251
|
+
* @type {?}
|
|
3252
|
+
* @private
|
|
3253
|
+
*/
|
|
3254
|
+
PlaceOutletComponent.prototype.activatedRoute;
|
|
3147
3255
|
}
|
|
3148
3256
|
|
|
3149
3257
|
/**
|
|
@@ -3158,7 +3266,7 @@
|
|
|
3158
3266
|
TabbedPlaceNavigationComponent.decorators = [
|
|
3159
3267
|
{ type: core.Component, args: [{
|
|
3160
3268
|
selector: 'angular-ui-powerups-tabbed-place-navigation',
|
|
3161
|
-
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]=\"
|
|
3269
|
+
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",
|
|
3162
3270
|
styles: [""]
|
|
3163
3271
|
}] }
|
|
3164
3272
|
];
|
|
@@ -3233,6 +3341,7 @@
|
|
|
3233
3341
|
material.MatInputModule,
|
|
3234
3342
|
material.MatFormFieldModule,
|
|
3235
3343
|
material.MatSelectModule,
|
|
3344
|
+
tabs.MatTabsModule,
|
|
3236
3345
|
PlaceModule,
|
|
3237
3346
|
InteractionModule
|
|
3238
3347
|
],
|
|
@@ -3744,7 +3853,15 @@
|
|
|
3744
3853
|
// HACK: this will break with child routes...
|
|
3745
3854
|
/** @type {?} */
|
|
3746
3855
|
var path = "/" + component.placeDefinition.path;
|
|
3747
|
-
console.log({
|
|
3856
|
+
console.log({
|
|
3857
|
+
placePath: path,
|
|
3858
|
+
currentRoute: currentRoute.toString(),
|
|
3859
|
+
currentStateUrl: currentState.url,
|
|
3860
|
+
nextStateUrl: nextState.url,
|
|
3861
|
+
currentStateUrlTree: this.router.parseUrl(currentState.url).root.children[router.PRIMARY_OUTLET].segments,
|
|
3862
|
+
nextStateUrlTree: this.router.parseUrl(nextState.url).root.children[router.PRIMARY_OUTLET].segments
|
|
3863
|
+
});
|
|
3864
|
+
// nextState is the full path...
|
|
3748
3865
|
if (!nextState.url.startsWith(path)) {
|
|
3749
3866
|
return component.canDeactivate();
|
|
3750
3867
|
}
|
|
@@ -3803,7 +3920,7 @@
|
|
|
3803
3920
|
// Id snapshot are repesented by 2 url segments
|
|
3804
3921
|
// ID => [{'/basePath', params}, {'id', params}]
|
|
3805
3922
|
// NO ID => [{'/basePath', params}]
|
|
3806
|
-
console.log({
|
|
3923
|
+
// console.log({urlSegments: route.url});
|
|
3807
3924
|
// const snapshot = ParameterSnapshot.create(PlaceComponent.getDefinition(route.component as Constructable<PlaceComponent>), route.paramMap);
|
|
3808
3925
|
// return this.placeService.sanitise(snapshot).then(sanitised => {
|
|
3809
3926
|
// if (sanitised.hasChanged(snapshot)) {
|