Newly Practicing Mortician

    @bpmn-io/element-template-chooser

    0.0.5 • Public • Published

    @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 and choose via the properties panel
    modeler.on('elementTemplates.errors', event => {
      const { errors } = event;
    
      showTemplateErrors(errors);
    });
    
    modeler.get('elementTemplatesLoader').setTemplates(ELEMENT_TEMPLATES_JSON);
    
    // alternatively, choose programmatically
    // from a given list of element templates
    const task = modeler.get('elementRegistry').get('MyTask');
    
    const template = await (
      modeler.get('elementTemplateChooser').open(task, ELEMENT_TEMPLATES_JSON)
    );

    Checkout ./example for a full featured integration example.

    Run locally

    To run the example app, execute:

    npm start
    

    License

    MIT

    Keywords

    none

    Install

    npm i @bpmn-io/element-template-chooser

    DownloadsWeekly Downloads

    70

    Version

    0.0.5

    License

    MIT

    Unpacked Size

    98.6 kB

    Total Files

    9

    Last publish

    Collaborators

    • skaiir-camunda
    • marstamm
    • beatrizmendes
    • bpmn-io-admin
    • nikku
    • pinussilvestrus
    • barmac
    • philippfromme
    • maxtru