Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

cmmn-js-properties-panel

bpmn-io1.8kMIT0.9.0

A simple properties panel for cmmn-js

cmmn-js, properties, properties-panel

readme

cmmn-js-properties-panel

CI

This is properties panel extension for cmmn-js.

Features

The properties panel allows users to edit invisible CMMN properties in a convenient way.

Usage

Provide two HTML elements, one for the properties panel and one for the CMMN diagram:

<div class="modeler">
  <div id="canvas"></div>
  <div id="properties"></div>
</div>

Bootstrap cmmn-js with the properties panel and a properties provider:

var CmmnJS = require('cmmn-js/lib/Modeler'),
    propertiesPanelModule = require('cmmn-js-properties-panel'),
    propertiesProviderModule = require('cmmn-js-properties-panel/lib/provider/cmmn');

var cmmnJS = new CmmnJS({
  additionalModules: [
    propertiesPanelModule,
    propertiesProviderModule
  ],
  container: '#canvas',
  propertiesPanel: {
    parent: '#properties'
  }
});

Dynamic Attach/Detach

You may attach or detach the properties panel dynamically to any element on the page, too:

var propertiesPanel = cmmnJS.get('propertiesPanel');

// detach the panel
propertiesPanel.detach();

// attach it to some other element
propertiesPanel.attachTo('#other-properties');

Use with Camunda properties

In order to be able to edit Camunda related properties, use the camunda properties provider. In addition, you need to define the camunda namespace via camunda-cmmn-moddle.

var CmmnJS = require('cmmn-js/lib/Modeler'),
    propertiesPanelModule = require('cmmn-js-properties-panel'),
    // use Camunda properties provider
    propertiesProviderModule = require('cmmn-js-properties-panel/lib/provider/camunda');

// a descriptor that defines Camunda related CMMN 1.1 XML extensions
var camundaModdleDescriptor = require('camunda-cmmn-moddle/resources/camunda');

var cmmnJS = new CmmnJS({
  additionalModules: [
    propertiesPanelModule,
    propertiesProviderModule
  ],
  container: '#canvas',
  propertiesPanel: {
    parent: '#properties'
  },
  // make camunda prefix known for import, editing and export
  moddleExtensions: {
    camunda: camundaModdleDescriptor
  }
});

...

Additional Resources

Development

Running the tests

npm install

export TEST_BROWSERS=Chrome
npm run all

License

MIT

changelog

Changelog

All notable changes to cmmn-js-properties-panel are documented here. We use semantic versioning for releases.

Unreleased

_Note: Yet to be released changes appear here._

0.9.0

  • FEAT: add localization support (#71)
  • FIX: always past plain text (#70)

0.8.3

  • FIX: paste always as plain text (#70)

0.8.2

  • FIX: deprecate placeholders in IDs (#69)

0.8.1

  • FIX: support line breaks in Entry Field Description (#65)

0.8.0

  • FEAT: sanitize entities when building HTML (#63)

0.7.2

  • CHORE: move npm-run-all to dev-dependencies

0.7.1

0.7.0

  • CHORE: mark as compatible with `cmmn-js@0.16`
  • FIX: don't restrict properties panel height unnecessarily (#61)

0.6.0

  • FEAT: provide pre-built styles
  • CHORE: bump dependency versions
  • CHORE: migrate to lodash@4

...

Check git log for earlier history.