<commit_before>import Group from '@bpmn-io/properties-panel/lib/components/Group';
import ListGroup from '@bpmn-io/properties-panel/lib/components/ListGroup';

import { findIndex } from 'min-dash';

import {
  AsynchronousContinuationsProps,
  CallActivityProps,
  CandidateStarterProps,
  ConditionProps,
  ConnectorInputProps,
  ConnectorOutputProps,
  ErrorProps,
  EscalationProps,
  ExtensionPropertiesProps,
  ExternalTaskPriorityProps,
  FieldInjectionProps,
  FormDataProps,
  FormProps,
  HistoryCleanupProps,
  ImplementationProps,
  InitiatorProps,
  InMappingPropagationProps,
  InMappingProps,
  InputProps,
  JobExecutionProps,
  MultiInstanceProps,
  OutMappingPropagationProps,
  OutMappingProps,
  OutputProps,
  ExecutionListenerProps,
  ProcessVariablesProps,
  ScriptTaskProps,
  TasklistProps,
  UserAssignmentProps,
  VersionTagProps
} from './properties';


const LOW_PRIORITY = 500;

/**
 * Provides `camunda` namespace properties.
 *
 * @example
 * ```javascript
 * import BpmnModeler from 'bpmn-js/lib/Modeler';
 * import {
 *   BpmnPropertiesPanelModule,
 *   BpmnPropertiesProviderModule,
 *   CamundaPlatformPropertiesProviderModule
 * } from '@bpmn-io/bpmn-properties-panel';
 *
 * const modeler = new BpmnModeler({
 *   container: '#canvas',
 *   propertiesPanel: {
 *     parent: '#properties'
 *   },
 *   additionalModules: [
 *     BpmnPropertiesPanelModule,
 *     BpmnPropertiesProviderModule,
 *     CamundaPlatformPropertiesProviderModule
 *   ]
 * });
 * ```
 */
export default class CamundaPlatformPropertiesProvider {

  constructor(propertiesPanel) {
    propertiesPanel.registerProvider(LOW_PRIORITY, this);
  }

  getGroups(element) {
    return (groups) => {

      // (1) add Camunda Platform specific groups
      groups = groups.concat(this._getGroups(element));

      // (2) update existing groups with Camunda Platform specific properties
      updateGeneralGroup(groups, element);
      updateErrorGroup(groups, element);
      updateEscalationGroup(groups, element);
      updateMultiInstanceGroup(groups, element);

      return groups;
    };
  }

  _getGroups(element) {
    const groups = [
      ProcessVariablesGroup(element),
      ImplementationGroup(element),
      UserAssignmentGroup(element),
      StartInitiatorGroup(element),
      ScriptGroup(element),
      AsynchronousContinuationsGroup(element),
      CallActivityGroup(element),
      InMappingGroup(element),
      InMappingPropagationGroup(element),
      OutMappingGroup(element),
      OutMappingPropagationGroup(element),
      CandidateStarterGroup(element),
      ConditionGroup(element),
      InputGroup(element),
      OutputGroup(element),
      ConnectorInputGroup(element),
      ConnectorOutputGroup(element),
      ExtensionPropertiesGroup(element),
      ExternalTaskGroup(element),
      FieldInjectionGroup(element),
      FormDataGroup(element),
      FormKeyGroup(element),
      FormGroup(element),
      HistoryCleanupGroup(element),
      JobExecutionGroup(element),
      ExecutionListenerGroup(element),
      MultiInstanceGroup(element),
      TasklistGroup(element)
    ];

    // contract: if a group returns null, it should not be displayed at all
    return groups.filter(group => group !== null);
  }
}

CamundaPlatformPropertiesProvider.$inject = [ 'propertiesPanel' ];

