File

packages/ecl/components/ecl-site-header/language/ecl-site-header-language-popover.component.ts

Description

This component is a popover, that appears after the user clicks on language link. It contains all the available languages, configured for the current site. Adds styling and functionality for the dialog. Emits events when language is selected and when dialog is closed.

Extends

ECLBaseDirective

Implements

OnDestroy

Metadata

Index

Properties
Methods
Inputs
Outputs
HostBindings
HostListeners
Accessors

Constructor

constructor(el: ElementRef, eclThemeService: EclThemeService, scrollDispatcher: ScrollDispatcher, zone: NgZone)
Parameters :
Name Type Optional
el ElementRef No
eclThemeService EclThemeService No
scrollDispatcher ScrollDispatcher No
zone NgZone No

Inputs

euColumnsCount
Type : number

Number of columns for eu languages. Calculated by the parent component 'ecl-site-header-language'.

euLanguages
Type : Array<EuiLanguage>
Default value : []
isFull
Type : boolean
Default value : false

Property to position the dialog correctly. Calculated by the parent component 'ecl-site-header-language'.

isHidden
Type : boolean
Default value : false

Property to show/hide the dialog.

isPushLeft
Type : boolean
Default value : false

Property to position the dialog correctly. Calculated by the parent component 'ecl-site-header-language'.

isPushRight
Type : boolean
Default value : false

Property to position the dialog correctly. Calculated by the parent component 'ecl-site-header-language'.

isStack
Type : boolean
Default value : false

Property to position the dialog correctly. Calculated by the parent component 'ecl-site-header-language'.

languageArrowPosition
Type : string

Property to position the arrow of the dialog correctly. Calculated by the parent component 'ecl-site-header-language'.

languageCode
Type : string

Current language

leftPosition
Type : number

Property to position the dialog correctly. Calculated by the parent component 'ecl-site-header-language'.

nonEuColumnsCount
Type : number

Number of columns for non-eu languages. Calculated by the parent component 'ecl-site-header-language'.

nonEuLanguages
Type : Array<EuiLanguage>
Default value : []
rightPosition
Type : number

Property to position the dialog correctly. Calculated by the parent component 'ecl-site-header-language'.

class
Type : string
e2eAttr
Type : any
tabindex
Type : number

Outputs

languageClosed
Type : EventEmitter
languageSelected
Type : EventEmitter

HostBindings

attr.aria-labelledby
Type : string
Default value : 'ecl-site-header__language-title'
attr.aria-modal
Type : boolean | undefined
attr.hidden
Type : boolean | undefined
attr.role
Type : string
Default value : 'dialog'

The role of the dialog is 'dialog'. Should not be changed.

class
Type : string
style.display
Type : string

HostListeners

window:resize
Arguments : '$event'
window:resize()

Calculate the height after resize. If the window is too small -> scroll should appear.

Methods

onCloseClick
onCloseClick()
Returns : void
onLanguageClick
onLanguageClick(language: EuiLanguage, evt: MouseEvent)
Parameters :
Name Type Optional
language EuiLanguage No
evt MouseEvent No
Returns : void
onWindowResize
onWindowResize()
Decorators :
@HostListener('window:resize', ['$event'])

Calculate the height after resize. If the window is too small -> scroll should appear.

Returns : void
setLanguageContentMaxHeight
setLanguageContentMaxHeight()

Set the max-height property of the component. It is calculated depending on the viewport.

Returns : void
getCssClasses
getCssClasses(rootClass: string)
Parameters :
Name Type Optional
rootClass string No
Returns : string

Properties

Public el
Type : ElementRef
labelledBy
Type : string
Default value : 'ecl-site-header__language-title'
Decorators :
@HostBinding('attr.aria-labelledby')
languageContent
Type : ElementRef
Decorators :
@ViewChild('languageContent')

The div, that wraps all the languages.

languageContentMaxHeight
Type : number
role
Type : string
Default value : 'dialog'
Decorators :
@HostBinding('attr.role')

The role of the dialog is 'dialog'. Should not be changed.

Accessors

display
getdisplay()
cssClasses
getcssClasses()
isModal
getisModal()
isDropdownHidden
getisDropdownHidden()

results matching ""

    No results matching ""