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 PickList.pt} * @group Interface */ interface PickListPassThroughOptions { /** * Used to pass attributes to the root's DOM element. */ root?: PassThroughOption; /** * Used to pass attributes to the source controls' DOM element. */ sourceControls?: PassThroughOption; /** * Used to pass attributes to the source list container's DOM element. */ sourceListContainer?: PassThroughOption; /** * Used to pass attributes to the transfer controls' DOM element. */ transferControls?: PassThroughOption; /** * Used to pass attributes to the target list container's DOM element. */ targetListContainer?: PassThroughOption; /** * Used to pass attributes to the target controls' DOM element. */ targetControls?: PassThroughOption; /** * Used to pass attributes to the source move up Button component. * @see {@link ButtonPassThrough} */ pcSourceMoveUpButton?: ButtonPassThrough; /** * Used to pass attributes to the source move top Button component. * @see {@link ButtonPassThrough} */ pcSourceMoveTopButton?: ButtonPassThrough; /** * Used to pass attributes to the source move down Button component. * @see {@link ButtonPassThrough} */ pcSourceMoveDownButton?: ButtonPassThrough; /** * Used to pass attributes to the source move bottom Button component. * @see {@link ButtonPassThrough} */ pcSourceMoveBottomButton?: ButtonPassThrough; /** * Used to pass attributes to the move to target Button component. * @see {@link ButtonPassThrough} */ pcMoveToTargetButton?: ButtonPassThrough; /** * Used to pass attributes to the move all to target Button component. * @see {@link ButtonPassThrough} */ pcMoveAllToTargetButton?: ButtonPassThrough; /** * Used to pass attributes to the move to source Button component. * @see {@link ButtonPassThrough} */ pcMoveToSourceButton?: ButtonPassThrough; /** * Used to pass attributes to the move all to source Button component. * @see {@link ButtonPassThrough} */ pcMoveAllToSourceButton?: ButtonPassThrough; /** * Used to pass attributes to the target move up Button component. * @see {@link ButtonPassThrough} */ pcTargetMoveUpButton?: ButtonPassThrough; /** * Used to pass attributes to the target move top Button component. * @see {@link ButtonPassThrough} */ pcTargetMoveTopButton?: ButtonPassThrough; /** * Used to pass attributes to the target move down Button component. * @see {@link ButtonPassThrough} */ pcTargetMoveDownButton?: ButtonPassThrough; /** * Used to pass attributes to the target move bottom Button component. * @see {@link ButtonPassThrough} */ pcTargetMoveBottomButton?: ButtonPassThrough; /** * Used to pass attributes to the Listbox component. * @see {@link ListBoxPassThrough} */ pcListbox?: ListBoxPassThrough; } /** * Defines valid pass-through options in PickList. * @see {@link PickListPassThroughOptions} * * @template I Type of instance. */ type PickListPassThrough = PassThrough>; /** * Callbacks to invoke on filter. * @group Interface */ interface PickListFilterOptions { filter?: (value?: any) => void; reset?: () => void; } /** * Custom move to source event. * @see {@link PickList.onMoveToSource} * @group Events */ interface PickListMoveToSourceEvent { /** * Moved items. */ items: any[]; } /** * Custom move all to source event. * @see {@link PickList.onMoveAllToSource} * @extends {PickListMoveToSourceEvent} * @group Events */ interface PickListMoveAllToSourceEvent extends PickListMoveToSourceEvent { } /** * Custom move all to target event. * @see {@link PickList.onMoveAllToTarget} * @extends {PickListMoveToSourceEvent} * @group Events */ interface PickListMoveAllToTargetEvent extends PickListMoveToSourceEvent { } /** * Custom move to target event. * @see {@link PickList.onMoveToTarget} * @extends {PickListMoveToSourceEvent} * @group Events */ interface PickListMoveToTargetEvent extends PickListMoveToSourceEvent { } /** * Custom move source reorder event. * @see {@link PickList.onSourceReorder} * @extends {PickListMoveToSourceEvent} * @group Events */ interface PickListSourceReorderEvent extends PickListMoveToSourceEvent { } /** * Custom move target reorder event. * @see {@link PickList.onTargetReorder} * @extends {PickListMoveToSourceEvent} * @group Events */ interface PickListTargetReorderEvent extends PickListMoveToSourceEvent { } /** * Custom source select event. * @see {@link PickList.onSourceSelect} * @group Events */ interface PickListSourceSelectEvent { /** * Browser event. */ originalEvent: Event; /** * Selected items. */ items: any[]; } /** * Custom target select event. * @see {@link PickList.onTargetSelect} * @extends {PickListSourceSelectEvent} * @group Events */ interface PickListTargetSelectEvent extends PickListSourceSelectEvent { } /** * Custom source filter event. * @see {@link PickList.onSourceFilter} * @group Events */ interface PickListSourceFilterEvent { /** * Filter value. */ query: string | null | undefined; /** * Filtered items. */ value: any[] | null | undefined; } /** * Custom target filter event. * @see {@link PickList.onTargetFilter} * @extends {PickListSourceFilterEvent} * @group Events */ interface PickListTargetFilterEvent extends PickListSourceFilterEvent { } /** * Custom item template context. * @group Interface */ interface PickListItemTemplateContext { /** * Item instance. */ $implicit: any; /** * Item index. */ index: number; /** * Whether the item is selected. */ selected: boolean; /** * Whether the item is disabled. */ disabled: boolean; } /** * Custom filter template context. * @group Interface */ interface PickListFilterTemplateContext { /** * Filter options. */ options: PickListFilterOptions; } /** * Custom transfer icon template context. * @group Interface */ interface PickListTransferIconTemplateContext { /** * Boolean value indicates if the view is changed according to breakpoints. */ $implicit: boolean; } /** * Defines valid templates in PickList. * @group Templates */ interface PickListTemplates { /** * Custom item template. * @param {PickListItemTemplateContext} context - item context. */ item(context: PickListItemTemplateContext): TemplateRef; /** * Custom source header template. */ sourceHeader(): TemplateRef; /** * Custom target header template. */ targetHeader(): TemplateRef; /** * Custom source filter template. * @param {PickListFilterTemplateContext} context - filter context. */ sourceFilter(context: PickListFilterTemplateContext): TemplateRef; /** * Custom target filter template. * @param {PickListFilterTemplateContext} context - filter context. */ targetFilter(context: PickListFilterTemplateContext): TemplateRef; /** * Custom source list empty message template. */ emptymessagesource(): TemplateRef; /** * Custom source list empty filter message template. */ emptyfiltermessagesource(): TemplateRef; /** * Custom target list empty message template. */ emptymessagetarget(): TemplateRef; /** * Custom target list empty filter message template. */ emptyfiltermessagetarget(): 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; /** * Custom move to target icon template. * @param {PickListTransferIconTemplateContext} context - icon context. */ movetotargeticon(context: PickListTransferIconTemplateContext): TemplateRef; /** * Custom move all to target icon template. * @param {PickListTransferIconTemplateContext} context - icon context. */ movealltotargeticon(context: PickListTransferIconTemplateContext): TemplateRef; /** * Custom move to source icon template. * @param {PickListTransferIconTemplateContext} context - icon context. */ movetosourceicon(context: PickListTransferIconTemplateContext): TemplateRef; /** * Custom move all to source icon template. * @param {PickListTransferIconTemplateContext} context - icon context. */ movealltosourceicon(context: PickListTransferIconTemplateContext): TemplateRef; /** * Custom target filter icon template. */ targetfiltericon(): TemplateRef; /** * Custom source filter icon template. */ sourcefiltericon(): TemplateRef; } export type { PickListFilterOptions, PickListFilterTemplateContext, PickListItemTemplateContext, PickListMoveAllToSourceEvent, PickListMoveAllToTargetEvent, PickListMoveToSourceEvent, PickListMoveToTargetEvent, PickListPassThrough, PickListPassThroughOptions, PickListSourceFilterEvent, PickListSourceReorderEvent, PickListSourceSelectEvent, PickListTargetFilterEvent, PickListTargetReorderEvent, PickListTargetSelectEvent, PickListTemplates, PickListTransferIconTemplateContext };