{"version":3,"file":"table.mjs","sources":["../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/table/sort/sort-errors.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/table/sort/sort.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/table/sort/sort-animations.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/table/sort/sort-header.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/table/sort/sort-header.html","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/table/table/cell.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/table/table/row.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/table/table/table.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/table/table/table-wrapper.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/table/table/text-column.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/table/table.module.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/table/table/table-data-source.ts"],"sourcesContent":["/** @docs-private */\nexport function getSortDuplicateSortableIdError(id: string): Error {\n  return Error(`Cannot have two SbbSortables with the same id (${id}).`);\n}\n\n/** @docs-private */\nexport function getSortHeaderNotContainedWithinSortError(): Error {\n  return Error(`SbbSortHeader must be placed within a parent element with the SbbSort directive.`);\n}\n\n/** @docs-private */\nexport function getSortHeaderMissingIdError(): Error {\n  return Error(`SbbSortHeader must be provided with a unique id.`);\n}\n\n/** @docs-private */\nexport function getSortInvalidDirectionError(direction: string): Error {\n  return Error(`${direction} is not a valid sort direction ('asc' or 'desc').`);\n}\n","import {\n  booleanAttribute,\n  Directive,\n  EventEmitter,\n  Inject,\n  InjectionToken,\n  Input,\n  OnChanges,\n  OnDestroy,\n  OnInit,\n  Optional,\n  Output,\n} from '@angular/core';\nimport { Observable, ReplaySubject, Subject } from 'rxjs';\n\nimport { SbbSortDirection } from './sort-direction';\nimport {\n  getSortDuplicateSortableIdError,\n  getSortHeaderMissingIdError,\n  getSortInvalidDirectionError,\n} from './sort-errors';\n\n/** Position of the arrow that displays when sorted. */\nexport type SbbSortHeaderArrowPosition = 'before' | 'after';\n\n/** Interface for a directive that holds sorting state consumed by `SbbSortHeader`. */\nexport interface SbbSortable {\n  /** The id of the column being sorted. */\n  id: string;\n\n  /** Starting sort direction. */\n  start: SbbSortDirection;\n\n  /** Whether to disable clearing the sorting state. */\n  disableClear: boolean;\n}\n\n/** The current sort state. */\nexport interface SbbSortState {\n  /** The id of the column being sorted. */\n  active: string;\n\n  /** The sort direction. */\n  direction: SbbSortDirection;\n}\n\n/** Default options for `sbb-sort`.  */\nexport interface SbbSortDefaultOptions {\n  /** Whether to disable clearing the sorting state. */\n  disableClear?: boolean;\n  /** Position of the arrow that displays when sorted. */\n  arrowPosition?: SbbSortHeaderArrowPosition;\n}\n\n/** Injection token to be used to override the default options for `sbb-sort`. */\nexport const SBB_SORT_DEFAULT_OPTIONS = new InjectionToken<SbbSortDefaultOptions>(\n  'SBB_SORT_DEFAULT_OPTIONS',\n);\n\n/** Container for SbbSortables to manage the sort state and provide default sort parameters. */\n@Directive({\n  selector: '[sbbSort]',\n  exportAs: 'sbbSort',\n  host: { class: 'sbb-sort' },\n})\nexport class SbbSort implements OnInit, OnChanges, OnDestroy {\n  private _initializedStream = new ReplaySubject<void>(1);\n\n  /** Collection of all registered sortables that this directive manages. */\n  sortables: Map<string, SbbSortable> = new Map<string, SbbSortable>();\n\n  /** Used to notify any child components listening to state changes. */\n  readonly _stateChanges = new Subject<void>();\n\n  /** The id of the most recently sorted SbbSortable. */\n  @Input('sbbSortActive') active!: string;\n\n  /** Whether the sort is disabled. */\n  @Input({ alias: 'sbbSortDisabled', transform: booleanAttribute }) disabled: boolean = false;\n\n  /**\n   * The direction to set when an SbbSortable is initially sorted.\n   * May be overridden by the SbbSortable's sort start.\n   */\n  @Input('sbbSortStart') start: SbbSortDirection = 'asc';\n\n  /** The sort direction of the currently active SbbSortable. */\n  @Input('sbbSortDirection')\n  get direction(): SbbSortDirection {\n    return this._direction;\n  }\n  set direction(direction: SbbSortDirection) {\n    if (\n      direction &&\n      direction !== 'asc' &&\n      direction !== 'desc' &&\n      (typeof ngDevMode === 'undefined' || ngDevMode)\n    ) {\n      throw getSortInvalidDirectionError(direction);\n    }\n    this._direction = direction;\n  }\n  private _direction: SbbSortDirection = '';\n\n  /**\n   * Whether to disable the user from clearing the sort by finishing the sort direction cycle.\n   * May be overriden by the SbbSortable's disable clear input.\n   */\n  @Input({ alias: 'sbbSortDisableClear', transform: booleanAttribute })\n  disableClear!: boolean;\n\n  /** Event emitted when the user changes either the active sort or sort direction. */\n  @Output('sbbSortChange') readonly sortChange: EventEmitter<SbbSortState> =\n    new EventEmitter<SbbSortState>();\n\n  /** Emits when the paginator is initialized. */\n  initialized: Observable<void> = this._initializedStream;\n\n  constructor(\n    @Optional()\n    @Inject(SBB_SORT_DEFAULT_OPTIONS)\n    private _defaultOptions?: SbbSortDefaultOptions,\n  ) {}\n\n  /**\n   * Register function to be used by the contained SbbSortables. Adds the SbbSortable to the\n   * collection of SbbSortables.\n   */\n  register(sortable: SbbSortable): void {\n    if (typeof ngDevMode === 'undefined' || ngDevMode) {\n      if (!sortable.id) {\n        throw getSortHeaderMissingIdError();\n      }\n\n      if (this.sortables.has(sortable.id)) {\n        throw getSortDuplicateSortableIdError(sortable.id);\n      }\n    }\n\n    this.sortables.set(sortable.id, sortable);\n  }\n\n  /**\n   * Unregister function to be used by the contained SbbSortables. Removes the SbbSortable from the\n   * collection of contained SbbSortables.\n   */\n  deregister(sortable: SbbSortable): void {\n    this.sortables.delete(sortable.id);\n  }\n\n  /** Sets the active sort id and determines the new sort direction. */\n  sort(sortable: SbbSortable): void {\n    if (this.active !== sortable.id) {\n      this.active = sortable.id;\n      this.direction = sortable.start ? sortable.start : this.start;\n    } else {\n      this.direction = this.getNextSortDirection(sortable);\n    }\n\n    this.sortChange.emit({ active: this.active, direction: this.direction });\n  }\n\n  /** Returns the next sort direction of the active sortable, checking for potential overrides. */\n  getNextSortDirection(sortable: SbbSortable): SbbSortDirection {\n    if (!sortable) {\n      return '';\n    }\n\n    // Get the sort direction cycle with the potential sortable overrides.\n    const disableClear =\n      sortable?.disableClear ?? this.disableClear ?? !!this._defaultOptions?.disableClear;\n    const sortDirectionCycle = getSortDirectionCycle(sortable.start || this.start, disableClear);\n\n    // Get and return the next direction in the cycle\n    let nextDirectionIndex = sortDirectionCycle.indexOf(this.direction) + 1;\n    if (nextDirectionIndex >= sortDirectionCycle.length) {\n      nextDirectionIndex = 0;\n    }\n    return sortDirectionCycle[nextDirectionIndex];\n  }\n\n  ngOnInit() {\n    this._initializedStream.next();\n  }\n\n  ngOnChanges() {\n    this._stateChanges.next();\n  }\n\n  ngOnDestroy() {\n    this._stateChanges.complete();\n    this._initializedStream.complete();\n  }\n}\n\n/** Returns the sort direction cycle to use given the provided parameters of order and clear. */\nfunction getSortDirectionCycle(start: SbbSortDirection, disableClear: boolean): SbbSortDirection[] {\n  const sortOrder: SbbSortDirection[] = ['asc', 'desc'];\n  if (start === 'desc') {\n    sortOrder.reverse();\n  }\n  if (!disableClear) {\n    sortOrder.push('');\n  }\n\n  return sortOrder;\n}\n","import {\n  animate,\n  animateChild,\n  AnimationTriggerMetadata,\n  keyframes,\n  query,\n  state,\n  style,\n  transition,\n  trigger,\n} from '@angular/animations';\n\nconst SORT_ANIMATION_TRANSITION = '225ms cubic-bezier(0.4,0.0,0.2,1)';\n\n/**\n * Animations used by SbbSort.\n * @docs-private\n */\nexport const sbbSortAnimations: {\n  readonly indicator: AnimationTriggerMetadata;\n  readonly arrowOpacity: AnimationTriggerMetadata;\n  readonly arrowPosition: AnimationTriggerMetadata;\n  readonly allowChildren: AnimationTriggerMetadata;\n} = {\n  /** Animation that moves the sort indicator. */\n  indicator: trigger('indicator', [\n    state('active-asc, asc', style({ transform: 'scaleY(-1)' })),\n    state('active-desc, desc', style({ transform: 'scaleY(1)' })),\n    transition('active-asc <=> active-desc', animate(SORT_ANIMATION_TRANSITION)),\n    transition('asc <=> desc', animate('0ms')),\n  ]),\n\n  /** Animation that controls the arrow opacity. */\n  arrowOpacity: trigger('arrowOpacity', [\n    state('desc-to-active, asc-to-active, active', style({ opacity: 1 })),\n    state('desc-to-hint, asc-to-hint, hint', style({ opacity: 0.54 })),\n    state(\n      'hint-to-desc, active-to-desc, desc, hint-to-asc, active-to-asc, asc, void',\n      style({ opacity: 0 }),\n    ),\n    // Transition between all states except for immediate transitions\n    transition('* => asc, * => desc, * => active, * => hint, * => void', animate('0ms')),\n    transition('* <=> *', animate(SORT_ANIMATION_TRANSITION)),\n  ]),\n\n  /**\n   * Animation for the translation of the arrow as a whole. States are separated into two\n   * groups: ones with animations and others that are immediate. Immediate states are asc, desc,\n   * peek, and active. The other states define a specific animation (source-to-destination)\n   * and are determined as a function of their prev user-perceived state and what the next state\n   * should be.\n   */\n  arrowPosition: trigger('arrowPosition', [\n    // Hidden Above => Hint Center\n    transition(\n      '* => desc-to-hint, * => desc-to-active',\n      animate(\n        SORT_ANIMATION_TRANSITION,\n        keyframes([\n          style({ transform: 'translateY(-25%)' }),\n          style({ transform: 'translateY(0)' }),\n        ]),\n      ),\n    ),\n    // Hint Center => Hidden Below\n    transition(\n      '* => hint-to-desc, * => active-to-desc',\n      animate(\n        SORT_ANIMATION_TRANSITION,\n        keyframes([style({ transform: 'translateY(0)' }), style({ transform: 'translateY(25%)' })]),\n      ),\n    ),\n    // Hidden Below => Hint Center\n    transition(\n      '* => asc-to-hint, * => asc-to-active',\n      animate(\n        SORT_ANIMATION_TRANSITION,\n        keyframes([style({ transform: 'translateY(25%)' }), style({ transform: 'translateY(0)' })]),\n      ),\n    ),\n    // Hint Center => Hidden Above\n    transition(\n      '* => hint-to-asc, * => active-to-asc',\n      animate(\n        SORT_ANIMATION_TRANSITION,\n        keyframes([\n          style({ transform: 'translateY(0)' }),\n          style({ transform: 'translateY(-25%)' }),\n        ]),\n      ),\n    ),\n    state(\n      'desc-to-hint, asc-to-hint, hint, desc-to-active, asc-to-active, active',\n      style({ transform: 'translateY(0)' }),\n    ),\n    state('hint-to-desc, active-to-desc, desc', style({ transform: 'translateY(-25%)' })),\n    state('hint-to-asc, active-to-asc, asc', style({ transform: 'translateY(25%)' })),\n  ]),\n\n  /** Necessary trigger that calls animate on children animations. */\n  allowChildren: trigger('allowChildren', [\n    transition('* <=> *', [query('@*', animateChild(), { optional: true })]),\n  ]),\n};\n","import { AriaDescriber, FocusMonitor } from '@angular/cdk/a11y';\nimport { ENTER, SPACE } from '@angular/cdk/keycodes';\nimport { CdkColumnDef } from '@angular/cdk/table';\nimport {\n  AfterViewInit,\n  booleanAttribute,\n  ChangeDetectionStrategy,\n  ChangeDetectorRef,\n  Component,\n  ElementRef,\n  inject,\n  Inject,\n  Input,\n  OnDestroy,\n  OnInit,\n  Optional,\n  ViewEncapsulation,\n} from '@angular/core';\nimport { merge, Subscription } from 'rxjs';\n\nimport {\n  SbbSort,\n  SbbSortable,\n  SbbSortDefaultOptions,\n  SbbSortHeaderArrowPosition,\n  SBB_SORT_DEFAULT_OPTIONS,\n} from './sort';\nimport { sbbSortAnimations } from './sort-animations';\nimport { SbbSortDirection } from './sort-direction';\nimport { getSortHeaderNotContainedWithinSortError } from './sort-errors';\n\n/**\n * Valid positions for the arrow to be in for its opacity and translation. If the state is a\n * sort direction, the position of the arrow will be above/below and opacity 0. If the state is\n * hint, the arrow will be in the center with a slight opacity. Active state means the arrow will\n * be fully opaque in the center.\n *\n * @docs-private\n */\nexport type SbbArrowViewState = SbbSortDirection | 'hint' | 'active';\n\n/**\n * States describing the arrow's animated position (animating fromState to toState).\n * If the fromState is not defined, there will be no animated transition to the toState.\n * @docs-private\n */\nexport interface SbbArrowViewStateTransition {\n  fromState?: SbbArrowViewState;\n  toState?: SbbArrowViewState;\n}\n\n/**\n * Applies sorting behavior (click to change sort) and styles to an element, including an\n * arrow to display the current sort direction.\n *\n * Must be provided with an id and contained within a parent SbbSort.\n *\n * If used on header cells in a CdkTable, it will automatically default its id from its containing\n * column definition.\n */\n@Component({\n  selector: '[sbb-sort-header]',\n  exportAs: 'sbbSortHeader',\n  templateUrl: 'sort-header.html',\n  styleUrls: ['sort-header.css'],\n  host: {\n    class: 'sbb-sort-header',\n    '(click)': '_handleClick()',\n    '(keydown)': '_handleKeydown($event)',\n    '(mouseenter)': '_setIndicatorHintVisible(true)',\n    '(mouseleave)': '_setIndicatorHintVisible(false)',\n    '[attr.aria-sort]': '_getAriaSortAttribute()',\n    '[class.sbb-sort-header-disabled]': '_isDisabled()',\n  },\n  encapsulation: ViewEncapsulation.None,\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  animations: [\n    sbbSortAnimations.arrowOpacity,\n    sbbSortAnimations.arrowPosition,\n    sbbSortAnimations.allowChildren,\n    sbbSortAnimations.indicator,\n  ],\n})\nexport class SbbSortHeader implements SbbSortable, OnDestroy, OnInit, AfterViewInit {\n  private _rerenderSubscription!: Subscription;\n\n  /**\n   * The element with role=\"button\" inside this component's view. We need this\n   * in order to apply a description with AriaDescriber.\n   */\n  private _sortButton!: HTMLElement;\n\n  protected _sort: SbbSort = inject(SbbSort, { optional: true })!;\n  private _columnDef = inject(CdkColumnDef, { optional: true });\n\n  /**\n   * Flag set to true when the indicator should be displayed while the sort is not active. Used to\n   * provide an affordance that the header is sortable by showing on focus and hover.\n   */\n  _showIndicatorHint: boolean = false;\n\n  /**\n   * The view transition state of the arrow (translation/ opacity) - indicates its `from` and `to`\n   * position through the animation. If animations are currently disabled, the fromState is removed\n   * so that there is no animation displayed.\n   */\n  _viewState: SbbArrowViewStateTransition = {};\n\n  /** The direction the arrow should be facing according to the current state. */\n  _arrowDirection: SbbSortDirection = '';\n\n  /** Whether the view state animation should show the transition between the `from` and `to` states. */\n  _disableViewStateAnimation: boolean = false;\n\n  /**\n   * ID of this sort header. If used within the context of a CdkColumnDef, this will default to\n   * the column's name.\n   */\n  @Input('sbb-sort-header') id!: string;\n\n  /** Sets the position of the arrow that displays when sorted. */\n  @Input() arrowPosition: SbbSortHeaderArrowPosition = 'after';\n\n  @Input({ transform: booleanAttribute }) disabled: boolean = false;\n\n  /** Overrides the sort start value of the containing SbbSort for this SbbSortable. */\n  @Input() start!: SbbSortDirection;\n\n  /**\n   * Description applied to SbbSortHeader's button element with aria-describedby. This text should\n   * describe the action that will occur when the user clicks the sort header.\n   */\n  @Input()\n  get sortActionDescription(): string {\n    return this._sortActionDescription;\n  }\n  set sortActionDescription(value: string) {\n    this._updateSortActionDescription(value);\n  }\n  // Default the action description to \"Sort\" because it's better than nothing.\n  // Without a description, the button's label comes from the sort header text content,\n  // which doesn't give any indication that it performs a sorting operation.\n  private _sortActionDescription: string = 'Sort';\n\n  /** Overrides the disable clear value of the containing MatSort for this MatSortable. */\n  @Input({ transform: booleanAttribute })\n  disableClear!: boolean;\n\n  constructor(\n    private _changeDetectorRef: ChangeDetectorRef,\n    // Also Inject MAT_SORT_HEADER_COLUMN_DEF to provide full cdkTable support\n    @Inject('MAT_SORT_HEADER_COLUMN_DEF') @Optional() private _columnDefCdk: CdkColumnDef,\n    private _focusMonitor: FocusMonitor,\n    private _elementRef: ElementRef<HTMLElement>,\n    private _ariaDescriber: AriaDescriber,\n    @Optional()\n    @Inject(SBB_SORT_DEFAULT_OPTIONS)\n    defaultOptions?: SbbSortDefaultOptions,\n  ) {\n    // Note that we use a string token for the `_columnDef`, because the value is provided both by\n    // `angular/table` and `cdk/table` and we can't have the CDK depending on SBB Angular,\n    // and we want to avoid having the sort header depending on the CDK table because\n    // of this single reference.\n    if (!this._sort && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n      throw getSortHeaderNotContainedWithinSortError();\n    }\n\n    if (defaultOptions?.arrowPosition) {\n      this.arrowPosition = defaultOptions?.arrowPosition;\n    }\n\n    this._handleStateChanges();\n  }\n\n  ngOnInit() {\n    if (!this.id && this._columnDef) {\n      this.id = this._columnDef.name;\n    } else if (!this.id && this._columnDefCdk) {\n      this.id = this._columnDefCdk.name;\n    }\n\n    // Initialize the direction of the arrow and set the view state to be immediately that state.\n    this._updateArrowDirection();\n    this._setAnimationTransitionState({\n      toState: this._isSorted() ? 'active' : this._arrowDirection,\n    });\n\n    this._sort.register(this);\n\n    this._sortButton = this._elementRef.nativeElement.querySelector('.sbb-sort-header-container')!;\n    this._updateSortActionDescription(this._sortActionDescription);\n  }\n\n  ngAfterViewInit() {\n    // We use the focus monitor because we also want to style\n    // things differently based on the focus origin.\n    this._focusMonitor.monitor(this._elementRef, true).subscribe((origin) => {\n      const newState = !!origin;\n      if (newState !== this._showIndicatorHint) {\n        this._setIndicatorHintVisible(newState);\n        this._changeDetectorRef.markForCheck();\n      }\n    });\n  }\n\n  ngOnDestroy() {\n    this._focusMonitor.stopMonitoring(this._elementRef);\n    this._sort.deregister(this);\n    this._rerenderSubscription.unsubscribe();\n  }\n\n  /**\n   * Sets the \"hint\" state such that the arrow will be semi-transparently displayed as a hint to the\n   * user showing what the active sort will become. If set to false, the arrow will fade away.\n   */\n  _setIndicatorHintVisible(visible: boolean) {\n    // No-op if the sort header is disabled - should not make the hint visible.\n    if (this._isDisabled() && visible) {\n      return;\n    }\n\n    this._showIndicatorHint = visible;\n\n    if (!this._isSorted()) {\n      this._updateArrowDirection();\n      if (this._showIndicatorHint) {\n        this._setAnimationTransitionState({ fromState: this._arrowDirection, toState: 'hint' });\n      } else {\n        this._setAnimationTransitionState({ fromState: 'hint', toState: this._arrowDirection });\n      }\n    }\n  }\n\n  /**\n   * Sets the animation transition view state for the arrow's position and opacity. If the\n   * `disableViewStateAnimation` flag is set to true, the `fromState` will be ignored so that\n   * no animation appears.\n   */\n  _setAnimationTransitionState(viewState: SbbArrowViewStateTransition) {\n    this._viewState = viewState || {};\n\n    // If the animation for arrow position state (opacity/translation) should be disabled,\n    // remove the fromState so that it jumps right to the toState.\n    if (this._disableViewStateAnimation) {\n      this._viewState = { toState: viewState.toState };\n    }\n  }\n\n  /** Triggers the sort on this sort header and removes the indicator hint. */\n  _toggleOnInteraction() {\n    this._sort.sort(this);\n\n    // Do not show the animation if the header was already shown in the right position.\n    if (this._viewState.toState === 'hint' || this._viewState.toState === 'active') {\n      this._disableViewStateAnimation = true;\n    }\n  }\n\n  _handleClick() {\n    if (!this._isDisabled()) {\n      this._sort.sort(this);\n    }\n  }\n\n  _handleKeydown(event: KeyboardEvent) {\n    if (!this._isDisabled() && (event.keyCode === SPACE || event.keyCode === ENTER)) {\n      event.preventDefault();\n      this._toggleOnInteraction();\n    }\n  }\n\n  /** Whether this SbbSortHeader is currently sorted in either ascending or descending order. */\n  _isSorted() {\n    return (\n      this._sort.active === this.id &&\n      (this._sort.direction === 'asc' || this._sort.direction === 'desc')\n    );\n  }\n\n  /** Returns the animation state for the arrow direction (indicator and pointers). */\n  _getArrowDirectionState() {\n    return `${this._isSorted() ? 'active-' : ''}${this._arrowDirection}`;\n  }\n\n  /** Returns the arrow position state (opacity, translation). */\n  _getArrowViewState() {\n    const fromState = this._viewState.fromState;\n    return (fromState ? `${fromState}-to-` : '') + this._viewState.toState;\n  }\n\n  /**\n   * Updates the direction the arrow should be pointing. If it is not sorted, the arrow should be\n   * facing the start direction. Otherwise if it is sorted, the arrow should point in the currently\n   * active sorted direction. The reason this is updated through a function is because the direction\n   * should only be changed at specific times - when deactivated but the hint is displayed and when\n   * the sort is active and the direction changes. Otherwise the arrow's direction should linger\n   * in cases such as the sort becoming deactivated but we want to animate the arrow away while\n   * preserving its direction, even though the next sort direction is actually different and should\n   * only be changed once the arrow displays again (hint or activation).\n   */\n  _updateArrowDirection() {\n    this._arrowDirection = this._isSorted() ? this._sort.direction : this.start || this._sort.start;\n  }\n\n  _isDisabled() {\n    return this._sort.disabled || this.disabled;\n  }\n\n  /**\n   * Gets the aria-sort attribute that should be applied to this sort header. If this header\n   * is not sorted, returns null so that the attribute is removed from the host element. Aria spec\n   * says that the aria-sort property should only be present on one header at a time, so removing\n   * ensures this is true.\n   */\n  _getAriaSortAttribute() {\n    if (!this._isSorted()) {\n      return 'none';\n    }\n\n    return this._sort.direction === 'asc' ? 'ascending' : 'descending';\n  }\n\n  /** Whether the arrow inside the sort header should be rendered. */\n  _renderArrow() {\n    return !this._isDisabled() || this._isSorted();\n  }\n\n  private _updateSortActionDescription(newDescription: string) {\n    // We use AriaDescriber for the sort button instead of setting an `aria-label` because some\n    // screen readers (notably VoiceOver) will read both the column header *and* the button's label\n    // for every *cell* in the table, creating a lot of unnecessary noise.\n\n    // If _sortButton is undefined, the component hasn't been initialized yet so there's\n    // nothing to update in the DOM.\n    if (this._sortButton) {\n      // removeDescription will no-op if there is no existing message.\n      this._ariaDescriber.removeDescription(this._sortButton, this._sortActionDescription);\n      this._ariaDescriber.describe(this._sortButton, newDescription);\n    }\n\n    this._sortActionDescription = newDescription;\n  }\n\n  /** Handles changes in the sorting state. */\n  private _handleStateChanges() {\n    this._rerenderSubscription = merge(this._sort.sortChange, this._sort._stateChanges).subscribe(\n      () => {\n        if (this._isSorted()) {\n          this._updateArrowDirection();\n\n          // Do not show the animation if the header was already shown in the right position.\n          if (this._viewState.toState === 'hint' || this._viewState.toState === 'active') {\n            this._disableViewStateAnimation = true;\n          }\n\n          this._setAnimationTransitionState({ fromState: this._arrowDirection, toState: 'active' });\n          this._showIndicatorHint = false;\n        }\n\n        // If this header was recently active and now no longer sorted, animate away the arrow.\n        if (!this._isSorted() && this._viewState && this._viewState.toState === 'active') {\n          this._disableViewStateAnimation = false;\n          this._setAnimationTransitionState({ fromState: 'active', toState: this._arrowDirection });\n        }\n\n        this._changeDetectorRef.markForCheck();\n      },\n    );\n  }\n}\n","<!--\nWe set the `tabindex` on an element inside the table header, rather than the header itself,\nbecause of a bug in NVDA where having a `tabindex` on a `th` breaks keyboard navigation in the\ntable (see https://github.com/nvaccess/nvda/issues/7718). This allows for the header to both\nbe focusable, and have screen readers read out its `aria-sort` state. We prefer this approach\nover having a button with an `aria-label` inside the header, because the button's `aria-label`\nwill be read out as the user is navigating the table's cell (see #13012).\n\nThe approach is based off of: https://dequeuniversity.com/library/aria/tables/sf-sortable-grid\n-->\n<div\n  class=\"sbb-sort-header-container\"\n  [class.sbb-sort-header-sorted]=\"_isSorted()\"\n  [class.sbb-sort-header-position-before]=\"arrowPosition === 'before'\"\n  [attr.tabindex]=\"_isDisabled() ? null : 0\"\n  [attr.role]=\"_isDisabled() ? null : 'button'\"\n>\n  <div class=\"sbb-sort-header-content\">\n    <ng-content></ng-content>\n  </div>\n\n  <!-- Disable animations while a current animation is running -->\n  @if (_renderArrow()) {\n    <div\n      class=\"sbb-sort-header-arrow\"\n      [@arrowOpacity]=\"_getArrowViewState()\"\n      [@arrowPosition]=\"_getArrowViewState()\"\n      [@allowChildren]=\"_getArrowDirectionState()\"\n      (@arrowPosition.start)=\"_disableViewStateAnimation = true\"\n      (@arrowPosition.done)=\"_disableViewStateAnimation = false\"\n    >\n      <!-- This is a modified version of the sbb arrow-down-small icon to support the animation -->\n      <svg\n        xmlns=\"http://www.w3.org/2000/svg\"\n        width=\"24\"\n        height=\"24\"\n        viewBox=\"0 0 24 24\"\n        preserveAspectRatio=\"xMidYMid meet\"\n        focusable=\"false\"\n      >\n        <path\n          fill=\"none\"\n          fill-rule=\"evenodd\"\n          stroke=\"currentColor\"\n          stroke-width=\"1\"\n          d=\"M11.5,5.75 L11.5,18.25\"\n        ></path>\n        <path\n          fill=\"none\"\n          fill-rule=\"evenodd\"\n          stroke=\"currentColor\"\n          stroke-width=\"1\"\n          d=\"M7.5,14.25 L11.5,18.25 L15.5,14.25\"\n          [@indicator]=\"_getArrowDirectionState()\"\n        ></path>\n      </svg>\n    </div>\n  }\n</div>\n","import { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport {\n  CdkCell,\n  CdkCellDef,\n  CdkColumnDef,\n  CdkFooterCell,\n  CdkFooterCellDef,\n  CdkHeaderCell,\n  CdkHeaderCellDef,\n} from '@angular/cdk/table';\nimport { Directive, inject, Input } from '@angular/core';\n\n/**\n * Cell definition for the sbb-table.\n * Captures the template of a column's data row cell as well as cell-specific properties.\n */\n@Directive({\n  selector: '[sbbCellDef]',\n  providers: [{ provide: CdkCellDef, useExisting: SbbCellDef }],\n})\nexport class SbbCellDef extends CdkCellDef {}\n\n/**\n * Header cell definition for the sbb-table.\n * Captures the template of a column's header cell and as well as cell-specific properties.\n */\n@Directive({\n  selector: '[sbbHeaderCellDef]',\n  providers: [{ provide: CdkHeaderCellDef, useExisting: SbbHeaderCellDef }],\n})\nexport class SbbHeaderCellDef extends CdkHeaderCellDef {}\n\n/**\n * Footer cell definition for the sbb-table.\n * Captures the template of a column's footer cell and as well as cell-specific properties.\n */\n@Directive({\n  selector: '[sbbFooterCellDef]',\n  providers: [{ provide: CdkFooterCellDef, useExisting: SbbFooterCellDef }],\n})\nexport class SbbFooterCellDef extends CdkFooterCellDef {}\n\n/**\n * Column definition for the sbb-table.\n * Defines a set of cells available for a table column.\n */\n@Directive({\n  selector: '[sbbColumnDef]',\n  providers: [{ provide: CdkColumnDef, useExisting: SbbColumnDef }],\n})\nexport class SbbColumnDef extends CdkColumnDef {\n  /** Unique name for this column. */\n  @Input('sbbColumnDef')\n  override get name(): string {\n    return this._name;\n  }\n  override set name(name: string) {\n    this._setNameInput(name);\n  }\n\n  /**\n   * Group this column with the next column.\n   * If set to true, the border to the next cell is hidden.\n   */\n  @Input()\n  get groupWithNext(): boolean {\n    return this._groupWithNext;\n  }\n  set groupWithNext(value: BooleanInput) {\n    this._groupWithNext = coerceBooleanProperty(value);\n  }\n  private _groupWithNext: boolean = false;\n\n  /**\n   * Add \"sbb-column-\" prefix in addition to \"cdk-column-\" prefix.\n   * In the future, this will only add \"sbb-column-\" and columnCssClassName\n   * will change from type string[] to string.\n   * @docs-private\n   */\n  protected override _updateColumnCssClassName() {\n    super._updateColumnCssClassName();\n    this._columnCssClassName!.push(`sbb-column-${this.cssClassFriendlyName}`);\n  }\n}\n\n/** Header cell template container that adds the right classes and role. */\n@Directive({\n  selector: 'sbb-header-cell, th[sbb-header-cell]',\n  host: {\n    class: 'sbb-header-cell',\n    role: 'columnheader',\n    '[class.sbb-table-group-with-next]': '_columnDef.groupWithNext',\n  },\n})\nexport class SbbHeaderCell extends CdkHeaderCell {\n  _columnDef: SbbColumnDef = inject(SbbColumnDef);\n}\n\n/** Footer cell template container that adds the right classes and role. */\n@Directive({\n  selector: 'sbb-footer-cell, td[sbb-footer-cell]',\n  host: {\n    class: 'sbb-footer-cell',\n    role: 'gridcell',\n    '[class.sbb-table-group-with-next]': '_columnDef.groupWithNext',\n  },\n})\nexport class SbbFooterCell extends CdkFooterCell {\n  _columnDef: SbbColumnDef = inject(SbbColumnDef);\n}\n\n/** Cell template container that adds the right classes and role. */\n@Directive({\n  selector: 'sbb-cell, td[sbb-cell]',\n  host: {\n    class: 'sbb-cell',\n    role: 'gridcell',\n    '[class.sbb-table-group-with-next]': '_columnDef.groupWithNext',\n  },\n})\nexport class SbbCell extends CdkCell {\n  _columnDef: SbbColumnDef = inject(SbbColumnDef);\n}\n","import {\n  CdkCellOutlet,\n  CdkFooterRow,\n  CdkFooterRowDef,\n  CdkHeaderRow,\n  CdkHeaderRowDef,\n  CdkRow,\n  CdkRowDef,\n} from '@angular/cdk/table';\nimport {\n  booleanAttribute,\n  ChangeDetectionStrategy,\n  Component,\n  Directive,\n  ViewEncapsulation,\n} from '@angular/core';\n\n// We can't reuse `CDK_ROW_TEMPLATE` because it's incompatible with local compilation mode.\nconst ROW_TEMPLATE = `<ng-container cdkCellOutlet></ng-container>`;\n\n/**\n * Header row definition for the sbb-table.\n * Captures the header row's template and other header properties such as the columns to display.\n */\n@Directive({\n  selector: '[sbbHeaderRowDef]',\n  providers: [{ provide: CdkHeaderRowDef, useExisting: SbbHeaderRowDef }],\n  inputs: [\n    { name: 'columns', alias: 'sbbHeaderRowDef' },\n    { name: 'sticky', alias: 'sbbHeaderRowDefSticky', transform: booleanAttribute },\n  ],\n})\nexport class SbbHeaderRowDef extends CdkHeaderRowDef {}\n\n/**\n * Footer row definition for the sbb-table.\n * Captures the footer row's template and other footer properties such as the columns to display.\n */\n@Directive({\n  selector: '[sbbFooterRowDef]',\n  providers: [{ provide: CdkFooterRowDef, useExisting: SbbFooterRowDef }],\n  inputs: [\n    { name: 'columns', alias: 'sbbFooterRowDef' },\n    { name: 'sticky', alias: 'sbbFooterRowDefSticky', transform: booleanAttribute },\n  ],\n})\nexport class SbbFooterRowDef extends CdkFooterRowDef {}\n\n/**\n * Data row definition for the sbb-table.\n * Captures the data row's template and other properties such as the columns to display and\n * a when predicate that describes when this row should be used.\n */\n@Directive({\n  selector: '[sbbRowDef]',\n  providers: [{ provide: CdkRowDef, useExisting: SbbRowDef }],\n  inputs: [\n    { name: 'columns', alias: 'sbbRowDefColumns' },\n    { name: 'when', alias: 'sbbRowDefWhen' },\n  ],\n})\nexport class SbbRowDef<T> extends CdkRowDef<T> {}\n\n/** Header template container that contains the cell outlet. Adds the right class and role. */\n@Component({\n  selector: 'sbb-header-row, tr[sbb-header-row]',\n  template: ROW_TEMPLATE,\n  host: {\n    class: 'sbb-header-row',\n    role: 'row',\n  },\n  // See note on CdkTable for explanation on why this uses the default change detection strategy.\n  // tslint:disable-next-line:validate-decorators\n  changeDetection: ChangeDetectionStrategy.Default,\n  encapsulation: ViewEncapsulation.None,\n  exportAs: 'sbbHeaderRow',\n  providers: [{ provide: CdkHeaderRow, useExisting: SbbHeaderRow }],\n  imports: [CdkCellOutlet],\n})\nexport class SbbHeaderRow extends CdkHeaderRow {}\n\n/** Footer template container that contains the cell outlet. Adds the right class and role. */\n@Component({\n  selector: 'sbb-footer-row, tr[sbb-footer-row]',\n  template: ROW_TEMPLATE,\n  host: {\n    class: 'sbb-footer-row',\n    role: 'row',\n  },\n  // See note on CdkTable for explanation on why this uses the default change detection strategy.\n  // tslint:disable-next-line:validate-decorators\n  changeDetection: ChangeDetectionStrategy.Default,\n  encapsulation: ViewEncapsulation.None,\n  exportAs: 'sbbFooterRow',\n  providers: [{ provide: CdkFooterRow, useExisting: SbbFooterRow }],\n  imports: [CdkCellOutlet],\n})\nexport class SbbFooterRow extends CdkFooterRow {}\n\n/** Data row template container that contains the cell outlet. Adds the right class and role. */\n@Component({\n  selector: 'sbb-row, tr[sbb-row]',\n  template: ROW_TEMPLATE,\n  host: {\n    class: 'sbb-row',\n    role: 'row',\n  },\n  // See note on CdkTable for explanation on why this uses the default change detection strategy.\n  // tslint:disable-next-line:validate-decorators\n  changeDetection: ChangeDetectionStrategy.Default,\n  encapsulation: ViewEncapsulation.None,\n  exportAs: 'sbbRow',\n  providers: [{ provide: CdkRow, useExisting: SbbRow }],\n  imports: [CdkCellOutlet],\n})\nexport class SbbRow extends CdkRow {}\n","import { ViewportRuler } from '@angular/cdk/scrolling';\nimport {\n  CdkTable,\n  CDK_TABLE,\n  DataRowOutlet,\n  FooterRowOutlet,\n  HeaderRowOutlet,\n  NoDataRowOutlet,\n  STICKY_POSITIONING_LISTENER,\n} from '@angular/cdk/table';\nimport {\n  afterNextRender,\n  ChangeDetectionStrategy,\n  Component,\n  Directive,\n  inject,\n  Injector,\n  OnDestroy,\n  OnInit,\n  ViewEncapsulation,\n} from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\n\n/**\n * Enables the recycle view repeater strategy, which reduces rendering latency. Not compatible with\n * tables that animate rows.\n *\n * @deprecated This directive is a no-op and will be removed.\n * @breaking-change 23.0.0\n */\n@Directive({\n  selector: 'sbb-table[recycleRows], table[sbb-table][recycleRows]',\n})\nexport class SbbRecycleRows {}\n\n/**\n * Wrapper for the CdkTable with Sbb design styles.\n */\n@Component({\n  selector: 'sbb-table, table[sbb-table]',\n  exportAs: 'sbbTable',\n  // Note that according to MDN, the `caption` element has to be projected as the **first**\n  // element in the table. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/caption\n  // We can't reuse `CDK_TABLE_TEMPLATE` because it's incompatible with local compilation mode.\n  template: `\n    <ng-content select=\"caption\" />\n    <ng-content select=\"colgroup, col\" />\n    <!--\n        Unprojected content throws a hydration error so we need this to capture it.\n        It gets removed on the client so it doesn't affect the layout.\n      -->\n    @if (_isServer) {\n      <ng-content />\n    }\n    @if (_isNativeHtmlTable) {\n      <thead role=\"rowgroup\">\n        <ng-container headerRowOutlet />\n      </thead>\n      <tbody role=\"rowgroup\">\n        <ng-container rowOutlet />\n        <ng-container noDataRowOutlet />\n      </tbody>\n      <tfoot role=\"rowgroup\">\n        <ng-container footerRowOutlet />\n      </tfoot>\n    } @else {\n      <ng-container headerRowOutlet />\n      <ng-container rowOutlet />\n      <ng-container noDataRowOutlet />\n      <ng-container footerRowOutlet />\n    }\n  `,\n  host: {\n    class: 'sbb-table',\n    '[class.sbb-table-fixed-layout]': 'fixedLayout',\n  },\n  providers: [\n    { provide: CdkTable, useExisting: SbbTable },\n    { provide: CDK_TABLE, useExisting: SbbTable },\n    // Prevent nested tables from seeing this table's StickyPositioningListener.\n    { provide: STICKY_POSITIONING_LISTENER, useValue: null },\n  ],\n  encapsulation: ViewEncapsulation.None,\n  // See note on CdkTable for explanation on why this uses the default change detection strategy.\n  // tslint:disable-next-line:validate-decorators\n  changeDetection: ChangeDetectionStrategy.Default,\n  imports: [HeaderRowOutlet, DataRowOutlet, NoDataRowOutlet, FooterRowOutlet],\n})\nexport class SbbTable<T> extends CdkTable<T> implements OnInit, OnDestroy {\n  /** Overrides the sticky CSS class set by the `CdkTable`. */\n  protected override stickyCssClass: string = 'sbb-table-sticky';\n\n  /** Overrides the need to add position: sticky on every sticky cell element in `CdkTable`. */\n  protected override needsPositionStickyOnElement: boolean = false;\n\n  private _destroyed = new Subject<void>();\n\n  private injector = inject(Injector);\n  private _viewportRulerSbb = inject(ViewportRuler);\n\n  override ngOnInit() {\n    super.ngOnInit();\n    // If more than one column is sticky, the left offset is calculated at a wrong\n    // time by cdk and sticky columns can get overlapped.\n    // This workaround calculates sticky styles whenever the viewport has changed\n    // using a Promise.resolve() to postpone data calculation to the time the content is already placed in DOM.\n    // See also https://github.com/angular/components/issues/15885.\n    afterNextRender(\n      () => {\n        this._viewportRulerSbb\n          .change(150)\n          .pipe(takeUntil(this._destroyed))\n          .subscribe(() => {\n            Promise.resolve().then(() => {\n              this.updateStickyColumnStyles();\n            });\n          });\n      },\n      { injector: this.injector },\n    );\n  }\n\n  override ngOnDestroy() {\n    super.ngOnDestroy();\n    this._destroyed.next();\n    this._destroyed.complete();\n  }\n}\n","import { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { normalizePassiveListenerOptions } from '@angular/cdk/platform';\nimport { ViewportRuler } from '@angular/cdk/scrolling';\nimport { AfterViewInit, Directive, ElementRef, Input, NgZone, OnDestroy } from '@angular/core';\nimport { fromEvent, merge, Subject } from 'rxjs';\nimport { distinctUntilChanged, map, startWith, takeUntil } from 'rxjs/operators';\n\n/** Config used to bind passive event listeners */\nconst passiveEventListenerOptions = normalizePassiveListenerOptions({\n  passive: true,\n}) as EventListenerOptions;\n\n/**\n * The scroll state of the table. 'none' implies no scrollbar, 'both' indicates\n * the scrollbar is in the middle of the scroll width and 'left' and 'right' means\n * that there is an offset at either the left or right end of the scroll container.\n */\nexport type SbbTableWrapperScrollOffset = 'none' | 'both' | 'left' | 'right';\n\n@Directive({\n  selector: 'sbb-table-wrapper',\n  host: {\n    class: 'sbb-table-wrapper sbb-scrollbar',\n    '[attr.tabindex]': 'focusable ? 0 : null',\n    role: 'section',\n  },\n})\nexport class SbbTableWrapper implements AfterViewInit, OnDestroy {\n  private _destroyed = new Subject<void>();\n\n  /** Whether the table wrapper is focusable. */\n  @Input()\n  get focusable(): boolean {\n    return this._focusable;\n  }\n  set focusable(value: BooleanInput) {\n    this._focusable = coerceBooleanProperty(value);\n  }\n  private _focusable: boolean = true;\n\n  constructor(\n    private _elementRef: ElementRef<HTMLElement>,\n    private _ngZone: NgZone,\n    private _viewportRuler: ViewportRuler,\n  ) {}\n\n  ngAfterViewInit(): void {\n    const resize = this._viewportRuler.change(150);\n\n    this._ngZone.runOutsideAngular(() => {\n      merge(\n        fromEvent(this._elementRef.nativeElement, 'scroll', passiveEventListenerOptions),\n        resize,\n      )\n        .pipe(\n          startWith(null! as any),\n          map(() => this._calculateScrollOffset()),\n          distinctUntilChanged(),\n          takeUntil(this._destroyed),\n        )\n        .subscribe((state) => {\n          this._elementRef.nativeElement.classList.remove(\n            `sbb-table-wrapper-offset-none`,\n            `sbb-table-wrapper-offset-left`,\n            `sbb-table-wrapper-offset-right`,\n            `sbb-table-wrapper-offset-both`,\n          );\n          this._elementRef.nativeElement.classList.add(`sbb-table-wrapper-offset-${state}`);\n        });\n    });\n  }\n\n  /**\n   * Calculate whether the scroll offset is none, left, right or on both sides.\n   */\n  private _calculateScrollOffset(): SbbTableWrapperScrollOffset {\n    const element = this._elementRef.nativeElement;\n    if (element.scrollWidth === element.offsetWidth) {\n      return 'none';\n    }\n    const isAtStart = element.scrollLeft === 0;\n    // In some cases the combined value of scrollLeft and offsetWidth is off by\n    // 1 pixel from the scrollWidth.\n    const isAtEnd = element.scrollWidth - element.scrollLeft - element.offsetWidth <= 1;\n\n    if (isAtStart) {\n      return isAtEnd ? 'none' : 'right';\n    }\n    return isAtEnd ? 'left' : 'both';\n  }\n\n  ngOnDestroy(): void {\n    this._destroyed.next();\n    this._destroyed.complete();\n  }\n}\n","import { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { CdkTextColumn } from '@angular/cdk/table';\nimport {\n  ChangeDetectionStrategy,\n  Component,\n  Input,\n  OnInit,\n  ViewEncapsulation,\n} from '@angular/core';\n\nimport { SbbCell, SbbCellDef, SbbColumnDef, SbbHeaderCell, SbbHeaderCellDef } from './cell';\n\n/**\n * Column that simply shows text content for the header and row cells. Assumes that the table\n * is using the native table implementation (`<table>`).\n *\n * By default, the name of this column will be the header text and data property accessor.\n * The header text can be overridden with the `headerText` input. Cell values can be overridden with\n * the `dataAccessor` input. Change the text justification to the start or end using the `justify`\n * input.\n */\n@Component({\n  selector: 'sbb-text-column',\n  template: `\n    <ng-container sbbColumnDef>\n      <th sbb-header-cell *sbbHeaderCellDef [style.text-align]=\"justify\">\n        {{ headerText }}\n      </th>\n      <td sbb-cell *sbbCellDef=\"let data\" [style.text-align]=\"justify\">\n        {{ dataAccessor(data, name) }}\n      </td>\n    </ng-container>\n  `,\n  encapsulation: ViewEncapsulation.None,\n  // Change detection is intentionally not set to OnPush. This component's template will be provided\n  // to the table to be inserted into its view. This is problematic when change detection runs since\n  // the bindings in this template will be evaluated _after_ the table's view is evaluated, which\n  // mean's the template in the table's view will not have the updated value (and in fact will cause\n  // an ExpressionChangedAfterItHasBeenCheckedError).\n  // tslint:disable-next-line:validate-decorators\n  changeDetection: ChangeDetectionStrategy.Default,\n  imports: [SbbColumnDef, SbbHeaderCellDef, SbbHeaderCell, SbbCellDef, SbbCell],\n})\nexport class SbbTextColumn<T> extends CdkTextColumn<T> implements OnInit {\n  /**\n   * Group this column with the next column.\n   * If set to true, the border to the next cell is hidden.\n   */\n  @Input()\n  get groupWithNext(): boolean {\n    return this._groupWithNext;\n  }\n  set groupWithNext(value: BooleanInput) {\n    this._groupWithNext = coerceBooleanProperty(value);\n\n    // With Ivy, inputs can be initialized before static query results are\n    // available. In that case, we defer the synchronization until \"ngOnInit\" fires.\n    this._syncColumnDefGroupWithNext();\n  }\n  private _groupWithNext: boolean = false;\n\n  override ngOnInit() {\n    super.ngOnInit();\n    this._syncColumnDefGroupWithNext();\n  }\n\n  /** Synchronizes the column definition groupWithNext with the text column groupWithNext. */\n  private _syncColumnDefGroupWithNext() {\n    if (this.columnDef) {\n      (this.columnDef as SbbColumnDef).groupWithNext = this._groupWithNext;\n    }\n  }\n}\n","import { CdkTableModule } from '@angular/cdk/table';\nimport { NgModule } from '@angular/core';\nimport { SbbCommonModule } from '@sbb-esta/angular/core';\n\nimport { SbbSort } from './sort/sort';\nimport { SbbSortHeader } from './sort/sort-header';\nimport {\n  SbbCell,\n  SbbCellDef,\n  SbbColumnDef,\n  SbbFooterCell,\n  SbbFooterCellDef,\n  SbbHeaderCell,\n  SbbHeaderCellDef,\n} from './table/cell';\nimport {\n  SbbFooterRow,\n  SbbFooterRowDef,\n  SbbHeaderRow,\n  SbbHeaderRowDef,\n  SbbRow,\n  SbbRowDef,\n} from './table/row';\nimport { SbbRecycleRows, SbbTable } from './table/table';\nimport { SbbTableWrapper } from './table/table-wrapper';\nimport { SbbTextColumn } from './table/text-column';\n\nconst EXPORTED_DECLARATIONS = [\n  // Table\n  SbbTable,\n  SbbRecycleRows,\n  SbbTableWrapper,\n\n  // Template defs\n  SbbHeaderCellDef,\n  SbbHeaderRowDef,\n  SbbColumnDef,\n  SbbCellDef,\n  SbbRowDef,\n  SbbFooterCellDef,\n  SbbFooterRowDef,\n\n  // Cell directives\n  SbbHeaderCell,\n  SbbCell,\n  SbbFooterCell,\n\n  // Row directives\n  SbbHeaderRow,\n  SbbRow,\n  SbbFooterRow,\n\n  SbbTextColumn,\n\n  // Sort\n  SbbSort,\n  SbbSortHeader,\n];\n\n@NgModule({\n  imports: [CdkTableModule, SbbCommonModule, ...EXPORTED_DECLARATIONS],\n  exports: EXPORTED_DECLARATIONS,\n})\nexport class SbbTableModule {}\n","import { _isNumberValue } from '@angular/cdk/coercion';\nimport { DataSource } from '@angular/cdk/table';\nimport { SbbPageEvent, SbbPaginator } from '@sbb-esta/angular/pagination';\nimport {\n  BehaviorSubject,\n  combineLatest,\n  merge,\n  Observable,\n  of as observableOf,\n  Subject,\n  Subscription,\n} from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { SbbSort, SbbSortState } from '../sort/sort';\n\n/**\n * Interface that matches the required API parts of the SbbPaginator.\n */\nexport interface SbbTableDataSourcePaginator {\n  page: Subject<SbbPageEvent>;\n  pageIndex: number;\n  initialized: Observable<void>;\n  pageSize: number;\n  length: number;\n}\n\n/**\n * Corresponds to `Number.MAX_SAFE_INTEGER`. Moved out into a variable here due to\n * flaky browser support and the value not being defined in Closure's typings.\n */\nconst MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * TableFilter can be extended to define columns (keys) to filter for in a DataSource.\n * The '_' property is used for a global filter. If an array is used, entries will be combined with the or-operator.\n */\nexport interface SbbTableFilter {\n  /** Global filter: filtering all entries */\n  _?: string | number | string[] | number[] | null;\n\n  [key: string]: string | number | string[] | number[] | null | undefined;\n}\n\n/** Base class for SbbTableDataSource. */\n// tslint:disable-next-line:class-name naming-convention\nexport class _SbbTableDataSource<\n  T,\n  TFilter extends SbbTableFilter | string = string,\n  P extends SbbTableDataSourcePaginator = SbbTableDataSourcePaginator,\n> extends DataSource<T> {\n  /** Stream that emits when a new data array is set on the data source. */\n  private readonly _data: BehaviorSubject<T[]>;\n\n  /** Stream emitting render data to the table (depends on ordered data changes). */\n  private readonly _renderData = new BehaviorSubject<T[]>([]);\n\n  /** Stream that emits when a new filter string is set on the data source. */\n  private readonly _filter = new BehaviorSubject<TFilter>(null!);\n\n  /** Used to react to internal changes of the paginator that are made by the data source itself. */\n  private readonly _internalPageChanges = new Subject<void>();\n\n  /**\n   * Subscription to the changes that should trigger an update to the table's rendered rows, such\n   * as filtering, sorting, pagination, or base data changes.\n   */\n  _renderChangesSubscription: Subscription | null = null;\n\n  /**\n   * The filtered set of data that has been matched by the filter string, or all the data if there\n   * is no filter. Useful for knowing the set of data the table represents.\n   * For example, a 'selectAll()' function would likely want to select the set of filtered data\n   * shown to the user rather than all the data.\n   */\n  filteredData!: T[];\n\n  /** Array of data that should be rendered by the table, where each object represents one row. */\n  get data(): T[] {\n    return this._data.value;\n  }\n  set data(data: T[]) {\n    data = Array.isArray(data) ? data : [];\n    this._data.next(data);\n    // Normally the `filteredData` is updated by the re-render\n    // subscription, but that won't happen if it's inactive.\n    if (!this._renderChangesSubscription) {\n      this._filterData(data);\n    }\n  }\n\n  /**\n   * Filter term that should be used to filter out objects from the data array. To override how\n   * data objects match to this filter string, provide a custom function for filterPredicate.\n   */\n  get filter(): TFilter {\n    return this._filter.value;\n  }\n  set filter(filter: TFilter) {\n    this._filter.next(filter);\n    // Normally the `filteredData` is updated by the re-render\n    // subscription, but that won't happen if it's inactive.\n    if (!this._renderChangesSubscription) {\n      this._filterData(this.data);\n    }\n  }\n\n  /**\n   * Instance of the SbbSort directive used by the table to control its sorting. Sort changes\n   * emitted by the SbbSort will trigger an update to the table's rendered data.\n   */\n  get sort(): SbbSort | null {\n    return this._sort;\n  }\n  set sort(sort: SbbSort | null) {\n    this._sort = sort;\n    this._updateChangeSubscription();\n  }\n  private _sort: SbbSort | null = null;\n\n  /**\n   * Instance of the SbbPaginator component used by the table to control what page of the data is\n   * displayed. Page changes emitted by the SbbPaginator will trigger an update to the\n   * table's rendered data.\n   *\n   * Note that the data source uses the paginator's properties to calculate which page of data\n   * should be displayed. If the paginator receives its properties as template inputs,\n   * e.g. `[pageLength]=100` or `[pageIndex]=1`, then be sure that the paginator's view has been\n   * initialized before assigning it to this data source.\n   */\n  get paginator(): P | null {\n    return this._paginator;\n  }\n  set paginator(paginator: P | null) {\n    this._paginator = paginator;\n    this._updateChangeSubscription();\n  }\n  private _paginator: P | null = null;\n\n  /**\n   * Data accessor function that is used for accessing data properties for sorting through\n   * the default sortData function.\n   * This default function assumes that the sort header IDs (which defaults to the column name)\n   * matches the data's properties (e.g. column Xyz represents data['Xyz']).\n   * May be set to a custom function for different behavior.\n   * @param data Data object that is being accessed.\n   * @param sortHeaderId The name of the column that represents the data.\n   */\n  sortingDataAccessor: (data: T, sortHeaderId: string) => string | number = (\n    data: T,\n    sortHeaderId: string,\n  ): string | number => {\n    const value = (data as unknown as Record<string, any>)[sortHeaderId];\n\n    if (_isNumberValue(value)) {\n      const numberValue = Number(value);\n\n      // Numbers beyond `MAX_SAFE_INTEGER` can't be compared reliably so we\n      // leave them as strings. For more info: https://goo.gl/y5vbSg\n      return numberValue < MAX_SAFE_INTEGER ? numberValue : value;\n    }\n\n    return value;\n  };\n\n  /**\n   * Gets a sorted copy of the data array based on the state of the SbbSort. Called\n   * after changes are made to the filtered data or when sort changes are emitted from SbbSort.\n   * By default, the function retrieves the active sort and its direction and compares data\n   * by retrieving data using the sortingDataAccessor. May be overridden for a custom implementation\n   * of data ordering.\n   * @param data The array of data that should be sorted.\n   * @param sort The connected SbbSort that holds the current sort state.\n   */\n  sortData: (data: T[], sort: SbbSort) => T[] = (data: T[], sort: SbbSort): T[] => {\n    const active = sort.active;\n    const direction = sort.direction;\n    if (!active || direction === '') {\n      return data;\n    }\n\n    return data.sort((a, b) => {\n      let valueA = this.sortingDataAccessor(a, active);\n      let valueB = this.sortingDataAccessor(b, active);\n\n      // If there are data in the column that can be converted to a number,\n      // it must be ensured that the rest of the data\n      // is of the same type so as not to order incorrectly.\n      const valueAType = typeof valueA;\n      const valueBType = typeof valueB;\n\n      if (valueAType !== valueBType) {\n        if (valueAType === 'number') {\n          valueA += '';\n        }\n        if (valueBType === 'number') {\n          valueB += '';\n        }\n      }\n\n      // If both valueA and valueB exist (truthy), then compare the two. Otherwise, check if\n      // one value exists while the other doesn't. In this case, existing value should come last.\n      // This avoids inconsistent results when comparing values to undefined/null.\n      // If neither value exists, return 0 (equal).\n      let comparatorResult = 0;\n      if (valueA != null && valueB != null) {\n        // Check if one value is greater than the other; if equal, comparatorResult should remain 0.\n        if (valueA > valueB) {\n          comparatorResult = 1;\n        } else if (valueA < valueB) {\n          comparatorResult = -1;\n        }\n      } else if (valueA != null) {\n        comparatorResult = 1;\n      } else if (valueB != null) {\n        comparatorResult = -1;\n      }\n\n      return comparatorResult * (direction === 'asc' ? 1 : -1);\n    });\n  };\n\n  /**\n   * This method can be called by two filter types: string or an Object which extends TableFilter.\n   *\n   *  # String variant\n   * Checks if a data object matches the data source's filter string. By default, each data object\n   * is converted to a string of its properties and returns true if the filter has\n   * at least one occurrence in that string.\n   *\n   * # TableFilter variant\n   * Checks if a data object matches the data source's filter object. If several columns are defined,\n   * the and-operator is applied. If a column filter is a list, the or-operator inside the list is applied.\n   * The '_' property of the TableFilter can be used to search globally in all columns\n   * (like the string variant above).\n   *\n   * By default, the filter string has its whitespace trimmed and the match is case-insensitive.\n   * May be overridden for a custom implementation of filter matching.\n   * @param data Data object used to check against the filter.\n   * @param filter Filter string or Object which extends TableFilter that has been set on the data source.\n   * @returns Whether the filter matches against the data\n   */\n  filterPredicate: (data: T, filter: TFilter) => boolean = (data: T, filter: TFilter): boolean => {\n    const tableData = data as unknown as Record<string, any>;\n\n    if (typeof filter === 'string') {\n      return this._filterGlobally([filter.trim()], tableData);\n    }\n\n    const { _: globalFilter, ...propertyFilters } = this._normalizeTableFilter(\n      filter as SbbTableFilter,\n    );\n\n    return (\n      this._filterGlobally(globalFilter, tableData) &&\n      this._filterProperties(propertyFilters, tableData)\n    );\n  };\n\n  constructor(initialData: T[] = []) {\n    super();\n    this._data = new BehaviorSubject<T[]>(initialData);\n    this._updateChangeSubscription();\n  }\n\n  /**\n   * Subscribe to changes that should trigger an update to the table's rendered rows. When the\n   * changes occur, process the current state of the filter, sort, and pagination along with\n   * the provided base data and send it to the table for rendering.\n   */\n  _updateChangeSubscription() {\n    // Sorting and/or pagination should be watched if SbbSort and/or SbbPaginator are provided.\n    // The events should emit whenever the component emits a change or initializes, or if no\n    // component is provided, a stream with just a null event should be provided.\n    // The `sortChange` and `pageChange` acts as a signal to the combineLatests below so that the\n    // pipeline can progress to the next step. Note that the value from these streams are not used,\n    // they purely act as a signal to progress in the pipeline.\n    const sortChange: Observable<SbbSortState | null | void> = this._sort\n      ? (merge(this._sort.sortChange, this._sort.initialized) as Observable<SbbSortState | void>)\n      : observableOf(null);\n    const pageChange: Observable<SbbPageEvent | null | void> = this._paginator\n      ? (merge(\n          this._paginator.page,\n          this._internalPageChanges,\n          this._paginator.initialized,\n        ) as Observable<SbbPageEvent | void>)\n      : observableOf(null);\n    const dataStream = this._data;\n    // Watch for base data or filter changes to provide a filtered set of data.\n    const filteredData = combineLatest([dataStream, this._filter]).pipe(\n      map(([data]) => this._filterData(data)),\n    );\n    // Watch for filtered data or sort changes to provide an ordered set of data.\n    const orderedData = combineLatest([filteredData, sortChange]).pipe(\n      map(([data]) => this._orderData(data)),\n    );\n    // Watch for ordered data or page changes to provide a paged set of data.\n    const paginatedData = combineLatest([orderedData, pageChange]).pipe(\n      map(([data]) => this._pageData(data)),\n    );\n    // Watched for paged data changes and send the result to the table to render.\n    this._renderChangesSubscription?.unsubscribe();\n    this._renderChangesSubscription = paginatedData.subscribe((data) =>\n      this._renderData.next(data),\n    );\n  }\n\n  /**\n   * Returns a filtered data array where each filter object contains the filter string within\n   * the result of the filterTermAccessor function. If no filter is set, returns the data array\n   * as provided.\n   */\n  _filterData(data: T[]) {\n    // If there is a filter string, filter out data that does not contain it.\n    // Each data object is converted to a string using the function defined by filterTermAccessor.\n    // May be overridden for customization.\n    this.filteredData =\n      this.filter == null || this.filter === ''\n        ? data\n        : data.filter((obj) => this.filterPredicate(obj, this.filter));\n\n    if (this.paginator) {\n      this._updatePaginator(this.filteredData.length);\n    }\n\n    return this.filteredData;\n  }\n\n  /**\n   * Returns a sorted copy of the data if SbbSort has a sort applied, otherwise just returns the\n   * data array as provided. Uses the default data accessor for data lookup, unless a\n   * sortDataAccessor function is defined.\n   */\n  _orderData(data: T[]): T[] {\n    // If there is no active sort or direction, return the data without trying to sort.\n    if (!this.sort) {\n      return data;\n    }\n\n    return this.sortData(data.slice(), this.sort);\n  }\n\n  /**\n   * Returns a paged slice of the provided data array according to the provided SbbPaginator's page\n   * index and length. If there is no paginator provided, returns the data array as provided.\n   */\n  _pageData(data: T[]): T[] {\n    if (!this.paginator) {\n      return data;\n    }\n\n    const startIndex = this.paginator.pageIndex * this.paginator.pageSize;\n    return data.slice(startIndex, startIndex + this.paginator.pageSize);\n  }\n\n  /**\n   * Updates the paginator to reflect the length of the filtered data, and makes sure that the page\n   * index does not exceed the paginator's last page. Values are changed in a resolved promise to\n   * guard against making property changes within a round of change detection.\n   */\n  _updatePaginator(filteredDataLength: number) {\n    Promise.resolve().then(() => {\n      const paginator = this.paginator;\n\n      if (!paginator) {\n        return;\n      }\n\n      paginator.length = filteredDataLength;\n\n      // If the page index is set beyond the page, reduce it to the last page.\n      if (paginator.pageIndex > 0) {\n        const lastPageIndex = Math.ceil(paginator.length / paginator.pageSize) - 1 || 0;\n        const newPageIndex = Math.min(paginator.pageIndex, lastPageIndex);\n\n        if (newPageIndex !== paginator.pageIndex) {\n          paginator.pageIndex = newPageIndex;\n\n          // Since the paginator only emits after user-generated changes,\n          // we need our own stream so we know to should re-render the data.\n          this._internalPageChanges.next();\n        }\n      }\n    });\n  }\n\n  /**\n   * Used by the SbbTable. Called when it connects to the data source.\n   * @docs-private\n   */\n  connect() {\n    if (!this._renderChangesSubscription) {\n      this._updateChangeSubscription();\n    }\n\n    return this._renderData;\n  }\n\n  /**\n   * Used by the SbbTable. Called when it disconnects from the data source.\n   * @docs-private\n   */\n  disconnect() {\n    this._renderChangesSubscription?.unsubscribe();\n    this._renderChangesSubscription = null;\n  }\n\n  /** Converts a TableFilter object to a key value object of strings. */\n  _normalizeTableFilter(tableFilter: SbbTableFilter): { [key: string]: string[] } {\n    const normalizedTableFilter: { [key: string]: string[] } = { _: [] };\n    Object.keys(tableFilter).forEach((key) => {\n      if (\n        typeof tableFilter[key] === 'undefined' ||\n        `${tableFilter[key]}`.trim() === '' ||\n        tableFilter[key] === null\n      ) {\n        return;\n      }\n\n      if (typeof tableFilter[key] === 'string' || typeof tableFilter[key] === 'number') {\n        normalizedTableFilter[key] = [`${tableFilter[key]}`.trim()];\n        return;\n      }\n\n      const entry = tableFilter[key];\n      if (Array.isArray(entry) && entry.length > 0) {\n        normalizedTableFilter[key] = (entry as []).map((value) => `${value}`.trim());\n      }\n    });\n    return normalizedTableFilter;\n  }\n\n  /** Filters properties against tableData and returns true if matching data was found. */\n  _filterProperties(\n    propertyFilters: { [key: string]: string[] },\n    tableData: { [p: string]: any },\n  ): boolean {\n    return Object.keys(propertyFilters).every((key) =>\n      propertyFilters[key].some(\n        (value) =>\n          typeof tableData[key] !== 'undefined' &&\n          tableData[key] !== null &&\n          this._matchesStringCaseInsensitive(`${tableData[key]}`, value),\n      ),\n    );\n  }\n\n  /** Filters a list of strings against tableData and returns true if matching data was found. */\n  _filterGlobally(filters: string[], tableData: { [key: string]: any }): boolean {\n    return (\n      filters.length === 0 ||\n      filters.some((value) =>\n        this._matchesStringCaseInsensitive(this._reduceObjectToString(tableData), value),\n      )\n    );\n  }\n\n  /** Checks if search string is in data (case insensitive). */\n  _matchesStringCaseInsensitive(data: string, search: string): boolean {\n    return data.toUpperCase().indexOf(search.toUpperCase()) !== -1;\n  }\n\n  /** Reduces an object to a string. */\n  _reduceObjectToString(data: Object): string {\n    return Object.keys(data).reduce((currentTerm: string, key: string) => {\n      // Use an obscure Unicode character to delimit the words in the concatenated string.\n      // This avoids matches where the values of two columns combined will match the user's query\n      // (e.g. `Flute` and `Stop` will match `Test`). The character is intended to be something\n      // that has a very low chance of being typed in by somebody in a text field. This one in\n      // particular is \"White up-pointing triangle with dot\" from\n      // https://en.wikipedia.org/wiki/List_of_Unicode_characters\n      return currentTerm + (data as { [key: string]: any })[key] + '◬';\n    }, '');\n  }\n}\n\n/**\n * Data source that accepts a client-side data array and includes native support of filtering,\n * sorting (using Sort), and pagination (using Paginator).\n *\n * Allows for sort customization by overriding sortingDataAccessor, which defines how data\n * properties are accessed. Also allows for filter customization by overriding filterTermAccessor,\n * which defines how row data is converted to a string for filter matching.\n */\nexport class SbbTableDataSource<\n  T,\n  TFilter extends SbbTableFilter | string = string,\n> extends _SbbTableDataSource<T, TFilter, SbbPaginator> {}\n"],"names":["i1","observableOf"],"mappings":";;;;;;;;;;;;;;;AACM,SAAU,+BAA+B,CAAC,EAAU,EAAA;AACxD,EAAA,OAAO,KAAK,CAAC,CAAA,+CAAA,EAAkD,EAAE,IAAI,CAAC;AACxE;SAGgB,wCAAwC,GAAA;EACtD,OAAO,KAAK,CAAC,CAAA,gFAAA,CAAkF,CAAC;AAClG;SAGgB,2BAA2B,GAAA;EACzC,OAAO,KAAK,CAAC,CAAA,gD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