@agorapulse/ui-components 22.2.12 → 22.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/agorapulse-ui-components-22.4.0.tgz +0 -0
  2. package/fesm2022/agorapulse-ui-components-action-dropdown.mjs +5 -10
  3. package/fesm2022/agorapulse-ui-components-action-dropdown.mjs.map +1 -1
  4. package/fesm2022/agorapulse-ui-components-avatar-group.mjs +20 -33
  5. package/fesm2022/agorapulse-ui-components-avatar-group.mjs.map +1 -1
  6. package/fesm2022/agorapulse-ui-components-datepicker.mjs +1 -1
  7. package/fesm2022/agorapulse-ui-components-datepicker.mjs.map +1 -1
  8. package/fesm2022/agorapulse-ui-components-directives.mjs +79 -15
  9. package/fesm2022/agorapulse-ui-components-directives.mjs.map +1 -1
  10. package/fesm2022/agorapulse-ui-components-filter-dropdown.mjs +1 -1
  11. package/fesm2022/agorapulse-ui-components-filter-dropdown.mjs.map +1 -1
  12. package/fesm2022/agorapulse-ui-components-floating.mjs +6 -1
  13. package/fesm2022/agorapulse-ui-components-floating.mjs.map +1 -1
  14. package/fesm2022/agorapulse-ui-components-labels.mjs +3 -108
  15. package/fesm2022/agorapulse-ui-components-labels.mjs.map +1 -1
  16. package/fesm2022/agorapulse-ui-components-nav-selector.mjs +1 -1
  17. package/fesm2022/agorapulse-ui-components-nav-selector.mjs.map +1 -1
  18. package/fesm2022/agorapulse-ui-components-overflow-base.mjs +193 -0
  19. package/fesm2022/agorapulse-ui-components-overflow-base.mjs.map +1 -0
  20. package/fesm2022/agorapulse-ui-components-overflow-list.mjs +89 -0
  21. package/fesm2022/agorapulse-ui-components-overflow-list.mjs.map +1 -0
  22. package/fesm2022/agorapulse-ui-components-select.mjs +14 -12
  23. package/fesm2022/agorapulse-ui-components-select.mjs.map +1 -1
  24. package/fesm2022/agorapulse-ui-components-tooltip.mjs +9 -5
  25. package/fesm2022/agorapulse-ui-components-tooltip.mjs.map +1 -1
  26. package/fesm2022/agorapulse-ui-components.mjs +9 -7
  27. package/fesm2022/agorapulse-ui-components.mjs.map +1 -1
  28. package/package.json +9 -1
  29. package/types/agorapulse-ui-components-action-dropdown.d.ts +3 -6
  30. package/types/agorapulse-ui-components-avatar-group.d.ts +12 -5
  31. package/types/agorapulse-ui-components-directives.d.ts +19 -4
  32. package/types/agorapulse-ui-components-labels.d.ts +2 -35
  33. package/types/agorapulse-ui-components-overflow-base.d.ts +124 -0
  34. package/types/agorapulse-ui-components-overflow-list.d.ts +80 -0
  35. package/types/agorapulse-ui-components-select.d.ts +8 -11
  36. package/types/agorapulse-ui-components-tooltip.d.ts +3 -3
  37. package/types/agorapulse-ui-components.d.ts +12 -10
  38. package/agorapulse-ui-components-22.2.12.tgz +0 -0
@@ -59,7 +59,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
59
59
 
60
60
  /**
61
61
  * A dropdown component that displays a list of actionable items with support for icons,
62
- * badges, tooltips, and keyboard navigation.
62
+ * badges, tooltips, and keyboard navigation. Its width follows its longest label between 180 and
63
+ * 340 px; past 340 px, labels ellipsize.
63
64
  */
