@agorapulse/ui-components 20.2.4-beta.1 → 20.2.8-beta.1

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.
@@ -1,5 +1,5 @@
1
1
  import * as i1 from '@agorapulse/ui-symbol';
2
- import { networkDescription, apSingleNeutral, apMask, toNetworkSymbol, SymbolComponent, NetworkSymbolPipe } from '@agorapulse/ui-symbol';
2
+ import { networkDescription, apUser, apMask, toNetworkSymbol, SymbolComponent, NetworkSymbolPipe } from '@agorapulse/ui-symbol';
3
3
  import * as i2 from '@angular/common';
4
4
  import { NgOptimizedImage, NgClass, NgStyle } from '@angular/common';
5
5
  import * as i0 from '@angular/core';
@@ -76,7 +76,7 @@ class AvatarComponent {
76
76
  this.ngStyle = ngStyle;
77
77
  const networkSymbols = Object.values(networkDescription) //
78
78
  .flatMap(({ symbol }) => (typeof symbol !== 'string' ? [symbol] : []));
79
- symbolRegistry.registerSymbols([...networkSymbols, apSingleNeutral, apMask]);
79
+ symbolRegistry.registerSymbols([...networkSymbols, apUser, apMask]);
80
80
  effect(() => {
81
81
  this.ngStyle.ngStyle = this.buildHostStyle();
82
82
  this.ngStyle.ngDoCheck();
@@ -113,11 +113,11 @@ class AvatarComponent {
113
113
  const initials = this.showInitials();
114
114
  if (initials !== false && initials !== undefined) {
115
115
  const useDefault = initials === true || initials === '';
116
- const candidateName = (useDefault ? this.username()?.charAt(0) ?? '' : initials.slice(0, 2)).toUpperCase();
116
+ const candidateName = (useDefault ? (this.username()?.charAt(0) ?? '') : initials.slice(0, 2)).toUpperCase();
117
117
  bgView = { mode: 'initials', text: candidateName };
118
118
  }
119
119
  else {
120
- bgView = { mode: 'symbol', symbolId: apSingleNeutral.name };
120
+ bgView = { mode: 'symbol', symbolId: apUser.name };
121
121
  }
122
122
  }
123
123
  }
@@ -1 +1 @@
1
- {"version":3,"file":"agorapulse-ui-components-avatar.mjs","sources":["../../../libs/ui-components/avatar/src/avatar.component.ts","../../../libs/ui-components/avatar/src/avatar.component.html","../../../libs/ui-components/avatar/src/agorapulse-ui-components-avatar.ts"],"sourcesContent":["import {\n agorapulseSymbol,\n apMask,\n apSingleNeutral,\n networkDescription,\n NetworkName,\n NetworkSymbolPipe,\n SymbolComponent,\n SymbolRegistry,\n toNetworkSymbol,\n} from '@agorapulse/ui-symbol';\nimport { NgClass, NgOptimizedImage, NgStyle } from '@angular/common';\nimport { booleanAttribute, ChangeDetectionStrategy, Component, computed, effect, input, signal, untracked } from '@angular/core';\n\nexport type AvatarNetwork = NetworkName;\nexport type AvatarSize = 56 | 48 | 40 | 36 | 32 | 24 | 16;\n\nconst onlineIconSizeByAvatarSize: Record<AvatarSize, number> = {\n 56: 16,\n 48: 12,\n 40: 12,\n 36: 8,\n 32: 8,\n 24: 6,\n 16: 6,\n};\n\nconst symbolSizeByAvatarSize: Record<AvatarSize, number> = {\n 56: 28,\n 48: 24,\n 40: 20,\n 36: 18,\n 32: 16,\n 24: 12,\n 16: 8,\n};\n\nconst networkSizeByAvatarSize: Record<AvatarSize, number> = {\n 56: 16,\n 48: 16,\n 40: 16,\n 36: 16,\n 32: 12,\n 24: 12,\n 16: 8,\n};\n\nconst initialSizeByAvatarSize: Record<AvatarSize, number> = {\n 56: 28,\n 48: 24,\n 40: 20,\n 36: 16,\n 32: 16,\n 24: 12,\n 16: 8,\n};\n\nconst automaticBigSymbolNetwork: AvatarNetwork[] = ['youtube'];\n\ntype BackgroundView =\n | { mode: 'image'; image: { src: string; size: number; alt?: string } }\n | { mode: 'initials'; text: string }\n | { mode: 'symbol'; symbolId: agorapulseSymbol; big?: boolean }\n | { mode?: never };\n\ntype OverlayView = { mode: 'online' } | { mode: 'network'; network: NetworkName; round: boolean } | { mode?: never };\n\n@Component({\n selector: 'ap-avatar',\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './avatar.component.html',\n styleUrls: ['./avatar.component.scss'],\n imports: [NgOptimizedImage, SymbolComponent, NgClass, NetworkSymbolPipe],\n hostDirectives: [NgStyle],\n host: {\n '[class.background-default]': '!showBigNetworkBackground()',\n role: 'presentation',\n },\n})\nexport class AvatarComponent {\n profilePicture = input<string>();\n alt = input('');\n network = input(undefined, {\n transform: (v?: AvatarNetwork | string) => (v !== undefined ? (v as AvatarNetwork) : v),\n });\n size = input<AvatarSize | `${AvatarSize}`>(40);\n username = input<string>();\n showInitials = input<boolean | string>();\n bigNetwork = input(false);\n anonymous = input(false);\n online = input(false);\n hideBigNetwork = input(false, { alias: 'youtubeAvatarMode' }); // TODO: rename youtubeAvatarMode to hideBigNetwork in platform\n rounded = input(true, { transform: booleanAttribute });\n\n private imageError = signal(false);\n\n backgroundView = computed<BackgroundView>(() => this.buildBackgroundView());\n overlayView = computed<OverlayView>(() => this.buildOverlayView());\n private useBigNetwork = computed(() => {\n return (this.automaticBigSymbolNetwork() || this.bigNetwork()) && this.network();\n });\n private automaticBigSymbolNetwork = computed(() => {\n return automaticBigSymbolNetwork.includes(this.network() as AvatarNetwork);\n });\n protected showBigNetworkBackground = computed(() => {\n return !this.anonymous() && this.useBigNetwork() && (!this.validProfilePicture() || !this.hideBigNetwork());\n });\n private validProfilePicture = computed(() => {\n return !this.imageError() ? this.profilePicture() : undefined;\n });\n\n constructor(\n symbolRegistry: SymbolRegistry,\n private ngStyle: NgStyle\n ) {\n const networkSymbols = Object.values(networkDescription) //\n .flatMap(({ symbol }) => (typeof symbol !== 'string' ? [symbol] : []));\n\n symbolRegistry.registerSymbols([...networkSymbols, apSingleNeutral, apMask]);\n\n effect(() => {\n this.ngStyle.ngStyle = this.buildHostStyle();\n this.ngStyle.ngDoCheck();\n });\n effect(() => {\n this.profilePicture(); // on change\n untracked(() => this.imageError.set(false));\n });\n }\n\n onImageError(): void {\n this.imageError.set(true);\n }\n\n private buildBackgroundView(): BackgroundView {\n let bgView: BackgroundView;\n\n if (this.showBigNetworkBackground()) {\n bgView = { mode: 'symbol', symbolId: toNetworkSymbol(this.network()!), big: true };\n } else if (this.anonymous()) {\n bgView = { mode: 'symbol', symbolId: apMask.name };\n } else {\n const profilePicture = this.validProfilePicture();\n\n if (profilePicture) {\n bgView = {\n mode: 'image',\n image: {\n src: profilePicture,\n size: +this.size(),\n alt: this.alt(),\n },\n };\n } else {\n const initials = this.showInitials();\n\n if (initials !== false && initials !== undefined) {\n const useDefault = initials === true || initials === '';\n const candidateName = (useDefault ? this.username()?.charAt(0) ?? '' : initials.slice(0, 2)).toUpperCase();\n bgView = { mode: 'initials', text: candidateName };\n } else {\n bgView = { mode: 'symbol', symbolId: apSingleNeutral.name };\n }\n }\n }\n\n return bgView;\n }\n\n private buildOverlayView(): OverlayView {\n let ovlView: OverlayView = {};\n const network = this.network();\n\n if (this.online()) {\n ovlView = { mode: 'online' };\n } else if (network && !this.showBigNetworkBackground() && !this.automaticBigSymbolNetwork()) {\n // unit tests in platform repo gives random network values which are unchecked by the compiler\n const { round } = networkDescription[network] ?? {};\n ovlView = { mode: 'network', network, round };\n }\n\n return ovlView;\n }\n\n private buildHostStyle() {\n const bgView = this.backgroundView();\n const ovlMode = this.overlayView().mode;\n const size = this.size();\n\n return {\n '--ap-avatar-size': `${size}px`,\n '--ap-avatar-border-radius': this.rounded() ? '100%' : 'var(--sys-border-radius-sm)',\n '--ap-avatar-initials-size': bgView.mode == 'initials' ? `${initialSizeByAvatarSize[size]}px` : '',\n '--ap-avatar-symbol-size': bgView.mode == 'symbol' ? `${bgView.big ? size : symbolSizeByAvatarSize[size]}px` : '',\n '--ap-avatar-network-size': ovlMode == 'network' ? `${networkSizeByAvatarSize[size]}px` : '',\n '--ap-avatar-online-icon-size': ovlMode == 'online' ? `${onlineIconSizeByAvatarSize[size]}px` : '',\n };\n }\n}\n","<!-- background -->\n@if (backgroundView(); as bgView) {\n @switch (bgView.mode) {\n @case ('image') {\n <img\n class=\"bg-image\"\n [ngSrc]=\"bgView.image.src\"\n [width]=\"bgView.image.size\"\n [height]=\"bgView.image.size\"\n [alt]=\"bgView.image.alt\"\n (error)=\"onImageError()\" />\n }\n @case ('initials') {\n <div class=\"bg-initials\">\n {{ bgView.text }}\n </div>\n }\n @case ('symbol') {\n <div\n class=\"bg-symbol\"\n [ngClass]=\"['sym-' + bgView.symbolId, bgView.big ? 'big' : '']\">\n <ap-symbol [symbolId]=\"bgView.symbolId\" />\n </div>\n }\n }\n}\n\n<!-- overlay -->\n@if (overlayView(); as ovlView) {\n @switch (ovlView.mode) {\n @case ('network') {\n <div\n class=\"ovl-network\"\n [class.round]=\"ovlView.round\"\n [ngClass]=\"ovlView.network\">\n <ap-symbol [symbolId]=\"ovlView.network | networkSymbol\" />\n </div>\n }\n @case ('online') {\n <div class=\"ovl-online\"></div>\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;AAiBA,MAAM,0BAA0B,GAA+B;AAC3D,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,CAAC;AACL,IAAA,EAAE,EAAE,CAAC;AACL,IAAA,EAAE,EAAE,CAAC;AACL,IAAA,EAAE,EAAE,CAAC;CACR;AAED,MAAM,sBAAsB,GAA+B;AACvD,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,CAAC;CACR;AAED,MAAM,uBAAuB,GAA+B;AACxD,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,CAAC;CACR;AAED,MAAM,uBAAuB,GAA+B;AACxD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A,IAAA,EAAE,iBAAiB,EAAA,IAAA,EAAA,eAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAO9D,eAAe,EAAA,UAAA,EAAA,CAAA;kBAZ3B,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,WAAW,mBACJ,uBAAuB,CAAC,MAAM,EAAA,OAAA,EAGtC,CAAC,gBAAgB,EAAE,eAAe,EAAE,OAAO,EAAE,iBAAiB,CAAC,kBACxD,CAAC,OAAO,CAAC,EAAA,IAAA,EACnB;AACF,wBAAA,4BAA4B,EAAE,6BAA6B;AAC3D,wBAAA,IAAI,EAAE,cAAc;AACvB,qBAAA,EAAA,QAAA,EAAA,4wCAAA,EAAA,MAAA,EAAA,CAAA,+vEAAA,CAAA,EAAA;;;AE7EL;;AAEG;;;;"}
1
+ {"version":3,"file":"agorapulse-ui-components-avatar.mjs","sources":["../../../libs/ui-components/avatar/src/avatar.component.ts","../../../libs/ui-components/avatar/src/avatar.component.html","../../../libs/ui-components/avatar/src/agorapulse-ui-components-avatar.ts"],"sourcesContent":["import {\n agorapulseSymbol,\n apMask,\n apUser,\n networkDescription,\n NetworkName,\n NetworkSymbolPipe,\n SymbolComponent,\n SymbolRegistry,\n toNetworkSymbol,\n} from '@agorapulse/ui-symbol';\nimport { NgClass, NgOptimizedImage, NgStyle } from '@angular/common';\nimport { booleanAttribute, ChangeDetectionStrategy, Component, computed, effect, input, signal, untracked } from '@angular/core';\n\nexport type AvatarNetwork = NetworkName;\nexport type AvatarSize = 56 | 48 | 40 | 36 | 32 | 24 | 16;\n\nconst onlineIconSizeByAvatarSize: Record<AvatarSize, number> = {\n 56: 16,\n 48: 12,\n 40: 12,\n 36: 8,\n 32: 8,\n 24: 6,\n 16: 6,\n};\n\nconst symbolSizeByAvatarSize: Record<AvatarSize, number> = {\n 56: 28,\n 48: 24,\n 40: 20,\n 36: 18,\n 32: 16,\n 24: 12,\n 16: 8,\n};\n\nconst networkSizeByAvatarSize: Record<AvatarSize, number> = {\n 56: 16,\n 48: 16,\n 40: 16,\n 36: 16,\n 32: 12,\n 24: 12,\n 16: 8,\n};\n\nconst initialSizeByAvatarSize: Record<AvatarSize, number> = {\n 56: 28,\n 48: 24,\n 40: 20,\n 36: 16,\n 32: 16,\n 24: 12,\n 16: 8,\n};\n\nconst automaticBigSymbolNetwork: AvatarNetwork[] = ['youtube'];\n\ntype BackgroundView =\n | { mode: 'image'; image: { src: string; size: number; alt?: string } }\n | { mode: 'initials'; text: string }\n | { mode: 'symbol'; symbolId: agorapulseSymbol; big?: boolean }\n | { mode?: never };\n\ntype OverlayView = { mode: 'online' } | { mode: 'network'; network: NetworkName; round: boolean } | { mode?: never };\n\n@Component({\n selector: 'ap-avatar',\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './avatar.component.html',\n styleUrls: ['./avatar.component.scss'],\n imports: [NgOptimizedImage, SymbolComponent, NgClass, NetworkSymbolPipe],\n hostDirectives: [NgStyle],\n host: {\n '[class.background-default]': '!showBigNetworkBackground()',\n role: 'presentation',\n },\n})\nexport class AvatarComponent {\n profilePicture = input<string>();\n alt = input('');\n network = input(undefined, {\n transform: (v?: AvatarNetwork | string) => (v !== undefined ? (v as AvatarNetwork) : v),\n });\n size = input<AvatarSize | `${AvatarSize}`>(40);\n username = input<string>();\n showInitials = input<boolean | string>();\n bigNetwork = input(false);\n anonymous = input(false);\n online = input(false);\n hideBigNetwork = input(false, { alias: 'youtubeAvatarMode' }); // TODO: rename youtubeAvatarMode to hideBigNetwork in platform\n rounded = input(true, { transform: booleanAttribute });\n\n private imageError = signal(false);\n\n backgroundView = computed<BackgroundView>(() => this.buildBackgroundView());\n overlayView = computed<OverlayView>(() => this.buildOverlayView());\n private useBigNetwork = computed(() => {\n return (this.automaticBigSymbolNetwork() || this.bigNetwork()) && this.network();\n });\n private automaticBigSymbolNetwork = computed(() => {\n return automaticBigSymbolNetwork.includes(this.network() as AvatarNetwork);\n });\n protected showBigNetworkBackground = computed(() => {\n return !this.anonymous() && this.useBigNetwork() && (!this.validProfilePicture() || !this.hideBigNetwork());\n });\n private validProfilePicture = computed(() => {\n return !this.imageError() ? this.profilePicture() : undefined;\n });\n\n constructor(\n symbolRegistry: SymbolRegistry,\n private ngStyle: NgStyle\n ) {\n const networkSymbols = Object.values(networkDescription) //\n .flatMap(({ symbol }) => (typeof symbol !== 'string' ? [symbol] : []));\n\n symbolRegistry.registerSymbols([...networkSymbols, apUser, apMask]);\n\n effect(() => {\n this.ngStyle.ngStyle = this.buildHostStyle();\n this.ngStyle.ngDoCheck();\n });\n effect(() => {\n this.profilePicture(); // on change\n untracked(() => this.imageError.set(false));\n });\n }\n\n onImageError(): void {\n this.imageError.set(true);\n }\n\n private buildBackgroundView(): BackgroundView {\n let bgView: BackgroundView;\n\n if (this.showBigNetworkBackground()) {\n bgView = { mode: 'symbol', symbolId: toNetworkSymbol(this.network()!), big: true };\n } else if (this.anonymous()) {\n bgView = { mode: 'symbol', symbolId: apMask.name };\n } else {\n const profilePicture = this.validProfilePicture();\n\n if (profilePicture) {\n bgView = {\n mode: 'image',\n image: {\n src: profilePicture,\n size: +this.size(),\n alt: this.alt(),\n },\n };\n } else {\n const initials = this.showInitials();\n\n if (initials !== false && initials !== undefined) {\n const useDefault = initials === true || initials === '';\n const candidateName = (useDefault ? (this.username()?.charAt(0) ?? '') : initials.slice(0, 2)).toUpperCase();\n bgView = { mode: 'initials', text: candidateName };\n } else {\n bgView = { mode: 'symbol', symbolId: apUser.name };\n }\n }\n }\n\n return bgView;\n }\n\n private buildOverlayView(): OverlayView {\n let ovlView: OverlayView = {};\n const network = this.network();\n\n if (this.online()) {\n ovlView = { mode: 'online' };\n } else if (network && !this.showBigNetworkBackground() && !this.automaticBigSymbolNetwork()) {\n // unit tests in platform repo gives random network values which are unchecked by the compiler\n const { round } = networkDescription[network] ?? {};\n ovlView = { mode: 'network', network, round };\n }\n\n return ovlView;\n }\n\n private buildHostStyle() {\n const bgView = this.backgroundView();\n const ovlMode = this.overlayView().mode;\n const size = this.size();\n\n return {\n '--ap-avatar-size': `${size}px`,\n '--ap-avatar-border-radius': this.rounded() ? '100%' : 'var(--sys-border-radius-sm)',\n '--ap-avatar-initials-size': bgView.mode == 'initials' ? `${initialSizeByAvatarSize[size]}px` : '',\n '--ap-avatar-symbol-size': bgView.mode == 'symbol' ? `${bgView.big ? size : symbolSizeByAvatarSize[size]}px` : '',\n '--ap-avatar-network-size': ovlMode == 'network' ? `${networkSizeByAvatarSize[size]}px` : '',\n '--ap-avatar-online-icon-size': ovlMode == 'online' ? `${onlineIconSizeByAvatarSize[size]}px` : '',\n };\n }\n}\n","<!-- background -->\n@if (backgroundView(); as bgView) {\n @switch (bgView.mode) {\n @case ('image') {\n <img\n class=\"bg-image\"\n [ngSrc]=\"bgView.image.src\"\n [width]=\"bgView.image.size\"\n [height]=\"bgView.image.size\"\n [alt]=\"bgView.image.alt\"\n (error)=\"onImageError()\" />\n }\n @case ('initials') {\n <div class=\"bg-initials\">\n {{ bgView.text }}\n </div>\n }\n @case ('symbol') {\n <div\n class=\"bg-symbol\"\n [ngClass]=\"['sym-' + bgView.symbolId, bgView.big ? 'big' : '']\">\n <ap-symbol [symbolId]=\"bgView.symbolId\" />\n </div>\n }\n }\n}\n\n<!-- overlay -->\n@if (overlayView(); as ovlView) {\n @switch (ovlView.mode) {\n @case ('network') {\n <div\n class=\"ovl-network\"\n [class.round]=\"ovlView.round\"\n [ngClass]=\"ovlView.network\">\n <ap-symbol [symbolId]=\"ovlView.network | networkSymbol\" />\n </div>\n }\n @case ('online') {\n <div class=\"ovl-online\"></div>\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;AAiBA,MAAM,0BAA0B,GAA+B;AAC3D,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;AAC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
  import { CounterComponent } from '@agorapulse/ui-components/counter';
17
17
  import { ActionDropdownComponent, ActionDropdownTriggerDirective } from '@agorapulse/ui-components/action-dropdown';
18
18
  import { UI_COMPONENTS_SYMBOLS } from '@agorapulse/ui-components/providers';
19
- import { apMore } from '@agorapulse/ui-symbol/icons';
19
+ import { apMore, apFeatureLock as apFeatureLock$1, apPlus } from '@agorapulse/ui-symbol/icons';
20
20
 
21
21
  class NavSelectorPopoverItemComponent {
22
22
  selected = input(false, ...(ngDevMode ? [{ debugName: "selected" }] : []));
@@ -2733,7 +2733,7 @@ class NavSelectorCategoryComponent {
2733
2733
  }
2734
2734
  }
2735
2735
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: NavSelectorCategoryComponent, deps: [{ token: i0.ElementRef }, { token: NavSelectorCategoryPresenter }], target: i0.ɵɵFactoryTarget.Component });
2736
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: NavSelectorCategoryComponent, isStandalone: true, selector: "ap-nav-selector-category", inputs: { category: { classPropertyName: "category", publicName: "category", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { emptyStateActionClicked: "emptyStateActionClicked", actionClicked: "actionClicked" }, host: { listeners: { "keydown.arrowLeft": "navSelectorCategoryPresenter.fold($event, this.category())", "keydown.arrowRight": "navSelectorCategoryPresenter.unfold($event, this.category())" }, properties: { "class.minified": "!navSelectorCategoryPresenter.expanded()" } }, providers: [withSymbols(apChevronDown, apChevronUp), NavSelectorCategoryPresenter], viewQueries: [{ propertyName: "aliasEl", first: true, predicate: ["alias"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- eslint-disable @angular-eslint/template/interactive-supports-focus -->\n@if (navSelectorCategoryPresenter.expanded()) {\n <div\n class=\"content\"\n apTooltipPosition=\"right\"\n [apTooltip]=\"tooltipContent()\"\n [apTooltipDisabled]=\"tooltipDisabled()\"\n [apTreeNodeAccessibility]=\"category()\"\n (keydown.space)=\"navSelectorCategoryPresenter.toggleFolding($event, category())\"\n (keydown.enter)=\"navSelectorCategoryPresenter.toggleFolding($event, category())\"\n (click)=\"navSelectorCategoryPresenter.toggleFolding($event, category())\">\n <span\n #alias\n class=\"caption\">\n {{ category().alias }}\n </span>\n\n <ap-symbol\n class=\"folding-button\"\n size=\"sm\"\n [symbolId]=\"foldSymbol()\" />\n </div>\n\n <div\n class=\"children-container\"\n [@accordion]=\"{\n value: animationState(),\n params: {\n maxHeight: maxHeight(),\n },\n }\">\n @if (!foldedWithDelay()) {\n <div class=\"children\">\n @if (category().children.length === 0) {\n <div class=\"empty-state\">\n @if (category().emptyStateTitle) {\n <div class=\"empty-state__title\">\n {{ category().emptyStateTitle }}\n </div>\n }\n @if (category().emptyStateAction; as emptyStateAction) {\n <a\n [attr.id]=\"emptyStateAction?.id\"\n class=\"standalone\"\n (click)=\"onEmptyStateActionClick(emptyStateAction.name)\">\n @if (emptyStateAction?.symbolId; as symbolId) {\n <ap-symbol\n size=\"sm\"\n [symbolId]=\"symbolId\"/>\n }\n {{ emptyStateAction.title }}\n </a>\n }\n </div>\n } @else {\n @for (child of category().children; track child.uid) {\n @if (!child.hidden) {\n <div\n class=\"entry\"\n [class.folder]=\"child.type === 'GROUP'\">\n @if (child.type === 'LEAF') {\n <ap-nav-selector-leaf\n [leaf]=\"child\"\n (actionClicked)=\"actionClicked.emit($event)\" />\n } @else if (child.type === 'GROUP') {\n <ap-nav-selector-group\n [group]=\"child\"\n (actionClicked)=\"actionClicked.emit($event)\" />\n }\n </div>\n }\n }\n }\n </div>\n }\n </div>\n} @else {\n <div\n class=\"content\"\n apTooltipPosition=\"right\"\n [apTreeNodeAccessibility]=\"category()\"\n [apTooltip]=\"tooltipContent()\"\n [apTooltipDisabled]=\"tooltipDisabled()\"\n (click)=\"navSelectorCategoryPresenter.toggleFolding($event, category())\"\n (keydown.space)=\"navSelectorCategoryPresenter.toggleFolding($event, category())\"\n (keydown.enter)=\"navSelectorCategoryPresenter.toggleFolding($event, category())\">\n <div class=\"name-container\">\n <span class=\"caption\">{{ category().alias }}</span>\n </div>\n\n <div class=\"toggle\">\n <ap-symbol\n size=\"sm\"\n [symbolId]=\"foldSymbol()\" />\n </div>\n </div>\n\n <div\n class=\"children-container\"\n [@accordion]=\"{\n value: animationState(),\n params: {\n maxHeight: maxHeight(),\n },\n }\">\n @if (!foldedWithDelay()) {\n <div class=\"children\">\n @for (child of category().children; track child.uid) {\n @if (!child.hidden) {\n <div\n class=\"entry\"\n [class.folder]=\"child.type === 'GROUP'\">\n @if (child.type === 'LEAF') {\n <ap-nav-selector-leaf\n [leaf]=\"child\"\n (actionClicked)=\"actionClicked.emit($event)\" />\n } @else if (child.type === 'GROUP') {\n <ap-nav-selector-group\n [group]=\"child\"\n (actionClicked)=\"actionClicked.emit($event)\" />\n }\n </div>\n }\n }\n </div>\n }\n </div>\n}\n", styles: [":host{display:flex;align-items:center;flex-shrink:0;align-self:stretch;flex-direction:column}:host .children-container{align-self:stretch}:host .children-container .empty-state{display:flex;padding:0 var(--ref-spacing-xxs) var(--ref-spacing-xxs) var(--ref-spacing-xxs);flex-direction:column;align-items:flex-start;gap:var(--ref-spacing-xxs)}:host .children-container .empty-state__title{font-size:var(--ref-font-size-xs);font-weight:var(--ref-font-weight-regular);font-style:italic;color:var(--ref-color-grey-80)}:host .folding-button{display:flex;width:16px;height:16px;justify-content:center;align-items:center;flex-shrink:0}:host .content{padding:0 var(--ref-spacing-xxs);display:flex;height:36px;align-items:center;gap:var(--ref-spacing-xxs);flex-shrink:0;flex-grow:1;align-self:stretch;cursor:pointer}:host .content:hover{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10)}:host .content:active{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .content:focus-visible{outline:none;border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10);box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}:host ap-symbol[symbol-id=chevron-down],:host ap-symbol[symbol-id=chevron-up]{color:var(--ref-color-grey-80)}:host .caption{-webkit-box-orient:vertical;-webkit-line-clamp:1;flex:1 0 0;overflow:hidden;white-space:nowrap;color:var(--ref-color-grey-100);text-overflow:ellipsis;font-family:Averta;font-size:var(--sys-text-style-h4-size);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-md)}:host .children{display:flex;flex-direction:column;align-items:flex-start;flex:1 0 0;align-self:stretch}:host .children .entry{display:flex;flex-direction:column;align-items:flex-start;flex:1 0 0;align-self:stretch;margin-left:calc(-1 * var(--ref-spacing-xxs));margin-right:calc(-1 * var(--ref-spacing-xxs))}:host .children .entry.folder{padding:var(--ref-spacing-xxs);border-bottom:1px solid var(--sys-border-color-default)}:host .children .entry.folder+.entry:not(.folder){padding-top:var(--ref-spacing-xxs)}:host .children .entry.folder:first-child{padding-top:0}:host .children .entry.folder:last-child{border-bottom:none;padding-bottom:0}:host .children .entry:not(.folder){padding-left:var(--ref-spacing-xxs);padding-right:var(--ref-spacing-xxs)}:host .children .entry:not(.folder):first-child:not(:last-child){padding-top:var(--ref-spacing-xxs)}:host .children .entry:not(.folder):last-child:not(:first-child){padding-bottom:var(--ref-spacing-xxs);border-bottom:none}:host .children .entry:not(.folder):has(+.entry.folder){padding-bottom:var(--ref-spacing-xxs)}:host .children .entry:not(.folder)+.entry.folder{border-top:1px solid var(--sys-border-color-default)}:host.minified .name-container{overflow:hidden;display:flex}:host.minified .name-container span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:inline-block}:host.minified .caption{white-space:nowrap}:host.minified .content{position:relative}:host.minified .content .toggle{position:absolute;display:none}:host.minified .content:hover .toggle,:host.minified .content:focus-visible .toggle{inset:0;display:flex;justify-content:center;align-items:center}:host.minified .content:hover .name-container,:host.minified .content:focus-visible .name-container{display:none}\n"], dependencies: [{ kind: "component", type: NavSelectorLeafComponent, selector: "ap-nav-selector-leaf", inputs: ["leaf"], outputs: ["actionClicked"] }, { kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["symbolId", "color", "size"], outputs: ["sizeChange"] }, { kind: "component", type: NavSelectorGroupComponent, selector: "ap-nav-selector-group", inputs: ["group"], outputs: ["actionClicked"] }, { kind: "directive", type: TreeNodeAccessibilityDirective, selector: "[apTreeNodeAccessibility]", inputs: ["apTreeNodeAccessibility"] }, { kind: "directive", type: TooltipDirective, selector: "[apTooltip]", inputs: ["apTooltip", "apTooltipPosition", "apTooltipShowDelay", "apTooltipHideDelay", "apTooltipDuration", "apTooltipDisabled", "apTooltipTruncatedTextOnly", "apTooltipTemplateContext", "apTooltipVirtualScrollElement"] }], animations: [
2736
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: NavSelectorCategoryComponent, isStandalone: true, selector: "ap-nav-selector-category", inputs: { category: { classPropertyName: "category", publicName: "category", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { emptyStateActionClicked: "emptyStateActionClicked", actionClicked: "actionClicked" }, host: { listeners: { "keydown.arrowLeft": "navSelectorCategoryPresenter.fold($event, this.category())", "keydown.arrowRight": "navSelectorCategoryPresenter.unfold($event, this.category())" }, properties: { "class.minified": "!navSelectorCategoryPresenter.expanded()" } }, providers: [withSymbols(apChevronDown, apChevronUp, apFeatureLock$1, apPlus), NavSelectorCategoryPresenter], viewQueries: [{ propertyName: "aliasEl", first: true, predicate: ["alias"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- eslint-disable @angular-eslint/template/interactive-supports-focus -->\n@if (navSelectorCategoryPresenter.expanded()) {\n <div\n class=\"content\"\n apTooltipPosition=\"right\"\n [apTooltip]=\"tooltipContent()\"\n [apTooltipDisabled]=\"tooltipDisabled()\"\n [apTreeNodeAccessibility]=\"category()\"\n (keydown.space)=\"navSelectorCategoryPresenter.toggleFolding($event, category())\"\n (keydown.enter)=\"navSelectorCategoryPresenter.toggleFolding($event, category())\"\n (click)=\"navSelectorCategoryPresenter.toggleFolding($event, category())\">\n <span\n #alias\n class=\"caption\">\n {{ category().alias }}\n </span>\n\n <ap-symbol\n class=\"folding-button\"\n size=\"sm\"\n [symbolId]=\"foldSymbol()\" />\n </div>\n\n <div\n class=\"children-container\"\n [@accordion]=\"{\n value: animationState(),\n params: {\n maxHeight: maxHeight(),\n },\n }\">\n @if (!foldedWithDelay()) {\n <div class=\"children\">\n @if (category().children.length === 0) {\n <div class=\"empty-state\">\n @if (category().emptyStateTitle) {\n <div class=\"empty-state__title\">\n {{ category().emptyStateTitle }}\n </div>\n }\n @if (category().emptyStateAction; as emptyStateAction) {\n <a\n [attr.id]=\"emptyStateAction?.id\"\n class=\"standalone\"\n (click)=\"onEmptyStateActionClick(emptyStateAction.name)\">\n @if (emptyStateAction?.symbolId; as symbolId) {\n <ap-symbol\n size=\"sm\"\n [symbolId]=\"symbolId\"/>\n }\n {{ emptyStateAction.title }}\n @if (emptyStateAction?.featureLocked) {\n <ap-symbol\n size=\"sm\"\n color=\"purple\"\n symbolId=\"feature-lock\" />\n }\n </a>\n }\n </div>\n } @else {\n @for (child of category().children; track child.uid) {\n @if (!child.hidden) {\n <div\n class=\"entry\"\n [class.folder]=\"child.type === 'GROUP'\">\n @if (child.type === 'LEAF') {\n <ap-nav-selector-leaf\n [leaf]=\"child\"\n (actionClicked)=\"actionClicked.emit($event)\" />\n } @else if (child.type === 'GROUP') {\n <ap-nav-selector-group\n [group]=\"child\"\n (actionClicked)=\"actionClicked.emit($event)\" />\n }\n </div>\n }\n }\n }\n </div>\n }\n </div>\n} @else {\n <div\n class=\"content\"\n apTooltipPosition=\"right\"\n [apTreeNodeAccessibility]=\"category()\"\n [apTooltip]=\"tooltipContent()\"\n [apTooltipDisabled]=\"tooltipDisabled()\"\n (click)=\"navSelectorCategoryPresenter.toggleFolding($event, category())\"\n (keydown.space)=\"navSelectorCategoryPresenter.toggleFolding($event, category())\"\n (keydown.enter)=\"navSelectorCategoryPresenter.toggleFolding($event, category())\">\n <div class=\"name-container\">\n <span class=\"caption\">{{ category().alias }}</span>\n </div>\n\n <div class=\"toggle\">\n <ap-symbol\n size=\"sm\"\n [symbolId]=\"foldSymbol()\" />\n </div>\n </div>\n\n <div\n class=\"children-container\"\n [@accordion]=\"{\n value: animationState(),\n params: {\n maxHeight: maxHeight(),\n },\n }\">\n @if (!foldedWithDelay()) {\n <div class=\"children\">\n @for (child of category().children; track child.uid) {\n @if (!child.hidden) {\n <div\n class=\"entry\"\n [class.folder]=\"child.type === 'GROUP'\">\n @if (child.type === 'LEAF') {\n <ap-nav-selector-leaf\n [leaf]=\"child\"\n (actionClicked)=\"actionClicked.emit($event)\" />\n } @else if (child.type === 'GROUP') {\n <ap-nav-selector-group\n [group]=\"child\"\n (actionClicked)=\"actionClicked.emit($event)\" />\n }\n </div>\n }\n }\n </div>\n }\n </div>\n}\n", styles: [":host{display:flex;align-items:center;flex-shrink:0;align-self:stretch;flex-direction:column}:host .children-container{align-self:stretch}:host .children-container .empty-state{display:flex;padding:0 var(--ref-spacing-xxs) var(--ref-spacing-xxs) var(--ref-spacing-xxs);flex-direction:column;align-items:flex-start;gap:var(--ref-spacing-xxs)}:host .children-container .empty-state__title{font-size:var(--ref-font-size-xs);font-weight:var(--ref-font-weight-regular);font-style:italic;color:var(--ref-color-grey-80)}:host .folding-button{display:flex;width:16px;height:16px;justify-content:center;align-items:center;flex-shrink:0}:host .content{padding:0 var(--ref-spacing-xxs);display:flex;height:36px;align-items:center;gap:var(--ref-spacing-xxs);flex-shrink:0;flex-grow:1;align-self:stretch;cursor:pointer}:host .content:hover{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10)}:host .content:active{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .content:focus-visible{outline:none;border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10);box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}:host ap-symbol[symbol-id=chevron-down],:host ap-symbol[symbol-id=chevron-up]{color:var(--ref-color-grey-80)}:host .caption{-webkit-box-orient:vertical;-webkit-line-clamp:1;flex:1 0 0;overflow:hidden;white-space:nowrap;color:var(--ref-color-grey-100);text-overflow:ellipsis;font-family:Averta;font-size:var(--sys-text-style-h4-size);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-md)}:host .children{display:flex;flex-direction:column;align-items:flex-start;flex:1 0 0;align-self:stretch}:host .children .entry{display:flex;flex-direction:column;align-items:flex-start;flex:1 0 0;align-self:stretch;margin-left:calc(-1 * var(--ref-spacing-xxs));margin-right:calc(-1 * var(--ref-spacing-xxs))}:host .children .entry.folder{padding:var(--ref-spacing-xxs);border-bottom:1px solid var(--sys-border-color-default)}:host .children .entry.folder+.entry:not(.folder){padding-top:var(--ref-spacing-xxs)}:host .children .entry.folder:first-child{padding-top:0}:host .children .entry.folder:last-child{border-bottom:none;padding-bottom:0}:host .children .entry:not(.folder){padding-left:var(--ref-spacing-xxs);padding-right:var(--ref-spacing-xxs)}:host .children .entry:not(.folder):first-child:not(:last-child){padding-top:var(--ref-spacing-xxs)}:host .children .entry:not(.folder):last-child:not(:first-child){padding-bottom:var(--ref-spacing-xxs);border-bottom:none}:host .children .entry:not(.folder):has(+.entry.folder){padding-bottom:var(--ref-spacing-xxs)}:host .children .entry:not(.folder)+.entry.folder{border-top:1px solid var(--sys-border-color-default)}:host.minified .name-container{overflow:hidden;display:flex}:host.minified .name-container span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:inline-block}:host.minified .caption{white-space:nowrap}:host.minified .content{position:relative}:host.minified .content .toggle{position:absolute;display:none}:host.minified .content:hover .toggle,:host.minified .content:focus-visible .toggle{inset:0;display:flex;justify-content:center;align-items:center}:host.minified .content:hover .name-container,:host.minified .content:focus-visible .name-container{display:none}\n"], dependencies: [{ kind: "component", type: NavSelectorLeafComponent, selector: "ap-nav-selector-leaf", inputs: ["leaf"], outputs: ["actionClicked"] }, { kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["symbolId", "color", "size"], outputs: ["sizeChange"] }, { kind: "component", type: NavSelectorGroupComponent, selector: "ap-nav-selector-group", inputs: ["group"], outputs: ["actionClicked"] }, { kind: "directive", type: TreeNodeAccessibilityDirective, selector: "[apTreeNodeAccessibility]", inputs: ["apTreeNodeAccessibility"] }, { kind: "directive", type: TooltipDirective, selector: "[apTooltip]", inputs: ["apTooltip", "apTooltipPosition", "apTooltipShowDelay", "apTooltipHideDelay", "apTooltipDuration", "apTooltipDisabled", "apTooltipTruncatedTextOnly", "apTooltipTemplateContext", "apTooltipVirtualScrollElement"] }], animations: [
2737
2737
  /**
2738
2738
  * Overflow hidden is put only during the animation and on the collapsed state because if it is put on the expanded state then children’s border will be cut (hover / focus)
2739
2739
  */
@@ -2756,7 +2756,7 @@ class NavSelectorCategoryComponent {
2756
2756
  }
2757
2757
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: NavSelectorCategoryComponent, decorators: [{
2758
2758
  type: Component,
2759
- args: [{ selector: 'ap-nav-selector-category', changeDetection: ChangeDetectionStrategy.OnPush, imports: [NavSelectorLeafComponent, SymbolComponent, NavSelectorGroupComponent, TreeNodeAccessibilityDirective, TooltipDirective], providers: [withSymbols(apChevronDown, apChevronUp), NavSelectorCategoryPresenter], host: {
2759
+ args: [{ selector: 'ap-nav-selector-category', changeDetection: ChangeDetectionStrategy.OnPush, imports: [NavSelectorLeafComponent, SymbolComponent, NavSelectorGroupComponent, TreeNodeAccessibilityDirective, TooltipDirective], providers: [withSymbols(apChevronDown, apChevronUp, apFeatureLock$1, apPlus), NavSelectorCategoryPresenter], host: {
2760
2760
  '[class.minified]': '!navSelectorCategoryPresenter.expanded()',
2761
2761
  '(keydown.arrowLeft)': 'navSelectorCategoryPresenter.fold($event, this.category())',
2762
2762
  '(keydown.arrowRight)': 'navSelectorCategoryPresenter.unfold($event, this.category())',
@@ -2779,7 +2779,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImpor
2779
2779
  animate('250ms cubic-bezier(.4, 0, .3, 1)', keyframes([style({ maxHeight: '{{maxHeight}}' }), style({ overflow: 'hidden', maxHeight: 0 })])),
2780
2780
  ]),
2781
2781
  ]),
2782
- ], template: "<!-- eslint-disable @angular-eslint/template/interactive-supports-focus -->\n@if (navSelectorCategoryPresenter.expanded()) {\n <div\n class=\"content\"\n apTooltipPosition=\"right\"\n [apTooltip]=\"tooltipContent()\"\n [apTooltipDisabled]=\"tooltipDisabled()\"\n [apTreeNodeAccessibility]=\"category()\"\n (keydown.space)=\"navSelectorCategoryPresenter.toggleFolding($event, category())\"\n (keydown.enter)=\"navSelectorCategoryPresenter.toggleFolding($event, category())\"\n (click)=\"navSelectorCategoryPresenter.toggleFolding($event, category())\">\n <span\n #alias\n class=\"caption\">\n {{ category().alias }}\n </span>\n\n <ap-symbol\n class=\"folding-button\"\n size=\"sm\"\n [symbolId]=\"foldSymbol()\" />\n </div>\n\n <div\n class=\"children-container\"\n [@accordion]=\"{\n value: animationState(),\n params: {\n maxHeight: maxHeight(),\n },\n }\">\n @if (!foldedWithDelay()) {\n <div class=\"children\">\n @if (category().children.length === 0) {\n <div class=\"empty-state\">\n @if (category().emptyStateTitle) {\n <div class=\"empty-state__title\">\n {{ category().emptyStateTitle }}\n </div>\n }\n @if (category().emptyStateAction; as emptyStateAction) {\n <a\n [attr.id]=\"emptyStateAction?.id\"\n class=\"standalone\"\n (click)=\"onEmptyStateActionClick(emptyStateAction.name)\">\n @if (emptyStateAction?.symbolId; as symbolId) {\n <ap-symbol\n size=\"sm\"\n [symbolId]=\"symbolId\"/>\n }\n {{ emptyStateAction.title }}\n </a>\n }\n </div>\n } @else {\n @for (child of category().children; track child.uid) {\n @if (!child.hidden) {\n <div\n class=\"entry\"\n [class.folder]=\"child.type === 'GROUP'\">\n @if (child.type === 'LEAF') {\n <ap-nav-selector-leaf\n [leaf]=\"child\"\n (actionClicked)=\"actionClicked.emit($event)\" />\n } @else if (child.type === 'GROUP') {\n <ap-nav-selector-group\n [group]=\"child\"\n (actionClicked)=\"actionClicked.emit($event)\" />\n }\n </div>\n }\n }\n }\n </div>\n }\n </div>\n} @else {\n <div\n class=\"content\"\n apTooltipPosition=\"right\"\n [apTreeNodeAccessibility]=\"category()\"\n [apTooltip]=\"tooltipContent()\"\n [apTooltipDisabled]=\"tooltipDisabled()\"\n (click)=\"navSelectorCategoryPresenter.toggleFolding($event, category())\"\n (keydown.space)=\"navSelectorCategoryPresenter.toggleFolding($event, category())\"\n (keydown.enter)=\"navSelectorCategoryPresenter.toggleFolding($event, category())\">\n <div class=\"name-container\">\n <span class=\"caption\">{{ category().alias }}</span>\n </div>\n\n <div class=\"toggle\">\n <ap-symbol\n size=\"sm\"\n [symbolId]=\"foldSymbol()\" />\n </div>\n </div>\n\n <div\n class=\"children-container\"\n [@accordion]=\"{\n value: animationState(),\n params: {\n maxHeight: maxHeight(),\n },\n }\">\n @if (!foldedWithDelay()) {\n <div class=\"children\">\n @for (child of category().children; track child.uid) {\n @if (!child.hidden) {\n <div\n class=\"entry\"\n [class.folder]=\"child.type === 'GROUP'\">\n @if (child.type === 'LEAF') {\n <ap-nav-selector-leaf\n [leaf]=\"child\"\n (actionClicked)=\"actionClicked.emit($event)\" />\n } @else if (child.type === 'GROUP') {\n <ap-nav-selector-group\n [group]=\"child\"\n (actionClicked)=\"actionClicked.emit($event)\" />\n }\n </div>\n }\n }\n </div>\n }\n </div>\n}\n", styles: [":host{display:flex;align-items:center;flex-shrink:0;align-self:stretch;flex-direction:column}:host .children-container{align-self:stretch}:host .children-container .empty-state{display:flex;padding:0 var(--ref-spacing-xxs) var(--ref-spacing-xxs) var(--ref-spacing-xxs);flex-direction:column;align-items:flex-start;gap:var(--ref-spacing-xxs)}:host .children-container .empty-state__title{font-size:var(--ref-font-size-xs);font-weight:var(--ref-font-weight-regular);font-style:italic;color:var(--ref-color-grey-80)}:host .folding-button{display:flex;width:16px;height:16px;justify-content:center;align-items:center;flex-shrink:0}:host .content{padding:0 var(--ref-spacing-xxs);display:flex;height:36px;align-items:center;gap:var(--ref-spacing-xxs);flex-shrink:0;flex-grow:1;align-self:stretch;cursor:pointer}:host .content:hover{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10)}:host .content:active{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .content:focus-visible{outline:none;border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10);box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}:host ap-symbol[symbol-id=chevron-down],:host ap-symbol[symbol-id=chevron-up]{color:var(--ref-color-grey-80)}:host .caption{-webkit-box-orient:vertical;-webkit-line-clamp:1;flex:1 0 0;overflow:hidden;white-space:nowrap;color:var(--ref-color-grey-100);text-overflow:ellipsis;font-family:Averta;font-size:var(--sys-text-style-h4-size);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-md)}:host .children{display:flex;flex-direction:column;align-items:flex-start;flex:1 0 0;align-self:stretch}:host .children .entry{display:flex;flex-direction:column;align-items:flex-start;flex:1 0 0;align-self:stretch;margin-left:calc(-1 * var(--ref-spacing-xxs));margin-right:calc(-1 * var(--ref-spacing-xxs))}:host .children .entry.folder{padding:var(--ref-spacing-xxs);border-bottom:1px solid var(--sys-border-color-default)}:host .children .entry.folder+.entry:not(.folder){padding-top:var(--ref-spacing-xxs)}:host .children .entry.folder:first-child{padding-top:0}:host .children .entry.folder:last-child{border-bottom:none;padding-bottom:0}:host .children .entry:not(.folder){padding-left:var(--ref-spacing-xxs);padding-right:var(--ref-spacing-xxs)}:host .children .entry:not(.folder):first-child:not(:last-child){padding-top:var(--ref-spacing-xxs)}:host .children .entry:not(.folder):last-child:not(:first-child){padding-bottom:var(--ref-spacing-xxs);border-bottom:none}:host .children .entry:not(.folder):has(+.entry.folder){padding-bottom:var(--ref-spacing-xxs)}:host .children .entry:not(.folder)+.entry.folder{border-top:1px solid var(--sys-border-color-default)}:host.minified .name-container{overflow:hidden;display:flex}:host.minified .name-container span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:inline-block}:host.minified .caption{white-space:nowrap}:host.minified .content{position:relative}:host.minified .content .toggle{position:absolute;display:none}:host.minified .content:hover .toggle,:host.minified .content:focus-visible .toggle{inset:0;display:flex;justify-content:center;align-items:center}:host.minified .content:hover .name-container,:host.minified .content:focus-visible .name-container{display:none}\n"] }]
2782
+ ], template: "<!-- eslint-disable @angular-eslint/template/interactive-supports-focus -->\n@if (navSelectorCategoryPresenter.expanded()) {\n <div\n class=\"content\"\n apTooltipPosition=\"right\"\n [apTooltip]=\"tooltipContent()\"\n [apTooltipDisabled]=\"tooltipDisabled()\"\n [apTreeNodeAccessibility]=\"category()\"\n (keydown.space)=\"navSelectorCategoryPresenter.toggleFolding($event, category())\"\n (keydown.enter)=\"navSelectorCategoryPresenter.toggleFolding($event, category())\"\n (click)=\"navSelectorCategoryPresenter.toggleFolding($event, category())\">\n <span\n #alias\n class=\"caption\">\n {{ category().alias }}\n </span>\n\n <ap-symbol\n class=\"folding-button\"\n size=\"sm\"\n [symbolId]=\"foldSymbol()\" />\n </div>\n\n <div\n class=\"children-container\"\n [@accordion]=\"{\n value: animationState(),\n params: {\n maxHeight: maxHeight(),\n },\n }\">\n @if (!foldedWithDelay()) {\n <div class=\"children\">\n @if (category().children.length === 0) {\n <div class=\"empty-state\">\n @if (category().emptyStateTitle) {\n <div class=\"empty-state__title\">\n {{ category().emptyStateTitle }}\n </div>\n }\n @if (category().emptyStateAction; as emptyStateAction) {\n <a\n [attr.id]=\"emptyStateAction?.id\"\n class=\"standalone\"\n (click)=\"onEmptyStateActionClick(emptyStateAction.name)\">\n @if (emptyStateAction?.symbolId; as symbolId) {\n <ap-symbol\n size=\"sm\"\n [symbolId]=\"symbolId\"/>\n }\n {{ emptyStateAction.title }}\n @if (emptyStateAction?.featureLocked) {\n <ap-symbol\n size=\"sm\"\n color=\"purple\"\n symbolId=\"feature-lock\" />\n }\n </a>\n }\n </div>\n } @else {\n @for (child of category().children; track child.uid) {\n @if (!child.hidden) {\n <div\n class=\"entry\"\n [class.folder]=\"child.type === 'GROUP'\">\n @if (child.type === 'LEAF') {\n <ap-nav-selector-leaf\n [leaf]=\"child\"\n (actionClicked)=\"actionClicked.emit($event)\" />\n } @else if (child.type === 'GROUP') {\n <ap-nav-selector-group\n [group]=\"child\"\n (actionClicked)=\"actionClicked.emit($event)\" />\n }\n </div>\n }\n }\n }\n </div>\n }\n </div>\n} @else {\n <div\n class=\"content\"\n apTooltipPosition=\"right\"\n [apTreeNodeAccessibility]=\"category()\"\n [apTooltip]=\"tooltipContent()\"\n [apTooltipDisabled]=\"tooltipDisabled()\"\n (click)=\"navSelectorCategoryPresenter.toggleFolding($event, category())\"\n (keydown.space)=\"navSelectorCategoryPresenter.toggleFolding($event, category())\"\n (keydown.enter)=\"navSelectorCategoryPresenter.toggleFolding($event, category())\">\n <div class=\"name-container\">\n <span class=\"caption\">{{ category().alias }}</span>\n </div>\n\n <div class=\"toggle\">\n <ap-symbol\n size=\"sm\"\n [symbolId]=\"foldSymbol()\" />\n </div>\n </div>\n\n <div\n class=\"children-container\"\n [@accordion]=\"{\n value: animationState(),\n params: {\n maxHeight: maxHeight(),\n },\n }\">\n @if (!foldedWithDelay()) {\n <div class=\"children\">\n @for (child of category().children; track child.uid) {\n @if (!child.hidden) {\n <div\n class=\"entry\"\n [class.folder]=\"child.type === 'GROUP'\">\n @if (child.type === 'LEAF') {\n <ap-nav-selector-leaf\n [leaf]=\"child\"\n (actionClicked)=\"actionClicked.emit($event)\" />\n } @else if (child.type === 'GROUP') {\n <ap-nav-selector-group\n [group]=\"child\"\n (actionClicked)=\"actionClicked.emit($event)\" />\n }\n </div>\n }\n }\n </div>\n }\n </div>\n}\n", styles: [":host{display:flex;align-items:center;flex-shrink:0;align-self:stretch;flex-direction:column}:host .children-container{align-self:stretch}:host .children-container .empty-state{display:flex;padding:0 var(--ref-spacing-xxs) var(--ref-spacing-xxs) var(--ref-spacing-xxs);flex-direction:column;align-items:flex-start;gap:var(--ref-spacing-xxs)}:host .children-container .empty-state__title{font-size:var(--ref-font-size-xs);font-weight:var(--ref-font-weight-regular);font-style:italic;color:var(--ref-color-grey-80)}:host .folding-button{display:flex;width:16px;height:16px;justify-content:center;align-items:center;flex-shrink:0}:host .content{padding:0 var(--ref-spacing-xxs);display:flex;height:36px;align-items:center;gap:var(--ref-spacing-xxs);flex-shrink:0;flex-grow:1;align-self:stretch;cursor:pointer}:host .content:hover{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10)}:host .content:active{border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-20)}:host .content:focus-visible{outline:none;border-radius:var(--ref-border-radius-sm);background:var(--ref-color-electric-blue-10);box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}:host ap-symbol[symbol-id=chevron-down],:host ap-symbol[symbol-id=chevron-up]{color:var(--ref-color-grey-80)}:host .caption{-webkit-box-orient:vertical;-webkit-line-clamp:1;flex:1 0 0;overflow:hidden;white-space:nowrap;color:var(--ref-color-grey-100);text-overflow:ellipsis;font-family:Averta;font-size:var(--sys-text-style-h4-size);font-style:normal;font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-md)}:host .children{display:flex;flex-direction:column;align-items:flex-start;flex:1 0 0;align-self:stretch}:host .children .entry{display:flex;flex-direction:column;align-items:flex-start;flex:1 0 0;align-self:stretch;margin-left:calc(-1 * var(--ref-spacing-xxs));margin-right:calc(-1 * var(--ref-spacing-xxs))}:host .children .entry.folder{padding:var(--ref-spacing-xxs);border-bottom:1px solid var(--sys-border-color-default)}:host .children .entry.folder+.entry:not(.folder){padding-top:var(--ref-spacing-xxs)}:host .children .entry.folder:first-child{padding-top:0}:host .children .entry.folder:last-child{border-bottom:none;padding-bottom:0}:host .children .entry:not(.folder){padding-left:var(--ref-spacing-xxs);padding-right:var(--ref-spacing-xxs)}:host .children .entry:not(.folder):first-child:not(:last-child){padding-top:var(--ref-spacing-xxs)}:host .children .entry:not(.folder):last-child:not(:first-child){padding-bottom:var(--ref-spacing-xxs);border-bottom:none}:host .children .entry:not(.folder):has(+.entry.folder){padding-bottom:var(--ref-spacing-xxs)}:host .children .entry:not(.folder)+.entry.folder{border-top:1px solid var(--sys-border-color-default)}:host.minified .name-container{overflow:hidden;display:flex}:host.minified .name-container span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:inline-block}:host.minified .caption{white-space:nowrap}:host.minified .content{position:relative}:host.minified .content .toggle{position:absolute;display:none}:host.minified .content:hover .toggle,:host.minified .content:focus-visible .toggle{inset:0;display:flex;justify-content:center;align-items:center}:host.minified .content:hover .name-container,:host.minified .content:focus-visible .name-container{display:none}\n"] }]
2783
2783
  }], ctorParameters: () => [{ type: i0.ElementRef }, { type: NavSelectorCategoryPresenter }] });
2784
2784
 
2785
2785
  const AUTO_MINIFIED_STATE_WIDTH_BREAKPOINT = 1280;