function updateGeneralGroup(groups, element) {

  const generalGroup = findGroup(groups, 'general');
<commit_msg>chore(camunda-platform): update ordering of inputs + outputs groups<commit_after>import Group from '@bpmn-io/properties-panel/lib/components/Group';
import ListGroup from '@bpmn-io/properties-panel/lib/components/ListGroup';

import { findIndex } from 'min-dash';

import {
  AsynchronousContinuationsProps,
  CallActivityProps,
  CandidateStarterProps,
  ConditionProps,
  ConnectorInputProps,
  ConnectorOutputProps,
  ErrorProps,
  EscalationProps,
  ExtensionPropertiesProps,
  ExternalTaskPriorityProps,
  FieldInjectionProps,
  FormDataProps,
  FormProps,
  HistoryCleanupProps,
  ImplementationProps,
  InitiatorProps,
  InMappingPropagationProps,
  InMappingProps,
  InputProps,
  JobExecutionProps,
  MultiInstanceProps,
  OutMappingPropagationProps,
  OutMappingProps,
  OutputProps,
  ExecutionListenerProps,
  ProcessVariablesProps,
  ScriptTaskProps,
  TasklistProps,
  UserAssignmentProps,
  VersionTagProps
} from './properties';


const LOW_PRIORITY = 500;

/**
 * Provides `camunda` namespace properties.
 *
 * @example
 * ```javascript
 * import BpmnModeler from 'bpmn-js/lib/Modeler';
 * import {
 *   BpmnPropertiesPanelModule,
 *   BpmnPropertiesProviderModule,
 *   CamundaPlatformPropertiesProviderModule
 * } from '@bpmn-io/bpmn-properties-panel';
 *
 * const modeler = new BpmnModeler({
 *   container: '#canvas',
 *   propertiesPanel: {
 *     parent: '#properties'
 *   },
 *   additionalModules: [
 *     BpmnPropertiesPanelModule,
 *     BpmnPropertiesProviderModule,
 *     CamundaPlatformPropertiesProviderModule
 *   ]
 * });
 * ```
 */
export default class CamundaPlatformPropertiesProvider {

  constructor(propertiesPanel) {
    propertiesPanel.registerProvider(LOW_PRIORITY, this);
  }

  getGroups(element) {
    return (groups) => {

      // (1) add Camunda Platform specific groups
      groups = groups.concat(this._getGroups(element));

      // (2) update existing groups with Camunda Platform specific properties
      updateGeneralGroup(groups, element);
      updateErrorGroup(groups, element);
      updateEscalationGroup(groups, element);
      updateMultiInstanceGroup(groups, element);

      return groups;
    };
  }

  _getGroups(element) {
    const groups = [
      ProcessVariablesGroup(element),
      ImplementationGroup(element),
      UserAssignmentGroup(element),
      StartInitiatorGroup(element),
      ScriptGroup(element),
      AsynchronousContinuationsGroup(element),
      CallActivityGroup(element),
      InMappingPropagationGroup(element),
      InMappingGroup(element),
      InputGroup(element),
      ConnectorInputGroup(element),
      OutMappingPropagationGroup(element),
      OutMappingGroup(element),
      OutputGroup(element),
      ConnectorOutputGroup(element),
      CandidateStarterGroup(element),
      ConditionGroup(element),
      ExtensionPropertiesGroup(element),
      ExternalTaskGroup(element),
      FieldInjectionGroup(element),
      FormDataGroup(element),
      FormKeyGroup(element),
      FormGroup(element),
      HistoryCleanupGroup(element),
      JobExecutionGroup(element),
      ExecutionListenerGroup(element),
      MultiInstanceGroup(element),
      TasklistGroup(element)
    ];

    // contract: if a group returns null, it should not be displayed at all
    return groups.filter(group => group !== null);
  }
}

CamundaPlatformPropertiesProvider.$inject = [ 'propertiesPanel' ];

function updateGeneralGroup(groups, element) {

  const generalGroup = findGroup(groups, 'general');

{'fraction_non_alphanumeric': 0.09443483275663206, 'fraction_numerical': 0.0014417531718569781, 'mean_word_length': 4.219714070729872, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1463580', 'n_tokens_mistral': 1929, 'n_tokens_neox': 1914, 'n_words': 348}