From daeb6fe9eb260ad14ab2dea76bf01e420a64af32 Mon Sep 17 00:00:00 2001 From: ycy <2861518472@qq.com> Date: Sun, 26 May 2024 19:01:50 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=89=20init:=20=E6=9B=B4=E6=94=B9?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E9=85=8D=E7=BD=AE=E4=BB=A5=E5=8F=8A=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E9=9D=99=E6=80=81=E8=B7=AF=E7=94=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/notify/message/index.ts | 49 - src/api/system/notify/template/index.ts | 49 - src/components/DictTag/src/DictTag.vue | 2 +- .../package/designer/ProcessDesigner.vue | 704 ---------- .../package/designer/ProcessViewer.vue | 664 --------- .../package/designer/index.ts | 8 - .../package/designer/index2.ts | 8 - .../plugins/content-pad/contentPadProvider.js | 423 ------ .../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 | 1217 ----------------- .../activiti/activitiExtension.js | 83 -- .../extension-moddle/activiti/index.js | 11 - .../extension-moddle/camunda/extension.js | 151 -- .../plugins/extension-moddle/camunda/index.js | 8 - .../flowable/flowableExtension.js | 83 -- .../extension-moddle/flowable/index.js | 10 - .../designer/plugins/palette/CustomPalette.js | 221 --- .../package/designer/plugins/palette/index.js | 22 - .../plugins/palette/paletteProvider.js | 213 --- .../plugins/translate/customTranslate.js | 44 - .../package/designer/plugins/translate/zh.js | 240 ---- .../bpmnProcessDesigner/package/index.ts | 11 - .../package/palette/ProcessPalette.vue | 45 - .../package/penal/PropertiesPanel.vue | 206 --- .../package/penal/base/ElementBaseInfo.vue | 180 --- .../penal/flow-condition/FlowCondition.vue | 191 --- .../package/penal/form/ElementForm.vue | 478 ------- .../package/penal/index.js | 7 - .../penal/listeners/ElementListeners.vue | 448 ------ .../penal/listeners/ProcessListenerDialog.vue | 83 -- .../penal/listeners/UserTaskListeners.vue | 491 ------- .../package/penal/listeners/template.js | 178 --- .../package/penal/listeners/utilSelf.ts | 89 -- .../multi-instance/ElementMultiInstance.vue | 280 ---- .../penal/other/ElementOtherConfig.vue | 55 - .../penal/properties/ElementProperties.vue | 169 --- .../penal/signal-message/SignalAndMessage.vue | 113 -- .../package/penal/task/ElementTask.vue | 87 -- .../ProcessExpressionDialog.vue | 68 - .../task/task-components/ReceiveTask.vue | 125 -- .../penal/task/task-components/ScriptTask.vue | 99 -- .../penal/task/task-components/UserTask.vue | 232 ---- .../package/theme/element-variables.scss | 70 - .../package/theme/index.scss | 2 - .../package/theme/process-designer.scss | 161 --- .../package/theme/process-panel.scss | 107 -- .../bpmnProcessDesigner/package/utils.ts | 78 -- .../src/highlight/index.js | 5 - .../modules/custom-renderer/CustomRenderer.js | 14 - .../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 - src/layout/components/Message/index.ts | 3 - src/layout/components/Message/src/Message.vue | 126 -- src/layout/components/ToolHeader.vue | 6 - src/router/modules/remaining.ts | 407 +----- .../notify/message/NotifyMessageDetail.vue | 66 - src/views/system/notify/message/index.vue | 212 --- .../notify/my/MyNotifyMessageDetail.vue | 48 - src/views/system/notify/my/index.vue | 218 --- .../notify/template/NotifyTemplateForm.vue | 141 -- .../template/NotifyTemplateSendForm.vue | 146 -- src/views/system/notify/template/index.vue | 235 ---- src/views/textpage/position/DeptForm.vue | 18 +- src/views/textpage/position/index.vue | 10 +- 72 files changed, 19 insertions(+), 12105 deletions(-) delete mode 100644 src/api/system/notify/message/index.ts delete mode 100644 src/api/system/notify/template/index.ts delete mode 100644 src/components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue delete mode 100644 src/components/bpmnProcessDesigner/package/designer/ProcessViewer.vue delete mode 100644 src/components/bpmnProcessDesigner/package/designer/index.ts delete mode 100644 src/components/bpmnProcessDesigner/package/designer/index2.ts delete mode 100644 src/components/bpmnProcessDesigner/package/designer/plugins/content-pad/contentPadProvider.js delete mode 100644 src/components/bpmnProcessDesigner/package/designer/plugins/content-pad/index.js delete mode 100644 src/components/bpmnProcessDesigner/package/designer/plugins/defaultEmpty.js delete mode 100644 src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/activitiDescriptor.json delete mode 100644 src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/camundaDescriptor.json delete mode 100644 src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/flowableDescriptor.json delete mode 100644 src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/activiti/activitiExtension.js delete mode 100644 src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/activiti/index.js delete mode 100644 src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/camunda/extension.js delete mode 100644 src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/camunda/index.js delete mode 100644 src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/flowable/flowableExtension.js delete mode 100644 src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/flowable/index.js delete mode 100644 src/components/bpmnProcessDesigner/package/designer/plugins/palette/CustomPalette.js delete mode 100644 src/components/bpmnProcessDesigner/package/designer/plugins/palette/index.js delete mode 100644 src/components/bpmnProcessDesigner/package/designer/plugins/palette/paletteProvider.js delete mode 100644 src/components/bpmnProcessDesigner/package/designer/plugins/translate/customTranslate.js delete mode 100644 src/components/bpmnProcessDesigner/package/designer/plugins/translate/zh.js delete mode 100644 src/components/bpmnProcessDesigner/package/index.ts delete mode 100644 src/components/bpmnProcessDesigner/package/palette/ProcessPalette.vue delete mode 100644 src/components/bpmnProcessDesigner/package/penal/PropertiesPanel.vue delete mode 100644 src/components/bpmnProcessDesigner/package/penal/base/ElementBaseInfo.vue delete mode 100644 src/components/bpmnProcessDesigner/package/penal/flow-condition/FlowCondition.vue delete mode 100644 src/components/bpmnProcessDesigner/package/penal/form/ElementForm.vue delete mode 100644 src/components/bpmnProcessDesigner/package/penal/index.js delete mode 100644 src/components/bpmnProcessDesigner/package/penal/listeners/ElementListeners.vue delete mode 100644 src/components/bpmnProcessDesigner/package/penal/listeners/ProcessListenerDialog.vue delete mode 100644 src/components/bpmnProcessDesigner/package/penal/listeners/UserTaskListeners.vue delete mode 100644 src/components/bpmnProcessDesigner/package/penal/listeners/template.js delete mode 100644 src/components/bpmnProcessDesigner/package/penal/listeners/utilSelf.ts delete mode 100644 src/components/bpmnProcessDesigner/package/penal/multi-instance/ElementMultiInstance.vue delete mode 100644 src/components/bpmnProcessDesigner/package/penal/other/ElementOtherConfig.vue delete mode 100644 src/components/bpmnProcessDesigner/package/penal/properties/ElementProperties.vue delete mode 100644 src/components/bpmnProcessDesigner/package/penal/signal-message/SignalAndMessage.vue delete mode 100644 src/components/bpmnProcessDesigner/package/penal/task/ElementTask.vue delete mode 100644 src/components/bpmnProcessDesigner/package/penal/task/task-components/ProcessExpressionDialog.vue delete mode 100644 src/components/bpmnProcessDesigner/package/penal/task/task-components/ReceiveTask.vue delete mode 100644 src/components/bpmnProcessDesigner/package/penal/task/task-components/ScriptTask.vue delete mode 100644 src/components/bpmnProcessDesigner/package/penal/task/task-components/UserTask.vue delete mode 100644 src/components/bpmnProcessDesigner/package/theme/element-variables.scss delete mode 100644 src/components/bpmnProcessDesigner/package/theme/index.scss delete mode 100644 src/components/bpmnProcessDesigner/package/theme/process-designer.scss delete mode 100644 src/components/bpmnProcessDesigner/package/theme/process-panel.scss delete mode 100644 src/components/bpmnProcessDesigner/package/utils.ts delete mode 100644 src/components/bpmnProcessDesigner/src/highlight/index.js delete mode 100644 src/components/bpmnProcessDesigner/src/modules/custom-renderer/CustomRenderer.js delete mode 100644 src/components/bpmnProcessDesigner/src/modules/custom-renderer/index.js delete mode 100644 src/components/bpmnProcessDesigner/src/modules/rules/CustomRules.js delete mode 100644 src/components/bpmnProcessDesigner/src/modules/rules/index.js delete mode 100644 src/components/bpmnProcessDesigner/src/translations.ts delete mode 100644 src/components/bpmnProcessDesigner/src/utils/directive/clickOutSide.js delete mode 100644 src/components/bpmnProcessDesigner/src/utils/index.js delete mode 100644 src/components/bpmnProcessDesigner/src/utils/xml2json.js delete mode 100644 src/layout/components/Message/index.ts delete mode 100644 src/layout/components/Message/src/Message.vue delete mode 100644 src/views/system/notify/message/NotifyMessageDetail.vue delete mode 100644 src/views/system/notify/message/index.vue delete mode 100644 src/views/system/notify/my/MyNotifyMessageDetail.vue delete mode 100644 src/views/system/notify/my/index.vue delete mode 100644 src/views/system/notify/template/NotifyTemplateForm.vue delete mode 100644 src/views/system/notify/template/NotifyTemplateSendForm.vue delete mode 100644 src/views/system/notify/template/index.vue diff --git a/src/api/system/notify/message/index.ts b/src/api/system/notify/message/index.ts deleted file mode 100644 index e407c77..0000000 --- a/src/api/system/notify/message/index.ts +++ /dev/null @@ -1,49 +0,0 @@ -import request from '@/config/axios' -import qs from 'qs' - -export interface NotifyMessageVO { - id: number - userId: number - userType: number - templateId: number - templateCode: string - templateNickname: string - templateContent: string - templateType: number - templateParams: string - readStatus: boolean - readTime: Date - createTime: Date -} - -// 查询站内信消息列表 -export const getNotifyMessagePage = async (params: PageParam) => { - return await request.get({ url: '/system/notify-message/page', params }) -} - -// 获得我的站内信分页 -export const getMyNotifyMessagePage = async (params: PageParam) => { - return await request.get({ url: '/system/notify-message/my-page', params }) -} - -// 批量标记已读 -export const updateNotifyMessageRead = async (ids) => { - return await request.put({ - url: '/system/notify-message/update-read?' + qs.stringify({ ids: ids }, { indices: false }) - }) -} - -// 标记所有站内信为已读 -export const updateAllNotifyMessageRead = async () => { - return await request.put({ url: '/system/notify-message/update-all-read' }) -} - -// 获取当前用户的最新站内信列表 -export const getUnreadNotifyMessageList = async () => { - return await request.get({ url: '/system/notify-message/get-unread-list' }) -} - -// 获得当前用户的未读站内信数量 -export const getUnreadNotifyMessageCount = async () => { - return await request.get({ url: '/system/notify-message/get-unread-count' }) -} diff --git a/src/api/system/notify/template/index.ts b/src/api/system/notify/template/index.ts deleted file mode 100644 index 44355df..0000000 --- a/src/api/system/notify/template/index.ts +++ /dev/null @@ -1,49 +0,0 @@ -import request from '@/config/axios' - -export interface NotifyTemplateVO { - id?: number - name: string - nickname: string - code: string - content: string - type?: number - params: string - status: number - remark: string -} - -export interface NotifySendReqVO { - userId: number | null - templateCode: string - templateParams: Map -} - -// 查询站内信模板列表 -export const getNotifyTemplatePage = async (params: PageParam) => { - return await request.get({ url: '/system/notify-template/page', params }) -} - -// 查询站内信模板详情 -export const getNotifyTemplate = async (id: number) => { - return await request.get({ url: '/system/notify-template/get?id=' + id }) -} - -// 新增站内信模板 -export const createNotifyTemplate = async (data: NotifyTemplateVO) => { - return await request.post({ url: '/system/notify-template/create', data }) -} - -// 修改站内信模板 -export const updateNotifyTemplate = async (data: NotifyTemplateVO) => { - return await request.put({ url: '/system/notify-template/update', data }) -} - -// 删除站内信模板 -export const deleteNotifyTemplate = async (id: number) => { - return await request.delete({ url: '/system/notify-template/delete?id=' + id }) -} - -// 发送站内信 -export const sendNotify = (data: NotifySendReqVO) => { - return request.post({ url: '/system/notify-template/send-notify', data }) -} diff --git a/src/components/DictTag/src/DictTag.vue b/src/components/DictTag/src/DictTag.vue index db37f71..fbd53b2 100644 --- a/src/components/DictTag/src/DictTag.vue +++ b/src/components/DictTag/src/DictTag.vue @@ -23,7 +23,7 @@ export default defineComponent({ dictOptions.forEach((dict: DictDataType) => { if (dict.value === value) { if (dict.colorType + '' === 'primary' || dict.colorType + '' === 'default') { - dict.colorType = '' + // dict.colorType = '' } dictData.value = dict } diff --git a/src/components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue b/src/components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue deleted file mode 100644 index 6cbe11f..0000000 --- a/src/components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue +++ /dev/null @@ -1,704 +0,0 @@ - - - diff --git a/src/components/bpmnProcessDesigner/package/designer/ProcessViewer.vue b/src/components/bpmnProcessDesigner/package/designer/ProcessViewer.vue deleted file mode 100644 index 485b979..0000000 --- a/src/components/bpmnProcessDesigner/package/designer/ProcessViewer.vue +++ /dev/null @@ -1,664 +0,0 @@ - - - - - diff --git a/src/components/bpmnProcessDesigner/package/designer/index.ts b/src/components/bpmnProcessDesigner/package/designer/index.ts deleted file mode 100644 index 8522846..0000000 --- a/src/components/bpmnProcessDesigner/package/designer/index.ts +++ /dev/null @@ -1,8 +0,0 @@ -import MyProcessDesigner from './ProcessDesigner.vue' - -MyProcessDesigner.install = function (Vue) { - Vue.component(MyProcessDesigner.name, MyProcessDesigner) -} - -// 流程图的设计器,可编辑 -export default MyProcessDesigner diff --git a/src/components/bpmnProcessDesigner/package/designer/index2.ts b/src/components/bpmnProcessDesigner/package/designer/index2.ts deleted file mode 100644 index ebe8ca7..0000000 --- a/src/components/bpmnProcessDesigner/package/designer/index2.ts +++ /dev/null @@ -1,8 +0,0 @@ -import MyProcessViewer from './ProcessViewer.vue' - -MyProcessViewer.install = function (Vue) { - Vue.component(MyProcessViewer.name, MyProcessViewer) -} - -// 流程图的查看器,不可编辑 -export default MyProcessViewer diff --git a/src/components/bpmnProcessDesigner/package/designer/plugins/content-pad/contentPadProvider.js b/src/components/bpmnProcessDesigner/package/designer/plugins/content-pad/contentPadProvider.js deleted file mode 100644 index 8783493..0000000 --- a/src/components/bpmnProcessDesigner/package/designer/plugins/content-pad/contentPadProvider.js +++ /dev/null @@ -1,423 +0,0 @@ -import { assign, forEach, isArray } from 'min-dash' - -import { is } from 'bpmn-js/lib/util/ModelUtil' - -import { isExpanded, isEventSubProcess } from 'bpmn-js/lib/util/DiUtil' - -import { isAny } from 'bpmn-js/lib/features/modeling/util/ModelingUtil' - -import { getChildLanes } from 'bpmn-js/lib/features/modeling/util/LaneUtil' - -import { hasPrimaryModifier } from 'diagram-js/lib/util/Mouse' - -/** - * 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, function (event) { - const context = event.context, - 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 contextPad = this._contextPad, - modeling = this._modeling, - elementFactory = this._elementFactory, - connect = this._connect, - create = this._create, - popupMenu = this._popupMenu, - canvas = this._canvas, - rules = this._rules, - autoPlace = this._autoPlace, - 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(), - pad = contextPad.getPad(element).html - - const diagramRect = diagramContainer.getBoundingClientRect(), - 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: type }, options)) - create.start(event, shape, { - source: element - }) - } - - const append = autoPlace - ? function (event, element) { - const shape = elementFactory.createShape(assign({ type: type }, options)) - - autoPlace.append(element, shape) - } - : appendStart - - return { - group: 'model', - className: className, - title: 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: function (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: function (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: function (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, function (def) { - if (def.$type === definition) { - isDefinition = true - } - }) - - return isType && isDefinition -} diff --git a/src/components/bpmnProcessDesigner/package/designer/plugins/content-pad/index.js b/src/components/bpmnProcessDesigner/package/designer/plugins/content-pad/index.js deleted file mode 100644 index 80009ef..0000000 --- a/src/components/bpmnProcessDesigner/package/designer/plugins/content-pad/index.js +++ /dev/null @@ -1,6 +0,0 @@ -import CustomContextPadProvider from './contentPadProvider' - -export default { - __init__: ['contextPadProvider'], - contextPadProvider: ['type', CustomContextPadProvider] -} diff --git a/src/components/bpmnProcessDesigner/package/designer/plugins/defaultEmpty.js b/src/components/bpmnProcessDesigner/package/designer/plugins/defaultEmpty.js deleted file mode 100644 index f3bc894..0000000 --- a/src/components/bpmnProcessDesigner/package/designer/plugins/defaultEmpty.js +++ /dev/null @@ -1,24 +0,0 @@ -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/src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/activitiDescriptor.json b/src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/activitiDescriptor.json deleted file mode 100644 index 94ba8f6..0000000 --- a/src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/activitiDescriptor.json +++ /dev/null @@ -1,1004 +0,0 @@ -{ - "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/src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/camundaDescriptor.json b/src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/camundaDescriptor.json deleted file mode 100644 index 8322561..0000000 --- a/src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/camundaDescriptor.json +++ /dev/null @@ -1,1020 +0,0 @@ -{ - "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/src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/flowableDescriptor.json b/src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/flowableDescriptor.json deleted file mode 100644 index 4ea632a..0000000 --- a/src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/flowableDescriptor.json +++ /dev/null @@ -1,1217 +0,0 @@ -{ - "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": "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": "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 - } - ] - } - ], - "emumerations": [] -} diff --git a/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/activiti/activitiExtension.js b/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/activiti/activitiExtension.js deleted file mode 100644 index 56ef38a..0000000 --- a/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/activiti/activitiExtension.js +++ /dev/null @@ -1,83 +0,0 @@ -'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, function (element) { - return is(element, type) - }) - ) -} - -function anyType(element, types) { - return some(types, function (type) { - return is(element, type) - }) -} - -function isAllowed(propName, propDescriptor, newElement) { - const name = propDescriptor.name, - 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, - 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/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/activiti/index.js b/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/activiti/index.js deleted file mode 100644 index c22ca34..0000000 --- a/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/activiti/index.js +++ /dev/null @@ -1,11 +0,0 @@ -/* - * @author igdianov - * address https://github.com/igdianov/activiti-bpmn-moddle - * */ - -import activitiExtension from './activitiExtension' - -export default { - __init__: ['ActivitiModdleExtension'], - ActivitiModdleExtension: ['type', activitiExtension] -} diff --git a/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/camunda/extension.js b/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/camunda/extension.js deleted file mode 100644 index b8c37a5..0000000 --- a/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/camunda/extension.js +++ /dev/null @@ -1,151 +0,0 @@ -'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', function (context) { - const property = context.property, - parent = context.parent - - 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, function (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, function (type) { - return getParent(parent, type) - }) -} - -function isWildcard(allowedIn) { - return allowedIn.indexOf(WILDCARD) !== -1 -} diff --git a/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/camunda/index.js b/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/camunda/index.js deleted file mode 100644 index 1da1bc7..0000000 --- a/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/camunda/index.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict' - -import extension from './extension' - -export default { - __init__: ['camundaModdleExtension'], - camundaModdleExtension: ['type', extension] -} diff --git a/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/flowable/flowableExtension.js b/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/flowable/flowableExtension.js deleted file mode 100644 index 3dcea67..0000000 --- a/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/flowable/flowableExtension.js +++ /dev/null @@ -1,83 +0,0 @@ -'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, function (element) { - return is(element, type) - }) - ) -} - -function anyType(element, types) { - return some(types, function (type) { - return is(element, type) - }) -} - -function isAllowed(propName, propDescriptor, newElement) { - const name = propDescriptor.name, - 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, - 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/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/flowable/index.js b/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/flowable/index.js deleted file mode 100644 index 6d59b67..0000000 --- a/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/flowable/index.js +++ /dev/null @@ -1,10 +0,0 @@ -/* - * @author igdianov - * address https://github.com/igdianov/activiti-bpmn-moddle - * */ -import flowableExtension from './flowableExtension' - -export default { - __init__: ['FlowableModdleExtension'], - FlowableModdleExtension: ['type', flowableExtension] -} diff --git a/src/components/bpmnProcessDesigner/package/designer/plugins/palette/CustomPalette.js b/src/components/bpmnProcessDesigner/package/designer/plugins/palette/CustomPalette.js deleted file mode 100644 index 5e2803b..0000000 --- a/src/components/bpmnProcessDesigner/package/designer/plugins/palette/CustomPalette.js +++ /dev/null @@ -1,221 +0,0 @@ -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 = {}, - create = this._create, - elementFactory = this._elementFactory, - spaceTool = this._spaceTool, - lassoTool = this._lassoTool, - handTool = this._handTool, - globalConnect = this._globalConnect, - translate = this._translate - - function createAction(type, group, className, title, options) { - function createListener(event) { - const shape = elementFactory.createShape(assign({ type: type }, options)) - - if (options) { - shape.businessObject.di.isExpanded = options.isExpanded - } - - create.start(event, shape) - } - - const shortType = type.replace(/^bpmn:/, '') - - return { - group: group, - className: 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: function (event) { - handTool.activateHand(event) - } - } - }, - 'lasso-tool': { - group: 'tools', - className: 'bpmn-icon-lasso-tool', - title: translate('Activate the lasso tool'), - action: { - click: function (event) { - lassoTool.activateSelection(event) - } - } - }, - 'space-tool': { - group: 'tools', - className: 'bpmn-icon-space-tool', - title: translate('Activate the create/remove space tool'), - action: { - click: function (event) { - spaceTool.activateSelection(event) - } - } - }, - 'global-connect-tool': { - group: 'tools', - className: 'bpmn-icon-connection-multi', - title: translate('Activate the global connect tool'), - action: { - click: function (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.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/src/components/bpmnProcessDesigner/package/designer/plugins/palette/index.js b/src/components/bpmnProcessDesigner/package/designer/plugins/palette/index.js deleted file mode 100644 index 8e4f3ac..0000000 --- a/src/components/bpmnProcessDesigner/package/designer/plugins/palette/index.js +++ /dev/null @@ -1,22 +0,0 @@ -// 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/src/components/bpmnProcessDesigner/package/designer/plugins/palette/paletteProvider.js b/src/components/bpmnProcessDesigner/package/designer/plugins/palette/paletteProvider.js deleted file mode 100644 index 7098981..0000000 --- a/src/components/bpmnProcessDesigner/package/designer/plugins/palette/paletteProvider.js +++ /dev/null @@ -1,213 +0,0 @@ -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 = {}, - create = this._create, - elementFactory = this._elementFactory, - spaceTool = this._spaceTool, - lassoTool = this._lassoTool, - handTool = this._handTool, - globalConnect = this._globalConnect, - translate = this._translate - - function createAction(type, group, className, title, options) { - function createListener(event) { - const shape = elementFactory.createShape(assign({ type: type }, options)) - - if (options) { - shape.businessObject.di.isExpanded = options.isExpanded - } - - create.start(event, shape) - } - - const shortType = type.replace(/^bpmn:/, '') - - return { - group: group, - className: 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: function (event) { - handTool.activateHand(event) - } - } - }, - 'lasso-tool': { - group: 'tools', - className: 'bpmn-icon-lasso-tool', - title: translate('Activate the lasso tool'), - action: { - click: function (event) { - lassoTool.activateSelection(event) - } - } - }, - 'space-tool': { - group: 'tools', - className: 'bpmn-icon-space-tool', - title: translate('Activate the create/remove space tool'), - action: { - click: function (event) { - spaceTool.activateSelection(event) - } - } - }, - 'global-connect-tool': { - group: 'tools', - className: 'bpmn-icon-connection-multi', - title: translate('Activate the global connect tool'), - action: { - click: function (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.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/src/components/bpmnProcessDesigner/package/designer/plugins/translate/customTranslate.js b/src/components/bpmnProcessDesigner/package/designer/plugins/translate/customTranslate.js deleted file mode 100644 index c1b99e1..0000000 --- a/src/components/bpmnProcessDesigner/package/designer/plugins/translate/customTranslate.js +++ /dev/null @@ -1,44 +0,0 @@ -// 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 || {} - // 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 + '}' - }) - } -} diff --git a/src/components/bpmnProcessDesigner/package/designer/plugins/translate/zh.js b/src/components/bpmnProcessDesigner/package/designer/plugins/translate/zh.js deleted file mode 100644 index 777db3e..0000000 --- a/src/components/bpmnProcessDesigner/package/designer/plugins/translate/zh.js +++ /dev/null @@ -1,240 +0,0 @@ -/** - * 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 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/src/components/bpmnProcessDesigner/package/index.ts b/src/components/bpmnProcessDesigner/package/index.ts deleted file mode 100644 index ce44a3c..0000000 --- a/src/components/bpmnProcessDesigner/package/index.ts +++ /dev/null @@ -1,11 +0,0 @@ -import MyProcessDesigner from './designer' -import MyProcessPenal from './penal' -import MyProcessViewer from './designer/index2' - -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 { MyProcessDesigner, MyProcessPenal, MyProcessViewer } diff --git a/src/components/bpmnProcessDesigner/package/palette/ProcessPalette.vue b/src/components/bpmnProcessDesigner/package/palette/ProcessPalette.vue deleted file mode 100644 index ba97d96..0000000 --- a/src/components/bpmnProcessDesigner/package/palette/ProcessPalette.vue +++ /dev/null @@ -1,45 +0,0 @@ - - - - - diff --git a/src/components/bpmnProcessDesigner/package/penal/PropertiesPanel.vue b/src/components/bpmnProcessDesigner/package/penal/PropertiesPanel.vue deleted file mode 100644 index 86a1cf7..0000000 --- a/src/components/bpmnProcessDesigner/package/penal/PropertiesPanel.vue +++ /dev/null @@ -1,206 +0,0 @@ - - diff --git a/src/components/bpmnProcessDesigner/package/penal/base/ElementBaseInfo.vue b/src/components/bpmnProcessDesigner/package/penal/base/ElementBaseInfo.vue deleted file mode 100644 index 70ad4f8..0000000 --- a/src/components/bpmnProcessDesigner/package/penal/base/ElementBaseInfo.vue +++ /dev/null @@ -1,180 +0,0 @@ - - diff --git a/src/components/bpmnProcessDesigner/package/penal/flow-condition/FlowCondition.vue b/src/components/bpmnProcessDesigner/package/penal/flow-condition/FlowCondition.vue deleted file mode 100644 index 1715d73..0000000 --- a/src/components/bpmnProcessDesigner/package/penal/flow-condition/FlowCondition.vue +++ /dev/null @@ -1,191 +0,0 @@ - - - diff --git a/src/components/bpmnProcessDesigner/package/penal/form/ElementForm.vue b/src/components/bpmnProcessDesigner/package/penal/form/ElementForm.vue deleted file mode 100644 index 33f0bc0..0000000 --- a/src/components/bpmnProcessDesigner/package/penal/form/ElementForm.vue +++ /dev/null @@ -1,478 +0,0 @@ - - - diff --git a/src/components/bpmnProcessDesigner/package/penal/index.js b/src/components/bpmnProcessDesigner/package/penal/index.js deleted file mode 100644 index 7fa5617..0000000 --- a/src/components/bpmnProcessDesigner/package/penal/index.js +++ /dev/null @@ -1,7 +0,0 @@ -import MyPropertiesPanel from './PropertiesPanel.vue' - -MyPropertiesPanel.install = function (Vue) { - Vue.component(MyPropertiesPanel.name, MyPropertiesPanel) -} - -export default MyPropertiesPanel diff --git a/src/components/bpmnProcessDesigner/package/penal/listeners/ElementListeners.vue b/src/components/bpmnProcessDesigner/package/penal/listeners/ElementListeners.vue deleted file mode 100644 index de5445c..0000000 --- a/src/components/bpmnProcessDesigner/package/penal/listeners/ElementListeners.vue +++ /dev/null @@ -1,448 +0,0 @@ - - diff --git a/src/components/bpmnProcessDesigner/package/penal/listeners/ProcessListenerDialog.vue b/src/components/bpmnProcessDesigner/package/penal/listeners/ProcessListenerDialog.vue deleted file mode 100644 index 01f8124..0000000 --- a/src/components/bpmnProcessDesigner/package/penal/listeners/ProcessListenerDialog.vue +++ /dev/null @@ -1,83 +0,0 @@ - - - diff --git a/src/components/bpmnProcessDesigner/package/penal/listeners/UserTaskListeners.vue b/src/components/bpmnProcessDesigner/package/penal/listeners/UserTaskListeners.vue deleted file mode 100644 index 76e0c80..0000000 --- a/src/components/bpmnProcessDesigner/package/penal/listeners/UserTaskListeners.vue +++ /dev/null @@ -1,491 +0,0 @@ - - diff --git a/src/components/bpmnProcessDesigner/package/penal/listeners/template.js b/src/components/bpmnProcessDesigner/package/penal/listeners/template.js deleted file mode 100644 index 430dc64..0000000 --- a/src/components/bpmnProcessDesigner/package/penal/listeners/template.js +++ /dev/null @@ -1,178 +0,0 @@ -export const template = (isTaskListener) => { - return ` -
- - - - - - - - -
- 添加监听器 -
- - - - - - - - - - - - - - - - - - - - - - - - - - ${ - isTaskListener - ? "" + - "" + - "" + - "" + - "" + - "" + - '' + - '' + - "" + - "" + - '' - : '' - } - - -

