property.tsx
TLDR
This file defines a class UrlProperty
which is a subclass of PropertyType
. It exports UrlProperty
as the default export. The UrlProperty
class has properties and methods related to handling URL properties.
Classes
UrlProperty
The UrlProperty
class extends the PropertyType
class and represents a URL property. It has the following properties and methods:
-
Editor
: This property holds the URL component for editing URL properties. -
name
: This property stores the name of the property, which is set as 'Url'. -
type
: This property defines the type of the property as 'url'. -
displayName(intl: IntlShape)
: This method returns the display name of the property by formatting the message using the providedintl
object. It returns the translated string for the 'PropertyType.Url' ID, with a default message of 'URL'. -
canFilter
: This property indicates whether the URL property can be used for filtering. -
filterValueType
: This property defines the type of filter value associated with the URL property as 'text'.
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {IntlShape} from 'react-intl'
import {PropertyType, PropertyTypeEnum, FilterValueType} from '../types'
import Url from './url'
export default class UrlProperty extends PropertyType {
Editor = Url
name = 'Url'
type = 'url' as PropertyTypeEnum
displayName = (intl: IntlShape) => intl.formatMessage({id: 'PropertyType.Url', defaultMessage: 'URL'})
canFilter = true
filterValueType = 'text' as FilterValueType
}