property.tsx
TLDR
This file is a TypeScript module that exports a class called EmailProperty
. This class represents a specific type of property called "Email".
Classes
EmailProperty
The EmailProperty
class extends the base class PropertyType
. It represents a specific type of property, namely an email address. The class has the following properties and methods:
-
Editor: The
Editor
property is set to theEmail
component, which represents the editor for this email property. -
name: The
name
property is set to the string "Email". It represents the name of this property type. -
type: The
type
property is set to the string "email". It represents the type of this property, which is an email address. -
displayName: The
displayName
method takes anintl
object as a parameter and returns the formatted message for the display name of this property type, which is "Email". -
canFilter: The
canFilter
property is set totrue
, indicating that an email property can be used as a filter. -
filterValueType: The
filterValueType
property is set to the string "text", indicating that the filter value for this email property should be treated as plain 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 Email from './email'
export default class EmailProperty extends PropertyType {
Editor = Email
name = 'Email'
type = 'email' as PropertyTypeEnum
displayName = (intl: IntlShape) => intl.formatMessage({id: 'PropertyType.Email', defaultMessage: 'Email'})
canFilter = true
filterValueType = 'text' as FilterValueType
}