@angular/core 14.2.0-next.1 → 15.0.0-next.0
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/compiler_facade_interface.mjs +1 -1
- package/esm2020/src/core_private_export.mjs +2 -2
- package/esm2020/src/core_render3_private_export.mjs +2 -2
- package/esm2020/src/linker/template_ref.mjs +1 -1
- package/esm2020/src/render3/definition.mjs +2 -1
- package/esm2020/src/render3/features/host_directives_feature.mjs +49 -0
- package/esm2020/src/render3/index.mjs +3 -2
- package/esm2020/src/render3/instructions/shared.mjs +2 -1
- package/esm2020/src/render3/interfaces/definition.mjs +1 -1
- package/esm2020/src/render3/interfaces/public_definitions.mjs +1 -1
- package/esm2020/src/render3/jit/directive.mjs +2 -1
- package/esm2020/src/render3/jit/environment.mjs +2 -1
- package/esm2020/src/sanitization/url_sanitizer.mjs +3 -7
- package/esm2020/src/testability/testability.mjs +1 -1
- package/esm2020/src/version.mjs +1 -1
- package/esm2020/testing/src/logger.mjs +3 -3
- package/esm2020/testing/src/ng_zone_mock.mjs +3 -3
- package/esm2020/testing/src/resolvers.mjs +1 -1
- package/fesm2015/core.mjs +58 -9
- package/fesm2015/core.mjs.map +1 -1
- package/fesm2015/testing.mjs +56 -8
- package/fesm2015/testing.mjs.map +1 -1
- package/fesm2020/core.mjs +57 -9
- package/fesm2020/core.mjs.map +1 -1
- package/fesm2020/testing.mjs +55 -8
- package/fesm2020/testing.mjs.map +1 -1
- package/index.d.ts +51 -5
- package/package.json +1 -1
- package/testing/index.d.ts +1 -1
package/fesm2020/testing.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular
|
|
2
|
+
* @license Angular v15.0.0-next.0
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -2568,6 +2568,7 @@ function ɵɵdefineComponent(componentDefinition) {
|
|
|
2568
2568
|
setInput: null,
|
|
2569
2569
|
schemas: componentDefinition.schemas || null,
|
|
2570
2570
|
tView: null,
|
|
2571
|
+
applyHostDirectives: null,
|
|
2571
2572
|
};
|
|
2572
2573
|
const dependencies = componentDefinition.dependencies;
|
|
2573
2574
|
const feature = componentDefinition.features;
|
|
@@ -6091,14 +6092,10 @@ function isDOMParserAvailable() {
|
|
|
6091
6092
|
*
|
|
6092
6093
|
* This regular expression was taken from the Closure sanitization library.
|
|
6093
6094
|
*/
|
|
6094
|
-
const SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi;
|
|
6095
|
-
/* A pattern that matches safe srcset values */
|
|
6096
|
-
const SAFE_SRCSET_PATTERN = /^(?:(?:https?|file):|[^&:/?#]*(?:[/?#]|$))/gi;
|
|
6097
|
-
/** A pattern that matches safe data URLs. Only matches image, video and audio types. */
|
|
6098
|
-
const DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\/]+=*$/i;
|
|
6095
|
+
const SAFE_URL_PATTERN = /^(?:(?:https?|mailto|data|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi;
|
|
6099
6096
|
function _sanitizeUrl(url) {
|
|
6100
6097
|
url = String(url);
|
|
6101
|
-
if (url.match(SAFE_URL_PATTERN)
|
|
6098
|
+
if (url.match(SAFE_URL_PATTERN))
|
|
6102
6099
|
return url;
|
|
6103
6100
|
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
6104
6101
|
console.warn(`WARNING: sanitizing unsafe URL value ${url} (see https://g.co/ng/security#xss)`);
|
|
@@ -7647,7 +7644,7 @@ class Version {
|
|
|
7647
7644
|
/**
|
|
7648
7645
|
* @publicApi
|
|
7649
7646
|
*/
|
|
7650
|
-
const VERSION = new Version('
|
|
7647
|
+
const VERSION = new Version('15.0.0-next.0');
|
|
7651
7648
|
|
|
7652
7649
|
/**
|
|
7653
7650
|
* @license
|
|
@@ -13126,6 +13123,7 @@ function findDirectiveDefMatches(tView, viewData, tNode) {
|
|
|
13126
13123
|
else {
|
|
13127
13124
|
matches.push(def);
|
|
13128
13125
|
}
|
|
13126
|
+
def.applyHostDirectives?.(tView, viewData, tNode, matches);
|
|
13129
13127
|
}
|
|
13130
13128
|
}
|
|
13131
13129
|
}
|
|
@@ -14665,6 +14663,54 @@ function ɵɵCopyDefinitionFeature(definition) {
|
|
|
14665
14663
|
}
|
|
14666
14664
|
}
|
|
14667
14665
|
|
|
14666
|
+
/**
|
|
14667
|
+
* This feature add the host directives behavior to a directive definition by patching a
|
|
14668
|
+
* function onto it. The expectation is that the runtime will invoke the function during
|
|
14669
|
+
* directive matching.
|
|
14670
|
+
*
|
|
14671
|
+
* For example:
|
|
14672
|
+
* ```ts
|
|
14673
|
+
* class ComponentWithHostDirective {
|
|
14674
|
+
* static ɵcmp = defineComponent({
|
|
14675
|
+
* type: ComponentWithHostDirective,
|
|
14676
|
+
* features: [ɵɵHostDirectivesFeature([
|
|
14677
|
+
* SimpleHostDirective,
|
|
14678
|
+
* {directive: AdvancedHostDirective, inputs: ['foo: alias'], outputs: ['bar']},
|
|
14679
|
+
* ])]
|
|
14680
|
+
* });
|
|
14681
|
+
* }
|
|
14682
|
+
* ```
|
|
14683
|
+
*
|
|
14684
|
+
* @codeGenApi
|
|
14685
|
+
*/
|
|
14686
|
+
function ɵɵHostDirectivesFeature(rawHostDirectives) {
|
|
14687
|
+
const unwrappedHostDirectives = Array.isArray(rawHostDirectives) ? rawHostDirectives : rawHostDirectives();
|
|
14688
|
+
const hostDirectives = unwrappedHostDirectives.map(dir => typeof dir === 'function' ? { directive: dir, inputs: EMPTY_OBJ, outputs: EMPTY_OBJ } : {
|
|
14689
|
+
directive: dir.directive,
|
|
14690
|
+
inputs: bindingArrayToMap(dir.inputs),
|
|
14691
|
+
outputs: bindingArrayToMap(dir.outputs)
|
|
14692
|
+
});
|
|
14693
|
+
return (definition) => {
|
|
14694
|
+
// TODO(crisbeto): implement host directive matching logic.
|
|
14695
|
+
definition.applyHostDirectives =
|
|
14696
|
+
(tView, viewData, tNode, matches) => { };
|
|
14697
|
+
};
|
|
14698
|
+
}
|
|
14699
|
+
/**
|
|
14700
|
+
* Converts an array in the form of `['publicName', 'alias', 'otherPublicName', 'otherAlias']` into
|
|
14701
|
+
* a map in the form of `{publicName: 'alias', otherPublicName: 'otherAlias'}`.
|
|
14702
|
+
*/
|
|
14703
|
+
function bindingArrayToMap(bindings) {
|
|
14704
|
+
if (!bindings || bindings.length === 0) {
|
|
14705
|
+
return EMPTY_OBJ;
|
|
14706
|
+
}
|
|
14707
|
+
const result = {};
|
|
14708
|
+
for (let i = 1; i < bindings.length; i += 2) {
|
|
14709
|
+
result[bindings[i - 1]] = bindings[i];
|
|
14710
|
+
}
|
|
14711
|
+
return result;
|
|
14712
|
+
}
|
|
14713
|
+
|
|
14668
14714
|
/**
|
|
14669
14715
|
* @license
|
|
14670
14716
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -24266,6 +24312,7 @@ const angularCoreEnv = (() => ({
|
|
|
24266
24312
|
'ɵɵinvalidFactoryDep': ɵɵinvalidFactoryDep,
|
|
24267
24313
|
'ɵɵtemplateRefExtractor': ɵɵtemplateRefExtractor,
|
|
24268
24314
|
'ɵɵresetView': ɵɵresetView,
|
|
24315
|
+
'ɵɵHostDirectivesFeature': ɵɵHostDirectivesFeature,
|
|
24269
24316
|
'ɵɵNgOnChangesFeature': ɵɵNgOnChangesFeature,
|
|
24270
24317
|
'ɵɵProvidersFeature': ɵɵProvidersFeature,
|
|
24271
24318
|
'ɵɵCopyDefinitionFeature': ɵɵCopyDefinitionFeature,
|