compat
: { Application
: typeof Application ; Component
: typeof Component ; Fragment
: typeof Fragment ; Model
: typeof Model ; Session
: typeof Session ; Store
: typeof Store ; Translator
: typeof Translator ; components/Alert
: typeof Alert ; components/AlertManager
: typeof AlertManager ; components/Badge
: typeof Badge ; components/Button
: typeof Button ; components/Checkbox
: typeof Checkbox ; components/ColorPreviewInput
: typeof ColorPreviewInput ; components/Dropdown
: typeof Dropdown ; components/EditUserModal
: typeof EditUserModal ; components/FieldSet
: typeof FieldSet ; components/GroupBadge
: typeof GroupBadge ; components/Link
: typeof Link ; components/LinkButton
: typeof LinkButton ; components/LoadingIndicator
: typeof LoadingIndicator ; components/Modal
: typeof Modal ; components/ModalManager
: typeof ModalManager ; components/Navigation
: typeof Navigation ; components/Page
: typeof Page ; components/Placeholder
: typeof Placeholder ; components/RequestErrorModal
: typeof RequestErrorModal ; components/Select
: typeof Select ; components/SelectDropdown
: typeof SelectDropdown ; components/Separator
: typeof Separator ; components/SplitDropdown
: typeof SplitDropdown ; components/Switch
: typeof Switch ; components/TextEditor
: typeof TextEditor ; components/TextEditorButton
: typeof TextEditorButton ; components/Tooltip
: typeof Tooltip ; extend
: common/extend ; extenders
: { Model
: typeof Model ; PostTypes
: typeof PostTypes ; Routes
: typeof Routes ; Store
: typeof Store ; } ; helpers/avatar
: ( ( user
: null | User , attrs
?: ComponentAttrs ) => Mithril.Vnode ) ; helpers/fullTime
: ( ( time
: Date ) => Mithril.Vnode ) ; helpers/highlight
: ( ( string
: string , phrase
?: string | RegExp , length
?: number ) => Mithril.Vnode < any , any > | string ) ; helpers/humanTime
: ( ( time
: Date ) => Mithril.Vnode ) ; helpers/icon
: ( ( fontClass
: string , attrs
?: Attributes ) => Mithril.Vnode ) ; helpers/listItems
: ( < Attrs > ( rawItems
: ModdedChildrenWithItemName [] , customTag
?: VnodeElementTag < Attrs , Component < Attrs , {} > > , attributes
?: Attrs ) => Mithril.Vnode [] ) ; helpers/punctuateSeries
: ( ( items
: Children [] ) => Children ) ; helpers/textContrastClass
: ( ( hexcolor
: string ) => string ) ; helpers/userOnline
: ( ( user
: User ) => Mithril.Vnode < {} , {} > | null ) ; helpers/username
: ( ( user
: undefined | null | false | User ) => Mithril.Vnode ) ; models/Discussion
: typeof Discussion ; models/Forum
: typeof Forum ; models/Group
: typeof Group ; models/Notification
: typeof Notification ; models/Post
: typeof Post ; models/User
: typeof User ; resolvers/DefaultResolver
: typeof DefaultResolver ; states/AlertManagerState
: typeof AlertManagerState ; states/ModalManagerState
: typeof ModalManagerState ; states/PageState
: typeof PageState ; states/PaginatedListState
: typeof PaginatedListState ; utils/BasicEditorDriver
: typeof BasicEditorDriver ; utils/Drawer
: typeof Drawer ; utils/ItemList
: typeof ItemList ; utils/KeyboardNavigatable
: typeof KeyboardNavigatable ; utils/RequestError
: typeof RequestError ; utils/ScrollListener
: typeof ScrollListener ; utils/Stream
: typeof Stream ; utils/SubtreeRetainer
: typeof SubtreeRetainer ; utils/abbreviateNumber
: ( ( number
: number ) => string ) ; utils/anchorScroll
: ( ( element
: string | HTMLElement | Element | SVGElement , callback
: ( ( ) => void ) ) => void ) ; utils/classList
: ( ( ... inputs
: ClassValue [] ) => string ) ; utils/computed
: ( < T , M > ( ... args
: [ ... string [] , ( ( this
: M ,
... args
: unknown [] ) => T ) ] ) => ( ( ) => T ) ) ; utils/escapeRegExp
: ( ( input
: string ) => string ) ; utils/evented
: { handlers
: Record < string , unknown > ; getHandlers
( event
: string ) : Function [] ; off
( event
: string , handler
: Function ) : void ; on
( event
: string , handler
: Function ) : void ; one
( event
: string , handler
: Function ) : void ; trigger
( event
: string ,
... args
: any [] ) : void ; } ; utils/extract
: ( < T , K > ( object
: T , property
: K ) => T [ K ] ) ; utils/extractText
: ( ( vdom
: Children ) => string ) ; utils/focusTrap
: common/utils/focusTrap ; utils/formatNumber
: ( ( number
: number , locale
?: string ) => string ) ; utils/humanTime
: ( ( time
: undefined | null | string | number | Date | Dayjs ) => string ) ; utils/insertText
: ( ( textarea
: HTMLTextAreaElement , __namedParameters
: SelectionRange ) => void ) ; utils/isDark
: ( ( hexcolor
: string ) => boolean ) ; utils/isObject
: ( ( obj
: unknown ) => obj is object ) ; utils/liveHumanTimes
: ( ( ) => void ) ; utils/mapRoutes
: ( ( routes
: Record < string , FlarumGenericRoute > , basePath
?: string ) => Record < string , RouteResolver < Record < string , unknown > , Component < { routeName
: string ; [key:
string ]
: unknown ; } , undefined > , Record < string , unknown > > > ) ; utils/mixin
: ( ( Parent
: object ,
... mixins
: Record < string , any > [] ) => object ) ; utils/patchMithril
: ( ( global
: any ) => void ) ; utils/proxifyCompat
: ( ( compat
: Record < string , unknown > , namespace
: string ) => Record < string , unknown > ) ; utils/setRouteWithForcedRefresh
: ( ( route
: string , params
?: null , options
?: RouteOptions ) => void ) ; utils/string
: common/utils/string ; utils/stringToColor
: ( ( string
: string ) => string ) ; utils/styleSelectedText
: ( ( textarea
: HTMLTextAreaElement , styleArgs
: StyleArgs ) => void ) ; utils/subclassOf
: ( ( A
: any , B
: any ) => any ) ; utils/throttleDebounce
: common/utils/throttleDebounce ; utils/withAttr
: ( ( key
: string , cb
: Function ) => ( ( this
: Element ) => void ) ) ; }
Type declaration
Fragment: typeof Fragment
Model: typeof Model
Session: typeof Session
Store: typeof Store
components/ Alert: typeof Alert
components/ Alert Manager: typeof AlertManager
components/ Badge: typeof Badge
components/ Button: typeof Button
components/ Checkbox: typeof Checkbox
components/ Color Preview Input: typeof ColorPreviewInput
components/ Dropdown: typeof Dropdown
components/ Edit User Modal: typeof EditUserModal
components/ Field Set: typeof FieldSet
components/ Group Badge: typeof GroupBadge
components/ Link: typeof Link
components/ Link Button: typeof LinkButton
components/ Loading Indicator: typeof LoadingIndicator
components/ Modal: typeof Modal
components/ Modal Manager: typeof ModalManager
components/ Navigation: typeof Navigation
components/ Page: typeof Page
components/ Placeholder: typeof Placeholder
components/ Request Error Modal: typeof RequestErrorModal
components/ Select: typeof Select
components/ Select Dropdown: typeof SelectDropdown
components/ Separator: typeof Separator
components/ Split Dropdown: typeof SplitDropdown
components/ Switch: typeof Switch
components/ Text Editor: typeof TextEditor
components/ Text Editor Button: typeof TextEditorButton
components/ Tooltip: typeof Tooltip
extenders: { Model: typeof Model ; PostTypes: typeof PostTypes ; Routes: typeof Routes ; Store: typeof Store ; }
helpers/avatar: ( ( user: null | User , attrs?: ComponentAttrs ) => Mithril.Vnode )
helpers/full Time: ( ( time: Date ) => Mithril.Vnode )
( time: Date ) : Mithril.Vnode
Returns Mithril.Vnode
helpers/highlight: ( ( string: string , phrase?: string | RegExp , length?: number ) => Mithril.Vnode < any , any > | string )
( string: string , phrase?: string | RegExp , length?: number ) : Mithril.Vnode < any , any > | string
Parameters
string: string
Optional
phrase: string | RegExp
Optional
length: number
Returns Mithril.Vnode < any , any > | string
helpers/human Time: ( ( time: Date ) => Mithril.Vnode )
( time: Date ) : Mithril.Vnode
Returns Mithril.Vnode
helpers/icon: ( ( fontClass: string , attrs?: Attributes ) => Mithril.Vnode )
( fontClass: string , attrs?: Attributes ) : Mithril.Vnode
Parameters
fontClass: string
attrs: Attributes = {}
Returns Mithril.Vnode
helpers/list Items: ( < Attrs > ( rawItems: ModdedChildrenWithItemName [] , customTag?: VnodeElementTag < Attrs , Component < Attrs , {} > > , attributes?: Attrs ) => Mithril.Vnode [] )
helpers/punctuate Series: ( ( items: Children [] ) => Children )
( items: Children [] ) : Children
Returns Children
helpers/text Contrast Class: ( ( hexcolor: string ) => string )
( hexcolor: string ) : string
Returns string
helpers/user Online: ( ( user: User ) => Mithril.Vnode < {} , {} > | null )
( user: User ) : Mithril.Vnode < {} , {} > | null
Returns Mithril.Vnode < {} , {} > | null
helpers/username: ( ( user: undefined | null | false | User ) => Mithril.Vnode )
( user: undefined | null | false | User ) : Mithril.Vnode
Parameters
user: undefined | null | false | User
Returns Mithril.Vnode
models/ Discussion: typeof Discussion
models/ Forum: typeof Forum
models/ Group: typeof Group
models/ Notification: typeof Notification
models/ Post: typeof Post
models/ User: typeof User
resolvers/ Default Resolver: typeof DefaultResolver
states/ Page State: typeof PageState
utils/ Drawer: typeof Drawer
utils/ Item List: typeof ItemList
utils/ Request Error: typeof RequestError
utils/ Scroll Listener: typeof ScrollListener
utils/ Stream: typeof Stream
utils/abbreviate Number: ( ( number: number ) => string )
( number: number ) : string
Returns string
utils/anchor Scroll: ( ( element: string | HTMLElement | Element | SVGElement , callback: ( ( ) => void ) ) => void )
utils/class List: ( ( ... inputs: ClassValue [] ) => string )
( ... inputs: ClassValue [] ) : string
Parameters
Rest
... inputs: ClassValue []
Returns string
utils/computed: ( < T , M > ( ... args: [ ... string [] , ( ( this: M , ... args: unknown [] ) => T ) ] ) => ( ( ) => T ) )
< T , M > ( ... args: [ ... string [] , ( ( this: M , ... args: unknown [] ) => T ) ] ) : ( ( ) => T )
Parameters
Rest
... args: [ ... string [] , ( ( this: M , ... args: unknown [] ) => T ) ]
Returns ( ( ) => T )
utils/escape Reg Exp: ( ( input: string ) => string )
( input: string ) : string
Returns string
utils/evented: { handlers: Record < string , unknown > ; getHandlers( event: string ) : Function [] ; off( event: string , handler: Function ) : void ; on( event: string , handler: Function ) : void ; one( event: string , handler: Function ) : void ; trigger( event: string , ... args: any [] ) : void ; }
Protected
handlers: Record < string , unknown >
get Handlers: function
get Handlers( event: string ) : Function []
Protected
off: function
off( event: string , handler: Function ) : void
Returns void
on: function
on( event: string , handler: Function ) : void
Returns void
one: function
one( event: string , handler: Function ) : void
Returns void
trigger: function
trigger( event: string , ... args: any [] ) : void
Parameters
event: string
Rest
... args: any []
Returns void
utils/extract: ( < T , K > ( object: T , property: K ) => T [ K ] )
Type Parameters
T
K extends string | number | symbol
Returns T [ K ]
utils/extract Text: ( ( vdom: Children ) => string )
utils/format Number: ( ( number: number , locale?: string ) => string )
( number: number , locale?: string ) : string
Parameters
number: number
locale: string = app.data.locale
Returns string
utils/human Time: ( ( time: undefined | null | string | number | Date | Dayjs ) => string )
( time: undefined | null | string | number | Date | Dayjs ) : string
Parameters
time: undefined | null | string | number | Date | Dayjs
Returns string
utils/is Dark: ( ( hexcolor: string ) => boolean )
( hexcolor: string ) : boolean
Returns boolean
utils/is Object: ( ( obj: unknown ) => obj is object )
( obj: unknown ) : obj is object
Returns obj is object
utils/live Human Times: ( ( ) => void )
utils/map Routes: ( ( routes: Record < string , FlarumGenericRoute > , basePath?: string ) => Record < string , RouteResolver < Record < string , unknown > , Component < { routeName: string ; [key: string ]: unknown ; } , undefined > , Record < string , unknown > > > )
( routes: Record < string , FlarumGenericRoute > , basePath?: string ) : Record < string , RouteResolver < Record < string , unknown > , Component < { routeName: string ; [key: string ]: unknown ; } , undefined > , Record < string , unknown > > >
Returns Record < string , RouteResolver < Record < string , unknown > , Component < { routeName: string ; [key: string ]: unknown ; } , undefined > , Record < string , unknown > > >
utils/mixin: ( ( Parent: object , ... mixins: Record < string , any > [] ) => object )
( Parent: object , ... mixins: Record < string , any > [] ) : object
Parameters
Parent: object
Rest
... mixins: Record < string , any > []
Returns object
utils/patch Mithril: ( ( global: any ) => void )
( global: any ) : void
Returns void
utils/proxify Compat: ( ( compat: Record < string , unknown > , namespace: string ) => Record < string , unknown > )
( compat: Record < string , unknown > , namespace: string ) : Record < string , unknown >
Parameters
compat: Record < string , unknown >
namespace: string
Returns Record < string , unknown >
utils/set Route With Forced Refresh: ( ( route: string , params?: null , options?: RouteOptions ) => void )
( route: string , params?: null , options?: RouteOptions ) : void
Parameters
route: string
params: null = null
options: RouteOptions = {}
Returns void
utils/string To Color: ( ( string: string ) => string )
( string: string ) : string
Returns string
utils/style Selected Text: ( ( textarea: HTMLTextAreaElement , styleArgs: StyleArgs ) => void )
utils/subclass Of: ( ( A: any , B: any ) => any )
( A: any , B: any ) : any
Returns any
utils/with Attr: ( ( key: string , cb: Function ) => ( ( this: Element ) => void ) )
The
avatar
helper displays a user's avatar.