├── .babelrc ├── .editorconfig ├── .gitignore ├── LICENSE.md ├── README.md ├── angular-cli-build.js ├── angular-cli.json ├── build ├── build.js └── build.js.map ├── config ├── environment.dev.ts ├── environment.js ├── environment.prod.ts ├── karma-test-shim.js ├── karma.conf.js └── protractor.conf.js ├── e2e ├── app.e2e-spec.ts ├── app.po.ts ├── tsconfig.json └── typings.d.ts ├── es5 └── tree-shaken.js ├── es6 ├── app │ ├── app.component.js │ ├── app.component.metadata.json │ ├── app.component.ngfactory.js │ ├── app.module.js │ ├── app.module.metadata.json │ ├── app.module.ngfactory.js │ └── treeview │ │ ├── directory.js │ │ ├── tree-view-demo.js │ │ ├── tree-view-demo.metadata.json │ │ ├── tree-view-demo.ngfactory.js │ │ ├── tree-view.js │ │ ├── tree-view.metadata.json │ │ └── tree-view.ngfactory.js ├── main.js └── tree-shaken.js ├── gulpfile.js ├── package.json ├── public └── .npmignore ├── rollup.js ├── server.js ├── src ├── app │ ├── app.component.css │ ├── app.component.css.shim.ts │ ├── app.component.html │ ├── app.component.ngfactory.ts │ ├── app.component.ts │ ├── app.module.ngfactory.ts │ ├── app.module.ts │ ├── index.ts │ ├── tree-view.ngfactory.ts │ └── treeview │ │ ├── directory.js │ │ ├── directory.ts │ │ ├── tree-view-demo.ngfactory.ts │ │ ├── tree-view-demo.ts │ │ ├── tree-view.html │ │ ├── tree-view.ngfactory.ts │ │ └── tree-view.ts ├── favicon.ico ├── index.html ├── main.ts ├── node_modules │ └── @angular │ │ ├── common │ │ ├── index.d.ngfactory.ts │ │ └── src │ │ │ └── forms-deprecated.d.ngfactory.ts │ │ ├── core │ │ └── src │ │ │ └── application_module.d.ngfactory.ts │ │ └── platform-browser │ │ └── src │ │ ├── browser.d.ngfactory.ts │ │ └── worker_app.d.ngfactory.ts ├── system-config.js ├── tsconfig.json └── typings.d.ts ├── tslint.json ├── typings.json └── vendor └── bundle.min.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ "es2015" ] 3 | } -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | end_of_line = lf 9 | insert_final_newline = true 10 | trim_trailing_whitespace = true 11 | 12 | [*.md] 13 | max_line_length = 0 14 | trim_trailing_whitespace = false 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /tmp 6 | 7 | # dependencies 8 | /node_modules 9 | /bower_components 10 | 11 | # IDEs and editors 12 | /.idea 13 | .project 14 | .classpath 15 | *.launch 16 | .settings/ 17 | 18 | # misc 19 | /.sass-cache 20 | /connect.lock 21 | /coverage/* 22 | /libpeerconnection.log 23 | npm-debug.log 24 | testem.log 25 | /typings 26 | 27 | # e2e 28 | /e2e/*.js 29 | /e2e/*.map 30 | 31 | #System Files 32 | .DS_Store 33 | Thumbs.db 34 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Torgeir Helgevold 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # OfflineCompiler 2 | 3 | Compile and start the server: 4 | 5 | SystemJS Builder 6 | 7 | npm run build-with-systemjs-builder 8 | 9 | Rollup (Work in progress) 10 | 11 | npm run build-with-rollup 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /angular-cli-build.js: -------------------------------------------------------------------------------- 1 | // Angular-CLI build configuration 2 | // This file lists all the node_modules files that will be used in a build 3 | // Also see https://github.com/angular/angular-cli/wiki/3rd-party-libs 4 | 5 | /* global require, module */ 6 | 7 | var Angular2App = require('angular-cli/lib/broccoli/angular2-app'); 8 | 9 | module.exports = function(defaults) { 10 | return new Angular2App(defaults, { 11 | vendorNpmFiles: [ 12 | 'systemjs/dist/system-polyfills.js', 13 | 'systemjs/dist/system.src.js', 14 | 'zone.js/dist/**/*.+(js|js.map)', 15 | 'es6-shim/es6-shim.js', 16 | 'reflect-metadata/**/*.+(ts|js|js.map)', 17 | 'rxjs/**/*.+(js|js.map)', 18 | '@angular/**/*.+(js|js.map)' 19 | ] 20 | }); 21 | }; 22 | -------------------------------------------------------------------------------- /angular-cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "project": { 3 | "version": "1.0.0-beta.8", 4 | "name": "offline-compiler" 5 | }, 6 | "apps": [ 7 | { 8 | "main": "src/main.ts", 9 | "tsconfig": "src/tsconfig.json", 10 | "mobile": false 11 | } 12 | ], 13 | "addons": [], 14 | "packages": [], 15 | "e2e": { 16 | "protractor": { 17 | "config": "config/protractor.conf.js" 18 | } 19 | }, 20 | "test": { 21 | "karma": { 22 | "config": "config/karma.conf.js" 23 | } 24 | }, 25 | "defaults": { 26 | "prefix": "app", 27 | "sourceDir": "src", 28 | "styleExt": "css", 29 | "prefixInterfaces": false, 30 | "lazyRoutePrefix": "+" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /config/environment.dev.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: false 3 | }; 4 | -------------------------------------------------------------------------------- /config/environment.js: -------------------------------------------------------------------------------- 1 | // Angular-CLI server configuration 2 | // Unrelated to environment.dev|prod.ts 3 | 4 | /* jshint node: true */ 5 | 6 | module.exports = function(environment) { 7 | return { 8 | environment: environment, 9 | baseURL: '/', 10 | locationType: 'auto' 11 | }; 12 | }; 13 | 14 | -------------------------------------------------------------------------------- /config/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /config/karma-test-shim.js: -------------------------------------------------------------------------------- 1 | // Test shim for Karma, needed to load files via SystemJS 2 | 3 | /*global jasmine, __karma__, window*/ 4 | Error.stackTraceLimit = Infinity; 5 | jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000; 6 | 7 | __karma__.loaded = function () { 8 | }; 9 | 10 | var distPath = '/base/dist/'; 11 | var appPaths = ['app']; //Add all valid source code folders here 12 | 13 | function isJsFile(path) { 14 | return path.slice(-3) == '.js'; 15 | } 16 | 17 | function isSpecFile(path) { 18 | return path.slice(-8) == '.spec.js'; 19 | } 20 | 21 | function isAppFile(path) { 22 | return isJsFile(path) && appPaths.some(function(appPath) { 23 | var fullAppPath = distPath + appPath + '/'; 24 | return path.substr(0, fullAppPath.length) == fullAppPath; 25 | }); 26 | } 27 | 28 | var allSpecFiles = Object.keys(window.__karma__.files) 29 | .filter(isSpecFile) 30 | .filter(isAppFile); 31 | 32 | // Load our SystemJS configuration. 33 | System.config({ 34 | baseURL: distPath 35 | }); 36 | 37 | System.import('system-config.js').then(function() { 38 | // Load and configure the TestComponentBuilder. 39 | return Promise.all([ 40 | System.import('@angular/core/testing'), 41 | System.import('@angular/platform-browser-dynamic/testing') 42 | ]).then(function (providers) { 43 | var testing = providers[0]; 44 | var testingBrowser = providers[1]; 45 | 46 | testing.setBaseTestProviders(testingBrowser.TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS, 47 | testingBrowser.TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS); 48 | }); 49 | }).then(function() { 50 | // Finally, load all spec files. 51 | // This will run the tests directly. 52 | return Promise.all( 53 | allSpecFiles.map(function (moduleName) { 54 | return System.import(moduleName); 55 | })); 56 | }).then(__karma__.start, __karma__.error); -------------------------------------------------------------------------------- /config/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration file, see link for more information 2 | // https://karma-runner.github.io/0.13/config/configuration-file.html 3 | 4 | module.exports = function (config) { 5 | config.set({ 6 | basePath: '..', 7 | frameworks: ['jasmine'], 8 | plugins: [ 9 | require('karma-jasmine'), 10 | require('karma-chrome-launcher') 11 | ], 12 | customLaunchers: { 13 | // chrome setup for travis CI using chromium 14 | Chrome_travis_ci: { 15 | base: 'Chrome', 16 | flags: ['--no-sandbox'] 17 | } 18 | }, 19 | files: [ 20 | { pattern: 'dist/vendor/es6-shim/es6-shim.js', included: true, watched: false }, 21 | { pattern: 'dist/vendor/zone.js/dist/zone.js', included: true, watched: false }, 22 | { pattern: 'dist/vendor/reflect-metadata/Reflect.js', included: true, watched: false }, 23 | { pattern: 'dist/vendor/systemjs/dist/system-polyfills.js', included: true, watched: false }, 24 | { pattern: 'dist/vendor/systemjs/dist/system.src.js', included: true, watched: false }, 25 | { pattern: 'dist/vendor/zone.js/dist/async-test.js', included: true, watched: false }, 26 | { pattern: 'dist/vendor/zone.js/dist/fake-async-test.js', included: true, watched: false }, 27 | 28 | { pattern: 'config/karma-test-shim.js', included: true, watched: true }, 29 | 30 | // Distribution folder. 31 | { pattern: 'dist/**/*', included: false, watched: true } 32 | ], 33 | exclude: [ 34 | // Vendor packages might include spec files. We don't want to use those. 35 | 'dist/vendor/**/*.spec.js' 36 | ], 37 | preprocessors: {}, 38 | reporters: ['progress'], 39 | port: 9876, 40 | colors: true, 41 | logLevel: config.LOG_INFO, 42 | autoWatch: true, 43 | browsers: ['Chrome'], 44 | singleRun: false 45 | }); 46 | }; 47 | -------------------------------------------------------------------------------- /config/protractor.conf.js: -------------------------------------------------------------------------------- 1 | // Protractor configuration file, see link for more information 2 | // https://github.com/angular/protractor/blob/master/docs/referenceConf.js 3 | 4 | /*global jasmine */ 5 | var SpecReporter = require('jasmine-spec-reporter'); 6 | 7 | exports.config = { 8 | allScriptsTimeout: 11000, 9 | specs: [ 10 | '../e2e/**/*.e2e-spec.ts' 11 | ], 12 | capabilities: { 13 | 'browserName': 'chrome' 14 | }, 15 | directConnect: true, 16 | baseUrl: 'http://localhost:4200/', 17 | framework: 'jasmine', 18 | jasmineNodeOpts: { 19 | showColors: true, 20 | defaultTimeoutInterval: 30000, 21 | print: function() {} 22 | }, 23 | useAllAngular2AppRoots: true, 24 | beforeLaunch: function() { 25 | require('ts-node').register({ 26 | project: 'e2e' 27 | }); 28 | }, 29 | onPrepare: function() { 30 | jasmine.getEnv().addReporter(new SpecReporter()); 31 | } 32 | }; 33 | -------------------------------------------------------------------------------- /e2e/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import { OfflineCompilerPage } from './app.po'; 2 | 3 | describe('offline-compiler App', function() { 4 | let page: OfflineCompilerPage; 5 | 6 | beforeEach(() => { 7 | page = new OfflineCompilerPage(); 8 | }); 9 | 10 | it('should display message saying app works', () => { 11 | page.navigateTo(); 12 | expect(page.getParagraphText()).toEqual('app works!'); 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /e2e/app.po.ts: -------------------------------------------------------------------------------- 1 | export class OfflineCompilerPage { 2 | navigateTo() { 3 | return browser.get('/'); 4 | } 5 | 6 | getParagraphText() { 7 | return element(by.css('app-root h1')).getText(); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /e2e/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "declaration": false, 5 | "emitDecoratorMetadata": true, 6 | "experimentalDecorators": true, 7 | "mapRoot": "", 8 | "module": "commonjs", 9 | "moduleResolution": "node", 10 | "noEmitOnError": true, 11 | "noImplicitAny": false, 12 | "rootDir": ".", 13 | "sourceMap": true, 14 | "sourceRoot": "/", 15 | "target": "es5" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /e2e/typings.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /es6/app/app.component.js: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { TreeViewDemo } from './treeview/tree-view-demo'; 3 | export class AppComponent { 4 | constructor() { 5 | this.title = 'Demo'; 6 | } 7 | } 8 | /** @nocollapse */ 9 | AppComponent.decorators = [ 10 | { type: Component, args: [{ 11 | selector: 'app-root', 12 | templateUrl: 'app.component.html', 13 | directives: [TreeViewDemo] 14 | },] }, 15 | ]; 16 | -------------------------------------------------------------------------------- /es6/app/app.component.metadata.json: -------------------------------------------------------------------------------- 1 | {"__symbolic":"module","version":1,"metadata":{"AppComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"app-root","templateUrl":"app.component.html","directives":[{"__symbolic":"reference","module":"./treeview/tree-view-demo","name":"TreeViewDemo"}]}]}]}}} -------------------------------------------------------------------------------- /es6/app/app.component.ngfactory.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is generated by the Angular 2 template compiler. 3 | * Do not edit. 4 | */ 5 | /* tslint:disable */ 6 | import * as import1 from '@angular/core/src/linker/view'; 7 | import * as import2 from '@angular/core/src/linker/element'; 8 | import * as import3 from './app.component'; 9 | import * as import4 from '@angular/core/src/linker/view_utils'; 10 | import * as import6 from '@angular/core/src/linker/view_type'; 11 | import * as import7 from '@angular/core/src/change_detection/change_detection'; 12 | import * as import8 from '@angular/core/src/linker/component_factory'; 13 | import * as import9 from './treeview/tree-view-demo'; 14 | import * as import10 from './treeview/tree-view-demo.ngfactory'; 15 | import * as import11 from '@angular/core/src/metadata/view'; 16 | var renderType_AppComponent_Host = null; 17 | class _View_AppComponent_Host0 extends import1.AppView { 18 | constructor(viewUtils, parentInjector, declarationEl) { 19 | super(_View_AppComponent_Host0, renderType_AppComponent_Host, import6.ViewType.HOST, viewUtils, parentInjector, declarationEl, import7.ChangeDetectorStatus.CheckAlways); 20 | } 21 | createInternal(rootSelector) { 22 | this._el_0 = this.selectOrCreateHostElement('app-root', rootSelector, null); 23 | this._appEl_0 = new import2.AppElement(0, null, this, this._el_0); 24 | var compView_0 = viewFactory_AppComponent0(this.viewUtils, this.injector(0), this._appEl_0); 25 | this._AppComponent_0_4 = new import3.AppComponent(); 26 | this._appEl_0.initComponent(this._AppComponent_0_4, [], compView_0); 27 | compView_0.create(this._AppComponent_0_4, this.projectableNodes, null); 28 | this.init([].concat([this._el_0]), [this._el_0], [], []); 29 | return this._appEl_0; 30 | } 31 | injectorGetInternal(token, requestNodeIndex, notFoundResult) { 32 | if (((token === import3.AppComponent) && (0 === requestNodeIndex))) { 33 | return this._AppComponent_0_4; 34 | } 35 | return notFoundResult; 36 | } 37 | } 38 | function viewFactory_AppComponent_Host0(viewUtils, parentInjector, declarationEl) { 39 | if ((renderType_AppComponent_Host === null)) { 40 | (renderType_AppComponent_Host = viewUtils.createRenderComponentType('', 0, null, [], {})); 41 | } 42 | return new _View_AppComponent_Host0(viewUtils, parentInjector, declarationEl); 43 | } 44 | export const AppComponentNgFactory = new import8.ComponentFactory('app-root', viewFactory_AppComponent_Host0, import3.AppComponent); 45 | const styles_AppComponent = []; 46 | var renderType_AppComponent = null; 47 | class _View_AppComponent0 extends import1.AppView { 48 | constructor(viewUtils, parentInjector, declarationEl) { 49 | super(_View_AppComponent0, renderType_AppComponent, import6.ViewType.COMPONENT, viewUtils, parentInjector, declarationEl, import7.ChangeDetectorStatus.CheckAlways); 50 | } 51 | createInternal(rootSelector) { 52 | const parentRenderNode = this.renderer.createViewRoot(this.declarationAppElement.nativeElement); 53 | this._el_0 = this.renderer.createElement(parentRenderNode, 'h1', null); 54 | this._text_1 = this.renderer.createText(this._el_0, '', null); 55 | this._text_2 = this.renderer.createText(parentRenderNode, '\n\n', null); 56 | this._el_3 = this.renderer.createElement(parentRenderNode, 'treeview', null); 57 | this._appEl_3 = new import2.AppElement(3, null, this, this._el_3); 58 | var compView_3 = import10.viewFactory_TreeViewDemo0(this.viewUtils, this.injector(3), this._appEl_3); 59 | this._TreeViewDemo_3_4 = new import9.TreeViewDemo(); 60 | this._appEl_3.initComponent(this._TreeViewDemo_3_4, [], compView_3); 61 | compView_3.create(this._TreeViewDemo_3_4, [], null); 62 | this._expr_0 = import7.UNINITIALIZED; 63 | this.init([], [ 64 | this._el_0, 65 | this._text_1, 66 | this._text_2, 67 | this._el_3 68 | ], [], []); 69 | return null; 70 | } 71 | injectorGetInternal(token, requestNodeIndex, notFoundResult) { 72 | if (((token === import9.TreeViewDemo) && (3 === requestNodeIndex))) { 73 | return this._TreeViewDemo_3_4; 74 | } 75 | return notFoundResult; 76 | } 77 | detectChangesInternal(throwOnChange) { 78 | this.detectContentChildrenChanges(throwOnChange); 79 | const currVal_0 = import4.interpolate(1, '\n ', this.context.title, '\n'); 80 | if (import4.checkBinding(throwOnChange, this._expr_0, currVal_0)) { 81 | this.renderer.setText(this._text_1, currVal_0); 82 | this._expr_0 = currVal_0; 83 | } 84 | this.detectViewChildrenChanges(throwOnChange); 85 | } 86 | } 87 | export function viewFactory_AppComponent0(viewUtils, parentInjector, declarationEl) { 88 | if ((renderType_AppComponent === null)) { 89 | (renderType_AppComponent = viewUtils.createRenderComponentType('/Users/tor/Development/angular2-offline-compiler/src/app/app.component.html', 0, import11.ViewEncapsulation.None, styles_AppComponent, {})); 90 | } 91 | return new _View_AppComponent0(viewUtils, parentInjector, declarationEl); 92 | } 93 | -------------------------------------------------------------------------------- /es6/app/app.module.js: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { BrowserModule } from '@angular/platform-browser'; 3 | import { AppComponent } from './app.component'; 4 | import { TreeViewDemo } from './treeview/tree-view-demo'; 5 | import { TreeView } from './treeview/tree-view'; 6 | export class AppModule { 7 | } 8 | /** @nocollapse */ 9 | AppModule.decorators = [ 10 | { type: NgModule, args: [{ 11 | imports: [BrowserModule], 12 | declarations: [AppComponent, TreeViewDemo, TreeView], 13 | bootstrap: [AppComponent] 14 | },] }, 15 | ]; 16 | -------------------------------------------------------------------------------- /es6/app/app.module.metadata.json: -------------------------------------------------------------------------------- 1 | {"__symbolic":"module","version":1,"metadata":{"AppModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/platform-browser","name":"BrowserModule"}],"declarations":[{"__symbolic":"reference","module":"./app.component","name":"AppComponent"},{"__symbolic":"reference","module":"./treeview/tree-view-demo","name":"TreeViewDemo"},{"__symbolic":"reference","module":"./treeview/tree-view","name":"TreeView"}],"bootstrap":[{"__symbolic":"reference","module":"./app.component","name":"AppComponent"}]}]}]}}} -------------------------------------------------------------------------------- /es6/app/app.module.ngfactory.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is generated by the Angular 2 template compiler. 3 | * Do not edit. 4 | */ 5 | /* tslint:disable */ 6 | import * as import0 from '@angular/core/src/linker/ng_module_factory'; 7 | import * as import1 from './app.module'; 8 | import * as import2 from '@angular/common/index'; 9 | import * as import3 from '@angular/core/src/application_module'; 10 | import * as import4 from '@angular/platform-browser/src/browser'; 11 | import * as import5 from '@angular/core/src/application_init'; 12 | import * as import6 from '@angular/core/src/testability/testability'; 13 | import * as import7 from '@angular/core/src/application_ref'; 14 | import * as import8 from '@angular/core/src/linker/compiler'; 15 | import * as import9 from '@angular/platform-browser/src/dom/events/hammer_gestures'; 16 | import * as import10 from '@angular/platform-browser/src/dom/events/event_manager'; 17 | import * as import11 from '@angular/platform-browser/src/dom/shared_styles_host'; 18 | import * as import12 from '@angular/platform-browser/src/dom/dom_renderer'; 19 | import * as import13 from '@angular/platform-browser/src/security/dom_sanitization_service'; 20 | import * as import14 from '@angular/core/src/linker/view_utils'; 21 | import * as import15 from '@angular/core/src/linker/dynamic_component_loader'; 22 | import * as import17 from './app.component.ngfactory'; 23 | import * as import18 from '@angular/core/src/application_tokens'; 24 | import * as import19 from '@angular/platform-browser/src/dom/events/dom_events'; 25 | import * as import20 from '@angular/platform-browser/src/dom/events/key_events'; 26 | import * as import21 from '@angular/core/src/zone/ng_zone'; 27 | import * as import22 from '@angular/platform-browser/src/dom/debug/ng_probe'; 28 | import * as import23 from '@angular/core/src/console'; 29 | import * as import24 from '@angular/core/src/facade/exception_handler'; 30 | import * as import25 from '@angular/core/src/linker/component_resolver'; 31 | import * as import26 from '@angular/platform-browser/src/dom/dom_tokens'; 32 | import * as import27 from '@angular/platform-browser/src/dom/animation_driver'; 33 | import * as import28 from '@angular/core/src/render/api'; 34 | import * as import29 from '@angular/core/src/security'; 35 | import * as import30 from '@angular/core/src/change_detection/differs/iterable_differs'; 36 | import * as import31 from '@angular/core/src/change_detection/differs/keyvalue_differs'; 37 | class AppModuleInjector extends import0.NgModuleInjector { 38 | constructor(parent) { 39 | super(parent, [import17.AppComponentNgFactory], [import17.AppComponentNgFactory]); 40 | } 41 | get _ApplicationRef_8() { 42 | if ((this.__ApplicationRef_8 == null)) { 43 | (this.__ApplicationRef_8 = this._ApplicationRef__7); 44 | } 45 | return this.__ApplicationRef_8; 46 | } 47 | get _Compiler_9() { 48 | if ((this.__Compiler_9 == null)) { 49 | (this.__Compiler_9 = new import8.Compiler()); 50 | } 51 | return this.__Compiler_9; 52 | } 53 | get _ComponentResolver_10() { 54 | if ((this.__ComponentResolver_10 == null)) { 55 | (this.__ComponentResolver_10 = this._Compiler_9); 56 | } 57 | return this.__ComponentResolver_10; 58 | } 59 | get _APP_ID_11() { 60 | if ((this.__APP_ID_11 == null)) { 61 | (this.__APP_ID_11 = import18._appIdRandomProviderFactory()); 62 | } 63 | return this.__APP_ID_11; 64 | } 65 | get _DOCUMENT_12() { 66 | if ((this.__DOCUMENT_12 == null)) { 67 | (this.__DOCUMENT_12 = import4._document()); 68 | } 69 | return this.__DOCUMENT_12; 70 | } 71 | get _HAMMER_GESTURE_CONFIG_13() { 72 | if ((this.__HAMMER_GESTURE_CONFIG_13 == null)) { 73 | (this.__HAMMER_GESTURE_CONFIG_13 = new import9.HammerGestureConfig()); 74 | } 75 | return this.__HAMMER_GESTURE_CONFIG_13; 76 | } 77 | get _EVENT_MANAGER_PLUGINS_14() { 78 | if ((this.__EVENT_MANAGER_PLUGINS_14 == null)) { 79 | (this.__EVENT_MANAGER_PLUGINS_14 = [ 80 | new import19.DomEventsPlugin(), 81 | new import20.KeyEventsPlugin(), 82 | new import9.HammerGesturesPlugin(this._HAMMER_GESTURE_CONFIG_13) 83 | ]); 84 | } 85 | return this.__EVENT_MANAGER_PLUGINS_14; 86 | } 87 | get _EventManager_15() { 88 | if ((this.__EventManager_15 == null)) { 89 | (this.__EventManager_15 = new import10.EventManager(this._EVENT_MANAGER_PLUGINS_14, this.parent.get(import21.NgZone))); 90 | } 91 | return this.__EventManager_15; 92 | } 93 | get _DomSharedStylesHost_16() { 94 | if ((this.__DomSharedStylesHost_16 == null)) { 95 | (this.__DomSharedStylesHost_16 = new import11.DomSharedStylesHost(this._DOCUMENT_12)); 96 | } 97 | return this.__DomSharedStylesHost_16; 98 | } 99 | get _AnimationDriver_17() { 100 | if ((this.__AnimationDriver_17 == null)) { 101 | (this.__AnimationDriver_17 = import4._resolveDefaultAnimationDriver()); 102 | } 103 | return this.__AnimationDriver_17; 104 | } 105 | get _DomRootRenderer_18() { 106 | if ((this.__DomRootRenderer_18 == null)) { 107 | (this.__DomRootRenderer_18 = new import12.DomRootRenderer_(this._DOCUMENT_12, this._EventManager_15, this._DomSharedStylesHost_16, this._AnimationDriver_17)); 108 | } 109 | return this.__DomRootRenderer_18; 110 | } 111 | get _RootRenderer_19() { 112 | if ((this.__RootRenderer_19 == null)) { 113 | (this.__RootRenderer_19 = import22._createConditionalRootRenderer(this._DomRootRenderer_18)); 114 | } 115 | return this.__RootRenderer_19; 116 | } 117 | get _DomSanitizationService_20() { 118 | if ((this.__DomSanitizationService_20 == null)) { 119 | (this.__DomSanitizationService_20 = new import13.DomSanitizationServiceImpl()); 120 | } 121 | return this.__DomSanitizationService_20; 122 | } 123 | get _SanitizationService_21() { 124 | if ((this.__SanitizationService_21 == null)) { 125 | (this.__SanitizationService_21 = this._DomSanitizationService_20); 126 | } 127 | return this.__SanitizationService_21; 128 | } 129 | get _ViewUtils_22() { 130 | if ((this.__ViewUtils_22 == null)) { 131 | (this.__ViewUtils_22 = new import14.ViewUtils(this._RootRenderer_19, this._APP_ID_11, this._SanitizationService_21)); 132 | } 133 | return this.__ViewUtils_22; 134 | } 135 | get _IterableDiffers_23() { 136 | if ((this.__IterableDiffers_23 == null)) { 137 | (this.__IterableDiffers_23 = import3._iterableDiffersFactory()); 138 | } 139 | return this.__IterableDiffers_23; 140 | } 141 | get _KeyValueDiffers_24() { 142 | if ((this.__KeyValueDiffers_24 == null)) { 143 | (this.__KeyValueDiffers_24 = import3._keyValueDiffersFactory()); 144 | } 145 | return this.__KeyValueDiffers_24; 146 | } 147 | get _DynamicComponentLoader_25() { 148 | if ((this.__DynamicComponentLoader_25 == null)) { 149 | (this.__DynamicComponentLoader_25 = new import15.DynamicComponentLoader_(this._Compiler_9)); 150 | } 151 | return this.__DynamicComponentLoader_25; 152 | } 153 | get _SharedStylesHost_26() { 154 | if ((this.__SharedStylesHost_26 == null)) { 155 | (this.__SharedStylesHost_26 = this._DomSharedStylesHost_16); 156 | } 157 | return this.__SharedStylesHost_26; 158 | } 159 | createInternal() { 160 | this._CommonModule_0 = new import2.CommonModule(); 161 | this._ApplicationModule_1 = new import3.ApplicationModule(); 162 | this._BrowserModule_2 = new import4.BrowserModule(); 163 | this._AppModule_3 = new import1.AppModule(); 164 | this._ExceptionHandler_4 = import4._exceptionHandler(); 165 | this._ApplicationInitStatus_5 = new import5.ApplicationInitStatus(this.parent.get(import5.APP_INITIALIZER, null)); 166 | this._Testability_6 = new import6.Testability(this.parent.get(import21.NgZone)); 167 | this._ApplicationRef__7 = new import7.ApplicationRef_(this.parent.get(import21.NgZone), this.parent.get(import23.Console), this, this._ExceptionHandler_4, this, this._ApplicationInitStatus_5, this.parent.get(import6.TestabilityRegistry, null), this._Testability_6); 168 | return this._AppModule_3; 169 | } 170 | getInternal(token, notFoundResult) { 171 | if ((token === import2.CommonModule)) { 172 | return this._CommonModule_0; 173 | } 174 | if ((token === import3.ApplicationModule)) { 175 | return this._ApplicationModule_1; 176 | } 177 | if ((token === import4.BrowserModule)) { 178 | return this._BrowserModule_2; 179 | } 180 | if ((token === import1.AppModule)) { 181 | return this._AppModule_3; 182 | } 183 | if ((token === import24.ExceptionHandler)) { 184 | return this._ExceptionHandler_4; 185 | } 186 | if ((token === import5.ApplicationInitStatus)) { 187 | return this._ApplicationInitStatus_5; 188 | } 189 | if ((token === import6.Testability)) { 190 | return this._Testability_6; 191 | } 192 | if ((token === import7.ApplicationRef_)) { 193 | return this._ApplicationRef__7; 194 | } 195 | if ((token === import7.ApplicationRef)) { 196 | return this._ApplicationRef_8; 197 | } 198 | if ((token === import8.Compiler)) { 199 | return this._Compiler_9; 200 | } 201 | if ((token === import25.ComponentResolver)) { 202 | return this._ComponentResolver_10; 203 | } 204 | if ((token === import18.APP_ID)) { 205 | return this._APP_ID_11; 206 | } 207 | if ((token === import26.DOCUMENT)) { 208 | return this._DOCUMENT_12; 209 | } 210 | if ((token === import9.HAMMER_GESTURE_CONFIG)) { 211 | return this._HAMMER_GESTURE_CONFIG_13; 212 | } 213 | if ((token === import10.EVENT_MANAGER_PLUGINS)) { 214 | return this._EVENT_MANAGER_PLUGINS_14; 215 | } 216 | if ((token === import10.EventManager)) { 217 | return this._EventManager_15; 218 | } 219 | if ((token === import11.DomSharedStylesHost)) { 220 | return this._DomSharedStylesHost_16; 221 | } 222 | if ((token === import27.AnimationDriver)) { 223 | return this._AnimationDriver_17; 224 | } 225 | if ((token === import12.DomRootRenderer)) { 226 | return this._DomRootRenderer_18; 227 | } 228 | if ((token === import28.RootRenderer)) { 229 | return this._RootRenderer_19; 230 | } 231 | if ((token === import13.DomSanitizationService)) { 232 | return this._DomSanitizationService_20; 233 | } 234 | if ((token === import29.SanitizationService)) { 235 | return this._SanitizationService_21; 236 | } 237 | if ((token === import14.ViewUtils)) { 238 | return this._ViewUtils_22; 239 | } 240 | if ((token === import30.IterableDiffers)) { 241 | return this._IterableDiffers_23; 242 | } 243 | if ((token === import31.KeyValueDiffers)) { 244 | return this._KeyValueDiffers_24; 245 | } 246 | if ((token === import15.DynamicComponentLoader)) { 247 | return this._DynamicComponentLoader_25; 248 | } 249 | if ((token === import11.SharedStylesHost)) { 250 | return this._SharedStylesHost_26; 251 | } 252 | return notFoundResult; 253 | } 254 | destroyInternal() { 255 | this._ApplicationRef__7.ngOnDestroy(); 256 | } 257 | } 258 | export const AppModuleNgFactory = new import0.NgModuleFactory(AppModuleInjector, import1.AppModule); 259 | -------------------------------------------------------------------------------- /es6/app/treeview/directory.js: -------------------------------------------------------------------------------- 1 | export class Directory { 2 | constructor(name, directories, files) { 3 | this.name = name; 4 | this.directories = directories; 5 | this.files = files; 6 | this.expanded = true; 7 | this.checked = false; 8 | } 9 | toggle() { 10 | this.expanded = !this.expanded; 11 | } 12 | getIcon() { 13 | if (this.expanded) { 14 | return '-'; 15 | } 16 | return '+'; 17 | } 18 | check() { 19 | this.checked = !this.checked; 20 | this.checkRecursive(this.checked); 21 | } 22 | checkRecursive(state) { 23 | this.directories.forEach(d => { 24 | d.checked = state; 25 | d.checkRecursive(state); 26 | }); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /es6/app/treeview/tree-view-demo.js: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { TreeView } from './tree-view'; 3 | import { Directory } from './directory'; 4 | export class TreeViewDemo { 5 | constructor() { 6 | this.loadDirectories(); 7 | } 8 | loadDirectories() { 9 | const fall2014 = new Directory('Fall 2014', [], ['image1.jpg', 'image2.jpg', 'image3.jpg']); 10 | const summer2014 = new Directory('Summer 2014', [], ['image10.jpg', 'image20.jpg', 'image30.jpg']); 11 | const pics = new Directory('Pictures', [summer2014, fall2014], []); 12 | const music = new Directory('Music', [], ['song1.mp3', 'song2.mp3']); 13 | this.directories = [pics, music]; 14 | } 15 | } 16 | /** @nocollapse */ 17 | TreeViewDemo.decorators = [ 18 | { type: Component, args: [{ 19 | selector: 'treeview', 20 | template: '

