xv-webcomponents 1.17.1-staging.0 → 1.17.3-dev.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/loader.cjs.js +1 -1
- package/dist/cjs/{xv-accordion-v2_45.cjs.entry.js → xv-accordion-v2_47.cjs.entry.js} +402 -67
- package/dist/cjs/xv-header-next.cjs.entry.js +1 -1
- package/dist/cjs/xv-mega-menu-next.cjs.entry.js +2 -2
- package/dist/cjs/xv-webcomponents.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/xv-content-switcher/_vars.js +14 -0
- package/dist/collection/components/xv-content-switcher/xv-content-switcher-item/xv-content-switcher-item.css +134 -0
- package/dist/collection/components/xv-content-switcher/xv-content-switcher-item/xv-content-switcher-item.js +118 -0
- package/dist/collection/components/xv-content-switcher/xv-content-switcher.css +275 -0
- package/dist/collection/components/xv-content-switcher/xv-content-switcher.js +310 -0
- package/dist/collection/components/xv-data-table/xv-data-table-cell/xv-data-table-cell.js +1 -1
- package/dist/collection/components/xv-data-table/xv-data-table-collapse/xv-data-table-collapse.js +1 -1
- package/dist/collection/components/xv-data-table/xv-data-table-row/xv-data-table-row.js +2 -2
- package/dist/collection/components/xv-data-table/xv-data-table.js +1 -1
- package/dist/collection/components/xv-datepicker/xv-datepicker.css +4 -4
- package/dist/collection/components/xv-datepicker/xv-datepicker.js +2 -2
- package/dist/collection/components/xv-dropdown/xv-dropdown-item/xv-dropdown-item.js +1 -1
- package/dist/collection/components/xv-dropdown/xv-dropdown.css +23 -6
- package/dist/collection/components/xv-dropdown/xv-dropdown.js +205 -4
- package/dist/collection/components/xv-file-uploader/xv-file-uploader.js +1 -1
- package/dist/collection/components/xv-footer/xv-footer.js +1 -1
- package/dist/collection/components/xv-header/xv-header.js +1 -1
- package/dist/collection/components/xv-header-next/xv-header-next.js +1 -1
- package/dist/collection/components/xv-image-viewer/xv-image-viewer.js +1 -1
- package/dist/collection/components/xv-link/xv-link.js +1 -1
- package/dist/collection/components/xv-mega-menu/xv-mega-menu.js +2 -2
- package/dist/collection/components/xv-mega-menu-next/xv-mega-menu-next.js +2 -2
- package/dist/collection/components/xv-modal/xv-modal.js +1 -1
- package/dist/collection/components/xv-notification/xv-notification.js +1 -1
- package/dist/collection/components/xv-number-input/xv-number-input.css +6 -3
- package/dist/collection/components/xv-number-input/xv-number-input.js +2 -2
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu-item/xv-overflow-menu-item.js +1 -1
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu.js +2 -2
- package/dist/collection/components/xv-pagination/xv-pagination.js +1 -1
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator-item/xv-progress-indicator-item.js +1 -1
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator.js +1 -1
- package/dist/collection/components/xv-radio/xv-radio.css +2 -2
- package/dist/collection/components/xv-radio/xv-radio.js +2 -2
- package/dist/collection/components/xv-slider/xv-slider.css +2 -2
- package/dist/collection/components/xv-slider/xv-slider.js +1 -1
- package/dist/collection/components/xv-table/xv-table-cell/xv-table-cell.js +1 -1
- package/dist/collection/components/xv-table/xv-table-expand/xv-table-expand.js +1 -1
- package/dist/collection/components/xv-table/xv-table-row/xv-table-row.js +1 -1
- package/dist/collection/components/xv-table/xv-table.js +1 -1
- package/dist/collection/components/xv-tabs/xv-tab/xv-tab.js +1 -1
- package/dist/collection/components/xv-tag/xv-tag.js +1 -1
- package/dist/collection/components/xv-tag-combobox/xv-tag-combobox.css +2 -2
- package/dist/collection/components/xv-tag-combobox/xv-tag-combobox.js +2 -2
- package/dist/collection/components/xv-text-input/xv-text-input.css +1 -1
- package/dist/collection/components/xv-text-input/xv-text-input.js +2 -2
- package/dist/collection/components/xv-textarea/xv-textarea.css +2 -2
- package/dist/collection/components/xv-textarea/xv-textarea.js +2 -2
- package/dist/collection/components/xv-tile/xv-tile.js +2 -2
- package/dist/collection/components/xv-toggle/xv-toggle.js +1 -1
- package/dist/collection/components/xv-toggle-tip/xv-toggle-tip.js +1 -1
- package/dist/collection/components/xv-tooltip/xv-tooltip.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{xv-accordion-v2_45.entry.js → xv-accordion-v2_47.entry.js} +401 -68
- package/dist/esm/xv-header-next.entry.js +1 -1
- package/dist/esm/xv-mega-menu-next.entry.js +2 -2
- package/dist/esm/xv-webcomponents.js +1 -1
- package/dist/types/components/xv-content-switcher/_vars.d.ts +13 -0
- package/dist/types/components/xv-content-switcher/xv-content-switcher-item/xv-content-switcher-item.d.ts +32 -0
- package/dist/types/components/xv-content-switcher/xv-content-switcher.d.ts +78 -0
- package/dist/types/components/xv-dropdown/xv-dropdown.d.ts +24 -1
- package/dist/types/components.d.ts +249 -0
- package/dist/xv-webcomponents/{p-1b5a4f4c.entry.js → p-1cb6cc34.entry.js} +1 -1
- package/dist/xv-webcomponents/p-422065b1.entry.js +8 -0
- package/dist/xv-webcomponents/{p-50f8cd72.entry.js → p-dc64e134.entry.js} +1 -1
- package/dist/xv-webcomponents/xv-webcomponents.esm.js +1 -1
- package/package.json +1 -1
- package/dist/xv-webcomponents/p-593183a5.entry.js +0 -8
|
@@ -228,12 +228,12 @@ export class XvDatepicker {
|
|
|
228
228
|
}
|
|
229
229
|
render() {
|
|
230
230
|
const [start, end] = this.value;
|
|
231
|
-
return (h(Host, { key: '
|
|
231
|
+
return (h(Host, { key: '92bfe5ead4c634c2df3b42ec41014b23a00f9101', class: { disabled: !!this.disabled }, tabindex: this.disabled ? '-1' : undefined }, h("div", { key: '557f7a3bd3d61b3a351614c2603681805f6765db', "aria-controls": "popover", class: "control" }, this.label && h("label", { key: 'e41309e48361c1a5cfabe427322f546713853937', class: "control_label" }, this.label), h("div", { key: 'ab9517371f913eed9336a98947a3dbb0f3f28a87', class: {
|
|
232
232
|
'control_field': true,
|
|
233
233
|
loading: this.loading,
|
|
234
234
|
error: !!this.error || !!this.localError,
|
|
235
235
|
warning: this.warning !== undefined,
|
|
236
|
-
}, onClick: this.handleOpen, ref: (el) => (this.controlEl = el) }, h("input", { key: '
|
|
236
|
+
}, onClick: this.handleOpen, ref: (el) => (this.controlEl = el) }, h("input", { key: '6d2f79d071fe020235586f849efbb48dd5cba315', lang: "de", type: "date", name: "start", disabled: this.loading || this.disabled, readonly: this.readonly || this.variant === 'range', min: this.min, max: this.max, value: start ? dateFns.format(start, DEF_FORMAT) : '', onChange: (e) => this.handleChange(e, 'start'), onBlur: (e) => this.handleBlur(e, 'start'), onKeyDown: (e) => this.handleKeydown(e, 'start') }), this.variant === 'range' && (h("input", { key: '97c4d03019f2e1a9c0583e1b76aa4d143f503172', lang: "de", type: "date", name: "end", disabled: this.loading || this.disabled, readonly: this.readonly || this.variant === 'range', min: this.min, max: this.max, value: end ? dateFns.format(end, DEF_FORMAT) : '', onChange: (e) => this.handleChange(e, 'end'), onBlur: (e) => this.handleBlur(e, 'end'), onKeyDown: (e) => this.handleKeydown(e, 'end') }))), (this.helper || this.error || this.warning || this.localError) && (h("div", { key: 'b19342150eeb4c7c356a817b268ec76e76daa94a' }, this.helper && h("p", { key: '39970bdc2765e3a63072a6d7f54c038d6cee6d11', class: "control_message helper" }, this.helper), (this.error || this.warning || this.localError) && (h("p", { key: '579ca9aa50b6b7dacb787029691baf023219a265', class: { control_message: true, error: !!this.error || !!this.localError } }, this.error || this.localError || this.warning))))), h("div", { key: 'af8eee78121448e66c9f6d3dd6d5bb7d9eab03dc', role: "dialog", class: { popover: true, open: this.open }, ref: (el) => (this.popoverEl = el) }, h("div", { key: 'd400c66831941238670ae021209ea2a40a59e88b', class: "header" }, h("xv-button-v2", { key: '2cdd95bc4114b0bd3c7ffa613c7a69d68685f0a6', tabindex: this.open ? undefined : '-1', disabled: this.isPrevDisabled, variant: "ghost", onClick: this.prevMonth }, h("span", { key: '5a5cb4965aa5b64d8a8d57d96076bcf2cc5fdb6b', slot: "icon-left", class: "header_icon prev" })), h("p", { key: 'f806d5ac078fccca5cadfb0e368cb78f478f582e', class: "header_date" }, dateFns.format(this.month, 'LLLL', { locale: de }), h("input", { key: '134ddaa8cf64f2faf3306aac6cfbc9cf8ff2047d', tabindex: this.open ? undefined : '-1', type: "number", value: this.month.getFullYear(), onInput: this.handleYearChange, onBlur: this.handleYearBlur })), h("xv-button-v2", { key: 'f90e88c43c0365f64fd4494c75bfcc00558b5034', tabindex: this.open ? undefined : '-1', disabled: this.isNextDisabled, variant: "ghost", onClick: this.nextMonth }, h("span", { key: '0b539e43a031acc4a69f0743e4f22d244a8856c3', slot: "icon-left", class: "header_icon next" }))), h("div", { key: '8986efbeb8a2c86c01aa72afccf3b3db0cafaf7d', class: "week" }, h("p", { key: 'de290231af4fa141537c348c57fc402082b06f28', class: "week_day" }), WEEK.map((day) => h("p", { class: "week_day" }, day, "."))), h("div", { key: 'b61e68c524a8cacf4bd8f08deee3662de91ae7c0', class: "week" }, this.days.map((day, idx) => (h(Fragment, null, idx % 7 === 0 && (h("button", { tabindex: this.open ? undefined : '-1', disabled: true, class: "week_day disabled" }, day.week)), h("button", { tabindex: this.open ? undefined : '-1', onClick: () => this.handleSetDate(day), disabled: day.disabled, class: {
|
|
237
237
|
'week_day': true,
|
|
238
238
|
inRange: this.variant === 'range' && dateFns.isWithinInterval(day.date, { start, end }),
|
|
239
239
|
isToday: day.isToday,
|
|
@@ -24,7 +24,7 @@ export class XvDropdownItem {
|
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
26
|
render() {
|
|
27
|
-
return (h(Host, { key: '
|
|
27
|
+
return (h(Host, { key: '129c105a5f0c793b893e800b05ce97d8352eb06f', class: "xv-dropdown-item", value: this.value, role: "option", tabindex: this.disabled ? -1 : false }, this.multiple && (h("xv-checkbox-v2", { key: '2145dd2fd6a7ac83ea7c474d2b4b17cb5b7ecc53', class: "multiple-check", size: this.size, checked: this.selected, disabled: this.disabled })), h("slot", { key: '82d7595ff99453660590241da2b6df592f497201' }), (!this.multiple && this.selected) && h("span", { key: '343f6c8f9930054e5aabb015579a5e0ee996cf6e', class: "checkmark far fa-check" })));
|
|
28
28
|
}
|
|
29
29
|
componentWillLoad() {
|
|
30
30
|
if (!this.value)
|
|
@@ -130,6 +130,7 @@
|
|
|
130
130
|
--dropdown-padding-y: 11px;
|
|
131
131
|
--dropdown-max-width: 300px;
|
|
132
132
|
--dropdown-visible-items: 6;
|
|
133
|
+
--dropdown-ghost-width: min-content;
|
|
133
134
|
display: block;
|
|
134
135
|
position: relative;
|
|
135
136
|
text-align: left;
|
|
@@ -141,7 +142,7 @@
|
|
|
141
142
|
font-family: var(--ff-body, Work Sans), sans-serif;
|
|
142
143
|
font-size: 12px;
|
|
143
144
|
font-style: normal;
|
|
144
|
-
font-weight:
|
|
145
|
+
font-weight: 400;
|
|
145
146
|
line-height: 16px;
|
|
146
147
|
letter-spacing: 0.32px;
|
|
147
148
|
margin-bottom: 8px;
|
|
@@ -151,7 +152,7 @@
|
|
|
151
152
|
font-family: var(--ff-body, Work Sans), sans-serif;
|
|
152
153
|
font-size: 12px;
|
|
153
154
|
font-style: normal;
|
|
154
|
-
font-weight:
|
|
155
|
+
font-weight: 400;
|
|
155
156
|
line-height: 16px;
|
|
156
157
|
letter-spacing: 0.32px;
|
|
157
158
|
}
|
|
@@ -230,8 +231,8 @@
|
|
|
230
231
|
display: flex;
|
|
231
232
|
align-items: center;
|
|
232
233
|
justify-content: center;
|
|
233
|
-
block-size:
|
|
234
|
-
inline-size:
|
|
234
|
+
block-size: min(16px, 1em);
|
|
235
|
+
inline-size: min(16px, 1em);
|
|
235
236
|
inset-inline-end: 0.75rem;
|
|
236
237
|
outline: none;
|
|
237
238
|
transition: transform 70ms cubic-bezier(0.2, 0, 0.38, 0.9);
|
|
@@ -279,6 +280,10 @@
|
|
|
279
280
|
background: linear-gradient(to bottom, var(--field-02, #FFF) 0%, var(--field-02, #FFF) 85%, transparent 100%);
|
|
280
281
|
padding: var(--dropdown-padding-y) var(--dropdown-padding-x);
|
|
281
282
|
}
|
|
283
|
+
:host .options.right {
|
|
284
|
+
left: unset;
|
|
285
|
+
right: 0;
|
|
286
|
+
}
|
|
282
287
|
:host .options ::slotted(.xv-dropdown-item) {
|
|
283
288
|
display: block;
|
|
284
289
|
max-block-size: 13.75rem;
|
|
@@ -312,7 +317,8 @@
|
|
|
312
317
|
:host .options ::slotted(.xv-dropdown-item:not([hidden]):first-child):after {
|
|
313
318
|
display: none;
|
|
314
319
|
}
|
|
315
|
-
:host .options ::slotted(.xv-dropdown-item:hover)
|
|
320
|
+
:host .options ::slotted(.xv-dropdown-item:hover),
|
|
321
|
+
:host .options ::slotted(.xv-dropdown-item[active]) {
|
|
316
322
|
background-color: var(--layer-hover-02, #F7F7F7);
|
|
317
323
|
}
|
|
318
324
|
:host .options ::slotted(.xv-dropdown-item:active) {
|
|
@@ -354,7 +360,7 @@
|
|
|
354
360
|
padding-inline-end: 5px;
|
|
355
361
|
}
|
|
356
362
|
:host(.ghost) .options {
|
|
357
|
-
width:
|
|
363
|
+
width: var(--dropdown-ghost-width);
|
|
358
364
|
}
|
|
359
365
|
|
|
360
366
|
:host([open]) .control_arrow {
|
|
@@ -372,6 +378,17 @@
|
|
|
372
378
|
background-color: transparent;
|
|
373
379
|
}
|
|
374
380
|
|
|
381
|
+
:host(:focus) {
|
|
382
|
+
outline: none;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
:host(:focus-visible) {
|
|
386
|
+
outline: none;
|
|
387
|
+
}
|
|
388
|
+
:host(:focus-visible) .control {
|
|
389
|
+
outline: 2px solid var(--focus);
|
|
390
|
+
}
|
|
391
|
+
|
|
375
392
|
:host([error]) .control {
|
|
376
393
|
box-shadow: none;
|
|
377
394
|
outline: 2px solid var(--support-support-error, #F1290E);
|
|
@@ -2,14 +2,23 @@ import { Host, h } from "@stencil/core";
|
|
|
2
2
|
import { SIZE_VAR } from "../../types/enum";
|
|
3
3
|
import { DropdownItemSelector } from "./_vars";
|
|
4
4
|
import { forEach, setAttr } from "../../utils/utils";
|
|
5
|
+
let dropdownUid = 0;
|
|
5
6
|
export class XvDropdown {
|
|
6
7
|
constructor() {
|
|
7
8
|
this.searchPlaceholder = 'Suchen';
|
|
8
9
|
this.size = SIZE_VAR.MD;
|
|
9
10
|
this.variant = 'default';
|
|
11
|
+
this.position = 'auto';
|
|
10
12
|
this.selected = [];
|
|
11
13
|
this.selectedMap = new Map();
|
|
12
|
-
|
|
14
|
+
/** Side the options panel is actually aligned to (computed when position === 'auto'). */
|
|
15
|
+
this.resolvedPosition = 'left';
|
|
16
|
+
this.positionMeasured = false;
|
|
17
|
+
/* region Keyboard navigation */
|
|
18
|
+
this.listboxId = `xv-dd-listbox-${dropdownUid++}`;
|
|
19
|
+
this.optIdSeq = 0;
|
|
20
|
+
this.activeItem = null;
|
|
21
|
+
this.pendingOpenInit = false;
|
|
13
22
|
this.searchQuery = '';
|
|
14
23
|
this.dropdownItems = [];
|
|
15
24
|
this.setSelected = (selectedMap, optionNodes) => {
|
|
@@ -37,6 +46,44 @@ export class XvDropdown {
|
|
|
37
46
|
this.removeListeners = () => {
|
|
38
47
|
document.removeEventListener('click', this.handleClickOutside, { capture: true });
|
|
39
48
|
};
|
|
49
|
+
this.getNavigableItems = () => Array.from(this.el.querySelectorAll(DropdownItemSelector))
|
|
50
|
+
.filter((el) => !el.hasAttribute('hidden') && !el.hasAttribute('disabled'));
|
|
51
|
+
this.moveActive = (delta) => {
|
|
52
|
+
const items = this.getNavigableItems();
|
|
53
|
+
if (!items.length)
|
|
54
|
+
return;
|
|
55
|
+
const current = this.activeItem ? items.indexOf(this.activeItem) : -1;
|
|
56
|
+
let next = current + delta;
|
|
57
|
+
if (next < 0)
|
|
58
|
+
next = items.length - 1;
|
|
59
|
+
else if (next >= items.length)
|
|
60
|
+
next = 0;
|
|
61
|
+
this.setActiveItem(items[next]);
|
|
62
|
+
};
|
|
63
|
+
this.setActiveByEdge = (edge) => {
|
|
64
|
+
const items = this.getNavigableItems();
|
|
65
|
+
if (!items.length)
|
|
66
|
+
return;
|
|
67
|
+
this.setActiveItem(edge === 'first' ? items[0] : items[items.length - 1]);
|
|
68
|
+
};
|
|
69
|
+
this.setActiveItem = (item, scroll = true) => {
|
|
70
|
+
var _a;
|
|
71
|
+
if (this.activeItem === item)
|
|
72
|
+
return;
|
|
73
|
+
(_a = this.activeItem) === null || _a === void 0 ? void 0 : _a.removeAttribute('active');
|
|
74
|
+
this.activeItem = item;
|
|
75
|
+
if (!item) {
|
|
76
|
+
this.el.removeAttribute('aria-activedescendant');
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
if (!item.id)
|
|
80
|
+
item.id = `${this.listboxId}-opt-${this.optIdSeq++}`;
|
|
81
|
+
item.setAttribute('active', '');
|
|
82
|
+
this.el.setAttribute('aria-activedescendant', item.id);
|
|
83
|
+
if (scroll)
|
|
84
|
+
item.scrollIntoView({ block: 'nearest' });
|
|
85
|
+
};
|
|
86
|
+
/* endregion Keyboard navigation */
|
|
40
87
|
this.clearHandle = () => {
|
|
41
88
|
const options = this.el.querySelectorAll(DropdownItemSelector);
|
|
42
89
|
forEach(options, (option) => setAttr(option, 'selected', false));
|
|
@@ -60,11 +107,40 @@ export class XvDropdown {
|
|
|
60
107
|
this.searchQuery = ev.target.value.toLowerCase();
|
|
61
108
|
clearTimeout(this.searchTimeout);
|
|
62
109
|
this.searchTimeout = setTimeout(() => {
|
|
63
|
-
|
|
110
|
+
var _a;
|
|
111
|
+
for (const { el, text } of this.dropdownItems) {
|
|
64
112
|
el.toggleAttribute('hidden', !text.includes(this.searchQuery));
|
|
65
113
|
}
|
|
114
|
+
// keep keyboard focus on a visible option after filtering
|
|
115
|
+
if ((_a = this.activeItem) === null || _a === void 0 ? void 0 : _a.hasAttribute('hidden'))
|
|
116
|
+
this.setActiveByEdge('first');
|
|
66
117
|
}, 200);
|
|
67
118
|
};
|
|
119
|
+
this.resetSearch = () => {
|
|
120
|
+
clearTimeout(this.searchTimeout);
|
|
121
|
+
if (!this.search)
|
|
122
|
+
return;
|
|
123
|
+
this.searchQuery = '';
|
|
124
|
+
if (this.searchInputEl)
|
|
125
|
+
this.searchInputEl.value = '';
|
|
126
|
+
for (const { el } of this.dropdownItems)
|
|
127
|
+
el.removeAttribute('hidden');
|
|
128
|
+
};
|
|
129
|
+
/** Runs once per open, after the panel is in the DOM: highlight an option and place focus. */
|
|
130
|
+
this.initOpenState = () => {
|
|
131
|
+
var _a, _b, _c;
|
|
132
|
+
this.pendingOpenInit = false;
|
|
133
|
+
const items = this.getNavigableItems();
|
|
134
|
+
const preselected = items.find((el) => el.hasAttribute('selected'));
|
|
135
|
+
this.setActiveItem(preselected || items[0] || null, false);
|
|
136
|
+
if (this.search) {
|
|
137
|
+
// shadow root is open, so we can hand focus to the inner input for typing
|
|
138
|
+
(_c = (_b = (_a = this.searchInputEl) === null || _a === void 0 ? void 0 : _a.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('input')) === null || _c === void 0 ? void 0 : _c.focus();
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
this.el.focus();
|
|
142
|
+
}
|
|
143
|
+
};
|
|
68
144
|
}
|
|
69
145
|
openChangeHandle() {
|
|
70
146
|
this.syncOpenState();
|
|
@@ -76,9 +152,15 @@ export class XvDropdown {
|
|
|
76
152
|
if (this.open) {
|
|
77
153
|
this.cacheItems(); // get items on open
|
|
78
154
|
this.addListeners();
|
|
155
|
+
this.pendingOpenInit = true; // highlight + focus once the panel has rendered
|
|
79
156
|
}
|
|
80
157
|
else {
|
|
81
158
|
this.removeListeners();
|
|
159
|
+
this.resolvedPosition = 'left'; // reset so next open re-measures from the default side
|
|
160
|
+
this.positionMeasured = false;
|
|
161
|
+
this.pendingOpenInit = false;
|
|
162
|
+
this.setActiveItem(null);
|
|
163
|
+
this.resetSearch();
|
|
82
164
|
}
|
|
83
165
|
}
|
|
84
166
|
multipleChangeHandle() {
|
|
@@ -147,9 +229,59 @@ export class XvDropdown {
|
|
|
147
229
|
forEach(optionElements, (option) => setAttr(option, 'selected', this.selectedMap.has(option.getAttribute('value'))));
|
|
148
230
|
this.changeSelection.emit(this.setSelected(this.selectedMap, optionElements));
|
|
149
231
|
}
|
|
232
|
+
/* region Keyboard navigation */
|
|
233
|
+
handleKeyDown(ev) {
|
|
234
|
+
var _a, _b;
|
|
235
|
+
if (this.disabled || this.readonly || this.loading)
|
|
236
|
+
return;
|
|
237
|
+
if (!this.open) {
|
|
238
|
+
if (['ArrowDown', 'ArrowUp', 'Enter', ' ', 'Spacebar'].includes(ev.key)) {
|
|
239
|
+
ev.preventDefault();
|
|
240
|
+
this.open = true;
|
|
241
|
+
}
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
switch (ev.key) {
|
|
245
|
+
case 'ArrowDown':
|
|
246
|
+
ev.preventDefault();
|
|
247
|
+
this.moveActive(1);
|
|
248
|
+
break;
|
|
249
|
+
case 'ArrowUp':
|
|
250
|
+
ev.preventDefault();
|
|
251
|
+
this.moveActive(-1);
|
|
252
|
+
break;
|
|
253
|
+
case 'Home':
|
|
254
|
+
ev.preventDefault();
|
|
255
|
+
this.setActiveByEdge('first');
|
|
256
|
+
break;
|
|
257
|
+
case 'End':
|
|
258
|
+
ev.preventDefault();
|
|
259
|
+
this.setActiveByEdge('last');
|
|
260
|
+
break;
|
|
261
|
+
case 'Enter':
|
|
262
|
+
ev.preventDefault();
|
|
263
|
+
(_a = this.activeItem) === null || _a === void 0 ? void 0 : _a.click(); // reuse the same selection path as a mouse click
|
|
264
|
+
break;
|
|
265
|
+
case ' ':
|
|
266
|
+
case 'Spacebar':
|
|
267
|
+
if (!this.search) { // when searching, space must type into the field
|
|
268
|
+
ev.preventDefault();
|
|
269
|
+
(_b = this.activeItem) === null || _b === void 0 ? void 0 : _b.click();
|
|
270
|
+
}
|
|
271
|
+
break;
|
|
272
|
+
case 'Escape':
|
|
273
|
+
ev.preventDefault();
|
|
274
|
+
this.open = false;
|
|
275
|
+
this.el.focus();
|
|
276
|
+
break;
|
|
277
|
+
case 'Tab':
|
|
278
|
+
this.open = false; // let focus leave naturally
|
|
279
|
+
break;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
150
282
|
/* endregion Search methods */
|
|
151
283
|
render() {
|
|
152
|
-
return (h(Host, { key: '
|
|
284
|
+
return (h(Host, { key: 'd829dfeed78bfa23b22b5d04658bddfcfb3f9677', class: { 'xv-dropdown': true, [this.variant]: !!this.variant }, role: "combobox", "aria-haspopup": "listbox", "aria-expanded": this.open ? 'true' : 'false', "aria-controls": this.open ? this.listboxId : null, size: this.size, open: this.open, error: !!this.error, disabled: this.disabled, tabindex: (this.disabled || this.readonly) ? -1 : 0 }, (this.label || this.info) && (h("label", { key: '3329167b435dc874a175ca4fdf863f024ca59172', class: "label" }, h("slot", { key: '9fa412345fa4e59f0e5bf075a969c97f50ffd190', name: "label" }, this.label), this.info && h("xv-tooltip-v2", { key: 'ff8a830219cd41a54f80aba9f087f8851136f094', class: "label_info", message: this.info }))), h("div", { key: '9046c4c21ed270b9e9be0a6361cb629910fcd752', class: { "xv-dropdown-control control": true, readonly: !!this.readonly }, onClick: this.handleOpen }, (this.multiple && this.selectedMap.size > 0) && (h("xv-tag-v2", { key: 'e2d4ed3d256d9f9409181dfc0d374c80b51113e2', class: "control_count", onCloseClick: this.clearHandle, closeable: !this.required, bg: "var(--background-inverse)", color: "var(--icon-inverse)" }, this.selectedMap.size)), this.selected.length ? (h("p", { class: "control_value" }, this.selected.join(', '))) : (h("p", { class: "control_placeholder" }, this.placeholder || '')), this._renderIcon(), h("svg", { key: '8b00320c6078f01967f5f205700bd10747065659', 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 448 512" }, h("path", { key: 'b5387f1a85b2b4efccf9e5cbc5376cf34bc660a3', d: "M441.9 167.3l-19.8-19.8c-4.7-4.7-12.3-4.7-17 0L224 328.2 42.9 147.5c-4.7-4.7-12.3-4.7-17 0L6.1 167.3c-4.7 4.7-4.7 12.3 0 17l209.4 209.4c4.7 4.7 12.3 4.7 17 0l209.4-209.4c4.7-4.7 4.7-12.3 0-17z" }))), this.open && h("div", { key: '7b1de2568396f650059277d06bc9b4d8bbb4d6f3', ref: (el) => (this.optionsEl = el), id: this.listboxId, role: "listbox", "aria-multiselectable": this.multiple ? 'true' : null, class: { options: true, right: this._appliedPosition() === 'right', search: !!this.search } }, this.search && (h("div", { key: '7225547fc7964b33e1afaf07dd6694932e4fedec', class: "options_search" }, h("xv-text-input-v2", { key: 'dc5ce6e2200c627e259d02622b31515be49dde0b', type: "search", ref: (el) => (this.searchInputEl = el), block: true, autocomplete: "off", size: this.size, value: this.searchQuery, placeholder: this.searchPlaceholder, onValueChange: this.handleSearchInput }))), h("slot", { key: "xv-dropdown-options" })), (this.helper || typeof this.error === 'string' || this.warning) && (h("p", { key: 'a18e86e5bfeca3a94f15cb58424db798e95a799f', class: "helper" }, this.error || this.warning || this.helper))));
|
|
153
285
|
}
|
|
154
286
|
componentDidLoad() {
|
|
155
287
|
this.syncOpenState();
|
|
@@ -157,8 +289,51 @@ export class XvDropdown {
|
|
|
157
289
|
if (this.defaultValue)
|
|
158
290
|
this.value = this.defaultValue;
|
|
159
291
|
}
|
|
292
|
+
/** Side the panel is rendered on: explicit prop wins, otherwise the auto-measured side. */
|
|
293
|
+
_appliedPosition() {
|
|
294
|
+
return this.position === 'auto' ? this.resolvedPosition : this.position;
|
|
295
|
+
}
|
|
296
|
+
componentDidRender() {
|
|
297
|
+
if (this.open && this.pendingOpenInit)
|
|
298
|
+
this.initOpenState();
|
|
299
|
+
// Only ghost panels can be wider than the control, so only they can overflow.
|
|
300
|
+
// Measure once per open; skip for the default variant and for explicit positions.
|
|
301
|
+
if (!this.open || this.position !== 'auto' || this.variant !== 'ghost' || !this.optionsEl || this.positionMeasured)
|
|
302
|
+
return;
|
|
303
|
+
this.positionMeasured = true;
|
|
304
|
+
const rect = this.optionsEl.getBoundingClientRect();
|
|
305
|
+
const bounds = this._clipBounds();
|
|
306
|
+
// Flip in one direction only, so a panel wider than its container can't thrash between sides.
|
|
307
|
+
let next = this.resolvedPosition;
|
|
308
|
+
if (this.resolvedPosition === 'left' && rect.right > bounds.right)
|
|
309
|
+
next = 'right';
|
|
310
|
+
else if (this.resolvedPosition === 'right' && rect.left < bounds.left)
|
|
311
|
+
next = 'left';
|
|
312
|
+
if (next !== this.resolvedPosition)
|
|
313
|
+
this.resolvedPosition = next;
|
|
314
|
+
}
|
|
315
|
+
/** Inline edges of the nearest ancestor that clips overflow; falls back to the viewport. */
|
|
316
|
+
_clipBounds() {
|
|
317
|
+
let node = this.el.parentNode;
|
|
318
|
+
while (node) {
|
|
319
|
+
if (node instanceof ShadowRoot) {
|
|
320
|
+
node = node.host;
|
|
321
|
+
continue;
|
|
322
|
+
}
|
|
323
|
+
if (node instanceof HTMLElement) {
|
|
324
|
+
const overflowX = getComputedStyle(node).overflowX;
|
|
325
|
+
if (overflowX === 'hidden' || overflowX === 'auto' || overflowX === 'scroll' || overflowX === 'clip') {
|
|
326
|
+
const r = node.getBoundingClientRect();
|
|
327
|
+
return { left: r.left, right: r.right };
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
node = node.parentNode;
|
|
331
|
+
}
|
|
332
|
+
return { left: 0, right: document.documentElement.clientWidth };
|
|
333
|
+
}
|
|
160
334
|
disconnectedCallback() {
|
|
161
335
|
this.removeListeners();
|
|
336
|
+
clearTimeout(this.searchTimeout);
|
|
162
337
|
}
|
|
163
338
|
_renderIcon() {
|
|
164
339
|
if (this.loading) {
|
|
@@ -548,6 +723,26 @@ export class XvDropdown {
|
|
|
548
723
|
"reflect": false,
|
|
549
724
|
"attribute": "variant",
|
|
550
725
|
"defaultValue": "'default'"
|
|
726
|
+
},
|
|
727
|
+
"position": {
|
|
728
|
+
"type": "string",
|
|
729
|
+
"mutable": false,
|
|
730
|
+
"complexType": {
|
|
731
|
+
"original": "'auto' | 'right' | 'left'",
|
|
732
|
+
"resolved": "\"auto\" | \"left\" | \"right\"",
|
|
733
|
+
"references": {}
|
|
734
|
+
},
|
|
735
|
+
"required": false,
|
|
736
|
+
"optional": false,
|
|
737
|
+
"docs": {
|
|
738
|
+
"tags": [],
|
|
739
|
+
"text": ""
|
|
740
|
+
},
|
|
741
|
+
"getter": false,
|
|
742
|
+
"setter": false,
|
|
743
|
+
"reflect": false,
|
|
744
|
+
"attribute": "position",
|
|
745
|
+
"defaultValue": "'auto'"
|
|
551
746
|
}
|
|
552
747
|
};
|
|
553
748
|
}
|
|
@@ -555,7 +750,7 @@ export class XvDropdown {
|
|
|
555
750
|
return {
|
|
556
751
|
"selected": {},
|
|
557
752
|
"selectedMap": {},
|
|
558
|
-
"
|
|
753
|
+
"resolvedPosition": {}
|
|
559
754
|
};
|
|
560
755
|
}
|
|
561
756
|
static get events() {
|
|
@@ -620,6 +815,12 @@ export class XvDropdown {
|
|
|
620
815
|
"target": undefined,
|
|
621
816
|
"capture": false,
|
|
622
817
|
"passive": false
|
|
818
|
+
}, {
|
|
819
|
+
"name": "keydown",
|
|
820
|
+
"method": "handleKeyDown",
|
|
821
|
+
"target": undefined,
|
|
822
|
+
"capture": false,
|
|
823
|
+
"passive": false
|
|
623
824
|
}];
|
|
624
825
|
}
|
|
625
826
|
}
|
|
@@ -84,7 +84,7 @@ export class XvFileUploader {
|
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
render() {
|
|
87
|
-
return (h(Host, { key: '
|
|
87
|
+
return (h(Host, { key: '3423ccf72c581a004e5ca59d9cbf6f673f7896c1', class: { 'upload-wrapper': true, [`uploader-${this.size}`]: true, disabled: !!this.disabled, error: !!this.error } }, this.label && h("label", { key: '93b7b8edc0ac8e980910dc83d7cabf2030f97b35', class: "label" }, this.label), this.description && h("p", { key: 'c6b030335b34ee97ada3127fc8641f7b009d6c55', class: "description" }, this.description), this.variant === 'button' ? (h("xv-button-v2", { class: "uploadBtn", variant: this.buttonVariant, disabled: this.disabled, onClick: () => this.fileInput.click() }, this.addText || 'Dateien auswählen')) : (h("div", { class: { 'drop-zone': true, active: this.dragActive }, onDrop: this.onDrop, onDragOver: this.onDragOver, onDragLeave: this.onDragLeave, onClick: () => this.fileInput.click() }, this.addText || 'Dateien hierher ziehen oder darauf klicken, um eine Datei auszuwählen.')), h("input", { key: '04a082fae037f176533bee68ea0a8b24f8f36257', ref: el => (this.fileInput = el), type: "file", hidden: true, onChange: this.onFileSelect, multiple: this.multiple, accept: this.accept.join(',') }), this.error && h("p", { key: '6fb7b7c5517030caf1f22206a6612077b0c14e7e', class: "global-error" }, this.error), h("ul", { key: 'e3d5461797abbc1168117c6772238780a0a7e14a', class: "file-list" }, this.files.map((file, index) => {
|
|
88
88
|
var _a, _b;
|
|
89
89
|
return (h("li", { class: { file: true, withError: !!(((_a = this.errors) === null || _a === void 0 ? void 0 : _a[index]) || ((_b = this.errorMessages) === null || _b === void 0 ? void 0 : _b[index])) } }, h("div", { class: "file_container" }, h("span", { class: "file_container_name" }, file.name), this._renderLoaderState(index)), this._renderError(index)));
|
|
90
90
|
}))));
|
|
@@ -34,7 +34,7 @@ export class Xvfooter {
|
|
|
34
34
|
render() {
|
|
35
35
|
const { categories, socials, logo, legalLinks, payments, partners, advantages } = this.data || {};
|
|
36
36
|
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));
|
|
37
|
-
return (h("footer", { key: '
|
|
37
|
+
return (h("footer", { key: 'c3406d777693fe2311102e6fcb9852383fc9ac6a', class: "xv-footer" }, (advantages === null || advantages === void 0 ? void 0 : advantages.length) > 0 && (h("div", { key: 'f5636ec1f9f660f5735d27a79924bd9c40adf75f', class: "xv-footer-advantages" }, h("div", { key: '42656264cb7590f5e61ce1bbe38aa37a63f04ee9', class: "xv-container" }, this._renderFooterList(advantages, { itemWithLabel: true })))), hasDataLength && (h("div", { key: 'e142aa994a80d0fe5be4e00a8f0c4039da1791d6', class: "xv-container" }, h("div", { key: 'b7d5ab5f3613736775b3ef83cc2cc676449663ba', class: "xv-footer__grid xv-footer-y-spacing" }, h("div", { key: 'c997c4022a8d2bea3547230f5ba9ed7a37635d46', class: "xv-footer__col-main" }, h("ul", { key: 'c1be504d2ce2a411dab6f1681564524f8b2446b3', class: "xv-footer-categories" }, categories === null || categories === void 0 ? void 0 : categories.map((category) => (h("li", null, h("p", { class: "xv-label-02" }, category.label), h("ul", { class: "xv-footer-routes" }, category.routes.map((item) => (h("li", null, h("a", { class: "xv-body-compact-02", href: item.href, target: item.target }, item.label)))))))))), h("div", { key: 'f82ccaf18e1fe63b47f109bf20845af9ea0d4add', class: "xv-footer__col-sidebar" }, 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 && (h("div", { key: 'e1d12515175bffaa970ac5bfe41ad0cf27d5097e', class: "xv-footer-legal" }, h("div", { key: '969c103e50bdfeb52f9139c3dd53189d80d9a22d', class: "xv-container" }, h("div", { key: '5b3e4f18da410ea82fc62074f22daa8e226d6d4b', class: "xv-footer-legal-row" }, logo && (h("a", { key: '8e7bf3fd82686faa5a2e83131a542730eba7389f', class: "xv-footer-logo", href: logo.href, target: logo.target }, logo.label && h("span", { key: 'b211963ee69c7a6151cdae1a2476223f8ef73e34', class: "xv-label-02" }, logo.label), h("img", { key: '243eed6378143f9328a174f515c2c6276a90a09a', loading: "lazy", src: logo.image, alt: logo.label }))), h("ul", { key: '88538ee0047edf6df20a4e27d4d9bf348724bc56' }, legalLinks.map((item) => {
|
|
38
38
|
if (item.label === 'Cookie Einstellungen') {
|
|
39
39
|
return h("li", null, h("a", { class: "xv-helper-text-02", onClick: this.openCookieSettings }, item.label));
|
|
40
40
|
}
|
|
@@ -167,7 +167,7 @@ export class XvHeader {
|
|
|
167
167
|
render() {
|
|
168
168
|
var _a, _b, _c, _d, _e;
|
|
169
169
|
const isXvBrand = (((_a = this.metaNav) === null || _a === void 0 ? void 0 : _a['WhitelabelName']) || 'Xv') === 'Xv';
|
|
170
|
-
return (h("header", { key: '
|
|
170
|
+
return (h("header", { key: '413975515b82ac0c3eac96c7836d3e0567393431', class: "header" }, h("div", { key: 'fa2daa56949f45da1fe9abb9e780e5cc74317710', class: "header-wrapper" }, h("div", { key: '2e40c39258e80aaedaddbe1b3365dbe000a26bd1', class: "xv-container" }, h("div", { key: '1536e648029b21576532f08756a8f9cb0265d6c9', class: "header-top" }, h("div", { key: 'c12f0a569d5af6a0db7e4884722008b801879afc', class: "header-top--left" }, h("xv-button-v2", { key: '0cec355451c1991dc4bea7747645476403b3a0e9', class: "menu-btn", variant: "ghost", onClick: this.toggleMobMenu }, h("i", { key: '0b6cbb53fab547fc0b7ba9c381815dea29e8420a', slot: "icon-left", class: { 'fa': true, 'fa-times': this.mobMenuOpen, 'fa-bars': !this.mobMenuOpen } })), this.metaNav && (h("a", { key: '6e297e0486adb1cdb8aa3d10136127a433729741', href: `${window.location.origin}/` }, h("picture", { key: '963ba9a1a8ef6f154ee26aab34707abb97b4224f' }, h("source", { key: '7e06ea0165052dc7c09a0dc6b1d3c59b5bd329b7', 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: '81b305b418f0ebd656216fbb9432f70f7e8c6477', 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: '32177289430d1034851d99bffe332e078c7e01ad', class: "header-top--orgUnit", variant: "standalone", href: "/de-de/mycrossvertise" }, this.orgUnit))), h("ul", { key: '0ef3d85e5a38c590ec8f5a793a587b4aaf173dee', class: "header-top--right" }, this._renderSearch(), this._renderImpersonationInfo(), !((_d = this.metaNav) === null || _d === void 0 ? void 0 : _d.IsManager) && isXvBrand && (h("li", { key: 'ea34cd07f3126d6f4bfa97e84dcf7fe5b324a12c' }, h("xv-link-v2", { key: '3f3d5bc35e5961f0bec89458c534a7805dde9417', variant: "ghost", href: "https://www.crossvertise.com/ueber-uns/kontakt" }, h("xv-button-v2", { key: '7837fd8b66a7430b30122f6dfe5dee5e40183969', variant: "ghost", size: SIZE_VAR.MD }, h("i", { key: '0154c3c8c5a74df1b7f2ea55f3c3e59b5fec44be', class: "header-icon far fa-envelope" }), h("span", { key: 'bd6d80a40d20597344f86b175819ad653f789841', 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: '094df3526967377b32d3a2a4c9f941330122f570' }, h("xv-link-v2", { key: '374ca3a703428ce76f1aacc7f4033ce9f955c1a0', variant: "ghost", href: "https://help.crossvertise.com" }, h("xv-button-v2", { key: '07a2e7771bf8a350c02bede432f412bb584a3e1b', variant: "ghost", size: SIZE_VAR.MD }, h("i", { key: '48116ea733e87ae3801b6995208e4c9f993582cd', class: "header-icon far fa-question-circle" }), h("span", { key: '2b5ed5733555847f8d92f285f736206421c49b8f', class: "header-label xv-body-02" }, "Hilfe"))))), this._renderShoppingCart()))), h("div", { key: '6274a3a9b68ecf96def769de84f19de759e01c3d', class: "header-wrapper--bg" }, h("div", { key: 'c80e6030db6916b6fdfe72e5a707497e61aaf141', class: "xv-container" }, h("xv-mega-menu", { key: '5c1740f5061cbdd8404ce2690301afbf45fe226d', open: this.mobMenuOpen, onOpenChange: this.closeMobMenu })))), h("xv-login-modal", { key: 'eaa458800f87f7afd5fb8e59971bdb2f753e20d4', visible: this.showLoginModal, onClose: () => this.showLoginModal = false })));
|
|
171
171
|
}
|
|
172
172
|
static get is() { return "xv-header"; }
|
|
173
173
|
static get originalStyleUrls() {
|
|
@@ -180,7 +180,7 @@ export class XvHeaderNext {
|
|
|
180
180
|
render() {
|
|
181
181
|
var _a, _b, _c, _d, _e;
|
|
182
182
|
const isXvBrand = (((_a = this.metaNav) === null || _a === void 0 ? void 0 : _a['WhitelabelName']) || 'Xv') === 'Xv';
|
|
183
|
-
return (h("header", { key: '
|
|
183
|
+
return (h("header", { key: '7d377e3b2ac6324c7371bcaf72b3f2089c2f30fd', class: "header" }, h("div", { key: 'fa3904a2640fd3c83755e08672ca5b66f19f87ee', class: "header-wrapper" }, h("div", { key: '9b57e62635aa0add1b0d885476c6381651c3da2a', class: "xv-container" }, h("div", { key: '48d6c42079ac532951754f932fe9a542b446c7fe', class: "header-top" }, h("div", { key: 'a44144dd311fed25c6e322228d22ebcb34125227', class: "header-top--left" }, h("xv-button-v2", { key: 'f2924c7863e72a4421b03de34725b4e17eaadd0c', class: "menu-btn", variant: "ghost", onClick: this.toggleMobMenu }, h("i", { key: '60a99967703e38681a593b47be5b244ca812d735', slot: "icon-left", class: { 'fa': true, 'fa-times': this.mobMenuOpen, 'fa-bars': !this.mobMenuOpen } })), this.metaNav && (h("a", { key: 'b14cfd121dbe0bb043ba153f196d93517ad1aee6', href: `${window.location.origin}/` }, h("picture", { key: '368b0923c562d164bd2a13f35186198694a7f823' }, h("source", { key: 'ed184c898b435ee78d104e3f7ff0608797442ad5', 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: '02f4efe1190fd7eaa9666bcfa09575655fc300fe', 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: '6142c239875d1b38e6496348badce4f1d8929fa4', class: "header-top--orgUnit", variant: "standalone", href: "/de-de/mycrossvertise" }, this.orgUnit))), h("ul", { key: '4944e54fb6d0982df59e85113ce5c3634eb754b9', class: "header-top--right" }, this._renderSearch(), this._renderImpersonationInfo(), !((_d = this.metaNav) === null || _d === void 0 ? void 0 : _d.IsManager) && isXvBrand && (h("li", { key: 'c67444522b75b8b6ec375e1bc08b82508313266b' }, h("xv-link-v2", { key: '6e16c1050a6ff936dcecd62110a268ab882aa044', variant: "ghost", href: "https://www.crossvertise.com/ueber-uns/kontakt" }, h("xv-button-v2", { key: 'e3eabf0359e4b90f06caafeda72525c137f5b42e', variant: "ghost", size: SIZE_VAR.MD }, h("i", { key: 'b5fbb44bc2661d19bf59e6c41e6d018853f55293', class: "header-icon far fa-envelope" }), h("span", { key: 'e4947be47ae5e2a31ef54d74426f620d27b43810', 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: '5f4010c06c0dbd038aa4387f5fc7fac36e50ab19' }, h("xv-link-v2", { key: '09ad10e240aba834778e152fd061b6db767f2e57', variant: "ghost", href: "https://help.crossvertise.com" }, h("xv-button-v2", { key: '7f621f8c795377db2098a299f1c3476d6ad32ee3', variant: "ghost", size: SIZE_VAR.MD }, h("i", { key: '2233a5168c8ac5992376e27a9dc85c9aa829c8cc', class: "header-icon far fa-question-circle" }), h("span", { key: '7a37ffc7f4722b24f99cf9c67462b3491db142bc', class: "header-label xv-body-02" }, "Hilfe"))))), this._renderShoppingCart()))), h("div", { key: '0d64d68220df76c72d937311031879cd3292888e', class: "header-wrapper--bg" }, h("div", { key: '9937bc0ca9eba8b352bc5a5a512f4d009e5e752c', class: "xv-container" }, h("xv-mega-menu-next", { key: 'ac5f444429de7bd72caedf44dbc205a439299185', open: this.mobMenuOpen, onOpenChange: this.closeMobMenu, menuData: this.menuData })))), h("xv-login-modal", { key: '87c2405d6edc5d0b5721191e5055c906e78d55bf', visible: this.showLoginModal, onClose: () => this.showLoginModal = false })));
|
|
184
184
|
}
|
|
185
185
|
static get is() { return "xv-header-next"; }
|
|
186
186
|
static get originalStyleUrls() {
|
|
@@ -36,7 +36,7 @@ export class XvImageViewer {
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
render() {
|
|
39
|
-
return (h(Host, { key: '
|
|
39
|
+
return (h(Host, { key: '9a38430d83c931045bed1692b0c96c4682a18c1a', class: "image-wrapper" }, this.loaded ? (h("img", { src: this.src, alt: this.alt, class: "image", onClick: this.handleClick })) : h("xv-loader-v2", { class: "loading" }, this.placeholder), this.isFullscreen && (h("div", { key: '4cdae1d6b9c5140613520b37f0be4b6da842a4ce', class: "fullscreen-overlay", onClick: this.closeFullscreen }, !this.fullscreenLoaded && h("xv-loader-v2", { key: '8eb6d9f98514ae782882f8a86eab66f3804d275a', class: "loading", size: SIZE_VAR.LG }, this.placeholder), h("img", { key: '4e25b79e548aedc045a75d8d7b3ca7e56e577ebf', src: this.fullscreenSrc || this.src, alt: this.alt, class: {
|
|
40
40
|
'fullscreen-image': true,
|
|
41
41
|
loaded: this.fullscreenLoaded,
|
|
42
42
|
} })))));
|
|
@@ -12,7 +12,7 @@ export class XvLink {
|
|
|
12
12
|
e.stopPropagation();
|
|
13
13
|
}
|
|
14
14
|
render() {
|
|
15
|
-
return (h(Host, { key: '
|
|
15
|
+
return (h(Host, { key: '487bb531f1eade847d6ff3487830eca6ff07d9b2', class: { [`xv-link_${this.variant}`]: true, disabled: !!this.disabled } }, h("a", { key: '791b1a482545af8495b04cae22409e736fc5166b', href: this.href, onClick: this.preventLinkHandler.bind(this), class: { 'xv-link': true, 'xv-link_disabled': !!this.disabled, [this.size]: !!this.size }, target: this.target }, h("slot", { key: 'c2b0214254c2498093828d35c51eb691bf887120', name: "icon-left" }), h("slot", { key: '06df3a56df57a6a730e3352a52b178cd7c41dc8d' }), h("slot", { key: '7bc90e9c136e5fd72e61b20a134c3b8ddfeb00c2', name: "icon-right" }))));
|
|
16
16
|
}
|
|
17
17
|
static get is() { return "xv-link-v2"; }
|
|
18
18
|
static get encapsulation() { return "shadow"; }
|
|
@@ -59,7 +59,7 @@ export class XvMegaMenu {
|
|
|
59
59
|
void this.fetchMenuData();
|
|
60
60
|
}
|
|
61
61
|
render() {
|
|
62
|
-
return (h(Host, { key: '
|
|
62
|
+
return (h(Host, { key: '72def4630e671be424a302fb835880cddeb6b17f' }, h("nav", { key: 'e8719aa30336759ca2c43f524ccc77d24da70eae', class: { 'xv-menu': true, open: this.open } }, this.menuLoading && (h("div", { key: '06f2ff2344b4ceda1286b19d9b103c2a5b9b2996', class: { 'xv-menu-loader': true, open: this.open } }, h("xv-loader-v2", { key: '3e49ba2fcf79b84f9308212c4d9bf0a071fc97c4' }))), h("ul", { key: '428f50fbd46b764c98738ea5a4780a4601b849b3', class: { menu: true, open: this.open } }, this.menuItems.map((menuItem) => {
|
|
63
63
|
var _a, _b;
|
|
64
64
|
return (h("li", { class: { 'menu-item': true, active: menuItem.id === ((_a = this.activeItem) === null || _a === void 0 ? void 0 : _a.id) } }, menuItem.route ? (h("xv-link-v2", { variant: "ghost", href: menuItem.route.route }, h("p", { class: "menu-item-label" }, (_b = menuItem.route) === null || _b === void 0 ? void 0 : _b.label))) : (h(Fragment, null, h("p", { class: "menu-item-label", onClick: () => this.setActiveItem(menuItem) }, menuItem === null || menuItem === void 0 ? void 0 : menuItem.label), h("ul", { class: "menu-item-groups" }, menuItem.groups.map((group) => {
|
|
65
65
|
var _a;
|
|
@@ -69,7 +69,7 @@ export class XvMegaMenu {
|
|
|
69
69
|
} }, h("div", { class: "group-menus" }, h("ul", { class: { 'group-menus-categories': true, inline: group.layout === 'inline' } }, group.categories.map((category) => (h("li", { class: "category" }, h("p", { class: "category-label" }, category.label), h("ul", { class: "category-routes" }, category.routes.map((route) => (h("li", { class: "route" }, h("xv-link-v2", { size: "lg", variant: "ghost", href: route.route || '#' }, route.label), route.tag && (h("xv-tag-v2", { class: "route-tag", size: "sm", color: "#161616", bg: "#E0E0E0" }, route.tag)))))))))), h("ul", { class: "group-menus-actions" }, group.actions.map((action) => (h("li", { class: "action" }, action.type === 'link' && (h("xv-link-v2", { variant: "standalone", href: action === null || action === void 0 ? void 0 : action.url }, action.label, h("span", { class: "link-chevron", slot: "icon-right" }, "\u2192"))), action.type === 'button' &&
|
|
70
70
|
h("xv-button-v2", { onClick: () => this.navActionClick(action), block: true, variant: "tertiary" }, action.label)))))), (group === null || group === void 0 ? void 0 : group.card) && (h("div", { class: "group-card" }, h("xv-card-v2", { media: this.applicationContext !== 'Komsa' ? group.card.image : undefined, variant: this.isMobile ? 'horizontal' : 'vertical' }, h("h5", { slot: "header", class: "group-card-title" }, group.card.title), h("p", { slot: "body", class: "group-card-desc" }, group.card.description), group.card.linkLabel && (h("xv-link-v2", { slot: "footer", variant: "standalone", href: group.card.linkUrl || '#' }, group.card.linkLabel, h("span", { class: "link-chevron", slot: "icon-right" }, "\u2192"))))))))));
|
|
71
71
|
}))))));
|
|
72
|
-
}), h("li", { key: '
|
|
72
|
+
}), h("li", { key: '29923f808bf6e5ff3a446fc268c8724b82da0c1d', class: "menu--right" }, h("slot", { key: '50333ba3a99af998668236ce77fa138498ec6a03', name: "menu-right" })), this.open && (h("li", { key: '013f8adf4d4c4935252a92df628ee73d0bc68319', class: "menu--backdrop", onClick: () => this.handleClose() }))))));
|
|
73
73
|
}
|
|
74
74
|
static get is() { return "xv-mega-menu"; }
|
|
75
75
|
static get encapsulation() { return "shadow"; }
|
|
@@ -94,7 +94,7 @@ export class XvMegaMenuNext {
|
|
|
94
94
|
void this.fetchMenuData();
|
|
95
95
|
}
|
|
96
96
|
render() {
|
|
97
|
-
return (h(Host, { key: '
|
|
97
|
+
return (h(Host, { key: 'd73cfabbc7e69a974abd5c1c219544c2b9c5345e' }, h("nav", { key: '6d2f78e2be424e7aaa8c1f1ee03430a800c14dcc', class: { 'xv-menu': true, open: this.open } }, this.menuLoading && (h("div", { key: '0481d8317f0a0cd58a10114898ab1b60574bfced', class: { 'xv-menu-loader': true, open: this.open } }, h("xv-loader-v2", { key: 'f4104fbbf285165932c092423fe2eb431e6d7496' }))), h("ul", { key: 'e28819ff9c5bcebb32518831faf843085add3601', class: { menu: true, open: this.open } }, this.menuItems.map((menuItem) => {
|
|
98
98
|
var _a, _b;
|
|
99
99
|
return (h("li", { class: { 'menu-item': true, active: menuItem.id === ((_a = this.activeItem) === null || _a === void 0 ? void 0 : _a.id) } }, menuItem.route ? (h("xv-link-v2", { variant: "ghost", href: menuItem.route.route }, h("p", { class: "menu-item-label" }, (_b = menuItem.route) === null || _b === void 0 ? void 0 : _b.label))) : (h(Fragment, null, h("p", { class: "menu-item-label", onClick: () => this.setActiveItem(menuItem) }, menuItem === null || menuItem === void 0 ? void 0 : menuItem.label), h("ul", { class: "menu-item-groups" }, menuItem.groups.map((group) => {
|
|
100
100
|
var _a;
|
|
@@ -104,7 +104,7 @@ export class XvMegaMenuNext {
|
|
|
104
104
|
} }, h("div", { class: "group-menus" }, h("ul", { class: { 'group-menus-categories': true, inline: group.layout === 'inline' } }, group.categories.map((category) => (h("li", { class: "category" }, h("p", { class: "category-label" }, category.label), h("ul", { class: "category-routes" }, category.routes.map((route) => (h("li", { class: "route" }, h("xv-link-v2", { size: "lg", variant: "ghost", href: route.route || '#' }, route.label), route.tag && (h("xv-tag-v2", { class: "route-tag", size: "sm", color: "#161616", bg: "#E0E0E0" }, route.tag)))))))))), h("ul", { class: "group-menus-actions" }, group.actions.map((action) => (h("li", { class: "action" }, action.type === 'link' && (h("xv-link-v2", { variant: "standalone", href: action === null || action === void 0 ? void 0 : action.url }, action.label, h("span", { class: "link-chevron", slot: "icon-right" }, "\u2192"))), action.type === 'button' &&
|
|
105
105
|
h("xv-button-v2", { onClick: () => this.navActionClick(action), block: true, variant: "tertiary" }, action.label)))))), (group === null || group === void 0 ? void 0 : group.card) && (h("div", { class: "group-card" }, h("xv-card-v2", { media: this.applicationContext !== 'Komsa' ? group.card.image : undefined, variant: this.isMobile ? 'horizontal' : 'vertical' }, h("h5", { slot: "header", class: "group-card-title" }, group.card.title), h("p", { slot: "body", class: "group-card-desc" }, group.card.description), group.card.linkLabel && (h("xv-link-v2", { slot: "footer", variant: "standalone", href: group.card.linkUrl || '#' }, group.card.linkLabel, h("span", { class: "link-chevron", slot: "icon-right" }, "\u2192"))))))))));
|
|
106
106
|
}))))));
|
|
107
|
-
}), h("li", { key: '
|
|
107
|
+
}), h("li", { key: 'fbdfe095e7fb1988754c9d2d705128cae8d233f8', class: "menu--right" }, h("slot", { key: '7de3bb434a940b67265b2b4e191f7a02a20f8404', name: "menu-right" })), this.open && (h("li", { key: 'a35128e640465fec15c990e46fc778602238d2a5', class: "menu--backdrop", onClick: () => this.handleClose() }))))));
|
|
108
108
|
}
|
|
109
109
|
static get is() { return "xv-mega-menu-next"; }
|
|
110
110
|
static get encapsulation() { return "shadow"; }
|
|
@@ -58,7 +58,7 @@ export class XvModal {
|
|
|
58
58
|
}
|
|
59
59
|
render() {
|
|
60
60
|
var _a;
|
|
61
|
-
return (h(Host, { key: '
|
|
61
|
+
return (h(Host, { key: '395a794dfbc5e54df4bf4c9ef825180dc02c76fe', role: "dialog", size: this.size, id: this.el.id }, h("slot", { key: '0d54138edf1edfe30a3a05fc9bcbe88699cc0134', name: "trigger", onSlotchange: this.setupTrigger }), h("div", { key: '12a6853ad559cec0829cd2af935de51ada0516f5', class: { backdrop: true }, onClick: this.onBackdropClick }, h("div", { key: '41704448acaab0cfd70aadfe67ac3aa3e803765e', class: "modal" }, h("button", { key: '82c3756ba70e011197015cce6fbbfccd652fce8b', class: "modal_close", onClick: this.closeModal.bind(this) }, "\u00D7"), h("div", { key: '216a696e637a83db67f17a46570238987f5762a8', class: "modal_header" }, h("slot", { key: 'e0f7a8b13d470ea6dbe922f2f535c6776397d249', name: "header" }, ((_a = this.el) === null || _a === void 0 ? void 0 : _a.title) && h("h5", { key: '0fd4666c85f2a65bcae87fddda4c27b4e606244a', class: "modal_header__title" }, this.el.title))), h("div", { key: 'b05859b3b895c7c481586c063f9940f1834e17b5', class: { 'modal_content': true, overflow: this.overflow } }, h("slot", { key: '98ed63c3083036b3aa9f2888754fd4e80a0fcfdc' })), h("div", { key: 'eec90c432f5002a2022a8d153db5633f8e09ebeb', class: "modal_footer" }, h("slot", { key: 'c7f99d613b1a3ff540e49a63010b2efcd0141f6b', name: "footer" })), !!this.loading && (h("div", { key: '4396aa0a43fef8dcb2a333165a9173db6e4a55ad', class: "loading" }, h("xv-loader-v2", { key: '3ca8de976550d84bbf72111e0b177be353e82adf', size: SIZE_VAR.LG })))))));
|
|
62
62
|
}
|
|
63
63
|
disconnectedCallback() {
|
|
64
64
|
this.removeTriggerListener();
|