@angular/core 17.0.0-next.3 → 17.0.0-next.4
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/esm2022/src/core_reactivity_export_internal.mjs +3 -3
- package/esm2022/src/di/initializer_token.mjs +1 -1
- package/esm2022/src/di/internal_tokens.mjs +1 -1
- package/esm2022/src/di/r3_injector.mjs +3 -4
- package/esm2022/src/metadata/directives.mjs +1 -1
- package/esm2022/src/metadata/resource_loading.mjs +27 -14
- package/esm2022/src/render3/after_render_hooks.mjs +32 -26
- package/esm2022/src/render3/component_ref.mjs +3 -4
- package/esm2022/src/render3/instructions/change_detection.mjs +3 -3
- package/esm2022/src/render3/interfaces/definition.mjs +1 -1
- package/esm2022/src/render3/interfaces/view.mjs +1 -1
- package/esm2022/src/render3/jit/directive.mjs +6 -2
- package/esm2022/src/render3/pipe.mjs +2 -1
- package/esm2022/src/render3/reactivity/effect.mjs +147 -44
- package/esm2022/src/signals/index.mjs +2 -2
- package/esm2022/src/signals/src/graph.mjs +4 -1
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/testing/src/component_fixture.mjs +4 -2
- package/esm2022/testing/src/logger.mjs +3 -3
- package/esm2022/testing/src/test_bed.mjs +14 -3
- package/esm2022/testing/src/test_bed_compiler.mjs +3 -3
- package/fesm2022/core.mjs +303 -177
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/rxjs-interop.mjs +1 -1
- package/fesm2022/testing.mjs +19 -6
- package/fesm2022/testing.mjs.map +1 -1
- package/index.d.ts +59 -18
- package/package.json +1 -1
- package/rxjs-interop/index.d.ts +1 -1
- package/schematics/ng-generate/standalone-migration/bundle.js +81 -157
- package/schematics/ng-generate/standalone-migration/bundle.js.map +3 -3
- package/testing/index.d.ts +10 -2
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v17.0.0-next.
|
|
2
|
+
* @license Angular v17.0.0-next.4
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -1113,15 +1113,19 @@ export declare interface Component extends Directive {
|
|
|
1113
1113
|
*/
|
|
1114
1114
|
template?: string;
|
|
1115
1115
|
/**
|
|
1116
|
-
* One
|
|
1116
|
+
* One relative paths or an absolute URL for files containing CSS stylesheet to use
|
|
1117
1117
|
* in this component.
|
|
1118
1118
|
*/
|
|
1119
|
+
styleUrl?: string;
|
|
1120
|
+
/**
|
|
1121
|
+
* Relative paths or absolute URLs for files containing CSS stylesheets to use in this component.
|
|
1122
|
+
*/
|
|
1119
1123
|
styleUrls?: string[];
|
|
1120
1124
|
/**
|
|
1121
1125
|
* One or more inline CSS stylesheets to use
|
|
1122
1126
|
* in this component.
|
|
1123
1127
|
*/
|
|
1124
|
-
styles?: string[];
|
|
1128
|
+
styles?: string | string[];
|
|
1125
1129
|
/**
|
|
1126
1130
|
* One or more animation `trigger()` calls, containing
|
|
1127
1131
|
* [`state()`](api/animations/state) and `transition()` definitions.
|
|
@@ -3237,19 +3241,6 @@ export declare type EffectCleanupFn = () => void;
|
|
|
3237
3241
|
*/
|
|
3238
3242
|
declare type EffectCleanupRegisterFn = (cleanupFn: EffectCleanupFn) => void;
|
|
3239
3243
|
|
|
3240
|
-
/**
|
|
3241
|
-
* Tracks all effects registered within a given application and runs them via `flush`.
|
|
3242
|
-
*/
|
|
3243
|
-
declare class EffectManager {
|
|
3244
|
-
private all;
|
|
3245
|
-
private queue;
|
|
3246
|
-
create(effectFn: (onCleanup: (cleanupFn: EffectCleanupFn) => void) => void, destroyRef: DestroyRef | null, allowSignalWrites: boolean): EffectRef;
|
|
3247
|
-
flush(): void;
|
|
3248
|
-
get isQueueEmpty(): boolean;
|
|
3249
|
-
/** @nocollapse */
|
|
3250
|
-
static ɵprov: unknown;
|
|
3251
|
-
}
|
|
3252
|
-
|
|
3253
3244
|
/**
|
|
3254
3245
|
* A global reactive effect, which can be manually destroyed.
|
|
3255
3246
|
*
|
|
@@ -3396,7 +3387,7 @@ declare const ENVIRONMENT = 10;
|
|
|
3396
3387
|
*
|
|
3397
3388
|
* @publicApi
|
|
3398
3389
|
*/
|
|
3399
|
-
export declare const ENVIRONMENT_INITIALIZER: InjectionToken<() => void>;
|
|
3390
|
+
export declare const ENVIRONMENT_INITIALIZER: InjectionToken<readonly (() => void)[]>;
|
|
3400
3391
|
|
|
3401
3392
|
/**
|
|
3402
3393
|
* An `Injector` that's part of the environment injector hierarchy, which exists outside of the
|
|
@@ -5773,7 +5764,7 @@ declare interface LViewEnvironment {
|
|
|
5773
5764
|
/** An optional custom sanitizer. */
|
|
5774
5765
|
sanitizer: Sanitizer | null;
|
|
5775
5766
|
/** Container for reactivity system `effect`s. */
|
|
5776
|
-
|
|
5767
|
+
inlineEffectRunner: ɵFlushableEffectRunner | null;
|
|
5777
5768
|
/** Container for after render hooks */
|
|
5778
5769
|
afterRenderEventManager: ɵAfterRenderEventManager | null;
|
|
5779
5770
|
}
|
|
@@ -7906,6 +7897,11 @@ export declare abstract class Sanitizer {
|
|
|
7906
7897
|
*/
|
|
7907
7898
|
declare type SanitizerFn = (value: any, tagName?: string, propName?: string) => string | TrustedHTML | TrustedScript | TrustedScriptURL;
|
|
7908
7899
|
|
|
7900
|
+
declare interface SchedulableEffect {
|
|
7901
|
+
run(): void;
|
|
7902
|
+
creationZone: unknown;
|
|
7903
|
+
}
|
|
7904
|
+
|
|
7909
7905
|
|
|
7910
7906
|
/**
|
|
7911
7907
|
* A schema definition associated with an NgModule.
|
|
@@ -10893,6 +10889,7 @@ export declare interface ɵComponentDef<T> extends ɵDirectiveDef<T> {
|
|
|
10893
10889
|
*/
|
|
10894
10890
|
readonly data: {
|
|
10895
10891
|
[kind: string]: any;
|
|
10892
|
+
animation?: any[];
|
|
10896
10893
|
};
|
|
10897
10894
|
/** Whether or not this component's ChangeDetectionStrategy is OnPush */
|
|
10898
10895
|
readonly onPush: boolean;
|
|
@@ -11186,6 +11183,20 @@ export declare interface ɵDirectiveType<T> extends Type<T> {
|
|
|
11186
11183
|
ɵfac: unknown;
|
|
11187
11184
|
}
|
|
11188
11185
|
|
|
11186
|
+
/**
|
|
11187
|
+
* A scheduler which manages the execution of effects.
|
|
11188
|
+
*/
|
|
11189
|
+
export declare abstract class ɵEffectScheduler {
|
|
11190
|
+
/**
|
|
11191
|
+
* Schedule the given effect to be executed at a later time.
|
|
11192
|
+
*
|
|
11193
|
+
* It is an error to attempt to execute any effects synchronously during a scheduling operation.
|
|
11194
|
+
*/
|
|
11195
|
+
abstract scheduleEffect(e: SchedulableEffect): void;
|
|
11196
|
+
/** @nocollapse */
|
|
11197
|
+
static ɵprov: unknown;
|
|
11198
|
+
}
|
|
11199
|
+
|
|
11189
11200
|
/**
|
|
11190
11201
|
* Internal token to collect all SSR-related features enabled for this application.
|
|
11191
11202
|
*
|
|
@@ -11212,6 +11223,16 @@ export declare const enum ɵExtraLocaleDataIndex {
|
|
|
11212
11223
|
*/
|
|
11213
11224
|
export declare function ɵfindLocaleData(locale: string): any;
|
|
11214
11225
|
|
|
11226
|
+
/**
|
|
11227
|
+
* Interface to an `EffectScheduler` capable of running scheduled effects synchronously.
|
|
11228
|
+
*/
|
|
11229
|
+
export declare interface ɵFlushableEffectRunner {
|
|
11230
|
+
/**
|
|
11231
|
+
* Run any scheduled effects.
|
|
11232
|
+
*/
|
|
11233
|
+
flush(): void;
|
|
11234
|
+
}
|
|
11235
|
+
|
|
11215
11236
|
/**
|
|
11216
11237
|
* Loops over queued module definitions, if a given module definition has all of its
|
|
11217
11238
|
* declarations resolved, it dequeues that module definition and sets the scope on
|
|
@@ -12436,6 +12457,26 @@ export declare function ɵwithDomHydration(): EnvironmentProviders;
|
|
|
12436
12457
|
*/
|
|
12437
12458
|
export declare const ɵXSS_SECURITY_URL = "https://g.co/ng/security#xss";
|
|
12438
12459
|
|
|
12460
|
+
/**
|
|
12461
|
+
* An `EffectScheduler` which is capable of queueing scheduled effects per-zone, and flushing them
|
|
12462
|
+
* as an explicit operation.
|
|
12463
|
+
*/
|
|
12464
|
+
export declare class ɵZoneAwareQueueingScheduler implements ɵEffectScheduler, ɵFlushableEffectRunner {
|
|
12465
|
+
private queuedEffectCount;
|
|
12466
|
+
private queues;
|
|
12467
|
+
scheduleEffect(handle: SchedulableEffect): void;
|
|
12468
|
+
/**
|
|
12469
|
+
* Run all scheduled effects.
|
|
12470
|
+
*
|
|
12471
|
+
* Execution order of effects within the same zone is guaranteed to be FIFO, but there is no
|
|
12472
|
+
* ordering guarantee between effects scheduled in different zones.
|
|
12473
|
+
*/
|
|
12474
|
+
flush(): void;
|
|
12475
|
+
private flushQueue;
|
|
12476
|
+
/** @nocollapse */
|
|
12477
|
+
static ɵprov: unknown;
|
|
12478
|
+
}
|
|
12479
|
+
|
|
12439
12480
|
/**
|
|
12440
12481
|
* Advances to an element for later binding instructions.
|
|
12441
12482
|
*
|
package/package.json
CHANGED
package/rxjs-interop/index.d.ts
CHANGED
|
@@ -832,98 +832,6 @@ __export(output_ast_exports, {
|
|
|
832
832
|
variable: () => variable
|
|
833
833
|
});
|
|
834
834
|
|
|
835
|
-
// bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/big_integer.mjs
|
|
836
|
-
var BigInteger = class {
|
|
837
|
-
static zero() {
|
|
838
|
-
return new BigInteger([0]);
|
|
839
|
-
}
|
|
840
|
-
static one() {
|
|
841
|
-
return new BigInteger([1]);
|
|
842
|
-
}
|
|
843
|
-
constructor(digits) {
|
|
844
|
-
this.digits = digits;
|
|
845
|
-
}
|
|
846
|
-
clone() {
|
|
847
|
-
return new BigInteger(this.digits.slice());
|
|
848
|
-
}
|
|
849
|
-
add(other) {
|
|
850
|
-
const result = this.clone();
|
|
851
|
-
result.addToSelf(other);
|
|
852
|
-
return result;
|
|
853
|
-
}
|
|
854
|
-
addToSelf(other) {
|
|
855
|
-
const maxNrOfDigits = Math.max(this.digits.length, other.digits.length);
|
|
856
|
-
let carry = 0;
|
|
857
|
-
for (let i = 0; i < maxNrOfDigits; i++) {
|
|
858
|
-
let digitSum = carry;
|
|
859
|
-
if (i < this.digits.length) {
|
|
860
|
-
digitSum += this.digits[i];
|
|
861
|
-
}
|
|
862
|
-
if (i < other.digits.length) {
|
|
863
|
-
digitSum += other.digits[i];
|
|
864
|
-
}
|
|
865
|
-
if (digitSum >= 10) {
|
|
866
|
-
this.digits[i] = digitSum - 10;
|
|
867
|
-
carry = 1;
|
|
868
|
-
} else {
|
|
869
|
-
this.digits[i] = digitSum;
|
|
870
|
-
carry = 0;
|
|
871
|
-
}
|
|
872
|
-
}
|
|
873
|
-
if (carry > 0) {
|
|
874
|
-
this.digits[maxNrOfDigits] = 1;
|
|
875
|
-
}
|
|
876
|
-
}
|
|
877
|
-
toString() {
|
|
878
|
-
let res = "";
|
|
879
|
-
for (let i = this.digits.length - 1; i >= 0; i--) {
|
|
880
|
-
res += this.digits[i];
|
|
881
|
-
}
|
|
882
|
-
return res;
|
|
883
|
-
}
|
|
884
|
-
};
|
|
885
|
-
var BigIntForMultiplication = class {
|
|
886
|
-
constructor(value) {
|
|
887
|
-
this.powerOfTwos = [value];
|
|
888
|
-
}
|
|
889
|
-
getValue() {
|
|
890
|
-
return this.powerOfTwos[0];
|
|
891
|
-
}
|
|
892
|
-
multiplyBy(num) {
|
|
893
|
-
const product = BigInteger.zero();
|
|
894
|
-
this.multiplyByAndAddTo(num, product);
|
|
895
|
-
return product;
|
|
896
|
-
}
|
|
897
|
-
multiplyByAndAddTo(num, result) {
|
|
898
|
-
for (let exponent = 0; num !== 0; num = num >>> 1, exponent++) {
|
|
899
|
-
if (num & 1) {
|
|
900
|
-
const value = this.getMultipliedByPowerOfTwo(exponent);
|
|
901
|
-
result.addToSelf(value);
|
|
902
|
-
}
|
|
903
|
-
}
|
|
904
|
-
}
|
|
905
|
-
getMultipliedByPowerOfTwo(exponent) {
|
|
906
|
-
for (let i = this.powerOfTwos.length; i <= exponent; i++) {
|
|
907
|
-
const previousPower = this.powerOfTwos[i - 1];
|
|
908
|
-
this.powerOfTwos[i] = previousPower.add(previousPower);
|
|
909
|
-
}
|
|
910
|
-
return this.powerOfTwos[exponent];
|
|
911
|
-
}
|
|
912
|
-
};
|
|
913
|
-
var BigIntExponentiation = class {
|
|
914
|
-
constructor(base) {
|
|
915
|
-
this.base = base;
|
|
916
|
-
this.exponents = [new BigIntForMultiplication(BigInteger.one())];
|
|
917
|
-
}
|
|
918
|
-
toThePowerOf(exponent) {
|
|
919
|
-
for (let i = this.exponents.length; i <= exponent; i++) {
|
|
920
|
-
const value = this.exponents[i - 1].multiplyBy(this.base);
|
|
921
|
-
this.exponents[i] = new BigIntForMultiplication(value);
|
|
922
|
-
}
|
|
923
|
-
return this.exponents[exponent];
|
|
924
|
-
}
|
|
925
|
-
};
|
|
926
|
-
|
|
927
835
|
// bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/digest.mjs
|
|
928
836
|
var textEncoder;
|
|
929
837
|
function digest(message) {
|
|
@@ -1031,17 +939,15 @@ function fingerprint(str) {
|
|
|
1031
939
|
hi = hi ^ 319790063;
|
|
1032
940
|
lo = lo ^ -1801410264;
|
|
1033
941
|
}
|
|
1034
|
-
return
|
|
942
|
+
return BigInt.asUintN(32, BigInt(hi)) << BigInt(32) | BigInt.asUintN(32, BigInt(lo));
|
|
1035
943
|
}
|
|
1036
944
|
function computeMsgId(msg, meaning = "") {
|
|
1037
945
|
let msgFingerprint = fingerprint(msg);
|
|
1038
946
|
if (meaning) {
|
|
1039
|
-
|
|
1040
|
-
msgFingerprint
|
|
947
|
+
msgFingerprint = BigInt.asUintN(64, msgFingerprint << BigInt(1)) | msgFingerprint >> BigInt(63) & BigInt(1);
|
|
948
|
+
msgFingerprint += fingerprint(meaning);
|
|
1041
949
|
}
|
|
1042
|
-
|
|
1043
|
-
const lo = msgFingerprint[1];
|
|
1044
|
-
return wordsToDecimalString(hi & 2147483647, lo);
|
|
950
|
+
return BigInt.asUintN(63, msgFingerprint).toString();
|
|
1045
951
|
}
|
|
1046
952
|
function hash32(view, length, c) {
|
|
1047
953
|
let a = 2654435769, b = 2654435769;
|
|
@@ -1138,24 +1044,9 @@ function add32to64(a, b) {
|
|
|
1138
1044
|
const high = (a >>> 16) + (b >>> 16) + (low >>> 16);
|
|
1139
1045
|
return [high >>> 16, high << 16 | low & 65535];
|
|
1140
1046
|
}
|
|
1141
|
-
function add64(a, b) {
|
|
1142
|
-
const ah = a[0], al = a[1];
|
|
1143
|
-
const bh = b[0], bl = b[1];
|
|
1144
|
-
const result = add32to64(al, bl);
|
|
1145
|
-
const carry = result[0];
|
|
1146
|
-
const l = result[1];
|
|
1147
|
-
const h = add32(add32(ah, bh), carry);
|
|
1148
|
-
return [h, l];
|
|
1149
|
-
}
|
|
1150
1047
|
function rol32(a, count) {
|
|
1151
1048
|
return a << count | a >>> 32 - count;
|
|
1152
1049
|
}
|
|
1153
|
-
function rol64(num, count) {
|
|
1154
|
-
const hi = num[0], lo = num[1];
|
|
1155
|
-
const h = hi << count | lo >>> 32 - count;
|
|
1156
|
-
const l = lo << count | hi >>> 32 - count;
|
|
1157
|
-
return [h, l];
|
|
1158
|
-
}
|
|
1159
1050
|
function bytesToWords32(bytes, endian) {
|
|
1160
1051
|
const size = bytes.length + 3 >>> 2;
|
|
1161
1052
|
const words32 = [];
|
|
@@ -1180,12 +1071,6 @@ function wordAt(bytes, index, endian) {
|
|
|
1180
1071
|
}
|
|
1181
1072
|
return word;
|
|
1182
1073
|
}
|
|
1183
|
-
var base256 = new BigIntExponentiation(256);
|
|
1184
|
-
function wordsToDecimalString(hi, lo) {
|
|
1185
|
-
const decimal = base256.toThePowerOf(0).multiplyBy(lo);
|
|
1186
|
-
base256.toThePowerOf(4).multiplyByAndAddTo(hi, decimal);
|
|
1187
|
-
return decimal.toString();
|
|
1188
|
-
}
|
|
1189
1074
|
|
|
1190
1075
|
// bazel-out/k8-fastbuild/bin/packages/compiler/src/output/output_ast.mjs
|
|
1191
1076
|
var TypeModifier;
|
|
@@ -5746,10 +5631,11 @@ var AbstractJsEmitterVisitor = class extends AbstractEmitterVisitor {
|
|
|
5746
5631
|
var policy;
|
|
5747
5632
|
function getPolicy() {
|
|
5748
5633
|
if (policy === void 0) {
|
|
5634
|
+
const trustedTypes = _global["trustedTypes"];
|
|
5749
5635
|
policy = null;
|
|
5750
|
-
if (
|
|
5636
|
+
if (trustedTypes) {
|
|
5751
5637
|
try {
|
|
5752
|
-
policy =
|
|
5638
|
+
policy = trustedTypes.createPolicy("angular#unsafe-jit", {
|
|
5753
5639
|
createScript: (s) => s
|
|
5754
5640
|
});
|
|
5755
5641
|
} catch (e) {
|
|
@@ -5763,7 +5649,7 @@ function trustedScriptFromString(script) {
|
|
|
5763
5649
|
return ((_a2 = getPolicy()) == null ? void 0 : _a2.createScript(script)) || script;
|
|
5764
5650
|
}
|
|
5765
5651
|
function newTrustedFunctionForJIT(...args) {
|
|
5766
|
-
if (!_global
|
|
5652
|
+
if (!_global["trustedTypes"]) {
|
|
5767
5653
|
return new Function(...args);
|
|
5768
5654
|
}
|
|
5769
5655
|
const fnArgs = args.slice(0, -1).join(",");
|
|
@@ -9442,6 +9328,7 @@ function phaseAlignPipeVariadicVarOffset(job) {
|
|
|
9442
9328
|
}
|
|
9443
9329
|
expr.varOffset = expr.args.varOffset;
|
|
9444
9330
|
expr.args.varOffset = expr.varOffset + varsUsedByIrExpression(expr);
|
|
9331
|
+
return void 0;
|
|
9445
9332
|
});
|
|
9446
9333
|
}
|
|
9447
9334
|
}
|
|
@@ -15595,7 +15482,7 @@ var _TreeBuilder = class {
|
|
|
15595
15482
|
const parent = this._getContainer();
|
|
15596
15483
|
if (parent instanceof BlockGroup) {
|
|
15597
15484
|
this.errors.push(TreeError.create(null, startSpan, "Text cannot be placed directly inside of a block group."));
|
|
15598
|
-
return
|
|
15485
|
+
return;
|
|
15599
15486
|
}
|
|
15600
15487
|
if (parent != null && parent.children.length === 0 && this.getTagDefinition(parent.name).ignoreFirstLf) {
|
|
15601
15488
|
text2 = text2.substring(1);
|
|
@@ -16488,6 +16375,7 @@ function mergeNextContextsInOps(ops) {
|
|
|
16488
16375
|
tryToMerge = false;
|
|
16489
16376
|
break;
|
|
16490
16377
|
}
|
|
16378
|
+
return;
|
|
16491
16379
|
});
|
|
16492
16380
|
}
|
|
16493
16381
|
}
|
|
@@ -22421,10 +22309,10 @@ function createHostBindingsFunction(hostBindingsMetadata, typeSourceSpan, bindin
|
|
|
22421
22309
|
const eventBindings = bindingParser.createDirectiveHostEventAsts(hostBindingsMetadata.listeners, typeSourceSpan);
|
|
22422
22310
|
if (USE_TEMPLATE_PIPELINE) {
|
|
22423
22311
|
if (hostBindingsMetadata.specialAttributes.styleAttr) {
|
|
22424
|
-
hostBindingsMetadata.attributes
|
|
22312
|
+
hostBindingsMetadata.attributes["style"] = literal(hostBindingsMetadata.specialAttributes.styleAttr);
|
|
22425
22313
|
}
|
|
22426
22314
|
if (hostBindingsMetadata.specialAttributes.classAttr) {
|
|
22427
|
-
hostBindingsMetadata.attributes
|
|
22315
|
+
hostBindingsMetadata.attributes["class"] = literal(hostBindingsMetadata.specialAttributes.classAttr);
|
|
22428
22316
|
}
|
|
22429
22317
|
const hostJob = ingestHostBinding({
|
|
22430
22318
|
componentName: name,
|
|
@@ -23243,7 +23131,7 @@ function publishFacade(global) {
|
|
|
23243
23131
|
}
|
|
23244
23132
|
|
|
23245
23133
|
// bazel-out/k8-fastbuild/bin/packages/compiler/src/version.mjs
|
|
23246
|
-
var VERSION2 = new Version("17.0.0-next.
|
|
23134
|
+
var VERSION2 = new Version("17.0.0-next.4");
|
|
23247
23135
|
|
|
23248
23136
|
// bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
|
|
23249
23137
|
var _I18N_ATTR = "i18n";
|
|
@@ -24780,7 +24668,7 @@ var MINIMUM_PARTIAL_LINKER_VERSION = "12.0.0";
|
|
|
24780
24668
|
function compileDeclareClassMetadata(metadata) {
|
|
24781
24669
|
const definitionMap = new DefinitionMap();
|
|
24782
24670
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
24783
|
-
definitionMap.set("version", literal("17.0.0-next.
|
|
24671
|
+
definitionMap.set("version", literal("17.0.0-next.4"));
|
|
24784
24672
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
24785
24673
|
definitionMap.set("type", metadata.type);
|
|
24786
24674
|
definitionMap.set("decorators", metadata.decorators);
|
|
@@ -24851,7 +24739,7 @@ function createDirectiveDefinitionMap(meta) {
|
|
|
24851
24739
|
const hasTransformFunctions = Object.values(meta.inputs).some((input) => input.transformFunction !== null);
|
|
24852
24740
|
const minVersion = hasTransformFunctions ? MINIMUM_PARTIAL_LINKER_VERSION2 : "14.0.0";
|
|
24853
24741
|
definitionMap.set("minVersion", literal(minVersion));
|
|
24854
|
-
definitionMap.set("version", literal("17.0.0-next.
|
|
24742
|
+
definitionMap.set("version", literal("17.0.0-next.4"));
|
|
24855
24743
|
definitionMap.set("type", meta.type.value);
|
|
24856
24744
|
if (meta.isStandalone) {
|
|
24857
24745
|
definitionMap.set("isStandalone", literal(meta.isStandalone));
|
|
@@ -25039,7 +24927,7 @@ var MINIMUM_PARTIAL_LINKER_VERSION3 = "12.0.0";
|
|
|
25039
24927
|
function compileDeclareFactoryFunction(meta) {
|
|
25040
24928
|
const definitionMap = new DefinitionMap();
|
|
25041
24929
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION3));
|
|
25042
|
-
definitionMap.set("version", literal("17.0.0-next.
|
|
24930
|
+
definitionMap.set("version", literal("17.0.0-next.4"));
|
|
25043
24931
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
25044
24932
|
definitionMap.set("type", meta.type.value);
|
|
25045
24933
|
definitionMap.set("deps", compileDependencies(meta.deps));
|
|
@@ -25062,7 +24950,7 @@ function compileDeclareInjectableFromMetadata(meta) {
|
|
|
25062
24950
|
function createInjectableDefinitionMap(meta) {
|
|
25063
24951
|
const definitionMap = new DefinitionMap();
|
|
25064
24952
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION4));
|
|
25065
|
-
definitionMap.set("version", literal("17.0.0-next.
|
|
24953
|
+
definitionMap.set("version", literal("17.0.0-next.4"));
|
|
25066
24954
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
25067
24955
|
definitionMap.set("type", meta.type.value);
|
|
25068
24956
|
if (meta.providedIn !== void 0) {
|
|
@@ -25100,7 +24988,7 @@ function compileDeclareInjectorFromMetadata(meta) {
|
|
|
25100
24988
|
function createInjectorDefinitionMap(meta) {
|
|
25101
24989
|
const definitionMap = new DefinitionMap();
|
|
25102
24990
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION5));
|
|
25103
|
-
definitionMap.set("version", literal("17.0.0-next.
|
|
24991
|
+
definitionMap.set("version", literal("17.0.0-next.4"));
|
|
25104
24992
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
25105
24993
|
definitionMap.set("type", meta.type.value);
|
|
25106
24994
|
definitionMap.set("providers", meta.providers);
|
|
@@ -25124,7 +25012,7 @@ function createNgModuleDefinitionMap(meta) {
|
|
|
25124
25012
|
throw new Error("Invalid path! Local compilation mode should not get into the partial compilation path");
|
|
25125
25013
|
}
|
|
25126
25014
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION6));
|
|
25127
|
-
definitionMap.set("version", literal("17.0.0-next.
|
|
25015
|
+
definitionMap.set("version", literal("17.0.0-next.4"));
|
|
25128
25016
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
25129
25017
|
definitionMap.set("type", meta.type.value);
|
|
25130
25018
|
if (meta.bootstrap.length > 0) {
|
|
@@ -25159,7 +25047,7 @@ function compileDeclarePipeFromMetadata(meta) {
|
|
|
25159
25047
|
function createPipeDefinitionMap(meta) {
|
|
25160
25048
|
const definitionMap = new DefinitionMap();
|
|
25161
25049
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION7));
|
|
25162
|
-
definitionMap.set("version", literal("17.0.0-next.
|
|
25050
|
+
definitionMap.set("version", literal("17.0.0-next.4"));
|
|
25163
25051
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
25164
25052
|
definitionMap.set("type", meta.type.value);
|
|
25165
25053
|
if (meta.isStandalone) {
|
|
@@ -25176,7 +25064,7 @@ function createPipeDefinitionMap(meta) {
|
|
|
25176
25064
|
publishFacade(_global);
|
|
25177
25065
|
|
|
25178
25066
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/version.mjs
|
|
25179
|
-
var VERSION3 = new Version("17.0.0-next.
|
|
25067
|
+
var VERSION3 = new Version("17.0.0-next.4");
|
|
25180
25068
|
|
|
25181
25069
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/transformers/api.mjs
|
|
25182
25070
|
var EmitFlags;
|
|
@@ -25333,6 +25221,7 @@ var ErrorCode;
|
|
|
25333
25221
|
ErrorCode2[ErrorCode2["HOST_DIRECTIVE_CONFLICTING_ALIAS"] = 2018] = "HOST_DIRECTIVE_CONFLICTING_ALIAS";
|
|
25334
25222
|
ErrorCode2[ErrorCode2["HOST_DIRECTIVE_MISSING_REQUIRED_BINDING"] = 2019] = "HOST_DIRECTIVE_MISSING_REQUIRED_BINDING";
|
|
25335
25223
|
ErrorCode2[ErrorCode2["CONFLICTING_INPUT_TRANSFORM"] = 2020] = "CONFLICTING_INPUT_TRANSFORM";
|
|
25224
|
+
ErrorCode2[ErrorCode2["COMPONENT_INVALID_STYLE_URLS"] = 2021] = "COMPONENT_INVALID_STYLE_URLS";
|
|
25336
25225
|
ErrorCode2[ErrorCode2["SYMBOL_NOT_EXPORTED"] = 3001] = "SYMBOL_NOT_EXPORTED";
|
|
25337
25226
|
ErrorCode2[ErrorCode2["IMPORT_CYCLE_DETECTED"] = 3003] = "IMPORT_CYCLE_DETECTED";
|
|
25338
25227
|
ErrorCode2[ErrorCode2["IMPORT_GENERATION_FAILURE"] = 3004] = "IMPORT_GENERATION_FAILURE";
|
|
@@ -29288,10 +29177,9 @@ function readMapType(type, valueTransform) {
|
|
|
29288
29177
|
return;
|
|
29289
29178
|
}
|
|
29290
29179
|
const value = valueTransform(member.type);
|
|
29291
|
-
if (value
|
|
29292
|
-
|
|
29180
|
+
if (value !== null) {
|
|
29181
|
+
obj[member.name.text] = value;
|
|
29293
29182
|
}
|
|
29294
|
-
obj[member.name.text] = value;
|
|
29295
29183
|
});
|
|
29296
29184
|
return obj;
|
|
29297
29185
|
}
|
|
@@ -32260,13 +32148,14 @@ function parseDirectiveStyles(directive, evaluator, compilationMode) {
|
|
|
32260
32148
|
if (!expression) {
|
|
32261
32149
|
return null;
|
|
32262
32150
|
}
|
|
32263
|
-
const
|
|
32151
|
+
const evaluated = evaluator.evaluate(expression);
|
|
32152
|
+
const value = typeof evaluated === "string" ? [evaluated] : evaluated;
|
|
32264
32153
|
if (compilationMode === CompilationMode.LOCAL && Array.isArray(value)) {
|
|
32265
32154
|
for (const entry of value) {
|
|
32266
32155
|
if (entry instanceof DynamicValue && entry.isFromUnknownIdentifier()) {
|
|
32267
32156
|
const relatedInformation = traceDynamicValue(expression, entry);
|
|
32268
32157
|
const chain = {
|
|
32269
|
-
messageText: `Unknown identifier used as styles string: ${entry.node.getText()} (did you import this string from another file? This is not allowed in local compilation mode. Please either inline it or move it to a separate file and include it using'
|
|
32158
|
+
messageText: `Unknown identifier used as styles string: ${entry.node.getText()} (did you import this string from another file? This is not allowed in local compilation mode. Please either inline it or move it to a separate file and include it using 'styleUrl')`,
|
|
32270
32159
|
category: import_typescript48.default.DiagnosticCategory.Error,
|
|
32271
32160
|
code: 0
|
|
32272
32161
|
};
|
|
@@ -32275,7 +32164,7 @@ function parseDirectiveStyles(directive, evaluator, compilationMode) {
|
|
|
32275
32164
|
}
|
|
32276
32165
|
}
|
|
32277
32166
|
if (!isStringArrayOrDie(value, "styles", expression)) {
|
|
32278
|
-
throw createValueHasWrongTypeError(expression, value, `Failed to resolve @
|
|
32167
|
+
throw createValueHasWrongTypeError(expression, value, `Failed to resolve @Component.styles to a string or an array of strings`);
|
|
32279
32168
|
}
|
|
32280
32169
|
return value;
|
|
32281
32170
|
}
|
|
@@ -33693,7 +33582,7 @@ function transformDecoratorResources(dec, component, styles, template2) {
|
|
|
33693
33582
|
if (dec.name !== "Component") {
|
|
33694
33583
|
return dec;
|
|
33695
33584
|
}
|
|
33696
|
-
if (!component.has("templateUrl") && !component.has("styleUrls") && !component.has("styles")) {
|
|
33585
|
+
if (!component.has("templateUrl") && !component.has("styleUrls") && !component.has("styleUrl") && !component.has("styles")) {
|
|
33697
33586
|
return dec;
|
|
33698
33587
|
}
|
|
33699
33588
|
const metadata = new Map(component);
|
|
@@ -33701,9 +33590,10 @@ function transformDecoratorResources(dec, component, styles, template2) {
|
|
|
33701
33590
|
metadata.delete("templateUrl");
|
|
33702
33591
|
metadata.set("template", import_typescript52.default.factory.createStringLiteral(template2.content));
|
|
33703
33592
|
}
|
|
33704
|
-
if (metadata.has("styleUrls") || metadata.has("styles")) {
|
|
33593
|
+
if (metadata.has("styleUrls") || metadata.has("styleUrl") || metadata.has("styles")) {
|
|
33705
33594
|
metadata.delete("styles");
|
|
33706
33595
|
metadata.delete("styleUrls");
|
|
33596
|
+
metadata.delete("styleUrl");
|
|
33707
33597
|
if (styles.length > 0) {
|
|
33708
33598
|
const styleNodes = styles.reduce((result, style) => {
|
|
33709
33599
|
if (style.trim().length > 0) {
|
|
@@ -33723,10 +33613,26 @@ function transformDecoratorResources(dec, component, styles, template2) {
|
|
|
33723
33613
|
return __spreadProps(__spreadValues({}, dec), { args: [import_typescript52.default.factory.createObjectLiteralExpression(newMetadataFields)] });
|
|
33724
33614
|
}
|
|
33725
33615
|
function extractComponentStyleUrls(evaluator, component) {
|
|
33726
|
-
|
|
33727
|
-
|
|
33616
|
+
const styleUrlsExpr = component.get("styleUrls");
|
|
33617
|
+
const styleUrlExpr = component.get("styleUrl");
|
|
33618
|
+
if (styleUrlsExpr !== void 0 && styleUrlExpr !== void 0) {
|
|
33619
|
+
throw new FatalDiagnosticError(ErrorCode.COMPONENT_INVALID_STYLE_URLS, styleUrlExpr, "@Component cannot define both `styleUrl` and `styleUrls`. Use `styleUrl` if the component has one stylesheet, or `styleUrls` if it has multiple");
|
|
33620
|
+
}
|
|
33621
|
+
if (styleUrlsExpr !== void 0) {
|
|
33622
|
+
return extractStyleUrlsFromExpression(evaluator, component.get("styleUrls"));
|
|
33623
|
+
}
|
|
33624
|
+
if (styleUrlExpr !== void 0) {
|
|
33625
|
+
const styleUrl = evaluator.evaluate(styleUrlExpr);
|
|
33626
|
+
if (typeof styleUrl !== "string") {
|
|
33627
|
+
throw createValueHasWrongTypeError(styleUrlExpr, styleUrl, "styleUrl must be a string");
|
|
33628
|
+
}
|
|
33629
|
+
return [{
|
|
33630
|
+
url: styleUrl,
|
|
33631
|
+
source: 2,
|
|
33632
|
+
nodeForError: styleUrlExpr
|
|
33633
|
+
}];
|
|
33728
33634
|
}
|
|
33729
|
-
return
|
|
33635
|
+
return [];
|
|
33730
33636
|
}
|
|
33731
33637
|
function extractStyleUrlsFromExpression(evaluator, styleUrlsExpr) {
|
|
33732
33638
|
const styleUrls = [];
|
|
@@ -33766,24 +33672,41 @@ function extractStyleResources(resourceLoader, component, containingFile) {
|
|
|
33766
33672
|
function stringLiteralElements(array) {
|
|
33767
33673
|
return array.elements.filter((e) => import_typescript52.default.isStringLiteralLike(e));
|
|
33768
33674
|
}
|
|
33675
|
+
const styleUrlExpr = component.get("styleUrl");
|
|
33769
33676
|
const styleUrlsExpr = component.get("styleUrls");
|
|
33770
33677
|
if (styleUrlsExpr !== void 0 && import_typescript52.default.isArrayLiteralExpression(styleUrlsExpr)) {
|
|
33771
33678
|
for (const expression of stringLiteralElements(styleUrlsExpr)) {
|
|
33772
|
-
|
|
33773
|
-
|
|
33774
|
-
styles.add(
|
|
33775
|
-
} catch (e) {
|
|
33679
|
+
const resource = stringLiteralUrlToResource(resourceLoader, expression, containingFile);
|
|
33680
|
+
if (resource !== null) {
|
|
33681
|
+
styles.add(resource);
|
|
33776
33682
|
}
|
|
33777
33683
|
}
|
|
33684
|
+
} else if (styleUrlExpr !== void 0 && import_typescript52.default.isStringLiteralLike(styleUrlExpr)) {
|
|
33685
|
+
const resource = stringLiteralUrlToResource(resourceLoader, styleUrlExpr, containingFile);
|
|
33686
|
+
if (resource !== null) {
|
|
33687
|
+
styles.add(resource);
|
|
33688
|
+
}
|
|
33778
33689
|
}
|
|
33779
33690
|
const stylesExpr = component.get("styles");
|
|
33780
|
-
if (stylesExpr !== void 0
|
|
33781
|
-
|
|
33782
|
-
|
|
33691
|
+
if (stylesExpr !== void 0) {
|
|
33692
|
+
if (import_typescript52.default.isArrayLiteralExpression(stylesExpr)) {
|
|
33693
|
+
for (const expression of stringLiteralElements(stylesExpr)) {
|
|
33694
|
+
styles.add({ path: null, expression });
|
|
33695
|
+
}
|
|
33696
|
+
} else if (import_typescript52.default.isStringLiteralLike(stylesExpr)) {
|
|
33697
|
+
styles.add({ path: null, expression: stylesExpr });
|
|
33783
33698
|
}
|
|
33784
33699
|
}
|
|
33785
33700
|
return styles;
|
|
33786
33701
|
}
|
|
33702
|
+
function stringLiteralUrlToResource(resourceLoader, expression, containingFile) {
|
|
33703
|
+
try {
|
|
33704
|
+
const resourceUrl = resourceLoader.resolve(expression.text, containingFile);
|
|
33705
|
+
return { path: absoluteFrom(resourceUrl), expression };
|
|
33706
|
+
} catch (e) {
|
|
33707
|
+
return null;
|
|
33708
|
+
}
|
|
33709
|
+
}
|
|
33787
33710
|
function _extractTemplateStyleUrls(template2) {
|
|
33788
33711
|
if (template2.styleUrls === null) {
|
|
33789
33712
|
return [];
|
|
@@ -34274,6 +34197,7 @@ var ComponentDecoratorHandler = class {
|
|
|
34274
34197
|
file: analysis.template.file
|
|
34275
34198
|
}
|
|
34276
34199
|
});
|
|
34200
|
+
return null;
|
|
34277
34201
|
}
|
|
34278
34202
|
typeCheck(ctx, node, meta) {
|
|
34279
34203
|
if (this.typeCheckScopeRegistry === null || !import_typescript53.default.isClassDeclaration(node)) {
|
|
@@ -41454,8 +41378,8 @@ var NgCompiler = class {
|
|
|
41454
41378
|
this.constructionDiagnostics = [];
|
|
41455
41379
|
this.nonTemplateDiagnostics = null;
|
|
41456
41380
|
this.delegatingPerfRecorder = new DelegatingPerfRecorder(this.perfRecorder);
|
|
41457
|
-
this.enableTemplateTypeChecker = enableTemplateTypeChecker || ((_a2 = options
|
|
41458
|
-
this.enabledBlockTypes = new Set((_b2 = options
|
|
41381
|
+
this.enableTemplateTypeChecker = enableTemplateTypeChecker || ((_a2 = options["_enableTemplateTypeChecker"]) != null ? _a2 : false);
|
|
41382
|
+
this.enabledBlockTypes = new Set((_b2 = options["_enabledBlockTypes"]) != null ? _b2 : []);
|
|
41459
41383
|
this.constructionDiagnostics.push(...this.adapter.constructionDiagnostics, ...verifyCompatibleTypeCheckOptions(this.options));
|
|
41460
41384
|
this.currentProgram = inputProgram;
|
|
41461
41385
|
this.closureCompilerEnabled = !!this.options.annotateForClosureCompiler;
|
|
@@ -41848,7 +41772,7 @@ var NgCompiler = class {
|
|
|
41848
41772
|
const reflector = new TypeScriptReflectionHost(checker);
|
|
41849
41773
|
let refEmitter;
|
|
41850
41774
|
let aliasingHost = null;
|
|
41851
|
-
if (this.adapter.unifiedModulesHost === null || !this.options
|
|
41775
|
+
if (this.adapter.unifiedModulesHost === null || !this.options["_useHostForImportGeneration"]) {
|
|
41852
41776
|
let localImportStrategy;
|
|
41853
41777
|
if (this.options.rootDir !== void 0 || this.options.rootDirs !== void 0 && this.options.rootDirs.length > 0) {
|
|
41854
41778
|
localImportStrategy = new LogicalProjectStrategy(reflector, new LogicalFileSystem([...this.adapter.rootDirs], this.adapter));
|
|
@@ -41915,8 +41839,8 @@ var NgCompiler = class {
|
|
|
41915
41839
|
}
|
|
41916
41840
|
const cycleHandlingStrategy = compilationMode === CompilationMode.FULL ? 0 : 1;
|
|
41917
41841
|
const strictCtorDeps = this.options.strictInjectionParameters || false;
|
|
41918
|
-
const supportJitMode = (_a2 = this.options
|
|
41919
|
-
const supportTestBed = (_b2 = this.options
|
|
41842
|
+
const supportJitMode = (_a2 = this.options["supportJitMode"]) != null ? _a2 : true;
|
|
41843
|
+
const supportTestBed = (_b2 = this.options["supportTestBed"]) != null ? _b2 : true;
|
|
41920
41844
|
if (supportTestBed === false && compilationMode === CompilationMode.PARTIAL) {
|
|
41921
41845
|
throw new Error('TestBed support ("supportTestBed" option) cannot be disabled in partial compilation mode.');
|
|
41922
41846
|
}
|