Installations
npm install @aylx/bpmn-js-properties-panel
Developer
bpmn-io
Developer Guide
Module System
CommonJS
Min. Node Version
*
Typescript Support
No
Node Version
20.11.1
NPM Version
10.9.0
Statistics
295 Stars
1,947 Commits
197 Forks
26 Watching
43 Branches
46 Contributors
Updated on 21 Nov 2024
Languages
JavaScript (99.93%)
CSS (0.04%)
Shell (0.03%)
Total Downloads
Cumulative downloads
Total Downloads
467
Last day
0%
1
Compared to previous day
Last week
16.7%
7
Compared to previous week
Last month
0%
467
Compared to previous month
Last year
0%
467
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Peer Dependencies
4
Dev Dependencies
47
bpmn-js-properties-panel
A properties panel extension for bpmn-js that adds the ability to edit technical properties (generic and Camunda).
Features
The properties panel allows users to edit invisible BPMN properties in a convenient way.
Some of the features are:
- Edit element ids, multi-instance details and more
- Edit execution related Camunda 7 and Camunda 8 properties
- Redo and undo (plugs into the bpmn-js editing cycle)
Usage
Provide two HTML elements, one for the properties panel and one for the BPMN diagram:
1<div class="modeler"> 2 <div id="canvas"></div> 3 <div id="properties"></div> 4</div>
Bootstrap bpmn-js with the properties panel and a properties provider:
1import BpmnModeler from 'bpmn-js/lib/Modeler'; 2import { 3 BpmnPropertiesPanelModule, 4 BpmnPropertiesProviderModule, 5} from 'bpmn-js-properties-panel'; 6 7const modeler = new BpmnModeler({ 8 container: '#canvas', 9 propertiesPanel: { 10 parent: '#properties' 11 }, 12 additionalModules: [ 13 BpmnPropertiesPanelModule, 14 BpmnPropertiesProviderModule 15 ] 16});
Styling
For proper styling include the necessary stylesheets:
1<link rel="stylesheet" href="https://unpkg.com/@bpmn-io/properties-panel/dist/assets/properties-panel.css">
Dynamic Attach/Detach
You may attach or detach the properties panel dynamically to any element on the page, too:
1const propertiesPanel = bpmnJS.get('propertiesPanel'); 2 3// detach the panel 4propertiesPanel.detach(); 5 6// attach it to some other element 7propertiesPanel.attachTo('#other-properties');
Edit Camunda Properties
To edit Camunda properties, you have to use a moddle extension so bpmn-js is can read and write Camunda properties and use a provider so these properties are shown in the properties panel.
For example, to edit Camunda 8 properties, use the Camunda 8 moddle extension and the Camunda 8 provider. Additionally, you should use behaviors specific to Camunda 8 to ensure parts of the model that are specific to Camunda 8 are maintained correctly.
1import BpmnModeler from 'bpmn-js/lib/Modeler'; 2import { 3 BpmnPropertiesPanelModule, 4 BpmnPropertiesProviderModule, 5 ZeebePropertiesProviderModule // Camunda 8 provider 6} from 'bpmn-js-properties-panel'; 7 8// Camunda 8 moddle extension 9import zeebeModdle from 'zeebe-bpmn-moddle/resources/zeebe'; 10 11// Camunda 8 behaviors 12import ZeebeBehaviorsModule from 'camunda-bpmn-js-behaviors/lib/camunda-cloud'; 13 14const modeler = new BpmnModeler({ 15 container: '#canvas', 16 propertiesPanel: { 17 parent: '#properties' 18 }, 19 additionalModules: [ 20 BpmnPropertiesPanelModule, 21 BpmnPropertiesProviderModule, 22 ZeebePropertiesProviderModule, 23 ZeebeBehaviorsModule 24 ], 25 moddleExtensions: { 26 zeebe: zeebeModdle 27 } 28});
API
BpmnPropertiesPanelRenderer#attachTo(container: HTMLElement) => void
Attach the properties panel to a parent node.
1const propertiesPanel = modeler.get('propertiesPanel'); 2 3propertiesPanel.attachTo('#other-properties');
BpmnPropertiesPanelRenderer#detach() => void
Detach the properties panel from its parent node.
1const propertiesPanel = modeler.get('propertiesPanel'); 2 3propertiesPanel.detach();
BpmnPropertiesPanelRenderer#registerProvider(priority: Number, provider: PropertiesProvider) => void
Register a new properties provider to the properties panel.
1class ExamplePropertiesProvider { 2 constructor(propertiesPanel) { 3 propertiesPanel.registerProvider(500, this); 4 } 5 6 getGroups(element) { 7 return (groups) => { 8 9 // add, modify or remove groups 10 // ... 11 12 return groups; 13 }; 14 } 15} 16 17ExamplePropertiesProvider.$inject = [ 'propertiesPanel' ];
Additional Resources
Development
Prepare the project by installing all dependencies:
1npm install
Then, depending on your use-case, you may run any of the following commands:
1# build the library and run all tests 2npm run all 3 4# spin up a single local modeler instance 5npm start 6 7# run the full development setup 8npm run dev
License
MIT
No vulnerabilities found.
Reason
30 commit(s) and 5 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
security policy file detected
Details
- Info: security policy file detected: github.com/bpmn-io/.github/SECURITY.md:1
- Info: Found linked content: github.com/bpmn-io/.github/SECURITY.md:1
- Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/bpmn-io/.github/SECURITY.md:1
- Info: Found text in security policy: github.com/bpmn-io/.github/SECURITY.md:1
Reason
SAST tool detected but not run on all commits
Details
- Info: SAST configuration detected: CodeQL
- Warn: 0 commits out of 19 are checked with a SAST tool
Reason
3 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-7q7g-4xm8-89cq
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-rp65-9cf3-cjxr
Reason
Found 6/18 approved changesets -- score normalized to 3
Reason
dependency not pinned by hash detected -- score normalized to 2
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/CI.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/bpmn-io/bpmn-js-properties-panel/CI.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/CI.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/bpmn-io/bpmn-js-properties-panel/CI.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/CI.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/bpmn-io/bpmn-js-properties-panel/CI.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/CODE_SCANNING.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/bpmn-io/bpmn-js-properties-panel/CODE_SCANNING.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/CODE_SCANNING.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/bpmn-io/bpmn-js-properties-panel/CODE_SCANNING.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/CODE_SCANNING.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/bpmn-io/bpmn-js-properties-panel/CODE_SCANNING.yml/main?enable=pin
- Warn: npmCommand not pinned by hash: .github/workflows/CI.yml:30
- Info: 0 out of 5 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 1 third-party GitHubAction dependencies pinned
- Info: 1 out of 2 npmCommand dependencies pinned
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/CI.yml:1
- Warn: no topLevel permission defined: .github/workflows/CODE_SCANNING.yml:1
- Info: no jobLevel write permissions found
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'main'
Score
5.6
/10
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More