@microsoft/fast-router 0.4.2 → 1.0.0-alpha.3
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/.eslintrc.json +0 -4
- package/CHANGELOG.json +135 -1
- package/CHANGELOG.md +35 -2
- package/README.md +3 -32
- package/dist/dts/commands.d.ts +5 -5
- package/dist/dts/configuration.d.ts +1 -1
- package/dist/dts/contributors.d.ts +24 -6
- package/dist/dts/events.d.ts +2 -2
- package/dist/dts/fast-router.d.ts +1 -1
- package/dist/dts/links.d.ts +2 -2
- package/dist/dts/navigation.d.ts +7 -7
- package/dist/dts/phases.d.ts +6 -6
- package/dist/dts/process.d.ts +2 -2
- package/dist/dts/query-string.d.ts +2 -2
- package/dist/dts/recognizer.d.ts +6 -6
- package/dist/dts/router.d.ts +6 -6
- package/dist/dts/routes.d.ts +26 -26
- package/dist/dts/titles.d.ts +2 -2
- package/dist/{tsdoc-metadata.json → dts/tsdoc-metadata.json} +1 -1
- package/dist/dts/view.d.ts +8 -8
- package/dist/esm/commands.js +10 -8
- package/dist/esm/configuration.js +1 -1
- package/dist/esm/contributors.js +9 -9
- package/dist/esm/events.js +1 -1
- package/dist/esm/fast-router.js +1 -1
- package/dist/esm/links.js +1 -1
- package/dist/esm/navigation.js +4 -4
- package/dist/esm/process.js +1 -1
- package/dist/esm/query-string.js +1 -1
- package/dist/esm/recognizer.js +16 -16
- package/dist/esm/router.js +4 -19
- package/dist/esm/routes.js +1 -1
- package/dist/esm/titles.js +1 -1
- package/dist/esm/view.js +8 -8
- package/dist/fast-router.api.json +9699 -2
- package/dist/fast-router.d.ts +101 -83
- package/dist/fast-router.untrimmed.d.ts +825 -0
- package/docs/api-report.md +90 -86
- package/karma.conf.cjs +6 -17
- package/package.json +12 -16
- package/dist/dts/index-rollup.d.ts +0 -2
- package/dist/esm/index-rollup.js +0 -2
- package/dist/fast-router.js +0 -6776
- package/dist/fast-router.min.js +0 -1
package/dist/fast-router.d.ts
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
+
import { AddViewBehaviorFactory } from '@microsoft/fast-element';
|
|
2
|
+
import { Behavior } from '@microsoft/fast-element';
|
|
1
3
|
import { ComposableStyles } from '@microsoft/fast-element';
|
|
2
4
|
import { Constructable } from '@microsoft/fast-element';
|
|
3
5
|
import { ExecutionContext } from '@microsoft/fast-element';
|
|
4
6
|
import { FASTElement } from '@microsoft/fast-element';
|
|
5
7
|
import { HTMLDirective } from '@microsoft/fast-element';
|
|
8
|
+
import { ViewBehaviorTargets } from '@microsoft/fast-element';
|
|
6
9
|
import { ViewTemplate } from '@microsoft/fast-element';
|
|
7
10
|
|
|
8
|
-
|
|
9
|
-
* @internal
|
|
10
|
-
*/
|
|
11
|
-
export declare const childRouteParameter = "fast-child-route";
|
|
11
|
+
/* Excluded from this release type: childRouteParameter */
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
* @
|
|
14
|
+
* @beta
|
|
15
15
|
*/
|
|
16
16
|
export declare type CommandFallbackRouteDefinition<TSettings = any> = HasCommand & SupportsSettings<TSettings> & HasTitle;
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
|
-
* @
|
|
19
|
+
* @beta
|
|
20
20
|
*/
|
|
21
21
|
export declare type CommandRouteDefinition<TSettings = any> = PathedRouteDefinition<TSettings> & HasCommand & HasTitle;
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
|
-
* @
|
|
24
|
+
* @beta
|
|
25
25
|
*/
|
|
26
26
|
export declare class ConfigurableRoute implements Route {
|
|
27
27
|
readonly path: string;
|
|
@@ -31,7 +31,7 @@ export declare class ConfigurableRoute implements Route {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
|
-
* @
|
|
34
|
+
* @beta
|
|
35
35
|
*/
|
|
36
36
|
export declare type ContributorOptions = {
|
|
37
37
|
lifecycle?: boolean;
|
|
@@ -39,14 +39,14 @@ export declare type ContributorOptions = {
|
|
|
39
39
|
};
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
|
-
* @
|
|
42
|
+
* @beta
|
|
43
43
|
*/
|
|
44
44
|
export declare type ConverterObject = {
|
|
45
45
|
convert: RouteParameterConverter;
|
|
46
46
|
};
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
|
-
* @
|
|
49
|
+
* @beta
|
|
50
50
|
*/
|
|
51
51
|
export declare class DefaultLinkHandler implements LinkHandler {
|
|
52
52
|
private handler;
|
|
@@ -58,7 +58,7 @@ export declare class DefaultLinkHandler implements LinkHandler {
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
/**
|
|
61
|
-
* @
|
|
61
|
+
* @beta
|
|
62
62
|
*/
|
|
63
63
|
export declare class DefaultNavigationProcess<TSettings> {
|
|
64
64
|
private phases;
|
|
@@ -67,7 +67,7 @@ export declare class DefaultNavigationProcess<TSettings> {
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
/**
|
|
70
|
-
* @
|
|
70
|
+
* @beta
|
|
71
71
|
*/
|
|
72
72
|
export declare class DefaultNavigationQueue implements NavigationQueue, NavigationHandler {
|
|
73
73
|
private queue;
|
|
@@ -82,7 +82,7 @@ export declare class DefaultNavigationQueue implements NavigationQueue, Navigati
|
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
/**
|
|
85
|
-
* @
|
|
85
|
+
* @beta
|
|
86
86
|
*/
|
|
87
87
|
export declare class DefaultRouter implements Router {
|
|
88
88
|
readonly host: HTMLElement;
|
|
@@ -125,7 +125,7 @@ export declare class DefaultRouter implements Router {
|
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
/**
|
|
128
|
-
* @
|
|
128
|
+
* @beta
|
|
129
129
|
*/
|
|
130
130
|
export declare class DefaultRouteRecognizer<TSettings> implements RouteRecognizer<TSettings> {
|
|
131
131
|
private names;
|
|
@@ -156,22 +156,22 @@ export declare class DefaultRouteRecognizer<TSettings> implements RouteRecognize
|
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
/**
|
|
159
|
-
* @
|
|
159
|
+
* @beta
|
|
160
160
|
*/
|
|
161
161
|
export declare type DefinitionCallback = () => Promise<FallbackRouteDefinition> | FallbackRouteDefinition;
|
|
162
162
|
|
|
163
163
|
/**
|
|
164
|
-
* @
|
|
164
|
+
* @beta
|
|
165
165
|
*/
|
|
166
166
|
export declare type ElementFallbackRouteDefinition<TSettings = any> = LayoutAndTransitionRouteDefinition & HasElement & SupportsSettings<TSettings> & HasTitle;
|
|
167
167
|
|
|
168
168
|
/**
|
|
169
|
-
* @
|
|
169
|
+
* @beta
|
|
170
170
|
*/
|
|
171
171
|
export declare type ElementRouteDefinition<TSettings = any> = NavigableRouteDefinition<TSettings> & HasElement;
|
|
172
172
|
|
|
173
173
|
/**
|
|
174
|
-
* @
|
|
174
|
+
* @beta
|
|
175
175
|
*/
|
|
176
176
|
export declare class Endpoint<TSettings = any> {
|
|
177
177
|
readonly route: ConfigurableRoute;
|
|
@@ -183,17 +183,17 @@ export declare class Endpoint<TSettings = any> {
|
|
|
183
183
|
}
|
|
184
184
|
|
|
185
185
|
/**
|
|
186
|
-
* @
|
|
186
|
+
* @beta
|
|
187
187
|
*/
|
|
188
188
|
export declare type FallbackRouteDefinition<TSettings = any> = ElementFallbackRouteDefinition<TSettings> | TemplateFallbackRouteDefinition<TSettings> | Pick<RedirectRouteDefinition<TSettings>, "redirect"> | CommandFallbackRouteDefinition<TSettings>;
|
|
189
189
|
|
|
190
190
|
/**
|
|
191
|
-
* @
|
|
191
|
+
* @beta
|
|
192
192
|
*/
|
|
193
193
|
export declare type FASTElementConstructor = new () => FASTElement;
|
|
194
194
|
|
|
195
195
|
/**
|
|
196
|
-
* @
|
|
196
|
+
* @beta
|
|
197
197
|
*/
|
|
198
198
|
export declare class FASTElementLayout implements Layout {
|
|
199
199
|
private readonly template;
|
|
@@ -206,7 +206,7 @@ export declare class FASTElementLayout implements Layout {
|
|
|
206
206
|
}
|
|
207
207
|
|
|
208
208
|
/**
|
|
209
|
-
* @
|
|
209
|
+
* @beta
|
|
210
210
|
*/
|
|
211
211
|
export declare class FASTRouter extends FASTRouter_base {
|
|
212
212
|
}
|
|
@@ -214,40 +214,40 @@ export declare class FASTRouter extends FASTRouter_base {
|
|
|
214
214
|
declare const FASTRouter_base: new () => FASTElement & RouterElement;
|
|
215
215
|
|
|
216
216
|
/**
|
|
217
|
-
* @
|
|
217
|
+
* @beta
|
|
218
218
|
*/
|
|
219
219
|
export declare type HasCommand = {
|
|
220
220
|
command: NavigationCommand;
|
|
221
221
|
};
|
|
222
222
|
|
|
223
223
|
/**
|
|
224
|
-
* @
|
|
224
|
+
* @beta
|
|
225
225
|
*/
|
|
226
226
|
export declare type HasElement = {
|
|
227
227
|
element: string | FASTElementConstructor | HTMLElement | (() => Promise<string | FASTElementConstructor | HTMLElement>);
|
|
228
228
|
};
|
|
229
229
|
|
|
230
230
|
/**
|
|
231
|
-
* @
|
|
231
|
+
* @beta
|
|
232
232
|
*/
|
|
233
233
|
export declare type HasTemplate = {
|
|
234
234
|
template: ViewTemplate | (() => Promise<ViewTemplate>);
|
|
235
235
|
};
|
|
236
236
|
|
|
237
237
|
/**
|
|
238
|
-
* @
|
|
238
|
+
* @beta
|
|
239
239
|
*/
|
|
240
240
|
export declare type HasTitle = {
|
|
241
241
|
title?: string;
|
|
242
242
|
};
|
|
243
243
|
|
|
244
244
|
/**
|
|
245
|
-
* @
|
|
245
|
+
* @beta
|
|
246
246
|
*/
|
|
247
247
|
export declare type IgnorableRouteDefinition<TSettings = any> = PathedRouteDefinition<TSettings>;
|
|
248
248
|
|
|
249
249
|
/**
|
|
250
|
-
* @
|
|
250
|
+
* @beta
|
|
251
251
|
*/
|
|
252
252
|
export declare class Ignore implements NavigationCommand {
|
|
253
253
|
createContributor(): Promise<{
|
|
@@ -256,17 +256,17 @@ export declare class Ignore implements NavigationCommand {
|
|
|
256
256
|
}
|
|
257
257
|
|
|
258
258
|
/**
|
|
259
|
-
* @
|
|
259
|
+
* @beta
|
|
260
260
|
*/
|
|
261
261
|
export declare function isFASTElementHost(host: HTMLElement): host is HTMLElement & FASTElement;
|
|
262
262
|
|
|
263
263
|
/**
|
|
264
|
-
* @
|
|
264
|
+
* @beta
|
|
265
265
|
*/
|
|
266
266
|
export declare function isNavigationPhaseContributor<T extends NavigationPhaseName>(object: any, phase: T): object is Record<T, NavigationPhaseHook>;
|
|
267
267
|
|
|
268
268
|
/**
|
|
269
|
-
* @
|
|
269
|
+
* @beta
|
|
270
270
|
*/
|
|
271
271
|
export declare interface Layout {
|
|
272
272
|
beforeCommit(routerElement: HTMLElement): Promise<void>;
|
|
@@ -274,14 +274,14 @@ export declare interface Layout {
|
|
|
274
274
|
}
|
|
275
275
|
|
|
276
276
|
/**
|
|
277
|
-
* @
|
|
277
|
+
* @beta
|
|
278
278
|
*/
|
|
279
279
|
export declare const Layout: Readonly<{
|
|
280
280
|
default: Readonly<Layout>;
|
|
281
281
|
}>;
|
|
282
282
|
|
|
283
283
|
/**
|
|
284
|
-
* @
|
|
284
|
+
* @beta
|
|
285
285
|
*/
|
|
286
286
|
export declare type LayoutAndTransitionRouteDefinition = {
|
|
287
287
|
layout?: Layout | ViewTemplate;
|
|
@@ -289,7 +289,7 @@ export declare type LayoutAndTransitionRouteDefinition = {
|
|
|
289
289
|
};
|
|
290
290
|
|
|
291
291
|
/**
|
|
292
|
-
* @
|
|
292
|
+
* @beta
|
|
293
293
|
*/
|
|
294
294
|
export declare interface LinkHandler {
|
|
295
295
|
connect(): void;
|
|
@@ -297,57 +297,75 @@ export declare interface LinkHandler {
|
|
|
297
297
|
}
|
|
298
298
|
|
|
299
299
|
/**
|
|
300
|
-
* @
|
|
300
|
+
* @beta
|
|
301
301
|
*/
|
|
302
302
|
export declare type MappableRouteDefinition<TSettings = any> = RenderableRouteDefinition<TSettings> | RedirectRouteDefinition<TSettings> | CommandRouteDefinition<TSettings> | ParentRouteDefinition<TSettings>;
|
|
303
303
|
|
|
304
304
|
/**
|
|
305
|
-
* @
|
|
305
|
+
* @beta
|
|
306
306
|
*/
|
|
307
307
|
export declare type NavigableRouteDefinition<TSettings = any> = PathedRouteDefinition<TSettings> & LayoutAndTransitionRouteDefinition & HasTitle & {
|
|
308
308
|
childRouters?: boolean;
|
|
309
309
|
};
|
|
310
310
|
|
|
311
311
|
/**
|
|
312
|
-
* @
|
|
312
|
+
* @beta
|
|
313
313
|
*/
|
|
314
314
|
export declare interface NavigationCommand {
|
|
315
315
|
createContributor(router: Router, route: RecognizedRoute): Promise<NavigationContributor>;
|
|
316
316
|
}
|
|
317
317
|
|
|
318
318
|
/**
|
|
319
|
-
* @
|
|
319
|
+
* @beta
|
|
320
320
|
*/
|
|
321
321
|
export declare interface NavigationCommitPhase<TSettings = any> extends Omit<NavigationPhase<TSettings>, "cancel" | "canceled" | "onCancel"> {
|
|
322
322
|
setTitle(title: string): any;
|
|
323
323
|
}
|
|
324
324
|
|
|
325
325
|
/**
|
|
326
|
-
* @
|
|
326
|
+
* @beta
|
|
327
327
|
*/
|
|
328
328
|
export declare type NavigationCommitPhaseHook<TSettings = any> = (phase: NavigationCommitPhase<TSettings>) => Promise<any> | any;
|
|
329
329
|
|
|
330
330
|
/**
|
|
331
|
-
* @
|
|
331
|
+
* @beta
|
|
332
332
|
*/
|
|
333
333
|
export declare type NavigationContributor<TSettings = any> = Partial<Record<Exclude<NavigationPhaseName, "commit">, NavigationPhaseHook<TSettings>>> & {
|
|
334
334
|
commit?: NavigationCommitPhaseHook<TSettings>;
|
|
335
335
|
};
|
|
336
336
|
|
|
337
337
|
/**
|
|
338
|
-
* @
|
|
338
|
+
* @beta
|
|
339
339
|
*/
|
|
340
|
-
export declare function navigationContributor(options?: ContributorOptions):
|
|
340
|
+
export declare function navigationContributor(options?: ContributorOptions): NavigationContributorDirective;
|
|
341
|
+
|
|
342
|
+
declare class NavigationContributorBehavior implements Behavior {
|
|
343
|
+
private contributor;
|
|
344
|
+
private options;
|
|
345
|
+
private router;
|
|
346
|
+
constructor(contributor: HTMLElement & NavigationContributor, options: Required<ContributorOptions>);
|
|
347
|
+
bind(source: unknown, context: RouterExecutionContext): void;
|
|
348
|
+
unbind(source: unknown): void;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
declare class NavigationContributorDirective implements HTMLDirective {
|
|
352
|
+
private options;
|
|
353
|
+
id: string;
|
|
354
|
+
nodeId: string;
|
|
355
|
+
constructor(options: Required<ContributorOptions>);
|
|
356
|
+
createHTML(add: AddViewBehaviorFactory): string;
|
|
357
|
+
createBehavior(targets: ViewBehaviorTargets): NavigationContributorBehavior;
|
|
358
|
+
}
|
|
341
359
|
|
|
342
360
|
/**
|
|
343
|
-
* @
|
|
361
|
+
* @beta
|
|
344
362
|
*/
|
|
345
363
|
export declare interface NavigationHandler {
|
|
346
364
|
enqueue(msg: NavigationMessage): void;
|
|
347
365
|
}
|
|
348
366
|
|
|
349
367
|
/**
|
|
350
|
-
* @
|
|
368
|
+
* @beta
|
|
351
369
|
*/
|
|
352
370
|
export declare const NavigationHandler: Readonly<{
|
|
353
371
|
register(handler: NavigationHandler): void;
|
|
@@ -355,7 +373,7 @@ export declare const NavigationHandler: Readonly<{
|
|
|
355
373
|
}>;
|
|
356
374
|
|
|
357
375
|
/**
|
|
358
|
-
* @
|
|
376
|
+
* @beta
|
|
359
377
|
*/
|
|
360
378
|
export declare class NavigationMessage {
|
|
361
379
|
path: string;
|
|
@@ -363,7 +381,7 @@ export declare class NavigationMessage {
|
|
|
363
381
|
}
|
|
364
382
|
|
|
365
383
|
/**
|
|
366
|
-
* @
|
|
384
|
+
* @beta
|
|
367
385
|
*/
|
|
368
386
|
export declare interface NavigationPhase<TSettings = any> {
|
|
369
387
|
readonly name: NavigationPhaseName;
|
|
@@ -377,12 +395,12 @@ export declare interface NavigationPhase<TSettings = any> {
|
|
|
377
395
|
}
|
|
378
396
|
|
|
379
397
|
/**
|
|
380
|
-
* @
|
|
398
|
+
* @beta
|
|
381
399
|
*/
|
|
382
400
|
export declare type NavigationPhaseFollowupAction = () => Promise<any> | any;
|
|
383
401
|
|
|
384
402
|
/**
|
|
385
|
-
* @
|
|
403
|
+
* @beta
|
|
386
404
|
*/
|
|
387
405
|
export declare type NavigationPhaseHook<TSettings = any> = (phase: NavigationPhase<TSettings>) => Promise<any> | any;
|
|
388
406
|
|
|
@@ -405,19 +423,19 @@ declare class NavigationPhaseImpl<TSettings = any> implements NavigationCommitPh
|
|
|
405
423
|
}
|
|
406
424
|
|
|
407
425
|
/**
|
|
408
|
-
* @
|
|
426
|
+
* @beta
|
|
409
427
|
*/
|
|
410
428
|
export declare type NavigationPhaseName = "navigate" | "leave" | "construct" | "enter" | "commit";
|
|
411
429
|
|
|
412
430
|
/**
|
|
413
|
-
* @
|
|
431
|
+
* @beta
|
|
414
432
|
*/
|
|
415
433
|
export declare interface NavigationProcess {
|
|
416
434
|
run(router: Router, message: NavigationMessage): Promise<void>;
|
|
417
435
|
}
|
|
418
436
|
|
|
419
437
|
/**
|
|
420
|
-
* @
|
|
438
|
+
* @beta
|
|
421
439
|
*/
|
|
422
440
|
export declare interface NavigationQueue {
|
|
423
441
|
connect(): void;
|
|
@@ -426,24 +444,24 @@ export declare interface NavigationQueue {
|
|
|
426
444
|
}
|
|
427
445
|
|
|
428
446
|
/**
|
|
429
|
-
* @
|
|
447
|
+
* @beta
|
|
430
448
|
*/
|
|
431
449
|
export declare type ParameterConverter = RouteParameterConverter | ConverterObject | Constructable<ConverterObject>;
|
|
432
450
|
|
|
433
451
|
/**
|
|
434
|
-
* @
|
|
452
|
+
* @beta
|
|
435
453
|
*/
|
|
436
454
|
export declare type ParentRouteDefinition<TSettings = any> = PathedRouteDefinition<TSettings> & LayoutAndTransitionRouteDefinition & {
|
|
437
455
|
children: MappableRouteDefinition<TSettings>[];
|
|
438
456
|
};
|
|
439
457
|
|
|
440
458
|
/**
|
|
441
|
-
* @
|
|
459
|
+
* @beta
|
|
442
460
|
*/
|
|
443
461
|
export declare type PathedRouteDefinition<TSettings = any> = SupportsSettings<TSettings> & Route;
|
|
444
462
|
|
|
445
463
|
/**
|
|
446
|
-
* @
|
|
464
|
+
* @beta
|
|
447
465
|
*/
|
|
448
466
|
export declare const QueryString: Readonly<{
|
|
449
467
|
readonly current: string;
|
|
@@ -454,7 +472,7 @@ export declare const QueryString: Readonly<{
|
|
|
454
472
|
* @param traditional - Boolean Use the old URI template standard (RFC6570)
|
|
455
473
|
* @returns The generated query string, excluding leading '?'.
|
|
456
474
|
*/
|
|
457
|
-
build(params: Object, traditional?: boolean
|
|
475
|
+
build(params: Object, traditional?: boolean): string;
|
|
458
476
|
/**
|
|
459
477
|
* Separate the query string from the path and returns the two parts.
|
|
460
478
|
* @param path - The path to separate.
|
|
@@ -473,7 +491,7 @@ export declare const QueryString: Readonly<{
|
|
|
473
491
|
}>;
|
|
474
492
|
|
|
475
493
|
/**
|
|
476
|
-
* @
|
|
494
|
+
* @beta
|
|
477
495
|
*/
|
|
478
496
|
export declare class RecognizedRoute<TSettings = any> {
|
|
479
497
|
readonly endpoint: Endpoint<TSettings>;
|
|
@@ -487,7 +505,7 @@ export declare class RecognizedRoute<TSettings = any> {
|
|
|
487
505
|
}
|
|
488
506
|
|
|
489
507
|
/**
|
|
490
|
-
* @
|
|
508
|
+
* @beta
|
|
491
509
|
*/
|
|
492
510
|
export declare class Redirect implements NavigationCommand {
|
|
493
511
|
private redirect;
|
|
@@ -498,14 +516,14 @@ export declare class Redirect implements NavigationCommand {
|
|
|
498
516
|
}
|
|
499
517
|
|
|
500
518
|
/**
|
|
501
|
-
* @
|
|
519
|
+
* @beta
|
|
502
520
|
*/
|
|
503
521
|
export declare type RedirectRouteDefinition<TSettings = any> = PathedRouteDefinition<TSettings> & {
|
|
504
522
|
redirect: string;
|
|
505
523
|
};
|
|
506
524
|
|
|
507
525
|
/**
|
|
508
|
-
* @
|
|
526
|
+
* @beta
|
|
509
527
|
*/
|
|
510
528
|
export declare class Render implements RenderCommand {
|
|
511
529
|
private owner;
|
|
@@ -523,12 +541,12 @@ export declare class Render implements RenderCommand {
|
|
|
523
541
|
}
|
|
524
542
|
|
|
525
543
|
/**
|
|
526
|
-
* @
|
|
544
|
+
* @beta
|
|
527
545
|
*/
|
|
528
546
|
export declare type RenderableRouteDefinition<TSettings = any> = ElementRouteDefinition<TSettings> | TemplateRouteDefinition<TSettings>;
|
|
529
547
|
|
|
530
548
|
/**
|
|
531
|
-
* @
|
|
549
|
+
* @beta
|
|
532
550
|
*/
|
|
533
551
|
export declare interface RenderCommand extends NavigationCommand {
|
|
534
552
|
layout: Layout;
|
|
@@ -547,7 +565,7 @@ declare class RenderContributor {
|
|
|
547
565
|
}
|
|
548
566
|
|
|
549
567
|
/**
|
|
550
|
-
* @
|
|
568
|
+
* @beta
|
|
551
569
|
*/
|
|
552
570
|
export declare interface RenderOperation {
|
|
553
571
|
commit(): Promise<void>;
|
|
@@ -555,7 +573,7 @@ export declare interface RenderOperation {
|
|
|
555
573
|
}
|
|
556
574
|
|
|
557
575
|
/**
|
|
558
|
-
* @
|
|
576
|
+
* @beta
|
|
559
577
|
*/
|
|
560
578
|
export declare interface Route {
|
|
561
579
|
readonly path: string;
|
|
@@ -564,7 +582,7 @@ export declare interface Route {
|
|
|
564
582
|
}
|
|
565
583
|
|
|
566
584
|
/**
|
|
567
|
-
* @
|
|
585
|
+
* @beta
|
|
568
586
|
*/
|
|
569
587
|
export declare const Route: Readonly<{
|
|
570
588
|
path: Readonly<{
|
|
@@ -583,7 +601,7 @@ export declare const Route: Readonly<{
|
|
|
583
601
|
}>;
|
|
584
602
|
|
|
585
603
|
/**
|
|
586
|
-
* @
|
|
604
|
+
* @beta
|
|
587
605
|
*/
|
|
588
606
|
export declare class RouteCollection<TSettings = any> {
|
|
589
607
|
private owner;
|
|
@@ -621,7 +639,7 @@ export declare class RouteCollection<TSettings = any> {
|
|
|
621
639
|
}
|
|
622
640
|
|
|
623
641
|
/**
|
|
624
|
-
* @
|
|
642
|
+
* @beta
|
|
625
643
|
*/
|
|
626
644
|
export declare type RouteMatch<TSettings = any> = {
|
|
627
645
|
route: RecognizedRoute<TSettings>;
|
|
@@ -629,12 +647,12 @@ export declare type RouteMatch<TSettings = any> = {
|
|
|
629
647
|
};
|
|
630
648
|
|
|
631
649
|
/**
|
|
632
|
-
* @
|
|
650
|
+
* @beta
|
|
633
651
|
*/
|
|
634
652
|
export declare type RouteParameterConverter = (value: string | undefined) => any | Promise<any>;
|
|
635
653
|
|
|
636
654
|
/**
|
|
637
|
-
* @
|
|
655
|
+
* @beta
|
|
638
656
|
*/
|
|
639
657
|
export declare interface Router<TSettings = any> {
|
|
640
658
|
readonly level: number;
|
|
@@ -650,7 +668,7 @@ export declare interface Router<TSettings = any> {
|
|
|
650
668
|
}
|
|
651
669
|
|
|
652
670
|
/**
|
|
653
|
-
* @
|
|
671
|
+
* @beta
|
|
654
672
|
*/
|
|
655
673
|
export declare const Router: Readonly<{
|
|
656
674
|
getOrCreateFor(element: HTMLElement): Router<any> | DefaultRouter;
|
|
@@ -662,7 +680,7 @@ export declare const Router: Readonly<{
|
|
|
662
680
|
}>;
|
|
663
681
|
|
|
664
682
|
/**
|
|
665
|
-
* @
|
|
683
|
+
* @beta
|
|
666
684
|
*/
|
|
667
685
|
export declare abstract class RouterConfiguration<TSettings = any> {
|
|
668
686
|
private isConfigured;
|
|
@@ -705,7 +723,7 @@ export declare abstract class RouterConfiguration<TSettings = any> {
|
|
|
705
723
|
}
|
|
706
724
|
|
|
707
725
|
/**
|
|
708
|
-
* @
|
|
726
|
+
* @beta
|
|
709
727
|
*/
|
|
710
728
|
export declare interface RouteRecognizer<TSettings> {
|
|
711
729
|
add(routeOrRoutes: Route | readonly Route[], settings?: TSettings): void;
|
|
@@ -715,7 +733,7 @@ export declare interface RouteRecognizer<TSettings> {
|
|
|
715
733
|
}
|
|
716
734
|
|
|
717
735
|
/**
|
|
718
|
-
* @
|
|
736
|
+
* @beta
|
|
719
737
|
*/
|
|
720
738
|
export declare interface RouterElement extends HTMLElement {
|
|
721
739
|
readonly [routerProperty]: Router;
|
|
@@ -725,14 +743,14 @@ export declare interface RouterElement extends HTMLElement {
|
|
|
725
743
|
}
|
|
726
744
|
|
|
727
745
|
/**
|
|
728
|
-
* @
|
|
746
|
+
* @beta
|
|
729
747
|
*/
|
|
730
748
|
export declare type RouterExecutionContext = ExecutionContext & {
|
|
731
749
|
router: Router;
|
|
732
750
|
};
|
|
733
751
|
|
|
734
752
|
/**
|
|
735
|
-
* @
|
|
753
|
+
* @beta
|
|
736
754
|
*/
|
|
737
755
|
export declare const RouterExecutionContext: Readonly<{
|
|
738
756
|
create(router: Router): any;
|
|
@@ -741,7 +759,7 @@ export declare const RouterExecutionContext: Readonly<{
|
|
|
741
759
|
declare const routerProperty = "$router";
|
|
742
760
|
|
|
743
761
|
/**
|
|
744
|
-
* @
|
|
762
|
+
* @beta
|
|
745
763
|
*/
|
|
746
764
|
export declare interface RouteView {
|
|
747
765
|
bind(allTypedParams: Readonly<Record<string, any>>, context: RouterExecutionContext): void;
|
|
@@ -750,7 +768,7 @@ export declare interface RouteView {
|
|
|
750
768
|
}
|
|
751
769
|
|
|
752
770
|
/**
|
|
753
|
-
* @
|
|
771
|
+
* @beta
|
|
754
772
|
*/
|
|
755
773
|
declare interface RoutingEventSink {
|
|
756
774
|
onUnhandledNavigationMessage(router: Router, message: NavigationMessage): void;
|
|
@@ -761,24 +779,24 @@ declare interface RoutingEventSink {
|
|
|
761
779
|
}
|
|
762
780
|
|
|
763
781
|
/**
|
|
764
|
-
* @
|
|
782
|
+
* @beta
|
|
765
783
|
*/
|
|
766
784
|
export declare type SupportsSettings<TSettings = any> = {
|
|
767
785
|
settings?: TSettings;
|
|
768
786
|
};
|
|
769
787
|
|
|
770
788
|
/**
|
|
771
|
-
* @
|
|
789
|
+
* @beta
|
|
772
790
|
*/
|
|
773
791
|
export declare type TemplateFallbackRouteDefinition<TSettings = any> = LayoutAndTransitionRouteDefinition & HasTemplate & SupportsSettings<TSettings> & HasTitle;
|
|
774
792
|
|
|
775
793
|
/**
|
|
776
|
-
* @
|
|
794
|
+
* @beta
|
|
777
795
|
*/
|
|
778
796
|
export declare type TemplateRouteDefinition<TSettings = any> = NavigableRouteDefinition<TSettings> & HasTemplate;
|
|
779
797
|
|
|
780
798
|
/**
|
|
781
|
-
* @
|
|
799
|
+
* @beta
|
|
782
800
|
*/
|
|
783
801
|
declare interface TitleBuilder {
|
|
784
802
|
joinTitles(parentTitle: string, childTitle: string): string;
|
|
@@ -786,7 +804,7 @@ declare interface TitleBuilder {
|
|
|
786
804
|
}
|
|
787
805
|
|
|
788
806
|
/**
|
|
789
|
-
* @
|
|
807
|
+
* @beta
|
|
790
808
|
*/
|
|
791
809
|
export declare interface Transition {
|
|
792
810
|
begin(host: HTMLElement, prev: RouteView | null, next: RouteView): Promise<void>;
|
|
@@ -795,7 +813,7 @@ export declare interface Transition {
|
|
|
795
813
|
}
|
|
796
814
|
|
|
797
815
|
/**
|
|
798
|
-
* @
|
|
816
|
+
* @beta
|
|
799
817
|
*/
|
|
800
818
|
export declare const Transition: Readonly<{
|
|
801
819
|
default: Readonly<Transition>;
|