beta-glozic-workflow 1.0.0 → 1.3.0
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/index.js +23 -13
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -69,9 +69,18 @@ class Designer extends _react.Component {
|
|
|
69
69
|
});
|
|
70
70
|
_defineProperty(this, "onUpdateNodes", props => {
|
|
71
71
|
if (props.Nodes && props.Nodes.length != 0) {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
72
|
+
const oldNodes = this.flowchartToJson();
|
|
73
|
+
if (JSON.stringify(oldNodes.definition.actions) != JSON.stringify(props.Nodes) && oldNodes.definition.actions.length == 0 && props.Nodes.length != 0) {
|
|
74
|
+
let data = JSON.parse(JSON.stringify(layout));
|
|
75
|
+
data.definition.actions = props.Nodes;
|
|
76
|
+
this.importedJsonFile(data);
|
|
77
|
+
} else if (props.options.updatedNodeId && props.options.actionConfig) {
|
|
78
|
+
console.log('on update action config');
|
|
79
|
+
console.log(props.options);
|
|
80
|
+
if (this.nodes[props.options.updatedNodeId]) {
|
|
81
|
+
this.nodes[props.options.updatedNodeId].configuration["actionConfig"] = props.options.actionConfig;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
75
84
|
}
|
|
76
85
|
});
|
|
77
86
|
_defineProperty(this, "onload", async () => {
|
|
@@ -145,7 +154,7 @@ class Designer extends _react.Component {
|
|
|
145
154
|
}
|
|
146
155
|
window.setTimeout(() => {
|
|
147
156
|
self.props.onChange(self.flowchartToJson());
|
|
148
|
-
},
|
|
157
|
+
}, 400);
|
|
149
158
|
}, false);
|
|
150
159
|
document.addEventListener('click', e => {
|
|
151
160
|
//console.log(e.target, document.getElementById('designer-form-container'))
|
|
@@ -180,7 +189,6 @@ class Designer extends _react.Component {
|
|
|
180
189
|
let targetId = target.getAttribute('id');
|
|
181
190
|
// focus on NODE_END or NODE_START
|
|
182
191
|
if (targetId === NODE_START || targetId === NODE_END) {
|
|
183
|
-
this.props.onChange(this.flowchartToJson());
|
|
184
192
|
return self.setState({
|
|
185
193
|
currentNodeFocused: null
|
|
186
194
|
});
|
|
@@ -206,7 +214,7 @@ class Designer extends _react.Component {
|
|
|
206
214
|
// })
|
|
207
215
|
// }
|
|
208
216
|
//comment by anup Stop
|
|
209
|
-
this.props.onNodeClick(actionObj
|
|
217
|
+
this.props.onNodeClick(actionObj);
|
|
210
218
|
self.setState({
|
|
211
219
|
currentNodeFocused: actionObj
|
|
212
220
|
});
|
|
@@ -540,6 +548,7 @@ class Designer extends _react.Component {
|
|
|
540
548
|
this.removeAllEndpointOfNode = this.removeAllEndpointOfNode.bind(this);
|
|
541
549
|
this.handleSubmitTaskForm = this.handleSubmitTaskForm.bind(this);
|
|
542
550
|
}
|
|
551
|
+
//Componet By anup
|
|
543
552
|
// componentWillReceiveProps(newProps) {
|
|
544
553
|
// console.log(newProps.workflowobj)
|
|
545
554
|
// console.log(newProps.is_import)
|
|
@@ -722,8 +731,9 @@ class Designer extends _react.Component {
|
|
|
722
731
|
this.setState({
|
|
723
732
|
popupRenameFormDisplay: false
|
|
724
733
|
});
|
|
725
|
-
this.props.onChange(this.flowchartToJson());
|
|
734
|
+
// this.props.onChange(this.flowchartToJson());
|
|
726
735
|
}
|
|
736
|
+
|
|
727
737
|
getOverlayBySourceTarget(source, target) {
|
|
728
738
|
let o = document.querySelector('.jtk-overlay .workflow--node-dropable-zone[data-source="' + source + '"][data-target="' + target + '"]');
|
|
729
739
|
//console.log('getOverlayBySourceTarget ', source, target, o)
|
|
@@ -953,7 +963,7 @@ class Designer extends _react.Component {
|
|
|
953
963
|
})
|
|
954
964
|
})
|
|
955
965
|
})).then(() => {
|
|
956
|
-
this.props.onChange(this.flowchartToJson());
|
|
966
|
+
// this.props.onChange(this.flowchartToJson());
|
|
957
967
|
});
|
|
958
968
|
}
|
|
959
969
|
}
|
|
@@ -966,7 +976,7 @@ class Designer extends _react.Component {
|
|
|
966
976
|
display: !this.state.taskPalette.display
|
|
967
977
|
})
|
|
968
978
|
}).then(() => {
|
|
969
|
-
this.props.onChange(this.flowchartToJson());
|
|
979
|
+
// this.props.onChange(this.flowchartToJson());
|
|
970
980
|
});
|
|
971
981
|
}
|
|
972
982
|
addEndPointToNode(node, position, uuid) {
|
|
@@ -1394,16 +1404,16 @@ class Designer extends _react.Component {
|
|
|
1394
1404
|
next: '',
|
|
1395
1405
|
previous: source,
|
|
1396
1406
|
next: '',
|
|
1397
|
-
actionConfig: copyTask ? copyTask.actionConfig : {},
|
|
1398
1407
|
configuration: {
|
|
1399
1408
|
actionID: "node-".concat(_count),
|
|
1400
1409
|
actionTitle: item.title,
|
|
1401
|
-
actionName: copyTask ? copyTask.configuration.actionName : item.name,
|
|
1402
1410
|
actionImage: item.actionImage,
|
|
1403
|
-
|
|
1411
|
+
isHidden: false,
|
|
1404
1412
|
nodeType: item.nodeType,
|
|
1413
|
+
properties: propertiesClone,
|
|
1414
|
+
actionName: copyTask ? copyTask.configuration.actionName : item.name,
|
|
1405
1415
|
isDisabled: copyTask ? copyTask.configuration.isDisabled : false,
|
|
1406
|
-
|
|
1416
|
+
actionConfig: copyTask ? copyTask.configuration.actionConfig : {}
|
|
1407
1417
|
},
|
|
1408
1418
|
branches: null,
|
|
1409
1419
|
wrapper: item.wrapper,
|