@genesislcap/foundation-header 14.143.1 → 14.143.2
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 +32 -562
- package/dist/dts/components/components.d.ts +9 -0
- package/dist/dts/components/components.d.ts.map +1 -0
- package/dist/dts/components/index.d.ts +2 -0
- package/dist/dts/components/index.d.ts.map +1 -0
- package/dist/dts/config/index.d.ts +0 -2
- package/dist/dts/config/index.d.ts.map +1 -1
- 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 +24 -53
- 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/esm/components/components.js +42 -0
- package/dist/esm/components/index.js +1 -0
- package/dist/esm/config/index.js +0 -2
- package/dist/esm/main/index.js +1 -1
- package/dist/esm/main/main.js +23 -58
- package/dist/esm/main/main.styles.js +133 -56
- package/dist/esm/main/main.template.js +28 -32
- package/dist/foundation-header.api.json +0 -219
- package/dist/foundation-header.d.ts +24 -187
- package/docs/api/foundation-header.md +0 -14
- package/docs/api/foundation-header.navigation.md +0 -1
- package/docs/api-report.md +2 -46
- package/package.json +13 -14
- package/dist/dts/components/zero-components.d.ts +0 -6
- package/dist/dts/components/zero-components.d.ts.map +0 -1
- package/dist/dts/config/config.d.ts +0 -33
- package/dist/dts/config/config.d.ts.map +0 -1
- package/dist/dts/config/configure.d.ts +0 -27
- package/dist/dts/config/configure.d.ts.map +0 -1
- package/dist/dts/config/templates.d.ts +0 -34
- package/dist/dts/config/templates.d.ts.map +0 -1
- package/dist/dts/tags/index.d.ts +0 -2
- package/dist/dts/tags/index.d.ts.map +0 -1
- package/dist/dts/tags/tags.d.ts +0 -36
- package/dist/dts/tags/tags.d.ts.map +0 -1
- package/dist/esm/components/zero-components.js +0 -48
- package/dist/esm/config/config.js +0 -18
- package/dist/esm/config/configure.js +0 -56
- package/dist/esm/config/templates.js +0 -14
- package/dist/esm/tags/index.js +0 -1
- package/dist/esm/tags/tags.js +0 -39
- package/docs/api/foundation-header.configure.md +0 -46
- package/docs/api/foundation-header.defaultheaderconfig.md +0 -13
- package/docs/api/foundation-header.headerconfig.md +0 -21
- package/docs/api/foundation-header.headerconfig.templateoptions.md +0 -18
- package/docs/api/foundation-header.navigation.headerconfig.md +0 -11
- package/docs/api/foundation-header.zeroheader.md +0 -39
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { getApp } from '@genesislcap/foundation-shell/app';
|
|
2
2
|
import { html, repeat, when } from '@microsoft/fast-element';
|
|
3
|
-
import { buttonTag, iconTag, flyoutTag, optionTag, connectionIndicatorTag, selectTag, } from '../tags';
|
|
4
3
|
const app = getApp();
|
|
5
4
|
const sideNavTemplate = html `
|
|
6
|
-
|
|
5
|
+
<zero-flyout
|
|
7
6
|
position="left"
|
|
8
7
|
?closed=${(x) => !x.sideNavOpen}
|
|
9
8
|
@closed=${(x) => x.toggleNavVisibility()}
|
|
@@ -23,43 +22,40 @@ const sideNavTemplate = html `
|
|
|
23
22
|
data-test-id="logout-button"
|
|
24
23
|
@click=${(x) => x.logout()}
|
|
25
24
|
>
|
|
26
|
-
|
|
25
|
+
<zero-icon name="sign-out-alt"></zero-icon>
|
|
27
26
|
Sign out
|
|
28
27
|
</div>
|
|
29
|
-
|
|
28
|
+
</zero-flyout>
|
|
30
29
|
`;
|
|
31
30
|
const defaultRouteNavItemsTemplate = html `
|
|
32
|
-
|
|
31
|
+
<zero-button
|
|
33
32
|
appearance="neutral-grey"
|
|
34
|
-
class="nav-button"
|
|
35
|
-
value="1"
|
|
36
33
|
@click=${(x) => x.navigateTo('protected')}
|
|
37
34
|
data-test-id="home-button"
|
|
38
35
|
>
|
|
39
|
-
|
|
36
|
+
<zero-icon name="home"></zero-icon>
|
|
40
37
|
Home
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
</zero-button>
|
|
39
|
+
<zero-button @click=${(x) => x.navigateTo('not-found')} data-test-id="profiles-button">
|
|
40
|
+
<zero-icon name="users"></zero-icon>
|
|
44
41
|
Profiles
|
|
45
|
-
|
|
42
|
+
</zero-button>
|
|
46
43
|
`;
|
|
47
44
|
const routeNavItemsTemplate = html `
|
|
48
45
|
<template>
|
|
49
46
|
${repeat((x) => x.routeNavItems, html `
|
|
50
|
-
|
|
47
|
+
<zero-button
|
|
51
48
|
appearance="neutral-grey"
|
|
52
|
-
class="nav-button"
|
|
53
49
|
slot="routes"
|
|
54
50
|
@click=${(x, c) => c.parent.navigateTo(x.routePath)}
|
|
55
51
|
data-test-id="${(x) => `${x.routePath}-button`}"
|
|
56
52
|
>
|
|
57
53
|
${when((x) => x.icon, html `
|
|
58
|
-
|
|
54
|
+
<zero-icon
|
|
59
55
|
name="${(x) => x.icon.name}"
|
|
60
56
|
variant="${(x) => x.icon.variant}"
|
|
61
57
|
size="${(x) => x.icon.size}"
|
|
62
|
-
|
|
58
|
+
></zero-icon>
|
|
63
59
|
`)}
|
|
64
60
|
${(x, c) => c.parent.toLocalisedText(x.title)}
|
|
65
61
|
</zero-button>
|
|
@@ -91,7 +87,7 @@ export const NavTemplate = html `
|
|
|
91
87
|
@click=${(x) => x.toggleNavVisibility()}
|
|
92
88
|
data-test-id="hamburger-menu"
|
|
93
89
|
>
|
|
94
|
-
|
|
90
|
+
<zero-icon name="bars" part="nav-visibility-icon"></zero-icon>
|
|
95
91
|
</div>
|
|
96
92
|
`)}
|
|
97
93
|
<div class="logo-container" data-test-id="nav-bar-logo">
|
|
@@ -110,41 +106,41 @@ export const NavTemplate = html `
|
|
|
110
106
|
data-test-id="luminance-toggle-button"
|
|
111
107
|
part="luminance-button"
|
|
112
108
|
>
|
|
113
|
-
|
|
109
|
+
<zero-icon
|
|
114
110
|
@click=${(x) => x.luminanceIconEvent()}
|
|
115
111
|
variant="regular"
|
|
116
112
|
name="moon"
|
|
117
113
|
part="luminance-icon"
|
|
118
|
-
|
|
114
|
+
></zero-icon>
|
|
119
115
|
</div>
|
|
120
116
|
`)}
|
|
121
117
|
${when((x) => x.showMiscToggleButton, html `
|
|
122
118
|
<div class="icon-container" data-test-id="misc-toggle-button" part="misc-button">
|
|
123
|
-
|
|
119
|
+
<zero-icon @click=${(x) => x.miscIconEvent()} name="th" part="misc-icon"></zero-icon>
|
|
124
120
|
</div>
|
|
125
121
|
`)}
|
|
126
|
-
|
|
122
|
+
${when((x) => x.showNotificationsButton, html `
|
|
127
123
|
<div
|
|
128
124
|
class="icon-container"
|
|
129
125
|
data-test-id="notifications-button"
|
|
130
126
|
part="notifications-button"
|
|
131
127
|
>
|
|
132
|
-
|
|
128
|
+
<zero-icon
|
|
133
129
|
variant="regular"
|
|
134
130
|
@click=${(x) => x.notificationIconEvent()}
|
|
135
131
|
name="bell"
|
|
136
132
|
part="notifications-icon"
|
|
137
|
-
|
|
133
|
+
></zero-icon>
|
|
138
134
|
<slot name="notifications-icon-end"></slot>
|
|
139
135
|
</div>
|
|
140
|
-
`)}
|
|
136
|
+
`)}
|
|
141
137
|
${when((x) => x.showConnectionIndicator, html `
|
|
142
138
|
<div class="connection-indicator-container" data-test-id="connection-indicator">
|
|
143
|
-
|
|
139
|
+
<zero-connection-indicator show-label="false"></zero-connection-indicator>
|
|
144
140
|
</div>
|
|
145
141
|
`)}
|
|
146
142
|
${when((x) => x.showLanguageSelector && x.languageOptions, html `
|
|
147
|
-
|
|
143
|
+
<zero-select
|
|
148
144
|
class="language-selector"
|
|
149
145
|
position="below"
|
|
150
146
|
data-test-id="language-selector"
|
|
@@ -152,20 +148,20 @@ export const NavTemplate = html `
|
|
|
152
148
|
@change="${(x, c) => x.changeLanguage(c.event)}"
|
|
153
149
|
>
|
|
154
150
|
${repeat((x) => x.languageOptions.availableLanguages, html `
|
|
155
|
-
|
|
151
|
+
<zero-option
|
|
156
152
|
value="${(x) => x}"
|
|
157
153
|
?selected="${(x, c) => x === c.parent.languageOptions.selectedLanguage}"
|
|
158
154
|
>
|
|
159
155
|
${(x) => x.toUpperCase()}
|
|
160
|
-
|
|
156
|
+
</zero-option>
|
|
161
157
|
`)}
|
|
162
|
-
|
|
158
|
+
</zero-select>
|
|
163
159
|
`)}
|
|
164
160
|
|
|
165
|
-
|
|
166
|
-
|
|
161
|
+
<zero-button appearance="neutral-grey" data-test-id="user-button">
|
|
162
|
+
<zero-icon name="user-circle"></zero-icon>
|
|
167
163
|
${(x) => x.userName}
|
|
168
|
-
|
|
164
|
+
</zero-button>
|
|
169
165
|
</div>
|
|
170
166
|
${app.registerElementsTarget(['header', 'header-end'])}
|
|
171
167
|
</div>
|
|
@@ -184,103 +184,6 @@
|
|
|
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 *\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
|
-
},
|
|
284
187
|
{
|
|
285
188
|
"kind": "TypeAlias",
|
|
286
189
|
"canonicalReference": "@genesislcap/foundation-header!ElementTargetId:type",
|
|
@@ -326,66 +229,6 @@
|
|
|
326
229
|
"endIndex": 6
|
|
327
230
|
}
|
|
328
231
|
},
|
|
329
|
-
{
|
|
330
|
-
"kind": "Interface",
|
|
331
|
-
"canonicalReference": "@genesislcap/foundation-header!HeaderConfig:interface",
|
|
332
|
-
"docComment": "/**\n * HeaderConfig DI interface.\n *\n * @public\n */\n",
|
|
333
|
-
"excerptTokens": [
|
|
334
|
-
{
|
|
335
|
-
"kind": "Content",
|
|
336
|
-
"text": "export interface HeaderConfig extends "
|
|
337
|
-
},
|
|
338
|
-
{
|
|
339
|
-
"kind": "Reference",
|
|
340
|
-
"text": "PartialFASTElementDefinition",
|
|
341
|
-
"canonicalReference": "@microsoft/fast-element!PartialFASTElementDefinition:interface"
|
|
342
|
-
},
|
|
343
|
-
{
|
|
344
|
-
"kind": "Content",
|
|
345
|
-
"text": " "
|
|
346
|
-
}
|
|
347
|
-
],
|
|
348
|
-
"fileUrlPath": "src/config/config.ts",
|
|
349
|
-
"releaseTag": "Public",
|
|
350
|
-
"name": "HeaderConfig",
|
|
351
|
-
"preserveMemberOrder": false,
|
|
352
|
-
"members": [
|
|
353
|
-
{
|
|
354
|
-
"kind": "PropertySignature",
|
|
355
|
-
"canonicalReference": "@genesislcap/foundation-header!HeaderConfig#templateOptions:member",
|
|
356
|
-
"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",
|
|
357
|
-
"excerptTokens": [
|
|
358
|
-
{
|
|
359
|
-
"kind": "Content",
|
|
360
|
-
"text": "templateOptions: "
|
|
361
|
-
},
|
|
362
|
-
{
|
|
363
|
-
"kind": "Reference",
|
|
364
|
-
"text": "TemplateOptions",
|
|
365
|
-
"canonicalReference": "@genesislcap/foundation-header!~TemplateOptions:type"
|
|
366
|
-
},
|
|
367
|
-
{
|
|
368
|
-
"kind": "Content",
|
|
369
|
-
"text": ";"
|
|
370
|
-
}
|
|
371
|
-
],
|
|
372
|
-
"isReadonly": false,
|
|
373
|
-
"isOptional": false,
|
|
374
|
-
"releaseTag": "Public",
|
|
375
|
-
"name": "templateOptions",
|
|
376
|
-
"propertyTypeTokenRange": {
|
|
377
|
-
"startIndex": 1,
|
|
378
|
-
"endIndex": 2
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
],
|
|
382
|
-
"extendsTokenRanges": [
|
|
383
|
-
{
|
|
384
|
-
"startIndex": 1,
|
|
385
|
-
"endIndex": 2
|
|
386
|
-
}
|
|
387
|
-
]
|
|
388
|
-
},
|
|
389
232
|
{
|
|
390
233
|
"kind": "TypeAlias",
|
|
391
234
|
"canonicalReference": "@genesislcap/foundation-header!HeaderTargetId:type",
|
|
@@ -664,37 +507,6 @@
|
|
|
664
507
|
"isProtected": false,
|
|
665
508
|
"isAbstract": false
|
|
666
509
|
},
|
|
667
|
-
{
|
|
668
|
-
"kind": "Property",
|
|
669
|
-
"canonicalReference": "@genesislcap/foundation-header!Navigation#headerConfig:member",
|
|
670
|
-
"docComment": "",
|
|
671
|
-
"excerptTokens": [
|
|
672
|
-
{
|
|
673
|
-
"kind": "Content",
|
|
674
|
-
"text": "headerConfig: "
|
|
675
|
-
},
|
|
676
|
-
{
|
|
677
|
-
"kind": "Reference",
|
|
678
|
-
"text": "HeaderConfig",
|
|
679
|
-
"canonicalReference": "@genesislcap/foundation-header!HeaderConfig:interface"
|
|
680
|
-
},
|
|
681
|
-
{
|
|
682
|
-
"kind": "Content",
|
|
683
|
-
"text": ";"
|
|
684
|
-
}
|
|
685
|
-
],
|
|
686
|
-
"isReadonly": false,
|
|
687
|
-
"isOptional": false,
|
|
688
|
-
"releaseTag": "Public",
|
|
689
|
-
"name": "headerConfig",
|
|
690
|
-
"propertyTypeTokenRange": {
|
|
691
|
-
"startIndex": 1,
|
|
692
|
-
"endIndex": 2
|
|
693
|
-
},
|
|
694
|
-
"isStatic": false,
|
|
695
|
-
"isProtected": false,
|
|
696
|
-
"isAbstract": false
|
|
697
|
-
},
|
|
698
510
|
{
|
|
699
511
|
"kind": "Property",
|
|
700
512
|
"canonicalReference": "@genesislcap/foundation-header!Navigation#hideSideBar:member",
|
|
@@ -1429,37 +1241,6 @@
|
|
|
1429
1241
|
"startIndex": 1,
|
|
1430
1242
|
"endIndex": 2
|
|
1431
1243
|
}
|
|
1432
|
-
},
|
|
1433
|
-
{
|
|
1434
|
-
"kind": "Class",
|
|
1435
|
-
"canonicalReference": "@genesislcap/foundation-header!ZeroHeader:class",
|
|
1436
|
-
"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. 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 *\n * const { ZeroHeader } = await import('@genesislcap/foundation-header');\n * return ZeroHeader;\n * },\n * ```\n *\n * @public\n */\n",
|
|
1437
|
-
"excerptTokens": [
|
|
1438
|
-
{
|
|
1439
|
-
"kind": "Content",
|
|
1440
|
-
"text": "export declare class ZeroHeader extends "
|
|
1441
|
-
},
|
|
1442
|
-
{
|
|
1443
|
-
"kind": "Reference",
|
|
1444
|
-
"text": "Navigation",
|
|
1445
|
-
"canonicalReference": "@genesislcap/foundation-header!Navigation:class"
|
|
1446
|
-
},
|
|
1447
|
-
{
|
|
1448
|
-
"kind": "Content",
|
|
1449
|
-
"text": " "
|
|
1450
|
-
}
|
|
1451
|
-
],
|
|
1452
|
-
"fileUrlPath": "src/main/main.ts",
|
|
1453
|
-
"releaseTag": "Public",
|
|
1454
|
-
"isAbstract": false,
|
|
1455
|
-
"name": "ZeroHeader",
|
|
1456
|
-
"preserveMemberOrder": false,
|
|
1457
|
-
"members": [],
|
|
1458
|
-
"extendsTokenRange": {
|
|
1459
|
-
"startIndex": 1,
|
|
1460
|
-
"endIndex": 2
|
|
1461
|
-
},
|
|
1462
|
-
"implementsTokenRanges": []
|
|
1463
1244
|
}
|
|
1464
1245
|
]
|
|
1465
1246
|
}
|
|
@@ -6,59 +6,8 @@ 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';
|
|
13
9
|
import { ViewTemplate } from '@microsoft/fast-element';
|
|
14
10
|
|
|
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
|
-
|
|
24
|
-
* const { configure } = await import('@genesislcap/foundation-header/config'); // < import from the subpath
|
|
25
|
-
* return configure({
|
|
26
|
-
* name: `nexus-app-header`,
|
|
27
|
-
* // These will be merged with the packages `defaultTemplateOptions`. You will need to have these components registered in your application.
|
|
28
|
-
* templateOptions: {
|
|
29
|
-
* button: 'nexus-button',
|
|
30
|
-
* icon: 'nexus-icon-next',
|
|
31
|
-
* },
|
|
32
|
-
* });
|
|
33
|
-
* },
|
|
34
|
-
* ```
|
|
35
|
-
*
|
|
36
|
-
* @param config - A partial HeaderConfig.
|
|
37
|
-
* @public
|
|
38
|
-
*/
|
|
39
|
-
export declare function configure(config: Partial<HeaderConfig>): Promise<Navigation>;
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Default HeaderConfig DI implementation.
|
|
43
|
-
* @public
|
|
44
|
-
*/
|
|
45
|
-
export declare const defaultHeaderConfig: HeaderConfig;
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Top level template for Navigation class
|
|
49
|
-
*
|
|
50
|
-
* @remarks
|
|
51
|
-
*
|
|
52
|
-
* Dynamic template which wraps the code in a provider
|
|
53
|
-
*
|
|
54
|
-
* @typeParam Navigation - Navigation class
|
|
55
|
-
*
|
|
56
|
-
* @returns ViewTemplate instance of the Navigation html
|
|
57
|
-
*
|
|
58
|
-
* @internal
|
|
59
|
-
*/
|
|
60
|
-
export declare const DynamicTemplate: ViewTemplate<Navigation>;
|
|
61
|
-
|
|
62
11
|
/**
|
|
63
12
|
* Package element integration targets.
|
|
64
13
|
*
|
|
@@ -66,33 +15,6 @@ export declare const DynamicTemplate: ViewTemplate<Navigation>;
|
|
|
66
15
|
*/
|
|
67
16
|
export declare type ElementTargetId = HeaderTargetId | NavTargetId | SideNavTargetId;
|
|
68
17
|
|
|
69
|
-
/**
|
|
70
|
-
* Do not reference any ../main files here. We must avoid ../tags being referenced and therefore setup pre-configuration.
|
|
71
|
-
*/
|
|
72
|
-
/**
|
|
73
|
-
* HeaderConfig DI interface.
|
|
74
|
-
*
|
|
75
|
-
* @public
|
|
76
|
-
*/
|
|
77
|
-
export declare interface HeaderConfig extends PartialFASTElementDefinition {
|
|
78
|
-
/**
|
|
79
|
-
* Template options.
|
|
80
|
-
*
|
|
81
|
-
* @remarks
|
|
82
|
-
* Used by host applications to assign MF template options and subcomponent tags to align with the host design system.
|
|
83
|
-
*/
|
|
84
|
-
templateOptions: TemplateOptions;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* HeaderConfig DI key.
|
|
89
|
-
*
|
|
90
|
-
* @internal
|
|
91
|
-
* @privateRemarks
|
|
92
|
-
* Marked as internal to stop api-extractor becoming confused cross-linking tokens with the same name.
|
|
93
|
-
*/
|
|
94
|
-
export declare const HeaderConfig: InterfaceSymbol<HeaderConfig>;
|
|
95
|
-
|
|
96
18
|
/**
|
|
97
19
|
* Header integration targets.
|
|
98
20
|
*
|
|
@@ -109,21 +31,6 @@ export declare type LanguageOptions = {
|
|
|
109
31
|
selectedLanguage: string;
|
|
110
32
|
};
|
|
111
33
|
|
|
112
|
-
/**
|
|
113
|
-
* Loading template for the Navigation class
|
|
114
|
-
*
|
|
115
|
-
* @remarks
|
|
116
|
-
*
|
|
117
|
-
* Template used to indicate loading to the user
|
|
118
|
-
*
|
|
119
|
-
* @typeParam Navigation - Navigation class
|
|
120
|
-
*
|
|
121
|
-
* @returns ViewTemplate instance of the Loading html
|
|
122
|
-
*
|
|
123
|
-
* @internal
|
|
124
|
-
*/
|
|
125
|
-
export declare const LoadingTemplate: ViewTemplate<Navigation>;
|
|
126
|
-
|
|
127
34
|
/**
|
|
128
35
|
* Base styles for the foundation-header
|
|
129
36
|
*
|
|
@@ -133,21 +40,6 @@ export declare const LoadingTemplate: ViewTemplate<Navigation>;
|
|
|
133
40
|
*/
|
|
134
41
|
export declare const MainStyles: ElementStyles;
|
|
135
42
|
|
|
136
|
-
/**
|
|
137
|
-
* Render template for the Navigation class
|
|
138
|
-
*
|
|
139
|
-
* @remarks
|
|
140
|
-
*
|
|
141
|
-
* Template used when the class has finished loading
|
|
142
|
-
*
|
|
143
|
-
* @typeParam Navigation - Navigation class
|
|
144
|
-
*
|
|
145
|
-
* @returns ViewTemplate instance of the Main html
|
|
146
|
-
*
|
|
147
|
-
* @internal
|
|
148
|
-
*/
|
|
149
|
-
export declare const MainTemplate: ViewTemplate<Navigation>;
|
|
150
|
-
|
|
151
43
|
/**
|
|
152
44
|
* Events dispatched by the navigation control buttons
|
|
153
45
|
* @public
|
|
@@ -196,7 +88,6 @@ export declare class Navigation extends Navigation_base {
|
|
|
196
88
|
auth: Auth;
|
|
197
89
|
credentialManager: CredentialManager;
|
|
198
90
|
i18next: I18next;
|
|
199
|
-
headerConfig: HeaderConfig;
|
|
200
91
|
ready: boolean;
|
|
201
92
|
/**
|
|
202
93
|
* Username of the logged in user
|
|
@@ -289,6 +180,16 @@ export declare class Navigation extends Navigation_base {
|
|
|
289
180
|
* If present the defined {@link @genesislcap/foundation-ui#FoundationRouteNavItem | FoundationRouteNavItems} will be rendered in the header 'routes' slot
|
|
290
181
|
*/
|
|
291
182
|
routeNavItems: FoundationRouteNavItem[];
|
|
183
|
+
/**
|
|
184
|
+
* Load remote components
|
|
185
|
+
*
|
|
186
|
+
* @remarks
|
|
187
|
+
*
|
|
188
|
+
* With regards to module federation
|
|
189
|
+
*
|
|
190
|
+
* @internal
|
|
191
|
+
*/
|
|
192
|
+
loadRemotes(): Promise<void>;
|
|
292
193
|
selectTemplate(): ViewTemplate<Navigation, any>;
|
|
293
194
|
/**
|
|
294
195
|
* Logs the user out of their session
|
|
@@ -409,7 +310,9 @@ declare const Navigation_base: abstract new (...args: any[]) => {
|
|
|
409
310
|
readonly classList: DOMTokenList;
|
|
410
311
|
className: string;
|
|
411
312
|
readonly clientHeight: number;
|
|
412
|
-
readonly clientLeft: number;
|
|
313
|
+
readonly clientLeft: number; /**
|
|
314
|
+
* Username of the logged in user
|
|
315
|
+
*/
|
|
413
316
|
readonly clientTop: number;
|
|
414
317
|
readonly clientWidth: number;
|
|
415
318
|
id: string;
|
|
@@ -467,11 +370,6 @@ declare const Navigation_base: abstract new (...args: any[]) => {
|
|
|
467
370
|
scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void;
|
|
468
371
|
scrollTo(options?: ScrollToOptions): void;
|
|
469
372
|
scrollTo(x: number, y: number): void;
|
|
470
|
-
/**
|
|
471
|
-
* If present the defined route buttons will be rendered in the header 'routes' slot
|
|
472
|
-
*
|
|
473
|
-
* @deprecated - Use `routeNavItems` instead.
|
|
474
|
-
*/
|
|
475
373
|
setAttribute(qualifiedName: string, value: string): void;
|
|
476
374
|
setAttributeNS(namespace: string, qualifiedName: string, value: string): void;
|
|
477
375
|
setAttributeNode(attr: Attr): Attr;
|
|
@@ -532,16 +430,7 @@ declare const Navigation_base: abstract new (...args: any[]) => {
|
|
|
532
430
|
ariaChecked: string;
|
|
533
431
|
ariaColCount: string;
|
|
534
432
|
ariaColIndex: string;
|
|
535
|
-
ariaColIndexText: string;
|
|
536
|
-
* Emits the event corresponding to the luminance icon being clicked
|
|
537
|
-
*
|
|
538
|
-
* @remarks
|
|
539
|
-
*
|
|
540
|
-
* Activated when the user clicks on the moon icon on the navigation
|
|
541
|
-
* bar right hand side
|
|
542
|
-
*
|
|
543
|
-
* @internal
|
|
544
|
-
*/
|
|
433
|
+
ariaColIndexText: string;
|
|
545
434
|
ariaColSpan: string;
|
|
546
435
|
ariaCurrent: string;
|
|
547
436
|
ariaDisabled: string;
|
|
@@ -574,7 +463,16 @@ declare const Navigation_base: abstract new (...args: any[]) => {
|
|
|
574
463
|
ariaValueMin: string;
|
|
575
464
|
ariaValueNow: string;
|
|
576
465
|
ariaValueText: string;
|
|
577
|
-
role: 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
|
+
*/
|
|
578
476
|
animate(keyframes: PropertyIndexedKeyframes | Keyframe[], options?: number | KeyframeAnimationOptions): Animation;
|
|
579
477
|
getAnimations(options?: GetAnimationsOptions): Animation[];
|
|
580
478
|
after(...nodes: (string | Node)[]): void;
|
|
@@ -745,65 +643,4 @@ export declare type SideNavTargetId = 'side-nav-start' | 'side-nav' | 'side-nav-
|
|
|
745
643
|
*/
|
|
746
644
|
export declare type StyleTargetId = 'header';
|
|
747
645
|
|
|
748
|
-
/**
|
|
749
|
-
* TemplateComponents.
|
|
750
|
-
* @public
|
|
751
|
-
*/
|
|
752
|
-
declare type TemplateComponents = {
|
|
753
|
-
icon: TemplateElementDependency;
|
|
754
|
-
button: TemplateElementDependency;
|
|
755
|
-
connectionIndicator: TemplateElementDependency;
|
|
756
|
-
select: TemplateElementDependency;
|
|
757
|
-
option: TemplateElementDependency;
|
|
758
|
-
flyout: TemplateElementDependency;
|
|
759
|
-
};
|
|
760
|
-
|
|
761
|
-
/**
|
|
762
|
-
* TemplateOptions.
|
|
763
|
-
* @public
|
|
764
|
-
*/
|
|
765
|
-
declare type TemplateOptions = Partial<TemplateComponents> & {
|
|
766
|
-
/**
|
|
767
|
-
* @remarks
|
|
768
|
-
* Just for reference that template options may be more than tags.
|
|
769
|
-
* @internal
|
|
770
|
-
*/
|
|
771
|
-
somePartial?: string | SyntheticViewTemplate;
|
|
772
|
-
};
|
|
773
|
-
|
|
774
|
-
/**
|
|
775
|
-
* ZeroHeader is a zero version of the header micro-frontend.
|
|
776
|
-
*
|
|
777
|
-
* @remarks
|
|
778
|
-
* A zero version that pre-registers zero components and uses the zero design system. ZeroHeader and its components won't bloat the core bundle as
|
|
779
|
-
* these are only loaded on-demand when in use.
|
|
780
|
-
*
|
|
781
|
-
* @example
|
|
782
|
-
* ```ts
|
|
783
|
-
* import { ZeroHeader } from '@genesislcap/foundation-header';
|
|
784
|
-
* ...
|
|
785
|
-
* ZeroHeader
|
|
786
|
-
* ```
|
|
787
|
-
*
|
|
788
|
-
* @example Load the micro frontend on-demand
|
|
789
|
-
* ```ts
|
|
790
|
-
|
|
791
|
-
* const { ZeroHeader } = await import('@genesislcap/foundation-header');
|
|
792
|
-
* return ZeroHeader;
|
|
793
|
-
* },
|
|
794
|
-
* ```
|
|
795
|
-
*
|
|
796
|
-
* @public
|
|
797
|
-
*/
|
|
798
|
-
export declare class ZeroHeader extends Navigation {
|
|
799
|
-
/**
|
|
800
|
-
* @internal
|
|
801
|
-
*/
|
|
802
|
-
connectedCallback(): Promise<void>;
|
|
803
|
-
/**
|
|
804
|
-
* @internal
|
|
805
|
-
*/
|
|
806
|
-
loadRemotes(): Promise<void>;
|
|
807
|
-
}
|
|
808
|
-
|
|
809
646
|
export { }
|