beta-glozic-workflow 1.18.0 → 1.23.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/component/TaskPalette/TaskPalette.js +5 -5
- package/dist/component/TaskPalette/index.js +2 -3
- package/dist/component/TaskPaletteGroup/TaskPaletteGroup.js +5 -5
- package/dist/component/TaskPaletteGroup/index.js +2 -3
- package/dist/css/style.css +15 -3
- package/dist/index.js +45 -61
- package/dist/nodeconfig.js +3 -4
- package/dist/utils/Designer.module.js +5 -6
- package/dist/utils/taskConfig.js +42 -3
- package/dist/utils/workflow.config.js +2 -3
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
require("core-js/modules/es.weak-map.js");
|
|
3
4
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
@@ -12,9 +13,9 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
12
13
|
require("./TaskPalette.css");
|
|
13
14
|
var _workflow = require("../../utils/workflow.config");
|
|
14
15
|
var _TaskPaletteGroup = _interopRequireDefault(require("../TaskPaletteGroup"));
|
|
15
|
-
function _interopRequireDefault(
|
|
16
|
-
function _getRequireWildcardCache(
|
|
17
|
-
function _interopRequireWildcard(
|
|
16
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
18
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
19
|
class TaskPalette extends _react.Component {
|
|
19
20
|
constructor(props) {
|
|
20
21
|
super(props);
|
|
@@ -100,5 +101,4 @@ TaskPalette.propTypes = {
|
|
|
100
101
|
isActive: _propTypes.default.bool
|
|
101
102
|
};
|
|
102
103
|
TaskPalette.defaultProps = {};
|
|
103
|
-
var _default = TaskPalette;
|
|
104
|
-
exports.default = _default;
|
|
104
|
+
var _default = exports.default = TaskPalette;
|
|
@@ -5,6 +5,5 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _TaskPalette = _interopRequireDefault(require("./TaskPalette"));
|
|
8
|
-
function _interopRequireDefault(
|
|
9
|
-
var _default = _TaskPalette.default;
|
|
10
|
-
exports.default = _default;
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
var _default = exports.default = _TaskPalette.default;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
require("core-js/modules/es.weak-map.js");
|
|
3
4
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
@@ -11,9 +12,9 @@ require("core-js/modules/es.string.search.js");
|
|
|
11
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
13
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
14
|
require("./TaskPaletteGroup.css");
|
|
14
|
-
function _interopRequireDefault(
|
|
15
|
-
function _getRequireWildcardCache(
|
|
16
|
-
function _interopRequireWildcard(
|
|
15
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
17
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
18
|
class TaskPaletteGroup extends _react.Component {
|
|
18
19
|
constructor(props) {
|
|
19
20
|
super(props);
|
|
@@ -67,5 +68,4 @@ TaskPaletteGroup.propTypes = {
|
|
|
67
68
|
name: _propTypes.default.string
|
|
68
69
|
};
|
|
69
70
|
TaskPaletteGroup.defaultProps = {};
|
|
70
|
-
var _default = TaskPaletteGroup;
|
|
71
|
-
exports.default = _default;
|
|
71
|
+
var _default = exports.default = TaskPaletteGroup;
|
|
@@ -5,6 +5,5 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _TaskPaletteGroup = _interopRequireDefault(require("./TaskPaletteGroup"));
|
|
8
|
-
function _interopRequireDefault(
|
|
9
|
-
var _default = _TaskPaletteGroup.default;
|
|
10
|
-
exports.default = _default;
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
var _default = exports.default = _TaskPaletteGroup.default;
|
package/dist/css/style.css
CHANGED
|
@@ -207,6 +207,17 @@
|
|
|
207
207
|
|
|
208
208
|
.workflow-node-designer-container .workflow-node-designer-wrapper #designer-area .fc-item-default.is-disabled {
|
|
209
209
|
background-color: #eee;
|
|
210
|
+
/* pointer-events: none; */
|
|
211
|
+
cursor: default;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.workflow-node-designer-container .workflow-node-designer-wrapper #designer-area .fc-item-default.is-disabled {
|
|
215
|
+
background-color: #eee;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.workflow-node-designer-container .workflow-node-designer-wrapper #designer-area .fc-item-default.is-disabled .task-palette-icon {
|
|
219
|
+
border: 1px dashed #c7c7c7 !important;
|
|
220
|
+
background-color: #9aa1a0 !important;
|
|
210
221
|
}
|
|
211
222
|
|
|
212
223
|
.workflow-node-designer-container .workflow-node-designer-wrapper #designer-area .fc-item-default .task-palette-icon {
|
|
@@ -254,6 +265,7 @@
|
|
|
254
265
|
}
|
|
255
266
|
|
|
256
267
|
.workflow-node-designer-container .task-iconmenu-container .task-iconmenu-inner .task-iconmenu-btn {
|
|
268
|
+
pointer-events: all !important;
|
|
257
269
|
height: 18px;
|
|
258
270
|
width: 18px;
|
|
259
271
|
top: -9px;
|
|
@@ -357,7 +369,7 @@
|
|
|
357
369
|
}
|
|
358
370
|
|
|
359
371
|
.workflow-node-designer-container .btn-flow-save {
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
372
|
+
color: #fff !important;
|
|
373
|
+
background-color: #2bbbad !important;
|
|
374
|
+
border-color: #2bbbad !important;
|
|
363
375
|
}
|
package/dist/index.js
CHANGED
|
@@ -1,41 +1,40 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
require("core-js/modules/es.weak-map.js");
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports.default = exports.SPECIAL_END_NODE = exports.SPECIAL_CORNER_NODE = exports.NODE_START = exports.NODE_END = void 0;
|
|
8
|
+
require("core-js/modules/es.array.includes.js");
|
|
9
|
+
require("core-js/modules/es.json.stringify.js");
|
|
7
10
|
require("core-js/modules/es.object.assign.js");
|
|
11
|
+
require("core-js/modules/es.parse-float.js");
|
|
8
12
|
require("core-js/modules/es.promise.js");
|
|
9
|
-
require("core-js/modules/es.json.stringify.js");
|
|
10
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
11
|
-
require("core-js/modules/es.array.includes.js");
|
|
12
13
|
require("core-js/modules/es.string.includes.js");
|
|
13
|
-
require("core-js/modules/
|
|
14
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
14
15
|
var _react = _interopRequireWildcard(require("react"));
|
|
15
16
|
var _TaskPalette = _interopRequireDefault(require("./component/TaskPalette"));
|
|
16
17
|
var _reactstrap = require("reactstrap");
|
|
17
18
|
var _jsplumb = require("jsplumb");
|
|
18
19
|
var _workflow = require("./utils/workflow.config");
|
|
19
20
|
var _jquery = _interopRequireDefault(require("jquery"));
|
|
20
|
-
var
|
|
21
|
+
var _Designer2 = require("./utils/Designer.module");
|
|
21
22
|
require("./css/style.css");
|
|
22
|
-
function _interopRequireDefault(
|
|
23
|
-
function _getRequireWildcardCache(
|
|
24
|
-
function _interopRequireWildcard(
|
|
25
|
-
function ownKeys(
|
|
26
|
-
function _objectSpread(
|
|
27
|
-
function _defineProperty(
|
|
23
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
24
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
25
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
26
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
27
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
28
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
29
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
30
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
28
31
|
// import './index.css';
|
|
29
32
|
|
|
30
33
|
//Actions
|
|
31
|
-
const NODE_START = 'node-start';
|
|
32
|
-
exports.
|
|
33
|
-
const
|
|
34
|
-
exports.
|
|
35
|
-
const SPECIAL_END_NODE = 'special_end_node';
|
|
36
|
-
exports.SPECIAL_END_NODE = SPECIAL_END_NODE;
|
|
37
|
-
const SPECIAL_CORNER_NODE = 'SPECIAL_CORNER_NODE';
|
|
38
|
-
exports.SPECIAL_CORNER_NODE = SPECIAL_CORNER_NODE;
|
|
34
|
+
const NODE_START = exports.NODE_START = 'node-start';
|
|
35
|
+
const NODE_END = exports.NODE_END = 'node-end';
|
|
36
|
+
const SPECIAL_END_NODE = exports.SPECIAL_END_NODE = 'special_end_node';
|
|
37
|
+
const SPECIAL_CORNER_NODE = exports.SPECIAL_CORNER_NODE = 'SPECIAL_CORNER_NODE';
|
|
39
38
|
let taskConfig = {};
|
|
40
39
|
Object.values(_workflow.config.taskType).map(s => {
|
|
41
40
|
taskConfig = Object.assign(taskConfig, s);
|
|
@@ -85,7 +84,7 @@ class Designer extends _react.Component {
|
|
|
85
84
|
});
|
|
86
85
|
_defineProperty(this, "onload", async () => {
|
|
87
86
|
let self = this;
|
|
88
|
-
this.fileLoadedFromServer =
|
|
87
|
+
this.fileLoadedFromServer = _Designer2.getFileNameParam;
|
|
89
88
|
this.paletteContainer = document.getElementById('workflow-task-palette-container');
|
|
90
89
|
// this.paletteContainer.style.height = (window.innerHeight - this.paletteContainer.offsetTop) + 'px';
|
|
91
90
|
(0, _jquery.default)('.workflow--node-task-palette-item').on('mousedown', e => {
|
|
@@ -178,7 +177,7 @@ class Designer extends _react.Component {
|
|
|
178
177
|
});
|
|
179
178
|
break;
|
|
180
179
|
case 'disabled':
|
|
181
|
-
(0,
|
|
180
|
+
(0, _Designer2.toggleDisabledTask)(taskId, this.nodes);
|
|
182
181
|
break;
|
|
183
182
|
default:
|
|
184
183
|
}
|
|
@@ -252,7 +251,6 @@ class Designer extends _react.Component {
|
|
|
252
251
|
}]
|
|
253
252
|
// ConnectionOverlays: [['Custom', overlayPlus()]]
|
|
254
253
|
});
|
|
255
|
-
|
|
256
254
|
this.containerWrapper = document.getElementById('workflow-node-designer-wrapper-area');
|
|
257
255
|
this.container = document.getElementById('designer-area');
|
|
258
256
|
this.containerWrapper.addEventListener('wheel', e => {
|
|
@@ -402,7 +400,6 @@ class Designer extends _react.Component {
|
|
|
402
400
|
console.log('STOP');
|
|
403
401
|
// ////////console.log('STOP ', params)
|
|
404
402
|
},
|
|
405
|
-
|
|
406
403
|
start: () => {
|
|
407
404
|
console.log(this.nodes);
|
|
408
405
|
console.log('start');
|
|
@@ -417,6 +414,7 @@ class Designer extends _react.Component {
|
|
|
417
414
|
}
|
|
418
415
|
}
|
|
419
416
|
});
|
|
417
|
+
////console.log(this.nodes[this.curCopyTask], this.curCopyTask)
|
|
420
418
|
_defineProperty(this, "addBranchTaskToPlaceHolder", (task, placeholder) => {
|
|
421
419
|
// this.setState({paletteActive: true});
|
|
422
420
|
let plusIcon = placeholder.querySelector('.workflow--node-dropable-zone');
|
|
@@ -725,15 +723,13 @@ class Designer extends _react.Component {
|
|
|
725
723
|
// this.firstInstance.deleteEndpoint({uuid: `${node}-ep-bottom`});
|
|
726
724
|
// this.firstInstance.deleteEndpoint({uuid: `${node}-ep-left`});
|
|
727
725
|
}
|
|
728
|
-
|
|
729
726
|
handleRenameTask(value) {
|
|
730
|
-
(0,
|
|
727
|
+
(0, _Designer2.renameTask)(this.curFocusTask, this.nodes, value);
|
|
731
728
|
this.setState({
|
|
732
729
|
popupRenameFormDisplay: false
|
|
733
730
|
});
|
|
734
731
|
// this.props.onChange(this.flowchartToJson());
|
|
735
732
|
}
|
|
736
|
-
|
|
737
733
|
getOverlayBySourceTarget(source, target) {
|
|
738
734
|
let o = document.querySelector('.jtk-overlay .workflow--node-dropable-zone[data-source="' + source + '"][data-target="' + target + '"]');
|
|
739
735
|
//console.log('getOverlayBySourceTarget ', source, target, o)
|
|
@@ -760,7 +756,7 @@ class Designer extends _react.Component {
|
|
|
760
756
|
this.nodes.nodeEnd = document.getElementById(NODE_END);
|
|
761
757
|
this.addEndPointToNode(this.nodes.nodeStart, 'Bottom', "".concat(NODE_START, "-ep-bottom"));
|
|
762
758
|
this.addEndPointToNode(this.nodes.nodeEnd, 'Top', "".concat(NODE_END, "-ep-top"));
|
|
763
|
-
this.connectNodes(['Custom', (0,
|
|
759
|
+
this.connectNodes(['Custom', (0, _Designer2.overlayPlus)(NODE_START, NODE_END)], NODE_START + '-ep-bottom', NODE_END + '-ep-top');
|
|
764
760
|
this.nodes[NODE_START] = {
|
|
765
761
|
nodeId: NODE_START,
|
|
766
762
|
next: NODE_END,
|
|
@@ -784,7 +780,6 @@ class Designer extends _react.Component {
|
|
|
784
780
|
});
|
|
785
781
|
//console.log('0507', this.nodes, connections)
|
|
786
782
|
}
|
|
787
|
-
|
|
788
783
|
deleteTaskById(taskId) {
|
|
789
784
|
let previous = this.nodes[taskId].previous;
|
|
790
785
|
let next = this.nodes[taskId].next;
|
|
@@ -833,7 +828,7 @@ class Designer extends _react.Component {
|
|
|
833
828
|
document.getElementById(n).remove();
|
|
834
829
|
delete self.nodes[n];
|
|
835
830
|
});
|
|
836
|
-
this.connectNodes(['Custom', Object.assign({}, (0,
|
|
831
|
+
this.connectNodes(['Custom', Object.assign({}, (0, _Designer2.overlayPlus)(previous, next, branch))], "".concat(previous, "-ep-bottom"), "".concat(next, "-ep-top"));
|
|
837
832
|
this.nodes[next].previous = previous;
|
|
838
833
|
this.nodes[previous].next = next;
|
|
839
834
|
}
|
|
@@ -1015,7 +1010,6 @@ class Designer extends _react.Component {
|
|
|
1015
1010
|
conn.bind('click', self.handleClickOverlay);
|
|
1016
1011
|
// //console.log('0507', conn)
|
|
1017
1012
|
}
|
|
1018
|
-
|
|
1019
1013
|
addTaskToDropZone(destination, node, tasktype, copyTask, countValue) {
|
|
1020
1014
|
//console.log('1307 addTaskToDropZone', destination, node, tasktype, countValue, _count, copyTask)
|
|
1021
1015
|
if (!destination) return;
|
|
@@ -1062,7 +1056,7 @@ class Designer extends _react.Component {
|
|
|
1062
1056
|
if (position) {
|
|
1063
1057
|
if (this.nodes[source].branch >= 1) p = source;else if (this.nodes[source].type === SPECIAL_END_NODE) p = this.nodes[this.nodes[source].parent].parent;else if (this.nodes[source].parent) p = this.nodes[source].parent;
|
|
1064
1058
|
parentExpand = p;
|
|
1065
|
-
needToMoveFlowchart = (0,
|
|
1059
|
+
needToMoveFlowchart = (0, _Designer2.isFlowchartWillMove)(this.nodes, p, position, item, source, target);
|
|
1066
1060
|
}
|
|
1067
1061
|
|
|
1068
1062
|
// remove old connection -> move nodes down -> repaint
|
|
@@ -1095,7 +1089,7 @@ class Designer extends _react.Component {
|
|
|
1095
1089
|
newNode.className = 'fc-workflow--node-task-palette-item fc-item fc-item-draggable fc-item-default';
|
|
1096
1090
|
newNode.style.cssText = 'top: ' + topPosNewNode + 'px; left: ' + leftPosNewNode + 'px;';
|
|
1097
1091
|
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, "</div>");
|
|
1098
|
-
(0,
|
|
1092
|
+
(0, _Designer2.addTaskMenuIcon)(newNode);
|
|
1099
1093
|
this.container.append(newNode);
|
|
1100
1094
|
(0, _jquery.default)('.fc-workflow--node-task-palette-item').on('dragstart', function (event) {
|
|
1101
1095
|
self.draged = event.target;
|
|
@@ -1302,19 +1296,19 @@ class Designer extends _react.Component {
|
|
|
1302
1296
|
} else {
|
|
1303
1297
|
this.connectNodes(null, "node-".concat(_count, "-ep-right"), "".concat(topBranchId, "-ep-left"));
|
|
1304
1298
|
}
|
|
1305
|
-
this.connectNodes(['Custom', Object.assign({}, (0,
|
|
1299
|
+
this.connectNodes(['Custom', Object.assign({}, (0, _Designer2.overlayPlus)(topBranchId, botBranchId, i))], "".concat(topBranchId, "-ep-bottom"), "".concat(botBranchId, "-ep-top"));
|
|
1306
1300
|
this.connectNodes(null, "".concat(botBranchId, "-ep-bottom"), "".concat(endId, "-ep-top"));
|
|
1307
1301
|
nodesCornerList.push(topBranchId, botBranchId);
|
|
1308
1302
|
}
|
|
1309
|
-
this.connectNodes(['Custom', Object.assign((0,
|
|
1303
|
+
this.connectNodes(['Custom', Object.assign((0, _Designer2.overlayPlus)(endId, target, position))], "".concat(endId, "-ep-bottom"), "".concat(target, "-ep-top"));
|
|
1310
1304
|
}
|
|
1311
1305
|
|
|
1312
1306
|
// connect from source to new node
|
|
1313
1307
|
// if source has 2 branches
|
|
1314
1308
|
if (this.nodes[source].type === SPECIAL_CORNER_NODE) {
|
|
1315
|
-
this.connectNodes(['Custom', Object.assign({}, (0,
|
|
1309
|
+
this.connectNodes(['Custom', Object.assign({}, (0, _Designer2.overlayPlus)(source, "node-".concat(_count), position))], "".concat(source, "-ep-bottom"), "".concat(newNodeId, "-ep-top"));
|
|
1316
1310
|
} else {
|
|
1317
|
-
this.connectNodes(['Custom', Object.assign({}, (0,
|
|
1311
|
+
this.connectNodes(['Custom', Object.assign({}, (0, _Designer2.overlayPlus)(source, "node-".concat(_count), position))], "".concat(source, "-ep-bottom"), "node-".concat(_count, "-ep-top"));
|
|
1318
1312
|
}
|
|
1319
1313
|
if (item.wrapper) {
|
|
1320
1314
|
this.connectNodes(null, "node-".concat(_count, "-ep-left"), "".concat(lefttopId, "-ep-right"), {
|
|
@@ -1337,12 +1331,12 @@ class Designer extends _react.Component {
|
|
|
1337
1331
|
stroke: "#1565C0",
|
|
1338
1332
|
dashstyle: "2 4"
|
|
1339
1333
|
});
|
|
1340
|
-
this.connectNodes(item.wrapper ? null : ['Custom', Object.assign({}, (0,
|
|
1334
|
+
this.connectNodes(item.wrapper ? null : ['Custom', Object.assign({}, (0, _Designer2.overlayPlus)(lefttopId, leftbotId, 'left'))], "".concat(lefttopId, "-ep-bottom"), "".concat(leftbotId, "-ep-top"), {
|
|
1341
1335
|
strokeWidth: 2,
|
|
1342
1336
|
stroke: "#1565C0",
|
|
1343
1337
|
dashstyle: "2 4"
|
|
1344
1338
|
});
|
|
1345
|
-
this.connectNodes(item.wrapper ? null : ['Custom', Object.assign({}, (0,
|
|
1339
|
+
this.connectNodes(item.wrapper ? null : ['Custom', Object.assign({}, (0, _Designer2.overlayPlus)(righttopId, rightbotId, 'right'))], "".concat(righttopId, "-ep-bottom"), "".concat(rightbotId, "-ep-top"), {
|
|
1346
1340
|
strokeWidth: 2,
|
|
1347
1341
|
stroke: "#1565C0",
|
|
1348
1342
|
dashstyle: "2 4"
|
|
@@ -1350,9 +1344,9 @@ class Designer extends _react.Component {
|
|
|
1350
1344
|
}
|
|
1351
1345
|
if (branches < 1) {
|
|
1352
1346
|
if (this.nodes[target].type === SPECIAL_CORNER_NODE) {
|
|
1353
|
-
this.connectNodes(['Custom', Object.assign((0,
|
|
1347
|
+
this.connectNodes(['Custom', Object.assign((0, _Designer2.overlayPlus)("node-".concat(_count), target, position))], "node-".concat(_count, "-ep-bottom"), "".concat(target, "-ep-top"));
|
|
1354
1348
|
} else {
|
|
1355
|
-
this.connectNodes(['Custom', (0,
|
|
1349
|
+
this.connectNodes(['Custom', (0, _Designer2.overlayPlus)("node-".concat(_count), target, position)], "node-".concat(_count, "-ep-bottom"), "".concat(target, "-ep-top"));
|
|
1356
1350
|
}
|
|
1357
1351
|
}
|
|
1358
1352
|
|
|
@@ -1430,7 +1424,6 @@ class Designer extends _react.Component {
|
|
|
1430
1424
|
datatype: datatype
|
|
1431
1425
|
// code: config.taskType[datatype.parent][datatype.type].code
|
|
1432
1426
|
};
|
|
1433
|
-
|
|
1434
1427
|
if (this.nodes[newNodeId].configuration.isDisabled) {
|
|
1435
1428
|
this.nodes[newNodeId].element.classList.add('is-disabled');
|
|
1436
1429
|
}
|
|
@@ -1497,16 +1490,12 @@ class Designer extends _react.Component {
|
|
|
1497
1490
|
// ////////console.log('2605 cP ', cP)
|
|
1498
1491
|
}
|
|
1499
1492
|
}
|
|
1500
|
-
|
|
1501
1493
|
if (branches >= 1 && this.nodes["node-".concat(_count)].parent) self.expandFlowchart(this.nodes["node-".concat(_count)].parent, "node-".concat(_count), position);
|
|
1502
1494
|
this.firstInstance.repaintEverything();
|
|
1503
1495
|
////console.log(this.nodes)
|
|
1504
1496
|
// increase _count variable
|
|
1505
1497
|
_count++;
|
|
1506
1498
|
}
|
|
1507
|
-
|
|
1508
|
-
////console.log(this.nodes[this.curCopyTask], this.curCopyTask)
|
|
1509
|
-
|
|
1510
1499
|
handleClickOverlay(overlay, e, i) {
|
|
1511
1500
|
if (e.target.className.indexOf('jtk-overlay') >= 0) return;
|
|
1512
1501
|
if (!this.curCopyTask) return;
|
|
@@ -1572,7 +1561,6 @@ class Designer extends _react.Component {
|
|
|
1572
1561
|
this.nodes["node-botbranch_".concat(i, "-").concat(c)].element.style.top = "".concat(this.nodes["node-botbranch_".concat(i, "-").concat(c)].element.offsetTop + gapPlus, "px");
|
|
1573
1562
|
////////console.log('0806 move down ', this.nodes[`node-botbranch_${i}-${c}`].element.style.offsetTop)
|
|
1574
1563
|
}
|
|
1575
|
-
|
|
1576
1564
|
item = this.nodes[item].next;
|
|
1577
1565
|
continue;
|
|
1578
1566
|
}
|
|
@@ -1616,7 +1604,6 @@ class Designer extends _react.Component {
|
|
|
1616
1604
|
////////console.log(item)
|
|
1617
1605
|
}
|
|
1618
1606
|
}
|
|
1619
|
-
|
|
1620
1607
|
narrowFlowchart(deletedTask) {
|
|
1621
1608
|
let self = this;
|
|
1622
1609
|
let parent = this.nodes[deletedTask].parent;
|
|
@@ -1834,7 +1821,7 @@ class Designer extends _react.Component {
|
|
|
1834
1821
|
let itemp = item.split('-');
|
|
1835
1822
|
let endItem = "".concat(itemp[0], "-end-").concat(itemp[1]);
|
|
1836
1823
|
let width = 0;
|
|
1837
|
-
let cornerPosition = (0,
|
|
1824
|
+
let cornerPosition = (0, _Designer2.getWidthOfGroup)(self.nodes, item);
|
|
1838
1825
|
if (cornerPosition.left !== false) {
|
|
1839
1826
|
self.nodes["node-lefttop-".concat(self.nodes[item].count)].element.style.left = "".concat(cornerPosition.left - 15, "px");
|
|
1840
1827
|
self.nodes["node-leftbot-".concat(self.nodes[item].count)].element.style.left = "".concat(cornerPosition.left - 15, "px");
|
|
@@ -1887,16 +1874,16 @@ class Designer extends _react.Component {
|
|
|
1887
1874
|
}
|
|
1888
1875
|
if (this.nodes[itemId].type === 'set_variables') {
|
|
1889
1876
|
//console.log('getTaskData call')
|
|
1890
|
-
jsonData.definition.actions.push((0,
|
|
1877
|
+
jsonData.definition.actions.push((0, _Designer2.getTaskData)(this.nodes[itemId], this.nodes));
|
|
1891
1878
|
} else if (this.nodes[itemId].branch >= 1) {
|
|
1892
1879
|
let data = self.getDataBranchNode(itemId);
|
|
1893
1880
|
//console.log('0207 ---------> ', data)
|
|
1894
1881
|
// text+= `${data},\r\n`;
|
|
1895
1882
|
//console.log('getTaskData call')
|
|
1896
|
-
jsonData.definition.actions.push((0,
|
|
1883
|
+
jsonData.definition.actions.push((0, _Designer2.getTaskData)(data, this.nodes));
|
|
1897
1884
|
} else {
|
|
1898
1885
|
//console.log('getTaskData call')
|
|
1899
|
-
jsonData.definition.actions.push((0,
|
|
1886
|
+
jsonData.definition.actions.push((0, _Designer2.getTaskData)(this.nodes[itemId], this.nodes));
|
|
1900
1887
|
}
|
|
1901
1888
|
if (self.nodes[itemId].branch >= 1) {
|
|
1902
1889
|
let itemIdP = itemId.split('-');
|
|
@@ -1919,7 +1906,6 @@ class Designer extends _react.Component {
|
|
|
1919
1906
|
// downloadJSON(JSON.stringify(data, null, "\t"), 'flowchart.json', 'text/plain');
|
|
1920
1907
|
//downloadJSON(JSON.stringify(data, null, '\t'), 'flowchart.json', 'text/plain');
|
|
1921
1908
|
}
|
|
1922
|
-
|
|
1923
1909
|
getDataBranchNode(node) {
|
|
1924
1910
|
if (node === this.flexibleNode.id) {
|
|
1925
1911
|
this.flexibleNode.id = null;
|
|
@@ -1952,14 +1938,14 @@ class Designer extends _react.Component {
|
|
|
1952
1938
|
}
|
|
1953
1939
|
if (this.nodes[cNode].type === 'set_variables') {
|
|
1954
1940
|
//console.log('getTaskData call')
|
|
1955
|
-
curBranch.actions.push((0,
|
|
1941
|
+
curBranch.actions.push((0, _Designer2.getTaskData)(this.nodes[cNode], this.nodes));
|
|
1956
1942
|
} else if (self.nodes[cNode].branch >= 1) {
|
|
1957
1943
|
l = self.getDataBranchNode(cNode);
|
|
1958
1944
|
//console.log('getTaskData call')
|
|
1959
|
-
curBranch.actions.push((0,
|
|
1945
|
+
curBranch.actions.push((0, _Designer2.getTaskData)(l, this.nodes));
|
|
1960
1946
|
} else {
|
|
1961
1947
|
//console.log('getTaskData call')
|
|
1962
|
-
curBranch.actions.push((0,
|
|
1948
|
+
curBranch.actions.push((0, _Designer2.getTaskData)(this.nodes[cNode], this.nodes));
|
|
1963
1949
|
}
|
|
1964
1950
|
if (self.nodes[cNode].branch >= 1) {
|
|
1965
1951
|
cNode = "node-end-".concat(this.nodes[cNode].count);
|
|
@@ -1993,13 +1979,13 @@ class Designer extends _react.Component {
|
|
|
1993
1979
|
let l;
|
|
1994
1980
|
if (this.nodes[cNode].type === 'set_variables') {
|
|
1995
1981
|
//console.log('getTaskData call')
|
|
1996
|
-
actionsData.branches[0].actions.push((0,
|
|
1982
|
+
actionsData.branches[0].actions.push((0, _Designer2.getTaskData)(this.nodes[cNode], this.nodes));
|
|
1997
1983
|
} else if (self.nodes[cNode].branch >= 1) {
|
|
1998
1984
|
l = self.getDataBranchNode(cNode);
|
|
1999
|
-
actionsData.branches[0].actions.push((0,
|
|
1985
|
+
actionsData.branches[0].actions.push((0, _Designer2.getTaskData)(cNode, this.nodes));
|
|
2000
1986
|
} else if (self.nodes[cNode].type !== SPECIAL_END_NODE && this.nodes[cNode].type !== SPECIAL_CORNER_NODE) {
|
|
2001
1987
|
//console.log('getTaskData call')
|
|
2002
|
-
actionsData.branches[0].actions.push((0,
|
|
1988
|
+
actionsData.branches[0].actions.push((0, _Designer2.getTaskData)(this.nodes[cNode], this.nodes));
|
|
2003
1989
|
}
|
|
2004
1990
|
// if (l) data.push(l);
|
|
2005
1991
|
if (self.nodes[cNode].branch >= 1) {
|
|
@@ -2035,7 +2021,6 @@ class Designer extends _react.Component {
|
|
|
2035
2021
|
// jsonData && jsonData.definition && this.props.updateWorkflowSetting(this.importData.definition.settings);
|
|
2036
2022
|
// jsonData && jsonData.definition && this.props.updateWorkflowVariables(this.importData.definition.variables);
|
|
2037
2023
|
}
|
|
2038
|
-
|
|
2039
2024
|
updateFormVar(node, value) {
|
|
2040
2025
|
let self = this;
|
|
2041
2026
|
self.variables[node] = {};
|
|
@@ -2045,5 +2030,4 @@ class Designer extends _react.Component {
|
|
|
2045
2030
|
});
|
|
2046
2031
|
}
|
|
2047
2032
|
}
|
|
2048
|
-
var _default = Designer;
|
|
2049
|
-
exports.default = _default;
|
|
2033
|
+
var _default = exports.default = Designer;
|
package/dist/nodeconfig.js
CHANGED
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
require("core-js/modules/es.regexp.exec.js");
|
|
8
|
-
require("core-js/modules/es.string.replace.js");
|
|
9
8
|
require("core-js/modules/es.regexp.to-string.js");
|
|
9
|
+
require("core-js/modules/es.string.replace.js");
|
|
10
10
|
const uuidv4 = () => {
|
|
11
11
|
return 'xxxxx'.replace(/[xy]/g, function (c) {
|
|
12
12
|
var r = Math.random() * 16 | 0,
|
|
@@ -42,9 +42,8 @@ const defaultEdge = [{
|
|
|
42
42
|
from: "".concat(startNodeId),
|
|
43
43
|
to: "".concat(stopNodeId)
|
|
44
44
|
}];
|
|
45
|
-
var _default = {
|
|
45
|
+
var _default = exports.default = {
|
|
46
46
|
defaultNodes,
|
|
47
47
|
defaultEdge,
|
|
48
48
|
uuidv4
|
|
49
|
-
};
|
|
50
|
-
exports.default = _default;
|
|
49
|
+
};
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
require("core-js/modules/es.weak-map.js");
|
|
3
4
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.toggleDisabledTask = exports.shouldLoopNodeExpand = exports.renameTask = exports.overlayPlus = exports.isFlowchartWillMove = exports.isExpandBranchNode = exports.getWidthOfGroup = exports.getTaskData = exports.getFileNameParam = exports.generateGuid = exports.addTaskMenuIcon = void 0;
|
|
8
9
|
require("core-js/modules/es.regexp.exec.js");
|
|
9
|
-
require("core-js/modules/es.string.replace.js");
|
|
10
10
|
require("core-js/modules/es.regexp.to-string.js");
|
|
11
|
+
require("core-js/modules/es.string.replace.js");
|
|
11
12
|
require("core-js/modules/es.string.search.js");
|
|
12
13
|
var _workflow = require("./workflow.config");
|
|
13
14
|
var Designer = _interopRequireWildcard(require("../index"));
|
|
14
|
-
function _getRequireWildcardCache(
|
|
15
|
-
function _interopRequireWildcard(
|
|
16
|
-
const overlayPlus = function overlayPlus(source, target) {
|
|
15
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
16
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
|
+
const overlayPlus = exports.overlayPlus = function overlayPlus(source, target) {
|
|
17
18
|
let position = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
|
|
18
19
|
let overlay = {
|
|
19
20
|
create: component => {
|
|
@@ -31,7 +32,6 @@ const overlayPlus = function overlayPlus(source, target) {
|
|
|
31
32
|
};
|
|
32
33
|
|
|
33
34
|
// if enough space for new node -> no need move flowchart down
|
|
34
|
-
exports.overlayPlus = overlayPlus;
|
|
35
35
|
const isFlowchartWillMove = (nodes, parent, position, newNode, source, target) => {
|
|
36
36
|
let sourceH = nodes[source].element.offsetHeight;
|
|
37
37
|
let targetH = nodes[target].element.offsetHeight;
|
|
@@ -178,7 +178,6 @@ const generateGuid = () => {
|
|
|
178
178
|
d += performance.now();
|
|
179
179
|
; //use high-precision timer if available
|
|
180
180
|
}
|
|
181
|
-
|
|
182
181
|
var guid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
|
183
182
|
var r = (d + Math.random() * 16) % 16 | 0;
|
|
184
183
|
d = Math.floor(d / 16);
|
package/dist/utils/taskConfig.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.taskConfig = void 0;
|
|
7
|
-
const taskConfig = {
|
|
7
|
+
const taskConfig = exports.taskConfig = {
|
|
8
8
|
"Functions": {
|
|
9
9
|
"logMessage": {
|
|
10
10
|
"title": "Log Message",
|
|
@@ -48,6 +48,20 @@ const taskConfig = {
|
|
|
48
48
|
"branch": 0,
|
|
49
49
|
"code": []
|
|
50
50
|
},
|
|
51
|
+
"formvariable": {
|
|
52
|
+
"title": "Form variable",
|
|
53
|
+
"nodeType": "Form variable",
|
|
54
|
+
"name": "formvariable",
|
|
55
|
+
"description": "",
|
|
56
|
+
"type": "function",
|
|
57
|
+
"icon": "assistive-listening-systems",
|
|
58
|
+
"enabled": true,
|
|
59
|
+
"_comment_enabled": "",
|
|
60
|
+
"input": 1,
|
|
61
|
+
"output": 1,
|
|
62
|
+
"branch": 0,
|
|
63
|
+
"code": []
|
|
64
|
+
},
|
|
51
65
|
"toast": {
|
|
52
66
|
"title": "Toast",
|
|
53
67
|
"nodeType": "Toast",
|
|
@@ -117,6 +131,20 @@ const taskConfig = {
|
|
|
117
131
|
"output": 1,
|
|
118
132
|
"branch": 0,
|
|
119
133
|
"code": [""]
|
|
134
|
+
},
|
|
135
|
+
"pdfGenerate": {
|
|
136
|
+
"title": "PDF Generate",
|
|
137
|
+
"nodeType": "PDF Generate",
|
|
138
|
+
"name": "pdfGenerate",
|
|
139
|
+
"description": "log a message to log database...",
|
|
140
|
+
"type": "function",
|
|
141
|
+
"icon": "file-pdf-o",
|
|
142
|
+
"enabled": true,
|
|
143
|
+
"_comment_enabled": "if 'no', it will not available in the task palette",
|
|
144
|
+
"input": 1,
|
|
145
|
+
"output": 1,
|
|
146
|
+
"branch": 0,
|
|
147
|
+
"code": []
|
|
120
148
|
}
|
|
121
149
|
},
|
|
122
150
|
"Services": {
|
|
@@ -284,6 +312,18 @@ const taskConfig = {
|
|
|
284
312
|
}
|
|
285
313
|
},
|
|
286
314
|
"Integration": {
|
|
315
|
+
"SQLService": {
|
|
316
|
+
"title": "SQL Service",
|
|
317
|
+
"name": "SQL Service",
|
|
318
|
+
"nodeType": "SQL Service",
|
|
319
|
+
"description": "SQL Service",
|
|
320
|
+
"type": "service",
|
|
321
|
+
"icon": "database",
|
|
322
|
+
"enabled": true,
|
|
323
|
+
"input": 1,
|
|
324
|
+
"output": 1,
|
|
325
|
+
"branch": 0
|
|
326
|
+
},
|
|
287
327
|
"callWebService": {
|
|
288
328
|
"actionID": "ff5fbcf2-43a3-47b4-95b6-adbac3e0c4e1",
|
|
289
329
|
"title": "Call a web service",
|
|
@@ -396,5 +436,4 @@ const taskConfig = {
|
|
|
396
436
|
"code": [""]
|
|
397
437
|
}
|
|
398
438
|
}
|
|
399
|
-
};
|
|
400
|
-
exports.taskConfig = taskConfig;
|
|
439
|
+
};
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.config = void 0;
|
|
7
7
|
var _propTypes = require("prop-types");
|
|
8
8
|
var _taskConfig = require("./taskConfig");
|
|
9
|
-
const config = {
|
|
9
|
+
const config = exports.config = {
|
|
10
10
|
MAXIMUM_NESTED: 5,
|
|
11
11
|
logger: true,
|
|
12
12
|
nodeGap: 60,
|
|
@@ -172,5 +172,4 @@ const config = {
|
|
|
172
172
|
}*/
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
|
-
};
|
|
176
|
-
exports.config = config;
|
|
175
|
+
};
|