2018-05-09 08:35:25 -07:00
|
|
|
/**
|
|
|
|
* @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
|
|
|
|
*/
|
|
|
|
|
2019-01-09 13:49:16 -08:00
|
|
|
import {defineInjectable, defineInjector,} from '../../di/interface/defs';
|
2018-10-23 14:28:15 -07:00
|
|
|
import {inject} from '../../di/injector_compatibility';
|
2018-05-09 08:35:25 -07:00
|
|
|
import * as r3 from '../index';
|
2018-07-11 10:58:18 -07:00
|
|
|
import * as sanitization from '../../sanitization/sanitization';
|
2018-05-09 08:35:25 -07:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A mapping of the @angular/core API surface used in generated expressions to the actual symbols.
|
|
|
|
*
|
|
|
|
* This should be kept up to date with the public exports of @angular/core.
|
|
|
|
*/
|
2018-05-21 08:15:19 -07:00
|
|
|
export const angularCoreEnv: {[name: string]: Function} = {
|
2018-08-07 12:04:39 -07:00
|
|
|
'ɵdefineBase': r3.defineBase,
|
2018-05-09 08:35:25 -07:00
|
|
|
'ɵdefineComponent': r3.defineComponent,
|
2018-05-21 08:15:19 -07:00
|
|
|
'ɵdefineDirective': r3.defineDirective,
|
2018-05-09 08:35:25 -07:00
|
|
|
'defineInjectable': defineInjectable,
|
2018-06-13 08:39:32 -07:00
|
|
|
'defineInjector': defineInjector,
|
2018-05-31 15:50:02 -07:00
|
|
|
'ɵdefineNgModule': r3.defineNgModule,
|
2018-06-13 08:39:32 -07:00
|
|
|
'ɵdefinePipe': r3.definePipe,
|
2018-05-09 08:35:25 -07:00
|
|
|
'ɵdirectiveInject': r3.directiveInject,
|
2018-07-16 16:36:31 -07:00
|
|
|
'ɵgetFactoryOf': r3.getFactoryOf,
|
|
|
|
'ɵgetInheritedFactory': r3.getInheritedFactory,
|
2018-05-09 08:35:25 -07:00
|
|
|
'inject': inject,
|
2018-05-21 08:15:19 -07:00
|
|
|
'ɵinjectAttribute': r3.injectAttribute,
|
2018-08-20 14:23:17 +02:00
|
|
|
'ɵtemplateRefExtractor': r3.templateRefExtractor,
|
2019-01-14 17:39:21 -08:00
|
|
|
'ɵNgOnChangesFeature': r3.NgOnChangesFeature,
|
2018-10-18 09:23:18 +02:00
|
|
|
'ɵProvidersFeature': r3.ProvidersFeature,
|
2018-06-18 08:05:06 -07:00
|
|
|
'ɵInheritDefinitionFeature': r3.InheritDefinitionFeature,
|
2018-08-14 16:48:58 -07:00
|
|
|
'ɵelementAttribute': r3.elementAttribute,
|
|
|
|
'ɵbind': r3.bind,
|
|
|
|
'ɵcontainer': r3.container,
|
|
|
|
'ɵnextContext': r3.nextContext,
|
|
|
|
'ɵcontainerRefreshStart': r3.containerRefreshStart,
|
|
|
|
'ɵcontainerRefreshEnd': r3.containerRefreshEnd,
|
|
|
|
'ɵnamespaceHTML': r3.namespaceHTML,
|
|
|
|
'ɵnamespaceMathML': r3.namespaceMathML,
|
|
|
|
'ɵnamespaceSVG': r3.namespaceSVG,
|
2018-09-26 21:09:03 -07:00
|
|
|
'ɵenableBindings': r3.enableBindings,
|
|
|
|
'ɵdisableBindings': r3.disableBindings,
|
2018-11-27 12:05:26 -08:00
|
|
|
'ɵallocHostVars': r3.allocHostVars,
|
2018-08-14 16:48:58 -07:00
|
|
|
'ɵelementStart': r3.elementStart,
|
|
|
|
'ɵelementEnd': r3.elementEnd,
|
|
|
|
'ɵelement': r3.element,
|
2018-11-12 00:46:02 +01:00
|
|
|
'ɵelementContainerStart': r3.elementContainerStart,
|
|
|
|
'ɵelementContainerEnd': r3.elementContainerEnd,
|
2018-08-14 16:48:58 -07:00
|
|
|
'ɵpureFunction0': r3.pureFunction0,
|
|
|
|
'ɵpureFunction1': r3.pureFunction1,
|
|
|
|
'ɵpureFunction2': r3.pureFunction2,
|
|
|
|
'ɵpureFunction3': r3.pureFunction3,
|
|
|
|
'ɵpureFunction4': r3.pureFunction4,
|
|
|
|
'ɵpureFunction5': r3.pureFunction5,
|
|
|
|
'ɵpureFunction6': r3.pureFunction6,
|
|
|
|
'ɵpureFunction7': r3.pureFunction7,
|
|
|
|
'ɵpureFunction8': r3.pureFunction8,
|
|
|
|
'ɵpureFunctionV': r3.pureFunctionV,
|
|
|
|
'ɵgetCurrentView': r3.getCurrentView,
|
|
|
|
'ɵrestoreView': r3.restoreView,
|
|
|
|
'ɵinterpolation1': r3.interpolation1,
|
|
|
|
'ɵinterpolation2': r3.interpolation2,
|
|
|
|
'ɵinterpolation3': r3.interpolation3,
|
|
|
|
'ɵinterpolation4': r3.interpolation4,
|
|
|
|
'ɵinterpolation5': r3.interpolation5,
|
|
|
|
'ɵinterpolation6': r3.interpolation6,
|
|
|
|
'ɵinterpolation7': r3.interpolation7,
|
|
|
|
'ɵinterpolation8': r3.interpolation8,
|
|
|
|
'ɵinterpolationV': r3.interpolationV,
|
|
|
|
'ɵelementClassProp': r3.elementClassProp,
|
|
|
|
'ɵlistener': r3.listener,
|
|
|
|
'ɵload': r3.load,
|
|
|
|
'ɵprojection': r3.projection,
|
|
|
|
'ɵelementProperty': r3.elementProperty,
|
2019-01-03 18:24:21 -08:00
|
|
|
'ɵcomponentHostSyntheticProperty': r3.componentHostSyntheticProperty,
|
2019-01-17 11:09:13 -08:00
|
|
|
'ɵcomponentHostSyntheticListener': r3.componentHostSyntheticListener,
|
2018-08-14 16:48:58 -07:00
|
|
|
'ɵpipeBind1': r3.pipeBind1,
|
2018-10-15 17:51:21 +02:00
|
|
|
'ɵpipeBind2': r3.pipeBind2,
|
2018-08-14 16:48:58 -07:00
|
|
|
'ɵpipeBind3': r3.pipeBind3,
|
|
|
|
'ɵpipeBind4': r3.pipeBind4,
|
|
|
|
'ɵpipeBindV': r3.pipeBindV,
|
|
|
|
'ɵprojectionDef': r3.projectionDef,
|
|
|
|
'ɵpipe': r3.pipe,
|
|
|
|
'ɵqueryRefresh': r3.queryRefresh,
|
2019-01-18 18:02:32 -08:00
|
|
|
'ɵviewQuery': r3.viewQuery,
|
|
|
|
'ɵloadViewQuery': r3.loadViewQuery,
|
2019-01-23 11:54:43 -08:00
|
|
|
'ɵcontentQuery': r3.contentQuery,
|
|
|
|
'ɵloadContentQuery': r3.loadContentQuery,
|
2018-08-14 16:48:58 -07:00
|
|
|
'ɵreference': r3.reference,
|
|
|
|
'ɵelementStyling': r3.elementStyling,
|
2018-12-13 15:51:47 -08:00
|
|
|
'ɵelementHostAttrs': r3.elementHostAttrs,
|
2018-08-14 16:48:58 -07:00
|
|
|
'ɵelementStylingMap': r3.elementStylingMap,
|
2018-09-27 15:07:51 -07:00
|
|
|
'ɵelementStyleProp': r3.elementStyleProp,
|
2018-08-14 16:48:58 -07:00
|
|
|
'ɵelementStylingApply': r3.elementStylingApply,
|
2018-08-15 18:37:03 -07:00
|
|
|
'ɵtemplate': r3.template,
|
2018-08-14 16:48:58 -07:00
|
|
|
'ɵtext': r3.text,
|
|
|
|
'ɵtextBinding': r3.textBinding,
|
|
|
|
'ɵembeddedViewStart': r3.embeddedViewStart,
|
|
|
|
'ɵembeddedViewEnd': r3.embeddedViewEnd,
|
2018-10-18 10:08:51 -07:00
|
|
|
'ɵi18n': r3.i18n,
|
2018-11-13 09:36:30 +01:00
|
|
|
'ɵi18nAttributes': r3.i18nAttributes,
|
2018-10-05 14:12:13 -07:00
|
|
|
'ɵi18nExp': r3.i18nExp,
|
|
|
|
'ɵi18nStart': r3.i18nStart,
|
|
|
|
'ɵi18nEnd': r3.i18nEnd,
|
|
|
|
'ɵi18nApply': r3.i18nApply,
|
2018-10-18 10:08:51 -07:00
|
|
|
'ɵi18nPostprocess': r3.i18nPostprocess,
|
2018-12-19 15:03:47 -08:00
|
|
|
'ɵresolveWindow': r3.resolveWindow,
|
|
|
|
'ɵresolveDocument': r3.resolveDocument,
|
|
|
|
'ɵresolveBody': r3.resolveBody,
|
feat(ivy): detect cycles and use remote scoping of components if needed (#28169)
By its nature, Ivy alters the import graph of a TS program, adding imports
where template dependencies exist. For example, if ComponentA uses PipeB
in its template, Ivy will insert an import of PipeB into the file in which
ComponentA is declared.
Any insertion of an import into a program has the potential to introduce a
cycle into the import graph. If for some reason the file in which PipeB is
declared imports the file in which ComponentA is declared (maybe it makes
use of a service or utility function that happens to be in the same file as
ComponentA) then this could create an import cycle. This turns out to
happen quite regularly in larger Angular codebases.
TypeScript and the Ivy runtime have no issues with such cycles. However,
other tools are not so accepting. In particular the Closure Compiler is
very anti-cycle.
To mitigate this problem, it's necessary to detect when the insertion of
an import would create a cycle. ngtsc can then use a different strategy,
known as "remote scoping", instead of directly writing a reference from
one component to another. Under remote scoping, a function
'setComponentScope' is called after the declaration of the component's
module, which does not require the addition of new imports.
FW-647 #resolve
PR Close #28169
2019-01-15 12:32:10 -08:00
|
|
|
'ɵsetComponentScope': r3.setComponentScope,
|
2018-07-11 10:58:18 -07:00
|
|
|
|
2018-09-05 17:13:17 +02:00
|
|
|
'ɵsanitizeHtml': sanitization.sanitizeHtml,
|
|
|
|
'ɵsanitizeStyle': sanitization.sanitizeStyle,
|
|
|
|
'ɵdefaultStyleSanitizer': sanitization.defaultStyleSanitizer,
|
|
|
|
'ɵsanitizeResourceUrl': sanitization.sanitizeResourceUrl,
|
|
|
|
'ɵsanitizeScript': sanitization.sanitizeScript,
|
2019-01-03 10:04:06 -08:00
|
|
|
'ɵsanitizeUrl': sanitization.sanitizeUrl,
|
|
|
|
'ɵsanitizeUrlOrResourceUrl': sanitization.sanitizeUrlOrResourceUrl
|
2018-05-09 08:35:25 -07:00
|
|
|
};
|