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

Package detail

cmmn-js

bpmn-io6.6kSEE LICENSE IN LICENSE0.20.0

A cmmn 1.1 toolkit

cmmn, cmmn-js, toolkit

readme

cmmn-js - CMMN 1.1 for the web

Build Status

View and edit CMMN 1.1 diagrams in the browser.

Installation

Use the library pre-packaged or include it via npm into your node-style web-application.

Usage

To get started, create a cmmn-js instance and render CMMN 1.1 diagrams in the browser:

var xml; // my CMMN 1.1 xml
var viewer = new CmmnJS({
  container: 'body'
});

viewer.importXML(xml, function(err) {

  if (err) {
    console.log('error rendering', err);
  } else {
    console.log('rendered');
  }
});

Checkout our examples for many more supported usage scenarios.

Dynamic Attach/Detach

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

var viewer = new CmmnJS();

// attach it to some element
viewer.attachTo('#container');

// detach the panel
viewer.detach();

Resources

Building the Project

Perform the following steps to build the library, including running all tests:

cd cmmn-js
npm install
npm run all

You may need to perform additional project setup when building the latest development snapshot.

Please checkout our contributing guidelines if you plan to file an issue or pull request.

cmmn-js builds on top of a few additional powerful tools:

  • cmmn-moddle: Read / write support for CMMN 1.1 XML in the browsers
  • diagram-js: Diagram rendering and editing toolkit

License

Use under the terms of the bpmn.io license.

changelog

Changelog

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

Unreleased

_Note: Yet to be released changes appear here._

0.20.0

  • CHORE: apply new project watermark
  • CHORE: clarify license terms

0.19.2

  • FIX: es5ify

0.19.1

  • FIX: provide missing connection.updateWaypoints rule

0.19.0

  • FEAT: improve connect snapping
  • FEAT: snap to source and target dockings
  • FEAT: add connect previews
  • CHORE: bump to `diagram-js@4.0.1`

0.18.1

  • FIX: prevent HTML injection in search
  • FIX: prevent HTML injection in direct editing component
  • CHORE: bump to `diagram-js@3.3.1`

0.18.0

0.17.1

0.17.0

  • FEAT: add lifecycle events for Viewer#saveXML
  • CHORE: bump to `diagram-js@3.1`

0.16.0

  • FEAT: add ability to move selection with keyboard arrows
  • FEAT: support SHIFT modifier to move elements / canvas with keyboard arrows at accelerated speed
  • FEAT: require Ctrl/Cmd to be pressed as a modifier key to move the canvas via keyboard errors
  • FEAT: auto-expand elements when children resize
  • CHORE: bind editor actions and keyboard shortcuts for explicitly added features only
  • CHORE: update to diagram-js@3.0.0

Breaking Changes

  • CmmnGlobalConnect provider got removed. Use connection.start rule to decide whether an element can start a connection.
  • EditorActions / Keyboard do not pull in features implicitly anymore. If you roll your own editor, include features you would like to ship with manually to provide the respective actions / keyboard bindings.
  • Moving the canvas with keyboard arrows now requires the Ctrl/Cmd modifiers to be pressed.

0.15.2

  • FIX: correct horizontal embedded label alignment

0.15.1

  • FIX: correct case plan model label positioning

0.15.0

0.14.5

  • CHORE: bump dependency versions
  • FIX: correct line-breaks vanishing during direct editing in IE

0.14.4

  • CHORE: update to `diagram-js@1.3.0`
  • FIX: focus label editing box on element creation

0.14.3

  • FIX: escape data-element-id in CSS selectors

0.14.2

  • CHORE: be able to consume library without add-module-exports transform

0.14.1

Rebuild of un-published v0.14.0.

0.14.0

Breaking Changes

  • CHORE: migrate to diagram-js@1
  • FEAT: build upon ES module foundations. You must use babelify + babel-plugin-add-module-exports to build custom variants of cmmn-js now

0.13.0

...

Check git log for earlier history.