Recursive TreeView

' + 21 | '

Read more here

', 22 | directives: [TreeView] 23 | },] }, 24 | ]; 25 | /** @nocollapse */ 26 | TreeViewDemo.ctorParameters = []; 27 | -------------------------------------------------------------------------------- /es6/app/treeview/tree-view-demo.metadata.json: -------------------------------------------------------------------------------- 1 | {"__symbolic":"module","version":1,"metadata":{"TreeViewDemo":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"treeview","template":"

Recursive TreeView

Read more here

","directives":[{"__symbolic":"reference","module":"./tree-view","name":"TreeView"}]}]}],"members":{"__ctor__":[{"__symbolic":"constructor"}],"loadDirectories":[{"__symbolic":"method"}]}}}} -------------------------------------------------------------------------------- /es6/app/treeview/tree-view-demo.ngfactory.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is generated by the Angular 2 template compiler. 3 | * Do not edit. 4 | */ 5 | /* tslint:disable */ 6 | import * as import1 from '@angular/core/src/linker/view'; 7 | import * as import2 from '@angular/core/src/linker/element'; 8 | import * as import3 from './tree-view-demo'; 9 | import * as import4 from '@angular/core/src/linker/view_utils'; 10 | import * as import6 from '@angular/core/src/linker/view_type'; 11 | import * as import7 from '@angular/core/src/change_detection/change_detection'; 12 | import * as import8 from '@angular/core/src/linker/component_factory'; 13 | import * as import9 from './tree-view'; 14 | import * as import10 from './tree-view.ngfactory'; 15 | import * as import11 from '@angular/core/src/metadata/view'; 16 | var renderType_TreeViewDemo_Host = null; 17 | class _View_TreeViewDemo_Host0 extends import1.AppView { 18 | constructor(viewUtils, parentInjector, declarationEl) { 19 | super(_View_TreeViewDemo_Host0, renderType_TreeViewDemo_Host, import6.ViewType.HOST, viewUtils, parentInjector, declarationEl, import7.ChangeDetectorStatus.CheckAlways); 20 | } 21 | createInternal(rootSelector) { 22 | this._el_0 = this.selectOrCreateHostElement('treeview', rootSelector, null); 23 | this._appEl_0 = new import2.AppElement(0, null, this, this._el_0); 24 | var compView_0 = viewFactory_TreeViewDemo0(this.viewUtils, this.injector(0), this._appEl_0); 25 | this._TreeViewDemo_0_4 = new import3.TreeViewDemo(); 26 | this._appEl_0.initComponent(this._TreeViewDemo_0_4, [], compView_0); 27 | compView_0.create(this._TreeViewDemo_0_4, this.projectableNodes, null); 28 | this.init([].concat([this._el_0]), [this._el_0], [], []); 29 | return this._appEl_0; 30 | } 31 | injectorGetInternal(token, requestNodeIndex, notFoundResult) { 32 | if (((token === import3.TreeViewDemo) && (0 === requestNodeIndex))) { 33 | return this._TreeViewDemo_0_4; 34 | } 35 | return notFoundResult; 36 | } 37 | } 38 | function viewFactory_TreeViewDemo_Host0(viewUtils, parentInjector, declarationEl) { 39 | if ((renderType_TreeViewDemo_Host === null)) { 40 | (renderType_TreeViewDemo_Host = viewUtils.createRenderComponentType('', 0, null, [], {})); 41 | } 42 | return new _View_TreeViewDemo_Host0(viewUtils, parentInjector, declarationEl); 43 | } 44 | export const TreeViewDemoNgFactory = new import8.ComponentFactory('treeview', viewFactory_TreeViewDemo_Host0, import3.TreeViewDemo); 45 | const styles_TreeViewDemo = []; 46 | var renderType_TreeViewDemo = null; 47 | class _View_TreeViewDemo0 extends import1.AppView { 48 | constructor(viewUtils, parentInjector, declarationEl) { 49 | super(_View_TreeViewDemo0, renderType_TreeViewDemo, import6.ViewType.COMPONENT, viewUtils, parentInjector, declarationEl, import7.ChangeDetectorStatus.CheckAlways); 50 | } 51 | createInternal(rootSelector) { 52 | const parentRenderNode = this.renderer.createViewRoot(this.declarationAppElement.nativeElement); 53 | this._el_0 = this.renderer.createElement(parentRenderNode, 'h1', null); 54 | this._text_1 = this.renderer.createText(this._el_0, 'Recursive TreeView', null); 55 | this._el_2 = this.renderer.createElement(parentRenderNode, 'tree-view', null); 56 | this._appEl_2 = new import2.AppElement(2, null, this, this._el_2); 57 | var compView_2 = import10.viewFactory_TreeView0(this.viewUtils, this.injector(2), this._appEl_2); 58 | this._TreeView_2_4 = new import9.TreeView(); 59 | this._appEl_2.initComponent(this._TreeView_2_4, [], compView_2); 60 | compView_2.create(this._TreeView_2_4, [], null); 61 | this._text_3 = this.renderer.createText(parentRenderNode, ' ', null); 62 | this._el_4 = this.renderer.createElement(parentRenderNode, 'h4', null); 63 | this._el_5 = this.renderer.createElement(this._el_4, 'a', null); 64 | this.renderer.setElementAttribute(this._el_5, 'href', 'http://www.syntaxsuccess.com/viewarticle/recursive-treeview-in-angular-2.0'); 65 | this._text_6 = this.renderer.createText(this._el_5, 'Read more here', null); 66 | this._expr_0 = import7.UNINITIALIZED; 67 | this.init([], [ 68 | this._el_0, 69 | this._text_1, 70 | this._el_2, 71 | this._text_3, 72 | this._el_4, 73 | this._el_5, 74 | this._text_6 75 | ], [], []); 76 | return null; 77 | } 78 | injectorGetInternal(token, requestNodeIndex, notFoundResult) { 79 | if (((token === import9.TreeView) && (2 === requestNodeIndex))) { 80 | return this._TreeView_2_4; 81 | } 82 | return notFoundResult; 83 | } 84 | detectChangesInternal(throwOnChange) { 85 | const currVal_0 = this.context.directories; 86 | if (import4.checkBinding(throwOnChange, this._expr_0, currVal_0)) { 87 | this._TreeView_2_4.directories = currVal_0; 88 | this._expr_0 = currVal_0; 89 | } 90 | this.detectContentChildrenChanges(throwOnChange); 91 | this.detectViewChildrenChanges(throwOnChange); 92 | } 93 | } 94 | export function viewFactory_TreeViewDemo0(viewUtils, parentInjector, declarationEl) { 95 | if ((renderType_TreeViewDemo === null)) { 96 | (renderType_TreeViewDemo = viewUtils.createRenderComponentType('/Users/tor/Development/angular2-offline-compiler/src/app/treeview/tree-view-demo.ts class TreeViewDemo - inline template', 0, import11.ViewEncapsulation.None, styles_TreeViewDemo, {})); 97 | } 98 | return new _View_TreeViewDemo0(viewUtils, parentInjector, declarationEl); 99 | } 100 | -------------------------------------------------------------------------------- /es6/app/treeview/tree-view.js: -------------------------------------------------------------------------------- 1 | import { Component, Input } from '@angular/core'; 2 | import { NgIf, NgFor } from '@angular/common'; 3 | export class TreeView { 4 | } 5 | /** @nocollapse */ 6 | TreeView.decorators = [ 7 | { type: Component, args: [{ 8 | selector: 'tree-view', 9 | templateUrl: './tree-view.html', 10 | directives: [TreeView, NgIf, NgFor] 11 | },] }, 12 | ]; 13 | /** @nocollapse */ 14 | TreeView.propDecorators = { 15 | 'directories': [{ type: Input },], 16 | }; 17 | -------------------------------------------------------------------------------- /es6/app/treeview/tree-view.metadata.json: -------------------------------------------------------------------------------- 1 | {"__symbolic":"module","version":1,"metadata":{"TreeView":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"tree-view","templateUrl":"./tree-view.html","directives":[{"__symbolic":"reference","name":"TreeView"},{"__symbolic":"reference","module":"@angular/common","name":"NgIf"},{"__symbolic":"reference","module":"@angular/common","name":"NgFor"}]}]}],"members":{"directories":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}]}}}} -------------------------------------------------------------------------------- /es6/app/treeview/tree-view.ngfactory.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is generated by the Angular 2 template compiler. 3 | * Do not edit. 4 | */ 5 | /* tslint:disable */ 6 | import * as import1 from '@angular/core/src/linker/view'; 7 | import * as import2 from '@angular/core/src/linker/element'; 8 | import * as import3 from './tree-view'; 9 | import * as import4 from '@angular/core/src/linker/view_utils'; 10 | import * as import6 from '@angular/core/src/linker/view_type'; 11 | import * as import7 from '@angular/core/src/change_detection/change_detection'; 12 | import * as import8 from '@angular/core/src/linker/component_factory'; 13 | import * as import9 from '@angular/common/src/directives/ng_for'; 14 | import * as import10 from '@angular/core/src/linker/template_ref'; 15 | import * as import11 from '@angular/core/src/change_detection/differs/iterable_differs'; 16 | import * as import12 from '@angular/core/src/metadata/view'; 17 | import * as import13 from '@angular/common/src/directives/ng_if'; 18 | var renderType_TreeView_Host = null; 19 | class _View_TreeView_Host0 extends import1.AppView { 20 | constructor(viewUtils, parentInjector, declarationEl) { 21 | super(_View_TreeView_Host0, renderType_TreeView_Host, import6.ViewType.HOST, viewUtils, parentInjector, declarationEl, import7.ChangeDetectorStatus.CheckAlways); 22 | } 23 | createInternal(rootSelector) { 24 | this._el_0 = this.selectOrCreateHostElement('tree-view', rootSelector, null); 25 | this._appEl_0 = new import2.AppElement(0, null, this, this._el_0); 26 | var compView_0 = viewFactory_TreeView0(this.viewUtils, this.injector(0), this._appEl_0); 27 | this._TreeView_0_4 = new import3.TreeView(); 28 | this._appEl_0.initComponent(this._TreeView_0_4, [], compView_0); 29 | compView_0.create(this._TreeView_0_4, this.projectableNodes, null); 30 | this.init([].concat([this._el_0]), [this._el_0], [], []); 31 | return this._appEl_0; 32 | } 33 | injectorGetInternal(token, requestNodeIndex, notFoundResult) { 34 | if (((token === import3.TreeView) && (0 === requestNodeIndex))) { 35 | return this._TreeView_0_4; 36 | } 37 | return notFoundResult; 38 | } 39 | } 40 | function viewFactory_TreeView_Host0(viewUtils, parentInjector, declarationEl) { 41 | if ((renderType_TreeView_Host === null)) { 42 | (renderType_TreeView_Host = viewUtils.createRenderComponentType('', 0, null, [], {})); 43 | } 44 | return new _View_TreeView_Host0(viewUtils, parentInjector, declarationEl); 45 | } 46 | export const TreeViewNgFactory = new import8.ComponentFactory('tree-view', viewFactory_TreeView_Host0, import3.TreeView); 47 | const styles_TreeView = []; 48 | var renderType_TreeView = null; 49 | class _View_TreeView0 extends import1.AppView { 50 | constructor(viewUtils, parentInjector, declarationEl) { 51 | super(_View_TreeView0, renderType_TreeView, import6.ViewType.COMPONENT, viewUtils, parentInjector, declarationEl, import7.ChangeDetectorStatus.CheckAlways); 52 | } 53 | createInternal(rootSelector) { 54 | const parentRenderNode = this.renderer.createViewRoot(this.declarationAppElement.nativeElement); 55 | this._el_0 = this.renderer.createElement(parentRenderNode, 'ul', null); 56 | this._text_1 = this.renderer.createText(this._el_0, '\n ', null); 57 | this._anchor_2 = this.renderer.createTemplateAnchor(this._el_0, null); 58 | this._appEl_2 = new import2.AppElement(2, 0, this, this._anchor_2); 59 | this._TemplateRef_2_5 = new import10.TemplateRef_(this._appEl_2, viewFactory_TreeView1); 60 | this._NgFor_2_6 = new import9.NgFor(this._appEl_2.vcRef, this._TemplateRef_2_5, this.parentInjector.get(import11.IterableDiffers), this.ref); 61 | this._text_3 = this.renderer.createText(this._el_0, '\n', null); 62 | this._text_4 = this.renderer.createText(parentRenderNode, '\n\n', null); 63 | this._expr_0 = import7.UNINITIALIZED; 64 | this.init([], [ 65 | this._el_0, 66 | this._text_1, 67 | this._anchor_2, 68 | this._text_3, 69 | this._text_4 70 | ], [], []); 71 | return null; 72 | } 73 | injectorGetInternal(token, requestNodeIndex, notFoundResult) { 74 | if (((token === import10.TemplateRef) && (2 === requestNodeIndex))) { 75 | return this._TemplateRef_2_5; 76 | } 77 | if (((token === import9.NgFor) && (2 === requestNodeIndex))) { 78 | return this._NgFor_2_6; 79 | } 80 | return notFoundResult; 81 | } 82 | detectChangesInternal(throwOnChange) { 83 | var changes = null; 84 | changes = null; 85 | const currVal_0 = this.context.directories; 86 | if (import4.checkBinding(throwOnChange, this._expr_0, currVal_0)) { 87 | this._NgFor_2_6.ngForOf = currVal_0; 88 | if ((changes === null)) { 89 | (changes = {}); 90 | } 91 | changes['ngForOf'] = new import7.SimpleChange(this._expr_0, currVal_0); 92 | this._expr_0 = currVal_0; 93 | } 94 | if ((changes !== null)) { 95 | this._NgFor_2_6.ngOnChanges(changes); 96 | } 97 | if (!throwOnChange) { 98 | this._NgFor_2_6.ngDoCheck(); 99 | } 100 | this.detectContentChildrenChanges(throwOnChange); 101 | this.detectViewChildrenChanges(throwOnChange); 102 | } 103 | } 104 | export function viewFactory_TreeView0(viewUtils, parentInjector, declarationEl) { 105 | if ((renderType_TreeView === null)) { 106 | (renderType_TreeView = viewUtils.createRenderComponentType('/Users/tor/Development/angular2-offline-compiler/src/app/treeview/tree-view.html', 0, import12.ViewEncapsulation.None, styles_TreeView, {})); 107 | } 108 | return new _View_TreeView0(viewUtils, parentInjector, declarationEl); 109 | } 110 | class _View_TreeView1 extends import1.AppView { 111 | constructor(viewUtils, parentInjector, declarationEl) { 112 | super(_View_TreeView1, renderType_TreeView, import6.ViewType.EMBEDDED, viewUtils, parentInjector, declarationEl, import7.ChangeDetectorStatus.CheckAlways); 113 | } 114 | createInternal(rootSelector) { 115 | this._el_0 = this.renderer.createElement(null, 'li', null); 116 | this._text_1 = this.renderer.createText(this._el_0, '\n ', null); 117 | this._el_2 = this.renderer.createElement(this._el_0, 'span', null); 118 | this.renderer.setElementAttribute(this._el_2, 'class', 'iconButton'); 119 | this._text_3 = this.renderer.createText(this._el_2, '', null); 120 | this._el_4 = this.renderer.createElement(this._el_0, 'input', null); 121 | this.renderer.setElementAttribute(this._el_4, 'type', 'checkbox'); 122 | this._text_5 = this.renderer.createText(this._el_0, '', null); 123 | this._anchor_6 = this.renderer.createTemplateAnchor(this._el_0, null); 124 | this._appEl_6 = new import2.AppElement(6, 0, this, this._anchor_6); 125 | this._TemplateRef_6_5 = new import10.TemplateRef_(this._appEl_6, viewFactory_TreeView2); 126 | this._NgIf_6_6 = new import13.NgIf(this._appEl_6.vcRef, this._TemplateRef_6_5); 127 | this._text_7 = this.renderer.createText(this._el_0, '\n ', null); 128 | var disposable_0 = this.renderer.listen(this._el_2, 'click', this.eventHandler(this._handle_click_2_0.bind(this))); 129 | this._expr_1 = import7.UNINITIALIZED; 130 | this._expr_3 = import7.UNINITIALIZED; 131 | var disposable_1 = this.renderer.listen(this._el_4, 'click', this.eventHandler(this._handle_click_4_0.bind(this))); 132 | this._expr_4 = import7.UNINITIALIZED; 133 | this._expr_5 = import7.UNINITIALIZED; 134 | this.init([].concat([this._el_0]), [ 135 | this._el_0, 136 | this._text_1, 137 | this._el_2, 138 | this._text_3, 139 | this._el_4, 140 | this._text_5, 141 | this._anchor_6, 142 | this._text_7 143 | ], [ 144 | disposable_0, 145 | disposable_1 146 | ], []); 147 | return null; 148 | } 149 | injectorGetInternal(token, requestNodeIndex, notFoundResult) { 150 | if (((token === import10.TemplateRef) && (6 === requestNodeIndex))) { 151 | return this._TemplateRef_6_5; 152 | } 153 | if (((token === import13.NgIf) && (6 === requestNodeIndex))) { 154 | return this._NgIf_6_6; 155 | } 156 | return notFoundResult; 157 | } 158 | detectChangesInternal(throwOnChange) { 159 | const currVal_5 = this.context.$implicit.expanded; 160 | if (import4.checkBinding(throwOnChange, this._expr_5, currVal_5)) { 161 | this._NgIf_6_6.ngIf = currVal_5; 162 | this._expr_5 = currVal_5; 163 | } 164 | this.detectContentChildrenChanges(throwOnChange); 165 | const currVal_1 = import4.interpolate(1, '', this.context.$implicit.getIcon(), ''); 166 | if (import4.checkBinding(throwOnChange, this._expr_1, currVal_1)) { 167 | this.renderer.setText(this._text_3, currVal_1); 168 | this._expr_1 = currVal_1; 169 | } 170 | const currVal_3 = this.context.$implicit.checked; 171 | if (import4.checkBinding(throwOnChange, this._expr_3, currVal_3)) { 172 | this.renderer.setElementProperty(this._el_4, 'checked', currVal_3); 173 | this._expr_3 = currVal_3; 174 | } 175 | const currVal_4 = import4.interpolate(1, ' ', this.context.$implicit.name, '\n '); 176 | if (import4.checkBinding(throwOnChange, this._expr_4, currVal_4)) { 177 | this.renderer.setText(this._text_5, currVal_4); 178 | this._expr_4 = currVal_4; 179 | } 180 | this.detectViewChildrenChanges(throwOnChange); 181 | } 182 | _handle_click_2_0($event) { 183 | this.markPathToRootAsCheckOnce(); 184 | const pd_0 = (this.context.$implicit.toggle() !== false); 185 | return (true && pd_0); 186 | } 187 | _handle_click_4_0($event) { 188 | this.markPathToRootAsCheckOnce(); 189 | const pd_0 = (this.context.$implicit.check() !== false); 190 | return (true && pd_0); 191 | } 192 | } 193 | function viewFactory_TreeView1(viewUtils, parentInjector, declarationEl) { 194 | return new _View_TreeView1(viewUtils, parentInjector, declarationEl); 195 | } 196 | class _View_TreeView2 extends import1.AppView { 197 | constructor(viewUtils, parentInjector, declarationEl) { 198 | super(_View_TreeView2, renderType_TreeView, import6.ViewType.EMBEDDED, viewUtils, parentInjector, declarationEl, import7.ChangeDetectorStatus.CheckAlways); 199 | } 200 | createInternal(rootSelector) { 201 | this._el_0 = this.renderer.createElement(null, 'div', null); 202 | this._text_1 = this.renderer.createText(this._el_0, '\n ', null); 203 | this._el_2 = this.renderer.createElement(this._el_0, 'ul', null); 204 | this._text_3 = this.renderer.createText(this._el_2, '\n ', null); 205 | this._anchor_4 = this.renderer.createTemplateAnchor(this._el_2, null); 206 | this._appEl_4 = new import2.AppElement(4, 2, this, this._anchor_4); 207 | this._TemplateRef_4_5 = new import10.TemplateRef_(this._appEl_4, viewFactory_TreeView3); 208 | this._NgFor_4_6 = new import9.NgFor(this._appEl_4.vcRef, this._TemplateRef_4_5, this.parent.parent.parentInjector.get(import11.IterableDiffers), this.parent.parent.ref); 209 | this._text_5 = this.renderer.createText(this._el_2, '\n ', null); 210 | this._text_6 = this.renderer.createText(this._el_0, '\n ', null); 211 | this._el_7 = this.renderer.createElement(this._el_0, 'tree-view', null); 212 | this._appEl_7 = new import2.AppElement(7, 0, this, this._el_7); 213 | var compView_7 = viewFactory_TreeView0(this.viewUtils, this.injector(7), this._appEl_7); 214 | this._TreeView_7_4 = new import3.TreeView(); 215 | this._appEl_7.initComponent(this._TreeView_7_4, [], compView_7); 216 | compView_7.create(this._TreeView_7_4, [], null); 217 | this._text_8 = this.renderer.createText(this._el_0, '\n ', null); 218 | this._expr_0 = import7.UNINITIALIZED; 219 | this._expr_1 = import7.UNINITIALIZED; 220 | this.init([].concat([this._el_0]), [ 221 | this._el_0, 222 | this._text_1, 223 | this._el_2, 224 | this._text_3, 225 | this._anchor_4, 226 | this._text_5, 227 | this._text_6, 228 | this._el_7, 229 | this._text_8 230 | ], [], []); 231 | return null; 232 | } 233 | injectorGetInternal(token, requestNodeIndex, notFoundResult) { 234 | if (((token === import10.TemplateRef) && (4 === requestNodeIndex))) { 235 | return this._TemplateRef_4_5; 236 | } 237 | if (((token === import9.NgFor) && (4 === requestNodeIndex))) { 238 | return this._NgFor_4_6; 239 | } 240 | if (((token === import3.TreeView) && (7 === requestNodeIndex))) { 241 | return this._TreeView_7_4; 242 | } 243 | return notFoundResult; 244 | } 245 | detectChangesInternal(throwOnChange) { 246 | var changes = null; 247 | changes = null; 248 | const currVal_0 = this.parent.context.$implicit.files; 249 | if (import4.checkBinding(throwOnChange, this._expr_0, currVal_0)) { 250 | this._NgFor_4_6.ngForOf = currVal_0; 251 | if ((changes === null)) { 252 | (changes = {}); 253 | } 254 | changes['ngForOf'] = new import7.SimpleChange(this._expr_0, currVal_0); 255 | this._expr_0 = currVal_0; 256 | } 257 | if ((changes !== null)) { 258 | this._NgFor_4_6.ngOnChanges(changes); 259 | } 260 | if (!throwOnChange) { 261 | this._NgFor_4_6.ngDoCheck(); 262 | } 263 | const currVal_1 = this.parent.context.$implicit.directories; 264 | if (import4.checkBinding(throwOnChange, this._expr_1, currVal_1)) { 265 | this._TreeView_7_4.directories = currVal_1; 266 | this._expr_1 = currVal_1; 267 | } 268 | this.detectContentChildrenChanges(throwOnChange); 269 | this.detectViewChildrenChanges(throwOnChange); 270 | } 271 | } 272 | function viewFactory_TreeView2(viewUtils, parentInjector, declarationEl) { 273 | return new _View_TreeView2(viewUtils, parentInjector, declarationEl); 274 | } 275 | class _View_TreeView3 extends import1.AppView { 276 | constructor(viewUtils, parentInjector, declarationEl) { 277 | super(_View_TreeView3, renderType_TreeView, import6.ViewType.EMBEDDED, viewUtils, parentInjector, declarationEl, import7.ChangeDetectorStatus.CheckAlways); 278 | } 279 | createInternal(rootSelector) { 280 | this._el_0 = this.renderer.createElement(null, 'li', null); 281 | this._text_1 = this.renderer.createText(this._el_0, '', null); 282 | this._expr_0 = import7.UNINITIALIZED; 283 | this.init([].concat([this._el_0]), [ 284 | this._el_0, 285 | this._text_1 286 | ], [], []); 287 | return null; 288 | } 289 | detectChangesInternal(throwOnChange) { 290 | this.detectContentChildrenChanges(throwOnChange); 291 | const currVal_0 = import4.interpolate(1, '', this.context.$implicit, ''); 292 | if (import4.checkBinding(throwOnChange, this._expr_0, currVal_0)) { 293 | this.renderer.setText(this._text_1, currVal_0); 294 | this._expr_0 = currVal_0; 295 | } 296 | this.detectViewChildrenChanges(throwOnChange); 297 | } 298 | } 299 | function viewFactory_TreeView3(viewUtils, parentInjector, declarationEl) { 300 | return new _View_TreeView3(viewUtils, parentInjector, declarationEl); 301 | } 302 | -------------------------------------------------------------------------------- /es6/main.js: -------------------------------------------------------------------------------- 1 | import { platformBrowser } from '@angular/platform-browser'; 2 | import { AppModuleNgFactory } from './app/app.module.ngfactory'; 3 | platformBrowser().bootstrapModuleFactory(AppModuleNgFactory); 4 | -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | 3 | gulp.task('bundle', function() { 4 | var SystemBuilder = require('systemjs-builder'); 5 | var builder = new SystemBuilder(); 6 | 7 | builder.loadConfig('./src/system-config.js') 8 | .then(function(){ 9 | var outputFile = 'es6/tree-shaken.js'; 10 | return builder.buildStatic('app', outputFile, { 11 | minify: true, 12 | mangle: true, 13 | rollup: true 14 | }); 15 | }) 16 | .then(function(){ 17 | console.log('bundle built successfully!'); 18 | }); 19 | }); -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "offline-compiler", 3 | "version": "0.0.1", 4 | "license": "MIT", 5 | "private": true, 6 | "scripts": { 7 | "codegen": "./node_modules/.bin/ngc -p ./src", 8 | "systemjs-builder-bundle": "gulp bundle", 9 | "rollup": "./node_modules/.bin/rollup -c rollup.js", 10 | "es5-bundle": "./node_modules/.bin/tsc es6/tree-shaken.js --target es5 --allowJs --outDir es5", 11 | "minify": "./node_modules/.bin/uglifyjs --screw-ie8 --compress --mangle -- es6/tree-shaken.js > build/build.js", 12 | "build-with-rollup": "npm run codegen && npm run rollup && node server.js", 13 | "build-with-systemjs-builder": "npm run codegen && npm run systemjs-builder-bundle && npm run es5-bundle && npm run minify && node server.js" 14 | }, 15 | "dependencies": { 16 | "@angular/common": "2.0.0-rc.5", 17 | "@angular/compiler": "^2.0.0-rc.5", 18 | "@angular/compiler-cli": "^0.5.0", 19 | "@angular/core": "2.0.0-rc.5", 20 | "@angular/http": "2.0.0-rc.5", 21 | "@angular/platform-browser": "2.0.0-rc.5", 22 | "@angular/platform-browser-dynamic": "2.0.0-rc.5", 23 | "@angular/platform-server": "^2.0.0-rc.5", 24 | "babel-preset-es2015": "^6.9.0", 25 | "babel-preset-es2015-rollup": "^1.1.1", 26 | "babelrc-rollup": "^1.2.0", 27 | "es6-shim": "0.35.1", 28 | "express": "^4.14.0", 29 | "reflect-metadata": "0.1.3", 30 | "rollup-plugin-babel": "^2.6.1", 31 | "rollup-plugin-uglify": "^1.0.1", 32 | "rxjs-es": "5.0.0-beta.6", 33 | "rxjs": "5.0.0-beta.6", 34 | "systemjs": "0.19.26", 35 | "uglify-js": "2.7.0", 36 | "zone.js": "0.6.12" 37 | }, 38 | "devDependencies": { 39 | "angular-cli": "1.0.0-beta.8", 40 | "codelyzer": "0.0.20", 41 | "ember-cli-inject-live-reload": "1.4.0", 42 | "jasmine-core": "2.4.1", 43 | "jasmine-spec-reporter": "2.5.0", 44 | "karma": "0.13.22", 45 | "karma-chrome-launcher": "0.2.3", 46 | "karma-jasmine": "0.3.8", 47 | "protractor": "3.3.0", 48 | "ts-node": "0.5.5", 49 | "tslint": "3.11.0", 50 | "typescript": "^2.0.0", 51 | "typings": "0.8.1", 52 | "gulp": "^3.9.1", 53 | "systemjs-builder": "^0.15.16", 54 | "rollup-plugin-node-resolve": "^1.5.0", 55 | "rollup": "^0.26.1" 56 | 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /public/.npmignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thelgevold/angular2-offline-compiler/d6ff04102f535867ec1f59a2d044085ffad907ad/public/.npmignore -------------------------------------------------------------------------------- /rollup.js: -------------------------------------------------------------------------------- 1 | //rollup hack 2 | import {rollup} from 'rollup' 3 | import * as path from 'path' 4 | import nodeResolve from 'rollup-plugin-node-resolve' 5 | import uglify from 'rollup-plugin-uglify'; 6 | import babel from 'rollup-plugin-babel'; 7 | import babelrc from 'babelrc-rollup'; 8 | 9 | class RollupNG2 { 10 | constructor(options){ 11 | this.options = options; 12 | } 13 | resolveId(id, from){ 14 | 15 | if(id.startsWith('rxjs/')){ 16 | return `${__dirname}/node_modules/rxjs-es/${id.split('rxjs/').pop()}.js`; 17 | } 18 | 19 | //TODO: remove when https://github.com/angular/angular/issues/8381 lands 20 | if(id.startsWith('@angular/core')){ 21 | if(id === '@angular/core'){ 22 | return `${__dirname}/node_modules/@angular/core/esm/index.js`; 23 | } 24 | return `${__dirname}/node_modules/@angular/core/esm/${id.split('@angular/core').pop()}.js`; 25 | } 26 | if(id.startsWith('@angular/common')){ 27 | if(id === '@angular/common'){ 28 | return `${__dirname}/node_modules/@angular/common/esm/index.js`; 29 | } 30 | return `${__dirname}/node_modules/@angular/common/esm/${id.split('@angular/common').pop()}.js`; 31 | } 32 | 33 | if(id.startsWith('platform-browser')){ 34 | if(id === 'platform-browser'){ 35 | return `${__dirname}/node_modules/platform-browser/esm/index.js`; 36 | } 37 | return `${__dirname}/node_modules/platform-browser/esm/${id.split('platform-browser').pop()}.js`; 38 | } 39 | } 40 | } 41 | 42 | 43 | const rollupNG2 = (config) => new RollupNG2(config); 44 | 45 | 46 | export default { 47 | entry: 'es6/main.js', 48 | format: 'es6', 49 | dest: 'build/build.js', 50 | sourceMap: true, 51 | plugins: [ 52 | rollupNG2(), 53 | // babel(babelrc()), 54 | // uglify(), 55 | nodeResolve({jsnext: true})], 56 | 57 | } -------------------------------------------------------------------------------- /server.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var app = express(); 3 | 4 | app.use('/external', express.static(__dirname + '/node_modules')); 5 | app.use('/build', express.static(__dirname + '/build')); 6 | app.set("view options", {layout: false}); 7 | app.use(express.static(__dirname + '/src')); 8 | 9 | app.get('/', function (req, res) { 10 | res.render('index.html'); 11 | }) 12 | 13 | var server = app.listen(process.env.PORT || 4000, function () { 14 | 15 | var host = server.address().address 16 | var port = server.address().port 17 | 18 | console.log("Example app listening at http://%s:%s", host, port) 19 | 20 | }) -------------------------------------------------------------------------------- /src/app/app.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thelgevold/angular2-offline-compiler/d6ff04102f535867ec1f59a2d044085ffad907ad/src/app/app.component.css -------------------------------------------------------------------------------- /src/app/app.component.css.shim.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is generated by the Angular 2 template compiler. 3 | * Do not edit. 4 | */ 5 | /* tslint:disable */ 6 | 7 | export const styles:any[] = ['']; -------------------------------------------------------------------------------- /src/app/app.component.html: -------------------------------------------------------------------------------- 1 |

