@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
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const loadZeroDesignSystem: () => Promise<any>;
|
|
2
|
+
/**
|
|
3
|
+
* Load the wp5 module federation remote versions, or fallback to code split bundled versions.
|
|
4
|
+
* You would really be targeting the client's design system, components etc here. For now just targeting zero.
|
|
5
|
+
*/
|
|
6
|
+
export declare const loadRemotes: () => Promise<{
|
|
7
|
+
ZeroDesignSystem: any;
|
|
8
|
+
}>;
|
|
9
|
+
//# sourceMappingURL=components.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../src/components/components.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,oBAAoB,oBAWhC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW;;EAKvB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/config/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/config/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
|
package/dist/dts/main/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/main/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/main/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,cAAc,QAAQ,CAAC"}
|
package/dist/dts/main/main.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Auth, CredentialManager } from '@genesislcap/foundation-comms';
|
|
2
2
|
import { I18next } from '@genesislcap/foundation-i18n';
|
|
3
3
|
import type { FoundationRouteNavItem } from '@genesislcap/foundation-ui';
|
|
4
|
-
import { HeaderConfig } from '../config';
|
|
5
4
|
/**
|
|
6
5
|
* Events dispatched by the navigation control buttons
|
|
7
6
|
* @public
|
|
@@ -50,7 +49,9 @@ declare const Navigation_base: abstract new (...args: any[]) => {
|
|
|
50
49
|
readonly classList: DOMTokenList;
|
|
51
50
|
className: string;
|
|
52
51
|
readonly clientHeight: number;
|
|
53
|
-
readonly clientLeft: number;
|
|
52
|
+
readonly clientLeft: number; /**
|
|
53
|
+
* Username of the logged in user
|
|
54
|
+
*/
|
|
54
55
|
readonly clientTop: number;
|
|
55
56
|
readonly clientWidth: number;
|
|
56
57
|
id: string;
|
|
@@ -108,11 +109,6 @@ declare const Navigation_base: abstract new (...args: any[]) => {
|
|
|
108
109
|
scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void;
|
|
109
110
|
scrollTo(options?: ScrollToOptions): void;
|
|
110
111
|
scrollTo(x: number, y: number): void;
|
|
111
|
-
/**
|
|
112
|
-
* If present the defined route buttons will be rendered in the header 'routes' slot
|
|
113
|
-
*
|
|
114
|
-
* @deprecated - Use `routeNavItems` instead.
|
|
115
|
-
*/
|
|
116
112
|
setAttribute(qualifiedName: string, value: string): void;
|
|
117
113
|
setAttributeNS(namespace: string, qualifiedName: string, value: string): void;
|
|
118
114
|
setAttributeNode(attr: Attr): Attr;
|
|
@@ -173,16 +169,7 @@ declare const Navigation_base: abstract new (...args: any[]) => {
|
|
|
173
169
|
ariaChecked: string;
|
|
174
170
|
ariaColCount: string;
|
|
175
171
|
ariaColIndex: string;
|
|
176
|
-
ariaColIndexText: string;
|
|
177
|
-
* Emits the event corresponding to the luminance icon being clicked
|
|
178
|
-
*
|
|
179
|
-
* @remarks
|
|
180
|
-
*
|
|
181
|
-
* Activated when the user clicks on the moon icon on the navigation
|
|
182
|
-
* bar right hand side
|
|
183
|
-
*
|
|
184
|
-
* @internal
|
|
185
|
-
*/
|
|
172
|
+
ariaColIndexText: string;
|
|
186
173
|
ariaColSpan: string;
|
|
187
174
|
ariaCurrent: string;
|
|
188
175
|
ariaDisabled: string;
|
|
@@ -215,7 +202,16 @@ declare const Navigation_base: abstract new (...args: any[]) => {
|
|
|
215
202
|
ariaValueMin: string;
|
|
216
203
|
ariaValueNow: string;
|
|
217
204
|
ariaValueText: string;
|
|
218
|
-
role: string;
|
|
205
|
+
role: string; /**
|
|
206
|
+
* Emits the event corresponding to the notification icon being clicked
|
|
207
|
+
*
|
|
208
|
+
* @remarks
|
|
209
|
+
*
|
|
210
|
+
* Activated when the user clicks on the bell icon on the navigation
|
|
211
|
+
* bar right hand side
|
|
212
|
+
*
|
|
213
|
+
* @internal
|
|
214
|
+
*/
|
|
219
215
|
animate(keyframes: PropertyIndexedKeyframes | Keyframe[], options?: number | KeyframeAnimationOptions): Animation;
|
|
220
216
|
getAnimations(options?: GetAnimationsOptions): Animation[];
|
|
221
217
|
after(...nodes: (string | Node)[]): void;
|
|
@@ -386,7 +382,6 @@ export declare class Navigation extends Navigation_base {
|
|
|
386
382
|
auth: Auth;
|
|
387
383
|
credentialManager: CredentialManager;
|
|
388
384
|
i18next: I18next;
|
|
389
|
-
headerConfig: HeaderConfig;
|
|
390
385
|
ready: boolean;
|
|
391
386
|
/**
|
|
392
387
|
* Username of the logged in user
|
|
@@ -479,6 +474,16 @@ export declare class Navigation extends Navigation_base {
|
|
|
479
474
|
* If present the defined {@link @genesislcap/foundation-ui#FoundationRouteNavItem | FoundationRouteNavItems} will be rendered in the header 'routes' slot
|
|
480
475
|
*/
|
|
481
476
|
routeNavItems: FoundationRouteNavItem[];
|
|
477
|
+
/**
|
|
478
|
+
* Load remote components
|
|
479
|
+
*
|
|
480
|
+
* @remarks
|
|
481
|
+
*
|
|
482
|
+
* With regards to module federation
|
|
483
|
+
*
|
|
484
|
+
* @internal
|
|
485
|
+
*/
|
|
486
|
+
loadRemotes(): Promise<void>;
|
|
482
487
|
selectTemplate(): import("@microsoft/fast-element").ViewTemplate<Navigation, any>;
|
|
483
488
|
/**
|
|
484
489
|
* Logs the user out of their session
|
|
@@ -568,39 +573,5 @@ export declare class Navigation extends Navigation_base {
|
|
|
568
573
|
*/
|
|
569
574
|
toLocalisedText(text: string): string;
|
|
570
575
|
}
|
|
571
|
-
/**
|
|
572
|
-
* ZeroHeader is a zero version of the header micro-frontend.
|
|
573
|
-
*
|
|
574
|
-
* @remarks
|
|
575
|
-
* 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
|
|
576
|
-
* these are only loaded on-demand when in use.
|
|
577
|
-
*
|
|
578
|
-
* @example
|
|
579
|
-
* ```ts
|
|
580
|
-
* import { ZeroHeader } from '@genesislcap/foundation-header';
|
|
581
|
-
* ...
|
|
582
|
-
* ZeroHeader
|
|
583
|
-
* ```
|
|
584
|
-
*
|
|
585
|
-
* @example Load the micro frontend on-demand
|
|
586
|
-
* ```ts
|
|
587
|
-
|
|
588
|
-
* const { ZeroHeader } = await import('@genesislcap/foundation-header');
|
|
589
|
-
* return ZeroHeader;
|
|
590
|
-
* },
|
|
591
|
-
* ```
|
|
592
|
-
*
|
|
593
|
-
* @public
|
|
594
|
-
*/
|
|
595
|
-
export declare class ZeroHeader extends Navigation {
|
|
596
|
-
/**
|
|
597
|
-
* @internal
|
|
598
|
-
*/
|
|
599
|
-
connectedCallback(): Promise<void>;
|
|
600
|
-
/**
|
|
601
|
-
* @internal
|
|
602
|
-
*/
|
|
603
|
-
loadRemotes(): Promise<void>;
|
|
604
|
-
}
|
|
605
576
|
export {};
|
|
606
577
|
//# sourceMappingURL=main.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/main/main.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAgB,MAAM,+BAA+B,CAAC;AAEtF,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,KAAK,EAAE,sBAAsB,EAAuB,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/main/main.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAgB,MAAM,+BAA+B,CAAC;AAEtF,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,KAAK,EAAE,sBAAsB,EAAuB,MAAM,4BAA4B,CAAC;AAS9F;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,wBAAwB,EAAE,IAAI,CAAC;IAC/B,mBAAmB,EAAE,IAAI,CAAC;IAC1B,2BAA2B,EAAE,IAAI,CAAC;IAClC,kBAAkB,EAAE,IAAI,CAAC;CAC1B,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,gBAAgB,EAAE,MAAM,CAAC;CAC1B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAkDA;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAmPH;;;;;;;;;OASG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3SL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,qBAKa,UAAW,SAAQ,eAAmC;IAC3D,IAAI,EAAG,IAAI,CAAC;IACC,iBAAiB,EAAG,iBAAiB,CAAC;IAChD,OAAO,EAAG,OAAO,CAAC;IAEf,KAAK,EAAE,OAAO,CAAS;IAEnC;;OAEG;IACgB,QAAQ,EAAE,MAAM,CAAC;IAExB,WAAW,UAAS;IAEnB,iBAAiB;IAU9B;;;;;;;OAOG;IAC8B,OAAO,EAAE,GAAG,CAAQ;IAErD;;;;;;;OAOG;IAEH,yBAAyB,EAAE,OAAO,CAAC;IAEnC;;;;;;;OAOG;IAC8D,oBAAoB,EAAE,OAAO,CAAC;IAE/F;;;;;;;;;OASG;IAEH,uBAAuB,EAAE,OAAO,CAAC;IAEjC;;OAEG;IACH,8BAA8B;IAI9B;;;;OAIG;IAEH,uBAAuB,EAAE,OAAO,CAAQ;IAExC;;;;;;;;OAQG;IAEH,oBAAoB,EAAE,OAAO,CAAS;IAE1B,eAAe,EAAE,eAAe,CAG1C;IAEF;;;;OAIG;IAEH,WAAW,EAAE,OAAO,CAAC;IAErB;;;;OAIG;IACS,YAAY,EAAE,KAAK,CAAC;QAC9B,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC,CAAC;IAEH;;OAEG;IACH,mBAAmB;IAiBnB;;OAEG;IACS,aAAa,EAAE,sBAAsB,EAAE,CAAC;IAEpD;;;;;;;;OAQG;IACG,WAAW;IAKjB,cAAc;IAId;;;;;;;;;OASG;IACU,MAAM;IAgBnB;;;;;;;;;;OAUG;IACI,UAAU,CAAC,IAAI,EAAE,MAAM;IAS9B;;;;;;;;;OASG;IACH,mBAAmB;IAInB;;;;;;;;;OASG;IACH,kBAAkB;IAIlB;;;;;;;;;OASG;IACH,aAAa;IAIb;;;;;;;;;OASG;IACH,qBAAqB;IAIrB;;;;;;;;OAQG;IACH,cAAc,CAAC,CAAC,EAAE,WAAW;IAK7B;;;;;;;;OAQG;IACH,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;CAKtC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.styles.d.ts","sourceRoot":"","sources":["../../../src/main/main.styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"main.styles.d.ts","sourceRoot":"","sources":["../../../src/main/main.styles.ts"],"names":[],"mappings":"AAYA;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,iDA6PgD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.template.d.ts","sourceRoot":"","sources":["../../../src/main/main.template.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"main.template.d.ts","sourceRoot":"","sources":["../../../src/main/main.template.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAE5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AA0EzC;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,WAAW,+BA+GvB,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,eAAe,EAAE,YAAY,CAAC,UAAU,CAEpD,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,eAAe,EAAE,YAAY,CAAC,UAAU,CAEpD,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,YAAY,EAAE,YAAY,CAAC,UAAU,CAEjD,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { __awaiter } from "tslib";
|
|
2
|
+
/**
|
|
3
|
+
* These DS / Component imports will be replaced with an import from the local alpha design system.
|
|
4
|
+
* We're just fixing something on our side to allow you to extend zero.
|
|
5
|
+
*/
|
|
6
|
+
import { allComponents, provideFASTDesignSystem } from '@microsoft/fast-components';
|
|
7
|
+
import { logger } from '../utils';
|
|
8
|
+
provideFASTDesignSystem().register(allComponents);
|
|
9
|
+
var ResourceType;
|
|
10
|
+
(function (ResourceType) {
|
|
11
|
+
ResourceType["local"] = "local";
|
|
12
|
+
ResourceType["remote"] = "remote";
|
|
13
|
+
})(ResourceType || (ResourceType = {}));
|
|
14
|
+
function loadZeroFallback() {
|
|
15
|
+
return import(
|
|
16
|
+
/* webpackMode: "lazy" */
|
|
17
|
+
'@genesislcap/foundation-zero');
|
|
18
|
+
}
|
|
19
|
+
export const loadZeroDesignSystem = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
20
|
+
let type = ResourceType.remote;
|
|
21
|
+
try {
|
|
22
|
+
// @ts-ignore
|
|
23
|
+
return yield import('foundationZero/ZeroDesignSystem');
|
|
24
|
+
}
|
|
25
|
+
catch (e) {
|
|
26
|
+
type = ResourceType.local;
|
|
27
|
+
return yield loadZeroFallback();
|
|
28
|
+
}
|
|
29
|
+
finally {
|
|
30
|
+
logger.debug(`Using '${type}' version of foundationZero/DesignSystem`);
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
/**
|
|
34
|
+
* Load the wp5 module federation remote versions, or fallback to code split bundled versions.
|
|
35
|
+
* You would really be targeting the client's design system, components etc here. For now just targeting zero.
|
|
36
|
+
*/
|
|
37
|
+
export const loadRemotes = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
38
|
+
const { registerZeroDesignSystem } = yield loadZeroDesignSystem();
|
|
39
|
+
return {
|
|
40
|
+
ZeroDesignSystem: registerZeroDesignSystem(),
|
|
41
|
+
};
|
|
42
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components';
|
package/dist/esm/config/index.js
CHANGED
package/dist/esm/main/index.js
CHANGED
package/dist/esm/main/main.js
CHANGED
|
@@ -5,7 +5,7 @@ import { I18next } from '@genesislcap/foundation-i18n';
|
|
|
5
5
|
import { FASTElement, customElement, observable, attr } from '@microsoft/fast-element';
|
|
6
6
|
import { Route } from '@microsoft/fast-router';
|
|
7
7
|
import logo from '../assets/logo.svg';
|
|
8
|
-
import
|
|
8
|
+
import * as Components from '../components';
|
|
9
9
|
import { logger } from '../utils';
|
|
10
10
|
import { MainStyles as styles } from './main.styles';
|
|
11
11
|
import { DynamicTemplate as template, LoadingTemplate, MainTemplate } from './main.template';
|
|
@@ -42,7 +42,7 @@ import { DynamicTemplate as template, LoadingTemplate, MainTemplate } from './ma
|
|
|
42
42
|
* @fires language-changed - Dispatched when the user changes the language in the language selector.
|
|
43
43
|
*
|
|
44
44
|
*/
|
|
45
|
-
|
|
45
|
+
let Navigation = class Navigation extends EventEmitter(FASTElement) {
|
|
46
46
|
constructor() {
|
|
47
47
|
var _a;
|
|
48
48
|
super(...arguments);
|
|
@@ -85,10 +85,10 @@ export class Navigation extends EventEmitter(FASTElement) {
|
|
|
85
85
|
return __awaiter(this, void 0, void 0, function* () {
|
|
86
86
|
_super.connectedCallback.call(this);
|
|
87
87
|
logger.debug(`foundation-header is now connected to the DOM`);
|
|
88
|
+
yield this.loadRemotes();
|
|
88
89
|
this.userName = this.auth.loggedUserResult
|
|
89
90
|
? this.auth.loggedUserResult.username
|
|
90
91
|
: 'Genesis User';
|
|
91
|
-
this.ready = true;
|
|
92
92
|
});
|
|
93
93
|
}
|
|
94
94
|
/**
|
|
@@ -116,6 +116,21 @@ export class Navigation extends EventEmitter(FASTElement) {
|
|
|
116
116
|
}));
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
|
+
/**
|
|
120
|
+
* Load remote components
|
|
121
|
+
*
|
|
122
|
+
* @remarks
|
|
123
|
+
*
|
|
124
|
+
* With regards to module federation
|
|
125
|
+
*
|
|
126
|
+
* @internal
|
|
127
|
+
*/
|
|
128
|
+
loadRemotes() {
|
|
129
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
130
|
+
const remoteComponents = yield Components.loadRemotes();
|
|
131
|
+
this.ready = true;
|
|
132
|
+
});
|
|
133
|
+
}
|
|
119
134
|
selectTemplate() {
|
|
120
135
|
return this.ready ? MainTemplate : LoadingTemplate;
|
|
121
136
|
}
|
|
@@ -246,7 +261,7 @@ export class Navigation extends EventEmitter(FASTElement) {
|
|
|
246
261
|
? this.i18next.t(text, { lng: this.i18next.language })
|
|
247
262
|
: text;
|
|
248
263
|
}
|
|
249
|
-
}
|
|
264
|
+
};
|
|
250
265
|
__decorate([
|
|
251
266
|
Auth
|
|
252
267
|
], Navigation.prototype, "auth", void 0);
|
|
@@ -256,9 +271,6 @@ __decorate([
|
|
|
256
271
|
__decorate([
|
|
257
272
|
I18next
|
|
258
273
|
], Navigation.prototype, "i18next", void 0);
|
|
259
|
-
__decorate([
|
|
260
|
-
HeaderConfig
|
|
261
|
-
], Navigation.prototype, "headerConfig", void 0);
|
|
262
274
|
__decorate([
|
|
263
275
|
observable
|
|
264
276
|
], Navigation.prototype, "ready", void 0);
|
|
@@ -298,58 +310,11 @@ __decorate([
|
|
|
298
310
|
__decorate([
|
|
299
311
|
observable
|
|
300
312
|
], Navigation.prototype, "routeNavItems", void 0);
|
|
301
|
-
|
|
302
|
-
* ZeroHeader is a zero version of the header micro-frontend.
|
|
303
|
-
*
|
|
304
|
-
* @remarks
|
|
305
|
-
* 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
|
|
306
|
-
* these are only loaded on-demand when in use.
|
|
307
|
-
*
|
|
308
|
-
* @example
|
|
309
|
-
* ```ts
|
|
310
|
-
* import { ZeroHeader } from '@genesislcap/foundation-header';
|
|
311
|
-
* ...
|
|
312
|
-
* ZeroHeader
|
|
313
|
-
* ```
|
|
314
|
-
*
|
|
315
|
-
* @example Load the micro frontend on-demand
|
|
316
|
-
* ```ts
|
|
317
|
-
|
|
318
|
-
* const { ZeroHeader } = await import('@genesislcap/foundation-header');
|
|
319
|
-
* return ZeroHeader;
|
|
320
|
-
* },
|
|
321
|
-
* ```
|
|
322
|
-
*
|
|
323
|
-
* @public
|
|
324
|
-
*/
|
|
325
|
-
let ZeroHeader = class ZeroHeader extends Navigation {
|
|
326
|
-
/**
|
|
327
|
-
* @internal
|
|
328
|
-
*/
|
|
329
|
-
connectedCallback() {
|
|
330
|
-
const _super = Object.create(null, {
|
|
331
|
-
connectedCallback: { get: () => super.connectedCallback }
|
|
332
|
-
});
|
|
333
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
334
|
-
_super.connectedCallback.call(this);
|
|
335
|
-
yield this.loadRemotes();
|
|
336
|
-
});
|
|
337
|
-
}
|
|
338
|
-
/**
|
|
339
|
-
* @internal
|
|
340
|
-
*/
|
|
341
|
-
loadRemotes() {
|
|
342
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
343
|
-
const { registerCommonZeroComponents } = yield import('../components/zero-components');
|
|
344
|
-
yield registerCommonZeroComponents();
|
|
345
|
-
});
|
|
346
|
-
}
|
|
347
|
-
};
|
|
348
|
-
ZeroHeader = __decorate([
|
|
313
|
+
Navigation = __decorate([
|
|
349
314
|
customElement({
|
|
350
|
-
name: '
|
|
315
|
+
name: 'foundation-header',
|
|
351
316
|
template,
|
|
352
317
|
styles,
|
|
353
318
|
})
|
|
354
|
-
],
|
|
355
|
-
export {
|
|
319
|
+
], Navigation);
|
|
320
|
+
export { Navigation };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { getApp } from '@genesislcap/foundation-shell/app';
|
|
2
|
+
import { neutralLayer2 } from '@microsoft/fast-components';
|
|
2
3
|
import { css } from '@microsoft/fast-element';
|
|
3
|
-
import {
|
|
4
|
+
import { backgroundNavOption, ColorHEX, defaultBackgroundHover, defaultBackgroundItem, PrimaryRapidColorHEX, } from '../styles/colors';
|
|
4
5
|
/**
|
|
5
6
|
* Base styles for the foundation-header
|
|
6
7
|
*
|
|
@@ -14,14 +15,16 @@ export const MainStyles = css `
|
|
|
14
15
|
flex-direction: row;
|
|
15
16
|
|
|
16
17
|
--primary-gradient-angle: -113.5deg;
|
|
18
|
+
--design-unit: 2.5;
|
|
17
19
|
}
|
|
18
20
|
|
|
21
|
+
zero-design-system-provider,
|
|
19
22
|
.dynamic-template {
|
|
20
23
|
width: 100%;
|
|
21
24
|
}
|
|
22
25
|
|
|
23
26
|
.nav-listbox {
|
|
24
|
-
background:
|
|
27
|
+
background: ${neutralLayer2};
|
|
25
28
|
display: flex;
|
|
26
29
|
flex: 1;
|
|
27
30
|
flex-direction: row;
|
|
@@ -30,61 +33,94 @@ export const MainStyles = css `
|
|
|
30
33
|
box-shadow: 0 0 15px 0 rgb(0 0 0 / 30%);
|
|
31
34
|
}
|
|
32
35
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
margin: 0;
|
|
36
|
+
fast-listbox {
|
|
37
|
+
border-color: var(--rapid-ag-background-color);
|
|
36
38
|
}
|
|
37
39
|
|
|
38
40
|
.nav-leftside {
|
|
39
|
-
background:
|
|
41
|
+
background: ${neutralLayer2};
|
|
40
42
|
flex: 1;
|
|
41
|
-
display: flex;
|
|
42
43
|
flex-direction: row;
|
|
43
44
|
align-items: center;
|
|
44
|
-
margin-left: calc(var(--design-unit) *
|
|
45
|
-
|
|
45
|
+
margin-left: calc(var(--design-unit) * 6px);
|
|
46
|
+
display: flex;
|
|
46
47
|
}
|
|
47
48
|
|
|
48
49
|
.nav-leftside:focus-within {
|
|
49
50
|
box-shadow: none;
|
|
50
51
|
}
|
|
51
52
|
|
|
52
|
-
::slotted(
|
|
53
|
-
.nav-listbox
|
|
53
|
+
::slotted(fast-option),
|
|
54
|
+
.nav-listbox fast-option {
|
|
54
55
|
margin: 0 calc(var(--design-unit) * 2px);
|
|
55
|
-
padding: 0 calc(var(--design-unit) *
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
padding: 0 calc(var(--design-unit) * 6px);
|
|
57
|
+
|
|
58
|
+
--focus-stroke-width: 0;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
::slotted(fast-option.selected),
|
|
62
|
+
.nav-listbox fast-option.selected {
|
|
63
|
+
background: ${backgroundNavOption};
|
|
64
|
+
color: ${ColorHEX.white};
|
|
60
65
|
}
|
|
61
66
|
|
|
62
|
-
::slotted(
|
|
63
|
-
.nav-
|
|
64
|
-
background:
|
|
65
|
-
color:
|
|
67
|
+
::slotted(fast-option:not(.selected)),
|
|
68
|
+
.nav-listbox fast-option:not(.selected) {
|
|
69
|
+
background-color: ${defaultBackgroundItem};
|
|
70
|
+
color: #c9c9c9;
|
|
66
71
|
}
|
|
67
72
|
|
|
68
|
-
::slotted(
|
|
69
|
-
.nav-
|
|
70
|
-
background-color:
|
|
71
|
-
color:
|
|
73
|
+
::slotted(fast-option:not(.selected):hover),
|
|
74
|
+
.nav-listbox fast-option:not(.selected):hover {
|
|
75
|
+
background-color: ${defaultBackgroundHover};
|
|
76
|
+
color: ${ColorHEX.white};
|
|
72
77
|
}
|
|
73
78
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
79
|
+
.top-layout zero-icon {
|
|
80
|
+
position: absolute;
|
|
81
|
+
right: calc(var(--design-unit) * 6px);
|
|
82
|
+
top: 50%;
|
|
83
|
+
transform: translateY(-50%);
|
|
84
|
+
font-size: 25px;
|
|
85
|
+
opacity: 80%;
|
|
86
|
+
cursor: pointer;
|
|
78
87
|
}
|
|
79
88
|
|
|
80
|
-
.logout-container
|
|
89
|
+
.logout-container zero-icon {
|
|
81
90
|
padding: 0 calc(var(--design-unit) * 3px);
|
|
82
91
|
}
|
|
83
92
|
|
|
84
|
-
.nav-
|
|
93
|
+
.nav-listbox .bars-container {
|
|
94
|
+
margin-right: calc(var(--design-unit) * 3px);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.user-container zero-icon {
|
|
98
|
+
font-size: 20px;
|
|
99
|
+
margin-right: calc(var(--design-unit) * 2px);
|
|
100
|
+
color: #879ba6;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.group-container zero-icon {
|
|
104
|
+
padding-right: 10px;
|
|
105
|
+
color: #879ba6;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.nav-listbox .bars-container zero-icon {
|
|
85
109
|
cursor: pointer;
|
|
86
|
-
font-size: var(--
|
|
87
|
-
|
|
110
|
+
font-size: calc(var(--design-unit) * 8px);
|
|
111
|
+
background:
|
|
112
|
+
linear-gradient(
|
|
113
|
+
var(--primary-gradient-angle),
|
|
114
|
+
${PrimaryRapidColorHEX.blue} 0%,
|
|
115
|
+
${PrimaryRapidColorHEX.purple} 100%
|
|
116
|
+
)
|
|
117
|
+
top/100% 1px,
|
|
118
|
+
linear-gradient(
|
|
119
|
+
var(--primary-gradient-angle),
|
|
120
|
+
${PrimaryRapidColorHEX.blue} 0%,
|
|
121
|
+
${PrimaryRapidColorHEX.purple} 100%
|
|
122
|
+
)
|
|
123
|
+
bottom/100% 1px;
|
|
88
124
|
/* stylelint-disable-next-line property-no-vendor-prefix */
|
|
89
125
|
-webkit-background-clip: text;
|
|
90
126
|
-webkit-text-fill-color: transparent;
|
|
@@ -93,11 +129,12 @@ export const MainStyles = css `
|
|
|
93
129
|
.logo-container {
|
|
94
130
|
display: flex;
|
|
95
131
|
align-items: center;
|
|
132
|
+
margin-right: calc(var(--design-unit) * 3px);
|
|
96
133
|
}
|
|
97
134
|
|
|
98
135
|
.logo {
|
|
99
|
-
height: calc(var(--design-unit) *
|
|
100
|
-
width: calc(var(--design-unit) *
|
|
136
|
+
height: calc(var(--design-unit) * 8px);
|
|
137
|
+
width: calc(var(--design-unit) * 10px);
|
|
101
138
|
}
|
|
102
139
|
|
|
103
140
|
.nav-rightside {
|
|
@@ -106,28 +143,83 @@ export const MainStyles = css `
|
|
|
106
143
|
flex-direction: row;
|
|
107
144
|
align-items: center;
|
|
108
145
|
justify-content: flex-end;
|
|
109
|
-
margin-right: calc(var(--design-unit) *
|
|
110
|
-
|
|
146
|
+
margin-right: calc(var(--design-unit) * 6px);
|
|
147
|
+
color: #c9c9c9;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.user-container {
|
|
151
|
+
background-color: ${defaultBackgroundItem};
|
|
152
|
+
padding: calc(var(--design-unit) * 1px);
|
|
153
|
+
font-size: 14px;
|
|
154
|
+
display: flex;
|
|
155
|
+
align-items: center;
|
|
156
|
+
border-radius: calc(var(--control-corner-radius) * 1px);
|
|
157
|
+
cursor: pointer;
|
|
111
158
|
}
|
|
112
159
|
|
|
113
160
|
.icon-container {
|
|
114
|
-
font-size:
|
|
161
|
+
font-size: 20px;
|
|
115
162
|
padding: calc(var(--design-unit) * 3px);
|
|
116
|
-
|
|
163
|
+
margin-right: calc(var(--design-unit) * 4px);
|
|
164
|
+
color: #879ba6;
|
|
117
165
|
cursor: pointer;
|
|
118
|
-
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.connection-indicator-container {
|
|
169
|
+
margin-right: calc(var(--design-unit) * 4px);
|
|
119
170
|
}
|
|
120
171
|
|
|
121
172
|
.open-nav {
|
|
122
173
|
width: 300px;
|
|
123
174
|
}
|
|
124
175
|
|
|
176
|
+
.top-layout {
|
|
177
|
+
background:
|
|
178
|
+
linear-gradient(
|
|
179
|
+
var(--primary-gradient-angle),
|
|
180
|
+
${PrimaryRapidColorHEX.blue} 0%,
|
|
181
|
+
${PrimaryRapidColorHEX.purple} 100%
|
|
182
|
+
)
|
|
183
|
+
top/100% 1px,
|
|
184
|
+
linear-gradient(
|
|
185
|
+
var(--primary-gradient-angle),
|
|
186
|
+
${PrimaryRapidColorHEX.blue} 0%,
|
|
187
|
+
${PrimaryRapidColorHEX.purple} 100%
|
|
188
|
+
)
|
|
189
|
+
bottom/100% 1px;
|
|
190
|
+
background-origin: border-box;
|
|
191
|
+
background-size: cover;
|
|
192
|
+
background-repeat: no-repeat;
|
|
193
|
+
width: 100%;
|
|
194
|
+
height: 15%;
|
|
195
|
+
max-height: 120px;
|
|
196
|
+
display: flex;
|
|
197
|
+
flex-direction: row;
|
|
198
|
+
align-items: center;
|
|
199
|
+
position: relative;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.top-layout img {
|
|
203
|
+
width: 50px;
|
|
204
|
+
margin-left: calc(var(--design-unit) * 6px);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.top-layout zero-icon:hover {
|
|
208
|
+
opacity: 100%;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.group-container {
|
|
212
|
+
height: 100%;
|
|
213
|
+
display: flex;
|
|
214
|
+
flex-direction: column;
|
|
215
|
+
}
|
|
216
|
+
|
|
125
217
|
::slotted(zero-tree-view) {
|
|
126
218
|
--type-ramp-base-font-size: 12px;
|
|
127
219
|
}
|
|
128
220
|
|
|
129
221
|
::slotted(div) {
|
|
130
|
-
color:
|
|
222
|
+
color: ${PrimaryRapidColorHEX.blue};
|
|
131
223
|
font-size: var(--type-ramp-minus-1-font-size);
|
|
132
224
|
margin-bottom: calc(var(--design-unit) * 4px);
|
|
133
225
|
padding-left: calc(var(--design-unit) * 4px);
|
|
@@ -146,8 +238,7 @@ export const MainStyles = css `
|
|
|
146
238
|
.logout-container {
|
|
147
239
|
align-items: center;
|
|
148
240
|
background-color: var(--neutral-fill-rest);
|
|
149
|
-
border: calc(var(--stroke-width) * 1px) solid
|
|
150
|
-
color-mix(in srgb, var(--neutral-foreground-rest), transparent 90%);
|
|
241
|
+
border: calc(var(--stroke-width) * 1px) solid ${defaultBackgroundItem};
|
|
151
242
|
cursor: pointer;
|
|
152
243
|
display: flex;
|
|
153
244
|
flex-direction: row;
|
|
@@ -171,18 +262,4 @@ export const MainStyles = css `
|
|
|
171
262
|
.language-selector:focus-within {
|
|
172
263
|
border-color: #333;
|
|
173
264
|
}
|
|
174
|
-
|
|
175
|
-
${flyoutTag}::part(flyout),
|
|
176
|
-
${flyoutTag}::part(footer) {
|
|
177
|
-
padding: 0;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
${flyoutTag}::part(header),
|
|
181
|
-
${flyoutTag}::part(content) {
|
|
182
|
-
padding: calc(var(--design-unit) * 2px);
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
.notifications-button {
|
|
186
|
-
padding-right: calc((var(--design-unit) - 1) * 2px);
|
|
187
|
-
}
|
|
188
265
|
`.withBehaviors(getApp().registerStylesTarget('header'));
|