@ember-eui/core 12.0.7 → 12.0.8

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.
@@ -8,6 +8,10 @@ import type { EmberKeyboardEvent } from 'ember-keyboard/modifiers/on-key';
8
8
  type PanelPaddingSize = keyof typeof paddingSizeMapping;
9
9
  export type PopoverAnchorPosition = 'upCenter' | 'upLeft' | 'upRight' | 'downCenter' | 'downLeft' | 'downRight' | 'leftCenter' | 'leftUp' | 'leftDown' | 'rightCenter' | 'rightUp' | 'rightDown';
10
10
  export type EuiPopoverArgs = {
11
+ /**
12
+ * Callback to have a reference to the portal element
13
+ */
14
+ portalRef?: (ref: HTMLElement) => void;
11
15
  /**
12
16
  * Class name passed to the direct parent of the button
13
17
  */
@@ -1 +1 @@
1
- {"version":3,"file":"eui-popover.d.ts","sourceRoot":"","sources":["../../src/components/eui-popover.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAS3C,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAiBtC,OAAO,EAEL,cAAc,EACf,MAAM,sCAAsC,CAAC;AAa9C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAE1E,KAAK,gBAAgB,GAAG,MAAM,OAAO,kBAAkB,CAAC;AAExD,MAAM,MAAM,qBAAqB,GAC7B,UAAU,GACV,QAAQ,GACR,SAAS,GACT,YAAY,GACZ,UAAU,GACV,WAAW,GACX,YAAY,GACZ,QAAQ,GACR,UAAU,GACV,aAAa,GACb,SAAS,GACT,WAAW,CAAC;AAEhB,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,eAAe,CAAC,E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AI;IAWnB,UAAU,CAAC,OAAO,EAAE,cAAc,EAAE,GAAG,IAAI;IAS3C,eAAe,CAAC,oBAAoB,EAAE,OAAO,GAAG,IAAI;IAuFpD,IAAI,YAAY,IAAI,UAAU,CAAC,OAAO,QAAQ,CAAC,GAAG,SAAS,CAM1D;IAED,IAAI,cAAc,IAAI;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAU5C;IAED,IAAI,QAAQ,oBAMX;IAGD,oBAAoB,IAAI,IAAI;IAK5B,oBAAoB,IAAI,IAAI;IAK5B,cAAc,CAAC,GAAG,EAAE,cAAc,GAAG,IAAI;IAMzC,aAAa,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI;CA2HxC"}
@@ -6,6 +6,7 @@ export interface EuiWrappingPopoverSignature {
6
6
  button?: HTMLElement;
7
7
  onWrappingDestroy?: () => void;
8
8
  portalRef?: (ref: HTMLElement) => void;
9
+ popoverPortalRef?: (ref: HTMLElement) => void;
9
10
  };
10
11
  Blocks: {
11
12
  default: [];
@@ -1 +1 @@
1
- {"version":3,"file":"eui-wrapping-popover.d.ts","sourceRoot":"","sources":["../../src/components/eui-wrapping-popover.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAQ3C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAE7D,MAAM,WAAW,2BAA2B;IAC1C,OAAO,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC;IACxC,IAAI,EAAE,mBAAmB,CAAC,MAAM,CAAC,GAAG;QAClC,MAAM,CAAC,EAAE,WAAW,CAAC;QACrB,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;QAC/B,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,WAAW,KAAK,IAAI,CAAC;KACxC,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;CACH;AAED,MAAM,CAAC,OAAO,OAAO,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CZ"}
@@ -531,7 +531,7 @@ class EuiPopoverComponent extends Component {
531
531
  n(this.prototype, "registerPanel", [action]);
532
532
  }
533
533
  static {
534
- setComponentTemplate(precompileTemplate("\n {{#let (randomId) (classNames (if this.isOpening \"euiPopover-isOpen\") position=this.anchorPosition display=this.display componentName=\"EuiPopover\") (classNames \"euiPopover__panel\" (concat \"euiPopover__panel--\" this.arrowPosition) (if this.isOpening \"euiPopover__panel-isOpen\") (if (or (not this.hasArrow) @attachToAnchor) \"euiPopover__panel-noArrow\") (if @attachToAnchor \"euiPopover__panel-isAttached\") @panelClassName) as |descriptionId classes panelClasses|}}\n <div class={{classes}} {{onKey \"_all\" this.onKeyDown priority=1}} {{didInsert this.didInsertPopover}} {{didUpdate this.didUpdateIsOpen @isOpen}} {{didUpdate this.didUpdateRepositionOnScroll @repositionOnScroll}} {{didInsert (optional @popoverRef)}} ...attributes>\n\n {{!-- button --}}\n <div class=\"euiPopover__anchor {{@anchorClassName}}\" {{didInsert this.registerButton}}>\n {{yield to=\"button\"}}\n </div>\n\n {{!-- content --}}\n {{#if (and (not this.suppressingPopover) (or this.isCurrentlyOpen this.isClosing))}}\n <EuiPortal @insert={{this.insert}}>\n {{#let (randomId) as |panelId|}}\n <EuiPanel id={{panelId}} class={{panelClasses}} aria-live={{if this.ownFocus \"off\" \"assertive\"}} role=\"dialog\" aria-label={{@ariaLabel}} aria-labelledby={{@ariaLabelledBy}} aria-modal=\"true\" aria-describedby={{if this.ownFocus descriptionId}} tabindex={{this.tabindex}} @hasShadow={{false}} @paddingSize={{this.panelPaddingSize}} {{simpleStyle this._popoverStyles}} {{didInsert this.registerPanel}} {{outsideClickDetector onOutsideClick=this.onClickOutside}} {{onKey \"Escape\" this.onEscapeKey}} {{focusTrap isActive=(not (or (not this.ownFocus) (not this.isOpenStable) this.isClosing)) shouldSelfFocus=this.shouldSelfFocus isPaused=this.isFocusTrapPaused focusTrapOptions=(merge (hash returnFocusOnDeactivate=this.isOpenStable initialFocus=(or @initialFocus this.panel) onDeactivate=(optional @onTrapDeactivation) preventScroll=true clickOutsideDeactivates=true fallbackFocus=(concat \"#\" panelId)) @focusTrapOptions)}}>\n <div class={{concat \"euiPopover__panelArrow euiPopover__panelArrow--\" this.arrowPosition}} style={{this._arrowStyles}}>\n {{yield to=\"arrowChildren\"}}\n </div>\n {{#if this.ownFocus}}\n <p id={{descriptionId}} {{screenReaderOnly}}>\n You are in a dialog. To close this dialog, hit escape.\n </p>\n {{/if}}\n <div {{mutationObserver onMutation=this.onMutation observerOptions=(merge (hash attributes=true childList=true characterData=true subtree=true) @mutationObserverOptions)}}>\n {{yield to=\"content\"}}\n </div>\n </EuiPanel>\n {{/let}}\n </EuiPortal>\n {{/if}}\n\n </div>\n {{/let}}\n ", {
534
+ setComponentTemplate(precompileTemplate("\n {{#let (randomId) (classNames (if this.isOpening \"euiPopover-isOpen\") position=this.anchorPosition display=this.display componentName=\"EuiPopover\") (classNames \"euiPopover__panel\" (concat \"euiPopover__panel--\" this.arrowPosition) (if this.isOpening \"euiPopover__panel-isOpen\") (if (or (not this.hasArrow) @attachToAnchor) \"euiPopover__panel-noArrow\") (if @attachToAnchor \"euiPopover__panel-isAttached\") @panelClassName) as |descriptionId classes panelClasses|}}\n <div class={{classes}} {{onKey \"_all\" this.onKeyDown priority=1}} {{didInsert this.didInsertPopover}} {{didUpdate this.didUpdateIsOpen @isOpen}} {{didUpdate this.didUpdateRepositionOnScroll @repositionOnScroll}} {{didInsert (optional @popoverRef)}} ...attributes>\n\n {{!-- button --}}\n <div class=\"euiPopover__anchor {{@anchorClassName}}\" {{didInsert this.registerButton}}>\n {{yield to=\"button\"}}\n </div>\n\n {{!-- content --}}\n {{#if (and (not this.suppressingPopover) (or this.isCurrentlyOpen this.isClosing))}}\n <EuiPortal @insert={{this.insert}} @portalRef={{@portalRef}}>\n {{#let (randomId) as |panelId|}}\n <EuiPanel id={{panelId}} class={{panelClasses}} aria-live={{if this.ownFocus \"off\" \"assertive\"}} role=\"dialog\" aria-label={{@ariaLabel}} aria-labelledby={{@ariaLabelledBy}} aria-modal=\"true\" aria-describedby={{if this.ownFocus descriptionId}} tabindex={{this.tabindex}} @hasShadow={{false}} @paddingSize={{this.panelPaddingSize}} {{simpleStyle this._popoverStyles}} {{didInsert this.registerPanel}} {{outsideClickDetector onOutsideClick=this.onClickOutside}} {{onKey \"Escape\" this.onEscapeKey}} {{focusTrap isActive=(not (or (not this.ownFocus) (not this.isOpenStable) this.isClosing)) shouldSelfFocus=this.shouldSelfFocus isPaused=this.isFocusTrapPaused focusTrapOptions=(merge (hash returnFocusOnDeactivate=this.isOpenStable initialFocus=(or @initialFocus this.panel) onDeactivate=(optional @onTrapDeactivation) preventScroll=true clickOutsideDeactivates=true fallbackFocus=(concat \"#\" panelId)) @focusTrapOptions)}}>\n <div class={{concat \"euiPopover__panelArrow euiPopover__panelArrow--\" this.arrowPosition}} style={{this._arrowStyles}}>\n {{yield to=\"arrowChildren\"}}\n </div>\n {{#if this.ownFocus}}\n <p id={{descriptionId}} {{screenReaderOnly}}>\n You are in a dialog. To close this dialog, hit escape.\n </p>\n {{/if}}\n <div {{mutationObserver onMutation=this.onMutation observerOptions=(merge (hash attributes=true childList=true characterData=true subtree=true) @mutationObserverOptions)}}>\n {{yield to=\"content\"}}\n </div>\n </EuiPanel>\n {{/let}}\n </EuiPortal>\n {{/if}}\n\n </div>\n {{/let}}\n ", {
535
535
  strictMode: true,
536
536
  scope: () => ({
537
537
  randomId,
@@ -1 +1 @@
1
- {"version":3,"file":"eui-popover.js","sources":["../../src/components/eui-popover.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { assert } from '@ember/debug';\nimport { hash } from '@ember/helper';\nimport { concat } from '@ember/helper';\nimport { action } from '@ember/object';\nimport didInsert from '@ember/render-modifiers/modifiers/did-insert';\nimport didUpdate from '@ember/render-modifiers/modifiers/did-update';\nimport { cancel, later, scheduleOnce } from '@ember/runloop';\nimport { htmlSafe } from '@ember/template';\nimport type Owner from '@ember/owner';\n\nimport optional from '@nullvoxpopuli/ember-composable-helpers/helpers/optional';\nimport { focusTrap } from 'ember-focus-trap';\nimport onKey from 'ember-keyboard/modifiers/on-key';\nimport { and, not, or } from 'ember-truth-helpers';\nimport { tabbable } from 'tabbable';\n\nimport randomId from '../-private/random-id.ts';\nimport { argOrDefaultDecorator } from '../helpers/arg-or-default.ts';\nimport classNames from '../helpers/class-names.ts';\nimport merge from '../helpers/merge.ts';\nimport mutationObserver from '../modifiers/mutation-observer.ts';\nimport outsideClickDetector from '../modifiers/outside-click-detector.ts';\nimport screenReaderOnly from '../modifiers/screen-reader-only.ts';\nimport simpleStyle from '../modifiers/simple-style.ts';\nimport { cascadingMenuKeys } from '../utils/accesibility/index.ts';\nimport {\n anchorPositionMapping,\n displayMapping\n} from '../utils/css-mappings/eui-popover.ts';\nimport {\n findPopoverPosition,\n getElementZIndex\n} from '../utils/popover/index.ts';\nimport {\n getTransitionTimings,\n getWaitDuration,\n performOnFrame\n} from '../utils/transition.ts';\nimport EuiPanel from './eui-panel.gts';\nimport EuiPortal from './eui-portal.gts';\n\nimport type { paddingSizeMapping } from '../utils/css-mappings/eui-panel.ts';\nimport type { EuiPopoverPosition } from '../utils/popover/types';\nimport type { EmberKeyboardEvent } from 'ember-keyboard/modifiers/on-key';\n\ntype PanelPaddingSize = keyof typeof paddingSizeMapping;\n\nexport type PopoverAnchorPosition =\n | 'upCenter'\n | 'upLeft'\n | 'upRight'\n | 'downCenter'\n | 'downLeft'\n | 'downRight'\n | 'leftCenter'\n | 'leftUp'\n | 'leftDown'\n | 'rightCenter'\n | 'rightUp'\n | 'rightDown';\n\nexport type EuiPopoverArgs = {\n /**\n * Class name passed to the direct parent of the button\n */\n anchorClassName?: string;\n /**\n * Alignment of the popover and arrow relative to the button\n */\n anchorPosition?: PopoverAnchorPosition;\n /**\n * Style and position alteration for arrow-less, left-aligned\n * attachment. Intended for use with inputs as anchors, e.g.\n * EuiInputPopover\n */\n attachToAnchor?: boolean;\n /**\n * Triggering element for which to align the popover to\n */\n button?: Component;\n buttonRef?: (e: HTMLDivElement) => unknown;\n /**\n * Callback to handle hiding of the popover\n */\n closePopover: () => void;\n /**\n * Restrict the popover's position within this element\n */\n container?: HTMLElement;\n /**\n * CSS display type for both the popover and anchor\n */\n display?: keyof typeof displayMapping;\n /**\n * Show arrow indicating to originating button\n */\n hasArrow?: boolean;\n /**\n * Specifies what element should initially have focus; Can be a DOM\n * node, or a selector string (which will be passed to\n * document.querySelector() to find the DOM node), or a function that\n * returns a DOM node\n */\n initialFocus?: FocusTarget | false;\n /**\n * Passed directly to EuiPortal for DOM positioning. Both properties are\n * required if prop is specified\n */\n insert?: {\n sibling: HTMLElement;\n position: 'before' | 'after';\n };\n /**\n * Visibility state of the popover\n */\n isOpen?: boolean;\n /**\n * Traps tab focus within the popover contents\n */\n ownFocus?: boolean;\n /**\n * Custom class added to the EuiPanel containing the popover contents\n */\n panelClassName?: string;\n /**\n * EuiPanel padding on all sides\n */\n panelPaddingSize?: PanelPaddingSize;\n /**\n * Standard DOM `style` attribute. Passed to the EuiPanel\n */\n panelStyle?: { [i: string]: string };\n panelRef?: (e: HTMLElement | null) => unknown;\n popoverRef?: (e: HTMLElement) => unknown;\n\n /**\n * when not `false`, the popover will check if this popover is inside another popover and if so. will reposition itself to be inside the other popover\n */\n shouldAccountForOtherPopovers?: boolean;\n\n /**\n * When `true`, the popover's position is re-calculated when the user\n * scrolls, this supports having fixed-position popover anchors\n */\n repositionOnScroll?: boolean;\n /**\n * By default, popover content inherits the z-index of the anchor\n * component; pass `zIndex` to override\n */\n zIndex?: number;\n /**\n * Function callback for when the focus trap is deactivated\n */\n onTrapDeactivation?: () => void;\n /**\n * Distance away from the anchor that the popover will render\n */\n offset?: number;\n /**\n * Minimum distance between the popover and the bounding container;\n * Pass an array of 4 values to adjust each side differently: `[top, right, bottom, left]`\n * Default is 16\n */\n buffer?: number | [number, number, number, number];\n /**\n * Element to pass as the child element of the arrow;\n * Use case is typically limited to an accompanying `EuiBeacon`\n */\n arrowChildren?: Component;\n /**\n * Provide a name to the popover panel\n */\n ariaLabel?: string;\n /**\n * Alternative option to `aria-label` that takes an `id`.\n * Usually takes the `id` of the popover title\n */\n ariaLabelledBy?: string;\n\n tabindex?: string | number;\n\n shouldSelfFocus?: boolean;\n\n isFocusTrapPaused?: boolean;\n\n focusTrapOptions?: {\n onClickOutside?: (e: Event) => void;\n };\n\n mutationObserverOptions?: {\n attributes?: boolean;\n childList?: boolean;\n characterData?: boolean;\n subtree?: boolean;\n };\n};\n\ntype AnchorPosition = 'up' | 'right' | 'down' | 'left';\n\nconst anchorPositionToPopoverPositionMap: {\n [position in AnchorPosition]: EuiPopoverPosition;\n} = {\n up: 'top',\n right: 'right',\n down: 'bottom',\n left: 'left'\n};\n\nexport function getPopoverPositionFromAnchorPosition(\n anchorPosition: PopoverAnchorPosition\n): EuiPopoverPosition {\n // maps the anchor position to the matching popover position\n // e.g. \"upLeft\" -> \"top\", \"downRight\" -> \"bottom\"\n\n // extract the first positional word from anchorPosition:\n // starts at the beginning (\" ^ \") of anchorPosition and\n // captures all of the characters (\" (.*?) \") until the\n // first capital letter (\" [A-Z] \") is encountered\n const match = anchorPosition.match(/^(.*?)[A-Z]/);\n\n if (match?.length && match.length > 1) {\n return anchorPositionToPopoverPositionMap[match[1] as AnchorPosition];\n }\n\n return anchorPositionToPopoverPositionMap['up'];\n}\n\nexport function getPopoverAlignFromAnchorPosition(\n anchorPosition: PopoverAnchorPosition\n): EuiPopoverPosition {\n // maps the gravity to the matching popover position\n // e.g. \"upLeft\" -> \"left\", \"rightDown\" -> \"bottom\"\n\n // extract the second positional word from anchorPosition:\n // starts a capture group at the first capital letter\n // and includes everything after it\n const match = anchorPosition.match(/([A-Z].*)/);\n\n // this performs two tasks:\n // 1. normalizes the align position by lowercasing it\n // 2. `center` doesn't exist in the lookup map which converts it to `undefined` meaning no align\n if (match?.length && match.length > 1) {\n return anchorPositionToPopoverPositionMap[\n match[1]?.toLowerCase() as AnchorPosition\n ];\n }\n\n return anchorPositionToPopoverPositionMap['left'];\n}\n\nexport const ANCHOR_POSITIONS = Object.keys(anchorPositionMapping);\nexport const DISPLAY = Object.keys(displayMapping);\nexport type FocusTarget = HTMLElement | string | (() => HTMLElement);\n\nconst DEFAULT_POPOVER_STYLES = {\n top: 50,\n left: 50\n};\n\nfunction getElementFromInitialFocus(\n initialFocus?: FocusTarget\n): HTMLElement | null {\n const initialFocusType = typeof initialFocus;\n\n if (initialFocusType === 'string') {\n return document.querySelector(initialFocus as string);\n }\n\n if (initialFocusType === 'function') {\n return (initialFocus as () => HTMLElement | null)();\n }\n\n return initialFocus as HTMLElement | null;\n}\n\ntype CssProps = {\n top?: number;\n left?: number;\n right?: number;\n bottom?: number;\n zIndex?: number;\n};\n\nexport interface EuiPopoverSignature {\n Element: HTMLDivElement;\n Args: EuiPopoverArgs;\n Blocks: {\n button: [];\n content: [];\n arrowChildren: [];\n };\n}\n\nexport default class EuiPopoverComponent extends Component<EuiPopoverSignature> {\n // Defaults\n @argOrDefaultDecorator(false) isOpen!: boolean;\n @argOrDefaultDecorator(true) ownFocus!: boolean;\n @argOrDefaultDecorator('downCenter') anchorPosition!: PopoverAnchorPosition;\n @argOrDefaultDecorator('m') panelPaddingSize!: PanelPaddingSize;\n @argOrDefaultDecorator(true) hasArrow!: boolean;\n @argOrDefaultDecorator('inlineBlock') display!: string;\n @argOrDefaultDecorator(true) shouldSelfFocus!: boolean;\n @argOrDefaultDecorator(false) isFocusTrapPaused!: boolean;\n\n //State\n @tracked prevIsOpen: boolean | undefined;\n @tracked suppressingPopover: boolean | undefined;\n @tracked isClosing = false;\n @tracked isOpening = false;\n @tracked popoverStyles: CssProps = {};\n @tracked arrowStyles: CssProps | undefined = {};\n @tracked arrowPosition: EuiPopoverPosition | null = null;\n @tracked openPosition: EuiPopoverPosition | null = null;\n @tracked isOpenStable = false;\n @tracked isCurrentlyOpen: boolean | undefined;\n @tracked popoverHost?: HTMLElement | null = null;\n ///\n\n private respositionTimeout: ReturnType<typeof later> | null = null;\n private closingTransitionTimeout: ReturnType<typeof later> | null = null;\n private closingTransitionAnimationFrame: number | undefined;\n private updateFocusAnimationFrame: number | undefined;\n private hasSetInitialFocus: boolean = false;\n @tracked button: HTMLElement | null = null;\n @tracked panel: HTMLElement | null = null;\n\n constructor(owner: Owner, args: EuiPopoverArgs) {\n super(owner, args);\n assert(`Must provide closePopover function`, this.args.closePopover);\n this.prevIsOpen = this.isOpen;\n this.suppressingPopover = this.isOpen;\n this.isCurrentlyOpen = this.isOpen;\n }\n\n get insert() {\n if (this.args.insert) {\n return this.args.insert;\n }\n\n if (this.shouldAccountForOtherPopovers) {\n if (this.popoverHost) {\n return {\n sibling: this.popoverHost.children[0] as HTMLElement,\n position: 'after'\n };\n }\n }\n\n return undefined;\n }\n\n @action\n closePopover(): void {\n if (this.isOpen) {\n this.args.closePopover();\n }\n }\n\n @action\n onEscapeKey(event: Event, ekEvent?: EmberKeyboardEvent): void {\n if (this.isOpen) {\n ekEvent?.stopPropagation();\n ekEvent?.stopImmediatePropagation();\n event.preventDefault();\n event.stopPropagation();\n this.closePopover();\n }\n }\n\n @action\n onKeyDown(event: KeyboardEvent, ekEvent: EmberKeyboardEvent): void {\n if (event.key === cascadingMenuKeys.ESCAPE) {\n this.onEscapeKey(event as unknown as Event, ekEvent as unknown as Event);\n }\n }\n\n @action\n onClickOutside(event: Event): void {\n if (this.args.focusTrapOptions?.onClickOutside) {\n this.args.focusTrapOptions.onClickOutside(event);\n } else {\n // only close the popover if the event source isn't the anchor button\n // otherwise, it is up to the anchor to toggle the popover's open status\n if (this.button && this.button.contains(event.target as Node) === false) {\n this.closePopover();\n }\n }\n }\n\n updateFocus(): void {\n // Wait for the DOM to update.\n this.updateFocusAnimationFrame = window.requestAnimationFrame(() => {\n if (!this.ownFocus || !this.panel || this.args.initialFocus === false) {\n return;\n }\n\n // If we've already focused on something inside the panel, everything's fine.\n if (\n this.hasSetInitialFocus &&\n this.panel.contains(document.activeElement)\n ) {\n return;\n }\n\n // Otherwise let's focus the first tabbable item and expedite input from the user.\n let focusTarget;\n\n if (this.args.initialFocus != null) {\n focusTarget = getElementFromInitialFocus(this.args.initialFocus);\n } else {\n const tabbableItems = tabbable(this.panel);\n\n if (tabbableItems.length) {\n focusTarget = tabbableItems[0];\n }\n }\n\n // there's a race condition between the popover content becoming visible and this function call\n // if the element isn't visible yet (due to css styling) then it can't accept focus\n // so wait for another render and try again\n if (focusTarget == null) {\n // there isn't a focus target, one of two reasons:\n // #1 is the whole panel hidden? If so, schedule another check\n // #2 panel is visible but no tabbables exist, move focus to the panel\n const panelVisibility = window.getComputedStyle(this.panel).opacity;\n\n if (panelVisibility === '0') {\n // #1\n this.updateFocus();\n } else {\n // #2\n focusTarget = this.panel;\n }\n } else {\n // found an element to focus, but is it visible?\n const visibility = window.getComputedStyle(focusTarget).visibility;\n\n if (visibility === 'hidden') {\n // not visible, check again next render frame\n this.updateFocus();\n }\n }\n\n if (focusTarget != null) {\n this.hasSetInitialFocus = true;\n focusTarget.focus();\n }\n });\n }\n\n @action\n onOpenPopover(): void {\n cancel(this.closingTransitionTimeout as ReturnType<typeof later>);\n // We need to set this state a beat after the render takes place, so that the CSS\n // transition can take effect.\n this.closingTransitionAnimationFrame = window.requestAnimationFrame(() => {\n this.isOpening = true;\n });\n\n // for each child element of `this.panel`, find any transition duration we should wait for before stabilizing\n const { durationMatch, delayMatch } = Array.prototype.slice\n .call(this.panel ? this.panel.children : [])\n .reduce(\n (\n {\n durationMatch,\n delayMatch\n }: { durationMatch: number; delayMatch: number },\n element: HTMLElement\n ) => {\n const transitionTimings = getTransitionTimings(element);\n\n return {\n durationMatch: Math.max(\n durationMatch,\n transitionTimings.durationMatch\n ),\n delayMatch: Math.max(delayMatch, transitionTimings.delayMatch)\n };\n },\n { durationMatch: 0, delayMatch: 0 }\n );\n\n this.respositionTimeout = later(\n this,\n () => {\n this.isOpenStable = true;\n\n const fn = (): void => {\n this.positionPopoverFixed();\n this.updateFocus();\n };\n\n scheduleOnce('afterRender', this, fn);\n },\n durationMatch + delayMatch\n );\n }\n\n get shouldAccountForOtherPopovers() {\n return this.args.shouldAccountForOtherPopovers ?? true;\n }\n\n checkIfPopoverIsInsideAnotherPopover(ele: HTMLElement) {\n const otherPopover = ele.closest<HTMLDivElement>('div.euiPopover__panel');\n\n this.popoverHost = otherPopover;\n }\n\n @action\n didInsertPopover(ele: HTMLDivElement): void {\n if (this.suppressingPopover) {\n // component was created with isOpen=true; now that it's inserted\n // stop suppressing and start opening\n this.suppressingPopover = false;\n this.isOpening = true;\n\n const fn = (): void => this.onOpenPopover();\n\n scheduleOnce('afterRender', this, fn);\n }\n\n if (this.args.repositionOnScroll) {\n window.addEventListener('scroll', this.positionPopoverFixed, true);\n }\n\n if (this.shouldAccountForOtherPopovers) {\n this.checkIfPopoverIsInsideAnotherPopover(ele);\n }\n\n this.updateFocus();\n }\n\n @action\n didUpdateRepositionOnScroll(): void {\n if (this.args.repositionOnScroll) {\n window.addEventListener('scroll', this.positionPopoverFixed, true);\n } else {\n window.removeEventListener('scroll', this.positionPopoverFixed, true);\n }\n }\n\n @action\n didUpdateIsOpen(): void {\n this.isCurrentlyOpen = this.isOpen;\n\n if (!this.prevIsOpen && this.args.isOpen) {\n this.onOpenPopover();\n }\n\n if (this.prevIsOpen && !this.args.isOpen) {\n // If the user has just closed the popover, queue up the removal of the content after the\n // transition is complete.\n this.isClosing = true;\n this.isOpening = false;\n this.closingTransitionTimeout = later(\n this,\n () => {\n this.isClosing = false;\n },\n 250\n );\n }\n\n this.prevIsOpen = this.args.isOpen;\n }\n\n willDestroy(): void {\n super.willDestroy();\n window.removeEventListener('scroll', this.positionPopoverFixed, true);\n this.popoverHost = null;\n cancel(this.respositionTimeout as ReturnType<typeof later>);\n cancel(this.closingTransitionTimeout as ReturnType<typeof later>);\n cancelAnimationFrame(this.closingTransitionAnimationFrame as number);\n cancelAnimationFrame(this.updateFocusAnimationFrame as number);\n }\n\n @action\n onMutation(records: MutationRecord[]): void {\n const waitDuration = getWaitDuration(records);\n\n this.positionPopoverFixed();\n\n performOnFrame(waitDuration, this.positionPopoverFixed);\n }\n\n @action\n positionPopover(allowEnforcePosition: boolean): void {\n if (this.button == null || this.panel == null) return;\n\n let position = getPopoverPositionFromAnchorPosition(this.anchorPosition);\n let forcePosition = undefined;\n\n if (\n allowEnforcePosition &&\n this.isOpenStable &&\n this.openPosition != null\n ) {\n position = this.openPosition;\n forcePosition = true;\n }\n\n // get the position of the element relative to the offsetParent, which could be the document\n function getPos(ele: HTMLElement): [number, number] {\n let currTop = 0;\n let currLeft = 0;\n\n if (ele.offsetParent) {\n do {\n currTop += ele.offsetTop;\n currLeft += ele.offsetLeft;\n } while ((ele = ele.offsetParent as HTMLElement));\n } else {\n currTop = ele.offsetTop;\n currLeft = ele.offsetLeft;\n }\n\n return [currTop, currLeft];\n }\n\n const {\n top,\n left,\n position: foundPosition,\n arrow,\n anchorBoundingBox\n } = findPopoverPosition({\n container: this.args.container,\n host: this.shouldAccountForOtherPopovers ? this.popoverHost : null,\n position,\n forcePosition,\n align: getPopoverAlignFromAnchorPosition(this.anchorPosition),\n anchor: this.button,\n popover: this.panel,\n offset:\n !this.args.attachToAnchor && this.hasArrow\n ? 16 + (this.args.offset || 0)\n : 8 + (this.args.offset || 0),\n arrowConfig: {\n arrowWidth: 24,\n arrowBuffer: 10\n },\n returnBoundingBox: this.args.attachToAnchor,\n buffer: this.args.buffer\n });\n\n // the popover's z-index must inherit from the button\n // this keeps a button's popover under a flyout that would cover the button\n // but a popover triggered inside a flyout will appear over that flyout\n const { zIndex: zIndexProp } = this.args;\n const zIndex =\n zIndexProp == null\n ? getElementZIndex(this.button, this.panel) + 2000\n : zIndexProp;\n\n const popoverStyles = {\n top,\n left:\n this.args.attachToAnchor && anchorBoundingBox\n ? anchorBoundingBox.left\n : left,\n zIndex\n };\n\n const willRenderArrow = !this.args.attachToAnchor && this.hasArrow;\n const arrowStyles = willRenderArrow ? arrow : undefined;\n const arrowPosition = foundPosition;\n\n this.popoverStyles = popoverStyles;\n this.arrowStyles = arrowStyles;\n this.arrowPosition = arrowPosition;\n this.openPosition = foundPosition;\n }\n\n get _arrowStyles(): ReturnType<typeof htmlSafe> | undefined {\n const { arrowStyles } = this;\n\n return arrowStyles\n ? htmlSafe(`top: ${arrowStyles?.top}px; left: ${arrowStyles?.left}px;`)\n : undefined;\n }\n\n get _popoverStyles(): { [i: string]: string } {\n const { panelStyle } = this.args;\n const { popoverStyles } = this;\n\n return {\n ...panelStyle,\n top: `${popoverStyles.top}px`,\n left: `${popoverStyles.left}px`,\n zIndex: `${popoverStyles.zIndex}`\n };\n }\n\n get tabindex() {\n if (this.ownFocus) {\n return this.args.tabindex ?? '0';\n }\n\n return '-1';\n }\n\n @action\n positionPopoverFixed(): void {\n this.positionPopover(true);\n }\n\n @action\n positionPopoverFluid(): void {\n this.positionPopover(false);\n }\n\n @action\n registerButton(btn: HTMLDivElement): void {\n this.button = btn;\n this.args.buttonRef?.(btn);\n }\n\n @action\n registerPanel(panel: HTMLElement): void {\n this.panel = panel;\n this.args.panelRef?.(panel);\n\n if (panel === null) {\n // panel has unmounted, restore the state defaults\n this.popoverStyles = DEFAULT_POPOVER_STYLES;\n this.arrowStyles = {};\n this.arrowPosition = null;\n this.openPosition = null;\n this.isOpenStable = false;\n window.removeEventListener('resize', this.positionPopoverFluid);\n } else {\n // panel is coming into existence\n this.positionPopoverFluid();\n window.addEventListener('resize', this.positionPopoverFluid);\n }\n }\n\n <template>\n {{#let\n (randomId)\n (classNames\n (if this.isOpening \"euiPopover-isOpen\")\n position=this.anchorPosition\n display=this.display\n componentName=\"EuiPopover\"\n )\n (classNames\n \"euiPopover__panel\"\n (concat \"euiPopover__panel--\" this.arrowPosition)\n (if this.isOpening \"euiPopover__panel-isOpen\")\n (if\n (or (not this.hasArrow) @attachToAnchor) \"euiPopover__panel-noArrow\"\n )\n (if @attachToAnchor \"euiPopover__panel-isAttached\")\n @panelClassName\n )\n as |descriptionId classes panelClasses|\n }}\n <div\n class={{classes}}\n {{onKey \"_all\" this.onKeyDown priority=1}}\n {{didInsert this.didInsertPopover}}\n {{didUpdate this.didUpdateIsOpen @isOpen}}\n {{didUpdate this.didUpdateRepositionOnScroll @repositionOnScroll}}\n {{didInsert (optional @popoverRef)}}\n ...attributes\n >\n\n {{! button }}\n <div\n class=\"euiPopover__anchor {{@anchorClassName}}\"\n {{didInsert this.registerButton}}\n >\n {{yield to=\"button\"}}\n </div>\n\n {{! content }}\n {{#if\n (and\n (not this.suppressingPopover)\n (or this.isCurrentlyOpen this.isClosing)\n )\n }}\n <EuiPortal @insert={{this.insert}}>\n {{#let (randomId) as |panelId|}}\n <EuiPanel\n id={{panelId}}\n class={{panelClasses}}\n aria-live={{if this.ownFocus \"off\" \"assertive\"}}\n role=\"dialog\"\n aria-label={{@ariaLabel}}\n aria-labelledby={{@ariaLabelledBy}}\n aria-modal=\"true\"\n aria-describedby={{if this.ownFocus descriptionId}}\n tabindex={{this.tabindex}}\n @hasShadow={{false}}\n @paddingSize={{this.panelPaddingSize}}\n {{simpleStyle this._popoverStyles}}\n {{didInsert this.registerPanel}}\n {{outsideClickDetector onOutsideClick=this.onClickOutside}}\n {{onKey \"Escape\" this.onEscapeKey}}\n {{focusTrap\n isActive=(not\n (or\n (not this.ownFocus) (not this.isOpenStable) this.isClosing\n )\n )\n shouldSelfFocus=this.shouldSelfFocus\n isPaused=this.isFocusTrapPaused\n focusTrapOptions=(merge\n (hash\n returnFocusOnDeactivate=this.isOpenStable\n initialFocus=(or @initialFocus this.panel)\n onDeactivate=(optional @onTrapDeactivation)\n preventScroll=true\n clickOutsideDeactivates=true\n fallbackFocus=(concat \"#\" panelId)\n )\n @focusTrapOptions\n )\n }}\n >\n <div\n class={{concat\n \"euiPopover__panelArrow euiPopover__panelArrow--\"\n this.arrowPosition\n }}\n style={{this._arrowStyles}}\n >\n {{yield to=\"arrowChildren\"}}\n </div>\n {{#if this.ownFocus}}\n <p id={{descriptionId}} {{screenReaderOnly}}>\n You are in a dialog. To close this dialog, hit escape.\n </p>\n {{/if}}\n <div\n {{mutationObserver\n onMutation=this.onMutation\n observerOptions=(merge\n (hash\n attributes=true\n childList=true\n characterData=true\n subtree=true\n )\n @mutationObserverOptions\n )\n }}\n >\n {{yield to=\"content\"}}\n </div>\n </EuiPanel>\n {{/let}}\n </EuiPortal>\n {{/if}}\n\n </div>\n {{/let}}\n </template>\n}\n"],"names":["anchorPositionToPopoverPositionMap","up","right","down","left","getPopoverPositionFromAnchorPosition","anchorPosition","match","length","getPopoverAlignFromAnchorPosition","toLowerCase","ANCHOR_POSITIONS","Object","keys","anchorPositionMapping","DISPLAY","displayMapping","DEFAULT_POPOVER_STYLES","top","getElementFromInitialFocus","initialFocus","initialFocusType","document","querySelector","EuiPopoverComponent","Component","g","prototype","argOrDefaultDecorator","i","void 0","tracked","respositionTimeout","closingTransitionTimeout","closingTransitionAnimationFrame","updateFocusAnimationFrame","hasSetInitialFocus","constructor","owner","args","assert","closePopover","prevIsOpen","isOpen","suppressingPopover","isCurrentlyOpen","insert","shouldAccountForOtherPopovers","popoverHost","sibling","children","position","undefined","n","action","onEscapeKey","event","ekEvent","stopPropagation","stopImmediatePropagation","preventDefault","onKeyDown","key","cascadingMenuKeys","ESCAPE","onClickOutside","focusTrapOptions","button","contains","target","updateFocus","window","requestAnimationFrame","ownFocus","panel","activeElement","focusTarget","tabbableItems","tabbable","panelVisibility","getComputedStyle","opacity","visibility","focus","onOpenPopover","cancel","isOpening","durationMatch","delayMatch","Array","slice","call","reduce","element","transitionTimings","getTransitionTimings","Math","max","later","isOpenStable","fn","positionPopoverFixed","scheduleOnce","checkIfPopoverIsInsideAnotherPopover","ele","otherPopover","closest","didInsertPopover","repositionOnScroll","addEventListener","didUpdateRepositionOnScroll","removeEventListener","didUpdateIsOpen","isClosing","willDestroy","cancelAnimationFrame","onMutation","records","waitDuration","getWaitDuration","performOnFrame","positionPopover","allowEnforcePosition","forcePosition","openPosition","foundPosition","arrow","anchorBoundingBox","findPopoverPosition","container","host","align","anchor","popover","offset","attachToAnchor","hasArrow","arrowConfig","arrowWidth","arrowBuffer","returnBoundingBox","buffer","zIndex","zIndexProp","getElementZIndex","popoverStyles","willRenderArrow","arrowStyles","arrowPosition","_arrowStyles","htmlSafe","_popoverStyles","panelStyle","tabindex","positionPopoverFluid","registerButton","btn","buttonRef","registerPanel","panelRef","setComponentTemplate","precompileTemplate","strictMode","scope","randomId","classNames","concat","or","not","onKey","didInsert","didUpdate","optional","and","EuiPortal","EuiPanel","simpleStyle","outsideClickDetector","focusTrap","merge","hash","screenReaderOnly","mutationObserver"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyMA,MAAMA,kCAEF,GAAA;AACFC,EAAAA,EAAI,EAAA,KAAA;AACJC,EAAAA,KAAO,EAAA,OAAA;AACPC,EAAAA,IAAM,EAAA,QAAA;AACNC,EAAAA,IAAM,EAAA;AACR,CAAA;AAEO,SAASC,oCAAAA,CACdC,cAAqC,EACpC;AACD;AACA;AAEA;AACA;AACA;AACA;AACA,EAAA,MAAMC,KAAA,GAAQD,cAAe,CAAAC,KAAK,CAAC,aAAA,CAAA;EAEnC,IAAIA,KAAO,EAAAC,MAAA,IAAUD,KAAM,CAAAC,MAAM,GAAG,CAAG,EAAA;AACrC,IAAA,OAAOR,kCAAkC,CAACO,KAAK,CAAC,CAAA,CAAE,CAAmB;AACvE;EAEA,OAAOP,kCAAkC,CAAC,IAAK,CAAA;AACjD;AAEO,SAASS,iCAAAA,CACdH,cAAqC,EACpC;AACD;AACA;AAEA;AACA;AACA;AACA,EAAA,MAAMC,KAAA,GAAQD,cAAe,CAAAC,KAAK,CAAC,WAAA,CAAA;AAEnC;AACA;AACA;EACA,IAAIA,KAAO,EAAAC,MAAA,IAAUD,KAAM,CAAAC,MAAM,GAAG,CAAG,EAAA;IACrC,OAAOR,kCAAkC,CACvCO,KAAK,CAAC,CAAE,CAA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AAD;AACZ;;;;"}
1
+ {"version":3,"file":"eui-popover.js","sources":["../../src/components/eui-popover.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { assert } from '@ember/debug';\nimport { hash } from '@ember/helper';\nimport { concat } from '@ember/helper';\nimport { action } from '@ember/object';\nimport didInsert from '@ember/render-modifiers/modifiers/did-insert';\nimport didUpdate from '@ember/render-modifiers/modifiers/did-update';\nimport { cancel, later, scheduleOnce } from '@ember/runloop';\nimport { htmlSafe } from '@ember/template';\nimport type Owner from '@ember/owner';\n\nimport optional from '@nullvoxpopuli/ember-composable-helpers/helpers/optional';\nimport { focusTrap } from 'ember-focus-trap';\nimport onKey from 'ember-keyboard/modifiers/on-key';\nimport { and, not, or } from 'ember-truth-helpers';\nimport { tabbable } from 'tabbable';\n\nimport randomId from '../-private/random-id.ts';\nimport { argOrDefaultDecorator } from '../helpers/arg-or-default.ts';\nimport classNames from '../helpers/class-names.ts';\nimport merge from '../helpers/merge.ts';\nimport mutationObserver from '../modifiers/mutation-observer.ts';\nimport outsideClickDetector from '../modifiers/outside-click-detector.ts';\nimport screenReaderOnly from '../modifiers/screen-reader-only.ts';\nimport simpleStyle from '../modifiers/simple-style.ts';\nimport { cascadingMenuKeys } from '../utils/accesibility/index.ts';\nimport {\n anchorPositionMapping,\n displayMapping\n} from '../utils/css-mappings/eui-popover.ts';\nimport {\n findPopoverPosition,\n getElementZIndex\n} from '../utils/popover/index.ts';\nimport {\n getTransitionTimings,\n getWaitDuration,\n performOnFrame\n} from '../utils/transition.ts';\nimport EuiPanel from './eui-panel.gts';\nimport EuiPortal from './eui-portal.gts';\n\nimport type { paddingSizeMapping } from '../utils/css-mappings/eui-panel.ts';\nimport type { EuiPopoverPosition } from '../utils/popover/types';\nimport type { EmberKeyboardEvent } from 'ember-keyboard/modifiers/on-key';\n\ntype PanelPaddingSize = keyof typeof paddingSizeMapping;\n\nexport type PopoverAnchorPosition =\n | 'upCenter'\n | 'upLeft'\n | 'upRight'\n | 'downCenter'\n | 'downLeft'\n | 'downRight'\n | 'leftCenter'\n | 'leftUp'\n | 'leftDown'\n | 'rightCenter'\n | 'rightUp'\n | 'rightDown';\n\nexport type EuiPopoverArgs = {\n /**\n * Callback to have a reference to the portal element\n */\n portalRef?: (ref: HTMLElement) => void;\n /**\n * Class name passed to the direct parent of the button\n */\n anchorClassName?: string;\n /**\n * Alignment of the popover and arrow relative to the button\n */\n anchorPosition?: PopoverAnchorPosition;\n /**\n * Style and position alteration for arrow-less, left-aligned\n * attachment. Intended for use with inputs as anchors, e.g.\n * EuiInputPopover\n */\n attachToAnchor?: boolean;\n /**\n * Triggering element for which to align the popover to\n */\n button?: Component;\n buttonRef?: (e: HTMLDivElement) => unknown;\n /**\n * Callback to handle hiding of the popover\n */\n closePopover: () => void;\n /**\n * Restrict the popover's position within this element\n */\n container?: HTMLElement;\n /**\n * CSS display type for both the popover and anchor\n */\n display?: keyof typeof displayMapping;\n /**\n * Show arrow indicating to originating button\n */\n hasArrow?: boolean;\n /**\n * Specifies what element should initially have focus; Can be a DOM\n * node, or a selector string (which will be passed to\n * document.querySelector() to find the DOM node), or a function that\n * returns a DOM node\n */\n initialFocus?: FocusTarget | false;\n /**\n * Passed directly to EuiPortal for DOM positioning. Both properties are\n * required if prop is specified\n */\n insert?: {\n sibling: HTMLElement;\n position: 'before' | 'after';\n };\n /**\n * Visibility state of the popover\n */\n isOpen?: boolean;\n /**\n * Traps tab focus within the popover contents\n */\n ownFocus?: boolean;\n /**\n * Custom class added to the EuiPanel containing the popover contents\n */\n panelClassName?: string;\n /**\n * EuiPanel padding on all sides\n */\n panelPaddingSize?: PanelPaddingSize;\n /**\n * Standard DOM `style` attribute. Passed to the EuiPanel\n */\n panelStyle?: { [i: string]: string };\n panelRef?: (e: HTMLElement | null) => unknown;\n popoverRef?: (e: HTMLElement) => unknown;\n\n /**\n * when not `false`, the popover will check if this popover is inside another popover and if so. will reposition itself to be inside the other popover\n */\n shouldAccountForOtherPopovers?: boolean;\n\n /**\n * When `true`, the popover's position is re-calculated when the user\n * scrolls, this supports having fixed-position popover anchors\n */\n repositionOnScroll?: boolean;\n /**\n * By default, popover content inherits the z-index of the anchor\n * component; pass `zIndex` to override\n */\n zIndex?: number;\n /**\n * Function callback for when the focus trap is deactivated\n */\n onTrapDeactivation?: () => void;\n /**\n * Distance away from the anchor that the popover will render\n */\n offset?: number;\n /**\n * Minimum distance between the popover and the bounding container;\n * Pass an array of 4 values to adjust each side differently: `[top, right, bottom, left]`\n * Default is 16\n */\n buffer?: number | [number, number, number, number];\n /**\n * Element to pass as the child element of the arrow;\n * Use case is typically limited to an accompanying `EuiBeacon`\n */\n arrowChildren?: Component;\n /**\n * Provide a name to the popover panel\n */\n ariaLabel?: string;\n /**\n * Alternative option to `aria-label` that takes an `id`.\n * Usually takes the `id` of the popover title\n */\n ariaLabelledBy?: string;\n\n tabindex?: string | number;\n\n shouldSelfFocus?: boolean;\n\n isFocusTrapPaused?: boolean;\n\n focusTrapOptions?: {\n onClickOutside?: (e: Event) => void;\n };\n\n mutationObserverOptions?: {\n attributes?: boolean;\n childList?: boolean;\n characterData?: boolean;\n subtree?: boolean;\n };\n};\n\ntype AnchorPosition = 'up' | 'right' | 'down' | 'left';\n\nconst anchorPositionToPopoverPositionMap: {\n [position in AnchorPosition]: EuiPopoverPosition;\n} = {\n up: 'top',\n right: 'right',\n down: 'bottom',\n left: 'left'\n};\n\nexport function getPopoverPositionFromAnchorPosition(\n anchorPosition: PopoverAnchorPosition\n): EuiPopoverPosition {\n // maps the anchor position to the matching popover position\n // e.g. \"upLeft\" -> \"top\", \"downRight\" -> \"bottom\"\n\n // extract the first positional word from anchorPosition:\n // starts at the beginning (\" ^ \") of anchorPosition and\n // captures all of the characters (\" (.*?) \") until the\n // first capital letter (\" [A-Z] \") is encountered\n const match = anchorPosition.match(/^(.*?)[A-Z]/);\n\n if (match?.length && match.length > 1) {\n return anchorPositionToPopoverPositionMap[match[1] as AnchorPosition];\n }\n\n return anchorPositionToPopoverPositionMap['up'];\n}\n\nexport function getPopoverAlignFromAnchorPosition(\n anchorPosition: PopoverAnchorPosition\n): EuiPopoverPosition {\n // maps the gravity to the matching popover position\n // e.g. \"upLeft\" -> \"left\", \"rightDown\" -> \"bottom\"\n\n // extract the second positional word from anchorPosition:\n // starts a capture group at the first capital letter\n // and includes everything after it\n const match = anchorPosition.match(/([A-Z].*)/);\n\n // this performs two tasks:\n // 1. normalizes the align position by lowercasing it\n // 2. `center` doesn't exist in the lookup map which converts it to `undefined` meaning no align\n if (match?.length && match.length > 1) {\n return anchorPositionToPopoverPositionMap[\n match[1]?.toLowerCase() as AnchorPosition\n ];\n }\n\n return anchorPositionToPopoverPositionMap['left'];\n}\n\nexport const ANCHOR_POSITIONS = Object.keys(anchorPositionMapping);\nexport const DISPLAY = Object.keys(displayMapping);\nexport type FocusTarget = HTMLElement | string | (() => HTMLElement);\n\nconst DEFAULT_POPOVER_STYLES = {\n top: 50,\n left: 50\n};\n\nfunction getElementFromInitialFocus(\n initialFocus?: FocusTarget\n): HTMLElement | null {\n const initialFocusType = typeof initialFocus;\n\n if (initialFocusType === 'string') {\n return document.querySelector(initialFocus as string);\n }\n\n if (initialFocusType === 'function') {\n return (initialFocus as () => HTMLElement | null)();\n }\n\n return initialFocus as HTMLElement | null;\n}\n\ntype CssProps = {\n top?: number;\n left?: number;\n right?: number;\n bottom?: number;\n zIndex?: number;\n};\n\nexport interface EuiPopoverSignature {\n Element: HTMLDivElement;\n Args: EuiPopoverArgs;\n Blocks: {\n button: [];\n content: [];\n arrowChildren: [];\n };\n}\n\nexport default class EuiPopoverComponent extends Component<EuiPopoverSignature> {\n // Defaults\n @argOrDefaultDecorator(false) isOpen!: boolean;\n @argOrDefaultDecorator(true) ownFocus!: boolean;\n @argOrDefaultDecorator('downCenter') anchorPosition!: PopoverAnchorPosition;\n @argOrDefaultDecorator('m') panelPaddingSize!: PanelPaddingSize;\n @argOrDefaultDecorator(true) hasArrow!: boolean;\n @argOrDefaultDecorator('inlineBlock') display!: string;\n @argOrDefaultDecorator(true) shouldSelfFocus!: boolean;\n @argOrDefaultDecorator(false) isFocusTrapPaused!: boolean;\n\n //State\n @tracked prevIsOpen: boolean | undefined;\n @tracked suppressingPopover: boolean | undefined;\n @tracked isClosing = false;\n @tracked isOpening = false;\n @tracked popoverStyles: CssProps = {};\n @tracked arrowStyles: CssProps | undefined = {};\n @tracked arrowPosition: EuiPopoverPosition | null = null;\n @tracked openPosition: EuiPopoverPosition | null = null;\n @tracked isOpenStable = false;\n @tracked isCurrentlyOpen: boolean | undefined;\n @tracked popoverHost?: HTMLElement | null = null;\n ///\n\n private respositionTimeout: ReturnType<typeof later> | null = null;\n private closingTransitionTimeout: ReturnType<typeof later> | null = null;\n private closingTransitionAnimationFrame: number | undefined;\n private updateFocusAnimationFrame: number | undefined;\n private hasSetInitialFocus: boolean = false;\n @tracked button: HTMLElement | null = null;\n @tracked panel: HTMLElement | null = null;\n\n constructor(owner: Owner, args: EuiPopoverArgs) {\n super(owner, args);\n assert(`Must provide closePopover function`, this.args.closePopover);\n this.prevIsOpen = this.isOpen;\n this.suppressingPopover = this.isOpen;\n this.isCurrentlyOpen = this.isOpen;\n }\n\n get insert() {\n if (this.args.insert) {\n return this.args.insert;\n }\n\n if (this.shouldAccountForOtherPopovers) {\n if (this.popoverHost) {\n return {\n sibling: this.popoverHost.children[0] as HTMLElement,\n position: 'after'\n };\n }\n }\n\n return undefined;\n }\n\n @action\n closePopover(): void {\n if (this.isOpen) {\n this.args.closePopover();\n }\n }\n\n @action\n onEscapeKey(event: Event, ekEvent?: EmberKeyboardEvent): void {\n if (this.isOpen) {\n ekEvent?.stopPropagation();\n ekEvent?.stopImmediatePropagation();\n event.preventDefault();\n event.stopPropagation();\n this.closePopover();\n }\n }\n\n @action\n onKeyDown(event: KeyboardEvent, ekEvent: EmberKeyboardEvent): void {\n if (event.key === cascadingMenuKeys.ESCAPE) {\n this.onEscapeKey(event as unknown as Event, ekEvent as unknown as Event);\n }\n }\n\n @action\n onClickOutside(event: Event): void {\n if (this.args.focusTrapOptions?.onClickOutside) {\n this.args.focusTrapOptions.onClickOutside(event);\n } else {\n // only close the popover if the event source isn't the anchor button\n // otherwise, it is up to the anchor to toggle the popover's open status\n if (this.button && this.button.contains(event.target as Node) === false) {\n this.closePopover();\n }\n }\n }\n\n updateFocus(): void {\n // Wait for the DOM to update.\n this.updateFocusAnimationFrame = window.requestAnimationFrame(() => {\n if (!this.ownFocus || !this.panel || this.args.initialFocus === false) {\n return;\n }\n\n // If we've already focused on something inside the panel, everything's fine.\n if (\n this.hasSetInitialFocus &&\n this.panel.contains(document.activeElement)\n ) {\n return;\n }\n\n // Otherwise let's focus the first tabbable item and expedite input from the user.\n let focusTarget;\n\n if (this.args.initialFocus != null) {\n focusTarget = getElementFromInitialFocus(this.args.initialFocus);\n } else {\n const tabbableItems = tabbable(this.panel);\n\n if (tabbableItems.length) {\n focusTarget = tabbableItems[0];\n }\n }\n\n // there's a race condition between the popover content becoming visible and this function call\n // if the element isn't visible yet (due to css styling) then it can't accept focus\n // so wait for another render and try again\n if (focusTarget == null) {\n // there isn't a focus target, one of two reasons:\n // #1 is the whole panel hidden? If so, schedule another check\n // #2 panel is visible but no tabbables exist, move focus to the panel\n const panelVisibility = window.getComputedStyle(this.panel).opacity;\n\n if (panelVisibility === '0') {\n // #1\n this.updateFocus();\n } else {\n // #2\n focusTarget = this.panel;\n }\n } else {\n // found an element to focus, but is it visible?\n const visibility = window.getComputedStyle(focusTarget).visibility;\n\n if (visibility === 'hidden') {\n // not visible, check again next render frame\n this.updateFocus();\n }\n }\n\n if (focusTarget != null) {\n this.hasSetInitialFocus = true;\n focusTarget.focus();\n }\n });\n }\n\n @action\n onOpenPopover(): void {\n cancel(this.closingTransitionTimeout as ReturnType<typeof later>);\n // We need to set this state a beat after the render takes place, so that the CSS\n // transition can take effect.\n this.closingTransitionAnimationFrame = window.requestAnimationFrame(() => {\n this.isOpening = true;\n });\n\n // for each child element of `this.panel`, find any transition duration we should wait for before stabilizing\n const { durationMatch, delayMatch } = Array.prototype.slice\n .call(this.panel ? this.panel.children : [])\n .reduce(\n (\n {\n durationMatch,\n delayMatch\n }: { durationMatch: number; delayMatch: number },\n element: HTMLElement\n ) => {\n const transitionTimings = getTransitionTimings(element);\n\n return {\n durationMatch: Math.max(\n durationMatch,\n transitionTimings.durationMatch\n ),\n delayMatch: Math.max(delayMatch, transitionTimings.delayMatch)\n };\n },\n { durationMatch: 0, delayMatch: 0 }\n );\n\n this.respositionTimeout = later(\n this,\n () => {\n this.isOpenStable = true;\n\n const fn = (): void => {\n this.positionPopoverFixed();\n this.updateFocus();\n };\n\n scheduleOnce('afterRender', this, fn);\n },\n durationMatch + delayMatch\n );\n }\n\n get shouldAccountForOtherPopovers() {\n return this.args.shouldAccountForOtherPopovers ?? true;\n }\n\n checkIfPopoverIsInsideAnotherPopover(ele: HTMLElement) {\n const otherPopover = ele.closest<HTMLDivElement>('div.euiPopover__panel');\n\n this.popoverHost = otherPopover;\n }\n\n @action\n didInsertPopover(ele: HTMLDivElement): void {\n if (this.suppressingPopover) {\n // component was created with isOpen=true; now that it's inserted\n // stop suppressing and start opening\n this.suppressingPopover = false;\n this.isOpening = true;\n\n const fn = (): void => this.onOpenPopover();\n\n scheduleOnce('afterRender', this, fn);\n }\n\n if (this.args.repositionOnScroll) {\n window.addEventListener('scroll', this.positionPopoverFixed, true);\n }\n\n if (this.shouldAccountForOtherPopovers) {\n this.checkIfPopoverIsInsideAnotherPopover(ele);\n }\n\n this.updateFocus();\n }\n\n @action\n didUpdateRepositionOnScroll(): void {\n if (this.args.repositionOnScroll) {\n window.addEventListener('scroll', this.positionPopoverFixed, true);\n } else {\n window.removeEventListener('scroll', this.positionPopoverFixed, true);\n }\n }\n\n @action\n didUpdateIsOpen(): void {\n this.isCurrentlyOpen = this.isOpen;\n\n if (!this.prevIsOpen && this.args.isOpen) {\n this.onOpenPopover();\n }\n\n if (this.prevIsOpen && !this.args.isOpen) {\n // If the user has just closed the popover, queue up the removal of the content after the\n // transition is complete.\n this.isClosing = true;\n this.isOpening = false;\n this.closingTransitionTimeout = later(\n this,\n () => {\n this.isClosing = false;\n },\n 250\n );\n }\n\n this.prevIsOpen = this.args.isOpen;\n }\n\n willDestroy(): void {\n super.willDestroy();\n window.removeEventListener('scroll', this.positionPopoverFixed, true);\n this.popoverHost = null;\n cancel(this.respositionTimeout as ReturnType<typeof later>);\n cancel(this.closingTransitionTimeout as ReturnType<typeof later>);\n cancelAnimationFrame(this.closingTransitionAnimationFrame as number);\n cancelAnimationFrame(this.updateFocusAnimationFrame as number);\n }\n\n @action\n onMutation(records: MutationRecord[]): void {\n const waitDuration = getWaitDuration(records);\n\n this.positionPopoverFixed();\n\n performOnFrame(waitDuration, this.positionPopoverFixed);\n }\n\n @action\n positionPopover(allowEnforcePosition: boolean): void {\n if (this.button == null || this.panel == null) return;\n\n let position = getPopoverPositionFromAnchorPosition(this.anchorPosition);\n let forcePosition = undefined;\n\n if (\n allowEnforcePosition &&\n this.isOpenStable &&\n this.openPosition != null\n ) {\n position = this.openPosition;\n forcePosition = true;\n }\n\n // get the position of the element relative to the offsetParent, which could be the document\n function getPos(ele: HTMLElement): [number, number] {\n let currTop = 0;\n let currLeft = 0;\n\n if (ele.offsetParent) {\n do {\n currTop += ele.offsetTop;\n currLeft += ele.offsetLeft;\n } while ((ele = ele.offsetParent as HTMLElement));\n } else {\n currTop = ele.offsetTop;\n currLeft = ele.offsetLeft;\n }\n\n return [currTop, currLeft];\n }\n\n const {\n top,\n left,\n position: foundPosition,\n arrow,\n anchorBoundingBox\n } = findPopoverPosition({\n container: this.args.container,\n host: this.shouldAccountForOtherPopovers ? this.popoverHost : null,\n position,\n forcePosition,\n align: getPopoverAlignFromAnchorPosition(this.anchorPosition),\n anchor: this.button,\n popover: this.panel,\n offset:\n !this.args.attachToAnchor && this.hasArrow\n ? 16 + (this.args.offset || 0)\n : 8 + (this.args.offset || 0),\n arrowConfig: {\n arrowWidth: 24,\n arrowBuffer: 10\n },\n returnBoundingBox: this.args.attachToAnchor,\n buffer: this.args.buffer\n });\n\n // the popover's z-index must inherit from the button\n // this keeps a button's popover under a flyout that would cover the button\n // but a popover triggered inside a flyout will appear over that flyout\n const { zIndex: zIndexProp } = this.args;\n const zIndex =\n zIndexProp == null\n ? getElementZIndex(this.button, this.panel) + 2000\n : zIndexProp;\n\n const popoverStyles = {\n top,\n left:\n this.args.attachToAnchor && anchorBoundingBox\n ? anchorBoundingBox.left\n : left,\n zIndex\n };\n\n const willRenderArrow = !this.args.attachToAnchor && this.hasArrow;\n const arrowStyles = willRenderArrow ? arrow : undefined;\n const arrowPosition = foundPosition;\n\n this.popoverStyles = popoverStyles;\n this.arrowStyles = arrowStyles;\n this.arrowPosition = arrowPosition;\n this.openPosition = foundPosition;\n }\n\n get _arrowStyles(): ReturnType<typeof htmlSafe> | undefined {\n const { arrowStyles } = this;\n\n return arrowStyles\n ? htmlSafe(`top: ${arrowStyles?.top}px; left: ${arrowStyles?.left}px;`)\n : undefined;\n }\n\n get _popoverStyles(): { [i: string]: string } {\n const { panelStyle } = this.args;\n const { popoverStyles } = this;\n\n return {\n ...panelStyle,\n top: `${popoverStyles.top}px`,\n left: `${popoverStyles.left}px`,\n zIndex: `${popoverStyles.zIndex}`\n };\n }\n\n get tabindex() {\n if (this.ownFocus) {\n return this.args.tabindex ?? '0';\n }\n\n return '-1';\n }\n\n @action\n positionPopoverFixed(): void {\n this.positionPopover(true);\n }\n\n @action\n positionPopoverFluid(): void {\n this.positionPopover(false);\n }\n\n @action\n registerButton(btn: HTMLDivElement): void {\n this.button = btn;\n this.args.buttonRef?.(btn);\n }\n\n @action\n registerPanel(panel: HTMLElement): void {\n this.panel = panel;\n this.args.panelRef?.(panel);\n\n if (panel === null) {\n // panel has unmounted, restore the state defaults\n this.popoverStyles = DEFAULT_POPOVER_STYLES;\n this.arrowStyles = {};\n this.arrowPosition = null;\n this.openPosition = null;\n this.isOpenStable = false;\n window.removeEventListener('resize', this.positionPopoverFluid);\n } else {\n // panel is coming into existence\n this.positionPopoverFluid();\n window.addEventListener('resize', this.positionPopoverFluid);\n }\n }\n\n <template>\n {{#let\n (randomId)\n (classNames\n (if this.isOpening \"euiPopover-isOpen\")\n position=this.anchorPosition\n display=this.display\n componentName=\"EuiPopover\"\n )\n (classNames\n \"euiPopover__panel\"\n (concat \"euiPopover__panel--\" this.arrowPosition)\n (if this.isOpening \"euiPopover__panel-isOpen\")\n (if\n (or (not this.hasArrow) @attachToAnchor) \"euiPopover__panel-noArrow\"\n )\n (if @attachToAnchor \"euiPopover__panel-isAttached\")\n @panelClassName\n )\n as |descriptionId classes panelClasses|\n }}\n <div\n class={{classes}}\n {{onKey \"_all\" this.onKeyDown priority=1}}\n {{didInsert this.didInsertPopover}}\n {{didUpdate this.didUpdateIsOpen @isOpen}}\n {{didUpdate this.didUpdateRepositionOnScroll @repositionOnScroll}}\n {{didInsert (optional @popoverRef)}}\n ...attributes\n >\n\n {{! button }}\n <div\n class=\"euiPopover__anchor {{@anchorClassName}}\"\n {{didInsert this.registerButton}}\n >\n {{yield to=\"button\"}}\n </div>\n\n {{! content }}\n {{#if\n (and\n (not this.suppressingPopover)\n (or this.isCurrentlyOpen this.isClosing)\n )\n }}\n <EuiPortal @insert={{this.insert}} @portalRef={{@portalRef}}>\n {{#let (randomId) as |panelId|}}\n <EuiPanel\n id={{panelId}}\n class={{panelClasses}}\n aria-live={{if this.ownFocus \"off\" \"assertive\"}}\n role=\"dialog\"\n aria-label={{@ariaLabel}}\n aria-labelledby={{@ariaLabelledBy}}\n aria-modal=\"true\"\n aria-describedby={{if this.ownFocus descriptionId}}\n tabindex={{this.tabindex}}\n @hasShadow={{false}}\n @paddingSize={{this.panelPaddingSize}}\n {{simpleStyle this._popoverStyles}}\n {{didInsert this.registerPanel}}\n {{outsideClickDetector onOutsideClick=this.onClickOutside}}\n {{onKey \"Escape\" this.onEscapeKey}}\n {{focusTrap\n isActive=(not\n (or\n (not this.ownFocus) (not this.isOpenStable) this.isClosing\n )\n )\n shouldSelfFocus=this.shouldSelfFocus\n isPaused=this.isFocusTrapPaused\n focusTrapOptions=(merge\n (hash\n returnFocusOnDeactivate=this.isOpenStable\n initialFocus=(or @initialFocus this.panel)\n onDeactivate=(optional @onTrapDeactivation)\n preventScroll=true\n clickOutsideDeactivates=true\n fallbackFocus=(concat \"#\" panelId)\n )\n @focusTrapOptions\n )\n }}\n >\n <div\n class={{concat\n \"euiPopover__panelArrow euiPopover__panelArrow--\"\n this.arrowPosition\n }}\n style={{this._arrowStyles}}\n >\n {{yield to=\"arrowChildren\"}}\n </div>\n {{#if this.ownFocus}}\n <p id={{descriptionId}} {{screenReaderOnly}}>\n You are in a dialog. To close this dialog, hit escape.\n </p>\n {{/if}}\n <div\n {{mutationObserver\n onMutation=this.onMutation\n observerOptions=(merge\n (hash\n attributes=true\n childList=true\n characterData=true\n subtree=true\n )\n @mutationObserverOptions\n )\n }}\n >\n {{yield to=\"content\"}}\n </div>\n </EuiPanel>\n {{/let}}\n </EuiPortal>\n {{/if}}\n\n </div>\n {{/let}}\n </template>\n}\n"],"names":["anchorPositionToPopoverPositionMap","up","right","down","left","getPopoverPositionFromAnchorPosition","anchorPosition","match","length","getPopoverAlignFromAnchorPosition","toLowerCase","ANCHOR_POSITIONS","Object","keys","anchorPositionMapping","DISPLAY","displayMapping","DEFAULT_POPOVER_STYLES","top","getElementFromInitialFocus","initialFocus","initialFocusType","document","querySelector","EuiPopoverComponent","Component","g","prototype","argOrDefaultDecorator","i","void 0","tracked","respositionTimeout","closingTransitionTimeout","closingTransitionAnimationFrame","updateFocusAnimationFrame","hasSetInitialFocus","constructor","owner","args","assert","closePopover","prevIsOpen","isOpen","suppressingPopover","isCurrentlyOpen","insert","shouldAccountForOtherPopovers","popoverHost","sibling","children","position","undefined","n","action","onEscapeKey","event","ekEvent","stopPropagation","stopImmediatePropagation","preventDefault","onKeyDown","key","cascadingMenuKeys","ESCAPE","onClickOutside","focusTrapOptions","button","contains","target","updateFocus","window","requestAnimationFrame","ownFocus","panel","activeElement","focusTarget","tabbableItems","tabbable","panelVisibility","getComputedStyle","opacity","visibility","focus","onOpenPopover","cancel","isOpening","durationMatch","delayMatch","Array","slice","call","reduce","element","transitionTimings","getTransitionTimings","Math","max","later","isOpenStable","fn","positionPopoverFixed","scheduleOnce","checkIfPopoverIsInsideAnotherPopover","ele","otherPopover","closest","didInsertPopover","repositionOnScroll","addEventListener","didUpdateRepositionOnScroll","removeEventListener","didUpdateIsOpen","isClosing","willDestroy","cancelAnimationFrame","onMutation","records","waitDuration","getWaitDuration","performOnFrame","positionPopover","allowEnforcePosition","forcePosition","openPosition","foundPosition","arrow","anchorBoundingBox","findPopoverPosition","container","host","align","anchor","popover","offset","attachToAnchor","hasArrow","arrowConfig","arrowWidth","arrowBuffer","returnBoundingBox","buffer","zIndex","zIndexProp","getElementZIndex","popoverStyles","willRenderArrow","arrowStyles","arrowPosition","_arrowStyles","htmlSafe","_popoverStyles","panelStyle","tabindex","positionPopoverFluid","registerButton","btn","buttonRef","registerPanel","panelRef","setComponentTemplate","precompileTemplate","strictMode","scope","randomId","classNames","concat","or","not","onKey","didInsert","didUpdate","optional","and","EuiPortal","EuiPanel","simpleStyle","outsideClickDetector","focusTrap","merge","hash","screenReaderOnly","mutationObserver"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6MA,MAAMA,kCAEF,GAAA;AACFC,EAAAA,EAAI,EAAA,KAAA;AACJC,EAAAA,KAAO,EAAA,OAAA;AACPC,EAAAA,IAAM,EAAA,QAAA;AACNC,EAAAA,IAAM,EAAA;AACR,CAAA;AAEO,SAASC,oCAAAA,CACdC,cAAqC,EACpC;AACD;AACA;AAEA;AACA;AACA;AACA;AACA,EAAA,MAAMC,KAAA,GAAQD,cAAe,CAAAC,KAAK,CAAC,aAAA,CAAA;EAEnC,IAAIA,KAAO,EAAAC,MAAA,IAAUD,KAAM,CAAAC,MAAM,GAAG,CAAG,E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AAA,CAAAC,kBAAA,CA0HA,q4FAAA,EAAA;MAAAC,UAAA,EAAA,IAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,QAAA;QAAAC,UAAA;QAAAC,MAAA;QAAAC,EAAA;QAAAC,GAAA;QAAAC,KAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,QAAA;QAAAC,GAAA;QAAAC,SAAA;QAAAC,QAAA;QAAAC,WAAA;8BAAAC,oBAAA;QAAAC,SAAA;QAAAC,KAAA;QAAAC,IAAA;QAAAC,gBAAA;AAAAC,QAAAA;AAAA,OAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;;;"}
@@ -36,7 +36,7 @@ class EuiWrappingPopover extends Component {
36
36
  this.args.onWrappingDestroy?.();
37
37
  }
38
38
  static {
39
- setComponentTemplate(precompileTemplate("\n <EuiPortal @portalRef={{this.setPortalRef}} @insert={{this.insert}}>\n <EuiPopover @closePopover={{@closePopover}} @isOpen={{@isOpen}} @anchorClassName={{@anchorClassName}} @anchorPosition={{@anchorPosition}} @attachToAnchor={{@attachToAnchor}} @container={{@container}} @display={{@display}} @hasArrow={{@hasArrow}} @initialFocus={{@initialFocus}} @ownFocus={{@ownFocus}} @panelClassName={{@panelClassName}} @panelPaddingSize={{@panelPaddingSize}} @panelStyle={{@panelStyle}} @panelRef={{@panelRef}} @popoverRef={{@popoverRef}} ...attributes>\n <:button>\n <div {{this.setAnchorRef}} class=\"euiWrappingPopover__anchor\" />\n </:button>\n\n <:content>\n {{yield}}\n </:content>\n </EuiPopover>\n </EuiPortal>\n ", {
39
+ setComponentTemplate(precompileTemplate("\n <EuiPortal @portalRef={{this.setPortalRef}} @insert={{this.insert}}>\n <EuiPopover @closePopover={{@closePopover}} @isOpen={{@isOpen}} @anchorClassName={{@anchorClassName}} @portalRef={{@popoverPortalRef}} @anchorPosition={{@anchorPosition}} @attachToAnchor={{@attachToAnchor}} @container={{@container}} @display={{@display}} @hasArrow={{@hasArrow}} @initialFocus={{@initialFocus}} @ownFocus={{@ownFocus}} @panelClassName={{@panelClassName}} @panelPaddingSize={{@panelPaddingSize}} @panelStyle={{@panelStyle}} @panelRef={{@panelRef}} @popoverRef={{@popoverRef}} ...attributes>\n <:button>\n <div {{this.setAnchorRef}} class=\"euiWrappingPopover__anchor\" />\n </:button>\n\n <:content>\n {{yield}}\n </:content>\n </EuiPopover>\n </EuiPortal>\n ", {
40
40
  strictMode: true,
41
41
  scope: () => ({
42
42
  EuiPortal,
@@ -1 +1 @@
1
- {"version":3,"file":"eui-wrapping-popover.js","sources":["../../src/components/eui-wrapping-popover.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\n\nimport { modifier } from 'ember-modifier';\n\nimport EuiPopover from './eui-popover.gts';\nimport EuiPortal from './eui-portal.gts';\n\nimport type { EuiPopoverSignature } from './eui-popover.gts';\n\nexport interface EuiWrappingPopoverSignature {\n Element: EuiPopoverSignature['Element'];\n Args: EuiPopoverSignature['Args'] & {\n button?: HTMLElement;\n onWrappingDestroy?: () => void;\n portalRef?: (ref: HTMLElement) => void;\n };\n Blocks: {\n default: [];\n };\n}\n\nexport default class EuiWrappingPopover extends Component<EuiWrappingPopoverSignature> {\n private portal: HTMLElement | null = null;\n private anchor: HTMLElement | null = null;\n\n setAnchorRef = modifier((element: HTMLElement) => {\n this.anchor = element;\n this.anchor.insertAdjacentElement('beforebegin', this.args.button!);\n });\n\n setPortalRef = (element: HTMLElement) => {\n this.portal = element;\n this.args.portalRef?.(element);\n };\n\n get insert(): { sibling: HTMLElement; position: 'after' } | undefined {\n if (this.args.button) {\n return {\n sibling: this.args.button,\n position: 'after'\n };\n }\n\n return;\n }\n\n willDestroy() {\n super.willDestroy();\n\n if (this.args.button && this.args.button.parentNode) {\n if (this.portal) {\n this.portal.insertAdjacentElement('beforebegin', this.args.button);\n }\n }\n this.args.onWrappingDestroy?.();\n }\n\n <template>\n <EuiPortal @portalRef={{this.setPortalRef}} @insert={{this.insert}}>\n <EuiPopover\n @closePopover={{@closePopover}}\n @isOpen={{@isOpen}}\n @anchorClassName={{@anchorClassName}}\n @anchorPosition={{@anchorPosition}}\n @attachToAnchor={{@attachToAnchor}}\n @container={{@container}}\n @display={{@display}}\n @hasArrow={{@hasArrow}}\n @initialFocus={{@initialFocus}}\n @ownFocus={{@ownFocus}}\n @panelClassName={{@panelClassName}}\n @panelPaddingSize={{@panelPaddingSize}}\n @panelStyle={{@panelStyle}}\n @panelRef={{@panelRef}}\n @popoverRef={{@popoverRef}}\n ...attributes\n >\n <:button>\n <div {{this.setAnchorRef}} class=\"euiWrappingPopover__anchor\" />\n </:button>\n\n <:content>\n {{yield}}\n </:content>\n </EuiPopover>\n </EuiPortal>\n </template>\n}\n"],"names":["EuiWrappingPopover","Component","portal","anchor","setAnchorRef","modifier","element","insertAdjacentElement","args","button","setPortalRef","portalRef","insert","sibling","position","willDestroy","parentNode","onWrappingDestroy","setComponentTemplate","precompileTemplate","strictMode","scope","EuiPortal","EuiPopover"],"mappings":";;;;;;;;AAsBe,MAAMA,2BAA2BC,SAAU,CAAA;AAChDC,EAAAA,MAAQ,GAAqB,IAAK;AAClCC,EAAAA,MAAQ,GAAqB,IAAK;AAE1CC,EAAAA,YAAe,GAAAC,QAAA,CAAUC,OAAS,IAAA;IAChC,IAAI,CAACH,MAAM,GAAGG,OAAA;AACd,IAAA,IAAI,CAACH,MAAM,CAACI,qBAAqB,CAAC,eAAe,IAAI,CAACC,IAAI,CAACC,MAAM,CAAA;AACnE,GAAG,CAAA;EAEHC,YAAA,GAAgBJ,OAAS,IAAA;IACvB,IAAI,CAACJ,MAAM,GAAGI,OAAA;AACd,IAAA,IAAI,CAACE,IAAI,CAACG,SAAS,GAAGL,OAAA,CAAA;GACtB;EAEF,IAAIM,MAAAA,GAAkE;AACpE,IAAA,IAAI,IAAI,CAACJ,IAAI,CAACC,MAAM,EAAE;MACpB,OAAO;AACLI,QAAAA,OAAA,EAAS,IAAI,CAACL,IAAI,CAACC,MAAM;AACzBK,QAAAA,QAAU,EAAA;OACZ;AACF;AAEA,IAAA;AACF;AAEAC,EAAAA,WAAcA,GAAA;IACZ,KAAK,CAACA,WAAA,EAAA;AAEN,IAAA,IAAI,IAAI,CAACP,IAAI,CAACC,MAAM,IAAI,IAAI,CAACD,IAAI,CAACC,MAAM,CAACO,UAAU,EAAE;MACnD,IAAI,IAAI,CAACd,MAAM,EAAE;AACf,QAAA,IAAI,CAACA,MAAM,CAACK,qBAAqB,CAAC,eAAe,IAAI,CAACC,IAAI,CAACC,MAAM,CAAA;AACnE;AACF;AACA,IAAA,IAAI,CAACD,IAAI,CAACS,iBAAiB,IAAA;AAC7B;AAEA,EAAA;IAAAC,oBAAA,CAAAC,kBAAA,CA6BA,4wBAAA,EAAA;MAAAC,UAAA,EAAA,IAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,SAAA;AAAAC,oBAAAA;AAAA,OAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;;;"}
1
+ {"version":3,"file":"eui-wrapping-popover.js","sources":["../../src/components/eui-wrapping-popover.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\n\nimport { modifier } from 'ember-modifier';\n\nimport EuiPopover from './eui-popover.gts';\nimport EuiPortal from './eui-portal.gts';\n\nimport type { EuiPopoverSignature } from './eui-popover.gts';\n\nexport interface EuiWrappingPopoverSignature {\n Element: EuiPopoverSignature['Element'];\n Args: EuiPopoverSignature['Args'] & {\n button?: HTMLElement;\n onWrappingDestroy?: () => void;\n portalRef?: (ref: HTMLElement) => void;\n popoverPortalRef?: (ref: HTMLElement) => void;\n };\n Blocks: {\n default: [];\n };\n}\n\nexport default class EuiWrappingPopover extends Component<EuiWrappingPopoverSignature> {\n private portal: HTMLElement | null = null;\n private anchor: HTMLElement | null = null;\n\n setAnchorRef = modifier((element: HTMLElement) => {\n this.anchor = element;\n this.anchor.insertAdjacentElement('beforebegin', this.args.button!);\n });\n\n setPortalRef = (element: HTMLElement) => {\n this.portal = element;\n this.args.portalRef?.(element);\n };\n\n get insert(): { sibling: HTMLElement; position: 'after' } | undefined {\n if (this.args.button) {\n return {\n sibling: this.args.button,\n position: 'after'\n };\n }\n\n return;\n }\n\n willDestroy() {\n super.willDestroy();\n\n if (this.args.button && this.args.button.parentNode) {\n if (this.portal) {\n this.portal.insertAdjacentElement('beforebegin', this.args.button);\n }\n }\n this.args.onWrappingDestroy?.();\n }\n\n <template>\n <EuiPortal @portalRef={{this.setPortalRef}} @insert={{this.insert}}>\n <EuiPopover\n @closePopover={{@closePopover}}\n @isOpen={{@isOpen}}\n @anchorClassName={{@anchorClassName}}\n @portalRef={{@popoverPortalRef}}\n @anchorPosition={{@anchorPosition}}\n @attachToAnchor={{@attachToAnchor}}\n @container={{@container}}\n @display={{@display}}\n @hasArrow={{@hasArrow}}\n @initialFocus={{@initialFocus}}\n @ownFocus={{@ownFocus}}\n @panelClassName={{@panelClassName}}\n @panelPaddingSize={{@panelPaddingSize}}\n @panelStyle={{@panelStyle}}\n @panelRef={{@panelRef}}\n @popoverRef={{@popoverRef}}\n ...attributes\n >\n <:button>\n <div {{this.setAnchorRef}} class=\"euiWrappingPopover__anchor\" />\n </:button>\n\n <:content>\n {{yield}}\n </:content>\n </EuiPopover>\n </EuiPortal>\n </template>\n}\n"],"names":["EuiWrappingPopover","Component","portal","anchor","setAnchorRef","modifier","element","insertAdjacentElement","args","button","setPortalRef","portalRef","insert","sibling","position","willDestroy","parentNode","onWrappingDestroy","setComponentTemplate","precompileTemplate","strictMode","scope","EuiPortal","EuiPopover"],"mappings":";;;;;;;;AAuBe,MAAMA,2BAA2BC,SAAU,CAAA;AAChDC,EAAAA,MAAQ,GAAqB,IAAK;AAClCC,EAAAA,MAAQ,GAAqB,IAAK;AAE1CC,EAAAA,YAAe,GAAAC,QAAA,CAAUC,OAAS,IAAA;IAChC,IAAI,CAACH,MAAM,GAAGG,OAAA;AACd,IAAA,IAAI,CAACH,MAAM,CAACI,qBAAqB,CAAC,eAAe,IAAI,CAACC,IAAI,CAACC,MAAM,CAAA;AACnE,GAAG,CAAA;EAEHC,YAAA,GAAgBJ,OAAS,IAAA;IACvB,IAAI,CAACJ,MAAM,GAAGI,OAAA;AACd,IAAA,IAAI,CAACE,IAAI,CAACG,SAAS,GAAGL,OAAA,CAAA;GACtB;EAEF,IAAIM,MAAAA,GAAkE;AACpE,IAAA,IAAI,IAAI,CAACJ,IAAI,CAACC,MAAM,EAAE;MACpB,OAAO;AACLI,QAAAA,OAAA,EAAS,IAAI,CAACL,IAAI,CAACC,MAAM;AACzBK,QAAAA,QAAU,EAAA;OACZ;AACF;AAEA,IAAA;AACF;AAEAC,EAAAA,WAAcA,GAAA;IACZ,KAAK,CAACA,WAAA,EAAA;AAEN,IAAA,IAAI,IAAI,CAACP,IAAI,CAACC,MAAM,IAAI,IAAI,CAACD,IAAI,CAACC,MAAM,CAACO,UAAU,EAAE;MACnD,IAAI,IAAI,CAACd,MAAM,EAAE;AACf,QAAA,IAAI,CAACA,MAAM,CAACK,qBAAqB,CAAC,eAAe,IAAI,CAACC,IAAI,CAACC,MAAM,CAAA;AACnE;AACF;AACA,IAAA,IAAI,CAACD,IAAI,CAACS,iBAAiB,IAAA;AAC7B;AAEA,EAAA;IAAAC,oBAAA,CAAAC,kBAAA,CA8BA,6yBAAA,EAAA;MAAAC,UAAA,EAAA,IAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,SAAA;AAAAC,oBAAAA;AAAA,OAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ember-eui/core",
3
- "version": "12.0.7",
3
+ "version": "12.0.8",
4
4
  "description": "Ember Components for Elastic UI",
5
5
  "keywords": [
6
6
  "ember-addon",