How to use the diagram-js/lib/features/selection.default function in diagram-js

To help you get started, we’ve selected a few diagram-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 / bpmn-js-properties-panel / test / spec / provider / bpmn / ElementNameSpec.js View on Github external
'use strict';

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

var TestContainer = require('mocha-test-container-support');

/* global bootstrapModeler, inject */

var propertiesPanelModule = require('lib'),
    domQuery = require('min-dom').query,
    coreModule = require('bpmn-js/lib/core').default,
    selectionModule = require('diagram-js/lib/features/selection').default,
    modelingModule = require('bpmn-js/lib/features/modeling').default,
    propertiesProviderModule = require('lib/provider/bpmn'),
    getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject;

function getEntry(container, entryId) {
  return domQuery('div[data-entry="' + entryId + '"]', container);
}

function getNameField(container) {
  var selector = 'div[name=name]';
  return domQuery(selector, getEntry(container, 'name'));
}

function getTextBoxRows(field) {
  var innerText = field.innerText || '';
  var lines = innerText.split(/\r?\n/g);
github bpmn-io / bpmn-js-properties-panel / test / spec / provider / camunda / ServiceTaskDelegateSpec.js View on Github external
'use strict';

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

var TestContainer = require('mocha-test-container-support');

/* global bootstrapModeler, inject */

var propertiesPanelModule = require('lib'),
    domQuery = require('min-dom').query,
    domQueryAll = require('min-dom').queryAll,
    coreModule = require('bpmn-js/lib/core').default,
    selectionModule = require('diagram-js/lib/features/selection').default,
    modelingModule = require('bpmn-js/lib/features/modeling').default,
    propertiesProviderModule = require('lib/provider/camunda'),
    camundaModdlePackage = require('camunda-bpmn-moddle/resources/camunda'),
    getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject;

describe('service-task-delegate-properties', function() {

  var diagramXML = require('./ServiceTaskDelegate.bpmn');

  var testModules = [
    coreModule, selectionModule, modelingModule,
    propertiesPanelModule,
    propertiesProviderModule
  ];

  var container;
github bpmn-io / bpmn-js-properties-panel / test / spec / provider / camunda / JobPrioritySpec.js View on Github external
'use strict';

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

var TestContainer = require('mocha-test-container-support');

/* global bootstrapModeler, inject */

var propertiesPanelModule = require('lib'),
    domQuery = require('min-dom').query,
    coreModule = require('bpmn-js/lib/core').default,
    selectionModule = require('diagram-js/lib/features/selection').default,
    modelingModule = require('bpmn-js/lib/features/modeling').default,
    propertiesProviderModule = require('lib/provider/camunda'),
    camundaModdlePackage = require('camunda-bpmn-moddle/resources/camunda'),
    getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject;

describe('jobPriority', function() {
  var diagramXML = require('./JobPriority.bpmn');

  var testModules = [
    coreModule, selectionModule, modelingModule,
    propertiesPanelModule,
    propertiesProviderModule
  ];

  var container;
github bpmn-io / bpmn-js-properties-panel / test / spec / provider / camunda / FormFieldTypeSpec.js View on Github external
'use strict';

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

var TestContainer = require('mocha-test-container-support');

/* global bootstrapModeler, inject */

var propertiesPanelModule = require('lib'),
    propertiesProviderModule = require('lib/provider/camunda'),
    selectionModule = require('diagram-js/lib/features/selection').default,
    modelingModule = require('bpmn-js/lib/features/modeling').default,
    coreModule = require('bpmn-js/lib/core').default;

var getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject;

var camundaModdlePackage = require('camunda-bpmn-moddle/resources/camunda');

var domQuery = require('min-dom').query,
    domClasses = require('min-dom').classes;


function getFormFieldType(element) {
  var bo = getBusinessObject(element);

  return bo.extensionElements.values[0].fields[0].type;
}
github bpmn-io / bpmn-js-properties-panel / test / spec / provider / camunda / VersionTagSpec.js View on Github external
'use strict';

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

var TestContainer = require('mocha-test-container-support');

/* global bootstrapModeler, inject */

var propertiesPanelModule = require('lib'),
    domQuery = require('min-dom').query,
    coreModule = require('bpmn-js/lib/core').default,
    selectionModule = require('diagram-js/lib/features/selection').default,
    modelingModule = require('bpmn-js/lib/features/modeling').default,
    propertiesProviderModule = require('lib/provider/camunda'),
    camundaModdlePackage = require('camunda-bpmn-moddle/resources/camunda'),
    getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject;


describe('Version-Tag', function() {

  var diagramXML = require('./VersionTag.bpmn');

  var testModules = [
    coreModule, selectionModule, modelingModule,
    propertiesPanelModule,
    propertiesProviderModule
  ];
github bpmn-io / bpmn-js-properties-panel / test / spec / provider / camunda / InputOutputParameterListSpec.js View on Github external
'use strict';

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

var TestContainer = require('mocha-test-container-support');

/* global bootstrapModeler, inject */

var propertiesPanelModule = require('lib'),
    coreModule = require('bpmn-js/lib/core').default,
    selectionModule = require('diagram-js/lib/features/selection').default,
    modelingModule = require('bpmn-js/lib/features/modeling').default,
    propertiesProviderModule = require('lib/provider/camunda'),
    camundaModdlePackage = require('camunda-bpmn-moddle/resources/camunda');

var ModelUtil = require('bpmn-js/lib/util/ModelUtil'),
    is = ModelUtil.is,
    getBusinessObject = ModelUtil.getBusinessObject;

var extensionElementsHelper = require('lib/helper/ExtensionElementsHelper');

var domQuery = require('min-dom').query,
    domQueryAll = require('min-dom').queryAll;


// MODEL HELPER
github bpmn-io / bpmn-js-properties-panel / test / spec / provider / bpmn / CompensationEventProcessSpec.js View on Github external
'use strict';

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

var TestContainer = require('mocha-test-container-support');

/* global bootstrapModeler, inject */

var propertiesPanelModule = require('lib'),
    domQuery = require('min-dom').query,
    coreModule = require('bpmn-js/lib/core').default,
    selectionModule = require('diagram-js/lib/features/selection').default,
    modelingModule = require('bpmn-js/lib/features/modeling').default,
    propertiesProviderModule = require('lib/provider/bpmn'),
    getBusinessObject = require('bpmn-js/lib/util/ModelUtil').getBusinessObject,
    find = require('lodash/find'),
    eventDefinitionHelper = require('lib/helper/EventDefinitionHelper');


function getGeneralTab(container) {
  return domQuery('div[data-tab="general"]', container);
}

function getGroup(container, groupId) {
  var tab = getGeneralTab(container);
  return domQuery('div[data-group="' + groupId + '"]', tab);
}
github bpmn-io / bpmn-js-properties-panel / test / spec / provider / camunda / InputOutputSpec.js View on Github external
'use strict';

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

var TestContainer = require('mocha-test-container-support');

/* global bootstrapModeler, inject */

var propertiesPanelModule = require('lib'),
    coreModule = require('bpmn-js/lib/core').default,
    selectionModule = require('diagram-js/lib/features/selection').default,
    modelingModule = require('bpmn-js/lib/features/modeling').default,
    propertiesProviderModule = require('lib/provider/camunda'),
    camundaModdlePackage = require('camunda-bpmn-moddle/resources/camunda');

var ModelUtil = require('bpmn-js/lib/util/ModelUtil'),
    is = ModelUtil.is,
    getBusinessObject = ModelUtil.getBusinessObject;

var extensionElementsHelper = require('lib/helper/ExtensionElementsHelper');

var domQuery = require('min-dom').query,
    domQueryAll = require('min-dom').queryAll,
    domClasses = require('min-dom').classes;

var find = require('lodash/find');
github bpmn-io / cmmn-js / lib / features / replace / index.js View on Github external
module.exports = {
  __depends__: [
    require('diagram-js/lib/features/popup-menu').default,
    require('diagram-js/lib/features/replace').default,
    require('diagram-js/lib/features/selection').default
  ],
  cmmnReplace: [ 'type', require('./CmmnReplace') ]
};
github bpmn-io / cmmn-js / lib / features / modeling / index.js View on Github external
module.exports = {
  __init__: [ 'modeling', 'cmmnUpdater' ],
  __depends__: [
    require('./behavior'),
    require('../ordering'),
    require('../replace'),
    require('../rules'),
    require('diagram-js/lib/command').default,
    require('diagram-js/lib/features/selection').default,
    require('diagram-js/lib/features/label-support').default,
    require('diagram-js/lib/features/attach-support').default,
    require('diagram-js/lib/features/change-support').default
  ],
  cmmnFactory: [ 'type', require('./CmmnFactory') ],
  cmmnUpdater: [ 'type', require('./CmmnUpdater') ],
  elementFactory: [ 'type', require('./ElementFactory') ],
  modeling: [ 'type', require('./Modeling') ],
  layouter: [ 'type', require('./CmmnLayouter') ],
  connectionDocking: [ 'type', require('diagram-js/lib/layout/CroppingConnectionDocking').default ]
};