How to use the bpmn-js-properties-panel/lib/factory/EntryFactory.textField 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 / chor-js / app / choreo-modeler / properties-panel / parts / ParticipantProps.js View on Github external
export default function(group, element) {

  // Only return an entry, if the currently selected
  // element is a start event.

  if (is(element, 'bpmn:ChoreographyTask')) {
    group.entries.push(entryFactory.textField({
      id : 'spell',
      description : 'Apply a black magic spell',
      label : 'Spell',
      modelProperty : 'spell'
    }));
  }
}
github zeebe-io / zeebe-modeler / client / src / app / tabs / bpmn / custom / properties-provider / parts / TaskDefinitionProps.js View on Github external
validation = {
              type: 'Type must not contain spaces'
            };
          }
        }
        else {
          validation = {
            type: 'ServiceTask must have a type'
          };
        }
      }
      return validation;
    }
  }));

  group.entries.push(entryFactory.textField({
    id: 'taskDefinitionRetries',
    label: translate('Retries'),
    modelProperty: 'retries',

    get: function(element) {
      return {
        retries: (getTaskDefinition(element) || {}).retries
      };
    },

    set: function(element, values) {
      const bo = getBusinessObject(element);
      const commands = [];

      // create extensionElements
      let extensionElements = bo.get('extensionElements');
github zeebe-io / zeebe-modeler / client / src / app / tabs / bpmn / custom / properties-provider / parts / implementation / MultiInstanceLoopCharacteristics.js View on Github external
return {
        outputCollection: getProperty(element, 'outputCollection')
      };

    },

    set: function(element, values) {
      return setProperties(element, {
        outputCollection: values.outputCollection || undefined
      });
    },
  }));

  // output element //////////////////////////////////////////////////////
  entries.push(entryFactory.textField({
    id: 'multiInstance-outputElement',
    label: translate('Output Element'),
    modelProperty: 'outputElement',

    get: function(element) {

      return {
        outputElement: getProperty(element, 'outputElement')
      };

    },

    set: function(element, values) {
      return setProperties(element, {
        outputElement: values.outputElement || undefined
      });
github bpmn-io / bpmn-js-examples / properties-panel-extension / app / provider / magic / parts / SpellProps.js View on Github external
export default function(group, element) {

  // Only return an entry, if the currently selected
  // element is a start event.

  if (is(element, 'bpmn:StartEvent')) {
    group.entries.push(entryFactory.textField({
      id : 'spell',
      description : 'Apply a black magic spell',
      label : 'Spell',
      modelProperty : 'spell'
    }));
  }
}
github bptlab / scylla / app / app / panelExtension / ScyllaGeneralProperties.js View on Github external
function createNumberInput(attribute, prefix, getDistributionElement) {
    let attributeName = attribute.name;
    let propertyName = prefix+'.'+attributeName;
    let textField = entryFactory.textField({
        id : propertyName,
        label : attributeName,
        modelProperty : propertyName,
        get : element => {
            let distribution = getDistributionElement(element);
            let attributeElement = distribution.$children.find(each => each.$type == 'scylla:'+attributeName);
            let toReturn = {};
            toReturn[propertyName] = attributeElement.$body;
            return toReturn;
        },
        set: (element, value) => {
            let distribution = getDistributionElement(element);
            let attributeElement = distribution.$children.find(each => each.$type == 'scylla:'+attributeName);
            attributeElement.$body = value && value[propertyName];
        },
        validate: function(element, values) {
github zeebe-io / zeebe-modeler / client / src / app / tabs / bpmn / custom / properties-provider / parts / implementation / TimerEventDefinition.js View on Github external
let value;
        if (oldType) {
          const definition = timerEventDefinition.get(oldType);
          value = definition.get('body');
        }

        props[newType] = createFormalExpression(timerEventDefinition, value, bpmnFactory);
      }

      return cmdHelper.updateBusinessObject(element, timerEventDefinition, props);
    }

  }));

  group.entries.push(entryFactory.textField({
    id: 'timer-event-definition',
    label: 'Timer Definition',
    modelProperty: 'timerDefinition',

    get: function(element, node) {
      const type = getTimerDefinitionType(timerEventDefinition);
      const definition = type && timerEventDefinition.get(type);
      const value = definition && definition.get('body');
      return {
        timerDefinition: value
      };
    },

    set: function(element, values) {
      const type = getTimerDefinitionType(timerEventDefinition);
      const definition = type && timerEventDefinition.get(type);
github bptlab / scylla / app / app / panelExtension / XyzPluginProperties.js View on Github external
export default function(group, element) {

  if (is(element, 'bpmn:Task')) {
    group.entries.push(entryFactory.textField({
      id : 'fluffiness',
      description : 'How fluffy is the start event?',
      label : 'Fluffiness',
      modelProperty : 'fluffiness'
    }));
  }
}
github camunda-consulting / code / snippets / bpmnjs-custom-modeler / app / custom-modeler / custom / propertyprovider / SoftwareSettings.js View on Github external
var createTextField = function(id, label) {
    return entryFactory.textField({
      id : id,
      description : label,
      label : label,
      modelProperty : id,
      get: function(element,node) {
        return getElementValue(element, node, id);
      },
      set: function(element,values,node) {
        return setElementValue(element,values,node, id);
      }
    });
  };
  var createSelectBox = function(id, label, selectOptions) {
github zeebe-io / zeebe-modeler / client / src / app / tabs / bpmn / custom / properties-provider / parts / implementation / TimerDurationDefinition.js View on Github external
export default function(group, bpmnFactory, timerEventDefinition) {
  group.entries.push(entryFactory.textField({
    id: 'timer-event-duration',
    label: 'Timer Duration',
    modelProperty: 'timerDefinition',

    get: function(element, node) {
      const type = 'timeDuration';
      const definition = type && timerEventDefinition.get(type);
      const value = definition && definition.get('body');
      return {
        timerDefinition: value
      };
    },

    set: function(element, values) {
      const type = 'timeDuration';
      let definition = type && timerEventDefinition.get(type);
github zeebe-io / zeebe-modeler / client / src / app / tabs / bpmn / custom / properties-provider / parts / implementation / ElementReferenceExtensionElementProperty.js View on Github external
const modelProperty = options.modelProperty || 'name';
  const extensionElementKey = options.extensionElement || 'zeebe:Subscription';
  const shouldValidate = options.shouldValidate || false;


  function getElements(bo, type, prop) {
    const elems = extensionElementsHelper.getExtensionElements(bo, type) || [];
    return !prop ? elems : (elems[0] || {})[prop] || [];
  }

  function getExtensionElement(element) {
    const bo = getBusinessObject(element);
    return (getElements(bo, extensionElementKey) || [])[0];
  }

  const entry = entryFactory.textField({
    id: id,
    label: label,
    modelProperty: modelProperty,

    get: function(element, node) {
      const reference = definition.get(referenceProperty);
      const props = {};
      props[modelProperty] = reference && (getExtensionElement(reference) || {})[modelProperty];
      return props;
    },

    set: function(element, values, node) {

      const reference = definition.get(referenceProperty);
      const bo = getBusinessObject(reference);
      reference.businessObject = bo;

bpmn-js-properties-panel

A simple properties panel for bpmn-js

MIT
Latest version published 9 days ago

Package Health Score

90 / 100
Full package analysis