xv-webcomponents 1.3.2-qa.0 → 1.3.5-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.
@@ -78424,7 +78424,7 @@ const XvMegaMenu = class {
78424
78424
  window.location.href = action.url;
78425
78425
  }
78426
78426
  async fetchMenuData() {
78427
- var _a;
78427
+ var _a, _b;
78428
78428
  if (typeof fetch !== 'function')
78429
78429
  return [];
78430
78430
  try {
@@ -78447,13 +78447,12 @@ const XvMegaMenu = class {
78447
78447
  const subdomain = hostname.split('.')[0];
78448
78448
  const shouldUseBlob = subdomain === 'www' ||
78449
78449
  subdomain === 'market' ||
78450
- (['qa', 'staging'].includes(env) &&
78451
- document.cookie.includes('ConfigOverride=Xv'));
78450
+ (['qa', 'staging'].includes(env) && ((_a = index$1.getMetaNav()) === null || _a === void 0 ? void 0 : _a.WhitelabelName) === 'Xv');
78452
78451
  let dataUrl = '';
78453
78452
  if (shouldUseBlob) {
78454
78453
  // --- Use blob storage ---
78455
78454
  const blobEnv = env === 'qa' || env === 'staging' ? env : 'release';
78456
- dataUrl = `https://crossvertise.blob.core.windows.net/nav-sync-${blobEnv}/mega-menu.json`;
78455
+ dataUrl = `https://www-cdn.crossvertise.com/nav-sync-${blobEnv}/mega-menu.json`;
78457
78456
  }
78458
78457
  else {
78459
78458
  // --- Use API Front Door ---
@@ -78474,7 +78473,7 @@ const XvMegaMenu = class {
78474
78473
  return [];
78475
78474
  }
78476
78475
  const result = await response.json();
78477
- return (_a = result === null || result === void 0 ? void 0 : result.data) !== null && _a !== void 0 ? _a : result;
78476
+ return (_b = result === null || result === void 0 ? void 0 : result.data) !== null && _b !== void 0 ? _b : result;
78478
78477
  }
78479
78478
  catch (error) {
78480
78479
  console.error('fetchMenuData error', error);
@@ -78482,13 +78481,13 @@ const XvMegaMenu = class {
78482
78481
  }
78483
78482
  }
78484
78483
  render() {
78485
- return (index.h(index.Host, { key: 'a60b11b5822a52349d354f601ebaf6e124f919fc' }, index.h("nav", { key: 'f014c77038ee8cebd2b0ece2744dbd45e7e3ab41', class: { 'xv-menu': true, open: this.open } }, this.loading && (index.h("div", { key: '0e80752b79c0a78da74f37acb23cf8cc1fe088ed', class: { 'xv-menu-loader': true, open: this.open } }, index.h("xv-loader-v2", { key: '7878547839f70bf00fcc2cf345dee7f2ea51499a' }))), index.h("ul", { key: 'd5608c780b79b6488d6ad3afaab9e2c480ddcddd', class: { menu: true, open: this.open } }, this.menuItems.map((menuItem) => {
78484
+ return (index.h(index.Host, { key: '7ad72961e41284a6cc6142040bbe945498b8dcf5' }, index.h("nav", { key: '613b6618bf6727673808c152d1e42fc7df04a1a7', class: { 'xv-menu': true, open: this.open } }, this.loading && (index.h("div", { key: 'c162000907caa125a4926bd5b96218602bd1ae35', class: { 'xv-menu-loader': true, open: this.open } }, index.h("xv-loader-v2", { key: 'b875cea98914c00d60e7c04a53e6391aa9f8bdf0' }))), index.h("ul", { key: '6edab389bdd4400296d43e9b9ff0094733d7799a', class: { menu: true, open: this.open } }, this.menuItems.map((menuItem) => {
78486
78485
  var _a;
78487
78486
  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) => {
78488
78487
  var _a, _b;
78489
78488
  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"))))))))));
78490
78489
  }))));
78491
- }), index.h("li", { key: 'a5338da25a0d60552c8d044e13d3b0a4039d2b74', class: "menu--right" }, index.h("slot", { key: 'c5031d2f7e5721c656226ee80b34f7381823b9a1', name: "menu-right" })), this.open && (index.h("li", { key: '74189665d20a041a152771718d15f09f9f8c05cc', class: "menu--backdrop", onClick: () => this.handleClose() }))))));
78490
+ }), index.h("li", { key: 'd5ebe1654f4f25d8373b6975e29df06c41815be4', class: "menu--right" }, index.h("slot", { key: 'c3e5428ceab8efb2d3bd72ab3ac0ed5d1826b6c3', name: "menu-right" })), this.open && (index.h("li", { key: 'd428d3911d14002860012a7023d865407a86699e', class: "menu--backdrop", onClick: () => this.handleClose() }))))));
78492
78491
  }
78493
78492
  get el() { return index.getElement(this); }
78494
78493
  };