@agorapulse/ui-components 20.3.31 → 20.3.33

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.
@@ -5,7 +5,7 @@ import { agorapulseSymbol, SymbolColor } from '@agorapulse/ui-symbol';
5
5
 
6
6
  interface ActionDropdownItem {
7
7
  /** Unique identifier for the item */
8
- name?: string;
8
+ id: string;
9
9
  /** Display text for the item */
10
10
  label?: string;
11
11
  /** Secondary text displayed below the label */
@@ -34,8 +34,6 @@ interface ActionDropdownItem {
34
34
  disabled?: boolean;
35
35
  /** Whether to add a divider before this item */
36
36
  dividerEnabled?: boolean;
37
- /** Optional ID for the action button item */
38
- id?: string;
39
37
  }
40
38
  /**
41
39
  * A dropdown component that displays a list of actionable items with support for icons,
@@ -97,13 +95,13 @@ declare class ActionDropdownComponent {
97
95
  declare class ActionDropdownTriggerDirective {
98
96
  private readonly elementRef;
99
97
  /** Reference to the ActionDropdown component that this trigger controls */
100
- apActionDropdownTrigger: _angular_core.InputSignal<ActionDropdownComponent>;
98
+ apActionDropdownTrigger: _angular_core.InputSignal<ActionDropdownComponent | undefined>;
101
99
  /** Handles click events to toggle the dropdown */
102
100
  onClick(event: MouseEvent): void;
103
101
  /** Handles keyboard events for accessibility (Enter, Space, Arrow Down, Escape) */
104
102
  onKeyDown(event: KeyboardEvent): void;
105
103
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ActionDropdownTriggerDirective, never>;
106
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ActionDropdownTriggerDirective, "[apActionDropdownTrigger]", never, { "apActionDropdownTrigger": { "alias": "apActionDropdownTrigger"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
104
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ActionDropdownTriggerDirective, "[apActionDropdownTrigger]", never, { "apActionDropdownTrigger": { "alias": "apActionDropdownTrigger"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
107
105
  }
108
106
 
109
107
  export { ActionDropdownComponent, ActionDropdownTriggerDirective };
@@ -16,7 +16,7 @@ import { take } from 'rxjs/operators';
16
16
  class ActionDropdownTriggerDirective {
17
17
  elementRef = inject((ElementRef));
18
18
  /** Reference to the ActionDropdown component that this trigger controls */
19
- apActionDropdownTrigger = input.required(...(ngDevMode ? [{ debugName: "apActionDropdownTrigger" }] : []));
19
+ apActionDropdownTrigger = input(...(ngDevMode ? [undefined, { debugName: "apActionDropdownTrigger" }] : []));
20
20
  /** Handles click events to toggle the dropdown */
21
21
  onClick(event) {
22
22
  event.preventDefault();
@@ -45,7 +45,7 @@ class ActionDropdownTriggerDirective {
45
45
  }
46
46
  }
47
47
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: ActionDropdownTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
48
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.1.3", type: ActionDropdownTriggerDirective, isStandalone: true, selector: "[apActionDropdownTrigger]", inputs: { apActionDropdownTrigger: { classPropertyName: "apActionDropdownTrigger", publicName: "apActionDropdownTrigger", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "click": "onClick($event)", "keydown": "onKeyDown($event)" } }, ngImport: i0 });
48
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.1.3", type: ActionDropdownTriggerDirective, isStandalone: true, selector: "[apActionDropdownTrigger]", inputs: { apActionDropdownTrigger: { classPropertyName: "apActionDropdownTrigger", publicName: "apActionDropdownTrigger", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "onClick($event)", "keydown": "onKeyDown($event)" } }, ngImport: i0 });
49
49
  }
50
50
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: ActionDropdownTriggerDirective, decorators: [{
51
51
  type: Directive,
@@ -1 +1 @@
1
- {"version":3,"file":"agorapulse-ui-components-action-dropdown.mjs","sources":["../../../libs/ui-components/action-dropdown/src/action-dropdown-trigger.directive.ts","../../../libs/ui-components/action-dropdown/src/action-dropdown.component.ts","../../../libs/ui-components/action-dropdown/src/action-dropdown.component.html","../../../libs/ui-components/action-dropdown/src/agorapulse-ui-components-action-dropdown.ts"],"sourcesContent":["import { Directive, ElementRef, HostListener, inject, input } from '@angular/core';\nimport { ActionDropdownComponent } from './action-dropdown.component';\n\n/**\n * Directive that turns any element into a trigger for an ActionDropdown component.\n * Handles click and keyboard interactions to open/close the dropdown.\n */\n@Directive({\n selector: '[apActionDropdownTrigger]',\n})\nexport class ActionDropdownTriggerDirective {\n private readonly elementRef = inject(ElementRef<HTMLElement>);\n\n /** Reference to the ActionDropdown component that this trigger controls */\n apActionDropdownTrigger = input.required<ActionDropdownComponent>();\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 actionDropdown = this.apActionDropdownTrigger();\n if (actionDropdown) {\n actionDropdown.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 actionDropdown = this.apActionDropdownTrigger();\n if (actionDropdown) {\n switch (event.key) {\n case 'Enter':\n case ' ':\n case 'ArrowDown':\n event.preventDefault();\n actionDropdown.open(this.elementRef.nativeElement);\n break;\n\n case 'Escape':\n event.preventDefault();\n actionDropdown.close();\n break;\n }\n }\n }\n}\n","import { BadgeComponent, BadgeColor } from '@agorapulse/ui-components/badge';\nimport { UI_COMPONENTS_SYMBOLS } from '@agorapulse/ui-components/providers';\nimport { TooltipDirective } from '@agorapulse/ui-components/tooltip';\nimport { agorapulseSymbol, apFeatureLock, apInfo, SymbolColor, SymbolComponent, SymbolRegistry, withSymbols } from '@agorapulse/ui-symbol';\nimport { ConnectedPosition, FlexibleConnectedPositionStrategy, Overlay, OverlayPositionBuilder, OverlayRef } from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport { CommonModule } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n contentChild,\n effect,\n ElementRef,\n inject,\n input,\n output,\n signal,\n TemplateRef,\n viewChild,\n ViewContainerRef,\n} from '@angular/core';\nimport { take } from 'rxjs/operators';\n\nexport interface ActionDropdownItem {\n /** Unique identifier for the item */\n name?: string;\n /** Display text for the item */\n label?: string;\n /** Secondary text displayed below the label */\n description?: string;\n /** Text displayed in a badge next to the item */\n badgeLabel?: string;\n /** Color of the badge displayed next to the item */\n badgeColor?: BadgeColor;\n /** Whether to show a feature lock icon */\n featureLockEnabled?: boolean;\n /** Whether to apply red styling for destructive actions */\n redModeEnabled?: boolean;\n /** Tooltip text displayed when hovering over the item */\n itemTooltipText?: string;\n /** Icon symbol identifier displayed at the start of the item */\n startSymbolId?: agorapulseSymbol;\n /** Color theme for the start symbol */\n startSymbolColor?: SymbolColor;\n /** Tooltip text for the start symbol */\n startSymbolTooltipText?: string;\n /** Icon symbol identifier displayed at the end of the item */\n endSymbolId?: agorapulseSymbol;\n /** Tooltip text for the end symbol */\n endSymbolTooltipText?: string;\n /** Whether the item is disabled and non-interactive */\n disabled?: boolean;\n /** Whether to add a divider before this item */\n dividerEnabled?: boolean;\n /** Optional ID for the action button item */\n id?: string;\n}\n\n/**\n * A dropdown component that displays a list of actionable items with support for icons,\n * badges, tooltips, and keyboard navigation.\n */\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'ap-action-dropdown',\n templateUrl: './action-dropdown.component.html',\n styleUrls: ['./action-dropdown.component.scss'],\n imports: [BadgeComponent, CommonModule, SymbolComponent, TooltipDirective],\n providers: [withSymbols(apInfo, apFeatureLock)],\n})\nexport class ActionDropdownComponent {\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 actionDropdownTemplate = viewChild<TemplateRef<unknown>>('actionDropdownTemplate');\n trigger = contentChild<TemplateRef<unknown>>('trigger');\n\n /** Array of items to display in the dropdown menu */\n items = input<ActionDropdownItem[]>([]);\n /** Whether the dropdown is disabled and cannot be opened */\n disabled = input(false);\n /** Whether to enable large mode styling for the dropdown */\n largeModeEnabled = input(false);\n /** Whether to show a backdrop that closes the dropdown when clicked */\n showBackdrop = input(true);\n /** Custom width for the dropdown menu in pixels */\n customWidth = input<number | null>(null);\n /** Default position for the dropdown relative to the trigger element */\n defaultPosition = input<'right' | 'left'>('right');\n\n /** Emits when a dropdown item is clicked */\n itemClick = output<ActionDropdownItem>();\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\n private overlayRef: OverlayRef | null = null;\n private portal: TemplatePortal<unknown> | null = null;\n\n protected readonly isOpen = signal(false);\n protected readonly focusedIndex = signal(-1);\n\n constructor() {\n this.symbolRegistry.withSymbols(...(inject(UI_COMPONENTS_SYMBOLS, { optional: true })?.flat() ?? []));\n\n // Set up keyboard navigation when dropdown opens\n effect(() => {\n if (this.isOpen()) {\n this.setupKeyboardNavigation();\n }\n });\n }\n\n /** Opens the dropdown menu at the specified trigger element or component's element */\n open(triggerElement?: HTMLElement): void {\n const actionDropdownTemplate = this.actionDropdownTemplate();\n\n if (this.disabled() || this.isOpen() || !actionDropdownTemplate) {\n return;\n }\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(actionDropdownTemplate, this.viewContainerRef);\n this.overlayRef.attach(this.portal);\n\n this.isOpen.set(true);\n this.focusedIndex.set(-1);\n this.opened.emit();\n\n this.overlayRef\n .backdropClick()\n .pipe(take(1))\n .subscribe(() => {\n this.close();\n });\n\n this.overlayRef\n .keydownEvents()\n .pipe(take(1))\n .subscribe((event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n this.close();\n }\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.focusedIndex.set(-1);\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 click events, emitting the selected item and closing the dropdown */\n onItemClick(item: ActionDropdownItem): void {\n if (item.disabled) {\n return;\n }\n\n this.itemClick.emit(item);\n\n this.close();\n }\n\n /** Handles keyboard navigation within the dropdown menu */\n onKeyDown(event: KeyboardEvent): void {\n const items = this.items();\n const currentIndex = this.focusedIndex();\n let nextIndex: number;\n let prevIndex: number;\n\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault();\n nextIndex = currentIndex < items.length - 1 ? currentIndex + 1 : 0;\n this.focusedIndex.set(nextIndex);\n break;\n\n case 'ArrowUp':\n event.preventDefault();\n prevIndex = currentIndex > 0 ? currentIndex - 1 : items.length - 1;\n this.focusedIndex.set(prevIndex);\n break;\n\n case 'Enter':\n case ' ':\n event.preventDefault();\n if (currentIndex >= 0 && currentIndex < items.length) {\n this.onItemClick(items[currentIndex]);\n }\n break;\n\n case 'Escape':\n event.preventDefault();\n this.close();\n break;\n\n case 'Tab':\n event.preventDefault();\n if (event.shiftKey) {\n // Shift+Tab - move to previous item\n prevIndex = currentIndex > 0 ? currentIndex - 1 : items.length - 1;\n this.focusedIndex.set(prevIndex);\n } else {\n // Tab - move to next item\n nextIndex = currentIndex < items.length - 1 ? currentIndex + 1 : 0;\n this.focusedIndex.set(nextIndex);\n }\n break;\n }\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 /** Sets up keyboard event handling for the opened dropdown */\n private setupKeyboardNavigation(): void {\n if (!this.overlayRef) {\n return;\n }\n\n const keydownEvents = this.overlayRef.keydownEvents();\n\n keydownEvents.subscribe((event: KeyboardEvent) => {\n this.onKeyDown(event);\n });\n }\n}\n","<ng-template #actionDropdownTemplate>\n <!-- Action dropdown -->\n <div\n class=\"ap-action-dropdown__content\"\n role=\"menu\"\n tabindex=\"-1\"\n [attr.aria-label]=\"'Action dropdown'\"\n [class.ap-action-dropdown__content--default]=\"!largeModeEnabled() && !customWidth()\"\n [class.ap-action-dropdown__content--large]=\"largeModeEnabled()\"\n [style.width]=\"customWidth() ? customWidth() + 'px' : undefined\"\n (keydown)=\"onKeyDown($event)\">\n <!-- Action dropdown items -->\n @for (item of items(); track item.label) {\n <!-- Divider -->\n @if (item.dividerEnabled) {\n <div\n class=\"ap-action-dropdown__divider\"\n role=\"separator\"></div>\n }\n <!-- Action dropdown item -->\n <div [apTooltip]=\"item.itemTooltipText\">\n <button\n type=\"button\"\n role=\"menuitem\"\n class=\"ap-action-dropdown__item\"\n [class.ap-action-dropdown__item--has-description]=\"item.description\"\n [class.ap-action-dropdown__item--focused]=\"focusedIndex() === $index\"\n [class.ap-action-dropdown__item--red-mode]=\"item.redModeEnabled\"\n [class.ap-action-dropdown__item--feature-lock]=\"item.featureLockEnabled\"\n [attr.aria-disabled]=\"item.disabled\"\n [attr.id]=\"item.id\"\n [disabled]=\"item.disabled\"\n (click)=\"onItemClick(item)\">\n <!-- Start icon -->\n @if (item.startSymbolId) {\n <ap-symbol\n class=\"ap-action-dropdown__item-start-icon\"\n size=\"sm\"\n [color]=\"item.startSymbolColor ? item.startSymbolColor : item.redModeEnabled ? 'red' : 'basic-grey'\"\n [symbolId]=\"item.startSymbolId\"\n [apTooltip]=\"item.startSymbolTooltipText\" />\n }\n <!-- Label -->\n <div class=\"ap-action-dropdown__item-text-container\">\n <div class=\"ap-action-dropdown__item-label-container\">\n <div\n class=\"ap-action-dropdown__item-label\"\n [class.ap-action-dropdown__item-label--bold]=\"item.description\">\n {{ item.label }}\n </div>\n <!-- Badge -->\n @if (item.badgeLabel) {\n <ap-badge [color]=\"item.badgeColor ?? 'blue'\">\n {{ item.badgeLabel }}\n </ap-badge>\n }\n </div>\n <!-- Description -->\n <div class=\"ap-action-dropdown__item-description\">{{ item.description }}</div>\n </div>\n <!-- End icon -->\n @if (item.endSymbolId) {\n <ap-symbol\n class=\"ap-action-dropdown__item-end-icon\"\n size=\"sm\"\n color=\"#858FA1\"\n [symbolId]=\"item.endSymbolId\"\n [apTooltip]=\"item.endSymbolTooltipText\" />\n }\n <!-- Feature lock icon -->\n @if (item.featureLockEnabled) {\n <ap-symbol\n class=\"ap-action-dropdown__item-end-icon\"\n size=\"sm\"\n color=\"purple\"\n symbolId=\"feature-lock\" />\n }\n </button>\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,8BAA8B,CAAA;AACtB,IAAA,UAAU,GAAG,MAAM,EAAC,UAAuB,EAAC;;AAG7D,IAAA,uBAAuB,GAAG,KAAK,CAAC,QAAQ,kEAA2B;;AAInE,IAAA,OAAO,CAAC,KAAiB,EAAA;QACrB,KAAK,CAAC,cAAc,EAAE;QACtB,KAAK,CAAC,eAAe,EAAE;AAEvB,QAAA,MAAM,cAAc,GAAG,IAAI,CAAC,uBAAuB,EAAE;QACrD,IAAI,cAAc,EAAE;YAChB,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC;QACxD;IACJ;;AAIA,IAAA,SAAS,CAAC,KAAoB,EAAA;AAC1B,QAAA,MAAM,cAAc,GAAG,IAAI,CAAC,uBAAuB,EAAE;QACrD,IAAI,cAAc,EAAE;AAChB,YAAA,QAAQ,KAAK,CAAC,GAAG;A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AA,QAAA,EAAA,wgIAAA,EAAA,MAAA,EAAA,CAAA,8jIAAA,CAAA,EAAA;;;AEpEnD;;AAEG;;;;"}
1
+ {"version":3,"file":"agorapulse-ui-components-action-dropdown.mjs","sources":["../../../libs/ui-components/action-dropdown/src/action-dropdown-trigger.directive.ts","../../../libs/ui-components/action-dropdown/src/action-dropdown.component.ts","../../../libs/ui-components/action-dropdown/src/action-dropdown.component.html","../../../libs/ui-components/action-dropdown/src/agorapulse-ui-components-action-dropdown.ts"],"sourcesContent":["import { Directive, ElementRef, HostListener, inject, input } from '@angular/core';\nimport { ActionDropdownComponent } from './action-dropdown.component';\n\n/**\n * Directive that turns any element into a trigger for an ActionDropdown component.\n * Handles click and keyboard interactions to open/close the dropdown.\n */\n@Directive({\n selector: '[apActionDropdownTrigger]',\n})\nexport class ActionDropdownTriggerDirective {\n private readonly elementRef = inject(ElementRef<HTMLElement>);\n\n /** Reference to the ActionDropdown component that this trigger controls */\n apActionDropdownTrigger = input<ActionDropdownComponent>();\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 actionDropdown = this.apActionDropdownTrigger();\n if (actionDropdown) {\n actionDropdown.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 actionDropdown = this.apActionDropdownTrigger();\n if (actionDropdown) {\n switch (event.key) {\n case 'Enter':\n case ' ':\n case 'ArrowDown':\n event.preventDefault();\n actionDropdown.open(this.elementRef.nativeElement);\n break;\n\n case 'Escape':\n event.preventDefault();\n actionDropdown.close();\n break;\n }\n }\n }\n}\n","import { BadgeColor, BadgeComponent } from '@agorapulse/ui-components/badge';\nimport { UI_COMPONENTS_SYMBOLS } from '@agorapulse/ui-components/providers';\nimport { TooltipDirective } from '@agorapulse/ui-components/tooltip';\nimport { agorapulseSymbol, apFeatureLock, apInfo, SymbolColor, SymbolComponent, SymbolRegistry, withSymbols } from '@agorapulse/ui-symbol';\nimport { ConnectedPosition, FlexibleConnectedPositionStrategy, Overlay, OverlayPositionBuilder, OverlayRef } from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport { CommonModule } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n contentChild,\n effect,\n ElementRef,\n inject,\n input,\n output,\n signal,\n TemplateRef,\n viewChild,\n ViewContainerRef,\n} from '@angular/core';\nimport { take } from 'rxjs/operators';\n\nexport interface ActionDropdownItem {\n /** Unique identifier for the item */\n id: string;\n /** Display text for the item */\n label?: string;\n /** Secondary text displayed below the label */\n description?: string;\n /** Text displayed in a badge next to the item */\n badgeLabel?: string;\n /** Color of the badge displayed next to the item */\n badgeColor?: BadgeColor;\n /** Whether to show a feature lock icon */\n featureLockEnabled?: boolean;\n /** Whether to apply red styling for destructive actions */\n redModeEnabled?: boolean;\n /** Tooltip text displayed when hovering over the item */\n itemTooltipText?: string;\n /** Icon symbol identifier displayed at the start of the item */\n startSymbolId?: agorapulseSymbol;\n /** Color theme for the start symbol */\n startSymbolColor?: SymbolColor;\n /** Tooltip text for the start symbol */\n startSymbolTooltipText?: string;\n /** Icon symbol identifier displayed at the end of the item */\n endSymbolId?: agorapulseSymbol;\n /** Tooltip text for the end symbol */\n endSymbolTooltipText?: string;\n /** Whether the item is disabled and non-interactive */\n disabled?: boolean;\n /** Whether to add a divider before this item */\n dividerEnabled?: boolean;\n}\n\n/**\n * A dropdown component that displays a list of actionable items with support for icons,\n * badges, tooltips, and keyboard navigation.\n */\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'ap-action-dropdown',\n templateUrl: './action-dropdown.component.html',\n styleUrls: ['./action-dropdown.component.scss'],\n imports: [BadgeComponent, CommonModule, SymbolComponent, TooltipDirective],\n providers: [withSymbols(apInfo, apFeatureLock)],\n})\nexport class ActionDropdownComponent {\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 actionDropdownTemplate = viewChild<TemplateRef<unknown>>('actionDropdownTemplate');\n trigger = contentChild<TemplateRef<unknown>>('trigger');\n\n /** Array of items to display in the dropdown menu */\n items = input<ActionDropdownItem[]>([]);\n /** Whether the dropdown is disabled and cannot be opened */\n disabled = input(false);\n /** Whether to enable large mode styling for the dropdown */\n largeModeEnabled = input(false);\n /** Whether to show a backdrop that closes the dropdown when clicked */\n showBackdrop = input(true);\n /** Custom width for the dropdown menu in pixels */\n customWidth = input<number | null>(null);\n /** Default position for the dropdown relative to the trigger element */\n defaultPosition = input<'right' | 'left'>('right');\n\n /** Emits when a dropdown item is clicked */\n itemClick = output<ActionDropdownItem>();\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\n private overlayRef: OverlayRef | null = null;\n private portal: TemplatePortal<unknown> | null = null;\n\n protected readonly isOpen = signal(false);\n protected readonly focusedIndex = signal(-1);\n\n constructor() {\n this.symbolRegistry.withSymbols(...(inject(UI_COMPONENTS_SYMBOLS, { optional: true })?.flat() ?? []));\n\n // Set up keyboard navigation when dropdown opens\n effect(() => {\n if (this.isOpen()) {\n this.setupKeyboardNavigation();\n }\n });\n }\n\n /** Opens the dropdown menu at the specified trigger element or component's element */\n open(triggerElement?: HTMLElement): void {\n const actionDropdownTemplate = this.actionDropdownTemplate();\n\n if (this.disabled() || this.isOpen() || !actionDropdownTemplate) {\n return;\n }\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(actionDropdownTemplate, this.viewContainerRef);\n this.overlayRef.attach(this.portal);\n\n this.isOpen.set(true);\n this.focusedIndex.set(-1);\n this.opened.emit();\n\n this.overlayRef\n .backdropClick()\n .pipe(take(1))\n .subscribe(() => {\n this.close();\n });\n\n this.overlayRef\n .keydownEvents()\n .pipe(take(1))\n .subscribe((event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n this.close();\n }\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.focusedIndex.set(-1);\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 click events, emitting the selected item and closing the dropdown */\n onItemClick(item: ActionDropdownItem): void {\n if (item.disabled) {\n return;\n }\n\n this.itemClick.emit(item);\n\n this.close();\n }\n\n /** Handles keyboard navigation within the dropdown menu */\n onKeyDown(event: KeyboardEvent): void {\n const items = this.items();\n const currentIndex = this.focusedIndex();\n let nextIndex: number;\n let prevIndex: number;\n\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault();\n nextIndex = currentIndex < items.length - 1 ? currentIndex + 1 : 0;\n this.focusedIndex.set(nextIndex);\n break;\n\n case 'ArrowUp':\n event.preventDefault();\n prevIndex = currentIndex > 0 ? currentIndex - 1 : items.length - 1;\n this.focusedIndex.set(prevIndex);\n break;\n\n case 'Enter':\n case ' ':\n event.preventDefault();\n if (currentIndex >= 0 && currentIndex < items.length) {\n this.onItemClick(items[currentIndex]);\n }\n break;\n\n case 'Escape':\n event.preventDefault();\n this.close();\n break;\n\n case 'Tab':\n event.preventDefault();\n if (event.shiftKey) {\n // Shift+Tab - move to previous item\n prevIndex = currentIndex > 0 ? currentIndex - 1 : items.length - 1;\n this.focusedIndex.set(prevIndex);\n } else {\n // Tab - move to next item\n nextIndex = currentIndex < items.length - 1 ? currentIndex + 1 : 0;\n this.focusedIndex.set(nextIndex);\n }\n break;\n }\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 /** Sets up keyboard event handling for the opened dropdown */\n private setupKeyboardNavigation(): void {\n if (!this.overlayRef) {\n return;\n }\n\n const keydownEvents = this.overlayRef.keydownEvents();\n\n keydownEvents.subscribe((event: KeyboardEvent) => {\n this.onKeyDown(event);\n });\n }\n}\n","<ng-template #actionDropdownTemplate>\n <!-- Action dropdown -->\n <div\n class=\"ap-action-dropdown__content\"\n role=\"menu\"\n tabindex=\"-1\"\n [attr.aria-label]=\"'Action dropdown'\"\n [class.ap-action-dropdown__content--default]=\"!largeModeEnabled() && !customWidth()\"\n [class.ap-action-dropdown__content--large]=\"largeModeEnabled()\"\n [style.width]=\"customWidth() ? customWidth() + 'px' : undefined\"\n (keydown)=\"onKeyDown($event)\">\n <!-- Action dropdown items -->\n @for (item of items(); track item.label) {\n <!-- Divider -->\n @if (item.dividerEnabled) {\n <div\n class=\"ap-action-dropdown__divider\"\n role=\"separator\"></div>\n }\n <!-- Action dropdown item -->\n <div [apTooltip]=\"item.itemTooltipText\">\n <button\n type=\"button\"\n role=\"menuitem\"\n class=\"ap-action-dropdown__item\"\n [class.ap-action-dropdown__item--has-description]=\"item.description\"\n [class.ap-action-dropdown__item--focused]=\"focusedIndex() === $index\"\n [class.ap-action-dropdown__item--red-mode]=\"item.redModeEnabled\"\n [class.ap-action-dropdown__item--feature-lock]=\"item.featureLockEnabled\"\n [attr.aria-disabled]=\"item.disabled\"\n [attr.id]=\"item.id\"\n [disabled]=\"item.disabled\"\n (click)=\"onItemClick(item)\">\n <!-- Start icon -->\n @if (item.startSymbolId) {\n <ap-symbol\n class=\"ap-action-dropdown__item-start-icon\"\n size=\"sm\"\n [color]=\"item.startSymbolColor ? item.startSymbolColor : item.redModeEnabled ? 'red' : 'basic-grey'\"\n [symbolId]=\"item.startSymbolId\"\n [apTooltip]=\"item.startSymbolTooltipText\" />\n }\n <!-- Label -->\n <div class=\"ap-action-dropdown__item-text-container\">\n <div class=\"ap-action-dropdown__item-label-container\">\n <div\n class=\"ap-action-dropdown__item-label\"\n [class.ap-action-dropdown__item-label--bold]=\"item.description\">\n {{ item.label }}\n </div>\n <!-- Badge -->\n @if (item.badgeLabel) {\n <ap-badge [color]=\"item.badgeColor ?? 'blue'\">\n {{ item.badgeLabel }}\n </ap-badge>\n }\n </div>\n <!-- Description -->\n <div class=\"ap-action-dropdown__item-description\">{{ item.description }}</div>\n </div>\n <!-- End icon -->\n @if (item.endSymbolId) {\n <ap-symbol\n class=\"ap-action-dropdown__item-end-icon\"\n size=\"sm\"\n color=\"#858FA1\"\n [symbolId]=\"item.endSymbolId\"\n [apTooltip]=\"item.endSymbolTooltipText\" />\n }\n <!-- Feature lock icon -->\n @if (item.featureLockEnabled) {\n <ap-symbol\n class=\"ap-action-dropdown__item-end-icon\"\n size=\"sm\"\n color=\"purple\"\n symbolId=\"feature-lock\" />\n }\n </button>\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,8BAA8B,CAAA;AACtB,IAAA,UAAU,GAAG,MAAM,EAAC,UAAuB,EAAC;;IAG7D,uBAAuB,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,yBAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAA2B;;AAI1D,IAAA,OAAO,CAAC,KAAiB,EAAA;QACrB,KAAK,CAAC,cAAc,EAAE;QACtB,KAAK,CAAC,eAAe,EAAE;AAEvB,QAAA,MAAM,cAAc,GAAG,IAAI,CAAC,uBAAuB,EAAE;QACrD,IAAI,cAAc,EAAE;YAChB,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,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S;sCACW,uBAAuB,CAAC,MAAM,EAAA,QAAA,EACrC,oBAAoB,WAGrB,CAAC,cAAc,EAAE,YAAY,EAAE,eAAe,EAAE,gBAAgB,CAAC,aAC/D,CAAC,WAAW,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,EAAA,QAAA,EAAA,wgIAAA,EAAA,MAAA,EAAA,CAAA,8jIAAA,CAAA,EAAA;;;AElEnD;;AAEG;;;;"}
@@ -2443,13 +2443,12 @@ class NavSelectorLeafComponent {
2443
2443
  network = computed(() => (this.leaf().network ? this.leaf().network : undefined), ...(ngDevMode ? [{ debugName: "network" }] : []));
2444
2444
  leafActions = computed(() => {
2445
2445
  return this.leaf().actions.map(action => ({
2446
- id: action.id ?? undefined,
2447
- name: action.name,
2446
+ id: action.id,
2448
2447
  label: action.label,
2449
2448
  startSymbolId: action.icon ?? undefined,
2450
2449
  disabled: action.status === 'disabled',
2451
2450
  featureLockEnabled: action.status === 'locked',
2452
- dividerEnabled: action.dividerEnabled ?? false
2451
+ dividerEnabled: action.dividerEnabled ?? false,
2453
2452
  }));
2454
2453
  }, ...(ngDevMode ? [{ debugName: "leafActions" }] : []));
2455
2454
  constructor(el, navSelectorLeafPresenter) {
@@ -2541,7 +2540,7 @@ class NavSelectorLeafComponent {
2541
2540
  onActionClicked(action) {
2542
2541
  this.actionClicked.emit({
2543
2542
  leafUid: this.leaf().uid,
2544
- actionName: action.name ?? '',
2543
+ actionName: action.id ?? '',
2545
2544
  });
2546
2545
  }
2547
2546
  computeMaxHeight() {
@@ -3042,7 +3041,16 @@ class NavSelectorComponent {
3042
3041
  this.navSelectorState.initEntries(newEntries, selectedUids, limit);
3043
3042
  }
3044
3043
  else {
3044
+ // Save scroll position before updating
3045
+ const scrollContainer = this.el.nativeElement.querySelector('.nav-selector__content');
3046
+ const scrollTop = scrollContainer?.scrollTop ?? 0;
3045
3047
  this.navSelectorState.updateEntries(newEntries, selectedUids, limit);
3048
+ // Restore scroll position after Angular updates the DOM
3049
+ setTimeout(() => {
3050
+ if (scrollContainer) {
3051
+ scrollContainer.scrollTop = scrollTop;
3052
+ }
3053
+ });
3046
3054
  }
3047
3055
  });
3048
3056
  });