@angular/language-service 6.0.3 → 6.0.7
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v6.0.
|
|
2
|
+
* @license Angular v6.0.7
|
|
3
3
|
* (c) 2010-2018 Google, Inc. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -390,7 +390,7 @@ var Version = /** @class */ (function () {
|
|
|
390
390
|
* @description
|
|
391
391
|
* Entry point for all public APIs of the common package.
|
|
392
392
|
*/
|
|
393
|
-
var VERSION = new Version('6.0.
|
|
393
|
+
var VERSION = new Version('6.0.7');
|
|
394
394
|
|
|
395
395
|
/**
|
|
396
396
|
* @license
|
|
@@ -10666,7 +10666,7 @@ var CompileMetadataResolver = /** @class */ (function () {
|
|
|
10666
10666
|
providerMeta = new ProviderMeta(provider, { useClass: provider });
|
|
10667
10667
|
}
|
|
10668
10668
|
else if (provider === void 0) {
|
|
10669
|
-
_this._reportError(syntaxError("Encountered undefined provider! Usually this means you have a circular dependencies
|
|
10669
|
+
_this._reportError(syntaxError("Encountered undefined provider! Usually this means you have a circular dependencies. This might be caused by using 'barrel' index.ts files."));
|
|
10670
10670
|
return;
|
|
10671
10671
|
}
|
|
10672
10672
|
else {
|
|
@@ -14894,7 +14894,7 @@ var StaticSymbolResolver = /** @class */ (function () {
|
|
|
14894
14894
|
}
|
|
14895
14895
|
}
|
|
14896
14896
|
// handle the actual metadata. Has to be after the exports
|
|
14897
|
-
// as there
|
|
14897
|
+
// as there might be collisions in the names, and we want the symbols
|
|
14898
14898
|
// of the current module to win ofter reexports.
|
|
14899
14899
|
if (metadata['metadata']) {
|
|
14900
14900
|
// handle direct declarations of the symbol
|
|
@@ -14940,7 +14940,7 @@ var StaticSymbolResolver = /** @class */ (function () {
|
|
|
14940
14940
|
var _originalFileMemo;
|
|
14941
14941
|
var getOriginalName = function () {
|
|
14942
14942
|
if (!_originalFileMemo) {
|
|
14943
|
-
// Guess what
|
|
14943
|
+
// Guess what the original file name is from the reference. If it has a `.d.ts` extension
|
|
14944
14944
|
// replace it with `.ts`. If it already has `.ts` just leave it in place. If it doesn't have
|
|
14945
14945
|
// .ts or .d.ts, append `.ts'. Also, if it is in `node_modules`, trim the `node_module`
|
|
14946
14946
|
// location as it is not important to finding the file.
|
|
@@ -20670,7 +20670,7 @@ var EmitFlags;
|
|
|
20670
20670
|
* found in the LICENSE file at https://angular.io/license
|
|
20671
20671
|
*/
|
|
20672
20672
|
|
|
20673
|
-
var DTS$
|
|
20673
|
+
var DTS$1 = /\.d\.ts$/;
|
|
20674
20674
|
|
|
20675
20675
|
// Note: This is an internal property in TypeScript. Use it only for assertions and tests.
|
|
20676
20676
|
|
|
@@ -20706,7 +20706,7 @@ function readMetadata(filePath, host, cache) {
|
|
|
20706
20706
|
// If the file doesn't exists then we cannot return metadata for the file.
|
|
20707
20707
|
// This will occur if the user referenced a declared module for which no file
|
|
20708
20708
|
// exists for the module (i.e. jQuery or angularjs).
|
|
20709
|
-
if (DTS$
|
|
20709
|
+
if (DTS$1.test(filePath)) {
|
|
20710
20710
|
metadatas = readMetadataFile(host, filePath);
|
|
20711
20711
|
if (!metadatas) {
|
|
20712
20712
|
// If there is a .d.ts file but no metadata file we need to produce a
|
|
@@ -20726,7 +20726,7 @@ function readMetadata(filePath, host, cache) {
|
|
|
20726
20726
|
return metadatas;
|
|
20727
20727
|
}
|
|
20728
20728
|
function readMetadataFile(host, dtsFilePath) {
|
|
20729
|
-
var metadataPath = dtsFilePath.replace(DTS$
|
|
20729
|
+
var metadataPath = dtsFilePath.replace(DTS$1, '.metadata.json');
|
|
20730
20730
|
if (!host.fileExists(metadataPath)) {
|
|
20731
20731
|
return undefined;
|
|
20732
20732
|
}
|
|
@@ -22694,16 +22694,14 @@ function defineInjector(options) {
|
|
|
22694
22694
|
* overrides the above behavior and marks the token as belonging to a particular `@NgModule`. As
|
|
22695
22695
|
* mentioned above, `'root'` is the default value for `providedIn`.
|
|
22696
22696
|
*
|
|
22697
|
-
*
|
|
22698
|
-
*
|
|
22699
|
-
* #### Tree-shakeable InjectionToken
|
|
22700
|
-
*
|
|
22701
|
-
* {@example core/di/ts/injector_spec.ts region='ShakeableInjectionToken'}
|
|
22702
|
-
*
|
|
22703
|
-
* #### Plain InjectionToken
|
|
22697
|
+
* @usageNotes
|
|
22698
|
+
* ### Basic Example
|
|
22704
22699
|
*
|
|
22705
22700
|
* {@example core/di/ts/injector_spec.ts region='InjectionToken'}
|
|
22706
22701
|
*
|
|
22702
|
+
* ### Tree-shakeable Example
|
|
22703
|
+
*
|
|
22704
|
+
* {@example core/di/ts/injector_spec.ts region='ShakeableInjectionToken'}
|
|
22707
22705
|
*
|
|
22708
22706
|
*/
|
|
22709
22707
|
var InjectionToken = /** @class */ (function () {
|
|
@@ -22868,6 +22866,7 @@ function makePropDecorator(name, props, parentClass) {
|
|
|
22868
22866
|
* All components that are referenced in the `useValue` value (either directly
|
|
22869
22867
|
* or in a nested array or map) will be added to the `entryComponents` property.
|
|
22870
22868
|
*
|
|
22869
|
+
* @usageNotes
|
|
22871
22870
|
* ### Example
|
|
22872
22871
|
* The following example shows how the router can populate the `entryComponents`
|
|
22873
22872
|
* field of an NgModule based on the router configuration which refers
|
|
@@ -22900,17 +22899,16 @@ var ANALYZE_FOR_ENTRY_COMPONENTS = new InjectionToken('AnalyzeForEntryComponents
|
|
|
22900
22899
|
/**
|
|
22901
22900
|
* Attribute decorator and metadata.
|
|
22902
22901
|
*
|
|
22903
|
-
*
|
|
22904
22902
|
* @Annotation
|
|
22905
22903
|
*/
|
|
22906
22904
|
var Attribute$1 = makeParamDecorator('Attribute', function (attributeName) { return ({ attributeName: attributeName }); });
|
|
22907
22905
|
/**
|
|
22908
22906
|
* Base class for query metadata.
|
|
22909
22907
|
*
|
|
22910
|
-
*
|
|
22911
|
-
*
|
|
22912
|
-
*
|
|
22913
|
-
*
|
|
22908
|
+
* @see `ContentChildren`.
|
|
22909
|
+
* @see `ContentChild`.
|
|
22910
|
+
* @see `ViewChildren`.
|
|
22911
|
+
* @see `ViewChild`.
|
|
22914
22912
|
*/
|
|
22915
22913
|
var Query = /** @class */ (function () {
|
|
22916
22914
|
function Query() {
|
|
@@ -22940,7 +22938,6 @@ var ContentChild = makePropDecorator('ContentChild', function (selector, data) {
|
|
|
22940
22938
|
/**
|
|
22941
22939
|
* ViewChildren decorator and metadata.
|
|
22942
22940
|
*
|
|
22943
|
-
*
|
|
22944
22941
|
* @Annotation
|
|
22945
22942
|
*/
|
|
22946
22943
|
var ViewChildren = makePropDecorator('ViewChildren', function (selector, data) {
|
|
@@ -22950,7 +22947,6 @@ var ViewChildren = makePropDecorator('ViewChildren', function (selector, data) {
|
|
|
22950
22947
|
/**
|
|
22951
22948
|
* ViewChild decorator and metadata.
|
|
22952
22949
|
*
|
|
22953
|
-
*
|
|
22954
22950
|
* @Annotation
|
|
22955
22951
|
*/
|
|
22956
22952
|
var ViewChild = makePropDecorator('ViewChild', function (selector, data) {
|
|
@@ -22964,29 +22960,12 @@ var ViewChild = makePropDecorator('ViewChild', function (selector, data) {
|
|
|
22964
22960
|
* Use of this source code is governed by an MIT-style license that can be
|
|
22965
22961
|
* found in the LICENSE file at https://angular.io/license
|
|
22966
22962
|
*/
|
|
22967
|
-
/**
|
|
22968
|
-
* @license
|
|
22969
|
-
* Copyright Google Inc. All Rights Reserved.
|
|
22970
|
-
*
|
|
22971
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
22972
|
-
* found in the LICENSE file at https://angular.io/license
|
|
22973
|
-
*/
|
|
22974
|
-
/**
|
|
22975
|
-
* Describes within the change detector which strategy will be used the next time change
|
|
22976
|
-
* detection is triggered.
|
|
22977
|
-
*
|
|
22978
|
-
*/
|
|
22979
22963
|
/**
|
|
22980
22964
|
* Describes within the change detector which strategy will be used the next time change
|
|
22981
22965
|
* detection is triggered.
|
|
22982
22966
|
*
|
|
22983
22967
|
*/
|
|
22984
22968
|
var ChangeDetectionStrategy$1;
|
|
22985
|
-
/**
|
|
22986
|
-
* Describes within the change detector which strategy will be used the next time change
|
|
22987
|
-
* detection is triggered.
|
|
22988
|
-
*
|
|
22989
|
-
*/
|
|
22990
22969
|
(function (ChangeDetectionStrategy) {
|
|
22991
22970
|
/**
|
|
22992
22971
|
* `OnPush` means that the change detector's mode will be initially set to `CheckOnce`.
|
|
@@ -22997,16 +22976,10 @@ var ChangeDetectionStrategy$1;
|
|
|
22997
22976
|
*/
|
|
22998
22977
|
ChangeDetectionStrategy[ChangeDetectionStrategy["Default"] = 1] = "Default";
|
|
22999
22978
|
})(ChangeDetectionStrategy$1 || (ChangeDetectionStrategy$1 = {}));
|
|
23000
|
-
/**
|
|
23001
|
-
* Describes the status of the detector.
|
|
23002
|
-
*/
|
|
23003
22979
|
/**
|
|
23004
22980
|
* Describes the status of the detector.
|
|
23005
22981
|
*/
|
|
23006
22982
|
var ChangeDetectorStatus;
|
|
23007
|
-
/**
|
|
23008
|
-
* Describes the status of the detector.
|
|
23009
|
-
*/
|
|
23010
22983
|
(function (ChangeDetectorStatus) {
|
|
23011
22984
|
/**
|
|
23012
22985
|
* `CheckOnce` means that after calling detectChanges the mode of the change detector
|
|
@@ -23048,10 +23021,7 @@ var ChangeDetectorStatus;
|
|
|
23048
23021
|
* found in the LICENSE file at https://angular.io/license
|
|
23049
23022
|
*/
|
|
23050
23023
|
/**
|
|
23051
|
-
*
|
|
23052
|
-
*
|
|
23053
|
-
*
|
|
23054
|
-
* @Annotation
|
|
23024
|
+
* Type of the Component metadata.
|
|
23055
23025
|
*/
|
|
23056
23026
|
var Directive = makeDecorator('Directive', function (dir) {
|
|
23057
23027
|
if (dir === void 0) { dir = {}; }
|
|
@@ -23060,6 +23030,88 @@ var Directive = makeDecorator('Directive', function (dir) {
|
|
|
23060
23030
|
/**
|
|
23061
23031
|
* Component decorator and metadata.
|
|
23062
23032
|
*
|
|
23033
|
+
* @usageNotes
|
|
23034
|
+
*
|
|
23035
|
+
* ### Using animations
|
|
23036
|
+
*
|
|
23037
|
+
* The following snippet shows an animation trigger in a component's
|
|
23038
|
+
* metadata. The trigger is attached to an element in the component's
|
|
23039
|
+
* template, using "@_trigger_name_", and a state expression that is evaluated
|
|
23040
|
+
* at run time to determine whether the animation should start.
|
|
23041
|
+
*
|
|
23042
|
+
* ```typescript
|
|
23043
|
+
* @Component({
|
|
23044
|
+
* selector: 'animation-cmp',
|
|
23045
|
+
* templateUrl: 'animation-cmp.html',
|
|
23046
|
+
* animations: [
|
|
23047
|
+
* trigger('myTriggerName', [
|
|
23048
|
+
* state('on', style({ opacity: 1 }),
|
|
23049
|
+
* state('off', style({ opacity: 0 }),
|
|
23050
|
+
* transition('on => off', [
|
|
23051
|
+
* animate("1s")
|
|
23052
|
+
* ])
|
|
23053
|
+
* ])
|
|
23054
|
+
* ]
|
|
23055
|
+
* })
|
|
23056
|
+
* ```
|
|
23057
|
+
*
|
|
23058
|
+
* ```html
|
|
23059
|
+
* <!-- animation-cmp.html -->
|
|
23060
|
+
* <div @myTriggerName="expression">...</div>
|
|
23061
|
+
* ```
|
|
23062
|
+
*
|
|
23063
|
+
* ### Preserving whitespace
|
|
23064
|
+
*
|
|
23065
|
+
* Removing whitespace can greatly reduce AOT-generated code size, and speed up view creation.
|
|
23066
|
+
* As of Angular 6, default for `preserveWhitespaces` is false (whitespace is removed).
|
|
23067
|
+
* To change the default setting for all components in your application, set
|
|
23068
|
+
* the `preserveWhitespaces` option of the AOT compiler.
|
|
23069
|
+
*
|
|
23070
|
+
* Current implementation removes whitespace characters as follows:
|
|
23071
|
+
* - Trims all whitespaces at the beginning and the end of a template.
|
|
23072
|
+
* - Removes whitespace-only text nodes. For example,
|
|
23073
|
+
* `<button>Action 1</button> <button>Action 2</button>` becomes
|
|
23074
|
+
* `<button>Action 1</button><button>Action 2</button>`.
|
|
23075
|
+
* - Replaces a series of whitespace characters in text nodes with a single space.
|
|
23076
|
+
* For example, `<span>\n some text\n</span>` becomes `<span> some text </span>`.
|
|
23077
|
+
* - Does NOT alter text nodes inside HTML tags such as `<pre>` or `<textarea>`,
|
|
23078
|
+
* where whitespace characters are significant.
|
|
23079
|
+
*
|
|
23080
|
+
* Note that these transformations can influence DOM nodes layout, although impact
|
|
23081
|
+
* should be minimal.
|
|
23082
|
+
*
|
|
23083
|
+
* You can override the default behavior to preserve whitespace characters
|
|
23084
|
+
* in certain fragments of a template. For example, you can exclude an entire
|
|
23085
|
+
* DOM sub-tree by using the `ngPreserveWhitespaces` attribute:
|
|
23086
|
+
*
|
|
23087
|
+
* ```html
|
|
23088
|
+
* <div ngPreserveWhitespaces>
|
|
23089
|
+
* whitespaces are preserved here
|
|
23090
|
+
* <span> and here </span>
|
|
23091
|
+
* </div>
|
|
23092
|
+
* ```
|
|
23093
|
+
*
|
|
23094
|
+
* You can force a single space to be preserved in a text node by using `&ngsp;`,
|
|
23095
|
+
* which is replaced with a space character by Angular's template
|
|
23096
|
+
* compiler:
|
|
23097
|
+
*
|
|
23098
|
+
* ```html
|
|
23099
|
+
* <a>Spaces</a>&ngsp;<a>between</a>&ngsp;<a>links.</a>
|
|
23100
|
+
* <!-->compiled to be equivalent to:</>
|
|
23101
|
+
* <a>Spaces</a> <a>between</a> <a>links.</a>
|
|
23102
|
+
* ```
|
|
23103
|
+
*
|
|
23104
|
+
* Note that sequences of `&ngsp;` are still collapsed to just one space character when
|
|
23105
|
+
* the `preserveWhitespaces` option is set to `false`.
|
|
23106
|
+
*
|
|
23107
|
+
* ```html
|
|
23108
|
+
* <a>before</a>&ngsp;&ngsp;&ngsp;<a>after</a>
|
|
23109
|
+
* <!-->compiled to be equivalent to:</>
|
|
23110
|
+
* <a>Spaces</a> <a>between</a> <a>links.</a>
|
|
23111
|
+
* ```
|
|
23112
|
+
*
|
|
23113
|
+
* To preserve sequences of whitespace characters, use the
|
|
23114
|
+
* `ngPreserveWhitespaces` attribute.
|
|
23063
23115
|
*
|
|
23064
23116
|
* @Annotation
|
|
23065
23117
|
*/
|
|
@@ -23068,42 +23120,54 @@ var Component = makeDecorator('Component', function (c) {
|
|
|
23068
23120
|
return (__assign({ changeDetection: ChangeDetectionStrategy$1.Default }, c));
|
|
23069
23121
|
}, Directive);
|
|
23070
23122
|
/**
|
|
23071
|
-
* Pipe decorator and metadata.
|
|
23072
|
-
*
|
|
23073
|
-
* Use the `@Pipe` annotation to declare that a given class is a pipe. A pipe
|
|
23074
|
-
* class must also implement {@link PipeTransform} interface.
|
|
23075
|
-
*
|
|
23076
|
-
* To use the pipe include a reference to the pipe class in
|
|
23077
|
-
* {@link NgModule#declarations}.
|
|
23078
23123
|
*
|
|
23079
23124
|
*
|
|
23080
23125
|
* @Annotation
|
|
23081
23126
|
*/
|
|
23082
23127
|
var Pipe = makeDecorator('Pipe', function (p) { return (__assign({ pure: true }, p)); });
|
|
23083
23128
|
/**
|
|
23084
|
-
* Input decorator and metadata.
|
|
23085
|
-
*
|
|
23086
23129
|
*
|
|
23087
23130
|
* @Annotation
|
|
23088
23131
|
*/
|
|
23089
23132
|
var Input = makePropDecorator('Input', function (bindingPropertyName) { return ({ bindingPropertyName: bindingPropertyName }); });
|
|
23090
23133
|
/**
|
|
23091
|
-
* Output decorator and metadata.
|
|
23092
|
-
*
|
|
23093
23134
|
*
|
|
23094
23135
|
* @Annotation
|
|
23095
23136
|
*/
|
|
23096
23137
|
var Output = makePropDecorator('Output', function (bindingPropertyName) { return ({ bindingPropertyName: bindingPropertyName }); });
|
|
23097
23138
|
/**
|
|
23098
|
-
* HostBinding decorator and metadata.
|
|
23099
|
-
*
|
|
23100
23139
|
*
|
|
23101
23140
|
* @Annotation
|
|
23102
23141
|
*/
|
|
23103
23142
|
var HostBinding = makePropDecorator('HostBinding', function (hostPropertyName) { return ({ hostPropertyName: hostPropertyName }); });
|
|
23104
23143
|
/**
|
|
23105
|
-
*
|
|
23144
|
+
* Binds a CSS event to a host listener and supplies configuration metadata.
|
|
23145
|
+
* Angular invokes the supplied handler method when the host element emits the specified event,
|
|
23146
|
+
* and updates the bound element with the result.
|
|
23147
|
+
* If the handler method returns false, applies `preventDefault` on the bound element.
|
|
23148
|
+
*
|
|
23149
|
+
* @usageNotes
|
|
23150
|
+
*
|
|
23151
|
+
* The following example declares a directive
|
|
23152
|
+
* that attaches a click listener to a button and counts clicks.
|
|
23153
|
+
*
|
|
23154
|
+
* ```
|
|
23155
|
+
* @Directive({selector: 'button[counting]'})
|
|
23156
|
+
* class CountClicks {
|
|
23157
|
+
* numberOfClicks = 0;
|
|
23158
|
+
*
|
|
23159
|
+
* @HostListener('click', ['$event.target'])
|
|
23160
|
+
* onClick(btn) {
|
|
23161
|
+
* console.log('button', btn, 'number of clicks:', this.numberOfClicks++);
|
|
23162
|
+
* }
|
|
23163
|
+
* }
|
|
23106
23164
|
*
|
|
23165
|
+
* @Component({
|
|
23166
|
+
* selector: 'app',
|
|
23167
|
+
* template: '<button counting>Increment</button>',
|
|
23168
|
+
* })
|
|
23169
|
+
* class App {}
|
|
23170
|
+
* ```
|
|
23107
23171
|
*
|
|
23108
23172
|
* @Annotation
|
|
23109
23173
|
*/
|
|
@@ -23228,9 +23292,7 @@ var ReflectionCapabilities = /** @class */ (function () {
|
|
|
23228
23292
|
return new (t.bind.apply(t, __spread([void 0], args)))();
|
|
23229
23293
|
}; };
|
|
23230
23294
|
/** @internal */
|
|
23231
|
-
|
|
23232
|
-
ReflectionCapabilities.prototype._zipTypesAndAnnotations = /** @internal */
|
|
23233
|
-
function (paramTypes, paramAnnotations) {
|
|
23295
|
+
ReflectionCapabilities.prototype._zipTypesAndAnnotations = function (paramTypes, paramAnnotations) {
|
|
23234
23296
|
var result;
|
|
23235
23297
|
if (typeof paramTypes === 'undefined') {
|
|
23236
23298
|
result = new Array(paramAnnotations.length);
|
|
@@ -23404,10 +23466,7 @@ var ReflectionCapabilities = /** @class */ (function () {
|
|
|
23404
23466
|
return new Function('o', 'args', functionBody);
|
|
23405
23467
|
};
|
|
23406
23468
|
// There is not a concept of import uri in Js, but this is useful in developing Dart applications.
|
|
23407
|
-
|
|
23408
|
-
ReflectionCapabilities.prototype.importUri =
|
|
23409
|
-
// There is not a concept of import uri in Js, but this is useful in developing Dart applications.
|
|
23410
|
-
function (type) {
|
|
23469
|
+
ReflectionCapabilities.prototype.importUri = function (type) {
|
|
23411
23470
|
// StaticSymbol
|
|
23412
23471
|
if (typeof type === 'object' && type['filePath']) {
|
|
23413
23472
|
return type['filePath'];
|
|
@@ -23468,10 +23527,10 @@ function getClosureSafeProperty(objWithPropertyToExtract, target) {
|
|
|
23468
23527
|
* Allows to refer to references which are not yet defined.
|
|
23469
23528
|
*
|
|
23470
23529
|
* For instance, `forwardRef` is used when the `token` which we need to refer to for the purposes of
|
|
23471
|
-
* DI is declared,
|
|
23472
|
-
*
|
|
23473
|
-
* yet defined.
|
|
23530
|
+
* DI is declared, but not yet defined. It is also used when the `token` which we use when creating
|
|
23531
|
+
* a query is not yet defined.
|
|
23474
23532
|
*
|
|
23533
|
+
* @usageNotes
|
|
23475
23534
|
* ### Example
|
|
23476
23535
|
* {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref'}
|
|
23477
23536
|
* @experimental
|
|
@@ -23486,11 +23545,12 @@ function forwardRef(forwardRefFn) {
|
|
|
23486
23545
|
*
|
|
23487
23546
|
* Acts as the identity function when given a non-forward-ref value.
|
|
23488
23547
|
*
|
|
23489
|
-
*
|
|
23548
|
+
* @usageNotes
|
|
23549
|
+
* ### Example
|
|
23490
23550
|
*
|
|
23491
23551
|
* {@example core/di/ts/forward_ref/forward_ref_spec.ts region='resolve_forward_ref'}
|
|
23492
23552
|
*
|
|
23493
|
-
*
|
|
23553
|
+
* @see `forwardRef`
|
|
23494
23554
|
* @experimental
|
|
23495
23555
|
*/
|
|
23496
23556
|
function resolveForwardRef$1(type) {
|
|
@@ -23513,35 +23573,30 @@ function resolveForwardRef$1(type) {
|
|
|
23513
23573
|
/**
|
|
23514
23574
|
* Inject decorator and metadata.
|
|
23515
23575
|
*
|
|
23516
|
-
*
|
|
23517
23576
|
* @Annotation
|
|
23518
23577
|
*/
|
|
23519
23578
|
var Inject = makeParamDecorator('Inject', function (token) { return ({ token: token }); });
|
|
23520
23579
|
/**
|
|
23521
23580
|
* Optional decorator and metadata.
|
|
23522
23581
|
*
|
|
23523
|
-
*
|
|
23524
23582
|
* @Annotation
|
|
23525
23583
|
*/
|
|
23526
23584
|
var Optional = makeParamDecorator('Optional');
|
|
23527
23585
|
/**
|
|
23528
23586
|
* Self decorator and metadata.
|
|
23529
23587
|
*
|
|
23530
|
-
*
|
|
23531
23588
|
* @Annotation
|
|
23532
23589
|
*/
|
|
23533
23590
|
var Self = makeParamDecorator('Self');
|
|
23534
23591
|
/**
|
|
23535
23592
|
* SkipSelf decorator and metadata.
|
|
23536
23593
|
*
|
|
23537
|
-
*
|
|
23538
23594
|
* @Annotation
|
|
23539
23595
|
*/
|
|
23540
23596
|
var SkipSelf = makeParamDecorator('SkipSelf');
|
|
23541
23597
|
/**
|
|
23542
23598
|
* Host decorator and metadata.
|
|
23543
23599
|
*
|
|
23544
|
-
*
|
|
23545
23600
|
* @Annotation
|
|
23546
23601
|
*/
|
|
23547
23602
|
var Host = makeParamDecorator('Host');
|
|
@@ -23578,23 +23633,17 @@ var NullInjector = /** @class */ (function () {
|
|
|
23578
23633
|
return NullInjector;
|
|
23579
23634
|
}());
|
|
23580
23635
|
/**
|
|
23581
|
-
* @usageNotes
|
|
23582
|
-
* ```
|
|
23583
|
-
* const injector: Injector = ...;
|
|
23584
|
-
* injector.get(...);
|
|
23585
|
-
* ```
|
|
23586
|
-
*
|
|
23587
|
-
* @description
|
|
23588
|
-
*
|
|
23589
23636
|
* Concrete injectors implement this interface.
|
|
23590
23637
|
*
|
|
23591
|
-
* For more details, see the
|
|
23638
|
+
* For more details, see the ["Dependency Injection Guide"](guide/dependency-injection).
|
|
23592
23639
|
*
|
|
23640
|
+
* @usageNotes
|
|
23593
23641
|
* ### Example
|
|
23594
23642
|
*
|
|
23595
23643
|
* {@example core/di/ts/injector_spec.ts region='Injector'}
|
|
23596
23644
|
*
|
|
23597
23645
|
* `Injector` returns itself when given `Injector` as a token:
|
|
23646
|
+
*
|
|
23598
23647
|
* {@example core/di/ts/injector_spec.ts region='injectInjector'}
|
|
23599
23648
|
*
|
|
23600
23649
|
*
|
|
@@ -23605,25 +23654,12 @@ var Injector = /** @class */ (function () {
|
|
|
23605
23654
|
/**
|
|
23606
23655
|
* Create a new Injector which is configure using `StaticProvider`s.
|
|
23607
23656
|
*
|
|
23657
|
+
* @usageNotes
|
|
23608
23658
|
* ### Example
|
|
23609
23659
|
*
|
|
23610
23660
|
* {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}
|
|
23611
23661
|
*/
|
|
23612
|
-
|
|
23613
|
-
* Create a new Injector which is configure using `StaticProvider`s.
|
|
23614
|
-
*
|
|
23615
|
-
* ### Example
|
|
23616
|
-
*
|
|
23617
|
-
* {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}
|
|
23618
|
-
*/
|
|
23619
|
-
Injector.create = /**
|
|
23620
|
-
* Create a new Injector which is configure using `StaticProvider`s.
|
|
23621
|
-
*
|
|
23622
|
-
* ### Example
|
|
23623
|
-
*
|
|
23624
|
-
* {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}
|
|
23625
|
-
*/
|
|
23626
|
-
function (options, parent) {
|
|
23662
|
+
Injector.create = function (options, parent) {
|
|
23627
23663
|
if (Array.isArray(options)) {
|
|
23628
23664
|
return new StaticInjector(options, parent);
|
|
23629
23665
|
}
|
|
@@ -23814,7 +23850,12 @@ function resolveToken(token, record, records, parent, notFoundValue, flags) {
|
|
|
23814
23850
|
var childRecord = options & 2 /* CheckSelf */ ? records.get(depRecord.token) : undefined;
|
|
23815
23851
|
deps.push(tryResolveToken(
|
|
23816
23852
|
// Current Token to resolve
|
|
23817
|
-
depRecord.token,
|
|
23853
|
+
depRecord.token,
|
|
23854
|
+
// A record which describes how to resolve the token.
|
|
23855
|
+
// If undefined, this means we don't have such a record
|
|
23856
|
+
childRecord,
|
|
23857
|
+
// Other records we know about.
|
|
23858
|
+
records,
|
|
23818
23859
|
// If we don't know how to resolve dependency and we should not check parent for it,
|
|
23819
23860
|
// than pass in Null injector.
|
|
23820
23861
|
!childRecord && !(options & 4 /* CheckParent */) ? NULL_INJECTOR : parent, options & 1 /* Optional */ ? null : Injector.THROW_IF_NOT_FOUND, 0 /* Default */));
|
|
@@ -23957,7 +23998,7 @@ function injectArgs(types) {
|
|
|
23957
23998
|
type = meta;
|
|
23958
23999
|
}
|
|
23959
24000
|
}
|
|
23960
|
-
args.push(inject(
|
|
24001
|
+
args.push(inject(type, flags));
|
|
23961
24002
|
}
|
|
23962
24003
|
else {
|
|
23963
24004
|
args.push(inject(arg));
|
|
@@ -24014,13 +24055,12 @@ function convertInjectableProviderToFactory(type, provider) {
|
|
|
24014
24055
|
var reflectionCapabilities = new ReflectionCapabilities();
|
|
24015
24056
|
deps_3 = reflectionCapabilities.parameters(type);
|
|
24016
24057
|
}
|
|
24017
|
-
return function () { return new (type.bind.apply(type, __spread([void 0], injectArgs(
|
|
24058
|
+
return function () { return new (type.bind.apply(type, __spread([void 0], injectArgs(deps_3))))(); };
|
|
24018
24059
|
}
|
|
24019
24060
|
}
|
|
24020
24061
|
/**
|
|
24021
24062
|
* Injectable decorator and metadata.
|
|
24022
24063
|
*
|
|
24023
|
-
*
|
|
24024
24064
|
* @Annotation
|
|
24025
24065
|
*/
|
|
24026
24066
|
var Injectable = makeDecorator('Injectable', undefined, undefined, undefined, function (injectableType, options) {
|
|
@@ -24041,27 +24081,32 @@ var Injectable = makeDecorator('Injectable', undefined, undefined, undefined, fu
|
|
|
24041
24081
|
* found in the LICENSE file at https://angular.io/license
|
|
24042
24082
|
*/
|
|
24043
24083
|
/**
|
|
24044
|
-
* Defines a schema that
|
|
24045
|
-
* -
|
|
24046
|
-
* -
|
|
24047
|
-
* elements.
|
|
24084
|
+
* Defines a schema that allows an NgModule to contain the following:
|
|
24085
|
+
* - Non-Angular elements named with dash case (`-`).
|
|
24086
|
+
* - Element properties named with dash case (`-`).
|
|
24087
|
+
* Dash case is the naming convention for custom elements.
|
|
24048
24088
|
*
|
|
24049
24089
|
*
|
|
24050
24090
|
*/
|
|
24051
24091
|
|
|
24052
24092
|
/**
|
|
24053
|
-
* Defines a schema that
|
|
24093
|
+
* Defines a schema that allows any property on any element.
|
|
24054
24094
|
*
|
|
24055
24095
|
* @experimental
|
|
24056
24096
|
*/
|
|
24057
24097
|
|
|
24058
24098
|
/**
|
|
24059
|
-
* NgModule
|
|
24060
|
-
*
|
|
24099
|
+
* Decorator that marks the following class as an NgModule, and supplies
|
|
24100
|
+
* configuration metadata for it.
|
|
24061
24101
|
*
|
|
24062
24102
|
* @Annotation
|
|
24063
24103
|
*/
|
|
24064
|
-
var NgModule = makeDecorator('NgModule', function (ngModule) { return ngModule; }, undefined, undefined,
|
|
24104
|
+
var NgModule = makeDecorator('NgModule', function (ngModule) { return ngModule; }, undefined, undefined,
|
|
24105
|
+
/**
|
|
24106
|
+
* Decorator that marks the following class as an NgModule, and supplies
|
|
24107
|
+
* configuration metadata for it.
|
|
24108
|
+
*/
|
|
24109
|
+
function (moduleType, metadata) {
|
|
24065
24110
|
var imports = (metadata && metadata.imports) || [];
|
|
24066
24111
|
if (metadata && metadata.exports) {
|
|
24067
24112
|
imports = __spread(imports, [metadata.exports]);
|
|
@@ -24073,13 +24118,6 @@ var NgModule = makeDecorator('NgModule', function (ngModule) { return ngModule;
|
|
|
24073
24118
|
});
|
|
24074
24119
|
});
|
|
24075
24120
|
|
|
24076
|
-
/**
|
|
24077
|
-
* @license
|
|
24078
|
-
* Copyright Google Inc. All Rights Reserved.
|
|
24079
|
-
*
|
|
24080
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
24081
|
-
* found in the LICENSE file at https://angular.io/license
|
|
24082
|
-
*/
|
|
24083
24121
|
/**
|
|
24084
24122
|
* @license
|
|
24085
24123
|
* Copyright Google Inc. All Rights Reserved.
|
|
@@ -24093,19 +24131,7 @@ var NgModule = makeDecorator('NgModule', function (ngModule) { return ngModule;
|
|
|
24093
24131
|
* See {@link Component#encapsulation encapsulation}.
|
|
24094
24132
|
*
|
|
24095
24133
|
*/
|
|
24096
|
-
/**
|
|
24097
|
-
* Defines template and style encapsulation options available for Component's {@link Component}.
|
|
24098
|
-
*
|
|
24099
|
-
* See {@link Component#encapsulation encapsulation}.
|
|
24100
|
-
*
|
|
24101
|
-
*/
|
|
24102
24134
|
var ViewEncapsulation$1;
|
|
24103
|
-
/**
|
|
24104
|
-
* Defines template and style encapsulation options available for Component's {@link Component}.
|
|
24105
|
-
*
|
|
24106
|
-
* See {@link Component#encapsulation encapsulation}.
|
|
24107
|
-
*
|
|
24108
|
-
*/
|
|
24109
24135
|
(function (ViewEncapsulation) {
|
|
24110
24136
|
/**
|
|
24111
24137
|
* Emulate `Native` scoping of styles by adding an attribute containing surrogate id to the Host
|
|
@@ -24158,7 +24184,7 @@ var Version$1 = /** @class */ (function () {
|
|
|
24158
24184
|
}
|
|
24159
24185
|
return Version;
|
|
24160
24186
|
}());
|
|
24161
|
-
var VERSION$2 = new Version$1('6.0.
|
|
24187
|
+
var VERSION$2 = new Version$1('6.0.7');
|
|
24162
24188
|
|
|
24163
24189
|
/**
|
|
24164
24190
|
* @license
|
|
@@ -24197,14 +24223,13 @@ function defaultErrorLogger(console) {
|
|
|
24197
24223
|
* found in the LICENSE file at https://angular.io/license
|
|
24198
24224
|
*/
|
|
24199
24225
|
/**
|
|
24200
|
-
*
|
|
24201
|
-
* @description
|
|
24202
24226
|
* Provides a hook for centralized exception handling.
|
|
24203
24227
|
*
|
|
24204
24228
|
* The default implementation of `ErrorHandler` prints error messages to the `console`. To
|
|
24205
24229
|
* intercept error handling, write a custom exception handler that replaces this default as
|
|
24206
24230
|
* appropriate for your app.
|
|
24207
24231
|
*
|
|
24232
|
+
* @usageNotes
|
|
24208
24233
|
* ### Example
|
|
24209
24234
|
*
|
|
24210
24235
|
* ```
|
|
@@ -24219,14 +24244,12 @@ function defaultErrorLogger(console) {
|
|
|
24219
24244
|
* })
|
|
24220
24245
|
* class MyModule {}
|
|
24221
24246
|
* ```
|
|
24222
|
-
*
|
|
24223
|
-
*
|
|
24224
24247
|
*/
|
|
24225
24248
|
var ErrorHandler = /** @class */ (function () {
|
|
24226
24249
|
function ErrorHandler() {
|
|
24227
24250
|
/**
|
|
24228
|
-
|
|
24229
|
-
|
|
24251
|
+
* @internal
|
|
24252
|
+
*/
|
|
24230
24253
|
this._console = console;
|
|
24231
24254
|
}
|
|
24232
24255
|
ErrorHandler.prototype.handleError = function (error) {
|
|
@@ -24244,9 +24267,7 @@ var ErrorHandler = /** @class */ (function () {
|
|
|
24244
24267
|
}
|
|
24245
24268
|
};
|
|
24246
24269
|
/** @internal */
|
|
24247
|
-
|
|
24248
|
-
ErrorHandler.prototype._findContext = /** @internal */
|
|
24249
|
-
function (error) {
|
|
24270
|
+
ErrorHandler.prototype._findContext = function (error) {
|
|
24250
24271
|
if (error) {
|
|
24251
24272
|
return getDebugContext(error) ? getDebugContext(error) :
|
|
24252
24273
|
this._findContext(getOriginalError(error));
|
|
@@ -24254,9 +24275,7 @@ var ErrorHandler = /** @class */ (function () {
|
|
|
24254
24275
|
return null;
|
|
24255
24276
|
};
|
|
24256
24277
|
/** @internal */
|
|
24257
|
-
|
|
24258
|
-
ErrorHandler.prototype._findOriginalError = /** @internal */
|
|
24259
|
-
function (error) {
|
|
24278
|
+
ErrorHandler.prototype._findOriginalError = function (error) {
|
|
24260
24279
|
var e = getOriginalError(error);
|
|
24261
24280
|
while (e && getOriginalError(e)) {
|
|
24262
24281
|
e = getOriginalError(e);
|
|
@@ -24319,7 +24338,8 @@ function addKey(injector, key) {
|
|
|
24319
24338
|
* Thrown when trying to retrieve a dependency by key from {@link Injector}, but the
|
|
24320
24339
|
* {@link Injector} does not have a {@link Provider} for the given key.
|
|
24321
24340
|
*
|
|
24322
|
-
*
|
|
24341
|
+
* @usageNotes
|
|
24342
|
+
* ### Example
|
|
24323
24343
|
*
|
|
24324
24344
|
* ```typescript
|
|
24325
24345
|
* class A {
|
|
@@ -24338,7 +24358,8 @@ function noProviderError(injector, key) {
|
|
|
24338
24358
|
/**
|
|
24339
24359
|
* Thrown when dependencies form a cycle.
|
|
24340
24360
|
*
|
|
24341
|
-
*
|
|
24361
|
+
* @usageNotes
|
|
24362
|
+
* ### Example
|
|
24342
24363
|
*
|
|
24343
24364
|
* ```typescript
|
|
24344
24365
|
* var injector = Injector.resolveAndCreate([
|
|
@@ -24362,7 +24383,8 @@ function cyclicDependencyError(injector, key) {
|
|
|
24362
24383
|
* The `InstantiationError` class contains the original error plus the dependency graph which caused
|
|
24363
24384
|
* this object to be instantiated.
|
|
24364
24385
|
*
|
|
24365
|
-
*
|
|
24386
|
+
* @usageNotes
|
|
24387
|
+
* ### Example
|
|
24366
24388
|
*
|
|
24367
24389
|
* ```typescript
|
|
24368
24390
|
* class A {
|
|
@@ -24392,7 +24414,8 @@ function instantiationError(injector, originalException, originalStack, key) {
|
|
|
24392
24414
|
* Thrown when an object other then {@link Provider} (or `Type`) is passed to {@link Injector}
|
|
24393
24415
|
* creation.
|
|
24394
24416
|
*
|
|
24395
|
-
*
|
|
24417
|
+
* @usageNotes
|
|
24418
|
+
* ### Example
|
|
24396
24419
|
*
|
|
24397
24420
|
* ```typescript
|
|
24398
24421
|
* expect(() => Injector.resolveAndCreate(["not a type"])).toThrowError();
|
|
@@ -24407,7 +24430,8 @@ function invalidProviderError(provider) {
|
|
|
24407
24430
|
* Lack of annotation information prevents the {@link Injector} from determining which dependencies
|
|
24408
24431
|
* need to be injected into the constructor.
|
|
24409
24432
|
*
|
|
24410
|
-
*
|
|
24433
|
+
* @usageNotes
|
|
24434
|
+
* ### Example
|
|
24411
24435
|
*
|
|
24412
24436
|
* ```typescript
|
|
24413
24437
|
* class A {
|
|
@@ -24449,7 +24473,8 @@ function noAnnotationError(typeOrFunc, params) {
|
|
|
24449
24473
|
/**
|
|
24450
24474
|
* Thrown when getting an object by index.
|
|
24451
24475
|
*
|
|
24452
|
-
*
|
|
24476
|
+
* @usageNotes
|
|
24477
|
+
* ### Example
|
|
24453
24478
|
*
|
|
24454
24479
|
* ```typescript
|
|
24455
24480
|
* class A {}
|
|
@@ -24467,6 +24492,7 @@ function outOfBoundsError(index) {
|
|
|
24467
24492
|
/**
|
|
24468
24493
|
* Thrown when a multi provider and a regular provider are bound to the same token.
|
|
24469
24494
|
*
|
|
24495
|
+
* @usageNotes
|
|
24470
24496
|
* ### Example
|
|
24471
24497
|
*
|
|
24472
24498
|
* ```typescript
|
|
@@ -24518,23 +24544,14 @@ var ReflectiveKey = /** @class */ (function () {
|
|
|
24518
24544
|
/**
|
|
24519
24545
|
* Retrieves a `Key` for a token.
|
|
24520
24546
|
*/
|
|
24521
|
-
|
|
24522
|
-
* Retrieves a `Key` for a token.
|
|
24523
|
-
*/
|
|
24524
|
-
ReflectiveKey.get = /**
|
|
24525
|
-
* Retrieves a `Key` for a token.
|
|
24526
|
-
*/
|
|
24527
|
-
function (token) {
|
|
24547
|
+
ReflectiveKey.get = function (token) {
|
|
24528
24548
|
return _globalKeyRegistry.get(resolveForwardRef$1(token));
|
|
24529
24549
|
};
|
|
24530
24550
|
Object.defineProperty(ReflectiveKey, "numberOfKeys", {
|
|
24531
24551
|
/**
|
|
24532
24552
|
* @returns the number of keys registered in the system.
|
|
24533
24553
|
*/
|
|
24534
|
-
get:
|
|
24535
|
-
* @returns the number of keys registered in the system.
|
|
24536
|
-
*/
|
|
24537
|
-
function () { return _globalKeyRegistry.numberOfKeys; },
|
|
24554
|
+
get: function () { return _globalKeyRegistry.numberOfKeys; },
|
|
24538
24555
|
enumerable: true,
|
|
24539
24556
|
configurable: true
|
|
24540
24557
|
});
|
|
@@ -24652,17 +24669,18 @@ var ResolvedReflectiveProvider_ = /** @class */ (function () {
|
|
|
24652
24669
|
return ResolvedReflectiveProvider_;
|
|
24653
24670
|
}());
|
|
24654
24671
|
/**
|
|
24655
|
-
* An internal resolved representation of a factory function created by resolving
|
|
24656
|
-
* Provider}.
|
|
24672
|
+
* An internal resolved representation of a factory function created by resolving `Provider`.
|
|
24657
24673
|
* @experimental
|
|
24658
24674
|
*/
|
|
24659
24675
|
var ResolvedReflectiveFactory = /** @class */ (function () {
|
|
24660
|
-
function ResolvedReflectiveFactory(
|
|
24661
|
-
|
|
24662
|
-
|
|
24663
|
-
|
|
24664
|
-
|
|
24665
|
-
|
|
24676
|
+
function ResolvedReflectiveFactory(
|
|
24677
|
+
/**
|
|
24678
|
+
* Factory function which can return an instance of an object represented by a key.
|
|
24679
|
+
*/
|
|
24680
|
+
factory,
|
|
24681
|
+
/**
|
|
24682
|
+
* Arguments (dependencies) to the `factory` function.
|
|
24683
|
+
*/
|
|
24666
24684
|
dependencies) {
|
|
24667
24685
|
this.factory = factory;
|
|
24668
24686
|
this.dependencies = dependencies;
|
|
@@ -24695,10 +24713,10 @@ function resolveReflectiveFactory(provider) {
|
|
|
24695
24713
|
return new ResolvedReflectiveFactory(factoryFn, resolvedDeps);
|
|
24696
24714
|
}
|
|
24697
24715
|
/**
|
|
24698
|
-
* Converts the
|
|
24716
|
+
* Converts the `Provider` into `ResolvedProvider`.
|
|
24699
24717
|
*
|
|
24700
|
-
*
|
|
24701
|
-
*
|
|
24718
|
+
* `Injector` internally only uses `ResolvedProvider`, `Provider` contains convenience provider
|
|
24719
|
+
* syntax.
|
|
24702
24720
|
*/
|
|
24703
24721
|
function resolveReflectiveProvider(provider) {
|
|
24704
24722
|
return new ResolvedReflectiveProvider_(ReflectiveKey.get(provider.provide), [resolveReflectiveFactory(provider)], provider.multi || false);
|
|
@@ -24713,9 +24731,8 @@ function resolveReflectiveProviders(providers) {
|
|
|
24713
24731
|
return Array.from(resolvedProviderMap.values());
|
|
24714
24732
|
}
|
|
24715
24733
|
/**
|
|
24716
|
-
* Merges a list of ResolvedProviders into a list where
|
|
24717
|
-
*
|
|
24718
|
-
* have been merged.
|
|
24734
|
+
* Merges a list of ResolvedProviders into a list where each key is contained exactly once and
|
|
24735
|
+
* multi providers have been merged.
|
|
24719
24736
|
*/
|
|
24720
24737
|
function mergeResolvedReflectiveProviders(providers, normalizedProvidersMap) {
|
|
24721
24738
|
for (var i = 0; i < providers.length; i++) {
|
|
@@ -24843,7 +24860,8 @@ var UNDEFINED = new Object();
|
|
|
24843
24860
|
* In typical use, application code asks for the dependencies in the constructor and they are
|
|
24844
24861
|
* resolved by the `Injector`.
|
|
24845
24862
|
*
|
|
24846
|
-
*
|
|
24863
|
+
* @usageNotes
|
|
24864
|
+
* ### Example
|
|
24847
24865
|
*
|
|
24848
24866
|
* The following example creates an `Injector` configured to create `Engine` and `Car`.
|
|
24849
24867
|
*
|
|
@@ -24875,9 +24893,10 @@ var ReflectiveInjector = /** @class */ (function () {
|
|
|
24875
24893
|
* Turns an array of provider definitions into an array of resolved providers.
|
|
24876
24894
|
*
|
|
24877
24895
|
* A resolution is a process of flattening multiple nested arrays and converting individual
|
|
24878
|
-
* providers into an array of
|
|
24896
|
+
* providers into an array of `ResolvedReflectiveProvider`s.
|
|
24879
24897
|
*
|
|
24880
|
-
*
|
|
24898
|
+
* @usageNotes
|
|
24899
|
+
* ### Example
|
|
24881
24900
|
*
|
|
24882
24901
|
* ```typescript
|
|
24883
24902
|
* @Injectable()
|
|
@@ -24902,84 +24921,18 @@ var ReflectiveInjector = /** @class */ (function () {
|
|
|
24902
24921
|
* });
|
|
24903
24922
|
* ```
|
|
24904
24923
|
*
|
|
24905
|
-
* See {@link ReflectiveInjector#fromResolvedProviders fromResolvedProviders} for more info.
|
|
24906
24924
|
*/
|
|
24907
|
-
|
|
24908
|
-
* Turns an array of provider definitions into an array of resolved providers.
|
|
24909
|
-
*
|
|
24910
|
-
* A resolution is a process of flattening multiple nested arrays and converting individual
|
|
24911
|
-
* providers into an array of {@link ResolvedReflectiveProvider}s.
|
|
24912
|
-
*
|
|
24913
|
-
* ### Example ([live demo](http://plnkr.co/edit/AiXTHi?p=preview))
|
|
24914
|
-
*
|
|
24915
|
-
* ```typescript
|
|
24916
|
-
* @Injectable()
|
|
24917
|
-
* class Engine {
|
|
24918
|
-
* }
|
|
24919
|
-
*
|
|
24920
|
-
* @Injectable()
|
|
24921
|
-
* class Car {
|
|
24922
|
-
* constructor(public engine:Engine) {}
|
|
24923
|
-
* }
|
|
24924
|
-
*
|
|
24925
|
-
* var providers = ReflectiveInjector.resolve([Car, [[Engine]]]);
|
|
24926
|
-
*
|
|
24927
|
-
* expect(providers.length).toEqual(2);
|
|
24928
|
-
*
|
|
24929
|
-
* expect(providers[0] instanceof ResolvedReflectiveProvider).toBe(true);
|
|
24930
|
-
* expect(providers[0].key.displayName).toBe("Car");
|
|
24931
|
-
* expect(providers[0].dependencies.length).toEqual(1);
|
|
24932
|
-
* expect(providers[0].factory).toBeDefined();
|
|
24933
|
-
*
|
|
24934
|
-
* expect(providers[1].key.displayName).toBe("Engine");
|
|
24935
|
-
* });
|
|
24936
|
-
* ```
|
|
24937
|
-
*
|
|
24938
|
-
* See {@link ReflectiveInjector#fromResolvedProviders fromResolvedProviders} for more info.
|
|
24939
|
-
*/
|
|
24940
|
-
ReflectiveInjector.resolve = /**
|
|
24941
|
-
* Turns an array of provider definitions into an array of resolved providers.
|
|
24942
|
-
*
|
|
24943
|
-
* A resolution is a process of flattening multiple nested arrays and converting individual
|
|
24944
|
-
* providers into an array of {@link ResolvedReflectiveProvider}s.
|
|
24945
|
-
*
|
|
24946
|
-
* ### Example ([live demo](http://plnkr.co/edit/AiXTHi?p=preview))
|
|
24947
|
-
*
|
|
24948
|
-
* ```typescript
|
|
24949
|
-
* @Injectable()
|
|
24950
|
-
* class Engine {
|
|
24951
|
-
* }
|
|
24952
|
-
*
|
|
24953
|
-
* @Injectable()
|
|
24954
|
-
* class Car {
|
|
24955
|
-
* constructor(public engine:Engine) {}
|
|
24956
|
-
* }
|
|
24957
|
-
*
|
|
24958
|
-
* var providers = ReflectiveInjector.resolve([Car, [[Engine]]]);
|
|
24959
|
-
*
|
|
24960
|
-
* expect(providers.length).toEqual(2);
|
|
24961
|
-
*
|
|
24962
|
-
* expect(providers[0] instanceof ResolvedReflectiveProvider).toBe(true);
|
|
24963
|
-
* expect(providers[0].key.displayName).toBe("Car");
|
|
24964
|
-
* expect(providers[0].dependencies.length).toEqual(1);
|
|
24965
|
-
* expect(providers[0].factory).toBeDefined();
|
|
24966
|
-
*
|
|
24967
|
-
* expect(providers[1].key.displayName).toBe("Engine");
|
|
24968
|
-
* });
|
|
24969
|
-
* ```
|
|
24970
|
-
*
|
|
24971
|
-
* See {@link ReflectiveInjector#fromResolvedProviders fromResolvedProviders} for more info.
|
|
24972
|
-
*/
|
|
24973
|
-
function (providers) {
|
|
24925
|
+
ReflectiveInjector.resolve = function (providers) {
|
|
24974
24926
|
return resolveReflectiveProviders(providers);
|
|
24975
24927
|
};
|
|
24976
24928
|
/**
|
|
24977
24929
|
* Resolves an array of providers and creates an injector from those providers.
|
|
24978
24930
|
*
|
|
24979
|
-
* The passed-in providers can be an array of `Type`,
|
|
24931
|
+
* The passed-in providers can be an array of `Type`, `Provider`,
|
|
24980
24932
|
* or a recursive array of more providers.
|
|
24981
24933
|
*
|
|
24982
|
-
*
|
|
24934
|
+
* @usageNotes
|
|
24935
|
+
* ### Example
|
|
24983
24936
|
*
|
|
24984
24937
|
* ```typescript
|
|
24985
24938
|
* @Injectable()
|
|
@@ -24994,67 +24947,8 @@ var ReflectiveInjector = /** @class */ (function () {
|
|
|
24994
24947
|
* var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);
|
|
24995
24948
|
* expect(injector.get(Car) instanceof Car).toBe(true);
|
|
24996
24949
|
* ```
|
|
24997
|
-
*
|
|
24998
|
-
* This function is slower than the corresponding `fromResolvedProviders`
|
|
24999
|
-
* because it needs to resolve the passed-in providers first.
|
|
25000
|
-
* See {@link ReflectiveInjector#resolve resolve} and
|
|
25001
|
-
* {@link ReflectiveInjector#fromResolvedProviders fromResolvedProviders}.
|
|
25002
24950
|
*/
|
|
25003
|
-
|
|
25004
|
-
* Resolves an array of providers and creates an injector from those providers.
|
|
25005
|
-
*
|
|
25006
|
-
* The passed-in providers can be an array of `Type`, {@link Provider},
|
|
25007
|
-
* or a recursive array of more providers.
|
|
25008
|
-
*
|
|
25009
|
-
* ### Example ([live demo](http://plnkr.co/edit/ePOccA?p=preview))
|
|
25010
|
-
*
|
|
25011
|
-
* ```typescript
|
|
25012
|
-
* @Injectable()
|
|
25013
|
-
* class Engine {
|
|
25014
|
-
* }
|
|
25015
|
-
*
|
|
25016
|
-
* @Injectable()
|
|
25017
|
-
* class Car {
|
|
25018
|
-
* constructor(public engine:Engine) {}
|
|
25019
|
-
* }
|
|
25020
|
-
*
|
|
25021
|
-
* var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);
|
|
25022
|
-
* expect(injector.get(Car) instanceof Car).toBe(true);
|
|
25023
|
-
* ```
|
|
25024
|
-
*
|
|
25025
|
-
* This function is slower than the corresponding `fromResolvedProviders`
|
|
25026
|
-
* because it needs to resolve the passed-in providers first.
|
|
25027
|
-
* See {@link ReflectiveInjector#resolve resolve} and
|
|
25028
|
-
* {@link ReflectiveInjector#fromResolvedProviders fromResolvedProviders}.
|
|
25029
|
-
*/
|
|
25030
|
-
ReflectiveInjector.resolveAndCreate = /**
|
|
25031
|
-
* Resolves an array of providers and creates an injector from those providers.
|
|
25032
|
-
*
|
|
25033
|
-
* The passed-in providers can be an array of `Type`, {@link Provider},
|
|
25034
|
-
* or a recursive array of more providers.
|
|
25035
|
-
*
|
|
25036
|
-
* ### Example ([live demo](http://plnkr.co/edit/ePOccA?p=preview))
|
|
25037
|
-
*
|
|
25038
|
-
* ```typescript
|
|
25039
|
-
* @Injectable()
|
|
25040
|
-
* class Engine {
|
|
25041
|
-
* }
|
|
25042
|
-
*
|
|
25043
|
-
* @Injectable()
|
|
25044
|
-
* class Car {
|
|
25045
|
-
* constructor(public engine:Engine) {}
|
|
25046
|
-
* }
|
|
25047
|
-
*
|
|
25048
|
-
* var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);
|
|
25049
|
-
* expect(injector.get(Car) instanceof Car).toBe(true);
|
|
25050
|
-
* ```
|
|
25051
|
-
*
|
|
25052
|
-
* This function is slower than the corresponding `fromResolvedProviders`
|
|
25053
|
-
* because it needs to resolve the passed-in providers first.
|
|
25054
|
-
* See {@link ReflectiveInjector#resolve resolve} and
|
|
25055
|
-
* {@link ReflectiveInjector#fromResolvedProviders fromResolvedProviders}.
|
|
25056
|
-
*/
|
|
25057
|
-
function (providers, parent) {
|
|
24951
|
+
ReflectiveInjector.resolveAndCreate = function (providers, parent) {
|
|
25058
24952
|
var ResolvedReflectiveProviders = ReflectiveInjector.resolve(providers);
|
|
25059
24953
|
return ReflectiveInjector.fromResolvedProviders(ResolvedReflectiveProviders, parent);
|
|
25060
24954
|
};
|
|
@@ -25063,7 +24957,8 @@ var ReflectiveInjector = /** @class */ (function () {
|
|
|
25063
24957
|
*
|
|
25064
24958
|
* This API is the recommended way to construct injectors in performance-sensitive parts.
|
|
25065
24959
|
*
|
|
25066
|
-
*
|
|
24960
|
+
* @usageNotes
|
|
24961
|
+
* ### Example
|
|
25067
24962
|
*
|
|
25068
24963
|
* ```typescript
|
|
25069
24964
|
* @Injectable()
|
|
@@ -25081,53 +24976,7 @@ var ReflectiveInjector = /** @class */ (function () {
|
|
|
25081
24976
|
* ```
|
|
25082
24977
|
* @experimental
|
|
25083
24978
|
*/
|
|
25084
|
-
|
|
25085
|
-
* Creates an injector from previously resolved providers.
|
|
25086
|
-
*
|
|
25087
|
-
* This API is the recommended way to construct injectors in performance-sensitive parts.
|
|
25088
|
-
*
|
|
25089
|
-
* ### Example ([live demo](http://plnkr.co/edit/KrSMci?p=preview))
|
|
25090
|
-
*
|
|
25091
|
-
* ```typescript
|
|
25092
|
-
* @Injectable()
|
|
25093
|
-
* class Engine {
|
|
25094
|
-
* }
|
|
25095
|
-
*
|
|
25096
|
-
* @Injectable()
|
|
25097
|
-
* class Car {
|
|
25098
|
-
* constructor(public engine:Engine) {}
|
|
25099
|
-
* }
|
|
25100
|
-
*
|
|
25101
|
-
* var providers = ReflectiveInjector.resolve([Car, Engine]);
|
|
25102
|
-
* var injector = ReflectiveInjector.fromResolvedProviders(providers);
|
|
25103
|
-
* expect(injector.get(Car) instanceof Car).toBe(true);
|
|
25104
|
-
* ```
|
|
25105
|
-
* @experimental
|
|
25106
|
-
*/
|
|
25107
|
-
ReflectiveInjector.fromResolvedProviders = /**
|
|
25108
|
-
* Creates an injector from previously resolved providers.
|
|
25109
|
-
*
|
|
25110
|
-
* This API is the recommended way to construct injectors in performance-sensitive parts.
|
|
25111
|
-
*
|
|
25112
|
-
* ### Example ([live demo](http://plnkr.co/edit/KrSMci?p=preview))
|
|
25113
|
-
*
|
|
25114
|
-
* ```typescript
|
|
25115
|
-
* @Injectable()
|
|
25116
|
-
* class Engine {
|
|
25117
|
-
* }
|
|
25118
|
-
*
|
|
25119
|
-
* @Injectable()
|
|
25120
|
-
* class Car {
|
|
25121
|
-
* constructor(public engine:Engine) {}
|
|
25122
|
-
* }
|
|
25123
|
-
*
|
|
25124
|
-
* var providers = ReflectiveInjector.resolve([Car, Engine]);
|
|
25125
|
-
* var injector = ReflectiveInjector.fromResolvedProviders(providers);
|
|
25126
|
-
* expect(injector.get(Car) instanceof Car).toBe(true);
|
|
25127
|
-
* ```
|
|
25128
|
-
* @experimental
|
|
25129
|
-
*/
|
|
25130
|
-
function (providers, parent) {
|
|
24979
|
+
ReflectiveInjector.fromResolvedProviders = function (providers, parent) {
|
|
25131
24980
|
return new ReflectiveInjector_(providers, parent);
|
|
25132
24981
|
};
|
|
25133
24982
|
return ReflectiveInjector;
|
|
@@ -25175,9 +25024,7 @@ var ReflectiveInjector_ = /** @class */ (function () {
|
|
|
25175
25024
|
return this._providers[index];
|
|
25176
25025
|
};
|
|
25177
25026
|
/** @internal */
|
|
25178
|
-
|
|
25179
|
-
ReflectiveInjector_.prototype._new = /** @internal */
|
|
25180
|
-
function (provider) {
|
|
25027
|
+
ReflectiveInjector_.prototype._new = function (provider) {
|
|
25181
25028
|
if (this._constructionCounter++ > this._getMaxNumberOfObjects()) {
|
|
25182
25029
|
throw cyclicDependencyError(this, provider.key);
|
|
25183
25030
|
}
|
|
@@ -25245,9 +25092,7 @@ var ReflectiveInjector_ = /** @class */ (function () {
|
|
|
25245
25092
|
return UNDEFINED;
|
|
25246
25093
|
};
|
|
25247
25094
|
/** @internal */
|
|
25248
|
-
|
|
25249
|
-
ReflectiveInjector_.prototype._throwOrNull = /** @internal */
|
|
25250
|
-
function (key, notFoundValue) {
|
|
25095
|
+
ReflectiveInjector_.prototype._throwOrNull = function (key, notFoundValue) {
|
|
25251
25096
|
if (notFoundValue !== THROW_IF_NOT_FOUND) {
|
|
25252
25097
|
return notFoundValue;
|
|
25253
25098
|
}
|
|
@@ -25256,16 +25101,12 @@ var ReflectiveInjector_ = /** @class */ (function () {
|
|
|
25256
25101
|
}
|
|
25257
25102
|
};
|
|
25258
25103
|
/** @internal */
|
|
25259
|
-
|
|
25260
|
-
ReflectiveInjector_.prototype._getByKeySelf = /** @internal */
|
|
25261
|
-
function (key, notFoundValue) {
|
|
25104
|
+
ReflectiveInjector_.prototype._getByKeySelf = function (key, notFoundValue) {
|
|
25262
25105
|
var obj = this._getObjByKeyId(key.id);
|
|
25263
25106
|
return (obj !== UNDEFINED) ? obj : this._throwOrNull(key, notFoundValue);
|
|
25264
25107
|
};
|
|
25265
25108
|
/** @internal */
|
|
25266
|
-
|
|
25267
|
-
ReflectiveInjector_.prototype._getByKeyDefault = /** @internal */
|
|
25268
|
-
function (key, notFoundValue, visibility) {
|
|
25109
|
+
ReflectiveInjector_.prototype._getByKeyDefault = function (key, notFoundValue, visibility) {
|
|
25269
25110
|
var inj;
|
|
25270
25111
|
if (visibility instanceof SkipSelf) {
|
|
25271
25112
|
inj = this.parent;
|
|
@@ -25342,6 +25183,11 @@ var APP_ROOT = new InjectionToken('The presence of this token marks an injector
|
|
|
25342
25183
|
* Use of this source code is governed by an MIT-style license that can be
|
|
25343
25184
|
* found in the LICENSE file at https://angular.io/license
|
|
25344
25185
|
*/
|
|
25186
|
+
/**
|
|
25187
|
+
* @module
|
|
25188
|
+
* @description
|
|
25189
|
+
* The `di` module provides dependency injection container services.
|
|
25190
|
+
*/
|
|
25345
25191
|
|
|
25346
25192
|
function isFunction(x) {
|
|
25347
25193
|
return typeof x === 'function';
|
|
@@ -37598,9 +37444,7 @@ var ApplicationInitStatus = /** @class */ (function () {
|
|
|
37598
37444
|
});
|
|
37599
37445
|
}
|
|
37600
37446
|
/** @internal */
|
|
37601
|
-
|
|
37602
|
-
ApplicationInitStatus.prototype.runInitializers = /** @internal */
|
|
37603
|
-
function () {
|
|
37447
|
+
ApplicationInitStatus.prototype.runInitializers = function () {
|
|
37604
37448
|
var _this = this;
|
|
37605
37449
|
if (this.initialized) {
|
|
37606
37450
|
return;
|
|
@@ -37629,7 +37473,7 @@ var ApplicationInitStatus = /** @class */ (function () {
|
|
|
37629
37473
|
];
|
|
37630
37474
|
/** @nocollapse */
|
|
37631
37475
|
ApplicationInitStatus.ctorParameters = function () { return [
|
|
37632
|
-
{ type: Array, decorators: [{ type: Inject, args: [APP_INITIALIZER,] }, { type: Optional }
|
|
37476
|
+
{ type: Array, decorators: [{ type: Inject, args: [APP_INITIALIZER,] }, { type: Optional }] }
|
|
37633
37477
|
]; };
|
|
37634
37478
|
return ApplicationInitStatus;
|
|
37635
37479
|
}());
|
|
@@ -37707,18 +37551,13 @@ var Console = /** @class */ (function () {
|
|
|
37707
37551
|
console.log(message);
|
|
37708
37552
|
};
|
|
37709
37553
|
// Note: for reporting errors use `DOM.logError()` as it is platform specific
|
|
37710
|
-
|
|
37711
|
-
Console.prototype.warn =
|
|
37712
|
-
// Note: for reporting errors use `DOM.logError()` as it is platform specific
|
|
37713
|
-
function (message) {
|
|
37554
|
+
Console.prototype.warn = function (message) {
|
|
37714
37555
|
// tslint:disable-next-line:no-console
|
|
37715
37556
|
console.warn(message);
|
|
37716
37557
|
};
|
|
37717
37558
|
Console.decorators = [
|
|
37718
37559
|
{ type: Injectable }
|
|
37719
37560
|
];
|
|
37720
|
-
/** @nocollapse */
|
|
37721
|
-
Console.ctorParameters = function () { return []; };
|
|
37722
37561
|
return Console;
|
|
37723
37562
|
}());
|
|
37724
37563
|
|
|
@@ -37749,74 +37588,34 @@ var Compiler = /** @class */ (function () {
|
|
|
37749
37588
|
* Compiles the given NgModule and all of its components. All templates of the components listed
|
|
37750
37589
|
* in `entryComponents` have to be inlined.
|
|
37751
37590
|
*/
|
|
37752
|
-
|
|
37753
|
-
* Compiles the given NgModule and all of its components. All templates of the components listed
|
|
37754
|
-
* in `entryComponents` have to be inlined.
|
|
37755
|
-
*/
|
|
37756
|
-
Compiler.prototype.compileModuleSync = /**
|
|
37757
|
-
* Compiles the given NgModule and all of its components. All templates of the components listed
|
|
37758
|
-
* in `entryComponents` have to be inlined.
|
|
37759
|
-
*/
|
|
37760
|
-
function (moduleType) { throw _throwError(); };
|
|
37591
|
+
Compiler.prototype.compileModuleSync = function (moduleType) { throw _throwError(); };
|
|
37761
37592
|
/**
|
|
37762
37593
|
* Compiles the given NgModule and all of its components
|
|
37763
37594
|
*/
|
|
37764
|
-
|
|
37765
|
-
* Compiles the given NgModule and all of its components
|
|
37766
|
-
*/
|
|
37767
|
-
Compiler.prototype.compileModuleAsync = /**
|
|
37768
|
-
* Compiles the given NgModule and all of its components
|
|
37769
|
-
*/
|
|
37770
|
-
function (moduleType) { throw _throwError(); };
|
|
37595
|
+
Compiler.prototype.compileModuleAsync = function (moduleType) { throw _throwError(); };
|
|
37771
37596
|
/**
|
|
37772
37597
|
* Same as {@link #compileModuleSync} but also creates ComponentFactories for all components.
|
|
37773
37598
|
*/
|
|
37774
|
-
|
|
37775
|
-
* Same as {@link #compileModuleSync} but also creates ComponentFactories for all components.
|
|
37776
|
-
*/
|
|
37777
|
-
Compiler.prototype.compileModuleAndAllComponentsSync = /**
|
|
37778
|
-
* Same as {@link #compileModuleSync} but also creates ComponentFactories for all components.
|
|
37779
|
-
*/
|
|
37780
|
-
function (moduleType) {
|
|
37599
|
+
Compiler.prototype.compileModuleAndAllComponentsSync = function (moduleType) {
|
|
37781
37600
|
throw _throwError();
|
|
37782
37601
|
};
|
|
37783
37602
|
/**
|
|
37784
37603
|
* Same as {@link #compileModuleAsync} but also creates ComponentFactories for all components.
|
|
37785
37604
|
*/
|
|
37786
|
-
|
|
37787
|
-
* Same as {@link #compileModuleAsync} but also creates ComponentFactories for all components.
|
|
37788
|
-
*/
|
|
37789
|
-
Compiler.prototype.compileModuleAndAllComponentsAsync = /**
|
|
37790
|
-
* Same as {@link #compileModuleAsync} but also creates ComponentFactories for all components.
|
|
37791
|
-
*/
|
|
37792
|
-
function (moduleType) {
|
|
37605
|
+
Compiler.prototype.compileModuleAndAllComponentsAsync = function (moduleType) {
|
|
37793
37606
|
throw _throwError();
|
|
37794
37607
|
};
|
|
37795
37608
|
/**
|
|
37796
37609
|
* Clears all caches.
|
|
37797
37610
|
*/
|
|
37798
|
-
|
|
37799
|
-
* Clears all caches.
|
|
37800
|
-
*/
|
|
37801
|
-
Compiler.prototype.clearCache = /**
|
|
37802
|
-
* Clears all caches.
|
|
37803
|
-
*/
|
|
37804
|
-
function () { };
|
|
37611
|
+
Compiler.prototype.clearCache = function () { };
|
|
37805
37612
|
/**
|
|
37806
37613
|
* Clears the cache for the given component/ngModule.
|
|
37807
37614
|
*/
|
|
37808
|
-
|
|
37809
|
-
* Clears the cache for the given component/ngModule.
|
|
37810
|
-
*/
|
|
37811
|
-
Compiler.prototype.clearCacheFor = /**
|
|
37812
|
-
* Clears the cache for the given component/ngModule.
|
|
37813
|
-
*/
|
|
37814
|
-
function (type) { };
|
|
37615
|
+
Compiler.prototype.clearCacheFor = function (type) { };
|
|
37815
37616
|
Compiler.decorators = [
|
|
37816
37617
|
{ type: Injectable }
|
|
37817
37618
|
];
|
|
37818
|
-
/** @nocollapse */
|
|
37819
|
-
Compiler.ctorParameters = function () { return []; };
|
|
37820
37619
|
return Compiler;
|
|
37821
37620
|
}());
|
|
37822
37621
|
/**
|
|
@@ -38053,6 +37852,7 @@ var wtfLeave = wtfEnabled ? leave : function (s, r) { return r; };
|
|
|
38053
37852
|
/**
|
|
38054
37853
|
* Use by directives and components to emit custom Events.
|
|
38055
37854
|
*
|
|
37855
|
+
* @usageNotes
|
|
38056
37856
|
* ### Examples
|
|
38057
37857
|
*
|
|
38058
37858
|
* In the following example, `Zippy` alternatively emits `open` and `close` events when its
|
|
@@ -38091,6 +37891,8 @@ var wtfLeave = wtfEnabled ? leave : function (s, r) { return r; };
|
|
|
38091
37891
|
* <zippy (open)="onOpen($event)" (close)="onClose($event)"></zippy>
|
|
38092
37892
|
* ```
|
|
38093
37893
|
*
|
|
37894
|
+
* ### Notes
|
|
37895
|
+
*
|
|
38094
37896
|
* Uses Rx.Observable but provides an adapter to make it work as specified here:
|
|
38095
37897
|
* https://github.com/jhusain/observable-spec
|
|
38096
37898
|
*
|
|
@@ -38171,6 +37973,7 @@ var EventEmitter = /** @class */ (function (_super) {
|
|
|
38171
37973
|
* - link to runOutsideAngular/run (throughout this file!)
|
|
38172
37974
|
* -->
|
|
38173
37975
|
*
|
|
37976
|
+
* @usageNotes
|
|
38174
37977
|
* ### Example
|
|
38175
37978
|
*
|
|
38176
37979
|
* ```
|
|
@@ -38237,28 +38040,28 @@ var NgZone = /** @class */ (function () {
|
|
|
38237
38040
|
this.hasPendingMicrotasks = false;
|
|
38238
38041
|
this.hasPendingMacrotasks = false;
|
|
38239
38042
|
/**
|
|
38240
|
-
|
|
38241
|
-
|
|
38043
|
+
* Whether there are no outstanding microtasks or macrotasks.
|
|
38044
|
+
*/
|
|
38242
38045
|
this.isStable = true;
|
|
38243
38046
|
/**
|
|
38244
|
-
|
|
38245
|
-
|
|
38047
|
+
* Notifies when code enters Angular Zone. This gets fired first on VM Turn.
|
|
38048
|
+
*/
|
|
38246
38049
|
this.onUnstable = new EventEmitter(false);
|
|
38247
38050
|
/**
|
|
38248
|
-
|
|
38249
|
-
|
|
38250
|
-
|
|
38251
|
-
|
|
38051
|
+
* Notifies when there is no more microtasks enqueued in the current VM Turn.
|
|
38052
|
+
* This is a hint for Angular to do change detection, which may enqueue more microtasks.
|
|
38053
|
+
* For this reason this event can fire multiple times per VM Turn.
|
|
38054
|
+
*/
|
|
38252
38055
|
this.onMicrotaskEmpty = new EventEmitter(false);
|
|
38253
38056
|
/**
|
|
38254
|
-
|
|
38255
|
-
|
|
38256
|
-
|
|
38257
|
-
|
|
38057
|
+
* Notifies when the last `onMicrotaskEmpty` has run and there are no more microtasks, which
|
|
38058
|
+
* implies we are about to relinquish VM turn.
|
|
38059
|
+
* This event gets called just once.
|
|
38060
|
+
*/
|
|
38258
38061
|
this.onStable = new EventEmitter(false);
|
|
38259
38062
|
/**
|
|
38260
|
-
|
|
38261
|
-
|
|
38063
|
+
* Notifies that an error has been delivered.
|
|
38064
|
+
*/
|
|
38262
38065
|
this.onError = new EventEmitter(false);
|
|
38263
38066
|
if (typeof Zone == 'undefined') {
|
|
38264
38067
|
throw new Error("In this configuration Angular requires Zone.js");
|
|
@@ -38301,31 +38104,7 @@ var NgZone = /** @class */ (function () {
|
|
|
38301
38104
|
*
|
|
38302
38105
|
* If a synchronous error happens it will be rethrown and not reported via `onError`.
|
|
38303
38106
|
*/
|
|
38304
|
-
|
|
38305
|
-
* Executes the `fn` function synchronously within the Angular zone and returns value returned by
|
|
38306
|
-
* the function.
|
|
38307
|
-
*
|
|
38308
|
-
* Running functions via `run` allows you to reenter Angular zone from a task that was executed
|
|
38309
|
-
* outside of the Angular zone (typically started via {@link #runOutsideAngular}).
|
|
38310
|
-
*
|
|
38311
|
-
* Any future tasks or microtasks scheduled from within this function will continue executing from
|
|
38312
|
-
* within the Angular zone.
|
|
38313
|
-
*
|
|
38314
|
-
* If a synchronous error happens it will be rethrown and not reported via `onError`.
|
|
38315
|
-
*/
|
|
38316
|
-
NgZone.prototype.run = /**
|
|
38317
|
-
* Executes the `fn` function synchronously within the Angular zone and returns value returned by
|
|
38318
|
-
* the function.
|
|
38319
|
-
*
|
|
38320
|
-
* Running functions via `run` allows you to reenter Angular zone from a task that was executed
|
|
38321
|
-
* outside of the Angular zone (typically started via {@link #runOutsideAngular}).
|
|
38322
|
-
*
|
|
38323
|
-
* Any future tasks or microtasks scheduled from within this function will continue executing from
|
|
38324
|
-
* within the Angular zone.
|
|
38325
|
-
*
|
|
38326
|
-
* If a synchronous error happens it will be rethrown and not reported via `onError`.
|
|
38327
|
-
*/
|
|
38328
|
-
function (fn, applyThis, applyArgs) {
|
|
38107
|
+
NgZone.prototype.run = function (fn, applyThis, applyArgs) {
|
|
38329
38108
|
return this._inner.run(fn, applyThis, applyArgs);
|
|
38330
38109
|
};
|
|
38331
38110
|
/**
|
|
@@ -38340,31 +38119,7 @@ var NgZone = /** @class */ (function () {
|
|
|
38340
38119
|
*
|
|
38341
38120
|
* If a synchronous error happens it will be rethrown and not reported via `onError`.
|
|
38342
38121
|
*/
|
|
38343
|
-
|
|
38344
|
-
* Executes the `fn` function synchronously within the Angular zone as a task and returns value
|
|
38345
|
-
* returned by the function.
|
|
38346
|
-
*
|
|
38347
|
-
* Running functions via `run` allows you to reenter Angular zone from a task that was executed
|
|
38348
|
-
* outside of the Angular zone (typically started via {@link #runOutsideAngular}).
|
|
38349
|
-
*
|
|
38350
|
-
* Any future tasks or microtasks scheduled from within this function will continue executing from
|
|
38351
|
-
* within the Angular zone.
|
|
38352
|
-
*
|
|
38353
|
-
* If a synchronous error happens it will be rethrown and not reported via `onError`.
|
|
38354
|
-
*/
|
|
38355
|
-
NgZone.prototype.runTask = /**
|
|
38356
|
-
* Executes the `fn` function synchronously within the Angular zone as a task and returns value
|
|
38357
|
-
* returned by the function.
|
|
38358
|
-
*
|
|
38359
|
-
* Running functions via `run` allows you to reenter Angular zone from a task that was executed
|
|
38360
|
-
* outside of the Angular zone (typically started via {@link #runOutsideAngular}).
|
|
38361
|
-
*
|
|
38362
|
-
* Any future tasks or microtasks scheduled from within this function will continue executing from
|
|
38363
|
-
* within the Angular zone.
|
|
38364
|
-
*
|
|
38365
|
-
* If a synchronous error happens it will be rethrown and not reported via `onError`.
|
|
38366
|
-
*/
|
|
38367
|
-
function (fn, applyThis, applyArgs, name) {
|
|
38122
|
+
NgZone.prototype.runTask = function (fn, applyThis, applyArgs, name) {
|
|
38368
38123
|
var zone = this._inner;
|
|
38369
38124
|
var task = zone.scheduleEventTask('NgZoneEvent: ' + name, fn, EMPTY_PAYLOAD, noop$2, noop$2);
|
|
38370
38125
|
try {
|
|
@@ -38378,15 +38133,7 @@ var NgZone = /** @class */ (function () {
|
|
|
38378
38133
|
* Same as `run`, except that synchronous errors are caught and forwarded via `onError` and not
|
|
38379
38134
|
* rethrown.
|
|
38380
38135
|
*/
|
|
38381
|
-
|
|
38382
|
-
* Same as `run`, except that synchronous errors are caught and forwarded via `onError` and not
|
|
38383
|
-
* rethrown.
|
|
38384
|
-
*/
|
|
38385
|
-
NgZone.prototype.runGuarded = /**
|
|
38386
|
-
* Same as `run`, except that synchronous errors are caught and forwarded via `onError` and not
|
|
38387
|
-
* rethrown.
|
|
38388
|
-
*/
|
|
38389
|
-
function (fn, applyThis, applyArgs) {
|
|
38136
|
+
NgZone.prototype.runGuarded = function (fn, applyThis, applyArgs) {
|
|
38390
38137
|
return this._inner.runGuarded(fn, applyThis, applyArgs);
|
|
38391
38138
|
};
|
|
38392
38139
|
/**
|
|
@@ -38402,33 +38149,7 @@ var NgZone = /** @class */ (function () {
|
|
|
38402
38149
|
*
|
|
38403
38150
|
* Use {@link #run} to reenter the Angular zone and do work that updates the application model.
|
|
38404
38151
|
*/
|
|
38405
|
-
|
|
38406
|
-
* Executes the `fn` function synchronously in Angular's parent zone and returns value returned by
|
|
38407
|
-
* the function.
|
|
38408
|
-
*
|
|
38409
|
-
* Running functions via {@link #runOutsideAngular} allows you to escape Angular's zone and do
|
|
38410
|
-
* work that
|
|
38411
|
-
* doesn't trigger Angular change-detection or is subject to Angular's error handling.
|
|
38412
|
-
*
|
|
38413
|
-
* Any future tasks or microtasks scheduled from within this function will continue executing from
|
|
38414
|
-
* outside of the Angular zone.
|
|
38415
|
-
*
|
|
38416
|
-
* Use {@link #run} to reenter the Angular zone and do work that updates the application model.
|
|
38417
|
-
*/
|
|
38418
|
-
NgZone.prototype.runOutsideAngular = /**
|
|
38419
|
-
* Executes the `fn` function synchronously in Angular's parent zone and returns value returned by
|
|
38420
|
-
* the function.
|
|
38421
|
-
*
|
|
38422
|
-
* Running functions via {@link #runOutsideAngular} allows you to escape Angular's zone and do
|
|
38423
|
-
* work that
|
|
38424
|
-
* doesn't trigger Angular change-detection or is subject to Angular's error handling.
|
|
38425
|
-
*
|
|
38426
|
-
* Any future tasks or microtasks scheduled from within this function will continue executing from
|
|
38427
|
-
* outside of the Angular zone.
|
|
38428
|
-
*
|
|
38429
|
-
* Use {@link #run} to reenter the Angular zone and do work that updates the application model.
|
|
38430
|
-
*/
|
|
38431
|
-
function (fn) {
|
|
38152
|
+
NgZone.prototype.runOutsideAngular = function (fn) {
|
|
38432
38153
|
return this._outer.run(fn);
|
|
38433
38154
|
};
|
|
38434
38155
|
return NgZone;
|
|
@@ -38549,11 +38270,11 @@ var Testability = /** @class */ (function () {
|
|
|
38549
38270
|
this._pendingCount = 0;
|
|
38550
38271
|
this._isZoneStable = true;
|
|
38551
38272
|
/**
|
|
38552
|
-
|
|
38553
|
-
|
|
38554
|
-
|
|
38555
|
-
|
|
38556
|
-
|
|
38273
|
+
* Whether any work was done since the last 'whenStable' callback. This is
|
|
38274
|
+
* useful to detect if this could have potentially destabilized another
|
|
38275
|
+
* component while it is stabilizing.
|
|
38276
|
+
* @internal
|
|
38277
|
+
*/
|
|
38557
38278
|
this._didWork = false;
|
|
38558
38279
|
this._callbacks = [];
|
|
38559
38280
|
this._watchAngularEvents();
|
|
@@ -38583,15 +38304,7 @@ var Testability = /** @class */ (function () {
|
|
|
38583
38304
|
* Increases the number of pending request
|
|
38584
38305
|
* @deprecated pending requests are now tracked with zones.
|
|
38585
38306
|
*/
|
|
38586
|
-
|
|
38587
|
-
* Increases the number of pending request
|
|
38588
|
-
* @deprecated pending requests are now tracked with zones.
|
|
38589
|
-
*/
|
|
38590
|
-
Testability.prototype.increasePendingRequestCount = /**
|
|
38591
|
-
* Increases the number of pending request
|
|
38592
|
-
* @deprecated pending requests are now tracked with zones.
|
|
38593
|
-
*/
|
|
38594
|
-
function () {
|
|
38307
|
+
Testability.prototype.increasePendingRequestCount = function () {
|
|
38595
38308
|
this._pendingCount += 1;
|
|
38596
38309
|
this._didWork = true;
|
|
38597
38310
|
return this._pendingCount;
|
|
@@ -38600,15 +38313,7 @@ var Testability = /** @class */ (function () {
|
|
|
38600
38313
|
* Decreases the number of pending request
|
|
38601
38314
|
* @deprecated pending requests are now tracked with zones
|
|
38602
38315
|
*/
|
|
38603
|
-
|
|
38604
|
-
* Decreases the number of pending request
|
|
38605
|
-
* @deprecated pending requests are now tracked with zones
|
|
38606
|
-
*/
|
|
38607
|
-
Testability.prototype.decreasePendingRequestCount = /**
|
|
38608
|
-
* Decreases the number of pending request
|
|
38609
|
-
* @deprecated pending requests are now tracked with zones
|
|
38610
|
-
*/
|
|
38611
|
-
function () {
|
|
38316
|
+
Testability.prototype.decreasePendingRequestCount = function () {
|
|
38612
38317
|
this._pendingCount -= 1;
|
|
38613
38318
|
if (this._pendingCount < 0) {
|
|
38614
38319
|
throw new Error('pending async requests below zero');
|
|
@@ -38619,13 +38324,7 @@ var Testability = /** @class */ (function () {
|
|
|
38619
38324
|
/**
|
|
38620
38325
|
* Whether an associated application is stable
|
|
38621
38326
|
*/
|
|
38622
|
-
|
|
38623
|
-
* Whether an associated application is stable
|
|
38624
|
-
*/
|
|
38625
|
-
Testability.prototype.isStable = /**
|
|
38626
|
-
* Whether an associated application is stable
|
|
38627
|
-
*/
|
|
38628
|
-
function () {
|
|
38327
|
+
Testability.prototype.isStable = function () {
|
|
38629
38328
|
return this._isZoneStable && this._pendingCount === 0 && !this._ngZone.hasPendingMacrotasks;
|
|
38630
38329
|
};
|
|
38631
38330
|
Testability.prototype._runCallbacksIfReady = function () {
|
|
@@ -38634,7 +38333,7 @@ var Testability = /** @class */ (function () {
|
|
|
38634
38333
|
// Schedules the call backs in a new frame so that it is always async.
|
|
38635
38334
|
scheduleMicroTask(function () {
|
|
38636
38335
|
while (_this._callbacks.length !== 0) {
|
|
38637
|
-
var cb =
|
|
38336
|
+
var cb = _this._callbacks.pop();
|
|
38638
38337
|
clearTimeout(cb.timeoutId);
|
|
38639
38338
|
cb.doneCb(_this._didWork);
|
|
38640
38339
|
}
|
|
@@ -38695,31 +38394,7 @@ var Testability = /** @class */ (function () {
|
|
|
38695
38394
|
* pending macrotasks changes. If this callback returns true doneCb will not be invoked
|
|
38696
38395
|
* and no further updates will be issued.
|
|
38697
38396
|
*/
|
|
38698
|
-
|
|
38699
|
-
* Wait for the application to be stable with a timeout. If the timeout is reached before that
|
|
38700
|
-
* happens, the callback receives a list of the macro tasks that were pending, otherwise null.
|
|
38701
|
-
*
|
|
38702
|
-
* @param doneCb The callback to invoke when Angular is stable or the timeout expires
|
|
38703
|
-
* whichever comes first.
|
|
38704
|
-
* @param timeout Optional. The maximum time to wait for Angular to become stable. If not
|
|
38705
|
-
* specified, whenStable() will wait forever.
|
|
38706
|
-
* @param updateCb Optional. If specified, this callback will be invoked whenever the set of
|
|
38707
|
-
* pending macrotasks changes. If this callback returns true doneCb will not be invoked
|
|
38708
|
-
* and no further updates will be issued.
|
|
38709
|
-
*/
|
|
38710
|
-
Testability.prototype.whenStable = /**
|
|
38711
|
-
* Wait for the application to be stable with a timeout. If the timeout is reached before that
|
|
38712
|
-
* happens, the callback receives a list of the macro tasks that were pending, otherwise null.
|
|
38713
|
-
*
|
|
38714
|
-
* @param doneCb The callback to invoke when Angular is stable or the timeout expires
|
|
38715
|
-
* whichever comes first.
|
|
38716
|
-
* @param timeout Optional. The maximum time to wait for Angular to become stable. If not
|
|
38717
|
-
* specified, whenStable() will wait forever.
|
|
38718
|
-
* @param updateCb Optional. If specified, this callback will be invoked whenever the set of
|
|
38719
|
-
* pending macrotasks changes. If this callback returns true doneCb will not be invoked
|
|
38720
|
-
* and no further updates will be issued.
|
|
38721
|
-
*/
|
|
38722
|
-
function (doneCb, timeout, updateCb) {
|
|
38397
|
+
Testability.prototype.whenStable = function (doneCb, timeout, updateCb) {
|
|
38723
38398
|
if (updateCb && !this.taskTrackingZone) {
|
|
38724
38399
|
throw new Error('Task tracking zone is required when passing an update callback to ' +
|
|
38725
38400
|
'whenStable(). Is "zone.js/dist/task-tracking.js" loaded?');
|
|
@@ -38732,34 +38407,14 @@ var Testability = /** @class */ (function () {
|
|
|
38732
38407
|
* Get the number of pending requests
|
|
38733
38408
|
* @deprecated pending requests are now tracked with zones
|
|
38734
38409
|
*/
|
|
38735
|
-
|
|
38736
|
-
* Get the number of pending requests
|
|
38737
|
-
* @deprecated pending requests are now tracked with zones
|
|
38738
|
-
*/
|
|
38739
|
-
Testability.prototype.getPendingRequestCount = /**
|
|
38740
|
-
* Get the number of pending requests
|
|
38741
|
-
* @deprecated pending requests are now tracked with zones
|
|
38742
|
-
*/
|
|
38743
|
-
function () { return this._pendingCount; };
|
|
38410
|
+
Testability.prototype.getPendingRequestCount = function () { return this._pendingCount; };
|
|
38744
38411
|
/**
|
|
38745
38412
|
* Find providers by name
|
|
38746
38413
|
* @param using The root element to search from
|
|
38747
38414
|
* @param provider The name of binding variable
|
|
38748
38415
|
* @param exactMatch Whether using exactMatch
|
|
38749
38416
|
*/
|
|
38750
|
-
|
|
38751
|
-
* Find providers by name
|
|
38752
|
-
* @param using The root element to search from
|
|
38753
|
-
* @param provider The name of binding variable
|
|
38754
|
-
* @param exactMatch Whether using exactMatch
|
|
38755
|
-
*/
|
|
38756
|
-
Testability.prototype.findProviders = /**
|
|
38757
|
-
* Find providers by name
|
|
38758
|
-
* @param using The root element to search from
|
|
38759
|
-
* @param provider The name of binding variable
|
|
38760
|
-
* @param exactMatch Whether using exactMatch
|
|
38761
|
-
*/
|
|
38762
|
-
function (using, provider, exactMatch) {
|
|
38417
|
+
Testability.prototype.findProviders = function (using, provider, exactMatch) {
|
|
38763
38418
|
// TODO(juliemr): implement.
|
|
38764
38419
|
return [];
|
|
38765
38420
|
};
|
|
@@ -38768,7 +38423,7 @@ var Testability = /** @class */ (function () {
|
|
|
38768
38423
|
];
|
|
38769
38424
|
/** @nocollapse */
|
|
38770
38425
|
Testability.ctorParameters = function () { return [
|
|
38771
|
-
{ type: NgZone
|
|
38426
|
+
{ type: NgZone }
|
|
38772
38427
|
]; };
|
|
38773
38428
|
return Testability;
|
|
38774
38429
|
}());
|
|
@@ -38787,94 +38442,38 @@ var TestabilityRegistry = /** @class */ (function () {
|
|
|
38787
38442
|
* @param token token of application, root element
|
|
38788
38443
|
* @param testability Testability hook
|
|
38789
38444
|
*/
|
|
38790
|
-
|
|
38791
|
-
* Registers an application with a testability hook so that it can be tracked
|
|
38792
|
-
* @param token token of application, root element
|
|
38793
|
-
* @param testability Testability hook
|
|
38794
|
-
*/
|
|
38795
|
-
TestabilityRegistry.prototype.registerApplication = /**
|
|
38796
|
-
* Registers an application with a testability hook so that it can be tracked
|
|
38797
|
-
* @param token token of application, root element
|
|
38798
|
-
* @param testability Testability hook
|
|
38799
|
-
*/
|
|
38800
|
-
function (token, testability) {
|
|
38445
|
+
TestabilityRegistry.prototype.registerApplication = function (token, testability) {
|
|
38801
38446
|
this._applications.set(token, testability);
|
|
38802
38447
|
};
|
|
38803
38448
|
/**
|
|
38804
38449
|
* Unregisters an application.
|
|
38805
38450
|
* @param token token of application, root element
|
|
38806
38451
|
*/
|
|
38807
|
-
|
|
38808
|
-
* Unregisters an application.
|
|
38809
|
-
* @param token token of application, root element
|
|
38810
|
-
*/
|
|
38811
|
-
TestabilityRegistry.prototype.unregisterApplication = /**
|
|
38812
|
-
* Unregisters an application.
|
|
38813
|
-
* @param token token of application, root element
|
|
38814
|
-
*/
|
|
38815
|
-
function (token) { this._applications.delete(token); };
|
|
38452
|
+
TestabilityRegistry.prototype.unregisterApplication = function (token) { this._applications.delete(token); };
|
|
38816
38453
|
/**
|
|
38817
38454
|
* Unregisters all applications
|
|
38818
38455
|
*/
|
|
38819
|
-
|
|
38820
|
-
* Unregisters all applications
|
|
38821
|
-
*/
|
|
38822
|
-
TestabilityRegistry.prototype.unregisterAllApplications = /**
|
|
38823
|
-
* Unregisters all applications
|
|
38824
|
-
*/
|
|
38825
|
-
function () { this._applications.clear(); };
|
|
38456
|
+
TestabilityRegistry.prototype.unregisterAllApplications = function () { this._applications.clear(); };
|
|
38826
38457
|
/**
|
|
38827
38458
|
* Get a testability hook associated with the application
|
|
38828
38459
|
* @param elem root element
|
|
38829
38460
|
*/
|
|
38830
|
-
|
|
38831
|
-
* Get a testability hook associated with the application
|
|
38832
|
-
* @param elem root element
|
|
38833
|
-
*/
|
|
38834
|
-
TestabilityRegistry.prototype.getTestability = /**
|
|
38835
|
-
* Get a testability hook associated with the application
|
|
38836
|
-
* @param elem root element
|
|
38837
|
-
*/
|
|
38838
|
-
function (elem) { return this._applications.get(elem) || null; };
|
|
38461
|
+
TestabilityRegistry.prototype.getTestability = function (elem) { return this._applications.get(elem) || null; };
|
|
38839
38462
|
/**
|
|
38840
38463
|
* Get all registered testabilities
|
|
38841
38464
|
*/
|
|
38842
|
-
|
|
38843
|
-
* Get all registered testabilities
|
|
38844
|
-
*/
|
|
38845
|
-
TestabilityRegistry.prototype.getAllTestabilities = /**
|
|
38846
|
-
* Get all registered testabilities
|
|
38847
|
-
*/
|
|
38848
|
-
function () { return Array.from(this._applications.values()); };
|
|
38465
|
+
TestabilityRegistry.prototype.getAllTestabilities = function () { return Array.from(this._applications.values()); };
|
|
38849
38466
|
/**
|
|
38850
38467
|
* Get all registered applications(root elements)
|
|
38851
38468
|
*/
|
|
38852
|
-
|
|
38853
|
-
* Get all registered applications(root elements)
|
|
38854
|
-
*/
|
|
38855
|
-
TestabilityRegistry.prototype.getAllRootElements = /**
|
|
38856
|
-
* Get all registered applications(root elements)
|
|
38857
|
-
*/
|
|
38858
|
-
function () { return Array.from(this._applications.keys()); };
|
|
38469
|
+
TestabilityRegistry.prototype.getAllRootElements = function () { return Array.from(this._applications.keys()); };
|
|
38859
38470
|
/**
|
|
38860
38471
|
* Find testability of a node in the Tree
|
|
38861
38472
|
* @param elem node
|
|
38862
38473
|
* @param findInAncestors whether finding testability in ancestors if testability was not found in
|
|
38863
38474
|
* current node
|
|
38864
38475
|
*/
|
|
38865
|
-
|
|
38866
|
-
* Find testability of a node in the Tree
|
|
38867
|
-
* @param elem node
|
|
38868
|
-
* @param findInAncestors whether finding testability in ancestors if testability was not found in
|
|
38869
|
-
* current node
|
|
38870
|
-
*/
|
|
38871
|
-
TestabilityRegistry.prototype.findTestabilityInTree = /**
|
|
38872
|
-
* Find testability of a node in the Tree
|
|
38873
|
-
* @param elem node
|
|
38874
|
-
* @param findInAncestors whether finding testability in ancestors if testability was not found in
|
|
38875
|
-
* current node
|
|
38876
|
-
*/
|
|
38877
|
-
function (elem, findInAncestors) {
|
|
38476
|
+
TestabilityRegistry.prototype.findTestabilityInTree = function (elem, findInAncestors) {
|
|
38878
38477
|
if (findInAncestors === void 0) { findInAncestors = true; }
|
|
38879
38478
|
return _testabilityGetter.findTestabilityInTree(this, elem, findInAncestors);
|
|
38880
38479
|
};
|
|
@@ -39010,8 +38609,6 @@ function getPlatform() {
|
|
|
39010
38609
|
*
|
|
39011
38610
|
* A page's platform is initialized implicitly when a platform is created via a platform factory
|
|
39012
38611
|
* (e.g. {@link platformBrowser}), or explicitly by calling the {@link createPlatform} function.
|
|
39013
|
-
*
|
|
39014
|
-
*
|
|
39015
38612
|
*/
|
|
39016
38613
|
var PlatformRef = /** @class */ (function () {
|
|
39017
38614
|
/** @internal */
|
|
@@ -39025,7 +38622,8 @@ var PlatformRef = /** @class */ (function () {
|
|
|
39025
38622
|
* Creates an instance of an `@NgModule` for the given platform
|
|
39026
38623
|
* for offline compilation.
|
|
39027
38624
|
*
|
|
39028
|
-
*
|
|
38625
|
+
* @usageNotes
|
|
38626
|
+
* ### Simple Example
|
|
39029
38627
|
*
|
|
39030
38628
|
* ```typescript
|
|
39031
38629
|
* my_module.ts:
|
|
@@ -39044,53 +38642,7 @@ var PlatformRef = /** @class */ (function () {
|
|
|
39044
38642
|
*
|
|
39045
38643
|
* @experimental APIs related to application bootstrap are currently under review.
|
|
39046
38644
|
*/
|
|
39047
|
-
|
|
39048
|
-
* Creates an instance of an `@NgModule` for the given platform
|
|
39049
|
-
* for offline compilation.
|
|
39050
|
-
*
|
|
39051
|
-
* ## Simple Example
|
|
39052
|
-
*
|
|
39053
|
-
* ```typescript
|
|
39054
|
-
* my_module.ts:
|
|
39055
|
-
*
|
|
39056
|
-
* @NgModule({
|
|
39057
|
-
* imports: [BrowserModule]
|
|
39058
|
-
* })
|
|
39059
|
-
* class MyModule {}
|
|
39060
|
-
*
|
|
39061
|
-
* main.ts:
|
|
39062
|
-
* import {MyModuleNgFactory} from './my_module.ngfactory';
|
|
39063
|
-
* import {platformBrowser} from '@angular/platform-browser';
|
|
39064
|
-
*
|
|
39065
|
-
* let moduleRef = platformBrowser().bootstrapModuleFactory(MyModuleNgFactory);
|
|
39066
|
-
* ```
|
|
39067
|
-
*
|
|
39068
|
-
* @experimental APIs related to application bootstrap are currently under review.
|
|
39069
|
-
*/
|
|
39070
|
-
PlatformRef.prototype.bootstrapModuleFactory = /**
|
|
39071
|
-
* Creates an instance of an `@NgModule` for the given platform
|
|
39072
|
-
* for offline compilation.
|
|
39073
|
-
*
|
|
39074
|
-
* ## Simple Example
|
|
39075
|
-
*
|
|
39076
|
-
* ```typescript
|
|
39077
|
-
* my_module.ts:
|
|
39078
|
-
*
|
|
39079
|
-
* @NgModule({
|
|
39080
|
-
* imports: [BrowserModule]
|
|
39081
|
-
* })
|
|
39082
|
-
* class MyModule {}
|
|
39083
|
-
*
|
|
39084
|
-
* main.ts:
|
|
39085
|
-
* import {MyModuleNgFactory} from './my_module.ngfactory';
|
|
39086
|
-
* import {platformBrowser} from '@angular/platform-browser';
|
|
39087
|
-
*
|
|
39088
|
-
* let moduleRef = platformBrowser().bootstrapModuleFactory(MyModuleNgFactory);
|
|
39089
|
-
* ```
|
|
39090
|
-
*
|
|
39091
|
-
* @experimental APIs related to application bootstrap are currently under review.
|
|
39092
|
-
*/
|
|
39093
|
-
function (moduleFactory, options) {
|
|
38645
|
+
PlatformRef.prototype.bootstrapModuleFactory = function (moduleFactory, options) {
|
|
39094
38646
|
var _this = this;
|
|
39095
38647
|
// Note: We need to create the NgZone _before_ we instantiate the module,
|
|
39096
38648
|
// as instantiating the module creates some providers eagerly.
|
|
@@ -39109,10 +38661,8 @@ var PlatformRef = /** @class */ (function () {
|
|
|
39109
38661
|
throw new Error('No ErrorHandler. Is platform module (BrowserModule) included?');
|
|
39110
38662
|
}
|
|
39111
38663
|
moduleRef.onDestroy(function () { return remove(_this._modules, moduleRef); });
|
|
39112
|
-
ngZone.runOutsideAngular(function () {
|
|
39113
|
-
|
|
39114
|
-
});
|
|
39115
|
-
return _callAndReportToErrorHandler(exceptionHandler, (ngZone), function () {
|
|
38664
|
+
ngZone.runOutsideAngular(function () { return ngZone.onError.subscribe({ next: function (error) { exceptionHandler.handleError(error); } }); });
|
|
38665
|
+
return _callAndReportToErrorHandler(exceptionHandler, ngZone, function () {
|
|
39116
38666
|
var initStatus = moduleRef.injector.get(ApplicationInitStatus);
|
|
39117
38667
|
initStatus.runInitializers();
|
|
39118
38668
|
return initStatus.donePromise.then(function () {
|
|
@@ -39125,7 +38675,8 @@ var PlatformRef = /** @class */ (function () {
|
|
|
39125
38675
|
/**
|
|
39126
38676
|
* Creates an instance of an `@NgModule` for a given platform using the given runtime compiler.
|
|
39127
38677
|
*
|
|
39128
|
-
*
|
|
38678
|
+
* @usageNotes
|
|
38679
|
+
* ### Simple Example
|
|
39129
38680
|
*
|
|
39130
38681
|
* ```typescript
|
|
39131
38682
|
* @NgModule({
|
|
@@ -39137,37 +38688,7 @@ var PlatformRef = /** @class */ (function () {
|
|
|
39137
38688
|
* ```
|
|
39138
38689
|
*
|
|
39139
38690
|
*/
|
|
39140
|
-
|
|
39141
|
-
* Creates an instance of an `@NgModule` for a given platform using the given runtime compiler.
|
|
39142
|
-
*
|
|
39143
|
-
* ## Simple Example
|
|
39144
|
-
*
|
|
39145
|
-
* ```typescript
|
|
39146
|
-
* @NgModule({
|
|
39147
|
-
* imports: [BrowserModule]
|
|
39148
|
-
* })
|
|
39149
|
-
* class MyModule {}
|
|
39150
|
-
*
|
|
39151
|
-
* let moduleRef = platformBrowser().bootstrapModule(MyModule);
|
|
39152
|
-
* ```
|
|
39153
|
-
*
|
|
39154
|
-
*/
|
|
39155
|
-
PlatformRef.prototype.bootstrapModule = /**
|
|
39156
|
-
* Creates an instance of an `@NgModule` for a given platform using the given runtime compiler.
|
|
39157
|
-
*
|
|
39158
|
-
* ## Simple Example
|
|
39159
|
-
*
|
|
39160
|
-
* ```typescript
|
|
39161
|
-
* @NgModule({
|
|
39162
|
-
* imports: [BrowserModule]
|
|
39163
|
-
* })
|
|
39164
|
-
* class MyModule {}
|
|
39165
|
-
*
|
|
39166
|
-
* let moduleRef = platformBrowser().bootstrapModule(MyModule);
|
|
39167
|
-
* ```
|
|
39168
|
-
*
|
|
39169
|
-
*/
|
|
39170
|
-
function (moduleType, compilerOptions) {
|
|
38691
|
+
PlatformRef.prototype.bootstrapModule = function (moduleType, compilerOptions) {
|
|
39171
38692
|
var _this = this;
|
|
39172
38693
|
if (compilerOptions === void 0) { compilerOptions = []; }
|
|
39173
38694
|
var compilerFactory = this.injector.get(CompilerFactory);
|
|
@@ -39193,36 +38714,20 @@ var PlatformRef = /** @class */ (function () {
|
|
|
39193
38714
|
/**
|
|
39194
38715
|
* Register a listener to be called when the platform is disposed.
|
|
39195
38716
|
*/
|
|
39196
|
-
|
|
39197
|
-
* Register a listener to be called when the platform is disposed.
|
|
39198
|
-
*/
|
|
39199
|
-
PlatformRef.prototype.onDestroy = /**
|
|
39200
|
-
* Register a listener to be called when the platform is disposed.
|
|
39201
|
-
*/
|
|
39202
|
-
function (callback) { this._destroyListeners.push(callback); };
|
|
38717
|
+
PlatformRef.prototype.onDestroy = function (callback) { this._destroyListeners.push(callback); };
|
|
39203
38718
|
Object.defineProperty(PlatformRef.prototype, "injector", {
|
|
39204
38719
|
/**
|
|
39205
38720
|
* Retrieve the platform {@link Injector}, which is the parent injector for
|
|
39206
38721
|
* every Angular application on the page and provides singleton providers.
|
|
39207
38722
|
*/
|
|
39208
|
-
get:
|
|
39209
|
-
* Retrieve the platform {@link Injector}, which is the parent injector for
|
|
39210
|
-
* every Angular application on the page and provides singleton providers.
|
|
39211
|
-
*/
|
|
39212
|
-
function () { return this._injector; },
|
|
38723
|
+
get: function () { return this._injector; },
|
|
39213
38724
|
enumerable: true,
|
|
39214
38725
|
configurable: true
|
|
39215
38726
|
});
|
|
39216
38727
|
/**
|
|
39217
38728
|
* Destroy the Angular platform and all Angular applications on the page.
|
|
39218
38729
|
*/
|
|
39219
|
-
|
|
39220
|
-
* Destroy the Angular platform and all Angular applications on the page.
|
|
39221
|
-
*/
|
|
39222
|
-
PlatformRef.prototype.destroy = /**
|
|
39223
|
-
* Destroy the Angular platform and all Angular applications on the page.
|
|
39224
|
-
*/
|
|
39225
|
-
function () {
|
|
38730
|
+
PlatformRef.prototype.destroy = function () {
|
|
39226
38731
|
if (this._destroyed) {
|
|
39227
38732
|
throw new Error('The platform has already been destroyed!');
|
|
39228
38733
|
}
|
|
@@ -39240,7 +38745,7 @@ var PlatformRef = /** @class */ (function () {
|
|
|
39240
38745
|
];
|
|
39241
38746
|
/** @nocollapse */
|
|
39242
38747
|
PlatformRef.ctorParameters = function () { return [
|
|
39243
|
-
{ type: Injector
|
|
38748
|
+
{ type: Injector }
|
|
39244
38749
|
]; };
|
|
39245
38750
|
return PlatformRef;
|
|
39246
38751
|
}());
|
|
@@ -39284,8 +38789,6 @@ function optionsReducer(dst, objs) {
|
|
|
39284
38789
|
}
|
|
39285
38790
|
/**
|
|
39286
38791
|
* A reference to an Angular application running on a page.
|
|
39287
|
-
*
|
|
39288
|
-
*
|
|
39289
38792
|
*/
|
|
39290
38793
|
var ApplicationRef = /** @class */ (function () {
|
|
39291
38794
|
/** @internal */
|
|
@@ -39303,13 +38806,13 @@ var ApplicationRef = /** @class */ (function () {
|
|
|
39303
38806
|
this._enforceNoNewChanges = false;
|
|
39304
38807
|
this._stable = true;
|
|
39305
38808
|
/**
|
|
39306
|
-
|
|
39307
|
-
|
|
39308
|
-
|
|
38809
|
+
* Get a list of component types registered to this application.
|
|
38810
|
+
* This list is populated even before the component is created.
|
|
38811
|
+
*/
|
|
39309
38812
|
this.componentTypes = [];
|
|
39310
38813
|
/**
|
|
39311
|
-
|
|
39312
|
-
|
|
38814
|
+
* Get a list of components registered to this application.
|
|
38815
|
+
*/
|
|
39313
38816
|
this.components = [];
|
|
39314
38817
|
this._enforceNoNewChanges = isDevMode();
|
|
39315
38818
|
this._zone.onMicrotaskEmpty.subscribe({ next: function () { _this._zone.run(function () { _this.tick(); }); } });
|
|
@@ -39357,49 +38860,20 @@ var ApplicationRef = /** @class */ (function () {
|
|
|
39357
38860
|
/**
|
|
39358
38861
|
* Bootstrap a new component at the root level of the application.
|
|
39359
38862
|
*
|
|
38863
|
+
* @usageNotes
|
|
39360
38864
|
* ### Bootstrap process
|
|
39361
38865
|
*
|
|
39362
38866
|
* When bootstrapping a new root component into an application, Angular mounts the
|
|
39363
|
-
* specified application component onto DOM elements identified by the
|
|
38867
|
+
* specified application component onto DOM elements identified by the componentType's
|
|
39364
38868
|
* selector and kicks off automatic change detection to finish initializing the component.
|
|
39365
38869
|
*
|
|
39366
38870
|
* Optionally, a component can be mounted onto a DOM element that does not match the
|
|
39367
|
-
*
|
|
38871
|
+
* componentType's selector.
|
|
39368
38872
|
*
|
|
39369
38873
|
* ### Example
|
|
39370
38874
|
* {@example core/ts/platform/platform.ts region='longform'}
|
|
39371
38875
|
*/
|
|
39372
|
-
|
|
39373
|
-
* Bootstrap a new component at the root level of the application.
|
|
39374
|
-
*
|
|
39375
|
-
* ### Bootstrap process
|
|
39376
|
-
*
|
|
39377
|
-
* When bootstrapping a new root component into an application, Angular mounts the
|
|
39378
|
-
* specified application component onto DOM elements identified by the [componentType]'s
|
|
39379
|
-
* selector and kicks off automatic change detection to finish initializing the component.
|
|
39380
|
-
*
|
|
39381
|
-
* Optionally, a component can be mounted onto a DOM element that does not match the
|
|
39382
|
-
* [componentType]'s selector.
|
|
39383
|
-
*
|
|
39384
|
-
* ### Example
|
|
39385
|
-
* {@example core/ts/platform/platform.ts region='longform'}
|
|
39386
|
-
*/
|
|
39387
|
-
ApplicationRef.prototype.bootstrap = /**
|
|
39388
|
-
* Bootstrap a new component at the root level of the application.
|
|
39389
|
-
*
|
|
39390
|
-
* ### Bootstrap process
|
|
39391
|
-
*
|
|
39392
|
-
* When bootstrapping a new root component into an application, Angular mounts the
|
|
39393
|
-
* specified application component onto DOM elements identified by the [componentType]'s
|
|
39394
|
-
* selector and kicks off automatic change detection to finish initializing the component.
|
|
39395
|
-
*
|
|
39396
|
-
* Optionally, a component can be mounted onto a DOM element that does not match the
|
|
39397
|
-
* [componentType]'s selector.
|
|
39398
|
-
*
|
|
39399
|
-
* ### Example
|
|
39400
|
-
* {@example core/ts/platform/platform.ts region='longform'}
|
|
39401
|
-
*/
|
|
39402
|
-
function (componentOrFactory, rootSelectorOrNode) {
|
|
38876
|
+
ApplicationRef.prototype.bootstrap = function (componentOrFactory, rootSelectorOrNode) {
|
|
39403
38877
|
var _this = this;
|
|
39404
38878
|
if (!this._initStatus.done) {
|
|
39405
38879
|
throw new Error('Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.');
|
|
@@ -39410,7 +38884,7 @@ var ApplicationRef = /** @class */ (function () {
|
|
|
39410
38884
|
}
|
|
39411
38885
|
else {
|
|
39412
38886
|
componentFactory =
|
|
39413
|
-
|
|
38887
|
+
this._componentFactoryResolver.resolveComponentFactory(componentOrFactory);
|
|
39414
38888
|
}
|
|
39415
38889
|
this.componentTypes.push(componentFactory.componentType);
|
|
39416
38890
|
// Create a factory associated with the current module if it's not bound to some other
|
|
@@ -39441,27 +38915,7 @@ var ApplicationRef = /** @class */ (function () {
|
|
|
39441
38915
|
* In this case, Angular throws an error, since an Angular application can only have one change
|
|
39442
38916
|
* detection pass during which all change detection must complete.
|
|
39443
38917
|
*/
|
|
39444
|
-
|
|
39445
|
-
* Invoke this method to explicitly process change detection and its side-effects.
|
|
39446
|
-
*
|
|
39447
|
-
* In development mode, `tick()` also performs a second change detection cycle to ensure that no
|
|
39448
|
-
* further changes are detected. If additional changes are picked up during this second cycle,
|
|
39449
|
-
* bindings in the app have side-effects that cannot be resolved in a single change detection
|
|
39450
|
-
* pass.
|
|
39451
|
-
* In this case, Angular throws an error, since an Angular application can only have one change
|
|
39452
|
-
* detection pass during which all change detection must complete.
|
|
39453
|
-
*/
|
|
39454
|
-
ApplicationRef.prototype.tick = /**
|
|
39455
|
-
* Invoke this method to explicitly process change detection and its side-effects.
|
|
39456
|
-
*
|
|
39457
|
-
* In development mode, `tick()` also performs a second change detection cycle to ensure that no
|
|
39458
|
-
* further changes are detected. If additional changes are picked up during this second cycle,
|
|
39459
|
-
* bindings in the app have side-effects that cannot be resolved in a single change detection
|
|
39460
|
-
* pass.
|
|
39461
|
-
* In this case, Angular throws an error, since an Angular application can only have one change
|
|
39462
|
-
* detection pass during which all change detection must complete.
|
|
39463
|
-
*/
|
|
39464
|
-
function () {
|
|
38918
|
+
ApplicationRef.prototype.tick = function () {
|
|
39465
38919
|
var _this = this;
|
|
39466
38920
|
if (this._runningTick) {
|
|
39467
38921
|
throw new Error('ApplicationRef.tick is called recursively');
|
|
@@ -39488,17 +38942,7 @@ var ApplicationRef = /** @class */ (function () {
|
|
|
39488
38942
|
* The view will be automatically detached when it is destroyed.
|
|
39489
38943
|
* This will throw if the view is already attached to a ViewContainer.
|
|
39490
38944
|
*/
|
|
39491
|
-
|
|
39492
|
-
* Attaches a view so that it will be dirty checked.
|
|
39493
|
-
* The view will be automatically detached when it is destroyed.
|
|
39494
|
-
* This will throw if the view is already attached to a ViewContainer.
|
|
39495
|
-
*/
|
|
39496
|
-
ApplicationRef.prototype.attachView = /**
|
|
39497
|
-
* Attaches a view so that it will be dirty checked.
|
|
39498
|
-
* The view will be automatically detached when it is destroyed.
|
|
39499
|
-
* This will throw if the view is already attached to a ViewContainer.
|
|
39500
|
-
*/
|
|
39501
|
-
function (viewRef) {
|
|
38945
|
+
ApplicationRef.prototype.attachView = function (viewRef) {
|
|
39502
38946
|
var view = viewRef;
|
|
39503
38947
|
this._views.push(view);
|
|
39504
38948
|
view.attachToAppRef(this);
|
|
@@ -39506,13 +38950,7 @@ var ApplicationRef = /** @class */ (function () {
|
|
|
39506
38950
|
/**
|
|
39507
38951
|
* Detaches a view from dirty checking again.
|
|
39508
38952
|
*/
|
|
39509
|
-
|
|
39510
|
-
* Detaches a view from dirty checking again.
|
|
39511
|
-
*/
|
|
39512
|
-
ApplicationRef.prototype.detachView = /**
|
|
39513
|
-
* Detaches a view from dirty checking again.
|
|
39514
|
-
*/
|
|
39515
|
-
function (viewRef) {
|
|
38953
|
+
ApplicationRef.prototype.detachView = function (viewRef) {
|
|
39516
38954
|
var view = viewRef;
|
|
39517
38955
|
remove(this._views, view);
|
|
39518
38956
|
view.detachFromAppRef();
|
|
@@ -39530,9 +38968,7 @@ var ApplicationRef = /** @class */ (function () {
|
|
|
39530
38968
|
remove(this.components, componentRef);
|
|
39531
38969
|
};
|
|
39532
38970
|
/** @internal */
|
|
39533
|
-
|
|
39534
|
-
ApplicationRef.prototype.ngOnDestroy = /** @internal */
|
|
39535
|
-
function () {
|
|
38971
|
+
ApplicationRef.prototype.ngOnDestroy = function () {
|
|
39536
38972
|
// TODO(alxhub): Dispose of the NgZone.
|
|
39537
38973
|
this._views.slice().forEach(function (view) { return view.destroy(); });
|
|
39538
38974
|
};
|
|
@@ -39540,10 +38976,7 @@ var ApplicationRef = /** @class */ (function () {
|
|
|
39540
38976
|
/**
|
|
39541
38977
|
* Returns the number of attached views.
|
|
39542
38978
|
*/
|
|
39543
|
-
get:
|
|
39544
|
-
* Returns the number of attached views.
|
|
39545
|
-
*/
|
|
39546
|
-
function () { return this._views.length; },
|
|
38979
|
+
get: function () { return this._views.length; },
|
|
39547
38980
|
enumerable: true,
|
|
39548
38981
|
configurable: true
|
|
39549
38982
|
});
|
|
@@ -39554,12 +38987,12 @@ var ApplicationRef = /** @class */ (function () {
|
|
|
39554
38987
|
];
|
|
39555
38988
|
/** @nocollapse */
|
|
39556
38989
|
ApplicationRef.ctorParameters = function () { return [
|
|
39557
|
-
{ type: NgZone
|
|
39558
|
-
{ type: Console
|
|
39559
|
-
{ type: Injector
|
|
39560
|
-
{ type: ErrorHandler
|
|
39561
|
-
{ type: ComponentFactoryResolver
|
|
39562
|
-
{ type: ApplicationInitStatus
|
|
38990
|
+
{ type: NgZone },
|
|
38991
|
+
{ type: Console },
|
|
38992
|
+
{ type: Injector },
|
|
38993
|
+
{ type: ErrorHandler },
|
|
38994
|
+
{ type: ComponentFactoryResolver },
|
|
38995
|
+
{ type: ApplicationInitStatus }
|
|
39563
38996
|
]; };
|
|
39564
38997
|
return ApplicationRef;
|
|
39565
38998
|
}());
|
|
@@ -39577,6 +39010,7 @@ function remove(list, el) {
|
|
|
39577
39010
|
* Use of this source code is governed by an MIT-style license that can be
|
|
39578
39011
|
* found in the LICENSE file at https://angular.io/license
|
|
39579
39012
|
*/
|
|
39013
|
+
// Public API for Zone
|
|
39580
39014
|
|
|
39581
39015
|
/**
|
|
39582
39016
|
* @license
|
|
@@ -39602,16 +39036,10 @@ var RendererFactory2 = /** @class */ (function () {
|
|
|
39602
39036
|
}
|
|
39603
39037
|
return RendererFactory2;
|
|
39604
39038
|
}());
|
|
39605
|
-
/**
|
|
39606
|
-
* @experimental
|
|
39607
|
-
*/
|
|
39608
39039
|
/**
|
|
39609
39040
|
* @experimental
|
|
39610
39041
|
*/
|
|
39611
39042
|
var RendererStyleFlags2;
|
|
39612
|
-
/**
|
|
39613
|
-
* @experimental
|
|
39614
|
-
*/
|
|
39615
39043
|
(function (RendererStyleFlags2) {
|
|
39616
39044
|
RendererStyleFlags2[RendererStyleFlags2["Important"] = 1] = "Important";
|
|
39617
39045
|
RendererStyleFlags2[RendererStyleFlags2["DashCase"] = 2] = "DashCase";
|
|
@@ -39632,6 +39060,7 @@ var Renderer2 = /** @class */ (function () {
|
|
|
39632
39060
|
* Use of this source code is governed by an MIT-style license that can be
|
|
39633
39061
|
* found in the LICENSE file at https://angular.io/license
|
|
39634
39062
|
*/
|
|
39063
|
+
// Public API for render
|
|
39635
39064
|
|
|
39636
39065
|
/**
|
|
39637
39066
|
* @license
|
|
@@ -39708,14 +39137,14 @@ var ElementRef = /** @class */ (function () {
|
|
|
39708
39137
|
*
|
|
39709
39138
|
* NOTE: In the future this class will implement an `Observable` interface.
|
|
39710
39139
|
*
|
|
39711
|
-
*
|
|
39140
|
+
* @usageNotes
|
|
39141
|
+
* ### Example
|
|
39712
39142
|
* ```typescript
|
|
39713
39143
|
* @Component({...})
|
|
39714
39144
|
* class Container {
|
|
39715
39145
|
* @ViewChildren(Item) items:QueryList<Item>;
|
|
39716
39146
|
* }
|
|
39717
39147
|
* ```
|
|
39718
|
-
*
|
|
39719
39148
|
*/
|
|
39720
39149
|
var QueryList = /** @class */ (function () {
|
|
39721
39150
|
function QueryList() {
|
|
@@ -39728,86 +39157,38 @@ var QueryList = /** @class */ (function () {
|
|
|
39728
39157
|
* See
|
|
39729
39158
|
* [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)
|
|
39730
39159
|
*/
|
|
39731
|
-
|
|
39732
|
-
* See
|
|
39733
|
-
* [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)
|
|
39734
|
-
*/
|
|
39735
|
-
QueryList.prototype.map = /**
|
|
39736
|
-
* See
|
|
39737
|
-
* [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)
|
|
39738
|
-
*/
|
|
39739
|
-
function (fn) { return this._results.map(fn); };
|
|
39160
|
+
QueryList.prototype.map = function (fn) { return this._results.map(fn); };
|
|
39740
39161
|
/**
|
|
39741
39162
|
* See
|
|
39742
39163
|
* [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)
|
|
39743
39164
|
*/
|
|
39744
|
-
|
|
39745
|
-
* See
|
|
39746
|
-
* [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)
|
|
39747
|
-
*/
|
|
39748
|
-
QueryList.prototype.filter = /**
|
|
39749
|
-
* See
|
|
39750
|
-
* [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)
|
|
39751
|
-
*/
|
|
39752
|
-
function (fn) {
|
|
39165
|
+
QueryList.prototype.filter = function (fn) {
|
|
39753
39166
|
return this._results.filter(fn);
|
|
39754
39167
|
};
|
|
39755
39168
|
/**
|
|
39756
39169
|
* See
|
|
39757
39170
|
* [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)
|
|
39758
39171
|
*/
|
|
39759
|
-
|
|
39760
|
-
* See
|
|
39761
|
-
* [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)
|
|
39762
|
-
*/
|
|
39763
|
-
QueryList.prototype.find = /**
|
|
39764
|
-
* See
|
|
39765
|
-
* [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)
|
|
39766
|
-
*/
|
|
39767
|
-
function (fn) {
|
|
39172
|
+
QueryList.prototype.find = function (fn) {
|
|
39768
39173
|
return this._results.find(fn);
|
|
39769
39174
|
};
|
|
39770
39175
|
/**
|
|
39771
39176
|
* See
|
|
39772
39177
|
* [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)
|
|
39773
39178
|
*/
|
|
39774
|
-
|
|
39775
|
-
* See
|
|
39776
|
-
* [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)
|
|
39777
|
-
*/
|
|
39778
|
-
QueryList.prototype.reduce = /**
|
|
39779
|
-
* See
|
|
39780
|
-
* [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)
|
|
39781
|
-
*/
|
|
39782
|
-
function (fn, init) {
|
|
39179
|
+
QueryList.prototype.reduce = function (fn, init) {
|
|
39783
39180
|
return this._results.reduce(fn, init);
|
|
39784
39181
|
};
|
|
39785
39182
|
/**
|
|
39786
39183
|
* See
|
|
39787
39184
|
* [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)
|
|
39788
39185
|
*/
|
|
39789
|
-
|
|
39790
|
-
* See
|
|
39791
|
-
* [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)
|
|
39792
|
-
*/
|
|
39793
|
-
QueryList.prototype.forEach = /**
|
|
39794
|
-
* See
|
|
39795
|
-
* [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)
|
|
39796
|
-
*/
|
|
39797
|
-
function (fn) { this._results.forEach(fn); };
|
|
39186
|
+
QueryList.prototype.forEach = function (fn) { this._results.forEach(fn); };
|
|
39798
39187
|
/**
|
|
39799
39188
|
* See
|
|
39800
39189
|
* [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)
|
|
39801
39190
|
*/
|
|
39802
|
-
|
|
39803
|
-
* See
|
|
39804
|
-
* [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)
|
|
39805
|
-
*/
|
|
39806
|
-
QueryList.prototype.some = /**
|
|
39807
|
-
* See
|
|
39808
|
-
* [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)
|
|
39809
|
-
*/
|
|
39810
|
-
function (fn) {
|
|
39191
|
+
QueryList.prototype.some = function (fn) {
|
|
39811
39192
|
return this._results.some(fn);
|
|
39812
39193
|
};
|
|
39813
39194
|
QueryList.prototype.toArray = function () { return this._results.slice(); };
|
|
@@ -39822,13 +39203,9 @@ var QueryList = /** @class */ (function () {
|
|
|
39822
39203
|
};
|
|
39823
39204
|
QueryList.prototype.notifyOnChanges = function () { this.changes.emit(this); };
|
|
39824
39205
|
/** internal */
|
|
39206
|
+
QueryList.prototype.setDirty = function () { this.dirty = true; };
|
|
39825
39207
|
/** internal */
|
|
39826
|
-
QueryList.prototype.
|
|
39827
|
-
function () { this.dirty = true; };
|
|
39828
|
-
/** internal */
|
|
39829
|
-
/** internal */
|
|
39830
|
-
QueryList.prototype.destroy = /** internal */
|
|
39831
|
-
function () {
|
|
39208
|
+
QueryList.prototype.destroy = function () {
|
|
39832
39209
|
this.changes.complete();
|
|
39833
39210
|
this.changes.unsubscribe();
|
|
39834
39211
|
};
|
|
@@ -39941,9 +39318,10 @@ var ViewRef = /** @class */ (function (_super) {
|
|
|
39941
39318
|
*
|
|
39942
39319
|
* Properties of elements in a View can change, but the structure (number and order) of elements in
|
|
39943
39320
|
* a View cannot. Changing the structure of Elements can only be done by inserting, moving or
|
|
39944
|
-
* removing nested Views via a
|
|
39321
|
+
* removing nested Views via a `ViewContainerRef`. Each View can contain many View Containers.
|
|
39945
39322
|
* <!-- /TODO -->
|
|
39946
39323
|
*
|
|
39324
|
+
* @usageNotes
|
|
39947
39325
|
* ### Example
|
|
39948
39326
|
*
|
|
39949
39327
|
* Given this template...
|
|
@@ -39955,9 +39333,10 @@ var ViewRef = /** @class */ (function (_super) {
|
|
|
39955
39333
|
* </ul>
|
|
39956
39334
|
* ```
|
|
39957
39335
|
*
|
|
39958
|
-
* We have two
|
|
39336
|
+
* We have two `TemplateRef`s:
|
|
39337
|
+
*
|
|
39338
|
+
* Outer `TemplateRef`:
|
|
39959
39339
|
*
|
|
39960
|
-
* Outer {@link TemplateRef}:
|
|
39961
39340
|
* ```
|
|
39962
39341
|
* Count: {{items.length}}
|
|
39963
39342
|
* <ul>
|
|
@@ -39965,14 +39344,15 @@ var ViewRef = /** @class */ (function (_super) {
|
|
|
39965
39344
|
* </ul>
|
|
39966
39345
|
* ```
|
|
39967
39346
|
*
|
|
39968
|
-
* Inner
|
|
39347
|
+
* Inner `TemplateRef`:
|
|
39348
|
+
*
|
|
39969
39349
|
* ```
|
|
39970
39350
|
* <li>{{item}}</li>
|
|
39971
39351
|
* ```
|
|
39972
39352
|
*
|
|
39973
|
-
* Notice that the original template is broken down into two separate
|
|
39353
|
+
* Notice that the original template is broken down into two separate `TemplateRef`s.
|
|
39974
39354
|
*
|
|
39975
|
-
* The outer/inner
|
|
39355
|
+
* The outer/inner `TemplateRef`s are then assembled into views like so:
|
|
39976
39356
|
*
|
|
39977
39357
|
* ```
|
|
39978
39358
|
* <!-- ViewRef: outer-0 -->
|
|
@@ -40001,6 +39381,7 @@ var EmbeddedViewRef = /** @class */ (function (_super) {
|
|
|
40001
39381
|
* Use of this source code is governed by an MIT-style license that can be
|
|
40002
39382
|
* found in the LICENSE file at https://angular.io/license
|
|
40003
39383
|
*/
|
|
39384
|
+
// Public API for compiler
|
|
40004
39385
|
|
|
40005
39386
|
/**
|
|
40006
39387
|
* @license
|
|
@@ -40233,26 +39614,14 @@ var WrappedValue = /** @class */ (function () {
|
|
|
40233
39614
|
this.wrapped = value;
|
|
40234
39615
|
}
|
|
40235
39616
|
/** Creates a wrapped value. */
|
|
40236
|
-
|
|
40237
|
-
WrappedValue.wrap = /** Creates a wrapped value. */
|
|
40238
|
-
function (value) { return new WrappedValue(value); };
|
|
39617
|
+
WrappedValue.wrap = function (value) { return new WrappedValue(value); };
|
|
40239
39618
|
/**
|
|
40240
39619
|
* Returns the underlying value of a wrapped value.
|
|
40241
39620
|
* Returns the given `value` when it is not wrapped.
|
|
40242
39621
|
**/
|
|
40243
|
-
|
|
40244
|
-
* Returns the underlying value of a wrapped value.
|
|
40245
|
-
* Returns the given `value` when it is not wrapped.
|
|
40246
|
-
**/
|
|
40247
|
-
WrappedValue.unwrap = /**
|
|
40248
|
-
* Returns the underlying value of a wrapped value.
|
|
40249
|
-
* Returns the given `value` when it is not wrapped.
|
|
40250
|
-
**/
|
|
40251
|
-
function (value) { return WrappedValue.isWrapped(value) ? value.wrapped : value; };
|
|
40252
|
-
/** Returns true if `value` is a wrapped value. */
|
|
39622
|
+
WrappedValue.unwrap = function (value) { return WrappedValue.isWrapped(value) ? value.wrapped : value; };
|
|
40253
39623
|
/** Returns true if `value` is a wrapped value. */
|
|
40254
|
-
WrappedValue.isWrapped =
|
|
40255
|
-
function (value) { return value instanceof WrappedValue; };
|
|
39624
|
+
WrappedValue.isWrapped = function (value) { return value instanceof WrappedValue; };
|
|
40256
39625
|
return WrappedValue;
|
|
40257
39626
|
}());
|
|
40258
39627
|
/**
|
|
@@ -40268,13 +39637,7 @@ var SimpleChange = /** @class */ (function () {
|
|
|
40268
39637
|
/**
|
|
40269
39638
|
* Check whether the new value is the first value assigned.
|
|
40270
39639
|
*/
|
|
40271
|
-
|
|
40272
|
-
* Check whether the new value is the first value assigned.
|
|
40273
|
-
*/
|
|
40274
|
-
SimpleChange.prototype.isFirstChange = /**
|
|
40275
|
-
* Check whether the new value is the first value assigned.
|
|
40276
|
-
*/
|
|
40277
|
-
function () { return this.firstChange; };
|
|
39640
|
+
SimpleChange.prototype.isFirstChange = function () { return this.firstChange; };
|
|
40278
39641
|
return SimpleChange;
|
|
40279
39642
|
}());
|
|
40280
39643
|
function isListLikeIterable(obj) {
|
|
@@ -40282,7 +39645,6 @@ function isListLikeIterable(obj) {
|
|
|
40282
39645
|
return false;
|
|
40283
39646
|
return Array.isArray(obj) ||
|
|
40284
39647
|
(!(obj instanceof Map) && // JS Map are iterables but return entries as [k, v]
|
|
40285
|
-
// JS Map are iterables but return entries as [k, v]
|
|
40286
39648
|
getSymbolIterator() in obj); // JS Iterable have a Symbol.iterator prop
|
|
40287
39649
|
}
|
|
40288
39650
|
function areIterablesEqual(a, b, comparator) {
|
|
@@ -40374,7 +39736,7 @@ var DefaultIterableDiffer = /** @class */ (function () {
|
|
|
40374
39736
|
// Order: remove, add, move
|
|
40375
39737
|
var record = !nextRemove ||
|
|
40376
39738
|
nextIt &&
|
|
40377
|
-
|
|
39739
|
+
nextIt.currentIndex <
|
|
40378
39740
|
getPreviousIndex(nextRemove, addRemoveOffset, moveOffsets) ?
|
|
40379
39741
|
nextIt :
|
|
40380
39742
|
nextRemove;
|
|
@@ -40395,7 +39757,7 @@ var DefaultIterableDiffer = /** @class */ (function () {
|
|
|
40395
39757
|
if (!moveOffsets)
|
|
40396
39758
|
moveOffsets = [];
|
|
40397
39759
|
var localMovePreviousIndex = adjPreviousIndex - addRemoveOffset;
|
|
40398
|
-
var localCurrentIndex =
|
|
39760
|
+
var localCurrentIndex = currentIndex - addRemoveOffset;
|
|
40399
39761
|
if (localMovePreviousIndex != localCurrentIndex) {
|
|
40400
39762
|
for (var i = 0; i < localMovePreviousIndex; i++) {
|
|
40401
39763
|
var offset = i < moveOffsets.length ? moveOffsets[i] : (moveOffsets[i] = 0);
|
|
@@ -40515,10 +39877,7 @@ var DefaultIterableDiffer = /** @class */ (function () {
|
|
|
40515
39877
|
/* CollectionChanges is considered dirty if it has any additions, moves, removals, or identity
|
|
40516
39878
|
* changes.
|
|
40517
39879
|
*/
|
|
40518
|
-
get:
|
|
40519
|
-
* changes.
|
|
40520
|
-
*/
|
|
40521
|
-
function () {
|
|
39880
|
+
get: function () {
|
|
40522
39881
|
return this._additionsHead !== null || this._movesHead !== null ||
|
|
40523
39882
|
this._removalsHead !== null || this._identityChangesHead !== null;
|
|
40524
39883
|
},
|
|
@@ -40533,23 +39892,7 @@ var DefaultIterableDiffer = /** @class */ (function () {
|
|
|
40533
39892
|
*
|
|
40534
39893
|
* @internal
|
|
40535
39894
|
*/
|
|
40536
|
-
|
|
40537
|
-
* Reset the state of the change objects to show no changes. This means set previousKey to
|
|
40538
|
-
* currentKey, and clear all of the queues (additions, moves, removals).
|
|
40539
|
-
* Set the previousIndexes of moved and added items to their currentIndexes
|
|
40540
|
-
* Reset the list of additions, moves and removals
|
|
40541
|
-
*
|
|
40542
|
-
* @internal
|
|
40543
|
-
*/
|
|
40544
|
-
DefaultIterableDiffer.prototype._reset = /**
|
|
40545
|
-
* Reset the state of the change objects to show no changes. This means set previousKey to
|
|
40546
|
-
* currentKey, and clear all of the queues (additions, moves, removals).
|
|
40547
|
-
* Set the previousIndexes of moved and added items to their currentIndexes
|
|
40548
|
-
* Reset the list of additions, moves and removals
|
|
40549
|
-
*
|
|
40550
|
-
* @internal
|
|
40551
|
-
*/
|
|
40552
|
-
function () {
|
|
39895
|
+
DefaultIterableDiffer.prototype._reset = function () {
|
|
40553
39896
|
if (this.isDirty) {
|
|
40554
39897
|
var record = void 0;
|
|
40555
39898
|
var nextRecord = void 0;
|
|
@@ -40581,27 +39924,7 @@ var DefaultIterableDiffer = /** @class */ (function () {
|
|
|
40581
39924
|
*
|
|
40582
39925
|
* @internal
|
|
40583
39926
|
*/
|
|
40584
|
-
|
|
40585
|
-
* This is the core function which handles differences between collections.
|
|
40586
|
-
*
|
|
40587
|
-
* - `record` is the record which we saw at this position last time. If null then it is a new
|
|
40588
|
-
* item.
|
|
40589
|
-
* - `item` is the current item in the collection
|
|
40590
|
-
* - `index` is the position of the item in the collection
|
|
40591
|
-
*
|
|
40592
|
-
* @internal
|
|
40593
|
-
*/
|
|
40594
|
-
DefaultIterableDiffer.prototype._mismatch = /**
|
|
40595
|
-
* This is the core function which handles differences between collections.
|
|
40596
|
-
*
|
|
40597
|
-
* - `record` is the record which we saw at this position last time. If null then it is a new
|
|
40598
|
-
* item.
|
|
40599
|
-
* - `item` is the current item in the collection
|
|
40600
|
-
* - `index` is the position of the item in the collection
|
|
40601
|
-
*
|
|
40602
|
-
* @internal
|
|
40603
|
-
*/
|
|
40604
|
-
function (record, item, itemTrackBy, index) {
|
|
39927
|
+
DefaultIterableDiffer.prototype._mismatch = function (record, item, itemTrackBy, index) {
|
|
40605
39928
|
// The previous record after which we will append the current one.
|
|
40606
39929
|
var previousRecord;
|
|
40607
39930
|
if (record === null) {
|
|
@@ -40666,64 +39989,10 @@ var DefaultIterableDiffer = /** @class */ (function () {
|
|
|
40666
39989
|
*
|
|
40667
39990
|
* @internal
|
|
40668
39991
|
*/
|
|
40669
|
-
|
|
40670
|
-
* This check is only needed if an array contains duplicates. (Short circuit of nothing dirty)
|
|
40671
|
-
*
|
|
40672
|
-
* Use case: `[a, a]` => `[b, a, a]`
|
|
40673
|
-
*
|
|
40674
|
-
* If we did not have this check then the insertion of `b` would:
|
|
40675
|
-
* 1) evict first `a`
|
|
40676
|
-
* 2) insert `b` at `0` index.
|
|
40677
|
-
* 3) leave `a` at index `1` as is. <-- this is wrong!
|
|
40678
|
-
* 3) reinsert `a` at index 2. <-- this is wrong!
|
|
40679
|
-
*
|
|
40680
|
-
* The correct behavior is:
|
|
40681
|
-
* 1) evict first `a`
|
|
40682
|
-
* 2) insert `b` at `0` index.
|
|
40683
|
-
* 3) reinsert `a` at index 1.
|
|
40684
|
-
* 3) move `a` at from `1` to `2`.
|
|
40685
|
-
*
|
|
40686
|
-
*
|
|
40687
|
-
* Double check that we have not evicted a duplicate item. We need to check if the item type may
|
|
40688
|
-
* have already been removed:
|
|
40689
|
-
* The insertion of b will evict the first 'a'. If we don't reinsert it now it will be reinserted
|
|
40690
|
-
* at the end. Which will show up as the two 'a's switching position. This is incorrect, since a
|
|
40691
|
-
* better way to think of it is as insert of 'b' rather then switch 'a' with 'b' and then add 'a'
|
|
40692
|
-
* at the end.
|
|
40693
|
-
*
|
|
40694
|
-
* @internal
|
|
40695
|
-
*/
|
|
40696
|
-
DefaultIterableDiffer.prototype._verifyReinsertion = /**
|
|
40697
|
-
* This check is only needed if an array contains duplicates. (Short circuit of nothing dirty)
|
|
40698
|
-
*
|
|
40699
|
-
* Use case: `[a, a]` => `[b, a, a]`
|
|
40700
|
-
*
|
|
40701
|
-
* If we did not have this check then the insertion of `b` would:
|
|
40702
|
-
* 1) evict first `a`
|
|
40703
|
-
* 2) insert `b` at `0` index.
|
|
40704
|
-
* 3) leave `a` at index `1` as is. <-- this is wrong!
|
|
40705
|
-
* 3) reinsert `a` at index 2. <-- this is wrong!
|
|
40706
|
-
*
|
|
40707
|
-
* The correct behavior is:
|
|
40708
|
-
* 1) evict first `a`
|
|
40709
|
-
* 2) insert `b` at `0` index.
|
|
40710
|
-
* 3) reinsert `a` at index 1.
|
|
40711
|
-
* 3) move `a` at from `1` to `2`.
|
|
40712
|
-
*
|
|
40713
|
-
*
|
|
40714
|
-
* Double check that we have not evicted a duplicate item. We need to check if the item type may
|
|
40715
|
-
* have already been removed:
|
|
40716
|
-
* The insertion of b will evict the first 'a'. If we don't reinsert it now it will be reinserted
|
|
40717
|
-
* at the end. Which will show up as the two 'a's switching position. This is incorrect, since a
|
|
40718
|
-
* better way to think of it is as insert of 'b' rather then switch 'a' with 'b' and then add 'a'
|
|
40719
|
-
* at the end.
|
|
40720
|
-
*
|
|
40721
|
-
* @internal
|
|
40722
|
-
*/
|
|
40723
|
-
function (record, item, itemTrackBy, index) {
|
|
39992
|
+
DefaultIterableDiffer.prototype._verifyReinsertion = function (record, item, itemTrackBy, index) {
|
|
40724
39993
|
var reinsertRecord = this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);
|
|
40725
39994
|
if (reinsertRecord !== null) {
|
|
40726
|
-
record = this._reinsertAfter(reinsertRecord,
|
|
39995
|
+
record = this._reinsertAfter(reinsertRecord, record._prev, index);
|
|
40727
39996
|
}
|
|
40728
39997
|
else if (record.currentIndex != index) {
|
|
40729
39998
|
record.currentIndex = index;
|
|
@@ -40738,21 +40007,7 @@ var DefaultIterableDiffer = /** @class */ (function () {
|
|
|
40738
40007
|
*
|
|
40739
40008
|
* @internal
|
|
40740
40009
|
*/
|
|
40741
|
-
|
|
40742
|
-
* Get rid of any excess {@link IterableChangeRecord_}s from the previous collection
|
|
40743
|
-
*
|
|
40744
|
-
* - `record` The first excess {@link IterableChangeRecord_}.
|
|
40745
|
-
*
|
|
40746
|
-
* @internal
|
|
40747
|
-
*/
|
|
40748
|
-
DefaultIterableDiffer.prototype._truncate = /**
|
|
40749
|
-
* Get rid of any excess {@link IterableChangeRecord_}s from the previous collection
|
|
40750
|
-
*
|
|
40751
|
-
* - `record` The first excess {@link IterableChangeRecord_}.
|
|
40752
|
-
*
|
|
40753
|
-
* @internal
|
|
40754
|
-
*/
|
|
40755
|
-
function (record) {
|
|
40010
|
+
DefaultIterableDiffer.prototype._truncate = function (record) {
|
|
40756
40011
|
// Anything after that needs to be removed;
|
|
40757
40012
|
while (record !== null) {
|
|
40758
40013
|
var nextRecord = record._next;
|
|
@@ -40779,9 +40034,7 @@ var DefaultIterableDiffer = /** @class */ (function () {
|
|
|
40779
40034
|
}
|
|
40780
40035
|
};
|
|
40781
40036
|
/** @internal */
|
|
40782
|
-
|
|
40783
|
-
DefaultIterableDiffer.prototype._reinsertAfter = /** @internal */
|
|
40784
|
-
function (record, prevRecord, index) {
|
|
40037
|
+
DefaultIterableDiffer.prototype._reinsertAfter = function (record, prevRecord, index) {
|
|
40785
40038
|
if (this._unlinkedRecords !== null) {
|
|
40786
40039
|
this._unlinkedRecords.remove(record);
|
|
40787
40040
|
}
|
|
@@ -40804,18 +40057,14 @@ var DefaultIterableDiffer = /** @class */ (function () {
|
|
|
40804
40057
|
return record;
|
|
40805
40058
|
};
|
|
40806
40059
|
/** @internal */
|
|
40807
|
-
|
|
40808
|
-
DefaultIterableDiffer.prototype._moveAfter = /** @internal */
|
|
40809
|
-
function (record, prevRecord, index) {
|
|
40060
|
+
DefaultIterableDiffer.prototype._moveAfter = function (record, prevRecord, index) {
|
|
40810
40061
|
this._unlink(record);
|
|
40811
40062
|
this._insertAfter(record, prevRecord, index);
|
|
40812
40063
|
this._addToMoves(record, index);
|
|
40813
40064
|
return record;
|
|
40814
40065
|
};
|
|
40815
40066
|
/** @internal */
|
|
40816
|
-
|
|
40817
|
-
DefaultIterableDiffer.prototype._addAfter = /** @internal */
|
|
40818
|
-
function (record, prevRecord, index) {
|
|
40067
|
+
DefaultIterableDiffer.prototype._addAfter = function (record, prevRecord, index) {
|
|
40819
40068
|
this._insertAfter(record, prevRecord, index);
|
|
40820
40069
|
if (this._additionsTail === null) {
|
|
40821
40070
|
// TODO(vicb):
|
|
@@ -40831,9 +40080,7 @@ var DefaultIterableDiffer = /** @class */ (function () {
|
|
|
40831
40080
|
return record;
|
|
40832
40081
|
};
|
|
40833
40082
|
/** @internal */
|
|
40834
|
-
|
|
40835
|
-
DefaultIterableDiffer.prototype._insertAfter = /** @internal */
|
|
40836
|
-
function (record, prevRecord, index) {
|
|
40083
|
+
DefaultIterableDiffer.prototype._insertAfter = function (record, prevRecord, index) {
|
|
40837
40084
|
// TODO(vicb):
|
|
40838
40085
|
// assert(record != prevRecord);
|
|
40839
40086
|
// assert(record._next === null);
|
|
@@ -40864,15 +40111,11 @@ var DefaultIterableDiffer = /** @class */ (function () {
|
|
|
40864
40111
|
return record;
|
|
40865
40112
|
};
|
|
40866
40113
|
/** @internal */
|
|
40867
|
-
|
|
40868
|
-
DefaultIterableDiffer.prototype._remove = /** @internal */
|
|
40869
|
-
function (record) {
|
|
40114
|
+
DefaultIterableDiffer.prototype._remove = function (record) {
|
|
40870
40115
|
return this._addToRemovals(this._unlink(record));
|
|
40871
40116
|
};
|
|
40872
40117
|
/** @internal */
|
|
40873
|
-
|
|
40874
|
-
DefaultIterableDiffer.prototype._unlink = /** @internal */
|
|
40875
|
-
function (record) {
|
|
40118
|
+
DefaultIterableDiffer.prototype._unlink = function (record) {
|
|
40876
40119
|
if (this._linkedRecords !== null) {
|
|
40877
40120
|
this._linkedRecords.remove(record);
|
|
40878
40121
|
}
|
|
@@ -40896,9 +40139,7 @@ var DefaultIterableDiffer = /** @class */ (function () {
|
|
|
40896
40139
|
return record;
|
|
40897
40140
|
};
|
|
40898
40141
|
/** @internal */
|
|
40899
|
-
|
|
40900
|
-
DefaultIterableDiffer.prototype._addToMoves = /** @internal */
|
|
40901
|
-
function (record, toIndex) {
|
|
40142
|
+
DefaultIterableDiffer.prototype._addToMoves = function (record, toIndex) {
|
|
40902
40143
|
// TODO(vicb):
|
|
40903
40144
|
// assert(record._nextMoved === null);
|
|
40904
40145
|
if (record.previousIndex === toIndex) {
|
|
@@ -40939,9 +40180,7 @@ var DefaultIterableDiffer = /** @class */ (function () {
|
|
|
40939
40180
|
return record;
|
|
40940
40181
|
};
|
|
40941
40182
|
/** @internal */
|
|
40942
|
-
|
|
40943
|
-
DefaultIterableDiffer.prototype._addIdentityChange = /** @internal */
|
|
40944
|
-
function (record, item) {
|
|
40183
|
+
DefaultIterableDiffer.prototype._addIdentityChange = function (record, item) {
|
|
40945
40184
|
record.item = item;
|
|
40946
40185
|
if (this._identityChangesTail === null) {
|
|
40947
40186
|
this._identityChangesTail = this._identityChangesHead = record;
|
|
@@ -40995,26 +40234,13 @@ var _DuplicateItemRecordList = /** @class */ (function () {
|
|
|
40995
40234
|
*
|
|
40996
40235
|
* Note: by design all records in the list of duplicates hold the same value in record.item.
|
|
40997
40236
|
*/
|
|
40998
|
-
|
|
40999
|
-
* Append the record to the list of duplicates.
|
|
41000
|
-
*
|
|
41001
|
-
* Note: by design all records in the list of duplicates hold the same value in record.item.
|
|
41002
|
-
*/
|
|
41003
|
-
_DuplicateItemRecordList.prototype.add = /**
|
|
41004
|
-
* Append the record to the list of duplicates.
|
|
41005
|
-
*
|
|
41006
|
-
* Note: by design all records in the list of duplicates hold the same value in record.item.
|
|
41007
|
-
*/
|
|
41008
|
-
function (record) {
|
|
40237
|
+
_DuplicateItemRecordList.prototype.add = function (record) {
|
|
41009
40238
|
if (this._head === null) {
|
|
41010
40239
|
this._head = this._tail = record;
|
|
41011
40240
|
record._nextDup = null;
|
|
41012
40241
|
record._prevDup = null;
|
|
41013
40242
|
}
|
|
41014
40243
|
else {
|
|
41015
|
-
// TODO(vicb):
|
|
41016
|
-
// assert(record.item == _head.item ||
|
|
41017
|
-
// record.item is num && record.item.isNaN && _head.item is num && _head.item.isNaN);
|
|
41018
40244
|
// TODO(vicb):
|
|
41019
40245
|
// assert(record.item == _head.item ||
|
|
41020
40246
|
// record.item is num && record.item.isNaN && _head.item is num && _head.item.isNaN);
|
|
@@ -41026,15 +40252,10 @@ var _DuplicateItemRecordList = /** @class */ (function () {
|
|
|
41026
40252
|
};
|
|
41027
40253
|
// Returns a IterableChangeRecord_ having IterableChangeRecord_.trackById == trackById and
|
|
41028
40254
|
// IterableChangeRecord_.currentIndex >= atOrAfterIndex
|
|
41029
|
-
|
|
41030
|
-
// IterableChangeRecord_.currentIndex >= atOrAfterIndex
|
|
41031
|
-
_DuplicateItemRecordList.prototype.get =
|
|
41032
|
-
// Returns a IterableChangeRecord_ having IterableChangeRecord_.trackById == trackById and
|
|
41033
|
-
// IterableChangeRecord_.currentIndex >= atOrAfterIndex
|
|
41034
|
-
function (trackById, atOrAfterIndex) {
|
|
40255
|
+
_DuplicateItemRecordList.prototype.get = function (trackById, atOrAfterIndex) {
|
|
41035
40256
|
var record;
|
|
41036
40257
|
for (record = this._head; record !== null; record = record._nextDup) {
|
|
41037
|
-
if ((atOrAfterIndex === null || atOrAfterIndex <=
|
|
40258
|
+
if ((atOrAfterIndex === null || atOrAfterIndex <= record.currentIndex) &&
|
|
41038
40259
|
looseIdentical(record.trackById, trackById)) {
|
|
41039
40260
|
return record;
|
|
41040
40261
|
}
|
|
@@ -41046,17 +40267,7 @@ var _DuplicateItemRecordList = /** @class */ (function () {
|
|
|
41046
40267
|
*
|
|
41047
40268
|
* Returns whether the list of duplicates is empty.
|
|
41048
40269
|
*/
|
|
41049
|
-
|
|
41050
|
-
* Remove one {@link IterableChangeRecord_} from the list of duplicates.
|
|
41051
|
-
*
|
|
41052
|
-
* Returns whether the list of duplicates is empty.
|
|
41053
|
-
*/
|
|
41054
|
-
_DuplicateItemRecordList.prototype.remove = /**
|
|
41055
|
-
* Remove one {@link IterableChangeRecord_} from the list of duplicates.
|
|
41056
|
-
*
|
|
41057
|
-
* Returns whether the list of duplicates is empty.
|
|
41058
|
-
*/
|
|
41059
|
-
function (record) {
|
|
40270
|
+
_DuplicateItemRecordList.prototype.remove = function (record) {
|
|
41060
40271
|
// TODO(vicb):
|
|
41061
40272
|
// assert(() {
|
|
41062
40273
|
// // verify that the record being removed is in the list.
|
|
@@ -41103,21 +40314,7 @@ var _DuplicateMap = /** @class */ (function () {
|
|
|
41103
40314
|
* Use case: `[a, b, c, a, a]` if we are at index `3` which is the second `a` then asking if we
|
|
41104
40315
|
* have any more `a`s needs to return the second `a`.
|
|
41105
40316
|
*/
|
|
41106
|
-
|
|
41107
|
-
* Retrieve the `value` using key. Because the IterableChangeRecord_ value may be one which we
|
|
41108
|
-
* have already iterated over, we use the `atOrAfterIndex` to pretend it is not there.
|
|
41109
|
-
*
|
|
41110
|
-
* Use case: `[a, b, c, a, a]` if we are at index `3` which is the second `a` then asking if we
|
|
41111
|
-
* have any more `a`s needs to return the second `a`.
|
|
41112
|
-
*/
|
|
41113
|
-
_DuplicateMap.prototype.get = /**
|
|
41114
|
-
* Retrieve the `value` using key. Because the IterableChangeRecord_ value may be one which we
|
|
41115
|
-
* have already iterated over, we use the `atOrAfterIndex` to pretend it is not there.
|
|
41116
|
-
*
|
|
41117
|
-
* Use case: `[a, b, c, a, a]` if we are at index `3` which is the second `a` then asking if we
|
|
41118
|
-
* have any more `a`s needs to return the second `a`.
|
|
41119
|
-
*/
|
|
41120
|
-
function (trackById, atOrAfterIndex) {
|
|
40317
|
+
_DuplicateMap.prototype.get = function (trackById, atOrAfterIndex) {
|
|
41121
40318
|
var key = trackById;
|
|
41122
40319
|
var recordList = this.map.get(key);
|
|
41123
40320
|
return recordList ? recordList.get(trackById, atOrAfterIndex) : null;
|
|
@@ -41127,19 +40324,9 @@ var _DuplicateMap = /** @class */ (function () {
|
|
|
41127
40324
|
*
|
|
41128
40325
|
* The list of duplicates also is removed from the map if it gets empty.
|
|
41129
40326
|
*/
|
|
41130
|
-
|
|
41131
|
-
* Removes a {@link IterableChangeRecord_} from the list of duplicates.
|
|
41132
|
-
*
|
|
41133
|
-
* The list of duplicates also is removed from the map if it gets empty.
|
|
41134
|
-
*/
|
|
41135
|
-
_DuplicateMap.prototype.remove = /**
|
|
41136
|
-
* Removes a {@link IterableChangeRecord_} from the list of duplicates.
|
|
41137
|
-
*
|
|
41138
|
-
* The list of duplicates also is removed from the map if it gets empty.
|
|
41139
|
-
*/
|
|
41140
|
-
function (record) {
|
|
40327
|
+
_DuplicateMap.prototype.remove = function (record) {
|
|
41141
40328
|
var key = record.trackById;
|
|
41142
|
-
var recordList =
|
|
40329
|
+
var recordList = this.map.get(key);
|
|
41143
40330
|
// Remove the list of duplicates when it gets empty
|
|
41144
40331
|
if (recordList.remove(record)) {
|
|
41145
40332
|
this.map.delete(key);
|
|
@@ -41245,15 +40432,7 @@ var DefaultKeyValueDiffer = /** @class */ (function () {
|
|
|
41245
40432
|
* Check the current state of the map vs the previous.
|
|
41246
40433
|
* The algorithm is optimised for when the keys do no change.
|
|
41247
40434
|
*/
|
|
41248
|
-
|
|
41249
|
-
* Check the current state of the map vs the previous.
|
|
41250
|
-
* The algorithm is optimised for when the keys do no change.
|
|
41251
|
-
*/
|
|
41252
|
-
DefaultKeyValueDiffer.prototype.check = /**
|
|
41253
|
-
* Check the current state of the map vs the previous.
|
|
41254
|
-
* The algorithm is optimised for when the keys do no change.
|
|
41255
|
-
*/
|
|
41256
|
-
function (map) {
|
|
40435
|
+
DefaultKeyValueDiffer.prototype.check = function (map) {
|
|
41257
40436
|
var _this = this;
|
|
41258
40437
|
this._reset();
|
|
41259
40438
|
var insertBefore = this._mapHead;
|
|
@@ -41302,23 +40481,7 @@ var DefaultKeyValueDiffer = /** @class */ (function () {
|
|
|
41302
40481
|
* - This method updates `this._appendAfter`,
|
|
41303
40482
|
* - The return value is the new value for the insertion pointer.
|
|
41304
40483
|
*/
|
|
41305
|
-
|
|
41306
|
-
* Inserts a record before `before` or append at the end of the list when `before` is null.
|
|
41307
|
-
*
|
|
41308
|
-
* Notes:
|
|
41309
|
-
* - This method appends at `this._appendAfter`,
|
|
41310
|
-
* - This method updates `this._appendAfter`,
|
|
41311
|
-
* - The return value is the new value for the insertion pointer.
|
|
41312
|
-
*/
|
|
41313
|
-
DefaultKeyValueDiffer.prototype._insertBeforeOrAppend = /**
|
|
41314
|
-
* Inserts a record before `before` or append at the end of the list when `before` is null.
|
|
41315
|
-
*
|
|
41316
|
-
* Notes:
|
|
41317
|
-
* - This method appends at `this._appendAfter`,
|
|
41318
|
-
* - This method updates `this._appendAfter`,
|
|
41319
|
-
* - The return value is the new value for the insertion pointer.
|
|
41320
|
-
*/
|
|
41321
|
-
function (before, record) {
|
|
40484
|
+
DefaultKeyValueDiffer.prototype._insertBeforeOrAppend = function (before, record) {
|
|
41322
40485
|
if (before) {
|
|
41323
40486
|
var prev = before._prev;
|
|
41324
40487
|
record._next = before;
|
|
@@ -41345,7 +40508,7 @@ var DefaultKeyValueDiffer = /** @class */ (function () {
|
|
|
41345
40508
|
};
|
|
41346
40509
|
DefaultKeyValueDiffer.prototype._getOrCreateRecordForKey = function (key, value) {
|
|
41347
40510
|
if (this._records.has(key)) {
|
|
41348
|
-
var record_1 =
|
|
40511
|
+
var record_1 = this._records.get(key);
|
|
41349
40512
|
this._maybeAddToChanges(record_1, value);
|
|
41350
40513
|
var prev = record_1._prev;
|
|
41351
40514
|
var next = record_1._next;
|
|
@@ -41366,9 +40529,7 @@ var DefaultKeyValueDiffer = /** @class */ (function () {
|
|
|
41366
40529
|
return record;
|
|
41367
40530
|
};
|
|
41368
40531
|
/** @internal */
|
|
41369
|
-
|
|
41370
|
-
DefaultKeyValueDiffer.prototype._reset = /** @internal */
|
|
41371
|
-
function () {
|
|
40532
|
+
DefaultKeyValueDiffer.prototype._reset = function () {
|
|
41372
40533
|
if (this.isDirty) {
|
|
41373
40534
|
var record = void 0;
|
|
41374
40535
|
// let `_previousMapHead` contain the state of the map before the changes
|
|
@@ -41390,10 +40551,7 @@ var DefaultKeyValueDiffer = /** @class */ (function () {
|
|
|
41390
40551
|
}
|
|
41391
40552
|
};
|
|
41392
40553
|
// Add the record or a given key to the list of changes only when the value has actually changed
|
|
41393
|
-
|
|
41394
|
-
DefaultKeyValueDiffer.prototype._maybeAddToChanges =
|
|
41395
|
-
// Add the record or a given key to the list of changes only when the value has actually changed
|
|
41396
|
-
function (record, newValue) {
|
|
40554
|
+
DefaultKeyValueDiffer.prototype._maybeAddToChanges = function (record, newValue) {
|
|
41397
40555
|
if (!looseIdentical(newValue, record.currentValue)) {
|
|
41398
40556
|
record.previousValue = record.currentValue;
|
|
41399
40557
|
record.currentValue = newValue;
|
|
@@ -41419,9 +40577,7 @@ var DefaultKeyValueDiffer = /** @class */ (function () {
|
|
|
41419
40577
|
}
|
|
41420
40578
|
};
|
|
41421
40579
|
/** @internal */
|
|
41422
|
-
|
|
41423
|
-
DefaultKeyValueDiffer.prototype._forEach = /** @internal */
|
|
41424
|
-
function (obj, fn) {
|
|
40580
|
+
DefaultKeyValueDiffer.prototype._forEach = function (obj, fn) {
|
|
41425
40581
|
if (obj instanceof Map) {
|
|
41426
40582
|
obj.forEach(fn);
|
|
41427
40583
|
}
|
|
@@ -41479,12 +40635,13 @@ var IterableDiffers = /** @class */ (function () {
|
|
|
41479
40635
|
* inherited {@link IterableDiffers} instance with the provided factories and return a new
|
|
41480
40636
|
* {@link IterableDiffers} instance.
|
|
41481
40637
|
*
|
|
40638
|
+
* @usageNotes
|
|
40639
|
+
* ### Example
|
|
40640
|
+
*
|
|
41482
40641
|
* The following example shows how to extend an existing list of factories,
|
|
41483
40642
|
* which will only be applied to the injector for this component and its children.
|
|
41484
40643
|
* This step is all that's required to make a new {@link IterableDiffer} available.
|
|
41485
40644
|
*
|
|
41486
|
-
* ### Example
|
|
41487
|
-
*
|
|
41488
40645
|
* ```
|
|
41489
40646
|
* @Component({
|
|
41490
40647
|
* viewProviders: [
|
|
@@ -41493,45 +40650,7 @@ var IterableDiffers = /** @class */ (function () {
|
|
|
41493
40650
|
* })
|
|
41494
40651
|
* ```
|
|
41495
40652
|
*/
|
|
41496
|
-
|
|
41497
|
-
* Takes an array of {@link IterableDifferFactory} and returns a provider used to extend the
|
|
41498
|
-
* inherited {@link IterableDiffers} instance with the provided factories and return a new
|
|
41499
|
-
* {@link IterableDiffers} instance.
|
|
41500
|
-
*
|
|
41501
|
-
* The following example shows how to extend an existing list of factories,
|
|
41502
|
-
* which will only be applied to the injector for this component and its children.
|
|
41503
|
-
* This step is all that's required to make a new {@link IterableDiffer} available.
|
|
41504
|
-
*
|
|
41505
|
-
* ### Example
|
|
41506
|
-
*
|
|
41507
|
-
* ```
|
|
41508
|
-
* @Component({
|
|
41509
|
-
* viewProviders: [
|
|
41510
|
-
* IterableDiffers.extend([new ImmutableListDiffer()])
|
|
41511
|
-
* ]
|
|
41512
|
-
* })
|
|
41513
|
-
* ```
|
|
41514
|
-
*/
|
|
41515
|
-
IterableDiffers.extend = /**
|
|
41516
|
-
* Takes an array of {@link IterableDifferFactory} and returns a provider used to extend the
|
|
41517
|
-
* inherited {@link IterableDiffers} instance with the provided factories and return a new
|
|
41518
|
-
* {@link IterableDiffers} instance.
|
|
41519
|
-
*
|
|
41520
|
-
* The following example shows how to extend an existing list of factories,
|
|
41521
|
-
* which will only be applied to the injector for this component and its children.
|
|
41522
|
-
* This step is all that's required to make a new {@link IterableDiffer} available.
|
|
41523
|
-
*
|
|
41524
|
-
* ### Example
|
|
41525
|
-
*
|
|
41526
|
-
* ```
|
|
41527
|
-
* @Component({
|
|
41528
|
-
* viewProviders: [
|
|
41529
|
-
* IterableDiffers.extend([new ImmutableListDiffer()])
|
|
41530
|
-
* ]
|
|
41531
|
-
* })
|
|
41532
|
-
* ```
|
|
41533
|
-
*/
|
|
41534
|
-
function (factories) {
|
|
40653
|
+
IterableDiffers.extend = function (factories) {
|
|
41535
40654
|
return {
|
|
41536
40655
|
provide: IterableDiffers,
|
|
41537
40656
|
useFactory: function (parent) {
|
|
@@ -41593,12 +40712,13 @@ var KeyValueDiffers = /** @class */ (function () {
|
|
|
41593
40712
|
* inherited {@link KeyValueDiffers} instance with the provided factories and return a new
|
|
41594
40713
|
* {@link KeyValueDiffers} instance.
|
|
41595
40714
|
*
|
|
40715
|
+
* @usageNotes
|
|
40716
|
+
* ### Example
|
|
40717
|
+
*
|
|
41596
40718
|
* The following example shows how to extend an existing list of factories,
|
|
41597
40719
|
* which will only be applied to the injector for this component and its children.
|
|
41598
40720
|
* This step is all that's required to make a new {@link KeyValueDiffer} available.
|
|
41599
40721
|
*
|
|
41600
|
-
* ### Example
|
|
41601
|
-
*
|
|
41602
40722
|
* ```
|
|
41603
40723
|
* @Component({
|
|
41604
40724
|
* viewProviders: [
|
|
@@ -41607,45 +40727,7 @@ var KeyValueDiffers = /** @class */ (function () {
|
|
|
41607
40727
|
* })
|
|
41608
40728
|
* ```
|
|
41609
40729
|
*/
|
|
41610
|
-
|
|
41611
|
-
* Takes an array of {@link KeyValueDifferFactory} and returns a provider used to extend the
|
|
41612
|
-
* inherited {@link KeyValueDiffers} instance with the provided factories and return a new
|
|
41613
|
-
* {@link KeyValueDiffers} instance.
|
|
41614
|
-
*
|
|
41615
|
-
* The following example shows how to extend an existing list of factories,
|
|
41616
|
-
* which will only be applied to the injector for this component and its children.
|
|
41617
|
-
* This step is all that's required to make a new {@link KeyValueDiffer} available.
|
|
41618
|
-
*
|
|
41619
|
-
* ### Example
|
|
41620
|
-
*
|
|
41621
|
-
* ```
|
|
41622
|
-
* @Component({
|
|
41623
|
-
* viewProviders: [
|
|
41624
|
-
* KeyValueDiffers.extend([new ImmutableMapDiffer()])
|
|
41625
|
-
* ]
|
|
41626
|
-
* })
|
|
41627
|
-
* ```
|
|
41628
|
-
*/
|
|
41629
|
-
KeyValueDiffers.extend = /**
|
|
41630
|
-
* Takes an array of {@link KeyValueDifferFactory} and returns a provider used to extend the
|
|
41631
|
-
* inherited {@link KeyValueDiffers} instance with the provided factories and return a new
|
|
41632
|
-
* {@link KeyValueDiffers} instance.
|
|
41633
|
-
*
|
|
41634
|
-
* The following example shows how to extend an existing list of factories,
|
|
41635
|
-
* which will only be applied to the injector for this component and its children.
|
|
41636
|
-
* This step is all that's required to make a new {@link KeyValueDiffer} available.
|
|
41637
|
-
*
|
|
41638
|
-
* ### Example
|
|
41639
|
-
*
|
|
41640
|
-
* ```
|
|
41641
|
-
* @Component({
|
|
41642
|
-
* viewProviders: [
|
|
41643
|
-
* KeyValueDiffers.extend([new ImmutableMapDiffer()])
|
|
41644
|
-
* ]
|
|
41645
|
-
* })
|
|
41646
|
-
* ```
|
|
41647
|
-
*/
|
|
41648
|
-
function (factories) {
|
|
40730
|
+
KeyValueDiffers.extend = function (factories) {
|
|
41649
40731
|
return {
|
|
41650
40732
|
provide: KeyValueDiffers,
|
|
41651
40733
|
useFactory: function (parent) {
|
|
@@ -41695,6 +40777,11 @@ var defaultKeyValueDiffers = new KeyValueDiffers(keyValDiff);
|
|
|
41695
40777
|
* Use of this source code is governed by an MIT-style license that can be
|
|
41696
40778
|
* found in the LICENSE file at https://angular.io/license
|
|
41697
40779
|
*/
|
|
40780
|
+
/**
|
|
40781
|
+
* @module
|
|
40782
|
+
* @description
|
|
40783
|
+
* Change detection enables data binding in Angular.
|
|
40784
|
+
*/
|
|
41698
40785
|
|
|
41699
40786
|
/**
|
|
41700
40787
|
* @license
|
|
@@ -41729,8 +40816,9 @@ var platformCore = createPlatformFactory(null, 'core', _CORE_PLATFORM_PROVIDERS)
|
|
|
41729
40816
|
* It is used for i18n extraction, by i18n pipes (DatePipe, I18nPluralPipe, CurrencyPipe,
|
|
41730
40817
|
* DecimalPipe and PercentPipe) and by ICU expressions.
|
|
41731
40818
|
*
|
|
41732
|
-
* See the
|
|
40819
|
+
* See the [i18n guide](guide/i18n#setting-up-locale) for more information.
|
|
41733
40820
|
*
|
|
40821
|
+
* @usageNotes
|
|
41734
40822
|
* ### Example
|
|
41735
40823
|
*
|
|
41736
40824
|
* ```typescript
|
|
@@ -41750,8 +40838,9 @@ var LOCALE_ID = new InjectionToken('LocaleId');
|
|
|
41750
40838
|
* Use this token at bootstrap to provide the content of your translation file (`xtb`,
|
|
41751
40839
|
* `xlf` or `xlf2`) when you want to translate your application in another language.
|
|
41752
40840
|
*
|
|
41753
|
-
* See the
|
|
40841
|
+
* See the [i18n guide](guide/i18n#merge) for more information.
|
|
41754
40842
|
*
|
|
40843
|
+
* @usageNotes
|
|
41755
40844
|
* ### Example
|
|
41756
40845
|
*
|
|
41757
40846
|
* ```typescript
|
|
@@ -41774,8 +40863,9 @@ var TRANSLATIONS = new InjectionToken('Translations');
|
|
|
41774
40863
|
* Provide this token at bootstrap to set the format of your {@link TRANSLATIONS}: `xtb`,
|
|
41775
40864
|
* `xlf` or `xlf2`.
|
|
41776
40865
|
*
|
|
41777
|
-
* See the
|
|
40866
|
+
* See the [i18n guide](guide/i18n#merge) for more information.
|
|
41778
40867
|
*
|
|
40868
|
+
* @usageNotes
|
|
41779
40869
|
* ### Example
|
|
41780
40870
|
*
|
|
41781
40871
|
* ```typescript
|
|
@@ -41798,30 +40888,9 @@ var TRANSLATIONS_FORMAT = new InjectionToken('TranslationsFormat');
|
|
|
41798
40888
|
* - Warning (default): show a warning in the console and/or shell.
|
|
41799
40889
|
* - Ignore: do nothing.
|
|
41800
40890
|
*
|
|
41801
|
-
* See the
|
|
41802
|
-
*
|
|
41803
|
-
* ### Example
|
|
41804
|
-
* ```typescript
|
|
41805
|
-
* import { MissingTranslationStrategy } from '@angular/core';
|
|
41806
|
-
* import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
41807
|
-
* import { AppModule } from './app/app.module';
|
|
41808
|
-
*
|
|
41809
|
-
* platformBrowserDynamic().bootstrapModule(AppModule, {
|
|
41810
|
-
* missingTranslation: MissingTranslationStrategy.Error
|
|
41811
|
-
* });
|
|
41812
|
-
* ```
|
|
41813
|
-
*
|
|
41814
|
-
* @experimental i18n support is experimental.
|
|
41815
|
-
*/
|
|
41816
|
-
/**
|
|
41817
|
-
* Use this enum at bootstrap as an option of `bootstrapModule` to define the strategy
|
|
41818
|
-
* that the compiler should use in case of missing translations:
|
|
41819
|
-
* - Error: throw if you have missing translations.
|
|
41820
|
-
* - Warning (default): show a warning in the console and/or shell.
|
|
41821
|
-
* - Ignore: do nothing.
|
|
41822
|
-
*
|
|
41823
|
-
* See the {@linkDocs guide/i18n#missing-translation i18n guide} for more information.
|
|
40891
|
+
* See the [i18n guide](guide/i18n#missing-translation) for more information.
|
|
41824
40892
|
*
|
|
40893
|
+
* @usageNotes
|
|
41825
40894
|
* ### Example
|
|
41826
40895
|
* ```typescript
|
|
41827
40896
|
* import { MissingTranslationStrategy } from '@angular/core';
|
|
@@ -41836,28 +40905,6 @@ var TRANSLATIONS_FORMAT = new InjectionToken('TranslationsFormat');
|
|
|
41836
40905
|
* @experimental i18n support is experimental.
|
|
41837
40906
|
*/
|
|
41838
40907
|
var MissingTranslationStrategy$1;
|
|
41839
|
-
/**
|
|
41840
|
-
* Use this enum at bootstrap as an option of `bootstrapModule` to define the strategy
|
|
41841
|
-
* that the compiler should use in case of missing translations:
|
|
41842
|
-
* - Error: throw if you have missing translations.
|
|
41843
|
-
* - Warning (default): show a warning in the console and/or shell.
|
|
41844
|
-
* - Ignore: do nothing.
|
|
41845
|
-
*
|
|
41846
|
-
* See the {@linkDocs guide/i18n#missing-translation i18n guide} for more information.
|
|
41847
|
-
*
|
|
41848
|
-
* ### Example
|
|
41849
|
-
* ```typescript
|
|
41850
|
-
* import { MissingTranslationStrategy } from '@angular/core';
|
|
41851
|
-
* import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
41852
|
-
* import { AppModule } from './app/app.module';
|
|
41853
|
-
*
|
|
41854
|
-
* platformBrowserDynamic().bootstrapModule(AppModule, {
|
|
41855
|
-
* missingTranslation: MissingTranslationStrategy.Error
|
|
41856
|
-
* });
|
|
41857
|
-
* ```
|
|
41858
|
-
*
|
|
41859
|
-
* @experimental i18n support is experimental.
|
|
41860
|
-
*/
|
|
41861
40908
|
(function (MissingTranslationStrategy) {
|
|
41862
40909
|
MissingTranslationStrategy[MissingTranslationStrategy["Error"] = 0] = "Error";
|
|
41863
40910
|
MissingTranslationStrategy[MissingTranslationStrategy["Warning"] = 1] = "Warning";
|
|
@@ -41909,7 +40956,7 @@ var ApplicationModule = /** @class */ (function () {
|
|
|
41909
40956
|
];
|
|
41910
40957
|
/** @nocollapse */
|
|
41911
40958
|
ApplicationModule.ctorParameters = function () { return [
|
|
41912
|
-
{ type: ApplicationRef
|
|
40959
|
+
{ type: ApplicationRef }
|
|
41913
40960
|
]; };
|
|
41914
40961
|
return ApplicationModule;
|
|
41915
40962
|
}());
|
|
@@ -42048,22 +41095,6 @@ var VALID_ATTRS = merge$2(URI_ATTRS, SRCSET_ATTRS, HTML_ATTRS);
|
|
|
42048
41095
|
* Use of this source code is governed by an MIT-style license that can be
|
|
42049
41096
|
* found in the LICENSE file at https://angular.io/license
|
|
42050
41097
|
*/
|
|
42051
|
-
/**
|
|
42052
|
-
* @license
|
|
42053
|
-
* Copyright Google Inc. All Rights Reserved.
|
|
42054
|
-
*
|
|
42055
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
42056
|
-
* found in the LICENSE file at https://angular.io/license
|
|
42057
|
-
*/
|
|
42058
|
-
/**
|
|
42059
|
-
* A SecurityContext marks a location that has dangerous security implications, e.g. a DOM property
|
|
42060
|
-
* like `innerHTML` that could cause Cross Site Scripting (XSS) security bugs when improperly
|
|
42061
|
-
* handled.
|
|
42062
|
-
*
|
|
42063
|
-
* See DomSanitizer for more details on security in Angular applications.
|
|
42064
|
-
*
|
|
42065
|
-
*
|
|
42066
|
-
*/
|
|
42067
41098
|
/**
|
|
42068
41099
|
* A SecurityContext marks a location that has dangerous security implications, e.g. a DOM property
|
|
42069
41100
|
* like `innerHTML` that could cause Cross Site Scripting (XSS) security bugs when improperly
|
|
@@ -42074,15 +41105,6 @@ var VALID_ATTRS = merge$2(URI_ATTRS, SRCSET_ATTRS, HTML_ATTRS);
|
|
|
42074
41105
|
*
|
|
42075
41106
|
*/
|
|
42076
41107
|
var SecurityContext$1;
|
|
42077
|
-
/**
|
|
42078
|
-
* A SecurityContext marks a location that has dangerous security implications, e.g. a DOM property
|
|
42079
|
-
* like `innerHTML` that could cause Cross Site Scripting (XSS) security bugs when improperly
|
|
42080
|
-
* handled.
|
|
42081
|
-
*
|
|
42082
|
-
* See DomSanitizer for more details on security in Angular applications.
|
|
42083
|
-
*
|
|
42084
|
-
*
|
|
42085
|
-
*/
|
|
42086
41108
|
(function (SecurityContext) {
|
|
42087
41109
|
SecurityContext[SecurityContext["NONE"] = 0] = "NONE";
|
|
42088
41110
|
SecurityContext[SecurityContext["HTML"] = 1] = "HTML";
|
|
@@ -42176,23 +41198,23 @@ function asQueryList(view, index) {
|
|
|
42176
41198
|
* debug mode can hook it. It is lazily filled when `isDevMode` is known.
|
|
42177
41199
|
*/
|
|
42178
41200
|
var Services = {
|
|
42179
|
-
setCurrentNode:
|
|
42180
|
-
createRootView:
|
|
42181
|
-
createEmbeddedView:
|
|
42182
|
-
createComponentView:
|
|
42183
|
-
createNgModuleRef:
|
|
42184
|
-
overrideProvider:
|
|
42185
|
-
overrideComponentView:
|
|
42186
|
-
clearOverrides:
|
|
42187
|
-
checkAndUpdateView:
|
|
42188
|
-
checkNoChangesView:
|
|
42189
|
-
destroyView:
|
|
42190
|
-
resolveDep:
|
|
42191
|
-
createDebugContext:
|
|
42192
|
-
handleEvent:
|
|
42193
|
-
updateDirectives:
|
|
42194
|
-
updateRenderer:
|
|
42195
|
-
dirtyParentQueries:
|
|
41201
|
+
setCurrentNode: undefined,
|
|
41202
|
+
createRootView: undefined,
|
|
41203
|
+
createEmbeddedView: undefined,
|
|
41204
|
+
createComponentView: undefined,
|
|
41205
|
+
createNgModuleRef: undefined,
|
|
41206
|
+
overrideProvider: undefined,
|
|
41207
|
+
overrideComponentView: undefined,
|
|
41208
|
+
clearOverrides: undefined,
|
|
41209
|
+
checkAndUpdateView: undefined,
|
|
41210
|
+
checkNoChangesView: undefined,
|
|
41211
|
+
destroyView: undefined,
|
|
41212
|
+
resolveDep: undefined,
|
|
41213
|
+
createDebugContext: undefined,
|
|
41214
|
+
handleEvent: undefined,
|
|
41215
|
+
updateDirectives: undefined,
|
|
41216
|
+
updateRenderer: undefined,
|
|
41217
|
+
dirtyParentQueries: undefined,
|
|
42196
41218
|
};
|
|
42197
41219
|
|
|
42198
41220
|
/**
|
|
@@ -42403,7 +41425,7 @@ function rootRenderNodes(view) {
|
|
|
42403
41425
|
function visitRootRenderNodes(view, action, parentNode, nextSibling, target) {
|
|
42404
41426
|
// We need to re-compute the parent node in case the nodes have been moved around manually
|
|
42405
41427
|
if (action === 3 /* RemoveChild */) {
|
|
42406
|
-
parentNode = view.renderer.parentNode(renderNode(view,
|
|
41428
|
+
parentNode = view.renderer.parentNode(renderNode(view, view.def.lastRenderRootNode));
|
|
42407
41429
|
}
|
|
42408
41430
|
visitSiblingRenderNodes(view, action, 0, view.def.nodes.length - 1, parentNode, nextSibling, target);
|
|
42409
41431
|
}
|
|
@@ -42423,13 +41445,13 @@ function visitProjectedRenderNodes(view, ngContentIndex, action, parentNode, nex
|
|
|
42423
41445
|
compView = compView.parent;
|
|
42424
41446
|
}
|
|
42425
41447
|
var hostView = compView.parent;
|
|
42426
|
-
var hostElDef = viewParentEl(
|
|
41448
|
+
var hostElDef = viewParentEl(compView);
|
|
42427
41449
|
var startIndex = hostElDef.nodeIndex + 1;
|
|
42428
41450
|
var endIndex = hostElDef.nodeIndex + hostElDef.childCount;
|
|
42429
41451
|
for (var i = startIndex; i <= endIndex; i++) {
|
|
42430
41452
|
var nodeDef = hostView.def.nodes[i];
|
|
42431
41453
|
if (nodeDef.ngContentIndex === ngContentIndex) {
|
|
42432
|
-
visitRenderNode(
|
|
41454
|
+
visitRenderNode(hostView, nodeDef, action, parentNode, nextSibling, target);
|
|
42433
41455
|
}
|
|
42434
41456
|
// jump to next sibling
|
|
42435
41457
|
i += nodeDef.childCount;
|
|
@@ -42495,7 +41517,7 @@ function execRenderNodeAction(view, renderNode, action, parentNode, nextSibling,
|
|
|
42495
41517
|
var NS_PREFIX_RE = /^:([^:]+):(.+)$/;
|
|
42496
41518
|
function splitNamespace(name) {
|
|
42497
41519
|
if (name[0] === ':') {
|
|
42498
|
-
var match =
|
|
41520
|
+
var match = name.match(NS_PREFIX_RE);
|
|
42499
41521
|
return [match[1], match[2]];
|
|
42500
41522
|
}
|
|
42501
41523
|
return ['', name];
|
|
@@ -42511,7 +41533,7 @@ function splitNamespace(name) {
|
|
|
42511
41533
|
|
|
42512
41534
|
|
|
42513
41535
|
function createElement(view, renderHost, def) {
|
|
42514
|
-
var elDef =
|
|
41536
|
+
var elDef = def.element;
|
|
42515
41537
|
var rootSelectorOrNode = view.root.selectorOrNode;
|
|
42516
41538
|
var renderer = view.renderer;
|
|
42517
41539
|
var el;
|
|
@@ -42595,7 +41617,7 @@ function checkAndUpdateElementValue(view, def, bindingIdx, value) {
|
|
|
42595
41617
|
var binding = def.bindings[bindingIdx];
|
|
42596
41618
|
var elData = asElementData(view, def.nodeIndex);
|
|
42597
41619
|
var renderNode$$1 = elData.renderElement;
|
|
42598
|
-
var name =
|
|
41620
|
+
var name = binding.name;
|
|
42599
41621
|
switch (binding.flags & 15 /* Types */) {
|
|
42600
41622
|
case 1 /* TypeElementAttribute */:
|
|
42601
41623
|
setElementAttribute(view, binding, renderNode$$1, binding.ns, name, value);
|
|
@@ -42731,6 +41753,9 @@ function resolveNgModuleDep(data, depDef, notFoundValue) {
|
|
|
42731
41753
|
return (data._providers[index] =
|
|
42732
41754
|
_createProviderInstance$1(data, data._def.providersByKey[depDef.tokenKey]));
|
|
42733
41755
|
}
|
|
41756
|
+
else if (depDef.flags & 4 /* Self */) {
|
|
41757
|
+
return notFoundValue;
|
|
41758
|
+
}
|
|
42734
41759
|
return data._parent.get(depDef.token, notFoundValue);
|
|
42735
41760
|
}
|
|
42736
41761
|
finally {
|
|
@@ -42839,10 +41864,10 @@ function attachEmbeddedView(parentView, elementData, viewIndex, view) {
|
|
|
42839
41864
|
viewIndex = embeddedViews.length;
|
|
42840
41865
|
}
|
|
42841
41866
|
view.viewContainerParent = parentView;
|
|
42842
|
-
addToArray(embeddedViews,
|
|
41867
|
+
addToArray(embeddedViews, viewIndex, view);
|
|
42843
41868
|
attachProjectedView(elementData, view);
|
|
42844
41869
|
Services.dirtyParentQueries(view);
|
|
42845
|
-
var prevView =
|
|
41870
|
+
var prevView = viewIndex > 0 ? embeddedViews[viewIndex - 1] : null;
|
|
42846
41871
|
renderAttachEmbeddedView(elementData, prevView, view);
|
|
42847
41872
|
}
|
|
42848
41873
|
function attachProjectedView(vcElementData, view) {
|
|
@@ -42866,7 +41891,7 @@ function attachProjectedView(vcElementData, view) {
|
|
|
42866
41891
|
projectedViews.push(view);
|
|
42867
41892
|
// Note: we are changing the NodeDef here as we cannot calculate
|
|
42868
41893
|
// the fact whether a template is used for projection during compilation.
|
|
42869
|
-
markNodeAsProjectedTemplate(view.parent.def,
|
|
41894
|
+
markNodeAsProjectedTemplate(view.parent.def, view.parentNodeDef);
|
|
42870
41895
|
}
|
|
42871
41896
|
function markNodeAsProjectedTemplate(viewDef, nodeDef) {
|
|
42872
41897
|
if (nodeDef.flags & 4 /* ProjectedTemplate */) {
|
|
@@ -42926,7 +41951,7 @@ function moveEmbeddedView(elementData, oldViewIndex, newViewIndex) {
|
|
|
42926
41951
|
return view;
|
|
42927
41952
|
}
|
|
42928
41953
|
function renderAttachEmbeddedView(elementData, prevView, view) {
|
|
42929
|
-
var prevRenderNode = prevView ? renderNode(prevView,
|
|
41954
|
+
var prevRenderNode = prevView ? renderNode(prevView, prevView.def.lastRenderRootNode) :
|
|
42930
41955
|
elementData.renderElement;
|
|
42931
41956
|
var parentNode = view.renderer.parentNode(prevRenderNode);
|
|
42932
41957
|
var nextSibling = view.renderer.nextSibling(prevRenderNode);
|
|
@@ -42988,7 +42013,7 @@ var ComponentFactory_ = /** @class */ (function (_super) {
|
|
|
42988
42013
|
Object.defineProperty(ComponentFactory_.prototype, "inputs", {
|
|
42989
42014
|
get: function () {
|
|
42990
42015
|
var inputsArr = [];
|
|
42991
|
-
var inputs =
|
|
42016
|
+
var inputs = this._inputs;
|
|
42992
42017
|
for (var propName in inputs) {
|
|
42993
42018
|
var templateName = inputs[propName];
|
|
42994
42019
|
inputsArr.push({ propName: propName, templateName: templateName });
|
|
@@ -43013,13 +42038,7 @@ var ComponentFactory_ = /** @class */ (function (_super) {
|
|
|
43013
42038
|
/**
|
|
43014
42039
|
* Creates a new component.
|
|
43015
42040
|
*/
|
|
43016
|
-
|
|
43017
|
-
* Creates a new component.
|
|
43018
|
-
*/
|
|
43019
|
-
ComponentFactory_.prototype.create = /**
|
|
43020
|
-
* Creates a new component.
|
|
43021
|
-
*/
|
|
43022
|
-
function (injector, projectableNodes, rootSelectorOrNode, ngModule) {
|
|
42041
|
+
ComponentFactory_.prototype.create = function (injector, projectableNodes, rootSelectorOrNode, ngModule) {
|
|
43023
42042
|
if (!ngModule) {
|
|
43024
42043
|
throw new Error('ngModule should be provided');
|
|
43025
42044
|
}
|
|
@@ -43077,8 +42096,8 @@ var ViewContainerRef_ = /** @class */ (function () {
|
|
|
43077
42096
|
this._elDef = _elDef;
|
|
43078
42097
|
this._data = _data;
|
|
43079
42098
|
/**
|
|
43080
|
-
|
|
43081
|
-
|
|
42099
|
+
* @internal
|
|
42100
|
+
*/
|
|
43082
42101
|
this._embeddedViews = [];
|
|
43083
42102
|
}
|
|
43084
42103
|
Object.defineProperty(ViewContainerRef_.prototype, "element", {
|
|
@@ -43097,7 +42116,7 @@ var ViewContainerRef_ = /** @class */ (function () {
|
|
|
43097
42116
|
var elDef = this._elDef.parent;
|
|
43098
42117
|
while (!elDef && view) {
|
|
43099
42118
|
elDef = viewParentEl(view);
|
|
43100
|
-
view =
|
|
42119
|
+
view = view.parent;
|
|
43101
42120
|
}
|
|
43102
42121
|
return view ? new Injector_(view, elDef) : new Injector_(this._view, null);
|
|
43103
42122
|
},
|
|
@@ -43107,7 +42126,7 @@ var ViewContainerRef_ = /** @class */ (function () {
|
|
|
43107
42126
|
ViewContainerRef_.prototype.clear = function () {
|
|
43108
42127
|
var len = this._embeddedViews.length;
|
|
43109
42128
|
for (var i = len - 1; i >= 0; i--) {
|
|
43110
|
-
var view =
|
|
42129
|
+
var view = detachEmbeddedView(this._data, i);
|
|
43111
42130
|
Services.destroyView(view);
|
|
43112
42131
|
}
|
|
43113
42132
|
};
|
|
@@ -43260,7 +42279,7 @@ var TemplateRef_ = /** @class */ (function (_super) {
|
|
|
43260
42279
|
return _this;
|
|
43261
42280
|
}
|
|
43262
42281
|
TemplateRef_.prototype.createEmbeddedView = function (context) {
|
|
43263
|
-
return new ViewRef_(Services.createEmbeddedView(this._parentView, this._def,
|
|
42282
|
+
return new ViewRef_(Services.createEmbeddedView(this._parentView, this._def, this._def.element.template, context));
|
|
43264
42283
|
};
|
|
43265
42284
|
Object.defineProperty(TemplateRef_.prototype, "elementRef", {
|
|
43266
42285
|
get: function () {
|
|
@@ -43465,13 +42484,13 @@ function createPipeInstance(view, def) {
|
|
|
43465
42484
|
// pipes can see the private services of the component
|
|
43466
42485
|
var allowPrivateServices = true;
|
|
43467
42486
|
// pipes are always eager and classes!
|
|
43468
|
-
return createClass(
|
|
42487
|
+
return createClass(compView.parent, viewParentEl(compView), allowPrivateServices, def.provider.value, def.provider.deps);
|
|
43469
42488
|
}
|
|
43470
42489
|
function createDirectiveInstance(view, def) {
|
|
43471
42490
|
// components can see other private services, other directives can't.
|
|
43472
42491
|
var allowPrivateServices = (def.flags & 32768 /* Component */) > 0;
|
|
43473
42492
|
// directives are always eager and classes!
|
|
43474
|
-
var instance = createClass(view,
|
|
42493
|
+
var instance = createClass(view, def.parent, allowPrivateServices, def.provider.value, def.provider.deps);
|
|
43475
42494
|
if (def.outputs.length) {
|
|
43476
42495
|
for (var i = 0; i < def.outputs.length; i++) {
|
|
43477
42496
|
var output = def.outputs[i];
|
|
@@ -43488,7 +42507,7 @@ function checkAndUpdateDirectiveInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7
|
|
|
43488
42507
|
var providerData = asProviderData(view, def.nodeIndex);
|
|
43489
42508
|
var directive = providerData.instance;
|
|
43490
42509
|
var changed = false;
|
|
43491
|
-
var changes =
|
|
42510
|
+
var changes = undefined;
|
|
43492
42511
|
var bindLen = def.bindings.length;
|
|
43493
42512
|
if (bindLen > 0 && checkBinding(view, def, 0, v0)) {
|
|
43494
42513
|
changed = true;
|
|
@@ -43546,7 +42565,7 @@ function checkAndUpdateDirectiveDynamic(view, def, values) {
|
|
|
43546
42565
|
var providerData = asProviderData(view, def.nodeIndex);
|
|
43547
42566
|
var directive = providerData.instance;
|
|
43548
42567
|
var changed = false;
|
|
43549
|
-
var changes =
|
|
42568
|
+
var changes = undefined;
|
|
43550
42569
|
for (var i = 0; i < values.length; i++) {
|
|
43551
42570
|
if (checkBinding(view, def, i, values[i])) {
|
|
43552
42571
|
changed = true;
|
|
@@ -43571,11 +42590,11 @@ function _createProviderInstance(view, def) {
|
|
|
43571
42590
|
var providerDef = def.provider;
|
|
43572
42591
|
switch (def.flags & 201347067 /* Types */) {
|
|
43573
42592
|
case 512 /* TypeClassProvider */:
|
|
43574
|
-
return createClass(view,
|
|
42593
|
+
return createClass(view, def.parent, allowPrivateServices, providerDef.value, providerDef.deps);
|
|
43575
42594
|
case 1024 /* TypeFactoryProvider */:
|
|
43576
|
-
return callFactory(view,
|
|
42595
|
+
return callFactory(view, def.parent, allowPrivateServices, providerDef.value, providerDef.deps);
|
|
43577
42596
|
case 2048 /* TypeUseExistingProvider */:
|
|
43578
|
-
return resolveDep(view,
|
|
42597
|
+
return resolveDep(view, def.parent, allowPrivateServices, providerDef.deps[0]);
|
|
43579
42598
|
case 256 /* TypeValueProvider */:
|
|
43580
42599
|
return providerDef.value;
|
|
43581
42600
|
}
|
|
@@ -43653,7 +42672,7 @@ function resolveDep(view, elDef, allowPrivateServices, depDef, notFoundValue) {
|
|
|
43653
42672
|
}
|
|
43654
42673
|
if (elDef && (depDef.flags & 1 /* SkipSelf */)) {
|
|
43655
42674
|
allowPrivateServices = false;
|
|
43656
|
-
elDef =
|
|
42675
|
+
elDef = elDef.parent;
|
|
43657
42676
|
}
|
|
43658
42677
|
var searchView = view;
|
|
43659
42678
|
while (searchView) {
|
|
@@ -43698,8 +42717,8 @@ function resolveDep(view, elDef, allowPrivateServices, depDef, notFoundValue) {
|
|
|
43698
42717
|
}
|
|
43699
42718
|
}
|
|
43700
42719
|
allowPrivateServices = isComponentView(searchView);
|
|
43701
|
-
elDef =
|
|
43702
|
-
searchView =
|
|
42720
|
+
elDef = viewParentEl(searchView);
|
|
42721
|
+
searchView = searchView.parent;
|
|
43703
42722
|
if (depDef.flags & 4 /* Self */) {
|
|
43704
42723
|
searchView = null;
|
|
43705
42724
|
}
|
|
@@ -43737,7 +42756,7 @@ function updateProp(view, providerData, def, bindingIdx, value, changes) {
|
|
|
43737
42756
|
}
|
|
43738
42757
|
}
|
|
43739
42758
|
var binding = def.bindings[bindingIdx];
|
|
43740
|
-
var propName =
|
|
42759
|
+
var propName = binding.name;
|
|
43741
42760
|
// Note: This is still safe with Closure Compiler as
|
|
43742
42761
|
// the user passed in the property name as an object has to `providerDef`,
|
|
43743
42762
|
// so Closure Compiler will have renamed the property correctly already.
|
|
@@ -43876,7 +42895,7 @@ function createQuery() {
|
|
|
43876
42895
|
function dirtyParentQueries(view) {
|
|
43877
42896
|
var queryIds = view.def.nodeMatchedQueries;
|
|
43878
42897
|
while (view.parent && isEmbeddedView(view)) {
|
|
43879
|
-
var tplDef =
|
|
42898
|
+
var tplDef = view.parentNodeDef;
|
|
43880
42899
|
view = view.parent;
|
|
43881
42900
|
// content queries
|
|
43882
42901
|
var end = tplDef.nodeIndex + tplDef.childCount;
|
|
@@ -43913,14 +42932,14 @@ function checkAndUpdateQuery(view, nodeDef) {
|
|
|
43913
42932
|
return;
|
|
43914
42933
|
}
|
|
43915
42934
|
var directiveInstance;
|
|
43916
|
-
var newValues =
|
|
42935
|
+
var newValues = undefined;
|
|
43917
42936
|
if (nodeDef.flags & 67108864 /* TypeContentQuery */) {
|
|
43918
|
-
var elementDef =
|
|
43919
|
-
newValues = calcQueryValues(view, elementDef.nodeIndex, elementDef.nodeIndex + elementDef.childCount,
|
|
42937
|
+
var elementDef = nodeDef.parent.parent;
|
|
42938
|
+
newValues = calcQueryValues(view, elementDef.nodeIndex, elementDef.nodeIndex + elementDef.childCount, nodeDef.query, []);
|
|
43920
42939
|
directiveInstance = asProviderData(view, nodeDef.parent.nodeIndex).instance;
|
|
43921
42940
|
}
|
|
43922
42941
|
else if (nodeDef.flags & 134217728 /* TypeViewQuery */) {
|
|
43923
|
-
newValues = calcQueryValues(view, 0, view.def.nodes.length - 1,
|
|
42942
|
+
newValues = calcQueryValues(view, 0, view.def.nodes.length - 1, nodeDef.query, []);
|
|
43924
42943
|
directiveInstance = view.component;
|
|
43925
42944
|
}
|
|
43926
42945
|
queryList.reset(newValues);
|
|
@@ -44334,7 +43353,7 @@ function createViewNodes(view) {
|
|
|
44334
43353
|
var renderHost;
|
|
44335
43354
|
if (isComponentView(view)) {
|
|
44336
43355
|
var hostDef = view.parentNodeDef;
|
|
44337
|
-
renderHost = asElementData(
|
|
43356
|
+
renderHost = asElementData(view.parent, hostDef.parent.nodeIndex).renderElement;
|
|
44338
43357
|
}
|
|
44339
43358
|
var def = view.def;
|
|
44340
43359
|
var nodes = view.nodes;
|
|
@@ -44345,9 +43364,9 @@ function createViewNodes(view) {
|
|
|
44345
43364
|
switch (nodeDef.flags & 201347067 /* Types */) {
|
|
44346
43365
|
case 1 /* TypeElement */:
|
|
44347
43366
|
var el = createElement(view, renderHost, nodeDef);
|
|
44348
|
-
var componentView =
|
|
43367
|
+
var componentView = undefined;
|
|
44349
43368
|
if (nodeDef.flags & 33554432 /* ComponentView */) {
|
|
44350
|
-
var compViewDef = resolveDefinition(
|
|
43369
|
+
var compViewDef = resolveDefinition(nodeDef.element.componentView);
|
|
44351
43370
|
componentView = Services.createComponentView(view, nodeDef, compViewDef, el);
|
|
44352
43371
|
}
|
|
44353
43372
|
listenToElementOutputs(view, componentView, nodeDef, el);
|
|
@@ -44782,14 +43801,10 @@ function createProdServices() {
|
|
|
44782
43801
|
handleEvent: function (view, nodeIndex, eventName, event) {
|
|
44783
43802
|
return view.def.handleEvent(view, nodeIndex, eventName, event);
|
|
44784
43803
|
},
|
|
44785
|
-
updateDirectives: function (view, checkType) {
|
|
44786
|
-
|
|
44787
|
-
|
|
44788
|
-
|
|
44789
|
-
updateRenderer: function (view, checkType) {
|
|
44790
|
-
return view.def.updateRenderer(checkType === 0 /* CheckAndUpdate */ ? prodCheckAndUpdateNode :
|
|
44791
|
-
prodCheckNoChangesNode, view);
|
|
44792
|
-
},
|
|
43804
|
+
updateDirectives: function (view, checkType) { return view.def.updateDirectives(checkType === 0 /* CheckAndUpdate */ ? prodCheckAndUpdateNode :
|
|
43805
|
+
prodCheckNoChangesNode, view); },
|
|
43806
|
+
updateRenderer: function (view, checkType) { return view.def.updateRenderer(checkType === 0 /* CheckAndUpdate */ ? prodCheckAndUpdateNode :
|
|
43807
|
+
prodCheckNoChangesNode, view); },
|
|
44793
43808
|
};
|
|
44794
43809
|
}
|
|
44795
43810
|
function createDebugServices() {
|
|
@@ -44861,7 +43876,7 @@ function debugOverrideProvider(override) {
|
|
|
44861
43876
|
}
|
|
44862
43877
|
function debugOverrideComponentView(comp, compFactory) {
|
|
44863
43878
|
var hostViewDef = resolveDefinition(getComponentViewDefinitionFactory(compFactory));
|
|
44864
|
-
var compViewDef = resolveDefinition(
|
|
43879
|
+
var compViewDef = resolveDefinition(hostViewDef.nodes[0].element.componentView);
|
|
44865
43880
|
viewDefOverrides.set(comp, compViewDef);
|
|
44866
43881
|
}
|
|
44867
43882
|
function debugClearOverrides() {
|
|
@@ -44914,7 +43929,7 @@ function applyProviderOverridesToView(def) {
|
|
|
44914
43929
|
return;
|
|
44915
43930
|
}
|
|
44916
43931
|
if (nodeDef.flags & 3840 /* CatProviderNoDirective */) {
|
|
44917
|
-
var provider =
|
|
43932
|
+
var provider = nodeDef.provider;
|
|
44918
43933
|
var override = providerOverrides.get(provider.token);
|
|
44919
43934
|
if (override) {
|
|
44920
43935
|
nodeDef.flags = (nodeDef.flags & ~3840 /* CatProviderNoDirective */) | override.flags;
|
|
@@ -45099,11 +44114,11 @@ function debugCheckAndUpdateNode(view, nodeDef, argStyle, givenValues) {
|
|
|
45099
44114
|
var binding = nodeDef.bindings[i];
|
|
45100
44115
|
var value = values[i];
|
|
45101
44116
|
if (binding.flags & 8 /* TypeProperty */) {
|
|
45102
|
-
bindingValues[normalizeDebugBindingName(
|
|
44117
|
+
bindingValues[normalizeDebugBindingName(binding.nonMinifiedName)] =
|
|
45103
44118
|
normalizeDebugBindingValue(value);
|
|
45104
44119
|
}
|
|
45105
44120
|
}
|
|
45106
|
-
var elDef =
|
|
44121
|
+
var elDef = nodeDef.parent;
|
|
45107
44122
|
var el = asElementData(view, elDef.nodeIndex).renderElement;
|
|
45108
44123
|
if (!elDef.element.name) {
|
|
45109
44124
|
// a comment.
|
|
@@ -45180,12 +44195,12 @@ var DebugContext_ = /** @class */ (function () {
|
|
|
45180
44195
|
var elDef = this.nodeDef;
|
|
45181
44196
|
var elView = view;
|
|
45182
44197
|
while (elDef && (elDef.flags & 1 /* TypeElement */) === 0) {
|
|
45183
|
-
elDef =
|
|
44198
|
+
elDef = elDef.parent;
|
|
45184
44199
|
}
|
|
45185
44200
|
if (!elDef) {
|
|
45186
44201
|
while (!elDef && elView) {
|
|
45187
|
-
elDef =
|
|
45188
|
-
elView =
|
|
44202
|
+
elDef = viewParentEl(elView);
|
|
44203
|
+
elView = elView.parent;
|
|
45189
44204
|
}
|
|
45190
44205
|
}
|
|
45191
44206
|
this.elDef = elDef;
|
|
@@ -45314,7 +44329,7 @@ function getRenderNodeIndex(viewDef$$1, nodeIndex) {
|
|
|
45314
44329
|
}
|
|
45315
44330
|
function findHostElement(view) {
|
|
45316
44331
|
while (view && !isComponentView(view)) {
|
|
45317
|
-
view =
|
|
44332
|
+
view = view.parent;
|
|
45318
44333
|
}
|
|
45319
44334
|
if (view.parent) {
|
|
45320
44335
|
return asElementData(view.parent, viewParentEl(view).nodeIndex);
|
|
@@ -45342,7 +44357,7 @@ function callWithDebugContext(action, fn, self, args) {
|
|
|
45342
44357
|
if (isViewDebugError(e) || !_currentView) {
|
|
45343
44358
|
throw e;
|
|
45344
44359
|
}
|
|
45345
|
-
throw viewWrappedDebugError(e,
|
|
44360
|
+
throw viewWrappedDebugError(e, getCurrentDebugContext());
|
|
45346
44361
|
}
|
|
45347
44362
|
}
|
|
45348
44363
|
function getCurrentDebugContext() {
|
|
@@ -45379,7 +44394,7 @@ var DebugRenderer2 = /** @class */ (function () {
|
|
|
45379
44394
|
this.data = this.delegate.data;
|
|
45380
44395
|
}
|
|
45381
44396
|
DebugRenderer2.prototype.destroyNode = function (node) {
|
|
45382
|
-
removeDebugNodeFromIndex(
|
|
44397
|
+
removeDebugNodeFromIndex(getDebugNode(node));
|
|
45383
44398
|
if (this.delegate.destroyNode) {
|
|
45384
44399
|
this.delegate.destroyNode(node);
|
|
45385
44400
|
}
|
|
@@ -45422,7 +44437,7 @@ var DebugRenderer2 = /** @class */ (function () {
|
|
|
45422
44437
|
DebugRenderer2.prototype.insertBefore = function (parent, newChild, refChild) {
|
|
45423
44438
|
var debugEl = getDebugNode(parent);
|
|
45424
44439
|
var debugChildEl = getDebugNode(newChild);
|
|
45425
|
-
var debugRefEl =
|
|
44440
|
+
var debugRefEl = getDebugNode(refChild);
|
|
45426
44441
|
if (debugEl && debugChildEl && debugEl instanceof DebugElement) {
|
|
45427
44442
|
debugEl.insertBefore(debugRefEl, debugChildEl);
|
|
45428
44443
|
}
|
|
@@ -45635,7 +44650,7 @@ function throwError$1(msg) {
|
|
|
45635
44650
|
*/
|
|
45636
44651
|
function executeInitHooks(currentView, tView, creationMode) {
|
|
45637
44652
|
if (currentView.lifecycleStage === 1 /* Init */) {
|
|
45638
|
-
executeHooks(
|
|
44653
|
+
executeHooks(currentView.directives, tView.initHooks, tView.checkHooks, creationMode);
|
|
45639
44654
|
currentView.lifecycleStage = 2 /* AfterInit */;
|
|
45640
44655
|
}
|
|
45641
44656
|
}
|
|
@@ -45750,9 +44765,7 @@ function typeName(type) {
|
|
|
45750
44765
|
* found in the LICENSE file at https://angular.io/license
|
|
45751
44766
|
*/
|
|
45752
44767
|
// TODO: cleanup once the code is merged in angular/angular
|
|
45753
|
-
// TODO: cleanup once the code is merged in angular/angular
|
|
45754
44768
|
var RendererStyleFlags3;
|
|
45755
|
-
// TODO: cleanup once the code is merged in angular/angular
|
|
45756
44769
|
(function (RendererStyleFlags3) {
|
|
45757
44770
|
RendererStyleFlags3[RendererStyleFlags3["Important"] = 1] = "Important";
|
|
45758
44771
|
RendererStyleFlags3[RendererStyleFlags3["DashCase"] = 2] = "DashCase";
|
|
@@ -45858,7 +44871,7 @@ function findNextRNodeSibling(node, stopNode) {
|
|
|
45858
44871
|
if (nativeNode) {
|
|
45859
44872
|
return nativeNode;
|
|
45860
44873
|
}
|
|
45861
|
-
pNextOrParent =
|
|
44874
|
+
pNextOrParent = pNextOrParent.pNextOrParent;
|
|
45862
44875
|
}
|
|
45863
44876
|
currentNode = pNextOrParent;
|
|
45864
44877
|
}
|
|
@@ -45976,21 +44989,18 @@ function addRemoveViewFromContainer(container, rootNode, insertMode, beforeNode)
|
|
|
45976
44989
|
if (node.type === 3 /* Element */) {
|
|
45977
44990
|
if (insertMode) {
|
|
45978
44991
|
if (!node.native) {
|
|
45979
|
-
// If the native element doesn't exist, this is a bound text node that hasn't yet been
|
|
45980
|
-
// created because update mode has not run (occurs when a bound text node is a root
|
|
45981
|
-
// node of a dynamically created view). See textBinding() in instructions for ctx.
|
|
45982
44992
|
// If the native element doesn't exist, this is a bound text node that hasn't yet been
|
|
45983
44993
|
// created because update mode has not run (occurs when a bound text node is a root
|
|
45984
44994
|
// node of a dynamically created view). See textBinding() in instructions for ctx.
|
|
45985
44995
|
node.native = createTextNode('', renderer);
|
|
45986
44996
|
}
|
|
45987
44997
|
isProceduralRenderer(renderer) ?
|
|
45988
|
-
renderer.insertBefore(parent,
|
|
45989
|
-
parent.insertBefore(
|
|
44998
|
+
renderer.insertBefore(parent, node.native, beforeNode) :
|
|
44999
|
+
parent.insertBefore(node.native, beforeNode, true);
|
|
45990
45000
|
}
|
|
45991
45001
|
else {
|
|
45992
|
-
isProceduralRenderer(renderer) ? renderer.removeChild(parent,
|
|
45993
|
-
parent.removeChild(
|
|
45002
|
+
isProceduralRenderer(renderer) ? renderer.removeChild(parent, node.native) :
|
|
45003
|
+
parent.removeChild(node.native);
|
|
45994
45004
|
}
|
|
45995
45005
|
nextNode = node.next;
|
|
45996
45006
|
}
|
|
@@ -46172,7 +45182,7 @@ function cleanUpView(view) {
|
|
|
46172
45182
|
}
|
|
46173
45183
|
/** Removes listeners and unsubscribes from output subscriptions */
|
|
46174
45184
|
function removeListeners(view) {
|
|
46175
|
-
var cleanup =
|
|
45185
|
+
var cleanup = view.cleanup;
|
|
46176
45186
|
if (cleanup != null) {
|
|
46177
45187
|
for (var i = 0; i < cleanup.length - 1; i += 2) {
|
|
46178
45188
|
if (typeof cleanup[i] === 'string') {
|
|
@@ -46191,14 +45201,14 @@ function executeOnDestroys(view) {
|
|
|
46191
45201
|
var tView = view.tView;
|
|
46192
45202
|
var destroyHooks;
|
|
46193
45203
|
if (tView != null && (destroyHooks = tView.destroyHooks) != null) {
|
|
46194
|
-
callHooks(
|
|
45204
|
+
callHooks(view.directives, destroyHooks);
|
|
46195
45205
|
}
|
|
46196
45206
|
}
|
|
46197
45207
|
/** Calls pipe destroy hooks for this view */
|
|
46198
45208
|
function executePipeOnDestroys(view) {
|
|
46199
45209
|
var pipeDestroyHooks = view.tView && view.tView.pipeDestroyHooks;
|
|
46200
45210
|
if (pipeDestroyHooks) {
|
|
46201
|
-
callHooks(
|
|
45211
|
+
callHooks(view.data, pipeDestroyHooks);
|
|
46202
45212
|
}
|
|
46203
45213
|
}
|
|
46204
45214
|
/**
|
|
@@ -46355,7 +45365,7 @@ var tData;
|
|
|
46355
45365
|
* as we enter the view. Declaring the type as `null` would require us to place `!`
|
|
46356
45366
|
* in most instructions since they all assume that `currentView` is defined.
|
|
46357
45367
|
*/
|
|
46358
|
-
var currentView =
|
|
45368
|
+
var currentView = null;
|
|
46359
45369
|
var currentQueries;
|
|
46360
45370
|
|
|
46361
45371
|
/**
|
|
@@ -46439,7 +45449,7 @@ function enterView(newView, host) {
|
|
|
46439
45449
|
*/
|
|
46440
45450
|
function leaveView(newView) {
|
|
46441
45451
|
if (!checkNoChangesMode) {
|
|
46442
|
-
executeHooks(
|
|
45452
|
+
executeHooks(directives, currentView.tView.viewHooks, currentView.tView.viewCheckHooks, creationMode);
|
|
46443
45453
|
}
|
|
46444
45454
|
// Views should be clean and in update mode after being checked, so these bits are cleared
|
|
46445
45455
|
currentView.flags &= ~(1 /* CreationMode */ | 4 /* Dirty */);
|
|
@@ -46459,7 +45469,7 @@ function refreshDirectives() {
|
|
|
46459
45469
|
/** Sets the host bindings for the current view. */
|
|
46460
45470
|
function setHostBindings(bindings) {
|
|
46461
45471
|
if (bindings != null) {
|
|
46462
|
-
var defs =
|
|
45472
|
+
var defs = currentView.tView.directives;
|
|
46463
45473
|
for (var i = 0; i < bindings.length; i += 2) {
|
|
46464
45474
|
var dirIndex = bindings[i];
|
|
46465
45475
|
var def = defs[dirIndex];
|
|
@@ -46479,17 +45489,15 @@ function executeInitAndContentHooks() {
|
|
|
46479
45489
|
if (!checkNoChangesMode) {
|
|
46480
45490
|
var tView = currentView.tView;
|
|
46481
45491
|
executeInitHooks(currentView, tView, creationMode);
|
|
46482
|
-
executeHooks(
|
|
45492
|
+
executeHooks(directives, tView.contentHooks, tView.contentCheckHooks, creationMode);
|
|
46483
45493
|
}
|
|
46484
45494
|
}
|
|
46485
45495
|
function createLView(viewId, renderer, tView, template, context, flags) {
|
|
46486
45496
|
var newView = {
|
|
46487
45497
|
parent: currentView,
|
|
46488
45498
|
id: viewId,
|
|
46489
|
-
// -1 for component views
|
|
46490
45499
|
flags: flags | 1 /* CreationMode */ | 8 /* Attached */,
|
|
46491
|
-
node:
|
|
46492
|
-
// until we initialize it in createNode.
|
|
45500
|
+
node: null,
|
|
46493
45501
|
data: [],
|
|
46494
45502
|
directives: null,
|
|
46495
45503
|
tView: tView,
|
|
@@ -46596,7 +45604,7 @@ function renderEmbeddedTemplate(viewNode, template, context, renderer, directive
|
|
|
46596
45604
|
var oldView;
|
|
46597
45605
|
try {
|
|
46598
45606
|
isParent = true;
|
|
46599
|
-
previousOrParentNode =
|
|
45607
|
+
previousOrParentNode = null;
|
|
46600
45608
|
var rf = 2;
|
|
46601
45609
|
if (viewNode == null) {
|
|
46602
45610
|
var tView = getOrCreateTView(template, directives || null, pipes || null);
|
|
@@ -46610,7 +45618,7 @@ function renderEmbeddedTemplate(viewNode, template, context, renderer, directive
|
|
|
46610
45618
|
refreshDynamicChildren();
|
|
46611
45619
|
}
|
|
46612
45620
|
finally {
|
|
46613
|
-
leaveView(
|
|
45621
|
+
leaveView(oldView);
|
|
46614
45622
|
isParent = _isParent;
|
|
46615
45623
|
previousOrParentNode = _previousOrParentNode;
|
|
46616
45624
|
}
|
|
@@ -46623,7 +45631,7 @@ function renderComponentOrTemplate(node, hostView, componentOrContext, template)
|
|
|
46623
45631
|
rendererFactory.begin();
|
|
46624
45632
|
}
|
|
46625
45633
|
if (template) {
|
|
46626
|
-
template(getRenderFlags(hostView),
|
|
45634
|
+
template(getRenderFlags(hostView), componentOrContext);
|
|
46627
45635
|
refreshDynamicChildren();
|
|
46628
45636
|
refreshDirectives();
|
|
46629
45637
|
}
|
|
@@ -46655,6 +45663,9 @@ function getRenderFlags(view) {
|
|
|
46655
45663
|
return view.flags & 1 /* CreationMode */ ? 1 /* Create */ | 2 /* Update */ :
|
|
46656
45664
|
2 /* Update */;
|
|
46657
45665
|
}
|
|
45666
|
+
//////////////////////////
|
|
45667
|
+
//// Element
|
|
45668
|
+
//////////////////////////
|
|
46658
45669
|
/**
|
|
46659
45670
|
* Create DOM element. The instruction must later be followed by `elementEnd()` call.
|
|
46660
45671
|
*
|
|
@@ -46798,6 +45809,9 @@ function createTView(defs, pipes) {
|
|
|
46798
45809
|
* performed.
|
|
46799
45810
|
*/
|
|
46800
45811
|
|
|
45812
|
+
//////////////////////////
|
|
45813
|
+
//// Text
|
|
45814
|
+
//////////////////////////
|
|
46801
45815
|
/**
|
|
46802
45816
|
* Create static text node
|
|
46803
45817
|
*
|
|
@@ -46814,6 +45828,9 @@ function createTView(defs, pipes) {
|
|
|
46814
45828
|
* @param value Stringified value to write.
|
|
46815
45829
|
*/
|
|
46816
45830
|
|
|
45831
|
+
//////////////////////////
|
|
45832
|
+
//// Directive
|
|
45833
|
+
//////////////////////////
|
|
46817
45834
|
/**
|
|
46818
45835
|
* Create a directive.
|
|
46819
45836
|
*
|
|
@@ -46831,6 +45848,9 @@ function createTView(defs, pipes) {
|
|
|
46831
45848
|
* current Angular. Example: local refs and inputs on root component.
|
|
46832
45849
|
*/
|
|
46833
45850
|
|
|
45851
|
+
//////////////////////////
|
|
45852
|
+
//// ViewContainer & View
|
|
45853
|
+
//////////////////////////
|
|
46834
45854
|
|
|
46835
45855
|
/**
|
|
46836
45856
|
* Creates an LContainerNode.
|
|
@@ -46863,7 +45883,7 @@ function refreshDynamicChildren() {
|
|
|
46863
45883
|
for (var i = 0; i < container_1.views.length; i++) {
|
|
46864
45884
|
var view = container_1.views[i];
|
|
46865
45885
|
// The directives and pipes are not needed here as an existing view is only being refreshed.
|
|
46866
|
-
renderEmbeddedTemplate(view,
|
|
45886
|
+
renderEmbeddedTemplate(view, view.data.template, view.data.context, renderer);
|
|
46867
45887
|
}
|
|
46868
45888
|
}
|
|
46869
45889
|
}
|
|
@@ -46877,6 +45897,7 @@ function refreshDynamicChildren() {
|
|
|
46877
45897
|
|
|
46878
45898
|
/** Marks the end of an embedded view. */
|
|
46879
45899
|
|
|
45900
|
+
/////////////
|
|
46880
45901
|
/**
|
|
46881
45902
|
* Refreshes components by entering the component view and processing its bindings, queries, etc.
|
|
46882
45903
|
*
|
|
@@ -46888,10 +45909,10 @@ function componentRefresh(directiveIndex, elementIndex) {
|
|
|
46888
45909
|
var element = data[elementIndex];
|
|
46889
45910
|
ngDevMode && assertNodeType(element, 3 /* Element */);
|
|
46890
45911
|
ngDevMode && assertNotNull$1(element.data, "Component's host node should have an LView attached.");
|
|
46891
|
-
var hostView =
|
|
45912
|
+
var hostView = element.data;
|
|
46892
45913
|
// Only attached CheckAlways components or attached, dirty OnPush components should be checked
|
|
46893
45914
|
if (viewAttached(hostView) && hostView.flags & (2 /* CheckAlways */ | 4 /* Dirty */)) {
|
|
46894
|
-
ngDevMode && assertDataInRange(directiveIndex,
|
|
45915
|
+
ngDevMode && assertDataInRange(directiveIndex, directives);
|
|
46895
45916
|
var def = currentView.tView.directives[directiveIndex];
|
|
46896
45917
|
detectChangesInternal(hostView, element, def, getDirectiveInstance(directives[directiveIndex]));
|
|
46897
45918
|
}
|
|
@@ -46943,6 +45964,9 @@ function viewAttached(view) {
|
|
|
46943
45964
|
* @returns The state passed in
|
|
46944
45965
|
*/
|
|
46945
45966
|
|
|
45967
|
+
///////////////////////////////
|
|
45968
|
+
//// Change detection
|
|
45969
|
+
///////////////////////////////
|
|
46946
45970
|
/** If node is an OnPush component, marks its LView dirty. */
|
|
46947
45971
|
|
|
46948
45972
|
/**
|
|
@@ -47178,12 +46202,10 @@ function _getComponentHostLElementNode(component) {
|
|
|
47178
46202
|
var ViewRef$1 = /** @class */ (function () {
|
|
47179
46203
|
function ViewRef(_view, context) {
|
|
47180
46204
|
this._view = _view;
|
|
47181
|
-
this.context =
|
|
46205
|
+
this.context = context;
|
|
47182
46206
|
}
|
|
47183
46207
|
/** @internal */
|
|
47184
|
-
|
|
47185
|
-
ViewRef.prototype._setComponentContext = /** @internal */
|
|
47186
|
-
function (view, context) {
|
|
46208
|
+
ViewRef.prototype._setComponentContext = function (view, context) {
|
|
47187
46209
|
this._view = view;
|
|
47188
46210
|
this.context = context;
|
|
47189
46211
|
};
|
|
@@ -47201,7 +46223,8 @@ var ViewRef$1 = /** @class */ (function () {
|
|
|
47201
46223
|
*
|
|
47202
46224
|
* <!-- TODO: Add a link to a chapter on OnPush components -->
|
|
47203
46225
|
*
|
|
47204
|
-
*
|
|
46226
|
+
* @usageNotes
|
|
46227
|
+
* ### Example
|
|
47205
46228
|
*
|
|
47206
46229
|
* ```typescript
|
|
47207
46230
|
* @Component({
|
|
@@ -47222,73 +46245,7 @@ var ViewRef$1 = /** @class */ (function () {
|
|
|
47222
46245
|
* }
|
|
47223
46246
|
* ```
|
|
47224
46247
|
*/
|
|
47225
|
-
|
|
47226
|
-
* Marks a view and all of its ancestors dirty.
|
|
47227
|
-
*
|
|
47228
|
-
* It also triggers change detection by calling `scheduleTick` internally, which coalesces
|
|
47229
|
-
* multiple `markForCheck` calls to into one change detection run.
|
|
47230
|
-
*
|
|
47231
|
-
* This can be used to ensure an {@link ChangeDetectionStrategy#OnPush OnPush} component is
|
|
47232
|
-
* checked when it needs to be re-rendered but the two normal triggers haven't marked it
|
|
47233
|
-
* dirty (i.e. inputs haven't changed and events haven't fired in the view).
|
|
47234
|
-
*
|
|
47235
|
-
* <!-- TODO: Add a link to a chapter on OnPush components -->
|
|
47236
|
-
*
|
|
47237
|
-
* ### Example ([live demo](https://stackblitz.com/edit/angular-kx7rrw))
|
|
47238
|
-
*
|
|
47239
|
-
* ```typescript
|
|
47240
|
-
* @Component({
|
|
47241
|
-
* selector: 'my-app',
|
|
47242
|
-
* template: `Number of ticks: {{numberOfTicks}}`
|
|
47243
|
-
* changeDetection: ChangeDetectionStrategy.OnPush,
|
|
47244
|
-
* })
|
|
47245
|
-
* class AppComponent {
|
|
47246
|
-
* numberOfTicks = 0;
|
|
47247
|
-
*
|
|
47248
|
-
* constructor(private ref: ChangeDetectorRef) {
|
|
47249
|
-
* setInterval(() => {
|
|
47250
|
-
* this.numberOfTicks++;
|
|
47251
|
-
* // the following is required, otherwise the view will not be updated
|
|
47252
|
-
* this.ref.markForCheck();
|
|
47253
|
-
* }, 1000);
|
|
47254
|
-
* }
|
|
47255
|
-
* }
|
|
47256
|
-
* ```
|
|
47257
|
-
*/
|
|
47258
|
-
ViewRef.prototype.markForCheck = /**
|
|
47259
|
-
* Marks a view and all of its ancestors dirty.
|
|
47260
|
-
*
|
|
47261
|
-
* It also triggers change detection by calling `scheduleTick` internally, which coalesces
|
|
47262
|
-
* multiple `markForCheck` calls to into one change detection run.
|
|
47263
|
-
*
|
|
47264
|
-
* This can be used to ensure an {@link ChangeDetectionStrategy#OnPush OnPush} component is
|
|
47265
|
-
* checked when it needs to be re-rendered but the two normal triggers haven't marked it
|
|
47266
|
-
* dirty (i.e. inputs haven't changed and events haven't fired in the view).
|
|
47267
|
-
*
|
|
47268
|
-
* <!-- TODO: Add a link to a chapter on OnPush components -->
|
|
47269
|
-
*
|
|
47270
|
-
* ### Example ([live demo](https://stackblitz.com/edit/angular-kx7rrw))
|
|
47271
|
-
*
|
|
47272
|
-
* ```typescript
|
|
47273
|
-
* @Component({
|
|
47274
|
-
* selector: 'my-app',
|
|
47275
|
-
* template: `Number of ticks: {{numberOfTicks}}`
|
|
47276
|
-
* changeDetection: ChangeDetectionStrategy.OnPush,
|
|
47277
|
-
* })
|
|
47278
|
-
* class AppComponent {
|
|
47279
|
-
* numberOfTicks = 0;
|
|
47280
|
-
*
|
|
47281
|
-
* constructor(private ref: ChangeDetectorRef) {
|
|
47282
|
-
* setInterval(() => {
|
|
47283
|
-
* this.numberOfTicks++;
|
|
47284
|
-
* // the following is required, otherwise the view will not be updated
|
|
47285
|
-
* this.ref.markForCheck();
|
|
47286
|
-
* }, 1000);
|
|
47287
|
-
* }
|
|
47288
|
-
* }
|
|
47289
|
-
* ```
|
|
47290
|
-
*/
|
|
47291
|
-
function () { markViewDirty(this._view); };
|
|
46248
|
+
ViewRef.prototype.markForCheck = function () { markViewDirty(this._view); };
|
|
47292
46249
|
/**
|
|
47293
46250
|
* Detaches the view from the change detection tree.
|
|
47294
46251
|
*
|
|
@@ -47300,6 +46257,7 @@ var ViewRef$1 = /** @class */ (function () {
|
|
|
47300
46257
|
* <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
|
|
47301
46258
|
* <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
|
|
47302
46259
|
*
|
|
46260
|
+
* @usageNotes
|
|
47303
46261
|
* ### Example
|
|
47304
46262
|
*
|
|
47305
46263
|
* The following example defines a component with a large list of readonly data.
|
|
@@ -47341,111 +46299,7 @@ var ViewRef$1 = /** @class */ (function () {
|
|
|
47341
46299
|
* }
|
|
47342
46300
|
* ```
|
|
47343
46301
|
*/
|
|
47344
|
-
|
|
47345
|
-
* Detaches the view from the change detection tree.
|
|
47346
|
-
*
|
|
47347
|
-
* Detached views will not be checked during change detection runs until they are
|
|
47348
|
-
* re-attached, even if they are dirty. `detach` can be used in combination with
|
|
47349
|
-
* {@link ChangeDetectorRef#detectChanges detectChanges} to implement local change
|
|
47350
|
-
* detection checks.
|
|
47351
|
-
*
|
|
47352
|
-
* <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
|
|
47353
|
-
* <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
|
|
47354
|
-
*
|
|
47355
|
-
* ### Example
|
|
47356
|
-
*
|
|
47357
|
-
* The following example defines a component with a large list of readonly data.
|
|
47358
|
-
* Imagine the data changes constantly, many times per second. For performance reasons,
|
|
47359
|
-
* we want to check and update the list every five seconds. We can do that by detaching
|
|
47360
|
-
* the component's change detector and doing a local check every five seconds.
|
|
47361
|
-
*
|
|
47362
|
-
* ```typescript
|
|
47363
|
-
* class DataProvider {
|
|
47364
|
-
* // in a real application the returned data will be different every time
|
|
47365
|
-
* get data() {
|
|
47366
|
-
* return [1,2,3,4,5];
|
|
47367
|
-
* }
|
|
47368
|
-
* }
|
|
47369
|
-
*
|
|
47370
|
-
* @Component({
|
|
47371
|
-
* selector: 'giant-list',
|
|
47372
|
-
* template: `
|
|
47373
|
-
* <li *ngFor="let d of dataProvider.data">Data {{d}}</li>
|
|
47374
|
-
* `,
|
|
47375
|
-
* })
|
|
47376
|
-
* class GiantList {
|
|
47377
|
-
* constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {
|
|
47378
|
-
* ref.detach();
|
|
47379
|
-
* setInterval(() => {
|
|
47380
|
-
* this.ref.detectChanges();
|
|
47381
|
-
* }, 5000);
|
|
47382
|
-
* }
|
|
47383
|
-
* }
|
|
47384
|
-
*
|
|
47385
|
-
* @Component({
|
|
47386
|
-
* selector: 'app',
|
|
47387
|
-
* providers: [DataProvider],
|
|
47388
|
-
* template: `
|
|
47389
|
-
* <giant-list><giant-list>
|
|
47390
|
-
* `,
|
|
47391
|
-
* })
|
|
47392
|
-
* class App {
|
|
47393
|
-
* }
|
|
47394
|
-
* ```
|
|
47395
|
-
*/
|
|
47396
|
-
ViewRef.prototype.detach = /**
|
|
47397
|
-
* Detaches the view from the change detection tree.
|
|
47398
|
-
*
|
|
47399
|
-
* Detached views will not be checked during change detection runs until they are
|
|
47400
|
-
* re-attached, even if they are dirty. `detach` can be used in combination with
|
|
47401
|
-
* {@link ChangeDetectorRef#detectChanges detectChanges} to implement local change
|
|
47402
|
-
* detection checks.
|
|
47403
|
-
*
|
|
47404
|
-
* <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
|
|
47405
|
-
* <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
|
|
47406
|
-
*
|
|
47407
|
-
* ### Example
|
|
47408
|
-
*
|
|
47409
|
-
* The following example defines a component with a large list of readonly data.
|
|
47410
|
-
* Imagine the data changes constantly, many times per second. For performance reasons,
|
|
47411
|
-
* we want to check and update the list every five seconds. We can do that by detaching
|
|
47412
|
-
* the component's change detector and doing a local check every five seconds.
|
|
47413
|
-
*
|
|
47414
|
-
* ```typescript
|
|
47415
|
-
* class DataProvider {
|
|
47416
|
-
* // in a real application the returned data will be different every time
|
|
47417
|
-
* get data() {
|
|
47418
|
-
* return [1,2,3,4,5];
|
|
47419
|
-
* }
|
|
47420
|
-
* }
|
|
47421
|
-
*
|
|
47422
|
-
* @Component({
|
|
47423
|
-
* selector: 'giant-list',
|
|
47424
|
-
* template: `
|
|
47425
|
-
* <li *ngFor="let d of dataProvider.data">Data {{d}}</li>
|
|
47426
|
-
* `,
|
|
47427
|
-
* })
|
|
47428
|
-
* class GiantList {
|
|
47429
|
-
* constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {
|
|
47430
|
-
* ref.detach();
|
|
47431
|
-
* setInterval(() => {
|
|
47432
|
-
* this.ref.detectChanges();
|
|
47433
|
-
* }, 5000);
|
|
47434
|
-
* }
|
|
47435
|
-
* }
|
|
47436
|
-
*
|
|
47437
|
-
* @Component({
|
|
47438
|
-
* selector: 'app',
|
|
47439
|
-
* providers: [DataProvider],
|
|
47440
|
-
* template: `
|
|
47441
|
-
* <giant-list><giant-list>
|
|
47442
|
-
* `,
|
|
47443
|
-
* })
|
|
47444
|
-
* class App {
|
|
47445
|
-
* }
|
|
47446
|
-
* ```
|
|
47447
|
-
*/
|
|
47448
|
-
function () { this._view.flags &= ~8 /* Attached */; };
|
|
46302
|
+
ViewRef.prototype.detach = function () { this._view.flags &= ~8 /* Attached */; };
|
|
47449
46303
|
/**
|
|
47450
46304
|
* Re-attaches a view to the change detection tree.
|
|
47451
46305
|
*
|
|
@@ -47454,7 +46308,8 @@ var ViewRef$1 = /** @class */ (function () {
|
|
|
47454
46308
|
*
|
|
47455
46309
|
* <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
|
|
47456
46310
|
*
|
|
47457
|
-
*
|
|
46311
|
+
* @usageNotes
|
|
46312
|
+
* ### Example
|
|
47458
46313
|
*
|
|
47459
46314
|
* The following example creates a component displaying `live` data. The component will detach
|
|
47460
46315
|
* its change detector from the main change detector tree when the component's live property
|
|
@@ -47501,117 +46356,7 @@ var ViewRef$1 = /** @class */ (function () {
|
|
|
47501
46356
|
* }
|
|
47502
46357
|
* ```
|
|
47503
46358
|
*/
|
|
47504
|
-
|
|
47505
|
-
* Re-attaches a view to the change detection tree.
|
|
47506
|
-
*
|
|
47507
|
-
* This can be used to re-attach views that were previously detached from the tree
|
|
47508
|
-
* using {@link ChangeDetectorRef#detach detach}. Views are attached to the tree by default.
|
|
47509
|
-
*
|
|
47510
|
-
* <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
|
|
47511
|
-
*
|
|
47512
|
-
* ### Example ([live demo](https://stackblitz.com/edit/angular-ymgsxw))
|
|
47513
|
-
*
|
|
47514
|
-
* The following example creates a component displaying `live` data. The component will detach
|
|
47515
|
-
* its change detector from the main change detector tree when the component's live property
|
|
47516
|
-
* is set to false.
|
|
47517
|
-
*
|
|
47518
|
-
* ```typescript
|
|
47519
|
-
* class DataProvider {
|
|
47520
|
-
* data = 1;
|
|
47521
|
-
*
|
|
47522
|
-
* constructor() {
|
|
47523
|
-
* setInterval(() => {
|
|
47524
|
-
* this.data = this.data * 2;
|
|
47525
|
-
* }, 500);
|
|
47526
|
-
* }
|
|
47527
|
-
* }
|
|
47528
|
-
*
|
|
47529
|
-
* @Component({
|
|
47530
|
-
* selector: 'live-data',
|
|
47531
|
-
* inputs: ['live'],
|
|
47532
|
-
* template: 'Data: {{dataProvider.data}}'
|
|
47533
|
-
* })
|
|
47534
|
-
* class LiveData {
|
|
47535
|
-
* constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {}
|
|
47536
|
-
*
|
|
47537
|
-
* set live(value) {
|
|
47538
|
-
* if (value) {
|
|
47539
|
-
* this.ref.reattach();
|
|
47540
|
-
* } else {
|
|
47541
|
-
* this.ref.detach();
|
|
47542
|
-
* }
|
|
47543
|
-
* }
|
|
47544
|
-
* }
|
|
47545
|
-
*
|
|
47546
|
-
* @Component({
|
|
47547
|
-
* selector: 'my-app',
|
|
47548
|
-
* providers: [DataProvider],
|
|
47549
|
-
* template: `
|
|
47550
|
-
* Live Update: <input type="checkbox" [(ngModel)]="live">
|
|
47551
|
-
* <live-data [live]="live"><live-data>
|
|
47552
|
-
* `,
|
|
47553
|
-
* })
|
|
47554
|
-
* class AppComponent {
|
|
47555
|
-
* live = true;
|
|
47556
|
-
* }
|
|
47557
|
-
* ```
|
|
47558
|
-
*/
|
|
47559
|
-
ViewRef.prototype.reattach = /**
|
|
47560
|
-
* Re-attaches a view to the change detection tree.
|
|
47561
|
-
*
|
|
47562
|
-
* This can be used to re-attach views that were previously detached from the tree
|
|
47563
|
-
* using {@link ChangeDetectorRef#detach detach}. Views are attached to the tree by default.
|
|
47564
|
-
*
|
|
47565
|
-
* <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
|
|
47566
|
-
*
|
|
47567
|
-
* ### Example ([live demo](https://stackblitz.com/edit/angular-ymgsxw))
|
|
47568
|
-
*
|
|
47569
|
-
* The following example creates a component displaying `live` data. The component will detach
|
|
47570
|
-
* its change detector from the main change detector tree when the component's live property
|
|
47571
|
-
* is set to false.
|
|
47572
|
-
*
|
|
47573
|
-
* ```typescript
|
|
47574
|
-
* class DataProvider {
|
|
47575
|
-
* data = 1;
|
|
47576
|
-
*
|
|
47577
|
-
* constructor() {
|
|
47578
|
-
* setInterval(() => {
|
|
47579
|
-
* this.data = this.data * 2;
|
|
47580
|
-
* }, 500);
|
|
47581
|
-
* }
|
|
47582
|
-
* }
|
|
47583
|
-
*
|
|
47584
|
-
* @Component({
|
|
47585
|
-
* selector: 'live-data',
|
|
47586
|
-
* inputs: ['live'],
|
|
47587
|
-
* template: 'Data: {{dataProvider.data}}'
|
|
47588
|
-
* })
|
|
47589
|
-
* class LiveData {
|
|
47590
|
-
* constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {}
|
|
47591
|
-
*
|
|
47592
|
-
* set live(value) {
|
|
47593
|
-
* if (value) {
|
|
47594
|
-
* this.ref.reattach();
|
|
47595
|
-
* } else {
|
|
47596
|
-
* this.ref.detach();
|
|
47597
|
-
* }
|
|
47598
|
-
* }
|
|
47599
|
-
* }
|
|
47600
|
-
*
|
|
47601
|
-
* @Component({
|
|
47602
|
-
* selector: 'my-app',
|
|
47603
|
-
* providers: [DataProvider],
|
|
47604
|
-
* template: `
|
|
47605
|
-
* Live Update: <input type="checkbox" [(ngModel)]="live">
|
|
47606
|
-
* <live-data [live]="live"><live-data>
|
|
47607
|
-
* `,
|
|
47608
|
-
* })
|
|
47609
|
-
* class AppComponent {
|
|
47610
|
-
* live = true;
|
|
47611
|
-
* }
|
|
47612
|
-
* ```
|
|
47613
|
-
*/
|
|
47614
|
-
function () { this._view.flags |= 8 /* Attached */; };
|
|
46359
|
+
ViewRef.prototype.reattach = function () { this._view.flags |= 8 /* Attached */; };
|
|
47615
46360
|
/**
|
|
47616
46361
|
* Checks the view and its children.
|
|
47617
46362
|
*
|
|
@@ -47621,6 +46366,7 @@ var ViewRef$1 = /** @class */ (function () {
|
|
|
47621
46366
|
* <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
|
|
47622
46367
|
* <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
|
|
47623
46368
|
*
|
|
46369
|
+
* @usageNotes
|
|
47624
46370
|
* ### Example
|
|
47625
46371
|
*
|
|
47626
46372
|
* The following example defines a component with a large list of readonly data.
|
|
@@ -47632,66 +46378,14 @@ var ViewRef$1 = /** @class */ (function () {
|
|
|
47632
46378
|
*
|
|
47633
46379
|
* See {@link ChangeDetectorRef#detach detach} for more information.
|
|
47634
46380
|
*/
|
|
47635
|
-
|
|
47636
|
-
* Checks the view and its children.
|
|
47637
|
-
*
|
|
47638
|
-
* This can also be used in combination with {@link ChangeDetectorRef#detach detach} to implement
|
|
47639
|
-
* local change detection checks.
|
|
47640
|
-
*
|
|
47641
|
-
* <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
|
|
47642
|
-
* <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
|
|
47643
|
-
*
|
|
47644
|
-
* ### Example
|
|
47645
|
-
*
|
|
47646
|
-
* The following example defines a component with a large list of readonly data.
|
|
47647
|
-
* Imagine, the data changes constantly, many times per second. For performance reasons,
|
|
47648
|
-
* we want to check and update the list every five seconds.
|
|
47649
|
-
*
|
|
47650
|
-
* We can do that by detaching the component's change detector and doing a local change detection
|
|
47651
|
-
* check every five seconds.
|
|
47652
|
-
*
|
|
47653
|
-
* See {@link ChangeDetectorRef#detach detach} for more information.
|
|
47654
|
-
*/
|
|
47655
|
-
ViewRef.prototype.detectChanges = /**
|
|
47656
|
-
* Checks the view and its children.
|
|
47657
|
-
*
|
|
47658
|
-
* This can also be used in combination with {@link ChangeDetectorRef#detach detach} to implement
|
|
47659
|
-
* local change detection checks.
|
|
47660
|
-
*
|
|
47661
|
-
* <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
|
|
47662
|
-
* <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
|
|
47663
|
-
*
|
|
47664
|
-
* ### Example
|
|
47665
|
-
*
|
|
47666
|
-
* The following example defines a component with a large list of readonly data.
|
|
47667
|
-
* Imagine, the data changes constantly, many times per second. For performance reasons,
|
|
47668
|
-
* we want to check and update the list every five seconds.
|
|
47669
|
-
*
|
|
47670
|
-
* We can do that by detaching the component's change detector and doing a local change detection
|
|
47671
|
-
* check every five seconds.
|
|
47672
|
-
*
|
|
47673
|
-
* See {@link ChangeDetectorRef#detach detach} for more information.
|
|
47674
|
-
*/
|
|
47675
|
-
function () { detectChanges(this.context); };
|
|
46381
|
+
ViewRef.prototype.detectChanges = function () { detectChanges(this.context); };
|
|
47676
46382
|
/**
|
|
47677
46383
|
* Checks the change detector and its children, and throws if any changes are detected.
|
|
47678
46384
|
*
|
|
47679
46385
|
* This is used in development mode to verify that running change detection doesn't
|
|
47680
46386
|
* introduce other changes.
|
|
47681
46387
|
*/
|
|
47682
|
-
|
|
47683
|
-
* Checks the change detector and its children, and throws if any changes are detected.
|
|
47684
|
-
*
|
|
47685
|
-
* This is used in development mode to verify that running change detection doesn't
|
|
47686
|
-
* introduce other changes.
|
|
47687
|
-
*/
|
|
47688
|
-
ViewRef.prototype.checkNoChanges = /**
|
|
47689
|
-
* Checks the change detector and its children, and throws if any changes are detected.
|
|
47690
|
-
*
|
|
47691
|
-
* This is used in development mode to verify that running change detection doesn't
|
|
47692
|
-
* introduce other changes.
|
|
47693
|
-
*/
|
|
47694
|
-
function () { checkNoChanges(this.context); };
|
|
46388
|
+
ViewRef.prototype.checkNoChanges = function () { checkNoChanges(this.context); };
|
|
47695
46389
|
return ViewRef;
|
|
47696
46390
|
}());
|
|
47697
46391
|
var EmbeddedViewRef$1 = /** @class */ (function (_super) {
|
|
@@ -48397,86 +47091,38 @@ var QueryList_ = /** @class */ (function () {
|
|
|
48397
47091
|
* See
|
|
48398
47092
|
* [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)
|
|
48399
47093
|
*/
|
|
48400
|
-
|
|
48401
|
-
* See
|
|
48402
|
-
* [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)
|
|
48403
|
-
*/
|
|
48404
|
-
QueryList_.prototype.map = /**
|
|
48405
|
-
* See
|
|
48406
|
-
* [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)
|
|
48407
|
-
*/
|
|
48408
|
-
function (fn) { return this._values.map(fn); };
|
|
47094
|
+
QueryList_.prototype.map = function (fn) { return this._values.map(fn); };
|
|
48409
47095
|
/**
|
|
48410
47096
|
* See
|
|
48411
47097
|
* [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)
|
|
48412
47098
|
*/
|
|
48413
|
-
|
|
48414
|
-
* See
|
|
48415
|
-
* [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)
|
|
48416
|
-
*/
|
|
48417
|
-
QueryList_.prototype.filter = /**
|
|
48418
|
-
* See
|
|
48419
|
-
* [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)
|
|
48420
|
-
*/
|
|
48421
|
-
function (fn) {
|
|
47099
|
+
QueryList_.prototype.filter = function (fn) {
|
|
48422
47100
|
return this._values.filter(fn);
|
|
48423
47101
|
};
|
|
48424
47102
|
/**
|
|
48425
47103
|
* See
|
|
48426
47104
|
* [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)
|
|
48427
47105
|
*/
|
|
48428
|
-
|
|
48429
|
-
* See
|
|
48430
|
-
* [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)
|
|
48431
|
-
*/
|
|
48432
|
-
QueryList_.prototype.find = /**
|
|
48433
|
-
* See
|
|
48434
|
-
* [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)
|
|
48435
|
-
*/
|
|
48436
|
-
function (fn) {
|
|
47106
|
+
QueryList_.prototype.find = function (fn) {
|
|
48437
47107
|
return this._values.find(fn);
|
|
48438
47108
|
};
|
|
48439
47109
|
/**
|
|
48440
47110
|
* See
|
|
48441
47111
|
* [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)
|
|
48442
47112
|
*/
|
|
48443
|
-
|
|
48444
|
-
* See
|
|
48445
|
-
* [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)
|
|
48446
|
-
*/
|
|
48447
|
-
QueryList_.prototype.reduce = /**
|
|
48448
|
-
* See
|
|
48449
|
-
* [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)
|
|
48450
|
-
*/
|
|
48451
|
-
function (fn, init) {
|
|
47113
|
+
QueryList_.prototype.reduce = function (fn, init) {
|
|
48452
47114
|
return this._values.reduce(fn, init);
|
|
48453
47115
|
};
|
|
48454
47116
|
/**
|
|
48455
47117
|
* See
|
|
48456
47118
|
* [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)
|
|
48457
47119
|
*/
|
|
48458
|
-
|
|
48459
|
-
* See
|
|
48460
|
-
* [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)
|
|
48461
|
-
*/
|
|
48462
|
-
QueryList_.prototype.forEach = /**
|
|
48463
|
-
* See
|
|
48464
|
-
* [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)
|
|
48465
|
-
*/
|
|
48466
|
-
function (fn) { this._values.forEach(fn); };
|
|
47120
|
+
QueryList_.prototype.forEach = function (fn) { this._values.forEach(fn); };
|
|
48467
47121
|
/**
|
|
48468
47122
|
* See
|
|
48469
47123
|
* [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)
|
|
48470
47124
|
*/
|
|
48471
|
-
|
|
48472
|
-
* See
|
|
48473
|
-
* [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)
|
|
48474
|
-
*/
|
|
48475
|
-
QueryList_.prototype.some = /**
|
|
48476
|
-
* See
|
|
48477
|
-
* [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)
|
|
48478
|
-
*/
|
|
48479
|
-
function (fn) {
|
|
47125
|
+
QueryList_.prototype.some = function (fn) {
|
|
48480
47126
|
return this._values.some(fn);
|
|
48481
47127
|
};
|
|
48482
47128
|
QueryList_.prototype.toArray = function () { return this._values.slice(0); };
|
|
@@ -48647,6 +47293,7 @@ var QueryList_ = /** @class */ (function () {
|
|
|
48647
47293
|
* Use of this source code is governed by an MIT-style license that can be
|
|
48648
47294
|
* found in the LICENSE file at https://angular.io/license
|
|
48649
47295
|
*/
|
|
47296
|
+
// clang-format off
|
|
48650
47297
|
|
|
48651
47298
|
// clang-format on
|
|
48652
47299
|
|
|
@@ -48665,6 +47312,11 @@ var QueryList_ = /** @class */ (function () {
|
|
|
48665
47312
|
* Use of this source code is governed by an MIT-style license that can be
|
|
48666
47313
|
* found in the LICENSE file at https://angular.io/license
|
|
48667
47314
|
*/
|
|
47315
|
+
/**
|
|
47316
|
+
* @module
|
|
47317
|
+
* @description
|
|
47318
|
+
* Entry point from which you should import all public core APIs.
|
|
47319
|
+
*/
|
|
48668
47320
|
|
|
48669
47321
|
/**
|
|
48670
47322
|
* @license
|
|
@@ -48673,6 +47325,11 @@ var QueryList_ = /** @class */ (function () {
|
|
|
48673
47325
|
* Use of this source code is governed by an MIT-style license that can be
|
|
48674
47326
|
* found in the LICENSE file at https://angular.io/license
|
|
48675
47327
|
*/
|
|
47328
|
+
/**
|
|
47329
|
+
* @module
|
|
47330
|
+
* @description
|
|
47331
|
+
* Entry point for all public APIs of this package.
|
|
47332
|
+
*/
|
|
48676
47333
|
|
|
48677
47334
|
// This file only reexports content of the `src` folder. Keep it that way.
|
|
48678
47335
|
|
|
@@ -48683,6 +47340,10 @@ var QueryList_ = /** @class */ (function () {
|
|
|
48683
47340
|
* Use of this source code is governed by an MIT-style license that can be
|
|
48684
47341
|
* found in the LICENSE file at https://angular.io/license
|
|
48685
47342
|
*/
|
|
47343
|
+
// This file is not used to build this module. It is only used during editing
|
|
47344
|
+
// by the TypeScript language service and during build for verification. `ngc`
|
|
47345
|
+
// replaces this file with production index.ts when it rewrites private symbol
|
|
47346
|
+
// names.
|
|
48686
47347
|
|
|
48687
47348
|
/**
|
|
48688
47349
|
* @license
|
|
@@ -49660,7 +48321,7 @@ function create(info /* ts.server.PluginCreateInfo */) {
|
|
|
49660
48321
|
* @description
|
|
49661
48322
|
* Entry point for all public APIs of the common package.
|
|
49662
48323
|
*/
|
|
49663
|
-
var VERSION$3 = new Version$1('6.0.
|
|
48324
|
+
var VERSION$3 = new Version$1('6.0.7');
|
|
49664
48325
|
|
|
49665
48326
|
/**
|
|
49666
48327
|
* @license
|