@atlaskit/editor-plugin-table
Version:
Table plugin for the @atlaskit/editor
71 lines (65 loc) • 1.68 kB
JavaScript
import { BACKGROUND_COLOR_ITEM, CLEAR_CELLS_ITEM } from '../shared/keys';
// --- Menu surface ---
export const CELL_MENU = {
type: 'menu',
key: 'cell-contextual-menu'
};
// --- Sections ---
export const CELL_ACTION_SECTION = {
type: 'menu-section',
key: 'cell-action-section'
};
export const CELL_DANGER_SECTION = {
type: 'menu-section',
key: 'cell-danger-section'
};
export const CELL_MENU_RANK = {
[]: 100,
[]: 200
};
export const MERGE_CELLS_ITEM = {
type: 'menu-item',
key: 'merge-cells'
};
export const SPLIT_CELL_ITEM = {
type: 'menu-item',
key: 'split-cell'
};
export const VERTICAL_ALIGN_MENU = {
type: 'nested-menu',
key: 'vertical-align'
};
export const VERTICAL_ALIGN_MENU_SECTION = {
type: 'menu-section',
key: 'vertical-align-section'
};
export const VERTICAL_ALIGN_TOP_ITEM = {
type: 'menu-item',
key: 'vertical-align-top'
};
export const VERTICAL_ALIGN_MIDDLE_ITEM = {
type: 'menu-item',
key: 'vertical-align-middle'
};
export const VERTICAL_ALIGN_BOTTOM_ITEM = {
type: 'menu-item',
key: 'vertical-align-bottom'
};
// --- Item ranks within their sections ---
export const CELL_ACTION_SECTION_RANK = {
[]: 100,
[]: 200,
[]: 300,
[]: 400
};
export const VERTICAL_ALIGN_MENU_RANK = {
[]: 100
};
export const VERTICAL_ALIGN_MENU_SECTION_RANK = {
[]: 100,
[]: 200,
[]: 300
};
export const CELL_DANGER_SECTION_RANK = {
[]: 100
};