import { DropDownItem } from './drop-down-item.interface'; import { SingHttpMethods } from '../../../../services/http-call/enums/sing-http-methods.enum'; export interface DropDownPaginationOptions { maxVisiblePages: number; totalServerEntities?: number; } export interface ServerSideOptions { /** * sub url, for example: 'report-tasks' */ subUrl: string; /** * query params */ params?: any; /** * request methode type: default => GET */ methodType?: SingHttpMethods; /** * if true -> will skip the first get when the dropdown just rendered. * default value is false. */ skipFirstGet?: boolean; /** * in case of server error, a toaster error will display. * default value is true. */ showToasterError?: boolean; /** * replace the search 'query' query param to another one. */ aliasToQuery?: string; /** * replace the dropdown item 'title' property. by default take the title. */ titleAlias?: string; /** * replace the dropdown item 'value' in the dropdown item. by default take the value. */ valueAlias?: string; /** * the max items per page which are returned from server. by default 10. */ maxServerItems?: number; /** * pagination options */ paginationOptions?: DropDownPaginationOptions; /** * in case we need to use infinite scroll and not pagination. * by default useInfiniteScroll is false */ useInfiniteScroll?: boolean; /** * in case we need to use infinite scroll data indicator by total items and not next cursor. * by default useInfiniteScrollTotalItems is false */ useInfiniteScrollTotalItems?: boolean; /** * map response data. * this is the first function call (if exist) after http call * @param data * @param pageNum */ responseMapper?(data: any, pageNum: number): any[]; /** * map dropdown items. * this function is called after responseMapper is called and before the items render in the UI. */ dropdownItemsMapper?(dropDownItems: DropDownItem[]): DropDownItem[]; /** * map all dropdown items. * this function is called after responseMapper is called and before the items render in the UI. */ allItemsMapper?(dropDownItems: DropDownItem[]): DropDownItem[]; /** * function to be carried before the call is taken * @param any */ preProcessor?(any: any): any; } //# sourceMappingURL=drop-down-server-options.interface.d.ts.map