Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@bpmn-io/element-template-chooser

bpmn-io19.4kMIT1.1.1

A simple element template chooser

readme

@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

changelog

Changelog

All notable changes to @bpmn-io/element-template-chooser are documented here. We use semantic versioning for releases.

Unreleased

_Note: Yet to be released changes appear here._

1.1.1

Reverts v1.1.0 due to breaking changes.

1.1.0

1.0.0

  • FEAT: use modern popup menu foundations
  • DEPS: update to bpmn-js@11

Breaking Changes

  • API changed to ElementTemplateChooser.open(element) => Promise<Template>

0.1.0

  • DEPS: bump dependencies

0.0.5

  • FEAT: support icon
  • FEAT: support documentationRef

0.0.4

  • FEAT: improve mixed keyboard + mouse interaction
  • FEAT: support categories and search (#5)
  • FIX: corrent scroll to element not working on Firefox (#10)

0.0.3

  • FIX: correct chooser title

0.0.2

  • FEAT: update styles
  • FEAT: provide pre-built distribution + styles (#1)
  • FEAT: make agnostic of elementTemplates implementation (#2)
  • FIX: scroll to keyboard selected entries (#6)
  • CHORE: change programmatic API

0.0.1

Initial release.