main

mattermost/focalboard

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

property.tsx

TLDR

This file exports a class named PhoneProperty that extends PropertyType. It includes an editor component, a name, a type, a display name function, and properties related to filtering.

Classes

PhoneProperty

This class extends the PropertyType class and represents a phone property. It includes the following properties:

  • Editor: The editor component for this property, which is Phone.
  • name: The name of the property, which is 'Phone'.
  • type: The type of the property, which is 'phone'.
  • displayName: A function that returns the translated display name for the property.
  • canFilter: A boolean value indicating whether this property can be used for filtering.
  • filterValueType: The type of value used for filtering, which is '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 Phone from './phone'

export default class PhoneProperty extends PropertyType {
    Editor = Phone
    name = 'Phone'
    type = 'phone' as PropertyTypeEnum
    displayName = (intl: IntlShape) => intl.formatMessage({id: 'PropertyType.Phone', defaultMessage: 'Phone'})
    canFilter = true
    filterValueType = 'text' as FilterValueType
}