main

mattermost/focalboard

Last updated at: 29/12/2023 09:42

property.tsx

TLDR

This file defines a class EmailProperty that extends PropertyType. It exports an instance of this class as the default export.

Classes

EmailProperty

This class extends PropertyType and represents an email property. It has the following properties and methods:

  • Editor: A reference to the Email component used for editing this property.
  • name: A string representing the name of the property, which is set to 'Email'.
  • type: A string representing the type of the property, which is set to 'email'.
  • displayName: A function that takes an intl object and returns a formatted message for the display name of the property.
  • canFilter: A boolean indicating whether this property can be used for filtering, which is set to true.
  • filterValueType: A string representing the type of the filter value for this property, which is set to '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
}