@angular/core 20.3.20 → 20.3.22
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/api.d.d.ts +1 -1
- package/chrome_dev_tools_performance.d.d.ts +1 -1
- package/discovery.d.d.ts +7 -2
- package/effect.d.d.ts +1 -1
- package/event_dispatcher.d.d.ts +1 -1
- package/fesm2022/attribute.mjs +1 -1
- package/fesm2022/core.mjs +1 -1
- package/fesm2022/debug_node.mjs +266 -60
- package/fesm2022/debug_node.mjs.map +1 -1
- package/fesm2022/effect.mjs +1 -1
- package/fesm2022/not_found.mjs +1 -1
- package/fesm2022/primitives/di.mjs +1 -1
- package/fesm2022/primitives/event-dispatch.mjs +1 -1
- package/fesm2022/primitives/signals.mjs +1 -1
- package/fesm2022/resource.mjs +1 -1
- package/fesm2022/root_effect_scheduler.mjs +2 -2
- package/fesm2022/root_effect_scheduler.mjs.map +1 -1
- package/fesm2022/rxjs-interop.mjs +1 -1
- package/fesm2022/signal.mjs +1 -1
- package/fesm2022/testing.mjs +1 -1
- package/fesm2022/weak_ref.mjs +1 -1
- package/formatter.d.d.ts +1 -1
- package/index.d.ts +1 -1
- package/package.json +2 -2
- package/primitives/di/index.d.ts +1 -1
- package/primitives/event-dispatch/index.d.ts +1 -1
- package/primitives/signals/index.d.ts +1 -1
- package/rxjs-interop/index.d.ts +1 -1
- package/schematics/bundles/add-bootstrap-context-to-server-main.cjs +5 -5
- package/schematics/bundles/{apply_import_manager-Clb1Y0Nb.cjs → apply_import_manager-PXAcrMhA.cjs} +3 -3
- package/schematics/bundles/cleanup-unused-imports.cjs +5 -5
- package/schematics/bundles/{compiler_host-AFZotBLM.cjs → compiler_host-Cko9gxwJ.cjs} +2 -2
- package/schematics/bundles/control-flow-migration.cjs +3 -3
- package/schematics/bundles/document-core.cjs +5 -5
- package/schematics/bundles/imports-CIX-JgAN.cjs +1 -1
- package/schematics/bundles/{index-CD4aCRVu.cjs → index-Cvub7R-2.cjs} +4 -4
- package/schematics/bundles/{index-kR-YjYku.cjs → index-DfqvcK_R.cjs} +12 -12
- package/schematics/bundles/inject-flags.cjs +5 -5
- package/schematics/bundles/inject-migration.cjs +3 -3
- package/schematics/bundles/leading_space-D9nQ8UQC.cjs +1 -1
- package/schematics/bundles/{migrate_ts_type_references-BgYfSnnL.cjs → migrate_ts_type_references-TafxKegc.cjs} +5 -5
- package/schematics/bundles/ng_decorators-B5HCqr20.cjs +1 -1
- package/schematics/bundles/nodes-B16H9JUd.cjs +1 -1
- package/schematics/bundles/output-migration.cjs +6 -6
- package/schematics/bundles/{project_paths-Bq_k0pof.cjs → project_paths-DnFzmfc7.cjs} +3 -3
- package/schematics/bundles/{project_tsconfig_paths-D2eb40pS.cjs → project_tsconfig_paths-DkhzVMGt.cjs} +278 -211
- package/schematics/bundles/property_name-BBwFuqMe.cjs +1 -1
- package/schematics/bundles/route-lazy-loading.cjs +3 -3
- package/schematics/bundles/router-current-navigation.cjs +4 -4
- package/schematics/bundles/self-closing-tags-migration.cjs +4 -4
- package/schematics/bundles/signal-input-migration.cjs +7 -7
- package/schematics/bundles/signal-queries-migration.cjs +7 -7
- package/schematics/bundles/signals.cjs +7 -7
- package/schematics/bundles/standalone-migration.cjs +4 -4
- package/schematics/bundles/symbol-VPWguRxr.cjs +1 -1
- package/schematics/bundles/test-bed-get.cjs +4 -4
- package/testing/index.d.ts +1 -1
- package/weak_ref.d.d.ts +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.3.
|
|
3
|
+
* @license Angular v20.3.22
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -438,6 +438,150 @@ class SelectorlessMatcher {
|
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
440
|
|
|
441
|
+
/**
|
|
442
|
+
* A SecurityContext marks a location that has dangerous security implications, e.g. a DOM property
|
|
443
|
+
* like `innerHTML` that could cause Cross Site Scripting (XSS) security bugs when improperly
|
|
444
|
+
* handled.
|
|
445
|
+
*
|
|
446
|
+
* See DomSanitizer for more details on security in Angular applications.
|
|
447
|
+
*
|
|
448
|
+
* @publicApi
|
|
449
|
+
*/
|
|
450
|
+
var SecurityContext;
|
|
451
|
+
(function (SecurityContext) {
|
|
452
|
+
SecurityContext[SecurityContext["NONE"] = 0] = "NONE";
|
|
453
|
+
SecurityContext[SecurityContext["HTML"] = 1] = "HTML";
|
|
454
|
+
SecurityContext[SecurityContext["STYLE"] = 2] = "STYLE";
|
|
455
|
+
SecurityContext[SecurityContext["SCRIPT"] = 3] = "SCRIPT";
|
|
456
|
+
SecurityContext[SecurityContext["URL"] = 4] = "URL";
|
|
457
|
+
SecurityContext[SecurityContext["RESOURCE_URL"] = 5] = "RESOURCE_URL";
|
|
458
|
+
SecurityContext[SecurityContext["ATTRIBUTE_NO_BINDING"] = 6] = "ATTRIBUTE_NO_BINDING";
|
|
459
|
+
})(SecurityContext || (SecurityContext = {}));
|
|
460
|
+
// =================================================================================================
|
|
461
|
+
// =================================================================================================
|
|
462
|
+
// =========== S T O P - S T O P - S T O P - S T O P - S T O P - S T O P ===========
|
|
463
|
+
// =================================================================================================
|
|
464
|
+
// =================================================================================================
|
|
465
|
+
//
|
|
466
|
+
// DO NOT EDIT THIS LIST OF SECURITY SENSITIVE PROPERTIES WITHOUT A SECURITY REVIEW!
|
|
467
|
+
//
|
|
468
|
+
// =================================================================================================
|
|
469
|
+
/**
|
|
470
|
+
* Map from tagName|propertyName to SecurityContext. Properties applying to all tags use '*'.
|
|
471
|
+
*/
|
|
472
|
+
let _SECURITY_SCHEMA;
|
|
473
|
+
const SVG_NAMESPACE$1 = 'svg';
|
|
474
|
+
const MATH_ML_NAMESPACE$1 = 'math';
|
|
475
|
+
/**
|
|
476
|
+
* @remarks Keep is a copy of DOM Security Schema.
|
|
477
|
+
* @see [SECURITY_SCHEMA](../../../compiler/src/schema/dom_security_schema.ts)
|
|
478
|
+
*/
|
|
479
|
+
function SECURITY_SCHEMA() {
|
|
480
|
+
if (!_SECURITY_SCHEMA) {
|
|
481
|
+
_SECURITY_SCHEMA = {};
|
|
482
|
+
// Case is insignificant below, all element and attribute names are lower-cased for lookup.
|
|
483
|
+
registerContext(SecurityContext.HTML, /** Namespace */ undefined, [
|
|
484
|
+
['iframe', ['srcdoc']],
|
|
485
|
+
['*', ['innerHTML', 'outerHTML']],
|
|
486
|
+
]);
|
|
487
|
+
registerContext(SecurityContext.STYLE, /** Namespace */ undefined, [['*', ['style']]]);
|
|
488
|
+
// NB: no SCRIPT contexts here, they are never allowed due to the parser stripping them.
|
|
489
|
+
registerContext(SecurityContext.URL, /** Namespace */ undefined, [
|
|
490
|
+
['*', ['formAction']],
|
|
491
|
+
['area', ['href']],
|
|
492
|
+
['a', ['href', 'xlink:href']],
|
|
493
|
+
['form', ['action']],
|
|
494
|
+
// The below two items are safe and should be removed but they require a G3 clean-up as a small number of tests fail.
|
|
495
|
+
['img', ['src']],
|
|
496
|
+
['video', ['src']],
|
|
497
|
+
]);
|
|
498
|
+
registerContext(SecurityContext.URL, MATH_ML_NAMESPACE$1, [
|
|
499
|
+
// MathML namespace
|
|
500
|
+
// https://crsrc.org/c/third_party/blink/renderer/core/sanitizer/sanitizer.cc;l=753-768;drc=b3eb16372dcd3317d65e9e0265015e322494edcd;bpv=1;bpt=1
|
|
501
|
+
['annotation', ['href', 'xlink:href']],
|
|
502
|
+
['annotation-xml', ['href', 'xlink:href']],
|
|
503
|
+
['maction', ['href', 'xlink:href']],
|
|
504
|
+
['malignmark', ['href', 'xlink:href']],
|
|
505
|
+
['math', ['href', 'xlink:href']],
|
|
506
|
+
['mroot', ['href', 'xlink:href']],
|
|
507
|
+
['msqrt', ['href', 'xlink:href']],
|
|
508
|
+
['merror', ['href', 'xlink:href']],
|
|
509
|
+
['mfrac', ['href', 'xlink:href']],
|
|
510
|
+
['mglyph', ['href', 'xlink:href']],
|
|
511
|
+
['msub', ['href', 'xlink:href']],
|
|
512
|
+
['msup', ['href', 'xlink:href']],
|
|
513
|
+
['msubsup', ['href', 'xlink:href']],
|
|
514
|
+
['mmultiscripts', ['href', 'xlink:href']],
|
|
515
|
+
['mprescripts', ['href', 'xlink:href']],
|
|
516
|
+
['mi', ['href', 'xlink:href']],
|
|
517
|
+
['mn', ['href', 'xlink:href']],
|
|
518
|
+
['mo', ['href', 'xlink:href']],
|
|
519
|
+
['mpadded', ['href', 'xlink:href']],
|
|
520
|
+
['mphantom', ['href', 'xlink:href']],
|
|
521
|
+
['mrow', ['href', 'xlink:href']],
|
|
522
|
+
['ms', ['href', 'xlink:href']],
|
|
523
|
+
['mspace', ['href', 'xlink:href']],
|
|
524
|
+
['mstyle', ['href', 'xlink:href']],
|
|
525
|
+
['mtable', ['href', 'xlink:href']],
|
|
526
|
+
['mtd', ['href', 'xlink:href']],
|
|
527
|
+
['mtr', ['href', 'xlink:href']],
|
|
528
|
+
['mtext', ['href', 'xlink:href']],
|
|
529
|
+
['mover', ['href', 'xlink:href']],
|
|
530
|
+
['munder', ['href', 'xlink:href']],
|
|
531
|
+
['munderover', ['href', 'xlink:href']],
|
|
532
|
+
['semantics', ['href', 'xlink:href']],
|
|
533
|
+
['none', ['href', 'xlink:href']],
|
|
534
|
+
]);
|
|
535
|
+
registerContext(SecurityContext.RESOURCE_URL, /** Namespace */ undefined, [
|
|
536
|
+
['base', ['href']],
|
|
537
|
+
['embed', ['src']],
|
|
538
|
+
['frame', ['src']],
|
|
539
|
+
['iframe', ['src']],
|
|
540
|
+
['link', ['href']],
|
|
541
|
+
['object', ['codebase', 'data']],
|
|
542
|
+
]);
|
|
543
|
+
registerContext(SecurityContext.URL, SVG_NAMESPACE$1, [['a', ['href', 'xlink:href']]]);
|
|
544
|
+
// Keep this in sync with SECURITY_SENSITIVE_ELEMENTS in packages/core/src/sanitization/sanitization.ts
|
|
545
|
+
// Unknown is the internal tag name for unknown elements example used for host-bindings.
|
|
546
|
+
// These are unsafe as `attributeName` can be `href` or `xlink:href`
|
|
547
|
+
// See: http://b/463880509#comment7
|
|
548
|
+
registerContext(SecurityContext.ATTRIBUTE_NO_BINDING, SVG_NAMESPACE$1, [
|
|
549
|
+
['animate', ['attributeName', 'values', 'to', 'from']],
|
|
550
|
+
['set', ['to', 'attributeName']],
|
|
551
|
+
['animateMotion', ['attributeName']],
|
|
552
|
+
['animateTransform', ['attributeName']],
|
|
553
|
+
]);
|
|
554
|
+
registerContext(SecurityContext.ATTRIBUTE_NO_BINDING, /** Namespace */ undefined, [
|
|
555
|
+
[
|
|
556
|
+
'unknown',
|
|
557
|
+
[
|
|
558
|
+
'attributeName',
|
|
559
|
+
'values',
|
|
560
|
+
'to',
|
|
561
|
+
'from',
|
|
562
|
+
'sandbox',
|
|
563
|
+
'allow',
|
|
564
|
+
'allowFullscreen',
|
|
565
|
+
'referrerPolicy',
|
|
566
|
+
'csp',
|
|
567
|
+
'fetchPriority',
|
|
568
|
+
],
|
|
569
|
+
],
|
|
570
|
+
['iframe', ['sandbox', 'allow', 'allowFullscreen', 'referrerPolicy', 'csp', 'fetchPriority']],
|
|
571
|
+
]);
|
|
572
|
+
}
|
|
573
|
+
return _SECURITY_SCHEMA;
|
|
574
|
+
}
|
|
575
|
+
function registerContext(ctx, namespace, specs) {
|
|
576
|
+
for (const [element, attributeNames] of specs) {
|
|
577
|
+
let tagName = namespace && element !== '*' && element !== 'unknown' ? `:${namespace}:${element}` : element;
|
|
578
|
+
tagName = tagName.toLowerCase();
|
|
579
|
+
for (const attr of attributeNames) {
|
|
580
|
+
_SECURITY_SCHEMA[`${tagName}|${attr.toLowerCase()}`] = ctx;
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
|
|
441
585
|
// Attention:
|
|
442
586
|
// This file duplicates types and values from @angular/core
|
|
443
587
|
// so that we are able to make @angular/compiler independent of @angular/core.
|
|
@@ -471,16 +615,6 @@ const CUSTOM_ELEMENTS_SCHEMA = {
|
|
|
471
615
|
const NO_ERRORS_SCHEMA = {
|
|
472
616
|
name: 'no-errors-schema',
|
|
473
617
|
};
|
|
474
|
-
var SecurityContext;
|
|
475
|
-
(function (SecurityContext) {
|
|
476
|
-
SecurityContext[SecurityContext["NONE"] = 0] = "NONE";
|
|
477
|
-
SecurityContext[SecurityContext["HTML"] = 1] = "HTML";
|
|
478
|
-
SecurityContext[SecurityContext["STYLE"] = 2] = "STYLE";
|
|
479
|
-
SecurityContext[SecurityContext["SCRIPT"] = 3] = "SCRIPT";
|
|
480
|
-
SecurityContext[SecurityContext["URL"] = 4] = "URL";
|
|
481
|
-
SecurityContext[SecurityContext["RESOURCE_URL"] = 5] = "RESOURCE_URL";
|
|
482
|
-
SecurityContext[SecurityContext["ATTRIBUTE_NO_BINDING"] = 6] = "ATTRIBUTE_NO_BINDING";
|
|
483
|
-
})(SecurityContext || (SecurityContext = {}));
|
|
484
618
|
var MissingTranslationStrategy;
|
|
485
619
|
(function (MissingTranslationStrategy) {
|
|
486
620
|
MissingTranslationStrategy[MissingTranslationStrategy["Error"] = 0] = "Error";
|
|
@@ -12195,10 +12329,7 @@ class ElementAttributes {
|
|
|
12195
12329
|
if (value === null) {
|
|
12196
12330
|
throw Error('Attribute, i18n attribute, & style element attributes must have a value');
|
|
12197
12331
|
}
|
|
12198
|
-
if (trustedValueFn !== null) {
|
|
12199
|
-
if (!isStringLiteral(value)) {
|
|
12200
|
-
throw Error('AssertionError: extracted attribute value should be string literal');
|
|
12201
|
-
}
|
|
12332
|
+
if (trustedValueFn !== null && isStringLiteral(value)) {
|
|
12202
12333
|
array.push(taggedTemplate(trustedValueFn, new TemplateLiteralExpr([new TemplateLiteralElementExpr(value.value)], []), undefined, value.sourceSpan));
|
|
12203
12334
|
}
|
|
12204
12335
|
else {
|
|
@@ -20210,162 +20341,8 @@ function interleave(left, right) {
|
|
|
20210
20341
|
return result;
|
|
20211
20342
|
}
|
|
20212
20343
|
|
|
20213
|
-
|
|
20214
|
-
|
|
20215
|
-
// =========== S T O P - S T O P - S T O P - S T O P - S T O P - S T O P ===========
|
|
20216
|
-
// =================================================================================================
|
|
20217
|
-
// =================================================================================================
|
|
20218
|
-
//
|
|
20219
|
-
// DO NOT EDIT THIS LIST OF SECURITY SENSITIVE PROPERTIES WITHOUT A SECURITY REVIEW!
|
|
20220
|
-
//
|
|
20221
|
-
// =================================================================================================
|
|
20222
|
-
/** Map from tagName|propertyName to SecurityContext. Properties applying to all tags use '*'. */
|
|
20223
|
-
let _SECURITY_SCHEMA;
|
|
20224
|
-
function SECURITY_SCHEMA() {
|
|
20225
|
-
if (!_SECURITY_SCHEMA) {
|
|
20226
|
-
_SECURITY_SCHEMA = {};
|
|
20227
|
-
// Case is insignificant below, all element and attribute names are lower-cased for lookup.
|
|
20228
|
-
registerContext(SecurityContext.HTML, ['iframe|srcdoc', '*|innerHTML', '*|outerHTML']);
|
|
20229
|
-
registerContext(SecurityContext.STYLE, ['*|style']);
|
|
20230
|
-
// NB: no SCRIPT contexts here, they are never allowed due to the parser stripping them.
|
|
20231
|
-
registerContext(SecurityContext.URL, [
|
|
20232
|
-
'*|formAction',
|
|
20233
|
-
'area|href',
|
|
20234
|
-
'area|ping',
|
|
20235
|
-
'audio|src',
|
|
20236
|
-
'a|href',
|
|
20237
|
-
'a|xlink:href',
|
|
20238
|
-
'a|ping',
|
|
20239
|
-
'blockquote|cite',
|
|
20240
|
-
'body|background',
|
|
20241
|
-
'del|cite',
|
|
20242
|
-
'form|action',
|
|
20243
|
-
'img|src',
|
|
20244
|
-
'input|src',
|
|
20245
|
-
'ins|cite',
|
|
20246
|
-
'q|cite',
|
|
20247
|
-
'source|src',
|
|
20248
|
-
'track|src',
|
|
20249
|
-
'video|poster',
|
|
20250
|
-
'video|src',
|
|
20251
|
-
// MathML namespace
|
|
20252
|
-
// https://crsrc.org/c/third_party/blink/renderer/core/sanitizer/sanitizer.cc;l=753-768;drc=b3eb16372dcd3317d65e9e0265015e322494edcd;bpv=1;bpt=1
|
|
20253
|
-
'annotation|href',
|
|
20254
|
-
'annotation|xlink:href',
|
|
20255
|
-
'annotation-xml|href',
|
|
20256
|
-
'annotation-xml|xlink:href',
|
|
20257
|
-
'maction|href',
|
|
20258
|
-
'maction|xlink:href',
|
|
20259
|
-
'malignmark|href',
|
|
20260
|
-
'malignmark|xlink:href',
|
|
20261
|
-
'math|href',
|
|
20262
|
-
'math|xlink:href',
|
|
20263
|
-
'mroot|href',
|
|
20264
|
-
'mroot|xlink:href',
|
|
20265
|
-
'msqrt|href',
|
|
20266
|
-
'msqrt|xlink:href',
|
|
20267
|
-
'merror|href',
|
|
20268
|
-
'merror|xlink:href',
|
|
20269
|
-
'mfrac|href',
|
|
20270
|
-
'mfrac|xlink:href',
|
|
20271
|
-
'mglyph|href',
|
|
20272
|
-
'mglyph|xlink:href',
|
|
20273
|
-
'msub|href',
|
|
20274
|
-
'msub|xlink:href',
|
|
20275
|
-
'msup|href',
|
|
20276
|
-
'msup|xlink:href',
|
|
20277
|
-
'msubsup|href',
|
|
20278
|
-
'msubsup|xlink:href',
|
|
20279
|
-
'mmultiscripts|href',
|
|
20280
|
-
'mmultiscripts|xlink:href',
|
|
20281
|
-
'mprescripts|href',
|
|
20282
|
-
'mprescripts|xlink:href',
|
|
20283
|
-
'mi|href',
|
|
20284
|
-
'mi|xlink:href',
|
|
20285
|
-
'mn|href',
|
|
20286
|
-
'mn|xlink:href',
|
|
20287
|
-
'mo|href',
|
|
20288
|
-
'mo|xlink:href',
|
|
20289
|
-
'mpadded|href',
|
|
20290
|
-
'mpadded|xlink:href',
|
|
20291
|
-
'mphantom|href',
|
|
20292
|
-
'mphantom|xlink:href',
|
|
20293
|
-
'mrow|href',
|
|
20294
|
-
'mrow|xlink:href',
|
|
20295
|
-
'ms|href',
|
|
20296
|
-
'ms|xlink:href',
|
|
20297
|
-
'mspace|href',
|
|
20298
|
-
'mspace|xlink:href',
|
|
20299
|
-
'mstyle|href',
|
|
20300
|
-
'mstyle|xlink:href',
|
|
20301
|
-
'mtable|href',
|
|
20302
|
-
'mtable|xlink:href',
|
|
20303
|
-
'mtd|href',
|
|
20304
|
-
'mtd|xlink:href',
|
|
20305
|
-
'mtr|href',
|
|
20306
|
-
'mtr|xlink:href',
|
|
20307
|
-
'mtext|href',
|
|
20308
|
-
'mtext|xlink:href',
|
|
20309
|
-
'mover|href',
|
|
20310
|
-
'mover|xlink:href',
|
|
20311
|
-
'munder|href',
|
|
20312
|
-
'munder|xlink:href',
|
|
20313
|
-
'munderover|href',
|
|
20314
|
-
'munderover|xlink:href',
|
|
20315
|
-
'semantics|href',
|
|
20316
|
-
'semantics|xlink:href',
|
|
20317
|
-
'none|href',
|
|
20318
|
-
'none|xlink:href',
|
|
20319
|
-
]);
|
|
20320
|
-
registerContext(SecurityContext.RESOURCE_URL, [
|
|
20321
|
-
'applet|code',
|
|
20322
|
-
'applet|codebase',
|
|
20323
|
-
'base|href',
|
|
20324
|
-
'embed|src',
|
|
20325
|
-
'frame|src',
|
|
20326
|
-
'head|profile',
|
|
20327
|
-
'html|manifest',
|
|
20328
|
-
'iframe|src',
|
|
20329
|
-
'link|href',
|
|
20330
|
-
'media|src',
|
|
20331
|
-
'object|codebase',
|
|
20332
|
-
'object|data',
|
|
20333
|
-
'script|src',
|
|
20334
|
-
// The below two are for Script SVG
|
|
20335
|
-
// See: https://developer.mozilla.org/en-US/docs/Web/API/SVGScriptElement/href
|
|
20336
|
-
'script|href',
|
|
20337
|
-
'script|xlink:href',
|
|
20338
|
-
]);
|
|
20339
|
-
// Keep this in sync with SECURITY_SENSITIVE_ELEMENTS in packages/core/src/sanitization/sanitization.ts
|
|
20340
|
-
// Unknown is the internal tag name for unknown elements example used for host-bindings.
|
|
20341
|
-
// These are unsafe as `attributeName` can be `href` or `xlink:href`
|
|
20342
|
-
// See: http://b/463880509#comment7
|
|
20343
|
-
registerContext(SecurityContext.ATTRIBUTE_NO_BINDING, [
|
|
20344
|
-
'animate|attributeName',
|
|
20345
|
-
'set|attributeName',
|
|
20346
|
-
'animateMotion|attributeName',
|
|
20347
|
-
'animateTransform|attributeName',
|
|
20348
|
-
'unknown|attributeName',
|
|
20349
|
-
'iframe|sandbox',
|
|
20350
|
-
'iframe|allow',
|
|
20351
|
-
'iframe|allowFullscreen',
|
|
20352
|
-
'iframe|referrerPolicy',
|
|
20353
|
-
'iframe|csp',
|
|
20354
|
-
'iframe|fetchPriority',
|
|
20355
|
-
'unknown|sandbox',
|
|
20356
|
-
'unknown|allow',
|
|
20357
|
-
'unknown|allowFullscreen',
|
|
20358
|
-
'unknown|referrerPolicy',
|
|
20359
|
-
'unknown|csp',
|
|
20360
|
-
'unknown|fetchPriority',
|
|
20361
|
-
]);
|
|
20362
|
-
}
|
|
20363
|
-
return _SECURITY_SCHEMA;
|
|
20364
|
-
}
|
|
20365
|
-
function registerContext(ctx, specs) {
|
|
20366
|
-
for (const spec of specs)
|
|
20367
|
-
_SECURITY_SCHEMA[spec.toLowerCase()] = ctx;
|
|
20368
|
-
}
|
|
20344
|
+
const SVG_NAMESPACE = 'svg';
|
|
20345
|
+
const MATH_ML_NAMESPACE = 'math';
|
|
20369
20346
|
|
|
20370
20347
|
class ElementSchemaRegistry {
|
|
20371
20348
|
}
|
|
@@ -20374,6 +20351,11 @@ const BOOLEAN = 'boolean';
|
|
|
20374
20351
|
const NUMBER = 'number';
|
|
20375
20352
|
const STRING = 'string';
|
|
20376
20353
|
const OBJECT = 'object';
|
|
20354
|
+
function normalizeTagName(tagName) {
|
|
20355
|
+
const tagNameLower = tagName.toLowerCase();
|
|
20356
|
+
const [ns, name] = splitNsName(tagNameLower, false);
|
|
20357
|
+
return ns === SVG_NAMESPACE || ns === MATH_ML_NAMESPACE ? `:${ns}:${name}` : name;
|
|
20358
|
+
}
|
|
20377
20359
|
/**
|
|
20378
20360
|
* This array represents the DOM schema. It encodes inheritance, properties, and events.
|
|
20379
20361
|
*
|
|
@@ -20719,8 +20701,9 @@ class DomElementSchemaRegistry extends ElementSchemaRegistry {
|
|
|
20719
20701
|
if (schemaMetas.some((schema) => schema.name === NO_ERRORS_SCHEMA.name)) {
|
|
20720
20702
|
return true;
|
|
20721
20703
|
}
|
|
20722
|
-
|
|
20723
|
-
|
|
20704
|
+
const normalizedTag = normalizeTagName(tagName);
|
|
20705
|
+
if (normalizedTag.includes('-')) {
|
|
20706
|
+
if (isNgContainer(normalizedTag) || isNgContent(normalizedTag)) {
|
|
20724
20707
|
return false;
|
|
20725
20708
|
}
|
|
20726
20709
|
if (schemaMetas.some((schema) => schema.name === CUSTOM_ELEMENTS_SCHEMA.name)) {
|
|
@@ -20729,15 +20712,16 @@ class DomElementSchemaRegistry extends ElementSchemaRegistry {
|
|
|
20729
20712
|
return true;
|
|
20730
20713
|
}
|
|
20731
20714
|
}
|
|
20732
|
-
const elementProperties = this._schema.get(
|
|
20715
|
+
const elementProperties = this._schema.get(normalizedTag) || this._schema.get('unknown');
|
|
20733
20716
|
return elementProperties.has(propName);
|
|
20734
20717
|
}
|
|
20735
20718
|
hasElement(tagName, schemaMetas) {
|
|
20736
20719
|
if (schemaMetas.some((schema) => schema.name === NO_ERRORS_SCHEMA.name)) {
|
|
20737
20720
|
return true;
|
|
20738
20721
|
}
|
|
20739
|
-
|
|
20740
|
-
|
|
20722
|
+
const normalizedTag = normalizeTagName(tagName);
|
|
20723
|
+
if (normalizedTag.includes('-')) {
|
|
20724
|
+
if (isNgContainer(normalizedTag) || isNgContent(normalizedTag)) {
|
|
20741
20725
|
return true;
|
|
20742
20726
|
}
|
|
20743
20727
|
if (schemaMetas.some((schema) => schema.name === CUSTOM_ELEMENTS_SCHEMA.name)) {
|
|
@@ -20745,7 +20729,7 @@ class DomElementSchemaRegistry extends ElementSchemaRegistry {
|
|
|
20745
20729
|
return true;
|
|
20746
20730
|
}
|
|
20747
20731
|
}
|
|
20748
|
-
return this._schema.has(
|
|
20732
|
+
return this._schema.has(normalizedTag);
|
|
20749
20733
|
}
|
|
20750
20734
|
/**
|
|
20751
20735
|
* securityContext returns the security context for the given property on the given DOM tag.
|
|
@@ -20762,16 +20746,13 @@ class DomElementSchemaRegistry extends ElementSchemaRegistry {
|
|
|
20762
20746
|
// NB: For security purposes, use the mapped property name, not the attribute name.
|
|
20763
20747
|
propName = this.getMappedPropName(propName);
|
|
20764
20748
|
}
|
|
20765
|
-
|
|
20766
|
-
// property names do not have a security impact.
|
|
20767
|
-
tagName = tagName.toLowerCase();
|
|
20749
|
+
const normalizedTag = normalizeTagName(tagName);
|
|
20768
20750
|
propName = propName.toLowerCase();
|
|
20769
|
-
|
|
20770
|
-
|
|
20771
|
-
|
|
20772
|
-
|
|
20773
|
-
ctx
|
|
20774
|
-
return ctx ? ctx : SecurityContext.NONE;
|
|
20751
|
+
const securitySchema = SECURITY_SCHEMA();
|
|
20752
|
+
const ctx = securitySchema[normalizedTag + '|' + propName] ??
|
|
20753
|
+
securitySchema['*|' + propName] ??
|
|
20754
|
+
SecurityContext.NONE;
|
|
20755
|
+
return ctx;
|
|
20775
20756
|
}
|
|
20776
20757
|
getMappedPropName(propName) {
|
|
20777
20758
|
return _ATTR_TO_PROP.get(propName) ?? propName;
|
|
@@ -20805,12 +20786,14 @@ class DomElementSchemaRegistry extends ElementSchemaRegistry {
|
|
|
20805
20786
|
return Array.from(this._schema.keys());
|
|
20806
20787
|
}
|
|
20807
20788
|
allKnownAttributesOfElement(tagName) {
|
|
20808
|
-
const
|
|
20789
|
+
const normalizedTag = normalizeTagName(tagName);
|
|
20790
|
+
const elementProperties = this._schema.get(normalizedTag) || this._schema.get('unknown');
|
|
20809
20791
|
// Convert properties to attributes.
|
|
20810
20792
|
return Array.from(elementProperties.keys()).map((prop) => _PROP_TO_ATTR.get(prop) ?? prop);
|
|
20811
20793
|
}
|
|
20812
20794
|
allKnownEventsOfElement(tagName) {
|
|
20813
|
-
|
|
20795
|
+
const normalizedTag = normalizeTagName(tagName);
|
|
20796
|
+
return Array.from(this._eventSchema.get(normalizedTag) ?? []);
|
|
20814
20797
|
}
|
|
20815
20798
|
normalizeAnimationStyleProperty(propName) {
|
|
20816
20799
|
return dashCaseToCamelCase(propName);
|
|
@@ -25015,6 +24998,61 @@ function updatePlaceholder(op, value, i18nContexts, icuPlaceholders) {
|
|
|
25015
24998
|
}
|
|
25016
24999
|
}
|
|
25017
25000
|
|
|
25001
|
+
/**
|
|
25002
|
+
* Wraps static i18n extracted attributes in their corresponding sanitizers/validators.
|
|
25003
|
+
*/
|
|
25004
|
+
function resolveI18nAttrSanitizers(job) {
|
|
25005
|
+
const tagNamesByElement = new Map();
|
|
25006
|
+
for (const unit of job.units) {
|
|
25007
|
+
for (const op of unit.ops()) {
|
|
25008
|
+
if (op.kind === OpKind.ElementStart || op.kind === OpKind.Template) {
|
|
25009
|
+
let tag = op.tag ?? '';
|
|
25010
|
+
switch (op.namespace) {
|
|
25011
|
+
case Namespace.SVG:
|
|
25012
|
+
tag = `:${SVG_NAMESPACE}:${tag}`;
|
|
25013
|
+
break;
|
|
25014
|
+
case Namespace.Math:
|
|
25015
|
+
tag = `:${MATH_ML_NAMESPACE}:${tag}`;
|
|
25016
|
+
break;
|
|
25017
|
+
}
|
|
25018
|
+
tagNamesByElement.set(op.xref, tag);
|
|
25019
|
+
}
|
|
25020
|
+
}
|
|
25021
|
+
}
|
|
25022
|
+
for (const unit of job.units) {
|
|
25023
|
+
for (const op of unit.create) {
|
|
25024
|
+
if (op.kind === OpKind.ExtractedAttribute &&
|
|
25025
|
+
op.i18nContext !== null &&
|
|
25026
|
+
op.expression !== null) {
|
|
25027
|
+
const tagName = tagNamesByElement.get(op.target) ?? '';
|
|
25028
|
+
let expr = op.expression;
|
|
25029
|
+
switch (op.securityContext) {
|
|
25030
|
+
case SecurityContext.HTML:
|
|
25031
|
+
expr = importExpr(Identifiers.sanitizeHtml).callFn([expr]);
|
|
25032
|
+
break;
|
|
25033
|
+
case SecurityContext.STYLE:
|
|
25034
|
+
expr = importExpr(Identifiers.sanitizeStyle).callFn([expr]);
|
|
25035
|
+
break;
|
|
25036
|
+
case SecurityContext.SCRIPT:
|
|
25037
|
+
expr = importExpr(Identifiers.sanitizeScript).callFn([expr]);
|
|
25038
|
+
break;
|
|
25039
|
+
case SecurityContext.URL:
|
|
25040
|
+
expr = importExpr(Identifiers.sanitizeUrl).callFn([expr]);
|
|
25041
|
+
break;
|
|
25042
|
+
case SecurityContext.RESOURCE_URL:
|
|
25043
|
+
expr = importExpr(Identifiers.sanitizeResourceUrl).callFn([expr]);
|
|
25044
|
+
break;
|
|
25045
|
+
case SecurityContext.ATTRIBUTE_NO_BINDING:
|
|
25046
|
+
expr = importExpr(Identifiers.validateAttribute)
|
|
25047
|
+
.callFn([expr, literal(tagName), literal(op.name)]);
|
|
25048
|
+
break;
|
|
25049
|
+
}
|
|
25050
|
+
op.expression = expr;
|
|
25051
|
+
}
|
|
25052
|
+
}
|
|
25053
|
+
}
|
|
25054
|
+
}
|
|
25055
|
+
|
|
25018
25056
|
/**
|
|
25019
25057
|
* Resolves lexical references in views (`ir.LexicalReadExpr`) to either a target variable or to
|
|
25020
25058
|
* property reads on the top-level component context.
|
|
@@ -26414,6 +26452,7 @@ const phases = [
|
|
|
26414
26452
|
{ kind: CompilationJobKind.Tmpl, fn: resolveI18nExpressionPlaceholders },
|
|
26415
26453
|
{ kind: CompilationJobKind.Tmpl, fn: extractI18nMessages },
|
|
26416
26454
|
{ kind: CompilationJobKind.Tmpl, fn: collectI18nConsts },
|
|
26455
|
+
{ kind: CompilationJobKind.Tmpl, fn: resolveI18nAttrSanitizers },
|
|
26417
26456
|
{ kind: CompilationJobKind.Tmpl, fn: collectConstExpressions },
|
|
26418
26457
|
{ kind: CompilationJobKind.Both, fn: collectElementConsts },
|
|
26419
26458
|
{ kind: CompilationJobKind.Tmpl, fn: removeI18nContexts },
|
|
@@ -27284,7 +27323,19 @@ function ingestElementBindings(unit, op, element) {
|
|
|
27284
27323
|
let i18nAttributeBindingNames = new Set();
|
|
27285
27324
|
for (const attr of element.attributes) {
|
|
27286
27325
|
// Attribute literal bindings, such as `attr.foo="bar"`.
|
|
27287
|
-
const
|
|
27326
|
+
const [ns, elementName] = splitNsName(element.name);
|
|
27327
|
+
let namespace = ns;
|
|
27328
|
+
if (!ns) {
|
|
27329
|
+
switch (op.namespace) {
|
|
27330
|
+
case Namespace.SVG:
|
|
27331
|
+
namespace = SVG_NAMESPACE;
|
|
27332
|
+
break;
|
|
27333
|
+
case Namespace.Math:
|
|
27334
|
+
namespace = MATH_ML_NAMESPACE;
|
|
27335
|
+
break;
|
|
27336
|
+
}
|
|
27337
|
+
}
|
|
27338
|
+
const securityContext = domSchema.securityContext(namespace ? `:${namespace}:${elementName}` : elementName, attr.name, true);
|
|
27288
27339
|
bindings.push(createBindingOp(op.xref, BindingKind.Attribute, attr.name, convertAstWithInterpolation(unit.job, attr.value, attr.i18n), null, securityContext, true, false, null, asMessage(attr.i18n), attr.sourceSpan));
|
|
27289
27340
|
if (attr.i18n) {
|
|
27290
27341
|
i18nAttributeBindingNames.add(attr.name);
|
|
@@ -28248,18 +28299,39 @@ function isLegacyAnimationLabel(name) {
|
|
|
28248
28299
|
}
|
|
28249
28300
|
function calcPossibleSecurityContexts(registry, selector, propName, isAttribute) {
|
|
28250
28301
|
let ctxs;
|
|
28251
|
-
const
|
|
28252
|
-
|
|
28253
|
-
|
|
28302
|
+
const [namespaceKey, baseSelector] = selector ? splitNsName(selector, false) : [null, selector];
|
|
28303
|
+
const nameToContext = (elName) => {
|
|
28304
|
+
const [nsStr, name] = splitNsName(elName, false);
|
|
28305
|
+
const ns = nsStr ?? namespaceKey;
|
|
28306
|
+
const fullName = ns ? `:${ns}:${name}` : name;
|
|
28307
|
+
return registry.securityContext(fullName, propName, isAttribute);
|
|
28308
|
+
};
|
|
28309
|
+
const allKnownElements = registry.allKnownElementNames();
|
|
28310
|
+
if (baseSelector === null) {
|
|
28311
|
+
ctxs = allKnownElements.map(nameToContext);
|
|
28254
28312
|
}
|
|
28255
28313
|
else {
|
|
28256
28314
|
ctxs = [];
|
|
28257
|
-
CssSelector.parse(
|
|
28258
|
-
|
|
28315
|
+
CssSelector.parse(baseSelector).forEach((selector) => {
|
|
28316
|
+
let elementNames = selector.element ? [selector.element] : allKnownElements;
|
|
28317
|
+
if (selector.element && !registry.hasElement(selector.element, [])) {
|
|
28318
|
+
const svgElement = `:${SVG_NAMESPACE}:${selector.element}`;
|
|
28319
|
+
const mathElement = `:${MATH_ML_NAMESPACE}:${selector.element}`;
|
|
28320
|
+
if (registry.hasElement(svgElement, [])) {
|
|
28321
|
+
elementNames = [svgElement];
|
|
28322
|
+
}
|
|
28323
|
+
else if (registry.hasElement(mathElement, [])) {
|
|
28324
|
+
elementNames = [mathElement];
|
|
28325
|
+
}
|
|
28326
|
+
}
|
|
28259
28327
|
const notElementNames = new Set(selector.notSelectors
|
|
28260
28328
|
.filter((selector) => selector.isElementSelector())
|
|
28261
|
-
.map((selector) => selector.element));
|
|
28262
|
-
const possibleElementNames = elementNames.filter((elName) =>
|
|
28329
|
+
.map((selector) => selector.element?.toLowerCase()));
|
|
28330
|
+
const possibleElementNames = elementNames.filter((elName) => {
|
|
28331
|
+
const elNameLowerCase = elName.toLowerCase();
|
|
28332
|
+
return (!notElementNames.has(elNameLowerCase) &&
|
|
28333
|
+
!notElementNames.has(splitNsName(elNameLowerCase)[1]));
|
|
28334
|
+
});
|
|
28263
28335
|
ctxs.push(...possibleElementNames.map(nameToContext));
|
|
28264
28336
|
});
|
|
28265
28337
|
}
|
|
@@ -28294,8 +28366,8 @@ const LINK_ELEMENT = 'link';
|
|
|
28294
28366
|
const LINK_STYLE_REL_ATTR = 'rel';
|
|
28295
28367
|
const LINK_STYLE_HREF_ATTR = 'href';
|
|
28296
28368
|
const LINK_STYLE_REL_VALUE = 'stylesheet';
|
|
28297
|
-
const
|
|
28298
|
-
const
|
|
28369
|
+
const STYLE_ELEMENTS = new Set([':svg:style', 'style']);
|
|
28370
|
+
const SCRIPT_ELEMENTS = new Set([':svg:script', 'script']);
|
|
28299
28371
|
const NG_NON_BINDABLE_ATTR = 'ngNonBindable';
|
|
28300
28372
|
const NG_PROJECT_AS = 'ngProjectAs';
|
|
28301
28373
|
function preparseElement(ast) {
|
|
@@ -28304,7 +28376,7 @@ function preparseElement(ast) {
|
|
|
28304
28376
|
let relAttr = null;
|
|
28305
28377
|
let nonBindable = false;
|
|
28306
28378
|
let projectAs = '';
|
|
28307
|
-
ast.attrs
|
|
28379
|
+
for (const attr of ast.attrs) {
|
|
28308
28380
|
const lcAttrName = attr.name.toLowerCase();
|
|
28309
28381
|
if (lcAttrName == NG_CONTENT_SELECT_ATTR) {
|
|
28310
28382
|
selectAttr = attr.value;
|
|
@@ -28323,17 +28395,18 @@ function preparseElement(ast) {
|
|
|
28323
28395
|
projectAs = attr.value;
|
|
28324
28396
|
}
|
|
28325
28397
|
}
|
|
28326
|
-
}
|
|
28327
|
-
|
|
28398
|
+
}
|
|
28399
|
+
// Normalize selector to '*' if empty
|
|
28400
|
+
selectAttr ||= '*';
|
|
28328
28401
|
const nodeName = ast.name.toLowerCase();
|
|
28329
28402
|
let type = PreparsedElementType.OTHER;
|
|
28330
28403
|
if (isNgContent(nodeName)) {
|
|
28331
28404
|
type = PreparsedElementType.NG_CONTENT;
|
|
28332
28405
|
}
|
|
28333
|
-
else if (nodeName
|
|
28406
|
+
else if (STYLE_ELEMENTS.has(nodeName)) {
|
|
28334
28407
|
type = PreparsedElementType.STYLE;
|
|
28335
28408
|
}
|
|
28336
|
-
else if (nodeName
|
|
28409
|
+
else if (SCRIPT_ELEMENTS.has(nodeName)) {
|
|
28337
28410
|
type = PreparsedElementType.SCRIPT;
|
|
28338
28411
|
}
|
|
28339
28412
|
else if (nodeName == LINK_ELEMENT && relAttr == LINK_STYLE_REL_VALUE) {
|
|
@@ -28363,12 +28436,6 @@ class PreparsedElement {
|
|
|
28363
28436
|
this.projectAs = projectAs;
|
|
28364
28437
|
}
|
|
28365
28438
|
}
|
|
28366
|
-
function normalizeNgContentSelect(selectAttr) {
|
|
28367
|
-
if (selectAttr === null || selectAttr.length === 0) {
|
|
28368
|
-
return '*';
|
|
28369
|
-
}
|
|
28370
|
-
return selectAttr;
|
|
28371
|
-
}
|
|
28372
28439
|
|
|
28373
28440
|
/** Pattern for the expression in a for loop block. */
|
|
28374
28441
|
const FOR_LOOP_EXPRESSION_PATTERN = /^\s*([0-9A-Za-z_$]*)\s+of\s+([\S\s]*)/;
|
|
@@ -32854,7 +32921,7 @@ function isAttrNode(ast) {
|
|
|
32854
32921
|
* @description
|
|
32855
32922
|
* Entry point for all public APIs of the compiler package.
|
|
32856
32923
|
*/
|
|
32857
|
-
const VERSION = new Version('20.3.
|
|
32924
|
+
const VERSION = new Version('20.3.22');
|
|
32858
32925
|
|
|
32859
32926
|
//////////////////////////////////////
|
|
32860
32927
|
// THIS FILE HAS GLOBAL SIDE EFFECT //
|
|
@@ -33916,7 +33983,7 @@ class NodeJSPathManipulation {
|
|
|
33916
33983
|
// G3-ESM-MARKER: G3 uses CommonJS, but externally everything in ESM.
|
|
33917
33984
|
// CommonJS/ESM interop for determining the current file name and containing dir.
|
|
33918
33985
|
const isCommonJS = typeof __filename !== 'undefined';
|
|
33919
|
-
const currentFileUrl = isCommonJS ? null : (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('project_tsconfig_paths-
|
|
33986
|
+
const currentFileUrl = isCommonJS ? null : (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('project_tsconfig_paths-DkhzVMGt.cjs', document.baseURI).href));
|
|
33920
33987
|
// Note, when this code loads in the browser, `url` may be an empty `{}` due to the Closure shims.
|
|
33921
33988
|
const currentFileName = isCommonJS
|
|
33922
33989
|
? __filename
|