@odx/foundation 1.0.0-beta.89 → 1.0.0-beta.90
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.
|
@@ -2,7 +2,7 @@ import { PopoverHost } from './popover-host.js';
|
|
|
2
2
|
export declare class PopoverObserver {
|
|
3
3
|
#private;
|
|
4
4
|
readonly host: PopoverHost;
|
|
5
|
-
readonly root: Document;
|
|
5
|
+
readonly root: ShadowRoot | Document;
|
|
6
6
|
constructor(host: PopoverHost);
|
|
7
7
|
hasMountedPopover(element: HTMLElement): boolean;
|
|
8
8
|
observe(): void;
|
package/dist/components.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _ as __decorateClass } from './_virtual_class-decorator-runtime.js';
|
|
2
|
-
import { CustomElement, ExpandableItemManager, customElement, CanBeExpanded, InteractiveElement, getUniqueId, toAriaBooleanAttribute, Size, Variant, optionalAttr, InteractiveLink, getElementFromEvent, Shape, CanBeDisabled, optionalSlot, CheckboxFormControl, CheckboxGroupFormControl, SharedResizeObserver, Placement, waitForAnimations, PopoverPlacementOptions, computePopoverPlacement, getKeyInfo, FormControl, ActiveDescendantsController, getAssignedElement, parseDate, forwardEvent, OptionControl, toPx, RadioGroupFormControl, ListboxFormControl, IsDraggable, NumberFormControl, IS_DRAG_ACTIVE_ATTRIBUTE, DragController } from '@odx/foundation';
|
|
2
|
+
import { CustomElement, ExpandableItemManager, customElement, CanBeExpanded, InteractiveElement, getUniqueId, toAriaBooleanAttribute, Size, Variant, optionalAttr, InteractiveLink, getElementFromEvent, Shape, CanBeDisabled, optionalSlot, CheckboxFormControl, CheckboxGroupFormControl, SharedResizeObserver, findClosestDocument, Placement, waitForAnimations, PopoverPlacementOptions, computePopoverPlacement, getKeyInfo, FormControl, ActiveDescendantsController, getAssignedElement, parseDate, forwardEvent, OptionControl, toPx, RadioGroupFormControl, ListboxFormControl, IsDraggable, NumberFormControl, IS_DRAG_ACTIVE_ATTRIBUTE, DragController } from '@odx/foundation';
|
|
3
3
|
import { queryAssignedElements, property, query, state, queryAll } from 'lit/decorators.js';
|
|
4
4
|
import { html, isServer, unsafeCSS, css, nothing } from 'lit';
|
|
5
5
|
import { when } from 'lit/directives/when.js';
|
|
@@ -942,7 +942,7 @@ class PopoverObserver {
|
|
|
942
942
|
#mutationObserver;
|
|
943
943
|
constructor(host) {
|
|
944
944
|
this.host = host;
|
|
945
|
-
this.root = host
|
|
945
|
+
this.root = findClosestDocument(host);
|
|
946
946
|
}
|
|
947
947
|
hasMountedPopover(element) {
|
|
948
948
|
return this.#referenceElements.has(element);
|
package/dist/lib/utils/dom.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare function parseDate(value: number | string | Date): Date | null;
|
|
2
|
-
export declare function findClosestDocument(node: Node): ShadowRoot | Document
|
|
2
|
+
export declare function findClosestDocument(node: Node): ShadowRoot | Document;
|
|
3
3
|
export declare function forwardEvent(target: HTMLElement, eventInit?: EventInit): EventListener;
|
|
4
4
|
export declare function getElementFromEvent<T = HTMLElement>(event: Event, filterFn: (node: Element) => boolean): T;
|
|
5
5
|
export declare function waitForAnimations(element?: Element | null, subtree?: boolean): Promise<Animation[]>;
|
package/dist/main.js
CHANGED
|
@@ -43,7 +43,7 @@ function findClosestDocument(node) {
|
|
|
43
43
|
while (parent && parent.nodeType !== Node.DOCUMENT_FRAGMENT_NODE && parent.nodeType !== Node.DOCUMENT_NODE) {
|
|
44
44
|
parent = parent.parentNode;
|
|
45
45
|
}
|
|
46
|
-
return parent;
|
|
46
|
+
return parent ?? document;
|
|
47
47
|
}
|
|
48
48
|
function forwardEvent(target, eventInit) {
|
|
49
49
|
return (event) => {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@odx/foundation",
|
|
3
3
|
"description": "A library of Web Component building blocks for ODX",
|
|
4
|
-
"version": "1.0.0-beta.
|
|
4
|
+
"version": "1.0.0-beta.90",
|
|
5
5
|
"author": "Drägerwerk AG & Co.KGaA",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
7
7
|
"homepage": "https://odx.draeger.com",
|