Skip to main content

ResourceDescription

Defines how a resource should be represented as text in the Ui. Supports three modes: using a single property as description (default), conditionally selecting properties based on another property's value, or concatenating multiple properties together.

Can be configured using the @descriptionProperty, @descriptionBasedOnPropertyValue, and @concatDescription decorators.

Properties

cases?

optional cases: ResourceDescriptionCase[]

Array of different description cases, used when type is resourceDescriptionTypes.basedOnPropertyValue or resourceDescriptionTypes.concat.


propertyToCheck?

optional propertyToCheck: string

Property whose value will be checked to determine which case to use when type is resourceDescriptionTypes.basedOnPropertyValue.


resourceDescriptionProperty?

optional resourceDescriptionProperty: string

Name of the property to use as the description when type is default. Set using the @descriptionProperty decorator.


type

type: ResourceDescriptionType

Defines how the resource description will be generated


useImage?

optional useImage: boolean

When true, indicates that the resource has a property used to store the resource's image, which should be displayed alongside the description. Typically, this property is named 'imageUrl'.