How to use table-js - 10 common examples

To help you get started, we’ve selected a few table-js 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 bpmn-io / dmn-js / test / spec / table / features / literal-expression / LiteralExpressionSpec.js View on Github external
'use strict';

require('../../TestHelper');

var DOMEvents = require('table-js/test/util/DOMEvents'),
    createEvent = DOMEvents.createEvent;

/* global bootstrapModeler, inject */

var basicXML = require('../../../../fixtures/dmn/literal-expression.dmn');

describe('features/literal-expression', function() {
  var modeler;

  beforeEach(function(done) {
    modeler = bootstrapModeler(basicXML)(done);
  });

  it('should should show the literal expression editor', inject(function(sheet) {
    expect(sheet.getContainer().querySelector('.literal-expression-editor')).to.exist;
  }));
github bpmn-io / dmn-js / test / spec / table / features / simple-mode / SimpleModeSpec.js View on Github external
var activatedSpy = sinon.spy(function() {}),
            deactivatedSpy = sinon.spy(function() {});

        var button = simpleMode._node;

        eventBus.on('simpleMode.activated', activatedSpy);
        eventBus.on('simpleMode.deactivated', deactivatedSpy);

        // when
        mouseEvent('click', button);

        // then
        expect(deactivatedSpy).to.have.been.called;

        // when
        mouseEvent('click', button);

        // then
        expect(activatedSpy).to.have.been.called;
      }));
github bpmn-io / dmn-js / lib / table / Viewer.js View on Github external
moddle: [ 'value', moddle ]
  });

  options = omit(options, 'additionalModules');

  options = assign(options, {
    sheet: {
      width: options.width,
      height: options.height,
      container: container
    },
    modules: modules
  });

  // invoke table constructor
  Table.call(this, options);
};
github bpmn-io / dmn-js / lib / table / Viewer.js View on Github external
Viewer.prototype.destroy = function() {

  // table destroy
  Table.prototype.destroy.call(this);

  // dom detach
  domRemove(this.container);
};
github bpmn-io / dmn-js / test / util / EventUtils.js View on Github external
'use strict';

var TestHelper = require('../helper');

var DOMEvents = require('table-js/test/util/DOMEvents'),
    mouseEvent = DOMEvents.performMouseEvent,
    createEvent = DOMEvents.createEvent;


function clickElement(element, isMousedown) {
  return TestHelper.getDrdJS().invoke(function(elementRegistry) {

    var target = elementRegistry.getGraphics(element);

    if (!target) {
      target = element;
    }

    if (isMousedown) {
      mouseEvent('mousedown', target);
    } else {
      mouseEvent('click', target);
    }
github bpmn-io / dmn-js / packages / dmn-js-decision-table / src / features / decision-table-head / editor / components / OutputCellContextMenu.js View on Github external
constructor(props, context) {
    super(props, context);

    this.state = {};

    inject(this);

    this.persistChanges = this.debounceInput(this.persistChanges);
  }
github bpmn-io / dmn-js / packages / dmn-js-decision-table / src / features / decision-table-head / editor / components / InputCellContextMenu.js View on Github external
constructor(props, context) {
    super(props, context);

    this.state = {};

    inject(this);

    this.persistChanges = this.debounceInput(this.persistChanges);

    this._expressionLanguages = context.injector.get('expressionLanguages');
  }
github bpmn-io / dmn-js / packages / dmn-js-decision-table / src / features / add-rule / components / AddRuleFootComponent.js View on Github external
constructor(props, context) {
    super(props, context);

    inject(this);

    this.addRule = this.addRule.bind(this);
  }

table-js

> This library exposes [ES modules](http://exploringjs.com/es6/ch_modules.html#sec_basics-of-es6-modules). Use an ES module aware bundler such as [Webpack](https://webpack.js.org) or [Rollup](https://rollupjs.org) to bundle it for the browser.

MIT
Latest version published 2 months ago

Package Health Score

78 / 100
Full package analysis