Skip to content

Releases: process-analytics/bpmn-visualization-js

0.36.0

12 Jun 12:33
Compare
Choose a tag to compare

This new version brings several improvements, including enhancements to BPMN support (Ad-Hoc and Transition Sub-Processes), documentation updates, dependency updates, and maintenance. It also includes external contributions from community members.

Thanks to all the contributors of this release 🌈: @brendanlaschke, @csouchet and @tbouffard

See milestone 0.36.0 to get the list of issues covered by this release.

Highlights

🚀 BPMN support

Transition Sub-Process

We have introduced the support for the Transition Sub-Process.

See the image below for an example:

image

Ad-Hoc Sub-Process

We have also added the parsing functionality for the Ad-Hoc Sub-Process, although their visualization is not yet implemented.

⚠️ Please note that the rendering of the Ad-Hoc marker will be implemented in a future release.

See the image below for a representation:

image

External Contributions

We are excited to include the following external contributions in this release:

Vue Example

A new integration project for Vue has been contributed to the bpmn-visualization Examples repository.

vue-example

ℹ️ Check it out here.

Dependencies

We have addressed a security vulnerability related to fast-xml-parser (#2736).
It's important to note that bpmn-visualization itself is not vulnerable to this CVE as it doesn't use the processEntities feature implicated in the vulnerability.
However, we recommend updating your application to the latest version of bpmn-visualization for optimal security.

ℹ️ Further information can be found here.

Breaking changes

This release includes some breaking changes that affect applications extending or modifying the BPMN theme. These changes should be transparent, and no impact has been observed in the bpmn-visualization examples and demo.

  • In order to improve the implementation, the BpmnStyleIdentifier and MarkerIdentifier have been redefined as constant objects instead of classes.
    ℹ️ Refer to PR #2716 for more details.
  • The StyleDefaut enum has been replaced with a constant object.
    ℹ️ PR #2728 provides additional information about this modification.

⚠️ Review and update your codebase to accommodate these breaking changes if necessary.

Install Size for Development

The installation size of the library for development purposes has been decreased.
Comments and JSDoc have been removed from the ESM and IIFE (non-minified) bundles provided in the npm package.

image

ℹ️ For more information, you can refer to this pull request.

What's Changed

Full Changelog: v0.35.0...v0.36.0

🚀 BPMN support

📝 Documentation

📦 Dependency updates

  • chore(deps): bump @typed-mxgraph/typed-mxgraph from 1.0.7 to 1.0.8 (#2737) @csouchet
  • chore(deps): bump fast-xml-parser from 4.2.2 to 4.2.4 (#2736) @dependabot

👻 Maintenance

0.35.0

30 May 13:20
Compare
Choose a tag to compare

This new version introduces support for the "BPMN in color" specification and dependency changes.

Thanks to all the contributors of this release 🌈: @tbouffard

See milestone 0.35.0 to get the list of issues covered by this release.

Highlights

Support for the BPMN in Color specification

The "BPMN in Color" specification lets you define the colors of BPMN elements during modeling.
This specification is recommended for color exchange between BPMN modeling tools.

ℹ️ More details about the specification are available in the bpmn-miwg/bpmn-in-color GitHub repository.

In bpmn-visualization 0.35.0, "BPMN in Color" support is enabled with a fallback to bpmn.io-specific BPMN extensions for colors.
By default, rendering of colors defined in the BPMN source is disabled. To enable "BPMN in Color" support, use the following code snippet:

const bpmnVisualization = new BpmnVisualization({
            container: 'bpmn-container',
            renderer: { ignoreBpmnColors: false }
});

rendering of the C.1.0 diagram when the "BPMN in Color" support is enable
Rendering of the C.1.0 diagram when the "BPMN in Color" support is enable

⏩ Want to test it live? Give a try to the following example:

Dependency changes

Switched from lodash to lodash-es

Previously, bpmn-visualization depended on the lodash-throttle and lodash-debounce CommonJS dependencies.
They have been replaced by a single ESM dependency: lodash-es.

Using the ESM dependency allows for better tree shaking and improves interoperability with bundlers.

For example, this change eliminates the need to configure the removal of warnings issued by Angular 15 due to lodash dependencies.
In Angular 15, there is a warning about using CommonJS dependencies, specifically for the lodash dependencies. However, the step to remove these warnings is no longer necessary as demonstrated in process-analytics/bpmn-visualization-examples#495.

ℹ️ For more information, see #2678.

Removal of entities

bpmn-visualization no longer depends on the entities dependency to decode XML attribute entities.
Instead, it provides its own default entities decoder. Users can also use their own decoder when initializing the library.
The following code snippet demonstrates how to create a decoder using the entities library:

import { decodeXML } from 'entities';
const bpmnVisualization = new BpmnVisualization({
            container: 'bpmn-container',
            parser: {
              additionalXmlAttributeProcessor: (val: string) => { return decodeXML(val) }
            }
});

ℹ️ For more details, see #2704.

What's Changed

Full Changelog: v0.34.1...v0.35.0

🚀 BPMN support

🧲 BPMN diagram usability

  • fix: keep existing CSS classes when calling the "Update Style" API (#2709) @tbouffard

🐛 Bug Fixes

  • fix: keep existing CSS classes when calling the "Update Style" API (#2709) @tbouffard

⤵️ Library Integration

🎮 Demo and Examples

  • feat(demo): simplify logs displaying fit and load options (#2707) @tbouffard

📦 Dependency updates

👻 Maintenance

  • test: prepare support for transaction sub-processes (#2713) @tbouffard
  • test(e2e): only run the "Update Style" API when query parameters are set (#2693) @tbouffard
  • chore: fix a typo in the release-drafter template (#2685) @tbouffard

0.34.1

15 May 09:57
Compare
Choose a tag to compare

This is a maintenance release, including documentation improvements.

Thanks to all the contributors of this release 🌈: @csouchet and @tbouffard

See milestone 0.34.1 to get the list of issues covered by this release.

Highlights

Examples improvements

The examples have been updated to demonstrate the improvements provided with version 0.34.0.
ℹ️ For more details about all changes, see the examples 0.34.0 release notes.

The Monitoring demo now uses the Update Style API instead of the CSS API to have a consistent stroke width even when zooming.
Want to give a try to the updated demo? Have a look at the ⏩ live environment.

The projects have been reworked and they all demonstrate how to use the Overlays, CSS and Update Style API. The following screenshot shows the rendering with the example application 👇🏿

image

The examples running in Live IDE have been updated as well to let play with all API, in particular the Update Style API 👇🏿.

codesandbox-ts

Have a look at the ⏩ live environment.

What's Changed

Full Changelog: v0.34.0...v0.34.1

📝 Documentation

  • docs: improve the README (examples + firefox logo) (#2670) @tbouffard
  • docs(release): add tips for referencing the examples repository (#2669) @tbouffard

👻 Maintenance

  • refactor: transform overlay types from interface to type (#2675) @csouchet
  • refactor: avoid using "bind" when calling methods in the css registry (#2668) @tbouffard

0.34.0

04 May 16:28
Compare
Choose a tag to compare

Among the highlights of this release is the addition of a new API to remove all CSS classes from HTML elements of BPMN diagram, the improvement of the linking of EdgeBpmnSemantic and ShapeBpmnSemantic, and the usage of the "Update Style" API in the "Elements Identification" demo.

Thanks to all the contributors of this release 🌈: @brendanlaschke, @csouchet and @tbouffard

See milestone 0.34.0 to get the list of issues covered by this release.

Highlights

New API to remove all CSS classes of BPMN elements

A new API called removeAllCssClasses has been added to the BpmnElementsRegistry, allowing users to remove all CSS classes from HTML elements of BPMN elements.

image

Also, the TS doc of BpmnElementsRegistry has been updated to be more English-friendly.

ℹ️ For more details, visit #2666.

Enhanced linking of EdgeBpmnSemantic and ShapeBpmnSemantic

The incomingIds and outgoingIds properties of ShapeBpmnElement are now assigned from the Flow, resulting in improved linking of Edge and Shape in the internal model.

As a result, the incomingIds and outgoingIds properties of ShapeBpmnSemantic now store the links calculated from the EdgeBpmnSemantic.
image

ℹ️ For more details, visit #2521 and #2638.

"Elements Identification" Demo Uses the "Update Style" API

The "Elements Identification" demo now includes a radio button to select the mode to apply the style: CSS or API.
The style is updated according to the selected BPMN kind and style method.

Style by CSS

image

Style by API

image

Additionally, we have included the missing TS Doc API for StyleWithOpacity.

image

ℹ️ For more details, visit #2630.

What's Changed

Full Changelog: v0.33.1...v0.34.0

🧲 BPMN diagram usability

  • feat: enrich links between edges and shapes in the internal model (#2638) @csouchet

🌈 BPMN diagram styling

  • feat: add an API to remove all CSS classes of BPMN elements (#2666) @csouchet

🎮 Demo and Examples

  • feat: use the "Update Style" API in the "Elements Identification" demo (#2630) @csouchet

📦 Dependency updates

👻 Maintenance

0.33.1

17 Apr 09:25
Compare
Choose a tag to compare

This new version brings a bug fix on diagram loading, and demo updating.

Thanks to all the contributors of this release 🌈: @csouchet and @tbouffard

What's Changed

Full Changelog: v0.33.0...v0.33.1

🐛 Bug Fixes

  • fix(registry): fix error when no diagram has been loaded (#2611) @tbouffard

🦾 Robustness

  • fix(registry): fix error when no diagram has been loaded (#2611) @tbouffard

🎮 Demo and Examples

  • feat(demo): update the overlay style in the elements-identification page (#2625) @csouchet
  • chore(demo): bump fontawesome from 6.3.0 to 6.4.0 (#2599) @tbouffard

📦 Dependency updates

0.33.0

20 Mar 15:09
Compare
Choose a tag to compare

This new version provides a new API that allows to update the style of one or more BPMN elements at runtime.

Thanks to all the contributors of this release 🌈: @csouchet and @tbouffard

See milestone 0.33.0 to get the list of issues covered by this release.

Highlights

Introducing the new "Update Style" API

The new API lets update the style of one or more elements. The fill, font, stroke and global opacity properties can be updated or reset to default values.

// Change the style of a Task
bpmnVisualization.bpmnElementsRegistry.updateStyle('task_1', {  
 fill: {color: 'orange', opacity: 40},
 stroke: {color: 'blue', width: 3},  
});  
// Change the style of a Sequence Flow
bpmnVisualization.bpmnElementsRegistry.updateStyle('sequenceFlow_1', {  
 stroke: {color: 'blue', width: 4},  
});
// Change the the fill color of the Task again
// Previously updated properties remain in effect
bpmnVisualization.bpmnElementsRegistry.updateStyle('task_1', {  
 fill: {color: 'blue'},
});
// Restore the default value of the stroke color of the Task and Sequence Flow
bpmnVisualization.bpmnElementsRegistry.updateStyle(['task_1', 'sequenceFlow_1'], {  
 stroke: {color: 'default'},  
});

For more details about the options you can use to update the style, see the v0.33.0 type definitions.

What's Changed

Full Changelog: v0.32.0...v0.33.0

🌈 BPMN diagram styling

  • feat: reset style per property with the "Update Style" API (#2585) @tbouffard
  • feat: configure programatically the width of stroke style of a shape/edge (#2583) @csouchet
  • feat(style): configure programatically the opacity style properties of a shape (#2581) @csouchet
  • feat(style): configure programatically the fill style of a shape (#2580) @csouchet
  • feat(style): configure programatically the font style of a shape/edge (#2579) @csouchet
  • feat: introduce the Update Style API (#2556) @tbouffard

📝 Documentation

🎮 Demo and Examples

  • feat: add all BPMN Elements in Elements Identification page (#2584) @csouchet

👻 Maintenance

0.32.0

06 Mar 10:36
Compare
Choose a tag to compare

This new version improves the robustness of bpmn-visualization.

Thanks to all the contributors of this release 🌈: @tbouffard

See milestone 0.32.0 to get the list of issues covered by this release.

Highlights

CVE fix in fast-xml-parser

bpmn-visualization uses fast-xml-parser to parse the BPMN diagrams in XML format. Unfortunately, a vulnerability in fast-xml-parser has recently been disclosed. See SNYK-JS-FASTXMLPARSER-3325616 for more details.

A fix is now available and bpmn-visualization uses a version of fast-xml-parser that includes the fix.

However, the vulnerability exists in all versions of fast-xml-parser prior to version 4.1.2. Since earlier versions of bpmn-visualization depend on older versions of fast-xml-parser, we strongly recommend that all users update their application to bpmn-visualization 0.32.0 immediately.
Users can also manually update the version of fast-xml-parser in their application. Note that there is no guarantee that it will work fully with the older version of bpmn-visualization.

ℹ️ See #2548 for more information.

Breaking Changes

StyleUtils may have been used in rare cases to redefine the way the shapes are rendered. It wasn't used in the bpmn-visualization examples.

StyleUtils was marked as experimental and was subject to change as part of the BPMN Theme refactoring. So users already knew that it might be removed.

ℹ️ See #2550 for more information.

What's Changed

Full Changelog: v0.31.0...v0.32.0

📝 Documentation

  • docs: fix license header in files of the root directory (#2557) @tbouffard
  • docs(contributor): add missing link to mxGeometry source (#2540) @tbouffard
  • docs: switch header license from JSDoc to regular block comments (#2525) @tbouffard

📦 Dependency updates

👻 Maintenance

0.31.0

20 Feb 13:32
Compare
Choose a tag to compare

This new version makes it easy to navigate between the elements of the diagram.

Thanks to all the contributors of this release 🌈: @tbouffard

See milestone 0.31.0 to get the list of issues covered by this release.

Highlights

APIs return the links between elements in the BPMN Semantic

The getElementsByIds and getElementsByKinds methods of BpmnElementsRegistry now return

  • for shape/flownode: the id of the incoming and outgoing edge/flow
{
  id: string;
  name: string;
  isShape: boolean;
  kind: BpmnElementKind;
  // new properties
  incomingIds: string[];
  outgoingIds: string[];
}
  • for edge/flow: the id of the source and target shape/flownode
{
  id: string;
  name: string;
  isShape: boolean;
  kind: BpmnElementKind;
  // new properties
  sourceRefId: string;
  targetRefId: string;
}

This makes it easy to navigate between the elements of the diagram.

The js-popover example has been updated to display the new available information: go to the ⏩ v0.31.0 live example or see the screenshots below 👇🏿.

shape edge
incoming and outgoing ids in shape Bpmn Semantic sourceRef and targetRef ids in edge Bpmn Semantic

New draw path demo

This new demo show how to highlight 2 consecutive shapes by clicking on a shape/flownode or an edge/flow as shown in the video below 👇🏿.

Enregistrement.de.l.ecran.2023-02-14.a.17.11.19.mov

draw-path demo: click on shape then on consecutive shape

For more videos, see process-analytics/bpmn-visualization-examples#452.

To play with the live demo, go to ⏩ https://cdn.statically.io/gh/process-analytics/bpmn-visualization-examples/v0.31.0/demo/draw-path/index.html.

What's Changed

Full Changelog: v0.30.0...v0.31.0

🚀 BPMN support

  • [FEAT] Include Flownodes incoming/outgoing in the internal model (#2520) @tbouffard

🧲 BPMN diagram usability

  • [FEAT] BpmnElementsRegistry API returns shape incoming/outgoing (#2523) @tbouffard
  • [FEAT] BpmnElementsRegistry API returns source/target for edges (#2522) @tbouffard

📝 Documentation

  • [DOC] Add license header to all dist files in npm package (#2524) @tbouffard

🎮 Demo and Examples

👻 Maintenance

  • [REFACTOR] Do not ignore the 'ban-ts-comment' eslint rule per file (#2526) @tbouffard

0.30.0

06 Feb 10:54
Compare
Choose a tag to compare

This new version brings direct access to the mxgraph context.

Thanks to all the contributors of this release 🌈: @tbouffard

See milestone 0.30.0 to get the list of issues covered by this release.

Highlights

Export the mxgraph context

Now, it's possible to access to the mxgraph context directly from bpmn-visualization.

image

What's Changed

Full Changelog: v0.29.2...v0.30.0

⤵️ Library Integration

📦 Dependency updates

👻 Maintenance

0.29.2

23 Jan 13:22
Compare
Choose a tag to compare

This is a maintenance release.

Thanks to all the contributors of this release 🌈: @csouchet and @tbouffard

See milestone 0.29.2 to get the list of issues covered by this release.

What's Changed

Full Changelog: v0.29.1...v0.29.2

👻 Maintenance