xv-webcomponents 1.24.10 → 1.24.11-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.
@@ -0,0 +1,71 @@
1
+ 'use strict';
2
+
3
+ exports.SIZE_VAR = void 0;
4
+ (function (SIZE_VAR) {
5
+ SIZE_VAR["XS"] = "xs";
6
+ SIZE_VAR["SM"] = "sm";
7
+ SIZE_VAR["MD"] = "md";
8
+ SIZE_VAR["LG"] = "lg";
9
+ SIZE_VAR["XL"] = "xl";
10
+ })(exports.SIZE_VAR || (exports.SIZE_VAR = {}));
11
+ exports.XV_SORT_DIR = void 0;
12
+ (function (XV_SORT_DIR) {
13
+ XV_SORT_DIR["ASC"] = "asc";
14
+ XV_SORT_DIR["DESC"] = "desc";
15
+ XV_SORT_DIR["NONE"] = "none";
16
+ })(exports.XV_SORT_DIR || (exports.XV_SORT_DIR = {}));
17
+
18
+ const OverflowMenuVariant = {
19
+ DEFAULT: '',
20
+ GHOST: 'ghost',
21
+ };
22
+ /** Tag used to discover menu items (roving keyboard navigation, size mirroring). */
23
+ const OverflowMenuItemSelector = 'xv-overflow-menu-v2-item';
24
+
25
+ /**
26
+ * Status of a draft-invoice notification, mirroring the platform's
27
+ * `InvoiceNotificationPayloadStatus` (Xv.Domain/Notifications/Payloads).
28
+ *
29
+ * The numeric values are the wire format: `/de-de/api/notifications/list` serializes the
30
+ * enum by ordinal, so these MUST stay in sync with the backend. The header used to compare
31
+ * `status === 1` while treating it as a failure, so a draft invoice that had been generated
32
+ * was shown with the error icon and the text "ist ausstehend" (MAR-15569).
33
+ */
34
+ var InvoiceNotificationStatus;
35
+ (function (InvoiceNotificationStatus) {
36
+ InvoiceNotificationStatus[InvoiceNotificationStatus["PENDING"] = 0] = "PENDING";
37
+ InvoiceNotificationStatus[InvoiceNotificationStatus["COMPLETED"] = 1] = "COMPLETED";
38
+ InvoiceNotificationStatus[InvoiceNotificationStatus["FAILED"] = 2] = "FAILED";
39
+ })(InvoiceNotificationStatus || (InvoiceNotificationStatus = {}));
40
+ /** Bell label per status. German only — this component carries no i18n layer. */
41
+ const INVOICE_NOTIFICATION_STATUS_TEXT = {
42
+ [InvoiceNotificationStatus.PENDING]: 'ausstehend',
43
+ [InvoiceNotificationStatus.COMPLETED]: 'generiert',
44
+ [InvoiceNotificationStatus.FAILED]: 'fehlgeschlagen',
45
+ };
46
+ /** Font Awesome icon per status. */
47
+ const INVOICE_NOTIFICATION_STATUS_ICON = {
48
+ [InvoiceNotificationStatus.PENDING]: 'fa-clock',
49
+ [InvoiceNotificationStatus.COMPLETED]: 'fa-check-circle',
50
+ [InvoiceNotificationStatus.FAILED]: 'fa-times-circle',
51
+ };
52
+ /**
53
+ * Falls back to PENDING for an unknown value so a new backend status renders as
54
+ * "waiting" rather than silently claiming success or failure.
55
+ */
56
+ function invoiceNotificationStatusOf(status) {
57
+ switch (status) {
58
+ case InvoiceNotificationStatus.COMPLETED:
59
+ return InvoiceNotificationStatus.COMPLETED;
60
+ case InvoiceNotificationStatus.FAILED:
61
+ return InvoiceNotificationStatus.FAILED;
62
+ default:
63
+ return InvoiceNotificationStatus.PENDING;
64
+ }
65
+ }
66
+
67
+ exports.INVOICE_NOTIFICATION_STATUS_ICON = INVOICE_NOTIFICATION_STATUS_ICON;
68
+ exports.INVOICE_NOTIFICATION_STATUS_TEXT = INVOICE_NOTIFICATION_STATUS_TEXT;
69
+ exports.OverflowMenuItemSelector = OverflowMenuItemSelector;
70
+ exports.OverflowMenuVariant = OverflowMenuVariant;
71
+ exports.invoiceNotificationStatusOf = invoiceNotificationStatusOf;
@@ -2,7 +2,7 @@
2
2
 
3
3
  var index$1 = require('./index-DpLAFt0R.js');
4
4
  var index$2 = require('./index-Cb30DBqk.js');
5
- var _vars = require('./_vars-DMytunQw.js');
5
+ var _vars = require('./_vars-FOITtI6f.js');
6
6
 
7
7
  const xvAccordionCss = () => `:host{display:block}`;
8
8
 
@@ -82670,12 +82670,10 @@ const XvHeader = class {
82670
82670
  var _a;
82671
82671
  if (!((_a = this.metaNav) === null || _a === void 0 ? void 0 : _a.IsManager))
82672
82672
  return null;
82673
- return (index$1.h("li", { class: "notifications" }, index$1.h("xv-overflow-menu-v2", { position: "right", size: _vars.SIZE_VAR.MD }, index$1.h("span", { slot: "trigger", class: "fa-stack" }, index$1.h("i", { class: "notifications-icon far fa-bell fa-stack-1x" }), this.notifications.length > 0 && (index$1.h("xv-tag-v2", { class: "counter-badge counter-badge--absolute", bg: "var(--icon-interactive, #97BF0D)", color: "var(--text-inverse, #FFF)" }, this.notifications.length))), this.notifications.map((notification) => (index$1.h("xv-overflow-menu-v2-item", { value: notification.id, variant: _vars.OverflowMenuVariant.GHOST, disabled: notification.isRead, clickable: false }, index$1.h("div", { class: "notifications-item" }, index$1.h("i", { class: {
82674
- far: true,
82675
- 'fa-clock': !notification.status,
82676
- 'fa-times-circle': notification.status === 1,
82677
- 'fa-circle': notification.status && notification.status !== 1,
82678
- } }), index$1.h("div", { class: "notifications-item-body" }, index$1.h("span", null, "Rechnungsentwurf f\u00FCr Auftrag ", notification.orderId, " ist ausstehend"), index$1.h("xv-link-v2", { variant: notification.isRead ? 'ghost' : 'standalone', href: `/de-de/manager/ordersales/details/${notification.orderId}` }, "Auftrag anschauen")))))))));
82673
+ return (index$1.h("li", { class: "notifications" }, index$1.h("xv-overflow-menu-v2", { position: "right", size: _vars.SIZE_VAR.MD }, index$1.h("span", { slot: "trigger", class: "fa-stack" }, index$1.h("i", { class: "notifications-icon far fa-bell fa-stack-1x" }), this.notifications.length > 0 && (index$1.h("xv-tag-v2", { class: "counter-badge counter-badge--absolute", bg: "var(--icon-interactive, #97BF0D)", color: "var(--text-inverse, #FFF)" }, this.notifications.length))), this.notifications.map((notification) => {
82674
+ const status = _vars.invoiceNotificationStatusOf(notification.status);
82675
+ return (index$1.h("xv-overflow-menu-v2-item", { value: notification.id, variant: _vars.OverflowMenuVariant.GHOST, disabled: notification.isRead, clickable: false }, index$1.h("div", { class: "notifications-item" }, index$1.h("i", { class: { far: true, [_vars.INVOICE_NOTIFICATION_STATUS_ICON[status]]: true } }), index$1.h("div", { class: "notifications-item-body" }, index$1.h("span", null, "Rechnungsentwurf f\u00FCr Auftrag ", notification.orderId, " ist ", _vars.INVOICE_NOTIFICATION_STATUS_TEXT[status]), index$1.h("xv-link-v2", { variant: notification.isRead ? 'ghost' : 'standalone', href: `/de-de/manager/ordersales/details/${notification.orderId}` }, "Auftrag anschauen")))));
82676
+ }))));
82679
82677
  }
