@angular/router 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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v17.0.0-next.3
2
+ * @license Angular v17.0.0-next.4
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -109,16 +109,16 @@ class RouterTestingModule {
109
109
  ]
110
110
  };
111
111
  }
112
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.3", ngImport: i0, type: RouterTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
113
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.0-next.3", ngImport: i0, type: RouterTestingModule, exports: [RouterModule] }); }
114
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.0-next.3", ngImport: i0, type: RouterTestingModule, providers: [
112
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.4", ngImport: i0, type: RouterTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
113
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.0-next.4", ngImport: i0, type: RouterTestingModule, exports: [RouterModule] }); }
114
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.0-next.4", ngImport: i0, type: RouterTestingModule, providers: [
115
115
  ɵROUTER_PROVIDERS,
116
116
  provideLocationMocks(),
117
117
  withPreloading(NoPreloading).ɵproviders,
118
118
  { provide: ROUTES, multi: true, useValue: [] },
119
119
  ], imports: [RouterModule] }); }
120
120
  }
121
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.3", ngImport: i0, type: RouterTestingModule, decorators: [{
121
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.4", ngImport: i0, type: RouterTestingModule, decorators: [{
122
122
  type: NgModule,
123
123
  args: [{
124
124
  exports: [RouterModule],
@@ -147,18 +147,18 @@ class RootFixtureService {
147
147
  this.fixture.detectChanges();
148
148
  return this.fixture;
149
149
  }
150
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.3", ngImport: i0, type: RootFixtureService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
151
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.3", ngImport: i0, type: RootFixtureService, providedIn: 'root' }); }
150
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.4", ngImport: i0, type: RootFixtureService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
151
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.4", ngImport: i0, type: RootFixtureService, providedIn: 'root' }); }
152
152
  }
153
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.3", ngImport: i0, type: RootFixtureService, decorators: [{
153
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.4", ngImport: i0, type: RootFixtureService, decorators: [{
154
154
  type: Injectable,
155
155
  args: [{ providedIn: 'root' }]
156
156
  }] });
157
157
  class RootCmp {
158
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.3", ngImport: i0, type: RootCmp, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
159
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.0-next.3", type: RootCmp, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "outlet", first: true, predicate: RouterOutlet, descendants: true }], ngImport: i0, template: '<router-outlet></router-outlet>', isInline: true, dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] }); }
158
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.4", ngImport: i0, type: RootCmp, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
159
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.0-next.4", type: RootCmp, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "outlet", first: true, predicate: RouterOutlet, descendants: true }], ngImport: i0, template: '<router-outlet></router-outlet>', isInline: true, dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] }); }
160
160
  }
161
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.3", ngImport: i0, type: RootCmp, decorators: [{
161
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.4", ngImport: i0, type: RootCmp, decorators: [{
162
162
  type: Component,
