@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/avatar/index.d.ts CHANGED
@@ -3,6 +3,17 @@ import { NetworkName, agorapulseSymbol, SymbolRegistry } from '@agorapulse/ui-sy
3
3
  import * as i1 from '@angular/common';
4
4
  import { NgStyle } from '@angular/common';
5
5
 
6
+ interface AvatarItem {
7
+ profilePicture?: string;
8
+ alt?: string;
9
+ network?: AvatarNetwork;
10
+ username: string;
11
+ showInitials?: boolean | string;
12
+ bigNetwork?: boolean;
13
+ anonymous?: boolean;
14
+ online?: boolean;
15
+ rounded?: boolean;
16
+ }
6
17
  type AvatarNetwork = NetworkName;
7
18
  type AvatarSize = 56 | 48 | 40 | 36 | 32 | 24 | 16;
8
19
  type BackgroundView = {
@@ -61,4 +72,4 @@ declare class AvatarComponent {
61
72
  }
62
73
 
63
74
  export { AvatarComponent };
64
- export type { AvatarNetwork, AvatarSize };
75
+ export type { AvatarItem, AvatarNetwork, AvatarSize };
@@ -1,29 +1,24 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { AvatarNetwork } from '@agorapulse/ui-components/avatar';
2
+ import { CustomTooltipAvatarItem } from '@agorapulse/ui-components/tooltip';
3
3
 
4
- interface AvatarItem {
5
- profilePicture?: string;
6
- alt?: string;
7
- network?: AvatarNetwork;
8
- username: string;
9
- showInitials?: boolean | string;
10
- bigNetwork?: boolean;
11
- anonymous?: boolean;
12
- online?: boolean;
13
- rounded?: boolean;
14
- }
15
4
  type AvatarGroupSize = 16 | 24 | 32;
16
5
  declare class AvatarGroupComponent {
17
- avatars: _angular_core.InputSignalWithTransform<AvatarItem[], AvatarItem[]>;
6
+ avatars: _angular_core.InputSignalWithTransform<CustomTooltipAvatarItem[], CustomTooltipAvatarItem[]>;
18
7
  size: _angular_core.InputSignal<AvatarGroupSize>;
19
8
  maxAvatars: _angular_core.InputSignal<number>;
20
- visibleAvatars: _angular_core.Signal<AvatarItem[]>;
9
+ showAvatarDescriptionTooltip: _angular_core.InputSignal<boolean>;
10
+ visibleAvatars: _angular_core.Signal<CustomTooltipAvatarItem[]>;
11
+ tooltipAvatars: _angular_core.Signal<CustomTooltipAvatarItem[]>;
21
12
  overflowCount: _angular_core.Signal<number>;
22
13
  hasOverflow: _angular_core.Signal<boolean>;
23
- avatarNamesTooltip: _angular_core.Signal<string>;
14
+ protected readonly CustomTooltipType: {
15
+ DEFAULT: string;
16
+ PRESENTATION: string;
17
+ LIST: string;
18
+ };
24
19
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AvatarGroupComponent, never>;
25
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<AvatarGroupComponent, "ap-avatar-group", never, { "avatars": { "alias": "avatars"; "required": true; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "maxAvatars": { "alias": "maxAvatars"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
20
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AvatarGroupComponent, "ap-avatar-group", never, { "avatars": { "alias": "avatars"; "required": true; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "maxAvatars": { "alias": "maxAvatars"; "required": false; "isSignal": true; }; "showAvatarDescriptionTooltip": { "alias": "showAvatarDescriptionTooltip"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
26
21
  }
27
22
 
28
23
  export { AvatarGroupComponent };
29
- export type { AvatarGroupSize, AvatarItem };
24
+ export type { AvatarGroupSize };
@@ -315,7 +315,7 @@ class ActionDropdownComponent {
315
315
  });
316
316
  }
317
317
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: ActionDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
318
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: ActionDropdownComponent, isStandalone: true, selector: "ap-action-dropdown", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, largeModeEnabled: { classPropertyName: "largeModeEnabled", publicName: "largeModeEnabled", isSignal: true, isRequired: false, transformFunction: null }, showBackdrop: { classPropertyName: "showBackdrop", publicName: "showBackdrop", isSignal: true, isRequired: false, transformFunction: null }, customWidth: { classPropertyName: "customWidth", publicName: "customWidth", isSignal: true, isRequired: false, transformFunction: null }, defaultPosition: { classPropertyName: "defaultPosition", publicName: "defaultPosition", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemClick: "itemClick", opened: "opened", closed: "closed" }, providers: [withSymbols(apInfo, apFeatureLock)], queries: [{ propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "actionDropdownTemplate", first: true, predicate: ["actionDropdownTemplate"], descendants: true, isSignal: true }], ngImport: i0, template: "<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", styles: [":host{display:none}.ap-action-dropdown__content{background-color:var(--comp-action-dropdown-background-color);border-radius:var(--comp-action-dropdown-border-radius);box-shadow:var(--comp-action-dropdown-box-shadow);padding:var(--comp-action-dropdown-padding);outline:none;overflow:hidden;z-index:1000}.ap-action-dropdown__content.ap-action-dropdown__content--default{width:250px}.ap-action-dropdown__content.ap-action-dropdown__content--large{width:340px}.ap-action-dropdown__content:focus{outline:2px solid var(--comp-action-dropdown-item-background-color-focused);outline-offset:2px}.ap-action-dropdown__item{display:flex;align-items:center;width:100%;height:40px;padding:var(--comp-action-dropdown-item-padding);border:none;background:transparent;color:var(--comp-action-dropdown-item-text-color);cursor:pointer;font-family:Averta;font-size:var(--comp-action-dropdown-item-text-size);line-height:var(--comp-action-dropdown-item-text-line-height);text-align:left}.ap-action-dropdown__item:hover{background-color:var(--comp-action-dropdown-item-background-color-hover)}.ap-action-dropdown__item:focus{outline:none;background-color:var(--comp-action-dropdown-item-background-color-focused)}.ap-action-dropdown__item:disabled{cursor:not-allowed;opacity:.4}.ap-action-dropdown__item.ap-action-dropdown__item--has-description{height:auto;min-height:50px}.ap-action-dropdown__item.ap-action-dropdown__item--focused{background-color:var(--comp-action-dropdown-item-background-color-focused)}.ap-action-dropdown__item.ap-action-dropdown__item--red-mode{color:var(--comp-action-dropdown-item-text-color-red-mode)}.ap-action-dropdown__item.ap-action-dropdown__item--red-mode:hover{background-color:var(--comp-action-dropdown-item-background-color-red-mode-hover)}.ap-action-dropdown__item.ap-action-dropdown__item--red-mode:focus{background-color:var(--comp-action-dropdown-item-background-color-red-mode-focused)}.ap-action-dropdown__item.ap-action-dropdown__item--red-mode.ap-action-dropdown__item--focused{background-color:var(--comp-action-dropdown-item-background-color-red-mode-focused)}.ap-action-dropdown__item.ap-action-dropdown__item--feature-lock:hover{background-color:var(--comp-action-dropdown-item-background-color-feature-lock-hover)}.ap-action-dropdown__item.ap-action-dropdown__item--feature-lock:focus{background-color:var(--comp-action-dropdown-item-background-color-feature-lock-focused)}.ap-action-dropdown__item.ap-action-dropdown__item--feature-lock.ap-action-dropdown__item--focused{background-color:var(--comp-action-dropdown-item-background-color-feature-lock-focused)}.ap-action-dropdown__item.ap-action-dropdown__item--disabled:hover{background-color:transparent}.ap-action-dropdown__item .ap-action-dropdown__item-start-icon{margin-right:var(--comp-action-dropdown-item-icon-spacing)}.ap-action-dropdown__item .ap-action-dropdown__item-end-icon{margin-left:var(--comp-action-dropdown-item-icon-spacing)}.ap-action-dropdown__item .ap-action-dropdown__item-text-container{display:flex;flex-direction:column;flex:1;min-width:0}.ap-action-dropdown__item .ap-action-dropdown__item-text-container .ap-action-dropdown__item-label-container{display:flex;align-items:center;gap:var(--comp-action-dropdown-item-label-spacing);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ap-action-dropdown__item .ap-action-dropdown__item-text-container .ap-action-dropdown__item-label-container .ap-action-dropdown__item-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ap-action-dropdown__item .ap-action-dropdown__item-text-container .ap-action-dropdown__item-label-container .ap-action-dropdown__item-label.ap-action-dropdown__item-label--bold{font-weight:var(--ref-font-weight-bold)}.ap-action-dropdown__item .ap-action-dropdown__item-text-container .ap-action-dropdown__item-description{color:var(--comp-action-dropdown-item-description-color);font-size:var(--comp-action-dropdown-item-description-size);line-height:var(--comp-action-dropdown-item-description-line-height)}.ap-action-dropdown__divider{height:1px;background-color:var(--comp-action-dropdown-divider-color);margin:var(--comp-action-dropdown-divider-margin)}\n"], dependencies: [{ kind: "component", type: BadgeComponent, selector: "ap-badge", inputs: ["color"] }, { kind: "ngmodule", type: CommonModule }, { kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["symbolId", "color", "size"], outputs: ["sizeChange"] }, { kind: "directive", type: TooltipDirective, selector: "[apTooltip]", inputs: ["apTooltip", "apTooltipPosition", "apTooltipShowDelay", "apTooltipHideDelay", "apTooltipDuration", "apTooltipDisabled", "apTooltipTruncatedTextOnly", "apTooltipTemplateContext", "apTooltipVirtualScrollElement", "apTooltipTrigger", "apTooltipType", "apTooltipPresentationContext", "apTooltipListItems"], exportAs: ["apTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
318
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: ActionDropdownComponent, isStandalone: true, selector: "ap-action-dropdown", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, largeModeEnabled: { classPropertyName: "largeModeEnabled", publicName: "largeModeEnabled", isSignal: true, isRequired: false, transformFunction: null }, showBackdrop: { classPropertyName: "showBackdrop", publicName: "showBackdrop", isSignal: true, isRequired: false, transformFunction: null }, customWidth: { classPropertyName: "customWidth", publicName: "customWidth", isSignal: true, isRequired: false, transformFunction: null }, defaultPosition: { classPropertyName: "defaultPosition", publicName: "defaultPosition", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemClick: "itemClick", opened: "opened", closed: "closed" }, providers: [withSymbols(apInfo, apFeatureLock)], queries: [{ propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "actionDropdownTemplate", first: true, predicate: ["actionDropdownTemplate"], descendants: true, isSignal: true }], ngImport: i0, template: "<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", styles: [":host{display:none}.ap-action-dropdown__content{background-color:var(--comp-action-dropdown-background-color);border-radius:var(--comp-action-dropdown-border-radius);box-shadow:var(--comp-action-dropdown-box-shadow);padding:var(--comp-action-dropdown-padding);outline:none;overflow:hidden;z-index:1000}.ap-action-dropdown__content.ap-action-dropdown__content--default{width:250px}.ap-action-dropdown__content.ap-action-dropdown__content--large{width:340px}.ap-action-dropdown__content:focus{outline:2px solid var(--comp-action-dropdown-item-background-color-focused);outline-offset:2px}.ap-action-dropdown__item{display:flex;align-items:center;width:100%;height:40px;padding:var(--comp-action-dropdown-item-padding);border:none;background:transparent;color:var(--comp-action-dropdown-item-text-color);cursor:pointer;font-family:Averta;font-size:var(--comp-action-dropdown-item-text-size);line-height:var(--comp-action-dropdown-item-text-line-height);text-align:left}.ap-action-dropdown__item:hover{background-color:var(--comp-action-dropdown-item-background-color-hover)}.ap-action-dropdown__item:focus{outline:none;background-color:var(--comp-action-dropdown-item-background-color-focused)}.ap-action-dropdown__item:disabled{cursor:not-allowed;opacity:.4}.ap-action-dropdown__item.ap-action-dropdown__item--has-description{height:auto;min-height:50px}.ap-action-dropdown__item.ap-action-dropdown__item--focused{background-color:var(--comp-action-dropdown-item-background-color-focused)}.ap-action-dropdown__item.ap-action-dropdown__item--red-mode{color:var(--comp-action-dropdown-item-text-color-red-mode)}.ap-action-dropdown__item.ap-action-dropdown__item--red-mode:hover{background-color:var(--comp-action-dropdown-item-background-color-red-mode-hover)}.ap-action-dropdown__item.ap-action-dropdown__item--red-mode:focus{background-color:var(--comp-action-dropdown-item-background-color-red-mode-focused)}.ap-action-dropdown__item.ap-action-dropdown__item--red-mode.ap-action-dropdown__item--focused{background-color:var(--comp-action-dropdown-item-background-color-red-mode-focused)}.ap-action-dropdown__item.ap-action-dropdown__item--feature-lock:hover{background-color:var(--comp-action-dropdown-item-background-color-feature-lock-hover)}.ap-action-dropdown__item.ap-action-dropdown__item--feature-lock:focus{background-color:var(--comp-action-dropdown-item-background-color-feature-lock-focused)}.ap-action-dropdown__item.ap-action-dropdown__item--feature-lock.ap-action-dropdown__item--focused{background-color:var(--comp-action-dropdown-item-background-color-feature-lock-focused)}.ap-action-dropdown__item.ap-action-dropdown__item--disabled:hover{background-color:transparent}.ap-action-dropdown__item .ap-action-dropdown__item-start-icon{margin-right:var(--comp-action-dropdown-item-icon-spacing)}.ap-action-dropdown__item .ap-action-dropdown__item-end-icon{margin-left:var(--comp-action-dropdown-item-icon-spacing)}.ap-action-dropdown__item .ap-action-dropdown__item-text-container{display:flex;flex-direction:column;flex:1;min-width:0}.ap-action-dropdown__item .ap-action-dropdown__item-text-container .ap-action-dropdown__item-label-container{display:flex;align-items:center;gap:var(--comp-action-dropdown-item-label-spacing);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ap-action-dropdown__item .ap-action-dropdown__item-text-container .ap-action-dropdown__item-label-container .ap-action-dropdown__item-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ap-action-dropdown__item .ap-action-dropdown__item-text-container .ap-action-dropdown__item-label-container .ap-action-dropdown__item-label.ap-action-dropdown__item-label--bold{font-weight:var(--ref-font-weight-bold)}.ap-action-dropdown__item .ap-action-dropdown__item-text-container .ap-action-dropdown__item-description{color:var(--comp-action-dropdown-item-description-color);font-size:var(--comp-action-dropdown-item-description-size);line-height:var(--comp-action-dropdown-item-description-line-height)}.ap-action-dropdown__divider{height:1px;background-color:var(--comp-action-dropdown-divider-color);margin:var(--comp-action-dropdown-divider-margin)}\n"], dependencies: [{ kind: "component", type: BadgeComponent, selector: "ap-badge", inputs: ["color"] }, { kind: "ngmodule", type: CommonModule }, { kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["symbolId", "color", "size"], outputs: ["sizeChange"] }, { kind: "directive", type: TooltipDirective, selector: "[apTooltip]", inputs: ["apTooltip", "apTooltipPosition", "apTooltipShowDelay", "apTooltipHideDelay", "apTooltipDuration", "apTooltipDisabled", "apTooltipTruncatedTextOnly", "apTooltipTemplateContext", "apTooltipVirtualScrollElement", "apTooltipTrigger", "apTooltipType", "apTooltipPresentationContext", "apTooltipListItems", "apTooltipShowAvatarCaption"], exportAs: ["apTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
319
319
  }
320
320
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: ActionDropdownComponent, decorators: [{
321
321
  type: Component,
@@ -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<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;;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,CAAC;QACxD;IACJ;;AAIA,IAAA,SAAS,CAAC,KAAoB,EAAA;AAC1B,QAAA,MAAM,cAAc,GAAG,IAAI,CAAC,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AM,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;;;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 { 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;;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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4BAAA,EAAA,0BAAA,EAAA,+BAAA,EAAA,kBAAA,EAAA,eAAA,EAAA,8BAAA,EAAA,oBAAA,EAAA,4BAAA,CAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAGhE,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBARnC,SAAS;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;;;AEpEnD;;AAEG;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { AvatarComponent } from '@agorapulse/ui-components/avatar';
2
- import { TooltipDirective } from '@agorapulse/ui-components/tooltip';
2
+ import { CustomTooltipType, TooltipDirective } from '@agorapulse/ui-components/tooltip';
3
3
  import * as i0 from '@angular/core';
4
4
  import { input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
5
5
 
@@ -9,30 +9,41 @@ class AvatarGroupComponent {
9
9
  }]));
10
10
  size = input(24, ...(ngDevMode ? [{ debugName: "size" }] : []));
11
11
  maxAvatars = input(5, ...(ngDevMode ? [{ debugName: "maxAvatars" }] : []));
12
+ showAvatarDescriptionTooltip = input(true, ...(ngDevMode ? [{ debugName: "showAvatarDescriptionTooltip" }] : []));
12
13
  visibleAvatars = computed(() => {
13
14
  const max = this.maxAvatars();
14
15
  const all = this.avatars();
15
16
  return all.slice(0, max);
16
17
  }, ...(ngDevMode ? [{ debugName: "visibleAvatars" }] : []));
18
+ // avatars not displayed in the group but shown in the tooltip
19
+ tooltipAvatars = computed(() => {
20
+ const max = this.maxAvatars();
21
+ const all = this.avatars();
22
+ return all.slice(max);
23
+ }, ...(ngDevMode ? [{ debugName: "tooltipAvatars" }] : []));
17
24
  overflowCount = computed(() => {
18
25
  const total = this.avatars().length;
19
26
  const max = this.maxAvatars();
20
- return total > max ? total - max : 0;
27
+ if (total <= max) {
28
+ return 0;
29
+ }
30
+ const result = total - max;
31
+ if (result > 99) {
32
+ return 99;
33
+ }
34
+ return result;
21
35
  }, ...(ngDevMode ? [{ debugName: "overflowCount" }] : []));
22
36
  hasOverflow = computed(() => this.overflowCount() > 0, ...(ngDevMode ? [{ debugName: "hasOverflow" }] : []));
23
- avatarNamesTooltip = computed(() => this.avatars()
24
- .map(avatar => avatar.username)
25
- .reverse()
26
- .join(', '), ...(ngDevMode ? [{ debugName: "avatarNamesTooltip" }] : []));
37
+ CustomTooltipType = CustomTooltipType;
27
38
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AvatarGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
28
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: AvatarGroupComponent, isStandalone: true, selector: "ap-avatar-group", inputs: { avatars: { classPropertyName: "avatars", publicName: "avatars", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, maxAvatars: { classPropertyName: "maxAvatars", publicName: "maxAvatars", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "group" }, properties: { "attr.aria-label": "\"Avatar group\"" } }, ngImport: i0, template: "@if (hasOverflow()) {\n <div\n class=\"overflow-counter\"\n [apTooltip]=\"avatarNamesTooltip()\"\n [attr.data-size]=\"size()\">\n <span class=\"overflow-text\">+{{ overflowCount() }}</span>\n </div>\n}\n\n@for (avatar of visibleAvatars(); track $index) {\n <ap-avatar\n [apTooltip]=\"avatar.username\"\n [profilePicture]=\"avatar.profilePicture\"\n [alt]=\"avatar.alt ?? ''\"\n [network]=\"avatar.network\"\n [size]=\"size()\"\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", styles: [":host{display:inline-flex;flex-direction:row-reverse;align-items:center;padding-left:2px}:host ap-avatar,:host .overflow-counter{margin-inline-start:-2px;cursor:default}.overflow-counter{display:flex;align-items:center;justify-content:center;background-color:var(--ref-color-grey-10);border-radius:24px;transition:background-color var(--ref-animation-short)}.overflow-counter:active{background-color:var(--ref-color-grey-40)}.overflow-counter:focus-visible{background-color:var(--ref-color-grey-20);outline:3px solid var(--ref-color-electric-blue-100);outline-offset:1px}.overflow-text{color:var(--ref-color-grey-80);font-family:var(--ref-font-family);font-weight:700;line-height:1em;text-align:center}.overflow-counter[data-size=\"16\"]{width:16px;height:16px}.overflow-counter[data-size=\"16\"] .overflow-text{font-size:8px}.overflow-counter[data-size=\"24\"]{width:24px;height:24px}.overflow-counter[data-size=\"24\"] .overflow-text{font-size:10px}.overflow-counter[data-size=\"32\"]{width:32px;height:32px}.overflow-counter[data-size=\"32\"] .overflow-text{font-size:12px}\n"], dependencies: [{ kind: "component", type: AvatarComponent, selector: "ap-avatar", inputs: ["profilePicture", "alt", "network", "size", "username", "showInitials", "bigNetwork", "anonymous", "online", "youtubeAvatarMode", "rounded"] }, { kind: "directive", type: TooltipDirective, selector: "[apTooltip]", inputs: ["apTooltip", "apTooltipPosition", "apTooltipShowDelay", "apTooltipHideDelay", "apTooltipDuration", "apTooltipDisabled", "apTooltipTruncatedTextOnly", "apTooltipTemplateContext", "apTooltipVirtualScrollElement", "apTooltipTrigger", "apTooltipType", "apTooltipPresentationContext", "apTooltipListItems"], exportAs: ["apTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
39
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: AvatarGroupComponent, isStandalone: true, selector: "ap-avatar-group", inputs: { avatars: { classPropertyName: "avatars", publicName: "avatars", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, maxAvatars: { classPropertyName: "maxAvatars", publicName: "maxAvatars", isSignal: true, isRequired: false, transformFunction: null }, showAvatarDescriptionTooltip: { classPropertyName: "showAvatarDescriptionTooltip", publicName: "showAvatarDescriptionTooltip", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "group" }, properties: { "attr.aria-label": "\"Avatar group\"" } }, ngImport: i0, template: "<div class=\"avatars-group\">\n @if (hasOverflow()) {\n <div\n class=\"overflow-counter\"\n apTooltip\n apTooltipTrigger=\"click\"\n [apTooltipType]=\"CustomTooltipType.LIST\"\n [apTooltipListItems]=\"tooltipAvatars()\"\n [attr.data-size]=\"size()\">\n <span class=\"overflow-text\">+{{ overflowCount() }}</span>\n </div>\n }\n\n <div class=\"avatars-list\">\n @for (avatar of visibleAvatars(); track $index) {\n <ap-avatar\n apTooltip\n [apTooltipType]=\"CustomTooltipType.LIST\"\n [apTooltipListItems]=\"[avatar]\"\n [profilePicture]=\"avatar.profilePicture\"\n [alt]=\"avatar.alt ?? ''\"\n [network]=\"avatar.network\"\n [size]=\"size()\"\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>\n</div>\n", styles: [".avatars-group,.avatars-list{display:inline-flex;flex-direction:row-reverse;align-items:center;padding-left:2px}.avatars-group ap-avatar{cursor:default}.avatars-group ap-avatar,.avatars-group .overflow-counter{margin-inline-start:-2px}.overflow-counter{display:flex;align-items:center;justify-content:center;background-color:var(--ref-color-grey-10);border-radius:24px;transition:background-color var(--ref-animation-short);cursor:pointer}.overflow-counter:focus-visible{background-color:var(--ref-color-grey-20);outline:3px solid var(--ref-color-electric-blue-100);outline-offset:1px}.overflow-counter:hover{background-color:var(--ref-color-grey-20)}.overflow-counter:active{background-color:var(--ref-color-grey-40)}.overflow-text{color:var(--ref-color-grey-80);font-family:var(--ref-font-family);font-weight:700;line-height:1em;text-align:center}.overflow-counter[data-size=\"16\"]{width:16px;height:16px}.overflow-counter[data-size=\"16\"] .overflow-text{font-size:8px}.overflow-counter[data-size=\"24\"]{width:24px;height:24px}.overflow-counter[data-size=\"24\"] .overflow-text{font-size:10px}.overflow-counter[data-size=\"32\"]{width:32px;height:32px}.overflow-counter[data-size=\"32\"] .overflow-text{font-size:12px}\n"], dependencies: [{ kind: "component", type: AvatarComponent, selector: "ap-avatar", inputs: ["profilePicture", "alt", "network", "size", "username", "showInitials", "bigNetwork", "anonymous", "online", "youtubeAvatarMode", "rounded"] }, { kind: "directive", type: TooltipDirective, selector: "[apTooltip]", inputs: ["apTooltip", "apTooltipPosition", "apTooltipShowDelay", "apTooltipHideDelay", "apTooltipDuration", "apTooltipDisabled", "apTooltipTruncatedTextOnly", "apTooltipTemplateContext", "apTooltipVirtualScrollElement", "apTooltipTrigger", "apTooltipType", "apTooltipPresentationContext", "apTooltipListItems", "apTooltipShowAvatarCaption"], exportAs: ["apTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
29
40
  }
30
41
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AvatarGroupComponent, decorators: [{
31
42
  type: Component,
32
43
  args: [{ selector: 'ap-avatar-group', changeDetection: ChangeDetectionStrategy.OnPush, imports: [AvatarComponent, TooltipDirective], host: {
33
44
  role: 'group',
34
45
  '[attr.aria-label]': '"Avatar group"',
35
- }, template: "@if (hasOverflow()) {\n <div\n class=\"overflow-counter\"\n [apTooltip]=\"avatarNamesTooltip()\"\n [attr.data-size]=\"size()\">\n <span class=\"overflow-text\">+{{ overflowCount() }}</span>\n </div>\n}\n\n@for (avatar of visibleAvatars(); track $index) {\n <ap-avatar\n [apTooltip]=\"avatar.username\"\n [profilePicture]=\"avatar.profilePicture\"\n [alt]=\"avatar.alt ?? ''\"\n [network]=\"avatar.network\"\n [size]=\"size()\"\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", styles: [":host{display:inline-flex;flex-direction:row-reverse;align-items:center;padding-left:2px}:host ap-avatar,:host .overflow-counter{margin-inline-start:-2px;cursor:default}.overflow-counter{display:flex;align-items:center;justify-content:center;background-color:var(--ref-color-grey-10);border-radius:24px;transition:background-color var(--ref-animation-short)}.overflow-counter:active{background-color:var(--ref-color-grey-40)}.overflow-counter:focus-visible{background-color:var(--ref-color-grey-20);outline:3px solid var(--ref-color-electric-blue-100);outline-offset:1px}.overflow-text{color:var(--ref-color-grey-80);font-family:var(--ref-font-family);font-weight:700;line-height:1em;text-align:center}.overflow-counter[data-size=\"16\"]{width:16px;height:16px}.overflow-counter[data-size=\"16\"] .overflow-text{font-size:8px}.overflow-counter[data-size=\"24\"]{width:24px;height:24px}.overflow-counter[data-size=\"24\"] .overflow-text{font-size:10px}.overflow-counter[data-size=\"32\"]{width:32px;height:32px}.overflow-counter[data-size=\"32\"] .overflow-text{font-size:12px}\n"] }]
46
+ }, template: "<div class=\"avatars-group\">\n @if (hasOverflow()) {\n <div\n class=\"overflow-counter\"\n apTooltip\n apTooltipTrigger=\"click\"\n [apTooltipType]=\"CustomTooltipType.LIST\"\n [apTooltipListItems]=\"tooltipAvatars()\"\n [attr.data-size]=\"size()\">\n <span class=\"overflow-text\">+{{ overflowCount() }}</span>\n </div>\n }\n\n <div class=\"avatars-list\">\n @for (avatar of visibleAvatars(); track $index) {\n <ap-avatar\n apTooltip\n [apTooltipType]=\"CustomTooltipType.LIST\"\n [apTooltipListItems]=\"[avatar]\"\n [profilePicture]=\"avatar.profilePicture\"\n [alt]=\"avatar.alt ?? ''\"\n [network]=\"avatar.network\"\n [size]=\"size()\"\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>\n</div>\n", styles: [".avatars-group,.avatars-list{display:inline-flex;flex-direction:row-reverse;align-items:center;padding-left:2px}.avatars-group ap-avatar{cursor:default}.avatars-group ap-avatar,.avatars-group .overflow-counter{margin-inline-start:-2px}.overflow-counter{display:flex;align-items:center;justify-content:center;background-color:var(--ref-color-grey-10);border-radius:24px;transition:background-color var(--ref-animation-short);cursor:pointer}.overflow-counter:focus-visible{background-color:var(--ref-color-grey-20);outline:3px solid var(--ref-color-electric-blue-100);outline-offset:1px}.overflow-counter:hover{background-color:var(--ref-color-grey-20)}.overflow-counter:active{background-color:var(--ref-color-grey-40)}.overflow-text{color:var(--ref-color-grey-80);font-family:var(--ref-font-family);font-weight:700;line-height:1em;text-align:center}.overflow-counter[data-size=\"16\"]{width:16px;height:16px}.overflow-counter[data-size=\"16\"] .overflow-text{font-size:8px}.overflow-counter[data-size=\"24\"]{width:24px;height:24px}.overflow-counter[data-size=\"24\"] .overflow-text{font-size:10px}.overflow-counter[data-size=\"32\"]{width:32px;height:32px}.overflow-counter[data-size=\"32\"] .overflow-text{font-size:12px}\n"] }]
36
47
  }] });
37
48
 
38
49
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"agorapulse-ui-components-avatar-group.mjs","sources":["../../../libs/ui-components/avatar-group/src/avatar-group.component.ts","../../../libs/ui-components/avatar-group/src/avatar-group.component.html","../../../libs/ui-components/avatar-group/src/agorapulse-ui-components-avatar-group.ts"],"sourcesContent":["import { AvatarComponent, AvatarNetwork } from '@agorapulse/ui-components/avatar';\nimport { TooltipDirective } from '@agorapulse/ui-components/tooltip';\nimport { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\n\nexport interface AvatarItem {\n profilePicture?: string;\n alt?: string;\n network?: AvatarNetwork;\n username: string;\n showInitials?: boolean | string;\n bigNetwork?: boolean;\n anonymous?: boolean;\n online?: boolean;\n rounded?: boolean;\n}\n\nexport type AvatarGroupSize = 16 | 24 | 32;\n\n@Component({\n selector: 'ap-avatar-group',\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './avatar-group.component.html',\n styleUrls: ['./avatar-group.component.scss'],\n imports: [AvatarComponent, TooltipDirective],\n host: {\n role: 'group',\n '[attr.aria-label]': '\"Avatar group\"',\n },\n})\nexport class AvatarGroupComponent {\n avatars = input.required<AvatarItem[], AvatarItem[]>({\n transform: (value: AvatarItem[]) => [...value].reverse(),\n });\n size = input<AvatarGroupSize>(24);\n maxAvatars = input<number>(5);\n\n visibleAvatars = computed(() => {\n const max = this.maxAvatars();\n const all = this.avatars();\n return all.slice(0, max);\n });\n\n overflowCount = computed(() => {\n const total = this.avatars().length;\n const max = this.maxAvatars();\n return total > max ? total - max : 0;\n });\n\n hasOverflow = computed(() => this.overflowCount() > 0);\n avatarNamesTooltip = computed(() =>\n this.avatars()\n .map(avatar => avatar.username)\n .reverse()\n .join(', ')\n );\n}\n","@if (hasOverflow()) {\n <div\n class=\"overflow-counter\"\n [apTooltip]=\"avatarNamesTooltip()\"\n [attr.data-size]=\"size()\">\n <span class=\"overflow-text\">+{{ overflowCount() }}</span>\n </div>\n}\n\n@for (avatar of visibleAvatars(); track $index) {\n <ap-avatar\n [apTooltip]=\"avatar.username\"\n [profilePicture]=\"avatar.profilePicture\"\n [alt]=\"avatar.alt ?? ''\"\n [network]=\"avatar.network\"\n [size]=\"size()\"\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\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BAAA,EAAA,oBAAA,EAAA,oBAAA,EAAA,mBAAA,EAAA,mBAAA,EAAA,4BAAA,EAAA,0BAAA,EAAA,+BAAA,EAAA,kBAAA,EAAA,eAAA,EAAA,8BAAA,EAAA,oBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAMlC,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAXhC,SAAS;+BACI,iBAAiB,EAAA,eAAA,EACV,uBAAuB,CAAC,MAAM,EAAA,OAAA,EAGtC,CAAC,eAAe,EAAE,gBAAgB,CAAC,EAAA,IAAA,EACtC;AACF,wBAAA,IAAI,EAAE,OAAO;AACb,wBAAA,mBAAmB,EAAE,gBAAgB;AACxC,qBAAA,EAAA,QAAA,EAAA,uxBAAA,EAAA,MAAA,EAAA,CAAA,wjCAAA,CAAA,EAAA;;;AE3BL;;AAEG;;;;"}
1
+ {"version":3,"file":"agorapulse-ui-components-avatar-group.mjs","sources":["../../../libs/ui-components/avatar-group/src/avatar-group.component.ts","../../../libs/ui-components/avatar-group/src/avatar-group.component.html","../../../libs/ui-components/avatar-group/src/agorapulse-ui-components-avatar-group.ts"],"sourcesContent":["import { AvatarComponent } from '@agorapulse/ui-components/avatar';\nimport { CustomTooltipAvatarItem, CustomTooltipType, TooltipDirective } from '@agorapulse/ui-components/tooltip';\nimport { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\n\nexport type AvatarGroupSize = 16 | 24 | 32;\n\n@Component({\n selector: 'ap-avatar-group',\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './avatar-group.component.html',\n styleUrls: ['./avatar-group.component.scss'],\n imports: [AvatarComponent, TooltipDirective],\n host: {\n role: 'group',\n '[attr.aria-label]': '\"Avatar group\"',\n },\n})\nexport class AvatarGroupComponent {\n avatars = input.required<CustomTooltipAvatarItem[], CustomTooltipAvatarItem[]>({\n transform: (value: CustomTooltipAvatarItem[]) => [...value].reverse(),\n });\n size = input<AvatarGroupSize>(24);\n maxAvatars = input<number>(5);\n showAvatarDescriptionTooltip = input(true);\n\n visibleAvatars = computed(() => {\n const max = this.maxAvatars();\n const all = this.avatars();\n return all.slice(0, max);\n });\n\n // avatars not displayed in the group but shown in the tooltip\n tooltipAvatars = computed(() => {\n const max = this.maxAvatars();\n const all = this.avatars();\n return all.slice(max);\n });\n\n overflowCount = computed(() => {\n const total = this.avatars().length;\n const max = this.maxAvatars();\n if (total <= max) {\n return 0;\n }\n const result = total - max;\n if (result > 99) {\n return 99;\n }\n return result;\n });\n\n hasOverflow = computed(() => this.overflowCount() > 0);\n\n protected readonly CustomTooltipType = CustomTooltipType;\n}\n","<div class=\"avatars-group\">\n @if (hasOverflow()) {\n <div\n class=\"overflow-counter\"\n apTooltip\n apTooltipTrigger=\"click\"\n [apTooltipType]=\"CustomTooltipType.LIST\"\n [apTooltipListItems]=\"tooltipAvatars()\"\n [attr.data-size]=\"size()\">\n <span class=\"overflow-text\">+{{ overflowCount() }}</span>\n </div>\n }\n\n <div class=\"avatars-list\">\n @for (avatar of visibleAvatars(); track $index) {\n <ap-avatar\n apTooltip\n [apTooltipType]=\"CustomTooltipType.LIST\"\n [apTooltipListItems]=\"[avatar]\"\n [profilePicture]=\"avatar.profilePicture\"\n [alt]=\"avatar.alt ?? ''\"\n [network]=\"avatar.network\"\n [size]=\"size()\"\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>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;MAiBa,oBAAoB,CAAA;AAC7B,IAAA,OAAO,GAAG,KAAK,CAAC,QAAQ,CAAA,IAAA,SAAA,GAAA,CAAA,EA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AA,EAAA,CAAA,2sCAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDrBc,eAAe,6MAAE,gBAAgB,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,CAAA,WAAA,EAAA,mBAAA,EAAA,oBAAA,EAAA,oBAAA,EAAA,mBAAA,EAAA,mBAAA,EAAA,4BAAA,EAAA,0BAAA,EAAA,+BAAA,EAAA,kBAAA,EAAA,eAAA,EAAA,8BAAA,EAAA,oBAAA,EAAA,4BAAA,CAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAMlC,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAXhC,SAAS;+BACI,iBAAiB,EAAA,eAAA,EACV,uBAAuB,CAAC,MAAM,EAAA,OAAA,EAGtC,CAAC,eAAe,EAAE,gBAAgB,CAAC,EAAA,IAAA,EACtC;AACF,wBAAA,IAAI,EAAE,OAAO;AACb,wBAAA,mBAAmB,EAAE,gBAAgB;AACxC,qBAAA,EAAA,QAAA,EAAA,itCAAA,EAAA,MAAA,EAAA,CAAA,2sCAAA,CAAA,EAAA;;;AEfL;;AAEG;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"agorapulse-ui-components-avatar.mjs","sources":["../../../libs/ui-components/avatar/src/avatar.component.ts","../../../libs/ui-components/avatar/src/avatar.component.html","../../../libs/ui-components/avatar/src/agorapulse-ui-components-avatar.ts"],"sourcesContent":["import {\n agorapulseSymbol,\n apMask,\n apUser,\n networkDescription,\n NetworkName,\n NetworkSymbolPipe,\n SymbolComponent,\n SymbolRegistry,\n toNetworkSymbol,\n} from '@agorapulse/ui-symbol';\nimport { NgClass, NgOptimizedImage, NgStyle } from '@angular/common';\nimport { booleanAttribute, ChangeDetectionStrategy, Component, computed, effect, input, signal, untracked } from '@angular/core';\n\nexport type AvatarNetwork = NetworkName;\nexport type AvatarSize = 56 | 48 | 40 | 36 | 32 | 24 | 16;\n\nconst onlineIconSizeByAvatarSize: Record<AvatarSize, number> = {\n 56: 16,\n 48: 12,\n 40: 12,\n 36: 8,\n 32: 8,\n 24: 6,\n 16: 6,\n};\n\nconst symbolSizeByAvatarSize: Record<AvatarSize, number> = {\n 56: 28,\n 48: 24,\n 40: 20,\n 36: 18,\n 32: 16,\n 24: 12,\n 16: 8,\n};\n\nconst networkSizeByAvatarSize: Record<AvatarSize, number> = {\n 56: 16,\n 48: 16,\n 40: 16,\n 36: 16,\n 32: 12,\n 24: 12,\n 16: 8,\n};\n\nconst initialSizeByAvatarSize: Record<AvatarSize, number> = {\n 56: 28,\n 48: 24,\n 40: 20,\n 36: 16,\n 32: 16,\n 24: 12,\n 16: 8,\n};\n\nconst automaticBigSymbolNetwork: AvatarNetwork[] = ['youtube'];\n\ntype BackgroundView =\n | { mode: 'image'; image: { src: string; size: number; alt?: string } }\n | { mode: 'initials'; text: string }\n | { mode: 'symbol'; symbolId: agorapulseSymbol; big?: boolean }\n | { mode?: never };\n\ntype OverlayView = { mode: 'online' } | { mode: 'network'; network: NetworkName; round: boolean } | { mode?: never };\n\n@Component({\n selector: 'ap-avatar',\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './avatar.component.html',\n styleUrls: ['./avatar.component.scss'],\n imports: [NgOptimizedImage, SymbolComponent, NgClass, NetworkSymbolPipe],\n hostDirectives: [NgStyle],\n host: {\n '[class.background-default]': '!showBigNetworkBackground()',\n role: 'presentation',\n },\n})\nexport class AvatarComponent {\n profilePicture = input<string>();\n alt = input('');\n network = input(undefined, {\n transform: (v?: AvatarNetwork | string) => (v !== undefined ? (v as AvatarNetwork) : v),\n });\n size = input<AvatarSize | `${AvatarSize}`>(40);\n username = input<string>();\n showInitials = input<boolean | string>();\n bigNetwork = input(false);\n anonymous = input(false);\n online = input(false);\n hideBigNetwork = input(false, { alias: 'youtubeAvatarMode' }); // TODO: rename youtubeAvatarMode to hideBigNetwork in platform\n rounded = input(true, { transform: booleanAttribute });\n\n private imageError = signal(false);\n\n backgroundView = computed<BackgroundView>(() => this.buildBackgroundView());\n overlayView = computed<OverlayView>(() => this.buildOverlayView());\n private useBigNetwork = computed(() => {\n return (this.automaticBigSymbolNetwork() || this.bigNetwork()) && this.network();\n });\n private automaticBigSymbolNetwork = computed(() => {\n return automaticBigSymbolNetwork.includes(this.network() as AvatarNetwork);\n });\n protected showBigNetworkBackground = computed(() => {\n return !this.anonymous() && this.useBigNetwork() && (!this.validProfilePicture() || !this.hideBigNetwork());\n });\n private validProfilePicture = computed(() => {\n return !this.imageError() ? this.profilePicture() : undefined;\n });\n\n constructor(\n symbolRegistry: SymbolRegistry,\n private ngStyle: NgStyle\n ) {\n const networkSymbols = Object.values(networkDescription) //\n .flatMap(({ symbol }) => (typeof symbol !== 'string' ? [symbol] : []));\n\n symbolRegistry.registerSymbols([...networkSymbols, apUser, apMask]);\n\n effect(() => {\n this.ngStyle.ngStyle = this.buildHostStyle();\n this.ngStyle.ngDoCheck();\n });\n effect(() => {\n this.profilePicture(); // on change\n untracked(() => this.imageError.set(false));\n });\n }\n\n onImageError(): void {\n this.imageError.set(true);\n }\n\n private buildBackgroundView(): BackgroundView {\n let bgView: BackgroundView;\n\n if (this.showBigNetworkBackground()) {\n bgView = { mode: 'symbol', symbolId: toNetworkSymbol(this.network()!), big: true };\n } else if (this.anonymous()) {\n bgView = { mode: 'symbol', symbolId: apMask.name };\n } else {\n const profilePicture = this.validProfilePicture();\n\n if (profilePicture) {\n bgView = {\n mode: 'image',\n image: {\n src: profilePicture,\n size: +this.size(),\n alt: this.alt(),\n },\n };\n } else {\n const initials = this.showInitials();\n\n if (initials !== false && initials !== undefined) {\n const useDefault = initials === true || initials === '';\n const candidateName = (useDefault ? (this.username()?.charAt(0) ?? '') : initials.slice(0, 2)).toUpperCase();\n bgView = { mode: 'initials', text: candidateName };\n } else {\n bgView = { mode: 'symbol', symbolId: apUser.name };\n }\n }\n }\n\n return bgView;\n }\n\n private buildOverlayView(): OverlayView {\n let ovlView: OverlayView = {};\n const network = this.network();\n\n if (this.online()) {\n ovlView = { mode: 'online' };\n } else if (network && !this.showBigNetworkBackground() && !this.automaticBigSymbolNetwork()) {\n // unit tests in platform repo gives random network values which are unchecked by the compiler\n const { round } = networkDescription[network] ?? {};\n ovlView = { mode: 'network', network, round };\n }\n\n return ovlView;\n }\n\n private buildHostStyle() {\n const bgView = this.backgroundView();\n const ovlMode = this.overlayView().mode;\n const size = this.size();\n\n return {\n '--ap-avatar-size': `${size}px`,\n '--ap-avatar-border-radius': this.rounded() ? '100%' : 'var(--sys-border-radius-sm)',\n '--ap-avatar-initials-size': bgView.mode == 'initials' ? `${initialSizeByAvatarSize[size]}px` : '',\n '--ap-avatar-symbol-size': bgView.mode == 'symbol' ? `${bgView.big ? size : symbolSizeByAvatarSize[size]}px` : '',\n '--ap-avatar-network-size': ovlMode == 'network' ? `${networkSizeByAvatarSize[size]}px` : '',\n '--ap-avatar-online-icon-size': ovlMode == 'online' ? `${onlineIconSizeByAvatarSize[size]}px` : '',\n };\n }\n}\n","<!-- background -->\n@if (backgroundView(); as bgView) {\n @switch (bgView.mode) {\n @case ('image') {\n <img\n class=\"bg-image\"\n [ngSrc]=\"bgView.image.src\"\n [width]=\"bgView.image.size\"\n [height]=\"bgView.image.size\"\n [alt]=\"bgView.image.alt\"\n (error)=\"onImageError()\" />\n }\n @case ('initials') {\n <div class=\"bg-initials\">\n {{ bgView.text }}\n </div>\n }\n @case ('symbol') {\n <div\n class=\"bg-symbol\"\n [ngClass]=\"['sym-' + bgView.symbolId, bgView.big ? 'big' : '']\">\n <ap-symbol [symbolId]=\"bgView.symbolId\" />\n </div>\n }\n }\n}\n\n<!-- overlay -->\n@if (overlayView(); as ovlView) {\n @switch (ovlView.mode) {\n @case ('network') {\n <div\n class=\"ovl-network\"\n [class.round]=\"ovlView.round\"\n [ngClass]=\"ovlView.network\">\n <ap-symbol [symbolId]=\"ovlView.network | networkSymbol\" />\n </div>\n }\n @case ('online') {\n <div class=\"ovl-online\"></div>\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;AAiBA,MAAM,0BAA0B,GAA+B;AAC3D,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,CAAC;AACL,IAAA,EAAE,EAAE,CAAC;AACL,IAAA,EAAE,EAAE,CAAC;AACL,IAAA,EAAE,EAAE,CAAC;CACR;AAED,MAAM,sBAAsB,GAA+B;AACvD,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,CAAC;CACR;AAED,MAAM,uBAAuB,GAA+B;AACxD,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,CAAC;CACR;AAED,MAAM,uBAAuB,GAA+B;AACxD,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,CAAC;CACR;AAED,MAAM,yBAAyB,GAAoB,CAAC,SAAS,CAAC;MAsBjD,eAAe,CAAA;AAkCZ,IAAA,OAAA;IAjCZ,cAAc,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,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,CAAC,MAAM,EAAA,OAAA,EAGtC,CAAC,gBAAgB,EAAE,eAAe,EAAE,OAAO,EAAE,iBAAiB,CAAC,kBACxD,CAAC,OAAO,CAAC,EAAA,IAAA,EACnB;AACF,wBAAA,4BAA4B,EAAE,6BAA6B;AAC3D,wBAAA,IAAI,EAAE,cAAc;AACvB,qBAAA,EAAA,QAAA,EAAA,4wCAAA,EAAA,MAAA,EAAA,CAAA,wzEAAA,CAAA,EAAA;;;AE7EL;;AAEG;;;;"}
1
+ {"version":3,"file":"agorapulse-ui-components-avatar.mjs","sources":["../../../libs/ui-components/avatar/src/avatar.component.ts","../../../libs/ui-components/avatar/src/avatar.component.html","../../../libs/ui-components/avatar/src/agorapulse-ui-components-avatar.ts"],"sourcesContent":["import {\n agorapulseSymbol,\n apMask,\n apUser,\n networkDescription,\n NetworkName,\n NetworkSymbolPipe,\n SymbolComponent,\n SymbolRegistry,\n toNetworkSymbol,\n} from '@agorapulse/ui-symbol';\nimport { NgClass, NgOptimizedImage, NgStyle } from '@angular/common';\nimport { booleanAttribute, ChangeDetectionStrategy, Component, computed, effect, input, signal, untracked } from '@angular/core';\n\nexport interface AvatarItem {\n profilePicture?: string;\n alt?: string;\n network?: AvatarNetwork;\n username: string;\n showInitials?: boolean | string;\n bigNetwork?: boolean;\n anonymous?: boolean;\n online?: boolean;\n rounded?: boolean;\n}\n\nexport type AvatarNetwork = NetworkName;\nexport type AvatarSize = 56 | 48 | 40 | 36 | 32 | 24 | 16;\n\nconst onlineIconSizeByAvatarSize: Record<AvatarSize, number> = {\n 56: 16,\n 48: 12,\n 40: 12,\n 36: 8,\n 32: 8,\n 24: 6,\n 16: 6,\n};\n\nconst symbolSizeByAvatarSize: Record<AvatarSize, number> = {\n 56: 28,\n 48: 24,\n 40: 20,\n 36: 18,\n 32: 16,\n 24: 12,\n 16: 8,\n};\n\nconst networkSizeByAvatarSize: Record<AvatarSize, number> = {\n 56: 16,\n 48: 16,\n 40: 16,\n 36: 16,\n 32: 12,\n 24: 12,\n 16: 8,\n};\n\nconst initialSizeByAvatarSize: Record<AvatarSize, number> = {\n 56: 28,\n 48: 24,\n 40: 20,\n 36: 16,\n 32: 16,\n 24: 12,\n 16: 8,\n};\n\nconst automaticBigSymbolNetwork: AvatarNetwork[] = ['youtube'];\n\ntype BackgroundView =\n | { mode: 'image'; image: { src: string; size: number; alt?: string } }\n | { mode: 'initials'; text: string }\n | { mode: 'symbol'; symbolId: agorapulseSymbol; big?: boolean }\n | { mode?: never };\n\ntype OverlayView = { mode: 'online' } | { mode: 'network'; network: NetworkName; round: boolean } | { mode?: never };\n\n@Component({\n selector: 'ap-avatar',\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './avatar.component.html',\n styleUrls: ['./avatar.component.scss'],\n imports: [NgOptimizedImage, SymbolComponent, NgClass, NetworkSymbolPipe],\n hostDirectives: [NgStyle],\n host: {\n '[class.background-default]': '!showBigNetworkBackground()',\n role: 'presentation',\n },\n})\nexport class AvatarComponent {\n profilePicture = input<string>();\n alt = input('');\n network = input(undefined, {\n transform: (v?: AvatarNetwork | string) => (v !== undefined ? (v as AvatarNetwork) : v),\n });\n size = input<AvatarSize | `${AvatarSize}`>(40);\n username = input<string>();\n showInitials = input<boolean | string>();\n bigNetwork = input(false);\n anonymous = input(false);\n online = input(false);\n hideBigNetwork = input(false, { alias: 'youtubeAvatarMode' }); // TODO: rename youtubeAvatarMode to hideBigNetwork in platform\n rounded = input(true, { transform: booleanAttribute });\n\n private imageError = signal(false);\n\n backgroundView = computed<BackgroundView>(() => this.buildBackgroundView());\n overlayView = computed<OverlayView>(() => this.buildOverlayView());\n private useBigNetwork = computed(() => {\n return (this.automaticBigSymbolNetwork() || this.bigNetwork()) && this.network();\n });\n private automaticBigSymbolNetwork = computed(() => {\n return automaticBigSymbolNetwork.includes(this.network() as AvatarNetwork);\n });\n protected showBigNetworkBackground = computed(() => {\n return !this.anonymous() && this.useBigNetwork() && (!this.validProfilePicture() || !this.hideBigNetwork());\n });\n private validProfilePicture = computed(() => {\n return !this.imageError() ? this.profilePicture() : undefined;\n });\n\n constructor(\n symbolRegistry: SymbolRegistry,\n private ngStyle: NgStyle\n ) {\n const networkSymbols = Object.values(networkDescription) //\n .flatMap(({ symbol }) => (typeof symbol !== 'string' ? [symbol] : []));\n\n symbolRegistry.registerSymbols([...networkSymbols, apUser, apMask]);\n\n effect(() => {\n this.ngStyle.ngStyle = this.buildHostStyle();\n this.ngStyle.ngDoCheck();\n });\n effect(() => {\n this.profilePicture(); // on change\n untracked(() => this.imageError.set(false));\n });\n }\n\n onImageError(): void {\n this.imageError.set(true);\n }\n\n private buildBackgroundView(): BackgroundView {\n let bgView: BackgroundView;\n\n if (this.showBigNetworkBackground()) {\n bgView = { mode: 'symbol', symbolId: toNetworkSymbol(this.network()!), big: true };\n } else if (this.anonymous()) {\n bgView = { mode: 'symbol', symbolId: apMask.name };\n } else {\n const profilePicture = this.validProfilePicture();\n\n if (profilePicture) {\n bgView = {\n mode: 'image',\n image: {\n src: profilePicture,\n size: +this.size(),\n alt: this.alt(),\n },\n };\n } else {\n const initials = this.showInitials();\n\n if (initials !== false && initials !== undefined) {\n const useDefault = initials === true || initials === '';\n const candidateName = (useDefault ? (this.username()?.charAt(0) ?? '') : initials.slice(0, 2)).toUpperCase();\n bgView = { mode: 'initials', text: candidateName };\n } else {\n bgView = { mode: 'symbol', symbolId: apUser.name };\n }\n }\n }\n\n return bgView;\n }\n\n private buildOverlayView(): OverlayView {\n let ovlView: OverlayView = {};\n const network = this.network();\n\n if (this.online()) {\n ovlView = { mode: 'online' };\n } else if (network && !this.showBigNetworkBackground() && !this.automaticBigSymbolNetwork()) {\n // unit tests in platform repo gives random network values which are unchecked by the compiler\n const { round } = networkDescription[network] ?? {};\n ovlView = { mode: 'network', network, round };\n }\n\n return ovlView;\n }\n\n private buildHostStyle() {\n const bgView = this.backgroundView();\n const ovlMode = this.overlayView().mode;\n const size = this.size();\n\n return {\n '--ap-avatar-size': `${size}px`,\n '--ap-avatar-border-radius': this.rounded() ? '100%' : 'var(--sys-border-radius-sm)',\n '--ap-avatar-initials-size': bgView.mode == 'initials' ? `${initialSizeByAvatarSize[size]}px` : '',\n '--ap-avatar-symbol-size': bgView.mode == 'symbol' ? `${bgView.big ? size : symbolSizeByAvatarSize[size]}px` : '',\n '--ap-avatar-network-size': ovlMode == 'network' ? `${networkSizeByAvatarSize[size]}px` : '',\n '--ap-avatar-online-icon-size': ovlMode == 'online' ? `${onlineIconSizeByAvatarSize[size]}px` : '',\n };\n }\n}\n","<!-- background -->\n@if (backgroundView(); as bgView) {\n @switch (bgView.mode) {\n @case ('image') {\n <img\n class=\"bg-image\"\n [ngSrc]=\"bgView.image.src\"\n [width]=\"bgView.image.size\"\n [height]=\"bgView.image.size\"\n [alt]=\"bgView.image.alt\"\n (error)=\"onImageError()\" />\n }\n @case ('initials') {\n <div class=\"bg-initials\">\n {{ bgView.text }}\n </div>\n }\n @case ('symbol') {\n <div\n class=\"bg-symbol\"\n [ngClass]=\"['sym-' + bgView.symbolId, bgView.big ? 'big' : '']\">\n <ap-symbol [symbolId]=\"bgView.symbolId\" />\n </div>\n }\n }\n}\n\n<!-- overlay -->\n@if (overlayView(); as ovlView) {\n @switch (ovlView.mode) {\n @case ('network') {\n <div\n class=\"ovl-network\"\n [class.round]=\"ovlView.round\"\n [ngClass]=\"ovlView.network\">\n <ap-symbol [symbolId]=\"ovlView.network | networkSymbol\" />\n </div>\n }\n @case ('online') {\n <div class=\"ovl-online\"></div>\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;AA6BA,MAAM,0BAA0B,GAA+B;AAC3D,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,CAAC;AACL,IAAA,EAAE,EAAE,CAAC;AACL,IAAA,EAAE,EAAE,CAAC;AACL,IAAA,EAAE,E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39
  }
40
40
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: LabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
41
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: LabelComponent, isStandalone: true, selector: "ap-label", inputs: { content: "content", selectorWidth: "selectorWidth", removable: ["removable", "removable", booleanAttribute] }, outputs: { remove: "remove" }, ngImport: i0, template: "<div\n class=\"label\"\n [class.removable]=\"removable\"\n [apTooltip]=\"tooltipEnabled ? content : ''\">\n <span class=\"label-content\">{{ content }}</span>\n @if (removable) {\n <ap-close-button (closed)=\"onClearLabel($event)\" />\n }\n</div>\n", styles: ["ap-label{display:flex;max-width:100%;--button-size: calc(var(--comp-label-height) - 4px);--max-width: 180px}ap-label .label{color:var(--comp-label-text-color);align-self:center;background:var(--comp-label-background-color);border-radius:var(--comp-label-border-radius);text-wrap:unset;display:flex;align-items:center;border:none;padding:0 var(--comp-label-padding-right) 0 var(--comp-label-padding-left);height:var(--comp-label-height);box-sizing:border-box;text-overflow:ellipsis;width:100%}ap-label .label.removable{gap:var(--comp-label-closable-spacing);padding:0 var(--comp-label-closable-padding-right) 0 var(--ref-spacing-xxs)}ap-label .label .label-content{max-width:var(--max-width);color:var(--comp-label-text-color);display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-family:var(--comp-label-text-style-font-family);font-size:var(--comp-label-text-style-size);line-height:var(--comp-label-text-style-line-height);font-weight:var(--comp-label-text-style-font-weight)}\n"], dependencies: [{ kind: "directive", type: TooltipDirective, selector: "[apTooltip]", inputs: ["apTooltip", "apTooltipPosition", "apTooltipShowDelay", "apTooltipHideDelay", "apTooltipDuration", "apTooltipDisabled", "apTooltipTruncatedTextOnly", "apTooltipTemplateContext", "apTooltipVirtualScrollElement", "apTooltipTrigger", "apTooltipType", "apTooltipPresentationContext", "apTooltipListItems"], exportAs: ["apTooltip"] }, { kind: "component", type: CloseButtonComponent, selector: "ap-close-button", inputs: ["disabled", "ariaLabel", "dataTest"], outputs: ["closed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
41
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: LabelComponent, isStandalone: true, selector: "ap-label", inputs: { content: "content", selectorWidth: "selectorWidth", removable: ["removable", "removable", booleanAttribute] }, outputs: { remove: "remove" }, ngImport: i0, template: "<div\n class=\"label\"\n [class.removable]=\"removable\"\n [apTooltip]=\"tooltipEnabled ? content : ''\">\n <span class=\"label-content\">{{ content }}</span>\n @if (removable) {\n <ap-close-button (closed)=\"onClearLabel($event)\" />\n }\n</div>\n", styles: ["ap-label{display:flex;max-width:100%;--button-size: calc(var(--comp-label-height) - 4px);--max-width: 180px}ap-label .label{color:var(--comp-label-text-color);align-self:center;background:var(--comp-label-background-color);border-radius:var(--comp-label-border-radius);text-wrap:unset;display:flex;align-items:center;border:none;padding:0 var(--comp-label-padding-right) 0 var(--comp-label-padding-left);height:var(--comp-label-height);box-sizing:border-box;text-overflow:ellipsis;width:100%}ap-label .label.removable{gap:var(--comp-label-closable-spacing);padding:0 var(--comp-label-closable-padding-right) 0 var(--ref-spacing-xxs)}ap-label .label .label-content{max-width:var(--max-width);color:var(--comp-label-text-color);display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-family:var(--comp-label-text-style-font-family);font-size:var(--comp-label-text-style-size);line-height:var(--comp-label-text-style-line-height);font-weight:var(--comp-label-text-style-font-weight)}\n"], dependencies: [{ kind: "directive", type: TooltipDirective, selector: "[apTooltip]", inputs: ["apTooltip", "apTooltipPosition", "apTooltipShowDelay", "apTooltipHideDelay", "apTooltipDuration", "apTooltipDisabled", "apTooltipTruncatedTextOnly", "apTooltipTemplateContext", "apTooltipVirtualScrollElement", "apTooltipTrigger", "apTooltipType", "apTooltipPresentationContext", "apTooltipListItems", "apTooltipShowAvatarCaption"], exportAs: ["apTooltip"] }, { kind: "component", type: CloseButtonComponent, selector: "ap-close-button", inputs: ["disabled", "ariaLabel", "dataTest"], outputs: ["closed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
42
42
  }
43
43
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: LabelComponent, decorators: [{
44
44
  type: Component,
@@ -1 +1 @@
1
- {"version":3,"file":"agorapulse-ui-components-labels.mjs","sources":["../../../libs/ui-components/labels/src/label.component.ts","../../../libs/ui-components/labels/src/label.component.html","../../../libs/ui-components/labels/src/label-list.component.ts","../../../libs/ui-components/labels/src/label-list.component.html","../../../libs/ui-components/labels/src/agorapulse-ui-components-labels.ts"],"sourcesContent":["import { CloseButtonComponent } from '@agorapulse/ui-components/close-button';\nimport { TooltipDirective } from '@agorapulse/ui-components/tooltip';\nimport { apClose, SymbolRegistry } from '@agorapulse/ui-symbol';\nimport {\n AfterViewInit,\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n inject,\n Input,\n NgZone,\n OnDestroy,\n Output,\n ViewEncapsulation,\n} from '@angular/core';\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'ap-label',\n templateUrl: './label.component.html',\n imports: [TooltipDirective, CloseButtonComponent],\n styleUrls: ['./label.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class LabelComponent implements AfterViewInit, OnDestroy {\n private elementRef: ElementRef = inject(ElementRef);\n private symbolRegistry: SymbolRegistry = inject(SymbolRegistry);\n private zone: NgZone = inject(NgZone);\n\n @Input({\n required: true,\n })\n content!: string;\n @Input() selectorWidth: number = 0; //Width of the selector input, if applicable\n @Input({ transform: booleanAttribute }) removable: boolean = false;\n\n @Output() remove = new EventEmitter<{ content: string; $event: MouseEvent }>();\n\n private observer: ResizeObserver | undefined = undefined;\n tooltipEnabled: boolean = false;\n\n constructor() {\n this.symbolRegistry.registerSymbols([apClose]);\n }\n\n ngAfterViewInit(): void {\n this.observer = new ResizeObserver(entries => {\n this.zone.run(() => {\n const containerWidth =\n this.elementRef.nativeElement.clientWidth > 0 ? this.elementRef.nativeElement.clientWidth : this.selectorWidth;\n if (containerWidth > 0) {\n this.tooltipEnabled = entries[0].target.scrollWidth > containerWidth;\n }\n });\n });\n this.observer.observe(this.elementRef.nativeElement.getElementsByClassName('label-content')[0]);\n }\n\n ngOnDestroy() {\n this.observer?.unobserve(this.elementRef.nativeElement.children[0]);\n }\n\n onClearLabel($event: MouseEvent) {\n this.elementRef.nativeElement.remove();\n this.remove.emit({ content: this.content, $event });\n }\n}\n","<div\n class=\"label\"\n [class.removable]=\"removable\"\n [apTooltip]=\"tooltipEnabled ? content : ''\">\n <span class=\"label-content\">{{ content }}</span>\n @if (removable) {\n <ap-close-button (closed)=\"onClearLabel($event)\" />\n }\n</div>\n","import { TextMeasurementService } from '@agorapulse/ui-components/text-measurement';\n\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n Output,\n SimpleChanges,\n} from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\nimport { LabelComponent } from './label.component';\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'ap-label-list',\n templateUrl: './label-list.component.html',\n styleUrls: ['./label-list.component.scss'],\n imports: [LabelComponent],\n})\nexport class LabelListComponent implements AfterContentInit, OnChanges, OnDestroy {\n @Input() labels: string[] = [];\n @Input() removeLabelsEnabled: boolean = false;\n @Input() responsive: boolean = false;\n @Input() seeLessTranslation: string = 'See less';\n @Input() hiddenLabelsTranslation: string = 'labels';\n @Output() removeLabel = new EventEmitter<string>();\n\n badgeWidth: number = 0;\n expanded: boolean = false;\n howManyItemsLeft = 0;\n responsiveLabels: string[] = [];\n\n private observer: ResizeObserver;\n private width$ = new BehaviorSubject<number>(0);\n\n constructor(\n private changeDetectorRef: ChangeDetectorRef,\n private elementRef: ElementRef,\n private textMeasurementService: TextMeasurementService,\n private zone: NgZone\n ) {\n this.observer = new ResizeObserver(entries => {\n this.zone.run(() => {\n this.width$.next(entries[0].contentRect.width);\n });\n });\n }\n\n ngAfterContentInit(): void {\n if (this.responsive) {\n this.generateResponsiveLabels(this.elementRef.nativeElement.getElementsByClassName('labels-list')[0].offsetWidth);\n\n this.observer.observe(this.elementRef.nativeElement.getElementsByClassName('labels-list')[0]);\n this.width$.subscribe(width => {\n this.generateResponsiveLabels(width);\n });\n }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.labels.currentValue && this.responsive) {\n this.generateResponsiveLabels(this.elementRef.nativeElement.getElementsByClassName('labels-list')[0].offsetWidth);\n }\n }\n\n ngOnDestroy() {\n this.observer.unobserve(this.elementRef.nativeElement.getElementsByClassName('labels-list')[0]);\n }\n\n onExpand() {\n this.expanded = !this.expanded;\n }\n\n onRemoveLabel({ content }: { content: string }): void {\n this.removeLabel.emit(content);\n }\n\n onResize() {\n this.generateResponsiveLabels(this.elementRef.nativeElement.children[0].offsetWidth);\n }\n\n public trackByLabelContent(_: number, entry: string) {\n return entry;\n }\n\n private generateResponsiveLabels(width: number) {\n let seeMoreElementWidth = this.textMeasurementService.calculateTextWidth('+'.concat(this.labels.length.toString()), 14, 'Averta');\n seeMoreElementWidth += 1 + 8 + 8 + 1; // border-left + padding-left + padding-right + border-right\n let elementWidth = width - 16 - 16; // width - padding-left - padding-right\n elementWidth -= seeMoreElementWidth;\n let currentIndex = 0;\n for (let index = 0; index < this.labels.length; index++) {\n let textWidth = this.textMeasurementService.calculateTextWidth(this.labels[index], 14, 'Averta');\n textWidth += 1 + 8 + (this.removeLabelsEnabled ? 25 : 8) + 1 + 4; // border-left + padding-left + padding-right + border-right + label spacing\n elementWidth -= textWidth;\n if (elementWidth <= 0) {\n break;\n }\n currentIndex = index;\n }\n if (currentIndex + 1 === this.labels.length) {\n this.expanded = false;\n }\n this.howManyItemsLeft = this.labels.length - (currentIndex + 1);\n this.badgeWidth =\n this.howManyItemsLeft > 0 && currentIndex === 0\n ? this.textMeasurementService.calculateTextWidth('+' + this.howManyItemsLeft, 14, 'Averta') + 22\n : 0;\n this.responsiveLabels = this.labels.slice(0, currentIndex + 1);\n this.changeDetectorRef.markForCheck();\n }\n}\n","<div\n class=\"labels-list\"\n (window:resize)=\"onResize()\">\n @if (responsive) {\n @for (label of expanded ? labels : responsiveLabels; track label) {\n <ap-label\n [content]=\"label\"\n [style.max-width]=\"!expanded ? 'calc(100% - ' + badgeWidth + 'px)' : '100%'\"\n [removable]=\"removeLabelsEnabled\"\n (remove)=\"onRemoveLabel($event)\" />\n }\n @if (!expanded && responsiveLabels.length !== labels.length && howManyItemsLeft > 0) {\n <a\n class=\"standalone\"\n role=\"button\"\n (click)=\"onExpand()\">\n +{{ howManyItemsLeft }} {{ hiddenLabelsTranslation }}\n </a>\n }\n @if (expanded) {\n <a\n class=\"standalone\"\n role=\"button\"\n (click)=\"onExpand()\">\n {{ seeLessTranslation }}\n </a>\n }\n } @else {\n @for (label of labels; track trackByLabelContent($index, label)) {\n <ap-label\n [content]=\"label\"\n [removable]=\"removeLabelsEnabled\"\n (remove)=\"onRemoveLabel($event)\" />\n }\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;MAyBa,cAAc,CAAA;AACf,IAAA,UAAU,GAAe,MAAM,CAAC,UAAU,CAAC;AAC3C,IAAA,cAAc,GAAmB,MAAM,CAAC,cAAc,CAAC;AACvD,IAAA,IAAI,GAAW,MAAM,CAAC,MAAM,CAAC;AAKrC,IAAA,OAAO;AACE,IAAA,aAAa,GAAW,CAAC,CAAC;IACK,SAAS,GAAY,KAAK;AAExD,IAAA,MAAM,GAAG,IAAI,YAAY,EAA2C;IAEtE,QAAQ,GAA+B,SAAS;IACxD,cAAc,GAAY,KAAK;AAE/B,IAAA,WAAA,GAAA;QACI,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EAAA,CAAA;sBAAlB;gBACQ,kBAAkB,EAAA,CAAA;sBAA1B;gBACQ,uBAAuB,EAAA,CAAA;sBAA/B;gBACS,WAAW,EAAA,CAAA;sBAApB;;;AEhCL;;AAEG;;;;"}
1
+ {"version":3,"file":"agorapulse-ui-components-labels.mjs","sources":["../../../libs/ui-components/labels/src/label.component.ts","../../../libs/ui-components/labels/src/label.component.html","../../../libs/ui-components/labels/src/label-list.component.ts","../../../libs/ui-components/labels/src/label-list.component.html","../../../libs/ui-components/labels/src/agorapulse-ui-components-labels.ts"],"sourcesContent":["import { CloseButtonComponent } from '@agorapulse/ui-components/close-button';\nimport { TooltipDirective } from '@agorapulse/ui-components/tooltip';\nimport { apClose, SymbolRegistry } from '@agorapulse/ui-symbol';\nimport {\n AfterViewInit,\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n inject,\n Input,\n NgZone,\n OnDestroy,\n Output,\n ViewEncapsulation,\n} from '@angular/core';\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'ap-label',\n templateUrl: './label.component.html',\n imports: [TooltipDirective, CloseButtonComponent],\n styleUrls: ['./label.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class LabelComponent implements AfterViewInit, OnDestroy {\n private elementRef: ElementRef = inject(ElementRef);\n private symbolRegistry: SymbolRegistry = inject(SymbolRegistry);\n private zone: NgZone = inject(NgZone);\n\n @Input({\n required: true,\n })\n content!: string;\n @Input() selectorWidth: number = 0; //Width of the selector input, if applicable\n @Input({ transform: booleanAttribute }) removable: boolean = false;\n\n @Output() remove = new EventEmitter<{ content: string; $event: MouseEvent }>();\n\n private observer: ResizeObserver | undefined = undefined;\n tooltipEnabled: boolean = false;\n\n constructor() {\n this.symbolRegistry.registerSymbols([apClose]);\n }\n\n ngAfterViewInit(): void {\n this.observer = new ResizeObserver(entries => {\n this.zone.run(() => {\n const containerWidth =\n this.elementRef.nativeElement.clientWidth > 0 ? this.elementRef.nativeElement.clientWidth : this.selectorWidth;\n if (containerWidth > 0) {\n this.tooltipEnabled = entries[0].target.scrollWidth > containerWidth;\n }\n });\n });\n this.observer.observe(this.elementRef.nativeElement.getElementsByClassName('label-content')[0]);\n }\n\n ngOnDestroy() {\n this.observer?.unobserve(this.elementRef.nativeElement.children[0]);\n }\n\n onClearLabel($event: MouseEvent) {\n this.elementRef.nativeElement.remove();\n this.remove.emit({ content: this.content, $event });\n }\n}\n","<div\n class=\"label\"\n [class.removable]=\"removable\"\n [apTooltip]=\"tooltipEnabled ? content : ''\">\n <span class=\"label-content\">{{ content }}</span>\n @if (removable) {\n <ap-close-button (closed)=\"onClearLabel($event)\" />\n }\n</div>\n","import { TextMeasurementService } from '@agorapulse/ui-components/text-measurement';\n\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n Output,\n SimpleChanges,\n} from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\nimport { LabelComponent } from './label.component';\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'ap-label-list',\n templateUrl: './label-list.component.html',\n styleUrls: ['./label-list.component.scss'],\n imports: [LabelComponent],\n})\nexport class LabelListComponent implements AfterContentInit, OnChanges, OnDestroy {\n @Input() labels: string[] = [];\n @Input() removeLabelsEnabled: boolean = false;\n @Input() responsive: boolean = false;\n @Input() seeLessTranslation: string = 'See less';\n @Input() hiddenLabelsTranslation: string = 'labels';\n @Output() removeLabel = new EventEmitter<string>();\n\n badgeWidth: number = 0;\n expanded: boolean = false;\n howManyItemsLeft = 0;\n responsiveLabels: string[] = [];\n\n private observer: ResizeObserver;\n private width$ = new BehaviorSubject<number>(0);\n\n constructor(\n private changeDetectorRef: ChangeDetectorRef,\n private elementRef: ElementRef,\n private textMeasurementService: TextMeasurementService,\n private zone: NgZone\n ) {\n this.observer = new ResizeObserver(entries => {\n this.zone.run(() => {\n this.width$.next(entries[0].contentRect.width);\n });\n });\n }\n\n ngAfterContentInit(): void {\n if (this.responsive) {\n this.generateResponsiveLabels(this.elementRef.nativeElement.getElementsByClassName('labels-list')[0].offsetWidth);\n\n this.observer.observe(this.elementRef.nativeElement.getElementsByClassName('labels-list')[0]);\n this.width$.subscribe(width => {\n this.generateResponsiveLabels(width);\n });\n }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.labels.currentValue && this.responsive) {\n this.generateResponsiveLabels(this.elementRef.nativeElement.getElementsByClassName('labels-list')[0].offsetWidth);\n }\n }\n\n ngOnDestroy() {\n this.observer.unobserve(this.elementRef.nativeElement.getElementsByClassName('labels-list')[0]);\n }\n\n onExpand() {\n this.expanded = !this.expanded;\n }\n\n onRemoveLabel({ content }: { content: string }): void {\n this.removeLabel.emit(content);\n }\n\n onResize() {\n this.generateResponsiveLabels(this.elementRef.nativeElement.children[0].offsetWidth);\n }\n\n public trackByLabelContent(_: number, entry: string) {\n return entry;\n }\n\n private generateResponsiveLabels(width: number) {\n let seeMoreElementWidth = this.textMeasurementService.calculateTextWidth('+'.concat(this.labels.length.toString()), 14, 'Averta');\n seeMoreElementWidth += 1 + 8 + 8 + 1; // border-left + padding-left + padding-right + border-right\n let elementWidth = width - 16 - 16; // width - padding-left - padding-right\n elementWidth -= seeMoreElementWidth;\n let currentIndex = 0;\n for (let index = 0; index < this.labels.length; index++) {\n let textWidth = this.textMeasurementService.calculateTextWidth(this.labels[index], 14, 'Averta');\n textWidth += 1 + 8 + (this.removeLabelsEnabled ? 25 : 8) + 1 + 4; // border-left + padding-left + padding-right + border-right + label spacing\n elementWidth -= textWidth;\n if (elementWidth <= 0) {\n break;\n }\n currentIndex = index;\n }\n if (currentIndex + 1 === this.labels.length) {\n this.expanded = false;\n }\n this.howManyItemsLeft = this.labels.length - (currentIndex + 1);\n this.badgeWidth =\n this.howManyItemsLeft > 0 && currentIndex === 0\n ? this.textMeasurementService.calculateTextWidth('+' + this.howManyItemsLeft, 14, 'Averta') + 22\n : 0;\n this.responsiveLabels = this.labels.slice(0, currentIndex + 1);\n this.changeDetectorRef.markForCheck();\n }\n}\n","<div\n class=\"labels-list\"\n (window:resize)=\"onResize()\">\n @if (responsive) {\n @for (label of expanded ? labels : responsiveLabels; track label) {\n <ap-label\n [content]=\"label\"\n [style.max-width]=\"!expanded ? 'calc(100% - ' + badgeWidth + 'px)' : '100%'\"\n [removable]=\"removeLabelsEnabled\"\n (remove)=\"onRemoveLabel($event)\" />\n }\n @if (!expanded && responsiveLabels.length !== labels.length && howManyItemsLeft > 0) {\n <a\n class=\"standalone\"\n role=\"button\"\n (click)=\"onExpand()\">\n +{{ howManyItemsLeft }} {{ hiddenLabelsTranslation }}\n </a>\n }\n @if (expanded) {\n <a\n class=\"standalone\"\n role=\"button\"\n (click)=\"onExpand()\">\n {{ seeLessTranslation }}\n </a>\n }\n } @else {\n @for (label of labels; track trackByLabelContent($index, label)) {\n <ap-label\n [content]=\"label\"\n [removable]=\"removeLabelsEnabled\"\n (remove)=\"onRemoveLabel($event)\" />\n }\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;MAyBa,cAAc,CAAA;AACf,IAAA,UAAU,GAAe,MAAM,CAAC,UAAU,CAAC;AAC3C,IAAA,cAAc,GAAmB,MAAM,CAAC,cAAc,CAAC;AACvD,IAAA,IAAI,GAAW,MAAM,CAAC,MAAM,CAAC;AAKrC,IAAA,OAAO;AACE,IAAA,aAAa,GAAW,CAAC,CAAC;IACK,SAAS,GAAY,KAAK;AAExD,IAAA,MAAM,GAAG,IAAI,YAAY,EAA2C;IAEtE,QAAQ,GAA+B,SAAS;IACxD,cAAc,GAAY,KAAK;AAE/B,IAAA,WAAA,GAAA;QACI,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC,OAAO,CAAC,CAAC;IAClD;IAEA,eAAe,GAAA;QACX,IAAI,CAAC,QAAQ,GAAG,IAAI,cA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