import { TemplateRef } from '@angular/core'; import { PassThroughOption, PassThrough } from 'primeng/api'; import { ButtonPassThrough } from 'primeng/types/button'; import { ListBoxPassThrough } from 'primeng/types/listbox'; /** * Custom pass-through(pt) options. * @template I Type of instance. * * @see {@link OrderList.pt} * @group Interface */ interface OrderListPassThroughOptions { /** * Used to pass attributes to the host's DOM element. */ host?: PassThroughOption; /** * Used to pass attributes to the root's DOM element. */ root?: PassThroughOption; /** * Used to pass attributes to the controls container's DOM element. */ controls?: PassThroughOption; /** * Used to pass attributes to the move up button's DOM element. */ pcMoveUpButton?: ButtonPassThrough; /** * Used to pass attributes to the move top button's DOM element. */ pcMoveTopButton?: ButtonPassThrough; /** * Used to pass attributes to the move down button's DOM element. */ pcMoveDownButton?: ButtonPassThrough; /** * Used to pass attributes to the move bottom button's DOM element. */ pcMoveBottomButton?: ButtonPassThrough; /** * Used to pass attributes to the Listbox component. */ pcListbox?: ListBoxPassThrough; } /** * Defines valid pass-through options in OrderList. * @see {@link OrderListPassThroughOptions} * * @template I Type of instance. */ type OrderListPassThrough = PassThrough>; /** * Callbacks to invoke on filter. * @group Interface */ interface OrderListFilterOptions { filter?: (value?: any) => void; reset?: () => void; } /** * Custom change event. * @see {@link OrderList.selectionChange} * @group Events */ interface OrderListSelectionChangeEvent { /** * Browser event. */ originalEvent: Event; /** * Current selected values. */ value: any[]; } /** * Custom change event. * @see {@link OrderList.selectionChange} * @group Events */ interface OrderListFilterEvent { /** * Browser event. */ originalEvent: Event; /** * Filtered options. */ value: any[]; } /** * Custom item template context. * @group Interface */ interface OrderListItemTemplateContext { /** * Item instance. */ $implicit: any; /** * Whether the item is selected. */ selected: boolean; /** * Index of the item. */ index: number; } /** * Custom filter template context. * @group Interface */ interface OrderListFilterTemplateContext { /** * Filter options. */ options: OrderListFilterOptions; } /** * Defines valid templates in OrderList. * @group Templates */ interface OrderListTemplates { /** * Custom item template. * @param {OrderListItemTemplateContext} context - item context. */ item(context: OrderListItemTemplateContext): TemplateRef; /** * Custom header template. */ header(): TemplateRef; /** * Custom filter template. * @param {OrderListFilterTemplateContext} context - filter context. */ filter(context: OrderListFilterTemplateContext): TemplateRef; /** * Custom empty filter template. */ emptyfilter(): TemplateRef; /** * Custom empty template. */ empty(): TemplateRef; /** * Custom clear icon template. */ clearicon(): TemplateRef; /** * Custom filter icon template. */ filtericon(): TemplateRef; /** * Custom move up icon template. */ moveupicon(): TemplateRef; /** * Custom move top icon template. */ movetopicon(): TemplateRef; /** * Custom move down icon template. */ movedownicon(): TemplateRef; /** * Custom move bottom icon template. */ movebottomicon(): TemplateRef; } export type { OrderListFilterEvent, OrderListFilterOptions, OrderListFilterTemplateContext, OrderListItemTemplateContext, OrderListPassThrough, OrderListPassThroughOptions, OrderListSelectionChangeEvent, OrderListTemplates };