From 82fdcb5da5cd7bae330c66bf3bc48a374ced6b91 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Fri, 5 Sep 2025 15:38:09 +0800 Subject: [PATCH 01/12] =?UTF-8?q?feat:=20bpmnProcessDesigner=20=E8=BF=81?= =?UTF-8?q?=E7=A7=BB=EF=BC=88=E7=BA=AF=E5=A4=8D=E5=88=B6=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/package.json | 7 + .../package/designer/ProcessDesigner.vue | 700 ++++++++ .../package/designer/ProcessViewer.vue | 431 +++++ .../package/designer/index.ts | 8 + .../package/designer/index2.ts | 8 + .../plugins/content-pad/contentPadProvider.js | 440 +++++ .../designer/plugins/content-pad/index.js | 6 + .../package/designer/plugins/defaultEmpty.js | 24 + .../descriptor/activitiDescriptor.json | 1004 +++++++++++ .../plugins/descriptor/camundaDescriptor.json | 1020 +++++++++++ .../descriptor/flowableDescriptor.json | 1493 +++++++++++++++++ .../activiti/activitiExtension.js | 101 ++ .../extension-moddle/activiti/index.js | 11 + .../extension-moddle/camunda/extension.js | 165 ++ .../plugins/extension-moddle/camunda/index.js | 8 + .../flowable/flowableExtension.js | 101 ++ .../extension-moddle/flowable/index.js | 10 + .../designer/plugins/palette/CustomPalette.js | 233 +++ .../package/designer/plugins/palette/index.js | 22 + .../plugins/palette/paletteProvider.js | 219 +++ .../plugins/translate/customTranslate.js | 44 + .../package/designer/plugins/translate/zh.js | 246 +++ .../bpmnProcessDesigner/package/index.ts | 9 + .../package/palette/ProcessPalette.vue | 49 + .../package/penal/PropertiesPanel.vue | 358 ++++ .../package/penal/base/ElementBaseInfo.vue | 194 +++ .../custom-config/ElementCustomConfig.vue | 40 + .../components/BoundaryEventTimer.vue | 286 ++++ .../components/UserTaskCustomConfig.vue | 760 +++++++++ .../package/penal/custom-config/data.ts | 13 + .../penal/flow-condition/FlowCondition.vue | 218 +++ .../package/penal/form/ElementForm.vue | 518 ++++++ .../package/penal/index.js | 7 + .../penal/listeners/ElementListeners.vue | 504 ++++++ .../penal/listeners/ProcessListenerDialog.vue | 98 ++ .../penal/listeners/UserTaskListeners.vue | 564 +++++++ .../package/penal/listeners/template.js | 178 ++ .../package/penal/listeners/utilSelf.ts | 96 ++ .../multi-instance/ElementMultiInstance.vue | 459 +++++ .../penal/other/ElementOtherConfig.vue | 60 + .../penal/properties/ElementProperties.vue | 195 +++ .../penal/signal-message/SignalAndMessage.vue | 159 ++ .../package/penal/task/ElementTask.vue | 81 + .../package/penal/task/data.ts | 36 + .../task/task-components/CallActivity.vue | 325 ++++ .../ProcessExpressionDialog.vue | 81 + .../task/task-components/ReceiveTask.vue | 132 ++ .../penal/task/task-components/ScriptTask.vue | 105 ++ .../task/task-components/ServiceTask.vue | 103 ++ .../penal/task/task-components/UserTask.vue | 520 ++++++ .../penal/time-event-config/CycleConfig.vue | 342 ++++ .../time-event-config/DurationConfig.vue | 86 + .../time-event-config/TimeEventConfig.vue | 345 ++++ .../package/theme/element-variables.scss | 81 + .../package/theme/index.scss | 120 ++ .../package/theme/process-designer.scss | 184 ++ .../package/theme/process-panel.scss | 127 ++ .../bpmnProcessDesigner/package/utils.ts | 93 + .../src/highlight/index.js | 5 + .../modules/custom-renderer/CustomRenderer.js | 30 + .../src/modules/custom-renderer/index.js | 6 + .../src/modules/rules/CustomRules.js | 16 + .../src/modules/rules/index.js | 6 + .../bpmnProcessDesigner/src/translations.ts | 25 + .../src/utils/directive/clickOutSide.js | 39 + .../bpmnProcessDesigner/src/utils/index.js | 10 + .../bpmnProcessDesigner/src/utils/xml2json.js | 50 + pnpm-lock.yaml | 533 ++++++ 68 files changed, 14547 insertions(+) create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/designer/ProcessViewer.vue create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/designer/index.ts create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/designer/index2.ts create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/content-pad/contentPadProvider.js create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/content-pad/index.js create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/defaultEmpty.js create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/activitiDescriptor.json create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/camundaDescriptor.json create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/flowableDescriptor.json create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/activiti/activitiExtension.js create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/activiti/index.js create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/camunda/extension.js create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/camunda/index.js create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/flowable/flowableExtension.js create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/flowable/index.js create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/palette/CustomPalette.js create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/palette/index.js create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/palette/paletteProvider.js create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/translate/customTranslate.js create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/translate/zh.js create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/index.ts create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/palette/ProcessPalette.vue create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/penal/PropertiesPanel.vue create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/penal/base/ElementBaseInfo.vue create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/penal/custom-config/ElementCustomConfig.vue create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/penal/custom-config/components/BoundaryEventTimer.vue create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/penal/custom-config/components/UserTaskCustomConfig.vue create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/penal/custom-config/data.ts create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/penal/flow-condition/FlowCondition.vue create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/penal/form/ElementForm.vue create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/penal/index.js create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/penal/listeners/ElementListeners.vue create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/penal/listeners/ProcessListenerDialog.vue create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/penal/listeners/UserTaskListeners.vue create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/penal/listeners/template.js create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/penal/listeners/utilSelf.ts create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/penal/multi-instance/ElementMultiInstance.vue create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/penal/other/ElementOtherConfig.vue create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/penal/properties/ElementProperties.vue create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/penal/signal-message/SignalAndMessage.vue create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/penal/task/ElementTask.vue create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/penal/task/data.ts create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/penal/task/task-components/CallActivity.vue create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/penal/task/task-components/ProcessExpressionDialog.vue create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/penal/task/task-components/ReceiveTask.vue create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/penal/task/task-components/ScriptTask.vue create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/penal/task/task-components/ServiceTask.vue create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/penal/task/task-components/UserTask.vue create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/penal/time-event-config/CycleConfig.vue create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/penal/time-event-config/DurationConfig.vue create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/penal/time-event-config/TimeEventConfig.vue create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/theme/element-variables.scss create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/theme/index.scss create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/theme/process-designer.scss create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/theme/process-panel.scss create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/package/utils.ts create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/src/highlight/index.js create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/src/modules/custom-renderer/CustomRenderer.js create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/src/modules/custom-renderer/index.js create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/src/modules/rules/CustomRules.js create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/src/modules/rules/index.js create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/src/translations.ts create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/src/utils/directive/clickOutSide.js create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/src/utils/index.js create mode 100644 apps/web-antd/src/components/bpmnProcessDesigner/src/utils/xml2json.js diff --git a/apps/web-antd/package.json b/apps/web-antd/package.json index 6d001275d..71cb71be3 100644 --- a/apps/web-antd/package.json +++ b/apps/web-antd/package.json @@ -46,10 +46,17 @@ "@vueuse/core": "catalog:", "@vueuse/integrations": "catalog:", "ant-design-vue": "catalog:", + "bpmn-js": "^17.11.1", + "bpmn-js-properties-panel": "5.23.0", + "bpmn-js-token-simulation": "^0.36.3", + "camunda-bpmn-moddle": "^7.0.1", "cropperjs": "catalog:", "dayjs": "catalog:", + "diagram-js": "^12.8.1", + "fast-xml-parser": "^4.5.3", "highlight.js": "catalog:", "pinia": "catalog:", + "steady-xml": "^0.1.0", "tinymce": "catalog:", "vue": "catalog:", "vue-dompurify-html": "catalog:", diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue b/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue new file mode 100644 index 000000000..234555c24 --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue @@ -0,0 +1,700 @@ + + + diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/ProcessViewer.vue b/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/ProcessViewer.vue new file mode 100644 index 000000000..77f335396 --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/ProcessViewer.vue @@ -0,0 +1,431 @@ + + + diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/index.ts b/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/index.ts new file mode 100644 index 000000000..4cfdbf521 --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/index.ts @@ -0,0 +1,8 @@ +import MyProcessDesigner from './ProcessDesigner.vue'; + +MyProcessDesigner.install = function (Vue) { + Vue.component(MyProcessDesigner.name, MyProcessDesigner); +}; + +// 流程图的设计器,可编辑 +export default MyProcessDesigner; diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/index2.ts b/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/index2.ts new file mode 100644 index 000000000..fa1457d7d --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/index2.ts @@ -0,0 +1,8 @@ +import MyProcessViewer from './ProcessViewer.vue'; + +MyProcessViewer.install = function (Vue) { + Vue.component(MyProcessViewer.name, MyProcessViewer); +}; + +// 流程图的查看器,不可编辑 +export default MyProcessViewer; diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/content-pad/contentPadProvider.js b/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/content-pad/contentPadProvider.js new file mode 100644 index 000000000..dbc0b25a5 --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/content-pad/contentPadProvider.js @@ -0,0 +1,440 @@ +import { getChildLanes } from 'bpmn-js/lib/features/modeling/util/LaneUtil'; +import { isAny } from 'bpmn-js/lib/features/modeling/util/ModelingUtil'; +import { isEventSubProcess, isExpanded } from 'bpmn-js/lib/util/DiUtil'; +import { is } from 'bpmn-js/lib/util/ModelUtil'; +import { hasPrimaryModifier } from 'diagram-js/lib/util/Mouse'; +import { assign, forEach, isArray } from 'min-dash'; + +/** + * A provider for BPMN 2.0 elements context pad + */ +export default function ContextPadProvider( + config, + injector, + eventBus, + contextPad, + modeling, + elementFactory, + connect, + create, + popupMenu, + canvas, + rules, + translate, +) { + config = config || {}; + + contextPad.registerProvider(this); + + this._contextPad = contextPad; + + this._modeling = modeling; + + this._elementFactory = elementFactory; + this._connect = connect; + this._create = create; + this._popupMenu = popupMenu; + this._canvas = canvas; + this._rules = rules; + this._translate = translate; + + if (config.autoPlace !== false) { + this._autoPlace = injector.get('autoPlace', false); + } + + eventBus.on('create.end', 250, (event) => { + const context = event.context; + const shape = context.shape; + + if (!hasPrimaryModifier(event) || !contextPad.isOpen(shape)) { + return; + } + + const entries = contextPad.getEntries(shape); + + if (entries.replace) { + entries.replace.action.click(event, shape); + } + }); +} + +ContextPadProvider.$inject = [ + 'config.contextPad', + 'injector', + 'eventBus', + 'contextPad', + 'modeling', + 'elementFactory', + 'connect', + 'create', + 'popupMenu', + 'canvas', + 'rules', + 'translate', + 'elementRegistry', +]; + +ContextPadProvider.prototype.getContextPadEntries = function (element) { + const autoPlace = this._autoPlace; + const canvas = this._canvas; + const connect = this._connect; + const contextPad = this._contextPad; + const create = this._create; + const elementFactory = this._elementFactory; + const modeling = this._modeling; + const popupMenu = this._popupMenu; + const rules = this._rules; + const translate = this._translate; + + const actions = {}; + + if (element.type === 'label') { + return actions; + } + + const businessObject = element.businessObject; + + function startConnect(event, element) { + connect.start(event, element); + } + + function removeElement() { + modeling.removeElements([element]); + } + + function getReplaceMenuPosition(element) { + const Y_OFFSET = 5; + + const diagramContainer = canvas.getContainer(); + const pad = contextPad.getPad(element).html; + + const diagramRect = diagramContainer.getBoundingClientRect(); + const padRect = pad.getBoundingClientRect(); + + const top = padRect.top - diagramRect.top; + const left = padRect.left - diagramRect.left; + + const pos = { + x: left, + y: top + padRect.height + Y_OFFSET, + }; + + return pos; + } + + /** + * Create an append action + * + * @param {string} type + * @param {string} className + * @param {string} [title] + * @param {object} [options] + * + * @return {object} descriptor + */ + function appendAction(type, className, title, options) { + if (typeof title !== 'string') { + options = title; + title = translate('Append {type}', { type: type.replace(/^bpmn:/, '') }); + } + + function appendStart(event, element) { + const shape = elementFactory.createShape(assign({ type }, options)); + create.start(event, shape, { + source: element, + }); + } + + const append = autoPlace + ? function (event, element) { + const shape = elementFactory.createShape(assign({ type }, options)); + + autoPlace.append(element, shape); + } + : appendStart; + + return { + group: 'model', + className, + title, + action: { + dragstart: appendStart, + click: append, + }, + }; + } + + function splitLaneHandler(count) { + return function (event, element) { + // actual split + modeling.splitLane(element, count); + + // refresh context pad after split to + // get rid of split icons + contextPad.open(element, true); + }; + } + + if ( + isAny(businessObject, ['bpmn:Lane', 'bpmn:Participant']) && + isExpanded(businessObject) + ) { + const childLanes = getChildLanes(element); + + assign(actions, { + 'lane-insert-above': { + group: 'lane-insert-above', + className: 'bpmn-icon-lane-insert-above', + title: translate('Add Lane above'), + action: { + click(event, element) { + modeling.addLane(element, 'top'); + }, + }, + }, + }); + + if (childLanes.length < 2) { + if (element.height >= 120) { + assign(actions, { + 'lane-divide-two': { + group: 'lane-divide', + className: 'bpmn-icon-lane-divide-two', + title: translate('Divide into two Lanes'), + action: { + click: splitLaneHandler(2), + }, + }, + }); + } + + if (element.height >= 180) { + assign(actions, { + 'lane-divide-three': { + group: 'lane-divide', + className: 'bpmn-icon-lane-divide-three', + title: translate('Divide into three Lanes'), + action: { + click: splitLaneHandler(3), + }, + }, + }); + } + } + + assign(actions, { + 'lane-insert-below': { + group: 'lane-insert-below', + className: 'bpmn-icon-lane-insert-below', + title: translate('Add Lane below'), + action: { + click(event, element) { + modeling.addLane(element, 'bottom'); + }, + }, + }, + }); + } + + if (is(businessObject, 'bpmn:FlowNode')) { + if (is(businessObject, 'bpmn:EventBasedGateway')) { + assign(actions, { + 'append.receive-task': appendAction( + 'bpmn:ReceiveTask', + 'bpmn-icon-receive-task', + translate('Append ReceiveTask'), + ), + 'append.message-intermediate-event': appendAction( + 'bpmn:IntermediateCatchEvent', + 'bpmn-icon-intermediate-event-catch-message', + translate('Append MessageIntermediateCatchEvent'), + { eventDefinitionType: 'bpmn:MessageEventDefinition' }, + ), + 'append.timer-intermediate-event': appendAction( + 'bpmn:IntermediateCatchEvent', + 'bpmn-icon-intermediate-event-catch-timer', + translate('Append TimerIntermediateCatchEvent'), + { eventDefinitionType: 'bpmn:TimerEventDefinition' }, + ), + 'append.condition-intermediate-event': appendAction( + 'bpmn:IntermediateCatchEvent', + 'bpmn-icon-intermediate-event-catch-condition', + translate('Append ConditionIntermediateCatchEvent'), + { eventDefinitionType: 'bpmn:ConditionalEventDefinition' }, + ), + 'append.signal-intermediate-event': appendAction( + 'bpmn:IntermediateCatchEvent', + 'bpmn-icon-intermediate-event-catch-signal', + translate('Append SignalIntermediateCatchEvent'), + { eventDefinitionType: 'bpmn:SignalEventDefinition' }, + ), + }); + } else if ( + isEventType( + businessObject, + 'bpmn:BoundaryEvent', + 'bpmn:CompensateEventDefinition', + ) + ) { + assign(actions, { + 'append.compensation-activity': appendAction( + 'bpmn:Task', + 'bpmn-icon-task', + translate('Append compensation activity'), + { + isForCompensation: true, + }, + ), + }); + } else if ( + !is(businessObject, 'bpmn:EndEvent') && + !businessObject.isForCompensation && + !isEventType( + businessObject, + 'bpmn:IntermediateThrowEvent', + 'bpmn:LinkEventDefinition', + ) && + !isEventSubProcess(businessObject) + ) { + assign(actions, { + 'append.end-event': appendAction( + 'bpmn:EndEvent', + 'bpmn-icon-end-event-none', + translate('Append EndEvent'), + ), + 'append.gateway': appendAction( + 'bpmn:ExclusiveGateway', + 'bpmn-icon-gateway-none', + translate('Append Gateway'), + ), + 'append.append-task': appendAction( + 'bpmn:UserTask', + 'bpmn-icon-user-task', + translate('Append Task'), + ), + 'append.intermediate-event': appendAction( + 'bpmn:IntermediateThrowEvent', + 'bpmn-icon-intermediate-event-none', + translate('Append Intermediate/Boundary Event'), + ), + }); + } + } + + if (!popupMenu.isEmpty(element, 'bpmn-replace')) { + // Replace menu entry + assign(actions, { + replace: { + group: 'edit', + className: 'bpmn-icon-screw-wrench', + title: '修改类型', + action: { + click(event, element) { + const position = assign(getReplaceMenuPosition(element), { + cursor: { x: event.x, y: event.y }, + }); + + popupMenu.open(element, 'bpmn-replace', position); + }, + }, + }, + }); + } + + if ( + isAny(businessObject, [ + 'bpmn:FlowNode', + 'bpmn:InteractionNode', + 'bpmn:DataObjectReference', + 'bpmn:DataStoreReference', + ]) + ) { + assign(actions, { + 'append.text-annotation': appendAction( + 'bpmn:TextAnnotation', + 'bpmn-icon-text-annotation', + ), + + connect: { + group: 'connect', + className: 'bpmn-icon-connection-multi', + title: translate( + `Connect using ${ + businessObject.isForCompensation ? '' : 'Sequence/MessageFlow or ' + }Association`, + ), + action: { + click: startConnect, + dragstart: startConnect, + }, + }, + }); + } + + if ( + isAny(businessObject, [ + 'bpmn:DataObjectReference', + 'bpmn:DataStoreReference', + ]) + ) { + assign(actions, { + connect: { + group: 'connect', + className: 'bpmn-icon-connection-multi', + title: translate('Connect using DataInputAssociation'), + action: { + click: startConnect, + dragstart: startConnect, + }, + }, + }); + } + + if (is(businessObject, 'bpmn:Group')) { + assign(actions, { + 'append.text-annotation': appendAction( + 'bpmn:TextAnnotation', + 'bpmn-icon-text-annotation', + ), + }); + } + + // delete element entry, only show if allowed by rules + let deleteAllowed = rules.allowed('elements.delete', { elements: [element] }); + + if (isArray(deleteAllowed)) { + // was the element returned as a deletion candidate? + deleteAllowed = deleteAllowed[0] === element; + } + + if (deleteAllowed) { + assign(actions, { + delete: { + group: 'edit', + className: 'bpmn-icon-trash', + title: translate('Remove'), + action: { + click: removeElement, + }, + }, + }); + } + + return actions; +}; + +// helpers ///////// + +function isEventType(eventBo, type, definition) { + const isType = eventBo.$instanceOf(type); + let isDefinition = false; + + const definitions = eventBo.eventDefinitions || []; + forEach(definitions, (def) => { + if (def.$type === definition) { + isDefinition = true; + } + }); + + return isType && isDefinition; +} diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/content-pad/index.js b/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/content-pad/index.js new file mode 100644 index 000000000..d5325aedb --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/content-pad/index.js @@ -0,0 +1,6 @@ +import CustomContextPadProvider from './contentPadProvider'; + +export default { + __init__: ['contextPadProvider'], + contextPadProvider: ['type', CustomContextPadProvider], +}; diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/defaultEmpty.js b/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/defaultEmpty.js new file mode 100644 index 000000000..98c17dc88 --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/defaultEmpty.js @@ -0,0 +1,24 @@ +export default (key, name, type) => { + if (!type) type = 'camunda'; + const TYPE_TARGET = { + activiti: 'http://activiti.org/bpmn', + camunda: 'http://bpmn.io/schema/bpmn', + flowable: 'http://flowable.org/bpmn', + }; + return ` + + + + + + + +`; +}; diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/activitiDescriptor.json b/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/activitiDescriptor.json new file mode 100644 index 000000000..94ba8f6cc --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/activitiDescriptor.json @@ -0,0 +1,1004 @@ +{ + "name": "Activiti", + "uri": "http://activiti.org/bpmn", + "prefix": "activiti", + "xml": { + "tagAlias": "lowerCase" + }, + "associations": [], + "types": [ + { + "name": "Definitions", + "isAbstract": true, + "extends": ["bpmn:Definitions"], + "properties": [ + { + "name": "diagramRelationId", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "InOutBinding", + "superClass": ["Element"], + "isAbstract": true, + "properties": [ + { + "name": "source", + "isAttr": true, + "type": "String" + }, + { + "name": "sourceExpression", + "isAttr": true, + "type": "String" + }, + { + "name": "target", + "isAttr": true, + "type": "String" + }, + { + "name": "businessKey", + "isAttr": true, + "type": "String" + }, + { + "name": "local", + "isAttr": true, + "type": "Boolean", + "default": false + }, + { + "name": "variables", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "In", + "superClass": ["InOutBinding"], + "meta": { + "allowedIn": ["bpmn:CallActivity"] + } + }, + { + "name": "Out", + "superClass": ["InOutBinding"], + "meta": { + "allowedIn": ["bpmn:CallActivity"] + } + }, + { + "name": "AsyncCapable", + "isAbstract": true, + "extends": ["bpmn:Activity", "bpmn:Gateway", "bpmn:Event"], + "properties": [ + { + "name": "async", + "isAttr": true, + "type": "Boolean", + "default": false + }, + { + "name": "asyncBefore", + "isAttr": true, + "type": "Boolean", + "default": false + }, + { + "name": "asyncAfter", + "isAttr": true, + "type": "Boolean", + "default": false + }, + { + "name": "exclusive", + "isAttr": true, + "type": "Boolean", + "default": true + } + ] + }, + { + "name": "JobPriorized", + "isAbstract": true, + "extends": ["bpmn:Process", "activiti:AsyncCapable"], + "properties": [ + { + "name": "jobPriority", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "SignalEventDefinition", + "isAbstract": true, + "extends": ["bpmn:SignalEventDefinition"], + "properties": [ + { + "name": "async", + "isAttr": true, + "type": "Boolean", + "default": false + } + ] + }, + { + "name": "ErrorEventDefinition", + "isAbstract": true, + "extends": ["bpmn:ErrorEventDefinition"], + "properties": [ + { + "name": "errorCodeVariable", + "isAttr": true, + "type": "String" + }, + { + "name": "errorMessageVariable", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Error", + "isAbstract": true, + "extends": ["bpmn:Error"], + "properties": [ + { + "name": "activiti:errorMessage", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "PotentialStarter", + "superClass": ["Element"], + "properties": [ + { + "name": "resourceAssignmentExpression", + "type": "bpmn:ResourceAssignmentExpression" + } + ] + }, + { + "name": "FormSupported", + "isAbstract": true, + "extends": ["bpmn:StartEvent", "bpmn:UserTask"], + "properties": [ + { + "name": "formHandlerClass", + "isAttr": true, + "type": "String" + }, + { + "name": "formKey", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "TemplateSupported", + "isAbstract": true, + "extends": ["bpmn:Process", "bpmn:FlowElement"], + "properties": [ + { + "name": "modelerTemplate", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Initiator", + "isAbstract": true, + "extends": ["bpmn:StartEvent"], + "properties": [ + { + "name": "initiator", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "ScriptTask", + "isAbstract": true, + "extends": ["bpmn:ScriptTask"], + "properties": [ + { + "name": "resultVariable", + "isAttr": true, + "type": "String" + }, + { + "name": "resource", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Process", + "isAbstract": true, + "extends": ["bpmn:Process"], + "properties": [ + { + "name": "candidateStarterGroups", + "isAttr": true, + "type": "String" + }, + { + "name": "candidateStarterUsers", + "isAttr": true, + "type": "String" + }, + { + "name": "versionTag", + "isAttr": true, + "type": "String" + }, + { + "name": "historyTimeToLive", + "isAttr": true, + "type": "String" + }, + { + "name": "isStartableInTasklist", + "isAttr": true, + "type": "Boolean", + "default": true + }, + { + "name": "executionListener", + "isAbstract": true, + "type": "Expression" + } + ] + }, + { + "name": "EscalationEventDefinition", + "isAbstract": true, + "extends": ["bpmn:EscalationEventDefinition"], + "properties": [ + { + "name": "escalationCodeVariable", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "FormalExpression", + "isAbstract": true, + "extends": ["bpmn:FormalExpression"], + "properties": [ + { + "name": "resource", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "multiinstance_type", + "superClass": ["Element"] + }, + { + "name": "multiinstance_condition", + "superClass": ["Element"] + }, + { + "name": "Assignable", + "extends": ["bpmn:UserTask"], + "properties": [ + { + "name": "assignee", + "isAttr": true, + "type": "String" + }, + { + "name": "candidateUsers", + "isAttr": true, + "type": "String" + }, + { + "name": "candidateGroups", + "isAttr": true, + "type": "String" + }, + { + "name": "dueDate", + "isAttr": true, + "type": "String" + }, + { + "name": "followUpDate", + "isAttr": true, + "type": "String" + }, + { + "name": "priority", + "isAttr": true, + "type": "String" + }, + { + "name": "multiinstance_condition", + "isAttr": true, + "type": "String" + }, + { + "name": "candidateStrategy", + "isAttr": true, + "type": "String" + }, + { + "name": "candidateParam", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "CallActivity", + "extends": ["bpmn:CallActivity"], + "properties": [ + { + "name": "calledElementBinding", + "isAttr": true, + "type": "String", + "default": "latest" + }, + { + "name": "calledElementVersion", + "isAttr": true, + "type": "String" + }, + { + "name": "calledElementVersionTag", + "isAttr": true, + "type": "String" + }, + { + "name": "calledElementTenantId", + "isAttr": true, + "type": "String" + }, + { + "name": "caseRef", + "isAttr": true, + "type": "String" + }, + { + "name": "caseBinding", + "isAttr": true, + "type": "String", + "default": "latest" + }, + { + "name": "caseVersion", + "isAttr": true, + "type": "String" + }, + { + "name": "caseTenantId", + "isAttr": true, + "type": "String" + }, + { + "name": "variableMappingClass", + "isAttr": true, + "type": "String" + }, + { + "name": "variableMappingDelegateExpression", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "ServiceTaskLike", + "extends": [ + "bpmn:ServiceTask", + "bpmn:BusinessRuleTask", + "bpmn:SendTask", + "bpmn:MessageEventDefinition" + ], + "properties": [ + { + "name": "expression", + "isAttr": true, + "type": "String" + }, + { + "name": "class", + "isAttr": true, + "type": "String" + }, + { + "name": "delegateExpression", + "isAttr": true, + "type": "String" + }, + { + "name": "resultVariable", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "DmnCapable", + "extends": ["bpmn:BusinessRuleTask"], + "properties": [ + { + "name": "decisionRef", + "isAttr": true, + "type": "String" + }, + { + "name": "decisionRefBinding", + "isAttr": true, + "type": "String", + "default": "latest" + }, + { + "name": "decisionRefVersion", + "isAttr": true, + "type": "String" + }, + { + "name": "mapDecisionResult", + "isAttr": true, + "type": "String", + "default": "resultList" + }, + { + "name": "decisionRefTenantId", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "ExternalCapable", + "extends": ["activiti:ServiceTaskLike"], + "properties": [ + { + "name": "type", + "isAttr": true, + "type": "String" + }, + { + "name": "topic", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "TaskPriorized", + "extends": ["bpmn:Process", "activiti:ExternalCapable"], + "properties": [ + { + "name": "taskPriority", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Properties", + "superClass": ["Element"], + "meta": { + "allowedIn": ["*"] + }, + "properties": [ + { + "name": "values", + "type": "Property", + "isMany": true + } + ] + }, + { + "name": "Property", + "superClass": ["Element"], + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "name", + "type": "String", + "isAttr": true + }, + { + "name": "value", + "type": "String", + "isAttr": true + } + ] + }, + { + "name": "Connector", + "superClass": ["Element"], + "meta": { + "allowedIn": ["activiti:ServiceTaskLike"] + }, + "properties": [ + { + "name": "inputOutput", + "type": "InputOutput" + }, + { + "name": "connectorId", + "type": "String" + } + ] + }, + { + "name": "InputOutput", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:FlowNode", "activiti:Connector"] + }, + "properties": [ + { + "name": "inputOutput", + "type": "InputOutput" + }, + { + "name": "connectorId", + "type": "String" + }, + { + "name": "inputParameters", + "isMany": true, + "type": "InputParameter" + }, + { + "name": "outputParameters", + "isMany": true, + "type": "OutputParameter" + } + ] + }, + { + "name": "InputOutputParameter", + "properties": [ + { + "name": "name", + "isAttr": true, + "type": "String" + }, + { + "name": "value", + "isBody": true, + "type": "String" + }, + { + "name": "definition", + "type": "InputOutputParameterDefinition" + } + ] + }, + { + "name": "InputOutputParameterDefinition", + "isAbstract": true + }, + { + "name": "List", + "superClass": ["InputOutputParameterDefinition"], + "properties": [ + { + "name": "items", + "isMany": true, + "type": "InputOutputParameterDefinition" + } + ] + }, + { + "name": "Map", + "superClass": ["InputOutputParameterDefinition"], + "properties": [ + { + "name": "entries", + "isMany": true, + "type": "Entry" + } + ] + }, + { + "name": "Entry", + "properties": [ + { + "name": "key", + "isAttr": true, + "type": "String" + }, + { + "name": "value", + "isBody": true, + "type": "String" + }, + { + "name": "definition", + "type": "InputOutputParameterDefinition" + } + ] + }, + { + "name": "Value", + "superClass": ["InputOutputParameterDefinition"], + "properties": [ + { + "name": "id", + "isAttr": true, + "type": "String" + }, + { + "name": "name", + "isAttr": true, + "type": "String" + }, + { + "name": "value", + "isBody": true, + "type": "String" + } + ] + }, + { + "name": "Script", + "superClass": ["InputOutputParameterDefinition"], + "properties": [ + { + "name": "scriptFormat", + "isAttr": true, + "type": "String" + }, + { + "name": "resource", + "isAttr": true, + "type": "String" + }, + { + "name": "value", + "isBody": true, + "type": "String" + } + ] + }, + { + "name": "Field", + "superClass": ["Element"], + "meta": { + "allowedIn": [ + "activiti:ServiceTaskLike", + "activiti:ExecutionListener", + "activiti:TaskListener" + ] + }, + "properties": [ + { + "name": "name", + "isAttr": true, + "type": "String" + }, + { + "name": "expression", + "type": "String" + }, + { + "name": "stringValue", + "isAttr": true, + "type": "String" + }, + { + "name": "string", + "type": "String" + } + ] + }, + { + "name": "InputParameter", + "superClass": ["InputOutputParameter"] + }, + { + "name": "OutputParameter", + "superClass": ["InputOutputParameter"] + }, + { + "name": "Collectable", + "isAbstract": true, + "extends": ["bpmn:MultiInstanceLoopCharacteristics"], + "superClass": ["activiti:AsyncCapable"], + "properties": [ + { + "name": "collection", + "isAttr": true, + "type": "String" + }, + { + "name": "elementVariable", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "FailedJobRetryTimeCycle", + "superClass": ["Element"], + "meta": { + "allowedIn": ["activiti:AsyncCapable", "bpmn:MultiInstanceLoopCharacteristics"] + }, + "properties": [ + { + "name": "body", + "isBody": true, + "type": "String" + } + ] + }, + { + "name": "ExecutionListener", + "superClass": ["Element"], + "meta": { + "allowedIn": [ + "bpmn:Task", + "bpmn:ServiceTask", + "bpmn:UserTask", + "bpmn:BusinessRuleTask", + "bpmn:ScriptTask", + "bpmn:ReceiveTask", + "bpmn:ManualTask", + "bpmn:ExclusiveGateway", + "bpmn:SequenceFlow", + "bpmn:ParallelGateway", + "bpmn:InclusiveGateway", + "bpmn:EventBasedGateway", + "bpmn:StartEvent", + "bpmn:IntermediateCatchEvent", + "bpmn:IntermediateThrowEvent", + "bpmn:EndEvent", + "bpmn:BoundaryEvent", + "bpmn:CallActivity", + "bpmn:SubProcess", + "bpmn:Process" + ] + }, + "properties": [ + { + "name": "expression", + "isAttr": true, + "type": "String" + }, + { + "name": "class", + "isAttr": true, + "type": "String" + }, + { + "name": "delegateExpression", + "isAttr": true, + "type": "String" + }, + { + "name": "event", + "isAttr": true, + "type": "String" + }, + { + "name": "script", + "type": "Script" + }, + { + "name": "fields", + "type": "Field", + "isMany": true + } + ] + }, + { + "name": "TaskListener", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:UserTask"] + }, + "properties": [ + { + "name": "expression", + "isAttr": true, + "type": "String" + }, + { + "name": "class", + "isAttr": true, + "type": "String" + }, + { + "name": "delegateExpression", + "isAttr": true, + "type": "String" + }, + { + "name": "event", + "isAttr": true, + "type": "String" + }, + { + "name": "script", + "type": "Script" + }, + { + "name": "fields", + "type": "Field", + "isMany": true + } + ] + }, + { + "name": "FormProperty", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:StartEvent", "bpmn:UserTask"] + }, + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "name", + "type": "String", + "isAttr": true + }, + { + "name": "type", + "type": "String", + "isAttr": true + }, + { + "name": "required", + "type": "String", + "isAttr": true + }, + { + "name": "readable", + "type": "String", + "isAttr": true + }, + { + "name": "writable", + "type": "String", + "isAttr": true + }, + { + "name": "variable", + "type": "String", + "isAttr": true + }, + { + "name": "expression", + "type": "String", + "isAttr": true + }, + { + "name": "datePattern", + "type": "String", + "isAttr": true + }, + { + "name": "default", + "type": "String", + "isAttr": true + }, + { + "name": "values", + "type": "Value", + "isMany": true + } + ] + }, + { + "name": "FormProperty", + "superClass": ["Element"], + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "label", + "type": "String", + "isAttr": true + }, + { + "name": "type", + "type": "String", + "isAttr": true + }, + { + "name": "datePattern", + "type": "String", + "isAttr": true + }, + { + "name": "defaultValue", + "type": "String", + "isAttr": true + }, + { + "name": "properties", + "type": "Properties" + }, + { + "name": "validation", + "type": "Validation" + }, + { + "name": "values", + "type": "Value", + "isMany": true + } + ] + }, + { + "name": "Validation", + "superClass": ["Element"], + "properties": [ + { + "name": "constraints", + "type": "Constraint", + "isMany": true + } + ] + }, + { + "name": "Constraint", + "superClass": ["Element"], + "properties": [ + { + "name": "name", + "type": "String", + "isAttr": true + }, + { + "name": "config", + "type": "String", + "isAttr": true + } + ] + }, + { + "name": "ConditionalEventDefinition", + "isAbstract": true, + "extends": ["bpmn:ConditionalEventDefinition"], + "properties": [ + { + "name": "variableName", + "isAttr": true, + "type": "String" + }, + { + "name": "variableEvent", + "isAttr": true, + "type": "String" + } + ] + } + ], + "emumerations": [] +} diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/camundaDescriptor.json b/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/camundaDescriptor.json new file mode 100644 index 000000000..8322561e7 --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/camundaDescriptor.json @@ -0,0 +1,1020 @@ +{ + "name": "Camunda", + "uri": "http://camunda.org/schema/1.0/bpmn", + "prefix": "camunda", + "xml": { + "tagAlias": "lowerCase" + }, + "associations": [], + "types": [ + { + "name": "Definitions", + "isAbstract": true, + "extends": ["bpmn:Definitions"], + "properties": [ + { + "name": "diagramRelationId", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "InOutBinding", + "superClass": ["Element"], + "isAbstract": true, + "properties": [ + { + "name": "source", + "isAttr": true, + "type": "String" + }, + { + "name": "sourceExpression", + "isAttr": true, + "type": "String" + }, + { + "name": "target", + "isAttr": true, + "type": "String" + }, + { + "name": "businessKey", + "isAttr": true, + "type": "String" + }, + { + "name": "local", + "isAttr": true, + "type": "Boolean", + "default": false + }, + { + "name": "variables", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "In", + "superClass": ["InOutBinding"], + "meta": { + "allowedIn": ["bpmn:CallActivity", "bpmn:SignalEventDefinition"] + } + }, + { + "name": "Out", + "superClass": ["InOutBinding"], + "meta": { + "allowedIn": ["bpmn:CallActivity"] + } + }, + { + "name": "AsyncCapable", + "isAbstract": true, + "extends": ["bpmn:Activity", "bpmn:Gateway", "bpmn:Event"], + "properties": [ + { + "name": "async", + "isAttr": true, + "type": "Boolean", + "default": false + }, + { + "name": "asyncBefore", + "isAttr": true, + "type": "Boolean", + "default": false + }, + { + "name": "asyncAfter", + "isAttr": true, + "type": "Boolean", + "default": false + }, + { + "name": "exclusive", + "isAttr": true, + "type": "Boolean", + "default": true + } + ] + }, + { + "name": "JobPriorized", + "isAbstract": true, + "extends": ["bpmn:Process", "camunda:AsyncCapable"], + "properties": [ + { + "name": "jobPriority", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "SignalEventDefinition", + "isAbstract": true, + "extends": ["bpmn:SignalEventDefinition"], + "properties": [ + { + "name": "async", + "isAttr": true, + "type": "Boolean", + "default": false + } + ] + }, + { + "name": "ErrorEventDefinition", + "isAbstract": true, + "extends": ["bpmn:ErrorEventDefinition"], + "properties": [ + { + "name": "errorCodeVariable", + "isAttr": true, + "type": "String" + }, + { + "name": "errorMessageVariable", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Error", + "isAbstract": true, + "extends": ["bpmn:Error"], + "properties": [ + { + "name": "camunda:errorMessage", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "PotentialStarter", + "superClass": ["Element"], + "properties": [ + { + "name": "resourceAssignmentExpression", + "type": "bpmn:ResourceAssignmentExpression" + } + ] + }, + { + "name": "FormSupported", + "isAbstract": true, + "extends": ["bpmn:StartEvent", "bpmn:UserTask"], + "properties": [ + { + "name": "formHandlerClass", + "isAttr": true, + "type": "String" + }, + { + "name": "formKey", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "TemplateSupported", + "isAbstract": true, + "extends": ["bpmn:Process", "bpmn:FlowElement"], + "properties": [ + { + "name": "modelerTemplate", + "isAttr": true, + "type": "String" + }, + { + "name": "modelerTemplateVersion", + "isAttr": true, + "type": "Integer" + } + ] + }, + { + "name": "Initiator", + "isAbstract": true, + "extends": ["bpmn:StartEvent"], + "properties": [ + { + "name": "initiator", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "ScriptTask", + "isAbstract": true, + "extends": ["bpmn:ScriptTask"], + "properties": [ + { + "name": "resultVariable", + "isAttr": true, + "type": "String" + }, + { + "name": "resource", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Process", + "isAbstract": true, + "extends": ["bpmn:Process"], + "properties": [ + { + "name": "candidateStarterGroups", + "isAttr": true, + "type": "String" + }, + { + "name": "candidateStarterUsers", + "isAttr": true, + "type": "String" + }, + { + "name": "versionTag", + "isAttr": true, + "type": "String" + }, + { + "name": "historyTimeToLive", + "isAttr": true, + "type": "String" + }, + { + "name": "isStartableInTasklist", + "isAttr": true, + "type": "Boolean", + "default": true + } + ] + }, + { + "name": "EscalationEventDefinition", + "isAbstract": true, + "extends": ["bpmn:EscalationEventDefinition"], + "properties": [ + { + "name": "escalationCodeVariable", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "FormalExpression", + "isAbstract": true, + "extends": ["bpmn:FormalExpression"], + "properties": [ + { + "name": "resource", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Assignable", + "extends": ["bpmn:UserTask"], + "properties": [ + { + "name": "assignee", + "isAttr": true, + "type": "String" + }, + { + "name": "candidateUsers", + "isAttr": true, + "type": "String" + }, + { + "name": "candidateGroups", + "isAttr": true, + "type": "String" + }, + { + "name": "dueDate", + "isAttr": true, + "type": "String" + }, + { + "name": "followUpDate", + "isAttr": true, + "type": "String" + }, + { + "name": "priority", + "isAttr": true, + "type": "String" + }, + { + "name": "candidateStrategy", + "isAttr": true, + "type": "String" + }, + { + "name": "candidateParam", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "CallActivity", + "extends": ["bpmn:CallActivity"], + "properties": [ + { + "name": "calledElementBinding", + "isAttr": true, + "type": "String", + "default": "latest" + }, + { + "name": "calledElementVersion", + "isAttr": true, + "type": "String" + }, + { + "name": "calledElementVersionTag", + "isAttr": true, + "type": "String" + }, + { + "name": "calledElementTenantId", + "isAttr": true, + "type": "String" + }, + { + "name": "caseRef", + "isAttr": true, + "type": "String" + }, + { + "name": "caseBinding", + "isAttr": true, + "type": "String", + "default": "latest" + }, + { + "name": "caseVersion", + "isAttr": true, + "type": "String" + }, + { + "name": "caseTenantId", + "isAttr": true, + "type": "String" + }, + { + "name": "variableMappingClass", + "isAttr": true, + "type": "String" + }, + { + "name": "variableMappingDelegateExpression", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "ServiceTaskLike", + "extends": [ + "bpmn:ServiceTask", + "bpmn:BusinessRuleTask", + "bpmn:SendTask", + "bpmn:MessageEventDefinition" + ], + "properties": [ + { + "name": "expression", + "isAttr": true, + "type": "String" + }, + { + "name": "class", + "isAttr": true, + "type": "String" + }, + { + "name": "delegateExpression", + "isAttr": true, + "type": "String" + }, + { + "name": "resultVariable", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "DmnCapable", + "extends": ["bpmn:BusinessRuleTask"], + "properties": [ + { + "name": "decisionRef", + "isAttr": true, + "type": "String" + }, + { + "name": "decisionRefBinding", + "isAttr": true, + "type": "String", + "default": "latest" + }, + { + "name": "decisionRefVersion", + "isAttr": true, + "type": "String" + }, + { + "name": "mapDecisionResult", + "isAttr": true, + "type": "String", + "default": "resultList" + }, + { + "name": "decisionRefTenantId", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "ExternalCapable", + "extends": ["camunda:ServiceTaskLike"], + "properties": [ + { + "name": "type", + "isAttr": true, + "type": "String" + }, + { + "name": "topic", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "TaskPriorized", + "extends": ["bpmn:Process", "camunda:ExternalCapable"], + "properties": [ + { + "name": "taskPriority", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Properties", + "superClass": ["Element"], + "meta": { + "allowedIn": ["*"] + }, + "properties": [ + { + "name": "values", + "type": "Property", + "isMany": true + } + ] + }, + { + "name": "Property", + "superClass": ["Element"], + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "name", + "type": "String", + "isAttr": true + }, + { + "name": "value", + "type": "String", + "isAttr": true + } + ] + }, + { + "name": "Connector", + "superClass": ["Element"], + "meta": { + "allowedIn": ["camunda:ServiceTaskLike"] + }, + "properties": [ + { + "name": "inputOutput", + "type": "InputOutput" + }, + { + "name": "connectorId", + "type": "String" + } + ] + }, + { + "name": "InputOutput", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:FlowNode", "camunda:Connector"] + }, + "properties": [ + { + "name": "inputOutput", + "type": "InputOutput" + }, + { + "name": "connectorId", + "type": "String" + }, + { + "name": "inputParameters", + "isMany": true, + "type": "InputParameter" + }, + { + "name": "outputParameters", + "isMany": true, + "type": "OutputParameter" + } + ] + }, + { + "name": "InputOutputParameter", + "properties": [ + { + "name": "name", + "isAttr": true, + "type": "String" + }, + { + "name": "value", + "isBody": true, + "type": "String" + }, + { + "name": "definition", + "type": "InputOutputParameterDefinition" + } + ] + }, + { + "name": "InputOutputParameterDefinition", + "isAbstract": true + }, + { + "name": "List", + "superClass": ["InputOutputParameterDefinition"], + "properties": [ + { + "name": "items", + "isMany": true, + "type": "InputOutputParameterDefinition" + } + ] + }, + { + "name": "Map", + "superClass": ["InputOutputParameterDefinition"], + "properties": [ + { + "name": "entries", + "isMany": true, + "type": "Entry" + } + ] + }, + { + "name": "Entry", + "properties": [ + { + "name": "key", + "isAttr": true, + "type": "String" + }, + { + "name": "value", + "isBody": true, + "type": "String" + }, + { + "name": "definition", + "type": "InputOutputParameterDefinition" + } + ] + }, + { + "name": "Value", + "superClass": ["InputOutputParameterDefinition"], + "properties": [ + { + "name": "id", + "isAttr": true, + "type": "String" + }, + { + "name": "name", + "isAttr": true, + "type": "String" + }, + { + "name": "value", + "isBody": true, + "type": "String" + } + ] + }, + { + "name": "Script", + "superClass": ["InputOutputParameterDefinition"], + "properties": [ + { + "name": "scriptFormat", + "isAttr": true, + "type": "String" + }, + { + "name": "resource", + "isAttr": true, + "type": "String" + }, + { + "name": "value", + "isBody": true, + "type": "String" + } + ] + }, + { + "name": "Field", + "superClass": ["Element"], + "meta": { + "allowedIn": [ + "camunda:ServiceTaskLike", + "camunda:ExecutionListener", + "camunda:TaskListener" + ] + }, + "properties": [ + { + "name": "name", + "isAttr": true, + "type": "String" + }, + { + "name": "expression", + "type": "String" + }, + { + "name": "stringValue", + "isAttr": true, + "type": "String" + }, + { + "name": "string", + "type": "String" + } + ] + }, + { + "name": "InputParameter", + "superClass": ["InputOutputParameter"] + }, + { + "name": "OutputParameter", + "superClass": ["InputOutputParameter"] + }, + { + "name": "Collectable", + "isAbstract": true, + "extends": ["bpmn:MultiInstanceLoopCharacteristics"], + "superClass": ["camunda:AsyncCapable"], + "properties": [ + { + "name": "collection", + "isAttr": true, + "type": "String" + }, + { + "name": "elementVariable", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "FailedJobRetryTimeCycle", + "superClass": ["Element"], + "meta": { + "allowedIn": ["camunda:AsyncCapable", "bpmn:MultiInstanceLoopCharacteristics"] + }, + "properties": [ + { + "name": "body", + "isBody": true, + "type": "String" + } + ] + }, + { + "name": "ExecutionListener", + "superClass": ["Element"], + "meta": { + "allowedIn": [ + "bpmn:Task", + "bpmn:ServiceTask", + "bpmn:UserTask", + "bpmn:BusinessRuleTask", + "bpmn:ScriptTask", + "bpmn:ReceiveTask", + "bpmn:ManualTask", + "bpmn:ExclusiveGateway", + "bpmn:SequenceFlow", + "bpmn:ParallelGateway", + "bpmn:InclusiveGateway", + "bpmn:EventBasedGateway", + "bpmn:StartEvent", + "bpmn:IntermediateCatchEvent", + "bpmn:IntermediateThrowEvent", + "bpmn:EndEvent", + "bpmn:BoundaryEvent", + "bpmn:CallActivity", + "bpmn:SubProcess", + "bpmn:Process" + ] + }, + "properties": [ + { + "name": "expression", + "isAttr": true, + "type": "String" + }, + { + "name": "class", + "isAttr": true, + "type": "String" + }, + { + "name": "delegateExpression", + "isAttr": true, + "type": "String" + }, + { + "name": "event", + "isAttr": true, + "type": "String" + }, + { + "name": "script", + "type": "Script" + }, + { + "name": "fields", + "type": "Field", + "isMany": true + } + ] + }, + { + "name": "TaskListener", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:UserTask"] + }, + "properties": [ + { + "name": "expression", + "isAttr": true, + "type": "String" + }, + { + "name": "class", + "isAttr": true, + "type": "String" + }, + { + "name": "delegateExpression", + "isAttr": true, + "type": "String" + }, + { + "name": "event", + "isAttr": true, + "type": "String" + }, + { + "name": "script", + "type": "Script" + }, + { + "name": "fields", + "type": "Field", + "isMany": true + }, + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "eventDefinitions", + "type": "bpmn:TimerEventDefinition", + "isMany": true + } + ] + }, + { + "name": "FormProperty", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:StartEvent", "bpmn:UserTask"] + }, + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "name", + "type": "String", + "isAttr": true + }, + { + "name": "type", + "type": "String", + "isAttr": true + }, + { + "name": "required", + "type": "String", + "isAttr": true + }, + { + "name": "readable", + "type": "String", + "isAttr": true + }, + { + "name": "writable", + "type": "String", + "isAttr": true + }, + { + "name": "variable", + "type": "String", + "isAttr": true + }, + { + "name": "expression", + "type": "String", + "isAttr": true + }, + { + "name": "datePattern", + "type": "String", + "isAttr": true + }, + { + "name": "default", + "type": "String", + "isAttr": true + }, + { + "name": "values", + "type": "Value", + "isMany": true + } + ] + }, + { + "name": "FormData", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:StartEvent", "bpmn:UserTask"] + }, + "properties": [ + { + "name": "fields", + "type": "FormField", + "isMany": true + }, + { + "name": "businessKey", + "type": "String", + "isAttr": true + } + ] + }, + { + "name": "FormField", + "superClass": ["Element"], + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "label", + "type": "String", + "isAttr": true + }, + { + "name": "type", + "type": "String", + "isAttr": true + }, + { + "name": "datePattern", + "type": "String", + "isAttr": true + }, + { + "name": "defaultValue", + "type": "String", + "isAttr": true + }, + { + "name": "properties", + "type": "Properties" + }, + { + "name": "validation", + "type": "Validation" + }, + { + "name": "values", + "type": "Value", + "isMany": true + } + ] + }, + { + "name": "Validation", + "superClass": ["Element"], + "properties": [ + { + "name": "constraints", + "type": "Constraint", + "isMany": true + } + ] + }, + { + "name": "Constraint", + "superClass": ["Element"], + "properties": [ + { + "name": "name", + "type": "String", + "isAttr": true + }, + { + "name": "config", + "type": "String", + "isAttr": true + } + ] + }, + { + "name": "ConditionalEventDefinition", + "isAbstract": true, + "extends": ["bpmn:ConditionalEventDefinition"], + "properties": [ + { + "name": "variableName", + "isAttr": true, + "type": "String" + }, + { + "name": "variableEvents", + "isAttr": true, + "type": "String" + } + ] + } + ], + "emumerations": [] +} diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/flowableDescriptor.json b/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/flowableDescriptor.json new file mode 100644 index 000000000..c98c97236 --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/flowableDescriptor.json @@ -0,0 +1,1493 @@ +{ + "name": "Flowable", + "uri": "http://flowable.org/bpmn", + "prefix": "flowable", + "xml": { + "tagAlias": "lowerCase" + }, + "associations": [], + "types": [ + { + "name": "InOutBinding", + "superClass": ["Element"], + "isAbstract": true, + "properties": [ + { + "name": "source", + "isAttr": true, + "type": "String" + }, + { + "name": "sourceExpression", + "isAttr": true, + "type": "String" + }, + { + "name": "target", + "isAttr": true, + "type": "String" + }, + { + "name": "businessKey", + "isAttr": true, + "type": "String" + }, + { + "name": "local", + "isAttr": true, + "type": "Boolean", + "default": false + }, + { + "name": "variables", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "In", + "superClass": ["InOutBinding"], + "meta": { + "allowedIn": ["bpmn:CallActivity"] + } + }, + { + "name": "Out", + "superClass": ["InOutBinding"], + "meta": { + "allowedIn": ["bpmn:CallActivity"] + } + }, + { + "name": "AsyncCapable", + "isAbstract": true, + "extends": ["bpmn:Activity", "bpmn:Gateway", "bpmn:Event"], + "properties": [ + { + "name": "async", + "isAttr": true, + "type": "Boolean", + "default": false + }, + { + "name": "asyncBefore", + "isAttr": true, + "type": "Boolean", + "default": false + }, + { + "name": "asyncAfter", + "isAttr": true, + "type": "Boolean", + "default": false + }, + { + "name": "exclusive", + "isAttr": true, + "type": "Boolean", + "default": true + } + ] + }, + { + "name": "JobPriorized", + "isAbstract": true, + "extends": ["bpmn:Process", "flowable:AsyncCapable"], + "properties": [ + { + "name": "jobPriority", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "SignalEventDefinition", + "isAbstract": true, + "extends": ["bpmn:SignalEventDefinition"], + "properties": [ + { + "name": "async", + "isAttr": true, + "type": "Boolean", + "default": false + } + ] + }, + { + "name": "ErrorEventDefinition", + "isAbstract": true, + "extends": ["bpmn:ErrorEventDefinition"], + "properties": [ + { + "name": "errorCodeVariable", + "isAttr": true, + "type": "String" + }, + { + "name": "errorMessageVariable", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Error", + "isAbstract": true, + "extends": ["bpmn:Error"], + "properties": [ + { + "name": "flowable:errorMessage", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "PotentialStarter", + "superClass": ["Element"], + "properties": [ + { + "name": "resourceAssignmentExpression", + "type": "bpmn:ResourceAssignmentExpression" + } + ] + }, + { + "name": "FormSupported", + "isAbstract": true, + "extends": ["bpmn:StartEvent", "bpmn:UserTask"], + "properties": [ + { + "name": "formHandlerClass", + "isAttr": true, + "type": "String" + }, + { + "name": "formKey", + "isAttr": true, + "type": "String" + }, + { + "name": "formType", + "isAttr": true, + "type": "String" + }, + { + "name": "formReadOnly", + "isAttr": true, + "type": "Boolean", + "default": false + }, + { + "name": "formInit", + "isAttr": true, + "type": "Boolean", + "default": true + } + ] + }, + { + "name": "TemplateSupported", + "isAbstract": true, + "extends": ["bpmn:Process", "bpmn:FlowElement"], + "properties": [ + { + "name": "modelerTemplate", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Initiator", + "isAbstract": true, + "extends": ["bpmn:StartEvent"], + "properties": [ + { + "name": "initiator", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "ScriptTask", + "isAbstract": true, + "extends": ["bpmn:ScriptTask"], + "properties": [ + { + "name": "resultVariable", + "isAttr": true, + "type": "String" + }, + { + "name": "resource", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Process", + "isAbstract": true, + "extends": ["bpmn:Process"], + "properties": [ + { + "name": "candidateStarterGroups", + "isAttr": true, + "type": "String" + }, + { + "name": "candidateStarterUsers", + "isAttr": true, + "type": "String" + }, + { + "name": "versionTag", + "isAttr": true, + "type": "String" + }, + { + "name": "historyTimeToLive", + "isAttr": true, + "type": "String" + }, + { + "name": "isStartableInTasklist", + "isAttr": true, + "type": "Boolean", + "default": true + } + ] + }, + { + "name": "EscalationEventDefinition", + "isAbstract": true, + "extends": ["bpmn:EscalationEventDefinition"], + "properties": [ + { + "name": "escalationCodeVariable", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "FormalExpression", + "isAbstract": true, + "extends": ["bpmn:FormalExpression"], + "properties": [ + { + "name": "resource", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Assignable", + "extends": ["bpmn:UserTask"], + "properties": [ + { + "name": "assignee", + "isAttr": true, + "type": "String" + }, + { + "name": "candidateUsers", + "isAttr": true, + "type": "String" + }, + { + "name": "candidateGroups", + "isAttr": true, + "type": "String" + }, + { + "name": "dueDate", + "isAttr": true, + "type": "String" + }, + { + "name": "followUpDate", + "isAttr": true, + "type": "String" + }, + { + "name": "priority", + "isAttr": true, + "type": "String" + }, + { + "name": "candidateStrategy", + "isAttr": true, + "type": "String" + }, + { + "name": "candidateParam", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Assignee", + "supperClass": "Element", + "meta": { + "allowedIn": ["*"] + }, + "properties": [ + { + "name": "label", + "type": "String", + "isAttr": true + }, + { + "name": "viewId", + "type": "Number", + "isAttr": true + } + ] + }, + { + "name": "CallActivity", + "extends": ["bpmn:CallActivity"], + "properties": [ + { + "name": "calledElementBinding", + "isAttr": true, + "type": "String", + "default": "latest" + }, + { + "name": "calledElementVersion", + "isAttr": true, + "type": "String" + }, + { + "name": "calledElementVersionTag", + "isAttr": true, + "type": "String" + }, + { + "name": "calledElementTenantId", + "isAttr": true, + "type": "String" + }, + { + "name": "caseRef", + "isAttr": true, + "type": "String" + }, + { + "name": "caseBinding", + "isAttr": true, + "type": "String", + "default": "latest" + }, + { + "name": "caseVersion", + "isAttr": true, + "type": "String" + }, + { + "name": "caseTenantId", + "isAttr": true, + "type": "String" + }, + { + "name": "variableMappingClass", + "isAttr": true, + "type": "String" + }, + { + "name": "variableMappingDelegateExpression", + "isAttr": true, + "type": "String" + }, + { + "name": "calledElementType", + "isAttr": true, + "type": "String" + }, + { + "name": "processInstanceName", + "isAttr": true, + "type": "String" + }, + { + "name": "inheritBusinessKey", + "isAttr": true, + "type": "Boolean" + }, + { + "name": "businessKey", + "isAttr": true, + "type": "String" + }, + { + "name": "inheritVariables", + "isAttr": true, + "type": "Boolean" + } + ] + }, + { + "name": "ServiceTaskLike", + "extends": [ + "bpmn:ServiceTask", + "bpmn:BusinessRuleTask", + "bpmn:SendTask", + "bpmn:MessageEventDefinition" + ], + "properties": [ + { + "name": "expression", + "isAttr": true, + "type": "String" + }, + { + "name": "class", + "isAttr": true, + "type": "String" + }, + { + "name": "delegateExpression", + "isAttr": true, + "type": "String" + }, + { + "name": "resultVariable", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "DmnCapable", + "extends": ["bpmn:BusinessRuleTask"], + "properties": [ + { + "name": "decisionRef", + "isAttr": true, + "type": "String" + }, + { + "name": "decisionRefBinding", + "isAttr": true, + "type": "String", + "default": "latest" + }, + { + "name": "decisionRefVersion", + "isAttr": true, + "type": "String" + }, + { + "name": "mapDecisionResult", + "isAttr": true, + "type": "String", + "default": "resultList" + }, + { + "name": "decisionRefTenantId", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "ExternalCapable", + "extends": ["flowable:ServiceTaskLike"], + "properties": [ + { + "name": "type", + "isAttr": true, + "type": "String" + }, + { + "name": "topic", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "TaskPriorized", + "extends": ["bpmn:Process", "flowable:ExternalCapable"], + "properties": [ + { + "name": "taskPriority", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Properties", + "superClass": ["Element"], + "meta": { + "allowedIn": ["*"] + }, + "properties": [ + { + "name": "values", + "type": "Property", + "isMany": true + } + ] + }, + { + "name": "Property", + "superClass": ["Element"], + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "name", + "type": "String", + "isAttr": true + }, + { + "name": "value", + "type": "String", + "isAttr": true + } + ] + }, + { + "name": "Button", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:UserTask"] + }, + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "name", + "type": "String", + "isAttr": true + }, + { + "name": "code", + "type": "String", + "isAttr": true + }, + { + "name": "isHide", + "type": "String", + "isAttr": true + }, + { + "name": "next", + "type": "String", + "isAttr": true + }, + { + "name": "sort", + "type": "Integer", + "isAttr": true + } + ] + }, + { + "name": "Assignee", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:UserTask"] + }, + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "type", + "type": "String", + "isAttr": true + }, + { + "name": "value", + "type": "String", + "isAttr": true + }, + { + "name": "condition", + "type": "String", + "isAttr": true + }, + { + "name": "operationType", + "type": "String", + "isAttr": true + }, + { + "name": "sort", + "type": "Integer", + "isAttr": true + } + ] + }, + { + "name": "Connector", + "superClass": ["Element"], + "meta": { + "allowedIn": ["flowable:ServiceTaskLike"] + }, + "properties": [ + { + "name": "inputOutput", + "type": "InputOutput" + }, + { + "name": "connectorId", + "type": "String" + } + ] + }, + { + "name": "InputOutput", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:FlowNode", "flowable:Connector"] + }, + "properties": [ + { + "name": "inputOutput", + "type": "InputOutput" + }, + { + "name": "connectorId", + "type": "String" + }, + { + "name": "inputParameters", + "isMany": true, + "type": "InputParameter" + }, + { + "name": "outputParameters", + "isMany": true, + "type": "OutputParameter" + } + ] + }, + { + "name": "InputOutputParameter", + "properties": [ + { + "name": "name", + "isAttr": true, + "type": "String" + }, + { + "name": "value", + "isBody": true, + "type": "String" + }, + { + "name": "definition", + "type": "InputOutputParameterDefinition" + } + ] + }, + { + "name": "InputOutputParameterDefinition", + "isAbstract": true + }, + { + "name": "List", + "superClass": ["InputOutputParameterDefinition"], + "properties": [ + { + "name": "items", + "isMany": true, + "type": "InputOutputParameterDefinition" + } + ] + }, + { + "name": "Map", + "superClass": ["InputOutputParameterDefinition"], + "properties": [ + { + "name": "entries", + "isMany": true, + "type": "Entry" + } + ] + }, + { + "name": "Entry", + "properties": [ + { + "name": "key", + "isAttr": true, + "type": "String" + }, + { + "name": "value", + "isBody": true, + "type": "String" + }, + { + "name": "definition", + "type": "InputOutputParameterDefinition" + } + ] + }, + { + "name": "Value", + "superClass": ["InputOutputParameterDefinition"], + "properties": [ + { + "name": "id", + "isAttr": true, + "type": "String" + }, + { + "name": "name", + "isAttr": true, + "type": "String" + }, + { + "name": "value", + "isBody": true, + "type": "String" + } + ] + }, + { + "name": "Script", + "superClass": ["InputOutputParameterDefinition"], + "properties": [ + { + "name": "scriptFormat", + "isAttr": true, + "type": "String" + }, + { + "name": "resource", + "isAttr": true, + "type": "String" + }, + { + "name": "value", + "isBody": true, + "type": "String" + } + ] + }, + { + "name": "Field", + "superClass": ["Element"], + "meta": { + "allowedIn": [ + "flowable:ServiceTaskLike", + "flowable:ExecutionListener", + "flowable:TaskListener" + ] + }, + "properties": [ + { + "name": "name", + "isAttr": true, + "type": "String" + }, + { + "name": "expression", + "type": "String" + }, + { + "name": "stringValue", + "isAttr": true, + "type": "String" + }, + { + "name": "string", + "type": "String" + } + ] + }, + { + "name": "ChildField", + "superClass": ["Element"], + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "name", + "type": "String", + "isAttr": true + }, + { + "name": "type", + "type": "String", + "isAttr": true + }, + { + "name": "required", + "type": "String", + "isAttr": true + }, + { + "name": "readable", + "type": "String", + "isAttr": true + }, + { + "name": "writable", + "type": "String", + "isAttr": true + }, + { + "name": "variable", + "type": "String", + "isAttr": true + }, + { + "name": "expression", + "type": "String", + "isAttr": true + }, + { + "name": "datePattern", + "type": "String", + "isAttr": true + }, + { + "name": "default", + "type": "String", + "isAttr": true + }, + { + "name": "values", + "type": "Value", + "isMany": true + } + ] + }, + { + "name": "InputParameter", + "superClass": ["InputOutputParameter"] + }, + { + "name": "OutputParameter", + "superClass": ["InputOutputParameter"] + }, + { + "name": "Collectable", + "isAbstract": true, + "extends": ["bpmn:MultiInstanceLoopCharacteristics"], + "superClass": ["flowable:AsyncCapable"], + "properties": [ + { + "name": "collection", + "isAttr": true, + "type": "String" + }, + { + "name": "elementVariable", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "FailedJobRetryTimeCycle", + "superClass": ["Element"], + "meta": { + "allowedIn": ["flowable:AsyncCapable", "bpmn:MultiInstanceLoopCharacteristics"] + }, + "properties": [ + { + "name": "body", + "isBody": true, + "type": "String" + } + ] + }, + { + "name": "ExecutionListener", + "superClass": ["Element"], + "meta": { + "allowedIn": [ + "bpmn:Task", + "bpmn:ServiceTask", + "bpmn:UserTask", + "bpmn:BusinessRuleTask", + "bpmn:ScriptTask", + "bpmn:ReceiveTask", + "bpmn:ManualTask", + "bpmn:ExclusiveGateway", + "bpmn:SequenceFlow", + "bpmn:ParallelGateway", + "bpmn:InclusiveGateway", + "bpmn:EventBasedGateway", + "bpmn:StartEvent", + "bpmn:IntermediateCatchEvent", + "bpmn:IntermediateThrowEvent", + "bpmn:EndEvent", + "bpmn:BoundaryEvent", + "bpmn:CallActivity", + "bpmn:SubProcess", + "bpmn:Process" + ] + }, + "properties": [ + { + "name": "expression", + "isAttr": true, + "type": "String" + }, + { + "name": "class", + "isAttr": true, + "type": "String" + }, + { + "name": "delegateExpression", + "isAttr": true, + "type": "String" + }, + { + "name": "event", + "isAttr": true, + "type": "String" + }, + { + "name": "script", + "type": "Script" + }, + { + "name": "fields", + "type": "Field", + "isMany": true + } + ] + }, + { + "name": "TaskListener", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:UserTask"] + }, + "properties": [ + { + "name": "expression", + "isAttr": true, + "type": "String" + }, + { + "name": "class", + "isAttr": true, + "type": "String" + }, + { + "name": "delegateExpression", + "isAttr": true, + "type": "String" + }, + { + "name": "event", + "isAttr": true, + "type": "String" + }, + { + "name": "script", + "type": "Script" + }, + { + "name": "fields", + "type": "Field", + "isMany": true + }, + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "eventDefinitions", + "type": "bpmn:TimerEventDefinition", + "isMany": true + } + ] + }, + { + "name": "FormProperty", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:StartEvent", "bpmn:UserTask"] + }, + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "name", + "type": "String", + "isAttr": true + }, + { + "name": "type", + "type": "String", + "isAttr": true + }, + { + "name": "required", + "type": "String", + "isAttr": true + }, + { + "name": "readable", + "type": "String", + "isAttr": true + }, + { + "name": "writable", + "type": "String", + "isAttr": true + }, + { + "name": "variable", + "type": "String", + "isAttr": true + }, + { + "name": "expression", + "type": "String", + "isAttr": true + }, + { + "name": "datePattern", + "type": "String", + "isAttr": true + }, + { + "name": "default", + "type": "String", + "isAttr": true + }, + { + "name": "values", + "type": "Value", + "isMany": true + }, + { + "name": "children", + "type": "ChildField", + "isMany": true + }, + { + "name": "extensionElements", + "type": "bpmn:ExtensionElements", + "isMany": true + } + ] + }, + { + "name": "FormData", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:StartEvent", "bpmn:UserTask"] + }, + "properties": [ + { + "name": "fields", + "type": "FormField", + "isMany": true + }, + { + "name": "businessKey", + "type": "String", + "isAttr": true + } + ] + }, + { + "name": "FormField", + "superClass": ["Element"], + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "label", + "type": "String", + "isAttr": true + }, + { + "name": "type", + "type": "String", + "isAttr": true + }, + { + "name": "datePattern", + "type": "String", + "isAttr": true + }, + { + "name": "defaultValue", + "type": "String", + "isAttr": true + }, + { + "name": "properties", + "type": "Properties" + }, + { + "name": "validation", + "type": "Validation" + }, + { + "name": "values", + "type": "Value", + "isMany": true + } + ] + }, + { + "name": "Validation", + "superClass": ["Element"], + "properties": [ + { + "name": "constraints", + "type": "Constraint", + "isMany": true + } + ] + }, + { + "name": "Constraint", + "superClass": ["Element"], + "properties": [ + { + "name": "name", + "type": "String", + "isAttr": true + }, + { + "name": "config", + "type": "String", + "isAttr": true + } + ] + }, + { + "name": "ConditionalEventDefinition", + "isAbstract": true, + "extends": ["bpmn:ConditionalEventDefinition"], + "properties": [ + { + "name": "variableName", + "isAttr": true, + "type": "String" + }, + { + "name": "variableEvent", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Condition", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:SequenceFlow"] + }, + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "field", + "type": "String", + "isAttr": true + }, + { + "name": "compare", + "type": "String", + "isAttr": true + }, + { + "name": "value", + "type": "String", + "isAttr": true + }, + { + "name": "logic", + "type": "String", + "isAttr": true + }, + { + "name": "sort", + "type": "Integer", + "isAttr": true + } + ] + }, + { + "name": "AssignStartUserHandlerType", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:StartEvent", "bpmn:UserTask"] + }, + "properties": [ + { + "name": "value", + "type": "Integer", + "isBody": true + } + ] + }, + { + "name": "RejectHandlerType", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:UserTask"] + }, + "properties": [ + { + "name": "value", + "type": "Integer", + "isBody": true + } + ] + }, + { + "name": "RejectReturnTaskId", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:UserTask"] + }, + "properties": [ + { + "name": "value", + "type": "String", + "isBody": true + } + ] + }, + { + "name": "AssignEmptyHandlerType", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:UserTask"] + }, + "properties": [ + { + "name": "value", + "type": "Integer", + "isBody": true + } + ] + }, + { + "name": "AssignEmptyUserIds", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:UserTask"] + }, + "properties": [ + { + "name": "value", + "type": "String", + "isBody": true + } + ] + }, + { + "name": "ButtonsSetting", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:UserTask"] + }, + "properties": [ + { + "name": "flowable:id", + "type": "Integer", + "isAttr": true + }, + { + "name": "flowable:enable", + "type": "Boolean", + "isAttr": true + }, + { + "name": "flowable:displayName", + "type": "String", + "isAttr": true + } + ] + }, + { + "name": "FieldsPermission", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:UserTask"] + }, + "properties": [ + { + "name": "flowable:field", + "type": "String", + "isAttr": true + }, + { + "name": "flowable:title", + "type": "String", + "isAttr": true + }, + { + "name": "flowable:permission", + "type": "String", + "isAttr": true + } + ] + }, + { + "name": "BoundaryEventType", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:BoundaryEvent"] + }, + "properties": [ + { + "name": "value", + "type": "Integer", + "isBody": true + } + ] + }, + { + "name": "TimeoutHandlerType", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:BoundaryEvent"] + }, + "properties": [ + { + "name": "value", + "type": "Integer", + "isBody": true + } + ] + }, + { + "name": "ApproveType", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:UserTask"] + }, + "properties": [ + { + "name": "value", + "type": "Integer", + "isBody": true + } + ] + }, + { + "name": "ApproveMethod", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:UserTask"] + }, + "properties": [ + { + "name": "value", + "type": "Integer", + "isBody": true + } + ] + }, + { + "name": "CandidateStrategy", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:UserTask"] + }, + "properties": [ + { + "name": "value", + "type": "Integer", + "isBody": true + } + ] + }, + { + "name": "CandidateParam", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:UserTask"] + }, + "properties": [ + { + "name": "value", + "type": "String", + "isBody": true + } + ] + }, + { + "name": "SignEnable", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:UserTask"] + }, + "properties": [ + { + "name": "value", + "type": "Boolean", + "isBody": true + } + ] + }, + { + "name": "SkipExpression", + "extends": ["bpmn:UserTask"], + "properties": [ + { + "name": "skipExpression", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "ReasonRequire", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:UserTask"] + }, + "properties": [ + { + "name": "value", + "type": "Boolean", + "isBody": true + } + ] + } + ], + "emumerations": [] +} diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/activiti/activitiExtension.js b/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/activiti/activitiExtension.js new file mode 100644 index 000000000..1f04da8f9 --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/activiti/activitiExtension.js @@ -0,0 +1,101 @@ +'use strict'; + +import { some } from 'min-dash'; + +// const some = require('min-dash').some +// const some = some + +const ALLOWED_TYPES = { + FailedJobRetryTimeCycle: [ + 'bpmn:StartEvent', + 'bpmn:BoundaryEvent', + 'bpmn:IntermediateCatchEvent', + 'bpmn:Activity', + ], + Connector: ['bpmn:EndEvent', 'bpmn:IntermediateThrowEvent'], + Field: ['bpmn:EndEvent', 'bpmn:IntermediateThrowEvent'], +}; + +function is(element, type) { + return ( + element && + typeof element.$instanceOf === 'function' && + element.$instanceOf(type) + ); +} + +function exists(element) { + return element && element.length; +} + +function includesType(collection, type) { + return ( + exists(collection) && + some(collection, (element) => { + return is(element, type); + }) + ); +} + +function anyType(element, types) { + return some(types, (type) => { + return is(element, type); + }); +} + +function isAllowed(propName, propDescriptor, newElement) { + const name = propDescriptor.name; + const types = ALLOWED_TYPES[name.replace(/activiti:/, '')]; + + return name === propName && anyType(newElement, types); +} + +function ActivitiModdleExtension(eventBus) { + eventBus.on( + 'property.clone', + function (context) { + const newElement = context.newElement; + const propDescriptor = context.propertyDescriptor; + + this.canCloneProperty(newElement, propDescriptor); + }, + this, + ); +} + +ActivitiModdleExtension.$inject = ['eventBus']; + +ActivitiModdleExtension.prototype.canCloneProperty = function ( + newElement, + propDescriptor, +) { + if ( + isAllowed('activiti:FailedJobRetryTimeCycle', propDescriptor, newElement) + ) { + return ( + includesType(newElement.eventDefinitions, 'bpmn:TimerEventDefinition') || + includesType(newElement.eventDefinitions, 'bpmn:SignalEventDefinition') || + is( + newElement.loopCharacteristics, + 'bpmn:MultiInstanceLoopCharacteristics', + ) + ); + } + + if (isAllowed('activiti:Connector', propDescriptor, newElement)) { + return includesType( + newElement.eventDefinitions, + 'bpmn:MessageEventDefinition', + ); + } + + if (isAllowed('activiti:Field', propDescriptor, newElement)) { + return includesType( + newElement.eventDefinitions, + 'bpmn:MessageEventDefinition', + ); + } +}; + +// module.exports = ActivitiModdleExtension; +export default ActivitiModdleExtension; diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/activiti/index.js b/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/activiti/index.js new file mode 100644 index 000000000..7c38ff4e5 --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/activiti/index.js @@ -0,0 +1,11 @@ +/* + * @author igdianov + * address https://github.com/igdianov/activiti-bpmn-moddle + * */ + +import activitiExtension from './activitiExtension'; + +export default { + __init__: ['ActivitiModdleExtension'], + ActivitiModdleExtension: ['type', activitiExtension], +}; diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/camunda/extension.js b/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/camunda/extension.js new file mode 100644 index 000000000..0b09c782c --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/camunda/extension.js @@ -0,0 +1,165 @@ +'use strict'; + +import { isFunction, isObject, some } from 'min-dash'; + +// const isFunction = isFunction, +// isObject = isObject, +// some = some +// const isFunction = require('min-dash').isFunction, +// isObject = require('min-dash').isObject, +// some = require('min-dash').some + +const WILDCARD = '*'; + +function CamundaModdleExtension(eventBus) { + // eslint-disable-next-line @typescript-eslint/no-this-alias + const self = this; + + eventBus.on('moddleCopy.canCopyProperty', (context) => { + const parent = context.parent; + const property = context.property; + + return self.canCopyProperty(property, parent); + }); +} + +CamundaModdleExtension.$inject = ['eventBus']; + +/** + * Check wether to disallow copying property. + */ +CamundaModdleExtension.prototype.canCopyProperty = function (property, parent) { + // (1) check wether property is allowed in parent + if (isObject(property) && !isAllowedInParent(property, parent)) { + return false; + } + + // (2) check more complex scenarios + + if (is(property, 'camunda:InputOutput') && !this.canHostInputOutput(parent)) { + return false; + } + + if ( + isAny(property, ['camunda:Connector', 'camunda:Field']) && + !this.canHostConnector(parent) + ) { + return false; + } + + if (is(property, 'camunda:In') && !this.canHostIn(parent)) { + return false; + } +}; + +CamundaModdleExtension.prototype.canHostInputOutput = function (parent) { + // allowed in camunda:Connector + const connector = getParent(parent, 'camunda:Connector'); + + if (connector) { + return true; + } + + // special rules inside bpmn:FlowNode + const flowNode = getParent(parent, 'bpmn:FlowNode'); + + if (!flowNode) { + return false; + } + + if ( + isAny(flowNode, ['bpmn:StartEvent', 'bpmn:Gateway', 'bpmn:BoundaryEvent']) + ) { + return false; + } + + return !(is(flowNode, 'bpmn:SubProcess') && flowNode.get('triggeredByEvent')); +}; + +CamundaModdleExtension.prototype.canHostConnector = function (parent) { + const serviceTaskLike = getParent(parent, 'camunda:ServiceTaskLike'); + + if (is(serviceTaskLike, 'bpmn:MessageEventDefinition')) { + // only allow on throw and end events + return ( + getParent(parent, 'bpmn:IntermediateThrowEvent') || + getParent(parent, 'bpmn:EndEvent') + ); + } + + return true; +}; + +CamundaModdleExtension.prototype.canHostIn = function (parent) { + const callActivity = getParent(parent, 'bpmn:CallActivity'); + + if (callActivity) { + return true; + } + + const signalEventDefinition = getParent(parent, 'bpmn:SignalEventDefinition'); + + if (signalEventDefinition) { + // only allow on throw and end events + return ( + getParent(parent, 'bpmn:IntermediateThrowEvent') || + getParent(parent, 'bpmn:EndEvent') + ); + } + + return true; +}; + +// module.exports = CamundaModdleExtension; +export default CamundaModdleExtension; + +// helpers ////////// + +function is(element, type) { + return ( + element && isFunction(element.$instanceOf) && element.$instanceOf(type) + ); +} + +function isAny(element, types) { + return some(types, (t) => { + return is(element, t); + }); +} + +function getParent(element, type) { + if (!type) { + return element.$parent; + } + + if (is(element, type)) { + return element; + } + + if (!element.$parent) { + return; + } + + return getParent(element.$parent, type); +} + +function isAllowedInParent(property, parent) { + // (1) find property descriptor + const descriptor = + property.$type && property.$model.getTypeDescriptor(property.$type); + + const allowedIn = descriptor && descriptor.meta && descriptor.meta.allowedIn; + + if (!allowedIn || isWildcard(allowedIn)) { + return true; + } + + // (2) check wether property has parent of allowed type + return some(allowedIn, (type) => { + return getParent(parent, type); + }); +} + +function isWildcard(allowedIn) { + return allowedIn.includes(WILDCARD); +} diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/camunda/index.js b/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/camunda/index.js new file mode 100644 index 000000000..43780cec0 --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/camunda/index.js @@ -0,0 +1,8 @@ +'use strict'; + +import extension from './extension'; + +export default { + __init__: ['camundaModdleExtension'], + camundaModdleExtension: ['type', extension], +}; diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/flowable/flowableExtension.js b/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/flowable/flowableExtension.js new file mode 100644 index 000000000..a891727c7 --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/flowable/flowableExtension.js @@ -0,0 +1,101 @@ +'use strict'; + +import { some } from 'min-dash'; + +// const some = some +// const some = require('min-dash').some + +const ALLOWED_TYPES = { + FailedJobRetryTimeCycle: [ + 'bpmn:StartEvent', + 'bpmn:BoundaryEvent', + 'bpmn:IntermediateCatchEvent', + 'bpmn:Activity', + ], + Connector: ['bpmn:EndEvent', 'bpmn:IntermediateThrowEvent'], + Field: ['bpmn:EndEvent', 'bpmn:IntermediateThrowEvent'], +}; + +function is(element, type) { + return ( + element && + typeof element.$instanceOf === 'function' && + element.$instanceOf(type) + ); +} + +function exists(element) { + return element && element.length; +} + +function includesType(collection, type) { + return ( + exists(collection) && + some(collection, (element) => { + return is(element, type); + }) + ); +} + +function anyType(element, types) { + return some(types, (type) => { + return is(element, type); + }); +} + +function isAllowed(propName, propDescriptor, newElement) { + const name = propDescriptor.name; + const types = ALLOWED_TYPES[name.replace(/flowable:/, '')]; + + return name === propName && anyType(newElement, types); +} + +function FlowableModdleExtension(eventBus) { + eventBus.on( + 'property.clone', + function (context) { + const newElement = context.newElement; + const propDescriptor = context.propertyDescriptor; + + this.canCloneProperty(newElement, propDescriptor); + }, + this, + ); +} + +FlowableModdleExtension.$inject = ['eventBus']; + +FlowableModdleExtension.prototype.canCloneProperty = function ( + newElement, + propDescriptor, +) { + if ( + isAllowed('flowable:FailedJobRetryTimeCycle', propDescriptor, newElement) + ) { + return ( + includesType(newElement.eventDefinitions, 'bpmn:TimerEventDefinition') || + includesType(newElement.eventDefinitions, 'bpmn:SignalEventDefinition') || + is( + newElement.loopCharacteristics, + 'bpmn:MultiInstanceLoopCharacteristics', + ) + ); + } + + if (isAllowed('flowable:Connector', propDescriptor, newElement)) { + return includesType( + newElement.eventDefinitions, + 'bpmn:MessageEventDefinition', + ); + } + + if (isAllowed('flowable:Field', propDescriptor, newElement)) { + return includesType( + newElement.eventDefinitions, + 'bpmn:MessageEventDefinition', + ); + } +}; + +// module.exports = FlowableModdleExtension; +export default FlowableModdleExtension; diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/flowable/index.js b/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/flowable/index.js new file mode 100644 index 000000000..86474675b --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/flowable/index.js @@ -0,0 +1,10 @@ +/* + * @author igdianov + * address https://github.com/igdianov/activiti-bpmn-moddle + * */ +import flowableExtension from './flowableExtension'; + +export default { + __init__: ['FlowableModdleExtension'], + FlowableModdleExtension: ['type', flowableExtension], +}; diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/palette/CustomPalette.js b/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/palette/CustomPalette.js new file mode 100644 index 000000000..0299c5acb --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/palette/CustomPalette.js @@ -0,0 +1,233 @@ +import PaletteProvider from 'bpmn-js/lib/features/palette/PaletteProvider'; +import { assign } from 'min-dash'; + +export default function CustomPalette( + palette, + create, + elementFactory, + spaceTool, + lassoTool, + handTool, + globalConnect, + translate, +) { + PaletteProvider.call( + this, + palette, + create, + elementFactory, + spaceTool, + lassoTool, + handTool, + globalConnect, + translate, + 2000, + ); +} + +const F = function () {}; // 核心,利用空对象作为中介; +F.prototype = PaletteProvider.prototype; // 核心,将父类的原型赋值给空对象F; + +// 利用中介函数重写原型链方法 +F.prototype.getPaletteEntries = function () { + const actions = {}; + const create = this._create; + const elementFactory = this._elementFactory; + const spaceTool = this._spaceTool; + const lassoTool = this._lassoTool; + const handTool = this._handTool; + const globalConnect = this._globalConnect; + const translate = this._translate; + + function createAction(type, group, className, title, options) { + function createListener(event) { + const shape = elementFactory.createShape(assign({ type }, options)); + + if (options) { + shape.businessObject.di.isExpanded = options.isExpanded; + } + + create.start(event, shape); + } + + const shortType = type.replace(/^bpmn:/, ''); + + return { + group, + className, + title: title || translate('Create {type}', { type: shortType }), + action: { + dragstart: createListener, + click: createListener, + }, + }; + } + + function createSubprocess(event) { + const subProcess = elementFactory.createShape({ + type: 'bpmn:SubProcess', + x: 0, + y: 0, + isExpanded: true, + }); + + const startEvent = elementFactory.createShape({ + type: 'bpmn:StartEvent', + x: 40, + y: 82, + parent: subProcess, + }); + + create.start(event, [subProcess, startEvent], { + hints: { + autoSelect: [startEvent], + }, + }); + } + + function createParticipant(event) { + create.start(event, elementFactory.createParticipantShape()); + } + + assign(actions, { + 'hand-tool': { + group: 'tools', + className: 'bpmn-icon-hand-tool', + title: '激活抓手工具', + // title: translate("Activate the hand tool"), + action: { + click(event) { + handTool.activateHand(event); + }, + }, + }, + 'lasso-tool': { + group: 'tools', + className: 'bpmn-icon-lasso-tool', + title: translate('Activate the lasso tool'), + action: { + click(event) { + lassoTool.activateSelection(event); + }, + }, + }, + 'space-tool': { + group: 'tools', + className: 'bpmn-icon-space-tool', + title: translate('Activate the create/remove space tool'), + action: { + click(event) { + spaceTool.activateSelection(event); + }, + }, + }, + 'global-connect-tool': { + group: 'tools', + className: 'bpmn-icon-connection-multi', + title: translate('Activate the global connect tool'), + action: { + click(event) { + globalConnect.toggle(event); + }, + }, + }, + 'tool-separator': { + group: 'tools', + separator: true, + }, + 'create.start-event': createAction( + 'bpmn:StartEvent', + 'event', + 'bpmn-icon-start-event-none', + translate('Create StartEvent'), + ), + 'create.intermediate-event': createAction( + 'bpmn:IntermediateThrowEvent', + 'event', + 'bpmn-icon-intermediate-event-none', + translate('Create Intermediate/Boundary Event'), + ), + 'create.end-event': createAction( + 'bpmn:EndEvent', + 'event', + 'bpmn-icon-end-event-none', + translate('Create EndEvent'), + ), + 'create.exclusive-gateway': createAction( + 'bpmn:ExclusiveGateway', + 'gateway', + 'bpmn-icon-gateway-none', + translate('Create Gateway'), + ), + 'create.user-task': createAction( + 'bpmn:UserTask', + 'activity', + 'bpmn-icon-user-task', + translate('Create User Task'), + ), + 'create.call-activity': createAction( + 'bpmn:CallActivity', + 'activity', + 'bpmn-icon-call-activity', + translate('Create Call Activity'), + ), + 'create.service-task': createAction( + 'bpmn:ServiceTask', + 'activity', + 'bpmn-icon-service', + translate('Create Service Task'), + ), + 'create.data-object': createAction( + 'bpmn:DataObjectReference', + 'data-object', + 'bpmn-icon-data-object', + translate('Create DataObjectReference'), + ), + 'create.data-store': createAction( + 'bpmn:DataStoreReference', + 'data-store', + 'bpmn-icon-data-store', + translate('Create DataStoreReference'), + ), + 'create.subprocess-expanded': { + group: 'activity', + className: 'bpmn-icon-subprocess-expanded', + title: translate('Create expanded SubProcess'), + action: { + dragstart: createSubprocess, + click: createSubprocess, + }, + }, + 'create.participant-expanded': { + group: 'collaboration', + className: 'bpmn-icon-participant', + title: translate('Create Pool/Participant'), + action: { + dragstart: createParticipant, + click: createParticipant, + }, + }, + 'create.group': createAction( + 'bpmn:Group', + 'artifact', + 'bpmn-icon-group', + translate('Create Group'), + ), + }); + + return actions; +}; + +CustomPalette.$inject = [ + 'palette', + 'create', + 'elementFactory', + 'spaceTool', + 'lassoTool', + 'handTool', + 'globalConnect', + 'translate', +]; + +CustomPalette.prototype = new F(); // 核心,将 F的实例赋值给子类; +CustomPalette.prototype.constructor = CustomPalette; // 修复子类CustomPalette的构造器指向,防止原型链的混乱; diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/palette/index.js b/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/palette/index.js new file mode 100644 index 000000000..afe1367c8 --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/palette/index.js @@ -0,0 +1,22 @@ +// import PaletteModule from "diagram-js/lib/features/palette"; +// import CreateModule from "diagram-js/lib/features/create"; +// import SpaceToolModule from "diagram-js/lib/features/space-tool"; +// import LassoToolModule from "diagram-js/lib/features/lasso-tool"; +// import HandToolModule from "diagram-js/lib/features/hand-tool"; +// import GlobalConnectModule from "diagram-js/lib/features/global-connect"; +// import translate from "diagram-js/lib/i18n/translate"; +// +// import PaletteProvider from "./paletteProvider"; +// +// export default { +// __depends__: [PaletteModule, CreateModule, SpaceToolModule, LassoToolModule, HandToolModule, GlobalConnectModule, translate], +// __init__: ["paletteProvider"], +// paletteProvider: ["type", PaletteProvider] +// }; + +import CustomPalette from './CustomPalette'; + +export default { + __init__: ['paletteProvider'], + paletteProvider: ['type', CustomPalette], +}; diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/palette/paletteProvider.js b/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/palette/paletteProvider.js new file mode 100644 index 000000000..8a022542b --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/palette/paletteProvider.js @@ -0,0 +1,219 @@ +import { assign } from 'min-dash'; + +/** + * A palette provider for BPMN 2.0 elements. + */ +export default function PaletteProvider( + palette, + create, + elementFactory, + spaceTool, + lassoTool, + handTool, + globalConnect, + translate, +) { + this._palette = palette; + this._create = create; + this._elementFactory = elementFactory; + this._spaceTool = spaceTool; + this._lassoTool = lassoTool; + this._handTool = handTool; + this._globalConnect = globalConnect; + this._translate = translate; + + palette.registerProvider(this); +} + +PaletteProvider.$inject = [ + 'palette', + 'create', + 'elementFactory', + 'spaceTool', + 'lassoTool', + 'handTool', + 'globalConnect', + 'translate', +]; + +PaletteProvider.prototype.getPaletteEntries = function () { + const actions = {}; + const create = this._create; + const elementFactory = this._elementFactory; + const spaceTool = this._spaceTool; + const lassoTool = this._lassoTool; + const handTool = this._handTool; + const globalConnect = this._globalConnect; + const translate = this._translate; + + function createAction(type, group, className, title, options) { + function createListener(event) { + const shape = elementFactory.createShape(assign({ type }, options)); + + if (options) { + shape.businessObject.di.isExpanded = options.isExpanded; + } + + create.start(event, shape); + } + + const shortType = type.replace(/^bpmn:/, ''); + + return { + group, + className, + title: title || translate('Create {type}', { type: shortType }), + action: { + dragstart: createListener, + click: createListener, + }, + }; + } + + function createSubprocess(event) { + const subProcess = elementFactory.createShape({ + type: 'bpmn:SubProcess', + x: 0, + y: 0, + isExpanded: true, + }); + + const startEvent = elementFactory.createShape({ + type: 'bpmn:StartEvent', + x: 40, + y: 82, + parent: subProcess, + }); + + create.start(event, [subProcess, startEvent], { + hints: { + autoSelect: [startEvent], + }, + }); + } + + function createParticipant(event) { + create.start(event, elementFactory.createParticipantShape()); + } + + assign(actions, { + 'hand-tool': { + group: 'tools', + className: 'bpmn-icon-hand-tool', + title: translate('Activate the hand tool'), + action: { + click(event) { + handTool.activateHand(event); + }, + }, + }, + 'lasso-tool': { + group: 'tools', + className: 'bpmn-icon-lasso-tool', + title: translate('Activate the lasso tool'), + action: { + click(event) { + lassoTool.activateSelection(event); + }, + }, + }, + 'space-tool': { + group: 'tools', + className: 'bpmn-icon-space-tool', + title: translate('Activate the create/remove space tool'), + action: { + click(event) { + spaceTool.activateSelection(event); + }, + }, + }, + 'global-connect-tool': { + group: 'tools', + className: 'bpmn-icon-connection-multi', + title: translate('Activate the global connect tool'), + action: { + click(event) { + globalConnect.toggle(event); + }, + }, + }, + 'tool-separator': { + group: 'tools', + separator: true, + }, + 'create.start-event': createAction( + 'bpmn:StartEvent', + 'event', + 'bpmn-icon-start-event-none', + translate('Create StartEvent'), + ), + 'create.intermediate-event': createAction( + 'bpmn:IntermediateThrowEvent', + 'event', + 'bpmn-icon-intermediate-event-none', + translate('Create Intermediate/Boundary Event'), + ), + 'create.end-event': createAction( + 'bpmn:EndEvent', + 'event', + 'bpmn-icon-end-event-none', + translate('Create EndEvent'), + ), + 'create.exclusive-gateway': createAction( + 'bpmn:ExclusiveGateway', + 'gateway', + 'bpmn-icon-gateway-none', + translate('Create Gateway'), + ), + 'create.user-task': createAction( + 'bpmn:UserTask', + 'activity', + 'bpmn-icon-user-task', + translate('Create User Task'), + ), + 'create.service-task': createAction( + 'bpmn:ServiceTask', + 'activity', + 'bpmn-icon-service', + translate('Create Service Task'), + ), + 'create.data-object': createAction( + 'bpmn:DataObjectReference', + 'data-object', + 'bpmn-icon-data-object', + translate('Create DataObjectReference'), + ), + 'create.data-store': createAction( + 'bpmn:DataStoreReference', + 'data-store', + 'bpmn-icon-data-store', + translate('Create DataStoreReference'), + ), + 'create.subprocess-expanded': { + group: 'activity', + className: 'bpmn-icon-subprocess-expanded', + title: translate('Create expanded SubProcess'), + action: { + dragstart: createSubprocess, + click: createSubprocess, + }, + }, + 'create.participant-expanded': { + group: 'collaboration', + className: 'bpmn-icon-participant', + title: translate('Create Pool/Participant'), + action: { + dragstart: createParticipant, + click: createParticipant, + }, + }, + 'create.group': createAction( + 'bpmn:Group', + 'artifact', + 'bpmn-icon-group', + translate('Create Group'), + ), + }); + + return actions; +}; diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/translate/customTranslate.js b/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/translate/customTranslate.js new file mode 100644 index 000000000..cc6ad6e9a --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/translate/customTranslate.js @@ -0,0 +1,44 @@ +// import translations from "./zh"; +// +// export default function customTranslate(template, replacements) { +// replacements = replacements || {}; +// +// // Translate +// template = translations[template] || template; +// +// // Replace +// return template.replace(/{([^}]+)}/g, function(_, key) { +// let str = replacements[key]; +// if ( +// translations[replacements[key]] !== null && +// translations[replacements[key]] !== "undefined" +// ) { +// // eslint-disable-next-line no-mixed-spaces-and-tabs +// str = translations[replacements[key]]; +// // eslint-disable-next-line no-mixed-spaces-and-tabs +// } +// return str || "{" + key + "}"; +// }); +// } + +export default function customTranslate(translations) { + return function (template, replacements) { + replacements = replacements || {}; + // 将模板和翻译字典的键统一转换为小写进行匹配 + const lowerTemplate = template.toLowerCase(); + const translation = Object.keys(translations).find( + (key) => key.toLowerCase() === lowerTemplate, + ); + + // 如果找到匹配的翻译,使用翻译后的模板 + if (translation) { + template = translations[translation]; + } + + // 替换模板中的占位符 + return template.replaceAll(/\{([^}]+)\}/g, (_, key) => { + // 如果替换值存在,返回替换值;否则返回原始占位符 + return replacements[key] === undefined ? `{${key}}` : replacements[key]; + }); + }; +} diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/translate/zh.js b/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/translate/zh.js new file mode 100644 index 000000000..f592bb85b --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/plugins/translate/zh.js @@ -0,0 +1,246 @@ +/** + * This is a sample file that should be replaced with the actual translation. + * + * Checkout https://github.com/bpmn-io/bpmn-js-i18n for a list of available + * translations and labels to translate. + */ +export default { + // 添加部分 + 'Append EndEvent': '追加结束事件', + 'Append Gateway': '追加网关', + 'Append Task': '追加任务', + 'Append Intermediate/Boundary Event': '追加中间抛出事件/边界事件', + + 'Activate the global connect tool': '激活全局连接工具', + 'Append {type}': '添加 {type}', + 'Add Lane above': '在上面添加道', + 'Divide into two Lanes': '分割成两个道', + 'Divide into three Lanes': '分割成三个道', + 'Add Lane below': '在下面添加道', + 'Append compensation activity': '追加补偿活动', + 'Change type': '修改类型', + 'Connect using Association': '使用关联连接', + 'Connect using Sequence/MessageFlow or Association': + '使用顺序/消息流或者关联连接', + 'Connect using DataInputAssociation': '使用数据输入关联连接', + Remove: '移除', + 'Activate the hand tool': '激活抓手工具', + 'Activate the lasso tool': '激活套索工具', + 'Activate the create/remove space tool': '激活创建/删除空间工具', + 'Create expanded SubProcess': '创建扩展子过程', + 'Create IntermediateThrowEvent/BoundaryEvent': '创建中间抛出事件/边界事件', + 'Create Pool/Participant': '创建池/参与者', + 'Parallel Multi Instance': '并行多重事件', + 'Sequential Multi Instance': '时序多重事件', + DataObjectReference: '数据对象参考', + DataStoreReference: '数据存储参考', + Loop: '循环', + 'Ad-hoc': '即席', + 'Create {type}': '创建 {type}', + Task: '任务', + 'Send Task': '发送任务', + 'Receive Task': '接收任务', + 'User Task': '用户任务', + 'Manual Task': '手工任务', + 'Business Rule Task': '业务规则任务', + 'Service Task': '服务任务', + 'Script Task': '脚本任务', + 'Call Activity': '调用活动', + 'Sub-Process (collapsed)': '子流程(折叠的)', + 'Sub-Process (expanded)': '子流程(展开的)', + 'Start Event': '开始事件', + StartEvent: '开始事件', + 'Intermediate Throw Event': '中间事件', + 'End Event': '结束事件', + EndEvent: '结束事件', + 'Create StartEvent': '创建开始事件', + 'Create EndEvent': '创建结束事件', + 'Create Task': '创建任务', + 'Create User Task': '创建用户任务', + 'Create Call Activity': '创建调用活动', + 'Create Service Task': '创建服务任务', + 'Create Gateway': '创建网关', + 'Create DataObjectReference': '创建数据对象', + 'Create DataStoreReference': '创建数据存储', + 'Create Group': '创建分组', + 'Create Intermediate/Boundary Event': '创建中间/边界事件', + 'Message Start Event': '消息开始事件', + 'Timer Start Event': '定时开始事件', + 'Conditional Start Event': '条件开始事件', + 'Signal Start Event': '信号开始事件', + 'Error Start Event': '错误开始事件', + 'Escalation Start Event': '升级开始事件', + 'Compensation Start Event': '补偿开始事件', + 'Message Start Event (non-interrupting)': '消息开始事件(非中断)', + 'Timer Start Event (non-interrupting)': '定时开始事件(非中断)', + 'Conditional Start Event (non-interrupting)': '条件开始事件(非中断)', + 'Signal Start Event (non-interrupting)': '信号开始事件(非中断)', + 'Escalation Start Event (non-interrupting)': '升级开始事件(非中断)', + 'Message Intermediate Catch Event': '消息中间捕获事件', + 'Message Intermediate Throw Event': '消息中间抛出事件', + 'Timer Intermediate Catch Event': '定时中间捕获事件', + 'Escalation Intermediate Throw Event': '升级中间抛出事件', + 'Conditional Intermediate Catch Event': '条件中间捕获事件', + 'Link Intermediate Catch Event': '链接中间捕获事件', + 'Link Intermediate Throw Event': '链接中间抛出事件', + 'Compensation Intermediate Throw Event': '补偿中间抛出事件', + 'Signal Intermediate Catch Event': '信号中间捕获事件', + 'Signal Intermediate Throw Event': '信号中间抛出事件', + 'Message End Event': '消息结束事件', + 'Escalation End Event': '定时结束事件', + 'Error End Event': '错误结束事件', + 'Cancel End Event': '取消结束事件', + 'Compensation End Event': '补偿结束事件', + 'Signal End Event': '信号结束事件', + 'Terminate End Event': '终止结束事件', + 'Message Boundary Event': '消息边界事件', + 'Message Boundary Event (non-interrupting)': '消息边界事件(非中断)', + 'Timer Boundary Event': '定时边界事件', + 'Timer Boundary Event (non-interrupting)': '定时边界事件(非中断)', + 'Escalation Boundary Event': '升级边界事件', + 'Escalation Boundary Event (non-interrupting)': '升级边界事件(非中断)', + 'Conditional Boundary Event': '条件边界事件', + 'Conditional Boundary Event (non-interrupting)': '条件边界事件(非中断)', + 'Error Boundary Event': '错误边界事件', + 'Cancel Boundary Event': '取消边界事件', + 'Signal Boundary Event': '信号边界事件', + 'Signal Boundary Event (non-interrupting)': '信号边界事件(非中断)', + 'Compensation Boundary Event': '补偿边界事件', + 'Exclusive Gateway': '互斥网关', + 'Parallel Gateway': '并行网关', + 'Inclusive Gateway': '相容网关', + 'Complex Gateway': '复杂网关', + 'Event based Gateway': '事件网关', + Transaction: '转运', + 'Sub Process': '子流程', + 'Event Sub Process': '事件子流程', + 'Collapsed Pool': '折叠池', + 'Expanded Pool': '展开池', + + // Errors + 'no parent for {element} in {parent}': '在{parent}里,{element}没有父类', + 'no shape type specified': '没有指定的形状类型', + 'flow elements must be children of pools/participants': + '流元素必须是池/参与者的子类', + 'out of bounds release': 'out of bounds release', + 'more than {count} child lanes': '子道大于{count} ', + 'element required': '元素不能为空', + 'diagram not part of bpmn:Definitions': '流程图不符合bpmn规范', + 'no diagram to display': '没有可展示的流程图', + 'no process or collaboration to display': '没有可展示的流程/协作', + 'element {element} referenced by {referenced}#{property} not yet drawn': + '由{referenced}#{property}引用的{element}元素仍未绘制', + 'already rendered {element}': '{element} 已被渲染', + 'failed to import {element}': '导入{element}失败', + // 属性面板的参数 + Id: '编号', + Name: '名称', + General: '常规', + Details: '详情', + 'Message Name': '消息名称', + Message: '消息', + Initiator: '创建者', + 'Asynchronous Continuations': '持续异步', + 'Asynchronous Before': '异步前', + 'Asynchronous After': '异步后', + 'Job Configuration': '工作配置', + Exclusive: '排除', + 'Job Priority': '工作优先级', + 'Retry Time Cycle': '重试时间周期', + Documentation: '文档', + 'Element Documentation': '元素文档', + 'History Configuration': '历史配置', + 'History Time To Live': '历史的生存时间', + Forms: '表单', + 'Form Key': '表单key', + 'Form Fields': '表单字段', + 'Business Key': '业务key', + 'Form Field': '表单字段', + ID: '编号', + Type: '类型', + Label: '名称', + 'Default Value': '默认值', + 'Default Flow': '默认流转路径', + 'Conditional Flow': '条件流转路径', + 'Sequence Flow': '普通流转路径', + Validation: '校验', + 'Add Constraint': '添加约束', + Config: '配置', + Properties: '属性', + 'Add Property': '添加属性', + Value: '值', + Listeners: '监听器', + 'Execution Listener': '执行监听', + 'Event Type': '事件类型', + 'Listener Type': '监听器类型', + 'Java Class': 'Java类', + Expression: '表达式', + 'Must provide a value': '必须提供一个值', + 'Delegate Expression': '代理表达式', + Script: '脚本', + 'Script Format': '脚本格式', + 'Script Type': '脚本类型', + 'Inline Script': '内联脚本', + 'External Script': '外部脚本', + Resource: '资源', + 'Field Injection': '字段注入', + Extensions: '扩展', + 'Input/Output': '输入/输出', + 'Input Parameters': '输入参数', + 'Output Parameters': '输出参数', + Parameters: '参数', + 'Output Parameter': '输出参数', + 'Timer Definition Type': '定时器定义类型', + 'Timer Definition': '定时器定义', + Date: '日期', + Duration: '持续', + Cycle: '循环', + Signal: '信号', + 'Signal Name': '信号名称', + Escalation: '升级', + Error: '错误', + 'Link Name': '链接名称', + Condition: '条件名称', + 'Variable Name': '变量名称', + 'Variable Event': '变量事件', + 'Specify more than one variable change event as a comma separated list.': + '多个变量事件以逗号隔开', + 'Wait for Completion': '等待完成', + 'Activity Ref': '活动参考', + 'Version Tag': '版本标签', + Executable: '可执行文件', + 'External Task Configuration': '扩展任务配置', + 'Task Priority': '任务优先级', + External: '外部', + Connector: '连接器', + 'Must configure Connector': '必须配置连接器', + 'Connector Id': '连接器编号', + Implementation: '实现方式', + 'Field Injections': '字段注入', + Fields: '字段', + 'Result Variable': '结果变量', + Topic: '主题', + 'Configure Connector': '配置连接器', + 'Input Parameter': '输入参数', + Assignee: '代理人', + 'Candidate Users': '候选用户', + 'Candidate Groups': '候选组', + 'Due Date': '到期时间', + 'Follow Up Date': '跟踪日期', + Priority: '优先级', + 'The follow up date as an EL expression (e.g. ${someDate} or an ISO date (e.g. 2015-06-26T09:54:00)': + '跟踪日期必须符合EL表达式,如: ${someDate} ,或者一个ISO标准日期,如:2015-06-26T09:54:00', + 'The due date as an EL expression (e.g. ${someDate} or an ISO date (e.g. 2015-06-26T09:54:00)': + '跟踪日期必须符合EL表达式,如: ${someDate} ,或者一个ISO标准日期,如:2015-06-26T09:54:00', + Variables: '变量', + 'Candidate Starter Configuration': '候选人起动器配置', + 'Candidate Starter Groups': '候选人起动器组', + 'This maps to the process definition key.': '这映射到流程定义键。', + 'Candidate Starter Users': '候选人起动器的用户', + 'Specify more than one user as a comma separated list.': + '指定多个用户作为逗号分隔的列表。', + 'Tasklist Configuration': 'Tasklist配置', + Startable: '启动', + 'Specify more than one group as a comma separated list.': + '指定多个组作为逗号分隔的列表。', +}; diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/index.ts b/apps/web-antd/src/components/bpmnProcessDesigner/package/index.ts new file mode 100644 index 000000000..f27319abb --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/index.ts @@ -0,0 +1,9 @@ +import './theme/index.scss'; +import 'bpmn-js/dist/assets/diagram-js.css'; +import 'bpmn-js/dist/assets/bpmn-font/css/bpmn.css'; +import 'bpmn-js/dist/assets/bpmn-font/css/bpmn-codes.css'; +import 'bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css'; + +export { default as MyProcessDesigner } from './designer'; +export { default as MyProcessViewer } from './designer/index2'; +export { default as MyProcessPenal } from './penal'; diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/palette/ProcessPalette.vue b/apps/web-antd/src/components/bpmnProcessDesigner/package/palette/ProcessPalette.vue new file mode 100644 index 000000000..7315c2016 --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/palette/ProcessPalette.vue @@ -0,0 +1,49 @@ + + + + + diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/PropertiesPanel.vue b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/PropertiesPanel.vue new file mode 100644 index 000000000..46ebae012 --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/PropertiesPanel.vue @@ -0,0 +1,358 @@ + + diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/base/ElementBaseInfo.vue b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/base/ElementBaseInfo.vue new file mode 100644 index 000000000..66995de32 --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/base/ElementBaseInfo.vue @@ -0,0 +1,194 @@ + + diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/custom-config/ElementCustomConfig.vue b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/custom-config/ElementCustomConfig.vue new file mode 100644 index 000000000..8a88fdea0 --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/custom-config/ElementCustomConfig.vue @@ -0,0 +1,40 @@ + + + + + diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/custom-config/components/BoundaryEventTimer.vue b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/custom-config/components/BoundaryEventTimer.vue new file mode 100644 index 000000000..fcb4656e7 --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/custom-config/components/BoundaryEventTimer.vue @@ -0,0 +1,286 @@ + + + + + diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/custom-config/components/UserTaskCustomConfig.vue b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/custom-config/components/UserTaskCustomConfig.vue new file mode 100644 index 000000000..a6e33cb34 --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/custom-config/components/UserTaskCustomConfig.vue @@ -0,0 +1,760 @@ + + + + + + diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/custom-config/data.ts b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/custom-config/data.ts new file mode 100644 index 000000000..baf254d9f --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/custom-config/data.ts @@ -0,0 +1,13 @@ +import BoundaryEventTimer from './components/BoundaryEventTimer.vue'; +import UserTaskCustomConfig from './components/UserTaskCustomConfig.vue'; + +export const CustomConfigMap = { + UserTask: { + name: '用户任务', + componet: UserTaskCustomConfig, + }, + BoundaryEventTimerEventDefinition: { + name: '定时边界事件(非中断)', + componet: BoundaryEventTimer, + }, +}; diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/flow-condition/FlowCondition.vue b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/flow-condition/FlowCondition.vue new file mode 100644 index 000000000..9a4c94465 --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/flow-condition/FlowCondition.vue @@ -0,0 +1,218 @@ + + + diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/form/ElementForm.vue b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/form/ElementForm.vue new file mode 100644 index 000000000..262066cec --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/form/ElementForm.vue @@ -0,0 +1,518 @@ + + + diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/index.js b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/index.js new file mode 100644 index 000000000..1688cf7d1 --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/index.js @@ -0,0 +1,7 @@ +import MyPropertiesPanel from './PropertiesPanel.vue'; + +MyPropertiesPanel.install = function (Vue) { + Vue.component(MyPropertiesPanel.name, MyPropertiesPanel); +}; + +export default MyPropertiesPanel; diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/listeners/ElementListeners.vue b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/listeners/ElementListeners.vue new file mode 100644 index 000000000..e804e32c5 --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/listeners/ElementListeners.vue @@ -0,0 +1,504 @@ + + diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/listeners/ProcessListenerDialog.vue b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/listeners/ProcessListenerDialog.vue new file mode 100644 index 000000000..2d8557dfa --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/listeners/ProcessListenerDialog.vue @@ -0,0 +1,98 @@ + + + diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/listeners/UserTaskListeners.vue b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/listeners/UserTaskListeners.vue new file mode 100644 index 000000000..1652399b4 --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/listeners/UserTaskListeners.vue @@ -0,0 +1,564 @@ + + diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/listeners/template.js b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/listeners/template.js new file mode 100644 index 000000000..68ddd2326 --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/listeners/template.js @@ -0,0 +1,178 @@ +export const template = (isTaskListener) => { + return ` +
+ + + + + + + + +
+ 添加监听器 +
+ + + + + + + + + + + + + + + + + + + + + + + + + + ${ + isTaskListener + ? "" + + "" + + "" + + "" + + "" + + "" + + '' + + '' + + "" + + "" + + '' + : '' + } + + +

