@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/fesm2020/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
|
*/
|
|
@@ -2733,206 +2733,206 @@ function isLongStringLiteral(expr) {
|
|
|
2733
2733
|
* Use of this source code is governed by an MIT-style license that can be
|
|
2734
2734
|
* found in the LICENSE file at https://angular.io/license
|
|
2735
2735
|
*/
|
|
2736
|
-
const CORE
|
|
2737
|
-
class Identifiers
|
|
2736
|
+
const CORE = '@angular/core';
|
|
2737
|
+
class Identifiers {
|
|
2738
2738
|
}
|
|
2739
2739
|
/* Methods */
|
|
2740
|
-
Identifiers
|
|
2741
|
-
Identifiers
|
|
2742
|
-
Identifiers
|
|
2743
|
-
Identifiers
|
|
2740
|
+
Identifiers.NEW_METHOD = 'factory';
|
|
2741
|
+
Identifiers.TRANSFORM_METHOD = 'transform';
|
|
2742
|
+
Identifiers.PATCH_DEPS = 'patchedDeps';
|
|
2743
|
+
Identifiers.core = { name: null, moduleName: CORE };
|
|
2744
2744
|
/* Instructions */
|
|
2745
|
-
Identifiers
|
|
2746
|
-
Identifiers
|
|
2747
|
-
Identifiers
|
|
2748
|
-
Identifiers
|
|
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
|
|
2745
|
+
Identifiers.namespaceHTML = { name: 'ɵɵnamespaceHTML', moduleName: CORE };
|
|
2746
|
+
Identifiers.namespaceMathML = { name: 'ɵɵnamespaceMathML', moduleName: CORE };
|
|
2747
|
+
Identifiers.namespaceSVG = { name: 'ɵɵnamespaceSVG', moduleName: CORE };
|
|
2748
|
+
Identifiers.element = { name: 'ɵɵelement', moduleName: CORE };
|
|
2749
|
+
Identifiers.elementStart = { name: 'ɵɵelementStart', moduleName: CORE };
|
|
2750
|
+
Identifiers.elementEnd = { name: 'ɵɵelementEnd', moduleName: CORE };
|
|
2751
|
+
Identifiers.advance = { name: 'ɵɵadvance', moduleName: CORE };
|
|
2752
|
+
Identifiers.syntheticHostProperty = { name: 'ɵɵsyntheticHostProperty', moduleName: CORE };
|
|
2753
|
+
Identifiers.syntheticHostListener = { name: 'ɵɵsyntheticHostListener', moduleName: CORE };
|
|
2754
|
+
Identifiers.attribute = { name: 'ɵɵattribute', moduleName: CORE };
|
|
2755
|
+
Identifiers.attributeInterpolate1 = { name: 'ɵɵattributeInterpolate1', moduleName: CORE };
|
|
2756
|
+
Identifiers.attributeInterpolate2 = { name: 'ɵɵattributeInterpolate2', moduleName: CORE };
|
|
2757
|
+
Identifiers.attributeInterpolate3 = { name: 'ɵɵattributeInterpolate3', moduleName: CORE };
|
|
2758
|
+
Identifiers.attributeInterpolate4 = { name: 'ɵɵattributeInterpolate4', moduleName: CORE };
|
|
2759
|
+
Identifiers.attributeInterpolate5 = { name: 'ɵɵattributeInterpolate5', moduleName: CORE };
|
|
2760
|
+
Identifiers.attributeInterpolate6 = { name: 'ɵɵattributeInterpolate6', moduleName: CORE };
|
|
2761
|
+
Identifiers.attributeInterpolate7 = { name: 'ɵɵattributeInterpolate7', moduleName: CORE };
|
|
2762
|
+
Identifiers.attributeInterpolate8 = { name: 'ɵɵattributeInterpolate8', moduleName: CORE };
|
|
2763
|
+
Identifiers.attributeInterpolateV = { name: 'ɵɵattributeInterpolateV', moduleName: CORE };
|
|
2764
|
+
Identifiers.classProp = { name: 'ɵɵclassProp', moduleName: CORE };
|
|
2765
|
+
Identifiers.elementContainerStart = { name: 'ɵɵelementContainerStart', moduleName: CORE };
|
|
2766
|
+
Identifiers.elementContainerEnd = { name: 'ɵɵelementContainerEnd', moduleName: CORE };
|
|
2767
|
+
Identifiers.elementContainer = { name: 'ɵɵelementContainer', moduleName: CORE };
|
|
2768
|
+
Identifiers.styleMap = { name: 'ɵɵstyleMap', moduleName: CORE };
|
|
2769
|
+
Identifiers.styleMapInterpolate1 = { name: 'ɵɵstyleMapInterpolate1', moduleName: CORE };
|
|
2770
|
+
Identifiers.styleMapInterpolate2 = { name: 'ɵɵstyleMapInterpolate2', moduleName: CORE };
|
|
2771
|
+
Identifiers.styleMapInterpolate3 = { name: 'ɵɵstyleMapInterpolate3', moduleName: CORE };
|
|
2772
|
+
Identifiers.styleMapInterpolate4 = { name: 'ɵɵstyleMapInterpolate4', moduleName: CORE };
|
|
2773
|
+
Identifiers.styleMapInterpolate5 = { name: 'ɵɵstyleMapInterpolate5', moduleName: CORE };
|
|
2774
|
+
Identifiers.styleMapInterpolate6 = { name: 'ɵɵstyleMapInterpolate6', moduleName: CORE };
|
|
2775
|
+
Identifiers.styleMapInterpolate7 = { name: 'ɵɵstyleMapInterpolate7', moduleName: CORE };
|
|
2776
|
+
Identifiers.styleMapInterpolate8 = { name: 'ɵɵstyleMapInterpolate8', moduleName: CORE };
|
|
2777
|
+
Identifiers.styleMapInterpolateV = { name: 'ɵɵstyleMapInterpolateV', moduleName: CORE };
|
|
2778
|
+
Identifiers.classMap = { name: 'ɵɵclassMap', moduleName: CORE };
|
|
2779
|
+
Identifiers.classMapInterpolate1 = { name: 'ɵɵclassMapInterpolate1', moduleName: CORE };
|
|
2780
|
+
Identifiers.classMapInterpolate2 = { name: 'ɵɵclassMapInterpolate2', moduleName: CORE };
|
|
2781
|
+
Identifiers.classMapInterpolate3 = { name: 'ɵɵclassMapInterpolate3', moduleName: CORE };
|
|
2782
|
+
Identifiers.classMapInterpolate4 = { name: 'ɵɵclassMapInterpolate4', moduleName: CORE };
|
|
2783
|
+
Identifiers.classMapInterpolate5 = { name: 'ɵɵclassMapInterpolate5', moduleName: CORE };
|
|
2784
|
+
Identifiers.classMapInterpolate6 = { name: 'ɵɵclassMapInterpolate6', moduleName: CORE };
|
|
2785
|
+
Identifiers.classMapInterpolate7 = { name: 'ɵɵclassMapInterpolate7', moduleName: CORE };
|
|
2786
|
+
Identifiers.classMapInterpolate8 = { name: 'ɵɵclassMapInterpolate8', moduleName: CORE };
|
|
2787
|
+
Identifiers.classMapInterpolateV = { name: 'ɵɵclassMapInterpolateV', moduleName: CORE };
|
|
2788
|
+
Identifiers.styleProp = { name: 'ɵɵstyleProp', moduleName: CORE };
|
|
2789
|
+
Identifiers.stylePropInterpolate1 = { name: 'ɵɵstylePropInterpolate1', moduleName: CORE };
|
|
2790
|
+
Identifiers.stylePropInterpolate2 = { name: 'ɵɵstylePropInterpolate2', moduleName: CORE };
|
|
2791
|
+
Identifiers.stylePropInterpolate3 = { name: 'ɵɵstylePropInterpolate3', moduleName: CORE };
|
|
2792
|
+
Identifiers.stylePropInterpolate4 = { name: 'ɵɵstylePropInterpolate4', moduleName: CORE };
|
|
2793
|
+
Identifiers.stylePropInterpolate5 = { name: 'ɵɵstylePropInterpolate5', moduleName: CORE };
|
|
2794
|
+
Identifiers.stylePropInterpolate6 = { name: 'ɵɵstylePropInterpolate6', moduleName: CORE };
|
|
2795
|
+
Identifiers.stylePropInterpolate7 = { name: 'ɵɵstylePropInterpolate7', moduleName: CORE };
|
|
2796
|
+
Identifiers.stylePropInterpolate8 = { name: 'ɵɵstylePropInterpolate8', moduleName: CORE };
|
|
2797
|
+
Identifiers.stylePropInterpolateV = { name: 'ɵɵstylePropInterpolateV', moduleName: CORE };
|
|
2798
|
+
Identifiers.nextContext = { name: 'ɵɵnextContext', moduleName: CORE };
|
|
2799
|
+
Identifiers.templateCreate = { name: 'ɵɵtemplate', moduleName: CORE };
|
|
2800
|
+
Identifiers.text = { name: 'ɵɵtext', moduleName: CORE };
|
|
2801
|
+
Identifiers.enableBindings = { name: 'ɵɵenableBindings', moduleName: CORE };
|
|
2802
|
+
Identifiers.disableBindings = { name: 'ɵɵdisableBindings', moduleName: CORE };
|
|
2803
|
+
Identifiers.getCurrentView = { name: 'ɵɵgetCurrentView', moduleName: CORE };
|
|
2804
|
+
Identifiers.textInterpolate = { name: 'ɵɵtextInterpolate', moduleName: CORE };
|
|
2805
|
+
Identifiers.textInterpolate1 = { name: 'ɵɵtextInterpolate1', moduleName: CORE };
|
|
2806
|
+
Identifiers.textInterpolate2 = { name: 'ɵɵtextInterpolate2', moduleName: CORE };
|
|
2807
|
+
Identifiers.textInterpolate3 = { name: 'ɵɵtextInterpolate3', moduleName: CORE };
|
|
2808
|
+
Identifiers.textInterpolate4 = { name: 'ɵɵtextInterpolate4', moduleName: CORE };
|
|
2809
|
+
Identifiers.textInterpolate5 = { name: 'ɵɵtextInterpolate5', moduleName: CORE };
|
|
2810
|
+
Identifiers.textInterpolate6 = { name: 'ɵɵtextInterpolate6', moduleName: CORE };
|
|
2811
|
+
Identifiers.textInterpolate7 = { name: 'ɵɵtextInterpolate7', moduleName: CORE };
|
|
2812
|
+
Identifiers.textInterpolate8 = { name: 'ɵɵtextInterpolate8', moduleName: CORE };
|
|
2813
|
+
Identifiers.textInterpolateV = { name: 'ɵɵtextInterpolateV', moduleName: CORE };
|
|
2814
|
+
Identifiers.restoreView = { name: 'ɵɵrestoreView', moduleName: CORE };
|
|
2815
|
+
Identifiers.pureFunction0 = { name: 'ɵɵpureFunction0', moduleName: CORE };
|
|
2816
|
+
Identifiers.pureFunction1 = { name: 'ɵɵpureFunction1', moduleName: CORE };
|
|
2817
|
+
Identifiers.pureFunction2 = { name: 'ɵɵpureFunction2', moduleName: CORE };
|
|
2818
|
+
Identifiers.pureFunction3 = { name: 'ɵɵpureFunction3', moduleName: CORE };
|
|
2819
|
+
Identifiers.pureFunction4 = { name: 'ɵɵpureFunction4', moduleName: CORE };
|
|
2820
|
+
Identifiers.pureFunction5 = { name: 'ɵɵpureFunction5', moduleName: CORE };
|
|
2821
|
+
Identifiers.pureFunction6 = { name: 'ɵɵpureFunction6', moduleName: CORE };
|
|
2822
|
+
Identifiers.pureFunction7 = { name: 'ɵɵpureFunction7', moduleName: CORE };
|
|
2823
|
+
Identifiers.pureFunction8 = { name: 'ɵɵpureFunction8', moduleName: CORE };
|
|
2824
|
+
Identifiers.pureFunctionV = { name: 'ɵɵpureFunctionV', moduleName: CORE };
|
|
2825
|
+
Identifiers.pipeBind1 = { name: 'ɵɵpipeBind1', moduleName: CORE };
|
|
2826
|
+
Identifiers.pipeBind2 = { name: 'ɵɵpipeBind2', moduleName: CORE };
|
|
2827
|
+
Identifiers.pipeBind3 = { name: 'ɵɵpipeBind3', moduleName: CORE };
|
|
2828
|
+
Identifiers.pipeBind4 = { name: 'ɵɵpipeBind4', moduleName: CORE };
|
|
2829
|
+
Identifiers.pipeBindV = { name: 'ɵɵpipeBindV', moduleName: CORE };
|
|
2830
|
+
Identifiers.hostProperty = { name: 'ɵɵhostProperty', moduleName: CORE };
|
|
2831
|
+
Identifiers.property = { name: 'ɵɵproperty', moduleName: CORE };
|
|
2832
|
+
Identifiers.propertyInterpolate = { name: 'ɵɵpropertyInterpolate', moduleName: CORE };
|
|
2833
|
+
Identifiers.propertyInterpolate1 = { name: 'ɵɵpropertyInterpolate1', moduleName: CORE };
|
|
2834
|
+
Identifiers.propertyInterpolate2 = { name: 'ɵɵpropertyInterpolate2', moduleName: CORE };
|
|
2835
|
+
Identifiers.propertyInterpolate3 = { name: 'ɵɵpropertyInterpolate3', moduleName: CORE };
|
|
2836
|
+
Identifiers.propertyInterpolate4 = { name: 'ɵɵpropertyInterpolate4', moduleName: CORE };
|
|
2837
|
+
Identifiers.propertyInterpolate5 = { name: 'ɵɵpropertyInterpolate5', moduleName: CORE };
|
|
2838
|
+
Identifiers.propertyInterpolate6 = { name: 'ɵɵpropertyInterpolate6', moduleName: CORE };
|
|
2839
|
+
Identifiers.propertyInterpolate7 = { name: 'ɵɵpropertyInterpolate7', moduleName: CORE };
|
|
2840
|
+
Identifiers.propertyInterpolate8 = { name: 'ɵɵpropertyInterpolate8', moduleName: CORE };
|
|
2841
|
+
Identifiers.propertyInterpolateV = { name: 'ɵɵpropertyInterpolateV', moduleName: CORE };
|
|
2842
|
+
Identifiers.i18n = { name: 'ɵɵi18n', moduleName: CORE };
|
|
2843
|
+
Identifiers.i18nAttributes = { name: 'ɵɵi18nAttributes', moduleName: CORE };
|
|
2844
|
+
Identifiers.i18nExp = { name: 'ɵɵi18nExp', moduleName: CORE };
|
|
2845
|
+
Identifiers.i18nStart = { name: 'ɵɵi18nStart', moduleName: CORE };
|
|
2846
|
+
Identifiers.i18nEnd = { name: 'ɵɵi18nEnd', moduleName: CORE };
|
|
2847
|
+
Identifiers.i18nApply = { name: 'ɵɵi18nApply', moduleName: CORE };
|
|
2848
|
+
Identifiers.i18nPostprocess = { name: 'ɵɵi18nPostprocess', moduleName: CORE };
|
|
2849
|
+
Identifiers.pipe = { name: 'ɵɵpipe', moduleName: CORE };
|
|
2850
|
+
Identifiers.projection = { name: 'ɵɵprojection', moduleName: CORE };
|
|
2851
|
+
Identifiers.projectionDef = { name: 'ɵɵprojectionDef', moduleName: CORE };
|
|
2852
|
+
Identifiers.reference = { name: 'ɵɵreference', moduleName: CORE };
|
|
2853
|
+
Identifiers.inject = { name: 'ɵɵinject', moduleName: CORE };
|
|
2854
|
+
Identifiers.injectAttribute = { name: 'ɵɵinjectAttribute', moduleName: CORE };
|
|
2855
|
+
Identifiers.directiveInject = { name: 'ɵɵdirectiveInject', moduleName: CORE };
|
|
2856
|
+
Identifiers.invalidFactory = { name: 'ɵɵinvalidFactory', moduleName: CORE };
|
|
2857
|
+
Identifiers.invalidFactoryDep = { name: 'ɵɵinvalidFactoryDep', moduleName: CORE };
|
|
2858
|
+
Identifiers.templateRefExtractor = { name: 'ɵɵtemplateRefExtractor', moduleName: CORE };
|
|
2859
|
+
Identifiers.forwardRef = { name: 'forwardRef', moduleName: CORE };
|
|
2860
|
+
Identifiers.resolveForwardRef = { name: 'resolveForwardRef', moduleName: CORE };
|
|
2861
|
+
Identifiers.ɵɵdefineInjectable = { name: 'ɵɵdefineInjectable', moduleName: CORE };
|
|
2862
|
+
Identifiers.declareInjectable = { name: 'ɵɵngDeclareInjectable', moduleName: CORE };
|
|
2863
|
+
Identifiers.InjectableDeclaration = { name: 'ɵɵInjectableDeclaration', moduleName: CORE };
|
|
2864
|
+
Identifiers.resolveWindow = { name: 'ɵɵresolveWindow', moduleName: CORE };
|
|
2865
|
+
Identifiers.resolveDocument = { name: 'ɵɵresolveDocument', moduleName: CORE };
|
|
2866
|
+
Identifiers.resolveBody = { name: 'ɵɵresolveBody', moduleName: CORE };
|
|
2867
|
+
Identifiers.defineComponent = { name: 'ɵɵdefineComponent', moduleName: CORE };
|
|
2868
|
+
Identifiers.declareComponent = { name: 'ɵɵngDeclareComponent', moduleName: CORE };
|
|
2869
|
+
Identifiers.setComponentScope = { name: 'ɵɵsetComponentScope', moduleName: CORE };
|
|
2870
|
+
Identifiers.ChangeDetectionStrategy = {
|
|
2871
2871
|
name: 'ChangeDetectionStrategy',
|
|
2872
|
-
moduleName: CORE
|
|
2872
|
+
moduleName: CORE,
|
|
2873
2873
|
};
|
|
2874
|
-
Identifiers
|
|
2874
|
+
Identifiers.ViewEncapsulation = {
|
|
2875
2875
|
name: 'ViewEncapsulation',
|
|
2876
|
-
moduleName: CORE
|
|
2876
|
+
moduleName: CORE,
|
|
2877
2877
|
};
|
|
2878
|
-
Identifiers
|
|
2878
|
+
Identifiers.ComponentDeclaration = {
|
|
2879
2879
|
name: 'ɵɵComponentDeclaration',
|
|
2880
|
-
moduleName: CORE
|
|
2880
|
+
moduleName: CORE,
|
|
2881
2881
|
};
|
|
2882
|
-
Identifiers
|
|
2882
|
+
Identifiers.FactoryDeclaration = {
|
|
2883
2883
|
name: 'ɵɵFactoryDeclaration',
|
|
2884
|
-
moduleName: CORE
|
|
2884
|
+
moduleName: CORE,
|
|
2885
2885
|
};
|
|
2886
|
-
Identifiers
|
|
2887
|
-
Identifiers
|
|
2888
|
-
Identifiers
|
|
2889
|
-
Identifiers
|
|
2890
|
-
Identifiers
|
|
2886
|
+
Identifiers.declareFactory = { name: 'ɵɵngDeclareFactory', moduleName: CORE };
|
|
2887
|
+
Identifiers.FactoryTarget = { name: 'ɵɵFactoryTarget', moduleName: CORE };
|
|
2888
|
+
Identifiers.defineDirective = { name: 'ɵɵdefineDirective', moduleName: CORE };
|
|
2889
|
+
Identifiers.declareDirective = { name: 'ɵɵngDeclareDirective', moduleName: CORE };
|
|
2890
|
+
Identifiers.DirectiveDeclaration = {
|
|
2891
2891
|
name: 'ɵɵDirectiveDeclaration',
|
|
2892
|
-
moduleName: CORE
|
|
2892
|
+
moduleName: CORE,
|
|
2893
2893
|
};
|
|
2894
|
-
Identifiers
|
|
2895
|
-
Identifiers
|
|
2896
|
-
Identifiers
|
|
2897
|
-
Identifiers
|
|
2898
|
-
Identifiers
|
|
2894
|
+
Identifiers.InjectorDef = { name: 'ɵɵInjectorDef', moduleName: CORE };
|
|
2895
|
+
Identifiers.InjectorDeclaration = { name: 'ɵɵInjectorDeclaration', moduleName: CORE };
|
|
2896
|
+
Identifiers.defineInjector = { name: 'ɵɵdefineInjector', moduleName: CORE };
|
|
2897
|
+
Identifiers.declareInjector = { name: 'ɵɵngDeclareInjector', moduleName: CORE };
|
|
2898
|
+
Identifiers.NgModuleDeclaration = {
|
|
2899
2899
|
name: 'ɵɵNgModuleDeclaration',
|
|
2900
|
-
moduleName: CORE
|
|
2900
|
+
moduleName: CORE,
|
|
2901
2901
|
};
|
|
2902
|
-
Identifiers
|
|
2902
|
+
Identifiers.ModuleWithProviders = {
|
|
2903
2903
|
name: 'ModuleWithProviders',
|
|
2904
|
-
moduleName: CORE
|
|
2904
|
+
moduleName: CORE,
|
|
2905
2905
|
};
|
|
2906
|
-
Identifiers
|
|
2907
|
-
Identifiers
|
|
2908
|
-
Identifiers
|
|
2909
|
-
Identifiers
|
|
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
|
|
2906
|
+
Identifiers.defineNgModule = { name: 'ɵɵdefineNgModule', moduleName: CORE };
|
|
2907
|
+
Identifiers.declareNgModule = { name: 'ɵɵngDeclareNgModule', moduleName: CORE };
|
|
2908
|
+
Identifiers.setNgModuleScope = { name: 'ɵɵsetNgModuleScope', moduleName: CORE };
|
|
2909
|
+
Identifiers.PipeDeclaration = { name: 'ɵɵPipeDeclaration', moduleName: CORE };
|
|
2910
|
+
Identifiers.definePipe = { name: 'ɵɵdefinePipe', moduleName: CORE };
|
|
2911
|
+
Identifiers.declarePipe = { name: 'ɵɵngDeclarePipe', moduleName: CORE };
|
|
2912
|
+
Identifiers.declareClassMetadata = { name: 'ɵɵngDeclareClassMetadata', moduleName: CORE };
|
|
2913
|
+
Identifiers.setClassMetadata = { name: 'ɵsetClassMetadata', moduleName: CORE };
|
|
2914
|
+
Identifiers.queryRefresh = { name: 'ɵɵqueryRefresh', moduleName: CORE };
|
|
2915
|
+
Identifiers.viewQuery = { name: 'ɵɵviewQuery', moduleName: CORE };
|
|
2916
|
+
Identifiers.loadQuery = { name: 'ɵɵloadQuery', moduleName: CORE };
|
|
2917
|
+
Identifiers.contentQuery = { name: 'ɵɵcontentQuery', moduleName: CORE };
|
|
2918
|
+
Identifiers.NgOnChangesFeature = { name: 'ɵɵNgOnChangesFeature', moduleName: CORE };
|
|
2919
|
+
Identifiers.InheritDefinitionFeature = { name: 'ɵɵInheritDefinitionFeature', moduleName: CORE };
|
|
2920
|
+
Identifiers.CopyDefinitionFeature = { name: 'ɵɵCopyDefinitionFeature', moduleName: CORE };
|
|
2921
|
+
Identifiers.ProvidersFeature = { name: 'ɵɵProvidersFeature', moduleName: CORE };
|
|
2922
|
+
Identifiers.listener = { name: 'ɵɵlistener', moduleName: CORE };
|
|
2923
|
+
Identifiers.getInheritedFactory = {
|
|
2924
2924
|
name: 'ɵɵgetInheritedFactory',
|
|
2925
|
-
moduleName: CORE
|
|
2925
|
+
moduleName: CORE,
|
|
2926
2926
|
};
|
|
2927
2927
|
// sanitization-related functions
|
|
2928
|
-
Identifiers
|
|
2929
|
-
Identifiers
|
|
2930
|
-
Identifiers
|
|
2931
|
-
Identifiers
|
|
2932
|
-
Identifiers
|
|
2933
|
-
Identifiers
|
|
2934
|
-
Identifiers
|
|
2935
|
-
Identifiers
|
|
2928
|
+
Identifiers.sanitizeHtml = { name: 'ɵɵsanitizeHtml', moduleName: CORE };
|
|
2929
|
+
Identifiers.sanitizeStyle = { name: 'ɵɵsanitizeStyle', moduleName: CORE };
|
|
2930
|
+
Identifiers.sanitizeResourceUrl = { name: 'ɵɵsanitizeResourceUrl', moduleName: CORE };
|
|
2931
|
+
Identifiers.sanitizeScript = { name: 'ɵɵsanitizeScript', moduleName: CORE };
|
|
2932
|
+
Identifiers.sanitizeUrl = { name: 'ɵɵsanitizeUrl', moduleName: CORE };
|
|
2933
|
+
Identifiers.sanitizeUrlOrResourceUrl = { name: 'ɵɵsanitizeUrlOrResourceUrl', moduleName: CORE };
|
|
2934
|
+
Identifiers.trustConstantHtml = { name: 'ɵɵtrustConstantHtml', moduleName: CORE };
|
|
2935
|
+
Identifiers.trustConstantResourceUrl = { name: 'ɵɵtrustConstantResourceUrl', moduleName: CORE };
|
|
2936
2936
|
|
|
2937
2937
|
/**
|
|
2938
2938
|
* @license
|
|
@@ -3674,7 +3674,7 @@ function convertFromMaybeForwardRefExpression({ expression, forwardRef }) {
|
|
|
3674
3674
|
* ```
|
|
3675
3675
|
*/
|
|
3676
3676
|
function generateForwardRef(expr) {
|
|
3677
|
-
return importExpr(Identifiers
|
|
3677
|
+
return importExpr(Identifiers.forwardRef).callFn([fn([], [new ReturnStatement(expr)])]);
|
|
3678
3678
|
}
|
|
3679
3679
|
|
|
3680
3680
|
var R3FactoryDelegateType;
|
|
@@ -3722,7 +3722,7 @@ function compileFactoryFunction(meta) {
|
|
|
3722
3722
|
const r = variable('r');
|
|
3723
3723
|
body.push(r.set(NULL_EXPR).toDeclStmt());
|
|
3724
3724
|
const ctorStmt = ctorExpr !== null ? r.set(ctorExpr).toStmt() :
|
|
3725
|
-
importExpr(Identifiers
|
|
3725
|
+
importExpr(Identifiers.invalidFactory).callFn([]).toStmt();
|
|
3726
3726
|
body.push(ifStmt(t, [ctorStmt], [r.set(nonCtorExpr).toStmt()]));
|
|
3727
3727
|
return r;
|
|
3728
3728
|
}
|
|
@@ -3745,11 +3745,11 @@ function compileFactoryFunction(meta) {
|
|
|
3745
3745
|
}
|
|
3746
3746
|
if (retExpr === null) {
|
|
3747
3747
|
// The expression cannot be formed so render an `ɵɵinvalidFactory()` call.
|
|
3748
|
-
body.push(importExpr(Identifiers
|
|
3748
|
+
body.push(importExpr(Identifiers.invalidFactory).callFn([]).toStmt());
|
|
3749
3749
|
}
|
|
3750
3750
|
else if (baseFactoryVar !== null) {
|
|
3751
3751
|
// This factory uses a base factory, so call `ɵɵgetInheritedFactory()` to compute it.
|
|
3752
|
-
const getInheritedFactoryCall = importExpr(Identifiers
|
|
3752
|
+
const getInheritedFactoryCall = importExpr(Identifiers.getInheritedFactory).callFn([meta.internalType]);
|
|
3753
3753
|
// Memoize the base factoryFn: `baseFactory || (baseFactory = ɵɵgetInheritedFactory(...))`
|
|
3754
3754
|
const baseFactory = new BinaryOperatorExpr(BinaryOperator.Or, baseFactoryVar, baseFactoryVar.set(getInheritedFactoryCall));
|
|
3755
3755
|
body.push(new ReturnStatement(baseFactory.callFn([typeForCtor])));
|
|
@@ -3774,7 +3774,7 @@ function compileFactoryFunction(meta) {
|
|
|
3774
3774
|
}
|
|
3775
3775
|
function createFactoryType(meta) {
|
|
3776
3776
|
const ctorDepsType = meta.deps !== null && meta.deps !== 'invalid' ? createCtorDepsType(meta.deps) : NONE_TYPE;
|
|
3777
|
-
return expressionType(importExpr(Identifiers
|
|
3777
|
+
return expressionType(importExpr(Identifiers.FactoryDeclaration, [typeWithParameters(meta.type.type, meta.typeArgumentCount), ctorDepsType]));
|
|
3778
3778
|
}
|
|
3779
3779
|
function injectDependencies(deps, target) {
|
|
3780
3780
|
return deps.map((dep, index) => compileInjectDependency(dep, target, index));
|
|
@@ -3782,7 +3782,7 @@ function injectDependencies(deps, target) {
|
|
|
3782
3782
|
function compileInjectDependency(dep, target, index) {
|
|
3783
3783
|
// Interpret the dependency according to its resolved type.
|
|
3784
3784
|
if (dep.token === null) {
|
|
3785
|
-
return importExpr(Identifiers
|
|
3785
|
+
return importExpr(Identifiers.invalidFactoryDep).callFn([literal(index)]);
|
|
3786
3786
|
}
|
|
3787
3787
|
else if (dep.attributeNameType === null) {
|
|
3788
3788
|
// Build up the injection flags according to the metadata.
|
|
@@ -3810,7 +3810,7 @@ function compileInjectDependency(dep, target, index) {
|
|
|
3810
3810
|
//
|
|
3811
3811
|
// The `dep.attributeTypeName` is only actually used (in `createCtorDepType()`) to generate
|
|
3812
3812
|
// typings.
|
|
3813
|
-
return importExpr(Identifiers
|
|
3813
|
+
return importExpr(Identifiers.injectAttribute).callFn([dep.token]);
|
|
3814
3814
|
}
|
|
3815
3815
|
}
|
|
3816
3816
|
function createCtorDepsType(deps) {
|
|
@@ -3862,11 +3862,11 @@ function getInjectFn(target) {
|
|
|
3862
3862
|
case FactoryTarget$1.Component:
|
|
3863
3863
|
case FactoryTarget$1.Directive:
|
|
3864
3864
|
case FactoryTarget$1.Pipe:
|
|
3865
|
-
return Identifiers
|
|
3865
|
+
return Identifiers.directiveInject;
|
|
3866
3866
|
case FactoryTarget$1.NgModule:
|
|
3867
3867
|
case FactoryTarget$1.Injectable:
|
|
3868
3868
|
default:
|
|
3869
|
-
return Identifiers
|
|
3869
|
+
return Identifiers.inject;
|
|
3870
3870
|
}
|
|
3871
3871
|
}
|
|
3872
3872
|
|
|
@@ -3993,7 +3993,12 @@ class Element$1 {
|
|
|
3993
3993
|
}
|
|
3994
3994
|
}
|
|
3995
3995
|
class Template {
|
|
3996
|
-
constructor(
|
|
3996
|
+
constructor(
|
|
3997
|
+
// tagName is the name of the container element, if applicable.
|
|
3998
|
+
// `null` is a special case for when there is a structural directive on an `ng-template` so
|
|
3999
|
+
// the renderer can differentiate between the synthetic template and the one written in the
|
|
4000
|
+
// file.
|
|
4001
|
+
tagName, attributes, inputs, outputs, templateAttrs, children, references, variables, sourceSpan, startSourceSpan, endSourceSpan, i18n) {
|
|
3997
4002
|
this.tagName = tagName;
|
|
3998
4003
|
this.attributes = attributes;
|
|
3999
4004
|
this.inputs = inputs;
|
|
@@ -4957,7 +4962,7 @@ function getQueryPredicate(query, constantPool) {
|
|
|
4957
4962
|
case 2 /* Unwrapped */:
|
|
4958
4963
|
return query.predicate.expression;
|
|
4959
4964
|
case 1 /* Wrapped */:
|
|
4960
|
-
return importExpr(Identifiers
|
|
4965
|
+
return importExpr(Identifiers.resolveForwardRef).callFn([query.predicate.expression]);
|
|
4961
4966
|
}
|
|
4962
4967
|
}
|
|
4963
4968
|
}
|
|
@@ -5117,7 +5122,7 @@ function compileInjectable(meta, resolveForwardRefs) {
|
|
|
5117
5122
|
// useExisting is an `inject` call on the existing token.
|
|
5118
5123
|
result = compileFactoryFunction({
|
|
5119
5124
|
...factoryMeta,
|
|
5120
|
-
expression: importExpr(Identifiers
|
|
5125
|
+
expression: importExpr(Identifiers.inject).callFn([meta.useExisting.expression]),
|
|
5121
5126
|
});
|
|
5122
5127
|
}
|
|
5123
5128
|
else {
|
|
@@ -5134,7 +5139,7 @@ function compileInjectable(meta, resolveForwardRefs) {
|
|
|
5134
5139
|
if (meta.providedIn.expression.value !== null) {
|
|
5135
5140
|
injectableProps.set('providedIn', convertFromMaybeForwardRefExpression(meta.providedIn));
|
|
5136
5141
|
}
|
|
5137
|
-
const expression = importExpr(Identifiers
|
|
5142
|
+
const expression = importExpr(Identifiers.ɵɵdefineInjectable)
|
|
5138
5143
|
.callFn([injectableProps.toLiteralMap()], undefined, true);
|
|
5139
5144
|
return {
|
|
5140
5145
|
expression,
|
|
@@ -5143,7 +5148,7 @@ function compileInjectable(meta, resolveForwardRefs) {
|
|
|
5143
5148
|
};
|
|
5144
5149
|
}
|
|
5145
5150
|
function createInjectableType(meta) {
|
|
5146
|
-
return new ExpressionType(importExpr(Identifiers
|
|
5151
|
+
return new ExpressionType(importExpr(Identifiers.InjectableDeclaration, [typeWithParameters(meta.type.type, meta.typeArgumentCount)]));
|
|
5147
5152
|
}
|
|
5148
5153
|
function delegateToFactory(type, internalType, unwrapForwardRefs) {
|
|
5149
5154
|
if (type.node === internalType.node) {
|
|
@@ -5166,7 +5171,7 @@ function delegateToFactory(type, internalType, unwrapForwardRefs) {
|
|
|
5166
5171
|
// ```
|
|
5167
5172
|
// factory: function(t) { return core.resolveForwardRef(type).ɵfac(t); }
|
|
5168
5173
|
// ```
|
|
5169
|
-
const unwrappedType = importExpr(Identifiers
|
|
5174
|
+
const unwrappedType = importExpr(Identifiers.resolveForwardRef).callFn([internalType]);
|
|
5170
5175
|
return createFactoryFunction(unwrappedType);
|
|
5171
5176
|
}
|
|
5172
5177
|
function createFactoryFunction(type) {
|
|
@@ -5854,12 +5859,12 @@ function compileInjector(meta) {
|
|
|
5854
5859
|
if (meta.imports.length > 0) {
|
|
5855
5860
|
definitionMap.set('imports', literalArr(meta.imports));
|
|
5856
5861
|
}
|
|
5857
|
-
const expression = importExpr(Identifiers
|
|
5862
|
+
const expression = importExpr(Identifiers.defineInjector).callFn([definitionMap.toLiteralMap()], undefined, true);
|
|
5858
5863
|
const type = createInjectorType(meta);
|
|
5859
5864
|
return { expression, type, statements: [] };
|
|
5860
5865
|
}
|
|
5861
5866
|
function createInjectorType(meta) {
|
|
5862
|
-
return new ExpressionType(importExpr(Identifiers
|
|
5867
|
+
return new ExpressionType(importExpr(Identifiers.InjectorDeclaration, [new ExpressionType(meta.type.type)]));
|
|
5863
5868
|
}
|
|
5864
5869
|
|
|
5865
5870
|
/**
|
|
@@ -5936,7 +5941,7 @@ function compileNgModule(meta) {
|
|
|
5936
5941
|
if (id !== null) {
|
|
5937
5942
|
definitionMap.set('id', id);
|
|
5938
5943
|
}
|
|
5939
|
-
const expression = importExpr(Identifiers
|
|
5944
|
+
const expression = importExpr(Identifiers.defineNgModule).callFn([definitionMap.toLiteralMap()], undefined, true);
|
|
5940
5945
|
const type = createNgModuleType(meta);
|
|
5941
5946
|
return { expression, type, statements };
|
|
5942
5947
|
}
|
|
@@ -5965,10 +5970,10 @@ function compileNgModuleDeclarationExpression(meta) {
|
|
|
5965
5970
|
if (meta.id !== undefined) {
|
|
5966
5971
|
definitionMap.set('id', new WrappedNodeExpr(meta.id));
|
|
5967
5972
|
}
|
|
5968
|
-
return importExpr(Identifiers
|
|
5973
|
+
return importExpr(Identifiers.defineNgModule).callFn([definitionMap.toLiteralMap()]);
|
|
5969
5974
|
}
|
|
5970
5975
|
function createNgModuleType({ type: moduleType, declarations, imports, exports }) {
|
|
5971
|
-
return new ExpressionType(importExpr(Identifiers
|
|
5976
|
+
return new ExpressionType(importExpr(Identifiers.NgModuleDeclaration, [
|
|
5972
5977
|
new ExpressionType(moduleType.type), tupleTypeOf(declarations), tupleTypeOf(imports),
|
|
5973
5978
|
tupleTypeOf(exports)
|
|
5974
5979
|
]));
|
|
@@ -5996,7 +6001,7 @@ function generateSetNgModuleScopeCall(meta) {
|
|
|
5996
6001
|
}
|
|
5997
6002
|
// setNgModuleScope(...)
|
|
5998
6003
|
const fnCall = new InvokeFunctionExpr(
|
|
5999
|
-
/* fn */ importExpr(Identifiers
|
|
6004
|
+
/* fn */ importExpr(Identifiers.setNgModuleScope),
|
|
6000
6005
|
/* args */ [moduleType, scopeMap.toLiteralMap()]);
|
|
6001
6006
|
// (ngJitMode guard) && setNgModuleScope(...)
|
|
6002
6007
|
const guardedCall = jitOnlyGuardedExpression(fnCall);
|
|
@@ -6030,12 +6035,12 @@ function compilePipeFromMetadata(metadata) {
|
|
|
6030
6035
|
definitionMapValues.push({ key: 'type', value: metadata.type.value, quoted: false });
|
|
6031
6036
|
// e.g. `pure: true`
|
|
6032
6037
|
definitionMapValues.push({ key: 'pure', value: literal(metadata.pure), quoted: false });
|
|
6033
|
-
const expression = importExpr(Identifiers
|
|
6038
|
+
const expression = importExpr(Identifiers.definePipe).callFn([literalMap(definitionMapValues)], undefined, true);
|
|
6034
6039
|
const type = createPipeType(metadata);
|
|
6035
6040
|
return { expression, type, statements: [] };
|
|
6036
6041
|
}
|
|
6037
6042
|
function createPipeType(metadata) {
|
|
6038
|
-
return new ExpressionType(importExpr(Identifiers
|
|
6043
|
+
return new ExpressionType(importExpr(Identifiers.PipeDeclaration, [
|
|
6039
6044
|
typeWithParameters(metadata.type.type, metadata.typeArgumentCount),
|
|
6040
6045
|
new ExpressionType(new LiteralExpr(metadata.pipeName)),
|
|
6041
6046
|
]));
|
|
@@ -6084,33 +6089,6 @@ class ASTWithName extends AST {
|
|
|
6084
6089
|
this.nameSpan = nameSpan;
|
|
6085
6090
|
}
|
|
6086
6091
|
}
|
|
6087
|
-
/**
|
|
6088
|
-
* Represents a quoted expression of the form:
|
|
6089
|
-
*
|
|
6090
|
-
* quote = prefix `:` uninterpretedExpression
|
|
6091
|
-
* prefix = identifier
|
|
6092
|
-
* uninterpretedExpression = arbitrary string
|
|
6093
|
-
*
|
|
6094
|
-
* A quoted expression is meant to be pre-processed by an AST transformer that
|
|
6095
|
-
* converts it into another AST that no longer contains quoted expressions.
|
|
6096
|
-
* It is meant to allow third-party developers to extend Angular template
|
|
6097
|
-
* expression language. The `uninterpretedExpression` part of the quote is
|
|
6098
|
-
* therefore not interpreted by the Angular's own expression parser.
|
|
6099
|
-
*/
|
|
6100
|
-
class Quote extends AST {
|
|
6101
|
-
constructor(span, sourceSpan, prefix, uninterpretedExpression, location) {
|
|
6102
|
-
super(span, sourceSpan);
|
|
6103
|
-
this.prefix = prefix;
|
|
6104
|
-
this.uninterpretedExpression = uninterpretedExpression;
|
|
6105
|
-
this.location = location;
|
|
6106
|
-
}
|
|
6107
|
-
visit(visitor, context = null) {
|
|
6108
|
-
return visitor.visitQuote(this, context);
|
|
6109
|
-
}
|
|
6110
|
-
toString() {
|
|
6111
|
-
return 'Quote';
|
|
6112
|
-
}
|
|
6113
|
-
}
|
|
6114
6092
|
class EmptyExpr extends AST {
|
|
6115
6093
|
visit(visitor, context = null) {
|
|
6116
6094
|
// do nothing
|
|
@@ -6490,7 +6468,6 @@ class RecursiveAstVisitor {
|
|
|
6490
6468
|
this.visit(ast.receiver, context);
|
|
6491
6469
|
this.visitAll(ast.args, context);
|
|
6492
6470
|
}
|
|
6493
|
-
visitQuote(ast, context) { }
|
|
6494
6471
|
// This is not part of the AstVisitor interface, just a helper method
|
|
6495
6472
|
visitAll(asts, context) {
|
|
6496
6473
|
for (const ast of asts) {
|
|
@@ -6573,9 +6550,6 @@ class AstTransformer {
|
|
|
6573
6550
|
visitChain(ast, context) {
|
|
6574
6551
|
return new Chain(ast.span, ast.sourceSpan, this.visitAll(ast.expressions));
|
|
6575
6552
|
}
|
|
6576
|
-
visitQuote(ast, context) {
|
|
6577
|
-
return new Quote(ast.span, ast.sourceSpan, ast.prefix, ast.uninterpretedExpression, ast.location);
|
|
6578
|
-
}
|
|
6579
6553
|
visitSafeKeyedRead(ast, context) {
|
|
6580
6554
|
return new SafeKeyedRead(ast.span, ast.sourceSpan, ast.receiver.visit(this), ast.key.visit(this));
|
|
6581
6555
|
}
|
|
@@ -6738,9 +6712,6 @@ class AstMemoryEfficientTransformer {
|
|
|
6738
6712
|
}
|
|
6739
6713
|
return ast;
|
|
6740
6714
|
}
|
|
6741
|
-
visitQuote(ast, context) {
|
|
6742
|
-
return ast;
|
|
6743
|
-
}
|
|
6744
6715
|
visitSafeKeyedRead(ast, context) {
|
|
6745
6716
|
const obj = ast.receiver.visit(this);
|
|
6746
6717
|
const key = ast.key.visit(this);
|
|
@@ -6807,98 +6778,6 @@ class BoundElementProperty {
|
|
|
6807
6778
|
}
|
|
6808
6779
|
}
|
|
6809
6780
|
|
|
6810
|
-
/**
|
|
6811
|
-
* @license
|
|
6812
|
-
* Copyright Google LLC All Rights Reserved.
|
|
6813
|
-
*
|
|
6814
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6815
|
-
* found in the LICENSE file at https://angular.io/license
|
|
6816
|
-
*/
|
|
6817
|
-
const CORE = '@angular/core';
|
|
6818
|
-
class Identifiers {
|
|
6819
|
-
}
|
|
6820
|
-
Identifiers.ANALYZE_FOR_ENTRY_COMPONENTS = {
|
|
6821
|
-
name: 'ANALYZE_FOR_ENTRY_COMPONENTS',
|
|
6822
|
-
moduleName: CORE,
|
|
6823
|
-
};
|
|
6824
|
-
Identifiers.ElementRef = { name: 'ElementRef', moduleName: CORE };
|
|
6825
|
-
Identifiers.NgModuleRef = { name: 'NgModuleRef', moduleName: CORE };
|
|
6826
|
-
Identifiers.ViewContainerRef = { name: 'ViewContainerRef', moduleName: CORE };
|
|
6827
|
-
Identifiers.ChangeDetectorRef = {
|
|
6828
|
-
name: 'ChangeDetectorRef',
|
|
6829
|
-
moduleName: CORE,
|
|
6830
|
-
};
|
|
6831
|
-
Identifiers.QueryList = { name: 'QueryList', moduleName: CORE };
|
|
6832
|
-
Identifiers.TemplateRef = { name: 'TemplateRef', moduleName: CORE };
|
|
6833
|
-
Identifiers.Renderer2 = { name: 'Renderer2', moduleName: CORE };
|
|
6834
|
-
Identifiers.CodegenComponentFactoryResolver = {
|
|
6835
|
-
name: 'ɵCodegenComponentFactoryResolver',
|
|
6836
|
-
moduleName: CORE,
|
|
6837
|
-
};
|
|
6838
|
-
Identifiers.ComponentFactoryResolver = {
|
|
6839
|
-
name: 'ComponentFactoryResolver',
|
|
6840
|
-
moduleName: CORE,
|
|
6841
|
-
};
|
|
6842
|
-
Identifiers.ComponentFactory = { name: 'ComponentFactory', moduleName: CORE };
|
|
6843
|
-
Identifiers.ComponentRef = { name: 'ComponentRef', moduleName: CORE };
|
|
6844
|
-
Identifiers.NgModuleFactory = { name: 'NgModuleFactory', moduleName: CORE };
|
|
6845
|
-
Identifiers.createModuleFactory = {
|
|
6846
|
-
name: 'ɵcmf',
|
|
6847
|
-
moduleName: CORE,
|
|
6848
|
-
};
|
|
6849
|
-
Identifiers.moduleDef = {
|
|
6850
|
-
name: 'ɵmod',
|
|
6851
|
-
moduleName: CORE,
|
|
6852
|
-
};
|
|
6853
|
-
Identifiers.moduleProviderDef = {
|
|
6854
|
-
name: 'ɵmpd',
|
|
6855
|
-
moduleName: CORE,
|
|
6856
|
-
};
|
|
6857
|
-
Identifiers.RegisterModuleFactoryFn = {
|
|
6858
|
-
name: 'ɵregisterModuleFactory',
|
|
6859
|
-
moduleName: CORE,
|
|
6860
|
-
};
|
|
6861
|
-
Identifiers.inject = { name: 'ɵɵinject', moduleName: CORE };
|
|
6862
|
-
Identifiers.directiveInject = { name: 'ɵɵdirectiveInject', moduleName: CORE };
|
|
6863
|
-
Identifiers.INJECTOR = { name: 'INJECTOR', moduleName: CORE };
|
|
6864
|
-
Identifiers.Injector = { name: 'Injector', moduleName: CORE };
|
|
6865
|
-
Identifiers.ViewEncapsulation = {
|
|
6866
|
-
name: 'ViewEncapsulation',
|
|
6867
|
-
moduleName: CORE,
|
|
6868
|
-
};
|
|
6869
|
-
Identifiers.ChangeDetectionStrategy = {
|
|
6870
|
-
name: 'ChangeDetectionStrategy',
|
|
6871
|
-
moduleName: CORE,
|
|
6872
|
-
};
|
|
6873
|
-
Identifiers.SecurityContext = {
|
|
6874
|
-
name: 'SecurityContext',
|
|
6875
|
-
moduleName: CORE,
|
|
6876
|
-
};
|
|
6877
|
-
Identifiers.LOCALE_ID = { name: 'LOCALE_ID', moduleName: CORE };
|
|
6878
|
-
Identifiers.TRANSLATIONS_FORMAT = {
|
|
6879
|
-
name: 'TRANSLATIONS_FORMAT',
|
|
6880
|
-
moduleName: CORE,
|
|
6881
|
-
};
|
|
6882
|
-
Identifiers.inlineInterpolate = {
|
|
6883
|
-
name: 'ɵinlineInterpolate',
|
|
6884
|
-
moduleName: CORE,
|
|
6885
|
-
};
|
|
6886
|
-
Identifiers.interpolate = { name: 'ɵinterpolate', moduleName: CORE };
|
|
6887
|
-
Identifiers.EMPTY_ARRAY = { name: 'ɵEMPTY_ARRAY', moduleName: CORE };
|
|
6888
|
-
Identifiers.EMPTY_MAP = { name: 'ɵEMPTY_MAP', moduleName: CORE };
|
|
6889
|
-
Identifiers.Renderer = { name: 'Renderer', moduleName: CORE };
|
|
6890
|
-
// type only
|
|
6891
|
-
Identifiers.RendererType2 = {
|
|
6892
|
-
name: 'RendererType2',
|
|
6893
|
-
moduleName: CORE,
|
|
6894
|
-
};
|
|
6895
|
-
// type only
|
|
6896
|
-
Identifiers.ViewDefinition = {
|
|
6897
|
-
name: 'ɵViewDefinition',
|
|
6898
|
-
moduleName: CORE,
|
|
6899
|
-
};
|
|
6900
|
-
Identifiers.createComponentFactory = { name: 'ɵccf', moduleName: CORE };
|
|
6901
|
-
|
|
6902
6781
|
/**
|
|
6903
6782
|
* @license
|
|
6904
6783
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -6913,7 +6792,7 @@ EventHandlerVars.event = variable('$event');
|
|
|
6913
6792
|
* Converts the given expression AST into an executable output AST, assuming the expression is
|
|
6914
6793
|
* used in an action binding (e.g. an event handler).
|
|
6915
6794
|
*/
|
|
6916
|
-
function convertActionBinding(localResolver, implicitReceiver, action, bindingId,
|
|
6795
|
+
function convertActionBinding(localResolver, implicitReceiver, action, bindingId, baseSourceSpan, implicitReceiverAccesses, globals) {
|
|
6917
6796
|
if (!localResolver) {
|
|
6918
6797
|
localResolver = new DefaultLocalResolver(globals);
|
|
6919
6798
|
}
|
|
@@ -6937,7 +6816,7 @@ function convertActionBinding(localResolver, implicitReceiver, action, bindingId
|
|
|
6937
6816
|
throw new Error(`Illegal State: Actions are not allowed to contain pipes. Pipe: ${name}`);
|
|
6938
6817
|
}
|
|
6939
6818
|
}, action);
|
|
6940
|
-
const visitor = new _AstToIrVisitor(localResolver, implicitReceiver, bindingId,
|
|
6819
|
+
const visitor = new _AstToIrVisitor(localResolver, implicitReceiver, bindingId, /* supportsInterpolation */ false, baseSourceSpan, implicitReceiverAccesses);
|
|
6941
6820
|
const actionStmts = [];
|
|
6942
6821
|
flattenStatements(actionWithoutBuiltins.visit(visitor, _Mode.Statement), actionStmts);
|
|
6943
6822
|
prependTemporaryDecls(visitor.temporaryCount, bindingId, actionStmts);
|
|
@@ -6968,11 +6847,11 @@ class ConvertPropertyBindingResult {
|
|
|
6968
6847
|
* is used in property binding. The expression has to be preprocessed via
|
|
6969
6848
|
* `convertPropertyBindingBuiltins`.
|
|
6970
6849
|
*/
|
|
6971
|
-
function convertPropertyBinding(localResolver, implicitReceiver, expressionWithoutBuiltins, bindingId
|
|
6850
|
+
function convertPropertyBinding(localResolver, implicitReceiver, expressionWithoutBuiltins, bindingId) {
|
|
6972
6851
|
if (!localResolver) {
|
|
6973
6852
|
localResolver = new DefaultLocalResolver();
|
|
6974
6853
|
}
|
|
6975
|
-
const visitor = new _AstToIrVisitor(localResolver, implicitReceiver, bindingId,
|
|
6854
|
+
const visitor = new _AstToIrVisitor(localResolver, implicitReceiver, bindingId, /* supportsInterpolation */ false);
|
|
6976
6855
|
const outputExpr = expressionWithoutBuiltins.visit(visitor, _Mode.Expression);
|
|
6977
6856
|
const stmts = getStatementsFromVisitor(visitor, bindingId);
|
|
6978
6857
|
if (visitor.usesImplicitReceiver) {
|
|
@@ -6997,28 +6876,13 @@ function convertPropertyBinding(localResolver, implicitReceiver, expressionWitho
|
|
|
6997
6876
|
* `o.importExpr(R3.propertyInterpolate).callFn(result)`
|
|
6998
6877
|
*/
|
|
6999
6878
|
function convertUpdateArguments(localResolver, contextVariableExpression, expressionWithArgumentsToExtract, bindingId) {
|
|
7000
|
-
const visitor = new _AstToIrVisitor(localResolver, contextVariableExpression, bindingId,
|
|
7001
|
-
const outputExpr =
|
|
6879
|
+
const visitor = new _AstToIrVisitor(localResolver, contextVariableExpression, bindingId, /* supportsInterpolation */ true);
|
|
6880
|
+
const outputExpr = visitor.visitInterpolation(expressionWithArgumentsToExtract, _Mode.Expression);
|
|
7002
6881
|
if (visitor.usesImplicitReceiver) {
|
|
7003
6882
|
localResolver.notifyImplicitReceiverUse();
|
|
7004
6883
|
}
|
|
7005
6884
|
const stmts = getStatementsFromVisitor(visitor, bindingId);
|
|
7006
|
-
|
|
7007
|
-
let args = outputExpr.args.slice(1);
|
|
7008
|
-
if (expressionWithArgumentsToExtract instanceof Interpolation) {
|
|
7009
|
-
// If we're dealing with an interpolation of 1 value with an empty prefix and suffix, reduce the
|
|
7010
|
-
// args returned to just the value, because we're going to pass it to a special instruction.
|
|
7011
|
-
const strings = expressionWithArgumentsToExtract.strings;
|
|
7012
|
-
if (args.length === 3 && strings[0] === '' && strings[1] === '') {
|
|
7013
|
-
// Single argument interpolate instructions.
|
|
7014
|
-
args = [args[1]];
|
|
7015
|
-
}
|
|
7016
|
-
else if (args.length >= 19) {
|
|
7017
|
-
// 19 or more arguments must be passed to the `interpolateV`-style instructions, which accept
|
|
7018
|
-
// an array of arguments
|
|
7019
|
-
args = [literalArr(args)];
|
|
7020
|
-
}
|
|
7021
|
-
}
|
|
6885
|
+
const args = outputExpr.args;
|
|
7022
6886
|
return { stmts, args };
|
|
7023
6887
|
}
|
|
7024
6888
|
function getStatementsFromVisitor(visitor, bindingId) {
|
|
@@ -7085,11 +6949,11 @@ class _BuiltinAstConverter extends AstTransformer {
|
|
|
7085
6949
|
}
|
|
7086
6950
|
}
|
|
7087
6951
|
class _AstToIrVisitor {
|
|
7088
|
-
constructor(_localResolver, _implicitReceiver, bindingId,
|
|
6952
|
+
constructor(_localResolver, _implicitReceiver, bindingId, supportsInterpolation, baseSourceSpan, implicitReceiverAccesses) {
|
|
7089
6953
|
this._localResolver = _localResolver;
|
|
7090
6954
|
this._implicitReceiver = _implicitReceiver;
|
|
7091
6955
|
this.bindingId = bindingId;
|
|
7092
|
-
this.
|
|
6956
|
+
this.supportsInterpolation = supportsInterpolation;
|
|
7093
6957
|
this.baseSourceSpan = baseSourceSpan;
|
|
7094
6958
|
this.implicitReceiverAccesses = implicitReceiverAccesses;
|
|
7095
6959
|
this._nodeMap = new Map();
|
|
@@ -7187,21 +7051,29 @@ class _AstToIrVisitor {
|
|
|
7187
7051
|
return this.visitImplicitReceiver(ast, mode);
|
|
7188
7052
|
}
|
|
7189
7053
|
visitInterpolation(ast, mode) {
|
|
7054
|
+
if (!this.supportsInterpolation) {
|
|
7055
|
+
throw new Error('Unexpected interpolation');
|
|
7056
|
+
}
|
|
7190
7057
|
ensureExpressionMode(mode, ast);
|
|
7191
|
-
|
|
7058
|
+
let args = [];
|
|
7192
7059
|
for (let i = 0; i < ast.strings.length - 1; i++) {
|
|
7193
7060
|
args.push(literal(ast.strings[i]));
|
|
7194
7061
|
args.push(this._visit(ast.expressions[i], _Mode.Expression));
|
|
7195
7062
|
}
|
|
7196
7063
|
args.push(literal(ast.strings[ast.strings.length - 1]));
|
|
7197
|
-
|
|
7198
|
-
|
|
7064
|
+
// If we're dealing with an interpolation of 1 value with an empty prefix and suffix, reduce the
|
|
7065
|
+
// args returned to just the value, because we're going to pass it to a special instruction.
|
|
7066
|
+
const strings = ast.strings;
|
|
7067
|
+
if (strings.length === 2 && strings[0] === '' && strings[1] === '') {
|
|
7068
|
+
// Single argument interpolate instructions.
|
|
7069
|
+
args = [args[1]];
|
|
7070
|
+
}
|
|
7071
|
+
else if (ast.expressions.length >= 9) {
|
|
7072
|
+
// 9 or more arguments must be passed to the `interpolateV`-style instructions, which accept
|
|
7073
|
+
// an array of arguments
|
|
7074
|
+
args = [literalArr(args)];
|
|
7199
7075
|
}
|
|
7200
|
-
return
|
|
7201
|
-
importExpr(Identifiers.inlineInterpolate).callFn(args) :
|
|
7202
|
-
importExpr(Identifiers.interpolate).callFn([
|
|
7203
|
-
args[0], literalArr(args.slice(1), undefined, this.convertSourceSpan(ast.span))
|
|
7204
|
-
]);
|
|
7076
|
+
return new InterpolationExpression(args);
|
|
7205
7077
|
}
|
|
7206
7078
|
visitKeyedRead(ast, mode) {
|
|
7207
7079
|
const leftMostSafe = this.leftMostSafeNode(ast);
|
|
@@ -7312,10 +7184,6 @@ class _AstToIrVisitor {
|
|
|
7312
7184
|
visitAll(asts, mode) {
|
|
7313
7185
|
return asts.map(ast => this._visit(ast, mode));
|
|
7314
7186
|
}
|
|
7315
|
-
visitQuote(ast, mode) {
|
|
7316
|
-
throw new Error(`Quotes are not supported for evaluation!
|
|
7317
|
-
Statement: ${ast.uninterpretedExpression} located at ${ast.location}`);
|
|
7318
|
-
}
|
|
7319
7187
|
visitCall(ast, mode) {
|
|
7320
7188
|
const leftMostSafe = this.leftMostSafeNode(ast);
|
|
7321
7189
|
if (leftMostSafe) {
|
|
@@ -7501,9 +7369,6 @@ class _AstToIrVisitor {
|
|
|
7501
7369
|
visitPropertyWrite(ast) {
|
|
7502
7370
|
return null;
|
|
7503
7371
|
},
|
|
7504
|
-
visitQuote(ast) {
|
|
7505
|
-
return null;
|
|
7506
|
-
},
|
|
7507
7372
|
visitSafePropertyRead(ast) {
|
|
7508
7373
|
return visit(this, ast.receiver) || ast;
|
|
7509
7374
|
},
|
|
@@ -7580,9 +7445,6 @@ class _AstToIrVisitor {
|
|
|
7580
7445
|
visitPropertyWrite(ast) {
|
|
7581
7446
|
return false;
|
|
7582
7447
|
},
|
|
7583
|
-
visitQuote(ast) {
|
|
7584
|
-
return false;
|
|
7585
|
-
},
|
|
7586
7448
|
visitSafePropertyRead(ast) {
|
|
7587
7449
|
return false;
|
|
7588
7450
|
},
|
|
@@ -7639,6 +7501,18 @@ function flattenStatements(arg, output) {
|
|
|
7639
7501
|
output.push(arg);
|
|
7640
7502
|
}
|
|
7641
7503
|
}
|
|
7504
|
+
function unsupported() {
|
|
7505
|
+
throw new Error('Unsupported operation');
|
|
7506
|
+
}
|
|
7507
|
+
class InterpolationExpression extends Expression {
|
|
7508
|
+
constructor(args) {
|
|
7509
|
+
super(null, null);
|
|
7510
|
+
this.args = args;
|
|
7511
|
+
this.isConstant = unsupported;
|
|
7512
|
+
this.isEquivalent = unsupported;
|
|
7513
|
+
this.visitExpression = unsupported;
|
|
7514
|
+
}
|
|
7515
|
+
}
|
|
7642
7516
|
class DefaultLocalResolver {
|
|
7643
7517
|
constructor(globals) {
|
|
7644
7518
|
this.globals = globals;
|
|
@@ -8806,7 +8680,7 @@ class StylingBuilder {
|
|
|
8806
8680
|
getStyleMapInterpolationExpression(mapValue);
|
|
8807
8681
|
}
|
|
8808
8682
|
else {
|
|
8809
|
-
reference = isClassBased ? Identifiers
|
|
8683
|
+
reference = isClassBased ? Identifiers.classMap : Identifiers.styleMap;
|
|
8810
8684
|
}
|
|
8811
8685
|
return {
|
|
8812
8686
|
reference,
|
|
@@ -8880,13 +8754,13 @@ class StylingBuilder {
|
|
|
8880
8754
|
}
|
|
8881
8755
|
_buildClassInputs(valueConverter) {
|
|
8882
8756
|
if (this._singleClassInputs) {
|
|
8883
|
-
return this._buildSingleInputs(Identifiers
|
|
8757
|
+
return this._buildSingleInputs(Identifiers.classProp, this._singleClassInputs, valueConverter, null, true);
|
|
8884
8758
|
}
|
|
8885
8759
|
return [];
|
|
8886
8760
|
}
|
|
8887
8761
|
_buildStyleInputs(valueConverter) {
|
|
8888
8762
|
if (this._singleStyleInputs) {
|
|
8889
|
-
return this._buildSingleInputs(Identifiers
|
|
8763
|
+
return this._buildSingleInputs(Identifiers.styleProp, this._singleStyleInputs, valueConverter, getStylePropInterpolationExpression, false);
|
|
8890
8764
|
}
|
|
8891
8765
|
return [];
|
|
8892
8766
|
}
|
|
@@ -8939,25 +8813,25 @@ function parseProperty(name) {
|
|
|
8939
8813
|
function getClassMapInterpolationExpression(interpolation) {
|
|
8940
8814
|
switch (getInterpolationArgsLength(interpolation)) {
|
|
8941
8815
|
case 1:
|
|
8942
|
-
return Identifiers
|
|
8816
|
+
return Identifiers.classMap;
|
|
8943
8817
|
case 3:
|
|
8944
|
-
return Identifiers
|
|
8818
|
+
return Identifiers.classMapInterpolate1;
|
|
8945
8819
|
case 5:
|
|
8946
|
-
return Identifiers
|
|
8820
|
+
return Identifiers.classMapInterpolate2;
|
|
8947
8821
|
case 7:
|
|
8948
|
-
return Identifiers
|
|
8822
|
+
return Identifiers.classMapInterpolate3;
|
|
8949
8823
|
case 9:
|
|
8950
|
-
return Identifiers
|
|
8824
|
+
return Identifiers.classMapInterpolate4;
|
|
8951
8825
|
case 11:
|
|
8952
|
-
return Identifiers
|
|
8826
|
+
return Identifiers.classMapInterpolate5;
|
|
8953
8827
|
case 13:
|
|
8954
|
-
return Identifiers
|
|
8828
|
+
return Identifiers.classMapInterpolate6;
|
|
8955
8829
|
case 15:
|
|
8956
|
-
return Identifiers
|
|
8830
|
+
return Identifiers.classMapInterpolate7;
|
|
8957
8831
|
case 17:
|
|
8958
|
-
return Identifiers
|
|
8832
|
+
return Identifiers.classMapInterpolate8;
|
|
8959
8833
|
default:
|
|
8960
|
-
return Identifiers
|
|
8834
|
+
return Identifiers.classMapInterpolateV;
|
|
8961
8835
|
}
|
|
8962
8836
|
}
|
|
8963
8837
|
/**
|
|
@@ -8967,25 +8841,25 @@ function getClassMapInterpolationExpression(interpolation) {
|
|
|
8967
8841
|
function getStyleMapInterpolationExpression(interpolation) {
|
|
8968
8842
|
switch (getInterpolationArgsLength(interpolation)) {
|
|
8969
8843
|
case 1:
|
|
8970
|
-
return Identifiers
|
|
8844
|
+
return Identifiers.styleMap;
|
|
8971
8845
|
case 3:
|
|
8972
|
-
return Identifiers
|
|
8846
|
+
return Identifiers.styleMapInterpolate1;
|
|
8973
8847
|
case 5:
|
|
8974
|
-
return Identifiers
|
|
8848
|
+
return Identifiers.styleMapInterpolate2;
|
|
8975
8849
|
case 7:
|
|
8976
|
-
return Identifiers
|
|
8850
|
+
return Identifiers.styleMapInterpolate3;
|
|
8977
8851
|
case 9:
|
|
8978
|
-
return Identifiers
|
|
8852
|
+
return Identifiers.styleMapInterpolate4;
|
|
8979
8853
|
case 11:
|
|
8980
|
-
return Identifiers
|
|
8854
|
+
return Identifiers.styleMapInterpolate5;
|
|
8981
8855
|
case 13:
|
|
8982
|
-
return Identifiers
|
|
8856
|
+
return Identifiers.styleMapInterpolate6;
|
|
8983
8857
|
case 15:
|
|
8984
|
-
return Identifiers
|
|
8858
|
+
return Identifiers.styleMapInterpolate7;
|
|
8985
8859
|
case 17:
|
|
8986
|
-
return Identifiers
|
|
8860
|
+
return Identifiers.styleMapInterpolate8;
|
|
8987
8861
|
default:
|
|
8988
|
-
return Identifiers
|
|
8862
|
+
return Identifiers.styleMapInterpolateV;
|
|
8989
8863
|
}
|
|
8990
8864
|
}
|
|
8991
8865
|
/**
|
|
@@ -8995,25 +8869,25 @@ function getStyleMapInterpolationExpression(interpolation) {
|
|
|
8995
8869
|
function getStylePropInterpolationExpression(interpolation) {
|
|
8996
8870
|
switch (getInterpolationArgsLength(interpolation)) {
|
|
8997
8871
|
case 1:
|
|
8998
|
-
return Identifiers
|
|
8872
|
+
return Identifiers.styleProp;
|
|
8999
8873
|
case 3:
|
|
9000
|
-
return Identifiers
|
|
8874
|
+
return Identifiers.stylePropInterpolate1;
|
|
9001
8875
|
case 5:
|
|
9002
|
-
return Identifiers
|
|
8876
|
+
return Identifiers.stylePropInterpolate2;
|
|
9003
8877
|
case 7:
|
|
9004
|
-
return Identifiers
|
|
8878
|
+
return Identifiers.stylePropInterpolate3;
|
|
9005
8879
|
case 9:
|
|
9006
|
-
return Identifiers
|
|
8880
|
+
return Identifiers.stylePropInterpolate4;
|
|
9007
8881
|
case 11:
|
|
9008
|
-
return Identifiers
|
|
8882
|
+
return Identifiers.stylePropInterpolate5;
|
|
9009
8883
|
case 13:
|
|
9010
|
-
return Identifiers
|
|
8884
|
+
return Identifiers.stylePropInterpolate6;
|
|
9011
8885
|
case 15:
|
|
9012
|
-
return Identifiers
|
|
8886
|
+
return Identifiers.stylePropInterpolate7;
|
|
9013
8887
|
case 17:
|
|
9014
|
-
return Identifiers
|
|
8888
|
+
return Identifiers.stylePropInterpolate8;
|
|
9015
8889
|
default:
|
|
9016
|
-
return Identifiers
|
|
8890
|
+
return Identifiers.stylePropInterpolateV;
|
|
9017
8891
|
}
|
|
9018
8892
|
}
|
|
9019
8893
|
/**
|
|
@@ -9478,8 +9352,7 @@ class Parser$1 {
|
|
|
9478
9352
|
this._checkNoInterpolation(input, location, interpolationConfig);
|
|
9479
9353
|
const sourceToLex = this._stripComments(input);
|
|
9480
9354
|
const tokens = this._lexer.tokenize(sourceToLex);
|
|
9481
|
-
const ast = new _ParseAST(input, location, absoluteOffset, tokens,
|
|
9482
|
-
.parseChain();
|
|
9355
|
+
const ast = new _ParseAST(input, location, absoluteOffset, tokens, true, this.errors, 0).parseChain();
|
|
9483
9356
|
return new ASTWithSource(ast, input, location, absoluteOffset, this.errors);
|
|
9484
9357
|
}
|
|
9485
9358
|
parseBinding(input, location, absoluteOffset, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
|
|
@@ -9503,31 +9376,12 @@ class Parser$1 {
|
|
|
9503
9376
|
this.errors.push(new ParserError(message, input, errLocation, ctxLocation));
|
|
9504
9377
|
}
|
|
9505
9378
|
_parseBindingAst(input, location, absoluteOffset, interpolationConfig) {
|
|
9506
|
-
// Quotes expressions use 3rd-party expression language. We don't want to use
|
|
9507
|
-
// our lexer or parser for that, so we check for that ahead of time.
|
|
9508
|
-
const quote = this._parseQuote(input, location, absoluteOffset);
|
|
9509
|
-
if (quote != null) {
|
|
9510
|
-
return quote;
|
|
9511
|
-
}
|
|
9512
9379
|
this._checkNoInterpolation(input, location, interpolationConfig);
|
|
9513
9380
|
const sourceToLex = this._stripComments(input);
|
|
9514
9381
|
const tokens = this._lexer.tokenize(sourceToLex);
|
|
9515
|
-
return new _ParseAST(input, location, absoluteOffset, tokens,
|
|
9382
|
+
return new _ParseAST(input, location, absoluteOffset, tokens, false, this.errors, 0)
|
|
9516
9383
|
.parseChain();
|
|
9517
9384
|
}
|
|
9518
|
-
_parseQuote(input, location, absoluteOffset) {
|
|
9519
|
-
if (input == null)
|
|
9520
|
-
return null;
|
|
9521
|
-
const prefixSeparatorIndex = input.indexOf(':');
|
|
9522
|
-
if (prefixSeparatorIndex == -1)
|
|
9523
|
-
return null;
|
|
9524
|
-
const prefix = input.substring(0, prefixSeparatorIndex).trim();
|
|
9525
|
-
if (!isIdentifier(prefix))
|
|
9526
|
-
return null;
|
|
9527
|
-
const uninterpretedExpression = input.substring(prefixSeparatorIndex + 1);
|
|
9528
|
-
const span = new ParseSpan(0, input.length);
|
|
9529
|
-
return new Quote(span, span.toAbsolute(absoluteOffset), prefix, uninterpretedExpression, location);
|
|
9530
|
-
}
|
|
9531
9385
|
/**
|
|
9532
9386
|
* Parse microsyntax template expression and return a list of bindings or
|
|
9533
9387
|
* parsing errors in case the given expression is invalid.
|
|
@@ -9556,7 +9410,7 @@ class Parser$1 {
|
|
|
9556
9410
|
*/
|
|
9557
9411
|
parseTemplateBindings(templateKey, templateValue, templateUrl, absoluteKeyOffset, absoluteValueOffset) {
|
|
9558
9412
|
const tokens = this._lexer.tokenize(templateValue);
|
|
9559
|
-
const parser = new _ParseAST(templateValue, templateUrl, absoluteValueOffset, tokens,
|
|
9413
|
+
const parser = new _ParseAST(templateValue, templateUrl, absoluteValueOffset, tokens, false /* parseAction */, this.errors, 0 /* relative offset */);
|
|
9560
9414
|
return parser.parseTemplateBindings({
|
|
9561
9415
|
source: templateKey,
|
|
9562
9416
|
span: new AbsoluteSourceSpan(absoluteKeyOffset, absoluteKeyOffset + templateKey.length),
|
|
@@ -9571,7 +9425,7 @@ class Parser$1 {
|
|
|
9571
9425
|
const expressionText = expressions[i].text;
|
|
9572
9426
|
const sourceToLex = this._stripComments(expressionText);
|
|
9573
9427
|
const tokens = this._lexer.tokenize(sourceToLex);
|
|
9574
|
-
const ast = new _ParseAST(input, location, absoluteOffset, tokens,
|
|
9428
|
+
const ast = new _ParseAST(input, location, absoluteOffset, tokens, false, this.errors, offsets[i])
|
|
9575
9429
|
.parseChain();
|
|
9576
9430
|
expressionNodes.push(ast);
|
|
9577
9431
|
}
|
|
@@ -9585,7 +9439,7 @@ class Parser$1 {
|
|
|
9585
9439
|
parseInterpolationExpression(expression, location, absoluteOffset) {
|
|
9586
9440
|
const sourceToLex = this._stripComments(expression);
|
|
9587
9441
|
const tokens = this._lexer.tokenize(sourceToLex);
|
|
9588
|
-
const ast = new _ParseAST(expression, location, absoluteOffset, tokens,
|
|
9442
|
+
const ast = new _ParseAST(expression, location, absoluteOffset, tokens,
|
|
9589
9443
|
/* parseAction */ false, this.errors, 0)
|
|
9590
9444
|
.parseChain();
|
|
9591
9445
|
const strings = ['', '']; // The prefix and suffix strings are both empty
|
|
@@ -9665,7 +9519,7 @@ class Parser$1 {
|
|
|
9665
9519
|
}
|
|
9666
9520
|
_stripComments(input) {
|
|
9667
9521
|
const i = this._commentStart(input);
|
|
9668
|
-
return i != null ? input.substring(0, i)
|
|
9522
|
+
return i != null ? input.substring(0, i) : input;
|
|
9669
9523
|
}
|
|
9670
9524
|
_commentStart(input) {
|
|
9671
9525
|
let outerQuote = null;
|
|
@@ -9757,12 +9611,11 @@ var ParseContextFlags;
|
|
|
9757
9611
|
ParseContextFlags[ParseContextFlags["Writable"] = 1] = "Writable";
|
|
9758
9612
|
})(ParseContextFlags || (ParseContextFlags = {}));
|
|
9759
9613
|
class _ParseAST {
|
|
9760
|
-
constructor(input, location, absoluteOffset, tokens,
|
|
9614
|
+
constructor(input, location, absoluteOffset, tokens, parseAction, errors, offset) {
|
|
9761
9615
|
this.input = input;
|
|
9762
9616
|
this.location = location;
|
|
9763
9617
|
this.absoluteOffset = absoluteOffset;
|
|
9764
9618
|
this.tokens = tokens;
|
|
9765
|
-
this.inputLength = inputLength;
|
|
9766
9619
|
this.parseAction = parseAction;
|
|
9767
9620
|
this.errors = errors;
|
|
9768
9621
|
this.offset = offset;
|
|
@@ -9807,7 +9660,7 @@ class _ParseAST {
|
|
|
9807
9660
|
// No tokens have been processed yet; return the next token's start or the length of the input
|
|
9808
9661
|
// if there is no token.
|
|
9809
9662
|
if (this.tokens.length === 0) {
|
|
9810
|
-
return this.
|
|
9663
|
+
return this.input.length + this.offset;
|
|
9811
9664
|
}
|
|
9812
9665
|
return this.next.index + this.offset;
|
|
9813
9666
|
}
|
|
@@ -9953,7 +9806,7 @@ class _ParseAST {
|
|
|
9953
9806
|
if (exprs.length == 0) {
|
|
9954
9807
|
// We have no expressions so create an empty expression that spans the entire input length
|
|
9955
9808
|
const artificialStart = this.offset;
|
|
9956
|
-
const artificialEnd = this.offset + this.
|
|
9809
|
+
const artificialEnd = this.offset + this.input.length;
|
|
9957
9810
|
return new EmptyExpr(this.span(artificialStart, artificialEnd), this.sourceSpan(artificialStart, artificialEnd));
|
|
9958
9811
|
}
|
|
9959
9812
|
if (exprs.length == 1)
|
|
@@ -9986,7 +9839,7 @@ class _ParseAST {
|
|
|
9986
9839
|
//
|
|
9987
9840
|
// Therefore, we push the end of the `ParseSpan` for this pipe all the way up to the
|
|
9988
9841
|
// beginning of the next token, or until the end of input if the next token is EOF.
|
|
9989
|
-
fullSpanEnd = this.next.index !== -1 ? this.next.index : this.
|
|
9842
|
+
fullSpanEnd = this.next.index !== -1 ? this.next.index : this.input.length + this.offset;
|
|
9990
9843
|
// The `nameSpan` for an empty pipe name is zero-length at the end of any whitespace
|
|
9991
9844
|
// beyond the pipe character.
|
|
9992
9845
|
nameSpan = new ParseSpan(fullSpanEnd, fullSpanEnd).toAbsolute(this.absoluteOffset);
|
|
@@ -15666,8 +15519,8 @@ class HtmlAstToIvyAst {
|
|
|
15666
15519
|
// the wrapping template to prevent unnecessary i18n instructions from being generated. The
|
|
15667
15520
|
// necessary i18n meta information will be extracted from child elements.
|
|
15668
15521
|
const i18n = isTemplateElement && isI18nRootElement ? undefined : element.i18n;
|
|
15669
|
-
|
|
15670
|
-
parsedElement = new Template(
|
|
15522
|
+
const name = parsedElement instanceof Template ? null : parsedElement.name;
|
|
15523
|
+
parsedElement = new Template(name, hoistedAttrs.attributes, hoistedAttrs.inputs, hoistedAttrs.outputs, templateAttrs, [parsedElement], [ /* no references */], templateVariables, element.sourceSpan, element.startSourceSpan, element.endSourceSpan, i18n);
|
|
15671
15524
|
}
|
|
15672
15525
|
if (isI18nRootElement) {
|
|
15673
15526
|
this.inI18nBlock = false;
|
|
@@ -16907,7 +16760,7 @@ const NG_PROJECT_AS_ATTR_NAME = 'ngProjectAs';
|
|
|
16907
16760
|
// Global symbols available only inside event bindings.
|
|
16908
16761
|
const EVENT_BINDING_SCOPE_GLOBALS = new Set(['$event']);
|
|
16909
16762
|
// List of supported global targets for event listeners
|
|
16910
|
-
const GLOBAL_TARGET_RESOLVERS = new Map([['window', Identifiers
|
|
16763
|
+
const GLOBAL_TARGET_RESOLVERS = new Map([['window', Identifiers.resolveWindow], ['document', Identifiers.resolveDocument], ['body', Identifiers.resolveBody]]);
|
|
16911
16764
|
const LEADING_TRIVIA_CHARS = [' ', '\n', '\r', '\t'];
|
|
16912
16765
|
// if (rf & flags) { .. }
|
|
16913
16766
|
function renderFlagCheckIfStmt(flags, statements) {
|
|
@@ -16924,7 +16777,7 @@ function prepareEventListenerParameters(eventAst, handlerName = null, scope = nu
|
|
|
16924
16777
|
const implicitReceiverExpr = (scope === null || scope.bindingLevel === 0) ?
|
|
16925
16778
|
variable(CONTEXT_NAME) :
|
|
16926
16779
|
scope.getOrCreateSharedContextVar(0);
|
|
16927
|
-
const bindingStatements = convertActionBinding(scope, implicitReceiverExpr, handler, 'b',
|
|
16780
|
+
const bindingStatements = convertActionBinding(scope, implicitReceiverExpr, handler, 'b', eventAst.handlerSpan, implicitReceiverAccesses, EVENT_BINDING_SCOPE_GLOBALS);
|
|
16928
16781
|
const statements = [];
|
|
16929
16782
|
if (scope) {
|
|
16930
16783
|
// `variableDeclarations` needs to run first, because
|
|
@@ -17019,12 +16872,12 @@ class TemplateDefinitionBuilder {
|
|
|
17019
16872
|
this.fileBasedI18nSuffix = relativeContextFilePath.replace(/[^A-Za-z0-9]/g, '_') + '_';
|
|
17020
16873
|
this._valueConverter = new ValueConverter(constantPool, () => this.allocateDataSlot(), (numSlots) => this.allocatePureFunctionSlots(numSlots), (name, localName, slot, value) => {
|
|
17021
16874
|
this._bindingScope.set(this.level, localName, value);
|
|
17022
|
-
this.creationInstruction(null, Identifiers
|
|
16875
|
+
this.creationInstruction(null, Identifiers.pipe, [literal(slot), literal(name)]);
|
|
17023
16876
|
});
|
|
17024
16877
|
}
|
|
17025
16878
|
buildTemplateFunction(nodes, variables, ngContentSelectorsOffset = 0, i18n) {
|
|
17026
16879
|
this._ngContentSelectorsOffset = ngContentSelectorsOffset;
|
|
17027
|
-
if (this._namespace !== Identifiers
|
|
16880
|
+
if (this._namespace !== Identifiers.namespaceHTML) {
|
|
17028
16881
|
this.creationInstruction(null, this._namespace);
|
|
17029
16882
|
}
|
|
17030
16883
|
// Create variable bindings
|
|
@@ -17070,7 +16923,7 @@ class TemplateDefinitionBuilder {
|
|
|
17070
16923
|
// Since we accumulate ngContent selectors while processing template elements,
|
|
17071
16924
|
// we *prepend* `projectionDef` to creation instructions block, to put it before
|
|
17072
16925
|
// any `projection` instructions
|
|
17073
|
-
this.creationInstruction(null, Identifiers
|
|
16926
|
+
this.creationInstruction(null, Identifiers.projectionDef, parameters, /* prepend */ true);
|
|
17074
16927
|
}
|
|
17075
16928
|
if (initI18nContext) {
|
|
17076
16929
|
this.i18nEnd(null, selfClosingI18nInstruction);
|
|
@@ -17231,7 +17084,7 @@ class TemplateDefinitionBuilder {
|
|
|
17231
17084
|
if (Object.keys(icuMapping).length) {
|
|
17232
17085
|
args.push(mapLiteral(icuMapping, true));
|
|
17233
17086
|
}
|
|
17234
|
-
return instruction(null, Identifiers
|
|
17087
|
+
return instruction(null, Identifiers.i18nPostprocess, args);
|
|
17235
17088
|
};
|
|
17236
17089
|
}
|
|
17237
17090
|
this.i18nTranslate(meta, params, context.ref, transformFn);
|
|
@@ -17250,7 +17103,7 @@ class TemplateDefinitionBuilder {
|
|
|
17250
17103
|
// into i18nStart call for top level i18n context
|
|
17251
17104
|
params.push(literal(id));
|
|
17252
17105
|
}
|
|
17253
|
-
this.creationInstruction(span, selfClosing ? Identifiers
|
|
17106
|
+
this.creationInstruction(span, selfClosing ? Identifiers.i18n : Identifiers.i18nStart, params);
|
|
17254
17107
|
}
|
|
17255
17108
|
i18nEnd(span = null, selfClosing) {
|
|
17256
17109
|
if (!this.i18n) {
|
|
@@ -17273,11 +17126,11 @@ class TemplateDefinitionBuilder {
|
|
|
17273
17126
|
// for i18n block, advance to the most recent element index (by taking the current number of
|
|
17274
17127
|
// elements and subtracting one) before invoking `i18nExp` instructions, to make sure the
|
|
17275
17128
|
// necessary lifecycle hooks of components/directives are properly flushed.
|
|
17276
|
-
this.updateInstructionChainWithAdvance(this.getConstCount() - 1, Identifiers
|
|
17277
|
-
this.updateInstruction(span, Identifiers
|
|
17129
|
+
this.updateInstructionChainWithAdvance(this.getConstCount() - 1, Identifiers.i18nExp, chainBindings);
|
|
17130
|
+
this.updateInstruction(span, Identifiers.i18nApply, [literal(index)]);
|
|
17278
17131
|
}
|
|
17279
17132
|
if (!selfClosing) {
|
|
17280
|
-
this.creationInstruction(span, Identifiers
|
|
17133
|
+
this.creationInstruction(span, Identifiers.i18nEnd);
|
|
17281
17134
|
}
|
|
17282
17135
|
this.i18n = null; // reset local i18n context
|
|
17283
17136
|
}
|
|
@@ -17303,25 +17156,25 @@ class TemplateDefinitionBuilder {
|
|
|
17303
17156
|
}
|
|
17304
17157
|
});
|
|
17305
17158
|
if (bindings.length > 0) {
|
|
17306
|
-
this.updateInstructionChainWithAdvance(nodeIndex, Identifiers
|
|
17159
|
+
this.updateInstructionChainWithAdvance(nodeIndex, Identifiers.i18nExp, bindings);
|
|
17307
17160
|
}
|
|
17308
17161
|
if (i18nAttrArgs.length > 0) {
|
|
17309
17162
|
const index = literal(this.allocateDataSlot());
|
|
17310
17163
|
const constIndex = this.addToConsts(literalArr(i18nAttrArgs));
|
|
17311
|
-
this.creationInstruction(sourceSpan, Identifiers
|
|
17164
|
+
this.creationInstruction(sourceSpan, Identifiers.i18nAttributes, [index, constIndex]);
|
|
17312
17165
|
if (hasBindings) {
|
|
17313
|
-
this.updateInstruction(sourceSpan, Identifiers
|
|
17166
|
+
this.updateInstruction(sourceSpan, Identifiers.i18nApply, [index]);
|
|
17314
17167
|
}
|
|
17315
17168
|
}
|
|
17316
17169
|
}
|
|
17317
17170
|
getNamespaceInstruction(namespaceKey) {
|
|
17318
17171
|
switch (namespaceKey) {
|
|
17319
17172
|
case 'math':
|
|
17320
|
-
return Identifiers
|
|
17173
|
+
return Identifiers.namespaceMathML;
|
|
17321
17174
|
case 'svg':
|
|
17322
|
-
return Identifiers
|
|
17175
|
+
return Identifiers.namespaceSVG;
|
|
17323
17176
|
default:
|
|
17324
|
-
return Identifiers
|
|
17177
|
+
return Identifiers.namespaceHTML;
|
|
17325
17178
|
}
|
|
17326
17179
|
}
|
|
17327
17180
|
addNamespaceInstruction(nsInstruction, element) {
|
|
@@ -17348,7 +17201,7 @@ class TemplateDefinitionBuilder {
|
|
|
17348
17201
|
else if (projectionSlotIdx !== 0) {
|
|
17349
17202
|
parameters.push(literal(projectionSlotIdx));
|
|
17350
17203
|
}
|
|
17351
|
-
this.creationInstruction(ngContent.sourceSpan, Identifiers
|
|
17204
|
+
this.creationInstruction(ngContent.sourceSpan, Identifiers.projection, parameters);
|
|
17352
17205
|
if (this.i18n) {
|
|
17353
17206
|
this.i18n.appendProjection(ngContent.i18n, slot);
|
|
17354
17207
|
}
|
|
@@ -17420,12 +17273,12 @@ class TemplateDefinitionBuilder {
|
|
|
17420
17273
|
element.outputs.length === 0 && boundI18nAttrs.length === 0 && !hasChildren;
|
|
17421
17274
|
const createSelfClosingI18nInstruction = !createSelfClosingInstruction && hasTextChildrenOnly(element.children);
|
|
17422
17275
|
if (createSelfClosingInstruction) {
|
|
17423
|
-
this.creationInstruction(element.sourceSpan, isNgContainer$1 ? Identifiers
|
|
17276
|
+
this.creationInstruction(element.sourceSpan, isNgContainer$1 ? Identifiers.elementContainer : Identifiers.element, trimTrailingNulls(parameters));
|
|
17424
17277
|
}
|
|
17425
17278
|
else {
|
|
17426
|
-
this.creationInstruction(element.startSourceSpan, isNgContainer$1 ? Identifiers
|
|
17279
|
+
this.creationInstruction(element.startSourceSpan, isNgContainer$1 ? Identifiers.elementContainerStart : Identifiers.elementStart, trimTrailingNulls(parameters));
|
|
17427
17280
|
if (isNonBindableMode) {
|
|
17428
|
-
this.creationInstruction(element.startSourceSpan, Identifiers
|
|
17281
|
+
this.creationInstruction(element.startSourceSpan, Identifiers.disableBindings);
|
|
17429
17282
|
}
|
|
17430
17283
|
if (boundI18nAttrs.length > 0) {
|
|
17431
17284
|
this.i18nAttributesInstruction(elementIndex, boundI18nAttrs, element.startSourceSpan ?? element.sourceSpan);
|
|
@@ -17436,7 +17289,7 @@ class TemplateDefinitionBuilder {
|
|
|
17436
17289
|
sourceSpan: outputAst.sourceSpan,
|
|
17437
17290
|
params: this.prepareListenerParameter(element.name, outputAst, elementIndex)
|
|
17438
17291
|
}));
|
|
17439
|
-
this.creationInstructionChain(Identifiers
|
|
17292
|
+
this.creationInstructionChain(Identifiers.listener, listeners);
|
|
17440
17293
|
}
|
|
17441
17294
|
// Note: it's important to keep i18n/i18nStart instructions after i18nAttributes and
|
|
17442
17295
|
// listeners, to make sure i18nAttributes instruction targets current element at runtime.
|
|
@@ -17542,7 +17395,7 @@ class TemplateDefinitionBuilder {
|
|
|
17542
17395
|
}
|
|
17543
17396
|
else {
|
|
17544
17397
|
// class prop
|
|
17545
|
-
this.updateInstructionWithAdvance(elementIndex, input.sourceSpan, Identifiers
|
|
17398
|
+
this.updateInstructionWithAdvance(elementIndex, input.sourceSpan, Identifiers.classProp, () => {
|
|
17546
17399
|
return [
|
|
17547
17400
|
literal(elementIndex), literal(attrName), this.convertPropertyBinding(value),
|
|
17548
17401
|
...params
|
|
@@ -17553,10 +17406,10 @@ class TemplateDefinitionBuilder {
|
|
|
17553
17406
|
}
|
|
17554
17407
|
});
|
|
17555
17408
|
if (propertyBindings.length > 0) {
|
|
17556
|
-
this.updateInstructionChainWithAdvance(elementIndex, Identifiers
|
|
17409
|
+
this.updateInstructionChainWithAdvance(elementIndex, Identifiers.property, propertyBindings);
|
|
17557
17410
|
}
|
|
17558
17411
|
if (attributeBindings.length > 0) {
|
|
17559
|
-
this.updateInstructionChainWithAdvance(elementIndex, Identifiers
|
|
17412
|
+
this.updateInstructionChainWithAdvance(elementIndex, Identifiers.attribute, attributeBindings);
|
|
17560
17413
|
}
|
|
17561
17414
|
// Traverse element child nodes
|
|
17562
17415
|
visitAll$1(this, element.children);
|
|
@@ -17570,9 +17423,9 @@ class TemplateDefinitionBuilder {
|
|
|
17570
17423
|
this.i18nEnd(span, createSelfClosingI18nInstruction);
|
|
17571
17424
|
}
|
|
17572
17425
|
if (isNonBindableMode) {
|
|
17573
|
-
this.creationInstruction(span, Identifiers
|
|
17426
|
+
this.creationInstruction(span, Identifiers.enableBindings);
|
|
17574
17427
|
}
|
|
17575
|
-
this.creationInstruction(span, isNgContainer$1 ? Identifiers
|
|
17428
|
+
this.creationInstruction(span, isNgContainer$1 ? Identifiers.elementContainerEnd : Identifiers.elementEnd);
|
|
17576
17429
|
}
|
|
17577
17430
|
}
|
|
17578
17431
|
visitTemplate(template) {
|
|
@@ -17598,7 +17451,7 @@ class TemplateDefinitionBuilder {
|
|
|
17598
17451
|
if (template.references && template.references.length) {
|
|
17599
17452
|
const refs = this.prepareRefsArray(template.references);
|
|
17600
17453
|
parameters.push(this.addToConsts(refs));
|
|
17601
|
-
parameters.push(importExpr(Identifiers
|
|
17454
|
+
parameters.push(importExpr(Identifiers.templateRefExtractor));
|
|
17602
17455
|
}
|
|
17603
17456
|
// Create the template function
|
|
17604
17457
|
const templateVisitor = new TemplateDefinitionBuilder(this.constantPool, this._bindingScope, this.level + 1, contextName, this.i18n, templateIndex, templateName, this._namespace, this.fileBasedI18nSuffix, this.i18nUseExternalIds, this._constants);
|
|
@@ -17614,7 +17467,7 @@ class TemplateDefinitionBuilder {
|
|
|
17614
17467
|
}
|
|
17615
17468
|
});
|
|
17616
17469
|
// e.g. template(1, MyComp_Template_1)
|
|
17617
|
-
this.creationInstruction(template.sourceSpan, Identifiers
|
|
17470
|
+
this.creationInstruction(template.sourceSpan, Identifiers.templateCreate, () => {
|
|
17618
17471
|
parameters.splice(2, 0, literal(templateVisitor.getConstCount()), literal(templateVisitor.getVarCount()));
|
|
17619
17472
|
return trimTrailingNulls(parameters);
|
|
17620
17473
|
});
|
|
@@ -17640,7 +17493,7 @@ class TemplateDefinitionBuilder {
|
|
|
17640
17493
|
sourceSpan: outputAst.sourceSpan,
|
|
17641
17494
|
params: this.prepareListenerParameter('ng_template', outputAst, templateIndex)
|
|
17642
17495
|
}));
|
|
17643
|
-
this.creationInstructionChain(Identifiers
|
|
17496
|
+
this.creationInstructionChain(Identifiers.listener, listeners);
|
|
17644
17497
|
}
|
|
17645
17498
|
}
|
|
17646
17499
|
}
|
|
@@ -17655,7 +17508,7 @@ class TemplateDefinitionBuilder {
|
|
|
17655
17508
|
return;
|
|
17656
17509
|
}
|
|
17657
17510
|
const nodeIndex = this.allocateDataSlot();
|
|
17658
|
-
this.creationInstruction(text.sourceSpan, Identifiers
|
|
17511
|
+
this.creationInstruction(text.sourceSpan, Identifiers.text, [literal(nodeIndex)]);
|
|
17659
17512
|
const value = text.value.visit(this._valueConverter);
|
|
17660
17513
|
this.allocateBindingSlots(value);
|
|
17661
17514
|
if (value instanceof Interpolation) {
|
|
@@ -17670,7 +17523,7 @@ class TemplateDefinitionBuilder {
|
|
|
17670
17523
|
// block, we exclude this text element from instructions set,
|
|
17671
17524
|
// since it will be captured in i18n content and processed at runtime
|
|
17672
17525
|
if (!this.i18n) {
|
|
17673
|
-
this.creationInstruction(text.sourceSpan, Identifiers
|
|
17526
|
+
this.creationInstruction(text.sourceSpan, Identifiers.text, [literal(this.allocateDataSlot()), literal(text.value)]);
|
|
17674
17527
|
}
|
|
17675
17528
|
}
|
|
17676
17529
|
visitIcu(icu) {
|
|
@@ -17695,7 +17548,7 @@ class TemplateDefinitionBuilder {
|
|
|
17695
17548
|
const transformFn = (raw) => {
|
|
17696
17549
|
const params = { ...vars, ...placeholders };
|
|
17697
17550
|
const formatted = i18nFormatPlaceholderNames(params, /* useCamelCase */ false);
|
|
17698
|
-
return instruction(null, Identifiers
|
|
17551
|
+
return instruction(null, Identifiers.i18nPostprocess, [raw, mapLiteral(formatted, true)]);
|
|
17699
17552
|
};
|
|
17700
17553
|
// in case the whole i18n message is a single ICU - we do not need to
|
|
17701
17554
|
// create a separate top-level translation, we can use the root ref instead
|
|
@@ -17762,7 +17615,7 @@ class TemplateDefinitionBuilder {
|
|
|
17762
17615
|
}
|
|
17763
17616
|
});
|
|
17764
17617
|
if (propertyBindings.length > 0) {
|
|
17765
|
-
this.updateInstructionChainWithAdvance(templateIndex, Identifiers
|
|
17618
|
+
this.updateInstructionChainWithAdvance(templateIndex, Identifiers.property, propertyBindings);
|
|
17766
17619
|
}
|
|
17767
17620
|
}
|
|
17768
17621
|
// Bindings must only be resolved after all local refs have been visited, so all
|
|
@@ -17838,7 +17691,7 @@ class TemplateDefinitionBuilder {
|
|
|
17838
17691
|
if (delta < 1) {
|
|
17839
17692
|
throw new Error('advance instruction can only go forwards');
|
|
17840
17693
|
}
|
|
17841
|
-
this.instructionFn(this._updateCodeFns, span, Identifiers
|
|
17694
|
+
this.instructionFn(this._updateCodeFns, span, Identifiers.advance, [literal(delta)]);
|
|
17842
17695
|
this._currentIndex = nodeIndex;
|
|
17843
17696
|
}
|
|
17844
17697
|
}
|
|
@@ -17863,7 +17716,7 @@ class TemplateDefinitionBuilder {
|
|
|
17863
17716
|
this._bindingScope.getOrCreateSharedContextVar(0);
|
|
17864
17717
|
}
|
|
17865
17718
|
convertPropertyBinding(value) {
|
|
17866
|
-
const convertedPropertyBinding = convertPropertyBinding(this, this.getImplicitReceiverExpr(), value, this.bindingContext()
|
|
17719
|
+
const convertedPropertyBinding = convertPropertyBinding(this, this.getImplicitReceiverExpr(), value, this.bindingContext());
|
|
17867
17720
|
const valExpr = convertedPropertyBinding.currValExpr;
|
|
17868
17721
|
this._tempVariables.push(...convertedPropertyBinding.stmts);
|
|
17869
17722
|
return valExpr;
|
|
@@ -18020,7 +17873,7 @@ class TemplateDefinitionBuilder {
|
|
|
18020
17873
|
// e.g. nextContext(2);
|
|
18021
17874
|
const nextContextStmt = relativeLevel > 0 ? [generateNextContextExpr(relativeLevel).toStmt()] : [];
|
|
18022
17875
|
// e.g. const $foo$ = reference(1);
|
|
18023
|
-
const refExpr = lhs.set(importExpr(Identifiers
|
|
17876
|
+
const refExpr = lhs.set(importExpr(Identifiers.reference).callFn([literal(slot)]));
|
|
18024
17877
|
return nextContextStmt.concat(refExpr.toConstDecl());
|
|
18025
17878
|
}, true);
|
|
18026
17879
|
return [reference.name, reference.value];
|
|
@@ -18098,22 +17951,22 @@ class ValueConverter extends AstMemoryEfficientTransformer {
|
|
|
18098
17951
|
}
|
|
18099
17952
|
}
|
|
18100
17953
|
// Pipes always have at least one parameter, the value they operate on
|
|
18101
|
-
const pipeBindingIdentifiers = [Identifiers
|
|
17954
|
+
const pipeBindingIdentifiers = [Identifiers.pipeBind1, Identifiers.pipeBind2, Identifiers.pipeBind3, Identifiers.pipeBind4];
|
|
18102
17955
|
function pipeBindingCallInfo(args) {
|
|
18103
17956
|
const identifier = pipeBindingIdentifiers[args.length];
|
|
18104
17957
|
return {
|
|
18105
|
-
identifier: identifier || Identifiers
|
|
17958
|
+
identifier: identifier || Identifiers.pipeBindV,
|
|
18106
17959
|
isVarLength: !identifier,
|
|
18107
17960
|
};
|
|
18108
17961
|
}
|
|
18109
17962
|
const pureFunctionIdentifiers = [
|
|
18110
|
-
Identifiers
|
|
18111
|
-
Identifiers
|
|
17963
|
+
Identifiers.pureFunction0, Identifiers.pureFunction1, Identifiers.pureFunction2, Identifiers.pureFunction3, Identifiers.pureFunction4,
|
|
17964
|
+
Identifiers.pureFunction5, Identifiers.pureFunction6, Identifiers.pureFunction7, Identifiers.pureFunction8
|
|
18112
17965
|
];
|
|
18113
17966
|
function pureFunctionCallInfo(args) {
|
|
18114
17967
|
const identifier = pureFunctionIdentifiers[args.length];
|
|
18115
17968
|
return {
|
|
18116
|
-
identifier: identifier || Identifiers
|
|
17969
|
+
identifier: identifier || Identifiers.pureFunctionV,
|
|
18117
17970
|
isVarLength: !identifier,
|
|
18118
17971
|
};
|
|
18119
17972
|
}
|
|
@@ -18122,7 +17975,7 @@ function instruction(span, reference, params) {
|
|
|
18122
17975
|
}
|
|
18123
17976
|
// e.g. x(2);
|
|
18124
17977
|
function generateNextContextExpr(relativeLevelDiff) {
|
|
18125
|
-
return importExpr(Identifiers
|
|
17978
|
+
return importExpr(Identifiers.nextContext)
|
|
18126
17979
|
.callFn(relativeLevelDiff > 1 ? [literal(relativeLevelDiff)] : []);
|
|
18127
17980
|
}
|
|
18128
17981
|
function getLiteralFactory(constantPool, literal$1, allocateSlots) {
|
|
@@ -18324,7 +18177,7 @@ class BindingScope {
|
|
|
18324
18177
|
restoreViewStatement() {
|
|
18325
18178
|
const statements = [];
|
|
18326
18179
|
if (this.restoreViewVariable) {
|
|
18327
|
-
const restoreCall = instruction(null, Identifiers
|
|
18180
|
+
const restoreCall = instruction(null, Identifiers.restoreView, [this.restoreViewVariable]);
|
|
18328
18181
|
// Either `const restoredCtx = restoreView($state$);` or `restoreView($state$);`
|
|
18329
18182
|
// depending on whether it is being used.
|
|
18330
18183
|
statements.push(this.usesRestoredViewContext ?
|
|
@@ -18336,7 +18189,7 @@ class BindingScope {
|
|
|
18336
18189
|
viewSnapshotStatements() {
|
|
18337
18190
|
// const $state$ = getCurrentView();
|
|
18338
18191
|
return this.restoreViewVariable ?
|
|
18339
|
-
[this.restoreViewVariable.set(instruction(null, Identifiers
|
|
18192
|
+
[this.restoreViewVariable.set(instruction(null, Identifiers.getCurrentView, [])).toConstDecl()] :
|
|
18340
18193
|
[];
|
|
18341
18194
|
}
|
|
18342
18195
|
isListenerScope() {
|
|
@@ -18404,25 +18257,25 @@ function getNgProjectAsLiteral(attribute) {
|
|
|
18404
18257
|
function getPropertyInterpolationExpression(interpolation) {
|
|
18405
18258
|
switch (getInterpolationArgsLength(interpolation)) {
|
|
18406
18259
|
case 1:
|
|
18407
|
-
return Identifiers
|
|
18260
|
+
return Identifiers.propertyInterpolate;
|
|
18408
18261
|
case 3:
|
|
18409
|
-
return Identifiers
|
|
18262
|
+
return Identifiers.propertyInterpolate1;
|
|
18410
18263
|
case 5:
|
|
18411
|
-
return Identifiers
|
|
18264
|
+
return Identifiers.propertyInterpolate2;
|
|
18412
18265
|
case 7:
|
|
18413
|
-
return Identifiers
|
|
18266
|
+
return Identifiers.propertyInterpolate3;
|
|
18414
18267
|
case 9:
|
|
18415
|
-
return Identifiers
|
|
18268
|
+
return Identifiers.propertyInterpolate4;
|
|
18416
18269
|
case 11:
|
|
18417
|
-
return Identifiers
|
|
18270
|
+
return Identifiers.propertyInterpolate5;
|
|
18418
18271
|
case 13:
|
|
18419
|
-
return Identifiers
|
|
18272
|
+
return Identifiers.propertyInterpolate6;
|
|
18420
18273
|
case 15:
|
|
18421
|
-
return Identifiers
|
|
18274
|
+
return Identifiers.propertyInterpolate7;
|
|
18422
18275
|
case 17:
|
|
18423
|
-
return Identifiers
|
|
18276
|
+
return Identifiers.propertyInterpolate8;
|
|
18424
18277
|
default:
|
|
18425
|
-
return Identifiers
|
|
18278
|
+
return Identifiers.propertyInterpolateV;
|
|
18426
18279
|
}
|
|
18427
18280
|
}
|
|
18428
18281
|
/**
|
|
@@ -18432,23 +18285,23 @@ function getPropertyInterpolationExpression(interpolation) {
|
|
|
18432
18285
|
function getAttributeInterpolationExpression(interpolation) {
|
|
18433
18286
|
switch (getInterpolationArgsLength(interpolation)) {
|
|
18434
18287
|
case 3:
|
|
18435
|
-
return Identifiers
|
|
18288
|
+
return Identifiers.attributeInterpolate1;
|
|
18436
18289
|
case 5:
|
|
18437
|
-
return Identifiers
|
|
18290
|
+
return Identifiers.attributeInterpolate2;
|
|
18438
18291
|
case 7:
|
|
18439
|
-
return Identifiers
|
|
18292
|
+
return Identifiers.attributeInterpolate3;
|
|
18440
18293
|
case 9:
|
|
18441
|
-
return Identifiers
|
|
18294
|
+
return Identifiers.attributeInterpolate4;
|
|
18442
18295
|
case 11:
|
|
18443
|
-
return Identifiers
|
|
18296
|
+
return Identifiers.attributeInterpolate5;
|
|
18444
18297
|
case 13:
|
|
18445
|
-
return Identifiers
|
|
18298
|
+
return Identifiers.attributeInterpolate6;
|
|
18446
18299
|
case 15:
|
|
18447
|
-
return Identifiers
|
|
18300
|
+
return Identifiers.attributeInterpolate7;
|
|
18448
18301
|
case 17:
|
|
18449
|
-
return Identifiers
|
|
18302
|
+
return Identifiers.attributeInterpolate8;
|
|
18450
18303
|
default:
|
|
18451
|
-
return Identifiers
|
|
18304
|
+
return Identifiers.attributeInterpolateV;
|
|
18452
18305
|
}
|
|
18453
18306
|
}
|
|
18454
18307
|
/**
|
|
@@ -18458,25 +18311,25 @@ function getAttributeInterpolationExpression(interpolation) {
|
|
|
18458
18311
|
function getTextInterpolationExpression(interpolation) {
|
|
18459
18312
|
switch (getInterpolationArgsLength(interpolation)) {
|
|
18460
18313
|
case 1:
|
|
18461
|
-
return Identifiers
|
|
18314
|
+
return Identifiers.textInterpolate;
|
|
18462
18315
|
case 3:
|
|
18463
|
-
return Identifiers
|
|
18316
|
+
return Identifiers.textInterpolate1;
|
|
18464
18317
|
case 5:
|
|
18465
|
-
return Identifiers
|
|
18318
|
+
return Identifiers.textInterpolate2;
|
|
18466
18319
|
case 7:
|
|
18467
|
-
return Identifiers
|
|
18320
|
+
return Identifiers.textInterpolate3;
|
|
18468
18321
|
case 9:
|
|
18469
|
-
return Identifiers
|
|
18322
|
+
return Identifiers.textInterpolate4;
|
|
18470
18323
|
case 11:
|
|
18471
|
-
return Identifiers
|
|
18324
|
+
return Identifiers.textInterpolate5;
|
|
18472
18325
|
case 13:
|
|
18473
|
-
return Identifiers
|
|
18326
|
+
return Identifiers.textInterpolate6;
|
|
18474
18327
|
case 15:
|
|
18475
|
-
return Identifiers
|
|
18328
|
+
return Identifiers.textInterpolate7;
|
|
18476
18329
|
case 17:
|
|
18477
|
-
return Identifiers
|
|
18330
|
+
return Identifiers.textInterpolate8;
|
|
18478
18331
|
default:
|
|
18479
|
-
return Identifiers
|
|
18332
|
+
return Identifiers.textInterpolateV;
|
|
18480
18333
|
}
|
|
18481
18334
|
}
|
|
18482
18335
|
/**
|
|
@@ -18567,18 +18420,18 @@ function makeBindingParser(interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
|
|
|
18567
18420
|
function resolveSanitizationFn(context, isAttribute) {
|
|
18568
18421
|
switch (context) {
|
|
18569
18422
|
case SecurityContext.HTML:
|
|
18570
|
-
return importExpr(Identifiers
|
|
18423
|
+
return importExpr(Identifiers.sanitizeHtml);
|
|
18571
18424
|
case SecurityContext.SCRIPT:
|
|
18572
|
-
return importExpr(Identifiers
|
|
18425
|
+
return importExpr(Identifiers.sanitizeScript);
|
|
18573
18426
|
case SecurityContext.STYLE:
|
|
18574
18427
|
// the compiler does not fill in an instruction for [style.prop?] binding
|
|
18575
18428
|
// values because the style algorithm knows internally what props are subject
|
|
18576
18429
|
// to sanitization (only [attr.style] values are explicitly sanitized)
|
|
18577
|
-
return isAttribute ? importExpr(Identifiers
|
|
18430
|
+
return isAttribute ? importExpr(Identifiers.sanitizeStyle) : null;
|
|
18578
18431
|
case SecurityContext.URL:
|
|
18579
|
-
return importExpr(Identifiers
|
|
18432
|
+
return importExpr(Identifiers.sanitizeUrl);
|
|
18580
18433
|
case SecurityContext.RESOURCE_URL:
|
|
18581
|
-
return importExpr(Identifiers
|
|
18434
|
+
return importExpr(Identifiers.sanitizeResourceUrl);
|
|
18582
18435
|
default:
|
|
18583
18436
|
return null;
|
|
18584
18437
|
}
|
|
@@ -18588,10 +18441,10 @@ function trustedConstAttribute(tagName, attr) {
|
|
|
18588
18441
|
if (isTrustedTypesSink(tagName, attr.name)) {
|
|
18589
18442
|
switch (elementRegistry.securityContext(tagName, attr.name, /* isAttribute */ true)) {
|
|
18590
18443
|
case SecurityContext.HTML:
|
|
18591
|
-
return taggedTemplate(importExpr(Identifiers
|
|
18444
|
+
return taggedTemplate(importExpr(Identifiers.trustConstantHtml), new TemplateLiteral([new TemplateLiteralElement(attr.value)], []), undefined, attr.valueSpan);
|
|
18592
18445
|
// NB: no SecurityContext.SCRIPT here, as the corresponding tags are stripped by the compiler.
|
|
18593
18446
|
case SecurityContext.RESOURCE_URL:
|
|
18594
|
-
return taggedTemplate(importExpr(Identifiers
|
|
18447
|
+
return taggedTemplate(importExpr(Identifiers.trustConstantResourceUrl), new TemplateLiteral([new TemplateLiteralElement(attr.value)], []), undefined, attr.valueSpan);
|
|
18595
18448
|
default:
|
|
18596
18449
|
return value;
|
|
18597
18450
|
}
|
|
@@ -18720,16 +18573,16 @@ function addFeatures(definitionMap, meta) {
|
|
|
18720
18573
|
if (viewProviders) {
|
|
18721
18574
|
args.push(viewProviders);
|
|
18722
18575
|
}
|
|
18723
|
-
features.push(importExpr(Identifiers
|
|
18576
|
+
features.push(importExpr(Identifiers.ProvidersFeature).callFn(args));
|
|
18724
18577
|
}
|
|
18725
18578
|
if (meta.usesInheritance) {
|
|
18726
|
-
features.push(importExpr(Identifiers
|
|
18579
|
+
features.push(importExpr(Identifiers.InheritDefinitionFeature));
|
|
18727
18580
|
}
|
|
18728
18581
|
if (meta.fullInheritance) {
|
|
18729
|
-
features.push(importExpr(Identifiers
|
|
18582
|
+
features.push(importExpr(Identifiers.CopyDefinitionFeature));
|
|
18730
18583
|
}
|
|
18731
18584
|
if (meta.lifecycle.usesOnChanges) {
|
|
18732
|
-
features.push(importExpr(Identifiers
|
|
18585
|
+
features.push(importExpr(Identifiers.NgOnChangesFeature));
|
|
18733
18586
|
}
|
|
18734
18587
|
if (features.length) {
|
|
18735
18588
|
definitionMap.set('features', literalArr(features));
|
|
@@ -18741,7 +18594,7 @@ function addFeatures(definitionMap, meta) {
|
|
|
18741
18594
|
function compileDirectiveFromMetadata(meta, constantPool, bindingParser) {
|
|
18742
18595
|
const definitionMap = baseDirectiveFields(meta, constantPool, bindingParser);
|
|
18743
18596
|
addFeatures(definitionMap, meta);
|
|
18744
|
-
const expression = importExpr(Identifiers
|
|
18597
|
+
const expression = importExpr(Identifiers.defineDirective).callFn([definitionMap.toLiteralMap()], undefined, true);
|
|
18745
18598
|
const type = createDirectiveType(meta);
|
|
18746
18599
|
return { expression, type, statements: [] };
|
|
18747
18600
|
}
|
|
@@ -18767,7 +18620,7 @@ function compileComponentFromMetadata(meta, constantPool, bindingParser) {
|
|
|
18767
18620
|
const templateName = templateTypeName ? `${templateTypeName}_Template` : null;
|
|
18768
18621
|
const changeDetection = meta.changeDetection;
|
|
18769
18622
|
const template = meta.template;
|
|
18770
|
-
const templateBuilder = new TemplateDefinitionBuilder(constantPool, BindingScope.createRootScope(), 0, templateTypeName, null, null, templateName, Identifiers
|
|
18623
|
+
const templateBuilder = new TemplateDefinitionBuilder(constantPool, BindingScope.createRootScope(), 0, templateTypeName, null, null, templateName, Identifiers.namespaceHTML, meta.relativeContextFilePath, meta.i18nUseExternalIds);
|
|
18771
18624
|
const templateFunctionExpression = templateBuilder.buildTemplateFunction(template.nodes, []);
|
|
18772
18625
|
// We need to provide this so that dynamically generated components know what
|
|
18773
18626
|
// projected content blocks to pass through to the component when it is instantiated.
|
|
@@ -18833,7 +18686,7 @@ function compileComponentFromMetadata(meta, constantPool, bindingParser) {
|
|
|
18833
18686
|
if (changeDetection != null && changeDetection !== ChangeDetectionStrategy.Default) {
|
|
18834
18687
|
definitionMap.set('changeDetection', literal(changeDetection));
|
|
18835
18688
|
}
|
|
18836
|
-
const expression = importExpr(Identifiers
|
|
18689
|
+
const expression = importExpr(Identifiers.defineComponent).callFn([definitionMap.toLiteralMap()], undefined, true);
|
|
18837
18690
|
const type = createComponentType(meta);
|
|
18838
18691
|
return { expression, type, statements: [] };
|
|
18839
18692
|
}
|
|
@@ -18844,7 +18697,7 @@ function compileComponentFromMetadata(meta, constantPool, bindingParser) {
|
|
|
18844
18697
|
function createComponentType(meta) {
|
|
18845
18698
|
const typeParams = createDirectiveTypeParams(meta);
|
|
18846
18699
|
typeParams.push(stringArrayAsType(meta.template.ngContentSelectors));
|
|
18847
|
-
return expressionType(importExpr(Identifiers
|
|
18700
|
+
return expressionType(importExpr(Identifiers.ComponentDeclaration, typeParams));
|
|
18848
18701
|
}
|
|
18849
18702
|
/**
|
|
18850
18703
|
* Compiles the array literal of declarations into an expression according to the provided emit
|
|
@@ -18860,7 +18713,7 @@ function compileDeclarationList(list, mode) {
|
|
|
18860
18713
|
return fn([], [new ReturnStatement(list)]);
|
|
18861
18714
|
case 2 /* ClosureResolved */:
|
|
18862
18715
|
// directives: function () { return [MyDir].map(ng.resolveForwardRef); }
|
|
18863
|
-
const resolvedList = list.prop('map').callFn([importExpr(Identifiers
|
|
18716
|
+
const resolvedList = list.prop('map').callFn([importExpr(Identifiers.resolveForwardRef)]);
|
|
18864
18717
|
return fn([], [new ReturnStatement(resolvedList)]);
|
|
18865
18718
|
}
|
|
18866
18719
|
}
|
|
@@ -18895,13 +18748,13 @@ function createContentQueriesFunction(queries, constantPool, name) {
|
|
|
18895
18748
|
const tempAllocator = temporaryAllocator(updateStatements, TEMPORARY_NAME);
|
|
18896
18749
|
for (const query of queries) {
|
|
18897
18750
|
// creation, e.g. r3.contentQuery(dirIndex, somePredicate, true, null);
|
|
18898
|
-
createStatements.push(importExpr(Identifiers
|
|
18751
|
+
createStatements.push(importExpr(Identifiers.contentQuery)
|
|
18899
18752
|
.callFn([variable('dirIndex'), ...prepareQueryParams(query, constantPool)])
|
|
18900
18753
|
.toStmt());
|
|
18901
18754
|
// update, e.g. (r3.queryRefresh(tmp = r3.loadQuery()) && (ctx.someDir = tmp));
|
|
18902
18755
|
const temporary = tempAllocator();
|
|
18903
|
-
const getQueryList = importExpr(Identifiers
|
|
18904
|
-
const refresh = importExpr(Identifiers
|
|
18756
|
+
const getQueryList = importExpr(Identifiers.loadQuery).callFn([]);
|
|
18757
|
+
const refresh = importExpr(Identifiers.queryRefresh).callFn([temporary.set(getQueryList)]);
|
|
18905
18758
|
const updateDirective = variable(CONTEXT_NAME)
|
|
18906
18759
|
.prop(query.propertyName)
|
|
18907
18760
|
.set(query.first ? temporary.prop('first') : temporary);
|
|
@@ -18953,7 +18806,7 @@ function createDirectiveTypeParams(meta) {
|
|
|
18953
18806
|
*/
|
|
18954
18807
|
function createDirectiveType(meta) {
|
|
18955
18808
|
const typeParams = createDirectiveTypeParams(meta);
|
|
18956
|
-
return expressionType(importExpr(Identifiers
|
|
18809
|
+
return expressionType(importExpr(Identifiers.DirectiveDeclaration, typeParams));
|
|
18957
18810
|
}
|
|
18958
18811
|
// Define and update any view queries
|
|
18959
18812
|
function createViewQueriesFunction(viewQueries, constantPool, name) {
|
|
@@ -18962,12 +18815,12 @@ function createViewQueriesFunction(viewQueries, constantPool, name) {
|
|
|
18962
18815
|
const tempAllocator = temporaryAllocator(updateStatements, TEMPORARY_NAME);
|
|
18963
18816
|
viewQueries.forEach((query) => {
|
|
18964
18817
|
// creation, e.g. r3.viewQuery(somePredicate, true);
|
|
18965
|
-
const queryDefinition = importExpr(Identifiers
|
|
18818
|
+
const queryDefinition = importExpr(Identifiers.viewQuery).callFn(prepareQueryParams(query, constantPool));
|
|
18966
18819
|
createStatements.push(queryDefinition.toStmt());
|
|
18967
18820
|
// update, e.g. (r3.queryRefresh(tmp = r3.loadQuery()) && (ctx.someDir = tmp));
|
|
18968
18821
|
const temporary = tempAllocator();
|
|
18969
|
-
const getQueryList = importExpr(Identifiers
|
|
18970
|
-
const refresh = importExpr(Identifiers
|
|
18822
|
+
const getQueryList = importExpr(Identifiers.loadQuery).callFn([]);
|
|
18823
|
+
const refresh = importExpr(Identifiers.queryRefresh).callFn([temporary.set(getQueryList)]);
|
|
18971
18824
|
const updateDirective = variable(CONTEXT_NAME)
|
|
18972
18825
|
.prop(query.propertyName)
|
|
18973
18826
|
.set(query.first ? temporary.prop('first') : temporary);
|
|
@@ -19049,7 +18902,7 @@ function createHostBindingsFunction(hostBindingsMetadata, typeSourceSpan, bindin
|
|
|
19049
18902
|
// of different security contexts. In this case we use special sanitization function and
|
|
19050
18903
|
// select the actual sanitizer at runtime based on a tag name that is provided while
|
|
19051
18904
|
// invoking sanitization function.
|
|
19052
|
-
sanitizerFn = importExpr(Identifiers
|
|
18905
|
+
sanitizerFn = importExpr(Identifiers.sanitizeUrlOrResourceUrl);
|
|
19053
18906
|
}
|
|
19054
18907
|
else {
|
|
19055
18908
|
sanitizerFn = resolveSanitizationFn(securityContexts[0], isAttribute);
|
|
@@ -19060,13 +18913,13 @@ function createHostBindingsFunction(hostBindingsMetadata, typeSourceSpan, bindin
|
|
|
19060
18913
|
instructionParams.push(sanitizerFn);
|
|
19061
18914
|
}
|
|
19062
18915
|
updateStatements.push(...bindingExpr.stmts);
|
|
19063
|
-
if (instruction === Identifiers
|
|
18916
|
+
if (instruction === Identifiers.hostProperty) {
|
|
19064
18917
|
propertyBindings.push(instructionParams);
|
|
19065
18918
|
}
|
|
19066
|
-
else if (instruction === Identifiers
|
|
18919
|
+
else if (instruction === Identifiers.attribute) {
|
|
19067
18920
|
attributeBindings.push(instructionParams);
|
|
19068
18921
|
}
|
|
19069
|
-
else if (instruction === Identifiers
|
|
18922
|
+
else if (instruction === Identifiers.syntheticHostProperty) {
|
|
19070
18923
|
syntheticHostBindings.push(instructionParams);
|
|
19071
18924
|
}
|
|
19072
18925
|
else {
|
|
@@ -19074,13 +18927,13 @@ function createHostBindingsFunction(hostBindingsMetadata, typeSourceSpan, bindin
|
|
|
19074
18927
|
}
|
|
19075
18928
|
});
|
|
19076
18929
|
if (propertyBindings.length > 0) {
|
|
19077
|
-
updateStatements.push(chainedInstruction(Identifiers
|
|
18930
|
+
updateStatements.push(chainedInstruction(Identifiers.hostProperty, propertyBindings).toStmt());
|
|
19078
18931
|
}
|
|
19079
18932
|
if (attributeBindings.length > 0) {
|
|
19080
|
-
updateStatements.push(chainedInstruction(Identifiers
|
|
18933
|
+
updateStatements.push(chainedInstruction(Identifiers.attribute, attributeBindings).toStmt());
|
|
19081
18934
|
}
|
|
19082
18935
|
if (syntheticHostBindings.length > 0) {
|
|
19083
|
-
updateStatements.push(chainedInstruction(Identifiers
|
|
18936
|
+
updateStatements.push(chainedInstruction(Identifiers.syntheticHostProperty, syntheticHostBindings).toStmt());
|
|
19084
18937
|
}
|
|
19085
18938
|
// since we're dealing with directives/components and both have hostBinding
|
|
19086
18939
|
// functions, we need to generate a special hostAttrs instruction that deals
|
|
@@ -19126,7 +18979,7 @@ function createHostBindingsFunction(hostBindingsMetadata, typeSourceSpan, bindin
|
|
|
19126
18979
|
return null;
|
|
19127
18980
|
}
|
|
19128
18981
|
function bindingFn(implicit, value) {
|
|
19129
|
-
return convertPropertyBinding(null, implicit, value, 'b'
|
|
18982
|
+
return convertPropertyBinding(null, implicit, value, 'b');
|
|
19130
18983
|
}
|
|
19131
18984
|
function convertStylingCall(call, bindingContext, bindingFn) {
|
|
19132
18985
|
return call.params(value => bindingFn(bindingContext, value).currValExpr);
|
|
@@ -19138,7 +18991,7 @@ function getBindingNameAndInstruction(binding) {
|
|
|
19138
18991
|
const attrMatches = bindingName.match(ATTR_REGEX);
|
|
19139
18992
|
if (attrMatches) {
|
|
19140
18993
|
bindingName = attrMatches[1];
|
|
19141
|
-
instruction = Identifiers
|
|
18994
|
+
instruction = Identifiers.attribute;
|
|
19142
18995
|
}
|
|
19143
18996
|
else {
|
|
19144
18997
|
if (binding.isAnimation) {
|
|
@@ -19146,10 +18999,10 @@ function getBindingNameAndInstruction(binding) {
|
|
|
19146
18999
|
// host bindings that have a synthetic property (e.g. @foo) should always be rendered
|
|
19147
19000
|
// in the context of the component and not the parent. Therefore there is a special
|
|
19148
19001
|
// compatibility instruction available for this purpose.
|
|
19149
|
-
instruction = Identifiers
|
|
19002
|
+
instruction = Identifiers.syntheticHostProperty;
|
|
19150
19003
|
}
|
|
19151
19004
|
else {
|
|
19152
|
-
instruction = Identifiers
|
|
19005
|
+
instruction = Identifiers.hostProperty;
|
|
19153
19006
|
}
|
|
19154
19007
|
}
|
|
19155
19008
|
return { bindingName, instruction, isAttribute: !!attrMatches };
|
|
@@ -19173,10 +19026,10 @@ function createHostListeners(eventBindings, name) {
|
|
|
19173
19026
|
}
|
|
19174
19027
|
});
|
|
19175
19028
|
if (syntheticListeners.length > 0) {
|
|
19176
|
-
instructions.push(chainedInstruction(Identifiers
|
|
19029
|
+
instructions.push(chainedInstruction(Identifiers.syntheticHostListener, syntheticListeners).toStmt());
|
|
19177
19030
|
}
|
|
19178
19031
|
if (listeners.length > 0) {
|
|
19179
|
-
instructions.push(chainedInstruction(Identifiers
|
|
19032
|
+
instructions.push(chainedInstruction(Identifiers.listener, listeners).toStmt());
|
|
19180
19033
|
}
|
|
19181
19034
|
return instructions;
|
|
19182
19035
|
}
|
|
@@ -19764,7 +19617,7 @@ function publishFacade(global) {
|
|
|
19764
19617
|
* Use of this source code is governed by an MIT-style license that can be
|
|
19765
19618
|
* found in the LICENSE file at https://angular.io/license
|
|
19766
19619
|
*/
|
|
19767
|
-
const VERSION = new Version('
|
|
19620
|
+
const VERSION = new Version('14.0.0-next.1');
|
|
19768
19621
|
|
|
19769
19622
|
/**
|
|
19770
19623
|
* @license
|
|
@@ -21777,7 +21630,7 @@ function extractTemplateEntities(rootScope) {
|
|
|
21777
21630
|
function compileClassMetadata(metadata) {
|
|
21778
21631
|
// Generate an ngDevMode guarded call to setClassMetadata with the class identifier and its
|
|
21779
21632
|
// metadata.
|
|
21780
|
-
const fnCall = importExpr(Identifiers
|
|
21633
|
+
const fnCall = importExpr(Identifiers.setClassMetadata).callFn([
|
|
21781
21634
|
metadata.type,
|
|
21782
21635
|
metadata.decorators,
|
|
21783
21636
|
metadata.ctorParameters ?? literal(null),
|
|
@@ -21805,13 +21658,13 @@ const MINIMUM_PARTIAL_LINKER_VERSION$6 = '12.0.0';
|
|
|
21805
21658
|
function compileDeclareClassMetadata(metadata) {
|
|
21806
21659
|
const definitionMap = new DefinitionMap();
|
|
21807
21660
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$6));
|
|
21808
|
-
definitionMap.set('version', literal('
|
|
21809
|
-
definitionMap.set('ngImport', importExpr(Identifiers
|
|
21661
|
+
definitionMap.set('version', literal('14.0.0-next.1'));
|
|
21662
|
+
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
21810
21663
|
definitionMap.set('type', metadata.type);
|
|
21811
21664
|
definitionMap.set('decorators', metadata.decorators);
|
|
21812
21665
|
definitionMap.set('ctorParameters', metadata.ctorParameters);
|
|
21813
21666
|
definitionMap.set('propDecorators', metadata.propDecorators);
|
|
21814
|
-
return importExpr(Identifiers
|
|
21667
|
+
return importExpr(Identifiers.declareClassMetadata).callFn([definitionMap.toLiteralMap()]);
|
|
21815
21668
|
}
|
|
21816
21669
|
|
|
21817
21670
|
/**
|
|
@@ -21911,7 +21764,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$5 = '12.0.0';
|
|
|
21911
21764
|
*/
|
|
21912
21765
|
function compileDeclareDirectiveFromMetadata(meta) {
|
|
21913
21766
|
const definitionMap = createDirectiveDefinitionMap(meta);
|
|
21914
|
-
const expression = importExpr(Identifiers
|
|
21767
|
+
const expression = importExpr(Identifiers.declareDirective).callFn([definitionMap.toLiteralMap()]);
|
|
21915
21768
|
const type = createDirectiveType(meta);
|
|
21916
21769
|
return { expression, type, statements: [] };
|
|
21917
21770
|
}
|
|
@@ -21922,7 +21775,7 @@ function compileDeclareDirectiveFromMetadata(meta) {
|
|
|
21922
21775
|
function createDirectiveDefinitionMap(meta) {
|
|
21923
21776
|
const definitionMap = new DefinitionMap();
|
|
21924
21777
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
|
|
21925
|
-
definitionMap.set('version', literal('
|
|
21778
|
+
definitionMap.set('version', literal('14.0.0-next.1'));
|
|
21926
21779
|
// e.g. `type: MyDirective`
|
|
21927
21780
|
definitionMap.set('type', meta.internalType);
|
|
21928
21781
|
// e.g. `selector: 'some-dir'`
|
|
@@ -21948,7 +21801,7 @@ function createDirectiveDefinitionMap(meta) {
|
|
|
21948
21801
|
if (meta.lifecycle.usesOnChanges) {
|
|
21949
21802
|
definitionMap.set('usesOnChanges', literal(true));
|
|
21950
21803
|
}
|
|
21951
|
-
definitionMap.set('ngImport', importExpr(Identifiers
|
|
21804
|
+
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
21952
21805
|
return definitionMap;
|
|
21953
21806
|
}
|
|
21954
21807
|
/**
|
|
@@ -22015,7 +21868,7 @@ function compileHostMetadata(meta) {
|
|
|
22015
21868
|
*/
|
|
22016
21869
|
function compileDeclareComponentFromMetadata(meta, template, additionalTemplateInfo) {
|
|
22017
21870
|
const definitionMap = createComponentDefinitionMap(meta, template, additionalTemplateInfo);
|
|
22018
|
-
const expression = importExpr(Identifiers
|
|
21871
|
+
const expression = importExpr(Identifiers.declareComponent).callFn([definitionMap.toLiteralMap()]);
|
|
22019
21872
|
const type = createComponentType(meta);
|
|
22020
21873
|
return { expression, type, statements: [] };
|
|
22021
21874
|
}
|
|
@@ -22035,11 +21888,11 @@ function createComponentDefinitionMap(meta, template, templateInfo) {
|
|
|
22035
21888
|
definitionMap.set('viewProviders', meta.viewProviders);
|
|
22036
21889
|
definitionMap.set('animations', meta.animations);
|
|
22037
21890
|
if (meta.changeDetection !== undefined) {
|
|
22038
|
-
definitionMap.set('changeDetection', importExpr(Identifiers
|
|
21891
|
+
definitionMap.set('changeDetection', importExpr(Identifiers.ChangeDetectionStrategy)
|
|
22039
21892
|
.prop(ChangeDetectionStrategy[meta.changeDetection]));
|
|
22040
21893
|
}
|
|
22041
21894
|
if (meta.encapsulation !== ViewEncapsulation.Emulated) {
|
|
22042
|
-
definitionMap.set('encapsulation', importExpr(Identifiers
|
|
21895
|
+
definitionMap.set('encapsulation', importExpr(Identifiers.ViewEncapsulation).prop(ViewEncapsulation[meta.encapsulation]));
|
|
22043
21896
|
}
|
|
22044
21897
|
if (meta.interpolation !== DEFAULT_INTERPOLATION_CONFIG) {
|
|
22045
21898
|
definitionMap.set('interpolation', literalArr([literal(meta.interpolation.start), literal(meta.interpolation.end)]));
|
|
@@ -22143,13 +21996,13 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
|
|
|
22143
21996
|
function compileDeclareFactoryFunction(meta) {
|
|
22144
21997
|
const definitionMap = new DefinitionMap();
|
|
22145
21998
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
|
|
22146
|
-
definitionMap.set('version', literal('
|
|
22147
|
-
definitionMap.set('ngImport', importExpr(Identifiers
|
|
21999
|
+
definitionMap.set('version', literal('14.0.0-next.1'));
|
|
22000
|
+
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22148
22001
|
definitionMap.set('type', meta.internalType);
|
|
22149
22002
|
definitionMap.set('deps', compileDependencies(meta.deps));
|
|
22150
|
-
definitionMap.set('target', importExpr(Identifiers
|
|
22003
|
+
definitionMap.set('target', importExpr(Identifiers.FactoryTarget).prop(FactoryTarget$1[meta.target]));
|
|
22151
22004
|
return {
|
|
22152
|
-
expression: importExpr(Identifiers
|
|
22005
|
+
expression: importExpr(Identifiers.declareFactory).callFn([definitionMap.toLiteralMap()]),
|
|
22153
22006
|
statements: [],
|
|
22154
22007
|
type: createFactoryType(meta),
|
|
22155
22008
|
};
|
|
@@ -22175,7 +22028,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$3 = '12.0.0';
|
|
|
22175
22028
|
*/
|
|
22176
22029
|
function compileDeclareInjectableFromMetadata(meta) {
|
|
22177
22030
|
const definitionMap = createInjectableDefinitionMap(meta);
|
|
22178
|
-
const expression = importExpr(Identifiers
|
|
22031
|
+
const expression = importExpr(Identifiers.declareInjectable).callFn([definitionMap.toLiteralMap()]);
|
|
22179
22032
|
const type = createInjectableType(meta);
|
|
22180
22033
|
return { expression, type, statements: [] };
|
|
22181
22034
|
}
|
|
@@ -22185,8 +22038,8 @@ function compileDeclareInjectableFromMetadata(meta) {
|
|
|
22185
22038
|
function createInjectableDefinitionMap(meta) {
|
|
22186
22039
|
const definitionMap = new DefinitionMap();
|
|
22187
22040
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
|
|
22188
|
-
definitionMap.set('version', literal('
|
|
22189
|
-
definitionMap.set('ngImport', importExpr(Identifiers
|
|
22041
|
+
definitionMap.set('version', literal('14.0.0-next.1'));
|
|
22042
|
+
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22190
22043
|
definitionMap.set('type', meta.internalType);
|
|
22191
22044
|
// Only generate providedIn property if it has a non-null value
|
|
22192
22045
|
if (meta.providedIn !== undefined) {
|
|
@@ -22233,7 +22086,7 @@ function createInjectableDefinitionMap(meta) {
|
|
|
22233
22086
|
const MINIMUM_PARTIAL_LINKER_VERSION$2 = '12.0.0';
|
|
22234
22087
|
function compileDeclareInjectorFromMetadata(meta) {
|
|
22235
22088
|
const definitionMap = createInjectorDefinitionMap(meta);
|
|
22236
|
-
const expression = importExpr(Identifiers
|
|
22089
|
+
const expression = importExpr(Identifiers.declareInjector).callFn([definitionMap.toLiteralMap()]);
|
|
22237
22090
|
const type = createInjectorType(meta);
|
|
22238
22091
|
return { expression, type, statements: [] };
|
|
22239
22092
|
}
|
|
@@ -22243,8 +22096,8 @@ function compileDeclareInjectorFromMetadata(meta) {
|
|
|
22243
22096
|
function createInjectorDefinitionMap(meta) {
|
|
22244
22097
|
const definitionMap = new DefinitionMap();
|
|
22245
22098
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
|
|
22246
|
-
definitionMap.set('version', literal('
|
|
22247
|
-
definitionMap.set('ngImport', importExpr(Identifiers
|
|
22099
|
+
definitionMap.set('version', literal('14.0.0-next.1'));
|
|
22100
|
+
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22248
22101
|
definitionMap.set('type', meta.internalType);
|
|
22249
22102
|
definitionMap.set('providers', meta.providers);
|
|
22250
22103
|
if (meta.imports.length > 0) {
|
|
@@ -22270,7 +22123,7 @@ function createInjectorDefinitionMap(meta) {
|
|
|
22270
22123
|
const MINIMUM_PARTIAL_LINKER_VERSION$1 = '12.0.0';
|
|
22271
22124
|
function compileDeclareNgModuleFromMetadata(meta) {
|
|
22272
22125
|
const definitionMap = createNgModuleDefinitionMap(meta);
|
|
22273
|
-
const expression = importExpr(Identifiers
|
|
22126
|
+
const expression = importExpr(Identifiers.declareNgModule).callFn([definitionMap.toLiteralMap()]);
|
|
22274
22127
|
const type = createNgModuleType(meta);
|
|
22275
22128
|
return { expression, type, statements: [] };
|
|
22276
22129
|
}
|
|
@@ -22280,8 +22133,8 @@ function compileDeclareNgModuleFromMetadata(meta) {
|
|
|
22280
22133
|
function createNgModuleDefinitionMap(meta) {
|
|
22281
22134
|
const definitionMap = new DefinitionMap();
|
|
22282
22135
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
|
|
22283
|
-
definitionMap.set('version', literal('
|
|
22284
|
-
definitionMap.set('ngImport', importExpr(Identifiers
|
|
22136
|
+
definitionMap.set('version', literal('14.0.0-next.1'));
|
|
22137
|
+
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22285
22138
|
definitionMap.set('type', meta.internalType);
|
|
22286
22139
|
// We only generate the keys in the metadata if the arrays contain values.
|
|
22287
22140
|
// We must wrap the arrays inside a function if any of the values are a forward reference to a
|
|
@@ -22328,7 +22181,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION = '12.0.0';
|
|
|
22328
22181
|
*/
|
|
22329
22182
|
function compileDeclarePipeFromMetadata(meta) {
|
|
22330
22183
|
const definitionMap = createPipeDefinitionMap(meta);
|
|
22331
|
-
const expression = importExpr(Identifiers
|
|
22184
|
+
const expression = importExpr(Identifiers.declarePipe).callFn([definitionMap.toLiteralMap()]);
|
|
22332
22185
|
const type = createPipeType(meta);
|
|
22333
22186
|
return { expression, type, statements: [] };
|
|
22334
22187
|
}
|
|
@@ -22338,8 +22191,8 @@ function compileDeclarePipeFromMetadata(meta) {
|
|
|
22338
22191
|
function createPipeDefinitionMap(meta) {
|
|
22339
22192
|
const definitionMap = new DefinitionMap();
|
|
22340
22193
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
22341
|
-
definitionMap.set('version', literal('
|
|
22342
|
-
definitionMap.set('ngImport', importExpr(Identifiers
|
|
22194
|
+
definitionMap.set('version', literal('14.0.0-next.1'));
|
|
22195
|
+
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22343
22196
|
// e.g. `type: MyPipe`
|
|
22344
22197
|
definitionMap.set('type', meta.internalType);
|
|
22345
22198
|
// e.g. `name: "myPipe"`
|
|
@@ -22388,5 +22241,5 @@ publishFacade(_global);
|
|
|
22388
22241
|
* found in the LICENSE file at https://angular.io/license
|
|
22389
22242
|
*/
|
|
22390
22243
|
|
|
22391
|
-
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,
|
|
22244
|
+
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 };
|
|
22392
22245
|
//# sourceMappingURL=compiler.mjs.map
|