UNPKG

uv-charts-dashboard

Version:
1,400 lines (1,365 loc) 2.13 MB
/******/ (function(modules) { // webpackBootstrap /******/ // install a JSONP callback for chunk loading /******/ var parentJsonpFunction = window["webpackJsonp"]; /******/ window["webpackJsonp"] = function webpackJsonpCallback(chunkIds, moreModules) { /******/ // add "moreModules" to the modules object, /******/ // then flag all "chunkIds" as loaded and fire callback /******/ var moduleId, chunkId, i = 0, callbacks = []; /******/ for(;i < chunkIds.length; i++) { /******/ chunkId = chunkIds[i]; /******/ if(installedChunks[chunkId]) /******/ callbacks.push.apply(callbacks, installedChunks[chunkId]); /******/ installedChunks[chunkId] = 0; /******/ } /******/ for(moduleId in moreModules) { /******/ modules[moduleId] = moreModules[moduleId]; /******/ } /******/ if(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules); /******/ while(callbacks.length) /******/ callbacks.shift().call(null, __webpack_require__); /******/ }; /******/ // The module cache /******/ var installedModules = {}; /******/ // object to store loaded and loading chunks /******/ // "0" means "already loaded" /******/ // Array means "loading", array contains callbacks /******/ var installedChunks = { /******/ 1:0 /******/ }; /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) /******/ return installedModules[moduleId].exports; /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ exports: {}, /******/ id: moduleId, /******/ loaded: false /******/ }; /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ // Flag the module as loaded /******/ module.loaded = true; /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ // This file contains only the entry chunk. /******/ // The chunk loading function for additional chunks /******/ __webpack_require__.e = function requireEnsure(chunkId, callback) { /******/ // "0" is the signal for "already loaded" /******/ if(installedChunks[chunkId] === 0) /******/ return callback.call(null, __webpack_require__); /******/ // an array means "currently loading". /******/ if(installedChunks[chunkId] !== undefined) { /******/ installedChunks[chunkId].push(callback); /******/ } else { /******/ // start chunk loading /******/ installedChunks[chunkId] = [callback]; /******/ var head = document.getElementsByTagName('head')[0]; /******/ var script = document.createElement('script'); /******/ script.type = 'text/javascript'; /******/ script.charset = 'utf-8'; /******/ script.async = true; /******/ script.src = __webpack_require__.p + "" + chunkId + ".chunk.js"; /******/ head.appendChild(script); /******/ } /******/ }; /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ // Load entry module and return exports /******/ return __webpack_require__(0); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var platform_browser_dynamic_1 = __webpack_require__(88); var app_module_1 = __webpack_require__(184); platform_browser_dynamic_1.platformBrowserDynamic().bootstrapModule(app_module_1.AppModule) .catch(function (err) { return console.error(err); }); /***/ }, /* 1 */, /* 2 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/** * @license Angular v2.1.2 * (c) 2010-2016 Google, Inc. https://angular.io/ * License: MIT */ (function (global, factory) { true ? factory(exports, __webpack_require__(36), __webpack_require__(4)) : typeof define === 'function' && define.amd ? define(['exports', 'rxjs/Subject', 'rxjs/Observable'], factory) : (factory((global.ng = global.ng || {}, global.ng.core = global.ng.core || {}),global.Rx,global.Rx)); }(this, function (exports,rxjs_Subject,rxjs_Observable) { 'use strict'; /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ var globalScope; if (typeof window === 'undefined') { if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) { // TODO: Replace any with WorkerGlobalScope from lib.webworker.d.ts #3492 globalScope = self; } else { globalScope = global; } } else { globalScope = window; } function scheduleMicroTask(fn) { Zone.current.scheduleMicroTask('scheduleMicrotask', fn); } // Need to declare a new variable for global here since TypeScript // exports the original value of the symbol. var global$1 = globalScope; function getTypeNameForDebugging(type) { return type['name'] || typeof type; } // TODO: remove calls to assert in production environment // Note: Can't just export this and import in in other files // as `assert` is a reserved keyword in Dart global$1.assert = function assert(condition) { // TODO: to be fixed properly via #2830, noop for now }; function isPresent(obj) { return obj != null; } function isBlank(obj) { return obj == null; } function stringify(token) { if (typeof token === 'string') { return token; } if (token === undefined || token === null) { return '' + token; } if (token.overriddenName) { return token.overriddenName; } if (token.name) { return token.name; } var res = token.toString(); var newLineIndex = res.indexOf('\n'); return newLineIndex === -1 ? res : res.substring(0, newLineIndex); } // JS has NaN !== NaN function looseIdentical(a, b) { return a === b || typeof a === 'number' && typeof b === 'number' && isNaN(a) && isNaN(b); } function isJsObject(o) { return o !== null && (typeof o === 'function' || typeof o === 'object'); } function print(obj) { console.log(obj); } function warn(obj) { console.warn(obj); } var _symbolIterator = null; function getSymbolIterator() { if (!_symbolIterator) { if (globalScope.Symbol && Symbol.iterator) { _symbolIterator = Symbol.iterator; } else { // es6-shim specific logic var keys = Object.getOwnPropertyNames(Map.prototype); for (var i = 0; i < keys.length; ++i) { var key = keys[i]; if (key !== 'entries' && key !== 'size' && Map.prototype[key] === Map.prototype['entries']) { _symbolIterator = key; } } } } return _symbolIterator; } function isPrimitive(obj) { return !isJsObject(obj); } var _nextClassId = 0; var Reflect = global$1.Reflect; function extractAnnotation(annotation) { if (typeof annotation === 'function' && annotation.hasOwnProperty('annotation')) { // it is a decorator, extract annotation annotation = annotation.annotation; } return annotation; } function applyParams(fnOrArray, key) { if (fnOrArray === Object || fnOrArray === String || fnOrArray === Function || fnOrArray === Number || fnOrArray === Array) { throw new Error("Can not use native " + stringify(fnOrArray) + " as constructor"); } if (typeof fnOrArray === 'function') { return fnOrArray; } if (Array.isArray(fnOrArray)) { var annotations = fnOrArray; var annoLength = annotations.length - 1; var fn = fnOrArray[annoLength]; if (typeof fn !== 'function') { throw new Error("Last position of Class method array must be Function in key " + key + " was '" + stringify(fn) + "'"); } if (annoLength != fn.length) { throw new Error("Number of annotations (" + annoLength + ") does not match number of arguments (" + fn.length + ") in the function: " + stringify(fn)); } var paramsAnnotations = []; for (var i = 0, ii = annotations.length - 1; i < ii; i++) { var paramAnnotations = []; paramsAnnotations.push(paramAnnotations); var annotation = annotations[i]; if (Array.isArray(annotation)) { for (var j = 0; j < annotation.length; j++) { paramAnnotations.push(extractAnnotation(annotation[j])); } } else if (typeof annotation === 'function') { paramAnnotations.push(extractAnnotation(annotation)); } else { paramAnnotations.push(annotation); } } Reflect.defineMetadata('parameters', paramsAnnotations, fn); return fn; } throw new Error("Only Function or Array is supported in Class definition for key '" + key + "' is '" + stringify(fnOrArray) + "'"); } /** * Provides a way for expressing ES6 classes with parameter annotations in ES5. * * ## Basic Example * * ``` * var Greeter = ng.Class({ * constructor: function(name) { * this.name = name; * }, * * greet: function() { * alert('Hello ' + this.name + '!'); * } * }); * ``` * * is equivalent to ES6: * * ``` * class Greeter { * constructor(name) { * this.name = name; * } * * greet() { * alert('Hello ' + this.name + '!'); * } * } * ``` * * or equivalent to ES5: * * ``` * var Greeter = function (name) { * this.name = name; * } * * Greeter.prototype.greet = function () { * alert('Hello ' + this.name + '!'); * } * ``` * * ### Example with parameter annotations * * ``` * var MyService = ng.Class({ * constructor: [String, [new Optional(), Service], function(name, myService) { * ... * }] * }); * ``` * * is equivalent to ES6: * * ``` * class MyService { * constructor(name: string, @Optional() myService: Service) { * ... * } * } * ``` * * ### Example with inheritance * * ``` * var Shape = ng.Class({ * constructor: (color) { * this.color = color; * } * }); * * var Square = ng.Class({ * extends: Shape, * constructor: function(color, size) { * Shape.call(this, color); * this.size = size; * } * }); * ``` * @stable */ function Class(clsDef) { var constructor = applyParams(clsDef.hasOwnProperty('constructor') ? clsDef.constructor : undefined, 'constructor'); var proto = constructor.prototype; if (clsDef.hasOwnProperty('extends')) { if (typeof clsDef.extends === 'function') { constructor.prototype = proto = Object.create(clsDef.extends.prototype); } else { throw new Error("Class definition 'extends' property must be a constructor function was: " + stringify(clsDef.extends)); } } for (var key in clsDef) { if (key !== 'extends' && key !== 'prototype' && clsDef.hasOwnProperty(key)) { proto[key] = applyParams(clsDef[key], key); } } if (this && this.annotations instanceof Array) { Reflect.defineMetadata('annotations', this.annotations, constructor); } var constructorName = constructor['name']; if (!constructorName || constructorName === 'constructor') { constructor['overriddenName'] = "class" + _nextClassId++; } return constructor; } function makeDecorator(name, props, parentClass, chainFn) { if (chainFn === void 0) { chainFn = null; } var metaCtor = makeMetadataCtor([props]); function DecoratorFactory(objOrType) { if (!(Reflect && Reflect.getMetadata)) { throw 'reflect-metadata shim is required when using class decorators'; } if (this instanceof DecoratorFactory) { metaCtor.call(this, objOrType); return this; } var annotationInstance = new DecoratorFactory(objOrType); var chainAnnotation = typeof this === 'function' && Array.isArray(this.annotations) ? this.annotations : []; chainAnnotation.push(annotationInstance); var TypeDecorator = function TypeDecorator(cls) { var annotations = Reflect.getOwnMetadata('annotations', cls) || []; annotations.push(annotationInstance); Reflect.defineMetadata('annotations', annotations, cls); return cls; }; TypeDecorator.annotations = chainAnnotation; TypeDecorator.Class = Class; if (chainFn) chainFn(TypeDecorator); return TypeDecorator; } if (parentClass) { DecoratorFactory.prototype = Object.create(parentClass.prototype); } DecoratorFactory.prototype.toString = function () { return ("@" + name); }; DecoratorFactory.annotationCls = DecoratorFactory; return DecoratorFactory; } function makeMetadataCtor(props) { return function ctor() { var _this = this; var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i - 0] = arguments[_i]; } props.forEach(function (prop, i) { var argVal = args[i]; if (Array.isArray(prop)) { // plain parameter _this[prop[0]] = argVal === undefined ? prop[1] : argVal; } else { for (var propName in prop) { _this[propName] = argVal && argVal.hasOwnProperty(propName) ? argVal[propName] : prop[propName]; } } }); }; } function makeParamDecorator(name, props, parentClass) { var metaCtor = makeMetadataCtor(props); function ParamDecoratorFactory() { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i - 0] = arguments[_i]; } if (this instanceof ParamDecoratorFactory) { metaCtor.apply(this, args); return this; } var annotationInstance = new ((_a = ParamDecoratorFactory).bind.apply(_a, [void 0].concat(args)))(); ParamDecorator.annotation = annotationInstance; return ParamDecorator; function ParamDecorator(cls, unusedKey, index) { var parameters = Reflect.getMetadata('parameters', cls) || []; // there might be gaps if some in between parameters do not have annotations. // we pad with nulls. while (parameters.length <= index) { parameters.push(null); } parameters[index] = parameters[index] || []; parameters[index].push(annotationInstance); Reflect.defineMetadata('parameters', parameters, cls); return cls; } var _a; } if (parentClass) { ParamDecoratorFactory.prototype = Object.create(parentClass.prototype); } ParamDecoratorFactory.prototype.toString = function () { return ("@" + name); }; ParamDecoratorFactory.annotationCls = ParamDecoratorFactory; return ParamDecoratorFactory; } function makePropDecorator(name, props, parentClass) { var metaCtor = makeMetadataCtor(props); function PropDecoratorFactory() { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i - 0] = arguments[_i]; } if (this instanceof PropDecoratorFactory) { metaCtor.apply(this, args); return this; } var decoratorInstance = new ((_a = PropDecoratorFactory).bind.apply(_a, [void 0].concat(args)))(); return function PropDecorator(target, name) { var meta = Reflect.getOwnMetadata('propMetadata', target.constructor) || {}; meta[name] = meta.hasOwnProperty(name) && meta[name] || []; meta[name].unshift(decoratorInstance); Reflect.defineMetadata('propMetadata', meta, target.constructor); }; var _a; } if (parentClass) { PropDecoratorFactory.prototype = Object.create(parentClass.prototype); } PropDecoratorFactory.prototype.toString = function () { return ("@" + name); }; PropDecoratorFactory.annotationCls = PropDecoratorFactory; return PropDecoratorFactory; } /** * Inject decorator and metadata. * * @stable * @Annotation */ var Inject = makeParamDecorator('Inject', [['token', undefined]]); /** * Optional decorator and metadata. * * @stable * @Annotation */ var Optional = makeParamDecorator('Optional', []); /** * Injectable decorator and metadata. * * @stable * @Annotation */ var Injectable = makeParamDecorator('Injectable', []); /** * Self decorator and metadata. * * @stable * @Annotation */ var Self = makeParamDecorator('Self', []); /** * SkipSelf decorator and metadata. * * @stable * @Annotation */ var SkipSelf = makeParamDecorator('SkipSelf', []); /** * Host decorator and metadata. * * @stable * @Annotation */ var Host = makeParamDecorator('Host', []); /** * Creates a token that can be used in a DI Provider. * * ### Example ([live demo](http://plnkr.co/edit/Ys9ezXpj2Mnoy3Uc8KBp?p=preview)) * * ```typescript * var t = new OpaqueToken("value"); * * var injector = Injector.resolveAndCreate([ * {provide: t, useValue: "bindingValue"} * ]); * * expect(injector.get(t)).toEqual("bindingValue"); * ``` * * Using an `OpaqueToken` is preferable to using strings as tokens because of possible collisions * caused by multiple providers using the same string as two different tokens. * * Using an `OpaqueToken` is preferable to using an `Object` as tokens because it provides better * error messages. * @stable */ // so that metadata is gathered for this class var OpaqueToken = (function () { function OpaqueToken(_desc) { this._desc = _desc; } OpaqueToken.prototype.toString = function () { return "Token " + this._desc; }; OpaqueToken.decorators = [ { type: Injectable }, ]; /** @nocollapse */ OpaqueToken.ctorParameters = [ null, ]; return OpaqueToken; }()); /** * This token can be used to create a virtual provider that will populate the * `entryComponents` fields of components and ng modules based on its `useValue`. * All components that are referenced in the `useValue` value (either directly * or in a nested array or map) will be added to the `entryComponents` property. * * ### Example * The following example shows how the router can populate the `entryComponents` * field of an NgModule based on the router configuration which refers * to components. * * ```typescript * // helper function inside the router * function provideRoutes(routes) { * return [ * {provide: ROUTES, useValue: routes}, * {provide: ANALYZE_FOR_ENTRY_COMPONENTS, useValue: routes, multi: true} * ]; * } * * // user code * let routes = [ * {path: '/root', component: RootComp}, * {path: '/teams', component: TeamsComp} * ]; * * @NgModule({ * providers: [provideRoutes(routes)] * }) * class ModuleWithRoutes {} * ``` * * @experimental */ var ANALYZE_FOR_ENTRY_COMPONENTS = new OpaqueToken('AnalyzeForEntryComponents'); /** * Attribute decorator and metadata. * * @stable * @Annotation */ var Attribute = makeParamDecorator('Attribute', [['attributeName', undefined]]); /** * Base class for query metadata. * * See {@link ContentChildren}, {@link ContentChild}, {@link ViewChildren}, {@link ViewChild} for * more information. * * @stable */ var Query = (function () { function Query() { } return Query; }()); /** * ContentChildren decorator and metadata. * * @stable * @Annotation */ var ContentChildren = makePropDecorator('ContentChildren', [ ['selector', undefined], { first: false, isViewQuery: false, descendants: false, read: undefined, } ], Query); /** * @whatItDoes Configures a content query. * * @howToUse * * {@example core/di/ts/contentChild/content_child_howto.ts region='HowTo'} * * @description * * You can use ContentChild to get the first element or the directive matching the selector from the * content DOM. If the content DOM changes, and a new child matches the selector, * the property will be updated. * * Content queries are set before the `ngAfterContentInit` callback is called. * * **Metadata Properties**: * * * **selector** - the directive type or the name used for querying. * * **read** - read a different token from the queried element. * * Let's look at an example: * * {@example core/di/ts/contentChild/content_child_example.ts region='Component'} * * **npm package**: `@angular/core` * * @stable * @Annotation */ var ContentChild = makePropDecorator('ContentChild', [ ['selector', undefined], { first: true, isViewQuery: false, descendants: true, read: undefined, } ], Query); /** * @whatItDoes Configures a view query. * * @howToUse * * {@example core/di/ts/viewChildren/view_children_howto.ts region='HowTo'} * * @description * * You can use ViewChildren to get the {@link QueryList} of elements or directives from the * view DOM. Any time a child element is added, removed, or moved, the query list will be updated, * and the changes observable of the query list will emit a new value. * * View queries are set before the `ngAfterViewInit` callback is called. * * **Metadata Properties**: * * * **selector** - the directive type or the name used for querying. * * **read** - read a different token from the queried elements. * * Let's look at an example: * * {@example core/di/ts/viewChildren/view_children_example.ts region='Component'} * * **npm package**: `@angular/core` * * @stable * @Annotation */ var ViewChildren = makePropDecorator('ViewChildren', [ ['selector', undefined], { first: false, isViewQuery: true, descendants: true, read: undefined, } ], Query); /** * ViewChild decorator and metadata. * * @stable * @Annotation */ var ViewChild = makePropDecorator('ViewChild', [ ['selector', undefined], { first: true, isViewQuery: true, descendants: true, read: undefined, } ], Query); /** * Describes within the change detector which strategy will be used the next time change * detection is triggered. * @stable */ exports.ChangeDetectionStrategy; (function (ChangeDetectionStrategy) { /** * `OnPush` means that the change detector's mode will be set to `CheckOnce` during hydration. */ ChangeDetectionStrategy[ChangeDetectionStrategy["OnPush"] = 0] = "OnPush"; /** * `Default` means that the change detector's mode will be set to `CheckAlways` during hydration. */ ChangeDetectionStrategy[ChangeDetectionStrategy["Default"] = 1] = "Default"; })(exports.ChangeDetectionStrategy || (exports.ChangeDetectionStrategy = {})); /** * Describes the status of the detector. */ var ChangeDetectorStatus; (function (ChangeDetectorStatus) { /** * `CheckedOnce` means that after calling detectChanges the mode of the change detector * will become `Checked`. */ ChangeDetectorStatus[ChangeDetectorStatus["CheckOnce"] = 0] = "CheckOnce"; /** * `Checked` means that the change detector should be skipped until its mode changes to * `CheckOnce`. */ ChangeDetectorStatus[ChangeDetectorStatus["Checked"] = 1] = "Checked"; /** * `CheckAlways` means that after calling detectChanges the mode of the change detector * will remain `CheckAlways`. */ ChangeDetectorStatus[ChangeDetectorStatus["CheckAlways"] = 2] = "CheckAlways"; /** * `Detached` means that the change detector sub tree is not a part of the main tree and * should be skipped. */ ChangeDetectorStatus[ChangeDetectorStatus["Detached"] = 3] = "Detached"; /** * `Errored` means that the change detector encountered an error checking a binding * or calling a directive lifecycle method and is now in an inconsistent state. Change * detectors in this state will no longer detect changes. */ ChangeDetectorStatus[ChangeDetectorStatus["Errored"] = 4] = "Errored"; /** * `Destroyed` means that the change detector is destroyed. */ ChangeDetectorStatus[ChangeDetectorStatus["Destroyed"] = 5] = "Destroyed"; })(ChangeDetectorStatus || (ChangeDetectorStatus = {})); function isDefaultChangeDetectionStrategy(changeDetectionStrategy) { return isBlank(changeDetectionStrategy) || changeDetectionStrategy === exports.ChangeDetectionStrategy.Default; } /** * Directive decorator and metadata. * * @stable * @Annotation */ var Directive = makeDecorator('Directive', { selector: undefined, inputs: undefined, outputs: undefined, host: undefined, providers: undefined, exportAs: undefined, queries: undefined }); /** * Component decorator and metadata. * * @stable * @Annotation */ var Component = makeDecorator('Component', { selector: undefined, inputs: undefined, outputs: undefined, host: undefined, exportAs: undefined, moduleId: undefined, providers: undefined, viewProviders: undefined, changeDetection: exports.ChangeDetectionStrategy.Default, queries: undefined, templateUrl: undefined, template: undefined, styleUrls: undefined, styles: undefined, animations: undefined, encapsulation: undefined, interpolation: undefined, entryComponents: undefined }, Directive); /** * Pipe decorator and metadata. * * @stable * @Annotation */ var Pipe = makeDecorator('Pipe', { name: undefined, pure: true, }); /** * Input decorator and metadata. * * @stable * @Annotation */ var Input = makePropDecorator('Input', [['bindingPropertyName', undefined]]); /** * Output decorator and metadata. * * @stable * @Annotation */ var Output = makePropDecorator('Output', [['bindingPropertyName', undefined]]); /** * HostBinding decorator and metadata. * * @stable * @Annotation */ var HostBinding = makePropDecorator('HostBinding', [['hostPropertyName', undefined]]); /** * HostBinding decorator and metadata. * * @stable * @Annotation */ var HostListener = makePropDecorator('HostListener', [['eventName', undefined], ['args', []]]); /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @stable */ var LifecycleHooks; (function (LifecycleHooks) { LifecycleHooks[LifecycleHooks["OnInit"] = 0] = "OnInit"; LifecycleHooks[LifecycleHooks["OnDestroy"] = 1] = "OnDestroy"; LifecycleHooks[LifecycleHooks["DoCheck"] = 2] = "DoCheck"; LifecycleHooks[LifecycleHooks["OnChanges"] = 3] = "OnChanges"; LifecycleHooks[LifecycleHooks["AfterContentInit"] = 4] = "AfterContentInit"; LifecycleHooks[LifecycleHooks["AfterContentChecked"] = 5] = "AfterContentChecked"; LifecycleHooks[LifecycleHooks["AfterViewInit"] = 6] = "AfterViewInit"; LifecycleHooks[LifecycleHooks["AfterViewChecked"] = 7] = "AfterViewChecked"; })(LifecycleHooks || (LifecycleHooks = {})); var LIFECYCLE_HOOKS_VALUES = [ LifecycleHooks.OnInit, LifecycleHooks.OnDestroy, LifecycleHooks.DoCheck, LifecycleHooks.OnChanges, LifecycleHooks.AfterContentInit, LifecycleHooks.AfterContentChecked, LifecycleHooks.AfterViewInit, LifecycleHooks.AfterViewChecked ]; /** * @whatItDoes Lifecycle hook that is called when any data-bound property of a directive changes. * @howToUse * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='OnChanges'} * * @description * `ngOnChanges` is called right after the data-bound properties have been checked and before view * and content children are checked if at least one of them has changed. * The `changes` parameter contains the changed properties. * * See {@linkDocs guide/lifecycle-hooks#onchanges "Lifecycle Hooks Guide"}. * * @stable */ var OnChanges = (function () { function OnChanges() { } return OnChanges; }()); /** * @whatItDoes Lifecycle hook that is called after data-bound properties of a directive are * initialized. * @howToUse * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='OnInit'} * * @description * `ngOnInit` is called right after the directive's data-bound properties have been checked for the * first time, and before any of its children have been checked. It is invoked only once when the * directive is instantiated. * * See {@linkDocs guide/lifecycle-hooks "Lifecycle Hooks Guide"}. * * @stable */ var OnInit = (function () { function OnInit() { } return OnInit; }()); /** * @whatItDoes Lifecycle hook that is called when Angular dirty checks a directive. * @howToUse * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='DoCheck'} * * @description * `ngDoCheck` gets called to check the changes in the directives in addition to the default * algorithm. The default change detection algorithm looks for differences by comparing * bound-property values by reference across change detection runs. * * Note that a directive typically should not use both `DoCheck` and {@link OnChanges} to respond to * changes on the same input, as `ngOnChanges` will continue to be called when the default change * detector detects changes. * * See {@link KeyValueDiffers} and {@link IterableDiffers} for implementing custom dirty checking * for collections. * * See {@linkDocs guide/lifecycle-hooks#docheck "Lifecycle Hooks Guide"}. * * @stable */ var DoCheck = (function () { function DoCheck() { } return DoCheck; }()); /** * @whatItDoes Lifecycle hook that is called when a directive or pipe is destroyed. * @howToUse * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='OnDestroy'} * * @description * `ngOnDestroy` callback is typically used for any custom cleanup that needs to occur when the * instance is destroyed. * * See {@linkDocs guide/lifecycle-hooks "Lifecycle Hooks Guide"}. * * @stable */ var OnDestroy = (function () { function OnDestroy() { } return OnDestroy; }()); /** * * @whatItDoes Lifecycle hook that is called after a directive's content has been fully * initialized. * @howToUse * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='AfterContentInit'} * * @description * See {@linkDocs guide/lifecycle-hooks#aftercontent "Lifecycle Hooks Guide"}. * * @stable */ var AfterContentInit = (function () { function AfterContentInit() { } return AfterContentInit; }()); /** * @whatItDoes Lifecycle hook that is called after every check of a directive's content. * @howToUse * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='AfterContentChecked'} * * @description * See {@linkDocs guide/lifecycle-hooks#aftercontent "Lifecycle Hooks Guide"}. * * @stable */ var AfterContentChecked = (function () { function AfterContentChecked() { } return AfterContentChecked; }()); /** * @whatItDoes Lifecycle hook that is called after a component's view has been fully * initialized. * @howToUse * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='AfterViewInit'} * * @description * See {@linkDocs guide/lifecycle-hooks#afterview "Lifecycle Hooks Guide"}. * * @stable */ var AfterViewInit = (function () { function AfterViewInit() { } return AfterViewInit; }()); /** * @whatItDoes Lifecycle hook that is called after every check of a component's view. * @howToUse * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='AfterViewChecked'} * * @description * See {@linkDocs guide/lifecycle-hooks#afterview "Lifecycle Hooks Guide"}. * * @stable */ var AfterViewChecked = (function () { function AfterViewChecked() { } return AfterViewChecked; }()); /** * Defines a schema that will allow: * - any non-Angular elements with a `-` in their name, * - any properties on elements with a `-` in their name which is the common rule for custom * elements. * * @stable */ var CUSTOM_ELEMENTS_SCHEMA = { name: 'custom-elements' }; /** * Defines a schema that will allow any property on any element. * * @experimental */ var NO_ERRORS_SCHEMA = { name: 'no-errors-schema' }; /** * NgModule decorator and metadata. * * @stable * @Annotation */ var NgModule = makeDecorator('NgModule', { providers: undefined, declarations: undefined, imports: undefined, exports: undefined, entryComponents: undefined, bootstrap: undefined, schemas: undefined, id: undefined, }); /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Defines template and style encapsulation options available for Component's {@link Component}. * * See {@link ViewMetadata#encapsulation}. * @stable */ exports.ViewEncapsulation; (function (ViewEncapsulation) { /** * Emulate `Native` scoping of styles by adding an attribute containing surrogate id to the Host * Element and pre-processing the style rules provided via * {@link ViewMetadata#styles} or {@link ViewMetadata#stylesUrls}, and adding the new Host Element * attribute to all selectors. * * This is the default option. */ ViewEncapsulation[ViewEncapsulation["Emulated"] = 0] = "Emulated"; /** * Use the native encapsulation mechanism of the renderer. * * For the DOM this means using [Shadow DOM](https://w3c.github.io/webcomponents/spec/shadow/) and * creating a ShadowRoot for Component's Host Element. */ ViewEncapsulation[ViewEncapsulation["Native"] = 1] = "Native"; /** * Don't provide any template or style encapsulation. */ ViewEncapsulation[ViewEncapsulation["None"] = 2] = "None"; })(exports.ViewEncapsulation || (exports.ViewEncapsulation = {})); /** * Metadata properties available for configuring Views. * * For details on the `@Component` annotation, see {@link Component}. * * ### Example * * ``` * @Component({ * selector: 'greet', * template: 'Hello {{name}}!', * }) * class Greet { * name: string; * * constructor() { * this.name = 'World'; * } * } * ``` * * @deprecated Use Component instead. * * {@link Component} */ var ViewMetadata = (function () { function ViewMetadata(_a) { var _b = _a === void 0 ? {} : _a, templateUrl = _b.templateUrl, template = _b.template, encapsulation = _b.encapsulation, styles = _b.styles, styleUrls = _b.styleUrls, animations = _b.animations, interpolation = _b.interpolation; this.templateUrl = templateUrl; this.template = template; this.styleUrls = styleUrls; this.styles = styles; this.encapsulation = encapsulation; this.animations = animations; this.interpolation = interpolation; } return ViewMetadata; }()); /** * Allows to refer to references which are not yet defined. * * For instance, `forwardRef` is used when the `token` which we need to refer to for the purposes of * DI is declared, * but not yet defined. It is also used when the `token` which we use when creating a query is not * yet defined. * * ### Example * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref'} * @experimental */ function forwardRef(forwardRefFn) { forwardRefFn.__forward_ref__ = forwardRef; forwardRefFn.toString = function () { return stringify(this()); }; return forwardRefFn; } /** * Lazily retrieves the reference value from a forwardRef. * * Acts as the identity function when given a non-forward-ref value. * * ### Example ([live demo](http://plnkr.co/edit/GU72mJrk1fiodChcmiDR?p=preview)) * * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='resolve_forward_ref'} * * See: {@link forwardRef} * @experimental */ function resolveForwardRef(type) { if (typeof type === 'function' && type.hasOwnProperty('__forward_ref__') && type.__forward_ref__ === forwardRef) { return type(); } else { return type; } } /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; function unimplemented() { throw new Error('unimplemented'); } /** * @stable */ var BaseError = (function (_super) { __extends(BaseError, _super); function BaseError(message) { // Errors don't use current this, instead they create a new instance. // We have to do forward all of our api to the nativeInstance. var nativeError = _super.call(this, message); this._nativeError = nativeError; } Object.defineProperty(BaseError.prototype, "message", { get: function () { return this._nativeError.message; }, set: function (message) { this._nativeError.message = message; }, enumerable: true, configurable: true }); Object.defineProperty(BaseError.prototype, "name", { get: function () { return this._nativeError.name; }, enumerable: true, configurable: true }); Object.defineProperty(BaseError.prototype, "stack", { get: function () { return this._nativeError.stack; }, set: function (value) { this._nativeError.stack = value; }, enumerable: true, configurable: true }); BaseError.prototype.toString = function () { return this._nativeError.toString(); }; return BaseError; }(Error)); /** * @stable */ var WrappedError = (function (_super) { __extends(WrappedError, _super); function WrappedError(message, error) { _super.call(this, message + " caused by: " + (error instanceof Error ? error.message : error)); this.originalError = error; } Object.defineProperty(WrappedError.prototype, "stack", { get: function () { return (this.originalError instanceof Error ? this.originalError : this._nativeError) .stack; }, enumerable: true, configurable: true }); return WrappedError; }(BaseError)); var _THROW_IF_NOT_FOUND = new Object(); var THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND; var _NullInjector = (function () { function _NullInjector() { } _NullInjector.prototype.get = function (token, notFoundValue) { if (notFoundValue === void 0) { notFoundValue = _THROW_IF_NOT_FOUND; } if (notFoundValue === _THROW_IF_NOT_FOUND) { throw new Error("No provider for " + stringify(token) + "!"); } return notFoundValue; }; return _NullInjector; }()); /** * @whatItDoes Injector interface * @howToUse * ``` * const injector: Injector = ...; * injector.get(...); * ``` * * @description * For more details, see the {@linkDocs guide/dependency-injection "Dependency Injection Guide"}. * * ### Example * * {@example core/di/ts/injector_spec.ts region='Injector'} * * `Injector` returns itself when given `Injector` as a token: * {@example core/di/ts/injector_spec.ts region='injectInjector'} * * @stable */ var Injector = (function () { function Injector() { } /** * Retrieves an instance from the injector based on the provided token. * If not found: * - Throws {@link NoProviderError} if no `notFoundValue` that is not equal to * Injector.THROW_IF_NOT_FOUND is given * - Returns the `notFoundValue` otherwise */ Injector.prototype.get = function (token, notFoundValue) { return unimplemented(); }; Injector.THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND; Injector.NULL = new _NullInjector(); return Injector; }()); /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ var __extends$1 = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; function findFirstClosedCycle(keys) { var res = []; for (var i = 0; i < keys.length; ++i) { if (res.indexOf(keys[i]) > -1) { res.push(keys[i]); return res; } res.push(keys[i]); } return res; } function constructResolvingPath(keys) { if (keys.length > 1) { var reversed = findFirstClosedCycle(keys.slice().reverse()); var tokenStrs = reversed.map(function (k) { return stringify(k.token); }); return ' (' + tokenStrs.join(' -> ') + ')'; } return ''; } /** * Base class for all errors arising from misconfigured providers. * @stable */ var AbstractProviderError = (function (_super) { __extends$1(AbstractProviderError, _super); function AbstractProviderError(injector, key, constructResolvingMessage) { _super.call(this, 'DI Error'); this.keys = [key]; this.injectors = [injector]; this.constructResolvingMessage = constructResolvingMessage; this.message = this.constructResolvingMessage(this.keys); } AbstractProviderError.prototype.addKey = function (injector, key) { this.injectors.push(injector); this.keys.push(key); this.message = this.constructResolvingMessage(this.keys); }; return AbstractProviderError; }(BaseError)); /** * Thrown when trying to retrieve a dependency by key from {@link Injector}, but the * {@link Injector} does not have a {@link Provider} for the given key. * * ### Example ([live demo](http://plnkr.co/edit/vq8D3FRB9aGbnWJqtEPE?p=preview)) * * ```typescript * class A { * constructor(b:B) {} * } * * expect(() => Injector.resolveAndCreate([A])).toThrowError(); * ``` * @stable */ var NoProviderError = (function (_super) { __extends$1(NoProviderError, _super); function NoProviderError(injector, key) { _super.call(this, injector, key, function (keys) { var first = stringify(keys[0].token); return "No provider for " + first + "!" + constructResolvingPath(keys); }); } return NoProviderError; }(AbstractProviderError)); /** * Thrown when dependencies form a cycle. * * ### Example ([live demo](http://plnkr.co/edit/wYQdNos0Tzql3ei1EV9j?p=info)) * * ```typescript * var injector = Injector.resolveAndCreate([ * {provide: "one", useFactory: (two) => "two", deps: [[new Inject("two")]]}, * {provide: "two", useFactory: (one) => "one", deps: [[new Inject("one")]]} * ]); * * expect(() => injector.get("one")).toThrowError(); * ``` * * Retrieving `A` or `B` throws a `CyclicDependencyError` as the graph above cannot be constructed. * @stable */ var CyclicDependencyError = (function (_super) {