@agorapulse/ui-components 22.0.32 → 22.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/agorapulse-ui-components-22.1.0.tgz +0 -0
  2. package/fesm2022/agorapulse-ui-components-autocomplete.mjs +5 -3
  3. package/fesm2022/agorapulse-ui-components-autocomplete.mjs.map +1 -1
  4. package/fesm2022/agorapulse-ui-components-datepicker.mjs +3 -2
  5. package/fesm2022/agorapulse-ui-components-datepicker.mjs.map +1 -1
  6. package/fesm2022/agorapulse-ui-components-directives.mjs +140 -2
  7. package/fesm2022/agorapulse-ui-components-directives.mjs.map +1 -1
  8. package/fesm2022/agorapulse-ui-components-filter-dropdown.mjs +7 -2
  9. package/fesm2022/agorapulse-ui-components-filter-dropdown.mjs.map +1 -1
  10. package/fesm2022/agorapulse-ui-components-input-search.mjs +4 -3
  11. package/fesm2022/agorapulse-ui-components-input-search.mjs.map +1 -1
  12. package/fesm2022/agorapulse-ui-components-media-display-overlay.mjs +3 -3
  13. package/fesm2022/agorapulse-ui-components-media-display-overlay.mjs.map +1 -1
  14. package/fesm2022/agorapulse-ui-components-popmenu.mjs +3 -2
  15. package/fesm2022/agorapulse-ui-components-popmenu.mjs.map +1 -1
  16. package/fesm2022/agorapulse-ui-components-popover.mjs +200 -0
  17. package/fesm2022/agorapulse-ui-components-popover.mjs.map +1 -0
  18. package/fesm2022/agorapulse-ui-components-radio-button-card.mjs +3 -2
  19. package/fesm2022/agorapulse-ui-components-radio-button-card.mjs.map +1 -1
  20. package/fesm2022/agorapulse-ui-components-select.mjs +5 -4
  21. package/fesm2022/agorapulse-ui-components-select.mjs.map +1 -1
  22. package/fesm2022/agorapulse-ui-components.mjs +1 -0
  23. package/fesm2022/agorapulse-ui-components.mjs.map +1 -1
  24. package/package.json +5 -1
  25. package/types/agorapulse-ui-components-directives.d.ts +63 -1
  26. package/types/agorapulse-ui-components-popover.d.ts +92 -0
  27. package/types/agorapulse-ui-components.d.ts +2 -0
  28. package/agorapulse-ui-components-22.0.32.tgz +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"agorapulse-ui-components-popmenu.mjs","sources":["../../../libs/ui-components/popmenu/src/popmenu.component.ts","../../../libs/ui-components/popmenu/src/popmenu.component.html","../../../libs/ui-components/popmenu/src/options.ts","../../../libs/ui-components/popmenu/src/popmenu-options.service.ts","../../../libs/ui-components/popmenu/src/popmenu.directive.ts","../../../libs/ui-components/popmenu/src/popmenu.module.ts","../../../libs/ui-components/popmenu/src/agorapulse-ui-components-popmenu.ts"],"sourcesContent":["import { ButtonComponent } from '@agorapulse/ui-components/button';\nimport { NgStyle, NgTemplateOutlet } from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n HostBinding,\n Input,\n Output,\n Renderer2,\n ViewChild,\n} from '@angular/core';\nimport { MatMenuModule, MatMenuTrigger } from '@angular/material/menu';\nimport { merge } from 'rxjs';\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'ap-popmenu',\n templateUrl: './popmenu.component.html',\n styleUrls: ['./popmenu.component.scss'],\n imports: [ButtonComponent, MatMenuModule, NgStyle, NgTemplateOutlet],\n})\nexport class PopmenuComponent implements AfterViewInit {\n @Input() data: any;\n events = new EventEmitter();\n arrowTopPosition: string | undefined = '50%';\n arrowBottomPosition: string | undefined = '50%';\n arrowLeftPosition: string | undefined = undefined;\n arrowRightPosition: string | undefined = undefined;\n arrowClass: string | undefined = undefined;\n below = false;\n before = false;\n @Output() menuClosed: EventEmitter<any> = new EventEmitter<any>();\n @Output() menuOpened: EventEmitter<any> = new EventEmitter<any>();\n @ViewChild(MatMenuTrigger) trigger!: MatMenuTrigger;\n @HostBinding('style.top') hostStyleTop = '';\n @HostBinding('style.border-radius') hostStyleBorderRadius = '';\n @HostBinding('style.left') hostStyleLeft = '';\n @HostBinding('style.z-index') hostStyleZIndex = 0;\n @HostBinding('style.transition') hostStyleTransition = '';\n @HostBinding('style.width') hostStyleWidth = '';\n @HostBinding('style.max-width') hostStyleMaxWidth = '';\n @HostBinding('style.pointer-events') hostStylePointerEvents = '';\n @HostBinding('class.tooltip-show') hostClassShow = false;\n @HostBinding('class.tooltip-shadow') hostClassShadow = false;\n @HostBinding('class.tooltip-light') hostClassLight = false;\n viewInit = false;\n\n _show = false;\n\n get show(): boolean {\n return this._show;\n }\n\n @Input() set show(value: boolean) {\n if (value) {\n this.setPosition();\n }\n this._show = value;\n }\n\n @Input() set close(value: boolean) {\n if (value) {\n setTimeout(() => {\n this.trigger.closeMenu();\n }, 100);\n }\n }\n\n menuOpen = false;\n\n get arrow() {\n return this.data.options.arrow && this.border;\n }\n\n get arrowOffset() {\n return this.data.options.arrowOffset;\n }\n\n get arrowPosition() {\n return this.data.options.arrowPosition;\n }\n\n get autoPlacement() {\n return this.data.options.autoPlacement;\n }\n\n get background() {\n return this.data.options.apPopmenuBackground;\n }\n\n get border() {\n return this.data.options.apPopmenuBorder;\n }\n\n get element() {\n return this.data.element;\n }\n\n get elementPosition() {\n return this.data.elementPosition;\n }\n\n get hasBackdrop() {\n return this.data.options.hasBackdrop;\n }\n\n get backdropClass() {\n return this.data.options.backdropClass;\n }\n\n get isThemeLight() {\n return this.options['theme'] === 'light';\n }\n\n get options() {\n return this.data.options;\n }\n\n get panelClass() {\n return this.data.options.panelClass;\n }\n\n get placement() {\n return this.data.options.placement;\n }\n\n get rounded() {\n return this.data.options.rounded;\n }\n\n get shadow() {\n return this.data.options.shadow;\n }\n\n get tooltipOffset(): number {\n return Number(this.data.options.offset);\n }\n\n get offsetSkidding(): number {\n return Number(this.data.options.offsets.skidding) || 0;\n }\n\n get offsetDistance(): number {\n return Number(this.data.options.offsets.distance || 0);\n }\n\n get value() {\n return this.data.value;\n }\n\n constructor(\n public renderer: Renderer2,\n public elementRef: ElementRef<HTMLElement>,\n private changeDetectorRef: ChangeDetectorRef\n ) {}\n\n ngAfterViewInit() {\n this.viewInit = true;\n merge(this.trigger.menuOpened, this.trigger.menuClosed).subscribe(() => {\n this.menuOpen = this.trigger.menuOpen;\n });\n }\n\n onMenuClosed() {\n // we set a timeout to wait for the menu to be really closed\n setTimeout(() => this.menuClosed.emit(), 200);\n }\n\n onMenuOpened() {\n // we set a timeout to wait for the menu to be really opened\n setTimeout(() => this.menuOpened.emit(), 100);\n }\n\n setHostStyle(placement: string): boolean {\n const tooltip = this.elementRef.nativeElement;\n const isCustomPosition = !this.elementPosition.x;\n\n let elementHeight = !this.element.offsetHeight ? this.element.getBoundingClientRect().height : this.element.offsetHeight;\n let elementWidth = !this.element.offsetWidth ? this.element.getBoundingClientRect().width : this.element.offsetWidth;\n const tooltipHeight = tooltip.clientHeight;\n const tooltipWidth = tooltip.clientWidth;\n const scrollY = window.pageYOffset;\n\n let topStyle;\n let leftStyle;\n\n if (isCustomPosition) {\n if (placement && placement.split(' ')[0] === 'top') {\n this.below = false;\n }\n if (placement && placement.split(' ')[0] === 'bottom') {\n this.below = true;\n }\n elementHeight = 0;\n elementWidth = 0;\n topStyle = this.elementPosition.top;\n leftStyle = this.elementPosition.left;\n if (this.arrow && this.arrowPosition) {\n this.arrowClass = 'arrow-' + this.arrowPosition;\n switch (this.arrowPosition) {\n case 'left':\n case 'right':\n this.arrowLeftPosition = undefined;\n this.arrowRightPosition = undefined;\n this.arrowBottomPosition = 'auto';\n this.arrowTopPosition = this.arrowOffset + '%';\n break;\n case 'top':\n case 'bottom':\n this.arrowLeftPosition = this.arrowOffset + '%';\n this.arrowRightPosition = 'auto';\n this.arrowBottomPosition = undefined;\n this.arrowTopPosition = undefined;\n break;\n }\n }\n } else {\n if (placement.split(' ')[0] === 'top') {\n this.below = false;\n topStyle = this.elementPosition.top - this.tooltipOffset - this.offsetDistance;\n topStyle += 8;\n }\n\n if (placement.split(' ')[0] === 'bottom') {\n this.below = true;\n topStyle = this.elementPosition.bottom + this.tooltipOffset + this.offsetDistance;\n // We remove 8px due to the margin-top we put to display the arrow.\n topStyle -= 8;\n }\n\n if (placement.split(' ')[0] === 'left') {\n leftStyle = this.elementPosition.left - tooltipWidth - this.tooltipOffset - this.offsetDistance;\n }\n\n if (placement.split(' ')[0] === 'right') {\n leftStyle = this.elementPosition.left + elementWidth + this.tooltipOffset + this.offsetDistance;\n }\n\n if (placement.split(' ')[0] === 'left' || placement.split(' ')[0] === 'right') {\n topStyle = this.elementPosition.top + scrollY + elementHeight / 2 - tooltip.clientHeight / 2;\n }\n\n if (placement === 'right bottom') {\n this.below = true;\n this.before = false;\n this.arrowClass = 'arrow-left';\n topStyle = this.elementPosition.top + scrollY + this.offsetSkidding;\n this.arrowRightPosition = undefined;\n this.arrowLeftPosition = undefined;\n this.arrowBottomPosition = 'auto';\n this.arrowTopPosition = this.arrowOffset ? this.arrowOffset + '%' : elementHeight / 2 + 'px';\n }\n\n if (placement === 'left bottom') {\n this.below = true;\n this.before = true;\n this.arrowClass = 'arrow-right';\n topStyle = this.elementPosition.top + scrollY + this.offsetSkidding;\n this.arrowLeftPosition = undefined;\n this.arrowRightPosition = undefined;\n this.arrowBottomPosition = 'auto';\n this.arrowTopPosition = this.arrowOffset ? this.arrowOffset + '%' : elementHeight / 2 + 'px';\n }\n\n if (placement === 'right top') {\n this.below = false;\n this.before = false;\n this.arrowClass = 'arrow-left';\n topStyle = this.elementPosition.top + elementHeight + scrollY + this.offsetSkidding;\n this.arrowLeftPosition = undefined;\n this.arrowRightPosition = undefined;\n this.arrowTopPosition = 'auto';\n this.arrowBottomPosition = this.arrowOffset ? this.arrowOffset + '%' : -(tooltip.clientHeight - elementHeight / 2) + 'px';\n }\n\n if (placement === 'left top') {\n this.below = false;\n this.before = true;\n this.arrowClass = 'arrow-right';\n topStyle = this.elementPosition.top + elementHeight + scrollY + this.offsetSkidding;\n this.arrowRightPosition = undefined;\n this.arrowLeftPosition = undefined;\n this.arrowTopPosition = 'auto';\n this.arrowBottomPosition = this.arrowOffset ? this.arrowOffset + '%' : -(tooltip.clientHeight - elementHeight / 2) + 'px';\n }\n\n if (placement === 'bottom right') {\n this.before = false;\n this.below = true;\n this.arrowClass = 'arrow-top';\n leftStyle = this.elementPosition.left + this.offsetSkidding;\n this.arrowTopPosition = undefined;\n this.arrowRightPosition = 'auto';\n this.arrowLeftPosition = this.arrowOffset ? this.arrowOffset + '%' : elementWidth / 2 - 4.5 + 'px';\n }\n\n if (placement === 'bottom left') {\n this.before = true;\n this.below = true;\n this.arrowClass = 'arrow-top';\n leftStyle = this.elementPosition.right + this.offsetSkidding;\n this.arrowTopPosition = undefined;\n this.arrowLeftPosition = 'auto';\n this.arrowRightPosition = this.arrowOffset ? this.arrowOffset + '%' : elementWidth / 2 - 2.5 + 'px';\n }\n\n if (placement === 'top right') {\n this.before = false;\n this.below = false;\n this.arrowClass = 'arrow-bottom';\n leftStyle = this.elementPosition.left + this.offsetSkidding;\n this.arrowBottomPosition = undefined;\n this.arrowTopPosition = undefined;\n this.arrowRightPosition = 'auto';\n this.arrowLeftPosition = this.arrowOffset ? this.arrowOffset + '%' : elementWidth / 2 - 4.5 + 'px';\n }\n\n if (placement === 'top left') {\n this.before = true;\n this.below = false;\n this.arrowClass = 'arrow-bottom';\n leftStyle = this.elementPosition.right + this.offsetSkidding;\n this.arrowBottomPosition = undefined;\n this.arrowTopPosition = undefined;\n this.arrowLeftPosition = 'auto';\n this.arrowRightPosition = this.arrowOffset ? this.arrowOffset + '%' : elementWidth / 2 - 2.5 + 'px';\n }\n }\n\n // This line is PURE MAGIC and super important. It allows to force mat-menu\n // to reposition the menu with the new xPosition / yPosition.\n this.changeDetectorRef.detectChanges();\n\n const topEdge = topStyle;\n const bottomEdge = topStyle + tooltipHeight;\n const leftEdge = leftStyle;\n const rightEdge = leftStyle + tooltipWidth;\n\n if (\n (topEdge < 0 || bottomEdge > document.body.clientHeight || leftEdge < 0 || rightEdge > document.body.clientWidth) &&\n this.autoPlacement\n ) {\n return false;\n }\n\n this.hostStyleTop = topStyle + 'px';\n this.hostStyleLeft = leftStyle + 'px';\n return true;\n }\n\n setPlacementClass(placement?: string): void {\n this.renderer.addClass(this.elementRef.nativeElement, 'tooltip-' + (placement ? placement.split(' ')[0] : placement));\n this.renderer.addClass(\n this.elementRef.nativeElement,\n 'yPosition-' + (placement && placement.split(' ').length === 2 ? placement.split(' ')[1] : 'center')\n );\n\n if (this.elementRef.nativeElement.children && this.elementRef.nativeElement.children.length > 1) {\n const tooltipArrow = Array.from(this.elementRef.nativeElement.children).filter(\n (child: Element) => child.getAttribute('id') === 'tooltipArrow'\n );\n if (tooltipArrow && tooltipArrow.length === 1) {\n if (placement && placement.split(' ').length === 2 && placement.split(' ')[1] === 'bottom') {\n this.renderer.setStyle(tooltipArrow[0], 'top', this.arrowTopPosition);\n } else if (placement && placement.split(' ').length === 2 && placement.split(' ')[1] === 'top') {\n this.renderer.setStyle(tooltipArrow[0], 'top', this.arrowBottomPosition);\n }\n }\n }\n }\n\n setPosition(): void {\n if (this.setHostStyle(this.placement)) {\n this.setPlacementClass(this.placement);\n if (this.viewInit) {\n // We did this in order to reset overlayRef (multi web component needed with matmenu and cdk overlay)\n if (this.trigger['_overlayRef']) {\n this.trigger['_overlayRef'].dispose();\n this.trigger['_overlayRef'] = null;\n }\n this.trigger.openMenu();\n }\n return;\n } else {\n const placements = ['top', 'right', 'bottom', 'left'];\n\n for (const placement of placements) {\n if (this.setHostStyle(placement)) {\n this.setPlacementClass(placement);\n if (this.viewInit) {\n this.trigger.openMenu();\n }\n return;\n }\n }\n }\n }\n}\n","<button\n id=\"menuTrigger\"\n class=\"button-trigger\"\n mat-button\n [matMenuTriggerFor]=\"menu\"\n (menuClosed)=\"onMenuClosed()\"\n (menuOpened)=\"onMenuOpened()\"></button>\n<mat-menu\n #menu=\"matMenu\"\n [yPosition]=\"!below ? 'above' : 'below'\"\n [xPosition]=\"!before ? 'after' : 'before'\"\n [overlapTrigger]=\"false\"\n [hasBackdrop]=\"hasBackdrop\"\n [backdropClass]=\"backdropClass\"\n class=\"pop-menu {{ arrow ? 'arrow-before ' + arrowClass : '' }} {{ shadow ? 'shadow' : '' }} {{\n border ? '' : shadow ? 'shadow-no-border' : ''\n }} {{ rounded ? 'rounded-component' : '' }} {{ background ? '' : 'no-background' }} {{ panelClass }}\">\n @if (arrow) {\n <div\n class=\"{{ arrow ? 'arrow-before ' + arrowClass : '' }}\"\n [ngStyle]=\"{ left: arrowLeftPosition, right: arrowRightPosition, top: arrowTopPosition, bottom: arrowBottomPosition }\"></div>\n }\n <div\n class=\"{{ rounded ? 'rounded-component' : '' }} outline-none\"\n (click)=\"$event.stopPropagation()\">\n <div class=\"{{ border ? 'popover-content ' : '' }} {{ rounded ? 'rounded-component' : '' }}\">\n <ng-container *ngTemplateOutlet=\"value; context: { menu: this }\" />\n </div>\n </div>\n</mat-menu>\n","export const defaultOptions = {\n apPopmenuBorder: true,\n apPopmenuDisabled: false,\n apPopmenuBackground: true,\n hasBackdrop: true,\n placement: 'top',\n rounded: true,\n showDelay: 0,\n hideDelay: 10,\n hideDelayMobile: 0,\n shadow: true,\n theme: 'dark',\n offset: 8,\n offsets: {},\n maxWidth: '600',\n};\n","import { InjectionToken } from '@angular/core';\nimport { PopmenuOptions } from './popmenu-options.interface';\n\n/**\n * This is not a real service, but it looks like it from the outside.\n * It's just an InjectionToken used to import the config (initOptions) object, provided from the outside\n */\nexport const PopmenuOptionsService = new InjectionToken<PopmenuOptions>('PopmenuOptions');\n","import {\n ApplicationRef,\n ComponentRef,\n Directive,\n ElementRef,\n EmbeddedViewRef,\n EnvironmentInjector,\n EventEmitter,\n HostListener,\n Inject,\n Injector,\n Input,\n OnChanges,\n OnInit,\n Optional,\n Output,\n Renderer2,\n SimpleChanges,\n TemplateRef,\n createComponent,\n} from '@angular/core';\nimport { defaultOptions } from './options';\nimport { PopmenuOptions } from './popmenu-options.interface';\nimport { PopmenuOptionsService } from './popmenu-options.service';\nimport { PopmenuComponent } from './popmenu.component';\n\nexport interface AdComponent {\n data: any;\n show: boolean;\n close: boolean;\n menuClosed: any;\n menuOpened: any;\n menuOpen: boolean;\n}\n\nexport type PopmenuPlacement =\n | 'bottom'\n | 'top'\n | 'left'\n | 'right'\n | 'bottom right'\n | 'bottom left'\n | 'right bottom'\n | 'left bottom'\n | 'top right'\n | 'top left'\n | 'right top'\n | 'left top';\n\nexport type PopmenuArrowPosition = 'left' | 'right' | 'top' | 'bottom';\n\n/**\n * @deprecated This directive is deprecated and will be removed in future versions.\n * Use `ActionDropdownComponent` instead.\n */\n@Directive({\n selector: '[apPopmenu]',\n standalone: true,\n})\nexport class PopmenuDirective implements OnChanges, OnInit {\n @Input() apPopmenuBorder = false;\n @Input() apPopmenuDisabled = false;\n @Input() apPopmenuBackground = true;\n @Input() arrow = false;\n @Input() arrowOffset: number | undefined;\n @Input() arrowPosition: PopmenuArrowPosition | string | undefined;\n @Input() close = false;\n @Input() hasBackdrop: boolean = true;\n @Input() backdropClass = '';\n @Input() panelClass: string | undefined;\n @Input() offset: number | undefined;\n @Input() offsets: { distance?: number; skidding?: number } | undefined;\n @Input() placement: PopmenuPlacement | string = 'bottom';\n\n @Input() pointer = true;\n @Input('apPopmenu') popMenuValue!: TemplateRef<any>;\n @Input() position: { top: number; left: number } | undefined;\n @Input() rounded = false;\n @Input() shadow = false;\n @Output() menuClosed: EventEmitter<void> = new EventEmitter<void>();\n @Output() menuOpened: EventEmitter<void> = new EventEmitter<void>();\n\n componentElement!: HTMLElement;\n hideTimeoutId: number | undefined;\n destroyTimeoutId: number | undefined;\n createTimeoutId: number | undefined;\n showTimeoutId: number | undefined;\n componentRef!: ComponentRef<any>;\n elementPosition: any;\n componentSubscribe: any;\n _defaultOptions: any;\n\n _options: PopmenuOptions = {};\n\n get options() {\n return this._options;\n }\n\n @Input() set options(value: PopmenuOptions) {\n if (value && defaultOptions) {\n this._options = value;\n }\n }\n\n get destroyDelay() {\n return Number(this.getHideDelay()) + Number(this.options['animationDuration']);\n }\n\n get isDisplayOnHover(): boolean {\n if (this.options['display'] === false) {\n return false;\n }\n\n if (this.options['displayTouchscreen'] === false) {\n return false;\n }\n\n if (this.options['trigger'] !== 'hover') {\n return false;\n }\n\n return true;\n }\n\n get isTooltipDestroyed() {\n return this.componentRef && this.componentRef.hostView.destroyed;\n }\n\n get tooltipPosition() {\n if (this.options['position']) {\n return this.options['position'];\n } else {\n return this.elementPosition;\n }\n }\n\n constructor(\n @Optional() @Inject(PopmenuOptionsService) private initOptions: PopmenuOptions,\n public renderer: Renderer2,\n private elementRef: ElementRef,\n private appRef: ApplicationRef,\n private injector: Injector,\n private environmentInjector: EnvironmentInjector\n ) {}\n\n appendComponentToBody(component: any): void {\n this.componentRef = createComponent(component, {\n environmentInjector: this.environmentInjector,\n elementInjector: this.injector,\n });\n\n (<AdComponent>this.componentRef.instance).data = {\n value: this.popMenuValue,\n element: this.elementRef.nativeElement,\n elementPosition: this.tooltipPosition,\n options: this.options,\n };\n this.appRef.attachView(this.componentRef.hostView);\n this.componentElement = (this.componentRef.hostView as EmbeddedViewRef<any>).rootNodes[0] as HTMLElement;\n document.body.appendChild(this.componentElement);\n this.componentSubscribe = (<AdComponent>this.componentRef.instance).menuClosed.subscribe(() => {\n this.handleClose();\n this.menuOpen = (<AdComponent>this.componentRef.instance).menuOpen;\n });\n this.componentSubscribe = (<AdComponent>this.componentRef.instance).menuOpened.subscribe(() => {\n this.handleOpen();\n this.menuOpen = (<AdComponent>this.componentRef.instance).menuOpen;\n });\n }\n\n @Output()\n menuOpenChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n #menuOpen = false;\n\n @Input()\n get menuOpen() {\n return this.#menuOpen;\n }\n\n set menuOpen(menuOpen: boolean) {\n this.menuOpenChange.emit(menuOpen);\n this.#menuOpen = menuOpen;\n if (this.#menuOpen) {\n this.elementRef.nativeElement.classList.add('popmenu-open');\n this.elementRef.nativeElement.classList.remove('popmenu-close');\n } else {\n this.elementRef.nativeElement.classList.remove('popmenu-open');\n this.elementRef.nativeElement.classList.add('popmenu-close');\n }\n }\n\n handleClose() {\n this.menuClosed.emit();\n }\n\n handleOpen() {\n this.menuOpened.emit();\n }\n\n applyOptionsDefault(defaultOptions: PopmenuOptions, options: PopmenuOptions): void {\n this.options = Object.assign({}, defaultOptions, this.initOptions || {}, options);\n }\n\n clearTimeouts(): void {\n if (this.createTimeoutId) {\n clearTimeout(this.createTimeoutId);\n }\n\n if (this.showTimeoutId) {\n clearTimeout(this.showTimeoutId);\n }\n\n if (this.hideTimeoutId) {\n clearTimeout(this.hideTimeoutId);\n }\n\n if (this.destroyTimeoutId) {\n clearTimeout(this.destroyTimeoutId);\n }\n }\n\n createPopMenu(): void {\n this.clearTimeouts();\n\n this.createTimeoutId = window.setTimeout(() => {\n this.appendComponentToBody(PopmenuComponent);\n }, this.getShowDelay());\n\n this.showTimeoutId = window.setTimeout(() => {\n this.showTooltipElem();\n }, this.getShowDelay());\n }\n\n getElementPosition(): void {\n this.elementPosition = this.elementRef.nativeElement.getBoundingClientRect();\n }\n\n getHideDelay() {\n return this.options['hideDelay'];\n }\n\n getProperties(changes: SimpleChanges) {\n let properties: any = {};\n\n for (const prop in changes) {\n if (prop !== 'options' && prop !== 'tooltipValue') {\n properties[prop] = changes[prop].currentValue;\n }\n if (prop === 'options') {\n properties = changes[prop].currentValue;\n }\n }\n return properties;\n }\n\n getShowDelay() {\n return this.options['showDelay'];\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes.pointer) {\n if (!this.pointer) {\n this.renderer.removeStyle(this.elementRef.nativeElement, 'cursor');\n } else {\n this.renderer.setStyle(this.elementRef.nativeElement, 'cursor', 'pointer');\n }\n }\n if (changes.close && changes.close.currentValue) {\n this.hideTooltipElem();\n }\n const changedOptions = this.getProperties(changes);\n this.applyOptionsDefault(this.options && Object.keys(this.options).length > 0 ? this.options : defaultOptions, changedOptions);\n }\n\n ngOnInit(): void {\n if (this.pointer) {\n this.renderer.setStyle(this.elementRef.nativeElement, 'cursor', 'pointer');\n }\n this.menuOpen = false;\n }\n\n @HostListener('click')\n onClick() {\n if (this.apPopmenuDisabled) {\n return;\n }\n this.show();\n this.close = false;\n }\n\n public show() {\n this.getElementPosition();\n if (!this.componentRef || this.isTooltipDestroyed) {\n this.createPopMenu();\n } else if (!this.isTooltipDestroyed) {\n this.showTooltipElem();\n }\n }\n\n showTooltipElem(): void {\n (<AdComponent>this.componentRef.instance).data = {\n value: this.popMenuValue,\n element: this.elementRef.nativeElement,\n elementPosition: this.tooltipPosition,\n options: this.options,\n };\n this.clearTimeouts();\n (<AdComponent>this.componentRef.instance).show = true;\n }\n\n hideTooltipElem(): void {\n if (this.componentRef) {\n (<AdComponent>this.componentRef.instance).close = true;\n }\n }\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { PopmenuOptions } from './popmenu-options.interface';\nimport { PopmenuOptionsService } from './popmenu-options.service';\nimport { PopmenuComponent } from './popmenu.component';\nimport { PopmenuDirective } from './popmenu.directive';\n\n@NgModule({\n imports: [PopmenuDirective, PopmenuComponent],\n exports: [PopmenuDirective],\n})\nexport class PopmenuModule {\n static forRoot(initOptions: PopmenuOptions): ModuleWithProviders<PopmenuModule> {\n return {\n ngModule: PopmenuModule,\n providers: [\n {\n provide: PopmenuOptionsService,\n useValue: initOptions,\n },\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;MAyBa,gBAAgB,CAAA;AAkId,IAAA,QAAA;AACA,IAAA,UAAA;AACC,IAAA,iBAAA;AAnIH,IAAA,IAAI;AACb,IAAA,MAAM,GAAG,IAAI,YAAY,EAAE;IAC3B,gBAAgB,GAAuB,KAAK;IAC5C,mBAAmB,GAAuB,KAAK;IAC/C,iBAAiB,GAAuB,SAAS;IACjD,kBAAkB,GAAuB,SAAS;IAClD,UAAU,GAAuB,SAAS;IAC1C,KAAK,GAAG,KAAK;IACb,MAAM,GAAG,KAAK;AACJ,IAAA,UAAU,GAAsB,IAAI,YAAY,EAAO;AACvD,IAAA,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N,oBAAA,OAAO,EAAE,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;oBAC7C,OAAO,EAAE,CAAC,gBAAgB,CAAC;AAC9B,iBAAA;;;ACTD;;AAEG;;;;"}
