@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/bundles/core.umd.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
|
*/
|
|
@@ -510,9 +510,7 @@ function isDefaultChangeDetectionStrategy(changeDetectionStrategy) {
|
|
|
510
510
|
* found in the LICENSE file at https://angular.io/license
|
|
511
511
|
*/
|
|
512
512
|
/**
|
|
513
|
-
*
|
|
514
|
-
*
|
|
515
|
-
* @Annotation
|
|
513
|
+
* Type of the Component metadata.
|
|
516
514
|
*/
|
|
517
515
|
var Directive = makeDecorator('Directive', function (dir) {
|
|
518
516
|
if (dir === void 0) { dir = {}; }
|
|
@@ -521,6 +519,89 @@ var Directive = makeDecorator('Directive', function (dir) {
|
|
|
521
519
|
/**
|
|
522
520
|
* Component decorator and metadata.
|
|
523
521
|
*
|
|
522
|
+
* @usageNotes
|
|
523
|
+
*
|
|
524
|
+
* ### Using animations
|
|
525
|
+
*
|
|
526
|
+
* The following snippet shows an animation trigger in a component's
|
|
527
|
+
* metadata. The trigger is attached to an element in the component's
|
|
528
|
+
* template, using "@_trigger_name_", and a state expression that is evaluated
|
|
529
|
+
* at run time to determine whether the animation should start.
|
|
530
|
+
*
|
|
531
|
+
* ```typescript
|
|
532
|
+
* @Component({
|
|
533
|
+
* selector: 'animation-cmp',
|
|
534
|
+
* templateUrl: 'animation-cmp.html',
|
|
535
|
+
* animations: [
|
|
536
|
+
* trigger('myTriggerName', [
|
|
537
|
+
* state('on', style({ opacity: 1 }),
|
|
538
|
+
* state('off', style({ opacity: 0 }),
|
|
539
|
+
* transition('on => off', [
|
|
540
|
+
* animate("1s")
|
|
541
|
+
* ])
|
|
542
|
+
* ])
|
|
543
|
+
* ]
|
|
544
|
+
* })
|
|
545
|
+
* ```
|
|
546
|
+
*
|
|
547
|
+
* ```html
|
|
548
|
+
* <!-- animation-cmp.html -->
|
|
549
|
+
* <div @myTriggerName="expression">...</div>
|
|
550
|
+
* ```
|
|
551
|
+
*
|
|
552
|
+
* ### Preserving whitespace
|
|
553
|
+
*
|
|
554
|
+
* Removing whitespace can greatly reduce AOT-generated code size, and speed up view creation.
|
|
555
|
+
* As of Angular 6, default for `preserveWhitespaces` is false (whitespace is removed).
|
|
556
|
+
* To change the default setting for all components in your application, set
|
|
557
|
+
* the `preserveWhitespaces` option of the AOT compiler.
|
|
558
|
+
*
|
|
559
|
+
* Current implementation removes whitespace characters as follows:
|
|
560
|
+
* - Trims all whitespaces at the beginning and the end of a template.
|
|
561
|
+
* - Removes whitespace-only text nodes. For example,
|
|
562
|
+
* `<button>Action 1</button> <button>Action 2</button>` becomes
|
|
563
|
+
* `<button>Action 1</button><button>Action 2</button>`.
|
|
564
|
+
* - Replaces a series of whitespace characters in text nodes with a single space.
|
|
565
|
+
* For example, `<span>\n some text\n</span>` becomes `<span> some text </span>`.
|
|
566
|
+
* - Does NOT alter text nodes inside HTML tags such as `<pre>` or `<textarea>`,
|
|
567
|
+
* where whitespace characters are significant.
|
|
568
|
+
*
|
|
569
|
+
* Note that these transformations can influence DOM nodes layout, although impact
|
|
570
|
+
* should be minimal.
|
|
571
|
+
*
|
|
572
|
+
* You can override the default behavior to preserve whitespace characters
|
|
573
|
+
* in certain fragments of a template. For example, you can exclude an entire
|
|
574
|
+
* DOM sub-tree by using the `ngPreserveWhitespaces` attribute:
|
|
575
|
+
*
|
|
576
|
+
* ```html
|
|
577
|
+
* <div ngPreserveWhitespaces>
|
|
578
|
+
* whitespaces are preserved here
|
|
579
|
+
* <span> and here </span>
|
|
580
|
+
* </div>
|
|
581
|
+
* ```
|
|
582
|
+
*
|
|
583
|
+
* You can force a single space to be preserved in a text node by using `&ngsp;`,
|
|
584
|
+
* which is replaced with a space character by Angular's template
|
|
585
|
+
* compiler:
|
|
586
|
+
*
|
|
587
|
+
* ```html
|
|
588
|
+
* <a>Spaces</a>&ngsp;<a>between</a>&ngsp;<a>links.</a>
|
|
589
|
+
* <!-->compiled to be equivalent to:</>
|
|
590
|
+
* <a>Spaces</a> <a>between</a> <a>links.</a>
|
|
591
|
+
* ```
|
|
592
|
+
*
|
|
593
|
+
* Note that sequences of `&ngsp;` are still collapsed to just one space character when
|
|
594
|
+
* the `preserveWhitespaces` option is set to `false`.
|
|
595
|
+
*
|
|
596
|
+
* ```html
|
|
597
|
+
* <a>before</a>&ngsp;&ngsp;&ngsp;<a>after</a>
|
|
598
|
+
* <!-->compiled to be equivalent to:</>
|
|
599
|
+
* <a>Spaces</a> <a>between</a> <a>links.</a>
|
|
600
|
+
* ```
|
|
601
|
+
*
|
|
602
|
+
* To preserve sequences of whitespace characters, use the
|
|
603
|
+
* `ngPreserveWhitespaces` attribute.
|
|
604
|
+
*
|
|
524
605
|
* @Annotation
|
|
525
606
|
*/
|
|
526
607
|
var Component = makeDecorator('Component', function (c) {
|
|
@@ -528,37 +609,54 @@ var Component = makeDecorator('Component', function (c) {
|
|
|
528
609
|
return (__assign({ changeDetection: exports.ChangeDetectionStrategy.Default }, c));
|
|
529
610
|
}, Directive);
|
|
530
611
|
/**
|
|
531
|
-
* Pipe decorator and metadata.
|
|
532
612
|
*
|
|
533
|
-
* Use the `@Pipe` annotation to declare that a given class is a pipe. A pipe
|
|
534
|
-
* class must also implement `PipeTransform` interface.
|
|
535
|
-
*
|
|
536
|
-
* To use the pipe include a reference to the pipe class in
|
|
537
|
-
* `NgModule.declarations`.
|
|
538
613
|
*
|
|
539
614
|
* @Annotation
|
|
540
615
|
*/
|
|
541
616
|
var Pipe = makeDecorator('Pipe', function (p) { return (__assign({ pure: true }, p)); });
|
|
542
617
|
/**
|
|
543
|
-
* Input decorator and metadata.
|
|
544
618
|
*
|
|
545
619
|
* @Annotation
|
|
546
620
|
*/
|
|
547
621
|
var Input = makePropDecorator('Input', function (bindingPropertyName) { return ({ bindingPropertyName: bindingPropertyName }); });
|
|
548
622
|
/**
|
|
549
|
-
* Output decorator and metadata.
|
|
550
623
|
*
|
|
551
624
|
* @Annotation
|
|
552
625
|
*/
|
|
553
626
|
var Output = makePropDecorator('Output', function (bindingPropertyName) { return ({ bindingPropertyName: bindingPropertyName }); });
|
|
554
627
|
/**
|
|
555
|
-
* HostBinding decorator and metadata.
|
|
556
628
|
*
|
|
557
629
|
* @Annotation
|
|
558
630
|
*/
|
|
559
631
|
var HostBinding = makePropDecorator('HostBinding', function (hostPropertyName) { return ({ hostPropertyName: hostPropertyName }); });
|
|
560
632
|
/**
|
|
561
|
-
*
|
|
633
|
+
* Binds a CSS event to a host listener and supplies configuration metadata.
|
|
634
|
+
* Angular invokes the supplied handler method when the host element emits the specified event,
|
|
635
|
+
* and updates the bound element with the result.
|
|
636
|
+
* If the handler method returns false, applies `preventDefault` on the bound element.
|
|
637
|
+
*
|
|
638
|
+
* @usageNotes
|
|
639
|
+
*
|
|
640
|
+
* The following example declares a directive
|
|
641
|
+
* that attaches a click listener to a button and counts clicks.
|
|
642
|
+
*
|
|
643
|
+
* ```
|
|
644
|
+
* @Directive({selector: 'button[counting]'})
|
|
645
|
+
* class CountClicks {
|
|
646
|
+
* numberOfClicks = 0;
|
|
647
|
+
*
|
|
648
|
+
* @HostListener('click', ['$event.target'])
|
|
649
|
+
* onClick(btn) {
|
|
650
|
+
* console.log('button', btn, 'number of clicks:', this.numberOfClicks++);
|
|
651
|
+
* }
|
|
652
|
+
* }
|
|
653
|
+
*
|
|
654
|
+
* @Component({
|
|
655
|
+
* selector: 'app',
|
|
656
|
+
* template: '<button counting>Increment</button>',
|
|
657
|
+
* })
|
|
658
|
+
* class App {}
|
|
659
|
+
* ```
|
|
562
660
|
*
|
|
563
661
|
* @Annotation
|
|
564
662
|
*/
|
|
@@ -1472,10 +1570,10 @@ var Injectable = makeDecorator('Injectable', undefined, undefined, undefined, fu
|
|
|
1472
1570
|
* found in the LICENSE file at https://angular.io/license
|
|
1473
1571
|
*/
|
|
1474
1572
|
/**
|
|
1475
|
-
* Defines a schema that
|
|
1476
|
-
* -
|
|
1477
|
-
* -
|
|
1478
|
-
* elements.
|
|
1573
|
+
* Defines a schema that allows an NgModule to contain the following:
|
|
1574
|
+
* - Non-Angular elements named with dash case (`-`).
|
|
1575
|
+
* - Element properties named with dash case (`-`).
|
|
1576
|
+
* Dash case is the naming convention for custom elements.
|
|
1479
1577
|
*
|
|
1480
1578
|
*
|
|
1481
1579
|
*/
|
|
@@ -1483,7 +1581,7 @@ var CUSTOM_ELEMENTS_SCHEMA = {
|
|
|
1483
1581
|
name: 'custom-elements'
|
|
1484
1582
|
};
|
|
1485
1583
|
/**
|
|
1486
|
-
* Defines a schema that
|
|
1584
|
+
* Defines a schema that allows any property on any element.
|
|
1487
1585
|
*
|
|
1488
1586
|
* @experimental
|
|
1489
1587
|
*/
|
|
@@ -1491,12 +1589,17 @@ var NO_ERRORS_SCHEMA = {
|
|
|
1491
1589
|
name: 'no-errors-schema'
|
|
1492
1590
|
};
|
|
1493
1591
|
/**
|
|
1494
|
-
* NgModule
|
|
1495
|
-
*
|
|
1592
|
+
* Decorator that marks the following class as an NgModule, and supplies
|
|
1593
|
+
* configuration metadata for it.
|
|
1496
1594
|
*
|
|
1497
1595
|
* @Annotation
|
|
1498
1596
|
*/
|
|
1499
|
-
var NgModule = makeDecorator('NgModule', function (ngModule) { return ngModule; }, undefined, undefined,
|
|
1597
|
+
var NgModule = makeDecorator('NgModule', function (ngModule) { return ngModule; }, undefined, undefined,
|
|
1598
|
+
/**
|
|
1599
|
+
* Decorator that marks the following class as an NgModule, and supplies
|
|
1600
|
+
* configuration metadata for it.
|
|
1601
|
+
*/
|
|
1602
|
+
function (moduleType, metadata) {
|
|
1500
1603
|
var imports = (metadata && metadata.imports) || [];
|
|
1501
1604
|
if (metadata && metadata.exports) {
|
|
1502
1605
|
imports = __spread(imports, [metadata.exports]);
|
|
@@ -1574,7 +1677,7 @@ var Version = /** @class */ (function () {
|
|
|
1574
1677
|
}
|
|
1575
1678
|
return Version;
|
|
1576
1679
|
}());
|
|
1577
|
-
var VERSION = new Version('6.0.
|
|
1680
|
+
var VERSION = new Version('6.0.7');
|
|
1578
1681
|
|
|
1579
1682
|
/**
|
|
1580
1683
|
* @license
|