@web-utils/component 4.0.15 → 4.0.16

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.
Files changed (169) hide show
  1. package/address-input/index.mjs +13 -15
  2. package/card/index.mjs +18 -20
  3. package/carousel/index.mjs +10 -12
  4. package/chat/index.mjs +45 -56
  5. package/chunk-file-uploader/index.mjs +36 -378
  6. package/chunk-file-uploader/style.css +1 -1
  7. package/chunks/ElementBaseInfo.ZADwixb5.mjs +125 -0
  8. package/chunks/ElementForm.CQ3PN5qj.mjs +223 -0
  9. package/chunks/ElementListeners.De_PRuIm.mjs +215 -0
  10. package/chunks/ElementMultiInstance.DQo2wuAQ.mjs +181 -0
  11. package/chunks/ElementOtherConfig.B1NfMTYh.mjs +60 -0
  12. package/chunks/ElementProperties.CosfDrlW.mjs +112 -0
  13. package/chunks/{ElementTaskConfig.AvBOzAni.mjs → ElementTaskConfig.Bko0kgTp.mjs} +55 -63
  14. package/chunks/FlowCondition.Y6qEYi1T.mjs +102 -0
  15. package/chunks/FormTemp.BQxO5IQq.mjs +123 -0
  16. package/chunks/SignalAndMessage.Bb5PFX0N.mjs +85 -0
  17. package/chunks/UserTaskListeners.Bv3BDfEI.mjs +169 -0
  18. package/chunks/{confirmable-mixin.BFZb6pcK.mjs → confirmable-mixin.B2TtLAdk.mjs} +1 -1
  19. package/chunks/core.0Exl13Mz.mjs +54 -0
  20. package/chunks/{dataformat.DJoNBlmI.mjs → dataformat.CpqOeGBl.mjs} +6 -6
  21. package/chunks/{dic.BinnDitI.mjs → dic.Dkl-leRW.mjs} +9 -9
  22. package/chunks/dictionary.DGt59Ir7.mjs +68 -0
  23. package/chunks/{event.DSlcqYHL.mjs → event.9aDS6jcw.mjs} +2 -2
  24. package/chunks/{form-input.BtS_J5a2.mjs → form-input.CvFdwlEV.mjs} +2 -2
  25. package/chunks/form-item.LWjePsPa.mjs +233 -0
  26. package/chunks/{index.CIfe3UB3.mjs → index.9OxHjTIE.mjs} +2 -2
  27. package/chunks/{index.Cn7aq-Et.mjs → index.B2TRddqf.mjs} +8 -8
  28. package/chunks/{init.xOlFpTyZ.mjs → init.DAsXSoLW.mjs} +2 -2
  29. package/chunks/sub-table-plus-props.BVsD71hT.mjs +30 -0
  30. package/chunks/{util.DI42t5GU.mjs → util.DqFv_pWg.mjs} +22 -22
  31. package/chunks/utilSelf.Csq1766E.mjs +48 -0
  32. package/chunks/utils.DRcxC1Fb.mjs +60 -0
  33. package/color-picker/index.mjs +22 -101
  34. package/confirm-button/index.mjs +1 -1
  35. package/confirmable/index.mjs +1 -1
  36. package/data-box/index.mjs +12 -15
  37. package/data-card/index.mjs +10 -12
  38. package/data-card-text/index.mjs +10 -12
  39. package/data-display/index.mjs +15 -17
  40. package/data-icons/index.mjs +13 -16
  41. package/data-imgtext/index.mjs +15 -18
  42. package/data-operatext/index.mjs +14 -16
  43. package/data-panel/index.mjs +13 -16
  44. package/data-pay/index.mjs +16 -20
  45. package/data-price/index.mjs +14 -16
  46. package/data-progress/index.mjs +13 -17
  47. package/data-rotate/index.mjs +12 -15
  48. package/data-table-picker/index.mjs +15 -18
  49. package/data-tabs/index.mjs +12 -15
  50. package/dialog-form/index.mjs +16 -18
  51. package/dynamic-table/index.mjs +25 -30
  52. package/editable-progress/index.mjs +9 -11
  53. package/editable-tree/index.mjs +52 -56
  54. package/egd-collapse-item/index.mjs +9 -9
  55. package/element-dialog/index.mjs +22 -23
  56. package/element-listeners/style.css +1 -0
  57. package/element-multi-instance/style.css +1 -0
  58. package/flex-column/index.mjs +1 -1
  59. package/flex-item/index.mjs +1 -1
  60. package/flex-row/index.mjs +1 -1
  61. package/flow/index.mjs +10 -11
  62. package/flow-designer/index.mjs +699 -1973
  63. package/flow-designer/style.css +1 -1
  64. package/flow-node/index.mjs +1 -1
  65. package/flow-viewer/index.mjs +9 -9
  66. package/form-block/index.mjs +32 -34
  67. package/form-cascader/index.mjs +23 -24
  68. package/form-checkbox/index.mjs +16 -17
  69. package/form-checkbox-group/index.mjs +20 -23
  70. package/form-date-picker/index.mjs +18 -20
  71. package/form-holder/index.mjs +13 -14
  72. package/form-input/index.mjs +14 -15
  73. package/form-input-cron-expression/index.mjs +19 -22
  74. package/form-input-email/index.mjs +15 -16
  75. package/form-input-id-card/index.mjs +12 -13
  76. package/form-input-number/index.mjs +16 -17
  77. package/form-input-phone-number/index.mjs +21 -22
  78. package/form-input-tag/index.mjs +14 -15
  79. package/form-input-time/index.mjs +14 -15
  80. package/form-item/index.mjs +140 -3
  81. package/form-item-group/index.mjs +28 -31
  82. package/form-radio-group/index.mjs +27 -28
  83. package/form-select/index.mjs +21 -23
  84. package/form-switch/index.mjs +16 -17
  85. package/form-table/index.mjs +16 -17
  86. package/form-table-plus/index.mjs +21 -22
  87. package/form-textarea/index.mjs +15 -16
  88. package/form-tree-select/index.mjs +14 -15
  89. package/form-tree-select-multiple/index.mjs +14 -15
  90. package/form-view/index.mjs +35 -39
  91. package/fy-array/index.mjs +33 -37
  92. package/fy-cascader/index.mjs +16 -17
  93. package/fy-checkbox/index.mjs +11 -13
  94. package/fy-code/index.mjs +10 -10
  95. package/fy-curd/index.mjs +1128 -1152
  96. package/fy-date/index.mjs +10 -11
  97. package/fy-draggable/index.mjs +9 -10
  98. package/fy-dynamic/index.mjs +22 -25
  99. package/fy-empty/index.mjs +1 -1
  100. package/fy-form/index.mjs +638 -15
  101. package/fy-form-design/index.mjs +1307 -1345
  102. package/fy-from/crud/zh.d.ts +6 -6
  103. package/fy-input/index.mjs +12 -14
  104. package/fy-input-color/index.mjs +13 -15
  105. package/fy-input-icon/index.mjs +20 -23
  106. package/fy-input-map/index.mjs +28 -31
  107. package/fy-input-number/index.mjs +9 -10
  108. package/fy-input-table/index.mjs +18 -22
  109. package/fy-input-tree/index.mjs +33 -37
  110. package/fy-progress/index.mjs +9 -10
  111. package/fy-radio/index.mjs +15 -16
  112. package/fy-rate/index.mjs +10 -11
  113. package/fy-select/index.mjs +25 -29
  114. package/fy-slider/index.mjs +11 -12
  115. package/fy-switch/index.mjs +9 -10
  116. package/fy-tabs/index.mjs +15 -17
  117. package/fy-time/index.mjs +1 -1
  118. package/fy-title/index.mjs +1 -1
  119. package/fy-tree/index.mjs +18 -24
  120. package/fy-u-editor/index.mjs +1 -1
  121. package/fy-upload/index.mjs +74 -76
  122. package/guide-steps/index.mjs +11 -13
  123. package/iframe-window/index.mjs +9 -10
  124. package/image-cropper/index.mjs +28 -30
  125. package/image-preview/index.mjs +12 -14
  126. package/index.mjs +72 -72
  127. package/input-number/index.mjs +13 -14
  128. package/input-number-range/index.mjs +11 -12
  129. package/license/index.mjs +1 -1
  130. package/login/index.mjs +21 -26
  131. package/nav-bar/index.mjs +9 -10
  132. package/notice/index.mjs +9 -10
  133. package/package.json +1 -1
  134. package/page-index/index.mjs +12 -13
  135. package/page-index-top/index.mjs +23 -28
  136. package/page-skeleton/index.mjs +14 -14
  137. package/page-skeleton-new/index.mjs +8 -9
  138. package/pageable-table/index.mjs +172 -182
  139. package/pageable-view/index.mjs +15 -16
  140. package/picker-table-view/index.mjs +49 -58
  141. package/present-view/index.mjs +35 -39
  142. package/record-video/index.mjs +1 -1
  143. package/resize-observer/index.mjs +1 -1
  144. package/search/index.mjs +20 -22
  145. package/search-popover/index.mjs +1 -1
  146. package/sign/index.mjs +1 -1
  147. package/skeleton-panel/index.mjs +9 -10
  148. package/split-pane/index.mjs +36 -37
  149. package/static-pageable-table/index.mjs +11 -13
  150. package/sub-table/index.mjs +36 -49
  151. package/sub-table-plus/index.mjs +229 -18
  152. package/swiper/index.mjs +11 -12
  153. package/table-column/index.mjs +223 -3
  154. package/table-view/index.mjs +52 -60
  155. package/tabs-view/index.mjs +17 -19
  156. package/tag-render/index.mjs +16 -18
  157. package/text-ellipsis/index.mjs +9 -10
  158. package/toolbar/index.mjs +13 -14
  159. package/toolbar-button/index.mjs +13 -14
  160. package/verify/index.mjs +1 -1
  161. package/vue-cron/index.mjs +259 -267
  162. package/watermark/index.mjs +1 -1
  163. package/web-types.json +1 -1
  164. package/x-input-tag/index.mjs +21 -24
  165. package/chunks/FormItem.Bhsy_O2B.mjs +0 -372
  166. package/chunks/FyForm.DriwCJ7b.mjs +0 -765
  167. package/chunks/SignalAndMessage.BpjOoKhK.mjs +0 -92
  168. package/chunks/SubTablePlus.BH0IIv3X.mjs +0 -270
  169. package/chunks/TableColumn.BzivvXMF.mjs +0 -337
@@ -1,1315 +1,471 @@
1
- import p from "element-ui/lib/input";
2
- import { isBlank as Ke, fastClone as E, capitalize as Je, isArray as _e } from "@web-utils/core";
3
- import { n as w } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
4
- import I from "element-ui/lib/collapse-item";
5
- import o from "element-ui/lib/form-item";
6
- import T from "element-ui/lib/form";
7
- import l from "element-ui/lib/button";
8
- import N from "../element-dialog/index.mjs";
9
- import S from "element-ui/lib/divider";
10
- import c from "element-ui/lib/table-column";
11
- import $ from "element-ui/lib/table";
12
- import u from "element-ui/lib/option";
13
- import h from "element-ui/lib/select";
14
- import fe from "element-ui/lib/drawer";
15
- import y from "element-ui/lib/tooltip";
16
- import ne from "element-ui/lib/checkbox";
17
- import H from "element-ui/lib/switch";
18
- import Ze from "element-ui/lib/collapse";
19
- import L from "element-ui/lib/tab-pane";
20
- import He from "element-ui/lib/tabs";
21
- import { markRaw as ee } from "vue";
22
- import Le from "../highlight-j-s/index.mjs";
23
- import W from "element-ui/lib/button-group";
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";
24
12
  import "bpmn-js/dist/assets/bpmn-js.css";
25
13
  import "bpmn-js/dist/assets/diagram-js.css";
26
14
  import "bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css";
27
15
  import "bpmn-js-token-simulation/assets/css/bpmn-js-token-simulation.css";
28
- import We from "bpmn-js/lib/Modeler";
29
- import Xe from "bpmn-js/lib/features/drilldown";
30
- import Ye from "bpmn-js-token-simulation";
31
- import Ee from "x2js";
32
- import Pe from "highlight.js/lib/core";
33
- import Qe from "highlight.js/lib/languages/xml";
34
- import et from "highlight.js/lib/languages/json";
35
- import { isObject as tt, isFunction as nt, some as B, assign as F, isArray as it, forEach as st } from "min-dash";
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";
36
25
  import "../highlight-j-s/style.css";
37
- import { is as X } from "bpmn-js/lib/util/ModelUtil";
38
- import { isExpanded as rt, isEventSubProcess as at } from "bpmn-js/lib/util/DiUtil";
39
- import { isAny as ie } from "bpmn-js/lib/features/modeling/util/ModelingUtil";
40
- import { getChildLanes as ot } from "bpmn-js/lib/features/modeling/util/LaneUtil";
41
- import { hasPrimaryModifier as lt } from "diagram-js/lib/util/Mouse";
42
- import $e from "bpmn-js/lib/features/palette/PaletteProvider";
43
- import ye from "diagram-js/lib/features/auto-place/AutoPlace";
44
- import { getMid as pt, asTRBL as mt } from "diagram-js/lib/layout/LayoutUtil";
45
- const ct = {
46
- name: "ElementOtherConfig",
47
- props: {
48
- id: String,
49
- element: Object,
50
- bpmnInstances: Object
51
- },
52
- data() {
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))
30
+ return;
31
+ const u = i.getEntries(A);
32
+ u.replace && u.replace.action.click(g, A);
33
+ });
34
+ }
35
+ G.$inject = [
36
+ "config.contextPad",
37
+ "injector",
38
+ "eventBus",
39
+ "contextPad",
40
+ "modeling",
41
+ "elementFactory",
42
+ "connect",
43
+ "create",
44
+ "popupMenu",
45
+ "canvas",
46
+ "rules",
47
+ "translate",
48
+ "elementRegistry"
49
+ ];
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 = {};
52
+ if (n.type === "label")
53
+ return s;
54
+ const m = n.businessObject;
55
+ function g(c, v) {
56
+ r.start(c, v);
57
+ }
58
+ function w() {
59
+ t.removeElements([n]);
60
+ }
61
+ function A(c) {
62
+ const b = o.getContainer(), x = e.getPad(c).html, I = b.getBoundingClientRect(), _ = x.getBoundingClientRect(), M = _.top - I.top;
53
63
  return {
54
- documentation: ""
64
+ x: _.left - I.left,
65
+ y: M + _.height + 5
55
66
  };
56
- },
57
- watch: {
58
- id: {
59
- immediate: !0,
60
- handler() {
61
- if (Ke(this.element))
62
- this.documentation = "";
63
- else {
64
- const {
65
- businessObject: { documentation: i }
66
- } = this.element;
67
- this.documentation = (i == null ? void 0 : i[0].text) || "";
68
- }
69
- }
67
+ }
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
74
+ });
70
75
  }
