property.tsx
TLDR
This file defines a class called UrlProperty
that extends PropertyType
. It exports UrlProperty
as the default.
Classes
UrlProperty
The UrlProperty
class extends PropertyType
and represents a type of property called "Url". It has the following properties and methods:
-
Editor
: Points to theUrl
component, which is used for editing this property. -
name
: A string representing the name of this property, which is "Url". -
type
: A string representing the type of this property, which is "url". -
displayName
: A function that takes theintl
object and returns a formatted message for display purposes. It formats the message with the ID "PropertyType.Url" and a default message of "URL". -
canFilter
: A boolean indicating whether this property can be used as a filter. -
filterValueType
: A string representing the type of value that can be used for filtering, which is "text".
(END)
// 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
}