82680
82678
  _renderAccount() {
82681
82679
  var _a, _b, _c, _d, _e, _f, _g, _h;
@@ -82700,7 +82698,7 @@ const XvHeader = class {
82700
82698
  render() {
82701
82699
  var _a, _b, _c, _d, _e;
82702
82700
  const isXvBrand = (((_a = this.metaNav) === null || _a === void 0 ? void 0 : _a['WhitelabelName']) || 'Xv') === 'Xv';
82703
- return (index$1.h("header", { key: '9477fea03faf7b1eee3a59be46a6b6efffabe7ae', class: "header" }, index$1.h("div", { key: '974c597e788966d68bbc0af46ef1c56e5d49c291', class: "header-wrapper" }, index$1.h("div", { key: 'c4efe27850b74ccaf75864abbee66e04fdd39aba', class: "xv-container" }, index$1.h("div", { key: '0dc3df2ffc4dbae8caeb996cbd6bd1293c51126f', class: "header-top" }, index$1.h("div", { key: 'fc2ba21ef07a79bf88aa94049222f7ad31842509', class: "header-top--left" }, index$1.h("xv-button-v2", { key: '13fc5ad1a0b7587ee223a55c5a6f5b5490935c76', class: "menu-btn", variant: "ghost", onClick: this.toggleMobMenu }, index$1.h("i", { key: 'f8baece2d445514f1e30083d109e9a547d84aa9a', slot: "icon-left", class: { 'fa': true, 'fa-times': this.mobMenuOpen, 'fa-bars': !this.mobMenuOpen } })), this.metaNav && (index$1.h("a", { key: '506f618928c24e1a8d804e1b362fdc8fdd6662e7', href: `${window.location.origin}/` }, index$1.h("picture", { key: '4c0ddbce5bac9bdb282bbff733e9bb781dd47645' }, index$1.h("source", { key: '3083b3d605b1c2d30f5dc1935cf1e298b93c5c19', srcSet: ((_b = this.metaNav) === null || _b === void 0 ? void 0 : _b.LogoUrl) || 'https://www.crossvertise.com/ResourcePackages/Bootstrap/assets/dist/images/logo.svg', media: "(min-width: 990px)" }), index$1.h("img", { key: '96f2386509b36fd81954819936154751f042fce0', src: ((_c = this.metaNav) === null || _c === void 0 ? void 0 : _c.LogoSmallUrl) || 'https://www.crossvertise.com/ResourcePackages/Bootstrap/assets/dist/images/logo-small.svg', onError: this.logoFallback, loading: "lazy", alt: "Crossvertise" })))), this.orgUnit && (index$1.h("xv-link-v2", { key: '3bb46d9af623db9e54c2c51630a83ce4e384b479', class: "header-top--orgUnit", variant: "standalone", href: "/de-de/mycrossvertise" }, this.orgUnit))), index$1.h("ul", { key: '36e14a1481748def91b5e76f82631e76d35ae49c', class: "header-top--right" }, this._renderSearch(), this._renderImpersonationInfo(), !((_d = this.metaNav) === null || _d === void 0 ? void 0 : _d.IsManager) && isXvBrand && (index$1.h("li", { key: '07c00dae34dfd6f177ff3803f88755339422eec4' }, index$1.h("xv-link-v2", { key: '573110e4de76b5a9aab3bb5c21519b68a4236de7', variant: "ghost", href: "https://www.crossvertise.com/ueber-uns/kontakt" }, index$1.h("xv-button-v2", { key: '318e47e08a44e34bf10a38d8c2901a2d64bfcf2b', variant: "ghost", size: _vars.SIZE_VAR.MD }, index$1.h("i", { key: 'd44b57c9ccd07db75c19dae59123c0320241cb3e', class: "header-icon far fa-envelope" }), index$1.h("span", { key: 'c9e66d1395ab5b690a2e673994a137807232a084', class: "header-label xv-body-02" }, "Kontakt"))))), this._renderNotifications(), this._renderAccount(), !((_e = this.metaNav) === null || _e === void 0 ? void 0 : _e.IsManager) && isXvBrand && (index$1.h("li", { key: 'ca2f1556456c788b78c4929f2d64e7c7f239c4fe' }, index$1.h("xv-link-v2", { key: '47f0a74790fb2331a404d515e5fbe8369458146c', variant: "ghost", href: "https://help.crossvertise.com" }, index$1.h("xv-button-v2", { key: 'ae850b8f6d7c1da9ea3ba704adb1d670720dff7c', variant: "ghost", size: _vars.SIZE_VAR.MD }, index$1.h("i", { key: '8c8a857e172f937d8eba8083a63e2ff8662e06cb', class: "header-icon far fa-question-circle" }), index$1.h("span", { key: 'bb86a87d43293d313654440a126c4e8ea5d228c9', class: "header-label xv-body-02" }, "Hilfe"))))), this._renderShoppingCart()))), index$1.h("div", { key: '4b0386ef89ed643cd42b6232b10064d6bc73beab', class: "header-wrapper--bg" }, index$1.h("div", { key: '83ef95df9b7820eae211b958f6f1bf57d046905b', class: "xv-container" }, index$1.h("xv-mega-menu", { key: '763117fc0da850b8b1bbea389dcaa3cfacef4847', open: this.mobMenuOpen, onOpenChange: this.closeMobMenu })))), index$1.h("xv-login-modal", { key: 'b7252b1eb7527f6dbab4a1cca972d47b75a66b14', visible: this.showLoginModal, onClose: () => this.showLoginModal = false })));
82701
+ return (index$1.h("header", { key: 'c1dadf87ee5ac86371189f3c5326fdcbcfb9a486', class: "header" }, index$1.h("div", { key: '939c81c9e543c9987a8ad2910a2be103db1a5081', class: "header-wrapper" }, index$1.h("div", { key: 'f7322ff8b33db4e3f9974228f7fdc34aaf3da8a4', class: "xv-container" }, index$1.h("div", { key: '3ee4de80cfcc4239b12b0ab52908ea0e7d34aaab', class: "header-top" }, index$1.h("div", { key: '8eeada6b815392eafa3b06ad724ad931d3814235', class: "header-top--left" }, index$1.h("xv-button-v2", { key: '6718cbb3b0d486290d6e3d287f92aafe3059a773', class: "menu-btn", variant: "ghost", onClick: this.toggleMobMenu }, index$1.h("i", { key: '5c291e5f78889fd90b18457b171ef873f05ac92b', slot: "icon-left", class: { 'fa': true, 'fa-times': this.mobMenuOpen, 'fa-bars': !this.mobMenuOpen } })), this.metaNav && (index$1.h("a", { key: '3786b0153c70e32ed6e0fd888041f5f1371352dd', href: `${window.location.origin}/` }, index$1.h("picture", { key: 'b8e3315601275b5e37521bdfc8d68279774eb790' }, index$1.h("source", { key: '447e77d0b63478f5cc6a4947536dfeb75de0957c', srcSet: ((_b = this.metaNav) === null || _b === void 0 ? void 0 : _b.LogoUrl) || 'https://www.crossvertise.com/ResourcePackages/Bootstrap/assets/dist/images/logo.svg', media: "(min-width: 990px)" }), index$1.h("img", { key: '75c5a3c7b5181a4ee7ca7daf010ed4283a901aba', src: ((_c = this.metaNav) === null || _c === void 0 ? void 0 : _c.LogoSmallUrl) || 'https://www.crossvertise.com/ResourcePackages/Bootstrap/assets/dist/images/logo-small.svg', onError: this.logoFallback, loading: "lazy", alt: "Crossvertise" })))), this.orgUnit && (index$1.h("xv-link-v2", { key: '46caa5be0cc5ef85d70527fbe3cf5d410abd9cab', class: "header-top--orgUnit", variant: "standalone", href: "/de-de/mycrossvertise" }, this.orgUnit))), index$1.h("ul", { key: 'cc0c800101e159c3ae6a887cc56c912ba12df29c', class: "header-top--right" }, this._renderSearch(), this._renderImpersonationInfo(), !((_d = this.metaNav) === null || _d === void 0 ? void 0 : _d.IsManager) && isXvBrand && (index$1.h("li", { key: '540fab8968f832d078d77febcac4f9d23b686888' }, index$1.h("xv-link-v2", { key: '7c59f497dc272169b5d6de4d5caf5758bd82fed0', variant: "ghost", href: "https://www.crossvertise.com/ueber-uns/kontakt" }, index$1.h("xv-button-v2", { key: '0692e42a64c68979f0886566ccdca46a38ec21cd', variant: "ghost", size: _vars.SIZE_VAR.MD }, index$1.h("i", { key: '45dacc89068ff5af15a4f73c1c627ec5b71bab7f', class: "header-icon far fa-envelope" }), index$1.h("span", { key: 'a995848018fb4c251dd992c8a8458671ed57bb5a', class: "header-label xv-body-02" }, "Kontakt"))))), this._renderNotifications(), this._renderAccount(), !((_e = this.metaNav) === null || _e === void 0 ? void 0 : _e.IsManager) && isXvBrand && (index$1.h("li", { key: 'd7a86b909929af0126eef781321bf14cd07f8b09' }, index$1.h("xv-link-v2", { key: 'a9b9bc5c7e2496bcb36e1b1e30afe6183173ddd9', variant: "ghost", href: "https://help.crossvertise.com" }, index$1.h("xv-button-v2", { key: '5a943f49cfb73ec9a19368cf2ea5aef2f8c6194f', variant: "ghost", size: _vars.SIZE_VAR.MD }, index$1.h("i", { key: '0d892d7ed7a6a3777c3180a5101df8029e7fedf2', class: "header-icon far fa-question-circle" }), index$1.h("span", { key: 'd2ac5acb478b819eef302bfbb008294ffbd4706b', class: "header-label xv-body-02" }, "Hilfe"))))), this._renderShoppingCart()))), index$1.h("div", { key: '12b4d4b721f3987f69bb8c2024cf00a541dedb09', class: "header-wrapper--bg" }, index$1.h("div", { key: '029bb783f3204dccee6da34e7546944cc00331bc', class: "xv-container" }, index$1.h("xv-mega-menu", { key: '1542e98a5cde254587138abf550d9744f022c93a', open: this.mobMenuOpen, onOpenChange: this.closeMobMenu })))), index$1.h("xv-login-modal", { key: '80ad843540761ab1aa41cb12a697736ea5c4fbe2', visible: this.showLoginModal, onClose: () => this.showLoginModal = false })));
82704
82702
  }
82705
82703
  get el() { return index$1.getElement(this); }
82706
82704
  };
@@ -83420,6 +83418,13 @@ const XvOverflowMenu = class {
83420
83418
  const button = (index$1.h("button", { class: { btn: true, open: this.open }, onClick: this.onOpenToggle, disabled: this.disabled, "aria-haspopup": "menu", "aria-expanded": this.open ? 'true' : 'false', ref: (el) => (this.triggerButtonEl = el) }, index$1.h("slot", { name: "trigger" }, index$1.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 128 512" }, index$1.h("path", { d: "M64 368a48 48 0 1 0 0 96 48 48 0 1 0 0-96zm0-160a48 48 0 1 0 0 96 48 48 0 1 0 0-96zM112 96A48 48 0 1 0 16 96a48 48 0 1 0 96 0z" })))));
83421
83419
  return (index$1.h(index$1.Host, { class: "xv-overflow-menu", size: this.size }, this.tooltip ? index$1.h("xv-tooltip-v2", { message: this.tooltip }, button) : button, list));
83422
83420
  }
83421
+ // Moving the host in the DOM — a framework reordering a list, say — disconnects and reconnects
83422
+ // it, and the disconnect tears the anchor listener down. componentDidLoad does not run a second
83423
+ // time, so without this the menu stays dead. Safe on the first mount: addEventListener discards
83424
+ // a duplicate of the same handler, and setupAnchor is a no-op until anchor is set.
83425
+ connectedCallback() {
83426
+ this.setupAnchor();
83427
+ }
83423
83428
  componentDidLoad() {
83424
83429
  this.setupAnchor();
83425
83430
  this.syncOpenState();
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-DpLAFt0R.js');
4
- var _vars = require('./_vars-DMytunQw.js');
4
+ var _vars = require('./_vars-FOITtI6f.js');
5
5
  var index$1 = require('./index-Cb30DBqk.js');
6
6
 
7
7
  const userMagnifyingGlassRegularFullSvg = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NDAgNjQwIj48IS0tIUZvbnQgQXdlc29tZSBQcm8gNy4xLjAgYnkgQGZvbnRhd2Vzb21lIC0gaHR0cHM6Ly9mb250YXdlc29tZS5jb20gTGljZW5zZSAtIGh0dHBzOi8vZm9udGF3ZXNvbWUuY29tL2xpY2Vuc2UgKENvbW1lcmNpYWwgTGljZW5zZSkgQ29weXJpZ2h0IDIwMjUgRm9udGljb25zLCBJbmMuLS0+PHBhdGggZD0iTTE3Ni41IDE5MkMxNzYuNSAxNDcuOCAyMTIuMyAxMTIgMjU2LjUgMTEyQzMwMC43IDExMiAzMzYuNSAxNDcuOCAzMzYuNSAxOTJDMzM2LjUgMjM2LjIgMzAwLjcgMjcyIDI1Ni41IDI3MkMyMTIuMyAyNzIgMTc2LjUgMjM2LjIgMTc2LjUgMTkyek0zODQuNSAxOTJDMzg0LjUgMTIxLjMgMzI3LjIgNjQgMjU2LjUgNjRDMTg1LjggNjQgMTI4LjUgMTIxLjMgMTI4LjUgMTkyQzEyOC41IDI2Mi43IDE4NS44IDMyMCAyNTYuNSAzMjBDMzI3LjIgMzIwIDM4NC41IDI2Mi43IDM4NC41IDE5MnpNODAuNSA1NDRDODAuNSA0NzMuMyAxMzcuOCA0MTYgMjA4LjUgNDE2TDI4OC43IDQxNkMyODkuNSAzOTkuMiAyOTIuNyAzODMuMSAyOTguMSAzNjhMMjA4LjUgMzY4QzExMS4zIDM2OCAzMi41IDQ0Ni44IDMyLjUgNTQ0TDMyLjUgNTUyQzMyLjUgNTY1LjMgNDMuMiA1NzYgNTYuNSA1NzZDNjkuOCA1NzYgODAuNSA1NjUuMyA4MC41IDU1Mkw4MC41IDU0NHpNNDU2LjUgMzUyQzQ5Ni4zIDM1MiA1MjguNSAzODQuMiA1MjguNSA0MjRDNTI4LjUgNDYzLjggNDk2LjMgNDk2IDQ1Ni41IDQ5NkM0MTYuNyA0OTYgMzg0LjUgNDYzLjggMzg0LjUgNDI0QzM4NC41IDM4NC4yIDQxNi43IDM1MiA0NTYuNSAzNTJ6TTQ1Ni41IDU0NEM0ODAuOSA1NDQgNTAzLjYgNTM2LjcgNTIyLjYgNTI0LjJMNTgzLjUgNTg1LjFDNTkyLjkgNTk0LjUgNjA4LjEgNTk0LjUgNjE3LjQgNTg1LjFDNjI2LjcgNTc1LjcgNjI2LjggNTYwLjUgNjE3LjQgNTUxLjJMNTU2LjUgNDkwLjNDNTY5LjEgNDcxLjMgNTc2LjQgNDQ4LjUgNTc2LjQgNDI0QzU3Ni40IDM1Ny43IDUyMi43IDMwNCA0NTYuNCAzMDRDMzkwLjEgMzA0IDMzNi40IDM1Ny43IDMzNi40IDQyNEMzMzYuNCA0OTAuMyAzOTAuMSA1NDQgNDU2LjQgNTQ0eiIvPjwvc3ZnPg==';
@@ -175,12 +175,10 @@ const XvHeaderNext = class {
175
175
  var _a;
176
176
  if (!((_a = this.metaNav) === null || _a === void 0 ? void 0 : _a.IsManager))
177
177
  return null;
178
- return (index.h("li", { class: "notifications" }, index.h("xv-overflow-menu-v2", { position: "right", size: _vars.SIZE_VAR.MD }, index.h("span", { slot: "trigger", class: "fa-stack" }, index.h("i", { class: "notifications-icon far fa-bell fa-stack-1x" }), this.notifications.length > 0 && (index.h("xv-tag-v2", { class: "counter-badge counter-badge--absolute", bg: "var(--icon-interactive, #97BF0D)", color: "var(--text-inverse, #FFF)" }, this.notifications.length))), this.notifications.map((notification) => (index.h("xv-overflow-menu-v2-item", { value: notification.id, variant: _vars.OverflowMenuVariant.GHOST, disabled: notification.isRead, clickable: false }, index.h("div", { class: "notifications-item" }, index.h("i", { class: {
179
- far: true,
180
- 'fa-clock': !notification.status,
181
- 'fa-times-circle': notification.status === 1,
182
- 'fa-circle': notification.status && notification.status !== 1,
183
- } }), index.h("div", { class: "notifications-item-body" }, index.h("span", null, "Rechnungsentwurf f\u00FCr Auftrag ", notification.orderId, " ist ausstehend"), index.h("xv-link-v2", { variant: notification.isRead ? 'ghost' : 'standalone', href: `/de-de/manager/ordersales/details/${notification.orderId}` }, "Auftrag anschauen")))))))));
178
+ return (index.h("li", { class: "notifications" }, index.h("xv-overflow-menu-v2", { position: "right", size: _vars.SIZE_VAR.MD }, index.h("span", { slot: "trigger", class: "fa-stack" }, index.h("i", { class: "notifications-icon far fa-bell fa-stack-1x" }), this.notifications.length > 0 && (index.h("xv-tag-v2", { class: "counter-badge counter-badge--absolute", bg: "var(--icon-interactive, #97BF0D)", color: "var(--text-inverse, #FFF)" }, this.notifications.length))), this.notifications.map((notification) => {
179
+ const status = _vars.invoiceNotificationStatusOf(notification.status);
180
+ return (index.h("xv-overflow-menu-v2-item", { value: notification.id, variant: _vars.OverflowMenuVariant.GHOST, disabled: notification.isRead, clickable: false }, index.h("div", { class: "notifications-item" }, index.h("i", { class: { far: true, [_vars.INVOICE_NOTIFICATION_STATUS_ICON[status]]: true } }), index.h("div", { class: "notifications-item-body" }, index.h("span", null, "Rechnungsentwurf f\u00FCr Auftrag ", notification.orderId, " ist ", _vars.INVOICE_NOTIFICATION_STATUS_TEXT[status]), index.h("xv-link-v2", { variant: notification.isRead ? 'ghost' : 'standalone', href: `/de-de/manager/ordersales/details/${notification.orderId}` }, "Auftrag anschauen")))));
181
+ }))));
184
182
  }
185
183
  _renderAccount() {
186
184
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
@@ -199,7 +197,7 @@ const XvHeaderNext = class {
199
197
  render() {
200
198
  var _a, _b, _c, _d, _e;
201
199
  const isXvBrand = (((_a = this.metaNav) === null || _a === void 0 ? void 0 : _a['WhitelabelName']) || 'Xv') === 'Xv';
202
- return (index.h("header", { key: '19af5ee68042a36f7217b0b35a24a759fc4847db', class: "header" }, index.h("div", { key: '197dcbf9022f303f0f247cb5766d2e58dec60444', class: "header-wrapper" }, index.h("div", { key: 'ff984cbcd0294ae4d63c0c874d7788501b1e7e4a', class: "xv-container" }, index.h("div", { key: '92727fd92023f03c6e099321a5516ac07df40dff', class: "header-top" }, index.h("div", { key: '66209080f19179d302dcbe1c849c099b67067aa2', class: "header-top--left" }, index.h("xv-button-v2", { key: 'e0555bd0186c9ab16a67d99bb39a54d0a5bfa1c7', class: "menu-btn", variant: "ghost", onClick: this.toggleMobMenu }, index.h("i", { key: '444dfb14fe820289f909bcd225b67b9728ebee00', slot: "icon-left", class: { 'fa': true, 'fa-times': this.mobMenuOpen, 'fa-bars': !this.mobMenuOpen } })), this.metaNav && (index.h("a", { key: '363aa6b89fc901423d3e086b91bf0e87090aad77', href: `${window.location.origin}/` }, index.h("picture", { key: '10d0f780f4b3c8d82ddc42cc4bc3bcdfed3f6bb3' }, index.h("source", { key: '4f380ce8f4a2e0a49040b64b58c8ccde1b58c922', srcSet: ((_b = this.metaNav) === null || _b === void 0 ? void 0 : _b.LogoUrl) || 'https://www.crossvertise.com/ResourcePackages/Bootstrap/assets/dist/images/logo.svg', media: "(min-width: 990px)" }), index.h("img", { key: 'cddd6551b4610fb701d61dbe9b201b4e65f39f0d', src: ((_c = this.metaNav) === null || _c === void 0 ? void 0 : _c.LogoSmallUrl) || 'https://www.crossvertise.com/ResourcePackages/Bootstrap/assets/dist/images/logo-small.svg', onError: this.logoFallback, loading: "lazy", alt: "Crossvertise" })))), this.orgUnit && (index.h("xv-link-v2", { key: '5e2cde3553edb563b91eab3c5b36d6a9677c1c19', class: "header-top--orgUnit", variant: "standalone", href: "/de-de/mycrossvertise" }, this.orgUnit))), index.h("ul", { key: '19e47020fc57304c06ebe71182ed9c8308571fad', class: "header-top--right" }, this._renderLocaleSwitcher(), this._renderSearch(), this._renderImpersonationInfo(), !((_d = this.metaNav) === null || _d === void 0 ? void 0 : _d.IsManager) && isXvBrand && (index.h("li", { key: '5bc27068226b038fd783328ec595bf78c6f3cfbd' }, index.h("xv-link-v2", { key: 'd9d87362899586ccd41ef88a9fc8a111c9fe1653', variant: "ghost", href: "https://www.crossvertise.com/ueber-uns/kontakt" }, index.h("xv-button-v2", { key: '72a6d1e98efefd56ad8582b1e6b5209c081b26f1', variant: "ghost", size: _vars.SIZE_VAR.MD }, index.h("i", { key: 'c66c01eaabe1a295641813585681222162327c9f', class: "header-icon far fa-envelope" }), index.h("span", { key: 'ebdf99544154ecc3f04853decd776f0558cba660', class: "header-label xv-body-02" }, "Kontakt"))))), this._renderNotifications(), this._renderAccount(), !((_e = this.metaNav) === null || _e === void 0 ? void 0 : _e.IsManager) && isXvBrand && (index.h("li", { key: '288484baf69d63ff0f38e027294667ff0050dfe1' }, index.h("xv-link-v2", { key: '3759c87928c3c1e145dba55cdb73364ec4424cc9', variant: "ghost", href: "https://help.crossvertise.com" }, index.h("xv-button-v2", { key: '4d726ccab98a688a771925a9f10f5a02f79e68a5', variant: "ghost", size: _vars.SIZE_VAR.MD }, index.h("i", { key: '79d42dad22db9570d278db4fab32d6869a19c536', class: "header-icon far fa-question-circle" }), index.h("span", { key: '009a192511b8b6c19c461a94d772d1e6c4c39d56', class: "header-label xv-body-02" }, "Hilfe"))))), this._renderShoppingCart()))), index.h("div", { key: '31a71c085c02e36cbfe35412357cceff25cb752b', class: "header-wrapper--bg" }, index.h("div", { key: '9041f088f54852a0d144b01ecb2f730dc4b00e50', class: "xv-container" }, index.h("xv-mega-menu-next", { key: '6b8542f8962437488256b01611de616c391a9d94', open: this.mobMenuOpen, onOpenChange: this.closeMobMenu, menuData: this.menuData })))), index.h("xv-login-modal", { key: 'c6cb5f0f604d3e71bf22edafbbaa9313076d5b28', visible: this.showLoginModal, onClose: () => this.showLoginModal = false })));
200
+ return (index.h("header", { key: '13a9d3cc028a97c7c4d3db96c40e58cffa1fe33a', class: "header" }, index.h("div", { key: 'bc3da59737a300efcbbce9234b750a16c2c96ce3', class: "header-wrapper" }, index.h("div", { key: '294a3ab110a7bf53b2bed24db1b1a56a8ec66dcb', class: "xv-container" }, index.h("div", { key: '99fbcdaa2c4e72eb8661f8b8034e616bf99c1bc5', class: "header-top" }, index.h("div", { key: '1e703aa885c9462f06d44fdd9756f42b08e96241', class: "header-top--left" }, index.h("xv-button-v2", { key: 'f867ffe85b45e67b55ea30ce8bfa1da0352f1edc', class: "menu-btn", variant: "ghost", onClick: this.toggleMobMenu }, index.h("i", { key: 'f048441a12346222ac24df76f91bc03b6096bea2', slot: "icon-left", class: { 'fa': true, 'fa-times': this.mobMenuOpen, 'fa-bars': !this.mobMenuOpen } })), this.metaNav && (index.h("a", { key: '5fe60ea6eb240c62fd831e835ad89dad555b0edb', href: `${window.location.origin}/` }, index.h("picture", { key: '060830e01a97d6b7192202f719ca42c94d9075ff' }, index.h("source", { key: '5d1f714cb70131c2634d552e22305b78afb755bd', srcSet: ((_b = this.metaNav) === null || _b === void 0 ? void 0 : _b.LogoUrl) || 'https://www.crossvertise.com/ResourcePackages/Bootstrap/assets/dist/images/logo.svg', media: "(min-width: 990px)" }), index.h("img", { key: '90334b422808e153718dd43dd7404c23e0e69692', src: ((_c = this.metaNav) === null || _c === void 0 ? void 0 : _c.LogoSmallUrl) || 'https://www.crossvertise.com/ResourcePackages/Bootstrap/assets/dist/images/logo-small.svg', onError: this.logoFallback, loading: "lazy", alt: "Crossvertise" })))), this.orgUnit && (index.h("xv-link-v2", { key: '6cce595ce435c6fb05d74ee8ecd3ee58cc788f90', class: "header-top--orgUnit", variant: "standalone", href: "/de-de/mycrossvertise" }, this.orgUnit))), index.h("ul", { key: '6284fdfc7a99ab5a8194f13f55f5cccf47427d65', class: "header-top--right" }, this._renderLocaleSwitcher(), this._renderSearch(), this._renderImpersonationInfo(), !((_d = this.metaNav) === null || _d === void 0 ? void 0 : _d.IsManager) && isXvBrand && (index.h("li", { key: 'da5bd80e9d475358a16052e62c56fb6d4aa3370c' }, index.h("xv-link-v2", { key: '3096b8531e471537d5a16910456fcb6fe5de8af8', variant: "ghost", href: "https://www.crossvertise.com/ueber-uns/kontakt" }, index.h("xv-button-v2", { key: '4b1fa5e374d05f183a0fb39adec0b779cecd17e1', variant: "ghost", size: _vars.SIZE_VAR.MD }, index.h("i", { key: 'bb69f452fabd750451b993acbda13fda6e8f3da9', class: "header-icon far fa-envelope" }), index.h("span", { key: '62e89c597ae9b1cc77329fa36dd32f65d4e79511', class: "header-label xv-body-02" }, "Kontakt"))))), this._renderNotifications(), this._renderAccount(), !((_e = this.metaNav) === null || _e === void 0 ? void 0 : _e.IsManager) && isXvBrand && (index.h("li", { key: 'fc3cdac26fa33bcbd027d1605934e40e832fafd5' }, index.h("xv-link-v2", { key: 'fd1303e606ebfe4ca8944f2685e5b2f616fdcc47', variant: "ghost", href: "https://help.crossvertise.com" }, index.h("xv-button-v2", { key: '41f5daa4d30d7bed6ed032563a600036b4e230bd', variant: "ghost", size: _vars.SIZE_VAR.MD }, index.h("i", { key: '764c0abede96b262c562832a6bbebee70484c326', class: "header-icon far fa-question-circle" }), index.h("span", { key: 'c69623c9fbb3110998b9a3a80cff3cc404d1de60', class: "header-label xv-body-02" }, "Hilfe"))))), this._renderShoppingCart()))), index.h("div", { key: 'e6936d829410b2b7c7801ce388c71f9817d88fca', class: "header-wrapper--bg" }, index.h("div", { key: '674d7d606828838f6ad17a5eb274bed488ecb323', class: "xv-container" }, index.h("xv-mega-menu-next", { key: '18ceb4546630a258b04097ddaf16bb10bdf2a8fa', open: this.mobMenuOpen, onOpenChange: this.closeMobMenu, menuData: this.menuData })))), index.h("xv-login-modal", { key: 'a3404b9ad678f5d5c0efd687788631e828574e2d', visible: this.showLoginModal, onClose: () => this.showLoginModal = false })));
203
201
  }
204
202
  get el() { return index.getElement(this); }
205
203
  };
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Status of a draft-invoice notification, mirroring the platform's
3
+ * `InvoiceNotificationPayloadStatus` (Xv.Domain/Notifications/Payloads).
4
+ *
5
+ * The numeric values are the wire format: `/de-de/api/notifications/list` serializes the
6
+ * enum by ordinal, so these MUST stay in sync with the backend. The header used to compare
7
+ * `status === 1` while treating it as a failure, so a draft invoice that had been generated
8
+ * was shown with the error icon and the text "ist ausstehend" (MAR-15569).
9
+ */
10
+ export var InvoiceNotificationStatus;
11
+ (function (InvoiceNotificationStatus) {
12
+ InvoiceNotificationStatus[InvoiceNotificationStatus["PENDING"] = 0] = "PENDING";
13
+ InvoiceNotificationStatus[InvoiceNotificationStatus["COMPLETED"] = 1] = "COMPLETED";
14
+ InvoiceNotificationStatus[InvoiceNotificationStatus["FAILED"] = 2] = "FAILED";
15
+ })(InvoiceNotificationStatus || (InvoiceNotificationStatus = {}));
16
+ /** Bell label per status. German only — this component carries no i18n layer. */
17
+ export const INVOICE_NOTIFICATION_STATUS_TEXT = {
18
+ [InvoiceNotificationStatus.PENDING]: 'ausstehend',
19
+ [InvoiceNotificationStatus.COMPLETED]: 'generiert',
20
+ [InvoiceNotificationStatus.FAILED]: 'fehlgeschlagen',
21
+ };
22
+ /** Font Awesome icon per status. */
23
+ export const INVOICE_NOTIFICATION_STATUS_ICON = {
24
+ [InvoiceNotificationStatus.PENDING]: 'fa-clock',
25
+ [InvoiceNotificationStatus.COMPLETED]: 'fa-check-circle',
26
+ [InvoiceNotificationStatus.FAILED]: 'fa-times-circle',
27
+ };
28
+ /**
29
+ * Falls back to PENDING for an unknown value so a new backend status renders as
30
+ * "waiting" rather than silently claiming success or failure.
31
+ */
32
+ export function invoiceNotificationStatusOf(status) {
33
+ switch (status) {
34
+ case InvoiceNotificationStatus.COMPLETED:
35
+ return InvoiceNotificationStatus.COMPLETED;
36
+ case InvoiceNotificationStatus.FAILED:
37
+ return InvoiceNotificationStatus.FAILED;
38
+ default:
39
+ return InvoiceNotificationStatus.PENDING;
40
+ }
41
+ }
@@ -2,6 +2,7 @@ import { h } from "@stencil/core";
2
2
  import { SIZE_VAR } from "../../types/enum";
3
3
  import { api, debounce, getBaseUrl, getMetaNav } from "../../utils/utils";
4
4
  import { OverflowMenuVariant } from "../xv-overflow-menu/_vars";
5
+ import { INVOICE_NOTIFICATION_STATUS_ICON, INVOICE_NOTIFICATION_STATUS_TEXT, invoiceNotificationStatusOf, } from "./_vars";
5
6
  import UserSearchIcon from "./user-magnifying-glass-regular-full.svg";
6
7
  export class XvHeader {
7
8
  constructor() {
@@ -143,12 +144,10 @@ export class XvHeader {
143
144
  var _a;
144
145
  if (!((_a = this.metaNav) === null || _a === void 0 ? void 0 : _a.IsManager))
145
146
  return null;
146
- return (h("li", { class: "notifications" }, h("xv-overflow-menu-v2", { position: "right", size: SIZE_VAR.MD }, h("span", { slot: "trigger", class: "fa-stack" }, h("i", { class: "notifications-icon far fa-bell fa-stack-1x" }), this.notifications.length > 0 && (h("xv-tag-v2", { class: "counter-badge counter-badge--absolute", bg: "var(--icon-interactive, #97BF0D)", color: "var(--text-inverse, #FFF)" }, this.notifications.length))), this.notifications.map((notification) => (h("xv-overflow-menu-v2-item", { value: notification.id, variant: OverflowMenuVariant.GHOST, disabled: notification.isRead, clickable: false }, h("div", { class: "notifications-item" }, h("i", { class: {
147
- far: true,
148
- 'fa-clock': !notification.status,
149
- 'fa-times-circle': notification.status === 1,
150
- 'fa-circle': notification.status && notification.status !== 1,
151
- } }), h("div", { class: "notifications-item-body" }, h("span", null, "Rechnungsentwurf f\u00FCr Auftrag ", notification.orderId, " ist ausstehend"), h("xv-link-v2", { variant: notification.isRead ? 'ghost' : 'standalone', href: `/de-de/manager/ordersales/details/${notification.orderId}` }, "Auftrag anschauen")))))))));
147
+ return (h("li", { class: "notifications" }, h("xv-overflow-menu-v2", { position: "right", size: SIZE_VAR.MD }, h("span", { slot: "trigger", class: "fa-stack" }, h("i", { class: "notifications-icon far fa-bell fa-stack-1x" }), this.notifications.length > 0 && (h("xv-tag-v2", { class: "counter-badge counter-badge--absolute", bg: "var(--icon-interactive, #97BF0D)", color: "var(--text-inverse, #FFF)" }, this.notifications.length))), this.notifications.map((notification) => {
148
+ const status = invoiceNotificationStatusOf(notification.status);
149
+ return (h("xv-overflow-menu-v2-item", { value: notification.id, variant: OverflowMenuVariant.GHOST, disabled: notification.isRead, clickable: false }, h("div", { class: "notifications-item" }, h("i", { class: { far: true, [INVOICE_NOTIFICATION_STATUS_ICON[status]]: true } }), h("div", { class: "notifications-item-body" }, h("span", null, "Rechnungsentwurf f\u00FCr Auftrag ", notification.orderId, " ist ", INVOICE_NOTIFICATION_STATUS_TEXT[status]), h("xv-link-v2", { variant: notification.isRead ? 'ghost' : 'standalone', href: `/de-de/manager/ordersales/details/${notification.orderId}` }, "Auftrag anschauen")))));
150
+ }))));
152
151
  }
153
152
  _renderAccount() {
154
153
  var _a, _b, _c, _d, _e, _f, _g, _h;
@@ -173,7 +172,7 @@ export class XvHeader {
173
172
  render() {
174
173
  var _a, _b, _c, _d, _e;
175
174
  const isXvBrand = (((_a = this.metaNav) === null || _a === void 0 ? void 0 : _a['WhitelabelName']) || 'Xv') === 'Xv';
176
- return (h("header", { key: '9477fea03faf7b1eee3a59be46a6b6efffabe7ae', class: "header" }, h("div", { key: '974c597e788966d68bbc0af46ef1c56e5d49c291', class: "header-wrapper" }, h("div", { key: 'c4efe27850b74ccaf75864abbee66e04fdd39aba', class: "xv-container" }, h("div", { key: '0dc3df2ffc4dbae8caeb996cbd6bd1293c51126f', class: "header-top" }, h("div", { key: 'fc2ba21ef07a79bf88aa94049222f7ad31842509', class: "header-top--left" }, h("xv-button-v2", { key: '13fc5ad1a0b7587ee223a55c5a6f5b5490935c76', class: "menu-btn", variant: "ghost", onClick: this.toggleMobMenu }, h("i", { key: 'f8baece2d445514f1e30083d109e9a547d84aa9a', slot: "icon-left", class: { 'fa': true, 'fa-times': this.mobMenuOpen, 'fa-bars': !this.mobMenuOpen } })), this.metaNav && (h("a", { key: '506f618928c24e1a8d804e1b362fdc8fdd6662e7', href: `${window.location.origin}/` }, h("picture", { key: '4c0ddbce5bac9bdb282bbff733e9bb781dd47645' }, h("source", { key: '3083b3d605b1c2d30f5dc1935cf1e298b93c5c19', srcSet: ((_b = this.metaNav) === null || _b === void 0 ? void 0 : _b.LogoUrl) || 'https://www.crossvertise.com/ResourcePackages/Bootstrap/assets/dist/images/logo.svg', media: "(min-width: 990px)" }), h("img", { key: '96f2386509b36fd81954819936154751f042fce0', src: ((_c = this.metaNav) === null || _c === void 0 ? void 0 : _c.LogoSmallUrl) || 'https://www.crossvertise.com/ResourcePackages/Bootstrap/assets/dist/images/logo-small.svg', onError: this.logoFallback, loading: "lazy", alt: "Crossvertise" })))), this.orgUnit && (h("xv-link-v2", { key: '3bb46d9af623db9e54c2c51630a83ce4e384b479', class: "header-top--orgUnit", variant: "standalone", href: "/de-de/mycrossvertise" }, this.orgUnit))), h("ul", { key: '36e14a1481748def91b5e76f82631e76d35ae49c', class: "header-top--right" }, this._renderSearch(), this._renderImpersonationInfo(), !((_d = this.metaNav) === null || _d === void 0 ? void 0 : _d.IsManager) && isXvBrand && (h("li", { key: '07c00dae34dfd6f177ff3803f88755339422eec4' }, h("xv-link-v2", { key: '573110e4de76b5a9aab3bb5c21519b68a4236de7', variant: "ghost", href: "https://www.crossvertise.com/ueber-uns/kontakt" }, h("xv-button-v2", { key: '318e47e08a44e34bf10a38d8c2901a2d64bfcf2b', variant: "ghost", size: SIZE_VAR.MD }, h("i", { key: 'd44b57c9ccd07db75c19dae59123c0320241cb3e', class: "header-icon far fa-envelope" }), h("span", { key: 'c9e66d1395ab5b690a2e673994a137807232a084', class: "header-label xv-body-02" }, "Kontakt"))))), this._renderNotifications(), this._renderAccount(), !((_e = this.metaNav) === null || _e === void 0 ? void 0 : _e.IsManager) && isXvBrand && (h("li", { key: 'ca2f1556456c788b78c4929f2d64e7c7f239c4fe' }, h("xv-link-v2", { key: '47f0a74790fb2331a404d515e5fbe8369458146c', variant: "ghost", href: "https://help.crossvertise.com" }, h("xv-button-v2", { key: 'ae850b8f6d7c1da9ea3ba704adb1d670720dff7c', variant: "ghost", size: SIZE_VAR.MD }, h("i", { key: '8c8a857e172f937d8eba8083a63e2ff8662e06cb', class: "header-icon far fa-question-circle" }), h("span", { key: 'bb86a87d43293d313654440a126c4e8ea5d228c9', class: "header-label xv-body-02" }, "Hilfe"))))), this._renderShoppingCart()))), h("div", { key: '4b0386ef89ed643cd42b6232b10064d6bc73beab', class: "header-wrapper--bg" }, h("div", { key: '83ef95df9b7820eae211b958f6f1bf57d046905b', class: "xv-container" }, h("xv-mega-menu", { key: '763117fc0da850b8b1bbea389dcaa3cfacef4847', open: this.mobMenuOpen, onOpenChange: this.closeMobMenu })))), h("xv-login-modal", { key: 'b7252b1eb7527f6dbab4a1cca972d47b75a66b14', visible: this.showLoginModal, onClose: () => this.showLoginModal = false })));
175
+ return (h("header", { key: 'c1dadf87ee5ac86371189f3c5326fdcbcfb9a486', class: "header" }, h("div", { key: '939c81c9e543c9987a8ad2910a2be103db1a5081', class: "header-wrapper" }, h("div", { key: 'f7322ff8b33db4e3f9974228f7fdc34aaf3da8a4', class: "xv-container" }, h("div", { key: '3ee4de80cfcc4239b12b0ab52908ea0e7d34aaab', class: "header-top" }, h("div", { key: '8eeada6b815392eafa3b06ad724ad931d3814235', class: "header-top--left" }, h("xv-button-v2", { key: '6718cbb3b0d486290d6e3d287f92aafe3059a773', class: "menu-btn", variant: "ghost", onClick: this.toggleMobMenu }, h("i", { key: '5c291e5f78889fd90b18457b171ef873f05ac92b', slot: "icon-left", class: { 'fa': true, 'fa-times': this.mobMenuOpen, 'fa-bars': !this.mobMenuOpen } })), this.metaNav && (h("a", { key: '3786b0153c70e32ed6e0fd888041f5f1371352dd', href: `${window.location.origin}/` }, h("picture", { key: 'b8e3315601275b5e37521bdfc8d68279774eb790' }, h("source", { key: '447e77d0b63478f5cc6a4947536dfeb75de0957c', srcSet: ((_b = this.metaNav) === null || _b === void 0 ? void 0 : _b.LogoUrl) || 'https://www.crossvertise.com/ResourcePackages/Bootstrap/assets/dist/images/logo.svg', media: "(min-width: 990px)" }), h("img", { key: '75c5a3c7b5181a4ee7ca7daf010ed4283a901aba', src: ((_c = this.metaNav) === null || _c === void 0 ? void 0 : _c.LogoSmallUrl) || 'https://www.crossvertise.com/ResourcePackages/Bootstrap/assets/dist/images/logo-small.svg', onError: this.logoFallback, loading: "lazy", alt: "Crossvertise" })))), this.orgUnit && (h("xv-link-v2", { key: '46caa5be0cc5ef85d70527fbe3cf5d410abd9cab', class: "header-top--orgUnit", variant: "standalone", href: "/de-de/mycrossvertise" }, this.orgUnit))), h("ul", { key: 'cc0c800101e159c3ae6a887cc56c912ba12df29c', class: "header-top--right" }, this._renderSearch(), this._renderImpersonationInfo(), !((_d = this.metaNav) === null || _d === void 0 ? void 0 : _d.IsManager) && isXvBrand && (h("li", { key: '540fab8968f832d078d77febcac4f9d23b686888' }, h("xv-link-v2", { key: '7c59f497dc272169b5d6de4d5caf5758bd82fed0', variant: "ghost", href: "https://www.crossvertise.com/ueber-uns/kontakt" }, h("xv-button-v2", { key: '0692e42a64c68979f0886566ccdca46a38ec21cd', variant: "ghost", size: SIZE_VAR.MD }, h("i", { key: '45dacc89068ff5af15a4f73c1c627ec5b71bab7f', class: "header-icon far fa-envelope" }), h("span", { key: 'a995848018fb4c251dd992c8a8458671ed57bb5a', class: "header-label xv-body-02" }, "Kontakt"))))), this._renderNotifications(), this._renderAccount(), !((_e = this.metaNav) === null || _e === void 0 ? void 0 : _e.IsManager) && isXvBrand && (h("li", { key: 'd7a86b909929af0126eef781321bf14cd07f8b09' }, h("xv-link-v2", { key: 'a9b9bc5c7e2496bcb36e1b1e30afe6183173ddd9', variant: "ghost", href: "https://help.crossvertise.com" }, h("xv-button-v2", { key: '5a943f49cfb73ec9a19368cf2ea5aef2f8c6194f', variant: "ghost", size: SIZE_VAR.MD }, h("i", { key: '0d892d7ed7a6a3777c3180a5101df8029e7fedf2', class: "header-icon far fa-question-circle" }), h("span", { key: 'd2ac5acb478b819eef302bfbb008294ffbd4706b', class: "header-label xv-body-02" }, "Hilfe"))))), this._renderShoppingCart()))), h("div", { key: '12b4d4b721f3987f69bb8c2024cf00a541dedb09', class: "header-wrapper--bg" }, h("div", { key: '029bb783f3204dccee6da34e7546944cc00331bc', class: "xv-container" }, h("xv-mega-menu", { key: '1542e98a5cde254587138abf550d9744f022c93a', open: this.mobMenuOpen, onOpenChange: this.closeMobMenu })))), h("xv-login-modal", { key: '80ad843540761ab1aa41cb12a697736ea5c4fbe2', visible: this.showLoginModal, onClose: () => this.showLoginModal = false })));
177
176
  }
178
177
  static get is() { return "xv-header"; }
179
178
  static get originalStyleUrls() {
@@ -2,6 +2,7 @@ import { h, Fragment } from "@stencil/core";
2
2
  import { SIZE_VAR } from "../../types/enum";
3
3
  import { api, debounce, getBaseUrl, getMetaNav } from "../../utils/utils";
4
4
  import { OverflowMenuVariant } from "../xv-overflow-menu/_vars";
5
+ import { INVOICE_NOTIFICATION_STATUS_ICON, INVOICE_NOTIFICATION_STATUS_TEXT, invoiceNotificationStatusOf, } from "../xv-header/_vars";
5
6
  import UserSearchIcon from "./user-magnifying-glass-regular-full.svg";
6
7
  /**
7
8
  * Drop-in successor of `xv-header` for the new headless CMS.
@@ -181,12 +182,10 @@ export class XvHeaderNext {
181
182
  var _a;
182
183
  if (!((_a = this.metaNav) === null || _a === void 0 ? void 0 : _a.IsManager))
183
184
  return null;
184
- return (h("li", { class: "notifications" }, h("xv-overflow-menu-v2", { position: "right", size: SIZE_VAR.MD }, h("span", { slot: "trigger", class: "fa-stack" }, h("i", { class: "notifications-icon far fa-bell fa-stack-1x" }), this.notifications.length > 0 && (h("xv-tag-v2", { class: "counter-badge counter-badge--absolute", bg: "var(--icon-interactive, #97BF0D)", color: "var(--text-inverse, #FFF)" }, this.notifications.length))), this.notifications.map((notification) => (h("xv-overflow-menu-v2-item", { value: notification.id, variant: OverflowMenuVariant.GHOST, disabled: notification.isRead, clickable: false }, h("div", { class: "notifications-item" }, h("i", { class: {
185
- far: true,
186
- 'fa-clock': !notification.status,
187
- 'fa-times-circle': notification.status === 1,
188
- 'fa-circle': notification.status && notification.status !== 1,
189
- } }), h("div", { class: "notifications-item-body" }, h("span", null, "Rechnungsentwurf f\u00FCr Auftrag ", notification.orderId, " ist ausstehend"), h("xv-link-v2", { variant: notification.isRead ? 'ghost' : 'standalone', href: `/de-de/manager/ordersales/details/${notification.orderId}` }, "Auftrag anschauen")))))))));
185
+ return (h("li", { class: "notifications" }, h("xv-overflow-menu-v2", { position: "right", size: SIZE_VAR.MD }, h("span", { slot: "trigger", class: "fa-stack" }, h("i", { class: "notifications-icon far fa-bell fa-stack-1x" }), this.notifications.length > 0 && (h("xv-tag-v2", { class: "counter-badge counter-badge--absolute", bg: "var(--icon-interactive, #97BF0D)", color: "var(--text-inverse, #FFF)" }, this.notifications.length))), this.notifications.map((notification) => {
186
+ const status = invoiceNotificationStatusOf(notification.status);
187
+ return (h("xv-overflow-menu-v2-item", { value: notification.id, variant: OverflowMenuVariant.GHOST, disabled: notification.isRead, clickable: false }, h("div", { class: "notifications-item" }, h("i", { class: { far: true, [INVOICE_NOTIFICATION_STATUS_ICON[status]]: true } }), h("div", { class: "notifications-item-body" }, h("span", null, "Rechnungsentwurf f\u00FCr Auftrag ", notification.orderId, " ist ", INVOICE_NOTIFICATION_STATUS_TEXT[status]), h("xv-link-v2", { variant: notification.isRead ? 'ghost' : 'standalone', href: `/de-de/manager/ordersales/details/${notification.orderId}` }, "Auftrag anschauen")))));
188
+ }))));
190
189
  }
191
190
  _renderAccount() {
192
191
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
@@ -205,7 +204,7 @@ export class XvHeaderNext {
205
204
  render() {
206
205
  var _a, _b, _c, _d, _e;
207
206
  const isXvBrand = (((_a = this.metaNav) === null || _a === void 0 ? void 0 : _a['WhitelabelName']) || 'Xv') === 'Xv';
208
- return (h("header", { key: '19af5ee68042a36f7217b0b35a24a759fc4847db', class: "header" }, h("div", { key: '197dcbf9022f303f0f247cb5766d2e58dec60444', class: "header-wrapper" }, h("div", { key: 'ff984cbcd0294ae4d63c0c874d7788501b1e7e4a', class: "xv-container" }, h("div", { key: '92727fd92023f03c6e099321a5516ac07df40dff', class: "header-top" }, h("div", { key: '66209080f19179d302dcbe1c849c099b67067aa2', class: "header-top--left" }, h("xv-button-v2", { key: 'e0555bd0186c9ab16a67d99bb39a54d0a5bfa1c7', class: "menu-btn", variant: "ghost", onClick: this.toggleMobMenu }, h("i", { key: '444dfb14fe820289f909bcd225b67b9728ebee00', slot: "icon-left", class: { 'fa': true, 'fa-times': this.mobMenuOpen, 'fa-bars': !this.mobMenuOpen } })), this.metaNav && (h("a", { key: '363aa6b89fc901423d3e086b91bf0e87090aad77', href: `${window.location.origin}/` }, h("picture", { key: '10d0f780f4b3c8d82ddc42cc4bc3bcdfed3f6bb3' }, h("source", { key: '4f380ce8f4a2e0a49040b64b58c8ccde1b58c922', srcSet: ((_b = this.metaNav) === null || _b === void 0 ? void 0 : _b.LogoUrl) || 'https://www.crossvertise.com/ResourcePackages/Bootstrap/assets/dist/images/logo.svg', media: "(min-width: 990px)" }), h("img", { key: 'cddd6551b4610fb701d61dbe9b201b4e65f39f0d', src: ((_c = this.metaNav) === null || _c === void 0 ? void 0 : _c.LogoSmallUrl) || 'https://www.crossvertise.com/ResourcePackages/Bootstrap/assets/dist/images/logo-small.svg', onError: this.logoFallback, loading: "lazy", alt: "Crossvertise" })))), this.orgUnit && (h("xv-link-v2", { key: '5e2cde3553edb563b91eab3c5b36d6a9677c1c19', class: "header-top--orgUnit", variant: "standalone", href: "/de-de/mycrossvertise" }, this.orgUnit))), h("ul", { key: '19e47020fc57304c06ebe71182ed9c8308571fad', class: "header-top--right" }, this._renderLocaleSwitcher(), this._renderSearch(), this._renderImpersonationInfo(), !((_d = this.metaNav) === null || _d === void 0 ? void 0 : _d.IsManager) && isXvBrand && (h("li", { key: '5bc27068226b038fd783328ec595bf78c6f3cfbd' }, h("xv-link-v2", { key: 'd9d87362899586ccd41ef88a9fc8a111c9fe1653', variant: "ghost", href: "https://www.crossvertise.com/ueber-uns/kontakt" }, h("xv-button-v2", { key: '72a6d1e98efefd56ad8582b1e6b5209c081b26f1', variant: "ghost", size: SIZE_VAR.MD }, h("i", { key: 'c66c01eaabe1a295641813585681222162327c9f', class: "header-icon far fa-envelope" }), h("span", { key: 'ebdf99544154ecc3f04853decd776f0558cba660', class: "header-label xv-body-02" }, "Kontakt"))))), this._renderNotifications(), this._renderAccount(), !((_e = this.metaNav) === null || _e === void 0 ? void 0 : _e.IsManager) && isXvBrand && (h("li", { key: '288484baf69d63ff0f38e027294667ff0050dfe1' }, h("xv-link-v2", { key: '3759c87928c3c1e145dba55cdb73364ec4424cc9', variant: "ghost", href: "https://help.crossvertise.com" }, h("xv-button-v2", { key: '4d726ccab98a688a771925a9f10f5a02f79e68a5', variant: "ghost", size: SIZE_VAR.MD }, h("i", { key: '79d42dad22db9570d278db4fab32d6869a19c536', class: "header-icon far fa-question-circle" }), h("span", { key: '009a192511b8b6c19c461a94d772d1e6c4c39d56', class: "header-label xv-body-02" }, "Hilfe"))))), this._renderShoppingCart()))), h("div", { key: '31a71c085c02e36cbfe35412357cceff25cb752b', class: "header-wrapper--bg" }, h("div", { key: '9041f088f54852a0d144b01ecb2f730dc4b00e50', class: "xv-container" }, h("xv-mega-menu-next", { key: '6b8542f8962437488256b01611de616c391a9d94', open: this.mobMenuOpen, onOpenChange: this.closeMobMenu, menuData: this.menuData })))), h("xv-login-modal", { key: 'c6cb5f0f604d3e71bf22edafbbaa9313076d5b28', visible: this.showLoginModal, onClose: () => this.showLoginModal = false })));
207
+ return (h("header", { key: '13a9d3cc028a97c7c4d3db96c40e58cffa1fe33a', class: "header" }, h("div", { key: 'bc3da59737a300efcbbce9234b750a16c2c96ce3', class: "header-wrapper" }, h("div", { key: '294a3ab110a7bf53b2bed24db1b1a56a8ec66dcb', class: "xv-container" }, h("div", { key: '99fbcdaa2c4e72eb8661f8b8034e616bf99c1bc5', class: "header-top" }, h("div", { key: '1e703aa885c9462f06d44fdd9756f42b08e96241', class: "header-top--left" }, h("xv-button-v2", { key: 'f867ffe85b45e67b55ea30ce8bfa1da0352f1edc', class: "menu-btn", variant: "ghost", onClick: this.toggleMobMenu }, h("i", { key: 'f048441a12346222ac24df76f91bc03b6096bea2', slot: "icon-left", class: { 'fa': true, 'fa-times': this.mobMenuOpen, 'fa-bars': !this.mobMenuOpen } })), this.metaNav && (h("a", { key: '5fe60ea6eb240c62fd831e835ad89dad555b0edb', href: `${window.location.origin}/` }, h("picture", { key: '060830e01a97d6b7192202f719ca42c94d9075ff' }, h("source", { key: '5d1f714cb70131c2634d552e22305b78afb755bd', srcSet: ((_b = this.metaNav) === null || _b === void 0 ? void 0 : _b.LogoUrl) || 'https://www.crossvertise.com/ResourcePackages/Bootstrap/assets/dist/images/logo.svg', media: "(min-width: 990px)" }), h("img", { key: '90334b422808e153718dd43dd7404c23e0e69692', src: ((_c = this.metaNav) === null || _c === void 0 ? void 0 : _c.LogoSmallUrl) || 'https://www.crossvertise.com/ResourcePackages/Bootstrap/assets/dist/images/logo-small.svg', onError: this.logoFallback, loading: "lazy", alt: "Crossvertise" })))), this.orgUnit && (h("xv-link-v2", { key: '6cce595ce435c6fb05d74ee8ecd3ee58cc788f90', class: "header-top--orgUnit", variant: "standalone", href: "/de-de/mycrossvertise" }, this.orgUnit))), h("ul", { key: '6284fdfc7a99ab5a8194f13f55f5cccf47427d65', class: "header-top--right" }, this._renderLocaleSwitcher(), this._renderSearch(), this._renderImpersonationInfo(), !((_d = this.metaNav) === null || _d === void 0 ? void 0 : _d.IsManager) && isXvBrand && (h("li", { key: 'da5bd80e9d475358a16052e62c56fb6d4aa3370c' }, h("xv-link-v2", { key: '3096b8531e471537d5a16910456fcb6fe5de8af8', variant: "ghost", href: "https://www.crossvertise.com/ueber-uns/kontakt" }, h("xv-button-v2", { key: '4b1fa5e374d05f183a0fb39adec0b779cecd17e1', variant: "ghost", size: SIZE_VAR.MD }, h("i", { key: 'bb69f452fabd750451b993acbda13fda6e8f3da9', class: "header-icon far fa-envelope" }), h("span", { key: '62e89c597ae9b1cc77329fa36dd32f65d4e79511', class: "header-label xv-body-02" }, "Kontakt"))))), this._renderNotifications(), this._renderAccount(), !((_e = this.metaNav) === null || _e === void 0 ? void 0 : _e.IsManager) && isXvBrand && (h("li", { key: 'fc3cdac26fa33bcbd027d1605934e40e832fafd5' }, h("xv-link-v2", { key: 'fd1303e606ebfe4ca8944f2685e5b2f616fdcc47', variant: "ghost", href: "https://help.crossvertise.com" }, h("xv-button-v2", { key: '41f5daa4d30d7bed6ed032563a600036b4e230bd', variant: "ghost", size: SIZE_VAR.MD }, h("i", { key: '764c0abede96b262c562832a6bbebee70484c326', class: "header-icon far fa-question-circle" }), h("span", { key: 'c69623c9fbb3110998b9a3a80cff3cc404d1de60', class: "header-label xv-body-02" }, "Hilfe"))))), this._renderShoppingCart()))), h("div", { key: 'e6936d829410b2b7c7801ce388c71f9817d88fca', class: "header-wrapper--bg" }, h("div", { key: '674d7d606828838f6ad17a5eb274bed488ecb323', class: "xv-container" }, h("xv-mega-menu-next", { key: '18ceb4546630a258b04097ddaf16bb10bdf2a8fa', open: this.mobMenuOpen, onOpenChange: this.closeMobMenu, menuData: this.menuData })))), h("xv-login-modal", { key: 'a3404b9ad678f5d5c0efd687788631e828574e2d', visible: this.showLoginModal, onClose: () => this.showLoginModal = false })));
209
208
  }
210
209
  static get is() { return "xv-header-next"; }
211
210
  static get originalStyleUrls() {
@@ -278,6 +278,13 @@ export class XvOverflowMenu {
278
278
  const button = (h("button", { class: { btn: true, open: this.open }, onClick: this.onOpenToggle, disabled: this.disabled, "aria-haspopup": "menu", "aria-expanded": this.open ? 'true' : 'false', ref: (el) => (this.triggerButtonEl = el) }, h("slot", { name: "trigger" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 128 512" }, h("path", { d: "M64 368a48 48 0 1 0 0 96 48 48 0 1 0 0-96zm0-160a48 48 0 1 0 0 96 48 48 0 1 0 0-96zM112 96A48 48 0 1 0 16 96a48 48 0 1 0 96 0z" })))));
279
279
  return (h(Host, { class: "xv-overflow-menu", size: this.size }, this.tooltip ? h("xv-tooltip-v2", { message: this.tooltip }, button) : button, list));
280
280
  }
281
+ // Moving the host in the DOM — a framework reordering a list, say — disconnects and reconnects
282
+ // it, and the disconnect tears the anchor listener down. componentDidLoad does not run a second
283
+ // time, so without this the menu stays dead. Safe on the first mount: addEventListener discards
284
+ // a duplicate of the same handler, and setupAnchor is a no-op until anchor is set.
285
+ connectedCallback() {
286
+ this.setupAnchor();
287
+ }
281
288
  componentDidLoad() {
282
289
  this.setupAnchor();
283
290
  this.syncOpenState();
@@ -0,0 +1,65 @@
1
+ var SIZE_VAR;
2
+ (function (SIZE_VAR) {
3
+ SIZE_VAR["XS"] = "xs";
4
+ SIZE_VAR["SM"] = "sm";
5
+ SIZE_VAR["MD"] = "md";
6
+ SIZE_VAR["LG"] = "lg";
7
+ SIZE_VAR["XL"] = "xl";
8
+ })(SIZE_VAR || (SIZE_VAR = {}));
9
+ var XV_SORT_DIR;
10
+ (function (XV_SORT_DIR) {
11
+ XV_SORT_DIR["ASC"] = "asc";
12
+ XV_SORT_DIR["DESC"] = "desc";
13
+ XV_SORT_DIR["NONE"] = "none";
14
+ })(XV_SORT_DIR || (XV_SORT_DIR = {}));
15
+
16
+ const OverflowMenuVariant = {
17
+ DEFAULT: '',
18
+ GHOST: 'ghost',
19
+ };
20
+ /** Tag used to discover menu items (roving keyboard navigation, size mirroring). */
21
+ const OverflowMenuItemSelector = 'xv-overflow-menu-v2-item';
22
+
23
+ /**
24
+ * Status of a draft-invoice notification, mirroring the platform's
25
+ * `InvoiceNotificationPayloadStatus` (Xv.Domain/Notifications/Payloads).
26
+ *
27
+ * The numeric values are the wire format: `/de-de/api/notifications/list` serializes the
28
+ * enum by ordinal, so these MUST stay in sync with the backend. The header used to compare
29
+ * `status === 1` while treating it as a failure, so a draft invoice that had been generated
30
+ * was shown with the error icon and the text "ist ausstehend" (MAR-15569).
31
+ */
32
+ var InvoiceNotificationStatus;
33
+ (function (InvoiceNotificationStatus) {
34
+ InvoiceNotificationStatus[InvoiceNotificationStatus["PENDING"] = 0] = "PENDING";
35
+ InvoiceNotificationStatus[InvoiceNotificationStatus["COMPLETED"] = 1] = "COMPLETED";
36
+ InvoiceNotificationStatus[InvoiceNotificationStatus["FAILED"] = 2] = "FAILED";
37
+ })(InvoiceNotificationStatus || (InvoiceNotificationStatus = {}));
38
+ /** Bell label per status. German only — this component carries no i18n layer. */
39
+ const INVOICE_NOTIFICATION_STATUS_TEXT = {
40
+ [InvoiceNotificationStatus.PENDING]: 'ausstehend',
41
+ [InvoiceNotificationStatus.COMPLETED]: 'generiert',
42
+ [InvoiceNotificationStatus.FAILED]: 'fehlgeschlagen',
43
+ };
44
+ /** Font Awesome icon per status. */
45
+ const INVOICE_NOTIFICATION_STATUS_ICON = {
46
+ [InvoiceNotificationStatus.PENDING]: 'fa-clock',
47
+ [InvoiceNotificationStatus.COMPLETED]: 'fa-check-circle',
48
+ [InvoiceNotificationStatus.FAILED]: 'fa-times-circle',
49
+ };
50
+ /**
51
+ * Falls back to PENDING for an unknown value so a new backend status renders as
52
+ * "waiting" rather than silently claiming success or failure.
53
+ */
54
+ function invoiceNotificationStatusOf(status) {
55
+ switch (status) {
56
+ case InvoiceNotificationStatus.COMPLETED:
57
+ return InvoiceNotificationStatus.COMPLETED;
58
+ case InvoiceNotificationStatus.FAILED:
59
+ return InvoiceNotificationStatus.FAILED;
60
+ default:
61
+ return InvoiceNotificationStatus.PENDING;
62
+ }
63
+ }
64
+
65
+ export { INVOICE_NOTIFICATION_STATUS_ICON as I, OverflowMenuVariant as O, SIZE_VAR as S, XV_SORT_DIR as X, INVOICE_NOTIFICATION_STATUS_TEXT as a, OverflowMenuItemSelector as b, invoiceNotificationStatusOf as i };
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, a as getElement, F as Fragment } from './index-DmxA2ysB.js';
2
2
  import { u as uidGenerator, f as forEach, r as resolveFieldMessage, s as setAttr, c as resolveWhitelabel, a as api, g as getMetaNav, b as getBaseUrl, d as debounce$1 } from './index-CQm2sRKT.js';
3
- import { S as SIZE_VAR, X as XV_SORT_DIR, O as OverflowMenuVariant, a as OverflowMenuItemSelector } from './_vars-CDEU4jkD.js';
3
+ import { S as SIZE_VAR, X as XV_SORT_DIR, O as OverflowMenuVariant, I as INVOICE_NOTIFICATION_STATUS_ICON, a as INVOICE_NOTIFICATION_STATUS_TEXT, i as invoiceNotificationStatusOf, b as OverflowMenuItemSelector } from './_vars-CS4ouQ2K.js';
4
4
 
5
5
  const xvAccordionCss = () => `:host{display:block}`;
6
6
 
@@ -82668,12 +82668,10 @@ const XvHeader = class {
82668
82668
  var _a;
82669
82669
  if (!((_a = this.metaNav) === null || _a === void 0 ? void 0 : _a.IsManager))
82670
82670
  return null;
82671
- return (h("li", { class: "notifications" }, h("xv-overflow-menu-v2", { position: "right", size: SIZE_VAR.MD }, h("span", { slot: "trigger", class: "fa-stack" }, h("i", { class: "notifications-icon far fa-bell fa-stack-1x" }), this.notifications.length > 0 && (h("xv-tag-v2", { class: "counter-badge counter-badge--absolute", bg: "var(--icon-interactive, #97BF0D)", color: "var(--text-inverse, #FFF)" }, this.notifications.length))), this.notifications.map((notification) => (h("xv-overflow-menu-v2-item", { value: notification.id, variant: OverflowMenuVariant.GHOST, disabled: notification.isRead, clickable: false }, h("div", { class: "notifications-item" }, h("i", { class: {
82672
- far: true,
82673
- 'fa-clock': !notification.status,
82674
- 'fa-times-circle': notification.status === 1,
82675
- 'fa-circle': notification.status && notification.status !== 1,
82676
- } }), h("div", { class: "notifications-item-body" }, h("span", null, "Rechnungsentwurf f\u00FCr Auftrag ", notification.orderId, " ist ausstehend"), h("xv-link-v2", { variant: notification.isRead ? 'ghost' : 'standalone', href: `/de-de/manager/ordersales/details/${notification.orderId}` }, "Auftrag anschauen")))))))));
82671
+ return (h("li", { class: "notifications" }, h("xv-overflow-menu-v2", { position: "right", size: SIZE_VAR.MD }, h("span", { slot: "trigger", class: "fa-stack" }, h("i", { class: "notifications-icon far fa-bell fa-stack-1x" }), this.notifications.length > 0 && (h("xv-tag-v2", { class: "counter-badge counter-badge--absolute", bg: "var(--icon-interactive, #97BF0D)", color: "var(--text-inverse, #FFF)" }, this.notifications.length))), this.notifications.map((notification) => {
82672
+ const status = invoiceNotificationStatusOf(notification.status);
82673
+ return (h("xv-overflow-menu-v2-item", { value: notification.id, variant: OverflowMenuVariant.GHOST, disabled: notification.isRead, clickable: false }, h("div", { class: "notifications-item" }, h("i", { class: { far: true, [INVOICE_NOTIFICATION_STATUS_ICON[status]]: true } }), h("div", { class: "notifications-item-body" }, h("span", null, "Rechnungsentwurf f\u00FCr Auftrag ", notification.orderId, " ist ", INVOICE_NOTIFICATION_STATUS_TEXT[status]), h("xv-link-v2", { variant: notification.isRead ? 'ghost' : 'standalone', href: `/de-de/manager/ordersales/details/${notification.orderId}` }, "Auftrag anschauen")))));
82674
+ }))));
82677
82675
  }
82678
82676
  _renderAccount() {
82679
82677
  var _a, _b, _c, _d, _e, _f, _g, _h;
@@ -82698,7 +82696,7 @@ const XvHeader = class {
82698
82696
  render() {
82699
82697
  var _a, _b, _c, _d, _e;
82700
82698
  const isXvBrand = (((_a = this.metaNav) === null || _a === void 0 ? void 0 : _a['WhitelabelName']) || 'Xv') === 'Xv';
82701
- return (h("header", { key: '9477fea03faf7b1eee3a59be46a6b6efffabe7ae', class: "header" }, h("div", { key: '974c597e788966d68bbc0af46ef1c56e5d49c291', class: "header-wrapper" }, h("div", { key: 'c4efe27850b74ccaf75864abbee66e04fdd39aba', class: "xv-container" }, h("div", { key: '0dc3df2ffc4dbae8caeb996cbd6bd1293c51126f', class: "header-top" }, h("div", { key: 'fc2ba21ef07a79bf88aa94049222f7ad31842509', class: "header-top--left" }, h("xv-button-v2", { key: '13fc5ad1a0b7587ee223a55c5a6f5b5490935c76', class: "menu-btn", variant: "ghost", onClick: this.toggleMobMenu }, h("i", { key: 'f8baece2d445514f1e30083d109e9a547d84aa9a', slot: "icon-left", class: { 'fa': true, 'fa-times': this.mobMenuOpen, 'fa-bars': !this.mobMenuOpen } })), this.metaNav && (h("a", { key: '506f618928c24e1a8d804e1b362fdc8fdd6662e7', href: `${window.location.origin}/` }, h("picture", { key: '4c0ddbce5bac9bdb282bbff733e9bb781dd47645' }, h("source", { key: '3083b3d605b1c2d30f5dc1935cf1e298b93c5c19', srcSet: ((_b = this.metaNav) === null || _b === void 0 ? void 0 : _b.LogoUrl) || 'https://www.crossvertise.com/ResourcePackages/Bootstrap/assets/dist/images/logo.svg', media: "(min-width: 990px)" }), h("img", { key: '96f2386509b36fd81954819936154751f042fce0', src: ((_c = this.metaNav) === null || _c === void 0 ? void 0 : _c.LogoSmallUrl) || 'https://www.crossvertise.com/ResourcePackages/Bootstrap/assets/dist/images/logo-small.svg', onError: this.logoFallback, loading: "lazy", alt: "Crossvertise" })))), this.orgUnit && (h("xv-link-v2", { key: '3bb46d9af623db9e54c2c51630a83ce4e384b479', class: "header-top--orgUnit", variant: "standalone", href: "/de-de/mycrossvertise" }, this.orgUnit))), h("ul", { key: '36e14a1481748def91b5e76f82631e76d35ae49c', class: "header-top--right" }, this._renderSearch(), this._renderImpersonationInfo(), !((_d = this.metaNav) === null || _d === void 0 ? void 0 : _d.IsManager) && isXvBrand && (h("li", { key: '07c00dae34dfd6f177ff3803f88755339422eec4' }, h("xv-link-v2", { key: '573110e4de76b5a9aab3bb5c21519b68a4236de7', variant: "ghost", href: "https://www.crossvertise.com/ueber-uns/kontakt" }, h("xv-button-v2", { key: '318e47e08a44e34bf10a38d8c2901a2d64bfcf2b', variant: "ghost", size: SIZE_VAR.MD }, h("i", { key: 'd44b57c9ccd07db75c19dae59123c0320241cb3e', class: "header-icon far fa-envelope" }), h("span", { key: 'c9e66d1395ab5b690a2e673994a137807232a084', class: "header-label xv-body-02" }, "Kontakt"))))), this._renderNotifications(), this._renderAccount(), !((_e = this.metaNav) === null || _e === void 0 ? void 0 : _e.IsManager) && isXvBrand && (h("li", { key: 'ca2f1556456c788b78c4929f2d64e7c7f239c4fe' }, h("xv-link-v2", { key: '47f0a74790fb2331a404d515e5fbe8369458146c', variant: "ghost", href: "https://help.crossvertise.com" }, h("xv-button-v2", { key: 'ae850b8f6d7c1da9ea3ba704adb1d670720dff7c', variant: "ghost", size: SIZE_VAR.MD }, h("i", { key: '8c8a857e172f937d8eba8083a63e2ff8662e06cb', class: "header-icon far fa-question-circle" }), h("span", { key: 'bb86a87d43293d313654440a126c4e8ea5d228c9', class: "header-label xv-body-02" }, "Hilfe"))))), this._renderShoppingCart()))), h("div", { key: '4b0386ef89ed643cd42b6232b10064d6bc73beab', class: "header-wrapper--bg" }, h("div", { key: '83ef95df9b7820eae211b958f6f1bf57d046905b', class: "xv-container" }, h("xv-mega-menu", { key: '763117fc0da850b8b1bbea389dcaa3cfacef4847', open: this.mobMenuOpen, onOpenChange: this.closeMobMenu })))), h("xv-login-modal", { key: 'b7252b1eb7527f6dbab4a1cca972d47b75a66b14', visible: this.showLoginModal, onClose: () => this.showLoginModal = false })));
82699
+ return (h("header", { key: 'c1dadf87ee5ac86371189f3c5326fdcbcfb9a486', class: "header" }, h("div", { key: '939c81c9e543c9987a8ad2910a2be103db1a5081', class: "header-wrapper" }, h("div", { key: 'f7322ff8b33db4e3f9974228f7fdc34aaf3da8a4', class: "xv-container" }, h("div", { key: '3ee4de80cfcc4239b12b0ab52908ea0e7d34aaab', class: "header-top" }, h("div", { key: '8eeada6b815392eafa3b06ad724ad931d3814235', class: "header-top--left" }, h("xv-button-v2", { key: '6718cbb3b0d486290d6e3d287f92aafe3059a773', class: "menu-btn", variant: "ghost", onClick: this.toggleMobMenu }, h("i", { key: '5c291e5f78889fd90b18457b171ef873f05ac92b', slot: "icon-left", class: { 'fa': true, 'fa-times': this.mobMenuOpen, 'fa-bars': !this.mobMenuOpen } })), this.metaNav && (h("a", { key: '3786b0153c70e32ed6e0fd888041f5f1371352dd', href: `${window.location.origin}/` }, h("picture", { key: 'b8e3315601275b5e37521bdfc8d68279774eb790' }, h("source", { key: '447e77d0b63478f5cc6a4947536dfeb75de0957c', srcSet: ((_b = this.metaNav) === null || _b === void 0 ? void 0 : _b.LogoUrl) || 'https://www.crossvertise.com/ResourcePackages/Bootstrap/assets/dist/images/logo.svg', media: "(min-width: 990px)" }), h("img", { key: '75c5a3c7b5181a4ee7ca7daf010ed4283a901aba', src: ((_c = this.metaNav) === null || _c === void 0 ? void 0 : _c.LogoSmallUrl) || 'https://www.crossvertise.com/ResourcePackages/Bootstrap/assets/dist/images/logo-small.svg', onError: this.logoFallback, loading: "lazy", alt: "Crossvertise" })))), this.orgUnit && (h("xv-link-v2", { key: '46caa5be0cc5ef85d70527fbe3cf5d410abd9cab', class: "header-top--orgUnit", variant: "standalone", href: "/de-de/mycrossvertise" }, this.orgUnit))), h("ul", { key: 'cc0c800101e159c3ae6a887cc56c912ba12df29c', class: "header-top--right" }, this._renderSearch(), this._renderImpersonationInfo(), !((_d = this.metaNav) === null || _d === void 0 ? void 0 : _d.IsManager) && isXvBrand && (h("li", { key: '540fab8968f832d078d77febcac4f9d23b686888' }, h("xv-link-v2", { key: '7c59f497dc272169b5d6de4d5caf5758bd82fed0', variant: "ghost", href: "https://www.crossvertise.com/ueber-uns/kontakt" }, h("xv-button-v2", { key: '0692e42a64c68979f0886566ccdca46a38ec21cd', variant: "ghost", size: SIZE_VAR.MD }, h("i", { key: '45dacc89068ff5af15a4f73c1c627ec5b71bab7f', class: "header-icon far fa-envelope" }), h("span", { key: 'a995848018fb4c251dd992c8a8458671ed57bb5a', class: "header-label xv-body-02" }, "Kontakt"))))), this._renderNotifications(), this._renderAccount(), !((_e = this.metaNav) === null || _e === void 0 ? void 0 : _e.IsManager) && isXvBrand && (h("li", { key: 'd7a86b909929af0126eef781321bf14cd07f8b09' }, h("xv-link-v2", { key: 'a9b9bc5c7e2496bcb36e1b1e30afe6183173ddd9', variant: "ghost", href: "https://help.crossvertise.com" }, h("xv-button-v2", { key: '5a943f49cfb73ec9a19368cf2ea5aef2f8c6194f', variant: "ghost", size: SIZE_VAR.MD }, h("i", { key: '0d892d7ed7a6a3777c3180a5101df8029e7fedf2', class: "header-icon far fa-question-circle" }), h("span", { key: 'd2ac5acb478b819eef302bfbb008294ffbd4706b', class: "header-label xv-body-02" }, "Hilfe"))))), this._renderShoppingCart()))), h("div", { key: '12b4d4b721f3987f69bb8c2024cf00a541dedb09', class: "header-wrapper--bg" }, h("div", { key: '029bb783f3204dccee6da34e7546944cc00331bc', class: "xv-container" }, h("xv-mega-menu", { key: '1542e98a5cde254587138abf550d9744f022c93a', open: this.mobMenuOpen, onOpenChange: this.closeMobMenu })))), h("xv-login-modal", { key: '80ad843540761ab1aa41cb12a697736ea5c4fbe2', visible: this.showLoginModal, onClose: () => this.showLoginModal = false })));
82702
82700
  }
82703
82701
  get el() { return getElement(this); }
82704
82702
  };
@@ -83418,6 +83416,13 @@ const XvOverflowMenu = class {
83418
83416
  const button = (h("button", { class: { btn: true, open: this.open }, onClick: this.onOpenToggle, disabled: this.disabled, "aria-haspopup": "menu", "aria-expanded": this.open ? 'true' : 'false', ref: (el) => (this.triggerButtonEl = el) }, h("slot", { name: "trigger" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 128 512" }, h("path", { d: "M64 368a48 48 0 1 0 0 96 48 48 0 1 0 0-96zm0-160a48 48 0 1 0 0 96 48 48 0 1 0 0-96zM112 96A48 48 0 1 0 16 96a48 48 0 1 0 96 0z" })))));
83419
83417
  return (h(Host, { class: "xv-overflow-menu", size: this.size }, this.tooltip ? h("xv-tooltip-v2", { message: this.tooltip }, button) : button, list));
83420
83418
  }
83419
+ // Moving the host in the DOM — a framework reordering a list, say — disconnects and reconnects
83420
+ // it, and the disconnect tears the anchor listener down. componentDidLoad does not run a second
83421
+ // time, so without this the menu stays dead. Safe on the first mount: addEventListener discards
83422
+ // a duplicate of the same handler, and setupAnchor is a no-op until anchor is set.
83423
+ connectedCallback() {
83424
+ this.setupAnchor();
83425
+ }
83421
83426
  componentDidLoad() {
83422
83427
  this.setupAnchor();
83423
83428
  this.syncOpenState();
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, F as Fragment, a as getElement } from './index-DmxA2ysB.js';
2
- import { S as SIZE_VAR, O as OverflowMenuVariant } from './_vars-CDEU4jkD.js';
2
+ import { S as SIZE_VAR, O as OverflowMenuVariant, I as INVOICE_NOTIFICATION_STATUS_ICON, a as INVOICE_NOTIFICATION_STATUS_TEXT, i as invoiceNotificationStatusOf } from './_vars-CS4ouQ2K.js';
3
3
  import { a as api, g as getMetaNav, b as getBaseUrl, d as debounce } from './index-CQm2sRKT.js';
4
4
 
5
5
  const userMagnifyingGlassRegularFullSvg = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NDAgNjQwIj48IS0tIUZvbnQgQXdlc29tZSBQcm8gNy4xLjAgYnkgQGZvbnRhd2Vzb21lIC0gaHR0cHM6Ly9mb250YXdlc29tZS5jb20gTGljZW5zZSAtIGh0dHBzOi8vZm9udGF3ZXNvbWUuY29tL2xpY2Vuc2UgKENvbW1lcmNpYWwgTGljZW5zZSkgQ29weXJpZ2h0IDIwMjUgRm9udGljb25zLCBJbmMuLS0+PHBhdGggZD0iTTE3Ni41IDE5MkMxNzYuNSAxNDcuOCAyMTIuMyAxMTIgMjU2LjUgMTEyQzMwMC43IDExMiAzMzYuNSAxNDcuOCAzMzYuNSAxOTJDMzM2LjUgMjM2LjIgMzAwLjcgMjcyIDI1Ni41IDI3MkMyMTIuMyAyNzIgMTc2LjUgMjM2LjIgMTc2LjUgMTkyek0zODQuNSAxOTJDMzg0LjUgMTIxLjMgMzI3LjIgNjQgMjU2LjUgNjRDMTg1LjggNjQgMTI4LjUgMTIxLjMgMTI4LjUgMTkyQzEyOC41IDI2Mi43IDE4NS44IDMyMCAyNTYuNSAzMjBDMzI3LjIgMzIwIDM4NC41IDI2Mi43IDM4NC41IDE5MnpNODAuNSA1NDRDODAuNSA0NzMuMyAxMzcuOCA0MTYgMjA4LjUgNDE2TDI4OC43IDQxNkMyODkuNSAzOTkuMiAyOTIuNyAzODMuMSAyOTguMSAzNjhMMjA4LjUgMzY4QzExMS4zIDM2OCAzMi41IDQ0Ni44IDMyLjUgNTQ0TDMyLjUgNTUyQzMyLjUgNTY1LjMgNDMuMiA1NzYgNTYuNSA1NzZDNjkuOCA1NzYgODAuNSA1NjUuMyA4MC41IDU1Mkw4MC41IDU0NHpNNDU2LjUgMzUyQzQ5Ni4zIDM1MiA1MjguNSAzODQuMiA1MjguNSA0MjRDNTI4LjUgNDYzLjggNDk2LjMgNDk2IDQ1Ni41IDQ5NkM0MTYuNyA0OTYgMzg0LjUgNDYzLjggMzg0LjUgNDI0QzM4NC41IDM4NC4yIDQxNi43IDM1MiA0NTYuNSAzNTJ6TTQ1Ni41IDU0NEM0ODAuOSA1NDQgNTAzLjYgNTM2LjcgNTIyLjYgNTI0LjJMNTgzLjUgNTg1LjFDNTkyLjkgNTk0LjUgNjA4LjEgNTk0LjUgNjE3LjQgNTg1LjFDNjI2LjcgNTc1LjcgNjI2LjggNTYwLjUgNjE3LjQgNTUxLjJMNTU2LjUgNDkwLjNDNTY5LjEgNDcxLjMgNTc2LjQgNDQ4LjUgNTc2LjQgNDI0QzU3Ni40IDM1Ny43IDUyMi43IDMwNCA0NTYuNCAzMDRDMzkwLjEgMzA0IDMzNi40IDM1Ny43IDMzNi40IDQyNEMzMzYuNCA0OTAuMyAzOTAuMSA1NDQgNDU2LjQgNTQ0eiIvPjwvc3ZnPg==';
@@ -173,12 +173,10 @@ const XvHeaderNext = class {
173
173
  var _a;
174
174
  if (!((_a = this.metaNav) === null || _a === void 0 ? void 0 : _a.IsManager))
175
175
  return null;
176
- return (h("li", { class: "notifications" }, h("xv-overflow-menu-v2", { position: "right", size: SIZE_VAR.MD }, h("span", { slot: "trigger", class: "fa-stack" }, h("i", { class: "notifications-icon far fa-bell fa-stack-1x" }), this.notifications.length > 0 && (h("xv-tag-v2", { class: "counter-badge counter-badge--absolute", bg: "var(--icon-interactive, #97BF0D)", color: "var(--text-inverse, #FFF)" }, this.notifications.length))), this.notifications.map((notification) => (h("xv-overflow-menu-v2-item", { value: notification.id, variant: OverflowMenuVariant.GHOST, disabled: notification.isRead, clickable: false }, h("div", { class: "notifications-item" }, h("i", { class: {
177
- far: true,
178
- 'fa-clock': !notification.status,
179
- 'fa-times-circle': notification.status === 1,
180
- 'fa-circle': notification.status && notification.status !== 1,
181
- } }), h("div", { class: "notifications-item-body" }, h("span", null, "Rechnungsentwurf f\u00FCr Auftrag ", notification.orderId, " ist ausstehend"), h("xv-link-v2", { variant: notification.isRead ? 'ghost' : 'standalone', href: `/de-de/manager/ordersales/details/${notification.orderId}` }, "Auftrag anschauen")))))))));
176
+ return (h("li", { class: "notifications" }, h("xv-overflow-menu-v2", { position: "right", size: SIZE_VAR.MD }, h("span", { slot: "trigger", class: "fa-stack" }, h("i", { class: "notifications-icon far fa-bell fa-stack-1x" }), this.notifications.length > 0 && (h("xv-tag-v2", { class: "counter-badge counter-badge--absolute", bg: "var(--icon-interactive, #97BF0D)", color: "var(--text-inverse, #FFF)" }, this.notifications.length))), this.notifications.map((notification) => {
177
+ const status = invoiceNotificationStatusOf(notification.status);
178
+ return (h("xv-overflow-menu-v2-item", { value: notification.id, variant: OverflowMenuVariant.GHOST, disabled: notification.isRead, clickable: false }, h("div", { class: "notifications-item" }, h("i", { class: { far: true, [INVOICE_NOTIFICATION_STATUS_ICON[status]]: true } }), h("div", { class: "notifications-item-body" }, h("span", null, "Rechnungsentwurf f\u00FCr Auftrag ", notification.orderId, " ist ", INVOICE_NOTIFICATION_STATUS_TEXT[status]), h("xv-link-v2", { variant: notification.isRead ? 'ghost' : 'standalone', href: `/de-de/manager/ordersales/details/${notification.orderId}` }, "Auftrag anschauen")))));
179
+ }))));
182
180
  }
183
181
  _renderAccount() {
184
182
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
@@ -197,7 +195,7 @@ const XvHeaderNext = class {
197
195
  render() {
198
196
  var _a, _b, _c, _d, _e;
199
197
  const isXvBrand = (((_a = this.metaNav) === null || _a === void 0 ? void 0 : _a['WhitelabelName']) || 'Xv') === 'Xv';
200
- return (h("header", { key: '19af5ee68042a36f7217b0b35a24a759fc4847db', class: "header" }, h("div", { key: '197dcbf9022f303f0f247cb5766d2e58dec60444', class: "header-wrapper" }, h("div", { key: 'ff984cbcd0294ae4d63c0c874d7788501b1e7e4a', class: "xv-container" }, h("div", { key: '92727fd92023f03c6e099321a5516ac07df40dff', class: "header-top" }, h("div", { key: '66209080f19179d302dcbe1c849c099b67067aa2', class: "header-top--left" }, h("xv-button-v2", { key: 'e0555bd0186c9ab16a67d99bb39a54d0a5bfa1c7', class: "menu-btn", variant: "ghost", onClick: this.toggleMobMenu }, h("i", { key: '444dfb14fe820289f909bcd225b67b9728ebee00', slot: "icon-left", class: { 'fa': true, 'fa-times': this.mobMenuOpen, 'fa-bars': !this.mobMenuOpen } })), this.metaNav && (h("a", { key: '363aa6b89fc901423d3e086b91bf0e87090aad77', href: `${window.location.origin}/` }, h("picture", { key: '10d0f780f4b3c8d82ddc42cc4bc3bcdfed3f6bb3' }, h("source", { key: '4f380ce8f4a2e0a49040b64b58c8ccde1b58c922', srcSet: ((_b = this.metaNav) === null || _b === void 0 ? void 0 : _b.LogoUrl) || 'https://www.crossvertise.com/ResourcePackages/Bootstrap/assets/dist/images/logo.svg', media: "(min-width: 990px)" }), h("img", { key: 'cddd6551b4610fb701d61dbe9b201b4e65f39f0d', src: ((_c = this.metaNav) === null || _c === void 0 ? void 0 : _c.LogoSmallUrl) || 'https://www.crossvertise.com/ResourcePackages/Bootstrap/assets/dist/images/logo-small.svg', onError: this.logoFallback, loading: "lazy", alt: "Crossvertise" })))), this.orgUnit && (h("xv-link-v2", { key: '5e2cde3553edb563b91eab3c5b36d6a9677c1c19', class: "header-top--orgUnit", variant: "standalone", href: "/de-de/mycrossvertise" }, this.orgUnit))), h("ul", { key: '19e47020fc57304c06ebe71182ed9c8308571fad', class: "header-top--right" }, this._renderLocaleSwitcher(), this._renderSearch(), this._renderImpersonationInfo(), !((_d = this.metaNav) === null || _d === void 0 ? void 0 : _d.IsManager) && isXvBrand && (h("li", { key: '5bc27068226b038fd783328ec595bf78c6f3cfbd' }, h("xv-link-v2", { key: 'd9d87362899586ccd41ef88a9fc8a111c9fe1653', variant: "ghost", href: "https://www.crossvertise.com/ueber-uns/kontakt" }, h("xv-button-v2", { key: '72a6d1e98efefd56ad8582b1e6b5209c081b26f1', variant: "ghost", size: SIZE_VAR.MD }, h("i", { key: 'c66c01eaabe1a295641813585681222162327c9f', class: "header-icon far fa-envelope" }), h("span", { key: 'ebdf99544154ecc3f04853decd776f0558cba660', class: "header-label xv-body-02" }, "Kontakt"))))), this._renderNotifications(), this._renderAccount(), !((_e = this.metaNav) === null || _e === void 0 ? void 0 : _e.IsManager) && isXvBrand && (h("li", { key: '288484baf69d63ff0f38e027294667ff0050dfe1' }, h("xv-link-v2", { key: '3759c87928c3c1e145dba55cdb73364ec4424cc9', variant: "ghost", href: "https://help.crossvertise.com" }, h("xv-button-v2", { key: '4d726ccab98a688a771925a9f10f5a02f79e68a5', variant: "ghost", size: SIZE_VAR.MD }, h("i", { key: '79d42dad22db9570d278db4fab32d6869a19c536', class: "header-icon far fa-question-circle" }), h("span", { key: '009a192511b8b6c19c461a94d772d1e6c4c39d56', class: "header-label xv-body-02" }, "Hilfe"))))), this._renderShoppingCart()))), h("div", { key: '31a71c085c02e36cbfe35412357cceff25cb752b', class: "header-wrapper--bg" }, h("div", { key: '9041f088f54852a0d144b01ecb2f730dc4b00e50', class: "xv-container" }, h("xv-mega-menu-next", { key: '6b8542f8962437488256b01611de616c391a9d94', open: this.mobMenuOpen, onOpenChange: this.closeMobMenu, menuData: this.menuData })))), h("xv-login-modal", { key: 'c6cb5f0f604d3e71bf22edafbbaa9313076d5b28', visible: this.showLoginModal, onClose: () => this.showLoginModal = false })));
198
+ return (h("header", { key: '13a9d3cc028a97c7c4d3db96c40e58cffa1fe33a', class: "header" }, h("div", { key: 'bc3da59737a300efcbbce9234b750a16c2c96ce3', class: "header-wrapper" }, h("div", { key: '294a3ab110a7bf53b2bed24db1b1a56a8ec66dcb', class: "xv-container" }, h("div", { key: '99fbcdaa2c4e72eb8661f8b8034e616bf99c1bc5', class: "header-top" }, h("div", { key: '1e703aa885c9462f06d44fdd9756f42b08e96241', class: "header-top--left" }, h("xv-button-v2", { key: 'f867ffe85b45e67b55ea30ce8bfa1da0352f1edc', class: "menu-btn", variant: "ghost", onClick: this.toggleMobMenu }, h("i", { key: 'f048441a12346222ac24df76f91bc03b6096bea2', slot: "icon-left", class: { 'fa': true, 'fa-times': this.mobMenuOpen, 'fa-bars': !this.mobMenuOpen } })), this.metaNav && (h("a", { key: '5fe60ea6eb240c62fd831e835ad89dad555b0edb', href: `${window.location.origin}/` }, h("picture", { key: '060830e01a97d6b7192202f719ca42c94d9075ff' }, h("source", { key: '5d1f714cb70131c2634d552e22305b78afb755bd', srcSet: ((_b = this.metaNav) === null || _b === void 0 ? void 0 : _b.LogoUrl) || 'https://www.crossvertise.com/ResourcePackages/Bootstrap/assets/dist/images/logo.svg', media: "(min-width: 990px)" }), h("img", { key: '90334b422808e153718dd43dd7404c23e0e69692', src: ((_c = this.metaNav) === null || _c === void 0 ? void 0 : _c.LogoSmallUrl) || 'https://www.crossvertise.com/ResourcePackages/Bootstrap/assets/dist/images/logo-small.svg', onError: this.logoFallback, loading: "lazy", alt: "Crossvertise" })))), this.orgUnit && (h("xv-link-v2", { key: '6cce595ce435c6fb05d74ee8ecd3ee58cc788f90', class: "header-top--orgUnit", variant: "standalone", href: "/de-de/mycrossvertise" }, this.orgUnit))), h("ul", { key: '6284fdfc7a99ab5a8194f13f55f5cccf47427d65', class: "header-top--right" }, this._renderLocaleSwitcher(), this._renderSearch(), this._renderImpersonationInfo(), !((_d = this.metaNav) === null || _d === void 0 ? void 0 : _d.IsManager) && isXvBrand && (h("li", { key: 'da5bd80e9d475358a16052e62c56fb6d4aa3370c' }, h("xv-link-v2", { key: '3096b8531e471537d5a16910456fcb6fe5de8af8', variant: "ghost", href: "https://www.crossvertise.com/ueber-uns/kontakt" }, h("xv-button-v2", { key: '4b1fa5e374d05f183a0fb39adec0b779cecd17e1', variant: "ghost", size: SIZE_VAR.MD }, h("i", { key: 'bb69f452fabd750451b993acbda13fda6e8f3da9', class: "header-icon far fa-envelope" }), h("span", { key: '62e89c597ae9b1cc77329fa36dd32f65d4e79511', class: "header-label xv-body-02" }, "Kontakt"))))), this._renderNotifications(), this._renderAccount(), !((_e = this.metaNav) === null || _e === void 0 ? void 0 : _e.IsManager) && isXvBrand && (h("li", { key: 'fc3cdac26fa33bcbd027d1605934e40e832fafd5' }, h("xv-link-v2", { key: 'fd1303e606ebfe4ca8944f2685e5b2f616fdcc47', variant: "ghost", href: "https://help.crossvertise.com" }, h("xv-button-v2", { key: '41f5daa4d30d7bed6ed032563a600036b4e230bd', variant: "ghost", size: SIZE_VAR.MD }, h("i", { key: '764c0abede96b262c562832a6bbebee70484c326', class: "header-icon far fa-question-circle" }), h("span", { key: 'c69623c9fbb3110998b9a3a80cff3cc404d1de60', class: "header-label xv-body-02" }, "Hilfe"))))), this._renderShoppingCart()))), h("div", { key: 'e6936d829410b2b7c7801ce388c71f9817d88fca', class: "header-wrapper--bg" }, h("div", { key: '674d7d606828838f6ad17a5eb274bed488ecb323', class: "xv-container" }, h("xv-mega-menu-next", { key: '18ceb4546630a258b04097ddaf16bb10bdf2a8fa', open: this.mobMenuOpen, onOpenChange: this.closeMobMenu, menuData: this.menuData })))), h("xv-login-modal", { key: 'a3404b9ad678f5d5c0efd687788631e828574e2d', visible: this.showLoginModal, onClose: () => this.showLoginModal = false })));
201
199
  }
202
200
  get el() { return getElement(this); }
203
201
  };
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Status of a draft-invoice notification, mirroring the platform's
3
+ * `InvoiceNotificationPayloadStatus` (Xv.Domain/Notifications/Payloads).
4
+ *
5
+ * The numeric values are the wire format: `/de-de/api/notifications/list` serializes the
6
+ * enum by ordinal, so these MUST stay in sync with the backend. The header used to compare
7
+ * `status === 1` while treating it as a failure, so a draft invoice that had been generated
8
+ * was shown with the error icon and the text "ist ausstehend" (MAR-15569).
9
+ */
10
+ export declare enum InvoiceNotificationStatus {
11
+ PENDING = 0,
12
+ COMPLETED = 1,
13
+ FAILED = 2
14
+ }
15
+ /** Bell label per status. German only — this component carries no i18n layer. */
16
+ export declare const INVOICE_NOTIFICATION_STATUS_TEXT: Record<InvoiceNotificationStatus, string>;
17
+ /** Font Awesome icon per status. */
18
+ export declare const INVOICE_NOTIFICATION_STATUS_ICON: Record<InvoiceNotificationStatus, string>;
19
+ /**
20
+ * Falls back to PENDING for an unknown value so a new backend status renders as
21
+ * "waiting" rather than silently claiming success or failure.
22
+ */
23
+ export declare function invoiceNotificationStatusOf(status: number | null | undefined): InvoiceNotificationStatus;