beta-glozic-workflow 1.34.0 → 1.38.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/css/style.css +1 -1
- package/dist/index.js +26 -5
- package/package.json +1 -1
package/dist/css/style.css
CHANGED
package/dist/index.js
CHANGED
|
@@ -89,9 +89,10 @@ class Designer extends _react.Component {
|
|
|
89
89
|
if (action.configuration && action.configuration.actionID === targetActionID) {
|
|
90
90
|
// Update branches array when actionID matches
|
|
91
91
|
var tempBranch = action.branches;
|
|
92
|
-
if (tempBranch.length
|
|
93
|
-
tempBranch = tempBranch.
|
|
94
|
-
}
|
|
92
|
+
if (tempBranch.length >= newBranches.length) {
|
|
93
|
+
tempBranch = tempBranch.filter(branch => newBranches.some(newBranch => newBranch.label === branch.name));
|
|
94
|
+
}
|
|
95
|
+
if (tempBranch.length <= newBranches.length) {
|
|
95
96
|
newBranches.forEach((ele, index) => {
|
|
96
97
|
if (!tempBranch[index]) {
|
|
97
98
|
tempBranch.push({
|
|
@@ -192,7 +193,7 @@ class Designer extends _react.Component {
|
|
|
192
193
|
// move dragged elem to the selected drop target
|
|
193
194
|
if (event.target.className.indexOf('jtk-overlay') >= 0) {
|
|
194
195
|
event.target.classList.remove('onDroping');
|
|
195
|
-
if (self.draged.getAttribute('datatype')) {
|
|
196
|
+
if (self.draged && self.draged.getAttribute('datatype')) {
|
|
196
197
|
var datatype = JSON.parse(self.draged.getAttribute('datatype'));
|
|
197
198
|
if (datatype && datatype.fc) {
|
|
198
199
|
taskId = self.draged.getAttribute('id');
|
|
@@ -1042,8 +1043,28 @@ class Designer extends _react.Component {
|
|
|
1042
1043
|
maxConnections: 100
|
|
1043
1044
|
});
|
|
1044
1045
|
}
|
|
1046
|
+
addEndpointsOld(node, position, uuids, nodeId) {
|
|
1047
|
+
let self = this;
|
|
1048
|
+
if (position && position.length) {
|
|
1049
|
+
position.forEach((p, i) => {
|
|
1050
|
+
self.addEndPointToNode(node, p, uuids[i]);
|
|
1051
|
+
});
|
|
1052
|
+
return;
|
|
1053
|
+
} else {
|
|
1054
|
+
self.addEndPointToNode(node, 'Left', "".concat(nodeId, "-ep-left"));
|
|
1055
|
+
self.addEndPointToNode(node, 'Top', "".concat(nodeId, "-ep-top"));
|
|
1056
|
+
self.addEndPointToNode(node, 'Right', "".concat(nodeId, "-ep-right"));
|
|
1057
|
+
self.addEndPointToNode(node, 'Bottom', "".concat(nodeId, "-ep-bottom"));
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1045
1060
|
addEndpoints(node, position, uuids, nodeId) {
|
|
1046
1061
|
let self = this;
|
|
1062
|
+
const titleElement = node.querySelector('.task-palette-title');
|
|
1063
|
+
if (titleElement) {
|
|
1064
|
+
if (!titleElement.innerHTML.includes("(".concat(nodeId, ")"))) {
|
|
1065
|
+
titleElement.innerHTML += " <br> (<span style=\"font-size: 10px;\">".concat(nodeId, " <span/>)");
|
|
1066
|
+
}
|
|
1067
|
+
}
|
|
1047
1068
|
if (position && position.length) {
|
|
1048
1069
|
position.forEach((p, i) => {
|
|
1049
1070
|
self.addEndPointToNode(node, p, uuids[i]);
|
|
@@ -1147,7 +1168,7 @@ class Designer extends _react.Component {
|
|
|
1147
1168
|
newNode.draggable = "true";
|
|
1148
1169
|
newNode.className = 'fc-workflow--node-task-palette-item fc-item fc-item-draggable fc-item-default';
|
|
1149
1170
|
newNode.style.cssText = 'top: ' + topPosNewNode + 'px; left: ' + leftPosNewNode + 'px;';
|
|
1150
|
-
newNode.innerHTML = node ? node.innerHTML : "\n
|
|
1171
|
+
newNode.innerHTML = node ? node.innerHTML : "\n <div class=\"task-palette-icon fa fa-".concat(item.icon, " unselectable\"></div>\n <div class=\"task-palette-title unselectable\">").concat(copyTask ? copyTask.configuration.actionTitle : taskTitle).concat("<br>(").concat(copyTask ? copyTask.configuration.actionID : newNodeId, ")</div>");
|
|
1151
1172
|
(0, _Designer2.addTaskMenuIcon)(newNode);
|
|
1152
1173
|
this.container.append(newNode);
|
|
1153
1174
|
(0, _jquery.default)('.fc-workflow--node-task-palette-item').on('dragstart', function (event) {
|