### File

`packages/ecl/components/ecl-gallery/ecl-gallery-item.component.ts`

### Description

Wrapper component for gallery item's elements.

### Extends

`ECLBaseDirective`

### Implements

`EclGalleryItem` `OnInit` `AfterContentInit`

### Metadata

selector | `ecl-gallery-item`
imports | `EUI_ECL_ICON`
templateUrl | `./ecl-gallery-item.component.html`

### Index

###### Properties
galleryPicture galleryThumbnail mediaChild role
###### Methods
getDownloadLink getUrlExternalVideo onFocus onItemClick getCssClasses
###### Inputs
description icon isShareable itemId mediaType meta src srVideoAudioDescription title class e2eAttr tabindex
###### Outputs
itemClick
###### HostBindings
attr.role class
###### HostListeners
click
###### Accessors
cssClasses isHidden isNoOverlay isImage isVideo isExternalVideo isOpenInFullScreenPossible titleId hasGalleryThumbnail

### Constructor

`constructor(domSanitizer: DomSanitizer, renderer: Renderer2, el: ElementRef)`
Parameters :
Name | Type | Optional
domSanitizer | `DomSanitizer` | No
renderer | `Renderer2` | No
el | `ElementRef` | No

### Inputs

description
Type : `string`

icon
Type : `string`

isShareable
Type : `boolean`
Default value : `true`
Can this item be shared, i.e. show/hide share button.

itemId
Type : `string`

mediaType
Type : `"image" | "video" | "externalVideo"`
Default value : `'image'`

meta
Type : `string`

src
Type : `string`
The source link to the image/video, that will be shown in the original size (when open image/video in overlay or in orginal size).

srVideoAudioDescription
Type : `string`
Embeded audio description.

title
Type : `string`

class
Type : `string`

e2eAttr
Type : `any`

tabindex
Type : `number`

### Outputs

itemClick
Type : `EventEmitter`

### HostBindings

attr.role
Type : `string`
Default value : `'listitem'`
The role attribute of the item is 'listitem', should not be changed.

class
Type : `string`
Binds specific classes for the item. Some depend on some of the properties of the component.

### HostListeners

click
Arguments : `'$event'`
`click(evt: MouseEvent)`

### Methods

getDownloadLink
`getDownloadLink()`
Returns : `string`

getUrlExternalVideo
`getUrlExternalVideo()`
Returns : `SafeResourceUrl`

onFocus
`onFocus()`
Returns : `void`

onItemClick
`onItemClick(evt: MouseEvent)`
Decorators : `@HostListener('click', ['$event'])`
Parameters :
Name | Type | Optional
evt | `MouseEvent` | No
Returns : `void`

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

### Properties

galleryPicture
Type : `EclGalleryPictureDirective`
Decorators : `@ContentChild(EclGalleryPictureDirective)`

galleryThumbnail
Type : `EclGalleryThumbnailDirective`
Decorators : `@ContentChild(EclGalleryThumbnailDirective)`

mediaChild
Type : `EclGalleryMediaDirective`
Decorators : `@ContentChild(EclGalleryMediaDirective)`

role
Type : `string`
Default value : `'listitem'`
Decorators : `@HostBinding('attr.role')`
The role attribute of the item is 'listitem', should not be changed.

### Accessors

cssClasses
get `cssClasses()`
Binds specific classes for the item. Some depend on some of the properties of the component. Returns : `string`

isHidden
set `isHidden(value: boolean)`
Set if the item should be shown in the gallery by default. Parameters :
Name | Type | Optional
value | `boolean` | No
Returns : `void`

isNoOverlay
get `isNoOverlay()`
set `isNoOverlay(value: boolean)`
Parameters :
Name | Type | Optional
value | `boolean` | No
Returns : `void`

isImage
get `isImage()`

isVideo
get `isVideo()`

isExternalVideo
get `isExternalVideo()`

isOpenInFullScreenPossible
get `isOpenInFullScreenPossible()`

titleId
get `titleId()`
Creates id for the title Returns : `string`

hasGalleryThumbnail
get `hasGalleryThumbnail()`
If the thimbnail was added by user. If not -> we are adding it in the view. Returns : `boolean`

# results matching ""

# No results matching ""