- 注入字段: - 添加字段 -

- - - - - - - - - - -
- 取 消 - 保 存 -
-
- - - - - - - - - - - - - - - - - - - - - -
- ` -} diff --git a/src/components/bpmnProcessDesigner/package/penal/listeners/utilSelf.ts b/src/components/bpmnProcessDesigner/package/penal/listeners/utilSelf.ts deleted file mode 100644 index b4eb1d2..0000000 --- a/src/components/bpmnProcessDesigner/package/penal/listeners/utilSelf.ts +++ /dev/null @@ -1,89 +0,0 @@ -// 初始化表单数据 -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) { - if (listener.eventDefinitions.length) { - let k = '' - for (const key in listener.eventDefinitions[0]) { - console.log(listener.eventDefinitions, key) - if (key.indexOf('time') !== -1) { - 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: listenerType - } -} - -/** 将 ProcessListenerDO 转换成 initListenerForm 想同的 Form 对象 */ -export function initListenerForm2(processListener) { - if (processListener.valueType === 'class') { - return { - listenerType: 'classListener', - class: processListener.value, - event: processListener.event, - fields: [] - } - } else if (processListener.valueType === 'expression') { - return { - listenerType: 'expressionListener', - expression: processListener.value, - event: processListener.event, - fields: [] - } - } else if (processListener.valueType === 'delegateExpression') { - return { - listenerType: 'delegateExpressionListener', - delegateExpression: processListener.value, - event: processListener.event, - fields: [] - } - } - 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/src/components/bpmnProcessDesigner/package/penal/multi-instance/ElementMultiInstance.vue b/src/components/bpmnProcessDesigner/package/penal/multi-instance/ElementMultiInstance.vue deleted file mode 100644 index c0ec1ca..0000000 --- a/src/components/bpmnProcessDesigner/package/penal/multi-instance/ElementMultiInstance.vue +++ /dev/null @@ -1,280 +0,0 @@ - - - diff --git a/src/components/bpmnProcessDesigner/package/penal/other/ElementOtherConfig.vue b/src/components/bpmnProcessDesigner/package/penal/other/ElementOtherConfig.vue deleted file mode 100644 index 05532c6..0000000 --- a/src/components/bpmnProcessDesigner/package/penal/other/ElementOtherConfig.vue +++ /dev/null @@ -1,55 +0,0 @@ - - - diff --git a/src/components/bpmnProcessDesigner/package/penal/properties/ElementProperties.vue b/src/components/bpmnProcessDesigner/package/penal/properties/ElementProperties.vue deleted file mode 100644 index 494b3d9..0000000 --- a/src/components/bpmnProcessDesigner/package/penal/properties/ElementProperties.vue +++ /dev/null @@ -1,169 +0,0 @@ - - - diff --git a/src/components/bpmnProcessDesigner/package/penal/signal-message/SignalAndMessage.vue b/src/components/bpmnProcessDesigner/package/penal/signal-message/SignalAndMessage.vue deleted file mode 100644 index f38f31c..0000000 --- a/src/components/bpmnProcessDesigner/package/penal/signal-message/SignalAndMessage.vue +++ /dev/null @@ -1,113 +0,0 @@ - - diff --git a/src/components/bpmnProcessDesigner/package/penal/task/ElementTask.vue b/src/components/bpmnProcessDesigner/package/penal/task/ElementTask.vue deleted file mode 100644 index e808af3..0000000 --- a/src/components/bpmnProcessDesigner/package/penal/task/ElementTask.vue +++ /dev/null @@ -1,87 +0,0 @@ - - - diff --git a/src/components/bpmnProcessDesigner/package/penal/task/task-components/ProcessExpressionDialog.vue b/src/components/bpmnProcessDesigner/package/penal/task/task-components/ProcessExpressionDialog.vue deleted file mode 100644 index b478bb2..0000000 --- a/src/components/bpmnProcessDesigner/package/penal/task/task-components/ProcessExpressionDialog.vue +++ /dev/null @@ -1,68 +0,0 @@ - - - diff --git a/src/components/bpmnProcessDesigner/package/penal/task/task-components/ReceiveTask.vue b/src/components/bpmnProcessDesigner/package/penal/task/task-components/ReceiveTask.vue deleted file mode 100644 index 83ed24e..0000000 --- a/src/components/bpmnProcessDesigner/package/penal/task/task-components/ReceiveTask.vue +++ /dev/null @@ -1,125 +0,0 @@ - - - diff --git a/src/components/bpmnProcessDesigner/package/penal/task/task-components/ScriptTask.vue b/src/components/bpmnProcessDesigner/package/penal/task/task-components/ScriptTask.vue deleted file mode 100644 index 683fef3..0000000 --- a/src/components/bpmnProcessDesigner/package/penal/task/task-components/ScriptTask.vue +++ /dev/null @@ -1,99 +0,0 @@ - - - diff --git a/src/components/bpmnProcessDesigner/package/penal/task/task-components/UserTask.vue b/src/components/bpmnProcessDesigner/package/penal/task/task-components/UserTask.vue deleted file mode 100644 index 0dffeb0..0000000 --- a/src/components/bpmnProcessDesigner/package/penal/task/task-components/UserTask.vue +++ /dev/null @@ -1,232 +0,0 @@ - - - diff --git a/src/components/bpmnProcessDesigner/package/theme/element-variables.scss b/src/components/bpmnProcessDesigner/package/theme/element-variables.scss deleted file mode 100644 index 49bd326..0000000 --- a/src/components/bpmnProcessDesigner/package/theme/element-variables.scss +++ /dev/null @@ -1,70 +0,0 @@ -/* 改变主题色变量 */ -$--color-primary: #1890ff; -$--color-danger: #ff4d4f; - -/* 改变 icon 字体路径变量,必需 */ -$--font-path: '~element-ui/lib/theme-chalk/fonts'; - -@import '~element-ui/packages/theme-chalk/src/index'; - -.el-table td, -.el-table th { - color: #333; -} -.el-drawer__header { - padding: 16px 16px 8px 16px; - margin: 0; - line-height: 24px; - font-size: 18px; - color: #303133; - box-sizing: border-box; - border-bottom: 1px solid #e8e8e8; -} -div[class^='el-drawer']:focus, -span:focus { - outline: none; -} -.el-drawer__body { - box-sizing: border-box; - padding: 16px; - width: 100%; - overflow-y: auto; -} - -.el-dialog { - margin-top: 50vh !important; - transform: translateY(-50%); - overflow: hidden; -} -.el-dialog__wrapper { - overflow: hidden; - max-height: 100vh; -} -.el-dialog__header { - padding: 16px 16px 8px 16px; - box-sizing: border-box; - border-bottom: 1px solid #e8e8e8; -} -.el-dialog__body { - padding: 16px; - max-height: 80vh; - box-sizing: border-box; - overflow-y: auto; -} -.el-dialog__footer { - padding: 16px; - box-sizing: border-box; - 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/src/components/bpmnProcessDesigner/package/theme/index.scss b/src/components/bpmnProcessDesigner/package/theme/index.scss deleted file mode 100644 index 2e60fad..0000000 --- a/src/components/bpmnProcessDesigner/package/theme/index.scss +++ /dev/null @@ -1,2 +0,0 @@ -@import './process-designer.scss'; -@import './process-panel.scss'; diff --git a/src/components/bpmnProcessDesigner/package/theme/process-designer.scss b/src/components/bpmnProcessDesigner/package/theme/process-designer.scss deleted file mode 100644 index 6af945d..0000000 --- a/src/components/bpmnProcessDesigner/package/theme/process-designer.scss +++ /dev/null @@ -1,161 +0,0 @@ -@import 'bpmn-js-token-simulation/assets/css/bpmn-js-token-simulation.css'; -@import 'bpmn-js-token-simulation/assets/css/font-awesome.min.css'; -@import 'bpmn-js-token-simulation/assets/css/normalize.css'; - -// 边框被 token-simulation 样式覆盖了 -.djs-palette { - background: var(--palette-background-color); - border: solid 1px var(--palette-border-color) !important; - border-radius: 2px; -} - -.my-process-designer { - display: flex; - flex-direction: column; - width: 100%; - height: 100%; - box-sizing: border-box; - .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%; - text-align: left; - padding-left: 8px; - padding-right: 8px; - } - .el-button:hover { - background: rgba(64, 158, 255, 0.8); - color: #ffffff; - } - } - .align { - position: relative; - i { - &:after { - content: '|'; - position: absolute; - // 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; - width: 100%; - flex: 1; - .my-process-designer__canvas { - flex: 1; - height: 100%; - position: relative; - 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 { - height: 100%; - overflow: scroll; - overflow-y: auto; - z-index: 10; - * { - 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 { - width: max-content; - content: attr(title); - vertical-align: text-bottom; - position: absolute; - right: -10px; - top: 0; - bottom: 0; - overflow: hidden; - transform: translateX(100%); - font-size: 0.5em; - display: inline-block; - text-decoration: inherit; - font-variant: normal; - text-transform: none; - background: #fafafa; - box-shadow: 0 0 6px #eeeeee; - border: 1px solid #cccccc; - box-sizing: border-box; - padding: 0 16px; - border-radius: 4px; - z-index: 100; - } - } - } -} -pre { - margin: 0; - height: 100%; - overflow: hidden; - max-height: calc(80vh - 32px); - overflow-y: auto; -} -.hljs { - word-break: break-word; - white-space: pre-wrap; -} -.hljs * { - font-family: Consolas, Monaco, monospace; -} diff --git a/src/components/bpmnProcessDesigner/package/theme/process-panel.scss b/src/components/bpmnProcessDesigner/package/theme/process-panel.scss deleted file mode 100644 index f840cdd..0000000 --- a/src/components/bpmnProcessDesigner/package/theme/process-panel.scss +++ /dev/null @@ -1,107 +0,0 @@ -.process-panel__container { - box-sizing: border-box; - padding: 0 8px; - border-left: 1px solid #eeeeee; - box-shadow: 0 0 8px #cccccc; - max-height: 100%; - overflow-y: scroll; -} -.panel-tab__title { - font-weight: 600; - padding: 0 8px; - font-size: 1.1em; - line-height: 1.2em; - i { - margin-right: 8px; - font-size: 1.2em; - } -} -.panel-tab__content { - width: 100%; - box-sizing: border-box; - border-top: 1px solid #eeeeee; - padding: 8px 16px; - .panel-tab__content--title { - display: flex; - justify-content: space-between; - padding-bottom: 8px; - span { - flex: 1; - text-align: left; - } - } -} -.element-property { - width: 100%; - display: flex; - align-items: flex-start; - margin: 8px 0; - .element-property__label { - display: block; - width: 90px; - text-align: right; - overflow: hidden; - padding-right: 12px; - line-height: 32px; - font-size: 14px; - box-sizing: border-box; - } - .element-property__value { - flex: 1; - line-height: 32px; - } - .el-form-item { - width: 100%; - margin-bottom: 0; - padding-bottom: 18px; - } -} -.list-property { - flex-direction: column; - .element-listener-item { - width: 100%; - display: inline-grid; - grid-template-columns: 16px auto 32px 32px; - grid-column-gap: 8px; - } - .element-listener-item + .element-listener-item { - margin-top: 8px; - } -} -.listener-filed__title { - display: inline-flex; - width: 100%; - justify-content: space-between; - align-items: center; - margin-top: 0; - span { - width: 200px; - text-align: left; - font-size: 14px; - } - i { - margin-right: 8px; - } -} -.element-drawer__button { - margin-top: 8px; - width: 100%; - display: inline-flex; - justify-content: space-around; -} -.element-drawer__button > .el-button { - width: 100%; -} - -.el-collapse-item__content { - padding-bottom: 0; -} -.el-input.is-disabled .el-input__inner { - color: #999999; -} -.el-form-item.el-form-item--mini { - margin-bottom: 0; - & + .el-form-item { - margin-top: 16px; - } -} diff --git a/src/components/bpmnProcessDesigner/package/utils.ts b/src/components/bpmnProcessDesigner/package/utils.ts deleted file mode 100644 index 8996788..0000000 --- a/src/components/bpmnProcessDesigner/package/utils.ts +++ /dev/null @@ -1,78 +0,0 @@ -import { toRaw } from 'vue' -const bpmnInstances = () => (window as any)?.bpmnInstances -// 创建监听器实例 -export function createListenerObject(options, isTask, prefix) { - debugger - const listenerObj = Object.create(null) - listenerObj.event = options.event - isTask && (listenerObj.id = options.id) // 任务监听器特有的 id 字段 - switch (options.listenerType) { - case 'scriptListener': - listenerObj.script = createScriptObject(options, prefix) - break - case 'expressionListener': - listenerObj.expression = options.expression - break - case 'delegateExpressionListener': - listenerObj.delegateExpression = options.delegateExpression - 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/src/components/bpmnProcessDesigner/src/highlight/index.js b/src/components/bpmnProcessDesigner/src/highlight/index.js deleted file mode 100644 index 5df38c9..0000000 --- a/src/components/bpmnProcessDesigner/src/highlight/index.js +++ /dev/null @@ -1,5 +0,0 @@ -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/src/components/bpmnProcessDesigner/src/modules/custom-renderer/CustomRenderer.js b/src/components/bpmnProcessDesigner/src/modules/custom-renderer/CustomRenderer.js deleted file mode 100644 index e876031..0000000 --- a/src/components/bpmnProcessDesigner/src/modules/custom-renderer/CustomRenderer.js +++ /dev/null @@ -1,14 +0,0 @@ -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/src/components/bpmnProcessDesigner/src/modules/custom-renderer/index.js b/src/components/bpmnProcessDesigner/src/modules/custom-renderer/index.js deleted file mode 100644 index 79d8bd0..0000000 --- a/src/components/bpmnProcessDesigner/src/modules/custom-renderer/index.js +++ /dev/null @@ -1,6 +0,0 @@ -import CustomRenderer from './CustomRenderer' - -export default { - __init__: ['customRenderer'], - customRenderer: ['type', CustomRenderer] -} diff --git a/src/components/bpmnProcessDesigner/src/modules/rules/CustomRules.js b/src/components/bpmnProcessDesigner/src/modules/rules/CustomRules.js deleted file mode 100644 index 9fa1d14..0000000 --- a/src/components/bpmnProcessDesigner/src/modules/rules/CustomRules.js +++ /dev/null @@ -1,16 +0,0 @@ -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/src/components/bpmnProcessDesigner/src/modules/rules/index.js b/src/components/bpmnProcessDesigner/src/modules/rules/index.js deleted file mode 100644 index 12cf05a..0000000 --- a/src/components/bpmnProcessDesigner/src/modules/rules/index.js +++ /dev/null @@ -1,6 +0,0 @@ -import CustomRules from './CustomRules' - -export default { - __init__: ['customRules'], - customRules: ['type', CustomRules] -} diff --git a/src/components/bpmnProcessDesigner/src/translations.ts b/src/components/bpmnProcessDesigner/src/translations.ts deleted file mode 100644 index 5f9b9a5..0000000 --- a/src/components/bpmnProcessDesigner/src/translations.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * 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/src/components/bpmnProcessDesigner/src/utils/directive/clickOutSide.js b/src/components/bpmnProcessDesigner/src/utils/directive/clickOutSide.js deleted file mode 100644 index bb71d44..0000000 --- a/src/components/bpmnProcessDesigner/src/utils/directive/clickOutSide.js +++ /dev/null @@ -1,39 +0,0 @@ -//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/src/components/bpmnProcessDesigner/src/utils/index.js b/src/components/bpmnProcessDesigner/src/utils/index.js deleted file mode 100644 index 7d970ec..0000000 --- a/src/components/bpmnProcessDesigner/src/utils/index.js +++ /dev/null @@ -1,10 +0,0 @@ -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/src/components/bpmnProcessDesigner/src/utils/xml2json.js b/src/components/bpmnProcessDesigner/src/utils/xml2json.js deleted file mode 100644 index fe1a52f..0000000 --- a/src/components/bpmnProcessDesigner/src/utils/xml2json.js +++ /dev/null @@ -1,50 +0,0 @@ -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 (typeof obj[nodeName] == 'undefined') { - obj[nodeName] = xml2json(item) - } else { - if (typeof 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 (e) { - console.log(e.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/src/layout/components/Message/index.ts b/src/layout/components/Message/index.ts deleted file mode 100644 index dfe0207..0000000 --- a/src/layout/components/Message/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import Message from './src/Message.vue' - -export { Message } diff --git a/src/layout/components/Message/src/Message.vue b/src/layout/components/Message/src/Message.vue deleted file mode 100644 index 6bd7724..0000000 --- a/src/layout/components/Message/src/Message.vue +++ /dev/null @@ -1,126 +0,0 @@ - - - diff --git a/src/layout/components/ToolHeader.vue b/src/layout/components/ToolHeader.vue index 0b8d00d..fa9b6cb 100644 --- a/src/layout/components/ToolHeader.vue +++ b/src/layout/components/ToolHeader.vue @@ -1,6 +1,5 @@ diff --git a/src/views/system/notify/message/index.vue b/src/views/system/notify/message/index.vue deleted file mode 100644 index c886ea2..0000000 --- a/src/views/system/notify/message/index.vue +++ /dev/null @@ -1,212 +0,0 @@ - - diff --git a/src/views/system/notify/my/MyNotifyMessageDetail.vue b/src/views/system/notify/my/MyNotifyMessageDetail.vue deleted file mode 100644 index 0bfa30c..0000000 --- a/src/views/system/notify/my/MyNotifyMessageDetail.vue +++ /dev/null @@ -1,48 +0,0 @@ - - diff --git a/src/views/system/notify/my/index.vue b/src/views/system/notify/my/index.vue deleted file mode 100644 index c03e658..0000000 --- a/src/views/system/notify/my/index.vue +++ /dev/null @@ -1,218 +0,0 @@ - - - diff --git a/src/views/system/notify/template/NotifyTemplateForm.vue b/src/views/system/notify/template/NotifyTemplateForm.vue deleted file mode 100644 index a734e2d..0000000 --- a/src/views/system/notify/template/NotifyTemplateForm.vue +++ /dev/null @@ -1,141 +0,0 @@ - - diff --git a/src/views/system/notify/template/NotifyTemplateSendForm.vue b/src/views/system/notify/template/NotifyTemplateSendForm.vue deleted file mode 100644 index 126067c..0000000 --- a/src/views/system/notify/template/NotifyTemplateSendForm.vue +++ /dev/null @@ -1,146 +0,0 @@ - - diff --git a/src/views/system/notify/template/index.vue b/src/views/system/notify/template/index.vue deleted file mode 100644 index 28a1ae4..0000000 --- a/src/views/system/notify/template/index.vue +++ /dev/null @@ -1,235 +0,0 @@ - - diff --git a/src/views/textpage/position/DeptForm.vue b/src/views/textpage/position/DeptForm.vue index c759ef3..cdda14a 100644 --- a/src/views/textpage/position/DeptForm.vue +++ b/src/views/textpage/position/DeptForm.vue @@ -7,19 +7,19 @@ :rules="formRules" label-width="80px" > - + - - + + @@ -86,8 +86,8 @@ const formData = ref({ status: CommonStatusEnum.ENABLE }) const formRules = reactive({ - parentId: [{ required: true, message: '上级部门不能为空', trigger: 'blur' }], - name: [{ required: true, message: '部门名称不能为空', trigger: 'blur' }], + parentId: [{ required: true, message: '上级职位不能为空', trigger: 'blur' }], + name: [{ required: true, message: '职位名称不能为空', trigger: 'blur' }], sort: [{ required: true, message: '显示排序不能为空', trigger: 'blur' }], email: [{ type: 'email', message: '请输入正确的邮箱地址', trigger: ['blur', 'change'] }], phone: [ @@ -116,7 +116,7 @@ const open = async (type: string, id?: number) => { } // 获得用户列表 userList.value = await UserApi.getSimpleUserList() - // 获得部门树 + // 获得职位树 await getTree() } defineExpose({ open }) // 提供 open 方法,用于打开弹窗 @@ -163,11 +163,11 @@ const resetForm = () => { formRef.value?.resetFields() } -/** 获得部门树 */ +/** 获得职位树 */ const getTree = async () => { deptTree.value = [] const data = await DeptApi.getSimpleDeptList() - let dept: Tree = { id: 0, name: '顶级部门', children: [] } + let dept: Tree = { id: 0, name: '顶级职位', children: [] } dept.children = handleTree(data) deptTree.value.push(dept) } diff --git a/src/views/textpage/position/index.vue b/src/views/textpage/position/index.vue index 4757e5c..cfc22bf 100644 --- a/src/views/textpage/position/index.vue +++ b/src/views/textpage/position/index.vue @@ -8,18 +8,18 @@ :inline="true" label-width="68px" > - + - + @@ -58,7 +58,7 @@ :default-expand-all="isExpandAll" v-if="refreshTable" > - +