2 | {{title}} 3 |

4 | 5 | -------------------------------------------------------------------------------- /src/app/app.component.ngfactory.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is generated by the Angular 2 template compiler. 3 | * Do not edit. 4 | */ 5 | /* tslint:disable */ 6 | 7 | import * as import0 from '@angular/core/src/render/api'; 8 | import * as import1 from '@angular/core/src/linker/view'; 9 | import * as import2 from '@angular/core/src/linker/element'; 10 | import * as import3 from './app.component'; 11 | import * as import4 from '@angular/core/src/linker/view_utils'; 12 | import * as import5 from '@angular/core/src/di/injector'; 13 | import * as import6 from '@angular/core/src/linker/view_type'; 14 | import * as import7 from '@angular/core/src/change_detection/change_detection'; 15 | import * as import8 from '@angular/core/src/linker/component_factory'; 16 | import * as import9 from './treeview/tree-view-demo'; 17 | import * as import10 from './treeview/tree-view-demo.ngfactory'; 18 | import * as import11 from '@angular/core/src/metadata/view'; 19 | var renderType_AppComponent_Host:import0.RenderComponentType = null; 20 | class _View_AppComponent_Host0 extends import1.AppView { 21 | _el_0:any; 22 | private _appEl_0:import2.AppElement; 23 | _AppComponent_0_4:import3.AppComponent; 24 | constructor(viewUtils:import4.ViewUtils,parentInjector:import5.Injector,declarationEl:import2.AppElement) { 25 | super(_View_AppComponent_Host0,renderType_AppComponent_Host,import6.ViewType.HOST,viewUtils,parentInjector,declarationEl,import7.ChangeDetectorStatus.CheckAlways); 26 | } 27 | createInternal(rootSelector:string):import2.AppElement { 28 | this._el_0 = this.selectOrCreateHostElement('app-root',rootSelector,null); 29 | this._appEl_0 = new import2.AppElement(0,null,this,this._el_0); 30 | var compView_0:any = viewFactory_AppComponent0(this.viewUtils,this.injector(0),this._appEl_0); 31 | this._AppComponent_0_4 = new import3.AppComponent(); 32 | this._appEl_0.initComponent(this._AppComponent_0_4,[],compView_0); 33 | compView_0.create(this._AppComponent_0_4,this.projectableNodes,null); 34 | this.init([].concat([this._el_0]),[this._el_0],[],[]); 35 | return this._appEl_0; 36 | } 37 | injectorGetInternal(token:any,requestNodeIndex:number,notFoundResult:any):any { 38 | if (((token === import3.AppComponent) && (0 === requestNodeIndex))) { return this._AppComponent_0_4; } 39 | return notFoundResult; 40 | } 41 | } 42 | function viewFactory_AppComponent_Host0(viewUtils:import4.ViewUtils,parentInjector:import5.Injector,declarationEl:import2.AppElement):import1.AppView { 43 | if ((renderType_AppComponent_Host === null)) { (renderType_AppComponent_Host = viewUtils.createRenderComponentType('',0,null,[],{})); } 44 | return new _View_AppComponent_Host0(viewUtils,parentInjector,declarationEl); 45 | } 46 | export const AppComponentNgFactory:import8.ComponentFactory = new import8.ComponentFactory('app-root',viewFactory_AppComponent_Host0,import3.AppComponent); 47 | const styles_AppComponent:any[] = []; 48 | var renderType_AppComponent:import0.RenderComponentType = null; 49 | class _View_AppComponent0 extends import1.AppView { 50 | _el_0:any; 51 | _text_1:any; 52 | _text_2:any; 53 | _el_3:any; 54 | private _appEl_3:import2.AppElement; 55 | _TreeViewDemo_3_4:import9.TreeViewDemo; 56 | private _expr_0:any; 57 | constructor(viewUtils:import4.ViewUtils,parentInjector:import5.Injector,declarationEl:import2.AppElement) { 58 | super(_View_AppComponent0,renderType_AppComponent,import6.ViewType.COMPONENT,viewUtils,parentInjector,declarationEl,import7.ChangeDetectorStatus.CheckAlways); 59 | } 60 | createInternal(rootSelector:string):import2.AppElement { 61 | const parentRenderNode:any = this.renderer.createViewRoot(this.declarationAppElement.nativeElement); 62 | this._el_0 = this.renderer.createElement(parentRenderNode,'h1',null); 63 | this._text_1 = this.renderer.createText(this._el_0,'',null); 64 | this._text_2 = this.renderer.createText(parentRenderNode,'\n\n',null); 65 | this._el_3 = this.renderer.createElement(parentRenderNode,'treeview',null); 66 | this._appEl_3 = new import2.AppElement(3,null,this,this._el_3); 67 | var compView_3:any = import10.viewFactory_TreeViewDemo0(this.viewUtils,this.injector(3),this._appEl_3); 68 | this._TreeViewDemo_3_4 = new import9.TreeViewDemo(); 69 | this._appEl_3.initComponent(this._TreeViewDemo_3_4,[],compView_3); 70 | compView_3.create(this._TreeViewDemo_3_4,[],null); 71 | this._expr_0 = import7.UNINITIALIZED; 72 | this.init([],[ 73 | this._el_0, 74 | this._text_1, 75 | this._text_2, 76 | this._el_3 77 | ] 78 | ,[],[]); 79 | return null; 80 | } 81 | injectorGetInternal(token:any,requestNodeIndex:number,notFoundResult:any):any { 82 | if (((token === import9.TreeViewDemo) && (3 === requestNodeIndex))) { return this._TreeViewDemo_3_4; } 83 | return notFoundResult; 84 | } 85 | detectChangesInternal(throwOnChange:boolean):void { 86 | this.detectContentChildrenChanges(throwOnChange); 87 | const currVal_0:any = import4.interpolate(1,'\n ',this.context.title,'\n'); 88 | if (import4.checkBinding(throwOnChange,this._expr_0,currVal_0)) { 89 | this.renderer.setText(this._text_1,currVal_0); 90 | this._expr_0 = currVal_0; 91 | } 92 | this.detectViewChildrenChanges(throwOnChange); 93 | } 94 | } 95 | export function viewFactory_AppComponent0(viewUtils:import4.ViewUtils,parentInjector:import5.Injector,declarationEl:import2.AppElement):import1.AppView { 96 | if ((renderType_AppComponent === null)) { (renderType_AppComponent = viewUtils.createRenderComponentType('/Users/tor/Development/angular2-offline-compiler/src/app/app.component.html',0,import11.ViewEncapsulation.None,styles_AppComponent,{})); } 97 | return new _View_AppComponent0(viewUtils,parentInjector,declarationEl); 98 | } -------------------------------------------------------------------------------- /src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | import { TreeViewDemo } from './treeview/tree-view-demo'; 4 | 5 | @Component({ 6 | selector: 'app-root', 7 | templateUrl: 'app.component.html', 8 | directives: [TreeViewDemo] 9 | }) 10 | export class AppComponent { 11 | title = 'Demo'; 12 | } 13 | -------------------------------------------------------------------------------- /src/app/app.module.ngfactory.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is generated by the Angular 2 template compiler. 3 | * Do not edit. 4 | */ 5 | /* tslint:disable */ 6 | 7 | import * as import0 from '@angular/core/src/linker/ng_module_factory'; 8 | import * as import1 from './app.module'; 9 | import * as import2 from '@angular/common/index'; 10 | import * as import3 from '@angular/core/src/application_module'; 11 | import * as import4 from '@angular/platform-browser/src/browser'; 12 | import * as import5 from '@angular/core/src/application_init'; 13 | import * as import6 from '@angular/core/src/testability/testability'; 14 | import * as import7 from '@angular/core/src/application_ref'; 15 | import * as import8 from '@angular/core/src/linker/compiler'; 16 | import * as import9 from '@angular/platform-browser/src/dom/events/hammer_gestures'; 17 | import * as import10 from '@angular/platform-browser/src/dom/events/event_manager'; 18 | import * as import11 from '@angular/platform-browser/src/dom/shared_styles_host'; 19 | import * as import12 from '@angular/platform-browser/src/dom/dom_renderer'; 20 | import * as import13 from '@angular/platform-browser/src/security/dom_sanitization_service'; 21 | import * as import14 from '@angular/core/src/linker/view_utils'; 22 | import * as import15 from '@angular/core/src/linker/dynamic_component_loader'; 23 | import * as import16 from '@angular/core/src/di/injector'; 24 | import * as import17 from './app.component.ngfactory'; 25 | import * as import18 from '@angular/core/src/application_tokens'; 26 | import * as import19 from '@angular/platform-browser/src/dom/events/dom_events'; 27 | import * as import20 from '@angular/platform-browser/src/dom/events/key_events'; 28 | import * as import21 from '@angular/core/src/zone/ng_zone'; 29 | import * as import22 from '@angular/platform-browser/src/dom/debug/ng_probe'; 30 | import * as import23 from '@angular/core/src/console'; 31 | import * as import24 from '@angular/core/src/facade/exception_handler'; 32 | import * as import25 from '@angular/core/src/linker/component_resolver'; 33 | import * as import26 from '@angular/platform-browser/src/dom/dom_tokens'; 34 | import * as import27 from '@angular/platform-browser/src/dom/animation_driver'; 35 | import * as import28 from '@angular/core/src/render/api'; 36 | import * as import29 from '@angular/core/src/security'; 37 | import * as import30 from '@angular/core/src/change_detection/differs/iterable_differs'; 38 | import * as import31 from '@angular/core/src/change_detection/differs/keyvalue_differs'; 39 | class AppModuleInjector extends import0.NgModuleInjector { 40 | _CommonModule_0:import2.CommonModule; 41 | _ApplicationModule_1:import3.ApplicationModule; 42 | _BrowserModule_2:import4.BrowserModule; 43 | _AppModule_3:import1.AppModule; 44 | _ExceptionHandler_4:any; 45 | _ApplicationInitStatus_5:import5.ApplicationInitStatus; 46 | _Testability_6:import6.Testability; 47 | _ApplicationRef__7:import7.ApplicationRef_; 48 | __ApplicationRef_8:any; 49 | __Compiler_9:import8.Compiler; 50 | __ComponentResolver_10:any; 51 | __APP_ID_11:any; 52 | __DOCUMENT_12:any; 53 | __HAMMER_GESTURE_CONFIG_13:import9.HammerGestureConfig; 54 | __EVENT_MANAGER_PLUGINS_14:any[]; 55 | __EventManager_15:import10.EventManager; 56 | __DomSharedStylesHost_16:import11.DomSharedStylesHost; 57 | __AnimationDriver_17:any; 58 | __DomRootRenderer_18:import12.DomRootRenderer_; 59 | __RootRenderer_19:any; 60 | __DomSanitizationService_20:import13.DomSanitizationServiceImpl; 61 | __SanitizationService_21:any; 62 | __ViewUtils_22:import14.ViewUtils; 63 | __IterableDiffers_23:any; 64 | __KeyValueDiffers_24:any; 65 | __DynamicComponentLoader_25:import15.DynamicComponentLoader_; 66 | __SharedStylesHost_26:any; 67 | constructor(parent:import16.Injector) { 68 | super(parent,[import17.AppComponentNgFactory],[import17.AppComponentNgFactory]); 69 | } 70 | get _ApplicationRef_8():any { 71 | if ((this.__ApplicationRef_8 == null)) { (this.__ApplicationRef_8 = this._ApplicationRef__7); } 72 | return this.__ApplicationRef_8; 73 | } 74 | get _Compiler_9():import8.Compiler { 75 | if ((this.__Compiler_9 == null)) { (this.__Compiler_9 = new import8.Compiler()); } 76 | return this.__Compiler_9; 77 | } 78 | get _ComponentResolver_10():any { 79 | if ((this.__ComponentResolver_10 == null)) { (this.__ComponentResolver_10 = this._Compiler_9); } 80 | return this.__ComponentResolver_10; 81 | } 82 | get _APP_ID_11():any { 83 | if ((this.__APP_ID_11 == null)) { (this.__APP_ID_11 = import18._appIdRandomProviderFactory()); } 84 | return this.__APP_ID_11; 85 | } 86 | get _DOCUMENT_12():any { 87 | if ((this.__DOCUMENT_12 == null)) { (this.__DOCUMENT_12 = import4._document()); } 88 | return this.__DOCUMENT_12; 89 | } 90 | get _HAMMER_GESTURE_CONFIG_13():import9.HammerGestureConfig { 91 | if ((this.__HAMMER_GESTURE_CONFIG_13 == null)) { (this.__HAMMER_GESTURE_CONFIG_13 = new import9.HammerGestureConfig()); } 92 | return this.__HAMMER_GESTURE_CONFIG_13; 93 | } 94 | get _EVENT_MANAGER_PLUGINS_14():any[] { 95 | if ((this.__EVENT_MANAGER_PLUGINS_14 == null)) { (this.__EVENT_MANAGER_PLUGINS_14 = [ 96 | new import19.DomEventsPlugin(), 97 | new import20.KeyEventsPlugin(), 98 | new import9.HammerGesturesPlugin(this._HAMMER_GESTURE_CONFIG_13) 99 | ] 100 | ); } 101 | return this.__EVENT_MANAGER_PLUGINS_14; 102 | } 103 | get _EventManager_15():import10.EventManager { 104 | if ((this.__EventManager_15 == null)) { (this.__EventManager_15 = new import10.EventManager(this._EVENT_MANAGER_PLUGINS_14,this.parent.get(import21.NgZone))); } 105 | return this.__EventManager_15; 106 | } 107 | get _DomSharedStylesHost_16():import11.DomSharedStylesHost { 108 | if ((this.__DomSharedStylesHost_16 == null)) { (this.__DomSharedStylesHost_16 = new import11.DomSharedStylesHost(this._DOCUMENT_12)); } 109 | return this.__DomSharedStylesHost_16; 110 | } 111 | get _AnimationDriver_17():any { 112 | if ((this.__AnimationDriver_17 == null)) { (this.__AnimationDriver_17 = import4._resolveDefaultAnimationDriver()); } 113 | return this.__AnimationDriver_17; 114 | } 115 | get _DomRootRenderer_18():import12.DomRootRenderer_ { 116 | if ((this.__DomRootRenderer_18 == null)) { (this.__DomRootRenderer_18 = new import12.DomRootRenderer_(this._DOCUMENT_12,this._EventManager_15,this._DomSharedStylesHost_16,this._AnimationDriver_17)); } 117 | return this.__DomRootRenderer_18; 118 | } 119 | get _RootRenderer_19():any { 120 | if ((this.__RootRenderer_19 == null)) { (this.__RootRenderer_19 = import22._createConditionalRootRenderer(this._DomRootRenderer_18)); } 121 | return this.__RootRenderer_19; 122 | } 123 | get _DomSanitizationService_20():import13.DomSanitizationServiceImpl { 124 | if ((this.__DomSanitizationService_20 == null)) { (this.__DomSanitizationService_20 = new import13.DomSanitizationServiceImpl()); } 125 | return this.__DomSanitizationService_20; 126 | } 127 | get _SanitizationService_21():any { 128 | if ((this.__SanitizationService_21 == null)) { (this.__SanitizationService_21 = this._DomSanitizationService_20); } 129 | return this.__SanitizationService_21; 130 | } 131 | get _ViewUtils_22():import14.ViewUtils { 132 | if ((this.__ViewUtils_22 == null)) { (this.__ViewUtils_22 = new import14.ViewUtils(this._RootRenderer_19,this._APP_ID_11,this._SanitizationService_21)); } 133 | return this.__ViewUtils_22; 134 | } 135 | get _IterableDiffers_23():any { 136 | if ((this.__IterableDiffers_23 == null)) { (this.__IterableDiffers_23 = import3._iterableDiffersFactory()); } 137 | return this.__IterableDiffers_23; 138 | } 139 | get _KeyValueDiffers_24():any { 140 | if ((this.__KeyValueDiffers_24 == null)) { (this.__KeyValueDiffers_24 = import3._keyValueDiffersFactory()); } 141 | return this.__KeyValueDiffers_24; 142 | } 143 | get _DynamicComponentLoader_25():import15.DynamicComponentLoader_ { 144 | if ((this.__DynamicComponentLoader_25 == null)) { (this.__DynamicComponentLoader_25 = new import15.DynamicComponentLoader_(this._Compiler_9)); } 145 | return this.__DynamicComponentLoader_25; 146 | } 147 | get _SharedStylesHost_26():any { 148 | if ((this.__SharedStylesHost_26 == null)) { (this.__SharedStylesHost_26 = this._DomSharedStylesHost_16); } 149 | return this.__SharedStylesHost_26; 150 | } 151 | createInternal():import1.AppModule { 152 | this._CommonModule_0 = new import2.CommonModule(); 153 | this._ApplicationModule_1 = new import3.ApplicationModule(); 154 | this._BrowserModule_2 = new import4.BrowserModule(); 155 | this._AppModule_3 = new import1.AppModule(); 156 | this._ExceptionHandler_4 = import4._exceptionHandler(); 157 | this._ApplicationInitStatus_5 = new import5.ApplicationInitStatus(this.parent.get(import5.APP_INITIALIZER,null)); 158 | this._Testability_6 = new import6.Testability(this.parent.get(import21.NgZone)); 159 | this._ApplicationRef__7 = new import7.ApplicationRef_(this.parent.get(import21.NgZone),this.parent.get(import23.Console),this,this._ExceptionHandler_4,this,this._ApplicationInitStatus_5,this.parent.get(import6.TestabilityRegistry,null),this._Testability_6); 160 | return this._AppModule_3; 161 | } 162 | getInternal(token:any,notFoundResult:any):any { 163 | if ((token === import2.CommonModule)) { return this._CommonModule_0; } 164 | if ((token === import3.ApplicationModule)) { return this._ApplicationModule_1; } 165 | if ((token === import4.BrowserModule)) { return this._BrowserModule_2; } 166 | if ((token === import1.AppModule)) { return this._AppModule_3; } 167 | if ((token === import24.ExceptionHandler)) { return this._ExceptionHandler_4; } 168 | if ((token === import5.ApplicationInitStatus)) { return this._ApplicationInitStatus_5; } 169 | if ((token === import6.Testability)) { return this._Testability_6; } 170 | if ((token === import7.ApplicationRef_)) { return this._ApplicationRef__7; } 171 | if ((token === import7.ApplicationRef)) { return this._ApplicationRef_8; } 172 | if ((token === import8.Compiler)) { return this._Compiler_9; } 173 | if ((token === import25.ComponentResolver)) { return this._ComponentResolver_10; } 174 | if ((token === import18.APP_ID)) { return this._APP_ID_11; } 175 | if ((token === import26.DOCUMENT)) { return this._DOCUMENT_12; } 176 | if ((token === import9.HAMMER_GESTURE_CONFIG)) { return this._HAMMER_GESTURE_CONFIG_13; } 177 | if ((token === import10.EVENT_MANAGER_PLUGINS)) { return this._EVENT_MANAGER_PLUGINS_14; } 178 | if ((token === import10.EventManager)) { return this._EventManager_15; } 179 | if ((token === import11.DomSharedStylesHost)) { return this._DomSharedStylesHost_16; } 180 | if ((token === import27.AnimationDriver)) { return this._AnimationDriver_17; } 181 | if ((token === import12.DomRootRenderer)) { return this._DomRootRenderer_18; } 182 | if ((token === import28.RootRenderer)) { return this._RootRenderer_19; } 183 | if ((token === import13.DomSanitizationService)) { return this._DomSanitizationService_20; } 184 | if ((token === import29.SanitizationService)) { return this._SanitizationService_21; } 185 | if ((token === import14.ViewUtils)) { return this._ViewUtils_22; } 186 | if ((token === import30.IterableDiffers)) { return this._IterableDiffers_23; } 187 | if ((token === import31.KeyValueDiffers)) { return this._KeyValueDiffers_24; } 188 | if ((token === import15.DynamicComponentLoader)) { return this._DynamicComponentLoader_25; } 189 | if ((token === import11.SharedStylesHost)) { return this._SharedStylesHost_26; } 190 | return notFoundResult; 191 | } 192 | destroyInternal():void { 193 | this._ApplicationRef__7.ngOnDestroy(); 194 | } 195 | } 196 | export const AppModuleNgFactory:import0.NgModuleFactory = new import0.NgModuleFactory(AppModuleInjector,import1.AppModule); -------------------------------------------------------------------------------- /src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { BrowserModule } from '@angular/platform-browser'; 3 | 4 | import { AppComponent } from './app.component'; 5 | import { TreeViewDemo } from './treeview/tree-view-demo'; 6 | import { TreeView } from './treeview/tree-view'; 7 | 8 | 9 | @NgModule({ 10 | imports: [BrowserModule], 11 | declarations: [AppComponent, TreeViewDemo, TreeView], 12 | bootstrap: [AppComponent] 13 | }) 14 | export class AppModule { 15 | } -------------------------------------------------------------------------------- /src/app/index.ts: -------------------------------------------------------------------------------- 1 | export * from './environment'; 2 | export * from './app.component'; 3 | -------------------------------------------------------------------------------- /src/app/tree-view.ngfactory.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is generated by the Angular 2 template compiler. 3 | * Do not edit. 4 | */ 5 | /* tslint:disable */ 6 | 7 | import * as import0 from '@angular/core/src/render/api'; 8 | import * as import1 from '@angular/core/src/linker/view'; 9 | import * as import2 from './tree-view'; 10 | import * as import3 from '@angular/core/src/linker/element'; 11 | import * as import4 from '@angular/common/src/directives/ng_for'; 12 | import * as import5 from '@angular/core/src/linker/view_utils'; 13 | import * as import6 from '@angular/core/src/di/injector'; 14 | import * as import7 from '@angular/core/src/linker/view_type'; 15 | import * as import8 from '@angular/core/src/change_detection/change_detection'; 16 | import * as import9 from '@angular/core/src/linker/template_ref'; 17 | import * as import10 from '@angular/core/src/change_detection/differs/iterable_differs'; 18 | import * as import11 from '@angular/core/src/metadata/view'; 19 | import * as import12 from '@angular/common/src/directives/ng_if'; 20 | import * as import13 from '@angular/core/src/linker/component_factory'; 21 | const styles_TreeView:any[] = []; 22 | var renderType_TreeView:import0.RenderComponentType = null; 23 | class _View_TreeView0 extends import1.AppView { 24 | _el_0:any; 25 | _text_1:any; 26 | _anchor_2:any; 27 | private _appEl_2:import3.AppElement; 28 | _TemplateRef_2_5:any; 29 | _NgFor_2_6:import4.NgFor; 30 | _text_3:any; 31 | _text_4:any; 32 | private _expr_0:any; 33 | constructor(viewUtils:import5.ViewUtils,parentInjector:import6.Injector,declarationEl:import3.AppElement) { 34 | super(_View_TreeView0,renderType_TreeView,import7.ViewType.COMPONENT,viewUtils,parentInjector,declarationEl,import8.ChangeDetectorStatus.CheckAlways); 35 | } 36 | createInternal(rootSelector:string):import3.AppElement { 37 | const parentRenderNode:any = this.renderer.createViewRoot(this.declarationAppElement.nativeElement); 38 | this._el_0 = this.renderer.createElement(parentRenderNode,'ul',null); 39 | this._text_1 = this.renderer.createText(this._el_0,'\n ',null); 40 | this._anchor_2 = this.renderer.createTemplateAnchor(this._el_0,null); 41 | this._appEl_2 = new import3.AppElement(2,0,this,this._anchor_2); 42 | this._TemplateRef_2_5 = new import9.TemplateRef_(this._appEl_2,viewFactory_TreeView1); 43 | this._NgFor_2_6 = new import4.NgFor(this._appEl_2.vcRef,this._TemplateRef_2_5,this.parentInjector.get(import10.IterableDiffers),this.ref); 44 | this._text_3 = this.renderer.createText(this._el_0,'\n',null); 45 | this._text_4 = this.renderer.createText(parentRenderNode,'\n\n',null); 46 | this._expr_0 = import8.uninitialized; 47 | this.init([],[ 48 | this._el_0, 49 | this._text_1, 50 | this._anchor_2, 51 | this._text_3, 52 | this._text_4 53 | ] 54 | ,[],[]); 55 | return null; 56 | } 57 | injectorGetInternal(token:any,requestNodeIndex:number,notFoundResult:any):any { 58 | if (((token === import9.TemplateRef) && (2 === requestNodeIndex))) { return this._TemplateRef_2_5; } 59 | if (((token === import4.NgFor) && (2 === requestNodeIndex))) { return this._NgFor_2_6; } 60 | return notFoundResult; 61 | } 62 | detectChangesInternal(throwOnChange:boolean):void { 63 | const currVal_0:any = this.context.directories; 64 | if (import5.checkBinding(throwOnChange,this._expr_0,currVal_0)) { 65 | this._NgFor_2_6.ngForOf = currVal_0; 66 | this._expr_0 = currVal_0; 67 | } 68 | if (!throwOnChange) { this._NgFor_2_6.ngDoCheck(); } 69 | this.detectContentChildrenChanges(throwOnChange); 70 | this.detectViewChildrenChanges(throwOnChange); 71 | } 72 | } 73 | export function viewFactory_TreeView0(viewUtils:import5.ViewUtils,parentInjector:import6.Injector,declarationEl:import3.AppElement):import1.AppView { 74 | if ((renderType_TreeView === null)) { (renderType_TreeView = viewUtils.createRenderComponentType('/Users/tor/Development/angular2-offline-compiler/src/app/treeview/tree-view.html',0,import11.ViewEncapsulation.None,styles_TreeView)); } 75 | return new _View_TreeView0(viewUtils,parentInjector,declarationEl); 76 | } 77 | class _View_TreeView1 extends import1.AppView { 78 | _el_0:any; 79 | _text_1:any; 80 | _el_2:any; 81 | _text_3:any; 82 | _el_4:any; 83 | _text_5:any; 84 | _anchor_6:any; 85 | private _appEl_6:import3.AppElement; 86 | _TemplateRef_6_5:any; 87 | _NgIf_6_6:import12.NgIf; 88 | _text_7:any; 89 | private _expr_1:any; 90 | private _expr_3:any; 91 | private _expr_4:any; 92 | private _expr_5:any; 93 | constructor(viewUtils:import5.ViewUtils,parentInjector:import6.Injector,declarationEl:import3.AppElement) { 94 | super(_View_TreeView1,renderType_TreeView,import7.ViewType.EMBEDDED,viewUtils,parentInjector,declarationEl,import8.ChangeDetectorStatus.CheckAlways); 95 | } 96 | createInternal(rootSelector:string):import3.AppElement { 97 | this._el_0 = this.renderer.createElement(null,'li',null); 98 | this._text_1 = this.renderer.createText(this._el_0,'\n ',null); 99 | this._el_2 = this.renderer.createElement(this._el_0,'span',null); 100 | this.renderer.setElementAttribute(this._el_2,'class','iconButton'); 101 | this._text_3 = this.renderer.createText(this._el_2,'',null); 102 | this._el_4 = this.renderer.createElement(this._el_0,'input',null); 103 | this.renderer.setElementAttribute(this._el_4,'type','checkbox'); 104 | this._text_5 = this.renderer.createText(this._el_0,'',null); 105 | this._anchor_6 = this.renderer.createTemplateAnchor(this._el_0,null); 106 | this._appEl_6 = new import3.AppElement(6,0,this,this._anchor_6); 107 | this._TemplateRef_6_5 = new import9.TemplateRef_(this._appEl_6,viewFactory_TreeView2); 108 | this._NgIf_6_6 = new import12.NgIf(this._appEl_6.vcRef,this._TemplateRef_6_5); 109 | this._text_7 = this.renderer.createText(this._el_0,'\n ',null); 110 | var disposable_0:Function = this.renderer.listen(this._el_2,'click',this.eventHandler(this._handle_click_2_0.bind(this))); 111 | this._expr_1 = import8.uninitialized; 112 | this._expr_3 = import8.uninitialized; 113 | var disposable_1:Function = this.renderer.listen(this._el_4,'click',this.eventHandler(this._handle_click_4_0.bind(this))); 114 | this._expr_4 = import8.uninitialized; 115 | this._expr_5 = import8.uninitialized; 116 | this.init([].concat([this._el_0]),[ 117 | this._el_0, 118 | this._text_1, 119 | this._el_2, 120 | this._text_3, 121 | this._el_4, 122 | this._text_5, 123 | this._anchor_6, 124 | this._text_7 125 | ] 126 | ,[ 127 | disposable_0, 128 | disposable_1 129 | ] 130 | ,[]); 131 | return null; 132 | } 133 | injectorGetInternal(token:any,requestNodeIndex:number,notFoundResult:any):any { 134 | if (((token === import9.TemplateRef) && (6 === requestNodeIndex))) { return this._TemplateRef_6_5; } 135 | if (((token === import12.NgIf) && (6 === requestNodeIndex))) { return this._NgIf_6_6; } 136 | return notFoundResult; 137 | } 138 | detectChangesInternal(throwOnChange:boolean):void { 139 | const currVal_5:any = this.context.$implicit.expanded; 140 | if (import5.checkBinding(throwOnChange,this._expr_5,currVal_5)) { 141 | this._NgIf_6_6.ngIf = currVal_5; 142 | this._expr_5 = currVal_5; 143 | } 144 | this.detectContentChildrenChanges(throwOnChange); 145 | const currVal_1:any = import5.interpolate(1,'',this.context.$implicit.getIcon(),''); 146 | if (import5.checkBinding(throwOnChange,this._expr_1,currVal_1)) { 147 | this.renderer.setText(this._text_3,currVal_1); 148 | this._expr_1 = currVal_1; 149 | } 150 | const currVal_3:any = this.context.$implicit.checked; 151 | if (import5.checkBinding(throwOnChange,this._expr_3,currVal_3)) { 152 | this.renderer.setElementProperty(this._el_4,'checked',currVal_3); 153 | this._expr_3 = currVal_3; 154 | } 155 | const currVal_4:any = import5.interpolate(1,' ',this.context.$implicit.name,'\n '); 156 | if (import5.checkBinding(throwOnChange,this._expr_4,currVal_4)) { 157 | this.renderer.setText(this._text_5,currVal_4); 158 | this._expr_4 = currVal_4; 159 | } 160 | this.detectViewChildrenChanges(throwOnChange); 161 | } 162 | private _handle_click_2_0($event:any):boolean { 163 | this.markPathToRootAsCheckOnce(); 164 | const pd_0:any = ((this.context.$implicit.toggle()) !== false); 165 | return (true && pd_0); 166 | } 167 | private _handle_click_4_0($event:any):boolean { 168 | this.markPathToRootAsCheckOnce(); 169 | const pd_0:any = ((this.context.$implicit.check()) !== false); 170 | return (true && pd_0); 171 | } 172 | } 173 | function viewFactory_TreeView1(viewUtils:import5.ViewUtils,parentInjector:import6.Injector,declarationEl:import3.AppElement):import1.AppView { 174 | return new _View_TreeView1(viewUtils,parentInjector,declarationEl); 175 | } 176 | class _View_TreeView2 extends import1.AppView { 177 | _el_0:any; 178 | _text_1:any; 179 | _el_2:any; 180 | _text_3:any; 181 | _anchor_4:any; 182 | private _appEl_4:import3.AppElement; 183 | _TemplateRef_4_5:any; 184 | _NgFor_4_6:import4.NgFor; 185 | _text_5:any; 186 | _text_6:any; 187 | _el_7:any; 188 | private _appEl_7:import3.AppElement; 189 | _TreeView_7_4:import2.TreeView; 190 | _text_8:any; 191 | private _expr_0:any; 192 | private _expr_1:any; 193 | constructor(viewUtils:import5.ViewUtils,parentInjector:import6.Injector,declarationEl:import3.AppElement) { 194 | super(_View_TreeView2,renderType_TreeView,import7.ViewType.EMBEDDED,viewUtils,parentInjector,declarationEl,import8.ChangeDetectorStatus.CheckAlways); 195 | } 196 | createInternal(rootSelector:string):import3.AppElement { 197 | this._el_0 = this.renderer.createElement(null,'div',null); 198 | this._text_1 = this.renderer.createText(this._el_0,'\n ',null); 199 | this._el_2 = this.renderer.createElement(this._el_0,'ul',null); 200 | this._text_3 = this.renderer.createText(this._el_2,'\n ',null); 201 | this._anchor_4 = this.renderer.createTemplateAnchor(this._el_2,null); 202 | this._appEl_4 = new import3.AppElement(4,2,this,this._anchor_4); 203 | this._TemplateRef_4_5 = new import9.TemplateRef_(this._appEl_4,viewFactory_TreeView3); 204 | this._NgFor_4_6 = new import4.NgFor(this._appEl_4.vcRef,this._TemplateRef_4_5,this.parent.parent.parentInjector.get(import10.IterableDiffers),this.parent.parent.ref); 205 | this._text_5 = this.renderer.createText(this._el_2,'\n ',null); 206 | this._text_6 = this.renderer.createText(this._el_0,'\n ',null); 207 | this._el_7 = this.renderer.createElement(this._el_0,'tree-view',null); 208 | this._appEl_7 = new import3.AppElement(7,0,this,this._el_7); 209 | var compView_7:any = viewFactory_TreeView0(this.viewUtils,this.injector(7),this._appEl_7); 210 | this._TreeView_7_4 = new import2.TreeView(); 211 | this._appEl_7.initComponent(this._TreeView_7_4,[],compView_7); 212 | compView_7.create(this._TreeView_7_4,[],null); 213 | this._text_8 = this.renderer.createText(this._el_0,'\n ',null); 214 | this._expr_0 = import8.uninitialized; 215 | this._expr_1 = import8.uninitialized; 216 | this.init([].concat([this._el_0]),[ 217 | this._el_0, 218 | this._text_1, 219 | this._el_2, 220 | this._text_3, 221 | this._anchor_4, 222 | this._text_5, 223 | this._text_6, 224 | this._el_7, 225 | this._text_8 226 | ] 227 | ,[],[]); 228 | return null; 229 | } 230 | injectorGetInternal(token:any,requestNodeIndex:number,notFoundResult:any):any { 231 | if (((token === import9.TemplateRef) && (4 === requestNodeIndex))) { return this._TemplateRef_4_5; } 232 | if (((token === import4.NgFor) && (4 === requestNodeIndex))) { return this._NgFor_4_6; } 233 | if (((token === import2.TreeView) && (7 === requestNodeIndex))) { return this._TreeView_7_4; } 234 | return notFoundResult; 235 | } 236 | detectChangesInternal(throwOnChange:boolean):void { 237 | const currVal_0:any = this.parent.context.$implicit.files; 238 | if (import5.checkBinding(throwOnChange,this._expr_0,currVal_0)) { 239 | this._NgFor_4_6.ngForOf = currVal_0; 240 | this._expr_0 = currVal_0; 241 | } 242 | if (!throwOnChange) { this._NgFor_4_6.ngDoCheck(); } 243 | const currVal_1:any = this.parent.context.$implicit.directories; 244 | if (import5.checkBinding(throwOnChange,this._expr_1,currVal_1)) { 245 | this._TreeView_7_4.directories = currVal_1; 246 | this._expr_1 = currVal_1; 247 | } 248 | this.detectContentChildrenChanges(throwOnChange); 249 | this.detectViewChildrenChanges(throwOnChange); 250 | } 251 | } 252 | function viewFactory_TreeView2(viewUtils:import5.ViewUtils,parentInjector:import6.Injector,declarationEl:import3.AppElement):import1.AppView { 253 | return new _View_TreeView2(viewUtils,parentInjector,declarationEl); 254 | } 255 | class _View_TreeView3 extends import1.AppView { 256 | _el_0:any; 257 | _text_1:any; 258 | private _expr_0:any; 259 | constructor(viewUtils:import5.ViewUtils,parentInjector:import6.Injector,declarationEl:import3.AppElement) { 260 | super(_View_TreeView3,renderType_TreeView,import7.ViewType.EMBEDDED,viewUtils,parentInjector,declarationEl,import8.ChangeDetectorStatus.CheckAlways); 261 | } 262 | createInternal(rootSelector:string):import3.AppElement { 263 | this._el_0 = this.renderer.createElement(null,'li',null); 264 | this._text_1 = this.renderer.createText(this._el_0,'',null); 265 | this._expr_0 = import8.uninitialized; 266 | this.init([].concat([this._el_0]),[ 267 | this._el_0, 268 | this._text_1 269 | ] 270 | ,[],[]); 271 | return null; 272 | } 273 | detectChangesInternal(throwOnChange:boolean):void { 274 | this.detectContentChildrenChanges(throwOnChange); 275 | const currVal_0:any = import5.interpolate(1,'',this.context.$implicit,''); 276 | if (import5.checkBinding(throwOnChange,this._expr_0,currVal_0)) { 277 | this.renderer.setText(this._text_1,currVal_0); 278 | this._expr_0 = currVal_0; 279 | } 280 | this.detectViewChildrenChanges(throwOnChange); 281 | } 282 | } 283 | function viewFactory_TreeView3(viewUtils:import5.ViewUtils,parentInjector:import6.Injector,declarationEl:import3.AppElement):import1.AppView { 284 | return new _View_TreeView3(viewUtils,parentInjector,declarationEl); 285 | } 286 | var renderType_TreeView_Host:import0.RenderComponentType = null; 287 | class _View_TreeView_Host0 extends import1.AppView { 288 | _el_0:any; 289 | private _appEl_0:import3.AppElement; 290 | _TreeView_0_4:import2.TreeView; 291 | constructor(viewUtils:import5.ViewUtils,parentInjector:import6.Injector,declarationEl:import3.AppElement) { 292 | super(_View_TreeView_Host0,renderType_TreeView_Host,import7.ViewType.HOST,viewUtils,parentInjector,declarationEl,import8.ChangeDetectorStatus.CheckAlways); 293 | } 294 | createInternal(rootSelector:string):import3.AppElement { 295 | this._el_0 = this.selectOrCreateHostElement('tree-view',rootSelector,null); 296 | this._appEl_0 = new import3.AppElement(0,null,this,this._el_0); 297 | var compView_0:any = viewFactory_TreeView0(this.viewUtils,this.injector(0),this._appEl_0); 298 | this._TreeView_0_4 = new import2.TreeView(); 299 | this._appEl_0.initComponent(this._TreeView_0_4,[],compView_0); 300 | compView_0.create(this._TreeView_0_4,this.projectableNodes,null); 301 | this.init([].concat([this._el_0]),[this._el_0],[],[]); 302 | return this._appEl_0; 303 | } 304 | injectorGetInternal(token:any,requestNodeIndex:number,notFoundResult:any):any { 305 | if (((token === import2.TreeView) && (0 === requestNodeIndex))) { return this._TreeView_0_4; } 306 | return notFoundResult; 307 | } 308 | } 309 | function viewFactory_TreeView_Host0(viewUtils:import5.ViewUtils,parentInjector:import6.Injector,declarationEl:import3.AppElement):import1.AppView { 310 | if ((renderType_TreeView_Host === null)) { (renderType_TreeView_Host = viewUtils.createRenderComponentType('',0,null,[])); } 311 | return new _View_TreeView_Host0(viewUtils,parentInjector,declarationEl); 312 | } 313 | export const TreeViewNgFactory:import13.ComponentFactory = new import13.ComponentFactory('tree-view',viewFactory_TreeView_Host0,import2.TreeView); -------------------------------------------------------------------------------- /src/app/treeview/directory.js: -------------------------------------------------------------------------------- 1 | System.register([], function(exports_1, context_1) { 2 | "use strict"; 3 | var __moduleName = context_1 && context_1.id; 4 | var Directory; 5 | return { 6 | setters:[], 7 | execute: function() { 8 | Directory = (function () { 9 | function Directory(name, directories, files) { 10 | this.name = name; 11 | this.directories = directories; 12 | this.files = files; 13 | this.expanded = true; 14 | this.checked = false; 15 | } 16 | Directory.prototype.toggle = function () { 17 | this.expanded = !this.expanded; 18 | }; 19 | Directory.prototype.getIcon = function () { 20 | if (this.expanded) { 21 | return '-'; 22 | } 23 | return '+'; 24 | }; 25 | Directory.prototype.check = function () { 26 | this.checked = !this.checked; 27 | this.checkRecursive(this.checked); 28 | }; 29 | Directory.prototype.checkRecursive = function (state) { 30 | this.directories.forEach(function (d) { 31 | d.checked = state; 32 | d.checkRecursive(state); 33 | }); 34 | }; 35 | return Directory; 36 | }()); 37 | exports_1("Directory", Directory); 38 | } 39 | } 40 | }); 41 | //# sourceMappingURL=directory.js.map -------------------------------------------------------------------------------- /src/app/treeview/directory.ts: -------------------------------------------------------------------------------- 1 | export class Directory{ 2 | 3 | expanded = true; 4 | checked = false; 5 | 6 | constructor(public name:string, 7 | public directories:Array, 8 | public files:Array) { 9 | } 10 | 11 | toggle(){ 12 | this.expanded = !this.expanded; 13 | } 14 | 15 | getIcon(){ 16 | 17 | if(this.expanded){ 18 | return '-'; 19 | } 20 | 21 | return '+'; 22 | } 23 | 24 | check(){ 25 | this.checked = !this.checked; 26 | this.checkRecursive(this.checked); 27 | } 28 | 29 | checkRecursive(state:boolean){ 30 | this.directories.forEach(d => { 31 | d.checked = state; 32 | d.checkRecursive(state); 33 | }); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/app/treeview/tree-view-demo.ngfactory.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is generated by the Angular 2 template compiler. 3 | * Do not edit. 4 | */ 5 | /* tslint:disable */ 6 | 7 | import * as import0 from '@angular/core/src/render/api'; 8 | import * as import1 from '@angular/core/src/linker/view'; 9 | import * as import2 from '@angular/core/src/linker/element'; 10 | import * as import3 from './tree-view-demo'; 11 | import * as import4 from '@angular/core/src/linker/view_utils'; 12 | import * as import5 from '@angular/core/src/di/injector'; 13 | import * as import6 from '@angular/core/src/linker/view_type'; 14 | import * as import7 from '@angular/core/src/change_detection/change_detection'; 15 | import * as import8 from '@angular/core/src/linker/component_factory'; 16 | import * as import9 from './tree-view'; 17 | import * as import10 from './tree-view.ngfactory'; 18 | import * as import11 from '@angular/core/src/metadata/view'; 19 | var renderType_TreeViewDemo_Host:import0.RenderComponentType = null; 20 | class _View_TreeViewDemo_Host0 extends import1.AppView { 21 | _el_0:any; 22 | private _appEl_0:import2.AppElement; 23 | _TreeViewDemo_0_4:import3.TreeViewDemo; 24 | constructor(viewUtils:import4.ViewUtils,parentInjector:import5.Injector,declarationEl:import2.AppElement) { 25 | super(_View_TreeViewDemo_Host0,renderType_TreeViewDemo_Host,import6.ViewType.HOST,viewUtils,parentInjector,declarationEl,import7.ChangeDetectorStatus.CheckAlways); 26 | } 27 | createInternal(rootSelector:string):import2.AppElement { 28 | this._el_0 = this.selectOrCreateHostElement('treeview',rootSelector,null); 29 | this._appEl_0 = new import2.AppElement(0,null,this,this._el_0); 30 | var compView_0:any = viewFactory_TreeViewDemo0(this.viewUtils,this.injector(0),this._appEl_0); 31 | this._TreeViewDemo_0_4 = new import3.TreeViewDemo(); 32 | this._appEl_0.initComponent(this._TreeViewDemo_0_4,[],compView_0); 33 | compView_0.create(this._TreeViewDemo_0_4,this.projectableNodes,null); 34 | this.init([].concat([this._el_0]),[this._el_0],[],[]); 35 | return this._appEl_0; 36 | } 37 | injectorGetInternal(token:any,requestNodeIndex:number,notFoundResult:any):any { 38 | if (((token === import3.TreeViewDemo) && (0 === requestNodeIndex))) { return this._TreeViewDemo_0_4; } 39 | return notFoundResult; 40 | } 41 | } 42 | function viewFactory_TreeViewDemo_Host0(viewUtils:import4.ViewUtils,parentInjector:import5.Injector,declarationEl:import2.AppElement):import1.AppView { 43 | if ((renderType_TreeViewDemo_Host === null)) { (renderType_TreeViewDemo_Host = viewUtils.createRenderComponentType('',0,null,[],{})); } 44 | return new _View_TreeViewDemo_Host0(viewUtils,parentInjector,declarationEl); 45 | } 46 | export const TreeViewDemoNgFactory:import8.ComponentFactory = new import8.ComponentFactory('treeview',viewFactory_TreeViewDemo_Host0,import3.TreeViewDemo); 47 | const styles_TreeViewDemo:any[] = []; 48 | var renderType_TreeViewDemo:import0.RenderComponentType = null; 49 | class _View_TreeViewDemo0 extends import1.AppView { 50 | _el_0:any; 51 | _text_1:any; 52 | _el_2:any; 53 | private _appEl_2:import2.AppElement; 54 | _TreeView_2_4:import9.TreeView; 55 | _text_3:any; 56 | _el_4:any; 57 | _el_5:any; 58 | _text_6:any; 59 | private _expr_0:any; 60 | constructor(viewUtils:import4.ViewUtils,parentInjector:import5.Injector,declarationEl:import2.AppElement) { 61 | super(_View_TreeViewDemo0,renderType_TreeViewDemo,import6.ViewType.COMPONENT,viewUtils,parentInjector,declarationEl,import7.ChangeDetectorStatus.CheckAlways); 62 | } 63 | createInternal(rootSelector:string):import2.AppElement { 64 | const parentRenderNode:any = this.renderer.createViewRoot(this.declarationAppElement.nativeElement); 65 | this._el_0 = this.renderer.createElement(parentRenderNode,'h1',null); 66 | this._text_1 = this.renderer.createText(this._el_0,'Recursive TreeView',null); 67 | this._el_2 = this.renderer.createElement(parentRenderNode,'tree-view',null); 68 | this._appEl_2 = new import2.AppElement(2,null,this,this._el_2); 69 | var compView_2:any = import10.viewFactory_TreeView0(this.viewUtils,this.injector(2),this._appEl_2); 70 | this._TreeView_2_4 = new import9.TreeView(); 71 | this._appEl_2.initComponent(this._TreeView_2_4,[],compView_2); 72 | compView_2.create(this._TreeView_2_4,[],null); 73 | this._text_3 = this.renderer.createText(parentRenderNode,' ',null); 74 | this._el_4 = this.renderer.createElement(parentRenderNode,'h4',null); 75 | this._el_5 = this.renderer.createElement(this._el_4,'a',null); 76 | this.renderer.setElementAttribute(this._el_5,'href','http://www.syntaxsuccess.com/viewarticle/recursive-treeview-in-angular-2.0'); 77 | this._text_6 = this.renderer.createText(this._el_5,'Read more here',null); 78 | this._expr_0 = import7.UNINITIALIZED; 79 | this.init([],[ 80 | this._el_0, 81 | this._text_1, 82 | this._el_2, 83 | this._text_3, 84 | this._el_4, 85 | this._el_5, 86 | this._text_6 87 | ] 88 | ,[],[]); 89 | return null; 90 | } 91 | injectorGetInternal(token:any,requestNodeIndex:number,notFoundResult:any):any { 92 | if (((token === import9.TreeView) && (2 === requestNodeIndex))) { return this._TreeView_2_4; } 93 | return notFoundResult; 94 | } 95 | detectChangesInternal(throwOnChange:boolean):void { 96 | const currVal_0:any = this.context.directories; 97 | if (import4.checkBinding(throwOnChange,this._expr_0,currVal_0)) { 98 | this._TreeView_2_4.directories = currVal_0; 99 | this._expr_0 = currVal_0; 100 | } 101 | this.detectContentChildrenChanges(throwOnChange); 102 | this.detectViewChildrenChanges(throwOnChange); 103 | } 104 | } 105 | export function viewFactory_TreeViewDemo0(viewUtils:import4.ViewUtils,parentInjector:import5.Injector,declarationEl:import2.AppElement):import1.AppView { 106 | if ((renderType_TreeViewDemo === null)) { (renderType_TreeViewDemo = viewUtils.createRenderComponentType('/Users/tor/Development/angular2-offline-compiler/src/app/treeview/tree-view-demo.ts class TreeViewDemo - inline template',0,import11.ViewEncapsulation.None,styles_TreeViewDemo,{})); } 107 | return new _View_TreeViewDemo0(viewUtils,parentInjector,declarationEl); 108 | } -------------------------------------------------------------------------------- /src/app/treeview/tree-view-demo.ts: -------------------------------------------------------------------------------- 1 | import {Component} from '@angular/core'; 2 | import {TreeView} from './tree-view'; 3 | import {Directory} from './directory'; 4 | 5 | @Component({ 6 | selector: 'treeview', 7 | template: '

