0.39.0
This new version improves the usability of BPMN diagrams by providing a new API for obtaining model elements, and includes various bug fixes and maintenance tasks.
Thanks to all the contributors of this release 🌈: @csouchet and @tbouffard
See milestone 0.39.0 to get the list of issues covered by this release.
Highlights
ESM Library
A notable improvement in this release is the resolution of an issue related to the exported ESM (ECMAScript Module) bundle. This fix now allows bpmn-visualization
to be used as an ESM bundle in Node.js projects.
This may be of interest to applications that want to test code that relies on bpmn-visualization
.
New APIs for retrieving BPMN Semantics
We've added APIs to retrieve the BPMN semantics of elements by kind or ID, reducing unnecessary data retrieval.
Retrieving by element Kind
We've introduced a new API that allows users to retrieve BPMN semantics based on the element kind. This API is specifically designed for users who only need to access BPMN semantic data.
Here's an example of how to use it:
const modelElements: BpmnSemantic[] = bpmnVisualization.bpmnElementsRegistry
.getModelElementsByKinds(bpmnKinds);
for (const modelElement of modelElements) {
const value = modelElement.isShape ? 'top-left' : 'bottom-center';
....
}
ℹ️ For more information, refer to #2841.
Retrieving by element ID
Another valuable addition is the API for retrieving BPMN semantics by element ID. This new API optimizes usage by reducing unnecessary data retrieval when the caller only needs semantic information.
Here's an example of how to use it:
const modelElements: BpmnSemantic[] = bpmnVisualization.bpmnElementsRegistry
.getModelElementsByIds(bpmnIds)
.filter(semantic => semantic.isShape);
ℹ️ For more information, refer to #2837.
Examples: Referencing the bv-experimental-add-ons
demo
In our examples, we've included a link to the bv-experimental-add-ons
demo.
📣 Don't forget to check out the latest release notes for bv-experimental-add-ons
!
This release introduces a new plugin mechanism for bpmn-visualization
and shows a demo of a plugin that provides new features for overlays.
You can find all the details here: Release Notes.
What's Changed
Full Changelog: v0.38.1...v0.39.0
🧲 BPMN diagram usability
- feat: add a method to only get BPMN semantic of elements by kind (#2841) @tbouffard
- feat: add a method to only get BPMN semantic of elements by id (#2837) @tbouffard
🐛 Bug Fixes
📝 Documentation
- docs: describe the security policy (#2839) @tbouffard
- docs(release): simplify management of GH releases (#2836) @tbouffard
👻 Maintenance
- chore: move project to ESM (#2840) @csouchet
- refactor: remove mx prefix in variables related to mxGraph objects (#2834) @tbouffard
- test: add more tests for
StyleComputer
(#2835) @tbouffard - chore(eslint): use @typescript-eslint/stylistic rules (#2821) @csouchet
- chore(eslint): add
eslint-plugin-unicorn
dependency andfilename-case
rule (#2833) @csouchet - refactor: introduce registry interfaces (#2832) @tbouffard
- refactor: split internal registries (#2818) @tbouffard
- refactor: improving code safety with nullish coalescing operator (#2823) @csouchet
- refactor: remove some coupling between the "CSS" and "Style" API (#2825) @tbouffard
- chore(dependabot): improve groups configuration (#2830) @tbouffard
- chore(eslint): use
eslint-plugin-jest-extended
(#2820) @csouchet - chore(eslint): fix wrong link in the ESLint configuration about the "project" property (#2816) @csouchet
- refactor: remove unnecessary type casting (#2815) @csouchet
- test(e2e): fix e2e thresholds on macOS (#2807) @csouchet
- ci: restore "--ignore-scripts" option for
npm ci
(#2806) @tbouffard - refactor: extend mxCellRender instead of redefining prototypes (#2802) @tbouffard
- refactor: remove extra constructors (#2804) @tbouffard
- test: refactor JsonParser unit tests and type handling enhancements (#2801) @csouchet