@atlaskit/editor-plugin-table
Version:
Table plugin for the @atlaskit/editor
98 lines (92 loc) • 2.37 kB
JavaScript
import { BACKGROUND_COLOR_ITEM, CLEAR_CELLS_ITEM } from '../shared/keys';
// --- Menu surface ---
export const COLUMN_MENU = {
type: 'menu',
key: 'column-handle-menu'
};
// --- Sections ---
export const COLUMN_TOGGLE_SECTION = {
type: 'menu-section',
key: 'column-toggle-section'
};
export const COLUMN_BACKGROUND_SECTION = {
type: 'menu-section',
key: 'column-background-section'
};
export const COLUMN_SORT_SECTION = {
type: 'menu-section',
key: 'column-sort-section'
};
export const COLUMN_ADD_SECTION = {
type: 'menu-section',
key: 'column-add-section'
};
export const COLUMN_DANGER_SECTION = {
type: 'menu-section',
key: 'column-danger-section'
};
export const COLUMN_SECTION_RANK = {
[]: 100,
[]: 200,
[]: 300,
[]: 400,
[]: 500
};
export const HEADER_COLUMN_TOGGLE_ITEM = {
type: 'menu-item',
key: 'header-column-toggle'
};
export const SORT_INCREASING_ITEM = {
type: 'menu-item',
key: 'sort-increasing'
};
export const SORT_DECREASING_ITEM = {
type: 'menu-item',
key: 'sort-decreasing'
};
export const ADD_COLUMN_LEFT_ITEM = {
type: 'menu-item',
key: 'add-column-left'
};
export const ADD_COLUMN_RIGHT_ITEM = {
type: 'menu-item',
key: 'add-column-right'
};
export const MOVE_COLUMN_LEFT_ITEM = {
type: 'menu-item',
key: 'move-column-left'
};
export const MOVE_COLUMN_RIGHT_ITEM = {
type: 'menu-item',
key: 'move-column-right'
};
export const DISTRIBUTE_COLUMNS_ITEM = {
type: 'menu-item',
key: 'distribute-columns'
};
export const DELETE_COLUMN_ITEM = {
type: 'menu-item',
key: 'delete-column'
};
// --- Item ranks within their sections ---
export const COLUMN_TOGGLE_SECTION_RANK = {
[]: 100
};
export const COLUMN_BACKGROUND_SECTION_RANK = {
[]: 100
};
export const COLUMN_SORT_SECTION_RANK = {
[]: 100,
[]: 200
};
export const COLUMN_ADD_SECTION_RANK = {
[]: 100,
[]: 200,
[]: 300,
[]: 400,
[]: 500
};
export const COLUMN_DANGER_SECTION_RANK = {
[]: 100,
[]: 200
};