Recursive TreeView

' + 8 | '

Read more here

', 9 | directives: [TreeView] 10 | }) 11 | 12 | export class TreeViewDemo { 13 | directories: Array; 14 | 15 | constructor(){ 16 | this.loadDirectories(); 17 | } 18 | 19 | loadDirectories(){ 20 | 21 | const fall2014 = new Directory('Fall 2014',[],['image1.jpg','image2.jpg','image3.jpg']); 22 | const summer2014 = new Directory('Summer 2014',[],['image10.jpg','image20.jpg','image30.jpg']); 23 | const pics = new Directory('Pictures',[summer2014,fall2014],[]); 24 | 25 | const music = new Directory('Music',[],['song1.mp3','song2.mp3']); 26 | 27 | this.directories = [pics,music]; 28 | } 29 | } -------------------------------------------------------------------------------- /src/app/treeview/tree-view.html: -------------------------------------------------------------------------------- 1 |
    2 |
  • 3 | {{dir.getIcon()}} {{ dir.name }} 4 |
    5 |
      6 |
    • {{file}}
    • 7 |
    8 | 9 |
    10 |
  • 11 |
12 | 13 | -------------------------------------------------------------------------------- /src/app/treeview/tree-view.ngfactory.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is generated by the Angular 2 template compiler. 3 | * Do not edit. 4 | */ 5 | /* tslint:disable */ 6 | 7 | import * as import0 from '@angular/core/src/render/api'; 8 | import * as import1 from '@angular/core/src/linker/view'; 9 | import * as import2 from '@angular/core/src/linker/element'; 10 | import * as import3 from './tree-view'; 11 | import * as import4 from '@angular/core/src/linker/view_utils'; 12 | import * as import5 from '@angular/core/src/di/injector'; 13 | import * as import6 from '@angular/core/src/linker/view_type'; 14 | import * as import7 from '@angular/core/src/change_detection/change_detection'; 15 | import * as import8 from '@angular/core/src/linker/component_factory'; 16 | import * as import9 from '@angular/common/src/directives/ng_for'; 17 | import * as import10 from '@angular/core/src/linker/template_ref'; 18 | import * as import11 from '@angular/core/src/change_detection/differs/iterable_differs'; 19 | import * as import12 from '@angular/core/src/metadata/view'; 20 | import * as import13 from '@angular/common/src/directives/ng_if'; 21 | var renderType_TreeView_Host:import0.RenderComponentType = null; 22 | class _View_TreeView_Host0 extends import1.AppView { 23 | _el_0:any; 24 | private _appEl_0:import2.AppElement; 25 | _TreeView_0_4:import3.TreeView; 26 | constructor(viewUtils:import4.ViewUtils,parentInjector:import5.Injector,declarationEl:import2.AppElement) { 27 | super(_View_TreeView_Host0,renderType_TreeView_Host,import6.ViewType.HOST,viewUtils,parentInjector,declarationEl,import7.ChangeDetectorStatus.CheckAlways); 28 | } 29 | createInternal(rootSelector:string):import2.AppElement { 30 | this._el_0 = this.selectOrCreateHostElement('tree-view',rootSelector,null); 31 | this._appEl_0 = new import2.AppElement(0,null,this,this._el_0); 32 | var compView_0:any = viewFactory_TreeView0(this.viewUtils,this.injector(0),this._appEl_0); 33 | this._TreeView_0_4 = new import3.TreeView(); 34 | this._appEl_0.initComponent(this._TreeView_0_4,[],compView_0); 35 | compView_0.create(this._TreeView_0_4,this.projectableNodes,null); 36 | this.init([].concat([this._el_0]),[this._el_0],[],[]); 37 | return this._appEl_0; 38 | } 39 | injectorGetInternal(token:any,requestNodeIndex:number,notFoundResult:any):any { 40 | if (((token === import3.TreeView) && (0 === requestNodeIndex))) { return this._TreeView_0_4; } 41 | return notFoundResult; 42 | } 43 | } 44 | function viewFactory_TreeView_Host0(viewUtils:import4.ViewUtils,parentInjector:import5.Injector,declarationEl:import2.AppElement):import1.AppView { 45 | if ((renderType_TreeView_Host === null)) { (renderType_TreeView_Host = viewUtils.createRenderComponentType('',0,null,[],{})); } 46 | return new _View_TreeView_Host0(viewUtils,parentInjector,declarationEl); 47 | } 48 | export const TreeViewNgFactory:import8.ComponentFactory = new import8.ComponentFactory('tree-view',viewFactory_TreeView_Host0,import3.TreeView); 49 | const styles_TreeView:any[] = []; 50 | var renderType_TreeView:import0.RenderComponentType = null; 51 | class _View_TreeView0 extends import1.AppView { 52 | _el_0:any; 53 | _text_1:any; 54 | _anchor_2:any; 55 | private _appEl_2:import2.AppElement; 56 | _TemplateRef_2_5:any; 57 | _NgFor_2_6:import9.NgFor; 58 | _text_3:any; 59 | _text_4:any; 60 | private _expr_0:any; 61 | constructor(viewUtils:import4.ViewUtils,parentInjector:import5.Injector,declarationEl:import2.AppElement) { 62 | super(_View_TreeView0,renderType_TreeView,import6.ViewType.COMPONENT,viewUtils,parentInjector,declarationEl,import7.ChangeDetectorStatus.CheckAlways); 63 | } 64 | createInternal(rootSelector:string):import2.AppElement { 65 | const parentRenderNode:any = this.renderer.createViewRoot(this.declarationAppElement.nativeElement); 66 | this._el_0 = this.renderer.createElement(parentRenderNode,'ul',null); 67 | this._text_1 = this.renderer.createText(this._el_0,'\n ',null); 68 | this._anchor_2 = this.renderer.createTemplateAnchor(this._el_0,null); 69 | this._appEl_2 = new import2.AppElement(2,0,this,this._anchor_2); 70 | this._TemplateRef_2_5 = new import10.TemplateRef_(this._appEl_2,viewFactory_TreeView1); 71 | this._NgFor_2_6 = new import9.NgFor(this._appEl_2.vcRef,this._TemplateRef_2_5,this.parentInjector.get(import11.IterableDiffers),this.ref); 72 | this._text_3 = this.renderer.createText(this._el_0,'\n',null); 73 | this._text_4 = this.renderer.createText(parentRenderNode,'\n\n',null); 74 | this._expr_0 = import7.UNINITIALIZED; 75 | this.init([],[ 76 | this._el_0, 77 | this._text_1, 78 | this._anchor_2, 79 | this._text_3, 80 | this._text_4 81 | ] 82 | ,[],[]); 83 | return null; 84 | } 85 | injectorGetInternal(token:any,requestNodeIndex:number,notFoundResult:any):any { 86 | if (((token === import10.TemplateRef) && (2 === requestNodeIndex))) { return this._TemplateRef_2_5; } 87 | if (((token === import9.NgFor) && (2 === requestNodeIndex))) { return this._NgFor_2_6; } 88 | return notFoundResult; 89 | } 90 | detectChangesInternal(throwOnChange:boolean):void { 91 | var changes:{[key: string]:import7.SimpleChange} = null; 92 | changes = null; 93 | const currVal_0:any = this.context.directories; 94 | if (import4.checkBinding(throwOnChange,this._expr_0,currVal_0)) { 95 | this._NgFor_2_6.ngForOf = currVal_0; 96 | if ((changes === null)) { (changes = {}); } 97 | changes['ngForOf'] = new import7.SimpleChange(this._expr_0,currVal_0); 98 | this._expr_0 = currVal_0; 99 | } 100 | if ((changes !== null)) { this._NgFor_2_6.ngOnChanges(changes); } 101 | if (!throwOnChange) { this._NgFor_2_6.ngDoCheck(); } 102 | this.detectContentChildrenChanges(throwOnChange); 103 | this.detectViewChildrenChanges(throwOnChange); 104 | } 105 | } 106 | export function viewFactory_TreeView0(viewUtils:import4.ViewUtils,parentInjector:import5.Injector,declarationEl:import2.AppElement):import1.AppView { 107 | if ((renderType_TreeView === null)) { (renderType_TreeView = viewUtils.createRenderComponentType('/Users/tor/Development/angular2-offline-compiler/src/app/treeview/tree-view.html',0,import12.ViewEncapsulation.None,styles_TreeView,{})); } 108 | return new _View_TreeView0(viewUtils,parentInjector,declarationEl); 109 | } 110 | class _View_TreeView1 extends import1.AppView { 111 | _el_0:any; 112 | _text_1:any; 113 | _el_2:any; 114 | _text_3:any; 115 | _el_4:any; 116 | _text_5:any; 117 | _anchor_6:any; 118 | private _appEl_6:import2.AppElement; 119 | _TemplateRef_6_5:any; 120 | _NgIf_6_6:import13.NgIf; 121 | _text_7:any; 122 | private _expr_1:any; 123 | private _expr_3:any; 124 | private _expr_4:any; 125 | private _expr_5:any; 126 | constructor(viewUtils:import4.ViewUtils,parentInjector:import5.Injector,declarationEl:import2.AppElement) { 127 | super(_View_TreeView1,renderType_TreeView,import6.ViewType.EMBEDDED,viewUtils,parentInjector,declarationEl,import7.ChangeDetectorStatus.CheckAlways); 128 | } 129 | createInternal(rootSelector:string):import2.AppElement { 130 | this._el_0 = this.renderer.createElement(null,'li',null); 131 | this._text_1 = this.renderer.createText(this._el_0,'\n ',null); 132 | this._el_2 = this.renderer.createElement(this._el_0,'span',null); 133 | this.renderer.setElementAttribute(this._el_2,'class','iconButton'); 134 | this._text_3 = this.renderer.createText(this._el_2,'',null); 135 | this._el_4 = this.renderer.createElement(this._el_0,'input',null); 136 | this.renderer.setElementAttribute(this._el_4,'type','checkbox'); 137 | this._text_5 = this.renderer.createText(this._el_0,'',null); 138 | this._anchor_6 = this.renderer.createTemplateAnchor(this._el_0,null); 139 | this._appEl_6 = new import2.AppElement(6,0,this,this._anchor_6); 140 | this._TemplateRef_6_5 = new import10.TemplateRef_(this._appEl_6,viewFactory_TreeView2); 141 | this._NgIf_6_6 = new import13.NgIf(this._appEl_6.vcRef,this._TemplateRef_6_5); 142 | this._text_7 = this.renderer.createText(this._el_0,'\n ',null); 143 | var disposable_0:Function = this.renderer.listen(this._el_2,'click',this.eventHandler(this._handle_click_2_0.bind(this))); 144 | this._expr_1 = import7.UNINITIALIZED; 145 | this._expr_3 = import7.UNINITIALIZED; 146 | var disposable_1:Function = this.renderer.listen(this._el_4,'click',this.eventHandler(this._handle_click_4_0.bind(this))); 147 | this._expr_4 = import7.UNINITIALIZED; 148 | this._expr_5 = import7.UNINITIALIZED; 149 | this.init([].concat([this._el_0]),[ 150 | this._el_0, 151 | this._text_1, 152 | this._el_2, 153 | this._text_3, 154 | this._el_4, 155 | this._text_5, 156 | this._anchor_6, 157 | this._text_7 158 | ] 159 | ,[ 160 | disposable_0, 161 | disposable_1 162 | ] 163 | ,[]); 164 | return null; 165 | } 166 | injectorGetInternal(token:any,requestNodeIndex:number,notFoundResult:any):any { 167 | if (((token === import10.TemplateRef) && (6 === requestNodeIndex))) { return this._TemplateRef_6_5; } 168 | if (((token === import13.NgIf) && (6 === requestNodeIndex))) { return this._NgIf_6_6; } 169 | return notFoundResult; 170 | } 171 | detectChangesInternal(throwOnChange:boolean):void { 172 | const currVal_5:any = this.context.$implicit.expanded; 173 | if (import4.checkBinding(throwOnChange,this._expr_5,currVal_5)) { 174 | this._NgIf_6_6.ngIf = currVal_5; 175 | this._expr_5 = currVal_5; 176 | } 177 | this.detectContentChildrenChanges(throwOnChange); 178 | const currVal_1:any = import4.interpolate(1,'',this.context.$implicit.getIcon(),''); 179 | if (import4.checkBinding(throwOnChange,this._expr_1,currVal_1)) { 180 | this.renderer.setText(this._text_3,currVal_1); 181 | this._expr_1 = currVal_1; 182 | } 183 | const currVal_3:any = this.context.$implicit.checked; 184 | if (import4.checkBinding(throwOnChange,this._expr_3,currVal_3)) { 185 | this.renderer.setElementProperty(this._el_4,'checked',currVal_3); 186 | this._expr_3 = currVal_3; 187 | } 188 | const currVal_4:any = import4.interpolate(1,' ',this.context.$implicit.name,'\n '); 189 | if (import4.checkBinding(throwOnChange,this._expr_4,currVal_4)) { 190 | this.renderer.setText(this._text_5,currVal_4); 191 | this._expr_4 = currVal_4; 192 | } 193 | this.detectViewChildrenChanges(throwOnChange); 194 | } 195 | private _handle_click_2_0($event:any):boolean { 196 | this.markPathToRootAsCheckOnce(); 197 | const pd_0:any = ((this.context.$implicit.toggle()) !== false); 198 | return (true && pd_0); 199 | } 200 | private _handle_click_4_0($event:any):boolean { 201 | this.markPathToRootAsCheckOnce(); 202 | const pd_0:any = ((this.context.$implicit.check()) !== false); 203 | return (true && pd_0); 204 | } 205 | } 206 | function viewFactory_TreeView1(viewUtils:import4.ViewUtils,parentInjector:import5.Injector,declarationEl:import2.AppElement):import1.AppView { 207 | return new _View_TreeView1(viewUtils,parentInjector,declarationEl); 208 | } 209 | class _View_TreeView2 extends import1.AppView { 210 | _el_0:any; 211 | _text_1:any; 212 | _el_2:any; 213 | _text_3:any; 214 | _anchor_4:any; 215 | private _appEl_4:import2.AppElement; 216 | _TemplateRef_4_5:any; 217 | _NgFor_4_6:import9.NgFor; 218 | _text_5:any; 219 | _text_6:any; 220 | _el_7:any; 221 | private _appEl_7:import2.AppElement; 222 | _TreeView_7_4:import3.TreeView; 223 | _text_8:any; 224 | private _expr_0:any; 225 | private _expr_1:any; 226 | constructor(viewUtils:import4.ViewUtils,parentInjector:import5.Injector,declarationEl:import2.AppElement) { 227 | super(_View_TreeView2,renderType_TreeView,import6.ViewType.EMBEDDED,viewUtils,parentInjector,declarationEl,import7.ChangeDetectorStatus.CheckAlways); 228 | } 229 | createInternal(rootSelector:string):import2.AppElement { 230 | this._el_0 = this.renderer.createElement(null,'div',null); 231 | this._text_1 = this.renderer.createText(this._el_0,'\n ',null); 232 | this._el_2 = this.renderer.createElement(this._el_0,'ul',null); 233 | this._text_3 = this.renderer.createText(this._el_2,'\n ',null); 234 | this._anchor_4 = this.renderer.createTemplateAnchor(this._el_2,null); 235 | this._appEl_4 = new import2.AppElement(4,2,this,this._anchor_4); 236 | this._TemplateRef_4_5 = new import10.TemplateRef_(this._appEl_4,viewFactory_TreeView3); 237 | this._NgFor_4_6 = new import9.NgFor(this._appEl_4.vcRef,this._TemplateRef_4_5,this.parent.parent.parentInjector.get(import11.IterableDiffers),this.parent.parent.ref); 238 | this._text_5 = this.renderer.createText(this._el_2,'\n ',null); 239 | this._text_6 = this.renderer.createText(this._el_0,'\n ',null); 240 | this._el_7 = this.renderer.createElement(this._el_0,'tree-view',null); 241 | this._appEl_7 = new import2.AppElement(7,0,this,this._el_7); 242 | var compView_7:any = viewFactory_TreeView0(this.viewUtils,this.injector(7),this._appEl_7); 243 | this._TreeView_7_4 = new import3.TreeView(); 244 | this._appEl_7.initComponent(this._TreeView_7_4,[],compView_7); 245 | compView_7.create(this._TreeView_7_4,[],null); 246 | this._text_8 = this.renderer.createText(this._el_0,'\n ',null); 247 | this._expr_0 = import7.UNINITIALIZED; 248 | this._expr_1 = import7.UNINITIALIZED; 249 | this.init([].concat([this._el_0]),[ 250 | this._el_0, 251 | this._text_1, 252 | this._el_2, 253 | this._text_3, 254 | this._anchor_4, 255 | this._text_5, 256 | this._text_6, 257 | this._el_7, 258 | this._text_8 259 | ] 260 | ,[],[]); 261 | return null; 262 | } 263 | injectorGetInternal(token:any,requestNodeIndex:number,notFoundResult:any):any { 264 | if (((token === import10.TemplateRef) && (4 === requestNodeIndex))) { return this._TemplateRef_4_5; } 265 | if (((token === import9.NgFor) && (4 === requestNodeIndex))) { return this._NgFor_4_6; } 266 | if (((token === import3.TreeView) && (7 === requestNodeIndex))) { return this._TreeView_7_4; } 267 | return notFoundResult; 268 | } 269 | detectChangesInternal(throwOnChange:boolean):void { 270 | var changes:{[key: string]:import7.SimpleChange} = null; 271 | changes = null; 272 | const currVal_0:any = this.parent.context.$implicit.files; 273 | if (import4.checkBinding(throwOnChange,this._expr_0,currVal_0)) { 274 | this._NgFor_4_6.ngForOf = currVal_0; 275 | if ((changes === null)) { (changes = {}); } 276 | changes['ngForOf'] = new import7.SimpleChange(this._expr_0,currVal_0); 277 | this._expr_0 = currVal_0; 278 | } 279 | if ((changes !== null)) { this._NgFor_4_6.ngOnChanges(changes); } 280 | if (!throwOnChange) { this._NgFor_4_6.ngDoCheck(); } 281 | const currVal_1:any = this.parent.context.$implicit.directories; 282 | if (import4.checkBinding(throwOnChange,this._expr_1,currVal_1)) { 283 | this._TreeView_7_4.directories = currVal_1; 284 | this._expr_1 = currVal_1; 285 | } 286 | this.detectContentChildrenChanges(throwOnChange); 287 | this.detectViewChildrenChanges(throwOnChange); 288 | } 289 | } 290 | function viewFactory_TreeView2(viewUtils:import4.ViewUtils,parentInjector:import5.Injector,declarationEl:import2.AppElement):import1.AppView { 291 | return new _View_TreeView2(viewUtils,parentInjector,declarationEl); 292 | } 293 | class _View_TreeView3 extends import1.AppView { 294 | _el_0:any; 295 | _text_1:any; 296 | private _expr_0:any; 297 | constructor(viewUtils:import4.ViewUtils,parentInjector:import5.Injector,declarationEl:import2.AppElement) { 298 | super(_View_TreeView3,renderType_TreeView,import6.ViewType.EMBEDDED,viewUtils,parentInjector,declarationEl,import7.ChangeDetectorStatus.CheckAlways); 299 | } 300 | createInternal(rootSelector:string):import2.AppElement { 301 | this._el_0 = this.renderer.createElement(null,'li',null); 302 | this._text_1 = this.renderer.createText(this._el_0,'',null); 303 | this._expr_0 = import7.UNINITIALIZED; 304 | this.init([].concat([this._el_0]),[ 305 | this._el_0, 306 | this._text_1 307 | ] 308 | ,[],[]); 309 | return null; 310 | } 311 | detectChangesInternal(throwOnChange:boolean):void { 312 | this.detectContentChildrenChanges(throwOnChange); 313 | const currVal_0:any = import4.interpolate(1,'',this.context.$implicit,''); 314 | if (import4.checkBinding(throwOnChange,this._expr_0,currVal_0)) { 315 | this.renderer.setText(this._text_1,currVal_0); 316 | this._expr_0 = currVal_0; 317 | } 318 | this.detectViewChildrenChanges(throwOnChange); 319 | } 320 | } 321 | function viewFactory_TreeView3(viewUtils:import4.ViewUtils,parentInjector:import5.Injector,declarationEl:import2.AppElement):import1.AppView { 322 | return new _View_TreeView3(viewUtils,parentInjector,declarationEl); 323 | } -------------------------------------------------------------------------------- /src/app/treeview/tree-view.ts: -------------------------------------------------------------------------------- 1 | import {Component, Input} from '@angular/core'; 2 | import {NgIf, NgFor} from '@angular/common'; 3 | import {Directory} from './directory'; 4 | 5 | @Component({ 6 | selector: 'tree-view', 7 | templateUrl: './tree-view.html', 8 | directives: [TreeView, NgIf, NgFor] 9 | }) 10 | 11 | export class TreeView { 12 | @Input() directories: Array; 13 | } -------------------------------------------------------------------------------- /src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thelgevold/angular2-offline-compiler/d6ff04102f535867ec1f59a2d044085ffad907ad/src/favicon.ico -------------------------------------------------------------------------------- /src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | OfflineCompiler 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 21 | 22 | 23 | Loading... 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- 1 | import { platformBrowser } from '@angular/platform-browser'; 2 | 3 | import { AppModuleNgFactory } from './app/app.module.ngfactory'; 4 | 5 | platformBrowser().bootstrapModuleFactory(AppModuleNgFactory); -------------------------------------------------------------------------------- /src/node_modules/@angular/common/index.d.ngfactory.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is generated by the Angular 2 template compiler. 3 | * Do not edit. 4 | */ 5 | /* tslint:disable */ 6 | 7 | import * as import0 from '@angular/core/src/linker/ng_module_factory'; 8 | import * as import1 from '@angular/common/index'; 9 | import * as import2 from '@angular/core/src/di/injector'; 10 | class CommonModuleInjector extends import0.NgModuleInjector { 11 | _CommonModule_0:import1.CommonModule; 12 | constructor(parent:import2.Injector) { 13 | super(parent,[],[]); 14 | } 15 | createInternal():import1.CommonModule { 16 | this._CommonModule_0 = new import1.CommonModule(); 17 | return this._CommonModule_0; 18 | } 19 | getInternal(token:any,notFoundResult:any):any { 20 | if ((token === import1.CommonModule)) { return this._CommonModule_0; } 21 | return notFoundResult; 22 | } 23 | destroyInternal():void { 24 | } 25 | } 26 | export const CommonModuleNgFactory:import0.NgModuleFactory = new import0.NgModuleFactory(CommonModuleInjector,import1.CommonModule); -------------------------------------------------------------------------------- /src/node_modules/@angular/common/src/forms-deprecated.d.ngfactory.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is generated by the Angular 2 template compiler. 3 | * Do not edit. 4 | */ 5 | /* tslint:disable */ 6 | 7 | import * as import0 from '@angular/core/src/linker/ng_module_factory'; 8 | import * as import1 from '@angular/common/src/forms-deprecated'; 9 | import * as import2 from '@angular/common/src/forms-deprecated/form_builder'; 10 | import * as import3 from '@angular/common/src/forms-deprecated/directives/radio_control_value_accessor'; 11 | import * as import4 from '@angular/core/src/di/injector'; 12 | class DeprecatedFormsModuleInjector extends import0.NgModuleInjector { 13 | _DeprecatedFormsModule_0:import1.DeprecatedFormsModule; 14 | __FormBuilder_1:import2.FormBuilder; 15 | __RadioControlRegistry_2:import3.RadioControlRegistry; 16 | constructor(parent:import4.Injector) { 17 | super(parent,[],[]); 18 | } 19 | get _FormBuilder_1():import2.FormBuilder { 20 | if ((this.__FormBuilder_1 == null)) { (this.__FormBuilder_1 = new import2.FormBuilder()); } 21 | return this.__FormBuilder_1; 22 | } 23 | get _RadioControlRegistry_2():import3.RadioControlRegistry { 24 | if ((this.__RadioControlRegistry_2 == null)) { (this.__RadioControlRegistry_2 = new import3.RadioControlRegistry()); } 25 | return this.__RadioControlRegistry_2; 26 | } 27 | createInternal():import1.DeprecatedFormsModule { 28 | this._DeprecatedFormsModule_0 = new import1.DeprecatedFormsModule(); 29 | return this._DeprecatedFormsModule_0; 30 | } 31 | getInternal(token:any,notFoundResult:any):any { 32 | if ((token === import1.DeprecatedFormsModule)) { return this._DeprecatedFormsModule_0; } 33 | if ((token === import2.FormBuilder)) { return this._FormBuilder_1; } 34 | if ((token === import3.RadioControlRegistry)) { return this._RadioControlRegistry_2; } 35 | return notFoundResult; 36 | } 37 | destroyInternal():void { 38 | } 39 | } 40 | export const DeprecatedFormsModuleNgFactory:import0.NgModuleFactory = new import0.NgModuleFactory(DeprecatedFormsModuleInjector,import1.DeprecatedFormsModule); -------------------------------------------------------------------------------- /src/node_modules/@angular/core/src/application_module.d.ngfactory.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is generated by the Angular 2 template compiler. 3 | * Do not edit. 4 | */ 5 | /* tslint:disable */ 6 | 7 | import * as import0 from '@angular/core/src/linker/ng_module_factory'; 8 | import * as import1 from '@angular/core/src/application_module'; 9 | import * as import2 from '@angular/core/src/application_init'; 10 | import * as import3 from '@angular/core/src/application_ref'; 11 | import * as import4 from '@angular/core/src/linker/compiler'; 12 | import * as import5 from '@angular/core/src/linker/view_utils'; 13 | import * as import6 from '@angular/core/src/linker/dynamic_component_loader'; 14 | import * as import7 from '@angular/core/src/di/injector'; 15 | import * as import8 from '@angular/core/src/application_tokens'; 16 | import * as import9 from '@angular/core/src/render/api'; 17 | import * as import10 from '@angular/core/src/security'; 18 | import * as import11 from '@angular/core/src/zone/ng_zone'; 19 | import * as import12 from '@angular/core/src/console'; 20 | import * as import13 from '@angular/core/src/facade/exception_handler'; 21 | import * as import14 from '@angular/core/src/testability/testability'; 22 | import * as import15 from '@angular/core/src/linker/component_resolver'; 23 | import * as import16 from '@angular/core/src/change_detection/differs/iterable_differs'; 24 | import * as import17 from '@angular/core/src/change_detection/differs/keyvalue_differs'; 25 | class ApplicationModuleInjector extends import0.NgModuleInjector { 26 | _ApplicationModule_0:import1.ApplicationModule; 27 | _ApplicationInitStatus_1:import2.ApplicationInitStatus; 28 | _ApplicationRef__2:import3.ApplicationRef_; 29 | __ApplicationRef_3:any; 30 | __Compiler_4:import4.Compiler; 31 | __ComponentResolver_5:any; 32 | __APP_ID_6:any; 33 | __ViewUtils_7:import5.ViewUtils; 34 | __IterableDiffers_8:any; 35 | __KeyValueDiffers_9:any; 36 | __DynamicComponentLoader_10:import6.DynamicComponentLoader_; 37 | constructor(parent:import7.Injector) { 38 | super(parent,[],[]); 39 | } 40 | get _ApplicationRef_3():any { 41 | if ((this.__ApplicationRef_3 == null)) { (this.__ApplicationRef_3 = this._ApplicationRef__2); } 42 | return this.__ApplicationRef_3; 43 | } 44 | get _Compiler_4():import4.Compiler { 45 | if ((this.__Compiler_4 == null)) { (this.__Compiler_4 = new import4.Compiler()); } 46 | return this.__Compiler_4; 47 | } 48 | get _ComponentResolver_5():any { 49 | if ((this.__ComponentResolver_5 == null)) { (this.__ComponentResolver_5 = this._Compiler_4); } 50 | return this.__ComponentResolver_5; 51 | } 52 | get _APP_ID_6():any { 53 | if ((this.__APP_ID_6 == null)) { (this.__APP_ID_6 = import8._appIdRandomProviderFactory()); } 54 | return this.__APP_ID_6; 55 | } 56 | get _ViewUtils_7():import5.ViewUtils { 57 | if ((this.__ViewUtils_7 == null)) { (this.__ViewUtils_7 = new import5.ViewUtils(this.parent.get(import9.RootRenderer),this._APP_ID_6,this.parent.get(import10.SanitizationService))); } 58 | return this.__ViewUtils_7; 59 | } 60 | get _IterableDiffers_8():any { 61 | if ((this.__IterableDiffers_8 == null)) { (this.__IterableDiffers_8 = import1._iterableDiffersFactory()); } 62 | return this.__IterableDiffers_8; 63 | } 64 | get _KeyValueDiffers_9():any { 65 | if ((this.__KeyValueDiffers_9 == null)) { (this.__KeyValueDiffers_9 = import1._keyValueDiffersFactory()); } 66 | return this.__KeyValueDiffers_9; 67 | } 68 | get _DynamicComponentLoader_10():import6.DynamicComponentLoader_ { 69 | if ((this.__DynamicComponentLoader_10 == null)) { (this.__DynamicComponentLoader_10 = new import6.DynamicComponentLoader_(this._Compiler_4)); } 70 | return this.__DynamicComponentLoader_10; 71 | } 72 | createInternal():import1.ApplicationModule { 73 | this._ApplicationModule_0 = new import1.ApplicationModule(); 74 | this._ApplicationInitStatus_1 = new import2.ApplicationInitStatus(this.parent.get(import2.APP_INITIALIZER,null)); 75 | this._ApplicationRef__2 = new import3.ApplicationRef_(this.parent.get(import11.NgZone),this.parent.get(import12.Console),this,this.parent.get(import13.ExceptionHandler),this,this._ApplicationInitStatus_1,this.parent.get(import14.TestabilityRegistry,null),this.parent.get(import14.Testability,null)); 76 | return this._ApplicationModule_0; 77 | } 78 | getInternal(token:any,notFoundResult:any):any { 79 | if ((token === import1.ApplicationModule)) { return this._ApplicationModule_0; } 80 | if ((token === import2.ApplicationInitStatus)) { return this._ApplicationInitStatus_1; } 81 | if ((token === import3.ApplicationRef_)) { return this._ApplicationRef__2; } 82 | if ((token === import3.ApplicationRef)) { return this._ApplicationRef_3; } 83 | if ((token === import4.Compiler)) { return this._Compiler_4; } 84 | if ((token === import15.ComponentResolver)) { return this._ComponentResolver_5; } 85 | if ((token === import8.APP_ID)) { return this._APP_ID_6; } 86 | if ((token === import5.ViewUtils)) { return this._ViewUtils_7; } 87 | if ((token === import16.IterableDiffers)) { return this._IterableDiffers_8; } 88 | if ((token === import17.KeyValueDiffers)) { return this._KeyValueDiffers_9; } 89 | if ((token === import6.DynamicComponentLoader)) { return this._DynamicComponentLoader_10; } 90 | return notFoundResult; 91 | } 92 | destroyInternal():void { 93 | this._ApplicationRef__2.ngOnDestroy(); 94 | } 95 | } 96 | export const ApplicationModuleNgFactory:import0.NgModuleFactory = new import0.NgModuleFactory(ApplicationModuleInjector,import1.ApplicationModule); -------------------------------------------------------------------------------- /src/node_modules/@angular/platform-browser/src/browser.d.ngfactory.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is generated by the Angular 2 template compiler. 3 | * Do not edit. 4 | */ 5 | /* tslint:disable */ 6 | 7 | import * as import0 from '@angular/core/src/linker/ng_module_factory'; 8 | import * as import1 from '@angular/platform-browser/src/browser'; 9 | import * as import2 from '@angular/common/index'; 10 | import * as import3 from '@angular/core/src/application_module'; 11 | import * as import4 from '@angular/core/src/application_init'; 12 | import * as import5 from '@angular/core/src/testability/testability'; 13 | import * as import6 from '@angular/core/src/application_ref'; 14 | import * as import7 from '@angular/core/src/linker/compiler'; 15 | import * as import8 from '@angular/platform-browser/src/dom/events/hammer_gestures'; 16 | import * as import9 from '@angular/platform-browser/src/dom/events/event_manager'; 17 | import * as import10 from '@angular/platform-browser/src/dom/shared_styles_host'; 18 | import * as import11 from '@angular/platform-browser/src/dom/dom_renderer'; 19 | import * as import12 from '@angular/platform-browser/src/security/dom_sanitization_service'; 20 | import * as import13 from '@angular/core/src/linker/view_utils'; 21 | import * as import14 from '@angular/core/src/linker/dynamic_component_loader'; 22 | import * as import15 from '@angular/core/src/di/injector'; 23 | import * as import16 from '@angular/core/src/application_tokens'; 24 | import * as import17 from '@angular/platform-browser/src/dom/events/dom_events'; 25 | import * as import18 from '@angular/platform-browser/src/dom/events/key_events'; 26 | import * as import19 from '@angular/core/src/zone/ng_zone'; 27 | import * as import20 from '@angular/platform-browser/src/dom/debug/ng_probe'; 28 | import * as import21 from '@angular/core/src/console'; 29 | import * as import22 from '@angular/core/src/facade/exception_handler'; 30 | import * as import23 from '@angular/core/src/linker/component_resolver'; 31 | import * as import24 from '@angular/platform-browser/src/dom/dom_tokens'; 32 | import * as import25 from '@angular/platform-browser/src/dom/animation_driver'; 33 | import * as import26 from '@angular/core/src/render/api'; 34 | import * as import27 from '@angular/core/src/security'; 35 | import * as import28 from '@angular/core/src/change_detection/differs/iterable_differs'; 36 | import * as import29 from '@angular/core/src/change_detection/differs/keyvalue_differs'; 37 | class BrowserModuleInjector extends import0.NgModuleInjector { 38 | _CommonModule_0:import2.CommonModule; 39 | _ApplicationModule_1:import3.ApplicationModule; 40 | _BrowserModule_2:import1.BrowserModule; 41 | _ExceptionHandler_3:any; 42 | _ApplicationInitStatus_4:import4.ApplicationInitStatus; 43 | _Testability_5:import5.Testability; 44 | _ApplicationRef__6:import6.ApplicationRef_; 45 | __ApplicationRef_7:any; 46 | __Compiler_8:import7.Compiler; 47 | __ComponentResolver_9:any; 48 | __APP_ID_10:any; 49 | __DOCUMENT_11:any; 50 | __HAMMER_GESTURE_CONFIG_12:import8.HammerGestureConfig; 51 | __EVENT_MANAGER_PLUGINS_13:any[]; 52 | __EventManager_14:import9.EventManager; 53 | __DomSharedStylesHost_15:import10.DomSharedStylesHost; 54 | __AnimationDriver_16:any; 55 | __DomRootRenderer_17:import11.DomRootRenderer_; 56 | __RootRenderer_18:any; 57 | __DomSanitizationService_19:import12.DomSanitizationServiceImpl; 58 | __SanitizationService_20:any; 59 | __ViewUtils_21:import13.ViewUtils; 60 | __IterableDiffers_22:any; 61 | __KeyValueDiffers_23:any; 62 | __DynamicComponentLoader_24:import14.DynamicComponentLoader_; 63 | __SharedStylesHost_25:any; 64 | constructor(parent:import15.Injector) { 65 | super(parent,[],[]); 66 | } 67 | get _ApplicationRef_7():any { 68 | if ((this.__ApplicationRef_7 == null)) { (this.__ApplicationRef_7 = this._ApplicationRef__6); } 69 | return this.__ApplicationRef_7; 70 | } 71 | get _Compiler_8():import7.Compiler { 72 | if ((this.__Compiler_8 == null)) { (this.__Compiler_8 = new import7.Compiler()); } 73 | return this.__Compiler_8; 74 | } 75 | get _ComponentResolver_9():any { 76 | if ((this.__ComponentResolver_9 == null)) { (this.__ComponentResolver_9 = this._Compiler_8); } 77 | return this.__ComponentResolver_9; 78 | } 79 | get _APP_ID_10():any { 80 | if ((this.__APP_ID_10 == null)) { (this.__APP_ID_10 = import16._appIdRandomProviderFactory()); } 81 | return this.__APP_ID_10; 82 | } 83 | get _DOCUMENT_11():any { 84 | if ((this.__DOCUMENT_11 == null)) { (this.__DOCUMENT_11 = import1._document()); } 85 | return this.__DOCUMENT_11; 86 | } 87 | get _HAMMER_GESTURE_CONFIG_12():import8.HammerGestureConfig { 88 | if ((this.__HAMMER_GESTURE_CONFIG_12 == null)) { (this.__HAMMER_GESTURE_CONFIG_12 = new import8.HammerGestureConfig()); } 89 | return this.__HAMMER_GESTURE_CONFIG_12; 90 | } 91 | get _EVENT_MANAGER_PLUGINS_13():any[] { 92 | if ((this.__EVENT_MANAGER_PLUGINS_13 == null)) { (this.__EVENT_MANAGER_PLUGINS_13 = [ 93 | new import17.DomEventsPlugin(), 94 | new import18.KeyEventsPlugin(), 95 | new import8.HammerGesturesPlugin(this._HAMMER_GESTURE_CONFIG_12) 96 | ] 97 | ); } 98 | return this.__EVENT_MANAGER_PLUGINS_13; 99 | } 100 | get _EventManager_14():import9.EventManager { 101 | if ((this.__EventManager_14 == null)) { (this.__EventManager_14 = new import9.EventManager(this._EVENT_MANAGER_PLUGINS_13,this.parent.get(import19.NgZone))); } 102 | return this.__EventManager_14; 103 | } 104 | get _DomSharedStylesHost_15():import10.DomSharedStylesHost { 105 | if ((this.__DomSharedStylesHost_15 == null)) { (this.__DomSharedStylesHost_15 = new import10.DomSharedStylesHost(this._DOCUMENT_11)); } 106 | return this.__DomSharedStylesHost_15; 107 | } 108 | get _AnimationDriver_16():any { 109 | if ((this.__AnimationDriver_16 == null)) { (this.__AnimationDriver_16 = import1._resolveDefaultAnimationDriver()); } 110 | return this.__AnimationDriver_16; 111 | } 112 | get _DomRootRenderer_17():import11.DomRootRenderer_ { 113 | if ((this.__DomRootRenderer_17 == null)) { (this.__DomRootRenderer_17 = new import11.DomRootRenderer_(this._DOCUMENT_11,this._EventManager_14,this._DomSharedStylesHost_15,this._AnimationDriver_16)); } 114 | return this.__DomRootRenderer_17; 115 | } 116 | get _RootRenderer_18():any { 117 | if ((this.__RootRenderer_18 == null)) { (this.__RootRenderer_18 = import20._createConditionalRootRenderer(this._DomRootRenderer_17)); } 118 | return this.__RootRenderer_18; 119 | } 120 | get _DomSanitizationService_19():import12.DomSanitizationServiceImpl { 121 | if ((this.__DomSanitizationService_19 == null)) { (this.__DomSanitizationService_19 = new import12.DomSanitizationServiceImpl()); } 122 | return this.__DomSanitizationService_19; 123 | } 124 | get _SanitizationService_20():any { 125 | if ((this.__SanitizationService_20 == null)) { (this.__SanitizationService_20 = this._DomSanitizationService_19); } 126 | return this.__SanitizationService_20; 127 | } 128 | get _ViewUtils_21():import13.ViewUtils { 129 | if ((this.__ViewUtils_21 == null)) { (this.__ViewUtils_21 = new import13.ViewUtils(this._RootRenderer_18,this._APP_ID_10,this._SanitizationService_20)); } 130 | return this.__ViewUtils_21; 131 | } 132 | get _IterableDiffers_22():any { 133 | if ((this.__IterableDiffers_22 == null)) { (this.__IterableDiffers_22 = import3._iterableDiffersFactory()); } 134 | return this.__IterableDiffers_22; 135 | } 136 | get _KeyValueDiffers_23():any { 137 | if ((this.__KeyValueDiffers_23 == null)) { (this.__KeyValueDiffers_23 = import3._keyValueDiffersFactory()); } 138 | return this.__KeyValueDiffers_23; 139 | } 140 | get _DynamicComponentLoader_24():import14.DynamicComponentLoader_ { 141 | if ((this.__DynamicComponentLoader_24 == null)) { (this.__DynamicComponentLoader_24 = new import14.DynamicComponentLoader_(this._Compiler_8)); } 142 | return this.__DynamicComponentLoader_24; 143 | } 144 | get _SharedStylesHost_25():any { 145 | if ((this.__SharedStylesHost_25 == null)) { (this.__SharedStylesHost_25 = this._DomSharedStylesHost_15); } 146 | return this.__SharedStylesHost_25; 147 | } 148 | createInternal():import1.BrowserModule { 149 | this._CommonModule_0 = new import2.CommonModule(); 150 | this._ApplicationModule_1 = new import3.ApplicationModule(); 151 | this._BrowserModule_2 = new import1.BrowserModule(); 152 | this._ExceptionHandler_3 = import1._exceptionHandler(); 153 | this._ApplicationInitStatus_4 = new import4.ApplicationInitStatus(this.parent.get(import4.APP_INITIALIZER,null)); 154 | this._Testability_5 = new import5.Testability(this.parent.get(import19.NgZone)); 155 | this._ApplicationRef__6 = new import6.ApplicationRef_(this.parent.get(import19.NgZone),this.parent.get(import21.Console),this,this._ExceptionHandler_3,this,this._ApplicationInitStatus_4,this.parent.get(import5.TestabilityRegistry,null),this._Testability_5); 156 | return this._BrowserModule_2; 157 | } 158 | getInternal(token:any,notFoundResult:any):any { 159 | if ((token === import2.CommonModule)) { return this._CommonModule_0; } 160 | if ((token === import3.ApplicationModule)) { return this._ApplicationModule_1; } 161 | if ((token === import1.BrowserModule)) { return this._BrowserModule_2; } 162 | if ((token === import22.ExceptionHandler)) { return this._ExceptionHandler_3; } 163 | if ((token === import4.ApplicationInitStatus)) { return this._ApplicationInitStatus_4; } 164 | if ((token === import5.Testability)) { return this._Testability_5; } 165 | if ((token === import6.ApplicationRef_)) { return this._ApplicationRef__6; } 166 | if ((token === import6.ApplicationRef)) { return this._ApplicationRef_7; } 167 | if ((token === import7.Compiler)) { return this._Compiler_8; } 168 | if ((token === import23.ComponentResolver)) { return this._ComponentResolver_9; } 169 | if ((token === import16.APP_ID)) { return this._APP_ID_10; } 170 | if ((token === import24.DOCUMENT)) { return this._DOCUMENT_11; } 171 | if ((token === import8.HAMMER_GESTURE_CONFIG)) { return this._HAMMER_GESTURE_CONFIG_12; } 172 | if ((token === import9.EVENT_MANAGER_PLUGINS)) { return this._EVENT_MANAGER_PLUGINS_13; } 173 | if ((token === import9.EventManager)) { return this._EventManager_14; } 174 | if ((token === import10.DomSharedStylesHost)) { return this._DomSharedStylesHost_15; } 175 | if ((token === import25.AnimationDriver)) { return this._AnimationDriver_16; } 176 | if ((token === import11.DomRootRenderer)) { return this._DomRootRenderer_17; } 177 | if ((token === import26.RootRenderer)) { return this._RootRenderer_18; } 178 | if ((token === import12.DomSanitizationService)) { return this._DomSanitizationService_19; } 179 | if ((token === import27.SanitizationService)) { return this._SanitizationService_20; } 180 | if ((token === import13.ViewUtils)) { return this._ViewUtils_21; } 181 | if ((token === import28.IterableDiffers)) { return this._IterableDiffers_22; } 182 | if ((token === import29.KeyValueDiffers)) { return this._KeyValueDiffers_23; } 183 | if ((token === import14.DynamicComponentLoader)) { return this._DynamicComponentLoader_24; } 184 | if ((token === import10.SharedStylesHost)) { return this._SharedStylesHost_25; } 185 | return notFoundResult; 186 | } 187 | destroyInternal():void { 188 | this._ApplicationRef__6.ngOnDestroy(); 189 | } 190 | } 191 | export const BrowserModuleNgFactory:import0.NgModuleFactory = new import0.NgModuleFactory(BrowserModuleInjector,import1.BrowserModule); -------------------------------------------------------------------------------- /src/node_modules/@angular/platform-browser/src/worker_app.d.ngfactory.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is generated by the Angular 2 template compiler. 3 | * Do not edit. 4 | */ 5 | /* tslint:disable */ 6 | 7 | import * as import0 from '@angular/core/src/linker/ng_module_factory'; 8 | import * as import1 from '@angular/platform-browser/src/worker_app'; 9 | import * as import2 from '@angular/common/index'; 10 | import * as import3 from '@angular/core/src/application_module'; 11 | import * as import4 from '@angular/core/src/application_init'; 12 | import * as import5 from '@angular/core/src/application_ref'; 13 | import * as import6 from '@angular/core/src/linker/compiler'; 14 | import * as import7 from '@angular/platform-browser/src/web_workers/shared/render_store'; 15 | import * as import8 from '@angular/platform-browser/src/web_workers/shared/serializer'; 16 | import * as import9 from '@angular/platform-browser/src/web_workers/shared/client_message_broker'; 17 | import * as import10 from '@angular/platform-browser/src/web_workers/worker/renderer'; 18 | import * as import11 from '@angular/platform-browser/src/security/dom_sanitization_service'; 19 | import * as import12 from '@angular/core/src/linker/view_utils'; 20 | import * as import13 from '@angular/core/src/linker/dynamic_component_loader'; 21 | import * as import14 from '@angular/common/src/forms-deprecated/form_builder'; 22 | import * as import15 from '@angular/common/src/forms-deprecated/directives/radio_control_value_accessor'; 23 | import * as import16 from '@angular/platform-browser/src/web_workers/shared/service_message_broker'; 24 | import * as import17 from '@angular/core/src/di/injector'; 25 | import * as import18 from '@angular/core/src/application_tokens'; 26 | import * as import19 from '@angular/core/src/zone/ng_zone'; 27 | import * as import20 from '@angular/core/src/console'; 28 | import * as import21 from '@angular/core/src/testability/testability'; 29 | import * as import22 from '@angular/core/src/facade/exception_handler'; 30 | import * as import23 from '@angular/core/src/linker/component_resolver'; 31 | import * as import24 from '@angular/platform-browser/src/web_workers/shared/message_bus'; 32 | import * as import25 from '@angular/core/src/render/api'; 33 | import * as import26 from '@angular/core/src/security'; 34 | import * as import27 from '@angular/core/src/change_detection/differs/iterable_differs'; 35 | import * as import28 from '@angular/core/src/change_detection/differs/keyvalue_differs'; 36 | import * as import29 from '@angular/platform-browser/src/web_workers/shared/api'; 37 | class WorkerAppModuleInjector extends import0.NgModuleInjector { 38 | _CommonModule_0:import2.CommonModule; 39 | _ApplicationModule_1:import3.ApplicationModule; 40 | _WorkerAppModule_2:import1.WorkerAppModule; 41 | _ExceptionHandler_3:any; 42 | _APP_INITIALIZER_4:any[]; 43 | _ApplicationInitStatus_5:import4.ApplicationInitStatus; 44 | _ApplicationRef__6:import5.ApplicationRef_; 45 | __ApplicationRef_7:any; 46 | __Compiler_8:import6.Compiler; 47 | __ComponentResolver_9:any; 48 | __APP_ID_10:any; 49 | __MessageBus_11:any; 50 | __RenderStore_12:import7.RenderStore; 51 | __Serializer_13:import8.Serializer; 52 | __ClientMessageBrokerFactory_14:import9.ClientMessageBrokerFactory_; 53 | __WebWorkerRootRenderer_15:import10.WebWorkerRootRenderer; 54 | __RootRenderer_16:any; 55 | __DomSanitizationService_17:import11.DomSanitizationServiceImpl; 56 | __SanitizationService_18:any; 57 | __ViewUtils_19:import12.ViewUtils; 58 | __IterableDiffers_20:any; 59 | __KeyValueDiffers_21:any; 60 | __DynamicComponentLoader_22:import13.DynamicComponentLoader_; 61 | __FormBuilder_23:import14.FormBuilder; 62 | __RadioControlRegistry_24:import15.RadioControlRegistry; 63 | __ServiceMessageBrokerFactory_25:import16.ServiceMessageBrokerFactory_; 64 | __ON_WEB_WORKER_26:any; 65 | constructor(parent:import17.Injector) { 66 | super(parent,[],[]); 67 | } 68 | get _ApplicationRef_7():any { 69 | if ((this.__ApplicationRef_7 == null)) { (this.__ApplicationRef_7 = this._ApplicationRef__6); } 70 | return this.__ApplicationRef_7; 71 | } 72 | get _Compiler_8():import6.Compiler { 73 | if ((this.__Compiler_8 == null)) { (this.__Compiler_8 = new import6.Compiler()); } 74 | return this.__Compiler_8; 75 | } 76 | get _ComponentResolver_9():any { 77 | if ((this.__ComponentResolver_9 == null)) { (this.__ComponentResolver_9 = this._Compiler_8); } 78 | return this.__ComponentResolver_9; 79 | } 80 | get _APP_ID_10():any { 81 | if ((this.__APP_ID_10 == null)) { (this.__APP_ID_10 = import18._appIdRandomProviderFactory()); } 82 | return this.__APP_ID_10; 83 | } 84 | get _MessageBus_11():any { 85 | if ((this.__MessageBus_11 == null)) { (this.__MessageBus_11 = import1.createMessageBus(this.parent.get(import19.NgZone))); } 86 | return this.__MessageBus_11; 87 | } 88 | get _RenderStore_12():import7.RenderStore { 89 | if ((this.__RenderStore_12 == null)) { (this.__RenderStore_12 = new import7.RenderStore()); } 90 | return this.__RenderStore_12; 91 | } 92 | get _Serializer_13():import8.Serializer { 93 | if ((this.__Serializer_13 == null)) { (this.__Serializer_13 = new import8.Serializer(this._RenderStore_12)); } 94 | return this.__Serializer_13; 95 | } 96 | get _ClientMessageBrokerFactory_14():import9.ClientMessageBrokerFactory_ { 97 | if ((this.__ClientMessageBrokerFactory_14 == null)) { (this.__ClientMessageBrokerFactory_14 = new import9.ClientMessageBrokerFactory_(this._MessageBus_11,this._Serializer_13)); } 98 | return this.__ClientMessageBrokerFactory_14; 99 | } 100 | get _WebWorkerRootRenderer_15():import10.WebWorkerRootRenderer { 101 | if ((this.__WebWorkerRootRenderer_15 == null)) { (this.__WebWorkerRootRenderer_15 = new import10.WebWorkerRootRenderer(this._ClientMessageBrokerFactory_14,this._MessageBus_11,this._Serializer_13,this._RenderStore_12)); } 102 | return this.__WebWorkerRootRenderer_15; 103 | } 104 | get _RootRenderer_16():any { 105 | if ((this.__RootRenderer_16 == null)) { (this.__RootRenderer_16 = this._WebWorkerRootRenderer_15); } 106 | return this.__RootRenderer_16; 107 | } 108 | get _DomSanitizationService_17():import11.DomSanitizationServiceImpl { 109 | if ((this.__DomSanitizationService_17 == null)) { (this.__DomSanitizationService_17 = new import11.DomSanitizationServiceImpl()); } 110 | return this.__DomSanitizationService_17; 111 | } 112 | get _SanitizationService_18():any { 113 | if ((this.__SanitizationService_18 == null)) { (this.__SanitizationService_18 = this._DomSanitizationService_17); } 114 | return this.__SanitizationService_18; 115 | } 116 | get _ViewUtils_19():import12.ViewUtils { 117 | if ((this.__ViewUtils_19 == null)) { (this.__ViewUtils_19 = new import12.ViewUtils(this._RootRenderer_16,this._APP_ID_10,this._SanitizationService_18)); } 118 | return this.__ViewUtils_19; 119 | } 120 | get _IterableDiffers_20():any { 121 | if ((this.__IterableDiffers_20 == null)) { (this.__IterableDiffers_20 = import3._iterableDiffersFactory()); } 122 | return this.__IterableDiffers_20; 123 | } 124 | get _KeyValueDiffers_21():any { 125 | if ((this.__KeyValueDiffers_21 == null)) { (this.__KeyValueDiffers_21 = import3._keyValueDiffersFactory()); } 126 | return this.__KeyValueDiffers_21; 127 | } 128 | get _DynamicComponentLoader_22():import13.DynamicComponentLoader_ { 129 | if ((this.__DynamicComponentLoader_22 == null)) { (this.__DynamicComponentLoader_22 = new import13.DynamicComponentLoader_(this._Compiler_8)); } 130 | return this.__DynamicComponentLoader_22; 131 | } 132 | get _FormBuilder_23():import14.FormBuilder { 133 | if ((this.__FormBuilder_23 == null)) { (this.__FormBuilder_23 = new import14.FormBuilder()); } 134 | return this.__FormBuilder_23; 135 | } 136 | get _RadioControlRegistry_24():import15.RadioControlRegistry { 137 | if ((this.__RadioControlRegistry_24 == null)) { (this.__RadioControlRegistry_24 = new import15.RadioControlRegistry()); } 138 | return this.__RadioControlRegistry_24; 139 | } 140 | get _ServiceMessageBrokerFactory_25():import16.ServiceMessageBrokerFactory_ { 141 | if ((this.__ServiceMessageBrokerFactory_25 == null)) { (this.__ServiceMessageBrokerFactory_25 = new import16.ServiceMessageBrokerFactory_(this._MessageBus_11,this._Serializer_13)); } 142 | return this.__ServiceMessageBrokerFactory_25; 143 | } 144 | get _ON_WEB_WORKER_26():any { 145 | if ((this.__ON_WEB_WORKER_26 == null)) { (this.__ON_WEB_WORKER_26 = true); } 146 | return this.__ON_WEB_WORKER_26; 147 | } 148 | createInternal():import1.WorkerAppModule { 149 | this._CommonModule_0 = new import2.CommonModule(); 150 | this._ApplicationModule_1 = new import3.ApplicationModule(); 151 | this._WorkerAppModule_2 = new import1.WorkerAppModule(); 152 | this._ExceptionHandler_3 = import1._exceptionHandler(); 153 | this._APP_INITIALIZER_4 = [import1.setupWebWorker]; 154 | this._ApplicationInitStatus_5 = new import4.ApplicationInitStatus(this._APP_INITIALIZER_4); 155 | this._ApplicationRef__6 = new import5.ApplicationRef_(this.parent.get(import19.NgZone),this.parent.get(import20.Console),this,this._ExceptionHandler_3,this,this._ApplicationInitStatus_5,this.parent.get(import21.TestabilityRegistry,null),this.parent.get(import21.Testability,null)); 156 | return this._WorkerAppModule_2; 157 | } 158 | getInternal(token:any,notFoundResult:any):any { 159 | if ((token === import2.CommonModule)) { return this._CommonModule_0; } 160 | if ((token === import3.ApplicationModule)) { return this._ApplicationModule_1; } 161 | if ((token === import1.WorkerAppModule)) { return this._WorkerAppModule_2; } 162 | if ((token === import22.ExceptionHandler)) { return this._ExceptionHandler_3; } 163 | if ((token === import4.APP_INITIALIZER)) { return this._APP_INITIALIZER_4; } 164 | if ((token === import4.ApplicationInitStatus)) { return this._ApplicationInitStatus_5; } 165 | if ((token === import5.ApplicationRef_)) { return this._ApplicationRef__6; } 166 | if ((token === import5.ApplicationRef)) { return this._ApplicationRef_7; } 167 | if ((token === import6.Compiler)) { return this._Compiler_8; } 168 | if ((token === import23.ComponentResolver)) { return this._ComponentResolver_9; } 169 | if ((token === import18.APP_ID)) { return this._APP_ID_10; } 170 | if ((token === import24.MessageBus)) { return this._MessageBus_11; } 171 | if ((token === import7.RenderStore)) { return this._RenderStore_12; } 172 | if ((token === import8.Serializer)) { return this._Serializer_13; } 173 | if ((token === import9.ClientMessageBrokerFactory)) { return this._ClientMessageBrokerFactory_14; } 174 | if ((token === import10.WebWorkerRootRenderer)) { return this._WebWorkerRootRenderer_15; } 175 | if ((token === import25.RootRenderer)) { return this._RootRenderer_16; } 176 | if ((token === import11.DomSanitizationService)) { return this._DomSanitizationService_17; } 177 | if ((token === import26.SanitizationService)) { return this._SanitizationService_18; } 178 | if ((token === import12.ViewUtils)) { return this._ViewUtils_19; } 179 | if ((token === import27.IterableDiffers)) { return this._IterableDiffers_20; } 180 | if ((token === import28.KeyValueDiffers)) { return this._KeyValueDiffers_21; } 181 | if ((token === import13.DynamicComponentLoader)) { return this._DynamicComponentLoader_22; } 182 | if ((token === import14.FormBuilder)) { return this._FormBuilder_23; } 183 | if ((token === import15.RadioControlRegistry)) { return this._RadioControlRegistry_24; } 184 | if ((token === import16.ServiceMessageBrokerFactory)) { return this._ServiceMessageBrokerFactory_25; } 185 | if ((token === import29.ON_WEB_WORKER)) { return this._ON_WEB_WORKER_26; } 186 | return notFoundResult; 187 | } 188 | destroyInternal():void { 189 | this._ApplicationRef__6.ngOnDestroy(); 190 | } 191 | } 192 | export const WorkerAppModuleNgFactory:import0.NgModuleFactory = new import0.NgModuleFactory(WorkerAppModuleInjector,import1.WorkerAppModule); -------------------------------------------------------------------------------- /src/system-config.js: -------------------------------------------------------------------------------- 1 | System.config({ 2 | map: { 3 | 'rxjs': 'node_modules/rxjs-es', 4 | '@angular/core': 'node_modules/@angular/core/esm', 5 | '@angular/common': 'node_modules/@angular/common/esm', 6 | '@angular/compiler': 'node_modules/@angular/compiler/esm', 7 | '@angular/platform-browser': 'node_modules/@angular/platform-browser/esm', 8 | 'app': 'es6' 9 | }, 10 | packages: { 11 | 'app': { 12 | main: 'main.js', 13 | defaultExtension: 'js' 14 | }, 15 | '@angular/core': { 16 | main: 'index.js', 17 | defaultExtension: 'js' 18 | }, 19 | '@angular/compiler': { 20 | main: 'index.js', 21 | defaultExtension: 'js' 22 | }, 23 | '@angular/common': { 24 | main: 'index.js', 25 | defaultExtension: 'js' 26 | }, 27 | '@angular/platform-browser': { 28 | main: 'index.js', 29 | defaultExtension: 'js' 30 | }, 31 | '@angular/platform-browser-dynamic': { 32 | main: 'index.js', 33 | defaultExtension: 'js' 34 | }, 35 | 'rxjs': { 36 | defaultExtension: 'js' 37 | } 38 | } 39 | }) -------------------------------------------------------------------------------- /src/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "emitDecoratorMetadata": true, 5 | "experimentalDecorators": true, 6 | "module": "es6", 7 | "moduleResolution": "node", 8 | "noEmitOnError": true, 9 | "noImplicitAny": false, 10 | "outDir": "../es6/", 11 | "sourceMap": false, 12 | "target": "es6" 13 | }, 14 | 15 | "files": [ 16 | "main.ts", 17 | "app/app.module.ts" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /src/typings.d.ts: -------------------------------------------------------------------------------- 1 | // Typings reference file, see links for more information 2 | // https://github.com/typings/typings 3 | // https://www.typescriptlang.org/docs/handbook/writing-declaration-files.html 4 | 5 | /// 6 | declare var module: { id: string }; 7 | -------------------------------------------------------------------------------- /tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rulesDirectory": [ 3 | "node_modules/codelyzer" 4 | ], 5 | "rules": { 6 | "class-name": true, 7 | "comment-format": [ 8 | true, 9 | "check-space" 10 | ], 11 | "curly": true, 12 | "eofline": true, 13 | "forin": true, 14 | "indent": [ 15 | true, 16 | "spaces" 17 | ], 18 | "label-position": true, 19 | "label-undefined": true, 20 | "max-line-length": [ 21 | true, 22 | 140 23 | ], 24 | "member-access": false, 25 | "member-ordering": [ 26 | true, 27 | "static-before-instance", 28 | "variables-before-functions" 29 | ], 30 | "no-arg": true, 31 | "no-bitwise": true, 32 | "no-console": [ 33 | true, 34 | "debug", 35 | "info", 36 | "time", 37 | "timeEnd", 38 | "trace" 39 | ], 40 | "no-construct": true, 41 | "no-debugger": true, 42 | "no-duplicate-key": true, 43 | "no-duplicate-variable": true, 44 | "no-empty": false, 45 | "no-eval": true, 46 | "no-inferrable-types": true, 47 | "no-shadowed-variable": true, 48 | "no-string-literal": false, 49 | "no-switch-case-fall-through": true, 50 | "no-trailing-whitespace": true, 51 | "no-unused-expression": true, 52 | "no-unused-variable": true, 53 | "no-unreachable": true, 54 | "no-use-before-declare": true, 55 | "no-var-keyword": true, 56 | "object-literal-sort-keys": false, 57 | "one-line": [ 58 | true, 59 | "check-open-brace", 60 | "check-catch", 61 | "check-else", 62 | "check-whitespace" 63 | ], 64 | "quotemark": [ 65 | true, 66 | "single" 67 | ], 68 | "radix": true, 69 | "semicolon": [ 70 | "always" 71 | ], 72 | "triple-equals": [ 73 | true, 74 | "allow-null-check" 75 | ], 76 | "typedef-whitespace": [ 77 | true, 78 | { 79 | "call-signature": "nospace", 80 | "index-signature": "nospace", 81 | "parameter": "nospace", 82 | "property-declaration": "nospace", 83 | "variable-declaration": "nospace" 84 | } 85 | ], 86 | "variable-name": false, 87 | "whitespace": [ 88 | true, 89 | "check-branch", 90 | "check-decl", 91 | "check-operator", 92 | "check-separator", 93 | "check-type" 94 | ], 95 | 96 | "directive-selector-name": [true, "camelCase"], 97 | "component-selector-name": [true, "kebab-case"], 98 | "directive-selector-type": [true, "attribute"], 99 | "component-selector-type": [true, "element"], 100 | "use-input-property-decorator": true, 101 | "use-output-property-decorator": true, 102 | "use-host-property-decorator": true, 103 | "no-input-rename": true, 104 | "no-output-rename": true, 105 | "use-life-cycle-interface": true, 106 | "use-pipe-transform-interface": true, 107 | "component-class-suffix": true, 108 | "directive-class-suffix": true 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /typings.json: -------------------------------------------------------------------------------- 1 | { 2 | "ambientDependencies": { 3 | "es6-shim": "github:DefinitelyTyped/DefinitelyTyped/es6-shim/es6-shim.d.ts#9807d9b701f58be068cb07833d2b24235351d052" 4 | } 5 | } 6 | --------------------------------------------------------------------------------