/** * options for getting server items and show them in the menu. */ import { ChipsInputItemOption } from './chips-input-item-option.interface'; export interface ChipsInputServerSideMenuOptions { /** * url for example: 'tags' */ subUrl: string; /** * query params */ params?: any; /** * if true will skip the first get when the @Input serverSideMenuOptions is set with a value. * default value is false. */ skipFirstGet?: boolean; /** * in case server error -> toaster error will display. * default value is true. */ showToasterError?: boolean; /** * replace the search 'query' query param to other one. */ aliasToQuery?: string; /** * a property from the response data object that we should display as name in the suggestion items option. */ nameAlias?: string; /** * a property from the response data object that we should display as id in the suggestion items option. */ idAlias?: string; /** * the max items will return from server per page. by default 10. * it is equal to numOfEntityPerPage for pagination */ maxServerItems?: number; /** * the max visible pages will display with in the pagination. * By default 6 */ paginationMaxVisiblePages?: number; /** * the total number of entities that the server has */ totalServerEntities?: number; /** * map request query param. * an option to add additional query param * this function is called if exists */ requestQueryParamsMapper?(queryParams: Record): Record; /** * map response data. * this is the first response function call (if exists) * the return should be the data */ responseMapper?(data: any, pageNum: number): any; /** * map menu items. * this function is called after responseMapper is called and before the items render in the UI. */ menuItemsMapper?(chipsInputItemOptions: ChipsInputItemOption[]): ChipsInputItemOption[]; } //# sourceMappingURL=chips-input-menu-options.interface.d.ts.map