163
163
  args: [{
164
164
  standalone: true,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v17.0.0-next.3
2
+ * @license Angular v17.0.0-next.4
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v17.0.0-next.3
2
+ * @license Angular v17.0.0-next.4
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1030,6 +1030,15 @@ export declare interface ExtraOptions extends InMemoryScrollingOptions, RouterCo
1030
1030
  * component in `Route` configurations.
1031
1031
  */
1032
1032
  bindToComponentInputs?: boolean;
1033
+ /**
1034
+ * When true, enables view transitions in the Router by running the route activation and
1035
+ * deactivation inside of `document.startViewTransition`.
1036
+ *
1037
+ * @see https://developer.chrome.com/docs/web-platform/view-transitions/
1038
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API
1039
+ * @experimental
1040
+ */
1041
+ enableViewTransitions?: boolean;
1033
1042
  /**
1034
1043
  * A custom error handler for failed navigations.
1035
1044
  * If the handler returns a value, the navigation Promise is resolved with this value.
@@ -3143,7 +3152,8 @@ declare const enum RouterFeatureKind {
3143
3152
  RouterConfigurationFeature = 5,
3144
3153
  RouterHashLocationFeature = 6,
3145
3154
  NavigationErrorHandlerFeature = 7,
3146
- ComponentInputBindingFeature = 8
3155
+ ComponentInputBindingFeature = 8,
3156
+ ViewTransitionsFeature = 9
3147
3157
  }
3148
3158
 
3149
3159
  /**
@@ -3156,7 +3166,7 @@ declare const enum RouterFeatureKind {
3156
3166
  *
3157
3167
  * @publicApi
3158
3168
  */
3159
- export declare type RouterFeatures = PreloadingFeature | DebugTracingFeature | InitialNavigationFeature | InMemoryScrollingFeature | RouterConfigurationFeature | NavigationErrorHandlerFeature | ComponentInputBindingFeature;
3169
+ export declare type RouterFeatures = PreloadingFeature | DebugTracingFeature | InitialNavigationFeature | InMemoryScrollingFeature | RouterConfigurationFeature | NavigationErrorHandlerFeature | ComponentInputBindingFeature | ViewTransitionsFeature;
3160
3170
 
3161
3171
  /**
3162
3172
  * A type alias for providers returned by `withHashLocation` for use with `provideRouter`.
@@ -4334,6 +4344,16 @@ export declare class UrlTree {
4334
4344
  */
4335
4345
  export declare const VERSION: Version;
4336
4346
 
4347
+ /**
4348
+ * A type alias for providers returned by `withViewTransitions` for use with `provideRouter`.
4349
+ *
4350
+ * @see {@link withViewTransitions}
4351
+ * @see {@link provideRouter}
4352
+ *
4353
+ * @publicApi
4354
+ */
4355
+ export declare type ViewTransitionsFeature = RouterFeature<RouterFeatureKind.ViewTransitionsFeature>;
4356
+
4337
4357
  /**
4338
4358
  * Enables binding information from the `Router` state directly to the inputs of the component in
4339
4359
  * `Route` configurations.
@@ -4579,6 +4599,35 @@ export declare function withPreloading(preloadingStrategy: Type<PreloadingStrate
4579
4599
  */
4580
4600
  export declare function withRouterConfig(options: RouterConfigOptions): RouterConfigurationFeature;
4581
4601
 
4602
+ /**
4603
+ * Enables view transitions in the Router by running the route activation and deactivation inside of
4604
+ * `document.startViewTransition`.
4605
+ *
4606
+ * Note: The View Transitions API is not available in all browsers. If the browser does not support
4607
+ * view transitions, the Router will not attempt to start a view transition and continue processing
4608
+ * the navigation as usual.
4609
+ *
4610
+ * @usageNotes
4611
+ *
4612
+ * Basic example of how you can enable the feature:
4613
+ * ```
4614
+ * const appRoutes: Routes = [];
4615
+ * bootstrapApplication(AppComponent,
4616
+ * {
4617
+ * providers: [
4618
+ * provideRouter(appRoutes, withViewTransitions())
4619
+ * ]
4620
+ * }
4621
+ * );
4622
+ * ```
4623
+ *
4624
+ * @returns A set of providers for use with `provideRouter`.
4625
+ * @see https://developer.chrome.com/docs/web-platform/view-transitions/
4626
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API
4627
+ * @experimental
4628
+ */
4629
+ export declare function withViewTransitions(): ViewTransitionsFeature;
4630
+
4582
4631
  /**
4583
4632
  * Performs the given action once the router finishes its next/current navigation.
4584
4633
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/router",
3
- "version": "17.0.0-next.3",
3
+ "version": "17.0.0-next.4",
4
4
  "description": "Angular - the routing library",
5
5
  "keywords": [
6
6
  "angular",
@@ -24,9 +24,9 @@
24
24
  "tslib": "^2.3.0"
25
25
  },
26
26
  "peerDependencies": {
27
- "@angular/core": "17.0.0-next.3",
28
- "@angular/common": "17.0.0-next.3",
29
- "@angular/platform-browser": "17.0.0-next.3",
27
+ "@angular/core": "17.0.0-next.4",
28
+ "@angular/common": "17.0.0-next.4",
29
+ "@angular/platform-browser": "17.0.0-next.4",
30
30
  "rxjs": "^6.5.3 || ^7.4.0"
31
31
  },
32
32
  "ng-update": {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v17.0.0-next.3
2
+ * @license Angular v17.0.0-next.4
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v17.0.0-next.3
2
+ * @license Angular v17.0.0-next.4
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */