How to use the megadraft.MegadraftPlugin function in megadraft

To help you get started, we’ve selected a few megadraft examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github globocom / megadraft-table-plugin / lib / Block.js View on Github external
var _TableManagerModal2 = _interopRequireDefault(_TableManagerModal);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                * Copyright (c) 2017, Globo.com 
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                * License: MIT
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                */

var BlockContent = _megadraft.MegadraftPlugin.BlockContent,
    CommonBlock = _megadraft.MegadraftPlugin.CommonBlock;

var TableBlock = function (_Component) {
  _inherits(TableBlock, _Component);

  function TableBlock(props) {
    _classCallCheck(this, TableBlock);

    var _this = _possibleConstructorReturn(this, (TableBlock.__proto__ || Object.getPrototypeOf(TableBlock)).call(this, props));

    _this._handleEdit = _this._handleEdit.bind(_this);
    _this._onModalClose = _this._onModalClose.bind(_this);
    _this._onSave = _this._onSave.bind(_this);

    _this.state = {
      isEditing: false
github globocom / megadraft-table-plugin / lib / Block.js View on Github external
var _TableManagerModal2 = _interopRequireDefault(_TableManagerModal);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                * Copyright (c) 2017, Globo.com 
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                *
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                * License: MIT
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                */

var BlockContent = _megadraft.MegadraftPlugin.BlockContent,
    CommonBlock = _megadraft.MegadraftPlugin.CommonBlock;

var TableBlock = function (_Component) {
  _inherits(TableBlock, _Component);

  function TableBlock(props) {
    _classCallCheck(this, TableBlock);

    var _this = _possibleConstructorReturn(this, (TableBlock.__proto__ || Object.getPrototypeOf(TableBlock)).call(this, props));

    _this._handleEdit = _this._handleEdit.bind(_this);
    _this._onModalClose = _this._onModalClose.bind(_this);
    _this._onSave = _this._onSave.bind(_this);

    _this.state = {
      isEditing: false
    };