@agorapulse/ui-components 20.3.41 → 20.3.42
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.
- package/agorapulse-ui-components-20.3.42.tgz +0 -0
- package/avatar/index.d.ts +12 -1
- package/avatar-group/index.d.ts +12 -17
- package/fesm2022/agorapulse-ui-components-action-dropdown.mjs +1 -1
- package/fesm2022/agorapulse-ui-components-action-dropdown.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-avatar-group.mjs +19 -8
- package/fesm2022/agorapulse-ui-components-avatar-group.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-avatar.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-labels.mjs +1 -1
- package/fesm2022/agorapulse-ui-components-labels.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-nav-selector.mjs +4 -4
- package/fesm2022/agorapulse-ui-components-nav-selector.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-radio-button-card.mjs +1 -1
- package/fesm2022/agorapulse-ui-components-radio-button-card.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-select.mjs +9 -9
- package/fesm2022/agorapulse-ui-components-select.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-selection-dropdown.mjs +1 -1
- package/fesm2022/agorapulse-ui-components-selection-dropdown.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-tooltip.mjs +81 -74
- package/fesm2022/agorapulse-ui-components-tooltip.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components.mjs.map +1 -1
- package/index.d.ts +2 -2
- package/package.json +5 -5
- package/tooltip/index.d.ts +7 -7
- package/agorapulse-ui-components-20.3.41.tgz +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agorapulse-ui-components-selection-dropdown.mjs","sources":["../../../libs/ui-components/selection-dropdown/src/selection-dropdown-trigger.directive.ts","../../../libs/ui-components/selection-dropdown/src/selection-dropdown.component.ts","../../../libs/ui-components/selection-dropdown/src/selection-dropdown.component.html","../../../libs/ui-components/selection-dropdown/src/agorapulse-ui-components-selection-dropdown.ts"],"sourcesContent":["import { Directive, ElementRef, HostListener, inject, input } from '@angular/core';\nimport { SelectionDropdownComponent } from './selection-dropdown.component';\n\n/**\n * Directive that turns any element into a trigger for a SelectionDropdown component.\n * Handles click and keyboard interactions to open/close the dropdown.\n */\n@Directive({\n selector: '[apSelectionDropdownTrigger]',\n})\nexport class SelectionDropdownTriggerDirective {\n private readonly elementRef = inject(ElementRef<HTMLElement>);\n\n /** Reference to the SelectionDropdown component that this trigger controls */\n apSelectionDropdownTrigger = input.required<SelectionDropdownComponent>();\n\n /** Handles click events to toggle the dropdown */\n @HostListener('click', ['$event'])\n onClick(event: MouseEvent): void {\n event.preventDefault();\n event.stopPropagation();\n\n const selectionDropdown = this.apSelectionDropdownTrigger();\n if (selectionDropdown) {\n selectionDropdown.toggle(this.elementRef.nativeElement);\n }\n }\n\n /** Handles keyboard events for accessibility (Enter, Space, Arrow Down, Escape) */\n @HostListener('keydown', ['$event'])\n onKeyDown(event: KeyboardEvent): void {\n const selectionDropdown = this.apSelectionDropdownTrigger();\n if (selectionDropdown) {\n switch (event.key) {\n case 'Enter':\n case 'ArrowDown':\n event.preventDefault();\n selectionDropdown.open(this.elementRef.nativeElement);\n break;\n\n case 'Escape':\n event.preventDefault();\n selectionDropdown.close();\n break;\n }\n }\n }\n}\n","import { CheckboxComponent } from '@agorapulse/ui-components/checkbox';\nimport { InputSearchComponent } from '@agorapulse/ui-components/input-search';\nimport { UI_COMPONENTS_SYMBOLS } from '@agorapulse/ui-components/providers';\nimport { DropdownItemMultipleOneLineComponent } from '@agorapulse/ui-components/select';\nimport { TooltipDirective } from '@agorapulse/ui-components/tooltip';\nimport { SymbolComponent, SymbolRegistry } from '@agorapulse/ui-symbol';\nimport { ConnectedPosition, FlexibleConnectedPositionStrategy, Overlay, OverlayPositionBuilder, OverlayRef } from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n effect,\n ElementRef,\n inject,\n input,\n linkedSignal,\n OnDestroy,\n output,\n signal,\n TemplateRef,\n viewChild,\n ViewContainerRef,\n} from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { debounceTime, distinctUntilChanged, Subject, take, takeUntil } from 'rxjs';\n\nexport interface SelectionDropdownItem {\n /** Unique HTML ID for the item */\n htmlId: string;\n /** Display text for the item */\n text: string;\n /** Whether the item is selected */\n selected: boolean;\n /** Whether the item is disabled and non-interactive */\n disabled?: boolean;\n /** Avatar URL to display */\n avatarUrl?: string;\n /** Symbol ID to display */\n symbolId?: string;\n /** Tooltip text displayed when item is disabled */\n disabledTooltip?: string;\n /** Text displayed in a badge next to the item */\n badgeText?: string;\n /** Whether the feature is locked */\n isFeatureLocked?: boolean;\n /** Whether avatar should be rounded */\n roundedAvatar?: boolean;\n /** Avatar network type */\n network?: any;\n /** Symbol color */\n symbolColor?: string;\n /** Symbol tooltip text */\n symbolTooltipText?: string;\n /** Group label - items with the same groupLabel will be grouped together */\n groupLabel?: string;\n}\n\n/**\n * A dropdown component that displays a list of selectable items with checkboxes,\n * badges, tooltips, and keyboard navigation.\n */\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'ap-selection-dropdown',\n templateUrl: './selection-dropdown.component.html',\n styleUrls: ['./selection-dropdown.component.scss'],\n imports: [\n CheckboxComponent,\n DropdownItemMultipleOneLineComponent,\n FormsModule,\n InputSearchComponent,\n SymbolComponent,\n TooltipDirective,\n ],\n})\nexport class SelectionDropdownComponent implements OnDestroy {\n private readonly elementRef = inject(ElementRef);\n private readonly overlay = inject(Overlay);\n private readonly positionBuilder = inject(OverlayPositionBuilder);\n private readonly symbolRegistry = inject(SymbolRegistry);\n private readonly viewContainerRef = inject(ViewContainerRef);\n\n selectionDropdownTemplate = viewChild<TemplateRef<unknown>>('selectionDropdownTemplate');\n trigger = contentChild<TemplateRef<unknown>>('trigger');\n\n /** ID for the header button */\n headerButtonId = input<string>();\n /** ID for the footer button */\n footerButtonId = input<string>();\n /** Array of items to display in the dropdown menu */\n items = input<SelectionDropdownItem[]>([]);\n /** Whether the dropdown is disabled and cannot be opened */\n disabled = input(false);\n /** Whether to show a backdrop that closes the dropdown when clicked */\n showBackdrop = input(true);\n /** Default position for the dropdown relative to the trigger element */\n defaultPosition = input<'right' | 'left'>('right');\n /** Title to display in the header */\n title = input<string>();\n /** Text for the footer button */\n footerButtonText = input<string>();\n /** Symbol ID for the footer button */\n footerButtonSymbolId = input<string>();\n /** Text for the header button */\n headerButtonText = input<string>();\n /** Symbol ID for the header button */\n headerButtonSymbolId = input<string>();\n /** Placeholder text for the search input */\n searchPlaceholderText = input('Search');\n /** Text to display when no search results are found */\n noSearchResultsText = input('No results found');\n\n /** Emits when a dropdown item selection changes */\n selectionChange = output<SelectionDropdownItem[]>();\n /** Emits when the dropdown menu is opened */\n opened = output<void>();\n /** Emits when the dropdown menu is closed */\n closed = output<void>();\n /** Emits when the footer button is clicked */\n footerButtonClick = output<void>();\n /** Emits when the header button is clicked */\n headerButtonClick = output<void>();\n /** Emits when the search input is changed */\n searchInputChange = output<string>();\n\n private overlayRef: OverlayRef | null = null;\n private portal: TemplatePortal<unknown> | null = null;\n\n private readonly destroy$ = new Subject<void>();\n private readonly searchTermSubject = new Subject<string>();\n\n private readonly internalItems = linkedSignal(() => this.items());\n\n protected readonly isOpen = signal(false);\n protected searchTerm = '';\n protected readonly filteredItems = signal<SelectionDropdownItem[]>([]);\n protected readonly initiallySelectedItems = signal<SelectionDropdownItem[]>([]);\n\n // Computed properties for template usage\n protected readonly selectedItems = computed(() => {\n const initiallySelectedIds = this.initiallySelectedItems().map(item => item.htmlId);\n return this.filteredItems().filter(item => initiallySelectedIds.includes(item.htmlId));\n });\n\n protected readonly unselectedItems = computed(() => {\n const initiallySelectedIds = this.initiallySelectedItems().map(item => item.htmlId);\n return this.filteredItems().filter(item => !initiallySelectedIds.includes(item.htmlId));\n });\n\n protected readonly groupLabels = computed(() => {\n const groupLabels = this.unselectedItems()\n .map(item => item.groupLabel)\n .filter((label): label is string => !!label);\n return [...new Set(groupLabels)];\n });\n\n protected readonly ungroupedItems = computed(() => {\n return this.unselectedItems().filter(item => !item.groupLabel);\n });\n\n // Computed maps for template optimization\n protected readonly groupSelectionStates = computed(() => {\n const states: Record<string, 'selected' | 'partial' | 'unselected'> = {};\n for (const groupLabel of this.groupLabels()) {\n const groupItems = this.filteredItems().filter(item => item.groupLabel === groupLabel);\n const selectableItems = groupItems.filter(item => !item.disabled && !item.isFeatureLocked);\n\n if (selectableItems.length === 0) {\n states[groupLabel] = 'unselected';\n } else {\n const selectedCount = selectableItems.filter(item => item.selected).length;\n if (selectedCount === 0) states[groupLabel] = 'unselected';\n else if (selectedCount === selectableItems.length) states[groupLabel] = 'selected';\n else states[groupLabel] = 'partial';\n }\n }\n return states;\n });\n\n protected readonly groupItemsMap = computed(() => {\n const map: Record<string, SelectionDropdownItem[]> = {};\n for (const groupLabel of this.groupLabels()) {\n map[groupLabel] = this.unselectedItems().filter(item => item.groupLabel === groupLabel);\n }\n return map;\n });\n\n constructor() {\n this.symbolRegistry.withSymbols(...(inject(UI_COMPONENTS_SYMBOLS, { optional: true })?.flat() ?? []));\n\n // Set up debounced search\n this.searchTermSubject.pipe(debounceTime(100), distinctUntilChanged(), takeUntil(this.destroy$)).subscribe(term => {\n const items = this.internalItems();\n this.updateFilteredItems(term?.toLowerCase() ?? '', items);\n });\n\n // Initialize filtered items when items change\n effect(() => {\n const items = this.internalItems();\n if (!this.searchTerm) {\n this.filteredItems.set(items);\n }\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n /** Opens the dropdown menu at the specified trigger element or component's element */\n open(triggerElement?: HTMLElement): void {\n const selectionDropdownTemplate = this.selectionDropdownTemplate();\n\n if (this.disabled() || this.isOpen() || !selectionDropdownTemplate) {\n return;\n }\n\n // Capture initially selected items as a static snapshot\n const selectedItems = this.internalItems().filter(item => item.selected);\n this.initiallySelectedItems.set(selectedItems);\n\n const target = triggerElement || this.elementRef.nativeElement;\n\n if (this.overlayRef) {\n this.overlayRef.dispose();\n }\n\n const positionStrategy = this.createPositionStrategy(target);\n\n this.overlayRef = this.overlay.create({\n positionStrategy,\n hasBackdrop: this.showBackdrop(),\n backdropClass: '',\n panelClass: '',\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n });\n\n this.portal = new TemplatePortal(selectionDropdownTemplate, this.viewContainerRef);\n this.overlayRef.attach(this.portal);\n\n this.isOpen.set(true);\n this.opened.emit();\n\n this.overlayRef\n .backdropClick()\n .pipe(take(1))\n .subscribe(() => {\n this.close();\n });\n }\n\n /** Closes the dropdown menu and cleans up overlay resources */\n close(): void {\n if (!this.isOpen()) {\n return;\n }\n\n if (this.overlayRef) {\n this.overlayRef.dispose();\n this.overlayRef = null;\n }\n\n this.portal = null;\n this.isOpen.set(false);\n this.initiallySelectedItems.set([]); // Clear the snapshot\n this.closed.emit();\n }\n\n /** Toggles the dropdown menu open or closed state */\n toggle(triggerElement?: HTMLElement): void {\n if (this.isOpen()) {\n this.close();\n } else {\n this.open(triggerElement);\n }\n }\n\n /** Handles item toggle events, updating selection and emitting changes */\n onItemToggle(item: SelectionDropdownItem, checked: boolean): void {\n if (item.disabled || item.isFeatureLocked) {\n return;\n }\n\n const updatedItems = this.internalItems().map(i => (i.htmlId === item.htmlId ? { ...i, selected: checked } : i));\n this.internalItems.set(updatedItems);\n this.selectionChange.emit(updatedItems);\n\n // Update the state of the filtered item that has been selected\n this.filteredItems.update(items => items.map(filteredItem => filteredItem.htmlId === item.htmlId ? { ...filteredItem, selected: checked } : filteredItem));\n }\n\n /** Handles footer button clicks */\n onFooterButtonClick(): void {\n this.footerButtonClick.emit();\n }\n\n /** Handles footer button keyboard events */\n onFooterButtonKeydown(event: KeyboardEvent): void {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.footerButtonClick.emit();\n }\n }\n\n /** Handles header button clicks */\n onHeaderButtonClick(): void {\n this.headerButtonClick.emit();\n }\n\n /** Handles header button keyboard events */\n onHeaderButtonKeydown(event: KeyboardEvent): void {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.headerButtonClick.emit();\n }\n }\n\n /** Handles search input changes */\n onSearchTermChange(): void {\n this.searchTermSubject.next(this.searchTerm);\n this.searchInputChange.emit(this.searchTerm);\n }\n\n /** Handles group toggle events, selecting/deselecting all items within the group */\n onGroupToggle(groupLabel: string, checked: boolean): void {\n if (typeof checked !== 'boolean') {\n return;\n }\n const updatedItems = this.internalItems().map(item => {\n if (item.groupLabel === groupLabel && !item.disabled && !item.isFeatureLocked) {\n return { ...item, selected: checked };\n }\n return item;\n });\n this.internalItems.set(updatedItems);\n this.selectionChange.emit(updatedItems);\n }\n\n /** Updates the filtered items based on search term */\n private updateFilteredItems(searchTerm: string, items: SelectionDropdownItem[]): void {\n if (!searchTerm) {\n this.filteredItems.set(items);\n return;\n }\n\n const filtered = items.filter(item => item.text.toLowerCase().includes(searchTerm));\n this.filteredItems.set(filtered);\n }\n\n /** Creates positioning strategy for the overlay based on trigger element and default position */\n private createPositionStrategy(target: HTMLElement): FlexibleConnectedPositionStrategy {\n const defaultPosition = this.defaultPosition();\n const gap = 4;\n\n const positions: ConnectedPosition[] =\n defaultPosition === 'right'\n ? [\n // Bottom-right (default) - left border aligns with left side of trigger\n {\n originX: 'start',\n originY: 'bottom',\n overlayX: 'start',\n overlayY: 'top',\n offsetX: 0,\n offsetY: gap,\n },\n // Bottom-left (if not enough space on right) - right border aligns with right side of trigger\n {\n originX: 'end',\n originY: 'bottom',\n overlayX: 'end',\n overlayY: 'top',\n offsetX: 0,\n offsetY: gap,\n },\n // Top-right (if not enough space below) - left border aligns with left side of trigger\n {\n originX: 'start',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'bottom',\n offsetX: 0,\n offsetY: -gap,\n },\n // Top-left (if not enough space below and on right) - right border aligns with right side of trigger\n {\n originX: 'end',\n originY: 'top',\n overlayX: 'end',\n overlayY: 'bottom',\n offsetX: 0,\n offsetY: -gap,\n },\n ]\n : [\n // Bottom-left (default) - right border aligns with right side of trigger\n {\n originX: 'end',\n originY: 'bottom',\n overlayX: 'end',\n overlayY: 'top',\n offsetX: 0,\n offsetY: gap,\n },\n // Bottom-right (if not enough space on left) - left border aligns with left side of trigger\n {\n originX: 'start',\n originY: 'bottom',\n overlayX: 'start',\n overlayY: 'top',\n offsetX: 0,\n offsetY: gap,\n },\n // Top-left (if not enough space below) - right border aligns with right side of trigger\n {\n originX: 'end',\n originY: 'top',\n overlayX: 'end',\n overlayY: 'bottom',\n offsetX: 0,\n offsetY: -gap,\n },\n // Top-right (if not enough space below and on left) - left border aligns with left side of trigger\n {\n originX: 'start',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'bottom',\n offsetX: 0,\n offsetY: -gap,\n },\n ];\n\n return this.positionBuilder\n .flexibleConnectedTo(target)\n .withPositions(positions)\n .withFlexibleDimensions(true)\n .withPush(true)\n .withGrowAfterOpen(true)\n .withViewportMargin(8);\n }\n}\n","<ng-template #selectionDropdownTemplate>\n <div class=\"ap-selection-dropdown__content\">\n <!-- Header -->\n <div class=\"ap-selection-dropdown__header\">\n <div class=\"ap-selection-dropdown__header-top\">\n @if (title()) {\n <h3 class=\"ap-selection-dropdown__title\">\n {{ title() }}\n </h3>\n }\n @if (headerButtonText()) {\n <a\n class=\"standalone\"\n role=\"link\"\n tabindex=\"0\"\n [id]=\"headerButtonId()\"\n (click)=\"onHeaderButtonClick()\"\n (keydown)=\"onHeaderButtonKeydown($event)\">\n <ap-symbol [symbolId]=\"headerButtonSymbolId()\" />\n {{ headerButtonText() }}\n </a>\n }\n </div>\n <ap-input-search\n [placeholder]=\"searchPlaceholderText()\"\n [clearable]=\"true\"\n [(ngModel)]=\"searchTerm\"\n (ngModelChange)=\"onSearchTermChange()\" />\n </div>\n\n <!-- Selection dropdown items -->\n <div class=\"ap-selection-dropdown__items\">\n @if (filteredItems().length === 0 && searchTerm) {\n <div class=\"ap-selection-dropdown__no-results\">\n {{ noSearchResultsText() }}\n </div>\n } @else {\n <!-- Selected items section (at the top) -->\n @if (selectedItems().length > 0) {\n <div class=\"ap-selection-dropdown__selected-section\">\n @for (item of selectedItems(); track item.htmlId) {\n <div [apTooltip]=\"item.disabledTooltip\">\n <button\n type=\"button\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n class=\"ap-selection-dropdown__item-button\"\n [class.ap-selection-dropdown__item-button--disabled]=\"item.disabled || item.isFeatureLocked\"\n (click)=\"onItemToggle(item, !item.selected)\">\n <ap-dropdown-item-multiple-one-line\n class=\"ap-selection-dropdown__item\"\n [text]=\"item.text\"\n [selected]=\"item.selected\"\n [htmlId]=\"item.htmlId\"\n [disabled]=\"item.disabled || false\"\n [avatarUrl]=\"item.avatarUrl\"\n [symbolId]=\"item.symbolId\"\n [badgeText]=\"item.badgeText\"\n [isFeatureLocked]=\"item.isFeatureLocked || false\"\n [roundedAvatar]=\"!!item.roundedAvatar\"\n [network]=\"item.network\"\n [symbolColor]=\"item.symbolColor\"\n [symbolTooltipText]=\"item.symbolTooltipText\" />\n </button>\n </div>\n }\n </div>\n }\n\n <!-- Ungrouped unselected items -->\n @for (item of ungroupedItems(); track item.htmlId) {\n <div [apTooltip]=\"item.disabledTooltip\">\n <button\n type=\"button\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n class=\"ap-selection-dropdown__item-button\"\n [class.ap-selection-dropdown__item-button--disabled]=\"item.disabled || item.isFeatureLocked\"\n (click)=\"onItemToggle(item, !item.selected)\">\n <ap-dropdown-item-multiple-one-line\n class=\"ap-selection-dropdown__item\"\n [text]=\"item.text\"\n [selected]=\"item.selected\"\n [htmlId]=\"item.htmlId\"\n [disabled]=\"item.disabled || false\"\n [avatarUrl]=\"item.avatarUrl\"\n [symbolId]=\"item.symbolId\"\n [badgeText]=\"item.badgeText\"\n [isFeatureLocked]=\"item.isFeatureLocked || false\"\n [roundedAvatar]=\"!!item.roundedAvatar\"\n [network]=\"item.network\"\n [symbolColor]=\"item.symbolColor\"\n [symbolTooltipText]=\"item.symbolTooltipText\" />\n </button>\n </div>\n }\n\n <!-- Groups -->\n @for (groupLabel of groupLabels(); track groupLabel) {\n <div class=\"ap-selection-dropdown__group\">\n <!-- Group header with checkbox -->\n <div class=\"ap-selection-dropdown__group-header\">\n <div class=\"ap-selection-dropdown__group-label\">\n <ap-checkbox\n [name]=\"groupLabel\"\n [checked]=\"groupSelectionStates()[groupLabel] === 'selected'\"\n [indeterminate]=\"groupSelectionStates()[groupLabel] === 'partial'\"\n (change)=\"onGroupToggle(groupLabel, $event)\">\n {{ groupLabel }}\n </ap-checkbox>\n </div>\n </div>\n\n <!-- Group items -->\n @for (item of groupItemsMap()[groupLabel]; track item.htmlId) {\n <div [apTooltip]=\"item.disabledTooltip\">\n <button\n type=\"button\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n class=\"ap-selection-dropdown__item-button\"\n [class.ap-selection-dropdown__item-button--disabled]=\"item.disabled || item.isFeatureLocked\"\n (click)=\"onItemToggle(item, !item.selected)\">\n <ap-dropdown-item-multiple-one-line\n class=\"ap-selection-dropdown__item ap-selection-dropdown__item--grouped\"\n [text]=\"item.text\"\n [selected]=\"item.selected\"\n [htmlId]=\"item.htmlId\"\n [disabled]=\"item.disabled || false\"\n [avatarUrl]=\"item.avatarUrl\"\n [symbolId]=\"item.symbolId\"\n [badgeText]=\"item.badgeText\"\n [isFeatureLocked]=\"item.isFeatureLocked || false\"\n [roundedAvatar]=\"!!item.roundedAvatar\"\n [network]=\"item.network\"\n [symbolColor]=\"item.symbolColor\"\n [symbolTooltipText]=\"item.symbolTooltipText\" />\n </button>\n </div>\n }\n </div>\n }\n }\n </div>\n\n <!-- Footer -->\n @if (footerButtonText()) {\n <div class=\"ap-selection-dropdown__footer\">\n <a\n class=\"standalone\"\n role=\"link\"\n tabindex=\"0\"\n [id]=\"footerButtonId()\"\n (click)=\"onFooterButtonClick()\"\n (keydown)=\"onFooterButtonKeydown($event)\">\n <ap-symbol [symbolId]=\"footerButtonSymbolId()\" />\n {{ footerButtonText() }}\n </a>\n </div>\n }\n </div>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAGA;;;AAGG;MAIU,iCAAiC,CAAA;AACzB,IAAA,UAAU,GAAG,MAAM,EAAC,UAAuB,EAAC;;AAG7D,IAAA,0BAA0B,GAAG,KAAK,CAAC,QAAQ,qEAA8B;;AAIzE,IAAA,OAAO,CAAC,KAAiB,EAAA;QACrB,KAAK,CAAC,cAAc,EAAE;QACtB,KAAK,CAAC,eAAe,EAAE;AAEvB,QAAA,MAAM,iBAAiB,GAAG,IAAI,CAAC,0BAA0B,EAAE;QAC3D,IAAI,iBAAiB,EAAE;YACnB,iBAAiB,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC;QAC3D;IACJ;;AAIA,IAAA,SAAS,CAAC,KAAoB,EAAA;AAC1B,QAAA,MAAM,iBAAiB,GAAG,IAAI,CAAC,0BAA0B,EAAE;QAC3D,IAAI,iBAAiB,EAAE;AACnB,YAAA,QAAQ,KAAK,CAAC,GAAG;AACb,gBAAA,KAAK,OAAO;AACZ,gBAAA,KAAK,WAAW;oBACZ,KAAK,CAAC,cAAc,EAAE;oBACtB,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC;oBACrD;AAEJ,gBAAA,KAAK,QAAQ;oBACT,KAAK,CAAC,cAAc,EAAE;oBACtB,iBAAiB,CAAC,KAAK,EAAE;oBACzB;;QAEZ;IACJ;uGApCS,iCAAiC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAjC,iCAAiC,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,E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G;;;;"}
|
|
1
|
+
{"version":3,"file":"agorapulse-ui-components-selection-dropdown.mjs","sources":["../../../libs/ui-components/selection-dropdown/src/selection-dropdown-trigger.directive.ts","../../../libs/ui-components/selection-dropdown/src/selection-dropdown.component.ts","../../../libs/ui-components/selection-dropdown/src/selection-dropdown.component.html","../../../libs/ui-components/selection-dropdown/src/agorapulse-ui-components-selection-dropdown.ts"],"sourcesContent":["import { Directive, ElementRef, HostListener, inject, input } from '@angular/core';\nimport { SelectionDropdownComponent } from './selection-dropdown.component';\n\n/**\n * Directive that turns any element into a trigger for a SelectionDropdown component.\n * Handles click and keyboard interactions to open/close the dropdown.\n */\n@Directive({\n selector: '[apSelectionDropdownTrigger]',\n})\nexport class SelectionDropdownTriggerDirective {\n private readonly elementRef = inject(ElementRef<HTMLElement>);\n\n /** Reference to the SelectionDropdown component that this trigger controls */\n apSelectionDropdownTrigger = input.required<SelectionDropdownComponent>();\n\n /** Handles click events to toggle the dropdown */\n @HostListener('click', ['$event'])\n onClick(event: MouseEvent): void {\n event.preventDefault();\n event.stopPropagation();\n\n const selectionDropdown = this.apSelectionDropdownTrigger();\n if (selectionDropdown) {\n selectionDropdown.toggle(this.elementRef.nativeElement);\n }\n }\n\n /** Handles keyboard events for accessibility (Enter, Space, Arrow Down, Escape) */\n @HostListener('keydown', ['$event'])\n onKeyDown(event: KeyboardEvent): void {\n const selectionDropdown = this.apSelectionDropdownTrigger();\n if (selectionDropdown) {\n switch (event.key) {\n case 'Enter':\n case 'ArrowDown':\n event.preventDefault();\n selectionDropdown.open(this.elementRef.nativeElement);\n break;\n\n case 'Escape':\n event.preventDefault();\n selectionDropdown.close();\n break;\n }\n }\n }\n}\n","import { CheckboxComponent } from '@agorapulse/ui-components/checkbox';\nimport { InputSearchComponent } from '@agorapulse/ui-components/input-search';\nimport { UI_COMPONENTS_SYMBOLS } from '@agorapulse/ui-components/providers';\nimport { DropdownItemMultipleOneLineComponent } from '@agorapulse/ui-components/select';\nimport { TooltipDirective } from '@agorapulse/ui-components/tooltip';\nimport { SymbolComponent, SymbolRegistry } from '@agorapulse/ui-symbol';\nimport { ConnectedPosition, FlexibleConnectedPositionStrategy, Overlay, OverlayPositionBuilder, OverlayRef } from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n effect,\n ElementRef,\n inject,\n input,\n linkedSignal,\n OnDestroy,\n output,\n signal,\n TemplateRef,\n viewChild,\n ViewContainerRef,\n} from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { debounceTime, distinctUntilChanged, Subject, take, takeUntil } from 'rxjs';\n\nexport interface SelectionDropdownItem {\n /** Unique HTML ID for the item */\n htmlId: string;\n /** Display text for the item */\n text: string;\n /** Whether the item is selected */\n selected: boolean;\n /** Whether the item is disabled and non-interactive */\n disabled?: boolean;\n /** Avatar URL to display */\n avatarUrl?: string;\n /** Symbol ID to display */\n symbolId?: string;\n /** Tooltip text displayed when item is disabled */\n disabledTooltip?: string;\n /** Text displayed in a badge next to the item */\n badgeText?: string;\n /** Whether the feature is locked */\n isFeatureLocked?: boolean;\n /** Whether avatar should be rounded */\n roundedAvatar?: boolean;\n /** Avatar network type */\n network?: any;\n /** Symbol color */\n symbolColor?: string;\n /** Symbol tooltip text */\n symbolTooltipText?: string;\n /** Group label - items with the same groupLabel will be grouped together */\n groupLabel?: string;\n}\n\n/**\n * A dropdown component that displays a list of selectable items with checkboxes,\n * badges, tooltips, and keyboard navigation.\n */\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'ap-selection-dropdown',\n templateUrl: './selection-dropdown.component.html',\n styleUrls: ['./selection-dropdown.component.scss'],\n imports: [\n CheckboxComponent,\n DropdownItemMultipleOneLineComponent,\n FormsModule,\n InputSearchComponent,\n SymbolComponent,\n TooltipDirective,\n ],\n})\nexport class SelectionDropdownComponent implements OnDestroy {\n private readonly elementRef = inject(ElementRef);\n private readonly overlay = inject(Overlay);\n private readonly positionBuilder = inject(OverlayPositionBuilder);\n private readonly symbolRegistry = inject(SymbolRegistry);\n private readonly viewContainerRef = inject(ViewContainerRef);\n\n selectionDropdownTemplate = viewChild<TemplateRef<unknown>>('selectionDropdownTemplate');\n trigger = contentChild<TemplateRef<unknown>>('trigger');\n\n /** ID for the header button */\n headerButtonId = input<string>();\n /** ID for the footer button */\n footerButtonId = input<string>();\n /** Array of items to display in the dropdown menu */\n items = input<SelectionDropdownItem[]>([]);\n /** Whether the dropdown is disabled and cannot be opened */\n disabled = input(false);\n /** Whether to show a backdrop that closes the dropdown when clicked */\n showBackdrop = input(true);\n /** Default position for the dropdown relative to the trigger element */\n defaultPosition = input<'right' | 'left'>('right');\n /** Title to display in the header */\n title = input<string>();\n /** Text for the footer button */\n footerButtonText = input<string>();\n /** Symbol ID for the footer button */\n footerButtonSymbolId = input<string>();\n /** Text for the header button */\n headerButtonText = input<string>();\n /** Symbol ID for the header button */\n headerButtonSymbolId = input<string>();\n /** Placeholder text for the search input */\n searchPlaceholderText = input('Search');\n /** Text to display when no search results are found */\n noSearchResultsText = input('No results found');\n\n /** Emits when a dropdown item selection changes */\n selectionChange = output<SelectionDropdownItem[]>();\n /** Emits when the dropdown menu is opened */\n opened = output<void>();\n /** Emits when the dropdown menu is closed */\n closed = output<void>();\n /** Emits when the footer button is clicked */\n footerButtonClick = output<void>();\n /** Emits when the header button is clicked */\n headerButtonClick = output<void>();\n /** Emits when the search input is changed */\n searchInputChange = output<string>();\n\n private overlayRef: OverlayRef | null = null;\n private portal: TemplatePortal<unknown> | null = null;\n\n private readonly destroy$ = new Subject<void>();\n private readonly searchTermSubject = new Subject<string>();\n\n private readonly internalItems = linkedSignal(() => this.items());\n\n protected readonly isOpen = signal(false);\n protected searchTerm = '';\n protected readonly filteredItems = signal<SelectionDropdownItem[]>([]);\n protected readonly initiallySelectedItems = signal<SelectionDropdownItem[]>([]);\n\n // Computed properties for template usage\n protected readonly selectedItems = computed(() => {\n const initiallySelectedIds = this.initiallySelectedItems().map(item => item.htmlId);\n return this.filteredItems().filter(item => initiallySelectedIds.includes(item.htmlId));\n });\n\n protected readonly unselectedItems = computed(() => {\n const initiallySelectedIds = this.initiallySelectedItems().map(item => item.htmlId);\n return this.filteredItems().filter(item => !initiallySelectedIds.includes(item.htmlId));\n });\n\n protected readonly groupLabels = computed(() => {\n const groupLabels = this.unselectedItems()\n .map(item => item.groupLabel)\n .filter((label): label is string => !!label);\n return [...new Set(groupLabels)];\n });\n\n protected readonly ungroupedItems = computed(() => {\n return this.unselectedItems().filter(item => !item.groupLabel);\n });\n\n // Computed maps for template optimization\n protected readonly groupSelectionStates = computed(() => {\n const states: Record<string, 'selected' | 'partial' | 'unselected'> = {};\n for (const groupLabel of this.groupLabels()) {\n const groupItems = this.filteredItems().filter(item => item.groupLabel === groupLabel);\n const selectableItems = groupItems.filter(item => !item.disabled && !item.isFeatureLocked);\n\n if (selectableItems.length === 0) {\n states[groupLabel] = 'unselected';\n } else {\n const selectedCount = selectableItems.filter(item => item.selected).length;\n if (selectedCount === 0) states[groupLabel] = 'unselected';\n else if (selectedCount === selectableItems.length) states[groupLabel] = 'selected';\n else states[groupLabel] = 'partial';\n }\n }\n return states;\n });\n\n protected readonly groupItemsMap = computed(() => {\n const map: Record<string, SelectionDropdownItem[]> = {};\n for (const groupLabel of this.groupLabels()) {\n map[groupLabel] = this.unselectedItems().filter(item => item.groupLabel === groupLabel);\n }\n return map;\n });\n\n constructor() {\n this.symbolRegistry.withSymbols(...(inject(UI_COMPONENTS_SYMBOLS, { optional: true })?.flat() ?? []));\n\n // Set up debounced search\n this.searchTermSubject.pipe(debounceTime(100), distinctUntilChanged(), takeUntil(this.destroy$)).subscribe(term => {\n const items = this.internalItems();\n this.updateFilteredItems(term?.toLowerCase() ?? '', items);\n });\n\n // Initialize filtered items when items change\n effect(() => {\n const items = this.internalItems();\n if (!this.searchTerm) {\n this.filteredItems.set(items);\n }\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n /** Opens the dropdown menu at the specified trigger element or component's element */\n open(triggerElement?: HTMLElement): void {\n const selectionDropdownTemplate = this.selectionDropdownTemplate();\n\n if (this.disabled() || this.isOpen() || !selectionDropdownTemplate) {\n return;\n }\n\n // Capture initially selected items as a static snapshot\n const selectedItems = this.internalItems().filter(item => item.selected);\n this.initiallySelectedItems.set(selectedItems);\n\n const target = triggerElement || this.elementRef.nativeElement;\n\n if (this.overlayRef) {\n this.overlayRef.dispose();\n }\n\n const positionStrategy = this.createPositionStrategy(target);\n\n this.overlayRef = this.overlay.create({\n positionStrategy,\n hasBackdrop: this.showBackdrop(),\n backdropClass: '',\n panelClass: '',\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n });\n\n this.portal = new TemplatePortal(selectionDropdownTemplate, this.viewContainerRef);\n this.overlayRef.attach(this.portal);\n\n this.isOpen.set(true);\n this.opened.emit();\n\n this.overlayRef\n .backdropClick()\n .pipe(take(1))\n .subscribe(() => {\n this.close();\n });\n }\n\n /** Closes the dropdown menu and cleans up overlay resources */\n close(): void {\n if (!this.isOpen()) {\n return;\n }\n\n if (this.overlayRef) {\n this.overlayRef.dispose();\n this.overlayRef = null;\n }\n\n this.portal = null;\n this.isOpen.set(false);\n this.initiallySelectedItems.set([]); // Clear the snapshot\n this.closed.emit();\n }\n\n /** Toggles the dropdown menu open or closed state */\n toggle(triggerElement?: HTMLElement): void {\n if (this.isOpen()) {\n this.close();\n } else {\n this.open(triggerElement);\n }\n }\n\n /** Handles item toggle events, updating selection and emitting changes */\n onItemToggle(item: SelectionDropdownItem, checked: boolean): void {\n if (item.disabled || item.isFeatureLocked) {\n return;\n }\n\n const updatedItems = this.internalItems().map(i => (i.htmlId === item.htmlId ? { ...i, selected: checked } : i));\n this.internalItems.set(updatedItems);\n this.selectionChange.emit(updatedItems);\n\n // Update the state of the filtered item that has been selected\n this.filteredItems.update(items => items.map(filteredItem => filteredItem.htmlId === item.htmlId ? { ...filteredItem, selected: checked } : filteredItem));\n }\n\n /** Handles footer button clicks */\n onFooterButtonClick(): void {\n this.footerButtonClick.emit();\n }\n\n /** Handles footer button keyboard events */\n onFooterButtonKeydown(event: KeyboardEvent): void {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.footerButtonClick.emit();\n }\n }\n\n /** Handles header button clicks */\n onHeaderButtonClick(): void {\n this.headerButtonClick.emit();\n }\n\n /** Handles header button keyboard events */\n onHeaderButtonKeydown(event: KeyboardEvent): void {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.headerButtonClick.emit();\n }\n }\n\n /** Handles search input changes */\n onSearchTermChange(): void {\n this.searchTermSubject.next(this.searchTerm);\n this.searchInputChange.emit(this.searchTerm);\n }\n\n /** Handles group toggle events, selecting/deselecting all items within the group */\n onGroupToggle(groupLabel: string, checked: boolean): void {\n if (typeof checked !== 'boolean') {\n return;\n }\n const updatedItems = this.internalItems().map(item => {\n if (item.groupLabel === groupLabel && !item.disabled && !item.isFeatureLocked) {\n return { ...item, selected: checked };\n }\n return item;\n });\n this.internalItems.set(updatedItems);\n this.selectionChange.emit(updatedItems);\n }\n\n /** Updates the filtered items based on search term */\n private updateFilteredItems(searchTerm: string, items: SelectionDropdownItem[]): void {\n if (!searchTerm) {\n this.filteredItems.set(items);\n return;\n }\n\n const filtered = items.filter(item => item.text.toLowerCase().includes(searchTerm));\n this.filteredItems.set(filtered);\n }\n\n /** Creates positioning strategy for the overlay based on trigger element and default position */\n private createPositionStrategy(target: HTMLElement): FlexibleConnectedPositionStrategy {\n const defaultPosition = this.defaultPosition();\n const gap = 4;\n\n const positions: ConnectedPosition[] =\n defaultPosition === 'right'\n ? [\n // Bottom-right (default) - left border aligns with left side of trigger\n {\n originX: 'start',\n originY: 'bottom',\n overlayX: 'start',\n overlayY: 'top',\n offsetX: 0,\n offsetY: gap,\n },\n // Bottom-left (if not enough space on right) - right border aligns with right side of trigger\n {\n originX: 'end',\n originY: 'bottom',\n overlayX: 'end',\n overlayY: 'top',\n offsetX: 0,\n offsetY: gap,\n },\n // Top-right (if not enough space below) - left border aligns with left side of trigger\n {\n originX: 'start',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'bottom',\n offsetX: 0,\n offsetY: -gap,\n },\n // Top-left (if not enough space below and on right) - right border aligns with right side of trigger\n {\n originX: 'end',\n originY: 'top',\n overlayX: 'end',\n overlayY: 'bottom',\n offsetX: 0,\n offsetY: -gap,\n },\n ]\n : [\n // Bottom-left (default) - right border aligns with right side of trigger\n {\n originX: 'end',\n originY: 'bottom',\n overlayX: 'end',\n overlayY: 'top',\n offsetX: 0,\n offsetY: gap,\n },\n // Bottom-right (if not enough space on left) - left border aligns with left side of trigger\n {\n originX: 'start',\n originY: 'bottom',\n overlayX: 'start',\n overlayY: 'top',\n offsetX: 0,\n offsetY: gap,\n },\n // Top-left (if not enough space below) - right border aligns with right side of trigger\n {\n originX: 'end',\n originY: 'top',\n overlayX: 'end',\n overlayY: 'bottom',\n offsetX: 0,\n offsetY: -gap,\n },\n // Top-right (if not enough space below and on left) - left border aligns with left side of trigger\n {\n originX: 'start',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'bottom',\n offsetX: 0,\n offsetY: -gap,\n },\n ];\n\n return this.positionBuilder\n .flexibleConnectedTo(target)\n .withPositions(positions)\n .withFlexibleDimensions(true)\n .withPush(true)\n .withGrowAfterOpen(true)\n .withViewportMargin(8);\n }\n}\n","<ng-template #selectionDropdownTemplate>\n <div class=\"ap-selection-dropdown__content\">\n <!-- Header -->\n <div class=\"ap-selection-dropdown__header\">\n <div class=\"ap-selection-dropdown__header-top\">\n @if (title()) {\n <h3 class=\"ap-selection-dropdown__title\">\n {{ title() }}\n </h3>\n }\n @if (headerButtonText()) {\n <a\n class=\"standalone\"\n role=\"link\"\n tabindex=\"0\"\n [id]=\"headerButtonId()\"\n (click)=\"onHeaderButtonClick()\"\n (keydown)=\"onHeaderButtonKeydown($event)\">\n <ap-symbol [symbolId]=\"headerButtonSymbolId()\" />\n {{ headerButtonText() }}\n </a>\n }\n </div>\n <ap-input-search\n [placeholder]=\"searchPlaceholderText()\"\n [clearable]=\"true\"\n [(ngModel)]=\"searchTerm\"\n (ngModelChange)=\"onSearchTermChange()\" />\n </div>\n\n <!-- Selection dropdown items -->\n <div class=\"ap-selection-dropdown__items\">\n @if (filteredItems().length === 0 && searchTerm) {\n <div class=\"ap-selection-dropdown__no-results\">\n {{ noSearchResultsText() }}\n </div>\n } @else {\n <!-- Selected items section (at the top) -->\n @if (selectedItems().length > 0) {\n <div class=\"ap-selection-dropdown__selected-section\">\n @for (item of selectedItems(); track item.htmlId) {\n <div [apTooltip]=\"item.disabledTooltip\">\n <button\n type=\"button\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n class=\"ap-selection-dropdown__item-button\"\n [class.ap-selection-dropdown__item-button--disabled]=\"item.disabled || item.isFeatureLocked\"\n (click)=\"onItemToggle(item, !item.selected)\">\n <ap-dropdown-item-multiple-one-line\n class=\"ap-selection-dropdown__item\"\n [text]=\"item.text\"\n [selected]=\"item.selected\"\n [htmlId]=\"item.htmlId\"\n [disabled]=\"item.disabled || false\"\n [avatarUrl]=\"item.avatarUrl\"\n [symbolId]=\"item.symbolId\"\n [badgeText]=\"item.badgeText\"\n [isFeatureLocked]=\"item.isFeatureLocked || false\"\n [roundedAvatar]=\"!!item.roundedAvatar\"\n [network]=\"item.network\"\n [symbolColor]=\"item.symbolColor\"\n [symbolTooltipText]=\"item.symbolTooltipText\" />\n </button>\n </div>\n }\n </div>\n }\n\n <!-- Ungrouped unselected items -->\n @for (item of ungroupedItems(); track item.htmlId) {\n <div [apTooltip]=\"item.disabledTooltip\">\n <button\n type=\"button\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n class=\"ap-selection-dropdown__item-button\"\n [class.ap-selection-dropdown__item-button--disabled]=\"item.disabled || item.isFeatureLocked\"\n (click)=\"onItemToggle(item, !item.selected)\">\n <ap-dropdown-item-multiple-one-line\n class=\"ap-selection-dropdown__item\"\n [text]=\"item.text\"\n [selected]=\"item.selected\"\n [htmlId]=\"item.htmlId\"\n [disabled]=\"item.disabled || false\"\n [avatarUrl]=\"item.avatarUrl\"\n [symbolId]=\"item.symbolId\"\n [badgeText]=\"item.badgeText\"\n [isFeatureLocked]=\"item.isFeatureLocked || false\"\n [roundedAvatar]=\"!!item.roundedAvatar\"\n [network]=\"item.network\"\n [symbolColor]=\"item.symbolColor\"\n [symbolTooltipText]=\"item.symbolTooltipText\" />\n </button>\n </div>\n }\n\n <!-- Groups -->\n @for (groupLabel of groupLabels(); track groupLabel) {\n <div class=\"ap-selection-dropdown__group\">\n <!-- Group header with checkbox -->\n <div class=\"ap-selection-dropdown__group-header\">\n <div class=\"ap-selection-dropdown__group-label\">\n <ap-checkbox\n [name]=\"groupLabel\"\n [checked]=\"groupSelectionStates()[groupLabel] === 'selected'\"\n [indeterminate]=\"groupSelectionStates()[groupLabel] === 'partial'\"\n (change)=\"onGroupToggle(groupLabel, $event)\">\n {{ groupLabel }}\n </ap-checkbox>\n </div>\n </div>\n\n <!-- Group items -->\n @for (item of groupItemsMap()[groupLabel]; track item.htmlId) {\n <div [apTooltip]=\"item.disabledTooltip\">\n <button\n type=\"button\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n class=\"ap-selection-dropdown__item-button\"\n [class.ap-selection-dropdown__item-button--disabled]=\"item.disabled || item.isFeatureLocked\"\n (click)=\"onItemToggle(item, !item.selected)\">\n <ap-dropdown-item-multiple-one-line\n class=\"ap-selection-dropdown__item ap-selection-dropdown__item--grouped\"\n [text]=\"item.text\"\n [selected]=\"item.selected\"\n [htmlId]=\"item.htmlId\"\n [disabled]=\"item.disabled || false\"\n [avatarUrl]=\"item.avatarUrl\"\n [symbolId]=\"item.symbolId\"\n [badgeText]=\"item.badgeText\"\n [isFeatureLocked]=\"item.isFeatureLocked || false\"\n [roundedAvatar]=\"!!item.roundedAvatar\"\n [network]=\"item.network\"\n [symbolColor]=\"item.symbolColor\"\n [symbolTooltipText]=\"item.symbolTooltipText\" />\n </button>\n </div>\n }\n </div>\n }\n }\n </div>\n\n <!-- Footer -->\n @if (footerButtonText()) {\n <div class=\"ap-selection-dropdown__footer\">\n <a\n class=\"standalone\"\n role=\"link\"\n tabindex=\"0\"\n [id]=\"footerButtonId()\"\n (click)=\"onFooterButtonClick()\"\n (keydown)=\"onFooterButtonKeydown($event)\">\n <ap-symbol [symbolId]=\"footerButtonSymbolId()\" />\n {{ footerButtonText() }}\n </a>\n </div>\n }\n </div>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAGA;;;AAGG;MAIU,iCAAiC,CAAA;AACzB,IAAA,UAAU,GAAG,MAAM,EAAC,UAAuB,EAAC;;AAG7D,IAAA,0BAA0B,GAAG,KAAK,CAAC,QAAQ,qEAA8B;;AAIzE,IAAA,OAAO,CAAC,KAAiB,EAAA;QACrB,KAAK,CAAC,cAAc,EAAE;QACtB,KAAK,CAAC,eAAe,EAAE;AAEvB,QAAA,MAAM,iBAAiB,GAAG,IAAI,CAAC,0BAA0B,EAAE;QAC3D,IAAI,iBAAiB,EAAE;YACnB,iBAAiB,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC;QAC3D;IACJ;;AAIA,IAAA,SAAS,CAAC,KAAoB,EAAA;AAC1B,QAAA,MAAM,iBAAiB,GAAG,IAAI,CAAC,0BAA0B,EAAE;QAC3D,IAAI,iBAAiB,EAAE;AACnB,YAAA,QAAQ,KAAK,CAAC,GAAG;AACb,gBAAA,KAAK,OAAO;AACZ,gBAAA,KAAK,WAAW;oBACZ,KAAK,CAAC,cAAc,EAAE;oBACtB,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC;oBACrD;AAEJ,gBAAA,KAAK,QAAQ;oBACT,KAAK,CAAC,cAAc,EAAE;oBACtB,iBAAiB,CAAC,KAAK,EAAE;oBACz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;wBACL,iBAAiB;wBACjB,oCAAoC;wBACpC,WAAW;wBACX,oBAAoB;wBACpB,eAAe;wBACf,gBAAgB;AACnB,qBAAA,EAAA,QAAA,EAAA,uoRAAA,EAAA,MAAA,EAAA,CAAA,owFAAA,CAAA,EAAA;;;AE3EL;;AAEG;;;;"}
|
|
@@ -1,8 +1,76 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { inject, ElementRef, NgZone, input, Directive, ViewEncapsulation, ChangeDetectionStrategy, Component, Injectable, ViewContainerRef, DestroyRef, computed, TemplateRef } from '@angular/core';
|
|
3
|
+
import { AvatarComponent } from '@agorapulse/ui-components/avatar';
|
|
3
4
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
4
5
|
import DOMPurify from 'dompurify';
|
|
5
|
-
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Directive that triggers a tooltip to show/hide
|
|
9
|
+
*
|
|
10
|
+
* ```html
|
|
11
|
+
* <div #myTooltip="apTooltip" apTooltip>Content</div>
|
|
12
|
+
* <div [apTooltipExternalTrigger]="myTooltip">Click me</div>
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
class TooltipExternalTriggerDirective {
|
|
16
|
+
elementRef = inject(ElementRef);
|
|
17
|
+
zone = inject(NgZone);
|
|
18
|
+
// Accept a TooltipDirective reference for sibling usage
|
|
19
|
+
apTooltipExternalTrigger = input(...(ngDevMode ? [undefined, { debugName: "apTooltipExternalTrigger" }] : []));
|
|
20
|
+
clickListener = undefined;
|
|
21
|
+
get targetTooltip() {
|
|
22
|
+
// Prefer explicit reference, fall back to parent
|
|
23
|
+
return this.apTooltipExternalTrigger() ?? null;
|
|
24
|
+
}
|
|
25
|
+
ngAfterViewInit() {
|
|
26
|
+
if (!this.targetTooltip) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
this.setupEventListeners();
|
|
30
|
+
}
|
|
31
|
+
setupEventListeners() {
|
|
32
|
+
this.cleanupEventListeners();
|
|
33
|
+
this.zone.runOutsideAngular(() => {
|
|
34
|
+
const nativeElement = this.elementRef.nativeElement;
|
|
35
|
+
this.clickListener = this.onClick.bind(this);
|
|
36
|
+
nativeElement.addEventListener('click', this.clickListener, true);
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
cleanupEventListeners() {
|
|
40
|
+
const nativeElement = this.elementRef.nativeElement;
|
|
41
|
+
if (this.clickListener) {
|
|
42
|
+
nativeElement.removeEventListener('click', this.clickListener, true);
|
|
43
|
+
this.clickListener = undefined;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
ngOnDestroy() {
|
|
47
|
+
this.cleanupEventListeners();
|
|
48
|
+
}
|
|
49
|
+
onClick() {
|
|
50
|
+
this.zone.run(() => {
|
|
51
|
+
const tooltip = this.targetTooltip;
|
|
52
|
+
if (!tooltip)
|
|
53
|
+
return;
|
|
54
|
+
if (tooltip.container) {
|
|
55
|
+
tooltip.deactivate();
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
tooltip.externallyTriggerred = true;
|
|
59
|
+
tooltip.activate();
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: TooltipExternalTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
64
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.1.3", type: TooltipExternalTriggerDirective, isStandalone: true, selector: "[apTooltipExternalTrigger]", inputs: { apTooltipExternalTrigger: { classPropertyName: "apTooltipExternalTrigger", publicName: "apTooltipExternalTrigger", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["apTooltipExternalTrigger"], ngImport: i0 });
|
|
65
|
+
}
|
|
66
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: TooltipExternalTriggerDirective, decorators: [{
|
|
67
|
+
type: Directive,
|
|
68
|
+
args: [{
|
|
69
|
+
selector: '[apTooltipExternalTrigger]',
|
|
70
|
+
standalone: true,
|
|
71
|
+
exportAs: 'apTooltipExternalTrigger',
|
|
72
|
+
}]
|
|
73
|
+
}] });
|
|
6
74
|
|
|
7
75
|
const CustomTooltipType = {
|
|
8
76
|
DEFAULT: 'DEFAULT', // default type
|
|
@@ -18,12 +86,13 @@ class TooltipComponent {
|
|
|
18
86
|
type = input(CustomTooltipType.DEFAULT, ...(ngDevMode ? [{ debugName: "type" }] : []));
|
|
19
87
|
presentationContext = input(...(ngDevMode ? [undefined, { debugName: "presentationContext" }] : []));
|
|
20
88
|
tooltipListItems = input([], ...(ngDevMode ? [{ debugName: "tooltipListItems" }] : []));
|
|
89
|
+
showCaption = input(true, ...(ngDevMode ? [{ debugName: "showCaption" }] : []));
|
|
21
90
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: TooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
22
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: TooltipComponent, isStandalone: true, selector: "ap-tooltip", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, presentationContext: { classPropertyName: "presentationContext", publicName: "presentationContext", isSignal: true, isRequired: false, transformFunction: null }, tooltipListItems: { classPropertyName: "tooltipListItems", publicName: "tooltipListItems", isSignal: true, isRequired: false, transformFunction: null } }, providers: [], ngImport: i0, template: "<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 (
|
|
91
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: TooltipComponent, isStandalone: true, selector: "ap-tooltip", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, presentationContext: { classPropertyName: "presentationContext", publicName: "presentationContext", isSignal: true, isRequired: false, transformFunction: null }, tooltipListItems: { classPropertyName: "tooltipListItems", publicName: "tooltipListItems", isSignal: true, isRequired: false, transformFunction: null }, showCaption: { classPropertyName: "showCaption", publicName: "showCaption", isSignal: true, isRequired: false, transformFunction: null } }, providers: [], ngImport: i0, template: "<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", styles: [".custom-tooltip-container{display:flex;flex-direction:column;width:100%;height:100%;max-height:280px;overflow:auto;padding:var(--ref-spacing-xs);gap:var(--ref-spacing-xxxs);scrollbar-color:var(--ref-color-grey-20) transparent;scrollbar-width:thin}.custom-tooltip-container .tooltip-presentation-title{color:var(--ref-color-grey-100);font-family:Averta;font-size:var(--ref-font-size-md);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-lg)}.custom-tooltip-container .tooltip-presentation-caption{color:var(--ref-color-grey-80);font-family:Averta;font-size:var(--ref-font-size-sm);font-style:normal;font-weight:var(--ref-font-weight-regular);line-height:var(--ref-font-line-height-sm)}.custom-tooltip-container .tooltip-list-container{display:flex;flex-direction:column;align-items:flex-start;gap:var(--ref-spacing-xs)}.custom-tooltip-container .tooltip-list-container .tooltip-item{display:flex;flex-direction:row;align-items:center;gap:var(--ref-spacing-xxs)}.custom-tooltip-container .tooltip-list-container .tooltip-item .tooltip-item-info{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;flex:1 0 0}.custom-tooltip-container .tooltip-list-container .tooltip-item .tooltip-item-info .tooltip-item-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;align-self:stretch;overflow:hidden;color:var(--ref-color-grey-100);text-overflow:ellipsis;font-family:Averta;font-size:var(--ref-font-size-sm);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-sm)}.custom-tooltip-container .tooltip-list-container .tooltip-item .tooltip-item-info .tooltip-item-caption{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;align-self:stretch;overflow:hidden;color:var(--ref-color-grey-80);text-overflow:ellipsis;font-family:Averta;font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-regular);line-height:var(--ref-font-line-height-xs)}\n"], dependencies: [{ kind: "component", type: AvatarComponent, selector: "ap-avatar", inputs: ["profilePicture", "alt", "network", "size", "username", "showInitials", "bigNetwork", "anonymous", "online", "youtubeAvatarMode", "rounded"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
23
92
|
}
|
|
24
93
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: TooltipComponent, decorators: [{
|
|
25
94
|
type: Component,
|
|
26
|
-
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'ap-tooltip', imports: [AvatarComponent], providers: [], encapsulation: ViewEncapsulation.None, template: "<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 (
|
|
95
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'ap-tooltip', imports: [AvatarComponent], providers: [], encapsulation: ViewEncapsulation.None, template: "<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", styles: [".custom-tooltip-container{display:flex;flex-direction:column;width:100%;height:100%;max-height:280px;overflow:auto;padding:var(--ref-spacing-xs);gap:var(--ref-spacing-xxxs);scrollbar-color:var(--ref-color-grey-20) transparent;scrollbar-width:thin}.custom-tooltip-container .tooltip-presentation-title{color:var(--ref-color-grey-100);font-family:Averta;font-size:var(--ref-font-size-md);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-lg)}.custom-tooltip-container .tooltip-presentation-caption{color:var(--ref-color-grey-80);font-family:Averta;font-size:var(--ref-font-size-sm);font-style:normal;font-weight:var(--ref-font-weight-regular);line-height:var(--ref-font-line-height-sm)}.custom-tooltip-container .tooltip-list-container{display:flex;flex-direction:column;align-items:flex-start;gap:var(--ref-spacing-xs)}.custom-tooltip-container .tooltip-list-container .tooltip-item{display:flex;flex-direction:row;align-items:center;gap:var(--ref-spacing-xxs)}.custom-tooltip-container .tooltip-list-container .tooltip-item .tooltip-item-info{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;flex:1 0 0}.custom-tooltip-container .tooltip-list-container .tooltip-item .tooltip-item-info .tooltip-item-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;align-self:stretch;overflow:hidden;color:var(--ref-color-grey-100);text-overflow:ellipsis;font-family:Averta;font-size:var(--ref-font-size-sm);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-sm)}.custom-tooltip-container .tooltip-list-container .tooltip-item .tooltip-item-info .tooltip-item-caption{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;align-self:stretch;overflow:hidden;color:var(--ref-color-grey-80);text-overflow:ellipsis;font-family:Averta;font-size:var(--ref-font-size-xs);font-style:normal;font-weight:var(--ref-font-weight-regular);line-height:var(--ref-font-line-height-xs)}\n"] }]
|
|
27
96
|
}] });
|
|
28
97
|
|
|
29
98
|
class TooltipService {
|
|
@@ -73,11 +142,13 @@ class TooltipDirective {
|
|
|
73
142
|
apTooltipType = input(CustomTooltipType.DEFAULT, ...(ngDevMode ? [{ debugName: "apTooltipType" }] : []));
|
|
74
143
|
apTooltipPresentationContext = input(...(ngDevMode ? [undefined, { debugName: "apTooltipPresentationContext" }] : []));
|
|
75
144
|
apTooltipListItems = input([], ...(ngDevMode ? [{ debugName: "apTooltipListItems" }] : []));
|
|
145
|
+
apTooltipShowAvatarCaption = input(true, ...(ngDevMode ? [{ debugName: "apTooltipShowAvatarCaption" }] : []));
|
|
76
146
|
isDefaultTooltipType = computed(() => !this.apTooltipType() || this.apTooltipType() === CustomTooltipType.DEFAULT, ...(ngDevMode ? [{ debugName: "isDefaultTooltipType" }] : []));
|
|
77
147
|
isValidPredefinedTooltip = computed(() => (this.apTooltipType() === CustomTooltipType.PRESENTATION &&
|
|
78
148
|
this.apTooltipPresentationContext()?.title &&
|
|
79
149
|
this.apTooltipPresentationContext()?.description) ||
|
|
80
150
|
(this.apTooltipType() === CustomTooltipType.LIST && this.apTooltipListItems().length > 0), ...(ngDevMode ? [{ debugName: "isValidPredefinedTooltip" }] : []));
|
|
151
|
+
triggeredByClick = computed(() => this.apTooltipTrigger() === 'click' || this.externallyTriggerred, ...(ngDevMode ? [{ debugName: "triggeredByClick" }] : []));
|
|
81
152
|
clickListener = undefined;
|
|
82
153
|
container = undefined;
|
|
83
154
|
hideTimeout;
|
|
@@ -165,7 +236,7 @@ class TooltipDirective {
|
|
|
165
236
|
}
|
|
166
237
|
activate() {
|
|
167
238
|
this.clearHideTimeout();
|
|
168
|
-
if (this.
|
|
239
|
+
if (this.triggeredByClick()) {
|
|
169
240
|
this.addDocumentClickListener();
|
|
170
241
|
}
|
|
171
242
|
if (this.apTooltipShowDelay()) {
|
|
@@ -247,6 +318,7 @@ class TooltipDirective {
|
|
|
247
318
|
componentRef.setInput('type', this.apTooltipType());
|
|
248
319
|
componentRef.setInput('presentationContext', this.apTooltipPresentationContext());
|
|
249
320
|
componentRef.setInput('tooltipListItems', this.apTooltipListItems());
|
|
321
|
+
componentRef.setInput('showCaption', this.apTooltipShowAvatarCaption());
|
|
250
322
|
// Force change detection to render the component immediately
|
|
251
323
|
componentRef.changeDetectorRef.detectChanges();
|
|
252
324
|
this.container = document.createElement('div');
|
|
@@ -258,6 +330,9 @@ class TooltipDirective {
|
|
|
258
330
|
this.container.appendChild(contentContainer);
|
|
259
331
|
document.body.appendChild(this.container);
|
|
260
332
|
this.container.classList.add('ap-tooltip', 'ap-predefined-tooltip');
|
|
333
|
+
if (this.triggeredByClick()) {
|
|
334
|
+
this.container.classList.add('ap-tooltip-click-trigger');
|
|
335
|
+
}
|
|
261
336
|
// Has to wait for the TooltipComponent to be rendered in order to align and then set the CSS variable --ap-tooltip-height
|
|
262
337
|
requestAnimationFrame(() => {
|
|
263
338
|
this.align();
|
|
@@ -559,81 +634,13 @@ class TooltipDirective {
|
|
|
559
634
|
this._externallyTriggerred = value;
|
|
560
635
|
}
|
|
561
636
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: TooltipDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
562
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.1.3", type: TooltipDirective, isStandalone: true, selector: "[apTooltip]", inputs: { apTooltip: { classPropertyName: "apTooltip", publicName: "apTooltip", isSignal: true, isRequired: true, transformFunction: null }, apTooltipPosition: { classPropertyName: "apTooltipPosition", publicName: "apTooltipPosition", isSignal: true, isRequired: false, transformFunction: null }, apTooltipShowDelay: { classPropertyName: "apTooltipShowDelay", publicName: "apTooltipShowDelay", isSignal: true, isRequired: false, transformFunction: null }, apTooltipHideDelay: { classPropertyName: "apTooltipHideDelay", publicName: "apTooltipHideDelay", isSignal: true, isRequired: false, transformFunction: null }, apTooltipDuration: { classPropertyName: "apTooltipDuration", publicName: "apTooltipDuration", isSignal: true, isRequired: false, transformFunction: null }, apTooltipDisabled: { classPropertyName: "apTooltipDisabled", publicName: "apTooltipDisabled", isSignal: true, isRequired: false, transformFunction: null }, apTooltipTruncatedTextOnly: { classPropertyName: "apTooltipTruncatedTextOnly", publicName: "apTooltipTruncatedTextOnly", isSignal: true, isRequired: false, transformFunction: null }, apTooltipTemplateContext: { classPropertyName: "apTooltipTemplateContext", publicName: "apTooltipTemplateContext", isSignal: true, isRequired: false, transformFunction: null }, apTooltipVirtualScrollElement: { classPropertyName: "apTooltipVirtualScrollElement", publicName: "apTooltipVirtualScrollElement", isSignal: true, isRequired: false, transformFunction: null }, apTooltipTrigger: { classPropertyName: "apTooltipTrigger", publicName: "apTooltipTrigger", isSignal: true, isRequired: false, transformFunction: null }, apTooltipType: { classPropertyName: "apTooltipType", publicName: "apTooltipType", isSignal: true, isRequired: false, transformFunction: null }, apTooltipPresentationContext: { classPropertyName: "apTooltipPresentationContext", publicName: "apTooltipPresentationContext", isSignal: true, isRequired: false, transformFunction: null }, apTooltipListItems: { classPropertyName: "apTooltipListItems", publicName: "apTooltipListItems", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["apTooltip"], ngImport: i0 });
|
|
637
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.1.3", type: TooltipDirective, isStandalone: true, selector: "[apTooltip]", inputs: { apTooltip: { classPropertyName: "apTooltip", publicName: "apTooltip", isSignal: true, isRequired: true, transformFunction: null }, apTooltipPosition: { classPropertyName: "apTooltipPosition", publicName: "apTooltipPosition", isSignal: true, isRequired: false, transformFunction: null }, apTooltipShowDelay: { classPropertyName: "apTooltipShowDelay", publicName: "apTooltipShowDelay", isSignal: true, isRequired: false, transformFunction: null }, apTooltipHideDelay: { classPropertyName: "apTooltipHideDelay", publicName: "apTooltipHideDelay", isSignal: true, isRequired: false, transformFunction: null }, apTooltipDuration: { classPropertyName: "apTooltipDuration", publicName: "apTooltipDuration", isSignal: true, isRequired: false, transformFunction: null }, apTooltipDisabled: { classPropertyName: "apTooltipDisabled", publicName: "apTooltipDisabled", isSignal: true, isRequired: false, transformFunction: null }, apTooltipTruncatedTextOnly: { classPropertyName: "apTooltipTruncatedTextOnly", publicName: "apTooltipTruncatedTextOnly", isSignal: true, isRequired: false, transformFunction: null }, apTooltipTemplateContext: { classPropertyName: "apTooltipTemplateContext", publicName: "apTooltipTemplateContext", isSignal: true, isRequired: false, transformFunction: null }, apTooltipVirtualScrollElement: { classPropertyName: "apTooltipVirtualScrollElement", publicName: "apTooltipVirtualScrollElement", isSignal: true, isRequired: false, transformFunction: null }, apTooltipTrigger: { classPropertyName: "apTooltipTrigger", publicName: "apTooltipTrigger", isSignal: true, isRequired: false, transformFunction: null }, apTooltipType: { classPropertyName: "apTooltipType", publicName: "apTooltipType", isSignal: true, isRequired: false, transformFunction: null }, apTooltipPresentationContext: { classPropertyName: "apTooltipPresentationContext", publicName: "apTooltipPresentationContext", isSignal: true, isRequired: false, transformFunction: null }, apTooltipListItems: { classPropertyName: "apTooltipListItems", publicName: "apTooltipListItems", isSignal: true, isRequired: false, transformFunction: null }, apTooltipShowAvatarCaption: { classPropertyName: "apTooltipShowAvatarCaption", publicName: "apTooltipShowAvatarCaption", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["apTooltip"], ngImport: i0 });
|
|
563
638
|
}
|
|
564
639
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: TooltipDirective, decorators: [{
|
|
565
640
|
type: Directive,
|
|
566
641
|
args: [{ selector: '[apTooltip]', standalone: true, exportAs: 'apTooltip' }]
|
|
567
642
|
}] });
|
|
568
643
|
|
|
569
|
-
/**
|
|
570
|
-
* Directive that triggers a tooltip to show/hide
|
|
571
|
-
*
|
|
572
|
-
* ```html
|
|
573
|
-
* <div #myTooltip="apTooltip" apTooltip>Content</div>
|
|
574
|
-
* <div [apTooltipExternalTrigger]="myTooltip">Click me</div>
|
|
575
|
-
* ```
|
|
576
|
-
*/
|
|
577
|
-
class TooltipExternalTriggerDirective {
|
|
578
|
-
elementRef = inject(ElementRef);
|
|
579
|
-
zone = inject(NgZone);
|
|
580
|
-
// Accept a TooltipDirective reference for sibling usage
|
|
581
|
-
apTooltipExternalTrigger = input(...(ngDevMode ? [undefined, { debugName: "apTooltipExternalTrigger" }] : []));
|
|
582
|
-
clickListener = undefined;
|
|
583
|
-
get targetTooltip() {
|
|
584
|
-
// Prefer explicit reference, fall back to parent
|
|
585
|
-
return this.apTooltipExternalTrigger() ?? null;
|
|
586
|
-
}
|
|
587
|
-
ngAfterViewInit() {
|
|
588
|
-
if (!this.targetTooltip) {
|
|
589
|
-
return;
|
|
590
|
-
}
|
|
591
|
-
this.setupEventListeners();
|
|
592
|
-
}
|
|
593
|
-
setupEventListeners() {
|
|
594
|
-
this.cleanupEventListeners();
|
|
595
|
-
this.zone.runOutsideAngular(() => {
|
|
596
|
-
const nativeElement = this.elementRef.nativeElement;
|
|
597
|
-
this.clickListener = this.onClick.bind(this);
|
|
598
|
-
nativeElement.addEventListener('click', this.clickListener, true);
|
|
599
|
-
});
|
|
600
|
-
}
|
|
601
|
-
cleanupEventListeners() {
|
|
602
|
-
const nativeElement = this.elementRef.nativeElement;
|
|
603
|
-
if (this.clickListener) {
|
|
604
|
-
nativeElement.removeEventListener('click', this.clickListener, true);
|
|
605
|
-
this.clickListener = undefined;
|
|
606
|
-
}
|
|
607
|
-
}
|
|
608
|
-
ngOnDestroy() {
|
|
609
|
-
this.cleanupEventListeners();
|
|
610
|
-
}
|
|
611
|
-
onClick() {
|
|
612
|
-
this.zone.run(() => {
|
|
613
|
-
const tooltip = this.targetTooltip;
|
|
614
|
-
if (!tooltip)
|
|
615
|
-
return;
|
|
616
|
-
if (tooltip.container) {
|
|
617
|
-
tooltip.deactivate();
|
|
618
|
-
}
|
|
619
|
-
else {
|
|
620
|
-
tooltip.externallyTriggerred = true;
|
|
621
|
-
tooltip.activate();
|
|
622
|
-
}
|
|
623
|
-
});
|
|
624
|
-
}
|
|
625
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: TooltipExternalTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
626
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.1.3", type: TooltipExternalTriggerDirective, isStandalone: true, selector: "[apTooltipExternalTrigger]", inputs: { apTooltipExternalTrigger: { classPropertyName: "apTooltipExternalTrigger", publicName: "apTooltipExternalTrigger", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["apTooltipExternalTrigger"], ngImport: i0 });
|
|
627
|
-
}
|
|
628
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: TooltipExternalTriggerDirective, decorators: [{
|
|
629
|
-
type: Directive,
|
|
630
|
-
args: [{
|
|
631
|
-
selector: '[apTooltipExternalTrigger]',
|
|
632
|
-
standalone: true,
|
|
633
|
-
exportAs: 'apTooltipExternalTrigger',
|
|
634
|
-
}]
|
|
635
|
-
}] });
|
|
636
|
-
|
|
637
644
|
/**
|
|
638
645
|
* Generated bundle index. Do not edit.
|
|
639
646
|
*/
|