import { DropDownMenuPositionOptions } from '../enums/drop-down-menu-position-options.enum'; import { DropDownItem } from '../models/drop-down-item.interface'; import { DropDownMenuPosition } from '../models/drop-down-menu-position.interface'; import { DropDownOptions } from '../models/drop-down-options.interface'; import { ServerSideOptions } from '../models/drop-down-server-options.interface'; import { DropDownSelectionChanged } from '../models/drop-down-selection-changes.interface'; import { SelectionChangesActionTypes } from '../enums/drop-down-selection-changes-action-types.enum'; import { Type } from '@angular/core'; import { DropDownSelectedState } from '../models/drop-down-selected-state.interface'; import { SelectedItemsState } from './selected-items-state.utils'; /** * create menu position. * by default: the menu opens below the trigger menu button and to the right */ export declare function calcMenuPosition(matMenuPosition: DropDownMenuPositionOptions): DropDownMenuPosition; /** * find dropdown item from the list of dropdown items. * return null in case item is not found. */ export declare function findDropDownItem(dropDownItems: DropDownItem[], dropDOwnItemToFind: DropDownItem): DropDownItem | null; /** * check if there is any child server-side menu in the dropdown hierarchy. */ export declare function hasChildServerSideMenu(dropDownItems: DropDownItem[]): boolean; /** * find the first selected item. * should be used for single select dropdown. * return the selected item. return undefined if non are selected. * @param dropDownItems */ export declare function findFirstSelectedDropDownItem(dropDownItems: DropDownItem[]): DropDownItem | undefined; /** * check if given item is a link item * @param dropDownItem */ export declare function isLinkItem(dropDownItem: DropDownItem | null): boolean; /** * create dropdown options. * @param dropDownOptions * @param dynamicComponentMap */ export declare function createDropDownOptions(dropDownOptions: DropDownOptions, dynamicComponentMap: Record>): DropDownOptions; /** * map response data * @param serverSideOptions * @param data * @param pageNumber */ export declare function executeResponseMapper(serverSideOptions: ServerSideOptions, data: any, pageNumber: number): any; /** * map dropdown items * @param serverSideOptions * @param dropDownItems */ export declare function executeDropdownItemsMapper(serverSideOptions: ServerSideOptions, dropDownItems: DropDownItem[]): DropDownItem[]; /** * map dropdown items after concat all items from load more * @param serverSideOptions * @param dropDownItems */ export declare function executeAllItemsMapper(serverSideOptions: ServerSideOptions, dropDownItems: DropDownItem[]): DropDownItem[]; /** * create dropdown items from server response */ export declare function createDropDownItemsFromServerResponse(serverSideOptions: ServerSideOptions, data: any[]): DropDownItem[]; /** * get a callback and execute it * @param action * @param arg */ export declare function executeCallbackIfExist(action: (...arg: any[]) => any, ...arg: any): any; /** * create dropdown selection changes object * @param currentSelected * @param previousSelected * @param changedItems * @param actionType * @param isMultipleSelection */ export declare function createDropDownSelectionChanges(currentSelected: DropDownItem[], previousSelected: DropDownItem[], changedItems: DropDownItem[], actionType: SelectionChangesActionTypes, isMultipleSelection: boolean): DropDownSelectionChanged; /** * update the dropdown items with a new selected value. * @param items * @param selected */ export declare function updateSelectedItemProp(items: DropDownItem[], selected: boolean): any; /** * create selected state changes. * we are not using the selectedState as is because it has private props like (_selectAll) * which can be confused with the public selectAll */ export declare function createSelectedStateChanges(selectedState: DropDownSelectedState): DropDownSelectedState; /** * check if a given dropdown item is invalid. * dropdown item is considered valid when it has value and title props * @param item */ export declare function isInvalidDropDownItem(item: DropDownItem): boolean; /** * check if given is string array. * in case empty array it return false. * @param data */ export declare function isStringsArray(data: any): boolean; /** * get dropdown items and check if it has nested items. * @param items */ export declare function hasNestedItems(items: DropDownItem[]): boolean; /** * check if all dropdown items are considered as selected. * In case server side: in case selectAll flag is on and the number of unselected items is zero -> it's considered as allItemsSelected * In case client side: we check if all items selected property are true */ export declare function isAllItemSelected(selectedItemsState: SelectedItemsState, isServerSide: boolean, items: DropDownItem[]): boolean; /** * check if all dropdown items are considered as unselected. * In case server side: in case unselectAll flag is on and the number of selected items is zero -> it's considered as allItemsSelected * In case client side: we check if all items selected property are false */ export declare function isAllItemsUnSelected(selectedItemsState: SelectedItemsState, isServerSide: boolean, items: DropDownItem[]): boolean; /** * check that when we are using the client infinite scroll * we are not getting menuStyle with height, min-height, max-height * since we should get it from dropDownOptions.virtualScrollViewportHeight */ export declare function isDropDownOptionsHasValidPropsForInfiniteScroll(dropDownOptions: DropDownOptions): boolean; //# sourceMappingURL=drop-down.utils.d.ts.map