@angular/compiler 13.2.0-rc.1 → 14.0.0-next.1
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/esm2020/src/compiler.mjs +1 -2
- package/esm2020/src/compiler_util/expression_converter.mjs +38 -44
- package/esm2020/src/expression_parser/ast.mjs +1 -35
- package/esm2020/src/expression_parser/parser.mjs +13 -34
- package/esm2020/src/render3/partial/class_metadata.mjs +1 -1
- package/esm2020/src/render3/partial/directive.mjs +1 -1
- package/esm2020/src/render3/partial/factory.mjs +1 -1
- package/esm2020/src/render3/partial/injectable.mjs +1 -1
- package/esm2020/src/render3/partial/injector.mjs +1 -1
- package/esm2020/src/render3/partial/ng_module.mjs +1 -1
- package/esm2020/src/render3/partial/pipe.mjs +1 -1
- package/esm2020/src/render3/r3_ast.mjs +7 -2
- package/esm2020/src/render3/r3_template_transform.mjs +3 -3
- package/esm2020/src/render3/view/compiler.mjs +2 -2
- package/esm2020/src/render3/view/template.mjs +3 -3
- package/esm2020/src/version.mjs +1 -1
- package/fesm2015/compiler.mjs +428 -575
- package/fesm2015/compiler.mjs.map +1 -1
- package/fesm2015/testing.mjs +1 -1
- package/fesm2020/compiler.mjs +428 -575
- package/fesm2020/compiler.mjs.map +1 -1
- package/fesm2020/testing.mjs +1 -1
- package/package.json +1 -1
- package/src/compiler.d.ts +0 -1
- package/src/compiler_util/expression_converter.d.ts +3 -4
- package/src/expression_parser/ast.d.ts +0 -25
- package/src/expression_parser/parser.d.ts +1 -3
- package/src/render3/r3_ast.d.ts +2 -2
- package/esm2020/src/identifiers.mjs +0 -92
- package/src/identifiers.d.ts +0 -44
package/fesm2015/compiler.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular
|
|
2
|
+
* @license Angular v14.0.0-next.1
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -2737,206 +2737,206 @@ function isLongStringLiteral(expr) {
|
|
|
2737
2737
|
* Use of this source code is governed by an MIT-style license that can be
|
|
2738
2738
|
* found in the LICENSE file at https://angular.io/license
|
|
2739
2739
|
*/
|
|
2740
|
-
const CORE
|
|
2741
|
-
class Identifiers
|
|
2740
|
+
const CORE = '@angular/core';
|
|
2741
|
+
class Identifiers {
|
|
2742
2742
|
}
|
|
2743
2743
|
/* Methods */
|
|
2744
|
-
Identifiers
|
|
2745
|
-
Identifiers
|
|
2746
|
-
Identifiers
|
|
2747
|
-
Identifiers
|
|
2744
|
+
Identifiers.NEW_METHOD = 'factory';
|
|
2745
|
+
Identifiers.TRANSFORM_METHOD = 'transform';
|
|
2746
|
+
Identifiers.PATCH_DEPS = 'patchedDeps';
|
|
2747
|
+
Identifiers.core = { name: null, moduleName: CORE };
|
|
2748
2748
|
/* Instructions */
|
|
2749
|
-
Identifiers
|
|
2750
|
-
Identifiers
|
|
2751
|
-
Identifiers
|
|
2752
|
-
Identifiers
|
|
2753
|
-
Identifiers
|
|
2754
|
-
Identifiers
|
|
2755
|
-
Identifiers
|
|
2756
|
-
Identifiers
|
|
2757
|
-
Identifiers
|
|
2758
|
-
Identifiers
|
|
2759
|
-
Identifiers
|
|
2760
|
-
Identifiers
|
|
2761
|
-
Identifiers
|
|
2762
|
-
Identifiers
|
|
2763
|
-
Identifiers
|
|
2764
|
-
Identifiers
|
|
2765
|
-
Identifiers
|
|
2766
|
-
Identifiers
|
|
2767
|
-
Identifiers
|
|
2768
|
-
Identifiers
|
|
2769
|
-
Identifiers
|
|
2770
|
-
Identifiers
|
|
2771
|
-
Identifiers
|
|
2772
|
-
Identifiers
|
|
2773
|
-
Identifiers
|
|
2774
|
-
Identifiers
|
|
2775
|
-
Identifiers
|
|
2776
|
-
Identifiers
|
|
2777
|
-
Identifiers
|
|
2778
|
-
Identifiers
|
|
2779
|
-
Identifiers
|
|
2780
|
-
Identifiers
|
|
2781
|
-
Identifiers
|
|
2782
|
-
Identifiers
|
|
2783
|
-
Identifiers
|
|
2784
|
-
Identifiers
|
|
2785
|
-
Identifiers
|
|
2786
|
-
Identifiers
|
|
2787
|
-
Identifiers
|
|
2788
|
-
Identifiers
|
|
2789
|
-
Identifiers
|
|
2790
|
-
Identifiers
|
|
2791
|
-
Identifiers
|
|
2792
|
-
Identifiers
|
|
2793
|
-
Identifiers
|
|
2794
|
-
Identifiers
|
|
2795
|
-
Identifiers
|
|
2796
|
-
Identifiers
|
|
2797
|
-
Identifiers
|
|
2798
|
-
Identifiers
|
|
2799
|
-
Identifiers
|
|
2800
|
-
Identifiers
|
|
2801
|
-
Identifiers
|
|
2802
|
-
Identifiers
|
|
2803
|
-
Identifiers
|
|
2804
|
-
Identifiers
|
|
2805
|
-
Identifiers
|
|
2806
|
-
Identifiers
|
|
2807
|
-
Identifiers
|
|
2808
|
-
Identifiers
|
|
2809
|
-
Identifiers
|
|
2810
|
-
Identifiers
|
|
2811
|
-
Identifiers
|
|
2812
|
-
Identifiers
|
|
2813
|
-
Identifiers
|
|
2814
|
-
Identifiers
|
|
2815
|
-
Identifiers
|
|
2816
|
-
Identifiers
|
|
2817
|
-
Identifiers
|
|
2818
|
-
Identifiers
|
|
2819
|
-
Identifiers
|
|
2820
|
-
Identifiers
|
|
2821
|
-
Identifiers
|
|
2822
|
-
Identifiers
|
|
2823
|
-
Identifiers
|
|
2824
|
-
Identifiers
|
|
2825
|
-
Identifiers
|
|
2826
|
-
Identifiers
|
|
2827
|
-
Identifiers
|
|
2828
|
-
Identifiers
|
|
2829
|
-
Identifiers
|
|
2830
|
-
Identifiers
|
|
2831
|
-
Identifiers
|
|
2832
|
-
Identifiers
|
|
2833
|
-
Identifiers
|
|
2834
|
-
Identifiers
|
|
2835
|
-
Identifiers
|
|
2836
|
-
Identifiers
|
|
2837
|
-
Identifiers
|
|
2838
|
-
Identifiers
|
|
2839
|
-
Identifiers
|
|
2840
|
-
Identifiers
|
|
2841
|
-
Identifiers
|
|
2842
|
-
Identifiers
|
|
2843
|
-
Identifiers
|
|
2844
|
-
Identifiers
|
|
2845
|
-
Identifiers
|
|
2846
|
-
Identifiers
|
|
2847
|
-
Identifiers
|
|
2848
|
-
Identifiers
|
|
2849
|
-
Identifiers
|
|
2850
|
-
Identifiers
|
|
2851
|
-
Identifiers
|
|
2852
|
-
Identifiers
|
|
2853
|
-
Identifiers
|
|
2854
|
-
Identifiers
|
|
2855
|
-
Identifiers
|
|
2856
|
-
Identifiers
|
|
2857
|
-
Identifiers
|
|
2858
|
-
Identifiers
|
|
2859
|
-
Identifiers
|
|
2860
|
-
Identifiers
|
|
2861
|
-
Identifiers
|
|
2862
|
-
Identifiers
|
|
2863
|
-
Identifiers
|
|
2864
|
-
Identifiers
|
|
2865
|
-
Identifiers
|
|
2866
|
-
Identifiers
|
|
2867
|
-
Identifiers
|
|
2868
|
-
Identifiers
|
|
2869
|
-
Identifiers
|
|
2870
|
-
Identifiers
|
|
2871
|
-
Identifiers
|
|
2872
|
-
Identifiers
|
|
2873
|
-
Identifiers
|
|
2874
|
-
Identifiers
|
|
2749
|
+
Identifiers.namespaceHTML = { name: 'ɵɵnamespaceHTML', moduleName: CORE };
|
|
2750
|
+
Identifiers.namespaceMathML = { name: 'ɵɵnamespaceMathML', moduleName: CORE };
|
|
2751
|
+
Identifiers.namespaceSVG = { name: 'ɵɵnamespaceSVG', moduleName: CORE };
|
|
2752
|
+
Identifiers.element = { name: 'ɵɵelement', moduleName: CORE };
|
|
2753
|
+
Identifiers.elementStart = { name: 'ɵɵelementStart', moduleName: CORE };
|
|
2754
|
+
Identifiers.elementEnd = { name: 'ɵɵelementEnd', moduleName: CORE };
|
|
2755
|
+
Identifiers.advance = { name: 'ɵɵadvance', moduleName: CORE };
|
|
2756
|
+
Identifiers.syntheticHostProperty = { name: 'ɵɵsyntheticHostProperty', moduleName: CORE };
|
|
2757
|
+
Identifiers.syntheticHostListener = { name: 'ɵɵsyntheticHostListener', moduleName: CORE };
|
|
2758
|
+
Identifiers.attribute = { name: 'ɵɵattribute', moduleName: CORE };
|
|
2759
|
+
Identifiers.attributeInterpolate1 = { name: 'ɵɵattributeInterpolate1', moduleName: CORE };
|
|
2760
|
+
Identifiers.attributeInterpolate2 = { name: 'ɵɵattributeInterpolate2', moduleName: CORE };
|
|
2761
|
+
Identifiers.attributeInterpolate3 = { name: 'ɵɵattributeInterpolate3', moduleName: CORE };
|
|
2762
|
+
Identifiers.attributeInterpolate4 = { name: 'ɵɵattributeInterpolate4', moduleName: CORE };
|
|
2763
|
+
Identifiers.attributeInterpolate5 = { name: 'ɵɵattributeInterpolate5', moduleName: CORE };
|
|
2764
|
+
Identifiers.attributeInterpolate6 = { name: 'ɵɵattributeInterpolate6', moduleName: CORE };
|
|
2765
|
+
Identifiers.attributeInterpolate7 = { name: 'ɵɵattributeInterpolate7', moduleName: CORE };
|
|
2766
|
+
Identifiers.attributeInterpolate8 = { name: 'ɵɵattributeInterpolate8', moduleName: CORE };
|
|
2767
|
+
Identifiers.attributeInterpolateV = { name: 'ɵɵattributeInterpolateV', moduleName: CORE };
|
|
2768
|
+
Identifiers.classProp = { name: 'ɵɵclassProp', moduleName: CORE };
|
|
2769
|
+
Identifiers.elementContainerStart = { name: 'ɵɵelementContainerStart', moduleName: CORE };
|
|
2770
|
+
Identifiers.elementContainerEnd = { name: 'ɵɵelementContainerEnd', moduleName: CORE };
|
|
2771
|
+
Identifiers.elementContainer = { name: 'ɵɵelementContainer', moduleName: CORE };
|
|
2772
|
+
Identifiers.styleMap = { name: 'ɵɵstyleMap', moduleName: CORE };
|
|
2773
|
+
Identifiers.styleMapInterpolate1 = { name: 'ɵɵstyleMapInterpolate1', moduleName: CORE };
|
|
2774
|
+
Identifiers.styleMapInterpolate2 = { name: 'ɵɵstyleMapInterpolate2', moduleName: CORE };
|
|
2775
|
+
Identifiers.styleMapInterpolate3 = { name: 'ɵɵstyleMapInterpolate3', moduleName: CORE };
|
|
2776
|
+
Identifiers.styleMapInterpolate4 = { name: 'ɵɵstyleMapInterpolate4', moduleName: CORE };
|
|
2777
|
+
Identifiers.styleMapInterpolate5 = { name: 'ɵɵstyleMapInterpolate5', moduleName: CORE };
|
|
2778
|
+
Identifiers.styleMapInterpolate6 = { name: 'ɵɵstyleMapInterpolate6', moduleName: CORE };
|
|
2779
|
+
Identifiers.styleMapInterpolate7 = { name: 'ɵɵstyleMapInterpolate7', moduleName: CORE };
|
|
2780
|
+
Identifiers.styleMapInterpolate8 = { name: 'ɵɵstyleMapInterpolate8', moduleName: CORE };
|
|
2781
|
+
Identifiers.styleMapInterpolateV = { name: 'ɵɵstyleMapInterpolateV', moduleName: CORE };
|
|
2782
|
+
Identifiers.classMap = { name: 'ɵɵclassMap', moduleName: CORE };
|
|
2783
|
+
Identifiers.classMapInterpolate1 = { name: 'ɵɵclassMapInterpolate1', moduleName: CORE };
|
|
2784
|
+
Identifiers.classMapInterpolate2 = { name: 'ɵɵclassMapInterpolate2', moduleName: CORE };
|
|
2785
|
+
Identifiers.classMapInterpolate3 = { name: 'ɵɵclassMapInterpolate3', moduleName: CORE };
|
|
2786
|
+
Identifiers.classMapInterpolate4 = { name: 'ɵɵclassMapInterpolate4', moduleName: CORE };
|
|
2787
|
+
Identifiers.classMapInterpolate5 = { name: 'ɵɵclassMapInterpolate5', moduleName: CORE };
|
|
2788
|
+
Identifiers.classMapInterpolate6 = { name: 'ɵɵclassMapInterpolate6', moduleName: CORE };
|
|
2789
|
+
Identifiers.classMapInterpolate7 = { name: 'ɵɵclassMapInterpolate7', moduleName: CORE };
|
|
2790
|
+
Identifiers.classMapInterpolate8 = { name: 'ɵɵclassMapInterpolate8', moduleName: CORE };
|
|
2791
|
+
Identifiers.classMapInterpolateV = { name: 'ɵɵclassMapInterpolateV', moduleName: CORE };
|
|
2792
|
+
Identifiers.styleProp = { name: 'ɵɵstyleProp', moduleName: CORE };
|
|
2793
|
+
Identifiers.stylePropInterpolate1 = { name: 'ɵɵstylePropInterpolate1', moduleName: CORE };
|
|
2794
|
+
Identifiers.stylePropInterpolate2 = { name: 'ɵɵstylePropInterpolate2', moduleName: CORE };
|
|
2795
|
+
Identifiers.stylePropInterpolate3 = { name: 'ɵɵstylePropInterpolate3', moduleName: CORE };
|
|
2796
|
+
Identifiers.stylePropInterpolate4 = { name: 'ɵɵstylePropInterpolate4', moduleName: CORE };
|
|
2797
|
+
Identifiers.stylePropInterpolate5 = { name: 'ɵɵstylePropInterpolate5', moduleName: CORE };
|
|
2798
|
+
Identifiers.stylePropInterpolate6 = { name: 'ɵɵstylePropInterpolate6', moduleName: CORE };
|
|
2799
|
+
Identifiers.stylePropInterpolate7 = { name: 'ɵɵstylePropInterpolate7', moduleName: CORE };
|
|
2800
|
+
Identifiers.stylePropInterpolate8 = { name: 'ɵɵstylePropInterpolate8', moduleName: CORE };
|
|
2801
|
+
Identifiers.stylePropInterpolateV = { name: 'ɵɵstylePropInterpolateV', moduleName: CORE };
|
|
2802
|
+
Identifiers.nextContext = { name: 'ɵɵnextContext', moduleName: CORE };
|
|
2803
|
+
Identifiers.templateCreate = { name: 'ɵɵtemplate', moduleName: CORE };
|
|
2804
|
+
Identifiers.text = { name: 'ɵɵtext', moduleName: CORE };
|
|
2805
|
+
Identifiers.enableBindings = { name: 'ɵɵenableBindings', moduleName: CORE };
|
|
2806
|
+
Identifiers.disableBindings = { name: 'ɵɵdisableBindings', moduleName: CORE };
|
|
2807
|
+
Identifiers.getCurrentView = { name: 'ɵɵgetCurrentView', moduleName: CORE };
|
|
2808
|
+
Identifiers.textInterpolate = { name: 'ɵɵtextInterpolate', moduleName: CORE };
|
|
2809
|
+
Identifiers.textInterpolate1 = { name: 'ɵɵtextInterpolate1', moduleName: CORE };
|
|
2810
|
+
Identifiers.textInterpolate2 = { name: 'ɵɵtextInterpolate2', moduleName: CORE };
|
|
2811
|
+
Identifiers.textInterpolate3 = { name: 'ɵɵtextInterpolate3', moduleName: CORE };
|
|
2812
|
+
Identifiers.textInterpolate4 = { name: 'ɵɵtextInterpolate4', moduleName: CORE };
|
|
2813
|
+
Identifiers.textInterpolate5 = { name: 'ɵɵtextInterpolate5', moduleName: CORE };
|
|
2814
|
+
Identifiers.textInterpolate6 = { name: 'ɵɵtextInterpolate6', moduleName: CORE };
|
|
2815
|
+
Identifiers.textInterpolate7 = { name: 'ɵɵtextInterpolate7', moduleName: CORE };
|
|
2816
|
+
Identifiers.textInterpolate8 = { name: 'ɵɵtextInterpolate8', moduleName: CORE };
|
|
2817
|
+
Identifiers.textInterpolateV = { name: 'ɵɵtextInterpolateV', moduleName: CORE };
|
|
2818
|
+
Identifiers.restoreView = { name: 'ɵɵrestoreView', moduleName: CORE };
|
|
2819
|
+
Identifiers.pureFunction0 = { name: 'ɵɵpureFunction0', moduleName: CORE };
|
|
2820
|
+
Identifiers.pureFunction1 = { name: 'ɵɵpureFunction1', moduleName: CORE };
|
|
2821
|
+
Identifiers.pureFunction2 = { name: 'ɵɵpureFunction2', moduleName: CORE };
|
|
2822
|
+
Identifiers.pureFunction3 = { name: 'ɵɵpureFunction3', moduleName: CORE };
|
|
2823
|
+
Identifiers.pureFunction4 = { name: 'ɵɵpureFunction4', moduleName: CORE };
|
|
2824
|
+
Identifiers.pureFunction5 = { name: 'ɵɵpureFunction5', moduleName: CORE };
|
|
2825
|
+
Identifiers.pureFunction6 = { name: 'ɵɵpureFunction6', moduleName: CORE };
|
|
2826
|
+
Identifiers.pureFunction7 = { name: 'ɵɵpureFunction7', moduleName: CORE };
|
|
2827
|
+
Identifiers.pureFunction8 = { name: 'ɵɵpureFunction8', moduleName: CORE };
|
|
2828
|
+
Identifiers.pureFunctionV = { name: 'ɵɵpureFunctionV', moduleName: CORE };
|
|
2829
|
+
Identifiers.pipeBind1 = { name: 'ɵɵpipeBind1', moduleName: CORE };
|
|
2830
|
+
Identifiers.pipeBind2 = { name: 'ɵɵpipeBind2', moduleName: CORE };
|
|
2831
|
+
Identifiers.pipeBind3 = { name: 'ɵɵpipeBind3', moduleName: CORE };
|
|
2832
|
+
Identifiers.pipeBind4 = { name: 'ɵɵpipeBind4', moduleName: CORE };
|
|
2833
|
+
Identifiers.pipeBindV = { name: 'ɵɵpipeBindV', moduleName: CORE };
|
|
2834
|
+
Identifiers.hostProperty = { name: 'ɵɵhostProperty', moduleName: CORE };
|
|
2835
|
+
Identifiers.property = { name: 'ɵɵproperty', moduleName: CORE };
|
|
2836
|
+
Identifiers.propertyInterpolate = { name: 'ɵɵpropertyInterpolate', moduleName: CORE };
|
|
2837
|
+
Identifiers.propertyInterpolate1 = { name: 'ɵɵpropertyInterpolate1', moduleName: CORE };
|
|
2838
|
+
Identifiers.propertyInterpolate2 = { name: 'ɵɵpropertyInterpolate2', moduleName: CORE };
|
|
2839
|
+
Identifiers.propertyInterpolate3 = { name: 'ɵɵpropertyInterpolate3', moduleName: CORE };
|
|
2840
|
+
Identifiers.propertyInterpolate4 = { name: 'ɵɵpropertyInterpolate4', moduleName: CORE };
|
|
2841
|
+
Identifiers.propertyInterpolate5 = { name: 'ɵɵpropertyInterpolate5', moduleName: CORE };
|
|
2842
|
+
Identifiers.propertyInterpolate6 = { name: 'ɵɵpropertyInterpolate6', moduleName: CORE };
|
|
2843
|
+
Identifiers.propertyInterpolate7 = { name: 'ɵɵpropertyInterpolate7', moduleName: CORE };
|
|
2844
|
+
Identifiers.propertyInterpolate8 = { name: 'ɵɵpropertyInterpolate8', moduleName: CORE };
|
|
2845
|
+
Identifiers.propertyInterpolateV = { name: 'ɵɵpropertyInterpolateV', moduleName: CORE };
|
|
2846
|
+
Identifiers.i18n = { name: 'ɵɵi18n', moduleName: CORE };
|
|
2847
|
+
Identifiers.i18nAttributes = { name: 'ɵɵi18nAttributes', moduleName: CORE };
|
|
2848
|
+
Identifiers.i18nExp = { name: 'ɵɵi18nExp', moduleName: CORE };
|
|
2849
|
+
Identifiers.i18nStart = { name: 'ɵɵi18nStart', moduleName: CORE };
|
|
2850
|
+
Identifiers.i18nEnd = { name: 'ɵɵi18nEnd', moduleName: CORE };
|
|
2851
|
+
Identifiers.i18nApply = { name: 'ɵɵi18nApply', moduleName: CORE };
|
|
2852
|
+
Identifiers.i18nPostprocess = { name: 'ɵɵi18nPostprocess', moduleName: CORE };
|
|
2853
|
+
Identifiers.pipe = { name: 'ɵɵpipe', moduleName: CORE };
|
|
2854
|
+
Identifiers.projection = { name: 'ɵɵprojection', moduleName: CORE };
|
|
2855
|
+
Identifiers.projectionDef = { name: 'ɵɵprojectionDef', moduleName: CORE };
|
|
2856
|
+
Identifiers.reference = { name: 'ɵɵreference', moduleName: CORE };
|
|
2857
|
+
Identifiers.inject = { name: 'ɵɵinject', moduleName: CORE };
|
|
2858
|
+
Identifiers.injectAttribute = { name: 'ɵɵinjectAttribute', moduleName: CORE };
|
|
2859
|
+
Identifiers.directiveInject = { name: 'ɵɵdirectiveInject', moduleName: CORE };
|
|
2860
|
+
Identifiers.invalidFactory = { name: 'ɵɵinvalidFactory', moduleName: CORE };
|
|
2861
|
+
Identifiers.invalidFactoryDep = { name: 'ɵɵinvalidFactoryDep', moduleName: CORE };
|
|
2862
|
+
Identifiers.templateRefExtractor = { name: 'ɵɵtemplateRefExtractor', moduleName: CORE };
|
|
2863
|
+
Identifiers.forwardRef = { name: 'forwardRef', moduleName: CORE };
|
|
2864
|
+
Identifiers.resolveForwardRef = { name: 'resolveForwardRef', moduleName: CORE };
|
|
2865
|
+
Identifiers.ɵɵdefineInjectable = { name: 'ɵɵdefineInjectable', moduleName: CORE };
|
|
2866
|
+
Identifiers.declareInjectable = { name: 'ɵɵngDeclareInjectable', moduleName: CORE };
|
|
2867
|
+
Identifiers.InjectableDeclaration = { name: 'ɵɵInjectableDeclaration', moduleName: CORE };
|
|
2868
|
+
Identifiers.resolveWindow = { name: 'ɵɵresolveWindow', moduleName: CORE };
|
|
2869
|
+
Identifiers.resolveDocument = { name: 'ɵɵresolveDocument', moduleName: CORE };
|
|
2870
|
+
Identifiers.resolveBody = { name: 'ɵɵresolveBody', moduleName: CORE };
|
|
2871
|
+
Identifiers.defineComponent = { name: 'ɵɵdefineComponent', moduleName: CORE };
|
|
2872
|
+
Identifiers.declareComponent = { name: 'ɵɵngDeclareComponent', moduleName: CORE };
|
|
2873
|
+
Identifiers.setComponentScope = { name: 'ɵɵsetComponentScope', moduleName: CORE };
|
|
2874
|
+
Identifiers.ChangeDetectionStrategy = {
|
|
2875
2875
|
name: 'ChangeDetectionStrategy',
|
|
2876
|
-
moduleName: CORE
|
|
2876
|
+
moduleName: CORE,
|
|
2877
2877
|
};
|
|
2878
|
-
Identifiers
|
|
2878
|
+
Identifiers.ViewEncapsulation = {
|
|
2879
2879
|
name: 'ViewEncapsulation',
|
|
2880
|
-
moduleName: CORE
|
|
2880
|
+
moduleName: CORE,
|
|
2881
2881
|
};
|
|
2882
|
-
Identifiers
|
|
2882
|
+
Identifiers.ComponentDeclaration = {
|
|
2883
2883
|
name: 'ɵɵComponentDeclaration',
|
|
2884
|
-
moduleName: CORE
|
|
2884
|
+
moduleName: CORE,
|
|
2885
2885
|
};
|
|
2886
|
-
Identifiers
|
|
2886
|
+
Identifiers.FactoryDeclaration = {
|
|
2887
2887
|
name: 'ɵɵFactoryDeclaration',
|
|
2888
|
-
moduleName: CORE
|
|
2888
|
+
moduleName: CORE,
|
|
2889
2889
|
};
|
|
2890
|
-
Identifiers
|
|
2891
|
-
Identifiers
|
|
2892
|
-
Identifiers
|
|
2893
|
-
Identifiers
|
|
2894
|
-
Identifiers
|
|
2890
|
+
Identifiers.declareFactory = { name: 'ɵɵngDeclareFactory', moduleName: CORE };
|
|
2891
|
+
Identifiers.FactoryTarget = { name: 'ɵɵFactoryTarget', moduleName: CORE };
|
|
2892
|
+
Identifiers.defineDirective = { name: 'ɵɵdefineDirective', moduleName: CORE };
|
|
2893
|
+
Identifiers.declareDirective = { name: 'ɵɵngDeclareDirective', moduleName: CORE };
|
|
2894
|
+
Identifiers.DirectiveDeclaration = {
|
|
2895
2895
|
name: 'ɵɵDirectiveDeclaration',
|
|
2896
|
-
moduleName: CORE
|
|
2896
|
+
moduleName: CORE,
|
|
2897
2897
|
};
|
|
2898
|
-
Identifiers
|
|
2899
|
-
Identifiers
|
|
2900
|
-
Identifiers
|
|
2901
|
-
Identifiers
|
|
2902
|
-
Identifiers
|
|
2898
|
+
Identifiers.InjectorDef = { name: 'ɵɵInjectorDef', moduleName: CORE };
|
|
2899
|
+
Identifiers.InjectorDeclaration = { name: 'ɵɵInjectorDeclaration', moduleName: CORE };
|
|
2900
|
+
Identifiers.defineInjector = { name: 'ɵɵdefineInjector', moduleName: CORE };
|
|
2901
|
+
Identifiers.declareInjector = { name: 'ɵɵngDeclareInjector', moduleName: CORE };
|
|
2902
|
+
Identifiers.NgModuleDeclaration = {
|
|
2903
2903
|
name: 'ɵɵNgModuleDeclaration',
|
|
2904
|
-
moduleName: CORE
|
|
2904
|
+
moduleName: CORE,
|
|
2905
2905
|
};
|
|
2906
|
-
Identifiers
|
|
2906
|
+
Identifiers.ModuleWithProviders = {
|
|
2907
2907
|
name: 'ModuleWithProviders',
|
|
2908
|
-
moduleName: CORE
|
|
2908
|
+
moduleName: CORE,
|
|
2909
2909
|
};
|
|
2910
|
-
Identifiers
|
|
2911
|
-
Identifiers
|
|
2912
|
-
Identifiers
|
|
2913
|
-
Identifiers
|
|
2914
|
-
Identifiers
|
|
2915
|
-
Identifiers
|
|
2916
|
-
Identifiers
|
|
2917
|
-
Identifiers
|
|
2918
|
-
Identifiers
|
|
2919
|
-
Identifiers
|
|
2920
|
-
Identifiers
|
|
2921
|
-
Identifiers
|
|
2922
|
-
Identifiers
|
|
2923
|
-
Identifiers
|
|
2924
|
-
Identifiers
|
|
2925
|
-
Identifiers
|
|
2926
|
-
Identifiers
|
|
2927
|
-
Identifiers
|
|
2910
|
+
Identifiers.defineNgModule = { name: 'ɵɵdefineNgModule', moduleName: CORE };
|
|
2911
|
+
Identifiers.declareNgModule = { name: 'ɵɵngDeclareNgModule', moduleName: CORE };
|
|
2912
|
+
Identifiers.setNgModuleScope = { name: 'ɵɵsetNgModuleScope', moduleName: CORE };
|
|
2913
|
+
Identifiers.PipeDeclaration = { name: 'ɵɵPipeDeclaration', moduleName: CORE };
|
|
2914
|
+
Identifiers.definePipe = { name: 'ɵɵdefinePipe', moduleName: CORE };
|
|
2915
|
+
Identifiers.declarePipe = { name: 'ɵɵngDeclarePipe', moduleName: CORE };
|
|
2916
|
+
Identifiers.declareClassMetadata = { name: 'ɵɵngDeclareClassMetadata', moduleName: CORE };
|
|
2917
|
+
Identifiers.setClassMetadata = { name: 'ɵsetClassMetadata', moduleName: CORE };
|
|
2918
|
+
Identifiers.queryRefresh = { name: 'ɵɵqueryRefresh', moduleName: CORE };
|
|
2919
|
+
Identifiers.viewQuery = { name: 'ɵɵviewQuery', moduleName: CORE };
|
|
2920
|
+
Identifiers.loadQuery = { name: 'ɵɵloadQuery', moduleName: CORE };
|
|
2921
|
+
Identifiers.contentQuery = { name: 'ɵɵcontentQuery', moduleName: CORE };
|
|
2922
|
+
Identifiers.NgOnChangesFeature = { name: 'ɵɵNgOnChangesFeature', moduleName: CORE };
|
|
2923
|
+
Identifiers.InheritDefinitionFeature = { name: 'ɵɵInheritDefinitionFeature', moduleName: CORE };
|
|
2924
|
+
Identifiers.CopyDefinitionFeature = { name: 'ɵɵCopyDefinitionFeature', moduleName: CORE };
|
|
2925
|
+
Identifiers.ProvidersFeature = { name: 'ɵɵProvidersFeature', moduleName: CORE };
|
|
2926
|
+
Identifiers.listener = { name: 'ɵɵlistener', moduleName: CORE };
|
|
2927
|
+
Identifiers.getInheritedFactory = {
|
|
2928
2928
|
name: 'ɵɵgetInheritedFactory',
|
|
2929
|
-
moduleName: CORE
|
|
2929
|
+
moduleName: CORE,
|
|
2930
2930
|
};
|
|
2931
2931
|
// sanitization-related functions
|
|
2932
|
-
Identifiers
|
|
2933
|
-
Identifiers
|
|
2934
|
-
Identifiers
|
|
2935
|
-
Identifiers
|
|
2936
|
-
Identifiers
|
|
2937
|
-
Identifiers
|
|
2938
|
-
Identifiers
|
|
2939
|
-
Identifiers
|
|
2932
|
+
Identifiers.sanitizeHtml = { name: 'ɵɵsanitizeHtml', moduleName: CORE };
|
|
2933
|
+
Identifiers.sanitizeStyle = { name: 'ɵɵsanitizeStyle', moduleName: CORE };
|
|
2934
|
+
Identifiers.sanitizeResourceUrl = { name: 'ɵɵsanitizeResourceUrl', moduleName: CORE };
|
|
2935
|
+
Identifiers.sanitizeScript = { name: 'ɵɵsanitizeScript', moduleName: CORE };
|
|
2936
|
+
Identifiers.sanitizeUrl = { name: 'ɵɵsanitizeUrl', moduleName: CORE };
|
|
2937
|
+
Identifiers.sanitizeUrlOrResourceUrl = { name: 'ɵɵsanitizeUrlOrResourceUrl', moduleName: CORE };
|
|
2938
|
+
Identifiers.trustConstantHtml = { name: 'ɵɵtrustConstantHtml', moduleName: CORE };
|
|
2939
|
+
Identifiers.trustConstantResourceUrl = { name: 'ɵɵtrustConstantResourceUrl', moduleName: CORE };
|
|
2940
2940
|
|
|
2941
2941
|
/**
|
|
2942
2942
|
* @license
|
|
@@ -3678,7 +3678,7 @@ function convertFromMaybeForwardRefExpression({ expression, forwardRef }) {
|
|
|
3678
3678
|
* ```
|
|
3679
3679
|
*/
|
|
3680
3680
|
function generateForwardRef(expr) {
|
|
3681
|
-
return importExpr(Identifiers
|
|
3681
|
+
return importExpr(Identifiers.forwardRef).callFn([fn([], [new ReturnStatement(expr)])]);
|
|
3682
3682
|
}
|
|
3683
3683
|
|
|
3684
3684
|
var R3FactoryDelegateType;
|
|
@@ -3726,7 +3726,7 @@ function compileFactoryFunction(meta) {
|
|
|
3726
3726
|
const r = variable('r');
|
|
3727
3727
|
body.push(r.set(NULL_EXPR).toDeclStmt());
|
|
3728
3728
|
const ctorStmt = ctorExpr !== null ? r.set(ctorExpr).toStmt() :
|
|
3729
|
-
importExpr(Identifiers
|
|
3729
|
+
importExpr(Identifiers.invalidFactory).callFn([]).toStmt();
|
|
3730
3730
|
body.push(ifStmt(t, [ctorStmt], [r.set(nonCtorExpr).toStmt()]));
|
|
3731
3731
|
return r;
|
|
3732
3732
|
}
|
|
@@ -3749,11 +3749,11 @@ function compileFactoryFunction(meta) {
|
|
|
3749
3749
|
}
|
|
3750
3750
|
if (retExpr === null) {
|
|
3751
3751
|
// The expression cannot be formed so render an `ɵɵinvalidFactory()` call.
|
|
3752
|
-
body.push(importExpr(Identifiers
|
|
3752
|
+
body.push(importExpr(Identifiers.invalidFactory).callFn([]).toStmt());
|
|
3753
3753
|
}
|
|
3754
3754
|
else if (baseFactoryVar !== null) {
|
|
3755
3755
|
// This factory uses a base factory, so call `ɵɵgetInheritedFactory()` to compute it.
|
|
3756
|
-
const getInheritedFactoryCall = importExpr(Identifiers
|
|
3756
|
+
const getInheritedFactoryCall = importExpr(Identifiers.getInheritedFactory).callFn([meta.internalType]);
|
|
3757
3757
|
// Memoize the base factoryFn: `baseFactory || (baseFactory = ɵɵgetInheritedFactory(...))`
|
|
3758
3758
|
const baseFactory = new BinaryOperatorExpr(BinaryOperator.Or, baseFactoryVar, baseFactoryVar.set(getInheritedFactoryCall));
|
|
3759
3759
|
body.push(new ReturnStatement(baseFactory.callFn([typeForCtor])));
|
|
@@ -3778,7 +3778,7 @@ function compileFactoryFunction(meta) {
|
|
|
3778
3778
|
}
|
|
3779
3779
|
function createFactoryType(meta) {
|
|
3780
3780
|
const ctorDepsType = meta.deps !== null && meta.deps !== 'invalid' ? createCtorDepsType(meta.deps) : NONE_TYPE;
|
|
3781
|
-
return expressionType(importExpr(Identifiers
|
|
3781
|
+
return expressionType(importExpr(Identifiers.FactoryDeclaration, [typeWithParameters(meta.type.type, meta.typeArgumentCount), ctorDepsType]));
|
|
3782
3782
|
}
|
|
3783
3783
|
function injectDependencies(deps, target) {
|
|
3784
3784
|
return deps.map((dep, index) => compileInjectDependency(dep, target, index));
|
|
@@ -3786,7 +3786,7 @@ function injectDependencies(deps, target) {
|
|
|
3786
3786
|
function compileInjectDependency(dep, target, index) {
|
|
3787
3787
|
// Interpret the dependency according to its resolved type.
|
|
3788
3788
|
if (dep.token === null) {
|
|
3789
|
-
return importExpr(Identifiers
|
|
3789
|
+
return importExpr(Identifiers.invalidFactoryDep).callFn([literal(index)]);
|
|
3790
3790
|
}
|
|
3791
3791
|
else if (dep.attributeNameType === null) {
|
|
3792
3792
|
// Build up the injection flags according to the metadata.
|
|
@@ -3814,7 +3814,7 @@ function compileInjectDependency(dep, target, index) {
|
|
|
3814
3814
|
//
|
|
3815
3815
|
// The `dep.attributeTypeName` is only actually used (in `createCtorDepType()`) to generate
|
|
3816
3816
|
// typings.
|
|
3817
|
-
return importExpr(Identifiers
|
|
3817
|
+
return importExpr(Identifiers.injectAttribute).callFn([dep.token]);
|
|
3818
3818
|
}
|
|
3819
3819
|
}
|
|
3820
3820
|
function createCtorDepsType(deps) {
|
|
@@ -3866,11 +3866,11 @@ function getInjectFn(target) {
|
|
|
3866
3866
|
case FactoryTarget$1.Component:
|
|
3867
3867
|
case FactoryTarget$1.Directive:
|
|
3868
3868
|
case FactoryTarget$1.Pipe:
|
|
3869
|
-
return Identifiers
|
|
3869
|
+
return Identifiers.directiveInject;
|
|
3870
3870
|
case FactoryTarget$1.NgModule:
|
|
3871
3871
|
case FactoryTarget$1.Injectable:
|
|
3872
3872
|
default:
|
|
3873
|
-
return Identifiers
|
|
3873
|
+
return Identifiers.inject;
|
|
3874
3874
|
}
|
|
3875
3875
|
}
|
|
3876
3876
|
|
|
@@ -3997,7 +3997,12 @@ class Element$1 {
|
|
|
3997
3997
|
}
|
|
3998
3998
|
}
|
|
3999
3999
|
class Template {
|
|
4000
|
-
constructor(
|
|
4000
|
+
constructor(
|
|
4001
|
+
// tagName is the name of the container element, if applicable.
|
|
4002
|
+
// `null` is a special case for when there is a structural directive on an `ng-template` so
|
|
4003
|
+
// the renderer can differentiate between the synthetic template and the one written in the
|
|
4004
|
+
// file.
|
|
4005
|
+
tagName, attributes, inputs, outputs, templateAttrs, children, references, variables, sourceSpan, startSourceSpan, endSourceSpan, i18n) {
|
|
4001
4006
|
this.tagName = tagName;
|
|
4002
4007
|
this.attributes = attributes;
|
|
4003
4008
|
this.inputs = inputs;
|
|
@@ -4961,7 +4966,7 @@ function getQueryPredicate(query, constantPool) {
|
|
|
4961
4966
|
case 2 /* Unwrapped */:
|
|
4962
4967
|
return query.predicate.expression;
|
|
4963
4968
|
case 1 /* Wrapped */:
|
|
4964
|
-
return importExpr(Identifiers
|
|
4969
|
+
return importExpr(Identifiers.resolveForwardRef).callFn([query.predicate.expression]);
|
|
4965
4970
|
}
|
|
4966
4971
|
}
|
|
4967
4972
|
}
|
|
@@ -5106,7 +5111,7 @@ function compileInjectable(meta, resolveForwardRefs) {
|
|
|
5106
5111
|
}
|
|
5107
5112
|
else if (meta.useExisting !== undefined) {
|
|
5108
5113
|
// useExisting is an `inject` call on the existing token.
|
|
5109
|
-
result = compileFactoryFunction(Object.assign(Object.assign({}, factoryMeta), { expression: importExpr(Identifiers
|
|
5114
|
+
result = compileFactoryFunction(Object.assign(Object.assign({}, factoryMeta), { expression: importExpr(Identifiers.inject).callFn([meta.useExisting.expression]) }));
|
|
5110
5115
|
}
|
|
5111
5116
|
else {
|
|
5112
5117
|
result = {
|
|
@@ -5122,7 +5127,7 @@ function compileInjectable(meta, resolveForwardRefs) {
|
|
|
5122
5127
|
if (meta.providedIn.expression.value !== null) {
|
|
5123
5128
|
injectableProps.set('providedIn', convertFromMaybeForwardRefExpression(meta.providedIn));
|
|
5124
5129
|
}
|
|
5125
|
-
const expression = importExpr(Identifiers
|
|
5130
|
+
const expression = importExpr(Identifiers.ɵɵdefineInjectable)
|
|
5126
5131
|
.callFn([injectableProps.toLiteralMap()], undefined, true);
|
|
5127
5132
|
return {
|
|
5128
5133
|
expression,
|
|
@@ -5131,7 +5136,7 @@ function compileInjectable(meta, resolveForwardRefs) {
|
|
|
5131
5136
|
};
|
|
5132
5137
|
}
|
|
5133
5138
|
function createInjectableType(meta) {
|
|
5134
|
-
return new ExpressionType(importExpr(Identifiers
|
|
5139
|
+
return new ExpressionType(importExpr(Identifiers.InjectableDeclaration, [typeWithParameters(meta.type.type, meta.typeArgumentCount)]));
|
|
5135
5140
|
}
|
|
5136
5141
|
function delegateToFactory(type, internalType, unwrapForwardRefs) {
|
|
5137
5142
|
if (type.node === internalType.node) {
|
|
@@ -5154,7 +5159,7 @@ function delegateToFactory(type, internalType, unwrapForwardRefs) {
|
|
|
5154
5159
|
// ```
|
|
5155
5160
|
// factory: function(t) { return core.resolveForwardRef(type).ɵfac(t); }
|
|
5156
5161
|
// ```
|
|
5157
|
-
const unwrappedType = importExpr(Identifiers
|
|
5162
|
+
const unwrappedType = importExpr(Identifiers.resolveForwardRef).callFn([internalType]);
|
|
5158
5163
|
return createFactoryFunction(unwrappedType);
|
|
5159
5164
|
}
|
|
5160
5165
|
function createFactoryFunction(type) {
|
|
@@ -5843,12 +5848,12 @@ function compileInjector(meta) {
|
|
|
5843
5848
|
if (meta.imports.length > 0) {
|
|
5844
5849
|
definitionMap.set('imports', literalArr(meta.imports));
|
|
5845
5850
|
}
|
|
5846
|
-
const expression = importExpr(Identifiers
|
|
5851
|
+
const expression = importExpr(Identifiers.defineInjector).callFn([definitionMap.toLiteralMap()], undefined, true);
|
|
5847
5852
|
const type = createInjectorType(meta);
|
|
5848
5853
|
return { expression, type, statements: [] };
|
|
5849
5854
|
}
|
|
5850
5855
|
function createInjectorType(meta) {
|
|
5851
|
-
return new ExpressionType(importExpr(Identifiers
|
|
5856
|
+
return new ExpressionType(importExpr(Identifiers.InjectorDeclaration, [new ExpressionType(meta.type.type)]));
|
|
5852
5857
|
}
|
|
5853
5858
|
|
|
5854
5859
|
/**
|
|
@@ -5925,7 +5930,7 @@ function compileNgModule(meta) {
|
|
|
5925
5930
|
if (id !== null) {
|
|
5926
5931
|
definitionMap.set('id', id);
|
|
5927
5932
|
}
|
|
5928
|
-
const expression = importExpr(Identifiers
|
|
5933
|
+
const expression = importExpr(Identifiers.defineNgModule).callFn([definitionMap.toLiteralMap()], undefined, true);
|
|
5929
5934
|
const type = createNgModuleType(meta);
|
|
5930
5935
|
return { expression, type, statements };
|
|
5931
5936
|
}
|
|
@@ -5954,10 +5959,10 @@ function compileNgModuleDeclarationExpression(meta) {
|
|
|
5954
5959
|
if (meta.id !== undefined) {
|
|
5955
5960
|
definitionMap.set('id', new WrappedNodeExpr(meta.id));
|
|
5956
5961
|
}
|
|
5957
|
-
return importExpr(Identifiers
|
|
5962
|
+
return importExpr(Identifiers.defineNgModule).callFn([definitionMap.toLiteralMap()]);
|
|
5958
5963
|
}
|
|
5959
5964
|
function createNgModuleType({ type: moduleType, declarations, imports, exports }) {
|
|
5960
|
-
return new ExpressionType(importExpr(Identifiers
|
|
5965
|
+
return new ExpressionType(importExpr(Identifiers.NgModuleDeclaration, [
|
|
5961
5966
|
new ExpressionType(moduleType.type), tupleTypeOf(declarations), tupleTypeOf(imports),
|
|
5962
5967
|
tupleTypeOf(exports)
|
|
5963
5968
|
]));
|
|
@@ -5985,7 +5990,7 @@ function generateSetNgModuleScopeCall(meta) {
|
|
|
5985
5990
|
}
|
|
5986
5991
|
// setNgModuleScope(...)
|
|
5987
5992
|
const fnCall = new InvokeFunctionExpr(
|
|
5988
|
-
/* fn */ importExpr(Identifiers
|
|
5993
|
+
/* fn */ importExpr(Identifiers.setNgModuleScope),
|
|
5989
5994
|
/* args */ [moduleType, scopeMap.toLiteralMap()]);
|
|
5990
5995
|
// (ngJitMode guard) && setNgModuleScope(...)
|
|
5991
5996
|
const guardedCall = jitOnlyGuardedExpression(fnCall);
|
|
@@ -6019,12 +6024,12 @@ function compilePipeFromMetadata(metadata) {
|
|
|
6019
6024
|
definitionMapValues.push({ key: 'type', value: metadata.type.value, quoted: false });
|
|
6020
6025
|
// e.g. `pure: true`
|
|
6021
6026
|
definitionMapValues.push({ key: 'pure', value: literal(metadata.pure), quoted: false });
|
|
6022
|
-
const expression = importExpr(Identifiers
|
|
6027
|
+
const expression = importExpr(Identifiers.definePipe).callFn([literalMap(definitionMapValues)], undefined, true);
|
|
6023
6028
|
const type = createPipeType(metadata);
|
|
6024
6029
|
return { expression, type, statements: [] };
|
|
6025
6030
|
}
|
|
6026
6031
|
function createPipeType(metadata) {
|
|
6027
|
-
return new ExpressionType(importExpr(Identifiers
|
|
6032
|
+
return new ExpressionType(importExpr(Identifiers.PipeDeclaration, [
|
|
6028
6033
|
typeWithParameters(metadata.type.type, metadata.typeArgumentCount),
|
|
6029
6034
|
new ExpressionType(new LiteralExpr(metadata.pipeName)),
|
|
6030
6035
|
]));
|
|
@@ -6073,33 +6078,6 @@ class ASTWithName extends AST {
|
|
|
6073
6078
|
this.nameSpan = nameSpan;
|
|
6074
6079
|
}
|
|
6075
6080
|
}
|
|
6076
|
-
/**
|
|
6077
|
-
* Represents a quoted expression of the form:
|
|
6078
|
-
*
|
|
6079
|
-
* quote = prefix `:` uninterpretedExpression
|
|
6080
|
-
* prefix = identifier
|
|
6081
|
-
* uninterpretedExpression = arbitrary string
|
|
6082
|
-
*
|
|
6083
|
-
* A quoted expression is meant to be pre-processed by an AST transformer that
|
|
6084
|
-
* converts it into another AST that no longer contains quoted expressions.
|
|
6085
|
-
* It is meant to allow third-party developers to extend Angular template
|
|
6086
|
-
* expression language. The `uninterpretedExpression` part of the quote is
|
|
6087
|
-
* therefore not interpreted by the Angular's own expression parser.
|
|
6088
|
-
*/
|
|
6089
|
-
class Quote extends AST {
|
|
6090
|
-
constructor(span, sourceSpan, prefix, uninterpretedExpression, location) {
|
|
6091
|
-
super(span, sourceSpan);
|
|
6092
|
-
this.prefix = prefix;
|
|
6093
|
-
this.uninterpretedExpression = uninterpretedExpression;
|
|
6094
|
-
this.location = location;
|
|
6095
|
-
}
|
|
6096
|
-
visit(visitor, context = null) {
|
|
6097
|
-
return visitor.visitQuote(this, context);
|
|
6098
|
-
}
|
|
6099
|
-
toString() {
|
|
6100
|
-
return 'Quote';
|
|
6101
|
-
}
|
|
6102
|
-
}
|
|
6103
6081
|
class EmptyExpr extends AST {
|
|
6104
6082
|
visit(visitor, context = null) {
|
|
6105
6083
|
// do nothing
|
|
@@ -6480,7 +6458,6 @@ class RecursiveAstVisitor {
|
|
|
6480
6458
|
this.visit(ast.receiver, context);
|
|
6481
6459
|
this.visitAll(ast.args, context);
|
|
6482
6460
|
}
|
|
6483
|
-
visitQuote(ast, context) { }
|
|
6484
6461
|
// This is not part of the AstVisitor interface, just a helper method
|
|
6485
6462
|
visitAll(asts, context) {
|
|
6486
6463
|
for (const ast of asts) {
|
|
@@ -6563,9 +6540,6 @@ class AstTransformer {
|
|
|
6563
6540
|
visitChain(ast, context) {
|
|
6564
6541
|
return new Chain(ast.span, ast.sourceSpan, this.visitAll(ast.expressions));
|
|
6565
6542
|
}
|
|
6566
|
-
visitQuote(ast, context) {
|
|
6567
|
-
return new Quote(ast.span, ast.sourceSpan, ast.prefix, ast.uninterpretedExpression, ast.location);
|
|
6568
|
-
}
|
|
6569
6543
|
visitSafeKeyedRead(ast, context) {
|
|
6570
6544
|
return new SafeKeyedRead(ast.span, ast.sourceSpan, ast.receiver.visit(this), ast.key.visit(this));
|
|
6571
6545
|
}
|
|
@@ -6728,9 +6702,6 @@ class AstMemoryEfficientTransformer {
|
|
|
6728
6702
|
}
|
|
6729
6703
|
return ast;
|
|
6730
6704
|
}
|
|
6731
|
-
visitQuote(ast, context) {
|
|
6732
|
-
return ast;
|
|
6733
|
-
}
|
|
6734
6705
|
visitSafeKeyedRead(ast, context) {
|
|
6735
6706
|
const obj = ast.receiver.visit(this);
|
|
6736
6707
|
const key = ast.key.visit(this);
|
|
@@ -6797,98 +6768,6 @@ class BoundElementProperty {
|
|
|
6797
6768
|
}
|
|
6798
6769
|
}
|
|
6799
6770
|
|
|
6800
|
-
/**
|
|
6801
|
-
* @license
|
|
6802
|
-
* Copyright Google LLC All Rights Reserved.
|
|
6803
|
-
*
|
|
6804
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6805
|
-
* found in the LICENSE file at https://angular.io/license
|
|
6806
|
-
*/
|
|
6807
|
-
const CORE = '@angular/core';
|
|
6808
|
-
class Identifiers {
|
|
6809
|
-
}
|
|
6810
|
-
Identifiers.ANALYZE_FOR_ENTRY_COMPONENTS = {
|
|
6811
|
-
name: 'ANALYZE_FOR_ENTRY_COMPONENTS',
|
|
6812
|
-
moduleName: CORE,
|
|
6813
|
-
};
|
|
6814
|
-
Identifiers.ElementRef = { name: 'ElementRef', moduleName: CORE };
|
|
6815
|
-
Identifiers.NgModuleRef = { name: 'NgModuleRef', moduleName: CORE };
|
|
6816
|
-
Identifiers.ViewContainerRef = { name: 'ViewContainerRef', moduleName: CORE };
|
|
6817
|
-
Identifiers.ChangeDetectorRef = {
|
|
6818
|
-
name: 'ChangeDetectorRef',
|
|
6819
|
-
moduleName: CORE,
|
|
6820
|
-
};
|
|
6821
|
-
Identifiers.QueryList = { name: 'QueryList', moduleName: CORE };
|
|
6822
|
-
Identifiers.TemplateRef = { name: 'TemplateRef', moduleName: CORE };
|
|
6823
|
-
Identifiers.Renderer2 = { name: 'Renderer2', moduleName: CORE };
|
|
6824
|
-
Identifiers.CodegenComponentFactoryResolver = {
|
|
6825
|
-
name: 'ɵCodegenComponentFactoryResolver',
|
|
6826
|
-
moduleName: CORE,
|
|
6827
|
-
};
|
|
6828
|
-
Identifiers.ComponentFactoryResolver = {
|
|
6829
|
-
name: 'ComponentFactoryResolver',
|
|
6830
|
-
moduleName: CORE,
|
|
6831
|
-
};
|
|
6832
|
-
Identifiers.ComponentFactory = { name: 'ComponentFactory', moduleName: CORE };
|
|
6833
|
-
Identifiers.ComponentRef = { name: 'ComponentRef', moduleName: CORE };
|
|
6834
|
-
Identifiers.NgModuleFactory = { name: 'NgModuleFactory', moduleName: CORE };
|
|
6835
|
-
Identifiers.createModuleFactory = {
|
|
6836
|
-
name: 'ɵcmf',
|
|
6837
|
-
moduleName: CORE,
|
|
6838
|
-
};
|
|
6839
|
-
Identifiers.moduleDef = {
|
|
6840
|
-
name: 'ɵmod',
|
|
6841
|
-
moduleName: CORE,
|
|
6842
|
-
};
|
|
6843
|
-
Identifiers.moduleProviderDef = {
|
|
6844
|
-
name: 'ɵmpd',
|
|
6845
|
-
moduleName: CORE,
|
|
6846
|
-
};
|
|
6847
|
-
Identifiers.RegisterModuleFactoryFn = {
|
|
6848
|
-
name: 'ɵregisterModuleFactory',
|
|
6849
|
-
moduleName: CORE,
|
|
6850
|
-
};
|
|
6851
|
-
Identifiers.inject = { name: 'ɵɵinject', moduleName: CORE };
|
|
6852
|
-
Identifiers.directiveInject = { name: 'ɵɵdirectiveInject', moduleName: CORE };
|
|
6853
|
-
Identifiers.INJECTOR = { name: 'INJECTOR', moduleName: CORE };
|
|
6854
|
-
Identifiers.Injector = { name: 'Injector', moduleName: CORE };
|
|
6855
|
-
Identifiers.ViewEncapsulation = {
|
|
6856
|
-
name: 'ViewEncapsulation',
|
|
6857
|
-
moduleName: CORE,
|
|
6858
|
-
};
|
|
6859
|
-
Identifiers.ChangeDetectionStrategy = {
|
|
6860
|
-
name: 'ChangeDetectionStrategy',
|
|
6861
|
-
moduleName: CORE,
|
|
6862
|
-
};
|
|
6863
|
-
Identifiers.SecurityContext = {
|
|
6864
|
-
name: 'SecurityContext',
|
|
6865
|
-
moduleName: CORE,
|
|
6866
|
-
};
|
|
6867
|
-
Identifiers.LOCALE_ID = { name: 'LOCALE_ID', moduleName: CORE };
|
|
6868
|
-
Identifiers.TRANSLATIONS_FORMAT = {
|
|
6869
|
-
name: 'TRANSLATIONS_FORMAT',
|
|
6870
|
-
moduleName: CORE,
|
|
6871
|
-
};
|
|
6872
|
-
Identifiers.inlineInterpolate = {
|
|
6873
|
-
name: 'ɵinlineInterpolate',
|
|
6874
|
-
moduleName: CORE,
|
|
6875
|
-
};
|
|
6876
|
-
Identifiers.interpolate = { name: 'ɵinterpolate', moduleName: CORE };
|
|
6877
|
-
Identifiers.EMPTY_ARRAY = { name: 'ɵEMPTY_ARRAY', moduleName: CORE };
|
|
6878
|
-
Identifiers.EMPTY_MAP = { name: 'ɵEMPTY_MAP', moduleName: CORE };
|
|
6879
|
-
Identifiers.Renderer = { name: 'Renderer', moduleName: CORE };
|
|
6880
|
-
// type only
|
|
6881
|
-
Identifiers.RendererType2 = {
|
|
6882
|
-
name: 'RendererType2',
|
|
6883
|
-
moduleName: CORE,
|
|
6884
|
-
};
|
|
6885
|
-
// type only
|
|
6886
|
-
Identifiers.ViewDefinition = {
|
|
6887
|
-
name: 'ɵViewDefinition',
|
|
6888
|
-
moduleName: CORE,
|
|
6889
|
-
};
|
|
6890
|
-
Identifiers.createComponentFactory = { name: 'ɵccf', moduleName: CORE };
|
|
6891
|
-
|
|
6892
6771
|
/**
|
|
6893
6772
|
* @license
|
|
6894
6773
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -6903,7 +6782,7 @@ EventHandlerVars.event = variable('$event');
|
|
|
6903
6782
|
* Converts the given expression AST into an executable output AST, assuming the expression is
|
|
6904
6783
|
* used in an action binding (e.g. an event handler).
|
|
6905
6784
|
*/
|
|
6906
|
-
function convertActionBinding(localResolver, implicitReceiver, action, bindingId,
|
|
6785
|
+
function convertActionBinding(localResolver, implicitReceiver, action, bindingId, baseSourceSpan, implicitReceiverAccesses, globals) {
|
|
6907
6786
|
if (!localResolver) {
|
|
6908
6787
|
localResolver = new DefaultLocalResolver(globals);
|
|
6909
6788
|
}
|
|
@@ -6927,7 +6806,7 @@ function convertActionBinding(localResolver, implicitReceiver, action, bindingId
|
|
|
6927
6806
|
throw new Error(`Illegal State: Actions are not allowed to contain pipes. Pipe: ${name}`);
|
|
6928
6807
|
}
|
|
6929
6808
|
}, action);
|
|
6930
|
-
const visitor = new _AstToIrVisitor(localResolver, implicitReceiver, bindingId,
|
|
6809
|
+
const visitor = new _AstToIrVisitor(localResolver, implicitReceiver, bindingId, /* supportsInterpolation */ false, baseSourceSpan, implicitReceiverAccesses);
|
|
6931
6810
|
const actionStmts = [];
|
|
6932
6811
|
flattenStatements(actionWithoutBuiltins.visit(visitor, _Mode.Statement), actionStmts);
|
|
6933
6812
|
prependTemporaryDecls(visitor.temporaryCount, bindingId, actionStmts);
|
|
@@ -6958,11 +6837,11 @@ class ConvertPropertyBindingResult {
|
|
|
6958
6837
|
* is used in property binding. The expression has to be preprocessed via
|
|
6959
6838
|
* `convertPropertyBindingBuiltins`.
|
|
6960
6839
|
*/
|
|
6961
|
-
function convertPropertyBinding(localResolver, implicitReceiver, expressionWithoutBuiltins, bindingId
|
|
6840
|
+
function convertPropertyBinding(localResolver, implicitReceiver, expressionWithoutBuiltins, bindingId) {
|
|
6962
6841
|
if (!localResolver) {
|
|
6963
6842
|
localResolver = new DefaultLocalResolver();
|
|
6964
6843
|
}
|
|
6965
|
-
const visitor = new _AstToIrVisitor(localResolver, implicitReceiver, bindingId,
|
|
6844
|
+
const visitor = new _AstToIrVisitor(localResolver, implicitReceiver, bindingId, /* supportsInterpolation */ false);
|
|
6966
6845
|
const outputExpr = expressionWithoutBuiltins.visit(visitor, _Mode.Expression);
|
|
6967
6846
|
const stmts = getStatementsFromVisitor(visitor, bindingId);
|
|
6968
6847
|
if (visitor.usesImplicitReceiver) {
|
|
@@ -6987,28 +6866,13 @@ function convertPropertyBinding(localResolver, implicitReceiver, expressionWitho
|
|
|
6987
6866
|
* `o.importExpr(R3.propertyInterpolate).callFn(result)`
|
|
6988
6867
|
*/
|
|
6989
6868
|
function convertUpdateArguments(localResolver, contextVariableExpression, expressionWithArgumentsToExtract, bindingId) {
|
|
6990
|
-
const visitor = new _AstToIrVisitor(localResolver, contextVariableExpression, bindingId,
|
|
6991
|
-
const outputExpr =
|
|
6869
|
+
const visitor = new _AstToIrVisitor(localResolver, contextVariableExpression, bindingId, /* supportsInterpolation */ true);
|
|
6870
|
+
const outputExpr = visitor.visitInterpolation(expressionWithArgumentsToExtract, _Mode.Expression);
|
|
6992
6871
|
if (visitor.usesImplicitReceiver) {
|
|
6993
6872
|
localResolver.notifyImplicitReceiverUse();
|
|
6994
6873
|
}
|
|
6995
6874
|
const stmts = getStatementsFromVisitor(visitor, bindingId);
|
|
6996
|
-
|
|
6997
|
-
let args = outputExpr.args.slice(1);
|
|
6998
|
-
if (expressionWithArgumentsToExtract instanceof Interpolation) {
|
|
6999
|
-
// If we're dealing with an interpolation of 1 value with an empty prefix and suffix, reduce the
|
|
7000
|
-
// args returned to just the value, because we're going to pass it to a special instruction.
|
|
7001
|
-
const strings = expressionWithArgumentsToExtract.strings;
|
|
7002
|
-
if (args.length === 3 && strings[0] === '' && strings[1] === '') {
|
|
7003
|
-
// Single argument interpolate instructions.
|
|
7004
|
-
args = [args[1]];
|
|
7005
|
-
}
|
|
7006
|
-
else if (args.length >= 19) {
|
|
7007
|
-
// 19 or more arguments must be passed to the `interpolateV`-style instructions, which accept
|
|
7008
|
-
// an array of arguments
|
|
7009
|
-
args = [literalArr(args)];
|
|
7010
|
-
}
|
|
7011
|
-
}
|
|
6875
|
+
const args = outputExpr.args;
|
|
7012
6876
|
return { stmts, args };
|
|
7013
6877
|
}
|
|
7014
6878
|
function getStatementsFromVisitor(visitor, bindingId) {
|
|
@@ -7075,11 +6939,11 @@ class _BuiltinAstConverter extends AstTransformer {
|
|
|
7075
6939
|
}
|
|
7076
6940
|
}
|
|
7077
6941
|
class _AstToIrVisitor {
|
|
7078
|
-
constructor(_localResolver, _implicitReceiver, bindingId,
|
|
6942
|
+
constructor(_localResolver, _implicitReceiver, bindingId, supportsInterpolation, baseSourceSpan, implicitReceiverAccesses) {
|
|
7079
6943
|
this._localResolver = _localResolver;
|
|
7080
6944
|
this._implicitReceiver = _implicitReceiver;
|
|
7081
6945
|
this.bindingId = bindingId;
|
|
7082
|
-
this.
|
|
6946
|
+
this.supportsInterpolation = supportsInterpolation;
|
|
7083
6947
|
this.baseSourceSpan = baseSourceSpan;
|
|
7084
6948
|
this.implicitReceiverAccesses = implicitReceiverAccesses;
|
|
7085
6949
|
this._nodeMap = new Map();
|
|
@@ -7177,21 +7041,29 @@ class _AstToIrVisitor {
|
|
|
7177
7041
|
return this.visitImplicitReceiver(ast, mode);
|
|
7178
7042
|
}
|
|
7179
7043
|
visitInterpolation(ast, mode) {
|
|
7044
|
+
if (!this.supportsInterpolation) {
|
|
7045
|
+
throw new Error('Unexpected interpolation');
|
|
7046
|
+
}
|
|
7180
7047
|
ensureExpressionMode(mode, ast);
|
|
7181
|
-
|
|
7048
|
+
let args = [];
|
|
7182
7049
|
for (let i = 0; i < ast.strings.length - 1; i++) {
|
|
7183
7050
|
args.push(literal(ast.strings[i]));
|
|
7184
7051
|
args.push(this._visit(ast.expressions[i], _Mode.Expression));
|
|
7185
7052
|
}
|
|
7186
7053
|
args.push(literal(ast.strings[ast.strings.length - 1]));
|
|
7187
|
-
|
|
7188
|
-
|
|
7054
|
+
// If we're dealing with an interpolation of 1 value with an empty prefix and suffix, reduce the
|
|
7055
|
+
// args returned to just the value, because we're going to pass it to a special instruction.
|
|
7056
|
+
const strings = ast.strings;
|
|
7057
|
+
if (strings.length === 2 && strings[0] === '' && strings[1] === '') {
|
|
7058
|
+
// Single argument interpolate instructions.
|
|
7059
|
+
args = [args[1]];
|
|
7060
|
+
}
|
|
7061
|
+
else if (ast.expressions.length >= 9) {
|
|
7062
|
+
// 9 or more arguments must be passed to the `interpolateV`-style instructions, which accept
|
|
7063
|
+
// an array of arguments
|
|
7064
|
+
args = [literalArr(args)];
|
|
7189
7065
|
}
|
|
7190
|
-
return
|
|
7191
|
-
importExpr(Identifiers.inlineInterpolate).callFn(args) :
|
|
7192
|
-
importExpr(Identifiers.interpolate).callFn([
|
|
7193
|
-
args[0], literalArr(args.slice(1), undefined, this.convertSourceSpan(ast.span))
|
|
7194
|
-
]);
|
|
7066
|
+
return new InterpolationExpression(args);
|
|
7195
7067
|
}
|
|
7196
7068
|
visitKeyedRead(ast, mode) {
|
|
7197
7069
|
const leftMostSafe = this.leftMostSafeNode(ast);
|
|
@@ -7303,10 +7175,6 @@ class _AstToIrVisitor {
|
|
|
7303
7175
|
visitAll(asts, mode) {
|
|
7304
7176
|
return asts.map(ast => this._visit(ast, mode));
|
|
7305
7177
|
}
|
|
7306
|
-
visitQuote(ast, mode) {
|
|
7307
|
-
throw new Error(`Quotes are not supported for evaluation!
|
|
7308
|
-
Statement: ${ast.uninterpretedExpression} located at ${ast.location}`);
|
|
7309
|
-
}
|
|
7310
7178
|
visitCall(ast, mode) {
|
|
7311
7179
|
const leftMostSafe = this.leftMostSafeNode(ast);
|
|
7312
7180
|
if (leftMostSafe) {
|
|
@@ -7492,9 +7360,6 @@ class _AstToIrVisitor {
|
|
|
7492
7360
|
visitPropertyWrite(ast) {
|
|
7493
7361
|
return null;
|
|
7494
7362
|
},
|
|
7495
|
-
visitQuote(ast) {
|
|
7496
|
-
return null;
|
|
7497
|
-
},
|
|
7498
7363
|
visitSafePropertyRead(ast) {
|
|
7499
7364
|
return visit(this, ast.receiver) || ast;
|
|
7500
7365
|
},
|
|
@@ -7571,9 +7436,6 @@ class _AstToIrVisitor {
|
|
|
7571
7436
|
visitPropertyWrite(ast) {
|
|
7572
7437
|
return false;
|
|
7573
7438
|
},
|
|
7574
|
-
visitQuote(ast) {
|
|
7575
|
-
return false;
|
|
7576
|
-
},
|
|
7577
7439
|
visitSafePropertyRead(ast) {
|
|
7578
7440
|
return false;
|
|
7579
7441
|
},
|
|
@@ -7630,6 +7492,18 @@ function flattenStatements(arg, output) {
|
|
|
7630
7492
|
output.push(arg);
|
|
7631
7493
|
}
|
|
7632
7494
|
}
|
|
7495
|
+
function unsupported() {
|
|
7496
|
+
throw new Error('Unsupported operation');
|
|
7497
|
+
}
|
|
7498
|
+
class InterpolationExpression extends Expression {
|
|
7499
|
+
constructor(args) {
|
|
7500
|
+
super(null, null);
|
|
7501
|
+
this.args = args;
|
|
7502
|
+
this.isConstant = unsupported;
|
|
7503
|
+
this.isEquivalent = unsupported;
|
|
7504
|
+
this.visitExpression = unsupported;
|
|
7505
|
+
}
|
|
7506
|
+
}
|
|
7633
7507
|
class DefaultLocalResolver {
|
|
7634
7508
|
constructor(globals) {
|
|
7635
7509
|
this.globals = globals;
|
|
@@ -8798,7 +8672,7 @@ class StylingBuilder {
|
|
|
8798
8672
|
getStyleMapInterpolationExpression(mapValue);
|
|
8799
8673
|
}
|
|
8800
8674
|
else {
|
|
8801
|
-
reference = isClassBased ? Identifiers
|
|
8675
|
+
reference = isClassBased ? Identifiers.classMap : Identifiers.styleMap;
|
|
8802
8676
|
}
|
|
8803
8677
|
return {
|
|
8804
8678
|
reference,
|
|
@@ -8872,13 +8746,13 @@ class StylingBuilder {
|
|
|
8872
8746
|
}
|
|
8873
8747
|
_buildClassInputs(valueConverter) {
|
|
8874
8748
|
if (this._singleClassInputs) {
|
|
8875
|
-
return this._buildSingleInputs(Identifiers
|
|
8749
|
+
return this._buildSingleInputs(Identifiers.classProp, this._singleClassInputs, valueConverter, null, true);
|
|
8876
8750
|
}
|
|
8877
8751
|
return [];
|
|
8878
8752
|
}
|
|
8879
8753
|
_buildStyleInputs(valueConverter) {
|
|
8880
8754
|
if (this._singleStyleInputs) {
|
|
8881
|
-
return this._buildSingleInputs(Identifiers
|
|
8755
|
+
return this._buildSingleInputs(Identifiers.styleProp, this._singleStyleInputs, valueConverter, getStylePropInterpolationExpression, false);
|
|
8882
8756
|
}
|
|
8883
8757
|
return [];
|
|
8884
8758
|
}
|
|
@@ -8931,25 +8805,25 @@ function parseProperty(name) {
|
|
|
8931
8805
|
function getClassMapInterpolationExpression(interpolation) {
|
|
8932
8806
|
switch (getInterpolationArgsLength(interpolation)) {
|
|
8933
8807
|
case 1:
|
|
8934
|
-
return Identifiers
|
|
8808
|
+
return Identifiers.classMap;
|
|
8935
8809
|
case 3:
|
|
8936
|
-
return Identifiers
|
|
8810
|
+
return Identifiers.classMapInterpolate1;
|
|
8937
8811
|
case 5:
|
|
8938
|
-
return Identifiers
|
|
8812
|
+
return Identifiers.classMapInterpolate2;
|
|
8939
8813
|
case 7:
|
|
8940
|
-
return Identifiers
|
|
8814
|
+
return Identifiers.classMapInterpolate3;
|
|
8941
8815
|
case 9:
|
|
8942
|
-
return Identifiers
|
|
8816
|
+
return Identifiers.classMapInterpolate4;
|
|
8943
8817
|
case 11:
|
|
8944
|
-
return Identifiers
|
|
8818
|
+
return Identifiers.classMapInterpolate5;
|
|
8945
8819
|
case 13:
|
|
8946
|
-
return Identifiers
|
|
8820
|
+
return Identifiers.classMapInterpolate6;
|
|
8947
8821
|
case 15:
|
|
8948
|
-
return Identifiers
|
|
8822
|
+
return Identifiers.classMapInterpolate7;
|
|
8949
8823
|
case 17:
|
|
8950
|
-
return Identifiers
|
|
8824
|
+
return Identifiers.classMapInterpolate8;
|
|
8951
8825
|
default:
|
|
8952
|
-
return Identifiers
|
|
8826
|
+
return Identifiers.classMapInterpolateV;
|
|
8953
8827
|
}
|
|
8954
8828
|
}
|
|
8955
8829
|
/**
|
|
@@ -8959,25 +8833,25 @@ function getClassMapInterpolationExpression(interpolation) {
|
|
|
8959
8833
|
function getStyleMapInterpolationExpression(interpolation) {
|
|
8960
8834
|
switch (getInterpolationArgsLength(interpolation)) {
|
|
8961
8835
|
case 1:
|
|
8962
|
-
return Identifiers
|
|
8836
|
+
return Identifiers.styleMap;
|
|
8963
8837
|
case 3:
|
|
8964
|
-
return Identifiers
|
|
8838
|
+
return Identifiers.styleMapInterpolate1;
|
|
8965
8839
|
case 5:
|
|
8966
|
-
return Identifiers
|
|
8840
|
+
return Identifiers.styleMapInterpolate2;
|
|
8967
8841
|
case 7:
|
|
8968
|
-
return Identifiers
|
|
8842
|
+
return Identifiers.styleMapInterpolate3;
|
|
8969
8843
|
case 9:
|
|
8970
|
-
return Identifiers
|
|
8844
|
+
return Identifiers.styleMapInterpolate4;
|
|
8971
8845
|
case 11:
|
|
8972
|
-
return Identifiers
|
|
8846
|
+
return Identifiers.styleMapInterpolate5;
|
|
8973
8847
|
case 13:
|
|
8974
|
-
return Identifiers
|
|
8848
|
+
return Identifiers.styleMapInterpolate6;
|
|
8975
8849
|
case 15:
|
|
8976
|
-
return Identifiers
|
|
8850
|
+
return Identifiers.styleMapInterpolate7;
|
|
8977
8851
|
case 17:
|
|
8978
|
-
return Identifiers
|
|
8852
|
+
return Identifiers.styleMapInterpolate8;
|
|
8979
8853
|
default:
|
|
8980
|
-
return Identifiers
|
|
8854
|
+
return Identifiers.styleMapInterpolateV;
|
|
8981
8855
|
}
|
|
8982
8856
|
}
|
|
8983
8857
|
/**
|
|
@@ -8987,25 +8861,25 @@ function getStyleMapInterpolationExpression(interpolation) {
|
|
|
8987
8861
|
function getStylePropInterpolationExpression(interpolation) {
|
|
8988
8862
|
switch (getInterpolationArgsLength(interpolation)) {
|
|
8989
8863
|
case 1:
|
|
8990
|
-
return Identifiers
|
|
8864
|
+
return Identifiers.styleProp;
|
|
8991
8865
|
case 3:
|
|
8992
|
-
return Identifiers
|
|
8866
|
+
return Identifiers.stylePropInterpolate1;
|
|
8993
8867
|
case 5:
|
|
8994
|
-
return Identifiers
|
|
8868
|
+
return Identifiers.stylePropInterpolate2;
|
|
8995
8869
|
case 7:
|
|
8996
|
-
return Identifiers
|
|
8870
|
+
return Identifiers.stylePropInterpolate3;
|
|
8997
8871
|
case 9:
|
|
8998
|
-
return Identifiers
|
|
8872
|
+
return Identifiers.stylePropInterpolate4;
|
|
8999
8873
|
case 11:
|
|
9000
|
-
return Identifiers
|
|
8874
|
+
return Identifiers.stylePropInterpolate5;
|
|
9001
8875
|
case 13:
|
|
9002
|
-
return Identifiers
|
|
8876
|
+
return Identifiers.stylePropInterpolate6;
|
|
9003
8877
|
case 15:
|
|
9004
|
-
return Identifiers
|
|
8878
|
+
return Identifiers.stylePropInterpolate7;
|
|
9005
8879
|
case 17:
|
|
9006
|
-
return Identifiers
|
|
8880
|
+
return Identifiers.stylePropInterpolate8;
|
|
9007
8881
|
default:
|
|
9008
|
-
return Identifiers
|
|
8882
|
+
return Identifiers.stylePropInterpolateV;
|
|
9009
8883
|
}
|
|
9010
8884
|
}
|
|
9011
8885
|
/**
|
|
@@ -9470,8 +9344,7 @@ class Parser$1 {
|
|
|
9470
9344
|
this._checkNoInterpolation(input, location, interpolationConfig);
|
|
9471
9345
|
const sourceToLex = this._stripComments(input);
|
|
9472
9346
|
const tokens = this._lexer.tokenize(sourceToLex);
|
|
9473
|
-
const ast = new _ParseAST(input, location, absoluteOffset, tokens,
|
|
9474
|
-
.parseChain();
|
|
9347
|
+
const ast = new _ParseAST(input, location, absoluteOffset, tokens, true, this.errors, 0).parseChain();
|
|
9475
9348
|
return new ASTWithSource(ast, input, location, absoluteOffset, this.errors);
|
|
9476
9349
|
}
|
|
9477
9350
|
parseBinding(input, location, absoluteOffset, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
|
|
@@ -9495,31 +9368,12 @@ class Parser$1 {
|
|
|
9495
9368
|
this.errors.push(new ParserError(message, input, errLocation, ctxLocation));
|
|
9496
9369
|
}
|
|
9497
9370
|
_parseBindingAst(input, location, absoluteOffset, interpolationConfig) {
|
|
9498
|
-
// Quotes expressions use 3rd-party expression language. We don't want to use
|
|
9499
|
-
// our lexer or parser for that, so we check for that ahead of time.
|
|
9500
|
-
const quote = this._parseQuote(input, location, absoluteOffset);
|
|
9501
|
-
if (quote != null) {
|
|
9502
|
-
return quote;
|
|
9503
|
-
}
|
|
9504
9371
|
this._checkNoInterpolation(input, location, interpolationConfig);
|
|
9505
9372
|
const sourceToLex = this._stripComments(input);
|
|
9506
9373
|
const tokens = this._lexer.tokenize(sourceToLex);
|
|
9507
|
-
return new _ParseAST(input, location, absoluteOffset, tokens,
|
|
9374
|
+
return new _ParseAST(input, location, absoluteOffset, tokens, false, this.errors, 0)
|
|
9508
9375
|
.parseChain();
|
|
9509
9376
|
}
|
|
9510
|
-
_parseQuote(input, location, absoluteOffset) {
|
|
9511
|
-
if (input == null)
|
|
9512
|
-
return null;
|
|
9513
|
-
const prefixSeparatorIndex = input.indexOf(':');
|
|
9514
|
-
if (prefixSeparatorIndex == -1)
|
|
9515
|
-
return null;
|
|
9516
|
-
const prefix = input.substring(0, prefixSeparatorIndex).trim();
|
|
9517
|
-
if (!isIdentifier(prefix))
|
|
9518
|
-
return null;
|
|
9519
|
-
const uninterpretedExpression = input.substring(prefixSeparatorIndex + 1);
|
|
9520
|
-
const span = new ParseSpan(0, input.length);
|
|
9521
|
-
return new Quote(span, span.toAbsolute(absoluteOffset), prefix, uninterpretedExpression, location);
|
|
9522
|
-
}
|
|
9523
9377
|
/**
|
|
9524
9378
|
* Parse microsyntax template expression and return a list of bindings or
|
|
9525
9379
|
* parsing errors in case the given expression is invalid.
|
|
@@ -9548,7 +9402,7 @@ class Parser$1 {
|
|
|
9548
9402
|
*/
|
|
9549
9403
|
parseTemplateBindings(templateKey, templateValue, templateUrl, absoluteKeyOffset, absoluteValueOffset) {
|
|
9550
9404
|
const tokens = this._lexer.tokenize(templateValue);
|
|
9551
|
-
const parser = new _ParseAST(templateValue, templateUrl, absoluteValueOffset, tokens,
|
|
9405
|
+
const parser = new _ParseAST(templateValue, templateUrl, absoluteValueOffset, tokens, false /* parseAction */, this.errors, 0 /* relative offset */);
|
|
9552
9406
|
return parser.parseTemplateBindings({
|
|
9553
9407
|
source: templateKey,
|
|
9554
9408
|
span: new AbsoluteSourceSpan(absoluteKeyOffset, absoluteKeyOffset + templateKey.length),
|
|
@@ -9563,7 +9417,7 @@ class Parser$1 {
|
|
|
9563
9417
|
const expressionText = expressions[i].text;
|
|
9564
9418
|
const sourceToLex = this._stripComments(expressionText);
|
|
9565
9419
|
const tokens = this._lexer.tokenize(sourceToLex);
|
|
9566
|
-
const ast = new _ParseAST(input, location, absoluteOffset, tokens,
|
|
9420
|
+
const ast = new _ParseAST(input, location, absoluteOffset, tokens, false, this.errors, offsets[i])
|
|
9567
9421
|
.parseChain();
|
|
9568
9422
|
expressionNodes.push(ast);
|
|
9569
9423
|
}
|
|
@@ -9577,7 +9431,7 @@ class Parser$1 {
|
|
|
9577
9431
|
parseInterpolationExpression(expression, location, absoluteOffset) {
|
|
9578
9432
|
const sourceToLex = this._stripComments(expression);
|
|
9579
9433
|
const tokens = this._lexer.tokenize(sourceToLex);
|
|
9580
|
-
const ast = new _ParseAST(expression, location, absoluteOffset, tokens,
|
|
9434
|
+
const ast = new _ParseAST(expression, location, absoluteOffset, tokens,
|
|
9581
9435
|
/* parseAction */ false, this.errors, 0)
|
|
9582
9436
|
.parseChain();
|
|
9583
9437
|
const strings = ['', '']; // The prefix and suffix strings are both empty
|
|
@@ -9657,7 +9511,7 @@ class Parser$1 {
|
|
|
9657
9511
|
}
|
|
9658
9512
|
_stripComments(input) {
|
|
9659
9513
|
const i = this._commentStart(input);
|
|
9660
|
-
return i != null ? input.substring(0, i)
|
|
9514
|
+
return i != null ? input.substring(0, i) : input;
|
|
9661
9515
|
}
|
|
9662
9516
|
_commentStart(input) {
|
|
9663
9517
|
let outerQuote = null;
|
|
@@ -9749,12 +9603,11 @@ var ParseContextFlags;
|
|
|
9749
9603
|
ParseContextFlags[ParseContextFlags["Writable"] = 1] = "Writable";
|
|
9750
9604
|
})(ParseContextFlags || (ParseContextFlags = {}));
|
|
9751
9605
|
class _ParseAST {
|
|
9752
|
-
constructor(input, location, absoluteOffset, tokens,
|
|
9606
|
+
constructor(input, location, absoluteOffset, tokens, parseAction, errors, offset) {
|
|
9753
9607
|
this.input = input;
|
|
9754
9608
|
this.location = location;
|
|
9755
9609
|
this.absoluteOffset = absoluteOffset;
|
|
9756
9610
|
this.tokens = tokens;
|
|
9757
|
-
this.inputLength = inputLength;
|
|
9758
9611
|
this.parseAction = parseAction;
|
|
9759
9612
|
this.errors = errors;
|
|
9760
9613
|
this.offset = offset;
|
|
@@ -9799,7 +9652,7 @@ class _ParseAST {
|
|
|
9799
9652
|
// No tokens have been processed yet; return the next token's start or the length of the input
|
|
9800
9653
|
// if there is no token.
|
|
9801
9654
|
if (this.tokens.length === 0) {
|
|
9802
|
-
return this.
|
|
9655
|
+
return this.input.length + this.offset;
|
|
9803
9656
|
}
|
|
9804
9657
|
return this.next.index + this.offset;
|
|
9805
9658
|
}
|
|
@@ -9945,7 +9798,7 @@ class _ParseAST {
|
|
|
9945
9798
|
if (exprs.length == 0) {
|
|
9946
9799
|
// We have no expressions so create an empty expression that spans the entire input length
|
|
9947
9800
|
const artificialStart = this.offset;
|
|
9948
|
-
const artificialEnd = this.offset + this.
|
|
9801
|
+
const artificialEnd = this.offset + this.input.length;
|
|
9949
9802
|
return new EmptyExpr(this.span(artificialStart, artificialEnd), this.sourceSpan(artificialStart, artificialEnd));
|
|
9950
9803
|
}
|
|
9951
9804
|
if (exprs.length == 1)
|
|
@@ -9978,7 +9831,7 @@ class _ParseAST {
|
|
|
9978
9831
|
//
|
|
9979
9832
|
// Therefore, we push the end of the `ParseSpan` for this pipe all the way up to the
|
|
9980
9833
|
// beginning of the next token, or until the end of input if the next token is EOF.
|
|
9981
|
-
fullSpanEnd = this.next.index !== -1 ? this.next.index : this.
|
|
9834
|
+
fullSpanEnd = this.next.index !== -1 ? this.next.index : this.input.length + this.offset;
|
|
9982
9835
|
// The `nameSpan` for an empty pipe name is zero-length at the end of any whitespace
|
|
9983
9836
|
// beyond the pipe character.
|
|
9984
9837
|
nameSpan = new ParseSpan(fullSpanEnd, fullSpanEnd).toAbsolute(this.absoluteOffset);
|
|
@@ -15660,8 +15513,8 @@ class HtmlAstToIvyAst {
|
|
|
15660
15513
|
// the wrapping template to prevent unnecessary i18n instructions from being generated. The
|
|
15661
15514
|
// necessary i18n meta information will be extracted from child elements.
|
|
15662
15515
|
const i18n = isTemplateElement && isI18nRootElement ? undefined : element.i18n;
|
|
15663
|
-
|
|
15664
|
-
parsedElement = new Template(
|
|
15516
|
+
const name = parsedElement instanceof Template ? null : parsedElement.name;
|
|
15517
|
+
parsedElement = new Template(name, hoistedAttrs.attributes, hoistedAttrs.inputs, hoistedAttrs.outputs, templateAttrs, [parsedElement], [ /* no references */], templateVariables, element.sourceSpan, element.startSourceSpan, element.endSourceSpan, i18n);
|
|
15665
15518
|
}
|
|
15666
15519
|
if (isI18nRootElement) {
|
|
15667
15520
|
this.inI18nBlock = false;
|
|
@@ -16903,7 +16756,7 @@ const NG_PROJECT_AS_ATTR_NAME = 'ngProjectAs';
|
|
|
16903
16756
|
// Global symbols available only inside event bindings.
|
|
16904
16757
|
const EVENT_BINDING_SCOPE_GLOBALS = new Set(['$event']);
|
|
16905
16758
|
// List of supported global targets for event listeners
|
|
16906
|
-
const GLOBAL_TARGET_RESOLVERS = new Map([['window', Identifiers
|
|
16759
|
+
const GLOBAL_TARGET_RESOLVERS = new Map([['window', Identifiers.resolveWindow], ['document', Identifiers.resolveDocument], ['body', Identifiers.resolveBody]]);
|
|
16907
16760
|
const LEADING_TRIVIA_CHARS = [' ', '\n', '\r', '\t'];
|
|
16908
16761
|
// if (rf & flags) { .. }
|
|
16909
16762
|
function renderFlagCheckIfStmt(flags, statements) {
|
|
@@ -16920,7 +16773,7 @@ function prepareEventListenerParameters(eventAst, handlerName = null, scope = nu
|
|
|
16920
16773
|
const implicitReceiverExpr = (scope === null || scope.bindingLevel === 0) ?
|
|
16921
16774
|
variable(CONTEXT_NAME) :
|
|
16922
16775
|
scope.getOrCreateSharedContextVar(0);
|
|
16923
|
-
const bindingStatements = convertActionBinding(scope, implicitReceiverExpr, handler, 'b',
|
|
16776
|
+
const bindingStatements = convertActionBinding(scope, implicitReceiverExpr, handler, 'b', eventAst.handlerSpan, implicitReceiverAccesses, EVENT_BINDING_SCOPE_GLOBALS);
|
|
16924
16777
|
const statements = [];
|
|
16925
16778
|
if (scope) {
|
|
16926
16779
|
// `variableDeclarations` needs to run first, because
|
|
@@ -17015,12 +16868,12 @@ class TemplateDefinitionBuilder {
|
|
|
17015
16868
|
this.fileBasedI18nSuffix = relativeContextFilePath.replace(/[^A-Za-z0-9]/g, '_') + '_';
|
|
17016
16869
|
this._valueConverter = new ValueConverter(constantPool, () => this.allocateDataSlot(), (numSlots) => this.allocatePureFunctionSlots(numSlots), (name, localName, slot, value) => {
|
|
17017
16870
|
this._bindingScope.set(this.level, localName, value);
|
|
17018
|
-
this.creationInstruction(null, Identifiers
|
|
16871
|
+
this.creationInstruction(null, Identifiers.pipe, [literal(slot), literal(name)]);
|
|
17019
16872
|
});
|
|
17020
16873
|
}
|
|
17021
16874
|
buildTemplateFunction(nodes, variables, ngContentSelectorsOffset = 0, i18n) {
|
|
17022
16875
|
this._ngContentSelectorsOffset = ngContentSelectorsOffset;
|
|
17023
|
-
if (this._namespace !== Identifiers
|
|
16876
|
+
if (this._namespace !== Identifiers.namespaceHTML) {
|
|
17024
16877
|
this.creationInstruction(null, this._namespace);
|
|
17025
16878
|
}
|
|
17026
16879
|
// Create variable bindings
|
|
@@ -17066,7 +16919,7 @@ class TemplateDefinitionBuilder {
|
|
|
17066
16919
|
// Since we accumulate ngContent selectors while processing template elements,
|
|
17067
16920
|
// we *prepend* `projectionDef` to creation instructions block, to put it before
|
|
17068
16921
|
// any `projection` instructions
|
|
17069
|
-
this.creationInstruction(null, Identifiers
|
|
16922
|
+
this.creationInstruction(null, Identifiers.projectionDef, parameters, /* prepend */ true);
|
|
17070
16923
|
}
|
|
17071
16924
|
if (initI18nContext) {
|
|
17072
16925
|
this.i18nEnd(null, selfClosingI18nInstruction);
|
|
@@ -17227,7 +17080,7 @@ class TemplateDefinitionBuilder {
|
|
|
17227
17080
|
if (Object.keys(icuMapping).length) {
|
|
17228
17081
|
args.push(mapLiteral(icuMapping, true));
|
|
17229
17082
|
}
|
|
17230
|
-
return instruction(null, Identifiers
|
|
17083
|
+
return instruction(null, Identifiers.i18nPostprocess, args);
|
|
17231
17084
|
};
|
|
17232
17085
|
}
|
|
17233
17086
|
this.i18nTranslate(meta, params, context.ref, transformFn);
|
|
@@ -17246,7 +17099,7 @@ class TemplateDefinitionBuilder {
|
|
|
17246
17099
|
// into i18nStart call for top level i18n context
|
|
17247
17100
|
params.push(literal(id));
|
|
17248
17101
|
}
|
|
17249
|
-
this.creationInstruction(span, selfClosing ? Identifiers
|
|
17102
|
+
this.creationInstruction(span, selfClosing ? Identifiers.i18n : Identifiers.i18nStart, params);
|
|
17250
17103
|
}
|
|
17251
17104
|
i18nEnd(span = null, selfClosing) {
|
|
17252
17105
|
if (!this.i18n) {
|
|
@@ -17269,11 +17122,11 @@ class TemplateDefinitionBuilder {
|
|
|
17269
17122
|
// for i18n block, advance to the most recent element index (by taking the current number of
|
|
17270
17123
|
// elements and subtracting one) before invoking `i18nExp` instructions, to make sure the
|
|
17271
17124
|
// necessary lifecycle hooks of components/directives are properly flushed.
|
|
17272
|
-
this.updateInstructionChainWithAdvance(this.getConstCount() - 1, Identifiers
|
|
17273
|
-
this.updateInstruction(span, Identifiers
|
|
17125
|
+
this.updateInstructionChainWithAdvance(this.getConstCount() - 1, Identifiers.i18nExp, chainBindings);
|
|
17126
|
+
this.updateInstruction(span, Identifiers.i18nApply, [literal(index)]);
|
|
17274
17127
|
}
|
|
17275
17128
|
if (!selfClosing) {
|
|
17276
|
-
this.creationInstruction(span, Identifiers
|
|
17129
|
+
this.creationInstruction(span, Identifiers.i18nEnd);
|
|
17277
17130
|
}
|
|
17278
17131
|
this.i18n = null; // reset local i18n context
|
|
17279
17132
|
}
|
|
@@ -17299,25 +17152,25 @@ class TemplateDefinitionBuilder {
|
|
|
17299
17152
|
}
|
|
17300
17153
|
});
|
|
17301
17154
|
if (bindings.length > 0) {
|
|
17302
|
-
this.updateInstructionChainWithAdvance(nodeIndex, Identifiers
|
|
17155
|
+
this.updateInstructionChainWithAdvance(nodeIndex, Identifiers.i18nExp, bindings);
|
|
17303
17156
|
}
|
|
17304
17157
|
if (i18nAttrArgs.length > 0) {
|
|
17305
17158
|
const index = literal(this.allocateDataSlot());
|
|
17306
17159
|
const constIndex = this.addToConsts(literalArr(i18nAttrArgs));
|
|
17307
|
-
this.creationInstruction(sourceSpan, Identifiers
|
|
17160
|
+
this.creationInstruction(sourceSpan, Identifiers.i18nAttributes, [index, constIndex]);
|
|
17308
17161
|
if (hasBindings) {
|
|
17309
|
-
this.updateInstruction(sourceSpan, Identifiers
|
|
17162
|
+
this.updateInstruction(sourceSpan, Identifiers.i18nApply, [index]);
|
|
17310
17163
|
}
|
|
17311
17164
|
}
|
|
17312
17165
|
}
|
|
17313
17166
|
getNamespaceInstruction(namespaceKey) {
|
|
17314
17167
|
switch (namespaceKey) {
|
|
17315
17168
|
case 'math':
|
|
17316
|
-
return Identifiers
|
|
17169
|
+
return Identifiers.namespaceMathML;
|
|
17317
17170
|
case 'svg':
|
|
17318
|
-
return Identifiers
|
|
17171
|
+
return Identifiers.namespaceSVG;
|
|
17319
17172
|
default:
|
|
17320
|
-
return Identifiers
|
|
17173
|
+
return Identifiers.namespaceHTML;
|
|
17321
17174
|
}
|
|
17322
17175
|
}
|
|
17323
17176
|
addNamespaceInstruction(nsInstruction, element) {
|
|
@@ -17344,7 +17197,7 @@ class TemplateDefinitionBuilder {
|
|
|
17344
17197
|
else if (projectionSlotIdx !== 0) {
|
|
17345
17198
|
parameters.push(literal(projectionSlotIdx));
|
|
17346
17199
|
}
|
|
17347
|
-
this.creationInstruction(ngContent.sourceSpan, Identifiers
|
|
17200
|
+
this.creationInstruction(ngContent.sourceSpan, Identifiers.projection, parameters);
|
|
17348
17201
|
if (this.i18n) {
|
|
17349
17202
|
this.i18n.appendProjection(ngContent.i18n, slot);
|
|
17350
17203
|
}
|
|
@@ -17417,12 +17270,12 @@ class TemplateDefinitionBuilder {
|
|
|
17417
17270
|
element.outputs.length === 0 && boundI18nAttrs.length === 0 && !hasChildren;
|
|
17418
17271
|
const createSelfClosingI18nInstruction = !createSelfClosingInstruction && hasTextChildrenOnly(element.children);
|
|
17419
17272
|
if (createSelfClosingInstruction) {
|
|
17420
|
-
this.creationInstruction(element.sourceSpan, isNgContainer$1 ? Identifiers
|
|
17273
|
+
this.creationInstruction(element.sourceSpan, isNgContainer$1 ? Identifiers.elementContainer : Identifiers.element, trimTrailingNulls(parameters));
|
|
17421
17274
|
}
|
|
17422
17275
|
else {
|
|
17423
|
-
this.creationInstruction(element.startSourceSpan, isNgContainer$1 ? Identifiers
|
|
17276
|
+
this.creationInstruction(element.startSourceSpan, isNgContainer$1 ? Identifiers.elementContainerStart : Identifiers.elementStart, trimTrailingNulls(parameters));
|
|
17424
17277
|
if (isNonBindableMode) {
|
|
17425
|
-
this.creationInstruction(element.startSourceSpan, Identifiers
|
|
17278
|
+
this.creationInstruction(element.startSourceSpan, Identifiers.disableBindings);
|
|
17426
17279
|
}
|
|
17427
17280
|
if (boundI18nAttrs.length > 0) {
|
|
17428
17281
|
this.i18nAttributesInstruction(elementIndex, boundI18nAttrs, (_a = element.startSourceSpan) !== null && _a !== void 0 ? _a : element.sourceSpan);
|
|
@@ -17433,7 +17286,7 @@ class TemplateDefinitionBuilder {
|
|
|
17433
17286
|
sourceSpan: outputAst.sourceSpan,
|
|
17434
17287
|
params: this.prepareListenerParameter(element.name, outputAst, elementIndex)
|
|
17435
17288
|
}));
|
|
17436
|
-
this.creationInstructionChain(Identifiers
|
|
17289
|
+
this.creationInstructionChain(Identifiers.listener, listeners);
|
|
17437
17290
|
}
|
|
17438
17291
|
// Note: it's important to keep i18n/i18nStart instructions after i18nAttributes and
|
|
17439
17292
|
// listeners, to make sure i18nAttributes instruction targets current element at runtime.
|
|
@@ -17539,7 +17392,7 @@ class TemplateDefinitionBuilder {
|
|
|
17539
17392
|
}
|
|
17540
17393
|
else {
|
|
17541
17394
|
// class prop
|
|
17542
|
-
this.updateInstructionWithAdvance(elementIndex, input.sourceSpan, Identifiers
|
|
17395
|
+
this.updateInstructionWithAdvance(elementIndex, input.sourceSpan, Identifiers.classProp, () => {
|
|
17543
17396
|
return [
|
|
17544
17397
|
literal(elementIndex), literal(attrName), this.convertPropertyBinding(value),
|
|
17545
17398
|
...params
|
|
@@ -17550,10 +17403,10 @@ class TemplateDefinitionBuilder {
|
|
|
17550
17403
|
}
|
|
17551
17404
|
});
|
|
17552
17405
|
if (propertyBindings.length > 0) {
|
|
17553
|
-
this.updateInstructionChainWithAdvance(elementIndex, Identifiers
|
|
17406
|
+
this.updateInstructionChainWithAdvance(elementIndex, Identifiers.property, propertyBindings);
|
|
17554
17407
|
}
|
|
17555
17408
|
if (attributeBindings.length > 0) {
|
|
17556
|
-
this.updateInstructionChainWithAdvance(elementIndex, Identifiers
|
|
17409
|
+
this.updateInstructionChainWithAdvance(elementIndex, Identifiers.attribute, attributeBindings);
|
|
17557
17410
|
}
|
|
17558
17411
|
// Traverse element child nodes
|
|
17559
17412
|
visitAll$1(this, element.children);
|
|
@@ -17567,9 +17420,9 @@ class TemplateDefinitionBuilder {
|
|
|
17567
17420
|
this.i18nEnd(span, createSelfClosingI18nInstruction);
|
|
17568
17421
|
}
|
|
17569
17422
|
if (isNonBindableMode) {
|
|
17570
|
-
this.creationInstruction(span, Identifiers
|
|
17423
|
+
this.creationInstruction(span, Identifiers.enableBindings);
|
|
17571
17424
|
}
|
|
17572
|
-
this.creationInstruction(span, isNgContainer$1 ? Identifiers
|
|
17425
|
+
this.creationInstruction(span, isNgContainer$1 ? Identifiers.elementContainerEnd : Identifiers.elementEnd);
|
|
17573
17426
|
}
|
|
17574
17427
|
}
|
|
17575
17428
|
visitTemplate(template) {
|
|
@@ -17596,7 +17449,7 @@ class TemplateDefinitionBuilder {
|
|
|
17596
17449
|
if (template.references && template.references.length) {
|
|
17597
17450
|
const refs = this.prepareRefsArray(template.references);
|
|
17598
17451
|
parameters.push(this.addToConsts(refs));
|
|
17599
|
-
parameters.push(importExpr(Identifiers
|
|
17452
|
+
parameters.push(importExpr(Identifiers.templateRefExtractor));
|
|
17600
17453
|
}
|
|
17601
17454
|
// Create the template function
|
|
17602
17455
|
const templateVisitor = new TemplateDefinitionBuilder(this.constantPool, this._bindingScope, this.level + 1, contextName, this.i18n, templateIndex, templateName, this._namespace, this.fileBasedI18nSuffix, this.i18nUseExternalIds, this._constants);
|
|
@@ -17612,7 +17465,7 @@ class TemplateDefinitionBuilder {
|
|
|
17612
17465
|
}
|
|
17613
17466
|
});
|
|
17614
17467
|
// e.g. template(1, MyComp_Template_1)
|
|
17615
|
-
this.creationInstruction(template.sourceSpan, Identifiers
|
|
17468
|
+
this.creationInstruction(template.sourceSpan, Identifiers.templateCreate, () => {
|
|
17616
17469
|
parameters.splice(2, 0, literal(templateVisitor.getConstCount()), literal(templateVisitor.getVarCount()));
|
|
17617
17470
|
return trimTrailingNulls(parameters);
|
|
17618
17471
|
});
|
|
@@ -17638,7 +17491,7 @@ class TemplateDefinitionBuilder {
|
|
|
17638
17491
|
sourceSpan: outputAst.sourceSpan,
|
|
17639
17492
|
params: this.prepareListenerParameter('ng_template', outputAst, templateIndex)
|
|
17640
17493
|
}));
|
|
17641
|
-
this.creationInstructionChain(Identifiers
|
|
17494
|
+
this.creationInstructionChain(Identifiers.listener, listeners);
|
|
17642
17495
|
}
|
|
17643
17496
|
}
|
|
17644
17497
|
}
|
|
@@ -17653,7 +17506,7 @@ class TemplateDefinitionBuilder {
|
|
|
17653
17506
|
return;
|
|
17654
17507
|
}
|
|
17655
17508
|
const nodeIndex = this.allocateDataSlot();
|
|
17656
|
-
this.creationInstruction(text.sourceSpan, Identifiers
|
|
17509
|
+
this.creationInstruction(text.sourceSpan, Identifiers.text, [literal(nodeIndex)]);
|
|
17657
17510
|
const value = text.value.visit(this._valueConverter);
|
|
17658
17511
|
this.allocateBindingSlots(value);
|
|
17659
17512
|
if (value instanceof Interpolation) {
|
|
@@ -17668,7 +17521,7 @@ class TemplateDefinitionBuilder {
|
|
|
17668
17521
|
// block, we exclude this text element from instructions set,
|
|
17669
17522
|
// since it will be captured in i18n content and processed at runtime
|
|
17670
17523
|
if (!this.i18n) {
|
|
17671
|
-
this.creationInstruction(text.sourceSpan, Identifiers
|
|
17524
|
+
this.creationInstruction(text.sourceSpan, Identifiers.text, [literal(this.allocateDataSlot()), literal(text.value)]);
|
|
17672
17525
|
}
|
|
17673
17526
|
}
|
|
17674
17527
|
visitIcu(icu) {
|
|
@@ -17693,7 +17546,7 @@ class TemplateDefinitionBuilder {
|
|
|
17693
17546
|
const transformFn = (raw) => {
|
|
17694
17547
|
const params = Object.assign(Object.assign({}, vars), placeholders);
|
|
17695
17548
|
const formatted = i18nFormatPlaceholderNames(params, /* useCamelCase */ false);
|
|
17696
|
-
return instruction(null, Identifiers
|
|
17549
|
+
return instruction(null, Identifiers.i18nPostprocess, [raw, mapLiteral(formatted, true)]);
|
|
17697
17550
|
};
|
|
17698
17551
|
// in case the whole i18n message is a single ICU - we do not need to
|
|
17699
17552
|
// create a separate top-level translation, we can use the root ref instead
|
|
@@ -17760,7 +17613,7 @@ class TemplateDefinitionBuilder {
|
|
|
17760
17613
|
}
|
|
17761
17614
|
});
|
|
17762
17615
|
if (propertyBindings.length > 0) {
|
|
17763
|
-
this.updateInstructionChainWithAdvance(templateIndex, Identifiers
|
|
17616
|
+
this.updateInstructionChainWithAdvance(templateIndex, Identifiers.property, propertyBindings);
|
|
17764
17617
|
}
|
|
17765
17618
|
}
|
|
17766
17619
|
// Bindings must only be resolved after all local refs have been visited, so all
|
|
@@ -17836,7 +17689,7 @@ class TemplateDefinitionBuilder {
|
|
|
17836
17689
|
if (delta < 1) {
|
|
17837
17690
|
throw new Error('advance instruction can only go forwards');
|
|
17838
17691
|
}
|
|
17839
|
-
this.instructionFn(this._updateCodeFns, span, Identifiers
|
|
17692
|
+
this.instructionFn(this._updateCodeFns, span, Identifiers.advance, [literal(delta)]);
|
|
17840
17693
|
this._currentIndex = nodeIndex;
|
|
17841
17694
|
}
|
|
17842
17695
|
}
|
|
@@ -17861,7 +17714,7 @@ class TemplateDefinitionBuilder {
|
|
|
17861
17714
|
this._bindingScope.getOrCreateSharedContextVar(0);
|
|
17862
17715
|
}
|
|
17863
17716
|
convertPropertyBinding(value) {
|
|
17864
|
-
const convertedPropertyBinding = convertPropertyBinding(this, this.getImplicitReceiverExpr(), value, this.bindingContext()
|
|
17717
|
+
const convertedPropertyBinding = convertPropertyBinding(this, this.getImplicitReceiverExpr(), value, this.bindingContext());
|
|
17865
17718
|
const valExpr = convertedPropertyBinding.currValExpr;
|
|
17866
17719
|
this._tempVariables.push(...convertedPropertyBinding.stmts);
|
|
17867
17720
|
return valExpr;
|
|
@@ -18018,7 +17871,7 @@ class TemplateDefinitionBuilder {
|
|
|
18018
17871
|
// e.g. nextContext(2);
|
|
18019
17872
|
const nextContextStmt = relativeLevel > 0 ? [generateNextContextExpr(relativeLevel).toStmt()] : [];
|
|
18020
17873
|
// e.g. const $foo$ = reference(1);
|
|
18021
|
-
const refExpr = lhs.set(importExpr(Identifiers
|
|
17874
|
+
const refExpr = lhs.set(importExpr(Identifiers.reference).callFn([literal(slot)]));
|
|
18022
17875
|
return nextContextStmt.concat(refExpr.toConstDecl());
|
|
18023
17876
|
}, true);
|
|
18024
17877
|
return [reference.name, reference.value];
|
|
@@ -18096,22 +17949,22 @@ class ValueConverter extends AstMemoryEfficientTransformer {
|
|
|
18096
17949
|
}
|
|
18097
17950
|
}
|
|
18098
17951
|
// Pipes always have at least one parameter, the value they operate on
|
|
18099
|
-
const pipeBindingIdentifiers = [Identifiers
|
|
17952
|
+
const pipeBindingIdentifiers = [Identifiers.pipeBind1, Identifiers.pipeBind2, Identifiers.pipeBind3, Identifiers.pipeBind4];
|
|
18100
17953
|
function pipeBindingCallInfo(args) {
|
|
18101
17954
|
const identifier = pipeBindingIdentifiers[args.length];
|
|
18102
17955
|
return {
|
|
18103
|
-
identifier: identifier || Identifiers
|
|
17956
|
+
identifier: identifier || Identifiers.pipeBindV,
|
|
18104
17957
|
isVarLength: !identifier,
|
|
18105
17958
|
};
|
|
18106
17959
|
}
|
|
18107
17960
|
const pureFunctionIdentifiers = [
|
|
18108
|
-
Identifiers
|
|
18109
|
-
Identifiers
|
|
17961
|
+
Identifiers.pureFunction0, Identifiers.pureFunction1, Identifiers.pureFunction2, Identifiers.pureFunction3, Identifiers.pureFunction4,
|
|
17962
|
+
Identifiers.pureFunction5, Identifiers.pureFunction6, Identifiers.pureFunction7, Identifiers.pureFunction8
|
|
18110
17963
|
];
|
|
18111
17964
|
function pureFunctionCallInfo(args) {
|
|
18112
17965
|
const identifier = pureFunctionIdentifiers[args.length];
|
|
18113
17966
|
return {
|
|
18114
|
-
identifier: identifier || Identifiers
|
|
17967
|
+
identifier: identifier || Identifiers.pureFunctionV,
|
|
18115
17968
|
isVarLength: !identifier,
|
|
18116
17969
|
};
|
|
18117
17970
|
}
|
|
@@ -18120,7 +17973,7 @@ function instruction(span, reference, params) {
|
|
|
18120
17973
|
}
|
|
18121
17974
|
// e.g. x(2);
|
|
18122
17975
|
function generateNextContextExpr(relativeLevelDiff) {
|
|
18123
|
-
return importExpr(Identifiers
|
|
17976
|
+
return importExpr(Identifiers.nextContext)
|
|
18124
17977
|
.callFn(relativeLevelDiff > 1 ? [literal(relativeLevelDiff)] : []);
|
|
18125
17978
|
}
|
|
18126
17979
|
function getLiteralFactory(constantPool, literal$1, allocateSlots) {
|
|
@@ -18322,7 +18175,7 @@ class BindingScope {
|
|
|
18322
18175
|
restoreViewStatement() {
|
|
18323
18176
|
const statements = [];
|
|
18324
18177
|
if (this.restoreViewVariable) {
|
|
18325
|
-
const restoreCall = instruction(null, Identifiers
|
|
18178
|
+
const restoreCall = instruction(null, Identifiers.restoreView, [this.restoreViewVariable]);
|
|
18326
18179
|
// Either `const restoredCtx = restoreView($state$);` or `restoreView($state$);`
|
|
18327
18180
|
// depending on whether it is being used.
|
|
18328
18181
|
statements.push(this.usesRestoredViewContext ?
|
|
@@ -18334,7 +18187,7 @@ class BindingScope {
|
|
|
18334
18187
|
viewSnapshotStatements() {
|
|
18335
18188
|
// const $state$ = getCurrentView();
|
|
18336
18189
|
return this.restoreViewVariable ?
|
|
18337
|
-
[this.restoreViewVariable.set(instruction(null, Identifiers
|
|
18190
|
+
[this.restoreViewVariable.set(instruction(null, Identifiers.getCurrentView, [])).toConstDecl()] :
|
|
18338
18191
|
[];
|
|
18339
18192
|
}
|
|
18340
18193
|
isListenerScope() {
|
|
@@ -18402,25 +18255,25 @@ function getNgProjectAsLiteral(attribute) {
|
|
|
18402
18255
|
function getPropertyInterpolationExpression(interpolation) {
|
|
18403
18256
|
switch (getInterpolationArgsLength(interpolation)) {
|
|
18404
18257
|
case 1:
|
|
18405
|
-
return Identifiers
|
|
18258
|
+
return Identifiers.propertyInterpolate;
|
|
18406
18259
|
case 3:
|
|
18407
|
-
return Identifiers
|
|
18260
|
+
return Identifiers.propertyInterpolate1;
|
|
18408
18261
|
case 5:
|
|
18409
|
-
return Identifiers
|
|
18262
|
+
return Identifiers.propertyInterpolate2;
|
|
18410
18263
|
case 7:
|
|
18411
|
-
return Identifiers
|
|
18264
|
+
return Identifiers.propertyInterpolate3;
|
|
18412
18265
|
case 9:
|
|
18413
|
-
return Identifiers
|
|
18266
|
+
return Identifiers.propertyInterpolate4;
|
|
18414
18267
|
case 11:
|
|
18415
|
-
return Identifiers
|
|
18268
|
+
return Identifiers.propertyInterpolate5;
|
|
18416
18269
|
case 13:
|
|
18417
|
-
return Identifiers
|
|
18270
|
+
return Identifiers.propertyInterpolate6;
|
|
18418
18271
|
case 15:
|
|
18419
|
-
return Identifiers
|
|
18272
|
+
return Identifiers.propertyInterpolate7;
|
|
18420
18273
|
case 17:
|
|
18421
|
-
return Identifiers
|
|
18274
|
+
return Identifiers.propertyInterpolate8;
|
|
18422
18275
|
default:
|
|
18423
|
-
return Identifiers
|
|
18276
|
+
return Identifiers.propertyInterpolateV;
|
|
18424
18277
|
}
|
|
18425
18278
|
}
|
|
18426
18279
|
/**
|
|
@@ -18430,23 +18283,23 @@ function getPropertyInterpolationExpression(interpolation) {
|
|
|
18430
18283
|
function getAttributeInterpolationExpression(interpolation) {
|
|
18431
18284
|
switch (getInterpolationArgsLength(interpolation)) {
|
|
18432
18285
|
case 3:
|
|
18433
|
-
return Identifiers
|
|
18286
|
+
return Identifiers.attributeInterpolate1;
|
|
18434
18287
|
case 5:
|
|
18435
|
-
return Identifiers
|
|
18288
|
+
return Identifiers.attributeInterpolate2;
|
|
18436
18289
|
case 7:
|
|
18437
|
-
return Identifiers
|
|
18290
|
+
return Identifiers.attributeInterpolate3;
|
|
18438
18291
|
case 9:
|
|
18439
|
-
return Identifiers
|
|
18292
|
+
return Identifiers.attributeInterpolate4;
|
|
18440
18293
|
case 11:
|
|
18441
|
-
return Identifiers
|
|
18294
|
+
return Identifiers.attributeInterpolate5;
|
|
18442
18295
|
case 13:
|
|
18443
|
-
return Identifiers
|
|
18296
|
+
return Identifiers.attributeInterpolate6;
|
|
18444
18297
|
case 15:
|
|
18445
|
-
return Identifiers
|
|
18298
|
+
return Identifiers.attributeInterpolate7;
|
|
18446
18299
|
case 17:
|
|
18447
|
-
return Identifiers
|
|
18300
|
+
return Identifiers.attributeInterpolate8;
|
|
18448
18301
|
default:
|
|
18449
|
-
return Identifiers
|
|
18302
|
+
return Identifiers.attributeInterpolateV;
|
|
18450
18303
|
}
|
|
18451
18304
|
}
|
|
18452
18305
|
/**
|
|
@@ -18456,25 +18309,25 @@ function getAttributeInterpolationExpression(interpolation) {
|
|
|
18456
18309
|
function getTextInterpolationExpression(interpolation) {
|
|
18457
18310
|
switch (getInterpolationArgsLength(interpolation)) {
|
|
18458
18311
|
case 1:
|
|
18459
|
-
return Identifiers
|
|
18312
|
+
return Identifiers.textInterpolate;
|
|
18460
18313
|
case 3:
|
|
18461
|
-
return Identifiers
|
|
18314
|
+
return Identifiers.textInterpolate1;
|
|
18462
18315
|
case 5:
|
|
18463
|
-
return Identifiers
|
|
18316
|
+
return Identifiers.textInterpolate2;
|
|
18464
18317
|
case 7:
|
|
18465
|
-
return Identifiers
|
|
18318
|
+
return Identifiers.textInterpolate3;
|
|
18466
18319
|
case 9:
|
|
18467
|
-
return Identifiers
|
|
18320
|
+
return Identifiers.textInterpolate4;
|
|
18468
18321
|
case 11:
|
|
18469
|
-
return Identifiers
|
|
18322
|
+
return Identifiers.textInterpolate5;
|
|
18470
18323
|
case 13:
|
|
18471
|
-
return Identifiers
|
|
18324
|
+
return Identifiers.textInterpolate6;
|
|
18472
18325
|
case 15:
|
|
18473
|
-
return Identifiers
|
|
18326
|
+
return Identifiers.textInterpolate7;
|
|
18474
18327
|
case 17:
|
|
18475
|
-
return Identifiers
|
|
18328
|
+
return Identifiers.textInterpolate8;
|
|
18476
18329
|
default:
|
|
18477
|
-
return Identifiers
|
|
18330
|
+
return Identifiers.textInterpolateV;
|
|
18478
18331
|
}
|
|
18479
18332
|
}
|
|
18480
18333
|
/**
|
|
@@ -18565,18 +18418,18 @@ function makeBindingParser(interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
|
|
|
18565
18418
|
function resolveSanitizationFn(context, isAttribute) {
|
|
18566
18419
|
switch (context) {
|
|
18567
18420
|
case SecurityContext.HTML:
|
|
18568
|
-
return importExpr(Identifiers
|
|
18421
|
+
return importExpr(Identifiers.sanitizeHtml);
|
|
18569
18422
|
case SecurityContext.SCRIPT:
|
|
18570
|
-
return importExpr(Identifiers
|
|
18423
|
+
return importExpr(Identifiers.sanitizeScript);
|
|
18571
18424
|
case SecurityContext.STYLE:
|
|
18572
18425
|
// the compiler does not fill in an instruction for [style.prop?] binding
|
|
18573
18426
|
// values because the style algorithm knows internally what props are subject
|
|
18574
18427
|
// to sanitization (only [attr.style] values are explicitly sanitized)
|
|
18575
|
-
return isAttribute ? importExpr(Identifiers
|
|
18428
|
+
return isAttribute ? importExpr(Identifiers.sanitizeStyle) : null;
|
|
18576
18429
|
case SecurityContext.URL:
|
|
18577
|
-
return importExpr(Identifiers
|
|
18430
|
+
return importExpr(Identifiers.sanitizeUrl);
|
|
18578
18431
|
case SecurityContext.RESOURCE_URL:
|
|
18579
|
-
return importExpr(Identifiers
|
|
18432
|
+
return importExpr(Identifiers.sanitizeResourceUrl);
|
|
18580
18433
|
default:
|
|
18581
18434
|
return null;
|
|
18582
18435
|
}
|
|
@@ -18586,10 +18439,10 @@ function trustedConstAttribute(tagName, attr) {
|
|
|
18586
18439
|
if (isTrustedTypesSink(tagName, attr.name)) {
|
|
18587
18440
|
switch (elementRegistry.securityContext(tagName, attr.name, /* isAttribute */ true)) {
|
|
18588
18441
|
case SecurityContext.HTML:
|
|
18589
|
-
return taggedTemplate(importExpr(Identifiers
|
|
18442
|
+
return taggedTemplate(importExpr(Identifiers.trustConstantHtml), new TemplateLiteral([new TemplateLiteralElement(attr.value)], []), undefined, attr.valueSpan);
|
|
18590
18443
|
// NB: no SecurityContext.SCRIPT here, as the corresponding tags are stripped by the compiler.
|
|
18591
18444
|
case SecurityContext.RESOURCE_URL:
|
|
18592
|
-
return taggedTemplate(importExpr(Identifiers
|
|
18445
|
+
return taggedTemplate(importExpr(Identifiers.trustConstantResourceUrl), new TemplateLiteral([new TemplateLiteralElement(attr.value)], []), undefined, attr.valueSpan);
|
|
18593
18446
|
default:
|
|
18594
18447
|
return value;
|
|
18595
18448
|
}
|
|
@@ -18718,16 +18571,16 @@ function addFeatures(definitionMap, meta) {
|
|
|
18718
18571
|
if (viewProviders) {
|
|
18719
18572
|
args.push(viewProviders);
|
|
18720
18573
|
}
|
|
18721
|
-
features.push(importExpr(Identifiers
|
|
18574
|
+
features.push(importExpr(Identifiers.ProvidersFeature).callFn(args));
|
|
18722
18575
|
}
|
|
18723
18576
|
if (meta.usesInheritance) {
|
|
18724
|
-
features.push(importExpr(Identifiers
|
|
18577
|
+
features.push(importExpr(Identifiers.InheritDefinitionFeature));
|
|
18725
18578
|
}
|
|
18726
18579
|
if (meta.fullInheritance) {
|
|
18727
|
-
features.push(importExpr(Identifiers
|
|
18580
|
+
features.push(importExpr(Identifiers.CopyDefinitionFeature));
|
|
18728
18581
|
}
|
|
18729
18582
|
if (meta.lifecycle.usesOnChanges) {
|
|
18730
|
-
features.push(importExpr(Identifiers
|
|
18583
|
+
features.push(importExpr(Identifiers.NgOnChangesFeature));
|
|
18731
18584
|
}
|
|
18732
18585
|
if (features.length) {
|
|
18733
18586
|
definitionMap.set('features', literalArr(features));
|
|
@@ -18739,7 +18592,7 @@ function addFeatures(definitionMap, meta) {
|
|
|
18739
18592
|
function compileDirectiveFromMetadata(meta, constantPool, bindingParser) {
|
|
18740
18593
|
const definitionMap = baseDirectiveFields(meta, constantPool, bindingParser);
|
|
18741
18594
|
addFeatures(definitionMap, meta);
|
|
18742
|
-
const expression = importExpr(Identifiers
|
|
18595
|
+
const expression = importExpr(Identifiers.defineDirective).callFn([definitionMap.toLiteralMap()], undefined, true);
|
|
18743
18596
|
const type = createDirectiveType(meta);
|
|
18744
18597
|
return { expression, type, statements: [] };
|
|
18745
18598
|
}
|
|
@@ -18765,7 +18618,7 @@ function compileComponentFromMetadata(meta, constantPool, bindingParser) {
|
|
|
18765
18618
|
const templateName = templateTypeName ? `${templateTypeName}_Template` : null;
|
|
18766
18619
|
const changeDetection = meta.changeDetection;
|
|
18767
18620
|
const template = meta.template;
|
|
18768
|
-
const templateBuilder = new TemplateDefinitionBuilder(constantPool, BindingScope.createRootScope(), 0, templateTypeName, null, null, templateName, Identifiers
|
|
18621
|
+
const templateBuilder = new TemplateDefinitionBuilder(constantPool, BindingScope.createRootScope(), 0, templateTypeName, null, null, templateName, Identifiers.namespaceHTML, meta.relativeContextFilePath, meta.i18nUseExternalIds);
|
|
18769
18622
|
const templateFunctionExpression = templateBuilder.buildTemplateFunction(template.nodes, []);
|
|
18770
18623
|
// We need to provide this so that dynamically generated components know what
|
|
18771
18624
|
// projected content blocks to pass through to the component when it is instantiated.
|
|
@@ -18831,7 +18684,7 @@ function compileComponentFromMetadata(meta, constantPool, bindingParser) {
|
|
|
18831
18684
|
if (changeDetection != null && changeDetection !== ChangeDetectionStrategy.Default) {
|
|
18832
18685
|
definitionMap.set('changeDetection', literal(changeDetection));
|
|
18833
18686
|
}
|
|
18834
|
-
const expression = importExpr(Identifiers
|
|
18687
|
+
const expression = importExpr(Identifiers.defineComponent).callFn([definitionMap.toLiteralMap()], undefined, true);
|
|
18835
18688
|
const type = createComponentType(meta);
|
|
18836
18689
|
return { expression, type, statements: [] };
|
|
18837
18690
|
}
|
|
@@ -18842,7 +18695,7 @@ function compileComponentFromMetadata(meta, constantPool, bindingParser) {
|
|
|
18842
18695
|
function createComponentType(meta) {
|
|
18843
18696
|
const typeParams = createDirectiveTypeParams(meta);
|
|
18844
18697
|
typeParams.push(stringArrayAsType(meta.template.ngContentSelectors));
|
|
18845
|
-
return expressionType(importExpr(Identifiers
|
|
18698
|
+
return expressionType(importExpr(Identifiers.ComponentDeclaration, typeParams));
|
|
18846
18699
|
}
|
|
18847
18700
|
/**
|
|
18848
18701
|
* Compiles the array literal of declarations into an expression according to the provided emit
|
|
@@ -18858,7 +18711,7 @@ function compileDeclarationList(list, mode) {
|
|
|
18858
18711
|
return fn([], [new ReturnStatement(list)]);
|
|
18859
18712
|
case 2 /* ClosureResolved */:
|
|
18860
18713
|
// directives: function () { return [MyDir].map(ng.resolveForwardRef); }
|
|
18861
|
-
const resolvedList = list.prop('map').callFn([importExpr(Identifiers
|
|
18714
|
+
const resolvedList = list.prop('map').callFn([importExpr(Identifiers.resolveForwardRef)]);
|
|
18862
18715
|
return fn([], [new ReturnStatement(resolvedList)]);
|
|
18863
18716
|
}
|
|
18864
18717
|
}
|
|
@@ -18893,13 +18746,13 @@ function createContentQueriesFunction(queries, constantPool, name) {
|
|
|
18893
18746
|
const tempAllocator = temporaryAllocator(updateStatements, TEMPORARY_NAME);
|
|
18894
18747
|
for (const query of queries) {
|
|
18895
18748
|
// creation, e.g. r3.contentQuery(dirIndex, somePredicate, true, null);
|
|
18896
|
-
createStatements.push(importExpr(Identifiers
|
|
18749
|
+
createStatements.push(importExpr(Identifiers.contentQuery)
|
|
18897
18750
|
.callFn([variable('dirIndex'), ...prepareQueryParams(query, constantPool)])
|
|
18898
18751
|
.toStmt());
|
|
18899
18752
|
// update, e.g. (r3.queryRefresh(tmp = r3.loadQuery()) && (ctx.someDir = tmp));
|
|
18900
18753
|
const temporary = tempAllocator();
|
|
18901
|
-
const getQueryList = importExpr(Identifiers
|
|
18902
|
-
const refresh = importExpr(Identifiers
|
|
18754
|
+
const getQueryList = importExpr(Identifiers.loadQuery).callFn([]);
|
|
18755
|
+
const refresh = importExpr(Identifiers.queryRefresh).callFn([temporary.set(getQueryList)]);
|
|
18903
18756
|
const updateDirective = variable(CONTEXT_NAME)
|
|
18904
18757
|
.prop(query.propertyName)
|
|
18905
18758
|
.set(query.first ? temporary.prop('first') : temporary);
|
|
@@ -18951,7 +18804,7 @@ function createDirectiveTypeParams(meta) {
|
|
|
18951
18804
|
*/
|
|
18952
18805
|
function createDirectiveType(meta) {
|
|
18953
18806
|
const typeParams = createDirectiveTypeParams(meta);
|
|
18954
|
-
return expressionType(importExpr(Identifiers
|
|
18807
|
+
return expressionType(importExpr(Identifiers.DirectiveDeclaration, typeParams));
|
|
18955
18808
|
}
|
|
18956
18809
|
// Define and update any view queries
|
|
18957
18810
|
function createViewQueriesFunction(viewQueries, constantPool, name) {
|
|
@@ -18960,12 +18813,12 @@ function createViewQueriesFunction(viewQueries, constantPool, name) {
|
|
|
18960
18813
|
const tempAllocator = temporaryAllocator(updateStatements, TEMPORARY_NAME);
|
|
18961
18814
|
viewQueries.forEach((query) => {
|
|
18962
18815
|
// creation, e.g. r3.viewQuery(somePredicate, true);
|
|
18963
|
-
const queryDefinition = importExpr(Identifiers
|
|
18816
|
+
const queryDefinition = importExpr(Identifiers.viewQuery).callFn(prepareQueryParams(query, constantPool));
|
|
18964
18817
|
createStatements.push(queryDefinition.toStmt());
|
|
18965
18818
|
// update, e.g. (r3.queryRefresh(tmp = r3.loadQuery()) && (ctx.someDir = tmp));
|
|
18966
18819
|
const temporary = tempAllocator();
|
|
18967
|
-
const getQueryList = importExpr(Identifiers
|
|
18968
|
-
const refresh = importExpr(Identifiers
|
|
18820
|
+
const getQueryList = importExpr(Identifiers.loadQuery).callFn([]);
|
|
18821
|
+
const refresh = importExpr(Identifiers.queryRefresh).callFn([temporary.set(getQueryList)]);
|
|
18969
18822
|
const updateDirective = variable(CONTEXT_NAME)
|
|
18970
18823
|
.prop(query.propertyName)
|
|
18971
18824
|
.set(query.first ? temporary.prop('first') : temporary);
|
|
@@ -19047,7 +18900,7 @@ function createHostBindingsFunction(hostBindingsMetadata, typeSourceSpan, bindin
|
|
|
19047
18900
|
// of different security contexts. In this case we use special sanitization function and
|
|
19048
18901
|
// select the actual sanitizer at runtime based on a tag name that is provided while
|
|
19049
18902
|
// invoking sanitization function.
|
|
19050
|
-
sanitizerFn = importExpr(Identifiers
|
|
18903
|
+
sanitizerFn = importExpr(Identifiers.sanitizeUrlOrResourceUrl);
|
|
19051
18904
|
}
|
|
19052
18905
|
else {
|
|
19053
18906
|
sanitizerFn = resolveSanitizationFn(securityContexts[0], isAttribute);
|
|
@@ -19058,13 +18911,13 @@ function createHostBindingsFunction(hostBindingsMetadata, typeSourceSpan, bindin
|
|
|
19058
18911
|
instructionParams.push(sanitizerFn);
|
|
19059
18912
|
}
|
|
19060
18913
|
updateStatements.push(...bindingExpr.stmts);
|
|
19061
|
-
if (instruction === Identifiers
|
|
18914
|
+
if (instruction === Identifiers.hostProperty) {
|
|
19062
18915
|
propertyBindings.push(instructionParams);
|
|
19063
18916
|
}
|
|
19064
|
-
else if (instruction === Identifiers
|
|
18917
|
+
else if (instruction === Identifiers.attribute) {
|
|
19065
18918
|
attributeBindings.push(instructionParams);
|
|
19066
18919
|
}
|
|
19067
|
-
else if (instruction === Identifiers
|
|
18920
|
+
else if (instruction === Identifiers.syntheticHostProperty) {
|
|
19068
18921
|
syntheticHostBindings.push(instructionParams);
|
|
19069
18922
|
}
|
|
19070
18923
|
else {
|
|
@@ -19072,13 +18925,13 @@ function createHostBindingsFunction(hostBindingsMetadata, typeSourceSpan, bindin
|
|
|
19072
18925
|
}
|
|
19073
18926
|
});
|
|
19074
18927
|
if (propertyBindings.length > 0) {
|
|
19075
|
-
updateStatements.push(chainedInstruction(Identifiers
|
|
18928
|
+
updateStatements.push(chainedInstruction(Identifiers.hostProperty, propertyBindings).toStmt());
|
|
19076
18929
|
}
|
|
19077
18930
|
if (attributeBindings.length > 0) {
|
|
19078
|
-
updateStatements.push(chainedInstruction(Identifiers
|
|
18931
|
+
updateStatements.push(chainedInstruction(Identifiers.attribute, attributeBindings).toStmt());
|
|
19079
18932
|
}
|
|
19080
18933
|
if (syntheticHostBindings.length > 0) {
|
|
19081
|
-
updateStatements.push(chainedInstruction(Identifiers
|
|
18934
|
+
updateStatements.push(chainedInstruction(Identifiers.syntheticHostProperty, syntheticHostBindings).toStmt());
|
|
19082
18935
|
}
|
|
19083
18936
|
// since we're dealing with directives/components and both have hostBinding
|
|
19084
18937
|
// functions, we need to generate a special hostAttrs instruction that deals
|
|
@@ -19124,7 +18977,7 @@ function createHostBindingsFunction(hostBindingsMetadata, typeSourceSpan, bindin
|
|
|
19124
18977
|
return null;
|
|
19125
18978
|
}
|
|
19126
18979
|
function bindingFn(implicit, value) {
|
|
19127
|
-
return convertPropertyBinding(null, implicit, value, 'b'
|
|
18980
|
+
return convertPropertyBinding(null, implicit, value, 'b');
|
|
19128
18981
|
}
|
|
19129
18982
|
function convertStylingCall(call, bindingContext, bindingFn) {
|
|
19130
18983
|
return call.params(value => bindingFn(bindingContext, value).currValExpr);
|
|
@@ -19136,7 +18989,7 @@ function getBindingNameAndInstruction(binding) {
|
|
|
19136
18989
|
const attrMatches = bindingName.match(ATTR_REGEX);
|
|
19137
18990
|
if (attrMatches) {
|
|
19138
18991
|
bindingName = attrMatches[1];
|
|
19139
|
-
instruction = Identifiers
|
|
18992
|
+
instruction = Identifiers.attribute;
|
|
19140
18993
|
}
|
|
19141
18994
|
else {
|
|
19142
18995
|
if (binding.isAnimation) {
|
|
@@ -19144,10 +18997,10 @@ function getBindingNameAndInstruction(binding) {
|
|
|
19144
18997
|
// host bindings that have a synthetic property (e.g. @foo) should always be rendered
|
|
19145
18998
|
// in the context of the component and not the parent. Therefore there is a special
|
|
19146
18999
|
// compatibility instruction available for this purpose.
|
|
19147
|
-
instruction = Identifiers
|
|
19000
|
+
instruction = Identifiers.syntheticHostProperty;
|
|
19148
19001
|
}
|
|
19149
19002
|
else {
|
|
19150
|
-
instruction = Identifiers
|
|
19003
|
+
instruction = Identifiers.hostProperty;
|
|
19151
19004
|
}
|
|
19152
19005
|
}
|
|
19153
19006
|
return { bindingName, instruction, isAttribute: !!attrMatches };
|
|
@@ -19171,10 +19024,10 @@ function createHostListeners(eventBindings, name) {
|
|
|
19171
19024
|
}
|
|
19172
19025
|
});
|
|
19173
19026
|
if (syntheticListeners.length > 0) {
|
|
19174
|
-
instructions.push(chainedInstruction(Identifiers
|
|
19027
|
+
instructions.push(chainedInstruction(Identifiers.syntheticHostListener, syntheticListeners).toStmt());
|
|
19175
19028
|
}
|
|
19176
19029
|
if (listeners.length > 0) {
|
|
19177
|
-
instructions.push(chainedInstruction(Identifiers
|
|
19030
|
+
instructions.push(chainedInstruction(Identifiers.listener, listeners).toStmt());
|
|
19178
19031
|
}
|
|
19179
19032
|
return instructions;
|
|
19180
19033
|
}
|
|
@@ -19723,7 +19576,7 @@ function publishFacade(global) {
|
|
|
19723
19576
|
* Use of this source code is governed by an MIT-style license that can be
|
|
19724
19577
|
* found in the LICENSE file at https://angular.io/license
|
|
19725
19578
|
*/
|
|
19726
|
-
const VERSION = new Version('
|
|
19579
|
+
const VERSION = new Version('14.0.0-next.1');
|
|
19727
19580
|
|
|
19728
19581
|
/**
|
|
19729
19582
|
* @license
|
|
@@ -21722,7 +21575,7 @@ function compileClassMetadata(metadata) {
|
|
|
21722
21575
|
var _a, _b;
|
|
21723
21576
|
// Generate an ngDevMode guarded call to setClassMetadata with the class identifier and its
|
|
21724
21577
|
// metadata.
|
|
21725
|
-
const fnCall = importExpr(Identifiers
|
|
21578
|
+
const fnCall = importExpr(Identifiers.setClassMetadata).callFn([
|
|
21726
21579
|
metadata.type,
|
|
21727
21580
|
metadata.decorators,
|
|
21728
21581
|
(_a = metadata.ctorParameters) !== null && _a !== void 0 ? _a : literal(null),
|
|
@@ -21750,13 +21603,13 @@ const MINIMUM_PARTIAL_LINKER_VERSION$6 = '12.0.0';
|
|
|
21750
21603
|
function compileDeclareClassMetadata(metadata) {
|
|
21751
21604
|
const definitionMap = new DefinitionMap();
|
|
21752
21605
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$6));
|
|
21753
|
-
definitionMap.set('version', literal('
|
|
21754
|
-
definitionMap.set('ngImport', importExpr(Identifiers
|
|
21606
|
+
definitionMap.set('version', literal('14.0.0-next.1'));
|
|
21607
|
+
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
21755
21608
|
definitionMap.set('type', metadata.type);
|
|
21756
21609
|
definitionMap.set('decorators', metadata.decorators);
|
|
21757
21610
|
definitionMap.set('ctorParameters', metadata.ctorParameters);
|
|
21758
21611
|
definitionMap.set('propDecorators', metadata.propDecorators);
|
|
21759
|
-
return importExpr(Identifiers
|
|
21612
|
+
return importExpr(Identifiers.declareClassMetadata).callFn([definitionMap.toLiteralMap()]);
|
|
21760
21613
|
}
|
|
21761
21614
|
|
|
21762
21615
|
/**
|
|
@@ -21856,7 +21709,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$5 = '12.0.0';
|
|
|
21856
21709
|
*/
|
|
21857
21710
|
function compileDeclareDirectiveFromMetadata(meta) {
|
|
21858
21711
|
const definitionMap = createDirectiveDefinitionMap(meta);
|
|
21859
|
-
const expression = importExpr(Identifiers
|
|
21712
|
+
const expression = importExpr(Identifiers.declareDirective).callFn([definitionMap.toLiteralMap()]);
|
|
21860
21713
|
const type = createDirectiveType(meta);
|
|
21861
21714
|
return { expression, type, statements: [] };
|
|
21862
21715
|
}
|
|
@@ -21867,7 +21720,7 @@ function compileDeclareDirectiveFromMetadata(meta) {
|
|
|
21867
21720
|
function createDirectiveDefinitionMap(meta) {
|
|
21868
21721
|
const definitionMap = new DefinitionMap();
|
|
21869
21722
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
|
|
21870
|
-
definitionMap.set('version', literal('
|
|
21723
|
+
definitionMap.set('version', literal('14.0.0-next.1'));
|
|
21871
21724
|
// e.g. `type: MyDirective`
|
|
21872
21725
|
definitionMap.set('type', meta.internalType);
|
|
21873
21726
|
// e.g. `selector: 'some-dir'`
|
|
@@ -21893,7 +21746,7 @@ function createDirectiveDefinitionMap(meta) {
|
|
|
21893
21746
|
if (meta.lifecycle.usesOnChanges) {
|
|
21894
21747
|
definitionMap.set('usesOnChanges', literal(true));
|
|
21895
21748
|
}
|
|
21896
|
-
definitionMap.set('ngImport', importExpr(Identifiers
|
|
21749
|
+
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
21897
21750
|
return definitionMap;
|
|
21898
21751
|
}
|
|
21899
21752
|
/**
|
|
@@ -21960,7 +21813,7 @@ function compileHostMetadata(meta) {
|
|
|
21960
21813
|
*/
|
|
21961
21814
|
function compileDeclareComponentFromMetadata(meta, template, additionalTemplateInfo) {
|
|
21962
21815
|
const definitionMap = createComponentDefinitionMap(meta, template, additionalTemplateInfo);
|
|
21963
|
-
const expression = importExpr(Identifiers
|
|
21816
|
+
const expression = importExpr(Identifiers.declareComponent).callFn([definitionMap.toLiteralMap()]);
|
|
21964
21817
|
const type = createComponentType(meta);
|
|
21965
21818
|
return { expression, type, statements: [] };
|
|
21966
21819
|
}
|
|
@@ -21980,11 +21833,11 @@ function createComponentDefinitionMap(meta, template, templateInfo) {
|
|
|
21980
21833
|
definitionMap.set('viewProviders', meta.viewProviders);
|
|
21981
21834
|
definitionMap.set('animations', meta.animations);
|
|
21982
21835
|
if (meta.changeDetection !== undefined) {
|
|
21983
|
-
definitionMap.set('changeDetection', importExpr(Identifiers
|
|
21836
|
+
definitionMap.set('changeDetection', importExpr(Identifiers.ChangeDetectionStrategy)
|
|
21984
21837
|
.prop(ChangeDetectionStrategy[meta.changeDetection]));
|
|
21985
21838
|
}
|
|
21986
21839
|
if (meta.encapsulation !== ViewEncapsulation.Emulated) {
|
|
21987
|
-
definitionMap.set('encapsulation', importExpr(Identifiers
|
|
21840
|
+
definitionMap.set('encapsulation', importExpr(Identifiers.ViewEncapsulation).prop(ViewEncapsulation[meta.encapsulation]));
|
|
21988
21841
|
}
|
|
21989
21842
|
if (meta.interpolation !== DEFAULT_INTERPOLATION_CONFIG) {
|
|
21990
21843
|
definitionMap.set('interpolation', literalArr([literal(meta.interpolation.start), literal(meta.interpolation.end)]));
|
|
@@ -22088,13 +21941,13 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
|
|
|
22088
21941
|
function compileDeclareFactoryFunction(meta) {
|
|
22089
21942
|
const definitionMap = new DefinitionMap();
|
|
22090
21943
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
|
|
22091
|
-
definitionMap.set('version', literal('
|
|
22092
|
-
definitionMap.set('ngImport', importExpr(Identifiers
|
|
21944
|
+
definitionMap.set('version', literal('14.0.0-next.1'));
|
|
21945
|
+
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22093
21946
|
definitionMap.set('type', meta.internalType);
|
|
22094
21947
|
definitionMap.set('deps', compileDependencies(meta.deps));
|
|
22095
|
-
definitionMap.set('target', importExpr(Identifiers
|
|
21948
|
+
definitionMap.set('target', importExpr(Identifiers.FactoryTarget).prop(FactoryTarget$1[meta.target]));
|
|
22096
21949
|
return {
|
|
22097
|
-
expression: importExpr(Identifiers
|
|
21950
|
+
expression: importExpr(Identifiers.declareFactory).callFn([definitionMap.toLiteralMap()]),
|
|
22098
21951
|
statements: [],
|
|
22099
21952
|
type: createFactoryType(meta),
|
|
22100
21953
|
};
|
|
@@ -22120,7 +21973,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$3 = '12.0.0';
|
|
|
22120
21973
|
*/
|
|
22121
21974
|
function compileDeclareInjectableFromMetadata(meta) {
|
|
22122
21975
|
const definitionMap = createInjectableDefinitionMap(meta);
|
|
22123
|
-
const expression = importExpr(Identifiers
|
|
21976
|
+
const expression = importExpr(Identifiers.declareInjectable).callFn([definitionMap.toLiteralMap()]);
|
|
22124
21977
|
const type = createInjectableType(meta);
|
|
22125
21978
|
return { expression, type, statements: [] };
|
|
22126
21979
|
}
|
|
@@ -22130,8 +21983,8 @@ function compileDeclareInjectableFromMetadata(meta) {
|
|
|
22130
21983
|
function createInjectableDefinitionMap(meta) {
|
|
22131
21984
|
const definitionMap = new DefinitionMap();
|
|
22132
21985
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
|
|
22133
|
-
definitionMap.set('version', literal('
|
|
22134
|
-
definitionMap.set('ngImport', importExpr(Identifiers
|
|
21986
|
+
definitionMap.set('version', literal('14.0.0-next.1'));
|
|
21987
|
+
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22135
21988
|
definitionMap.set('type', meta.internalType);
|
|
22136
21989
|
// Only generate providedIn property if it has a non-null value
|
|
22137
21990
|
if (meta.providedIn !== undefined) {
|
|
@@ -22178,7 +22031,7 @@ function createInjectableDefinitionMap(meta) {
|
|
|
22178
22031
|
const MINIMUM_PARTIAL_LINKER_VERSION$2 = '12.0.0';
|
|
22179
22032
|
function compileDeclareInjectorFromMetadata(meta) {
|
|
22180
22033
|
const definitionMap = createInjectorDefinitionMap(meta);
|
|
22181
|
-
const expression = importExpr(Identifiers
|
|
22034
|
+
const expression = importExpr(Identifiers.declareInjector).callFn([definitionMap.toLiteralMap()]);
|
|
22182
22035
|
const type = createInjectorType(meta);
|
|
22183
22036
|
return { expression, type, statements: [] };
|
|
22184
22037
|
}
|
|
@@ -22188,8 +22041,8 @@ function compileDeclareInjectorFromMetadata(meta) {
|
|
|
22188
22041
|
function createInjectorDefinitionMap(meta) {
|
|
22189
22042
|
const definitionMap = new DefinitionMap();
|
|
22190
22043
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
|
|
22191
|
-
definitionMap.set('version', literal('
|
|
22192
|
-
definitionMap.set('ngImport', importExpr(Identifiers
|
|
22044
|
+
definitionMap.set('version', literal('14.0.0-next.1'));
|
|
22045
|
+
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22193
22046
|
definitionMap.set('type', meta.internalType);
|
|
22194
22047
|
definitionMap.set('providers', meta.providers);
|
|
22195
22048
|
if (meta.imports.length > 0) {
|
|
@@ -22215,7 +22068,7 @@ function createInjectorDefinitionMap(meta) {
|
|
|
22215
22068
|
const MINIMUM_PARTIAL_LINKER_VERSION$1 = '12.0.0';
|
|
22216
22069
|
function compileDeclareNgModuleFromMetadata(meta) {
|
|
22217
22070
|
const definitionMap = createNgModuleDefinitionMap(meta);
|
|
22218
|
-
const expression = importExpr(Identifiers
|
|
22071
|
+
const expression = importExpr(Identifiers.declareNgModule).callFn([definitionMap.toLiteralMap()]);
|
|
22219
22072
|
const type = createNgModuleType(meta);
|
|
22220
22073
|
return { expression, type, statements: [] };
|
|
22221
22074
|
}
|
|
@@ -22225,8 +22078,8 @@ function compileDeclareNgModuleFromMetadata(meta) {
|
|
|
22225
22078
|
function createNgModuleDefinitionMap(meta) {
|
|
22226
22079
|
const definitionMap = new DefinitionMap();
|
|
22227
22080
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
|
|
22228
|
-
definitionMap.set('version', literal('
|
|
22229
|
-
definitionMap.set('ngImport', importExpr(Identifiers
|
|
22081
|
+
definitionMap.set('version', literal('14.0.0-next.1'));
|
|
22082
|
+
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22230
22083
|
definitionMap.set('type', meta.internalType);
|
|
22231
22084
|
// We only generate the keys in the metadata if the arrays contain values.
|
|
22232
22085
|
// We must wrap the arrays inside a function if any of the values are a forward reference to a
|
|
@@ -22273,7 +22126,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION = '12.0.0';
|
|
|
22273
22126
|
*/
|
|
22274
22127
|
function compileDeclarePipeFromMetadata(meta) {
|
|
22275
22128
|
const definitionMap = createPipeDefinitionMap(meta);
|
|
22276
|
-
const expression = importExpr(Identifiers
|
|
22129
|
+
const expression = importExpr(Identifiers.declarePipe).callFn([definitionMap.toLiteralMap()]);
|
|
22277
22130
|
const type = createPipeType(meta);
|
|
22278
22131
|
return { expression, type, statements: [] };
|
|
22279
22132
|
}
|
|
@@ -22283,8 +22136,8 @@ function compileDeclarePipeFromMetadata(meta) {
|
|
|
22283
22136
|
function createPipeDefinitionMap(meta) {
|
|
22284
22137
|
const definitionMap = new DefinitionMap();
|
|
22285
22138
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
22286
|
-
definitionMap.set('version', literal('
|
|
22287
|
-
definitionMap.set('ngImport', importExpr(Identifiers
|
|
22139
|
+
definitionMap.set('version', literal('14.0.0-next.1'));
|
|
22140
|
+
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22288
22141
|
// e.g. `type: MyPipe`
|
|
22289
22142
|
definitionMap.set('type', meta.internalType);
|
|
22290
22143
|
// e.g. `name: "myPipe"`
|
|
@@ -22333,5 +22186,5 @@ publishFacade(_global);
|
|
|
22333
22186
|
* found in the LICENSE file at https://angular.io/license
|
|
22334
22187
|
*/
|
|
22335
22188
|
|
|
22336
|
-
export { AST, ASTWithName, ASTWithSource, AbsoluteSourceSpan, ArrayType, AstMemoryEfficientTransformer, AstTransformer, Attribute, Binary, BinaryOperator, BinaryOperatorExpr, BindingPipe, BoundElementProperty, BuiltinType, BuiltinTypeName, CUSTOM_ELEMENTS_SCHEMA, Call, Chain, ChangeDetectionStrategy, CommaExpr, Comment, CompilerConfig, Conditional, ConditionalExpr, ConstantPool, CssSelector, DEFAULT_INTERPOLATION_CONFIG, DYNAMIC_TYPE, DeclareFunctionStmt, DeclareVarStmt, DomElementSchemaRegistry, EOF, Element, ElementSchemaRegistry, EmitterVisitorContext, EmptyExpr, Expansion, ExpansionCase, Expression, ExpressionBinding, ExpressionStatement, ExpressionType, ExternalExpr, ExternalReference, FactoryTarget$1 as FactoryTarget, FunctionExpr, HtmlParser, HtmlTagDefinition, I18NHtmlParser,
|
|
22189
|
+
export { AST, ASTWithName, ASTWithSource, AbsoluteSourceSpan, ArrayType, AstMemoryEfficientTransformer, AstTransformer, Attribute, Binary, BinaryOperator, BinaryOperatorExpr, BindingPipe, BoundElementProperty, BuiltinType, BuiltinTypeName, CUSTOM_ELEMENTS_SCHEMA, Call, Chain, ChangeDetectionStrategy, CommaExpr, Comment, CompilerConfig, Conditional, ConditionalExpr, ConstantPool, CssSelector, DEFAULT_INTERPOLATION_CONFIG, DYNAMIC_TYPE, DeclareFunctionStmt, DeclareVarStmt, DomElementSchemaRegistry, EOF, Element, ElementSchemaRegistry, EmitterVisitorContext, EmptyExpr, Expansion, ExpansionCase, Expression, ExpressionBinding, ExpressionStatement, ExpressionType, ExternalExpr, ExternalReference, FactoryTarget$1 as FactoryTarget, FunctionExpr, HtmlParser, HtmlTagDefinition, I18NHtmlParser, IfStmt, ImplicitReceiver, InstantiateExpr, Interpolation, InterpolationConfig, InvokeFunctionExpr, JSDocComment, JitEvaluator, KeyedRead, KeyedWrite, LeadingComment, Lexer, LiteralArray, LiteralArrayExpr, LiteralExpr, LiteralMap, LiteralMapExpr, LiteralPrimitive, LocalizedString, MapType, MessageBundle, NONE_TYPE, NO_ERRORS_SCHEMA, NodeWithI18n, NonNullAssert, NotExpr, ParseError, ParseErrorLevel, ParseLocation, ParseSourceFile, ParseSourceSpan, ParseSpan, ParseTreeResult, ParsedEvent, ParsedProperty, ParsedPropertyType, ParsedVariable, Parser$1 as Parser, ParserError, PrefixNot, PropertyRead, PropertyWrite, R3BoundTarget, Identifiers as R3Identifiers, R3TargetBinder, ReadKeyExpr, ReadPropExpr, ReadVarExpr, RecursiveAstVisitor, RecursiveVisitor, ResourceLoader, ReturnStatement, STRING_TYPE, SafeCall, SafeKeyedRead, SafePropertyRead, SelectorContext, SelectorListContext, SelectorMatcher, Serializer, SplitInterpolation, Statement, StmtModifier, TagContentType, TaggedTemplateExpr, TemplateBindingParseResult, TemplateLiteral, TemplateLiteralElement, Text, ThisReceiver, BoundAttribute as TmplAstBoundAttribute, BoundEvent as TmplAstBoundEvent, BoundText as TmplAstBoundText, Content as TmplAstContent, Element$1 as TmplAstElement, Icu$1 as TmplAstIcu, RecursiveVisitor$1 as TmplAstRecursiveVisitor, Reference as TmplAstReference, Template as TmplAstTemplate, Text$3 as TmplAstText, TextAttribute as TmplAstTextAttribute, Variable as TmplAstVariable, Token, TokenType, TreeError, Type, TypeModifier, TypeofExpr, Unary, UnaryOperator, UnaryOperatorExpr, VERSION, VariableBinding, Version, ViewEncapsulation, WrappedNodeExpr, WriteKeyExpr, WritePropExpr, WriteVarExpr, Xliff, Xliff2, Xmb, XmlParser, Xtb, _ParseAST, compileClassMetadata, compileComponentFromMetadata, compileDeclareClassMetadata, compileDeclareComponentFromMetadata, compileDeclareDirectiveFromMetadata, compileDeclareFactoryFunction, compileDeclareInjectableFromMetadata, compileDeclareInjectorFromMetadata, compileDeclareNgModuleFromMetadata, compileDeclarePipeFromMetadata, compileDirectiveFromMetadata, compileFactoryFunction, compileInjectable, compileInjector, compileNgModule, compilePipeFromMetadata, computeMsgId, core, createInjectableType, createMayBeForwardRefExpression, devOnlyGuardedExpression, emitDistinctChangesOnlyDefaultValue, getHtmlTagDefinition, getNsPrefix, getSafePropertyAccessString, identifierName, isIdentifier, isNgContainer, isNgContent, isNgTemplate, jsDocComment, leadingComment, literalMap, makeBindingParser, mergeNsAndName, output_ast as outputAst, parseHostBindings, parseTemplate, preserveWhitespacesDefault, publishFacade, r3JitTypeSourceSpan, sanitizeIdentifier, splitNsName, verifyHostBindings, visitAll };
|
|
22337
22190
|
//# sourceMappingURL=compiler.mjs.map
|