@luigi-project/client-support-angular
Advanced tools
Comparing version 1.7.1 to 1.7.2-dev.20210119
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/router'), require('rxjs'), require('@luigi-project/client'), require('rxjs/operators')) : | ||
typeof define === 'function' && define.amd ? define('@luigi-project/client-support-angular', ['exports', '@angular/core', '@angular/router', 'rxjs', '@luigi-project/client', 'rxjs/operators'], factory) : | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global['luigi-project'] = global['luigi-project'] || {}, global['luigi-project']['client-support-angular'] = {}), global.ng.core, global.ng.router, global.rxjs, global.client, global.rxjs.operators)); | ||
}(this, (function (exports, i0, i1, rxjs, client, operators) { 'use strict'; | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/router'), require('rxjs'), require('rxjs/operators'), require('@luigi-project/client')) : | ||
typeof define === 'function' && define.amd ? define('@luigi-project/client-support-angular', ['exports', '@angular/core', '@angular/router', 'rxjs', 'rxjs/operators', '@luigi-project/client'], factory) : | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global['luigi-project'] = global['luigi-project'] || {}, global['luigi-project']['client-support-angular'] = {}), global.ng.core, global.ng.router, global.rxjs, global.rxjs.operators, global.client)); | ||
}(this, (function (exports, i0, i1, rxjs, operators, client) { 'use strict'; | ||
var LuigiPreloadComponent = /** @class */ (function () { | ||
function LuigiPreloadComponent() { | ||
this.routeExampleVirtual = " {path: 'ng-luigi-demo', component: NgLuigiDemoComponent, data: {fromVirtualTreeRoot: true}}"; | ||
this.routeExampleReuse = " {path: 'ng-luigi-demo', component: NgLuigiDemoComponent, data: {reuse: true}}"; | ||
} | ||
@@ -18,3 +16,3 @@ LuigiPreloadComponent.prototype.ngOnInit = function () { }; | ||
selector: 'lib-client-support-angular', | ||
template: "<p>NG Luigi Library Demo Component</p>\n\n<p>\n This is a demo component; in Luigi it is a\n <a\n href=\"https://docs.luigi-project.io/docs/navigation-parameters-reference/?section=virtualtree\"\n >virtual tree</a\n >.\n <br />\n If you want to configure an Angular Component to be called in virtual tree,\n you must use this route configuration:\n <br />\n <br />\n <code>{{ routeExampleVirtual }}</code>\n</p>\n<br />\n\n<p>\n If you want to configure an Angular Component to be just created once (like a\n singleton( you can use this configuration:\n <br />\n <br />\n <code>{{ routeExampleReuse }}</code>\n</p>\n" | ||
template: "<p luigipreload=\"luigipreload\"></p>\n" | ||
},] } | ||
@@ -56,2 +54,20 @@ ]; | ||
/** | ||
* Get a promise that resolves when context is set. | ||
*/ | ||
LuigiContextServiceImpl.prototype.getContextAsync = function () { | ||
var _this = this; | ||
return new Promise(function (resolve, reject) { | ||
if (_this.getContext()) { | ||
resolve(_this.getContext()); | ||
} | ||
else { | ||
_this.contextObservable() | ||
.pipe(operators.first()) | ||
.subscribe(function (ctx) { | ||
resolve(ctx.context); | ||
}); | ||
} | ||
}); | ||
}; | ||
/** | ||
* Set current context | ||
@@ -94,8 +110,9 @@ */ | ||
var LuigiAutoRoutingService = /** @class */ (function () { | ||
function LuigiAutoRoutingService(router) { | ||
function LuigiAutoRoutingService(router, luigiContextService) { | ||
this.router = router; | ||
this.luigiContextService = luigiContextService; | ||
this.subscription = new rxjs.Subscription(); | ||
this.subscription.add(this.router.events | ||
.pipe(this.doFilter()) | ||
.subscribe(this.doSubscription)); | ||
.subscribe(this.doSubscription.bind(this))); | ||
} | ||
@@ -117,19 +134,41 @@ LuigiAutoRoutingService.prototype.doFilter = function () { | ||
* {path: 'demo', component: DemoComponent, data:{luigiRoute: '/home/demo''}} | ||
* @param event | ||
* @param event the NavigationEnd event | ||
*/ | ||
LuigiAutoRoutingService.prototype.doSubscription = function (event) { | ||
var current = LuigiActivatedRouteSnapshotHelper.getCurrent(); | ||
if (current.data.luigiRoute) { | ||
client.linkManager() | ||
.withoutSync() | ||
.navigate(current.data.luigiRoute); | ||
return; | ||
if (current.data) { | ||
if (current.data.luigiRoute) { | ||
var route_1 = current.data.luigiRoute; | ||
if (current.params) { | ||
var pmap_1 = i1.convertToParamMap(current.params); | ||
pmap_1.keys.forEach(function (key) { | ||
var val = pmap_1.getAll(key).forEach(function (param) { | ||
route_1 = route_1.replace(':' + key, param); | ||
}); | ||
}); | ||
} | ||
var lm = client.linkManager(); | ||
if (current.data.fromContext) { | ||
if (!this.luigiContextService.getContext()) { | ||
console.debug('Ignoring auto navigation request, luigi context not set'); | ||
return; | ||
} | ||
if (current.data.fromContext === true) { | ||
lm = lm.fromClosestContext(); | ||
} | ||
else { | ||
lm = lm.fromContext(current.data.fromContext); | ||
} | ||
} | ||
lm.withoutSync().navigate(route_1); | ||
return; | ||
} | ||
if (current.data.fromVirtualTreeRoot) { | ||
console.debug('Calling fromVirtualTreeRoot for ulr ==> ' + event.url); | ||
client.linkManager() | ||
.fromVirtualTreeRoot() | ||
.withoutSync() | ||
.navigate(event.url); | ||
} | ||
} | ||
if (current.data.fromVirtualTreeRoot) { | ||
console.debug('Calling fromVirtualTreeRoot for ulr ==> ' + event.url); | ||
client.linkManager() | ||
.fromVirtualTreeRoot() | ||
.withoutSync() | ||
.navigate(event.url); | ||
} | ||
}; | ||
@@ -141,3 +180,3 @@ LuigiAutoRoutingService.prototype.ngOnDestroy = function () { | ||
}()); | ||
LuigiAutoRoutingService.ɵprov = i0.ɵɵdefineInjectable({ factory: function LuigiAutoRoutingService_Factory() { return new LuigiAutoRoutingService(i0.ɵɵinject(i1.Router)); }, token: LuigiAutoRoutingService, providedIn: "root" }); | ||
LuigiAutoRoutingService.ɵprov = i0.ɵɵdefineInjectable({ factory: function LuigiAutoRoutingService_Factory() { return new LuigiAutoRoutingService(i0.ɵɵinject(i1.Router), i0.ɵɵinject(LuigiContextService)); }, token: LuigiAutoRoutingService, providedIn: "root" }); | ||
LuigiAutoRoutingService.decorators = [ | ||
@@ -149,3 +188,4 @@ { type: i0.Injectable, args: [{ | ||
LuigiAutoRoutingService.ctorParameters = function () { return [ | ||
{ type: i1.Router } | ||
{ type: i1.Router }, | ||
{ type: LuigiContextService } | ||
]; }; | ||
@@ -168,3 +208,3 @@ | ||
LuigiRouteStrategy.prototype.shouldReuseRoute = function (future, current) { | ||
return future.routeConfig === current.routeConfig; | ||
return false; | ||
}; | ||
@@ -233,2 +273,3 @@ return LuigiRouteStrategy; | ||
exports.LuigiContextService = LuigiContextService; | ||
exports.LuigiContextServiceImpl = LuigiContextServiceImpl; | ||
exports.LuigiPreloadComponent = LuigiPreloadComponent; | ||
@@ -239,4 +280,3 @@ exports.staticRoutes = staticRoutes; | ||
exports.ɵ2 = ɵ2; | ||
exports.ɵa = LuigiContextServiceImpl; | ||
exports.ɵb = LuigiRouteStrategy; | ||
exports.ɵa = LuigiRouteStrategy; | ||
@@ -243,0 +283,0 @@ Object.defineProperty(exports, '__esModule', { value: true }); |
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/router"),require("rxjs"),require("@luigi-project/client"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("@luigi-project/client-support-angular",["exports","@angular/core","@angular/router","rxjs","@luigi-project/client","rxjs/operators"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self)["luigi-project"]=t["luigi-project"]||{},t["luigi-project"]["client-support-angular"]={}),t.ng.core,t.ng.router,t.rxjs,t.client,t.rxjs.operators)}(this,(function(t,e,n,o,r,i){"use strict";var u=function(){function t(){this.routeExampleVirtual=" {path: 'ng-luigi-demo', component: NgLuigiDemoComponent, data: {fromVirtualTreeRoot: true}}",this.routeExampleReuse=" {path: 'ng-luigi-demo', component: NgLuigiDemoComponent, data: {reuse: true}}"}return t.prototype.ngOnInit=function(){},t}();u.decorators=[{type:e.Component,args:[{selector:"lib-client-support-angular",template:'<p>NG Luigi Library Demo Component</p>\n\n<p>\n This is a demo component; in Luigi it is a\n <a\n href="https://docs.luigi-project.io/docs/navigation-parameters-reference/?section=virtualtree"\n >virtual tree</a\n >.\n <br />\n If you want to configure an Angular Component to be called in virtual tree,\n you must use this route configuration:\n <br />\n <br />\n <code>{{ routeExampleVirtual }}</code>\n</p>\n<br />\n\n<p>\n If you want to configure an Angular Component to be just created once (like a\n singleton( you can use this configuration:\n <br />\n <br />\n <code>{{ routeExampleReuse }}</code>\n</p>\n'}]}],u.ctorParameters=function(){return[]};var a,c=function(){};(a=t.ILuigiContextTypes||(t.ILuigiContextTypes={}))[a.INIT=0]="INIT",a[a.UPDATE=1]="UPDATE";var s=function(){function e(){var e=this;this.subject=new o.ReplaySubject(1),this.currentContext=null,r.addInitListener((function(n){e.addListener(t.ILuigiContextTypes.INIT,n)})),r.addContextUpdateListener((function(n){e.addListener(t.ILuigiContextTypes.UPDATE,n)}))}return e.prototype.contextObservable=function(){return this.subject.asObservable()},e.prototype.getContext=function(){return this.currentContext&&this.currentContext.context},e.prototype.setContext=function(t){this.currentContext=t,this.subject.next(t)},e.prototype.addListener=function(t,e){this.setContext({contextType:t,context:e})},e}();s.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new s},token:s,providedIn:"root"}),s.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],s.ctorParameters=function(){return[]};var p=function(){function t(){}return t.getCurrent=function(){return t._current},t.setCurrent=function(e){t._current=e},t}();p._current=null;var l=function(){function t(t){this.router=t,this.subscription=new o.Subscription,this.subscription.add(this.router.events.pipe(this.doFilter()).subscribe(this.doSubscription))}return t.prototype.doFilter=function(){return i.filter((function(t){return!(!(t instanceof n.NavigationEnd&&t.url&&t.url.length>0)||history.state&&history.state.luigiInduced)}))},t.prototype.doSubscription=function(t){var e=p.getCurrent();e.data.luigiRoute?r.linkManager().withoutSync().navigate(e.data.luigiRoute):e.data.fromVirtualTreeRoot&&(console.debug("Calling fromVirtualTreeRoot for ulr ==> "+t.url),r.linkManager().fromVirtualTreeRoot().withoutSync().navigate(t.url))},t.prototype.ngOnDestroy=function(){this.subscription.unsubscribe()},t}();l.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new l(e.ɵɵinject(n.Router))},token:l,providedIn:"root"}),l.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],l.ctorParameters=function(){return[{type:n.Router}]};var d=function(){function t(){}return t.prototype.shouldDetach=function(t){return!1},t.prototype.store=function(t,e){},t.prototype.shouldAttach=function(t){return!1},t.prototype.retrieve=function(t){return p.setCurrent(t),null},t.prototype.shouldReuseRoute=function(t,e){return t.routeConfig===e.routeConfig},t}(),g={fromVirtualTreeRoot:!0},f={luigiRoute:"/home/reload"},y={reuse:!0},h=[{path:"luigi-client-support-preload",component:u,data:g},{path:"luigi-client-support-preload",component:u,data:f},{path:"luigi-client-support-preload=component",component:u,data:y}],m=function(t,e){};m.decorators=[{type:e.NgModule,args:[{declarations:[u],imports:[n.RouterModule.forChild(h)],providers:[{provide:c,useClass:s},{provide:n.RouteReuseStrategy,useClass:d}],exports:[u]}]}],m.ctorParameters=function(){return[{type:l},{type:c}]},t.LuigiAngularSupportModule=m,t.LuigiAutoRoutingService=l,t.LuigiContextService=c,t.LuigiPreloadComponent=u,t.staticRoutes=h,t.ɵ0=g,t.ɵ1=f,t.ɵ2=y,t.ɵa=s,t.ɵb=d,Object.defineProperty(t,"__esModule",{value:!0})})); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/router"),require("rxjs"),require("rxjs/operators"),require("@luigi-project/client")):"function"==typeof define&&define.amd?define("@luigi-project/client-support-angular",["exports","@angular/core","@angular/router","rxjs","rxjs/operators","@luigi-project/client"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self)["luigi-project"]=t["luigi-project"]||{},t["luigi-project"]["client-support-angular"]={}),t.ng.core,t.ng.router,t.rxjs,t.rxjs.operators,t.client)}(this,(function(t,e,r,o,n,i){"use strict";var u=function(){function t(){}return t.prototype.ngOnInit=function(){},t}();u.decorators=[{type:e.Component,args:[{selector:"lib-client-support-angular",template:'<p luigipreload="luigipreload"></p>\n'}]}],u.ctorParameters=function(){return[]};var a,c=function(){};(a=t.ILuigiContextTypes||(t.ILuigiContextTypes={}))[a.INIT=0]="INIT",a[a.UPDATE=1]="UPDATE";var s=function(){function e(){var e=this;this.subject=new o.ReplaySubject(1),this.currentContext=null,i.addInitListener((function(r){e.addListener(t.ILuigiContextTypes.INIT,r)})),i.addContextUpdateListener((function(r){e.addListener(t.ILuigiContextTypes.UPDATE,r)}))}return e.prototype.contextObservable=function(){return this.subject.asObservable()},e.prototype.getContext=function(){return this.currentContext&&this.currentContext.context},e.prototype.getContextAsync=function(){var t=this;return new Promise((function(e,r){t.getContext()?e(t.getContext()):t.contextObservable().pipe(n.first()).subscribe((function(t){e(t.context)}))}))},e.prototype.setContext=function(t){this.currentContext=t,this.subject.next(t)},e.prototype.addListener=function(t,e){this.setContext({contextType:t,context:e})},e}();s.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new s},token:s,providedIn:"root"}),s.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],s.ctorParameters=function(){return[]};var p=function(){function t(){}return t.getCurrent=function(){return t._current},t.setCurrent=function(e){t._current=e},t}();p._current=null;var l=function(){function t(t,e){this.router=t,this.luigiContextService=e,this.subscription=new o.Subscription,this.subscription.add(this.router.events.pipe(this.doFilter()).subscribe(this.doSubscription.bind(this)))}return t.prototype.doFilter=function(){return n.filter((function(t){return!(!(t instanceof r.NavigationEnd&&t.url&&t.url.length>0)||history.state&&history.state.luigiInduced)}))},t.prototype.doSubscription=function(t){var e=p.getCurrent();if(e.data){if(e.data.luigiRoute){var o=e.data.luigiRoute;if(e.params){var n=r.convertToParamMap(e.params);n.keys.forEach((function(t){n.getAll(t).forEach((function(e){o=o.replace(":"+t,e)}))}))}var u=i.linkManager();if(e.data.fromContext){if(!this.luigiContextService.getContext())return void console.debug("Ignoring auto navigation request, luigi context not set");u=!0===e.data.fromContext?u.fromClosestContext():u.fromContext(e.data.fromContext)}return void u.withoutSync().navigate(o)}e.data.fromVirtualTreeRoot&&(console.debug("Calling fromVirtualTreeRoot for ulr ==> "+t.url),i.linkManager().fromVirtualTreeRoot().withoutSync().navigate(t.url))}},t.prototype.ngOnDestroy=function(){this.subscription.unsubscribe()},t}();l.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new l(e.ɵɵinject(r.Router),e.ɵɵinject(c))},token:l,providedIn:"root"}),l.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],l.ctorParameters=function(){return[{type:r.Router},{type:c}]};var f=function(){function t(){}return t.prototype.shouldDetach=function(t){return!1},t.prototype.store=function(t,e){},t.prototype.shouldAttach=function(t){return!1},t.prototype.retrieve=function(t){return p.setCurrent(t),null},t.prototype.shouldReuseRoute=function(t,e){return!1},t}(),d={fromVirtualTreeRoot:!0},g={luigiRoute:"/home/reload"},x={reuse:!0},y=[{path:"luigi-client-support-preload",component:u,data:d},{path:"luigi-client-support-preload",component:u,data:g},{path:"luigi-client-support-preload=component",component:u,data:x}],h=function(t,e){};h.decorators=[{type:e.NgModule,args:[{declarations:[u],imports:[r.RouterModule.forChild(y)],providers:[{provide:c,useClass:s},{provide:r.RouteReuseStrategy,useClass:f}],exports:[u]}]}],h.ctorParameters=function(){return[{type:l},{type:c}]},t.LuigiAngularSupportModule=h,t.LuigiAutoRoutingService=l,t.LuigiContextService=c,t.LuigiContextServiceImpl=s,t.LuigiPreloadComponent=u,t.staticRoutes=y,t.ɵ0=d,t.ɵ1=g,t.ɵ2=x,t.ɵa=f,Object.defineProperty(t,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=luigi-project-client-support-angular.umd.min.js.map |
import { Component } from '@angular/core'; | ||
export class LuigiPreloadComponent { | ||
constructor() { | ||
this.routeExampleVirtual = " {path: 'ng-luigi-demo', component: NgLuigiDemoComponent, data: {fromVirtualTreeRoot: true}}"; | ||
this.routeExampleReuse = " {path: 'ng-luigi-demo', component: NgLuigiDemoComponent, data: {reuse: true}}"; | ||
} | ||
constructor() { } | ||
ngOnInit() { } | ||
@@ -12,6 +9,6 @@ } | ||
selector: 'lib-client-support-angular', | ||
template: "<p>NG Luigi Library Demo Component</p>\n\n<p>\n This is a demo component; in Luigi it is a\n <a\n href=\"https://docs.luigi-project.io/docs/navigation-parameters-reference/?section=virtualtree\"\n >virtual tree</a\n >.\n <br />\n If you want to configure an Angular Component to be called in virtual tree,\n you must use this route configuration:\n <br />\n <br />\n <code>{{ routeExampleVirtual }}</code>\n</p>\n<br />\n\n<p>\n If you want to configure an Angular Component to be just created once (like a\n singleton( you can use this configuration:\n <br />\n <br />\n <code>{{ routeExampleReuse }}</code>\n</p>\n" | ||
template: "<p luigipreload=\"luigipreload\"></p>\n" | ||
},] } | ||
]; | ||
LuigiPreloadComponent.ctorParameters = () => []; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibHVpZ2kucHJlbG9hZC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiLi4vLi4vLi4vLi4vcHJvamVjdHMvY2xpZW50LXN1cHBvcnQtYW5ndWxhci9zcmMvIiwic291cmNlcyI6WyJsaWIvY29tcG9uZW50L2x1aWdpLnByZWxvYWQuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQVUsTUFBTSxlQUFlLENBQUM7QUFPbEQsTUFBTSxPQUFPLHFCQUFxQjtJQUNoQztRQUNBLHdCQUFtQixHQUNqQiwrRkFBK0YsQ0FBQztRQUNsRyxzQkFBaUIsR0FDZixpRkFBaUYsQ0FBQztJQUpyRSxDQUFDO0lBS2hCLFFBQVEsS0FBVSxDQUFDOzs7WUFYcEIsU0FBUyxTQUFDO2dCQUNULFFBQVEsRUFBRSw0QkFBNEI7Z0JBQ3RDLHdvQkFBNkM7YUFFOUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBDb21wb25lbnQsIE9uSW5pdCB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuXG5AQ29tcG9uZW50KHtcbiAgc2VsZWN0b3I6IC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QkFBNEI7Z0JBQ3RDLG1EQUE2QzthQUU5QyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IENvbXBvbmVudCwgT25Jbml0IH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5cbkBDb21wb25lbnQoe1xuICBzZWxlY3RvcjogJ2xpYi1jbGllbnQtc3VwcG9ydC1hbmd1bGFyJyxcbiAgdGVtcGxhdGVVcmw6ICcuL2x1aWdpLnByZWxvYWQuY29tcG9uZW50Lmh0bWwnLFxuICBzdHlsZXM6IFtdXG59KVxuZXhwb3J0IGNsYXNzIEx1aWdpUHJlbG9hZENvbXBvbmVudCBpbXBsZW1lbnRzIE9uSW5pdCB7XG4gIGNvbnN0cnVjdG9yKCkge31cbiAgbmdPbkluaXQoKTogdm9pZCB7fVxufVxuIl19 |
@@ -7,3 +7,3 @@ import { NgModule } from '@angular/core'; | ||
import { LuigiAutoRoutingService } from './service/luigi-auto-routing.service'; | ||
import { LuigiRouteStrategy } from "./route/luigi-route-strategy"; | ||
import { LuigiRouteStrategy } from './route/luigi-route-strategy'; | ||
const ɵ0 = { fromVirtualTreeRoot: true }, ɵ1 = { luigiRoute: '/home/reload' }, ɵ2 = { reuse: true }; | ||
@@ -55,2 +55,2 @@ export const staticRoutes = [ | ||
export { ɵ0, ɵ1, ɵ2 }; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibHVpZ2kuYW5ndWxhci5zdXBwb3J0Lm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIuLi8uLi8uLi8uLi9wcm9qZWN0cy9jbGllbnQtc3VwcG9ydC1hbmd1bGFyL3NyYy8iLCJzb3VyY2VzIjpbImxpYi9sdWlnaS5hbmd1bGFyLnN1cHBvcnQubW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDekMsT0FBTyxFQU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Z2xldG9uIENvbXBvbmVudCkgSXQgcmVxdWlyZXMgaW4geW91ciBtb2R1bGUgdG8gcmVkZWZpbmUgICovXG4gIHtcbiAgICBwYXRoOiAnbHVpZ2ktY2xpZW50LXN1cHBvcnQtcHJlbG9hZD1jb21wb25lbnQnLFxuICAgIGNvbXBvbmVudDogTHVpZ2lQcmVsb2FkQ29tcG9uZW50LFxuICAgIGRhdGE6IHsgcmV1c2U6IHRydWUgfVxuICB9XG5dO1xuXG5ATmdNb2R1bGUoe1xuICBkZWNsYXJhdGlvbnM6IFtMdWlnaVByZWxvYWRDb21wb25lbnRdLFxuICBpbXBvcnRzOiBbUm91dGVyTW9kdWxlLmZvckNoaWxkKHN0YXRpY1JvdXRlcyldLFxuICBwcm92aWRlcnM6IFtcbiAgICB7XG4gICAgICBwcm92aWRlOiBMdWlnaUNvbnRleHRTZXJ2aWNlLFxuICAgICAgdXNlQ2xhc3M6IEx1aWdpQ29udGV4dFNlcnZpY2VJbXBsXG4gICAgfSxcbiAgICB7XG4gICAgICBwcm92aWRlOiBSb3V0ZVJldXNlU3RyYXRlZ3ksXG4gICAgICB1c2VDbGFzczogTHVpZ2lSb3V0ZVN0cmF0ZWd5XG4gICAgfVxuICBdLFxuICBleHBvcnRzOiBbTHVpZ2lQcmVsb2FkQ29tcG9uZW50XVxufSlcbmV4cG9ydCBjbGFzcyBMdWlnaUFuZ3VsYXJTdXBwb3J0TW9kdWxlIHtcbiAgY29uc3RydWN0b3IoXG4gICAgbmF2aWdhdGlvbjogTHVpZ2lBdXRvUm91dGluZ1NlcnZpY2UsXG4gICAgY29udGV4dDogTHVpZ2lDb250ZXh0U2VydmljZVxuICApIHt9XG59XG4iXX0= |
@@ -1,2 +0,2 @@ | ||
import { LuigiActivatedRouteSnapshotHelper } from "./luigi-activated-route-snapshot-helper"; | ||
import { LuigiActivatedRouteSnapshotHelper } from './luigi-activated-route-snapshot-helper'; | ||
export class LuigiRouteStrategy { | ||
@@ -15,5 +15,5 @@ shouldDetach(route) { | ||
shouldReuseRoute(future, current) { | ||
return future.routeConfig === current.routeConfig; | ||
return false; | ||
} | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibHVpZ2ktcm91dGUtc3RyYXRlZ3kuanMiLCJzb3VyY2VSb290IjoiLi4vLi4vLi4vLi4vcHJvamVjdHMvY2xpZW50LXN1cHBvcnQtYW5ndWxhci9zcmMvIiwic291cmNlcyI6WyJsaWIvcm91dGUvbHVpZ2ktcm91dGUtc3RyYXRlZ3kudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxFQUFFLGlDQUFpQyxFQUFFLE1BQU0seUNBQXlDLENBQUM7QUFFNUYsTUFBTSxPQUFPLGtCQUFrQjtJQUU3QixZQUFZLENBQUMsS0FBNkI7UUFDdEMsT0FBTyxLQUFLLENBQUM7SUFDakIsQ0FBQztJQUVELEtBQUssQ0FBQyxLQUE2QixFQUFFLE9BQTRCLElBQVMsQ0FBQztJQUUzRSxZQUFZLENBQUMsS0FBNkI7UUFDeEMsT0FBTyxLQUFLLENBQUM7SUFDZixDQUFDO0lBRUQsUUFBUSxDQUFDLEtBQTZCO1FBQ3BDLGlDQUFpQyxDQUFDLFVBQVUsQ0FBQyxLQUFLLENBQUMsQ0FBQztRQUNwRCxPQUFRLElBQXVDLENBQUM7SUFDbEQsQ0FBQztJQUVELGdCQUFnQixDQUFDLE1BQThCLEVBQUUsT0FBK0I7UUFDOUUsT0FBTyxNQUFNLENBQUMsV0FBVyxLQUFLLE9BQU8sQ0FBQyxXQUFXLENBQUM7SUFDcEQsQ0FBQztDQUVGIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgQWN0aXZhdGVkUm91dGVTbmFwc2hvdCwgRGV0YWNoZWRSb3V0ZUhhbmRsZSwgUm91dGVSZXVzZVN0cmF0ZWd5IH0gZnJvbSBcIkBhbmd1bGFyL3JvdXRlclwiO1xuaW1wb3J0IHsg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lU3RyYXRlZ3kgaW1wbGVtZW50cyBSb3V0ZVJldXNlU3RyYXRlZ3kge1xuICBzaG91bGREZXRhY2gocm91dGU6IEFjdGl2YXRlZFJvdXRlU25hcHNob3QpOiBib29sZWFuIHtcbiAgICByZXR1cm4gZmFsc2U7XG4gIH1cblxuICBzdG9yZShyb3V0ZTogQWN0aXZhdGVkUm91dGVTbmFwc2hvdCwgaGFuZGxlcjogRGV0YWNoZWRSb3V0ZUhhbmRsZSk6IHZvaWQge31cblxuICBzaG91bGRBdHRhY2gocm91dGU6IEFjdGl2YXRlZFJvdXRlU25hcHNob3QpOiBib29sZWFuIHtcbiAgICByZXR1cm4gZmFsc2U7XG4gIH1cblxuICByZXRyaWV2ZShyb3V0ZTogQWN0aXZhdGVkUm91dGVTbmFwc2hvdCk6IERldGFjaGVkUm91dGVIYW5kbGUge1xuICAgIEx1aWdpQWN0aXZhdGVkUm91dGVTbmFwc2hvdEhlbHBlci5zZXRDdXJyZW50KHJvdXRlKTtcbiAgICByZXR1cm4gKG51bGwgYXMgdW5rbm93bikgYXMgRGV0YWNoZWRSb3V0ZUhhbmRsZTtcbiAgfVxuXG4gIHNob3VsZFJldXNlUm91dGUoXG4gICAgZnV0dXJlOiBBY3RpdmF0ZWRSb3V0ZVNuYXBzaG90LFxuICAgIGN1cnJlbnQ6IEFjdGl2YXRlZFJvdXRlU25hcHNob3RcbiAgKTogYm9vbGVhbiB7XG4gICAgcmV0dXJuIGZhbHNlO1xuICB9XG59XG4iXX0= |
import { Injectable } from '@angular/core'; | ||
import { Subscription } from 'rxjs'; | ||
import { NavigationEnd, Router } from '@angular/router'; | ||
import { convertToParamMap, NavigationEnd, Router } from '@angular/router'; | ||
import { linkManager } from '@luigi-project/client'; | ||
import { filter } from 'rxjs/operators'; | ||
import { LuigiActivatedRouteSnapshotHelper } from '../route/luigi-activated-route-snapshot-helper'; | ||
import { LuigiContextService } from './luigi-context-service'; | ||
import * as i0 from "@angular/core"; | ||
import * as i1 from "@angular/router"; | ||
import * as i2 from "./luigi-context-service"; | ||
export class LuigiAutoRoutingService { | ||
constructor(router) { | ||
constructor(router, luigiContextService) { | ||
this.router = router; | ||
this.luigiContextService = luigiContextService; | ||
this.subscription = new Subscription(); | ||
this.subscription.add(this.router.events | ||
.pipe(this.doFilter()) | ||
.subscribe(this.doSubscription)); | ||
.subscribe(this.doSubscription.bind(this))); | ||
} | ||
@@ -32,19 +35,41 @@ doFilter() { | ||
* {path: 'demo', component: DemoComponent, data:{luigiRoute: '/home/demo''}} | ||
* @param event | ||
* @param event the NavigationEnd event | ||
*/ | ||
doSubscription(event) { | ||
const current = LuigiActivatedRouteSnapshotHelper.getCurrent(); | ||
if (current.data.luigiRoute) { | ||
linkManager() | ||
.withoutSync() | ||
.navigate(current.data.luigiRoute); | ||
return; | ||
if (current.data) { | ||
if (current.data.luigiRoute) { | ||
let route = current.data.luigiRoute; | ||
if (current.params) { | ||
const pmap = convertToParamMap(current.params); | ||
pmap.keys.forEach(key => { | ||
const val = pmap.getAll(key).forEach(param => { | ||
route = route.replace(':' + key, param); | ||
}); | ||
}); | ||
} | ||
let lm = linkManager(); | ||
if (current.data.fromContext) { | ||
if (!this.luigiContextService.getContext()) { | ||
console.debug('Ignoring auto navigation request, luigi context not set'); | ||
return; | ||
} | ||
if (current.data.fromContext === true) { | ||
lm = lm.fromClosestContext(); | ||
} | ||
else { | ||
lm = lm.fromContext(current.data.fromContext); | ||
} | ||
} | ||
lm.withoutSync().navigate(route); | ||
return; | ||
} | ||
if (current.data.fromVirtualTreeRoot) { | ||
console.debug('Calling fromVirtualTreeRoot for ulr ==> ' + event.url); | ||
linkManager() | ||
.fromVirtualTreeRoot() | ||
.withoutSync() | ||
.navigate(event.url); | ||
} | ||
} | ||
if (current.data.fromVirtualTreeRoot) { | ||
console.debug('Calling fromVirtualTreeRoot for ulr ==> ' + event.url); | ||
linkManager() | ||
.fromVirtualTreeRoot() | ||
.withoutSync() | ||
.navigate(event.url); | ||
} | ||
} | ||
@@ -55,3 +80,3 @@ ngOnDestroy() { | ||
} | ||
LuigiAutoRoutingService.ɵprov = i0.ɵɵdefineInjectable({ factory: function LuigiAutoRoutingService_Factory() { return new LuigiAutoRoutingService(i0.ɵɵinject(i1.Router)); }, token: LuigiAutoRoutingService, providedIn: "root" }); | ||
LuigiAutoRoutingService.ɵprov = i0.ɵɵdefineInjectable({ factory: function LuigiAutoRoutingService_Factory() { return new LuigiAutoRoutingService(i0.ɵɵinject(i1.Router), i0.ɵɵinject(i2.LuigiContextService)); }, token: LuigiAutoRoutingService, providedIn: "root" }); | ||
LuigiAutoRoutingService.decorators = [ | ||
@@ -63,4 +88,5 @@ { type: Injectable, args: [{ | ||
LuigiAutoRoutingService.ctorParameters = () => [ | ||
{ type: Router } | ||
{ type: Router }, | ||
{ type: LuigiContextService } | ||
]; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibHVpZ2ktYXV0by1yb3V0aW5nLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiLi4vLi4vLi4vLi4vcHJvamVjdHMvY2xpZW50LXN1cHBvcnQtYW5ndWxhci9zcmMvIiwic291cmNlcyI6WyJsaWIvc2VydmljZS9sdWlnaS1hdXRvLXJvdXRpbmcuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFhLE1BQU0sZUFBZSxDQUFDO0FBQ3RELE9BQU8sRUFBcUMsWUFBWSxFQUFFLE1BQU0sTUFBTSxDQUFDO0FBQ3ZFLE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSxFQUFlLE1BQU0saUJBQWlCLENBQUM7QUFDckUsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLHVCQUF1QixDQUFDO0FBQ3BELE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUN4QyxPQUFPLEVBQUUsaUNBQWlDLEVBQUUsT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gcG1hcC5rZXlzLmZvckVhY2goa2V5ID0+IHtcbiAgICAgICAgICAgIGNvbnN0IHZhbCA9IHBtYXAuZ2V0QWxsKGtleSkuZm9yRWFjaChwYXJhbSA9PiB7XG4gICAgICAgICAgICAgIHJvdXRlID0gcm91dGUucmVwbGFjZSgnOicgKyBrZXksIHBhcmFtKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICAgIGxldCBsbSA9IGxpbmtNYW5hZ2VyKCk7XG4gICAgICAgIGlmIChjdXJyZW50LmRhdGEuZnJvbUNvbnRleHQpIHtcbiAgICAgICAgICBpZiAoIXRoaXMubHVpZ2lDb250ZXh0U2VydmljZS5nZXRDb250ZXh0KCkpIHtcbiAgICAgICAgICAgIGNvbnNvbGUuZGVidWcoXG4gICAgICAgICAgICAgICdJZ25vcmluZyBhdXRvIG5hdmlnYXRpb24gcmVxdWVzdCwgbHVpZ2kgY29udGV4dCBub3Qgc2V0J1xuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKGN1cnJlbnQuZGF0YS5mcm9tQ29udGV4dCA9PT0gdHJ1ZSkge1xuICAgICAgICAgICAgbG0gPSBsbS5mcm9tQ2xvc2VzdENvbnRleHQoKTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgbG0gPSBsbS5mcm9tQ29udGV4dChjdXJyZW50LmRhdGEuZnJvbUNvbnRleHQpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGxtLndpdGhvdXRTeW5jKCkubmF2aWdhdGUocm91dGUpO1xuICAgICAgICByZXR1cm47XG4gICAgICB9XG4gICAgICBpZiAoY3VycmVudC5kYXRhLmZyb21WaXJ0dWFsVHJlZVJvb3QpIHtcbiAgICAgICAgY29uc29sZS5kZWJ1ZygnQ2FsbGluZyBmcm9tVmlydHVhbFRyZWVSb290IGZvciB1bHIgPT0+ICcgKyBldmVudC51cmwpO1xuICAgICAgICBsaW5rTWFuYWdlcigpXG4gICAgICAgICAgLmZyb21WaXJ0dWFsVHJlZVJvb3QoKVxuICAgICAgICAgIC53aXRob3V0U3luYygpXG4gICAgICAgICAgLm5hdmlnYXRlKGV2ZW50LnVybCk7XG4gICAgICB9XG4gICAgfVxuICB9XG5cbiAgbmdPbkRlc3Ryb3koKTogdm9pZCB7XG4gICAgdGhpcy5zdWJzY3JpcHRpb24udW5zdWJzY3JpYmUoKTtcbiAgfVxufVxuIl19 |
@@ -8,2 +8,2 @@ export class LuigiContextService { | ||
})(ILuigiContextTypes || (ILuigiContextTypes = {})); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibHVpZ2ktY29udGV4dC1zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6Ii4uLy4uLy4uLy4uL3Byb2plY3RzL2NsaWVudC1zdXBwb3J0LWFuZ3VsYXIvc3JjLyIsInNvdXJjZXMiOlsibGliL3NlcnZpY2UvbHVpZ2ktY29udGV4dC1zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUdBLE1BQU0sT0FBZ0IsbUJBQW1CO0NBV3hDO0FBRUQsTUFBTSxDQUFOLElBQVksa0JBR1g7QUFIRCxXQUFZLGtCQUFrQjtJQUM1QiwyREFBSSxDQUFBO0lBQ0osK0RBQU0sQ0FBQTtBQUNSLENBQUMsRUFIVyxrQkFBa0IsS0FBbEIsa0JBQWtCLFFBRzdCIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgQ29udGV4dCB9IGZyb20gJ0BsdWlnaS1wcm9qZWN0L2NsaWVudCc7XG5pbXBvcnQgeyBPYnNlcnZhYmxlIH0gZnJvbSAncnhqcyc7XG5cbmV4cG9ydCBhYnN0cmFjdCBjbGFzcyBMdWlnaUNvbnRleHRTZXJ2aWNlIHtcbiAgLyoqXG4gICAqIExpc3RlbiB0byBjb250ZX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50IjpbImltcG9ydCB7IENvbnRleHQgfSBmcm9tICdAbHVpZ2ktcHJvamVjdC9jbGllbnQnO1xuaW1wb3J0IHsgT2JzZXJ2YWJsZSB9IGZyb20gJ3J4anMnO1xuXG5leHBvcnQgYWJzdHJhY3QgY2xhc3MgTHVpZ2lDb250ZXh0U2VydmljZSB7XG4gIC8qKlxuICAgKiBMaXN0ZW4gdG8gY29udGV4dCBjaGFuZ2VzXG4gICAqIFJlY2VpdmVzIGN1cnJlbnQgdmFsdWUsIGV2ZW4gaWYgdGhlIGV2ZW50IHdhcyBhbHJlYWR5IGRpc3BhdGNoZWQgZWFybGllci5cbiAgICovXG4gIGFic3RyYWN0IGNvbnRleHRPYnNlcnZhYmxlKCk6IE9ic2VydmFibGU8SUNvbnRleHRNZXNzYWdlPjtcblxuICAvKipcbiAgICogR2V0IGxhdGVzdCBzZXQgY29udGV4dCBvYmplY3QgKGNhbiBiZSBudWxsL3VuZGVmaW5lZCwgaWYgbm90IHNldCB5ZXQpXG4gICAqL1xuICBhYnN0cmFjdCBnZXRDb250ZXh0KCk6IENvbnRleHQ7XG5cbiAgLyoqXG4gICAqIEdldCBhIHByb21pc2UgdGhhdCByZXNvbHZlcyB3aGVuIGNvbnRleHQgaXMgc2V0LlxuICAgKi9cbiAgYWJzdHJhY3QgZ2V0Q29udGV4dEFzeW5jKCk6IFByb21pc2U8Q29udGV4dD47XG59XG5cbmV4cG9ydCBlbnVtIElMdWlnaUNvbnRleHRUeXBlcyB7XG4gIElOSVQsXG4gIFVQREFURVxufVxuXG5leHBvcnQgaW50ZXJmYWNlIElDb250ZXh0TWVzc2FnZSB7XG4gIGNvbnRleHRUeXBlOiBJTHVpZ2lDb250ZXh0VHlwZXM7IC8vIHdpbGwgYmUgaW5pdCBvciB1cGRhdGVcbiAgY29udGV4dDogQ29udGV4dDtcbn1cbiJdfQ== |
import { Injectable } from '@angular/core'; | ||
import { ReplaySubject } from 'rxjs'; | ||
import { first } from 'rxjs/operators'; | ||
import { addInitListener, addContextUpdateListener } from '@luigi-project/client'; | ||
@@ -27,2 +28,19 @@ import { ILuigiContextTypes } from './luigi-context-service'; | ||
/** | ||
* Get a promise that resolves when context is set. | ||
*/ | ||
getContextAsync() { | ||
return new Promise((resolve, reject) => { | ||
if (this.getContext()) { | ||
resolve(this.getContext()); | ||
} | ||
else { | ||
this.contextObservable() | ||
.pipe(first()) | ||
.subscribe(ctx => { | ||
resolve(ctx.context); | ||
}); | ||
} | ||
}); | ||
} | ||
/** | ||
* Set current context | ||
@@ -48,2 +66,2 @@ */ | ||
LuigiContextServiceImpl.ctorParameters = () => []; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibHVpZ2ktY29udGV4dC5zZXJ2aWNlLmltcGwuanMiLCJzb3VyY2VSb290IjoiLi4vLi4vLi4vLi4vcHJvamVjdHMvY2xpZW50LXN1cHBvcnQtYW5ndWxhci9zcmMvIiwic291cmNlcyI6WyJsaWIvc2VydmljZS9sdWlnaS1jb250ZXh0LnNlcnZpY2UuaW1wbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzNDLE9BQU8sRUFBRSxhQUFhLEVBQWMsTUFBTSxNQUFNLENBQUM7QUFDakQsT0FBTyxFQUVMLGVBQWUsRUFDZix3QkFBd0IsRUFDekIsTUFBTSx1QkFBdUIsQ0FBQztBQUMvQixPQUFPLEVBRUwsa0JBQWtCLEVBRW5CLE1BQU0seUJBQXlCLENBQUM7O0FBS2pDLE1BQU0sT0FBTyx1QkFBdUI7SUFNbEM7UUFMUSxZQUFPLEdBQW1DLElBQUksYUFBYSxDQUVqRSxDQUFDLENBQUMsQ0FBQztRQUNHLG1CQUFjLEdBQXFCLElBQW1DLENBQUM7UUFHN0UsZUFBZSxDQUFDLFdBQVcsQ0FBQyxFQUFFO1lBQzVCLElBQUksQ0FBQyxXQUFXL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iB0aGlzLnN1YmplY3QuYXNPYnNlcnZhYmxlKCk7XG4gIH1cblxuICAvKipcbiAgICogR2V0IGxhdGVzdCBjb250ZXh0IG9iamVjdCByZXRyaWV2ZWQgZnJvbSBsdWlnaSBjb3JlIGFwcGxpY2F0aW9uIG9yIG5vbmUsIGlmIG5vdCB5ZXQgc2V0LlxuICAgKi9cbiAgcHVibGljIGdldENvbnRleHQoKTogQ29udGV4dCB7XG4gICAgcmV0dXJuIHRoaXMuY3VycmVudENvbnRleHQgJiYgdGhpcy5jdXJyZW50Q29udGV4dC5jb250ZXh0O1xuICB9XG5cbiAgLyoqXG4gICAqIFNldCBjdXJyZW50IGNvbnRleHRcbiAgICovXG4gIHByb3RlY3RlZCBzZXRDb250ZXh0KG9iajogSUNvbnRleHRNZXNzYWdlKTogdm9pZCB7XG4gICAgdGhpcy5jdXJyZW50Q29udGV4dCA9IG9iajtcbiAgICB0aGlzLnN1YmplY3QubmV4dChvYmopO1xuICB9XG5cbiAgYWRkTGlzdGVuZXIoY29udGV4dFR5cGU6IElMdWlnaUNvbnRleHRUeXBlcywgY29udGV4dDogQ29udGV4dCk6IHZvaWQge1xuICAgIHRoaXMuc2V0Q29udGV4dCh7XG4gICAgICBjb250ZXh0VHlwZSxcbiAgICAgIGNvbnRleHRcbiAgICB9IGFzIElDb250ZXh0TWVzc2FnZSk7XG4gIH1cbn1cbiJdfQ== | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibHVpZ2ktY29udGV4dC5zZXJ2aWNlLmltcGwuanMiLCJzb3VyY2VSb290IjoiLi4vLi4vLi4vLi4vcHJvamVjdHMvY2xpZW50LXN1cHBvcnQtYW5ndWxhci9zcmMvIiwic291cmNlcyI6WyJsaWIvc2VydmljZS9sdWlnaS1jb250ZXh0LnNlcnZpY2UuaW1wbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU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9XG5cbiAgLyoqXG4gICAqIEdldCBsYXRlc3QgY29udGV4dCBvYmplY3QgcmV0cmlldmVkIGZyb20gbHVpZ2kgY29yZSBhcHBsaWNhdGlvbiBvciBub25lLCBpZiBub3QgeWV0IHNldC5cbiAgICovXG4gIHB1YmxpYyBnZXRDb250ZXh0KCk6IENvbnRleHQge1xuICAgIHJldHVybiB0aGlzLmN1cnJlbnRDb250ZXh0ICYmIHRoaXMuY3VycmVudENvbnRleHQuY29udGV4dDtcbiAgfVxuXG4gIC8qKlxuICAgKiBHZXQgYSBwcm9taXNlIHRoYXQgcmVzb2x2ZXMgd2hlbiBjb250ZXh0IGlzIHNldC5cbiAgICovXG4gIHB1YmxpYyBnZXRDb250ZXh0QXN5bmMoKTogUHJvbWlzZTxDb250ZXh0PiB7XG4gICAgcmV0dXJuIG5ldyBQcm9taXNlPENvbnRleHQ+KChyZXNvbHZlLCByZWplY3QpID0+IHtcbiAgICAgIGlmICh0aGlzLmdldENvbnRleHQoKSkge1xuICAgICAgICByZXNvbHZlKHRoaXMuZ2V0Q29udGV4dCgpKTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHRoaXMuY29udGV4dE9ic2VydmFibGUoKVxuICAgICAgICAgIC5waXBlKGZpcnN0KCkpXG4gICAgICAgICAgLnN1YnNjcmliZShjdHggPT4ge1xuICAgICAgICAgICAgcmVzb2x2ZShjdHguY29udGV4dCk7XG4gICAgICAgICAgfSk7XG4gICAgICB9XG4gICAgfSk7XG4gIH1cblxuICAvKipcbiAgICogU2V0IGN1cnJlbnQgY29udGV4dFxuICAgKi9cbiAgcHJvdGVjdGVkIHNldENvbnRleHQob2JqOiBJQ29udGV4dE1lc3NhZ2UpOiB2b2lkIHtcbiAgICB0aGlzLmN1cnJlbnRDb250ZXh0ID0gb2JqO1xuICAgIHRoaXMuc3ViamVjdC5uZXh0KG9iaik7XG4gIH1cblxuICBhZGRMaXN0ZW5lcihjb250ZXh0VHlwZTogSUx1aWdpQ29udGV4dFR5cGVzLCBjb250ZXh0OiBDb250ZXh0KTogdm9pZCB7XG4gICAgdGhpcy5zZXRDb250ZXh0KHtcbiAgICAgIGNvbnRleHRUeXBlLFxuICAgICAgY29udGV4dFxuICAgIH0gYXMgSUNvbnRleHRNZXNzYWdlKTtcbiAgfVxufVxuIl19 |
@@ -5,4 +5,3 @@ /** | ||
export * from './public-api'; | ||
export { LuigiRouteStrategy as ɵb } from './lib/route/luigi-route-strategy'; | ||
export { LuigiContextServiceImpl as ɵa } from './lib/service/luigi-context.service.impl'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibHVpZ2ktcHJvamVjdC1jbGllbnQtc3VwcG9ydC1hbmd1bGFyLmpzIiwic291cmNlUm9vdCI6Ii4uLy4uLy4uLy4uL3Byb2plY3RzL2NsaWVudC1zdXBwb3J0LWFuZ3VsYXIvc3JjLyIsInNvdXJjZXMiOlsibHVpZ2ktcHJvamVjdC1jbGllbnQtc3VwcG9ydC1hbmd1bGFyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxjQUFjLENBQUM7QUFFN0IsT0FBTyxFQUFDLGtCQUFrQixJQUFJLEVBQUUsRUFBQyxNQUFNLGtDQUFrQyxDQUFDO0FBQzFFLE9BQU8sRUFBQyx1QkFBdUIsSUFBSSxFQUFFLEVBQUMsTUFBTSwwQ0FBMEMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWMtYXBpJztcblxuZXhwb3J0IHtMdWlnaVJvdXRlU3RyYXRlZ3kgYXMgybVifSBmcm9tICcuL2xpYi9yb3V0ZS9sdWlnaS1yb3V0ZS1zdHJhdGVneSc7XG5leHBvcnQge0x1aWdpQ29udGV4dFNlcnZpY2VJbXBsIGFzIMm1YX0gZnJvbSAnLi9saWIvc2VydmljZS9sdWlnaS1jb250ZXh0LnNlcnZpY2UuaW1wbCc7Il19 | ||
export { LuigiRouteStrategy as ɵa } from './lib/route/luigi-route-strategy'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibHVpZ2ktcHJvamVjdC1jbGllbnQtc3VwcG9ydC1hbmd1bGFyLmpzIiwic291cmNlUm9vdCI6Ii4uLy4uLy4uLy4uL3Byb2plY3RzL2NsaWVudC1zdXBwb3J0LWFuZ3VsYXIvc3JjLyIsInNvdXJjZXMiOlsibHVpZ2ktcHJvamVjdC1jbGllbnQtc3VwcG9ydC1hbmd1bGFyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxjQUFjLENBQUM7QUFFN0IsT0FBTyxFQUFDLGtCQUFrQixJQUFJLEVBQUUsRUFBQyxNQUFNLGtDQUFrQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL3B1YmxpYy1hcGknO1xuXG5leHBvcnQge0x1aWdpUm91dGVTdHJhdGVneSBhcyDJtWF9IGZyb20gJy4vbGliL3JvdXRlL2x1aWdpLXJvdXRlLXN0cmF0ZWd5JzsiXX0= |
@@ -7,3 +7,4 @@ /* | ||
export * from './lib/service/luigi-context-service'; | ||
export * from './lib/service/luigi-context.service.impl'; | ||
export * from './lib/service/luigi-auto-routing.service'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIuLi8uLi8uLi8uLi9wcm9qZWN0cy9jbGllbnQtc3VwcG9ydC1hbmd1bGFyL3NyYy8iLCJzb3VyY2VzIjpbInB1YmxpYy1hcGkudHM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cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2xpYi9jb21wb25lbnQvbHVpZ2kucHJlbG9hZC5jb21wb25lbnQnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvbHVpZ2kuYW5ndWxhci5zdXBwb3J0Lm1vZHVsZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9zZXJ2aWNlL2x1aWdpLWNvbnRleHQtc2VydmljZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9zZXJ2aWNlL2x1aWdpLWNvbnRleHQuc2VydmljZS5pbXBsJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL3NlcnZpY2UvbHVpZ2ktYXV0by1yb3V0aW5nLnNlcnZpY2UnO1xuIl19 |
import { Component, ɵɵdefineInjectable, Injectable, ɵɵinject, NgModule } from '@angular/core'; | ||
import { NavigationEnd, Router, RouterModule, RouteReuseStrategy } from '@angular/router'; | ||
import { NavigationEnd, convertToParamMap, Router, RouterModule, RouteReuseStrategy } from '@angular/router'; | ||
import { ReplaySubject, Subscription } from 'rxjs'; | ||
import { first, filter } from 'rxjs/operators'; | ||
import { addInitListener, addContextUpdateListener, linkManager } from '@luigi-project/client'; | ||
import { filter } from 'rxjs/operators'; | ||
class LuigiPreloadComponent { | ||
constructor() { | ||
this.routeExampleVirtual = " {path: 'ng-luigi-demo', component: NgLuigiDemoComponent, data: {fromVirtualTreeRoot: true}}"; | ||
this.routeExampleReuse = " {path: 'ng-luigi-demo', component: NgLuigiDemoComponent, data: {reuse: true}}"; | ||
} | ||
constructor() { } | ||
ngOnInit() { } | ||
@@ -17,3 +14,3 @@ } | ||
selector: 'lib-client-support-angular', | ||
template: "<p>NG Luigi Library Demo Component</p>\n\n<p>\n This is a demo component; in Luigi it is a\n <a\n href=\"https://docs.luigi-project.io/docs/navigation-parameters-reference/?section=virtualtree\"\n >virtual tree</a\n >.\n <br />\n If you want to configure an Angular Component to be called in virtual tree,\n you must use this route configuration:\n <br />\n <br />\n <code>{{ routeExampleVirtual }}</code>\n</p>\n<br />\n\n<p>\n If you want to configure an Angular Component to be just created once (like a\n singleton( you can use this configuration:\n <br />\n <br />\n <code>{{ routeExampleReuse }}</code>\n</p>\n" | ||
template: "<p luigipreload=\"luigipreload\"></p>\n" | ||
},] } | ||
@@ -52,2 +49,19 @@ ]; | ||
/** | ||
* Get a promise that resolves when context is set. | ||
*/ | ||
getContextAsync() { | ||
return new Promise((resolve, reject) => { | ||
if (this.getContext()) { | ||
resolve(this.getContext()); | ||
} | ||
else { | ||
this.contextObservable() | ||
.pipe(first()) | ||
.subscribe(ctx => { | ||
resolve(ctx.context); | ||
}); | ||
} | ||
}); | ||
} | ||
/** | ||
* Set current context | ||
@@ -86,8 +100,9 @@ */ | ||
class LuigiAutoRoutingService { | ||
constructor(router) { | ||
constructor(router, luigiContextService) { | ||
this.router = router; | ||
this.luigiContextService = luigiContextService; | ||
this.subscription = new Subscription(); | ||
this.subscription.add(this.router.events | ||
.pipe(this.doFilter()) | ||
.subscribe(this.doSubscription)); | ||
.subscribe(this.doSubscription.bind(this))); | ||
} | ||
@@ -109,19 +124,41 @@ doFilter() { | ||
* {path: 'demo', component: DemoComponent, data:{luigiRoute: '/home/demo''}} | ||
* @param event | ||
* @param event the NavigationEnd event | ||
*/ | ||
doSubscription(event) { | ||
const current = LuigiActivatedRouteSnapshotHelper.getCurrent(); | ||
if (current.data.luigiRoute) { | ||
linkManager() | ||
.withoutSync() | ||
.navigate(current.data.luigiRoute); | ||
return; | ||
if (current.data) { | ||
if (current.data.luigiRoute) { | ||
let route = current.data.luigiRoute; | ||
if (current.params) { | ||
const pmap = convertToParamMap(current.params); | ||
pmap.keys.forEach(key => { | ||
const val = pmap.getAll(key).forEach(param => { | ||
route = route.replace(':' + key, param); | ||
}); | ||
}); | ||
} | ||
let lm = linkManager(); | ||
if (current.data.fromContext) { | ||
if (!this.luigiContextService.getContext()) { | ||
console.debug('Ignoring auto navigation request, luigi context not set'); | ||
return; | ||
} | ||
if (current.data.fromContext === true) { | ||
lm = lm.fromClosestContext(); | ||
} | ||
else { | ||
lm = lm.fromContext(current.data.fromContext); | ||
} | ||
} | ||
lm.withoutSync().navigate(route); | ||
return; | ||
} | ||
if (current.data.fromVirtualTreeRoot) { | ||
console.debug('Calling fromVirtualTreeRoot for ulr ==> ' + event.url); | ||
linkManager() | ||
.fromVirtualTreeRoot() | ||
.withoutSync() | ||
.navigate(event.url); | ||
} | ||
} | ||
if (current.data.fromVirtualTreeRoot) { | ||
console.debug('Calling fromVirtualTreeRoot for ulr ==> ' + event.url); | ||
linkManager() | ||
.fromVirtualTreeRoot() | ||
.withoutSync() | ||
.navigate(event.url); | ||
} | ||
} | ||
@@ -132,3 +169,3 @@ ngOnDestroy() { | ||
} | ||
LuigiAutoRoutingService.ɵprov = ɵɵdefineInjectable({ factory: function LuigiAutoRoutingService_Factory() { return new LuigiAutoRoutingService(ɵɵinject(Router)); }, token: LuigiAutoRoutingService, providedIn: "root" }); | ||
LuigiAutoRoutingService.ɵprov = ɵɵdefineInjectable({ factory: function LuigiAutoRoutingService_Factory() { return new LuigiAutoRoutingService(ɵɵinject(Router), ɵɵinject(LuigiContextService)); }, token: LuigiAutoRoutingService, providedIn: "root" }); | ||
LuigiAutoRoutingService.decorators = [ | ||
@@ -140,3 +177,4 @@ { type: Injectable, args: [{ | ||
LuigiAutoRoutingService.ctorParameters = () => [ | ||
{ type: Router } | ||
{ type: Router }, | ||
{ type: LuigiContextService } | ||
]; | ||
@@ -157,3 +195,3 @@ | ||
shouldReuseRoute(future, current) { | ||
return future.routeConfig === current.routeConfig; | ||
return false; | ||
} | ||
@@ -216,3 +254,3 @@ } | ||
export { ILuigiContextTypes, LuigiAngularSupportModule, LuigiAutoRoutingService, LuigiContextService, LuigiPreloadComponent, staticRoutes, ɵ0, ɵ1, ɵ2, LuigiContextServiceImpl as ɵa, LuigiRouteStrategy as ɵb }; | ||
export { ILuigiContextTypes, LuigiAngularSupportModule, LuigiAutoRoutingService, LuigiContextService, LuigiContextServiceImpl, LuigiPreloadComponent, staticRoutes, ɵ0, ɵ1, ɵ2, LuigiRouteStrategy as ɵa }; | ||
//# sourceMappingURL=luigi-project-client-support-angular.js.map |
import { OnInit } from '@angular/core'; | ||
export declare class LuigiPreloadComponent implements OnInit { | ||
constructor(); | ||
routeExampleVirtual: string; | ||
routeExampleReuse: string; | ||
ngOnInit(): void; | ||
} | ||
//# sourceMappingURL=luigi.preload.component.d.ts.map |
@@ -1,2 +0,2 @@ | ||
import { ActivatedRouteSnapshot, DetachedRouteHandle, RouteReuseStrategy } from "@angular/router"; | ||
import { ActivatedRouteSnapshot, DetachedRouteHandle, RouteReuseStrategy } from '@angular/router'; | ||
export declare class LuigiRouteStrategy implements RouteReuseStrategy { | ||
@@ -3,0 +3,0 @@ shouldDetach(route: ActivatedRouteSnapshot): boolean; |
import { OnDestroy } from '@angular/core'; | ||
import { OperatorFunction } from 'rxjs'; | ||
import { NavigationEnd, Router, RouterEvent } from '@angular/router'; | ||
import { LuigiContextService } from './luigi-context-service'; | ||
export declare class LuigiAutoRoutingService implements OnDestroy { | ||
private router; | ||
private luigiContextService; | ||
private subscription; | ||
constructor(router: Router); | ||
constructor(router: Router, luigiContextService: LuigiContextService); | ||
doFilter(): OperatorFunction<unknown, RouterEvent>; | ||
@@ -16,3 +18,3 @@ /** | ||
* {path: 'demo', component: DemoComponent, data:{luigiRoute: '/home/demo''}} | ||
* @param event | ||
* @param event the NavigationEnd event | ||
*/ | ||
@@ -19,0 +21,0 @@ doSubscription(event: NavigationEnd): void; |
@@ -10,5 +10,9 @@ import { Context } from '@luigi-project/client'; | ||
/** | ||
* Get latest context object | ||
* Get latest set context object (can be null/undefined, if not set yet) | ||
*/ | ||
abstract getContext(): Context; | ||
/** | ||
* Get a promise that resolves when context is set. | ||
*/ | ||
abstract getContextAsync(): Promise<Context>; | ||
} | ||
@@ -15,0 +19,0 @@ export declare enum ILuigiContextTypes { |
@@ -14,2 +14,6 @@ import { Observable } from 'rxjs'; | ||
/** | ||
* Get a promise that resolves when context is set. | ||
*/ | ||
getContextAsync(): Promise<Context>; | ||
/** | ||
* Set current context | ||
@@ -16,0 +20,0 @@ */ |
@@ -5,4 +5,3 @@ /** | ||
export * from './public-api'; | ||
export { LuigiRouteStrategy as ɵb } from './lib/route/luigi-route-strategy'; | ||
export { LuigiContextServiceImpl as ɵa } from './lib/service/luigi-context.service.impl'; | ||
export { LuigiRouteStrategy as ɵa } from './lib/route/luigi-route-strategy'; | ||
//# sourceMappingURL=luigi-project-client-support-angular.d.ts.map |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":4,"metadata":{"LuigiPreloadComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":2,"character":1},"arguments":[{"selector":"lib-client-support-angular","styles":[],"template":"<p>NG Luigi Library Demo Component</p>\n\n<p>\n This is a demo component; in Luigi it is a\n <a\n href=\"https://docs.luigi-project.io/docs/navigation-parameters-reference/?section=virtualtree\"\n >virtual tree</a\n >.\n <br />\n If you want to configure an Angular Component to be called in virtual tree,\n you must use this route configuration:\n <br />\n <br />\n <code>{{ routeExampleVirtual }}</code>\n</p>\n<br />\n\n<p>\n If you want to configure an Angular Component to be just created once (like a\n singleton( you can use this configuration:\n <br />\n <br />\n <code>{{ routeExampleReuse }}</code>\n</p>\n"}]}],"members":{"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}]}},"staticRoutes":[{"path":"luigi-client-support-preload","component":{"__symbolic":"reference","name":"LuigiPreloadComponent"},"data":{"fromVirtualTreeRoot":true}},{"path":"luigi-client-support-preload","component":{"__symbolic":"reference","name":"LuigiPreloadComponent"},"data":{"luigiRoute":"/home/reload"}},{"path":"luigi-client-support-preload=component","component":{"__symbolic":"reference","name":"LuigiPreloadComponent"},"data":{"reuse":true}}],"LuigiAngularSupportModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":30,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"LuigiPreloadComponent"}],"imports":[{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/router","name":"RouterModule","line":32,"character":12},"member":"forChild"},"arguments":[{"__symbolic":"reference","name":"staticRoutes"}]}],"providers":[{"provide":{"__symbolic":"reference","name":"LuigiContextService"},"useClass":{"__symbolic":"reference","name":"ɵa"}},{"provide":{"__symbolic":"reference","module":"@angular/router","name":"RouteReuseStrategy","line":39,"character":15},"useClass":{"__symbolic":"reference","name":"ɵb"}}],"exports":[{"__symbolic":"reference","name":"LuigiPreloadComponent"}]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"LuigiAutoRoutingService"},{"__symbolic":"reference","name":"LuigiContextService"}]}]}},"LuigiContextService":{"__symbolic":"class","members":{"contextObservable":[{"__symbolic":"method"}],"getContext":[{"__symbolic":"method"}]}},"ILuigiContextTypes":{"INIT":0,"UPDATE":1},"IContextMessage":{"__symbolic":"interface"},"LuigiAutoRoutingService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":7,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/router","name":"Router","line":13,"character":30}]}],"doFilter":[{"__symbolic":"method"}],"doSubscription":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":13,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor"}],"contextObservable":[{"__symbolic":"method"}],"getContext":[{"__symbolic":"method"}],"setContext":[{"__symbolic":"method"}],"addListener":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"ɵb":{"__symbolic":"class","members":{"shouldDetach":[{"__symbolic":"method"}],"store":[{"__symbolic":"method"}],"shouldAttach":[{"__symbolic":"method"}],"retrieve":[{"__symbolic":"method"}],"shouldReuseRoute":[{"__symbolic":"method"}]}}},"origins":{"LuigiPreloadComponent":"./lib/component/luigi.preload.component","staticRoutes":"./lib/luigi.angular.support.module","LuigiAngularSupportModule":"./lib/luigi.angular.support.module","LuigiContextService":"./lib/service/luigi-context-service","ILuigiContextTypes":"./lib/service/luigi-context-service","IContextMessage":"./lib/service/luigi-context-service","LuigiAutoRoutingService":"./lib/service/luigi-auto-routing.service","ɵa":"./lib/service/luigi-context.service.impl","ɵb":"./lib/route/luigi-route-strategy"},"importAs":"@luigi-project/client-support-angular"} | ||
{"__symbolic":"module","version":4,"metadata":{"LuigiPreloadComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":2,"character":1},"arguments":[{"selector":"lib-client-support-angular","styles":[],"template":"<p luigipreload=\"luigipreload\"></p>\n"}]}],"members":{"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}]}},"staticRoutes":[{"path":"luigi-client-support-preload","component":{"__symbolic":"reference","name":"LuigiPreloadComponent"},"data":{"fromVirtualTreeRoot":true}},{"path":"luigi-client-support-preload","component":{"__symbolic":"reference","name":"LuigiPreloadComponent"},"data":{"luigiRoute":"/home/reload"}},{"path":"luigi-client-support-preload=component","component":{"__symbolic":"reference","name":"LuigiPreloadComponent"},"data":{"reuse":true}}],"LuigiAngularSupportModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":29,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"LuigiPreloadComponent"}],"imports":[{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/router","name":"RouterModule","line":31,"character":12},"member":"forChild"},"arguments":[{"__symbolic":"reference","name":"staticRoutes"}]}],"providers":[{"provide":{"__symbolic":"reference","name":"LuigiContextService"},"useClass":{"__symbolic":"reference","name":"LuigiContextServiceImpl"}},{"provide":{"__symbolic":"reference","module":"@angular/router","name":"RouteReuseStrategy","line":38,"character":15},"useClass":{"__symbolic":"reference","name":"ɵa"}}],"exports":[{"__symbolic":"reference","name":"LuigiPreloadComponent"}]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"LuigiAutoRoutingService"},{"__symbolic":"reference","name":"LuigiContextService"}]}]}},"LuigiContextService":{"__symbolic":"class","members":{"contextObservable":[{"__symbolic":"method"}],"getContext":[{"__symbolic":"method"}],"getContextAsync":[{"__symbolic":"method"}]}},"ILuigiContextTypes":{"INIT":0,"UPDATE":1},"IContextMessage":{"__symbolic":"interface"},"LuigiContextServiceImpl":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":14,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor"}],"contextObservable":[{"__symbolic":"method"}],"getContext":[{"__symbolic":"method"}],"getContextAsync":[{"__symbolic":"method"}],"setContext":[{"__symbolic":"method"}],"addListener":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"LuigiAutoRoutingService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":14,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/router","name":"Router","line":21,"character":20},{"__symbolic":"reference","name":"LuigiContextService"}]}],"doFilter":[{"__symbolic":"method"}],"doSubscription":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"ɵa":{"__symbolic":"class","members":{"shouldDetach":[{"__symbolic":"method"}],"store":[{"__symbolic":"method"}],"shouldAttach":[{"__symbolic":"method"}],"retrieve":[{"__symbolic":"method"}],"shouldReuseRoute":[{"__symbolic":"method"}]}}},"origins":{"LuigiPreloadComponent":"./lib/component/luigi.preload.component","staticRoutes":"./lib/luigi.angular.support.module","LuigiAngularSupportModule":"./lib/luigi.angular.support.module","LuigiContextService":"./lib/service/luigi-context-service","ILuigiContextTypes":"./lib/service/luigi-context-service","IContextMessage":"./lib/service/luigi-context-service","LuigiContextServiceImpl":"./lib/service/luigi-context.service.impl","LuigiAutoRoutingService":"./lib/service/luigi-auto-routing.service","ɵa":"./lib/route/luigi-route-strategy"},"importAs":"@luigi-project/client-support-angular"} |
{ | ||
"name": "@luigi-project/client-support-angular", | ||
"version": "1.7.1", | ||
"version": "1.7.2-dev.20210119", | ||
"peerDependencies": { | ||
@@ -20,2 +20,2 @@ "@angular/common": "^11.0.0", | ||
"sideEffects": false | ||
} | ||
} |
export * from './lib/component/luigi.preload.component'; | ||
export * from './lib/luigi.angular.support.module'; | ||
export * from './lib/service/luigi-context-service'; | ||
export * from './lib/service/luigi-context.service.impl'; | ||
export * from './lib/service/luigi-auto-routing.service'; | ||
//# sourceMappingURL=public-api.d.ts.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
123723
891
36
3