1
+ {"version":3,"file":"agorapulse-ui-components-popmenu.mjs","sources":["../../../libs/ui-components/popmenu/src/popmenu.component.ts","../../../libs/ui-components/popmenu/src/popmenu.component.html","../../../libs/ui-components/popmenu/src/options.ts","../../../libs/ui-components/popmenu/src/popmenu-options.service.ts","../../../libs/ui-components/popmenu/src/popmenu.directive.ts","../../../libs/ui-components/popmenu/src/popmenu.module.ts","../../../libs/ui-components/popmenu/src/agorapulse-ui-components-popmenu.ts"],"sourcesContent":["import { ButtonComponent } from '@agorapulse/ui-components/button';\nimport { StopPropagationDirective } from '@agorapulse/ui-components/directives';\nimport { NgStyle, NgTemplateOutlet } from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n HostBinding,\n Input,\n Output,\n Renderer2,\n ViewChild,\n} from '@angular/core';\nimport { MatMenuModule, MatMenuTrigger } from '@angular/material/menu';\nimport { merge } from 'rxjs';\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'ap-popmenu',\n templateUrl: './popmenu.component.html',\n styleUrls: ['./popmenu.component.scss'],\n imports: [ButtonComponent, MatMenuModule, NgStyle, NgTemplateOutlet, StopPropagationDirective],\n})\nexport class PopmenuComponent implements AfterViewInit {\n @Input() data: any;\n events = new EventEmitter();\n arrowTopPosition: string | undefined = '50%';\n arrowBottomPosition: string | undefined = '50%';\n arrowLeftPosition: string | undefined = undefined;\n arrowRightPosition: string | undefined = undefined;\n arrowClass: string | undefined = undefined;\n below = false;\n before = false;\n @Output() menuClosed: EventEmitter<any> = new EventEmitter<any>();\n @Output() menuOpened: EventEmitter<any> = new EventEmitter<any>();\n @ViewChild(MatMenuTrigger) trigger!: MatMenuTrigger;\n @HostBinding('style.top') hostStyleTop = '';\n @HostBinding('style.border-radius') hostStyleBorderRadius = '';\n @HostBinding('style.left') hostStyleLeft = '';\n @HostBinding('style.z-index') hostStyleZIndex = 0;\n @HostBinding('style.transition') hostStyleTransition = '';\n @HostBinding('style.width') hostStyleWidth = '';\n @HostBinding('style.max-width') hostStyleMaxWidth = '';\n @HostBinding('style.pointer-events') hostStylePointerEvents = '';\n @HostBinding('class.tooltip-show') hostClassShow = false;\n @HostBinding('class.tooltip-shadow') hostClassShadow = false;\n @HostBinding('class.tooltip-light') hostClassLight = false;\n viewInit = false;\n\n _show = false;\n\n get show(): boolean {\n return this._show;\n }\n\n @Input() set show(value: boolean) {\n if (value) {\n this.setPosition();\n }\n this._show = value;\n }\n\n @Input() set close(value: boolean) {\n if (value) {\n setTimeout(() => {\n this.trigger.closeMenu();\n }, 100);\n }\n }\n\n menuOpen = false;\n\n get arrow() {\n return this.data.options.arrow && this.border;\n }\n\n get arrowOffset() {\n return this.data.options.arrowOffset;\n }\n\n get arrowPosition() {\n return this.data.options.arrowPosition;\n }\n\n get autoPlacement() {\n return this.data.options.autoPlacement;\n }\n\n get background() {\n return this.data.options.apPopmenuBackground;\n }\n\n get border() {\n return this.data.options.apPopmenuBorder;\n }\n\n get element() {\n return this.data.element;\n }\n\n get elementPosition() {\n return this.data.elementPosition;\n }\n\n get hasBackdrop() {\n return this.data.options.hasBackdrop;\n }\n\n get backdropClass() {\n return this.data.options.backdropClass;\n }\n\n get isThemeLight() {\n return this.options['theme'] === 'light';\n }\n\n get options() {\n return this.data.options;\n }\n\n get panelClass() {\n return this.data.options.panelClass;\n }\n\n get placement() {\n return this.data.options.placement;\n }\n\n get rounded() {\n return this.data.options.rounded;\n }\n\n get shadow() {\n return this.data.options.shadow;\n }\n\n get tooltipOffset(): number {\n return Number(this.data.options.offset);\n }\n\n get offsetSkidding(): number {\n return Number(this.data.options.offsets.skidding) || 0;\n }\n\n get offsetDistance(): number {\n return Number(this.data.options.offsets.distance || 0);\n }\n\n get value() {\n return this.data.value;\n }\n\n constructor(\n public renderer: Renderer2,\n public elementRef: ElementRef<HTMLElement>,\n private changeDetectorRef: ChangeDetectorRef\n ) {}\n\n ngAfterViewInit() {\n this.viewInit = true;\n merge(this.trigger.menuOpened, this.trigger.menuClosed).subscribe(() => {\n this.menuOpen = this.trigger.menuOpen;\n });\n }\n\n onMenuClosed() {\n // we set a timeout to wait for the menu to be really closed\n setTimeout(() => this.menuClosed.emit(), 200);\n }\n\n onMenuOpened() {\n // we set a timeout to wait for the menu to be really opened\n setTimeout(() => this.menuOpened.emit(), 100);\n }\n\n setHostStyle(placement: string): boolean {\n const tooltip = this.elementRef.nativeElement;\n const isCustomPosition = !this.elementPosition.x;\n\n let elementHeight = !this.element.offsetHeight ? this.element.getBoundingClientRect().height : this.element.offsetHeight;\n let elementWidth = !this.element.offsetWidth ? this.element.getBoundingClientRect().width : this.element.offsetWidth;\n const tooltipHeight = tooltip.clientHeight;\n const tooltipWidth = tooltip.clientWidth;\n const scrollY = window.pageYOffset;\n\n let topStyle;\n let leftStyle;\n\n if (isCustomPosition) {\n if (placement && placement.split(' ')[0] === 'top') {\n this.below = false;\n }\n if (placement && placement.split(' ')[0] === 'bottom') {\n this.below = true;\n }\n elementHeight = 0;\n elementWidth = 0;\n topStyle = this.elementPosition.top;\n leftStyle = this.elementPosition.left;\n if (this.arrow && this.arrowPosition) {\n this.arrowClass = 'arrow-' + this.arrowPosition;\n switch (this.arrowPosition) {\n case 'left':\n case 'right':\n this.arrowLeftPosition = undefined;\n this.arrowRightPosition = undefined;\n this.arrowBottomPosition = 'auto';\n this.arrowTopPosition = this.arrowOffset + '%';\n break;\n case 'top':\n case 'bottom':\n this.arrowLeftPosition = this.arrowOffset + '%';\n this.arrowRightPosition = 'auto';\n this.arrowBottomPosition = undefined;\n this.arrowTopPosition = undefined;\n break;\n }\n }\n } else {\n if (placement.split(' ')[0] === 'top') {\n this.below = false;\n topStyle = this.elementPosition.top - this.tooltipOffset - this.offsetDistance;\n topStyle += 8;\n }\n\n if (placement.split(' ')[0] === 'bottom') {\n this.below = true;\n topStyle = this.elementPosition.bottom + this.tooltipOffset + this.offsetDistance;\n // We remove 8px due to the margin-top we put to display the arrow.\n topStyle -= 8;\n }\n\n if (placement.split(' ')[0] === 'left') {\n leftStyle = this.elementPosition.left - tooltipWidth - this.tooltipOffset - this.offsetDistance;\n }\n\n if (placement.split(' ')[0] === 'right') {\n leftStyle = this.elementPosition.left + elementWidth + this.tooltipOffset + this.offsetDistance;\n }\n\n if (placement.split(' ')[0] === 'left' || placement.split(' ')[0] === 'right') {\n topStyle = this.elementPosition.top + scrollY + elementHeight / 2 - tooltip.clientHeight / 2;\n }\n\n if (placement === 'right bottom') {\n this.below = true;\n this.before = false;\n this.arrowClass = 'arrow-left';\n topStyle = this.elementPosition.top + scrollY + this.offsetSkidding;\n this.arrowRightPosition = undefined;\n this.arrowLeftPosition = undefined;\n this.arrowBottomPosition = 'auto';\n this.arrowTopPosition = this.arrowOffset ? this.arrowOffset + '%' : elementHeight / 2 + 'px';\n }\n\n if (placement === 'left bottom') {\n this.below = true;\n this.before = true;\n this.arrowClass = 'arrow-right';\n topStyle = this.elementPosition.top + scrollY + this.offsetSkidding;\n this.arrowLeftPosition = undefined;\n this.arrowRightPosition = undefined;\n this.arrowBottomPosition = 'auto';\n this.arrowTopPosition = this.arrowOffset ? this.arrowOffset + '%' : elementHeight / 2 + 'px';\n }\n\n if (placement === 'right top') {\n this.below = false;\n this.before = false;\n this.arrowClass = 'arrow-left';\n topStyle = this.elementPosition.top + elementHeight + scrollY + this.offsetSkidding;\n this.arrowLeftPosition = undefined;\n this.arrowRightPosition = undefined;\n this.arrowTopPosition = 'auto';\n this.arrowBottomPosition = this.arrowOffset ? this.arrowOffset + '%' : -(tooltip.clientHeight - elementHeight / 2) + 'px';\n }\n\n if (placement === 'left top') {\n this.below = false;\n this.before = true;\n this.arrowClass = 'arrow-right';\n topStyle = this.elementPosition.top + elementHeight + scrollY + this.offsetSkidding;\n this.arrowRightPosition = undefined;\n this.arrowLeftPosition = undefined;\n this.arrowTopPosition = 'auto';\n this.arrowBottomPosition = this.arrowOffset ? this.arrowOffset + '%' : -(tooltip.clientHeight - elementHeight / 2) + 'px';\n }\n\n if (placement === 'bottom right') {\n this.before = false;\n this.below = true;\n this.arrowClass = 'arrow-top';\n leftStyle = this.elementPosition.left + this.offsetSkidding;\n this.arrowTopPosition = undefined;\n this.arrowRightPosition = 'auto';\n this.arrowLeftPosition = this.arrowOffset ? this.arrowOffset + '%' : elementWidth / 2 - 4.5 + 'px';\n }\n\n if (placement === 'bottom left') {\n this.before = true;\n this.below = true;\n this.arrowClass = 'arrow-top';\n leftStyle = this.elementPosition.right + this.offsetSkidding;\n this.arrowTopPosition = undefined;\n this.arrowLeftPosition = 'auto';\n this.arrowRightPosition = this.arrowOffset ? this.arrowOffset + '%' : elementWidth / 2 - 2.5 + 'px';\n }\n\n if (placement === 'top right') {\n this.before = false;\n this.below = false;\n this.arrowClass = 'arrow-bottom';\n leftStyle = this.elementPosition.left + this.offsetSkidding;\n this.arrowBottomPosition = undefined;\n this.arrowTopPosition = undefined;\n this.arrowRightPosition = 'auto';\n this.arrowLeftPosition = this.arrowOffset ? this.arrowOffset + '%' : elementWidth / 2 - 4.5 + 'px';\n }\n\n if (placement === 'top left') {\n this.before = true;\n this.below = false;\n this.arrowClass = 'arrow-bottom';\n leftStyle = this.elementPosition.right + this.offsetSkidding;\n this.arrowBottomPosition = undefined;\n this.arrowTopPosition = undefined;\n this.arrowLeftPosition = 'auto';\n this.arrowRightPosition = this.arrowOffset ? this.arrowOffset + '%' : elementWidth / 2 - 2.5 + 'px';\n }\n }\n\n // This line is PURE MAGIC and super important. It allows to force mat-menu\n // to reposition the menu with the new xPosition / yPosition.\n this.changeDetectorRef.detectChanges();\n\n const topEdge = topStyle;\n const bottomEdge = topStyle + tooltipHeight;\n const leftEdge = leftStyle;\n const rightEdge = leftStyle + tooltipWidth;\n\n if (\n (topEdge < 0 || bottomEdge > document.body.clientHeight || leftEdge < 0 || rightEdge > document.body.clientWidth) &&\n this.autoPlacement\n ) {\n return false;\n }\n\n this.hostStyleTop = topStyle + 'px';\n this.hostStyleLeft = leftStyle + 'px';\n return true;\n }\n\n setPlacementClass(placement?: string): void {\n this.renderer.addClass(this.elementRef.nativeElement, 'tooltip-' + (placement ? placement.split(' ')[0] : placement));\n this.renderer.addClass(\n this.elementRef.nativeElement,\n 'yPosition-' + (placement && placement.split(' ').length === 2 ? placement.split(' ')[1] : 'center')\n );\n\n if (this.elementRef.nativeElement.children && this.elementRef.nativeElement.children.length > 1) {\n const tooltipArrow = Array.from(this.elementRef.nativeElement.children).filter(\n (child: Element) => child.getAttribute('id') === 'tooltipArrow'\n );\n if (tooltipArrow && tooltipArrow.length === 1) {\n if (placement && placement.split(' ').length === 2 && placement.split(' ')[1] === 'bottom') {\n this.renderer.setStyle(tooltipArrow[0], 'top', this.arrowTopPosition);\n } else if (placement && placement.split(' ').length === 2 && placement.split(' ')[1] === 'top') {\n this.renderer.setStyle(tooltipArrow[0], 'top', this.arrowBottomPosition);\n }\n }\n }\n }\n\n setPosition(): void {\n if (this.setHostStyle(this.placement)) {\n this.setPlacementClass(this.placement);\n if (this.viewInit) {\n // We did this in order to reset overlayRef (multi web component needed with matmenu and cdk overlay)\n if (this.trigger['_overlayRef']) {\n this.trigger['_overlayRef'].dispose();\n this.trigger['_overlayRef'] = null;\n }\n this.trigger.openMenu();\n }\n return;\n } else {\n const placements = ['top', 'right', 'bottom', 'left'];\n\n for (const placement of placements) {\n if (this.setHostStyle(placement)) {\n this.setPlacementClass(placement);\n if (this.viewInit) {\n this.trigger.openMenu();\n }\n return;\n }\n }\n }\n }\n}\n","<button\n id=\"menuTrigger\"\n class=\"button-trigger\"\n mat-button\n [matMenuTriggerFor]=\"menu\"\n (menuClosed)=\"onMenuClosed()\"\n (menuOpened)=\"onMenuOpened()\"></button>\n<mat-menu\n #menu=\"matMenu\"\n [yPosition]=\"!below ? 'above' : 'below'\"\n [xPosition]=\"!before ? 'after' : 'before'\"\n [overlapTrigger]=\"false\"\n [hasBackdrop]=\"hasBackdrop\"\n [backdropClass]=\"backdropClass\"\n class=\"pop-menu {{ arrow ? 'arrow-before ' + arrowClass : '' }} {{ shadow ? 'shadow' : '' }} {{\n border ? '' : shadow ? 'shadow-no-border' : ''\n }} {{ rounded ? 'rounded-component' : '' }} {{ background ? '' : 'no-background' }} {{ panelClass }}\">\n @if (arrow) {\n <div\n class=\"{{ arrow ? 'arrow-before ' + arrowClass : '' }}\"\n [ngStyle]=\"{ left: arrowLeftPosition, right: arrowRightPosition, top: arrowTopPosition, bottom: arrowBottomPosition }\"></div>\n }\n <div\n class=\"{{ rounded ? 'rounded-component' : '' }} outline-none\"\n apStopPropagation>\n <div class=\"{{ border ? 'popover-content ' : '' }} {{ rounded ? 'rounded-component' : '' }}\">\n <ng-container *ngTemplateOutlet=\"value; context: { menu: this }\" />\n </div>\n </div>\n</mat-menu>\n","export const defaultOptions = {\n apPopmenuBorder: true,\n apPopmenuDisabled: false,\n apPopmenuBackground: true,\n hasBackdrop: true,\n placement: 'top',\n rounded: true,\n showDelay: 0,\n hideDelay: 10,\n hideDelayMobile: 0,\n shadow: true,\n theme: 'dark',\n offset: 8,\n offsets: {},\n maxWidth: '600',\n};\n","import { InjectionToken } from '@angular/core';\nimport { PopmenuOptions } from './popmenu-options.interface';\n\n/**\n * This is not a real service, but it looks like it from the outside.\n * It's just an InjectionToken used to import the config (initOptions) object, provided from the outside\n */\nexport const PopmenuOptionsService = new InjectionToken<PopmenuOptions>('PopmenuOptions');\n","import {\n ApplicationRef,\n ComponentRef,\n Directive,\n ElementRef,\n EmbeddedViewRef,\n EnvironmentInjector,\n EventEmitter,\n HostListener,\n Inject,\n Injector,\n Input,\n OnChanges,\n OnInit,\n Optional,\n Output,\n Renderer2,\n SimpleChanges,\n TemplateRef,\n createComponent,\n} from '@angular/core';\nimport { defaultOptions } from './options';\nimport { PopmenuOptions } from './popmenu-options.interface';\nimport { PopmenuOptionsService } from './popmenu-options.service';\nimport { PopmenuComponent } from './popmenu.component';\n\nexport interface AdComponent {\n data: any;\n show: boolean;\n close: boolean;\n menuClosed: any;\n menuOpened: any;\n menuOpen: boolean;\n}\n\nexport type PopmenuPlacement =\n | 'bottom'\n | 'top'\n | 'left'\n | 'right'\n | 'bottom right'\n | 'bottom left'\n | 'right bottom'\n | 'left bottom'\n | 'top right'\n | 'top left'\n | 'right top'\n | 'left top';\n\nexport type PopmenuArrowPosition = 'left' | 'right' | 'top' | 'bottom';\n\n/**\n * @deprecated This directive is deprecated and will be removed in future versions.\n * Use `ActionDropdownComponent` instead.\n */\n@Directive({\n selector: '[apPopmenu]',\n standalone: true,\n})\nexport class PopmenuDirective implements OnChanges, OnInit {\n @Input() apPopmenuBorder = false;\n @Input() apPopmenuDisabled = false;\n @Input() apPopmenuBackground = true;\n @Input() arrow = false;\n @Input() arrowOffset: number | undefined;\n @Input() arrowPosition: PopmenuArrowPosition | string | undefined;\n @Input() close = false;\n @Input() hasBackdrop: boolean = true;\n @Input() backdropClass = '';\n @Input() panelClass: string | undefined;\n @Input() offset: number | undefined;\n @Input() offsets: { distance?: number; skidding?: number } | undefined;\n @Input() placement: PopmenuPlacement | string = 'bottom';\n\n @Input() pointer = true;\n @Input('apPopmenu') popMenuValue!: TemplateRef<any>;\n @Input() position: { top: number; left: number } | undefined;\n @Input() rounded = false;\n @Input() shadow = false;\n @Output() menuClosed: EventEmitter<void> = new EventEmitter<void>();\n @Output() menuOpened: EventEmitter<void> = new EventEmitter<void>();\n\n componentElement!: HTMLElement;\n hideTimeoutId: number | undefined;\n destroyTimeoutId: number | undefined;\n createTimeoutId: number | undefined;\n showTimeoutId: number | undefined;\n componentRef!: ComponentRef<any>;\n elementPosition: any;\n componentSubscribe: any;\n _defaultOptions: any;\n\n _options: PopmenuOptions = {};\n\n get options() {\n return this._options;\n }\n\n @Input() set options(value: PopmenuOptions) {\n if (value && defaultOptions) {\n this._options = value;\n }\n }\n\n get destroyDelay() {\n return Number(this.getHideDelay()) + Number(this.options['animationDuration']);\n }\n\n get isDisplayOnHover(): boolean {\n if (this.options['display'] === false) {\n return false;\n }\n\n if (this.options['displayTouchscreen'] === false) {\n return false;\n }\n\n if (this.options['trigger'] !== 'hover') {\n return false;\n }\n\n return true;\n }\n\n get isTooltipDestroyed() {\n return this.componentRef && this.componentRef.hostView.destroyed;\n }\n\n get tooltipPosition() {\n if (this.options['position']) {\n return this.options['position'];\n } else {\n return this.elementPosition;\n }\n }\n\n constructor(\n @Optional() @Inject(PopmenuOptionsService) private initOptions: PopmenuOptions,\n public renderer: Renderer2,\n private elementRef: ElementRef,\n private appRef: ApplicationRef,\n private injector: Injector,\n private environmentInjector: EnvironmentInjector\n ) {}\n\n appendComponentToBody(component: any): void {\n this.componentRef = createComponent(component, {\n environmentInjector: this.environmentInjector,\n elementInjector: this.injector,\n });\n\n (<AdComponent>this.componentRef.instance).data = {\n value: this.popMenuValue,\n element: this.elementRef.nativeElement,\n elementPosition: this.tooltipPosition,\n options: this.options,\n };\n this.appRef.attachView(this.componentRef.hostView);\n this.componentElement = (this.componentRef.hostView as EmbeddedViewRef<any>).rootNodes[0] as HTMLElement;\n document.body.appendChild(this.componentElement);\n this.componentSubscribe = (<AdComponent>this.componentRef.instance).menuClosed.subscribe(() => {\n this.handleClose();\n this.menuOpen = (<AdComponent>this.componentRef.instance).menuOpen;\n });\n this.componentSubscribe = (<AdComponent>this.componentRef.instance).menuOpened.subscribe(() => {\n this.handleOpen();\n this.menuOpen = (<AdComponent>this.componentRef.instance).menuOpen;\n });\n }\n\n @Output()\n menuOpenChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n #menuOpen = false;\n\n @Input()\n get menuOpen() {\n return this.#menuOpen;\n }\n\n set menuOpen(menuOpen: boolean) {\n this.menuOpenChange.emit(menuOpen);\n this.#menuOpen = menuOpen;\n if (this.#menuOpen) {\n this.elementRef.nativeElement.classList.add('popmenu-open');\n this.elementRef.nativeElement.classList.remove('popmenu-close');\n } else {\n this.elementRef.nativeElement.classList.remove('popmenu-open');\n this.elementRef.nativeElement.classList.add('popmenu-close');\n }\n }\n\n handleClose() {\n this.menuClosed.emit();\n }\n\n handleOpen() {\n this.menuOpened.emit();\n }\n\n applyOptionsDefault(defaultOptions: PopmenuOptions, options: PopmenuOptions): void {\n this.options = Object.assign({}, defaultOptions, this.initOptions || {}, options);\n }\n\n clearTimeouts(): void {\n if (this.createTimeoutId) {\n clearTimeout(this.createTimeoutId);\n }\n\n if (this.showTimeoutId) {\n clearTimeout(this.showTimeoutId);\n }\n\n if (this.hideTimeoutId) {\n clearTimeout(this.hideTimeoutId);\n }\n\n if (this.destroyTimeoutId) {\n clearTimeout(this.destroyTimeoutId);\n }\n }\n\n createPopMenu(): void {\n this.clearTimeouts();\n\n this.createTimeoutId = window.setTimeout(() => {\n this.appendComponentToBody(PopmenuComponent);\n }, this.getShowDelay());\n\n this.showTimeoutId = window.setTimeout(() => {\n this.showTooltipElem();\n }, this.getShowDelay());\n }\n\n getElementPosition(): void {\n this.elementPosition = this.elementRef.nativeElement.getBoundingClientRect();\n }\n\n getHideDelay() {\n return this.options['hideDelay'];\n }\n\n getProperties(changes: SimpleChanges) {\n let properties: any = {};\n\n for (const prop in changes) {\n if (prop !== 'options' && prop !== 'tooltipValue') {\n properties[prop] = changes[prop].currentValue;\n }\n if (prop === 'options') {\n properties = changes[prop].currentValue;\n }\n }\n return properties;\n }\n\n getShowDelay() {\n return this.options['showDelay'];\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes.pointer) {\n if (!this.pointer) {\n this.renderer.removeStyle(this.elementRef.nativeElement, 'cursor');\n } else {\n this.renderer.setStyle(this.elementRef.nativeElement, 'cursor', 'pointer');\n }\n }\n if (changes.close && changes.close.currentValue) {\n this.hideTooltipElem();\n }\n const changedOptions = this.getProperties(changes);\n this.applyOptionsDefault(this.options && Object.keys(this.options).length > 0 ? this.options : defaultOptions, changedOptions);\n }\n\n ngOnInit(): void {\n if (this.pointer) {\n this.renderer.setStyle(this.elementRef.nativeElement, 'cursor', 'pointer');\n }\n this.menuOpen = false;\n }\n\n @HostListener('click')\n onClick() {\n if (this.apPopmenuDisabled) {\n return;\n }\n this.show();\n this.close = false;\n }\n\n public show() {\n this.getElementPosition();\n if (!this.componentRef || this.isTooltipDestroyed) {\n this.createPopMenu();\n } else if (!this.isTooltipDestroyed) {\n this.showTooltipElem();\n }\n }\n\n showTooltipElem(): void {\n (<AdComponent>this.componentRef.instance).data = {\n value: this.popMenuValue,\n element: this.elementRef.nativeElement,\n elementPosition: this.tooltipPosition,\n options: this.options,\n };\n this.clearTimeouts();\n (<AdComponent>this.componentRef.instance).show = true;\n }\n\n hideTooltipElem(): void {\n if (this.componentRef) {\n (<AdComponent>this.componentRef.instance).close = true;\n }\n }\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { PopmenuOptions } from './popmenu-options.interface';\nimport { PopmenuOptionsService } from './popmenu-options.service';\nimport { PopmenuComponent } from './popmenu.component';\nimport { PopmenuDirective } from './popmenu.directive';\n\n@NgModule({\n imports: [PopmenuDirective, PopmenuComponent],\n exports: [PopmenuDirective],\n})\nexport class PopmenuModule {\n static forRoot(initOptions: PopmenuOptions): ModuleWithProviders<PopmenuModule> {\n return {\n ngModule: PopmenuModule,\n providers: [\n {\n provide: PopmenuOptionsService,\n useValue: initOptions,\n },\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;MA0Ba,gBAAgB,CAAA;AAkId,IAAA,QAAA;AACA,IAAA,UAAA;AACC,IAAA,iBAAA;AAnIH,IAAA,IAAI;AACb,IAAA,MAAM,GAAG,IAAI,YAAY,EAAE;IAC3B,gBAAgB,GAAuB,KAAK;IAC5C,mBAAmB,GAAuB,KAAK;IAC/C,iBAAiB,GAAuB,SAAS;IACjD,kBAAkB,GAAuB,SAAS;IAClD,UAAU,GAAuB,SAAS;IAC1C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EAAA,CAAA;AAEjB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,YAHM,gBAAgB,CAAA,EAAA,CAAA;;2FAGnC,aAAa,EAAA,UAAA,EAAA,CAAA;kBAJzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;oBAC7C,OAAO,EAAE,CAAC,gBAAgB,CAAC;AAC9B,iBAAA;;;ACTD;;AAEG;;;;"}
@@ -0,0 +1,200 @@
1
+ import { CloseButtonComponent } from '@agorapulse/ui-components/close-button';
2
+ import { CdkTrapFocus } from '@angular/cdk/a11y';
3
+ import { NgTemplateOutlet } from '@angular/common';
4
+ import * as i0 from '@angular/core';
5
+ import { input, output, computed, ChangeDetectionStrategy, Component, inject, ElementRef, Directive } from '@angular/core';
6
+ import { createFloatingOverlay } from '@agorapulse/ui-components/floating';
7
+
8
+ /**
9
+ * The `role="dialog"` surface, its optional header and its focus trap. Instantiated by the popover
10
+ * directive, never by a consumer.
11
+ *
12
+ * Focus is the CDK's: `cdkTrapFocus` confines Tab, `autoCapture` focuses on open and restores the
13
+ * trigger on destruction. The cost is that Tab cannot leave the panel — Escape or the button do.
14
+ */
15
+ class PopoverPanelComponent {
16
+ static nextId = 0;
17
+ /** The consumer's content. Always a template: the directive sits on the trigger, not here. */
18
+ content = input.required(/* @ts-ignore */
19
+ ...(ngDevMode ? [{ debugName: "content" }] : /* istanbul ignore next */ []));
20
+ /** Mirrors the popover's heading, and gives the dialog its accessible name. */
21
+ heading = input(/* @ts-ignore */
22
+ ...(ngDevMode ? [undefined, { debugName: "heading" }] : /* istanbul ignore next */ []));
23
+ /** Mirrors the popover's input of the same name. */
24
+ closable = input(false, /* @ts-ignore */
25
+ ...(ngDevMode ? [{ debugName: "closable" }] : /* istanbul ignore next */ []));
26
+ /** Mirrors the popover's backdrop, which is what makes the page genuinely inert. */
27
+ backdrop = input(false, /* @ts-ignore */
28
+ ...(ngDevMode ? [{ debugName: "backdrop" }] : /* istanbul ignore next */ []));
29
+ /** Mirrors the popover's, and names the dialog when there is no heading. */
30
+ ariaLabel = input(/* @ts-ignore */
31
+ ...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
32
+ closeAriaLabel = input('Close', /* @ts-ignore */
33
+ ...(ngDevMode ? [{ debugName: "closeAriaLabel" }] : /* istanbul ignore next */ []));
34
+ /** Set by the directive, which needs it for the trigger's `aria-controls`. */
35
+ panelId = input('', /* @ts-ignore */
36
+ ...(ngDevMode ? [{ debugName: "panelId" }] : /* istanbul ignore next */ []));
37
+ /**
38
+ * The id of the element that names the dialog when nothing else does — the trigger, set by the
39
+ * directive. An id rather than its text, so the name is computed on the live DOM: that follows a
40
+ * label that changes, and reads a trigger whose own name is an `aria-label`.
41
+ */
42
+ fallbackLabelId = input(/* @ts-ignore */
43
+ ...(ngDevMode ? [undefined, { debugName: "fallbackLabelId" }] : /* istanbul ignore next */ []));
44
+ closed = output();
45
+ headingId = `ap-popover-heading-${PopoverPanelComponent.nextId++}`;
46
+ /** A dialog must be named. The heading does it, failing that the trigger. */
47
+ labelledBy = computed(() => {
48
+ if (this.heading()) {
49
+ return this.headingId;
50
+ }
51
+ return this.ariaLabel() ? null : (this.fallbackLabelId() ?? null);
52
+ }, /* @ts-ignore */
53
+ ...(ngDevMode ? [{ debugName: "labelledBy" }] : /* istanbul ignore next */ []));
54
+ label = computed(() => (this.heading() ? null : (this.ariaLabel() ?? null)), /* @ts-ignore */
55
+ ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
56
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: PopoverPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
57
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: PopoverPanelComponent, isStandalone: true, selector: "ap-popover-panel", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: true, transformFunction: null }, heading: { classPropertyName: "heading", publicName: "heading", isSignal: true, isRequired: false, transformFunction: null }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null }, backdrop: { classPropertyName: "backdrop", publicName: "backdrop", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, closeAriaLabel: { classPropertyName: "closeAriaLabel", publicName: "closeAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, panelId: { classPropertyName: "panelId", publicName: "panelId", isSignal: true, isRequired: false, transformFunction: null }, fallbackLabelId: { classPropertyName: "fallbackLabelId", publicName: "fallbackLabelId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, ngImport: i0, template: "<div\n cdkTrapFocus\n [cdkTrapFocusAutoCapture]=\"true\">\n <div\n class=\"ap-popover__panel\"\n role=\"dialog\"\n tabindex=\"-1\"\n cdkFocusInitial\n [id]=\"panelId()\"\n [attr.aria-modal]=\"backdrop() || null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-label]=\"label()\">\n @if (heading() || closable()) {\n <div class=\"ap-popover__header\">\n @if (heading()) {\n <h2\n class=\"ap-popover__heading\"\n [id]=\"headingId\">\n {{ heading() }}\n </h2>\n }\n @if (closable()) {\n <ap-close-button\n [ariaLabel]=\"closeAriaLabel()\"\n (closed)=\"closed.emit()\" />\n }\n </div>\n }\n <ng-container [ngTemplateOutlet]=\"content()\" />\n </div>\n</div>\n", styles: [":host{display:block;box-sizing:border-box;background-color:var(--comp-popover-background-color);border-radius:var(--comp-popover-border-radius);box-shadow:var(--comp-popover-box-shadow);padding:var(--comp-popover-padding)}.ap-popover__header{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--comp-popover-header-gap);margin-bottom:var(--comp-popover-header-margin-bottom)}.ap-popover__heading{margin:0;color:var(--comp-popover-heading-color);font-family:var(--comp-popover-heading-font-family);font-size:var(--comp-popover-heading-size);font-weight:var(--comp-popover-heading-weight);line-height:var(--comp-popover-heading-line-height)}\n"], dependencies: [{ kind: "directive", type: CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "component", type: CloseButtonComponent, selector: "ap-close-button", inputs: ["disabled", "ariaLabel", "dataTest"], outputs: ["closed"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
58
+ }
59
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: PopoverPanelComponent, decorators: [{
60
+ type: Component,
61
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'ap-popover-panel', imports: [CdkTrapFocus, CloseButtonComponent, NgTemplateOutlet], template: "<div\n cdkTrapFocus\n [cdkTrapFocusAutoCapture]=\"true\">\n <div\n class=\"ap-popover__panel\"\n role=\"dialog\"\n tabindex=\"-1\"\n cdkFocusInitial\n [id]=\"panelId()\"\n [attr.aria-modal]=\"backdrop() || null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-label]=\"label()\">\n @if (heading() || closable()) {\n <div class=\"ap-popover__header\">\n @if (heading()) {\n <h2\n class=\"ap-popover__heading\"\n [id]=\"headingId\">\n {{ heading() }}\n </h2>\n }\n @if (closable()) {\n <ap-close-button\n [ariaLabel]=\"closeAriaLabel()\"\n (closed)=\"closed.emit()\" />\n }\n </div>\n }\n <ng-container [ngTemplateOutlet]=\"content()\" />\n </div>\n</div>\n", styles: [":host{display:block;box-sizing:border-box;background-color:var(--comp-popover-background-color);border-radius:var(--comp-popover-border-radius);box-shadow:var(--comp-popover-box-shadow);padding:var(--comp-popover-padding)}.ap-popover__header{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--comp-popover-header-gap);margin-bottom:var(--comp-popover-header-margin-bottom)}.ap-popover__heading{margin:0;color:var(--comp-popover-heading-color);font-family:var(--comp-popover-heading-font-family);font-size:var(--comp-popover-heading-size);font-weight:var(--comp-popover-heading-weight);line-height:var(--comp-popover-heading-line-height)}\n"] }]
62
+ }], propDecorators: { content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: true }] }], heading: [{ type: i0.Input, args: [{ isSignal: true, alias: "heading", required: false }] }], closable: [{ type: i0.Input, args: [{ isSignal: true, alias: "closable", required: false }] }], backdrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "backdrop", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], closeAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeAriaLabel", required: false }] }], panelId: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelId", required: false }] }], fallbackLabelId: [{ type: i0.Input, args: [{ isSignal: true, alias: "fallbackLabelId", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }] } });
63
+
64
+ /**
65
+ * A click-triggered interactive panel: `role="dialog"`, managed focus, Escape, optional backdrop.
66
+ * A tooltip is the opposite — descriptive, hover-triggered, and never focusable.
67
+ *
68
+ * Sits on the **trigger**, so it owns the trigger's ARIA and the content is always a `TemplateRef`.
69
+ * Inputs are prefixed one by one rather than bundled: an inline config object would be recreated on
70
+ * every change-detection cycle and thrash the overlay.
71
+ *
72
+ * @example
73
+ * <button [apPopover]="shareTpl" apPopoverHeading="Share">Share</button>
74
+ * <ng-template #shareTpl>…</ng-template>
75
+ */
76
+ class PopoverDirective {
77
+ static nextId = 0;
78
+ instanceId = PopoverDirective.nextId++;
79
+ floating = createFloatingOverlay();
80
+ triggerElement = inject(ElementRef);
81
+ panelRef = null;
82
+ /** The panel's content. */
83
+ apPopover = input.required(/* @ts-ignore */
84
+ ...(ngDevMode ? [{ debugName: "apPopover" }] : /* istanbul ignore next */ []));
85
+ /** Unset means derived from the anchor mode. There is no `'auto'` value. */
86
+ apPopoverPlacement = input(/* @ts-ignore */
87
+ ...(ngDevMode ? [undefined, { debugName: "apPopoverPlacement" }] : /* istanbul ignore next */ []));
88
+ apPopoverAnchor = input('trigger', /* @ts-ignore */
89
+ ...(ngDevMode ? [{ debugName: "apPopoverAnchor" }] : /* istanbul ignore next */ []));
90
+ apPopoverArrow = input(false, /* @ts-ignore */
91
+ ...(ngDevMode ? [{ debugName: "apPopoverArrow" }] : /* istanbul ignore next */ []));
92
+ apPopoverArrowTarget = input('anchor', /* @ts-ignore */
93
+ ...(ngDevMode ? [{ debugName: "apPopoverArrowTarget" }] : /* istanbul ignore next */ []));
94
+ /** Shows a close button — and, by doing so, makes it *the* way to close: no more outside click. */
95
+ apPopoverClosable = input(false, /* @ts-ignore */
96
+ ...(ngDevMode ? [{ debugName: "apPopoverClosable" }] : /* istanbul ignore next */ []));
97
+ /** Blocks the page behind. Non-modal by default — that is the point of a popover. */
98
+ apPopoverBackdrop = input(false, /* @ts-ignore */
99
+ ...(ngDevMode ? [{ debugName: "apPopoverBackdrop" }] : /* istanbul ignore next */ []));
100
+ /** Optional heading. When set, it becomes the dialog's accessible name. */
101
+ apPopoverHeading = input(/* @ts-ignore */
102
+ ...(ngDevMode ? [undefined, { debugName: "apPopoverHeading" }] : /* istanbul ignore next */ []));
103
+ /** Accessible name used when there is no heading. */
104
+ apPopoverAriaLabel = input(/* @ts-ignore */
105
+ ...(ngDevMode ? [undefined, { debugName: "apPopoverAriaLabel" }] : /* istanbul ignore next */ []));
106
+ /** An input rather than a hard-coded string: several of the DS's own labels read badly. */
107
+ apPopoverCloseAriaLabel = input('Close', /* @ts-ignore */
108
+ ...(ngDevMode ? [{ debugName: "apPopoverCloseAriaLabel" }] : /* istanbul ignore next */ []));
109
+ apPopoverPanelClass = input(/* @ts-ignore */
110
+ ...(ngDevMode ? [undefined, { debugName: "apPopoverPanelClass" }] : /* istanbul ignore next */ []));
111
+ isOpen = this.floating.isOpen;
112
+ panelId = `ap-popover-${this.instanceId}`;
113
+ open(event) {
114
+ if (this.isOpen())
115
+ return;
116
+ this.panelRef = this.floating.open(PopoverPanelComponent, this.triggerElement.nativeElement, {
117
+ placement: this.apPopoverPlacement(),
118
+ anchor: this.apPopoverAnchor(),
119
+ arrow: this.apPopoverArrow(),
120
+ arrowTarget: this.apPopoverArrowTarget(),
121
+ showBackdrop: this.apPopoverBackdrop(),
122
+ panelClass: this.apPopoverPanelClass(),
123
+ // Escape always closes: APG requires it of a dialog. An outside click does not.
124
+ onEscape: () => this.close(),
125
+ onOutsideClick: () => {
126
+ if (!this.apPopoverClosable()) {
127
+ this.close();
128
+ }
129
+ },
130
+ }, event);
131
+ this.panelRef?.setInput('content', this.apPopover());
132
+ this.panelRef?.setInput('panelId', this.panelId);
133
+ this.panelRef?.setInput('heading', this.apPopoverHeading());
134
+ this.panelRef?.setInput('closable', this.apPopoverClosable());
135
+ this.panelRef?.setInput('backdrop', this.apPopoverBackdrop());
136
+ this.panelRef?.setInput('ariaLabel', this.apPopoverAriaLabel());
137
+ this.panelRef?.setInput('closeAriaLabel', this.apPopoverCloseAriaLabel());
138
+ this.panelRef?.setInput('fallbackLabelId', this.ensureTriggerId());
139
+ this.panelRef?.instance.closed.subscribe(() => this.close());
140
+ // Render before repositioning: `attach()` measured an unevaluated template, so the first
141
+ // position is for an empty box and the panel jumps once the content lands.
142
+ this.panelRef?.changeDetectorRef.detectChanges();
143
+ this.floating.updatePosition();
144
+ }
145
+ /** The dialog falls back to being named by its trigger, and `aria-labelledby` needs an id to point at. */
146
+ ensureTriggerId() {
147
+ const trigger = this.triggerElement.nativeElement;
148
+ if (!trigger.id) {
149
+ trigger.id = `ap-popover-trigger-${this.instanceId}`;
150
+ }
151
+ this.warnWhenNameless(trigger);
152
+ return trigger.id;
153
+ }
154
+ /** The residual case the fallback cannot cover: a trigger that names nothing either. */
155
+ warnWhenNameless(trigger) {
156
+ const hasOwnName = Boolean(this.apPopoverHeading()) || Boolean(this.apPopoverAriaLabel());
157
+ // An icon-only trigger has no text but may carry an `aria-label`, which names it just as well.
158
+ const triggerNamesIt = Boolean(trigger.textContent?.trim()) || Boolean(trigger.getAttribute('aria-label'));
159
+ if (hasOwnName || triggerNamesIt) {
160
+ return;
161
+ }
162
+ console.warn(`[Popover] The dialog opened by #${trigger.id} has no accessible name: it has neither a ` +
163
+ 'heading nor an aria-label, and its trigger has no text. Set apPopoverHeading or apPopoverAriaLabel.');
164
+ }
165
+ close() {
166
+ this.panelRef = null;
167
+ this.floating.close();
168
+ }
169
+ toggle(event) {
170
+ if (this.isOpen()) {
171
+ this.close();
172
+ }
173
+ else {
174
+ this.open(event);
175
+ }
176
+ }
177
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: PopoverDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
178
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", type: PopoverDirective, isStandalone: true, selector: "[apPopover]", inputs: { apPopover: { classPropertyName: "apPopover", publicName: "apPopover", isSignal: true, isRequired: true, transformFunction: null }, apPopoverPlacement: { classPropertyName: "apPopoverPlacement", publicName: "apPopoverPlacement", isSignal: true, isRequired: false, transformFunction: null }, apPopoverAnchor: { classPropertyName: "apPopoverAnchor", publicName: "apPopoverAnchor", isSignal: true, isRequired: false, transformFunction: null }, apPopoverArrow: { classPropertyName: "apPopoverArrow", publicName: "apPopoverArrow", isSignal: true, isRequired: false, transformFunction: null }, apPopoverArrowTarget: { classPropertyName: "apPopoverArrowTarget", publicName: "apPopoverArrowTarget", isSignal: true, isRequired: false, transformFunction: null }, apPopoverClosable: { classPropertyName: "apPopoverClosable", publicName: "apPopoverClosable", isSignal: true, isRequired: false, transformFunction: null }, apPopoverBackdrop: { classPropertyName: "apPopoverBackdrop", publicName: "apPopoverBackdrop", isSignal: true, isRequired: false, transformFunction: null }, apPopoverHeading: { classPropertyName: "apPopoverHeading", publicName: "apPopoverHeading", isSignal: true, isRequired: false, transformFunction: null }, apPopoverAriaLabel: { classPropertyName: "apPopoverAriaLabel", publicName: "apPopoverAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, apPopoverCloseAriaLabel: { classPropertyName: "apPopoverCloseAriaLabel", publicName: "apPopoverCloseAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, apPopoverPanelClass: { classPropertyName: "apPopoverPanelClass", publicName: "apPopoverPanelClass", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "toggle($event)" }, properties: { "attr.aria-haspopup": "\"dialog\"", "attr.aria-expanded": "isOpen()", "attr.aria-controls": "isOpen() ? panelId : null" } }, exportAs: ["apPopover"], ngImport: i0 });
179
+ }
180
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: PopoverDirective, decorators: [{
181
+ type: Directive,
182
+ args: [{
183
+ selector: '[apPopover]',
184
+ exportAs: 'apPopover',
185
+ host: {
186
+ '[attr.aria-haspopup]': '"dialog"',
187
+ '[attr.aria-expanded]': 'isOpen()',
188
+ // Only while open: pointing `aria-controls` at an id that does not exist yet is invalid.
189
+ '[attr.aria-controls]': 'isOpen() ? panelId : null',
190
+ '(click)': 'toggle($event)',
191
+ },
192
+ }]
193
+ }], propDecorators: { apPopover: [{ type: i0.Input, args: [{ isSignal: true, alias: "apPopover", required: true }] }], apPopoverPlacement: [{ type: i0.Input, args: [{ isSignal: true, alias: "apPopoverPlacement", required: false }] }], apPopoverAnchor: [{ type: i0.Input, args: [{ isSignal: true, alias: "apPopoverAnchor", required: false }] }], apPopoverArrow: [{ type: i0.Input, args: [{ isSignal: true, alias: "apPopoverArrow", required: false }] }], apPopoverArrowTarget: [{ type: i0.Input, args: [{ isSignal: true, alias: "apPopoverArrowTarget", required: false }] }], apPopoverClosable: [{ type: i0.Input, args: [{ isSignal: true, alias: "apPopoverClosable", required: false }] }], apPopoverBackdrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "apPopoverBackdrop", required: false }] }], apPopoverHeading: [{ type: i0.Input, args: [{ isSignal: true, alias: "apPopoverHeading", required: false }] }], apPopoverAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "apPopoverAriaLabel", required: false }] }], apPopoverCloseAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "apPopoverCloseAriaLabel", required: false }] }], apPopoverPanelClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "apPopoverPanelClass", required: false }] }] } });
194
+
195
+ /**
196
+ * Generated bundle index. Do not edit.
197
+ */
198
+
199
+ export { PopoverDirective, PopoverPanelComponent };
200
+ //# sourceMappingURL=agorapulse-ui-components-popover.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agorapulse-ui-components-popover.mjs","sources":["../../../libs/ui-components/popover/src/popover-panel/popover-panel.component.ts","../../../libs/ui-components/popover/src/popover-panel/popover-panel.component.html","../../../libs/ui-components/popover/src/popover.directive.ts","../../../libs/ui-components/popover/src/agorapulse-ui-components-popover.ts"],"sourcesContent":["import { CloseButtonComponent } from '@agorapulse/ui-components/close-button';\nimport { CdkTrapFocus } from '@angular/cdk/a11y';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, input, output, TemplateRef } from '@angular/core';\n\n/**\n * The `role=\"dialog\"` surface, its optional header and its focus trap. Instantiated by the popover\n * directive, never by a consumer.\n *\n * Focus is the CDK's: `cdkTrapFocus` confines Tab, `autoCapture` focuses on open and restores the\n * trigger on destruction. The cost is that Tab cannot leave the panel — Escape or the button do.\n */\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'ap-popover-panel',\n imports: [CdkTrapFocus, CloseButtonComponent, NgTemplateOutlet],\n templateUrl: 'popover-panel.component.html',\n styleUrls: ['popover-panel.component.scss'],\n})\nexport class PopoverPanelComponent {\n private static nextId = 0;\n\n /** The consumer's content. Always a template: the directive sits on the trigger, not here. */\n readonly content = input.required<TemplateRef<unknown>>();\n\n /** Mirrors the popover's heading, and gives the dialog its accessible name. */\n readonly heading = input<string>();\n\n /** Mirrors the popover's input of the same name. */\n readonly closable = input<boolean>(false);\n\n /** Mirrors the popover's backdrop, which is what makes the page genuinely inert. */\n readonly backdrop = input<boolean>(false);\n\n /** Mirrors the popover's, and names the dialog when there is no heading. */\n readonly ariaLabel = input<string>();\n\n readonly closeAriaLabel = input<string>('Close');\n\n /** Set by the directive, which needs it for the trigger's `aria-controls`. */\n readonly panelId = input<string>('');\n\n /**\n * The id of the element that names the dialog when nothing else does — the trigger, set by the\n * directive. An id rather than its text, so the name is computed on the live DOM: that follows a\n * label that changes, and reads a trigger whose own name is an `aria-label`.\n */\n readonly fallbackLabelId = input<string>();\n\n readonly closed = output<void>();\n\n protected readonly headingId = `ap-popover-heading-${PopoverPanelComponent.nextId++}`;\n\n /** A dialog must be named. The heading does it, failing that the trigger. */\n protected readonly labelledBy = computed<string | null>(() => {\n if (this.heading()) {\n return this.headingId;\n }\n return this.ariaLabel() ? null : (this.fallbackLabelId() ?? null);\n });\n\n protected readonly label = computed<string | null>(() => (this.heading() ? null : (this.ariaLabel() ?? null)));\n}\n","<div\n cdkTrapFocus\n [cdkTrapFocusAutoCapture]=\"true\">\n <div\n class=\"ap-popover__panel\"\n role=\"dialog\"\n tabindex=\"-1\"\n cdkFocusInitial\n [id]=\"panelId()\"\n [attr.aria-modal]=\"backdrop() || null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-label]=\"label()\">\n @if (heading() || closable()) {\n <div class=\"ap-popover__header\">\n @if (heading()) {\n <h2\n class=\"ap-popover__heading\"\n [id]=\"headingId\">\n {{ heading() }}\n </h2>\n }\n @if (closable()) {\n <ap-close-button\n [ariaLabel]=\"closeAriaLabel()\"\n (closed)=\"closed.emit()\" />\n }\n </div>\n }\n <ng-container [ngTemplateOutlet]=\"content()\" />\n </div>\n</div>\n","import { createFloatingOverlay, FloatingAnchorMode, FloatingPlacement } from '@agorapulse/ui-components/floating';\nimport { ComponentRef, Directive, ElementRef, inject, input, TemplateRef } from '@angular/core';\nimport { PopoverPanelComponent } from './popover-panel/popover-panel.component';\n\n/**\n * A click-triggered interactive panel: `role=\"dialog\"`, managed focus, Escape, optional backdrop.\n * A tooltip is the opposite — descriptive, hover-triggered, and never focusable.\n *\n * Sits on the **trigger**, so it owns the trigger's ARIA and the content is always a `TemplateRef`.\n * Inputs are prefixed one by one rather than bundled: an inline config object would be recreated on\n * every change-detection cycle and thrash the overlay.\n *\n * @example\n * <button [apPopover]=\"shareTpl\" apPopoverHeading=\"Share\">Share</button>\n * <ng-template #shareTpl>…</ng-template>\n */\n@Directive({\n selector: '[apPopover]',\n exportAs: 'apPopover',\n host: {\n '[attr.aria-haspopup]': '\"dialog\"',\n '[attr.aria-expanded]': 'isOpen()',\n // Only while open: pointing `aria-controls` at an id that does not exist yet is invalid.\n '[attr.aria-controls]': 'isOpen() ? panelId : null',\n '(click)': 'toggle($event)',\n },\n})\nexport class PopoverDirective {\n private static nextId = 0;\n\n private readonly instanceId = PopoverDirective.nextId++;\n private readonly floating = createFloatingOverlay();\n private readonly triggerElement = inject<ElementRef<HTMLElement>>(ElementRef);\n private panelRef: ComponentRef<PopoverPanelComponent> | null = null;\n\n /** The panel's content. */\n readonly apPopover = input.required<TemplateRef<unknown>>();\n\n /** Unset means derived from the anchor mode. There is no `'auto'` value. */\n readonly apPopoverPlacement = input<FloatingPlacement>();\n readonly apPopoverAnchor = input<FloatingAnchorMode>('trigger');\n readonly apPopoverArrow = input<boolean>(false);\n readonly apPopoverArrowTarget = input<'anchor' | 'pointer'>('anchor');\n\n /** Shows a close button — and, by doing so, makes it *the* way to close: no more outside click. */\n readonly apPopoverClosable = input<boolean>(false);\n\n /** Blocks the page behind. Non-modal by default — that is the point of a popover. */\n readonly apPopoverBackdrop = input<boolean>(false);\n\n /** Optional heading. When set, it becomes the dialog's accessible name. */\n readonly apPopoverHeading = input<string>();\n\n /** Accessible name used when there is no heading. */\n readonly apPopoverAriaLabel = input<string>();\n\n /** An input rather than a hard-coded string: several of the DS's own labels read badly. */\n readonly apPopoverCloseAriaLabel = input<string>('Close');\n\n readonly apPopoverPanelClass = input<string | string[]>();\n\n readonly isOpen = this.floating.isOpen;\n\n protected readonly panelId = `ap-popover-${this.instanceId}`;\n\n open(event?: MouseEvent): void {\n if (this.isOpen()) return;\n\n this.panelRef = this.floating.open(\n PopoverPanelComponent,\n this.triggerElement.nativeElement,\n {\n placement: this.apPopoverPlacement(),\n anchor: this.apPopoverAnchor(),\n arrow: this.apPopoverArrow(),\n arrowTarget: this.apPopoverArrowTarget(),\n showBackdrop: this.apPopoverBackdrop(),\n panelClass: this.apPopoverPanelClass(),\n // Escape always closes: APG requires it of a dialog. An outside click does not.\n onEscape: () => this.close(),\n onOutsideClick: () => {\n if (!this.apPopoverClosable()) {\n this.close();\n }\n },\n },\n event\n );\n\n this.panelRef?.setInput('content', this.apPopover());\n this.panelRef?.setInput('panelId', this.panelId);\n this.panelRef?.setInput('heading', this.apPopoverHeading());\n this.panelRef?.setInput('closable', this.apPopoverClosable());\n this.panelRef?.setInput('backdrop', this.apPopoverBackdrop());\n this.panelRef?.setInput('ariaLabel', this.apPopoverAriaLabel());\n this.panelRef?.setInput('closeAriaLabel', this.apPopoverCloseAriaLabel());\n this.panelRef?.setInput('fallbackLabelId', this.ensureTriggerId());\n this.panelRef?.instance.closed.subscribe(() => this.close());\n\n // Render before repositioning: `attach()` measured an unevaluated template, so the first\n // position is for an empty box and the panel jumps once the content lands.\n this.panelRef?.changeDetectorRef.detectChanges();\n this.floating.updatePosition();\n }\n\n /** The dialog falls back to being named by its trigger, and `aria-labelledby` needs an id to point at. */\n private ensureTriggerId(): string {\n const trigger = this.triggerElement.nativeElement;\n if (!trigger.id) {\n trigger.id = `ap-popover-trigger-${this.instanceId}`;\n }\n\n this.warnWhenNameless(trigger);\n return trigger.id;\n }\n\n /** The residual case the fallback cannot cover: a trigger that names nothing either. */\n private warnWhenNameless(trigger: HTMLElement): void {\n const hasOwnName = Boolean(this.apPopoverHeading()) || Boolean(this.apPopoverAriaLabel());\n // An icon-only trigger has no text but may carry an `aria-label`, which names it just as well.\n const triggerNamesIt = Boolean(trigger.textContent?.trim()) || Boolean(trigger.getAttribute('aria-label'));\n if (hasOwnName || triggerNamesIt) {\n return;\n }\n\n console.warn(\n `[Popover] The dialog opened by #${trigger.id} has no accessible name: it has neither a ` +\n 'heading nor an aria-label, and its trigger has no text. Set apPopoverHeading or apPopoverAriaLabel.'\n );\n }\n\n close(): void {\n this.panelRef = null;\n this.floating.close();\n }\n\n toggle(event?: MouseEvent): void {\n if (this.isOpen()) {\n this.close();\n } else {\n this.open(event);\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;AAKA;;;;;;AAMG;MAQU,qBAAqB,CAAA;AACtB,IAAA,OAAO,MAAM,GAAG,CAAC;;IAGhB,OAAO,GAAG,KAAK,CAAC,QAAQ;gFAAwB;;AAGhD,IAAA,OAAO,GAAG,KAAK;2FAAU;;IAGzB,QAAQ,GAAG,KAAK,CAAU,KAAK;iFAAC;;IAGhC,QAAQ,GAAG,KAAK,CAAU,KAAK;iFAAC;;AAGhC,IAAA,SAAS,GAAG,KAAK;6FAAU;IAE3B,cAAc,GAAG,KAAK,CAAS,OAAO;uFAAC;;IAGvC,OAAO,GAAG,KAAK,CAAS,EAAE;gFAAC;AAEpC;;;;AAIG;AACM,IAAA,eAAe,GAAG,KAAK;mGAAU;IAEjC,MAAM,GAAG,MAAM,EAAQ;AAEb,IAAA,SAAS,GAAG,CAAA,mBAAA,EAAsB,qBAAqB,CAAC,MAAM,EAAE,EAAE;;AAGlE,IAAA,UAAU,GAAG,QAAQ,CAAgB,MAAK;A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