64
65
  class ActionDropdownComponent {
65
66
  symbolRegistry = inject(SymbolRegistry);
@@ -70,12 +71,6 @@ class ActionDropdownComponent {
70
71
  /** Array of items to display in the dropdown menu */
71
72
  items = input([], /* @ts-ignore */
72
73
  ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
73
- /** Whether to enable large mode styling for the dropdown */
74
- largeModeEnabled = input(false, /* @ts-ignore */
75
- ...(ngDevMode ? [{ debugName: "largeModeEnabled" }] : /* istanbul ignore next */ []));
76
- /** Custom width for the dropdown menu in pixels */
77
- customWidth = input(null, /* @ts-ignore */
78
- ...(ngDevMode ? [{ debugName: "customWidth" }] : /* istanbul ignore next */ []));
79
74
  /** Whether to show a backdrop that closes the dropdown when clicked */
80
75
  showBackdrop = input(true, /* @ts-ignore */
81
76
  ...(ngDevMode ? [{ debugName: "showBackdrop" }] : /* istanbul ignore next */ []));
@@ -155,12 +150,12 @@ class ActionDropdownComponent {
155
150
  this.keyManager.onKeydown(event);
156
151
  }
157
152
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ActionDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
158
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: ActionDropdownComponent, isStandalone: true, selector: "ap-action-dropdown", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, largeModeEnabled: { classPropertyName: "largeModeEnabled", publicName: "largeModeEnabled", isSignal: true, isRequired: false, transformFunction: null }, customWidth: { classPropertyName: "customWidth", publicName: "customWidth", isSignal: true, isRequired: false, transformFunction: null }, showBackdrop: { classPropertyName: "showBackdrop", publicName: "showBackdrop", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { opened: "opened", closed: "closed", itemClick: "itemClick" }, providers: [withSymbols(apInfo, apFeatureLock)], queries: [{ propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "panel", first: true, predicate: DropdownPanelComponent, descendants: true, isSignal: true }, { propertyName: "menuItems", predicate: DropdownOptionDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<ap-dropdown-panel\n [placement]=\"placement()\"\n [showBackdrop]=\"showBackdrop()\"\n (closed)=\"onPanelClosed()\">\n <!-- Action dropdown -->\n <!-- `menu` decides the keyboard: arrows are mandatory, the items are one tab stop, and Tab exits.\n `tabindex=\"-1\"` gives the panel something to focus on opening without adding a stop. -->\n <div\n *apDropdownContent\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 <!-- Roving tabindex: only the active item is tabbable, which is what makes the menu one stop. -->\n <button\n type=\"button\"\n role=\"menuitem\"\n class=\"ap-action-dropdown__item\"\n [apDropdownOption]=\"item.label ?? ''\"\n [apDropdownOptionDisabled]=\"!!item.disabled\"\n [tabindex]=\"activeIndex() === $index ? 0 : -1\"\n [class.ap-action-dropdown__item--has-description]=\"item.description\"\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.data-track]=\"item.dataTrack\"\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</ap-dropdown-panel>\n", styles: [":host{display:none}.ap-action-dropdown__content{padding:var(--comp-action-dropdown-padding);outline:none;z-index:1000;max-height:var(--ap-floating-available-height, none);overflow-y:auto}.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-visible{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}.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:focus-visible{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-visible{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-visible{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: "directive", type: DropdownContentDirective, selector: "ng-template[apDropdownContent]" }, { kind: "directive", type: DropdownOptionDirective, selector: "[apDropdownOption]", inputs: ["apDropdownOption", "apDropdownOptionDisabled"] }, { kind: "component", type: DropdownPanelComponent, selector: "ap-dropdown-panel", inputs: ["placement", "showBackdrop", "panelClass", "canDismiss"], outputs: ["opened", "closed"] }, { 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", "apTooltipArrow", "apTooltipType", "apTooltipPresentationContext", "apTooltipListItems", "apTooltipShowAvatarCaption"], exportAs: ["apTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
153
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: ActionDropdownComponent, isStandalone: true, selector: "ap-action-dropdown", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, showBackdrop: { classPropertyName: "showBackdrop", publicName: "showBackdrop", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { opened: "opened", closed: "closed", itemClick: "itemClick" }, providers: [withSymbols(apInfo, apFeatureLock)], queries: [{ propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "panel", first: true, predicate: DropdownPanelComponent, descendants: true, isSignal: true }, { propertyName: "menuItems", predicate: DropdownOptionDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<ap-dropdown-panel\n [placement]=\"placement()\"\n [showBackdrop]=\"showBackdrop()\"\n (closed)=\"onPanelClosed()\">\n <!-- Action dropdown -->\n <!-- `menu` decides the keyboard: arrows are mandatory, the items are one tab stop, and Tab exits.\n `tabindex=\"-1\"` gives the panel something to focus on opening without adding a stop. -->\n <div\n *apDropdownContent\n class=\"ap-action-dropdown__content\"\n role=\"menu\"\n tabindex=\"-1\"\n [attr.aria-label]=\"'Action dropdown'\"\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 <!-- Roving tabindex: only the active item is tabbable, which is what makes the menu one stop. -->\n <button\n type=\"button\"\n role=\"menuitem\"\n class=\"ap-action-dropdown__item\"\n [apDropdownOption]=\"item.label ?? ''\"\n [apDropdownOptionDisabled]=\"!!item.disabled\"\n [tabindex]=\"activeIndex() === $index ? 0 : -1\"\n [class.ap-action-dropdown__item--has-description]=\"item.description\"\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.data-track]=\"item.dataTrack\"\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</ap-dropdown-panel>\n", styles: [":host{display:none}.ap-action-dropdown__content{padding:var(--comp-action-dropdown-padding);outline:none;z-index:1000;max-height:var(--ap-floating-available-height, none);overflow-y:auto;width:max-content;min-width:min(180px,var(--ap-floating-available-width, 180px));max-width:min(340px,var(--ap-floating-available-width, 340px))}.ap-action-dropdown__content .ap-action-dropdown__item--has-description{min-width:min(250px,var(--ap-floating-available-width, 250px))}.ap-action-dropdown__content .ap-action-dropdown__item-description{contain:inline-size}.ap-action-dropdown__content:focus-visible{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}.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:focus-visible{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-visible{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-visible{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: "directive", type: DropdownContentDirective, selector: "ng-template[apDropdownContent]" }, { kind: "directive", type: DropdownOptionDirective, selector: "[apDropdownOption]", inputs: ["apDropdownOption", "apDropdownOptionDisabled"] }, { kind: "component", type: DropdownPanelComponent, selector: "ap-dropdown-panel", inputs: ["placement", "showBackdrop", "panelClass", "canDismiss"], outputs: ["opened", "closed"] }, { 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", "apTooltipArrow", "apTooltipType", "apTooltipPresentationContext", "apTooltipListItems", "apTooltipShowAvatarCaption"], exportAs: ["apTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
159
154
  }
160
155
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ActionDropdownComponent, decorators: [{
161
156
  type: Component,
162
- args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'ap-action-dropdown', imports: [BadgeComponent, DropdownContentDirective, DropdownOptionDirective, DropdownPanelComponent, SymbolComponent, TooltipDirective], providers: [withSymbols(apInfo, apFeatureLock)], template: "<ap-dropdown-panel\n [placement]=\"placement()\"\n [showBackdrop]=\"showBackdrop()\"\n (closed)=\"onPanelClosed()\">\n <!-- Action dropdown -->\n <!-- `menu` decides the keyboard: arrows are mandatory, the items are one tab stop, and Tab exits.\n `tabindex=\"-1\"` gives the panel something to focus on opening without adding a stop. -->\n <div\n *apDropdownContent\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 <!-- Roving tabindex: only the active item is tabbable, which is what makes the menu one stop. -->\n <button\n type=\"button\"\n role=\"menuitem\"\n class=\"ap-action-dropdown__item\"\n [apDropdownOption]=\"item.label ?? ''\"\n [apDropdownOptionDisabled]=\"!!item.disabled\"\n [tabindex]=\"activeIndex() === $index ? 0 : -1\"\n [class.ap-action-dropdown__item--has-description]=\"item.description\"\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.data-track]=\"item.dataTrack\"\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</ap-dropdown-panel>\n", styles: [":host{display:none}.ap-action-dropdown__content{padding:var(--comp-action-dropdown-padding);outline:none;z-index:1000;max-height:var(--ap-floating-available-height, none);overflow-y:auto}.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-visible{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}.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:focus-visible{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-visible{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-visible{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"] }]
163
- }], ctorParameters: () => [], propDecorators: { panel: [{ type: i0.ViewChild, args: [i0.forwardRef(() => DropdownPanelComponent), { isSignal: true }] }], trigger: [{ type: i0.ContentChild, args: ['trigger', { isSignal: true }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], largeModeEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "largeModeEnabled", required: false }] }], customWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "customWidth", required: false }] }], showBackdrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "showBackdrop", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], opened: [{ type: i0.Output, args: ["opened"] }], closed: [{ type: i0.Output, args: ["closed"] }], itemClick: [{ type: i0.Output, args: ["itemClick"] }], menuItems: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => DropdownOptionDirective), { isSignal: true }] }] } });
157
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'ap-action-dropdown', imports: [BadgeComponent, DropdownContentDirective, DropdownOptionDirective, DropdownPanelComponent, SymbolComponent, TooltipDirective], providers: [withSymbols(apInfo, apFeatureLock)], template: "<ap-dropdown-panel\n [placement]=\"placement()\"\n [showBackdrop]=\"showBackdrop()\"\n (closed)=\"onPanelClosed()\">\n <!-- Action dropdown -->\n <!-- `menu` decides the keyboard: arrows are mandatory, the items are one tab stop, and Tab exits.\n `tabindex=\"-1\"` gives the panel something to focus on opening without adding a stop. -->\n <div\n *apDropdownContent\n class=\"ap-action-dropdown__content\"\n role=\"menu\"\n tabindex=\"-1\"\n [attr.aria-label]=\"'Action dropdown'\"\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 <!-- Roving tabindex: only the active item is tabbable, which is what makes the menu one stop. -->\n <button\n type=\"button\"\n role=\"menuitem\"\n class=\"ap-action-dropdown__item\"\n [apDropdownOption]=\"item.label ?? ''\"\n [apDropdownOptionDisabled]=\"!!item.disabled\"\n [tabindex]=\"activeIndex() === $index ? 0 : -1\"\n [class.ap-action-dropdown__item--has-description]=\"item.description\"\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.data-track]=\"item.dataTrack\"\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</ap-dropdown-panel>\n", styles: [":host{display:none}.ap-action-dropdown__content{padding:var(--comp-action-dropdown-padding);outline:none;z-index:1000;max-height:var(--ap-floating-available-height, none);overflow-y:auto;width:max-content;min-width:min(180px,var(--ap-floating-available-width, 180px));max-width:min(340px,var(--ap-floating-available-width, 340px))}.ap-action-dropdown__content .ap-action-dropdown__item--has-description{min-width:min(250px,var(--ap-floating-available-width, 250px))}.ap-action-dropdown__content .ap-action-dropdown__item-description{contain:inline-size}.ap-action-dropdown__content:focus-visible{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}.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:focus-visible{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-visible{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-visible{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"] }]
158
+ }], ctorParameters: () => [], propDecorators: { panel: [{ type: i0.ViewChild, args: [i0.forwardRef(() => DropdownPanelComponent), { isSignal: true }] }], trigger: [{ type: i0.ContentChild, args: ['trigger', { isSignal: true }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], showBackdrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "showBackdrop", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], opened: [{ type: i0.Output, args: ["opened"] }], closed: [{ type: i0.Output, args: ["closed"] }], itemClick: [{ type: i0.Output, args: ["itemClick"] }], menuItems: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => DropdownOptionDirective), { isSignal: true }] }] } });
164
159
 