+ 注入字段: + 添加字段 +

+ + + + + + + + + + +
+ 取 消 + 保 存 +
+
+ + + + + + + + + + + + + + + + + + + + + +
+ `; +}; diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/listeners/utilSelf.ts b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/listeners/utilSelf.ts new file mode 100644 index 000000000..0d4609dc6 --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/listeners/utilSelf.ts @@ -0,0 +1,96 @@ +// 初始化表单数据 +export function initListenerForm(listener) { + let self = { + ...listener, + }; + if (listener.script) { + self = { + ...listener, + ...listener.script, + scriptType: listener.script.resource ? 'externalScript' : 'inlineScript', + }; + } + if ( + listener.event === 'timeout' && + listener.eventDefinitions && + listener.eventDefinitions.length > 0 + ) { + let k = ''; + for (const key in listener.eventDefinitions[0]) { + console.log(listener.eventDefinitions, key); + if (key.includes('time')) { + k = key; + self.eventDefinitionType = key.replace('time', '').toLowerCase(); + } + } + console.log(k); + self.eventTimeDefinitions = listener.eventDefinitions[0][k].body; + } + return self; +} + +export function initListenerType(listener) { + let listenerType; + if (listener.class) listenerType = 'classListener'; + if (listener.expression) listenerType = 'expressionListener'; + if (listener.delegateExpression) listenerType = 'delegateExpressionListener'; + if (listener.script) listenerType = 'scriptListener'; + return { + ...JSON.parse(JSON.stringify(listener)), + ...listener.script, + listenerType, + }; +} + +/** 将 ProcessListenerDO 转换成 initListenerForm 想同的 Form 对象 */ +export function initListenerForm2(processListener) { + switch (processListener.valueType) { + case 'class': { + return { + listenerType: 'classListener', + class: processListener.value, + event: processListener.event, + fields: [], + }; + } + case 'delegateExpression': { + return { + listenerType: 'delegateExpressionListener', + delegateExpression: processListener.value, + event: processListener.event, + fields: [], + }; + } + case 'expression': { + return { + listenerType: 'expressionListener', + expression: processListener.value, + event: processListener.event, + fields: [], + }; + } + // No default + } + throw new Error('未知的监听器类型'); +} + +export const listenerType = { + classListener: 'Java 类', + expressionListener: '表达式', + delegateExpressionListener: '代理表达式', + scriptListener: '脚本', +}; + +export const eventType = { + create: '创建', + assignment: '指派', + complete: '完成', + delete: '删除', + update: '更新', + timeout: '超时', +}; + +export const fieldType = { + string: '字符串', + expression: '表达式', +}; diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/multi-instance/ElementMultiInstance.vue b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/multi-instance/ElementMultiInstance.vue new file mode 100644 index 000000000..0ec104ecd --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/multi-instance/ElementMultiInstance.vue @@ -0,0 +1,459 @@ + + + diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/other/ElementOtherConfig.vue b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/other/ElementOtherConfig.vue new file mode 100644 index 000000000..5483b54df --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/other/ElementOtherConfig.vue @@ -0,0 +1,60 @@ + + + diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/properties/ElementProperties.vue b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/properties/ElementProperties.vue new file mode 100644 index 000000000..7f79c145c --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/properties/ElementProperties.vue @@ -0,0 +1,195 @@ + + + diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/signal-message/SignalAndMessage.vue b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/signal-message/SignalAndMessage.vue new file mode 100644 index 000000000..c0f4cb010 --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/signal-message/SignalAndMessage.vue @@ -0,0 +1,159 @@ + + diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/task/ElementTask.vue b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/task/ElementTask.vue new file mode 100644 index 000000000..83f636934 --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/task/ElementTask.vue @@ -0,0 +1,81 @@ + + + diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/task/data.ts b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/task/data.ts new file mode 100644 index 000000000..d19bd65c2 --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/task/data.ts @@ -0,0 +1,36 @@ +import CallActivity from './task-components/CallActivity.vue'; +import ReceiveTask from './task-components/ReceiveTask.vue'; +import ScriptTask from './task-components/ScriptTask.vue'; +import ServiceTask from './task-components/ServiceTask.vue'; +import UserTask from './task-components/UserTask.vue'; + +export const installedComponent = { + UserTask: { + name: '用户任务', + component: UserTask, + }, + ServiceTask: { + name: '服务任务', + component: ServiceTask, + }, + ScriptTask: { + name: '脚本任务', + component: ScriptTask, + }, + ReceiveTask: { + name: '接收任务', + component: ReceiveTask, + }, + CallActivity: { + name: '调用活动', + component: CallActivity, + }, +}; + +export const getTaskCollapseItemName = (elementType) => { + return installedComponent[elementType].name; +}; + +export const isTaskCollapseItemShow = (elementType) => { + return installedComponent[elementType]; +}; diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/task/task-components/CallActivity.vue b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/task/task-components/CallActivity.vue new file mode 100644 index 000000000..f85a50449 --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/task/task-components/CallActivity.vue @@ -0,0 +1,325 @@ + + + + + diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/task/task-components/ProcessExpressionDialog.vue b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/task/task-components/ProcessExpressionDialog.vue new file mode 100644 index 000000000..e178fd84c --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/task/task-components/ProcessExpressionDialog.vue @@ -0,0 +1,81 @@ + + + diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/task/task-components/ReceiveTask.vue b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/task/task-components/ReceiveTask.vue new file mode 100644 index 000000000..82b01ce02 --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/task/task-components/ReceiveTask.vue @@ -0,0 +1,132 @@ + + + diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/task/task-components/ScriptTask.vue b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/task/task-components/ScriptTask.vue new file mode 100644 index 000000000..60bb8656a --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/task/task-components/ScriptTask.vue @@ -0,0 +1,105 @@ + + + diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/task/task-components/ServiceTask.vue b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/task/task-components/ServiceTask.vue new file mode 100644 index 000000000..a84f0872e --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/task/task-components/ServiceTask.vue @@ -0,0 +1,103 @@ + + + diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/task/task-components/UserTask.vue b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/task/task-components/UserTask.vue new file mode 100644 index 000000000..0bcf47760 --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/task/task-components/UserTask.vue @@ -0,0 +1,520 @@ + + + diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/time-event-config/CycleConfig.vue b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/time-event-config/CycleConfig.vue new file mode 100644 index 000000000..6bb78e7db --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/time-event-config/CycleConfig.vue @@ -0,0 +1,342 @@ + + diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/time-event-config/DurationConfig.vue b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/time-event-config/DurationConfig.vue new file mode 100644 index 000000000..e11caf929 --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/time-event-config/DurationConfig.vue @@ -0,0 +1,86 @@ + + + diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/time-event-config/TimeEventConfig.vue b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/time-event-config/TimeEventConfig.vue new file mode 100644 index 000000000..b0cccc92b --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/penal/time-event-config/TimeEventConfig.vue @@ -0,0 +1,345 @@ + + + + + diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/theme/element-variables.scss b/apps/web-antd/src/components/bpmnProcessDesigner/package/theme/element-variables.scss new file mode 100644 index 000000000..344d99b32 --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/theme/element-variables.scss @@ -0,0 +1,81 @@ +/* 改变主题色变量 */ +$--color-primary: #1890ff; +$--color-danger: #ff4d4f; + +/* 改变 icon 字体路径变量,必需 */ +$--font-path: '~element-ui/lib/theme-chalk/fonts'; + +@use '~element-ui/packages/theme-chalk/src/index'; + +.el-table td, +.el-table th { + color: #333; +} + +.el-drawer__header { + box-sizing: border-box; + padding: 16px 16px 8px; + margin: 0; + font-size: 18px; + line-height: 24px; + color: #303133; + border-bottom: 1px solid #e8e8e8; +} + +div[class^='el-drawer']:focus, +span:focus { + outline: none; +} + +.el-drawer__body { + box-sizing: border-box; + width: 100%; + padding: 16px; + overflow-y: auto; +} + +.el-dialog { + margin-top: 50vh !important; + overflow: hidden; + transform: translateY(-50%); +} + +.el-dialog__wrapper { + max-height: 100vh; + overflow: hidden; +} + +.el-dialog__header { + box-sizing: border-box; + padding: 16px 16px 8px; + border-bottom: 1px solid #e8e8e8; +} + +.el-dialog__body { + box-sizing: border-box; + max-height: 80vh; + padding: 16px; + overflow-y: auto; +} + +.el-dialog__footer { + box-sizing: border-box; + padding: 16px; + border-top: 1px solid #e8e8e8; +} + +.el-dialog__close { + font-weight: 600; +} + +.el-select { + width: 100%; +} + +.el-divider:not(.el-divider--horizontal) { + margin: 0 8px; +} + +.el-divider.el-divider--horizontal { + margin: 16px 0; +} diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/theme/index.scss b/apps/web-antd/src/components/bpmnProcessDesigner/package/theme/index.scss new file mode 100644 index 000000000..a2d32d4f3 --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/theme/index.scss @@ -0,0 +1,120 @@ +@use './process-designer'; +@use './process-panel'; + +$success-color: #4eb819; +$primary-color: #409eff; +$danger-color: #f56c6c; +$cancel-color: #909399; + +.process-viewer { + position: relative; + background: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PHBhdHRlcm4gaWQ9ImEiIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgcGF0dGVyblVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHBhdGggZD0iTTAgMTBoNDBNMTAgMHY0ME0wIDIwaDQwTTIwIDB2NDBNMCAzMGg0ME0zMCAwdjQwIiBmaWxsPSJub25lIiBzdHJva2U9IiNlMGUwZTAiIG9wYWNpdHk9Ii4yIi8+PHBhdGggZD0iTTQwIDBIMHY0MCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZTBlMGUwIi8+PC9wYXR0ZXJuPjwvZGVmcz48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJ1cmwoI2EpIi8+PC9zdmc+') + repeat !important; + border: 1px solid #efefef; + + .success-arrow { + fill: $success-color; + stroke: $success-color; + } + + .success-conditional { + fill: white; + stroke: $success-color; + } + + .success.djs-connection { + .djs-visual path { + stroke: $success-color !important; + //marker-end: url(#sequenceflow-end-white-success)!important; + } + } + + .success.djs-connection.condition-expression { + .djs-visual path { + //marker-start: url(#conditional-flow-marker-white-success)!important; + } + } + + .success.djs-shape { + .djs-visual rect { + fill: $success-color !important; + fill-opacity: 0.15 !important; + stroke: $success-color !important; + } + + .djs-visual polygon { + stroke: $success-color !important; + } + + .djs-visual path:nth-child(2) { + fill: $success-color !important; + stroke: $success-color !important; + } + + .djs-visual circle { + fill: $success-color !important; + fill-opacity: 0.15 !important; + stroke: $success-color !important; + } + } + + .primary.djs-shape { + .djs-visual rect { + fill: $primary-color !important; + fill-opacity: 0.15 !important; + stroke: $primary-color !important; + } + + .djs-visual polygon { + stroke: $primary-color !important; + } + + .djs-visual circle { + fill: $primary-color !important; + fill-opacity: 0.15 !important; + stroke: $primary-color !important; + } + } + + .danger.djs-shape { + .djs-visual rect { + fill: $danger-color !important; + fill-opacity: 0.15 !important; + stroke: $danger-color !important; + } + + .djs-visual polygon { + stroke: $danger-color !important; + } + + .djs-visual circle { + fill: $danger-color !important; + fill-opacity: 0.15 !important; + stroke: $danger-color !important; + } + } + + .cancel.djs-shape { + .djs-visual rect { + fill: $cancel-color !important; + fill-opacity: 0.15 !important; + stroke: $cancel-color !important; + } + + .djs-visual polygon { + stroke: $cancel-color !important; + } + + .djs-visual circle { + fill: $cancel-color !important; + fill-opacity: 0.15 !important; + stroke: $cancel-color !important; + } + } +} + +.process-viewer .djs-tooltip-container, +.process-viewer .djs-overlay-container, +.process-viewer .djs-palette { + display: none; +} diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/theme/process-designer.scss b/apps/web-antd/src/components/bpmnProcessDesigner/package/theme/process-designer.scss new file mode 100644 index 000000000..9649244e0 --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/theme/process-designer.scss @@ -0,0 +1,184 @@ +@use 'bpmn-js-token-simulation/assets/css/bpmn-js-token-simulation.css'; + +// 边框被 token-simulation 样式覆盖了 +.djs-palette { + background: var(--palette-background-color); + border: solid 1px var(--palette-border-color) !important; + border-radius: 2px; +} + +.my-process-designer { + box-sizing: border-box; + display: flex; + flex-direction: column; + width: 100%; + height: 100%; + + .my-process-designer__header { + width: 100%; + min-height: 36px; + + .el-button { + text-align: center; + } + + .el-button-group { + margin: 4px; + } + + .el-tooltip__popper { + .el-button { + width: 100%; + padding-right: 8px; + padding-left: 8px; + text-align: left; + } + + .el-button:hover { + color: #fff; + background: rgb(64 158 255 / 80%); + } + } + + .align { + position: relative; + + i { + &::after { + position: absolute; + content: '|'; + // transform: rotate(90deg) translate(200%, 60%); + transform: rotate(180deg) translate(271%, -10%); + } + } + } + + .align.align-left i { + transform: rotate(90deg); + } + + .align.align-right i { + transform: rotate(-90deg); + } + + .align.align-top i { + transform: rotate(180deg); + } + + .align.align-bottom i { + transform: rotate(0deg); + } + + .align.align-center i { + transform: rotate(0deg); + + &::after { + // transform: rotate(90deg) translate(0, 60%); + transform: rotate(0deg) translate(-0%, -5%); + } + } + + .align.align-middle i { + transform: rotate(-90deg); + + &::after { + // transform: rotate(90deg) translate(0, 60%); + transform: rotate(0deg) translate(0, -10%); + } + } + } + + .my-process-designer__container { + display: inline-flex; + flex: 1; + width: 100%; + + .my-process-designer__canvas { + position: relative; + flex: 1; + height: 100%; + background: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PHBhdHRlcm4gaWQ9ImEiIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgcGF0dGVyblVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHBhdGggZD0iTTAgMTBoNDBNMTAgMHY0ME0wIDIwaDQwTTIwIDB2NDBNMCAzMGg0ME0zMCAwdjQwIiBmaWxsPSJub25lIiBzdHJva2U9IiNlMGUwZTAiIG9wYWNpdHk9Ii4yIi8+PHBhdGggZD0iTTQwIDBIMHY0MCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZTBlMGUwIi8+PC9wYXR0ZXJuPjwvZGVmcz48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJ1cmwoI2EpIi8+PC9zdmc+') + repeat !important; + + div.toggle-mode { + display: none; + } + } + + .my-process-designer__property-panel { + z-index: 10; + height: 100%; + overflow: scroll; + overflow-y: auto; + + * { + box-sizing: border-box; + } + } + // svg { + // width: 100%; + // height: 100%; + // min-height: 100%; + // overflow: hidden; + // } + } +} + +//侧边栏配置 +// .djs-palette .two-column .open { +.open { + // .djs-palette.open { + .djs-palette-entries { + div[class^='bpmn-icon-']::before, + div[class*='bpmn-icon-']::before { + line-height: unset; + } + + div.entry { + position: relative; + } + + div.entry:hover { + &::after { + position: absolute; + top: 0; + right: -10px; + bottom: 0; + z-index: 100; + box-sizing: border-box; + display: inline-block; + width: max-content; + padding: 0 16px; + overflow: hidden; + font-size: 0.5em; + font-variant: normal; + vertical-align: text-bottom; + text-transform: none; + text-decoration: inherit; + content: attr(title); + background: #fafafa; + border: 1px solid #ccc; + border-radius: 4px; + box-shadow: 0 0 6px #eee; + transform: translateX(100%); + } + } + } +} + +pre { + height: 100%; + max-height: calc(80vh - 32px); + margin: 0; + overflow: hidden; + overflow-y: auto; +} + +.hljs { + word-break: break-word; + white-space: pre-wrap; +} + +.hljs * { + font-family: Consolas, Monaco, monospace; +} diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/theme/process-panel.scss b/apps/web-antd/src/components/bpmnProcessDesigner/package/theme/process-panel.scss new file mode 100644 index 000000000..d7e8cfbcd --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/theme/process-panel.scss @@ -0,0 +1,127 @@ +.process-panel__container { + box-sizing: border-box; + max-height: 100%; + padding: 0 8px; + overflow-y: scroll; + border-left: 1px solid #eee; + box-shadow: 0 0 8px #ccc; +} + +.panel-tab__title { + padding: 0 8px; + font-size: 1.1em; + font-weight: 600; + line-height: 1.2em; + + i { + margin-right: 8px; + font-size: 1.2em; + } +} + +.panel-tab__content { + box-sizing: border-box; + width: 100%; + padding: 8px 16px; + border-top: 1px solid #eee; + + .panel-tab__content--title { + display: flex; + justify-content: space-between; + padding-bottom: 8px; + + span { + flex: 1; + text-align: left; + } + } +} + +.element-property { + display: flex; + align-items: flex-start; + width: 100%; + margin: 8px 0; + + .element-property__label { + box-sizing: border-box; + display: block; + width: 90px; + padding-right: 12px; + overflow: hidden; + font-size: 14px; + line-height: 32px; + text-align: right; + } + + .element-property__value { + flex: 1; + line-height: 32px; + } + + .el-form-item { + width: 100%; + padding-bottom: 18px; + margin-bottom: 0; + } +} + +.list-property { + flex-direction: column; + + .element-listener-item { + display: inline-grid; + grid-template-columns: 16px auto 32px 32px; + grid-column-gap: 8px; + width: 100%; + } + + .element-listener-item + .element-listener-item { + margin-top: 8px; + } +} + +.listener-filed__title { + display: inline-flex; + align-items: center; + justify-content: space-between; + width: 100%; + margin-top: 0; + + span { + width: 200px; + font-size: 14px; + text-align: left; + } + + i { + margin-right: 8px; + } +} + +.element-drawer__button { + display: inline-flex; + justify-content: space-around; + width: 100%; + margin-top: 8px; +} + +.element-drawer__button > .el-button { + width: 100%; +} + +.el-collapse-item__content { + padding-bottom: 0; +} + +.el-input.is-disabled .el-input__inner { + color: #999; +} + +.el-form-item.el-form-item--mini { + margin-bottom: 0; + + & + .el-form-item { + margin-top: 16px; + } +} diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/utils.ts b/apps/web-antd/src/components/bpmnProcessDesigner/package/utils.ts new file mode 100644 index 000000000..5a904331d --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/utils.ts @@ -0,0 +1,93 @@ +import { toRaw } from 'vue'; + +const bpmnInstances = () => (window as any)?.bpmnInstances; +// 创建监听器实例 +export function createListenerObject(options, isTask, prefix) { + const listenerObj = Object.create(null); + listenerObj.event = options.event; + isTask && (listenerObj.id = options.id); // 任务监听器特有的 id 字段 + switch (options.listenerType) { + case 'delegateExpressionListener': { + listenerObj.delegateExpression = options.delegateExpression; + break; + } + case 'expressionListener': { + listenerObj.expression = options.expression; + break; + } + case 'scriptListener': { + listenerObj.script = createScriptObject(options, prefix); + break; + } + default: { + listenerObj.class = options.class; + } + } + // 注入字段 + if (options.fields) { + listenerObj.fields = options.fields.map((field) => { + return createFieldObject(field, prefix); + }); + } + // 任务监听器的 定时器 设置 + if (isTask && options.event === 'timeout' && !!options.eventDefinitionType) { + const timeDefinition = bpmnInstances().moddle.create( + 'bpmn:FormalExpression', + { + body: options.eventTimeDefinitions, + }, + ); + const TimerEventDefinition = bpmnInstances().moddle.create( + 'bpmn:TimerEventDefinition', + { + id: `TimerEventDefinition_${uuid(8)}`, + [`time${options.eventDefinitionType.replace(/^\S/, (s) => s.toUpperCase())}`]: + timeDefinition, + }, + ); + listenerObj.eventDefinitions = [TimerEventDefinition]; + } + return bpmnInstances().moddle.create( + `${prefix}:${isTask ? 'TaskListener' : 'ExecutionListener'}`, + listenerObj, + ); +} + +// 创建 监听器的注入字段 实例 +export function createFieldObject(option, prefix) { + const { name, fieldType, string, expression } = option; + const fieldConfig = + fieldType === 'string' ? { name, string } : { name, expression }; + return bpmnInstances().moddle.create(`${prefix}:Field`, fieldConfig); +} + +// 创建脚本实例 +export function createScriptObject(options, prefix) { + const { scriptType, scriptFormat, value, resource } = options; + const scriptConfig = + scriptType === 'inlineScript' + ? { scriptFormat, value } + : { scriptFormat, resource }; + return bpmnInstances().moddle.create(`${prefix}:Script`, scriptConfig); +} + +// 更新元素扩展属性 +export function updateElementExtensions(element, extensionList) { + const extensions = bpmnInstances().moddle.create('bpmn:ExtensionElements', { + values: extensionList, + }); + bpmnInstances().modeling.updateProperties(toRaw(element), { + extensionElements: extensions, + }); +} + +// 创建一个id +export function uuid(length = 8, chars?) { + let result = ''; + const charsString = + chars || '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; + for (let i = length; i > 0; --i) { + result += charsString[Math.floor(Math.random() * charsString.length)]; + } + return result; +} diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/src/highlight/index.js b/apps/web-antd/src/components/bpmnProcessDesigner/src/highlight/index.js new file mode 100644 index 000000000..c4890d71b --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/src/highlight/index.js @@ -0,0 +1,5 @@ +const hljs = require('highlight.js/lib/core'); +hljs.registerLanguage('xml', require('highlight.js/lib/languages/xml')); +hljs.registerLanguage('json', require('highlight.js/lib/languages/json')); + +module.exports = hljs; diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/src/modules/custom-renderer/CustomRenderer.js b/apps/web-antd/src/components/bpmnProcessDesigner/src/modules/custom-renderer/CustomRenderer.js new file mode 100644 index 000000000..506a1b3c3 --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/src/modules/custom-renderer/CustomRenderer.js @@ -0,0 +1,30 @@ +import BpmnRenderer from 'bpmn-js/lib/draw/BpmnRenderer'; + +export default function CustomRenderer( + config, + eventBus, + styles, + pathMap, + canvas, + textRenderer, +) { + BpmnRenderer.call( + this, + config, + eventBus, + styles, + pathMap, + canvas, + textRenderer, + 2000, + ); + + this.handlers.label = function () { + return null; + }; +} + +const F = function () {}; // 核心,利用空对象作为中介; +F.prototype = BpmnRenderer.prototype; // 核心,将父类的原型赋值给空对象F; +CustomRenderer.prototype = new F(); // 核心,将 F的实例赋值给子类; +CustomRenderer.prototype.constructor = CustomRenderer; // 修复子类CustomRenderer的构造器指向,防止原型链的混乱; diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/src/modules/custom-renderer/index.js b/apps/web-antd/src/components/bpmnProcessDesigner/src/modules/custom-renderer/index.js new file mode 100644 index 000000000..a1842ec76 --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/src/modules/custom-renderer/index.js @@ -0,0 +1,6 @@ +import CustomRenderer from './CustomRenderer'; + +export default { + __init__: ['customRenderer'], + customRenderer: ['type', CustomRenderer], +}; diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/src/modules/rules/CustomRules.js b/apps/web-antd/src/components/bpmnProcessDesigner/src/modules/rules/CustomRules.js new file mode 100644 index 000000000..49ed6e3e1 --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/src/modules/rules/CustomRules.js @@ -0,0 +1,16 @@ +import BpmnRules from 'bpmn-js/lib/features/rules/BpmnRules'; +import inherits from 'inherits'; + +export default function CustomRules(eventBus) { + BpmnRules.call(this, eventBus); +} + +inherits(CustomRules, BpmnRules); + +CustomRules.prototype.canDrop = function () { + return false; +}; + +CustomRules.prototype.canMove = function () { + return false; +}; diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/src/modules/rules/index.js b/apps/web-antd/src/components/bpmnProcessDesigner/src/modules/rules/index.js new file mode 100644 index 000000000..838b93ea6 --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/src/modules/rules/index.js @@ -0,0 +1,6 @@ +import CustomRules from './CustomRules'; + +export default { + __init__: ['customRules'], + customRules: ['type', CustomRules], +}; diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/src/translations.ts b/apps/web-antd/src/components/bpmnProcessDesigner/src/translations.ts new file mode 100644 index 000000000..75c615592 --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/src/translations.ts @@ -0,0 +1,25 @@ +/** + * This is a sample file that should be replaced with the actual translation. + * + * Checkout https://github.com/bpmn-io/bpmn-js-i18n for a list of available + * translations and labels to translate. + */ +export default { + 'Exclusive Gateway': 'Exklusives Gateway', + 'Parallel Gateway': 'Paralleles Gateway', + 'Inclusive Gateway': 'Inklusives Gateway', + 'Complex Gateway': 'Komplexes Gateway', + 'Event based Gateway': 'Ereignis-basiertes Gateway', + 'Message Start Event': '消息启动事件', + 'Timer Start Event': '定时启动事件', + 'Conditional Start Event': '条件启动事件', + 'Signal Start Event': '信号启动事件', + 'Error Start Event': '错误启动事件', + 'Escalation Start Event': '升级启动事件', + 'Compensation Start Event': '补偿启动事件', + 'Message Start Event (non-interrupting)': '消息启动事件 (非中断)', + 'Timer Start Event (non-interrupting)': '定时启动事件 (非中断)', + 'Conditional Start Event (non-interrupting)': '条件启动事件 (非中断)', + 'Signal Start Event (non-interrupting)': '信号启动事件 (非中断)', + 'Escalation Start Event (non-interrupting)': '升级启动事件 (非中断)', +}; diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/src/utils/directive/clickOutSide.js b/apps/web-antd/src/components/bpmnProcessDesigner/src/utils/directive/clickOutSide.js new file mode 100644 index 000000000..f3deec68b --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/src/utils/directive/clickOutSide.js @@ -0,0 +1,39 @@ +// outside.js + +const ctx = '@@clickoutsideContext'; + +export default { + bind(el, binding, vnode) { + const ele = el; + const documentHandler = (e) => { + if (!vnode.context || ele.contains(e.target)) { + return false; + } + // 调用指令回调 + if (binding.expression) { + vnode.context[el[ctx].methodName](e); + } else { + el[ctx].bindingFn(e); + } + }; + // 将方法添加到ele + ele[ctx] = { + documentHandler, + methodName: binding.expression, + bindingFn: binding.value, + }; + + setTimeout(() => { + document.addEventListener('touchstart', documentHandler); // 为document绑定事件 + }); + }, + update(el, binding) { + const ele = el; + ele[ctx].methodName = binding.expression; + ele[ctx].bindingFn = binding.value; + }, + unbind(el) { + document.removeEventListener('touchstart', el[ctx].documentHandler); // 解绑 + delete el[ctx]; + }, +}; diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/src/utils/index.js b/apps/web-antd/src/components/bpmnProcessDesigner/src/utils/index.js new file mode 100644 index 000000000..973685a0b --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/src/utils/index.js @@ -0,0 +1,10 @@ +export function debounce(fn, delay = 500) { + let timer; + return function (...args) { + if (timer) { + clearTimeout(timer); + timer = null; + } + timer = setTimeout(fn.bind(this, ...args), delay); + }; +} diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/src/utils/xml2json.js b/apps/web-antd/src/components/bpmnProcessDesigner/src/utils/xml2json.js new file mode 100644 index 000000000..45ba4de8e --- /dev/null +++ b/apps/web-antd/src/components/bpmnProcessDesigner/src/utils/xml2json.js @@ -0,0 +1,50 @@ +function xmlStr2XmlObj(xmlStr) { + let xmlObj = {}; + if (document.all) { + const xmlDom = new window.ActiveXObject('Microsoft.XMLDOM'); + xmlDom.loadXML(xmlStr); + xmlObj = xmlDom; + } else { + xmlObj = new DOMParser().parseFromString(xmlStr, 'text/xml'); + } + return xmlObj; +} + +function xml2json(xml) { + try { + let obj = {}; + if (xml.children.length > 0) { + for (let i = 0; i < xml.children.length; i++) { + const item = xml.children.item(i); + const nodeName = item.nodeName; + if (obj[nodeName] === undefined) { + obj[nodeName] = xml2json(item); + } else { + if (obj[nodeName].push === undefined) { + const old = obj[nodeName]; + obj[nodeName] = []; + obj[nodeName].push(old); + } + obj[nodeName].push(xml2json(item)); + } + } + } else { + obj = xml.textContent; + } + return obj; + } catch (error) { + console.log(error.message); + } +} + +function xmlObj2json(xml) { + const xmlObj = xmlStr2XmlObj(xml); + console.log(xmlObj); + let jsonObj = {}; + if (xmlObj.childNodes.length > 0) { + jsonObj = xml2json(xmlObj); + } + return jsonObj; +} + +export default xmlObj2json; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cf8b328bc..2d8f4161b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -782,18 +782,39 @@ importers: ant-design-vue: specifier: 'catalog:' version: 4.2.6(vue@3.5.18(typescript@5.9.2)) + bpmn-js: + specifier: ^17.11.1 + version: 17.11.1 + bpmn-js-properties-panel: + specifier: 5.23.0 + version: 5.23.0(@bpmn-io/properties-panel@3.33.0)(bpmn-js@17.11.1)(camunda-bpmn-js-behaviors@1.11.1(bpmn-js@17.11.1)(camunda-bpmn-moddle@7.0.1)(zeebe-bpmn-moddle@1.11.0))(diagram-js@12.8.1) + bpmn-js-token-simulation: + specifier: ^0.36.3 + version: 0.36.3 + camunda-bpmn-moddle: + specifier: ^7.0.1 + version: 7.0.1 cropperjs: specifier: 'catalog:' version: 1.6.2 dayjs: specifier: 'catalog:' version: 1.11.13 + diagram-js: + specifier: ^12.8.1 + version: 12.8.1 + fast-xml-parser: + specifier: ^4.5.3 + version: 4.5.3 highlight.js: specifier: 'catalog:' version: 11.11.1 pinia: specifier: ^3.0.3 version: 3.0.3(typescript@5.9.2)(vue@3.5.18(typescript@5.9.2)) + steady-xml: + specifier: ^0.1.0 + version: 0.1.0 tinymce: specifier: 'catalog:' version: 7.9.1 @@ -2817,6 +2838,37 @@ packages: resolution: {integrity: sha512-ruv7Ae4J5dUYULmeXw1gmb7rYRz57OWCPM57pHojnLq/3Z1CK2lNSLTCVjxVk1F/TZHwOZZrOWi0ur95BbLxNQ==} engines: {node: '>=6.9.0'} + '@bpmn-io/cm-theme@0.1.0-alpha.2': + resolution: {integrity: sha512-ZILgiYzxk3KMvxplUXmdRFQo45/JehDPg5k9tWfehmzUOSE13ssyLPil8uCloMQnb3yyzyOWTjb/wzKXTHlFQw==} + + '@bpmn-io/diagram-js-ui@0.2.3': + resolution: {integrity: sha512-OGyjZKvGK8tHSZ0l7RfeKhilGoOGtFDcoqSGYkX0uhFlo99OVZ9Jn1K7TJGzcE9BdKwvA5Y5kGqHEhdTxHvFfw==} + + '@bpmn-io/extract-process-variables@0.8.0': + resolution: {integrity: sha512-yAS7ZYX+D56K+luC36u96eRMLb4VHcPUwTUqMZ/Z/Je2gou2DJLRbuBTHAB4jjKt4wFCHSG4B8Y+TrBciEYf4w==} + + '@bpmn-io/feel-editor@1.12.0': + resolution: {integrity: sha512-l19PUPZX4DurVNZF06x3mJ0jBNnVpEJTP4tTzVBpgxofxRDWemDjfHWlY+gsuW4QFFGjVL3hV5IIEiZp/oA3Kw==} + engines: {node: '>= 16'} + + '@bpmn-io/feel-lint@1.4.0': + resolution: {integrity: sha512-1bsdR/9vPD7RQVqWWPk0X0tpjLsYTDrCxIzOVtN/h32o4nPGl0dZBU5m07qaFUGD4wG3eOH4Qim1wexHG8YkBw==} + + '@bpmn-io/feel-lint@2.1.0': + resolution: {integrity: sha512-fUGye6KppyowiwUqlfRHpMtXQ8so8jv1rh2LEQp+fhKf+WeLkbokmQwXZbCQe/4Kam/OLQRlx+p3Qnu0IrZQ6A==} + + '@bpmn-io/lang-feel@2.4.0': + resolution: {integrity: sha512-0c1pratAD/YTOaivwLd7MljT0/MoDUMpfm87JbtAOBvivRfEr8mel5l8Ig3kgpYJ+xkznLaA9s79ZDKLh/O8ag==} + + '@bpmn-io/lezer-feel@1.9.0': + resolution: {integrity: sha512-mV+pj+x0++9zT5/RkOOUNtkT2hpKpGWbXuFR8trJlvJeRe1dL/5yPal/RBcnk3z73tILK4kP6LzXelcsshQCEw==} + + '@bpmn-io/properties-panel@3.33.0': + resolution: {integrity: sha512-I41JNpfX7zzKTOpmB84ETt8dnyE4OLDtzNmQBN6m3wEnfFw19VuBa7C0XXMtF/Us1zvy3yFx+dAH//Hgg9e0uQ==} + + '@camunda/feel-builtins@0.2.0': + resolution: {integrity: sha512-Jusm8x3Onqze9E5Y0lGGdPj66bnFKLYNwDz+uG4otsEXgSL0FpF+koGHK48LkF9Jqo67KaP1y3zr2y/HIWRePw==} + '@changesets/apply-release-plan@7.0.12': resolution: {integrity: sha512-EaET7As5CeuhTzvXTQCRZeBUcisoYPDDcXvgTE/2jmmypKp0RC7LxKj/yzqeh/1qFTZI7oDGFcL1PHRuQuketQ==} @@ -2888,6 +2940,24 @@ packages: resolution: {integrity: sha512-+tv3z+SPp+gqTIcImN9o0hqE9xyfQjI1XD9pL6NuKjua9B1y7mNYv0S9cP+QEbA4ppVgGZEmKOvHX5G5Ei1CVA==} engines: {node: '>=18.0.0'} + '@codemirror/autocomplete@6.18.7': + resolution: {integrity: sha512-8EzdeIoWPJDsMBwz3zdzwXnUpCzMiCyz5/A3FIPpriaclFCGDkAzK13sMcnsu5rowqiyeQN2Vs2TsOcoDPZirQ==} + + '@codemirror/commands@6.8.1': + resolution: {integrity: sha512-KlGVYufHMQzxbdQONiLyGQDUW0itrLZwq3CcY7xpv9ZLRHqzkBSoteocBHtMCoY7/Ci4xhzSrToIeLg7FxHuaw==} + + '@codemirror/language@6.11.3': + resolution: {integrity: sha512-9HBM2XnwDj7fnu0551HkGdrUrrqmYq/WC5iv6nbY2WdicXdGbhR/gfbZOH73Aqj4351alY1+aoG9rCNfiwS1RA==} + + '@codemirror/lint@6.8.5': + resolution: {integrity: sha512-s3n3KisH7dx3vsoeGMxsbRAgKe4O1vbrnKBClm99PU0fWxmxsx5rR2PfqQgIt+2MMJBHbiJ5rfIdLYfB9NNvsA==} + + '@codemirror/state@6.5.2': + resolution: {integrity: sha512-FVqsPqtPWKVVL3dPSxy8wEF/ymIEuVzF1PK3VbUgrxXpJUSHQWWZz4JMToquRxnkw+36LTamCZG2iua2Ptq0fA==} + + '@codemirror/view@6.38.2': + resolution: {integrity: sha512-bTWAJxL6EOFLPzTx+O5P5xAO3gTqpatQ2b/ARQ8itfU/v2LlpS3pH2fkL0A3E/Fx8Y2St2KES7ZEV0sHTsSW/A==} + '@colors/colors@1.6.0': resolution: {integrity: sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA==} engines: {node: '>=0.1.90'} @@ -3993,6 +4063,18 @@ packages: '@keyv/serialize@1.1.0': resolution: {integrity: sha512-RlDgexML7Z63Q8BSaqhXdCYNBy/JQnqYIwxofUrNLGCblOMHp+xux2Q8nLMLlPpgHQPoU0Do8Z6btCpRBEqZ8g==} + '@lezer/common@1.2.3': + resolution: {integrity: sha512-w7ojc8ejBqr2REPsWxJjrMFsA/ysDCFICn8zEOR9mrqzOu2amhITYuLD8ag6XZf0CFXDrhKqw7+tW8cX66NaDA==} + + '@lezer/highlight@1.2.1': + resolution: {integrity: sha512-Z5duk4RN/3zuVO7Jq0pGLJ3qynpxUVsh7IbUbGj88+uV2ApSAn6kWg2au3iJb+0Zi7kKtqffIESgNcRXWZWmSA==} + + '@lezer/lr@1.4.2': + resolution: {integrity: sha512-pu0K1jCIdnQ12aWNaAVU5bzi7Bd1w54J3ECgANPmYLtQKP0HBj2cE/5coBD66MT10xbtIuUr7tg0Shbsvk0mDA==} + + '@lezer/markdown@1.4.3': + resolution: {integrity: sha512-kfw+2uMrQ/wy/+ONfrH83OkdFNM0ye5Xq96cLlaCy7h5UT9FO54DU4oRoIc0CSBh5NWmWuiIJA7NGLMJbQ+Oxg==} + '@manypkg/find-root@1.1.0': resolution: {integrity: sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==} @@ -4016,6 +4098,9 @@ packages: engines: {node: '>=18'} hasBin: true + '@marijn/find-cluster-break@1.0.2': + resolution: {integrity: sha512-l0h88YhZFyKdXIFNfSWpyjStDjGHwZ/U7iobcK1cQQD8sejsONdQtTVU+1wVN1PBw40PiiHB1vA5S7VTfQiP9g==} + '@microsoft/api-extractor-model@7.30.7': resolution: {integrity: sha512-TBbmSI2/BHpfR9YhQA7nH0nqVmGgJ0xH0Ex4D99/qBDAUpnhA2oikGmdXanbw9AWWY/ExBYIpkmY8dBHdla3YQ==} @@ -5566,6 +5651,10 @@ packages: array-ify@1.0.0: resolution: {integrity: sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng==} + array-move@4.0.0: + resolution: {integrity: sha512-+RY54S8OuVvg94THpneQvFRmqWdAHeqtMzgMW6JNurHxe8rsS07cHQdfGkXnTUXiBcyZ0j3SiDIxxj0RPiqCkQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + array-timsort@1.0.3: resolution: {integrity: sha512-/+3GRL7dDAGEfM6TseQk/U+mi18TU2Ms9I3UlLdUMhz2hbvGNTKdj9xniwXfUqgYhHxRx0+8UnKkvlNwVU+cWQ==} @@ -5702,6 +5791,24 @@ packages: resolution: {integrity: sha512-F3PH5k5juxom4xktynS7MoFY+NUWH5LC4CnH11YB8NPew+HLpmBLCybSAEyb2F+4pRXhuhWqFesoQd6DAyc2hw==} engines: {node: '>=18'} + bpmn-js-properties-panel@5.23.0: + resolution: {integrity: sha512-4B27LM8oV14A2QWRvazV17h4NxbkNERcqU+AGJmxKImMlLhu9893MWR+pCdTQCTphBdBkuD8ksWm+1wVCedJ7g==} + peerDependencies: + '@bpmn-io/properties-panel': '>= 3.7' + bpmn-js: '>= 11.5' + camunda-bpmn-js-behaviors: '>= 0.4' + diagram-js: '>= 11.9' + + bpmn-js-token-simulation@0.36.3: + resolution: {integrity: sha512-HyiExdi+vENiStn284gIUQkQliiWly4dk2kY9PJILwwuTIoKtvg1zw8LGr9ReNUiScibNbpkt45bR25Oqfq9wA==} + engines: {node: '>= 16'} + + bpmn-js@17.11.1: + resolution: {integrity: sha512-ywCeTg5kvN8lYkU+fHE+YXTGlfKc55lRBn7zW3k1//toeMNPy/PS/uQiujRWdFhMrH5dbtDvlwWukNw2pjWw8Q==} + + bpmn-moddle@8.1.0: + resolution: {integrity: sha512-yI5OAFfYVJwViKTsTsonVfCBPtB3MlefADUORwNIxxBOMp21vnoxuxsdgUWlPH/dvAEZh/+mr8UtqOBNu8NC5Q==} + brace-expansion@1.1.12: resolution: {integrity: sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==} @@ -5802,6 +5909,16 @@ packages: resolution: {integrity: sha512-8WB3Jcas3swSvjIeA2yvCJ+Miyz5l1ZmB6HFb9R1317dt9LCQoswg/BGrmAmkWVEszSrrg4RwmO46qIm2OEnSA==} engines: {node: '>=16'} + camunda-bpmn-js-behaviors@1.11.1: + resolution: {integrity: sha512-It6OLShW7wuMC12Vc6OZPxbtRKX8j5AvqnBktXs5jyfUndqcRNHRkZ7wSEiTqAkHyl6ATNuYmfNUQzqxFyNmKg==} + peerDependencies: + bpmn-js: '>= 9' + camunda-bpmn-moddle: '>= 7' + zeebe-bpmn-moddle: '>= 0.18' + + camunda-bpmn-moddle@7.0.1: + resolution: {integrity: sha512-Br8Diu6roMpziHdpl66Dhnm0DTnCFMrSD9zwLV08LpD52QA0UsXxU87XfHf08HjuB7ly0Hd1bvajZRpf9hbmYQ==} + caniuse-api@3.0.0: resolution: {integrity: sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==} @@ -5885,6 +6002,9 @@ packages: class-variance-authority@0.7.1: resolution: {integrity: sha512-Ka+9Trutv7G8M6WT6SeiRWz792K5qEqIGEGzXKhAE6xOWAY6pPH8U+9IY3oCMv6kqTmLsv7Xh/2w2RigkePMsg==} + classnames@2.5.1: + resolution: {integrity: sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==} + clean-css@5.3.3: resolution: {integrity: sha512-D5J+kHaVb/wKSFcyyV75uCn8fiY4sV38XJoe4CUyGQ+mOU/fMVYUdH1hJC+CJQ5uY3EnW27SbJYS4X8BiLrAFg==} engines: {node: '>= 10.0'} @@ -6045,6 +6165,9 @@ packages: compatx@0.2.0: resolution: {integrity: sha512-6gLRNt4ygsi5NyMVhceOCFv14CIdDFN7fQjX1U4+47qVE/+kjPoXMK65KWK+dWxmFzMTuKazoQ9sch6pM0p5oA==} + component-event@0.2.1: + resolution: {integrity: sha512-wGA++isMqiDq1jPYeyv2as/Bt/u+3iLW0rEa+8NQ82jAv3TgqMiCM+B2SaBdn2DfLilLjjq736YcezihRYhfxw==} + compress-commons@6.0.2: resolution: {integrity: sha512-6FqVXeETqWPoGcfzrXb37E50NP0LXT8kAMu5ooZayhWWdgEY4lBEEcbQNXtkuKQsGduxiIcI4gOTsxTmuq/bSg==} engines: {node: '>= 14'} @@ -6158,6 +6281,9 @@ packages: resolution: {integrity: sha512-piICUB6ei4IlTv1+653yq5+KoqfBYmj9bw6LqXoOneTMDXk5nM1qt12mFW1caG3LlJXEKW1Bp0WggEmIfQB34g==} engines: {node: '>= 14'} + crelt@1.0.6: + resolution: {integrity: sha512-VQ2MBenTq1fWZUH9DJNGti7kKv6EeAuYr3cLwxUWhIu1baTaXh4Ib5W2CqHVqib4/MqbYGJqiL3Zb8GJZr3l4g==} + cron-parser@4.9.0: resolution: {integrity: sha512-p0SaNjrHOnQeR8/VnfGbmg9te2kfyYSQ7Sc/j/6DtPL3JQvKxmjO9TSjNFpujqV3vEYYBvNNvXSxzyksBWAx1Q==} engines: {node: '>=12.0.0'} @@ -6677,6 +6803,24 @@ packages: devlop@1.1.0: resolution: {integrity: sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==} + diagram-js-direct-editing@3.2.0: + resolution: {integrity: sha512-+pyxeQGBSdLiZX0/tmmsm2qZSvm9YtVzod5W3RMHSTR7VrkUMD6E7EX/W9JQv3ebxO7oIdqFmytmNDDpSHnYEw==} + peerDependencies: + diagram-js: '*' + + diagram-js@12.8.1: + resolution: {integrity: sha512-LF9BiwjbOPpZd0ez5VSlYRbdbEA59YQX43bWvNDp1rLMv0xwZ5yIg4oaYDK82nIQ0kH1tjvoQRpNevMTCgQVyw==} + + diagram-js@14.11.3: + resolution: {integrity: sha512-Seq9BHAXfzKS60L4v4Gvgvv72wOtvrfJQAyyPm9pntSZDMzjoodPSXnEUPud1G2zVCMGEUUW++s0reEdaWgkXA==} + + didi@10.2.2: + resolution: {integrity: sha512-l8NYkYFXV1izHI65EyT8EXOjUZtKmQkHLTT89cSP7HU5J/G7AOj0dXKtLc04EXYlga99PBY18IPjOeZ+c3DI4w==} + engines: {node: '>= 16'} + + didi@9.0.2: + resolution: {integrity: sha512-q2+aj+lnJcUweV7A9pdUrwFr4LHVmRPwTmQLtHPFz4aT7IBoryN6Iy+jmFku+oIzr5ebBkvtBCOb87+dJhb7bg==} + didyoumean@1.2.2: resolution: {integrity: sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==} @@ -6716,6 +6860,13 @@ packages: resolution: {integrity: sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==} engines: {node: '>= 4'} + domify@1.4.2: + resolution: {integrity: sha512-m4yreHcUWHBncGVV7U+yQzc12vIlq0jMrtHZ5mW6dQMiL/7skSYNVX9wqKwOtyO9SGCgevrAFEgOCAHmamHTUA==} + + domify@2.0.0: + resolution: {integrity: sha512-rmvrrmWQPD/X1A/nPBfIVg4r05792QdG9Z4Prk6oQG0F9zBMDkr0GKAdds1wjb2dq1rTz/ywc4ZxpZbgz0tttg==} + engines: {node: '>=18'} + dompurify@3.2.6: resolution: {integrity: sha512-/2GogDQlohXPZe6D6NOgQvXLPSYBqIWMnZ8zzOhn09REE4eyAzb+Hed3jhoM9OkuaJ8P6ZGTTVWQKAi8ieIzfQ==} @@ -7240,6 +7391,10 @@ packages: fast-uri@3.0.6: resolution: {integrity: sha512-Atfo14OibSv5wAp4VWNsFYE1AchQRTv9cBGWET4pZWHzYshFSS9NQI6I57rdKn9croWVMbYFbLhJ+yJvmZIIHw==} + fast-xml-parser@4.5.3: + resolution: {integrity: sha512-RKihhV+SHsIUGXObeVy9AXiBbFwkVk7Syp8XgwN5U3JV416+Gwp/GO9i0JYKmikykgz/UHRrrV4ROuZEo/T0ig==} + hasBin: true + fastest-levenshtein@1.0.16: resolution: {integrity: sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==} engines: {node: '>= 4.9.1'} @@ -7262,6 +7417,12 @@ packages: fecha@4.2.3: resolution: {integrity: sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==} + feelers@1.4.0: + resolution: {integrity: sha512-CGa/7ILuqoqTaeYeoKsg/4tzu2es9sEEJTmSjdu0lousZBw4V9gcYhHYFNmbrSrKmbAVfOzj6/DsymGJWFIOeg==} + + feelin@3.2.0: + resolution: {integrity: sha512-GFDbHsTYk7YXO1tyw1dOjb7IODeAZvNIosdGZThUwPx5XcD/XhO0hnPZXsIbAzSsIdrgGlTEEdby9fZ2gixysA==} + fetch-blob@3.2.0: resolution: {integrity: sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==} engines: {node: ^12.20 || >= 14.13} @@ -7593,6 +7754,10 @@ packages: h3@1.15.4: resolution: {integrity: sha512-z5cFQWDffyOe4vQ9xIqNfCZdV4p//vy6fBnr8Q1AWnVZ0teurKMG66rLj++TKwKPUP3u7iMUvrvKaEUiQw2QWQ==} + hammerjs@2.0.8: + resolution: {integrity: sha512-tSQXBXS/MWQOn/RKckawJ61vvsDpCom87JgxiYdGwHdOa0ht0vzUWDlfioofFCRU0L+6NGDt6XzbgoJvZkMeRQ==} + engines: {node: '>=0.8.0'} + happy-dom@17.6.3: resolution: {integrity: sha512-UVIHeVhxmxedbWPCfgS55Jg2rDfwf2BCKeylcPSqazLz5w3Kri7Q4xdBJubsr/+VUzFLh0VjIvh13RaDA2/Xug==} engines: {node: '>=20.0.0'} @@ -7659,6 +7824,9 @@ packages: resolution: {integrity: sha512-puUZAUKT5m8Zzvs72XWy3HtvVbTWljRE66cP60bxJzAqf2DgICo7lYTY2IHUmLnNpjYvw5bvmoHvPc0QO2a62w==} engines: {node: ^16.14.0 || >=18.0.0} + htm@3.1.1: + resolution: {integrity: sha512-983Vyg8NwUE7JkZ6NmOqpCZ+sh1bKv2iYTlUkzlWmA5JD2acKoxd4KVxbMmxX/85mtfdnDmTFoNKcg5DGAvxNQ==} + html-minifier-terser@6.1.0: resolution: {integrity: sha512-YXxSlJBZTP7RS3tWnQw74ooKa6L9b9i9QYXY21eUEvhZ3u9XLfv6OnFsQq6RxkhHygsaUMvYsZRV5rU/OVNZxw==} engines: {node: '>=12'} @@ -7730,6 +7898,9 @@ packages: idb@7.1.1: resolution: {integrity: sha512-gchesWBzyvGHRO9W8tzUWFDycow5gwjvFKfyV9FF32Y7F50yZMp7mP+T2mJIWFx49zicqyC4uefHM17o6xKIVQ==} + ids@1.0.5: + resolution: {integrity: sha512-XQ0yom/4KWTL29sLG+tyuycy7UmeaM/79GRtSJq6IG9cJGIPeBz5kwDCguie3TwxaMNIc3WtPi0cTa1XYHicpw==} + ieee754@1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} @@ -7783,6 +7954,9 @@ packages: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. + inherits-browser@0.1.0: + resolution: {integrity: sha512-CJHHvW3jQ6q7lzsXPpapLdMx5hDpSF3FSh45pwsj6bKxJJ8Nl8v43i5yXnr3BdfOimGHKyniewQtnAIp3vyJJw==} + inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} @@ -8347,6 +8521,9 @@ packages: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} + lezer-feel@1.8.1: + resolution: {integrity: sha512-g0eGi7/INNPtPbtcz5ubInc3rSvXuJI5NfmS1hVU1FkaKNdBpwWdxXzrUb4wxr8DNXhXnUs1/a9rO4HaDzII7Q==} + lilconfig@3.1.3: resolution: {integrity: sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==} engines: {node: '>=14'} @@ -8681,6 +8858,15 @@ packages: resolution: {integrity: sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==} engines: {node: '>=18'} + min-dash@4.2.3: + resolution: {integrity: sha512-VLMYQI5+FcD9Ad24VcB08uA83B07OhueAlZ88jBK6PyupTvEJwllTMUqMy0wPGYs7pZUEtEEMWdHB63m3LtEcg==} + + min-dom@4.2.1: + resolution: {integrity: sha512-TMoL8SEEIhUWYgkj7XMSgxmwSyGI+4fP2KFFGnN3FbHfbGHVdsLYSz8LoIsgPhz4dWRmLvxWWSMgzZMJW5sZuA==} + + min-dom@5.1.1: + resolution: {integrity: sha512-GaKUlguMAofd3OJsB0OkP17i5kucKqErgVCJxPawO9l5NwIPnr28SAr99zzlzMCWWljISBYrnZVWdE2Q92YGFQ==} + min-indent@1.0.1: resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} engines: {node: '>=4'} @@ -8791,6 +8977,12 @@ packages: mlly@1.7.4: resolution: {integrity: sha512-qmdSIPC4bDJXgZTCR7XosJiNKySV7O215tsPtDN9iEO/7q/76b/ijtgRu/+epFXSJhijtTCCGp3DWS549P3xKw==} + moddle-xml@10.1.0: + resolution: {integrity: sha512-erWckwLt+dYskewKXJso9u+aAZ5172lOiYxSOqKCPTy7L/xmqH1PoeoA7eVC7oJTt3PqF5TkZzUmbjGH6soQBg==} + + moddle@6.2.3: + resolution: {integrity: sha512-bLVN+ZHL3aKnhxc19XtjUfvdJsS3EsiEJC7bT6YPD11qYmTzvsxrGgyYz1Ouof7TZuGw0lDJ1OLmEnxcpQWk3Q==} + module-definition@6.0.1: resolution: {integrity: sha512-FeVc50FTfVVQnolk/WQT8MX+2WVcDnTGiq6Wo+/+lJ2ET1bRVi3HG3YlJUfqagNMc/kUlFSoR96AJkxGpKz13g==} engines: {node: '>=18'} @@ -8984,6 +9176,12 @@ packages: resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} engines: {node: '>= 0.4'} + object-refs@0.3.0: + resolution: {integrity: sha512-eP0ywuoWOaDoiake/6kTJlPJhs+k0qNm4nYRzXLNHj6vh+5M3i9R1epJTdxIPGlhWc4fNRQ7a6XJNCX+/L4FOQ==} + + object-refs@0.4.0: + resolution: {integrity: sha512-6kJqKWryKZmtte6QYvouas0/EIJKPI1/MMIuRsiBlNuhIMfqYTggzX2F1AJ2+cDs288xyi9GL7FyasHINR98BQ==} + object.assign@4.1.7: resolution: {integrity: sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==} engines: {node: '>= 0.4'} @@ -9178,6 +9376,13 @@ packages: resolution: {integrity: sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + path-intersection@2.2.1: + resolution: {integrity: sha512-9u8xvMcSfuOiStv9bPdnRJQhGQXLKurew94n4GPQCdH1nj9QKC9ObbNoIpiRq8skiOBxKkt277PgOoFgAt3/rA==} + + path-intersection@3.1.0: + resolution: {integrity: sha512-3xS3lvv/vuwm5aH2BVvNRvnvwR2Drde7jQClKpCXTYXIMMjcw/EnMhzCgeHwqbCpzi760PEfAkU53vSIlrNr9A==} + engines: {node: '>= 14.20'} + path-is-absolute@1.0.1: resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} engines: {node: '>=0.10.0'} @@ -9926,6 +10131,9 @@ packages: randombytes@2.1.0: resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} + randomcolor@0.6.2: + resolution: {integrity: sha512-Mn6TbyYpFgwFuQ8KJKqf3bqqY9O1y37/0jgSK/61PUxV4QfIMv0+K2ioq8DfOjkBslcjwSzRfIDEXfzA9aCx7A==} + range-parser@1.2.1: resolution: {integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==} engines: {node: '>= 0.6'} @@ -10230,6 +10438,9 @@ packages: sax@1.4.1: resolution: {integrity: sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==} + saxen@8.1.2: + resolution: {integrity: sha512-xUOiiFbc3Ow7p8KMxwsGICPx46ZQvy3+qfNVhrkwfz3Vvq45eGt98Ft5IQaA1R/7Tb5B5MKh9fUR9x3c3nDTxw==} + scroll-into-view-if-needed@2.2.31: resolution: {integrity: sha512-dGCXy99wZQivjmjIqihaBQNjryrz5rueJY7eHfTdyWEiR4ttYpsajb14rn9s5d4DY4EcY6+4+U/maARBXJedkA==} @@ -10496,6 +10707,10 @@ packages: resolution: {integrity: sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ==} engines: {node: '>=18'} + steady-xml@0.1.0: + resolution: {integrity: sha512-5sk17qO2wWRtonTNoBhoKAB35OSsGJOa3+NEa6D+1GS+de+ujDWxnflMkXBrviOfkNrPTUqduAdXhrMJs89nAw==} + engines: {node: '>=12.0.0'} + stop-iteration-iterator@1.1.0: resolution: {integrity: sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==} engines: {node: '>= 0.4'} @@ -10595,9 +10810,15 @@ packages: strip-literal@3.0.0: resolution: {integrity: sha512-TcccoMhJOM3OebGhSBEmp3UZ2SfDMZUEBdRA/9ynfLi8yYajyWX3JiXArcJt4Umh4vISpspkQIY8ZZoCqjbviA==} + strnum@1.1.2: + resolution: {integrity: sha512-vrN+B7DBIoTTZjnPNewwhx6cBA/H+IS7rfW68n7XxC1y7uoiGQBxaKzqucGUgavX15dJgiGztLJ8vxuEzwqBdA==} + stubborn-fs@1.2.5: resolution: {integrity: sha512-H2N9c26eXjzL/S/K+i/RHHcFanE74dptvvjM8iwzwbVcWY/zjBbgRqF3K0DY4+OD+uTTASTBvDoxPDaPN02D7g==} + style-mod@4.1.2: + resolution: {integrity: sha512-wnD1HyVqpJUI2+eKZ+eo1UwghftP6yuFheBqqe+bWCotBjC2K1YnteJILRMs3SM4V/0dLEW1SC27MWP5y+mwmw==} + style-search@0.1.0: resolution: {integrity: sha512-Dj1Okke1C3uKKwQcetra4jSuk0DqbzbYtXipzFlFMZtowbF1x7BKJwB9AayVMyFARvU8EDrZdcax4At/452cAg==} @@ -10823,6 +11044,9 @@ packages: tiny-emitter@2.1.0: resolution: {integrity: sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==} + tiny-svg@3.1.3: + resolution: {integrity: sha512-9mwnPqXInRsBmH/DO6NMxBE++9LsqpVXQSSTZGc5bomoKKvL5OX/Hlotw7XVXP6XLRcHWIzZpxfovGqWKgCypQ==} + tinybench@2.9.0: resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} @@ -11520,6 +11744,9 @@ packages: vxe-table@4.15.10: resolution: {integrity: sha512-1bTw5PEuwpNCFZdQ326JRw5sgldv96in77RGNQYYhTtsjXIOvmLx82QBThY5UR+r3ig8c2oGz7nsRtN1wBLRAg==} + w3c-keyname@2.2.8: + resolution: {integrity: sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==} + wangeditor@4.7.15: resolution: {integrity: sha512-aPTdREd8BxXVyJ5MI+LU83FQ7u1EPd341iXIorRNYSOvoimNoZ4nPg+yn3FGbB93/owEa6buLw8wdhYnMCJQLg==} @@ -11783,6 +12010,9 @@ packages: resolution: {integrity: sha512-rY2A2lSF7zC+l7HH9Mq+83D1dLlsPnEvy8jTouzaptDZM6geqZ3aJe/b7ULCwRURPtWV3vbDjA2DDMdoBol0HQ==} engines: {node: '>=18'} + zeebe-bpmn-moddle@1.11.0: + resolution: {integrity: sha512-v2PkIAjyZEnzuFHrm9ZhpbEGMgNjYZkUw+H17JxkA7Da+dcbPHbD7fWuBWSbPzNSCOyYYmrH+PL6wp9407ptMg==} + zimmerframe@1.1.2: resolution: {integrity: sha512-rAbqEGa8ovJy4pyBxZM70hg4pE6gDgaQ0Sl9M3enG3I0d6H4XSAM3GeNGLKnsBpuijUow064sf7ww1nutC5/3w==} @@ -12711,6 +12941,70 @@ snapshots: '@babel/helper-string-parser': 7.27.1 '@babel/helper-validator-identifier': 7.27.1 + '@bpmn-io/cm-theme@0.1.0-alpha.2': + dependencies: + '@codemirror/language': 6.11.3 + '@codemirror/view': 6.38.2 + '@lezer/highlight': 1.2.1 + + '@bpmn-io/diagram-js-ui@0.2.3': + dependencies: + htm: 3.1.1 + preact: 10.27.1 + + '@bpmn-io/extract-process-variables@0.8.0': + dependencies: + min-dash: 4.2.3 + + '@bpmn-io/feel-editor@1.12.0': + dependencies: + '@bpmn-io/feel-lint': 2.1.0 + '@bpmn-io/lang-feel': 2.4.0 + '@camunda/feel-builtins': 0.2.0 + '@codemirror/autocomplete': 6.18.7 + '@codemirror/commands': 6.8.1 + '@codemirror/language': 6.11.3 + '@codemirror/lint': 6.8.5 + '@codemirror/state': 6.5.2 + '@codemirror/view': 6.38.2 + '@lezer/highlight': 1.2.1 + min-dom: 4.2.1 + + '@bpmn-io/feel-lint@1.4.0': + dependencies: + '@codemirror/language': 6.11.3 + lezer-feel: 1.8.1 + + '@bpmn-io/feel-lint@2.1.0': + dependencies: + '@bpmn-io/lezer-feel': 1.9.0 + '@codemirror/language': 6.11.3 + + '@bpmn-io/lang-feel@2.4.0': + dependencies: + '@bpmn-io/lezer-feel': 1.9.0 + '@codemirror/autocomplete': 6.18.7 + '@codemirror/language': 6.11.3 + '@lezer/common': 1.2.3 + + '@bpmn-io/lezer-feel@1.9.0': + dependencies: + '@lezer/highlight': 1.2.1 + '@lezer/lr': 1.4.2 + min-dash: 4.2.3 + + '@bpmn-io/properties-panel@3.33.0': + dependencies: + '@bpmn-io/feel-editor': 1.12.0 + '@codemirror/view': 6.38.2 + classnames: 2.5.1 + feelers: 1.4.0 + focus-trap: 7.6.5 + min-dash: 4.2.3 + min-dom: 4.2.1 + + '@camunda/feel-builtins@0.2.0': {} + '@changesets/apply-release-plan@7.0.12': dependencies: '@changesets/config': 3.1.1 @@ -12885,6 +13179,46 @@ snapshots: dependencies: mime: 3.0.0 + '@codemirror/autocomplete@6.18.7': + dependencies: + '@codemirror/language': 6.11.3 + '@codemirror/state': 6.5.2 + '@codemirror/view': 6.38.2 + '@lezer/common': 1.2.3 + + '@codemirror/commands@6.8.1': + dependencies: + '@codemirror/language': 6.11.3 + '@codemirror/state': 6.5.2 + '@codemirror/view': 6.38.2 + '@lezer/common': 1.2.3 + + '@codemirror/language@6.11.3': + dependencies: + '@codemirror/state': 6.5.2 + '@codemirror/view': 6.38.2 + '@lezer/common': 1.2.3 + '@lezer/highlight': 1.2.1 + '@lezer/lr': 1.4.2 + style-mod: 4.1.2 + + '@codemirror/lint@6.8.5': + dependencies: + '@codemirror/state': 6.5.2 + '@codemirror/view': 6.38.2 + crelt: 1.0.6 + + '@codemirror/state@6.5.2': + dependencies: + '@marijn/find-cluster-break': 1.0.2 + + '@codemirror/view@6.38.2': + dependencies: + '@codemirror/state': 6.5.2 + crelt: 1.0.6 + style-mod: 4.1.2 + w3c-keyname: 2.2.8 + '@colors/colors@1.6.0': {} '@commitlint/cli@19.8.1(@types/node@24.3.0)(typescript@5.9.2)': @@ -14053,6 +14387,21 @@ snapshots: '@keyv/serialize@1.1.0': {} + '@lezer/common@1.2.3': {} + + '@lezer/highlight@1.2.1': + dependencies: + '@lezer/common': 1.2.3 + + '@lezer/lr@1.4.2': + dependencies: + '@lezer/common': 1.2.3 + + '@lezer/markdown@1.4.3': + dependencies: + '@lezer/common': 1.2.3 + '@lezer/highlight': 1.2.1 + '@manypkg/find-root@1.1.0': dependencies: '@babel/runtime': 7.28.3 @@ -14097,6 +14446,8 @@ snapshots: - encoding - supports-color + '@marijn/find-cluster-break@1.0.2': {} + '@microsoft/api-extractor-model@7.30.7(@types/node@24.3.0)': dependencies: '@microsoft/tsdoc': 0.15.1 @@ -15876,6 +16227,8 @@ snapshots: array-ify@1.0.0: {} + array-move@4.0.0: {} + array-timsort@1.0.3: {} array-tree-filter@2.1.0: {} @@ -16015,6 +16368,42 @@ snapshots: widest-line: 5.0.0 wrap-ansi: 9.0.0 + bpmn-js-properties-panel@5.23.0(@bpmn-io/properties-panel@3.33.0)(bpmn-js@17.11.1)(camunda-bpmn-js-behaviors@1.11.1(bpmn-js@17.11.1)(camunda-bpmn-moddle@7.0.1)(zeebe-bpmn-moddle@1.11.0))(diagram-js@12.8.1): + dependencies: + '@bpmn-io/extract-process-variables': 0.8.0 + '@bpmn-io/properties-panel': 3.33.0 + array-move: 4.0.0 + bpmn-js: 17.11.1 + camunda-bpmn-js-behaviors: 1.11.1(bpmn-js@17.11.1)(camunda-bpmn-moddle@7.0.1)(zeebe-bpmn-moddle@1.11.0) + diagram-js: 12.8.1 + ids: 1.0.5 + min-dash: 4.2.3 + min-dom: 4.2.1 + + bpmn-js-token-simulation@0.36.3: + dependencies: + inherits-browser: 0.1.0 + min-dash: 4.2.3 + min-dom: 4.2.1 + randomcolor: 0.6.2 + + bpmn-js@17.11.1: + dependencies: + bpmn-moddle: 8.1.0 + diagram-js: 14.11.3 + diagram-js-direct-editing: 3.2.0(diagram-js@14.11.3) + ids: 1.0.5 + inherits-browser: 0.1.0 + min-dash: 4.2.3 + min-dom: 4.2.1 + tiny-svg: 3.1.3 + + bpmn-moddle@8.1.0: + dependencies: + min-dash: 4.2.3 + moddle: 6.2.3 + moddle-xml: 10.1.0 + brace-expansion@1.1.12: dependencies: balanced-match: 1.0.2 @@ -16137,6 +16526,16 @@ snapshots: camelcase@8.0.0: {} + camunda-bpmn-js-behaviors@1.11.1(bpmn-js@17.11.1)(camunda-bpmn-moddle@7.0.1)(zeebe-bpmn-moddle@1.11.0): + dependencies: + bpmn-js: 17.11.1 + camunda-bpmn-moddle: 7.0.1 + ids: 1.0.5 + min-dash: 4.2.3 + zeebe-bpmn-moddle: 1.11.0 + + camunda-bpmn-moddle@7.0.1: {} + caniuse-api@3.0.0: dependencies: browserslist: 4.25.3 @@ -16254,6 +16653,8 @@ snapshots: dependencies: clsx: 2.1.1 + classnames@2.5.1: {} + clean-css@5.3.3: dependencies: source-map: 0.6.1 @@ -16400,6 +16801,8 @@ snapshots: compatx@0.2.0: {} + component-event@0.2.1: {} + compress-commons@6.0.2: dependencies: crc-32: 1.2.2 @@ -16511,6 +16914,8 @@ snapshots: crc-32: 1.2.2 readable-stream: 4.7.0 + crelt@1.0.6: {} + cron-parser@4.9.0: dependencies: luxon: 3.7.1 @@ -17096,6 +17501,41 @@ snapshots: dependencies: dequal: 2.0.3 + diagram-js-direct-editing@3.2.0(diagram-js@14.11.3): + dependencies: + diagram-js: 14.11.3 + min-dash: 4.2.3 + min-dom: 4.2.1 + + diagram-js@12.8.1: + dependencies: + '@bpmn-io/diagram-js-ui': 0.2.3 + clsx: 2.1.1 + didi: 9.0.2 + hammerjs: 2.0.8 + inherits-browser: 0.1.0 + min-dash: 4.2.3 + min-dom: 4.2.1 + object-refs: 0.3.0 + path-intersection: 2.2.1 + tiny-svg: 3.1.3 + + diagram-js@14.11.3: + dependencies: + '@bpmn-io/diagram-js-ui': 0.2.3 + clsx: 2.1.1 + didi: 10.2.2 + inherits-browser: 0.1.0 + min-dash: 4.2.3 + min-dom: 4.2.1 + object-refs: 0.4.0 + path-intersection: 3.1.0 + tiny-svg: 3.1.3 + + didi@10.2.2: {} + + didi@9.0.2: {} + didyoumean@1.2.2: {} dijkstrajs@1.0.3: {} @@ -17134,6 +17574,10 @@ snapshots: dependencies: domelementtype: 2.3.0 + domify@1.4.2: {} + + domify@2.0.0: {} + dompurify@3.2.6: optionalDependencies: '@types/trusted-types': 2.0.7 @@ -17798,6 +18242,10 @@ snapshots: fast-uri@3.0.6: {} + fast-xml-parser@4.5.3: + dependencies: + strnum: 1.1.2 + fastest-levenshtein@1.0.16: {} fastq@1.19.1: @@ -17814,6 +18262,30 @@ snapshots: fecha@4.2.3: {} + feelers@1.4.0: + dependencies: + '@bpmn-io/cm-theme': 0.1.0-alpha.2 + '@bpmn-io/feel-lint': 1.4.0 + '@codemirror/autocomplete': 6.18.7 + '@codemirror/commands': 6.8.1 + '@codemirror/language': 6.11.3 + '@codemirror/lint': 6.8.5 + '@codemirror/state': 6.5.2 + '@codemirror/view': 6.38.2 + '@lezer/common': 1.2.3 + '@lezer/highlight': 1.2.1 + '@lezer/lr': 1.4.2 + '@lezer/markdown': 1.4.3 + feelin: 3.2.0 + lezer-feel: 1.8.1 + min-dom: 5.1.1 + + feelin@3.2.0: + dependencies: + '@lezer/lr': 1.4.2 + lezer-feel: 1.8.1 + luxon: 3.7.1 + fetch-blob@3.2.0: dependencies: node-domexception: 1.0.0 @@ -18203,6 +18675,8 @@ snapshots: ufo: 1.6.1 uncrypto: 0.1.3 + hammerjs@2.0.8: {} + happy-dom@17.6.3: dependencies: webidl-conversions: 7.0.0 @@ -18268,6 +18742,8 @@ snapshots: dependencies: lru-cache: 10.4.3 + htm@3.1.1: {} + html-minifier-terser@6.1.0: dependencies: camel-case: 4.1.2 @@ -18358,6 +18834,8 @@ snapshots: idb@7.1.1: {} + ids@1.0.5: {} + ieee754@1.2.1: {} ignore@5.3.2: {} @@ -18393,6 +18871,8 @@ snapshots: once: 1.4.0 wrappy: 1.0.2 + inherits-browser@0.1.0: {} + inherits@2.0.4: {} ini@1.3.8: {} @@ -18887,6 +19367,12 @@ snapshots: prelude-ls: 1.2.1 type-check: 0.4.0 + lezer-feel@1.8.1: + dependencies: + '@lezer/highlight': 1.2.1 + '@lezer/lr': 1.4.2 + min-dash: 4.2.3 + lilconfig@3.1.3: {} lines-and-columns@1.2.4: {} @@ -19238,6 +19724,19 @@ snapshots: mimic-function@5.0.1: {} + min-dash@4.2.3: {} + + min-dom@4.2.1: + dependencies: + component-event: 0.2.1 + domify: 1.4.2 + min-dash: 4.2.3 + + min-dom@5.1.1: + dependencies: + domify: 2.0.0 + min-dash: 4.2.3 + min-indent@1.0.1: {} minimatch@10.0.3: @@ -19343,6 +19842,16 @@ snapshots: pkg-types: 1.3.1 ufo: 1.6.1 + moddle-xml@10.1.0: + dependencies: + min-dash: 4.2.3 + moddle: 6.2.3 + saxen: 8.1.2 + + moddle@6.2.3: + dependencies: + min-dash: 4.2.3 + module-definition@6.0.1: dependencies: ast-module-types: 6.0.1 @@ -19619,6 +20128,10 @@ snapshots: object-keys@1.1.1: {} + object-refs@0.3.0: {} + + object-refs@0.4.0: {} + object.assign@4.1.7: dependencies: call-bind: 1.0.8 @@ -19835,6 +20348,10 @@ snapshots: path-exists@5.0.0: {} + path-intersection@2.2.1: {} + + path-intersection@3.1.0: {} + path-is-absolute@1.0.1: {} path-key@3.1.1: {} @@ -20529,6 +21046,8 @@ snapshots: dependencies: safe-buffer: 5.2.1 + randomcolor@0.6.2: {} + range-parser@1.2.1: {} rc9@2.1.2: @@ -20862,6 +21381,8 @@ snapshots: sax@1.4.1: {} + saxen@8.1.2: {} + scroll-into-view-if-needed@2.2.31: dependencies: compute-scroll-into-view: 1.0.20 @@ -21144,6 +21665,8 @@ snapshots: stdin-discarder@0.2.2: {} + steady-xml@0.1.0: {} + stop-iteration-iterator@1.1.0: dependencies: es-errors: 1.3.0 @@ -21266,8 +21789,12 @@ snapshots: dependencies: js-tokens: 9.0.1 + strnum@1.1.2: {} + stubborn-fs@1.2.5: {} + style-mod@4.1.2: {} + style-search@0.1.0: {} style-value-types@5.1.2: @@ -21578,6 +22105,8 @@ snapshots: tiny-emitter@2.1.0: {} + tiny-svg@3.1.3: {} + tinybench@2.9.0: {} tinyexec@0.3.2: {} @@ -22480,6 +23009,8 @@ snapshots: transitivePeerDependencies: - vue + w3c-keyname@2.2.8: {} + wangeditor@4.7.15: dependencies: '@babel/runtime': 7.28.3 @@ -22850,6 +23381,8 @@ snapshots: cookie: 1.0.2 youch-core: 0.3.3 + zeebe-bpmn-moddle@1.11.0: {} + zimmerframe@1.1.2: {} zip-stream@6.0.1: -- Gitee From 3036a174fc5a19159fbba29d9eecb654b26e63fa Mon Sep 17 00:00:00 2001 From: puhui999 Date: Sun, 7 Sep 2025 19:25:34 +0800 Subject: [PATCH 02/12] =?UTF-8?q?refactor:=20=E9=87=8D=E6=9E=84=20bpmnProc?= =?UTF-8?q?essDesigner=20designer=20=E6=A8=A1=E5=9D=97=20ele=20=3D>=20antd?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/package.json | 1 + .../package/designer/ProcessDesigner.vue | 527 +++++++++--------- .../package/designer/ProcessViewer.vue | 363 ++++++------ .../package/designer/index.ts | 2 +- .../package/designer/index2.ts | 2 +- .../package/designer/plugins/defaultEmpty.js | 2 +- apps/web-antd/tsconfig.json | 1 + packages/icons/src/iconify/index.ts | 31 ++ pnpm-lock.yaml | 3 + 9 files changed, 467 insertions(+), 465 deletions(-) diff --git a/apps/web-antd/package.json b/apps/web-antd/package.json index 71cb71be3..f4d5b4092 100644 --- a/apps/web-antd/package.json +++ b/apps/web-antd/package.json @@ -55,6 +55,7 @@ "diagram-js": "^12.8.1", "fast-xml-parser": "^4.5.3", "highlight.js": "catalog:", + "min-dash": "^4.2.3", "pinia": "catalog:", "steady-xml": "^0.1.0", "tinymce": "catalog:", diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue b/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue index 234555c24..5f247959f 100644 --- a/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue @@ -1,267 +1,70 @@ - - + + diff --git a/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/ProcessViewer.vue b/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/ProcessViewer.vue index 77f335396..370f295bb 100644 --- a/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/ProcessViewer.vue +++ b/apps/web-antd/src/components/bpmnProcessDesigner/package/designer/ProcessViewer.vue @@ -1,184 +1,18 @@ -