The rating decorator adds two rating buttons (like, dislike) after each system conversation output, to allow users to give feedback.

### Hierarchy

- AbstractDecorator
  - RatingDecorator

### Implements

- IRenderer

## Index

### Constructors

- constructor

### Properties

- channelId
- renderStrategy

### Methods

- appendContent
- appendSuggest
- init
- render
- shouldRenderRatingFor
- isRootContainerOfInteraction

## Constructors

### constructor

- new RatingDecorator(renderer: IRenderer, renderStrategy?: RatingRenderStrategy): RatingDecorator

- Overrides AbstractDecorator.constructor

  - Defined in lib/renderer/decorator/RatingDecorator.ts:13

  #### Parameters

  - ##### renderer: IRenderer

  - ##### Default value renderStrategy: RatingRenderStrategy = RatingRenderStrategy.ALL_EXCEPT_DISABLED_RATINGS

  #### Returns RatingDecorator

## Properties

### Protected Optional channelId

channelId: undefined | string

Inherited from AbstractDecorator.channelId

- Defined in lib/renderer/decorator/AbstractDecorator.ts:6

### Private renderStrategy

renderStrategy: RatingRenderStrategy

- Defined in lib/renderer/decorator/RatingDecorator.ts:13

## Methods

### appendContent

- appendContent(element: HTMLElement): void

- Implementation of IRenderer.appendContent

  Inherited from AbstractDecorator.appendContent

  - Defined in lib/renderer/decorator/AbstractDecorator.ts:12

  #### Parameters

  - ##### element: HTMLElement

  #### Returns void

### appendSuggest

- appendSuggest(element: HTMLElement): void

- Implementation of IRenderer.appendSuggest

  Inherited from AbstractDecorator.appendSuggest

  - Defined in lib/renderer/decorator/AbstractDecorator.ts:16

  #### Parameters

  - ##### element: HTMLElement

  #### Returns void

### init

- init(channelId?: undefined | string): void

- Implementation of IRenderer.init

  Inherited from AbstractDecorator.init

  - Defined in lib/renderer/decorator/AbstractDecorator.ts:20

  #### Parameters

  - ##### Optional channelId: undefined | string

  #### Returns void

### render

- render(renderable: ISpecification, parentContainer?: IStackeable): HTMLElement[]

- Overrides AbstractDecorator.render

  - Defined in lib/renderer/decorator/RatingDecorator.ts:29

  Appends a rating to eligible interaction root containers. A container is eligible for rating rendering if the rating markup element is specified and the enabled attribute is not set to false. A container is also eligible for rating rendering if no rating markup element is specified and ratingsEnabledByDefault is set to true.

  #### Parameters

  - ##### renderable: ISpecification

    the renderable specification which was received

  - ##### Optional parentContainer: IStackeable

    the parent container of the current renderable

  #### Returns HTMLElement[]

### Private shouldRenderRatingFor

- shouldRenderRatingFor(renderable: ISpecification, parentContainer?: IStackeable): boolean

- - Defined in lib/renderer/decorator/RatingDecorator.ts:46

  #### Parameters

  - ##### renderable: ISpecification

  - ##### Optional parentContainer: IStackeable

  #### Returns boolean

### Static Private isRootContainerOfInteraction

- isRootContainerOfInteraction(renderable: ISpecification): boolean

- - Defined in lib/renderer/decorator/RatingDecorator.ts:57

  #### Parameters

  - ##### renderable: ISpecification

  #### Returns boolean

Generated using TypeDoc