How to use the bpmn-js-properties-panel/lib/factory/EntryFactory.selectBox 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 camunda-consulting / code / snippets / bpmnjs-custom-modeler / app / custom-modeler / custom / propertyprovider / SoftwareSettings.js View on Github external
var createSelectBox = function(id, label, selectOptions) {
    return entryFactory.selectBox({
      id : id,
      description : label,
      label : label,
      selectOptions: selectOptions,
      modelProperty : id,
      get: function(element,node) {
        return getElementValue(element, node, id);
      },
      set: function(element,values,node) {
        return setElementValue(element,values,node, id);
      }
    });
  };
github bptlab / scylla / app / app / panelExtension / ScyllaGeneralProperties.js View on Github external
function createDistributionSelectBox(parentName){
    let getDistributionElement = distributionElementAccessor(parentName);
    return entryFactory.selectBox({
        id : 'distribution',
        //description : 'How is the duration distributed?',
        label : 'Distribution',
        modelProperty : distributionProperty,
        selectOptions : distributions,
        get : element => {
            const distribution = getDistributionElement(element);
            backend.print("Element is "+JSON.stringify(element));
            backend.print("Element is "+JSON.stringify(getBusinessObject(element)));
            backend.print("Distribution is "+JSON.stringify(distribution));
            let toReturn = {};
            toReturn[distributionProperty] = distribution ? distributionElementToId(distribution) : undefined;
            return toReturn;
        },
        set: (element, value) => {
            const moddle = modeler.get('moddle'),
github bptlab / scylla / app / app / panelExtension / ScyllaGeneralProperties.js View on Github external
function createTimeUnitSelectBox(parentName) {
    return entryFactory.selectBox({
        id : 'timeUnit',
        //description : 'Which timeUnit?',
        label : 'Timeunit',
        //modelProperty : 'distribution',
        selectOptions : timeUnits(),
        get : element => {
            const duration = getExtension(getBusinessObject(element), 'scylla:'+parentName);
            return {undefined : (duration ? duration.timeUnit : timeUnits()[0].value)};
        },
        set: (element, value) => {
            const moddle = modeler.get('moddle'),
                modeling = modeler.get('modeling');
            let businessObject = getBusinessObject(element);
            const extensionElements = businessObject.extensionElements || moddle.create('bpmn:ExtensionElements');
            let duration = getExtension(businessObject, 'scylla:'+parentName);
github zeebe-io / zeebe-modeler / client / src / app / tabs / bpmn / custom / properties-provider / parts / implementation / TimerEventDefinition.js View on Github external
export default function(group, bpmnFactory, timerEventDefinition, timerOptions) {

  const selectOptions = timerOptions;

  group.entries.push(entryFactory.selectBox({
    id: 'timer-event-definition-type',
    label: 'Timer Definition Type',
    selectOptions: selectOptions,
    emptyParameter: true,
    modelProperty: 'timerDefinitionType',

    get: function(element, node) {
      return {
        timerDefinitionType: getTimerDefinitionType(timerEventDefinition) || ''
      };
    },

    set: function(element, values) {
      const props = {
        timeDuration: undefined,
        timeDate: undefined,
github zeebe-io / zeebe-modeler / client / src / app / tabs / bpmn / custom / properties-provider / parts / implementation / Mapping.js View on Github external
}
        }
        else {
          validation.target = 'Mapping must have a Target';
        }
      }

      return validation;
    },

    disabled: function(element, node) {
      return !isSelected(element, node);
    }
  }));

  entries.push(entryFactory.selectBox({
    id: 'mapping-type',
    label: 'Type',
    selectOptions: [
      { name: 'PUT', value: 'PUT' },
      { name: 'COLLECT', value: 'COLLECT' }
    ],
    modelProperty: 'type',
    emptyParameter: false,

    get: function(element, node) {
      return (getSelected(element, node) || {});
    },

    set: function(element, values, node) {

      const param = getSelected(element, node);

bpmn-js-properties-panel

A simple properties panel for bpmn-js

MIT
Latest version published 7 days ago

Package Health Score

90 / 100
Full package analysis