@microsoft/fast-router 1.0.0-alpha.2 → 1.0.0-alpha.21
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/CHANGELOG.json +323 -0
- package/CHANGELOG.md +158 -1
- package/dist/dts/contributors.d.ts +10 -12
- package/dist/dts/phases.d.ts +1 -1
- package/dist/dts/query-string.d.ts +1 -1
- package/dist/dts/recognizer.d.ts +10 -1
- package/dist/dts/router.d.ts +2 -2
- package/dist/dts/routes.d.ts +2 -2
- package/dist/dts/view.d.ts +4 -9
- package/dist/esm/commands.js +5 -4
- package/dist/esm/contributors.js +18 -14
- package/dist/esm/recognizer.js +13 -6
- package/dist/esm/router.js +17 -10
- package/dist/esm/routes.js +8 -8
- package/dist/esm/view.js +6 -24
- package/dist/fast-router.api.json +255 -101
- package/dist/fast-router.d.ts +39 -36
- package/dist/fast-router.untrimmed.d.ts +39 -36
- package/docs/api-report.md +31 -22
- package/package.json +4 -4
|
@@ -461,40 +461,6 @@
|
|
|
461
461
|
"endIndex": 2
|
|
462
462
|
}
|
|
463
463
|
},
|
|
464
|
-
{
|
|
465
|
-
"kind": "TypeAlias",
|
|
466
|
-
"canonicalReference": "@microsoft/fast-router!ConverterObject:type",
|
|
467
|
-
"docComment": "/**\n * @beta\n */\n",
|
|
468
|
-
"excerptTokens": [
|
|
469
|
-
{
|
|
470
|
-
"kind": "Content",
|
|
471
|
-
"text": "export declare type ConverterObject = "
|
|
472
|
-
},
|
|
473
|
-
{
|
|
474
|
-
"kind": "Content",
|
|
475
|
-
"text": "{\n convert: "
|
|
476
|
-
},
|
|
477
|
-
{
|
|
478
|
-
"kind": "Reference",
|
|
479
|
-
"text": "RouteParameterConverter",
|
|
480
|
-
"canonicalReference": "@microsoft/fast-router!RouteParameterConverter:type"
|
|
481
|
-
},
|
|
482
|
-
{
|
|
483
|
-
"kind": "Content",
|
|
484
|
-
"text": ";\n}"
|
|
485
|
-
},
|
|
486
|
-
{
|
|
487
|
-
"kind": "Content",
|
|
488
|
-
"text": ";"
|
|
489
|
-
}
|
|
490
|
-
],
|
|
491
|
-
"releaseTag": "Beta",
|
|
492
|
-
"name": "ConverterObject",
|
|
493
|
-
"typeTokenRange": {
|
|
494
|
-
"startIndex": 1,
|
|
495
|
-
"endIndex": 4
|
|
496
|
-
}
|
|
497
|
-
},
|
|
498
464
|
{
|
|
499
465
|
"kind": "Class",
|
|
500
466
|
"canonicalReference": "@microsoft/fast-router!DefaultLinkHandler:class",
|
|
@@ -2410,7 +2376,7 @@
|
|
|
2410
2376
|
},
|
|
2411
2377
|
{
|
|
2412
2378
|
"kind": "Content",
|
|
2413
|
-
"text": "[] |
|
|
2379
|
+
"text": "[] | undefined"
|
|
2414
2380
|
},
|
|
2415
2381
|
{
|
|
2416
2382
|
"kind": "Content",
|
|
@@ -3674,7 +3640,7 @@
|
|
|
3674
3640
|
},
|
|
3675
3641
|
{
|
|
3676
3642
|
"kind": "Content",
|
|
3677
|
-
"text": "
|
|
3643
|
+
"text": "void"
|
|
3678
3644
|
},
|
|
3679
3645
|
{
|
|
3680
3646
|
"kind": "Content",
|
|
@@ -4817,8 +4783,8 @@
|
|
|
4817
4783
|
},
|
|
4818
4784
|
{
|
|
4819
4785
|
"kind": "Reference",
|
|
4820
|
-
"text": "
|
|
4821
|
-
"canonicalReference": "@microsoft/fast-router!
|
|
4786
|
+
"text": "RouteParameterConverterObject",
|
|
4787
|
+
"canonicalReference": "@microsoft/fast-router!RouteParameterConverterObject:type"
|
|
4822
4788
|
},
|
|
4823
4789
|
{
|
|
4824
4790
|
"kind": "Content",
|
|
@@ -4835,8 +4801,8 @@
|
|
|
4835
4801
|
},
|
|
4836
4802
|
{
|
|
4837
4803
|
"kind": "Reference",
|
|
4838
|
-
"text": "
|
|
4839
|
-
"canonicalReference": "@microsoft/fast-router!
|
|
4804
|
+
"text": "RouteParameterConverterObject",
|
|
4805
|
+
"canonicalReference": "@microsoft/fast-router!RouteParameterConverterObject:type"
|
|
4840
4806
|
},
|
|
4841
4807
|
{
|
|
4842
4808
|
"kind": "Content",
|
|
@@ -4999,12 +4965,12 @@
|
|
|
4999
4965
|
},
|
|
5000
4966
|
{
|
|
5001
4967
|
"kind": "Reference",
|
|
5002
|
-
"text": "
|
|
5003
|
-
"canonicalReference": "!
|
|
4968
|
+
"text": "Record",
|
|
4969
|
+
"canonicalReference": "!Record:type"
|
|
5004
4970
|
},
|
|
5005
4971
|
{
|
|
5006
4972
|
"kind": "Content",
|
|
5007
|
-
"text": ", traditional?: boolean): string;\n separate(path: string): "
|
|
4973
|
+
"text": "<string, string>, traditional?: boolean): string;\n separate(path: string): "
|
|
5008
4974
|
},
|
|
5009
4975
|
{
|
|
5010
4976
|
"kind": "Reference",
|
|
@@ -7187,7 +7153,16 @@
|
|
|
7187
7153
|
},
|
|
7188
7154
|
{
|
|
7189
7155
|
"kind": "Content",
|
|
7190
|
-
"text": "(value: string | undefined
|
|
7156
|
+
"text": "(name: string, value: string | undefined, context: "
|
|
7157
|
+
},
|
|
7158
|
+
{
|
|
7159
|
+
"kind": "Reference",
|
|
7160
|
+
"text": "RouteParameterConverterContext",
|
|
7161
|
+
"canonicalReference": "@microsoft/fast-router!RouteParameterConverterContext:interface"
|
|
7162
|
+
},
|
|
7163
|
+
{
|
|
7164
|
+
"kind": "Content",
|
|
7165
|
+
"text": ") => any | "
|
|
7191
7166
|
},
|
|
7192
7167
|
{
|
|
7193
7168
|
"kind": "Reference",
|
|
@@ -7205,6 +7180,210 @@
|
|
|
7205
7180
|
],
|
|
7206
7181
|
"releaseTag": "Beta",
|
|
7207
7182
|
"name": "RouteParameterConverter",
|
|
7183
|
+
"typeTokenRange": {
|
|
7184
|
+
"startIndex": 1,
|
|
7185
|
+
"endIndex": 6
|
|
7186
|
+
}
|
|
7187
|
+
},
|
|
7188
|
+
{
|
|
7189
|
+
"kind": "Interface",
|
|
7190
|
+
"canonicalReference": "@microsoft/fast-router!RouteParameterConverterContext:interface",
|
|
7191
|
+
"docComment": "/**\n * @beta\n */\n",
|
|
7192
|
+
"excerptTokens": [
|
|
7193
|
+
{
|
|
7194
|
+
"kind": "Content",
|
|
7195
|
+
"text": "export interface RouteParameterConverterContext<TSettings = "
|
|
7196
|
+
},
|
|
7197
|
+
{
|
|
7198
|
+
"kind": "Content",
|
|
7199
|
+
"text": "any"
|
|
7200
|
+
},
|
|
7201
|
+
{
|
|
7202
|
+
"kind": "Content",
|
|
7203
|
+
"text": "> "
|
|
7204
|
+
}
|
|
7205
|
+
],
|
|
7206
|
+
"releaseTag": "Beta",
|
|
7207
|
+
"typeParameters": [
|
|
7208
|
+
{
|
|
7209
|
+
"typeParameterName": "TSettings",
|
|
7210
|
+
"constraintTokenRange": {
|
|
7211
|
+
"startIndex": 0,
|
|
7212
|
+
"endIndex": 0
|
|
7213
|
+
},
|
|
7214
|
+
"defaultTypeTokenRange": {
|
|
7215
|
+
"startIndex": 1,
|
|
7216
|
+
"endIndex": 2
|
|
7217
|
+
}
|
|
7218
|
+
}
|
|
7219
|
+
],
|
|
7220
|
+
"name": "RouteParameterConverterContext",
|
|
7221
|
+
"members": [
|
|
7222
|
+
{
|
|
7223
|
+
"kind": "PropertySignature",
|
|
7224
|
+
"canonicalReference": "@microsoft/fast-router!RouteParameterConverterContext#endpoint:member",
|
|
7225
|
+
"docComment": "",
|
|
7226
|
+
"excerptTokens": [
|
|
7227
|
+
{
|
|
7228
|
+
"kind": "Content",
|
|
7229
|
+
"text": "readonly endpoint: "
|
|
7230
|
+
},
|
|
7231
|
+
{
|
|
7232
|
+
"kind": "Reference",
|
|
7233
|
+
"text": "Endpoint",
|
|
7234
|
+
"canonicalReference": "@microsoft/fast-router!Endpoint:class"
|
|
7235
|
+
},
|
|
7236
|
+
{
|
|
7237
|
+
"kind": "Content",
|
|
7238
|
+
"text": "<TSettings>"
|
|
7239
|
+
},
|
|
7240
|
+
{
|
|
7241
|
+
"kind": "Content",
|
|
7242
|
+
"text": ";"
|
|
7243
|
+
}
|
|
7244
|
+
],
|
|
7245
|
+
"isOptional": false,
|
|
7246
|
+
"releaseTag": "Beta",
|
|
7247
|
+
"name": "endpoint",
|
|
7248
|
+
"propertyTypeTokenRange": {
|
|
7249
|
+
"startIndex": 1,
|
|
7250
|
+
"endIndex": 3
|
|
7251
|
+
}
|
|
7252
|
+
},
|
|
7253
|
+
{
|
|
7254
|
+
"kind": "PropertySignature",
|
|
7255
|
+
"canonicalReference": "@microsoft/fast-router!RouteParameterConverterContext#params:member",
|
|
7256
|
+
"docComment": "",
|
|
7257
|
+
"excerptTokens": [
|
|
7258
|
+
{
|
|
7259
|
+
"kind": "Content",
|
|
7260
|
+
"text": "readonly params: "
|
|
7261
|
+
},
|
|
7262
|
+
{
|
|
7263
|
+
"kind": "Reference",
|
|
7264
|
+
"text": "Readonly",
|
|
7265
|
+
"canonicalReference": "!Readonly:type"
|
|
7266
|
+
},
|
|
7267
|
+
{
|
|
7268
|
+
"kind": "Content",
|
|
7269
|
+
"text": "<"
|
|
7270
|
+
},
|
|
7271
|
+
{
|
|
7272
|
+
"kind": "Reference",
|
|
7273
|
+
"text": "Record",
|
|
7274
|
+
"canonicalReference": "!Record:type"
|
|
7275
|
+
},
|
|
7276
|
+
{
|
|
7277
|
+
"kind": "Content",
|
|
7278
|
+
"text": "<string, string | undefined>>"
|
|
7279
|
+
},
|
|
7280
|
+
{
|
|
7281
|
+
"kind": "Content",
|
|
7282
|
+
"text": ";"
|
|
7283
|
+
}
|
|
7284
|
+
],
|
|
7285
|
+
"isOptional": false,
|
|
7286
|
+
"releaseTag": "Beta",
|
|
7287
|
+
"name": "params",
|
|
7288
|
+
"propertyTypeTokenRange": {
|
|
7289
|
+
"startIndex": 1,
|
|
7290
|
+
"endIndex": 5
|
|
7291
|
+
}
|
|
7292
|
+
},
|
|
7293
|
+
{
|
|
7294
|
+
"kind": "PropertySignature",
|
|
7295
|
+
"canonicalReference": "@microsoft/fast-router!RouteParameterConverterContext#queryParams:member",
|
|
7296
|
+
"docComment": "",
|
|
7297
|
+
"excerptTokens": [
|
|
7298
|
+
{
|
|
7299
|
+
"kind": "Content",
|
|
7300
|
+
"text": "readonly queryParams: "
|
|
7301
|
+
},
|
|
7302
|
+
{
|
|
7303
|
+
"kind": "Reference",
|
|
7304
|
+
"text": "Record",
|
|
7305
|
+
"canonicalReference": "!Record:type"
|
|
7306
|
+
},
|
|
7307
|
+
{
|
|
7308
|
+
"kind": "Content",
|
|
7309
|
+
"text": "<string, string>"
|
|
7310
|
+
},
|
|
7311
|
+
{
|
|
7312
|
+
"kind": "Content",
|
|
7313
|
+
"text": ";"
|
|
7314
|
+
}
|
|
7315
|
+
],
|
|
7316
|
+
"isOptional": false,
|
|
7317
|
+
"releaseTag": "Beta",
|
|
7318
|
+
"name": "queryParams",
|
|
7319
|
+
"propertyTypeTokenRange": {
|
|
7320
|
+
"startIndex": 1,
|
|
7321
|
+
"endIndex": 3
|
|
7322
|
+
}
|
|
7323
|
+
},
|
|
7324
|
+
{
|
|
7325
|
+
"kind": "PropertySignature",
|
|
7326
|
+
"canonicalReference": "@microsoft/fast-router!RouteParameterConverterContext#typedParams:member",
|
|
7327
|
+
"docComment": "",
|
|
7328
|
+
"excerptTokens": [
|
|
7329
|
+
{
|
|
7330
|
+
"kind": "Content",
|
|
7331
|
+
"text": "readonly typedParams: "
|
|
7332
|
+
},
|
|
7333
|
+
{
|
|
7334
|
+
"kind": "Reference",
|
|
7335
|
+
"text": "Record",
|
|
7336
|
+
"canonicalReference": "!Record:type"
|
|
7337
|
+
},
|
|
7338
|
+
{
|
|
7339
|
+
"kind": "Content",
|
|
7340
|
+
"text": "<string, any>"
|
|
7341
|
+
},
|
|
7342
|
+
{
|
|
7343
|
+
"kind": "Content",
|
|
7344
|
+
"text": ";"
|
|
7345
|
+
}
|
|
7346
|
+
],
|
|
7347
|
+
"isOptional": false,
|
|
7348
|
+
"releaseTag": "Beta",
|
|
7349
|
+
"name": "typedParams",
|
|
7350
|
+
"propertyTypeTokenRange": {
|
|
7351
|
+
"startIndex": 1,
|
|
7352
|
+
"endIndex": 3
|
|
7353
|
+
}
|
|
7354
|
+
}
|
|
7355
|
+
],
|
|
7356
|
+
"extendsTokenRanges": []
|
|
7357
|
+
},
|
|
7358
|
+
{
|
|
7359
|
+
"kind": "TypeAlias",
|
|
7360
|
+
"canonicalReference": "@microsoft/fast-router!RouteParameterConverterObject:type",
|
|
7361
|
+
"docComment": "/**\n * @beta\n */\n",
|
|
7362
|
+
"excerptTokens": [
|
|
7363
|
+
{
|
|
7364
|
+
"kind": "Content",
|
|
7365
|
+
"text": "export declare type RouteParameterConverterObject = "
|
|
7366
|
+
},
|
|
7367
|
+
{
|
|
7368
|
+
"kind": "Content",
|
|
7369
|
+
"text": "{\n convert: "
|
|
7370
|
+
},
|
|
7371
|
+
{
|
|
7372
|
+
"kind": "Reference",
|
|
7373
|
+
"text": "RouteParameterConverter",
|
|
7374
|
+
"canonicalReference": "@microsoft/fast-router!RouteParameterConverter:type"
|
|
7375
|
+
},
|
|
7376
|
+
{
|
|
7377
|
+
"kind": "Content",
|
|
7378
|
+
"text": ";\n}"
|
|
7379
|
+
},
|
|
7380
|
+
{
|
|
7381
|
+
"kind": "Content",
|
|
7382
|
+
"text": ";"
|
|
7383
|
+
}
|
|
7384
|
+
],
|
|
7385
|
+
"releaseTag": "Beta",
|
|
7386
|
+
"name": "RouteParameterConverterObject",
|
|
7208
7387
|
"typeTokenRange": {
|
|
7209
7388
|
"startIndex": 1,
|
|
7210
7389
|
"endIndex": 4
|
|
@@ -9032,7 +9211,7 @@
|
|
|
9032
9211
|
},
|
|
9033
9212
|
{
|
|
9034
9213
|
"kind": "Content",
|
|
9035
|
-
"text": "
|
|
9214
|
+
"text": "void"
|
|
9036
9215
|
},
|
|
9037
9216
|
{
|
|
9038
9217
|
"kind": "Content",
|
|
@@ -9060,7 +9239,7 @@
|
|
|
9060
9239
|
},
|
|
9061
9240
|
{
|
|
9062
9241
|
"kind": "Content",
|
|
9063
|
-
"text": "
|
|
9242
|
+
"text": "void"
|
|
9064
9243
|
},
|
|
9065
9244
|
{
|
|
9066
9245
|
"kind": "Content",
|
|
@@ -9097,11 +9276,11 @@
|
|
|
9097
9276
|
{
|
|
9098
9277
|
"kind": "Reference",
|
|
9099
9278
|
"text": "ExecutionContext",
|
|
9100
|
-
"canonicalReference": "@microsoft/fast-element!ExecutionContext:
|
|
9279
|
+
"canonicalReference": "@microsoft/fast-element!ExecutionContext:interface"
|
|
9101
9280
|
},
|
|
9102
9281
|
{
|
|
9103
9282
|
"kind": "Content",
|
|
9104
|
-
"text": " & {\n router
|
|
9283
|
+
"text": " & {\n router?: "
|
|
9105
9284
|
},
|
|
9106
9285
|
{
|
|
9107
9286
|
"kind": "Reference",
|
|
@@ -9124,41 +9303,6 @@
|
|
|
9124
9303
|
"endIndex": 5
|
|
9125
9304
|
}
|
|
9126
9305
|
},
|
|
9127
|
-
{
|
|
9128
|
-
"kind": "Variable",
|
|
9129
|
-
"canonicalReference": "@microsoft/fast-router!RouterExecutionContext:var",
|
|
9130
|
-
"docComment": "/**\n * @beta\n */\n",
|
|
9131
|
-
"excerptTokens": [
|
|
9132
|
-
{
|
|
9133
|
-
"kind": "Content",
|
|
9134
|
-
"text": "RouterExecutionContext: "
|
|
9135
|
-
},
|
|
9136
|
-
{
|
|
9137
|
-
"kind": "Reference",
|
|
9138
|
-
"text": "Readonly",
|
|
9139
|
-
"canonicalReference": "!Readonly:type"
|
|
9140
|
-
},
|
|
9141
|
-
{
|
|
9142
|
-
"kind": "Content",
|
|
9143
|
-
"text": "<{\n create(router: "
|
|
9144
|
-
},
|
|
9145
|
-
{
|
|
9146
|
-
"kind": "Reference",
|
|
9147
|
-
"text": "Router",
|
|
9148
|
-
"canonicalReference": "@microsoft/fast-router!Router:interface"
|
|
9149
|
-
},
|
|
9150
|
-
{
|
|
9151
|
-
"kind": "Content",
|
|
9152
|
-
"text": "): any;\n}>"
|
|
9153
|
-
}
|
|
9154
|
-
],
|
|
9155
|
-
"releaseTag": "Beta",
|
|
9156
|
-
"name": "RouterExecutionContext",
|
|
9157
|
-
"variableTypeTokenRange": {
|
|
9158
|
-
"startIndex": 1,
|
|
9159
|
-
"endIndex": 5
|
|
9160
|
-
}
|
|
9161
|
-
},
|
|
9162
9306
|
{
|
|
9163
9307
|
"kind": "Interface",
|
|
9164
9308
|
"canonicalReference": "@microsoft/fast-router!RouteView:interface",
|
|
@@ -9245,15 +9389,6 @@
|
|
|
9245
9389
|
"kind": "Content",
|
|
9246
9390
|
"text": "<string, any>>"
|
|
9247
9391
|
},
|
|
9248
|
-
{
|
|
9249
|
-
"kind": "Content",
|
|
9250
|
-
"text": ", context: "
|
|
9251
|
-
},
|
|
9252
|
-
{
|
|
9253
|
-
"kind": "Reference",
|
|
9254
|
-
"text": "RouterExecutionContext",
|
|
9255
|
-
"canonicalReference": "@microsoft/fast-router!RouterExecutionContext:type"
|
|
9256
|
-
},
|
|
9257
9392
|
{
|
|
9258
9393
|
"kind": "Content",
|
|
9259
9394
|
"text": "): "
|
|
@@ -9269,8 +9404,8 @@
|
|
|
9269
9404
|
],
|
|
9270
9405
|
"isOptional": false,
|
|
9271
9406
|
"returnTypeTokenRange": {
|
|
9272
|
-
"startIndex":
|
|
9273
|
-
"endIndex":
|
|
9407
|
+
"startIndex": 6,
|
|
9408
|
+
"endIndex": 7
|
|
9274
9409
|
},
|
|
9275
9410
|
"releaseTag": "Beta",
|
|
9276
9411
|
"overloadIndex": 1,
|
|
@@ -9282,17 +9417,36 @@
|
|
|
9282
9417
|
"endIndex": 5
|
|
9283
9418
|
},
|
|
9284
9419
|
"isOptional": false
|
|
9420
|
+
}
|
|
9421
|
+
],
|
|
9422
|
+
"name": "bind"
|
|
9423
|
+
},
|
|
9424
|
+
{
|
|
9425
|
+
"kind": "PropertySignature",
|
|
9426
|
+
"canonicalReference": "@microsoft/fast-router!RouteView#context:member",
|
|
9427
|
+
"docComment": "",
|
|
9428
|
+
"excerptTokens": [
|
|
9429
|
+
{
|
|
9430
|
+
"kind": "Content",
|
|
9431
|
+
"text": "context: "
|
|
9285
9432
|
},
|
|
9286
9433
|
{
|
|
9287
|
-
"
|
|
9288
|
-
"
|
|
9289
|
-
|
|
9290
|
-
|
|
9291
|
-
|
|
9292
|
-
"
|
|
9434
|
+
"kind": "Reference",
|
|
9435
|
+
"text": "RouterExecutionContext",
|
|
9436
|
+
"canonicalReference": "@microsoft/fast-router!RouterExecutionContext:type"
|
|
9437
|
+
},
|
|
9438
|
+
{
|
|
9439
|
+
"kind": "Content",
|
|
9440
|
+
"text": ";"
|
|
9293
9441
|
}
|
|
9294
9442
|
],
|
|
9295
|
-
"
|
|
9443
|
+
"isOptional": false,
|
|
9444
|
+
"releaseTag": "Beta",
|
|
9445
|
+
"name": "context",
|
|
9446
|
+
"propertyTypeTokenRange": {
|
|
9447
|
+
"startIndex": 1,
|
|
9448
|
+
"endIndex": 2
|
|
9449
|
+
}
|
|
9296
9450
|
},
|
|
9297
9451
|
{
|
|
9298
9452
|
"kind": "MethodSignature",
|
package/dist/fast-router.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { AddViewBehaviorFactory } from '@microsoft/fast-element';
|
|
2
|
-
import { Behavior } from '@microsoft/fast-element';
|
|
3
2
|
import { ComposableStyles } from '@microsoft/fast-element';
|
|
4
3
|
import { Constructable } from '@microsoft/fast-element';
|
|
5
4
|
import { ExecutionContext } from '@microsoft/fast-element';
|
|
6
5
|
import { FASTElement } from '@microsoft/fast-element';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
6
|
+
import { ViewBehavior } from '@microsoft/fast-element';
|
|
7
|
+
import { ViewBehaviorFactory } from '@microsoft/fast-element';
|
|
8
|
+
import { ViewController } from '@microsoft/fast-element';
|
|
9
9
|
import { ViewTemplate } from '@microsoft/fast-element';
|
|
10
10
|
|
|
11
11
|
/* Excluded from this release type: childRouteParameter */
|
|
@@ -38,13 +38,6 @@ export declare type ContributorOptions = {
|
|
|
38
38
|
parameters?: boolean;
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
-
/**
|
|
42
|
-
* @beta
|
|
43
|
-
*/
|
|
44
|
-
export declare type ConverterObject = {
|
|
45
|
-
convert: RouteParameterConverter;
|
|
46
|
-
};
|
|
47
|
-
|
|
48
41
|
/**
|
|
49
42
|
* @beta
|
|
50
43
|
*/
|
|
@@ -199,7 +192,7 @@ export declare class FASTElementLayout implements Layout {
|
|
|
199
192
|
private readonly template;
|
|
200
193
|
private runBeforeCommit;
|
|
201
194
|
private styles;
|
|
202
|
-
constructor(template?: ViewTemplate | null, styles?: ComposableStyles | ComposableStyles[] |
|
|
195
|
+
constructor(template?: ViewTemplate | null, styles?: ComposableStyles | ComposableStyles[] | undefined, runBeforeCommit?: boolean);
|
|
203
196
|
beforeCommit(routerElement: HTMLElement): Promise<void>;
|
|
204
197
|
afterCommit(routerElement: HTMLElement): Promise<void>;
|
|
205
198
|
private apply;
|
|
@@ -319,7 +312,7 @@ export declare interface NavigationCommand {
|
|
|
319
312
|
* @beta
|
|
320
313
|
*/
|
|
321
314
|
export declare interface NavigationCommitPhase<TSettings = any> extends Omit<NavigationPhase<TSettings>, "cancel" | "canceled" | "onCancel"> {
|
|
322
|
-
setTitle(title: string):
|
|
315
|
+
setTitle(title: string): void;
|
|
323
316
|
}
|
|
324
317
|
|
|
325
318
|
/**
|
|
@@ -339,22 +332,21 @@ export declare type NavigationContributor<TSettings = any> = Partial<Record<Excl
|
|
|
339
332
|
*/
|
|
340
333
|
export declare function navigationContributor(options?: ContributorOptions): NavigationContributorDirective;
|
|
341
334
|
|
|
342
|
-
declare class NavigationContributorBehavior implements
|
|
343
|
-
private
|
|
344
|
-
private options;
|
|
335
|
+
declare class NavigationContributorBehavior implements ViewBehavior {
|
|
336
|
+
private directive;
|
|
345
337
|
private router;
|
|
346
|
-
|
|
347
|
-
|
|
338
|
+
private contributor;
|
|
339
|
+
constructor(directive: NavigationContributorDirective);
|
|
340
|
+
bind(controller: ViewController): void;
|
|
348
341
|
unbind(source: unknown): void;
|
|
349
342
|
}
|
|
350
343
|
|
|
351
|
-
declare class NavigationContributorDirective implements
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
nodeId: string;
|
|
344
|
+
declare class NavigationContributorDirective implements ViewBehaviorFactory {
|
|
345
|
+
readonly options: Required<ContributorOptions>;
|
|
346
|
+
targetNodeId: string;
|
|
355
347
|
constructor(options: Required<ContributorOptions>);
|
|
356
348
|
createHTML(add: AddViewBehaviorFactory): string;
|
|
357
|
-
createBehavior(
|
|
349
|
+
createBehavior(): NavigationContributorBehavior;
|
|
358
350
|
}
|
|
359
351
|
|
|
360
352
|
/**
|
|
@@ -446,7 +438,7 @@ export declare interface NavigationQueue {
|
|
|
446
438
|
/**
|
|
447
439
|
* @beta
|
|
448
440
|
*/
|
|
449
|
-
export declare type ParameterConverter = RouteParameterConverter |
|
|
441
|
+
export declare type ParameterConverter = RouteParameterConverter | RouteParameterConverterObject | Constructable<RouteParameterConverterObject>;
|
|
450
442
|
|
|
451
443
|
/**
|
|
452
444
|
* @beta
|
|
@@ -472,7 +464,7 @@ export declare const QueryString: Readonly<{
|
|
|
472
464
|
* @param traditional - Boolean Use the old URI template standard (RFC6570)
|
|
473
465
|
* @returns The generated query string, excluding leading '?'.
|
|
474
466
|
*/
|
|
475
|
-
build(params:
|
|
467
|
+
build(params: Record<string, string>, traditional?: boolean): string;
|
|
476
468
|
/**
|
|
477
469
|
* Separate the query string from the path and returns the two parts.
|
|
478
470
|
* @param path - The path to separate.
|
|
@@ -649,7 +641,24 @@ export declare type RouteMatch<TSettings = any> = {
|
|
|
649
641
|
/**
|
|
650
642
|
* @beta
|
|
651
643
|
*/
|
|
652
|
-
export declare type RouteParameterConverter = (value: string | undefined) => any | Promise<any>;
|
|
644
|
+
export declare type RouteParameterConverter = (name: string, value: string | undefined, context: RouteParameterConverterContext) => any | Promise<any>;
|
|
645
|
+
|
|
646
|
+
/**
|
|
647
|
+
* @beta
|
|
648
|
+
*/
|
|
649
|
+
export declare interface RouteParameterConverterContext<TSettings = any> {
|
|
650
|
+
readonly endpoint: Endpoint<TSettings>;
|
|
651
|
+
readonly params: Readonly<Record<string, string | undefined>>;
|
|
652
|
+
readonly typedParams: Record<string, any>;
|
|
653
|
+
readonly queryParams: Record<string, string>;
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
/**
|
|
657
|
+
* @beta
|
|
658
|
+
*/
|
|
659
|
+
export declare type RouteParameterConverterObject = {
|
|
660
|
+
convert: RouteParameterConverter;
|
|
661
|
+
};
|
|
653
662
|
|
|
654
663
|
/**
|
|
655
664
|
* @beta
|
|
@@ -738,31 +747,25 @@ export declare interface RouteRecognizer<TSettings> {
|
|
|
738
747
|
export declare interface RouterElement extends HTMLElement {
|
|
739
748
|
readonly [routerProperty]: Router;
|
|
740
749
|
config: RouterConfiguration | null;
|
|
741
|
-
connectedCallback():
|
|
742
|
-
disconnectedCallback():
|
|
750
|
+
connectedCallback(): void;
|
|
751
|
+
disconnectedCallback(): void;
|
|
743
752
|
}
|
|
744
753
|
|
|
745
754
|
/**
|
|
746
755
|
* @beta
|
|
747
756
|
*/
|
|
748
757
|
export declare type RouterExecutionContext = ExecutionContext & {
|
|
749
|
-
router
|
|
758
|
+
router?: Router;
|
|
750
759
|
};
|
|
751
760
|
|
|
752
|
-
/**
|
|
753
|
-
* @beta
|
|
754
|
-
*/
|
|
755
|
-
export declare const RouterExecutionContext: Readonly<{
|
|
756
|
-
create(router: Router): any;
|
|
757
|
-
}>;
|
|
758
|
-
|
|
759
761
|
declare const routerProperty = "$router";
|
|
760
762
|
|
|
761
763
|
/**
|
|
762
764
|
* @beta
|
|
763
765
|
*/
|
|
764
766
|
export declare interface RouteView {
|
|
765
|
-
|
|
767
|
+
context: RouterExecutionContext;
|
|
768
|
+
bind(allTypedParams: Readonly<Record<string, any>>): void;
|
|
766
769
|
appendTo(host: HTMLElement): void;
|
|
767
770
|
dispose(): void;
|
|
768
771
|
}
|