@genesislcap/foundation-header 14.179.0 → 14.180.0
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/dist/custom-elements.json +1151 -181
- package/dist/dts/components/zero-components.d.ts +5 -0
- package/dist/dts/components/zero-components.d.ts.map +1 -0
- package/dist/dts/config/config.d.ts +33 -0
- package/dist/dts/config/config.d.ts.map +1 -0
- package/dist/dts/config/configure.d.ts +26 -0
- package/dist/dts/config/configure.d.ts.map +1 -0
- package/dist/dts/config/index.d.ts +2 -0
- package/dist/dts/config/index.d.ts.map +1 -1
- package/dist/dts/config/templates.d.ts +35 -0
- package/dist/dts/config/templates.d.ts.map +1 -0
- package/dist/dts/main/index.d.ts +1 -1
- package/dist/dts/main/index.d.ts.map +1 -1
- package/dist/dts/main/main.d.ts +81 -15
- package/dist/dts/main/main.d.ts.map +1 -1
- package/dist/dts/main/main.styles.d.ts.map +1 -1
- package/dist/dts/main/main.template.d.ts.map +1 -1
- package/dist/dts/tags/index.d.ts +2 -0
- package/dist/dts/tags/index.d.ts.map +1 -0
- package/dist/dts/tags/tags.d.ts +40 -0
- package/dist/dts/tags/tags.d.ts.map +1 -0
- package/dist/esm/components/zero-components.js +49 -0
- package/dist/esm/config/config.js +18 -0
- package/dist/esm/config/configure.js +55 -0
- package/dist/esm/config/index.js +2 -0
- package/dist/esm/config/templates.js +15 -0
- package/dist/esm/main/index.js +1 -1
- package/dist/esm/main/main.js +66 -2
- package/dist/esm/main/main.styles.js +59 -134
- package/dist/esm/main/main.template.js +32 -41
- package/dist/esm/tags/index.js +1 -0
- package/dist/esm/tags/tags.js +43 -0
- package/dist/foundation-header.api.json +287 -0
- package/dist/foundation-header.d.ts +216 -15
- package/docs/api/foundation-header.configure.md +45 -0
- package/docs/api/foundation-header.defaultheaderconfig.md +13 -0
- package/docs/api/foundation-header.foundationheader.loadremotes.md +15 -0
- package/docs/api/foundation-header.foundationheader.md +27 -0
- package/docs/api/foundation-header.headerconfig.md +21 -0
- package/docs/api/foundation-header.headerconfig.templateoptions.md +18 -0
- package/docs/api/foundation-header.md +15 -0
- package/docs/api/foundation-header.navigation.headerconfig.md +11 -0
- package/docs/api/foundation-header.navigation.md +1 -0
- package/docs/api/foundation-header.zeroheader.md +37 -0
- package/docs/api-report.md +48 -0
- package/package.json +19 -19
- package/dist/dts/components/components.d.ts +0 -9
- package/dist/dts/components/components.d.ts.map +0 -1
- package/dist/dts/components/index.d.ts +0 -2
- package/dist/dts/components/index.d.ts.map +0 -1
- package/dist/esm/components/components.js +0 -42
- package/dist/esm/components/index.js +0 -1
|
@@ -184,6 +184,103 @@
|
|
|
184
184
|
"name": "",
|
|
185
185
|
"preserveMemberOrder": false,
|
|
186
186
|
"members": [
|
|
187
|
+
{
|
|
188
|
+
"kind": "Function",
|
|
189
|
+
"canonicalReference": "@genesislcap/foundation-header!configure:function(1)",
|
|
190
|
+
"docComment": "/**\n * A function that allows configuring the header micro-frontend with name and templateOptions.\n *\n * @remarks\n *\n * Configure the Header micro frontend for host app integration.\n *\n * @param config - A partial HeaderConfig.\n *\n * @example\n *\n * Providing template options to align to your host application.\n * ```ts\n * const { configure } = await import('@genesislcap/foundation-header/config'); // < import from the subpath\n * return configure({\n * name: `nexus-app-header`,\n * // These will be merged with the packages `defaultTemplateOptions`. You will need to have these components registered in your application.\n * templateOptions: {\n * button: 'nexus-button',\n * icon: 'nexus-icon-next',\n * },\n * });\n * },\n * ```\n *\n * @public\n */\n",
|
|
191
|
+
"excerptTokens": [
|
|
192
|
+
{
|
|
193
|
+
"kind": "Content",
|
|
194
|
+
"text": "export declare function configure(config: "
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"kind": "Reference",
|
|
198
|
+
"text": "Partial",
|
|
199
|
+
"canonicalReference": "!Partial:type"
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"kind": "Content",
|
|
203
|
+
"text": "<"
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
"kind": "Reference",
|
|
207
|
+
"text": "HeaderConfig",
|
|
208
|
+
"canonicalReference": "@genesislcap/foundation-header!HeaderConfig:interface"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"kind": "Content",
|
|
212
|
+
"text": ">"
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"kind": "Content",
|
|
216
|
+
"text": "): "
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"kind": "Reference",
|
|
220
|
+
"text": "Promise",
|
|
221
|
+
"canonicalReference": "!Promise:interface"
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"kind": "Content",
|
|
225
|
+
"text": "<typeof import(\"../main\")."
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"kind": "Reference",
|
|
229
|
+
"text": "Navigation",
|
|
230
|
+
"canonicalReference": "@genesislcap/foundation-header!Navigation:class"
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"kind": "Content",
|
|
234
|
+
"text": ">"
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"kind": "Content",
|
|
238
|
+
"text": ";"
|
|
239
|
+
}
|
|
240
|
+
],
|
|
241
|
+
"fileUrlPath": "src/config/configure.ts",
|
|
242
|
+
"returnTypeTokenRange": {
|
|
243
|
+
"startIndex": 6,
|
|
244
|
+
"endIndex": 10
|
|
245
|
+
},
|
|
246
|
+
"releaseTag": "Public",
|
|
247
|
+
"overloadIndex": 1,
|
|
248
|
+
"parameters": [
|
|
249
|
+
{
|
|
250
|
+
"parameterName": "config",
|
|
251
|
+
"parameterTypeTokenRange": {
|
|
252
|
+
"startIndex": 1,
|
|
253
|
+
"endIndex": 5
|
|
254
|
+
},
|
|
255
|
+
"isOptional": false
|
|
256
|
+
}
|
|
257
|
+
],
|
|
258
|
+
"name": "configure"
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"kind": "Variable",
|
|
262
|
+
"canonicalReference": "@genesislcap/foundation-header!defaultHeaderConfig:var",
|
|
263
|
+
"docComment": "/**\n * Default HeaderConfig DI implementation.\n *\n * @public\n */\n",
|
|
264
|
+
"excerptTokens": [
|
|
265
|
+
{
|
|
266
|
+
"kind": "Content",
|
|
267
|
+
"text": "defaultHeaderConfig: "
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
"kind": "Reference",
|
|
271
|
+
"text": "HeaderConfig",
|
|
272
|
+
"canonicalReference": "@genesislcap/foundation-header!HeaderConfig:interface"
|
|
273
|
+
}
|
|
274
|
+
],
|
|
275
|
+
"fileUrlPath": "src/config/config.ts",
|
|
276
|
+
"isReadonly": true,
|
|
277
|
+
"releaseTag": "Public",
|
|
278
|
+
"name": "defaultHeaderConfig",
|
|
279
|
+
"variableTypeTokenRange": {
|
|
280
|
+
"startIndex": 1,
|
|
281
|
+
"endIndex": 2
|
|
282
|
+
}
|
|
283
|
+
},
|
|
187
284
|
{
|
|
188
285
|
"kind": "TypeAlias",
|
|
189
286
|
"canonicalReference": "@genesislcap/foundation-header!ElementTargetId:type",
|
|
@@ -229,6 +326,134 @@
|
|
|
229
326
|
"endIndex": 6
|
|
230
327
|
}
|
|
231
328
|
},
|
|
329
|
+
{
|
|
330
|
+
"kind": "Class",
|
|
331
|
+
"canonicalReference": "@genesislcap/foundation-header!FoundationHeader:class",
|
|
332
|
+
"docComment": "/**\n * FoundationHeader.\n *\n * @remarks\n *\n * Base MF export used by host application `configure` calls. It does not set up a design system or components. Both are expected to be registered in the host application, which should provide the details of which to the MF via TemplateOptions.\n *\n * See the {@link configure} hook for more information on how to set up and use this micro frontend in your application.\n *\n * @public\n */\n",
|
|
333
|
+
"excerptTokens": [
|
|
334
|
+
{
|
|
335
|
+
"kind": "Content",
|
|
336
|
+
"text": "export declare class FoundationHeader extends "
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
"kind": "Reference",
|
|
340
|
+
"text": "Navigation",
|
|
341
|
+
"canonicalReference": "@genesislcap/foundation-header!Navigation:class"
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
"kind": "Content",
|
|
345
|
+
"text": " "
|
|
346
|
+
}
|
|
347
|
+
],
|
|
348
|
+
"fileUrlPath": "src/main/main.ts",
|
|
349
|
+
"releaseTag": "Public",
|
|
350
|
+
"isAbstract": false,
|
|
351
|
+
"name": "FoundationHeader",
|
|
352
|
+
"preserveMemberOrder": false,
|
|
353
|
+
"members": [
|
|
354
|
+
{
|
|
355
|
+
"kind": "Method",
|
|
356
|
+
"canonicalReference": "@genesislcap/foundation-header!FoundationHeader#loadRemotes:member(1)",
|
|
357
|
+
"docComment": "",
|
|
358
|
+
"excerptTokens": [
|
|
359
|
+
{
|
|
360
|
+
"kind": "Content",
|
|
361
|
+
"text": "loadRemotes(): "
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
"kind": "Reference",
|
|
365
|
+
"text": "Promise",
|
|
366
|
+
"canonicalReference": "!Promise:interface"
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
"kind": "Content",
|
|
370
|
+
"text": "<void>"
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
"kind": "Content",
|
|
374
|
+
"text": ";"
|
|
375
|
+
}
|
|
376
|
+
],
|
|
377
|
+
"isStatic": false,
|
|
378
|
+
"returnTypeTokenRange": {
|
|
379
|
+
"startIndex": 1,
|
|
380
|
+
"endIndex": 3
|
|
381
|
+
},
|
|
382
|
+
"releaseTag": "Public",
|
|
383
|
+
"isProtected": false,
|
|
384
|
+
"overloadIndex": 1,
|
|
385
|
+
"parameters": [],
|
|
386
|
+
"isOptional": false,
|
|
387
|
+
"isAbstract": false,
|
|
388
|
+
"name": "loadRemotes"
|
|
389
|
+
}
|
|
390
|
+
],
|
|
391
|
+
"extendsTokenRange": {
|
|
392
|
+
"startIndex": 1,
|
|
393
|
+
"endIndex": 2
|
|
394
|
+
},
|
|
395
|
+
"implementsTokenRanges": []
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
"kind": "Interface",
|
|
399
|
+
"canonicalReference": "@genesislcap/foundation-header!HeaderConfig:interface",
|
|
400
|
+
"docComment": "/**\n * HeaderConfig DI interface.\n *\n * @public\n */\n",
|
|
401
|
+
"excerptTokens": [
|
|
402
|
+
{
|
|
403
|
+
"kind": "Content",
|
|
404
|
+
"text": "export interface HeaderConfig extends "
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
"kind": "Reference",
|
|
408
|
+
"text": "PartialFASTElementDefinition",
|
|
409
|
+
"canonicalReference": "@microsoft/fast-element!PartialFASTElementDefinition:interface"
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
"kind": "Content",
|
|
413
|
+
"text": " "
|
|
414
|
+
}
|
|
415
|
+
],
|
|
416
|
+
"fileUrlPath": "src/config/config.ts",
|
|
417
|
+
"releaseTag": "Public",
|
|
418
|
+
"name": "HeaderConfig",
|
|
419
|
+
"preserveMemberOrder": false,
|
|
420
|
+
"members": [
|
|
421
|
+
{
|
|
422
|
+
"kind": "PropertySignature",
|
|
423
|
+
"canonicalReference": "@genesislcap/foundation-header!HeaderConfig#templateOptions:member",
|
|
424
|
+
"docComment": "/**\n * Template options.\n *\n * @remarks\n *\n * Used by host applications to assign MF template options and subcomponent tags to align with the host design system.\n */\n",
|
|
425
|
+
"excerptTokens": [
|
|
426
|
+
{
|
|
427
|
+
"kind": "Content",
|
|
428
|
+
"text": "templateOptions: "
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
"kind": "Reference",
|
|
432
|
+
"text": "TemplateOptions",
|
|
433
|
+
"canonicalReference": "@genesislcap/foundation-header!~TemplateOptions:type"
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
"kind": "Content",
|
|
437
|
+
"text": ";"
|
|
438
|
+
}
|
|
439
|
+
],
|
|
440
|
+
"isReadonly": false,
|
|
441
|
+
"isOptional": false,
|
|
442
|
+
"releaseTag": "Public",
|
|
443
|
+
"name": "templateOptions",
|
|
444
|
+
"propertyTypeTokenRange": {
|
|
445
|
+
"startIndex": 1,
|
|
446
|
+
"endIndex": 2
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
],
|
|
450
|
+
"extendsTokenRanges": [
|
|
451
|
+
{
|
|
452
|
+
"startIndex": 1,
|
|
453
|
+
"endIndex": 2
|
|
454
|
+
}
|
|
455
|
+
]
|
|
456
|
+
},
|
|
232
457
|
{
|
|
233
458
|
"kind": "TypeAlias",
|
|
234
459
|
"canonicalReference": "@genesislcap/foundation-header!HeaderTargetId:type",
|
|
@@ -507,6 +732,37 @@
|
|
|
507
732
|
"isProtected": false,
|
|
508
733
|
"isAbstract": false
|
|
509
734
|
},
|
|
735
|
+
{
|
|
736
|
+
"kind": "Property",
|
|
737
|
+
"canonicalReference": "@genesislcap/foundation-header!Navigation#headerConfig:member",
|
|
738
|
+
"docComment": "",
|
|
739
|
+
"excerptTokens": [
|
|
740
|
+
{
|
|
741
|
+
"kind": "Content",
|
|
742
|
+
"text": "headerConfig: "
|
|
743
|
+
},
|
|
744
|
+
{
|
|
745
|
+
"kind": "Reference",
|
|
746
|
+
"text": "HeaderConfig",
|
|
747
|
+
"canonicalReference": "@genesislcap/foundation-header!HeaderConfig:interface"
|
|
748
|
+
},
|
|
749
|
+
{
|
|
750
|
+
"kind": "Content",
|
|
751
|
+
"text": ";"
|
|
752
|
+
}
|
|
753
|
+
],
|
|
754
|
+
"isReadonly": false,
|
|
755
|
+
"isOptional": false,
|
|
756
|
+
"releaseTag": "Public",
|
|
757
|
+
"name": "headerConfig",
|
|
758
|
+
"propertyTypeTokenRange": {
|
|
759
|
+
"startIndex": 1,
|
|
760
|
+
"endIndex": 2
|
|
761
|
+
},
|
|
762
|
+
"isStatic": false,
|
|
763
|
+
"isProtected": false,
|
|
764
|
+
"isAbstract": false
|
|
765
|
+
},
|
|
510
766
|
{
|
|
511
767
|
"kind": "Property",
|
|
512
768
|
"canonicalReference": "@genesislcap/foundation-header!Navigation#hideSideBar:member",
|
|
@@ -1241,6 +1497,37 @@
|
|
|
1241
1497
|
"startIndex": 1,
|
|
1242
1498
|
"endIndex": 2
|
|
1243
1499
|
}
|
|
1500
|
+
},
|
|
1501
|
+
{
|
|
1502
|
+
"kind": "Class",
|
|
1503
|
+
"canonicalReference": "@genesislcap/foundation-header!ZeroHeader:class",
|
|
1504
|
+
"docComment": "/**\n * ZeroHeader is a zero version of the header micro-frontend.\n *\n * @remarks\n *\n * A zero version that pre-registers zero components and uses the zero design system so that it can run standalone. Generally this is used for development purposes, but can be deployed as a standalone application if required or be used by a host application that is already using zero. ZeroHeader and its components won't bloat the core bundle as these are only loaded on-demand when in use.\n *\n * @example\n * ```ts\n * import { ZeroHeader } from '@genesislcap/foundation-header';\n * ...\n * ZeroHeader\n * ```\n *\n * @example\n *\n * Load the micro frontend on-demand\n * ```ts\n * const { ZeroHeader } = await import('@genesislcap/foundation-header');\n * },\n * ```\n *\n * @public\n */\n",
|
|
1505
|
+
"excerptTokens": [
|
|
1506
|
+
{
|
|
1507
|
+
"kind": "Content",
|
|
1508
|
+
"text": "export declare class ZeroHeader extends "
|
|
1509
|
+
},
|
|
1510
|
+
{
|
|
1511
|
+
"kind": "Reference",
|
|
1512
|
+
"text": "Navigation",
|
|
1513
|
+
"canonicalReference": "@genesislcap/foundation-header!Navigation:class"
|
|
1514
|
+
},
|
|
1515
|
+
{
|
|
1516
|
+
"kind": "Content",
|
|
1517
|
+
"text": " "
|
|
1518
|
+
}
|
|
1519
|
+
],
|
|
1520
|
+
"fileUrlPath": "src/main/main.ts",
|
|
1521
|
+
"releaseTag": "Public",
|
|
1522
|
+
"isAbstract": false,
|
|
1523
|
+
"name": "ZeroHeader",
|
|
1524
|
+
"preserveMemberOrder": false,
|
|
1525
|
+
"members": [],
|
|
1526
|
+
"extendsTokenRange": {
|
|
1527
|
+
"startIndex": 1,
|
|
1528
|
+
"endIndex": 2
|
|
1529
|
+
},
|
|
1530
|
+
"implementsTokenRanges": []
|
|
1244
1531
|
}
|
|
1245
1532
|
]
|
|
1246
1533
|
}
|
|
@@ -6,8 +6,58 @@ import { EmitOptions } from '@genesislcap/foundation-events';
|
|
|
6
6
|
import { EmitReturn } from '@genesislcap/foundation-events';
|
|
7
7
|
import type { FoundationRouteNavItem } from '@genesislcap/foundation-ui';
|
|
8
8
|
import { I18next } from '@genesislcap/foundation-i18n';
|
|
9
|
+
import { InterfaceSymbol } from '@microsoft/fast-foundation';
|
|
10
|
+
import { PartialFASTElementDefinition } from '@microsoft/fast-element';
|
|
11
|
+
import { SyntheticViewTemplate } from '@microsoft/fast-element';
|
|
12
|
+
import { TemplateElementDependency } from '@genesislcap/foundation-ui';
|
|
9
13
|
import { ViewTemplate } from '@microsoft/fast-element';
|
|
10
14
|
|
|
15
|
+
/**
|
|
16
|
+
* A function that allows configuring the header micro-frontend with name and templateOptions.
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
* Configure the Header micro frontend for host app integration.
|
|
20
|
+
*
|
|
21
|
+
* @example Providing template options to align to your host application.
|
|
22
|
+
* ```ts
|
|
23
|
+
* const { configure } = await import('@genesislcap/foundation-header/config'); // < import from the subpath
|
|
24
|
+
* return configure({
|
|
25
|
+
* name: `nexus-app-header`,
|
|
26
|
+
* // These will be merged with the packages `defaultTemplateOptions`. You will need to have these components registered in your application.
|
|
27
|
+
* templateOptions: {
|
|
28
|
+
* button: 'nexus-button',
|
|
29
|
+
* icon: 'nexus-icon-next',
|
|
30
|
+
* },
|
|
31
|
+
* });
|
|
32
|
+
* },
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* @param config - A partial HeaderConfig.
|
|
36
|
+
* @public
|
|
37
|
+
*/
|
|
38
|
+
export declare function configure(config: Partial<HeaderConfig>): Promise<Navigation>;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Default HeaderConfig DI implementation.
|
|
42
|
+
* @public
|
|
43
|
+
*/
|
|
44
|
+
export declare const defaultHeaderConfig: HeaderConfig;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Top level template for Navigation class
|
|
48
|
+
*
|
|
49
|
+
* @remarks
|
|
50
|
+
*
|
|
51
|
+
* Dynamic template which wraps the code in a provider
|
|
52
|
+
*
|
|
53
|
+
* @typeParam Navigation - Navigation class
|
|
54
|
+
*
|
|
55
|
+
* @returns ViewTemplate instance of the Navigation html
|
|
56
|
+
*
|
|
57
|
+
* @internal
|
|
58
|
+
*/
|
|
59
|
+
export declare const DynamicTemplate: ViewTemplate<Navigation>;
|
|
60
|
+
|
|
11
61
|
/**
|
|
12
62
|
* Package element integration targets.
|
|
13
63
|
*
|
|
@@ -15,6 +65,53 @@ import { ViewTemplate } from '@microsoft/fast-element';
|
|
|
15
65
|
*/
|
|
16
66
|
export declare type ElementTargetId = HeaderTargetId | NavTargetId | SideNavTargetId;
|
|
17
67
|
|
|
68
|
+
/**
|
|
69
|
+
* FoundationHeader.
|
|
70
|
+
*
|
|
71
|
+
* @remarks
|
|
72
|
+
* Base MF export used by host application `configure` calls. It does not set up a design system or components. Both are
|
|
73
|
+
* expected to be registered in the host application, which should provide the details of which to the MF via
|
|
74
|
+
* TemplateOptions.
|
|
75
|
+
*
|
|
76
|
+
* See the {@link configure} hook for more information on how to set up and use this micro frontend in your application.
|
|
77
|
+
*
|
|
78
|
+
* @privateRemarks
|
|
79
|
+
* We will override loadRemotes to remove zero. This setup is the inverse of FoundationAuth.
|
|
80
|
+
* We're doing this to avoid a breaking change, so consumers can continue to use Navigation which bundles zero.
|
|
81
|
+
*
|
|
82
|
+
* @public
|
|
83
|
+
*/
|
|
84
|
+
export declare class FoundationHeader extends Navigation {
|
|
85
|
+
loadRemotes(): Promise<void>;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Do not reference any ../main files here. We must avoid ../tags being referenced and therefore setup pre-configuration.
|
|
90
|
+
*/
|
|
91
|
+
/**
|
|
92
|
+
* HeaderConfig DI interface.
|
|
93
|
+
*
|
|
94
|
+
* @public
|
|
95
|
+
*/
|
|
96
|
+
export declare interface HeaderConfig extends PartialFASTElementDefinition {
|
|
97
|
+
/**
|
|
98
|
+
* Template options.
|
|
99
|
+
*
|
|
100
|
+
* @remarks
|
|
101
|
+
* Used by host applications to assign MF template options and subcomponent tags to align with the host design system.
|
|
102
|
+
*/
|
|
103
|
+
templateOptions: TemplateOptions;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* HeaderConfig DI key.
|
|
108
|
+
*
|
|
109
|
+
* @internal
|
|
110
|
+
* @privateRemarks
|
|
111
|
+
* Marked as internal to stop api-extractor becoming confused cross-linking tokens with the same name.
|
|
112
|
+
*/
|
|
113
|
+
export declare const HeaderConfig: InterfaceSymbol<HeaderConfig>;
|
|
114
|
+
|
|
18
115
|
/**
|
|
19
116
|
* Header integration targets.
|
|
20
117
|
*
|
|
@@ -31,6 +128,21 @@ export declare type LanguageOptions = {
|
|
|
31
128
|
selectedLanguage: string;
|
|
32
129
|
};
|
|
33
130
|
|
|
131
|
+
/**
|
|
132
|
+
* Loading template for the Navigation class
|
|
133
|
+
*
|
|
134
|
+
* @remarks
|
|
135
|
+
*
|
|
136
|
+
* Template used to indicate loading to the user
|
|
137
|
+
*
|
|
138
|
+
* @typeParam Navigation - Navigation class
|
|
139
|
+
*
|
|
140
|
+
* @returns ViewTemplate instance of the Loading html
|
|
141
|
+
*
|
|
142
|
+
* @internal
|
|
143
|
+
*/
|
|
144
|
+
export declare const LoadingTemplate: ViewTemplate<Navigation>;
|
|
145
|
+
|
|
34
146
|
/**
|
|
35
147
|
* Base styles for the foundation-header
|
|
36
148
|
*
|
|
@@ -40,6 +152,21 @@ export declare type LanguageOptions = {
|
|
|
40
152
|
*/
|
|
41
153
|
export declare const MainStyles: ElementStyles;
|
|
42
154
|
|
|
155
|
+
/**
|
|
156
|
+
* Render template for the Navigation class
|
|
157
|
+
*
|
|
158
|
+
* @remarks
|
|
159
|
+
*
|
|
160
|
+
* Template used when the class has finished loading
|
|
161
|
+
*
|
|
162
|
+
* @typeParam Navigation - Navigation class
|
|
163
|
+
*
|
|
164
|
+
* @returns ViewTemplate instance of the Main html
|
|
165
|
+
*
|
|
166
|
+
* @internal
|
|
167
|
+
*/
|
|
168
|
+
export declare const MainTemplate: ViewTemplate<Navigation>;
|
|
169
|
+
|
|
43
170
|
/**
|
|
44
171
|
* Events dispatched by the navigation control buttons
|
|
45
172
|
* @public
|
|
@@ -88,6 +215,7 @@ export declare class Navigation extends Navigation_base {
|
|
|
88
215
|
auth: Auth;
|
|
89
216
|
credentialManager: CredentialManager;
|
|
90
217
|
i18next: I18next;
|
|
218
|
+
headerConfig: HeaderConfig;
|
|
91
219
|
ready: boolean;
|
|
92
220
|
/**
|
|
93
221
|
* Username of the logged in user
|
|
@@ -310,9 +438,7 @@ declare const Navigation_base: abstract new (...args: any[]) => {
|
|
|
310
438
|
readonly classList: DOMTokenList;
|
|
311
439
|
className: string;
|
|
312
440
|
readonly clientHeight: number;
|
|
313
|
-
readonly clientLeft: number;
|
|
314
|
-
* Username of the logged in user
|
|
315
|
-
*/
|
|
441
|
+
readonly clientLeft: number;
|
|
316
442
|
readonly clientTop: number;
|
|
317
443
|
readonly clientWidth: number;
|
|
318
444
|
id: string;
|
|
@@ -326,6 +452,14 @@ declare const Navigation_base: abstract new (...args: any[]) => {
|
|
|
326
452
|
readonly prefix: string;
|
|
327
453
|
readonly scrollHeight: number;
|
|
328
454
|
scrollLeft: number;
|
|
455
|
+
/**
|
|
456
|
+
* Optional attribute which controls the icon to show on the navigation bar and flyout
|
|
457
|
+
* Control via `logo-src`
|
|
458
|
+
*
|
|
459
|
+
* @remarks
|
|
460
|
+
*
|
|
461
|
+
* If this attribute is not set then the Genesis logo is shown instead
|
|
462
|
+
*/
|
|
329
463
|
scrollTop: number;
|
|
330
464
|
readonly scrollWidth: number;
|
|
331
465
|
readonly shadowRoot: ShadowRoot;
|
|
@@ -420,7 +554,17 @@ declare const Navigation_base: abstract new (...args: any[]) => {
|
|
|
420
554
|
readonly ELEMENT_NODE: number;
|
|
421
555
|
readonly ENTITY_NODE: number;
|
|
422
556
|
readonly ENTITY_REFERENCE_NODE: number;
|
|
423
|
-
readonly NOTATION_NODE: number;
|
|
557
|
+
readonly NOTATION_NODE: number; /**
|
|
558
|
+
* Changes the route of the current page
|
|
559
|
+
*
|
|
560
|
+
* @remarks
|
|
561
|
+
*
|
|
562
|
+
* Requires setup of the Router and usage of the FAST Router
|
|
563
|
+
*
|
|
564
|
+
* @param path - string represeting the new route to move to
|
|
565
|
+
*
|
|
566
|
+
* @public
|
|
567
|
+
*/
|
|
424
568
|
readonly PROCESSING_INSTRUCTION_NODE: number;
|
|
425
569
|
readonly TEXT_NODE: number;
|
|
426
570
|
dispatchEvent(event: Event): boolean;
|
|
@@ -445,7 +589,16 @@ declare const Navigation_base: abstract new (...args: any[]) => {
|
|
|
445
589
|
ariaModal: string;
|
|
446
590
|
ariaMultiLine: string;
|
|
447
591
|
ariaMultiSelectable: string;
|
|
448
|
-
ariaOrientation: string;
|
|
592
|
+
ariaOrientation: string; /**
|
|
593
|
+
* Emits the event corresponding to the luminance icon being clicked
|
|
594
|
+
*
|
|
595
|
+
* @remarks
|
|
596
|
+
*
|
|
597
|
+
* Activated when the user clicks on the moon icon on the navigation
|
|
598
|
+
* bar right hand side
|
|
599
|
+
*
|
|
600
|
+
* @internal
|
|
601
|
+
*/
|
|
449
602
|
ariaPlaceholder: string;
|
|
450
603
|
ariaPosInSet: string;
|
|
451
604
|
ariaPressed: string;
|
|
@@ -463,16 +616,7 @@ declare const Navigation_base: abstract new (...args: any[]) => {
|
|
|
463
616
|
ariaValueMin: string;
|
|
464
617
|
ariaValueNow: string;
|
|
465
618
|
ariaValueText: string;
|
|
466
|
-
role: string;
|
|
467
|
-
* Emits the event corresponding to the notification icon being clicked
|
|
468
|
-
*
|
|
469
|
-
* @remarks
|
|
470
|
-
*
|
|
471
|
-
* Activated when the user clicks on the bell icon on the navigation
|
|
472
|
-
* bar right hand side
|
|
473
|
-
*
|
|
474
|
-
* @internal
|
|
475
|
-
*/
|
|
619
|
+
role: string;
|
|
476
620
|
animate(keyframes: PropertyIndexedKeyframes | Keyframe[], options?: number | KeyframeAnimationOptions): Animation;
|
|
477
621
|
getAnimations(options?: GetAnimationsOptions): Animation[];
|
|
478
622
|
after(...nodes: (string | Node)[]): void;
|
|
@@ -643,4 +787,61 @@ export declare type SideNavTargetId = 'side-nav-start' | 'side-nav' | 'side-nav-
|
|
|
643
787
|
*/
|
|
644
788
|
export declare type StyleTargetId = 'header';
|
|
645
789
|
|
|
790
|
+
/**
|
|
791
|
+
* TemplateComponents.
|
|
792
|
+
* @public
|
|
793
|
+
*/
|
|
794
|
+
declare type TemplateComponents = {
|
|
795
|
+
icon: TemplateElementDependency;
|
|
796
|
+
button: TemplateElementDependency;
|
|
797
|
+
connectionIndicator: TemplateElementDependency;
|
|
798
|
+
select: TemplateElementDependency;
|
|
799
|
+
option: TemplateElementDependency;
|
|
800
|
+
flyout: TemplateElementDependency;
|
|
801
|
+
provider: TemplateElementDependency;
|
|
802
|
+
};
|
|
803
|
+
|
|
804
|
+
/**
|
|
805
|
+
* TemplateOptions.
|
|
806
|
+
* @public
|
|
807
|
+
*/
|
|
808
|
+
declare type TemplateOptions = Partial<TemplateComponents> & {
|
|
809
|
+
/**
|
|
810
|
+
* @remarks
|
|
811
|
+
* Just for reference that template options may be more than tags.
|
|
812
|
+
* @internal
|
|
813
|
+
*/
|
|
814
|
+
somePartial?: string | SyntheticViewTemplate;
|
|
815
|
+
};
|
|
816
|
+
|
|
817
|
+
/**
|
|
818
|
+
* ZeroHeader is a zero version of the header micro-frontend.
|
|
819
|
+
*
|
|
820
|
+
* @remarks
|
|
821
|
+
* A zero version that pre-registers zero components and uses the zero design system so that it can run standalone.
|
|
822
|
+
* Generally this is used for development purposes, but can be deployed as a standalone application if required or be
|
|
823
|
+
* used by a host application that is already using zero. ZeroHeader and its components won't bloat the core bundle as
|
|
824
|
+
* these are only loaded on-demand when in use.
|
|
825
|
+
*
|
|
826
|
+
* @example
|
|
827
|
+
* ```ts
|
|
828
|
+
* import { ZeroHeader } from '@genesislcap/foundation-header';
|
|
829
|
+
* ...
|
|
830
|
+
* ZeroHeader
|
|
831
|
+
* ```
|
|
832
|
+
*
|
|
833
|
+
* @example Load the micro frontend on-demand
|
|
834
|
+
* ```ts
|
|
835
|
+
* const { ZeroHeader } = await import('@genesislcap/foundation-header');
|
|
836
|
+
* },
|
|
837
|
+
* ```
|
|
838
|
+
*
|
|
839
|
+
* @privateRemarks
|
|
840
|
+
* For now we just extend Navigation as is, given that is ZeroHeader really.
|
|
841
|
+
*
|
|
842
|
+
* @public
|
|
843
|
+
*/
|
|
844
|
+
export declare class ZeroHeader extends Navigation {
|
|
845
|
+
}
|
|
846
|
+
|
|
646
847
|
export { }
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-header](./foundation-header.md) > [configure](./foundation-header.configure.md)
|
|
4
|
+
|
|
5
|
+
## configure() function
|
|
6
|
+
|
|
7
|
+
A function that allows configuring the header micro-frontend with name and templateOptions.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare function configure(config: Partial<HeaderConfig>): Promise<typeof import("../main").Navigation>;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| config | Partial<[HeaderConfig](./foundation-header.headerconfig.md)<!-- -->> | A partial HeaderConfig. |
|
|
20
|
+
|
|
21
|
+
**Returns:**
|
|
22
|
+
|
|
23
|
+
Promise<typeof import("../main").[Navigation](./foundation-header.navigation.md)<!-- -->>
|
|
24
|
+
|
|
25
|
+
## Remarks
|
|
26
|
+
|
|
27
|
+
Configure the Header micro frontend for host app integration.
|
|
28
|
+
|
|
29
|
+
## Example
|
|
30
|
+
|
|
31
|
+
Providing template options to align to your host application.
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
const { configure } = await import('@genesislcap/foundation-header/config'); // < import from the subpath
|
|
35
|
+
return configure({
|
|
36
|
+
name: `nexus-app-header`,
|
|
37
|
+
// These will be merged with the packages `defaultTemplateOptions`. You will need to have these components registered in your application.
|
|
38
|
+
templateOptions: {
|
|
39
|
+
button: 'nexus-button',
|
|
40
|
+
icon: 'nexus-icon-next',
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
},
|
|
44
|
+
```
|
|
45
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-header](./foundation-header.md) > [defaultHeaderConfig](./foundation-header.defaultheaderconfig.md)
|
|
4
|
+
|
|
5
|
+
## defaultHeaderConfig variable
|
|
6
|
+
|
|
7
|
+
Default HeaderConfig DI implementation.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
defaultHeaderConfig: HeaderConfig
|
|
13
|
+
```
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-header](./foundation-header.md) > [FoundationHeader](./foundation-header.foundationheader.md) > [loadRemotes](./foundation-header.foundationheader.loadremotes.md)
|
|
4
|
+
|
|
5
|
+
## FoundationHeader.loadRemotes() method
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
loadRemotes(): Promise<void>;
|
|
11
|
+
```
|
|
12
|
+
**Returns:**
|
|
13
|
+
|
|
14
|
+
Promise<void>
|
|
15
|
+
|