import { DropdownCreationOptions } from './DropdownCreationOptions'; import { Provider } from '../base/Provider'; import { Dropdown } from "./Dropdown"; /** * Products must implement this interface in order to inject dropdown bahaviour into * the Connect framework. */ export interface DropdownProvider extends Provider { /** * This method instantiates the dropdown, but doesn't make it visible. * @param options * @param callback */ create(options: DropdownCreationOptions, callback: Function): Dropdown; /** * This method displays a created dropdown menu. * @param {string} dropdownId the ID used when creating the dropdown. * @param {string} x the x position from the edge of your iframe to display. * @param {string} y the y position from the edge of your iframe to display. * @param {string} width the optional width for the dropdown menu. */ showAt(dropdownId: string, x: string, y: string, width: string): void; /** * This method hides a dropdown menu. * @param dropdownId the ID used when creating the dropdown. */ hide(dropdownId: string): void; /** * This method disables an item within a dropdown list. * @param {string} dropdownId the ID used when creating the dropdown. * @param {string} itemId the ID of the item used when creating the dropdown. */ disableItem(dropdownId: string, itemId: string): void; /** * This method enables an item within a dropdown list. * @param {string} dropdownId the ID used when creating the dropdown. * @param {string} itemId the ID of the item used when creating the dropdown. */ enableItem(dropdownId: string, itemId: string): void; }