@platform/ui.datagrid
Version:
Isolated tabular DataGrid.
78 lines (77 loc) • 2.55 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.DEFAULT = exports.CSS = exports.UNKNOWN = exports.MONOSPACE = exports.ROBOTO = exports.COLORS = void 0;
var tslib_1 = require("tslib");
var constants_1 = require("@platform/ui.datagrid.util/lib/common/constants");
exports.COLORS = (0, tslib_1.__assign)({}, constants_1.COLORS);
var constants_2 = require("@platform/ui.text/lib/common/constants");
Object.defineProperty(exports, "ROBOTO", { enumerable: true, get: function () { return constants_2.ROBOTO; } });
Object.defineProperty(exports, "MONOSPACE", { enumerable: true, get: function () { return constants_2.MONOSPACE; } });
exports.UNKNOWN = 'UNKNOWN';
exports.CSS = {
CLASS: {
GRID: {
BASE: 'p-dg',
EDITOR: 'p-dg-editor',
FIRST: {
ROW: 'p-dg-firstRow',
COLUMN: 'p-dg-firstColumn',
},
},
CELL: {
MARKDOWN: 'p-editor-markdown',
BASE: 'p-dg-cell',
DEFAULT: 'p-dg-cell-default',
EDITOR: 'p-dg-cellEditor',
BOLD: 'p-dg-cell-bold',
ITALIC: 'p-dg-cell-italic',
UNDERLINE: 'p-dg-cell-underline',
FORMULA: 'p-dg-cell-formula',
ERROR: 'p-dg-cell-error',
},
EDITOR: {
BASE: 'p-dg-cellEditor',
DEFAULT: 'p-dg-cellEditor-default',
},
SCREEN: {
BASE: 'p-dg-cellScreen',
DEFAULT: 'p-dg-cellScreen-default',
},
},
};
var KEY_BINDINGS = [
{ command: 'CUT', key: 'Meta+X' },
{ command: 'COPY', key: 'Meta+C' },
{ command: 'PASTE', key: 'Meta+V' },
{ command: 'BOLD', key: 'Meta+B' },
{ command: 'ITALIC', key: 'Meta+I' },
{ command: 'UNDERLINE', key: 'Meta+U' },
];
var CELL_PROPS = {
style: { bold: false, italic: false, underline: false },
merge: { rowspan: 1, colspan: 1 },
view: {
cell: { type: 'DEFAULT', className: exports.CSS.CLASS.CELL.DEFAULT },
editor: { type: 'DEFAULT', className: exports.CSS.CLASS.EDITOR.DEFAULT },
screen: { type: 'DEFAULT', className: exports.CSS.CLASS.SCREEN.DEFAULT },
},
};
var NS = { id: exports.UNKNOWN };
exports.DEFAULT = {
NS: NS,
KEY_BINDINGS: KEY_BINDINGS,
TOTAL_COLUMNS: 52,
TOTAL_ROWS: 1000,
ROW: {
HEIGHT: 26,
HEIGHT_MIN: 26,
},
COLUMN: {
WIDTH: 120,
WIDTH_MIN: 5,
},
CELL: {
RENDERER: 'cell',
PROPS: CELL_PROPS,
},
};