@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.
Files changed (50) hide show
  1. package/dist/custom-elements.json +32 -562
  2. package/dist/dts/components/components.d.ts +9 -0
  3. package/dist/dts/components/components.d.ts.map +1 -0
  4. package/dist/dts/components/index.d.ts +2 -0
  5. package/dist/dts/components/index.d.ts.map +1 -0
  6. package/dist/dts/config/index.d.ts +0 -2
  7. package/dist/dts/config/index.d.ts.map +1 -1
  8. package/dist/dts/main/index.d.ts +1 -1
  9. package/dist/dts/main/index.d.ts.map +1 -1
  10. package/dist/dts/main/main.d.ts +24 -53
  11. package/dist/dts/main/main.d.ts.map +1 -1
  12. package/dist/dts/main/main.styles.d.ts.map +1 -1
  13. package/dist/dts/main/main.template.d.ts.map +1 -1
  14. package/dist/esm/components/components.js +42 -0
  15. package/dist/esm/components/index.js +1 -0
  16. package/dist/esm/config/index.js +0 -2
  17. package/dist/esm/main/index.js +1 -1
  18. package/dist/esm/main/main.js +23 -58
  19. package/dist/esm/main/main.styles.js +133 -56
  20. package/dist/esm/main/main.template.js +28 -32
  21. package/dist/foundation-header.api.json +0 -219
  22. package/dist/foundation-header.d.ts +24 -187
  23. package/docs/api/foundation-header.md +0 -14
  24. package/docs/api/foundation-header.navigation.md +0 -1
  25. package/docs/api-report.md +2 -46
  26. package/package.json +13 -14
  27. package/dist/dts/components/zero-components.d.ts +0 -6
  28. package/dist/dts/components/zero-components.d.ts.map +0 -1
  29. package/dist/dts/config/config.d.ts +0 -33
  30. package/dist/dts/config/config.d.ts.map +0 -1
  31. package/dist/dts/config/configure.d.ts +0 -27
  32. package/dist/dts/config/configure.d.ts.map +0 -1
  33. package/dist/dts/config/templates.d.ts +0 -34
  34. package/dist/dts/config/templates.d.ts.map +0 -1
  35. package/dist/dts/tags/index.d.ts +0 -2
  36. package/dist/dts/tags/index.d.ts.map +0 -1
  37. package/dist/dts/tags/tags.d.ts +0 -36
  38. package/dist/dts/tags/tags.d.ts.map +0 -1
  39. package/dist/esm/components/zero-components.js +0 -48
  40. package/dist/esm/config/config.js +0 -18
  41. package/dist/esm/config/configure.js +0 -56
  42. package/dist/esm/config/templates.js +0 -14
  43. package/dist/esm/tags/index.js +0 -1
  44. package/dist/esm/tags/tags.js +0 -39
  45. package/docs/api/foundation-header.configure.md +0 -46
  46. package/docs/api/foundation-header.defaultheaderconfig.md +0 -13
  47. package/docs/api/foundation-header.headerconfig.md +0 -21
  48. package/docs/api/foundation-header.headerconfig.templateoptions.md +0 -18
  49. package/docs/api/foundation-header.navigation.headerconfig.md +0 -11
  50. package/docs/api/foundation-header.zeroheader.md +0 -39
@@ -9,25 +9,11 @@
9
9
  | Class | Description |
10
10
  | --- | --- |
11
11
  | [Navigation](./foundation-header.navigation.md) | Navigation micro-frontend includes navigation bar and flyout menu |
12
- | [ZeroHeader](./foundation-header.zeroheader.md) | ZeroHeader is a zero version of the header micro-frontend. |
13
-
14
- ## Functions
15
-
16
- | Function | Description |
17
- | --- | --- |
18
- | [configure(config)](./foundation-header.configure.md) | A function that allows configuring the header micro-frontend with name and templateOptions. |
19
-
20
- ## Interfaces
21
-
22
- | Interface | Description |
23
- | --- | --- |
24
- | [HeaderConfig](./foundation-header.headerconfig.md) | HeaderConfig DI interface. |
25
12
 
26
13
  ## Variables
27
14
 
28
15
  | Variable | Description |
29
16
  | --- | --- |
