@dso-toolkit/core 51.4.0 → 51.4.1

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.
@@ -4,8 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-ecec64a0.js');
6
6
  const index_esm = require('./index.esm-03a9e0b4.js');
7
+ const hasOverflow = require('./has-overflow-b1b4f3f3.js');
7
8
  const v4 = require('./v4-abb5dc0c.js');
8
- const popper = require('./popper-6adb1c1a.js');
9
9
 
10
10
  const dropdownMenuCss = ":host(:focus){outline:none}:host{display:inline-block}";
11
11
 
@@ -49,6 +49,7 @@ const DropdownMenu = class {
49
49
  this.dropdownAlign = "left";
50
50
  this.checkable = false;
51
51
  this.boundary = undefined;
52
+ this.strategy = "auto";
52
53
  }
53
54
  watchPosition() {
54
55
  if (!this.popper) {
@@ -58,6 +59,34 @@ const DropdownMenu = class {
58
59
  placement: this.dropdownAlign === "right" ? "bottom-end" : "bottom-start",
59
60
  });
60
61
  }
62
+ watchStrategy() {
63
+ this.setStrategy();
64
+ }
65
+ setStrategy() {
66
+ if (!this.popper) {
67
+ return;
68
+ }
69
+ if (this.strategy === "absolute" || this.strategy === "fixed") {
70
+ this.popper.setOptions({
71
+ strategy: this.strategy,
72
+ });
73
+ return;
74
+ }
75
+ let element = this.host;
76
+ const boundary = this.boundary || document;
77
+ while (element && element.parentNode !== boundary) {
78
+ element = element.parentNode instanceof ShadowRoot ? element.parentNode.host : element.parentElement;
79
+ if (element !== null && hasOverflow.hasOverflow(element)) {
80
+ this.popper.setOptions({
81
+ strategy: "fixed",
82
+ });
83
+ return;
84
+ }
85
+ }
86
+ this.popper.setOptions({
87
+ strategy: "absolute",
88
+ });
89
+ }
61
90
  get button() {
62
91
  const button = this.host.querySelector('button[slot="toggle"]');
63
92
  if (!(button instanceof HTMLButtonElement)) {
@@ -92,11 +121,11 @@ const DropdownMenu = class {
92
121
  if (this.popper) {
93
122
  return;
94
123
  }
95
- const dropdownOptions = this.host.querySelector(".dso-dropdown-options");
96
- if (!(dropdownOptions instanceof HTMLElement)) {
124
+ const dropdownOptionsElement = this.host.querySelector(".dso-dropdown-options");
125
+ if (!(dropdownOptionsElement instanceof HTMLElement)) {
97
126
  throw new Error("dropdown options element is not instanceof HTMLElement");
98
127
  }
99
- this.popper = popper.createPopper(this.button, dropdownOptions, {
128
+ this.popper = hasOverflow.createPopper(this.button, dropdownOptionsElement, {
100
129
  placement: this.dropdownAlign === "right" ? "bottom-end" : "bottom-start",
101
130
  modifiers: [
102
131
  {
@@ -117,7 +146,10 @@ const DropdownMenu = class {
117
146
  }
118
147
  componentDidRender() {
119
148
  var _a;
120
- (_a = this.popper) === null || _a === void 0 ? void 0 : _a.update();
149
+ this.setStrategy();
150
+ if (this.open) {
151
+ (_a = this.popper) === null || _a === void 0 ? void 0 : _a.update();
152
+ }
121
153
  for (const li of Array.from(this.host.getElementsByTagName("li"))) {
122
154
  for (const tab of index_esm.tabbable(li)) {
123
155
  tab.setAttribute("role", this.checkable ? "menuitemradio" : "menuitem");
@@ -169,7 +201,8 @@ const DropdownMenu = class {
169
201
  }
170
202
  get host() { return index.getElement(this); }
171
203
  static get watchers() { return {
172
- "dropdownAlign": ["watchPosition"]
204
+ "dropdownAlign": ["watchPosition"],
205
+ "strategy": ["watchStrategy"]
173
206
  }; }
174
207
  };
175
208
  DropdownMenu.style = dropdownMenuCss;
@@ -15,5 +15,5 @@ const patchBrowser = () => {
15
15
  };
16
16
 
17
17
  patchBrowser().then(options => {
18
- return index.bootstrapLazy([["dso-icon.cjs",[[1,"dso-icon",{"icon":[1]}]]],["dso-map-base-layers.cjs",[[1,"dso-map-base-layers",{"group":[1],"baseLayers":[16]}]]],["dso-map-overlays.cjs",[[1,"dso-map-overlays",{"group":[1],"overlays":[16]}]]],["dso-annotation-output.cjs",[[4,"dso-annotation-output",{"identifier":[1],"annotationPrefix":[1,"annotation-prefix"],"toggleAnnotation":[64]}]]],["dso-toggletip.cjs",[[1,"dso-toggletip",{"label":[1],"position":[1],"small":[4],"secondary":[4],"active":[32]}]]],["dso-expandable-heading.cjs",[[1,"dso-expandable-heading",{"open":[4],"heading":[1],"color":[1]}]]],["dso-header.cjs",[[6,"dso-header",{"mainMenu":[16],"useDropDownMenu":[1,"use-drop-down-menu"],"authStatus":[1,"auth-status"],"loginUrl":[1,"login-url"],"logoutUrl":[1,"logout-url"],"userProfileName":[1,"user-profile-name"],"userProfileUrl":[1,"user-profile-url"],"userHomeUrl":[1,"user-home-url"],"showDropDown":[32],"hasSubLogo":[32],"overflowMenuItems":[32]}]]],["dso-label.cjs",[[1,"dso-label",{"compact":[4],"removable":[4],"status":[1],"truncate":[4],"removeHover":[32],"removeFocus":[32],"textHover":[32],"textFocus":[32],"truncatedContent":[32],"labelText":[32]}]]],["dso-pagination.cjs",[[1,"dso-pagination",{"totalPages":[2,"total-pages"],"currentPage":[2,"current-page"],"formatHref":[16],"availablePositions":[32]},[[0,"dsoSizeChange","sizeChangeHandler"]]]]],["dso-tree-view.cjs",[[1,"dso-tree-view",{"collection":[16],"focusItem":[64]}]]],["dso-accordion-section.cjs",[[1,"dso-accordion-section",{"handleTitle":[1,"handle-title"],"heading":[1],"handleUrl":[1,"handle-url"],"state":[1],"attachmentCount":[2,"attachment-count"],"icon":[1],"status":[1],"open":[1540],"hasNestedSection":[32],"toggleSection":[64],"scrollSectionIntoView":[64]}]]],["dso-alert.cjs",[[1,"dso-alert",{"status":[1],"roleAlert":[4,"role-alert"]}]]],["dso-annotation-button.cjs",[[0,"dso-annotation-button",{"identifier":[1]}]]],["dso-attachments-counter.cjs",[[1,"dso-attachments-counter",{"count":[2]}]]],["dso-autosuggest.cjs",[[6,"dso-autosuggest",{"suggestions":[16],"loading":[4],"loadingLabel":[1,"loading-label"],"loadingDelayed":[2,"loading-delayed"],"notFoundLabel":[1,"not-found-label"],"suggestOnFocus":[4,"suggest-on-focus"],"showSuggestions":[32],"selectedSuggestion":[32],"notFound":[32],"showLoading":[32]},[[4,"click","onDocumentClick"]]]]],["dso-date-picker.cjs",[[2,"dso-date-picker",{"name":[1],"identifier":[1],"disabled":[516],"role":[1],"direction":[1],"required":[4],"dsoAutofocus":[4,"dso-autofocus"],"value":[1537],"min":[1],"max":[1],"activeFocus":[32],"focusedDay":[32],"open":[32],"visible":[32],"setFocus":[64],"show":[64],"hide":[64]},[[6,"click","handleDocumentClick"]]]]],["dso-helpcenter-panel.cjs",[[1,"dso-helpcenter-panel",{"label":[1],"url":[1],"visibility":[32],"isOpen":[32],"slideState":[32],"loadIframe":[32]},[[8,"keydown","keyDownListener"]]]]],["dso-image-overlay.cjs",[[1,"dso-image-overlay",{"active":[32],"zoomable":[32]},[[2,"load","loadListener"]]]]],["dso-list-button.cjs",[[1,"dso-list-button",{"label":[1],"sublabel":[1],"subcontent":[1],"count":[2],"min":[8],"max":[8],"checked":[516],"disabled":[516],"manualInputWrapperElement":[32],"manualCount":[32]}]]],["dso-map-controls.cjs",[[1,"dso-map-controls",{"open":[1540],"disableZoom":[1,"disable-zoom"],"hideContent":[32],"toggleVisibility":[64]}]]],["dso-modal.cjs",[[1,"dso-modal",{"modalTitle":[1,"modal-title"],"role":[1],"showCloseButton":[4,"show-close-button"],"initialFocus":[1,"initial-focus"],"ariaId":[32],"hasFooter":[32]}]]],["dso-table.cjs",[[1,"dso-table",{"noModal":[516,"no-modal"],"isResponsive":[516,"is-responsive"],"modalActive":[32],"placeholderHeight":[32]}]]],["dso-viewer-grid.cjs",[[1,"dso-viewer-grid",{"filterpanelOpen":[516,"filterpanel-open"],"overlayOpen":[516,"overlay-open"],"initialMainSize":[1,"initial-main-size"],"mainSize":[32]}]]],["dso-accordion.cjs",[[1,"dso-accordion",{"variant":[513],"reverseAlign":[516,"reverse-align"],"allowMultipleOpen":[516,"allow-multiple-open"],"getState":[64],"toggleSection":[64],"animationEnd":[64],"closeOpenSections":[64]}]]],["dso-badge.cjs",[[1,"dso-badge",{"status":[1]}]]],["dso-banner.cjs",[[1,"dso-banner",{"status":[513]}]]],["dso-card.cjs",[[1,"dso-card",{"isSelectable":[516,"is-selectable"],"hasImage":[516,"has-image"],"clickable":[4]}]]],["dso-card-container.cjs",[[1,"dso-card-container",{"mode":[513]}]]],["dso-highlight-box.cjs",[[1,"dso-highlight-box",{"yellow":[4],"border":[4],"white":[4],"dropShadow":[4,"drop-shadow"],"step":[2]}]]],["dso-ozon-content.cjs",[[6,"dso-ozon-content",{"content":[1],"inline":[516],"deleted":[516],"interactive":[520],"state":[32]}]]],["dso-progress-bar.cjs",[[1,"dso-progress-bar",{"progress":[2],"min":[2],"max":[2]}]]],["dso-slide-toggle.cjs",[[4,"dso-slide-toggle",{"checked":[4],"disabled":[4],"accessibleLabel":[1,"accessible-label"],"labelledbyId":[1,"labelledby-id"],"identifier":[1],"hasVisibleLabel":[32]}]]],["dso-dropdown-menu.cjs",[[1,"dso-dropdown-menu",{"open":[1540],"dropdownAlign":[1,"dropdown-align"],"checkable":[4],"boundary":[1]}]]],["dso-expandable.cjs",[[1,"dso-expandable",{"open":[516]}]]],["dso-progress-indicator.cjs",[[1,"dso-progress-indicator",{"label":[1],"size":[513],"block":[4]}]]],["dso-responsive-element.cjs",[[1,"dso-responsive-element",{"sizeAlias":[32],"sizeWidth":[32],"getSize":[64]}]]],["dso-tooltip.cjs",[[1,"dso-tooltip",{"descriptive":[516],"position":[1],"strategy":[1],"noArrow":[4,"no-arrow"],"stateless":[4],"small":[4],"active":[1540],"hidden":[32],"activate":[64],"deactivate":[64]},[[0,"click","listenClick"]]]]],["dso-info-button.cjs",[[1,"dso-info-button",{"active":[1540],"secondary":[4],"label":[1],"hover":[32],"setFocus":[64]}]]],["dso-info_2.cjs",[[6,"dso-selectable",{"type":[1],"identifier":[1],"name":[1],"value":[1],"invalid":[4],"describedById":[1,"described-by-id"],"labelledById":[1,"labelled-by-id"],"disabled":[4],"required":[4],"checked":[4],"indeterminate":[4],"infoFixed":[4,"info-fixed"],"infoActive":[32],"toggleInfo":[64]}],[1,"dso-info",{"fixed":[516],"active":[516]}]]]], options);
18
+ return index.bootstrapLazy([["dso-icon.cjs",[[1,"dso-icon",{"icon":[1]}]]],["dso-map-base-layers.cjs",[[1,"dso-map-base-layers",{"group":[1],"baseLayers":[16]}]]],["dso-map-overlays.cjs",[[1,"dso-map-overlays",{"group":[1],"overlays":[16]}]]],["dso-annotation-output.cjs",[[4,"dso-annotation-output",{"identifier":[1],"annotationPrefix":[1,"annotation-prefix"],"toggleAnnotation":[64]}]]],["dso-toggletip.cjs",[[1,"dso-toggletip",{"label":[1],"position":[1],"small":[4],"secondary":[4],"active":[32]}]]],["dso-expandable-heading.cjs",[[1,"dso-expandable-heading",{"open":[4],"heading":[1],"color":[1]}]]],["dso-header.cjs",[[6,"dso-header",{"mainMenu":[16],"useDropDownMenu":[1,"use-drop-down-menu"],"authStatus":[1,"auth-status"],"loginUrl":[1,"login-url"],"logoutUrl":[1,"logout-url"],"userProfileName":[1,"user-profile-name"],"userProfileUrl":[1,"user-profile-url"],"userHomeUrl":[1,"user-home-url"],"showDropDown":[32],"hasSubLogo":[32],"overflowMenuItems":[32]}]]],["dso-label.cjs",[[1,"dso-label",{"compact":[4],"removable":[4],"status":[1],"truncate":[4],"removeHover":[32],"removeFocus":[32],"textHover":[32],"textFocus":[32],"truncatedContent":[32],"labelText":[32]}]]],["dso-pagination.cjs",[[1,"dso-pagination",{"totalPages":[2,"total-pages"],"currentPage":[2,"current-page"],"formatHref":[16],"availablePositions":[32]},[[0,"dsoSizeChange","sizeChangeHandler"]]]]],["dso-tree-view.cjs",[[1,"dso-tree-view",{"collection":[16],"focusItem":[64]}]]],["dso-accordion-section.cjs",[[1,"dso-accordion-section",{"handleTitle":[1,"handle-title"],"heading":[1],"handleUrl":[1,"handle-url"],"state":[1],"attachmentCount":[2,"attachment-count"],"icon":[1],"status":[1],"open":[1540],"hasNestedSection":[32],"toggleSection":[64],"scrollSectionIntoView":[64]}]]],["dso-alert.cjs",[[1,"dso-alert",{"status":[1],"roleAlert":[4,"role-alert"]}]]],["dso-annotation-button.cjs",[[0,"dso-annotation-button",{"identifier":[1]}]]],["dso-attachments-counter.cjs",[[1,"dso-attachments-counter",{"count":[2]}]]],["dso-autosuggest.cjs",[[6,"dso-autosuggest",{"suggestions":[16],"loading":[4],"loadingLabel":[1,"loading-label"],"loadingDelayed":[2,"loading-delayed"],"notFoundLabel":[1,"not-found-label"],"suggestOnFocus":[4,"suggest-on-focus"],"showSuggestions":[32],"selectedSuggestion":[32],"notFound":[32],"showLoading":[32]},[[4,"click","onDocumentClick"]]]]],["dso-date-picker.cjs",[[2,"dso-date-picker",{"name":[1],"identifier":[1],"disabled":[516],"role":[1],"direction":[1],"required":[4],"dsoAutofocus":[4,"dso-autofocus"],"value":[1537],"min":[1],"max":[1],"activeFocus":[32],"focusedDay":[32],"open":[32],"visible":[32],"setFocus":[64],"show":[64],"hide":[64]},[[6,"click","handleDocumentClick"]]]]],["dso-helpcenter-panel.cjs",[[1,"dso-helpcenter-panel",{"label":[1],"url":[1],"visibility":[32],"isOpen":[32],"slideState":[32],"loadIframe":[32]},[[8,"keydown","keyDownListener"]]]]],["dso-image-overlay.cjs",[[1,"dso-image-overlay",{"active":[32],"zoomable":[32]},[[2,"load","loadListener"]]]]],["dso-list-button.cjs",[[1,"dso-list-button",{"label":[1],"sublabel":[1],"subcontent":[1],"count":[2],"min":[8],"max":[8],"checked":[516],"disabled":[516],"manualInputWrapperElement":[32],"manualCount":[32]}]]],["dso-map-controls.cjs",[[1,"dso-map-controls",{"open":[1540],"disableZoom":[1,"disable-zoom"],"hideContent":[32],"toggleVisibility":[64]}]]],["dso-modal.cjs",[[1,"dso-modal",{"modalTitle":[1,"modal-title"],"role":[1],"showCloseButton":[4,"show-close-button"],"initialFocus":[1,"initial-focus"],"ariaId":[32],"hasFooter":[32]}]]],["dso-table.cjs",[[1,"dso-table",{"noModal":[516,"no-modal"],"isResponsive":[516,"is-responsive"],"modalActive":[32],"placeholderHeight":[32]}]]],["dso-viewer-grid.cjs",[[1,"dso-viewer-grid",{"filterpanelOpen":[516,"filterpanel-open"],"overlayOpen":[516,"overlay-open"],"initialMainSize":[1,"initial-main-size"],"mainSize":[32]}]]],["dso-accordion.cjs",[[1,"dso-accordion",{"variant":[513],"reverseAlign":[516,"reverse-align"],"allowMultipleOpen":[516,"allow-multiple-open"],"getState":[64],"toggleSection":[64],"animationEnd":[64],"closeOpenSections":[64]}]]],["dso-badge.cjs",[[1,"dso-badge",{"status":[1]}]]],["dso-banner.cjs",[[1,"dso-banner",{"status":[513]}]]],["dso-card.cjs",[[1,"dso-card",{"isSelectable":[516,"is-selectable"],"hasImage":[516,"has-image"],"clickable":[4]}]]],["dso-card-container.cjs",[[1,"dso-card-container",{"mode":[513]}]]],["dso-highlight-box.cjs",[[1,"dso-highlight-box",{"yellow":[4],"border":[4],"white":[4],"dropShadow":[4,"drop-shadow"],"step":[2]}]]],["dso-ozon-content.cjs",[[6,"dso-ozon-content",{"content":[1],"inline":[516],"deleted":[516],"interactive":[520],"state":[32]}]]],["dso-progress-bar.cjs",[[1,"dso-progress-bar",{"progress":[2],"min":[2],"max":[2]}]]],["dso-slide-toggle.cjs",[[4,"dso-slide-toggle",{"checked":[4],"disabled":[4],"accessibleLabel":[1,"accessible-label"],"labelledbyId":[1,"labelledby-id"],"identifier":[1],"hasVisibleLabel":[32]}]]],["dso-dropdown-menu.cjs",[[1,"dso-dropdown-menu",{"open":[1540],"dropdownAlign":[1,"dropdown-align"],"checkable":[4],"boundary":[1],"strategy":[1]}]]],["dso-expandable.cjs",[[1,"dso-expandable",{"open":[516]}]]],["dso-progress-indicator.cjs",[[1,"dso-progress-indicator",{"label":[1],"size":[513],"block":[4]}]]],["dso-responsive-element.cjs",[[1,"dso-responsive-element",{"sizeAlias":[32],"sizeWidth":[32],"getSize":[64]}]]],["dso-tooltip.cjs",[[1,"dso-tooltip",{"descriptive":[516],"position":[1],"strategy":[1],"noArrow":[4,"no-arrow"],"stateless":[4],"small":[4],"active":[1540],"hidden":[32],"activate":[64],"deactivate":[64]},[[0,"click","listenClick"]]]]],["dso-info-button.cjs",[[1,"dso-info-button",{"active":[1540],"secondary":[4],"label":[1],"hover":[32],"setFocus":[64]}]]],["dso-info_2.cjs",[[6,"dso-selectable",{"type":[1],"identifier":[1],"name":[1],"value":[1],"invalid":[4],"describedById":[1,"described-by-id"],"labelledById":[1,"labelled-by-id"],"disabled":[4],"required":[4],"checked":[4],"indeterminate":[4],"infoFixed":[4,"info-fixed"],"infoActive":[32],"toggleInfo":[64]}],[1,"dso-info",{"fixed":[516],"active":[516]}]]]], options);
19
19
  });
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-ecec64a0.js');
6
- const popper = require('./popper-6adb1c1a.js');
6
+ const hasOverflow = require('./has-overflow-b1b4f3f3.js');
7
7
  const clsx_m = require('./clsx.m-b81c6b86.js');
8
8
 
9
9
  var maxSize = {
@@ -15,7 +15,7 @@ var maxSize = {
15
15
  var state = _ref.state,
16
16
  name = _ref.name,
17
17
  options = _ref.options;
18
- var overflow = popper.detectOverflow(state, options);
18
+ var overflow = hasOverflow.detectOverflow(state, options);
19
19
 
20
20
  var _ref2 = state.modifiersData.preventOverflow || {
21
21
  x: 0,
@@ -44,20 +44,13 @@ const tooltipCss = ":host(.hidden){visibility:hidden}:host-context(dso-toggletip
44
44
 
45
45
  // Keep const in sync with $tooltip-transition-duration in dso-toolkit/src/components/tooltip/tooltip.scss tooltip_root() mixin
46
46
  const transitionDuration = 150;
47
- function hasOverflow(el) {
48
- const style = window.getComputedStyle(el);
49
- const overflowX = style.getPropertyValue("overflow-x");
50
- const overflowY = style.getPropertyValue("overflow-y");
51
- const overflowValues = ["hidden", "clip"];
52
- return overflowValues.indexOf(overflowX) !== -1 || overflowValues.indexOf(overflowY) !== -1;
53
- }
54
47
  const Tooltip = class {
55
48
  constructor(hostRef) {
56
49
  index.registerInstance(this, hostRef);
57
50
  this.applyMaxSize = {
58
51
  name: "applyMaxSize",
59
52
  enabled: true,
60
- phase: popper.beforeWrite,
53
+ phase: hasOverflow.beforeWrite,
61
54
  requires: ["maxSize"],
62
55
  fn({ state }) {
63
56
  let { width } = state.modifiersData.maxSize;
@@ -117,7 +110,7 @@ const Tooltip = class {
117
110
  let element = this.element;
118
111
  while (element && element.parentNode !== document) {
119
112
  element = element.parentNode instanceof ShadowRoot ? element.parentNode.host : element.parentElement;
120
- if (element !== null && hasOverflow(element)) {
113
+ if (element !== null && hasOverflow.hasOverflow(element)) {
121
114
  this.popper.setOptions({
122
115
  strategy: "fixed",
123
116
  });
@@ -168,7 +161,7 @@ const Tooltip = class {
168
161
  throw new Error("Unable to find reference tooltip has no [id] attribute.");
169
162
  }
170
163
  this.target = this.getTarget(this.element.id);
171
- this.popper = popper.createPopper(this.target, tooltip, {
164
+ this.popper = hasOverflow.createPopper(this.target, tooltip, {
172
165
  placement: this.position,
173
166
  modifiers: [maxSize, this.applyMaxSize],
174
167
  });
@@ -1798,6 +1798,15 @@ var createPopper = /*#__PURE__*/popperGenerator({
1798
1798
  defaultModifiers: defaultModifiers
1799
1799
  }); // eslint-disable-next-line import/no-unused-modules
1800
1800
 
1801
+ function hasOverflow(el) {
1802
+ const style = window.getComputedStyle(el);
1803
+ const overflowX = style.getPropertyValue("overflow-x");
1804
+ const overflowY = style.getPropertyValue("overflow-y");
1805
+ const overflowValues = ["hidden", "clip"];
1806
+ return overflowValues.indexOf(overflowX) !== -1 || overflowValues.indexOf(overflowY) !== -1;
1807
+ }
1808
+
1801
1809
  exports.beforeWrite = beforeWrite;
1802
1810
  exports.createPopper = createPopper;
1803
1811
  exports.detectOverflow = detectOverflow;
1812
+ exports.hasOverflow = hasOverflow;
@@ -14,7 +14,7 @@ const patchEsm = () => {
14
14
  const defineCustomElements = (win, options) => {
15
15
  if (typeof window === 'undefined') return Promise.resolve();
16
16
  return patchEsm().then(() => {
17
- return index.bootstrapLazy([["dso-icon.cjs",[[1,"dso-icon",{"icon":[1]}]]],["dso-map-base-layers.cjs",[[1,"dso-map-base-layers",{"group":[1],"baseLayers":[16]}]]],["dso-map-overlays.cjs",[[1,"dso-map-overlays",{"group":[1],"overlays":[16]}]]],["dso-annotation-output.cjs",[[4,"dso-annotation-output",{"identifier":[1],"annotationPrefix":[1,"annotation-prefix"],"toggleAnnotation":[64]}]]],["dso-toggletip.cjs",[[1,"dso-toggletip",{"label":[1],"position":[1],"small":[4],"secondary":[4],"active":[32]}]]],["dso-expandable-heading.cjs",[[1,"dso-expandable-heading",{"open":[4],"heading":[1],"color":[1]}]]],["dso-header.cjs",[[6,"dso-header",{"mainMenu":[16],"useDropDownMenu":[1,"use-drop-down-menu"],"authStatus":[1,"auth-status"],"loginUrl":[1,"login-url"],"logoutUrl":[1,"logout-url"],"userProfileName":[1,"user-profile-name"],"userProfileUrl":[1,"user-profile-url"],"userHomeUrl":[1,"user-home-url"],"showDropDown":[32],"hasSubLogo":[32],"overflowMenuItems":[32]}]]],["dso-label.cjs",[[1,"dso-label",{"compact":[4],"removable":[4],"status":[1],"truncate":[4],"removeHover":[32],"removeFocus":[32],"textHover":[32],"textFocus":[32],"truncatedContent":[32],"labelText":[32]}]]],["dso-pagination.cjs",[[1,"dso-pagination",{"totalPages":[2,"total-pages"],"currentPage":[2,"current-page"],"formatHref":[16],"availablePositions":[32]},[[0,"dsoSizeChange","sizeChangeHandler"]]]]],["dso-tree-view.cjs",[[1,"dso-tree-view",{"collection":[16],"focusItem":[64]}]]],["dso-accordion-section.cjs",[[1,"dso-accordion-section",{"handleTitle":[1,"handle-title"],"heading":[1],"handleUrl":[1,"handle-url"],"state":[1],"attachmentCount":[2,"attachment-count"],"icon":[1],"status":[1],"open":[1540],"hasNestedSection":[32],"toggleSection":[64],"scrollSectionIntoView":[64]}]]],["dso-alert.cjs",[[1,"dso-alert",{"status":[1],"roleAlert":[4,"role-alert"]}]]],["dso-annotation-button.cjs",[[0,"dso-annotation-button",{"identifier":[1]}]]],["dso-attachments-counter.cjs",[[1,"dso-attachments-counter",{"count":[2]}]]],["dso-autosuggest.cjs",[[6,"dso-autosuggest",{"suggestions":[16],"loading":[4],"loadingLabel":[1,"loading-label"],"loadingDelayed":[2,"loading-delayed"],"notFoundLabel":[1,"not-found-label"],"suggestOnFocus":[4,"suggest-on-focus"],"showSuggestions":[32],"selectedSuggestion":[32],"notFound":[32],"showLoading":[32]},[[4,"click","onDocumentClick"]]]]],["dso-date-picker.cjs",[[2,"dso-date-picker",{"name":[1],"identifier":[1],"disabled":[516],"role":[1],"direction":[1],"required":[4],"dsoAutofocus":[4,"dso-autofocus"],"value":[1537],"min":[1],"max":[1],"activeFocus":[32],"focusedDay":[32],"open":[32],"visible":[32],"setFocus":[64],"show":[64],"hide":[64]},[[6,"click","handleDocumentClick"]]]]],["dso-helpcenter-panel.cjs",[[1,"dso-helpcenter-panel",{"label":[1],"url":[1],"visibility":[32],"isOpen":[32],"slideState":[32],"loadIframe":[32]},[[8,"keydown","keyDownListener"]]]]],["dso-image-overlay.cjs",[[1,"dso-image-overlay",{"active":[32],"zoomable":[32]},[[2,"load","loadListener"]]]]],["dso-list-button.cjs",[[1,"dso-list-button",{"label":[1],"sublabel":[1],"subcontent":[1],"count":[2],"min":[8],"max":[8],"checked":[516],"disabled":[516],"manualInputWrapperElement":[32],"manualCount":[32]}]]],["dso-map-controls.cjs",[[1,"dso-map-controls",{"open":[1540],"disableZoom":[1,"disable-zoom"],"hideContent":[32],"toggleVisibility":[64]}]]],["dso-modal.cjs",[[1,"dso-modal",{"modalTitle":[1,"modal-title"],"role":[1],"showCloseButton":[4,"show-close-button"],"initialFocus":[1,"initial-focus"],"ariaId":[32],"hasFooter":[32]}]]],["dso-table.cjs",[[1,"dso-table",{"noModal":[516,"no-modal"],"isResponsive":[516,"is-responsive"],"modalActive":[32],"placeholderHeight":[32]}]]],["dso-viewer-grid.cjs",[[1,"dso-viewer-grid",{"filterpanelOpen":[516,"filterpanel-open"],"overlayOpen":[516,"overlay-open"],"initialMainSize":[1,"initial-main-size"],"mainSize":[32]}]]],["dso-accordion.cjs",[[1,"dso-accordion",{"variant":[513],"reverseAlign":[516,"reverse-align"],"allowMultipleOpen":[516,"allow-multiple-open"],"getState":[64],"toggleSection":[64],"animationEnd":[64],"closeOpenSections":[64]}]]],["dso-badge.cjs",[[1,"dso-badge",{"status":[1]}]]],["dso-banner.cjs",[[1,"dso-banner",{"status":[513]}]]],["dso-card.cjs",[[1,"dso-card",{"isSelectable":[516,"is-selectable"],"hasImage":[516,"has-image"],"clickable":[4]}]]],["dso-card-container.cjs",[[1,"dso-card-container",{"mode":[513]}]]],["dso-highlight-box.cjs",[[1,"dso-highlight-box",{"yellow":[4],"border":[4],"white":[4],"dropShadow":[4,"drop-shadow"],"step":[2]}]]],["dso-ozon-content.cjs",[[6,"dso-ozon-content",{"content":[1],"inline":[516],"deleted":[516],"interactive":[520],"state":[32]}]]],["dso-progress-bar.cjs",[[1,"dso-progress-bar",{"progress":[2],"min":[2],"max":[2]}]]],["dso-slide-toggle.cjs",[[4,"dso-slide-toggle",{"checked":[4],"disabled":[4],"accessibleLabel":[1,"accessible-label"],"labelledbyId":[1,"labelledby-id"],"identifier":[1],"hasVisibleLabel":[32]}]]],["dso-dropdown-menu.cjs",[[1,"dso-dropdown-menu",{"open":[1540],"dropdownAlign":[1,"dropdown-align"],"checkable":[4],"boundary":[1]}]]],["dso-expandable.cjs",[[1,"dso-expandable",{"open":[516]}]]],["dso-progress-indicator.cjs",[[1,"dso-progress-indicator",{"label":[1],"size":[513],"block":[4]}]]],["dso-responsive-element.cjs",[[1,"dso-responsive-element",{"sizeAlias":[32],"sizeWidth":[32],"getSize":[64]}]]],["dso-tooltip.cjs",[[1,"dso-tooltip",{"descriptive":[516],"position":[1],"strategy":[1],"noArrow":[4,"no-arrow"],"stateless":[4],"small":[4],"active":[1540],"hidden":[32],"activate":[64],"deactivate":[64]},[[0,"click","listenClick"]]]]],["dso-info-button.cjs",[[1,"dso-info-button",{"active":[1540],"secondary":[4],"label":[1],"hover":[32],"setFocus":[64]}]]],["dso-info_2.cjs",[[6,"dso-selectable",{"type":[1],"identifier":[1],"name":[1],"value":[1],"invalid":[4],"describedById":[1,"described-by-id"],"labelledById":[1,"labelled-by-id"],"disabled":[4],"required":[4],"checked":[4],"indeterminate":[4],"infoFixed":[4,"info-fixed"],"infoActive":[32],"toggleInfo":[64]}],[1,"dso-info",{"fixed":[516],"active":[516]}]]]], options);
17
+ return index.bootstrapLazy([["dso-icon.cjs",[[1,"dso-icon",{"icon":[1]}]]],["dso-map-base-layers.cjs",[[1,"dso-map-base-layers",{"group":[1],"baseLayers":[16]}]]],["dso-map-overlays.cjs",[[1,"dso-map-overlays",{"group":[1],"overlays":[16]}]]],["dso-annotation-output.cjs",[[4,"dso-annotation-output",{"identifier":[1],"annotationPrefix":[1,"annotation-prefix"],"toggleAnnotation":[64]}]]],["dso-toggletip.cjs",[[1,"dso-toggletip",{"label":[1],"position":[1],"small":[4],"secondary":[4],"active":[32]}]]],["dso-expandable-heading.cjs",[[1,"dso-expandable-heading",{"open":[4],"heading":[1],"color":[1]}]]],["dso-header.cjs",[[6,"dso-header",{"mainMenu":[16],"useDropDownMenu":[1,"use-drop-down-menu"],"authStatus":[1,"auth-status"],"loginUrl":[1,"login-url"],"logoutUrl":[1,"logout-url"],"userProfileName":[1,"user-profile-name"],"userProfileUrl":[1,"user-profile-url"],"userHomeUrl":[1,"user-home-url"],"showDropDown":[32],"hasSubLogo":[32],"overflowMenuItems":[32]}]]],["dso-label.cjs",[[1,"dso-label",{"compact":[4],"removable":[4],"status":[1],"truncate":[4],"removeHover":[32],"removeFocus":[32],"textHover":[32],"textFocus":[32],"truncatedContent":[32],"labelText":[32]}]]],["dso-pagination.cjs",[[1,"dso-pagination",{"totalPages":[2,"total-pages"],"currentPage":[2,"current-page"],"formatHref":[16],"availablePositions":[32]},[[0,"dsoSizeChange","sizeChangeHandler"]]]]],["dso-tree-view.cjs",[[1,"dso-tree-view",{"collection":[16],"focusItem":[64]}]]],["dso-accordion-section.cjs",[[1,"dso-accordion-section",{"handleTitle":[1,"handle-title"],"heading":[1],"handleUrl":[1,"handle-url"],"state":[1],"attachmentCount":[2,"attachment-count"],"icon":[1],"status":[1],"open":[1540],"hasNestedSection":[32],"toggleSection":[64],"scrollSectionIntoView":[64]}]]],["dso-alert.cjs",[[1,"dso-alert",{"status":[1],"roleAlert":[4,"role-alert"]}]]],["dso-annotation-button.cjs",[[0,"dso-annotation-button",{"identifier":[1]}]]],["dso-attachments-counter.cjs",[[1,"dso-attachments-counter",{"count":[2]}]]],["dso-autosuggest.cjs",[[6,"dso-autosuggest",{"suggestions":[16],"loading":[4],"loadingLabel":[1,"loading-label"],"loadingDelayed":[2,"loading-delayed"],"notFoundLabel":[1,"not-found-label"],"suggestOnFocus":[4,"suggest-on-focus"],"showSuggestions":[32],"selectedSuggestion":[32],"notFound":[32],"showLoading":[32]},[[4,"click","onDocumentClick"]]]]],["dso-date-picker.cjs",[[2,"dso-date-picker",{"name":[1],"identifier":[1],"disabled":[516],"role":[1],"direction":[1],"required":[4],"dsoAutofocus":[4,"dso-autofocus"],"value":[1537],"min":[1],"max":[1],"activeFocus":[32],"focusedDay":[32],"open":[32],"visible":[32],"setFocus":[64],"show":[64],"hide":[64]},[[6,"click","handleDocumentClick"]]]]],["dso-helpcenter-panel.cjs",[[1,"dso-helpcenter-panel",{"label":[1],"url":[1],"visibility":[32],"isOpen":[32],"slideState":[32],"loadIframe":[32]},[[8,"keydown","keyDownListener"]]]]],["dso-image-overlay.cjs",[[1,"dso-image-overlay",{"active":[32],"zoomable":[32]},[[2,"load","loadListener"]]]]],["dso-list-button.cjs",[[1,"dso-list-button",{"label":[1],"sublabel":[1],"subcontent":[1],"count":[2],"min":[8],"max":[8],"checked":[516],"disabled":[516],"manualInputWrapperElement":[32],"manualCount":[32]}]]],["dso-map-controls.cjs",[[1,"dso-map-controls",{"open":[1540],"disableZoom":[1,"disable-zoom"],"hideContent":[32],"toggleVisibility":[64]}]]],["dso-modal.cjs",[[1,"dso-modal",{"modalTitle":[1,"modal-title"],"role":[1],"showCloseButton":[4,"show-close-button"],"initialFocus":[1,"initial-focus"],"ariaId":[32],"hasFooter":[32]}]]],["dso-table.cjs",[[1,"dso-table",{"noModal":[516,"no-modal"],"isResponsive":[516,"is-responsive"],"modalActive":[32],"placeholderHeight":[32]}]]],["dso-viewer-grid.cjs",[[1,"dso-viewer-grid",{"filterpanelOpen":[516,"filterpanel-open"],"overlayOpen":[516,"overlay-open"],"initialMainSize":[1,"initial-main-size"],"mainSize":[32]}]]],["dso-accordion.cjs",[[1,"dso-accordion",{"variant":[513],"reverseAlign":[516,"reverse-align"],"allowMultipleOpen":[516,"allow-multiple-open"],"getState":[64],"toggleSection":[64],"animationEnd":[64],"closeOpenSections":[64]}]]],["dso-badge.cjs",[[1,"dso-badge",{"status":[1]}]]],["dso-banner.cjs",[[1,"dso-banner",{"status":[513]}]]],["dso-card.cjs",[[1,"dso-card",{"isSelectable":[516,"is-selectable"],"hasImage":[516,"has-image"],"clickable":[4]}]]],["dso-card-container.cjs",[[1,"dso-card-container",{"mode":[513]}]]],["dso-highlight-box.cjs",[[1,"dso-highlight-box",{"yellow":[4],"border":[4],"white":[4],"dropShadow":[4,"drop-shadow"],"step":[2]}]]],["dso-ozon-content.cjs",[[6,"dso-ozon-content",{"content":[1],"inline":[516],"deleted":[516],"interactive":[520],"state":[32]}]]],["dso-progress-bar.cjs",[[1,"dso-progress-bar",{"progress":[2],"min":[2],"max":[2]}]]],["dso-slide-toggle.cjs",[[4,"dso-slide-toggle",{"checked":[4],"disabled":[4],"accessibleLabel":[1,"accessible-label"],"labelledbyId":[1,"labelledby-id"],"identifier":[1],"hasVisibleLabel":[32]}]]],["dso-dropdown-menu.cjs",[[1,"dso-dropdown-menu",{"open":[1540],"dropdownAlign":[1,"dropdown-align"],"checkable":[4],"boundary":[1],"strategy":[1]}]]],["dso-expandable.cjs",[[1,"dso-expandable",{"open":[516]}]]],["dso-progress-indicator.cjs",[[1,"dso-progress-indicator",{"label":[1],"size":[513],"block":[4]}]]],["dso-responsive-element.cjs",[[1,"dso-responsive-element",{"sizeAlias":[32],"sizeWidth":[32],"getSize":[64]}]]],["dso-tooltip.cjs",[[1,"dso-tooltip",{"descriptive":[516],"position":[1],"strategy":[1],"noArrow":[4,"no-arrow"],"stateless":[4],"small":[4],"active":[1540],"hidden":[32],"activate":[64],"deactivate":[64]},[[0,"click","listenClick"]]]]],["dso-info-button.cjs",[[1,"dso-info-button",{"active":[1540],"secondary":[4],"label":[1],"hover":[32],"setFocus":[64]}]]],["dso-info_2.cjs",[[6,"dso-selectable",{"type":[1],"identifier":[1],"name":[1],"value":[1],"invalid":[4],"describedById":[1,"described-by-id"],"labelledById":[1,"labelled-by-id"],"disabled":[4],"required":[4],"checked":[4],"indeterminate":[4],"infoFixed":[4,"info-fixed"],"infoActive":[32],"toggleInfo":[64]}],[1,"dso-info",{"fixed":[516],"active":[516]}]]]], options);
18
18
  });
19
19
  };
20
20
 
@@ -2,6 +2,7 @@ import { createPopper } from "@popperjs/core";
2
2
  import { h, Host } from "@stencil/core";
3
3
  import { tabbable } from "tabbable";
4
4
  import { v4 as uuidv4 } from "uuid";
5
+ import { hasOverflow } from "../../utils/has-overflow";
5
6
  export class DropdownMenu {
6
7
  constructor() {
7
8
  this.focusOutListener = (event) => {
@@ -41,6 +42,7 @@ export class DropdownMenu {
41
42
  this.dropdownAlign = "left";
42
43
  this.checkable = false;
43
44
  this.boundary = undefined;
45
+ this.strategy = "auto";
44
46
  }
45
47
  watchPosition() {
46
48
  if (!this.popper) {
@@ -50,6 +52,34 @@ export class DropdownMenu {
50
52
  placement: this.dropdownAlign === "right" ? "bottom-end" : "bottom-start",
51
53
  });
52
54
  }
55
+ watchStrategy() {
56
+ this.setStrategy();
57
+ }
58
+ setStrategy() {
59
+ if (!this.popper) {
60
+ return;
61
+ }
62
+ if (this.strategy === "absolute" || this.strategy === "fixed") {
63
+ this.popper.setOptions({
64
+ strategy: this.strategy,
65
+ });
66
+ return;
67
+ }
68
+ let element = this.host;
69
+ const boundary = this.boundary || document;
70
+ while (element && element.parentNode !== boundary) {
71
+ element = element.parentNode instanceof ShadowRoot ? element.parentNode.host : element.parentElement;
72
+ if (element !== null && hasOverflow(element)) {
73
+ this.popper.setOptions({
74
+ strategy: "fixed",
75
+ });
76
+ return;
77
+ }
78
+ }
79
+ this.popper.setOptions({
80
+ strategy: "absolute",
81
+ });
82
+ }
53
83
  get button() {
54
84
  const button = this.host.querySelector('button[slot="toggle"]');
55
85
  if (!(button instanceof HTMLButtonElement)) {
@@ -84,11 +114,11 @@ export class DropdownMenu {
84
114
  if (this.popper) {
85
115
  return;
86
116
  }
87
- const dropdownOptions = this.host.querySelector(".dso-dropdown-options");
88
- if (!(dropdownOptions instanceof HTMLElement)) {
117
+ const dropdownOptionsElement = this.host.querySelector(".dso-dropdown-options");
118
+ if (!(dropdownOptionsElement instanceof HTMLElement)) {
89
119
  throw new Error("dropdown options element is not instanceof HTMLElement");
90
120
  }
91
- this.popper = createPopper(this.button, dropdownOptions, {
121
+ this.popper = createPopper(this.button, dropdownOptionsElement, {
92
122
  placement: this.dropdownAlign === "right" ? "bottom-end" : "bottom-start",
93
123
  modifiers: [
94
124
  {
@@ -109,7 +139,10 @@ export class DropdownMenu {
109
139
  }
110
140
  componentDidRender() {
111
141
  var _a;
112
- (_a = this.popper) === null || _a === void 0 ? void 0 : _a.update();
142
+ this.setStrategy();
143
+ if (this.open) {
144
+ (_a = this.popper) === null || _a === void 0 ? void 0 : _a.update();
145
+ }
113
146
  for (const li of Array.from(this.host.getElementsByTagName("li"))) {
114
147
  for (const tab of tabbable(li)) {
115
148
  tab.setAttribute("role", this.checkable ? "menuitemradio" : "menuitem");
@@ -243,6 +276,24 @@ export class DropdownMenu {
243
276
  },
244
277
  "attribute": "boundary",
245
278
  "reflect": false
279
+ },
280
+ "strategy": {
281
+ "type": "string",
282
+ "mutable": false,
283
+ "complexType": {
284
+ "original": "\"auto\" | \"absolute\" | \"fixed\"",
285
+ "resolved": "\"absolute\" | \"auto\" | \"fixed\"",
286
+ "references": {}
287
+ },
288
+ "required": false,
289
+ "optional": false,
290
+ "docs": {
291
+ "tags": [],
292
+ "text": "Set position strategy of dropdown options"
293
+ },
294
+ "attribute": "strategy",
295
+ "reflect": false,
296
+ "defaultValue": "\"auto\""
246
297
  }
247
298
  };
248
299
  }
@@ -251,6 +302,9 @@ export class DropdownMenu {
251
302
  return [{
252
303
  "propName": "dropdownAlign",
253
304
  "methodName": "watchPosition"
305
+ }, {
306
+ "propName": "strategy",
307
+ "methodName": "watchStrategy"
254
308
  }];
255
309
  }
256
310
  }
@@ -2,15 +2,9 @@ import { beforeWrite, createPopper } from "@popperjs/core";
2
2
  import maxSize from "popper-max-size-modifier";
3
3
  import { h, Host } from "@stencil/core";
4
4
  import clsx from "clsx";
5
+ import { hasOverflow } from "../../utils/has-overflow";
5
6
  // Keep const in sync with $tooltip-transition-duration in dso-toolkit/src/components/tooltip/tooltip.scss tooltip_root() mixin
6
7
  const transitionDuration = 150;
7
- function hasOverflow(el) {
8
- const style = window.getComputedStyle(el);
9
- const overflowX = style.getPropertyValue("overflow-x");
10
- const overflowY = style.getPropertyValue("overflow-y");
11
- const overflowValues = ["hidden", "clip"];
12
- return overflowValues.indexOf(overflowX) !== -1 || overflowValues.indexOf(overflowY) !== -1;
13
- }
14
8
  export class Tooltip {
15
9
  constructor() {
16
10
  this.applyMaxSize = {
@@ -0,0 +1,7 @@
1
+ export function hasOverflow(el) {
2
+ const style = window.getComputedStyle(el);
3
+ const overflowX = style.getPropertyValue("overflow-x");
4
+ const overflowY = style.getPropertyValue("overflow-y");
5
+ const overflowValues = ["hidden", "clip"];
6
+ return overflowValues.indexOf(overflowX) !== -1 || overflowValues.indexOf(overflowY) !== -1;
7
+ }
@@ -1,7 +1,7 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
2
  import { t as tabbable } from './index.esm.js';
3
+ import { h as hasOverflow, c as createPopper } from './has-overflow.js';
3
4
  import { v as v4 } from './v4.js';
4
- import { c as createPopper } from './popper.js';
5
5
 
6
6
  const dropdownMenuCss = ":host(:focus){outline:none}:host{display:inline-block}";
7
7
 
@@ -47,6 +47,7 @@ const DropdownMenu = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
47
47
  this.dropdownAlign = "left";
48
48
  this.checkable = false;
49
49
  this.boundary = undefined;
50
+ this.strategy = "auto";
50
51
  }
51
52
  watchPosition() {
52
53
  if (!this.popper) {
@@ -56,6 +57,34 @@ const DropdownMenu = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
56
57
  placement: this.dropdownAlign === "right" ? "bottom-end" : "bottom-start",
57
58
  });
58
59
  }
60
+ watchStrategy() {
61
+ this.setStrategy();
62
+ }
63
+ setStrategy() {
64
+ if (!this.popper) {
65
+ return;
66
+ }
67
+ if (this.strategy === "absolute" || this.strategy === "fixed") {
68
+ this.popper.setOptions({
69
+ strategy: this.strategy,
70
+ });
71
+ return;
72
+ }
73
+ let element = this.host;
74
+ const boundary = this.boundary || document;
75
+ while (element && element.parentNode !== boundary) {
76
+ element = element.parentNode instanceof ShadowRoot ? element.parentNode.host : element.parentElement;
77
+ if (element !== null && hasOverflow(element)) {
78
+ this.popper.setOptions({
79
+ strategy: "fixed",
80
+ });
81
+ return;
82
+ }
83
+ }
84
+ this.popper.setOptions({
85
+ strategy: "absolute",
86
+ });
87
+ }
59
88
  get button() {
60
89
  const button = this.host.querySelector('button[slot="toggle"]');
61
90
  if (!(button instanceof HTMLButtonElement)) {
@@ -90,11 +119,11 @@ const DropdownMenu = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
90
119
  if (this.popper) {
91
120
  return;
92
121
  }
93
- const dropdownOptions = this.host.querySelector(".dso-dropdown-options");
94
- if (!(dropdownOptions instanceof HTMLElement)) {
122
+ const dropdownOptionsElement = this.host.querySelector(".dso-dropdown-options");
123
+ if (!(dropdownOptionsElement instanceof HTMLElement)) {
95
124
  throw new Error("dropdown options element is not instanceof HTMLElement");
96
125
  }
97
- this.popper = createPopper(this.button, dropdownOptions, {
126
+ this.popper = createPopper(this.button, dropdownOptionsElement, {
98
127
  placement: this.dropdownAlign === "right" ? "bottom-end" : "bottom-start",
99
128
  modifiers: [
100
129
  {
@@ -115,7 +144,10 @@ const DropdownMenu = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
115
144
  }
116
145
  componentDidRender() {
117
146
  var _a;
118
- (_a = this.popper) === null || _a === void 0 ? void 0 : _a.update();
147
+ this.setStrategy();
148
+ if (this.open) {
149
+ (_a = this.popper) === null || _a === void 0 ? void 0 : _a.update();
150
+ }
119
151
  for (const li of Array.from(this.host.getElementsByTagName("li"))) {
120
152
  for (const tab of tabbable(li)) {
121
153
  tab.setAttribute("role", this.checkable ? "menuitemradio" : "menuitem");
@@ -167,14 +199,16 @@ const DropdownMenu = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
167
199
  }
168
200
  get host() { return this; }
169
201
  static get watchers() { return {
170
- "dropdownAlign": ["watchPosition"]
202
+ "dropdownAlign": ["watchPosition"],
203
+ "strategy": ["watchStrategy"]
171
204
  }; }
172
205
  static get style() { return dropdownMenuCss; }
173
206
  }, [1, "dso-dropdown-menu", {
174
207
  "open": [1540],
175
208
  "dropdownAlign": [1, "dropdown-align"],
176
209
  "checkable": [4],
177
- "boundary": [1]
210
+ "boundary": [1],
211
+ "strategy": [1]
178
212
  }]);
179
213
  function defineCustomElement() {
180
214
  if (typeof customElements === "undefined") {
@@ -1796,4 +1796,12 @@ var createPopper = /*#__PURE__*/popperGenerator({
1796
1796
  defaultModifiers: defaultModifiers
1797
1797
  }); // eslint-disable-next-line import/no-unused-modules
1798
1798
 
1799
- export { beforeWrite as b, createPopper as c, detectOverflow as d };
1799
+ function hasOverflow(el) {
1800
+ const style = window.getComputedStyle(el);
1801
+ const overflowX = style.getPropertyValue("overflow-x");
1802
+ const overflowY = style.getPropertyValue("overflow-y");
1803
+ const overflowValues = ["hidden", "clip"];
1804
+ return overflowValues.indexOf(overflowX) !== -1 || overflowValues.indexOf(overflowY) !== -1;
1805
+ }
1806
+
1807
+ export { beforeWrite as b, createPopper as c, detectOverflow as d, hasOverflow as h };
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
- import { d as detectOverflow, b as beforeWrite, c as createPopper } from './popper.js';
2
+ import { d as detectOverflow, b as beforeWrite, h as hasOverflow, c as createPopper } from './has-overflow.js';
3
3
  import { c as clsx } from './clsx.m.js';
4
4
 
5
5
  var maxSize = {
@@ -40,13 +40,6 @@ const tooltipCss = ":host(.hidden){visibility:hidden}:host-context(dso-toggletip
40
40
 
41
41
  // Keep const in sync with $tooltip-transition-duration in dso-toolkit/src/components/tooltip/tooltip.scss tooltip_root() mixin
42
42
  const transitionDuration = 150;
43
- function hasOverflow(el) {
44
- const style = window.getComputedStyle(el);
45
- const overflowX = style.getPropertyValue("overflow-x");
46
- const overflowY = style.getPropertyValue("overflow-y");
47
- const overflowValues = ["hidden", "clip"];
48
- return overflowValues.indexOf(overflowX) !== -1 || overflowValues.indexOf(overflowY) !== -1;
49
- }
50
43
  const Tooltip = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
51
44
  constructor() {
52
45
  super();
@@ -1 +1 @@
1
- import{p as e,b as o}from"./p-98fd1658.js";(()=>{const o=import.meta.url,a={};return""!==o&&(a.resourcesUrl=new URL(".",o).href),e(a)})().then((e=>o([["p-efdf5c91",[[1,"dso-icon",{icon:[1]}]]],["p-0fce0861",[[1,"dso-map-base-layers",{group:[1],baseLayers:[16]}]]],["p-f8a08ba1",[[1,"dso-map-overlays",{group:[1],overlays:[16]}]]],["p-f3f0d6c9",[[4,"dso-annotation-output",{identifier:[1],annotationPrefix:[1,"annotation-prefix"],toggleAnnotation:[64]}]]],["p-d4772fb0",[[1,"dso-toggletip",{label:[1],position:[1],small:[4],secondary:[4],active:[32]}]]],["p-67df25a7",[[1,"dso-expandable-heading",{open:[4],heading:[1],color:[1]}]]],["p-4c8426b7",[[6,"dso-header",{mainMenu:[16],useDropDownMenu:[1,"use-drop-down-menu"],authStatus:[1,"auth-status"],loginUrl:[1,"login-url"],logoutUrl:[1,"logout-url"],userProfileName:[1,"user-profile-name"],userProfileUrl:[1,"user-profile-url"],userHomeUrl:[1,"user-home-url"],showDropDown:[32],hasSubLogo:[32],overflowMenuItems:[32]}]]],["p-f53860da",[[1,"dso-label",{compact:[4],removable:[4],status:[1],truncate:[4],removeHover:[32],removeFocus:[32],textHover:[32],textFocus:[32],truncatedContent:[32],labelText:[32]}]]],["p-09424a1d",[[1,"dso-pagination",{totalPages:[2,"total-pages"],currentPage:[2,"current-page"],formatHref:[16],availablePositions:[32]},[[0,"dsoSizeChange","sizeChangeHandler"]]]]],["p-588bc4d7",[[1,"dso-tree-view",{collection:[16],focusItem:[64]}]]],["p-147ec7bd",[[1,"dso-accordion-section",{handleTitle:[1,"handle-title"],heading:[1],handleUrl:[1,"handle-url"],state:[1],attachmentCount:[2,"attachment-count"],icon:[1],status:[1],open:[1540],hasNestedSection:[32],toggleSection:[64],scrollSectionIntoView:[64]}]]],["p-5082d823",[[1,"dso-alert",{status:[1],roleAlert:[4,"role-alert"]}]]],["p-ee1acb32",[[0,"dso-annotation-button",{identifier:[1]}]]],["p-d6ea8670",[[1,"dso-attachments-counter",{count:[2]}]]],["p-c54ad578",[[6,"dso-autosuggest",{suggestions:[16],loading:[4],loadingLabel:[1,"loading-label"],loadingDelayed:[2,"loading-delayed"],notFoundLabel:[1,"not-found-label"],suggestOnFocus:[4,"suggest-on-focus"],showSuggestions:[32],selectedSuggestion:[32],notFound:[32],showLoading:[32]},[[4,"click","onDocumentClick"]]]]],["p-1aef13ee",[[2,"dso-date-picker",{name:[1],identifier:[1],disabled:[516],role:[1],direction:[1],required:[4],dsoAutofocus:[4,"dso-autofocus"],value:[1537],min:[1],max:[1],activeFocus:[32],focusedDay:[32],open:[32],visible:[32],setFocus:[64],show:[64],hide:[64]},[[6,"click","handleDocumentClick"]]]]],["p-43f3d736",[[1,"dso-helpcenter-panel",{label:[1],url:[1],visibility:[32],isOpen:[32],slideState:[32],loadIframe:[32]},[[8,"keydown","keyDownListener"]]]]],["p-9b07b034",[[1,"dso-image-overlay",{active:[32],zoomable:[32]},[[2,"load","loadListener"]]]]],["p-ba0da696",[[1,"dso-list-button",{label:[1],sublabel:[1],subcontent:[1],count:[2],min:[8],max:[8],checked:[516],disabled:[516],manualInputWrapperElement:[32],manualCount:[32]}]]],["p-4b18389c",[[1,"dso-map-controls",{open:[1540],disableZoom:[1,"disable-zoom"],hideContent:[32],toggleVisibility:[64]}]]],["p-e4f667b3",[[1,"dso-modal",{modalTitle:[1,"modal-title"],role:[1],showCloseButton:[4,"show-close-button"],initialFocus:[1,"initial-focus"],ariaId:[32],hasFooter:[32]}]]],["p-96efc763",[[1,"dso-table",{noModal:[516,"no-modal"],isResponsive:[516,"is-responsive"],modalActive:[32],placeholderHeight:[32]}]]],["p-e00a3019",[[1,"dso-viewer-grid",{filterpanelOpen:[516,"filterpanel-open"],overlayOpen:[516,"overlay-open"],initialMainSize:[1,"initial-main-size"],mainSize:[32]}]]],["p-ad0b38cf",[[1,"dso-accordion",{variant:[513],reverseAlign:[516,"reverse-align"],allowMultipleOpen:[516,"allow-multiple-open"],getState:[64],toggleSection:[64],animationEnd:[64],closeOpenSections:[64]}]]],["p-07952ece",[[1,"dso-badge",{status:[1]}]]],["p-1cb94d7d",[[1,"dso-banner",{status:[513]}]]],["p-6cdc1acd",[[1,"dso-card",{isSelectable:[516,"is-selectable"],hasImage:[516,"has-image"],clickable:[4]}]]],["p-22f9240a",[[1,"dso-card-container",{mode:[513]}]]],["p-c1226b66",[[1,"dso-highlight-box",{yellow:[4],border:[4],white:[4],dropShadow:[4,"drop-shadow"],step:[2]}]]],["p-c16ce11e",[[6,"dso-ozon-content",{content:[1],inline:[516],deleted:[516],interactive:[520],state:[32]}]]],["p-494fe8e5",[[1,"dso-progress-bar",{progress:[2],min:[2],max:[2]}]]],["p-82465cdc",[[4,"dso-slide-toggle",{checked:[4],disabled:[4],accessibleLabel:[1,"accessible-label"],labelledbyId:[1,"labelledby-id"],identifier:[1],hasVisibleLabel:[32]}]]],["p-e3c9c7d0",[[1,"dso-dropdown-menu",{open:[1540],dropdownAlign:[1,"dropdown-align"],checkable:[4],boundary:[1]}]]],["p-452c7fbb",[[1,"dso-expandable",{open:[516]}]]],["p-0af9bfb1",[[1,"dso-progress-indicator",{label:[1],size:[513],block:[4]}]]],["p-d987ef37",[[1,"dso-responsive-element",{sizeAlias:[32],sizeWidth:[32],getSize:[64]}]]],["p-c2a4f4ea",[[1,"dso-tooltip",{descriptive:[516],position:[1],strategy:[1],noArrow:[4,"no-arrow"],stateless:[4],small:[4],active:[1540],hidden:[32],activate:[64],deactivate:[64]},[[0,"click","listenClick"]]]]],["p-3914ad70",[[1,"dso-info-button",{active:[1540],secondary:[4],label:[1],hover:[32],setFocus:[64]}]]],["p-30df5586",[[6,"dso-selectable",{type:[1],identifier:[1],name:[1],value:[1],invalid:[4],describedById:[1,"described-by-id"],labelledById:[1,"labelled-by-id"],disabled:[4],required:[4],checked:[4],indeterminate:[4],infoFixed:[4,"info-fixed"],infoActive:[32],toggleInfo:[64]}],[1,"dso-info",{fixed:[516],active:[516]}]]]],e)));
1
+ import{p as e,b as o}from"./p-98fd1658.js";(()=>{const o=import.meta.url,a={};return""!==o&&(a.resourcesUrl=new URL(".",o).href),e(a)})().then((e=>o([["p-efdf5c91",[[1,"dso-icon",{icon:[1]}]]],["p-0fce0861",[[1,"dso-map-base-layers",{group:[1],baseLayers:[16]}]]],["p-f8a08ba1",[[1,"dso-map-overlays",{group:[1],overlays:[16]}]]],["p-f3f0d6c9",[[4,"dso-annotation-output",{identifier:[1],annotationPrefix:[1,"annotation-prefix"],toggleAnnotation:[64]}]]],["p-d4772fb0",[[1,"dso-toggletip",{label:[1],position:[1],small:[4],secondary:[4],active:[32]}]]],["p-67df25a7",[[1,"dso-expandable-heading",{open:[4],heading:[1],color:[1]}]]],["p-4c8426b7",[[6,"dso-header",{mainMenu:[16],useDropDownMenu:[1,"use-drop-down-menu"],authStatus:[1,"auth-status"],loginUrl:[1,"login-url"],logoutUrl:[1,"logout-url"],userProfileName:[1,"user-profile-name"],userProfileUrl:[1,"user-profile-url"],userHomeUrl:[1,"user-home-url"],showDropDown:[32],hasSubLogo:[32],overflowMenuItems:[32]}]]],["p-f53860da",[[1,"dso-label",{compact:[4],removable:[4],status:[1],truncate:[4],removeHover:[32],removeFocus:[32],textHover:[32],textFocus:[32],truncatedContent:[32],labelText:[32]}]]],["p-09424a1d",[[1,"dso-pagination",{totalPages:[2,"total-pages"],currentPage:[2,"current-page"],formatHref:[16],availablePositions:[32]},[[0,"dsoSizeChange","sizeChangeHandler"]]]]],["p-588bc4d7",[[1,"dso-tree-view",{collection:[16],focusItem:[64]}]]],["p-147ec7bd",[[1,"dso-accordion-section",{handleTitle:[1,"handle-title"],heading:[1],handleUrl:[1,"handle-url"],state:[1],attachmentCount:[2,"attachment-count"],icon:[1],status:[1],open:[1540],hasNestedSection:[32],toggleSection:[64],scrollSectionIntoView:[64]}]]],["p-5082d823",[[1,"dso-alert",{status:[1],roleAlert:[4,"role-alert"]}]]],["p-ee1acb32",[[0,"dso-annotation-button",{identifier:[1]}]]],["p-d6ea8670",[[1,"dso-attachments-counter",{count:[2]}]]],["p-c54ad578",[[6,"dso-autosuggest",{suggestions:[16],loading:[4],loadingLabel:[1,"loading-label"],loadingDelayed:[2,"loading-delayed"],notFoundLabel:[1,"not-found-label"],suggestOnFocus:[4,"suggest-on-focus"],showSuggestions:[32],selectedSuggestion:[32],notFound:[32],showLoading:[32]},[[4,"click","onDocumentClick"]]]]],["p-1aef13ee",[[2,"dso-date-picker",{name:[1],identifier:[1],disabled:[516],role:[1],direction:[1],required:[4],dsoAutofocus:[4,"dso-autofocus"],value:[1537],min:[1],max:[1],activeFocus:[32],focusedDay:[32],open:[32],visible:[32],setFocus:[64],show:[64],hide:[64]},[[6,"click","handleDocumentClick"]]]]],["p-43f3d736",[[1,"dso-helpcenter-panel",{label:[1],url:[1],visibility:[32],isOpen:[32],slideState:[32],loadIframe:[32]},[[8,"keydown","keyDownListener"]]]]],["p-9b07b034",[[1,"dso-image-overlay",{active:[32],zoomable:[32]},[[2,"load","loadListener"]]]]],["p-ba0da696",[[1,"dso-list-button",{label:[1],sublabel:[1],subcontent:[1],count:[2],min:[8],max:[8],checked:[516],disabled:[516],manualInputWrapperElement:[32],manualCount:[32]}]]],["p-4b18389c",[[1,"dso-map-controls",{open:[1540],disableZoom:[1,"disable-zoom"],hideContent:[32],toggleVisibility:[64]}]]],["p-e4f667b3",[[1,"dso-modal",{modalTitle:[1,"modal-title"],role:[1],showCloseButton:[4,"show-close-button"],initialFocus:[1,"initial-focus"],ariaId:[32],hasFooter:[32]}]]],["p-96efc763",[[1,"dso-table",{noModal:[516,"no-modal"],isResponsive:[516,"is-responsive"],modalActive:[32],placeholderHeight:[32]}]]],["p-e00a3019",[[1,"dso-viewer-grid",{filterpanelOpen:[516,"filterpanel-open"],overlayOpen:[516,"overlay-open"],initialMainSize:[1,"initial-main-size"],mainSize:[32]}]]],["p-ad0b38cf",[[1,"dso-accordion",{variant:[513],reverseAlign:[516,"reverse-align"],allowMultipleOpen:[516,"allow-multiple-open"],getState:[64],toggleSection:[64],animationEnd:[64],closeOpenSections:[64]}]]],["p-07952ece",[[1,"dso-badge",{status:[1]}]]],["p-1cb94d7d",[[1,"dso-banner",{status:[513]}]]],["p-6cdc1acd",[[1,"dso-card",{isSelectable:[516,"is-selectable"],hasImage:[516,"has-image"],clickable:[4]}]]],["p-22f9240a",[[1,"dso-card-container",{mode:[513]}]]],["p-c1226b66",[[1,"dso-highlight-box",{yellow:[4],border:[4],white:[4],dropShadow:[4,"drop-shadow"],step:[2]}]]],["p-c16ce11e",[[6,"dso-ozon-content",{content:[1],inline:[516],deleted:[516],interactive:[520],state:[32]}]]],["p-494fe8e5",[[1,"dso-progress-bar",{progress:[2],min:[2],max:[2]}]]],["p-82465cdc",[[4,"dso-slide-toggle",{checked:[4],disabled:[4],accessibleLabel:[1,"accessible-label"],labelledbyId:[1,"labelledby-id"],identifier:[1],hasVisibleLabel:[32]}]]],["p-e3bd7689",[[1,"dso-dropdown-menu",{open:[1540],dropdownAlign:[1,"dropdown-align"],checkable:[4],boundary:[1],strategy:[1]}]]],["p-452c7fbb",[[1,"dso-expandable",{open:[516]}]]],["p-0af9bfb1",[[1,"dso-progress-indicator",{label:[1],size:[513],block:[4]}]]],["p-d987ef37",[[1,"dso-responsive-element",{sizeAlias:[32],sizeWidth:[32],getSize:[64]}]]],["p-bdc3b14b",[[1,"dso-tooltip",{descriptive:[516],position:[1],strategy:[1],noArrow:[4,"no-arrow"],stateless:[4],small:[4],active:[1540],hidden:[32],activate:[64],deactivate:[64]},[[0,"click","listenClick"]]]]],["p-3914ad70",[[1,"dso-info-button",{active:[1540],secondary:[4],label:[1],hover:[32],setFocus:[64]}]]],["p-30df5586",[[6,"dso-selectable",{type:[1],identifier:[1],name:[1],value:[1],invalid:[4],describedById:[1,"described-by-id"],labelledById:[1,"labelled-by-id"],disabled:[4],required:[4],checked:[4],indeterminate:[4],infoFixed:[4,"info-fixed"],infoActive:[32],toggleInfo:[64]}],[1,"dso-info",{fixed:[516],active:[516]}]]]],e)));
@@ -0,0 +1 @@
1
+ import{r as t,h as o,H as i,g as e}from"./p-98fd1658.js";import{d as r,b as a,h as p,c as s}from"./p-d3ed00f6.js";import{c as n}from"./p-6a1980b4.js";var l={name:"maxSize",enabled:!0,phase:"main",requiresIfExists:["offset","preventOverflow","flip"],fn:function(t){var o=t.state,i=t.name,e=r(o,t.options),a=o.modifiersData.preventOverflow||{x:0,y:0},p=a.x,s=a.y,n=o.rects.popper,l=n.width,h=n.height,d=o.placement.split("-")[0];o.modifiersData[i]={width:l-e["left"===d?"left":"right"]-p,height:h-e["top"===d?"top":"bottom"]-s}}};const h=class{constructor(o){t(this,o),this.applyMaxSize={name:"applyMaxSize",enabled:!0,phase:a,requires:["maxSize"],fn({state:t}){let{width:o}=t.modifiersData.maxSize;o<160&&(o=160),t.styles.popper=Object.assign(Object.assign({},t.styles.popper),{maxWidth:`${o}px`})}},this.keyDownListener=t=>{"Escape"===t.key&&this.deactivate()},this.descriptive=!1,this.position="top",this.strategy="auto",this.noArrow=!1,this.stateless=void 0,this.small=void 0,this.active=!1,this.hidden=!0}async activate(){this.active=!0}async deactivate(){this.active=!1}watchPosition(){this.popper&&this.popper.setOptions({placement:this.position})}watchStrategy(){this.setStrategy()}setStrategy(){if(!this.popper)return;if("absolute"===this.strategy||"fixed"===this.strategy)return void this.popper.setOptions({strategy:this.strategy});let t=this.element;for(;t&&t.parentNode!==document;)if(t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentElement,null!==t&&p(t))return void this.popper.setOptions({strategy:"fixed"});this.popper.setOptions({strategy:"absolute"})}watchActive(){var t;this.active?(this.hidden=!1,this.stateless||setTimeout((()=>{var t;null===(t=this.popper)||void 0===t||t.setOptions({modifiers:[{name:"eventListeners",enabled:!0}]}),document.addEventListener("keydown",this.keyDownListener)}))):(this.stateless||(null===(t=this.popper)||void 0===t||t.setOptions({modifiers:[{name:"eventListeners",enabled:!1}]}),document.removeEventListener("keydown",this.keyDownListener)),setTimeout((()=>this.hidden=!0),150))}listenClick(t){t.stopPropagation()}componentDidLoad(){var t;if(this.popper)return;const o=null===(t=this.element.shadowRoot)||void 0===t?void 0:t.querySelector(".tooltip");if(!(o instanceof HTMLElement))throw new Error("tooltip element is not instanceof HTMLElement");if(!this.element.id)throw new Error("Unable to find reference tooltip has no [id] attribute.");this.target=this.getTarget(this.element.id),this.popper=s(this.target,o,{placement:this.position,modifiers:[l,this.applyMaxSize]}),this.callbacks={activate:()=>this.active=!0,deactivate:()=>this.active=!1},this.stateless||(this.target.addEventListener("mouseenter",this.callbacks.activate),this.target.addEventListener("mouseleave",this.callbacks.deactivate),this.target.addEventListener("focus",this.callbacks.activate),this.target.addEventListener("blur",this.callbacks.deactivate))}disconnectedCallback(){var t;null===(t=this.popper)||void 0===t||t.destroy(),!this.stateless&&this.target&&this.callbacks&&(this.target.removeEventListener("mouseenter",this.callbacks.activate),this.target.removeEventListener("mouseleave",this.callbacks.deactivate),this.target.removeEventListener("focus",this.callbacks.activate),this.target.removeEventListener("blur",this.callbacks.deactivate)),this.callbacks=void 0,this.target=void 0}componentDidRender(){var t;this.setStrategy(),this.active&&(null===(t=this.popper)||void 0===t||t.update())}render(){return o(i,{class:{hidden:this.hidden},role:"tooltip"},o("div",{class:n("tooltip",{in:this.active})},!this.noArrow&&o("div",{"data-popper-arrow":!0,class:"tooltip-arrow"}),o("div",{"aria-hidden":!this.descriptive||void 0,class:n("tooltip-inner",{"dso-small":this.small})},o("slot",null))))}getTarget(t){const o=this.element.getRootNode();if(!(o instanceof Document||o instanceof ShadowRoot))throw new Error("rootNode is not instance of Document or ShadowRoot");const i=o.querySelector(`[aria-describedBy="${t}`);if(!i)throw new Error(`Unable to find reference with aria-describedby ${t}`);return i}get element(){return e(this)}static get watchers(){return{position:["watchPosition"],strategy:["watchStrategy"],active:["watchActive"]}}};h.style=":host(.hidden){visibility:hidden}:host-context(dso-toggletip){color:red !important}:host-context(dso-toggletip) *[data-popper-placement=top] .tooltip-arrow{margin-left:3px}:host-context(dso-toggletip) *[data-popper-placement=right] .tooltip-arrow{margin-top:0}:host-context(dso-toggletip) *[data-popper-placement=bottom] .tooltip-arrow{margin-left:3px}:host-context(dso-toggletip) *[data-popper-placement=left]{margin-right:-8px !important}:host-context(dso-toggletip) *[data-popper-placement=left] .tooltip-arrow{margin-top:0}*,*::after,*::before{box-sizing:border-box}.tooltip{font-family:Asap, sans-serif;font-style:normal;font-weight:400;line-height:1.5;line-break:auto;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;display:block;filter:drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));font-size:14px;opacity:0;position:absolute;transition:opacity 0.15s linear;z-index:410}.tooltip.in{opacity:1}.tooltip .tooltip-inner{background-color:#fff;border-radius:4px;color:#191919;display:inline-block;font-size:1rem;max-width:640px;padding:8px 16px;position:relative}.tooltip .tooltip-inner.dso-small{max-width:320px}.tooltip .tooltip-arrow{border-color:transparent;border-style:solid;height:0;width:0}.tooltip[data-popper-placement=top]{margin-top:-3px;padding:6px 0}.tooltip[data-popper-placement=top] .tooltip-arrow{border-top-color:#fff;border-width:6px 6px 0;bottom:0}.tooltip[data-popper-placement=top] .tooltip-arrow{margin-left:-3px}.tooltip[data-popper-placement=right]{margin-left:3px;padding:0 6px}.tooltip[data-popper-placement=right] .tooltip-arrow{border-right-color:#fff;border-width:6px 6px 6px 0;left:0}.tooltip[data-popper-placement=right] .tooltip-arrow{margin-top:-3px}.tooltip[data-popper-placement=bottom]{margin-top:3px;padding:6px 0}.tooltip[data-popper-placement=bottom] .tooltip-arrow{border-bottom-color:#fff;border-width:0 6px 6px;top:0}.tooltip[data-popper-placement=bottom] .tooltip-arrow{margin-left:-3px}.tooltip[data-popper-placement=left]{margin-left:-3px;padding:0 6px}.tooltip[data-popper-placement=left] .tooltip-arrow{border-left-color:#fff;border-width:6px 0 6px 6px;right:0}.tooltip[data-popper-placement=left] .tooltip-arrow{margin-top:-3px}";export{h as dso_tooltip}
@@ -1 +1 @@
1
- var t="top",n="bottom",e="right",r="left",o=[t,n,e,r],i=o.reduce((function(t,n){return t.concat([n+"-start",n+"-end"])}),[]),u=[].concat(o,["auto"]).reduce((function(t,n){return t.concat([n,n+"-start",n+"-end"])}),[]),a="beforeWrite",f=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function c(t){return t?(t.nodeName||"").toLowerCase():null}function d(t){if(null==t)return window;if("[object Window]"!==t.toString()){var n=t.ownerDocument;return n&&n.defaultView||window}return t}function p(t){return t instanceof d(t).Element||t instanceof Element}function s(t){return t instanceof d(t).HTMLElement||t instanceof HTMLElement}function l(t){return"undefined"!=typeof ShadowRoot&&(t instanceof d(t).ShadowRoot||t instanceof ShadowRoot)}function v(t){return t.split("-")[0]}var b=Math.max,h=Math.min,y=Math.round;function m(){var t=navigator.userAgentData;return null!=t&&t.brands?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function x(){return!/^((?!chrome|android).)*safari/i.test(m())}function w(t,n,e){void 0===n&&(n=!1),void 0===e&&(e=!1);var r=t.getBoundingClientRect(),o=1,i=1;n&&s(t)&&(o=t.offsetWidth>0&&y(r.width)/t.offsetWidth||1,i=t.offsetHeight>0&&y(r.height)/t.offsetHeight||1);var u=(p(t)?d(t):window).visualViewport,a=!x()&&e,f=(r.left+(a&&u?u.offsetLeft:0))/o,c=(r.top+(a&&u?u.offsetTop:0))/i,l=r.width/o,v=r.height/i;return{width:l,height:v,top:c,right:f+l,bottom:c+v,left:f,x:f,y:c}}function O(t){var n=w(t),e=t.offsetWidth,r=t.offsetHeight;return Math.abs(n.width-e)<=1&&(e=n.width),Math.abs(n.height-r)<=1&&(r=n.height),{x:t.offsetLeft,y:t.offsetTop,width:e,height:r}}function g(t,n){var e=n.getRootNode&&n.getRootNode();if(t.contains(n))return!0;if(e&&l(e)){var r=n;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function j(t){return d(t).getComputedStyle(t)}function M(t){return["table","td","th"].indexOf(c(t))>=0}function k(t){return((p(t)?t.ownerDocument:t.document)||window.document).documentElement}function E(t){return"html"===c(t)?t:t.assignedSlot||t.parentNode||(l(t)?t.host:null)||k(t)}function q(t){return s(t)&&"fixed"!==j(t).position?t.offsetParent:null}function A(t){for(var n=d(t),e=q(t);e&&M(e)&&"static"===j(e).position;)e=q(e);return e&&("html"===c(e)||"body"===c(e)&&"static"===j(e).position)?n:e||function(t){var n=/firefox/i.test(m());if(/Trident/i.test(m())&&s(t)&&"fixed"===j(t).position)return null;var e=E(t);for(l(e)&&(e=e.host);s(e)&&["html","body"].indexOf(c(e))<0;){var r=j(e);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||n&&"filter"===r.willChange||n&&r.filter&&"none"!==r.filter)return e;e=e.parentNode}return null}(t)||n}function B(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function P(t,n,e){return b(t,h(n,e))}function W(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function R(t,n){return n.reduce((function(n,e){return n[e]=t,n}),{})}function S(t){return t.split("-")[1]}var L={top:"auto",right:"auto",bottom:"auto",left:"auto"};function T(o){var i,u=o.popper,a=o.popperRect,f=o.placement,c=o.variation,p=o.offsets,s=o.position,l=o.gpuAcceleration,v=o.adaptive,b=o.roundOffsets,h=o.isFixed,m=p.x,x=void 0===m?0:m,w=p.y,O=void 0===w?0:w,g="function"==typeof b?b({x,y:O}):{x,y:O};x=g.x,O=g.y;var M=p.hasOwnProperty("x"),E=p.hasOwnProperty("y"),q=r,B=t,P=window;if(v){var W=A(u),R="clientHeight",S="clientWidth";W===d(u)&&"static"!==j(W=k(u)).position&&"absolute"===s&&(R="scrollHeight",S="scrollWidth"),W=W,(f===t||(f===r||f===e)&&"end"===c)&&(B=n,O-=(h&&W===P&&P.visualViewport?P.visualViewport.height:W[R])-a.height,O*=l?1:-1),f!==r&&(f!==t&&f!==n||"end"!==c)||(q=e,x-=(h&&W===P&&P.visualViewport?P.visualViewport.width:W[S])-a.width,x*=l?1:-1)}var T,H=Object.assign({position:s},v&&L),I=!0===b?function(t){var n=t.y,e=window.devicePixelRatio||1;return{x:y(t.x*e)/e||0,y:y(n*e)/e||0}}({x,y:O}):{x,y:O};return x=I.x,O=I.y,Object.assign({},H,l?((T={})[B]=E?"0":"",T[q]=M?"0":"",T.transform=(P.devicePixelRatio||1)<=1?"translate("+x+"px, "+O+"px)":"translate3d("+x+"px, "+O+"px, 0)",T):((i={})[B]=E?O+"px":"",i[q]=M?x+"px":"",i.transform="",i))}var H={passive:!0},I={left:"right",right:"left",bottom:"top",top:"bottom"};function z(t){return t.replace(/left|right|bottom|top/g,(function(t){return I[t]}))}var C={start:"end",end:"start"};function D(t){return t.replace(/start|end/g,(function(t){return C[t]}))}function F(t){var n=d(t);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function U(t){return w(k(t)).left+F(t).scrollLeft}function V(t){var n=j(t);return/auto|scroll|overlay|hidden/.test(n.overflow+n.overflowY+n.overflowX)}function _(t){return["html","body","#document"].indexOf(c(t))>=0?t.ownerDocument.body:s(t)&&V(t)?t:_(E(t))}function G(t,n){var e;void 0===n&&(n=[]);var r=_(t),o=r===(null==(e=t.ownerDocument)?void 0:e.body),i=d(r),u=o?[i].concat(i.visualViewport||[],V(r)?r:[]):r,a=n.concat(u);return o?a:a.concat(G(E(u)))}function J(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function K(t,n,e){return"viewport"===n?J(function(t,n){var e=d(t),r=k(t),o=e.visualViewport,i=r.clientWidth,u=r.clientHeight,a=0,f=0;if(o){i=o.width,u=o.height;var c=x();(c||!c&&"fixed"===n)&&(a=o.offsetLeft,f=o.offsetTop)}return{width:i,height:u,x:a+U(t),y:f}}(t,e)):p(n)?function(t,n){var e=w(t,!1,"fixed"===n);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(n,e):J(function(t){var n,e=k(t),r=F(t),o=null==(n=t.ownerDocument)?void 0:n.body,i=b(e.scrollWidth,e.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),u=b(e.scrollHeight,e.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-r.scrollLeft+U(t),f=-r.scrollTop;return"rtl"===j(o||e).direction&&(a+=b(e.clientWidth,o?o.clientWidth:0)-i),{width:i,height:u,x:a,y:f}}(k(t)))}function N(o){var i,u=o.reference,a=o.element,f=o.placement,c=f?v(f):null,d=f?S(f):null,p=u.x+u.width/2-a.width/2,s=u.y+u.height/2-a.height/2;switch(c){case t:i={x:p,y:u.y-a.height};break;case n:i={x:p,y:u.y+u.height};break;case e:i={x:u.x+u.width,y:s};break;case r:i={x:u.x-a.width,y:s};break;default:i={x:u.x,y:u.y}}var l=c?B(c):null;if(null!=l){var b="y"===l?"height":"width";switch(d){case"start":i[l]=i[l]-(u[b]/2-a[b]/2);break;case"end":i[l]=i[l]+(u[b]/2-a[b]/2)}}return i}function Q(r,i){void 0===i&&(i={});var u=i.placement,a=void 0===u?r.placement:u,f=i.strategy,d=void 0===f?r.strategy:f,l=i.boundary,v=void 0===l?"clippingParents":l,y=i.rootBoundary,m=void 0===y?"viewport":y,x=i.elementContext,O=void 0===x?"popper":x,M=i.altBoundary,q=void 0!==M&&M,B=i.padding,P=void 0===B?0:B,S=W("number"!=typeof P?P:R(P,o)),L=r.rects.popper,T=r.elements[q?"popper"===O?"reference":"popper":O],H=function(t,n,e,r){var o="clippingParents"===n?function(t){var n=G(E(t)),e=["absolute","fixed"].indexOf(j(t).position)>=0&&s(t)?A(t):t;return p(e)?n.filter((function(t){return p(t)&&g(t,e)&&"body"!==c(t)})):[]}(t):[].concat(n),i=[].concat(o,[e]),u=i.reduce((function(n,e){var o=K(t,e,r);return n.top=b(o.top,n.top),n.right=h(o.right,n.right),n.bottom=h(o.bottom,n.bottom),n.left=b(o.left,n.left),n}),K(t,i[0],r));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}(p(T)?T:T.contextElement||k(r.elements.popper),v,m,d),I=w(r.elements.reference),z=N({reference:I,element:L,strategy:"absolute",placement:a}),C=J(Object.assign({},L,z)),D="popper"===O?C:I,F={top:H.top-D.top+S.top,bottom:D.bottom-H.bottom+S.bottom,left:H.left-D.left+S.left,right:D.right-H.right+S.right},U=r.modifiersData.offset;if("popper"===O&&U){var V=U[a];Object.keys(F).forEach((function(r){var o=[e,n].indexOf(r)>=0?1:-1,i=[t,n].indexOf(r)>=0?"y":"x";F[r]+=V[i]*o}))}return F}function X(t,n){void 0===n&&(n={});var e=n.boundary,r=n.rootBoundary,a=n.padding,f=n.flipVariations,c=n.allowedAutoPlacements,d=void 0===c?u:c,p=S(n.placement),s=p?f?i:i.filter((function(t){return S(t)===p})):o,l=s.filter((function(t){return d.indexOf(t)>=0}));0===l.length&&(l=s);var b=l.reduce((function(n,o){return n[o]=Q(t,{placement:o,boundary:e,rootBoundary:r,padding:a})[v(o)],n}),{});return Object.keys(b).sort((function(t,n){return b[t]-b[n]}))}function Y(t,n,e){return void 0===e&&(e={x:0,y:0}),{top:t.top-n.height-e.y,right:t.right-n.width+e.x,bottom:t.bottom-n.height+e.y,left:t.left-n.width-e.x}}function Z(o){return[t,e,n,r].some((function(t){return o[t]>=0}))}function $(t,n,e){void 0===e&&(e=!1);var r,o,i=s(n),u=s(n)&&function(t){var n=t.getBoundingClientRect(),e=y(n.width)/t.offsetWidth||1,r=y(n.height)/t.offsetHeight||1;return 1!==e||1!==r}(n),a=k(n),f=w(t,u,e),p={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!e)&&(("body"!==c(n)||V(a))&&(p=(r=n)!==d(r)&&s(r)?{scrollLeft:(o=r).scrollLeft,scrollTop:o.scrollTop}:F(r)),s(n)?((l=w(n,!0)).x+=n.clientLeft,l.y+=n.clientTop):a&&(l.x=U(a))),{x:f.left+p.scrollLeft-l.x,y:f.top+p.scrollTop-l.y,width:f.width,height:f.height}}function tt(t){var n=new Map,e=new Set,r=[];function o(t){e.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!e.has(t)){var r=n.get(t);r&&o(r)}})),r.push(t)}return t.forEach((function(t){n.set(t.name,t)})),t.forEach((function(t){e.has(t.name)||o(t)})),r}var nt={placement:"bottom",modifiers:[],strategy:"absolute"};function et(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return!n.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function rt(t){void 0===t&&(t={});var n=t.defaultModifiers,e=void 0===n?[]:n,r=t.defaultOptions,o=void 0===r?nt:r;return function(t,n,r){void 0===r&&(r=o);var i,u,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},nt,o),modifiersData:{},elements:{reference:t,popper:n},attributes:{},styles:{}},c=[],d=!1,s={state:a,setOptions:function(r){var i="function"==typeof r?r(a.options):r;l(),a.options=Object.assign({},o,a.options,i),a.scrollParents={reference:p(t)?G(t):t.contextElement?G(t.contextElement):[],popper:G(n)};var u,d,v=function(t){var n=tt(t);return f.reduce((function(t,e){return t.concat(n.filter((function(t){return t.phase===e})))}),[])}((u=[].concat(e,a.options.modifiers),d=u.reduce((function(t,n){var e=t[n.name];return t[n.name]=e?Object.assign({},e,n,{options:Object.assign({},e.options,n.options),data:Object.assign({},e.data,n.data)}):n,t}),{}),Object.keys(d).map((function(t){return d[t]}))));return a.orderedModifiers=v.filter((function(t){return t.enabled})),a.orderedModifiers.forEach((function(t){var n=t.options,e=t.effect;if("function"==typeof e){var r=e({state:a,name:t.name,instance:s,options:void 0===n?{}:n});c.push(r||function(){})}})),s.update()},forceUpdate:function(){if(!d){var t=a.elements,n=t.reference,e=t.popper;if(et(n,e)){a.rects={reference:$(n,A(e),"fixed"===a.options.strategy),popper:O(e)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(t){return a.modifiersData[t.name]=Object.assign({},t.data)}));for(var r=0;r<a.orderedModifiers.length;r++)if(!0!==a.reset){var o=a.orderedModifiers[r],i=o.fn,u=o.options;"function"==typeof i&&(a=i({state:a,options:void 0===u?{}:u,name:o.name,instance:s})||a)}else a.reset=!1,r=-1}}},update:(i=function(){return new Promise((function(t){s.forceUpdate(),t(a)}))},function(){return u||(u=new Promise((function(t){Promise.resolve().then((function(){u=void 0,t(i())}))}))),u}),destroy:function(){l(),d=!0}};if(!et(t,n))return s;function l(){c.forEach((function(t){return t()})),c=[]}return s.setOptions(r).then((function(t){!d&&r.onFirstUpdate&&r.onFirstUpdate(t)})),s}}var ot=rt({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var n=t.state,e=t.instance,r=t.options,o=r.scroll,i=void 0===o||o,u=r.resize,a=void 0===u||u,f=d(n.elements.popper),c=[].concat(n.scrollParents.reference,n.scrollParents.popper);return i&&c.forEach((function(t){t.addEventListener("scroll",e.update,H)})),a&&f.addEventListener("resize",e.update,H),function(){i&&c.forEach((function(t){t.removeEventListener("scroll",e.update,H)})),a&&f.removeEventListener("resize",e.update,H)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var n=t.state;n.modifiersData[t.name]=N({reference:n.rects.reference,element:n.rects.popper,strategy:"absolute",placement:n.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var n=t.state,e=t.options,r=e.gpuAcceleration,o=void 0===r||r,i=e.adaptive,u=void 0===i||i,a=e.roundOffsets,f=void 0===a||a,c={placement:v(n.placement),variation:S(n.placement),popper:n.elements.popper,popperRect:n.rects.popper,gpuAcceleration:o,isFixed:"fixed"===n.options.strategy};null!=n.modifiersData.popperOffsets&&(n.styles.popper=Object.assign({},n.styles.popper,T(Object.assign({},c,{offsets:n.modifiersData.popperOffsets,position:n.options.strategy,adaptive:u,roundOffsets:f})))),null!=n.modifiersData.arrow&&(n.styles.arrow=Object.assign({},n.styles.arrow,T(Object.assign({},c,{offsets:n.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-placement":n.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var n=t.state;Object.keys(n.elements).forEach((function(t){var e=n.styles[t]||{},r=n.attributes[t]||{},o=n.elements[t];s(o)&&c(o)&&(Object.assign(o.style,e),Object.keys(r).forEach((function(t){var n=r[t];!1===n?o.removeAttribute(t):o.setAttribute(t,!0===n?"":n)})))}))},effect:function(t){var n=t.state,e={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(n.elements.popper.style,e.popper),n.styles=e,n.elements.arrow&&Object.assign(n.elements.arrow.style,e.arrow),function(){Object.keys(n.elements).forEach((function(t){var r=n.elements[t],o=n.attributes[t]||{},i=Object.keys(n.styles.hasOwnProperty(t)?n.styles[t]:e[t]).reduce((function(t,n){return t[n]="",t}),{});s(r)&&c(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(t){r.removeAttribute(t)})))}))}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(n){var o=n.state,i=n.name,a=n.options.offset,f=void 0===a?[0,0]:a,c=u.reduce((function(n,i){return n[i]=function(n,o,i){var u=v(n),a=[r,t].indexOf(u)>=0?-1:1,f="function"==typeof i?i(Object.assign({},o,{placement:n})):i,c=f[0],d=f[1];return c=c||0,d=(d||0)*a,[r,e].indexOf(u)>=0?{x:d,y:c}:{x:c,y:d}}(i,o.rects,f),n}),{}),d=c[o.placement],p=d.y;null!=o.modifiersData.popperOffsets&&(o.modifiersData.popperOffsets.x+=d.x,o.modifiersData.popperOffsets.y+=p),o.modifiersData[i]=c}},{name:"flip",enabled:!0,phase:"main",fn:function(o){var i=o.state,u=o.options,a=o.name;if(!i.modifiersData[a]._skip){for(var f=u.mainAxis,c=void 0===f||f,d=u.altAxis,p=void 0===d||d,s=u.fallbackPlacements,l=u.padding,b=u.boundary,h=u.rootBoundary,y=u.altBoundary,m=u.flipVariations,x=void 0===m||m,w=u.allowedAutoPlacements,O=i.options.placement,g=v(O),j=s||(g!==O&&x?function(t){if("auto"===v(t))return[];var n=z(t);return[D(t),n,D(n)]}(O):[z(O)]),M=[O].concat(j).reduce((function(t,n){return t.concat("auto"===v(n)?X(i,{placement:n,boundary:b,rootBoundary:h,padding:l,flipVariations:x,allowedAutoPlacements:w}):n)}),[]),k=i.rects.reference,E=i.rects.popper,q=new Map,A=!0,B=M[0],P=0;P<M.length;P++){var W=M[P],R=v(W),L="start"===S(W),T=[t,n].indexOf(R)>=0,H=T?"width":"height",I=Q(i,{placement:W,boundary:b,rootBoundary:h,altBoundary:y,padding:l}),C=T?L?e:r:L?n:t;k[H]>E[H]&&(C=z(C));var F=z(C),U=[];if(c&&U.push(I[R]<=0),p&&U.push(I[C]<=0,I[F]<=0),U.every((function(t){return t}))){B=W,A=!1;break}q.set(W,U)}if(A)for(var V=function(t){var n=M.find((function(n){var e=q.get(n);if(e)return e.slice(0,t).every((function(t){return t}))}));if(n)return B=n,"break"},_=x?3:1;_>0&&"break"!==V(_);_--);i.placement!==B&&(i.modifiersData[a]._skip=!0,i.placement=B,i.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(o){var i=o.state,u=o.options,a=o.name,f=u.mainAxis,c=void 0===f||f,d=u.altAxis,p=void 0!==d&&d,s=u.tether,l=void 0===s||s,y=u.tetherOffset,m=void 0===y?0:y,x=Q(i,{boundary:u.boundary,rootBoundary:u.rootBoundary,padding:u.padding,altBoundary:u.altBoundary}),w=v(i.placement),g=S(i.placement),j=!g,M=B(w),k="x"===M?"y":"x",E=i.modifiersData.popperOffsets,q=i.rects.reference,W=i.rects.popper,R="function"==typeof m?m(Object.assign({},i.rects,{placement:i.placement})):m,L="number"==typeof R?{mainAxis:R,altAxis:R}:Object.assign({mainAxis:0,altAxis:0},R),T=i.modifiersData.offset?i.modifiersData.offset[i.placement]:null,H={x:0,y:0};if(E){if(c){var I,z="y"===M?t:r,C="y"===M?n:e,D="y"===M?"height":"width",F=E[M],U=F+x[z],V=F-x[C],_=l?-W[D]/2:0,G="start"===g?q[D]:W[D],J="start"===g?-W[D]:-q[D],K=i.elements.arrow,N=l&&K?O(K):{width:0,height:0},X=i.modifiersData["arrow#persistent"]?i.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Y=X[z],Z=X[C],$=P(0,q[D],N[D]),tt=j?q[D]/2-_-$-Y-L.mainAxis:G-$-Y-L.mainAxis,nt=j?-q[D]/2+_+$+Z+L.mainAxis:J+$+Z+L.mainAxis,et=i.elements.arrow&&A(i.elements.arrow),rt=null!=(I=null==T?void 0:T[M])?I:0,ot=F+nt-rt,it=P(l?h(U,F+tt-rt-(et?"y"===M?et.clientTop||0:et.clientLeft||0:0)):U,F,l?b(V,ot):V);E[M]=it,H[M]=it-F}if(p){var ut,at=E[k],ft="y"===k?"height":"width",ct=at+x["x"===M?t:r],dt=at-x["x"===M?n:e],pt=-1!==[t,r].indexOf(w),st=null!=(ut=null==T?void 0:T[k])?ut:0,lt=pt?ct:at-q[ft]-W[ft]-st+L.altAxis,vt=pt?at+q[ft]+W[ft]-st-L.altAxis:dt,bt=l&&pt?function(t,n,e){var r=P(t,n,e);return r>e?e:r}(lt,at,vt):P(l?lt:ct,at,l?vt:dt);E[k]=bt,H[k]=bt-at}i.modifiersData[a]=H}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(i){var u,a=i.state,f=i.name,c=i.options,d=a.elements.arrow,p=a.modifiersData.popperOffsets,s=v(a.placement),l=B(s),b=[r,e].indexOf(s)>=0?"height":"width";if(d&&p){var h=function(t,n){return W("number"!=typeof(t="function"==typeof t?t(Object.assign({},n.rects,{placement:n.placement})):t)?t:R(t,o))}(c.padding,a),y=O(d),m="y"===l?t:r,x="y"===l?n:e,w=a.rects.reference[b]+a.rects.reference[l]-p[l]-a.rects.popper[b],g=p[l]-a.rects.reference[l],j=A(d),M=j?"y"===l?j.clientHeight||0:j.clientWidth||0:0,k=M/2-y[b]/2+(w/2-g/2),E=P(h[m],k,M-y[b]-h[x]);a.modifiersData[f]=((u={})[l]=E,u.centerOffset=E-k,u)}},effect:function(t){var n=t.state,e=t.options.element,r=void 0===e?"[data-popper-arrow]":e;null!=r&&("string"!=typeof r||(r=n.elements.popper.querySelector(r)))&&g(n.elements.popper,r)&&(n.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var n=t.state,e=t.name,r=n.rects.reference,o=n.rects.popper,i=n.modifiersData.preventOverflow,u=Q(n,{elementContext:"reference"}),a=Q(n,{altBoundary:!0}),f=Y(u,r),c=Y(a,o,i),d=Z(f),p=Z(c);n.modifiersData[e]={referenceClippingOffsets:f,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:p},n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":p})}}]});export{a as b,ot as c,Q as d}
1
+ var t="top",n="bottom",e="right",r="left",o=[t,n,e,r],i=o.reduce((function(t,n){return t.concat([n+"-start",n+"-end"])}),[]),u=[].concat(o,["auto"]).reduce((function(t,n){return t.concat([n,n+"-start",n+"-end"])}),[]),a="beforeWrite",f=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function c(t){return t?(t.nodeName||"").toLowerCase():null}function d(t){if(null==t)return window;if("[object Window]"!==t.toString()){var n=t.ownerDocument;return n&&n.defaultView||window}return t}function p(t){return t instanceof d(t).Element||t instanceof Element}function s(t){return t instanceof d(t).HTMLElement||t instanceof HTMLElement}function l(t){return"undefined"!=typeof ShadowRoot&&(t instanceof d(t).ShadowRoot||t instanceof ShadowRoot)}function v(t){return t.split("-")[0]}var b=Math.max,h=Math.min,y=Math.round;function m(){var t=navigator.userAgentData;return null!=t&&t.brands?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function x(){return!/^((?!chrome|android).)*safari/i.test(m())}function w(t,n,e){void 0===n&&(n=!1),void 0===e&&(e=!1);var r=t.getBoundingClientRect(),o=1,i=1;n&&s(t)&&(o=t.offsetWidth>0&&y(r.width)/t.offsetWidth||1,i=t.offsetHeight>0&&y(r.height)/t.offsetHeight||1);var u=(p(t)?d(t):window).visualViewport,a=!x()&&e,f=(r.left+(a&&u?u.offsetLeft:0))/o,c=(r.top+(a&&u?u.offsetTop:0))/i,l=r.width/o,v=r.height/i;return{width:l,height:v,top:c,right:f+l,bottom:c+v,left:f,x:f,y:c}}function O(t){var n=w(t),e=t.offsetWidth,r=t.offsetHeight;return Math.abs(n.width-e)<=1&&(e=n.width),Math.abs(n.height-r)<=1&&(r=n.height),{x:t.offsetLeft,y:t.offsetTop,width:e,height:r}}function g(t,n){var e=n.getRootNode&&n.getRootNode();if(t.contains(n))return!0;if(e&&l(e)){var r=n;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function j(t){return d(t).getComputedStyle(t)}function M(t){return["table","td","th"].indexOf(c(t))>=0}function k(t){return((p(t)?t.ownerDocument:t.document)||window.document).documentElement}function E(t){return"html"===c(t)?t:t.assignedSlot||t.parentNode||(l(t)?t.host:null)||k(t)}function q(t){return s(t)&&"fixed"!==j(t).position?t.offsetParent:null}function A(t){for(var n=d(t),e=q(t);e&&M(e)&&"static"===j(e).position;)e=q(e);return e&&("html"===c(e)||"body"===c(e)&&"static"===j(e).position)?n:e||function(t){var n=/firefox/i.test(m());if(/Trident/i.test(m())&&s(t)&&"fixed"===j(t).position)return null;var e=E(t);for(l(e)&&(e=e.host);s(e)&&["html","body"].indexOf(c(e))<0;){var r=j(e);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||n&&"filter"===r.willChange||n&&r.filter&&"none"!==r.filter)return e;e=e.parentNode}return null}(t)||n}function B(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function P(t,n,e){return b(t,h(n,e))}function W(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function R(t,n){return n.reduce((function(n,e){return n[e]=t,n}),{})}function S(t){return t.split("-")[1]}var L={top:"auto",right:"auto",bottom:"auto",left:"auto"};function T(o){var i,u=o.popper,a=o.popperRect,f=o.placement,c=o.variation,p=o.offsets,s=o.position,l=o.gpuAcceleration,v=o.adaptive,b=o.roundOffsets,h=o.isFixed,m=p.x,x=void 0===m?0:m,w=p.y,O=void 0===w?0:w,g="function"==typeof b?b({x,y:O}):{x,y:O};x=g.x,O=g.y;var M=p.hasOwnProperty("x"),E=p.hasOwnProperty("y"),q=r,B=t,P=window;if(v){var W=A(u),R="clientHeight",S="clientWidth";W===d(u)&&"static"!==j(W=k(u)).position&&"absolute"===s&&(R="scrollHeight",S="scrollWidth"),W=W,(f===t||(f===r||f===e)&&"end"===c)&&(B=n,O-=(h&&W===P&&P.visualViewport?P.visualViewport.height:W[R])-a.height,O*=l?1:-1),f!==r&&(f!==t&&f!==n||"end"!==c)||(q=e,x-=(h&&W===P&&P.visualViewport?P.visualViewport.width:W[S])-a.width,x*=l?1:-1)}var T,H=Object.assign({position:s},v&&L),I=!0===b?function(t){var n=t.y,e=window.devicePixelRatio||1;return{x:y(t.x*e)/e||0,y:y(n*e)/e||0}}({x,y:O}):{x,y:O};return x=I.x,O=I.y,Object.assign({},H,l?((T={})[B]=E?"0":"",T[q]=M?"0":"",T.transform=(P.devicePixelRatio||1)<=1?"translate("+x+"px, "+O+"px)":"translate3d("+x+"px, "+O+"px, 0)",T):((i={})[B]=E?O+"px":"",i[q]=M?x+"px":"",i.transform="",i))}var H={passive:!0},I={left:"right",right:"left",bottom:"top",top:"bottom"};function z(t){return t.replace(/left|right|bottom|top/g,(function(t){return I[t]}))}var C={start:"end",end:"start"};function D(t){return t.replace(/start|end/g,(function(t){return C[t]}))}function F(t){var n=d(t);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function U(t){return w(k(t)).left+F(t).scrollLeft}function V(t){var n=j(t);return/auto|scroll|overlay|hidden/.test(n.overflow+n.overflowY+n.overflowX)}function _(t){return["html","body","#document"].indexOf(c(t))>=0?t.ownerDocument.body:s(t)&&V(t)?t:_(E(t))}function G(t,n){var e;void 0===n&&(n=[]);var r=_(t),o=r===(null==(e=t.ownerDocument)?void 0:e.body),i=d(r),u=o?[i].concat(i.visualViewport||[],V(r)?r:[]):r,a=n.concat(u);return o?a:a.concat(G(E(u)))}function J(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function K(t,n,e){return"viewport"===n?J(function(t,n){var e=d(t),r=k(t),o=e.visualViewport,i=r.clientWidth,u=r.clientHeight,a=0,f=0;if(o){i=o.width,u=o.height;var c=x();(c||!c&&"fixed"===n)&&(a=o.offsetLeft,f=o.offsetTop)}return{width:i,height:u,x:a+U(t),y:f}}(t,e)):p(n)?function(t,n){var e=w(t,!1,"fixed"===n);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(n,e):J(function(t){var n,e=k(t),r=F(t),o=null==(n=t.ownerDocument)?void 0:n.body,i=b(e.scrollWidth,e.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),u=b(e.scrollHeight,e.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-r.scrollLeft+U(t),f=-r.scrollTop;return"rtl"===j(o||e).direction&&(a+=b(e.clientWidth,o?o.clientWidth:0)-i),{width:i,height:u,x:a,y:f}}(k(t)))}function N(o){var i,u=o.reference,a=o.element,f=o.placement,c=f?v(f):null,d=f?S(f):null,p=u.x+u.width/2-a.width/2,s=u.y+u.height/2-a.height/2;switch(c){case t:i={x:p,y:u.y-a.height};break;case n:i={x:p,y:u.y+u.height};break;case e:i={x:u.x+u.width,y:s};break;case r:i={x:u.x-a.width,y:s};break;default:i={x:u.x,y:u.y}}var l=c?B(c):null;if(null!=l){var b="y"===l?"height":"width";switch(d){case"start":i[l]=i[l]-(u[b]/2-a[b]/2);break;case"end":i[l]=i[l]+(u[b]/2-a[b]/2)}}return i}function Q(r,i){void 0===i&&(i={});var u=i.placement,a=void 0===u?r.placement:u,f=i.strategy,d=void 0===f?r.strategy:f,l=i.boundary,v=void 0===l?"clippingParents":l,y=i.rootBoundary,m=void 0===y?"viewport":y,x=i.elementContext,O=void 0===x?"popper":x,M=i.altBoundary,q=void 0!==M&&M,B=i.padding,P=void 0===B?0:B,S=W("number"!=typeof P?P:R(P,o)),L=r.rects.popper,T=r.elements[q?"popper"===O?"reference":"popper":O],H=function(t,n,e,r){var o="clippingParents"===n?function(t){var n=G(E(t)),e=["absolute","fixed"].indexOf(j(t).position)>=0&&s(t)?A(t):t;return p(e)?n.filter((function(t){return p(t)&&g(t,e)&&"body"!==c(t)})):[]}(t):[].concat(n),i=[].concat(o,[e]),u=i.reduce((function(n,e){var o=K(t,e,r);return n.top=b(o.top,n.top),n.right=h(o.right,n.right),n.bottom=h(o.bottom,n.bottom),n.left=b(o.left,n.left),n}),K(t,i[0],r));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}(p(T)?T:T.contextElement||k(r.elements.popper),v,m,d),I=w(r.elements.reference),z=N({reference:I,element:L,strategy:"absolute",placement:a}),C=J(Object.assign({},L,z)),D="popper"===O?C:I,F={top:H.top-D.top+S.top,bottom:D.bottom-H.bottom+S.bottom,left:H.left-D.left+S.left,right:D.right-H.right+S.right},U=r.modifiersData.offset;if("popper"===O&&U){var V=U[a];Object.keys(F).forEach((function(r){var o=[e,n].indexOf(r)>=0?1:-1,i=[t,n].indexOf(r)>=0?"y":"x";F[r]+=V[i]*o}))}return F}function X(t,n){void 0===n&&(n={});var e=n.boundary,r=n.rootBoundary,a=n.padding,f=n.flipVariations,c=n.allowedAutoPlacements,d=void 0===c?u:c,p=S(n.placement),s=p?f?i:i.filter((function(t){return S(t)===p})):o,l=s.filter((function(t){return d.indexOf(t)>=0}));0===l.length&&(l=s);var b=l.reduce((function(n,o){return n[o]=Q(t,{placement:o,boundary:e,rootBoundary:r,padding:a})[v(o)],n}),{});return Object.keys(b).sort((function(t,n){return b[t]-b[n]}))}function Y(t,n,e){return void 0===e&&(e={x:0,y:0}),{top:t.top-n.height-e.y,right:t.right-n.width+e.x,bottom:t.bottom-n.height+e.y,left:t.left-n.width-e.x}}function Z(o){return[t,e,n,r].some((function(t){return o[t]>=0}))}function $(t,n,e){void 0===e&&(e=!1);var r,o,i=s(n),u=s(n)&&function(t){var n=t.getBoundingClientRect(),e=y(n.width)/t.offsetWidth||1,r=y(n.height)/t.offsetHeight||1;return 1!==e||1!==r}(n),a=k(n),f=w(t,u,e),p={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!e)&&(("body"!==c(n)||V(a))&&(p=(r=n)!==d(r)&&s(r)?{scrollLeft:(o=r).scrollLeft,scrollTop:o.scrollTop}:F(r)),s(n)?((l=w(n,!0)).x+=n.clientLeft,l.y+=n.clientTop):a&&(l.x=U(a))),{x:f.left+p.scrollLeft-l.x,y:f.top+p.scrollTop-l.y,width:f.width,height:f.height}}function tt(t){var n=new Map,e=new Set,r=[];function o(t){e.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!e.has(t)){var r=n.get(t);r&&o(r)}})),r.push(t)}return t.forEach((function(t){n.set(t.name,t)})),t.forEach((function(t){e.has(t.name)||o(t)})),r}var nt={placement:"bottom",modifiers:[],strategy:"absolute"};function et(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return!n.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function rt(t){void 0===t&&(t={});var n=t.defaultModifiers,e=void 0===n?[]:n,r=t.defaultOptions,o=void 0===r?nt:r;return function(t,n,r){void 0===r&&(r=o);var i,u,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},nt,o),modifiersData:{},elements:{reference:t,popper:n},attributes:{},styles:{}},c=[],d=!1,s={state:a,setOptions:function(r){var i="function"==typeof r?r(a.options):r;l(),a.options=Object.assign({},o,a.options,i),a.scrollParents={reference:p(t)?G(t):t.contextElement?G(t.contextElement):[],popper:G(n)};var u,d,v=function(t){var n=tt(t);return f.reduce((function(t,e){return t.concat(n.filter((function(t){return t.phase===e})))}),[])}((u=[].concat(e,a.options.modifiers),d=u.reduce((function(t,n){var e=t[n.name];return t[n.name]=e?Object.assign({},e,n,{options:Object.assign({},e.options,n.options),data:Object.assign({},e.data,n.data)}):n,t}),{}),Object.keys(d).map((function(t){return d[t]}))));return a.orderedModifiers=v.filter((function(t){return t.enabled})),a.orderedModifiers.forEach((function(t){var n=t.options,e=t.effect;if("function"==typeof e){var r=e({state:a,name:t.name,instance:s,options:void 0===n?{}:n});c.push(r||function(){})}})),s.update()},forceUpdate:function(){if(!d){var t=a.elements,n=t.reference,e=t.popper;if(et(n,e)){a.rects={reference:$(n,A(e),"fixed"===a.options.strategy),popper:O(e)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(t){return a.modifiersData[t.name]=Object.assign({},t.data)}));for(var r=0;r<a.orderedModifiers.length;r++)if(!0!==a.reset){var o=a.orderedModifiers[r],i=o.fn,u=o.options;"function"==typeof i&&(a=i({state:a,options:void 0===u?{}:u,name:o.name,instance:s})||a)}else a.reset=!1,r=-1}}},update:(i=function(){return new Promise((function(t){s.forceUpdate(),t(a)}))},function(){return u||(u=new Promise((function(t){Promise.resolve().then((function(){u=void 0,t(i())}))}))),u}),destroy:function(){l(),d=!0}};if(!et(t,n))return s;function l(){c.forEach((function(t){return t()})),c=[]}return s.setOptions(r).then((function(t){!d&&r.onFirstUpdate&&r.onFirstUpdate(t)})),s}}var ot=rt({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var n=t.state,e=t.instance,r=t.options,o=r.scroll,i=void 0===o||o,u=r.resize,a=void 0===u||u,f=d(n.elements.popper),c=[].concat(n.scrollParents.reference,n.scrollParents.popper);return i&&c.forEach((function(t){t.addEventListener("scroll",e.update,H)})),a&&f.addEventListener("resize",e.update,H),function(){i&&c.forEach((function(t){t.removeEventListener("scroll",e.update,H)})),a&&f.removeEventListener("resize",e.update,H)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var n=t.state;n.modifiersData[t.name]=N({reference:n.rects.reference,element:n.rects.popper,strategy:"absolute",placement:n.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var n=t.state,e=t.options,r=e.gpuAcceleration,o=void 0===r||r,i=e.adaptive,u=void 0===i||i,a=e.roundOffsets,f=void 0===a||a,c={placement:v(n.placement),variation:S(n.placement),popper:n.elements.popper,popperRect:n.rects.popper,gpuAcceleration:o,isFixed:"fixed"===n.options.strategy};null!=n.modifiersData.popperOffsets&&(n.styles.popper=Object.assign({},n.styles.popper,T(Object.assign({},c,{offsets:n.modifiersData.popperOffsets,position:n.options.strategy,adaptive:u,roundOffsets:f})))),null!=n.modifiersData.arrow&&(n.styles.arrow=Object.assign({},n.styles.arrow,T(Object.assign({},c,{offsets:n.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-placement":n.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var n=t.state;Object.keys(n.elements).forEach((function(t){var e=n.styles[t]||{},r=n.attributes[t]||{},o=n.elements[t];s(o)&&c(o)&&(Object.assign(o.style,e),Object.keys(r).forEach((function(t){var n=r[t];!1===n?o.removeAttribute(t):o.setAttribute(t,!0===n?"":n)})))}))},effect:function(t){var n=t.state,e={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(n.elements.popper.style,e.popper),n.styles=e,n.elements.arrow&&Object.assign(n.elements.arrow.style,e.arrow),function(){Object.keys(n.elements).forEach((function(t){var r=n.elements[t],o=n.attributes[t]||{},i=Object.keys(n.styles.hasOwnProperty(t)?n.styles[t]:e[t]).reduce((function(t,n){return t[n]="",t}),{});s(r)&&c(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(t){r.removeAttribute(t)})))}))}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(n){var o=n.state,i=n.name,a=n.options.offset,f=void 0===a?[0,0]:a,c=u.reduce((function(n,i){return n[i]=function(n,o,i){var u=v(n),a=[r,t].indexOf(u)>=0?-1:1,f="function"==typeof i?i(Object.assign({},o,{placement:n})):i,c=f[0],d=f[1];return c=c||0,d=(d||0)*a,[r,e].indexOf(u)>=0?{x:d,y:c}:{x:c,y:d}}(i,o.rects,f),n}),{}),d=c[o.placement],p=d.y;null!=o.modifiersData.popperOffsets&&(o.modifiersData.popperOffsets.x+=d.x,o.modifiersData.popperOffsets.y+=p),o.modifiersData[i]=c}},{name:"flip",enabled:!0,phase:"main",fn:function(o){var i=o.state,u=o.options,a=o.name;if(!i.modifiersData[a]._skip){for(var f=u.mainAxis,c=void 0===f||f,d=u.altAxis,p=void 0===d||d,s=u.fallbackPlacements,l=u.padding,b=u.boundary,h=u.rootBoundary,y=u.altBoundary,m=u.flipVariations,x=void 0===m||m,w=u.allowedAutoPlacements,O=i.options.placement,g=v(O),j=s||(g!==O&&x?function(t){if("auto"===v(t))return[];var n=z(t);return[D(t),n,D(n)]}(O):[z(O)]),M=[O].concat(j).reduce((function(t,n){return t.concat("auto"===v(n)?X(i,{placement:n,boundary:b,rootBoundary:h,padding:l,flipVariations:x,allowedAutoPlacements:w}):n)}),[]),k=i.rects.reference,E=i.rects.popper,q=new Map,A=!0,B=M[0],P=0;P<M.length;P++){var W=M[P],R=v(W),L="start"===S(W),T=[t,n].indexOf(R)>=0,H=T?"width":"height",I=Q(i,{placement:W,boundary:b,rootBoundary:h,altBoundary:y,padding:l}),C=T?L?e:r:L?n:t;k[H]>E[H]&&(C=z(C));var F=z(C),U=[];if(c&&U.push(I[R]<=0),p&&U.push(I[C]<=0,I[F]<=0),U.every((function(t){return t}))){B=W,A=!1;break}q.set(W,U)}if(A)for(var V=function(t){var n=M.find((function(n){var e=q.get(n);if(e)return e.slice(0,t).every((function(t){return t}))}));if(n)return B=n,"break"},_=x?3:1;_>0&&"break"!==V(_);_--);i.placement!==B&&(i.modifiersData[a]._skip=!0,i.placement=B,i.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(o){var i=o.state,u=o.options,a=o.name,f=u.mainAxis,c=void 0===f||f,d=u.altAxis,p=void 0!==d&&d,s=u.tether,l=void 0===s||s,y=u.tetherOffset,m=void 0===y?0:y,x=Q(i,{boundary:u.boundary,rootBoundary:u.rootBoundary,padding:u.padding,altBoundary:u.altBoundary}),w=v(i.placement),g=S(i.placement),j=!g,M=B(w),k="x"===M?"y":"x",E=i.modifiersData.popperOffsets,q=i.rects.reference,W=i.rects.popper,R="function"==typeof m?m(Object.assign({},i.rects,{placement:i.placement})):m,L="number"==typeof R?{mainAxis:R,altAxis:R}:Object.assign({mainAxis:0,altAxis:0},R),T=i.modifiersData.offset?i.modifiersData.offset[i.placement]:null,H={x:0,y:0};if(E){if(c){var I,z="y"===M?t:r,C="y"===M?n:e,D="y"===M?"height":"width",F=E[M],U=F+x[z],V=F-x[C],_=l?-W[D]/2:0,G="start"===g?q[D]:W[D],J="start"===g?-W[D]:-q[D],K=i.elements.arrow,N=l&&K?O(K):{width:0,height:0},X=i.modifiersData["arrow#persistent"]?i.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Y=X[z],Z=X[C],$=P(0,q[D],N[D]),tt=j?q[D]/2-_-$-Y-L.mainAxis:G-$-Y-L.mainAxis,nt=j?-q[D]/2+_+$+Z+L.mainAxis:J+$+Z+L.mainAxis,et=i.elements.arrow&&A(i.elements.arrow),rt=null!=(I=null==T?void 0:T[M])?I:0,ot=F+nt-rt,it=P(l?h(U,F+tt-rt-(et?"y"===M?et.clientTop||0:et.clientLeft||0:0)):U,F,l?b(V,ot):V);E[M]=it,H[M]=it-F}if(p){var ut,at=E[k],ft="y"===k?"height":"width",ct=at+x["x"===M?t:r],dt=at-x["x"===M?n:e],pt=-1!==[t,r].indexOf(w),st=null!=(ut=null==T?void 0:T[k])?ut:0,lt=pt?ct:at-q[ft]-W[ft]-st+L.altAxis,vt=pt?at+q[ft]+W[ft]-st-L.altAxis:dt,bt=l&&pt?function(t,n,e){var r=P(t,n,e);return r>e?e:r}(lt,at,vt):P(l?lt:ct,at,l?vt:dt);E[k]=bt,H[k]=bt-at}i.modifiersData[a]=H}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(i){var u,a=i.state,f=i.name,c=i.options,d=a.elements.arrow,p=a.modifiersData.popperOffsets,s=v(a.placement),l=B(s),b=[r,e].indexOf(s)>=0?"height":"width";if(d&&p){var h=function(t,n){return W("number"!=typeof(t="function"==typeof t?t(Object.assign({},n.rects,{placement:n.placement})):t)?t:R(t,o))}(c.padding,a),y=O(d),m="y"===l?t:r,x="y"===l?n:e,w=a.rects.reference[b]+a.rects.reference[l]-p[l]-a.rects.popper[b],g=p[l]-a.rects.reference[l],j=A(d),M=j?"y"===l?j.clientHeight||0:j.clientWidth||0:0,k=M/2-y[b]/2+(w/2-g/2),E=P(h[m],k,M-y[b]-h[x]);a.modifiersData[f]=((u={})[l]=E,u.centerOffset=E-k,u)}},effect:function(t){var n=t.state,e=t.options.element,r=void 0===e?"[data-popper-arrow]":e;null!=r&&("string"!=typeof r||(r=n.elements.popper.querySelector(r)))&&g(n.elements.popper,r)&&(n.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var n=t.state,e=t.name,r=n.rects.reference,o=n.rects.popper,i=n.modifiersData.preventOverflow,u=Q(n,{elementContext:"reference"}),a=Q(n,{altBoundary:!0}),f=Y(u,r),c=Y(a,o,i),d=Z(f),p=Z(c);n.modifiersData[e]={referenceClippingOffsets:f,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:p},n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":p})}}]});function it(t){const n=window.getComputedStyle(t),e=n.getPropertyValue("overflow-x"),r=n.getPropertyValue("overflow-y"),o=["hidden","clip"];return-1!==o.indexOf(e)||-1!==o.indexOf(r)}export{a as b,ot as c,Q as d,it as h}
@@ -0,0 +1 @@
1
+ import{r as t,h as s,H as o,g as i}from"./p-98fd1658.js";import{t as e}from"./p-3635427a.js";import{h as n,c as r}from"./p-d3ed00f6.js";import{v as h}from"./p-5d7f4ff2.js";const a=class{constructor(s){t(this,s),this.focusOutListener=t=>{this.tabbables.includes(t.relatedTarget)||(this.open=!1)},this.keyDownListener=t=>{if(!t.defaultPrevented){switch(t.key){case"ArrowDown":this.tabInPopup(1);break;case"ArrowUp":this.tabInPopup(-1);break;case"Escape":this.escape();break;case" ":t.target instanceof HTMLElement&&t.target.click();break;default:return}t.preventDefault()}},this.escape=()=>{this.button.focus(),this.open=!1},this.open=!1,this.dropdownAlign="left",this.checkable=!1,this.boundary=void 0,this.strategy="auto"}watchPosition(){this.popper&&this.popper.setOptions({placement:"right"===this.dropdownAlign?"bottom-end":"bottom-start"})}watchStrategy(){this.setStrategy()}setStrategy(){if(!this.popper)return;if("absolute"===this.strategy||"fixed"===this.strategy)return void this.popper.setOptions({strategy:this.strategy});let t=this.host;const s=this.boundary||document;for(;t&&t.parentNode!==s;)if(t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentElement,null!==t&&n(t))return void this.popper.setOptions({strategy:"fixed"});this.popper.setOptions({strategy:"absolute"})}get button(){const t=this.host.querySelector('button[slot="toggle"]');if(!(t instanceof HTMLButtonElement))throw new ReferenceError("Mandatory toggle button not found");return t}get tabbables(){return e(this.host).filter((t=>t!==this.button))}componentDidLoad(){this.button.setAttribute("aria-haspopup","menu"),this.button.setAttribute("aria-expanded","false"),this.button.id||(this.button.id=h()),this.button.addEventListener("click",(()=>{this.open=!this.open}));const t=this.host.querySelector(".dso-dropdown-options");if(!t)throw new ReferenceError("Dropdown options not found");t.setAttribute("role","menu"),t.setAttribute("aria-labelledby",this.button.id);for(const t of Array.from(this.host.getElementsByTagName("ul"))){t.setAttribute("role","group");for(const s of Array.from(t.getElementsByTagName("li")))s.setAttribute("role","none")}if(this.popper)return;const s=this.host.querySelector(".dso-dropdown-options");if(!(s instanceof HTMLElement))throw new Error("dropdown options element is not instanceof HTMLElement");this.popper=r(this.button,s,{placement:"right"===this.dropdownAlign?"bottom-end":"bottom-start",modifiers:[{name:"offset",options:{offset:[0,2]}},{name:"preventOverflow",options:{boundary:this.boundary?document.querySelector(this.boundary):null},enabled:void 0!==this.boundary}]})}componentDidRender(){var t;this.setStrategy(),this.open&&(null===(t=this.popper)||void 0===t||t.update());for(const t of Array.from(this.host.getElementsByTagName("li")))for(const s of e(t))s.setAttribute("role",this.checkable?"menuitemradio":"menuitem"),this.checkable&&s.setAttribute("aria-checked",t.classList.contains("dso-checked").toString());this.host.removeEventListener("keydown",this.keyDownListener),this.button.setAttribute("aria-expanded",this.open?"true":"false"),this.open&&this.host.addEventListener("keydown",this.keyDownListener),this.tabbables.forEach((t=>{t.removeEventListener("click",this.escape),this.open&&t.addEventListener("click",this.escape)}))}disconnectedCallback(){var t;null===(t=this.popper)||void 0===t||t.destroy()}getActiveElement(t=document){const s=t.activeElement;return s?s.shadowRoot?this.getActiveElement(s.shadowRoot):s:null}tabInPopup(t){const s=this.tabbables;let o=s.findIndex((t=>t===this.getActiveElement()))+t;o>=s.length?o=0:o<0&&(o=s.length-1),s[o].focus()}render(){return s(o,{onFocusout:this.focusOutListener,tabindex:this.open?"-1":void 0},s("slot",{name:"toggle"}),s("div",{hidden:!this.open},s("slot",null)))}get host(){return i(this)}static get watchers(){return{dropdownAlign:["watchPosition"],strategy:["watchStrategy"]}}};a.style=":host(:focus){outline:none}:host{display:inline-block}";export{a as dso_dropdown_menu}
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, h, H as Host, g as getElement } from './index-ac5a22a3.js';
2
2
  import { t as tabbable } from './index.esm-8fc07ad8.js';
3
+ import { h as hasOverflow, c as createPopper } from './has-overflow-c44a8a0a.js';
3
4
  import { v as v4 } from './v4-d398bde5.js';
4
- import { c as createPopper } from './popper-467f7841.js';
5
5
 
6
6
  const dropdownMenuCss = ":host(:focus){outline:none}:host{display:inline-block}";
7
7
 
@@ -45,6 +45,7 @@ const DropdownMenu = class {
45
45
  this.dropdownAlign = "left";
46
46
  this.checkable = false;
47
47
  this.boundary = undefined;
48
+ this.strategy = "auto";
48
49
  }
49
50
  watchPosition() {
50
51
  if (!this.popper) {
@@ -54,6 +55,34 @@ const DropdownMenu = class {
54
55
  placement: this.dropdownAlign === "right" ? "bottom-end" : "bottom-start",
55
56
  });
56
57
  }
58
+ watchStrategy() {
59
+ this.setStrategy();
60
+ }
61
+ setStrategy() {
62
+ if (!this.popper) {
63
+ return;
64
+ }
65
+ if (this.strategy === "absolute" || this.strategy === "fixed") {
66
+ this.popper.setOptions({
67
+ strategy: this.strategy,
68
+ });
69
+ return;
70
+ }
71
+ let element = this.host;
72
+ const boundary = this.boundary || document;
73
+ while (element && element.parentNode !== boundary) {
74
+ element = element.parentNode instanceof ShadowRoot ? element.parentNode.host : element.parentElement;
75
+ if (element !== null && hasOverflow(element)) {
76
+ this.popper.setOptions({
77
+ strategy: "fixed",
78
+ });
79
+ return;
80
+ }
81
+ }
82
+ this.popper.setOptions({
83
+ strategy: "absolute",
84
+ });
85
+ }
57
86
  get button() {
58
87
  const button = this.host.querySelector('button[slot="toggle"]');
59
88
  if (!(button instanceof HTMLButtonElement)) {
@@ -88,11 +117,11 @@ const DropdownMenu = class {
88
117
  if (this.popper) {
89
118
  return;
90
119
  }
91
- const dropdownOptions = this.host.querySelector(".dso-dropdown-options");
92
- if (!(dropdownOptions instanceof HTMLElement)) {
120
+ const dropdownOptionsElement = this.host.querySelector(".dso-dropdown-options");
121
+ if (!(dropdownOptionsElement instanceof HTMLElement)) {
93
122
  throw new Error("dropdown options element is not instanceof HTMLElement");
94
123
  }
95
- this.popper = createPopper(this.button, dropdownOptions, {
124
+ this.popper = createPopper(this.button, dropdownOptionsElement, {
96
125
  placement: this.dropdownAlign === "right" ? "bottom-end" : "bottom-start",
97
126
  modifiers: [
98
127
  {
@@ -113,7 +142,10 @@ const DropdownMenu = class {
113
142
  }
114
143
  componentDidRender() {
115
144
  var _a;
116
- (_a = this.popper) === null || _a === void 0 ? void 0 : _a.update();
145
+ this.setStrategy();
146
+ if (this.open) {
147
+ (_a = this.popper) === null || _a === void 0 ? void 0 : _a.update();
148
+ }
117
149
  for (const li of Array.from(this.host.getElementsByTagName("li"))) {
118
150
  for (const tab of tabbable(li)) {
119
151
  tab.setAttribute("role", this.checkable ? "menuitemradio" : "menuitem");
@@ -165,7 +197,8 @@ const DropdownMenu = class {
165
197
  }
166
198
  get host() { return getElement(this); }
167
199
  static get watchers() { return {
168
- "dropdownAlign": ["watchPosition"]
200
+ "dropdownAlign": ["watchPosition"],
201
+ "strategy": ["watchStrategy"]
169
202
  }; }
170
203
  };
171
204
  DropdownMenu.style = dropdownMenuCss;
@@ -13,5 +13,5 @@ const patchBrowser = () => {
13
13
  };
14
14
 
15
15
  patchBrowser().then(options => {
16
- return bootstrapLazy([["dso-icon",[[1,"dso-icon",{"icon":[1]}]]],["dso-map-base-layers",[[1,"dso-map-base-layers",{"group":[1],"baseLayers":[16]}]]],["dso-map-overlays",[[1,"dso-map-overlays",{"group":[1],"overlays":[16]}]]],["dso-annotation-output",[[4,"dso-annotation-output",{"identifier":[1],"annotationPrefix":[1,"annotation-prefix"],"toggleAnnotation":[64]}]]],["dso-toggletip",[[1,"dso-toggletip",{"label":[1],"position":[1],"small":[4],"secondary":[4],"active":[32]}]]],["dso-expandable-heading",[[1,"dso-expandable-heading",{"open":[4],"heading":[1],"color":[1]}]]],["dso-header",[[6,"dso-header",{"mainMenu":[16],"useDropDownMenu":[1,"use-drop-down-menu"],"authStatus":[1,"auth-status"],"loginUrl":[1,"login-url"],"logoutUrl":[1,"logout-url"],"userProfileName":[1,"user-profile-name"],"userProfileUrl":[1,"user-profile-url"],"userHomeUrl":[1,"user-home-url"],"showDropDown":[32],"hasSubLogo":[32],"overflowMenuItems":[32]}]]],["dso-label",[[1,"dso-label",{"compact":[4],"removable":[4],"status":[1],"truncate":[4],"removeHover":[32],"removeFocus":[32],"textHover":[32],"textFocus":[32],"truncatedContent":[32],"labelText":[32]}]]],["dso-pagination",[[1,"dso-pagination",{"totalPages":[2,"total-pages"],"currentPage":[2,"current-page"],"formatHref":[16],"availablePositions":[32]},[[0,"dsoSizeChange","sizeChangeHandler"]]]]],["dso-tree-view",[[1,"dso-tree-view",{"collection":[16],"focusItem":[64]}]]],["dso-accordion-section",[[1,"dso-accordion-section",{"handleTitle":[1,"handle-title"],"heading":[1],"handleUrl":[1,"handle-url"],"state":[1],"attachmentCount":[2,"attachment-count"],"icon":[1],"status":[1],"open":[1540],"hasNestedSection":[32],"toggleSection":[64],"scrollSectionIntoView":[64]}]]],["dso-alert",[[1,"dso-alert",{"status":[1],"roleAlert":[4,"role-alert"]}]]],["dso-annotation-button",[[0,"dso-annotation-button",{"identifier":[1]}]]],["dso-attachments-counter",[[1,"dso-attachments-counter",{"count":[2]}]]],["dso-autosuggest",[[6,"dso-autosuggest",{"suggestions":[16],"loading":[4],"loadingLabel":[1,"loading-label"],"loadingDelayed":[2,"loading-delayed"],"notFoundLabel":[1,"not-found-label"],"suggestOnFocus":[4,"suggest-on-focus"],"showSuggestions":[32],"selectedSuggestion":[32],"notFound":[32],"showLoading":[32]},[[4,"click","onDocumentClick"]]]]],["dso-date-picker",[[2,"dso-date-picker",{"name":[1],"identifier":[1],"disabled":[516],"role":[1],"direction":[1],"required":[4],"dsoAutofocus":[4,"dso-autofocus"],"value":[1537],"min":[1],"max":[1],"activeFocus":[32],"focusedDay":[32],"open":[32],"visible":[32],"setFocus":[64],"show":[64],"hide":[64]},[[6,"click","handleDocumentClick"]]]]],["dso-helpcenter-panel",[[1,"dso-helpcenter-panel",{"label":[1],"url":[1],"visibility":[32],"isOpen":[32],"slideState":[32],"loadIframe":[32]},[[8,"keydown","keyDownListener"]]]]],["dso-image-overlay",[[1,"dso-image-overlay",{"active":[32],"zoomable":[32]},[[2,"load","loadListener"]]]]],["dso-list-button",[[1,"dso-list-button",{"label":[1],"sublabel":[1],"subcontent":[1],"count":[2],"min":[8],"max":[8],"checked":[516],"disabled":[516],"manualInputWrapperElement":[32],"manualCount":[32]}]]],["dso-map-controls",[[1,"dso-map-controls",{"open":[1540],"disableZoom":[1,"disable-zoom"],"hideContent":[32],"toggleVisibility":[64]}]]],["dso-modal",[[1,"dso-modal",{"modalTitle":[1,"modal-title"],"role":[1],"showCloseButton":[4,"show-close-button"],"initialFocus":[1,"initial-focus"],"ariaId":[32],"hasFooter":[32]}]]],["dso-table",[[1,"dso-table",{"noModal":[516,"no-modal"],"isResponsive":[516,"is-responsive"],"modalActive":[32],"placeholderHeight":[32]}]]],["dso-viewer-grid",[[1,"dso-viewer-grid",{"filterpanelOpen":[516,"filterpanel-open"],"overlayOpen":[516,"overlay-open"],"initialMainSize":[1,"initial-main-size"],"mainSize":[32]}]]],["dso-accordion",[[1,"dso-accordion",{"variant":[513],"reverseAlign":[516,"reverse-align"],"allowMultipleOpen":[516,"allow-multiple-open"],"getState":[64],"toggleSection":[64],"animationEnd":[64],"closeOpenSections":[64]}]]],["dso-badge",[[1,"dso-badge",{"status":[1]}]]],["dso-banner",[[1,"dso-banner",{"status":[513]}]]],["dso-card",[[1,"dso-card",{"isSelectable":[516,"is-selectable"],"hasImage":[516,"has-image"],"clickable":[4]}]]],["dso-card-container",[[1,"dso-card-container",{"mode":[513]}]]],["dso-highlight-box",[[1,"dso-highlight-box",{"yellow":[4],"border":[4],"white":[4],"dropShadow":[4,"drop-shadow"],"step":[2]}]]],["dso-ozon-content",[[6,"dso-ozon-content",{"content":[1],"inline":[516],"deleted":[516],"interactive":[520],"state":[32]}]]],["dso-progress-bar",[[1,"dso-progress-bar",{"progress":[2],"min":[2],"max":[2]}]]],["dso-slide-toggle",[[4,"dso-slide-toggle",{"checked":[4],"disabled":[4],"accessibleLabel":[1,"accessible-label"],"labelledbyId":[1,"labelledby-id"],"identifier":[1],"hasVisibleLabel":[32]}]]],["dso-dropdown-menu",[[1,"dso-dropdown-menu",{"open":[1540],"dropdownAlign":[1,"dropdown-align"],"checkable":[4],"boundary":[1]}]]],["dso-expandable",[[1,"dso-expandable",{"open":[516]}]]],["dso-progress-indicator",[[1,"dso-progress-indicator",{"label":[1],"size":[513],"block":[4]}]]],["dso-responsive-element",[[1,"dso-responsive-element",{"sizeAlias":[32],"sizeWidth":[32],"getSize":[64]}]]],["dso-tooltip",[[1,"dso-tooltip",{"descriptive":[516],"position":[1],"strategy":[1],"noArrow":[4,"no-arrow"],"stateless":[4],"small":[4],"active":[1540],"hidden":[32],"activate":[64],"deactivate":[64]},[[0,"click","listenClick"]]]]],["dso-info-button",[[1,"dso-info-button",{"active":[1540],"secondary":[4],"label":[1],"hover":[32],"setFocus":[64]}]]],["dso-info_2",[[6,"dso-selectable",{"type":[1],"identifier":[1],"name":[1],"value":[1],"invalid":[4],"describedById":[1,"described-by-id"],"labelledById":[1,"labelled-by-id"],"disabled":[4],"required":[4],"checked":[4],"indeterminate":[4],"infoFixed":[4,"info-fixed"],"infoActive":[32],"toggleInfo":[64]}],[1,"dso-info",{"fixed":[516],"active":[516]}]]]], options);
16
+ return bootstrapLazy([["dso-icon",[[1,"dso-icon",{"icon":[1]}]]],["dso-map-base-layers",[[1,"dso-map-base-layers",{"group":[1],"baseLayers":[16]}]]],["dso-map-overlays",[[1,"dso-map-overlays",{"group":[1],"overlays":[16]}]]],["dso-annotation-output",[[4,"dso-annotation-output",{"identifier":[1],"annotationPrefix":[1,"annotation-prefix"],"toggleAnnotation":[64]}]]],["dso-toggletip",[[1,"dso-toggletip",{"label":[1],"position":[1],"small":[4],"secondary":[4],"active":[32]}]]],["dso-expandable-heading",[[1,"dso-expandable-heading",{"open":[4],"heading":[1],"color":[1]}]]],["dso-header",[[6,"dso-header",{"mainMenu":[16],"useDropDownMenu":[1,"use-drop-down-menu"],"authStatus":[1,"auth-status"],"loginUrl":[1,"login-url"],"logoutUrl":[1,"logout-url"],"userProfileName":[1,"user-profile-name"],"userProfileUrl":[1,"user-profile-url"],"userHomeUrl":[1,"user-home-url"],"showDropDown":[32],"hasSubLogo":[32],"overflowMenuItems":[32]}]]],["dso-label",[[1,"dso-label",{"compact":[4],"removable":[4],"status":[1],"truncate":[4],"removeHover":[32],"removeFocus":[32],"textHover":[32],"textFocus":[32],"truncatedContent":[32],"labelText":[32]}]]],["dso-pagination",[[1,"dso-pagination",{"totalPages":[2,"total-pages"],"currentPage":[2,"current-page"],"formatHref":[16],"availablePositions":[32]},[[0,"dsoSizeChange","sizeChangeHandler"]]]]],["dso-tree-view",[[1,"dso-tree-view",{"collection":[16],"focusItem":[64]}]]],["dso-accordion-section",[[1,"dso-accordion-section",{"handleTitle":[1,"handle-title"],"heading":[1],"handleUrl":[1,"handle-url"],"state":[1],"attachmentCount":[2,"attachment-count"],"icon":[1],"status":[1],"open":[1540],"hasNestedSection":[32],"toggleSection":[64],"scrollSectionIntoView":[64]}]]],["dso-alert",[[1,"dso-alert",{"status":[1],"roleAlert":[4,"role-alert"]}]]],["dso-annotation-button",[[0,"dso-annotation-button",{"identifier":[1]}]]],["dso-attachments-counter",[[1,"dso-attachments-counter",{"count":[2]}]]],["dso-autosuggest",[[6,"dso-autosuggest",{"suggestions":[16],"loading":[4],"loadingLabel":[1,"loading-label"],"loadingDelayed":[2,"loading-delayed"],"notFoundLabel":[1,"not-found-label"],"suggestOnFocus":[4,"suggest-on-focus"],"showSuggestions":[32],"selectedSuggestion":[32],"notFound":[32],"showLoading":[32]},[[4,"click","onDocumentClick"]]]]],["dso-date-picker",[[2,"dso-date-picker",{"name":[1],"identifier":[1],"disabled":[516],"role":[1],"direction":[1],"required":[4],"dsoAutofocus":[4,"dso-autofocus"],"value":[1537],"min":[1],"max":[1],"activeFocus":[32],"focusedDay":[32],"open":[32],"visible":[32],"setFocus":[64],"show":[64],"hide":[64]},[[6,"click","handleDocumentClick"]]]]],["dso-helpcenter-panel",[[1,"dso-helpcenter-panel",{"label":[1],"url":[1],"visibility":[32],"isOpen":[32],"slideState":[32],"loadIframe":[32]},[[8,"keydown","keyDownListener"]]]]],["dso-image-overlay",[[1,"dso-image-overlay",{"active":[32],"zoomable":[32]},[[2,"load","loadListener"]]]]],["dso-list-button",[[1,"dso-list-button",{"label":[1],"sublabel":[1],"subcontent":[1],"count":[2],"min":[8],"max":[8],"checked":[516],"disabled":[516],"manualInputWrapperElement":[32],"manualCount":[32]}]]],["dso-map-controls",[[1,"dso-map-controls",{"open":[1540],"disableZoom":[1,"disable-zoom"],"hideContent":[32],"toggleVisibility":[64]}]]],["dso-modal",[[1,"dso-modal",{"modalTitle":[1,"modal-title"],"role":[1],"showCloseButton":[4,"show-close-button"],"initialFocus":[1,"initial-focus"],"ariaId":[32],"hasFooter":[32]}]]],["dso-table",[[1,"dso-table",{"noModal":[516,"no-modal"],"isResponsive":[516,"is-responsive"],"modalActive":[32],"placeholderHeight":[32]}]]],["dso-viewer-grid",[[1,"dso-viewer-grid",{"filterpanelOpen":[516,"filterpanel-open"],"overlayOpen":[516,"overlay-open"],"initialMainSize":[1,"initial-main-size"],"mainSize":[32]}]]],["dso-accordion",[[1,"dso-accordion",{"variant":[513],"reverseAlign":[516,"reverse-align"],"allowMultipleOpen":[516,"allow-multiple-open"],"getState":[64],"toggleSection":[64],"animationEnd":[64],"closeOpenSections":[64]}]]],["dso-badge",[[1,"dso-badge",{"status":[1]}]]],["dso-banner",[[1,"dso-banner",{"status":[513]}]]],["dso-card",[[1,"dso-card",{"isSelectable":[516,"is-selectable"],"hasImage":[516,"has-image"],"clickable":[4]}]]],["dso-card-container",[[1,"dso-card-container",{"mode":[513]}]]],["dso-highlight-box",[[1,"dso-highlight-box",{"yellow":[4],"border":[4],"white":[4],"dropShadow":[4,"drop-shadow"],"step":[2]}]]],["dso-ozon-content",[[6,"dso-ozon-content",{"content":[1],"inline":[516],"deleted":[516],"interactive":[520],"state":[32]}]]],["dso-progress-bar",[[1,"dso-progress-bar",{"progress":[2],"min":[2],"max":[2]}]]],["dso-slide-toggle",[[4,"dso-slide-toggle",{"checked":[4],"disabled":[4],"accessibleLabel":[1,"accessible-label"],"labelledbyId":[1,"labelledby-id"],"identifier":[1],"hasVisibleLabel":[32]}]]],["dso-dropdown-menu",[[1,"dso-dropdown-menu",{"open":[1540],"dropdownAlign":[1,"dropdown-align"],"checkable":[4],"boundary":[1],"strategy":[1]}]]],["dso-expandable",[[1,"dso-expandable",{"open":[516]}]]],["dso-progress-indicator",[[1,"dso-progress-indicator",{"label":[1],"size":[513],"block":[4]}]]],["dso-responsive-element",[[1,"dso-responsive-element",{"sizeAlias":[32],"sizeWidth":[32],"getSize":[64]}]]],["dso-tooltip",[[1,"dso-tooltip",{"descriptive":[516],"position":[1],"strategy":[1],"noArrow":[4,"no-arrow"],"stateless":[4],"small":[4],"active":[1540],"hidden":[32],"activate":[64],"deactivate":[64]},[[0,"click","listenClick"]]]]],["dso-info-button",[[1,"dso-info-button",{"active":[1540],"secondary":[4],"label":[1],"hover":[32],"setFocus":[64]}]]],["dso-info_2",[[6,"dso-selectable",{"type":[1],"identifier":[1],"name":[1],"value":[1],"invalid":[4],"describedById":[1,"described-by-id"],"labelledById":[1,"labelled-by-id"],"disabled":[4],"required":[4],"checked":[4],"indeterminate":[4],"infoFixed":[4,"info-fixed"],"infoActive":[32],"toggleInfo":[64]}],[1,"dso-info",{"fixed":[516],"active":[516]}]]]], options);
17
17
  });
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h, H as Host, g as getElement } from './index-ac5a22a3.js';
2
- import { d as detectOverflow, b as beforeWrite, c as createPopper } from './popper-467f7841.js';
2
+ import { d as detectOverflow, b as beforeWrite, h as hasOverflow, c as createPopper } from './has-overflow-c44a8a0a.js';
3
3
  import { c as clsx } from './clsx.m-25174a58.js';
4
4
 
5
5
  var maxSize = {
@@ -40,13 +40,6 @@ const tooltipCss = ":host(.hidden){visibility:hidden}:host-context(dso-toggletip
40
40
 
41
41
  // Keep const in sync with $tooltip-transition-duration in dso-toolkit/src/components/tooltip/tooltip.scss tooltip_root() mixin
42
42
  const transitionDuration = 150;
43
- function hasOverflow(el) {
44
- const style = window.getComputedStyle(el);
45
- const overflowX = style.getPropertyValue("overflow-x");
46
- const overflowY = style.getPropertyValue("overflow-y");
47
- const overflowValues = ["hidden", "clip"];
48
- return overflowValues.indexOf(overflowX) !== -1 || overflowValues.indexOf(overflowY) !== -1;
49
- }
50
43
  const Tooltip = class {
51
44
  constructor(hostRef) {
52
45
  registerInstance(this, hostRef);
@@ -1796,4 +1796,12 @@ var createPopper = /*#__PURE__*/popperGenerator({
1796
1796
  defaultModifiers: defaultModifiers
1797
1797
  }); // eslint-disable-next-line import/no-unused-modules
1798
1798
 
1799
- export { beforeWrite as b, createPopper as c, detectOverflow as d };
1799
+ function hasOverflow(el) {
1800
+ const style = window.getComputedStyle(el);
1801
+ const overflowX = style.getPropertyValue("overflow-x");
1802
+ const overflowY = style.getPropertyValue("overflow-y");
1803
+ const overflowValues = ["hidden", "clip"];
1804
+ return overflowValues.indexOf(overflowX) !== -1 || overflowValues.indexOf(overflowY) !== -1;
1805
+ }
1806
+
1807
+ export { beforeWrite as b, createPopper as c, detectOverflow as d, hasOverflow as h };
@@ -10,7 +10,7 @@ const patchEsm = () => {
10
10
  const defineCustomElements = (win, options) => {
11
11
  if (typeof window === 'undefined') return Promise.resolve();
12
12
  return patchEsm().then(() => {
13
- return bootstrapLazy([["dso-icon",[[1,"dso-icon",{"icon":[1]}]]],["dso-map-base-layers",[[1,"dso-map-base-layers",{"group":[1],"baseLayers":[16]}]]],["dso-map-overlays",[[1,"dso-map-overlays",{"group":[1],"overlays":[16]}]]],["dso-annotation-output",[[4,"dso-annotation-output",{"identifier":[1],"annotationPrefix":[1,"annotation-prefix"],"toggleAnnotation":[64]}]]],["dso-toggletip",[[1,"dso-toggletip",{"label":[1],"position":[1],"small":[4],"secondary":[4],"active":[32]}]]],["dso-expandable-heading",[[1,"dso-expandable-heading",{"open":[4],"heading":[1],"color":[1]}]]],["dso-header",[[6,"dso-header",{"mainMenu":[16],"useDropDownMenu":[1,"use-drop-down-menu"],"authStatus":[1,"auth-status"],"loginUrl":[1,"login-url"],"logoutUrl":[1,"logout-url"],"userProfileName":[1,"user-profile-name"],"userProfileUrl":[1,"user-profile-url"],"userHomeUrl":[1,"user-home-url"],"showDropDown":[32],"hasSubLogo":[32],"overflowMenuItems":[32]}]]],["dso-label",[[1,"dso-label",{"compact":[4],"removable":[4],"status":[1],"truncate":[4],"removeHover":[32],"removeFocus":[32],"textHover":[32],"textFocus":[32],"truncatedContent":[32],"labelText":[32]}]]],["dso-pagination",[[1,"dso-pagination",{"totalPages":[2,"total-pages"],"currentPage":[2,"current-page"],"formatHref":[16],"availablePositions":[32]},[[0,"dsoSizeChange","sizeChangeHandler"]]]]],["dso-tree-view",[[1,"dso-tree-view",{"collection":[16],"focusItem":[64]}]]],["dso-accordion-section",[[1,"dso-accordion-section",{"handleTitle":[1,"handle-title"],"heading":[1],"handleUrl":[1,"handle-url"],"state":[1],"attachmentCount":[2,"attachment-count"],"icon":[1],"status":[1],"open":[1540],"hasNestedSection":[32],"toggleSection":[64],"scrollSectionIntoView":[64]}]]],["dso-alert",[[1,"dso-alert",{"status":[1],"roleAlert":[4,"role-alert"]}]]],["dso-annotation-button",[[0,"dso-annotation-button",{"identifier":[1]}]]],["dso-attachments-counter",[[1,"dso-attachments-counter",{"count":[2]}]]],["dso-autosuggest",[[6,"dso-autosuggest",{"suggestions":[16],"loading":[4],"loadingLabel":[1,"loading-label"],"loadingDelayed":[2,"loading-delayed"],"notFoundLabel":[1,"not-found-label"],"suggestOnFocus":[4,"suggest-on-focus"],"showSuggestions":[32],"selectedSuggestion":[32],"notFound":[32],"showLoading":[32]},[[4,"click","onDocumentClick"]]]]],["dso-date-picker",[[2,"dso-date-picker",{"name":[1],"identifier":[1],"disabled":[516],"role":[1],"direction":[1],"required":[4],"dsoAutofocus":[4,"dso-autofocus"],"value":[1537],"min":[1],"max":[1],"activeFocus":[32],"focusedDay":[32],"open":[32],"visible":[32],"setFocus":[64],"show":[64],"hide":[64]},[[6,"click","handleDocumentClick"]]]]],["dso-helpcenter-panel",[[1,"dso-helpcenter-panel",{"label":[1],"url":[1],"visibility":[32],"isOpen":[32],"slideState":[32],"loadIframe":[32]},[[8,"keydown","keyDownListener"]]]]],["dso-image-overlay",[[1,"dso-image-overlay",{"active":[32],"zoomable":[32]},[[2,"load","loadListener"]]]]],["dso-list-button",[[1,"dso-list-button",{"label":[1],"sublabel":[1],"subcontent":[1],"count":[2],"min":[8],"max":[8],"checked":[516],"disabled":[516],"manualInputWrapperElement":[32],"manualCount":[32]}]]],["dso-map-controls",[[1,"dso-map-controls",{"open":[1540],"disableZoom":[1,"disable-zoom"],"hideContent":[32],"toggleVisibility":[64]}]]],["dso-modal",[[1,"dso-modal",{"modalTitle":[1,"modal-title"],"role":[1],"showCloseButton":[4,"show-close-button"],"initialFocus":[1,"initial-focus"],"ariaId":[32],"hasFooter":[32]}]]],["dso-table",[[1,"dso-table",{"noModal":[516,"no-modal"],"isResponsive":[516,"is-responsive"],"modalActive":[32],"placeholderHeight":[32]}]]],["dso-viewer-grid",[[1,"dso-viewer-grid",{"filterpanelOpen":[516,"filterpanel-open"],"overlayOpen":[516,"overlay-open"],"initialMainSize":[1,"initial-main-size"],"mainSize":[32]}]]],["dso-accordion",[[1,"dso-accordion",{"variant":[513],"reverseAlign":[516,"reverse-align"],"allowMultipleOpen":[516,"allow-multiple-open"],"getState":[64],"toggleSection":[64],"animationEnd":[64],"closeOpenSections":[64]}]]],["dso-badge",[[1,"dso-badge",{"status":[1]}]]],["dso-banner",[[1,"dso-banner",{"status":[513]}]]],["dso-card",[[1,"dso-card",{"isSelectable":[516,"is-selectable"],"hasImage":[516,"has-image"],"clickable":[4]}]]],["dso-card-container",[[1,"dso-card-container",{"mode":[513]}]]],["dso-highlight-box",[[1,"dso-highlight-box",{"yellow":[4],"border":[4],"white":[4],"dropShadow":[4,"drop-shadow"],"step":[2]}]]],["dso-ozon-content",[[6,"dso-ozon-content",{"content":[1],"inline":[516],"deleted":[516],"interactive":[520],"state":[32]}]]],["dso-progress-bar",[[1,"dso-progress-bar",{"progress":[2],"min":[2],"max":[2]}]]],["dso-slide-toggle",[[4,"dso-slide-toggle",{"checked":[4],"disabled":[4],"accessibleLabel":[1,"accessible-label"],"labelledbyId":[1,"labelledby-id"],"identifier":[1],"hasVisibleLabel":[32]}]]],["dso-dropdown-menu",[[1,"dso-dropdown-menu",{"open":[1540],"dropdownAlign":[1,"dropdown-align"],"checkable":[4],"boundary":[1]}]]],["dso-expandable",[[1,"dso-expandable",{"open":[516]}]]],["dso-progress-indicator",[[1,"dso-progress-indicator",{"label":[1],"size":[513],"block":[4]}]]],["dso-responsive-element",[[1,"dso-responsive-element",{"sizeAlias":[32],"sizeWidth":[32],"getSize":[64]}]]],["dso-tooltip",[[1,"dso-tooltip",{"descriptive":[516],"position":[1],"strategy":[1],"noArrow":[4,"no-arrow"],"stateless":[4],"small":[4],"active":[1540],"hidden":[32],"activate":[64],"deactivate":[64]},[[0,"click","listenClick"]]]]],["dso-info-button",[[1,"dso-info-button",{"active":[1540],"secondary":[4],"label":[1],"hover":[32],"setFocus":[64]}]]],["dso-info_2",[[6,"dso-selectable",{"type":[1],"identifier":[1],"name":[1],"value":[1],"invalid":[4],"describedById":[1,"described-by-id"],"labelledById":[1,"labelled-by-id"],"disabled":[4],"required":[4],"checked":[4],"indeterminate":[4],"infoFixed":[4,"info-fixed"],"infoActive":[32],"toggleInfo":[64]}],[1,"dso-info",{"fixed":[516],"active":[516]}]]]], options);
13
+ return bootstrapLazy([["dso-icon",[[1,"dso-icon",{"icon":[1]}]]],["dso-map-base-layers",[[1,"dso-map-base-layers",{"group":[1],"baseLayers":[16]}]]],["dso-map-overlays",[[1,"dso-map-overlays",{"group":[1],"overlays":[16]}]]],["dso-annotation-output",[[4,"dso-annotation-output",{"identifier":[1],"annotationPrefix":[1,"annotation-prefix"],"toggleAnnotation":[64]}]]],["dso-toggletip",[[1,"dso-toggletip",{"label":[1],"position":[1],"small":[4],"secondary":[4],"active":[32]}]]],["dso-expandable-heading",[[1,"dso-expandable-heading",{"open":[4],"heading":[1],"color":[1]}]]],["dso-header",[[6,"dso-header",{"mainMenu":[16],"useDropDownMenu":[1,"use-drop-down-menu"],"authStatus":[1,"auth-status"],"loginUrl":[1,"login-url"],"logoutUrl":[1,"logout-url"],"userProfileName":[1,"user-profile-name"],"userProfileUrl":[1,"user-profile-url"],"userHomeUrl":[1,"user-home-url"],"showDropDown":[32],"hasSubLogo":[32],"overflowMenuItems":[32]}]]],["dso-label",[[1,"dso-label",{"compact":[4],"removable":[4],"status":[1],"truncate":[4],"removeHover":[32],"removeFocus":[32],"textHover":[32],"textFocus":[32],"truncatedContent":[32],"labelText":[32]}]]],["dso-pagination",[[1,"dso-pagination",{"totalPages":[2,"total-pages"],"currentPage":[2,"current-page"],"formatHref":[16],"availablePositions":[32]},[[0,"dsoSizeChange","sizeChangeHandler"]]]]],["dso-tree-view",[[1,"dso-tree-view",{"collection":[16],"focusItem":[64]}]]],["dso-accordion-section",[[1,"dso-accordion-section",{"handleTitle":[1,"handle-title"],"heading":[1],"handleUrl":[1,"handle-url"],"state":[1],"attachmentCount":[2,"attachment-count"],"icon":[1],"status":[1],"open":[1540],"hasNestedSection":[32],"toggleSection":[64],"scrollSectionIntoView":[64]}]]],["dso-alert",[[1,"dso-alert",{"status":[1],"roleAlert":[4,"role-alert"]}]]],["dso-annotation-button",[[0,"dso-annotation-button",{"identifier":[1]}]]],["dso-attachments-counter",[[1,"dso-attachments-counter",{"count":[2]}]]],["dso-autosuggest",[[6,"dso-autosuggest",{"suggestions":[16],"loading":[4],"loadingLabel":[1,"loading-label"],"loadingDelayed":[2,"loading-delayed"],"notFoundLabel":[1,"not-found-label"],"suggestOnFocus":[4,"suggest-on-focus"],"showSuggestions":[32],"selectedSuggestion":[32],"notFound":[32],"showLoading":[32]},[[4,"click","onDocumentClick"]]]]],["dso-date-picker",[[2,"dso-date-picker",{"name":[1],"identifier":[1],"disabled":[516],"role":[1],"direction":[1],"required":[4],"dsoAutofocus":[4,"dso-autofocus"],"value":[1537],"min":[1],"max":[1],"activeFocus":[32],"focusedDay":[32],"open":[32],"visible":[32],"setFocus":[64],"show":[64],"hide":[64]},[[6,"click","handleDocumentClick"]]]]],["dso-helpcenter-panel",[[1,"dso-helpcenter-panel",{"label":[1],"url":[1],"visibility":[32],"isOpen":[32],"slideState":[32],"loadIframe":[32]},[[8,"keydown","keyDownListener"]]]]],["dso-image-overlay",[[1,"dso-image-overlay",{"active":[32],"zoomable":[32]},[[2,"load","loadListener"]]]]],["dso-list-button",[[1,"dso-list-button",{"label":[1],"sublabel":[1],"subcontent":[1],"count":[2],"min":[8],"max":[8],"checked":[516],"disabled":[516],"manualInputWrapperElement":[32],"manualCount":[32]}]]],["dso-map-controls",[[1,"dso-map-controls",{"open":[1540],"disableZoom":[1,"disable-zoom"],"hideContent":[32],"toggleVisibility":[64]}]]],["dso-modal",[[1,"dso-modal",{"modalTitle":[1,"modal-title"],"role":[1],"showCloseButton":[4,"show-close-button"],"initialFocus":[1,"initial-focus"],"ariaId":[32],"hasFooter":[32]}]]],["dso-table",[[1,"dso-table",{"noModal":[516,"no-modal"],"isResponsive":[516,"is-responsive"],"modalActive":[32],"placeholderHeight":[32]}]]],["dso-viewer-grid",[[1,"dso-viewer-grid",{"filterpanelOpen":[516,"filterpanel-open"],"overlayOpen":[516,"overlay-open"],"initialMainSize":[1,"initial-main-size"],"mainSize":[32]}]]],["dso-accordion",[[1,"dso-accordion",{"variant":[513],"reverseAlign":[516,"reverse-align"],"allowMultipleOpen":[516,"allow-multiple-open"],"getState":[64],"toggleSection":[64],"animationEnd":[64],"closeOpenSections":[64]}]]],["dso-badge",[[1,"dso-badge",{"status":[1]}]]],["dso-banner",[[1,"dso-banner",{"status":[513]}]]],["dso-card",[[1,"dso-card",{"isSelectable":[516,"is-selectable"],"hasImage":[516,"has-image"],"clickable":[4]}]]],["dso-card-container",[[1,"dso-card-container",{"mode":[513]}]]],["dso-highlight-box",[[1,"dso-highlight-box",{"yellow":[4],"border":[4],"white":[4],"dropShadow":[4,"drop-shadow"],"step":[2]}]]],["dso-ozon-content",[[6,"dso-ozon-content",{"content":[1],"inline":[516],"deleted":[516],"interactive":[520],"state":[32]}]]],["dso-progress-bar",[[1,"dso-progress-bar",{"progress":[2],"min":[2],"max":[2]}]]],["dso-slide-toggle",[[4,"dso-slide-toggle",{"checked":[4],"disabled":[4],"accessibleLabel":[1,"accessible-label"],"labelledbyId":[1,"labelledby-id"],"identifier":[1],"hasVisibleLabel":[32]}]]],["dso-dropdown-menu",[[1,"dso-dropdown-menu",{"open":[1540],"dropdownAlign":[1,"dropdown-align"],"checkable":[4],"boundary":[1],"strategy":[1]}]]],["dso-expandable",[[1,"dso-expandable",{"open":[516]}]]],["dso-progress-indicator",[[1,"dso-progress-indicator",{"label":[1],"size":[513],"block":[4]}]]],["dso-responsive-element",[[1,"dso-responsive-element",{"sizeAlias":[32],"sizeWidth":[32],"getSize":[64]}]]],["dso-tooltip",[[1,"dso-tooltip",{"descriptive":[516],"position":[1],"strategy":[1],"noArrow":[4,"no-arrow"],"stateless":[4],"small":[4],"active":[1540],"hidden":[32],"activate":[64],"deactivate":[64]},[[0,"click","listenClick"]]]]],["dso-info-button",[[1,"dso-info-button",{"active":[1540],"secondary":[4],"label":[1],"hover":[32],"setFocus":[64]}]]],["dso-info_2",[[6,"dso-selectable",{"type":[1],"identifier":[1],"name":[1],"value":[1],"invalid":[4],"describedById":[1,"described-by-id"],"labelledById":[1,"labelled-by-id"],"disabled":[4],"required":[4],"checked":[4],"indeterminate":[4],"infoFixed":[4,"info-fixed"],"infoActive":[32],"toggleInfo":[64]}],[1,"dso-info",{"fixed":[516],"active":[516]}]]]], options);
14
14
  });
15
15
  };
16
16
 
@@ -15,7 +15,13 @@ export declare class DropdownMenu {
15
15
  checkable: boolean;
16
16
  /** Selector for the element the dropdown options should not be overflowing.*/
17
17
  boundary?: string;
18
+ /**
19
+ * Set position strategy of dropdown options
20
+ */
21
+ strategy: "auto" | "absolute" | "fixed";
18
22
  watchPosition(): void;
23
+ watchStrategy(): void;
24
+ setStrategy(): void;
19
25
  host: HTMLElement;
20
26
  private popper;
21
27
  get button(): HTMLButtonElement;
@@ -216,6 +216,10 @@ export namespace Components {
216
216
  * Whether the menu is open or closed. This attribute is reflected and mutable.
217
217
  */
218
218
  "open": boolean;
219
+ /**
220
+ * Set position strategy of dropdown options
221
+ */
222
+ "strategy": "auto" | "absolute" | "fixed";
219
223
  }
220
224
  interface DsoExpandable {
221
225
  "open"?: boolean;
@@ -1035,6 +1039,10 @@ declare namespace LocalJSX {
1035
1039
  * Whether the menu is open or closed. This attribute is reflected and mutable.
1036
1040
  */
1037
1041
  "open"?: boolean;
1042
+ /**
1043
+ * Set position strategy of dropdown options
1044
+ */
1045
+ "strategy"?: "auto" | "absolute" | "fixed";
1038
1046
  }
1039
1047
  interface DsoExpandable {
1040
1048
  "open"?: boolean;
@@ -0,0 +1 @@
1
+ export declare function hasOverflow(el: Element): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dso-toolkit/core",
3
- "version": "51.4.0",
3
+ "version": "51.4.1",
4
4
  "description": "DSO Toolkit Web Components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/components/index.js",
@@ -24,7 +24,7 @@
24
24
  "@stencil/store": "^2.0.1",
25
25
  "animejs": "3.2.1",
26
26
  "clsx": "1.2.1",
27
- "dso-toolkit": "51.4.0",
27
+ "dso-toolkit": "51.4.1",
28
28
  "escape-string-regexp": "^5.0.0",
29
29
  "focus-trap": "^7.1.0",
30
30
  "popper-max-size-modifier": "^0.2.0",
@@ -1 +0,0 @@
1
- import{r as t,h as o,H as i,g as e}from"./p-98fd1658.js";import{d as r,b as a,c as p}from"./p-1cea3b99.js";import{c as s}from"./p-6a1980b4.js";var n={name:"maxSize",enabled:!0,phase:"main",requiresIfExists:["offset","preventOverflow","flip"],fn:function(t){var o=t.state,i=t.name,e=r(o,t.options),a=o.modifiersData.preventOverflow||{x:0,y:0},p=a.x,s=a.y,n=o.rects.popper,l=n.width,h=n.height,d=o.placement.split("-")[0];o.modifiersData[i]={width:l-e["left"===d?"left":"right"]-p,height:h-e["top"===d?"top":"bottom"]-s}}};function l(t){const o=window.getComputedStyle(t),i=o.getPropertyValue("overflow-x"),e=o.getPropertyValue("overflow-y"),r=["hidden","clip"];return-1!==r.indexOf(i)||-1!==r.indexOf(e)}const h=class{constructor(o){t(this,o),this.applyMaxSize={name:"applyMaxSize",enabled:!0,phase:a,requires:["maxSize"],fn({state:t}){let{width:o}=t.modifiersData.maxSize;o<160&&(o=160),t.styles.popper=Object.assign(Object.assign({},t.styles.popper),{maxWidth:`${o}px`})}},this.keyDownListener=t=>{"Escape"===t.key&&this.deactivate()},this.descriptive=!1,this.position="top",this.strategy="auto",this.noArrow=!1,this.stateless=void 0,this.small=void 0,this.active=!1,this.hidden=!0}async activate(){this.active=!0}async deactivate(){this.active=!1}watchPosition(){this.popper&&this.popper.setOptions({placement:this.position})}watchStrategy(){this.setStrategy()}setStrategy(){if(!this.popper)return;if("absolute"===this.strategy||"fixed"===this.strategy)return void this.popper.setOptions({strategy:this.strategy});let t=this.element;for(;t&&t.parentNode!==document;)if(t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentElement,null!==t&&l(t))return void this.popper.setOptions({strategy:"fixed"});this.popper.setOptions({strategy:"absolute"})}watchActive(){var t;this.active?(this.hidden=!1,this.stateless||setTimeout((()=>{var t;null===(t=this.popper)||void 0===t||t.setOptions({modifiers:[{name:"eventListeners",enabled:!0}]}),document.addEventListener("keydown",this.keyDownListener)}))):(this.stateless||(null===(t=this.popper)||void 0===t||t.setOptions({modifiers:[{name:"eventListeners",enabled:!1}]}),document.removeEventListener("keydown",this.keyDownListener)),setTimeout((()=>this.hidden=!0),150))}listenClick(t){t.stopPropagation()}componentDidLoad(){var t;if(this.popper)return;const o=null===(t=this.element.shadowRoot)||void 0===t?void 0:t.querySelector(".tooltip");if(!(o instanceof HTMLElement))throw new Error("tooltip element is not instanceof HTMLElement");if(!this.element.id)throw new Error("Unable to find reference tooltip has no [id] attribute.");this.target=this.getTarget(this.element.id),this.popper=p(this.target,o,{placement:this.position,modifiers:[n,this.applyMaxSize]}),this.callbacks={activate:()=>this.active=!0,deactivate:()=>this.active=!1},this.stateless||(this.target.addEventListener("mouseenter",this.callbacks.activate),this.target.addEventListener("mouseleave",this.callbacks.deactivate),this.target.addEventListener("focus",this.callbacks.activate),this.target.addEventListener("blur",this.callbacks.deactivate))}disconnectedCallback(){var t;null===(t=this.popper)||void 0===t||t.destroy(),!this.stateless&&this.target&&this.callbacks&&(this.target.removeEventListener("mouseenter",this.callbacks.activate),this.target.removeEventListener("mouseleave",this.callbacks.deactivate),this.target.removeEventListener("focus",this.callbacks.activate),this.target.removeEventListener("blur",this.callbacks.deactivate)),this.callbacks=void 0,this.target=void 0}componentDidRender(){var t;this.setStrategy(),this.active&&(null===(t=this.popper)||void 0===t||t.update())}render(){return o(i,{class:{hidden:this.hidden},role:"tooltip"},o("div",{class:s("tooltip",{in:this.active})},!this.noArrow&&o("div",{"data-popper-arrow":!0,class:"tooltip-arrow"}),o("div",{"aria-hidden":!this.descriptive||void 0,class:s("tooltip-inner",{"dso-small":this.small})},o("slot",null))))}getTarget(t){const o=this.element.getRootNode();if(!(o instanceof Document||o instanceof ShadowRoot))throw new Error("rootNode is not instance of Document or ShadowRoot");const i=o.querySelector(`[aria-describedBy="${t}`);if(!i)throw new Error(`Unable to find reference with aria-describedby ${t}`);return i}get element(){return e(this)}static get watchers(){return{position:["watchPosition"],strategy:["watchStrategy"],active:["watchActive"]}}};h.style=":host(.hidden){visibility:hidden}:host-context(dso-toggletip){color:red !important}:host-context(dso-toggletip) *[data-popper-placement=top] .tooltip-arrow{margin-left:3px}:host-context(dso-toggletip) *[data-popper-placement=right] .tooltip-arrow{margin-top:0}:host-context(dso-toggletip) *[data-popper-placement=bottom] .tooltip-arrow{margin-left:3px}:host-context(dso-toggletip) *[data-popper-placement=left]{margin-right:-8px !important}:host-context(dso-toggletip) *[data-popper-placement=left] .tooltip-arrow{margin-top:0}*,*::after,*::before{box-sizing:border-box}.tooltip{font-family:Asap, sans-serif;font-style:normal;font-weight:400;line-height:1.5;line-break:auto;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;display:block;filter:drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));font-size:14px;opacity:0;position:absolute;transition:opacity 0.15s linear;z-index:410}.tooltip.in{opacity:1}.tooltip .tooltip-inner{background-color:#fff;border-radius:4px;color:#191919;display:inline-block;font-size:1rem;max-width:640px;padding:8px 16px;position:relative}.tooltip .tooltip-inner.dso-small{max-width:320px}.tooltip .tooltip-arrow{border-color:transparent;border-style:solid;height:0;width:0}.tooltip[data-popper-placement=top]{margin-top:-3px;padding:6px 0}.tooltip[data-popper-placement=top] .tooltip-arrow{border-top-color:#fff;border-width:6px 6px 0;bottom:0}.tooltip[data-popper-placement=top] .tooltip-arrow{margin-left:-3px}.tooltip[data-popper-placement=right]{margin-left:3px;padding:0 6px}.tooltip[data-popper-placement=right] .tooltip-arrow{border-right-color:#fff;border-width:6px 6px 6px 0;left:0}.tooltip[data-popper-placement=right] .tooltip-arrow{margin-top:-3px}.tooltip[data-popper-placement=bottom]{margin-top:3px;padding:6px 0}.tooltip[data-popper-placement=bottom] .tooltip-arrow{border-bottom-color:#fff;border-width:0 6px 6px;top:0}.tooltip[data-popper-placement=bottom] .tooltip-arrow{margin-left:-3px}.tooltip[data-popper-placement=left]{margin-left:-3px;padding:0 6px}.tooltip[data-popper-placement=left] .tooltip-arrow{border-left-color:#fff;border-width:6px 0 6px 6px;right:0}.tooltip[data-popper-placement=left] .tooltip-arrow{margin-top:-3px}";export{h as dso_tooltip}
@@ -1 +0,0 @@
1
- import{r as t,h as o,H as s,g as i}from"./p-98fd1658.js";import{t as e}from"./p-3635427a.js";import{v as n}from"./p-5d7f4ff2.js";import{c as r}from"./p-1cea3b99.js";const h=class{constructor(o){t(this,o),this.focusOutListener=t=>{this.tabbables.includes(t.relatedTarget)||(this.open=!1)},this.keyDownListener=t=>{if(!t.defaultPrevented){switch(t.key){case"ArrowDown":this.tabInPopup(1);break;case"ArrowUp":this.tabInPopup(-1);break;case"Escape":this.escape();break;case" ":t.target instanceof HTMLElement&&t.target.click();break;default:return}t.preventDefault()}},this.escape=()=>{this.button.focus(),this.open=!1},this.open=!1,this.dropdownAlign="left",this.checkable=!1,this.boundary=void 0}watchPosition(){this.popper&&this.popper.setOptions({placement:"right"===this.dropdownAlign?"bottom-end":"bottom-start"})}get button(){const t=this.host.querySelector('button[slot="toggle"]');if(!(t instanceof HTMLButtonElement))throw new ReferenceError("Mandatory toggle button not found");return t}get tabbables(){return e(this.host).filter((t=>t!==this.button))}componentDidLoad(){this.button.setAttribute("aria-haspopup","menu"),this.button.setAttribute("aria-expanded","false"),this.button.id||(this.button.id=n()),this.button.addEventListener("click",(()=>{this.open=!this.open}));const t=this.host.querySelector(".dso-dropdown-options");if(!t)throw new ReferenceError("Dropdown options not found");t.setAttribute("role","menu"),t.setAttribute("aria-labelledby",this.button.id);for(const t of Array.from(this.host.getElementsByTagName("ul"))){t.setAttribute("role","group");for(const o of Array.from(t.getElementsByTagName("li")))o.setAttribute("role","none")}if(this.popper)return;const o=this.host.querySelector(".dso-dropdown-options");if(!(o instanceof HTMLElement))throw new Error("dropdown options element is not instanceof HTMLElement");this.popper=r(this.button,o,{placement:"right"===this.dropdownAlign?"bottom-end":"bottom-start",modifiers:[{name:"offset",options:{offset:[0,2]}},{name:"preventOverflow",options:{boundary:this.boundary?document.querySelector(this.boundary):null},enabled:void 0!==this.boundary}]})}componentDidRender(){var t;null===(t=this.popper)||void 0===t||t.update();for(const t of Array.from(this.host.getElementsByTagName("li")))for(const o of e(t))o.setAttribute("role",this.checkable?"menuitemradio":"menuitem"),this.checkable&&o.setAttribute("aria-checked",t.classList.contains("dso-checked").toString());this.host.removeEventListener("keydown",this.keyDownListener),this.button.setAttribute("aria-expanded",this.open?"true":"false"),this.open&&this.host.addEventListener("keydown",this.keyDownListener),this.tabbables.forEach((t=>{t.removeEventListener("click",this.escape),this.open&&t.addEventListener("click",this.escape)}))}disconnectedCallback(){var t;null===(t=this.popper)||void 0===t||t.destroy()}getActiveElement(t=document){const o=t.activeElement;return o?o.shadowRoot?this.getActiveElement(o.shadowRoot):o:null}tabInPopup(t){const o=this.tabbables;let s=o.findIndex((t=>t===this.getActiveElement()))+t;s>=o.length?s=0:s<0&&(s=o.length-1),o[s].focus()}render(){return o(s,{onFocusout:this.focusOutListener,tabindex:this.open?"-1":void 0},o("slot",{name:"toggle"}),o("div",{hidden:!this.open},o("slot",null)))}get host(){return i(this)}static get watchers(){return{dropdownAlign:["watchPosition"]}}};h.style=":host(:focus){outline:none}:host{display:inline-block}";export{h as dso_dropdown_menu}