UNPKG

@ux-aspects/ux-aspects

Version:

Open source user interface framework for building modern, responsive, mobile big data applications

63 lines (62 loc) 3.48 kB
import { CdkDragEnter, CdkDropList } from '@angular/cdk/drag-drop'; import { AfterViewInit, EventEmitter, OnDestroy, TemplateRef } from '@angular/core'; import { ReorderEvent } from '../../directives/reorderable/index'; import { FacetClearButtonDirective } from './facet-clear-button/facet-clear-button.directive'; import { FacetEvent } from './facet-events'; import { FacetService } from './facet.service'; import { Facet } from './models/facet'; import * as i0 from "@angular/core"; export declare class FacetContainerComponent implements OnDestroy, AfterViewInit { readonly facetService: FacetService; private readonly _announcer; /** Defines the text displayed at the top of the Facet Container. */ header: string; /** Defines the text to display in the tooltip when hovering over the clear all button. */ clearTooltip: string; /** Defines the text to display when there are no selected facets. */ emptyText: string; /** Determines if the facets can be reordered. */ facetsReorderable: boolean; /** Allows a predefined set of Facets to be displayed. */ set facets(facets: Facet[]); get facets(): Facet[]; /** Defines the aria-label for the clear all button. */ clearAriaLabel: string; /** Defines the aria-label for the deselect facet button.. */ deselectFacetAriaLabel: string; /** If using two-way binding this array will update when the selected facets change. */ facetsChange: EventEmitter<Facet[]>; /** * This will be triggered when a facet is selected, deselected or all facets are deselected. * The event will be an instance of either `FacetSelect`, `FacetDeselect` or `FacetDeselectAll` and * will contain the facet being selected or deselected in a `facet` property * (deselect all will not contain affected facets). */ events: EventEmitter<FacetEvent>; /** Allow a custom clear button */ clearButton: TemplateRef<FacetClearButtonDirective>; placeholder: CdkDropList; private target; private targetIndex; private source; private sourceIndex; private dragRef; private readonly _onDestroy; constructor(); ngAfterViewInit(): void; ngOnDestroy(): void; onDropListDropped(): void; onDropListEntered({ item, container }: CdkDragEnter): void; selectFacet(facet: Facet): void; deselectFacet(facet: Facet, tag?: HTMLElement): void; deselectAllFacets(): void; trackBy(_index: number, facet: Facet): string | number; shiftRight(facet: Facet, element: HTMLElement): void; shiftLeft(facet: Facet, element: HTMLElement): void; private shiftFacet; private triggerEvent; static ɵfac: i0.ɵɵFactoryDeclaration<FacetContainerComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<FacetContainerComponent, "ux-facet-container", never, { "header": { "alias": "header"; "required": false; }; "clearTooltip": { "alias": "clearTooltip"; "required": false; }; "emptyText": { "alias": "emptyText"; "required": false; }; "facetsReorderable": { "alias": "facetsReorderable"; "required": false; }; "facets": { "alias": "facets"; "required": false; }; "clearAriaLabel": { "alias": "clearAriaLabel"; "required": false; }; "deselectFacetAriaLabel": { "alias": "deselectFacetAriaLabel"; "required": false; }; }, { "facetsChange": "facetsChange"; "events": "events"; }, ["clearButton"], ["*"], false, never>; } export interface FacetReorderEvent extends ReorderEvent { index: number; }