How to use the bpmn-js-properties-panel/lib/factory/EntryFactory.table function in bpmn-js-properties-panel

To help you get started, we’ve selected a few bpmn-js-properties-panel examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bptlab / scylla / app / app / panelExtension / ScyllaGeneralProperties.js View on Github external
function createEntrysetInput(prefix, getDistributionElement) {

    let propertyName = prefix+'.entryset';
    let valueProperty = propertyName+'.value';
    let probabilityProperty = propertyName+'.probability';

    return entryFactory.table({
        id : propertyName,
        modelProperty : propertyName,
        labels: [ 'Value', 'Probability' ],
        modelProperties: [ valueProperty, probabilityProperty ],
        addLabel: 'New entry',
        show: function(element, node) {
          return true;
        },
        getElements: function(element) {
            let distribution = getDistributionElement(element);
            if(!distribution) return [];//For unknown reasons, the system tries to create the table for other elements than those it is actually created for
            let entries = distribution.$children.filter(each => each.$type == 'scylla:'+'entry');
            return entries.map(each => {
                let entry = new Object();
                entry[valueProperty] = ""+each.value;
                entry[probabilityProperty] = ""+each.probability;
github bptlab / scylla / app / app / panelExtension / ScyllaGeneralProperties.js View on Github external
function createResourceTable() {
    return entryFactory.table({
        id : 'resource',
        description : 'Which resource to assign',
        modelProperty : 'resources',
        labels: [ 'Resource', 'Quantity' ],
        modelProperties: [ 'resourceName', 'quantity' ],
        addLabel: 'Add assignment',
        show: function(element, node) {
          return true;
        },
        getElements: resourcesOf,
        addElement: function(element, node) {
            ensureResources(element);
            const moddle = modeler.get('moddle');
            let newAssignment = moddle.createAny('scylla:Resource');
            newAssignment.resourceName = 'foo';
            newAssignment.quantity = 1;

bpmn-js-properties-panel

A simple properties panel for bpmn-js

MIT
Latest version published 8 days ago

Package Health Score

90 / 100
Full package analysis