xv-webcomponents 1.3.20-qa.0 → 1.3.22-qa.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/xv-accordion-v2_45.cjs.entry.js +69 -65
- package/dist/cjs/xv-accordion-v2_45.cjs.entry.js.map +1 -1
- package/dist/collection/components/xv-dropdown/xv-dropdown.js +20 -6
- package/dist/collection/components/xv-dropdown/xv-dropdown.js.map +1 -1
- package/dist/collection/components/xv-footer/xv-footer.js +26 -12
- package/dist/collection/components/xv-footer/xv-footer.js.map +1 -1
- package/dist/collection/components/xv-header/xv-header.js +4 -5
- package/dist/collection/components/xv-header/xv-header.js.map +1 -1
- package/dist/collection/components/xv-mega-menu/xv-mega-menu.js +21 -44
- package/dist/collection/components/xv-mega-menu/xv-mega-menu.js.map +1 -1
- package/dist/esm/xv-accordion-v2_45.entry.js +69 -65
- package/dist/esm/xv-accordion-v2_45.entry.js.map +1 -1
- package/dist/types/components/xv-dropdown/xv-dropdown.d.ts +1 -1
- package/dist/types/components/xv-footer/xv-footer.d.ts +1 -1
- package/dist/types/components/xv-mega-menu/xv-mega-menu.d.ts +1 -0
- package/dist/types/components.d.ts +2 -2
- package/dist/xv-webcomponents/{p-9607a965.entry.js → p-9cfe81d4.entry.js} +2 -2
- package/dist/xv-webcomponents/p-9cfe81d4.entry.js.map +1 -0
- package/dist/xv-webcomponents/xv-webcomponents.esm.js +1 -1
- package/package.json +1 -1
- package/dist/xv-webcomponents/p-9607a965.entry.js.map +0 -1
|
@@ -77633,11 +77633,25 @@ const XvDropdown = class {
|
|
|
77633
77633
|
// Needs to wait next Javascript tik
|
|
77634
77634
|
setTimeout(() => {
|
|
77635
77635
|
const options = this.el.querySelectorAll(DropdownItemSelector);
|
|
77636
|
+
let selectedValues;
|
|
77637
|
+
if (this.multiple) {
|
|
77638
|
+
selectedValues = Array.isArray(this.defaultValue) ? this.defaultValue : [this.defaultValue];
|
|
77639
|
+
}
|
|
77640
|
+
else {
|
|
77641
|
+
if (Array.isArray(this.defaultValue)) {
|
|
77642
|
+
console.warn('xv-dropdown-v2: defaultValue should be a single value when "multiple" is false.');
|
|
77643
|
+
}
|
|
77644
|
+
selectedValues = [Array.isArray(this.defaultValue) ? this.defaultValue[0] : this.defaultValue];
|
|
77645
|
+
}
|
|
77646
|
+
const selectedSet = new Set(selectedValues);
|
|
77636
77647
|
index$1.forEach(options, (option) => {
|
|
77648
|
+
const value = option.getAttribute('value');
|
|
77649
|
+
if (!value)
|
|
77650
|
+
return; // skip options without value
|
|
77637
77651
|
const dropdownItemData = {
|
|
77638
|
-
value
|
|
77639
|
-
text: option.innerText,
|
|
77640
|
-
selected:
|
|
77652
|
+
value,
|
|
77653
|
+
text: option.innerText || '',
|
|
77654
|
+
selected: selectedSet.has(value),
|
|
77641
77655
|
};
|
|
77642
77656
|
if (dropdownItemData.selected) {
|
|
77643
77657
|
index$1.setAttr(option, 'selected', dropdownItemData.selected);
|
|
@@ -77726,7 +77740,7 @@ const XvDropdown = class {
|
|
|
77726
77740
|
}
|
|
77727
77741
|
/* endregion Search methods */
|
|
77728
77742
|
render() {
|
|
77729
|
-
return (index.h(index.Host, { key: '
|
|
77743
|
+
return (index.h(index.Host, { key: '6d46bad2d26a51c8fee8903c0a67a18a57ef174a', class: { 'xv-dropdown': true, [this.variant]: !!this.variant }, role: "combobox", size: this.size, open: this.open, error: !!this.error, disabled: this.disabled, tabindex: this.disabled ? -1 : false }, (this.label || this.info) && (index.h("label", { key: 'c40255b7f9a2101e7fcc4d4b1f6fe7124110d49b', class: "label" }, index.h("slot", { key: '0ecb8341d6209bc6fe564e153f79c2501f25c579', name: "label" }, this.label), this.info && index.h("xv-tooltip-v2", { key: '946b109edb9678934ee5f2cbb802e8533ff0da05', class: "label_info", message: this.info }))), index.h("div", { key: '0af39b93f9033bc984c9e62199e50611c16db1f3', class: "xv-dropdown-control control", onClick: this.handleOpen }, (this.multiple && this.selectedMap.size > 0) && (index.h("xv-tag-v2", { key: '95d7a2b32dcde1b81ff2ea72a953c0b8b53eb7a9', class: "control_count", onCloseClick: this.clearHandle, closeable: !this.required, bg: "var(--background-inverse)", color: "var(--icon-inverse)" }, this.selectedMap.size)), this.selected.length ? (index.h("p", { class: "control_value" }, this.selected.join(', '))) : (index.h("p", { class: "control_placeholder" }, this.placeholder || '')), this.renderIcon(), index.h("svg", { key: 'f653ff1120571a8afa62a029c305d7752fcdca09', class: "control_arrow", focusable: "false", preserveAspectRatio: "xMidYMid meet", xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", "aria-hidden": "true", width: "16", height: "16", viewBox: "0 0 16 16" }, index.h("path", { key: '7627257dd3ffbee13b9fc1eeedac6361cec229ea', d: "M8 11L3 6 3.7 5.3 8 9.6 12.3 5.3 13 6z" }))), this.open && index.h("div", { key: '37a7842477747b253198c3b7cb7cc5bb84361a0a', class: "options" }, this.search && (index.h("div", { key: '4f274a69620ae530e56ce40c9b2459be28e92b84', class: "options_search" }, index.h("xv-text-input-v2", { key: '9e4781ac99f8dd1c43325167b4bb0204c9c39aff', type: "search", block: true, autocomplete: "off", size: this.size, value: this.searchQuery, placeholder: this.searchPlaceholder, onValueChange: this.handleSearchInput }))), index.h("slot", { key: "xv-dropdown-options" })), (this.helper || typeof this.error === 'string' || this.warning) && (index.h("p", { key: 'e5ef31b06e062e536f53256bc2dbfddeba205c47', class: "helper" }, this.error || this.warning || this.helper))));
|
|
77730
77744
|
}
|
|
77731
77745
|
componentWillLoad() {
|
|
77732
77746
|
this.setDefaultValues();
|
|
@@ -77924,18 +77938,32 @@ const Xvfooter = class {
|
|
|
77924
77938
|
constructor(hostRef) {
|
|
77925
77939
|
index.registerInstance(this, hostRef);
|
|
77926
77940
|
}
|
|
77927
|
-
handleLoadData() {
|
|
77941
|
+
async handleLoadData() {
|
|
77928
77942
|
var _a;
|
|
77929
|
-
|
|
77930
|
-
const
|
|
77931
|
-
|
|
77932
|
-
|
|
77933
|
-
|
|
77934
|
-
|
|
77935
|
-
|
|
77936
|
-
|
|
77937
|
-
|
|
77938
|
-
|
|
77943
|
+
const baseUrl = 'https://xvsitefinitystorage.blob.core.windows.net/production/components/xv-footer/';
|
|
77944
|
+
const brand = ((_a = index$1.getMetaNav()) === null || _a === void 0 ? void 0 : _a.WhitelabelName) || 'Xv';
|
|
77945
|
+
try {
|
|
77946
|
+
const res = await fetch(`${baseUrl}xv-footer.data.${brand}.json`);
|
|
77947
|
+
if (!res.ok)
|
|
77948
|
+
throw new Error(`HTTP ${res.status}`);
|
|
77949
|
+
this.data = await res.json();
|
|
77950
|
+
return;
|
|
77951
|
+
}
|
|
77952
|
+
catch (err) {
|
|
77953
|
+
console.warn(`Failed to fetch footer data for ${brand}, using fallback:`, err);
|
|
77954
|
+
if (brand === 'Xv')
|
|
77955
|
+
return; // No need to fallback if already trying default brand
|
|
77956
|
+
}
|
|
77957
|
+
// Fallback to default brand
|
|
77958
|
+
try {
|
|
77959
|
+
const fallbackRes = await fetch(`${baseUrl}xv-footer.data.Xv.json`);
|
|
77960
|
+
if (!fallbackRes.ok)
|
|
77961
|
+
throw new Error(`HTTP ${fallbackRes.status}`);
|
|
77962
|
+
this.data = await fallbackRes.json();
|
|
77963
|
+
}
|
|
77964
|
+
catch (finalErr) {
|
|
77965
|
+
console.error('Fallback footer load failed:', finalErr);
|
|
77966
|
+
}
|
|
77939
77967
|
}
|
|
77940
77968
|
componentWillLoad() {
|
|
77941
77969
|
this.handleLoadData();
|
|
@@ -77943,7 +77971,7 @@ const Xvfooter = class {
|
|
|
77943
77971
|
render() {
|
|
77944
77972
|
const { categories, socials, logo, legalLinks, payments, partners, advantages } = this.data || {};
|
|
77945
77973
|
const hasDataLength = ((categories === null || categories === void 0 ? void 0 : categories.length) || (partners === null || partners === void 0 ? void 0 : partners.length) || (payments === null || payments === void 0 ? void 0 : payments.length) || (socials === null || socials === void 0 ? void 0 : socials.length));
|
|
77946
|
-
return (index.h("footer", { key: '
|
|
77974
|
+
return (index.h("footer", { key: 'd2f3c0b5b446ea8e72e3d6a47873767e96986a37', class: "xv-footer" }, (advantages === null || advantages === void 0 ? void 0 : advantages.length) > 0 && (index.h("div", { key: '2d5a279cc43f7f5a81fe967f88d916bc6a571687', class: "xv-footer-advantages" }, index.h("div", { key: 'dd500002c100990bc3f2afced3a8e226dd4a2d06', class: "container" }, this._renderFooterList(advantages, { itemWithLabel: true })))), hasDataLength && (index.h("div", { key: 'b1ea6fa7e57c467369804c47e0f12ce69ee80acc', class: "container" }, index.h("div", { key: 'ae9171e321a11968a971eaae998f1d5103da5f0f', class: "row xv-footer-y-spacing" }, index.h("div", { key: '1a24634c4a1a6f098889b953d9ec2b5d9bd50955', class: "col-sm-12 col-md-8" }, index.h("ul", { key: '9d579504251ee6e31266ec03d3811be95f0eb7f2', class: "xv-footer-categories" }, categories === null || categories === void 0 ? void 0 : categories.map((category) => (index.h("li", null, index.h("p", { class: "xv-label-02" }, category.label), index.h("ul", { class: "xv-footer-routes" }, category.routes.map((item) => (index.h("li", null, index.h("a", { class: "xv-body-compact-02", href: item.href, target: item.target }, item.label)))))))))), index.h("div", { key: '96499913d1790f5403b51de5eaf729b1fa5c1b4d', class: "col-sm-12 col-md-3 col-md-push-1" }, this._renderFooterList(partners, { label: 'crossvertise Partner' }), this._renderFooterList(payments, { label: 'Bequem und sicher bezahlen' }), this._renderFooterList(socials, { label: 'Folgen Sie uns', isRow: true }))))), (legalLinks === null || legalLinks === void 0 ? void 0 : legalLinks.length) > 0 && (index.h("div", { key: 'e02473308d044fe1470455d7d32b8c989e8edcbe', class: "xv-footer-legal" }, index.h("div", { key: '834de7c7eb1257e3d6694dea8801a596360e0e81', class: "container" }, index.h("div", { key: 'c41da3fb43d15b880af4cc79f58df5abedf8f070', class: "xv-footer-legal-row" }, logo && (index.h("a", { key: '87a5129a30c11337917be26214df91fb5be882fe', class: "xv-footer-logo", href: logo.href, target: logo.target }, logo.label && index.h("span", { key: '8c33fc1b69dc106aeccba22cdaebccc3225ff88f', class: "xv-label-02" }, logo.label), index.h("img", { key: '9b24f578fbd6c4ed12aaa8166d33168b69834cb8', loading: "lazy", src: logo.image, alt: logo.label }))), index.h("ul", { key: '06967e54963d7bdb342bf211571c0d7e087f1884' }, legalLinks.map((item) => index.h("li", null, index.h("a", { class: "xv-helper-text-02", href: item.href, target: item.target }, item.label))))))))));
|
|
77947
77975
|
}
|
|
77948
77976
|
_renderFooterList(items = [], opt) {
|
|
77949
77977
|
if (!(items === null || items === void 0 ? void 0 : items.length))
|
|
@@ -78209,9 +78237,9 @@ const XvHeader = class {
|
|
|
78209
78237
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19;
|
|
78210
78238
|
const baseUrl = window.location.origin;
|
|
78211
78239
|
const isMegaMenuEnabled = !!(((_a = this.metaNav) === null || _a === void 0 ? void 0 : _a.EnableMegaMenu) || this.megaMenu);
|
|
78212
|
-
return (index.h("div", { key: '
|
|
78213
|
-
_w.map(item => (index.h("li", null, index.h("a", { href: item.Url, target: item.Target || '_self' }, index.h("i", { class: item.CssClass }), "\u00A0", item.Text)))), ((_x = this.metaNav) === null || _x === void 0 ? void 0 : _x.IsManager) && (index.h("li", { key: '
|
|
78214
|
-
_8.map(item => (index.h("li", null, index.h("a", { href: item.Url, target: item.Target || '_self' }, index.h("i", { class: item.CssClass }), item.Text)))), index.h("li", { key: '
|
|
78240
|
+
return (index.h("div", { key: '8edc85b9012e9d471ef313c7599eeda7c31f6ce9', id: "nav-container", class: "xv-header" }, index.h("nav", { key: '9f15b8b4d505761666da7dc3e1151e42b6b21168', class: "navbar navbar-default navbar-fixed-top backend-force-relative" }, index.h("div", { key: '140422372855e067def455c5db5261fe684a4771', class: "generic-wrapper" }, index.h("div", { key: '95dac0a0d8aebfa0167244ab8bbcae675ba65a76', class: "container" }, index.h("div", { key: 'd3cc7d55e230f53ffb6e54ba5ba12ec4999190f1', class: "xv-header-row" }, index.h("div", { key: '7561d9396c8ce8042194198aa79e6eabcd468d44', class: "xv-header-col xv-header-col--left" }, index.h("div", { key: '7af279c51931636338b7f81ee21086bea72a6af0', class: "navbar-header" }, index.h("button", { key: 'ddc352dde34d81dfbed2764d2741daff9f576139', class: "btn btn-default navbar-toggle pull-left navbar-btn", onClick: this.toggleMobMenu }, index.h("i", { key: '18cf4c517de3194e777064554c414ffbbc630444', class: "fa fa-bars fa-lg", "aria-hidden": "true" })), index.h("div", { key: '4969645e91b342d2e09f1edf31408b1f1bb9f5ae', class: "visible-xs-inline visible-sm-inline" }, index.h("a", { key: 'c4eae4944a964b49c18adbb7f03565d3bfa9b9f2', href: `${baseUrl}/`, class: "navbar-brand" }, index.h("img", { key: '72c07af038c7382f171e5e892c1ce2c509aee861', src: this.getSmallLogoUrl(), alt: "Crossvertise" }))), index.h("div", { key: 'd740a48868612b5ca7e10a54e10fa8b7538bb3c9', class: "hidden-xs hidden-sm" }, index.h("a", { key: '53e776f301c171097cbaac2beee1d91acafe1ce4', href: `${baseUrl}/`, class: "navbar-brand" }, index.h("img", { key: 'a9d7b9f7a1d24bcb530582f4703da293821af96d', loading: "lazy", src: this.getLogoUrl(), alt: "Crossvertise" })))), this.orgUnit && (index.h("xv-link-v2", { key: 'e76b5221793753595738d01768c4ac48ea56a223', size: "lg", class: "xv-header--link-no-visited", variant: "standalone", href: "/de-de/mycrossvertise" }, this.orgUnit))), index.h("div", { key: 'a1ebb049a8a6c99914a4d20ee1d7dec8f054a6c8', class: "xv-header-col xv-header-col--right" }, index.h("ul", { key: 'dbafb579718f3c992a974dad2ae298c94a69c1f5', class: "nav nav-pills nav-meta pull-right" }, ((_b = this.metaNav) === null || _b === void 0 ? void 0 : _b.ImpersonationInfo) && (index.h("li", { key: 'dfd3d3545255add81d054c3dde3ec449654f4814' }, index.h("div", { key: '2505edd14fee5b90e0919722a91f83d3163ac2bb', class: "btn btn-link navbar-btn navbar-btn-cust hidden-xs", onClick: this.togglePopover }, index.h("i", { key: '55d1bb531d4d0c661b882119feeba78840b9fa6b', class: "fa fa-user" }), index.h("i", { key: 'b5c6cdc79b16eb802029593e8dac15d29c2c5923', class: "fa fa-exchange-alt" })), index.h("div", { key: '6e8a9cb7fc73dda080543de1988ed08999d34e90', class: "popover popover-fixed fade bottom in", style: { "display": this.showPopover ? "block" : "none" } }, index.h("div", { key: '780eb7c8969cb871a16d71d72cb866688ba612e3', class: "arrow" }), index.h("h3", { key: 'b0be23dc00bd544ea1acf8774b86ae756549c22c', class: "popover-title" }, "Momentan ist die Kundenperspektive aktiviert f\u00FCr:"), index.h("div", { key: '86d2069989cc323abd7e7dbbf4259469b071663d', class: "popover-content" }, index.h("div", { key: 'b66e30f43a8ac3152dfd2b1c27c747b80d8338ae', class: "row" }, index.h("div", { key: '9a9c40b5259510c622f358eb7927d889562e775d', class: "col-xs-12" }, index.h("table", { key: '29362d0eb84eda92fab1c6c0e26f34e76529f8ca', class: "table-condensed" }, index.h("tbody", { key: '19d8dde342252eaf8e9d3d2bcd43bbeb34821373' }, index.h("tr", { key: 'e63edbc0f577cc476b5de4210c79c02a24030006' }, index.h("td", { key: '742fd0954eb54b816fc5e855d0e89fca37a2de36' }, index.h("span", { key: 'ef1929bf7564dbc4bd8e76b20d5a3a8f274dc578' }, (_d = (_c = this.metaNav) === null || _c === void 0 ? void 0 : _c.ImpersonationInfo) === null || _d === void 0 ? void 0 : _d.NameAndTitle))), index.h("tr", { key: '91525c6a4e18b047dd327c719ad4a4c2ff966811' }, index.h("td", { key: 'b35cbc342fa516ffb96dfb7aa03ff2204237f18d' }, index.h("span", { key: 'ba585bcfeb076a5fdb2511d4fda2e62995380d5b' }, (_f = (_e = this.metaNav) === null || _e === void 0 ? void 0 : _e.ImpersonationInfo) === null || _f === void 0 ? void 0 : _f.CompanyName))), index.h("tr", { key: '3c4570f61245377f4a1c0a3da74c33535117de1b' }, index.h("td", { key: 'd61180f241529aff8b64aeef1205119c96ab4a08' }, index.h("span", { key: '6750544669f4046f3354b530534d34b7e71292fd' }, (_h = (_g = this.metaNav) === null || _g === void 0 ? void 0 : _g.ImpersonationInfo) === null || _h === void 0 ? void 0 : _h.Email))), index.h("tr", { key: 'bd791540d3629b1bd80938ef9e85cd6030fab181' }, index.h("td", { key: '9a76d23e1b3ec338621f3c8d6c701eae89fbef76' }, index.h("span", { key: '68ea39dbc57a902d8c58df0c2f4ecf8ecd8758fd' }, (_k = (_j = this.metaNav) === null || _j === void 0 ? void 0 : _j.ImpersonationInfo) === null || _k === void 0 ? void 0 : _k.PhoneOffice)))))))), index.h("div", { key: 'fce00d420cf918faa3b9d21f1206982818a9f60d', class: "row contact-contactform-container", id: "contact-contactform-container-nav" }, index.h("div", { key: '4ea5771774596d8e1bb814640fcdcc48cbd606a9', class: "col-xs-12" }, index.h("a", { key: '2ddf3d572bb1e0952df96500f1e35e4ffc3d46fb', class: "btn btn-primary btn-block", href: "/de-de/mycrossvertise/account/clearimpersonation" }, "Kundenperspektive verlassen")))))), index.h("li", { key: '3fa24a8a829f03ff24317150c7112eabfbe4db44' }, index.h("a", { key: '9ea9233728f001f37cf9c0736b5741093b3d6f95', class: "btn btn-link navbar-btn hidden-xs", href: "https://www.crossvertise.com/ueber-uns/kontakt" }, "Kontakt"), index.h("a", { key: '5c7a7a89d960f814f21446f471063ba1863591b4', href: "/contact", class: "btn btn-link navbar-btn hidden-xs", style: { display: 'none' } }, "Kontakt"), index.h("a", { key: '0c890cad0dc344cfce16dab7c253a5923a2e8078', class: "btn btn-default btn-link navbar-btn visible-xs hidden-xxs", href: "#" }, index.h("i", { key: '91db21122671eac3c3854e83edffa3b899ca6009', class: "fa fa-phone" }))), ((_l = this.metaNav) === null || _l === void 0 ? void 0 : _l.IsManager) && (index.h("li", { key: '237c4f5c124bdae1a4db87bafea0c488876a4998', class: "dropdown", "data-bind": "visible: $root.isManager", id: "notifications-dropdown" }, index.h("a", { key: 'f74d6ffa120fcd69bdee88294c7842acf248e1a3', id: "notifications-dropdown-toggle", "data-target": "#", class: "dropdown-toggle btn navbar-btn btn-link", "data-toggle": "dropdown", role: "button", "data-container": "body", "aria-haspopup": "true", "aria-expanded": "false" }, index.h("i", { key: '5a1aa6aace28120aec666826f205f10e777c2f3d', class: "fas fa-bell fa-lg" }), this.notificationsCount > 0 && (index.h("span", { key: '8a8cd255e28cf5898a2b588398ca3094f468590f', id: "notifications-count", class: "badge badge-success badge-top-right" }, this.notificationsCount))), this.notificationsHtml && (index.h("ul", { key: 'cdc13585ec8573de235aeb15a420cb607ee732f0', id: "notifications-menu", class: "dropdown-menu dropdown-menu-left notification-panel" }, index.h("div", { key: '32e6dc2604a3a8dc935c4504fa355ae672000494', class: "notification-body", id: "notification-body" }, index.h("div", { key: '40579dad2e356dd8a94f37006c1dbc1f8d4255e2', class: "notifications", innerHTML: this.notificationsHtml })))))), ((_m = this.metaNav) === null || _m === void 0 ? void 0 : _m.IsAuthenticated) && (index.h("li", { key: 'be8c1a3f229b67a0b22257fef4ffca8a2dfea2cb', class: "dropdown", id: "my-xv-menu" }, index.h("a", { key: '3f3c5c6cbceb3602c60ac1ea2adf7406470204f4', class: "dropdown-toggle btn navbar-btn btn-link", "data-toggle": "dropdown", role: "button", "data-container": "body", "aria-haspopup": "true", "aria-expanded": "false" }, index.h("i", { key: 'a974625a2d043174682e5b8ba5bb050804712b72', class: "fa fa-user fa-lg text-success", "aria-hidden": "true" }), "\u00A0", index.h("span", { key: '5f7124e458b51937e4babfeb2eaee1693c3f730c', class: "hidden-xs" }, (_o = this.metaNav) === null || _o === void 0 ? void 0 : _o.UserMenuText), "\u00A0", index.h("span", { key: '939d60b2115bfb1c80a5f46ebdb4bfe3d3a0281c', class: "caret" })), index.h("ul", { key: 'adaebe4fca562765c0d024619558baabeacbdf05', class: "dropdown-menu-left dropdown-menu navbar-myxv" }, ((_p = this.metaNav) === null || _p === void 0 ? void 0 : _p.IsManager) && (index.h("li", { key: '71746dfed0b9d41707da3cf7a0f3309916e3b428' }, index.h("a", { key: '456e5c0309c0dcd5fbba40e636e82fd895aa926c', onClick: () => this.toggleCockpitMenu() }, index.h("i", { key: 'c0f83cc0c4d329b47dc184daa802d785ec02f217', class: "fa fa-tachometer-alt fa-fw" }), "\u00A0Cockpitfunktionen \u00A0", index.h("i", { key: '4db3c2a99ebc9519cda5fd7cf54121bb98a95b5c', class: "fa fa-caret-down" })))), this.isCockpitMenuExpanded && ((_r = (_q = this.metaNav) === null || _q === void 0 ? void 0 : _q.ManagerCockpitMenu) === null || _r === void 0 ? void 0 : _r.map(item => (index.h("li", { class: 'user-menu-item' }, index.h("a", { href: item.Url, target: item.Target || '_self' }, index.h("i", { class: item.CssClass }), "\u00A0\u00A0", item.Text))))), ((_s = this.metaNav) === null || _s === void 0 ? void 0 : _s.IsManager) && (index.h("li", { key: '89d5135fcf766dec40c64e97a1f943b74b210e7d' }, index.h("a", { key: '8d9a2a6c15e7e6e8cb93dca2bd6ba55d93de1661', onClick: () => this.toggleEntitiesMenu() }, index.h("i", { key: 'ee03bbfaa86d73aa241e87a13901accd5e014938', class: "fa fa-cubes" }), "\u00A0Entit\u00E4ten \u00A0", index.h("i", { key: 'bcf2ae7add852d1c356d41667c81b03af720ff83', class: "fa fa-caret-down" })))), this.isEntitiesMenuExpanded && ((_u = (_t = this.metaNav) === null || _t === void 0 ? void 0 : _t.ManagerEntitiesMenu) === null || _u === void 0 ? void 0 : _u.map(item => (index.h("li", { class: 'user-menu-item' }, index.h("a", { href: item.Url, target: item.Target || '_self' }, index.h("i", { class: item.CssClass }), item.Text))))), (_w = (_v = this.metaNav) === null || _v === void 0 ? void 0 : _v.ManagerMenu) === null || _w === void 0 ? void 0 :
|
|
78241
|
+
_w.map(item => (index.h("li", null, index.h("a", { href: item.Url, target: item.Target || '_self' }, index.h("i", { class: item.CssClass }), "\u00A0", item.Text)))), ((_x = this.metaNav) === null || _x === void 0 ? void 0 : _x.IsManager) && (index.h("li", { key: 'd6ed833bd15cfc7490a3a30e6ddaa3db976de470', role: "separator", class: "divider" })), ((_y = this.metaNav) === null || _y === void 0 ? void 0 : _y.IsManager) && (index.h("li", { key: 'b816ee95ff07a709abec4a13d269feb4790a8c4b' }, index.h("a", { key: '611f6474244f0b736737c938ea5737ec2de7c346', onClick: () => this.toggleUserMenu() }, index.h("i", { key: 'b8c57eb2cf89a2fc021ee4ec0bf1c3fc60b22b35', class: "fa fa-user" }), "\u00A0Mein Crossvertise \u00A0", index.h("span", { key: 'de4096acd2b08a6ffce03542e045d56b988df791', class: "badge" }, (_z = this.metaNav) === null || _z === void 0 ? void 0 : _z.PendingItems), index.h("i", { key: '4fd1e9a5f2ff723797448ef51878c877ac68dd37', class: "fa fa-caret-down" })))), this.isUserMenuExpanded && ((_1 = (_0 = this.metaNav) === null || _0 === void 0 ? void 0 : _0.UserMenu) === null || _1 === void 0 ? void 0 : _1.map(item => (index.h("li", { class: 'user-menu-item' }, index.h("a", { href: item.Url, target: item.Target || '_self', class: "user-menu-item-link" }, index.h("i", { class: item.CssClass }), item.Text, "\u00A0", item.BadgeText && (index.h("span", { class: "badge" }, item.BadgeText))))))), ((_3 = (_2 = this.metaNav) === null || _2 === void 0 ? void 0 : _2.ImpersonationInfo) === null || _3 === void 0 ? void 0 : _3.isImpersonated) && (index.h("li", { key: '1988c481e6a4a21d88da2fe5112998c79b9496ad', class: 'user-menu-item' }, index.h("a", { key: 'ef702794f0e0a1e387ad96d35c4ff261120d41ba', href: (_5 = (_4 = this.metaNav) === null || _4 === void 0 ? void 0 : _4.ImpersonationInfo) === null || _5 === void 0 ? void 0 : _5.ClearImpersonationUrl }, index.h("i", { key: '6ad80f14b178ac68b06a366e748b60fed7f8cdb5', class: "fa fa-exchange-alt" }), "Kundenperspektive verlassen"))), ((_6 = this.metaNav) === null || _6 === void 0 ? void 0 : _6.IsManager) && (index.h("li", { key: '59a7529def30092c195366d1c2d7c670407350ec', role: "separator", class: "divider" })), (_8 = (_7 = this.metaNav) === null || _7 === void 0 ? void 0 : _7.ActionsMenu) === null || _8 === void 0 ? void 0 :
|
|
78242
|
+
_8.map(item => (index.h("li", null, index.h("a", { href: item.Url, target: item.Target || '_self' }, index.h("i", { class: item.CssClass }), item.Text)))), index.h("li", { key: '8ed29cc336eecb8cd1e2bd19f534baf0188ca239' }, index.h("a", { key: '918277a87ac19364406191ddeeee4170ec0d75bb', href: `${this.getBaseUrl()}/de-de/mycrossvertise/account/logoff?returnUrl=${window.location.hostname}` }, index.h("i", { key: 'a2acc3d0ae29c73d5240006bad82bb7423929d36', class: "fa fa-sign-out-alt fa-fw", "aria-hidden": "true" }), "Logout"))))), !((_9 = this.metaNav) === null || _9 === void 0 ? void 0 : _9.IsAuthenticated) && (index.h("li", { key: 'db31b8f1d4478fd3521572d65eb100acde8888b9', class: "hidden-md hidden-lg" }, index.h("a", { key: '38028d1b8120b4606bec21d9dff7ea1412e3f508', class: "btn btn-default navbar-btn btn-link mob-login", href: "/de-de/mycrossvertise/account/logon" }, index.h("i", { key: '9ae831ed8581328c7df47a95bb4a3d80600bae4a', class: "fa fa-user fa-lg", "aria-hidden": "true" })))), index.h("xv-login-modal", { key: 'b76bcf7f0f437b136921eef5aee8c1fd8a6a6d39', visible: this.showLoginModal, onClose: this.closeLoginModal }), !((_10 = this.metaNav) === null || _10 === void 0 ? void 0 : _10.IsAuthenticated) && (index.h("li", { key: '58d5c3d0cbc27e1b65d132824f036c0d057094fc', class: "hidden-xs hidden-sm" }, index.h("a", { key: '600070ffa48877bbfa72c4d08c01295d5545a89b', role: "button", onClick: this.openLoginModal, class: "btn btn-default navbar-btn btn-link" }, index.h("i", { key: 'c10e207991d53f458a57c9b5e938b63c870870a9', class: "fa fa-user fa-lg", "aria-hidden": "true" }), index.h("span", { key: '8c9bf0b884a1ef31df59329000635480d5f36ba8', class: "padding-sm-left" }, "Login")))), !((_11 = this.metaNav) === null || _11 === void 0 ? void 0 : _11.IsAuthenticated) && (index.h("li", { key: '7a9b74e207a2c146c0db633e2be18217a16a8796', class: "hidden-xs" }, index.h("a", { key: 'dbdb528f55104ee79549125823ded21ff1624114', class: "btn btn-default navbar-btn btn-link", href: "/de-de/mycrossvertise/account/register" }, index.h("span", { key: 'abf6c046531f94b49c68cce94609fb8b4564ea1c' }, "Registrieren")))), index.h("li", { key: '690976a1e682cd5aa3177d38213d4c45188283c2', class: "navbar-divider hidden-xs" }), index.h("li", { key: '09cb11c7de09f2e23477a4468808dd0e016d6448' }, index.h("xv-button-v2", { key: 'f1f9732f04d05948b8475fba25f03fd93bbe3fa8', class: "navbar-btn", variant: 'accent', onClick: () => window.location.href = '/de-de/mycrossvertise/shoppingcart/activecart' }, index.h("span", { key: 'd6d223442fcb1e59988a49004505a3d043156581', class: "xv-font-icon-warenkorb fa-lg fa-fw", "aria-hidden": "true" }), index.h("span", { key: 'e6126e3e51b1231a1891587e9a9db67826050c41', class: "hidden-xs hidden-sm" }, "\u00A0Warenkorb\u00A0"), index.h("xv-tag-v2", { key: 'ab99fd2a26f5f15956e4d62245524864b0a404c9', id: "shopping-cart-items-badge", size: 'sm', bg: "var(--background)", color: "var(--icon-interactive)" }, ((_13 = (_12 = this.metaNav) === null || _12 === void 0 ? void 0 : _12.Cart) === null || _13 === void 0 ? void 0 : _13.NumberOfItems) || 0)))))))), index.h("div", { key: '2fd5f56bd12cd30e5db5931d58be0265ba34b4f6', class: "collapse hidden-md hidden-lg", id: "search-collapse" }, index.h("div", { key: 'fdbd352cc74621c9da66c4a4407ad5bd5a0c299d', class: "container" }, index.h("form", { key: '395d38cee92b9433dc19323c7eec4a2c4f2e3f7d', action: "/de-de/media/search", class: "navbar-form", method: "get", role: "search" }, index.h("div", { key: '9f5077b7ffda17da8994fe31114a500b6c0e47f4', class: "input-group" }, index.h("input", { key: 'a546fef6304e0d60d4cd4e29d6d6d2e0e8924382', class: "form-control", name: "Q", placeholder: "Suche", type: "text", autocomplete: "off" }), index.h("span", { key: '2d809b38c84bc16ff152c3fc757a945d9f9f02ff', class: "input-group-btn force-full-width" }, index.h("button", { key: 'c81fc700db6663423436c5f2cc3b94454d4e7bf8', class: "btn btn-default search-addon", type: "submit" }, index.h("i", { key: '22042e265cbc2c0857f721f6c53b34ad21373600', class: "fa fa-search", "aria-hidden": "true" }))))))), isMegaMenuEnabled && (index.h("div", { key: '5ec06c26bc28f185434038b3f662bc280c817826', class: "xv-header-nav xv-header-nav--shadow" }, index.h("div", { key: 'af1f96a72ea35e82722174b17a99ca1bdeea3dc2', class: "container" }, index.h("xv-mega-menu", { key: '35a1d19e30f45ca9e04fdf554c457edff7f01ba3', open: this.mobMenuOpen, onOpenChange: this.closeMobMenu }, ((_14 = this.metaNav) === null || _14 === void 0 ? void 0 : _14.EnableMegaMenuSearch) || isMegaMenuEnabled && (index.h("div", { key: 'add19e819a3b76cb19529d87c0caf335bf4329cd', slot: "menu-right", innerHTML: this.htmlSearchForm }))))))), !isMegaMenuEnabled && (index.h("div", { key: '5df9b9aadc2570244ea6d17a8b9793beaec455ee', innerHTML: this.htmlContent })), ((_15 = this.metaNav) === null || _15 === void 0 ? void 0 : _15.EnableMegaMenuSearch) || isMegaMenuEnabled && (index.h("ul", { key: '052b13f3d38352d56d18ad3b49958ceb37fca69a', class: "ui-autocomplete ui-front ui-menu ui-widget ui-widget-content ui-corner-all", id: "xv-search-suggestions", style: {
|
|
78215
78243
|
width: `${(_16 = this.listPosition) === null || _16 === void 0 ? void 0 : _16.width}px`,
|
|
78216
78244
|
top: `${(_17 = this.listPosition) === null || _17 === void 0 ? void 0 : _17.top}px`,
|
|
78217
78245
|
left: `${(_18 = this.listPosition) === null || _18 === void 0 ? void 0 : _18.left}px`,
|
|
@@ -78259,8 +78287,7 @@ const XvHeader = class {
|
|
|
78259
78287
|
}
|
|
78260
78288
|
const data = await response.json();
|
|
78261
78289
|
if (Array.isArray(data) && data.length > 0) {
|
|
78262
|
-
|
|
78263
|
-
this.notificationsHtml = result;
|
|
78290
|
+
this.notificationsHtml = data.reduce((acc, notification) => acc + ((notification === null || notification === void 0 ? void 0 : notification.template) || ''), '');
|
|
78264
78291
|
this.notificationsCount = data.length;
|
|
78265
78292
|
}
|
|
78266
78293
|
else {
|
|
@@ -78527,56 +78554,33 @@ const XvMegaMenu = class {
|
|
|
78527
78554
|
navActionClick(action) {
|
|
78528
78555
|
window.location.href = action.url;
|
|
78529
78556
|
}
|
|
78557
|
+
getEnvFromHost() {
|
|
78558
|
+
if (typeof window === 'undefined')
|
|
78559
|
+
return 'qa';
|
|
78560
|
+
const host = window.location.hostname;
|
|
78561
|
+
if (host.includes('localhost') || host.includes('127.0.0.1'))
|
|
78562
|
+
return 'qa';
|
|
78563
|
+
if (host.includes('qa.') || host.includes('komsa-test'))
|
|
78564
|
+
return 'qa';
|
|
78565
|
+
if (host.includes('staging.'))
|
|
78566
|
+
return 'staging';
|
|
78567
|
+
return 'release';
|
|
78568
|
+
}
|
|
78530
78569
|
async fetchMenuData() {
|
|
78531
78570
|
var _a, _b;
|
|
78532
|
-
if (typeof fetch !== 'function')
|
|
78571
|
+
if (typeof window === 'undefined' || typeof fetch !== 'function')
|
|
78533
78572
|
return [];
|
|
78534
78573
|
try {
|
|
78535
|
-
const
|
|
78536
|
-
|
|
78537
|
-
|
|
78538
|
-
const
|
|
78539
|
-
// --- Map hostnames to environment names ---
|
|
78540
|
-
const envMap = {
|
|
78541
|
-
'qa.crossvertise.com': 'qa',
|
|
78542
|
-
'sitefinity-qa.crossvertise.com': 'qa',
|
|
78543
|
-
'sitefinity-staging.crossvertise.com': 'staging',
|
|
78544
|
-
'www.crossvertise.com': 'release',
|
|
78545
|
-
'komsa-test.crossvertise.com': 'qa',
|
|
78546
|
-
'staging.crossvertise.com': 'staging',
|
|
78547
|
-
'market.crossvertise.com': 'release',
|
|
78548
|
-
'allianz.crossvertise.com': 'release',
|
|
78549
|
-
'philips.crossvertise.com': 'release',
|
|
78550
|
-
'komsa.crossvertise.com': 'release',
|
|
78551
|
-
};
|
|
78552
|
-
const matchedKey = Object.keys(envMap).find(h => hostname.includes(h));
|
|
78553
|
-
const env = matchedKey ? envMap[matchedKey] : 'qa';
|
|
78554
|
-
const subdomain = hostname.split('.')[0];
|
|
78555
|
-
const shouldUseBlob = subdomain === 'www' || subdomain === 'sitefinity-qa' || subdomain === 'sitefinity-staging' ||
|
|
78556
|
-
subdomain === 'market' ||
|
|
78557
|
-
(['qa', 'staging'].includes(env) && ((_a = index$1.getMetaNav()) === null || _a === void 0 ? void 0 : _a.WhitelabelName) === 'Xv');
|
|
78558
|
-
let dataUrl = '';
|
|
78559
|
-
if (shouldUseBlob) {
|
|
78560
|
-
// --- Use blob storage ---
|
|
78561
|
-
const blobEnv = env === 'qa' || env === 'staging' ? env : 'release';
|
|
78562
|
-
dataUrl = `https://xvsitefinitystorage.blob.core.windows.net/nav-sync-${blobEnv}/mega-menu.json`;
|
|
78563
|
-
}
|
|
78564
|
-
else {
|
|
78565
|
-
// --- Use API Front Door ---
|
|
78566
|
-
const isLocalhost = /^(localhost|127\.0\.0\.1)$/i.test(hostname);
|
|
78567
|
-
const baseUrl = isLocalhost
|
|
78568
|
-
? 'https://qa.crossvertise.com'
|
|
78569
|
-
: window.location.origin;
|
|
78570
|
-
dataUrl = `${baseUrl}/api-fd/v1/home/menu`;
|
|
78571
|
-
}
|
|
78572
|
-
// --- Fetch menu data ---
|
|
78573
|
-
const response = await fetch(dataUrl, {
|
|
78574
|
+
const url = (((_a = index$1.getMetaNav()) === null || _a === void 0 ? void 0 : _a.WhitelabelName) || 'Xv') === 'Xv'
|
|
78575
|
+
? `https://xvsitefinitystorage.blob.core.windows.net/nav-sync-${this.getEnvFromHost()}/mega-menu.json`
|
|
78576
|
+
: `${window.location.origin}/api-fd/v1/home/menu`;
|
|
78577
|
+
const response = await fetch(url, {
|
|
78574
78578
|
method: 'GET',
|
|
78575
78579
|
headers: { Accept: 'application/json' },
|
|
78576
|
-
credentials: 'include'
|
|
78580
|
+
credentials: 'include'
|
|
78577
78581
|
});
|
|
78578
78582
|
if (!response.ok) {
|
|
78579
|
-
console.error(`Failed
|
|
78583
|
+
console.error(`[fetchMenuData] Failed (${response.status}): ${url}`, response);
|
|
78580
78584
|
return [];
|
|
78581
78585
|
}
|
|
78582
78586
|
const result = await response.json();
|
|
@@ -78588,13 +78592,13 @@ const XvMegaMenu = class {
|
|
|
78588
78592
|
}
|
|
78589
78593
|
}
|
|
78590
78594
|
render() {
|
|
78591
|
-
return (index.h(index.Host, { key: '
|
|
78595
|
+
return (index.h(index.Host, { key: '5d6f4d453649abf5926c9fe715886b0e06ae5362' }, index.h("nav", { key: '2e8f702d25602ac8f063bba5c0165196cc177907', class: { 'xv-menu': true, open: this.open } }, this.loading && (index.h("div", { key: '760c1f7ff7f4b8d08cde9ab35551a5e5c7f81747', class: { 'xv-menu-loader': true, open: this.open } }, index.h("xv-loader-v2", { key: '5cd25ebb6e9a9bcd57d06c619f56b65cf81f4dce' }))), index.h("ul", { key: '14b36cbde6a58bd28a3ae5474a412688ad38ffb4', class: { menu: true, open: this.open } }, this.menuItems.map((menuItem) => {
|
|
78592
78596
|
var _a;
|
|
78593
78597
|
return (index.h("li", { class: { 'menu-item': true, active: menuItem.id === ((_a = this.activeItem) === null || _a === void 0 ? void 0 : _a.id) } }, index.h("p", { class: "menu-item-label", onClick: () => this.setActiveItem(menuItem) }, menuItem === null || menuItem === void 0 ? void 0 : menuItem.label), index.h("ul", { class: "menu-item-groups" }, menuItem.groups.map((group) => {
|
|
78594
78598
|
var _a, _b;
|
|
78595
78599
|
return (index.h("li", { class: { group: true, active: ((_a = this.activeGroup) === null || _a === void 0 ? void 0 : _a.id) === group.id } }, group.label && (index.h("div", { class: "group-label", onClick: () => this.setActiveGroup(group) }, index.h("span", { class: "group-label-text" }, group.label), index.h("span", { class: "group-label-icon" }))), index.h("div", { class: "group-container" }, index.h("div", { class: { 'group-container-absolute': true, noLabel: !group.label && (((_b = menuItem.groups) === null || _b === void 0 ? void 0 : _b.length) || 0) < 2 } }, index.h("div", { class: "group-menus" }, index.h("ul", { class: { 'group-menus-categories': true, inline: group.layout === 'inline' } }, group.categories.map((category) => (index.h("li", { class: "category" }, index.h("p", { class: "category-label" }, category.label), index.h("ul", { class: "category-routes" }, category.routes.map((route) => (index.h("li", { class: "route" }, index.h("xv-link-v2", { size: "lg", variant: "ghost", href: route.route || '#' }, route.label), route.tag && (index.h("xv-tag-v2", { class: "route-tag", size: "sm", color: "#161616", bg: "#E0E0E0" }, route.tag)))))))))), index.h("ul", { class: "group-menus-actions" }, group.actions.map((action) => (index.h("li", { class: "action" }, action.type === 'link' && (index.h("xv-link-v2", { variant: "standalone", href: action === null || action === void 0 ? void 0 : action.url }, action.label, index.h("span", { class: "link-chevron", slot: "icon-right" }, "\u2192"))), action.type === 'button' && index.h("xv-button-v2", { onClick: () => this.navActionClick(action), block: true, variant: "tertiary" }, action.label)))))), (group === null || group === void 0 ? void 0 : group.card) && (index.h("div", { class: "group-card" }, index.h("xv-card-v2", { media: group.card.image, variant: this.isMobile ? 'horizontal' : 'vertical' }, index.h("h5", { slot: "header", class: "group-card-title" }, group.card.title), index.h("p", { slot: "body", class: "group-card-desc" }, group.card.description), group.card.linkLabel && (index.h("xv-link-v2", { slot: "footer", variant: "standalone", href: group.card.linkUrl || '#' }, group.card.linkLabel, index.h("span", { class: "link-chevron", slot: "icon-right" }, "\u2192"))))))))));
|
|
78596
78600
|
}))));
|
|
78597
|
-
}), index.h("li", { key: '
|
|
78601
|
+
}), index.h("li", { key: 'cf826d8de6bf554b050f3c4101ef3ccb1d9c5eae', class: "menu--right" }, index.h("slot", { key: '830c2392a8700e556d028976698df7c0a6c229ac', name: "menu-right" })), this.open && (index.h("li", { key: 'b26ec8b245b5adef4bcbbdb7f873b48293989952', class: "menu--backdrop", onClick: () => this.handleClose() }))))));
|
|
78598
78602
|
}
|
|
78599
78603
|
get el() { return index.getElement(this); }
|
|
78600
78604
|
};
|