@processmaker/modeler 1.36.9 → 1.36.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/modeler.common.js +314 -291
- package/dist/modeler.common.js.map +1 -1
- package/dist/modeler.umd.js +314 -291
- package/dist/modeler.umd.js.map +1 -1
- package/dist/modeler.umd.min.js +1 -1
- package/dist/modeler.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/modeler/Modeler.vue +11 -4
- package/src/setup/registerPmBlock.js +9 -0
package/package.json
CHANGED
|
@@ -637,7 +637,6 @@ export default {
|
|
|
637
637
|
this.translateConfig(nodeType.inspectorConfig[0]);
|
|
638
638
|
addLoopCharacteristics(nodeType);
|
|
639
639
|
this.nodeRegistry[nodeType.id] = nodeType;
|
|
640
|
-
|
|
641
640
|
Vue.component(nodeType.id, nodeType.component);
|
|
642
641
|
this.nodeTypes.push(nodeType);
|
|
643
642
|
|
|
@@ -678,6 +677,10 @@ export default {
|
|
|
678
677
|
: [pmBlockNode.bpmnType];
|
|
679
678
|
|
|
680
679
|
types.forEach(bpmnType => {
|
|
680
|
+
if (!this.parsers[bpmnType]) {
|
|
681
|
+
this.parsers[bpmnType] = { custom: [], implementation: [], default: []};
|
|
682
|
+
}
|
|
683
|
+
|
|
681
684
|
if (customParser) {
|
|
682
685
|
this.parsers[bpmnType].custom.push(customParser);
|
|
683
686
|
return;
|
|
@@ -846,16 +849,20 @@ export default {
|
|
|
846
849
|
}
|
|
847
850
|
|
|
848
851
|
this.removeUnsupportedElementAttributes(definition);
|
|
849
|
-
const type = parser(definition, this.moddle);
|
|
850
852
|
|
|
853
|
+
const config = definition.config ? JSON.parse(definition.config) : {};
|
|
854
|
+
const type = config?.processKey || parser(definition, this.moddle);
|
|
855
|
+
|
|
851
856
|
const unnamedElements = ['bpmn:TextAnnotation', 'bpmn:Association', 'bpmn:DataOutputAssociation', 'bpmn:DataInputAssociation'];
|
|
852
857
|
const requireName = unnamedElements.indexOf(bpmnType) === -1;
|
|
853
858
|
if (requireName && !definition.get('name')) {
|
|
854
859
|
definition.set('name', '');
|
|
855
860
|
}
|
|
856
861
|
|
|
857
|
-
|
|
858
|
-
|
|
862
|
+
this.createNodeAsync(type, definition, diagram);
|
|
863
|
+
},
|
|
864
|
+
async createNodeAsync(type, definition, diagram) {
|
|
865
|
+
const node = this.createNode(type, definition, diagram);
|
|
859
866
|
store.commit('addNode', node);
|
|
860
867
|
},
|
|
861
868
|
createNode(type, definition, diagram) {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import bpmnExtension from '@processmaker/processmaker-bpmn-moddle/resources/processmaker';
|
|
2
|
+
|
|
3
|
+
const nodeTypes = window.ProcessMaker.pmBlockNodes;
|
|
4
|
+
|
|
5
|
+
export default function registerPmBlock({ registerPmBlock, registerBpmnExtension }) {
|
|
6
|
+
nodeTypes.forEach(config => registerPmBlock(config));
|
|
7
|
+
|
|
8
|
+
registerBpmnExtension('pm', bpmnExtension);
|
|
9
|
+
}
|