@agorapulse/ui-components 22.4.10 → 22.4.11

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.
@@ -362,7 +362,7 @@ function createFloatingOverlay() {
362
362
  backdropClass: '',
363
363
  panelClass: config?.panelClass ?? '',
364
364
  // No scroll strategy: `autoUpdate` owns the update cycle, and the CDK's default is a no-op.
365
- usePopover: false,
365
+ usePopover: config?.topLayer ?? false,
366
366
  });
367
367
  }
368
368
  function attachContent(content) {
@@ -1 +1 @@
1
- {"version":3,"file":"agorapulse-ui-components-floating.mjs","sources":["../../../libs/ui-components/floating/src/anchor.ts","../../../libs/ui-components/floating/src/rect.ts","../../../libs/ui-components/floating/src/placement.ts","../../../libs/ui-components/floating/src/arrow/arrow-geometry.ts","../../../libs/ui-components/floating/src/arrow/arrow-offset.ts","../../../libs/ui-components/floating/src/arrow/arrow-placement.ts","../../../libs/ui-components/floating/src/arrow/ap-arrow.middleware.ts","../../../libs/ui-components/floating/src/arrow/arrow-styles.ts","../../../libs/ui-components/floating/src/floating-overlay.helper.ts","../../../libs/ui-components/floating/src/agorapulse-ui-components-floating.ts"],"sourcesContent":["import { FloatingPlacement } from './placement';\nimport { FloatingRect } from './rect';\n\n/** What the panel connects to. */\nexport type FloatingAnchorMode = 'trigger' | 'pointer' | 'pointer-free';\n\n/**\n * The placement derived when `placement` is unset. Reads the **configured** anchor mode, not the\n * resolved one: a keyboard opening falls back to the trigger, and if the alignment followed, the\n * component would change shape between mouse and keyboard.\n */\nexport function defaultPlacementFor(anchor: FloatingAnchorMode): FloatingPlacement {\n return anchor === 'trigger' ? 'bottom-start' : 'bottom';\n}\n\n/**\n * `'pointer'` is a hybrid whose zero dimension is the **cross-axis** one; a lateral panel built\n * from a fully point-like anchor would sit inside its own trigger. `'pointer-free'` is the point\n * itself. Both fall back to the trigger when there is no click.\n *\n * @param vertical The opening axis. Invariant under the flip, which only swaps the main axis.\n */\nexport function resolveAnchorRect(\n anchor: FloatingAnchorMode,\n triggerRect: FloatingRect,\n vertical: boolean,\n clickPoint?: { x: number; y: number }\n): FloatingRect {\n if (anchor === 'trigger' || !clickPoint) {\n return triggerRect;\n }\n\n if (anchor === 'pointer-free') {\n return { x: clickPoint.x, y: clickPoint.y, width: 0, height: 0 };\n }\n\n return vertical\n ? { x: clickPoint.x, y: triggerRect.y, width: 0, height: triggerRect.height }\n : { x: triggerRect.x, y: clickPoint.y, width: triggerRect.width, height: 0 };\n}\n\n/**\n * A keyboard-synthesised click carries `detail: 0` and `clientX: 0`, which without this guard puts\n * the pointer anchor in the screen's top-left corner.\n * Only a `click` is checked, because `detail` counts clicks and is 0 on a hover too.\n */\nexport function clickPointOf(event?: MouseEvent): { x: number; y: number } | undefined {\n if (!event || (event.type === 'click' && event.detail === 0)) {\n return undefined;\n }\n\n return { x: event.clientX, y: event.clientY };\n}\n\n/** A point expressed as a proportion of the trigger, on each axis. */\nexport interface ClickRatio {\n x: number;\n y: number;\n}\n\n/**\n * A ratio names a place on the trigger where a viewport coordinate names a place in the window,\n * which is what makes a pointer anchor survive scrolling, resizing and shifting. `undefined` for a\n * trigger with no area, so the anchor falls back to the element rather than divide by zero.\n */\nexport function resolveClickRatio(triggerRect: FloatingRect, clickPoint?: { x: number; y: number }): ClickRatio | undefined {\n if (!clickPoint || triggerRect.width <= 0 || triggerRect.height <= 0) {\n return undefined;\n }\n\n return {\n x: (clickPoint.x - triggerRect.x) / triggerRect.width,\n y: (clickPoint.y - triggerRect.y) / triggerRect.height,\n };\n}\n\n/** The inverse: the viewport point this ratio names within a **fresh** trigger rect. */\nexport function pointFromRatio(triggerRect: FloatingRect, ratio?: ClickRatio): { x: number; y: number } | undefined {\n if (!ratio) {\n return undefined;\n }\n\n return {\n x: triggerRect.x + ratio.x * triggerRect.width,\n y: triggerRect.y + ratio.y * triggerRect.height,\n };\n}\n","/** A minimal rect — neither `DOMRect` nor any DOM dependency, so the pure units stay pure. */\nexport interface FloatingRect {\n x: number;\n y: number;\n width: number;\n height: number;\n}\n\n/**\n * Whole pixels, to match the panel's rounded translate and to stop the hiding test flickering on\n * sub-pixel noise.\n */\nexport function roundRect(rect: FloatingRect): FloatingRect {\n return {\n x: Math.round(rect.x),\n y: Math.round(rect.y),\n width: Math.round(rect.width),\n height: Math.round(rect.height),\n };\n}\n\nexport function overlaps(a: FloatingRect, b: FloatingRect): boolean {\n return a.x < b.x + b.width && b.x < a.x + a.width && a.y < b.y + b.height && b.y < a.y + a.height;\n}\n","import { Placement, Side } from '@floating-ui/dom';\n\n/**\n * The twelve placements, aliased from Floating UI rather than redeclared. The trade-off: this puts\n * `@floating-ui/dom` in our **public** type surface, so its next major would move our types too.\n *\n * There is no `'auto'`; an unset placement is derived by `defaultPlacementFor`.\n */\nexport type FloatingPlacement = Placement;\n\n/** The four opening sides. Floating UI's `Side`, for the same reason. */\nexport type FloatingSide = Side;\n\nexport function sideOf(placement: FloatingPlacement): FloatingSide {\n return placement.split('-')[0] as FloatingSide;\n}\n\nexport function isVertical(placement: FloatingPlacement): boolean {\n const side = sideOf(placement);\n return side === 'top' || side === 'bottom';\n}\n","/**\n * The arrow drawing's dimensions, shared by the offset computation, the CSS insets and the\n * stylesheet. The mask's `path` in `_floating-arrow.scss` encodes them too and cannot follow a\n * variable, so changing either number here means redrawing that SVG.\n */\nexport const ARROW_WIDTH = 16;\nexport const ARROW_HEIGHT = 8;\n","import { FloatingSide, isVertical } from '../placement';\nimport { FloatingRect } from '../rect';\nimport { ARROW_WIDTH } from './arrow-geometry';\n\nexport interface ArrowOffsetInput {\n /** The side of the panel the arrow sits on — the **resolved** side, not the wanted one. */\n side: FloatingSide;\n anchorRect: FloatingRect;\n floatingRect: FloatingRect;\n /** `'anchor'` aims at the anchor ∩ panel intersection's centre, `'pointer'` at the click. */\n targetMode: 'anchor' | 'pointer';\n clickPoint?: { x: number; y: number };\n}\n\nexport interface ArrowOffsetResult {\n /** The arrow's offset from the panel's start edge, along the cross axis. */\n offset: number;\n clamped: boolean;\n /** The click fell outside the panel, so the intersection centre was used instead. */\n fellBack: boolean;\n /** The panel is too narrow: the clamp range inverts and the arrow is centred outright. */\n centered: boolean;\n}\n\n/** The surface's own corner radius, which the tip must not encroach on. */\nconst RADIUS = 4;\n\n/**\n * Three rules, in order:\n *\n * 1. Aim at the centre of the **anchor ∩ panel intersection**, never the anchor's own centre —\n * `apArrow` documents why this diverges from Floating UI.\n * 2. In `'pointer'` mode, aim at the click, falling back to rule 1 — discontinuously, as the\n * plates specify — when the click lands outside the panel.\n * 3. Clamp to leave the corner radius clear. Below `arrow + 2 × radius` = 24px the range inverts,\n * and the arrow is centred outright.\n *\n * The flags say which rule applied, so the generated plate cases can assert the path taken.\n */\nexport function resolveArrowOffset(input: ArrowOffsetInput): ArrowOffsetResult {\n const vertical = isVertical(input.side);\n const panel = input.floatingRect;\n const anchor = input.anchorRect;\n\n const panelStart = vertical ? panel.x : panel.y;\n const panelEnd = panelStart + (vertical ? panel.width : panel.height);\n const size = vertical ? panel.width : panel.height;\n const anchorStart = vertical ? anchor.x : anchor.y;\n const anchorEnd = anchorStart + (vertical ? anchor.width : anchor.height);\n const click = input.clickPoint ? (vertical ? input.clickPoint.x : input.clickPoint.y) : undefined;\n\n const aimsAtPointer = input.targetMode === 'pointer' && click !== undefined && click >= panelStart && click <= panelEnd;\n\n let target: number;\n let fellBack = false;\n if (aimsAtPointer && click !== undefined) {\n target = click;\n } else {\n fellBack = input.targetMode === 'pointer';\n const from = Math.max(panelStart, anchorStart);\n const to = Math.min(panelEnd, anchorEnd);\n target = to >= from ? (from + to) / 2 : (panelStart + panelEnd) / 2;\n }\n\n const raw = target - panelStart - ARROW_WIDTH / 2;\n const low = RADIUS;\n const high = size - ARROW_WIDTH - RADIUS;\n\n if (high < low) {\n return { offset: (size - ARROW_WIDTH) / 2, clamped: false, fellBack, centered: true };\n }\n\n const offset = Math.max(low, Math.min(high, raw));\n return { offset, clamped: Math.abs(offset - raw) > 0.5, fellBack, centered: false };\n}\n","import { FloatingPlacement, FloatingSide, sideOf } from '../placement';\nimport { ARROW_HEIGHT, ARROW_WIDTH } from './arrow-geometry';\n\nconst OPPOSITE: Record<FloatingSide, FloatingSide> = {\n top: 'bottom',\n bottom: 'top',\n left: 'right',\n right: 'left',\n};\n\n/**\n * The panel edge an arrow sits on: a panel placed `bottom` hangs below its anchor, so its tip is on\n * its top edge. Give it the **resolved** placement, or a flipped panel grows its arrow away.\n */\nexport function arrowSideFor(placement: FloatingPlacement): FloatingSide {\n return OPPOSITE[sideOf(placement)];\n}\n\n/** Ready-to-use CSS values, `'auto'` for the sides that do not apply. */\nexport interface ArrowPlacement {\n top: string;\n right: string;\n bottom: string;\n left: string;\n rotate: string;\n}\n\n/** One pixel of overlap, or a sub-pixel seam opens at the joint. */\nconst OVERLAP = 1;\n\n/** How far it stands out on the main axis, measured from the panel's edge. */\nconst MAIN_INSET = ARROW_HEIGHT - OVERLAP;\n\n/**\n * The same laterally. A ±90° rotation turns about the box's centre, so the unrotated box is pushed\n * out by half its width less the half height it gains back, for the footprint to clear by `MAIN_INSET`.\n */\nconst SIDE_INSET = ARROW_WIDTH / 2 + ARROW_HEIGHT / 2 - OVERLAP;\n\n/** Compensation for that same rotation centre, on the cross axis. */\nconst CROSS_SHIFT = (ARROW_WIDTH - ARROW_HEIGHT) / 2;\n\n/**\n * The insets and rotation `_floating-arrow.scss` reads off the pane. The rotation-centre\n * compensation lives here rather than in the stylesheet, where it could not be tested.\n *\n * @param side The panel edge the arrow sits on — the **resolved** side, not the wanted one.\n * @param offset The offset from the panel's start edge, along the cross axis.\n */\nexport function resolveArrowPlacement(side: FloatingSide, offset: number): ArrowPlacement {\n const auto = 'auto';\n\n if (side === 'top') {\n return { top: `${-MAIN_INSET}px`, right: auto, bottom: auto, left: `${offset}px`, rotate: '0deg' };\n }\n\n if (side === 'bottom') {\n return { top: auto, right: auto, bottom: `${-MAIN_INSET}px`, left: `${offset}px`, rotate: '180deg' };\n }\n\n const cross = `${offset + CROSS_SHIFT}px`;\n\n return side === 'left'\n ? { top: cross, right: auto, bottom: auto, left: `${-SIDE_INSET}px`, rotate: '-90deg' }\n : { top: cross, right: `${-SIDE_INSET}px`, bottom: auto, left: auto, rotate: '90deg' };\n}\n","import { Middleware, MiddlewareState } from '@floating-ui/dom';\nimport { ClickRatio, FloatingAnchorMode } from '../anchor';\nimport { FloatingSide } from '../placement';\nimport { FloatingRect, overlaps, roundRect } from '../rect';\nimport { resolveArrowOffset } from './arrow-offset';\nimport { arrowSideFor } from './arrow-placement';\n\nexport interface ApArrowOptions {\n /** What the tip aims at — see {@link resolveArrowOffset}. */\n targetMode: 'anchor' | 'pointer';\n /** The configured anchor mode. Decides how the click is recovered from the reference rect. */\n anchorMode: FloatingAnchorMode;\n /** The clicked point as a proportion of the trigger. Absent on a keyboard opening. */\n clickRatio?: ClickRatio;\n}\n\n/** What the middleware leaves in `middlewareData.apArrow`. */\nexport interface ApArrowData {\n /** The arrow's offset from the panel's start edge, along the cross axis. */\n offset: number;\n /** The side of the panel the arrow sits on — read from the **resolved** placement. */\n side: FloatingSide;\n /** The panel covers its **anchor** — in the POI mode the trigger may be covered on purpose. */\n hidden: boolean;\n}\n\nexport const AP_ARROW = 'apArrow';\n\n/**\n * Replaces Floating UI's `arrow`, which aims at the centre of the *reference*: on a 280px trigger\n * with a 100px panel that centre is out of reach and the tip clamps to a corner at 80, where the\n * intersection's centre is 42 (plate 22). {@link resolveArrowOffset} holds the rule.\n *\n * Must run last, after `shift`, since it reads the panel's final position.\n */\nexport function apArrow(options: ApArrowOptions): Middleware {\n return {\n name: AP_ARROW,\n options,\n fn(state: MiddlewareState) {\n // Both rects come from Floating UI, in one space. Measuring the pane here would not.\n const anchorRect = roundRect(state.rects.reference);\n const floatingRect = roundRect({\n x: state.x,\n y: state.y,\n width: state.rects.floating.width,\n height: state.rects.floating.height,\n });\n\n const { offset } = resolveArrowOffset({\n side: arrowSideFor(state.placement),\n anchorRect,\n floatingRect,\n targetMode: options.targetMode,\n clickPoint: clickPointIn(anchorRect, options),\n });\n\n const data: ApArrowData = {\n offset,\n side: arrowSideFor(state.placement),\n hidden: overlaps(floatingRect, anchorRect),\n };\n return { data };\n },\n };\n}\n\n/**\n * In the pointer modes the reference **is** the click, so its origin is the point. Its coordinate\n * on the main axis is the trigger's and goes unread: the offset only ever reads the cross axis.\n */\nfunction clickPointIn(anchorRect: FloatingRect, { anchorMode, clickRatio }: ApArrowOptions): { x: number; y: number } | undefined {\n if (!clickRatio) {\n return undefined;\n }\n if (anchorMode !== 'trigger') {\n return { x: anchorRect.x, y: anchorRect.y };\n }\n return {\n x: anchorRect.x + clickRatio.x * anchorRect.width,\n y: anchorRect.y + clickRatio.y * anchorRect.height,\n };\n}\n","import { ApArrowData } from './ap-arrow.middleware';\nimport { ARROW_HEIGHT, ARROW_WIDTH } from './arrow-geometry';\nimport { resolveArrowPlacement } from './arrow-placement';\n\n/**\n * Set on the pane when an arrow is asked for. The drawing is global CSS because the pane belongs to\n * no component's DOM, so no encapsulated stylesheet can reach it.\n */\nexport const ARROW_CLASS = 'ap-floating-arrow';\n\n/**\n * Written on the first computation only: `getComputedStyle` forces a style recalculation, and the\n * update cycle runs on every scroll of every scrollable ancestor.\n *\n * **A contract for panels that ask for an arrow**: the pane's first element child must be the\n * styled surface, not a wrapper around it. The arrow's colour is lifted off that element, and the\n * stylesheet neutralises its shadow — a wrapper yields a transparent tip and two shadows at the\n * joint.\n *\n * Only CSS knows which element carries a background, so this is checked in a browser, never in a\n * unit test.\n *\n * @returns whether the surface was there to read, so the caller can retry on the next pass.\n */\nexport function writeArrowInvariants(pane: HTMLElement): boolean {\n pane.style.setProperty('--ap-floating-arrow-width', `${ARROW_WIDTH}px`);\n pane.style.setProperty('--ap-floating-arrow-height', `${ARROW_HEIGHT}px`);\n\n const surface = pane.firstElementChild;\n if (!surface) {\n return false;\n }\n\n pane.style.setProperty('--ap-arrow-background', getComputedStyle(surface).backgroundColor);\n return true;\n}\n\n/** The half that moves with the panel. */\nexport function writeArrowStyles(pane: HTMLElement, arrow: ApArrowData): void {\n const placement = resolveArrowPlacement(arrow.side, arrow.offset);\n\n pane.style.setProperty('--ap-arrow-top', placement.top);\n pane.style.setProperty('--ap-arrow-right', placement.right);\n pane.style.setProperty('--ap-arrow-bottom', placement.bottom);\n pane.style.setProperty('--ap-arrow-left', placement.left);\n pane.style.setProperty('--ap-arrow-rotate', placement.rotate);\n pane.style.setProperty('--ap-arrow-visibility', arrow.hidden ? 'hidden' : 'visible');\n}\n","import { Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { ComponentPortal, TemplatePortal } from '@angular/cdk/portal';\nimport { ComponentRef, DestroyRef, ElementRef, inject, signal, TemplateRef, Type, ViewContainerRef } from '@angular/core';\nimport { autoUpdate, computePosition, flip, offset, shift, size, VirtualElement } from '@floating-ui/dom';\nimport { filter } from 'rxjs/operators';\nimport {\n clickPointOf,\n ClickRatio,\n defaultPlacementFor,\n FloatingAnchorMode,\n pointFromRatio,\n resolveAnchorRect,\n resolveClickRatio,\n} from './anchor';\nimport { AP_ARROW, apArrow, ApArrowData } from './arrow/ap-arrow.middleware';\nimport { ARROW_HEIGHT } from './arrow/arrow-geometry';\nimport { ARROW_CLASS, writeArrowInvariants, writeArrowStyles } from './arrow/arrow-styles';\nimport { FloatingPlacement, isVertical } from './placement';\nimport { FloatingRect, roundRect } from './rect';\n\nexport interface FloatingOverlayConfig {\n /** Unset means derived from `anchor`. There is no `'auto'` value. */\n placement?: FloatingPlacement;\n anchor?: FloatingAnchorMode;\n arrow?: boolean;\n arrowTarget?: 'anchor' | 'pointer';\n showBackdrop?: boolean;\n panelClass?: string | string[];\n /** Fallback for the two handlers below. */\n onClose?: () => void;\n /** Escape, which always closes. Unset means `onClose`. */\n onEscape?: () => void;\n /** Outside click. Unset means `onClose`. */\n onOutsideClick?: () => void;\n /**\n * Elements that carry their own toggle, so a click on them is not \"the outside\". Read on every\n * event, since the list may change while the floating is open.\n *\n * Without this, the CDK's capture-phase dispatcher closes before a secondary trigger sees the\n * click, that trigger reopens, and the toggle never closes again.\n */\n additionalTriggers?: () => readonly HTMLElement[];\n}\n\n/** The visual gap between anchor and panel. An arrow adds its own length: the tip must clear the edge. */\n/** Read by a surface that wants to fit: `max-height: var(--ap-floating-available-height)`. */\nexport const AVAILABLE_HEIGHT = '--ap-floating-available-height';\n\n/** Read by a surface that sizes to its content: `max-width: var(--ap-floating-available-width)`. */\nexport const AVAILABLE_WIDTH = '--ap-floating-available-width';\n\nconst GAP = 4;\n\nconst VIEWPORT_MARGIN = 8;\n\ninterface Measurable {\n getBoundingClientRect: () => { left: number; top: number; width: number; height: number };\n}\n\nfunction toRect(source: Measurable): FloatingRect {\n const rect = source.getBoundingClientRect();\n return roundRect({ x: rect.left, y: rect.top, width: rect.width, height: rect.height });\n}\n\ninterface AnchorState {\n target: HTMLElement;\n mode: FloatingAnchorMode;\n /** The opening axis. Invariant under the flip, which only swaps the main axis. */\n vertical: boolean;\n /** The click as a proportion of the trigger, so it survives scrolling, resizing and shifting. */\n ratio?: ClickRatio;\n}\n\nexport function createFloatingOverlay() {\n const elementRef = inject(ElementRef);\n const overlay = inject(Overlay);\n const viewContainerRef = inject(ViewContainerRef);\n\n let _overlayRef: OverlayRef | null = null;\n let stopAutoUpdate: (() => void) | null = null;\n let reposition: (() => void) | null = null;\n let anchorState: AnchorState | null = null;\n const isOpen = signal(false);\n\n inject(DestroyRef).onDestroy(() => close());\n\n /**\n * Opens the floating on a `TemplateRef`, attached as is, or on a component whose `ComponentRef`\n * is handed back, typed on the component, so the caller can set its inputs.\n *\n * The position keeps itself current, so inputs set after this returns need no refresh.\n */\n function open<T = unknown>(\n content: TemplateRef<unknown> | Type<T>,\n triggerElement?: HTMLElement,\n config?: FloatingOverlayConfig,\n event?: MouseEvent\n ): ComponentRef<T> | null {\n if (isOpen()) return null;\n\n const target = triggerElement ?? elementRef.nativeElement;\n const mode = config?.anchor ?? 'trigger';\n const placement = config?.placement ?? defaultPlacementFor(mode);\n\n anchorState = captureAnchor(target, mode, placement, event);\n\n disposeOverlay();\n _overlayRef = createOverlay(config);\n const pane = _overlayRef.overlayElement;\n // Floating UI's coordinates are viewport-relative; the CDK's `absolute` would misread them.\n pane.style.position = 'fixed';\n pane.style.left = '0';\n pane.style.top = '0';\n\n const panelRef = attachContent(content);\n isOpen.set(true);\n\n if (config?.arrow === true) {\n // On opening, so the pane carries the single silhouette's shadow before the first frame.\n pane.classList.add(ARROW_CLASS);\n }\n\n watchPosition(pane, placement, config);\n watchDismissal(target, config);\n\n return panelRef;\n }\n\n function captureAnchor(target: HTMLElement, mode: FloatingAnchorMode, placement: FloatingPlacement, event?: MouseEvent): AnchorState {\n return { target, mode, vertical: isVertical(placement), ratio: resolveClickRatio(toRect(target), clickPointOf(event)) };\n }\n\n /**\n * The reference **is** the anchor in all three modes, which is what lets the arrow read\n * `rects.reference` rather than rebuild it. `contextElement` is load-bearing: without it\n * `autoUpdate` cannot find the scrollable ancestors of an anchor that has no DOM node.\n */\n function toReference(state: AnchorState): HTMLElement | VirtualElement {\n if (state.mode === 'trigger' || !state.ratio) {\n return state.target;\n }\n\n return {\n contextElement: state.target,\n getBoundingClientRect: () => {\n const trigger = toRect(state.target);\n const rect = resolveAnchorRect(state.mode, trigger, state.vertical, pointFromRatio(trigger, state.ratio));\n return new DOMRect(rect.x, rect.y, rect.width, rect.height);\n },\n };\n }\n\n function createOverlay(config?: FloatingOverlayConfig): OverlayRef {\n return overlay.create({\n hasBackdrop: config?.showBackdrop ?? false,\n backdropClass: '',\n panelClass: config?.panelClass ?? '',\n // No scroll strategy: `autoUpdate` owns the update cycle, and the CDK's default is a no-op.\n usePopover: false,\n });\n }\n\n function attachContent<T>(content: TemplateRef<unknown> | Type<T>): ComponentRef<T> | null {\n if (!_overlayRef) return null;\n if (content instanceof TemplateRef) {\n _overlayRef.attach(new TemplatePortal(content, viewContainerRef));\n return null;\n }\n return _overlayRef.attach(new ComponentPortal(content, viewContainerRef));\n }\n\n /**\n * `autoUpdate` is the whole update cycle: scrollable ancestors of both boxes, the viewport,\n * both boxes' own resizing, and layout shifts. Nothing else here watches anything.\n */\n function watchPosition(pane: HTMLElement, placement: FloatingPlacement, config?: FloatingOverlayConfig): void {\n const state = anchorState;\n if (!state) return;\n const reference = toReference(state);\n\n const middleware = [\n offset(config?.arrow === true ? GAP + ARROW_HEIGHT : GAP),\n flip({ crossAxis: false, flipAlignment: false, padding: VIEWPORT_MARGIN }),\n shift({ padding: VIEWPORT_MARGIN }),\n // After flip and shift, so what it publishes is the room left on the side they settled on.\n size({\n padding: VIEWPORT_MARGIN,\n apply: ({ availableWidth, availableHeight }) => {\n pane.style.setProperty(AVAILABLE_WIDTH, `${Math.round(availableWidth)}px`);\n pane.style.setProperty(AVAILABLE_HEIGHT, `${Math.round(availableHeight)}px`);\n },\n }),\n ];\n if (config?.arrow === true) {\n middleware.push(apArrow({ targetMode: config.arrowTarget ?? 'anchor', anchorMode: state.mode, clickRatio: state.ratio }));\n }\n\n let invariantsWritten = false;\n\n reposition = () => {\n // A detached trigger measures as a zero rect at the viewport origin: keep the last position instead.\n if (!state.target.isConnected) return;\n void computePosition(reference, pane, { strategy: 'fixed', placement, middleware }).then(position => {\n // Whole pixels: a fractional translate blurs text on a non-retina screen.\n pane.style.transform = `translate(${Math.round(position.x)}px, ${Math.round(position.y)}px)`;\n const arrow: ApArrowData | undefined = position.middlewareData[AP_ARROW];\n if (arrow) {\n invariantsWritten = invariantsWritten || writeArrowInvariants(pane);\n writeArrowStyles(pane, arrow);\n }\n });\n };\n\n stopAutoUpdate = autoUpdate(reference, pane, reposition);\n }\n\n function watchDismissal(target: HTMLElement, config?: FloatingOverlayConfig): void {\n if (!_overlayRef) return;\n\n const closeHandler = config?.onClose ?? (() => close());\n const outsideHandler = config?.onOutsideClick ?? closeHandler;\n const escapeHandler = config?.onEscape ?? closeHandler;\n\n const ownsGesture = (node: Node): boolean =>\n target.contains(node) || (config?.additionalTriggers?.() ?? []).some(element => element.contains(node));\n\n // No `take(1)`: a handler may decline to close, and it must still hear the next gesture. Dispose ends both.\n _overlayRef\n .outsidePointerEvents()\n .pipe(filter(pointerEvent => !(pointerEvent.target instanceof Node && ownsGesture(pointerEvent.target))))\n .subscribe(() => outsideHandler());\n\n _overlayRef\n .keydownEvents()\n .pipe(filter(keyEvent => keyEvent.key === 'Escape'))\n .subscribe(() => escapeHandler());\n }\n\n /** The observers never outlive their overlay: they would reposition it after its destruction. */\n function disposeOverlay(): void {\n stopAutoUpdate?.();\n stopAutoUpdate = null;\n reposition = null;\n _overlayRef?.dispose();\n _overlayRef = null;\n }\n\n function close(): void {\n if (!isOpen()) return;\n\n anchorState = null;\n disposeOverlay();\n isOpen.set(false);\n }\n\n /** Recomputes now. For a caller that knows the geometry changed before any observer can see it. */\n function updatePosition(): void {\n reposition?.();\n }\n\n return {\n get overlayRef() {\n return _overlayRef;\n },\n isOpen: isOpen.asReadonly(),\n open,\n close,\n updatePosition,\n };\n}\n\nexport type FloatingOverlayInstance = ReturnType<typeof createFloatingOverlay>;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;AAMA;;;;AAIG;AACG,SAAU,mBAAmB,CAAC,MAA0B,EAAA;IAC1D,OAAO,MAAM,KAAK,SAAS,GAAG,cAAc,GAAG,QAAQ;AAC3D;AAEA;;;;;;AAMG;AACG,SAAU,iBAAiB,CAC7B,MAA0B,EAC1B,WAAyB,EACzB,QAAiB,EACjB,UAAqC,EAAA;AAErC,IAAA,IAAI,MAAM,KAAK,SAAS,IAAI,CAAC,UAAU,EAAE;AACrC,QAAA,OAAO,WAAW;IACtB;AAEA,IAAA,IAAI,MAAM,KAAK,cAAc,EAAE;QAC3B,OAAO,EAAE,CAAC,EAAE,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;IACpE;AAEA,IAAA,OAAO;UACD,EAAE,CAAC,EA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,CAAC,MAAM,cAAc,EAAE,CAAC;QAEtC;AACK,aAAA,aAAa;AACb,aAAA,IAAI,CAAC,MAAM,CAAC,QAAQ,IAAI,QAAQ,CAAC,GAAG,KAAK,QAAQ,CAAC;AAClD,aAAA,SAAS,CAAC,MAAM,aAAa,EAAE,CAAC;IACzC;;AAGA,IAAA,SAAS,cAAc,GAAA;QACnB,cAAc,IAAI;QAClB,cAAc,GAAG,IAAI;QACrB,UAAU,GAAG,IAAI;QACjB,WAAW,EAAE,OAAO,EAAE;QACtB,WAAW,GAAG,IAAI;IACtB;AAEA,IAAA,SAAS,KAAK,GAAA;QACV,IAAI,CAAC,MAAM,EAAE;YAAE;QAEf,WAAW,GAAG,IAAI;AAClB,QAAA,cAAc,EAAE;AAChB,QAAA,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC;IACrB;;AAGA,IAAA,SAAS,cAAc,GAAA;QACnB,UAAU,IAAI;IAClB;IAEA,OAAO;AACH,QAAA,IAAI,UAAU,GAAA;AACV,YAAA,OAAO,WAAW;QACtB,CAAC;AACD,QAAA,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE;QAC3B,IAAI;QACJ,KAAK;QACL,cAAc;KACjB;AACL;;AC7QA;;AAEG;;;;"}
1
+ {"version":3,"file":"agorapulse-ui-components-floating.mjs","sources":["../../../libs/ui-components/floating/src/anchor.ts","../../../libs/ui-components/floating/src/rect.ts","../../../libs/ui-components/floating/src/placement.ts","../../../libs/ui-components/floating/src/arrow/arrow-geometry.ts","../../../libs/ui-components/floating/src/arrow/arrow-offset.ts","../../../libs/ui-components/floating/src/arrow/arrow-placement.ts","../../../libs/ui-components/floating/src/arrow/ap-arrow.middleware.ts","../../../libs/ui-components/floating/src/arrow/arrow-styles.ts","../../../libs/ui-components/floating/src/floating-overlay.helper.ts","../../../libs/ui-components/floating/src/agorapulse-ui-components-floating.ts"],"sourcesContent":["import { FloatingPlacement } from './placement';\nimport { FloatingRect } from './rect';\n\n/** What the panel connects to. */\nexport type FloatingAnchorMode = 'trigger' | 'pointer' | 'pointer-free';\n\n/**\n * The placement derived when `placement` is unset. Reads the **configured** anchor mode, not the\n * resolved one: a keyboard opening falls back to the trigger, and if the alignment followed, the\n * component would change shape between mouse and keyboard.\n */\nexport function defaultPlacementFor(anchor: FloatingAnchorMode): FloatingPlacement {\n return anchor === 'trigger' ? 'bottom-start' : 'bottom';\n}\n\n/**\n * `'pointer'` is a hybrid whose zero dimension is the **cross-axis** one; a lateral panel built\n * from a fully point-like anchor would sit inside its own trigger. `'pointer-free'` is the point\n * itself. Both fall back to the trigger when there is no click.\n *\n * @param vertical The opening axis. Invariant under the flip, which only swaps the main axis.\n */\nexport function resolveAnchorRect(\n anchor: FloatingAnchorMode,\n triggerRect: FloatingRect,\n vertical: boolean,\n clickPoint?: { x: number; y: number }\n): FloatingRect {\n if (anchor === 'trigger' || !clickPoint) {\n return triggerRect;\n }\n\n if (anchor === 'pointer-free') {\n return { x: clickPoint.x, y: clickPoint.y, width: 0, height: 0 };\n }\n\n return vertical\n ? { x: clickPoint.x, y: triggerRect.y, width: 0, height: triggerRect.height }\n : { x: triggerRect.x, y: clickPoint.y, width: triggerRect.width, height: 0 };\n}\n\n/**\n * A keyboard-synthesised click carries `detail: 0` and `clientX: 0`, which without this guard puts\n * the pointer anchor in the screen's top-left corner.\n * Only a `click` is checked, because `detail` counts clicks and is 0 on a hover too.\n */\nexport function clickPointOf(event?: MouseEvent): { x: number; y: number } | undefined {\n if (!event || (event.type === 'click' && event.detail === 0)) {\n return undefined;\n }\n\n return { x: event.clientX, y: event.clientY };\n}\n\n/** A point expressed as a proportion of the trigger, on each axis. */\nexport interface ClickRatio {\n x: number;\n y: number;\n}\n\n/**\n * A ratio names a place on the trigger where a viewport coordinate names a place in the window,\n * which is what makes a pointer anchor survive scrolling, resizing and shifting. `undefined` for a\n * trigger with no area, so the anchor falls back to the element rather than divide by zero.\n */\nexport function resolveClickRatio(triggerRect: FloatingRect, clickPoint?: { x: number; y: number }): ClickRatio | undefined {\n if (!clickPoint || triggerRect.width <= 0 || triggerRect.height <= 0) {\n return undefined;\n }\n\n return {\n x: (clickPoint.x - triggerRect.x) / triggerRect.width,\n y: (clickPoint.y - triggerRect.y) / triggerRect.height,\n };\n}\n\n/** The inverse: the viewport point this ratio names within a **fresh** trigger rect. */\nexport function pointFromRatio(triggerRect: FloatingRect, ratio?: ClickRatio): { x: number; y: number } | undefined {\n if (!ratio) {\n return undefined;\n }\n\n return {\n x: triggerRect.x + ratio.x * triggerRect.width,\n y: triggerRect.y + ratio.y * triggerRect.height,\n };\n}\n","/** A minimal rect — neither `DOMRect` nor any DOM dependency, so the pure units stay pure. */\nexport interface FloatingRect {\n x: number;\n y: number;\n width: number;\n height: number;\n}\n\n/**\n * Whole pixels, to match the panel's rounded translate and to stop the hiding test flickering on\n * sub-pixel noise.\n */\nexport function roundRect(rect: FloatingRect): FloatingRect {\n return {\n x: Math.round(rect.x),\n y: Math.round(rect.y),\n width: Math.round(rect.width),\n height: Math.round(rect.height),\n };\n}\n\nexport function overlaps(a: FloatingRect, b: FloatingRect): boolean {\n return a.x < b.x + b.width && b.x < a.x + a.width && a.y < b.y + b.height && b.y < a.y + a.height;\n}\n","import { Placement, Side } from '@floating-ui/dom';\n\n/**\n * The twelve placements, aliased from Floating UI rather than redeclared. The trade-off: this puts\n * `@floating-ui/dom` in our **public** type surface, so its next major would move our types too.\n *\n * There is no `'auto'`; an unset placement is derived by `defaultPlacementFor`.\n */\nexport type FloatingPlacement = Placement;\n\n/** The four opening sides. Floating UI's `Side`, for the same reason. */\nexport type FloatingSide = Side;\n\nexport function sideOf(placement: FloatingPlacement): FloatingSide {\n return placement.split('-')[0] as FloatingSide;\n}\n\nexport function isVertical(placement: FloatingPlacement): boolean {\n const side = sideOf(placement);\n return side === 'top' || side === 'bottom';\n}\n","/**\n * The arrow drawing's dimensions, shared by the offset computation, the CSS insets and the\n * stylesheet. The mask's `path` in `_floating-arrow.scss` encodes them too and cannot follow a\n * variable, so changing either number here means redrawing that SVG.\n */\nexport const ARROW_WIDTH = 16;\nexport const ARROW_HEIGHT = 8;\n","import { FloatingSide, isVertical } from '../placement';\nimport { FloatingRect } from '../rect';\nimport { ARROW_WIDTH } from './arrow-geometry';\n\nexport interface ArrowOffsetInput {\n /** The side of the panel the arrow sits on — the **resolved** side, not the wanted one. */\n side: FloatingSide;\n anchorRect: FloatingRect;\n floatingRect: FloatingRect;\n /** `'anchor'` aims at the anchor ∩ panel intersection's centre, `'pointer'` at the click. */\n targetMode: 'anchor' | 'pointer';\n clickPoint?: { x: number; y: number };\n}\n\nexport interface ArrowOffsetResult {\n /** The arrow's offset from the panel's start edge, along the cross axis. */\n offset: number;\n clamped: boolean;\n /** The click fell outside the panel, so the intersection centre was used instead. */\n fellBack: boolean;\n /** The panel is too narrow: the clamp range inverts and the arrow is centred outright. */\n centered: boolean;\n}\n\n/** The surface's own corner radius, which the tip must not encroach on. */\nconst RADIUS = 4;\n\n/**\n * Three rules, in order:\n *\n * 1. Aim at the centre of the **anchor ∩ panel intersection**, never the anchor's own centre —\n * `apArrow` documents why this diverges from Floating UI.\n * 2. In `'pointer'` mode, aim at the click, falling back to rule 1 — discontinuously, as the\n * plates specify — when the click lands outside the panel.\n * 3. Clamp to leave the corner radius clear. Below `arrow + 2 × radius` = 24px the range inverts,\n * and the arrow is centred outright.\n *\n * The flags say which rule applied, so the generated plate cases can assert the path taken.\n */\nexport function resolveArrowOffset(input: ArrowOffsetInput): ArrowOffsetResult {\n const vertical = isVertical(input.side);\n const panel = input.floatingRect;\n const anchor = input.anchorRect;\n\n const panelStart = vertical ? panel.x : panel.y;\n const panelEnd = panelStart + (vertical ? panel.width : panel.height);\n const size = vertical ? panel.width : panel.height;\n const anchorStart = vertical ? anchor.x : anchor.y;\n const anchorEnd = anchorStart + (vertical ? anchor.width : anchor.height);\n const click = input.clickPoint ? (vertical ? input.clickPoint.x : input.clickPoint.y) : undefined;\n\n const aimsAtPointer = input.targetMode === 'pointer' && click !== undefined && click >= panelStart && click <= panelEnd;\n\n let target: number;\n let fellBack = false;\n if (aimsAtPointer && click !== undefined) {\n target = click;\n } else {\n fellBack = input.targetMode === 'pointer';\n const from = Math.max(panelStart, anchorStart);\n const to = Math.min(panelEnd, anchorEnd);\n target = to >= from ? (from + to) / 2 : (panelStart + panelEnd) / 2;\n }\n\n const raw = target - panelStart - ARROW_WIDTH / 2;\n const low = RADIUS;\n const high = size - ARROW_WIDTH - RADIUS;\n\n if (high < low) {\n return { offset: (size - ARROW_WIDTH) / 2, clamped: false, fellBack, centered: true };\n }\n\n const offset = Math.max(low, Math.min(high, raw));\n return { offset, clamped: Math.abs(offset - raw) > 0.5, fellBack, centered: false };\n}\n","import { FloatingPlacement, FloatingSide, sideOf } from '../placement';\nimport { ARROW_HEIGHT, ARROW_WIDTH } from './arrow-geometry';\n\nconst OPPOSITE: Record<FloatingSide, FloatingSide> = {\n top: 'bottom',\n bottom: 'top',\n left: 'right',\n right: 'left',\n};\n\n/**\n * The panel edge an arrow sits on: a panel placed `bottom` hangs below its anchor, so its tip is on\n * its top edge. Give it the **resolved** placement, or a flipped panel grows its arrow away.\n */\nexport function arrowSideFor(placement: FloatingPlacement): FloatingSide {\n return OPPOSITE[sideOf(placement)];\n}\n\n/** Ready-to-use CSS values, `'auto'` for the sides that do not apply. */\nexport interface ArrowPlacement {\n top: string;\n right: string;\n bottom: string;\n left: string;\n rotate: string;\n}\n\n/** One pixel of overlap, or a sub-pixel seam opens at the joint. */\nconst OVERLAP = 1;\n\n/** How far it stands out on the main axis, measured from the panel's edge. */\nconst MAIN_INSET = ARROW_HEIGHT - OVERLAP;\n\n/**\n * The same laterally. A ±90° rotation turns about the box's centre, so the unrotated box is pushed\n * out by half its width less the half height it gains back, for the footprint to clear by `MAIN_INSET`.\n */\nconst SIDE_INSET = ARROW_WIDTH / 2 + ARROW_HEIGHT / 2 - OVERLAP;\n\n/** Compensation for that same rotation centre, on the cross axis. */\nconst CROSS_SHIFT = (ARROW_WIDTH - ARROW_HEIGHT) / 2;\n\n/**\n * The insets and rotation `_floating-arrow.scss` reads off the pane. The rotation-centre\n * compensation lives here rather than in the stylesheet, where it could not be tested.\n *\n * @param side The panel edge the arrow sits on — the **resolved** side, not the wanted one.\n * @param offset The offset from the panel's start edge, along the cross axis.\n */\nexport function resolveArrowPlacement(side: FloatingSide, offset: number): ArrowPlacement {\n const auto = 'auto';\n\n if (side === 'top') {\n return { top: `${-MAIN_INSET}px`, right: auto, bottom: auto, left: `${offset}px`, rotate: '0deg' };\n }\n\n if (side === 'bottom') {\n return { top: auto, right: auto, bottom: `${-MAIN_INSET}px`, left: `${offset}px`, rotate: '180deg' };\n }\n\n const cross = `${offset + CROSS_SHIFT}px`;\n\n return side === 'left'\n ? { top: cross, right: auto, bottom: auto, left: `${-SIDE_INSET}px`, rotate: '-90deg' }\n : { top: cross, right: `${-SIDE_INSET}px`, bottom: auto, left: auto, rotate: '90deg' };\n}\n","import { Middleware, MiddlewareState } from '@floating-ui/dom';\nimport { ClickRatio, FloatingAnchorMode } from '../anchor';\nimport { FloatingSide } from '../placement';\nimport { FloatingRect, overlaps, roundRect } from '../rect';\nimport { resolveArrowOffset } from './arrow-offset';\nimport { arrowSideFor } from './arrow-placement';\n\nexport interface ApArrowOptions {\n /** What the tip aims at — see {@link resolveArrowOffset}. */\n targetMode: 'anchor' | 'pointer';\n /** The configured anchor mode. Decides how the click is recovered from the reference rect. */\n anchorMode: FloatingAnchorMode;\n /** The clicked point as a proportion of the trigger. Absent on a keyboard opening. */\n clickRatio?: ClickRatio;\n}\n\n/** What the middleware leaves in `middlewareData.apArrow`. */\nexport interface ApArrowData {\n /** The arrow's offset from the panel's start edge, along the cross axis. */\n offset: number;\n /** The side of the panel the arrow sits on — read from the **resolved** placement. */\n side: FloatingSide;\n /** The panel covers its **anchor** — in the POI mode the trigger may be covered on purpose. */\n hidden: boolean;\n}\n\nexport const AP_ARROW = 'apArrow';\n\n/**\n * Replaces Floating UI's `arrow`, which aims at the centre of the *reference*: on a 280px trigger\n * with a 100px panel that centre is out of reach and the tip clamps to a corner at 80, where the\n * intersection's centre is 42 (plate 22). {@link resolveArrowOffset} holds the rule.\n *\n * Must run last, after `shift`, since it reads the panel's final position.\n */\nexport function apArrow(options: ApArrowOptions): Middleware {\n return {\n name: AP_ARROW,\n options,\n fn(state: MiddlewareState) {\n // Both rects come from Floating UI, in one space. Measuring the pane here would not.\n const anchorRect = roundRect(state.rects.reference);\n const floatingRect = roundRect({\n x: state.x,\n y: state.y,\n width: state.rects.floating.width,\n height: state.rects.floating.height,\n });\n\n const { offset } = resolveArrowOffset({\n side: arrowSideFor(state.placement),\n anchorRect,\n floatingRect,\n targetMode: options.targetMode,\n clickPoint: clickPointIn(anchorRect, options),\n });\n\n const data: ApArrowData = {\n offset,\n side: arrowSideFor(state.placement),\n hidden: overlaps(floatingRect, anchorRect),\n };\n return { data };\n },\n };\n}\n\n/**\n * In the pointer modes the reference **is** the click, so its origin is the point. Its coordinate\n * on the main axis is the trigger's and goes unread: the offset only ever reads the cross axis.\n */\nfunction clickPointIn(anchorRect: FloatingRect, { anchorMode, clickRatio }: ApArrowOptions): { x: number; y: number } | undefined {\n if (!clickRatio) {\n return undefined;\n }\n if (anchorMode !== 'trigger') {\n return { x: anchorRect.x, y: anchorRect.y };\n }\n return {\n x: anchorRect.x + clickRatio.x * anchorRect.width,\n y: anchorRect.y + clickRatio.y * anchorRect.height,\n };\n}\n","import { ApArrowData } from './ap-arrow.middleware';\nimport { ARROW_HEIGHT, ARROW_WIDTH } from './arrow-geometry';\nimport { resolveArrowPlacement } from './arrow-placement';\n\n/**\n * Set on the pane when an arrow is asked for. The drawing is global CSS because the pane belongs to\n * no component's DOM, so no encapsulated stylesheet can reach it.\n */\nexport const ARROW_CLASS = 'ap-floating-arrow';\n\n/**\n * Written on the first computation only: `getComputedStyle` forces a style recalculation, and the\n * update cycle runs on every scroll of every scrollable ancestor.\n *\n * **A contract for panels that ask for an arrow**: the pane's first element child must be the\n * styled surface, not a wrapper around it. The arrow's colour is lifted off that element, and the\n * stylesheet neutralises its shadow — a wrapper yields a transparent tip and two shadows at the\n * joint.\n *\n * Only CSS knows which element carries a background, so this is checked in a browser, never in a\n * unit test.\n *\n * @returns whether the surface was there to read, so the caller can retry on the next pass.\n */\nexport function writeArrowInvariants(pane: HTMLElement): boolean {\n pane.style.setProperty('--ap-floating-arrow-width', `${ARROW_WIDTH}px`);\n pane.style.setProperty('--ap-floating-arrow-height', `${ARROW_HEIGHT}px`);\n\n const surface = pane.firstElementChild;\n if (!surface) {\n return false;\n }\n\n pane.style.setProperty('--ap-arrow-background', getComputedStyle(surface).backgroundColor);\n return true;\n}\n\n/** The half that moves with the panel. */\nexport function writeArrowStyles(pane: HTMLElement, arrow: ApArrowData): void {\n const placement = resolveArrowPlacement(arrow.side, arrow.offset);\n\n pane.style.setProperty('--ap-arrow-top', placement.top);\n pane.style.setProperty('--ap-arrow-right', placement.right);\n pane.style.setProperty('--ap-arrow-bottom', placement.bottom);\n pane.style.setProperty('--ap-arrow-left', placement.left);\n pane.style.setProperty('--ap-arrow-rotate', placement.rotate);\n pane.style.setProperty('--ap-arrow-visibility', arrow.hidden ? 'hidden' : 'visible');\n}\n","import { Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { ComponentPortal, TemplatePortal } from '@angular/cdk/portal';\nimport { ComponentRef, DestroyRef, ElementRef, inject, signal, TemplateRef, Type, ViewContainerRef } from '@angular/core';\nimport { autoUpdate, computePosition, flip, offset, shift, size, VirtualElement } from '@floating-ui/dom';\nimport { filter } from 'rxjs/operators';\nimport {\n clickPointOf,\n ClickRatio,\n defaultPlacementFor,\n FloatingAnchorMode,\n pointFromRatio,\n resolveAnchorRect,\n resolveClickRatio,\n} from './anchor';\nimport { AP_ARROW, apArrow, ApArrowData } from './arrow/ap-arrow.middleware';\nimport { ARROW_HEIGHT } from './arrow/arrow-geometry';\nimport { ARROW_CLASS, writeArrowInvariants, writeArrowStyles } from './arrow/arrow-styles';\nimport { FloatingPlacement, isVertical } from './placement';\nimport { FloatingRect, roundRect } from './rect';\n\nexport interface FloatingOverlayConfig {\n /** Unset means derived from `anchor`. There is no `'auto'` value. */\n placement?: FloatingPlacement;\n anchor?: FloatingAnchorMode;\n arrow?: boolean;\n arrowTarget?: 'anchor' | 'pointer';\n showBackdrop?: boolean;\n panelClass?: string | string[];\n /**\n * Paints in the browser top layer, above every z-index, body-appended ng-select panels included.\n * For a transient surface that can open from inside one, like a tooltip. Unset keeps the normal layer.\n */\n topLayer?: boolean;\n /** Fallback for the two handlers below. */\n onClose?: () => void;\n /** Escape, which always closes. Unset means `onClose`. */\n onEscape?: () => void;\n /** Outside click. Unset means `onClose`. */\n onOutsideClick?: () => void;\n /**\n * Elements that carry their own toggle, so a click on them is not \"the outside\". Read on every\n * event, since the list may change while the floating is open.\n *\n * Without this, the CDK's capture-phase dispatcher closes before a secondary trigger sees the\n * click, that trigger reopens, and the toggle never closes again.\n */\n additionalTriggers?: () => readonly HTMLElement[];\n}\n\n/** The visual gap between anchor and panel. An arrow adds its own length: the tip must clear the edge. */\n/** Read by a surface that wants to fit: `max-height: var(--ap-floating-available-height)`. */\nexport const AVAILABLE_HEIGHT = '--ap-floating-available-height';\n\n/** Read by a surface that sizes to its content: `max-width: var(--ap-floating-available-width)`. */\nexport const AVAILABLE_WIDTH = '--ap-floating-available-width';\n\nconst GAP = 4;\n\nconst VIEWPORT_MARGIN = 8;\n\ninterface Measurable {\n getBoundingClientRect: () => { left: number; top: number; width: number; height: number };\n}\n\nfunction toRect(source: Measurable): FloatingRect {\n const rect = source.getBoundingClientRect();\n return roundRect({ x: rect.left, y: rect.top, width: rect.width, height: rect.height });\n}\n\ninterface AnchorState {\n target: HTMLElement;\n mode: FloatingAnchorMode;\n /** The opening axis. Invariant under the flip, which only swaps the main axis. */\n vertical: boolean;\n /** The click as a proportion of the trigger, so it survives scrolling, resizing and shifting. */\n ratio?: ClickRatio;\n}\n\nexport function createFloatingOverlay() {\n const elementRef = inject(ElementRef);\n const overlay = inject(Overlay);\n const viewContainerRef = inject(ViewContainerRef);\n\n let _overlayRef: OverlayRef | null = null;\n let stopAutoUpdate: (() => void) | null = null;\n let reposition: (() => void) | null = null;\n let anchorState: AnchorState | null = null;\n const isOpen = signal(false);\n\n inject(DestroyRef).onDestroy(() => close());\n\n /**\n * Opens the floating on a `TemplateRef`, attached as is, or on a component whose `ComponentRef`\n * is handed back, typed on the component, so the caller can set its inputs.\n *\n * The position keeps itself current, so inputs set after this returns need no refresh.\n */\n function open<T = unknown>(\n content: TemplateRef<unknown> | Type<T>,\n triggerElement?: HTMLElement,\n config?: FloatingOverlayConfig,\n event?: MouseEvent\n ): ComponentRef<T> | null {\n if (isOpen()) return null;\n\n const target = triggerElement ?? elementRef.nativeElement;\n const mode = config?.anchor ?? 'trigger';\n const placement = config?.placement ?? defaultPlacementFor(mode);\n\n anchorState = captureAnchor(target, mode, placement, event);\n\n disposeOverlay();\n _overlayRef = createOverlay(config);\n const pane = _overlayRef.overlayElement;\n // Floating UI's coordinates are viewport-relative; the CDK's `absolute` would misread them.\n pane.style.position = 'fixed';\n pane.style.left = '0';\n pane.style.top = '0';\n\n const panelRef = attachContent(content);\n isOpen.set(true);\n\n if (config?.arrow === true) {\n // On opening, so the pane carries the single silhouette's shadow before the first frame.\n pane.classList.add(ARROW_CLASS);\n }\n\n watchPosition(pane, placement, config);\n watchDismissal(target, config);\n\n return panelRef;\n }\n\n function captureAnchor(target: HTMLElement, mode: FloatingAnchorMode, placement: FloatingPlacement, event?: MouseEvent): AnchorState {\n return { target, mode, vertical: isVertical(placement), ratio: resolveClickRatio(toRect(target), clickPointOf(event)) };\n }\n\n /**\n * The reference **is** the anchor in all three modes, which is what lets the arrow read\n * `rects.reference` rather than rebuild it. `contextElement` is load-bearing: without it\n * `autoUpdate` cannot find the scrollable ancestors of an anchor that has no DOM node.\n */\n function toReference(state: AnchorState): HTMLElement | VirtualElement {\n if (state.mode === 'trigger' || !state.ratio) {\n return state.target;\n }\n\n return {\n contextElement: state.target,\n getBoundingClientRect: () => {\n const trigger = toRect(state.target);\n const rect = resolveAnchorRect(state.mode, trigger, state.vertical, pointFromRatio(trigger, state.ratio));\n return new DOMRect(rect.x, rect.y, rect.width, rect.height);\n },\n };\n }\n\n function createOverlay(config?: FloatingOverlayConfig): OverlayRef {\n return overlay.create({\n hasBackdrop: config?.showBackdrop ?? false,\n backdropClass: '',\n panelClass: config?.panelClass ?? '',\n // No scroll strategy: `autoUpdate` owns the update cycle, and the CDK's default is a no-op.\n usePopover: config?.topLayer ?? false,\n });\n }\n\n function attachContent<T>(content: TemplateRef<unknown> | Type<T>): ComponentRef<T> | null {\n if (!_overlayRef) return null;\n if (content instanceof TemplateRef) {\n _overlayRef.attach(new TemplatePortal(content, viewContainerRef));\n return null;\n }\n return _overlayRef.attach(new ComponentPortal(content, viewContainerRef));\n }\n\n /**\n * `autoUpdate` is the whole update cycle: scrollable ancestors of both boxes, the viewport,\n * both boxes' own resizing, and layout shifts. Nothing else here watches anything.\n */\n function watchPosition(pane: HTMLElement, placement: FloatingPlacement, config?: FloatingOverlayConfig): void {\n const state = anchorState;\n if (!state) return;\n const reference = toReference(state);\n\n const middleware = [\n offset(config?.arrow === true ? GAP + ARROW_HEIGHT : GAP),\n flip({ crossAxis: false, flipAlignment: false, padding: VIEWPORT_MARGIN }),\n shift({ padding: VIEWPORT_MARGIN }),\n // After flip and shift, so what it publishes is the room left on the side they settled on.\n size({\n padding: VIEWPORT_MARGIN,\n apply: ({ availableWidth, availableHeight }) => {\n pane.style.setProperty(AVAILABLE_WIDTH, `${Math.round(availableWidth)}px`);\n pane.style.setProperty(AVAILABLE_HEIGHT, `${Math.round(availableHeight)}px`);\n },\n }),\n ];\n if (config?.arrow === true) {\n middleware.push(apArrow({ targetMode: config.arrowTarget ?? 'anchor', anchorMode: state.mode, clickRatio: state.ratio }));\n }\n\n let invariantsWritten = false;\n\n reposition = () => {\n // A detached trigger measures as a zero rect at the viewport origin: keep the last position instead.\n if (!state.target.isConnected) return;\n void computePosition(reference, pane, { strategy: 'fixed', placement, middleware }).then(position => {\n // Whole pixels: a fractional translate blurs text on a non-retina screen.\n pane.style.transform = `translate(${Math.round(position.x)}px, ${Math.round(position.y)}px)`;\n const arrow: ApArrowData | undefined = position.middlewareData[AP_ARROW];\n if (arrow) {\n invariantsWritten = invariantsWritten || writeArrowInvariants(pane);\n writeArrowStyles(pane, arrow);\n }\n });\n };\n\n stopAutoUpdate = autoUpdate(reference, pane, reposition);\n }\n\n function watchDismissal(target: HTMLElement, config?: FloatingOverlayConfig): void {\n if (!_overlayRef) return;\n\n const closeHandler = config?.onClose ?? (() => close());\n const outsideHandler = config?.onOutsideClick ?? closeHandler;\n const escapeHandler = config?.onEscape ?? closeHandler;\n\n const ownsGesture = (node: Node): boolean =>\n target.contains(node) || (config?.additionalTriggers?.() ?? []).some(element => element.contains(node));\n\n // No `take(1)`: a handler may decline to close, and it must still hear the next gesture. Dispose ends both.\n _overlayRef\n .outsidePointerEvents()\n .pipe(filter(pointerEvent => !(pointerEvent.target instanceof Node && ownsGesture(pointerEvent.target))))\n .subscribe(() => outsideHandler());\n\n _overlayRef\n .keydownEvents()\n .pipe(filter(keyEvent => keyEvent.key === 'Escape'))\n .subscribe(() => escapeHandler());\n }\n\n /** The observers never outlive their overlay: they would reposition it after its destruction. */\n function disposeOverlay(): void {\n stopAutoUpdate?.();\n stopAutoUpdate = null;\n reposition = null;\n _overlayRef?.dispose();\n _overlayRef = null;\n }\n\n function close(): void {\n if (!isOpen()) return;\n\n anchorState = null;\n disposeOverlay();\n isOpen.set(false);\n }\n\n /** Recomputes now. For a caller that knows the geometry changed before any observer can see it. */\n function updatePosition(): void {\n reposition?.();\n }\n\n return {\n get overlayRef() {\n return _overlayRef;\n },\n isOpen: isOpen.asReadonly(),\n open,\n close,\n updatePosition,\n };\n}\n\nexport type FloatingOverlayInstance = ReturnType<typeof createFloatingOverlay>;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],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,QAAA,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE;QAC3B,IAAI;QACJ,KAAK;QACL,cAAc;KACjB;AACL;;AClRA;;AAEG;;;;"}
@@ -383,6 +383,8 @@ class TooltipDirective {
383
383
  placement: this.apTooltipPosition(),
384
384
  arrow: this.apTooltipArrow(),
385
385
  panelClass: this.paneClasses(isTemplate),
386
+ // A disabled option's reason opens from inside a select panel, which out-stacks every normal-layer overlay.
387
+ topLayer: true,
386
388
  // Explicit dismissals skip the hide delay, which only exists to cross the gap to the panel.
387
389
  onClose: () => this.zone.run(() => this.remove()),
388
390
  additionalTriggers: () => [...this.externalTriggers],
@@ -1 +1 @@
1
- {"version":3,"file":"agorapulse-ui-components-tooltip.mjs","sources":["../../../libs/ui-components/tooltip/src/tooltip-external-trigger.directive.ts","../../../libs/ui-components/tooltip/src/tooltip.component.ts","../../../libs/ui-components/tooltip/src/tooltip.component.html","../../../libs/ui-components/tooltip/src/tooltip-panel/tooltip-panel.component.ts","../../../libs/ui-components/tooltip/src/tooltip-panel/tooltip-panel.component.html","../../../libs/ui-components/tooltip/src/tooltip.directive.ts","../../../libs/ui-components/tooltip/src/agorapulse-ui-components-tooltip.ts"],"sourcesContent":["import { AfterViewInit, Directive, ElementRef, inject, input, NgZone, OnDestroy } from '@angular/core';\nimport { TooltipDirective } from './tooltip.directive';\n\n/**\n * Directive that triggers a tooltip to show/hide\n *\n * ```html\n * <div #myTooltip=\"apTooltip\" apTooltip>Content</div>\n * <div [apTooltipExternalTrigger]=\"myTooltip\">Click me</div>\n * ```\n */\n@Directive({\n selector: '[apTooltipExternalTrigger]',\n standalone: true,\n exportAs: 'apTooltipExternalTrigger',\n})\nexport class TooltipExternalTriggerDirective implements AfterViewInit, OnDestroy {\n private readonly elementRef: ElementRef = inject(ElementRef);\n private readonly zone: NgZone = inject(NgZone);\n\n // Accept a TooltipDirective reference for sibling usage\n apTooltipExternalTrigger = input<TooltipDirective>();\n\n private clickListener: (() => void) | undefined = undefined;\n\n private get targetTooltip(): TooltipDirective | null {\n // Prefer explicit reference, fall back to parent\n return this.apTooltipExternalTrigger() ?? null;\n }\n\n ngAfterViewInit(): void {\n const tooltip = this.targetTooltip;\n if (!tooltip) {\n return;\n }\n\n // Otherwise the CDK's outside-click dispatcher, which runs first in capture, closes and this toggle reopens.\n tooltip.registerExternalTrigger(this.elementRef.nativeElement);\n\n this.setupEventListeners();\n }\n\n private setupEventListeners(): void {\n this.cleanupEventListeners();\n\n this.zone.runOutsideAngular(() => {\n const nativeElement = this.elementRef.nativeElement;\n\n this.clickListener = this.onClick.bind(this);\n nativeElement.addEventListener('click', this.clickListener, true);\n });\n }\n\n private cleanupEventListeners(): void {\n const nativeElement = this.elementRef.nativeElement;\n\n if (this.clickListener) {\n nativeElement.removeEventListener('click', this.clickListener, true);\n this.clickListener = undefined;\n }\n }\n\n ngOnDestroy(): void {\n this.targetTooltip?.unregisterExternalTrigger(this.elementRef.nativeElement);\n this.cleanupEventListeners();\n }\n\n private onClick(): void {\n this.zone.run(() => {\n const tooltip = this.targetTooltip;\n if (!tooltip) return;\n\n if (tooltip.container) {\n tooltip.deactivate();\n } else {\n tooltip.externallyTriggerred = true;\n tooltip.activate();\n }\n });\n }\n}\n","import { AvatarComponent, AvatarItem } from '@agorapulse/ui-components/avatar';\nimport { ChangeDetectionStrategy, Component, input, ViewEncapsulation } from '@angular/core';\n\nexport const CustomTooltipType = {\n DEFAULT: 'DEFAULT', // default type\n PRESENTATION: 'PRESENTATION',\n LIST: 'LIST',\n};\nexport type CustomTooltipType = (typeof CustomTooltipType)[keyof typeof CustomTooltipType];\n\nexport type CustomTooltipPresentationItem = {\n title: string;\n description: string;\n};\n\nexport type CustomTooltipAvatarItem = AvatarItem & {\n caption?: string;\n};\n\n/**\n * A tooltip component that is used for predefined templates: Presentation and List.\n * Not to be used directly, use TooltipDirective instead.\n */\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'ap-tooltip',\n templateUrl: './tooltip.component.html',\n styleUrls: ['./tooltip.component.scss'],\n imports: [AvatarComponent],\n providers: [],\n encapsulation: ViewEncapsulation.None,\n})\nexport class TooltipComponent {\n protected readonly CUSTOM_TOOLTIP_TYPE = CustomTooltipType;\n\n type = input<CustomTooltipType>(CustomTooltipType.DEFAULT);\n presentationContext = input<CustomTooltipPresentationItem>();\n\n tooltipListItems = input<CustomTooltipAvatarItem[]>([]);\n showCaption = input(true);\n}\n","<div class=\"custom-tooltip-container\">\n @switch (type()) {\n @case (CUSTOM_TOOLTIP_TYPE.PRESENTATION) {\n @let presentation = presentationContext();\n @if (presentation) {\n <div class=\"tooltip-presentation-title\">{{ presentation.title }}</div>\n <div class=\"tooltip-presentation-caption\">{{ presentation.description }}</div>\n }\n }\n @case (CUSTOM_TOOLTIP_TYPE.LIST) {\n <div class=\"tooltip-list-container\">\n @for (avatar of tooltipListItems(); track avatar) {\n <div class=\"tooltip-item\">\n <ap-avatar\n [profilePicture]=\"avatar.profilePicture\"\n [alt]=\"avatar.alt ?? ''\"\n [network]=\"avatar.network\"\n [size]=\"showCaption() && avatar.caption ? 32 : 24\"\n [username]=\"avatar.username\"\n [showInitials]=\"avatar.showInitials\"\n [bigNetwork]=\"avatar.bigNetwork ?? false\"\n [anonymous]=\"avatar.anonymous ?? false\"\n [online]=\"avatar.online ?? false\"\n [rounded]=\"avatar.rounded ?? true\" />\n\n <div class=\"tooltip-item-info\">\n <div class=\"tooltip-item-title\">\n {{ avatar.username }}\n </div>\n @if (showCaption() && avatar.caption) {\n <div class=\"tooltip-item-caption\">\n {{ avatar.caption }}\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n @default {\n\n }\n }\n\n</div>\n","import { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, input, TemplateRef, ViewEncapsulation } from '@angular/core';\nimport DOMPurify from 'dompurify';\nimport { CustomTooltipAvatarItem, CustomTooltipPresentationItem, CustomTooltipType, TooltipComponent } from '../tooltip.component';\n\n/**\n * A tooltip's floating surface, internal to the directive: `role=\"tooltip\"`, no focus handling — taking focus is `ap-popover`'s job.\n * `ViewEncapsulation.None` and the `ap-tooltip*` class names stay: the styles are global, and the product overrides them by name.\n * The host carries `ap-tooltip` because the engine reads the arrow's colour from the pane's first element child.\n */\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'ap-tooltip-panel',\n imports: [NgTemplateOutlet, TooltipComponent],\n templateUrl: 'tooltip-panel.component.html',\n encapsulation: ViewEncapsulation.None,\n host: {\n role: 'tooltip',\n class: 'ap-tooltip',\n '[class.ap-predefined-tooltip]': '!isDefaultType()',\n '[class.ap-tooltip-custom-template]': 'hasTemplate()',\n '[class.ap-tooltip-click-trigger]': '!isDefaultType() && clickTriggered()',\n },\n})\nexport class TooltipPanelComponent {\n /** Plain-string content. Sanitised before it reaches the template. */\n readonly text = input<string>();\n\n /** Consumer template, which takes precedence over `text`. */\n readonly template = input<TemplateRef<HTMLElement>>();\n\n /** The consumer template's `ngTemplateOutletContext`, read through its `let-` bindings. */\n readonly templateContext = input<object>();\n\n readonly type = input<CustomTooltipType>(CustomTooltipType.DEFAULT);\n readonly presentationContext = input<CustomTooltipPresentationItem>();\n readonly listItems = input<CustomTooltipAvatarItem[]>([]);\n readonly showCaption = input(true);\n\n /** Only mirrored onto the host, for the class the product may hook onto. */\n readonly clickTriggered = input(false);\n\n protected readonly isDefaultType = computed(() => !this.type() || this.type() === CustomTooltipType.DEFAULT);\n\n protected readonly hasTemplate = computed(() => this.template() !== undefined);\n\n /** DOMPurify strips more than the `[innerHTML]` sanitiser that runs after it; neither pass adds anything. */\n protected readonly sanitizedText = computed(() => {\n const text = this.text();\n return text ? DOMPurify.sanitize(text) : '';\n });\n}\n","<div\n class=\"ap-content-container\"\n [class.ap-content-predefined-container]=\"!isDefaultType()\">\n <!-- No arrow here: the engine draws it as the pane's `::before`, out of the accessibility tree. -->\n @if (isDefaultType()) {\n @if (template(); as content) {\n <div class=\"ap-tooltip-text\">\n <ng-container\n [ngTemplateOutlet]=\"content\"\n [ngTemplateOutletContext]=\"templateContext() ?? null\" />\n </div>\n } @else {\n <div\n class=\"ap-tooltip-text\"\n [innerHTML]=\"sanitizedText()\"></div>\n }\n } @else {\n <ap-tooltip\n [type]=\"type()\"\n [presentationContext]=\"presentationContext()\"\n [tooltipListItems]=\"listItems()\"\n [showCaption]=\"showCaption()\" />\n }\n</div>\n","import { createFloatingOverlay, FloatingPlacement } from '@agorapulse/ui-components/floating';\nimport { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';\nimport {\n ComponentRef,\n computed,\n DestroyRef,\n Directive,\n ElementRef,\n inject,\n input,\n NgZone,\n OnDestroy,\n OnInit,\n TemplateRef,\n untracked,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { explicitEffect } from 'ngxtension/explicit-effect';\nimport { TooltipPanelComponent } from './tooltip-panel/tooltip-panel.component';\nimport { CustomTooltipAvatarItem, CustomTooltipPresentationItem, CustomTooltipType } from './tooltip.component';\n\n@Directive({ selector: '[apTooltip]', standalone: true, exportAs: 'apTooltip' })\nexport class TooltipDirective implements OnDestroy, OnInit {\n private readonly elementRef: ElementRef = inject(ElementRef);\n private readonly zone: NgZone = inject(NgZone);\n private readonly destroyRef = inject(DestroyRef);\n\n /** Decides where the tooltip goes — flip, shift, scroll following, arrow; this directive only decides when. */\n private readonly overlay = createFloatingOverlay();\n\n apTooltip = input.required<string | TemplateRef<HTMLElement> | undefined | null>();\n\n /** Where the panel opens, in the engine's vocabulary. */\n apTooltipPosition = input<FloatingPlacement>('top');\n apTooltipShowDelay = input<number>(80);\n apTooltipHideDelay = input<number>(0);\n apTooltipDuration = input<number>(0);\n apTooltipDisabled = input<boolean>(false);\n apTooltipTruncatedTextOnly = input<boolean>(false);\n apTooltipTemplateContext = input<object>();\n apTooltipVirtualScrollElement = input<CdkVirtualScrollViewport>();\n apTooltipTrigger = input<'hover' | 'click'>('hover');\n\n /** Shows the arrow aimed at the trigger. */\n apTooltipArrow = input<boolean>(true);\n\n // Predefined template variables\n apTooltipType = input<CustomTooltipType>(CustomTooltipType.DEFAULT);\n apTooltipPresentationContext = input<CustomTooltipPresentationItem>();\n apTooltipListItems = input<CustomTooltipAvatarItem[]>([]);\n apTooltipShowAvatarCaption = input(true);\n\n isDefaultTooltipType = computed(() => !this.apTooltipType() || this.apTooltipType() === CustomTooltipType.DEFAULT);\n isValidPredefinedTooltip = computed(\n () =>\n (this.apTooltipType() === CustomTooltipType.PRESENTATION &&\n this.apTooltipPresentationContext()?.title &&\n this.apTooltipPresentationContext()?.description) ||\n (this.apTooltipType() === CustomTooltipType.LIST && this.apTooltipListItems().length > 0)\n );\n triggeredByClick = computed(() => this.apTooltipTrigger() === 'click' || this.externallyTriggerred);\n\n /** True while the panel is attached — not yet during the show delay. */\n readonly isOpen = this.overlay.isOpen;\n\n clickListener: (() => void) | undefined = undefined;\n\n hideTimeout: number | undefined;\n\n mouseEnterListener: (() => void) | undefined = undefined;\n\n mouseLeaveListener: (() => void) | undefined = undefined;\n\n nativeElement: HTMLElement = this.elementRef.nativeElement;\n\n showTimeout: number | undefined;\n\n _externallyTriggerred: boolean = false;\n\n private panelRef: ComponentRef<unknown> | null = null;\n\n /** Where the opening click landed, in viewport coordinates; `null` after a keyboard click. */\n private clickPoint: { x: number; y: number } | null = null;\n\n /** The pointer while a click-opened tooltip is shown; `null` while unknown. */\n private pointer: { x: number; y: number } | null = null;\n\n private stopScrollDismissal: (() => void) | null = null;\n\n /** `apTooltipExternalTrigger` elements: they carry their own toggle, so the engine must not count them as the outside. */\n private readonly externalTriggers = new Set<HTMLElement>();\n\n /** @internal Called by `apTooltipExternalTrigger`. */\n registerExternalTrigger(element: HTMLElement): void {\n this.externalTriggers.add(element);\n }\n\n /** @internal Called by `apTooltipExternalTrigger`. */\n unregisterExternalTrigger(element: HTMLElement): void {\n this.externalTriggers.delete(element);\n }\n\n /**\n * The `.ap-tooltip` surface while one is shown.\n * @deprecated Use {@link isOpen} to know whether a tooltip is shown.\n */\n get container(): HTMLElement | undefined {\n return this.panelRef?.location.nativeElement;\n }\n\n constructor() {\n explicitEffect([this.apTooltipTrigger], ([trigger]) => {\n // Untracked: the setup reads `isOpen`, and an effect tracking it would close every tooltip it opens.\n untracked(() => this.setupEventListeners(trigger));\n });\n }\n\n ngOnInit(): void {\n const apTooltipVirtualScrollElement = this.apTooltipVirtualScrollElement();\n if (apTooltipVirtualScrollElement) {\n apTooltipVirtualScrollElement.renderedRangeStream.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(range => {\n if (range.start === 0 && range.end === 0) {\n this.deactivate();\n }\n });\n }\n }\n\n private setupEventListeners(trigger: 'hover' | 'click'): void {\n // Close any open tooltip when switching modes\n if (this.isOpen()) {\n this.remove();\n }\n\n this.cleanupEventListeners();\n\n this.zone.runOutsideAngular(() => {\n this.clickListener = this.onInputClick.bind(this);\n this.nativeElement.addEventListener('click', this.clickListener, true);\n if (trigger === 'hover') {\n this.mouseEnterListener = this.onMouseEnter.bind(this);\n this.mouseLeaveListener = this.onMouseLeave.bind(this);\n this.nativeElement.addEventListener('mouseenter', this.mouseEnterListener);\n this.nativeElement.addEventListener('mouseleave', this.mouseLeaveListener);\n }\n });\n }\n\n private cleanupEventListeners(): void {\n if (this.mouseEnterListener) {\n this.nativeElement.removeEventListener('mouseenter', this.mouseEnterListener);\n this.mouseEnterListener = undefined;\n }\n if (this.clickListener) {\n this.nativeElement.removeEventListener('click', this.clickListener, true);\n this.clickListener = undefined;\n }\n if (this.mouseLeaveListener) {\n this.nativeElement.removeEventListener('mouseleave', this.mouseLeaveListener);\n this.mouseLeaveListener = undefined;\n }\n }\n\n ngOnDestroy(): void {\n if (this.isOpen()) {\n this.deactivate();\n }\n this.cleanupEventListeners();\n }\n\n onMouseEnter(): void {\n if (!this.isOpen()) {\n this.activate();\n }\n }\n\n onMouseLeave(): void {\n if (!this._externallyTriggerred) {\n this.deactivate();\n }\n }\n\n onInputClick(event?: MouseEvent): void {\n this.zone.run(() => {\n const trigger = this.apTooltipTrigger();\n\n if (trigger === 'click') {\n if (this.isOpen()) {\n this.deactivate();\n } else {\n // A click synthesised from the keyboard has `detail: 0` and sits at `(0, 0)`.\n this.clickPoint = event && event.detail > 0 ? { x: event.clientX, y: event.clientY } : null;\n this.activate();\n }\n } else {\n this.deactivate();\n }\n });\n }\n\n activate(): void {\n this.clearHideTimeout();\n\n if (this.apTooltipShowDelay()) {\n this.showTimeout = window.setTimeout(() => {\n this.show();\n }, this.apTooltipShowDelay());\n } else {\n this.show();\n }\n\n if (this.apTooltipDuration()) {\n const duration = this.apTooltipShowDelay() ? this.apTooltipDuration() + this.apTooltipShowDelay() : this.apTooltipDuration();\n this.hideTimeout = window.setTimeout(() => {\n this.remove();\n }, duration);\n }\n }\n\n deactivate(): void {\n this.clearShowTimeout();\n if (this.apTooltipHideDelay()) {\n this.clearHideTimeout();\n this.hideTimeout = window.setTimeout(() => {\n this.remove();\n }, this.apTooltipHideDelay());\n } else {\n this.remove();\n }\n }\n\n show(): void {\n if (this.apTooltipTruncatedTextOnly() && this.elementRef.nativeElement.scrollWidth === this.elementRef.nativeElement.clientWidth) {\n return;\n }\n if (\n (this.isDefaultTooltipType() && !this.apTooltip()) ||\n (!this.isDefaultTooltipType() && !this.isValidPredefinedTooltip()) ||\n this.apTooltipDisabled()\n ) {\n return;\n }\n\n // Prevent tooltip from showing if the host element is not connected to the DOM\n const hostRect = this.nativeElement.getBoundingClientRect();\n if (!this.nativeElement.isConnected || (hostRect.width === 0 && hostRect.height === 0)) {\n return;\n }\n\n this.create();\n }\n\n remove(): void {\n this.stopScrollDismissal?.();\n this.overlay.close();\n this.panelRef = null;\n\n this.clearTimeouts();\n this._externallyTriggerred = false;\n }\n\n private create(): void {\n if (this.isOpen()) {\n this.clearHideTimeout();\n this.remove();\n }\n\n // Entered on purpose: hover is listened for outside the zone, where the panel's inputs would never render.\n this.zone.run(() => {\n const content = this.apTooltip();\n const isTemplate = this.isDefaultTooltipType() && content instanceof TemplateRef;\n\n this.panelRef = this.overlay.open(TooltipPanelComponent, this.nativeElement, {\n placement: this.apTooltipPosition(),\n arrow: this.apTooltipArrow(),\n panelClass: this.paneClasses(isTemplate),\n // Explicit dismissals skip the hide delay, which only exists to cross the gap to the panel.\n onClose: () => this.zone.run(() => this.remove()),\n additionalTriggers: () => [...this.externalTriggers],\n });\n if (!this.panelRef) {\n return;\n }\n\n this.panelRef.setInput('text', content instanceof TemplateRef ? undefined : (content ?? undefined));\n this.panelRef.setInput('template', isTemplate ? content : undefined);\n this.panelRef.setInput('templateContext', this.apTooltipTemplateContext());\n this.panelRef.setInput('type', this.apTooltipType());\n this.panelRef.setInput('presentationContext', this.apTooltipPresentationContext());\n this.panelRef.setInput('listItems', this.apTooltipListItems());\n this.panelRef.setInput('showCaption', this.apTooltipShowAvatarCaption());\n this.panelRef.setInput('clickTriggered', this.triggeredByClick());\n\n // Render synchronously, then re-place: `attach()` measured an empty box, and background tabs stall timers and rAF.\n this.panelRef.changeDetectorRef.detectChanges();\n this.overlay.updatePosition();\n\n this.listenForScrollDismissal();\n });\n }\n\n /**\n * A click-opened tooltip closes on scroll once the pointer is off its trigger; an unknown pointer counts as off.\n * A scroll inside the panel never closes it. The trigger's box is measured, since browsers freeze `:hover` while scrolling.\n */\n private listenForScrollDismissal(): void {\n // Not `triggeredByClick()`: that `computed` reads the non-signal `externallyTriggerred` and can go stale.\n if (this.apTooltipTrigger() !== 'click' && !this._externallyTriggerred) {\n return;\n }\n const pane = this.overlay.overlayRef?.overlayElement;\n this.pointer = this.clickPoint;\n this.clickPoint = null;\n\n const onPointer = (event: MouseEvent): void => {\n this.pointer = { x: event.clientX, y: event.clientY };\n };\n const onScroll = (event: Event): void => {\n const target = event.target;\n if (pane && target instanceof Node && pane.contains(target)) {\n return;\n }\n if (!this.isPointerOnTrigger()) {\n this.zone.run(() => this.remove());\n }\n };\n\n this.zone.runOutsideAngular(() => {\n document.addEventListener('pointermove', onPointer, { capture: true, passive: true });\n document.addEventListener('pointerdown', onPointer, { capture: true, passive: true });\n document.addEventListener('scroll', onScroll, { capture: true, passive: true });\n });\n this.stopScrollDismissal = () => {\n document.removeEventListener('pointermove', onPointer, { capture: true });\n document.removeEventListener('pointerdown', onPointer, { capture: true });\n document.removeEventListener('scroll', onScroll, { capture: true });\n this.stopScrollDismissal = null;\n this.pointer = null;\n };\n }\n\n private isPointerOnTrigger(): boolean {\n const pointer = this.pointer;\n if (!pointer) {\n return false;\n }\n return [this.nativeElement, ...this.externalTriggers].some(element => {\n const box = element.getBoundingClientRect();\n return pointer.x >= box.left && pointer.x <= box.right && pointer.y >= box.top && pointer.y <= box.bottom;\n });\n }\n\n /** Pane classes: each of the three surfaces gives panel and tip a different shadow. */\n private paneClasses(isTemplate: boolean): string[] {\n if (!this.isDefaultTooltipType()) {\n return ['ap-tooltip-pane', 'predefined'];\n }\n return isTemplate ? ['ap-tooltip-pane', 'custom-template'] : ['ap-tooltip-pane'];\n }\n\n clearShowTimeout() {\n if (this.showTimeout) {\n clearTimeout(this.showTimeout);\n this.showTimeout = undefined;\n }\n }\n\n clearHideTimeout() {\n if (this.hideTimeout) {\n clearTimeout(this.hideTimeout);\n this.hideTimeout = undefined;\n }\n }\n\n clearTimeouts() {\n this.clearShowTimeout();\n this.clearHideTimeout();\n }\n\n get externallyTriggerred(): boolean {\n return this._externallyTriggerred;\n }\n\n set externallyTriggerred(value: boolean) {\n this._externallyTriggerred = value;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;AAGA;;;;;;;AAOG;MAMU,+BAA+B,CAAA;AACvB,IAAA,UAAU,GAAe,MAAM,CAAC,UAAU,CAAC;AAC3C,IAAA,IAAI,GAAW,MAAM,CAAC,MAAM,CAAC;;AAG9C,IAAA,wBAAwB,GAAG,KAAK;4GAAoB;IAE5C,aAAa,GAA6B,SAAS;AAE3D,IAAA,IAAY,aAAa,GAAA;;AAErB,QAAA,OAAO,IAAI,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AAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,EAAA,iBAAA,EAAA,gBAAA,EAAA,UAAA,EAAA,gBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,aAAA,EAAA,EAAA,iBAAA,EAAA,eAAA,EAAA,UAAA,EAAA,eAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,4BAAA,EAAA,EAAA,iBAAA,EAAA,8BAAA,EAAA,UAAA,EAAA,8BAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,kBAAA,EAAA,EAAA,iBAAA,EAAA,oBAAA,EAAA,UAAA,EAAA,oBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,0BAAA,EAAA,EAAA,iBAAA,EAAA,4BAAA,EAAA,UAAA,EAAA,4BAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAD5B,SAAS;mBAAC,EAAE,QAAQ,EAAE,aAAa,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE;;;ACrB/E;;AAEG;;;;"}
1
+ {"version":3,"file":"agorapulse-ui-components-tooltip.mjs","sources":["../../../libs/ui-components/tooltip/src/tooltip-external-trigger.directive.ts","../../../libs/ui-components/tooltip/src/tooltip.component.ts","../../../libs/ui-components/tooltip/src/tooltip.component.html","../../../libs/ui-components/tooltip/src/tooltip-panel/tooltip-panel.component.ts","../../../libs/ui-components/tooltip/src/tooltip-panel/tooltip-panel.component.html","../../../libs/ui-components/tooltip/src/tooltip.directive.ts","../../../libs/ui-components/tooltip/src/agorapulse-ui-components-tooltip.ts"],"sourcesContent":["import { AfterViewInit, Directive, ElementRef, inject, input, NgZone, OnDestroy } from '@angular/core';\nimport { TooltipDirective } from './tooltip.directive';\n\n/**\n * Directive that triggers a tooltip to show/hide\n *\n * ```html\n * <div #myTooltip=\"apTooltip\" apTooltip>Content</div>\n * <div [apTooltipExternalTrigger]=\"myTooltip\">Click me</div>\n * ```\n */\n@Directive({\n selector: '[apTooltipExternalTrigger]',\n standalone: true,\n exportAs: 'apTooltipExternalTrigger',\n})\nexport class TooltipExternalTriggerDirective implements AfterViewInit, OnDestroy {\n private readonly elementRef: ElementRef = inject(ElementRef);\n private readonly zone: NgZone = inject(NgZone);\n\n // Accept a TooltipDirective reference for sibling usage\n apTooltipExternalTrigger = input<TooltipDirective>();\n\n private clickListener: (() => void) | undefined = undefined;\n\n private get targetTooltip(): TooltipDirective | null {\n // Prefer explicit reference, fall back to parent\n return this.apTooltipExternalTrigger() ?? null;\n }\n\n ngAfterViewInit(): void {\n const tooltip = this.targetTooltip;\n if (!tooltip) {\n return;\n }\n\n // Otherwise the CDK's outside-click dispatcher, which runs first in capture, closes and this toggle reopens.\n tooltip.registerExternalTrigger(this.elementRef.nativeElement);\n\n this.setupEventListeners();\n }\n\n private setupEventListeners(): void {\n this.cleanupEventListeners();\n\n this.zone.runOutsideAngular(() => {\n const nativeElement = this.elementRef.nativeElement;\n\n this.clickListener = this.onClick.bind(this);\n nativeElement.addEventListener('click', this.clickListener, true);\n });\n }\n\n private cleanupEventListeners(): void {\n const nativeElement = this.elementRef.nativeElement;\n\n if (this.clickListener) {\n nativeElement.removeEventListener('click', this.clickListener, true);\n this.clickListener = undefined;\n }\n }\n\n ngOnDestroy(): void {\n this.targetTooltip?.unregisterExternalTrigger(this.elementRef.nativeElement);\n this.cleanupEventListeners();\n }\n\n private onClick(): void {\n this.zone.run(() => {\n const tooltip = this.targetTooltip;\n if (!tooltip) return;\n\n if (tooltip.container) {\n tooltip.deactivate();\n } else {\n tooltip.externallyTriggerred = true;\n tooltip.activate();\n }\n });\n }\n}\n","import { AvatarComponent, AvatarItem } from '@agorapulse/ui-components/avatar';\nimport { ChangeDetectionStrategy, Component, input, ViewEncapsulation } from '@angular/core';\n\nexport const CustomTooltipType = {\n DEFAULT: 'DEFAULT', // default type\n PRESENTATION: 'PRESENTATION',\n LIST: 'LIST',\n};\nexport type CustomTooltipType = (typeof CustomTooltipType)[keyof typeof CustomTooltipType];\n\nexport type CustomTooltipPresentationItem = {\n title: string;\n description: string;\n};\n\nexport type CustomTooltipAvatarItem = AvatarItem & {\n caption?: string;\n};\n\n/**\n * A tooltip component that is used for predefined templates: Presentation and List.\n * Not to be used directly, use TooltipDirective instead.\n */\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'ap-tooltip',\n templateUrl: './tooltip.component.html',\n styleUrls: ['./tooltip.component.scss'],\n imports: [AvatarComponent],\n providers: [],\n encapsulation: ViewEncapsulation.None,\n})\nexport class TooltipComponent {\n protected readonly CUSTOM_TOOLTIP_TYPE = CustomTooltipType;\n\n type = input<CustomTooltipType>(CustomTooltipType.DEFAULT);\n presentationContext = input<CustomTooltipPresentationItem>();\n\n tooltipListItems = input<CustomTooltipAvatarItem[]>([]);\n showCaption = input(true);\n}\n","<div class=\"custom-tooltip-container\">\n @switch (type()) {\n @case (CUSTOM_TOOLTIP_TYPE.PRESENTATION) {\n @let presentation = presentationContext();\n @if (presentation) {\n <div class=\"tooltip-presentation-title\">{{ presentation.title }}</div>\n <div class=\"tooltip-presentation-caption\">{{ presentation.description }}</div>\n }\n }\n @case (CUSTOM_TOOLTIP_TYPE.LIST) {\n <div class=\"tooltip-list-container\">\n @for (avatar of tooltipListItems(); track avatar) {\n <div class=\"tooltip-item\">\n <ap-avatar\n [profilePicture]=\"avatar.profilePicture\"\n [alt]=\"avatar.alt ?? ''\"\n [network]=\"avatar.network\"\n [size]=\"showCaption() && avatar.caption ? 32 : 24\"\n [username]=\"avatar.username\"\n [showInitials]=\"avatar.showInitials\"\n [bigNetwork]=\"avatar.bigNetwork ?? false\"\n [anonymous]=\"avatar.anonymous ?? false\"\n [online]=\"avatar.online ?? false\"\n [rounded]=\"avatar.rounded ?? true\" />\n\n <div class=\"tooltip-item-info\">\n <div class=\"tooltip-item-title\">\n {{ avatar.username }}\n </div>\n @if (showCaption() && avatar.caption) {\n <div class=\"tooltip-item-caption\">\n {{ avatar.caption }}\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n @default {\n\n }\n }\n\n</div>\n","import { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, input, TemplateRef, ViewEncapsulation } from '@angular/core';\nimport DOMPurify from 'dompurify';\nimport { CustomTooltipAvatarItem, CustomTooltipPresentationItem, CustomTooltipType, TooltipComponent } from '../tooltip.component';\n\n/**\n * A tooltip's floating surface, internal to the directive: `role=\"tooltip\"`, no focus handling — taking focus is `ap-popover`'s job.\n * `ViewEncapsulation.None` and the `ap-tooltip*` class names stay: the styles are global, and the product overrides them by name.\n * The host carries `ap-tooltip` because the engine reads the arrow's colour from the pane's first element child.\n */\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'ap-tooltip-panel',\n imports: [NgTemplateOutlet, TooltipComponent],\n templateUrl: 'tooltip-panel.component.html',\n encapsulation: ViewEncapsulation.None,\n host: {\n role: 'tooltip',\n class: 'ap-tooltip',\n '[class.ap-predefined-tooltip]': '!isDefaultType()',\n '[class.ap-tooltip-custom-template]': 'hasTemplate()',\n '[class.ap-tooltip-click-trigger]': '!isDefaultType() && clickTriggered()',\n },\n})\nexport class TooltipPanelComponent {\n /** Plain-string content. Sanitised before it reaches the template. */\n readonly text = input<string>();\n\n /** Consumer template, which takes precedence over `text`. */\n readonly template = input<TemplateRef<HTMLElement>>();\n\n /** The consumer template's `ngTemplateOutletContext`, read through its `let-` bindings. */\n readonly templateContext = input<object>();\n\n readonly type = input<CustomTooltipType>(CustomTooltipType.DEFAULT);\n readonly presentationContext = input<CustomTooltipPresentationItem>();\n readonly listItems = input<CustomTooltipAvatarItem[]>([]);\n readonly showCaption = input(true);\n\n /** Only mirrored onto the host, for the class the product may hook onto. */\n readonly clickTriggered = input(false);\n\n protected readonly isDefaultType = computed(() => !this.type() || this.type() === CustomTooltipType.DEFAULT);\n\n protected readonly hasTemplate = computed(() => this.template() !== undefined);\n\n /** DOMPurify strips more than the `[innerHTML]` sanitiser that runs after it; neither pass adds anything. */\n protected readonly sanitizedText = computed(() => {\n const text = this.text();\n return text ? DOMPurify.sanitize(text) : '';\n });\n}\n","<div\n class=\"ap-content-container\"\n [class.ap-content-predefined-container]=\"!isDefaultType()\">\n <!-- No arrow here: the engine draws it as the pane's `::before`, out of the accessibility tree. -->\n @if (isDefaultType()) {\n @if (template(); as content) {\n <div class=\"ap-tooltip-text\">\n <ng-container\n [ngTemplateOutlet]=\"content\"\n [ngTemplateOutletContext]=\"templateContext() ?? null\" />\n </div>\n } @else {\n <div\n class=\"ap-tooltip-text\"\n [innerHTML]=\"sanitizedText()\"></div>\n }\n } @else {\n <ap-tooltip\n [type]=\"type()\"\n [presentationContext]=\"presentationContext()\"\n [tooltipListItems]=\"listItems()\"\n [showCaption]=\"showCaption()\" />\n }\n</div>\n","import { createFloatingOverlay, FloatingPlacement } from '@agorapulse/ui-components/floating';\nimport { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';\nimport {\n ComponentRef,\n computed,\n DestroyRef,\n Directive,\n ElementRef,\n inject,\n input,\n NgZone,\n OnDestroy,\n OnInit,\n TemplateRef,\n untracked,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { explicitEffect } from 'ngxtension/explicit-effect';\nimport { TooltipPanelComponent } from './tooltip-panel/tooltip-panel.component';\nimport { CustomTooltipAvatarItem, CustomTooltipPresentationItem, CustomTooltipType } from './tooltip.component';\n\n@Directive({ selector: '[apTooltip]', standalone: true, exportAs: 'apTooltip' })\nexport class TooltipDirective implements OnDestroy, OnInit {\n private readonly elementRef: ElementRef = inject(ElementRef);\n private readonly zone: NgZone = inject(NgZone);\n private readonly destroyRef = inject(DestroyRef);\n\n /** Decides where the tooltip goes — flip, shift, scroll following, arrow; this directive only decides when. */\n private readonly overlay = createFloatingOverlay();\n\n apTooltip = input.required<string | TemplateRef<HTMLElement> | undefined | null>();\n\n /** Where the panel opens, in the engine's vocabulary. */\n apTooltipPosition = input<FloatingPlacement>('top');\n apTooltipShowDelay = input<number>(80);\n apTooltipHideDelay = input<number>(0);\n apTooltipDuration = input<number>(0);\n apTooltipDisabled = input<boolean>(false);\n apTooltipTruncatedTextOnly = input<boolean>(false);\n apTooltipTemplateContext = input<object>();\n apTooltipVirtualScrollElement = input<CdkVirtualScrollViewport>();\n apTooltipTrigger = input<'hover' | 'click'>('hover');\n\n /** Shows the arrow aimed at the trigger. */\n apTooltipArrow = input<boolean>(true);\n\n // Predefined template variables\n apTooltipType = input<CustomTooltipType>(CustomTooltipType.DEFAULT);\n apTooltipPresentationContext = input<CustomTooltipPresentationItem>();\n apTooltipListItems = input<CustomTooltipAvatarItem[]>([]);\n apTooltipShowAvatarCaption = input(true);\n\n isDefaultTooltipType = computed(() => !this.apTooltipType() || this.apTooltipType() === CustomTooltipType.DEFAULT);\n isValidPredefinedTooltip = computed(\n () =>\n (this.apTooltipType() === CustomTooltipType.PRESENTATION &&\n this.apTooltipPresentationContext()?.title &&\n this.apTooltipPresentationContext()?.description) ||\n (this.apTooltipType() === CustomTooltipType.LIST && this.apTooltipListItems().length > 0)\n );\n triggeredByClick = computed(() => this.apTooltipTrigger() === 'click' || this.externallyTriggerred);\n\n /** True while the panel is attached — not yet during the show delay. */\n readonly isOpen = this.overlay.isOpen;\n\n clickListener: (() => void) | undefined = undefined;\n\n hideTimeout: number | undefined;\n\n mouseEnterListener: (() => void) | undefined = undefined;\n\n mouseLeaveListener: (() => void) | undefined = undefined;\n\n nativeElement: HTMLElement = this.elementRef.nativeElement;\n\n showTimeout: number | undefined;\n\n _externallyTriggerred: boolean = false;\n\n private panelRef: ComponentRef<unknown> | null = null;\n\n /** Where the opening click landed, in viewport coordinates; `null` after a keyboard click. */\n private clickPoint: { x: number; y: number } | null = null;\n\n /** The pointer while a click-opened tooltip is shown; `null` while unknown. */\n private pointer: { x: number; y: number } | null = null;\n\n private stopScrollDismissal: (() => void) | null = null;\n\n /** `apTooltipExternalTrigger` elements: they carry their own toggle, so the engine must not count them as the outside. */\n private readonly externalTriggers = new Set<HTMLElement>();\n\n /** @internal Called by `apTooltipExternalTrigger`. */\n registerExternalTrigger(element: HTMLElement): void {\n this.externalTriggers.add(element);\n }\n\n /** @internal Called by `apTooltipExternalTrigger`. */\n unregisterExternalTrigger(element: HTMLElement): void {\n this.externalTriggers.delete(element);\n }\n\n /**\n * The `.ap-tooltip` surface while one is shown.\n * @deprecated Use {@link isOpen} to know whether a tooltip is shown.\n */\n get container(): HTMLElement | undefined {\n return this.panelRef?.location.nativeElement;\n }\n\n constructor() {\n explicitEffect([this.apTooltipTrigger], ([trigger]) => {\n // Untracked: the setup reads `isOpen`, and an effect tracking it would close every tooltip it opens.\n untracked(() => this.setupEventListeners(trigger));\n });\n }\n\n ngOnInit(): void {\n const apTooltipVirtualScrollElement = this.apTooltipVirtualScrollElement();\n if (apTooltipVirtualScrollElement) {\n apTooltipVirtualScrollElement.renderedRangeStream.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(range => {\n if (range.start === 0 && range.end === 0) {\n this.deactivate();\n }\n });\n }\n }\n\n private setupEventListeners(trigger: 'hover' | 'click'): void {\n // Close any open tooltip when switching modes\n if (this.isOpen()) {\n this.remove();\n }\n\n this.cleanupEventListeners();\n\n this.zone.runOutsideAngular(() => {\n this.clickListener = this.onInputClick.bind(this);\n this.nativeElement.addEventListener('click', this.clickListener, true);\n if (trigger === 'hover') {\n this.mouseEnterListener = this.onMouseEnter.bind(this);\n this.mouseLeaveListener = this.onMouseLeave.bind(this);\n this.nativeElement.addEventListener('mouseenter', this.mouseEnterListener);\n this.nativeElement.addEventListener('mouseleave', this.mouseLeaveListener);\n }\n });\n }\n\n private cleanupEventListeners(): void {\n if (this.mouseEnterListener) {\n this.nativeElement.removeEventListener('mouseenter', this.mouseEnterListener);\n this.mouseEnterListener = undefined;\n }\n if (this.clickListener) {\n this.nativeElement.removeEventListener('click', this.clickListener, true);\n this.clickListener = undefined;\n }\n if (this.mouseLeaveListener) {\n this.nativeElement.removeEventListener('mouseleave', this.mouseLeaveListener);\n this.mouseLeaveListener = undefined;\n }\n }\n\n ngOnDestroy(): void {\n if (this.isOpen()) {\n this.deactivate();\n }\n this.cleanupEventListeners();\n }\n\n onMouseEnter(): void {\n if (!this.isOpen()) {\n this.activate();\n }\n }\n\n onMouseLeave(): void {\n if (!this._externallyTriggerred) {\n this.deactivate();\n }\n }\n\n onInputClick(event?: MouseEvent): void {\n this.zone.run(() => {\n const trigger = this.apTooltipTrigger();\n\n if (trigger === 'click') {\n if (this.isOpen()) {\n this.deactivate();\n } else {\n // A click synthesised from the keyboard has `detail: 0` and sits at `(0, 0)`.\n this.clickPoint = event && event.detail > 0 ? { x: event.clientX, y: event.clientY } : null;\n this.activate();\n }\n } else {\n this.deactivate();\n }\n });\n }\n\n activate(): void {\n this.clearHideTimeout();\n\n if (this.apTooltipShowDelay()) {\n this.showTimeout = window.setTimeout(() => {\n this.show();\n }, this.apTooltipShowDelay());\n } else {\n this.show();\n }\n\n if (this.apTooltipDuration()) {\n const duration = this.apTooltipShowDelay() ? this.apTooltipDuration() + this.apTooltipShowDelay() : this.apTooltipDuration();\n this.hideTimeout = window.setTimeout(() => {\n this.remove();\n }, duration);\n }\n }\n\n deactivate(): void {\n this.clearShowTimeout();\n if (this.apTooltipHideDelay()) {\n this.clearHideTimeout();\n this.hideTimeout = window.setTimeout(() => {\n this.remove();\n }, this.apTooltipHideDelay());\n } else {\n this.remove();\n }\n }\n\n show(): void {\n if (this.apTooltipTruncatedTextOnly() && this.elementRef.nativeElement.scrollWidth === this.elementRef.nativeElement.clientWidth) {\n return;\n }\n if (\n (this.isDefaultTooltipType() && !this.apTooltip()) ||\n (!this.isDefaultTooltipType() && !this.isValidPredefinedTooltip()) ||\n this.apTooltipDisabled()\n ) {\n return;\n }\n\n // Prevent tooltip from showing if the host element is not connected to the DOM\n const hostRect = this.nativeElement.getBoundingClientRect();\n if (!this.nativeElement.isConnected || (hostRect.width === 0 && hostRect.height === 0)) {\n return;\n }\n\n this.create();\n }\n\n remove(): void {\n this.stopScrollDismissal?.();\n this.overlay.close();\n this.panelRef = null;\n\n this.clearTimeouts();\n this._externallyTriggerred = false;\n }\n\n private create(): void {\n if (this.isOpen()) {\n this.clearHideTimeout();\n this.remove();\n }\n\n // Entered on purpose: hover is listened for outside the zone, where the panel's inputs would never render.\n this.zone.run(() => {\n const content = this.apTooltip();\n const isTemplate = this.isDefaultTooltipType() && content instanceof TemplateRef;\n\n this.panelRef = this.overlay.open(TooltipPanelComponent, this.nativeElement, {\n placement: this.apTooltipPosition(),\n arrow: this.apTooltipArrow(),\n panelClass: this.paneClasses(isTemplate),\n // A disabled option's reason opens from inside a select panel, which out-stacks every normal-layer overlay.\n topLayer: true,\n // Explicit dismissals skip the hide delay, which only exists to cross the gap to the panel.\n onClose: () => this.zone.run(() => this.remove()),\n additionalTriggers: () => [...this.externalTriggers],\n });\n if (!this.panelRef) {\n return;\n }\n\n this.panelRef.setInput('text', content instanceof TemplateRef ? undefined : (content ?? undefined));\n this.panelRef.setInput('template', isTemplate ? content : undefined);\n this.panelRef.setInput('templateContext', this.apTooltipTemplateContext());\n this.panelRef.setInput('type', this.apTooltipType());\n this.panelRef.setInput('presentationContext', this.apTooltipPresentationContext());\n this.panelRef.setInput('listItems', this.apTooltipListItems());\n this.panelRef.setInput('showCaption', this.apTooltipShowAvatarCaption());\n this.panelRef.setInput('clickTriggered', this.triggeredByClick());\n\n // Render synchronously, then re-place: `attach()` measured an empty box, and background tabs stall timers and rAF.\n this.panelRef.changeDetectorRef.detectChanges();\n this.overlay.updatePosition();\n\n this.listenForScrollDismissal();\n });\n }\n\n /**\n * A click-opened tooltip closes on scroll once the pointer is off its trigger; an unknown pointer counts as off.\n * A scroll inside the panel never closes it. The trigger's box is measured, since browsers freeze `:hover` while scrolling.\n */\n private listenForScrollDismissal(): void {\n // Not `triggeredByClick()`: that `computed` reads the non-signal `externallyTriggerred` and can go stale.\n if (this.apTooltipTrigger() !== 'click' && !this._externallyTriggerred) {\n return;\n }\n const pane = this.overlay.overlayRef?.overlayElement;\n this.pointer = this.clickPoint;\n this.clickPoint = null;\n\n const onPointer = (event: MouseEvent): void => {\n this.pointer = { x: event.clientX, y: event.clientY };\n };\n const onScroll = (event: Event): void => {\n const target = event.target;\n if (pane && target instanceof Node && pane.contains(target)) {\n return;\n }\n if (!this.isPointerOnTrigger()) {\n this.zone.run(() => this.remove());\n }\n };\n\n this.zone.runOutsideAngular(() => {\n document.addEventListener('pointermove', onPointer, { capture: true, passive: true });\n document.addEventListener('pointerdown', onPointer, { capture: true, passive: true });\n document.addEventListener('scroll', onScroll, { capture: true, passive: true });\n });\n this.stopScrollDismissal = () => {\n document.removeEventListener('pointermove', onPointer, { capture: true });\n document.removeEventListener('pointerdown', onPointer, { capture: true });\n document.removeEventListener('scroll', onScroll, { capture: true });\n this.stopScrollDismissal = null;\n this.pointer = null;\n };\n }\n\n private isPointerOnTrigger(): boolean {\n const pointer = this.pointer;\n if (!pointer) {\n return false;\n }\n return [this.nativeElement, ...this.externalTriggers].some(element => {\n const box = element.getBoundingClientRect();\n return pointer.x >= box.left && pointer.x <= box.right && pointer.y >= box.top && pointer.y <= box.bottom;\n });\n }\n\n /** Pane classes: each of the three surfaces gives panel and tip a different shadow. */\n private paneClasses(isTemplate: boolean): string[] {\n if (!this.isDefaultTooltipType()) {\n return ['ap-tooltip-pane', 'predefined'];\n }\n return isTemplate ? ['ap-tooltip-pane', 'custom-template'] : ['ap-tooltip-pane'];\n }\n\n clearShowTimeout() {\n if (this.showTimeout) {\n clearTimeout(this.showTimeout);\n this.showTimeout = undefined;\n }\n }\n\n clearHideTimeout() {\n if (this.hideTimeout) {\n clearTimeout(this.hideTimeout);\n this.hideTimeout = undefined;\n }\n }\n\n clearTimeouts() {\n this.clearShowTimeout();\n this.clearHideTimeout();\n }\n\n get externallyTriggerred(): boolean {\n return this._externallyTriggerred;\n }\n\n set externallyTriggerred(value: boolean) {\n this._externallyTriggerred = value;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;AAGA;;;;;;;AAOG;MAMU,+BAA+B,CAAA;AACvB,IAAA,UAAU,GAAe,MAAM,CAAC,UAAU,CAAC;AAC3C,IAAA,IAAI,GAAW,MAAM,CAAC,MAAM,CAAC;;AAG9C,IAAA,wBAAwB,GAAG,KAAK;4GAAoB;IAE5C,aAAa,GAA6B,SAAS;AAE3D,IAAA,IAAY,aAAa,GAAA;;AAErB,QAAA,OAAO,IAAI,CAAC,wBAAwB,EAAE,IAAI,IAAI;IAClD;IAEA,eAAe,GAAA;AACX,QAAA,MAAM,OAAO,GAAG,IAAI,CAAC,aAAa;QAClC,IAAI,CAAC,OAAO,EAAE;YACV;QACJ;;QAGA,OAAO,CAAC,uBAAuB,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC;QAE9D,IAAI,CAAC,mBAAmB,EAAE;IAC9B;IAEQ,mBAAmB,GAAA;QACvB,IAAI,CAAC,qBAAqB,EAAE;AAE5B,QAAA,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,MAAK;AAC7B,YAAA,MAAM,aAAa,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa;YAEnD,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;YAC5C,aAAa,CAAC,gBAAgB,CAAC,OAAO,EAAE,IAA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AAA,EAAA,UAAA,EAAA,oBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,0BAAA,EAAA,EAAA,iBAAA,EAAA,4BAAA,EAAA,UAAA,EAAA,4BAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAD5B,SAAS;mBAAC,EAAE,QAAQ,EAAE,aAAa,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE;;;ACrB/E;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@agorapulse/ui-components",
3
3
  "description": "Agorapulse UI Components Library",
4
- "version": "22.4.10",
4
+ "version": "22.4.11",
5
5
  "author": "Benoit Hediard",
6
6
  "repository": {
7
7
  "type": "git",
@@ -139,6 +139,11 @@ interface FloatingOverlayConfig {
139
139
  arrowTarget?: 'anchor' | 'pointer';
140
140
  showBackdrop?: boolean;
141
141
  panelClass?: string | string[];
142
+ /**
143
+ * Paints in the browser top layer, above every z-index, body-appended ng-select panels included.
144
+ * For a transient surface that can open from inside one, like a tooltip. Unset keeps the normal layer.
145
+ */
146
+ topLayer?: boolean;
142
147
  /** Fallback for the two handlers below. */
143
148
  onClose?: () => void;
144
149
  /** Escape, which always closes. Unset means `onClose`. */