@angular/core 6.0.6 → 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.
- package/bundles/core-testing.umd.js +1 -1
- package/bundles/core-testing.umd.js.map +1 -1
- package/bundles/core-testing.umd.min.js +1 -1
- package/bundles/core-testing.umd.min.js.map +1 -1
- package/bundles/core.umd.js +126 -23
- package/bundles/core.umd.js.map +1 -1
- package/bundles/core.umd.min.js +2 -2
- package/bundles/core.umd.min.js.map +1 -1
- package/core.metadata.json +1 -1
- package/esm2015/src/metadata/directives.js +114 -17
- package/esm2015/src/metadata/ng_module.js +19 -11
- package/esm2015/src/version.js +1 -1
- package/esm5/src/metadata/directives.js +112 -14
- package/esm5/src/metadata/ng_module.js +14 -9
- package/esm5/src/version.js +1 -1
- package/fesm2015/core.js +133 -28
- package/fesm2015/core.js.map +1 -1
- package/fesm2015/testing.js +1 -1
- package/fesm5/core.js +126 -23
- package/fesm5/core.js.map +1 -1
- package/fesm5/testing.js +1 -1
- package/package.json +1 -1
- package/src/metadata/directives.d.ts +382 -397
- package/src/metadata/ng_module.d.ts +49 -38
package/fesm2015/core.js
CHANGED
|
@@ -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
|
*/
|
|
@@ -597,19 +597,101 @@ function isDefaultChangeDetectionStrategy(changeDetectionStrategy) {
|
|
|
597
597
|
*/
|
|
598
598
|
|
|
599
599
|
/**
|
|
600
|
-
*
|
|
601
|
-
*
|
|
602
|
-
* \@Annotation
|
|
600
|
+
* Type of the Component metadata.
|
|
603
601
|
*/
|
|
604
602
|
const Directive = makeDecorator('Directive', (dir = {}) => dir);
|
|
605
603
|
/**
|
|
606
|
-
*
|
|
604
|
+
* Component decorator interface
|
|
605
|
+
*
|
|
607
606
|
* @record
|
|
608
607
|
*/
|
|
609
608
|
|
|
610
609
|
/**
|
|
611
610
|
* Component decorator and metadata.
|
|
612
611
|
*
|
|
612
|
+
* \@usageNotes
|
|
613
|
+
*
|
|
614
|
+
* ### Using animations
|
|
615
|
+
*
|
|
616
|
+
* The following snippet shows an animation trigger in a component's
|
|
617
|
+
* metadata. The trigger is attached to an element in the component's
|
|
618
|
+
* template, using "\@_trigger_name_", and a state expression that is evaluated
|
|
619
|
+
* at run time to determine whether the animation should start.
|
|
620
|
+
*
|
|
621
|
+
* ```typescript
|
|
622
|
+
* \@Component({
|
|
623
|
+
* selector: 'animation-cmp',
|
|
624
|
+
* templateUrl: 'animation-cmp.html',
|
|
625
|
+
* animations: [
|
|
626
|
+
* trigger('myTriggerName', [
|
|
627
|
+
* state('on', style({ opacity: 1 }),
|
|
628
|
+
* state('off', style({ opacity: 0 }),
|
|
629
|
+
* transition('on => off', [
|
|
630
|
+
* animate("1s")
|
|
631
|
+
* ])
|
|
632
|
+
* ])
|
|
633
|
+
* ]
|
|
634
|
+
* })
|
|
635
|
+
* ```
|
|
636
|
+
*
|
|
637
|
+
* ```html
|
|
638
|
+
* <!-- animation-cmp.html -->
|
|
639
|
+
* <div \@myTriggerName="expression">...</div>
|
|
640
|
+
* ```
|
|
641
|
+
*
|
|
642
|
+
* ### Preserving whitespace
|
|
643
|
+
*
|
|
644
|
+
* Removing whitespace can greatly reduce AOT-generated code size, and speed up view creation.
|
|
645
|
+
* As of Angular 6, default for `preserveWhitespaces` is false (whitespace is removed).
|
|
646
|
+
* To change the default setting for all components in your application, set
|
|
647
|
+
* the `preserveWhitespaces` option of the AOT compiler.
|
|
648
|
+
*
|
|
649
|
+
* Current implementation removes whitespace characters as follows:
|
|
650
|
+
* - Trims all whitespaces at the beginning and the end of a template.
|
|
651
|
+
* - Removes whitespace-only text nodes. For example,
|
|
652
|
+
* `<button>Action 1</button> <button>Action 2</button>` becomes
|
|
653
|
+
* `<button>Action 1</button><button>Action 2</button>`.
|
|
654
|
+
* - Replaces a series of whitespace characters in text nodes with a single space.
|
|
655
|
+
* For example, `<span>\n some text\n</span>` becomes `<span> some text </span>`.
|
|
656
|
+
* - Does NOT alter text nodes inside HTML tags such as `<pre>` or `<textarea>`,
|
|
657
|
+
* where whitespace characters are significant.
|
|
658
|
+
*
|
|
659
|
+
* Note that these transformations can influence DOM nodes layout, although impact
|
|
660
|
+
* should be minimal.
|
|
661
|
+
*
|
|
662
|
+
* You can override the default behavior to preserve whitespace characters
|
|
663
|
+
* in certain fragments of a template. For example, you can exclude an entire
|
|
664
|
+
* DOM sub-tree by using the `ngPreserveWhitespaces` attribute:
|
|
665
|
+
*
|
|
666
|
+
* ```html
|
|
667
|
+
* <div ngPreserveWhitespaces>
|
|
668
|
+
* whitespaces are preserved here
|
|
669
|
+
* <span> and here </span>
|
|
670
|
+
* </div>
|
|
671
|
+
* ```
|
|
672
|
+
*
|
|
673
|
+
* You can force a single space to be preserved in a text node by using `&ngsp;`,
|
|
674
|
+
* which is replaced with a space character by Angular's template
|
|
675
|
+
* compiler:
|
|
676
|
+
*
|
|
677
|
+
* ```html
|
|
678
|
+
* <a>Spaces</a>&ngsp;<a>between</a>&ngsp;<a>links.</a>
|
|
679
|
+
* <!-->compiled to be equivalent to:</>
|
|
680
|
+
* <a>Spaces</a> <a>between</a> <a>links.</a>
|
|
681
|
+
* ```
|
|
682
|
+
*
|
|
683
|
+
* Note that sequences of `&ngsp;` are still collapsed to just one space character when
|
|
684
|
+
* the `preserveWhitespaces` option is set to `false`.
|
|
685
|
+
*
|
|
686
|
+
* ```html
|
|
687
|
+
* <a>before</a>&ngsp;&ngsp;&ngsp;<a>after</a>
|
|
688
|
+
* <!-->compiled to be equivalent to:</>
|
|
689
|
+
* <a>Spaces</a> <a>between</a> <a>links.</a>
|
|
690
|
+
* ```
|
|
691
|
+
*
|
|
692
|
+
* To preserve sequences of whitespace characters, use the
|
|
693
|
+
* `ngPreserveWhitespaces` attribute.
|
|
694
|
+
*
|
|
613
695
|
* \@Annotation
|
|
614
696
|
*/
|
|
615
697
|
const Component = makeDecorator('Component', (c = {}) => (Object.assign({ changeDetection: ChangeDetectionStrategy.Default }, c)), Directive);
|
|
@@ -619,26 +701,17 @@ const Component = makeDecorator('Component', (c = {}) => (Object.assign({ change
|
|
|
619
701
|
*/
|
|
620
702
|
|
|
621
703
|
/**
|
|
622
|
-
* Pipe decorator and metadata.
|
|
623
|
-
*
|
|
624
|
-
* Use the `\@Pipe` annotation to declare that a given class is a pipe. A pipe
|
|
625
|
-
* class must also implement `PipeTransform` interface.
|
|
626
704
|
*
|
|
627
|
-
* To use the pipe include a reference to the pipe class in
|
|
628
|
-
* `NgModule.declarations`.
|
|
629
705
|
*
|
|
630
706
|
* \@Annotation
|
|
631
707
|
*/
|
|
632
708
|
const Pipe = makeDecorator('Pipe', (p) => (Object.assign({ pure: true }, p)));
|
|
633
709
|
/**
|
|
634
|
-
* Type of the Input decorator / constructor function.
|
|
635
|
-
*
|
|
636
710
|
*
|
|
637
711
|
* @record
|
|
638
712
|
*/
|
|
639
713
|
|
|
640
714
|
/**
|
|
641
|
-
* Input decorator and metadata.
|
|
642
715
|
*
|
|
643
716
|
* \@Annotation
|
|
644
717
|
*/
|
|
@@ -649,7 +722,6 @@ const Input = makePropDecorator('Input', (bindingPropertyName) => ({ bindingProp
|
|
|
649
722
|
*/
|
|
650
723
|
|
|
651
724
|
/**
|
|
652
|
-
* Output decorator and metadata.
|
|
653
725
|
*
|
|
654
726
|
* \@Annotation
|
|
655
727
|
*/
|
|
@@ -660,7 +732,6 @@ const Output = makePropDecorator('Output', (bindingPropertyName) => ({ bindingPr
|
|
|
660
732
|
*/
|
|
661
733
|
|
|
662
734
|
/**
|
|
663
|
-
* HostBinding decorator and metadata.
|
|
664
735
|
*
|
|
665
736
|
* \@Annotation
|
|
666
737
|
*/
|
|
@@ -671,7 +742,33 @@ const HostBinding = makePropDecorator('HostBinding', (hostPropertyName) => ({ ho
|
|
|
671
742
|
*/
|
|
672
743
|
|
|
673
744
|
/**
|
|
674
|
-
*
|
|
745
|
+
* Binds a CSS event to a host listener and supplies configuration metadata.
|
|
746
|
+
* Angular invokes the supplied handler method when the host element emits the specified event,
|
|
747
|
+
* and updates the bound element with the result.
|
|
748
|
+
* If the handler method returns false, applies `preventDefault` on the bound element.
|
|
749
|
+
*
|
|
750
|
+
* \@usageNotes
|
|
751
|
+
*
|
|
752
|
+
* The following example declares a directive
|
|
753
|
+
* that attaches a click listener to a button and counts clicks.
|
|
754
|
+
*
|
|
755
|
+
* ```
|
|
756
|
+
* \@Directive({selector: 'button[counting]'})
|
|
757
|
+
* class CountClicks {
|
|
758
|
+
* numberOfClicks = 0;
|
|
759
|
+
*
|
|
760
|
+
* \@HostListener('click', ['$event.target'])
|
|
761
|
+
* onClick(btn) {
|
|
762
|
+
* console.log('button', btn, 'number of clicks:', this.numberOfClicks++);
|
|
763
|
+
* }
|
|
764
|
+
* }
|
|
765
|
+
*
|
|
766
|
+
* \@Component({
|
|
767
|
+
* selector: 'app',
|
|
768
|
+
* template: '<button counting>Increment</button>',
|
|
769
|
+
* })
|
|
770
|
+
* class App {}
|
|
771
|
+
* ```
|
|
675
772
|
*
|
|
676
773
|
* \@Annotation
|
|
677
774
|
*/
|
|
@@ -1850,24 +1947,28 @@ const Injectable = makeDecorator('Injectable', undefined, undefined, undefined,
|
|
|
1850
1947
|
* found in the LICENSE file at https://angular.io/license
|
|
1851
1948
|
*/
|
|
1852
1949
|
/**
|
|
1853
|
-
* A wrapper around
|
|
1950
|
+
* A wrapper around an NgModule that associates it with the providers.
|
|
1854
1951
|
*
|
|
1855
1952
|
*
|
|
1856
1953
|
* @record
|
|
1857
1954
|
*/
|
|
1858
1955
|
|
|
1859
1956
|
/**
|
|
1860
|
-
*
|
|
1957
|
+
* A schema definition associated with an NgModule.
|
|
1958
|
+
*
|
|
1959
|
+
* @see `\@NgModule`, `CUSTOM_ELEMENTS_SCHEMA`, `NO_ERRORS_SCHEMA`
|
|
1960
|
+
*
|
|
1961
|
+
* @param name The name of a defined schema.
|
|
1861
1962
|
*
|
|
1862
1963
|
* \@experimental
|
|
1863
1964
|
* @record
|
|
1864
1965
|
*/
|
|
1865
1966
|
|
|
1866
1967
|
/**
|
|
1867
|
-
* Defines a schema that
|
|
1868
|
-
* -
|
|
1869
|
-
* -
|
|
1870
|
-
* elements.
|
|
1968
|
+
* Defines a schema that allows an NgModule to contain the following:
|
|
1969
|
+
* - Non-Angular elements named with dash case (`-`).
|
|
1970
|
+
* - Element properties named with dash case (`-`).
|
|
1971
|
+
* Dash case is the naming convention for custom elements.
|
|
1871
1972
|
*
|
|
1872
1973
|
*
|
|
1873
1974
|
*/
|
|
@@ -1875,7 +1976,7 @@ const CUSTOM_ELEMENTS_SCHEMA = {
|
|
|
1875
1976
|
name: 'custom-elements'
|
|
1876
1977
|
};
|
|
1877
1978
|
/**
|
|
1878
|
-
* Defines a schema that
|
|
1979
|
+
* Defines a schema that allows any property on any element.
|
|
1879
1980
|
*
|
|
1880
1981
|
* \@experimental
|
|
1881
1982
|
*/
|
|
@@ -1890,12 +1991,16 @@ const NO_ERRORS_SCHEMA = {
|
|
|
1890
1991
|
*/
|
|
1891
1992
|
|
|
1892
1993
|
/**
|
|
1893
|
-
* NgModule
|
|
1894
|
-
*
|
|
1994
|
+
* Decorator that marks the following class as an NgModule, and supplies
|
|
1995
|
+
* configuration metadata for it.
|
|
1895
1996
|
*
|
|
1896
1997
|
* \@Annotation
|
|
1897
1998
|
*/
|
|
1898
|
-
const NgModule = makeDecorator('NgModule', (ngModule) => ngModule, undefined, undefined,
|
|
1999
|
+
const NgModule = makeDecorator('NgModule', (ngModule) => ngModule, undefined, undefined, /**
|
|
2000
|
+
* Decorator that marks the following class as an NgModule, and supplies
|
|
2001
|
+
* configuration metadata for it.
|
|
2002
|
+
*/
|
|
2003
|
+
(moduleType, metadata) => {
|
|
1899
2004
|
let /** @type {?} */ imports = (metadata && metadata.imports) || [];
|
|
1900
2005
|
if (metadata && metadata.exports) {
|
|
1901
2006
|
imports = [...imports, metadata.exports];
|
|
@@ -1984,7 +2089,7 @@ class Version {
|
|
|
1984
2089
|
this.patch = full.split('.').slice(2).join('.');
|
|
1985
2090
|
}
|
|
1986
2091
|
}
|
|
1987
|
-
const VERSION = new Version('6.0.
|
|
2092
|
+
const VERSION = new Version('6.0.7');
|
|
1988
2093
|
|
|
1989
2094
|
/**
|
|
1990
2095
|
* @fileoverview added by tsickle
|