71
- },
72
- methods: {
73
- updateDocumentation() {
74
- const { modeling: i } = this.bpmnInstances, {
75
- businessObject: { documentation: e }
76
- } = this.element;
77
- if (e != null && e.length)
78
- e[0].set("text", this.documentation), i.updateProperties(this.element, { documentation: e });
79
- else {
80
- const { bpmnFactory: t } = this.bpmnInstances, n = t.create("bpmn:Documentation", { text: this.documentation });
81
- i.updateProperties(this.element, { documentation: [n] });
76
+ return {
77
+ group: "model",
78
+ className: v,
79
+ title: b,
80
+ action: {
81
+ dragstart: I,
82
+ click: S ? function(M, D) {
83
+ const B = i.createShape(d({ type: c }, x));
84
+ S.append(D, B);
85
+ } : I
82
86
  }
83
- }
87
+ };
84
88
  }
85
- };
86
- var ut = function() {
87
- var e = this, t = e._self._c;
88
- return t("div", { staticClass: "panel-tab__content" }, [t("div", { staticClass: "element-property input-property" }, [t("div", { staticClass: "element-property__label" }, [e._v("元素文档:")]), t("div", { staticClass: "element-property__value" }, [t(p, { attrs: { type: "textarea", size: "mini", resize: "vertical", autosize: { minRows: 2, maxRows: 4 } }, on: { input: e.updateDocumentation }, model: { value: e.documentation, callback: function(n) {
89
- e.documentation = n;
90
- }, expression: "documentation" } })], 1)])]);
91
- }, dt = [], ft = /* @__PURE__ */ w(
92
- ct,
93
- ut,
94
- dt,
95
- !1,
96
- null,
97
- null
98
- );
99
- const oe = ft.exports, yt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
100
- __proto__: null,
101
- default: oe
102
- }, Symbol.toStringTag, { value: "Module" })), bt = {
103
- name: "ElementProperties",
104
- inject: {
105
- prefix: "prefix",
106
- width: "width"
107
- },
108
- props: {
109
- id: String,
110
- element: Object,
111
- bpmnInstances: Object
112
- },
113
- data() {
114
- return {
115
- elementPropertyList: [],
116
- propertyForm: {},
117
- editingPropertyIndex: -1,
118
- propertyFormModelVisible: !1
89
+ function k(c) {
90
+ return function(v, b) {
91
+ t.splitLane(b, c), e.open(b, !0);
119
92
  };
120
- },
121
- watch: {
122
- id: {
123
- immediate: !0,
124
- handler(i) {
125
- i != null && i.length && this.resetAttributesList();
93
+ }
94
+ if ($(m, ["bpmn:Lane", "bpmn:Participant"]) && de(m)) {
95
+ const c = be(n);
96
+ d(s, {
97
+ "lane-insert-above": {
98
+ group: "lane-insert-above",
99
+ className: "bpmn-icon-lane-insert-above",
100
+ title: l("Add Lane above"),
101
+ action: {
102
+ click: function(v, b) {
103
+ t.addLane(b, "top");
104
+ }
105
+ }
126
106
  }
127
- }
128
- },
129
- methods: {
130
- resetAttributesList() {
131
- var i, e, t;
132
- this.otherExtensionList = [], this.bpmnElementProperties = ((t = (e = (i = this.element.businessObject) == null ? void 0 : i.extensionElements) == null ? void 0 : e.values) == null ? void 0 : t.filter((n) => (n.$type !== `${this.prefix}:Properties` && this.otherExtensionList.push(n), n.$type === `${this.prefix}:Properties`))) ?? [], this.bpmnElementPropertyList = this.bpmnElementProperties.reduce((n, s) => n.concat(s.values), []), this.elementPropertyList = E(this.bpmnElementPropertyList ?? []);
133
- },
134
- openAttributesForm(i, e) {
135
- this.editingPropertyIndex = e, this.propertyForm = e === -1 ? {} : E(i), this.propertyFormModelVisible = !0, this.$nextTick(() => {
136
- this.$refs.attributeFormRef && this.$refs.attributeFormRef.clearValidate();
137
- });
138
- },
139
- removeAttributes(i, e) {
140
- this.$confirm("确认移除该属性吗?", "提示", {
141
- confirmButtonText: "确 认",
142
- cancelButtonText: "取 消"
143
- }).then(() => {
144
- this.elementPropertyList.splice(e, 1), this.bpmnElementPropertyList.splice(e, 1);
145
- const t = this.bpmnInstances.moddle.create(`${this.prefix}:Properties`, {
146
- values: this.bpmnElementPropertyList
147
- });
148
- this.updateElementExtensions(t), this.resetAttributesList();
149
- }).catch(() => {
150
- });
151
- },
152
- saveAttribute() {
153
- const { name: i, value: e } = this.propertyForm;
154
- if (this.editingPropertyIndex !== -1)
155
- this.bpmnInstances.modeling.updateModdleProperties(this.element, this.bpmnElementPropertyList[this.editingPropertyIndex], {
156
- name: i,
157
- value: e
158
- });
159
- else {
160
- const t = this.bpmnInstances.moddle.create(`${this.prefix}:Property`, { name: i, value: e }), n = this.bpmnInstances.moddle.create(`${this.prefix}:Properties`, {
161
- values: this.bpmnElementPropertyList.concat([t])
162
- });
163
- this.updateElementExtensions(n);
107
+ }), c.length < 2 && (n.height >= 120 && d(s, {
108
+ "lane-divide-two": {
109
+ group: "lane-divide",
110
+ className: "bpmn-icon-lane-divide-two",
111
+ title: l("Divide into two Lanes"),
112
+ action: {
113
+ click: k(2)
114
+ }
115
+ }
116
+ }), n.height >= 180 && d(s, {
117
+ "lane-divide-three": {
118
+ group: "lane-divide",
119
+ className: "bpmn-icon-lane-divide-three",
120
+ title: l("Divide into three Lanes"),
121
+ action: {
122
+ click: k(3)
123
+ }
124
+ }
125
+ })), d(s, {
126
+ "lane-insert-below": {
127
+ group: "lane-insert-below",
128
+ className: "bpmn-icon-lane-insert-below",
129
+ title: l("Add Lane below"),
130
+ action: {
131
+ click: function(v, b) {
132
+ t.addLane(b, "bottom");
133
+ }
134
+ }
164
135
  }
165
- this.propertyFormModelVisible = !1, this.resetAttributesList();
166
- },
167
- updateElementExtensions(i) {
168
- const e = this.bpmnInstances.moddle.create("bpmn:ExtensionElements", {
169
- values: this.otherExtensionList.concat([i])
170
- });
171
- this.bpmnInstances.modeling.updateProperties(this.element, {
172
- extensionElements: e
173
- });
174
- }
175
- }
176
- };
177
- var ht = function() {
178
- var e = this, t = e._self._c;
179
- return t("div", { staticClass: "panel-tab__content" }, [t($, { attrs: { data: e.elementPropertyList, size: "mini", "max-height": "240", border: "", fit: "" } }, [t(c, { attrs: { label: "序号", width: "50px", type: "index" } }), t(c, { attrs: { label: "属性名", prop: "name", "min-width": "100px", "show-overflow-tooltip": "" } }), t(c, { attrs: { label: "属性值", prop: "value", "min-width": "100px", "show-overflow-tooltip": "" } }), t(c, { attrs: { label: "操作", width: "90px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: n, $index: s }) {
180
- return [t(l, { attrs: { size: "mini", type: "text" }, on: { click: function(a) {
181
- return e.openAttributesForm(n, s);
182
- } } }, [e._v("编辑")]), t(S, { attrs: { direction: "vertical" } }), t(l, { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(a) {
183
- return e.removeAttributes(n, s);
184
- } } }, [e._v("移除")])];
185
- } }]) })], 1), t("div", { staticClass: "element-drawer__button" }, [t(l, { attrs: { size: "mini", type: "primary", icon: "el-icon-plus" }, on: { click: function(n) {
186
- return e.openAttributesForm(null, -1);
187
- } } }, [e._v("添加属性")])], 1), t(N, { staticClass: "flow-dialog", attrs: { visible: e.propertyFormModelVisible, title: "属性配置", width: "600px", "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(n) {
188
- e.propertyFormModelVisible = n;
189
- } }, scopedSlots: e._u([{ key: "footer", fn: function() {
190
- return [t(l, { attrs: { size: "mini" }, on: { click: function(n) {
191
- e.propertyFormModelVisible = !1;
192
- } } }, [e._v("取 消")]), t(l, { attrs: { size: "mini", type: "primary" }, on: { click: e.saveAttribute } }, [e._v("确 定")])];
193
- }, proxy: !0 }]) }, [t(T, { ref: "attributeFormRef", attrs: { model: e.propertyForm, "label-width": "80px", size: "mini" }, nativeOn: { submit: function(n) {
194
- n.preventDefault();
195
- } } }, [t(o, { attrs: { label: "属性名:", prop: "name" } }, [t(p, { attrs: { clearable: "" }, model: { value: e.propertyForm.name, callback: function(n) {
196
- e.$set(e.propertyForm, "name", n);
197
- }, expression: "propertyForm.name" } })], 1), t(o, { attrs: { label: "属性值:", prop: "value" } }, [t(p, { attrs: { clearable: "" }, model: { value: e.propertyForm.value, callback: function(n) {
198
- e.$set(e.propertyForm, "value", n);
199
- }, expression: "propertyForm.value" } })], 1)], 1)], 1)], 1);
200
- }, vt = [], gt = /* @__PURE__ */ w(
201
- bt,
202
- ht,
203
- vt,
204
- !1,
205
- null,
206
- null
207
- );
208
- const le = gt.exports, xt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
209
- __proto__: null,
210
- default: le
211
- }, Symbol.toStringTag, { value: "Module" }));
212
- function Oe(i, e, t, n) {
213
- const s = /* @__PURE__ */ Object.create(null);
214
- switch (s.event = e.event, t && (s.id = e.id), e.listenerType) {
215
- case "scriptListener":
216
- s.script = St(i, e, n);
217
- break;
218
- case "expressionListener":
219
- s.expression = e.expression;
220
- break;
221
- case "delegateExpressionListener":
222
- s.delegateExpression = e.delegateExpression;
223
- break;
224
- default:
225
- s.class = e.class;
226
- }
227
- if (e.fields && (s.fields = e.fields.map((a) => Ft(i, a, n))), t && e.event === "timeout" && e.eventDefinitionType) {
228
- const a = i.moddle.create("bpmn:FormalExpression", {
229
- body: e.eventTimeDefinitions
230
- }), r = i.moddle.create("bpmn:TimerEventDefinition", {
231
- id: `TimerEventDefinition_${_t(8)}`,
232
- [`time${e.eventDefinitionType.replace(/^\S/, (m) => m.toUpperCase())}`]: a
233
136
  });
234
- s.eventDefinitions = [r];
235
- }
236
- return i.moddle.create(`${n}:${t ? "TaskListener" : "ExecutionListener"}`, s);
237
- }
238
- function Ft(i, e, t) {
239
- const { name: n, fieldType: s, string: a, expression: r } = e, m = s === "string" ? { name: n, string: a } : { name: n, expression: r };
240
- return i.moddle.create(`${t}:Field`, m);
241
- }
242
- function St(i, e, t) {
243
- const { scriptType: n, scriptFormat: s, value: a, resource: r } = e, m = n === "inlineScript" ? { scriptFormat: s, value: a } : { scriptFormat: s, resource: r };
244
- return i.moddle.create(`${t}:Script`, m);
245
- }
246
- function te(i, e, t) {
247
- const n = i.moddle.create("bpmn:ExtensionElements", {
248
- values: t
249
- });
250
- i.modeling.updateProperties(e, {
251
- extensionElements: n
252
- });
253
- }
254
- function _t(i = 8, e) {
255
- let t = "";
256
- const n = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
257
- for (let s = i; s > 0; --s)
258
- t += n[Math.floor(Math.random() * n.length)];
259
- return t;
260
- }
261
- const se = (i, e = "body") => i ? i.get(e) : null, Ae = (i, e, t = "body", n) => {
262
- Et(i, e, { [t]: n });
263
- }, Et = ({ modeling: i }, e, t) => {
264
- i.updateProperties(e, t);
265
- };
266
- function Me(i) {
267
- let e = { ...i };
268
- if (i.script && (e = {
269
- ...i,
270
- ...i.script,
271
- scriptType: i.script.resource ? "externalScript" : "inlineScript"
272
- }), i.event === "timeout" && i.eventDefinitions && i.eventDefinitions.length) {
273
- let t = "";
274
- for (const n in i.eventDefinitions[0])
275
- n.indexOf("time") !== -1 && (t = n, e.eventDefinitionType = n.replace("time", "").toLowerCase());
276
- e.eventTimeDefinitions = i.eventDefinitions[0][t].body;
277
137
  }
278
- return e;
279
- }
280
- function De(i) {
281
- var t;
282
- let e;
283
- return i.class && (e = "classListener"), i.expression && (e = "expressionListener"), i.delegateExpression && (e = "delegateExpressionListener"), i.script && (e = "scriptListener"), {
284
- ...E(i),
285
- ...i.script ?? {},
286
- fields: (t = i.fields) == null ? void 0 : t.map((n) => ({ ...n, fieldType: n.expression ? "expression" : "string" })),
287
- listenerType: e
288
- };
289
- }
290
- const Be = {
291
- classListener: "Java 类",
292
- expressionListener: "表达式",
293
- delegateExpressionListener: "代理表达式",
294
- scriptListener: "脚本"
295
- }, At = {
296
- create: "创建",
297
- assignment: "指派",
298
- complete: "完成",
299
- delete: "删除",
300
- update: "更新",
301
- timeout: "超时"
302
- }, ze = {
303
- string: "字符串",
304
- expression: "表达式"
305
- }, Ct = {
306
- name: "UserTaskListeners",
307
- inject: {
308
- prefix: "prefix",
309
- width: "width"
310
- },
311
- props: {
312
- id: String,
313
- element: Object,
314
- bpmnInstances: Object
315
- },
316
- data() {
317
- return {
318
- elementListenersList: [],
319
- listenerEventTypeObject: At,
320
- listenerTypeObject: Be,
321
- listenerFormModelVisible: !1,
322
- listenerForm: {},
323
- fieldTypeObject: ze,
324
- fieldsListOfListener: [],
325
- listenerFieldFormModelVisible: !1,
326
- // 监听器 注入字段表单弹窗 显示状态
327
- editingListenerIndex: -1,
328
- // 监听器所在下标,-1 为新增
329
- editingListenerFieldIndex: -1,
330
- // 字段所在下标,-1 为新增
331
- listenerFieldForm: {}
332
- // 监听器 注入字段 详情表单
333
- };
334
- },
335
- watch: {
336
- id: {
337
- immediate: !0,
338
- async handler(i) {
339
- i && (await this.$nextTick(), this.resetListenersList());
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(
141
+ "bpmn:IntermediateCatchEvent",
142
+ "bpmn-icon-intermediate-event-catch-message",
143
+ l("Append MessageIntermediateCatchEvent"),
144
+ { eventDefinitionType: "bpmn:MessageEventDefinition" }
145
+ ),
146
+ "append.timer-intermediate-event": u(
147
+ "bpmn:IntermediateCatchEvent",
148
+ "bpmn-icon-intermediate-event-catch-timer",
149
+ l("Append TimerIntermediateCatchEvent"),
150
+ { eventDefinitionType: "bpmn:TimerEventDefinition" }
151
+ ),
152
+ "append.condition-intermediate-event": u(
153
+ "bpmn:IntermediateCatchEvent",
154
+ "bpmn-icon-intermediate-event-catch-condition",
155
+ l("Append ConditionIntermediateCatchEvent"),
156
+ { eventDefinitionType: "bpmn:ConditionalEventDefinition" }
157
+ ),
158
+ "append.signal-intermediate-event": u(
159
+ "bpmn:IntermediateCatchEvent",
160
+ "bpmn-icon-intermediate-event-catch-signal",
161
+ l("Append SignalIntermediateCatchEvent"),
162
+ { eventDefinitionType: "bpmn:SignalEventDefinition" }
163
+ )
164
+ }) : Y(m, "bpmn:BoundaryEvent", "bpmn:CompensateEventDefinition") ? d(s, {
165
+ "append.compensation-activity": u("bpmn:Task", "bpmn-icon-task", l("Append compensation activity"), {
166
+ isForCompensation: !0
167
+ })
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(
173
+ "bpmn:IntermediateThrowEvent",
174
+ "bpmn-icon-intermediate-event-none",
175
+ l("Append Intermediate/Boundary Event")
176
+ )
177
+ })), p.isEmpty(n, "bpmn-replace") || d(s, {
178
+ replace: {
179
+ group: "edit",
180
+ className: "bpmn-icon-screw-wrench",
181
+ title: l("Change type"),
182
+ action: {
183
+ click: function(c, v) {
184
+ const b = d(A(v), {
185
+ cursor: { x: c.x, y: c.y }
186
+ });
187
+ p.open(v, "bpmn-replace", b);
188
+ }
340
189
  }
341
190
  }
342
- },
343
- methods: {
344
- resetListenersList() {
345
- var i, e, t;
346
- this.otherExtensionList = [], this.bpmnElementListeners = ((t = (e = (i = this.element.businessObject) == null ? void 0 : i.extensionElements) == null ? void 0 : e.values) == null ? void 0 : t.filter((n) => n.$type === `${this.prefix}:TaskListener`)) ?? [], this.elementListenersList = this.bpmnElementListeners.map((n) => De(n));
347
- },
348
- async openListenerForm(i, e) {
349
- var t;
350
- i ? (this.listenerForm = Me(i), this.editingListenerIndex = e) : (this.listenerForm = {}, this.editingListenerIndex = -1), i && i.fields ? this.fieldsListOfListener = i.fields.map((n) => ({
351
- ...n,
352
- fieldType: n.string ? "string" : "expression"
353
- })) : (this.fieldsListOfListener = [], this.$set(this.listenerForm, "fields", [])), this.listenerFormModelVisible = !0, await this.$nextTick(), (t = this.$refs.listenerFormRef) == null || t.clearValidate();
354
- },
355
- // 移除监听器
356
- async removeListener(i, e) {
357
- try {
358
- await this.$confirm("确认移除该监听器吗?", "提示"), this.bpmnElementListeners.splice(e, 1), this.elementListenersList.splice(e, 1), te(this.bpmnInstances, this.element, this.otherExtensionList.concat(this.bpmnElementListeners));
359
- } catch {
360
- }
361
- },
362
- // 保存监听器
363
- async saveListenerConfig() {
364
- var t, n, s;
365
- if (!await this.$refs.listenerFormRef.validate()) return;
366
- const e = Oe(this.bpmnInstances, this.listenerForm, !0, this.prefix);
367
- this.editingListenerIndex === -1 ? (this.bpmnElementListeners.push(e), this.elementListenersList.push(this.listenerForm)) : (this.bpmnElementListeners.splice(this.editingListenerIndex, 1, e), this.elementListenersList.splice(this.editingListenerIndex, 1, this.listenerForm)), this.otherExtensionList = ((s = (n = (t = this.element.businessObject) == null ? void 0 : t.extensionElements) == null ? void 0 : n.values) == null ? void 0 : s.filter((a) => a.$type !== `${this.prefix}:TaskListener`)) ?? [], te(this.bpmnInstances, this.element, this.otherExtensionList.concat(this.bpmnElementListeners)), this.listenerFormModelVisible = !1, this.listenerForm = {};
368
- },
369
- // 打开监听器字段编辑弹窗
370
- async openListenerFieldForm(i, e) {
371
- var t;
372
- this.listenerFieldForm = i ? E(i) : {}, this.editingListenerFieldIndex = i ? e : -1, this.listenerFieldFormModelVisible = !0, await this.$nextTick(), (t = this.$refs.listenerFieldFormRef) == null || t.clearValidate();
373
- },
374
- // 保存监听器注入字段
375
- async saveListenerFiled() {
376
- await this.$refs.listenerFieldFormRef.validate() && (this.editingListenerFieldIndex === -1 ? (this.fieldsListOfListener.push(this.listenerFieldForm), this.listenerForm.fields.push(this.listenerFieldForm)) : (this.fieldsListOfListener.splice(this.editingListenerFieldIndex, 1, this.listenerFieldForm), this.listenerForm.fields.splice(this.editingListenerFieldIndex, 1, this.listenerFieldForm)), this.listenerFieldFormModelVisible = !1, await this.$nextTick(), this.listenerFieldForm = {});
377
- },
378
- // 移除监听器字段
379
- async removeListenerField(i, e) {
380
- try {
381
- await this.$confirm("确认移除该字段吗?", "提示"), this.fieldsListOfListener.splice(e, 1), this.listenerForm.fields.splice(e, 1);
382
- } catch {
191
+ }), $(m, ["bpmn:FlowNode", "bpmn:InteractionNode", "bpmn:DataObjectReference", "bpmn:DataStoreReference"]) && d(s, {
192
+ "append.text-annotation": u("bpmn:TextAnnotation", "bpmn-icon-text-annotation"),
193
+ connect: {
194
+ group: "connect",
195
+ className: "bpmn-icon-connection-multi",
196
+ title: l(`Connect using ${m.isForCompensation ? "" : "Sequence/MessageFlow or "}Association`),
197
+ action: {
198
+ click: g,
199
+ dragstart: g
383
200
  }
384
201
  }
385
- }
386
- };
387
- var Tt = function() {
388
- var e = this, t = e._self._c;
389
- return t("div", { staticClass: "panel-tab__content" }, [t($, { attrs: { data: e.elementListenersList, size: "mini", border: "" } }, [t(c, { attrs: { label: "序号", width: "50px", type: "index" } }), t(c, { attrs: { label: "事件类型", "min-width": "80px", "show-overflow-tooltip": "", formatter: (n) => e.listenerEventTypeObject[n.event] } }), t(c, { attrs: { label: "事件id", "min-width": "80px", prop: "id", "show-overflow-tooltip": "" } }), t(c, { attrs: { label: "监听器类型", "min-width": "80px", "show-overflow-tooltip": "", formatter: (n) => e.listenerTypeObject[n.listenerType] } }), t(c, { attrs: { label: "操作", width: "90px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: n, $index: s }) {
390
- return [t(l, { attrs: { size: "mini", type: "text" }, on: { click: function(a) {
391
- return e.openListenerForm(n, s);
392
- } } }, [e._v("编辑")]), t(S, { attrs: { direction: "vertical" } }), t(l, { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(a) {
393
- return e.removeListener(n, s);
394
- } } }, [e._v("移除")])];
395
- } }]) })], 1), t("div", { staticClass: "element-drawer__button" }, [t(l, { attrs: { size: "mini", type: "primary", icon: "el-icon-plus" }, on: { click: function(n) {
396
- return e.openListenerForm(null);
397
- } } }, [e._v("添加监听器")])], 1), t(fe, { staticClass: "flow-drawer", attrs: { visible: e.listenerFormModelVisible, title: "任务监听器", size: `${e.width}px`, "wrapper-closable": !1, "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(n) {
398
- e.listenerFormModelVisible = n;
399
- } } }, [t(T, { ref: "listenerFormRef", attrs: { size: "mini", model: e.listenerForm, "label-width": "96px" }, nativeOn: { submit: function(n) {
400
- n.preventDefault();
401
- } } }, [t(o, { attrs: { label: "事件类型", prop: "event", rules: { required: !0, trigger: ["blur", "change"] } } }, [t(h, { model: { value: e.listenerForm.event, callback: function(n) {
402
- e.$set(e.listenerForm, "event", n);
403
- }, expression: "listenerForm.event" } }, e._l(Object.keys(e.listenerEventTypeObject), function(n) {
404
- return t(u, { key: n, attrs: { label: e.listenerEventTypeObject[n], value: n } });
405
- }), 1)], 1), t(o, { attrs: { label: "监听器ID", prop: "id", rules: { required: !0, trigger: ["blur", "change"] } } }, [t(p, { attrs: { clearable: "" }, model: { value: e.listenerForm.id, callback: function(n) {
406
- e.$set(e.listenerForm, "id", n);
407
- }, expression: "listenerForm.id" } })], 1), t(o, { attrs: { label: "监听器类型", prop: "listenerType", rules: { required: !0, trigger: ["blur", "change"] } } }, [t(h, { model: { value: e.listenerForm.listenerType, callback: function(n) {
408
- e.$set(e.listenerForm, "listenerType", n);
409
- }, expression: "listenerForm.listenerType" } }, e._l(Object.keys(e.listenerTypeObject), function(n) {
410
- return t(u, { key: n, attrs: { label: e.listenerTypeObject[n], value: n } });
411
- }), 1)], 1), e.listenerForm.listenerType === "classListener" ? t(o, { key: "listener-class", attrs: { label: "Java类", prop: "class", rules: { required: !0, trigger: ["blur", "change"] } } }, [t(p, { attrs: { clearable: "" }, model: { value: e.listenerForm.class, callback: function(n) {
412
- e.$set(e.listenerForm, "class", n);
413
- }, expression: "listenerForm.class" } })], 1) : e._e(), e.listenerForm.listenerType === "expressionListener" ? t(o, { key: "listener-expression", attrs: { label: "表达式", prop: "expression", rules: { required: !0, trigger: ["blur", "change"] } } }, [t(p, { attrs: { clearable: "" }, model: { value: e.listenerForm.expression, callback: function(n) {
414
- e.$set(e.listenerForm, "expression", n);
415
- }, expression: "listenerForm.expression" } })], 1) : e._e(), e.listenerForm.listenerType === "delegateExpressionListener" ? t(o, { key: "listener-delegate", attrs: { label: "代理表达式", prop: "delegateExpression", rules: { required: !0, trigger: ["blur", "change"] } } }, [t(p, { attrs: { clearable: "" }, model: { value: e.listenerForm.delegateExpression, callback: function(n) {
416
- e.$set(e.listenerForm, "delegateExpression", n);
417
- }, expression: "listenerForm.delegateExpression" } })], 1) : e._e(), e.listenerForm.listenerType === "scriptListener" ? [t(o, { key: "listener-script-format", attrs: { label: "脚本格式", prop: "scriptFormat", rules: { required: !0, trigger: ["blur", "change"], message: "请填写脚本格式" } } }, [t(p, { attrs: { clearable: "" }, model: { value: e.listenerForm.scriptFormat, callback: function(n) {
418
- e.$set(e.listenerForm, "scriptFormat", n);
419
- }, expression: "listenerForm.scriptFormat" } })], 1), t(o, { key: "listener-script-type", attrs: { label: "脚本类型", prop: "scriptType", rules: { required: !0, trigger: ["blur", "change"], message: "请选择脚本类型" } } }, [t(h, { model: { value: e.listenerForm.scriptType, callback: function(n) {
420
- e.$set(e.listenerForm, "scriptType", n);
421
- }, expression: "listenerForm.scriptType" } }, [t(u, { attrs: { label: "内联脚本", value: "inlineScript" } }), t(u, { attrs: { label: "外部脚本", value: "externalScript" } })], 1)], 1), e.listenerForm.scriptType === "inlineScript" ? t(o, { key: "listener-script", attrs: { label: "脚本内容", prop: "value", rules: { required: !0, trigger: ["blur", "change"], message: "请填写脚本内容" } } }, [t(p, { attrs: { clearable: "" }, model: { value: e.listenerForm.value, callback: function(n) {
422
- e.$set(e.listenerForm, "value", n);
423
- }, expression: "listenerForm.value" } })], 1) : e._e(), e.listenerForm.scriptType === "externalScript" ? t(o, { key: "listener-resource", attrs: { label: "资源地址", prop: "resource", rules: { required: !0, trigger: ["blur", "change"], message: "请填写资源地址" } } }, [t(p, { attrs: { clearable: "" }, model: { value: e.listenerForm.resource, callback: function(n) {
424
- e.$set(e.listenerForm, "resource", n);
425
- }, expression: "listenerForm.resource" } })], 1) : e._e()] : e._e(), e.listenerForm.event === "timeout" ? [t(o, { key: "eventDefinitionType", attrs: { label: "定时器类型", prop: "eventDefinitionType" } }, [t(h, { model: { value: e.listenerForm.eventDefinitionType, callback: function(n) {
426
- e.$set(e.listenerForm, "eventDefinitionType", n);
427
- }, expression: "listenerForm.eventDefinitionType" } }, [t(u, { attrs: { label: "日期", value: "date" } }), t(u, { attrs: { label: "持续时长", value: "duration" } }), t(u, { attrs: { label: "循环", value: "cycle" } }), t(u, { attrs: { label: "无", value: "null" } })], 1)], 1), e.listenerForm.eventDefinitionType && e.listenerForm.eventDefinitionType !== "null" ? t(o, { key: "eventTimeDefinitions", attrs: { label: "定时器", prop: "eventTimeDefinitions", rules: { required: !0, trigger: ["blur", "change"], message: "请填写定时器配置" } } }, [t(p, { attrs: { clearable: "" }, model: { value: e.listenerForm.eventTimeDefinitions, callback: function(n) {
428
- e.$set(e.listenerForm, "eventTimeDefinitions", n);
429
- }, expression: "listenerForm.eventTimeDefinitions" } })], 1) : e._e()] : e._e()], 2), t(S), t("p", { staticClass: "listener-filed__title", staticStyle: { "padding-bottom": "6px" } }, [t("span", [t("i", { staticClass: "el-icon-menu" }), e._v("注入字段:")]), t(l, { staticStyle: { "margin-left": "auto" }, attrs: { size: "mini", type: "primary" }, on: { click: function(n) {
430
- return e.openListenerFieldForm(null);
431
- } } }, [e._v("添加字段")])], 1), t($, { staticStyle: { flex: "none" }, attrs: { data: e.fieldsListOfListener, size: "mini", "max-height": "240", border: "", fit: "" } }, [t(c, { attrs: { label: "序号", width: "50px", type: "index" } }), t(c, { attrs: { label: "字段名称", "min-width": "100px", prop: "name" } }), t(c, { attrs: { label: "字段类型", "min-width": "80px", "show-overflow-tooltip": "", formatter: (n) => e.fieldTypeObject[n.fieldType] } }), t(c, { attrs: { label: "字段值/表达式", "min-width": "100px", "show-overflow-tooltip": "", formatter: (n) => n.string || n.expression } }), t(c, { attrs: { label: "操作", width: "100px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: n, $index: s }) {
432
- return [t(l, { attrs: { size: "mini", type: "text" }, on: { click: function(a) {
433
- return e.openListenerFieldForm(n, s);
434
- } } }, [e._v("编辑")]), t(S, { attrs: { direction: "vertical" } }), t(l, { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(a) {
435
- return e.removeListenerField(n, s);
436
- } } }, [e._v(" 移除 ")])];
437
- } }]) })], 1), t("div", { staticClass: "element-drawer__button" }, [t(l, { attrs: { size: "mini" }, on: { click: function(n) {
438
- e.listenerFormModelVisible = !1;
439
- } } }, [e._v("取 消")]), t(l, { attrs: { size: "mini", type: "primary" }, on: { click: e.saveListenerConfig } }, [e._v("保 存")])], 1)], 1), t(N, { staticClass: "flow-dialog", attrs: { title: "字段配置", visible: e.listenerFieldFormModelVisible, width: "600px", "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(n) {
440
- e.listenerFieldFormModelVisible = n;
441
- } }, scopedSlots: e._u([{ key: "footer", fn: function() {
442
- return [t(l, { attrs: { size: "mini" }, on: { click: function(n) {
443
- e.listenerFieldFormModelVisible = !1;
444
- } } }, [e._v("取 消")]), t(l, { attrs: { size: "mini", type: "primary" }, on: { click: e.saveListenerFiled } }, [e._v("确 定")])];
445
- }, proxy: !0 }]) }, [t(T, { ref: "listenerFieldFormRef", staticStyle: { height: "136px" }, attrs: { model: e.listenerFieldForm, size: "mini", "label-width": "96px" }, nativeOn: { submit: function(n) {
446
- n.preventDefault();
447
- } } }, [t(o, { attrs: { label: "字段名称:", prop: "name", rules: { required: !0, trigger: ["blur", "change"] } } }, [t(p, { attrs: { clearable: "" }, model: { value: e.listenerFieldForm.name, callback: function(n) {
448
- e.$set(e.listenerFieldForm, "name", n);
449
- }, expression: "listenerFieldForm.name" } })], 1), t(o, { attrs: { label: "字段类型:", prop: "fieldType", rules: { required: !0, trigger: ["blur", "change"] } } }, [t(h, { model: { value: e.listenerFieldForm.fieldType, callback: function(n) {
450
- e.$set(e.listenerFieldForm, "fieldType", n);
451
- }, expression: "listenerFieldForm.fieldType" } }, e._l(Object.keys(e.fieldTypeObject), function(n) {
452
- return t(u, { key: n, attrs: { label: e.fieldTypeObject[n], value: n } });
453
- }), 1)], 1), e.listenerFieldForm.fieldType === "string" ? t(o, { key: "field-string", attrs: { label: "字段值:", prop: "string", rules: { required: !0, trigger: ["blur", "change"] } } }, [t(p, { attrs: { clearable: "" }, model: { value: e.listenerFieldForm.string, callback: function(n) {
454
- e.$set(e.listenerFieldForm, "string", n);
455
- }, expression: "listenerFieldForm.string" } })], 1) : e._e(), e.listenerFieldForm.fieldType === "expression" ? t(o, { key: "field-expression", attrs: { label: "表达式:", prop: "expression", rules: { required: !0, trigger: ["blur", "change"] } } }, [t(p, { attrs: { clearable: "" }, model: { value: e.listenerFieldForm.expression, callback: function(n) {
456
- e.$set(e.listenerFieldForm, "expression", n);
457
- }, expression: "listenerFieldForm.expression" } })], 1) : e._e()], 1)], 1)], 1);
458
- }, wt = [], kt = /* @__PURE__ */ w(
459
- Ct,
460
- Tt,
461
- wt,
462
- !1,
463
- null,
464
- null
465
- );
466
- const pe = kt.exports, It = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
467
- __proto__: null,
468
- default: pe
469
- }, Symbol.toStringTag, { value: "Module" })), Lt = (i) => ({
470
- $type: "flowable:ExecutionListener",
471
- event: i === "draft" ? "start" : i,
472
- delegateExpression: "${httpInvokeExecutionListener}",
473
- fields: [],
474
- listenerType: "delegateExpressionListener"
475
- }), Pt = (i, e) => [
476
- { $type: "flowable:Field", name: "serviceId", string: e.serviceId, fieldType: "string" },
477
- {
478
- $type: "flowable:Field",
479
- name: "url",
480
- string: `${e != null && e.url ? `/${e.url}` : ""}/flow${Je(i)}`,
481
- fieldType: "string"
482
- }
483
- ], $t = {
484
- name: "ElementListeners",
485
- inject: {
486
- prefix: "prefix",
487
- width: "width",
488
- context: "context"
489
- },
490
- props: {
491
- id: String,
492
- element: Object,
493
- bpmnInstances: Object
494
- },
495
- data() {
496
- return {
497
- elementListenersList: [],
498
- // 监听器列表
499
- listenerForm: {},
500
- // 监听器详情表单
501
- listenerFormModelVisible: !1,
502
- // 监听器 编辑 侧边栏显示状态
503
- fieldsListOfListener: [],
504
- listenerFieldForm: {},
505
- // 监听器 注入字段 详情表单
506
- listenerFieldFormModelVisible: !1,
507
- // 监听器 注入字段表单弹窗 显示状态
508
- editingListenerIndex: -1,
509
- // 监听器所在下标,-1 为新增
510
- editingListenerFieldIndex: -1,
511
- // 字段所在下标,-1 为新增
512
- listenerTypeObject: Be,
513
- fieldTypeObject: ze
514
- };
515
- },
516
- computed: {
517
- apis() {
518
- var e;
519
- return (((e = this.context) == null ? void 0 : e.apis) || ["flowDraft", "flowStart", "flowEnd"]).map((t) => {
520
- var n;
521
- return `${(n = this.context) != null && n.url ? `/${this.context.url}/` : ""}${t}`;
522
- }) || [];
523
- }
524
- },
525
- watch: {
526
- id: {
527
- immediate: !0,
528
- async handler(i) {
529
- i && (await this.$nextTick(), this.resetListenersList());
202
+ }), $(m, ["bpmn:DataObjectReference", "bpmn:DataStoreReference"]) && d(s, {
203
+ connect: {
204
+ group: "connect",
205
+ className: "bpmn-icon-connection-multi",
206
+ title: l("Connect using DataInputAssociation"),
207
+ action: {
208
+ click: g,
209
+ dragstart: g
530
210
  }
531
211
  }
532
- },
533
- methods: {
534
- resetListenersList() {
535
- var i, e, t;
536
- this.otherExtensionList = [], this.bpmnElementListeners = ((t = (e = (i = this.element.businessObject) == null ? void 0 : i.extensionElements) == null ? void 0 : e.values) == null ? void 0 : t.filter((n) => n.$type === `${this.prefix}:ExecutionListener`)) ?? [], this.elementListenersList = this.bpmnElementListeners.map((n) => De(n));
537
- },
538
- changeFiledType(i) {
539
- i === "string" ? (delete this.listenerFieldForm.expression, this.$set(this.listenerFieldForm, "string", "")) : (delete this.listenerFieldForm.string, this.$set(this.listenerFieldForm, "expression", ""));
540
- },
541
- assignListener(i) {
542
- const e = Lt(i, this.context);
543
- e.fields = Pt(i, this.context), this.listenerForm = e, this.fieldsListOfListener = e.fields;
544
- },
545
- setDefaultFieldValue(i) {
546
- i !== "url" ? this.$set(this.listenerFieldForm, "string", this.context[i] || "") : this.$set(this.listenerFieldForm, "string", "");
547
- },
548
- // 打开 监听器详情 侧边栏
549
- async openListenerForm(i, e) {
550
- var t;
551
- i ? (this.listenerForm = Me(i), this.fieldsListOfListener = i.fields ? i.fields.map((n) => ({ ...n })) : [], this.editingListenerIndex = e) : (this.listenerForm = { fields: [] }, this.fieldsListOfListener = [], this.editingListenerIndex = -1), this.listenerFormModelVisible = !0, await this.$nextTick(), (t = this.$refs.listenerFormRef) == null || t.clearValidate();
552
- },
553
- // 打开监听器字段编辑弹窗
554
- openListenerFieldForm(i, e) {
555
- this.listenerFieldForm = i ? E(i) : { fieldType: "string" }, this.editingListenerFieldIndex = i ? e : -1, this.listenerFieldFormModelVisible = !0, this.$nextTick(() => {
556
- this.$refs.listenerFieldFormRef && this.$refs.listenerFieldFormRef.clearValidate();
557
- });
558
- },
559
- // 保存监听器注入字段
560
- async saveListenerFiled() {
561
- await this.$refs.listenerFieldFormRef.validate() && (this.editingListenerFieldIndex === -1 ? (this.fieldsListOfListener.push(this.listenerFieldForm), this.listenerForm.fields.push(this.listenerFieldForm)) : (this.fieldsListOfListener.splice(this.editingListenerFieldIndex, 1, this.listenerFieldForm), this.listenerForm.fields.splice(this.editingListenerFieldIndex, 1, this.listenerFieldForm)), this.listenerFieldFormModelVisible = !1, await this.$nextTick(), this.listenerFieldForm = {});
562
- },
563
- // 移除监听器字段
564
- async removeListenerField(i, e) {
565
- try {
566
- await this.$confirm("确认移除该字段吗?", "提示"), this.fieldsListOfListener.splice(e, 1), this.listenerForm.fields.splice(e, 1);
567
- } catch {
568
- }
569
- },
570
- // 移除监听器
571
- async removeListener(i, e) {
572
- try {
573
- await this.$confirm("确认移除该监听器吗?", "提示"), this.bpmnElementListeners.splice(e, 1), this.elementListenersList.splice(e, 1), te(this.bpmnInstances, this.element, this.otherExtensionList.concat(this.bpmnElementListeners));
574
- } catch {
212
+ }), O(m, "bpmn:Group") && d(s, {
213
+ "append.text-annotation": u("bpmn:TextAnnotation", "bpmn-icon-text-annotation")
214
+ });
215
+ let h = y.allowed("elements.delete", { elements: [n] });
216
+ return pe(h) && (h = h[0] === n), h && d(s, {
217
+ delete: {
218
+ group: "edit",
219
+ className: "bpmn-icon-trash",
220
+ title: l("Remove"),
221
+ action: {
222
+ click: w
575
223
  }
576
- },
577
- // 保存监听器配置
578
- async saveListenerConfig() {
579
- var t, n, s;
580
- if (!await this.$refs.listenerFormRef.validate()) return;
581
- const e = Oe(this.bpmnInstances, this.listenerForm, !1, this.prefix);
582
- this.editingListenerIndex === -1 ? (this.bpmnElementListeners.push(e), this.elementListenersList.push(this.listenerForm)) : (this.bpmnElementListeners.splice(this.editingListenerIndex, 1, e), this.elementListenersList.splice(this.editingListenerIndex, 1, this.listenerForm)), this.otherExtensionList = ((s = (n = (t = this.element.businessObject) == null ? void 0 : t.extensionElements) == null ? void 0 : n.values) == null ? void 0 : s.filter((a) => a.$type !== `${this.prefix}:ExecutionListener`)) ?? [], te(this.bpmnInstances, this.element, this.otherExtensionList.concat(this.bpmnElementListeners)), this.listenerFormModelVisible = !1, this.listenerForm = {};
583
224
  }
584
- }
225
+ }), s;
585
226
  };
586
- var Ot = function() {
587
- var n, s, a;
588
- var e = this, t = e._self._c;
589
- return t("div", { staticClass: "panel-tab__content element-listeners" }, [t($, { attrs: { data: e.elementListenersList, size: "mini", border: "" } }, [t(c, { attrs: { label: "序号", width: "50px", type: "index" } }), t(c, { attrs: { label: "事件类型", "min-width": "100px", prop: "event" } }), t(c, { attrs: { label: "监听器类型", "min-width": "100px", "show-overflow-tooltip": "", formatter: (r) => e.listenerTypeObject[r.listenerType] } }), t(c, { attrs: { label: "操作", width: "90px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: r, $index: m }) {
590
- return [t(l, { attrs: { size: "mini", type: "text" }, on: { click: function(b) {
591
- return e.openListenerForm(r, m);
592
- } } }, [e._v("编辑")]), t(S, { attrs: { direction: "vertical" } }), t(l, { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(b) {
593
- return e.removeListener(r, m);
594
- } } }, [e._v("移除")])];
595
- } }]) })], 1), t("div", { staticClass: "element-drawer__button" }, [t(l, { attrs: { size: "mini", type: "primary", icon: "el-icon-plus" }, on: { click: function(r) {
596
- return e.openListenerForm(null);
597
- } } }, [e._v("添加监听器")])], 1), t(fe, { staticClass: "flow-drawer element-listeners-drawer", attrs: { visible: e.listenerFormModelVisible, title: "执行监听器", size: `${e.width}px`, "wrapper-closable": !1, "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(r) {
598
- e.listenerFormModelVisible = r;
599
- } } }, [t(S), t("p", { staticClass: "listener-filed__title" }, [t("span", [t("i", { staticClass: "el-icon-menu" }), e._v("监听器类型:")]), t(l, { staticStyle: { "margin-left": "auto" }, attrs: { size: "mini", type: "primary" }, on: { click: function(r) {
600
- return e.assignListener("start");
601
- } } }, [e._v("开始")]), t(l, { attrs: { size: "mini", type: "primary" }, on: { click: function(r) {
602
- return e.assignListener("end");
603
- } } }, [e._v("结束")]), t(l, { attrs: { size: "mini", type: "primary" }, on: { click: function(r) {
604
- return e.assignListener("draft");
605
- } } }, [e._v("草稿")])], 1), t(T, { ref: "listenerFormRef", attrs: { size: "mini", model: e.listenerForm, "label-width": "96px" }, nativeOn: { submit: function(r) {
606
- r.preventDefault();
607
- } } }, [t(o, { attrs: { label: "事件类型", prop: "event", rules: { required: !0, trigger: ["blur", "change"] } } }, [t(h, { model: { value: e.listenerForm.event, callback: function(r) {
608
- e.$set(e.listenerForm, "event", r);
609
- }, expression: "listenerForm.event" } }, [t(u, { attrs: { label: "开始", value: "start" } }), t(u, { attrs: { label: "结束", value: "end" } })], 1)], 1), t(o, { attrs: { label: "监听器类型", prop: "listenerType", rules: { required: !0, trigger: ["blur", "change"] } } }, [t(h, { model: { value: e.listenerForm.listenerType, callback: function(r) {
610
- e.$set(e.listenerForm, "listenerType", r);
611
- }, expression: "listenerForm.listenerType" } }, e._l(Object.keys(e.listenerTypeObject), function(r) {
612
- return t(u, { key: r, attrs: { label: e.listenerTypeObject[r], value: r } });
613
- }), 1)], 1), e.listenerForm.listenerType === "classListener" ? t(o, { key: "listener-class", attrs: { label: "Java类", prop: "class", rules: { required: !0, trigger: ["blur", "change"] } } }, [t(p, { attrs: { clearable: "" }, model: { value: e.listenerForm.class, callback: function(r) {
614
- e.$set(e.listenerForm, "class", r);
615
- }, expression: "listenerForm.class" } })], 1) : e._e(), e.listenerForm.listenerType === "expressionListener" ? t(o, { key: "listener-expression", attrs: { label: "表达式", prop: "expression", rules: { required: !0, trigger: ["blur", "change"] } } }, [t(p, { attrs: { clearable: "" }, model: { value: e.listenerForm.expression, callback: function(r) {
616
- e.$set(e.listenerForm, "expression", r);
617
- }, expression: "listenerForm.expression" } })], 1) : e._e(), e.listenerForm.listenerType === "delegateExpressionListener" ? t(o, { key: "listener-delegate", attrs: { label: "代理表达式", prop: "delegateExpression", rules: { required: !0, trigger: ["blur", "change"] } } }, [t(h, { attrs: { "default-first-option": "", "allow-create": "", filterable: "", clearable: "" }, model: { value: e.listenerForm.delegateExpression, callback: function(r) {
618
- e.$set(e.listenerForm, "delegateExpression", r);
619
- }, expression: "listenerForm.delegateExpression" } }, e._l(((n = e.context) == null ? void 0 : n.delegateExpressions) || [], function(r) {
620
- return t(u, { key: r, attrs: { value: r, label: r } });
621
- }), 1)], 1) : e._e(), e.listenerForm.listenerType === "scriptListener" ? [t(o, { key: "listener-script-format", attrs: { label: "脚本格式", prop: "scriptFormat", rules: { required: !0, trigger: ["blur", "change"], message: "请填写脚本格式" } } }, [t(p, { attrs: { clearable: "" }, model: { value: e.listenerForm.scriptFormat, callback: function(r) {
622
- e.$set(e.listenerForm, "scriptFormat", r);
623
- }, expression: "listenerForm.scriptFormat" } })], 1), t(o, { key: "listener-script-type", attrs: { label: "脚本类型", prop: "scriptType", rules: { required: !0, trigger: ["blur", "change"], message: "请选择脚本类型" } } }, [t(h, { model: { value: e.listenerForm.scriptType, callback: function(r) {
624
- e.$set(e.listenerForm, "scriptType", r);
625
- }, expression: "listenerForm.scriptType" } }, [t(u, { attrs: { label: "内联脚本", value: "inlineScript" } }), t(u, { attrs: { label: "外部脚本", value: "externalScript" } })], 1)], 1), e.listenerForm.scriptType === "inlineScript" ? t(o, { key: "listener-script", attrs: { label: "脚本内容", prop: "value", rules: { required: !0, trigger: ["blur", "change"], message: "请填写脚本内容" } } }, [t(p, { attrs: { clearable: "" }, model: { value: e.listenerForm.value, callback: function(r) {
626
- e.$set(e.listenerForm, "value", r);
627
- }, expression: "listenerForm.value" } })], 1) : e._e(), e.listenerForm.scriptType === "externalScript" ? t(o, { key: "listener-resource", attrs: { label: "资源地址", prop: "resource", rules: { required: !0, trigger: ["blur", "change"], message: "请填写资源地址" } } }, [t(p, { attrs: { clearable: "" }, model: { value: e.listenerForm.resource, callback: function(r) {
628
- e.$set(e.listenerForm, "resource", r);
629
- }, expression: "listenerForm.resource" } })], 1) : e._e()] : e._e()], 2), t(S), t("p", { staticClass: "listener-filed__title" }, [t("span", [t("i", { staticClass: "el-icon-menu" }), e._v("注入字段:")]), t(l, { staticStyle: { "margin-left": "auto" }, attrs: { size: "mini", type: "primary" }, on: { click: function(r) {
630
- return e.openListenerFieldForm(null);
631
- } } }, [e._v(" 添加字段 ")])], 1), t($, { staticStyle: { flex: "none" }, attrs: { data: e.fieldsListOfListener, size: "mini", "max-height": "240", border: "", fit: "" } }, [t(c, { attrs: { label: "序号", width: "50px", type: "index" } }), t(c, { attrs: { label: "字段名称", "min-width": "100px", prop: "name" } }), t(c, { attrs: { label: "字段类型", "min-width": "80px", "show-overflow-tooltip": "", formatter: (r) => e.fieldTypeObject[r.fieldType] } }), t(c, { attrs: { label: "字段值/表达式", "min-width": "100px", "show-overflow-tooltip": "", formatter: (r) => r.string || r.expression } }), t(c, { attrs: { label: "操作", width: "100px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: r, $index: m }) {
632
- return [t(l, { attrs: { size: "mini", type: "text" }, on: { click: function(b) {
633
- return e.openListenerFieldForm(r, m);
634
- } } }, [e._v("编辑")]), t(S, { attrs: { direction: "vertical" } }), t(l, { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(b) {
635
- return e.removeListenerField(r, m);
636
- } } }, [e._v(" 移除 ")])];
637
- } }]) })], 1), t("div", { staticClass: "element-drawer__button" }, [t(l, { attrs: { size: "mini" }, on: { click: function(r) {
638
- e.listenerFormModelVisible = !1;
639
- } } }, [e._v("取 消")]), t(l, { attrs: { size: "mini", type: "primary" }, on: { click: e.saveListenerConfig } }, [e._v("保 存")])], 1)], 1), t(N, { staticClass: "flow-dialog", attrs: { title: "字段配置", visible: e.listenerFieldFormModelVisible, width: "600px", "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(r) {
640
- e.listenerFieldFormModelVisible = r;
641
- } }, scopedSlots: e._u([{ key: "footer", fn: function() {
642
- return [t(l, { attrs: { size: "mini" }, on: { click: function(r) {
643
- e.listenerFieldFormModelVisible = !1;
644
- } } }, [e._v("取 消")]), t(l, { attrs: { size: "mini", type: "primary" }, on: { click: e.saveListenerFiled } }, [e._v("确 定")])];
645
- }, proxy: !0 }]) }, [t(T, { ref: "listenerFieldFormRef", staticStyle: { height: "136px" }, attrs: { model: e.listenerFieldForm, size: "mini", "label-width": "96px" }, nativeOn: { submit: function(r) {
646
- r.preventDefault();
647
- } } }, [t(o, { attrs: { label: "字段名称:", prop: "name", rules: { required: !0, trigger: ["blur", "change"] } } }, [t(h, { attrs: { "default-first-option": "", "allow-create": "", filterable: "", clearable: "" }, on: { input: e.setDefaultFieldValue }, model: { value: e.listenerFieldForm.name, callback: function(r) {
648
- e.$set(e.listenerFieldForm, "name", r);
649
- }, expression: "listenerFieldForm.name" } }, e._l(((s = e.context) == null ? void 0 : s.fields) || [], function(r) {
650
- return t(u, { key: r, attrs: { value: r, label: r } });
651
- }), 1)], 1), t(o, { attrs: { label: "字段类型:", prop: "fieldType", rules: { required: !0, trigger: ["blur", "change"] } } }, [t(h, { on: { input: e.changeFiledType }, model: { value: e.listenerFieldForm.fieldType, callback: function(r) {
652
- e.$set(e.listenerFieldForm, "fieldType", r);
653
- }, expression: "listenerFieldForm.fieldType" } }, e._l(Object.keys(e.fieldTypeObject), function(r) {
654
- return t(u, { key: r, attrs: { label: e.fieldTypeObject[r], value: r } });
655
- }), 1)], 1), e.listenerFieldForm.fieldType === "string" ? t(o, { key: "field-string", staticClass: "element-listeners-field-name", attrs: { label: "字段值:", prop: "string", rules: { required: !0, trigger: ["blur", "change"] } } }, [e.listenerFieldForm.name === "url" ? t(h, { attrs: { "default-first-option": "", "allow-create": "", filterable: "", clearable: "" }, model: { value: e.listenerFieldForm.string, callback: function(r) {
656
- e.$set(e.listenerFieldForm, "string", r);
657
- }, expression: "listenerFieldForm.string" } }, e._l(e.apis, function(r) {
658
- return t(u, { key: r, attrs: { value: r, label: r } });
659
- }), 1) : e.listenerFieldForm.name === "serviceId" ? t(h, { attrs: { "default-first-option": "", "allow-create": "", filterable: "", clearable: "" }, model: { value: e.listenerFieldForm.string, callback: function(r) {
660
- e.$set(e.listenerFieldForm, "string", r);
661
- }, expression: "listenerFieldForm.string" } }, e._l(((a = e.context) == null ? void 0 : a.services) || [], function(r) {
662
- return t(u, { key: r, attrs: { value: r, label: r } });
663
- }), 1) : t(p, { attrs: { clearable: "" }, model: { value: e.listenerFieldForm.string, callback: function(r) {
664
- e.$set(e.listenerFieldForm, "string", r);
665
- }, expression: "listenerFieldForm.string" } })], 1) : e._e(), e.listenerFieldForm.fieldType === "expression" ? t(o, { key: "field-expression", attrs: { label: "表达式:", prop: "expression", rules: { required: !0, trigger: ["blur", "change"] } } }, [t(p, { attrs: { clearable: "" }, model: { value: e.listenerFieldForm.expression, callback: function(r) {
666
- e.$set(e.listenerFieldForm, "expression", r);
667
- }, expression: "listenerFieldForm.expression" } })], 1) : e._e()], 1)], 1)], 1);
668
- }, Mt = [], Dt = /* @__PURE__ */ w(
669
- $t,
670
- Ot,
671
- Mt,
672
- !1,
673
- null,
674
- null
675
- );
676
- const me = Dt.exports, Bt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
677
- __proto__: null,
678
- default: me
679
- }, Symbol.toStringTag, { value: "Module" })), zt = {
680
- name: "ElementMultiInstance",
681
- inject: {
682
- prefix: "prefix"
683
- },
684
- props: {
685
- id: String,
686
- element: Object,
687
- bpmnInstances: Object
688
- },
689
- data() {
690
- return {
691
- loopCharacteristics: "",
692
- // 默认配置,用来覆盖原始不存在的选项,避免报错
693
- defaultLoopInstanceForm: {
694
- completionCondition: "",
695
- loopCardinality: "",
696
- extensionElements: [],
697
- asyncAfter: !1,
698
- asyncBefore: !1,
699
- exclusive: !1
700
- },
701
- loopInstanceForm: {}
702
- };
703
- },
704
- watch: {
705
- id: {
706
- immediate: !0,
707
- handler() {
708
- const { businessObject: i } = this.element;
709
- this.getElementLoop(i);
710
- }
227
+ function Y(n, e, t) {
228
+ const i = n.$instanceOf(e);
229
+ let r = !1;
230
+ const a = n.eventDefinitions || [];
231
+ return me(a, function(p) {
232
+ p.$type === t && (r = !0);
233
+ }), i && r;
234
+ }
235
+ const xe = {
236
+ __init__: ["contextPadProvider"],
237
+ contextPadProvider: ["type", G]
238
+ };
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;
241
+ }
242
+ const j = function() {
243
+ };
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);
711
251
  }
