@angular/language-service 5.1.3 → 5.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/language-service.umd.js +1093 -209
- package/bundles/language-service.umd.js.map +1 -1
- package/bundles/language-service.umd.min.js +69 -41
- package/bundles/language-service.umd.min.js.map +1 -1
- package/esm2015/language-service.js +15 -11
- package/esm2015/language-service.js.map +1 -1
- package/esm5/language-service.js +15 -13
- package/esm5/language-service.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v5.
|
|
3
|
-
* (c) 2010-
|
|
2
|
+
* @license Angular v5.2.0
|
|
3
|
+
* (c) 2010-2018 Google, Inc. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -59,8 +59,8 @@ var __assign = Object.assign || function __assign(t) {
|
|
|
59
59
|
};
|
|
60
60
|
|
|
61
61
|
/**
|
|
62
|
-
* @license Angular v5.
|
|
63
|
-
* (c) 2010-
|
|
62
|
+
* @license Angular v5.2.0
|
|
63
|
+
* (c) 2010-2018 Google, Inc. https://angular.io/
|
|
64
64
|
* License: MIT
|
|
65
65
|
*/
|
|
66
66
|
/**
|
|
@@ -688,15 +688,10 @@ var Version = /** @class */ (function () {
|
|
|
688
688
|
* Use of this source code is governed by an MIT-style license that can be
|
|
689
689
|
* found in the LICENSE file at https://angular.io/license
|
|
690
690
|
*/
|
|
691
|
-
/**
|
|
692
|
-
* @module
|
|
693
|
-
* @description
|
|
694
|
-
* Entry point for all public APIs of the common package.
|
|
695
|
-
*/
|
|
696
691
|
/**
|
|
697
692
|
* \@stable
|
|
698
693
|
*/
|
|
699
|
-
var VERSION$1 = new Version('5.
|
|
694
|
+
var VERSION$1 = new Version('5.2.0');
|
|
700
695
|
|
|
701
696
|
/**
|
|
702
697
|
* @fileoverview added by tsickle
|
|
@@ -1722,7 +1717,7 @@ var CompileTemplateMetadata = /** @class */ (function () {
|
|
|
1722
1717
|
*/
|
|
1723
1718
|
var CompileDirectiveMetadata = /** @class */ (function () {
|
|
1724
1719
|
function CompileDirectiveMetadata(_a) {
|
|
1725
|
-
var isHost = _a.isHost, type = _a.type, isComponent = _a.isComponent, selector = _a.selector, exportAs = _a.exportAs, changeDetection = _a.changeDetection, inputs = _a.inputs, outputs = _a.outputs, hostListeners = _a.hostListeners, hostProperties = _a.hostProperties, hostAttributes = _a.hostAttributes, providers = _a.providers, viewProviders = _a.viewProviders, queries = _a.queries, viewQueries = _a.viewQueries, entryComponents = _a.entryComponents, template = _a.template, componentViewType = _a.componentViewType, rendererType = _a.rendererType, componentFactory = _a.componentFactory;
|
|
1720
|
+
var isHost = _a.isHost, type = _a.type, isComponent = _a.isComponent, selector = _a.selector, exportAs = _a.exportAs, changeDetection = _a.changeDetection, inputs = _a.inputs, outputs = _a.outputs, hostListeners = _a.hostListeners, hostProperties = _a.hostProperties, hostAttributes = _a.hostAttributes, providers = _a.providers, viewProviders = _a.viewProviders, queries = _a.queries, guards = _a.guards, viewQueries = _a.viewQueries, entryComponents = _a.entryComponents, template = _a.template, componentViewType = _a.componentViewType, rendererType = _a.rendererType, componentFactory = _a.componentFactory;
|
|
1726
1721
|
this.isHost = !!isHost;
|
|
1727
1722
|
this.type = type;
|
|
1728
1723
|
this.isComponent = isComponent;
|
|
@@ -1737,6 +1732,7 @@ var CompileDirectiveMetadata = /** @class */ (function () {
|
|
|
1737
1732
|
this.providers = _normalizeArray(providers);
|
|
1738
1733
|
this.viewProviders = _normalizeArray(viewProviders);
|
|
1739
1734
|
this.queries = _normalizeArray(queries);
|
|
1735
|
+
this.guards = guards;
|
|
1740
1736
|
this.viewQueries = _normalizeArray(viewQueries);
|
|
1741
1737
|
this.entryComponents = _normalizeArray(entryComponents);
|
|
1742
1738
|
this.template = template;
|
|
@@ -1753,7 +1749,7 @@ var CompileDirectiveMetadata = /** @class */ (function () {
|
|
|
1753
1749
|
* @return {?}
|
|
1754
1750
|
*/
|
|
1755
1751
|
function (_a) {
|
|
1756
|
-
var isHost = _a.isHost, type = _a.type, isComponent = _a.isComponent, selector = _a.selector, exportAs = _a.exportAs, changeDetection = _a.changeDetection, inputs = _a.inputs, outputs = _a.outputs, host = _a.host, providers = _a.providers, viewProviders = _a.viewProviders, queries = _a.queries, viewQueries = _a.viewQueries, entryComponents = _a.entryComponents, template = _a.template, componentViewType = _a.componentViewType, rendererType = _a.rendererType, componentFactory = _a.componentFactory;
|
|
1752
|
+
var isHost = _a.isHost, type = _a.type, isComponent = _a.isComponent, selector = _a.selector, exportAs = _a.exportAs, changeDetection = _a.changeDetection, inputs = _a.inputs, outputs = _a.outputs, host = _a.host, providers = _a.providers, viewProviders = _a.viewProviders, queries = _a.queries, guards = _a.guards, viewQueries = _a.viewQueries, entryComponents = _a.entryComponents, template = _a.template, componentViewType = _a.componentViewType, rendererType = _a.rendererType, componentFactory = _a.componentFactory;
|
|
1757
1753
|
var /** @type {?} */ hostListeners = {};
|
|
1758
1754
|
var /** @type {?} */ hostProperties = {};
|
|
1759
1755
|
var /** @type {?} */ hostAttributes = {};
|
|
@@ -1802,6 +1798,7 @@ var CompileDirectiveMetadata = /** @class */ (function () {
|
|
|
1802
1798
|
providers: providers,
|
|
1803
1799
|
viewProviders: viewProviders,
|
|
1804
1800
|
queries: queries,
|
|
1801
|
+
guards: guards,
|
|
1805
1802
|
viewQueries: viewQueries,
|
|
1806
1803
|
entryComponents: entryComponents,
|
|
1807
1804
|
template: template,
|
|
@@ -1831,6 +1828,7 @@ var CompileDirectiveMetadata = /** @class */ (function () {
|
|
|
1831
1828
|
providers: this.providers,
|
|
1832
1829
|
viewProviders: this.viewProviders,
|
|
1833
1830
|
queries: this.queries,
|
|
1831
|
+
guards: this.guards,
|
|
1834
1832
|
viewQueries: this.viewQueries,
|
|
1835
1833
|
entryComponents: this.entryComponents,
|
|
1836
1834
|
changeDetection: this.changeDetection,
|
|
@@ -3584,7 +3582,8 @@ var DirectiveResolver = /** @class */ (function () {
|
|
|
3584
3582
|
var /** @type {?} */ metadata = findLast(typeMetadata, isDirectiveMetadata);
|
|
3585
3583
|
if (metadata) {
|
|
3586
3584
|
var /** @type {?} */ propertyMetadata = this._reflector.propMetadata(type);
|
|
3587
|
-
|
|
3585
|
+
var /** @type {?} */ guards = this._reflector.guards(type);
|
|
3586
|
+
return this._mergeWithPropertyMetadata(metadata, propertyMetadata, guards, type);
|
|
3588
3587
|
}
|
|
3589
3588
|
}
|
|
3590
3589
|
if (throwIfNotFound) {
|
|
@@ -3595,16 +3594,18 @@ var DirectiveResolver = /** @class */ (function () {
|
|
|
3595
3594
|
/**
|
|
3596
3595
|
* @param {?} dm
|
|
3597
3596
|
* @param {?} propertyMetadata
|
|
3597
|
+
* @param {?} guards
|
|
3598
3598
|
* @param {?} directiveType
|
|
3599
3599
|
* @return {?}
|
|
3600
3600
|
*/
|
|
3601
3601
|
DirectiveResolver.prototype._mergeWithPropertyMetadata = /**
|
|
3602
3602
|
* @param {?} dm
|
|
3603
3603
|
* @param {?} propertyMetadata
|
|
3604
|
+
* @param {?} guards
|
|
3604
3605
|
* @param {?} directiveType
|
|
3605
3606
|
* @return {?}
|
|
3606
3607
|
*/
|
|
3607
|
-
function (dm, propertyMetadata, directiveType) {
|
|
3608
|
+
function (dm, propertyMetadata, guards, directiveType) {
|
|
3608
3609
|
var /** @type {?} */ inputs = [];
|
|
3609
3610
|
var /** @type {?} */ outputs = [];
|
|
3610
3611
|
var /** @type {?} */ host = {};
|
|
@@ -3654,7 +3655,7 @@ var DirectiveResolver = /** @class */ (function () {
|
|
|
3654
3655
|
queries[propName] = query;
|
|
3655
3656
|
}
|
|
3656
3657
|
});
|
|
3657
|
-
return this._merge(dm, inputs, outputs, host, queries, directiveType);
|
|
3658
|
+
return this._merge(dm, inputs, outputs, host, queries, guards, directiveType);
|
|
3658
3659
|
};
|
|
3659
3660
|
/**
|
|
3660
3661
|
* @param {?} def
|
|
@@ -3675,11 +3676,13 @@ var DirectiveResolver = /** @class */ (function () {
|
|
|
3675
3676
|
*/
|
|
3676
3677
|
function (bindings) {
|
|
3677
3678
|
var /** @type {?} */ names = new Set();
|
|
3679
|
+
var /** @type {?} */ publicNames = new Set();
|
|
3678
3680
|
var /** @type {?} */ reversedResult = [];
|
|
3679
3681
|
// go last to first to allow later entries to overwrite previous entries
|
|
3680
3682
|
for (var /** @type {?} */ i = bindings.length - 1; i >= 0; i--) {
|
|
3681
3683
|
var /** @type {?} */ binding = bindings[i];
|
|
3682
3684
|
var /** @type {?} */ name_1 = this._extractPublicName(binding);
|
|
3685
|
+
publicNames.add(name_1);
|
|
3683
3686
|
if (!names.has(name_1)) {
|
|
3684
3687
|
names.add(name_1);
|
|
3685
3688
|
reversedResult.push(binding);
|
|
@@ -3693,6 +3696,7 @@ var DirectiveResolver = /** @class */ (function () {
|
|
|
3693
3696
|
* @param {?} outputs
|
|
3694
3697
|
* @param {?} host
|
|
3695
3698
|
* @param {?} queries
|
|
3699
|
+
* @param {?} guards
|
|
3696
3700
|
* @param {?} directiveType
|
|
3697
3701
|
* @return {?}
|
|
3698
3702
|
*/
|
|
@@ -3702,10 +3706,11 @@ var DirectiveResolver = /** @class */ (function () {
|
|
|
3702
3706
|
* @param {?} outputs
|
|
3703
3707
|
* @param {?} host
|
|
3704
3708
|
* @param {?} queries
|
|
3709
|
+
* @param {?} guards
|
|
3705
3710
|
* @param {?} directiveType
|
|
3706
3711
|
* @return {?}
|
|
3707
3712
|
*/
|
|
3708
|
-
function (directive, inputs, outputs, host, queries, directiveType) {
|
|
3713
|
+
function (directive, inputs, outputs, host, queries, guards, directiveType) {
|
|
3709
3714
|
var /** @type {?} */ mergedInputs = this._dedupeBindings(directive.inputs ? directive.inputs.concat(inputs) : inputs);
|
|
3710
3715
|
var /** @type {?} */ mergedOutputs = this._dedupeBindings(directive.outputs ? directive.outputs.concat(outputs) : outputs);
|
|
3711
3716
|
var /** @type {?} */ mergedHost = directive.host ? __assign({}, directive.host, host) : host;
|
|
@@ -3742,7 +3747,7 @@ var DirectiveResolver = /** @class */ (function () {
|
|
|
3742
3747
|
host: mergedHost,
|
|
3743
3748
|
exportAs: directive.exportAs,
|
|
3744
3749
|
queries: mergedQueries,
|
|
3745
|
-
providers: directive.providers
|
|
3750
|
+
providers: directive.providers, guards: guards
|
|
3746
3751
|
});
|
|
3747
3752
|
}
|
|
3748
3753
|
};
|
|
@@ -7431,13 +7436,6 @@ var SimpleExpressionChecker = /** @class */ (function () {
|
|
|
7431
7436
|
* @fileoverview added by tsickle
|
|
7432
7437
|
* @suppress {checkTypes} checked by tsc
|
|
7433
7438
|
*/
|
|
7434
|
-
/**
|
|
7435
|
-
* @license
|
|
7436
|
-
* Copyright Google Inc. All Rights Reserved.
|
|
7437
|
-
*
|
|
7438
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
7439
|
-
* found in the LICENSE file at https://angular.io/license
|
|
7440
|
-
*/
|
|
7441
7439
|
var ParseLocation = /** @class */ (function () {
|
|
7442
7440
|
function ParseLocation(file, offset, line, col) {
|
|
7443
7441
|
this.file = file;
|
|
@@ -14897,6 +14895,7 @@ var CompileMetadataResolver = /** @class */ (function () {
|
|
|
14897
14895
|
providers: [],
|
|
14898
14896
|
viewProviders: [],
|
|
14899
14897
|
queries: [],
|
|
14898
|
+
guards: {},
|
|
14900
14899
|
viewQueries: [],
|
|
14901
14900
|
componentViewType: hostViewType,
|
|
14902
14901
|
rendererType: /** @type {?} */ ({ id: '__Host__', encapsulation: ViewEncapsulation.None, styles: [], data: {} }),
|
|
@@ -14939,6 +14938,7 @@ var CompileMetadataResolver = /** @class */ (function () {
|
|
|
14939
14938
|
providers: metadata.providers,
|
|
14940
14939
|
viewProviders: metadata.viewProviders,
|
|
14941
14940
|
queries: metadata.queries,
|
|
14941
|
+
guards: metadata.guards,
|
|
14942
14942
|
viewQueries: metadata.viewQueries,
|
|
14943
14943
|
entryComponents: metadata.entryComponents,
|
|
14944
14944
|
componentViewType: metadata.componentViewType,
|
|
@@ -15076,6 +15076,7 @@ var CompileMetadataResolver = /** @class */ (function () {
|
|
|
15076
15076
|
providers: providers || [],
|
|
15077
15077
|
viewProviders: viewProviders || [],
|
|
15078
15078
|
queries: queries || [],
|
|
15079
|
+
guards: dirMeta.guards || {},
|
|
15079
15080
|
viewQueries: viewQueries || [],
|
|
15080
15081
|
entryComponents: entryComponentMetadata,
|
|
15081
15082
|
componentViewType: nonNormalizedTemplateMetadata ? this.getComponentViewClass(directiveType) :
|
|
@@ -25902,6 +25903,16 @@ var ConvertPropertyBindingResult = /** @class */ (function () {
|
|
|
25902
25903
|
}
|
|
25903
25904
|
return ConvertPropertyBindingResult;
|
|
25904
25905
|
}());
|
|
25906
|
+
/** @enum {number} */
|
|
25907
|
+
var BindingForm = {
|
|
25908
|
+
// The general form of binding expression, supports all expressions.
|
|
25909
|
+
General: 0,
|
|
25910
|
+
// Try to generate a simple binding (no temporaries or statements)
|
|
25911
|
+
// otherise generate a general binding
|
|
25912
|
+
TrySimple: 1,
|
|
25913
|
+
};
|
|
25914
|
+
BindingForm[BindingForm.General] = "General";
|
|
25915
|
+
BindingForm[BindingForm.TrySimple] = "TrySimple";
|
|
25905
25916
|
/**
|
|
25906
25917
|
* Converts the given expression AST into an executable output AST, assuming the expression
|
|
25907
25918
|
* is used in property binding. The expression has to be preprocessed via
|
|
@@ -25910,9 +25921,10 @@ var ConvertPropertyBindingResult = /** @class */ (function () {
|
|
|
25910
25921
|
* @param {?} implicitReceiver
|
|
25911
25922
|
* @param {?} expressionWithoutBuiltins
|
|
25912
25923
|
* @param {?} bindingId
|
|
25924
|
+
* @param {?} form
|
|
25913
25925
|
* @return {?}
|
|
25914
25926
|
*/
|
|
25915
|
-
function convertPropertyBinding(localResolver, implicitReceiver, expressionWithoutBuiltins, bindingId) {
|
|
25927
|
+
function convertPropertyBinding(localResolver, implicitReceiver, expressionWithoutBuiltins, bindingId, form) {
|
|
25916
25928
|
if (!localResolver) {
|
|
25917
25929
|
localResolver = new DefaultLocalResolver();
|
|
25918
25930
|
}
|
|
@@ -25925,7 +25937,10 @@ function convertPropertyBinding(localResolver, implicitReceiver, expressionWitho
|
|
|
25925
25937
|
stmts.push(temporaryDeclaration(bindingId, i));
|
|
25926
25938
|
}
|
|
25927
25939
|
}
|
|
25928
|
-
|
|
25940
|
+
else if (form == BindingForm.TrySimple) {
|
|
25941
|
+
return new ConvertPropertyBindingResult([], outputExpr);
|
|
25942
|
+
}
|
|
25943
|
+
stmts.push(currValExpr.set(outputExpr).toDeclStmt(DYNAMIC_TYPE, [StmtModifier.Final]));
|
|
25929
25944
|
return new ConvertPropertyBindingResult(stmts, currValExpr);
|
|
25930
25945
|
}
|
|
25931
25946
|
/**
|
|
@@ -26301,7 +26316,12 @@ var _AstToIrVisitor = /** @class */ (function () {
|
|
|
26301
26316
|
* @return {?}
|
|
26302
26317
|
*/
|
|
26303
26318
|
function (ast, mode) {
|
|
26304
|
-
|
|
26319
|
+
// For literal values of null, undefined, true, or false allow type inteference
|
|
26320
|
+
// to infer the type.
|
|
26321
|
+
var /** @type {?} */ type = ast.value === null || ast.value === undefined || ast.value === true || ast.value === true ?
|
|
26322
|
+
INFERRED_TYPE :
|
|
26323
|
+
undefined;
|
|
26324
|
+
return convertToStatementIfNeeded(mode, literal(ast.value, type));
|
|
26305
26325
|
};
|
|
26306
26326
|
/**
|
|
26307
26327
|
* @param {?} name
|
|
@@ -26323,6 +26343,13 @@ var _AstToIrVisitor = /** @class */ (function () {
|
|
|
26323
26343
|
* @return {?}
|
|
26324
26344
|
*/
|
|
26325
26345
|
function (ast, mode) {
|
|
26346
|
+
if (ast.receiver instanceof ImplicitReceiver && ast.name == '$any') {
|
|
26347
|
+
var /** @type {?} */ args = /** @type {?} */ (this.visitAll(ast.args, _Mode.Expression));
|
|
26348
|
+
if (args.length != 1) {
|
|
26349
|
+
throw new Error("Invalid call to $any, expected 1 argument but received " + (args.length || 'none'));
|
|
26350
|
+
}
|
|
26351
|
+
return (/** @type {?} */ (args[0])).cast(DYNAMIC_TYPE);
|
|
26352
|
+
}
|
|
26326
26353
|
var /** @type {?} */ leftMostSafe = this.leftMostSafeNode(ast);
|
|
26327
26354
|
if (leftMostSafe) {
|
|
26328
26355
|
return this.convertSafeAccess(ast, leftMostSafe, mode);
|
|
@@ -26941,6 +26968,7 @@ var TypeCheckCompiler = /** @class */ (function () {
|
|
|
26941
26968
|
* @param {?} template
|
|
26942
26969
|
* @param {?} usedPipes
|
|
26943
26970
|
* @param {?} externalReferenceVars
|
|
26971
|
+
* @param {?} ctx
|
|
26944
26972
|
* @return {?}
|
|
26945
26973
|
*/
|
|
26946
26974
|
TypeCheckCompiler.prototype.compileComponent = /**
|
|
@@ -26955,18 +26983,19 @@ var TypeCheckCompiler = /** @class */ (function () {
|
|
|
26955
26983
|
* @param {?} template
|
|
26956
26984
|
* @param {?} usedPipes
|
|
26957
26985
|
* @param {?} externalReferenceVars
|
|
26986
|
+
* @param {?} ctx
|
|
26958
26987
|
* @return {?}
|
|
26959
26988
|
*/
|
|
26960
|
-
function (componentId, component, template, usedPipes, externalReferenceVars) {
|
|
26989
|
+
function (componentId, component, template, usedPipes, externalReferenceVars, ctx) {
|
|
26961
26990
|
var _this = this;
|
|
26962
26991
|
var /** @type {?} */ pipes = new Map();
|
|
26963
26992
|
usedPipes.forEach(function (p) { return pipes.set(p.name, p.type.reference); });
|
|
26964
26993
|
var /** @type {?} */ embeddedViewCount = 0;
|
|
26965
|
-
var /** @type {?} */ viewBuilderFactory = function (parent) {
|
|
26994
|
+
var /** @type {?} */ viewBuilderFactory = function (parent, guards) {
|
|
26966
26995
|
var /** @type {?} */ embeddedViewIndex = embeddedViewCount++;
|
|
26967
|
-
return new ViewBuilder(_this.options, _this.reflector, externalReferenceVars, parent, component.type.reference, component.isHost, embeddedViewIndex, pipes, viewBuilderFactory);
|
|
26996
|
+
return new ViewBuilder(_this.options, _this.reflector, externalReferenceVars, parent, component.type.reference, component.isHost, embeddedViewIndex, pipes, guards, ctx, viewBuilderFactory);
|
|
26968
26997
|
};
|
|
26969
|
-
var /** @type {?} */ visitor = viewBuilderFactory(null);
|
|
26998
|
+
var /** @type {?} */ visitor = viewBuilderFactory(null, []);
|
|
26970
26999
|
visitor.visitAll([], template);
|
|
26971
27000
|
return visitor.build(componentId);
|
|
26972
27001
|
};
|
|
@@ -26996,7 +27025,7 @@ var TypeCheckLocalResolver = /** @class */ (function () {
|
|
|
26996
27025
|
}());
|
|
26997
27026
|
var defaultResolver = new TypeCheckLocalResolver();
|
|
26998
27027
|
var ViewBuilder = /** @class */ (function () {
|
|
26999
|
-
function ViewBuilder(options, reflector, externalReferenceVars, parent, component, isHostComponent, embeddedViewIndex, pipes, viewBuilderFactory) {
|
|
27028
|
+
function ViewBuilder(options, reflector, externalReferenceVars, parent, component, isHostComponent, embeddedViewIndex, pipes, guards, ctx, viewBuilderFactory) {
|
|
27000
27029
|
this.options = options;
|
|
27001
27030
|
this.reflector = reflector;
|
|
27002
27031
|
this.externalReferenceVars = externalReferenceVars;
|
|
@@ -27005,6 +27034,8 @@ var ViewBuilder = /** @class */ (function () {
|
|
|
27005
27034
|
this.isHostComponent = isHostComponent;
|
|
27006
27035
|
this.embeddedViewIndex = embeddedViewIndex;
|
|
27007
27036
|
this.pipes = pipes;
|
|
27037
|
+
this.guards = guards;
|
|
27038
|
+
this.ctx = ctx;
|
|
27008
27039
|
this.viewBuilderFactory = viewBuilderFactory;
|
|
27009
27040
|
this.refOutputVars = new Map();
|
|
27010
27041
|
this.variables = [];
|
|
@@ -27036,6 +27067,33 @@ var ViewBuilder = /** @class */ (function () {
|
|
|
27036
27067
|
}
|
|
27037
27068
|
return varName;
|
|
27038
27069
|
};
|
|
27070
|
+
/**
|
|
27071
|
+
* @param {?} ast
|
|
27072
|
+
* @return {?}
|
|
27073
|
+
*/
|
|
27074
|
+
ViewBuilder.prototype.getTypeGuardExpressions = /**
|
|
27075
|
+
* @param {?} ast
|
|
27076
|
+
* @return {?}
|
|
27077
|
+
*/
|
|
27078
|
+
function (ast) {
|
|
27079
|
+
var /** @type {?} */ result = this.guards.slice();
|
|
27080
|
+
for (var _i = 0, _a = ast.directives; _i < _a.length; _i++) {
|
|
27081
|
+
var directive = _a[_i];
|
|
27082
|
+
for (var _b = 0, _c = directive.inputs; _b < _c.length; _b++) {
|
|
27083
|
+
var input = _c[_b];
|
|
27084
|
+
var /** @type {?} */ guard = directive.directive.guards[input.directiveName];
|
|
27085
|
+
if (guard) {
|
|
27086
|
+
var /** @type {?} */ useIf = guard === 'UseIf';
|
|
27087
|
+
result.push({
|
|
27088
|
+
guard: guard,
|
|
27089
|
+
useIf: useIf,
|
|
27090
|
+
expression: /** @type {?} */ ({ context: this.component, value: input.value })
|
|
27091
|
+
});
|
|
27092
|
+
}
|
|
27093
|
+
}
|
|
27094
|
+
}
|
|
27095
|
+
return result;
|
|
27096
|
+
};
|
|
27039
27097
|
/**
|
|
27040
27098
|
* @param {?} variables
|
|
27041
27099
|
* @param {?} astNodes
|
|
@@ -27070,7 +27128,7 @@ var ViewBuilder = /** @class */ (function () {
|
|
|
27070
27128
|
var _a = _this.preprocessUpdateExpression(expression), sourceSpan = _a.sourceSpan, context = _a.context, value = _a.value;
|
|
27071
27129
|
var /** @type {?} */ bindingId = "" + bindingCount++;
|
|
27072
27130
|
var /** @type {?} */ nameResolver = context === _this.component ? _this : defaultResolver;
|
|
27073
|
-
var _b = convertPropertyBinding(nameResolver, variable(_this.getOutputVar(context)), value, bindingId), stmts = _b.stmts, currValExpr = _b.currValExpr;
|
|
27131
|
+
var _b = convertPropertyBinding(nameResolver, variable(_this.getOutputVar(context)), value, bindingId, BindingForm.General), stmts = _b.stmts, currValExpr = _b.currValExpr;
|
|
27074
27132
|
stmts.push(new ExpressionStatement(currValExpr));
|
|
27075
27133
|
viewStmts.push.apply(viewStmts, stmts.map(function (stmt) { return applySourceSpanToStatementIfNeeded(stmt, sourceSpan); }));
|
|
27076
27134
|
});
|
|
@@ -27081,6 +27139,25 @@ var ViewBuilder = /** @class */ (function () {
|
|
|
27081
27139
|
var stmts = convertActionBinding(nameResolver, variable(_this.getOutputVar(context)), value, bindingId).stmts;
|
|
27082
27140
|
viewStmts.push.apply(viewStmts, stmts.map(function (stmt) { return applySourceSpanToStatementIfNeeded(stmt, sourceSpan); }));
|
|
27083
27141
|
});
|
|
27142
|
+
if (this.guards.length) {
|
|
27143
|
+
var /** @type {?} */ guardExpression = undefined;
|
|
27144
|
+
for (var _i = 0, _a = this.guards; _i < _a.length; _i++) {
|
|
27145
|
+
var guard = _a[_i];
|
|
27146
|
+
var _b = this.preprocessUpdateExpression(guard.expression), context = _b.context, value = _b.value;
|
|
27147
|
+
var /** @type {?} */ bindingId = "" + bindingCount++;
|
|
27148
|
+
var /** @type {?} */ nameResolver = context === this.component ? this : defaultResolver;
|
|
27149
|
+
// We only support support simple expressions and ignore others as they
|
|
27150
|
+
// are unlikely to affect type narrowing.
|
|
27151
|
+
var _c = convertPropertyBinding(nameResolver, variable(this.getOutputVar(context)), value, bindingId, BindingForm.TrySimple), stmts = _c.stmts, currValExpr = _c.currValExpr;
|
|
27152
|
+
if (stmts.length == 0) {
|
|
27153
|
+
var /** @type {?} */ guardClause = guard.useIf ? currValExpr : this.ctx.importExpr(guard.guard).callFn([currValExpr]);
|
|
27154
|
+
guardExpression = guardExpression ? guardExpression.and(guardClause) : guardClause;
|
|
27155
|
+
}
|
|
27156
|
+
}
|
|
27157
|
+
if (guardExpression) {
|
|
27158
|
+
viewStmts = [new IfStmt(guardExpression, viewStmts)];
|
|
27159
|
+
}
|
|
27160
|
+
}
|
|
27084
27161
|
var /** @type {?} */ viewName = "_View_" + componentId + "_" + this.embeddedViewIndex;
|
|
27085
27162
|
var /** @type {?} */ viewFactory = new DeclareFunctionStmt(viewName, [], viewStmts);
|
|
27086
27163
|
targetStatements.push(viewFactory);
|
|
@@ -27120,7 +27197,12 @@ var ViewBuilder = /** @class */ (function () {
|
|
|
27120
27197
|
// for the context in any embedded view.
|
|
27121
27198
|
// We keep this behaivor behind a flag for now.
|
|
27122
27199
|
if (this.options.fullTemplateTypeCheck) {
|
|
27123
|
-
|
|
27200
|
+
// Find any applicable type guards. For example, NgIf has a type guard on ngIf
|
|
27201
|
+
// (see NgIf.ngIfTypeGuard) that can be used to indicate that a template is only
|
|
27202
|
+
// stamped out if ngIf is truthy so any bindings in the template can assume that,
|
|
27203
|
+
// if a nullable type is used for ngIf, that expression is not null or undefined.
|
|
27204
|
+
var /** @type {?} */ guards = this.getTypeGuardExpressions(ast);
|
|
27205
|
+
var /** @type {?} */ childVisitor = this.viewBuilderFactory(this, guards);
|
|
27124
27206
|
this.children.push(childVisitor);
|
|
27125
27207
|
childVisitor.visitAll(ast.variables, ast.children);
|
|
27126
27208
|
}
|
|
@@ -28352,7 +28434,7 @@ var ViewBuilder$1 = /** @class */ (function () {
|
|
|
28352
28434
|
var sourceSpan = _a.sourceSpan, context = _a.context, value = _a.value;
|
|
28353
28435
|
var /** @type {?} */ bindingId = "" + updateBindingCount++;
|
|
28354
28436
|
var /** @type {?} */ nameResolver = context === COMP_VAR ? self : null;
|
|
28355
|
-
var _b = convertPropertyBinding(nameResolver, context, value, bindingId), stmts = _b.stmts, currValExpr = _b.currValExpr;
|
|
28437
|
+
var _b = convertPropertyBinding(nameResolver, context, value, bindingId, BindingForm.General), stmts = _b.stmts, currValExpr = _b.currValExpr;
|
|
28356
28438
|
updateStmts.push.apply(updateStmts, stmts.map(function (stmt) { return applySourceSpanToStatementIfNeeded(stmt, sourceSpan); }));
|
|
28357
28439
|
return applySourceSpanToExpressionIfNeeded(currValExpr, sourceSpan);
|
|
28358
28440
|
});
|
|
@@ -29074,6 +29156,7 @@ var StaticSymbolResolver = /** @class */ (function () {
|
|
|
29074
29156
|
* on an otherwise indirect dependency.
|
|
29075
29157
|
*
|
|
29076
29158
|
* @param {?} staticSymbol the symbol for which to generate a import symbol
|
|
29159
|
+
* @param {?=} useSummaries
|
|
29077
29160
|
* @return {?}
|
|
29078
29161
|
*/
|
|
29079
29162
|
StaticSymbolResolver.prototype.getImportAs = /**
|
|
@@ -29084,12 +29167,14 @@ var StaticSymbolResolver = /** @class */ (function () {
|
|
|
29084
29167
|
* on an otherwise indirect dependency.
|
|
29085
29168
|
*
|
|
29086
29169
|
* @param {?} staticSymbol the symbol for which to generate a import symbol
|
|
29170
|
+
* @param {?=} useSummaries
|
|
29087
29171
|
* @return {?}
|
|
29088
29172
|
*/
|
|
29089
|
-
function (staticSymbol) {
|
|
29173
|
+
function (staticSymbol, useSummaries) {
|
|
29174
|
+
if (useSummaries === void 0) { useSummaries = true; }
|
|
29090
29175
|
if (staticSymbol.members.length) {
|
|
29091
29176
|
var /** @type {?} */ baseSymbol = this.getStaticSymbol(staticSymbol.filePath, staticSymbol.name);
|
|
29092
|
-
var /** @type {?} */ baseImportAs = this.getImportAs(baseSymbol);
|
|
29177
|
+
var /** @type {?} */ baseImportAs = this.getImportAs(baseSymbol, useSummaries);
|
|
29093
29178
|
return baseImportAs ?
|
|
29094
29179
|
this.getStaticSymbol(baseImportAs.filePath, baseImportAs.name, staticSymbol.members) :
|
|
29095
29180
|
null;
|
|
@@ -29098,12 +29183,12 @@ var StaticSymbolResolver = /** @class */ (function () {
|
|
|
29098
29183
|
if (summarizedFileName !== staticSymbol.filePath) {
|
|
29099
29184
|
var /** @type {?} */ summarizedName = stripSummaryForJitNameSuffix(staticSymbol.name);
|
|
29100
29185
|
var /** @type {?} */ baseSymbol = this.getStaticSymbol(summarizedFileName, summarizedName, staticSymbol.members);
|
|
29101
|
-
var /** @type {?} */ baseImportAs = this.getImportAs(baseSymbol);
|
|
29186
|
+
var /** @type {?} */ baseImportAs = this.getImportAs(baseSymbol, useSummaries);
|
|
29102
29187
|
return baseImportAs ?
|
|
29103
29188
|
this.getStaticSymbol(summaryForJitFileName(baseImportAs.filePath), summaryForJitName(baseImportAs.name), baseSymbol.members) :
|
|
29104
29189
|
null;
|
|
29105
29190
|
}
|
|
29106
|
-
var /** @type {?} */ result = this.summaryResolver.getImportAs(staticSymbol);
|
|
29191
|
+
var /** @type {?} */ result = (useSummaries && this.summaryResolver.getImportAs(staticSymbol)) || null;
|
|
29107
29192
|
if (!result) {
|
|
29108
29193
|
result = /** @type {?} */ ((this.importAs.get(staticSymbol)));
|
|
29109
29194
|
}
|
|
@@ -29734,13 +29819,6 @@ function unwrapResolvedMetadata(metadata) {
|
|
|
29734
29819
|
* @fileoverview added by tsickle
|
|
29735
29820
|
* @suppress {checkTypes} checked by tsc
|
|
29736
29821
|
*/
|
|
29737
|
-
/**
|
|
29738
|
-
* @license
|
|
29739
|
-
* Copyright Google Inc. All Rights Reserved.
|
|
29740
|
-
*
|
|
29741
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
29742
|
-
* found in the LICENSE file at https://angular.io/license
|
|
29743
|
-
*/
|
|
29744
29822
|
/**
|
|
29745
29823
|
* @param {?} srcFileName
|
|
29746
29824
|
* @param {?} forJitCtx
|
|
@@ -30615,14 +30693,12 @@ var AotCompiler = /** @class */ (function () {
|
|
|
30615
30693
|
var /** @type {?} */ externalReferences = ngModuleMeta.transitiveModule.directives.map(function (d) { return d.reference; }).concat(ngModuleMeta.transitiveModule.pipes.map(function (d) { return d.reference; }), ngModuleMeta.importedModules.map(function (m) { return m.type.reference; }), ngModuleMeta.exportedModules.map(function (m) { return m.type.reference; }), _this._externalIdentifierReferences([Identifiers.TemplateRef, Identifiers.ElementRef]));
|
|
30616
30694
|
var /** @type {?} */ externalReferenceVars = new Map();
|
|
30617
30695
|
externalReferences.forEach(function (ref, typeIndex) {
|
|
30618
|
-
|
|
30619
|
-
externalReferenceVars.set(ref, "_decl" + ngModuleIndex + "_" + typeIndex);
|
|
30620
|
-
}
|
|
30696
|
+
externalReferenceVars.set(ref, "_decl" + ngModuleIndex + "_" + typeIndex);
|
|
30621
30697
|
});
|
|
30622
30698
|
externalReferenceVars.forEach(function (varName, reference) {
|
|
30623
30699
|
outputCtx.statements.push(variable(varName)
|
|
30624
30700
|
.set(NULL_EXPR.cast(DYNAMIC_TYPE))
|
|
30625
|
-
.toDeclStmt(expressionType(outputCtx.importExpr(reference))));
|
|
30701
|
+
.toDeclStmt(expressionType(outputCtx.importExpr(reference, /* typeParams */ null, /* useSummaries */ /* useSummaries */ false))));
|
|
30626
30702
|
});
|
|
30627
30703
|
if (emitFlags & StubEmitFlags.TypeCheck) {
|
|
30628
30704
|
// add the typecheck block for all components of the NgModule
|
|
@@ -30680,7 +30756,7 @@ var AotCompiler = /** @class */ (function () {
|
|
|
30680
30756
|
*/
|
|
30681
30757
|
function (ctx, componentId, moduleMeta, compMeta, directives, externalReferenceVars) {
|
|
30682
30758
|
var _a = this._parseTemplate(compMeta, moduleMeta, directives), parsedTemplate = _a.template, usedPipes = _a.pipes;
|
|
30683
|
-
(_b = ctx.statements).push.apply(_b, this._typeCheckCompiler.compileComponent(componentId, compMeta, parsedTemplate, usedPipes, externalReferenceVars));
|
|
30759
|
+
(_b = ctx.statements).push.apply(_b, this._typeCheckCompiler.compileComponent(componentId, compMeta, parsedTemplate, usedPipes, externalReferenceVars, ctx));
|
|
30684
30760
|
var _b;
|
|
30685
30761
|
};
|
|
30686
30762
|
/**
|
|
@@ -30980,13 +31056,14 @@ var AotCompiler = /** @class */ (function () {
|
|
|
30980
31056
|
*/
|
|
30981
31057
|
function (genFilePath) {
|
|
30982
31058
|
var _this = this;
|
|
30983
|
-
var /** @type {?} */ importExpr$$1 = function (symbol, typeParams) {
|
|
31059
|
+
var /** @type {?} */ importExpr$$1 = function (symbol, typeParams, useSummaries) {
|
|
30984
31060
|
if (typeParams === void 0) { typeParams = null; }
|
|
31061
|
+
if (useSummaries === void 0) { useSummaries = true; }
|
|
30985
31062
|
if (!(symbol instanceof StaticSymbol)) {
|
|
30986
31063
|
throw new Error("Internal error: unknown identifier " + JSON.stringify(symbol));
|
|
30987
31064
|
}
|
|
30988
31065
|
var /** @type {?} */ arity = _this._symbolResolver.getTypeArity(symbol) || 0;
|
|
30989
|
-
var _a = _this._symbolResolver.getImportAs(symbol) || symbol, filePath = _a.filePath, name = _a.name, members = _a.members;
|
|
31066
|
+
var _a = _this._symbolResolver.getImportAs(symbol, useSummaries) || symbol, filePath = _a.filePath, name = _a.name, members = _a.members;
|
|
30990
31067
|
var /** @type {?} */ importModule = _this._fileNameToModuleName(filePath, genFilePath);
|
|
30991
31068
|
// It should be good enough to compare filePath to genFilePath and if they are equal
|
|
30992
31069
|
// there is a self reference. However, ngfactory files generate to .ts but their
|
|
@@ -31468,6 +31545,8 @@ var IGNORE = {
|
|
|
31468
31545
|
var USE_VALUE = 'useValue';
|
|
31469
31546
|
var PROVIDE = 'provide';
|
|
31470
31547
|
var REFERENCE_SET = new Set([USE_VALUE, 'useFactory', 'data']);
|
|
31548
|
+
var TYPEGUARD_POSTFIX = 'TypeGuard';
|
|
31549
|
+
var USE_IF = 'UseIf';
|
|
31471
31550
|
/**
|
|
31472
31551
|
* @param {?} value
|
|
31473
31552
|
* @return {?}
|
|
@@ -31491,6 +31570,7 @@ var StaticReflector = /** @class */ (function () {
|
|
|
31491
31570
|
this.propertyCache = new Map();
|
|
31492
31571
|
this.parameterCache = new Map();
|
|
31493
31572
|
this.methodCache = new Map();
|
|
31573
|
+
this.staticCache = new Map();
|
|
31494
31574
|
this.conversionMap = new Map();
|
|
31495
31575
|
this.annotationForParentClassWithSummaryKind = new Map();
|
|
31496
31576
|
this.initializeConversionMap();
|
|
@@ -31744,6 +31824,24 @@ var StaticReflector = /** @class */ (function () {
|
|
|
31744
31824
|
}
|
|
31745
31825
|
return methodNames;
|
|
31746
31826
|
};
|
|
31827
|
+
/**
|
|
31828
|
+
* @param {?} type
|
|
31829
|
+
* @return {?}
|
|
31830
|
+
*/
|
|
31831
|
+
StaticReflector.prototype._staticMembers = /**
|
|
31832
|
+
* @param {?} type
|
|
31833
|
+
* @return {?}
|
|
31834
|
+
*/
|
|
31835
|
+
function (type) {
|
|
31836
|
+
var /** @type {?} */ staticMembers = this.staticCache.get(type);
|
|
31837
|
+
if (!staticMembers) {
|
|
31838
|
+
var /** @type {?} */ classMetadata = this.getTypeMetadata(type);
|
|
31839
|
+
var /** @type {?} */ staticMemberData = classMetadata['statics'] || {};
|
|
31840
|
+
staticMembers = Object.keys(staticMemberData);
|
|
31841
|
+
this.staticCache.set(type, staticMembers);
|
|
31842
|
+
}
|
|
31843
|
+
return staticMembers;
|
|
31844
|
+
};
|
|
31747
31845
|
/**
|
|
31748
31846
|
* @param {?} type
|
|
31749
31847
|
* @param {?} classMetadata
|
|
@@ -31782,6 +31880,38 @@ var StaticReflector = /** @class */ (function () {
|
|
|
31782
31880
|
throw e;
|
|
31783
31881
|
}
|
|
31784
31882
|
};
|
|
31883
|
+
/**
|
|
31884
|
+
* @param {?} type
|
|
31885
|
+
* @return {?}
|
|
31886
|
+
*/
|
|
31887
|
+
StaticReflector.prototype.guards = /**
|
|
31888
|
+
* @param {?} type
|
|
31889
|
+
* @return {?}
|
|
31890
|
+
*/
|
|
31891
|
+
function (type) {
|
|
31892
|
+
if (!(type instanceof StaticSymbol)) {
|
|
31893
|
+
this.reportError(new Error("guards received " + JSON.stringify(type) + " which is not a StaticSymbol"), type);
|
|
31894
|
+
return {};
|
|
31895
|
+
}
|
|
31896
|
+
var /** @type {?} */ staticMembers = this._staticMembers(type);
|
|
31897
|
+
var /** @type {?} */ result = {};
|
|
31898
|
+
for (var _i = 0, staticMembers_1 = staticMembers; _i < staticMembers_1.length; _i++) {
|
|
31899
|
+
var name_1 = staticMembers_1[_i];
|
|
31900
|
+
if (name_1.endsWith(TYPEGUARD_POSTFIX)) {
|
|
31901
|
+
var /** @type {?} */ property = name_1.substr(0, name_1.length - TYPEGUARD_POSTFIX.length);
|
|
31902
|
+
var /** @type {?} */ value = void 0;
|
|
31903
|
+
if (property.endsWith(USE_IF)) {
|
|
31904
|
+
property = name_1.substr(0, property.length - USE_IF.length);
|
|
31905
|
+
value = USE_IF;
|
|
31906
|
+
}
|
|
31907
|
+
else {
|
|
31908
|
+
value = this.getStaticSymbol(type.filePath, type.name, [name_1]);
|
|
31909
|
+
}
|
|
31910
|
+
result[property] = value;
|
|
31911
|
+
}
|
|
31912
|
+
}
|
|
31913
|
+
return result;
|
|
31914
|
+
};
|
|
31785
31915
|
/**
|
|
31786
31916
|
* @param {?} type
|
|
31787
31917
|
* @param {?} ctor
|
|
@@ -32196,8 +32326,8 @@ var StaticReflector = /** @class */ (function () {
|
|
|
32196
32326
|
// Note: This only has to deal with variable references, as symbol references have
|
|
32197
32327
|
// been converted into 'resolved'
|
|
32198
32328
|
// in the StaticSymbolResolver.
|
|
32199
|
-
var /** @type {?} */
|
|
32200
|
-
var /** @type {?} */ localValue = scope.resolve(
|
|
32329
|
+
var /** @type {?} */ name_2 = expression['name'];
|
|
32330
|
+
var /** @type {?} */ localValue = scope.resolve(name_2);
|
|
32201
32331
|
if (localValue != BindingScope.missing) {
|
|
32202
32332
|
return localValue;
|
|
32203
32333
|
}
|
|
@@ -35019,9 +35149,6 @@ var ResourceLoader = /** @class */ (function () {
|
|
|
35019
35149
|
* Use of this source code is governed by an MIT-style license that can be
|
|
35020
35150
|
* found in the LICENSE file at https://angular.io/license
|
|
35021
35151
|
*/
|
|
35022
|
-
/**
|
|
35023
|
-
* Extract i18n messages from source code
|
|
35024
|
-
*/
|
|
35025
35152
|
/**
|
|
35026
35153
|
* The host of the Extractor disconnects the implementation from TypeScript / other language
|
|
35027
35154
|
* services and from underlying file systems.
|
|
@@ -39081,7 +39208,7 @@ var CompilerHostAdapter = /** @class */ (function () {
|
|
|
39081
39208
|
}
|
|
39082
39209
|
CompilerHostAdapter.prototype.getMetadataFor = function (fileName) {
|
|
39083
39210
|
var sourceFile = this.host.getSourceFile(fileName + '.ts', ts__default.ScriptTarget.Latest);
|
|
39084
|
-
return this.collector.getMetadata(sourceFile);
|
|
39211
|
+
return sourceFile && this.collector.getMetadata(sourceFile);
|
|
39085
39212
|
};
|
|
39086
39213
|
return CompilerHostAdapter;
|
|
39087
39214
|
}());
|
|
@@ -40191,8 +40318,8 @@ exports.$$observable = exports.observable;
|
|
|
40191
40318
|
});
|
|
40192
40319
|
|
|
40193
40320
|
/* tslint:disable:no-empty */
|
|
40194
|
-
function noop$1() { }
|
|
40195
|
-
var noop_2 = noop$1;
|
|
40321
|
+
function noop$1$1() { }
|
|
40322
|
+
var noop_2 = noop$1$1;
|
|
40196
40323
|
|
|
40197
40324
|
|
|
40198
40325
|
var noop_1 = {
|
|
@@ -41960,8 +42087,8 @@ function share() {
|
|
|
41960
42087
|
var share_3 = share;
|
|
41961
42088
|
|
|
41962
42089
|
/**
|
|
41963
|
-
* @license Angular v5.
|
|
41964
|
-
* (c) 2010-
|
|
42090
|
+
* @license Angular v5.2.0
|
|
42091
|
+
* (c) 2010-2018 Google, Inc. https://angular.io/
|
|
41965
42092
|
* License: MIT
|
|
41966
42093
|
*/
|
|
41967
42094
|
/**
|
|
@@ -42391,7 +42518,7 @@ var Version$1 = /** @class */ (function () {
|
|
|
42391
42518
|
/**
|
|
42392
42519
|
* \@stable
|
|
42393
42520
|
*/
|
|
42394
|
-
var VERSION$2 = new Version$1('5.
|
|
42521
|
+
var VERSION$2 = new Version$1('5.2.0');
|
|
42395
42522
|
|
|
42396
42523
|
/**
|
|
42397
42524
|
* @fileoverview added by tsickle
|
|
@@ -42647,6 +42774,7 @@ function resolveForwardRef$1(type) {
|
|
|
42647
42774
|
* Use of this source code is governed by an MIT-style license that can be
|
|
42648
42775
|
* found in the LICENSE file at https://angular.io/license
|
|
42649
42776
|
*/
|
|
42777
|
+
var SOURCE = '__source';
|
|
42650
42778
|
var _THROW_IF_NOT_FOUND = new Object();
|
|
42651
42779
|
var THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND;
|
|
42652
42780
|
var _NullInjector = /** @class */ (function () {
|
|
@@ -42708,7 +42836,7 @@ var Injector = /** @class */ (function () {
|
|
|
42708
42836
|
* ### Example
|
|
42709
42837
|
*
|
|
42710
42838
|
* {\@example core/di/ts/provider_spec.ts region='ConstructorProvider'}
|
|
42711
|
-
* @param {?}
|
|
42839
|
+
* @param {?} options
|
|
42712
42840
|
* @param {?=} parent
|
|
42713
42841
|
* @return {?}
|
|
42714
42842
|
*/
|
|
@@ -42718,12 +42846,17 @@ var Injector = /** @class */ (function () {
|
|
|
42718
42846
|
* ### Example
|
|
42719
42847
|
*
|
|
42720
42848
|
* {\@example core/di/ts/provider_spec.ts region='ConstructorProvider'}
|
|
42721
|
-
* @param {?}
|
|
42849
|
+
* @param {?} options
|
|
42722
42850
|
* @param {?=} parent
|
|
42723
42851
|
* @return {?}
|
|
42724
42852
|
*/
|
|
42725
|
-
function (
|
|
42726
|
-
|
|
42853
|
+
function (options, parent) {
|
|
42854
|
+
if (Array.isArray(options)) {
|
|
42855
|
+
return new StaticInjector(options, parent);
|
|
42856
|
+
}
|
|
42857
|
+
else {
|
|
42858
|
+
return new StaticInjector(options.providers, options.parent, options.name || null);
|
|
42859
|
+
}
|
|
42727
42860
|
};
|
|
42728
42861
|
Injector.THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND;
|
|
42729
42862
|
Injector.NULL = new _NullInjector();
|
|
@@ -42746,9 +42879,11 @@ var NULL_INJECTOR = Injector.NULL;
|
|
|
42746
42879
|
var NEW_LINE = /\n/gm;
|
|
42747
42880
|
var NO_NEW_LINE = 'ɵ';
|
|
42748
42881
|
var StaticInjector = /** @class */ (function () {
|
|
42749
|
-
function StaticInjector(providers, parent) {
|
|
42882
|
+
function StaticInjector(providers, parent, source) {
|
|
42750
42883
|
if (parent === void 0) { parent = NULL_INJECTOR; }
|
|
42884
|
+
if (source === void 0) { source = null; }
|
|
42751
42885
|
this.parent = parent;
|
|
42886
|
+
this.source = source;
|
|
42752
42887
|
var /** @type {?} */ records = this._records = new Map();
|
|
42753
42888
|
records.set(Injector, /** @type {?} */ ({ token: Injector, fn: IDENT, deps: EMPTY, value: this, useNew: false }));
|
|
42754
42889
|
recursivelyProcessProviders(records, providers);
|
|
@@ -42770,7 +42905,10 @@ var StaticInjector = /** @class */ (function () {
|
|
|
42770
42905
|
}
|
|
42771
42906
|
catch (/** @type {?} */ e) {
|
|
42772
42907
|
var /** @type {?} */ tokenPath = e[NG_TEMP_TOKEN_PATH];
|
|
42773
|
-
|
|
42908
|
+
if (token[SOURCE]) {
|
|
42909
|
+
tokenPath.unshift(token[SOURCE]);
|
|
42910
|
+
}
|
|
42911
|
+
e.message = formatError('\n' + e.message, tokenPath, this.source);
|
|
42774
42912
|
e[NG_TOKEN_PATH] = tokenPath;
|
|
42775
42913
|
e[NG_TEMP_TOKEN_PATH] = null;
|
|
42776
42914
|
throw e;
|
|
@@ -43006,9 +43144,11 @@ function computeDeps(provider) {
|
|
|
43006
43144
|
/**
|
|
43007
43145
|
* @param {?} text
|
|
43008
43146
|
* @param {?} obj
|
|
43147
|
+
* @param {?=} source
|
|
43009
43148
|
* @return {?}
|
|
43010
43149
|
*/
|
|
43011
|
-
function formatError(text, obj) {
|
|
43150
|
+
function formatError(text, obj, source) {
|
|
43151
|
+
if (source === void 0) { source = null; }
|
|
43012
43152
|
text = text && text.charAt(0) === '\n' && text.charAt(1) == NO_NEW_LINE ? text.substr(2) : text;
|
|
43013
43153
|
var /** @type {?} */ context = stringify$1(obj);
|
|
43014
43154
|
if (obj instanceof Array) {
|
|
@@ -43024,7 +43164,7 @@ function formatError(text, obj) {
|
|
|
43024
43164
|
}
|
|
43025
43165
|
context = "{" + parts.join(', ') + "}";
|
|
43026
43166
|
}
|
|
43027
|
-
return "StaticInjectorError[" + context + "]: " + text.replace(NEW_LINE, '\n ');
|
|
43167
|
+
return "StaticInjectorError" + (source ? '(' + source + ')' : '') + "[" + context + "]: " + text.replace(NEW_LINE, '\n ');
|
|
43028
43168
|
}
|
|
43029
43169
|
/**
|
|
43030
43170
|
* @param {?} text
|
|
@@ -43888,6 +44028,15 @@ var ReflectionCapabilities = /** @class */ (function () {
|
|
|
43888
44028
|
function (type, lcProperty) {
|
|
43889
44029
|
return type instanceof Type$1$1 && lcProperty in type.prototype;
|
|
43890
44030
|
};
|
|
44031
|
+
/**
|
|
44032
|
+
* @param {?} type
|
|
44033
|
+
* @return {?}
|
|
44034
|
+
*/
|
|
44035
|
+
ReflectionCapabilities.prototype.guards = /**
|
|
44036
|
+
* @param {?} type
|
|
44037
|
+
* @return {?}
|
|
44038
|
+
*/
|
|
44039
|
+
function (type) { return {}; };
|
|
43891
44040
|
/**
|
|
43892
44041
|
* @param {?} name
|
|
43893
44042
|
* @return {?}
|
|
@@ -44241,15 +44390,8 @@ var ResolvedReflectiveProvider_ = /** @class */ (function () {
|
|
|
44241
44390
|
this.key = key;
|
|
44242
44391
|
this.resolvedFactories = resolvedFactories;
|
|
44243
44392
|
this.multiProvider = multiProvider;
|
|
44393
|
+
this.resolvedFactory = this.resolvedFactories[0];
|
|
44244
44394
|
}
|
|
44245
|
-
Object.defineProperty(ResolvedReflectiveProvider_.prototype, "resolvedFactory", {
|
|
44246
|
-
get: /**
|
|
44247
|
-
* @return {?}
|
|
44248
|
-
*/
|
|
44249
|
-
function () { return this.resolvedFactories[0]; },
|
|
44250
|
-
enumerable: true,
|
|
44251
|
-
configurable: true
|
|
44252
|
-
});
|
|
44253
44395
|
return ResolvedReflectiveProvider_;
|
|
44254
44396
|
}());
|
|
44255
44397
|
/**
|
|
@@ -45581,48 +45723,13 @@ var ComponentFactoryBoundToModule = /** @class */ (function (_super) {
|
|
|
45581
45723
|
var _this = _super.call(this) || this;
|
|
45582
45724
|
_this.factory = factory;
|
|
45583
45725
|
_this.ngModule = ngModule;
|
|
45726
|
+
_this.selector = factory.selector;
|
|
45727
|
+
_this.componentType = factory.componentType;
|
|
45728
|
+
_this.ngContentSelectors = factory.ngContentSelectors;
|
|
45729
|
+
_this.inputs = factory.inputs;
|
|
45730
|
+
_this.outputs = factory.outputs;
|
|
45584
45731
|
return _this;
|
|
45585
45732
|
}
|
|
45586
|
-
Object.defineProperty(ComponentFactoryBoundToModule.prototype, "selector", {
|
|
45587
|
-
get: /**
|
|
45588
|
-
* @return {?}
|
|
45589
|
-
*/
|
|
45590
|
-
function () { return this.factory.selector; },
|
|
45591
|
-
enumerable: true,
|
|
45592
|
-
configurable: true
|
|
45593
|
-
});
|
|
45594
|
-
Object.defineProperty(ComponentFactoryBoundToModule.prototype, "componentType", {
|
|
45595
|
-
get: /**
|
|
45596
|
-
* @return {?}
|
|
45597
|
-
*/
|
|
45598
|
-
function () { return this.factory.componentType; },
|
|
45599
|
-
enumerable: true,
|
|
45600
|
-
configurable: true
|
|
45601
|
-
});
|
|
45602
|
-
Object.defineProperty(ComponentFactoryBoundToModule.prototype, "ngContentSelectors", {
|
|
45603
|
-
get: /**
|
|
45604
|
-
* @return {?}
|
|
45605
|
-
*/
|
|
45606
|
-
function () { return this.factory.ngContentSelectors; },
|
|
45607
|
-
enumerable: true,
|
|
45608
|
-
configurable: true
|
|
45609
|
-
});
|
|
45610
|
-
Object.defineProperty(ComponentFactoryBoundToModule.prototype, "inputs", {
|
|
45611
|
-
get: /**
|
|
45612
|
-
* @return {?}
|
|
45613
|
-
*/
|
|
45614
|
-
function () { return this.factory.inputs; },
|
|
45615
|
-
enumerable: true,
|
|
45616
|
-
configurable: true
|
|
45617
|
-
});
|
|
45618
|
-
Object.defineProperty(ComponentFactoryBoundToModule.prototype, "outputs", {
|
|
45619
|
-
get: /**
|
|
45620
|
-
* @return {?}
|
|
45621
|
-
*/
|
|
45622
|
-
function () { return this.factory.outputs; },
|
|
45623
|
-
enumerable: true,
|
|
45624
|
-
configurable: true
|
|
45625
|
-
});
|
|
45626
45733
|
/**
|
|
45627
45734
|
* @param {?} injector
|
|
45628
45735
|
* @param {?=} projectableNodes
|
|
@@ -46857,7 +46964,8 @@ function createPlatform(injector) {
|
|
|
46857
46964
|
*/
|
|
46858
46965
|
function createPlatformFactory(parentPlatformFactory, name, providers) {
|
|
46859
46966
|
if (providers === void 0) { providers = []; }
|
|
46860
|
-
var /** @type {?} */
|
|
46967
|
+
var /** @type {?} */ desc = "Platform: " + name;
|
|
46968
|
+
var /** @type {?} */ marker = new InjectionToken(desc);
|
|
46861
46969
|
return function (extraProviders) {
|
|
46862
46970
|
if (extraProviders === void 0) { extraProviders = []; }
|
|
46863
46971
|
var /** @type {?} */ platform = getPlatform();
|
|
@@ -46866,7 +46974,8 @@ function createPlatformFactory(parentPlatformFactory, name, providers) {
|
|
|
46866
46974
|
parentPlatformFactory(providers.concat(extraProviders).concat({ provide: marker, useValue: true }));
|
|
46867
46975
|
}
|
|
46868
46976
|
else {
|
|
46869
|
-
|
|
46977
|
+
var /** @type {?} */ injectedProviders = providers.concat(extraProviders).concat({ provide: marker, useValue: true });
|
|
46978
|
+
createPlatform(Injector.create({ providers: injectedProviders, name: desc }));
|
|
46870
46979
|
}
|
|
46871
46980
|
}
|
|
46872
46981
|
return assertPlatform(marker);
|
|
@@ -47008,10 +47117,11 @@ var PlatformRef = /** @class */ (function () {
|
|
|
47008
47117
|
// pass that as parent to the NgModuleFactory.
|
|
47009
47118
|
var /** @type {?} */ ngZoneOption = options ? options.ngZone : undefined;
|
|
47010
47119
|
var /** @type {?} */ ngZone = getNgZone(ngZoneOption);
|
|
47120
|
+
var /** @type {?} */ providers = [{ provide: NgZone, useValue: ngZone }];
|
|
47011
47121
|
// Attention: Don't use ApplicationRef.run here,
|
|
47012
47122
|
// as we want to be sure that all possible constructor calls are inside `ngZone.run`!
|
|
47013
47123
|
return ngZone.run(function () {
|
|
47014
|
-
var /** @type {?} */ ngZoneInjector = Injector.create(
|
|
47124
|
+
var /** @type {?} */ ngZoneInjector = Injector.create({ providers: providers, parent: _this.injector, name: moduleFactory.moduleType.name });
|
|
47015
47125
|
var /** @type {?} */ moduleRef = /** @type {?} */ (moduleFactory.create(ngZoneInjector));
|
|
47016
47126
|
var /** @type {?} */ exceptionHandler = moduleRef.injector.get(ErrorHandler, null);
|
|
47017
47127
|
if (!exceptionHandler) {
|
|
@@ -47618,7 +47728,6 @@ var Renderer2 = /** @class */ (function () {
|
|
|
47618
47728
|
* Use of this source code is governed by an MIT-style license that can be
|
|
47619
47729
|
* found in the LICENSE file at https://angular.io/license
|
|
47620
47730
|
*/
|
|
47621
|
-
// Public API for render
|
|
47622
47731
|
|
|
47623
47732
|
/**
|
|
47624
47733
|
* @fileoverview added by tsickle
|
|
@@ -47691,30 +47800,6 @@ var QueryList = /** @class */ (function () {
|
|
|
47691
47800
|
this._results = [];
|
|
47692
47801
|
this.changes = new EventEmitter();
|
|
47693
47802
|
}
|
|
47694
|
-
Object.defineProperty(QueryList.prototype, "length", {
|
|
47695
|
-
get: /**
|
|
47696
|
-
* @return {?}
|
|
47697
|
-
*/
|
|
47698
|
-
function () { return this._results.length; },
|
|
47699
|
-
enumerable: true,
|
|
47700
|
-
configurable: true
|
|
47701
|
-
});
|
|
47702
|
-
Object.defineProperty(QueryList.prototype, "first", {
|
|
47703
|
-
get: /**
|
|
47704
|
-
* @return {?}
|
|
47705
|
-
*/
|
|
47706
|
-
function () { return this._results[0]; },
|
|
47707
|
-
enumerable: true,
|
|
47708
|
-
configurable: true
|
|
47709
|
-
});
|
|
47710
|
-
Object.defineProperty(QueryList.prototype, "last", {
|
|
47711
|
-
get: /**
|
|
47712
|
-
* @return {?}
|
|
47713
|
-
*/
|
|
47714
|
-
function () { return this._results[this.length - 1]; },
|
|
47715
|
-
enumerable: true,
|
|
47716
|
-
configurable: true
|
|
47717
|
-
});
|
|
47718
47803
|
/**
|
|
47719
47804
|
* See
|
|
47720
47805
|
* [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)
|
|
@@ -47863,6 +47948,9 @@ var QueryList = /** @class */ (function () {
|
|
|
47863
47948
|
function (res) {
|
|
47864
47949
|
this._results = flatten$2(res);
|
|
47865
47950
|
(/** @type {?} */ (this)).dirty = false;
|
|
47951
|
+
(/** @type {?} */ (this)).length = this._results.length;
|
|
47952
|
+
(/** @type {?} */ (this)).last = this._results[this.length - 1];
|
|
47953
|
+
(/** @type {?} */ (this)).first = this._results[0];
|
|
47866
47954
|
};
|
|
47867
47955
|
/**
|
|
47868
47956
|
* @return {?}
|
|
@@ -48094,7 +48182,6 @@ var EmbeddedViewRef = /** @class */ (function (_super) {
|
|
|
48094
48182
|
* Use of this source code is governed by an MIT-style license that can be
|
|
48095
48183
|
* found in the LICENSE file at https://angular.io/license
|
|
48096
48184
|
*/
|
|
48097
|
-
// Public API for compiler
|
|
48098
48185
|
|
|
48099
48186
|
/**
|
|
48100
48187
|
* @fileoverview added by tsickle
|
|
@@ -50491,11 +50578,6 @@ var defaultKeyValueDiffers = new KeyValueDiffers(keyValDiff);
|
|
|
50491
50578
|
* Use of this source code is governed by an MIT-style license that can be
|
|
50492
50579
|
* found in the LICENSE file at https://angular.io/license
|
|
50493
50580
|
*/
|
|
50494
|
-
/**
|
|
50495
|
-
* @module
|
|
50496
|
-
* @description
|
|
50497
|
-
* Change detection enables data binding in Angular.
|
|
50498
|
-
*/
|
|
50499
50581
|
|
|
50500
50582
|
/**
|
|
50501
50583
|
* @fileoverview added by tsickle
|
|
@@ -51225,9 +51307,10 @@ function isEmbeddedView(view) {
|
|
|
51225
51307
|
}
|
|
51226
51308
|
/**
|
|
51227
51309
|
* @param {?} deps
|
|
51310
|
+
* @param {?=} sourceName
|
|
51228
51311
|
* @return {?}
|
|
51229
51312
|
*/
|
|
51230
|
-
function splitDepsDsl(deps) {
|
|
51313
|
+
function splitDepsDsl(deps, sourceName) {
|
|
51231
51314
|
return deps.map(function (value) {
|
|
51232
51315
|
var /** @type {?} */ token;
|
|
51233
51316
|
var /** @type {?} */ flags;
|
|
@@ -51238,6 +51321,9 @@ function splitDepsDsl(deps) {
|
|
|
51238
51321
|
flags = 0 /* None */;
|
|
51239
51322
|
token = value;
|
|
51240
51323
|
}
|
|
51324
|
+
if (token && (typeof token === 'function' || typeof token === 'object') && sourceName) {
|
|
51325
|
+
Object.defineProperty(token, SOURCE, { value: sourceName, configurable: true });
|
|
51326
|
+
}
|
|
51241
51327
|
return { flags: flags, token: token, tokenKey: tokenKey(token) };
|
|
51242
51328
|
});
|
|
51243
51329
|
}
|
|
@@ -52914,6 +53000,7 @@ var NgModuleRef_ = /** @class */ (function () {
|
|
|
52914
53000
|
this._def = _def;
|
|
52915
53001
|
this._destroyListeners = [];
|
|
52916
53002
|
this._destroyed = false;
|
|
53003
|
+
this.injector = this;
|
|
52917
53004
|
initNgModule(this);
|
|
52918
53005
|
}
|
|
52919
53006
|
/**
|
|
@@ -52946,14 +53033,6 @@ var NgModuleRef_ = /** @class */ (function () {
|
|
|
52946
53033
|
enumerable: true,
|
|
52947
53034
|
configurable: true
|
|
52948
53035
|
});
|
|
52949
|
-
Object.defineProperty(NgModuleRef_.prototype, "injector", {
|
|
52950
|
-
get: /**
|
|
52951
|
-
* @return {?}
|
|
52952
|
-
*/
|
|
52953
|
-
function () { return this; },
|
|
52954
|
-
enumerable: true,
|
|
52955
|
-
configurable: true
|
|
52956
|
-
});
|
|
52957
53036
|
/**
|
|
52958
53037
|
* @return {?}
|
|
52959
53038
|
*/
|
|
@@ -55462,15 +55541,8 @@ var DebugRendererFactory2 = /** @class */ (function () {
|
|
|
55462
55541
|
var DebugRenderer2 = /** @class */ (function () {
|
|
55463
55542
|
function DebugRenderer2(delegate) {
|
|
55464
55543
|
this.delegate = delegate;
|
|
55544
|
+
this.data = this.delegate.data;
|
|
55465
55545
|
}
|
|
55466
|
-
Object.defineProperty(DebugRenderer2.prototype, "data", {
|
|
55467
|
-
get: /**
|
|
55468
|
-
* @return {?}
|
|
55469
|
-
*/
|
|
55470
|
-
function () { return this.delegate.data; },
|
|
55471
|
-
enumerable: true,
|
|
55472
|
-
configurable: true
|
|
55473
|
-
});
|
|
55474
55546
|
/**
|
|
55475
55547
|
* @param {?} node
|
|
55476
55548
|
* @return {?}
|
|
@@ -55834,8 +55906,818 @@ var NgModuleFactory_ = /** @class */ (function (_super) {
|
|
|
55834
55906
|
}(NgModuleFactory));
|
|
55835
55907
|
|
|
55836
55908
|
/**
|
|
55837
|
-
* @
|
|
55838
|
-
*
|
|
55909
|
+
* @fileoverview added by tsickle
|
|
55910
|
+
* @suppress {checkTypes} checked by tsc
|
|
55911
|
+
*/
|
|
55912
|
+
/**
|
|
55913
|
+
* @license
|
|
55914
|
+
* Copyright Google Inc. All Rights Reserved.
|
|
55915
|
+
*
|
|
55916
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
55917
|
+
* found in the LICENSE file at https://angular.io/license
|
|
55918
|
+
*/
|
|
55919
|
+
|
|
55920
|
+
/**
|
|
55921
|
+
* @fileoverview added by tsickle
|
|
55922
|
+
* @suppress {checkTypes} checked by tsc
|
|
55923
|
+
*/
|
|
55924
|
+
/**
|
|
55925
|
+
* @license
|
|
55926
|
+
* Copyright Google Inc. All Rights Reserved.
|
|
55927
|
+
*
|
|
55928
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
55929
|
+
* found in the LICENSE file at https://angular.io/license
|
|
55930
|
+
*/
|
|
55931
|
+
|
|
55932
|
+
/**
|
|
55933
|
+
* @fileoverview added by tsickle
|
|
55934
|
+
* @suppress {checkTypes} checked by tsc
|
|
55935
|
+
*/
|
|
55936
|
+
/**
|
|
55937
|
+
* @license
|
|
55938
|
+
* Copyright Google Inc. All Rights Reserved.
|
|
55939
|
+
*
|
|
55940
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
55941
|
+
* found in the LICENSE file at https://angular.io/license
|
|
55942
|
+
*/
|
|
55943
|
+
// The functions in this file verify that the assumptions we are making
|
|
55944
|
+
// about state in an instruction are correct before implementing any logic.
|
|
55945
|
+
// They are meant only to be called in dev mode as sanity checks.
|
|
55946
|
+
/**
|
|
55947
|
+
* Stringifies values such that strings are wrapped in explicit quotation marks and
|
|
55948
|
+
* other types are stringified normally. Used in error messages (e.g. assertThrow)
|
|
55949
|
+
* to make it clear that certain values are of the string type when comparing.
|
|
55950
|
+
*
|
|
55951
|
+
* e.g. `expected "3" to be 3` is easier to understand than `expected 3 to be 3`.
|
|
55952
|
+
*
|
|
55953
|
+
* @param {?} value The value to be stringified
|
|
55954
|
+
* @return {?} The stringified value
|
|
55955
|
+
*/
|
|
55956
|
+
function stringifyValueForError(value) {
|
|
55957
|
+
return typeof value === 'string' ? "\"" + value + "\"" : '' + value;
|
|
55958
|
+
}
|
|
55959
|
+
/**
|
|
55960
|
+
* @param {?} actual
|
|
55961
|
+
* @param {?} name
|
|
55962
|
+
* @return {?}
|
|
55963
|
+
*/
|
|
55964
|
+
|
|
55965
|
+
/**
|
|
55966
|
+
* @template T
|
|
55967
|
+
* @param {?} actual
|
|
55968
|
+
* @param {?} expected
|
|
55969
|
+
* @param {?} name
|
|
55970
|
+
* @param {?=} serializer
|
|
55971
|
+
* @return {?}
|
|
55972
|
+
*/
|
|
55973
|
+
function assertEqual(actual, expected, name, serializer) {
|
|
55974
|
+
(actual != expected) && assertThrow(actual, expected, name, '==', serializer);
|
|
55975
|
+
}
|
|
55976
|
+
/**
|
|
55977
|
+
* @template T
|
|
55978
|
+
* @param {?} actual
|
|
55979
|
+
* @param {?} name
|
|
55980
|
+
* @return {?}
|
|
55981
|
+
*/
|
|
55982
|
+
function assertNotNull$1(actual, name) {
|
|
55983
|
+
assertNotEqual(actual, null, name);
|
|
55984
|
+
}
|
|
55985
|
+
/**
|
|
55986
|
+
* @template T
|
|
55987
|
+
* @param {?} actual
|
|
55988
|
+
* @param {?} expected
|
|
55989
|
+
* @param {?} name
|
|
55990
|
+
* @return {?}
|
|
55991
|
+
*/
|
|
55992
|
+
function assertNotEqual(actual, expected, name) {
|
|
55993
|
+
(actual == expected) && assertThrow(actual, expected, name, '!=');
|
|
55994
|
+
}
|
|
55995
|
+
/**
|
|
55996
|
+
* Throws an error with a message constructed from the arguments.
|
|
55997
|
+
*
|
|
55998
|
+
* @template T
|
|
55999
|
+
* @param {?} actual The actual value (e.g. 3)
|
|
56000
|
+
* @param {?} expected The expected value (e.g. 5)
|
|
56001
|
+
* @param {?} name The name of the value being checked (e.g. attrs.length)
|
|
56002
|
+
* @param {?} operator The comparison operator (e.g. <, >, ==)
|
|
56003
|
+
* @param {?=} serializer Function that maps a value to its display value
|
|
56004
|
+
* @return {?}
|
|
56005
|
+
*/
|
|
56006
|
+
function assertThrow(actual, expected, name, operator, serializer) {
|
|
56007
|
+
if (serializer === void 0) { serializer = stringifyValueForError; }
|
|
56008
|
+
throw new Error("ASSERT: expected " + name + " " + operator + " " + serializer(expected) + " but was " + serializer(actual) + "!");
|
|
56009
|
+
}
|
|
56010
|
+
|
|
56011
|
+
/**
|
|
56012
|
+
* @fileoverview added by tsickle
|
|
56013
|
+
* @suppress {checkTypes} checked by tsc
|
|
56014
|
+
*/
|
|
56015
|
+
/**
|
|
56016
|
+
* @license
|
|
56017
|
+
* Copyright Google Inc. All Rights Reserved.
|
|
56018
|
+
*
|
|
56019
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
56020
|
+
* found in the LICENSE file at https://angular.io/license
|
|
56021
|
+
*/
|
|
56022
|
+
if (typeof ngDevMode == 'undefined') {
|
|
56023
|
+
if (typeof window != 'undefined')
|
|
56024
|
+
(/** @type {?} */ (window)).ngDevMode = true;
|
|
56025
|
+
if (typeof self != 'undefined')
|
|
56026
|
+
(/** @type {?} */ (self)).ngDevMode = true;
|
|
56027
|
+
if (typeof global != 'undefined')
|
|
56028
|
+
(/** @type {?} */ (global)).ngDevMode = true;
|
|
56029
|
+
}
|
|
56030
|
+
|
|
56031
|
+
/**
|
|
56032
|
+
* @fileoverview added by tsickle
|
|
56033
|
+
* @suppress {checkTypes} checked by tsc
|
|
56034
|
+
*/
|
|
56035
|
+
/**
|
|
56036
|
+
* @license
|
|
56037
|
+
* Copyright Google Inc. All Rights Reserved.
|
|
56038
|
+
*
|
|
56039
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
56040
|
+
* found in the LICENSE file at https://angular.io/license
|
|
56041
|
+
*/
|
|
56042
|
+
/**
|
|
56043
|
+
* @param {?} node
|
|
56044
|
+
* @param {?} type
|
|
56045
|
+
* @return {?}
|
|
56046
|
+
*/
|
|
56047
|
+
function assertNodeType(node, type) {
|
|
56048
|
+
assertNotEqual(node, null, 'node');
|
|
56049
|
+
assertEqual(node.flags & 3 /* TYPE_MASK */, type, 'Node.type', typeSerializer);
|
|
56050
|
+
}
|
|
56051
|
+
/**
|
|
56052
|
+
* @param {?} node
|
|
56053
|
+
* @param {...?} types
|
|
56054
|
+
* @return {?}
|
|
56055
|
+
*/
|
|
56056
|
+
|
|
56057
|
+
/**
|
|
56058
|
+
* @param {?} type
|
|
56059
|
+
* @return {?}
|
|
56060
|
+
*/
|
|
56061
|
+
function typeSerializer(type) {
|
|
56062
|
+
if (type == 1 /* Projection */)
|
|
56063
|
+
return 'Projection';
|
|
56064
|
+
if (type == 0 /* Container */)
|
|
56065
|
+
return 'Container';
|
|
56066
|
+
if (type == 2 /* View */)
|
|
56067
|
+
return 'View';
|
|
56068
|
+
if (type == 3 /* Element */)
|
|
56069
|
+
return 'Element';
|
|
56070
|
+
return '??? ' + type + ' ???';
|
|
56071
|
+
}
|
|
56072
|
+
|
|
56073
|
+
/**
|
|
56074
|
+
* @fileoverview added by tsickle
|
|
56075
|
+
* @suppress {checkTypes} checked by tsc
|
|
56076
|
+
*/
|
|
56077
|
+
/**
|
|
56078
|
+
* @license
|
|
56079
|
+
* Copyright Google Inc. All Rights Reserved.
|
|
56080
|
+
*
|
|
56081
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
56082
|
+
* found in the LICENSE file at https://angular.io/license
|
|
56083
|
+
*/
|
|
56084
|
+
/**
|
|
56085
|
+
* Finds the closest DOM node above a given container in the hierarchy.
|
|
56086
|
+
*
|
|
56087
|
+
* This is necessary to add or remove elements from the DOM when a view
|
|
56088
|
+
* is added or removed from the container. e.g. parent.removeChild(...)
|
|
56089
|
+
*
|
|
56090
|
+
* @param {?} containerNode The container node whose parent must be found
|
|
56091
|
+
* @return {?} Closest DOM node above the container
|
|
56092
|
+
*/
|
|
56093
|
+
function findNativeParent(containerNode) {
|
|
56094
|
+
var /** @type {?} */ container = containerNode;
|
|
56095
|
+
while (container) {
|
|
56096
|
+
ngDevMode && assertNodeType(container, 0 /* Container */);
|
|
56097
|
+
var /** @type {?} */ renderParent = container.data.renderParent;
|
|
56098
|
+
if (renderParent !== null) {
|
|
56099
|
+
return renderParent.native;
|
|
56100
|
+
}
|
|
56101
|
+
var /** @type {?} */ viewOrElement = /** @type {?} */ ((container.parent));
|
|
56102
|
+
ngDevMode && assertNotNull$1(viewOrElement, 'container.parent');
|
|
56103
|
+
if ((viewOrElement.flags & 3 /* TYPE_MASK */) === 3 /* Element */) {
|
|
56104
|
+
// we are an LElement, which means we are past the last LContainer.
|
|
56105
|
+
// This means than we have not been projected so just ignore.
|
|
56106
|
+
return null;
|
|
56107
|
+
}
|
|
56108
|
+
ngDevMode && assertNodeType(viewOrElement, 2 /* View */);
|
|
56109
|
+
container = (/** @type {?} */ (viewOrElement)).parent;
|
|
56110
|
+
}
|
|
56111
|
+
return null;
|
|
56112
|
+
}
|
|
56113
|
+
/**
|
|
56114
|
+
* Finds the DOM element before which a certain view should be inserting its
|
|
56115
|
+
* child elements.
|
|
56116
|
+
*
|
|
56117
|
+
* If the view has a next (e.g. for loop), elements should be inserted before
|
|
56118
|
+
* the next view's first child element. Otherwise, the container's comment
|
|
56119
|
+
* anchor is the marker.
|
|
56120
|
+
*
|
|
56121
|
+
* @param {?} index The index of the view to check
|
|
56122
|
+
* @param {?} state ContainerState of the parent container
|
|
56123
|
+
* @param {?} native Comment anchor for container
|
|
56124
|
+
* @return {?} The DOM element for which the view should insert elements
|
|
56125
|
+
*/
|
|
56126
|
+
function findBeforeNode(index, state, native) {
|
|
56127
|
+
var /** @type {?} */ views = state.views;
|
|
56128
|
+
// Find the node to insert in front of
|
|
56129
|
+
return index + 1 < views.length ?
|
|
56130
|
+
(/** @type {?} */ (views[index + 1].child)).native :
|
|
56131
|
+
native;
|
|
56132
|
+
}
|
|
56133
|
+
/**
|
|
56134
|
+
* @param {?} container
|
|
56135
|
+
* @param {?} rootNode
|
|
56136
|
+
* @param {?} insertMode
|
|
56137
|
+
* @param {?=} beforeNode
|
|
56138
|
+
* @return {?}
|
|
56139
|
+
*/
|
|
56140
|
+
function addRemoveViewFromContainer(container, rootNode, insertMode, beforeNode) {
|
|
56141
|
+
ngDevMode && assertNodeType(container, 0 /* Container */);
|
|
56142
|
+
ngDevMode && assertNodeType(rootNode, 2 /* View */);
|
|
56143
|
+
var /** @type {?} */ parent = findNativeParent(container);
|
|
56144
|
+
var /** @type {?} */ node = rootNode.child;
|
|
56145
|
+
if (parent) {
|
|
56146
|
+
while (node) {
|
|
56147
|
+
var /** @type {?} */ type = node.flags & 3;
|
|
56148
|
+
var /** @type {?} */ nextNode = null;
|
|
56149
|
+
var /** @type {?} */ renderer = container.view.renderer;
|
|
56150
|
+
var /** @type {?} */ isFnRenderer = (/** @type {?} */ (renderer)).listen;
|
|
56151
|
+
if (type === 3 /* Element */) {
|
|
56152
|
+
insertMode ? (isFnRenderer ? /** @type {?} */ (((/** @type {?} */ (renderer))
|
|
56153
|
+
.insertBefore))(parent, /** @type {?} */ ((node.native)), /** @type {?} */ (beforeNode)) :
|
|
56154
|
+
parent.insertBefore(/** @type {?} */ ((node.native)), /** @type {?} */ (beforeNode), true)) :
|
|
56155
|
+
(isFnRenderer ? /** @type {?} */ (((/** @type {?} */ (renderer))
|
|
56156
|
+
.removeChild))(/** @type {?} */ (parent), /** @type {?} */ ((node.native))) :
|
|
56157
|
+
parent.removeChild(/** @type {?} */ ((node.native))));
|
|
56158
|
+
nextNode = node.next;
|
|
56159
|
+
}
|
|
56160
|
+
else if (type === 0 /* Container */) {
|
|
56161
|
+
// if we get to a container, it must be a root node of a view because we are only
|
|
56162
|
+
// propagating down into child views / containers and not child elements
|
|
56163
|
+
var /** @type {?} */ childContainerData = (/** @type {?} */ (node)).data;
|
|
56164
|
+
insertMode ? (isFnRenderer ? /** @type {?} */ (((/** @type {?} */ (renderer))
|
|
56165
|
+
.appendChild))(/** @type {?} */ (parent), /** @type {?} */ ((node.native))) :
|
|
56166
|
+
parent.appendChild(/** @type {?} */ ((node.native)))) :
|
|
56167
|
+
(isFnRenderer ? /** @type {?} */ (((/** @type {?} */ (renderer))
|
|
56168
|
+
.removeChild))(/** @type {?} */ (parent), /** @type {?} */ ((node.native))) :
|
|
56169
|
+
parent.removeChild(/** @type {?} */ ((node.native))));
|
|
56170
|
+
nextNode = childContainerData.views.length ? childContainerData.views[0].child : null;
|
|
56171
|
+
}
|
|
56172
|
+
else if (type === 1 /* Projection */) {
|
|
56173
|
+
nextNode = (/** @type {?} */ (node)).data[0];
|
|
56174
|
+
}
|
|
56175
|
+
else {
|
|
56176
|
+
nextNode = (/** @type {?} */ (node)).child;
|
|
56177
|
+
}
|
|
56178
|
+
if (nextNode === null) {
|
|
56179
|
+
while (node && !node.next) {
|
|
56180
|
+
node = node.parent;
|
|
56181
|
+
if (node === rootNode)
|
|
56182
|
+
node = null;
|
|
56183
|
+
}
|
|
56184
|
+
node = node && node.next;
|
|
56185
|
+
}
|
|
56186
|
+
else {
|
|
56187
|
+
node = nextNode;
|
|
56188
|
+
}
|
|
56189
|
+
}
|
|
56190
|
+
}
|
|
56191
|
+
}
|
|
56192
|
+
/**
|
|
56193
|
+
* Sets a next on the view node, so views in for loops can easily jump from
|
|
56194
|
+
* one view to the next to add/remove elements. Also adds the ViewState (view.data)
|
|
56195
|
+
* to the view tree for easy traversal when cleaning up the view.
|
|
56196
|
+
*
|
|
56197
|
+
* @param {?} view The view to set up
|
|
56198
|
+
* @param {?} next The view's new next
|
|
56199
|
+
* @return {?}
|
|
56200
|
+
*/
|
|
56201
|
+
function setViewNext(view, next) {
|
|
56202
|
+
view.next = next;
|
|
56203
|
+
view.data.next = next ? next.data : null;
|
|
56204
|
+
}
|
|
56205
|
+
/**
|
|
56206
|
+
* Appends a projected node to the DOM, or in the case of a projected container,
|
|
56207
|
+
* appends the nodes from all of the container's active views to the DOM. Also stores the
|
|
56208
|
+
* node in the given projectedNodes array.
|
|
56209
|
+
*
|
|
56210
|
+
* @param {?} projectedNodes Array to store the projected node
|
|
56211
|
+
* @param {?} node The node to process
|
|
56212
|
+
* @param {?} currentParent The last parent element to be processed
|
|
56213
|
+
* @param {?} currentView The current view's ViewState
|
|
56214
|
+
* @return {?}
|
|
56215
|
+
*/
|
|
56216
|
+
|
|
56217
|
+
/**
|
|
56218
|
+
* @fileoverview added by tsickle
|
|
56219
|
+
* @suppress {checkTypes} checked by tsc
|
|
56220
|
+
*/
|
|
56221
|
+
/**
|
|
56222
|
+
* @license
|
|
56223
|
+
* Copyright Google Inc. All Rights Reserved.
|
|
56224
|
+
*
|
|
56225
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
56226
|
+
* found in the LICENSE file at https://angular.io/license
|
|
56227
|
+
*/
|
|
56228
|
+
/**
|
|
56229
|
+
* A utility function to match an Ivy node static data against a simple CSS selector
|
|
56230
|
+
*
|
|
56231
|
+
* @param {?} lNodeStaticData
|
|
56232
|
+
* @param {?} selector
|
|
56233
|
+
* @return {?} true if node matches the selector.
|
|
56234
|
+
*/
|
|
56235
|
+
|
|
56236
|
+
/**
|
|
56237
|
+
* @param {?} lNodeStaticData
|
|
56238
|
+
* @param {?} selector
|
|
56239
|
+
* @return {?}
|
|
56240
|
+
*/
|
|
56241
|
+
|
|
56242
|
+
/**
|
|
56243
|
+
* @param {?} lNodeStaticData
|
|
56244
|
+
* @param {?} selector
|
|
56245
|
+
* @return {?}
|
|
56246
|
+
*/
|
|
56247
|
+
|
|
56248
|
+
/**
|
|
56249
|
+
* @fileoverview added by tsickle
|
|
56250
|
+
* @suppress {checkTypes} checked by tsc
|
|
56251
|
+
*/
|
|
56252
|
+
/**
|
|
56253
|
+
* @license
|
|
56254
|
+
* Copyright Google Inc. All Rights Reserved.
|
|
56255
|
+
*
|
|
56256
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
56257
|
+
* found in the LICENSE file at https://angular.io/license
|
|
56258
|
+
*/
|
|
56259
|
+
/**
|
|
56260
|
+
* Must use this method for CD (instead of === ) since NaN !== NaN
|
|
56261
|
+
* @param {?} a
|
|
56262
|
+
* @param {?} b
|
|
56263
|
+
* @return {?}
|
|
56264
|
+
*/
|
|
56265
|
+
function isDifferent(a, b) {
|
|
56266
|
+
// NaN is the only value that is not equal to itself so the first
|
|
56267
|
+
// test checks if both a and b are not NaN
|
|
56268
|
+
return !(a !== a && b !== b) && a !== b;
|
|
56269
|
+
}
|
|
56270
|
+
/**
|
|
56271
|
+
* Creates an ElementRef for a given node injector and stores it on the injector.
|
|
56272
|
+
* Or, if the ElementRef already exists, retrieves the existing ElementRef.
|
|
56273
|
+
*
|
|
56274
|
+
* @param {?} di The node injector where we should store a created ElementRef
|
|
56275
|
+
* @return {?} The ElementRef instance to use
|
|
56276
|
+
*/
|
|
56277
|
+
|
|
56278
|
+
/**
|
|
56279
|
+
* Creates a TemplateRef and stores it on the injector. Or, if the TemplateRef already
|
|
56280
|
+
* exists, retrieves the existing TemplateRef.
|
|
56281
|
+
*
|
|
56282
|
+
* @template T
|
|
56283
|
+
* @param {?} di The node injector where we should store a created TemplateRef
|
|
56284
|
+
* @return {?} The TemplateRef instance to use
|
|
56285
|
+
*/
|
|
56286
|
+
|
|
56287
|
+
/**
|
|
56288
|
+
* Creates a ViewContainerRef and stores it on the injector. Or, if the ViewContainerRef
|
|
56289
|
+
* already exists, retrieves the existing ViewContainerRef.
|
|
56290
|
+
*
|
|
56291
|
+
* @param {?} di
|
|
56292
|
+
* @return {?} The ViewContainerRef instance to use
|
|
56293
|
+
*/
|
|
56294
|
+
|
|
56295
|
+
/**
|
|
56296
|
+
* @fileoverview added by tsickle
|
|
56297
|
+
* @suppress {checkTypes} checked by tsc
|
|
56298
|
+
*/
|
|
56299
|
+
/**
|
|
56300
|
+
* @license
|
|
56301
|
+
* Copyright Google Inc. All Rights Reserved.
|
|
56302
|
+
*
|
|
56303
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
56304
|
+
* found in the LICENSE file at https://angular.io/license
|
|
56305
|
+
*/
|
|
56306
|
+
/**
|
|
56307
|
+
* A predicate which determines if a given element/directive should be included in the query
|
|
56308
|
+
* @record
|
|
56309
|
+
*/
|
|
56310
|
+
|
|
56311
|
+
var QueryList_ = /** @class */ (function () {
|
|
56312
|
+
function QueryList_() {
|
|
56313
|
+
this.dirty = false;
|
|
56314
|
+
/**
|
|
56315
|
+
* \@internal
|
|
56316
|
+
*/
|
|
56317
|
+
this._valuesTree = null;
|
|
56318
|
+
/**
|
|
56319
|
+
* \@internal
|
|
56320
|
+
*/
|
|
56321
|
+
this._values = null;
|
|
56322
|
+
}
|
|
56323
|
+
Object.defineProperty(QueryList_.prototype, "length", {
|
|
56324
|
+
get: /**
|
|
56325
|
+
* @return {?}
|
|
56326
|
+
*/
|
|
56327
|
+
function () {
|
|
56328
|
+
ngDevMode && assertNotNull$1(this._values, 'refreshed');
|
|
56329
|
+
return /** @type {?} */ ((this._values)).length;
|
|
56330
|
+
},
|
|
56331
|
+
enumerable: true,
|
|
56332
|
+
configurable: true
|
|
56333
|
+
});
|
|
56334
|
+
Object.defineProperty(QueryList_.prototype, "first", {
|
|
56335
|
+
get: /**
|
|
56336
|
+
* @return {?}
|
|
56337
|
+
*/
|
|
56338
|
+
function () {
|
|
56339
|
+
ngDevMode && assertNotNull$1(this._values, 'refreshed');
|
|
56340
|
+
var /** @type {?} */ values = /** @type {?} */ ((this._values));
|
|
56341
|
+
return values.length ? values[0] : null;
|
|
56342
|
+
},
|
|
56343
|
+
enumerable: true,
|
|
56344
|
+
configurable: true
|
|
56345
|
+
});
|
|
56346
|
+
Object.defineProperty(QueryList_.prototype, "last", {
|
|
56347
|
+
get: /**
|
|
56348
|
+
* @return {?}
|
|
56349
|
+
*/
|
|
56350
|
+
function () {
|
|
56351
|
+
ngDevMode && assertNotNull$1(this._values, 'refreshed');
|
|
56352
|
+
var /** @type {?} */ values = /** @type {?} */ ((this._values));
|
|
56353
|
+
return values.length ? values[values.length - 1] : null;
|
|
56354
|
+
},
|
|
56355
|
+
enumerable: true,
|
|
56356
|
+
configurable: true
|
|
56357
|
+
});
|
|
56358
|
+
/** @internal */
|
|
56359
|
+
/**
|
|
56360
|
+
* \@internal
|
|
56361
|
+
* @return {?}
|
|
56362
|
+
*/
|
|
56363
|
+
QueryList_.prototype._refresh = /**
|
|
56364
|
+
* \@internal
|
|
56365
|
+
* @return {?}
|
|
56366
|
+
*/
|
|
56367
|
+
function () {
|
|
56368
|
+
// TODO(misko): needs more logic to flatten tree.
|
|
56369
|
+
if (this._values === null) {
|
|
56370
|
+
this._values = this._valuesTree;
|
|
56371
|
+
return true;
|
|
56372
|
+
}
|
|
56373
|
+
return false;
|
|
56374
|
+
};
|
|
56375
|
+
/**
|
|
56376
|
+
* @template U
|
|
56377
|
+
* @param {?} fn
|
|
56378
|
+
* @return {?}
|
|
56379
|
+
*/
|
|
56380
|
+
QueryList_.prototype.map = /**
|
|
56381
|
+
* @template U
|
|
56382
|
+
* @param {?} fn
|
|
56383
|
+
* @return {?}
|
|
56384
|
+
*/
|
|
56385
|
+
function (fn) {
|
|
56386
|
+
throw new Error('Method not implemented.');
|
|
56387
|
+
};
|
|
56388
|
+
/**
|
|
56389
|
+
* @param {?} fn
|
|
56390
|
+
* @return {?}
|
|
56391
|
+
*/
|
|
56392
|
+
QueryList_.prototype.filter = /**
|
|
56393
|
+
* @param {?} fn
|
|
56394
|
+
* @return {?}
|
|
56395
|
+
*/
|
|
56396
|
+
function (fn) {
|
|
56397
|
+
throw new Error('Method not implemented.');
|
|
56398
|
+
};
|
|
56399
|
+
/**
|
|
56400
|
+
* @param {?} fn
|
|
56401
|
+
* @return {?}
|
|
56402
|
+
*/
|
|
56403
|
+
QueryList_.prototype.find = /**
|
|
56404
|
+
* @param {?} fn
|
|
56405
|
+
* @return {?}
|
|
56406
|
+
*/
|
|
56407
|
+
function (fn) {
|
|
56408
|
+
throw new Error('Method not implemented.');
|
|
56409
|
+
};
|
|
56410
|
+
/**
|
|
56411
|
+
* @template U
|
|
56412
|
+
* @param {?} fn
|
|
56413
|
+
* @param {?} init
|
|
56414
|
+
* @return {?}
|
|
56415
|
+
*/
|
|
56416
|
+
QueryList_.prototype.reduce = /**
|
|
56417
|
+
* @template U
|
|
56418
|
+
* @param {?} fn
|
|
56419
|
+
* @param {?} init
|
|
56420
|
+
* @return {?}
|
|
56421
|
+
*/
|
|
56422
|
+
function (fn, init) {
|
|
56423
|
+
throw new Error('Method not implemented.');
|
|
56424
|
+
};
|
|
56425
|
+
/**
|
|
56426
|
+
* @param {?} fn
|
|
56427
|
+
* @return {?}
|
|
56428
|
+
*/
|
|
56429
|
+
QueryList_.prototype.forEach = /**
|
|
56430
|
+
* @param {?} fn
|
|
56431
|
+
* @return {?}
|
|
56432
|
+
*/
|
|
56433
|
+
function (fn) {
|
|
56434
|
+
throw new Error('Method not implemented.');
|
|
56435
|
+
};
|
|
56436
|
+
/**
|
|
56437
|
+
* @param {?} fn
|
|
56438
|
+
* @return {?}
|
|
56439
|
+
*/
|
|
56440
|
+
QueryList_.prototype.some = /**
|
|
56441
|
+
* @param {?} fn
|
|
56442
|
+
* @return {?}
|
|
56443
|
+
*/
|
|
56444
|
+
function (fn) {
|
|
56445
|
+
throw new Error('Method not implemented.');
|
|
56446
|
+
};
|
|
56447
|
+
/**
|
|
56448
|
+
* @return {?}
|
|
56449
|
+
*/
|
|
56450
|
+
QueryList_.prototype.toArray = /**
|
|
56451
|
+
* @return {?}
|
|
56452
|
+
*/
|
|
56453
|
+
function () {
|
|
56454
|
+
ngDevMode && assertNotNull$1(this._values, 'refreshed');
|
|
56455
|
+
return /** @type {?} */ ((this._values));
|
|
56456
|
+
};
|
|
56457
|
+
/**
|
|
56458
|
+
* @return {?}
|
|
56459
|
+
*/
|
|
56460
|
+
QueryList_.prototype.toString = /**
|
|
56461
|
+
* @return {?}
|
|
56462
|
+
*/
|
|
56463
|
+
function () { throw new Error('Method not implemented.'); };
|
|
56464
|
+
/**
|
|
56465
|
+
* @param {?} res
|
|
56466
|
+
* @return {?}
|
|
56467
|
+
*/
|
|
56468
|
+
QueryList_.prototype.reset = /**
|
|
56469
|
+
* @param {?} res
|
|
56470
|
+
* @return {?}
|
|
56471
|
+
*/
|
|
56472
|
+
function (res) { throw new Error('Method not implemented.'); };
|
|
56473
|
+
/**
|
|
56474
|
+
* @return {?}
|
|
56475
|
+
*/
|
|
56476
|
+
QueryList_.prototype.notifyOnChanges = /**
|
|
56477
|
+
* @return {?}
|
|
56478
|
+
*/
|
|
56479
|
+
function () { throw new Error('Method not implemented.'); };
|
|
56480
|
+
/**
|
|
56481
|
+
* @return {?}
|
|
56482
|
+
*/
|
|
56483
|
+
QueryList_.prototype.setDirty = /**
|
|
56484
|
+
* @return {?}
|
|
56485
|
+
*/
|
|
56486
|
+
function () { throw new Error('Method not implemented.'); };
|
|
56487
|
+
/**
|
|
56488
|
+
* @return {?}
|
|
56489
|
+
*/
|
|
56490
|
+
QueryList_.prototype.destroy = /**
|
|
56491
|
+
* @return {?}
|
|
56492
|
+
*/
|
|
56493
|
+
function () { throw new Error('Method not implemented.'); };
|
|
56494
|
+
return QueryList_;
|
|
56495
|
+
}());
|
|
56496
|
+
|
|
56497
|
+
/**
|
|
56498
|
+
* This property gets set before entering a template.
|
|
56499
|
+
*
|
|
56500
|
+
* This renderer can be one of two varieties of Renderer3:
|
|
56501
|
+
*
|
|
56502
|
+
* - ObjectedOrientedRenderer3
|
|
56503
|
+
*
|
|
56504
|
+
* This is the native browser API style, e.g. operations are methods on individual objects
|
|
56505
|
+
* like HTMLElement. With this style, no additional code is needed as a facade (reducing payload
|
|
56506
|
+
* size).
|
|
56507
|
+
*
|
|
56508
|
+
* - ProceduralRenderer3
|
|
56509
|
+
*
|
|
56510
|
+
* In non-native browser environments (e.g. platforms such as web-workers), this is the facade
|
|
56511
|
+
* that enables element manipulation. This also facilitates backwards compatibility with
|
|
56512
|
+
* Renderer2.
|
|
56513
|
+
*/
|
|
56514
|
+
var renderer;
|
|
56515
|
+
/**
|
|
56516
|
+
* Used to set the parent property when nodes are created.
|
|
56517
|
+
*/
|
|
56518
|
+
var previousOrParentNode;
|
|
56519
|
+
/**
|
|
56520
|
+
* If `isParent` is:
|
|
56521
|
+
* - `true`: then `previousOrParentNode` points to a parent node.
|
|
56522
|
+
* - `false`: then `previousOrParentNode` points to previous node (sibling).
|
|
56523
|
+
*/
|
|
56524
|
+
var isParent;
|
|
56525
|
+
/**
|
|
56526
|
+
* The current template's static data (shared between all templates of a
|
|
56527
|
+
* given type).
|
|
56528
|
+
*
|
|
56529
|
+
* Each node's static data is stored at the same index that it's stored
|
|
56530
|
+
* in the data array. Any nodes that do not have static data store a null
|
|
56531
|
+
* value to avoid a sparse array.
|
|
56532
|
+
*/
|
|
56533
|
+
var ngStaticData;
|
|
56534
|
+
/**
|
|
56535
|
+
* State of the current view being processed.
|
|
56536
|
+
*/
|
|
56537
|
+
var currentView;
|
|
56538
|
+
// The initialization has to be after the `let`, otherwise `createViewState` can't see `let`.
|
|
56539
|
+
currentView = createViewState(/** @type {?} */ ((null)), /** @type {?} */ ((null)), []);
|
|
56540
|
+
var currentQuery;
|
|
56541
|
+
/**
|
|
56542
|
+
* This property gets set before entering a template.
|
|
56543
|
+
*/
|
|
56544
|
+
var creationMode;
|
|
56545
|
+
/**
|
|
56546
|
+
* An array of nodes (text, element, container, etc), their bindings, and
|
|
56547
|
+
* any local variables that need to be stored between invocations.
|
|
56548
|
+
*/
|
|
56549
|
+
var data;
|
|
56550
|
+
/**
|
|
56551
|
+
* Points to the next binding index to read or write to.
|
|
56552
|
+
*/
|
|
56553
|
+
var bindingIndex;
|
|
56554
|
+
/**
|
|
56555
|
+
* When a view is destroyed, listeners need to be released
|
|
56556
|
+
* and onDestroy callbacks need to be called. This cleanup array
|
|
56557
|
+
* stores both listener data (in chunks of 4) and onDestroy data
|
|
56558
|
+
* (in chunks of 2), as they'll be processed at the same time.
|
|
56559
|
+
*
|
|
56560
|
+
* If it's a listener being stored:
|
|
56561
|
+
* 1st index is: event name to remove
|
|
56562
|
+
* 2nd index is: native element
|
|
56563
|
+
* 3rd index is: listener function
|
|
56564
|
+
* 4th index is: useCapture boolean
|
|
56565
|
+
*
|
|
56566
|
+
* If it's an onDestroy function:
|
|
56567
|
+
* 1st index is: onDestroy function
|
|
56568
|
+
* 2nd index is: context for function
|
|
56569
|
+
*/
|
|
56570
|
+
var cleanup;
|
|
56571
|
+
/**
|
|
56572
|
+
* Index in the data array at which view hooks begin to be stored.
|
|
56573
|
+
*/
|
|
56574
|
+
var viewHookStartIndex;
|
|
56575
|
+
/**
|
|
56576
|
+
* Swap the current state with a new state.
|
|
56577
|
+
*
|
|
56578
|
+
* For performance reasons we store the state in the top level of the module.
|
|
56579
|
+
* This way we minimize the number of properties to read. Whenever a new view
|
|
56580
|
+
* is entered we have to store the state for later, and when the view is
|
|
56581
|
+
* exited the state has to be restored
|
|
56582
|
+
*
|
|
56583
|
+
* @param {?} newViewState New state to become active
|
|
56584
|
+
* @param {?} host Element to which the View is a child of
|
|
56585
|
+
* @return {?} the previous state;
|
|
56586
|
+
*/
|
|
56587
|
+
function enterView(newViewState, host) {
|
|
56588
|
+
var /** @type {?} */ oldViewState = currentView;
|
|
56589
|
+
data = newViewState.data;
|
|
56590
|
+
bindingIndex = newViewState.bindingStartIndex || 0;
|
|
56591
|
+
ngStaticData = newViewState.ngStaticData;
|
|
56592
|
+
creationMode = newViewState.creationMode;
|
|
56593
|
+
viewHookStartIndex = newViewState.viewHookStartIndex;
|
|
56594
|
+
cleanup = newViewState.cleanup;
|
|
56595
|
+
renderer = newViewState.renderer;
|
|
56596
|
+
if (host != null) {
|
|
56597
|
+
previousOrParentNode = host;
|
|
56598
|
+
isParent = true;
|
|
56599
|
+
}
|
|
56600
|
+
currentView = newViewState;
|
|
56601
|
+
return /** @type {?} */ ((oldViewState));
|
|
56602
|
+
}
|
|
56603
|
+
/**
|
|
56604
|
+
* @param {?} viewId
|
|
56605
|
+
* @param {?} renderer
|
|
56606
|
+
* @param {?} ngStaticData
|
|
56607
|
+
* @return {?}
|
|
56608
|
+
*/
|
|
56609
|
+
function createViewState(viewId, renderer, ngStaticData) {
|
|
56610
|
+
var /** @type {?} */ newView = {
|
|
56611
|
+
parent: currentView,
|
|
56612
|
+
id: viewId,
|
|
56613
|
+
// -1 for component views
|
|
56614
|
+
node: /** @type {?} */ ((null)),
|
|
56615
|
+
// until we initialize it in createNode.
|
|
56616
|
+
data: [],
|
|
56617
|
+
ngStaticData: ngStaticData,
|
|
56618
|
+
cleanup: null,
|
|
56619
|
+
renderer: renderer,
|
|
56620
|
+
child: null,
|
|
56621
|
+
tail: null,
|
|
56622
|
+
next: null,
|
|
56623
|
+
bindingStartIndex: null,
|
|
56624
|
+
creationMode: true,
|
|
56625
|
+
viewHookStartIndex: null
|
|
56626
|
+
};
|
|
56627
|
+
return newView;
|
|
56628
|
+
}
|
|
56629
|
+
/**
|
|
56630
|
+
* @param {?} index
|
|
56631
|
+
* @param {?} type
|
|
56632
|
+
* @param {?} native
|
|
56633
|
+
* @param {?=} state
|
|
56634
|
+
* @return {?}
|
|
56635
|
+
*/
|
|
56636
|
+
function createLNode(index, type, native, state) {
|
|
56637
|
+
var /** @type {?} */ parent = isParent ? previousOrParentNode :
|
|
56638
|
+
previousOrParentNode && /** @type {?} */ (previousOrParentNode.parent);
|
|
56639
|
+
var /** @type {?} */ query = (isParent ? currentQuery : previousOrParentNode && previousOrParentNode.query) ||
|
|
56640
|
+
parent && parent.query && parent.query.child();
|
|
56641
|
+
var /** @type {?} */ isState = state != null;
|
|
56642
|
+
var /** @type {?} */ node = {
|
|
56643
|
+
flags: type,
|
|
56644
|
+
native: /** @type {?} */ (native),
|
|
56645
|
+
view: currentView,
|
|
56646
|
+
parent: /** @type {?} */ (parent),
|
|
56647
|
+
child: null,
|
|
56648
|
+
next: null,
|
|
56649
|
+
nodeInjector: parent ? parent.nodeInjector : null,
|
|
56650
|
+
data: isState ? /** @type {?} */ (state) : null,
|
|
56651
|
+
query: query,
|
|
56652
|
+
staticData: null
|
|
56653
|
+
};
|
|
56654
|
+
if ((type & 2 /* ViewOrElement */) === 2 /* ViewOrElement */ && isState) {
|
|
56655
|
+
// Bit of a hack to bust through the readonly because there is a circular dep between
|
|
56656
|
+
// ViewState and LNode.
|
|
56657
|
+
ngDevMode && assertEqual((/** @type {?} */ (state)).node, null, 'viewState.node');
|
|
56658
|
+
(/** @type {?} */ ((state))).node = node;
|
|
56659
|
+
}
|
|
56660
|
+
if (index != null) {
|
|
56661
|
+
// We are Element or Container
|
|
56662
|
+
ngDevMode && assertEqual(data.length, index, 'data.length not in sequence');
|
|
56663
|
+
data[index] = node;
|
|
56664
|
+
// Every node adds a value to the static data array to avoid a sparse array
|
|
56665
|
+
if (index >= ngStaticData.length) {
|
|
56666
|
+
ngStaticData[index] = null;
|
|
56667
|
+
}
|
|
56668
|
+
else {
|
|
56669
|
+
node.staticData = /** @type {?} */ (ngStaticData[index]);
|
|
56670
|
+
}
|
|
56671
|
+
// Now link ourselves into the tree.
|
|
56672
|
+
if (isParent) {
|
|
56673
|
+
currentQuery = null;
|
|
56674
|
+
if (previousOrParentNode.view === currentView ||
|
|
56675
|
+
(previousOrParentNode.flags & 3 /* TYPE_MASK */) === 2 /* View */) {
|
|
56676
|
+
// We are in the same view, which means we are adding content node to the parent View.
|
|
56677
|
+
ngDevMode && assertEqual(previousOrParentNode.child, null, 'previousNode.child');
|
|
56678
|
+
previousOrParentNode.child = node;
|
|
56679
|
+
}
|
|
56680
|
+
else {
|
|
56681
|
+
// We are adding component view, so we don't link parent node child to this node.
|
|
56682
|
+
}
|
|
56683
|
+
}
|
|
56684
|
+
else if (previousOrParentNode) {
|
|
56685
|
+
ngDevMode && assertEqual(previousOrParentNode.next, null, 'previousNode.next');
|
|
56686
|
+
previousOrParentNode.next = node;
|
|
56687
|
+
}
|
|
56688
|
+
}
|
|
56689
|
+
previousOrParentNode = node;
|
|
56690
|
+
isParent = true;
|
|
56691
|
+
return node;
|
|
56692
|
+
}
|
|
56693
|
+
/**
|
|
56694
|
+
* Initialize the static data for the active view.
|
|
56695
|
+
*
|
|
56696
|
+
* Each embedded view needs to set the global ngStaticData variable to the static data for
|
|
56697
|
+
* that view. Otherwise, the view's static data for a particular node would overwrite
|
|
56698
|
+
* the staticdata for a node in the view above it with the same index (since it's in the
|
|
56699
|
+
* same template).
|
|
56700
|
+
*
|
|
56701
|
+
* @param {?} viewIndex The index of the view's static data in containerStatic
|
|
56702
|
+
* @param {?} parent The parent container in which to look for the view's static data
|
|
56703
|
+
* @return {?} NgStaticData
|
|
56704
|
+
*/
|
|
56705
|
+
function initViewStaticData(viewIndex, parent) {
|
|
56706
|
+
ngDevMode && assertNodeType(parent, 0 /* Container */);
|
|
56707
|
+
var /** @type {?} */ containerStatic = (/** @type {?} */ (((parent)).staticData)).containerStatic;
|
|
56708
|
+
if (viewIndex >= containerStatic.length || containerStatic[viewIndex] == null) {
|
|
56709
|
+
containerStatic[viewIndex] = [];
|
|
56710
|
+
}
|
|
56711
|
+
return containerStatic[viewIndex];
|
|
56712
|
+
}
|
|
56713
|
+
/**
|
|
56714
|
+
* A special value which designates that a value has not changed.
|
|
56715
|
+
*/
|
|
56716
|
+
var NO_CHANGE = /** @type {?} */ ({});
|
|
56717
|
+
|
|
56718
|
+
/**
|
|
56719
|
+
* @license Angular v5.2.0
|
|
56720
|
+
* (c) 2010-2018 Google, Inc. https://angular.io/
|
|
55839
56721
|
* License: MIT
|
|
55840
56722
|
*/
|
|
55841
56723
|
/**
|
|
@@ -55908,9 +56790,9 @@ function hasTemplateReference(type) {
|
|
|
55908
56790
|
}
|
|
55909
56791
|
function getSelectors(info) {
|
|
55910
56792
|
var map = new Map();
|
|
55911
|
-
var selectors = flatten(info.directives.map(function (directive) {
|
|
55912
|
-
var selectors = CssSelector.parse(directive.selector);
|
|
55913
|
-
selectors.forEach(function (selector) { return map.set(selector, directive); });
|
|
56793
|
+
var selectors = flatten(info.directives.map(function (directive$$1) {
|
|
56794
|
+
var selectors = CssSelector.parse(directive$$1.selector);
|
|
56795
|
+
selectors.forEach(function (selector) { return map.set(selector, directive$$1); });
|
|
55914
56796
|
return selectors;
|
|
55915
56797
|
}));
|
|
55916
56798
|
return { selectors: selectors, map: map };
|
|
@@ -56720,15 +57602,15 @@ function getAttributeInfosForElement(info, elementName, element) {
|
|
|
56720
57602
|
var applicableSelectors = selectors.filter(function (selector) { return !selector.element || selector.element == elementName; });
|
|
56721
57603
|
var selectorAndAttributeNames = applicableSelectors.map(function (selector) { return ({ selector: selector, attrs: selector.attrs.filter(function (a) { return !!a; }) }); });
|
|
56722
57604
|
var attrs_1 = flatten(selectorAndAttributeNames.map(function (selectorAndAttr) {
|
|
56723
|
-
var directive = selectorMap.get(selectorAndAttr.selector);
|
|
56724
|
-
var result = selectorAndAttr.attrs.map(function (name) { return ({ name: name, input: name in directive.inputs, output: name in directive.outputs }); });
|
|
57605
|
+
var directive$$1 = selectorMap.get(selectorAndAttr.selector);
|
|
57606
|
+
var result = selectorAndAttr.attrs.map(function (name) { return ({ name: name, input: name in directive$$1.inputs, output: name in directive$$1.outputs }); });
|
|
56725
57607
|
return result;
|
|
56726
57608
|
}));
|
|
56727
57609
|
// Add template attribute if a directive contains a template reference
|
|
56728
57610
|
selectorAndAttributeNames.forEach(function (selectorAndAttr) {
|
|
56729
57611
|
var selector = selectorAndAttr.selector;
|
|
56730
|
-
var directive = selectorMap.get(selector);
|
|
56731
|
-
if (directive && hasTemplateReference(directive.type) && selector.attrs.length &&
|
|
57612
|
+
var directive$$1 = selectorMap.get(selector);
|
|
57613
|
+
if (directive$$1 && hasTemplateReference(directive$$1.type) && selector.attrs.length &&
|
|
56732
57614
|
selector.attrs[0]) {
|
|
56733
57615
|
attrs_1.push({ name: selector.attrs[0], template: true });
|
|
56734
57616
|
}
|
|
@@ -56740,10 +57622,10 @@ function getAttributeInfosForElement(info, elementName, element) {
|
|
|
56740
57622
|
var matcher = new SelectorMatcher();
|
|
56741
57623
|
matcher.addSelectables(selectors);
|
|
56742
57624
|
matcher.match(elementSelector, function (selector) {
|
|
56743
|
-
var directive = selectorMap.get(selector);
|
|
56744
|
-
if (directive) {
|
|
56745
|
-
attrs_1.push.apply(attrs_1, Object.keys(directive.inputs).map(function (name) { return ({ name: name, input: true }); }));
|
|
56746
|
-
attrs_1.push.apply(attrs_1, Object.keys(directive.outputs).map(function (name) { return ({ name: name, output: true }); }));
|
|
57625
|
+
var directive$$1 = selectorMap.get(selector);
|
|
57626
|
+
if (directive$$1) {
|
|
57627
|
+
attrs_1.push.apply(attrs_1, Object.keys(directive$$1.inputs).map(function (name) { return ({ name: name, input: true }); }));
|
|
57628
|
+
attrs_1.push.apply(attrs_1, Object.keys(directive$$1.outputs).map(function (name) { return ({ name: name, output: true }); }));
|
|
56747
57629
|
}
|
|
56748
57630
|
});
|
|
56749
57631
|
// If a name shows up twice, fold it into a single value.
|
|
@@ -57079,9 +57961,9 @@ function locateSymbol(info) {
|
|
|
57079
57961
|
}
|
|
57080
57962
|
else {
|
|
57081
57963
|
// Find a directive that matches the element name
|
|
57082
|
-
var directive = ast.directives.find(function (d) { return d.directive.selector != null && d.directive.selector.indexOf(ast.name) >= 0; });
|
|
57083
|
-
if (directive) {
|
|
57084
|
-
symbol_1 = info.template.query.getTypeSymbol(directive.directive.type.reference);
|
|
57964
|
+
var directive$$1 = ast.directives.find(function (d) { return d.directive.selector != null && d.directive.selector.indexOf(ast.name) >= 0; });
|
|
57965
|
+
if (directive$$1) {
|
|
57966
|
+
symbol_1 = info.template.query.getTypeSymbol(directive$$1.directive.type.reference);
|
|
57085
57967
|
symbol_1 = symbol_1 && new OverrideKindSymbol(symbol_1, 'directive');
|
|
57086
57968
|
span_1 = spanOf(ast);
|
|
57087
57969
|
}
|
|
@@ -57141,11 +58023,11 @@ function findInputBinding(info, path$$1, binding) {
|
|
|
57141
58023
|
var element = path$$1.first(ElementAst);
|
|
57142
58024
|
if (element) {
|
|
57143
58025
|
for (var _i = 0, _a = element.directives; _i < _a.length; _i++) {
|
|
57144
|
-
var directive = _a[_i];
|
|
57145
|
-
var invertedInput = invertMap(directive.directive.inputs);
|
|
58026
|
+
var directive$$1 = _a[_i];
|
|
58027
|
+
var invertedInput = invertMap(directive$$1.directive.inputs);
|
|
57146
58028
|
var fieldName = invertedInput[binding.templateName];
|
|
57147
58029
|
if (fieldName) {
|
|
57148
|
-
var classSymbol = info.template.query.getTypeSymbol(directive.directive.type.reference);
|
|
58030
|
+
var classSymbol = info.template.query.getTypeSymbol(directive$$1.directive.type.reference);
|
|
57149
58031
|
if (classSymbol) {
|
|
57150
58032
|
return classSymbol.members().get(fieldName);
|
|
57151
58033
|
}
|
|
@@ -57157,11 +58039,11 @@ function findOutputBinding(info, path$$1, binding) {
|
|
|
57157
58039
|
var element = path$$1.first(ElementAst);
|
|
57158
58040
|
if (element) {
|
|
57159
58041
|
for (var _i = 0, _a = element.directives; _i < _a.length; _i++) {
|
|
57160
|
-
var directive = _a[_i];
|
|
57161
|
-
var invertedOutputs = invertMap(directive.directive.outputs);
|
|
58042
|
+
var directive$$1 = _a[_i];
|
|
58043
|
+
var invertedOutputs = invertMap(directive$$1.directive.outputs);
|
|
57162
58044
|
var fieldName = invertedOutputs[binding.name];
|
|
57163
58045
|
if (fieldName) {
|
|
57164
|
-
var classSymbol = info.template.query.getTypeSymbol(directive.directive.type.reference);
|
|
58046
|
+
var classSymbol = info.template.query.getTypeSymbol(directive$$1.directive.type.reference);
|
|
57165
58047
|
if (classSymbol) {
|
|
57166
58048
|
return classSymbol.members().get(fieldName);
|
|
57167
58049
|
}
|
|
@@ -57317,7 +58199,7 @@ function getDeclarationDiagnostics(declarations, modules) {
|
|
|
57317
58199
|
if (!directives) {
|
|
57318
58200
|
directives = new Set();
|
|
57319
58201
|
modules.ngModules.forEach(function (module) {
|
|
57320
|
-
module.declaredDirectives.forEach(function (directive) { directives.add(directive.reference); });
|
|
58202
|
+
module.declaredDirectives.forEach(function (directive$$1) { directives.add(directive$$1.reference); });
|
|
57321
58203
|
});
|
|
57322
58204
|
}
|
|
57323
58205
|
if (!directives.has(declaration.type)) {
|
|
@@ -57844,11 +58726,11 @@ var TypeScriptServiceHost = /** @class */ (function () {
|
|
|
57844
58726
|
for (var _i = 0, _a = ngModuleSummary.ngModules; _i < _a.length; _i++) {
|
|
57845
58727
|
var module_1 = _a[_i];
|
|
57846
58728
|
for (var _b = 0, _c = module_1.declaredDirectives; _b < _c.length; _b++) {
|
|
57847
|
-
var directive = _c[_b];
|
|
57848
|
-
var metadata = this.resolver.getNonNormalizedDirectiveMetadata(directive.reference).metadata;
|
|
58729
|
+
var directive$$1 = _c[_b];
|
|
58730
|
+
var metadata = this.resolver.getNonNormalizedDirectiveMetadata(directive$$1.reference).metadata;
|
|
57849
58731
|
if (metadata.isComponent && metadata.template && metadata.template.templateUrl) {
|
|
57850
|
-
var templateName = urlResolver.resolve(this.reflector.componentModuleUrl(directive.reference), metadata.template.templateUrl);
|
|
57851
|
-
fileToComponent.set(templateName, directive.reference);
|
|
58732
|
+
var templateName = urlResolver.resolve(this.reflector.componentModuleUrl(directive$$1.reference), metadata.template.templateUrl);
|
|
58733
|
+
fileToComponent.set(templateName, directive$$1.reference);
|
|
57852
58734
|
templateReference.push(templateName);
|
|
57853
58735
|
}
|
|
57854
58736
|
}
|
|
@@ -58218,14 +59100,16 @@ function angularOnlyFilter(ls) {
|
|
|
58218
59100
|
getFormattingEditsAfterKeystroke: function (fileName, position, key, options) { return []; },
|
|
58219
59101
|
getDocCommentTemplateAtPosition: function (fileName, position) { return undefined; },
|
|
58220
59102
|
isValidBraceCompletionAtPosition: function (fileName, position, openingBrace) { return undefined; },
|
|
59103
|
+
getSpanOfEnclosingComment: function (fileName, position, onlyMultiLine) { return undefined; },
|
|
58221
59104
|
getCodeFixesAtPosition: function (fileName, start, end, errorCodes) { return []; },
|
|
59105
|
+
applyCodeActionCommand: function (action) { return Promise.resolve(undefined); },
|
|
58222
59106
|
getEmitOutput: function (fileName) { return undefined; },
|
|
58223
59107
|
getProgram: function () { return ls.getProgram(); },
|
|
58224
59108
|
dispose: function () { return ls.dispose(); },
|
|
58225
59109
|
getApplicableRefactors: function (fileName, positionOrRaneg) { return []; },
|
|
58226
59110
|
getEditsForRefactor: function (fileName, formatOptions, positionOrRange, refactorName, actionName) {
|
|
58227
59111
|
return undefined;
|
|
58228
|
-
}
|
|
59112
|
+
}
|
|
58229
59113
|
};
|
|
58230
59114
|
}
|
|
58231
59115
|
function create(info /* ts.server.PluginCreateInfo */) {
|
|
@@ -58273,9 +59157,9 @@ function create(info /* ts.server.PluginCreateInfo */) {
|
|
|
58273
59157
|
getSemanticClassifications: tryFilenameOneCall(ls.getSemanticClassifications),
|
|
58274
59158
|
getEncodedSyntacticClassifications: tryFilenameOneCall(ls.getEncodedSyntacticClassifications),
|
|
58275
59159
|
getEncodedSemanticClassifications: tryFilenameOneCall(ls.getEncodedSemanticClassifications),
|
|
58276
|
-
getCompletionsAtPosition:
|
|
58277
|
-
getCompletionEntryDetails:
|
|
58278
|
-
getCompletionEntrySymbol:
|
|
59160
|
+
getCompletionsAtPosition: tryFilenameTwoCall(ls.getCompletionsAtPosition),
|
|
59161
|
+
getCompletionEntryDetails: tryFilenameFourCall(ls.getCompletionEntryDetails),
|
|
59162
|
+
getCompletionEntrySymbol: tryFilenameThreeCall(ls.getCompletionEntrySymbol),
|
|
58279
59163
|
getQuickInfoAtPosition: tryFilenameOneCall(ls.getQuickInfoAtPosition),
|
|
58280
59164
|
getNameOrDottedNameSpan: tryFilenameTwoCall(ls.getNameOrDottedNameSpan),
|
|
58281
59165
|
getBreakpointStatementAtPosition: tryFilenameOneCall(ls.getBreakpointStatementAtPosition),
|
|
@@ -58302,14 +59186,14 @@ function create(info /* ts.server.PluginCreateInfo */) {
|
|
|
58302
59186
|
getFormattingEditsAfterKeystroke: tryFilenameThreeCall(ls.getFormattingEditsAfterKeystroke),
|
|
58303
59187
|
getDocCommentTemplateAtPosition: tryFilenameOneCall(ls.getDocCommentTemplateAtPosition),
|
|
58304
59188
|
isValidBraceCompletionAtPosition: tryFilenameTwoCall(ls.isValidBraceCompletionAtPosition),
|
|
59189
|
+
getSpanOfEnclosingComment: tryFilenameTwoCall(ls.getSpanOfEnclosingComment),
|
|
58305
59190
|
getCodeFixesAtPosition: tryFilenameFourCall(ls.getCodeFixesAtPosition),
|
|
59191
|
+
applyCodeActionCommand: (function (action) { return tryCall(undefined, function () { return ls.applyCodeActionCommand(action); }); }),
|
|
58306
59192
|
getEmitOutput: tryFilenameCall(ls.getEmitOutput),
|
|
58307
59193
|
getProgram: function () { return ls.getProgram(); },
|
|
58308
59194
|
dispose: function () { return ls.dispose(); },
|
|
58309
|
-
getApplicableRefactors:
|
|
58310
|
-
getEditsForRefactor:
|
|
58311
|
-
return undefined;
|
|
58312
|
-
},
|
|
59195
|
+
getApplicableRefactors: tryFilenameOneCall(ls.getApplicableRefactors),
|
|
59196
|
+
getEditsForRefactor: tryFilenameFourCall(ls.getEditsForRefactor)
|
|
58313
59197
|
};
|
|
58314
59198
|
}
|
|
58315
59199
|
oldLS = typescriptOnly(oldLS);
|
|
@@ -58368,8 +59252,8 @@ function create(info /* ts.server.PluginCreateInfo */) {
|
|
|
58368
59252
|
var ls = createLanguageService(serviceHost);
|
|
58369
59253
|
serviceHost.setSite(ls);
|
|
58370
59254
|
projectHostMap.set(info.project, serviceHost);
|
|
58371
|
-
proxy.getCompletionsAtPosition = function (fileName, position) {
|
|
58372
|
-
var base = oldLS.getCompletionsAtPosition(fileName, position) || {
|
|
59255
|
+
proxy.getCompletionsAtPosition = function (fileName, position, options) {
|
|
59256
|
+
var base = oldLS.getCompletionsAtPosition(fileName, position, options) || {
|
|
58373
59257
|
isGlobalCompletion: false,
|
|
58374
59258
|
isMemberCompletion: false,
|
|
58375
59259
|
isNewIdentifierLocation: false,
|
|
@@ -58476,7 +59360,7 @@ function create(info /* ts.server.PluginCreateInfo */) {
|
|
|
58476
59360
|
/**
|
|
58477
59361
|
* @stable
|
|
58478
59362
|
*/
|
|
58479
|
-
var VERSION = new Version$1('5.
|
|
59363
|
+
var VERSION = new Version$1('5.2.0');
|
|
58480
59364
|
|
|
58481
59365
|
exports.createLanguageService = createLanguageService;
|
|
58482
59366
|
exports.TypeScriptServiceHost = TypeScriptServiceHost;
|