import { NumberInput, BooleanInput } from '@angular/cdk/coercion'; import * as i0 from '@angular/core'; import { InjectionToken, TemplateRef, ElementRef, QueryList, OnDestroy, ChangeDetectorRef, EventEmitter, AfterViewInit, NgZone, AfterContentInit, OnInit } from '@angular/core'; import { NxViewportService } from '@aposin/ng-aquila/utils'; import { Subject } from 'rxjs'; import { FocusMonitor } from '@angular/cdk/a11y'; import * as _angular_cdk_bidi_module_d_IN1Vp56w from '@angular/cdk/bidi-module.d-IN1Vp56w'; import { Directionality, Direction } from '@angular/cdk/bidi'; import { ScrollDispatcher } from '@angular/cdk/scrolling'; import * as i1 from '@angular/common'; import * as i2 from '@aposin/ng-aquila/icon'; import { NxButtonBase } from '@aposin/ng-aquila/button'; interface ComparisonTableDefaultOptions { /** Sets if the expandable area of a row group uses the full width of the row or leaves out the first column. (optional) */ useFullRowForExpandableArea?: boolean; } declare const COMPARISON_TABLE_DEFAULT_OPTIONS: InjectionToken; /** * The size of the window. * @docs-private */ type NxComparisonTableViewType = 'mobile' | 'tablet' | 'desktop'; /** The type of the row. */ type NxComparisonTableRowType = 'header' | 'content' | 'footer'; declare class NxComparisonTableDescriptionCell { readonly _table: NxComparisonTableBase; readonly _row: NxComparisonTableRowBase; _content: TemplateRef; _mobileCell: ElementRef; /** Sets the Id of the description cell. */ set id(value: string); get id(): string; private _id; constructor(_table: NxComparisonTableBase, _row: NxComparisonTableRowBase); _getMobileClipPathInset(): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** @docs-private */ declare abstract class NxComparisonTableRowBase { cells: QueryList; descriptionCell: NxComparisonTableDescriptionCell; popularCell?: NxComparisonTablePopularCell; abstract type: NxComparisonTableRowType; abstract mayStick: boolean; abstract _isPartOfToggleSection(): boolean; abstract _isPartOfRowGroup(): boolean; abstract _isIntersectionRow(): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class NxComparisonTablePopularCell { readonly _table: NxComparisonTableBase; readonly _row: NxComparisonTableRowBase; _content: TemplateRef; /** Sets the Id of the popular cell. */ set id(value: string); get id(): string; private _id; /** * Sets the id of the column above which the popular cell should be displayed. * * Note: counting starts from 1. If set to 1 the popular cell will appear above the first header column of the table. */ set forColumn(value: NumberInput); get forColumn(): number; private _forColumn?; constructor(_table: NxComparisonTableBase, _row: NxComparisonTableRowBase); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** @docs-private */ declare abstract class NxComparisonTableBase implements OnDestroy { private readonly viewportService; protected readonly _cdr: ChangeDetectorRef; selectedIndexChange: EventEmitter; _disabledIndexes: number[]; _hiddenIndexes: number[]; _view?: NxComparisonTableViewType | null; abstract selectedIndex: number; readonly viewTypeChange: EventEmitter; private _viewType; protected readonly _destroyed: Subject; abstract isError: boolean; /** Get all header cells of the table. */ abstract _getHeaderCells(): NxComparisonTableCell[]; /** How many product columns the table has. */ abstract _infoColumnCount(): number; /** Get the popular cell of the table. */ abstract _getPopularCell(): NxComparisonTablePopularCell; /** Add a column to the list of disabled columns. */ abstract _addDisabledColumn(disabledColumn: number): void; /** Remove a column from the list of disabled columns. */ abstract _removeDisabledColumn(enabledColumn: number): void; /** Get the mobile clipping path for a cell that should be cut when scrolling. */ abstract _getMobileClipPathInset(cellRect: DOMRect): string; /** * Bring an element into view in case it is hidden by the sticky header row on top, * optionally with some additional space above the element. */ abstract _scrollElementIntoView(element: ElementRef, additionalSpacing?: number): void; /** @docs-private */ get viewType(): NxComparisonTableViewType; readonly _viewChanges: Subject; constructor(viewportService: NxViewportService, _cdr: ChangeDetectorRef); ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class NxToggleSectionHeaderComponent implements AfterViewInit, OnDestroy { readonly _table: NxComparisonTableBase; readonly _toggleSection: NxToggleSectionBase; private readonly _focusMonitor; private readonly _ngZone; _content: TemplateRef; _mobileCell: ElementRef; _wrapperElement: ElementRef; /** Preserves the current value of the _wrapperElement ViewChild in case it changes. */ private _wrapperElementPrevious; /** Sets the id of the toggle section header. */ set id(value: string); get id(): string; private _id; private readonly _destroyed; constructor(_table: NxComparisonTableBase, _toggleSection: NxToggleSectionBase, _focusMonitor: FocusMonitor, _ngZone: NgZone, platformId: string); ngAfterViewInit(): void; ngOnDestroy(): void; private _updateFocusMonitoringTimeout; private _updateFocusMonitoring; /** Toggles the toggle section. */ toggle(): void; _onKeydown($event: KeyboardEvent): void; _getMobileClipPathInset(): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** @docs-private */ declare abstract class NxToggleSectionBase { /** Whether the toggle section is expanded. */ abstract isExpanded: boolean; toggleSectionHeader: NxToggleSectionHeaderComponent; /** @docs-private */ abstract _numberOfRows(): number; /** Toggles the toggle section. */ toggleExpanded(): void; /** @docs-private */ getOpenState(): "closed" | "open"; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class NxComparisonTableCell { readonly _table: NxComparisonTableBase; private readonly _row; private readonly _toggleSection; _content: TemplateRef; /** @docs-private */ set index(newValue: number); get index(): number; private _index; /** * Sets all cells below a header cell to be disabled (disabled column). * * **Important**: this property can be set only on header cells. */ set disabledColumn(value: BooleanInput); get disabledColumn(): boolean; private _disabledColumn; /** @docs-private */ readonly indexChange: EventEmitter; /** Sets the Id of the cell. */ set id(value: string); get id(): string; private _id; /** Sets the type of the cell. Default: 'content'. */ set type(value: NxComparisonTableRowType); get type(): NxComparisonTableRowType; private _type; get _isCellDisabled(): boolean; constructor(_table: NxComparisonTableBase, _row: NxComparisonTableRowBase, _toggleSection: NxToggleSectionBase | null); _isSelected(): boolean; _isCellHidden(): boolean; _selectCell(): void; _getHeaderIds(): string; _isFirst(): boolean; _isLast(): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** @docs-private */ declare abstract class NxComparisonTableRowGroupBase { abstract _isPartOfToggleSection(): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class NxComparisonTableIntersectionCell { readonly _table: NxComparisonTableBase; readonly _row: NxComparisonTableRowBase; readonly _toggleSection: NxToggleSectionBase | null; _content: TemplateRef; constructor(_table: NxComparisonTableBase, _row: NxComparisonTableRowBase, _toggleSection: NxToggleSectionBase | null); _getHeaderIds(): string; _getMobileRowspan(): number; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * This is a base class for `NxToggleSectionDirective` and `NxComparisonTableRowDirective`. * @docs-private */ declare class NxTableContentElement { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class NxComparisonTableRowDirective extends NxComparisonTableRowBase implements AfterContentInit, OnDestroy, NxTableContentElement { private readonly _toggleSection; private readonly _rowGroup; /** @docs-private */ cells: QueryList; /** @docs-private */ intersectionCell: NxComparisonTableIntersectionCell; /** @docs-private */ descriptionCell: NxComparisonTableDescriptionCell; /** @docs-private */ popularCell: NxComparisonTablePopularCell; readonly _requestCellClippingUpdate$: Subject; /** Sets the type of the row. Default: 'content'. */ set type(newValue: NxComparisonTableRowType); get type(): NxComparisonTableRowType; private _type; set mayStick(newValue: BooleanInput); get mayStick(): boolean; private _mayStick; private readonly _destroyed; constructor(_toggleSection: NxToggleSectionBase | null, _rowGroup: NxComparisonTableRowGroupBase | null); ngAfterContentInit(): void; ngOnDestroy(): void; _setCellIndexes(): void; _isPartOfToggleSection(): boolean; _isPartOfRowGroup(): boolean; _isIntersectionRow(): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class NxComparisonTableRowGroupDirective extends NxComparisonTableRowGroupBase implements NxTableContentElement { private readonly _toggleSection; private readonly _defaultOptions; /** @docs-private */ rows: QueryList; /** * Sets the label of the expandable area that is shown when the row group is collapsed. */ set labelCollapsed(newValue: string); get labelCollapsed(): string; private _labelCollapsed; /** Sets the label of the expandable area that is shown when the row group is expanded. */ set labelExpanded(newValue: string); get labelExpanded(): string; private _labelExpanded; /** Sets the number of rows that are visible when loading the component. Default: 5. */ set visibleRows(value: NumberInput); get visibleRows(): number; private _visibleRows; /** Sets the expanded state of the row group */ set isExpanded(value: BooleanInput); get isExpanded(): boolean; private _isExpanded; /** * **Expert Option**. * * Sets if the expandable area uses the full width of the row or leaves out the first column. * * Default: `false`. */ set useFullRowForExpandableArea(value: BooleanInput); get useFullRowForExpandableArea(): boolean; private _useFullRowForExpandableArea?; /** An event emitted every time the expanded state of the group changes */ readonly isExpandedChange: EventEmitter; constructor(_toggleSection: NxToggleSectionBase | null, _defaultOptions: ComparisonTableDefaultOptions | null); _isPartOfToggleSection(): boolean; _handleIsExpandedChange(value: boolean): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * *Component that is only used internally for displaying a `nxComparisonTableRow` *(header, content and footer rows) in desktop and tablet view. * @docs-private */ declare class NxComparisonTableFlexRow implements OnDestroy, AfterViewInit { readonly _table: NxComparisonTableBase; private readonly _elementRef; private readonly _focusMonitor; row: NxComparisonTableRowDirective; private readonly _destroyed; constructor(_table: NxComparisonTableBase, _elementRef: ElementRef, _focusMonitor: FocusMonitor); ngAfterViewInit(): void; ngOnDestroy(): void; get elementRef(): ElementRef; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class NxToggleSectionDirective extends NxToggleSectionBase implements NxTableContentElement { /** @docs-private */ toggleSectionHeader: NxToggleSectionHeaderComponent; /** @docs-private */ rows: QueryList; /** Whether the toggle section is expanded. Default: true. */ set isExpanded(value: boolean); get isExpanded(): boolean; private _isExpanded; _numberOfRows(): number; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class NxComparisonTableComponent extends NxComparisonTableBase implements OnInit, AfterViewInit, OnDestroy { private readonly _element; private readonly _dir; protected readonly _cdr: ChangeDetectorRef; private readonly scrollDispatch; private readonly _ngZone; /** @docs-private */ elements: QueryList; set isError(error: boolean); get isError(): boolean; private _isError; private readonly _scrollableArea; _headerRowElement: NxComparisonTableFlexRow; _desktopContentDiv: ElementRef; /** The top value for the clip-path of the _desktopContentDiv. */ _desktopContentClip: number; _stickyMobileCell: ElementRef; /** * The value of the right or left edge of the first column of the mobile table, * that describes the threshold for how much clip-path is needed. */ private _mobileStickyEdge?; /** Sets which info column is selected. */ set selectedIndex(value: NumberInput); get selectedIndex(): number; private _selectedIndex?; /** An event that is is dispatched each time selected index of the table has changed. */ readonly selectedIndexChange: EventEmitter; /** Sets which column is hidden. */ set hiddenIndexes(value: number[]); get hiddenIndexes(): number[]; /** Sets the layout explicitely. If not specified, a layout will be set based on the viewport. */ set view(value: NxComparisonTableViewType | null | undefined); get view(): NxComparisonTableViewType | null | undefined; constructor(_element: ElementRef, _dir: Directionality | null, viewportService: NxViewportService, _cdr: ChangeDetectorRef, scrollDispatch: ScrollDispatcher, _ngZone: NgZone); /** @docs-private */ get dir(): _angular_cdk_bidi_module_d_IN1Vp56w.a; ngOnInit(): void; ngAfterViewInit(): void; ngOnDestroy(): void; private _scrollHandler; _updateCellClipping(): void; _getMobileClipPathInset(cellRect: DOMRect): string; /** Whether the element is a row. */ _isRow(element: NxTableContentElement): element is NxComparisonTableRowDirective; /** Whether the element is a toggle section. */ _isToggleSection(element: NxTableContentElement): element is NxToggleSectionDirective; /** Whether the element is a row group. */ _isRowGroup(element: NxTableContentElement): element is NxComparisonTableRowGroupDirective; /** Whether row is the first item in a new block of rows or a section. */ _isFirstInfoOfBlock(rowIndex: number): boolean; _getHeaderCells(): NxComparisonTableCell[]; _getPopularCell(): NxComparisonTablePopularCell; _getFooterCells(): NxComparisonTableCell[]; _containsToggleSection(): boolean; _infoColumnCount(): number; _getMobileColumnCount(): number; _isMobileRowDisabled(i: number): boolean; _addDisabledColumn(disabledColumn: number): void; _removeDisabledColumn(enabledColumn: number): void; _getHeaderRow(): NxComparisonTableRowDirective; _scrollElementIntoView(element: ElementRef, additionalSpacing?: number): void; private _getScrollParent; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class NxComparisonTableSelectButton extends NxButtonBase implements OnDestroy { readonly _cell: NxComparisonTableCell; private readonly _table; /** Sets the label that is displayed when the column is selected. Default: 'Selected'. */ set selectedLabel(value: string); get selectedLabel(): string; private _selectedLabel; /** Sets the label that is displayed when the column is not selected. Default: 'Select'. */ set unselectedLabel(value: string); get unselectedLabel(): string; private _unselectedLabel; /** Sets the classNames (style, size and negative) of the unselected button. Default: 'secondary small'. */ set unselectedClassNames(value: string); get unselectedClassNames(): string; private _unselectedClassNames; /** Sets the classNames (style, size and negative) of the selected button. Default: 'primary small'. */ set selectedClassNames(value: string); get selectedClassNames(): string; private _selectedClassNames; _ariaPressed: boolean; private readonly _destroyed; constructor(_cdr: ChangeDetectorRef, _elementRef: ElementRef, _cell: NxComparisonTableCell, _table: NxComparisonTableBase, _focusMonitor: FocusMonitor); ngOnDestroy(): void; private _setClassNames; _selectCell(): void; _getButtonLabel(): string; private _setAriaPressed; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * Component that is only used internally for displaying a `nxComparisonTableRowGroup` in desktop and tablet view. * @docs-private */ declare class NxComparisonTableDesktopGroup implements AfterViewInit, OnDestroy { readonly _table: NxComparisonTableBase; private readonly _focusMonitor; private readonly _dir; private readonly _defaultOptions; group: NxComparisonTableRowGroupDirective; _expansionCell: ElementRef; /** Preserves the current value of the _expansionCell ViewChild in case it changes. */ private _expansionCellPrevious; /** Sets if the row group is expanded. Default: false. */ set isExpanded(value: BooleanInput); get isExpanded(): boolean; _expanded: boolean; /** Sets if the expansion cell uses the full row of the table or leaves out the first column. Default: false. */ set useFullRowForExpandableArea(value: BooleanInput); get useFullRowForExpandableArea(): boolean; _useFullRowForExpandableArea: boolean; readonly isExpandedChange: EventEmitter; private readonly _destroyed; constructor(_table: NxComparisonTableBase, _focusMonitor: FocusMonitor, _dir: Directionality | null, _defaultOptions: ComparisonTableDefaultOptions | null); ngAfterViewInit(): void; ngOnDestroy(): void; /** The text direction of the containing app. */ get dir(): Direction; toggleGroup(): void; _updateFocusMonitoring(): void; _onKeydown(event: KeyboardEvent): void; getOpenState(): "closed" | "open"; get _expandedAreaColspan(): number; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class NxComparisonTableModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } export { COMPARISON_TABLE_DEFAULT_OPTIONS, NxComparisonTableBase, NxComparisonTableCell, NxComparisonTableComponent, NxComparisonTableDescriptionCell, NxComparisonTableDesktopGroup, NxComparisonTableFlexRow, NxComparisonTableIntersectionCell, NxComparisonTableModule, NxComparisonTablePopularCell, NxComparisonTableRowBase, NxComparisonTableRowDirective, NxComparisonTableRowGroupDirective, NxComparisonTableSelectButton, NxTableContentElement, NxToggleSectionDirective, NxToggleSectionHeaderComponent }; export type { ComparisonTableDefaultOptions, NxComparisonTableRowType, NxComparisonTableViewType };