{"_id":"@bptlab/openbpt-modeler-er","name":"@bptlab/openbpt-modeler-er","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@bptlab/openbpt-modeler-er","version":"1.0.0","description":"ER modeler based on diagram-js for use in the OpenBPT platform.","repository":{"type":"git","url":"git+https://github.com/bptlab/openbpt-modeler-er.git"},"publishConfig":{"access":"public"},"author":{"name":"Maximilian König"},"license":"MIT","keywords":["modeler","modeling","template","diagram-js","er diagram"],"main":"index.js","scripts":{"lint":"eslint . --ext .js","lint:fix":"eslint . --ext .js --fix","format":"prettier --write ."},"dependencies":{"bpmn-font":"^0.12.1","diagram-js":"^15.2.4","diagram-js-direct-editing":"^2.1.2","ids":"^1.0.5","inherits":"^2.0.4","jquery":"^3.7.1","min-dash":"^4.2.1","min-dom":"^5.0.0","moddle":"^6.2.3","moddle-xml":"^10.1.0","object-refs":"^0.4.0","tiny-svg":"^4.0.0"},"devDependencies":{"eslint":"^9.35.0","eslint-config-prettier":"^10.1.5","eslint-plugin-prettier":"^5.5.4","prettier":"^3.6.2"},"_id":"@bptlab/openbpt-modeler-er@1.0.0","gitHead":"a496a109f309362ca29420bd4cc3747785129754","bugs":{"url":"https://github.com/bptlab/openbpt-modeler-er/issues"},"homepage":"https://github.com/bptlab/openbpt-modeler-er#readme","_nodeVersion":"22.14.0","_npmVersion":"11.4.2","dist":{"integrity":"sha512-BFVJDdjVokTLTmM7z11xyh1pXJuKapFWJD8+T2gmBWF8M3n2kP6z4JWQjINYADgsJJq88LL2i5j6od9ELSmr6g==","shasum":"e8f8013ab61d21a66afcfa89a99b3c5ee9431df5","tarball":"https://registry.npmjs.org/@bptlab/openbpt-modeler-er/-/openbpt-modeler-er-1.0.0.tgz","fileCount":75,"unpackedSize":222277,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDx56L0+gZAs35MLMeMSLtj4aE7J5OGWKS+ZwjfyxulfAIgVmJSIy6w8cbKNTWWm62FoslFGwWaPgiX8OCLfVQd5so="}]},"_npmUser":{"name":"maximiliankoenig","email":"maximilian.koenig@hpi.de"},"directories":{},"maintainers":[{"name":"maximiliankoenig","email":"maximilian.koenig@hpi.de"},{"name":"bpt-lab","email":"bptlab@hpi.de"},{"name":"t-lichtenstein","email":"lichtenstein-t@web.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/openbpt-modeler-er_1.0.0_1757946153557_0.005919456151296298"},"_hasShrinkwrap":false}},"time":{"created":"2025-09-15T14:22:33.430Z","1.0.0":"2025-09-15T14:22:33.718Z","modified":"2025-09-15T14:22:33.986Z"},"maintainers":[{"name":"maximiliankoenig","email":"maximilian.koenig@hpi.de"},{"name":"bpt-lab","email":"bptlab@hpi.de"},{"name":"t-lichtenstein","email":"lichtenstein-t@web.de"}],"description":"ER modeler based on diagram-js for use in the OpenBPT platform.","homepage":"https://github.com/bptlab/openbpt-modeler-er#readme","keywords":["modeler","modeling","template","diagram-js","er diagram"],"repository":{"type":"git","url":"git+https://github.com/bptlab/openbpt-modeler-er.git"},"author":{"name":"Maximilian König"},"bugs":{"url":"https://github.com/bptlab/openbpt-modeler-er/issues"},"license":"MIT","readme":"# openbpt-modeler-template\r\n\r\nTemplate repository for the creation of modelers used in the OpenBPT project.\r\nThe template is a generalization of the [ptn-js](https://github.com/MaximilianKoenig/ptn-js) modeler. It is based on [diagram-js](https://github.com/bpmn-io/diagram-js) and took inspiration from [bpmn-js](https://github.com/bpmn-io/bpmn-js), [object-diagram-js](https://github.com/timKraeuter/object-diagram-js) and [fcm-js](https://github.com/bptlab/fCM-design-support).\r\n\r\nThe template showcases a working version of a basic Petri net modeler whose elements should be replaced with the elements of the new modeling language. For that purpose, fork the repository and follow the steps outlined below.\r\n**If you create a new modeler and implement additional features that could be generalized to fit any modeler, please feel free to create a pull request so that others may profit from your extension as well!**\r\n\r\n## Development Setup\r\n\r\nLink to demo-repo using npm link:\r\n\r\n- run `npm link` in the current repository directory\r\n- switch to demo repository\r\n- run `npm i`\r\n- run `npm link <name-of-your-new-modeler>`\r\n\r\n## Implementing a New Modeler\r\n\r\nImplementing a new modeler requires the definition of the metamodel of the modeling language, a custom renderer, a set of icons, and a few adaptations in the modeler itself. In general, the keyword **CustomModelerTodo** marks places in the code that require adaptation.\r\n\r\n### Defining the Metamodel\r\n\r\nTo define the model structure, we build on [moddle](https://github.com/bpmn-io/moddle), which uses a schema defined as a JSON file to create a meta model that can be used to instantiate model elements while knowing their attributes and relations and provides a structure for importing and exporting XML files.\r\nThe followning class diagram shows the currently implemented metamodel used in the modeler. It can be generally divided into two sides:\r\n\r\n- The *semantic* elements are the classes on the left, everything inheriting from `Schema`. They define the different model elements and their attributes/relations.\r\n- The *syntactic* elements are the classes on the right, everything inheriting from `DiagramElement` as well as `Diagram` and `Plane`. These elements are visual representatoions of the model elements, including positional information and associated labels.\r\n\r\n![Moddle_Class_Diagram](https://github.com/user-attachments/assets/465970e3-e9ab-4c4b-b243-0a61c9277a8a)\r\n\r\nIn most cases, it should not be necessary to modify the metamodel of the *syntactic* elements. For the *semantic* elements, the classes inheriting from `Node` and `BinaryConnection` (marked in red) must be defined for the respective modeling language in [modelSchema.js](https://github.com/bptlab/openbpt-modeler-template/blob/main/lib/moddle/resources/modelSchema.js). A documentation can be found [here](https://github.com/bpmn-io/moddle/blob/main/docs/descriptor.md). Setting `isAttr` for a property will include it as an attribute in the XML, otherwise it is a separate child-tag.\r\n\r\n### Creating a Custom Renderer\r\n\r\n### Adding Icons\r\n\r\n### Adapting the Modeler\r\n","readmeFilename":"README.md","_rev":"1-063bacc877ea9de109304a0ab1991521"}