Socket
Book a DemoInstallSign in
Socket

@bpmn-io/element-template-chooser

Package Overview
Dependencies
Maintainers
10
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bpmn-io/element-template-chooser

A simple element template chooser

latest
Source
npmnpm
Version
2.0.0
Version published
Weekly downloads
4.9K
-17.15%
Maintainers
10
Weekly downloads
 
Created
Source

@bpmn-io/element-template-chooser

CI

A simple element template chooser for properties-panel >= 1.

screenshot

Usage

import BpmnModeler from 'bpmn-js/lib/Modeler';

import '@bpmn-io/element-template-chooser/dist/element-template-chooser.css';

import ElementTemplateChooserModule from '@bpmn-io/element-template-chooser';

const modeler = new BpmnModeler({
  additionalModules: [
    ...
    ElementTemplateChooserModule
  ],
  ...
});

// load templates
modeler.on('elementTemplates.errors', event => {
  const { errors } = event;

  showTemplateErrors(errors);
});

modeler.get('elementTemplatesLoader').setTemplates(ELEMENT_TEMPLATES_JSON);

// choose via the properties panel, _OR_
// open the chooser programmatically for a given element
const template = await (
  modeler.get('elementTemplateChooser').open(element)
);

Checkout ./example for a full featured integration example.

Run locally

To run the example app, execute:

npm start

License

MIT

FAQs

Package last updated on 24 Apr 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts