UNPKG

84.1 kBSource Map (JSON)View Raw
1{"version":3,"file":"ng-core.umd.min.js","sources":["../../../../packages/ng-core/src/framing-ng-module.ts","../../../../packages/ng-core/src/framing.ts","../../../../packages/ng-core/src/simple-framer.ts","../../../../packages/ng-core/src/framing-component-outlet/component-outlet.directive.ts","../../../../packages/ng-core/src/framing-component-outlet/component-outlet.module.ts","../../../../packages/ng-core/src/framing-container-outlet/container-outlet.service.ts","../../../../packages/ng-core/src/framing-container-outlet/container-outlet.directive.ts","../../../../packages/ng-core/src/framing-container-outlet/container-outlet.module.ts","../../../../packages/ng-core/src/framing-container-outlet/container-outlet.resolver.ts","../../../../packages/ng-core/src/framing-components/empty-parent.component.ts","../../../../packages/ng-core/src/framing-components/framing-components.module.ts","../../../../packages/ng-core/src/framing-components/root.component.ts","../../../../packages/ng-core/src/component.ts","../../../../packages/ng-core/src/frame.ts","../../../../packages/ng-core/src/controller.ts","../../../../packages/ng-core/src/framer.helper.ts","../../../../packages/ng-core/src/framer.ts"],"sourcesContent":["import * as _ from 'lodash';\n\nimport { CommonModule } from '@angular/common';\nimport { Injector, ModuleWithProviders, NgModule, Provider, Type } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { BrowserModule } from '@angular/platform-browser';\nimport { Route, RouterModule } from '@angular/router';\n\nimport { FramingContainerOutletContent } from './framing-container-outlet/container-outlet-content';\nimport { FramingContainerOutletResolver } from './framing-container-outlet/container-outlet.resolver';\n\nimport { Framer } from './framer';\nimport { FramingComponentsModule, FramingEmptyParentComponent, FramingRootComponent } from './framing-components/index';\nimport { FramingRootComponentConfig } from './framing-root-component-config';\nimport { FramingRouteConfig } from './framing-route-config';\n\n/**\n *\n */\nexport class FramingNgModule {\n\n private static _nextId: number = 1;\n\n // ========================================\n // private properties\n // ========================================\n\n private _ngModule: NgModule = {\n imports: [],\n declarations: [],\n exports: [],\n providers: [],\n bootstrap: [],\n entryComponents: [],\n };\n\n private _root: boolean = false;\n\n private _rootComponent: Type<any>;\n\n private _rootComponentConfig: FramingRootComponentConfig;\n\n private _routes: Route[] = [];\n\n private _routeConfig: FramingRouteConfig;\n\n static get defaultPathMatch(): string { return 'prefix'; }\n\n // ========================================\n // public methods\n // ========================================\n\n public ngModule(ngModule?: NgModule): FramingNgModule {\n if (ngModule) {\n _.defaults(this._ngModule, ngModule);\n _.each(_.filter(_.keys(ngModule), (key: string) => { return _.isArray((ngModule as any)[key]); }), (key) => {\n (this._ngModule as any)[key] = _.uniqWith((this._ngModule as any)[key].concat(_.reject((ngModule as any)[key], _.isNil)), _.isEqual);\n });\n }\n\n return this;\n }\n\n /**\n * Add a child route. Adds to '' route by default\n */\n public child(child: Route): FramingNgModule;\n public child(child: Route, parent: Route): FramingNgModule;\n public child(child: Route, parent: Route[]): FramingNgModule;\n public child(child: Route, parent?: Route | Route[]): FramingNgModule {\n let parentRoute = this.getOrAddRouteOverload(parent);\n\n if (!parentRoute.children) { parentRoute.children = []; }\n\n if (!parentRoute.component) {\n parentRoute.component = FramingEmptyParentComponent;\n }\n\n this.getOrAddRoute(child, parentRoute.children);\n\n return this;\n }\n\n /**\n * Adds to imports\n * Adds to route\n */\n public children(children: Route[]): FramingNgModule;\n public children(children: Route[], parent: Route): FramingNgModule;\n public children(children: Route[], parent: Route[]): FramingNgModule;\n public children(children: Route[], parent?: Route | Route[]): FramingNgModule {\n _.each(children, (child) => {\n this.child(child, parent);\n });\n\n return this;\n }\n\n /**\n * Adds as component on route\n */\n public component(component: Type<any>): FramingNgModule;\n public component(component: Type<any>, route: Route): FramingNgModule;\n public component(component: Type<any>, route: Route[]): FramingNgModule;\n public component(component: Type<any>, route?: Route | Route[]): FramingNgModule {\n if (component) {\n let routeConfig = this.getOrAddRouteOverload(route);\n routeConfig.component = component;\n }\n\n return this;\n }\n\n /**\n * Adds as component on route\n * Adds component to declarations\n */\n public componentAndDeclare(component: Type<any>): FramingNgModule;\n public componentAndDeclare(component: Type<any>, route: Route): FramingNgModule;\n public componentAndDeclare(component: Type<any>, route: Route[]): FramingNgModule;\n public componentAndDeclare(component: Type<any>, route?: Route | Route[]): FramingNgModule {\n return this.componentAndDeclaration(component, route);\n }\n\n /**\n * Adds as component on route\n * Adds component to declarations\n */\n public componentAndDeclaration(component: Type<any>): FramingNgModule;\n public componentAndDeclaration(component: Type<any>, route: Route): FramingNgModule;\n public componentAndDeclaration(component: Type<any>, route: Route[]): FramingNgModule;\n public componentAndDeclaration(component: Type<any>, route?: Route | Route[]): FramingNgModule {\n this.component(component, route);\n if (component) {\n this.declare(component);\n }\n\n return this;\n }\n\n /**\n * Adds containers to route data\n * Adds container components to exports and declarations\n */\n public container(container: string, components: Type<any> | Type<any>[]): FramingNgModule;\n public container(container: string, components: Type<any> | Type<any>[], route: Route): FramingNgModule;\n public container(container: string, components: Type<any> | Type<any>[], route: Route[]): FramingNgModule;\n public container(container: string, components: Type<any> | Type<any>[], route?: Route | Route[]): FramingNgModule {\n let containers: { [key: string]: Type<any> | Type<any>[]} = {};\n containers[container] = components;\n this.containers(containers, route);\n\n return this;\n }\n\n /**\n * Adds containers to route data\n * Adds container components to exports and declarations\n */\n public containers(containers: { [key: string]: Type<any> | Type<any>[] }): FramingNgModule;\n public containers(containers: { [key: string]: Type<any> | Type<any>[] }, route: Route): FramingNgModule;\n public containers(containers: { [key: string]: Type<any> | Type<any>[] }, route: Route[]): FramingNgModule;\n public containers(containers: { [key: string]: Type<any> | Type<any>[] }, route?: Route | Route[]): FramingNgModule {\n for (let key in containers) {\n if (containers.hasOwnProperty(key)) {\n if (_.isNil(containers[key])) {\n delete containers[key];\n }\n }\n }\n\n const routeConfig = this.getOrAddRoute(route);\n if (!routeConfig.resolve) {\n routeConfig.resolve = {};\n }\n if (!routeConfig.resolve.containers) {\n routeConfig.resolve.containers = [];\n }\n\n for (let key in containers) {\n if (containers.hasOwnProperty(key)) {\n const components: Type<any> | Type<any>[] = containers[key];\n if (_.isArray(components)) {\n for (const component of components) {\n routeConfig.resolve.containers.push({ container: key, component });\n }\n } else {\n routeConfig.resolve.containers.push({ container: key, component: components });\n }\n }\n }\n\n return this;\n }\n\n /**\n * Method for appending data to route\n */\n public datum(key: string, datum: any): FramingNgModule;\n public datum(key: string, datum: any, route: Route): FramingNgModule;\n public datum(key: string, datum: any, route: Route[]): FramingNgModule;\n public datum(key: string, datum: any, route?: Route | Route[]): FramingNgModule {\n let data: { [key: string]: Type<any> } = {};\n data[key] = datum;\n this.data(data, route);\n\n return this;\n }\n\n /**\n * Methods for appending data to route\n */\n public data(data: { [key: string]: any }): FramingNgModule;\n public data(data: { [key: string]: any }, route: Route): FramingNgModule;\n public data(data: { [key: string]: any }, route: Route[]): FramingNgModule;\n public data(data: { [key: string]: any }, route?: Route | Route[]): FramingNgModule {\n let routeConfig = this.getOrAddRouteOverload(route);\n\n if (!routeConfig.data) {\n routeConfig.data = {};\n }\n _.merge(routeConfig.data, data);\n\n return this;\n }\n\n /**\n * Method for appending data resolve to route\n */\n public resolve(key: string, resolve: string | Type<any>): FramingNgModule;\n public resolve(key: string, resolve: string | Type<any>, route: Route): FramingNgModule;\n public resolve(key: string, resolve: string | Type<any>, route: Route[]): FramingNgModule;\n public resolve(key: string, resolve: string | Type<any>, route?: Route | Route[]): FramingNgModule {\n let resolves: { [key: string]: string | Type<any> } = {};\n resolves[key] = resolve;\n this.resolves(resolves, route);\n\n return this;\n }\n\n /**\n * Method for appending data resolve to route\n */\n public resolves(resolves: { [key: string]: string | Type<any> }): FramingNgModule;\n public resolves(resolves: { [key: string]: string | Type<any> }, route: Route): FramingNgModule;\n public resolves(resolves: { [key: string]: string | Type<any> }, route: Route[]): FramingNgModule;\n public resolves(resolves: { [key: string]: string | Type<any> }, route?: Route | Route[]): FramingNgModule {\n let routeConfig = this.getOrAddRouteOverload(route);\n\n if (!routeConfig.resolve) {\n routeConfig.resolve = {};\n }\n _.merge(routeConfig.resolve, resolves);\n\n return this;\n }\n\n public declare(declaration: Type<any> | Type<any>[]): FramingNgModule {\n return this.declaration(declaration);\n }\n\n public declaration(declaration: Type<any> | Type<any>[]): FramingNgModule {\n return this.declarations(_.isArray(declaration) ? declaration : [ declaration ]);\n }\n\n public declarations(declarations: Type<any>[]): FramingNgModule {\n const flattened = [].concat.apply([], declarations);\n this._ngModule.declarations = _.uniqWith(this._ngModule.declarations.concat(_.reject(flattened, _.isNil)), _.isEqual);\n\n return this;\n }\n\n public declareAndExport(declaration: Type<any> | Type<any>[]): FramingNgModule {\n return this.declarationAndExport(declaration);\n }\n\n public declarationAndExport(declaration: Type<any> | Type<any>[]): FramingNgModule {\n return this.declarationsAndExports(_.isArray(declaration) ? declaration : [ declaration ]);\n }\n\n public declarationsAndExports(declarations: Type<any>[]): FramingNgModule {\n this.declarations(declarations);\n this.exports(declarations);\n\n return this;\n }\n\n public declareAndEntryComponent(declaration: Type<any> | Type<any>[]): FramingNgModule {\n return this.declarationAndEntryComponent(declaration);\n }\n\n public declarationAndEntryComponent(declaration: Type<any> | Type<any>[]): FramingNgModule {\n return this.declarationsAndEntryComponents(_.isArray(declaration) ? declaration : [ declaration ]);\n }\n\n public declarationsAndEntryComponents(declarations: Type<any>[]): FramingNgModule {\n this.declarations(declarations);\n this.entryComponents(declarations);\n\n return this;\n }\n\n public entryComponent(entryComponent: Type<any> | Type<any>[]): FramingNgModule {\n return this.entryComponents(_.isArray(entryComponent) ? entryComponent : [ entryComponent ]);\n }\n\n public entryComponents(entryComponents: Type<any>[]): FramingNgModule {\n const flattened = [].concat.apply([], entryComponents);\n this._ngModule.entryComponents = _.uniqWith(this._ngModule.entryComponents.concat(_.reject(flattened, _.isNil)), _.isEqual);\n\n return this;\n }\n\n public export(e: Type<any> | Type<any>[]): FramingNgModule {\n return this.exports(_.isArray(e) ? e : [ e ]);\n }\n\n public exports(exports: Type<any>[]): FramingNgModule {\n const flattened = [].concat.apply([], exports);\n this._ngModule.exports = _.uniqWith(this._ngModule.exports.concat(_.reject(flattened, _.isNil)), _.isEqual);\n\n return this;\n }\n\n public import(i: Type<any> | Type<any>[] | ModuleWithProviders | ModuleWithProviders): FramingNgModule {\n return this.imports(_.isArray(i) ? i : [ i ]);\n }\n\n public imports(imports: (Type<any> | ModuleWithProviders)[]): FramingNgModule {\n const flattened = [].concat.apply([], imports);\n this._ngModule.imports = _.uniqWith(this._ngModule.imports.concat(_.reject(flattened, _.isNil)), _.isEqual);\n\n return this;\n }\n\n public importAndExport(m: Type<any> | Type<any>[]): FramingNgModule {\n return this.importsAndExports(_.isArray(m) ? m : [ m ]);\n }\n\n public importsAndExports(modules: Type<any>[]): FramingNgModule {\n this.imports(modules);\n this.exports(modules);\n\n return this;\n }\n\n public provide(provider: Provider | Provider[] | Type<any> | Type<any>[]): FramingNgModule {\n return this.provider(provider);\n }\n\n public provider(provider: Provider | Provider[] | Type<any> | Type<any>[]): FramingNgModule {\n return this.providers(_.isArray(provider) ? provider : [ provider ]);\n }\n\n public providers(providers: Provider[] | Type<any>[]): FramingNgModule {\n const flattened = [].concat.apply([], providers);\n this._ngModule.providers = _.uniqWith(this._ngModule.providers.concat(_.reject(flattened, _.isNil)), _.isEqual);\n\n return this;\n }\n\n /**\n * Adds component to bootstrap\n * Defaults route to path '', pathMatch: 'full'\n */\n public root(rootComponent?: Type<any>, config?: FramingRootComponentConfig): FramingNgModule {\n this._root = true;\n this._rootComponentConfig = config || {};\n _.defaults(this._rootComponentConfig, { hybrid: false });\n this._rootComponent = rootComponent || FramingRootComponent;\n\n return this;\n }\n\n /**\n * Creates Routes array with single route\n * Adds RouterModule.forRoot(routes) or RouterModule.forChild(routes) to imports\n * Adds all resolve services as providers\n */\n public route(route?: Route, config?: FramingRouteConfig): FramingNgModule {\n this.getOrAddRoute(route);\n\n if (this._routeConfig) {\n if (config) {\n _.merge(this._routeConfig, config);\n }\n } else {\n this._routeConfig = config || {};\n _.defaults(this._routeConfig, { forRoot: false });\n }\n\n return this;\n }\n\n public routes(routes: Route[], config?: FramingRouteConfig): FramingNgModule {\n _.each(routes, (route) => {\n this.route(route, config);\n });\n\n return this;\n }\n\n public frameRoute(route: Route, ...framers: Framer<any, any>[]): FramingNgModule;\n public frameRoute(route: Route[], ...framers: Framer<any, any>[]): FramingNgModule;\n public frameRoute(route: Route | Route[], ...framers: Framer<any, any>[]): FramingNgModule {\n this.buildFramers(framers, this.getOrAddRouteOverload(route));\n\n return this;\n }\n\n /**\n * Returns the route if it exists.\n */\n public getRoute(route: Route = {}, array?: Route[]): Route {\n /* tslint:disable:no-param-reassign */\n if (!array) { array = this._routes; }\n /* tslint:enable:no-param-reassign */\n\n _.defaults(route, { path: '', pathMatch: FramingNgModule.defaultPathMatch });\n\n return _.find(array, (m) => { return m.path === route.path && m.pathMatch === route.pathMatch; });\n }\n\n /**\n * Returns the route. Creates it if it does not exist.\n */\n public getOrAddRoute(route: Route = {}, array?: Route[]): Route {\n /* tslint:disable:no-param-reassign */\n if (!array) { array = this._routes; }\n /* tslint:enable:no-param-reassign */\n\n _.defaults(route, { path: '', pathMatch: FramingNgModule.defaultPathMatch });\n\n let r = _.find(array, (m) => { return m.path === route.path && m.pathMatch === route.pathMatch; });\n\n if (r) {\n _.merge(r, route);\n return r;\n } else {\n array.push(route);\n\n return route;\n }\n }\n\n /**\n * Run framers.\n */\n public frame(...framers: Framer<any, any>[]): FramingNgModule {\n this.buildFramers(framers);\n\n return this;\n }\n\n /**\n * Builds @NgModule() config in the following order:\n * - Route framers\n * - Root\n * - Route\n */\n public build(): NgModule {\n this.buildRouteFramers(this._routes);\n this.buildRoot();\n this.buildContainers(this._routes);\n this.buildRoute();\n this.inspectModule();\n\n return this._ngModule;\n }\n\n // ========================================\n // private methods\n // ========================================\n\n private inspectModule(): void {\n this._routes.forEach((r) => this.inspectRoute(r));\n }\n\n private inspectRoute(route: Route): void {\n if (route.component === undefined && route.redirectTo === undefined && _.isEmpty(route.children) && route.loadChildren === undefined) {\n console.error(\n `Looks like you have a badly configured route in a framed module.\n One of the following must be provided: component, redirectTo, children or loadChildren`,\n { route, self: this });\n }\n\n if (route.children) {\n route.children.forEach((c) => this.inspectRoute(c));\n }\n }\n\n private buildRoot(): void {\n let m: NgModule = this._ngModule;\n\n if (this._root) {\n m.imports = _.uniqWith(m.imports.concat([\n BrowserModule.withServerTransition({\n appId: 'app',\n }),\n FormsModule,\n ]), _.isEqual);\n\n m.declarations = _.uniqWith(m.declarations.concat([ this._rootComponent ]), _.isEqual);\n if (this._rootComponentConfig.hybrid) {\n m.entryComponents = _.uniqWith(m.entryComponents.concat([ this._rootComponent ]), _.isEqual);\n } else {\n m.bootstrap = _.uniqWith(m.bootstrap.concat([ this._rootComponent ]), _.isEqual);\n }\n } else {\n m.imports = _.uniqWith(m.imports.concat([\n CommonModule,\n ]), _.isEqual);\n }\n\n m.imports = _.uniqWith(m.imports.concat([ FramingComponentsModule ]), _.isEqual);\n }\n\n private buildFramers(framers: Framer<any, any>[], route?: Route): void {\n for (let framer of framers) {\n this.buildFramer(framer, route);\n }\n }\n\n private buildFramer(framer: Framer<any, any>, route: Route): void {\n if (!framer.framed) {\n framer.runFraming(this, route || this.getRoute());\n }\n }\n\n /**\n * Builds framers that were manually added to route data.\n */\n private buildRouteFramers(routes: Route[]): void {\n for (let route of routes) {\n if (route.data) {\n for (let key in route.data) {\n if (route.data.hasOwnProperty(key)) { // tslint: forin\n let prop = route.data[key];\n if (prop && prop._frame !== undefined) {\n // this is a framer attached to route data\n this.buildFramer(prop as Framer<any, any>, route);\n }\n }\n }\n }\n if (route.children) {\n this.buildRouteFramers(route.children);\n }\n }\n }\n\n private buildContainers(routes: Route[]): void {\n for (let route of routes) {\n if (route.resolve && route.resolve.containers) {\n const containers: FramingContainerOutletContent[] = route.resolve.containers;\n for (const container of containers) {\n const containerId = FramingNgModule._nextId++;\n container.id = '' + containerId;\n }\n const resolveId = FramingNgModule._nextId++;\n this.provide({\n provide: 'containerResolver' + resolveId,\n useFactory: (i: Injector) => new FramingContainerOutletResolver(containers, i),\n deps: [ Injector ],\n });\n route.resolve.containers = 'containerResolver' + resolveId;\n }\n if (route.children) {\n this.buildContainers(route.children);\n }\n }\n }\n\n private buildRoute(): void {\n if (this._routes.length > 0) {\n // re-order routes so that full routes are first\n let fullRoutes: Route[] = [];\n let prefixRoutes: Route[] = [];\n this._routes.forEach((route) => {\n if (route.pathMatch && route.pathMatch === 'full') {\n fullRoutes.push(route);\n } else if (!route.pathMatch || route.pathMatch === 'prefix') {\n prefixRoutes.push(route);\n } else {\n console.warn('Unknown pathMatch on route', route);\n }\n this._routes = [];\n this._routes = this._routes.concat(fullRoutes);\n this._routes = this._routes.concat(prefixRoutes);\n });\n\n const routing: ModuleWithProviders = this._root || (this._routeConfig && this._routeConfig.forRoot) ?\n RouterModule.forRoot(this._routes, this._routeConfig ? this._routeConfig.extraRootRouterOptions : undefined) :\n RouterModule.forChild(this._routes);\n\n this.imports([ routing ]);\n\n if (this._routeConfig && this._routeConfig.forRoot && !this._root) {\n this.exports([ RouterModule ]); // export RouterModule from AppRoutingModule\n }\n }\n }\n\n private getOrAddRouteOverload(route: Route | Route[]): Route {\n if (_.isArray(route)) {\n if (route.length) {\n let result: Route;\n\n /* tslint:disable:prefer-for-of */\n result = this.getOrAddRoute(route[0]);\n for (let i = 1; i < route.length; i++) {\n if (!result.children) { result.children = []; }\n result = this.getOrAddRoute(route[i], result.children);\n }\n /* tslint:enable:prefer-for-of */\n\n return result;\n } else {\n return this.getOrAddRoute();\n }\n } else {\n return this.getOrAddRoute(route);\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { FramingNgModule } from './framing-ng-module';\n\ntype FramingNgModuleBuilder = (framing: FramingNgModule) => FramingNgModule;\n\n/* tslint:disable:variable-name */\nexport const Framing = (ngModuleBuilder: FramingNgModuleBuilder): NgModule => {\n/* tslint:enable:variable-name */\n\n let framing = ngModuleBuilder(new FramingNgModule());\n if (!framing) {\n console.error('Framing must return a FramingNgModule');\n return {};\n }\n return framing.build();\n};\n","import { Framer } from './framer';\n\n/**\n * A framer with no route, model, view, controller or frame.\n * To be used for leveraging the frame() function only.\n */\nexport abstract class SimpleFramer extends Framer<void, void> {\n public get framerName(): string { return 'Simple'; }\n public get createFrame(): boolean { return false; }\n public get routeRule(): ('require' | 'auto' | 'none') { return 'none'; }\n}\n","import {\n ComponentFactoryResolver,\n ComponentRef,\n Directive,\n EventEmitter,\n Injector,\n Input,\n NgModuleFactory,\n NgModuleRef,\n OnChanges,\n OnDestroy,\n Output,\n SimpleChanges,\n Type,\n ViewContainerRef,\n} from '@angular/core';\n\nimport { FramingComponentOutlet } from './component-outlet';\n\n@Directive({\n selector: '[framingComponentOutlet]',\n})\nexport class FramingComponentOutletDirective implements OnChanges, OnDestroy, FramingComponentOutlet {\n @Input() framingComponentOutlet: Type<any>;\n @Input() injector: Injector;\n @Input() content: any[][];\n @Input() ngModuleFactory: NgModuleFactory<any>;\n\n @Output() onComponent: EventEmitter<ComponentRef<any>> = new EventEmitter<ComponentRef<any>>();\n\n private _componentRef: ComponentRef<any>;\n private _moduleRef: NgModuleRef<any>;\n\n constructor(\n private _view: ViewContainerRef,\n ) {}\n\n isActivated(): boolean { return !!this._componentRef; }\n\n ngOnChanges(changes: SimpleChanges): void {\n let activate = false;\n if ((changes as any).ngModuleFactory) {\n if (this._moduleRef) { this._moduleRef.destroy(); }\n if (this.ngModuleFactory) {\n const injector = this.injector || this._view.parentInjector;\n this._moduleRef = this.ngModuleFactory.create(injector);\n } else {\n this._moduleRef = undefined;\n }\n activate = true;\n }\n\n if ((changes as any).framingComponentOutlet.currentValue !== (changes as any).framingComponentOutlet.previousValue) {\n activate = true;\n }\n\n if (activate) {\n this.activate(this.framingComponentOutlet);\n }\n }\n\n ngOnDestroy(): void {\n this.deactivate();\n if (this._moduleRef) { this._moduleRef.destroy(); }\n }\n\n private activate(component: Type<any>): void {\n this.deactivate();\n\n if (!component) {\n return;\n }\n\n try {\n const injector = this.injector || this._view.parentInjector;\n const factory = injector.get(ComponentFactoryResolver).resolveComponentFactory(component);\n this._componentRef = this._view.createComponent(factory, this._view.length, injector, this.content);\n this.onComponent.emit(this._componentRef);\n try {\n this._componentRef.changeDetectorRef.detectChanges();\n } catch (e) {\n console.error(`detectChanges failed on activated component in FramingComponentOutlet`, { e, component });\n return;\n }\n } catch (e) {\n console.error(`Failed to activate component in FramingComponentOutlet`, { e, component });\n return;\n }\n }\n\n private deactivate(): void {\n if (this._componentRef) {\n this._view.remove(this._view.indexOf(this._componentRef.hostView));\n this._componentRef.destroy();\n }\n this._view.clear();\n this._componentRef = undefined;\n }\n}\n","import { ANALYZE_FOR_ENTRY_COMPONENTS, ModuleWithProviders, NgModule } from '@angular/core';\n\nimport { FramingComponentOutletDirective } from './component-outlet.directive';\n\n@NgModule({\n declarations: [ FramingComponentOutletDirective ],\n exports: [ FramingComponentOutletDirective ],\n})\nexport class FramingComponentOutletModule {\n static withEntryComponents(...components: any[]): ModuleWithProviders {\n return {\n ngModule: FramingComponentOutletModule,\n providers: [\n { provide: ANALYZE_FOR_ENTRY_COMPONENTS, useValue: components, multi: true },\n ],\n };\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ActivatedRouteSnapshot, NavigationEnd, Router } from '@angular/router';\nimport { Observable, ReplaySubject } from 'rxjs/Rx';\nimport { AnonymousSubscription } from 'rxjs/Subscription';\n\nimport { FramingContainerOutletContent } from './container-outlet-content';\n\nimport * as _ from 'lodash';\n\n@Injectable()\nexport class FramingContainerOutletService {\n\n public get contents$(): Observable<FramingContainerOutletContent[]> { return this.contentsSubject.asObservable(); }\n\n private contentsSubject: ReplaySubject<FramingContainerOutletContent[]> = new ReplaySubject<FramingContainerOutletContent[]>();\n private contents: FramingContainerOutletContent[] = [];\n private routeContents: FramingContainerOutletContent[] = [];\n\n private subscriptions: AnonymousSubscription[] = [];\n\n constructor(\n private router: Router,\n ) {\n this.subscriptions.push(this.router.events.subscribe((event) => {\n if (event instanceof NavigationEnd) {\n this.onNavigationEnd();\n }\n }));\n }\n\n public hasContent(container: string): boolean {\n return !!this.contents.filter((c) => _.isEqual(c.container, container)).length;\n }\n\n public activate(content: FramingContainerOutletContent): () => void {\n this.contents.push(content);\n this.contentsSubject.next(_.clone(this.contents));\n return () => { this.deactivate(content); };\n }\n\n private deactivate(content: FramingContainerOutletContent): void {\n this.contents = this.contents.filter((e) => e !== content);\n this.contentsSubject.next(_.clone(this.contents));\n }\n\n private onNavigationEnd(): void {\n let newRouteContents: FramingContainerOutletContent[] = [];\n this.resolveRouteContents(this.router.routerState.snapshot.root, newRouteContents);\n\n newRouteContents = _.uniqWith(newRouteContents, _.isEqual);\n\n const newContents = _.differenceWith(newRouteContents, this.routeContents, _.isEqual);\n const removedContents = _.differenceWith(this.routeContents, newRouteContents, _.isEqual);\n\n newContents.forEach((c) => this.activate(c));\n removedContents.forEach((c) => this.deactivate(c));\n\n this.routeContents = newRouteContents;\n }\n\n private resolveRouteContents(snapshot: ActivatedRouteSnapshot, routeContents: FramingContainerOutletContent[]): void {\n if (snapshot.data && (snapshot.data as any).containers) {\n const containers: FramingContainerOutletContent[] = (snapshot.data as any).containers;\n for (const container of containers) {\n routeContents.push(container);\n }\n }\n for (let child of snapshot.children) {\n this.resolveRouteContents(child, routeContents);\n }\n }\n}\n","import {\n ComponentFactoryResolver,\n ComponentRef,\n Directive,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Output,\n ViewContainerRef,\n} from '@angular/core';\nimport { NavigationEnd, Router } from '@angular/router';\n\nimport { AnonymousSubscription } from 'rxjs/Subscription';\n\nimport { FramingContainerOutlet } from './container-outlet';\nimport { FramingContainerOutletContent } from './container-outlet-content';\nimport { FramingContainerOutletService } from './container-outlet.service';\n\nimport * as _ from 'lodash';\n\nclass ActivatedContent {\n content: FramingContainerOutletContent;\n ref: ComponentRef<any>;\n}\n\n@Directive({\n selector: '[framingContainerOutlet]',\n})\nexport class FramingContainerOutletDirective implements OnInit, OnDestroy, FramingContainerOutlet {\n @Input() framingContainerOutlet: string;\n @Input() optionalContainer: boolean;\n @Input() useViewInjector: boolean;\n @Input() content: any[][];\n\n @Output() onComponents: EventEmitter<ComponentRef<any>[]> = new EventEmitter<ComponentRef<any>[]>();\n\n private _activated: ActivatedContent[] = [];\n\n private _subscriptions: AnonymousSubscription[] = [];\n\n constructor(\n private _view: ViewContainerRef,\n private _containerService: FramingContainerOutletService,\n private _router: Router,\n ) {}\n\n containerName(): string { return this.framingContainerOutlet; }\n\n isActivated(): boolean { return this._activated.length > 0; }\n\n ngOnInit(): void {\n if (!this.framingContainerOutlet) {\n console.warn('FramingContainerOutlet without a container name');\n } else {\n if (this.framingContainerOutlet[0] === '\\'') {\n console.warn(`FramingContainerOutlet name \"${this.framingContainerOutlet}\" starts with a qoute`);\n }\n this._subscriptions.push(this._containerService.contents$.subscribe((contents: FramingContainerOutletContent[]) => this.onContent(contents)));\n }\n\n this._subscriptions.push(this._router.events.subscribe((event) => {\n if (event instanceof NavigationEnd) {\n if (!this.optionalContainer && !this.isActivated()) {\n console.warn(`No content for required FramingContainerOutlet '${this.framingContainerOutlet}' found`);\n }\n }\n }));\n }\n\n ngOnDestroy(): void {\n this._activated.forEach((a) => this.deactivate(a));\n this._subscriptions.forEach((s) => s.unsubscribe());\n }\n\n private onContent(allContents: FramingContainerOutletContent[]): void {\n const contents: FramingContainerOutletContent[] = allContents.filter((c) => _.isEqual(c.container, this.framingContainerOutlet));\n\n // remove all content that is no longer active\n this._activated.forEach((a) => {\n if (contents.findIndex((content) => content === a.content) === -1) {\n this.deactivate(a);\n }\n });\n this._activated = this._activated.filter((a) => !!a.ref);\n\n // now setup the new activated components\n let i = 0;\n for (let content of contents) {\n if (this._activated.length > i) {\n if (this._activated[i].content !== content) {\n // look for this content\n const activatedIndex = this._activated.findIndex((a) => a.content === content);\n if (activatedIndex === -1) {\n // activate this content at i\n this._activated.splice(i, 0, { content, ref: this.activate(content) });\n } else if (activatedIndex > i) {\n // move content from activatedIndex to i\n const _activated = this._activated.splice(activatedIndex, 1);\n this._activated.splice(i, 0, ..._activated);\n const view = this._view.detach(activatedIndex);\n this._view.insert(view, i);\n } else {\n console.error('Logic error in FramingContainerOutlet!');\n }\n }\n } else {\n // activate this content\n const ref = this.activate(content);\n if (ref) {\n this._activated.push({ content, ref });\n }\n }\n i++;\n }\n\n this.onComponents.emit(this._activated.map((a) => a.ref));\n }\n\n private activate(content: FramingContainerOutletContent, i?: number): ComponentRef<any> {\n try {\n const injector = (!this.useViewInjector && content.injector) ? content.injector : this._view.parentInjector;\n const factory = injector.get(ComponentFactoryResolver).resolveComponentFactory(content.component);\n let ref = this._view.createComponent(factory, i, injector, this.content);\n try {\n ref.changeDetectorRef.detectChanges();\n } catch (e) {\n console.error(`detectChanges failed on activated component in FramingContainerOutlet '${this.framingContainerOutlet}'`, { e, component: content.component });\n }\n return ref;\n } catch (e) {\n console.error(`Failed to activate component in FramingContainerOutlet '${this.framingContainerOutlet}'`, { e, component: content.component });\n return undefined;\n }\n }\n\n private deactivate(activated: ActivatedContent): void {\n activated.ref.destroy();\n activated.ref = null;\n }\n}\n","import { ANALYZE_FOR_ENTRY_COMPONENTS, ModuleWithProviders, NgModule } from '@angular/core';\n\nimport { FramingContainerOutletDirective } from './container-outlet.directive';\nimport { FramingContainerOutletService } from './container-outlet.service';\n\n@NgModule({\n declarations: [ FramingContainerOutletDirective ],\n exports: [ FramingContainerOutletDirective ],\n})\nexport class FramingContainerOutletModule {\n static withEntryComponents(...components: any[]): ModuleWithProviders {\n return {\n ngModule: FramingContainerOutletModule,\n providers: [\n { provide: ANALYZE_FOR_ENTRY_COMPONENTS, useValue: components, multi: true },\n ],\n };\n }\n\n static forRoot(): ModuleWithProviders {\n return {\n ngModule: FramingContainerOutletModule,\n providers: [ FramingContainerOutletService ],\n };\n }\n}\n","import { Injectable, Injector } from '@angular/core';\nimport { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';\n\nimport { FramingContainerOutletContent } from './container-outlet-content';\n\n@Injectable()\nexport class FramingContainerOutletResolver implements Resolve<FramingContainerOutletContent[]> {\n\n constructor(\n private containers: FramingContainerOutletContent[],\n private injector: Injector,\n ) {}\n\n /**\n * Resolve hook.\n */\n public resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): FramingContainerOutletContent[] {\n // set the injector in each container\n for (let container of this.containers) {\n container.injector = this.injector;\n }\n return this.containers;\n }\n}\n","import { Component } from '@angular/core';\n\n/**\n * @experimental\n */\n@Component({\n selector: 'empty-parent-component',\n template: '<router-outlet></router-outlet>',\n})\nexport class FramingEmptyParentComponent {}\n","import { NgModule } from '@angular/core';\nimport { RouterModule } from '@angular/router';\n\nimport { FramingEmptyParentComponent } from './empty-parent.component';\n\n@NgModule({\n imports: [\n RouterModule,\n ],\n declarations: [\n FramingEmptyParentComponent,\n ],\n exports: [\n FramingEmptyParentComponent,\n ],\n})\nexport class FramingComponentsModule {}\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'app',\n template: '<router-outlet></router-outlet>',\n})\nexport class FramingRootComponent {}\n","import { ChangeDetectorRef, Injector } from '@angular/core';\n\nimport { Controller } from './controller';\n\nexport class Component<M, V, C extends Controller<M, V>> {\n\n public model: M;\n\n public view: V;\n\n public controller: C;\n\n private changeDetectorRef: ChangeDetectorRef;\n\n public constructor(\n controller: C,\n injector: Injector,\n ) {\n this.changeDetectorRef = injector.get(ChangeDetectorRef);\n\n controller.model$.subscribe((model) => {\n this.model = model;\n this.changeDetectorRef.markForCheck();\n });\n\n controller.view$.subscribe((view) => {\n this.view = view;\n this.changeDetectorRef.markForCheck();\n });\n }\n}\n","import { ActivatedRouteSnapshot } from '@angular/router';\nimport { Observable, ReplaySubject, Subject } from 'rxjs';\n\nexport class Frame {\n\n // ========================================\n // public properties\n // ========================================\n\n /**\n * The route url of the route that this controller is attached to, if any.\n * This value MAY change if the route url changes of the controllerrs route.\n */\n public routeUrl: string;\n\n /**\n * The current activated route snapshot for this frame.\n */\n public routeSnapshot: ActivatedRouteSnapshot;\n\n /**\n * An observable of the route url of the route that this controllerr is attached to, if any.\n */\n public get routeUrl$(): Observable<string> { return this.routeUrlSubject; }\n\n /**\n * Emitted when the frame resolve method starts if this controller is attached to a route.\n */\n public get resolveStart$(): Observable<void> { return this.resolveStartSubject; }\n\n /**\n * Emitted when the frame resolve method ends if this controller is attached to a route.\n */\n public get resolveEnd$(): Observable<void> { return this.resolveEndSubject; }\n\n /**\n * Emitted when the frame resolve method is cancelled if this controller is attached to a route.\n */\n public get resolveCancel$(): Observable<void> { return this.resolveCancelSubject; }\n\n /**\n * Subjects\n */\n public routeUrlSubject: ReplaySubject<string> = new ReplaySubject<string>();\n public resolveStartSubject: Subject<void> = new Subject<void>();\n public resolveEndSubject: Subject<void> = new Subject<void>();\n public resolveCancelSubject: Subject<void> = new Subject<void>();\n}\n","import * as _ from 'lodash';\n\nimport { Injectable, Injector } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs/BehaviorSubject';\nimport { Observable } from 'rxjs/Observable';\n\nimport { Frame } from './frame';\n\n@Injectable()\nexport abstract class Controller<M, V> {\n\n // ========================================\n // private properties\n // ========================================\n\n private _modelSubject: BehaviorSubject<M>;\n\n private _viewSubject: BehaviorSubject<V>;\n\n private _model$: Observable<M>;\n\n private _view$: Observable<V>;\n\n private _model: M;\n\n private _view: V;\n\n private _frame: Frame;\n\n private _injector: Injector;\n\n // ========================================\n // public methods\n // ========================================\n\n /**\n * Model observable accessor.\n */\n public get model$(): Observable<M> { return this._model$; }\n\n /**\n * View observable accessor.\n */\n public get view$(): Observable<V> { return this._view$; }\n\n /**\n * Model accessor.\n */\n public get model(): M { return this._model; }\n\n /**\n * View accessor.\n */\n public get view(): V { return this._view; }\n\n /**\n * Frame accessor.\n */\n public get frame(): Frame { return this._frame; }\n\n /**\n * Model accessor.\n */\n public get injector(): Injector { return this._injector; }\n\n /**\n * Called after controller is initialized with model, view & frame from framing.\n */\n public onControllerInit(): void {}\n\n /**\n * Called when the controller's route starts resolving.\n */\n public onResolveStart(): void {}\n\n /**\n * Called when the controller's route end resolving.\n */\n public onResolveEnd(): void {}\n\n /**\n * Called when the controller's route resolve is cancelled.\n */\n public onResolveCancel(): void {}\n\n /**\n * Called by framing after construction to link the model, view & frame for this controller.\n */\n public initController(model: M, view: V, frame: Frame, injector: Injector): void {\n this._modelSubject = new BehaviorSubject<M>(model);\n this._viewSubject = new BehaviorSubject<V>(view);\n this._model$ = this._modelSubject.asObservable();\n this._view$ = this._viewSubject.asObservable();\n this._model = model;\n this._view = view;\n this._frame = frame;\n this._injector = injector;\n if (this._frame) {\n this._frame.resolveStart$.subscribe(() => { this.onResolveStart(); });\n this._frame.resolveEnd$.subscribe(() => { this.onResolveEnd(); });\n this._frame.resolveCancel$.subscribe(() => { this.onResolveCancel(); });\n }\n this.onControllerInit();\n }\n\n public updateModel(model: M, replace: boolean = false): void {\n if (replace) {\n this._model = model;\n } else {\n this._model = _.assign({}, this._model, model);\n }\n\n this._modelSubject.next(this._model);\n }\n\n public updateView(view: V, replace: boolean = false): void {\n if (replace) {\n this._view = view;\n } else {\n this._view = _.assign({}, this._view, view);\n }\n this._view = view;\n this._viewSubject.next(this._view);\n }\n}\n","import * as _ from 'lodash';\n\nexport abstract class FramerHelper {\n\n private static _nextId: number = 1;\n\n /**\n * A unique framer id for this this.\n */\n public framerHelperId: number;\n\n /**\n * A unique identifier string for this framer helper instance.\n */\n public get framerHelperIdent(): string {\n return _.camelCase(`framerHelper-${(this as any).__proto__.constructor.name}-${this.framerHelperId}`);\n }\n\n // ========================================\n // constructor\n // ========================================\n\n public constructor() {\n this.framerHelperId = FramerHelper._nextId++;\n }\n}\n","import { Injector, Type } from '@angular/core';\nimport { ActivatedRoute, ActivatedRouteSnapshot, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, Route, Router, RouterStateSnapshot, UrlSegment } from '@angular/router';\n\nimport { Controller } from './controller';\nimport { Frame } from './frame';\nimport { FramingNgModule } from './framing-ng-module';\n\nimport * as _ from 'lodash';\n\n/**\n * @description This is a description\n */\nexport abstract class Framer<Model, View> {\n private static _nextId: number = 1;\n\n // ========================================\n // public properties\n // ========================================\n\n /**\n * The name of this framer.\n */\n public abstract get framerName(): string;\n\n /**\n * Model accessor.\n */\n public get theModel(): Model { return this._model; }\n\n /**\n * View accessor.\n */\n public get theView(): View { return this._view; }\n\n /**\n * Controller accessor.\n */\n public get theController(): Type<Controller<Model, View>> { return this._controller; }\n\n /**\n * When true, framing will create a frame for this framer.\n */\n public get createFrame(): boolean { return true; }\n\n /**\n * When true, framing will use multi on all providers so multiple framers of the same type can be setup on the same module.\n */\n public get multiFramer(): boolean { return false; }\n\n /**\n * When true, framing will setup the controller as a provider by its type.\n */\n public get provideControllerByType(): boolean { return true; }\n\n /**\n * When true, framing will add the model to the route data.\n */\n public get addModelToRouteData(): boolean { return false; }\n\n /**\n * When true, framing will add the view to the route data.\n */\n public get addViewToRouteData(): boolean { return false; }\n\n /**\n * When true, framing will add the frame to the route data.\n */\n public get addFrameToRouteData(): boolean { return false; }\n\n /**\n * The default model.\n */\n public get defaultModel(): Model { return undefined; }\n\n /**\n * The default view.\n */\n public get defaultView(): View { return undefined; }\n\n /**\n * The default controller.\n */\n public get defaultController(): Type<Controller<Model, View>> { return undefined; }\n\n /**\n * 'require': framing will attach the default route, creating it if it doesn't yet exist, if not route is attached to this framer (default behavior)\n * 'auto': framing will attach the default route if available if not route is attached to this framer\n * 'none': framing will not attach a route to this framer\n */\n public get routeRule(): ('require' | 'auto' | 'none') { return 'require'; }\n\n /**\n * A unique framer id for this framer.\n */\n public get framerId(): number { return this._framerId; }\n\n /**\n * A unique identifier string for this framer instance.\n */\n public get framerIdent(): string { return `${this.framerName}Framer-${this._framerId}`; }\n\n /**\n * True if framing() has been called.\n */\n public get framed(): boolean { return this._framed; }\n\n /**\n * The injector (available on and after framerOnResolveRoute or framerOnControllerInit, whichever comes first)\n */\n public get injector(): Injector { return this._injector; }\n\n /**\n * The framer's route, if attached to a route, otherwise undefined\n * Valid ONLY during the runFraming() and framing() functions\n */\n public get route(): Route { return this._route; }\n\n // ========================================\n // private properties\n // ========================================\n\n /**\n * A unique framer id for this framer.\n */\n private _framerId: number;\n\n /**\n * True if framing() has been called.\n */\n private _framed: boolean = false;\n\n /**\n * The model.\n */\n private _model: Model;\n\n /**\n * The view.\n */\n private _view: View;\n\n /**\n * The controller.\n */\n private _controller: Type<Controller<Model, View>>;\n\n /**\n * The frame.\n */\n private _frame: Frame;\n\n /**\n * The framer's injector.\n */\n private _injector: Injector;\n\n /**\n * The framer's route, if attached to a route, otherwise undefined\n * Valid ONLY during the runFraming() and framing() functions\n */\n private _route: Route;\n\n /**\n * Reference to the framer's FramingNgModule.\n * Valid ONLY during the framing() function\n */\n private _framing: FramingNgModule;\n\n // ========================================\n // public static methods\n // ========================================\n\n /**\n * Helper function to build the URL of an ActivatedRouteSnapshot\n */\n public static buildUrlLink(route: ActivatedRouteSnapshot): string {\n if (!route) { return '/'; }\n let urls: UrlSegment[] = [];\n /* tslint:disable:no-param-reassign */\n for (; route.parent; route = route.parent) {\n /* tslint:enable:no-param-reassign */\n urls = urls.concat(route.url.reverse());\n }\n urls = urls.reverse();\n return '/' + urls.join('/');\n }\n\n // ========================================\n // public methods\n // ========================================\n\n /**\n * Model chaining function.\n */\n public model(model?: Model): Framer<Model, View> {\n _.merge(this._model, model);\n return this;\n }\n\n /**\n * View chaining function.\n */\n public view(view?: View): Framer<Model, View> {\n _.merge(this._view, view);\n return this;\n }\n\n /**\n * Controller chaining function.\n */\n public controller(controller?: Type<Controller<Model, View>>): Framer<Model, View> {\n if (controller) { this._controller = controller; }\n return this;\n }\n\n /**\n * The frame function.\n */\n public abstract frame(framing: FramingNgModule): void;\n\n /**\n * Framer on resolve route function called when framer's route is resolved.\n * Injector is set before during this call.\n * Not called if framer is not attached to a route.\n * To be overwritten if needed.\n */\n public framerOnResolveRoute(): void {}\n\n /**\n * Framer on controller init function is called when the controller is first injected.\n * To be overwritten if needed.\n */\n public framerOnControllerInit(controller: Controller<Model, View>): void {}\n\n /**\n * Calls derived framing()\n */\n public runFraming(framing: FramingNgModule, routeParam?: Route): void {\n if (this._framed) {\n console.warn(`runFraming() called multiple times on framer '${this.framerIdent}'`);\n return;\n }\n\n this._framed = true; // mark this framer to framed\n\n if (this.routeRule === 'auto') {\n // set the framer's attached route (if any)\n this._route = routeParam;\n } else if (this.routeRule === 'require') {\n // set the framer's attached route to the supplied route or create one if it doesn not exist\n if (routeParam) {\n this._route = routeParam;\n } else {\n /* tslint:disable:no-param-reassign */\n this._route = routeParam = framing.getOrAddRoute();\n /* tslint:enable:no-param-reassign */\n }\n }\n\n this._framing = framing; // set _framing to framing ONLY for the duration of the controller() function\n try {\n this.frame(framing);\n } catch (e) {\n console.error(`Exception when framing ${this.framerIdent} :`, e);\n this._model = undefined;\n this._view = undefined;\n this._controller = undefined;\n }\n this._framing = undefined;\n\n if (this.routeRule === 'auto') { // check this again incase the framer created a route\n this._route = routeParam;\n }\n\n const self = this;\n\n if (this._controller) {\n // FUTURE\n // this.provideTypeByName(framing, this.framerName + 'Controller', this._controller);\n\n if (this.provideControllerByType) {\n let controllerInstance: Controller<Model, View>;\n\n framing\n .provide({\n provide: this.framerIdent + '-ControllerInternal',\n useClass: this._controller,\n })\n .provide({\n provide: this.framerIdent + '-Controller',\n useFactory: (injector: Injector) => {\n if (controllerInstance) {\n return controllerInstance;\n }\n self._injector = injector;\n controllerInstance = injector.get(this.framerIdent + '-ControllerInternal');\n controllerInstance.initController(this._model, this._view, this._frame, injector);\n this.framerOnControllerInit(controllerInstance);\n return controllerInstance;\n },\n deps: [ Injector ],\n })\n .provide({\n provide: this._controller,\n useExisting: this.framerIdent + '-Controller',\n multi: this.multiFramer && this._controller === this.defaultController,\n });\n\n /* tslint:disable:no-console */\n console.info(`Providing controller for framer ${this.framerIdent} by type`);\n /* tslint:enable:no-console */\n\n if (this.defaultController && this._controller !== this.defaultController) {\n framing.provide({\n provide: this.defaultController,\n useExisting: this.framerIdent + '-Controller',\n multi: this.multiFramer,\n });\n /* tslint:disable:no-console */\n console.info(`Providing controller overload for framer ${this.framerIdent} by default controller type`);\n /* tslint:enable:no-console */\n }\n }\n }\n\n // FUTURE: frame, model & view provided by name\n // this.provideValueByName(framing, this.framerName + 'Frame', this._frame);\n // this.provideValueByName(framing, this.framerName + 'Model', this._model);\n // this.provideValueByName(framing, this.framerName + 'View', this._view);\n\n // FUTURE: model & view provided by type\n // this.provideInstanceByType(framing, this._model);\n // this.provideInstanceByType(framing, this._view);\n\n if (this.route) {\n if (this.addFrameToRouteData) {\n this.addRouteData(framing, this.framerName + 'Frame', this._frame);\n }\n if (this.addModelToRouteData) {\n this.addRouteData(framing, this.framerName + 'Model', this._model);\n }\n if (this.addViewToRouteData) {\n this.addRouteData(framing, this.framerName + 'View', this._view);\n }\n\n if (this._frame) {\n class FrameResolver {\n constructor(\n private router: Router,\n private route: ActivatedRoute,\n injector: Injector,\n ) {\n self._injector = injector;\n }\n\n resolve(routeSnapshot: ActivatedRouteSnapshot, routeStateSnapshot: RouterStateSnapshot): any {\n self._frame.resolveStartSubject.next();\n\n const routeUrl = Framer.buildUrlLink(routeSnapshot);\n const sub = this.router.events.subscribe((event) => {\n if (event instanceof NavigationStart) {\n console.error('Unexpected NavigationStart');\n } else if (event instanceof NavigationEnd) {\n /* tslint:disable:no-console */\n console.info(`Route url for framer ${self.framerIdent} changed to ${routeUrl}`);\n /* tslint:enable:no-console */\n self._frame.routeSnapshot = self.findActivateRouteSnapshot(this.route);\n self._frame.routeUrl = routeUrl;\n self._frame.routeUrlSubject.next(routeUrl);\n self.framerOnResolveRoute();\n self._frame.resolveEndSubject.next();\n } else if (event instanceof NavigationError) {\n self._frame.resolveCancelSubject.next();\n } else if (event instanceof NavigationCancel) {\n self._frame.resolveCancelSubject.next();\n }\n sub.unsubscribe();\n });\n return self._frame;\n }\n }\n\n framing\n .resolve(this.framerIdent, FrameResolver, this.route)\n .provide({\n provide: FrameResolver,\n useFactory: (r: Router, a: ActivatedRoute, i: Injector) => new FrameResolver(r, a, i),\n deps: [ Router, ActivatedRoute, Injector ] });\n }\n }\n\n this._route = undefined; // clear the route so we're not holding any references to its properties\n }\n\n // ========================================\n // constructor\n // ========================================\n\n /**\n * Contructor.\n */\n public constructor(model?: Model, view?: View, controller?: Type<Controller<Model, View>>) {\n this.construct(model, view, controller);\n }\n\n /**\n * Protected construct function for derived construction help.\n */\n protected construct(model?: Model, view?: View, controller?: Type<Controller<Model, View>>): void {\n this._framerId = Framer._nextId++;\n if (this.createFrame) {\n this._frame = new Frame();\n }\n const defaultModel = this.defaultModel;\n this._model = defaultModel ? _.merge(defaultModel, model) : model;\n const defaultView = this.defaultView;\n this._view = defaultView ? _.merge(defaultView, view) : view;\n this._controller = controller || this.defaultController;\n }\n\n /**\n * Protected construct function for derived construction help.\n */\n private findActivateRouteSnapshot(route: ActivatedRoute): ActivatedRouteSnapshot {\n if (!route) {\n console.error('Failed to find activated route snapshot');\n return undefined;\n }\n if (route.snapshot && route.snapshot.data && route.snapshot.data.hasOwnProperty(this.framerIdent)) {\n return route.snapshot;\n }\n return this.findActivateRouteSnapshot(route.firstChild);\n }\n\n /**\n * FUTURE\n */\n // private provideTypeByName(framing: FramingNgModule, name: string, type: any): void {\n // if (type) {\n // framing.provide({ provide: name, useClass: type });\n // /* tslint:disable:no-console */\n // console.info(`Providing ${name} for framer ${this.framerIdent} by name`);\n // /* tslint:enable:no-console */\n // }\n // }\n\n /**\n * FUTURE\n */\n // private provideInstanceByType(framing: FramingNgModule, instance: any): void {\n // if (instance &&\n // (instance as any).__proto__ &&\n // (instance as any).__proto__.constructor &&\n // (instance as any).__proto__.constructor.name !== 'Object') {\n // framing.provide({ provide: (instance as any).__proto__.constructor, useValue: instance });\n // /* tslint:disable:no-console */\n // console.info(`Providing ${(instance as any).__proto__.constructor.name} for framer ${this.framerIdent} by type`);\n // /* tslint:enable:no-console */\n // }\n // }\n\n /**\n * FUTURE\n */\n // private provideValueByName(framing: FramingNgModule, name: string, value: any): void {\n // if (value) {\n // framing.provide({ provide: name, useValue: value });\n // /* tslint:disable:no-console */\n // console.info(`Providing ${name} for framer ${this.framerIdent} by name`);\n // /* tslint:enable:no-console */\n // }\n // }\n\n private addRouteData(framing: FramingNgModule, name: string, value: any): void {\n if (value) {\n const routeConfig = framing.getOrAddRoute(this.route);\n if (routeConfig.data && routeConfig.data[name]) {\n console.warn(`Failed to add ${name} route data for framer ${this.framerIdent}. Data item already exists.`);\n } else {\n framing.datum(name, value, this.route);\n /* tslint:disable:no-console */\n console.info(`Adding ${name} route data for framer ${this.framerIdent}`);\n /* tslint:enable:no-console */\n }\n }\n }\n}\n"],"names":["routeConfig","resolve","containers","key","hasOwnProperty","components","lodash","isArray","_i","components_1","length","component","push","container","this","FramingNgModule","prototype","datum","route","_.merge","data","merge","getOrAddRouteOverload","resolves","declare","declaration","declarations","flattened","concat","apply","_ngModule","uniqWith","reject","isNil","isEqual","declareAndExport","declarationAndExport","declarationsAndExports","exports","declareAndEntryComponent","declarationAndEntryComponent","declarationsAndEntryComponents","entryComponents","entryComponent","export","e","import","i","imports","importAndExport","m","importsAndExports","modules","provide","provider","config","getOrAddRoute","_routeConfig","defaults","forRoot","routes","framers","array","_routes","path","pathMatch","defaultPathMatch","r","buildRouteFramers","buildRoot","inspectModule","_this","forEach","inspectRoute","undefined","redirectTo","isEmpty","children","loadChildren","console","error","self","c","FormsModule","_angular_platformBrowser","BrowserModule","withServerTransition","appId","_angular_forms","_rootComponent","_rootComponentConfig","hybrid","CommonModule","_angular_common","FramingComponentsModule","buildFramers","routes_1","prop","_frame","buildFramer","buildContainers","_loop_2","containers_2","containers_3","containerId","_nextId","id","resolveId","this_2","useFactory","FramingContainerOutletResolver","deps","_angular_core","Injector","routes_2","buildRoute","fullRoutes_1","prefixRoutes_1","warn","RouterModule","routing","_root","_angular_router","extraRootRouterOptions","forChild","result","Framing","ngModuleBuilder","Reflect","decorate","decorators","target","desc","d","Object","defineProperty","__metadata","k","v","metadata","FramingComponentOutletDirective","_view","onComponent","EventEmitter","isActivated","_componentRef","ngOnChanges","changes","activate","ngModuleFactory","_moduleRef","destroy","injector","parentInjector","create","framingComponentOutlet","currentValue","previousValue","ngOnDestroy","deactivate","factory","get","ComponentFactoryResolver","resolveComponentFactory","createComponent","content","emit","changeDetectorRef","detectChanges","remove","indexOf","hostView","clear","Input","Type","Array","Output","NgModuleFactory","selector","ViewContainerRef","__decorate$1","arguments","getOwnPropertyDescriptor","FramingComponentOutletModule","FramingComponentOutletModule_1","withEntryComponents","ngModule","providers","ANALYZE_FOR_ENTRY_COMPONENTS","useValue","multi","__metadata$2","FramingContainerOutletService","router","contentsSubject","rxjs_Rx","ReplaySubject","contents","routeContents","subscriptions","events","subscribe","event","NavigationEnd","onNavigationEnd","asObservable","enumerable","configurable","hasContent","filter","next","clone","newRouteContents","resolveRouteContents","routerState","snapshot","root","newContents","differenceWith","removedContents","containers_1","child","_b","_a","__metadata$1","FramingContainerOutletDirective","_containerService","_router","onComponents","_activated","_subscriptions","__decorate","containerName","framingContainerOutlet","ngOnInit","contents$","onContent","optionalContainer","a","allContents","ref","this_1","activatedIndex","findIndex","splice","view","detach","insert","contents_1","_loop_1","map","useViewInjector","activated","Boolean","Directive","Router","__decorate$4","FramingContainerOutletModule","FramingContainerOutletModule_1","__decorate$5","FramingEmptyParentComponent","template","__decorate$7","NgModule","__decorate$8","FramingRootComponent","Component","Component$1","controller","ChangeDetectorRef","Controller","onResolveCancel","initController","model","frame","_modelSubject","rxjs_BehaviorSubject","BehaviorSubject","_viewSubject","_model$","_view$","_model","_injector","resolveStart$","onResolveStart","resolveEnd$","onResolveEnd","resolveCancel$","onControllerInit","updateModel","replace","assign","updateView","FramerHelper","Framer","framerOnResolveRoute","framerOnControllerInit","runFraming","framing","routeParam","_framed","routeRule","_framing","framerIdent","_controller","provideControllerByType","controllerInstance_1","useClass","multiFramer","defaultController","addFrameToRouteData","addRouteData","framerName","addModelToRouteData","addViewToRouteData","FrameResolver_1","routeSnapshot","resolveStartSubject","routeUrl","buildUrlLink","NavigationStart","info","findActivateRouteSnapshot","routeUrlSubject","resolveEndSubject","NavigationError","resolveCancelSubject","NavigationCancel","sub","unsubscribe","ActivatedRoute","_route","construct","defaultModel","value","name","bootstrap","each","keys","parent","parentRoute","_.each","componentAndDeclare","componentAndDeclaration"],"mappings":";;;;;2/CGsBAmE,EAtBA6D,QAAAC,SAsBAC,WAAAC,OAAAhI,IAAAiI,UAYA,KAAA,GAAArF,GAAAmF,WAAAxH,OAAA,EAAAqC,GAAA,EAAAA,KANAsF,EAAAH,WAAAnF,MAAAoB,GAAA,EAAAe,EAAAmD,EAAAlE,GAAAe,EAAA,EAAAmD,EAAAF,OAAAhI,IAAAgE,GAAAkE,EAAAF,OAAAhI,OAAAgE,EAOA,OAAAe,GAAA,GAAAf,GAAAmE,OAAAC,eAAAJ,OAAAhI,IAAAgE,GAAAA,GAIEqE,WAAF,QAAA,SAAAC,EAAAC,GACA,MAAA,gBAAAV,UAAA,kBAAAA,SAAAW,SACAX,QAAAW,SAAAF,EAAAC,GADA,OAEApG,SAAAsG,gCAAA,WAAA,QAAAA,iCAAAC,OACA/H,KAAA+H,MAAAA,MACA/H,KAAAgI,YAAA,GAAA9B,eAAA+B,aAnBA,MAqBAH,iCAAA5H,UAAAgI,YAAA,WAAA,QAAAlI,KAAAmI,eAAAL,gCAAA5H,UAAAkI,YAAA,SAAAC,SACA,GAAAC,WAAA,CACA,IAAAD,QAAAE,gBAAA,CAKA,GAJAvI,KAAAwI,YACAxI,KAAAwI,WAAAC,UAGAzI,KAAAuI,gBAAA,CACA,GAAAG,UAAA1I,KAAA0I,UAAA1I,KAAA+H,MAAAY,cAEA3I,MAAAwI,WAAAxI,KAAAuI,gBAAAK,OAAAF,cAGA1I,MAAAwI,WAAA5E,MAGQ0E,WAAR,EACAD,QAAAQ,uBAAAC,eAAAT,QAAAQ,uBAAAE,gBAAAT,UAAA,GAGkBA,UACVtI,KAARsI,SAAAtI,KAAA6I,yBAIAf,gCAAA5H,UAAA8I,YAAA,WAEAhJ,KAAAiJ,aACMjJ,KAANwI,YACMxI,KAANwI,WAAAC,WAGAX,gCAAA5H,UAAAoI,SAAA,SAAAzI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