165
160
  /**
166
161
  * Generated bundle index. Do not edit.
@@ -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 this.apActionDropdownTrigger()?.toggle(this.elementRef.nativeElement);\n }\n\n /** Handles keyboard events for accessibility (Enter, Space, Arrow Down, Escape) */\n @HostListener('keydown', ['$event'])\n onKeyDown(event: KeyboardEvent): void {\n const dropdown = this.apActionDropdownTrigger();\n if (!dropdown) return;\n\n switch (event.key) {\n case 'Enter':\n case ' ':\n case 'ArrowDown':\n event.preventDefault();\n dropdown.open(this.elementRef.nativeElement);\n break;\n\n case 'Escape':\n event.preventDefault();\n dropdown.close();\n break;\n }\n }\n}\n","import { BadgeColor, BadgeComponent } from '@agorapulse/ui-components/badge';\nimport { FocusKeyManager } from '@angular/cdk/a11y';\nimport { DropdownOptionDirective, DropdownOverlay } from '@agorapulse/ui-components/dropdown-base';\nimport { DropdownContentDirective, DropdownPanelComponent } from '@agorapulse/ui-components/dropdown-panel';\nimport { FloatingPlacement } from '@agorapulse/ui-components/floating';\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';\n\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n effect,\n inject,\n Injector,\n input,\n output,\n signal,\n TemplateRef,\n untracked,\n viewChild,\n viewChildren,\n} from '@angular/core';\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 /** Optional data-track attribute for analytics tracking */\n dataTrack?: 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, DropdownContentDirective, DropdownOptionDirective, DropdownPanelComponent, SymbolComponent, TooltipDirective],\n providers: [withSymbols(apInfo, apFeatureLock)],\n})\nexport class ActionDropdownComponent implements DropdownOverlay {\n private readonly symbolRegistry = inject(SymbolRegistry);\n private readonly panel = viewChild(DropdownPanelComponent);\n\n trigger = contentChild<TemplateRef<unknown>>('trigger');\n\n /** Array of items to display in the dropdown menu */\n items = input<ActionDropdownItem[]>([]);\n /** Whether to enable large mode styling for the dropdown */\n largeModeEnabled = input(false);\n /** Custom width for the dropdown menu in pixels */\n customWidth = input<number | null>(null);\n\n /** Whether to show a backdrop that closes the dropdown when clicked */\n showBackdrop = input(true);\n /** Whether the dropdown is disabled and cannot be opened */\n disabled = input(false);\n /** Panel placement. Unset means derived from the anchor mode, i.e. `bottom-start`. */\n readonly placement = input<FloatingPlacement>();\n\n /** Emits when the dropdown menu is opened */\n opened = output<void>();\n /** Emits when the dropdown menu is closed */\n closed = output<void>();\n /** Emits when a dropdown item is clicked */\n itemClick = output<ActionDropdownItem>();\n\n private readonly menuItems = viewChildren(DropdownOptionDirective);\n\n /** Mirrors the key manager's active index, so the roving tabindex can be bound. */\n protected readonly activeIndex = signal(-1);\n\n private readonly keyManager = new FocusKeyManager(this.menuItems, inject(Injector)).withWrap().withTypeAhead().withHomeAndEnd();\n\n private primed = false;\n\n readonly isOpen = computed(() => this.panel()?.isOpen() ?? false);\n\n constructor() {\n this.symbolRegistry.withSymbols(...(inject(UI_COMPONENTS_SYMBOLS, { optional: true })?.flat() ?? []));\n\n this.keyManager.change.subscribe(index => this.activeIndex.set(index));\n // APG: Tab leaves a menu and closes it, rather than walking its items.\n this.keyManager.tabOut.subscribe(() => this.close());\n\n // The items only exist once the panel has stamped its template.\n effect(() => {\n const open = this.isOpen();\n const items = this.menuItems();\n untracked(() => {\n if (open && items.length > 0 && !this.primed) {\n this.primed = true;\n this.keyManager.setFirstItemActive();\n }\n });\n });\n }\n\n /** Opens the dropdown menu at the specified trigger element */\n open(triggerElement?: HTMLElement): void {\n const panel = this.panel();\n if (this.disabled() || this.isOpen() || !panel) return;\n\n panel.open(triggerElement);\n this.opened.emit();\n }\n\n close(): void {\n this.panel()?.close();\n }\n\n protected onPanelClosed(): void {\n this.primed = false;\n this.activeIndex.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 /** Enter and Space need nothing: focus is real, so the button fires its own click. Escape belongs to the panel. */\n onKeyDown(event: KeyboardEvent): void {\n this.keyManager.onKeydown(event);\n }\n}\n","<ap-dropdown-panel\n [placement]=\"placement()\"\n [showBackdrop]=\"showBackdrop()\"\n (closed)=\"onPanelClosed()\">\n <!-- Action dropdown -->\n <!-- `menu` decides the keyboard: arrows are mandatory, the items are one tab stop, and Tab exits.\n `tabindex=\"-1\"` gives the panel something to focus on opening without adding a stop. -->\n <div\n *apDropdownContent\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 <!-- Roving tabindex: only the active item is tabbable, which is what makes the menu one stop. -->\n <button\n type=\"button\"\n role=\"menuitem\"\n class=\"ap-action-dropdown__item\"\n [apDropdownOption]=\"item.label ?? ''\"\n [apDropdownOptionDisabled]=\"!!item.disabled\"\n [tabindex]=\"activeIndex() === $index ? 0 : -1\"\n [class.ap-action-dropdown__item--has-description]=\"item.description\"\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.data-track]=\"item.dataTrack\"\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</ap-dropdown-panel>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;AAGA;;;AAGG;MAIU,8BAA8B,CAAA;AACtB,IAAA,UAAU,GAAG,MAAM,EAAC,UAAuB,EAAC;;AAG7D,IAAA,uBAAuB,GAAG,KAAK;2GAA2B;;AAI1D,IAAA,OAAO,CAAC,KAAiB,EAAA;QACrB,KAAK,CAAC,cAAc,EAAE;QACtB,KAAK,CAAC,eAAe,EAAE;AAEvB,QAAA,IAAI,CAAC,uB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,MAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,QAAA,CAAA,EAAA,CAAA,EAAA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,WAAA,CAAA,EAAA,CAAA,EAAA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MAuBZ,uBAAuB,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEtGrE;;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 this.apActionDropdownTrigger()?.toggle(this.elementRef.nativeElement);\n }\n\n /** Handles keyboard events for accessibility (Enter, Space, Arrow Down, Escape) */\n @HostListener('keydown', ['$event'])\n onKeyDown(event: KeyboardEvent): void {\n const dropdown = this.apActionDropdownTrigger();\n if (!dropdown) return;\n\n switch (event.key) {\n case 'Enter':\n case ' ':\n case 'ArrowDown':\n event.preventDefault();\n dropdown.open(this.elementRef.nativeElement);\n break;\n\n case 'Escape':\n event.preventDefault();\n dropdown.close();\n break;\n }\n }\n}\n","import { BadgeColor, BadgeComponent } from '@agorapulse/ui-components/badge';\nimport { FocusKeyManager } from '@angular/cdk/a11y';\nimport { DropdownOptionDirective, DropdownOverlay } from '@agorapulse/ui-components/dropdown-base';\nimport { DropdownContentDirective, DropdownPanelComponent } from '@agorapulse/ui-components/dropdown-panel';\nimport { FloatingPlacement } from '@agorapulse/ui-components/floating';\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';\n\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n effect,\n inject,\n Injector,\n input,\n output,\n signal,\n TemplateRef,\n untracked,\n viewChild,\n viewChildren,\n} from '@angular/core';\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 /** Optional data-track attribute for analytics tracking */\n dataTrack?: 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. Its width follows its longest label between 180 and\n * 340 px; past 340 px, labels ellipsize.\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, DropdownContentDirective, DropdownOptionDirective, DropdownPanelComponent, SymbolComponent, TooltipDirective],\n providers: [withSymbols(apInfo, apFeatureLock)],\n})\nexport class ActionDropdownComponent implements DropdownOverlay {\n private readonly symbolRegistry = inject(SymbolRegistry);\n private readonly panel = viewChild(DropdownPanelComponent);\n\n trigger = contentChild<TemplateRef<unknown>>('trigger');\n\n /** Array of items to display in the dropdown menu */\n items = input<ActionDropdownItem[]>([]);\n\n /** Whether to show a backdrop that closes the dropdown when clicked */\n showBackdrop = input(true);\n /** Whether the dropdown is disabled and cannot be opened */\n disabled = input(false);\n /** Panel placement. Unset means derived from the anchor mode, i.e. `bottom-start`. */\n readonly placement = input<FloatingPlacement>();\n\n /** Emits when the dropdown menu is opened */\n opened = output<void>();\n /** Emits when the dropdown menu is closed */\n closed = output<void>();\n /** Emits when a dropdown item is clicked */\n itemClick = output<ActionDropdownItem>();\n\n private readonly menuItems = viewChildren(DropdownOptionDirective);\n\n /** Mirrors the key manager's active index, so the roving tabindex can be bound. */\n protected readonly activeIndex = signal(-1);\n\n private readonly keyManager = new FocusKeyManager(this.menuItems, inject(Injector)).withWrap().withTypeAhead().withHomeAndEnd();\n\n private primed = false;\n\n readonly isOpen = computed(() => this.panel()?.isOpen() ?? false);\n\n constructor() {\n this.symbolRegistry.withSymbols(...(inject(UI_COMPONENTS_SYMBOLS, { optional: true })?.flat() ?? []));\n\n this.keyManager.change.subscribe(index => this.activeIndex.set(index));\n // APG: Tab leaves a menu and closes it, rather than walking its items.\n this.keyManager.tabOut.subscribe(() => this.close());\n\n // The items only exist once the panel has stamped its template.\n effect(() => {\n const open = this.isOpen();\n const items = this.menuItems();\n untracked(() => {\n if (open && items.length > 0 && !this.primed) {\n this.primed = true;\n this.keyManager.setFirstItemActive();\n }\n });\n });\n }\n\n /** Opens the dropdown menu at the specified trigger element */\n open(triggerElement?: HTMLElement): void {\n const panel = this.panel();\n if (this.disabled() || this.isOpen() || !panel) return;\n\n panel.open(triggerElement);\n this.opened.emit();\n }\n\n close(): void {\n this.panel()?.close();\n }\n\n protected onPanelClosed(): void {\n this.primed = false;\n this.activeIndex.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 /** Enter and Space need nothing: focus is real, so the button fires its own click. Escape belongs to the panel. */\n onKeyDown(event: KeyboardEvent): void {\n this.keyManager.onKeydown(event);\n }\n}\n","<ap-dropdown-panel\n [placement]=\"placement()\"\n [showBackdrop]=\"showBackdrop()\"\n (closed)=\"onPanelClosed()\">\n <!-- Action dropdown -->\n <!-- `menu` decides the keyboard: arrows are mandatory, the items are one tab stop, and Tab exits.\n `tabindex=\"-1\"` gives the panel something to focus on opening without adding a stop. -->\n <div\n *apDropdownContent\n class=\"ap-action-dropdown__content\"\n role=\"menu\"\n tabindex=\"-1\"\n [attr.aria-label]=\"'Action dropdown'\"\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 <!-- Roving tabindex: only the active item is tabbable, which is what makes the menu one stop. -->\n <button\n type=\"button\"\n role=\"menuitem\"\n class=\"ap-action-dropdown__item\"\n [apDropdownOption]=\"item.label ?? ''\"\n [apDropdownOptionDisabled]=\"!!item.disabled\"\n [tabindex]=\"activeIndex() === $index ? 0 : -1\"\n [class.ap-action-dropdown__item--has-description]=\"item.description\"\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.data-track]=\"item.dataTrack\"\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</ap-dropdown-panel>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;AAGA;;;AAGG;MAIU,8BAA8B,CAAA;AACtB,IAAA,UAAU,GAAG,MAAM,EAAC,UAAuB,EAAC;;AAG7D,IAAA,uBAAuB,GAAG,KAAK;2GAA2B;;AAI1D,IAAA,OAAO,CAAC,KAAiB,EAAA;QACrB,KAAK,CAAC,cAAc,EAAE;QACtB,KAAK,CAAC,eAAe,EAAE;AAEvB,QAAA,IAAI,CAAC,uBAAuB,EAAE,EAAE,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC;IACzE;;AAIA,IAAA,SAAS,CAAC,KAAoB,EAAA;AAC1B,QAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,uBAAuB,EAAE;AAC/C,QAAA,IAAI,CAAC,QAAQ;YAAE;AAEf,QAAA,QAAQ,KAAK,CAAC,GAAG;AACb,YAAA,KAAK,OAAO;AACZ,YAAA,KAAK,GAAG;AACR,YAAA,KAAK,WAAW;gBACZ,KAAK,CAAC,cAAc,EAAE;gBACtB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC;gBAC5C;AAEJ,YAAA,KAAK,QAAQ;gBACT,KAAK,CAAC,cAAc,EAAE;gBACtB,QAAQ,CAAC,KAAK,EAAE;gBAChB;;IAEZ;uGAlCS,8BAA8B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAA9B,8BAA8B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,2BAAA,EAAA,MAAA,EAAA,EAAA,uBAAA,EAAA,EAAA,iBAAA,EAAA,yBAAA,EAAA,UAAA,EAAA,yBAAA,EAAA,QAAA,EAAA,IA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AmBZ,uBAAuB,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEnGrE;;AAEG;;;;"}
@@ -1,54 +1,41 @@
1
1
  import { AvatarComponent } from '@agorapulse/ui-components/avatar';
2
+ import { OverflowBaseComponent, OverflowBaseItemDirective, OverflowBaseMoreDirective } from '@agorapulse/ui-components/overflow-base';
2
3
  import { CustomTooltipType, TooltipDirective } from '@agorapulse/ui-components/tooltip';
3
4
  import * as i0 from '@angular/core';
4
- import { input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
5
+ import { input, ChangeDetectionStrategy, Component } from '@angular/core';
5
6
 
7
+ /** How far each avatar overlaps its neighbour, in pixels. */
8
+ const AVATAR_OVERLAP = 2;
9
+ /**
10
+ * A stack of avatars, then a counter whose `LIST` tooltip names the hidden ones.
11
+ *
12
+ * It shows `maxAvatars` at most, and fewer when its width runs short. It takes the width its container
13
+ * gives it: in a flex parent, `flex: 1; min-width: 0` lets it collapse on the width; without them it
14
+ * keeps the width of its avatars and only `maxAvatars` caps them.
15
+ */
6
16
  class AvatarGroupComponent {
7
- avatars = input.required({ ...(ngDevMode ? { debugName: "avatars" } : /* istanbul ignore next */ {}), transform: (value) => [...value].reverse() });
17
+ avatars = input.required(/* @ts-ignore */
18
+ ...(ngDevMode ? [{ debugName: "avatars" }] : /* istanbul ignore next */ []));
8
19
  size = input(24, /* @ts-ignore */
9
20
  ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
21
+ /** Most avatars shown; a narrower container shows fewer, the others go into the counter. */
10
22
  maxAvatars = input(5, /* @ts-ignore */
11
23
  ...(ngDevMode ? [{ debugName: "maxAvatars" }] : /* istanbul ignore next */ []));
12
24
  showAvatarDescriptionTooltip = input(true, /* @ts-ignore */
13
25
  ...(ngDevMode ? [{ debugName: "showAvatarDescriptionTooltip" }] : /* istanbul ignore next */ []));
14
- visibleAvatars = computed(() => {
15
- const max = this.maxAvatars();
16
- const all = this.avatars();
17
- return all.slice(0, max);
18
- }, /* @ts-ignore */
19
- ...(ngDevMode ? [{ debugName: "visibleAvatars" }] : /* istanbul ignore next */ []));
20
- // avatars not displayed in the group but shown in the tooltip
21
- tooltipAvatars = computed(() => {
22
- const max = this.maxAvatars();
23
- const all = this.avatars();
24
- return all.slice(max);
25
- }, /* @ts-ignore */
26
- ...(ngDevMode ? [{ debugName: "tooltipAvatars" }] : /* istanbul ignore next */ []));
27
- overflowCount = computed(() => {
28
- const total = this.avatars().length;
29
- const max = this.maxAvatars();
30
- if (total <= max) {
31
- return 0;
32
- }
33
- const result = total - max;
34
- if (result > 99) {
35
- return 99;
36
- }
37
- return result;
38
- }, /* @ts-ignore */
39
- ...(ngDevMode ? [{ debugName: "overflowCount" }] : /* istanbul ignore next */ []));
40
- hasOverflow = computed(() => this.overflowCount() > 0, /* @ts-ignore */
41
- ...(ngDevMode ? [{ debugName: "hasOverflow" }] : /* istanbul ignore next */ []));
26
+ overlapGap = -AVATAR_OVERLAP;
42
27
  CustomTooltipType = CustomTooltipType;
28
+ avatarText = (avatar) => avatar.username ?? avatar.alt ?? '';
29
+ asListItem = (avatar) => avatar;
43
30
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: AvatarGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
44
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", 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", "apTooltipArrow", "apTooltipType", "apTooltipPresentationContext", "apTooltipListItems", "apTooltipShowAvatarCaption"], exportAs: ["apTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
31
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.5", 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: "<ap-overflow-base\n trigger=\"click\"\n [items]=\"avatars()\"\n [max]=\"maxAvatars()\"\n [gap]=\"overlapGap\"\n [itemText]=\"avatarText\"\n [tooltipListItem]=\"asListItem\">\n <ng-template\n let-avatar\n let-index=\"index\"\n let-count=\"count\"\n [apOverflowBaseItem]=\"avatars()\">\n <ap-avatar\n apTooltip\n [apTooltipDisabled]=\"!showAvatarDescriptionTooltip()\"\n [apTooltipType]=\"CustomTooltipType.LIST\"\n [apTooltipListItems]=\"[avatar]\"\n [style.z-index]=\"count - index\"\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 </ng-template>\n <ng-template\n let-count\n apOverflowBaseMore>\n <div\n class=\"overflow-counter\"\n [attr.data-size]=\"size()\">\n <span class=\"overflow-text\">+{{ count > 99 ? 99 : count }}</span>\n </div>\n </ng-template>\n</ap-overflow-base>\n", styles: [":host{display:flex}ap-overflow-base{flex:1;min-width:0;padding-inline-start:2px}ap-avatar{position:relative;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);cursor:pointer}.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: "component", type: OverflowBaseComponent, selector: "ap-overflow-base", inputs: ["items", "mode", "trigger", "max", "gap", "itemText", "tooltipListItem", "trackBy"] }, { kind: "directive", type: OverflowBaseItemDirective, selector: "ng-template[apOverflowBaseItem]", inputs: ["apOverflowBaseItem"] }, { kind: "directive", type: OverflowBaseMoreDirective, selector: "ng-template[apOverflowBaseMore]" }, { kind: "directive", type: TooltipDirective, selector: "[apTooltip]", inputs: ["apTooltip", "apTooltipPosition", "apTooltipShowDelay", "apTooltipHideDelay", "apTooltipDuration", "apTooltipDisabled", "apTooltipTruncatedTextOnly", "apTooltipTemplateContext", "apTooltipVirtualScrollElement", "apTooltipTrigger", "apTooltipArrow", "apTooltipType", "apTooltipPresentationContext", "apTooltipListItems", "apTooltipShowAvatarCaption"], exportAs: ["apTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
45
32
  }
46
33
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: AvatarGroupComponent, decorators: [{
47
34
  type: Component,
48
- args: [{ selector: 'ap-avatar-group', changeDetection: ChangeDetectionStrategy.OnPush, imports: [AvatarComponent, TooltipDirective], host: {
35
+ args: [{ selector: 'ap-avatar-group', changeDetection: ChangeDetectionStrategy.OnPush, imports: [AvatarComponent, OverflowBaseComponent, OverflowBaseItemDirective, OverflowBaseMoreDirective, TooltipDirective], host: {
49
36
  role: 'group',
50
37
  '[attr.aria-label]': '"Avatar group"',
51
- }, 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"] }]
38
+ }, template: "<ap-overflow-base\n trigger=\"click\"\n [items]=\"avatars()\"\n [max]=\"maxAvatars()\"\n [gap]=\"overlapGap\"\n [itemText]=\"avatarText\"\n [tooltipListItem]=\"asListItem\">\n <ng-template\n let-avatar\n let-index=\"index\"\n let-count=\"count\"\n [apOverflowBaseItem]=\"avatars()\">\n <ap-avatar\n apTooltip\n [apTooltipDisabled]=\"!showAvatarDescriptionTooltip()\"\n [apTooltipType]=\"CustomTooltipType.LIST\"\n [apTooltipListItems]=\"[avatar]\"\n [style.z-index]=\"count - index\"\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 </ng-template>\n <ng-template\n let-count\n apOverflowBaseMore>\n <div\n class=\"overflow-counter\"\n [attr.data-size]=\"size()\">\n <span class=\"overflow-text\">+{{ count > 99 ? 99 : count }}</span>\n </div>\n </ng-template>\n</ap-overflow-base>\n", styles: [":host{display:flex}ap-overflow-base{flex:1;min-width:0;padding-inline-start:2px}ap-avatar{position:relative;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);cursor:pointer}.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"] }]
52
39
  }], propDecorators: { avatars: [{ type: i0.Input, args: [{ isSignal: true, alias: "avatars", required: true }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], maxAvatars: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxAvatars", required: false }] }], showAvatarDescriptionTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "showAvatarDescriptionTooltip", required: false }] }] } });
53
40
 
54
41
  /**
@@ -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 } 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;IAC7B,OAAO,GAAG,KAAK,CAAC,QAAQ,8EACpB,SAAS,EAAE,CAAC,KAAgC,KAAK,CAAC,GAAG,KAAK,CAAC,CAAC,OAAO,EAAE,GACvE;IACF,IAAI,GAAG,KAAK,CAAkB,EAAE;6EAAC;IACjC,UAAU,GAAG,KAAK,CAAS,CAAC;mFAAC;IAC7B,4BAA4B,GAAG,KAAK,CAAC,IAAI;qGAAC;AAE1C,IAAA,cAAc,GAAG,QAAQ,CAAC,MAAK;AAC3B,QAAA,MAAM,GAAG,GAAG,IAAI,CAAC,UAAU,EAAE;AAC7B,QAAA,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,EAAE;QAC1B,OAAO,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC;IAC5B,CAAC;uFAAC;;AAGF,IAAA,cAAc,GAAG,QAAQ,CAAC,MAAK;AAC3B,QAAA,MAAM,GAAG,GAAG,IAAI,CAAC,UAAU,EAAE;AAC7B,QAAA,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,EAAE;AAC1B,QAAA,OAAO,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC;IACzB,CAAC;uFAA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/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 { OverflowBaseComponent, OverflowBaseItemDirective, OverflowBaseMoreDirective } from '@agorapulse/ui-components/overflow-base';\nimport { CustomTooltipAvatarItem, CustomTooltipType, TooltipDirective } from '@agorapulse/ui-components/tooltip';\nimport { ChangeDetectionStrategy, Component, input } from '@angular/core';\n\nexport type AvatarGroupSize = 16 | 24 | 32;\n\n/** How far each avatar overlaps its neighbour, in pixels. */\nconst AVATAR_OVERLAP = 2;\n\n/**\n * A stack of avatars, then a counter whose `LIST` tooltip names the hidden ones.\n *\n * It shows `maxAvatars` at most, and fewer when its width runs short. It takes the width its container\n * gives it: in a flex parent, `flex: 1; min-width: 0` lets it collapse on the width; without them it\n * keeps the width of its avatars and only `maxAvatars` caps them.\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, OverflowBaseComponent, OverflowBaseItemDirective, OverflowBaseMoreDirective, TooltipDirective],\n host: {\n role: 'group',\n '[attr.aria-label]': '\"Avatar group\"',\n },\n})\nexport class AvatarGroupComponent {\n avatars = input.required<CustomTooltipAvatarItem[]>();\n size = input<AvatarGroupSize>(24);\n /** Most avatars shown; a narrower container shows fewer, the others go into the counter. */\n maxAvatars = input<number>(5);\n showAvatarDescriptionTooltip = input(true);\n\n protected readonly overlapGap = -AVATAR_OVERLAP;\n protected readonly CustomTooltipType = CustomTooltipType;\n protected readonly avatarText = (avatar: CustomTooltipAvatarItem): string => avatar.username ?? avatar.alt ?? '';\n protected readonly asListItem = (avatar: CustomTooltipAvatarItem): CustomTooltipAvatarItem => avatar;\n}\n","<ap-overflow-base\n trigger=\"click\"\n [items]=\"avatars()\"\n [max]=\"maxAvatars()\"\n [gap]=\"overlapGap\"\n [itemText]=\"avatarText\"\n [tooltipListItem]=\"asListItem\">\n <ng-template\n let-avatar\n let-index=\"index\"\n let-count=\"count\"\n [apOverflowBaseItem]=\"avatars()\">\n <ap-avatar\n apTooltip\n [apTooltipDisabled]=\"!showAvatarDescriptionTooltip()\"\n [apTooltipType]=\"CustomTooltipType.LIST\"\n [apTooltipListItems]=\"[avatar]\"\n [style.z-index]=\"count - index\"\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 </ng-template>\n <ng-template\n let-count\n apOverflowBaseMore>\n <div\n class=\"overflow-counter\"\n [attr.data-size]=\"size()\">\n <span class=\"overflow-text\">+{{ count > 99 ? 99 : count }}</span>\n </div>\n </ng-template>\n</ap-overflow-base>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;AAOA;AACA,MAAM,cAAc,GAAG,CAAC;AAExB;;;;;;AAMG;MAYU,oBAAoB,CAAA;IAC7B,OAAO,GAAG,KAAK,CAAC,QAAQ;gFAA6B;IACrD,IAAI,GAAG,KAAK,CAAkB,EAAE;6EAAC;;IAEjC,UAAU,GAAG,KAAK,CAAS,CAAC;mFAAC;IAC7B,4BAA4B,GAAG,KAAK,CAAC,IAAI;qGAAC;IAEvB,UAAU,GAAG,CAAC,cAAc;IAC5B,iBAAiB,GAAG,iBAAiB;AACrC,IAAA,UAAU,GAAG,CAAC,MAA+B,KAAa,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,GAAG,IAAI,EAAE;AAC7F,IAAA,UAAU,GAAG,CAAC,MAA+B,KAA8B,MAAM;uGA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AA,y8BAAA,CAAA,EAAA;;;AE1BL;;AAEG;;;;"}
@@ -963,7 +963,7 @@ class DatepickerSelectComponent {
963
963
  // NgxDaterangepickerMd module provides none — only its forRoot() does.
964
964
  { provide: LOCALE_CONFIG, useValue: {} },
965
965
  LocaleService,
966
- ], viewQueries: [{ propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true, isSignal: true }], ngImport: i0, template: "<!--\n The trigger is the group itself, not the row inside it: `[apDropdownTrigger]` only listens on its\n own host, and that row is content-height and sits inside the group's padding \u2014 so a click on the\n band above, below or beside it fell on nothing. The group is also what the panel should line up\n with, and `toggle()` anchors the overlay to the trigger.\n\n Nothing here is a bare `ap-input-group` child, so its `ap-symbol` ng-content slot is unused and\n the whole row lands in the default slot, in source order (icon, value, clear, chevron).\n-->\n<ap-input-group\n [apDropdownTrigger]=\"dropdown\"\n [class.invalid]=\"invalid() && touched()\"\n [disabled]=\"disabled()\">\n <div class=\"ap-datepicker-select__field\">\n <ap-symbol\n size=\"sm\"\n symbolId=\"calendar\" />\n\n <!--\n The combobox is this box and not the field around it: ng-select does the same, carrying the\n role on its inner input so the clear and the arrow stay its siblings rather than its\n descendants. The field keeps [apDropdownTrigger] \u2014 it is the click surface and the overlay's\n anchor \u2014 and the directive listens on its host, so keys pressed here still reach it by\n bubbling. Being the growing box (flex: 1) also makes it the one that measures the chip row.\n -->\n <div\n #overflow=\"apOverflowCount\"\n class=\"ap-datepicker-select__values\"\n role=\"combobox\"\n aria-haspopup=\"dialog\"\n apOverflowCount\n [attr.aria-label]=\"ariaLabel()\"\n [attr.tabindex]=\"disabled() ? -1 : 0\"\n [attr.aria-controls]=\"dropdown.panelId\"\n [attr.aria-disabled]=\"disabled()\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-invalid]=\"invalid() && touched()\"\n (blur)=\"touch.emit()\">\n @if (mode() === DatepickerMode.Multiple && chips().length > 0) {\n @for (chip of chips(); track chip.date.valueOf()) {\n <ap-tag\n apOverflowItem\n color=\"grey\"\n [mini]=\"true\"\n [clearable]=\"!disabled()\"\n (clear)=\"removeDate(chip)\">\n {{ chip.label }}\n </ap-tag>\n }\n @if (overflow.hiddenCount() > 0) {\n <ap-tag\n apOverflowCounter\n color=\"grey\"\n [mini]=\"true\">\n +{{ overflow.hiddenCount() }}\n </ap-tag>\n }\n } @else if (displayed()) {\n <span class=\"ap-datepicker-select__value\">{{ displayed() }}</span>\n } @else {\n <span class=\"ap-datepicker-select__placeholder\">{{ placeholder() }}</span>\n }\n </div>\n\n <!--\n Before the chevron, as ng-select orders its own container: value, clear, arrow. Sitting\n inside the trigger, a click here would bubble up and open the panel \u2014 hence the\n stopPropagation() in clear().\n -->\n @if (clearable() && hasValue() && !disabled()) {\n <ap-icon-button\n class=\"ap-datepicker-select__clear\"\n type=\"flat\"\n name=\"datepicker-clear\"\n symbolId=\"close\"\n ariaLabel=\"Clear selection\"\n (click)=\"clear($event)\" />\n }\n\n <span class=\"ap-datepicker-select__chevron\">\n <ap-symbol\n size=\"sm\"\n [symbolId]=\"isOpen() ? 'chevron-up' : 'chevron-down'\" />\n </span>\n </div>\n</ap-input-group>\n\n@if (timeZone(); as zone) {\n <div\n class=\"ap-datepicker-select__timezone\"\n apTooltipPosition=\"bottom\"\n [apTooltip]=\"zone\">\n <ap-symbol\n size=\"sm\"\n symbolId=\"clock\"\n color=\"grey\" />\n <span class=\"ap-datepicker-select__timezone-offset\">{{ timeZoneOffset() }}</span>\n </div>\n @if (timeZoneTooltip(); as tooltip) {\n <ap-symbol\n class=\"ap-datepicker-select__timezone-info\"\n size=\"sm\"\n symbolId=\"info\"\n color=\"grey-blue\"\n apTooltipPosition=\"bottom\"\n [apTooltip]=\"tooltip\" />\n }\n}\n\n<ap-datepicker-dropdown\n #dropdown\n [closeOnSelect]=\"closesOnSelect()\"\n [dateLimit]=\"maxRangeDays()\"\n [placement]=\"placement()\"\n [disabled]=\"disabled()\"\n [firstDayOfWeek]=\"firstDayOfWeek()\"\n [hint]=\"panelHint()\"\n [locale]=\"locale()\"\n [maxDate]=\"maxDate()\"\n [minDate]=\"minDate()\"\n [mode]=\"mode()\"\n [panelFooter]=\"panelFooter()\"\n [presets]=\"presets()\"\n [selectedDate]=\"selectedDate()\"\n [selectedDates]=\"selectedDates()\"\n [selectedPeriod]=\"selectedPeriod()\"\n (closed)=\"onPanelClosed()\"\n (dateSelected)=\"onDateSelected($event)\"\n (opened)=\"onPanelOpened()\"\n (periodSelected)=\"onPeriodSelected($event)\" />\n", styles: [".ap-datepicker-select{display:flex;width:100%;align-items:center;gap:var(--ref-spacing-sm)}.ap-datepicker-select ap-input-group{flex:1;min-width:0}.ap-datepicker-select .ap-input-group.disabled ap-symbol{color:inherit}.ap-datepicker-select .ap-input-group:where(:not(.disabled):focus-within:not(:has(:focus-visible))){border-color:var(--ap-input-group-rest-border-color)}.ap-datepicker-select .ap-input-group:where(:not(.disabled):focus-within:not(:has(:focus-visible))):where(:hover){border-color:var(--comp-input-border-hover-color)}.ap-datepicker-select--open .ap-input-group{border-color:var(--ref-color-electric-blue-100)}.ap-datepicker-select--open .ap-datepicker-select__chevron ap-symbol{color:var(--ref-color-electric-blue-100)}.ap-datepicker-select__field{display:flex;align-self:stretch;flex:1;min-width:0;align-items:center;gap:var(--ref-spacing-xxs);cursor:pointer;font-family:var(--sys-text-style-body-font-family);font-size:var(--sys-text-style-body-size)}.ap-datepicker-select__field:focus-visible{outline:none}.ap-datepicker-select__values{display:flex;overflow:hidden;flex:1;min-width:0;align-items:center;gap:var(--ref-spacing-xxs)}.ap-datepicker-select__values>*{flex-shrink:0}.ap-datepicker-select__value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ap-datepicker-select__placeholder{color:var(--sys-text-color-light)}.ap-datepicker-select__chevron{display:inline-flex;align-items:center}.ap-datepicker-select__clear{--comp-icon-button-width: var(--sys-icon-css-md);--comp-icon-button-height: var(--sys-icon-css-md);--comp-icon-button-padding: 0}.ap-datepicker-select__clear .icon-button:hover:not(.stroked):not(.locked),.ap-datepicker-select__clear .icon-button:active:not(.stroked):not(.locked){background:transparent}.ap-datepicker-select__clear .icon-button ap-symbol{width:var(--sys-icon-css-xs);min-width:var(--sys-icon-css-xs);height:var(--sys-icon-css-xs);min-height:var(--sys-icon-css-xs)}.ap-datepicker-select__clear:hover .icon-button ap-symbol{color:var(--sys-color-error-text)}.ap-datepicker-select__timezone{display:inline-flex;align-items:center;gap:var(--ref-spacing-xxs)}.ap-datepicker-select__timezone-info{display:inline-flex;align-items:center}.ap-datepicker-select--multiple .ap-datepicker-select__values{gap:var(--ref-spacing-xxxs)}\n"], dependencies: [{ kind: "component", type: DatepickerDropdownComponent, selector: "ap-datepicker-dropdown", inputs: ["mode", "selectedDate", "selectedDates", "selectedPeriod", "minDate", "maxDate", "dateLimit", "hint", "panelFooter", "firstDayOfWeek", "locale", "presets", "showBackdrop", "closeOnSelect", "disabled", "placement"], outputs: ["opened", "closed", "dateSelected", "periodSelected"] }, { kind: "directive", type: DropdownTriggerDirective, selector: "[apDropdownTrigger]", inputs: ["apDropdownTrigger"] }, { kind: "component", type: IconButtonComponent, selector: "ap-icon-button", inputs: ["ariaLabel", "name", "color", "disabled", "menuTrigger", "symbolId", "locked", "loading", "type"], outputs: ["onClick", "onFocus", "onBlur", "menuOpened", "menuClosed"] }, { kind: "component", type: InputGroupComponent, selector: "ap-input-group", inputs: ["symbolPosition", "disabled"] }, { kind: "directive", type: OverflowCountDirective, selector: "[apOverflowCount]", inputs: ["gap", "counterFallbackWidth", "minVisible"], exportAs: ["apOverflowCount"] }, { kind: "directive", type: OverflowCounterDirective, selector: "[apOverflowCounter]" }, { kind: "directive", type: OverflowItemDirective, selector: "[apOverflowItem]" }, { kind: "component", type: TagComponent, selector: "ap-tag", inputs: ["clearable", "add", "color", "mini"], outputs: ["clear", "added"] }, { 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", "apTooltipArrow", "apTooltipType", "apTooltipPresentationContext", "apTooltipListItems", "apTooltipShowAvatarCaption"], exportAs: ["apTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
966
+ ], viewQueries: [{ propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true, isSignal: true }], ngImport: i0, template: "<!--\n The trigger is the group itself, not the row inside it: `[apDropdownTrigger]` only listens on its\n own host, and that row is content-height and sits inside the group's padding \u2014 so a click on the\n band above, below or beside it fell on nothing. The group is also what the panel should line up\n with, and `toggle()` anchors the overlay to the trigger.\n\n Nothing here is a bare `ap-input-group` child, so its `ap-symbol` ng-content slot is unused and\n the whole row lands in the default slot, in source order (icon, value, clear, chevron).\n-->\n<ap-input-group\n [apDropdownTrigger]=\"dropdown\"\n [class.invalid]=\"invalid() && touched()\"\n [disabled]=\"disabled()\">\n <div class=\"ap-datepicker-select__field\">\n <ap-symbol\n size=\"sm\"\n symbolId=\"calendar\" />\n\n <!--\n The combobox is this box and not the field around it: ng-select does the same, carrying the\n role on its inner input so the clear and the arrow stay its siblings rather than its\n descendants. The field keeps [apDropdownTrigger] \u2014 it is the click surface and the overlay's\n anchor \u2014 and the directive listens on its host, so keys pressed here still reach it by\n bubbling. Being the growing box (flex: 1) also makes it the one that measures the chip row.\n -->\n <div\n #overflow=\"apOverflowCount\"\n class=\"ap-datepicker-select__values\"\n role=\"combobox\"\n aria-haspopup=\"dialog\"\n apOverflowCount\n [attr.aria-label]=\"ariaLabel()\"\n [attr.tabindex]=\"disabled() ? -1 : 0\"\n [attr.aria-controls]=\"dropdown.panelId\"\n [attr.aria-disabled]=\"disabled()\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-invalid]=\"invalid() && touched()\"\n (blur)=\"touch.emit()\">\n @if (mode() === DatepickerMode.Multiple && chips().length > 0) {\n @for (chip of chips(); track chip.date.valueOf()) {\n <ap-tag\n apOverflowItem\n color=\"grey\"\n [mini]=\"true\"\n [clearable]=\"!disabled()\"\n (clear)=\"removeDate(chip)\">\n {{ chip.label }}\n </ap-tag>\n }\n @if (overflow.hiddenCount() > 0) {\n <ap-tag\n apOverflowCounter\n color=\"grey\"\n [mini]=\"true\">\n +{{ overflow.hiddenCount() }}\n </ap-tag>\n }\n } @else if (displayed()) {\n <span class=\"ap-datepicker-select__value\">{{ displayed() }}</span>\n } @else {\n <span class=\"ap-datepicker-select__placeholder\">{{ placeholder() }}</span>\n }\n </div>\n\n <!--\n Before the chevron, as ng-select orders its own container: value, clear, arrow. Sitting\n inside the trigger, a click here would bubble up and open the panel \u2014 hence the\n stopPropagation() in clear().\n -->\n @if (clearable() && hasValue() && !disabled()) {\n <ap-icon-button\n class=\"ap-datepicker-select__clear\"\n type=\"flat\"\n name=\"datepicker-clear\"\n symbolId=\"close\"\n ariaLabel=\"Clear selection\"\n (click)=\"clear($event)\" />\n }\n\n <span class=\"ap-datepicker-select__chevron\">\n <ap-symbol\n size=\"sm\"\n [symbolId]=\"isOpen() ? 'chevron-up' : 'chevron-down'\" />\n </span>\n </div>\n</ap-input-group>\n\n@if (timeZone(); as zone) {\n <div\n class=\"ap-datepicker-select__timezone\"\n apTooltipPosition=\"bottom\"\n [apTooltip]=\"zone\">\n <ap-symbol\n size=\"sm\"\n symbolId=\"clock\"\n color=\"grey\" />\n <span class=\"ap-datepicker-select__timezone-offset\">{{ timeZoneOffset() }}</span>\n </div>\n @if (timeZoneTooltip(); as tooltip) {\n <ap-symbol\n class=\"ap-datepicker-select__timezone-info\"\n size=\"sm\"\n symbolId=\"info\"\n color=\"grey-blue\"\n apTooltipPosition=\"bottom\"\n [apTooltip]=\"tooltip\" />\n }\n}\n\n<ap-datepicker-dropdown\n #dropdown\n [closeOnSelect]=\"closesOnSelect()\"\n [dateLimit]=\"maxRangeDays()\"\n [placement]=\"placement()\"\n [disabled]=\"disabled()\"\n [firstDayOfWeek]=\"firstDayOfWeek()\"\n [hint]=\"panelHint()\"\n [locale]=\"locale()\"\n [maxDate]=\"maxDate()\"\n [minDate]=\"minDate()\"\n [mode]=\"mode()\"\n [panelFooter]=\"panelFooter()\"\n [presets]=\"presets()\"\n [selectedDate]=\"selectedDate()\"\n [selectedDates]=\"selectedDates()\"\n [selectedPeriod]=\"selectedPeriod()\"\n (closed)=\"onPanelClosed()\"\n (dateSelected)=\"onDateSelected($event)\"\n (opened)=\"onPanelOpened()\"\n (periodSelected)=\"onPeriodSelected($event)\" />\n", styles: [".ap-datepicker-select{display:flex;width:100%;align-items:center;gap:var(--ref-spacing-sm)}.ap-datepicker-select ap-input-group{flex:1;min-width:0}.ap-datepicker-select .ap-input-group.disabled ap-symbol{color:inherit}.ap-datepicker-select .ap-input-group:where(:not(.disabled):focus-within:not(:has(:focus-visible))){border-color:var(--ap-input-group-rest-border-color)}.ap-datepicker-select .ap-input-group:where(:not(.disabled):focus-within:not(:has(:focus-visible))):where(:hover){border-color:var(--comp-input-border-hover-color)}.ap-datepicker-select--open .ap-input-group{border-color:var(--ref-color-electric-blue-100)}.ap-datepicker-select--open .ap-datepicker-select__chevron ap-symbol{color:var(--ref-color-electric-blue-100)}.ap-datepicker-select__field{display:flex;align-self:stretch;flex:1;min-width:0;align-items:center;gap:var(--ref-spacing-xxs);cursor:pointer;font-family:var(--sys-text-style-body-font-family);font-size:var(--sys-text-style-body-size)}.ap-datepicker-select__field:focus-visible{outline:none}.ap-datepicker-select__values{display:flex;overflow:hidden;flex:1;min-width:0;align-items:center;gap:var(--ref-spacing-xxs)}.ap-datepicker-select__values>*{flex-shrink:0}.ap-datepicker-select__value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ap-datepicker-select__placeholder{color:var(--sys-text-color-light)}.ap-datepicker-select__chevron{display:inline-flex;align-items:center}.ap-datepicker-select__clear{--comp-icon-button-width: var(--sys-icon-css-md);--comp-icon-button-height: var(--sys-icon-css-md);--comp-icon-button-padding: 0}.ap-datepicker-select__clear .icon-button:hover:not(.stroked):not(.locked),.ap-datepicker-select__clear .icon-button:active:not(.stroked):not(.locked){background:transparent}.ap-datepicker-select__clear .icon-button ap-symbol{width:var(--sys-icon-css-xs);min-width:var(--sys-icon-css-xs);height:var(--sys-icon-css-xs);min-height:var(--sys-icon-css-xs)}.ap-datepicker-select__clear:hover .icon-button ap-symbol{color:var(--sys-color-error-text)}.ap-datepicker-select__timezone{display:inline-flex;align-items:center;gap:var(--ref-spacing-xxs)}.ap-datepicker-select__timezone-info{display:inline-flex;align-items:center}.ap-datepicker-select--multiple .ap-datepicker-select__values{gap:var(--ref-spacing-xxxs)}\n"], dependencies: [{ kind: "component", type: DatepickerDropdownComponent, selector: "ap-datepicker-dropdown", inputs: ["mode", "selectedDate", "selectedDates", "selectedPeriod", "minDate", "maxDate", "dateLimit", "hint", "panelFooter", "firstDayOfWeek", "locale", "presets", "showBackdrop", "closeOnSelect", "disabled", "placement"], outputs: ["opened", "closed", "dateSelected", "periodSelected"] }, { kind: "directive", type: DropdownTriggerDirective, selector: "[apDropdownTrigger]", inputs: ["apDropdownTrigger"] }, { kind: "component", type: IconButtonComponent, selector: "ap-icon-button", inputs: ["ariaLabel", "name", "color", "disabled", "menuTrigger", "symbolId", "locked", "loading", "type"], outputs: ["onClick", "onFocus", "onBlur", "menuOpened", "menuClosed"] }, { kind: "component", type: InputGroupComponent, selector: "ap-input-group", inputs: ["symbolPosition", "disabled"] }, { kind: "directive", type: OverflowCountDirective, selector: "[apOverflowCount]", inputs: ["gap", "counterFallbackWidth", "minVisible", "max", "collapse"], exportAs: ["apOverflowCount"] }, { kind: "directive", type: OverflowCounterDirective, selector: "[apOverflowCounter]" }, { kind: "directive", type: OverflowItemDirective, selector: "[apOverflowItem]" }, { kind: "component", type: TagComponent, selector: "ap-tag", inputs: ["clearable", "add", "color", "mini"], outputs: ["clear", "added"] }, { 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", "apTooltipArrow", "apTooltipType", "apTooltipPresentationContext", "apTooltipListItems", "apTooltipShowAvatarCaption"], exportAs: ["apTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
967
967
  }
968
968
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: DatepickerSelectComponent, decorators: [{
969
969
  type: Component,