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

Package detail

dmn-js-properties-panel

bpmn-io18.4kMIT3.7.0

A properties panel for dmn-js

bpmn-io, dmn-js, properties, properties-panel

readme

dmn-js-properties-panel

CI

This is properties panel extension for dmn-js.

dmn-js-properties-panel screenshot

Features

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

Some of the features are:

  • Edit element ids and names
  • Edit execution related Camunda properties
  • Redo and undo (plugs into the dmn-js editing cycle)

Usage

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

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

Bootstrap dmn-js with the properties panel, and a properties provider:

import DmnModeler from 'dmn-js/lib/Modeler';

import {
  DmnPropertiesPanelModule,
  DmnPropertiesProviderModule,
} from 'dmn-js-properties-panel';

var dmnModeler = new DmnModeler({
  drd: {
    propertiesPanel: {
      parent: '#properties'
    },
    additionalModules: [
      DmnPropertiesPanelModule,
      DmnPropertiesProviderModule
    ]
  },
  container: '#canvas'
});

Dynamic Attach/Detach

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

var propertiesPanel = dmnJS.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-dmn-moddle.

import DmnModeler from 'dmn-js/lib/Modeler';
import {
  DmnPropertiesPanelModule,
  DmnPropertiesProviderModule,
  CamundaPropertiesProviderModule
} from 'dmn-js-properties-panel';


// use Camunda properties provider
import CamundaPropertiesProvider from 'src/provider/camunda';

// a descriptor that defines Camunda related DMN 1.1 XML extensions
import camundaModdleDescriptor from 'camunda-dmn-moddle/resources/camunda';

var dmnModeler = new DmnModeler({
  drd: {
    propertiesPanel: {
      parent: '#properties'
    },
    additionalModules: [
      DmnPropertiesPanelModule,
      DmnPropertiesProviderModule,
      CamundaPropertiesProviderModule
    ]
  },
  container: '#canvas'
  // 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 dmn-js-properties-panel are documented here. We use semantic versioning for releases.

Unreleased

_Note: Yet to be released changes appear here._

3.7.0

  • FEAT: make properties panel focusable (#108)

3.6.0

  • CHORE: turn diagram-js into peer dependency

3.5.2

  • FIX: fix name of Zeebe provider (7482ac8b)

3.5.1

  • CHORE: export Zeebe provider (e53271bc)

3.5.0

  • FEAT: add Version tag field for decisions (#97)

3.4.1

  • FIX: make name field a text area (#94)

3.4.0

  • DEPS: update to @bpmn-io/properties-panel@3.22.0

3.3.2

  • FIX: keep missing ID error in plain DMN (#85)

3.3.1

  • FIX: keep missing ID error (#85)

3.3.0

  • FEAT: add HTTL hint (#82)

3.2.1

  • FIX: provide correct styles file (#65)

3.2.0

  • FEAT: support documentation fields (#62)

3.1.0

  • DEPS: update to @bpmn-io/properties-panel@3.7

3.0.0

2.0.0

  • FEAT: do not handle properties panel open state
  • DEPS: update to @bpmn-io/properties-panel@2
  • DEPS: update to diagram-js@12

Breaking Changes

  • Properties panel open state is no longer controlled by properties panel.

1.3.2

  • DEPS: update dependencies

1.3.1

  • DEPS: support dmn-js@14

1.3.0

  • FEAT: support JQuery wrapper as parent element
  • DEPS: update to diagram-js@11
  • DEPS: require @bpmn-io/properties-panel@1

1.2.2

  • DEPS: support @bpmn-io/properties-panel@0.24.0
  • CHORE: relax peer dependency requirements

1.2.1

  • DEPS: support @bpmn-io/properties-panel@0.23.0

1.2.0

  • DEPS: support dmn-js@13
  • DEPS: support @bpmn-io/properties-panel@0.22.0

1.1.2

  • DEPS: update to @bpmn-io/properties-panel@0.20.1 (changelog)

1.1.1

1.1.0

  • FEAT: add multi state + empty placeholders (#42)
  • DEPS: update to @bpmn-io/properties-panel@0.15.0 (changelog)

1.0.0

  • FEAT: rewrite project to new, @bpmn-io/properties-panel-based architecture
  • FEAT: replace tabs with flat structure where groups are basic building blocks
  • FEAT: add "dirty" markers to notify non-default value of entry/entries in group
  • FEAT: keep open/closed state of the groups between elements

Breaking Changes

  • PropertiesProvider#getTabs is no longer used. Migrate to the new PropertiesProvider#getGroups API instead. Check out the example migration for guidance.
  • Previously exported entry factory functions are no longer available. Use components exported from @bpmn-io/properties-panel instead.
  • Adapters have been removed. The properties panel is now available only for DRD viewer.

0.7.0

  • FEAT: incorporate reduced color palette (#27)
  • FEAT: inherit font family in inputs (#25)
  • FIX: don't use browser defaults for undo+redo (#24)
  • DEPS: update to `diagram-js@7.8.2`
  • DEPS: update to `dmn-js@11.1.2`

0.6.2

0.6.1

  • FIX: preserve Windows newline characters (#21)
  • DEPS: update dev dependencies

0.6.0

Breaking Changes

  • Dropped IE 11 support with `dmn-js@9.0.0`. Migrate to modern browsers or use <=0.5 version.

0.5.0

  • FEAT: align with Camunda Modeler colors (#18)

0.4.0

0.3.5

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

0.3.4

  • FIX: Do not allow placeholders in IDs (#13)

0.3.3

  • CHORE: mark as dmn-js@7 compatible

0.3.1

  • FIX: Support line breaks in Entry Field Description (#12)

0.3.0

  • FEAT: sanitize entities when building HTML (#9)
  • FEAT: add hint about decision definition key
  • FIX: remove accidentially added whitespace
  • FEAT: translate error messages

0.2.0

  • CHORE: mark as compatible with dmn-js@6
  • FIX: don't restrict properties panel height unnecessarily (#5)

0.1.2

  • FIX: properly namespace font to dmn-js-pp

0.1.1

  • FIX: use lodash in a way that allows tree-shaking (#2)

0.1.0

Initial version.

  • FEAT: edit basic Definitions and Decision attributes
  • FEAT: edit Camunda properties 73d31241