UNPKG

@platform/ui.datagrid

Version:

Isolated tabular DataGrid.

20 lines (19 loc) 725 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var BindingMonitor_1 = require("./BindingMonitor"); function init(args) { var grid = args.grid; var fire = function (command, e, props) { if (props === void 0) { props = {}; } grid.command({ command: command, props: props, cancel: function () { return e.cancel(); } }); }; var bindings = new BindingMonitor_1.BindingMonitor({ grid: grid }); var monitor = function (command) { return bindings.monitor(command, function (e) { return fire(command, e); }); }; monitor('CUT'); monitor('COPY'); monitor('PASTE'); monitor('BOLD'); monitor('ITALIC'); monitor('UNDERLINE'); } exports.init = init;