1
0
mirror of https://github.com/mattermost/focalboard.git synced 2025-01-23 18:34:02 +02:00
focalboard/webapp/src/constants.ts
kamre 4ebb35cf0f
[GH-2442] Improve performance for table column resize (#3032)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-05-16 15:51:17 -05:00

196 lines
5.1 KiB
TypeScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {TelemetryActions} from './telemetry/telemetryClient'
enum Permission {
ManageBoardType = 'manage_board_type',
DeleteBoard = 'delete_board',
ShareBoard = 'share_board',
ManageBoardRoles = 'manage_board_roles',
ManageBoardCards = 'manage_board_cards',
ManageBoardProperties = 'manage_board_properties',
ViewBoard = 'view_board',
}
class Constants {
static readonly menuColors: {[key: string]: string} = {
propColorDefault: 'Default',
propColorGray: 'Gray',
propColorBrown: 'Brown',
propColorOrange: 'Orange',
propColorYellow: 'Yellow',
propColorGreen: 'Green',
propColorBlue: 'Blue',
propColorPurple: 'Purple',
propColorPink: 'Pink',
propColorRed: 'Red',
}
static readonly minColumnWidth = 100
static readonly defaultTitleColumnWidth = 280
static readonly tableHeaderId = '__header'
static readonly tableCalculationId = '__calculation'
static readonly titleColumnId = '__title'
static readonly badgesColumnId = '__badges'
static readonly versionString = '7.2.0'
static readonly versionDisplayString = 'Aug 2022'
static readonly archiveHelpPage = 'https://docs.mattermost.com/boards/data-and-archives.html'
static readonly imports = [
{
id: 'trello',
displayName: 'Trello',
telemetryName: TelemetryActions.ImportTrello,
href: Constants.archiveHelpPage + '#import-from-trello',
},
{
id: 'asana',
displayName: 'Asana',
telemetryName: TelemetryActions.ImportAsana,
href: Constants.archiveHelpPage + '#import-from-asana',
},
{
id: 'notion',
displayName: 'Notion',
telemetryName: TelemetryActions.ImportNotion,
href: Constants.archiveHelpPage + '#import-from-notion',
},
{
id: 'jira',
displayName: 'Jira',
telemetryName: TelemetryActions.ImportJira,
href: Constants.archiveHelpPage + '#import-from-jira',
},
{
id: 'todoist',
displayName: 'Todoist',
telemetryName: TelemetryActions.ImportTodoist,
href: Constants.archiveHelpPage + '#import-from-todoist',
},
]
static readonly languages = [
{
code: 'en',
name: 'english',
displayName: 'English',
},
{
code: 'es',
name: 'spanish',
displayName: 'Español',
},
{
code: 'de',
name: 'german',
displayName: 'Deutsch',
},
{
code: 'ja',
name: 'japanese',
displayName: '日本語',
},
{
code: 'fr',
name: 'french',
displayName: 'Français',
},
{
code: 'nl',
name: 'dutch',
displayName: 'Nederlands',
},
{
code: 'ru',
name: 'russian',
displayName: 'Pусский',
},
{
code: 'zh-cn',
name: 'chinese',
displayName: '中文 (繁體)',
},
{
code: 'zh-tw',
name: 'simplified-chinese',
displayName: '中文 (简体)',
},
{
code: 'tr',
name: 'turkish',
displayName: 'Türkçe',
},
{
code: 'oc',
name: 'occitan',
displayName: 'Occitan',
},
{
code: 'pt_BR',
name: 'portuguese',
displayName: 'Português (Brasil)',
},
{
code: 'ca',
name: 'catalan',
displayName: 'Català',
},
{
code: 'el',
name: 'greek',
displayName: 'Ελληνικά',
},
{
code: 'id',
name: 'indonesian',
displayName: 'bahasa Indonesia',
},
{
code: 'it',
name: 'italian',
displayName: 'Italiano',
},
{
code: 'sv',
name: 'swedish',
displayName: 'Svenska',
},
]
static readonly keyCodes: {[key: string]: [string, number]} = {
COMPOSING: ['Composing', 229],
A: ['a', 65],
B: ['b', 66],
C: ['c', 67],
D: ['d', 68],
E: ['e', 69],
F: ['f', 70],
G: ['g', 71],
H: ['h', 72],
I: ['i', 73],
J: ['j', 74],
K: ['k', 75],
L: ['l', 76],
M: ['m', 77],
N: ['n', 78],
O: ['o', 79],
P: ['p', 80],
Q: ['q', 81],
R: ['r', 82],
S: ['s', 83],
T: ['t', 84],
U: ['u', 85],
V: ['v', 86],
W: ['w', 87],
X: ['x', 88],
Y: ['y', 89],
Z: ['z', 90],
}
static readonly globalTeamId = '0'
}
export {Constants, Permission}