@web-utils/component 3.8.3 → 4.0.1
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/awesome-button/index.mjs +25 -55
- package/base.css +1 -1
- package/card/index.mjs +13 -13
- package/card/style.css +1 -1
- package/carousel/style.css +1 -1
- package/chat/index.mjs +2 -2
- package/chat/style.css +1 -1
- package/chunks/{ElementForm.8w6UkiuU.mjs → ElementForm.CQ3PN5qj.mjs} +17 -35
- package/chunks/{ElementListeners.DOy8wyD2.mjs → ElementListeners.De_PRuIm.mjs} +56 -95
- package/chunks/{ElementMultiInstance.3Z28ewuh.mjs → ElementMultiInstance.DQo2wuAQ.mjs} +16 -26
- package/chunks/{ElementProperties.B2I48muA.mjs → ElementProperties.CosfDrlW.mjs} +16 -16
- package/chunks/{ElementTaskConfig.MBbkLrth.mjs → ElementTaskConfig.Bko0kgTp.mjs} +104 -113
- package/chunks/{FlowCondition.BfU9kw6h.mjs → FlowCondition.Y6qEYi1T.mjs} +36 -66
- package/chunks/{FormTemp.BSpnNput.mjs → FormTemp.Bu2VCxUh.mjs} +2 -2
- package/chunks/{SignalAndMessage.CH6L7cYu.mjs → SignalAndMessage.Bb5PFX0N.mjs} +11 -22
- package/chunks/{UserTaskListeners.XXe5dC5I.mjs → UserTaskListeners.Bv3BDfEI.mjs} +45 -86
- package/chunks/configComponents.BDhlZU8F.mjs +23 -0
- package/chunks/confirmable-mixin.D9aKzKZ9.mjs +85 -0
- package/chunks/core.DJEgjQW6.mjs +54 -0
- package/chunks/{dataformat.B9UvztrQ.mjs → dataformat.CpqOeGBl.mjs} +2 -2
- package/chunks/{dic.CET0XdKP.mjs → dic.Dkl-leRW.mjs} +43 -43
- package/chunks/dictionary.DqiP9x2m.mjs +25 -0
- package/chunks/{event.BT1F_1vF.mjs → event.9aDS6jcw.mjs} +2 -2
- package/chunks/form-input.B8z37eqj.mjs +31 -0
- package/chunks/form-item.D-H-wCPE.mjs +233 -0
- package/chunks/form-validate.CVarNHKX.mjs +12 -0
- package/chunks/helper.BiMLcEEk.mjs +41 -0
- package/chunks/index.9OxHjTIE.mjs +16 -0
- package/chunks/{index.MAFc4eFi.mjs → index.d3MV3Wq2.mjs} +43 -47
- package/chunks/{init.ofpxEyAI.mjs → init.DAsXSoLW.mjs} +2 -2
- package/chunks/{packages.CWPkeLu9.mjs → packages.ByyangTp.mjs} +3 -3
- package/chunks/sub-table-plus-props.BVsD71hT.mjs +30 -0
- package/chunks/{tab-mixin.CVr9bZtn.mjs → tab-mixin.BNK6dxLN.mjs} +1 -1
- package/chunks/{util.CoahLDYn.mjs → util.DqFv_pWg.mjs} +54 -55
- package/chunks/utilSelf.Csq1766E.mjs +48 -0
- package/color-picker/index.mjs +19 -37
- package/comment/style.css +1 -1
- package/confirm-button/index.mjs +1 -1
- package/confirmable/index.mjs +1 -1
- package/context-menu/style.css +1 -1
- package/count-up/index.mjs +13 -24
- package/custom-scrollbar/index.mjs +1 -2
- package/data-operatext/style.css +1 -1
- package/data-panel/style.css +1 -1
- package/data-pay/style.css +1 -1
- package/data-price/style.css +1 -1
- package/data-rotate/style.css +1 -1
- package/data-table-picker/index.mjs +1 -1
- package/data-tabs/style.css +1 -1
- package/dialog-form/index.mjs +16 -28
- package/dynamic-table/style.css +1 -1
- package/easy-popup/index.mjs +22 -40
- package/easy-popup/style.css +1 -1
- package/editable-tree/index.mjs +203 -250
- package/editable-tree/style.css +1 -1
- package/element-dialog/index.mjs +30 -52
- package/element-dialog/style.css +1 -1
- package/flex-column/index.mjs +13 -25
- package/flex-item/index.mjs +15 -27
- package/flex-row/index.mjs +13 -25
- package/flow/index.mjs +30 -32
- package/flow-designer/index.mjs +344 -375
- package/flow-designer/style.css +1 -1
- package/flow-node/index.mjs +1 -1
- package/flow-viewer/index.mjs +64 -91
- package/form-block/index.mjs +33 -26
- package/form-card/index.mjs +25 -0
- package/form-cascader/index.mjs +70 -67
- package/form-checkbox/index.mjs +71 -0
- package/form-checkbox-group/index.mjs +33 -53
- package/form-date-picker/index.mjs +44 -73
- package/form-holder/index.mjs +60 -64
- package/form-holder/style.css +1 -0
- package/form-input/index.mjs +62 -40
- package/form-input-cron-expression/index.mjs +77 -0
- package/form-input-cron-expression/style.css +1 -0
- package/form-input-email/index.mjs +21 -33
- package/form-input-id-card/index.mjs +25 -38
- package/form-input-number/index.mjs +39 -42
- package/form-input-number/style.css +1 -1
- package/form-input-phone-number/index.mjs +26 -37
- package/form-input-tag/index.mjs +32 -34
- package/form-input-time/index.mjs +22 -37
- package/form-item/index.mjs +109 -101
- package/form-item/style.css +1 -1
- package/form-item-config-provider/index.mjs +18 -10
- package/form-item-group/index.mjs +73 -69
- package/form-item-group/style.css +1 -1
- package/form-radio-group/index.mjs +41 -36
- package/form-radio-group/style.css +1 -1
- package/form-select/index.mjs +142 -75
- package/form-select/style.css +1 -0
- package/form-switch/index.mjs +29 -34
- package/form-table/index.mjs +85 -0
- package/form-table-plus/index.mjs +109 -0
- package/form-textarea/index.mjs +23 -35
- package/form-tree-select/index.mjs +72 -0
- package/form-tree-select/style.css +1 -0
- package/form-tree-select-multiple/index.mjs +78 -0
- package/form-view/index.mjs +43 -77
- package/form-view/style.css +1 -1
- package/fy-array/index.mjs +2 -2
- package/fy-cascader/index.mjs +1 -1
- package/fy-checkbox/index.mjs +1 -1
- package/fy-code/index.mjs +1 -1
- package/fy-curd/index.mjs +12 -17
- package/fy-curd/style.css +1 -1
- package/fy-date/index.mjs +1 -1
- package/fy-draggable/index.mjs +5 -7
- package/fy-draggable/style.css +1 -1
- package/fy-dynamic/index.mjs +14 -16
- package/fy-empty/index.mjs +1 -1
- package/fy-empty/style.css +1 -1
- package/fy-form/index.mjs +117 -136
- package/fy-form/style.css +1 -1
- package/fy-form-design/index.mjs +319 -345
- package/fy-form-design/style.css +1 -1
- package/fy-input/index.mjs +2 -2
- package/fy-input-color/index.mjs +1 -1
- package/fy-input-icon/index.mjs +1 -1
- package/fy-input-map/index.mjs +21 -26
- package/fy-input-map/style.css +1 -1
- package/fy-input-number/index.mjs +1 -1
- package/fy-input-table/index.mjs +10 -12
- package/fy-input-tree/index.mjs +1 -1
- package/fy-radio/index.mjs +1 -1
- package/fy-rate/index.mjs +1 -1
- package/fy-select/index.mjs +4 -4
- package/fy-slider/index.mjs +2 -2
- package/fy-switch/index.mjs +1 -1
- package/fy-tabs/index.mjs +0 -1
- package/fy-time/index.mjs +1 -1
- package/fy-title/index.mjs +1 -1
- package/fy-tree/index.mjs +1 -1
- package/fy-u-editor/index.mjs +77 -103
- package/fy-upload/index.mjs +3 -3
- package/fy-upload/style.css +1 -1
- package/highlight-j-s/index.mjs +1 -1
- package/highlight-j-s/style.css +1 -1
- package/image-cropper/index.mjs +14 -65
- package/image-preview/index.mjs +17 -45
- package/image-preview/style.css +1 -1
- package/image-viewer/style.css +1 -1
- package/index.mjs +666 -496
- package/input-number/index.mjs +64 -9
- package/keyboard/style.css +1 -1
- package/license/index.mjs +1 -1
- package/login/index.mjs +1 -1
- package/monaco-editor/index.mjs +44 -74
- package/name-avatar/style.css +1 -1
- package/package.json +18 -17
- package/page-index/index.mjs +30 -54
- package/page-index-top/index.mjs +25 -47
- package/pageable-table/index.mjs +354 -226
- package/pageable-table/style.css +1 -1
- package/pageable-view/index.mjs +63 -106
- package/photo-swipe/index.mjs +51 -74
- package/picker-table-view/index.mjs +117 -0
- package/present-view/index.mjs +43 -77
- package/present-view/style.css +1 -1
- package/record-video/index.mjs +1 -1
- package/resize-observer/index.mjs +1 -1
- package/resize-observer/style.css +1 -1
- package/search/index.mjs +2 -2
- package/search/style.css +1 -1
- package/search-popover/index.mjs +28 -48
- package/search-popover/style.css +1 -1
- package/sign/index.mjs +2 -2
- package/sign-panel/style.css +1 -1
- package/skeleton-panel/index.mjs +38 -0
- package/skeleton-panel/style.css +1 -0
- package/split-pane/index.mjs +31 -49
- package/split-pane/style.css +1 -1
- package/sub-table/index.mjs +206 -0
- package/sub-table/style.css +1 -0
- package/sub-table-plus/index.mjs +231 -0
- package/sub-table-plus/style.css +1 -0
- package/swiper/index.mjs +18 -38
- package/swiper/style.css +1 -1
- package/tab/index.mjs +1 -1
- package/tab/style.css +1 -1
- package/tab-item/index.mjs +2 -2
- package/table-column/index.mjs +112 -37
- package/table-column/style.css +1 -0
- package/table-view/index.mjs +178 -135
- package/table-view/style.css +1 -1
- package/tabs-view/index.mjs +104 -0
- package/tabs-view/style.css +1 -0
- package/tag-render/index.mjs +13 -24
- package/text-ellipsis/index.mjs +1 -1
- package/toolbar/index.mjs +115 -58
- package/toolbar/style.css +1 -1
- package/toolbar-button/index.mjs +92 -48
- package/verify/index.mjs +1 -1
- package/vue-cron/index.mjs +48 -66
- package/vue-qr-code/index.mjs +14 -32
- package/vue-quill-editor/index.mjs +3 -3
- package/vue-tags-input/index.mjs +1 -1
- package/vue-tree-select/index.mjs +352 -393
- package/vue-tree-select/style.css +1 -1
- package/vue-video-player/index.mjs +36 -67
- package/watermark/index.mjs +21 -31
- package/web-types.json +9240 -3843
- package/x-input-tag/index.mjs +29 -61
- package/chunks/confirmable-mixin.D4LAArE5.mjs +0 -114
- package/chunks/form-input-mixin.BkKiqJhi.mjs +0 -24
- package/chunks/form-item-mixin.CG4ZwzMC.mjs +0 -140
- package/chunks/input-number-mixin.CzjtGf2n.mjs +0 -60
- package/chunks/utilSelf.CRqpl0Cz.mjs +0 -56
- package/toolbar-button/style.css +0 -1
- /package/chunks/{form-pick-mixin.BFTIVn_i.mjs → form-pick.BFTIVn_i.mjs} +0 -0
package/flow-designer/index.mjs
CHANGED
|
@@ -1,66 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}, L = (n, e) => be(n, ge(e));
|
|
13
|
-
var w = (n, e, t) => new Promise((i, r) => {
|
|
14
|
-
var a = (m) => {
|
|
15
|
-
try {
|
|
16
|
-
o(t.next(m));
|
|
17
|
-
} catch (g) {
|
|
18
|
-
r(g);
|
|
19
|
-
}
|
|
20
|
-
}, l = (m) => {
|
|
21
|
-
try {
|
|
22
|
-
o(t.throw(m));
|
|
23
|
-
} catch (g) {
|
|
24
|
-
r(g);
|
|
25
|
-
}
|
|
26
|
-
}, o = (m) => m.done ? i(m.value) : Promise.resolve(m.value).then(a, l);
|
|
27
|
-
o((t = t.apply(n, e)).next());
|
|
28
|
-
});
|
|
29
|
-
import { assign as y, isArray as Se, forEach as Ae, isObject as he, isFunction as Ee, some as T } from "min-dash";
|
|
30
|
-
import { is as R } from "bpmn-js/lib/util/ModelUtil";
|
|
31
|
-
import { isExpanded as Te, isEventSubProcess as Ce } from "bpmn-js/lib/util/DiUtil";
|
|
32
|
-
import { isAny as z } from "bpmn-js/lib/features/modeling/util/ModelingUtil";
|
|
33
|
-
import { getChildLanes as xe } from "bpmn-js/lib/features/modeling/util/LaneUtil";
|
|
34
|
-
import { hasPrimaryModifier as Ie } from "diagram-js/lib/util/Mouse";
|
|
35
|
-
import le from "bpmn-js/lib/features/palette/PaletteProvider";
|
|
36
|
-
import j from "diagram-js/lib/features/auto-place/AutoPlace";
|
|
37
|
-
import { getMid as Pe, asTRBL as we } from "diagram-js/lib/layout/LayoutUtil";
|
|
38
|
-
import { markRaw as N } from "vue";
|
|
39
|
-
import { n as J } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
1
|
+
import { assign as d, isArray as pe, forEach as me, isObject as ue, isFunction as ce, some as T } from "min-dash";
|
|
2
|
+
import { is as O } from "bpmn-js/lib/util/ModelUtil";
|
|
3
|
+
import { isExpanded as de, isEventSubProcess as ye } from "bpmn-js/lib/util/DiUtil";
|
|
4
|
+
import { isAny as $ } from "bpmn-js/lib/features/modeling/util/ModelingUtil";
|
|
5
|
+
import { getChildLanes as be } from "bpmn-js/lib/features/modeling/util/LaneUtil";
|
|
6
|
+
import { hasPrimaryModifier as ge } from "diagram-js/lib/util/Mouse";
|
|
7
|
+
import ie from "bpmn-js/lib/features/palette/PaletteProvider";
|
|
8
|
+
import z from "diagram-js/lib/features/auto-place/AutoPlace";
|
|
9
|
+
import { getMid as fe, asTRBL as ve } from "diagram-js/lib/layout/LayoutUtil";
|
|
10
|
+
import { markRaw as R } from "vue";
|
|
11
|
+
import { n as U } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
40
12
|
import "bpmn-js/dist/assets/bpmn-js.css";
|
|
41
13
|
import "bpmn-js/dist/assets/diagram-js.css";
|
|
42
14
|
import "bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css";
|
|
43
15
|
import "bpmn-js-token-simulation/assets/css/bpmn-js-token-simulation.css";
|
|
44
|
-
import
|
|
45
|
-
import
|
|
46
|
-
import
|
|
47
|
-
import
|
|
48
|
-
import
|
|
49
|
-
import
|
|
50
|
-
import
|
|
51
|
-
import { isArray as
|
|
52
|
-
import
|
|
16
|
+
import Se from "bpmn-js/lib/Modeler";
|
|
17
|
+
import Ae from "bpmn-js/lib/features/drilldown";
|
|
18
|
+
import he from "bpmn-js-token-simulation";
|
|
19
|
+
import X from "x2js";
|
|
20
|
+
import re from "highlight.js/lib/core";
|
|
21
|
+
import Ee from "highlight.js/lib/languages/xml";
|
|
22
|
+
import Te from "highlight.js/lib/languages/json";
|
|
23
|
+
import { isArray as K } from "@web-utils/core";
|
|
24
|
+
import Ce from "../highlight-j-s/index.mjs";
|
|
53
25
|
import "../highlight-j-s/style.css";
|
|
54
|
-
function
|
|
55
|
-
n = n || {}, i.registerProvider(this), this._contextPad = i, this._modeling = r, this._elementFactory = a, this._connect =
|
|
56
|
-
const A =
|
|
57
|
-
if (!
|
|
26
|
+
function G(n, e, t, i, r, a, p, o, y, S, l, s, m) {
|
|
27
|
+
n = n || {}, i.registerProvider(this), this._contextPad = i, this._modeling = r, this._elementFactory = a, this._connect = p, this._create = o, this._popupMenu = y, this._canvas = S, this._rules = l, this._translate = s, n.autoPlace !== !1 && (this._autoPlace = e.get("autoPlace", !1)), t.on("create.end", 250, function(g) {
|
|
28
|
+
const A = g.context.shape;
|
|
29
|
+
if (!ge(g) || !i.isOpen(A))
|
|
58
30
|
return;
|
|
59
|
-
const
|
|
60
|
-
|
|
31
|
+
const u = i.getEntries(A);
|
|
32
|
+
u.replace && u.replace.action.click(g, A);
|
|
61
33
|
});
|
|
62
34
|
}
|
|
63
|
-
|
|
35
|
+
G.$inject = [
|
|
64
36
|
"config.contextPad",
|
|
65
37
|
"injector",
|
|
66
38
|
"eventBus",
|
|
@@ -75,241 +47,241 @@ Z.$inject = [
|
|
|
75
47
|
"translate",
|
|
76
48
|
"elementRegistry"
|
|
77
49
|
];
|
|
78
|
-
|
|
79
|
-
const e = this._contextPad, t = this._modeling, i = this._elementFactory, r = this._connect, a = this._create,
|
|
50
|
+
G.prototype.getContextPadEntries = function(n) {
|
|
51
|
+
const e = this._contextPad, t = this._modeling, i = this._elementFactory, r = this._connect, a = this._create, p = this._popupMenu, o = this._canvas, y = this._rules, S = this._autoPlace, l = this._translate, s = {};
|
|
80
52
|
if (n.type === "label")
|
|
81
53
|
return s;
|
|
82
|
-
const
|
|
83
|
-
function
|
|
84
|
-
r.start(
|
|
54
|
+
const m = n.businessObject;
|
|
55
|
+
function g(c, v) {
|
|
56
|
+
r.start(c, v);
|
|
85
57
|
}
|
|
86
|
-
function
|
|
58
|
+
function w() {
|
|
87
59
|
t.removeElements([n]);
|
|
88
60
|
}
|
|
89
|
-
function A(
|
|
90
|
-
const b = o.getContainer(), x = e.getPad(
|
|
61
|
+
function A(c) {
|
|
62
|
+
const b = o.getContainer(), x = e.getPad(c).html, I = b.getBoundingClientRect(), _ = x.getBoundingClientRect(), M = _.top - I.top;
|
|
91
63
|
return {
|
|
92
|
-
x:
|
|
93
|
-
y:
|
|
64
|
+
x: _.left - I.left,
|
|
65
|
+
y: M + _.height + 5
|
|
94
66
|
};
|
|
95
67
|
}
|
|
96
|
-
function c
|
|
97
|
-
typeof b != "string" && (x = b, b =
|
|
98
|
-
function I(
|
|
99
|
-
const
|
|
100
|
-
a.start(
|
|
101
|
-
source:
|
|
68
|
+
function u(c, v, b, x) {
|
|
69
|
+
typeof b != "string" && (x = b, b = l("Append {type}", { type: c.replace(/^bpmn:/, "") }));
|
|
70
|
+
function I(M, D) {
|
|
71
|
+
const B = i.createShape(d({ type: c }, x));
|
|
72
|
+
a.start(M, B, {
|
|
73
|
+
source: D
|
|
102
74
|
});
|
|
103
75
|
}
|
|
104
76
|
return {
|
|
105
77
|
group: "model",
|
|
106
|
-
className:
|
|
78
|
+
className: v,
|
|
107
79
|
title: b,
|
|
108
80
|
action: {
|
|
109
81
|
dragstart: I,
|
|
110
|
-
click:
|
|
111
|
-
const
|
|
112
|
-
|
|
82
|
+
click: S ? function(M, D) {
|
|
83
|
+
const B = i.createShape(d({ type: c }, x));
|
|
84
|
+
S.append(D, B);
|
|
113
85
|
} : I
|
|
114
86
|
}
|
|
115
87
|
};
|
|
116
88
|
}
|
|
117
|
-
function
|
|
118
|
-
return function(
|
|
119
|
-
t.splitLane(b,
|
|
89
|
+
function k(c) {
|
|
90
|
+
return function(v, b) {
|
|
91
|
+
t.splitLane(b, c), e.open(b, !0);
|
|
120
92
|
};
|
|
121
93
|
}
|
|
122
|
-
if (
|
|
123
|
-
const
|
|
124
|
-
|
|
94
|
+
if ($(m, ["bpmn:Lane", "bpmn:Participant"]) && de(m)) {
|
|
95
|
+
const c = be(n);
|
|
96
|
+
d(s, {
|
|
125
97
|
"lane-insert-above": {
|
|
126
98
|
group: "lane-insert-above",
|
|
127
99
|
className: "bpmn-icon-lane-insert-above",
|
|
128
|
-
title:
|
|
100
|
+
title: l("Add Lane above"),
|
|
129
101
|
action: {
|
|
130
|
-
click: function(
|
|
102
|
+
click: function(v, b) {
|
|
131
103
|
t.addLane(b, "top");
|
|
132
104
|
}
|
|
133
105
|
}
|
|
134
106
|
}
|
|
135
|
-
}),
|
|
107
|
+
}), c.length < 2 && (n.height >= 120 && d(s, {
|
|
136
108
|
"lane-divide-two": {
|
|
137
109
|
group: "lane-divide",
|
|
138
110
|
className: "bpmn-icon-lane-divide-two",
|
|
139
|
-
title:
|
|
111
|
+
title: l("Divide into two Lanes"),
|
|
140
112
|
action: {
|
|
141
|
-
click:
|
|
113
|
+
click: k(2)
|
|
142
114
|
}
|
|
143
115
|
}
|
|
144
|
-
}), n.height >= 180 &&
|
|
116
|
+
}), n.height >= 180 && d(s, {
|
|
145
117
|
"lane-divide-three": {
|
|
146
118
|
group: "lane-divide",
|
|
147
119
|
className: "bpmn-icon-lane-divide-three",
|
|
148
|
-
title:
|
|
120
|
+
title: l("Divide into three Lanes"),
|
|
149
121
|
action: {
|
|
150
|
-
click:
|
|
122
|
+
click: k(3)
|
|
151
123
|
}
|
|
152
124
|
}
|
|
153
|
-
})),
|
|
125
|
+
})), d(s, {
|
|
154
126
|
"lane-insert-below": {
|
|
155
127
|
group: "lane-insert-below",
|
|
156
128
|
className: "bpmn-icon-lane-insert-below",
|
|
157
|
-
title:
|
|
129
|
+
title: l("Add Lane below"),
|
|
158
130
|
action: {
|
|
159
|
-
click: function(
|
|
131
|
+
click: function(v, b) {
|
|
160
132
|
t.addLane(b, "bottom");
|
|
161
133
|
}
|
|
162
134
|
}
|
|
163
135
|
}
|
|
164
136
|
});
|
|
165
137
|
}
|
|
166
|
-
|
|
167
|
-
"append.receive-task":
|
|
168
|
-
"append.message-intermediate-event":
|
|
138
|
+
O(m, "bpmn:FlowNode") && (O(m, "bpmn:EventBasedGateway") ? d(s, {
|
|
139
|
+
"append.receive-task": u("bpmn:ReceiveTask", "bpmn-icon-receive-task", l("Append ReceiveTask")),
|
|
140
|
+
"append.message-intermediate-event": u(
|
|
169
141
|
"bpmn:IntermediateCatchEvent",
|
|
170
142
|
"bpmn-icon-intermediate-event-catch-message",
|
|
171
|
-
|
|
143
|
+
l("Append MessageIntermediateCatchEvent"),
|
|
172
144
|
{ eventDefinitionType: "bpmn:MessageEventDefinition" }
|
|
173
145
|
),
|
|
174
|
-
"append.timer-intermediate-event":
|
|
146
|
+
"append.timer-intermediate-event": u(
|
|
175
147
|
"bpmn:IntermediateCatchEvent",
|
|
176
148
|
"bpmn-icon-intermediate-event-catch-timer",
|
|
177
|
-
|
|
149
|
+
l("Append TimerIntermediateCatchEvent"),
|
|
178
150
|
{ eventDefinitionType: "bpmn:TimerEventDefinition" }
|
|
179
151
|
),
|
|
180
|
-
"append.condition-intermediate-event":
|
|
152
|
+
"append.condition-intermediate-event": u(
|
|
181
153
|
"bpmn:IntermediateCatchEvent",
|
|
182
154
|
"bpmn-icon-intermediate-event-catch-condition",
|
|
183
|
-
|
|
155
|
+
l("Append ConditionIntermediateCatchEvent"),
|
|
184
156
|
{ eventDefinitionType: "bpmn:ConditionalEventDefinition" }
|
|
185
157
|
),
|
|
186
|
-
"append.signal-intermediate-event":
|
|
158
|
+
"append.signal-intermediate-event": u(
|
|
187
159
|
"bpmn:IntermediateCatchEvent",
|
|
188
160
|
"bpmn-icon-intermediate-event-catch-signal",
|
|
189
|
-
|
|
161
|
+
l("Append SignalIntermediateCatchEvent"),
|
|
190
162
|
{ eventDefinitionType: "bpmn:SignalEventDefinition" }
|
|
191
163
|
)
|
|
192
|
-
}) :
|
|
193
|
-
"append.compensation-activity":
|
|
164
|
+
}) : Y(m, "bpmn:BoundaryEvent", "bpmn:CompensateEventDefinition") ? d(s, {
|
|
165
|
+
"append.compensation-activity": u("bpmn:Task", "bpmn-icon-task", l("Append compensation activity"), {
|
|
194
166
|
isForCompensation: !0
|
|
195
167
|
})
|
|
196
|
-
}) : !
|
|
197
|
-
"append.end-event":
|
|
198
|
-
"append.gateway":
|
|
199
|
-
"append.append-task":
|
|
200
|
-
"append.intermediate-event":
|
|
168
|
+
}) : !O(m, "bpmn:EndEvent") && !m.isForCompensation && !Y(m, "bpmn:IntermediateThrowEvent", "bpmn:LinkEventDefinition") && !ye(m) && d(s, {
|
|
169
|
+
"append.end-event": u("bpmn:EndEvent", "bpmn-icon-end-event-none", l("Append EndEvent")),
|
|
170
|
+
"append.gateway": u("bpmn:ExclusiveGateway", "bpmn-icon-gateway-none", l("Append Gateway")),
|
|
171
|
+
"append.append-task": u("bpmn:UserTask", "bpmn-icon-user-task", l("Append Task")),
|
|
172
|
+
"append.intermediate-event": u(
|
|
201
173
|
"bpmn:IntermediateThrowEvent",
|
|
202
174
|
"bpmn-icon-intermediate-event-none",
|
|
203
|
-
|
|
175
|
+
l("Append Intermediate/Boundary Event")
|
|
204
176
|
)
|
|
205
|
-
})),
|
|
177
|
+
})), p.isEmpty(n, "bpmn-replace") || d(s, {
|
|
206
178
|
replace: {
|
|
207
179
|
group: "edit",
|
|
208
180
|
className: "bpmn-icon-screw-wrench",
|
|
209
|
-
title:
|
|
181
|
+
title: l("Change type"),
|
|
210
182
|
action: {
|
|
211
|
-
click: function(
|
|
212
|
-
const b =
|
|
213
|
-
cursor: { x:
|
|
183
|
+
click: function(c, v) {
|
|
184
|
+
const b = d(A(v), {
|
|
185
|
+
cursor: { x: c.x, y: c.y }
|
|
214
186
|
});
|
|
215
|
-
|
|
187
|
+
p.open(v, "bpmn-replace", b);
|
|
216
188
|
}
|
|
217
189
|
}
|
|
218
190
|
}
|
|
219
|
-
}),
|
|
220
|
-
"append.text-annotation":
|
|
191
|
+
}), $(m, ["bpmn:FlowNode", "bpmn:InteractionNode", "bpmn:DataObjectReference", "bpmn:DataStoreReference"]) && d(s, {
|
|
192
|
+
"append.text-annotation": u("bpmn:TextAnnotation", "bpmn-icon-text-annotation"),
|
|
221
193
|
connect: {
|
|
222
194
|
group: "connect",
|
|
223
195
|
className: "bpmn-icon-connection-multi",
|
|
224
|
-
title:
|
|
196
|
+
title: l(`Connect using ${m.isForCompensation ? "" : "Sequence/MessageFlow or "}Association`),
|
|
225
197
|
action: {
|
|
226
|
-
click:
|
|
227
|
-
dragstart:
|
|
198
|
+
click: g,
|
|
199
|
+
dragstart: g
|
|
228
200
|
}
|
|
229
201
|
}
|
|
230
|
-
}),
|
|
202
|
+
}), $(m, ["bpmn:DataObjectReference", "bpmn:DataStoreReference"]) && d(s, {
|
|
231
203
|
connect: {
|
|
232
204
|
group: "connect",
|
|
233
205
|
className: "bpmn-icon-connection-multi",
|
|
234
|
-
title:
|
|
206
|
+
title: l("Connect using DataInputAssociation"),
|
|
235
207
|
action: {
|
|
236
|
-
click:
|
|
237
|
-
dragstart:
|
|
208
|
+
click: g,
|
|
209
|
+
dragstart: g
|
|
238
210
|
}
|
|
239
211
|
}
|
|
240
|
-
}),
|
|
241
|
-
"append.text-annotation":
|
|
212
|
+
}), O(m, "bpmn:Group") && d(s, {
|
|
213
|
+
"append.text-annotation": u("bpmn:TextAnnotation", "bpmn-icon-text-annotation")
|
|
242
214
|
});
|
|
243
|
-
let h =
|
|
244
|
-
return
|
|
215
|
+
let h = y.allowed("elements.delete", { elements: [n] });
|
|
216
|
+
return pe(h) && (h = h[0] === n), h && d(s, {
|
|
245
217
|
delete: {
|
|
246
218
|
group: "edit",
|
|
247
219
|
className: "bpmn-icon-trash",
|
|
248
|
-
title:
|
|
220
|
+
title: l("Remove"),
|
|
249
221
|
action: {
|
|
250
|
-
click:
|
|
222
|
+
click: w
|
|
251
223
|
}
|
|
252
224
|
}
|
|
253
225
|
}), s;
|
|
254
226
|
};
|
|
255
|
-
function
|
|
227
|
+
function Y(n, e, t) {
|
|
256
228
|
const i = n.$instanceOf(e);
|
|
257
229
|
let r = !1;
|
|
258
230
|
const a = n.eventDefinitions || [];
|
|
259
|
-
return
|
|
260
|
-
|
|
231
|
+
return me(a, function(p) {
|
|
232
|
+
p.$type === t && (r = !0);
|
|
261
233
|
}), i && r;
|
|
262
234
|
}
|
|
263
|
-
const
|
|
235
|
+
const xe = {
|
|
264
236
|
__init__: ["contextPadProvider"],
|
|
265
|
-
contextPadProvider: ["type",
|
|
237
|
+
contextPadProvider: ["type", G]
|
|
266
238
|
};
|
|
267
|
-
function
|
|
268
|
-
|
|
239
|
+
function P(n, e, t, i, r, a, p, o, y) {
|
|
240
|
+
ie.call(this, n, e, t, i, r, a, p, o, y, 2e3), this._create = e, this._elementFactory = t, this._spaceTool = i, this._lassoTool = r, this._handTool = a, this._globalConnect = p, this._moddle = o, this._translate = y;
|
|
269
241
|
}
|
|
270
|
-
const
|
|
242
|
+
const j = function() {
|
|
271
243
|
};
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
const n = {}, e = this._create, t = this._elementFactory, i = this._spaceTool, r = this._lassoTool, a = this._handTool,
|
|
275
|
-
function
|
|
276
|
-
function
|
|
277
|
-
const
|
|
278
|
-
s === "bpmn:UserTask" && (
|
|
244
|
+
j.prototype = ie.prototype;
|
|
245
|
+
j.prototype.getPaletteEntries = function() {
|
|
246
|
+
const n = {}, e = this._create, t = this._elementFactory, i = this._spaceTool, r = this._lassoTool, a = this._handTool, p = this._globalConnect, o = this._translate;
|
|
247
|
+
function y(s, m, g, w, A) {
|
|
248
|
+
function u(h) {
|
|
249
|
+
const c = t.createShape(d({ type: s }, A));
|
|
250
|
+
s === "bpmn:UserTask" && (c.businessObject.candidateUsers = "${handlers}"), e.start(h, c);
|
|
279
251
|
}
|
|
280
|
-
const
|
|
252
|
+
const k = s.replace(/^bpmn:/, "");
|
|
281
253
|
return {
|
|
282
|
-
group:
|
|
283
|
-
className:
|
|
284
|
-
title:
|
|
254
|
+
group: m,
|
|
255
|
+
className: g,
|
|
256
|
+
title: w || o("Create {type}", { type: k }),
|
|
285
257
|
action: {
|
|
286
|
-
dragstart:
|
|
287
|
-
click:
|
|
258
|
+
dragstart: u,
|
|
259
|
+
click: u
|
|
288
260
|
}
|
|
289
261
|
};
|
|
290
262
|
}
|
|
291
|
-
function
|
|
292
|
-
const
|
|
263
|
+
function S(s) {
|
|
264
|
+
const m = t.createShape({
|
|
293
265
|
type: "bpmn:SubProcess",
|
|
294
266
|
x: 0,
|
|
295
267
|
y: 0,
|
|
296
268
|
isExpanded: !0
|
|
297
|
-
}),
|
|
269
|
+
}), g = t.createShape({
|
|
298
270
|
type: "bpmn:StartEvent",
|
|
299
271
|
x: 40,
|
|
300
272
|
y: 82,
|
|
301
|
-
parent:
|
|
273
|
+
parent: m
|
|
302
274
|
});
|
|
303
|
-
e.start(s, [
|
|
275
|
+
e.start(s, [m, g], {
|
|
304
276
|
hints: {
|
|
305
|
-
autoSelect: [
|
|
277
|
+
autoSelect: [g]
|
|
306
278
|
}
|
|
307
279
|
});
|
|
308
280
|
}
|
|
309
|
-
function
|
|
281
|
+
function l(s) {
|
|
310
282
|
e.start(s, t.createParticipantShape());
|
|
311
283
|
}
|
|
312
|
-
return
|
|
284
|
+
return d(n, {
|
|
313
285
|
"hand-tool": {
|
|
314
286
|
group: "tools",
|
|
315
287
|
className: "bpmn-icon-hand-tool",
|
|
@@ -346,21 +318,21 @@ H.prototype.getPaletteEntries = function() {
|
|
|
346
318
|
title: o("Activate the global connect tool"),
|
|
347
319
|
action: {
|
|
348
320
|
click: function(s) {
|
|
349
|
-
|
|
321
|
+
p.toggle(s);
|
|
350
322
|
}
|
|
351
323
|
}
|
|
352
324
|
},
|
|
353
325
|
"tool-separator": { group: "tools", separator: !0 },
|
|
354
|
-
"create.start-event":
|
|
355
|
-
"create.intermediate-event":
|
|
326
|
+
"create.start-event": y("bpmn:StartEvent", "event", "bpmn-icon-start-event-none", o("Create StartEvent")),
|
|
327
|
+
"create.intermediate-event": y(
|
|
356
328
|
"bpmn:IntermediateThrowEvent",
|
|
357
329
|
"event",
|
|
358
330
|
"bpmn-icon-intermediate-event-none",
|
|
359
331
|
o("Create Intermediate/Boundary Event")
|
|
360
332
|
),
|
|
361
|
-
"create.user-task":
|
|
362
|
-
"create.exclusive-gateway":
|
|
363
|
-
"create.end-event":
|
|
333
|
+
"create.user-task": y("bpmn:UserTask", "activity", "bpmn-icon-user-task", o("Create User Task")),
|
|
334
|
+
"create.exclusive-gateway": y("bpmn:ExclusiveGateway", "activity", "bpmn-icon-gateway-none", o("Create Gateway")),
|
|
335
|
+
"create.end-event": y("bpmn:EndEvent", "activity", "bpmn-icon-end-event-none", o("Create EndEvent")),
|
|
364
336
|
// 'create.sql-task': createAction('user:MySql', 'activity', 'bpmn-icon-mysql', 'MySQL 节点'),
|
|
365
337
|
// 'create.data-object': createAction('bpmn:DataObjectReference', 'data-object', 'bpmn-icon-data-object', translate('Create DataObjectReference')),
|
|
366
338
|
// 'create.data-store': createAction('bpmn:DataStoreReference', 'data-store', 'bpmn-icon-data-store', translate('Create DataStoreReference')),
|
|
@@ -370,8 +342,8 @@ H.prototype.getPaletteEntries = function() {
|
|
|
370
342
|
className: "bpmn-icon-subprocess-expanded",
|
|
371
343
|
title: o("Create expanded SubProcess"),
|
|
372
344
|
action: {
|
|
373
|
-
dragstart:
|
|
374
|
-
click:
|
|
345
|
+
dragstart: S,
|
|
346
|
+
click: S
|
|
375
347
|
}
|
|
376
348
|
},
|
|
377
349
|
"create.participant-expanded": {
|
|
@@ -379,24 +351,24 @@ H.prototype.getPaletteEntries = function() {
|
|
|
379
351
|
className: "bpmn-icon-participant",
|
|
380
352
|
title: o("Create Pool/Participant"),
|
|
381
353
|
action: {
|
|
382
|
-
dragstart:
|
|
383
|
-
click:
|
|
354
|
+
dragstart: l,
|
|
355
|
+
click: l
|
|
384
356
|
}
|
|
385
357
|
}
|
|
386
358
|
// 'create.group': createAction('bpmn:Group', 'artifact', 'bpmn-icon-group', translate('Create Group'))
|
|
387
359
|
}), n;
|
|
388
360
|
};
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
const
|
|
361
|
+
P.$inject = ["palette", "create", "elementFactory", "spaceTool", "lassoTool", "handTool", "globalConnect", "moddle", "translate"];
|
|
362
|
+
P.prototype = new j();
|
|
363
|
+
P.prototype.constructor = P;
|
|
364
|
+
const Ie = {
|
|
393
365
|
__init__: ["customPalette"],
|
|
394
|
-
customPalette: ["type",
|
|
366
|
+
customPalette: ["type", P]
|
|
395
367
|
};
|
|
396
|
-
function
|
|
397
|
-
|
|
368
|
+
function ae(n, e) {
|
|
369
|
+
z.call(this, n, e, 3e3), n.on("autoPlace", 3e3, function(t) {
|
|
398
370
|
const i = t.shape, r = t.source;
|
|
399
|
-
return
|
|
371
|
+
return _e(r, i);
|
|
400
372
|
}), this.append = function(t, i, r) {
|
|
401
373
|
n.fire("autoPlace.start", {
|
|
402
374
|
source: t,
|
|
@@ -407,14 +379,14 @@ function me(n, e) {
|
|
|
407
379
|
shape: i
|
|
408
380
|
});
|
|
409
381
|
console.log("hints", r, "position", a);
|
|
410
|
-
const
|
|
382
|
+
const p = e.appendShape(t, i, a, t.parent, r);
|
|
411
383
|
return n.fire("autoPlace.end", {
|
|
412
384
|
source: t,
|
|
413
|
-
shape:
|
|
414
|
-
}),
|
|
385
|
+
shape: p
|
|
386
|
+
}), p;
|
|
415
387
|
};
|
|
416
388
|
}
|
|
417
|
-
function
|
|
389
|
+
function Pe(n) {
|
|
418
390
|
return {
|
|
419
391
|
top: n.y,
|
|
420
392
|
right: n.x + (n.width || 0),
|
|
@@ -422,36 +394,36 @@ function Re(n) {
|
|
|
422
394
|
left: n.x
|
|
423
395
|
};
|
|
424
396
|
}
|
|
425
|
-
function
|
|
397
|
+
function we(n) {
|
|
426
398
|
return {
|
|
427
399
|
x: Math.round(n.x),
|
|
428
400
|
y: Math.round(n.y)
|
|
429
401
|
};
|
|
430
402
|
}
|
|
431
|
-
function
|
|
432
|
-
return
|
|
403
|
+
function ke(n) {
|
|
404
|
+
return we({
|
|
433
405
|
x: n.x + (n.width || 0) / 2,
|
|
434
406
|
y: n.y + (n.height || 0) / 2
|
|
435
407
|
});
|
|
436
408
|
}
|
|
437
|
-
function
|
|
409
|
+
function _e(n, e, t) {
|
|
438
410
|
t || (t = {});
|
|
439
|
-
const i = t.defaultDistance || 50, r =
|
|
411
|
+
const i = t.defaultDistance || 50, r = ke(n), a = Pe(n);
|
|
440
412
|
return {
|
|
441
413
|
x: r.x,
|
|
442
414
|
y: a.bottom + i + e.height / 2
|
|
443
415
|
};
|
|
444
416
|
}
|
|
445
|
-
const
|
|
417
|
+
const se = function() {
|
|
446
418
|
};
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
const
|
|
451
|
-
function
|
|
452
|
-
n.on("autoPlace",
|
|
419
|
+
se.prototype = z.prototype;
|
|
420
|
+
ae.prototype = new se();
|
|
421
|
+
ae.prototype.constructor = z;
|
|
422
|
+
const Me = 200, De = 100;
|
|
423
|
+
function oe(n, e, t) {
|
|
424
|
+
n.on("autoPlace", De, function(i) {
|
|
453
425
|
const r = i.shape, a = i.source;
|
|
454
|
-
return
|
|
426
|
+
return Be(a, r);
|
|
455
427
|
}), n.on("autoPlace.end", function(i) {
|
|
456
428
|
t.scrollToElement(i.shape);
|
|
457
429
|
}), this.append = function(i, r, a) {
|
|
@@ -459,39 +431,39 @@ function ce(n, e, t) {
|
|
|
459
431
|
source: i,
|
|
460
432
|
shape: r
|
|
461
433
|
});
|
|
462
|
-
const
|
|
434
|
+
const p = n.fire("autoPlace", {
|
|
463
435
|
source: i,
|
|
464
436
|
shape: r
|
|
465
|
-
}), o = e.appendShape(i, r,
|
|
437
|
+
}), o = e.appendShape(i, r, p, i.parent, a);
|
|
466
438
|
return n.fire("autoPlace.end", {
|
|
467
439
|
source: i,
|
|
468
440
|
shape: o
|
|
469
441
|
}), o;
|
|
470
442
|
};
|
|
471
443
|
}
|
|
472
|
-
|
|
473
|
-
function
|
|
474
|
-
const t =
|
|
444
|
+
oe.$inject = ["eventBus", "modeling", "canvas"];
|
|
445
|
+
function Be(n, e) {
|
|
446
|
+
const t = Me, i = fe(n);
|
|
475
447
|
return {
|
|
476
|
-
x:
|
|
448
|
+
x: ve(n).right + t + e.width / 2,
|
|
477
449
|
y: i.y
|
|
478
450
|
};
|
|
479
451
|
}
|
|
480
|
-
const
|
|
452
|
+
const Oe = {
|
|
481
453
|
__init__: ["autoPlaceSelectionBehavior"],
|
|
482
|
-
autoPlace: ["type",
|
|
483
|
-
},
|
|
454
|
+
autoPlace: ["type", oe]
|
|
455
|
+
}, Q = ["base", "task", "form", "multiInstance"], Fe = {
|
|
484
456
|
name: "PropertiesPanel",
|
|
485
457
|
componentName: "MyPropertiesPanel",
|
|
486
458
|
components: {
|
|
487
|
-
UserTaskListeners: () => import("../chunks/UserTaskListeners.
|
|
488
|
-
ElementForm: () => import("../chunks/ElementForm.
|
|
489
|
-
ElementProperties: () => import("../chunks/ElementProperties.
|
|
490
|
-
ElementListeners: () => import("../chunks/ElementListeners.
|
|
491
|
-
SignalAndMassage: () => import("../chunks/SignalAndMessage.
|
|
492
|
-
FlowCondition: () => import("../chunks/FlowCondition.
|
|
493
|
-
ElementMultiInstance: () => import("../chunks/ElementMultiInstance.
|
|
494
|
-
ElementTask: () => import("../chunks/ElementTaskConfig.
|
|
459
|
+
UserTaskListeners: () => import("../chunks/UserTaskListeners.Bv3BDfEI.mjs"),
|
|
460
|
+
ElementForm: () => import("../chunks/ElementForm.CQ3PN5qj.mjs"),
|
|
461
|
+
ElementProperties: () => import("../chunks/ElementProperties.CosfDrlW.mjs"),
|
|
462
|
+
ElementListeners: () => import("../chunks/ElementListeners.De_PRuIm.mjs"),
|
|
463
|
+
SignalAndMassage: () => import("../chunks/SignalAndMessage.Bb5PFX0N.mjs"),
|
|
464
|
+
FlowCondition: () => import("../chunks/FlowCondition.Y6qEYi1T.mjs"),
|
|
465
|
+
ElementMultiInstance: () => import("../chunks/ElementMultiInstance.DQo2wuAQ.mjs"),
|
|
466
|
+
ElementTask: () => import("../chunks/ElementTaskConfig.Bko0kgTp.mjs"),
|
|
495
467
|
ElementOtherConfig: () => import("../chunks/ElementOtherConfig.B1NfMTYh.mjs"),
|
|
496
468
|
ElementBaseInfo: () => import("../chunks/ElementBaseInfo.ZADwixb5.mjs")
|
|
497
469
|
},
|
|
@@ -577,12 +549,12 @@ const je = {
|
|
|
577
549
|
activeTabs: {
|
|
578
550
|
immediate: !0,
|
|
579
551
|
handler() {
|
|
580
|
-
this.activeTab = this.isTab ? "base" :
|
|
552
|
+
this.activeTab = this.isTab ? "base" : Q;
|
|
581
553
|
}
|
|
582
554
|
},
|
|
583
555
|
elementId: {
|
|
584
556
|
handler() {
|
|
585
|
-
this.activeTab = this.isTab ? "base" :
|
|
557
|
+
this.activeTab = this.isTab ? "base" : Q;
|
|
586
558
|
}
|
|
587
559
|
},
|
|
588
560
|
isTab: {
|
|
@@ -601,7 +573,7 @@ const je = {
|
|
|
601
573
|
this.timer = setTimeout(() => this.initModels(), 10);
|
|
602
574
|
return;
|
|
603
575
|
}
|
|
604
|
-
this.timer && clearTimeout(this.timer), this.bpmnInstances =
|
|
576
|
+
this.timer && clearTimeout(this.timer), this.bpmnInstances = R({
|
|
605
577
|
modeler: this.bpmnModeler,
|
|
606
578
|
modeling: this.bpmnModeler.get("modeling"),
|
|
607
579
|
moddle: this.bpmnModeler.get("moddle"),
|
|
@@ -624,13 +596,12 @@ const je = {
|
|
|
624
596
|
},
|
|
625
597
|
// 初始化数据
|
|
626
598
|
initFormOnChanged(n) {
|
|
627
|
-
var t;
|
|
628
599
|
let e = n;
|
|
629
|
-
e || (e =
|
|
600
|
+
e || (e = this.bpmnInstances.elementRegistry.find((t) => t.type === "bpmn:Process") ?? this.bpmnInstances.elementRegistry.find((t) => t.type === "bpmn:Collaboration")), e && (this.element = R(e), this.elementId = e.id, this.elementType = e.type.split(":")[1] || "", this.conditionFormVisible = !!(this.elementType === "SequenceFlow" && e.source && e.source.type.indexOf("StartEvent") === -1), this.formVisible = this.elementType === "UserTask");
|
|
630
601
|
}
|
|
631
602
|
}
|
|
632
603
|
};
|
|
633
|
-
var
|
|
604
|
+
var Le = function() {
|
|
634
605
|
var i, r;
|
|
635
606
|
var e = this, t = e._self._c;
|
|
636
607
|
return t("div", { class: ["process-panel__container", { show: e.isPanelVisible, hide: !e.isPanelVisible }], style: { width: `${e.isPanelVisible ? e.width : 34}px` }, on: { click: function(a) {
|
|
@@ -674,15 +645,15 @@ var Ze = function() {
|
|
|
674
645
|
}, proxy: !0 }], null, !1, 1854866151) }, [t("ElementProperties", { attrs: { id: e.elementId, "bpmn-instances": e.bpmnInstances, element: e.element, type: e.elementType } })], 1) : e._e(), e.isNullOrUndefined || e.isArray && e.useTabs.includes("other") ? t("ElCollapseItem", { key: "other", attrs: { name: "other" }, scopedSlots: e._u([{ key: "title", fn: function() {
|
|
675
646
|
return [t("div", { staticClass: "panel-tab__title" }, [t("i", { staticClass: "el-icon-s-promotion" }), e._v("其他")])];
|
|
676
647
|
}, proxy: !0 }], null, !1, 520255146) }, [t("ElementOtherConfig", { attrs: { id: e.elementId, element: e.element, "bpmn-instances": e.bpmnInstances } })], 1) : e._e(), e.isNullOrUndefined || e.isArray && e.useTabs.includes("extend") ? e._t("extend", null, { id: e.elementId, bpmnInstances: e.bpmnInstances, element: e.element, type: e.elementType }) : e._e()], 2)], 1);
|
|
677
|
-
},
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
648
|
+
}, Re = [], $e = /* @__PURE__ */ U(
|
|
649
|
+
Fe,
|
|
650
|
+
Le,
|
|
651
|
+
Re,
|
|
681
652
|
!1,
|
|
682
653
|
null,
|
|
683
654
|
null
|
|
684
655
|
);
|
|
685
|
-
const
|
|
656
|
+
const Ve = $e.exports, Ne = (n, e, t) => (t = t || "camunda", `<?xml version="1.0" encoding="UTF-8"?>
|
|
686
657
|
<bpmn2:definitions
|
|
687
658
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
688
659
|
xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL"
|
|
@@ -702,7 +673,7 @@ const We = qe.exports, Xe = (n, e, t) => (t = t || "camunda", `<?xml version="1.
|
|
|
702
673
|
</bpmndi:BPMNPlane>
|
|
703
674
|
</bpmndi:BPMNDiagram>
|
|
704
675
|
</bpmn2:definitions>`);
|
|
705
|
-
function
|
|
676
|
+
function ze(n) {
|
|
706
677
|
return function(e, t) {
|
|
707
678
|
return t = t || {}, e = n[e] || e, e.replace(/{([^}]+)}/g, function(i, r) {
|
|
708
679
|
let a = t[r];
|
|
@@ -710,7 +681,7 @@ function Ke(n) {
|
|
|
710
681
|
});
|
|
711
682
|
};
|
|
712
683
|
}
|
|
713
|
-
const
|
|
684
|
+
const Ue = {
|
|
714
685
|
// 添加部分
|
|
715
686
|
"Append EndEvent": "追加结束事件",
|
|
716
687
|
"Append Gateway": "追加网关",
|
|
@@ -950,7 +921,7 @@ const Ye = {
|
|
|
950
921
|
Data: "数据",
|
|
951
922
|
TextAnnotation: "文本说明",
|
|
952
923
|
Tasks: "任务"
|
|
953
|
-
},
|
|
924
|
+
}, J = [
|
|
954
925
|
{
|
|
955
926
|
name: "commentInForm",
|
|
956
927
|
isAttr: !0,
|
|
@@ -976,7 +947,7 @@ const Ye = {
|
|
|
976
947
|
isAttr: !0,
|
|
977
948
|
type: "String"
|
|
978
949
|
}
|
|
979
|
-
],
|
|
950
|
+
], ee = {
|
|
980
951
|
name: "Camunda",
|
|
981
952
|
uri: "http://camunda.org/schema/1.0/bpmn",
|
|
982
953
|
prefix: "camunda",
|
|
@@ -1298,7 +1269,7 @@ const Ye = {
|
|
|
1298
1269
|
isAttr: !0,
|
|
1299
1270
|
type: "String"
|
|
1300
1271
|
},
|
|
1301
|
-
...
|
|
1272
|
+
...J
|
|
1302
1273
|
]
|
|
1303
1274
|
},
|
|
1304
1275
|
{
|
|
@@ -1977,7 +1948,7 @@ const Ye = {
|
|
|
1977
1948
|
}
|
|
1978
1949
|
],
|
|
1979
1950
|
emumerations: []
|
|
1980
|
-
},
|
|
1951
|
+
}, te = {
|
|
1981
1952
|
name: "Activiti",
|
|
1982
1953
|
uri: "http://activiti.org/bpmn",
|
|
1983
1954
|
prefix: "activiti",
|
|
@@ -2312,7 +2283,7 @@ const Ye = {
|
|
|
2312
2283
|
isAttr: !0,
|
|
2313
2284
|
type: "String"
|
|
2314
2285
|
},
|
|
2315
|
-
...
|
|
2286
|
+
...J
|
|
2316
2287
|
]
|
|
2317
2288
|
},
|
|
2318
2289
|
{
|
|
@@ -2962,7 +2933,7 @@ const Ye = {
|
|
|
2962
2933
|
}
|
|
2963
2934
|
],
|
|
2964
2935
|
emumerations: []
|
|
2965
|
-
},
|
|
2936
|
+
}, ne = {
|
|
2966
2937
|
name: "Flowable",
|
|
2967
2938
|
uri: "http://flowable.org/bpmn",
|
|
2968
2939
|
prefix: "flowable",
|
|
@@ -3285,7 +3256,7 @@ const Ye = {
|
|
|
3285
3256
|
isAttr: !0,
|
|
3286
3257
|
type: "String"
|
|
3287
3258
|
},
|
|
3288
|
-
...
|
|
3259
|
+
...J
|
|
3289
3260
|
]
|
|
3290
3261
|
},
|
|
3291
3262
|
{
|
|
@@ -4189,7 +4160,7 @@ const Ye = {
|
|
|
4189
4160
|
]
|
|
4190
4161
|
}
|
|
4191
4162
|
]
|
|
4192
|
-
},
|
|
4163
|
+
}, Ge = "*";
|
|
4193
4164
|
function C(n) {
|
|
4194
4165
|
const e = this;
|
|
4195
4166
|
n.on("moddleCopy.canCopyProperty", function(t) {
|
|
@@ -4199,76 +4170,76 @@ function C(n) {
|
|
|
4199
4170
|
}
|
|
4200
4171
|
C.$inject = ["eventBus"];
|
|
4201
4172
|
C.prototype.canCopyProperty = function(n, e) {
|
|
4202
|
-
if (
|
|
4173
|
+
if (ue(n) && !je(n, e) || E(n, "camunda:InputOutput") && !this.canHostInputOutput(e) || le(n, ["camunda:Connector", "camunda:Field"]) && !this.canHostConnector(e) || E(n, "camunda:In") && !this.canHostIn(e))
|
|
4203
4174
|
return !1;
|
|
4204
4175
|
};
|
|
4205
4176
|
C.prototype.canHostInputOutput = function(n) {
|
|
4206
|
-
if (
|
|
4177
|
+
if (f(n, "camunda:Connector"))
|
|
4207
4178
|
return !0;
|
|
4208
|
-
const t =
|
|
4209
|
-
return !(!t ||
|
|
4179
|
+
const t = f(n, "bpmn:FlowNode");
|
|
4180
|
+
return !(!t || le(t, ["bpmn:StartEvent", "bpmn:Gateway", "bpmn:BoundaryEvent"]) || E(t, "bpmn:SubProcess") && t.get("triggeredByEvent"));
|
|
4210
4181
|
};
|
|
4211
4182
|
C.prototype.canHostConnector = function(n) {
|
|
4212
|
-
const e =
|
|
4213
|
-
return E(e, "bpmn:MessageEventDefinition") ?
|
|
4183
|
+
const e = f(n, "camunda:ServiceTaskLike");
|
|
4184
|
+
return E(e, "bpmn:MessageEventDefinition") ? f(n, "bpmn:IntermediateThrowEvent") || f(n, "bpmn:EndEvent") : !0;
|
|
4214
4185
|
};
|
|
4215
4186
|
C.prototype.canHostIn = function(n) {
|
|
4216
|
-
return
|
|
4187
|
+
return f(n, "bpmn:CallActivity") ? !0 : f(n, "bpmn:SignalEventDefinition") ? f(n, "bpmn:IntermediateThrowEvent") || f(n, "bpmn:EndEvent") : !0;
|
|
4217
4188
|
};
|
|
4218
4189
|
function E(n, e) {
|
|
4219
|
-
return n &&
|
|
4190
|
+
return n && ce(n.$instanceOf) && n.$instanceOf(e);
|
|
4220
4191
|
}
|
|
4221
|
-
function
|
|
4192
|
+
function le(n, e) {
|
|
4222
4193
|
return T(e, function(t) {
|
|
4223
4194
|
return E(n, t);
|
|
4224
4195
|
});
|
|
4225
4196
|
}
|
|
4226
|
-
function
|
|
4197
|
+
function f(n, e) {
|
|
4227
4198
|
if (!e)
|
|
4228
4199
|
return n.$parent;
|
|
4229
4200
|
if (E(n, e))
|
|
4230
4201
|
return n;
|
|
4231
4202
|
if (n.$parent)
|
|
4232
|
-
return
|
|
4203
|
+
return f(n.$parent, e);
|
|
4233
4204
|
}
|
|
4234
|
-
function
|
|
4205
|
+
function je(n, e) {
|
|
4235
4206
|
const t = n.$type && n.$model.getTypeDescriptor(n.$type), i = t && t.meta && t.meta.allowedIn;
|
|
4236
|
-
return !i ||
|
|
4237
|
-
return
|
|
4207
|
+
return !i || Je(i) ? !0 : T(i, function(r) {
|
|
4208
|
+
return f(e, r);
|
|
4238
4209
|
});
|
|
4239
4210
|
}
|
|
4240
|
-
function
|
|
4241
|
-
return n.indexOf(
|
|
4211
|
+
function Je(n) {
|
|
4212
|
+
return n.indexOf(Ge) !== -1;
|
|
4242
4213
|
}
|
|
4243
|
-
const
|
|
4214
|
+
const Ze = {
|
|
4244
4215
|
__init__: ["camundaModdleExtension"],
|
|
4245
4216
|
camundaModdleExtension: ["type", C]
|
|
4246
|
-
},
|
|
4217
|
+
}, He = {
|
|
4247
4218
|
FailedJobRetryTimeCycle: ["bpmn:StartEvent", "bpmn:BoundaryEvent", "bpmn:IntermediateCatchEvent", "bpmn:Activity"],
|
|
4248
4219
|
Connector: ["bpmn:EndEvent", "bpmn:IntermediateThrowEvent"],
|
|
4249
4220
|
Field: ["bpmn:EndEvent", "bpmn:IntermediateThrowEvent"]
|
|
4250
4221
|
};
|
|
4251
|
-
function
|
|
4222
|
+
function Z(n, e) {
|
|
4252
4223
|
return n && typeof n.$instanceOf == "function" && n.$instanceOf(e);
|
|
4253
4224
|
}
|
|
4254
|
-
function
|
|
4225
|
+
function qe(n) {
|
|
4255
4226
|
return n && n.length;
|
|
4256
4227
|
}
|
|
4257
|
-
function
|
|
4258
|
-
return
|
|
4259
|
-
return
|
|
4228
|
+
function F(n, e) {
|
|
4229
|
+
return qe(n) && T(n, function(t) {
|
|
4230
|
+
return Z(t, e);
|
|
4260
4231
|
});
|
|
4261
4232
|
}
|
|
4262
|
-
function
|
|
4233
|
+
function We(n, e) {
|
|
4263
4234
|
return T(e, function(t) {
|
|
4264
|
-
return
|
|
4235
|
+
return Z(n, t);
|
|
4265
4236
|
});
|
|
4266
4237
|
}
|
|
4267
|
-
function
|
|
4268
|
-
const i = e.name, r =
|
|
4269
|
-
return i === n &&
|
|
4238
|
+
function V(n, e, t) {
|
|
4239
|
+
const i = e.name, r = He[i.replace(/activiti:/, "")];
|
|
4240
|
+
return i === n && We(t, r);
|
|
4270
4241
|
}
|
|
4271
|
-
function
|
|
4242
|
+
function H(n) {
|
|
4272
4243
|
n.on(
|
|
4273
4244
|
"property.clone",
|
|
4274
4245
|
function(e) {
|
|
@@ -4278,42 +4249,42 @@ function X(n) {
|
|
|
4278
4249
|
this
|
|
4279
4250
|
);
|
|
4280
4251
|
}
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
if (
|
|
4284
|
-
return
|
|
4285
|
-
if (
|
|
4286
|
-
return
|
|
4252
|
+
H.$inject = ["eventBus"];
|
|
4253
|
+
H.prototype.canCloneProperty = function(n, e) {
|
|
4254
|
+
if (V("activiti:FailedJobRetryTimeCycle", e, n))
|
|
4255
|
+
return F(n.eventDefinitions, "bpmn:TimerEventDefinition") || F(n.eventDefinitions, "bpmn:SignalEventDefinition") || Z(n.loopCharacteristics, "bpmn:MultiInstanceLoopCharacteristics");
|
|
4256
|
+
if (V("activiti:Connector", e, n) || V("activiti:Field", e, n))
|
|
4257
|
+
return F(n.eventDefinitions, "bpmn:MessageEventDefinition");
|
|
4287
4258
|
};
|
|
4288
|
-
const
|
|
4259
|
+
const Xe = {
|
|
4289
4260
|
__init__: ["ActivitiModdleExtension"],
|
|
4290
|
-
ActivitiModdleExtension: ["type",
|
|
4291
|
-
},
|
|
4261
|
+
ActivitiModdleExtension: ["type", H]
|
|
4262
|
+
}, Ke = {
|
|
4292
4263
|
FailedJobRetryTimeCycle: ["bpmn:StartEvent", "bpmn:BoundaryEvent", "bpmn:IntermediateCatchEvent", "bpmn:Activity"],
|
|
4293
4264
|
Connector: ["bpmn:EndEvent", "bpmn:IntermediateThrowEvent"],
|
|
4294
4265
|
Field: ["bpmn:EndEvent", "bpmn:IntermediateThrowEvent"]
|
|
4295
4266
|
};
|
|
4296
|
-
function
|
|
4267
|
+
function q(n, e) {
|
|
4297
4268
|
return n && typeof n.$instanceOf == "function" && n.$instanceOf(e);
|
|
4298
4269
|
}
|
|
4299
|
-
function
|
|
4270
|
+
function Ye(n) {
|
|
4300
4271
|
return n && n.length;
|
|
4301
4272
|
}
|
|
4302
|
-
function
|
|
4303
|
-
return
|
|
4304
|
-
return
|
|
4273
|
+
function L(n, e) {
|
|
4274
|
+
return Ye(n) && T(n, function(t) {
|
|
4275
|
+
return q(t, e);
|
|
4305
4276
|
});
|
|
4306
4277
|
}
|
|
4307
|
-
function
|
|
4278
|
+
function Qe(n, e) {
|
|
4308
4279
|
return T(e, function(t) {
|
|
4309
|
-
return
|
|
4280
|
+
return q(n, t);
|
|
4310
4281
|
});
|
|
4311
4282
|
}
|
|
4312
|
-
function
|
|
4313
|
-
const i = e.name, r =
|
|
4314
|
-
return i === n &&
|
|
4283
|
+
function N(n, e, t) {
|
|
4284
|
+
const i = e.name, r = Ke[i.replace(/flowable:/, "")];
|
|
4285
|
+
return i === n && Qe(t, r);
|
|
4315
4286
|
}
|
|
4316
|
-
function
|
|
4287
|
+
function W(n) {
|
|
4317
4288
|
n.on(
|
|
4318
4289
|
"property.clone",
|
|
4319
4290
|
function(e) {
|
|
@@ -4323,23 +4294,23 @@ function Y(n) {
|
|
|
4323
4294
|
this
|
|
4324
4295
|
);
|
|
4325
4296
|
}
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
if (
|
|
4329
|
-
return
|
|
4330
|
-
if (
|
|
4331
|
-
return
|
|
4297
|
+
W.$inject = ["eventBus"];
|
|
4298
|
+
W.prototype.canCloneProperty = function(n, e) {
|
|
4299
|
+
if (N("flowable:FailedJobRetryTimeCycle", e, n))
|
|
4300
|
+
return L(n.eventDefinitions, "bpmn:TimerEventDefinition") || L(n.eventDefinitions, "bpmn:SignalEventDefinition") || q(n.loopCharacteristics, "bpmn:MultiInstanceLoopCharacteristics");
|
|
4301
|
+
if (N("flowable:Connector", e, n) || N("flowable:Field", e, n))
|
|
4302
|
+
return L(n.eventDefinitions, "bpmn:MessageEventDefinition");
|
|
4332
4303
|
};
|
|
4333
|
-
const
|
|
4304
|
+
const et = {
|
|
4334
4305
|
__init__: ["FlowableModdleExtension"],
|
|
4335
|
-
FlowableModdleExtension: ["type",
|
|
4306
|
+
FlowableModdleExtension: ["type", W]
|
|
4336
4307
|
};
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
const
|
|
4308
|
+
re.registerLanguage("xml", Ee);
|
|
4309
|
+
re.registerLanguage("json", Te);
|
|
4310
|
+
const tt = {
|
|
4340
4311
|
name: "ProcessDesigner",
|
|
4341
4312
|
components: {
|
|
4342
|
-
HighlightJS:
|
|
4313
|
+
HighlightJS: Ce
|
|
4343
4314
|
},
|
|
4344
4315
|
componentName: "MyProcessDesigner",
|
|
4345
4316
|
props: {
|
|
@@ -4409,12 +4380,12 @@ const ut = {
|
|
|
4409
4380
|
additionalModules() {
|
|
4410
4381
|
const n = [];
|
|
4411
4382
|
if (this.onlyCustomizeAddi)
|
|
4412
|
-
return
|
|
4413
|
-
|
|
4383
|
+
return K(this.additionalModel) ? this.additionalModel || [] : [this.additionalModel];
|
|
4384
|
+
K(this.additionalModel) ? n.push(...this.additionalModel) : this.additionalModel && n.push(this.additionalModel);
|
|
4414
4385
|
const e = {
|
|
4415
|
-
translate: ["value",
|
|
4386
|
+
translate: ["value", ze(this.translations || Ue)]
|
|
4416
4387
|
};
|
|
4417
|
-
return n.push(e), this.simulation && n.push(
|
|
4388
|
+
return n.push(e), this.simulation && n.push(he), n.push(Ae), this.prefix === "camunda" && n.push(Ze), this.prefix === "flowable" && n.push(et), this.prefix === "activiti" && n.push(Xe), n;
|
|
4418
4389
|
},
|
|
4419
4390
|
moddleExtensions() {
|
|
4420
4391
|
const n = {};
|
|
@@ -4423,13 +4394,16 @@ const ut = {
|
|
|
4423
4394
|
if (this.moddleExtension)
|
|
4424
4395
|
for (const e in this.moddleExtension)
|
|
4425
4396
|
n[e] = this.moddleExtension[e];
|
|
4426
|
-
return this.prefix === "activiti" && (n.activiti =
|
|
4427
|
-
|
|
4428
|
-
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
types: [...
|
|
4432
|
-
})
|
|
4397
|
+
return this.prefix === "activiti" && (n.activiti = {
|
|
4398
|
+
...te,
|
|
4399
|
+
types: [...te.types, ...this.extendTypes || []]
|
|
4400
|
+
}), this.prefix === "flowable" && (n.flowable = {
|
|
4401
|
+
...ne,
|
|
4402
|
+
types: [...ne.types, ...this.extendTypes || []]
|
|
4403
|
+
}), this.prefix === "camunda" && (n.camunda = {
|
|
4404
|
+
...ee,
|
|
4405
|
+
types: [...ee.types, ...this.extendTypes || []]
|
|
4406
|
+
}), n;
|
|
4433
4407
|
}
|
|
4434
4408
|
},
|
|
4435
4409
|
mounted() {
|
|
@@ -4439,79 +4413,76 @@ const ut = {
|
|
|
4439
4413
|
},
|
|
4440
4414
|
methods: {
|
|
4441
4415
|
initBpmnModeler() {
|
|
4442
|
-
this.bpmnModeler || (this.bpmnModeler =
|
|
4443
|
-
new
|
|
4416
|
+
this.bpmnModeler || (this.bpmnModeler = R(
|
|
4417
|
+
new Se({
|
|
4444
4418
|
container: this.$refs["bpmn-canvas"],
|
|
4445
4419
|
keyboard: this.keyboard ? { bindTo: document } : null,
|
|
4446
4420
|
additionalModules: this.additionalModules,
|
|
4447
|
-
moddleExtensions: this.moddleExtensions
|
|
4448
|
-
|
|
4421
|
+
moddleExtensions: this.moddleExtensions,
|
|
4422
|
+
...this.options
|
|
4423
|
+
})
|
|
4449
4424
|
), this.$emit("init-finished", this.bpmnModeler), this.initModelListeners());
|
|
4450
4425
|
},
|
|
4451
4426
|
initModelListeners() {
|
|
4452
4427
|
const n = this.bpmnModeler.get("eventBus"), e = this;
|
|
4453
4428
|
this.events.forEach((t) => {
|
|
4454
|
-
n.on(t,
|
|
4429
|
+
n.on(t, (i) => {
|
|
4455
4430
|
const r = t.replace(/\./g, "-"), a = i ? i.element : null;
|
|
4456
4431
|
e.$emit(r, a, i);
|
|
4457
4432
|
});
|
|
4458
|
-
}), n.on("commandStack.changed", (t) =>
|
|
4433
|
+
}), n.on("commandStack.changed", async (t) => {
|
|
4459
4434
|
try {
|
|
4460
4435
|
this.recoverable = this.bpmnModeler.get("commandStack").canRedo(), this.revocable = this.bpmnModeler.get("commandStack").canUndo();
|
|
4461
|
-
const { xml: i } =
|
|
4436
|
+
const { xml: i } = await this.bpmnModeler.saveXML({ format: !0 });
|
|
4462
4437
|
this.$emit("commandStack-changed", t), this.$emit("input", i), this.$emit("change", i);
|
|
4463
4438
|
} catch (i) {
|
|
4464
4439
|
console.error(`[Process Designer Warn]: ${i.message || i}`);
|
|
4465
4440
|
}
|
|
4466
|
-
})
|
|
4441
|
+
}), this.bpmnModeler.on("canvas.viewbox.changed", ({ viewbox: t }) => {
|
|
4467
4442
|
this.$emit("canvas-viewbox-changed", { viewbox: t });
|
|
4468
4443
|
const { scale: i } = t;
|
|
4469
4444
|
this.defaultZoom = Math.floor(i * 100) / 100;
|
|
4470
4445
|
});
|
|
4471
4446
|
},
|
|
4472
4447
|
/* 创建新的流程图 */
|
|
4473
|
-
createNewDiagram(n) {
|
|
4474
|
-
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
|
|
4480
|
-
|
|
4481
|
-
}
|
|
4482
|
-
});
|
|
4448
|
+
async createNewDiagram(n) {
|
|
4449
|
+
const e = this.processId || `Process_${(/* @__PURE__ */ new Date()).getTime()}`, t = this.processName || `业务流程_${(/* @__PURE__ */ new Date()).getTime()}`, i = n || Ne(e, t, this.prefix);
|
|
4450
|
+
try {
|
|
4451
|
+
const { warnings: r } = await this.bpmnModeler.importXML(i);
|
|
4452
|
+
this.bpmnModeler.get("canvas").zoom("fit-viewport", "center"), r != null && r.length;
|
|
4453
|
+
} catch (r) {
|
|
4454
|
+
console.error(`[Process Designer Warn]: ${(r == null ? void 0 : r.message) || r}`);
|
|
4455
|
+
}
|
|
4483
4456
|
},
|
|
4484
4457
|
// 下载流程图到本地
|
|
4485
4458
|
/**
|
|
4486
4459
|
* @param {string} type
|
|
4487
4460
|
* @param {*} name
|
|
4488
4461
|
*/
|
|
4489
|
-
downloadProcess(n, e = "diagram") {
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
|
|
4495
|
-
|
|
4496
|
-
|
|
4497
|
-
|
|
4498
|
-
}
|
|
4499
|
-
|
|
4500
|
-
|
|
4501
|
-
|
|
4502
|
-
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
|
|
4509
|
-
|
|
4510
|
-
|
|
4511
|
-
a.download = r, a.href = i, a.click(), URL.revokeObjectURL(a.href);
|
|
4512
|
-
}
|
|
4462
|
+
async downloadProcess(n, e = "diagram") {
|
|
4463
|
+
try {
|
|
4464
|
+
const { err: i, xml: r } = await this.bpmnModeler.saveXML();
|
|
4465
|
+
i && console.error(`[Process Designer Warn ]: ${i.message || i}`);
|
|
4466
|
+
const a = new X(), { definitions: p } = a.xml2js(r);
|
|
4467
|
+
if (e = p.process._name || e, n === "xml" || n === "bpmn") {
|
|
4468
|
+
const { href: o, filename: y } = this.setEncoded(n.toUpperCase(), e, r);
|
|
4469
|
+
t(o, y);
|
|
4470
|
+
} else {
|
|
4471
|
+
const { err: o, svg: y } = await this.bpmnModeler.saveSVG();
|
|
4472
|
+
if (o)
|
|
4473
|
+
return console.error(o);
|
|
4474
|
+
const { href: S, filename: l } = this.setEncoded("SVG", e, y);
|
|
4475
|
+
t(S, l);
|
|
4476
|
+
}
|
|
4477
|
+
} catch (i) {
|
|
4478
|
+
console.error(`[Process Designer Warn ]: ${i.message || i}`);
|
|
4479
|
+
}
|
|
4480
|
+
function t(i, r) {
|
|
4481
|
+
if (i && r) {
|
|
4482
|
+
const a = document.createElement("a");
|
|
4483
|
+
a.download = r, a.href = i, a.click(), URL.revokeObjectURL(a.href);
|
|
4513
4484
|
}
|
|
4514
|
-
}
|
|
4485
|
+
}
|
|
4515
4486
|
},
|
|
4516
4487
|
// 根据所需类型进行转码并返回下载地址
|
|
4517
4488
|
setEncoded(n, e = "diagram", t) {
|
|
@@ -4594,7 +4565,7 @@ const ut = {
|
|
|
4594
4565
|
});
|
|
4595
4566
|
},
|
|
4596
4567
|
previewProcessJson() {
|
|
4597
|
-
const n = new
|
|
4568
|
+
const n = new X();
|
|
4598
4569
|
this.bpmnModeler.saveXML({ format: !0 }).then(({ xml: e }) => {
|
|
4599
4570
|
const { definitions: t } = n.xml2js(e);
|
|
4600
4571
|
t ? this.previewResult = JSON.stringify(t, null, 4) : this.previewResult = "", this.previewType = "json", this.previewModelVisible = !0;
|
|
@@ -4602,7 +4573,7 @@ const ut = {
|
|
|
4602
4573
|
}
|
|
4603
4574
|
}
|
|
4604
4575
|
};
|
|
4605
|
-
var
|
|
4576
|
+
var nt = function() {
|
|
4606
4577
|
var e = this, t = e._self._c;
|
|
4607
4578
|
return t("div", { staticClass: "my-process-designer" }, [t("div", { staticClass: "my-process-designer__header" }, [e._t("control-header", function() {
|
|
4608
4579
|
return [t("ElButtonGroup", { key: "file-control" }, [e._t("toolbar-buttons"), e.simulation ? t("ElTooltip", { attrs: { effect: "light", content: "导入流程" } }, [t("ElButton", { attrs: { size: e.headerButtonSize, type: e.headerButtonType, icon: "el-icon-folder-opened" }, on: { click: function(i) {
|
|
@@ -4643,19 +4614,19 @@ var ct = function() {
|
|
|
4643
4614
|
}), t("input", { ref: "refFile", staticStyle: { display: "none" }, attrs: { id: "files", type: "file", accept: ".xml, .bpmn" }, on: { change: e.importLocalFile } })], 2), t("div", { staticClass: "my-process-designer__container" }, [t("div", { ref: "bpmn-canvas", staticClass: "my-process-designer__canvas flow-background-image" })]), t("ElementDialog", { staticClass: "flow-dialog", attrs: { title: "预览", width: "60vw", height: "60vh", visible: e.previewModelVisible, "body-padding": !1, "destroy-on-close": "" }, on: { "update:visible": function(i) {
|
|
4644
4615
|
e.previewModelVisible = i;
|
|
4645
4616
|
} } }, [t("HighlightJS", { attrs: { language: e.previewType, code: e.previewResult } })], 1)], 1);
|
|
4646
|
-
},
|
|
4647
|
-
|
|
4648
|
-
|
|
4649
|
-
|
|
4617
|
+
}, it = [], rt = /* @__PURE__ */ U(
|
|
4618
|
+
tt,
|
|
4619
|
+
nt,
|
|
4620
|
+
it,
|
|
4650
4621
|
!1,
|
|
4651
4622
|
null,
|
|
4652
4623
|
null
|
|
4653
4624
|
);
|
|
4654
|
-
const
|
|
4625
|
+
const at = rt.exports, st = {
|
|
4655
4626
|
name: "FlowDesigner",
|
|
4656
4627
|
components: {
|
|
4657
|
-
PropertiesPanel:
|
|
4658
|
-
ProcessDesigner:
|
|
4628
|
+
PropertiesPanel: Ve,
|
|
4629
|
+
ProcessDesigner: at
|
|
4659
4630
|
},
|
|
4660
4631
|
props: {
|
|
4661
4632
|
/**
|
|
@@ -4697,7 +4668,7 @@ const bt = yt.exports, gt = {
|
|
|
4697
4668
|
labelVisible: !1,
|
|
4698
4669
|
prefix: "flowable",
|
|
4699
4670
|
headerButtonSize: "mini",
|
|
4700
|
-
additionalModel:
|
|
4671
|
+
additionalModel: R([xe, Ie, Oe])
|
|
4701
4672
|
}
|
|
4702
4673
|
};
|
|
4703
4674
|
},
|
|
@@ -4705,36 +4676,34 @@ const bt = yt.exports, gt = {
|
|
|
4705
4676
|
initModeler(n) {
|
|
4706
4677
|
this.modeler = n;
|
|
4707
4678
|
},
|
|
4708
|
-
refresh() {
|
|
4709
|
-
|
|
4710
|
-
yield this.$nextTick(), yield this.$refs.processDesigner.createNewDiagram(this.value);
|
|
4711
|
-
});
|
|
4679
|
+
async refresh() {
|
|
4680
|
+
await this.$nextTick(), await this.$refs.processDesigner.createNewDiagram(this.value);
|
|
4712
4681
|
}
|
|
4713
4682
|
}
|
|
4714
4683
|
};
|
|
4715
|
-
var
|
|
4684
|
+
var ot = function() {
|
|
4716
4685
|
var e = this, t = e._self._c;
|
|
4717
4686
|
return t("div", { staticClass: "flow-designer" }, [t("ProcessDesigner", e._b({ key: `designer-${e.reloadIndex}`, ref: "processDesigner", attrs: { value: e.value, "extend-types": e.extendTypes, options: {
|
|
4718
4687
|
taskResizingEnabled: !0,
|
|
4719
4688
|
eventResizingEnabled: !0
|
|
4720
4689
|
}, keyboard: "" }, on: { input: (i) => e.$emit("input", i), "init-finished": e.initModeler }, scopedSlots: e._u([{ key: "toolbar-buttons", fn: function() {
|
|
4721
4690
|
return [e._t("toolbar-buttons", null, { modeler: e.modeler })];
|
|
4722
|
-
}, proxy: !0 }], null, !0) }, "ProcessDesigner", e.controlForm, !1)), e.usePanel && (e.useTabs === null || e.useTabs === void 0 || e.useTabs.length > 0) ? t("PropertiesPanel", { key: `penal-${e.reloadIndex}`, staticClass: "process-panel", attrs: { "panel-type": e.panelType, "use-tabs": e.useTabs, "bpmn-modeler": e.modeler, context: e.context, prefix: e.controlForm.prefix }, scopedSlots: e._u([{ key: "task", fn: function({ id: i, bpmnInstances: r, element: a, type:
|
|
4723
|
-
return [e._t("task", null, { id: i, bpmnInstances: r, element: a, type:
|
|
4724
|
-
} }, { key: "form", fn: function({ id: i, bpmnInstances: r, element: a, type:
|
|
4725
|
-
return [e._t("form", null, { id: i, bpmnInstances: r, element: a, type:
|
|
4726
|
-
} }, { key: "extend", fn: function({ id: i, bpmnInstances: r, element: a, type:
|
|
4727
|
-
return [e._t("extend", null, { id: i, bpmnInstances: r, element: a, type:
|
|
4691
|
+
}, proxy: !0 }], null, !0) }, "ProcessDesigner", e.controlForm, !1)), e.usePanel && (e.useTabs === null || e.useTabs === void 0 || e.useTabs.length > 0) ? t("PropertiesPanel", { key: `penal-${e.reloadIndex}`, staticClass: "process-panel", attrs: { "panel-type": e.panelType, "use-tabs": e.useTabs, "bpmn-modeler": e.modeler, context: e.context, prefix: e.controlForm.prefix }, scopedSlots: e._u([{ key: "task", fn: function({ id: i, bpmnInstances: r, element: a, type: p }) {
|
|
4692
|
+
return [e._t("task", null, { id: i, bpmnInstances: r, element: a, type: p })];
|
|
4693
|
+
} }, { key: "form", fn: function({ id: i, bpmnInstances: r, element: a, type: p }) {
|
|
4694
|
+
return [e._t("form", null, { id: i, bpmnInstances: r, element: a, type: p })];
|
|
4695
|
+
} }, { key: "extend", fn: function({ id: i, bpmnInstances: r, element: a, type: p }) {
|
|
4696
|
+
return [e._t("extend", null, { id: i, bpmnInstances: r, element: a, type: p })];
|
|
4728
4697
|
} }], null, !0) }) : e._e()], 1);
|
|
4729
|
-
},
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4698
|
+
}, lt = [], pt = /* @__PURE__ */ U(
|
|
4699
|
+
st,
|
|
4700
|
+
ot,
|
|
4701
|
+
lt,
|
|
4733
4702
|
!1,
|
|
4734
4703
|
null,
|
|
4735
4704
|
null
|
|
4736
4705
|
);
|
|
4737
|
-
const
|
|
4706
|
+
const Ft = pt.exports;
|
|
4738
4707
|
export {
|
|
4739
|
-
|
|
4708
|
+
Ft as default
|
|
4740
4709
|
};
|