30
- | [defaultHeaderConfig](./foundation-header.defaultheaderconfig.md) | Default HeaderConfig DI implementation. |
31
17
  | [MainStyles](./foundation-header.mainstyles.md) | Base styles for the foundation-header |
32
18
  | [NavTemplate](./foundation-header.navtemplate.md) | Template for Navigation class |
33
19
 
@@ -23,7 +23,6 @@ export declare class Navigation extends Navigation_base
23
23
  | --- | --- | --- | --- |
24
24
  | [auth](./foundation-header.navigation.auth.md) | | Auth | |
25
25
  | [credentialManager](./foundation-header.navigation.credentialmanager.md) | | CredentialManager | |
26
- | [headerConfig](./foundation-header.navigation.headerconfig.md) | | [HeaderConfig](./foundation-header.headerconfig.md) | |
27
26
  | [hideSideBar](./foundation-header.navigation.hidesidebar.md) | | boolean | Boolean attribute which controls whether to include the sideNav component Control via<code>hide-side-bar</code> |
28
27
  | [i18next](./foundation-header.navigation.i18next.md) | | I18next | |
29
28
  | [languageOptions](./foundation-header.navigation.languageoptions.md) | | [LanguageOptions](./foundation-header.languageoptions.md) | |
@@ -12,37 +12,11 @@ import { EmitOptions } from '@genesislcap/foundation-events';
12
12
  import { EmitReturn } from '@genesislcap/foundation-events';
13
13
  import type { FoundationRouteNavItem } from '@genesislcap/foundation-ui';
14
14
  import { I18next } from '@genesislcap/foundation-i18n';
15
- import { InterfaceSymbol } from '@microsoft/fast-foundation';
16
- import { PartialFASTElementDefinition } from '@microsoft/fast-element';
17
- import { SyntheticViewTemplate } from '@microsoft/fast-element';
18
- import { TemplateElementDependency } from '@genesislcap/foundation-ui';
19
15
  import { ViewTemplate } from '@microsoft/fast-element';
20
16
 
21
- // @public
22
- export function configure(config: Partial<HeaderConfig>): Promise<Navigation>;
23
-
24
- // @public
25
- export const defaultHeaderConfig: HeaderConfig;
26
-
27
- // Warning: (ae-internal-missing-underscore) The name "DynamicTemplate" should be prefixed with an underscore because the declaration is marked as @internal
28
- //
29
- // @internal
30
- export const DynamicTemplate: ViewTemplate<Navigation>;
31
-
32
17
  // @public
33
18
  export type ElementTargetId = HeaderTargetId | NavTargetId | SideNavTargetId;
34
19
 
35
- // Warning: (ae-internal-mixed-release-tag) Mixed release tags are not allowed for "HeaderConfig" because one of its declarations is marked as @internal
36
- //
37
- // @public
38
- export interface HeaderConfig extends PartialFASTElementDefinition {
39
- // Warning: (ae-forgotten-export) The symbol "TemplateOptions" needs to be exported by the entry point index.d.ts
40
- templateOptions: TemplateOptions;
41
- }
42
-
43
- // @internal
44
- export const HeaderConfig: InterfaceSymbol<HeaderConfig>;
45
-
46
20
  // @public
47
21
  export type HeaderTargetId = 'header-start' | 'header' | 'header-end';
48
22
 
@@ -52,19 +26,9 @@ export type LanguageOptions = {
52
26
  selectedLanguage: string;
53
27
  };
54
28
 
55
- // Warning: (ae-internal-missing-underscore) The name "LoadingTemplate" should be prefixed with an underscore because the declaration is marked as @internal
56
- //
57
- // @internal
58
- export const LoadingTemplate: ViewTemplate<Navigation>;
59
-
60
29
  // @public
61
30
  export const MainStyles: ElementStyles;
62
31
 
63
- // Warning: (ae-internal-missing-underscore) The name "MainTemplate" should be prefixed with an underscore because the declaration is marked as @internal
64
- //
65
- // @internal
66
- export const MainTemplate: ViewTemplate<Navigation>;
67
-
68
32
  // @public
