Gathering detailed insights and metrics for @aylx/bpmn-js-properties-panel
Gathering detailed insights and metrics for @aylx/bpmn-js-properties-panel
Gathering detailed insights and metrics for @aylx/bpmn-js-properties-panel
Gathering detailed insights and metrics for @aylx/bpmn-js-properties-panel
npm install @aylx/bpmn-js-properties-panel
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
295 Stars
1,947 Commits
197 Forks
26 Watching
43 Branches
46 Contributors
Updated on 21 Nov 2024
JavaScript (99.93%)
CSS (0.04%)
Shell (0.03%)
Cumulative downloads
Total Downloads
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
4
47
A properties panel extension for bpmn-js that adds the ability to edit technical properties (generic and Camunda).
The properties panel allows users to edit invisible BPMN properties in a convenient way.
Some of the features are:
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});
For proper styling include the necessary stylesheets:
1<link rel="stylesheet" href="https://unpkg.com/@bpmn-io/properties-panel/dist/assets/properties-panel.css">
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');
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});
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' ];
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
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
Reason
security policy file detected
Details
Reason
SAST tool detected but not run on all commits
Details
Reason
3 existing vulnerabilities detected
Details
Reason
Found 6/18 approved changesets -- score normalized to 3
Reason
dependency not pinned by hash detected -- score normalized to 2
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
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