@atlaskit/editor-plugin-table
Version:
Table plugin for the @atlaskit/editor
81 lines (75 loc) • 1.85 kB
JavaScript
import { BACKGROUND_COLOR_ITEM, CLEAR_CELLS_ITEM } from '../shared/keys';
// --- Menu surface ---
export const ROW_MENU = {
type: 'menu',
key: 'row-handle-menu'
};
// --- Sections ---
export const ROW_TOGGLE_SECTION = {
type: 'menu-section',
key: 'row-toggle-section'
};
export const ROW_BACKGROUND_SECTION = {
type: 'menu-section',
key: 'row-background-section'
};
export const ROW_ADD_SECTION = {
type: 'menu-section',
key: 'row-add-section'
};
export const ROW_DANGER_SECTION = {
type: 'menu-section',
key: 'row-danger-section'
};
export const ROW_MENU_SECTION_RANK = {
[]: 100,
[]: 200,
[]: 300,
[]: 400
};
export const HEADER_ROW_TOGGLE_ITEM = {
type: 'menu-item',
key: 'header-row-toggle'
};
export const NUMBERED_ROWS_TOGGLE_ITEM = {
type: 'menu-item',
key: 'numbered-rows-toggle'
};
export const ADD_ROW_ABOVE_ITEM = {
type: 'menu-item',
key: 'add-row-above'
};
export const ADD_ROW_BELOW_ITEM = {
type: 'menu-item',
key: 'add-row-below'
};
export const MOVE_ROW_UP_ITEM = {
type: 'menu-item',
key: 'move-row-up'
};
export const MOVE_ROW_DOWN_ITEM = {
type: 'menu-item',
key: 'move-row-down'
};
export const DELETE_ROW_ITEM = {
type: 'menu-item',
key: 'delete-row'
};
// --- Item ranks within their sections ---
export const ROW_TOGGLE_SECTION_RANK = {
[]: 100,
[]: 200
};
export const ROW_BACKGROUND_SECTION_RANK = {
[]: 100
};
export const ROW_ADD_SECTION_RANK = {
[]: 100,
[]: 200,
[]: 300,
[]: 400
};
export const ROW_DANGER_SECTION_RANK = {
[]: 100,
[]: 200
};