@angular/upgrade 19.0.0-next.6 → 19.0.0-next.8

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License
2
+
3
+ Copyright (c) 2010-2024 Google LLC. https://angular.dev/license
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v19.0.0-next.6
2
+ * @license Angular v19.0.0-next.8
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -18,11 +18,11 @@ class AngularTestingModule {
18
18
  constructor(i) {
19
19
  injector = i;
20
20
  }
21
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: AngularTestingModule, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.NgModule }); }
22
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.0-next.6", ngImport: i0, type: AngularTestingModule }); }
23
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: AngularTestingModule, providers: [{ provide: ɵconstants.$INJECTOR, useFactory: $injectorFactory }] }); }
21
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.8", ngImport: i0, type: AngularTestingModule, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.NgModule }); }
22
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.0-next.8", ngImport: i0, type: AngularTestingModule }); }
23
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.0-next.8", ngImport: i0, type: AngularTestingModule, providers: [{ provide: ɵconstants.$INJECTOR, useFactory: $injectorFactory }] }); }
24
24
  }
25
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: AngularTestingModule, decorators: [{
25
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.8", ngImport: i0, type: AngularTestingModule, decorators: [{
26
26
  type: NgModule,
27
27
  args: [{ providers: [{ provide: ɵconstants.$INJECTOR, useFactory: $injectorFactory }] }]
28
28
  }], ctorParameters: () => [{ type: i0.Injector }] });
