import { CSSProperties , ReactNode } from 'react' ; import { ReactContent , TooltipAlignment , TooltipPosition } from '../basic/types' ; import { LanguageObjectType } from '../langs/types' ; export enum EventTypes { CHANGE_THEME = 'change-theme' , CHANGE_LANGUAGE = 'change-lang' , LANGUAGE_CHANGED = 'lang-changed' , SHOW_ALERT = 'show-alert' , HIDE_ALERT = 'hide-alert' , SHOW_NOT_IMPLEMENT = 'show-not-implement' , SHOW_WAITING = 'show-waiting' , SHOW_TOOLTIP = 'show-tooltip' , HIDE_TOOLTIP = 'hide-tooltip' , SHOW_DIALOG = 'show-dialog' , HIDE_DIALOG = 'hide-dialog' , SHOW_YES_NO_DIALOG = 'show-yes-no-dialog' , SIDE_MENU_RESIZED = 'side-menu-resized' , ASK_SIDE_MENU_WIDTH = 'ask-side-menu-width' , INVOKE_REMOTE_REQUEST = 'invoke-remote-request' } export interface TooltipParam { target : HTMLElement ; text : ReactNode ; alignment ? : TooltipAlignment ; position ? : TooltipPosition ; minWidth ? : number ; maxWidth ? : number ; offsetX ? : number ; offsetY ? : number ; } export interface EventBus { fire ( type , themeName ) : this ; on ( type , listener ) : this ; off ( type , listener ) : this ; fire ( type , lang ) : this ; on ( type , listener ) : this ; off ( type , listener ) : this ; fire ( type , lang ) : this ; on ( type , listener ) : this ; off ( type , listener ) : this ; fire ( type , content ? , onHide ? ) : this ; on ( type , listener ) : this ; off ( type , listener ) : this ; fire ( type ) : this ; on ( type , listener ) : this ; off ( type , listener ) : this ; fire ( type , onHide ? ) : this ; on ( type , listener ) : this ; off ( type , listener ) : this ; fire ( type , request , content ? , onData ? ) : this ; on ( type , listener ) : this ; off ( type , listener ) : this ; fire ( type , tooltip ) : this ; on ( type , listener ) : this ; off ( type , listener ) : this ; fire ( type ) : this ; on ( type , listener ) : this ; off ( type , listener ) : this ; fire ( type , content ? , wrapperStyle ? ) : this ; on ( type , listener ) : this ; off ( type , listener ) : this ; fire ( type ) : this ; on ( type , listener ) : this ; off ( type , listener ) : this ; fire ( type , question , onYes , onNo ) : this ; on ( type , listener ) : this ; off ( type , listener ) : this ; fire ( type , width ) : this ; on ( type , listener ) : this ; off ( type , listener ) : this ; fire ( type , onWidthGet ) : this ; on ( type , listener ) : this ; off ( type , listener ) : this ; fire ( type , request , success ? , failure ? ) : this ; on ( type , listener ) : this ; off ( type , listener ) : this ; }