712
- },
713
- beforeDestroy() {
714
- this.multiLoopInstance = null;
715
- },
716
- methods: {
717
- getElementLoop(i) {
718
- var e, t, n, s;
719
- if (!i.loopCharacteristics) {
720
- this.loopCharacteristics = "Null", this.loopInstanceForm = {};
721
- return;
722
- }
723
- if (i.loopCharacteristics.$type === "bpmn:StandardLoopCharacteristics") {
724
- this.loopCharacteristics = "StandardLoop", this.loopInstanceForm = {};
725
- return;
726
- }
727
- i.loopCharacteristics.isSequential ? this.loopCharacteristics = "SequentialMultiInstance" : this.loopCharacteristics = "ParallelMultiInstance", this.loopInstanceForm = {
728
- ...this.defaultLoopInstanceForm,
729
- ...i.loopCharacteristics,
730
- completionCondition: ((t = (e = i.loopCharacteristics) == null ? void 0 : e.completionCondition) == null ? void 0 : t.body) ?? "",
731
- loopCardinality: ((s = (n = i.loopCharacteristics) == null ? void 0 : n.loopCardinality) == null ? void 0 : s.body) ?? ""
732
- }, this.multiLoopInstance = this.element.businessObject.loopCharacteristics, i.loopCharacteristics.extensionElements && i.loopCharacteristics.extensionElements.values && i.loopCharacteristics.extensionElements.values.length && this.$set(this.loopInstanceForm, "timeCycle", i.loopCharacteristics.extensionElements.values[0].body);
733
- },
734
- changeLoopCharacteristicsType(i) {
735
- if (i === "Null") {
736
- this.bpmnInstances.modeling.updateProperties(this.element, { loopCharacteristics: null });
737
- return;
252
+ const k = s.replace(/^bpmn:/, "");
253
+ return {
254
+ group: m,
255
+ className: g,
256
+ title: w || o("Create {type}", { type: k }),
257
+ action: {
258
+ dragstart: u,
259
+ click: u
738
260
  }
739
- if (i === "StandardLoop") {
740
- const e = this.bpmnInstances.moddle.create("bpmn:StandardLoopCharacteristics");
741
- this.bpmnInstances.modeling.updateProperties(this.element, {
742
- loopCharacteristics: e
743
- }), this.multiLoopInstance = null;
744
- return;
261
+ };
262
+ }
263
+ function S(s) {
264
+ const m = t.createShape({
265
+ type: "bpmn:SubProcess",
266
+ x: 0,
267
+ y: 0,
268
+ isExpanded: !0
269
+ }), g = t.createShape({
270
+ type: "bpmn:StartEvent",
271
+ x: 40,
272
+ y: 82,
273
+ parent: m
274
+ });
275
+ e.start(s, [m, g], {
276
+ hints: {
277
+ autoSelect: [g]
745
278
  }
746
- i === "SequentialMultiInstance" ? this.multiLoopInstance = this.bpmnInstances.moddle.create("bpmn:MultiInstanceLoopCharacteristics", {
747
- isSequential: !0
748
- }) : this.multiLoopInstance = this.bpmnInstances.moddle.create("bpmn:MultiInstanceLoopCharacteristics"), this.bpmnInstances.modeling.updateProperties(this.element, {
749
- loopCharacteristics: this.multiLoopInstance
750
- });
751
- },
752
- // 循环基数
753
- updateLoopCardinality(i) {
754
- let e = null;
755
- i && i.length && (e = this.bpmnInstances.moddle.create("bpmn:FormalExpression", { body: i })), this.bpmnInstances.modeling.updateModdleProperties(this.element, this.multiLoopInstance, {
756
- loopCardinality: e
757
- });
758
- },
759
- // 完成条件
760
- updateLoopCondition(i) {
761
- let e = null;
762
- i && i.length && (e = this.bpmnInstances.moddle.create("bpmn:FormalExpression", { body: i })), this.bpmnInstances.modeling.updateModdleProperties(this.element, this.multiLoopInstance, {
763
- completionCondition: e
764
- });
765
- },
766
- // 重试周期
767
- updateLoopTimeCycle(i) {
768
- const e = this.bpmnInstances.moddle.create("bpmn:ExtensionElements", {
769
- values: [
770
- this.bpmnInstances.moddle.create(`${this.prefix}:FailedJobRetryTimeCycle`, {
771
- body: i
772
- })
773
- ]
774
- });
775
- this.bpmnInstances.modeling.updateModdleProperties(this.element, this.multiLoopInstance, {
776
- extensionElements: e
777
- });
778
- },
779
- // 直接更新的基础信息
780
- updateLoopBase() {
781
- this.bpmnInstances.modeling.updateModdleProperties(this.element, this.multiLoopInstance, {
782
- collection: this.loopInstanceForm.collection || null,
783
- elementVariable: this.loopInstanceForm.elementVariable || null
784
- });
785
- },
786
- // 各异步状态
787
- updateLoopAsync(i) {
788
- const { asyncBefore: e, asyncAfter: t } = this.loopInstanceForm;
789
- let n = /* @__PURE__ */ Object.create(null);
790
- !e && !t ? (this.$set(this.loopInstanceForm, "exclusive", !1), n = { asyncBefore: !1, asyncAfter: !1, exclusive: !1, extensionElements: null }) : n[i] = this.loopInstanceForm[i], this.bpmnInstances.modeling.updateModdleProperties(this.element, this.multiLoopInstance, n);
791
- }
279
+ });
792
280
  }
793
- };
794
- var Vt = function() {
795
- var e = this, t = e._self._c;
796
- return t("div", { staticClass: "panel-tab__content element-multi-instance" }, [t(T, { attrs: { size: "mini", "label-width": "100px" }, nativeOn: { submit: function(n) {
797
- n.preventDefault();
798
- } } }, [t(o, { attrs: { label: "回路特性" }, scopedSlots: e._u([{ key: "label", fn: function() {
799
- return [e._v(" 回路特性 "), t(y, { attrs: { effect: "light" }, scopedSlots: e._u([{ key: "content", fn: function() {
800
- return [t("ul", [t("li", { staticClass: "flow-tips-list-item" }, [t("span", { staticClass: "flow-tips-keyword" }, [e._v("并行")]), e._v(" 一次性创建所有任务实例")]), t("li", { staticClass: "flow-tips-list-item" }, [t("span", { staticClass: "flow-tips-keyword" }, [e._v("串行")]), e._v(" 完成一个任务实例再创建一个任务实例,直到环节完成")]), t("li", { staticClass: "flow-tips-list-item" }, [t("span", { staticClass: "flow-tips-keyword" }, [e._v("循环事件")]), e._v(" 未知")])])];
801
- }, proxy: !0 }]) }, [t("i", { staticClass: "el-icon-info" })])];
802
- }, proxy: !0 }]) }, [t(h, { on: { change: e.changeLoopCharacteristicsType }, model: { value: e.loopCharacteristics, callback: function(n) {
803
- e.loopCharacteristics = n;
804
- }, expression: "loopCharacteristics" } }, [t(u, { attrs: { label: "并行", value: "ParallelMultiInstance" } }), t(u, { attrs: { label: "串行", value: "SequentialMultiInstance" } }), t(u, { attrs: { label: "循环事件", value: "StandardLoop" } }), t(u, { attrs: { label: "无", value: "Null" } })], 1)], 1), e.loopCharacteristics === "ParallelMultiInstance" || e.loopCharacteristics === "SequentialMultiInstance" ? [t(o, { key: "loopCardinality", attrs: { label: "循环基数" }, scopedSlots: e._u([{ key: "label", fn: function() {
805
- return [e._v(" 循环基数 "), t(y, { attrs: { effect: "light" }, scopedSlots: e._u([{ key: "content", fn: function() {
806
- return [t("div", [e._v("与任务实例数相对,可不填")])];
807
- }, proxy: !0 }], null, !1, 3306633709) }, [t("i", { staticClass: "el-icon-info" })])];
808
- }, proxy: !0 }], null, !1, 3757615878) }, [t(p, { attrs: { clearable: "" }, on: { change: e.updateLoopCardinality }, model: { value: e.loopInstanceForm.loopCardinality, callback: function(n) {
809
- e.$set(e.loopInstanceForm, "loopCardinality", n);
810
- }, expression: "loopInstanceForm.loopCardinality" } })], 1), t(o, { key: "collection", attrs: { label: "集合名称", required: "" }, scopedSlots: e._u([{ key: "label", fn: function() {
811
- return [e._v(" 集合变量 "), t(y, { attrs: { effect: "light" }, scopedSlots: e._u([{ key: "content", fn: function() {
812
- return [t("p", [e._v("流程变量名,设置为 "), t("span", { staticClass: "flow-tips-keyword" }, [e._v("${handlers}")]), e._v(" 就行")])];
813
- }, proxy: !0 }], null, !1, 2769289721) }, [t("i", { staticClass: "el-icon-info" })])];
814
- }, proxy: !0 }], null, !1, 3139340263) }, [t(p, { attrs: { clearable: "" }, on: { change: e.updateLoopBase }, model: { value: e.loopInstanceForm.collection, callback: function(n) {
815
- e.$set(e.loopInstanceForm, "collection", n);
816
- }, expression: "loopInstanceForm.collection" } })], 1), t(o, { key: "elementVariable", attrs: { label: "元素名称", required: "" }, scopedSlots: e._u([{ key: "label", fn: function() {
817
- return [e._v(" 元素变量 "), t(y, { attrs: { effect: "light" }, scopedSlots: e._u([{ key: "content", fn: function() {
818
- return [t("p", [e._v(" 流程变量名,设置为 "), t("span", { staticClass: "flow-tips-keyword" }, [e._v("handler")]), e._v(' 就行,注意与"'), t("span", { staticClass: "flow-tips-keyword" }, [e._v("处理人")]), e._v('"中的"'), t("span", { staticClass: "flow-tips-keyword" }, [e._v("分配人员")]), e._v('"值保持一致 ')])];
819
- }, proxy: !0 }], null, !1, 952223137) }, [t("i", { staticClass: "el-icon-info" })])];
820
- }, proxy: !0 }], null, !1, 1907746023) }, [t(p, { attrs: { clearable: "" }, on: { change: e.updateLoopBase }, model: { value: e.loopInstanceForm.elementVariable, callback: function(n) {
821
- e.$set(e.loopInstanceForm, "elementVariable", n);
822
- }, expression: "loopInstanceForm.elementVariable" } })], 1), t(o, { key: "completionCondition", attrs: { label: "完成条件" }, scopedSlots: e._u([{ key: "label", fn: function() {
823
- return [e._v(" 完成条件 "), t(y, { attrs: { effect: "light" }, scopedSlots: e._u([{ key: "content", fn: function() {
824
- return [t("p", { staticClass: "flow-tips-title" }, [e._v("特殊流程变量:")]), t("ul", [t("li", { staticClass: "flow-tips-list-item" }, [t("span", { staticClass: "flow-tips-keyword" }, [e._v("nrOfInstances")]), e._v(" 总实例数")]), t("li", { staticClass: "flow-tips-list-item" }, [t("span", { staticClass: "flow-tips-keyword" }, [e._v("nrOfCompletedInstances")]), e._v(" 已完成的实例数")]), t("li", { staticClass: "flow-tips-list-item" }, [t("span", { staticClass: "flow-tips-keyword" }, [e._v("nrOfActiveInstances")]), e._v(" 未完成实例数")])]), t("p", { staticClass: "flow-tips-title" }, [e._v("示例:")]), t("ul", [t("li", { staticClass: "flow-tips-list-item" }, [t("span", { staticClass: "flow-tips-keyword" }, [e._v("${nrOfCompletedInstances/nrOfInstances >= 1}")]), e._v(":所有实例完成结束该环节 ")]), t("li", { staticClass: "flow-tips-list-item" }, [t("span", { staticClass: "flow-tips-keyword" }, [e._v("${nrOfCompletedInstances/nrOfInstances >= 0.5}")]), e._v(":50%实例完成结束该环节 ")]), t("li", { staticClass: "flow-tips-list-item" }, [t("span", { staticClass: "flow-tips-keyword" }, [e._v("${nrOfCompletedInstances >= 1}")]), e._v(":有一个实例完成结束该环节")])]), t("p", { staticClass: "flow-tips-title" }, [e._v("不填要等所有实例完成才会结束该环节")])];
825
- }, proxy: !0 }], null, !1, 2952075778) }, [t("i", { staticClass: "el-icon-info" })])];
826
- }, proxy: !0 }], null, !1, 2319413861) }, [t(p, { attrs: { clearable: "" }, on: { change: e.updateLoopCondition }, model: { value: e.loopInstanceForm.completionCondition, callback: function(n) {
827
- e.$set(e.loopInstanceForm, "completionCondition", n);
828
- }, expression: "loopInstanceForm.completionCondition" } })], 1), t(o, { key: "async", attrs: { label: "异步状态" }, scopedSlots: e._u([{ key: "label", fn: function() {
829
- return [e._v(" 异步状态 "), t(y, { attrs: { effect: "light" }, scopedSlots: e._u([{ key: "content", fn: function() {
830
- return [t("div", [e._v("目前没用到")])];
831
- }, proxy: !0 }], null, !1, 1935913218) }, [t("i", { staticClass: "el-icon-info" })])];
832
- }, proxy: !0 }], null, !1, 474663414) }, [t(ne, { attrs: { label: "异步前" }, on: { change: function(n) {
833
- return e.updateLoopAsync("asyncBefore");
834
- } }, model: { value: e.loopInstanceForm.asyncBefore, callback: function(n) {
835
- e.$set(e.loopInstanceForm, "asyncBefore", n);
836
- }, expression: "loopInstanceForm.asyncBefore" } }), t(ne, { attrs: { label: "异步后" }, on: { change: function(n) {
837
- return e.updateLoopAsync("asyncAfter");
838
- } }, model: { value: e.loopInstanceForm.asyncAfter, callback: function(n) {
839
- e.$set(e.loopInstanceForm, "asyncAfter", n);
840
- }, expression: "loopInstanceForm.asyncAfter" } }), e.loopInstanceForm.asyncAfter || e.loopInstanceForm.asyncBefore ? t(ne, { attrs: { label: "排除" }, on: { change: function(n) {
841
- return e.updateLoopAsync("exclusive");
842
- } }, model: { value: e.loopInstanceForm.exclusive, callback: function(n) {
843
- e.$set(e.loopInstanceForm, "exclusive", n);
844
- }, expression: "loopInstanceForm.exclusive" } }) : e._e()], 1), e.loopInstanceForm.asyncAfter || e.loopInstanceForm.asyncBefore ? t(o, { key: "timeCycle", attrs: { label: "重试周期", prop: "timeCycle" } }, [t(p, { attrs: { clearable: "" }, on: { change: e.updateLoopTimeCycle }, model: { value: e.loopInstanceForm.timeCycle, callback: function(n) {
845
- e.$set(e.loopInstanceForm, "timeCycle", n);
846
- }, expression: "loopInstanceForm.timeCycle" } })], 1) : e._e()] : e._e()], 2)], 1);
847
- }, Rt = [], jt = /* @__PURE__ */ w(
848
- zt,
849
- Vt,
850
- Rt,
851
- !1,
852
- null,
853
- null
854
- );
855
- const ce = jt.exports, Nt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
856
- __proto__: null,
857
- default: ce
858
- }, Symbol.toStringTag, { value: "Module" })), Ut = {
859
- name: "ElementForm",
860
- inject: {
861
- prefix: "prefix",
862
- width: "width"
863
- },
864
- props: {
865
- id: String,
866
- element: Object,
867
- bpmnInstances: Object
868
- },
869
- data() {
870
- return {
871
- formKey: "",
872
- businessKey: "",
873
- optionModelTitle: "",
874
- fieldList: [],
875
- formFieldForm: {},
876
- fieldType: {
877
- long: "长整型",
878
- string: "字符串",
879
- boolean: "布尔类",
880
- date: "日期类",
881
- enum: "枚举类",
882
- custom: "自定义类型"
883
- },
884
- formFieldIndex: -1,
885
- // 编辑中的字段, -1 为新增
886
- formFieldOptionIndex: -1,
887
- // 编辑中的字段配置项, -1 为新增
888
- fieldModelVisible: !1,
889
- fieldOptionModelVisible: !1,
890
- fieldOptionForm: {},
891
- // 当前激活的字段配置项数据
892
- fieldOptionType: "",
893
- // 当前激活的字段配置项弹窗 类型
894
- fieldEnumList: [],
895
- // 枚举值列表
896
- fieldConstraintsList: [],
897
- // 约束条件列表
898
- fieldPropertiesList: []
899
- // 绑定属性列表
900
- };
901
- },
902
- watch: {
903
- id: {
904
- immediate: !0,
905
- async handler(i) {
906
- i && (await this.$nextTick(), this.resetFormList());
281
+ function l(s) {
282
+ e.start(s, t.createParticipantShape());
283
+ }
284
+ return d(n, {
285
+ "hand-tool": {
286
+ group: "tools",
287
+ className: "bpmn-icon-hand-tool",
288
+ title: o("Activate the hand tool"),
289
+ action: {
290
+ click: function(s) {
291
+ a.activateHand(s);
292
+ }
907
293
  }
908
- }
909
- },
910
- methods: {
911
- resetFormList() {
912
- var i;
913
- this.formKey = this.element.businessObject.formKey, this.elExtensionElements = this.element.businessObject.get("extensionElements") || this.bpmnInstances.moddle.create("bpmn:ExtensionElements", { values: [] }), this.formData = ((i = this.elExtensionElements.values.filter((e) => e.$type === `${this.prefix}:FormData`)) == null ? void 0 : i[0]) || this.bpmnInstances.moddle.create(`${this.prefix}:FormData`, { fields: [] }), this.businessKey = this.formData.businessKey, this.otherExtensions = this.elExtensionElements.values.filter((e) => e.$type !== `${this.prefix}:FormData`), this.fieldList = E(this.formData.fields || []), this.updateElementExtensions();
914
- },
915
- updateElementFormKey() {
916
- this.bpmnInstances.modeling.updateProperties(this.element, { formKey: this.formKey });
917
- },
918
- updateElementBusinessKey() {
919
- this.bpmnInstances.modeling.updateModdleProperties(this.element, this.formData, {
920
- businessKey: this.businessKey
921
- });
922
294
  },
923
- // 根据类型调整字段type
924
- changeFieldTypeType(i) {
925
- this.$set(this.formFieldForm, "type", i === "custom" ? "" : i);
926
- },
927
- // 打开字段详情侧边栏
928
- openFieldForm(i, e) {
929
- var t, n;
930
- if (this.formFieldIndex = e, e !== -1) {
931
- const s = this.formData.fields[e];
932
- this.formFieldForm = E(i), this.$set(this.formFieldForm, "typeType", this.fieldType[i.type] ? i.type : "custom"), i.type === "enum" && (this.fieldEnumList = E((s == null ? void 0 : s.values) || [])), this.fieldConstraintsList = E(((t = s == null ? void 0 : s.validation) == null ? void 0 : t.constraints) || []), this.fieldPropertiesList = E(((n = s == null ? void 0 : s.properties) == null ? void 0 : n.values) || []);
933
- } else
934
- this.formFieldForm = {}, this.fieldEnumList = [], this.fieldConstraintsList = [], this.fieldPropertiesList = [];
935
- this.fieldModelVisible = !0;
936
- },
937
- // 打开字段 某个 配置项 弹窗
938
- openFieldOptionForm(i, e, t) {
939
- return this.fieldOptionModelVisible = !0, this.fieldOptionType = t, this.formFieldOptionIndex = e, t === "property" ? (this.fieldOptionForm = i ? E(i) : {}, this.optionModelTitle = "属性配置") : t === "enum" ? (this.fieldOptionForm = i ? E(i) : {}, this.optionModelTitle = "枚举值配置") : (this.fieldOptionForm = i ? E(i) : {}, this.optionModelTitle = "约束条件配置");
940
- },
941
- // 保存字段 某个 配置项
942
- saveFieldOption() {
943
- this.formFieldOptionIndex === -1 ? (this.fieldOptionType === "property" && this.fieldPropertiesList.push(this.fieldOptionForm), this.fieldOptionType === "constraint" && this.fieldConstraintsList.push(this.fieldOptionForm), this.fieldOptionType === "enum" && this.fieldEnumList.push(this.fieldOptionForm)) : this.fieldOptionType === "property" ? this.fieldPropertiesList.splice(this.formFieldOptionIndex, 1, this.fieldOptionForm) : this.fieldOptionType === "constraint" ? this.fieldConstraintsList.splice(this.formFieldOptionIndex, 1, this.fieldOptionForm) : this.fieldOptionType === "enum" && this.fieldEnumList.splice(this.formFieldOptionIndex, 1, this.fieldOptionForm), this.fieldOptionModelVisible = !1, this.fieldOptionForm = {};
944
- },
945
- // 保存字段配置
946
- saveField() {
947
- const { id: i, type: e, label: t, defaultValue: n, datePattern: s } = this.formFieldForm, a = this.bpmnInstances.moddle.create(`${this.prefix}:FormField`, { id: i, type: e, label: t });
948
- if (n && (a.defaultValue = n), s && (a.datePattern = s), this.fieldPropertiesList && this.fieldPropertiesList.length) {
949
- const r = this.fieldPropertiesList.map((m) => this.bpmnInstances.moddle.create(`${this.prefix}:Property`, { id: m.id, value: m.value }));
950
- a.properties = this.bpmnInstances.moddle.create(`${this.prefix}:Properties`, {
951
- values: r
952
- });
953
- }
954
- if (this.fieldConstraintsList && this.fieldConstraintsList.length) {
955
- const r = this.fieldConstraintsList.map((m) => this.bpmnInstances.moddle.create(`${this.prefix}:Constraint`, { name: m.name, config: m.config }));
956
- a.validation = this.bpmnInstances.moddle.create(`${this.prefix}:Validation`, {
957
- constraints: r
958
- });
295
+ "lasso-tool": {
296
+ group: "tools",
297
+ className: "bpmn-icon-lasso-tool",
298
+ title: o("Activate the lasso tool"),
299
+ action: {
300
+ click: function(s) {
301
+ r.activateSelection(s);
302
+ }
959
303
  }
960
- this.fieldEnumList && this.fieldEnumList.length && (a.values = this.fieldEnumList.map((r) => this.bpmnInstances.moddle.create(`${this.prefix}:Value`, { name: r.name, id: r.id }))), this.formFieldIndex === -1 ? (this.fieldList.push(this.formFieldForm), this.formData.fields.push(a)) : (this.fieldList.splice(this.formFieldIndex, 1, this.formFieldForm), this.formData.fields.splice(this.formFieldIndex, 1, a)), this.updateElementExtensions(), this.fieldModelVisible = !1;
961
304
  },
962
- // 移除某个 字段的 配置项
963
- removeFieldOptionItem(i, e, t) {
964
- if (t === "property") {
965
- this.fieldPropertiesList.splice(e, 1);
966
- return;
967
- }
968
- if (t === "enum") {
969
- this.fieldEnumList.splice(e, 1);
970
- return;
305
+ "space-tool": {
306
+ group: "tools",
307
+ className: "bpmn-icon-space-tool",
308
+ title: o("Activate the create/remove space tool"),
309
+ action: {
310
+ click: function(s) {
311
+ i.activateSelection(s);
312
+ }
971
313
  }
972
- this.fieldConstraintsList.splice(e, 1);
973
- },
974
- // 移除 字段
975
- removeField(i, e) {
976
- this.fieldList.splice(e, 1), this.formData.fields.splice(e, 1), this.updateElementExtensions();
977
314
  },
978
- updateElementExtensions() {
979
- const i = this.bpmnInstances.moddle.create("bpmn:ExtensionElements", {
980
- values: this.otherExtensions.concat(this.formData)
981
- });
982
- this.bpmnInstances.modeling.updateProperties(this.element, {
983
- extensionElements: i
984
- });
985
- }
986
- }
987
- };
988
- var qt = function() {
989
- var e = this, t = e._self._c;
990
- return t("div", { staticClass: "panel-tab__content" }, [t(T, { attrs: { size: "mini", "label-width": "80px" }, nativeOn: { submit: function(n) {
991
- n.preventDefault();
992
- } } }, [t(o, { attrs: { label: "表单标识" } }, [t(p, { attrs: { clearable: "" }, on: { change: e.updateElementFormKey }, model: { value: e.formKey, callback: function(n) {
993
- e.formKey = n;
994
- }, expression: "formKey" } })], 1), t(o, { attrs: { label: "业务标识" } }, [t(h, { on: { change: e.updateElementBusinessKey }, model: { value: e.businessKey, callback: function(n) {
995
- e.businessKey = n;
996
- }, expression: "businessKey" } }, [e._l(e.fieldList, function(n) {
997
- return t(u, { key: n.id, attrs: { value: n.id, label: n.label } });
998
- }), t(u, { attrs: { label: "无", value: "" } })], 2)], 1)], 1), t("div", { staticClass: "element-property list-property" }, [t(S, [t("i", { staticClass: "el-icon-coin" }), e._v(" 表单字段")]), t($, { attrs: { data: e.fieldList, size: "mini", "max-height": "240", border: "", fit: "" } }, [t(c, { attrs: { label: "序号", type: "index", width: "50px" } }), t(c, { attrs: { label: "字段名称", prop: "label", "min-width": "80px", "show-overflow-tooltip": "" } }), t(c, { attrs: { label: "字段类型", prop: "type", "min-width": "80px", formatter: (n) => e.fieldType[n.type] || n.type, "show-overflow-tooltip": "" } }), t(c, { attrs: { label: "默认值", prop: "defaultValue", "min-width": "80px", "show-overflow-tooltip": "" } }), t(c, { attrs: { label: "操作", width: "90px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: n, $index: s }) {
999
- return [t(l, { attrs: { size: "mini", type: "text" }, on: { click: function(a) {
1000
- return e.openFieldForm(n, s);
1001
- } } }, [e._v("编辑")]), t(S, { attrs: { direction: "vertical" } }), t(l, { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(a) {
1002
- return e.removeField(n, s);
1003
- } } }, [e._v("移除")])];
1004
- } }]) })], 1)], 1), t("div", { staticClass: "element-drawer__button" }, [t(l, { attrs: { size: "mini", type: "primary", icon: "el-icon-plus" }, on: { click: function(n) {
1005
- return e.openFieldForm(null, -1);
1006
- } } }, [e._v("添加字段")])], 1), t(fe, { staticClass: "flow-drawer", attrs: { visible: e.fieldModelVisible, title: "字段配置", size: `${e.width}px`, "wrapper-closable": !1, "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(n) {
1007
- e.fieldModelVisible = n;
1008
- } } }, [t(T, { attrs: { model: e.formFieldForm, "label-width": "90px", size: "mini" }, nativeOn: { submit: function(n) {
1009
- n.preventDefault();
1010
- } } }, [t(o, { attrs: { label: "字段ID" } }, [t(p, { attrs: { clearable: "" }, model: { value: e.formFieldForm.id, callback: function(n) {
1011
- e.$set(e.formFieldForm, "id", n);
1012
- }, expression: "formFieldForm.id" } })], 1), t(o, { attrs: { label: "类型" } }, [t(h, { attrs: { placeholder: "请选择字段类型", clearable: "" }, on: { change: e.changeFieldTypeType }, model: { value: e.formFieldForm.typeType, callback: function(n) {
1013
- e.$set(e.formFieldForm, "typeType", n);
1014
- }, expression: "formFieldForm.typeType" } }, e._l(e.fieldType, function(n, s) {
1015
- return t(u, { key: s, attrs: { label: n, value: s } });
1016
- }), 1)], 1), e.formFieldForm.typeType === "custom" ? t(o, { attrs: { label: "类型名称" } }, [t(p, { attrs: { clearable: "" }, model: { value: e.formFieldForm.type, callback: function(n) {
1017
- e.$set(e.formFieldForm, "type", n);
1018
- }, expression: "formFieldForm.type" } })], 1) : e._e(), t(o, { attrs: { label: "名称" } }, [t(p, { attrs: { clearable: "" }, model: { value: e.formFieldForm.label, callback: function(n) {
1019
- e.$set(e.formFieldForm, "label", n);
1020
- }, expression: "formFieldForm.label" } })], 1), e.formFieldForm.typeType === "date" ? t(o, { attrs: { label: "时间格式" } }, [t(p, { attrs: { clearable: "" }, model: { value: e.formFieldForm.datePattern, callback: function(n) {
1021
- e.$set(e.formFieldForm, "datePattern", n);
1022
- }, expression: "formFieldForm.datePattern" } })], 1) : e._e(), t(o, { attrs: { label: "默认值" } }, [t(p, { attrs: { clearable: "" }, model: { value: e.formFieldForm.defaultValue, callback: function(n) {
1023
- e.$set(e.formFieldForm, "defaultValue", n);
1024
- }, expression: "formFieldForm.defaultValue" } })], 1)], 1), e.formFieldForm.type === "enum" ? [t(S, { key: "enum-divider" }), t("p", { key: "enum-title", staticClass: "listener-filed__title" }, [t("span", [t("i", { staticClass: "el-icon-menu" }), e._v("枚举值列表:")]), t(l, { attrs: { size: "mini", type: "primary" }, on: { click: function(n) {
1025
- return e.openFieldOptionForm(null, -1, "enum");
1026
- } } }, [e._v("添加枚举值")])], 1), t($, { key: "enum-table", attrs: { data: e.fieldEnumList, size: "mini", "max-height": "240", border: "", fit: "" } }, [t(c, { attrs: { label: "序号", width: "50px", type: "index" } }), t(c, { attrs: { label: "枚举值编号", prop: "id", "min-width": "100px", "show-overflow-tooltip": "" } }), t(c, { attrs: { label: "枚举值名称", prop: "name", "min-width": "100px", "show-overflow-tooltip": "" } }), t(c, { attrs: { label: "操作", width: "90px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: n, $index: s }) {
1027
- return [t(l, { attrs: { size: "mini", type: "text" }, on: { click: function(a) {
1028
- return e.openFieldOptionForm(n, s, "enum");
1029
- } } }, [e._v("编辑")]), t(S, { attrs: { direction: "vertical" } }), t(l, { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(a) {
1030
- return e.removeFieldOptionItem(n, s, "enum");
1031
- } } }, [e._v("移除")])];
1032
- } }], null, !1, 747635382) })], 1)] : e._e(), t(S, { key: "validation-divider" }), t("p", { key: "validation-title", staticClass: "listener-filed__title", staticStyle: { "padding-bottom": "6px" } }, [t("span", [t("i", { staticClass: "el-icon-menu" }), e._v("约束条件列表:")]), t(l, { staticStyle: { "margin-left": "auto" }, attrs: { size: "mini", type: "primary" }, on: { click: function(n) {
1033
- return e.openFieldOptionForm(null, -1, "constraint");
1034
- } } }, [e._v("添加约束")])], 1), t($, { key: "validation-table", attrs: { data: e.fieldConstraintsList, size: "mini", "max-height": "240", border: "", fit: "" } }, [t(c, { attrs: { label: "序号", width: "50px", type: "index" } }), t(c, { attrs: { label: "约束名称", prop: "name", "min-width": "100px", "show-overflow-tooltip": "" } }), t(c, { attrs: { label: "约束配置", prop: "config", "min-width": "100px", "show-overflow-tooltip": "" } }), t(c, { attrs: { label: "操作", width: "90px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: n, $index: s }) {
1035
- return [t(l, { attrs: { size: "mini", type: "text" }, on: { click: function(a) {
1036
- return e.openFieldOptionForm(n, s, "constraint");
1037
- } } }, [e._v("编辑")]), t(S, { attrs: { direction: "vertical" } }), t(l, { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(a) {
1038
- return e.removeFieldOptionItem(n, s, "constraint");
1039
- } } }, [e._v("移除")])];
1040
- } }]) })], 1), t(S, { key: "property-divider" }), t("p", { key: "property-title", staticClass: "listener-filed__title", staticStyle: { "padding-bottom": "6px" } }, [t("span", [t("i", { staticClass: "el-icon-menu" }), e._v("字段属性列表:")]), t(l, { staticStyle: { "margin-left": "auto" }, attrs: { size: "mini", type: "primary" }, on: { click: function(n) {
1041
- return e.openFieldOptionForm(null, -1, "property");
1042
- } } }, [e._v("添加属性")])], 1), t($, { key: "property-table", attrs: { data: e.fieldPropertiesList, size: "mini", "max-height": "240", border: "", fit: "" } }, [t(c, { attrs: { label: "序号", width: "50px", type: "index" } }), t(c, { attrs: { label: "属性编号", prop: "id", "min-width": "100px", "show-overflow-tooltip": "" } }), t(c, { attrs: { label: "属性值", prop: "value", "min-width": "100px", "show-overflow-tooltip": "" } }), t(c, { attrs: { label: "操作", width: "90px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: n, $index: s }) {
1043
- return [t(l, { attrs: { size: "mini", type: "text" }, on: { click: function(a) {
1044
- return e.openFieldOptionForm(n, s, "property");
1045
- } } }, [e._v("编辑")]), t(S, { attrs: { direction: "vertical" } }), t(l, { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(a) {
1046
- return e.removeFieldOptionItem(n, s, "property");
1047
- } } }, [e._v("移除")])];
1048
- } }]) })], 1), t("div", { staticClass: "element-drawer__button" }, [t(l, { attrs: { size: "mini" }, on: { click: function(n) {
1049
- e.fieldModelVisible = !1;
1050
- } } }, [e._v("取 消")]), t(l, { attrs: { size: "mini", type: "primary" }, on: { click: e.saveField } }, [e._v("保 存")])], 1)], 2), t(N, { staticClass: "flow-dialog", attrs: { visible: e.fieldOptionModelVisible, title: e.optionModelTitle, width: "600px", "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(n) {
1051
- e.fieldOptionModelVisible = n;
1052
- } }, scopedSlots: e._u([{ key: "footer", fn: function() {
1053
- return [t(l, { attrs: { size: "mini" }, on: { click: function(n) {
1054
- e.fieldOptionModelVisible = !1;
1055
- } } }, [e._v("取 消")]), t(l, { attrs: { size: "mini", type: "primary" }, on: { click: e.saveFieldOption } }, [e._v("确 定")])];
1056
- }, proxy: !0 }]) }, [t(T, { attrs: { model: e.fieldOptionForm, size: "mini", "label-width": "96px" }, nativeOn: { submit: function(n) {
1057
- n.preventDefault();
1058
- } } }, [e.fieldOptionType !== "constraint" ? t(o, { key: "option-id", attrs: { label: "编号/ID" } }, [t(p, { attrs: { clearable: "" }, model: { value: e.fieldOptionForm.id, callback: function(n) {
1059
- e.$set(e.fieldOptionForm, "id", n);
1060
- }, expression: "fieldOptionForm.id" } })], 1) : e._e(), e.fieldOptionType !== "property" ? t(o, { key: "option-name", attrs: { label: "名称" } }, [t(p, { attrs: { clearable: "" }, model: { value: e.fieldOptionForm.name, callback: function(n) {
1061
- e.$set(e.fieldOptionForm, "name", n);
1062
- }, expression: "fieldOptionForm.name" } })], 1) : e._e(), e.fieldOptionType === "constraint" ? t(o, { key: "option-config", attrs: { label: "配置" } }, [t(p, { attrs: { clearable: "" }, model: { value: e.fieldOptionForm.config, callback: function(n) {
1063
- e.$set(e.fieldOptionForm, "config", n);
1064
- }, expression: "fieldOptionForm.config" } })], 1) : e._e(), e.fieldOptionType === "property" ? t(o, { key: "option-value", attrs: { label: "值" } }, [t(p, { attrs: { clearable: "" }, model: { value: e.fieldOptionForm.value, callback: function(n) {
1065
- e.$set(e.fieldOptionForm, "value", n);
1066
- }, expression: "fieldOptionForm.value" } })], 1) : e._e()], 1)], 1)], 1);
1067
- }, Gt = [], Kt = /* @__PURE__ */ w(
1068
- Ut,
1069
- qt,
1070
- Gt,
1071
- !1,
1072
- null,
1073
- null
1074
- );
1075
- const ue = Kt.exports, Jt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1076
- __proto__: null,
1077
- default: ue
1078
- }, Symbol.toStringTag, { value: "Module" })), Zt = {
1079
- name: "FlowCondition",
1080
- props: {
1081
- id: String,
1082
- element: Object,
1083
- bpmnInstances: Object
1084
- },
1085
- data() {
1086
- return {
1087
- flowConditionForm: {}
1088
- };
1089
- },
1090
- watch: {
1091
- id: {
1092
- immediate: !0,
1093
- async handler() {
1094
- await this.$nextTick(), this.resetFlowCondition();
1095
- }
1096
- }
1097
- },
1098
- beforeDestroy() {
1099
- this.bpmnElementSource = null, this.bpmnElementSourceRef = null;
1100
- },
1101
- methods: {
1102
- resetFlowCondition() {
1103
- if (this.bpmnElementSource = this.element.source, this.bpmnElementSourceRef = this.element.businessObject.sourceRef, this.bpmnElementSourceRef && this.bpmnElementSourceRef.default && this.bpmnElementSourceRef.default.id === this.element.id)
1104
- this.flowConditionForm = { type: "default" };
1105
- else if (!this.element.businessObject.conditionExpression)
1106
- this.flowConditionForm = { type: "normal" };
1107
- else {
1108
- const i = this.element.businessObject.conditionExpression;
1109
- if (this.flowConditionForm = { ...i, type: "condition" }, this.flowConditionForm.resource) {
1110
- this.$set(this.flowConditionForm, "conditionType", "script"), this.$set(this.flowConditionForm, "scriptType", "externalScript");
1111
- return;
1112
- }
1113
- if (i.language) {
1114
- this.$set(this.flowConditionForm, "conditionType", "script"), this.$set(this.flowConditionForm, "scriptType", "inlineScript");
1115
- return;
1116
- }
1117
- this.$set(this.flowConditionForm, "conditionType", "expression");
315
+ "global-connect-tool": {
316
+ group: "tools",
317
+ className: "bpmn-icon-connection-multi",
318
+ title: o("Activate the global connect tool"),
319
+ action: {
320
+ click: function(s) {
321
+ p.toggle(s);
322
+ }
1118
323
  }
1119
324
  },
1120
- updateFlowType(i) {
1121
- if (i === "condition") {
1122
- this.flowConditionRef = this.bpmnInstances.moddle.create("bpmn:FormalExpression"), this.bpmnInstances.modeling.updateProperties(this.element, {
1123
- conditionExpression: this.flowConditionRef
1124
- });
1125
- return;
1126
- }
1127
- if (i === "default") {
1128
- this.bpmnInstances.modeling.updateProperties(this.element, {
1129
- conditionExpression: null
1130
- }), this.bpmnInstances.modeling.updateProperties(this.bpmnElementSource, {
1131
- default: this.element
1132
- });
1133
- return;
325
+ "tool-separator": { group: "tools", separator: !0 },
326
+ "create.start-event": y("bpmn:StartEvent", "event", "bpmn-icon-start-event-none", o("Create StartEvent")),
327
+ "create.intermediate-event": y(
328
+ "bpmn:IntermediateThrowEvent",
329
+ "event",
330
+ "bpmn-icon-intermediate-event-none",
331
+ o("Create Intermediate/Boundary Event")
332
+ ),
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")),
336
+ // 'create.sql-task': createAction('user:MySql', 'activity', 'bpmn-icon-mysql', 'MySQL 节点'),
337
+ // 'create.data-object': createAction('bpmn:DataObjectReference', 'data-object', 'bpmn-icon-data-object', translate('Create DataObjectReference')),
338
+ // 'create.data-store': createAction('bpmn:DataStoreReference', 'data-store', 'bpmn-icon-data-store', translate('Create DataStoreReference')),
339
+ "activity-separator": { group: "activity", separator: !0 },
340
+ "create.subprocess-expanded": {
341
+ group: "activity",
342
+ className: "bpmn-icon-subprocess-expanded",
343
+ title: o("Create expanded SubProcess"),
344
+ action: {
345
+ dragstart: S,
346
+ click: S
1134
347
  }
1135
- this.bpmnElementSourceRef.default && this.bpmnElementSourceRef.default.id === this.element.id && this.bpmnInstances.modeling.updateProperties(this.bpmnElementSource, {
1136
- default: null
1137
- }), this.bpmnInstances.modeling.updateProperties(this.element, {
1138
- conditionExpression: null
1139
- });
1140
348
  },
1141
- updateFlowCondition() {
1142
- const { conditionType: i, scriptType: e, body: t, resource: n, language: s } = this.flowConditionForm;
1143
- let a;
1144
- i === "expression" ? a = this.bpmnInstances.moddle.create("bpmn:FormalExpression", { body: t }) : e === "inlineScript" ? (a = this.bpmnInstances.moddle.create("bpmn:FormalExpression", { body: t, language: s }), this.$set(this.flowConditionForm, "resource", "")) : (this.$set(this.flowConditionForm, "body", ""), a = this.bpmnInstances.moddle.create("bpmn:FormalExpression", { resource: n, language: s })), this.bpmnInstances.modeling.updateProperties(this.element, { conditionExpression: a });
1145
- }
1146
- }
1147
- };
1148
- var Ht = function() {
1149
- var e = this, t = e._self._c;
1150
- return t("div", { staticClass: "panel-tab__content" }, [t(T, { attrs: { model: e.flowConditionForm, "label-width": "90px", size: "mini" }, nativeOn: { submit: function(n) {
1151
- n.preventDefault();
1152
- } } }, [t(o, { attrs: { label: "流转类型" } }, [t(h, { on: { change: e.updateFlowType }, model: { value: e.flowConditionForm.type, callback: function(n) {
1153
- e.$set(e.flowConditionForm, "type", n);
1154
- }, expression: "flowConditionForm.type" } }, [t(u, { attrs: { label: "普通流转路径", value: "normal" } }), t(u, { attrs: { label: "默认流转路径", value: "default" } }), t(u, { attrs: { label: "条件流转路径", value: "condition" } })], 1)], 1), e.flowConditionForm.type === "condition" ? t(o, { key: "condition", attrs: { label: "条件格式" } }, [t(h, { model: { value: e.flowConditionForm.conditionType, callback: function(n) {
1155
- e.$set(e.flowConditionForm, "conditionType", n);
1156
- }, expression: "flowConditionForm.conditionType" } }, [t(u, { attrs: { label: "表达式", value: "expression" } }), t(u, { attrs: { label: "脚本", value: "script" } })], 1)], 1) : e._e(), e.flowConditionForm.conditionType && e.flowConditionForm.conditionType === "expression" ? t(o, { key: "express", attrs: { label: "表达式" } }, [t(p, { attrs: { clearable: "" }, on: { change: e.updateFlowCondition }, model: { value: e.flowConditionForm.body, callback: function(n) {
1157
- e.$set(e.flowConditionForm, "body", n);
1158
- }, expression: "flowConditionForm.body" } })], 1) : e._e(), e.flowConditionForm.conditionType && e.flowConditionForm.conditionType === "script" ? [t(o, { key: "language", attrs: { label: "脚本语言" } }, [t(p, { attrs: { clearable: "" }, on: { change: e.updateFlowCondition }, model: { value: e.flowConditionForm.language, callback: function(n) {
1159
- e.$set(e.flowConditionForm, "language", n);
1160
- }, expression: "flowConditionForm.language" } })], 1), t(o, { key: "scriptType", attrs: { label: "脚本类型" } }, [t(h, { model: { value: e.flowConditionForm.scriptType, callback: function(n) {
1161
- e.$set(e.flowConditionForm, "scriptType", n);
1162
- }, expression: "flowConditionForm.scriptType" } }, [t(u, { attrs: { label: "内联脚本", value: "inlineScript" } }), t(u, { attrs: { label: "外部脚本", value: "externalScript" } })], 1)], 1), e.flowConditionForm.scriptType === "inlineScript" ? t(o, { key: "body", attrs: { label: "脚本" } }, [t(p, { attrs: { type: "textarea", clearable: "" }, on: { change: e.updateFlowCondition }, model: { value: e.flowConditionForm.body, callback: function(n) {
1163
- e.$set(e.flowConditionForm, "body", n);
1164
- }, expression: "flowConditionForm.body" } })], 1) : e._e(), e.flowConditionForm.scriptType === "externalScript" ? t(o, { key: "resource", attrs: { label: "资源地址" } }, [t(p, { attrs: { clearable: "" }, on: { change: e.updateFlowCondition }, model: { value: e.flowConditionForm.resource, callback: function(n) {
1165
- e.$set(e.flowConditionForm, "resource", n);
1166
- }, expression: "flowConditionForm.resource" } })], 1) : e._e()] : e._e()], 2)], 1);
1167
- }, Wt = [], Xt = /* @__PURE__ */ w(
1168
- Zt,
1169
- Ht,
1170
- Wt,
1171
- !1,
1172
- null,
1173
- null
1174
- );
1175
- const Ve = Xt.exports, Yt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1176
- __proto__: null,
1177
- default: Ve
1178
- }, Symbol.toStringTag, { value: "Module" })), Qt = {
1179
- name: "ElementBaseInfo",
1180
- inject: {
1181
- prefix: "prefix",
1182
- width: "width"
1183
- },
1184
- props: {
1185
- id: String,
1186
- idEditDisabled: {
1187
- type: Boolean,
1188
- default: !0
1189
- },
1190
- element: Object,
1191
- bpmnInstances: Object
1192
- },
1193
- data() {
1194
- return {
1195
- skipExpression: "",
1196
- requiredComment: null,
1197
- businessObject: {},
1198
- attrs: {
1199
- commentInForm: null,
1200
- commentOrder: null,
1201
- commentNodeIds: null,
1202
- commentLabel: null
1203
- },
1204
- nodes: []
1205
- };
1206
- },
1207
- watch: {
1208
- id: "init"
1209
- },
1210
- methods: {
1211
- init(i) {
1212
- const e = this.bpmnInstances.elementRegistry.filter((s) => s.type === "bpmn:UserTask");
1213
- this.nodes = e.map(({ businessObject: { id: s, name: a } }) => ({ label: a, value: s }));
1214
- const { businessObject: t } = this.element;
1215
- if (i ? (this.businessObject = E(t), this.businessObject.$type === "bpmn:SubProcess" && this.$set(this.businessObject, "isExpanded", this.element.di.isExpanded)) : this.businessObject = {}, this.businessObject.$type === "bpmn:UserTask")
1216
- for (const s in this.attrs) {
1217
- let a = se(t, `${this.prefix}:${s}`);
1218
- s === "commentNodeIds" && (a = a ? a.split(",") : []), this.attrs[s] = a;
1219
- }
1220
- this.skipExpression = se(t, `${this.prefix}:skipExpression`);
1221
- let n = se(t, `${this.prefix}:requiredComment`);
1222
- n || (n = "Y"), this.requiredComment = n;
1223
- },
1224
- updateBaseInfo(i) {
1225
- const { modeling: e } = this.bpmnInstances;
1226
- if (i === "id") {
1227
- e.updateProperties(this.element, {
1228
- id: this.businessObject[i],
1229
- di: { id: `${this.businessObject[i]}_di` }
1230
- });
1231
- return;
1232
- }
1233
- if (i === "isExpanded") {
1234
- e.toggleCollapse(this.element);
1235
- return;
349
+ "create.participant-expanded": {
350
+ group: "collaboration",
351
+ className: "bpmn-icon-participant",
352
+ title: o("Create Pool/Participant"),
353
+ action: {
354
+ dragstart: l,
355
+ click: l
1236
356
  }
1237
- e.updateProperties(this.element, { [i]: this.businessObject[i] });
1238
- },
1239
- updateProp(i, e) {
1240
- if (i === "commentInForm") {
1241
- if (!e)
1242
- for (const t in this.attrs)
1243
- t !== "commentInForm" && (this.attrs[t] = null, Ae(this.bpmnInstances, this.element, `${this.prefix}:${t}`, this.attrs[t]));
1244
- } else i === "commentNodeIds" ? e = e != null && e.length ? e.join(",") : null : e = e || null;
1245
- Ae(this.bpmnInstances, this.element, `${this.prefix}:${i}`, e);
1246
357
  }
1247
- }
358
+ // 'create.group': createAction('bpmn:Group', 'artifact', 'bpmn-icon-group', translate('Create Group'))
359
+ }), n;
1248
360
  };
1249
- var en = function() {
1250
- var e = this, t = e._self._c;
1251
- return t("div", { staticClass: "panel-tab__content" }, [t(T, { attrs: { size: "mini", "label-width": "90px" }, nativeOn: { submit: function(n) {
1252
- n.preventDefault();
1253
- } } }, [t(o, { attrs: { label: "ID" } }, [t(p, { attrs: { disabled: e.idEditDisabled, clearable: "" }, on: { input: function(n) {
1254
- return e.updateBaseInfo("id");
1255
- } }, model: { value: e.businessObject.id, callback: function(n) {
1256
- e.$set(e.businessObject, "id", n);
1257
- }, expression: "businessObject.id" } })], 1), t(o, { attrs: { label: "名称" } }, [t(p, { attrs: { clearable: "" }, on: { input: function(n) {
1258
- return e.updateBaseInfo("name");
1259
- } }, model: { value: e.businessObject.name, callback: function(n) {
1260
- e.$set(e.businessObject, "name", n);
1261
- }, expression: "businessObject.name" } })], 1), e.businessObject.$type === "bpmn:UserTask" ? [t(o, { attrs: { label: "跳过表达式" } }, [t(p, { attrs: { clearable: "" }, on: { input: (n) => e.updateProp("skipExpression", n) }, model: { value: e.skipExpression, callback: function(n) {
1262
- e.skipExpression = n;
1263
- }, expression: "skipExpression" } })], 1), t(o, { attrs: { label: "意见必填" } }, [t(H, { attrs: { "active-text": "是", "active-value": "Y", "inactive-text": "否", "inactive-value": "N" }, on: { input: (n) => e.updateProp("requiredComment", n) }, model: { value: e.requiredComment, callback: function(n) {
1264
- e.requiredComment = n;
1265
- }, expression: "requiredComment" } })], 1), t(o, { attrs: { label: "意见在表单" } }, [t(H, { attrs: { "active-text": "是", "inactive-text": "否" }, on: { input: (n) => e.updateProp("commentInForm", n) }, model: { value: e.attrs.commentInForm, callback: function(n) {
1266
- e.$set(e.attrs, "commentInForm", n);
1267
- }, expression: "attrs.commentInForm" } })], 1), e.attrs.commentInForm ? [t(o, { attrs: { label: "意见名称" } }, [t(p, { attrs: { clearable: "" }, on: { input: (n) => e.updateProp("commentLabel", n) }, model: { value: e.attrs.commentLabel, callback: function(n) {
1268
- e.$set(e.attrs, "commentLabel", n);
1269
- }, expression: "attrs.commentLabel" } })], 1), t(o, { attrs: { label: "意见聚合" } }, [t(h, { attrs: { multiple: "", clearable: "" }, on: { input: (n) => e.updateProp("commentNodeIds", n) }, model: { value: e.attrs.commentNodeIds, callback: function(n) {
1270
- e.$set(e.attrs, "commentNodeIds", n);
1271
- }, expression: "attrs.commentNodeIds" } }, e._l(e.nodes, function(n) {
1272
- return t(u, { key: n.value, attrs: { label: n.label, value: n.value } });
1273
- }), 1)], 1), t(o, { attrs: { label: "意见排序号" } }, [t(p, { attrs: { clearable: "" }, on: { input: (n) => e.updateProp("commentOrder", n) }, model: { value: e.attrs.commentOrder, callback: function(n) {
1274
- e.$set(e.attrs, "commentOrder", n);
1275
- }, expression: "attrs.commentOrder" } })], 1)] : e._e()] : e._e(), e.businessObject.$type === "bpmn:Process" ? [t(o, { attrs: { label: "版本标签" } }, [t(p, { attrs: { clearable: "" }, on: { input: function(n) {
1276
- return e.updateBaseInfo("versionTag");
1277
- } }, model: { value: e.businessObject.versionTag, callback: function(n) {
1278
- e.$set(e.businessObject, "versionTag", n);
1279
- }, expression: "businessObject.versionTag" } })], 1), t(o, { attrs: { label: "可执行" } }, [t(H, { attrs: { "active-text": "是", "inactive-text": "否" }, on: { input: function(n) {
1280
- return e.updateBaseInfo("isExecutable");
1281
- } }, model: { value: e.businessObject.isExecutable, callback: function(n) {
1282
- e.$set(e.businessObject, "isExecutable", n);
1283
- }, expression: "businessObject.isExecutable" } })], 1)] : e._e(), e.businessObject.$type === "bpmn:SubProcess" ? t(o, { attrs: { label: "状态" } }, [t(H, { attrs: { "active-text": "展开", "inactive-text": "折叠" }, on: { input: function(n) {
1284
- return e.updateBaseInfo("isExpanded");
1285
- } }, model: { value: e.businessObject.isExpanded, callback: function(n) {
1286
- e.$set(e.businessObject, "isExpanded", n);
1287
- }, expression: "businessObject.isExpanded" } })], 1) : e._e()], 2)], 1);
1288
- }, tn = [], nn = /* @__PURE__ */ w(
1289
- Qt,
1290
- en,
1291
- tn,
1292
- !1,
1293
- null,
1294
- null
1295
- );
1296
- const de = nn.exports, sn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1297
- __proto__: null,
1298
- default: de
1299
- }, Symbol.toStringTag, { value: "Module" })), Ce = ["base", "task", "form", "multiInstance"], rn = {
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 = {
365
+ __init__: ["customPalette"],
366
+ customPalette: ["type", P]
367
+ };
368
+ function ae(n, e) {
369
+ z.call(this, n, e, 3e3), n.on("autoPlace", 3e3, function(t) {
370
+ const i = t.shape, r = t.source;
371
+ return _e(r, i);
372
+ }), this.append = function(t, i, r) {
373
+ n.fire("autoPlace.start", {
374
+ source: t,
375
+ shape: i
376
+ });
377
+ const a = n.fire("autoPlace", {
378
+ source: t,
379
+ shape: i
380
+ });
381
+ console.log("hints", r, "position", a);
382
+ const p = e.appendShape(t, i, a, t.parent, r);
383
+ return n.fire("autoPlace.end", {
384
+ source: t,
385
+ shape: p
386
+ }), p;
387
+ };
388
+ }
389
+ function Pe(n) {
390
+ return {
391
+ top: n.y,
392
+ right: n.x + (n.width || 0),
393
+ bottom: n.y + (n.height || 0),
394
+ left: n.x
395
+ };
396
+ }
397
+ function we(n) {
398
+ return {
399
+ x: Math.round(n.x),
400
+ y: Math.round(n.y)
401
+ };
402
+ }
403
+ function ke(n) {
404
+ return we({
405
+ x: n.x + (n.width || 0) / 2,
406
+ y: n.y + (n.height || 0) / 2
407
+ });
408
+ }
409
+ function _e(n, e, t) {
410
+ t || (t = {});
411
+ const i = t.defaultDistance || 50, r = ke(n), a = Pe(n);
412
+ return {
413
+ x: r.x,
414
+ y: a.bottom + i + e.height / 2
415
+ };
416
+ }
417
+ const se = function() {
418
+ };
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) {
425
+ const r = i.shape, a = i.source;
426
+ return Be(a, r);
427
+ }), n.on("autoPlace.end", function(i) {
428
+ t.scrollToElement(i.shape);
429
+ }), this.append = function(i, r, a) {
430
+ n.fire("autoPlace.start", {
431
+ source: i,
432
+ shape: r
433
+ });
434
+ const p = n.fire("autoPlace", {
435
+ source: i,
436
+ shape: r
437
+ }), o = e.appendShape(i, r, p, i.parent, a);
438
+ return n.fire("autoPlace.end", {
439
+ source: i,
440
+ shape: o
441
+ }), o;
442
+ };
443
+ }
444
+ oe.$inject = ["eventBus", "modeling", "canvas"];
445
+ function Be(n, e) {
446
+ const t = Me, i = fe(n);
447
+ return {
448
+ x: ve(n).right + t + e.width / 2,
449
+ y: i.y
450
+ };
451
+ }
452
+ const Oe = {
453
+ __init__: ["autoPlaceSelectionBehavior"],
454
+ autoPlace: ["type", oe]
455
+ }, Q = ["base", "task", "form", "multiInstance"], Fe = {
1300
456
  name: "PropertiesPanel",
1301
457
  componentName: "MyPropertiesPanel",
1302
458
  components: {
1303
- UserTaskListeners: () => Promise.resolve().then(() => It),
1304
- ElementForm: () => Promise.resolve().then(() => Jt),
1305
- ElementProperties: () => Promise.resolve().then(() => xt),
1306
- ElementListeners: () => Promise.resolve().then(() => Bt),
1307
- SignalAndMassage: () => import("../chunks/SignalAndMessage.BpjOoKhK.mjs"),
1308
- FlowCondition: () => Promise.resolve().then(() => Yt),
1309
- ElementMultiInstance: () => Promise.resolve().then(() => Nt),
1310
- ElementTask: () => import("../chunks/ElementTaskConfig.AvBOzAni.mjs"),
1311
- ElementOtherConfig: () => Promise.resolve().then(() => yt),
1312
- ElementBaseInfo: () => Promise.resolve().then(() => sn)
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"),
467
+ ElementOtherConfig: () => import("../chunks/ElementOtherConfig.B1NfMTYh.mjs"),
468
+ ElementBaseInfo: () => import("../chunks/ElementBaseInfo.ZADwixb5.mjs")
1313
469
  },
1314
470
  provide() {
1315
471
  return {
@@ -1393,18 +549,18 @@ const de = nn.exports, sn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object
1393
549
  activeTabs: {
1394
550
  immediate: !0,
1395
551
  handler() {
1396
- this.activeTab = this.isTab ? "base" : Ce;
552
+ this.activeTab = this.isTab ? "base" : Q;
1397
553
  }
1398
554
  },
1399
555
  elementId: {
1400
556
  handler() {
1401
- this.activeTab = this.isTab ? "base" : Ce;
557
+ this.activeTab = this.isTab ? "base" : Q;
1402
558
  }
1403
559
  },
1404
560
  isTab: {
1405
561
  immediate: !0,
1406
- handler(i) {
1407
- i ? this.activeTab = "base" : this.activeTab = ["base"];
562
+ handler(n) {
563
+ n ? this.activeTab = "base" : this.activeTab = ["base"];
1408
564
  }
1409
565
  }
1410
566
  },
@@ -1417,7 +573,7 @@ const de = nn.exports, sn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object
1417
573
  this.timer = setTimeout(() => this.initModels(), 10);
1418
574
  return;
1419
575
  }
1420
- this.timer && clearTimeout(this.timer), this.bpmnInstances = ee({
576
+ this.timer && clearTimeout(this.timer), this.bpmnInstances = R({
1421
577
  modeler: this.bpmnModeler,
1422
578
  modeling: this.bpmnModeler.get("modeling"),
1423
579
  moddle: this.bpmnModeler.get("moddle"),
@@ -1432,100 +588,100 @@ const de = nn.exports, sn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object
1432
588
  getActiveElement() {
1433
589
  this.initFormOnChanged(null), this.bpmnModeler.on("import.done", () => {
1434
590
  this.bpmnModeler.get("canvas").zoom("fit-viewport", "center"), this.initFormOnChanged(null);
1435
- }), this.bpmnModeler.on("selection.changed", ({ newSelection: i }) => {
1436
- this.initFormOnChanged(i[0] || null);
1437
- }), this.bpmnModeler.on("element.changed", ({ element: i }) => {
1438
- i && i.id === this.elementId && this.initFormOnChanged(i);
591
+ }), this.bpmnModeler.on("selection.changed", ({ newSelection: n }) => {
592
+ this.initFormOnChanged(n[0] || null);
593
+ }), this.bpmnModeler.on("element.changed", ({ element: n }) => {
594
+ n && n.id === this.elementId && this.initFormOnChanged(n);
1439
595
  });
1440
596
  },
1441
597
  // 初始化数据
1442
- initFormOnChanged(i) {
1443
- let e = i;
1444
- e || (e = this.bpmnInstances.elementRegistry.find((t) => t.type === "bpmn:Process") ?? this.bpmnInstances.elementRegistry.find((t) => t.type === "bpmn:Collaboration")), e && (this.element = ee(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");
598
+ initFormOnChanged(n) {
599
+ let e = n;
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");
1445
601
  }
1446
602
  }
1447
603
  };
1448
- var an = function() {
1449
- var n, s;
604
+ var Le = function() {
605
+ var i, r;
1450
606
  var e = this, t = e._self._c;
1451
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) {
1452
608
  e.isPanelVisible = !0;
1453
609
  } } }, [t("div", { staticStyle: { height: "40px", "line-height": "40px" } }, [t("i", { class: ["open-properties-handel", e.isPanelVisible ? "el-icon-caret-right" : "el-icon-caret-left"], on: { click: function(a) {
1454
610
  a.stopPropagation(), e.isPanelVisible = !e.isPanelVisible;
1455
- } } }), e._v(" " + e._s(e.isPanelVisible ? (s = (n = e.element) == null ? void 0 : n.businessObject) == null ? void 0 : s.name : "") + " ")]), e.panelType === "tab" ? t(He, { directives: [{ name: "show", rawName: "v-show", value: e.isPanelVisible, expression: "isPanelVisible" }], model: { value: e.activeTab, callback: function(a) {
611
+ } } }), e._v(" " + e._s(e.isPanelVisible ? (r = (i = e.element) == null ? void 0 : i.businessObject) == null ? void 0 : r.name : "") + " ")]), e.panelType === "tab" ? t("ElTabs", { directives: [{ name: "show", rawName: "v-show", value: e.isPanelVisible, expression: "isPanelVisible" }], model: { value: e.activeTab, callback: function(a) {
1456
612
  e.activeTab = a;
1457
- }, expression: "activeTab" } }, [e.isNullOrUndefined || e.isArray && e.useTabs.includes("base") ? t(L, { attrs: { label: "常规", name: "base", lazy: "" } }, [t(de, { attrs: { id: e.elementId, "id-edit-disabled": e.idEditDisabled, type: e.elementType, element: e.element, "bpmn-instances": e.bpmnInstances } })], 1) : e._e(), (e.isNullOrUndefined || e.isArray && e.useTabs.includes("message")) && e.elementType === "Process" ? t(L, { attrs: { label: "消息与信号", name: "message", lazy: "" } }, [t("SignalAndMassage", { attrs: { "bpmn-instances": e.bpmnInstances } })], 1) : e._e(), (e.isNullOrUndefined || e.isArray && e.useTabs.includes("condition")) && e.conditionFormVisible ? t(L, { attrs: { label: "流转条件", name: "condition", lazy: "" } }, [t("SignalAndMassage", { attrs: { "bpmn-instances": e.bpmnInstances } })], 1) : e._e(), e.isNullOrUndefined || e.isArray && e.useTabs.includes("form") ? e._t("form", function() {
1458
- return [(e.isNullOrUndefined || e.isArray && e.useTabs.includes("base")) && e.formVisible ? t(L, { key: "form", attrs: { label: "表单", name: "form", lazy: "" } }, [t(ue, { attrs: { id: e.elementId, "bpmn-instances": e.bpmnInstances, element: e.element, type: e.elementType } })], 1) : e._e()];
613
+ }, expression: "activeTab" } }, [e.isNullOrUndefined || e.isArray && e.useTabs.includes("base") ? t("ElTabPane", { attrs: { label: "常规", name: "base", lazy: "" } }, [t("ElementBaseInfo", { attrs: { id: e.elementId, "id-edit-disabled": e.idEditDisabled, type: e.elementType, element: e.element, "bpmn-instances": e.bpmnInstances } })], 1) : e._e(), (e.isNullOrUndefined || e.isArray && e.useTabs.includes("message")) && e.elementType === "Process" ? t("ElTabPane", { attrs: { label: "消息与信号", name: "message", lazy: "" } }, [t("SignalAndMassage", { attrs: { "bpmn-instances": e.bpmnInstances } })], 1) : e._e(), (e.isNullOrUndefined || e.isArray && e.useTabs.includes("condition")) && e.conditionFormVisible ? t("ElTabPane", { attrs: { label: "流转条件", name: "condition", lazy: "" } }, [t("SignalAndMassage", { attrs: { "bpmn-instances": e.bpmnInstances } })], 1) : e._e(), e.isNullOrUndefined || e.isArray && e.useTabs.includes("form") ? e._t("form", function() {
614
+ return [(e.isNullOrUndefined || e.isArray && e.useTabs.includes("base")) && e.formVisible ? t("ElTabPane", { key: "form", attrs: { label: "表单", name: "form", lazy: "" } }, [t("ElementForm", { attrs: { id: e.elementId, "bpmn-instances": e.bpmnInstances, element: e.element, type: e.elementType } })], 1) : e._e()];
1459
615
  }, { id: e.elementId, bpmnInstances: e.bpmnInstances, element: e.element, type: e.elementType }) : e._e(), e.isNullOrUndefined || e.isArray && e.useTabs.includes("task") ? e._t("task", function() {
1460
- return [e.elementType.indexOf("Task") !== -1 ? t(L, { key: "task", attrs: { label: "任务", name: "task", lazy: "" } }, [t("ElementTask", { attrs: { id: e.elementId, "bpmn-instances": e.bpmnInstances, element: e.element, type: e.elementType } })], 1) : e._e()];
1461
- }, { id: e.elementId, bpmnInstances: e.bpmnInstances, element: e.element, type: e.elementType }) : e._e(), (e.isNullOrUndefined || e.isArray && e.useTabs.includes("multiInstance")) && e.elementType.indexOf("Task") !== -1 ? t(L, { key: "multiInstance", attrs: { label: "多实例", name: "multiInstance", lazy: "" } }, [t(ce, { attrs: { id: e.elementId, "bpmn-instances": e.bpmnInstances, element: e.element, type: e.elementType } })], 1) : e._e(), e.isNullOrUndefined || e.isArray && e.useTabs.includes("listeners") ? t(L, { key: "listeners", attrs: { label: "执行监听器", name: "listeners", lazy: "" } }, [t(me, { attrs: { id: e.elementId, "bpmn-instances": e.bpmnInstances, element: e.element, type: e.elementType } })], 1) : e._e(), (e.isNullOrUndefined || e.isArray && e.useTabs.includes("taskListeners")) && e.elementType === "UserTask" ? t(L, { key: "taskListeners", attrs: { label: "任务监听器", name: "taskListeners", lazy: "" } }, [t(pe, { attrs: { id: e.elementId, "bpmn-instances": e.bpmnInstances, element: e.element, type: e.elementType } })], 1) : e._e(), e.isNullOrUndefined || e.isArray && e.useTabs.includes("extensions") ? t(L, { key: "extensions", attrs: { label: "扩展属性", name: "extensions", lazy: "" } }, [t(le, { 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(L, { key: "other", attrs: { label: "其他", name: "other", lazy: "" } }, [t(oe, { 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) : t(Ze, { directives: [{ name: "show", rawName: "v-show", value: e.isPanelVisible, expression: "isPanelVisible" }], model: { value: e.activeTab, callback: function(a) {
616
+ return [e.elementType.indexOf("Task") !== -1 ? t("ElTabPane", { key: "task", attrs: { label: "任务", name: "task", lazy: "" } }, [t("ElementTask", { attrs: { id: e.elementId, "bpmn-instances": e.bpmnInstances, element: e.element, type: e.elementType } })], 1) : e._e()];
617
+ }, { id: e.elementId, bpmnInstances: e.bpmnInstances, element: e.element, type: e.elementType }) : e._e(), (e.isNullOrUndefined || e.isArray && e.useTabs.includes("multiInstance")) && e.elementType.indexOf("Task") !== -1 ? t("ElTabPane", { key: "multiInstance", attrs: { label: "多实例", name: "multiInstance", lazy: "" } }, [t("ElementMultiInstance", { attrs: { id: e.elementId, "bpmn-instances": e.bpmnInstances, element: e.element, type: e.elementType } })], 1) : e._e(), e.isNullOrUndefined || e.isArray && e.useTabs.includes("listeners") ? t("ElTabPane", { key: "listeners", attrs: { label: "执行监听器", name: "listeners", lazy: "" } }, [t("ElementListeners", { attrs: { id: e.elementId, "bpmn-instances": e.bpmnInstances, element: e.element, type: e.elementType } })], 1) : e._e(), (e.isNullOrUndefined || e.isArray && e.useTabs.includes("taskListeners")) && e.elementType === "UserTask" ? t("ElTabPane", { key: "taskListeners", attrs: { label: "任务监听器", name: "taskListeners", lazy: "" } }, [t("UserTaskListeners", { attrs: { id: e.elementId, "bpmn-instances": e.bpmnInstances, element: e.element, type: e.elementType } })], 1) : e._e(), e.isNullOrUndefined || e.isArray && e.useTabs.includes("extensions") ? t("ElTabPane", { key: "extensions", attrs: { label: "扩展属性", name: "extensions", lazy: "" } }, [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("ElTabPane", { key: "other", attrs: { label: "其他", name: "other", lazy: "" } }, [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) : t("ElCollapse", { directives: [{ name: "show", rawName: "v-show", value: e.isPanelVisible, expression: "isPanelVisible" }], model: { value: e.activeTab, callback: function(a) {
1462
618
  e.activeTab = a;
1463
- }, expression: "activeTab" } }, [e.isNullOrUndefined || e.isArray && e.useTabs.includes("base") ? t(I, { attrs: { name: "base" }, scopedSlots: e._u([{ key: "title", fn: function() {
619
+ }, expression: "activeTab" } }, [e.isNullOrUndefined || e.isArray && e.useTabs.includes("base") ? t("ElCollapseItem", { attrs: { name: "base" }, scopedSlots: e._u([{ key: "title", fn: function() {
1464
620
  return [t("div", { staticClass: "panel-tab__title" }, [t("i", { staticClass: "el-icon-info" }), e._v("常规")])];
1465
- }, proxy: !0 }], null, !1, 2621733365) }, [t(de, { attrs: { id: e.elementId, "id-edit-disabled": e.idEditDisabled, type: e.elementType, element: e.element, "bpmn-instances": e.bpmnInstances } })], 1) : e._e(), (e.isNullOrUndefined || e.isArray && e.useTabs.includes("message")) && e.elementType === "Process" ? t(I, { key: "message", attrs: { name: "message" }, scopedSlots: e._u([{ key: "title", fn: function() {
621
+ }, proxy: !0 }], null, !1, 2621733365) }, [t("ElementBaseInfo", { attrs: { id: e.elementId, "id-edit-disabled": e.idEditDisabled, type: e.elementType, element: e.element, "bpmn-instances": e.bpmnInstances } })], 1) : e._e(), (e.isNullOrUndefined || e.isArray && e.useTabs.includes("message")) && e.elementType === "Process" ? t("ElCollapseItem", { key: "message", attrs: { name: "message" }, scopedSlots: e._u([{ key: "title", fn: function() {
1466
622
  return [t("div", { staticClass: "panel-tab__title" }, [t("i", { staticClass: "el-icon-s-comment" }), e._v("消息与信号")])];
1467
- }, proxy: !0 }], null, !1, 2715634709) }, [t("SignalAndMassage", { attrs: { "bpmn-instances": e.bpmnInstances } })], 1) : e._e(), (e.isNullOrUndefined || e.isArray && e.useTabs.includes("condition")) && e.conditionFormVisible ? t(I, { key: "condition", attrs: { name: "condition" }, scopedSlots: e._u([{ key: "title", fn: function() {
623
+ }, proxy: !0 }], null, !1, 2715634709) }, [t("SignalAndMassage", { attrs: { "bpmn-instances": e.bpmnInstances } })], 1) : e._e(), (e.isNullOrUndefined || e.isArray && e.useTabs.includes("condition")) && e.conditionFormVisible ? t("ElCollapseItem", { key: "condition", attrs: { name: "condition" }, scopedSlots: e._u([{ key: "title", fn: function() {
1468
624
  return [t("div", { staticClass: "panel-tab__title" }, [t("i", { staticClass: "el-icon-s-promotion" }), e._v("流转条件")])];
1469
- }, proxy: !0 }], null, !1, 2203010800) }, [t(Ve, { attrs: { id: e.elementId, element: e.element, "bpmn-instances": e.bpmnInstances, type: e.elementType } })], 1) : e._e(), e.isNullOrUndefined || e.isArray && e.useTabs.includes("form") ? e._t("form", function() {
1470
- return [(e.isNullOrUndefined || e.isArray && e.useTabs.includes("base")) && e.formVisible ? t(I, { key: "form", attrs: { name: "form" }, scopedSlots: e._u([{ key: "title", fn: function() {
625
+ }, proxy: !0 }], null, !1, 2203010800) }, [t("FlowCondition", { attrs: { id: e.elementId, element: e.element, "bpmn-instances": e.bpmnInstances, type: e.elementType } })], 1) : e._e(), e.isNullOrUndefined || e.isArray && e.useTabs.includes("form") ? e._t("form", function() {
626
+ return [(e.isNullOrUndefined || e.isArray && e.useTabs.includes("base")) && e.formVisible ? t("ElCollapseItem", { key: "form", attrs: { name: "form" }, scopedSlots: e._u([{ key: "title", fn: function() {
1471
627
  return [t("div", { staticClass: "panel-tab__title" }, [t("i", { staticClass: "el-icon-s-order" }), e._v("表单")])];
1472
- }, proxy: !0 }], null, !1, 1341048650) }, [t(ue, { attrs: { id: e.elementId, "bpmn-instances": e.bpmnInstances, element: e.element, type: e.elementType } })], 1) : e._e()];
628
+ }, proxy: !0 }], null, !1, 1341048650) }, [t("ElementForm", { attrs: { id: e.elementId, "bpmn-instances": e.bpmnInstances, element: e.element, type: e.elementType } })], 1) : e._e()];
1473
629
  }, { id: e.elementId, bpmnInstances: e.bpmnInstances, element: e.element, type: e.elementType }) : e._e(), e.isNullOrUndefined || e.isArray && e.useTabs.includes("task") ? e._t("task", function() {
1474
- return [e.elementType.indexOf("Task") !== -1 ? t(I, { key: "task", attrs: { name: "task" }, scopedSlots: e._u([{ key: "title", fn: function() {
630
+ return [e.elementType.indexOf("Task") !== -1 ? t("ElCollapseItem", { key: "task", attrs: { name: "task" }, scopedSlots: e._u([{ key: "title", fn: function() {
1475
631
  return [t("div", { staticClass: "panel-tab__title" }, [t("i", { staticClass: "el-icon-s-claim" }), e._v("任务")])];
1476
632
  }, proxy: !0 }], null, !1, 2144785833) }, [t("ElementTask", { attrs: { id: e.elementId, "bpmn-instances": e.bpmnInstances, element: e.element, type: e.elementType } })], 1) : e._e()];
1477
- }, { id: e.elementId, bpmnInstances: e.bpmnInstances, element: e.element, type: e.elementType }) : e._e(), (e.isNullOrUndefined || e.isArray && e.useTabs.includes("multiInstance")) && e.elementType.indexOf("Task") !== -1 ? t(I, { key: "multiInstance", attrs: { name: "multiInstance" }, scopedSlots: e._u([{ key: "title", fn: function() {
633
+ }, { id: e.elementId, bpmnInstances: e.bpmnInstances, element: e.element, type: e.elementType }) : e._e(), (e.isNullOrUndefined || e.isArray && e.useTabs.includes("multiInstance")) && e.elementType.indexOf("Task") !== -1 ? t("ElCollapseItem", { key: "multiInstance", attrs: { name: "multiInstance" }, scopedSlots: e._u([{ key: "title", fn: function() {
1478
634
  return [t("div", { staticClass: "panel-tab__title" }, [t("i", { staticClass: "el-icon-s-help" }), e._v("多实例")])];
1479
- }, proxy: !0 }], null, !1, 1253501895) }, [t(ce, { attrs: { id: e.elementId, "bpmn-instances": e.bpmnInstances, element: e.element, type: e.elementType } })], 1) : e._e(), e.isNullOrUndefined || e.isArray && e.useTabs.includes("listeners") ? t(I, { key: "listeners", attrs: { name: "listeners" }, scopedSlots: e._u([{ key: "title", fn: function() {
1480
- return [t("div", { staticClass: "panel-tab__title" }, [t("i", { staticClass: "el-icon-message-solid" }), e._v("执行监听器"), t(y, { attrs: { effect: "light" }, scopedSlots: e._u([{ key: "content", fn: function() {
635
+ }, proxy: !0 }], null, !1, 1253501895) }, [t("ElementMultiInstance", { attrs: { id: e.elementId, "bpmn-instances": e.bpmnInstances, element: e.element, type: e.elementType } })], 1) : e._e(), e.isNullOrUndefined || e.isArray && e.useTabs.includes("listeners") ? t("ElCollapseItem", { key: "listeners", attrs: { name: "listeners" }, scopedSlots: e._u([{ key: "title", fn: function() {
636
+ return [t("div", { staticClass: "panel-tab__title" }, [t("i", { staticClass: "el-icon-message-solid" }), e._v("执行监听器"), t("ElTooltip", { attrs: { effect: "light" }, scopedSlots: e._u([{ key: "content", fn: function() {
1481
637
  return [t("p", [e._v("发送和退回时会触发")])];
1482
638
  }, proxy: !0 }], null, !1, 635466666) }, [t("i", { staticClass: "el-icon-info" })])], 1)];
1483
- }, proxy: !0 }], null, !1, 579687766) }, [t(me, { attrs: { id: e.elementId, "bpmn-instances": e.bpmnInstances, element: e.element, type: e.elementType } })], 1) : e._e(), (e.isNullOrUndefined || e.isArray && e.useTabs.includes("taskListeners")) && e.elementType === "UserTask" ? t(I, { key: "taskListeners", attrs: { name: "taskListeners" }, scopedSlots: e._u([{ key: "title", fn: function() {
1484
- return [t("div", { staticClass: "panel-tab__title" }, [t("i", { staticClass: "el-icon-message-solid" }), e._v("任务监听器"), t(y, { attrs: { effect: "light" }, scopedSlots: e._u([{ key: "content", fn: function() {
639
+ }, proxy: !0 }], null, !1, 579687766) }, [t("ElementListeners", { attrs: { id: e.elementId, "bpmn-instances": e.bpmnInstances, element: e.element, type: e.elementType } })], 1) : e._e(), (e.isNullOrUndefined || e.isArray && e.useTabs.includes("taskListeners")) && e.elementType === "UserTask" ? t("ElCollapseItem", { key: "taskListeners", attrs: { name: "taskListeners" }, scopedSlots: e._u([{ key: "title", fn: function() {
640
+ return [t("div", { staticClass: "panel-tab__title" }, [t("i", { staticClass: "el-icon-message-solid" }), e._v("任务监听器"), t("ElTooltip", { attrs: { effect: "light" }, scopedSlots: e._u([{ key: "content", fn: function() {
1485
641
  return [t("p", [e._v("任务实例的创建、指派、完成、删除、更新、超时会触发")])];
1486
642
  }, proxy: !0 }], null, !1, 1260848675) }, [t("i", { staticClass: "el-icon-info" })])], 1)];
1487
- }, proxy: !0 }], null, !1, 1038413081) }, [t(pe, { attrs: { id: e.elementId, "bpmn-instances": e.bpmnInstances, element: e.element, type: e.elementType } })], 1) : e._e(), e.isNullOrUndefined || e.isArray && e.useTabs.includes("extensions") ? t(I, { key: "extensions", attrs: { name: "extensions" }, scopedSlots: e._u([{ key: "title", fn: function() {
643
+ }, proxy: !0 }], null, !1, 1038413081) }, [t("UserTaskListeners", { attrs: { id: e.elementId, "bpmn-instances": e.bpmnInstances, element: e.element, type: e.elementType } })], 1) : e._e(), e.isNullOrUndefined || e.isArray && e.useTabs.includes("extensions") ? t("ElCollapseItem", { key: "extensions", attrs: { name: "extensions" }, scopedSlots: e._u([{ key: "title", fn: function() {
1488
644
  return [t("div", { staticClass: "panel-tab__title" }, [t("i", { staticClass: "el-icon-circle-plus" }), e._v("扩展属性")])];
1489
- }, proxy: !0 }], null, !1, 1854866151) }, [t(le, { 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(I, { key: "other", attrs: { name: "other" }, scopedSlots: e._u([{ key: "title", fn: function() {
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() {
1490
646
  return [t("div", { staticClass: "panel-tab__title" }, [t("i", { staticClass: "el-icon-s-promotion" }), e._v("其他")])];
1491
- }, proxy: !0 }], null, !1, 520255146) }, [t(oe, { 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);
1492
- }, on = [], ln = /* @__PURE__ */ w(
1493
- rn,
1494
- an,
1495
- on,
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);
648
+ }, Re = [], $e = /* @__PURE__ */ U(
649
+ Fe,
650
+ Le,
651
+ Re,
1496
652
  !1,
1497
653
  null,
1498
654
  null
1499
655
  );
1500
- const Re = ln.exports, pn = (i, e, t) => (t = t || "camunda", `<?xml version="1.0" encoding="UTF-8"?>
656
+ const Ve = $e.exports, Ne = (n, e, t) => (t = t || "camunda", `<?xml version="1.0" encoding="UTF-8"?>
1501
657
  <bpmn2:definitions
1502
658
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1503
659
  xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL"
1504
660
  xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
1505
661
  xmlns:dc="http://www.omg.org/spec/DD/20100524/DC"
1506
662
  xmlns:di="http://www.omg.org/spec/DD/20100524/DI"
1507
- id="diagram_${i}"
663
+ id="diagram_${n}"
1508
664
  targetNamespace="${{
1509
665
  activiti: "http://activiti.org/bpmn",
1510
666
  camunda: "http://bpmn.io/schema/bpmn",
1511
667
  flowable: "http://flowable.org/bpmn"
1512
668
  }[t]}">
1513
- <bpmn2:process id="${i}" name="${e}" isExecutable="true">
669
+ <bpmn2:process id="${n}" name="${e}" isExecutable="true">
1514
670
  </bpmn2:process>
1515
671
  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
1516
- <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="${i}">
672
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="${n}">
1517
673
  </bpmndi:BPMNPlane>
1518
674
  </bpmndi:BPMNDiagram>
1519
675
  </bpmn2:definitions>`);
1520
- function mn(i) {
676
+ function ze(n) {
1521
677
  return function(e, t) {
1522
- return t = t || {}, e = i[e] || e, e.replace(/{([^}]+)}/g, function(n, s) {
1523
- let a = t[s];
1524
- return i[t[s]] !== null && i[t[s]] !== void 0 && (a = i[t[s]]), a || `{${s}}`;
678
+ return t = t || {}, e = n[e] || e, e.replace(/{([^}]+)}/g, function(i, r) {
679
+ let a = t[r];
680
+ return n[t[r]] !== null && n[t[r]] !== void 0 && (a = n[t[r]]), a || `{${r}}`;
1525
681
  });
1526
682
  };
1527
683
  }
1528
- const cn = {
684
+ const Ue = {
1529
685
  // 添加部分
1530
686
  "Append EndEvent": "追加结束事件",
1531
687
  "Append Gateway": "追加网关",
@@ -1765,7 +921,7 @@ const cn = {
1765
921
  Data: "数据",
1766
922
  TextAnnotation: "文本说明",
1767
923
  Tasks: "任务"
1768
- }, be = [
924
+ }, J = [
1769
925
  {
1770
926
  name: "commentInForm",
1771
927
  isAttr: !0,
@@ -1791,7 +947,7 @@ const cn = {
1791
947
  isAttr: !0,
1792
948
  type: "String"
1793
949
  }
1794
- ], Te = {
950
+ ], ee = {
1795
951
  name: "Camunda",
1796
952
  uri: "http://camunda.org/schema/1.0/bpmn",
1797
953
  prefix: "camunda",
@@ -2113,7 +1269,7 @@ const cn = {
2113
1269
  isAttr: !0,
2114
1270
  type: "String"
2115
1271
  },
2116
- ...be
1272
+ ...J
2117
1273
  ]
2118
1274
  },
2119
1275
  {
@@ -2792,7 +1948,7 @@ const cn = {
2792
1948
  }
2793
1949
  ],
2794
1950
  emumerations: []
2795
- }, we = {
1951
+ }, te = {
2796
1952
  name: "Activiti",
2797
1953
  uri: "http://activiti.org/bpmn",
2798
1954
  prefix: "activiti",
@@ -3127,7 +2283,7 @@ const cn = {
3127
2283
  isAttr: !0,
3128
2284
  type: "String"
3129
2285
  },
3130
- ...be
2286
+ ...J
3131
2287
  ]
3132
2288
  },
3133
2289
  {
@@ -3777,7 +2933,7 @@ const cn = {
3777
2933
  }
3778
2934
  ],
3779
2935
  emumerations: []
3780
- }, ke = {
2936
+ }, ne = {
3781
2937
  name: "Flowable",
3782
2938
  uri: "http://flowable.org/bpmn",
3783
2939
  prefix: "flowable",
@@ -4100,7 +3256,7 @@ const cn = {
4100
3256
  isAttr: !0,
4101
3257
  type: "String"
4102
3258
  },
4103
- ...be
3259
+ ...J
4104
3260
  ]
4105
3261
  },
4106
3262
  {
@@ -5004,157 +4160,157 @@ const cn = {
5004
4160
  ]
5005
4161
  }
5006
4162
  ]
5007
- }, un = "*";
5008
- function z(i) {
4163
+ }, Ge = "*";
4164
+ function C(n) {
5009
4165
  const e = this;
5010
- i.on("moddleCopy.canCopyProperty", function(t) {
5011
- const n = t.property, s = t.parent;
5012
- return e.canCopyProperty(n, s);
4166
+ n.on("moddleCopy.canCopyProperty", function(t) {
4167
+ const i = t.property, r = t.parent;
4168
+ return e.canCopyProperty(i, r);
5013
4169
  });
5014
4170
  }
5015
- z.$inject = ["eventBus"];
5016
- z.prototype.canCopyProperty = function(i, e) {
5017
- if (tt(i) && !dn(i, e) || D(i, "camunda:InputOutput") && !this.canHostInputOutput(e) || je(i, ["camunda:Connector", "camunda:Field"]) && !this.canHostConnector(e) || D(i, "camunda:In") && !this.canHostIn(e))
4171
+ C.$inject = ["eventBus"];
4172
+ C.prototype.canCopyProperty = function(n, e) {
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))
5018
4174
  return !1;
5019
4175
  };
5020
- z.prototype.canHostInputOutput = function(i) {
5021
- if (C(i, "camunda:Connector"))
4176
+ C.prototype.canHostInputOutput = function(n) {
4177
+ if (f(n, "camunda:Connector"))
5022
4178
  return !0;
5023
- const t = C(i, "bpmn:FlowNode");
5024
- return !(!t || je(t, ["bpmn:StartEvent", "bpmn:Gateway", "bpmn:BoundaryEvent"]) || D(t, "bpmn:SubProcess") && t.get("triggeredByEvent"));
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"));
5025
4181
  };
5026
- z.prototype.canHostConnector = function(i) {
5027
- const e = C(i, "camunda:ServiceTaskLike");
5028
- return D(e, "bpmn:MessageEventDefinition") ? C(i, "bpmn:IntermediateThrowEvent") || C(i, "bpmn:EndEvent") : !0;
4182
+ C.prototype.canHostConnector = function(n) {
4183
+ const e = f(n, "camunda:ServiceTaskLike");
4184
+ return E(e, "bpmn:MessageEventDefinition") ? f(n, "bpmn:IntermediateThrowEvent") || f(n, "bpmn:EndEvent") : !0;
5029
4185
  };
5030
- z.prototype.canHostIn = function(i) {
5031
- return C(i, "bpmn:CallActivity") ? !0 : C(i, "bpmn:SignalEventDefinition") ? C(i, "bpmn:IntermediateThrowEvent") || C(i, "bpmn:EndEvent") : !0;
4186
+ C.prototype.canHostIn = function(n) {
4187
+ return f(n, "bpmn:CallActivity") ? !0 : f(n, "bpmn:SignalEventDefinition") ? f(n, "bpmn:IntermediateThrowEvent") || f(n, "bpmn:EndEvent") : !0;
5032
4188
  };
5033
- function D(i, e) {
5034
- return i && nt(i.$instanceOf) && i.$instanceOf(e);
4189
+ function E(n, e) {
4190
+ return n && ce(n.$instanceOf) && n.$instanceOf(e);
5035
4191
  }
5036
- function je(i, e) {
5037
- return B(e, function(t) {
5038
- return D(i, t);
4192
+ function le(n, e) {
4193
+ return T(e, function(t) {
4194
+ return E(n, t);
5039
4195
  });
5040
4196
  }
5041
- function C(i, e) {
4197
+ function f(n, e) {
5042
4198
  if (!e)
5043
- return i.$parent;
5044
- if (D(i, e))
5045
- return i;
5046
- if (i.$parent)
5047
- return C(i.$parent, e);
4199
+ return n.$parent;
4200
+ if (E(n, e))
4201
+ return n;
4202
+ if (n.$parent)
4203
+ return f(n.$parent, e);
5048
4204
  }
5049
- function dn(i, e) {
5050
- const t = i.$type && i.$model.getTypeDescriptor(i.$type), n = t && t.meta && t.meta.allowedIn;
5051
- return !n || fn(n) ? !0 : B(n, function(s) {
5052
- return C(e, s);
4205
+ function je(n, e) {
4206
+ const t = n.$type && n.$model.getTypeDescriptor(n.$type), i = t && t.meta && t.meta.allowedIn;
4207
+ return !i || Je(i) ? !0 : T(i, function(r) {
4208
+ return f(e, r);
5053
4209
  });
5054
4210
  }
5055
- function fn(i) {
5056
- return i.indexOf(un) !== -1;
4211
+ function Je(n) {
4212
+ return n.indexOf(Ge) !== -1;
5057
4213
  }
5058
- const yn = {
4214
+ const Ze = {
5059
4215
  __init__: ["camundaModdleExtension"],
5060
- camundaModdleExtension: ["type", z]
5061
- }, bn = {
4216
+ camundaModdleExtension: ["type", C]
4217
+ }, He = {
5062
4218
  FailedJobRetryTimeCycle: ["bpmn:StartEvent", "bpmn:BoundaryEvent", "bpmn:IntermediateCatchEvent", "bpmn:Activity"],
5063
4219
  Connector: ["bpmn:EndEvent", "bpmn:IntermediateThrowEvent"],
5064
4220
  Field: ["bpmn:EndEvent", "bpmn:IntermediateThrowEvent"]
5065
4221
  };
5066
- function he(i, e) {
5067
- return i && typeof i.$instanceOf == "function" && i.$instanceOf(e);
4222
+ function Z(n, e) {
4223
+ return n && typeof n.$instanceOf == "function" && n.$instanceOf(e);
5068
4224
  }
5069
- function hn(i) {
5070
- return i && i.length;
4225
+ function qe(n) {
4226
+ return n && n.length;
5071
4227
  }
5072
- function Y(i, e) {
5073
- return hn(i) && B(i, function(t) {
5074
- return he(t, e);
4228
+ function F(n, e) {
4229
+ return qe(n) && T(n, function(t) {
4230
+ return Z(t, e);
5075
4231
  });
5076
4232
  }
5077
- function vn(i, e) {
5078
- return B(e, function(t) {
5079
- return he(i, t);
4233
+ function We(n, e) {
4234
+ return T(e, function(t) {
4235
+ return Z(n, t);
5080
4236
  });
5081
4237
  }
5082
- function re(i, e, t) {
5083
- const n = e.name, s = bn[n.replace(/activiti:/, "")];
5084
- return n === i && vn(t, s);
4238
+ function V(n, e, t) {
4239
+ const i = e.name, r = He[i.replace(/activiti:/, "")];
4240
+ return i === n && We(t, r);
5085
4241
  }
5086
- function ve(i) {
5087
- i.on(
4242
+ function H(n) {
4243
+ n.on(
5088
4244
  "property.clone",
5089
4245
  function(e) {
5090
- const t = e.newElement, n = e.propertyDescriptor;
5091
- this.canCloneProperty(t, n);
4246
+ const t = e.newElement, i = e.propertyDescriptor;
4247
+ this.canCloneProperty(t, i);
5092
4248
  },
5093
4249
  this
5094
4250
  );
5095
4251
  }
5096
- ve.$inject = ["eventBus"];
5097
- ve.prototype.canCloneProperty = function(i, e) {
5098
- if (re("activiti:FailedJobRetryTimeCycle", e, i))
5099
- return Y(i.eventDefinitions, "bpmn:TimerEventDefinition") || Y(i.eventDefinitions, "bpmn:SignalEventDefinition") || he(i.loopCharacteristics, "bpmn:MultiInstanceLoopCharacteristics");
5100
- if (re("activiti:Connector", e, i) || re("activiti:Field", e, i))
5101
- return Y(i.eventDefinitions, "bpmn:MessageEventDefinition");
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");
5102
4258
  };
5103
- const gn = {
4259
+ const Xe = {
5104
4260
  __init__: ["ActivitiModdleExtension"],
5105
- ActivitiModdleExtension: ["type", ve]
5106
- }, xn = {
4261
+ ActivitiModdleExtension: ["type", H]
4262
+ }, Ke = {
5107
4263
  FailedJobRetryTimeCycle: ["bpmn:StartEvent", "bpmn:BoundaryEvent", "bpmn:IntermediateCatchEvent", "bpmn:Activity"],
5108
4264
  Connector: ["bpmn:EndEvent", "bpmn:IntermediateThrowEvent"],
5109
4265
  Field: ["bpmn:EndEvent", "bpmn:IntermediateThrowEvent"]
5110
4266
  };
5111
- function ge(i, e) {
5112
- return i && typeof i.$instanceOf == "function" && i.$instanceOf(e);
4267
+ function q(n, e) {
4268
+ return n && typeof n.$instanceOf == "function" && n.$instanceOf(e);
5113
4269
  }
5114
- function Fn(i) {
5115
- return i && i.length;
4270
+ function Ye(n) {
4271
+ return n && n.length;
5116
4272
  }
5117
- function Q(i, e) {
5118
- return Fn(i) && B(i, function(t) {
5119
- return ge(t, e);
4273
+ function L(n, e) {
4274
+ return Ye(n) && T(n, function(t) {
4275
+ return q(t, e);
5120
4276
  });
5121
4277
  }
5122
- function Sn(i, e) {
5123
- return B(e, function(t) {
5124
- return ge(i, t);
4278
+ function Qe(n, e) {
4279
+ return T(e, function(t) {
4280
+ return q(n, t);
5125
4281
  });
5126
4282
  }
5127
- function ae(i, e, t) {
5128
- const n = e.name, s = xn[n.replace(/flowable:/, "")];
5129
- return n === i && Sn(t, s);
4283
+ function N(n, e, t) {
4284
+ const i = e.name, r = Ke[i.replace(/flowable:/, "")];
4285
+ return i === n && Qe(t, r);
5130
4286
  }
5131
- function xe(i) {
5132
- i.on(
4287
+ function W(n) {
4288
+ n.on(
5133
4289
  "property.clone",
5134
4290
  function(e) {
5135
- const t = e.newElement, n = e.propertyDescriptor;
5136
- this.canCloneProperty(t, n);
4291
+ const t = e.newElement, i = e.propertyDescriptor;
4292
+ this.canCloneProperty(t, i);
5137
4293
  },
5138
4294
  this
5139
4295
  );
5140
4296
  }
5141
- xe.$inject = ["eventBus"];
5142
- xe.prototype.canCloneProperty = function(i, e) {
5143
- if (ae("flowable:FailedJobRetryTimeCycle", e, i))
5144
- return Q(i.eventDefinitions, "bpmn:TimerEventDefinition") || Q(i.eventDefinitions, "bpmn:SignalEventDefinition") || ge(i.loopCharacteristics, "bpmn:MultiInstanceLoopCharacteristics");
5145
- if (ae("flowable:Connector", e, i) || ae("flowable:Field", e, i))
5146
- return Q(i.eventDefinitions, "bpmn:MessageEventDefinition");
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");
5147
4303
  };
5148
- const _n = {
4304
+ const et = {
5149
4305
  __init__: ["FlowableModdleExtension"],
5150
- FlowableModdleExtension: ["type", xe]
4306
+ FlowableModdleExtension: ["type", W]
5151
4307
  };
5152
- Pe.registerLanguage("xml", Qe);
5153
- Pe.registerLanguage("json", et);
5154
- const En = {
4308
+ re.registerLanguage("xml", Ee);
4309
+ re.registerLanguage("json", Te);
4310
+ const tt = {
5155
4311
  name: "ProcessDesigner",
5156
4312
  components: {
5157
- HighlightJS: Le
4313
+ HighlightJS: Ce
5158
4314
  },
5159
4315
  componentName: "MyProcessDesigner",
5160
4316
  props: {
@@ -5200,12 +4356,12 @@ const En = {
5200
4356
  headerButtonSize: {
5201
4357
  type: String,
5202
4358
  default: "small",
5203
- validator: (i) => ["default", "medium", "small", "mini"].indexOf(i) !== -1
4359
+ validator: (n) => ["default", "medium", "small", "mini"].indexOf(n) !== -1
5204
4360
  },
5205
4361
  headerButtonType: {
5206
4362
  type: String,
5207
4363
  default: "primary",
5208
- validator: (i) => ["default", "primary", "success", "warning", "danger", "info"].indexOf(i) !== -1
4364
+ validator: (n) => ["default", "primary", "success", "warning", "danger", "info"].indexOf(n) !== -1
5209
4365
  },
5210
4366
  extendTypes: Array
5211
4367
  },
@@ -5222,32 +4378,32 @@ const En = {
5222
4378
  },
5223
4379
  computed: {
5224
4380
  additionalModules() {
5225
- const i = [];
4381
+ const n = [];
5226
4382
  if (this.onlyCustomizeAddi)
5227
- return _e(this.additionalModel) ? this.additionalModel || [] : [this.additionalModel];
5228
- _e(this.additionalModel) ? i.push(...this.additionalModel) : this.additionalModel && i.push(this.additionalModel);
4383
+ return K(this.additionalModel) ? this.additionalModel || [] : [this.additionalModel];
4384
+ K(this.additionalModel) ? n.push(...this.additionalModel) : this.additionalModel && n.push(this.additionalModel);
5229
4385
  const e = {
5230
- translate: ["value", mn(this.translations || cn)]
4386
+ translate: ["value", ze(this.translations || Ue)]
5231
4387
  };
5232
- return i.push(e), this.simulation && i.push(Ye), i.push(Xe), this.prefix === "camunda" && i.push(yn), this.prefix === "flowable" && i.push(_n), this.prefix === "activiti" && i.push(gn), i;
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;
5233
4389
  },
5234
4390
  moddleExtensions() {
5235
- const i = {};
4391
+ const n = {};
5236
4392
  if (this.onlyCustomizeModdle)
5237
4393
  return this.moddleExtension || null;
5238
4394
  if (this.moddleExtension)
5239
4395
  for (const e in this.moddleExtension)
5240
- i[e] = this.moddleExtension[e];
5241
- return this.prefix === "activiti" && (i.activiti = {
5242
- ...we,
5243
- types: [...we.types, ...this.extendTypes || []]
5244
- }), this.prefix === "flowable" && (i.flowable = {
5245
- ...ke,
5246
- types: [...ke.types, ...this.extendTypes || []]
5247
- }), this.prefix === "camunda" && (i.camunda = {
5248
- ...Te,
5249
- types: [...Te.types, ...this.extendTypes || []]
5250
- }), i;
4396
+ n[e] = this.moddleExtension[e];
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;
5251
4407
  }
5252
4408
  },
5253
4409
  mounted() {
@@ -5257,8 +4413,8 @@ const En = {
5257
4413
  },
5258
4414
  methods: {
5259
4415
  initBpmnModeler() {
5260
- this.bpmnModeler || (this.bpmnModeler = ee(
5261
- new We({
4416
+ this.bpmnModeler || (this.bpmnModeler = R(
4417
+ new Se({
5262
4418
  container: this.$refs["bpmn-canvas"],
5263
4419
  keyboard: this.keyboard ? { bindTo: document } : null,
5264
4420
  additionalModules: this.additionalModules,
@@ -5268,34 +4424,34 @@ const En = {
5268
4424
  ), this.$emit("init-finished", this.bpmnModeler), this.initModelListeners());
5269
4425
  },
5270
4426
  initModelListeners() {
5271
- const i = this.bpmnModeler.get("eventBus"), e = this;
4427
+ const n = this.bpmnModeler.get("eventBus"), e = this;
5272
4428
  this.events.forEach((t) => {
5273
- i.on(t, (n) => {
5274
- const s = t.replace(/\./g, "-"), a = n ? n.element : null;
5275
- e.$emit(s, a, n);
4429
+ n.on(t, (i) => {
4430
+ const r = t.replace(/\./g, "-"), a = i ? i.element : null;
4431
+ e.$emit(r, a, i);
5276
4432
  });
5277
- }), i.on("commandStack.changed", async (t) => {
4433
+ }), n.on("commandStack.changed", async (t) => {
5278
4434
  try {
5279
4435
  this.recoverable = this.bpmnModeler.get("commandStack").canRedo(), this.revocable = this.bpmnModeler.get("commandStack").canUndo();
5280
- const { xml: n } = await this.bpmnModeler.saveXML({ format: !0 });
5281
- this.$emit("commandStack-changed", t), this.$emit("input", n), this.$emit("change", n);
5282
- } catch (n) {
5283
- console.error(`[Process Designer Warn]: ${n.message || n}`);
4436
+ const { xml: i } = await this.bpmnModeler.saveXML({ format: !0 });
4437
+ this.$emit("commandStack-changed", t), this.$emit("input", i), this.$emit("change", i);
4438
+ } catch (i) {
4439
+ console.error(`[Process Designer Warn]: ${i.message || i}`);
5284
4440
  }
5285
4441
  }), this.bpmnModeler.on("canvas.viewbox.changed", ({ viewbox: t }) => {
5286
4442
  this.$emit("canvas-viewbox-changed", { viewbox: t });
5287
- const { scale: n } = t;
5288
- this.defaultZoom = Math.floor(n * 100) / 100;
4443
+ const { scale: i } = t;
4444
+ this.defaultZoom = Math.floor(i * 100) / 100;
5289
4445
  });
5290
4446
  },
5291
4447
  /* 创建新的流程图 */
5292
- async createNewDiagram(i) {
5293
- const e = this.processId || `Process_${(/* @__PURE__ */ new Date()).getTime()}`, t = this.processName || `业务流程_${(/* @__PURE__ */ new Date()).getTime()}`, n = i || pn(e, t, this.prefix);
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);
5294
4450
  try {
5295
- const { warnings: s } = await this.bpmnModeler.importXML(n);
5296
- this.bpmnModeler.get("canvas").zoom("fit-viewport", "center"), s != null && s.length;
5297
- } catch (s) {
5298
- console.error(`[Process Designer Warn]: ${(s == null ? void 0 : s.message) || s}`);
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}`);
5299
4455
  }
5300
4456
  },
5301
4457
  // 下载流程图到本地
@@ -5303,46 +4459,46 @@ const En = {
5303
4459
  * @param {string} type
5304
4460
  * @param {*} name
5305
4461
  */
5306
- async downloadProcess(i, e = "diagram") {
4462
+ async downloadProcess(n, e = "diagram") {
5307
4463
  try {
5308
- const { err: n, xml: s } = await this.bpmnModeler.saveXML();
5309
- n && console.error(`[Process Designer Warn ]: ${n.message || n}`);
5310
- const a = new Ee(), { definitions: r } = a.xml2js(s);
5311
- if (e = r.process._name || e, i === "xml" || i === "bpmn") {
5312
- const { href: m, filename: b } = this.setEncoded(i.toUpperCase(), e, s);
5313
- t(m, b);
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);
5314
4470
  } else {
5315
- const { err: m, svg: b } = await this.bpmnModeler.saveSVG();
5316
- if (m)
5317
- return console.error(m);
5318
- const { href: P, filename: f } = this.setEncoded("SVG", e, b);
5319
- t(P, f);
5320
- }
5321
- } catch (n) {
5322
- console.error(`[Process Designer Warn ]: ${n.message || n}`);
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}`);
5323
4479
  }
5324
- function t(n, s) {
5325
- if (n && s) {
4480
+ function t(i, r) {
4481
+ if (i && r) {
5326
4482
  const a = document.createElement("a");
5327
- a.download = s, a.href = n, a.click(), URL.revokeObjectURL(a.href);
4483
+ a.download = r, a.href = i, a.click(), URL.revokeObjectURL(a.href);
5328
4484
  }
5329
4485
  }
5330
4486
  },
5331
4487
  // 根据所需类型进行转码并返回下载地址
5332
- setEncoded(i, e = "diagram", t) {
5333
- const n = encodeURIComponent(t);
4488
+ setEncoded(n, e = "diagram", t) {
4489
+ const i = encodeURIComponent(t);
5334
4490
  return {
5335
- filename: `${e}.${i}`,
5336
- href: `data:application/${i === "svg" ? "text/xml" : "bpmn20-xml"};charset=UTF-8,${n}`,
4491
+ filename: `${e}.${n}`,
4492
+ href: `data:application/${n === "svg" ? "text/xml" : "bpmn20-xml"};charset=UTF-8,${i}`,
5337
4493
  data: t
5338
4494
  };
5339
4495
  },
5340
4496
  // 加载本地文件
5341
4497
  importLocalFile() {
5342
- const i = this, e = this.$refs.refFile.files[0], t = new FileReader();
4498
+ const n = this, e = this.$refs.refFile.files[0], t = new FileReader();
5343
4499
  t.readAsText(e), t.onload = function() {
5344
- const n = this.result;
5345
- i.createNewDiagram(n);
4500
+ const i = this.result;
4501
+ n.createNewDiagram(i);
5346
4502
  };
5347
4503
  },
5348
4504
  /* ------------------------------------------------ refs methods ------------------------------------------------------ */
@@ -5356,8 +4512,8 @@ const En = {
5356
4512
  this.downloadProcess("svg");
5357
4513
  },
5358
4514
  processSimulation() {
5359
- var i;
5360
- this.simulationStatus = !this.simulationStatus, this.simulation && ((i = this.bpmnModeler) == null || i.get("toggleMode").toggleMode());
4515
+ var n;
4516
+ this.simulationStatus = !this.simulationStatus, this.simulation && ((n = this.bpmnModeler) == null || n.get("toggleMode").toggleMode());
5361
4517
  },
5362
4518
  processRedo() {
5363
4519
  this.bpmnModeler.get("commandStack").redo();
@@ -5365,24 +4521,24 @@ const En = {
5365
4521
  processUndo() {
5366
4522
  this.bpmnModeler.get("commandStack").undo();
5367
4523
  },
5368
- processZoomIn(i = 0.1) {
5369
- const e = Math.floor(this.defaultZoom * 100 + i * 100) / 100;
4524
+ processZoomIn(n = 0.1) {
4525
+ const e = Math.floor(this.defaultZoom * 100 + n * 100) / 100;
5370
4526
  if (e > 4)
5371
4527
  throw new Error("[Process Designer Warn ]: The zoom ratio cannot be greater than 4");
5372
4528
  this.defaultZoom = e, this.bpmnModeler.get("canvas").zoom(this.defaultZoom);
5373
4529
  },
5374
- processZoomOut(i = 0.1) {
5375
- const e = Math.floor(this.defaultZoom * 100 - i * 100) / 100;
4530
+ processZoomOut(n = 0.1) {
4531
+ const e = Math.floor(this.defaultZoom * 100 - n * 100) / 100;
5376
4532
  if (e < 0.2)
5377
4533
  throw new Error("[Process Designer Warn ]: The zoom ratio cannot be less than 0.2");
5378
4534
  this.defaultZoom = e, this.bpmnModeler.get("canvas").zoom(this.defaultZoom);
5379
4535
  },
5380
- processZoomTo(i = 1) {
5381
- if (i < 0.2)
4536
+ processZoomTo(n = 1) {
4537
+ if (n < 0.2)
5382
4538
  throw new Error("[Process Designer Warn ]: The zoom ratio cannot be less than 0.2");
5383
- if (i > 4)
4539
+ if (n > 4)
5384
4540
  throw new Error("[Process Designer Warn ]: The zoom ratio cannot be greater than 4");
5385
- this.defaultZoom = i, this.bpmnModeler.get("canvas").zoom(i);
4541
+ this.defaultZoom = n, this.bpmnModeler.get("canvas").zoom(n);
5386
4542
  },
5387
4543
  processReZoom() {
5388
4544
  this.defaultZoom = 1, this.bpmnModeler.get("canvas").zoom("fit-viewport", "auto");
@@ -5390,9 +4546,9 @@ const En = {
5390
4546
  processRestart() {
5391
4547
  this.recoverable = !1, this.revocable = !1, this.createNewDiagram(null);
5392
4548
  },
5393
- elementsAlign(i) {
5394
- const e = this.bpmnModeler.get("alignElements"), n = this.bpmnModeler.get("selection").get();
5395
- if (!n || n.length <= 1) {
4549
+ elementsAlign(n) {
4550
+ const e = this.bpmnModeler.get("alignElements"), i = this.bpmnModeler.get("selection").get();
4551
+ if (!i || i.length <= 1) {
5396
4552
  this.$message.warning("请按住 Shift 键选择多个元素对齐");
5397
4553
  return;
5398
4554
  }
@@ -5400,507 +4556,77 @@ const En = {
5400
4556
  confirmButtonText: "确定",
5401
4557
  cancelButtonText: "取消",
5402
4558
  type: "warning"
5403
- }).then(() => e.trigger(n, i));
4559
+ }).then(() => e.trigger(i, n));
5404
4560
  },
5405
4561
  /* ----------------------------- 方法结束 --------------------------------- */
5406
4562
  previewProcessXML() {
5407
- this.bpmnModeler.saveXML({ format: !0 }).then(({ xml: i }) => {
5408
- this.previewResult = i, this.previewType = "xml", this.previewModelVisible = !0;
4563
+ this.bpmnModeler.saveXML({ format: !0 }).then(({ xml: n }) => {
4564
+ this.previewResult = n, this.previewType = "xml", this.previewModelVisible = !0;
5409
4565
  });
5410
4566
  },
5411
4567
  previewProcessJson() {
5412
- const i = new Ee();
4568
+ const n = new X();
5413
4569
  this.bpmnModeler.saveXML({ format: !0 }).then(({ xml: e }) => {
5414
- const { definitions: t } = i.xml2js(e);
4570
+ const { definitions: t } = n.xml2js(e);
5415
4571
  t ? this.previewResult = JSON.stringify(t, null, 4) : this.previewResult = "", this.previewType = "json", this.previewModelVisible = !0;
5416
4572
  });
5417
4573
  }
5418
4574
  }
5419
4575
  };
5420
- var An = function() {
4576
+ var nt = function() {
5421
4577
  var e = this, t = e._self._c;
5422
4578
  return t("div", { staticClass: "my-process-designer" }, [t("div", { staticClass: "my-process-designer__header" }, [e._t("control-header", function() {
5423
- return [t(W, { key: "file-control" }, [e._t("toolbar-buttons"), e.simulation ? t(y, { attrs: { effect: "light", content: "导入流程" } }, [t(l, { attrs: { size: e.headerButtonSize, type: e.headerButtonType, icon: "el-icon-folder-opened" }, on: { click: function(n) {
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) {
5424
4580
  return e.$refs.refFile.click();
5425
- } } }, [e._v(" 导入 ")])], 1) : e._e(), t(y, { attrs: { effect: "light" }, scopedSlots: e._u([{ key: "content", fn: function() {
5426
- return [t(l, { attrs: { size: e.headerButtonSize, type: "text" }, on: { click: function(n) {
4581
+ } } }, [e._v(" 导入 ")])], 1) : e._e(), t("ElTooltip", { attrs: { effect: "light" }, scopedSlots: e._u([{ key: "content", fn: function() {
4582
+ return [t("ElButton", { attrs: { size: e.headerButtonSize, type: "text" }, on: { click: function(i) {
5427
4583
  return e.downloadProcessAsXml();
5428
- } } }, [e._v("下载为XML文件")]), t("br"), t(l, { attrs: { size: e.headerButtonSize, type: "text" }, on: { click: function(n) {
4584
+ } } }, [e._v("下载为XML文件")]), t("br"), t("ElButton", { attrs: { size: e.headerButtonSize, type: "text" }, on: { click: function(i) {
5429
4585
  return e.downloadProcessAsSvg();
5430
- } } }, [e._v("下载为SVG文件")]), t("br"), t(l, { attrs: { size: e.headerButtonSize, type: "text" }, on: { click: function(n) {
4586
+ } } }, [e._v("下载为SVG文件")]), t("br"), t("ElButton", { attrs: { size: e.headerButtonSize, type: "text" }, on: { click: function(i) {
5431
4587
  return e.downloadProcessAsBpmn();
5432
4588
  } } }, [e._v("下载为BPMN文件")])];
5433
- }, proxy: !0 }]) }, [t(l, { attrs: { size: e.headerButtonSize, type: e.headerButtonType, icon: "el-icon-download" } }, [e._v("下载")])], 1), t(y, { attrs: { effect: "light" }, scopedSlots: e._u([{ key: "content", fn: function() {
5434
- return [t(l, { attrs: { size: e.headerButtonSize, type: "text" }, on: { click: e.previewProcessXML } }, [e._v("预览XML")]), t("br"), t(l, { attrs: { size: e.headerButtonSize, type: "text" }, on: { click: e.previewProcessJson } }, [e._v("预览JSON")])];
5435
- }, proxy: !0 }]) }, [t(l, { attrs: { size: e.headerButtonSize, type: e.headerButtonType, icon: "el-icon-view" } }, [e._v("预览")])], 1), e.simulation ? t(y, { attrs: { effect: "light", content: e.simulationStatus ? "退出模拟" : "开启模拟" } }, [t(l, { attrs: { size: e.headerButtonSize, type: e.headerButtonType, icon: "el-icon-cpu" }, on: { click: e.processSimulation } }, [e._v(" 模拟 ")])], 1) : e._e()], 2), t(W, { key: "align-control" }, [t(y, { attrs: { effect: "light", content: "向左对齐" } }, [t(l, { staticClass: "align align-left", attrs: { size: e.headerButtonSize, icon: "el-icon-s-data" }, on: { click: function(n) {
4589
+ }, proxy: !0 }]) }, [t("ElButton", { attrs: { size: e.headerButtonSize, type: e.headerButtonType, icon: "el-icon-download" } }, [e._v("下载")])], 1), t("ElTooltip", { attrs: { effect: "light" }, scopedSlots: e._u([{ key: "content", fn: function() {
4590
+ return [t("ElButton", { attrs: { size: e.headerButtonSize, type: "text" }, on: { click: e.previewProcessXML } }, [e._v("预览XML")]), t("br"), t("ElButton", { attrs: { size: e.headerButtonSize, type: "text" }, on: { click: e.previewProcessJson } }, [e._v("预览JSON")])];
4591
+ }, proxy: !0 }]) }, [t("ElButton", { attrs: { size: e.headerButtonSize, type: e.headerButtonType, icon: "el-icon-view" } }, [e._v("预览")])], 1), e.simulation ? t("ElTooltip", { attrs: { effect: "light", content: e.simulationStatus ? "退出模拟" : "开启模拟" } }, [t("ElButton", { attrs: { size: e.headerButtonSize, type: e.headerButtonType, icon: "el-icon-cpu" }, on: { click: e.processSimulation } }, [e._v(" 模拟 ")])], 1) : e._e()], 2), t("ElButtonGroup", { key: "align-control" }, [t("ElTooltip", { attrs: { effect: "light", content: "向左对齐" } }, [t("ElButton", { staticClass: "align align-left", attrs: { size: e.headerButtonSize, icon: "el-icon-s-data" }, on: { click: function(i) {
5436
4592
  return e.elementsAlign("left");
5437
- } } })], 1), t(y, { attrs: { effect: "light", content: "向右对齐" } }, [t(l, { staticClass: "align align-right", attrs: { size: e.headerButtonSize, icon: "el-icon-s-data" }, on: { click: function(n) {
4593
+ } } })], 1), t("ElTooltip", { attrs: { effect: "light", content: "向右对齐" } }, [t("ElButton", { staticClass: "align align-right", attrs: { size: e.headerButtonSize, icon: "el-icon-s-data" }, on: { click: function(i) {
5438
4594
  return e.elementsAlign("right");
5439
- } } })], 1), t(y, { attrs: { effect: "light", content: "向上对齐" } }, [t(l, { staticClass: "align align-top", attrs: { size: e.headerButtonSize, icon: "el-icon-s-data" }, on: { click: function(n) {
4595
+ } } })], 1), t("ElTooltip", { attrs: { effect: "light", content: "向上对齐" } }, [t("ElButton", { staticClass: "align align-top", attrs: { size: e.headerButtonSize, icon: "el-icon-s-data" }, on: { click: function(i) {
5440
4596
  return e.elementsAlign("top");
5441
- } } })], 1), t(y, { attrs: { effect: "light", content: "向下对齐" } }, [t(l, { staticClass: "align align-bottom", attrs: { size: e.headerButtonSize, icon: "el-icon-s-data" }, on: { click: function(n) {
4597
+ } } })], 1), t("ElTooltip", { attrs: { effect: "light", content: "向下对齐" } }, [t("ElButton", { staticClass: "align align-bottom", attrs: { size: e.headerButtonSize, icon: "el-icon-s-data" }, on: { click: function(i) {
5442
4598
  return e.elementsAlign("bottom");
5443
- } } })], 1), t(y, { attrs: { effect: "light", content: "水平居中" } }, [t(l, { staticClass: "align align-center", attrs: { size: e.headerButtonSize, icon: "el-icon-s-data" }, on: { click: function(n) {
4599
+ } } })], 1), t("ElTooltip", { attrs: { effect: "light", content: "水平居中" } }, [t("ElButton", { staticClass: "align align-center", attrs: { size: e.headerButtonSize, icon: "el-icon-s-data" }, on: { click: function(i) {
5444
4600
  return e.elementsAlign("center");
5445
- } } })], 1), t(y, { attrs: { effect: "light", content: "垂直居中" } }, [t(l, { staticClass: "align align-middle", attrs: { size: e.headerButtonSize, icon: "el-icon-s-data" }, on: { click: function(n) {
4601
+ } } })], 1), t("ElTooltip", { attrs: { effect: "light", content: "垂直居中" } }, [t("ElButton", { staticClass: "align align-middle", attrs: { size: e.headerButtonSize, icon: "el-icon-s-data" }, on: { click: function(i) {
5446
4602
  return e.elementsAlign("middle");
5447
- } } })], 1)], 1), t(W, { key: "scale-control" }, [t(y, { attrs: { effect: "light", content: "缩小视图" } }, [t(l, { attrs: { size: e.headerButtonSize, disabled: e.defaultZoom < 0.2, icon: "el-icon-zoom-out" }, on: { click: function(n) {
4603
+ } } })], 1)], 1), t("ElButtonGroup", { key: "scale-control" }, [t("ElTooltip", { attrs: { effect: "light", content: "缩小视图" } }, [t("ElButton", { attrs: { size: e.headerButtonSize, disabled: e.defaultZoom < 0.2, icon: "el-icon-zoom-out" }, on: { click: function(i) {
5448
4604
  return e.processZoomOut();
5449
- } } })], 1), t(l, { attrs: { size: e.headerButtonSize } }, [e._v(e._s(`${Math.floor(e.defaultZoom * 10 * 10)}%`))]), t(y, { attrs: { effect: "light", content: "放大视图" } }, [t(l, { attrs: { size: e.headerButtonSize, disabled: e.defaultZoom > 4, icon: "el-icon-zoom-in" }, on: { click: function(n) {
4605
+ } } })], 1), t("ElButton", { attrs: { size: e.headerButtonSize } }, [e._v(e._s(`${Math.floor(e.defaultZoom * 10 * 10)}%`))]), t("ElTooltip", { attrs: { effect: "light", content: "放大视图" } }, [t("ElButton", { attrs: { size: e.headerButtonSize, disabled: e.defaultZoom > 4, icon: "el-icon-zoom-in" }, on: { click: function(i) {
5450
4606
  return e.processZoomIn();
5451
- } } })], 1), t(y, { attrs: { effect: "light", content: "重置视图并居中" } }, [t(l, { attrs: { size: e.headerButtonSize, icon: "el-icon-c-scale-to-original" }, on: { click: function(n) {
4607
+ } } })], 1), t("ElTooltip", { attrs: { effect: "light", content: "重置视图并居中" } }, [t("ElButton", { attrs: { size: e.headerButtonSize, icon: "el-icon-c-scale-to-original" }, on: { click: function(i) {
5452
4608
  return e.processReZoom();
5453
- } } })], 1)], 1), t(W, { key: "stack-control" }, [t(y, { attrs: { effect: "light", content: "撤销" } }, [t(l, { attrs: { size: e.headerButtonSize, disabled: !e.revocable, icon: "el-icon-refresh-left" }, on: { click: function(n) {
4609
+ } } })], 1)], 1), t("ElButtonGroup", { key: "stack-control" }, [t("ElTooltip", { attrs: { effect: "light", content: "撤销" } }, [t("ElButton", { attrs: { size: e.headerButtonSize, disabled: !e.revocable, icon: "el-icon-refresh-left" }, on: { click: function(i) {
5454
4610
  return e.processUndo();
5455
- } } })], 1), t(y, { attrs: { effect: "light", content: "恢复" } }, [t(l, { attrs: { size: e.headerButtonSize, disabled: !e.recoverable, icon: "el-icon-refresh-right" }, on: { click: function(n) {
4611
+ } } })], 1), t("ElTooltip", { attrs: { effect: "light", content: "恢复" } }, [t("ElButton", { attrs: { size: e.headerButtonSize, disabled: !e.recoverable, icon: "el-icon-refresh-right" }, on: { click: function(i) {
5456
4612
  return e.processRedo();
5457
- } } })], 1), t(y, { attrs: { effect: "light", content: "重新绘制" } }, [t(l, { attrs: { size: e.headerButtonSize, icon: "el-icon-refresh" }, on: { click: e.processRestart } })], 1)], 1)];
5458
- }), 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(N, { staticClass: "flow-dialog", attrs: { title: "预览", width: "60vw", height: "60vh", visible: e.previewModelVisible, "body-padding": !1, "destroy-on-close": "" }, on: { "update:visible": function(n) {
5459
- e.previewModelVisible = n;
5460
- } } }, [t(Le, { attrs: { language: e.previewType, code: e.previewResult } })], 1)], 1);
5461
- }, Cn = [], Tn = /* @__PURE__ */ w(
5462
- En,
5463
- An,
5464
- Cn,
4613
+ } } })], 1), t("ElTooltip", { attrs: { effect: "light", content: "重新绘制" } }, [t("ElButton", { attrs: { size: e.headerButtonSize, icon: "el-icon-refresh" }, on: { click: e.processRestart } })], 1)], 1)];
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) {
4615
+ e.previewModelVisible = i;
4616
+ } } }, [t("HighlightJS", { attrs: { language: e.previewType, code: e.previewResult } })], 1)], 1);
4617
+ }, it = [], rt = /* @__PURE__ */ U(
4618
+ tt,
4619
+ nt,
4620
+ it,
5465
4621
  !1,
5466
4622
  null,
5467
4623
  null
5468
4624
  );
5469
- const Ne = Tn.exports;
5470
- function Fe(i, e, t, n, s, a, r, m, b, P, f, d, v) {
5471
- i = i || {}, n.registerProvider(this), this._contextPad = n, this._modeling = s, this._elementFactory = a, this._connect = r, this._create = m, this._popupMenu = b, this._canvas = P, this._rules = f, this._translate = d, i.autoPlace !== !1 && (this._autoPlace = e.get("autoPlace", !1)), t.on("create.end", 250, function(A) {
5472
- const O = A.context.shape;
5473
- if (!lt(A) || !n.isOpen(O))
5474
- return;
5475
- const g = n.getEntries(O);
5476
- g.replace && g.replace.action.click(A, O);
5477
- });
5478
- }
5479
- Fe.$inject = [
5480
- "config.contextPad",
5481
- "injector",
5482
- "eventBus",
5483
- "contextPad",
5484
- "modeling",
5485
- "elementFactory",
5486
- "connect",
5487
- "create",
5488
- "popupMenu",
5489
- "canvas",
5490
- "rules",
5491
- "translate",
5492
- "elementRegistry"
5493
- ];
5494
- Fe.prototype.getContextPadEntries = function(i) {
5495
- const e = this._contextPad, t = this._modeling, n = this._elementFactory, s = this._connect, a = this._create, r = this._popupMenu, m = this._canvas, b = this._rules, P = this._autoPlace, f = this._translate, d = {};
5496
- if (i.type === "label")
5497
- return d;
5498
- const v = i.businessObject;
5499
- function A(x, k) {
5500
- s.start(x, k);
5501
- }
5502
- function U() {
5503
- t.removeElements([i]);
5504
- }
5505
- function O(x) {
5506
- const _ = m.getContainer(), V = e.getPad(x).html, R = _.getBoundingClientRect(), G = V.getBoundingClientRect(), K = G.top - R.top;
5507
- return {
5508
- x: G.left - R.left,
5509
- y: K + G.height + 5
5510
- };
5511
- }
5512
- function g(x, k, _, V) {
5513
- typeof _ != "string" && (V = _, _ = f("Append {type}", { type: x.replace(/^bpmn:/, "") }));
5514
- function R(K, J) {
5515
- const Z = n.createShape(F({ type: x }, V));
5516
- a.start(K, Z, {
5517
- source: J
5518
- });
5519
- }
5520
- return {
5521
- group: "model",
5522
- className: k,
5523
- title: _,
5524
- action: {
5525
- dragstart: R,
5526
- click: P ? function(K, J) {
5527
- const Z = n.createShape(F({ type: x }, V));
5528
- P.append(J, Z);
5529
- } : R
5530
- }
5531
- };
5532
- }
5533
- function q(x) {
5534
- return function(k, _) {
5535
- t.splitLane(_, x), e.open(_, !0);
5536
- };
5537
- }
5538
- if (ie(v, ["bpmn:Lane", "bpmn:Participant"]) && rt(v)) {
5539
- const x = ot(i);
5540
- F(d, {
5541
- "lane-insert-above": {
5542
- group: "lane-insert-above",
5543
- className: "bpmn-icon-lane-insert-above",
5544
- title: f("Add Lane above"),
5545
- action: {
5546
- click: function(k, _) {
5547
- t.addLane(_, "top");
5548
- }
5549
- }
5550
- }
5551
- }), x.length < 2 && (i.height >= 120 && F(d, {
5552
- "lane-divide-two": {
5553
- group: "lane-divide",
5554
- className: "bpmn-icon-lane-divide-two",
5555
- title: f("Divide into two Lanes"),
5556
- action: {
5557
- click: q(2)
5558
- }
5559
- }
5560
- }), i.height >= 180 && F(d, {
5561
- "lane-divide-three": {
5562
- group: "lane-divide",
5563
- className: "bpmn-icon-lane-divide-three",
5564
- title: f("Divide into three Lanes"),
5565
- action: {
5566
- click: q(3)
5567
- }
5568
- }
5569
- })), F(d, {
5570
- "lane-insert-below": {
5571
- group: "lane-insert-below",
5572
- className: "bpmn-icon-lane-insert-below",
5573
- title: f("Add Lane below"),
5574
- action: {
5575
- click: function(k, _) {
5576
- t.addLane(_, "bottom");
5577
- }
5578
- }
5579
- }
5580
- });
5581
- }
5582
- X(v, "bpmn:FlowNode") && (X(v, "bpmn:EventBasedGateway") ? F(d, {
5583
- "append.receive-task": g("bpmn:ReceiveTask", "bpmn-icon-receive-task", f("Append ReceiveTask")),
5584
- "append.message-intermediate-event": g(
5585
- "bpmn:IntermediateCatchEvent",
5586
- "bpmn-icon-intermediate-event-catch-message",
5587
- f("Append MessageIntermediateCatchEvent"),
5588
- { eventDefinitionType: "bpmn:MessageEventDefinition" }
5589
- ),
5590
- "append.timer-intermediate-event": g(
5591
- "bpmn:IntermediateCatchEvent",
5592
- "bpmn-icon-intermediate-event-catch-timer",
5593
- f("Append TimerIntermediateCatchEvent"),
5594
- { eventDefinitionType: "bpmn:TimerEventDefinition" }
5595
- ),
5596
- "append.condition-intermediate-event": g(
5597
- "bpmn:IntermediateCatchEvent",
5598
- "bpmn-icon-intermediate-event-catch-condition",
5599
- f("Append ConditionIntermediateCatchEvent"),
5600
- { eventDefinitionType: "bpmn:ConditionalEventDefinition" }
5601
- ),
5602
- "append.signal-intermediate-event": g(
5603
- "bpmn:IntermediateCatchEvent",
5604
- "bpmn-icon-intermediate-event-catch-signal",
5605
- f("Append SignalIntermediateCatchEvent"),
5606
- { eventDefinitionType: "bpmn:SignalEventDefinition" }
5607
- )
5608
- }) : Ie(v, "bpmn:BoundaryEvent", "bpmn:CompensateEventDefinition") ? F(d, {
5609
- "append.compensation-activity": g("bpmn:Task", "bpmn-icon-task", f("Append compensation activity"), {
5610
- isForCompensation: !0
5611
- })
5612
- }) : !X(v, "bpmn:EndEvent") && !v.isForCompensation && !Ie(v, "bpmn:IntermediateThrowEvent", "bpmn:LinkEventDefinition") && !at(v) && F(d, {
5613
- "append.end-event": g("bpmn:EndEvent", "bpmn-icon-end-event-none", f("Append EndEvent")),
5614
- "append.gateway": g("bpmn:ExclusiveGateway", "bpmn-icon-gateway-none", f("Append Gateway")),
5615
- "append.append-task": g("bpmn:UserTask", "bpmn-icon-user-task", f("Append Task")),
5616
- "append.intermediate-event": g(
5617
- "bpmn:IntermediateThrowEvent",
5618
- "bpmn-icon-intermediate-event-none",
5619
- f("Append Intermediate/Boundary Event")
5620
- )
5621
- })), r.isEmpty(i, "bpmn-replace") || F(d, {
5622
- replace: {
5623
- group: "edit",
5624
- className: "bpmn-icon-screw-wrench",
5625
- title: f("Change type"),
5626
- action: {
5627
- click: function(x, k) {
5628
- const _ = F(O(k), {
5629
- cursor: { x: x.x, y: x.y }
5630
- });
5631
- r.open(k, "bpmn-replace", _);
5632
- }
5633
- }
5634
- }
5635
- }), ie(v, ["bpmn:FlowNode", "bpmn:InteractionNode", "bpmn:DataObjectReference", "bpmn:DataStoreReference"]) && F(d, {
5636
- "append.text-annotation": g("bpmn:TextAnnotation", "bpmn-icon-text-annotation"),
5637
- connect: {
5638
- group: "connect",
5639
- className: "bpmn-icon-connection-multi",
5640
- title: f(`Connect using ${v.isForCompensation ? "" : "Sequence/MessageFlow or "}Association`),
5641
- action: {
5642
- click: A,
5643
- dragstart: A
5644
- }
5645
- }
5646
- }), ie(v, ["bpmn:DataObjectReference", "bpmn:DataStoreReference"]) && F(d, {
5647
- connect: {
5648
- group: "connect",
5649
- className: "bpmn-icon-connection-multi",
5650
- title: f("Connect using DataInputAssociation"),
5651
- action: {
5652
- click: A,
5653
- dragstart: A
5654
- }
5655
- }
5656
- }), X(v, "bpmn:Group") && F(d, {
5657
- "append.text-annotation": g("bpmn:TextAnnotation", "bpmn-icon-text-annotation")
5658
- });
5659
- let M = b.allowed("elements.delete", { elements: [i] });
5660
- return it(M) && (M = M[0] === i), M && F(d, {
5661
- delete: {
5662
- group: "edit",
5663
- className: "bpmn-icon-trash",
5664
- title: f("Remove"),
5665
- action: {
5666
- click: U
5667
- }
5668
- }
5669
- }), d;
5670
- };
5671
- function Ie(i, e, t) {
5672
- const n = i.$instanceOf(e);
5673
- let s = !1;
5674
- const a = i.eventDefinitions || [];
5675
- return st(a, function(r) {
5676
- r.$type === t && (s = !0);
5677
- }), n && s;
5678
- }
5679
- const wn = {
5680
- __init__: ["contextPadProvider"],
5681
- contextPadProvider: ["type", Fe]
5682
- };
5683
- function j(i, e, t, n, s, a, r, m, b) {
5684
- $e.call(this, i, e, t, n, s, a, r, m, b, 2e3), this._create = e, this._elementFactory = t, this._spaceTool = n, this._lassoTool = s, this._handTool = a, this._globalConnect = r, this._moddle = m, this._translate = b;
5685
- }
5686
- const Se = function() {
5687
- };
5688
- Se.prototype = $e.prototype;
5689
- Se.prototype.getPaletteEntries = function() {
5690
- const i = {}, e = this._create, t = this._elementFactory, n = this._spaceTool, s = this._lassoTool, a = this._handTool, r = this._globalConnect, m = this._translate;
5691
- function b(d, v, A, U, O) {
5692
- function g(M) {
5693
- const x = t.createShape(F({ type: d }, O));
5694
- d === "bpmn:UserTask" && (x.businessObject.candidateUsers = "${handlers}"), e.start(M, x);
5695
- }
5696
- const q = d.replace(/^bpmn:/, "");
5697
- return {
5698
- group: v,
5699
- className: A,
5700
- title: U || m("Create {type}", { type: q }),
5701
- action: {
5702
- dragstart: g,
5703
- click: g
5704
- }
5705
- };
5706
- }
5707
- function P(d) {
5708
- const v = t.createShape({
5709
- type: "bpmn:SubProcess",
5710
- x: 0,
5711
- y: 0,
5712
- isExpanded: !0
5713
- }), A = t.createShape({
5714
- type: "bpmn:StartEvent",
5715
- x: 40,
5716
- y: 82,
5717
- parent: v
5718
- });
5719
- e.start(d, [v, A], {
5720
- hints: {
5721
- autoSelect: [A]
5722
- }
5723
- });
5724
- }
5725
- function f(d) {
5726
- e.start(d, t.createParticipantShape());
5727
- }
5728
- return F(i, {
5729
- "hand-tool": {
5730
- group: "tools",
5731
- className: "bpmn-icon-hand-tool",
5732
- title: m("Activate the hand tool"),
5733
- action: {
5734
- click: function(d) {
5735
- a.activateHand(d);
5736
- }
5737
- }
5738
- },
5739
- "lasso-tool": {
5740
- group: "tools",
5741
- className: "bpmn-icon-lasso-tool",
5742
- title: m("Activate the lasso tool"),
5743
- action: {
5744
- click: function(d) {
5745
- s.activateSelection(d);
5746
- }
5747
- }
5748
- },
5749
- "space-tool": {
5750
- group: "tools",
5751
- className: "bpmn-icon-space-tool",
5752
- title: m("Activate the create/remove space tool"),
5753
- action: {
5754
- click: function(d) {
5755
- n.activateSelection(d);
5756
- }
5757
- }
5758
- },
5759
- "global-connect-tool": {
5760
- group: "tools",
5761
- className: "bpmn-icon-connection-multi",
5762
- title: m("Activate the global connect tool"),
5763
- action: {
5764
- click: function(d) {
5765
- r.toggle(d);
5766
- }
5767
- }
5768
- },
5769
- "tool-separator": { group: "tools", separator: !0 },
5770
- "create.start-event": b("bpmn:StartEvent", "event", "bpmn-icon-start-event-none", m("Create StartEvent")),
5771
- "create.intermediate-event": b(
5772
- "bpmn:IntermediateThrowEvent",
5773
- "event",
5774
- "bpmn-icon-intermediate-event-none",
5775
- m("Create Intermediate/Boundary Event")
5776
- ),
5777
- "create.user-task": b("bpmn:UserTask", "activity", "bpmn-icon-user-task", m("Create User Task")),
5778
- "create.exclusive-gateway": b("bpmn:ExclusiveGateway", "activity", "bpmn-icon-gateway-none", m("Create Gateway")),
5779
- "create.end-event": b("bpmn:EndEvent", "activity", "bpmn-icon-end-event-none", m("Create EndEvent")),
5780
- // 'create.sql-task': createAction('user:MySql', 'activity', 'bpmn-icon-mysql', 'MySQL 节点'),
5781
- // 'create.data-object': createAction('bpmn:DataObjectReference', 'data-object', 'bpmn-icon-data-object', translate('Create DataObjectReference')),
5782
- // 'create.data-store': createAction('bpmn:DataStoreReference', 'data-store', 'bpmn-icon-data-store', translate('Create DataStoreReference')),
5783
- "activity-separator": { group: "activity", separator: !0 },
5784
- "create.subprocess-expanded": {
5785
- group: "activity",
5786
- className: "bpmn-icon-subprocess-expanded",
5787
- title: m("Create expanded SubProcess"),
5788
- action: {
5789
- dragstart: P,
5790
- click: P
5791
- }
5792
- },
5793
- "create.participant-expanded": {
5794
- group: "collaboration",
5795
- className: "bpmn-icon-participant",
5796
- title: m("Create Pool/Participant"),
5797
- action: {
5798
- dragstart: f,
5799
- click: f
5800
- }
5801
- }
5802
- // 'create.group': createAction('bpmn:Group', 'artifact', 'bpmn-icon-group', translate('Create Group'))
5803
- }), i;
5804
- };
5805
- j.$inject = ["palette", "create", "elementFactory", "spaceTool", "lassoTool", "handTool", "globalConnect", "moddle", "translate"];
5806
- j.prototype = new Se();
5807
- j.prototype.constructor = j;
5808
- const kn = {
5809
- __init__: ["customPalette"],
5810
- customPalette: ["type", j]
5811
- };
5812
- function Ue(i, e) {
5813
- ye.call(this, i, e, 3e3), i.on("autoPlace", 3e3, function(t) {
5814
- const n = t.shape, s = t.source;
5815
- return $n(s, n);
5816
- }), this.append = function(t, n, s) {
5817
- i.fire("autoPlace.start", {
5818
- source: t,
5819
- shape: n
5820
- });
5821
- const a = i.fire("autoPlace", {
5822
- source: t,
5823
- shape: n
5824
- });
5825
- console.log("hints", s, "position", a);
5826
- const r = e.appendShape(t, n, a, t.parent, s);
5827
- return i.fire("autoPlace.end", {
5828
- source: t,
5829
- shape: r
5830
- }), r;
5831
- };
5832
- }
5833
- function In(i) {
5834
- return {
5835
- top: i.y,
5836
- right: i.x + (i.width || 0),
5837
- bottom: i.y + (i.height || 0),
5838
- left: i.x
5839
- };
5840
- }
5841
- function Ln(i) {
5842
- return {
5843
- x: Math.round(i.x),
5844
- y: Math.round(i.y)
5845
- };
5846
- }
5847
- function Pn(i) {
5848
- return Ln({
5849
- x: i.x + (i.width || 0) / 2,
5850
- y: i.y + (i.height || 0) / 2
5851
- });
5852
- }
5853
- function $n(i, e, t) {
5854
- t || (t = {});
5855
- const n = t.defaultDistance || 50, s = Pn(i), a = In(i);
5856
- return {
5857
- x: s.x,
5858
- y: a.bottom + n + e.height / 2
5859
- };
5860
- }
5861
- const qe = function() {
5862
- };
5863
- qe.prototype = ye.prototype;
5864
- Ue.prototype = new qe();
5865
- Ue.prototype.constructor = ye;
5866
- const On = 200, Mn = 100;
5867
- function Ge(i, e, t) {
5868
- i.on("autoPlace", Mn, function(n) {
5869
- const s = n.shape, a = n.source;
5870
- return Dn(a, s);
5871
- }), i.on("autoPlace.end", function(n) {
5872
- t.scrollToElement(n.shape);
5873
- }), this.append = function(n, s, a) {
5874
- i.fire("autoPlace.start", {
5875
- source: n,
5876
- shape: s
5877
- });
5878
- const r = i.fire("autoPlace", {
5879
- source: n,
5880
- shape: s
5881
- }), m = e.appendShape(n, s, r, n.parent, a);
5882
- return i.fire("autoPlace.end", {
5883
- source: n,
5884
- shape: m
5885
- }), m;
5886
- };
5887
- }
5888
- Ge.$inject = ["eventBus", "modeling", "canvas"];
5889
- function Dn(i, e) {
5890
- const t = On, n = pt(i);
5891
- return {
5892
- x: mt(i).right + t + e.width / 2,
5893
- y: n.y
5894
- };
5895
- }
5896
- const Bn = {
5897
- __init__: ["autoPlaceSelectionBehavior"],
5898
- autoPlace: ["type", Ge]
5899
- }, zn = {
4625
+ const at = rt.exports, st = {
5900
4626
  name: "FlowDesigner",
5901
4627
  components: {
5902
- PropertiesPanel: Re,
5903
- ProcessDesigner: Ne
4628
+ PropertiesPanel: Ve,
4629
+ ProcessDesigner: at
5904
4630
  },
5905
4631
  props: {
5906
4632
  /**
@@ -5942,42 +4668,42 @@ const Bn = {
5942
4668
  labelVisible: !1,
5943
4669
  prefix: "flowable",
5944
4670
  headerButtonSize: "mini",
5945
- additionalModel: ee([wn, kn, Bn])
4671
+ additionalModel: R([xe, Ie, Oe])
5946
4672
  }
5947
4673
  };
5948
4674
  },
5949
4675
  methods: {
5950
- initModeler(i) {
5951
- this.modeler = i;
4676
+ initModeler(n) {
4677
+ this.modeler = n;
5952
4678
  },
5953
4679
  async refresh() {
5954
4680
  await this.$nextTick(), await this.$refs.processDesigner.createNewDiagram(this.value);
5955
4681
  }
5956
4682
  }
5957
4683
  };
5958
- var Vn = function() {
4684
+ var ot = function() {
5959
4685
  var e = this, t = e._self._c;
5960
- return t("div", { staticClass: "flow-designer" }, [t(Ne, e._b({ key: `designer-${e.reloadIndex}`, ref: "processDesigner", attrs: { value: e.value, "extend-types": e.extendTypes, options: {
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: {
5961
4687
  taskResizingEnabled: !0,
5962
4688
  eventResizingEnabled: !0
5963
- }, keyboard: "" }, on: { input: (n) => e.$emit("input", n), "init-finished": e.initModeler }, scopedSlots: e._u([{ key: "toolbar-buttons", fn: function() {
4689
+ }, keyboard: "" }, on: { input: (i) => e.$emit("input", i), "init-finished": e.initModeler }, scopedSlots: e._u([{ key: "toolbar-buttons", fn: function() {
5964
4690
  return [e._t("toolbar-buttons", null, { modeler: e.modeler })];
5965
- }, proxy: !0 }], null, !0) }, "ProcessDesigner", e.controlForm, !1)), e.usePanel && (e.useTabs === null || e.useTabs === void 0 || e.useTabs.length > 0) ? t(Re, { 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: n, bpmnInstances: s, element: a, type: r }) {
5966
- return [e._t("task", null, { id: n, bpmnInstances: s, element: a, type: r })];
5967
- } }, { key: "form", fn: function({ id: n, bpmnInstances: s, element: a, type: r }) {
5968
- return [e._t("form", null, { id: n, bpmnInstances: s, element: a, type: r })];
5969
- } }, { key: "extend", fn: function({ id: n, bpmnInstances: s, element: a, type: r }) {
5970
- return [e._t("extend", null, { id: n, bpmnInstances: s, element: a, type: r })];
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 })];
5971
4697
  } }], null, !0) }) : e._e()], 1);
5972
- }, Rn = [], jn = /* @__PURE__ */ w(
5973
- zn,
5974
- Vn,
5975
- Rn,
4698
+ }, lt = [], pt = /* @__PURE__ */ U(
4699
+ st,
4700
+ ot,
4701
+ lt,
5976
4702
  !1,
5977
4703
  null,
5978
4704
  null
5979
4705
  );
5980
- const Pi = jn.exports;
4706
+ const Ft = pt.exports;
5981
4707
  export {
5982
- Pi as default
4708
+ Ft as default
5983
4709
  };