69
33
  export type NavEventDetailMap = {
70
34
  'luminance-icon-clicked': void;
@@ -84,13 +48,13 @@ export class Navigation extends Navigation_base {
84
48
  connectedCallback(): Promise<void>;
85
49
  // (undocumented)
86
50
  credentialManager: CredentialManager;
87
- // (undocumented)
88
- headerConfig: HeaderConfig;
89
51
  hideSideBar: boolean;
90
52
  // (undocumented)
91
53
  i18next: I18next;
92
54
  // (undocumented)
93
55
  languageOptions: LanguageOptions;
56
+ // @internal
57
+ loadRemotes(): Promise<void>;
94
58
  logoSrc: any;
95
59
  logout(): Promise<void>;
96
60
  // @internal
@@ -143,14 +107,6 @@ export type SideNavTargetId = 'side-nav-start' | 'side-nav' | 'side-nav-end';
143
107
  // @public
144
108
  export type StyleTargetId = 'header';
145
109
 
146
- // @public
147
- export class ZeroHeader extends Navigation {
148
- // @internal (undocumented)
149
- connectedCallback(): Promise<void>;
150
- // @internal (undocumented)
151
- loadRemotes(): Promise<void>;
152
- }
153
-
154
110
  // (No @packageDocumentation comment for this package)
155
111
 
156
112
  ```
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/foundation-header",
3
3
  "description": "Genesis Foundation Header",
4
- "version": "14.143.1",
4
+ "version": "14.143.2",
5
5
  "license": "SEE LICENSE IN license.txt",
6
6
  "main": "dist/esm/index.js",
7
7
  "types": "dist/foundation-header.d.ts",
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "./config": {
30
30
  "types": "./dist/dts/config/index.d.ts",
31
- "default": "./dist/esm/config/index.js"
31
+ "default": "./dist/esm/esm/config/index.js"
32
32
  },
33
33
  "./e2e": {
34
34
  "default": "./test/e2e/index.ts"
@@ -68,23 +68,22 @@
68
68
  "test:debug": "genx test --debug"
69
69
  },
70
70
  "devDependencies": {
71
- "@genesislcap/foundation-testing": "14.143.1",
72
- "@genesislcap/genx": "14.143.1",
71
+ "@genesislcap/foundation-testing": "14.143.2",
72
+ "@genesislcap/genx": "14.143.2",
73
73
  "rimraf": "^3.0.2"
74
74
  },
75
75
  "dependencies": {
76
- "@genesislcap/foundation-comms": "14.143.1",
77
- "@genesislcap/foundation-events": "14.143.1",
78
- "@genesislcap/foundation-i18n": "14.143.1",
79
- "@genesislcap/foundation-logger": "14.143.1",
80
- "@genesislcap/foundation-shell": "14.143.1",
81
- "@genesislcap/foundation-ui": "14.143.1",
82
- "@genesislcap/foundation-utils": "14.143.1",
83
- "@genesislcap/foundation-zero": "14.143.1",
76
+ "@genesislcap/foundation-comms": "14.143.2",
77
+ "@genesislcap/foundation-events": "14.143.2",
78
+ "@genesislcap/foundation-i18n": "14.143.2",
79
+ "@genesislcap/foundation-logger": "14.143.2",
80
+ "@genesislcap/foundation-shell": "14.143.2",
81
+ "@genesislcap/foundation-ui": "14.143.2",
82
+ "@genesislcap/foundation-utils": "14.143.2",
83
+ "@genesislcap/foundation-zero": "14.143.2",
84
84
  "@microsoft/fast-colors": "^5.3.1",
85
85
  "@microsoft/fast-components": "^2.30.6",
86
86
  "@microsoft/fast-element": "^1.12.0",
87
- "@microsoft/fast-foundation": "^2.49.4",
88
87
  "@microsoft/fast-router": "^0.4.8",
89
88
  "tslib": "^2.3.1"
90
89
  },
@@ -97,5 +96,5 @@
97
96
  "access": "public"
98
97
  },
99
98
  "customElements": "dist/custom-elements.json",
100
- "gitHead": "5301ef68fff841cfb91d8b80ff57fee8e553b71b"
99
+ "gitHead": "126575303f48e0bcf0254498a0341d39fd1c8400"
101
100
  }
@@ -1,6 +0,0 @@
1
- /**
2
- * registerCommonZeroComponents.
3
- * @public
4
- */
5
- export declare const registerCommonZeroComponents: () => Promise<void>;
6
- //# sourceMappingURL=zero-components.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"zero-components.d.ts","sourceRoot":"","sources":["../../../src/components/zero-components.ts"],"names":[],"mappings":"AAsCA;;;GAGG;AACH,eAAO,MAAM,4BAA4B,qBAyBxC,CAAC"}
@@ -1,33 +0,0 @@
1
- import { PartialFASTElementDefinition } from '@microsoft/fast-element';
2
- import { TemplateOptions } from './templates';
3
- /**
4
- * Do not reference any ../main files here. We must avoid ../tags being referenced and therefore setup pre-configuration.
5
- */
6
- /**
7
- * HeaderConfig DI interface.
8
- *
9
- * @public
10
- */
11
- export interface HeaderConfig extends PartialFASTElementDefinition {
12
- /**
13
- * Template options.
14
- *
15
- * @remarks
16
- * Used by host applications to assign MF template options and subcomponent tags to align with the host design system.
17
- */
18
- templateOptions: TemplateOptions;
19
- }
20
- /**
21
- * Default HeaderConfig DI implementation.
22
- * @public
23
- */
24
- export declare const defaultHeaderConfig: HeaderConfig;
25
- /**
26
- * HeaderConfig DI key.
27
- *
28
- * @internal
29
- * @privateRemarks
30
- * Marked as internal to stop api-extractor becoming confused cross-linking tokens with the same name.
31
- */
32
- export declare const HeaderConfig: import("@microsoft/fast-foundation").InterfaceSymbol<HeaderConfig>;
33
- //# sourceMappingURL=config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/config/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AAEvE,OAAO,EAA0B,eAAe,EAAE,MAAM,aAAa,CAAC;AAEtE;;GAEG;AAEH;;;;GAIG;AACH,MAAM,WAAW,YAAa,SAAQ,4BAA4B;IAChE;;;;;OAKG;IACH,eAAe,EAAE,eAAe,CAAC;CAClC;AAED;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,YAGjC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,oEAExB,CAAC"}
@@ -1,27 +0,0 @@
1
- import { HeaderConfig } from './config';
2
- /**
3
- * A function that allows configuring the header micro-frontend with name and templateOptions.
4
- *
5
- * @remarks
6
- * Configure the Header micro frontend for host app integration.
7
- *
8
- * @example Providing template options to align to your host application.
9
- * ```ts
10
-
11
- * const { configure } = await import('@genesislcap/foundation-header/config'); // < import from the subpath
12
- * return configure({
13
- * name: `nexus-app-header`,
14
- * // These will be merged with the packages `defaultTemplateOptions`. You will need to have these components registered in your application.
15
- * templateOptions: {
16
- * button: 'nexus-button',
17
- * icon: 'nexus-icon-next',
18
- * },
19
- * });
20
- * },
21
- * ```
22
- *
23
- * @param config - A partial HeaderConfig.
24
- * @public
25
- */
26
- export declare function configure(config: Partial<HeaderConfig>): Promise<typeof import("../main").Navigation>;
27
- //# sourceMappingURL=configure.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"configure.d.ts","sourceRoot":"","sources":["../../../src/config/configure.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAuB,MAAM,UAAU,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,YAAY,CAAC,gDA+B5D"}
@@ -1,34 +0,0 @@
1
- import { TemplateElementDependency } from '@genesislcap/foundation-ui';
2
- import { SyntheticViewTemplate } from '@microsoft/fast-element';
3
- /**
4
- * TemplateComponents.
5
- * @public
6
- */
7
- export type TemplateComponents = {
8
- icon: TemplateElementDependency;
9
- button: TemplateElementDependency;
10
- connectionIndicator: TemplateElementDependency;
11
- select: TemplateElementDependency;
12
- option: TemplateElementDependency;
13
- flyout: TemplateElementDependency;
14
- };
15
- /**
16
- * TemplateOptions.
17
- * @public
18
- */
19
- export type TemplateOptions = Partial<TemplateComponents> & {
20
- /**
21
- * @remarks
22
- * Just for reference that template options may be more than tags.
23
- * @internal
24
- */
25
- somePartial?: string | SyntheticViewTemplate;
26
- };
27
- /**
28
- * defaultTemplateOptions.
29
- * @remarks
30
- * The default template options this MF has been created with.
31
- * @public
32
- */
33
- export declare const defaultTemplateOptions: TemplateOptions;
34
- //# sourceMappingURL=templates.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../../src/config/templates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,yBAAyB,CAAC;IAChC,MAAM,EAAE,yBAAyB,CAAC;IAClC,mBAAmB,EAAE,yBAAyB,CAAC;IAC/C,MAAM,EAAE,yBAAyB,CAAC;IAClC,MAAM,EAAE,yBAAyB,CAAC;IAClC,MAAM,EAAE,yBAAyB,CAAC;CACnC,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,kBAAkB,CAAC,GAAG;IAC1D;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,qBAAqB,CAAC;CAC9C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,EAAE,eAOpC,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './tags';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tags/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC"}
@@ -1,36 +0,0 @@
1
- /**
2
- * It's important this file isn't referenced ahead of a `configure` call, otherwise these values may remain fixed at
3
- * their defaults. Consumers must use the `/config` subpath to help avoid this. Files with references to tags should be
4
- * lazily loaded. There is an alternative `getTags` utility at the end which could offer another approach, but direct
5
- * tag exports and inline template references feel cleaner than having to convert all component `template` and `styles`
6
- * exports to functions to call `getTags` on execution.
7
- */
8
- /**
9
- * @internal
10
- */
11
- export declare const templateOptions: import("../config/templates").TemplateOptions;
12
- /**
13
- * @internal
14
- */
15
- export declare const iconTag: string;
16
- /**
17
- * @internal
18
- */
19
- export declare const buttonTag: string;
20
- /**
21
- * @internal
22
- */
23
- export declare const connectionIndicatorTag: string;
24
- /**
25
- * @internal
26
- */
27
- export declare const selectTag: string;
28
- /**
29
- * @internal
30
- */
31
- export declare const optionTag: string;
32
- /**
33
- * @internal
34
- */
35
- export declare const flyoutTag: string;
36
- //# sourceMappingURL=tags.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tags.d.ts","sourceRoot":"","sources":["../../../src/tags/tags.ts"],"names":[],"mappings":"AAKA;;;;;;GAMG;AAEH;;GAEG;AACH,eAAO,MAAQ,eAAe,+CACkB,CAAC;AAEjD;;GAEG;AACH,eAAO,MAAM,OAAO,QAA+B,CAAC;AAEpD;;GAEG;AACH,eAAO,MAAM,SAAS,QAAiC,CAAC;AAExD;;GAEG;AACH,eAAO,MAAM,sBAAsB,QAA8C,CAAC;AAElF;;GAEG;AACH,eAAO,MAAM,SAAS,QAAiC,CAAC;AAExD;;GAEG;AACH,eAAO,MAAM,SAAS,QAAiC,CAAC;AAExD;;GAEG;AACH,eAAO,MAAM,SAAS,QAAiC,CAAC"}
@@ -1,48 +0,0 @@
1
- import { __awaiter } from "tslib";
2
- import { assureDesignSystem, ResourceType, } from '@genesislcap/foundation-utils';
3
- import { logger } from '../utils';
4
- /**
5
- * zeroDesignSystemImport.
6
- * @remarks
7
- * Attempts to use a module federation version of zero before falling back to the version that was bundled with the app.
8
- * @internal
9
- */
10
- function zeroDesignSystemImport() {
11
- return __awaiter(this, void 0, void 0, function* () {
12
- let module;
13
- let type = ResourceType.remote;
14
- try {
15
- // @ts-ignore
16
- module = yield import(
17
- /* webpackChunkName: "foundation-zero" */
18
- 'foundationZero/ZeroDesignSystem');
19
- return assureDesignSystem(module);
20
- }
21
- catch (e) {
22
- logger.info(`Please note remoteEntry.js load errors are expected if module federated dependencies are offline. Falling back to locally bundled versions.`);
23
- type = ResourceType.local;
24
- module = yield import(
25
- /* webpackChunkName: "foundation-zero" */
26
- '@genesislcap/foundation-zero');
27
- return assureDesignSystem(module);
28
- }
29
- finally {
30
- logger.debug(`Using '${type}' version of foundation-zero`);
31
- }
32
- });
33
- }
34
- /**
35
- * registerCommonZeroComponents.
36
- * @public
37
- */
38
- export const registerCommonZeroComponents = () => __awaiter(void 0, void 0, void 0, function* () {
39
- const { provideDesignSystem, zeroIcon, zeroButton, zeroSelect, zeroListboxOption, zeroFlyout, zeroConnectionIndicator, } = yield zeroDesignSystemImport();
40
- /**
41
- * Register the components the app is using with the system.
42
- */
43
- provideDesignSystem().register(
44
- /**
45
- * Common across most routes, so batch register these lightweight components upfront.
46
- */
47
- zeroIcon(), zeroButton(), zeroSelect(), zeroListboxOption(), zeroFlyout(), zeroConnectionIndicator);
48
- });
@@ -1,18 +0,0 @@
1
- import { DI } from '@microsoft/fast-foundation';
2
- import { defaultTemplateOptions } from './templates';
3
- /**
4
- * Default HeaderConfig DI implementation.
5
- * @public
6
- */
7
- export const defaultHeaderConfig = {
8
- name: 'foundation-header',
9
- templateOptions: defaultTemplateOptions,
10
- };
11
- /**
12
- * HeaderConfig DI key.
13
- *
14
- * @internal
15
- * @privateRemarks
16
- * Marked as internal to stop api-extractor becoming confused cross-linking tokens with the same name.
17
- */
18
- export const HeaderConfig = DI.createInterface((x) => x.instance(defaultHeaderConfig));
@@ -1,56 +0,0 @@
1
- import { __awaiter } from "tslib";
2
- import { FASTElement } from '@microsoft/fast-element';
3
- import { DI, Registration } from '@microsoft/fast-foundation';
4
- import { HeaderConfig, defaultHeaderConfig } from './config';
5
- /**
6
- * A function that allows configuring the header micro-frontend with name and templateOptions.
7
- *
8
- * @remarks
9
- * Configure the Header micro frontend for host app integration.
10
- *
11
- * @example Providing template options to align to your host application.
12
- * ```ts
13
-
14
- * const { configure } = await import('@genesislcap/foundation-header/config'); // < import from the subpath
15
- * return configure({
16
- * name: `nexus-app-header`,
17
- * // These will be merged with the packages `defaultTemplateOptions`. You will need to have these components registered in your application.
18
- * templateOptions: {
19
- * button: 'nexus-button',
20
- * icon: 'nexus-icon-next',
21
- * },
22
- * });
23
- * },
24
- * ```
25
- *
26
- * @param config - A partial HeaderConfig.
27
- * @public
28
- */
29
- export function configure(config) {
30
- return __awaiter(this, void 0, void 0, function* () {
31
- /**
32
- * Merge the configs
33
- */
34
- const value = Object.assign(Object.assign({}, defaultHeaderConfig), config);
35
- if (config.templateOptions) {
36
- value.templateOptions = Object.assign(Object.assign({}, defaultHeaderConfig.templateOptions), config.templateOptions);
37
- }
38
- /**
39
- * Register a new HeaderConfig
40
- */
41
- DI.getOrCreateDOMContainer().register(Registration.instance(HeaderConfig, value));
42
- /**
43
- * Lazily reference and define the micro frontend element post config setting.
44
- */
45
- const { Navigation, DynamicTemplate, MainStyles } = yield import('../main');
46
- const { name, attributes, shadowOptions, elementOptions } = value;
47
- return FASTElement.define(Navigation, {
48
- name,
49
- template: DynamicTemplate,
50
- styles: MainStyles,
51
- attributes,
52
- shadowOptions,
53
- elementOptions,
54
- });
55
- });
56
- }
@@ -1,14 +0,0 @@
1
- /**
2
- * defaultTemplateOptions.
3
- * @remarks
4
- * The default template options this MF has been created with.
5
- * @public
6
- */
7
- export const defaultTemplateOptions = {
8
- icon: 'zero-icon',
9
- button: 'zero-button',
10
- connectionIndicator: 'zero-connection-indicator',
11
- select: 'zero-select',
12
- option: 'zero-option',
13
- flyout: 'zero-flyout',
14
- };
@@ -1 +0,0 @@
1
- export * from './tags';
@@ -1,39 +0,0 @@
1
- import { tagFor } from '@genesislcap/foundation-ui';
2
- import { DI } from '@microsoft/fast-foundation';
3
- import { HeaderConfig } from '../config/config';
4
- import { defaultTemplateOptions } from '../config/templates';
5
- /**
6
- * It's important this file isn't referenced ahead of a `configure` call, otherwise these values may remain fixed at
7
- * their defaults. Consumers must use the `/config` subpath to help avoid this. Files with references to tags should be
8
- * lazily loaded. There is an alternative `getTags` utility at the end which could offer another approach, but direct
9
- * tag exports and inline template references feel cleaner than having to convert all component `template` and `styles`
10
- * exports to functions to call `getTags` on execution.
11
- */
12
- /**
13
- * @internal
14
- */
15
- export const { templateOptions = defaultTemplateOptions } = DI.getOrCreateDOMContainer().get(HeaderConfig);
16
- /**
17
- * @internal
18
- */
19
- export const iconTag = tagFor(templateOptions.icon);
20
- /**
21
- * @internal
22
- */
23
- export const buttonTag = tagFor(templateOptions.button);
24
- /**
25
- * @internal
26
- */
27
- export const connectionIndicatorTag = tagFor(templateOptions.connectionIndicator);
28
- /**
29
- * @internal
30
- */
31
- export const selectTag = tagFor(templateOptions.select);
32
- /**
33
- * @internal
34
- */
35
- export const optionTag = tagFor(templateOptions.option);
36
- /**
37
- * @internal
38
- */
39
- export const flyoutTag = tagFor(templateOptions.flyout);
@@ -1,46 +0,0 @@
1
- <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
-
3
- [Home](./index.md) &gt; [@genesislcap/foundation-header](./foundation-header.md) &gt; [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&lt;[HeaderConfig](./foundation-header.headerconfig.md)<!-- -->&gt; | A partial HeaderConfig. |
20
-
21
- **Returns:**
22
-
23
- Promise&lt;typeof import("../main").[Navigation](./foundation-header.navigation.md)<!-- -->&gt;
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
-
35
- const { configure } = await import('@genesislcap/foundation-header/config'); // < import from the subpath
36
- return configure({
37
- name: `nexus-app-header`,
38
- // These will be merged with the packages `defaultTemplateOptions`. You will need to have these components registered in your application.
39
- templateOptions: {
40
- button: 'nexus-button',
41
- icon: 'nexus-icon-next',
42
- },
43
- });
44
- },
45
- ```
46
-
@@ -1,13 +0,0 @@
1
- <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
-
3
- [Home](./index.md) &gt; [@genesislcap/foundation-header](./foundation-header.md) &gt; [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
- ```
@@ -1,21 +0,0 @@
1
- <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
-
3
- [Home](./index.md) &gt; [@genesislcap/foundation-header](./foundation-header.md) &gt; [HeaderConfig](./foundation-header.headerconfig.md)
4
-
5
- ## HeaderConfig interface
6
-
7
- HeaderConfig DI interface.
8
-
9
- **Signature:**
10
-
11
- ```typescript
12
- export interface HeaderConfig extends PartialFASTElementDefinition
13
- ```
14
- **Extends:** PartialFASTElementDefinition
15
-
16
- ## Properties
17
-
18
- | Property | Modifiers | Type | Description |
19
- | --- | --- | --- | --- |
20
- | [templateOptions](./foundation-header.headerconfig.templateoptions.md) | | TemplateOptions | Template options. |
21
-
@@ -1,18 +0,0 @@
1
- <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
-
3
- [Home](./index.md) &gt; [@genesislcap/foundation-header](./foundation-header.md) &gt; [HeaderConfig](./foundation-header.headerconfig.md) &gt; [templateOptions](./foundation-header.headerconfig.templateoptions.md)
4
-
5
- ## HeaderConfig.templateOptions property
6
-
7
- Template options.
8
-
9
- **Signature:**
10
-
11
- ```typescript
12
- templateOptions: TemplateOptions;
13
- ```
14
-
15
- ## Remarks
16
-
17
- Used by host applications to assign MF template options and subcomponent tags to align with the host design system.
18
-
@@ -1,11 +0,0 @@
1
- <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
-
3
- [Home](./index.md) &gt; [@genesislcap/foundation-header](./foundation-header.md) &gt; [Navigation](./foundation-header.navigation.md) &gt; [headerConfig](./foundation-header.navigation.headerconfig.md)
4
-
5
- ## Navigation.headerConfig property
6
-
7
- **Signature:**
8
-
9
- ```typescript
10
- headerConfig: HeaderConfig;
11
- ```