@oiz/stzh-components 3.3.0-beta4 → 3.3.0-beta6
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/cjs/{app-globals-add1c2c1.js → app-globals-2cd4f46b.js} +2 -2
- package/dist/cjs/{app-globals-add1c2c1.js.map → app-globals-2cd4f46b.js.map} +1 -1
- package/dist/cjs/{arrow-16638ece.js → arrow-6135123b.js} +116 -49
- package/dist/cjs/arrow-6135123b.js.map +1 -0
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/stzh-app-nav.cjs.entry.js +9 -1
- package/dist/cjs/stzh-app-nav.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-badge_3.cjs.entry.js +1 -1
- package/dist/cjs/stzh-badge_3.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-components.cjs.js +2 -2
- package/dist/cjs/stzh-header.cjs.entry.js +23 -13
- package/dist/cjs/stzh-header.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-popover_2.cjs.entry.js +21 -9
- package/dist/cjs/stzh-popover_2.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-row.cjs.entry.js +1 -1
- package/dist/cjs/stzh-row.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-tooltip.cjs.entry.js +20 -8
- package/dist/cjs/stzh-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-upload.cjs.entry.js +1 -1
- package/dist/cjs/stzh-upload.cjs.entry.js.map +1 -1
- package/dist/collection/components/stzh-app-nav/stzh-app-nav.js +32 -1
- package/dist/collection/components/stzh-app-nav/stzh-app-nav.js.map +1 -1
- package/dist/collection/components/stzh-app-nav/stzh-app-nav.stories.js +1 -1
- package/dist/collection/components/stzh-button/stzh-button.css +3 -2
- package/dist/collection/components/stzh-header/stzh-header.js +34 -20
- package/dist/collection/components/stzh-header/stzh-header.js.map +1 -1
- package/dist/collection/components/stzh-header/stzh-header.stories.js +9 -9
- package/dist/collection/components/stzh-popover/stzh-popover.js +20 -8
- package/dist/collection/components/stzh-popover/stzh-popover.js.map +1 -1
- package/dist/collection/components/stzh-row/stzh-row.css +240 -184
- package/dist/collection/components/stzh-tooltip/stzh-tooltip.js +19 -7
- package/dist/collection/components/stzh-tooltip/stzh-tooltip.js.map +1 -1
- package/dist/collection/components/stzh-upload/stzh-upload.js +1 -1
- package/dist/collection/components/stzh-upload/stzh-upload.js.map +1 -1
- package/dist/collection/index.js.map +1 -1
- package/dist/components/arrow.js +115 -48
- package/dist/components/arrow.js.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/index2.js.map +1 -1
- package/dist/components/stzh-app-nav2.js +10 -2
- package/dist/components/stzh-app-nav2.js.map +1 -1
- package/dist/components/stzh-button2.js +1 -1
- package/dist/components/stzh-button2.js.map +1 -1
- package/dist/components/stzh-header.js +27 -16
- package/dist/components/stzh-header.js.map +1 -1
- package/dist/components/stzh-popover2.js +20 -8
- package/dist/components/stzh-popover2.js.map +1 -1
- package/dist/components/stzh-row.js +1 -1
- package/dist/components/stzh-row.js.map +1 -1
- package/dist/components/stzh-tooltip2.js +19 -7
- package/dist/components/stzh-tooltip2.js.map +1 -1
- package/dist/components/stzh-upload.js +1 -1
- package/dist/components/stzh-upload.js.map +1 -1
- package/dist/esm/{app-globals-7f5414ca.js → app-globals-0aad39a2.js} +2 -2
- package/dist/esm/{app-globals-7f5414ca.js.map → app-globals-0aad39a2.js.map} +1 -1
- package/dist/esm/{arrow-fc956b24.js → arrow-8f47d7ea.js} +116 -49
- package/dist/esm/arrow-8f47d7ea.js.map +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/stzh-app-nav.entry.js +10 -2
- package/dist/esm/stzh-app-nav.entry.js.map +1 -1
- package/dist/esm/stzh-badge_3.entry.js +1 -1
- package/dist/esm/stzh-badge_3.entry.js.map +1 -1
- package/dist/esm/stzh-components.js +2 -2
- package/dist/esm/stzh-header.entry.js +23 -13
- package/dist/esm/stzh-header.entry.js.map +1 -1
- package/dist/esm/stzh-popover_2.entry.js +21 -9
- package/dist/esm/stzh-popover_2.entry.js.map +1 -1
- package/dist/esm/stzh-row.entry.js +1 -1
- package/dist/esm/stzh-row.entry.js.map +1 -1
- package/dist/esm/stzh-tooltip.entry.js +20 -8
- package/dist/esm/stzh-tooltip.entry.js.map +1 -1
- package/dist/esm/stzh-upload.entry.js +1 -1
- package/dist/esm/stzh-upload.entry.js.map +1 -1
- package/dist/stzh-components/index.esm.js.map +1 -1
- package/dist/stzh-components/{p-4f7f4362.entry.js → p-16581003.entry.js} +2 -2
- package/dist/stzh-components/p-16581003.entry.js.map +1 -0
- package/dist/stzh-components/{p-6009632f.js → p-49fcbbfb.js} +2 -2
- package/dist/stzh-components/p-7423c6c2.js +2 -0
- package/dist/stzh-components/p-7423c6c2.js.map +1 -0
- package/dist/stzh-components/{p-d1aa8602.entry.js → p-8202e541.entry.js} +2 -2
- package/dist/stzh-components/p-8202e541.entry.js.map +1 -0
- package/dist/stzh-components/p-ab6cc68f.entry.js +2 -0
- package/dist/stzh-components/p-ab6cc68f.entry.js.map +1 -0
- package/dist/stzh-components/p-b047262a.entry.js +2 -0
- package/dist/stzh-components/p-b047262a.entry.js.map +1 -0
- package/dist/stzh-components/{p-288fd6f7.entry.js → p-bb4dea97.entry.js} +2 -2
- package/dist/stzh-components/{p-288fd6f7.entry.js.map → p-bb4dea97.entry.js.map} +1 -1
- package/dist/stzh-components/p-dc4f385d.entry.js +2 -0
- package/dist/stzh-components/p-dc4f385d.entry.js.map +1 -0
- package/dist/stzh-components/p-ecbac5ca.entry.js +2 -0
- package/dist/stzh-components/p-ecbac5ca.entry.js.map +1 -0
- package/dist/stzh-components/stzh-components.esm.js +1 -1
- package/dist/stzh-components/stzh-components.esm.js.map +1 -1
- package/dist/types/components/stzh-app-nav/stzh-app-nav.d.ts +5 -1
- package/dist/types/components/stzh-header/stzh-header.d.ts +7 -5
- package/dist/types/components/stzh-popover/stzh-popover.d.ts +3 -0
- package/dist/types/components/stzh-tooltip/stzh-tooltip.d.ts +3 -0
- package/dist/types/components.d.ts +22 -14
- package/dist/types/index.d.ts +5 -0
- package/dist/vscode-data.json +9 -5
- package/package.json +2 -2
- package/dist/cjs/arrow-16638ece.js.map +0 -1
- package/dist/esm/arrow-fc956b24.js.map +0 -1
- package/dist/stzh-components/p-4f7f4362.entry.js.map +0 -1
- package/dist/stzh-components/p-6a1d65ce.entry.js +0 -2
- package/dist/stzh-components/p-6a1d65ce.entry.js.map +0 -1
- package/dist/stzh-components/p-a2da1df4.js +0 -2
- package/dist/stzh-components/p-a2da1df4.js.map +0 -1
- package/dist/stzh-components/p-d1aa8602.entry.js.map +0 -1
- package/dist/stzh-components/p-e9933daa.entry.js +0 -2
- package/dist/stzh-components/p-e9933daa.entry.js.map +0 -1
- package/dist/stzh-components/p-f0887c02.entry.js +0 -2
- package/dist/stzh-components/p-f0887c02.entry.js.map +0 -1
- package/dist/stzh-components/p-f42f6787.entry.js +0 -2
- package/dist/stzh-components/p-f42f6787.entry.js.map +0 -1
- /package/dist/stzh-components/{p-6009632f.js.map → p-49fcbbfb.js.map} +0 -0
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
2
|
export class StzhAppNav {
|
|
3
3
|
constructor() {
|
|
4
|
+
this.handleAppNavItemClick = (event, item) => {
|
|
5
|
+
this.stzhAppNavItemClick.emit({
|
|
6
|
+
component: "stzh-app-nav",
|
|
7
|
+
item,
|
|
8
|
+
originalEvent: event,
|
|
9
|
+
});
|
|
10
|
+
};
|
|
4
11
|
this.localization = undefined;
|
|
5
12
|
this.items = [];
|
|
6
13
|
}
|
|
@@ -13,7 +20,7 @@ export class StzhAppNav {
|
|
|
13
20
|
const classes = {
|
|
14
21
|
"stzh-app-nav": true,
|
|
15
22
|
};
|
|
16
|
-
return (h(Host, null, h("nav", { role: "navigation", class: classes, "aria-label": this.localization.title }, h("div", { class: "stzh-app-nav__links", role: "list" }, this.items.map((item) => (h("stzh-link", { class: "stzh-app-nav__link", active: item.active, role: "listitem", "a11y-current": item.a11yCurrent, href: item.href, badge: item.badge, badgeType: item.badgeType, icon: item.icon }, item.text)))))));
|
|
23
|
+
return (h(Host, null, h("nav", { role: "navigation", class: classes, "aria-label": this.localization.title }, h("div", { class: "stzh-app-nav__links", role: "list" }, this.items.map((item) => (h("stzh-link", { class: "stzh-app-nav__link", active: item.active, role: "listitem", "a11y-current": item.a11yCurrent, href: item.href, badge: item.badge, badgeType: item.badgeType, icon: item.icon, onClick: (e) => { this.handleAppNavItemClick(e, item); } }, item.text)))))));
|
|
17
24
|
}
|
|
18
25
|
static get is() { return "stzh-app-nav"; }
|
|
19
26
|
static get encapsulation() { return "shadow"; }
|
|
@@ -74,6 +81,30 @@ export class StzhAppNav {
|
|
|
74
81
|
}
|
|
75
82
|
};
|
|
76
83
|
}
|
|
84
|
+
static get events() {
|
|
85
|
+
return [{
|
|
86
|
+
"method": "stzhAppNavItemClick",
|
|
87
|
+
"name": "stzhAppNavItemClick",
|
|
88
|
+
"bubbles": true,
|
|
89
|
+
"cancelable": true,
|
|
90
|
+
"composed": true,
|
|
91
|
+
"docs": {
|
|
92
|
+
"tags": [],
|
|
93
|
+
"text": "AppNav item click event"
|
|
94
|
+
},
|
|
95
|
+
"complexType": {
|
|
96
|
+
"original": "StzhAppNavItemClickEvent",
|
|
97
|
+
"resolved": "{ component: \"stzh-app-nav\"; item: StzhAppNavItem; originalEvent: MouseEvent; }",
|
|
98
|
+
"references": {
|
|
99
|
+
"StzhAppNavItemClickEvent": {
|
|
100
|
+
"location": "import",
|
|
101
|
+
"path": "../../index",
|
|
102
|
+
"id": "src/index.ts::StzhAppNavItemClickEvent"
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}];
|
|
107
|
+
}
|
|
77
108
|
static get elementRef() { return "element"; }
|
|
78
109
|
}
|
|
79
110
|
//# sourceMappingURL=stzh-app-nav.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stzh-app-nav.js","sourceRoot":"","sources":["../../../../src/components/stzh-app-nav/stzh-app-nav.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"stzh-app-nav.js","sourceRoot":"","sources":["../../../../src/components/stzh-app-nav/stzh-app-nav.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAe,MAAM,eAAe,CAAC;AAYrF,MAAM,OAAO,UAAU;;IAkBb,0BAAqB,GAAG,CAAC,KAAiB,EAAE,IAAoB,EAAE,EAAE;MAC1E,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC;QAC5B,SAAS,EAAE,cAAc;QACzB,IAAI;QACJ,aAAa,EAAE,KAAK;OACrB,CAAC,CAAC;IACL,CAAC,CAAC;;iBAnBgC,EAAE;;EAOpC,KAAK,CAAC,iBAAiB;IACrB,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE;MACtB,IAAI,CAAC,YAAY,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,iBAAiB,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;KACjG;EACH,CAAC;EAUD,MAAM;IACJ,MAAM,OAAO,GAAG;MACd,cAAc,EAAE,IAAI;KACrB,CAAC;IAEF,OAAO,CACL,EAAC,IAAI;MACH,WAAK,IAAI,EAAC,YAAY,EAAC,KAAK,EAAE,OAAO,gBAAc,IAAI,CAAC,YAAY,CAAC,KAAK;QACxE,WAAK,KAAK,EAAC,qBAAqB,EAAC,IAAI,EAAC,MAAM,IAC3C,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACxB,iBACE,KAAK,EAAC,oBAAoB,EAC1B,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,IAAI,EAAC,UAAU,kBACD,IAAI,CAAC,WAAW,EAC9B,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,OAAO,EAAE,CAAC,CAAa,EAAE,EAAE,GAAG,IAAI,CAAC,qBAAqB,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA,CAAC,CAAC,IACjE,IAAI,CAAC,IAAI,CACD,CACb,CAAC,CACI,CACF,CACD,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {Component, Prop, h, Host, Element, Event, EventEmitter} from \"@stencil/core\";\n\nimport { StzhAppNavLocalizedText } from \"./stzh-app-nav.localization\";\n\nimport {StzhAppNavItem, StzhAppNavItemClickEvent} from \"../../index\";\n\n@Component({\n tag: \"stzh-app-nav\",\n styleUrl: \"stzh-app-nav.scss\",\n shadow: true,\n})\n\nexport class StzhAppNav {\n /** Translation strings */\n @Prop() localization: StzhAppNavLocalizedText;\n\n /** App-nav items */\n @Prop() items: StzhAppNavItem[] = [];\n\n @Element() element: HTMLStzhAppNavElement;\n\n /** AppNav item click event */\n @Event() stzhAppNavItemClick: EventEmitter<StzhAppNavItemClickEvent>;\n\n async componentWillLoad() {\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"appnav\");\n }\n }\n\n private handleAppNavItemClick = (event: MouseEvent, item: StzhAppNavItem) => {\n this.stzhAppNavItemClick.emit({\n component: \"stzh-app-nav\",\n item,\n originalEvent: event,\n });\n };\n\n render() {\n const classes = {\n \"stzh-app-nav\": true,\n };\n\n return (\n <Host>\n <nav role=\"navigation\" class={classes} aria-label={this.localization.title}>\n <div class=\"stzh-app-nav__links\" role=\"list\">\n {this.items.map((item) => (\n <stzh-link\n class=\"stzh-app-nav__link\"\n active={item.active}\n role=\"listitem\"\n a11y-current={item.a11yCurrent}\n href={item.href}\n badge={item.badge}\n badgeType={item.badgeType}\n icon={item.icon}\n onClick={(e: MouseEvent) => { this.handleAppNavItemClick(e, item) }}\n >{item.text}\n </stzh-link>\n ))}\n </div>\n </nav>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -208,7 +208,7 @@
|
|
|
208
208
|
--hover-color: var(--stzh-button-hover-color, var(--stzh-color-white));
|
|
209
209
|
--hover-background-color: var(--stzh-button-hover-background-color, var(--stzh-color-secondary60));
|
|
210
210
|
--hover-border-color: transparent;
|
|
211
|
-
display: inline-
|
|
211
|
+
display: inline-flex;
|
|
212
212
|
width: auto;
|
|
213
213
|
min-width: var(--height);
|
|
214
214
|
min-height: var(--height);
|
|
@@ -497,7 +497,8 @@
|
|
|
497
497
|
-webkit-text-decoration-line: none;
|
|
498
498
|
text-decoration-line: none;
|
|
499
499
|
width: 100%;
|
|
500
|
-
height: 100%;
|
|
500
|
+
min-height: 100%;
|
|
501
|
+
margin: 0;
|
|
501
502
|
border-radius: var(--border-radius);
|
|
502
503
|
text-align: left;
|
|
503
504
|
box-shadow: var(--box-shadow);
|
|
@@ -155,7 +155,7 @@ export class StzhHeader {
|
|
|
155
155
|
this.logoType = "default";
|
|
156
156
|
this.menuItems = [];
|
|
157
157
|
this.menuBackLabel = undefined;
|
|
158
|
-
this.
|
|
158
|
+
this.metanavItems = [];
|
|
159
159
|
this.userSpecificMetanavItemsNotLoggedIn = [];
|
|
160
160
|
this.appNavItems = [];
|
|
161
161
|
this.userSpecificMetanavItemsEndpoint = undefined;
|
|
@@ -306,14 +306,22 @@ export class StzhHeader {
|
|
|
306
306
|
}
|
|
307
307
|
this._menuItems = this._menuItems.map((menuItem, index) => (Object.assign({ id: `submenu-${index}` }, menuItem)));
|
|
308
308
|
}
|
|
309
|
-
|
|
309
|
+
metanavItemsWatcher(newValue) {
|
|
310
310
|
if (typeof newValue === "string") {
|
|
311
|
-
this.
|
|
311
|
+
this._metanavItems = JSON.parse(newValue);
|
|
312
312
|
}
|
|
313
313
|
else {
|
|
314
|
-
this.
|
|
314
|
+
this._metanavItems = newValue;
|
|
315
|
+
}
|
|
316
|
+
this._metanavItems = this._metanavItems.map((metanavItem, index) => (Object.assign({ id: `metanav-submenu-${index}` }, metanavItem)));
|
|
317
|
+
}
|
|
318
|
+
appNavItemsWatcher(newValue) {
|
|
319
|
+
if (typeof newValue === "string") {
|
|
320
|
+
this._appNavItems = JSON.parse(newValue);
|
|
321
|
+
}
|
|
322
|
+
else {
|
|
323
|
+
this._appNavItems = newValue;
|
|
315
324
|
}
|
|
316
|
-
this._standardMetanavItems = this._standardMetanavItems.map((metanavItem, index) => (Object.assign({ id: `metanav-submenu-${index}` }, metanavItem)));
|
|
317
325
|
}
|
|
318
326
|
userSpecificMetanavItemsNotLoggedInWatcher(newValue) {
|
|
319
327
|
this._userSpecificMetanavItemsNotLoggedIn = newValue;
|
|
@@ -436,16 +444,16 @@ export class StzhHeader {
|
|
|
436
444
|
}
|
|
437
445
|
async requestUserSpecificMetanavItems() {
|
|
438
446
|
if (!this.userSpecificMetanavItemsEndpoint) {
|
|
439
|
-
this.combinedMetanavItems = [...this.
|
|
447
|
+
this.combinedMetanavItems = [...this._metanavItems, ...this._userSpecificMetanavItemsNotLoggedIn];
|
|
440
448
|
return;
|
|
441
449
|
}
|
|
442
450
|
try {
|
|
443
451
|
const response = await fetch(this.userSpecificMetanavItemsEndpoint);
|
|
444
452
|
this.userSpecificMetanavItemsLoggedIn = await response.json();
|
|
445
|
-
this.combinedMetanavItems = [...this.
|
|
453
|
+
this.combinedMetanavItems = [...this._metanavItems, ...this.userSpecificMetanavItemsLoggedIn];
|
|
446
454
|
}
|
|
447
455
|
catch (error) {
|
|
448
|
-
this.combinedMetanavItems = [...this.
|
|
456
|
+
this.combinedMetanavItems = [...this._metanavItems, ...this._userSpecificMetanavItemsNotLoggedIn]; // fallback to not logged in items
|
|
449
457
|
console.error('Error fetching data:', error);
|
|
450
458
|
if (this.loginErrorMessage) {
|
|
451
459
|
document.querySelector('stzh-toastbar')
|
|
@@ -457,7 +465,8 @@ export class StzhHeader {
|
|
|
457
465
|
}
|
|
458
466
|
async componentWillLoad() {
|
|
459
467
|
this.menuItemsWatcher(this.menuItems);
|
|
460
|
-
this.
|
|
468
|
+
this.metanavItemsWatcher(this.metanavItems);
|
|
469
|
+
this.appNavItemsWatcher(this.appNavItems);
|
|
461
470
|
this.languagesWatcher(this.languages);
|
|
462
471
|
this.searchValueWatcher(this.searchValue);
|
|
463
472
|
this.userSpecificMetanavItemsNotLoggedInWatcher(this.userSpecificMetanavItemsNotLoggedIn);
|
|
@@ -511,14 +520,14 @@ export class StzhHeader {
|
|
|
511
520
|
"stzh-header--hide-logo": this.hideLogo,
|
|
512
521
|
"stzh-header--has-empty-metabar-mobile": !metanavBeforeUsed &&
|
|
513
522
|
!metanavAfterUsed &&
|
|
514
|
-
this.
|
|
523
|
+
this._metanavItems.filter((item) => item.stay || item.stayAndShowInMobileMenu).length === 0 &&
|
|
515
524
|
this._menuItems.length === 0 &&
|
|
516
525
|
(this._languages.length === 0 ||
|
|
517
526
|
(this._languages.length > 0 && !this.languageStay)) &&
|
|
518
527
|
!this.searchAction,
|
|
519
528
|
"stzh-header--has-empty-metabar": !metanavBeforeUsed &&
|
|
520
529
|
!metanavAfterUsed &&
|
|
521
|
-
this.
|
|
530
|
+
this._metanavItems.length === 0 &&
|
|
522
531
|
this._menuItems.length === 0 &&
|
|
523
532
|
this._languages.length === 0 &&
|
|
524
533
|
!this.searchAction,
|
|
@@ -540,7 +549,7 @@ export class StzhHeader {
|
|
|
540
549
|
"has-no-short-label": !item.labelShort,
|
|
541
550
|
} }, h("span", { class: "stzh-header__metanav-item-text-label-long" }, item.label), h("span", { class: "stzh-header__metanav-item-text-label-short", "aria-hidden": "true" }, item.labelShort)), item.icon && (h("span", { class: "stzh-header__metanav-icon-wrapper" }, item.icon && (h("stzh-icon", { class: `stzh-header__metanav-icon ${item.iconOpen ? "is-close" : ""}`, name: item.icon })), item.iconOpen && h("stzh-icon", { class: "stzh-header__metanav-icon is-open", name: item.iconOpen }), (item.badge || item.badgeEmpty) && (h("stzh-badge", { class: "stzh-header__metanav-icon-badge", label: item.badge, type: typeof item.badgeType === "undefined" ? "error" : item.badgeType }))))));
|
|
542
551
|
};
|
|
543
|
-
return (h(Host, null, h("header", { class: classes }, h("div", { class: "stzh-header__header", style: { paddingTop: `${this.paddingTop}px` } }, this.
|
|
552
|
+
return (h(Host, null, h("header", { class: classes }, h("div", { class: "stzh-header__header", style: { paddingTop: `${this.paddingTop}px` } }, this._appNavItems.length > 0 && (h("div", { class: "stzh-header__app-nav-bottom" }, h("stzh-app-nav", { items: this._appNavItems }))), h("div", { class: "stzh-header__inner" }, h("div", { class: "stzh-header__main", ref: el => (this.mainElement = el) }, h("div", { class: "stzh-header__logobar", ref: el => (this.logobarElement = el) }, h("div", { class: "stzh-header__logobar-logo" }, h("a", { href: this.href, class: "stzh-header__logo-link", "s-object-id": this.logoAnalyticsId || "Header Logo" }, h("slot", { name: "logo" }))), h("div", { class: "stzh-header__logobar-decoration" })), !this.hideMetabar && (h("div", { class: "stzh-header__metabar", ref: el => (this.metabarElement = el) }, h("div", { class: "stzh-header__metabar-inner" }, h("slot", { name: "menu-before" }), this._menuItems.length > 0 && (h("button", { id: this.menuId, class: `stzh-header__burger ${this.flyoutOpen && !this.flyoutOpenedByMetanavItem && "is-open"}`, onClick: this.handleBurgerClick }, h("stzh-icon", { class: "stzh-header__burger-icon is-close", name: "menu" }), h("stzh-icon", { class: "stzh-header__burger-icon is-open", name: "close" }), h("div", { class: "stzh-header__burger-text" }, this.localization.menuLabel))), this.searchAction && !hasSlot(this.element, "search") && (h("form", { class: "stzh-header__metabar-search", action: this.searchAction, role: "search" }, h("label", { class: "stzh-header__search" }, h("input", { id: this.searchId, ref: el => (this.searchInput = el), class: "stzh-header__search-input", type: "search", name: this.searchFieldName, onChange: this.handleSearchChange, onInput: this.handleSearchInput }), h("stzh-icon", { class: "stzh-header__search-icon", name: "search" }), h("div", { class: "stzh-header__search-text" }, this.localization.searchLabel)))), hasSlot(this.element, "search") && (h("stzh-button", { iconPosition: "left", onClick: this.handleSearchButtonClick, variant: "tertiary-plain", size: "small" }, h("stzh-icon", { slot: "icon", name: "search", class: this.flyoutSearchOpen ? "stzh-header__search-button--is-hidden" : "" }), h("stzh-icon", { slot: "icon", name: "close", class: this.flyoutSearchOpen ? "" : "stzh-header__search-button--is-hidden" }), this.localization.searchLabel)), h("slot", { name: "menu-after" }), this._appNavItems.length > 0 && (h("div", { class: "stzh-header__app-nav" }, h("stzh-app-nav", { items: this._appNavItems }))), h("div", { class: "stzh-header__metabar-nav", id: this.metanavId }, h("slot", { name: "metanav-before" }), this.combinedMetanavItems.map((item) => {
|
|
544
553
|
var _a, _b;
|
|
545
554
|
return ((_a = item.items) === null || _a === void 0 ? void 0 : _a.length) > 0 || item.itemButton ? (h(Fragment, null, renderMetanavItemButton(item, {
|
|
546
555
|
"is-popover-mobile": true,
|
|
@@ -813,7 +822,7 @@ export class StzhHeader {
|
|
|
813
822
|
"attribute": "menu-back-label",
|
|
814
823
|
"reflect": false
|
|
815
824
|
},
|
|
816
|
-
"
|
|
825
|
+
"metanavItems": {
|
|
817
826
|
"type": "string",
|
|
818
827
|
"mutable": false,
|
|
819
828
|
"complexType": {
|
|
@@ -833,7 +842,7 @@ export class StzhHeader {
|
|
|
833
842
|
"tags": [],
|
|
834
843
|
"text": "Generic meta navigation items"
|
|
835
844
|
},
|
|
836
|
-
"attribute": "
|
|
845
|
+
"attribute": "metanav-items",
|
|
837
846
|
"reflect": false,
|
|
838
847
|
"defaultValue": "[]"
|
|
839
848
|
},
|
|
@@ -860,11 +869,11 @@ export class StzhHeader {
|
|
|
860
869
|
"defaultValue": "[]"
|
|
861
870
|
},
|
|
862
871
|
"appNavItems": {
|
|
863
|
-
"type": "
|
|
872
|
+
"type": "string",
|
|
864
873
|
"mutable": false,
|
|
865
874
|
"complexType": {
|
|
866
|
-
"original": "StzhAppNavItem[]",
|
|
867
|
-
"resolved": "StzhAppNavItem[]",
|
|
875
|
+
"original": "StzhAppNavItem[] | string",
|
|
876
|
+
"resolved": "StzhAppNavItem[] | string",
|
|
868
877
|
"references": {
|
|
869
878
|
"StzhAppNavItem": {
|
|
870
879
|
"location": "import",
|
|
@@ -877,8 +886,10 @@ export class StzhHeader {
|
|
|
877
886
|
"optional": false,
|
|
878
887
|
"docs": {
|
|
879
888
|
"tags": [],
|
|
880
|
-
"text": "App-
|
|
889
|
+
"text": "App-Nav items"
|
|
881
890
|
},
|
|
891
|
+
"attribute": "app-nav-items",
|
|
892
|
+
"reflect": false,
|
|
882
893
|
"defaultValue": "[]"
|
|
883
894
|
},
|
|
884
895
|
"userSpecificMetanavItemsEndpoint": {
|
|
@@ -1320,8 +1331,11 @@ export class StzhHeader {
|
|
|
1320
1331
|
"propName": "menuItems",
|
|
1321
1332
|
"methodName": "menuItemsWatcher"
|
|
1322
1333
|
}, {
|
|
1323
|
-
"propName": "
|
|
1324
|
-
"methodName": "
|
|
1334
|
+
"propName": "metanavItems",
|
|
1335
|
+
"methodName": "metanavItemsWatcher"
|
|
1336
|
+
}, {
|
|
1337
|
+
"propName": "appNavItems",
|
|
1338
|
+
"methodName": "appNavItemsWatcher"
|
|
1325
1339
|
}, {
|
|
1326
1340
|
"propName": "userSpecificMetanavItemsNotLoggedIn",
|
|
1327
1341
|
"methodName": "userSpecificMetanavItemsNotLoggedInWatcher"
|