import { BehaviorSubject, Observable, ReplaySubject, Subject } from 'rxjs'; import { FocusOrigin } from '@angular/cdk/a11y'; import { AfterContentInit, ChangeDetectorRef, ElementRef, EventEmitter, InjectionToken, NgZone, OnChanges, OnDestroy, OnInit, QueryList, SimpleChanges } from '@angular/core'; import { MatCheckbox, MatCheckboxChange } from '@angular/material/checkbox'; import { MatTooltip } from '@angular/material/tooltip'; import { QueuedAnnouncer } from '@uipath/angular/a11y'; import { ISuggestValue } from '@uipath/angular/components/ui-suggest'; import { UiGridColumnDirective } from './body/ui-grid-column.directive'; import { UiGridExpandedRowDirective } from './body/ui-grid-expanded-row.directive'; import { UiGridLoadingDirective } from './body/ui-grid-loading.directive'; import { UiGridNoContentDirective } from './body/ui-grid-no-content.directive'; import { UiGridRowActionDirective } from './body/ui-grid-row-action.directive'; import { UiGridRowCardViewDirective } from './body/ui-grid-row-card-view.directive'; import { UiGridRowConfigDirective } from './body/ui-grid-row-config.directive'; import { UiGridCustomSearchDirective } from './components/ui-grid-search/ui-grid-custom-search.directive'; import { UiGridSearchFilterDirective } from './filters/ui-grid-search-filter.directive'; import { UiGridFooterDirective } from './footer/ui-grid-footer.directive'; import { UiGridHeaderDirective } from './header/ui-grid-header.directive'; import { DataManager, FilterManager, LiveAnnouncerManager, ResizeManager, ResizeStrategy, SelectionManager, SortManager, VisibilityManger } from './managers'; import { ResizableGrid, ResizeEmission } from './managers/resize/types'; import { GridOptions, IFilterModel, IGridDataEntry, ISortModel } from './models'; import { UiGridIntl } from './ui-grid.intl'; import * as i0 from "@angular/core"; export declare const UI_GRID_OPTIONS: InjectionToken>; export declare class UiGridComponent extends ResizableGrid implements AfterContentInit, OnChanges, OnDestroy, OnInit { intl: UiGridIntl; protected _ref: ElementRef; protected _cd: ChangeDetectorRef; private _zone; private _queuedAnnouncer; private _resizeStrategyStream$; private _gridOptions?; /** * The data list that needs to be rendered within the grid. * * NOTE: to have access to all functionality, we recommend that entities display in the grid implement the IGridDataEntry interface. * * @param value The list that needs to rendered. */ set data(value: T[] | null); /** * Marks the grid resizing state. * */ get isResizing(): boolean; /** * Marks the grid projected state. * */ isProjected: boolean; /** * Set the grid in high density state. * */ hasHighDensity: boolean; /** * Determines if all of the items are currently checked. * */ get isEveryVisibleRowChecked(): boolean; /** * Determines if there's a value selected within the currently rendered items (used for multi-page selection). * */ get hasValueOnVisiblePage(): boolean; /** * The desired resize strategy. * * FIXME: Currently only `ImmediateNeighbourHalt` is stable. * */ set resizeStrategy(value: ResizeStrategy | null); get resizeStrategy(): ResizeStrategy | null; /** * Marks the grid loading state. * */ loading: boolean; /** * Marks the grid enabled state. * */ disabled: boolean; /** * Configure if the grid search filters are eager or on open. * */ set collapseFiltersCount(count: number); get collapseFiltersCount(): number; /** * Configure if the grid search filters are eager or on open. * */ set fetchStrategy(fetchStrategy: 'eager' | 'onOpen'); get fetchStrategy(): 'eager' | 'onOpen'; /** * Configure if the grid allows item selection. * */ selectable: boolean; /** * Configure if the grid allows radio button selection for its items. * */ singleSelectable: boolean; /** * Configure if the grid selects entity on row click. * */ shouldSelectOnRowClick: boolean; /** * Option to have collapsible filters. * * @deprecated - use `[collapseFiltersCount]="0" to render collapsed or leave out to always render inline` */ set collapsibleFilters(collapse: boolean); get collapsibleFilters(): boolean; /** * Configure if the grid allows to toggle column visibility. * */ toggleColumns: boolean; /** * Configure if the grid allows multi-page selection. * */ multiPageSelect: boolean; /** * Configure if the grid is refreshable. * */ refreshable: boolean; /** * Configure if `virtualScroll` is enabled. Incompatible with scrollable resize strategy. * */ set virtualScroll(value: boolean); get virtualScroll(): boolean; /** * Configure the row item size for virtualScroll * */ rowSize: number; /** * Show paint time stats * */ showPaintTime: boolean; /** * Provide a custom `noDataMessage`. * */ noDataMessage?: string; /** * Set the expanded entry. * * @deprecated Use `expandedEntries` instead. */ set expandedEntry(entry: T | undefined); get expandedEntry(): T | undefined; /** * Set the expanded entry / entries. * */ set expandedEntries(entry: T | T[] | undefined); get expandedEntries(): T | T[] | undefined; /** * Configure if the expanded entry should replace the active row, or add a new row with the expanded view. * */ expandMode: 'preserve' | 'collapse'; /** * Configure if ui-grid-header-row should be visible, by default it is visible * */ showHeaderRow: boolean; /** * Configure a function that receives the whole grid row, and returns * disabled message if the row should not be selectable * */ disableSelectionByEntry: (entry: T) => null | string; set customFilterValue(customValue: IFilterModel[]); /** * Configure if Card view should be used * */ useCardView: boolean; /** * If the grid allows highlighting of a row * */ allowHighlight: boolean; /** * Id of the entity that should be highlighted * */ set highlightedEntityId(value: string | null); /** * Maximum number of active filter values before the filter selection is disabled * */ set maxSelectedFilterValues(value: number); /** * Configure if the pagination should be selectable * */ selectablePageIndex: boolean; /** * Configure if the filter containers should be swapped * */ swapFilterContainers: boolean; /** * Emits an event with the sort model when a column sort changes. * */ sortChange: EventEmitter>; /** * Emits an event when user click the refresh button. * */ refresh: EventEmitter; /** * Emits an event once the grid has been rendered. * */ rendered: EventEmitter; /** * Emits an event once the grid has been rendered. * */ resizeEnd: EventEmitter; removeCustomFilter: EventEmitter; /** * Emits an event when a row is clicked. * */ rowClick: EventEmitter<{ event: Event; row: T; }>; /** * Emits the resize initial & final percentage widths of the resized columns * */ resizeEmissions: EventEmitter; /** * Emits the column definitions when their definition changes. * */ columns$: BehaviorSubject[]>; /** * Row configuration directive reference. * * @ignore */ rowConfig?: UiGridRowConfigDirective; /** * Row action directive reference. * * @ignore */ actions?: UiGridRowActionDirective; /** * Footer directive reference. * * @ignore */ footer?: UiGridFooterDirective; /** * Header directive reference. * * @ignore */ header?: UiGridHeaderDirective; /** * Custom search directive reference. * * @ignore */ search?: UiGridCustomSearchDirective; /** * Column directive reference list. * * @ignore */ get columns(): QueryList>; set columns(value: QueryList>); /** * Expanded row template reference. * * @ignore */ expandedRow?: UiGridExpandedRowDirective; /** * No content custom template reference. * * @ignore */ noContent?: UiGridNoContentDirective; /** * Custom loading template reference. * * @ignore */ loadingState?: UiGridLoadingDirective; /** * Custom card view template reference. * * @ignore */ cardTemplate?: UiGridRowCardViewDirective; /** * Reference to the grid action buttons container * * @ignore */ gridActionButtons: ElementRef; /** * Reference to select all available rows checkbox * * @ignore */ selectAvailableRowsCheckbox?: MatCheckbox; /** * Toggle filters row display state * */ showFilters: boolean; /** * Live announcer manager, used to emit notification via `aria-live`. * */ liveAnnouncerManager?: LiveAnnouncerManager; /** * Selection manager, used to manage grid selection states. * */ selectionManager: SelectionManager; /** * Data manager, used to optimize row rendering. * */ dataManager: DataManager; /** * Filter manager, used to manage filter state changes. * */ filterManager: FilterManager; /** * Visibility manager, used to manage visibility of columns. * */ visibilityManager: VisibilityManger; /** * Sort manager, used to manage sort state changes. * */ sortManager: SortManager; /** * Resize manager, used to compute resized column states. * */ resizeManager: ResizeManager; /** * @ignore */ paintTime$: Observable; /** * Emits with information whether filters are defined. * */ isAnyFilterDefined$: BehaviorSubject; /** * Emits with information whether any filter is visible. * */ hasAnyFiltersVisible$: Observable; /** * Emits with information whether the dvider for toggle columns should be displayed * */ displayToggleColumnsDivider$?: Observable; /** * Emits the visible column definitions when their definition changes. * */ visible$: Observable[]>; /** * Emits when the visible columns menu has been opened or closed * */ visibleColumnsToggle$: BehaviorSubject; /** * Returns the scroll size, in order to compensate for the scrollbar. * * @deprecated */ scrollCompensationWidth: number; /** * Whether column header is focused. * */ focusedColumnHeader: boolean; /** * Whether the grid allows horizontal scroll or not. * */ get isScrollable(): boolean; /** * The width of selectable column. * */ selectionColumnWidth: number; /** * Visibile columns emissions partitioned in sticky and free columns. * */ partitionedVisibleColumns$: Observable<{ stickyColumns: UiGridColumnDirective[]; freeColumns: UiGridColumnDirective[]; }>; /** * Emits current max selected filter values count * */ maxSelectedFilterValues$: BehaviorSubject; /** * Emits the id of the entity that should be highlighted. * */ highlightedEntityId$: ReplaySubject; /** * @internal * @ignore */ scrollCompensationWidth$: Observable; hasSelection$: Observable; renderedColumns$: Observable<{ stickyColumns: { directive: UiGridColumnDirective; role: string; }[]; freeColumns: { directive: UiGridColumnDirective; role: string; }[]; }>; stickyColumnsSum$: Observable; shouldDisplayContainerShadow$: Observable; areFilersCollapsed$: Observable; /** * Determines if the multi-page selection row should be displayed. * */ get showMultiPageSelectionInfo(): number | false; deficit$: BehaviorSubject; containerWidth: number; minWidth$: Observable; isOverflown$: Observable; tableOverflowStyle$: Observable<"hidden" | "visible">; disableFilterSelection$: Observable; readonly Infinity: number; protected _destroyed$: Subject; protected _columnChanges$: Observable; private _fetchStrategy; private _collapseFiltersCount$; private _resizeStrategy; private _performanceMonitor; private _configure$; private _isShiftPressed; private _lastCheckboxIdx; private _resizeSubscription$; private _containerWidthChangeSubscription$; private _expandedEntries; private _columns; private _virtualScroll; /** * @ignore */ constructor(intl: UiGridIntl, _ref: ElementRef, _cd: ChangeDetectorRef, _zone: NgZone, _queuedAnnouncer: QueuedAnnouncer, _resizeStrategyStream$: BehaviorSubject, _gridOptions?: GridOptions | undefined); /** * Clear search term, filters and sorting and emits true after. */ reset: () => Observable; ngOnInit(): void; /** * @ignore */ ngAfterContentInit(): void; /** * @ignore */ ngOnChanges(changes: SimpleChanges): void; /** * @ignore */ ngOnDestroy(): void; /** * Marks if the `Shift` key is pressed. */ handleKeyDown(event: KeyboardEvent): void; handleKeyUp(event: KeyboardEvent): void; /** * Handles row selection, and reacts if the `Shift` key is pressed. * * @param idx The clicked row index. * @param entry The entry associated to the selected row. */ handleSelection(idx: number, entry: T): void; /** * Toggles the row selection state. * */ toggle(ev: MatCheckboxChange): void; /** * Determines the `checkbox` `matToolTip`. * * @param [row] The row for which the label is computed. */ checkboxTooltip(row?: T): string; /** * Determines the `checkbox` aria-label`. * **DEPRECATED** * * @param [row] The row for which the label is computed. */ checkboxLabel(row?: T): string; focusRowHeader(): void; clearCustomFilter(): void; isRowExpanded(rowId?: IGridDataEntry['id']): boolean; onRowClick(event: Event, row: T): void; checkIndeterminateState(indeterminateState: boolean): void; searchableDropdownValue(searchableDropdown: UiGridSearchFilterDirective): ISuggestValue[]; getColumnName(column: UiGridColumnDirective, prefix?: string): string; isFilterApplied(column: UiGridColumnDirective): boolean; triggerColumnHeaderTooltip(event: FocusOrigin, tooltip: MatTooltip): void; hideColumnHeaderTooltip(tooltip: MatTooltip): void; rowSelected(row: T): void; private _announceGridHeaderActions; private _initResizeManager; private _initDisplayToggleColumnsDivider; private _computeMinWidth; private get _otherActionsWidth(); private _isOverflown; private _isNonInteractiveElementClick; private _selectRowOnClick; private _setInitialRowSize; static ɵfac: i0.ɵɵFactoryDeclaration, [{ optional: true; }, null, null, null, null, null, { optional: true; }]>; static ɵcmp: i0.ɵɵComponentDeclaration, "ui-grid", never, { "data": "data"; "isResizing": "isResizing"; "isProjected": "isProjected"; "hasHighDensity": "hasHighDensity"; "resizeStrategy": "resizeStrategy"; "loading": "loading"; "disabled": "disabled"; "collapseFiltersCount": "collapseFiltersCount"; "fetchStrategy": "fetchStrategy"; "selectable": "selectable"; "singleSelectable": "singleSelectable"; "shouldSelectOnRowClick": "shouldSelectOnRowClick"; "collapsibleFilters": "collapsibleFilters"; "toggleColumns": "toggleColumns"; "multiPageSelect": "multiPageSelect"; "refreshable": "refreshable"; "virtualScroll": "virtualScroll"; "rowSize": "rowSize"; "showPaintTime": "showPaintTime"; "noDataMessage": "noDataMessage"; "expandedEntry": "expandedEntry"; "expandedEntries": "expandedEntries"; "expandMode": "expandMode"; "showHeaderRow": "showHeaderRow"; "disableSelectionByEntry": "disableSelectionByEntry"; "customFilterValue": "customFilterValue"; "useCardView": "useCardView"; "allowHighlight": "allowHighlight"; "highlightedEntityId": "highlightedEntityId"; "maxSelectedFilterValues": "maxSelectedFilterValues"; "selectablePageIndex": "selectablePageIndex"; "swapFilterContainers": "swapFilterContainers"; "reset": "reset"; }, { "sortChange": "sortChange"; "refresh": "refresh"; "rendered": "rendered"; "resizeEnd": "resizeEnd"; "removeCustomFilter": "removeCustomFilter"; "rowClick": "rowClick"; "resizeEmissions": "resizeEmissions"; }, ["rowConfig", "actions", "footer", "header", "search", "expandedRow", "noContent", "loadingState", "cardTemplate", "columns"], never, false, never>; }