main

mattermost/focalboard

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

property.tsx

TLDR

This file contains a class named PersonProperty that extends PropertyType and defines properties and methods related to a person property.

Classes

PersonProperty

The PersonProperty class represents a person property. It extends the PropertyType class and defines the following properties/methods:

  • Editor: A reference to the Person component.
  • name: The name of the property (set to "Person").
  • type: The type of the property (set to "person").
  • displayName: A function that returns the localized display name of the property.
  • canFilter: A boolean indicating whether the property can be used for filtering.
  • filterValueType: The type of the value used for filtering (set to "person").
  • canGroup: A boolean indicating whether the property can be used for grouping.
// 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 Person from './person'

export default class PersonProperty extends PropertyType {
    Editor = Person
    name = 'Person'
    type = 'person' as PropertyTypeEnum
    displayName = (intl: IntlShape) => intl.formatMessage({id: 'PropertyType.Person', defaultMessage: 'Person'})
    canFilter = true
    filterValueType = 'person' as FilterValueType
    canGroup = true
}