@@ -1 +1 @@
1
- {"version":3,"file":"testing.mjs","sources":["../../../../../../../packages/upgrade/static/testing/src/create_angular_testing_module.ts","../../../../../../../packages/upgrade/static/testing/src/create_angularjs_testing_module.ts","../../../../../../../packages/upgrade/static/testing/testing.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector, NgModule, Type} from '@angular/core';\nimport {ɵangular1 as angular, ɵconstants} from '@angular/upgrade/static';\n\nimport {UpgradeAppType} from '../../../src/common/src/util';\n\nlet $injector: angular.IInjectorService | null = null;\nlet injector: Injector;\n\nexport function $injectorFactory() {\n return $injector;\n}\n\n@NgModule({providers: [{provide: ɵconstants.$INJECTOR, useFactory: $injectorFactory}]})\nexport class AngularTestingModule {\n constructor(i: Injector) {\n injector = i;\n }\n}\n\n/**\n * A helper function to use when unit testing Angular services that depend upon upgraded AngularJS\n * services.\n *\n * This function returns an `NgModule` decorated class that is configured to wire up the Angular\n * and AngularJS injectors without the need to actually bootstrap a hybrid application.\n * This makes it simpler and faster to unit test services.\n *\n * Use the returned class as an \"import\" when configuring the `TestBed`.\n *\n * In the following code snippet, we are configuring the TestBed with two imports.\n * The `Ng2AppModule` is the Angular part of our hybrid application and the `ng1AppModule` is the\n * AngularJS part.\n *\n * <code-example path=\"upgrade/static/ts/full/module.spec.ts\" region=\"angular-setup\"></code-example>\n *\n * Once this is done we can get hold of services via the Angular `Injector` as normal.\n * Services that are (or have dependencies on) an upgraded AngularJS service, will be instantiated\n * as needed by the AngularJS `$injector`.\n *\n * In the following code snippet, `HeroesService` is an Angular service that depends upon an\n * AngularJS service, `titleCase`.\n *\n * <code-example path=\"upgrade/static/ts/full/module.spec.ts\" region=\"angular-spec\"></code-example>\n *\n * <div class=\"alert is-important\">\n *\n * This helper is for testing services not Components.\n * For Component testing you must still bootstrap a hybrid app. See `UpgradeModule` or\n * `downgradeModule` for more information.\n *\n * </div>\n *\n * <div class=\"alert is-important\">\n *\n * The resulting configuration does not wire up AngularJS digests to Zone hooks. It is the\n * responsibility of the test writer to call `$rootScope.$apply`, as necessary, to trigger\n * AngularJS handlers of async events from Angular.\n *\n * </div>\n *\n * <div class=\"alert is-important\">\n *\n * The helper sets up global variables to hold the shared Angular and AngularJS injectors.\n *\n * * Only call this helper once per spec.\n * * Do not use `createAngularTestingModule` in the same spec as `createAngularJSTestingModule`.\n *\n * </div>\n *\n * Here is the example application and its unit tests that use `createAngularTestingModule`\n * and `createAngularJSTestingModule`.\n *\n * <code-tabs>\n * <code-pane header=\"module.spec.ts\" path=\"upgrade/static/ts/full/module.spec.ts\"></code-pane>\n * <code-pane header=\"module.ts\" path=\"upgrade/static/ts/full/module.ts\"></code-pane>\n * </code-tabs>\n *\n *\n * @param angularJSModules a collection of the names of AngularJS modules to include in the\n * configuration.\n * @param [strictDi] whether the AngularJS injector should have `strictDI` enabled.\n *\n * @publicApi\n */\nexport function createAngularTestingModule(\n angularJSModules: string[],\n strictDi?: boolean,\n): Type<any> {\n angular\n .module_('$$angularJSTestingModule', angularJSModules)\n .constant(ɵconstants.UPGRADE_APP_TYPE_KEY, UpgradeAppType.Static)\n .factory(ɵconstants.INJECTOR_KEY, () => injector);\n $injector = angular.injector(['ng', '$$angularJSTestingModule'], strictDi);\n return AngularTestingModule;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\nimport {TestBed} from '@angular/core/testing';\nimport {ɵangular1 as ng, ɵconstants} from '@angular/upgrade/static';\n\nimport {UpgradeAppType} from '../../../src/common/src/util';\n\n/**\n * A helper function to use when unit testing AngularJS services that depend upon downgraded Angular\n * services.\n *\n * This function returns an AngularJS module that is configured to wire up the AngularJS and Angular\n * injectors without the need to actually bootstrap a hybrid application.\n * This makes it simpler and faster to unit test services.\n *\n * Use the returned AngularJS module in a call to\n * [`angular.mocks.module`](https://docs.angularjs.org/api/ngMock/function/angular.mock.module) to\n * include this module in the unit test injector.\n *\n * In the following code snippet, we are configuring the `$injector` with two modules:\n * The AngularJS `ng1AppModule`, which is the AngularJS part of our hybrid application and the\n * `Ng2AppModule`, which is the Angular part.\n *\n * <code-example path=\"upgrade/static/ts/full/module.spec.ts\"\n * region=\"angularjs-setup\"></code-example>\n *\n * Once this is done we can get hold of services via the AngularJS `$injector` as normal.\n * Services that are (or have dependencies on) a downgraded Angular service, will be instantiated as\n * needed by the Angular root `Injector`.\n *\n * In the following code snippet, `heroesService` is a downgraded Angular service that we are\n * accessing from AngularJS.\n *\n * <code-example path=\"upgrade/static/ts/full/module.spec.ts\"\n * region=\"angularjs-spec\"></code-example>\n *\n * <div class=\"alert is-important\">\n *\n * This helper is for testing services not components.\n * For Component testing you must still bootstrap a hybrid app. See `UpgradeModule` or\n * `downgradeModule` for more information.\n *\n * </div>\n *\n * <div class=\"alert is-important\">\n *\n * The resulting configuration does not wire up AngularJS digests to Zone hooks. It is the\n * responsibility of the test writer to call `$rootScope.$apply`, as necessary, to trigger\n * AngularJS handlers of async events from Angular.\n *\n * </div>\n *\n * <div class=\"alert is-important\">\n *\n * The helper sets up global variables to hold the shared Angular and AngularJS injectors.\n *\n * * Only call this helper once per spec.\n * * Do not use `createAngularJSTestingModule` in the same spec as `createAngularTestingModule`.\n *\n * </div>\n *\n * Here is the example application and its unit tests that use `createAngularTestingModule`\n * and `createAngularJSTestingModule`.\n *\n * <code-tabs>\n * <code-pane header=\"module.spec.ts\" path=\"upgrade/static/ts/full/module.spec.ts\"></code-pane>\n * <code-pane header=\"module.ts\" path=\"upgrade/static/ts/full/module.ts\"></code-pane>\n * </code-tabs>\n *\n *\n * @param angularModules a collection of Angular modules to include in the configuration.\n *\n * @publicApi\n */\nexport function createAngularJSTestingModule(angularModules: any[]): string {\n return ng\n .module_('$$angularJSTestingModule', [])\n .constant(ɵconstants.UPGRADE_APP_TYPE_KEY, UpgradeAppType.Static)\n .factory(ɵconstants.INJECTOR_KEY, [\n ɵconstants.$INJECTOR,\n ($injector: ng.IInjectorService) => {\n TestBed.configureTestingModule({\n imports: angularModules,\n providers: [{provide: ɵconstants.$INJECTOR, useValue: $injector}],\n });\n return TestBed.inject(Injector);\n },\n ]).name;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["angular","ng"],"mappings":";;;;;;;;;;;AAaA,IAAI,SAAS,GAAoC,IAAI,CA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S,GAAGA,SAAO,CAAC,QAAQ,CAAC,CAAC,IAAI,EAAE,0BAA0B,CAAC,EAAE,QAAQ,CAAC,CAAC;AAC3E,IAAA,OAAO,oBAAoB,CAAC;AAC9B;;ACxFA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkEG;AACG,SAAU,4BAA4B,CAAC,cAAqB,EAAA;AAChE,IAAA,OAAOC,SAAE;AACN,SAAA,OAAO,CAAC,0BAA0B,EAAE,EAAE,CAAC;AACvC,SAAA,QAAQ,CAAC,UAAU,CAAC,oBAAoB,EAAwB,CAAA,6BAAA;AAChE,SAAA,OAAO,CAAC,UAAU,CAAC,YAAY,EAAE;AAChC,QAAA,UAAU,CAAC,SAAS;QACpB,CAAC,SAA8B,KAAI;YACjC,OAAO,CAAC,sBAAsB,CAAC;AAC7B,gBAAA,OAAO,EAAE,cAAc;AACvB,gBAAA,SAAS,EAAE,CAAC,EAAC,OAAO,EAAE,UAAU,CAAC,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAC,CAAC;AAClE,aAAA,CAAC,CAAC;AACH,YAAA,OAAO,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;SACjC;KACF,CAAC,CAAC,IAAI,CAAC;AACZ;;AC/FA;;AAEG;;;;"}
1
+ {"version":3,"file":"testing.mjs","sources":["../../../../../../../packages/upgrade/static/testing/src/create_angular_testing_module.ts","../../../../../../../packages/upgrade/static/testing/src/create_angularjs_testing_module.ts","../../../../../../../packages/upgrade/static/testing/testing.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Injector, NgModule, Type} from '@angular/core';\nimport {ɵangular1 as angular, ɵconstants} from '@angular/upgrade/static';\n\nimport {UpgradeAppType} from '../../../src/common/src/util';\n\nlet $injector: angular.IInjectorService | null = null;\nlet injector: Injector;\n\nexport function $injectorFactory() {\n return $injector;\n}\n\n@NgModule({providers: [{provide: ɵconstants.$INJECTOR, useFactory: $injectorFactory}]})\nexport class AngularTestingModule {\n constructor(i: Injector) {\n injector = i;\n }\n}\n\n/**\n * A helper function to use when unit testing Angular services that depend upon upgraded AngularJS\n * services.\n *\n * This function returns an `NgModule` decorated class that is configured to wire up the Angular\n * and AngularJS injectors without the need to actually bootstrap a hybrid application.\n * This makes it simpler and faster to unit test services.\n *\n * Use the returned class as an \"import\" when configuring the `TestBed`.\n *\n * In the following code snippet, we are configuring the TestBed with two imports.\n * The `Ng2AppModule` is the Angular part of our hybrid application and the `ng1AppModule` is the\n * AngularJS part.\n *\n * <code-example path=\"upgrade/static/ts/full/module.spec.ts\" region=\"angular-setup\"></code-example>\n *\n * Once this is done we can get hold of services via the Angular `Injector` as normal.\n * Services that are (or have dependencies on) an upgraded AngularJS service, will be instantiated\n * as needed by the AngularJS `$injector`.\n *\n * In the following code snippet, `HeroesService` is an Angular service that depends upon an\n * AngularJS service, `titleCase`.\n *\n * <code-example path=\"upgrade/static/ts/full/module.spec.ts\" region=\"angular-spec\"></code-example>\n *\n * <div class=\"alert is-important\">\n *\n * This helper is for testing services not Components.\n * For Component testing you must still bootstrap a hybrid app. See `UpgradeModule` or\n * `downgradeModule` for more information.\n *\n * </div>\n *\n * <div class=\"alert is-important\">\n *\n * The resulting configuration does not wire up AngularJS digests to Zone hooks. It is the\n * responsibility of the test writer to call `$rootScope.$apply`, as necessary, to trigger\n * AngularJS handlers of async events from Angular.\n *\n * </div>\n *\n * <div class=\"alert is-important\">\n *\n * The helper sets up global variables to hold the shared Angular and AngularJS injectors.\n *\n * * Only call this helper once per spec.\n * * Do not use `createAngularTestingModule` in the same spec as `createAngularJSTestingModule`.\n *\n * </div>\n *\n * Here is the example application and its unit tests that use `createAngularTestingModule`\n * and `createAngularJSTestingModule`.\n *\n * <code-tabs>\n * <code-pane header=\"module.spec.ts\" path=\"upgrade/static/ts/full/module.spec.ts\"></code-pane>\n * <code-pane header=\"module.ts\" path=\"upgrade/static/ts/full/module.ts\"></code-pane>\n * </code-tabs>\n *\n *\n * @param angularJSModules a collection of the names of AngularJS modules to include in the\n * configuration.\n * @param [strictDi] whether the AngularJS injector should have `strictDI` enabled.\n *\n * @publicApi\n */\nexport function createAngularTestingModule(\n angularJSModules: string[],\n strictDi?: boolean,\n): Type<any> {\n angular\n .module_('$$angularJSTestingModule', angularJSModules)\n .constant(ɵconstants.UPGRADE_APP_TYPE_KEY, UpgradeAppType.Static)\n .factory(ɵconstants.INJECTOR_KEY, () => injector);\n $injector = angular.injector(['ng', '$$angularJSTestingModule'], strictDi);\n return AngularTestingModule;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Injector} from '@angular/core';\nimport {TestBed} from '@angular/core/testing';\nimport {ɵangular1 as ng, ɵconstants} from '@angular/upgrade/static';\n\nimport {UpgradeAppType} from '../../../src/common/src/util';\n\n/**\n * A helper function to use when unit testing AngularJS services that depend upon downgraded Angular\n * services.\n *\n * This function returns an AngularJS module that is configured to wire up the AngularJS and Angular\n * injectors without the need to actually bootstrap a hybrid application.\n * This makes it simpler and faster to unit test services.\n *\n * Use the returned AngularJS module in a call to\n * [`angular.mocks.module`](https://docs.angularjs.org/api/ngMock/function/angular.mock.module) to\n * include this module in the unit test injector.\n *\n * In the following code snippet, we are configuring the `$injector` with two modules:\n * The AngularJS `ng1AppModule`, which is the AngularJS part of our hybrid application and the\n * `Ng2AppModule`, which is the Angular part.\n *\n * <code-example path=\"upgrade/static/ts/full/module.spec.ts\"\n * region=\"angularjs-setup\"></code-example>\n *\n * Once this is done we can get hold of services via the AngularJS `$injector` as normal.\n * Services that are (or have dependencies on) a downgraded Angular service, will be instantiated as\n * needed by the Angular root `Injector`.\n *\n * In the following code snippet, `heroesService` is a downgraded Angular service that we are\n * accessing from AngularJS.\n *\n * <code-example path=\"upgrade/static/ts/full/module.spec.ts\"\n * region=\"angularjs-spec\"></code-example>\n *\n * <div class=\"alert is-important\">\n *\n * This helper is for testing services not components.\n * For Component testing you must still bootstrap a hybrid app. See `UpgradeModule` or\n * `downgradeModule` for more information.\n *\n * </div>\n *\n * <div class=\"alert is-important\">\n *\n * The resulting configuration does not wire up AngularJS digests to Zone hooks. It is the\n * responsibility of the test writer to call `$rootScope.$apply`, as necessary, to trigger\n * AngularJS handlers of async events from Angular.\n *\n * </div>\n *\n * <div class=\"alert is-important\">\n *\n * The helper sets up global variables to hold the shared Angular and AngularJS injectors.\n *\n * * Only call this helper once per spec.\n * * Do not use `createAngularJSTestingModule` in the same spec as `createAngularTestingModule`.\n *\n * </div>\n *\n * Here is the example application and its unit tests that use `createAngularTestingModule`\n * and `createAngularJSTestingModule`.\n *\n * <code-tabs>\n * <code-pane header=\"module.spec.ts\" path=\"upgrade/static/ts/full/module.spec.ts\"></code-pane>\n * <code-pane header=\"module.ts\" path=\"upgrade/static/ts/full/module.ts\"></code-pane>\n * </code-tabs>\n *\n *\n * @param angularModules a collection of Angular modules to include in the configuration.\n *\n * @publicApi\n */\nexport function createAngularJSTestingModule(angularModules: any[]): string {\n return ng\n .module_('$$angularJSTestingModule', [])\n .constant(ɵconstants.UPGRADE_APP_TYPE_KEY, UpgradeAppType.Static)\n .factory(ɵconstants.INJECTOR_KEY, [\n ɵconstants.$INJECTOR,\n ($injector: ng.IInjectorService) => {\n TestBed.configureTestingModule({\n imports: angularModules,\n providers: [{provide: ɵconstants.$INJECTOR, useValue: $injector}],\n });\n return TestBed.inject(Injector);\n },\n ]).name;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["angular","ng"],"mappings":";;;;;;;;;;;AAaA,IAAI,SAAS,GAAoC,IAAI,CAAC;AACtD,IAAI,QAAkB,CAAC;SAEP,gBAAgB,GAAA;AAC9B,IAAA,OAAO,SAAS,CAAC;AACnB,CAAC;MAGY,o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IAAA,OAAO,oBAAoB,CAAC;AAC9B;;ACxFA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkEG;AACG,SAAU,4BAA4B,CAAC,cAAqB,EAAA;AAChE,IAAA,OAAOC,SAAE;AACN,SAAA,OAAO,CAAC,0BAA0B,EAAE,EAAE,CAAC;AACvC,SAAA,QAAQ,CAAC,UAAU,CAAC,oBAAoB,EAAwB,CAAA,6BAAA;AAChE,SAAA,OAAO,CAAC,UAAU,CAAC,YAAY,EAAE;AAChC,QAAA,UAAU,CAAC,SAAS;QACpB,CAAC,SAA8B,KAAI;YACjC,OAAO,CAAC,sBAAsB,CAAC;AAC7B,gBAAA,OAAO,EAAE,cAAc;AACvB,gBAAA,SAAS,EAAE,CAAC,EAAC,OAAO,EAAE,UAAU,CAAC,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAC,CAAC;AAClE,aAAA,CAAC,CAAC;AACH,YAAA,OAAO,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;SACjC;KACF,CAAC,CAAC,IAAI,CAAC;AACZ;;AC/FA;;AAEG;;;;"}
@@ -1,11 +1,11 @@
1
1
  /**
2
- * @license Angular v19.0.0-next.6
2
+ * @license Angular v19.0.0-next.8
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
6
6
 
7
7
  import * as i0 from '@angular/core';
8
- import { ɵNG_MOD_DEF, Injector, ChangeDetectorRef, Testability, TestabilityRegistry, ApplicationRef, SimpleChange, NgZone, ComponentFactoryResolver, Version, ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, PlatformRef, EventEmitter, Directive, NgModule } from '@angular/core';
8
+ import { ɵNG_MOD_DEF, Injector, ChangeDetectorRef, Testability, TestabilityRegistry, ApplicationRef, SimpleChange, ɵSIGNAL, NgZone, ComponentFactoryResolver, Version, ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, PlatformRef, EventEmitter, Directive, NgModule } from '@angular/core';
9
9
  import { platformBrowser } from '@angular/platform-browser';
10
10
 
11
11
  function noNg() {
@@ -326,7 +326,7 @@ const INITIAL_VALUE$1 = {
326
326
  __UNINITIALIZED__: true,
327
327
  };
328
328
  class DowngradeComponentAdapter {
329
- constructor(element, attrs, scope, ngModel, parentInjector, $compile, $parse, componentFactory, wrapCallback) {
329
+ constructor(element, attrs, scope, ngModel, parentInjector, $compile, $parse, componentFactory, wrapCallback, unsafelyOverwriteSignalInputs) {
330
330
  this.element = element;
331
331
  this.attrs = attrs;
332
332
  this.scope = scope;
@@ -336,6 +336,7 @@ class DowngradeComponentAdapter {
336
336
  this.$parse = $parse;
337
337
  this.componentFactory = componentFactory;
338
338
  this.wrapCallback = wrapCallback;
339
+ this.unsafelyOverwriteSignalInputs = unsafelyOverwriteSignalInputs;
339
340
  this.implementsOnChanges = false;
340
341
  this.inputChangeCount = 0;
341
342
  this.inputChanges = {};
@@ -391,7 +392,7 @@ class DowngradeComponentAdapter {
391
392
  const inputBinding = new PropertyBinding(input.propName, input.templateName);
392
393
  let expr = null;
393
394
  if (attrs.hasOwnProperty(inputBinding.attr)) {
394
- const observeFn = ((prop) => {
395
+ const observeFn = ((prop, isSignal) => {
395
396
  let prevValue = INITIAL_VALUE$1;
396
397
  return (currValue) => {
397
398
  // Initially, both `$observe()` and `$watch()` will call this function.
@@ -399,11 +400,11 @@ class DowngradeComponentAdapter {
399
400
  if (prevValue === INITIAL_VALUE$1) {
400
401
  prevValue = currValue;
401
402
  }
402
- this.updateInput(componentRef, prop, prevValue, currValue);
403
+ this.updateInput(componentRef, prop, prevValue, currValue, isSignal);
403
404
  prevValue = currValue;
404
405
  }
405
406
  };
406
- })(inputBinding.prop);
407
+ })(inputBinding.prop, input.isSignal);
407
408
  attrs.$observe(inputBinding.attr, observeFn);
408
409
  // Use `$watch()` (in addition to `$observe()`) in order to initialize the input in time
409
410
  // for `ngOnChanges()`. This is necessary if we are already in a `$digest`, which means that
@@ -427,7 +428,7 @@ class DowngradeComponentAdapter {
427
428
  expr = attrs[inputBinding.bracketParenAttr];
428
429
  }
429
430
  if (expr != null) {
430
- const watchFn = ((prop) => (currValue, prevValue) => this.updateInput(componentRef, prop, prevValue, currValue))(inputBinding.prop);
431
+ const watchFn = ((prop, isSignal) => (currValue, prevValue) => this.updateInput(componentRef, prop, prevValue, currValue, isSignal))(inputBinding.prop, input.isSignal);
431
432
  this.componentScope.$watch(expr, watchFn);
432
433
  }
433
434
  }
@@ -538,12 +539,18 @@ class DowngradeComponentAdapter {
538
539
  }
539
540
  });
540
541
  }
541
- updateInput(componentRef, prop, prevValue, currValue) {
542
+ updateInput(componentRef, prop, prevValue, currValue, isSignal) {
542
543
  if (this.implementsOnChanges) {
543
544
  this.inputChanges[prop] = new SimpleChange(prevValue, currValue, prevValue === currValue);
544
545
  }
545
546
  this.inputChangeCount++;
546
- componentRef.instance[prop] = currValue;
547
+ if (isSignal && !this.unsafelyOverwriteSignalInputs) {
548
+ const node = componentRef.instance[prop][ɵSIGNAL];
549
+ node.applyValueToInputSignal(node, currValue);
550
+ }
551
+ else {
552
+ componentRef.instance[prop] = currValue;
553
+ }
547
554
  }
548
555
  groupProjectableNodes() {
549
556
  let ngContentSelectors = this.componentFactory.ngContentSelectors;
@@ -696,6 +703,7 @@ class SyncPromise {
696
703
  */
697
704
  function downgradeComponent(info) {
698
705
  const directiveFactory = function ($compile, $injector, $parse) {
706
+ const unsafelyOverwriteSignalInputs = info.unsafelyOverwriteSignalInputs ?? false;
699
707
  // When using `downgradeModule()`, we need to handle certain things specially. For example:
700
708
  // - We always need to attach the component view to the `ApplicationRef` for it to be
701
709
  // dirty-checked.
@@ -783,7 +791,7 @@ function downgradeComponent(info) {
783
791
  throw new Error(`Expecting ComponentFactory for: ${getTypeName(info.component)}`);
784
792
  }
785
793
  const injectorPromise = new ParentInjectorPromise(element);
786
- const facade = new DowngradeComponentAdapter(element, attrs, scope, ngModel, injector, $compile, $parse, componentFactory, wrapCallback);
794
+ const facade = new DowngradeComponentAdapter(element, attrs, scope, ngModel, injector, $compile, $parse, componentFactory, wrapCallback, unsafelyOverwriteSignalInputs);
787
795
  const projectableNodes = facade.compileContents();
788
796
  const componentRef = facade.createComponentAndSetup(projectableNodes, isNgUpgradeLite, info.propagateDigest);
789
797
  injectorPromise.resolve(componentRef.injector);
@@ -922,7 +930,7 @@ function downgradeInjectable(token, downgradedModule = '') {
922
930
  /**
923
931
  * @publicApi
924
932
  */
925
- const VERSION = new Version('19.0.0-next.6');
933
+ const VERSION = new Version('19.0.0-next.8');
926
934
 
927
935
  /**
928
936
  * The Trusted Types policy, or null if Trusted Types are not
@@ -1672,10 +1680,10 @@ class UpgradeComponent {
1672
1680
  bindingDestination.$onChanges(changes);
1673
1681
  }
1674
1682
  }
1675
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: UpgradeComponent, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive }); }
1676
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-next.6", type: UpgradeComponent, usesOnChanges: true, ngImport: i0 }); }
1683
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.8", ngImport: i0, type: UpgradeComponent, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive }); }
1684
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-next.8", type: UpgradeComponent, usesOnChanges: true, ngImport: i0 }); }
1677
1685
  }
1678
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: UpgradeComponent, decorators: [{
1686
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.8", ngImport: i0, type: UpgradeComponent, decorators: [{
1679
1687
  type: Directive
1680
1688
  }], ctorParameters: () => [{ type: undefined }, { type: i0.ElementRef }, { type: i0.Injector }] });
1681
1689
 
@@ -1951,11 +1959,11 @@ class UpgradeModule {
1951
1959
  }
1952
1960
  return returnValue;
1953
1961
  }
1954
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: UpgradeModule, deps: [{ token: i0.Injector }, { token: i0.NgZone }, { token: i0.PlatformRef }], target: i0.ɵɵFactoryTarget.NgModule }); }
1955
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.0-next.6", ngImport: i0, type: UpgradeModule }); }
1956
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: UpgradeModule, providers: [angular1Providers] }); }
1962
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.8", ngImport: i0, type: UpgradeModule, deps: [{ token: i0.Injector }, { token: i0.NgZone }, { token: i0.PlatformRef }], target: i0.ɵɵFactoryTarget.NgModule }); }
1963
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.0-next.8", ngImport: i0, type: UpgradeModule }); }
1964
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.0-next.8", ngImport: i0, type: UpgradeModule, providers: [angular1Providers] }); }
1957
1965
  }
1958
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.6", ngImport: i0, type: UpgradeModule, decorators: [{
1966
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.8", ngImport: i0, type: UpgradeModule, decorators: [{
1959
1967
  type: NgModule,
1960
1968
  args: [{ providers: [angular1Providers] }]
1961
1969
  }], ctorParameters: () => [{ type: i0.Injector }, { type: i0.NgZone }, { type: i0.PlatformRef }] });