/// export interface TabsOptions { width?: number | string; height?: number | string; plain?: boolean; fit?: boolean; border?: boolean; scrollIncrement?: number; scrollDuration?: number; tools?: any[]; toolPosition?: string; tabPosition?: string; headerWidth?: number; tabWidth?: number; tabHeight?: number; selected?: number; showHeader?: boolean; justified?: boolean; narrow?: boolean; pill?: boolean; onLoad?: (panel: any) => void; onSelect?: (title: string, index: number) => void; onUnselect?: (title: string, index: number) => void; onBeforeClose?: (title, index) => void; onClose?: (title, index) => void; onAdd?: (title, index) => void; onUpdate?: (title, index) => void; onContextMenu?: (e, title, index) => void; } export interface TabPanel { id?: string; title: string; content?: string; href?: string; cache?: boolean; iconCls?: string; width?: number; height?: number; collapsible?: boolean; closable?: boolean; selected?: boolean; } export declare class Tabs { selector: string | JQuery | HTMLElement; private func; $tabs: JQuery; constructor(selector: string | JQuery | HTMLElement, options?: TabsOptions); /** * Return the options of tabs. **/ options(): TabsOptions; /** * Return all tab panels. **/ tabs(): [JQuery]; /** * Set size, the options contains two properties: width: the new width of tabs. height: the new height of tabs. **/ resize(param?: { width?: number; height?: number; }): this; /** * Add a new tab panel, the options parameter is a config object, see tab panel properties for more details. When adding a new tab panel, it will become selected. To add a unselected tab panel, remember to set 'selected' property to false. // add a unselected tab panel $('#tt').tabs('add',{ title: 'new tab', selected: false //... }); // insert a tab panel to the index 2 $('#tt').tabs('add',{ title: 'inserted tab', index: 2 }) **/ add(tabPanel: TabPanel): this; /** * Close a tab panel, the 'which' parameter can be the title or index of tab panel to be closed. **/ close(which: string | number): this; /** * Get the specified tab panel, the 'which' parameter can be the title or index of tab panel. **/ getTab(which: string | number): JQuery; /** *Get the specified tab panel index **/ getTabIndex(tab: TabPanel | JQuery): any; /** * Get the selected tab panel. The example below shows how to get the index of selected tab panel. var tab = $('#tt').tabs('getSelected'); var index = $('#tt').tabs('getTabIndex',tab); alert(index); **/ getSelected(): JQuery; readonly currentTabIndex: number; readonly currentTabPanel: TabPanel; getTabPanel(tabIndex: number): TabPanel; readonly tabPanels: [TabPanel]; /** * Select a tab panel, the 'which' parameter can be the title or index of tab panel. **/ select(which: string | number): this; /** * Unselect a tab panel, the 'which' parameter can be the title or index of tab panel. **/ unselect(which: string | number): this; /** * Show the tabs header. Available since version 1.3.5. **/ showHeader(): this; /** * Hide the tabs header. Available since version 1.3.5. **/ hideHeader(): this; /** * Indicate if the special panel is exists, the 'which' parameter can be the title or index of tab panel. **/ exists(which: string | number): any; /** * Update the specified tab panel, the param parameter contains two properties: tab: the tab panel to be updated. type: the updating type, available values are: 'header','body','all'. options: the panel options. Code example: // update the selected panel with new title and content var tab = $('#tt').tabs('getSelected'); // get selected panel $('#tt').tabs('update', { tab: tab, options: { title: 'New Title', href: 'get_content.php' // the new content URL } }); // call 'refresh' method for tab panel to update its content var tab = $('#tt').tabs('getSelected'); // get selected panel tab.panel('refresh', 'get_content.php'); **/ update(param: { tab: TabPanel | JQuery; type?: string; options: any; }): this; /** * Enable the specified tab panel, the 'which' parameter can be the title or index of tab panel. Available since version 1.3. Code example: $('#tt').tabs('enableTab', 1); // enable the second tab panel $('#tt').tabs('enableTab', 'Tab2'); enable the tab panel that has 'Tab2' title **/ enableTab(which: string | number): this; /** * Disable the specified tab panel, the 'which' parameter can be the title or index of tab panel. Available since version 1.3. Code example: $('#tt').tabs('disableTab', 1); // disable the second tab panel. **/ disableTab(which: string | number): this; /** * Scroll the tab header by the specified amount of pixels, negative values scroll to the right, positive values scroll to the left. Available since version 1.3.2. Code example: // scroll the tab header to left $('#tt').tabs('scroll', 10); **/ scrollBy(deltaX: number): this; closeCurrentTab(tabIndex?: any): this; closeAllTabs(): this; closeOtherTabs(tabIndex?: any): this; closeTabsToTheRight(tabIndex?: any): this; closeTabsToTheLeft(tabIndex?: any): this; enableDnd(): this; readonly currentTabTitle: string | undefined; updateTitle(params: { which: string | number; newTitle: string; tooltip?: string; }): this | undefined; }