{"version":3,"file":"odx-angular-components-rich-list.mjs","sources":["../../../../libs/angular/components/rich-list/src/lib/components/rich-list-content/rich-list-content.component.ts","../../../../libs/angular/components/rich-list/src/lib/components/rich-list-item-header/rich-list-item-header.component.ts","../../../../libs/angular/components/rich-list/src/lib/components/rich-list-item-header/rich-list-item-header.component.html","../../../../libs/angular/components/rich-list/src/lib/components/rich-list-item/rich-list-item.component.ts","../../../../libs/angular/components/rich-list/src/lib/components/rich-list-item/rich-list-item.component.html","../../../../libs/angular/components/rich-list/src/lib/rich-list.component.ts","../../../../libs/angular/components/rich-list/src/lib/rich-list.component.html","../../../../libs/angular/components/rich-list/src/lib/rich-list.module.ts","../../../../libs/angular/components/rich-list/src/odx-angular-components-rich-list.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n/**\n * RichListItemContentComponent provides a container for rich content within a `RichListItemComponent`.\n * It is used to wrap content that should be styled according to the rich list design.\n */\n@CSSComponent('rich-list-content')\n@Component({\n  standalone: true,\n  selector: 'odx-rich-list-content',\n  template: ` <ng-content /> `,\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  encapsulation: ViewEncapsulation.None,\n})\nexport class RichListItemContentComponent {\n  public readonly element = injectElement();\n}\n","import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\nimport { ActionGroupComponent } from '@odx/angular/components/action-group';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n// TODO: rename component class name and file names to match the component name\n/**\n * RichListItemHeaderComponent provides a container for header content within a `RichListItemComponent`.\n * It is used to wrap content that should be styled according to the rich list design.\n */\n@CSSComponent('rich-list-item-header')\n@Component({\n  standalone: true,\n  selector: 'odx-rich-list-item-header',\n  templateUrl: 'rich-list-item-header.component.html',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  encapsulation: ViewEncapsulation.None,\n  imports: [ActionGroupComponent],\n})\nexport class RichListItemHeaderComponent {\n  public readonly element = injectElement();\n}\n","<ng-content select=\"odx-checkbox\" />\n<ng-content select=\"odx-avatar\" />\n<div class=\"odx-rich-list-item-header__title\">\n  <ng-content />\n</div>\n<odx-action-group class=\"odx-rich-list-item-header__action-group\">\n  <ng-content select=\"[odxButton]\" ngProjectAs=\"[odxButton]\" />\n</odx-action-group>\n","import { ChangeDetectionStrategy, Component, ContentChild, EventEmitter, Output, ViewEncapsulation, inject } from '@angular/core';\nimport { CoreModule, DisabledController } from '@odx/angular';\nimport { A11yModule } from '@odx/angular/cdk/a11y';\nimport { ExpandableItemDirective } from '@odx/angular/cdk/expandable';\nimport { ActionGroupComponent } from '@odx/angular/components/action-group';\nimport { ButtonComponent } from '@odx/angular/components/button';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\nimport { RichListItemContentComponent } from '../rich-list-content/rich-list-content.component';\n\n/**\n * RichListItemComponent is a list item component that displays rich content and supports expandable functionality.\n * It can be used in conjunction with the `RichListComponent` to create a list of items with rich content.\n * The component can be expanded to show additional content or details, providing a dynamic user experience.\n * It also supports a disabled state, which prevents user interaction with the item.\n * Has host directive ExpandableItemDirective with inputs `expanded` and `id`.\n *\n * @see {ExpandableItemDirective}\n */\n@CSSComponent('rich-list-item')\n@Component({\n  selector: 'odx-rich-list-item',\n  templateUrl: './rich-list-item.component.html',\n  standalone: true,\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  encapsulation: ViewEncapsulation.None,\n  imports: [A11yModule, CoreModule, ActionGroupComponent, IconComponent, ButtonComponent],\n  providers: [DisabledController.connect()],\n  hostDirectives: [{ directive: ExpandableItemDirective, inputs: ['expanded', 'id'] }],\n  host: {\n    '[class.is-disabled]': 'isDisabled',\n    '[class.odx-rich-list-item--expanded]': 'expandableItem.expanded',\n    '[class.odx-rich-list-item--empty]': 'empty',\n    '[attr.id]': 'expandableItem.id',\n  },\n})\nexport class RichListItemComponent {\n  private readonly disabledController = DisabledController.inject();\n\n  @ContentChild(RichListItemContentComponent)\n  private readonly content?: RichListItemContentComponent;\n\n  public readonly expandableItem = inject(ExpandableItemDirective, { self: true });\n  public readonly element = injectElement();\n\n  /**\n   * Emits an event whenever the expanded state of the `RichListItemComponent` changes.\n   *\n   * @emits {boolean} The new expanded state of the component.\n   */\n  @Output()\n  public expandedChange: EventEmitter<boolean> = new EventEmitter();\n\n  /**\n   * Toggles the expanded state of the component.\n   *\n   * This method is a key function of the `RichListItemComponent`, enabling dynamic interaction with the component's presentation.\n   * When invoked, it switches this item current state. If the item is currently expanded (showing additional content or details),\n   * calling `toggle` will collapse it, hiding these elements from view.\n   */\n  public toggle(): void {\n    this.expandableItem.toggle();\n  }\n\n  protected get titleId(): string {\n    return `${this.expandableItem.id}-title`;\n  }\n\n  protected get slotId(): string {\n    return `${this.expandableItem.id}-slot`;\n  }\n\n  protected get empty(): boolean {\n    return !this.content;\n  }\n\n  protected get isDisabled(): boolean {\n    return !!this.disabledController?.disabled;\n  }\n\n  protected onAnimationEnd(): void {\n    this.expandedChange.emit(this.expandableItem.expanded);\n  }\n}\n","<div class=\"odx-rich-list-item__header\" [attr.id]=\"titleId\" [attr.aria-expanded]=\"expandableItem.expanded\" [attr.aria-controls]=\"slotId\">\n  <ng-content select=\"odx-rich-list-item-header\" />\n  <odx-action-group class=\"odx-rich-list-item__expand-button\">\n    <button odxButton (click)=\"toggle()\"><odx-icon class=\"odx-rich-list-item__icon\" name=\"core::chevron-down\" /></button>\n  </odx-action-group>\n</div>\n@if (expandableItem.expanded) {\n  <div\n    class=\"odx-rich-list-item__slot\"\n    animate.enter=\"odx-animate-expand\"\n    animate.leave=\"odx-animate-collapse\"\n    (animationend)=\"onAnimationEnd()\"\n    [attr.aria-labelledby]=\"titleId\"\n    [attr.id]=\"slotId\"\n  >\n    <ng-content select=\"odx-rich-list-content\" />\n  </div>\n}\n","import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation, booleanAttribute } from '@angular/core';\nimport { ExpandableContainerDirective } from '@odx/angular/cdk/expandable';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n/**\n * RichListComponent is designed to display a list with rich content in each item,\n * supporting expandable functionality. It can operate in a condensed mode to save space.\n * Has host directive ExpandableContainerDirective with an input `multiple`.\n *\n * @see {ExpandableContainerDirective}\n */\n@CSSComponent('rich-list')\n@Component({\n  selector: 'odx-rich-list',\n  templateUrl: './rich-list.component.html',\n  standalone: true,\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  encapsulation: ViewEncapsulation.None,\n  hostDirectives: [{ directive: ExpandableContainerDirective, inputs: ['multiple'] }],\n})\nexport class RichListComponent {\n  public readonly element = injectElement();\n\n  /**\n   * Determines whether the list is displayed in a condensed format.\n   * This makes the list more compact by reducing the padding and margins.\n   *\n   * @type {boolean}\n   * @default false\n   */\n  @CSSModifier()\n  @Input({ transform: booleanAttribute })\n  public condensed = false;\n}\n","<ng-content select=\"odx-rich-list-item\" />\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { RichListItemComponent, RichListItemHeaderComponent } from './components';\nimport { RichListItemContentComponent } from './components/rich-list-content/rich-list-content.component';\nimport { RichListComponent } from './rich-list.component';\n\nconst modules = [RichListComponent, RichListItemComponent, RichListItemHeaderComponent, RichListItemContentComponent];\n\n@NgModule({\n  imports: modules,\n  exports: [CoreModule, ...modules],\n})\nexport class RichListModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAIA;;;AAGG;AASI,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B,CAAA;AAAlC,IAAA,WAAA,GAAA;QACW,IAAA,CAAA,OAAO,GAAG,aAAa,EAAE;AAC1C,IAAA;+GAFY,4BAA4B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,e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