@web-utils/component 3.3.3 → 3.3.4

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.
@@ -1,61 +1,61 @@
1
- var ge = Object.defineProperty, ve = Object.defineProperties;
1
+ var ve = Object.defineProperty, ge = Object.defineProperties;
2
2
  var Ee = Object.getOwnPropertyDescriptors;
3
3
  var Q = Object.getOwnPropertySymbols;
4
4
  var Fe = Object.prototype.hasOwnProperty, xe = Object.prototype.propertyIsEnumerable;
5
- var ee = (i, e, t) => e in i ? ge(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, u = (i, e) => {
5
+ var ee = (n, e, t) => e in n ? ve(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, u = (n, e) => {
6
6
  for (var t in e || (e = {}))
7
- Fe.call(e, t) && ee(i, t, e[t]);
7
+ Fe.call(e, t) && ee(n, t, e[t]);
8
8
  if (Q)
9
9
  for (var t of Q(e))
10
- xe.call(e, t) && ee(i, t, e[t]);
11
- return i;
12
- }, T = (i, e) => ve(i, Ee(e));
13
- var d = (i, e, t) => new Promise((n, s) => {
14
- var r = (m) => {
10
+ xe.call(e, t) && ee(n, t, e[t]);
11
+ return n;
12
+ }, T = (n, e) => ge(n, Ee(e));
13
+ var d = (n, e, t) => new Promise((i, s) => {
14
+ var a = (p) => {
15
15
  try {
16
- o(t.next(m));
16
+ o(t.next(p));
17
17
  } catch (F) {
18
18
  s(F);
19
19
  }
20
- }, a = (m) => {
20
+ }, r = (p) => {
21
21
  try {
22
- o(t.throw(m));
22
+ o(t.throw(p));
23
23
  } catch (F) {
24
24
  s(F);
25
25
  }
26
- }, o = (m) => m.done ? n(m.value) : Promise.resolve(m.value).then(r, a);
27
- o((t = t.apply(i, e)).next());
26
+ }, o = (p) => p.done ? i(p.value) : Promise.resolve(p.value).then(a, r);
27
+ o((t = t.apply(n, e)).next());
28
28
  });
29
- import { assign as y, isArray as Se, forEach as Te, isObject as Ce, isFunction as Ie, some as A } from "min-dash";
30
- import { is as V } from "bpmn-js/lib/util/ModelUtil";
31
- import { isExpanded as ke, isEventSubProcess as Ae } from "bpmn-js/lib/util/DiUtil";
29
+ import { assign as y, isArray as Se, forEach as Te, isObject as Ce, isFunction as ke, some as _ } from "min-dash";
30
+ import { is as R } from "bpmn-js/lib/util/ModelUtil";
31
+ import { isExpanded as Ie, isEventSubProcess as _e } from "bpmn-js/lib/util/DiUtil";
32
32
  import { isAny as N } from "bpmn-js/lib/features/modeling/util/ModelingUtil";
33
- import { getChildLanes as _e } from "bpmn-js/lib/features/modeling/util/LaneUtil";
34
- import { hasPrimaryModifier as we } from "diagram-js/lib/util/Mouse";
33
+ import { getChildLanes as we } from "bpmn-js/lib/features/modeling/util/LaneUtil";
34
+ import { hasPrimaryModifier as Ae } from "diagram-js/lib/util/Mouse";
35
35
  import oe from "bpmn-js/lib/features/palette/PaletteProvider";
36
36
  import K from "diagram-js/lib/features/auto-place/AutoPlace";
37
37
  import { getMid as $e, asTRBL as Le } from "diagram-js/lib/layout/LayoutUtil";
38
- import { fastClone as v, isBlank as Oe, isArray as te } from "@web-utils/core";
38
+ import { fastClone as g, isBlank as Oe, capitalize as Pe, isArray as te } from "@web-utils/core";
39
39
  import { n as h } from "../chunks/_plugin-vue2_normalizer.JwmUNtgn.mjs";
40
40
  import "bpmn-js/dist/assets/bpmn-js.css";
41
41
  import "bpmn-js/dist/assets/diagram-js.css";
42
42
  import "bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css";
43
43
  import "bpmn-js-token-simulation/assets/css/bpmn-js-token-simulation.css";
44
- import Pe from "bpmn-js/lib/Modeler";
45
- import Me from "bpmn-js/lib/features/drilldown/index.js";
46
- import De from "bpmn-js-token-simulation";
47
- import Be from "x2js";
44
+ import Me from "bpmn-js/lib/Modeler";
45
+ import De from "bpmn-js/lib/features/drilldown/index.js";
46
+ import Be from "bpmn-js-token-simulation";
47
+ import Ve from "x2js";
48
48
  import le from "highlight.js/lib/core";
49
49
  import Re from "highlight.js/lib/languages/xml";
50
- import Ve from "highlight.js/lib/languages/json";
50
+ import ze from "highlight.js/lib/languages/json";
51
51
  import je from "../highlight-j-s/index.mjs";
52
52
  import "../highlight-j-s/style.css";
53
- function J(i, e, t, n, s, r, a, o, m, F, p, l, c) {
54
- i = i || {}, n.registerProvider(this), this._contextPad = n, this._modeling = s, this._elementFactory = r, this._connect = a, this._create = o, this._popupMenu = m, this._canvas = F, this._rules = p, this._translate = l, i.autoPlace !== !1 && (this._autoPlace = e.get("autoPlace", !1)), t.on("create.end", 250, function(E) {
53
+ function J(n, e, t, i, s, a, r, o, p, F, m, l, c) {
54
+ n = n || {}, i.registerProvider(this), this._contextPad = i, this._modeling = s, this._elementFactory = a, this._connect = r, this._create = o, this._popupMenu = p, this._canvas = F, this._rules = m, this._translate = l, n.autoPlace !== !1 && (this._autoPlace = e.get("autoPlace", !1)), t.on("create.end", 250, function(E) {
55
55
  const C = E.context.shape;
56
- if (!we(E) || !n.isOpen(C))
56
+ if (!Ae(E) || !i.isOpen(C))
57
57
  return;
58
- const f = n.getEntries(C);
58
+ const f = i.getEntries(C);
59
59
  f.replace && f.replace.action.click(E, C);
60
60
  });
61
61
  }
@@ -74,77 +74,77 @@ J.$inject = [
74
74
  "translate",
75
75
  "elementRegistry"
76
76
  ];
77
- J.prototype.getContextPadEntries = function(i) {
78
- const e = this._contextPad, t = this._modeling, n = this._elementFactory, s = this._connect, r = this._create, a = this._popupMenu, o = this._canvas, m = this._rules, F = this._autoPlace, p = this._translate, l = {};
79
- if (i.type === "label")
77
+ J.prototype.getContextPadEntries = function(n) {
78
+ const e = this._contextPad, t = this._modeling, i = this._elementFactory, s = this._connect, a = this._create, r = this._popupMenu, o = this._canvas, p = this._rules, F = this._autoPlace, m = this._translate, l = {};
79
+ if (n.type === "label")
80
80
  return l;
81
- const c = i.businessObject;
81
+ const c = n.businessObject;
82
82
  function E(b, S) {
83
83
  s.start(b, S);
84
84
  }
85
85
  function O() {
86
- t.removeElements([i]);
86
+ t.removeElements([n]);
87
87
  }
88
88
  function C(b) {
89
- const g = o.getContainer(), w = e.getPad(b).html, $ = g.getBoundingClientRect(), M = w.getBoundingClientRect(), D = M.top - $.top;
89
+ const v = o.getContainer(), A = e.getPad(b).html, $ = v.getBoundingClientRect(), M = A.getBoundingClientRect(), D = M.top - $.top;
90
90
  return {
91
91
  x: M.left - $.left,
92
92
  y: D + M.height + 5
93
93
  };
94
94
  }
95
- function f(b, S, g, w) {
96
- typeof g != "string" && (w = g, g = p("Append {type}", { type: b.replace(/^bpmn:/, "") }));
95
+ function f(b, S, v, A) {
96
+ typeof v != "string" && (A = v, v = m("Append {type}", { type: b.replace(/^bpmn:/, "") }));
97
97
  function $(D, B) {
98
- const R = n.createShape(y({ type: b }, w));
99
- r.start(D, R, {
98
+ const V = i.createShape(y({ type: b }, A));
99
+ a.start(D, V, {
100
100
  source: B
101
101
  });
102
102
  }
103
103
  return {
104
104
  group: "model",
105
105
  className: S,
106
- title: g,
106
+ title: v,
107
107
  action: {
108
108
  dragstart: $,
109
109
  click: F ? function(D, B) {
110
- const R = n.createShape(y({ type: b }, w));
111
- F.append(B, R);
110
+ const V = i.createShape(y({ type: b }, A));
111
+ F.append(B, V);
112
112
  } : $
113
113
  }
114
114
  };
115
115
  }
116
116
  function P(b) {
117
- return function(S, g) {
118
- t.splitLane(g, b), e.open(g, !0);
117
+ return function(S, v) {
118
+ t.splitLane(v, b), e.open(v, !0);
119
119
  };
120
120
  }
121
- if (N(c, ["bpmn:Lane", "bpmn:Participant"]) && ke(c)) {
122
- const b = _e(i);
121
+ if (N(c, ["bpmn:Lane", "bpmn:Participant"]) && Ie(c)) {
122
+ const b = we(n);
123
123
  y(l, {
124
124
  "lane-insert-above": {
125
125
  group: "lane-insert-above",
126
126
  className: "bpmn-icon-lane-insert-above",
127
- title: p("Add Lane above"),
127
+ title: m("Add Lane above"),
128
128
  action: {
129
- click: function(S, g) {
130
- t.addLane(g, "top");
129
+ click: function(S, v) {
130
+ t.addLane(v, "top");
131
131
  }
132
132
  }
133
133
  }
134
- }), b.length < 2 && (i.height >= 120 && y(l, {
134
+ }), b.length < 2 && (n.height >= 120 && y(l, {
135
135
  "lane-divide-two": {
136
136
  group: "lane-divide",
137
137
  className: "bpmn-icon-lane-divide-two",
138
- title: p("Divide into two Lanes"),
138
+ title: m("Divide into two Lanes"),
139
139
  action: {
140
140
  click: P(2)
141
141
  }
142
142
  }
143
- }), i.height >= 180 && y(l, {
143
+ }), n.height >= 180 && y(l, {
144
144
  "lane-divide-three": {
145
145
  group: "lane-divide",
146
146
  className: "bpmn-icon-lane-divide-three",
147
- title: p("Divide into three Lanes"),
147
+ title: m("Divide into three Lanes"),
148
148
  action: {
149
149
  click: P(3)
150
150
  }
@@ -153,74 +153,74 @@ J.prototype.getContextPadEntries = function(i) {
153
153
  "lane-insert-below": {
154
154
  group: "lane-insert-below",
155
155
  className: "bpmn-icon-lane-insert-below",
156
- title: p("Add Lane below"),
156
+ title: m("Add Lane below"),
157
157
  action: {
158
- click: function(S, g) {
159
- t.addLane(g, "bottom");
158
+ click: function(S, v) {
159
+ t.addLane(v, "bottom");
160
160
  }
161
161
  }
162
162
  }
163
163
  });
164
164
  }
165
- V(c, "bpmn:FlowNode") && (V(c, "bpmn:EventBasedGateway") ? y(l, {
165
+ R(c, "bpmn:FlowNode") && (R(c, "bpmn:EventBasedGateway") ? y(l, {
166
166
  "append.receive-task": f(
167
167
  "bpmn:ReceiveTask",
168
168
  "bpmn-icon-receive-task",
169
- p("Append ReceiveTask")
169
+ m("Append ReceiveTask")
170
170
  ),
171
171
  "append.message-intermediate-event": f(
172
172
  "bpmn:IntermediateCatchEvent",
173
173
  "bpmn-icon-intermediate-event-catch-message",
174
- p("Append MessageIntermediateCatchEvent"),
174
+ m("Append MessageIntermediateCatchEvent"),
175
175
  { eventDefinitionType: "bpmn:MessageEventDefinition" }
176
176
  ),
177
177
  "append.timer-intermediate-event": f(
178
178
  "bpmn:IntermediateCatchEvent",
179
179
  "bpmn-icon-intermediate-event-catch-timer",
180
- p("Append TimerIntermediateCatchEvent"),
180
+ m("Append TimerIntermediateCatchEvent"),
181
181
  { eventDefinitionType: "bpmn:TimerEventDefinition" }
182
182
  ),
183
183
  "append.condition-intermediate-event": f(
184
184
  "bpmn:IntermediateCatchEvent",
185
185
  "bpmn-icon-intermediate-event-catch-condition",
186
- p("Append ConditionIntermediateCatchEvent"),
186
+ m("Append ConditionIntermediateCatchEvent"),
187
187
  { eventDefinitionType: "bpmn:ConditionalEventDefinition" }
188
188
  ),
189
189
  "append.signal-intermediate-event": f(
190
190
  "bpmn:IntermediateCatchEvent",
191
191
  "bpmn-icon-intermediate-event-catch-signal",
192
- p("Append SignalIntermediateCatchEvent"),
192
+ m("Append SignalIntermediateCatchEvent"),
193
193
  { eventDefinitionType: "bpmn:SignalEventDefinition" }
194
194
  )
195
195
  }) : ne(c, "bpmn:BoundaryEvent", "bpmn:CompensateEventDefinition") ? y(l, {
196
196
  "append.compensation-activity": f(
197
197
  "bpmn:Task",
198
198
  "bpmn-icon-task",
199
- p("Append compensation activity"),
199
+ m("Append compensation activity"),
200
200
  {
201
201
  isForCompensation: !0
202
202
  }
203
203
  )
204
- }) : !V(c, "bpmn:EndEvent") && !c.isForCompensation && !ne(c, "bpmn:IntermediateThrowEvent", "bpmn:LinkEventDefinition") && !Ae(c) && y(l, {
205
- "append.end-event": f("bpmn:EndEvent", "bpmn-icon-end-event-none", p("Append EndEvent")),
206
- "append.gateway": f("bpmn:ExclusiveGateway", "bpmn-icon-gateway-none", p("Append Gateway")),
207
- "append.append-task": f("bpmn:UserTask", "bpmn-icon-user-task", p("Append Task")),
204
+ }) : !R(c, "bpmn:EndEvent") && !c.isForCompensation && !ne(c, "bpmn:IntermediateThrowEvent", "bpmn:LinkEventDefinition") && !_e(c) && y(l, {
205
+ "append.end-event": f("bpmn:EndEvent", "bpmn-icon-end-event-none", m("Append EndEvent")),
206
+ "append.gateway": f("bpmn:ExclusiveGateway", "bpmn-icon-gateway-none", m("Append Gateway")),
207
+ "append.append-task": f("bpmn:UserTask", "bpmn-icon-user-task", m("Append Task")),
208
208
  "append.intermediate-event": f(
209
209
  "bpmn:IntermediateThrowEvent",
210
210
  "bpmn-icon-intermediate-event-none",
211
- p("Append Intermediate/Boundary Event")
211
+ m("Append Intermediate/Boundary Event")
212
212
  )
213
- })), a.isEmpty(i, "bpmn-replace") || y(l, {
213
+ })), r.isEmpty(n, "bpmn-replace") || y(l, {
214
214
  replace: {
215
215
  group: "edit",
216
216
  className: "bpmn-icon-screw-wrench",
217
- title: p("Change type"),
217
+ title: m("Change type"),
218
218
  action: {
219
219
  click: function(b, S) {
220
- const g = y(C(S), {
220
+ const v = y(C(S), {
221
221
  cursor: { x: b.x, y: b.y }
222
222
  });
223
- a.open(S, "bpmn-replace", g);
223
+ r.open(S, "bpmn-replace", v);
224
224
  }
225
225
  }
226
226
  }
@@ -234,7 +234,7 @@ J.prototype.getContextPadEntries = function(i) {
234
234
  connect: {
235
235
  group: "connect",
236
236
  className: "bpmn-icon-connection-multi",
237
- title: p(
237
+ title: m(
238
238
  `Connect using ${c.isForCompensation ? "" : "Sequence/MessageFlow or "}Association`
239
239
  ),
240
240
  action: {
@@ -246,63 +246,63 @@ J.prototype.getContextPadEntries = function(i) {
246
246
  connect: {
247
247
  group: "connect",
248
248
  className: "bpmn-icon-connection-multi",
249
- title: p("Connect using DataInputAssociation"),
249
+ title: m("Connect using DataInputAssociation"),
250
250
  action: {
251
251
  click: E,
252
252
  dragstart: E
253
253
  }
254
254
  }
255
- }), V(c, "bpmn:Group") && y(l, {
255
+ }), R(c, "bpmn:Group") && y(l, {
256
256
  "append.text-annotation": f("bpmn:TextAnnotation", "bpmn-icon-text-annotation")
257
257
  });
258
- let I = m.allowed("elements.delete", { elements: [i] });
259
- return Se(I) && (I = I[0] === i), I && y(l, {
258
+ let k = p.allowed("elements.delete", { elements: [n] });
259
+ return Se(k) && (k = k[0] === n), k && y(l, {
260
260
  delete: {
261
261
  group: "edit",
262
262
  className: "bpmn-icon-trash",
263
- title: p("Remove"),
263
+ title: m("Remove"),
264
264
  action: {
265
265
  click: O
266
266
  }
267
267
  }
268
268
  }), l;
269
269
  };
270
- function ne(i, e, t) {
271
- const n = i.$instanceOf(e);
270
+ function ne(n, e, t) {
271
+ const i = n.$instanceOf(e);
272
272
  let s = !1;
273
- const r = i.eventDefinitions || [];
274
- return Te(r, function(a) {
275
- a.$type === t && (s = !0);
276
- }), n && s;
273
+ const a = n.eventDefinitions || [];
274
+ return Te(a, function(r) {
275
+ r.$type === t && (s = !0);
276
+ }), i && s;
277
277
  }
278
- const ze = {
278
+ const Ue = {
279
279
  __init__: ["contextPadProvider"],
280
280
  contextPadProvider: ["type", J]
281
281
  };
282
- function L(i, e, t, n, s, r, a, o, m) {
282
+ function L(n, e, t, i, s, a, r, o, p) {
283
283
  oe.call(
284
284
  this,
285
- i,
285
+ n,
286
286
  e,
287
287
  t,
288
- n,
288
+ i,
289
289
  s,
290
- r,
291
290
  a,
291
+ r,
292
292
  o,
293
- m,
293
+ p,
294
294
  2e3
295
- ), this._create = e, this._elementFactory = t, this._spaceTool = n, this._lassoTool = s, this._handTool = r, this._globalConnect = a, this._moddle = o, this._translate = m;
295
+ ), this._create = e, this._elementFactory = t, this._spaceTool = i, this._lassoTool = s, this._handTool = a, this._globalConnect = r, this._moddle = o, this._translate = p;
296
296
  }
297
297
  const Z = function() {
298
298
  };
299
299
  Z.prototype = oe.prototype;
300
300
  Z.prototype.getPaletteEntries = function() {
301
- const i = {}, e = this._create, t = this._elementFactory, n = this._spaceTool, s = this._lassoTool, r = this._handTool, a = this._globalConnect, o = this._translate;
302
- function m(l, c, E, O, C) {
303
- function f(I) {
301
+ const n = {}, e = this._create, t = this._elementFactory, i = this._spaceTool, s = this._lassoTool, a = this._handTool, r = this._globalConnect, o = this._translate;
302
+ function p(l, c, E, O, C) {
303
+ function f(k) {
304
304
  const b = t.createShape(y({ type: l }, C));
305
- C && (b.businessObject.di.isExpanded = C.isExpanded), e.start(I, b);
305
+ l === "bpmn:UserTask" && (b.businessObject.candidateUsers = "${handlers}"), C && (b.businessObject.di.isExpanded = C.isExpanded), e.start(k, b);
306
306
  }
307
307
  const P = l.replace(/^bpmn:/, "");
308
308
  return {
@@ -333,17 +333,17 @@ Z.prototype.getPaletteEntries = function() {
333
333
  }
334
334
  });
335
335
  }
336
- function p(l) {
336
+ function m(l) {
337
337
  e.start(l, t.createParticipantShape());
338
338
  }
339
- return y(i, {
339
+ return y(n, {
340
340
  "hand-tool": {
341
341
  group: "tools",
342
342
  className: "bpmn-icon-hand-tool",
343
343
  title: o("Activate the hand tool"),
344
344
  action: {
345
345
  click: function(l) {
346
- r.activateHand(l);
346
+ a.activateHand(l);
347
347
  }
348
348
  }
349
349
  },
@@ -363,7 +363,7 @@ Z.prototype.getPaletteEntries = function() {
363
363
  title: o("Activate the create/remove space tool"),
364
364
  action: {
365
365
  click: function(l) {
366
- n.activateSelection(l);
366
+ i.activateSelection(l);
367
367
  }
368
368
  }
369
369
  },
@@ -373,31 +373,31 @@ Z.prototype.getPaletteEntries = function() {
373
373
  title: o("Activate the global connect tool"),
374
374
  action: {
375
375
  click: function(l) {
376
- a.toggle(l);
376
+ r.toggle(l);
377
377
  }
378
378
  }
379
379
  },
380
380
  "tool-separator": { group: "tools", separator: !0 },
381
- "create.start-event": m(
381
+ "create.start-event": p(
382
382
  "bpmn:StartEvent",
383
383
  "event",
384
384
  "bpmn-icon-start-event-none",
385
385
  o("Create StartEvent")
386
386
  ),
387
- "create.intermediate-event": m(
387
+ "create.intermediate-event": p(
388
388
  "bpmn:IntermediateThrowEvent",
389
389
  "event",
390
390
  "bpmn-icon-intermediate-event-none",
391
391
  o("Create Intermediate/Boundary Event")
392
392
  ),
393
- "create.user-task": m("bpmn:UserTask", "activity", "bpmn-icon-user-task", o("Create User Task")),
394
- "create.exclusive-gateway": m(
393
+ "create.user-task": p("bpmn:UserTask", "activity", "bpmn-icon-user-task", o("Create User Task")),
394
+ "create.exclusive-gateway": p(
395
395
  "bpmn:ExclusiveGateway",
396
396
  "activity",
397
397
  "bpmn-icon-gateway-none",
398
398
  o("Create Gateway")
399
399
  ),
400
- "create.end-event": m(
400
+ "create.end-event": p(
401
401
  "bpmn:EndEvent",
402
402
  "activity",
403
403
  "bpmn-icon-end-event-none",
@@ -421,12 +421,12 @@ Z.prototype.getPaletteEntries = function() {
421
421
  className: "bpmn-icon-participant",
422
422
  title: o("Create Pool/Participant"),
423
423
  action: {
424
- dragstart: p,
425
- click: p
424
+ dragstart: m,
425
+ click: m
426
426
  }
427
427
  }
428
428
  // 'create.group': createAction('bpmn:Group', 'artifact', 'bpmn-icon-group', translate('Create Group'))
429
- }), i;
429
+ }), n;
430
430
  };
431
431
  L.$inject = [
432
432
  "palette",
@@ -441,57 +441,57 @@ L.$inject = [
441
441
  ];
442
442
  L.prototype = new Z();
443
443
  L.prototype.constructor = L;
444
- const Ue = {
444
+ const Ne = {
445
445
  __init__: ["customPalette"],
446
446
  customPalette: ["type", L]
447
447
  };
448
- function pe(i, e) {
449
- K.call(this, i, e, 3e3), i.on("autoPlace", 3e3, function(t) {
450
- const n = t.shape, s = t.source;
451
- return Ke(s, n);
452
- }), this.append = function(t, n, s) {
453
- i.fire("autoPlace.start", {
448
+ function pe(n, e) {
449
+ K.call(this, n, e, 3e3), n.on("autoPlace", 3e3, function(t) {
450
+ const i = t.shape, s = t.source;
451
+ return Je(s, i);
452
+ }), this.append = function(t, i, s) {
453
+ n.fire("autoPlace.start", {
454
454
  source: t,
455
- shape: n
455
+ shape: i
456
456
  });
457
- const r = i.fire("autoPlace", {
457
+ const a = n.fire("autoPlace", {
458
458
  source: t,
459
- shape: n
459
+ shape: i
460
460
  });
461
- console.log("hints", s, "position", r);
462
- const a = e.appendShape(t, n, r, t.parent, s);
463
- return i.fire("autoPlace.end", {
461
+ console.log("hints", s, "position", a);
462
+ const r = e.appendShape(t, i, a, t.parent, s);
463
+ return n.fire("autoPlace.end", {
464
464
  source: t,
465
- shape: a
466
- }), a;
465
+ shape: r
466
+ }), r;
467
467
  };
468
468
  }
469
- function Ne(i) {
469
+ function Ge(n) {
470
470
  return {
471
- top: i.y,
472
- right: i.x + (i.width || 0),
473
- bottom: i.y + (i.height || 0),
474
- left: i.x
471
+ top: n.y,
472
+ right: n.x + (n.width || 0),
473
+ bottom: n.y + (n.height || 0),
474
+ left: n.x
475
475
  };
476
476
  }
477
- function Ge(i) {
477
+ function qe(n) {
478
478
  return {
479
- x: Math.round(i.x),
480
- y: Math.round(i.y)
479
+ x: Math.round(n.x),
480
+ y: Math.round(n.y)
481
481
  };
482
482
  }
483
- function qe(i) {
484
- return Ge({
485
- x: i.x + (i.width || 0) / 2,
486
- y: i.y + (i.height || 0) / 2
483
+ function Ke(n) {
484
+ return qe({
485
+ x: n.x + (n.width || 0) / 2,
486
+ y: n.y + (n.height || 0) / 2
487
487
  });
488
488
  }
489
- function Ke(i, e, t) {
489
+ function Je(n, e, t) {
490
490
  t || (t = {});
491
- const n = t.defaultDistance || 50, s = qe(i), r = Ne(i);
491
+ const i = t.defaultDistance || 50, s = Ke(n), a = Ge(n);
492
492
  return {
493
493
  x: s.x,
494
- y: r.bottom + n + e.height / 2
494
+ y: a.bottom + i + e.height / 2
495
495
  };
496
496
  }
497
497
  const me = function() {
@@ -499,45 +499,45 @@ const me = function() {
499
499
  me.prototype = K.prototype;
500
500
  pe.prototype = new me();
501
501
  pe.prototype.constructor = K;
502
- const Je = 200, Ze = 100;
503
- function ce(i, e, t) {
504
- i.on("autoPlace", Ze, function(n) {
505
- const s = n.shape, r = n.source;
506
- return He(r, s);
507
- }), i.on("autoPlace.end", function(n) {
508
- t.scrollToElement(n.shape);
509
- }), this.append = function(n, s, r) {
510
- i.fire("autoPlace.start", {
511
- source: n,
502
+ const Ze = 200, He = 100;
503
+ function ce(n, e, t) {
504
+ n.on("autoPlace", He, function(i) {
505
+ const s = i.shape, a = i.source;
506
+ return We(a, s);
507
+ }), n.on("autoPlace.end", function(i) {
508
+ t.scrollToElement(i.shape);
509
+ }), this.append = function(i, s, a) {
510
+ n.fire("autoPlace.start", {
511
+ source: i,
512
512
  shape: s
513
513
  });
514
- const a = i.fire("autoPlace", {
515
- source: n,
514
+ const r = n.fire("autoPlace", {
515
+ source: i,
516
516
  shape: s
517
- }), o = e.appendShape(n, s, a, n.parent, r);
518
- return i.fire("autoPlace.end", {
519
- source: n,
517
+ }), o = e.appendShape(i, s, r, i.parent, a);
518
+ return n.fire("autoPlace.end", {
519
+ source: i,
520
520
  shape: o
521
521
  }), o;
522
522
  };
523
523
  }
524
524
  ce.$inject = ["eventBus", "modeling", "canvas"];
525
- function He(i, e) {
526
- const t = Je, n = $e(i);
525
+ function We(n, e) {
526
+ const t = Ze, i = $e(n);
527
527
  return {
528
- x: Le(i).right + t + e.width / 2,
529
- y: n.y
528
+ x: Le(n).right + t + e.width / 2,
529
+ y: i.y
530
530
  };
531
531
  }
532
- const We = {
532
+ const Xe = {
533
533
  __init__: ["autoPlaceSelectionBehavior"],
534
534
  autoPlace: ["type", ce]
535
535
  };
536
- function ue(i, e, t, n) {
536
+ function ue(n, e, t, i) {
537
537
  const s = /* @__PURE__ */ Object.create(null);
538
538
  switch (s.event = e.event, t && (s.id = e.id), e.listenerType) {
539
539
  case "scriptListener":
540
- s.script = Ye(i, e, n);
540
+ s.script = Qe(n, e, i);
541
541
  break;
542
542
  case "expressionListener":
543
543
  s.expression = e.expression;
@@ -548,45 +548,45 @@ function ue(i, e, t, n) {
548
548
  default:
549
549
  s.class = e.class;
550
550
  }
551
- if (e.fields && (s.fields = e.fields.map((r) => Xe(i, r, n))), t && e.event === "timeout" && e.eventDefinitionType) {
552
- const r = i.moddle.create("bpmn:FormalExpression", {
551
+ if (e.fields && (s.fields = e.fields.map((a) => Ye(n, a, i))), t && e.event === "timeout" && e.eventDefinitionType) {
552
+ const a = n.moddle.create("bpmn:FormalExpression", {
553
553
  body: e.eventTimeDefinitions
554
- }), a = i.moddle.create("bpmn:TimerEventDefinition", {
555
- id: `TimerEventDefinition_${Qe(8)}`,
556
- [`time${e.eventDefinitionType.replace(/^\S/, (o) => o.toUpperCase())}`]: r
554
+ }), r = n.moddle.create("bpmn:TimerEventDefinition", {
555
+ id: `TimerEventDefinition_${et(8)}`,
556
+ [`time${e.eventDefinitionType.replace(/^\S/, (o) => o.toUpperCase())}`]: a
557
557
  });
558
- s.eventDefinitions = [a];
558
+ s.eventDefinitions = [r];
559
559
  }
560
- return i.moddle.create(`${n}:${t ? "TaskListener" : "ExecutionListener"}`, s);
560
+ return n.moddle.create(`${i}:${t ? "TaskListener" : "ExecutionListener"}`, s);
561
561
  }
562
- function Xe(i, e, t) {
563
- const { name: n, fieldType: s, string: r, expression: a } = e, o = s === "string" ? { name: n, string: r } : { name: n, expression: a };
564
- return i.moddle.create(`${t}:Field`, o);
562
+ function Ye(n, e, t) {
563
+ const { name: i, fieldType: s, string: a, expression: r } = e, o = s === "string" ? { name: i, string: a } : { name: i, expression: r };
564
+ return n.moddle.create(`${t}:Field`, o);
565
565
  }
566
- function Ye(i, e, t) {
567
- const { scriptType: n, scriptFormat: s, value: r, resource: a } = e, o = n === "inlineScript" ? { scriptFormat: s, value: r } : { scriptFormat: s, resource: a };
568
- return i.moddle.create(`${t}:Script`, o);
566
+ function Qe(n, e, t) {
567
+ const { scriptType: i, scriptFormat: s, value: a, resource: r } = e, o = i === "inlineScript" ? { scriptFormat: s, value: a } : { scriptFormat: s, resource: r };
568
+ return n.moddle.create(`${t}:Script`, o);
569
569
  }
570
- function U(i, e, t) {
571
- const n = i.moddle.create("bpmn:ExtensionElements", {
570
+ function U(n, e, t) {
571
+ const i = n.moddle.create("bpmn:ExtensionElements", {
572
572
  values: t
573
573
  });
574
- i.modeling.updateProperties(e, {
575
- extensionElements: n
574
+ n.modeling.updateProperties(e, {
575
+ extensionElements: i
576
576
  });
577
577
  }
578
- function Qe(i = 8, e) {
578
+ function et(n = 8, e) {
579
579
  let t = "";
580
- const n = e || "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
581
- for (let s = i; s > 0; --s)
582
- t += n[Math.floor(Math.random() * n.length)];
580
+ const i = e || "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
581
+ for (let s = n; s > 0; --s)
582
+ t += i[Math.floor(Math.random() * i.length)];
583
583
  return t;
584
584
  }
585
- const et = (i, e = "body") => i ? i.get(e) : null, tt = (i, e, t = "body", n) => {
586
- nt(i, e, { [t]: n });
587
- }, nt = ({ modeling: i }, e, t) => {
588
- i.updateProperties(e, t);
589
- }, it = {
585
+ const tt = (n, e = "body") => n ? n.get(e) : null, nt = (n, e, t = "body", i) => {
586
+ it(n, e, { [t]: i });
587
+ }, it = ({ modeling: n }, e, t) => {
588
+ n.updateProperties(e, t);
589
+ }, st = {
590
590
  name: "ElementBaseInfo",
591
591
  inject: {
592
592
  prefix: "prefix",
@@ -616,68 +616,68 @@ const et = (i, e = "body") => i ? i.get(e) : null, tt = (i, e, t = "body", n) =>
616
616
  id: "init"
617
617
  },
618
618
  methods: {
619
- init(i) {
619
+ init(n) {
620
620
  const { businessObject: e } = this.element;
621
- i ? (this.businessObject = v(e), this.businessObject.$type === "bpmn:SubProcess" && this.$set(this.businessObject, "isExpanded", this.element.di.isExpanded)) : this.businessObject = {}, this.skipExpression = et(e, this.skipExpressionProp);
621
+ n ? (this.businessObject = g(e), this.businessObject.$type === "bpmn:SubProcess" && this.$set(this.businessObject, "isExpanded", this.element.di.isExpanded)) : this.businessObject = {}, this.skipExpression = tt(e, this.skipExpressionProp);
622
622
  },
623
- updateBaseInfo(i) {
623
+ updateBaseInfo(n) {
624
624
  const { modeling: e } = this.bpmnInstances;
625
- if (i === "id") {
625
+ if (n === "id") {
626
626
  e.updateProperties(this.element, {
627
- id: this.businessObject[i],
628
- di: { id: `${this.businessObject[i]}_di` }
627
+ id: this.businessObject[n],
628
+ di: { id: `${this.businessObject[n]}_di` }
629
629
  });
630
630
  return;
631
631
  }
632
- if (i === "isExpanded") {
632
+ if (n === "isExpanded") {
633
633
  e.toggleCollapse(this.element);
634
634
  return;
635
635
  }
636
- e.updateProperties(this.element, { [i]: this.businessObject[i] });
636
+ e.updateProperties(this.element, { [n]: this.businessObject[n] });
637
637
  },
638
- updateProp(i, e) {
639
- tt(this.bpmnInstances, this.element, i, e);
638
+ updateProp(n, e) {
639
+ nt(this.bpmnInstances, this.element, n, e);
640
640
  }
641
641
  }
642
642
  };
643
- var st = function() {
643
+ var rt = function() {
644
644
  var e = this, t = e._self._c;
645
- return t("div", { staticClass: "panel-tab__content" }, [t("ElForm", { attrs: { size: "mini", "label-width": "90px" }, nativeOn: { submit: function(n) {
646
- n.preventDefault();
647
- } } }, [t("ElFormItem", { attrs: { label: "ID" } }, [t("ElInput", { attrs: { disabled: e.idEditDisabled, clearable: "" }, on: { input: function(n) {
645
+ return t("div", { staticClass: "panel-tab__content" }, [t("ElForm", { attrs: { size: "mini", "label-width": "90px" }, nativeOn: { submit: function(i) {
646
+ i.preventDefault();
647
+ } } }, [t("ElFormItem", { attrs: { label: "ID" } }, [t("ElInput", { attrs: { disabled: e.idEditDisabled, clearable: "" }, on: { input: function(i) {
648
648
  return e.updateBaseInfo("id");
649
- } }, model: { value: e.businessObject.id, callback: function(n) {
650
- e.$set(e.businessObject, "id", n);
651
- }, expression: "businessObject.id" } })], 1), t("ElFormItem", { attrs: { label: "名称" } }, [t("ElInput", { attrs: { clearable: "" }, on: { input: function(n) {
649
+ } }, model: { value: e.businessObject.id, callback: function(i) {
650
+ e.$set(e.businessObject, "id", i);
651
+ }, expression: "businessObject.id" } })], 1), t("ElFormItem", { attrs: { label: "名称" } }, [t("ElInput", { attrs: { clearable: "" }, on: { input: function(i) {
652
652
  return e.updateBaseInfo("name");
653
- } }, model: { value: e.businessObject.name, callback: function(n) {
654
- e.$set(e.businessObject, "name", n);
655
- }, expression: "businessObject.name" } })], 1), e.businessObject.$type === "bpmn:UserTask" ? t("ElFormItem", { attrs: { label: "跳过表达式" } }, [t("ElInput", { attrs: { clearable: "" }, on: { input: (n) => e.updateProp(e.skipExpressionProp, n) }, model: { value: e.skipExpression, callback: function(n) {
656
- e.skipExpression = n;
657
- }, expression: "skipExpression" } })], 1) : e._e(), e.businessObject.$type === "bpmn:Process" ? [t("ElFormItem", { attrs: { label: "版本标签" } }, [t("ElInput", { attrs: { clearable: "" }, on: { input: function(n) {
653
+ } }, model: { value: e.businessObject.name, callback: function(i) {
654
+ e.$set(e.businessObject, "name", i);
655
+ }, expression: "businessObject.name" } })], 1), e.businessObject.$type === "bpmn:UserTask" ? t("ElFormItem", { attrs: { label: "跳过表达式" } }, [t("ElInput", { attrs: { clearable: "" }, on: { input: (i) => e.updateProp(e.skipExpressionProp, i) }, model: { value: e.skipExpression, callback: function(i) {
656
+ e.skipExpression = i;
657
+ }, expression: "skipExpression" } })], 1) : e._e(), e.businessObject.$type === "bpmn:Process" ? [t("ElFormItem", { attrs: { label: "版本标签" } }, [t("ElInput", { attrs: { clearable: "" }, on: { input: function(i) {
658
658
  return e.updateBaseInfo("versionTag");
659
- } }, model: { value: e.businessObject.versionTag, callback: function(n) {
660
- e.$set(e.businessObject, "versionTag", n);
661
- }, expression: "businessObject.versionTag" } })], 1), t("ElFormItem", { attrs: { label: "可执行" } }, [t("ElSwitch", { attrs: { "active-text": "是", "inactive-text": "否" }, on: { input: function(n) {
659
+ } }, model: { value: e.businessObject.versionTag, callback: function(i) {
660
+ e.$set(e.businessObject, "versionTag", i);
661
+ }, expression: "businessObject.versionTag" } })], 1), t("ElFormItem", { attrs: { label: "可执行" } }, [t("ElSwitch", { attrs: { "active-text": "是", "inactive-text": "否" }, on: { input: function(i) {
662
662
  return e.updateBaseInfo("isExecutable");
663
- } }, model: { value: e.businessObject.isExecutable, callback: function(n) {
664
- e.$set(e.businessObject, "isExecutable", n);
665
- }, expression: "businessObject.isExecutable" } })], 1)] : e._e(), e.businessObject.$type === "bpmn:SubProcess" ? t("ElFormItem", { attrs: { label: "状态" } }, [t("ElSwitch", { attrs: { "active-text": "展开", "inactive-text": "折叠" }, on: { input: function(n) {
663
+ } }, model: { value: e.businessObject.isExecutable, callback: function(i) {
664
+ e.$set(e.businessObject, "isExecutable", i);
665
+ }, expression: "businessObject.isExecutable" } })], 1)] : e._e(), e.businessObject.$type === "bpmn:SubProcess" ? t("ElFormItem", { attrs: { label: "状态" } }, [t("ElSwitch", { attrs: { "active-text": "展开", "inactive-text": "折叠" }, on: { input: function(i) {
666
666
  return e.updateBaseInfo("isExpanded");
667
- } }, model: { value: e.businessObject.isExpanded, callback: function(n) {
668
- e.$set(e.businessObject, "isExpanded", n);
667
+ } }, model: { value: e.businessObject.isExpanded, callback: function(i) {
668
+ e.$set(e.businessObject, "isExpanded", i);
669
669
  }, expression: "businessObject.isExpanded" } })], 1) : e._e()], 2)], 1);
670
- }, rt = [], at = /* @__PURE__ */ h(
671
- it,
670
+ }, at = [], ot = /* @__PURE__ */ h(
672
671
  st,
673
672
  rt,
673
+ at,
674
674
  !1,
675
675
  null,
676
676
  null,
677
677
  null,
678
678
  null
679
679
  );
680
- const ot = at.exports, lt = {
680
+ const lt = ot.exports, pt = {
681
681
  name: "ElementOtherConfig",
682
682
  props: {
683
683
  id: String,
@@ -697,43 +697,43 @@ const ot = at.exports, lt = {
697
697
  this.documentation = "";
698
698
  else {
699
699
  const {
700
- businessObject: { documentation: i }
700
+ businessObject: { documentation: n }
701
701
  } = this.element;
702
- this.documentation = (i == null ? void 0 : i[0].text) || "";
702
+ this.documentation = (n == null ? void 0 : n[0].text) || "";
703
703
  }
704
704
  }
705
705
  }
706
706
  },
707
707
  methods: {
708
708
  updateDocumentation() {
709
- const { modeling: i } = this.bpmnInstances, {
709
+ const { modeling: n } = this.bpmnInstances, {
710
710
  businessObject: { documentation: e }
711
711
  } = this.element;
712
712
  if (e != null && e.length)
713
- e[0].set("text", this.documentation), i.updateProperties(this.element, { documentation: e });
713
+ e[0].set("text", this.documentation), n.updateProperties(this.element, { documentation: e });
714
714
  else {
715
- const { bpmnFactory: t } = this.bpmnInstances, n = t.create("bpmn:Documentation", { text: this.documentation });
716
- i.updateProperties(this.element, { documentation: [n] });
715
+ const { bpmnFactory: t } = this.bpmnInstances, i = t.create("bpmn:Documentation", { text: this.documentation });
716
+ n.updateProperties(this.element, { documentation: [i] });
717
717
  }
718
718
  }
719
719
  }
720
720
  };
721
- var pt = function() {
721
+ var mt = function() {
722
722
  var e = this, t = e._self._c;
723
- 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("ElInput", { attrs: { type: "textarea", size: "mini", resize: "vertical", autosize: { minRows: 2, maxRows: 4 } }, on: { input: e.updateDocumentation }, model: { value: e.documentation, callback: function(n) {
724
- e.documentation = n;
723
+ 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("ElInput", { attrs: { type: "textarea", size: "mini", resize: "vertical", autosize: { minRows: 2, maxRows: 4 } }, on: { input: e.updateDocumentation }, model: { value: e.documentation, callback: function(i) {
724
+ e.documentation = i;
725
725
  }, expression: "documentation" } })], 1)])]);
726
- }, mt = [], ct = /* @__PURE__ */ h(
727
- lt,
726
+ }, ct = [], ut = /* @__PURE__ */ h(
728
727
  pt,
729
728
  mt,
729
+ ct,
730
730
  !1,
731
731
  null,
732
732
  null,
733
733
  null,
734
734
  null
735
735
  );
736
- const ut = ct.exports, dt = {
736
+ const dt = ut.exports, ft = {
737
737
  name: "UserTask",
738
738
  props: {
739
739
  id: String,
@@ -764,62 +764,62 @@ const ut = ct.exports, dt = {
764
764
  },
765
765
  methods: {
766
766
  resetTaskForm() {
767
- const { businessObject: i } = this.element;
767
+ const { businessObject: n } = this.element;
768
768
  for (const e in this.defaultTaskForm) {
769
769
  let t;
770
- ["candidateUsers", "candidateGroups"].includes(e) ? t = i[e] ? i[e].split(",") : [] : t = i[e] || this.defaultTaskForm[e], this.$set(this.userTaskForm, e, t);
770
+ ["candidateUsers", "candidateGroups"].includes(e) ? t = n[e] ? n[e].split(",") : [] : t = n[e] || this.defaultTaskForm[e], this.$set(this.userTaskForm, e, t);
771
771
  }
772
772
  },
773
- updateElementTask(i) {
773
+ updateElementTask(n) {
774
774
  const e = {};
775
- i === "candidateUsers" || i === "candidateGroups" ? e[i] = this.userTaskForm[i] && this.userTaskForm[i].length ? this.userTaskForm[i].join() : null : e[i] = this.userTaskForm[i] || null, this.bpmnInstances.modeling.updateProperties(this.element, e);
775
+ n === "candidateUsers" || n === "candidateGroups" ? e[n] = this.userTaskForm[n] && this.userTaskForm[n].length ? this.userTaskForm[n].join() : null : e[n] = this.userTaskForm[n] || null, this.bpmnInstances.modeling.updateProperties(this.element, e);
776
776
  }
777
777
  }
778
778
  };
779
- var ft = function() {
779
+ var bt = function() {
780
780
  var e = this, t = e._self._c;
781
- return t("div", { staticStyle: { "margin-top": "16px" } }, [t("ElFormItem", { attrs: { label: "处理用户" } }, [t("ElSelect", { on: { change: function(n) {
781
+ return t("div", { staticStyle: { "margin-top": "16px" } }, [t("ElFormItem", { attrs: { label: "处理用户" } }, [t("ElSelect", { on: { change: function(i) {
782
782
  return e.updateElementTask("assignee");
783
- } }, model: { value: e.userTaskForm.assignee, callback: function(n) {
784
- e.$set(e.userTaskForm, "assignee", n);
785
- }, expression: "userTaskForm.assignee" } }, e._l(e.mockData, function(n) {
786
- return t("ElOption", { key: `ass-${n}`, attrs: { label: `用户${n}`, value: `user${n}` } });
787
- }), 1)], 1), t("ElFormItem", { attrs: { label: "候选用户" } }, [t("ElSelect", { attrs: { multiple: "", "collapse-tags": "" }, on: { change: function(n) {
783
+ } }, model: { value: e.userTaskForm.assignee, callback: function(i) {
784
+ e.$set(e.userTaskForm, "assignee", i);
785
+ }, expression: "userTaskForm.assignee" } }, e._l(e.mockData, function(i) {
786
+ return t("ElOption", { key: `ass-${i}`, attrs: { label: `用户${i}`, value: `user${i}` } });
787
+ }), 1)], 1), t("ElFormItem", { attrs: { label: "候选用户" } }, [t("ElSelect", { attrs: { multiple: "", "collapse-tags": "" }, on: { change: function(i) {
788
788
  return e.updateElementTask("candidateUsers");
789
- } }, model: { value: e.userTaskForm.candidateUsers, callback: function(n) {
790
- e.$set(e.userTaskForm, "candidateUsers", n);
791
- }, expression: "userTaskForm.candidateUsers" } }, e._l(e.mockData, function(n) {
792
- return t("ElOption", { key: `user-${n}`, attrs: { label: `用户${n}`, value: `user${n}` } });
793
- }), 1)], 1), t("ElFormItem", { attrs: { label: "候选分组" } }, [t("ElSelect", { attrs: { multiple: "", "collapse-tags": "" }, on: { change: function(n) {
789
+ } }, model: { value: e.userTaskForm.candidateUsers, callback: function(i) {
790
+ e.$set(e.userTaskForm, "candidateUsers", i);
791
+ }, expression: "userTaskForm.candidateUsers" } }, e._l(e.mockData, function(i) {
792
+ return t("ElOption", { key: `user-${i}`, attrs: { label: `用户${i}`, value: `user${i}` } });
793
+ }), 1)], 1), t("ElFormItem", { attrs: { label: "候选分组" } }, [t("ElSelect", { attrs: { multiple: "", "collapse-tags": "" }, on: { change: function(i) {
794
794
  return e.updateElementTask("candidateGroups");
795
- } }, model: { value: e.userTaskForm.candidateGroups, callback: function(n) {
796
- e.$set(e.userTaskForm, "candidateGroups", n);
797
- }, expression: "userTaskForm.candidateGroups" } }, e._l(e.mockData, function(n) {
798
- return t("ElOption", { key: `ass-${n}`, attrs: { label: `分组${n}`, value: `group${n}` } });
799
- }), 1)], 1), t("ElFormItem", { attrs: { label: "到期时间" } }, [t("ElInput", { attrs: { clearable: "" }, on: { change: function(n) {
795
+ } }, model: { value: e.userTaskForm.candidateGroups, callback: function(i) {
796
+ e.$set(e.userTaskForm, "candidateGroups", i);
797
+ }, expression: "userTaskForm.candidateGroups" } }, e._l(e.mockData, function(i) {
798
+ return t("ElOption", { key: `ass-${i}`, attrs: { label: `分组${i}`, value: `group${i}` } });
799
+ }), 1)], 1), t("ElFormItem", { attrs: { label: "到期时间" } }, [t("ElInput", { attrs: { clearable: "" }, on: { change: function(i) {
800
800
  return e.updateElementTask("dueDate");
801
- } }, model: { value: e.userTaskForm.dueDate, callback: function(n) {
802
- e.$set(e.userTaskForm, "dueDate", n);
803
- }, expression: "userTaskForm.dueDate" } })], 1), t("ElFormItem", { attrs: { label: "跟踪时间" } }, [t("ElInput", { attrs: { clearable: "" }, on: { change: function(n) {
801
+ } }, model: { value: e.userTaskForm.dueDate, callback: function(i) {
802
+ e.$set(e.userTaskForm, "dueDate", i);
803
+ }, expression: "userTaskForm.dueDate" } })], 1), t("ElFormItem", { attrs: { label: "跟踪时间" } }, [t("ElInput", { attrs: { clearable: "" }, on: { change: function(i) {
804
804
  return e.updateElementTask("followUpDate");
805
- } }, model: { value: e.userTaskForm.followUpDate, callback: function(n) {
806
- e.$set(e.userTaskForm, "followUpDate", n);
807
- }, expression: "userTaskForm.followUpDate" } })], 1), t("ElFormItem", { attrs: { label: "优先级" } }, [t("ElInput", { attrs: { clearable: "" }, on: { change: function(n) {
805
+ } }, model: { value: e.userTaskForm.followUpDate, callback: function(i) {
806
+ e.$set(e.userTaskForm, "followUpDate", i);
807
+ }, expression: "userTaskForm.followUpDate" } })], 1), t("ElFormItem", { attrs: { label: "优先级" } }, [t("ElInput", { attrs: { clearable: "" }, on: { change: function(i) {
808
808
  return e.updateElementTask("priority");
809
- } }, model: { value: e.userTaskForm.priority, callback: function(n) {
810
- e.$set(e.userTaskForm, "priority", n);
809
+ } }, model: { value: e.userTaskForm.priority, callback: function(i) {
810
+ e.$set(e.userTaskForm, "priority", i);
811
811
  }, expression: "userTaskForm.priority" } })], 1)], 1);
812
- }, bt = [], yt = /* @__PURE__ */ h(
813
- dt,
812
+ }, yt = [], ht = /* @__PURE__ */ h(
814
813
  ft,
815
814
  bt,
815
+ yt,
816
816
  !1,
817
817
  null,
818
818
  null,
819
819
  null,
820
820
  null
821
821
  );
822
- const ht = yt.exports, gt = {
822
+ const vt = ht.exports, gt = {
823
823
  name: "ScriptTask",
824
824
  props: {
825
825
  id: String,
@@ -847,59 +847,59 @@ const ht = yt.exports, gt = {
847
847
  },
848
848
  methods: {
849
849
  resetTaskForm() {
850
- var i;
850
+ var n;
851
851
  for (const e in this.defaultTaskForm) {
852
- const t = ((i = this.element) == null ? void 0 : i.businessObject[e]) || this.defaultTaskForm[e];
852
+ const t = ((n = this.element) == null ? void 0 : n.businessObject[e]) || this.defaultTaskForm[e];
853
853
  this.$set(this.scriptTaskForm, e, t);
854
854
  }
855
855
  this.$set(this.scriptTaskForm, "scriptType", this.scriptTaskForm.script ? "inline" : "external");
856
856
  },
857
857
  updateElementTask() {
858
- const i = /* @__PURE__ */ Object.create(null);
859
- i.scriptFormat = this.scriptTaskForm.scriptFormat || null, i.resultVariable = this.scriptTaskForm.resultVariable || null, this.scriptTaskForm.scriptType === "inline" ? (i.script = this.scriptTaskForm.script || null, i.resource = null) : (i.resource = this.scriptTaskForm.resource || null, i.script = null), this.bpmnInstances.modeling.updateProperties(this.element, i);
858
+ const n = /* @__PURE__ */ Object.create(null);
859
+ n.scriptFormat = this.scriptTaskForm.scriptFormat || null, n.resultVariable = this.scriptTaskForm.resultVariable || null, this.scriptTaskForm.scriptType === "inline" ? (n.script = this.scriptTaskForm.script || null, n.resource = null) : (n.resource = this.scriptTaskForm.resource || null, n.script = null), this.bpmnInstances.modeling.updateProperties(this.element, n);
860
860
  }
861
861
  }
862
862
  };
863
- var vt = function() {
863
+ var Et = function() {
864
864
  var e = this, t = e._self._c;
865
- return t("div", { staticStyle: { "margin-top": "16px" } }, [t("ElFormItem", { attrs: { label: "脚本格式" } }, [t("ElInput", { attrs: { clearable: "" }, on: { input: function(n) {
865
+ return t("div", { staticStyle: { "margin-top": "16px" } }, [t("ElFormItem", { attrs: { label: "脚本格式" } }, [t("ElInput", { attrs: { clearable: "" }, on: { input: function(i) {
866
866
  return e.updateElementTask();
867
- }, change: function(n) {
867
+ }, change: function(i) {
868
868
  return e.updateElementTask();
869
- } }, model: { value: e.scriptTaskForm.scriptFormat, callback: function(n) {
870
- e.$set(e.scriptTaskForm, "scriptFormat", n);
871
- }, expression: "scriptTaskForm.scriptFormat" } })], 1), t("ElFormItem", { attrs: { label: "脚本类型" } }, [t("ElSelect", { model: { value: e.scriptTaskForm.scriptType, callback: function(n) {
872
- e.$set(e.scriptTaskForm, "scriptType", n);
873
- }, expression: "scriptTaskForm.scriptType" } }, [t("ElOption", { attrs: { label: "内联脚本", value: "inline" } }), t("ElOption", { attrs: { label: "外部资源", value: "external" } })], 1)], 1), t("ElFormItem", { directives: [{ name: "show", rawName: "v-show", value: e.scriptTaskForm.scriptType === "inline", expression: "scriptTaskForm.scriptType === 'inline'" }], attrs: { label: "脚本" } }, [t("ElInput", { attrs: { type: "textarea", resize: "vertical", autosize: { minRows: 2, maxRows: 4 }, clearable: "" }, on: { input: function(n) {
869
+ } }, model: { value: e.scriptTaskForm.scriptFormat, callback: function(i) {
870
+ e.$set(e.scriptTaskForm, "scriptFormat", i);
871
+ }, expression: "scriptTaskForm.scriptFormat" } })], 1), t("ElFormItem", { attrs: { label: "脚本类型" } }, [t("ElSelect", { model: { value: e.scriptTaskForm.scriptType, callback: function(i) {
872
+ e.$set(e.scriptTaskForm, "scriptType", i);
873
+ }, expression: "scriptTaskForm.scriptType" } }, [t("ElOption", { attrs: { label: "内联脚本", value: "inline" } }), t("ElOption", { attrs: { label: "外部资源", value: "external" } })], 1)], 1), t("ElFormItem", { directives: [{ name: "show", rawName: "v-show", value: e.scriptTaskForm.scriptType === "inline", expression: "scriptTaskForm.scriptType === 'inline'" }], attrs: { label: "脚本" } }, [t("ElInput", { attrs: { type: "textarea", resize: "vertical", autosize: { minRows: 2, maxRows: 4 }, clearable: "" }, on: { input: function(i) {
874
874
  return e.updateElementTask();
875
- }, change: function(n) {
875
+ }, change: function(i) {
876
876
  return e.updateElementTask();
877
- } }, model: { value: e.scriptTaskForm.script, callback: function(n) {
878
- e.$set(e.scriptTaskForm, "script", n);
879
- }, expression: "scriptTaskForm.script" } })], 1), t("ElFormItem", { directives: [{ name: "show", rawName: "v-show", value: e.scriptTaskForm.scriptType === "external", expression: "scriptTaskForm.scriptType === 'external'" }], attrs: { label: "资源地址" } }, [t("ElInput", { attrs: { clearable: "" }, on: { input: function(n) {
877
+ } }, model: { value: e.scriptTaskForm.script, callback: function(i) {
878
+ e.$set(e.scriptTaskForm, "script", i);
879
+ }, expression: "scriptTaskForm.script" } })], 1), t("ElFormItem", { directives: [{ name: "show", rawName: "v-show", value: e.scriptTaskForm.scriptType === "external", expression: "scriptTaskForm.scriptType === 'external'" }], attrs: { label: "资源地址" } }, [t("ElInput", { attrs: { clearable: "" }, on: { input: function(i) {
880
880
  return e.updateElementTask();
881
- }, change: function(n) {
881
+ }, change: function(i) {
882
882
  return e.updateElementTask();
883
- } }, model: { value: e.scriptTaskForm.resource, callback: function(n) {
884
- e.$set(e.scriptTaskForm, "resource", n);
885
- }, expression: "scriptTaskForm.resource" } })], 1), t("ElFormItem", { attrs: { label: "结果变量" } }, [t("ElInput", { attrs: { clearable: "" }, on: { input: function(n) {
883
+ } }, model: { value: e.scriptTaskForm.resource, callback: function(i) {
884
+ e.$set(e.scriptTaskForm, "resource", i);
885
+ }, expression: "scriptTaskForm.resource" } })], 1), t("ElFormItem", { attrs: { label: "结果变量" } }, [t("ElInput", { attrs: { clearable: "" }, on: { input: function(i) {
886
886
  return e.updateElementTask();
887
- }, change: function(n) {
887
+ }, change: function(i) {
888
888
  return e.updateElementTask();
889
- } }, model: { value: e.scriptTaskForm.resultVariable, callback: function(n) {
890
- e.$set(e.scriptTaskForm, "resultVariable", n);
889
+ } }, model: { value: e.scriptTaskForm.resultVariable, callback: function(i) {
890
+ e.$set(e.scriptTaskForm, "resultVariable", i);
891
891
  }, expression: "scriptTaskForm.resultVariable" } })], 1)], 1);
892
- }, Et = [], Ft = /* @__PURE__ */ h(
892
+ }, Ft = [], xt = /* @__PURE__ */ h(
893
893
  gt,
894
- vt,
895
894
  Et,
895
+ Ft,
896
896
  !1,
897
897
  null,
898
898
  null,
899
899
  null,
900
900
  null
901
901
  );
902
- const xt = Ft.exports, St = {
902
+ const St = xt.exports, Tt = {
903
903
  name: "ReceiveTask",
904
904
  props: {
905
905
  id: String,
@@ -923,14 +923,14 @@ const xt = Ft.exports, St = {
923
923
  }
924
924
  },
925
925
  created() {
926
- this.bpmnMessageRefsMap = /* @__PURE__ */ Object.create(null), this.bpmnRootElements = this.bpmnInstances.modeler.getDefinitions().rootElements, this.bpmnRootElements.filter((i) => i.$type === "bpmn:Message").forEach((i) => {
927
- this.bpmnMessageRefsMap[i.id] = i, this.$set(this.messageMap, i.id, i.name);
926
+ this.bpmnMessageRefsMap = /* @__PURE__ */ Object.create(null), this.bpmnRootElements = this.bpmnInstances.modeler.getDefinitions().rootElements, this.bpmnRootElements.filter((n) => n.$type === "bpmn:Message").forEach((n) => {
927
+ this.bpmnMessageRefsMap[n.id] = n, this.$set(this.messageMap, n.id, n.name);
928
928
  }), this.$set(this.messageMap, "-1", "无");
929
929
  },
930
930
  methods: {
931
931
  getBindMessage() {
932
- var i, e;
933
- this.bindMessageId = ((e = (i = this.element.businessObject) == null ? void 0 : i.messageRef) == null ? void 0 : e.id) || "-1";
932
+ var n, e;
933
+ this.bindMessageId = ((e = (n = this.element.businessObject) == null ? void 0 : n.messageRef) == null ? void 0 : e.id) || "-1";
934
934
  },
935
935
  openMessageModel() {
936
936
  this.messageModelVisible = !0, this.newMessageForm = {};
@@ -940,48 +940,48 @@ const xt = Ft.exports, St = {
940
940
  this.$message.error("该消息已存在,请修改id后重新保存");
941
941
  return;
942
942
  }
943
- const i = this.bpmnInstances.moddle.create("bpmn:Message", this.newMessageForm);
944
- this.bpmnRootElements.push(i), this.$set(this.messageMap, this.newMessageForm.id, this.newMessageForm.name), this.bpmnMessageRefsMap[this.newMessageForm.id] = i, this.messageModelVisible = !1;
943
+ const n = this.bpmnInstances.moddle.create("bpmn:Message", this.newMessageForm);
944
+ this.bpmnRootElements.push(n), this.$set(this.messageMap, this.newMessageForm.id, this.newMessageForm.name), this.bpmnMessageRefsMap[this.newMessageForm.id] = n, this.messageModelVisible = !1;
945
945
  },
946
- updateTaskMessage(i) {
947
- i === "-1" ? this.bpmnInstances.modeling.updateProperties(this.element, {
946
+ updateTaskMessage(n) {
947
+ n === "-1" ? this.bpmnInstances.modeling.updateProperties(this.element, {
948
948
  messageRef: null
949
949
  }) : this.bpmnInstances.modeling.updateProperties(this.element, {
950
- messageRef: this.bpmnMessageRefsMap[i]
950
+ messageRef: this.bpmnMessageRefsMap[n]
951
951
  });
952
952
  }
953
953
  }
954
954
  };
955
- var Tt = function() {
955
+ var Ct = function() {
956
956
  var e = this, t = e._self._c;
957
- return t("div", { staticStyle: { "margin-top": "16px" } }, [t("ElFormItem", { attrs: { label: "消息实例" } }, [t("div", { staticStyle: { display: "flex", "flex-wrap": "nowrap", "align-items": "center", "justify-content": "space-between" } }, [t("ElSelect", { on: { change: e.updateTaskMessage }, model: { value: e.bindMessageId, callback: function(n) {
958
- e.bindMessageId = n;
959
- }, expression: "bindMessageId" } }, e._l(Object.keys(e.messageMap), function(n) {
960
- return t("ElOption", { key: n, attrs: { value: n, label: e.messageMap[n] } });
961
- }), 1), t("ElButton", { staticStyle: { "margin-left": "8px" }, attrs: { size: "mini", type: "primary", icon: "el-icon-plus" }, on: { click: e.openMessageModel } })], 1)]), t("ElementDialog", { attrs: { visible: e.messageModelVisible, "close-on-click-modal": !1, title: "创建新消息", width: "400px", "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(n) {
962
- e.messageModelVisible = n;
957
+ return t("div", { staticStyle: { "margin-top": "16px" } }, [t("ElFormItem", { attrs: { label: "消息实例" } }, [t("div", { staticStyle: { display: "flex", "flex-wrap": "nowrap", "align-items": "center", "justify-content": "space-between" } }, [t("ElSelect", { on: { change: e.updateTaskMessage }, model: { value: e.bindMessageId, callback: function(i) {
958
+ e.bindMessageId = i;
959
+ }, expression: "bindMessageId" } }, e._l(Object.keys(e.messageMap), function(i) {
960
+ return t("ElOption", { key: i, attrs: { value: i, label: e.messageMap[i] } });
961
+ }), 1), t("ElButton", { staticStyle: { "margin-left": "8px" }, attrs: { size: "mini", type: "primary", icon: "el-icon-plus" }, on: { click: e.openMessageModel } })], 1)]), t("ElementDialog", { attrs: { visible: e.messageModelVisible, "close-on-click-modal": !1, title: "创建新消息", width: "400px", "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(i) {
962
+ e.messageModelVisible = i;
963
963
  } }, scopedSlots: e._u([{ key: "footer", fn: function() {
964
964
  return [t("ElButton", { attrs: { size: "mini", type: "primary" }, on: { click: e.createNewMessage } }, [e._v("确 认")])];
965
- }, proxy: !0 }]) }, [t("ElForm", { attrs: { model: e.newMessageForm, size: "mini", "label-width": "90px" }, nativeOn: { submit: function(n) {
966
- n.preventDefault();
967
- } } }, [t("ElFormItem", { attrs: { label: "消息ID" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.newMessageForm.id, callback: function(n) {
968
- e.$set(e.newMessageForm, "id", n);
969
- }, expression: "newMessageForm.id" } })], 1), t("ElFormItem", { attrs: { label: "消息名称" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.newMessageForm.name, callback: function(n) {
970
- e.$set(e.newMessageForm, "name", n);
965
+ }, proxy: !0 }]) }, [t("ElForm", { attrs: { model: e.newMessageForm, size: "mini", "label-width": "90px" }, nativeOn: { submit: function(i) {
966
+ i.preventDefault();
967
+ } } }, [t("ElFormItem", { attrs: { label: "消息ID" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.newMessageForm.id, callback: function(i) {
968
+ e.$set(e.newMessageForm, "id", i);
969
+ }, expression: "newMessageForm.id" } })], 1), t("ElFormItem", { attrs: { label: "消息名称" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.newMessageForm.name, callback: function(i) {
970
+ e.$set(e.newMessageForm, "name", i);
971
971
  }, expression: "newMessageForm.name" } })], 1)], 1)], 1)], 1);
972
- }, Ct = [], It = /* @__PURE__ */ h(
973
- St,
972
+ }, kt = [], It = /* @__PURE__ */ h(
974
973
  Tt,
975
974
  Ct,
975
+ kt,
976
976
  !1,
977
977
  null,
978
978
  null,
979
979
  null,
980
980
  null
981
981
  );
982
- const kt = It.exports, At = {
982
+ const _t = It.exports, wt = {
983
983
  name: "ElementTaskConfig",
984
- components: { UserTask: ht, ScriptTask: xt, ReceiveTask: kt },
984
+ components: { UserTask: vt, ScriptTask: St, ReceiveTask: _t },
985
985
  props: {
986
986
  id: String,
987
987
  element: Object,
@@ -1013,8 +1013,8 @@ const kt = It.exports, At = {
1013
1013
  id: {
1014
1014
  immediate: !0,
1015
1015
  handler() {
1016
- var i, e, t, n, s, r;
1017
- this.taskConfigForm.asyncBefore = (e = (i = this.element) == null ? void 0 : i.businessObject) == null ? void 0 : e.asyncBefore, this.taskConfigForm.asyncAfter = (n = (t = this.element) == null ? void 0 : t.businessObject) == null ? void 0 : n.asyncAfter, this.taskConfigForm.exclusive = (r = (s = this.element) == null ? void 0 : s.businessObject) == null ? void 0 : r.exclusive;
1016
+ var n, e, t, i, s, a;
1017
+ this.taskConfigForm.asyncBefore = (e = (n = this.element) == null ? void 0 : n.businessObject) == null ? void 0 : e.asyncBefore, this.taskConfigForm.asyncAfter = (i = (t = this.element) == null ? void 0 : t.businessObject) == null ? void 0 : i.asyncAfter, this.taskConfigForm.exclusive = (a = (s = this.element) == null ? void 0 : s.businessObject) == null ? void 0 : a.exclusive;
1018
1018
  }
1019
1019
  },
1020
1020
  type: {
@@ -1030,28 +1030,28 @@ const kt = It.exports, At = {
1030
1030
  }
1031
1031
  }
1032
1032
  };
1033
- var _t = function() {
1033
+ var At = function() {
1034
1034
  var e = this, t = e._self._c;
1035
- return t("div", { staticClass: "panel-tab__content" }, [t("ElForm", { attrs: { size: "mini", "label-width": "90px" }, nativeOn: { submit: function(n) {
1036
- n.preventDefault();
1037
- } } }, [t("ElFormItem", { attrs: { label: "异步延续" } }, [t("ElCheckbox", { attrs: { label: "异步前" }, on: { change: e.changeTaskAsync }, model: { value: e.taskConfigForm.asyncBefore, callback: function(n) {
1038
- e.$set(e.taskConfigForm, "asyncBefore", n);
1039
- }, expression: "taskConfigForm.asyncBefore" } }), t("ElCheckbox", { attrs: { label: "异步后" }, on: { change: e.changeTaskAsync }, model: { value: e.taskConfigForm.asyncAfter, callback: function(n) {
1040
- e.$set(e.taskConfigForm, "asyncAfter", n);
1041
- }, expression: "taskConfigForm.asyncAfter" } }), e.taskConfigForm.asyncAfter || e.taskConfigForm.asyncBefore ? t("ElCheckbox", { attrs: { label: "排除" }, on: { change: e.changeTaskAsync }, model: { value: e.taskConfigForm.exclusive, callback: function(n) {
1042
- e.$set(e.taskConfigForm, "exclusive", n);
1035
+ return t("div", { staticClass: "panel-tab__content" }, [t("ElForm", { attrs: { size: "mini", "label-width": "90px" }, nativeOn: { submit: function(i) {
1036
+ i.preventDefault();
1037
+ } } }, [t("ElFormItem", { attrs: { label: "异步延续" } }, [t("ElCheckbox", { attrs: { label: "异步前" }, on: { change: e.changeTaskAsync }, model: { value: e.taskConfigForm.asyncBefore, callback: function(i) {
1038
+ e.$set(e.taskConfigForm, "asyncBefore", i);
1039
+ }, expression: "taskConfigForm.asyncBefore" } }), t("ElCheckbox", { attrs: { label: "异步后" }, on: { change: e.changeTaskAsync }, model: { value: e.taskConfigForm.asyncAfter, callback: function(i) {
1040
+ e.$set(e.taskConfigForm, "asyncAfter", i);
1041
+ }, expression: "taskConfigForm.asyncAfter" } }), e.taskConfigForm.asyncAfter || e.taskConfigForm.asyncBefore ? t("ElCheckbox", { attrs: { label: "排除" }, on: { change: e.changeTaskAsync }, model: { value: e.taskConfigForm.exclusive, callback: function(i) {
1042
+ e.$set(e.taskConfigForm, "exclusive", i);
1043
1043
  }, expression: "taskConfigForm.exclusive" } }) : e._e()], 1), t(e.witchTaskComponent, e._b({ tag: "Component" }, "Component", e.$props, !1))], 1)], 1);
1044
- }, wt = [], $t = /* @__PURE__ */ h(
1045
- At,
1046
- _t,
1044
+ }, $t = [], Lt = /* @__PURE__ */ h(
1047
1045
  wt,
1046
+ At,
1047
+ $t,
1048
1048
  !1,
1049
1049
  null,
1050
1050
  null,
1051
1051
  null,
1052
1052
  null
1053
1053
  );
1054
- const Lt = $t.exports, Ot = {
1054
+ const Ot = Lt.exports, Pt = {
1055
1055
  name: "ElementMultiInstance",
1056
1056
  inject: {
1057
1057
  prefix: "prefix"
@@ -1080,8 +1080,8 @@ const Lt = $t.exports, Ot = {
1080
1080
  id: {
1081
1081
  immediate: !0,
1082
1082
  handler() {
1083
- const { businessObject: i } = this.element;
1084
- this.getElementLoop(i);
1083
+ const { businessObject: n } = this.element;
1084
+ this.getElementLoop(n);
1085
1085
  }
1086
1086
  }
1087
1087
  },
@@ -1089,63 +1089,63 @@ const Lt = $t.exports, Ot = {
1089
1089
  this.multiLoopInstance = null;
1090
1090
  },
1091
1091
  methods: {
1092
- getElementLoop(i) {
1093
- var e, t, n, s, r, a;
1094
- if (!i.loopCharacteristics) {
1092
+ getElementLoop(n) {
1093
+ var e, t, i, s, a, r;
1094
+ if (!n.loopCharacteristics) {
1095
1095
  this.loopCharacteristics = "Null", this.loopInstanceForm = {};
1096
1096
  return;
1097
1097
  }
1098
- if (i.loopCharacteristics.$type === "bpmn:StandardLoopCharacteristics") {
1098
+ if (n.loopCharacteristics.$type === "bpmn:StandardLoopCharacteristics") {
1099
1099
  this.loopCharacteristics = "StandardLoop", this.loopInstanceForm = {};
1100
1100
  return;
1101
1101
  }
1102
- i.loopCharacteristics.isSequential ? this.loopCharacteristics = "SequentialMultiInstance" : this.loopCharacteristics = "ParallelMultiInstance", this.loopInstanceForm = T(u(u({}, this.defaultLoopInstanceForm), i.loopCharacteristics), {
1103
- completionCondition: (n = (t = (e = i.loopCharacteristics) == null ? void 0 : e.completionCondition) == null ? void 0 : t.body) != null ? n : "",
1104
- loopCardinality: (a = (r = (s = i.loopCharacteristics) == null ? void 0 : s.loopCardinality) == null ? void 0 : r.body) != null ? a : ""
1105
- }), this.multiLoopInstance = this.element.businessObject.loopCharacteristics, i.loopCharacteristics.extensionElements && i.loopCharacteristics.extensionElements.values && i.loopCharacteristics.extensionElements.values.length && this.$set(
1102
+ n.loopCharacteristics.isSequential ? this.loopCharacteristics = "SequentialMultiInstance" : this.loopCharacteristics = "ParallelMultiInstance", this.loopInstanceForm = T(u(u({}, this.defaultLoopInstanceForm), n.loopCharacteristics), {
1103
+ completionCondition: (i = (t = (e = n.loopCharacteristics) == null ? void 0 : e.completionCondition) == null ? void 0 : t.body) != null ? i : "",
1104
+ loopCardinality: (r = (a = (s = n.loopCharacteristics) == null ? void 0 : s.loopCardinality) == null ? void 0 : a.body) != null ? r : ""
1105
+ }), this.multiLoopInstance = this.element.businessObject.loopCharacteristics, n.loopCharacteristics.extensionElements && n.loopCharacteristics.extensionElements.values && n.loopCharacteristics.extensionElements.values.length && this.$set(
1106
1106
  this.loopInstanceForm,
1107
1107
  "timeCycle",
1108
- i.loopCharacteristics.extensionElements.values[0].body
1108
+ n.loopCharacteristics.extensionElements.values[0].body
1109
1109
  );
1110
1110
  },
1111
- changeLoopCharacteristicsType(i) {
1112
- if (i === "Null") {
1111
+ changeLoopCharacteristicsType(n) {
1112
+ if (n === "Null") {
1113
1113
  this.bpmnInstances.modeling.updateProperties(this.element, { loopCharacteristics: null });
1114
1114
  return;
1115
1115
  }
1116
- if (i === "StandardLoop") {
1116
+ if (n === "StandardLoop") {
1117
1117
  const e = this.bpmnInstances.moddle.create("bpmn:StandardLoopCharacteristics");
1118
1118
  this.bpmnInstances.modeling.updateProperties(this.element, {
1119
1119
  loopCharacteristics: e
1120
1120
  }), this.multiLoopInstance = null;
1121
1121
  return;
1122
1122
  }
1123
- i === "SequentialMultiInstance" ? this.multiLoopInstance = this.bpmnInstances.moddle.create("bpmn:MultiInstanceLoopCharacteristics", {
1123
+ n === "SequentialMultiInstance" ? this.multiLoopInstance = this.bpmnInstances.moddle.create("bpmn:MultiInstanceLoopCharacteristics", {
1124
1124
  isSequential: !0
1125
1125
  }) : this.multiLoopInstance = this.bpmnInstances.moddle.create("bpmn:MultiInstanceLoopCharacteristics"), this.bpmnInstances.modeling.updateProperties(this.element, {
1126
1126
  loopCharacteristics: this.multiLoopInstance
1127
1127
  });
1128
1128
  },
1129
1129
  // 循环基数
1130
- updateLoopCardinality(i) {
1130
+ updateLoopCardinality(n) {
1131
1131
  let e = null;
1132
- i && i.length && (e = this.bpmnInstances.moddle.create("bpmn:FormalExpression", { body: i })), this.bpmnInstances.modeling.updateModdleProperties(this.element, this.multiLoopInstance, {
1132
+ n && n.length && (e = this.bpmnInstances.moddle.create("bpmn:FormalExpression", { body: n })), this.bpmnInstances.modeling.updateModdleProperties(this.element, this.multiLoopInstance, {
1133
1133
  loopCardinality: e
1134
1134
  });
1135
1135
  },
1136
1136
  // 完成条件
1137
- updateLoopCondition(i) {
1137
+ updateLoopCondition(n) {
1138
1138
  let e = null;
1139
- i && i.length && (e = this.bpmnInstances.moddle.create("bpmn:FormalExpression", { body: i })), this.bpmnInstances.modeling.updateModdleProperties(this.element, this.multiLoopInstance, {
1139
+ n && n.length && (e = this.bpmnInstances.moddle.create("bpmn:FormalExpression", { body: n })), this.bpmnInstances.modeling.updateModdleProperties(this.element, this.multiLoopInstance, {
1140
1140
  completionCondition: e
1141
1141
  });
1142
1142
  },
1143
1143
  // 重试周期
1144
- updateLoopTimeCycle(i) {
1144
+ updateLoopTimeCycle(n) {
1145
1145
  const e = this.bpmnInstances.moddle.create("bpmn:ExtensionElements", {
1146
1146
  values: [
1147
1147
  this.bpmnInstances.moddle.create(`${this.prefix}:FailedJobRetryTimeCycle`, {
1148
- body: i
1148
+ body: n
1149
1149
  })
1150
1150
  ]
1151
1151
  });
@@ -1161,53 +1161,77 @@ const Lt = $t.exports, Ot = {
1161
1161
  });
1162
1162
  },
1163
1163
  // 各异步状态
1164
- updateLoopAsync(i) {
1164
+ updateLoopAsync(n) {
1165
1165
  const { asyncBefore: e, asyncAfter: t } = this.loopInstanceForm;
1166
- let n = /* @__PURE__ */ Object.create(null);
1167
- !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);
1166
+ let i = /* @__PURE__ */ Object.create(null);
1167
+ !e && !t ? (this.$set(this.loopInstanceForm, "exclusive", !1), i = { asyncBefore: !1, asyncAfter: !1, exclusive: !1, extensionElements: null }) : i[n] = this.loopInstanceForm[n], this.bpmnInstances.modeling.updateModdleProperties(this.element, this.multiLoopInstance, i);
1168
1168
  }
1169
1169
  }
1170
1170
  };
1171
- var Pt = function() {
1171
+ var Mt = function() {
1172
1172
  var e = this, t = e._self._c;
1173
- return t("div", { staticClass: "panel-tab__content" }, [t("ElForm", { attrs: { size: "mini", "label-width": "90px" }, nativeOn: { submit: function(n) {
1174
- n.preventDefault();
1175
- } } }, [t("ElFormItem", { attrs: { label: "回路特性" } }, [t("ElSelect", { on: { change: e.changeLoopCharacteristicsType }, model: { value: e.loopCharacteristics, callback: function(n) {
1176
- e.loopCharacteristics = n;
1177
- }, expression: "loopCharacteristics" } }, [t("ElOption", { attrs: { label: "并行", value: "ParallelMultiInstance" } }), t("ElOption", { attrs: { label: "串行", value: "SequentialMultiInstance" } }), t("ElOption", { attrs: { label: "循环事件", value: "StandardLoop" } }), t("ElOption", { attrs: { label: "", value: "Null" } })], 1)], 1), e.loopCharacteristics === "ParallelMultiInstance" || e.loopCharacteristics === "SequentialMultiInstance" ? [t("ElFormItem", { key: "loopCardinality", attrs: { label: "循环基数" } }, [t("ElInput", { attrs: { clearable: "" }, on: { change: e.updateLoopCardinality }, model: { value: e.loopInstanceForm.loopCardinality, callback: function(n) {
1178
- e.$set(e.loopInstanceForm, "loopCardinality", n);
1179
- }, expression: "loopInstanceForm.loopCardinality" } })], 1), t("ElFormItem", { key: "collection", attrs: { label: "集合" } }, [t("ElInput", { attrs: { clearable: "" }, on: { change: e.updateLoopBase }, model: { value: e.loopInstanceForm.collection, callback: function(n) {
1180
- e.$set(e.loopInstanceForm, "collection", n);
1181
- }, expression: "loopInstanceForm.collection" } })], 1), t("ElFormItem", { key: "elementVariable", attrs: { label: "元素变量" } }, [t("ElInput", { attrs: { clearable: "" }, on: { change: e.updateLoopBase }, model: { value: e.loopInstanceForm.elementVariable, callback: function(n) {
1182
- e.$set(e.loopInstanceForm, "elementVariable", n);
1183
- }, expression: "loopInstanceForm.elementVariable" } })], 1), t("ElFormItem", { key: "completionCondition", attrs: { label: "完成条件" } }, [t("ElInput", { attrs: { clearable: "" }, on: { change: e.updateLoopCondition }, model: { value: e.loopInstanceForm.completionCondition, callback: function(n) {
1184
- e.$set(e.loopInstanceForm, "completionCondition", n);
1185
- }, expression: "loopInstanceForm.completionCondition" } })], 1), t("ElFormItem", { key: "async", attrs: { label: "异步状态" } }, [t("ElCheckbox", { attrs: { label: "异步前" }, on: { change: function(n) {
1173
+ return t("div", { staticClass: "panel-tab__content element-multi-instance" }, [t("ElForm", { attrs: { size: "mini", "label-width": "100px" }, nativeOn: { submit: function(i) {
1174
+ i.preventDefault();
1175
+ } } }, [t("ElFormItem", { attrs: { label: "回路特性" }, scopedSlots: e._u([{ key: "label", fn: function() {
1176
+ return [e._v(" 回路特性 "), t("ElTooltip", { attrs: { effect: "light" }, scopedSlots: e._u([{ key: "content", fn: function() {
1177
+ 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(" 未知")])])];
1178
+ }, proxy: !0 }]) }, [t("i", { staticClass: "el-icon-info" })])];
1179
+ }, proxy: !0 }]) }, [t("ElSelect", { staticStyle: { width: "100%" }, on: { change: e.changeLoopCharacteristicsType }, model: { value: e.loopCharacteristics, callback: function(i) {
1180
+ e.loopCharacteristics = i;
1181
+ }, expression: "loopCharacteristics" } }, [t("ElOption", { attrs: { label: "并行", value: "ParallelMultiInstance" } }), t("ElOption", { attrs: { label: "串行", value: "SequentialMultiInstance" } }), t("ElOption", { attrs: { label: "循环事件", value: "StandardLoop" } }), t("ElOption", { attrs: { label: "", value: "Null" } })], 1)], 1), e.loopCharacteristics === "ParallelMultiInstance" || e.loopCharacteristics === "SequentialMultiInstance" ? [t("ElFormItem", { key: "loopCardinality", attrs: { label: "循环基数" }, scopedSlots: e._u([{ key: "label", fn: function() {
1182
+ return [e._v(" 循环基数 "), t("ElTooltip", { attrs: { effect: "light" }, scopedSlots: e._u([{ key: "content", fn: function() {
1183
+ return [t("div", [e._v("与任务实例数相对,可不填")])];
1184
+ }, proxy: !0 }], null, !1, 3306633709) }, [t("i", { staticClass: "el-icon-info" })])];
1185
+ }, proxy: !0 }], null, !1, 3757615878) }, [t("ElInput", { attrs: { clearable: "" }, on: { change: e.updateLoopCardinality }, model: { value: e.loopInstanceForm.loopCardinality, callback: function(i) {
1186
+ e.$set(e.loopInstanceForm, "loopCardinality", i);
1187
+ }, expression: "loopInstanceForm.loopCardinality" } })], 1), t("ElFormItem", { key: "collection", attrs: { label: "集合名称", required: "" }, scopedSlots: e._u([{ key: "label", fn: function() {
1188
+ return [e._v(" 集合变量 "), t("ElTooltip", { attrs: { effect: "light" }, scopedSlots: e._u([{ key: "content", fn: function() {
1189
+ return [t("p", [e._v("流程变量名,设置为 "), t("span", { staticClass: "flow-tips-keyword" }, [e._v("${handlers}")]), e._v(" 就行")])];
1190
+ }, proxy: !0 }], null, !1, 2769289721) }, [t("i", { staticClass: "el-icon-info" })])];
1191
+ }, proxy: !0 }], null, !1, 3139340263) }, [t("ElInput", { attrs: { clearable: "" }, on: { change: e.updateLoopBase }, model: { value: e.loopInstanceForm.collection, callback: function(i) {
1192
+ e.$set(e.loopInstanceForm, "collection", i);
1193
+ }, expression: "loopInstanceForm.collection" } })], 1), t("ElFormItem", { key: "elementVariable", attrs: { label: "元素名称", required: "" }, scopedSlots: e._u([{ key: "label", fn: function() {
1194
+ return [e._v(" 元素变量 "), t("ElTooltip", { attrs: { effect: "light" }, scopedSlots: e._u([{ key: "content", fn: function() {
1195
+ 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('"值保持一致 ')])];
1196
+ }, proxy: !0 }], null, !1, 952223137) }, [t("i", { staticClass: "el-icon-info" })])];
1197
+ }, proxy: !0 }], null, !1, 1907746023) }, [t("ElInput", { attrs: { clearable: "" }, on: { change: e.updateLoopBase }, model: { value: e.loopInstanceForm.elementVariable, callback: function(i) {
1198
+ e.$set(e.loopInstanceForm, "elementVariable", i);
1199
+ }, expression: "loopInstanceForm.elementVariable" } })], 1), t("ElFormItem", { key: "completionCondition", attrs: { label: "完成条件" }, scopedSlots: e._u([{ key: "label", fn: function() {
1200
+ return [e._v(" 完成条件 "), t("ElTooltip", { attrs: { effect: "light" }, scopedSlots: e._u([{ key: "content", fn: function() {
1201
+ 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("不填要等所有实例完成才会结束该环节")])];
1202
+ }, proxy: !0 }], null, !1, 3464763714) }, [t("i", { staticClass: "el-icon-info" })])];
1203
+ }, proxy: !0 }], null, !1, 1913912486) }, [t("ElInput", { attrs: { clearable: "" }, on: { change: e.updateLoopCondition }, model: { value: e.loopInstanceForm.completionCondition, callback: function(i) {
1204
+ e.$set(e.loopInstanceForm, "completionCondition", i);
1205
+ }, expression: "loopInstanceForm.completionCondition" } })], 1), t("ElFormItem", { key: "async", attrs: { label: "异步状态" }, scopedSlots: e._u([{ key: "label", fn: function() {
1206
+ return [e._v(" 异步状态 "), t("ElTooltip", { attrs: { effect: "light" }, scopedSlots: e._u([{ key: "content", fn: function() {
1207
+ return [t("div", [e._v("目前没用到")])];
1208
+ }, proxy: !0 }], null, !1, 1935913218) }, [t("i", { staticClass: "el-icon-info" })])];
1209
+ }, proxy: !0 }], null, !1, 474663414) }, [t("ElCheckbox", { attrs: { label: "异步前" }, on: { change: function(i) {
1186
1210
  return e.updateLoopAsync("asyncBefore");
1187
- } }, model: { value: e.loopInstanceForm.asyncBefore, callback: function(n) {
1188
- e.$set(e.loopInstanceForm, "asyncBefore", n);
1189
- }, expression: "loopInstanceForm.asyncBefore" } }), t("ElCheckbox", { attrs: { label: "异步后" }, on: { change: function(n) {
1211
+ } }, model: { value: e.loopInstanceForm.asyncBefore, callback: function(i) {
1212
+ e.$set(e.loopInstanceForm, "asyncBefore", i);
1213
+ }, expression: "loopInstanceForm.asyncBefore" } }), t("ElCheckbox", { attrs: { label: "异步后" }, on: { change: function(i) {
1190
1214
  return e.updateLoopAsync("asyncAfter");
1191
- } }, model: { value: e.loopInstanceForm.asyncAfter, callback: function(n) {
1192
- e.$set(e.loopInstanceForm, "asyncAfter", n);
1193
- }, expression: "loopInstanceForm.asyncAfter" } }), e.loopInstanceForm.asyncAfter || e.loopInstanceForm.asyncBefore ? t("ElCheckbox", { attrs: { label: "排除" }, on: { change: function(n) {
1215
+ } }, model: { value: e.loopInstanceForm.asyncAfter, callback: function(i) {
1216
+ e.$set(e.loopInstanceForm, "asyncAfter", i);
1217
+ }, expression: "loopInstanceForm.asyncAfter" } }), e.loopInstanceForm.asyncAfter || e.loopInstanceForm.asyncBefore ? t("ElCheckbox", { attrs: { label: "排除" }, on: { change: function(i) {
1194
1218
  return e.updateLoopAsync("exclusive");
1195
- } }, model: { value: e.loopInstanceForm.exclusive, callback: function(n) {
1196
- e.$set(e.loopInstanceForm, "exclusive", n);
1197
- }, expression: "loopInstanceForm.exclusive" } }) : e._e()], 1), e.loopInstanceForm.asyncAfter || e.loopInstanceForm.asyncBefore ? t("ElFormItem", { key: "timeCycle", attrs: { label: "重试周期", prop: "timeCycle" } }, [t("ElInput", { attrs: { clearable: "" }, on: { change: e.updateLoopTimeCycle }, model: { value: e.loopInstanceForm.timeCycle, callback: function(n) {
1198
- e.$set(e.loopInstanceForm, "timeCycle", n);
1219
+ } }, model: { value: e.loopInstanceForm.exclusive, callback: function(i) {
1220
+ e.$set(e.loopInstanceForm, "exclusive", i);
1221
+ }, expression: "loopInstanceForm.exclusive" } }) : e._e()], 1), e.loopInstanceForm.asyncAfter || e.loopInstanceForm.asyncBefore ? t("ElFormItem", { key: "timeCycle", attrs: { label: "重试周期", prop: "timeCycle" } }, [t("ElInput", { attrs: { clearable: "" }, on: { change: e.updateLoopTimeCycle }, model: { value: e.loopInstanceForm.timeCycle, callback: function(i) {
1222
+ e.$set(e.loopInstanceForm, "timeCycle", i);
1199
1223
  }, expression: "loopInstanceForm.timeCycle" } })], 1) : e._e()] : e._e()], 2)], 1);
1200
- }, Mt = [], Dt = /* @__PURE__ */ h(
1201
- Ot,
1224
+ }, Dt = [], Bt = /* @__PURE__ */ h(
1202
1225
  Pt,
1203
1226
  Mt,
1227
+ Dt,
1204
1228
  !1,
1205
1229
  null,
1206
1230
  null,
1207
1231
  null,
1208
1232
  null
1209
1233
  );
1210
- const Bt = Dt.exports, Rt = {
1234
+ const Vt = Bt.exports, Rt = {
1211
1235
  name: "FlowCondition",
1212
1236
  props: {
1213
1237
  id: String,
@@ -1239,26 +1263,26 @@ const Bt = Dt.exports, Rt = {
1239
1263
  else if (!this.element.businessObject.conditionExpression)
1240
1264
  this.flowConditionForm = { type: "normal" };
1241
1265
  else {
1242
- const i = this.element.businessObject.conditionExpression;
1243
- if (this.flowConditionForm = T(u({}, i), { type: "condition" }), this.flowConditionForm.resource) {
1266
+ const n = this.element.businessObject.conditionExpression;
1267
+ if (this.flowConditionForm = T(u({}, n), { type: "condition" }), this.flowConditionForm.resource) {
1244
1268
  this.$set(this.flowConditionForm, "conditionType", "script"), this.$set(this.flowConditionForm, "scriptType", "externalScript");
1245
1269
  return;
1246
1270
  }
1247
- if (i.language) {
1271
+ if (n.language) {
1248
1272
  this.$set(this.flowConditionForm, "conditionType", "script"), this.$set(this.flowConditionForm, "scriptType", "inlineScript");
1249
1273
  return;
1250
1274
  }
1251
1275
  this.$set(this.flowConditionForm, "conditionType", "expression");
1252
1276
  }
1253
1277
  },
1254
- updateFlowType(i) {
1255
- if (i === "condition") {
1278
+ updateFlowType(n) {
1279
+ if (n === "condition") {
1256
1280
  this.flowConditionRef = this.bpmnInstances.moddle.create("bpmn:FormalExpression"), this.bpmnInstances.modeling.updateProperties(this.element, {
1257
1281
  conditionExpression: this.flowConditionRef
1258
1282
  });
1259
1283
  return;
1260
1284
  }
1261
- if (i === "default") {
1285
+ if (n === "default") {
1262
1286
  this.bpmnInstances.modeling.updateProperties(this.element, {
1263
1287
  conditionExpression: null
1264
1288
  }), this.bpmnInstances.modeling.updateProperties(this.bpmnElementSource, {
@@ -1273,34 +1297,34 @@ const Bt = Dt.exports, Rt = {
1273
1297
  });
1274
1298
  },
1275
1299
  updateFlowCondition() {
1276
- const { conditionType: i, scriptType: e, body: t, resource: n, language: s } = this.flowConditionForm;
1277
- let r;
1278
- i === "expression" ? r = this.bpmnInstances.moddle.create("bpmn:FormalExpression", { body: t }) : e === "inlineScript" ? (r = this.bpmnInstances.moddle.create("bpmn:FormalExpression", { body: t, language: s }), this.$set(this.flowConditionForm, "resource", "")) : (this.$set(this.flowConditionForm, "body", ""), r = this.bpmnInstances.moddle.create("bpmn:FormalExpression", { resource: n, language: s })), this.bpmnInstances.modeling.updateProperties(this.element, { conditionExpression: r });
1300
+ const { conditionType: n, scriptType: e, body: t, resource: i, language: s } = this.flowConditionForm;
1301
+ let a;
1302
+ n === "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: i, language: s })), this.bpmnInstances.modeling.updateProperties(this.element, { conditionExpression: a });
1279
1303
  }
1280
1304
  }
1281
1305
  };
1282
- var Vt = function() {
1306
+ var zt = function() {
1283
1307
  var e = this, t = e._self._c;
1284
- return t("div", { staticClass: "panel-tab__content" }, [t("ElForm", { attrs: { model: e.flowConditionForm, "label-width": "90px", size: "mini" }, nativeOn: { submit: function(n) {
1285
- n.preventDefault();
1286
- } } }, [t("ElFormItem", { attrs: { label: "流转类型" } }, [t("ElSelect", { on: { change: e.updateFlowType }, model: { value: e.flowConditionForm.type, callback: function(n) {
1287
- e.$set(e.flowConditionForm, "type", n);
1288
- }, expression: "flowConditionForm.type" } }, [t("ElOption", { attrs: { label: "普通流转路径", value: "normal" } }), t("ElOption", { attrs: { label: "默认流转路径", value: "default" } }), t("ElOption", { attrs: { label: "条件流转路径", value: "condition" } })], 1)], 1), e.flowConditionForm.type === "condition" ? t("ElFormItem", { key: "condition", attrs: { label: "条件格式" } }, [t("ElSelect", { model: { value: e.flowConditionForm.conditionType, callback: function(n) {
1289
- e.$set(e.flowConditionForm, "conditionType", n);
1290
- }, expression: "flowConditionForm.conditionType" } }, [t("ElOption", { attrs: { label: "表达式", value: "expression" } }), t("ElOption", { attrs: { label: "脚本", value: "script" } })], 1)], 1) : e._e(), e.flowConditionForm.conditionType && e.flowConditionForm.conditionType === "expression" ? t("ElFormItem", { key: "express", attrs: { label: "表达式" } }, [t("ElInput", { attrs: { clearable: "" }, on: { change: e.updateFlowCondition }, model: { value: e.flowConditionForm.body, callback: function(n) {
1291
- e.$set(e.flowConditionForm, "body", n);
1292
- }, expression: "flowConditionForm.body" } })], 1) : e._e(), e.flowConditionForm.conditionType && e.flowConditionForm.conditionType === "script" ? [t("ElFormItem", { key: "language", attrs: { label: "脚本语言" } }, [t("ElInput", { attrs: { clearable: "" }, on: { change: e.updateFlowCondition }, model: { value: e.flowConditionForm.language, callback: function(n) {
1293
- e.$set(e.flowConditionForm, "language", n);
1294
- }, expression: "flowConditionForm.language" } })], 1), t("ElFormItem", { key: "scriptType", attrs: { label: "脚本类型" } }, [t("ElSelect", { model: { value: e.flowConditionForm.scriptType, callback: function(n) {
1295
- e.$set(e.flowConditionForm, "scriptType", n);
1296
- }, expression: "flowConditionForm.scriptType" } }, [t("ElOption", { attrs: { label: "内联脚本", value: "inlineScript" } }), t("ElOption", { attrs: { label: "外部脚本", value: "externalScript" } })], 1)], 1), e.flowConditionForm.scriptType === "inlineScript" ? t("ElFormItem", { key: "body", attrs: { label: "脚本" } }, [t("ElInput", { attrs: { type: "textarea", clearable: "" }, on: { change: e.updateFlowCondition }, model: { value: e.flowConditionForm.body, callback: function(n) {
1297
- e.$set(e.flowConditionForm, "body", n);
1298
- }, expression: "flowConditionForm.body" } })], 1) : e._e(), e.flowConditionForm.scriptType === "externalScript" ? t("ElFormItem", { key: "resource", attrs: { label: "资源地址" } }, [t("ElInput", { attrs: { clearable: "" }, on: { change: e.updateFlowCondition }, model: { value: e.flowConditionForm.resource, callback: function(n) {
1299
- e.$set(e.flowConditionForm, "resource", n);
1308
+ return t("div", { staticClass: "panel-tab__content" }, [t("ElForm", { attrs: { model: e.flowConditionForm, "label-width": "90px", size: "mini" }, nativeOn: { submit: function(i) {
1309
+ i.preventDefault();
1310
+ } } }, [t("ElFormItem", { attrs: { label: "流转类型" } }, [t("ElSelect", { on: { change: e.updateFlowType }, model: { value: e.flowConditionForm.type, callback: function(i) {
1311
+ e.$set(e.flowConditionForm, "type", i);
1312
+ }, expression: "flowConditionForm.type" } }, [t("ElOption", { attrs: { label: "普通流转路径", value: "normal" } }), t("ElOption", { attrs: { label: "默认流转路径", value: "default" } }), t("ElOption", { attrs: { label: "条件流转路径", value: "condition" } })], 1)], 1), e.flowConditionForm.type === "condition" ? t("ElFormItem", { key: "condition", attrs: { label: "条件格式" } }, [t("ElSelect", { model: { value: e.flowConditionForm.conditionType, callback: function(i) {
1313
+ e.$set(e.flowConditionForm, "conditionType", i);
1314
+ }, expression: "flowConditionForm.conditionType" } }, [t("ElOption", { attrs: { label: "表达式", value: "expression" } }), t("ElOption", { attrs: { label: "脚本", value: "script" } })], 1)], 1) : e._e(), e.flowConditionForm.conditionType && e.flowConditionForm.conditionType === "expression" ? t("ElFormItem", { key: "express", attrs: { label: "表达式" } }, [t("ElInput", { attrs: { clearable: "" }, on: { change: e.updateFlowCondition }, model: { value: e.flowConditionForm.body, callback: function(i) {
1315
+ e.$set(e.flowConditionForm, "body", i);
1316
+ }, expression: "flowConditionForm.body" } })], 1) : e._e(), e.flowConditionForm.conditionType && e.flowConditionForm.conditionType === "script" ? [t("ElFormItem", { key: "language", attrs: { label: "脚本语言" } }, [t("ElInput", { attrs: { clearable: "" }, on: { change: e.updateFlowCondition }, model: { value: e.flowConditionForm.language, callback: function(i) {
1317
+ e.$set(e.flowConditionForm, "language", i);
1318
+ }, expression: "flowConditionForm.language" } })], 1), t("ElFormItem", { key: "scriptType", attrs: { label: "脚本类型" } }, [t("ElSelect", { model: { value: e.flowConditionForm.scriptType, callback: function(i) {
1319
+ e.$set(e.flowConditionForm, "scriptType", i);
1320
+ }, expression: "flowConditionForm.scriptType" } }, [t("ElOption", { attrs: { label: "内联脚本", value: "inlineScript" } }), t("ElOption", { attrs: { label: "外部脚本", value: "externalScript" } })], 1)], 1), e.flowConditionForm.scriptType === "inlineScript" ? t("ElFormItem", { key: "body", attrs: { label: "脚本" } }, [t("ElInput", { attrs: { type: "textarea", clearable: "" }, on: { change: e.updateFlowCondition }, model: { value: e.flowConditionForm.body, callback: function(i) {
1321
+ e.$set(e.flowConditionForm, "body", i);
1322
+ }, expression: "flowConditionForm.body" } })], 1) : e._e(), e.flowConditionForm.scriptType === "externalScript" ? t("ElFormItem", { key: "resource", attrs: { label: "资源地址" } }, [t("ElInput", { attrs: { clearable: "" }, on: { change: e.updateFlowCondition }, model: { value: e.flowConditionForm.resource, callback: function(i) {
1323
+ e.$set(e.flowConditionForm, "resource", i);
1300
1324
  }, expression: "flowConditionForm.resource" } })], 1) : e._e()] : e._e()], 2)], 1);
1301
- }, jt = [], zt = /* @__PURE__ */ h(
1325
+ }, jt = [], Ut = /* @__PURE__ */ h(
1302
1326
  Rt,
1303
- Vt,
1327
+ zt,
1304
1328
  jt,
1305
1329
  !1,
1306
1330
  null,
@@ -1308,7 +1332,7 @@ var Vt = function() {
1308
1332
  null,
1309
1333
  null
1310
1334
  );
1311
- const Ut = zt.exports, Nt = {
1335
+ const Nt = Ut.exports, Gt = {
1312
1336
  name: "SignalAndMessage",
1313
1337
  props: {
1314
1338
  bpmnInstances: Object
@@ -1332,82 +1356,82 @@ const Ut = zt.exports, Nt = {
1332
1356
  },
1333
1357
  methods: {
1334
1358
  initDataList() {
1335
- this.rootElements = this.bpmnInstances.modeler.getDefinitions().rootElements, this.messageIdMap = {}, this.signalIdMap = {}, this.messageList = [], this.signalList = [], this.rootElements.forEach((i) => {
1336
- i.$type === "bpmn:Message" && (this.messageIdMap[i.id] = !0, this.messageList.push(u({}, i))), i.$type === "bpmn:Signal" && (this.signalIdMap[i.id] = !0, this.signalList.push(u({}, i)));
1359
+ this.rootElements = this.bpmnInstances.modeler.getDefinitions().rootElements, this.messageIdMap = {}, this.signalIdMap = {}, this.messageList = [], this.signalList = [], this.rootElements.forEach((n) => {
1360
+ n.$type === "bpmn:Message" && (this.messageIdMap[n.id] = !0, this.messageList.push(u({}, n))), n.$type === "bpmn:Signal" && (this.signalIdMap[n.id] = !0, this.signalList.push(u({}, n)));
1337
1361
  });
1338
1362
  },
1339
- openModel(i) {
1340
- this.modelType = i, this.modelObjectForm = {}, this.modelVisible = !0;
1363
+ openModel(n) {
1364
+ this.modelType = n, this.modelObjectForm = {}, this.modelVisible = !0;
1341
1365
  },
1342
1366
  addNewObject() {
1343
1367
  if (this.modelType === "message") {
1344
1368
  if (this.messageIdMap[this.modelObjectForm.id])
1345
1369
  return this.$message.error("该消息已存在,请修改id后重新保存");
1346
- const i = this.bpmnInstances.moddle.create("bpmn:Message", this.modelObjectForm);
1347
- this.rootElements.push(i);
1370
+ const n = this.bpmnInstances.moddle.create("bpmn:Message", this.modelObjectForm);
1371
+ this.rootElements.push(n);
1348
1372
  } else {
1349
1373
  if (this.signalIdMap[this.modelObjectForm.id])
1350
1374
  return this.$message.error("该信号已存在,请修改id后重新保存");
1351
- const i = this.bpmnInstances.moddle.create("bpmn:Signal", this.modelObjectForm);
1352
- this.rootElements.push(i);
1375
+ const n = this.bpmnInstances.moddle.create("bpmn:Signal", this.modelObjectForm);
1376
+ this.rootElements.push(n);
1353
1377
  }
1354
1378
  this.modelVisible = !1, this.initDataList();
1355
1379
  }
1356
1380
  }
1357
1381
  };
1358
- var Gt = function() {
1382
+ var qt = function() {
1359
1383
  var e = this, t = e._self._c;
1360
- return t("div", { staticClass: "panel-tab__content" }, [t("div", { staticClass: "panel-tab__content--title" }, [e._m(0), t("ElButton", { attrs: { size: "mini", type: "primary", icon: "el-icon-plus" }, on: { click: function(n) {
1384
+ return t("div", { staticClass: "panel-tab__content" }, [t("div", { staticClass: "panel-tab__content--title" }, [e._m(0), t("ElButton", { attrs: { size: "mini", type: "primary", icon: "el-icon-plus" }, on: { click: function(i) {
1361
1385
  return e.openModel("message");
1362
- } } }, [e._v("创建新消息")])], 1), t("ElTable", { attrs: { data: e.messageList, size: "mini", border: "" } }, [t("ElTableColumn", { attrs: { type: "index", label: "序号", width: "60px" } }), t("ElTableColumn", { attrs: { label: "消息ID", prop: "id", "max-width": "300px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "消息名称", prop: "name", "max-width": "300px", "show-overflow-tooltip": "" } })], 1), t("div", { staticClass: "panel-tab__content--title", staticStyle: { "margin-top": "8px", "padding-top": "8px", "border-top": "1px solid #eee" } }, [e._m(1), t("ElButton", { attrs: { size: "mini", type: "primary", icon: "el-icon-plus" }, on: { click: function(n) {
1386
+ } } }, [e._v("创建新消息")])], 1), t("ElTable", { attrs: { data: e.messageList, size: "mini", border: "" } }, [t("ElTableColumn", { attrs: { type: "index", label: "序号", width: "60px" } }), t("ElTableColumn", { attrs: { label: "消息ID", prop: "id", "max-width": "300px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "消息名称", prop: "name", "max-width": "300px", "show-overflow-tooltip": "" } })], 1), t("div", { staticClass: "panel-tab__content--title", staticStyle: { "margin-top": "8px", "padding-top": "8px", "border-top": "1px solid #eee" } }, [e._m(1), t("ElButton", { attrs: { size: "mini", type: "primary", icon: "el-icon-plus" }, on: { click: function(i) {
1363
1387
  return e.openModel("signal");
1364
- } } }, [e._v("创建新信号")])], 1), t("ElTable", { attrs: { data: e.signalList, size: "mini", border: "" } }, [t("ElTableColumn", { attrs: { type: "index", label: "序号", width: "60px" } }), t("ElTableColumn", { attrs: { label: "信号ID", prop: "id", "max-width": "300px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "信号名称", prop: "name", "max-width": "300px", "show-overflow-tooltip": "" } })], 1), t("ElementDialog", { attrs: { visible: e.modelVisible, title: e.modelConfig.title, "close-on-click-modal": !1, width: "400px", "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(n) {
1365
- e.modelVisible = n;
1388
+ } } }, [e._v("创建新信号")])], 1), t("ElTable", { attrs: { data: e.signalList, size: "mini", border: "" } }, [t("ElTableColumn", { attrs: { type: "index", label: "序号", width: "60px" } }), t("ElTableColumn", { attrs: { label: "信号ID", prop: "id", "max-width": "300px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "信号名称", prop: "name", "max-width": "300px", "show-overflow-tooltip": "" } })], 1), t("ElementDialog", { attrs: { visible: e.modelVisible, title: e.modelConfig.title, "close-on-click-modal": !1, width: "400px", "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(i) {
1389
+ e.modelVisible = i;
1366
1390
  } }, scopedSlots: e._u([{ key: "footer", fn: function() {
1367
- return [t("ElButton", { attrs: { size: "mini" }, on: { click: function(n) {
1391
+ return [t("ElButton", { attrs: { size: "mini" }, on: { click: function(i) {
1368
1392
  e.modelVisible = !1;
1369
1393
  } } }, [e._v("取 消")]), t("ElButton", { attrs: { size: "mini", type: "primary" }, on: { click: e.addNewObject } }, [e._v("保 存")])];
1370
- }, proxy: !0 }]) }, [t("ElForm", { attrs: { model: e.modelObjectForm, size: "mini", "label-width": "90px" }, nativeOn: { submit: function(n) {
1371
- n.preventDefault();
1372
- } } }, [t("ElFormItem", { attrs: { label: e.modelConfig.idLabel } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.modelObjectForm.id, callback: function(n) {
1373
- e.$set(e.modelObjectForm, "id", n);
1374
- }, expression: "modelObjectForm.id" } })], 1), t("ElFormItem", { attrs: { label: e.modelConfig.nameLabel } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.modelObjectForm.name, callback: function(n) {
1375
- e.$set(e.modelObjectForm, "name", n);
1394
+ }, proxy: !0 }]) }, [t("ElForm", { attrs: { model: e.modelObjectForm, size: "mini", "label-width": "90px" }, nativeOn: { submit: function(i) {
1395
+ i.preventDefault();
1396
+ } } }, [t("ElFormItem", { attrs: { label: e.modelConfig.idLabel } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.modelObjectForm.id, callback: function(i) {
1397
+ e.$set(e.modelObjectForm, "id", i);
1398
+ }, expression: "modelObjectForm.id" } })], 1), t("ElFormItem", { attrs: { label: e.modelConfig.nameLabel } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.modelObjectForm.name, callback: function(i) {
1399
+ e.$set(e.modelObjectForm, "name", i);
1376
1400
  }, expression: "modelObjectForm.name" } })], 1)], 1)], 1)], 1);
1377
- }, qt = [function() {
1378
- var i = this, e = i._self._c;
1379
- return e("span", [e("i", { staticClass: "el-icon-menu", staticStyle: { "margin-right": "8px", color: "#555" } }), i._v("消息列表")]);
1401
+ }, Kt = [function() {
1402
+ var n = this, e = n._self._c;
1403
+ return e("span", [e("i", { staticClass: "el-icon-menu", staticStyle: { "margin-right": "8px", color: "#555" } }), n._v("消息列表")]);
1380
1404
  }, function() {
1381
- var i = this, e = i._self._c;
1382
- return e("span", [e("i", { staticClass: "el-icon-menu", staticStyle: { "margin-right": "8px", color: "#555" } }), i._v("信号列表")]);
1383
- }], Kt = /* @__PURE__ */ h(
1384
- Nt,
1405
+ var n = this, e = n._self._c;
1406
+ return e("span", [e("i", { staticClass: "el-icon-menu", staticStyle: { "margin-right": "8px", color: "#555" } }), n._v("信号列表")]);
1407
+ }], Jt = /* @__PURE__ */ h(
1385
1408
  Gt,
1386
1409
  qt,
1410
+ Kt,
1387
1411
  !1,
1388
1412
  null,
1389
1413
  null,
1390
1414
  null,
1391
1415
  null
1392
1416
  );
1393
- const Jt = Kt.exports;
1394
- function de(i) {
1395
- let e = u({}, i);
1396
- if (i.script && (e = T(u(u({}, i), i.script), {
1397
- scriptType: i.script.resource ? "externalScript" : "inlineScript"
1398
- })), i.event === "timeout" && i.eventDefinitions && i.eventDefinitions.length) {
1417
+ const Zt = Jt.exports;
1418
+ function de(n) {
1419
+ let e = u({}, n);
1420
+ if (n.script && (e = T(u(u({}, n), n.script), {
1421
+ scriptType: n.script.resource ? "externalScript" : "inlineScript"
1422
+ })), n.event === "timeout" && n.eventDefinitions && n.eventDefinitions.length) {
1399
1423
  let t = "";
1400
- for (const n in i.eventDefinitions[0])
1401
- n.indexOf("time") !== -1 && (t = n, e.eventDefinitionType = n.replace("time", "").toLowerCase());
1402
- e.eventTimeDefinitions = i.eventDefinitions[0][t].body;
1424
+ for (const i in n.eventDefinitions[0])
1425
+ i.indexOf("time") !== -1 && (t = i, e.eventDefinitionType = i.replace("time", "").toLowerCase());
1426
+ e.eventTimeDefinitions = n.eventDefinitions[0][t].body;
1403
1427
  }
1404
1428
  return e;
1405
1429
  }
1406
- function fe(i) {
1407
- var t, n;
1430
+ function fe(n) {
1431
+ var t, i;
1408
1432
  let e;
1409
- return i.class && (e = "classListener"), i.expression && (e = "expressionListener"), i.delegateExpression && (e = "delegateExpressionListener"), i.script && (e = "scriptListener"), T(u(u({}, v(i)), (t = i.script) != null ? t : {}), {
1410
- fields: (n = i.fields) == null ? void 0 : n.map((s) => T(u({}, s), { fieldType: s.expression ? "expression" : "string" })),
1433
+ return n.class && (e = "classListener"), n.expression && (e = "expressionListener"), n.delegateExpression && (e = "delegateExpressionListener"), n.script && (e = "scriptListener"), T(u(u({}, g(n)), (t = n.script) != null ? t : {}), {
1434
+ fields: (i = n.fields) == null ? void 0 : i.map((s) => T(u({}, s), { fieldType: s.expression ? "expression" : "string" })),
1411
1435
  listenerType: e
1412
1436
  });
1413
1437
  }
@@ -1416,7 +1440,7 @@ const be = {
1416
1440
  expressionListener: "表达式",
1417
1441
  delegateExpressionListener: "代理表达式",
1418
1442
  scriptListener: "脚本"
1419
- }, Zt = {
1443
+ }, Ht = {
1420
1444
  create: "创建",
1421
1445
  assignment: "指派",
1422
1446
  complete: "完成",
@@ -1426,11 +1450,27 @@ const be = {
1426
1450
  }, ye = {
1427
1451
  string: "字符串",
1428
1452
  expression: "表达式"
1429
- }, Ht = {
1453
+ }, Wt = (n, e) => ({
1454
+ $type: "flowable:ExecutionListener",
1455
+ event: n === "draft" ? "start" : n,
1456
+ // eslint-disable-next-line no-template-curly-in-string
1457
+ delegateExpression: "${httpInvokeExecutionListener}",
1458
+ fields: [],
1459
+ listenerType: "delegateExpressionListener"
1460
+ }), Xt = (n, e) => [
1461
+ { $type: "flowable:Field", name: "serviceId", string: e.serviceId, fieldType: "string" },
1462
+ {
1463
+ $type: "flowable:Field",
1464
+ name: "url",
1465
+ string: `${e != null && e.url ? `/${e.url}` : ""}/flow${Pe(n)}`,
1466
+ fieldType: "string"
1467
+ }
1468
+ ], Yt = {
1430
1469
  name: "ElementListeners",
1431
1470
  inject: {
1432
1471
  prefix: "prefix",
1433
- width: "width"
1472
+ width: "width",
1473
+ context: "context"
1434
1474
  },
1435
1475
  props: {
1436
1476
  id: String,
@@ -1458,36 +1498,57 @@ const be = {
1458
1498
  fieldTypeObject: ye
1459
1499
  };
1460
1500
  },
1501
+ computed: {
1502
+ apis() {
1503
+ var e;
1504
+ return (((e = this.context) == null ? void 0 : e.apis) || ["flowDraft", "flowStart", "flowEnd"]).map((t) => {
1505
+ var i;
1506
+ return `${(i = this.context) != null && i.url ? `/${this.context.url}/` : ""}${t}`;
1507
+ }) || [];
1508
+ }
1509
+ },
1461
1510
  watch: {
1462
1511
  id: {
1463
1512
  immediate: !0,
1464
- handler(i) {
1513
+ handler(n) {
1465
1514
  return d(this, null, function* () {
1466
- i && (yield this.$nextTick(), this.resetListenersList());
1515
+ n && (yield this.$nextTick(), this.resetListenersList());
1467
1516
  });
1468
1517
  }
1469
1518
  }
1470
1519
  },
1471
1520
  methods: {
1472
1521
  resetListenersList() {
1473
- var i, e, t, n;
1474
- this.otherExtensionList = [], this.bpmnElementListeners = (n = (t = (e = (i = this.element.businessObject) == null ? void 0 : i.extensionElements) == null ? void 0 : e.values) == null ? void 0 : t.filter(
1522
+ var n, e, t, i;
1523
+ this.otherExtensionList = [], this.bpmnElementListeners = (i = (t = (e = (n = this.element.businessObject) == null ? void 0 : n.extensionElements) == null ? void 0 : e.values) == null ? void 0 : t.filter(
1475
1524
  (s) => s.$type === `${this.prefix}:ExecutionListener`
1476
- )) != null ? n : [], this.elementListenersList = this.bpmnElementListeners.map((s) => fe(s));
1525
+ )) != null ? i : [], this.elementListenersList = this.bpmnElementListeners.map((s) => fe(s));
1477
1526
  },
1478
- changeFiledType(i) {
1479
- i === "string" ? (delete this.listenerFieldForm.expression, this.$set(this.listenerFieldForm, "string", "")) : (delete this.listenerFieldForm.string, this.$set(this.listenerFieldForm, "expression", ""));
1527
+ changeFiledType(n) {
1528
+ n === "string" ? (delete this.listenerFieldForm.expression, this.$set(this.listenerFieldForm, "string", "")) : (delete this.listenerFieldForm.string, this.$set(this.listenerFieldForm, "expression", ""));
1529
+ },
1530
+ assignListener(n) {
1531
+ const e = Wt(n, this.context);
1532
+ e.fields = Xt(n, this.context), this.listenerForm = e, this.fieldsListOfListener = e.fields;
1533
+ },
1534
+ setDefaultFieldValue(n) {
1535
+ n !== "url" ? this.$set(this.listenerFieldForm, "string", this.context[n] || "") : this.$set(this.listenerFieldForm, "string", "");
1480
1536
  },
1481
1537
  // 打开 监听器详情 侧边栏
1482
- openListenerForm(i, e) {
1538
+ openListenerForm(n, e) {
1483
1539
  return d(this, null, function* () {
1484
1540
  var t;
1485
- i ? (this.listenerForm = de(i), this.editingListenerIndex = e) : (this.listenerForm = {}, this.editingListenerIndex = -1), i && i.fields ? this.fieldsListOfListener = i.fields.map((n) => u({}, n)) : (this.fieldsListOfListener = [], this.$set(this.listenerForm, "fields", [])), this.listenerFormModelVisible = !0, yield this.$nextTick(), (t = this.$refs.listenerFormRef) == null || t.clearValidate();
1541
+ if (n) {
1542
+ const i = de(n);
1543
+ n.fields ? i.fields = n.fields.map((s) => u({}, s)) : i.fields = [], this.listenerForm = i, this.fieldsListOfListener = i.fields, this.editingListenerIndex = e;
1544
+ } else
1545
+ this.listenerForm = { fields: [] }, this.fieldsListOfListener = this.listenerForm.fields, this.editingListenerIndex = -1;
1546
+ this.listenerFormModelVisible = !0, yield this.$nextTick(), (t = this.$refs.listenerFormRef) == null || t.clearValidate();
1486
1547
  });
1487
1548
  },
1488
1549
  // 打开监听器字段编辑弹窗
1489
- openListenerFieldForm(i, e) {
1490
- this.listenerFieldForm = i ? v(i) : {}, this.editingListenerFieldIndex = i ? e : -1, this.listenerFieldFormModelVisible = !0, this.$nextTick(() => {
1550
+ openListenerFieldForm(n, e) {
1551
+ this.listenerFieldForm = n ? g(n) : { fieldType: "string" }, this.editingListenerFieldIndex = n ? e : -1, this.listenerFieldFormModelVisible = !0, this.$nextTick(() => {
1491
1552
  this.$refs.listenerFieldFormRef && this.$refs.listenerFieldFormRef.clearValidate();
1492
1553
  });
1493
1554
  },
@@ -1498,7 +1559,7 @@ const be = {
1498
1559
  });
1499
1560
  },
1500
1561
  // 移除监听器字段
1501
- removeListenerField(i, e) {
1562
+ removeListenerField(n, e) {
1502
1563
  return d(this, null, function* () {
1503
1564
  try {
1504
1565
  yield this.$confirm("确认移除该字段吗?", "提示"), this.fieldsListOfListener.splice(e, 1), this.listenerForm.fields.splice(e, 1);
@@ -1507,7 +1568,7 @@ const be = {
1507
1568
  });
1508
1569
  },
1509
1570
  // 移除监听器
1510
- removeListener(i, e) {
1571
+ removeListener(n, e) {
1511
1572
  return d(this, null, function* () {
1512
1573
  try {
1513
1574
  yield this.$confirm("确认移除该监听器吗?", "提示"), this.bpmnElementListeners.splice(e, 1), this.elementListenersList.splice(e, 1), U(
@@ -1522,13 +1583,13 @@ const be = {
1522
1583
  // 保存监听器配置
1523
1584
  saveListenerConfig() {
1524
1585
  return d(this, null, function* () {
1525
- var t, n, s, r;
1586
+ var t, i, s, a;
1526
1587
  if (!(yield this.$refs.listenerFormRef.validate()))
1527
1588
  return;
1528
1589
  const e = ue(this.bpmnInstances, this.listenerForm, !1, this.prefix);
1529
- 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 = (r = (s = (n = (t = this.element.businessObject) == null ? void 0 : t.extensionElements) == null ? void 0 : n.values) == null ? void 0 : s.filter(
1530
- (a) => a.$type !== `${this.prefix}:ExecutionListener`
1531
- )) != null ? r : [], U(
1590
+ 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 = (a = (s = (i = (t = this.element.businessObject) == null ? void 0 : t.extensionElements) == null ? void 0 : i.values) == null ? void 0 : s.filter(
1591
+ (r) => r.$type !== `${this.prefix}:ExecutionListener`
1592
+ )) != null ? a : [], U(
1532
1593
  this.bpmnInstances,
1533
1594
  this.element,
1534
1595
  this.otherExtensionList.concat(this.bpmnElementListeners)
@@ -1537,80 +1598,99 @@ const be = {
1537
1598
  }
1538
1599
  }
1539
1600
  };
1540
- var Wt = function() {
1601
+ var Qt = function() {
1602
+ var i, s, a;
1541
1603
  var e = this, t = e._self._c;
1542
- return t("div", { staticClass: "panel-tab__content" }, [t("ElTable", { attrs: { data: e.elementListenersList, size: "mini", border: "" } }, [t("ElTableColumn", { attrs: { label: "序号", width: "50px", type: "index" } }), t("ElTableColumn", { attrs: { label: "事件类型", "min-width": "100px", prop: "event" } }), t("ElTableColumn", { attrs: { label: "监听器类型", "min-width": "100px", "show-overflow-tooltip": "", formatter: (n) => e.listenerTypeObject[n.listenerType] } }), t("ElTableColumn", { attrs: { label: "操作", width: "90px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: n, $index: s }) {
1543
- return [t("ElButton", { attrs: { size: "mini", type: "text" }, on: { click: function(r) {
1544
- return e.openListenerForm(n, s);
1545
- } } }, [e._v("编辑")]), t("ElDivider", { attrs: { direction: "vertical" } }), t("ElButton", { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(r) {
1546
- return e.removeListener(n, s);
1604
+ return t("div", { staticClass: "panel-tab__content element-listeners" }, [t("ElTable", { attrs: { data: e.elementListenersList, size: "mini", border: "" } }, [t("ElTableColumn", { attrs: { label: "序号", width: "50px", type: "index" } }), t("ElTableColumn", { attrs: { label: "事件类型", "min-width": "100px", prop: "event" } }), t("ElTableColumn", { attrs: { label: "监听器类型", "min-width": "100px", "show-overflow-tooltip": "", formatter: (r) => e.listenerTypeObject[r.listenerType] } }), t("ElTableColumn", { attrs: { label: "操作", width: "90px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: r, $index: o }) {
1605
+ return [t("ElButton", { attrs: { size: "mini", type: "text" }, on: { click: function(p) {
1606
+ return e.openListenerForm(r, o);
1607
+ } } }, [e._v("编辑")]), t("ElDivider", { attrs: { direction: "vertical" } }), t("ElButton", { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(p) {
1608
+ return e.removeListener(r, o);
1547
1609
  } } }, [e._v("移除")])];
1548
- } }]) })], 1), t("div", { staticClass: "element-drawer__button" }, [t("ElButton", { attrs: { size: "mini", type: "primary", icon: "el-icon-plus" }, on: { click: function(n) {
1610
+ } }]) })], 1), t("div", { staticClass: "element-drawer__button" }, [t("ElButton", { attrs: { size: "mini", type: "primary", icon: "el-icon-plus" }, on: { click: function(r) {
1549
1611
  return e.openListenerForm(null);
1550
- } } }, [e._v("添加监听器")])], 1), t("ElDrawer", { staticClass: "flow-drawer", attrs: { visible: e.listenerFormModelVisible, title: "执行监听器", size: `${e.width}px`, "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(n) {
1551
- e.listenerFormModelVisible = n;
1552
- } } }, [t("ElForm", { ref: "listenerFormRef", attrs: { size: "mini", model: e.listenerForm, "label-width": "96px" }, nativeOn: { submit: function(n) {
1553
- n.preventDefault();
1554
- } } }, [t("ElFormItem", { attrs: { label: "事件类型", prop: "event", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElSelect", { model: { value: e.listenerForm.event, callback: function(n) {
1555
- e.$set(e.listenerForm, "event", n);
1556
- }, expression: "listenerForm.event" } }, [t("ElOption", { attrs: { label: "start", value: "start" } }), t("ElOption", { attrs: { label: "end", value: "end" } })], 1)], 1), t("ElFormItem", { attrs: { label: "监听器类型", prop: "listenerType", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElSelect", { model: { value: e.listenerForm.listenerType, callback: function(n) {
1557
- e.$set(e.listenerForm, "listenerType", n);
1558
- }, expression: "listenerForm.listenerType" } }, e._l(Object.keys(e.listenerTypeObject), function(n) {
1559
- return t("ElOption", { key: n, attrs: { label: e.listenerTypeObject[n], value: n } });
1560
- }), 1)], 1), e.listenerForm.listenerType === "classListener" ? t("ElFormItem", { key: "listener-class", attrs: { label: "Java类", prop: "class", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.class, callback: function(n) {
1561
- e.$set(e.listenerForm, "class", n);
1562
- }, expression: "listenerForm.class" } })], 1) : e._e(), e.listenerForm.listenerType === "expressionListener" ? t("ElFormItem", { key: "listener-expression", attrs: { label: "表达式", prop: "expression", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.expression, callback: function(n) {
1563
- e.$set(e.listenerForm, "expression", n);
1564
- }, expression: "listenerForm.expression" } })], 1) : e._e(), e.listenerForm.listenerType === "delegateExpressionListener" ? t("ElFormItem", { key: "listener-delegate", attrs: { label: "代理表达式", prop: "delegateExpression", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.delegateExpression, callback: function(n) {
1565
- e.$set(e.listenerForm, "delegateExpression", n);
1566
- }, expression: "listenerForm.delegateExpression" } })], 1) : e._e(), e.listenerForm.listenerType === "scriptListener" ? [t("ElFormItem", { key: "listener-script-format", attrs: { label: "脚本格式", prop: "scriptFormat", rules: { required: !0, trigger: ["blur", "change"], message: "请填写脚本格式" } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.scriptFormat, callback: function(n) {
1567
- e.$set(e.listenerForm, "scriptFormat", n);
1568
- }, expression: "listenerForm.scriptFormat" } })], 1), t("ElFormItem", { key: "listener-script-type", attrs: { label: "脚本类型", prop: "scriptType", rules: { required: !0, trigger: ["blur", "change"], message: "请选择脚本类型" } } }, [t("ElSelect", { model: { value: e.listenerForm.scriptType, callback: function(n) {
1569
- e.$set(e.listenerForm, "scriptType", n);
1570
- }, expression: "listenerForm.scriptType" } }, [t("ElOption", { attrs: { label: "内联脚本", value: "inlineScript" } }), t("ElOption", { attrs: { label: "外部脚本", value: "externalScript" } })], 1)], 1), e.listenerForm.scriptType === "inlineScript" ? t("ElFormItem", { key: "listener-script", attrs: { label: "脚本内容", prop: "value", rules: { required: !0, trigger: ["blur", "change"], message: "请填写脚本内容" } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.value, callback: function(n) {
1571
- e.$set(e.listenerForm, "value", n);
1572
- }, expression: "listenerForm.value" } })], 1) : e._e(), e.listenerForm.scriptType === "externalScript" ? t("ElFormItem", { key: "listener-resource", attrs: { label: "资源地址", prop: "resource", rules: { required: !0, trigger: ["blur", "change"], message: "请填写资源地址" } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.resource, callback: function(n) {
1573
- e.$set(e.listenerForm, "resource", n);
1574
- }, expression: "listenerForm.resource" } })], 1) : e._e()] : e._e()], 2), t("ElDivider"), t("p", { staticClass: "listener-filed__title", staticStyle: { "padding-bottom": "6px" } }, [t("span", [t("i", { staticClass: "el-icon-menu" }), e._v("注入字段:")]), t("ElButton", { attrs: { size: "mini", type: "primary" }, on: { click: function(n) {
1612
+ } } }, [e._v("添加监听器")])], 1), t("ElDrawer", { 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) {
1613
+ e.listenerFormModelVisible = r;
1614
+ } } }, [t("ElDivider"), t("p", { staticClass: "listener-filed__title" }, [t("span", [t("i", { staticClass: "el-icon-menu" }), e._v("监听器类型:")]), t("ElButton", { staticStyle: { "margin-left": "auto" }, attrs: { size: "mini", type: "primary" }, on: { click: function(r) {
1615
+ return e.assignListener("start");
1616
+ } } }, [e._v("开始")]), t("ElButton", { attrs: { size: "mini", type: "primary" }, on: { click: function(r) {
1617
+ return e.assignListener("end");
1618
+ } } }, [e._v("结束")]), t("ElButton", { attrs: { size: "mini", type: "primary" }, on: { click: function(r) {
1619
+ return e.assignListener("draft");
1620
+ } } }, [e._v("草稿")])], 1), t("ElForm", { ref: "listenerFormRef", attrs: { size: "mini", model: e.listenerForm, "label-width": "96px" }, nativeOn: { submit: function(r) {
1621
+ r.preventDefault();
1622
+ } } }, [t("ElFormItem", { attrs: { label: "事件类型", prop: "event", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElSelect", { staticStyle: { width: "100%" }, model: { value: e.listenerForm.event, callback: function(r) {
1623
+ e.$set(e.listenerForm, "event", r);
1624
+ }, expression: "listenerForm.event" } }, [t("ElOption", { attrs: { label: "开始", value: "start" } }), t("ElOption", { attrs: { label: "结束", value: "end" } })], 1)], 1), t("ElFormItem", { attrs: { label: "监听器类型", prop: "listenerType", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElSelect", { staticStyle: { width: "100%" }, model: { value: e.listenerForm.listenerType, callback: function(r) {
1625
+ e.$set(e.listenerForm, "listenerType", r);
1626
+ }, expression: "listenerForm.listenerType" } }, e._l(Object.keys(e.listenerTypeObject), function(r) {
1627
+ return t("ElOption", { key: r, attrs: { label: e.listenerTypeObject[r], value: r } });
1628
+ }), 1)], 1), e.listenerForm.listenerType === "classListener" ? t("ElFormItem", { key: "listener-class", attrs: { label: "Java类", prop: "class", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.class, callback: function(r) {
1629
+ e.$set(e.listenerForm, "class", r);
1630
+ }, expression: "listenerForm.class" } })], 1) : e._e(), e.listenerForm.listenerType === "expressionListener" ? t("ElFormItem", { key: "listener-expression", attrs: { label: "表达式", prop: "expression", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.expression, callback: function(r) {
1631
+ e.$set(e.listenerForm, "expression", r);
1632
+ }, expression: "listenerForm.expression" } })], 1) : e._e(), e.listenerForm.listenerType === "delegateExpressionListener" ? t("ElFormItem", { key: "listener-delegate", attrs: { label: "代理表达式", prop: "delegateExpression", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElSelect", { staticStyle: { width: "100%" }, attrs: { "default-first-option": "", "allow-create": "", filterable: "", clearable: "" }, model: { value: e.listenerForm.delegateExpression, callback: function(r) {
1633
+ e.$set(e.listenerForm, "delegateExpression", r);
1634
+ }, expression: "listenerForm.delegateExpression" } }, e._l(((i = e.context) == null ? void 0 : i.delegateExpressions) || [], function(r) {
1635
+ return t("ElOption", { key: r, attrs: { value: r, label: r } });
1636
+ }), 1)], 1) : e._e(), e.listenerForm.listenerType === "scriptListener" ? [t("ElFormItem", { key: "listener-script-format", attrs: { label: "脚本格式", prop: "scriptFormat", rules: { required: !0, trigger: ["blur", "change"], message: "请填写脚本格式" } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.scriptFormat, callback: function(r) {
1637
+ e.$set(e.listenerForm, "scriptFormat", r);
1638
+ }, expression: "listenerForm.scriptFormat" } })], 1), t("ElFormItem", { key: "listener-script-type", attrs: { label: "脚本类型", prop: "scriptType", rules: { required: !0, trigger: ["blur", "change"], message: "请选择脚本类型" } } }, [t("ElSelect", { model: { value: e.listenerForm.scriptType, callback: function(r) {
1639
+ e.$set(e.listenerForm, "scriptType", r);
1640
+ }, expression: "listenerForm.scriptType" } }, [t("ElOption", { attrs: { label: "内联脚本", value: "inlineScript" } }), t("ElOption", { attrs: { label: "外部脚本", value: "externalScript" } })], 1)], 1), e.listenerForm.scriptType === "inlineScript" ? t("ElFormItem", { key: "listener-script", attrs: { label: "脚本内容", prop: "value", rules: { required: !0, trigger: ["blur", "change"], message: "请填写脚本内容" } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.value, callback: function(r) {
1641
+ e.$set(e.listenerForm, "value", r);
1642
+ }, expression: "listenerForm.value" } })], 1) : e._e(), e.listenerForm.scriptType === "externalScript" ? t("ElFormItem", { key: "listener-resource", attrs: { label: "资源地址", prop: "resource", rules: { required: !0, trigger: ["blur", "change"], message: "请填写资源地址" } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.resource, callback: function(r) {
1643
+ e.$set(e.listenerForm, "resource", r);
1644
+ }, expression: "listenerForm.resource" } })], 1) : e._e()] : e._e()], 2), t("ElDivider"), t("p", { staticClass: "listener-filed__title" }, [t("span", [t("i", { staticClass: "el-icon-menu" }), e._v("注入字段:")]), t("ElButton", { staticStyle: { "margin-left": "auto" }, attrs: { size: "mini", type: "primary" }, on: { click: function(r) {
1575
1645
  return e.openListenerFieldForm(null);
1576
- } } }, [e._v("添加字段")])], 1), t("ElTable", { staticStyle: { flex: "none" }, attrs: { data: e.fieldsListOfListener, size: "mini", "max-height": "240", border: "", fit: "" } }, [t("ElTableColumn", { attrs: { label: "序号", width: "50px", type: "index" } }), t("ElTableColumn", { attrs: { label: "字段名称", "min-width": "100px", prop: "name" } }), t("ElTableColumn", { attrs: { label: "字段类型", "min-width": "80px", "show-overflow-tooltip": "", formatter: (n) => e.fieldTypeObject[n.fieldType] } }), t("ElTableColumn", { attrs: { label: "字段值/表达式", "min-width": "100px", "show-overflow-tooltip": "", formatter: (n) => n.string || n.expression } }), t("ElTableColumn", { attrs: { label: "操作", width: "100px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: n, $index: s }) {
1577
- return [t("ElButton", { attrs: { size: "mini", type: "text" }, on: { click: function(r) {
1578
- return e.openListenerFieldForm(n, s);
1579
- } } }, [e._v("编辑")]), t("ElDivider", { attrs: { direction: "vertical" } }), t("ElButton", { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(r) {
1580
- return e.removeListenerField(n, s);
1581
- } } }, [e._v("移除")])];
1582
- } }]) })], 1), t("div", { staticClass: "element-drawer__button" }, [t("ElButton", { attrs: { size: "mini" }, on: { click: function(n) {
1646
+ } } }, [e._v(" 添加字段 ")])], 1), t("ElTable", { staticStyle: { flex: "none" }, attrs: { data: e.fieldsListOfListener, size: "mini", "max-height": "240", border: "", fit: "" } }, [t("ElTableColumn", { attrs: { label: "序号", width: "50px", type: "index" } }), t("ElTableColumn", { attrs: { label: "字段名称", "min-width": "100px", prop: "name" } }), t("ElTableColumn", { attrs: { label: "字段类型", "min-width": "80px", "show-overflow-tooltip": "", formatter: (r) => e.fieldTypeObject[r.fieldType] } }), t("ElTableColumn", { attrs: { label: "字段值/表达式", "min-width": "100px", "show-overflow-tooltip": "", formatter: (r) => r.string || r.expression } }), t("ElTableColumn", { attrs: { label: "操作", width: "100px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: r, $index: o }) {
1647
+ return [t("ElButton", { attrs: { size: "mini", type: "text" }, on: { click: function(p) {
1648
+ return e.openListenerFieldForm(r, o);
1649
+ } } }, [e._v("编辑")]), t("ElDivider", { attrs: { direction: "vertical" } }), t("ElButton", { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(p) {
1650
+ return e.removeListenerField(r, o);
1651
+ } } }, [e._v(" 移除 ")])];
1652
+ } }]) })], 1), t("div", { staticClass: "element-drawer__button" }, [t("ElButton", { attrs: { size: "mini" }, on: { click: function(r) {
1583
1653
  e.listenerFormModelVisible = !1;
1584
- } } }, [e._v("取 消")]), t("ElButton", { attrs: { size: "mini", type: "primary" }, on: { click: e.saveListenerConfig } }, [e._v("保 存")])], 1)], 1), t("ElementDialog", { attrs: { title: "字段配置", visible: e.listenerFieldFormModelVisible, width: "600px", "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(n) {
1585
- e.listenerFieldFormModelVisible = n;
1654
+ } } }, [e._v("取 消")]), t("ElButton", { attrs: { size: "mini", type: "primary" }, on: { click: e.saveListenerConfig } }, [e._v("保 存")])], 1)], 1), t("ElementDialog", { attrs: { title: "字段配置", visible: e.listenerFieldFormModelVisible, width: "600px", "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(r) {
1655
+ e.listenerFieldFormModelVisible = r;
1586
1656
  } }, scopedSlots: e._u([{ key: "footer", fn: function() {
1587
- return [t("ElButton", { attrs: { size: "mini" }, on: { click: function(n) {
1657
+ return [t("ElButton", { attrs: { size: "mini" }, on: { click: function(r) {
1588
1658
  e.listenerFieldFormModelVisible = !1;
1589
1659
  } } }, [e._v("取 消")]), t("ElButton", { attrs: { size: "mini", type: "primary" }, on: { click: e.saveListenerFiled } }, [e._v("确 定")])];
1590
- }, proxy: !0 }]) }, [t("ElForm", { ref: "listenerFieldFormRef", staticStyle: { height: "136px" }, attrs: { model: e.listenerFieldForm, size: "mini", "label-width": "96px" }, nativeOn: { submit: function(n) {
1591
- n.preventDefault();
1592
- } } }, [t("ElFormItem", { attrs: { label: "字段名称:", prop: "name", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerFieldForm.name, callback: function(n) {
1593
- e.$set(e.listenerFieldForm, "name", n);
1594
- }, expression: "listenerFieldForm.name" } })], 1), t("ElFormItem", { attrs: { label: "字段类型:", prop: "fieldType", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElSelect", { on: { input: e.changeFiledType }, model: { value: e.listenerFieldForm.fieldType, callback: function(n) {
1595
- e.$set(e.listenerFieldForm, "fieldType", n);
1596
- }, expression: "listenerFieldForm.fieldType" } }, e._l(Object.keys(e.fieldTypeObject), function(n) {
1597
- return t("ElOption", { key: n, attrs: { label: e.fieldTypeObject[n], value: n } });
1598
- }), 1)], 1), e.listenerFieldForm.fieldType === "string" ? t("ElFormItem", { key: "field-string", attrs: { label: "字段值:", prop: "string", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerFieldForm.string, callback: function(n) {
1599
- e.$set(e.listenerFieldForm, "string", n);
1600
- }, expression: "listenerFieldForm.string" } })], 1) : e._e(), e.listenerFieldForm.fieldType === "expression" ? t("ElFormItem", { key: "field-expression", attrs: { label: "表达式:", prop: "expression", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerFieldForm.expression, callback: function(n) {
1601
- e.$set(e.listenerFieldForm, "expression", n);
1660
+ }, proxy: !0 }]) }, [t("ElForm", { ref: "listenerFieldFormRef", staticStyle: { height: "136px" }, attrs: { model: e.listenerFieldForm, size: "mini", "label-width": "96px" }, nativeOn: { submit: function(r) {
1661
+ r.preventDefault();
1662
+ } } }, [t("ElFormItem", { attrs: { label: "字段名称:", prop: "name", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElSelect", { staticStyle: { width: "100%" }, attrs: { "default-first-option": "", "allow-create": "", filterable: "", clearable: "" }, on: { input: e.setDefaultFieldValue }, model: { value: e.listenerFieldForm.name, callback: function(r) {
1663
+ e.$set(e.listenerFieldForm, "name", r);
1664
+ }, expression: "listenerFieldForm.name" } }, e._l(((s = e.context) == null ? void 0 : s.fields) || [], function(r) {
1665
+ return t("ElOption", { key: r, attrs: { value: r, label: r } });
1666
+ }), 1)], 1), t("ElFormItem", { attrs: { label: "字段类型:", prop: "fieldType", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElSelect", { staticStyle: { width: "100%" }, on: { input: e.changeFiledType }, model: { value: e.listenerFieldForm.fieldType, callback: function(r) {
1667
+ e.$set(e.listenerFieldForm, "fieldType", r);
1668
+ }, expression: "listenerFieldForm.fieldType" } }, e._l(Object.keys(e.fieldTypeObject), function(r) {
1669
+ return t("ElOption", { key: r, attrs: { label: e.fieldTypeObject[r], value: r } });
1670
+ }), 1)], 1), e.listenerFieldForm.fieldType === "string" ? t("ElFormItem", { key: "field-string", staticClass: "element-listeners-field-name", attrs: { label: "字段值:", prop: "string", rules: { required: !0, trigger: ["blur", "change"] } } }, [e.listenerFieldForm.name === "url" ? t("ElSelect", { staticStyle: { width: "100%" }, attrs: { "default-first-option": "", "allow-create": "", filterable: "", clearable: "" }, model: { value: e.listenerFieldForm.string, callback: function(r) {
1671
+ e.$set(e.listenerFieldForm, "string", r);
1672
+ }, expression: "listenerFieldForm.string" } }, e._l(e.apis, function(r) {
1673
+ return t("ElOption", { key: r, attrs: { value: r, label: r } });
1674
+ }), 1) : e.listenerFieldForm.name === "serviceId" ? t("ElSelect", { staticStyle: { width: "100%" }, attrs: { "default-first-option": "", "allow-create": "", filterable: "", clearable: "" }, model: { value: e.listenerFieldForm.string, callback: function(r) {
1675
+ e.$set(e.listenerFieldForm, "string", r);
1676
+ }, expression: "listenerFieldForm.string" } }, e._l(((a = e.context) == null ? void 0 : a.services) || [], function(r) {
1677
+ return t("ElOption", { key: r, attrs: { value: r, label: r } });
1678
+ }), 1) : t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerFieldForm.string, callback: function(r) {
1679
+ e.$set(e.listenerFieldForm, "string", r);
1680
+ }, expression: "listenerFieldForm.string" } })], 1) : e._e(), e.listenerFieldForm.fieldType === "expression" ? t("ElFormItem", { key: "field-expression", attrs: { label: "表达式:", prop: "expression", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerFieldForm.expression, callback: function(r) {
1681
+ e.$set(e.listenerFieldForm, "expression", r);
1602
1682
  }, expression: "listenerFieldForm.expression" } })], 1) : e._e()], 1)], 1)], 1);
1603
- }, Xt = [], Yt = /* @__PURE__ */ h(
1604
- Ht,
1605
- Wt,
1606
- Xt,
1683
+ }, en = [], tn = /* @__PURE__ */ h(
1684
+ Yt,
1685
+ Qt,
1686
+ en,
1607
1687
  !1,
1608
1688
  null,
1609
1689
  null,
1610
1690
  null,
1611
1691
  null
1612
1692
  );
1613
- const Qt = Yt.exports, en = {
1693
+ const nn = tn.exports, sn = {
1614
1694
  name: "ElementProperties",
1615
1695
  inject: {
1616
1696
  prefix: "prefix",
@@ -1632,25 +1712,25 @@ const Qt = Yt.exports, en = {
1632
1712
  watch: {
1633
1713
  id: {
1634
1714
  immediate: !0,
1635
- handler(i) {
1636
- i && i.length && this.resetAttributesList();
1715
+ handler(n) {
1716
+ n && n.length && this.resetAttributesList();
1637
1717
  }
1638
1718
  }
1639
1719
  },
1640
1720
  methods: {
1641
1721
  resetAttributesList() {
1642
- var i, e, t, n, s;
1643
- this.otherExtensionList = [], this.bpmnElementProperties = (n = (t = (e = (i = this.element.businessObject) == null ? void 0 : i.extensionElements) == null ? void 0 : e.values) == null ? void 0 : t.filter((r) => (r.$type !== `${this.prefix}:Properties` && this.otherExtensionList.push(r), r.$type === `${this.prefix}:Properties`))) != null ? n : [], this.bpmnElementPropertyList = this.bpmnElementProperties.reduce(
1644
- (r, a) => r.concat(a.values),
1722
+ var n, e, t, i, s;
1723
+ this.otherExtensionList = [], this.bpmnElementProperties = (i = (t = (e = (n = this.element.businessObject) == null ? void 0 : n.extensionElements) == null ? void 0 : e.values) == null ? void 0 : t.filter((a) => (a.$type !== `${this.prefix}:Properties` && this.otherExtensionList.push(a), a.$type === `${this.prefix}:Properties`))) != null ? i : [], this.bpmnElementPropertyList = this.bpmnElementProperties.reduce(
1724
+ (a, r) => a.concat(r.values),
1645
1725
  []
1646
- ), this.elementPropertyList = v((s = this.bpmnElementPropertyList) != null ? s : []);
1726
+ ), this.elementPropertyList = g((s = this.bpmnElementPropertyList) != null ? s : []);
1647
1727
  },
1648
- openAttributesForm(i, e) {
1649
- this.editingPropertyIndex = e, this.propertyForm = e === -1 ? {} : v(i), this.propertyFormModelVisible = !0, this.$nextTick(() => {
1728
+ openAttributesForm(n, e) {
1729
+ this.editingPropertyIndex = e, this.propertyForm = e === -1 ? {} : g(n), this.propertyFormModelVisible = !0, this.$nextTick(() => {
1650
1730
  this.$refs.attributeFormRef && this.$refs.attributeFormRef.clearValidate();
1651
1731
  });
1652
1732
  },
1653
- removeAttributes(i, e) {
1733
+ removeAttributes(n, e) {
1654
1734
  this.$confirm("确认移除该属性吗?", "提示", {
1655
1735
  confirmButtonText: "确 认",
1656
1736
  cancelButtonText: "取 消"
@@ -1664,27 +1744,27 @@ const Qt = Yt.exports, en = {
1664
1744
  });
1665
1745
  },
1666
1746
  saveAttribute() {
1667
- const { name: i, value: e } = this.propertyForm;
1747
+ const { name: n, value: e } = this.propertyForm;
1668
1748
  if (this.editingPropertyIndex !== -1)
1669
1749
  this.bpmnInstances.modeling.updateModdleProperties(
1670
1750
  this.element,
1671
1751
  this.bpmnElementPropertyList[this.editingPropertyIndex],
1672
1752
  {
1673
- name: i,
1753
+ name: n,
1674
1754
  value: e
1675
1755
  }
1676
1756
  );
1677
1757
  else {
1678
- const t = this.bpmnInstances.moddle.create(`${this.prefix}:Property`, { name: i, value: e }), n = this.bpmnInstances.moddle.create(`${this.prefix}:Properties`, {
1758
+ const t = this.bpmnInstances.moddle.create(`${this.prefix}:Property`, { name: n, value: e }), i = this.bpmnInstances.moddle.create(`${this.prefix}:Properties`, {
1679
1759
  values: this.bpmnElementPropertyList.concat([t])
1680
1760
  });
1681
- this.updateElementExtensions(n);
1761
+ this.updateElementExtensions(i);
1682
1762
  }
1683
1763
  this.propertyFormModelVisible = !1, this.resetAttributesList();
1684
1764
  },
1685
- updateElementExtensions(i) {
1765
+ updateElementExtensions(n) {
1686
1766
  const e = this.bpmnInstances.moddle.create("bpmn:ExtensionElements", {
1687
- values: this.otherExtensionList.concat([i])
1767
+ values: this.otherExtensionList.concat([n])
1688
1768
  });
1689
1769
  this.bpmnInstances.modeling.updateProperties(this.element, {
1690
1770
  extensionElements: e
@@ -1692,40 +1772,40 @@ const Qt = Yt.exports, en = {
1692
1772
  }
1693
1773
  }
1694
1774
  };
1695
- var tn = function() {
1775
+ var rn = function() {
1696
1776
  var e = this, t = e._self._c;
1697
- return t("div", { staticClass: "panel-tab__content" }, [t("ElTable", { attrs: { data: e.elementPropertyList, size: "mini", "max-height": "240", border: "", fit: "" } }, [t("ElTableColumn", { attrs: { label: "序号", width: "50px", type: "index" } }), t("ElTableColumn", { attrs: { label: "属性名", prop: "name", "min-width": "100px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "属性值", prop: "value", "min-width": "100px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "操作", width: "90px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: n, $index: s }) {
1698
- return [t("ElButton", { attrs: { size: "mini", type: "text" }, on: { click: function(r) {
1699
- return e.openAttributesForm(n, s);
1700
- } } }, [e._v("编辑")]), t("ElDivider", { attrs: { direction: "vertical" } }), t("ElButton", { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(r) {
1701
- return e.removeAttributes(n, s);
1777
+ return t("div", { staticClass: "panel-tab__content" }, [t("ElTable", { attrs: { data: e.elementPropertyList, size: "mini", "max-height": "240", border: "", fit: "" } }, [t("ElTableColumn", { attrs: { label: "序号", width: "50px", type: "index" } }), t("ElTableColumn", { attrs: { label: "属性名", prop: "name", "min-width": "100px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "属性值", prop: "value", "min-width": "100px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "操作", width: "90px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: i, $index: s }) {
1778
+ return [t("ElButton", { attrs: { size: "mini", type: "text" }, on: { click: function(a) {
1779
+ return e.openAttributesForm(i, s);
1780
+ } } }, [e._v("编辑")]), t("ElDivider", { attrs: { direction: "vertical" } }), t("ElButton", { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(a) {
1781
+ return e.removeAttributes(i, s);
1702
1782
  } } }, [e._v("移除")])];
1703
- } }]) })], 1), t("div", { staticClass: "element-drawer__button" }, [t("ElButton", { attrs: { size: "mini", type: "primary", icon: "el-icon-plus" }, on: { click: function(n) {
1783
+ } }]) })], 1), t("div", { staticClass: "element-drawer__button" }, [t("ElButton", { attrs: { size: "mini", type: "primary", icon: "el-icon-plus" }, on: { click: function(i) {
1704
1784
  return e.openAttributesForm(null, -1);
1705
- } } }, [e._v("添加属性")])], 1), t("ElementDialog", { attrs: { visible: e.propertyFormModelVisible, title: "属性配置", width: "600px", "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(n) {
1706
- e.propertyFormModelVisible = n;
1785
+ } } }, [e._v("添加属性")])], 1), t("ElementDialog", { attrs: { visible: e.propertyFormModelVisible, title: "属性配置", width: "600px", "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(i) {
1786
+ e.propertyFormModelVisible = i;
1707
1787
  } }, scopedSlots: e._u([{ key: "footer", fn: function() {
1708
- return [t("ElButton", { attrs: { size: "mini" }, on: { click: function(n) {
1788
+ return [t("ElButton", { attrs: { size: "mini" }, on: { click: function(i) {
1709
1789
  e.propertyFormModelVisible = !1;
1710
1790
  } } }, [e._v("取 消")]), t("ElButton", { attrs: { size: "mini", type: "primary" }, on: { click: e.saveAttribute } }, [e._v("确 定")])];
1711
- }, proxy: !0 }]) }, [t("ElForm", { ref: "attributeFormRef", attrs: { model: e.propertyForm, "label-width": "80px", size: "mini" }, nativeOn: { submit: function(n) {
1712
- n.preventDefault();
1713
- } } }, [t("ElFormItem", { attrs: { label: "属性名:", prop: "name" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.propertyForm.name, callback: function(n) {
1714
- e.$set(e.propertyForm, "name", n);
1715
- }, expression: "propertyForm.name" } })], 1), t("ElFormItem", { attrs: { label: "属性值:", prop: "value" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.propertyForm.value, callback: function(n) {
1716
- e.$set(e.propertyForm, "value", n);
1791
+ }, proxy: !0 }]) }, [t("ElForm", { ref: "attributeFormRef", attrs: { model: e.propertyForm, "label-width": "80px", size: "mini" }, nativeOn: { submit: function(i) {
1792
+ i.preventDefault();
1793
+ } } }, [t("ElFormItem", { attrs: { label: "属性名:", prop: "name" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.propertyForm.name, callback: function(i) {
1794
+ e.$set(e.propertyForm, "name", i);
1795
+ }, expression: "propertyForm.name" } })], 1), t("ElFormItem", { attrs: { label: "属性值:", prop: "value" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.propertyForm.value, callback: function(i) {
1796
+ e.$set(e.propertyForm, "value", i);
1717
1797
  }, expression: "propertyForm.value" } })], 1)], 1)], 1)], 1);
1718
- }, nn = [], sn = /* @__PURE__ */ h(
1719
- en,
1720
- tn,
1721
- nn,
1798
+ }, an = [], on = /* @__PURE__ */ h(
1799
+ sn,
1800
+ rn,
1801
+ an,
1722
1802
  !1,
1723
1803
  null,
1724
1804
  null,
1725
1805
  null,
1726
1806
  null
1727
1807
  );
1728
- const rn = sn.exports, an = {
1808
+ const ln = on.exports, pn = {
1729
1809
  name: "ElementForm",
1730
1810
  inject: {
1731
1811
  prefix: "prefix",
@@ -1772,17 +1852,17 @@ const rn = sn.exports, an = {
1772
1852
  watch: {
1773
1853
  id: {
1774
1854
  immediate: !0,
1775
- handler(i) {
1855
+ handler(n) {
1776
1856
  return d(this, null, function* () {
1777
- i && (yield this.$nextTick(), this.resetFormList());
1857
+ n && (yield this.$nextTick(), this.resetFormList());
1778
1858
  });
1779
1859
  }
1780
1860
  }
1781
1861
  },
1782
1862
  methods: {
1783
1863
  resetFormList() {
1784
- var i;
1785
- 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 = v(this.formData.fields || []), this.updateElementExtensions();
1864
+ var n;
1865
+ this.formKey = this.element.businessObject.formKey, this.elExtensionElements = this.element.businessObject.get("extensionElements") || this.bpmnInstances.moddle.create("bpmn:ExtensionElements", { values: [] }), this.formData = ((n = this.elExtensionElements.values.filter((e) => e.$type === `${this.prefix}:FormData`)) == null ? void 0 : n[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 = g(this.formData.fields || []), this.updateElementExtensions();
1786
1866
  },
1787
1867
  updateElementFormKey() {
1788
1868
  this.bpmnInstances.modeling.updateProperties(this.element, { formKey: this.formKey });
@@ -1793,22 +1873,22 @@ const rn = sn.exports, an = {
1793
1873
  });
1794
1874
  },
1795
1875
  // 根据类型调整字段type
1796
- changeFieldTypeType(i) {
1797
- this.$set(this.formFieldForm, "type", i === "custom" ? "" : i);
1876
+ changeFieldTypeType(n) {
1877
+ this.$set(this.formFieldForm, "type", n === "custom" ? "" : n);
1798
1878
  },
1799
1879
  // 打开字段详情侧边栏
1800
- openFieldForm(i, e) {
1801
- var t, n;
1880
+ openFieldForm(n, e) {
1881
+ var t, i;
1802
1882
  if (this.formFieldIndex = e, e !== -1) {
1803
1883
  const s = this.formData.fields[e];
1804
- this.formFieldForm = v(i), this.$set(this.formFieldForm, "typeType", this.fieldType[i.type] ? i.type : "custom"), i.type === "enum" && (this.fieldEnumList = v((s == null ? void 0 : s.values) || [])), this.fieldConstraintsList = v(((t = s == null ? void 0 : s.validation) == null ? void 0 : t.constraints) || []), this.fieldPropertiesList = v(((n = s == null ? void 0 : s.properties) == null ? void 0 : n.values) || []);
1884
+ this.formFieldForm = g(n), this.$set(this.formFieldForm, "typeType", this.fieldType[n.type] ? n.type : "custom"), n.type === "enum" && (this.fieldEnumList = g((s == null ? void 0 : s.values) || [])), this.fieldConstraintsList = g(((t = s == null ? void 0 : s.validation) == null ? void 0 : t.constraints) || []), this.fieldPropertiesList = g(((i = s == null ? void 0 : s.properties) == null ? void 0 : i.values) || []);
1805
1885
  } else
1806
1886
  this.formFieldForm = {}, this.fieldEnumList = [], this.fieldConstraintsList = [], this.fieldPropertiesList = [];
1807
1887
  this.fieldModelVisible = !0;
1808
1888
  },
1809
1889
  // 打开字段 某个 配置项 弹窗
1810
- openFieldOptionForm(i, e, t) {
1811
- return this.fieldOptionModelVisible = !0, this.fieldOptionType = t, this.formFieldOptionIndex = e, t === "property" ? (this.fieldOptionForm = i ? v(i) : {}, this.optionModelTitle = "属性配置") : t === "enum" ? (this.fieldOptionForm = i ? v(i) : {}, this.optionModelTitle = "枚举值配置") : (this.fieldOptionForm = i ? v(i) : {}, this.optionModelTitle = "约束条件配置");
1890
+ openFieldOptionForm(n, e, t) {
1891
+ return this.fieldOptionModelVisible = !0, this.fieldOptionType = t, this.formFieldOptionIndex = e, t === "property" ? (this.fieldOptionForm = n ? g(n) : {}, this.optionModelTitle = "属性配置") : t === "enum" ? (this.fieldOptionForm = n ? g(n) : {}, this.optionModelTitle = "枚举值配置") : (this.fieldOptionForm = n ? g(n) : {}, this.optionModelTitle = "约束条件配置");
1812
1892
  },
1813
1893
  // 保存字段 某个 配置项
1814
1894
  saveFieldOption() {
@@ -1816,23 +1896,23 @@ const rn = sn.exports, an = {
1816
1896
  },
1817
1897
  // 保存字段配置
1818
1898
  saveField() {
1819
- const { id: i, type: e, label: t, defaultValue: n, datePattern: s } = this.formFieldForm, r = this.bpmnInstances.moddle.create(`${this.prefix}:FormField`, { id: i, type: e, label: t });
1820
- if (n && (r.defaultValue = n), s && (r.datePattern = s), this.fieldPropertiesList && this.fieldPropertiesList.length) {
1821
- const a = this.fieldPropertiesList.map((o) => this.bpmnInstances.moddle.create(`${this.prefix}:Property`, { id: o.id, value: o.value }));
1822
- r.properties = this.bpmnInstances.moddle.create(`${this.prefix}:Properties`, {
1823
- values: a
1899
+ const { id: n, type: e, label: t, defaultValue: i, datePattern: s } = this.formFieldForm, a = this.bpmnInstances.moddle.create(`${this.prefix}:FormField`, { id: n, type: e, label: t });
1900
+ if (i && (a.defaultValue = i), s && (a.datePattern = s), this.fieldPropertiesList && this.fieldPropertiesList.length) {
1901
+ const r = this.fieldPropertiesList.map((o) => this.bpmnInstances.moddle.create(`${this.prefix}:Property`, { id: o.id, value: o.value }));
1902
+ a.properties = this.bpmnInstances.moddle.create(`${this.prefix}:Properties`, {
1903
+ values: r
1824
1904
  });
1825
1905
  }
1826
1906
  if (this.fieldConstraintsList && this.fieldConstraintsList.length) {
1827
- const a = this.fieldConstraintsList.map((o) => this.bpmnInstances.moddle.create(`${this.prefix}:Constraint`, { name: o.name, config: o.config }));
1828
- r.validation = this.bpmnInstances.moddle.create(`${this.prefix}:Validation`, {
1829
- constraints: a
1907
+ const r = this.fieldConstraintsList.map((o) => this.bpmnInstances.moddle.create(`${this.prefix}:Constraint`, { name: o.name, config: o.config }));
1908
+ a.validation = this.bpmnInstances.moddle.create(`${this.prefix}:Validation`, {
1909
+ constraints: r
1830
1910
  });
1831
1911
  }
1832
- this.fieldEnumList && this.fieldEnumList.length && (r.values = this.fieldEnumList.map((a) => this.bpmnInstances.moddle.create(`${this.prefix}:Value`, { name: a.name, id: a.id }))), this.formFieldIndex === -1 ? (this.fieldList.push(this.formFieldForm), this.formData.fields.push(r)) : (this.fieldList.splice(this.formFieldIndex, 1, this.formFieldForm), this.formData.fields.splice(this.formFieldIndex, 1, r)), this.updateElementExtensions(), this.fieldModelVisible = !1;
1912
+ 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;
1833
1913
  },
1834
1914
  // 移除某个 字段的 配置项
1835
- removeFieldOptionItem(i, e, t) {
1915
+ removeFieldOptionItem(n, e, t) {
1836
1916
  if (t === "property") {
1837
1917
  this.fieldPropertiesList.splice(e, 1);
1838
1918
  return;
@@ -1844,107 +1924,109 @@ const rn = sn.exports, an = {
1844
1924
  this.fieldConstraintsList.splice(e, 1);
1845
1925
  },
1846
1926
  // 移除 字段
1847
- removeField(i, e) {
1927
+ removeField(n, e) {
1848
1928
  this.fieldList.splice(e, 1), this.formData.fields.splice(e, 1), this.updateElementExtensions();
1849
1929
  },
1850
1930
  updateElementExtensions() {
1851
- const i = this.bpmnInstances.moddle.create("bpmn:ExtensionElements", {
1931
+ const n = this.bpmnInstances.moddle.create("bpmn:ExtensionElements", {
1852
1932
  values: this.otherExtensions.concat(this.formData)
1853
1933
  });
1854
1934
  this.bpmnInstances.modeling.updateProperties(this.element, {
1855
- extensionElements: i
1935
+ extensionElements: n
1856
1936
  });
1857
1937
  }
1858
1938
  }
1859
1939
  };
1860
- var on = function() {
1940
+ var mn = function() {
1861
1941
  var e = this, t = e._self._c;
1862
- return t("div", { staticClass: "panel-tab__content" }, [t("ElForm", { attrs: { size: "mini", "label-width": "80px" }, nativeOn: { submit: function(n) {
1863
- n.preventDefault();
1864
- } } }, [t("ElFormItem", { attrs: { label: "表单标识" } }, [t("ElInput", { attrs: { clearable: "" }, on: { change: e.updateElementFormKey }, model: { value: e.formKey, callback: function(n) {
1865
- e.formKey = n;
1866
- }, expression: "formKey" } })], 1), t("ElFormItem", { attrs: { label: "业务标识" } }, [t("ElSelect", { on: { change: e.updateElementBusinessKey }, model: { value: e.businessKey, callback: function(n) {
1867
- e.businessKey = n;
1868
- }, expression: "businessKey" } }, [e._l(e.fieldList, function(n) {
1869
- return t("ElOption", { key: n.id, attrs: { value: n.id, label: n.label } });
1870
- }), t("ElOption", { attrs: { label: "无", value: "" } })], 2)], 1)], 1), t("div", { staticClass: "element-property list-property" }, [t("ElDivider", [t("i", { staticClass: "el-icon-coin" }), e._v(" 表单字段")]), t("ElTable", { attrs: { data: e.fieldList, size: "mini", "max-height": "240", border: "", fit: "" } }, [t("ElTableColumn", { attrs: { label: "序号", type: "index", width: "50px" } }), t("ElTableColumn", { attrs: { label: "字段名称", prop: "label", "min-width": "80px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "字段类型", prop: "type", "min-width": "80px", formatter: (n) => e.fieldType[n.type] || n.type, "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "默认值", prop: "defaultValue", "min-width": "80px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "操作", width: "90px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: n, $index: s }) {
1871
- return [t("ElButton", { attrs: { size: "mini", type: "text" }, on: { click: function(r) {
1872
- return e.openFieldForm(n, s);
1873
- } } }, [e._v("编辑")]), t("ElDivider", { attrs: { direction: "vertical" } }), t("ElButton", { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(r) {
1874
- return e.removeField(n, s);
1942
+ return t("div", { staticClass: "panel-tab__content" }, [t("ElForm", { attrs: { size: "mini", "label-width": "80px" }, nativeOn: { submit: function(i) {
1943
+ i.preventDefault();
1944
+ } } }, [t("ElFormItem", { attrs: { label: "表单标识" } }, [t("ElInput", { attrs: { clearable: "" }, on: { change: e.updateElementFormKey }, model: { value: e.formKey, callback: function(i) {
1945
+ e.formKey = i;
1946
+ }, expression: "formKey" } })], 1), t("ElFormItem", { attrs: { label: "业务标识" } }, [t("ElSelect", { on: { change: e.updateElementBusinessKey }, model: { value: e.businessKey, callback: function(i) {
1947
+ e.businessKey = i;
1948
+ }, expression: "businessKey" } }, [e._l(e.fieldList, function(i) {
1949
+ return t("ElOption", { key: i.id, attrs: { value: i.id, label: i.label } });
1950
+ }), t("ElOption", { attrs: { label: "无", value: "" } })], 2)], 1)], 1), t("div", { staticClass: "element-property list-property" }, [t("ElDivider", [t("i", { staticClass: "el-icon-coin" }), e._v(" 表单字段")]), t("ElTable", { attrs: { data: e.fieldList, size: "mini", "max-height": "240", border: "", fit: "" } }, [t("ElTableColumn", { attrs: { label: "序号", type: "index", width: "50px" } }), t("ElTableColumn", { attrs: { label: "字段名称", prop: "label", "min-width": "80px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "字段类型", prop: "type", "min-width": "80px", formatter: (i) => e.fieldType[i.type] || i.type, "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "默认值", prop: "defaultValue", "min-width": "80px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "操作", width: "90px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: i, $index: s }) {
1951
+ return [t("ElButton", { attrs: { size: "mini", type: "text" }, on: { click: function(a) {
1952
+ return e.openFieldForm(i, s);
1953
+ } } }, [e._v("编辑")]), t("ElDivider", { attrs: { direction: "vertical" } }), t("ElButton", { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(a) {
1954
+ return e.removeField(i, s);
1875
1955
  } } }, [e._v("移除")])];
1876
- } }]) })], 1)], 1), t("div", { staticClass: "element-drawer__button" }, [t("ElButton", { attrs: { size: "mini", type: "primary", icon: "el-icon-plus" }, on: { click: function(n) {
1956
+ } }]) })], 1)], 1), t("div", { staticClass: "element-drawer__button" }, [t("ElButton", { attrs: { size: "mini", type: "primary", icon: "el-icon-plus" }, on: { click: function(i) {
1877
1957
  return e.openFieldForm(null, -1);
1878
- } } }, [e._v("添加字段")])], 1), t("ElDrawer", { staticClass: "flow-drawer", attrs: { visible: e.fieldModelVisible, title: "字段配置", size: `${e.width}px`, "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(n) {
1879
- e.fieldModelVisible = n;
1880
- } } }, [t("ElForm", { attrs: { model: e.formFieldForm, "label-width": "90px", size: "mini" }, nativeOn: { submit: function(n) {
1881
- n.preventDefault();
1882
- } } }, [t("ElFormItem", { attrs: { label: "字段ID" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.formFieldForm.id, callback: function(n) {
1883
- e.$set(e.formFieldForm, "id", n);
1884
- }, expression: "formFieldForm.id" } })], 1), t("ElFormItem", { attrs: { label: "类型" } }, [t("ElSelect", { attrs: { placeholder: "请选择字段类型", clearable: "" }, on: { change: e.changeFieldTypeType }, model: { value: e.formFieldForm.typeType, callback: function(n) {
1885
- e.$set(e.formFieldForm, "typeType", n);
1886
- }, expression: "formFieldForm.typeType" } }, e._l(e.fieldType, function(n, s) {
1887
- return t("ElOption", { key: s, attrs: { label: n, value: s } });
1888
- }), 1)], 1), e.formFieldForm.typeType === "custom" ? t("ElFormItem", { attrs: { label: "类型名称" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.formFieldForm.type, callback: function(n) {
1889
- e.$set(e.formFieldForm, "type", n);
1890
- }, expression: "formFieldForm.type" } })], 1) : e._e(), t("ElFormItem", { attrs: { label: "名称" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.formFieldForm.label, callback: function(n) {
1891
- e.$set(e.formFieldForm, "label", n);
1892
- }, expression: "formFieldForm.label" } })], 1), e.formFieldForm.typeType === "date" ? t("ElFormItem", { attrs: { label: "时间格式" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.formFieldForm.datePattern, callback: function(n) {
1893
- e.$set(e.formFieldForm, "datePattern", n);
1894
- }, expression: "formFieldForm.datePattern" } })], 1) : e._e(), t("ElFormItem", { attrs: { label: "默认值" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.formFieldForm.defaultValue, callback: function(n) {
1895
- e.$set(e.formFieldForm, "defaultValue", n);
1896
- }, expression: "formFieldForm.defaultValue" } })], 1)], 1), e.formFieldForm.type === "enum" ? [t("ElDivider", { key: "enum-divider" }), t("p", { key: "enum-title", staticClass: "listener-filed__title" }, [t("span", [t("i", { staticClass: "el-icon-menu" }), e._v("枚举值列表:")]), t("ElButton", { attrs: { size: "mini", type: "primary" }, on: { click: function(n) {
1958
+ } } }, [e._v("添加字段")])], 1), t("ElDrawer", { 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(i) {
1959
+ e.fieldModelVisible = i;
1960
+ } } }, [t("ElForm", { attrs: { model: e.formFieldForm, "label-width": "90px", size: "mini" }, nativeOn: { submit: function(i) {
1961
+ i.preventDefault();
1962
+ } } }, [t("ElFormItem", { attrs: { label: "字段ID" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.formFieldForm.id, callback: function(i) {
1963
+ e.$set(e.formFieldForm, "id", i);
1964
+ }, expression: "formFieldForm.id" } })], 1), t("ElFormItem", { attrs: { label: "类型" } }, [t("ElSelect", { attrs: { placeholder: "请选择字段类型", clearable: "" }, on: { change: e.changeFieldTypeType }, model: { value: e.formFieldForm.typeType, callback: function(i) {
1965
+ e.$set(e.formFieldForm, "typeType", i);
1966
+ }, expression: "formFieldForm.typeType" } }, e._l(e.fieldType, function(i, s) {
1967
+ return t("ElOption", { key: s, attrs: { label: i, value: s } });
1968
+ }), 1)], 1), e.formFieldForm.typeType === "custom" ? t("ElFormItem", { attrs: { label: "类型名称" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.formFieldForm.type, callback: function(i) {
1969
+ e.$set(e.formFieldForm, "type", i);
1970
+ }, expression: "formFieldForm.type" } })], 1) : e._e(), t("ElFormItem", { attrs: { label: "名称" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.formFieldForm.label, callback: function(i) {
1971
+ e.$set(e.formFieldForm, "label", i);
1972
+ }, expression: "formFieldForm.label" } })], 1), e.formFieldForm.typeType === "date" ? t("ElFormItem", { attrs: { label: "时间格式" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.formFieldForm.datePattern, callback: function(i) {
1973
+ e.$set(e.formFieldForm, "datePattern", i);
1974
+ }, expression: "formFieldForm.datePattern" } })], 1) : e._e(), t("ElFormItem", { attrs: { label: "默认值" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.formFieldForm.defaultValue, callback: function(i) {
1975
+ e.$set(e.formFieldForm, "defaultValue", i);
1976
+ }, expression: "formFieldForm.defaultValue" } })], 1)], 1), e.formFieldForm.type === "enum" ? [t("ElDivider", { key: "enum-divider" }), t("p", { key: "enum-title", staticClass: "listener-filed__title" }, [t("span", [t("i", { staticClass: "el-icon-menu" }), e._v("枚举值列表:")]), t("ElButton", { attrs: { size: "mini", type: "primary" }, on: { click: function(i) {
1897
1977
  return e.openFieldOptionForm(null, -1, "enum");
1898
- } } }, [e._v("添加枚举值")])], 1), t("ElTable", { key: "enum-table", attrs: { data: e.fieldEnumList, size: "mini", "max-height": "240", border: "", fit: "" } }, [t("ElTableColumn", { attrs: { label: "序号", width: "50px", type: "index" } }), t("ElTableColumn", { attrs: { label: "枚举值编号", prop: "id", "min-width": "100px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "枚举值名称", prop: "name", "min-width": "100px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "操作", width: "90px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: n, $index: s }) {
1899
- return [t("ElButton", { attrs: { size: "mini", type: "text" }, on: { click: function(r) {
1900
- return e.openFieldOptionForm(n, s, "enum");
1901
- } } }, [e._v("编辑")]), t("ElDivider", { attrs: { direction: "vertical" } }), t("ElButton", { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(r) {
1902
- return e.removeFieldOptionItem(n, s, "enum");
1978
+ } } }, [e._v("添加枚举值")])], 1), t("ElTable", { key: "enum-table", attrs: { data: e.fieldEnumList, size: "mini", "max-height": "240", border: "", fit: "" } }, [t("ElTableColumn", { attrs: { label: "序号", width: "50px", type: "index" } }), t("ElTableColumn", { attrs: { label: "枚举值编号", prop: "id", "min-width": "100px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "枚举值名称", prop: "name", "min-width": "100px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "操作", width: "90px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: i, $index: s }) {
1979
+ return [t("ElButton", { attrs: { size: "mini", type: "text" }, on: { click: function(a) {
1980
+ return e.openFieldOptionForm(i, s, "enum");
1981
+ } } }, [e._v("编辑")]), t("ElDivider", { attrs: { direction: "vertical" } }), t("ElButton", { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(a) {
1982
+ return e.removeFieldOptionItem(i, s, "enum");
1903
1983
  } } }, [e._v("移除")])];
1904
- } }], null, !1, 747635382) })], 1)] : e._e(), t("ElDivider", { 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("ElButton", { attrs: { size: "mini", type: "primary" }, on: { click: function(n) {
1984
+ } }], null, !1, 747635382) })], 1)] : e._e(), t("ElDivider", { 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("ElButton", { attrs: { size: "mini", type: "primary" }, on: { click: function(i) {
1905
1985
  return e.openFieldOptionForm(null, -1, "constraint");
1906
- } } }, [e._v("添加约束")])], 1), t("ElTable", { key: "validation-table", attrs: { data: e.fieldConstraintsList, size: "mini", "max-height": "240", border: "", fit: "" } }, [t("ElTableColumn", { attrs: { label: "序号", width: "50px", type: "index" } }), t("ElTableColumn", { attrs: { label: "约束名称", prop: "name", "min-width": "100px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "约束配置", prop: "config", "min-width": "100px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "操作", width: "90px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: n, $index: s }) {
1907
- return [t("ElButton", { attrs: { size: "mini", type: "text" }, on: { click: function(r) {
1908
- return e.openFieldOptionForm(n, s, "constraint");
1909
- } } }, [e._v("编辑")]), t("ElDivider", { attrs: { direction: "vertical" } }), t("ElButton", { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(r) {
1910
- return e.removeFieldOptionItem(n, s, "constraint");
1986
+ } } }, [e._v("添加约束")])], 1), t("ElTable", { key: "validation-table", attrs: { data: e.fieldConstraintsList, size: "mini", "max-height": "240", border: "", fit: "" } }, [t("ElTableColumn", { attrs: { label: "序号", width: "50px", type: "index" } }), t("ElTableColumn", { attrs: { label: "约束名称", prop: "name", "min-width": "100px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "约束配置", prop: "config", "min-width": "100px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "操作", width: "90px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: i, $index: s }) {
1987
+ return [t("ElButton", { attrs: { size: "mini", type: "text" }, on: { click: function(a) {
1988
+ return e.openFieldOptionForm(i, s, "constraint");
1989
+ } } }, [e._v("编辑")]), t("ElDivider", { attrs: { direction: "vertical" } }), t("ElButton", { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(a) {
1990
+ return e.removeFieldOptionItem(i, s, "constraint");
1911
1991
  } } }, [e._v("移除")])];
1912
- } }]) })], 1), t("ElDivider", { 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("ElButton", { attrs: { size: "mini", type: "primary" }, on: { click: function(n) {
1992
+ } }]) })], 1), t("ElDivider", { 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("ElButton", { attrs: { size: "mini", type: "primary" }, on: { click: function(i) {
1913
1993
  return e.openFieldOptionForm(null, -1, "property");
1914
- } } }, [e._v("添加属性")])], 1), t("ElTable", { key: "property-table", attrs: { data: e.fieldPropertiesList, size: "mini", "max-height": "240", border: "", fit: "" } }, [t("ElTableColumn", { attrs: { label: "序号", width: "50px", type: "index" } }), t("ElTableColumn", { attrs: { label: "属性编号", prop: "id", "min-width": "100px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "属性值", prop: "value", "min-width": "100px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "操作", width: "90px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: n, $index: s }) {
1915
- return [t("ElButton", { attrs: { size: "mini", type: "text" }, on: { click: function(r) {
1916
- return e.openFieldOptionForm(n, s, "property");
1917
- } } }, [e._v("编辑")]), t("ElDivider", { attrs: { direction: "vertical" } }), t("ElButton", { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(r) {
1918
- return e.removeFieldOptionItem(n, s, "property");
1994
+ } } }, [e._v("添加属性")])], 1), t("ElTable", { key: "property-table", attrs: { data: e.fieldPropertiesList, size: "mini", "max-height": "240", border: "", fit: "" } }, [t("ElTableColumn", { attrs: { label: "序号", width: "50px", type: "index" } }), t("ElTableColumn", { attrs: { label: "属性编号", prop: "id", "min-width": "100px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "属性值", prop: "value", "min-width": "100px", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "操作", width: "90px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: i, $index: s }) {
1995
+ return [t("ElButton", { attrs: { size: "mini", type: "text" }, on: { click: function(a) {
1996
+ return e.openFieldOptionForm(i, s, "property");
1997
+ } } }, [e._v("编辑")]), t("ElDivider", { attrs: { direction: "vertical" } }), t("ElButton", { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(a) {
1998
+ return e.removeFieldOptionItem(i, s, "property");
1919
1999
  } } }, [e._v("移除")])];
1920
- } }]) })], 1), t("div", { staticClass: "element-drawer__button" }, [t("ElButton", { attrs: { size: "mini" } }, [e._v("取 消")]), t("ElButton", { attrs: { size: "mini", type: "primary" }, on: { click: e.saveField } }, [e._v("保 存")])], 1)], 2), t("ElementDialog", { attrs: { visible: e.fieldOptionModelVisible, title: e.optionModelTitle, width: "600px", "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(n) {
1921
- e.fieldOptionModelVisible = n;
2000
+ } }]) })], 1), t("div", { staticClass: "element-drawer__button" }, [t("ElButton", { attrs: { size: "mini" }, on: { click: function(i) {
2001
+ e.fieldModelVisible = !1;
2002
+ } } }, [e._v("取 消")]), t("ElButton", { attrs: { size: "mini", type: "primary" }, on: { click: e.saveField } }, [e._v("保 存")])], 1)], 2), t("ElementDialog", { attrs: { visible: e.fieldOptionModelVisible, title: e.optionModelTitle, width: "600px", "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(i) {
2003
+ e.fieldOptionModelVisible = i;
1922
2004
  } }, scopedSlots: e._u([{ key: "footer", fn: function() {
1923
- return [t("ElButton", { attrs: { size: "mini" }, on: { click: function(n) {
2005
+ return [t("ElButton", { attrs: { size: "mini" }, on: { click: function(i) {
1924
2006
  e.fieldOptionModelVisible = !1;
1925
2007
  } } }, [e._v("取 消")]), t("ElButton", { attrs: { size: "mini", type: "primary" }, on: { click: e.saveFieldOption } }, [e._v("确 定")])];
1926
- }, proxy: !0 }]) }, [t("ElForm", { attrs: { model: e.fieldOptionForm, size: "mini", "label-width": "96px" }, nativeOn: { submit: function(n) {
1927
- n.preventDefault();
1928
- } } }, [e.fieldOptionType !== "constraint" ? t("ElFormItem", { key: "option-id", attrs: { label: "编号/ID" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.fieldOptionForm.id, callback: function(n) {
1929
- e.$set(e.fieldOptionForm, "id", n);
1930
- }, expression: "fieldOptionForm.id" } })], 1) : e._e(), e.fieldOptionType !== "property" ? t("ElFormItem", { key: "option-name", attrs: { label: "名称" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.fieldOptionForm.name, callback: function(n) {
1931
- e.$set(e.fieldOptionForm, "name", n);
1932
- }, expression: "fieldOptionForm.name" } })], 1) : e._e(), e.fieldOptionType === "constraint" ? t("ElFormItem", { key: "option-config", attrs: { label: "配置" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.fieldOptionForm.config, callback: function(n) {
1933
- e.$set(e.fieldOptionForm, "config", n);
1934
- }, expression: "fieldOptionForm.config" } })], 1) : e._e(), e.fieldOptionType === "property" ? t("ElFormItem", { key: "option-value", attrs: { label: "值" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.fieldOptionForm.value, callback: function(n) {
1935
- e.$set(e.fieldOptionForm, "value", n);
2008
+ }, proxy: !0 }]) }, [t("ElForm", { attrs: { model: e.fieldOptionForm, size: "mini", "label-width": "96px" }, nativeOn: { submit: function(i) {
2009
+ i.preventDefault();
2010
+ } } }, [e.fieldOptionType !== "constraint" ? t("ElFormItem", { key: "option-id", attrs: { label: "编号/ID" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.fieldOptionForm.id, callback: function(i) {
2011
+ e.$set(e.fieldOptionForm, "id", i);
2012
+ }, expression: "fieldOptionForm.id" } })], 1) : e._e(), e.fieldOptionType !== "property" ? t("ElFormItem", { key: "option-name", attrs: { label: "名称" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.fieldOptionForm.name, callback: function(i) {
2013
+ e.$set(e.fieldOptionForm, "name", i);
2014
+ }, expression: "fieldOptionForm.name" } })], 1) : e._e(), e.fieldOptionType === "constraint" ? t("ElFormItem", { key: "option-config", attrs: { label: "配置" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.fieldOptionForm.config, callback: function(i) {
2015
+ e.$set(e.fieldOptionForm, "config", i);
2016
+ }, expression: "fieldOptionForm.config" } })], 1) : e._e(), e.fieldOptionType === "property" ? t("ElFormItem", { key: "option-value", attrs: { label: "值" } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.fieldOptionForm.value, callback: function(i) {
2017
+ e.$set(e.fieldOptionForm, "value", i);
1936
2018
  }, expression: "fieldOptionForm.value" } })], 1) : e._e()], 1)], 1)], 1);
1937
- }, ln = [], pn = /* @__PURE__ */ h(
1938
- an,
1939
- on,
1940
- ln,
2019
+ }, cn = [], un = /* @__PURE__ */ h(
2020
+ pn,
2021
+ mn,
2022
+ cn,
1941
2023
  !1,
1942
2024
  null,
1943
2025
  null,
1944
2026
  null,
1945
2027
  null
1946
2028
  );
1947
- const mn = pn.exports, cn = {
2029
+ const dn = un.exports, fn = {
1948
2030
  name: "UserTaskListeners",
1949
2031
  inject: {
1950
2032
  prefix: "prefix",
@@ -1958,7 +2040,7 @@ const mn = pn.exports, cn = {
1958
2040
  data() {
1959
2041
  return {
1960
2042
  elementListenersList: [],
1961
- listenerEventTypeObject: Zt,
2043
+ listenerEventTypeObject: Ht,
1962
2044
  listenerTypeObject: be,
1963
2045
  listenerFormModelVisible: !1,
1964
2046
  listenerForm: {},
@@ -1977,30 +2059,30 @@ const mn = pn.exports, cn = {
1977
2059
  watch: {
1978
2060
  id: {
1979
2061
  immediate: !0,
1980
- handler(i) {
2062
+ handler(n) {
1981
2063
  return d(this, null, function* () {
1982
- i && (yield this.$nextTick(), this.resetListenersList());
2064
+ n && (yield this.$nextTick(), this.resetListenersList());
1983
2065
  });
1984
2066
  }
1985
2067
  }
1986
2068
  },
1987
2069
  methods: {
1988
2070
  resetListenersList() {
1989
- var i, e, t, n;
1990
- this.otherExtensionList = [], this.bpmnElementListeners = (n = (t = (e = (i = this.element.businessObject) == null ? void 0 : i.extensionElements) == null ? void 0 : e.values) == null ? void 0 : t.filter(
2071
+ var n, e, t, i;
2072
+ this.otherExtensionList = [], this.bpmnElementListeners = (i = (t = (e = (n = this.element.businessObject) == null ? void 0 : n.extensionElements) == null ? void 0 : e.values) == null ? void 0 : t.filter(
1991
2073
  (s) => s.$type === `${this.prefix}:TaskListener`
1992
- )) != null ? n : [], this.elementListenersList = this.bpmnElementListeners.map((s) => fe(s));
2074
+ )) != null ? i : [], this.elementListenersList = this.bpmnElementListeners.map((s) => fe(s));
1993
2075
  },
1994
- openListenerForm(i, e) {
2076
+ openListenerForm(n, e) {
1995
2077
  return d(this, null, function* () {
1996
2078
  var t;
1997
- i ? (this.listenerForm = de(i), this.editingListenerIndex = e) : (this.listenerForm = {}, this.editingListenerIndex = -1), i && i.fields ? this.fieldsListOfListener = i.fields.map((n) => T(u({}, n), {
1998
- fieldType: n.string ? "string" : "expression"
2079
+ n ? (this.listenerForm = de(n), this.editingListenerIndex = e) : (this.listenerForm = {}, this.editingListenerIndex = -1), n && n.fields ? this.fieldsListOfListener = n.fields.map((i) => T(u({}, i), {
2080
+ fieldType: i.string ? "string" : "expression"
1999
2081
  })) : (this.fieldsListOfListener = [], this.$set(this.listenerForm, "fields", [])), this.listenerFormModelVisible = !0, yield this.$nextTick(), (t = this.$refs.listenerFormRef) == null || t.clearValidate();
2000
2082
  });
2001
2083
  },
2002
2084
  // 移除监听器
2003
- removeListener(i, e) {
2085
+ removeListener(n, e) {
2004
2086
  return d(this, null, function* () {
2005
2087
  try {
2006
2088
  yield this.$confirm("确认移除该监听器吗?", "提示"), this.bpmnElementListeners.splice(e, 1), this.elementListenersList.splice(e, 1), U(
@@ -2015,13 +2097,13 @@ const mn = pn.exports, cn = {
2015
2097
  // 保存监听器
2016
2098
  saveListenerConfig() {
2017
2099
  return d(this, null, function* () {
2018
- var t, n, s, r;
2100
+ var t, i, s, a;
2019
2101
  if (!(yield this.$refs.listenerFormRef.validate()))
2020
2102
  return;
2021
2103
  const e = ue(this.bpmnInstances, this.listenerForm, !0, this.prefix);
2022
- 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 = (r = (s = (n = (t = this.element.businessObject) == null ? void 0 : t.extensionElements) == null ? void 0 : n.values) == null ? void 0 : s.filter(
2023
- (a) => a.$type !== `${this.prefix}:TaskListener`
2024
- )) != null ? r : [], U(
2104
+ 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 = (a = (s = (i = (t = this.element.businessObject) == null ? void 0 : t.extensionElements) == null ? void 0 : i.values) == null ? void 0 : s.filter(
2105
+ (r) => r.$type !== `${this.prefix}:TaskListener`
2106
+ )) != null ? a : [], U(
2025
2107
  this.bpmnInstances,
2026
2108
  this.element,
2027
2109
  this.otherExtensionList.concat(this.bpmnElementListeners)
@@ -2029,10 +2111,10 @@ const mn = pn.exports, cn = {
2029
2111
  });
2030
2112
  },
2031
2113
  // 打开监听器字段编辑弹窗
2032
- openListenerFieldForm(i, e) {
2114
+ openListenerFieldForm(n, e) {
2033
2115
  return d(this, null, function* () {
2034
2116
  var t;
2035
- this.listenerFieldForm = i ? v(i) : {}, this.editingListenerFieldIndex = i ? e : -1, this.listenerFieldFormModelVisible = !0, yield this.$nextTick(), (t = this.$refs.listenerFieldFormRef) == null || t.clearValidate();
2117
+ this.listenerFieldForm = n ? g(n) : {}, this.editingListenerFieldIndex = n ? e : -1, this.listenerFieldFormModelVisible = !0, yield this.$nextTick(), (t = this.$refs.listenerFieldFormRef) == null || t.clearValidate();
2036
2118
  });
2037
2119
  },
2038
2120
  // 保存监听器注入字段
@@ -2042,7 +2124,7 @@ const mn = pn.exports, cn = {
2042
2124
  });
2043
2125
  },
2044
2126
  // 移除监听器字段
2045
- removeListenerField(i, e) {
2127
+ removeListenerField(n, e) {
2046
2128
  return d(this, null, function* () {
2047
2129
  try {
2048
2130
  yield this.$confirm("确认移除该字段吗?", "提示"), this.fieldsListOfListener.splice(e, 1), this.listenerForm.fields.splice(e, 1);
@@ -2052,106 +2134,107 @@ const mn = pn.exports, cn = {
2052
2134
  }
2053
2135
  }
2054
2136
  };
2055
- var un = function() {
2137
+ var bn = function() {
2056
2138
  var e = this, t = e._self._c;
2057
- return t("div", { staticClass: "panel-tab__content" }, [t("ElTable", { attrs: { data: e.elementListenersList, size: "mini", border: "" } }, [t("ElTableColumn", { attrs: { label: "序号", width: "50px", type: "index" } }), t("ElTableColumn", { attrs: { label: "事件类型", "min-width": "80px", "show-overflow-tooltip": "", formatter: (n) => e.listenerEventTypeObject[n.event] } }), t("ElTableColumn", { attrs: { label: "事件id", "min-width": "80px", prop: "id", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "监听器类型", "min-width": "80px", "show-overflow-tooltip": "", formatter: (n) => e.listenerTypeObject[n.listenerType] } }), t("ElTableColumn", { attrs: { label: "操作", width: "90px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: n, $index: s }) {
2058
- return [t("ElButton", { attrs: { size: "mini", type: "text" }, on: { click: function(r) {
2059
- return e.openListenerForm(n, s);
2060
- } } }, [e._v("编辑")]), t("ElDivider", { attrs: { direction: "vertical" } }), t("ElButton", { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(r) {
2061
- return e.removeListener(n, s);
2139
+ return t("div", { staticClass: "panel-tab__content" }, [t("ElTable", { attrs: { data: e.elementListenersList, size: "mini", border: "" } }, [t("ElTableColumn", { attrs: { label: "序号", width: "50px", type: "index" } }), t("ElTableColumn", { attrs: { label: "事件类型", "min-width": "80px", "show-overflow-tooltip": "", formatter: (i) => e.listenerEventTypeObject[i.event] } }), t("ElTableColumn", { attrs: { label: "事件id", "min-width": "80px", prop: "id", "show-overflow-tooltip": "" } }), t("ElTableColumn", { attrs: { label: "监听器类型", "min-width": "80px", "show-overflow-tooltip": "", formatter: (i) => e.listenerTypeObject[i.listenerType] } }), t("ElTableColumn", { attrs: { label: "操作", width: "90px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: i, $index: s }) {
2140
+ return [t("ElButton", { attrs: { size: "mini", type: "text" }, on: { click: function(a) {
2141
+ return e.openListenerForm(i, s);
2142
+ } } }, [e._v("编辑")]), t("ElDivider", { attrs: { direction: "vertical" } }), t("ElButton", { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(a) {
2143
+ return e.removeListener(i, s);
2062
2144
  } } }, [e._v("移除")])];
2063
- } }]) })], 1), t("div", { staticClass: "element-drawer__button" }, [t("ElButton", { attrs: { size: "mini", type: "primary", icon: "el-icon-plus" }, on: { click: function(n) {
2145
+ } }]) })], 1), t("div", { staticClass: "element-drawer__button" }, [t("ElButton", { attrs: { size: "mini", type: "primary", icon: "el-icon-plus" }, on: { click: function(i) {
2064
2146
  return e.openListenerForm(null);
2065
- } } }, [e._v("添加监听器")])], 1), t("ElDrawer", { staticClass: "flow-drawer", attrs: { visible: e.listenerFormModelVisible, title: "任务监听器", size: `${e.width}px`, "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(n) {
2066
- e.listenerFormModelVisible = n;
2067
- } } }, [t("ElForm", { ref: "listenerFormRef", attrs: { size: "mini", model: e.listenerForm, "label-width": "96px" }, nativeOn: { submit: function(n) {
2068
- n.preventDefault();
2069
- } } }, [t("ElFormItem", { attrs: { label: "事件类型", prop: "event", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElSelect", { model: { value: e.listenerForm.event, callback: function(n) {
2070
- e.$set(e.listenerForm, "event", n);
2071
- }, expression: "listenerForm.event" } }, e._l(Object.keys(e.listenerEventTypeObject), function(n) {
2072
- return t("ElOption", { key: n, attrs: { label: e.listenerEventTypeObject[n], value: n } });
2073
- }), 1)], 1), t("ElFormItem", { attrs: { label: "监听器ID", prop: "id", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.id, callback: function(n) {
2074
- e.$set(e.listenerForm, "id", n);
2075
- }, expression: "listenerForm.id" } })], 1), t("ElFormItem", { attrs: { label: "监听器类型", prop: "listenerType", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElSelect", { model: { value: e.listenerForm.listenerType, callback: function(n) {
2076
- e.$set(e.listenerForm, "listenerType", n);
2077
- }, expression: "listenerForm.listenerType" } }, e._l(Object.keys(e.listenerTypeObject), function(n) {
2078
- return t("ElOption", { key: n, attrs: { label: e.listenerTypeObject[n], value: n } });
2079
- }), 1)], 1), e.listenerForm.listenerType === "classListener" ? t("ElFormItem", { key: "listener-class", attrs: { label: "Java类", prop: "class", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.class, callback: function(n) {
2080
- e.$set(e.listenerForm, "class", n);
2081
- }, expression: "listenerForm.class" } })], 1) : e._e(), e.listenerForm.listenerType === "expressionListener" ? t("ElFormItem", { key: "listener-expression", attrs: { label: "表达式", prop: "expression", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.expression, callback: function(n) {
2082
- e.$set(e.listenerForm, "expression", n);
2083
- }, expression: "listenerForm.expression" } })], 1) : e._e(), e.listenerForm.listenerType === "delegateExpressionListener" ? t("ElFormItem", { key: "listener-delegate", attrs: { label: "代理表达式", prop: "delegateExpression", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.delegateExpression, callback: function(n) {
2084
- e.$set(e.listenerForm, "delegateExpression", n);
2085
- }, expression: "listenerForm.delegateExpression" } })], 1) : e._e(), e.listenerForm.listenerType === "scriptListener" ? [t("ElFormItem", { key: "listener-script-format", attrs: { label: "脚本格式", prop: "scriptFormat", rules: { required: !0, trigger: ["blur", "change"], message: "请填写脚本格式" } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.scriptFormat, callback: function(n) {
2086
- e.$set(e.listenerForm, "scriptFormat", n);
2087
- }, expression: "listenerForm.scriptFormat" } })], 1), t("ElFormItem", { key: "listener-script-type", attrs: { label: "脚本类型", prop: "scriptType", rules: { required: !0, trigger: ["blur", "change"], message: "请选择脚本类型" } } }, [t("ElSelect", { model: { value: e.listenerForm.scriptType, callback: function(n) {
2088
- e.$set(e.listenerForm, "scriptType", n);
2089
- }, expression: "listenerForm.scriptType" } }, [t("ElOption", { attrs: { label: "内联脚本", value: "inlineScript" } }), t("ElOption", { attrs: { label: "外部脚本", value: "externalScript" } })], 1)], 1), e.listenerForm.scriptType === "inlineScript" ? t("ElFormItem", { key: "listener-script", attrs: { label: "脚本内容", prop: "value", rules: { required: !0, trigger: ["blur", "change"], message: "请填写脚本内容" } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.value, callback: function(n) {
2090
- e.$set(e.listenerForm, "value", n);
2091
- }, expression: "listenerForm.value" } })], 1) : e._e(), e.listenerForm.scriptType === "externalScript" ? t("ElFormItem", { key: "listener-resource", attrs: { label: "资源地址", prop: "resource", rules: { required: !0, trigger: ["blur", "change"], message: "请填写资源地址" } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.resource, callback: function(n) {
2092
- e.$set(e.listenerForm, "resource", n);
2093
- }, expression: "listenerForm.resource" } })], 1) : e._e()] : e._e(), e.listenerForm.event === "timeout" ? [t("ElFormItem", { key: "eventDefinitionType", attrs: { label: "定时器类型", prop: "eventDefinitionType" } }, [t("ElSelect", { model: { value: e.listenerForm.eventDefinitionType, callback: function(n) {
2094
- e.$set(e.listenerForm, "eventDefinitionType", n);
2095
- }, expression: "listenerForm.eventDefinitionType" } }, [t("ElOption", { attrs: { label: "日期", value: "date" } }), t("ElOption", { attrs: { label: "持续时长", value: "duration" } }), t("ElOption", { attrs: { label: "循环", value: "cycle" } }), t("ElOption", { attrs: { label: "无", value: "null" } })], 1)], 1), e.listenerForm.eventDefinitionType && e.listenerForm.eventDefinitionType !== "null" ? t("ElFormItem", { key: "eventTimeDefinitions", attrs: { label: "定时器", prop: "eventTimeDefinitions", rules: { required: !0, trigger: ["blur", "change"], message: "请填写定时器配置" } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.eventTimeDefinitions, callback: function(n) {
2096
- e.$set(e.listenerForm, "eventTimeDefinitions", n);
2097
- }, expression: "listenerForm.eventTimeDefinitions" } })], 1) : e._e()] : e._e()], 2), t("ElDivider"), t("p", { staticClass: "listener-filed__title", staticStyle: { "padding-bottom": "6px" } }, [t("span", [t("i", { staticClass: "el-icon-menu" }), e._v("注入字段:")]), t("ElButton", { attrs: { size: "mini", type: "primary" }, on: { click: function(n) {
2147
+ } } }, [e._v("添加监听器")])], 1), t("ElDrawer", { 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(i) {
2148
+ e.listenerFormModelVisible = i;
2149
+ } } }, [t("ElForm", { ref: "listenerFormRef", attrs: { size: "mini", model: e.listenerForm, "label-width": "96px" }, nativeOn: { submit: function(i) {
2150
+ i.preventDefault();
2151
+ } } }, [t("ElFormItem", { attrs: { label: "事件类型", prop: "event", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElSelect", { model: { value: e.listenerForm.event, callback: function(i) {
2152
+ e.$set(e.listenerForm, "event", i);
2153
+ }, expression: "listenerForm.event" } }, e._l(Object.keys(e.listenerEventTypeObject), function(i) {
2154
+ return t("ElOption", { key: i, attrs: { label: e.listenerEventTypeObject[i], value: i } });
2155
+ }), 1)], 1), t("ElFormItem", { attrs: { label: "监听器ID", prop: "id", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.id, callback: function(i) {
2156
+ e.$set(e.listenerForm, "id", i);
2157
+ }, expression: "listenerForm.id" } })], 1), t("ElFormItem", { attrs: { label: "监听器类型", prop: "listenerType", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElSelect", { model: { value: e.listenerForm.listenerType, callback: function(i) {
2158
+ e.$set(e.listenerForm, "listenerType", i);
2159
+ }, expression: "listenerForm.listenerType" } }, e._l(Object.keys(e.listenerTypeObject), function(i) {
2160
+ return t("ElOption", { key: i, attrs: { label: e.listenerTypeObject[i], value: i } });
2161
+ }), 1)], 1), e.listenerForm.listenerType === "classListener" ? t("ElFormItem", { key: "listener-class", attrs: { label: "Java类", prop: "class", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.class, callback: function(i) {
2162
+ e.$set(e.listenerForm, "class", i);
2163
+ }, expression: "listenerForm.class" } })], 1) : e._e(), e.listenerForm.listenerType === "expressionListener" ? t("ElFormItem", { key: "listener-expression", attrs: { label: "表达式", prop: "expression", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.expression, callback: function(i) {
2164
+ e.$set(e.listenerForm, "expression", i);
2165
+ }, expression: "listenerForm.expression" } })], 1) : e._e(), e.listenerForm.listenerType === "delegateExpressionListener" ? t("ElFormItem", { key: "listener-delegate", attrs: { label: "代理表达式", prop: "delegateExpression", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.delegateExpression, callback: function(i) {
2166
+ e.$set(e.listenerForm, "delegateExpression", i);
2167
+ }, expression: "listenerForm.delegateExpression" } })], 1) : e._e(), e.listenerForm.listenerType === "scriptListener" ? [t("ElFormItem", { key: "listener-script-format", attrs: { label: "脚本格式", prop: "scriptFormat", rules: { required: !0, trigger: ["blur", "change"], message: "请填写脚本格式" } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.scriptFormat, callback: function(i) {
2168
+ e.$set(e.listenerForm, "scriptFormat", i);
2169
+ }, expression: "listenerForm.scriptFormat" } })], 1), t("ElFormItem", { key: "listener-script-type", attrs: { label: "脚本类型", prop: "scriptType", rules: { required: !0, trigger: ["blur", "change"], message: "请选择脚本类型" } } }, [t("ElSelect", { model: { value: e.listenerForm.scriptType, callback: function(i) {
2170
+ e.$set(e.listenerForm, "scriptType", i);
2171
+ }, expression: "listenerForm.scriptType" } }, [t("ElOption", { attrs: { label: "内联脚本", value: "inlineScript" } }), t("ElOption", { attrs: { label: "外部脚本", value: "externalScript" } })], 1)], 1), e.listenerForm.scriptType === "inlineScript" ? t("ElFormItem", { key: "listener-script", attrs: { label: "脚本内容", prop: "value", rules: { required: !0, trigger: ["blur", "change"], message: "请填写脚本内容" } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.value, callback: function(i) {
2172
+ e.$set(e.listenerForm, "value", i);
2173
+ }, expression: "listenerForm.value" } })], 1) : e._e(), e.listenerForm.scriptType === "externalScript" ? t("ElFormItem", { key: "listener-resource", attrs: { label: "资源地址", prop: "resource", rules: { required: !0, trigger: ["blur", "change"], message: "请填写资源地址" } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.resource, callback: function(i) {
2174
+ e.$set(e.listenerForm, "resource", i);
2175
+ }, expression: "listenerForm.resource" } })], 1) : e._e()] : e._e(), e.listenerForm.event === "timeout" ? [t("ElFormItem", { key: "eventDefinitionType", attrs: { label: "定时器类型", prop: "eventDefinitionType" } }, [t("ElSelect", { model: { value: e.listenerForm.eventDefinitionType, callback: function(i) {
2176
+ e.$set(e.listenerForm, "eventDefinitionType", i);
2177
+ }, expression: "listenerForm.eventDefinitionType" } }, [t("ElOption", { attrs: { label: "日期", value: "date" } }), t("ElOption", { attrs: { label: "持续时长", value: "duration" } }), t("ElOption", { attrs: { label: "循环", value: "cycle" } }), t("ElOption", { attrs: { label: "无", value: "null" } })], 1)], 1), e.listenerForm.eventDefinitionType && e.listenerForm.eventDefinitionType !== "null" ? t("ElFormItem", { key: "eventTimeDefinitions", attrs: { label: "定时器", prop: "eventTimeDefinitions", rules: { required: !0, trigger: ["blur", "change"], message: "请填写定时器配置" } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerForm.eventTimeDefinitions, callback: function(i) {
2178
+ e.$set(e.listenerForm, "eventTimeDefinitions", i);
2179
+ }, expression: "listenerForm.eventTimeDefinitions" } })], 1) : e._e()] : e._e()], 2), t("ElDivider"), t("p", { staticClass: "listener-filed__title", staticStyle: { "padding-bottom": "6px" } }, [t("span", [t("i", { staticClass: "el-icon-menu" }), e._v("注入字段:")]), t("ElButton", { attrs: { size: "mini", type: "primary" }, on: { click: function(i) {
2098
2180
  return e.openListenerFieldForm(null);
2099
- } } }, [e._v("添加字段")])], 1), t("ElTable", { staticStyle: { flex: "none" }, attrs: { data: e.fieldsListOfListener, size: "mini", "max-height": "240", border: "", fit: "" } }, [t("ElTableColumn", { attrs: { label: "序号", width: "50px", type: "index" } }), t("ElTableColumn", { attrs: { label: "字段名称", "min-width": "100px", prop: "name" } }), t("ElTableColumn", { attrs: { label: "字段类型", "min-width": "80px", "show-overflow-tooltip": "", formatter: (n) => e.fieldTypeObject[n.fieldType] } }), t("ElTableColumn", { attrs: { label: "字段值/表达式", "min-width": "100px", "show-overflow-tooltip": "", formatter: (n) => n.string || n.expression } }), t("ElTableColumn", { attrs: { label: "操作", width: "100px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: n, $index: s }) {
2100
- return [t("ElButton", { attrs: { size: "mini", type: "text" }, on: { click: function(r) {
2101
- return e.openListenerFieldForm(n, s);
2102
- } } }, [e._v("编辑")]), t("ElDivider", { attrs: { direction: "vertical" } }), t("ElButton", { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(r) {
2103
- return e.removeListenerField(n, s);
2181
+ } } }, [e._v("添加字段")])], 1), t("ElTable", { staticStyle: { flex: "none" }, attrs: { data: e.fieldsListOfListener, size: "mini", "max-height": "240", border: "", fit: "" } }, [t("ElTableColumn", { attrs: { label: "序号", width: "50px", type: "index" } }), t("ElTableColumn", { attrs: { label: "字段名称", "min-width": "100px", prop: "name" } }), t("ElTableColumn", { attrs: { label: "字段类型", "min-width": "80px", "show-overflow-tooltip": "", formatter: (i) => e.fieldTypeObject[i.fieldType] } }), t("ElTableColumn", { attrs: { label: "字段值/表达式", "min-width": "100px", "show-overflow-tooltip": "", formatter: (i) => i.string || i.expression } }), t("ElTableColumn", { attrs: { label: "操作", width: "100px" }, scopedSlots: e._u([{ key: "default", fn: function({ row: i, $index: s }) {
2182
+ return [t("ElButton", { attrs: { size: "mini", type: "text" }, on: { click: function(a) {
2183
+ return e.openListenerFieldForm(i, s);
2184
+ } } }, [e._v("编辑")]), t("ElDivider", { attrs: { direction: "vertical" } }), t("ElButton", { staticStyle: { color: "#ff4d4f" }, attrs: { size: "mini", type: "text" }, on: { click: function(a) {
2185
+ return e.removeListenerField(i, s);
2104
2186
  } } }, [e._v(" 移除 ")])];
2105
- } }]) })], 1), t("div", { staticClass: "element-drawer__button" }, [t("ElButton", { attrs: { size: "mini" }, on: { click: function(n) {
2187
+ } }]) })], 1), t("div", { staticClass: "element-drawer__button" }, [t("ElButton", { attrs: { size: "mini" }, on: { click: function(i) {
2106
2188
  e.listenerFormModelVisible = !1;
2107
- } } }, [e._v("取 消")]), t("ElButton", { attrs: { size: "mini", type: "primary" }, on: { click: e.saveListenerConfig } }, [e._v("保 存")])], 1)], 1), t("ElementDialog", { attrs: { title: "字段配置", visible: e.listenerFieldFormModelVisible, width: "600px", "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(n) {
2108
- e.listenerFieldFormModelVisible = n;
2189
+ } } }, [e._v("取 消")]), t("ElButton", { attrs: { size: "mini", type: "primary" }, on: { click: e.saveListenerConfig } }, [e._v("保 存")])], 1)], 1), t("ElementDialog", { attrs: { title: "字段配置", visible: e.listenerFieldFormModelVisible, width: "600px", "append-to-body": "", "destroy-on-close": "" }, on: { "update:visible": function(i) {
2190
+ e.listenerFieldFormModelVisible = i;
2109
2191
  } }, scopedSlots: e._u([{ key: "footer", fn: function() {
2110
- return [t("ElButton", { attrs: { size: "mini" }, on: { click: function(n) {
2192
+ return [t("ElButton", { attrs: { size: "mini" }, on: { click: function(i) {
2111
2193
  e.listenerFieldFormModelVisible = !1;
2112
2194
  } } }, [e._v("取 消")]), t("ElButton", { attrs: { size: "mini", type: "primary" }, on: { click: e.saveListenerFiled } }, [e._v("确 定")])];
2113
- }, proxy: !0 }]) }, [t("ElForm", { ref: "listenerFieldFormRef", staticStyle: { height: "136px" }, attrs: { model: e.listenerFieldForm, size: "mini", "label-width": "96px" }, nativeOn: { submit: function(n) {
2114
- n.preventDefault();
2115
- } } }, [t("ElFormItem", { attrs: { label: "字段名称:", prop: "name", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerFieldForm.name, callback: function(n) {
2116
- e.$set(e.listenerFieldForm, "name", n);
2117
- }, expression: "listenerFieldForm.name" } })], 1), t("ElFormItem", { attrs: { label: "字段类型:", prop: "fieldType", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElSelect", { model: { value: e.listenerFieldForm.fieldType, callback: function(n) {
2118
- e.$set(e.listenerFieldForm, "fieldType", n);
2119
- }, expression: "listenerFieldForm.fieldType" } }, e._l(Object.keys(e.fieldTypeObject), function(n) {
2120
- return t("ElOption", { key: n, attrs: { label: e.fieldTypeObject[n], value: n } });
2121
- }), 1)], 1), e.listenerFieldForm.fieldType === "string" ? t("ElFormItem", { key: "field-string", attrs: { label: "字段值:", prop: "string", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerFieldForm.string, callback: function(n) {
2122
- e.$set(e.listenerFieldForm, "string", n);
2123
- }, expression: "listenerFieldForm.string" } })], 1) : e._e(), e.listenerFieldForm.fieldType === "expression" ? t("ElFormItem", { key: "field-expression", attrs: { label: "表达式:", prop: "expression", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerFieldForm.expression, callback: function(n) {
2124
- e.$set(e.listenerFieldForm, "expression", n);
2195
+ }, proxy: !0 }]) }, [t("ElForm", { ref: "listenerFieldFormRef", staticStyle: { height: "136px" }, attrs: { model: e.listenerFieldForm, size: "mini", "label-width": "96px" }, nativeOn: { submit: function(i) {
2196
+ i.preventDefault();
2197
+ } } }, [t("ElFormItem", { attrs: { label: "字段名称:", prop: "name", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerFieldForm.name, callback: function(i) {
2198
+ e.$set(e.listenerFieldForm, "name", i);
2199
+ }, expression: "listenerFieldForm.name" } })], 1), t("ElFormItem", { attrs: { label: "字段类型:", prop: "fieldType", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElSelect", { model: { value: e.listenerFieldForm.fieldType, callback: function(i) {
2200
+ e.$set(e.listenerFieldForm, "fieldType", i);
2201
+ }, expression: "listenerFieldForm.fieldType" } }, e._l(Object.keys(e.fieldTypeObject), function(i) {
2202
+ return t("ElOption", { key: i, attrs: { label: e.fieldTypeObject[i], value: i } });
2203
+ }), 1)], 1), e.listenerFieldForm.fieldType === "string" ? t("ElFormItem", { key: "field-string", attrs: { label: "字段值:", prop: "string", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerFieldForm.string, callback: function(i) {
2204
+ e.$set(e.listenerFieldForm, "string", i);
2205
+ }, expression: "listenerFieldForm.string" } })], 1) : e._e(), e.listenerFieldForm.fieldType === "expression" ? t("ElFormItem", { key: "field-expression", attrs: { label: "表达式:", prop: "expression", rules: { required: !0, trigger: ["blur", "change"] } } }, [t("ElInput", { attrs: { clearable: "" }, model: { value: e.listenerFieldForm.expression, callback: function(i) {
2206
+ e.$set(e.listenerFieldForm, "expression", i);
2125
2207
  }, expression: "listenerFieldForm.expression" } })], 1) : e._e()], 1)], 1)], 1);
2126
- }, dn = [], fn = /* @__PURE__ */ h(
2127
- cn,
2128
- un,
2129
- dn,
2208
+ }, yn = [], hn = /* @__PURE__ */ h(
2209
+ fn,
2210
+ bn,
2211
+ yn,
2130
2212
  !1,
2131
2213
  null,
2132
2214
  null,
2133
2215
  null,
2134
2216
  null
2135
2217
  );
2136
- const bn = fn.exports, ie = ["base", "task", "form", "multiInstance"], yn = {
2218
+ const vn = hn.exports, ie = ["base", "task", "form", "multiInstance"], gn = {
2137
2219
  name: "PropertiesPanel",
2138
2220
  componentName: "MyPropertiesPanel",
2139
2221
  components: {
2140
- UserTaskListeners: bn,
2141
- ElementForm: mn,
2142
- ElementProperties: rn,
2143
- ElementListeners: Qt,
2144
- SignalAndMassage: Jt,
2145
- FlowCondition: Ut,
2146
- ElementMultiInstance: Bt,
2147
- ElementTask: Lt,
2148
- ElementOtherConfig: ut,
2149
- ElementBaseInfo: ot
2222
+ UserTaskListeners: vn,
2223
+ ElementForm: dn,
2224
+ ElementProperties: ln,
2225
+ ElementListeners: nn,
2226
+ SignalAndMassage: Zt,
2227
+ FlowCondition: Nt,
2228
+ ElementMultiInstance: Vt,
2229
+ ElementTask: Ot,
2230
+ ElementOtherConfig: dt,
2231
+ ElementBaseInfo: lt
2150
2232
  },
2151
2233
  provide() {
2152
2234
  return {
2153
2235
  prefix: this.prefix,
2154
2236
  width: this.width,
2237
+ context: this.context,
2155
2238
  bpmnInstances: this.bpmnInstances
2156
2239
  };
2157
2240
  },
@@ -2161,6 +2244,7 @@ const bn = fn.exports, ie = ["base", "task", "form", "multiInstance"], yn = {
2161
2244
  default: () => ["base", "task", "form", "multiInstance"]
2162
2245
  },
2163
2246
  bpmnModeler: Object,
2247
+ context: Object,
2164
2248
  prefix: {
2165
2249
  type: String,
2166
2250
  default: "camunda"
@@ -2225,28 +2309,28 @@ const bn = fn.exports, ie = ["base", "task", "form", "multiInstance"], yn = {
2225
2309
  getActiveElement() {
2226
2310
  this.initFormOnChanged(null), this.bpmnModeler.on("import.done", () => {
2227
2311
  this.bpmnModeler.get("canvas").zoom("fit-viewport", "center"), this.initFormOnChanged(null);
2228
- }), this.bpmnModeler.on("selection.changed", ({ newSelection: i }) => {
2229
- this.initFormOnChanged(i[0] || null);
2230
- }), this.bpmnModeler.on("element.changed", ({ element: i }) => {
2231
- i && i.id === this.elementId && this.initFormOnChanged(i);
2312
+ }), this.bpmnModeler.on("selection.changed", ({ newSelection: n }) => {
2313
+ this.initFormOnChanged(n[0] || null);
2314
+ }), this.bpmnModeler.on("element.changed", ({ element: n }) => {
2315
+ n && n.id === this.elementId && this.initFormOnChanged(n);
2232
2316
  });
2233
2317
  },
2234
2318
  // 初始化数据
2235
- initFormOnChanged(i) {
2319
+ initFormOnChanged(n) {
2236
2320
  var t;
2237
- let e = i;
2238
- e || (e = (t = this.bpmnInstances.elementRegistry.find((n) => n.type === "bpmn:Process")) != null ? t : this.bpmnInstances.elementRegistry.find((n) => n.type === "bpmn:Collaboration")), e && (this.element = 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" || this.elementType === "StartEvent");
2321
+ let e = n;
2322
+ e || (e = (t = this.bpmnInstances.elementRegistry.find((i) => i.type === "bpmn:Process")) != null ? t : this.bpmnInstances.elementRegistry.find((i) => i.type === "bpmn:Collaboration")), e && (this.element = 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" || this.elementType === "StartEvent");
2239
2323
  }
2240
2324
  }
2241
2325
  };
2242
- var hn = function() {
2326
+ var En = function() {
2243
2327
  var e = this, t = e._self._c;
2244
- return t("div", { class: ["process-panel__container", { show: e.isPanelVisible, hide: !e.isPanelVisible }], style: { width: `${e.isPanelVisible ? e.width : 34}px` }, on: { click: function(n) {
2328
+ return t("div", { class: ["process-panel__container", { show: e.isPanelVisible, hide: !e.isPanelVisible }], style: { width: `${e.isPanelVisible ? e.width : 34}px` }, on: { click: function(i) {
2245
2329
  e.isPanelVisible = !0;
2246
- } } }, [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(n) {
2247
- n.stopPropagation(), e.isPanelVisible = !e.isPanelVisible;
2248
- } } })]), t("ElCollapse", { directives: [{ name: "show", rawName: "v-show", value: e.isPanelVisible, expression: "isPanelVisible" }], model: { value: e.activeTab, callback: function(n) {
2249
- e.activeTab = n;
2330
+ } } }, [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(i) {
2331
+ i.stopPropagation(), e.isPanelVisible = !e.isPanelVisible;
2332
+ } } })]), t("ElCollapse", { directives: [{ name: "show", rawName: "v-show", value: e.isPanelVisible, expression: "isPanelVisible" }], model: { value: e.activeTab, callback: function(i) {
2333
+ e.activeTab = i;
2250
2334
  }, expression: "activeTab" } }, [t("ElCollapseItem", { attrs: { name: "base" }, scopedSlots: e._u([{ key: "title", fn: function() {
2251
2335
  return [t("div", { staticClass: "panel-tab__title" }, [t("i", { staticClass: "el-icon-info" }), e._v("常规")])];
2252
2336
  }, proxy: !0 }]) }, [t("ElementBaseInfo", { attrs: { id: e.elementId, "id-edit-disabled": e.idEditDisabled, type: e.elementType, element: e.element, "bpmn-instances": e.bpmnInstances } })], 1), e.elementType === "Process" ? t("ElCollapseItem", { key: "message", attrs: { name: "message" }, scopedSlots: e._u([{ key: "title", fn: function() {
@@ -2272,45 +2356,45 @@ var hn = function() {
2272
2356
  }, proxy: !0 }]) }, [t("ElementProperties", { attrs: { id: e.elementId, "bpmn-instances": e.bpmnInstances, element: e.element, type: e.elementType } })], 1), t("ElCollapseItem", { key: "other", attrs: { name: "other" }, scopedSlots: e._u([{ key: "title", fn: function() {
2273
2357
  return [t("div", { staticClass: "panel-tab__title" }, [t("i", { staticClass: "el-icon-s-promotion" }), e._v("其他")])];
2274
2358
  }, proxy: !0 }]) }, [t("ElementOtherConfig", { attrs: { id: e.elementId, element: e.element, "bpmn-instances": e.bpmnInstances } })], 1), e._t("extend", null, { id: e.elementId, bpmnInstances: e.bpmnInstances, element: e.element, type: e.elementType })], 2)], 1);
2275
- }, gn = [], vn = /* @__PURE__ */ h(
2276
- yn,
2277
- hn,
2359
+ }, Fn = [], xn = /* @__PURE__ */ h(
2278
2360
  gn,
2361
+ En,
2362
+ Fn,
2279
2363
  !1,
2280
2364
  null,
2281
2365
  null,
2282
2366
  null,
2283
2367
  null
2284
2368
  );
2285
- const En = vn.exports, Fn = (i, e, t) => (t = t || "camunda", `<?xml version="1.0" encoding="UTF-8"?>
2369
+ const Sn = xn.exports, Tn = (n, e, t) => (t = t || "camunda", `<?xml version="1.0" encoding="UTF-8"?>
2286
2370
  <bpmn2:definitions
2287
2371
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2288
2372
  xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL"
2289
2373
  xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
2290
2374
  xmlns:dc="http://www.omg.org/spec/DD/20100524/DC"
2291
2375
  xmlns:di="http://www.omg.org/spec/DD/20100524/DI"
2292
- id="diagram_${i}"
2376
+ id="diagram_${n}"
2293
2377
  targetNamespace="${{
2294
2378
  activiti: "http://activiti.org/bpmn",
2295
2379
  camunda: "http://bpmn.io/schema/bpmn",
2296
2380
  flowable: "http://flowable.org/bpmn"
2297
2381
  }[t]}">
2298
- <bpmn2:process id="${i}" name="${e}" isExecutable="true">
2382
+ <bpmn2:process id="${n}" name="${e}" isExecutable="true">
2299
2383
  </bpmn2:process>
2300
2384
  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
2301
- <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="${i}">
2385
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="${n}">
2302
2386
  </bpmndi:BPMNPlane>
2303
2387
  </bpmndi:BPMNDiagram>
2304
2388
  </bpmn2:definitions>`);
2305
- function xn(i) {
2389
+ function Cn(n) {
2306
2390
  return function(e, t) {
2307
- return t = t || {}, e = i[e] || e, e.replace(/{([^}]+)}/g, function(n, s) {
2308
- let r = t[s];
2309
- return i[t[s]] !== null && i[t[s]] !== void 0 && (r = i[t[s]]), r || `{${s}}`;
2391
+ return t = t || {}, e = n[e] || e, e.replace(/{([^}]+)}/g, function(i, s) {
2392
+ let a = t[s];
2393
+ return n[t[s]] !== null && n[t[s]] !== void 0 && (a = n[t[s]]), a || `{${s}}`;
2310
2394
  });
2311
2395
  };
2312
2396
  }
2313
- const Sn = {
2397
+ const kn = {
2314
2398
  // 添加部分
2315
2399
  "Append EndEvent": "追加结束事件",
2316
2400
  "Append Gateway": "追加网关",
@@ -2558,9 +2642,9 @@ const Sn = {
2558
2642
  Data: "数据",
2559
2643
  TextAnnotation: "文本说明",
2560
2644
  Tasks: "任务"
2561
- }, Tn = "Camunda", Cn = "http://camunda.org/schema/1.0/bpmn", In = "camunda", kn = {
2645
+ }, In = "Camunda", _n = "http://camunda.org/schema/1.0/bpmn", wn = "camunda", An = {
2562
2646
  tagAlias: "lowerCase"
2563
- }, An = [], _n = [
2647
+ }, $n = [], Ln = [
2564
2648
  {
2565
2649
  name: "Definitions",
2566
2650
  isAbstract: !0,
@@ -3676,17 +3760,17 @@ const Sn = {
3676
3760
  }
3677
3761
  ]
3678
3762
  }
3679
- ], wn = [], se = {
3680
- name: Tn,
3681
- uri: Cn,
3682
- prefix: In,
3683
- xml: kn,
3684
- associations: An,
3685
- types: _n,
3686
- emumerations: wn
3687
- }, $n = "Activiti", Ln = "http://activiti.org/bpmn", On = "activiti", Pn = {
3763
+ ], On = [], se = {
3764
+ name: In,
3765
+ uri: _n,
3766
+ prefix: wn,
3767
+ xml: An,
3768
+ associations: $n,
3769
+ types: Ln,
3770
+ emumerations: On
3771
+ }, Pn = "Activiti", Mn = "http://activiti.org/bpmn", Dn = "activiti", Bn = {
3688
3772
  tagAlias: "lowerCase"
3689
- }, Mn = [], Dn = [
3773
+ }, Vn = [], Rn = [
3690
3774
  {
3691
3775
  name: "Definitions",
3692
3776
  isAbstract: !0,
@@ -4784,17 +4868,17 @@ const Sn = {
4784
4868
  }
4785
4869
  ]
4786
4870
  }
4787
- ], Bn = [], re = {
4788
- name: $n,
4789
- uri: Ln,
4790
- prefix: On,
4791
- xml: Pn,
4792
- associations: Mn,
4793
- types: Dn,
4794
- emumerations: Bn
4795
- }, Rn = "Flowable", Vn = "http://flowable.org/bpmn", jn = "flowable", zn = {
4871
+ ], zn = [], re = {
4872
+ name: Pn,
4873
+ uri: Mn,
4874
+ prefix: Dn,
4875
+ xml: Bn,
4876
+ associations: Vn,
4877
+ types: Rn,
4878
+ emumerations: zn
4879
+ }, jn = "Flowable", Un = "http://flowable.org/bpmn", Nn = "flowable", Gn = {
4796
4880
  tagAlias: "lowerCase"
4797
- }, Un = [], Nn = [], Gn = [
4881
+ }, qn = [], Kn = [], Jn = [
4798
4882
  {
4799
4883
  name: "InOutBinding",
4800
4884
  superClass: [
@@ -6157,161 +6241,161 @@ const Sn = {
6157
6241
  ]
6158
6242
  }
6159
6243
  ], ae = {
6160
- name: Rn,
6161
- uri: Vn,
6162
- prefix: jn,
6163
- xml: zn,
6164
- associations: Un,
6165
- emumerations: Nn,
6166
- types: Gn
6167
- }, qn = "*";
6168
- function _(i) {
6244
+ name: jn,
6245
+ uri: Un,
6246
+ prefix: Nn,
6247
+ xml: Gn,
6248
+ associations: qn,
6249
+ emumerations: Kn,
6250
+ types: Jn
6251
+ }, Zn = "*";
6252
+ function w(n) {
6169
6253
  const e = this;
6170
- i.on("moddleCopy.canCopyProperty", function(t) {
6171
- const n = t.property, s = t.parent;
6172
- return e.canCopyProperty(n, s);
6254
+ n.on("moddleCopy.canCopyProperty", function(t) {
6255
+ const i = t.property, s = t.parent;
6256
+ return e.canCopyProperty(i, s);
6173
6257
  });
6174
6258
  }
6175
- _.$inject = ["eventBus"];
6176
- _.prototype.canCopyProperty = function(i, e) {
6177
- if (Ce(i) && !Kn(i, e) || k(i, "camunda:InputOutput") && !this.canHostInputOutput(e) || he(i, ["camunda:Connector", "camunda:Field"]) && !this.canHostConnector(e) || k(i, "camunda:In") && !this.canHostIn(e))
6259
+ w.$inject = ["eventBus"];
6260
+ w.prototype.canCopyProperty = function(n, e) {
6261
+ if (Ce(n) && !Hn(n, e) || I(n, "camunda:InputOutput") && !this.canHostInputOutput(e) || he(n, ["camunda:Connector", "camunda:Field"]) && !this.canHostConnector(e) || I(n, "camunda:In") && !this.canHostIn(e))
6178
6262
  return !1;
6179
6263
  };
6180
- _.prototype.canHostInputOutput = function(i) {
6181
- if (x(i, "camunda:Connector"))
6264
+ w.prototype.canHostInputOutput = function(n) {
6265
+ if (x(n, "camunda:Connector"))
6182
6266
  return !0;
6183
- const t = x(i, "bpmn:FlowNode");
6184
- return !(!t || he(t, ["bpmn:StartEvent", "bpmn:Gateway", "bpmn:BoundaryEvent"]) || k(t, "bpmn:SubProcess") && t.get("triggeredByEvent"));
6267
+ const t = x(n, "bpmn:FlowNode");
6268
+ return !(!t || he(t, ["bpmn:StartEvent", "bpmn:Gateway", "bpmn:BoundaryEvent"]) || I(t, "bpmn:SubProcess") && t.get("triggeredByEvent"));
6185
6269
  };
6186
- _.prototype.canHostConnector = function(i) {
6187
- const e = x(i, "camunda:ServiceTaskLike");
6188
- return k(e, "bpmn:MessageEventDefinition") ? x(i, "bpmn:IntermediateThrowEvent") || x(i, "bpmn:EndEvent") : !0;
6270
+ w.prototype.canHostConnector = function(n) {
6271
+ const e = x(n, "camunda:ServiceTaskLike");
6272
+ return I(e, "bpmn:MessageEventDefinition") ? x(n, "bpmn:IntermediateThrowEvent") || x(n, "bpmn:EndEvent") : !0;
6189
6273
  };
6190
- _.prototype.canHostIn = function(i) {
6191
- return x(i, "bpmn:CallActivity") ? !0 : x(i, "bpmn:SignalEventDefinition") ? x(i, "bpmn:IntermediateThrowEvent") || x(i, "bpmn:EndEvent") : !0;
6274
+ w.prototype.canHostIn = function(n) {
6275
+ return x(n, "bpmn:CallActivity") ? !0 : x(n, "bpmn:SignalEventDefinition") ? x(n, "bpmn:IntermediateThrowEvent") || x(n, "bpmn:EndEvent") : !0;
6192
6276
  };
6193
- function k(i, e) {
6194
- return i && Ie(i.$instanceOf) && i.$instanceOf(e);
6277
+ function I(n, e) {
6278
+ return n && ke(n.$instanceOf) && n.$instanceOf(e);
6195
6279
  }
6196
- function he(i, e) {
6197
- return A(e, function(t) {
6198
- return k(i, t);
6280
+ function he(n, e) {
6281
+ return _(e, function(t) {
6282
+ return I(n, t);
6199
6283
  });
6200
6284
  }
6201
- function x(i, e) {
6285
+ function x(n, e) {
6202
6286
  if (!e)
6203
- return i.$parent;
6204
- if (k(i, e))
6205
- return i;
6206
- if (i.$parent)
6207
- return x(i.$parent, e);
6287
+ return n.$parent;
6288
+ if (I(n, e))
6289
+ return n;
6290
+ if (n.$parent)
6291
+ return x(n.$parent, e);
6208
6292
  }
6209
- function Kn(i, e) {
6210
- const t = i.$type && i.$model.getTypeDescriptor(i.$type), n = t && t.meta && t.meta.allowedIn;
6211
- return !n || Jn(n) ? !0 : A(n, function(s) {
6293
+ function Hn(n, e) {
6294
+ const t = n.$type && n.$model.getTypeDescriptor(n.$type), i = t && t.meta && t.meta.allowedIn;
6295
+ return !i || Wn(i) ? !0 : _(i, function(s) {
6212
6296
  return x(e, s);
6213
6297
  });
6214
6298
  }
6215
- function Jn(i) {
6216
- return i.indexOf(qn) !== -1;
6299
+ function Wn(n) {
6300
+ return n.indexOf(Zn) !== -1;
6217
6301
  }
6218
- const Zn = {
6302
+ const Xn = {
6219
6303
  __init__: ["camundaModdleExtension"],
6220
- camundaModdleExtension: ["type", _]
6221
- }, Hn = {
6304
+ camundaModdleExtension: ["type", w]
6305
+ }, Yn = {
6222
6306
  FailedJobRetryTimeCycle: ["bpmn:StartEvent", "bpmn:BoundaryEvent", "bpmn:IntermediateCatchEvent", "bpmn:Activity"],
6223
6307
  Connector: ["bpmn:EndEvent", "bpmn:IntermediateThrowEvent"],
6224
6308
  Field: ["bpmn:EndEvent", "bpmn:IntermediateThrowEvent"]
6225
6309
  };
6226
- function H(i, e) {
6227
- return i && typeof i.$instanceOf == "function" && i.$instanceOf(e);
6310
+ function H(n, e) {
6311
+ return n && typeof n.$instanceOf == "function" && n.$instanceOf(e);
6228
6312
  }
6229
- function Wn(i) {
6230
- return i && i.length;
6313
+ function Qn(n) {
6314
+ return n && n.length;
6231
6315
  }
6232
- function j(i, e) {
6233
- return Wn(i) && A(i, function(t) {
6316
+ function z(n, e) {
6317
+ return Qn(n) && _(n, function(t) {
6234
6318
  return H(t, e);
6235
6319
  });
6236
6320
  }
6237
- function Xn(i, e) {
6238
- return A(e, function(t) {
6239
- return H(i, t);
6321
+ function ei(n, e) {
6322
+ return _(e, function(t) {
6323
+ return H(n, t);
6240
6324
  });
6241
6325
  }
6242
- function G(i, e, t) {
6243
- const n = e.name, s = Hn[n.replace(/activiti:/, "")];
6244
- return n === i && Xn(t, s);
6326
+ function G(n, e, t) {
6327
+ const i = e.name, s = Yn[i.replace(/activiti:/, "")];
6328
+ return i === n && ei(t, s);
6245
6329
  }
6246
- function W(i) {
6247
- i.on(
6330
+ function W(n) {
6331
+ n.on(
6248
6332
  "property.clone",
6249
6333
  function(e) {
6250
- const t = e.newElement, n = e.propertyDescriptor;
6251
- this.canCloneProperty(t, n);
6334
+ const t = e.newElement, i = e.propertyDescriptor;
6335
+ this.canCloneProperty(t, i);
6252
6336
  },
6253
6337
  this
6254
6338
  );
6255
6339
  }
6256
6340
  W.$inject = ["eventBus"];
6257
- W.prototype.canCloneProperty = function(i, e) {
6258
- if (G("activiti:FailedJobRetryTimeCycle", e, i))
6259
- return j(i.eventDefinitions, "bpmn:TimerEventDefinition") || j(i.eventDefinitions, "bpmn:SignalEventDefinition") || H(i.loopCharacteristics, "bpmn:MultiInstanceLoopCharacteristics");
6260
- if (G("activiti:Connector", e, i) || G("activiti:Field", e, i))
6261
- return j(i.eventDefinitions, "bpmn:MessageEventDefinition");
6341
+ W.prototype.canCloneProperty = function(n, e) {
6342
+ if (G("activiti:FailedJobRetryTimeCycle", e, n))
6343
+ return z(n.eventDefinitions, "bpmn:TimerEventDefinition") || z(n.eventDefinitions, "bpmn:SignalEventDefinition") || H(n.loopCharacteristics, "bpmn:MultiInstanceLoopCharacteristics");
6344
+ if (G("activiti:Connector", e, n) || G("activiti:Field", e, n))
6345
+ return z(n.eventDefinitions, "bpmn:MessageEventDefinition");
6262
6346
  };
6263
- const Yn = {
6347
+ const ti = {
6264
6348
  __init__: ["ActivitiModdleExtension"],
6265
6349
  ActivitiModdleExtension: ["type", W]
6266
- }, Qn = {
6350
+ }, ni = {
6267
6351
  FailedJobRetryTimeCycle: ["bpmn:StartEvent", "bpmn:BoundaryEvent", "bpmn:IntermediateCatchEvent", "bpmn:Activity"],
6268
6352
  Connector: ["bpmn:EndEvent", "bpmn:IntermediateThrowEvent"],
6269
6353
  Field: ["bpmn:EndEvent", "bpmn:IntermediateThrowEvent"]
6270
6354
  };
6271
- function X(i, e) {
6272
- return i && typeof i.$instanceOf == "function" && i.$instanceOf(e);
6355
+ function X(n, e) {
6356
+ return n && typeof n.$instanceOf == "function" && n.$instanceOf(e);
6273
6357
  }
6274
- function ei(i) {
6275
- return i && i.length;
6358
+ function ii(n) {
6359
+ return n && n.length;
6276
6360
  }
6277
- function z(i, e) {
6278
- return ei(i) && A(i, function(t) {
6361
+ function j(n, e) {
6362
+ return ii(n) && _(n, function(t) {
6279
6363
  return X(t, e);
6280
6364
  });
6281
6365
  }
6282
- function ti(i, e) {
6283
- return A(e, function(t) {
6284
- return X(i, t);
6366
+ function si(n, e) {
6367
+ return _(e, function(t) {
6368
+ return X(n, t);
6285
6369
  });
6286
6370
  }
6287
- function q(i, e, t) {
6288
- const n = e.name, s = Qn[n.replace(/flowable:/, "")];
6289
- return n === i && ti(t, s);
6371
+ function q(n, e, t) {
6372
+ const i = e.name, s = ni[i.replace(/flowable:/, "")];
6373
+ return i === n && si(t, s);
6290
6374
  }
6291
- function Y(i) {
6292
- i.on(
6375
+ function Y(n) {
6376
+ n.on(
6293
6377
  "property.clone",
6294
6378
  function(e) {
6295
- const t = e.newElement, n = e.propertyDescriptor;
6296
- this.canCloneProperty(t, n);
6379
+ const t = e.newElement, i = e.propertyDescriptor;
6380
+ this.canCloneProperty(t, i);
6297
6381
  },
6298
6382
  this
6299
6383
  );
6300
6384
  }
6301
6385
  Y.$inject = ["eventBus"];
6302
- Y.prototype.canCloneProperty = function(i, e) {
6303
- if (q("flowable:FailedJobRetryTimeCycle", e, i))
6304
- return z(i.eventDefinitions, "bpmn:TimerEventDefinition") || z(i.eventDefinitions, "bpmn:SignalEventDefinition") || X(i.loopCharacteristics, "bpmn:MultiInstanceLoopCharacteristics");
6305
- if (q("flowable:Connector", e, i) || q("flowable:Field", e, i))
6306
- return z(i.eventDefinitions, "bpmn:MessageEventDefinition");
6386
+ Y.prototype.canCloneProperty = function(n, e) {
6387
+ if (q("flowable:FailedJobRetryTimeCycle", e, n))
6388
+ return j(n.eventDefinitions, "bpmn:TimerEventDefinition") || j(n.eventDefinitions, "bpmn:SignalEventDefinition") || X(n.loopCharacteristics, "bpmn:MultiInstanceLoopCharacteristics");
6389
+ if (q("flowable:Connector", e, n) || q("flowable:Field", e, n))
6390
+ return j(n.eventDefinitions, "bpmn:MessageEventDefinition");
6307
6391
  };
6308
- const ni = {
6392
+ const ri = {
6309
6393
  __init__: ["FlowableModdleExtension"],
6310
6394
  FlowableModdleExtension: ["type", Y]
6311
6395
  };
6312
6396
  le.registerLanguage("xml", Re);
6313
- le.registerLanguage("json", Ve);
6314
- const ii = {
6397
+ le.registerLanguage("json", ze);
6398
+ const ai = {
6315
6399
  name: "ProcessDesigner",
6316
6400
  components: {
6317
6401
  HighlightJS: je
@@ -6360,12 +6444,12 @@ const ii = {
6360
6444
  headerButtonSize: {
6361
6445
  type: String,
6362
6446
  default: "small",
6363
- validator: (i) => ["default", "medium", "small", "mini"].indexOf(i) !== -1
6447
+ validator: (n) => ["default", "medium", "small", "mini"].indexOf(n) !== -1
6364
6448
  },
6365
6449
  headerButtonType: {
6366
6450
  type: String,
6367
6451
  default: "primary",
6368
- validator: (i) => ["default", "primary", "success", "warning", "danger", "info"].indexOf(i) !== -1
6452
+ validator: (n) => ["default", "primary", "success", "warning", "danger", "info"].indexOf(n) !== -1
6369
6453
  },
6370
6454
  extendTypes: Array
6371
6455
  },
@@ -6382,29 +6466,29 @@ const ii = {
6382
6466
  },
6383
6467
  computed: {
6384
6468
  additionalModules() {
6385
- const i = [];
6469
+ const n = [];
6386
6470
  if (this.onlyCustomizeAddi)
6387
6471
  return te(this.additionalModel) ? this.additionalModel || [] : [this.additionalModel];
6388
- te(this.additionalModel) ? i.push(...this.additionalModel) : this.additionalModel && i.push(this.additionalModel);
6472
+ te(this.additionalModel) ? n.push(...this.additionalModel) : this.additionalModel && n.push(this.additionalModel);
6389
6473
  const e = {
6390
- translate: ["value", xn(this.translations || Sn)]
6474
+ translate: ["value", Cn(this.translations || kn)]
6391
6475
  };
6392
- return i.push(e), this.simulation && i.push(De), i.push(Me), this.prefix === "camunda" && i.push(Zn), this.prefix === "flowable" && i.push(ni), this.prefix === "activiti" && i.push(Yn), i;
6476
+ return n.push(e), this.simulation && n.push(Be), n.push(De), this.prefix === "camunda" && n.push(Xn), this.prefix === "flowable" && n.push(ri), this.prefix === "activiti" && n.push(ti), n;
6393
6477
  },
6394
6478
  moddleExtensions() {
6395
- const i = {};
6479
+ const n = {};
6396
6480
  if (this.onlyCustomizeModdle)
6397
6481
  return this.moddleExtension || null;
6398
6482
  if (this.moddleExtension)
6399
6483
  for (const e in this.moddleExtension)
6400
- i[e] = this.moddleExtension[e];
6401
- return this.prefix === "activiti" && (i.activiti = T(u({}, re), {
6484
+ n[e] = this.moddleExtension[e];
6485
+ return this.prefix === "activiti" && (n.activiti = T(u({}, re), {
6402
6486
  types: [...re.types, ...this.extendTypes || []]
6403
- })), this.prefix === "flowable" && (i.flowable = T(u({}, ae), {
6487
+ })), this.prefix === "flowable" && (n.flowable = T(u({}, ae), {
6404
6488
  types: [...ae.types, ...this.extendTypes || []]
6405
- })), this.prefix === "camunda" && (i.camunda = T(u({}, se), {
6489
+ })), this.prefix === "camunda" && (n.camunda = T(u({}, se), {
6406
6490
  types: [...se.types, ...this.extendTypes || []]
6407
- })), i;
6491
+ })), n;
6408
6492
  }
6409
6493
  },
6410
6494
  mounted() {
@@ -6414,7 +6498,7 @@ const ii = {
6414
6498
  },
6415
6499
  methods: {
6416
6500
  initBpmnModeler() {
6417
- this.bpmnModeler || (this.bpmnModeler = new Pe(u({
6501
+ this.bpmnModeler || (this.bpmnModeler = new Me(u({
6418
6502
  container: this.$refs["bpmn-canvas"],
6419
6503
  keyboard: this.keyboard ? { bindTo: document } : null,
6420
6504
  additionalModules: this.additionalModules,
@@ -6422,32 +6506,32 @@ const ii = {
6422
6506
  }, this.options)), this.$emit("init-finished", this.bpmnModeler), this.initModelListeners());
6423
6507
  },
6424
6508
  initModelListeners() {
6425
- const i = this.bpmnModeler.get("eventBus"), e = this;
6509
+ const n = this.bpmnModeler.get("eventBus"), e = this;
6426
6510
  this.events.forEach((t) => {
6427
- i.on(t, function(n) {
6428
- const s = t.replace(/\./g, "-"), r = n ? n.element : null;
6429
- e.$emit(s, r, n);
6511
+ n.on(t, function(i) {
6512
+ const s = t.replace(/\./g, "-"), a = i ? i.element : null;
6513
+ e.$emit(s, a, i);
6430
6514
  });
6431
- }), i.on("commandStack.changed", (t) => d(this, null, function* () {
6515
+ }), n.on("commandStack.changed", (t) => d(this, null, function* () {
6432
6516
  try {
6433
6517
  this.recoverable = this.bpmnModeler.get("commandStack").canRedo(), this.revocable = this.bpmnModeler.get("commandStack").canUndo();
6434
- const { xml: n } = yield this.bpmnModeler.saveXML({ format: !0 });
6435
- this.$emit("commandStack-changed", t), this.$emit("input", n), this.$emit("change", n);
6436
- } catch (n) {
6437
- console.error(`[Process Designer Warn]: ${n.message || n}`);
6518
+ const { xml: i } = yield this.bpmnModeler.saveXML({ format: !0 });
6519
+ this.$emit("commandStack-changed", t), this.$emit("input", i), this.$emit("change", i);
6520
+ } catch (i) {
6521
+ console.error(`[Process Designer Warn]: ${i.message || i}`);
6438
6522
  }
6439
6523
  })), this.bpmnModeler.on("canvas.viewbox.changed", ({ viewbox: t }) => {
6440
6524
  this.$emit("canvas-viewbox-changed", { viewbox: t });
6441
- const { scale: n } = t;
6442
- this.defaultZoom = Math.floor(n * 100) / 100;
6525
+ const { scale: i } = t;
6526
+ this.defaultZoom = Math.floor(i * 100) / 100;
6443
6527
  });
6444
6528
  },
6445
6529
  /* 创建新的流程图 */
6446
- createNewDiagram(i) {
6530
+ createNewDiagram(n) {
6447
6531
  return d(this, null, function* () {
6448
- const e = this.processId || `Process_${(/* @__PURE__ */ new Date()).getTime()}`, t = this.processName || `业务流程_${(/* @__PURE__ */ new Date()).getTime()}`, n = i || Fn(e, t, this.prefix);
6532
+ const e = this.processId || `Process_${(/* @__PURE__ */ new Date()).getTime()}`, t = this.processName || `业务流程_${(/* @__PURE__ */ new Date()).getTime()}`, i = n || Tn(e, t, this.prefix);
6449
6533
  try {
6450
- const { warnings: s } = yield this.bpmnModeler.importXML(n);
6534
+ const { warnings: s } = yield this.bpmnModeler.importXML(i);
6451
6535
  this.bpmnModeler.get("canvas").zoom("fit-viewport", "center"), s != null && s.length;
6452
6536
  } catch (s) {
6453
6537
  console.error(`[Process Designer Warn]: ${(s == null ? void 0 : s.message) || s}`);
@@ -6459,47 +6543,47 @@ const ii = {
6459
6543
  * @param {string} type
6460
6544
  * @param {*} name
6461
6545
  */
6462
- downloadProcess(i, e = "diagram") {
6546
+ downloadProcess(n, e = "diagram") {
6463
6547
  return d(this, null, function* () {
6464
6548
  try {
6465
- if (i === "xml" || i === "bpmn") {
6466
- const { err: n, xml: s } = yield this.bpmnModeler.saveXML();
6467
- n && console.error(`[Process Designer Warn ]: ${n.message || n}`);
6468
- const { href: r, filename: a } = this.setEncoded(i.toUpperCase(), e, s);
6469
- t(r, a);
6549
+ if (n === "xml" || n === "bpmn") {
6550
+ const { err: i, xml: s } = yield this.bpmnModeler.saveXML();
6551
+ i && console.error(`[Process Designer Warn ]: ${i.message || i}`);
6552
+ const { href: a, filename: r } = this.setEncoded(n.toUpperCase(), e, s);
6553
+ t(a, r);
6470
6554
  } else {
6471
- const { err: n, svg: s } = yield this.bpmnModeler.saveSVG();
6472
- if (n)
6473
- return console.error(n);
6474
- const { href: r, filename: a } = this.setEncoded("SVG", e, s);
6475
- t(r, a);
6555
+ const { err: i, svg: s } = yield this.bpmnModeler.saveSVG();
6556
+ if (i)
6557
+ return console.error(i);
6558
+ const { href: a, filename: r } = this.setEncoded("SVG", e, s);
6559
+ t(a, r);
6476
6560
  }
6477
- } catch (n) {
6478
- console.error(`[Process Designer Warn ]: ${n.message || n}`);
6561
+ } catch (i) {
6562
+ console.error(`[Process Designer Warn ]: ${i.message || i}`);
6479
6563
  }
6480
- function t(n, s) {
6481
- if (n && s) {
6482
- const r = document.createElement("a");
6483
- r.download = s, r.href = n, r.click(), URL.revokeObjectURL(r.href);
6564
+ function t(i, s) {
6565
+ if (i && s) {
6566
+ const a = document.createElement("a");
6567
+ a.download = s, a.href = i, a.click(), URL.revokeObjectURL(a.href);
6484
6568
  }
6485
6569
  }
6486
6570
  });
6487
6571
  },
6488
6572
  // 根据所需类型进行转码并返回下载地址
6489
- setEncoded(i, e = "diagram", t) {
6490
- const n = encodeURIComponent(t);
6573
+ setEncoded(n, e = "diagram", t) {
6574
+ const i = encodeURIComponent(t);
6491
6575
  return {
6492
- filename: `${e}.${i}`,
6493
- href: `data:application/${i === "svg" ? "text/xml" : "bpmn20-xml"};charset=UTF-8,${n}`,
6576
+ filename: `${e}.${n}`,
6577
+ href: `data:application/${n === "svg" ? "text/xml" : "bpmn20-xml"};charset=UTF-8,${i}`,
6494
6578
  data: t
6495
6579
  };
6496
6580
  },
6497
6581
  // 加载本地文件
6498
6582
  importLocalFile() {
6499
- const i = this, e = this.$refs.refFile.files[0], t = new FileReader();
6583
+ const n = this, e = this.$refs.refFile.files[0], t = new FileReader();
6500
6584
  t.readAsText(e), t.onload = function() {
6501
- const n = this.result;
6502
- i.createNewDiagram(n);
6585
+ const i = this.result;
6586
+ n.createNewDiagram(i);
6503
6587
  };
6504
6588
  },
6505
6589
  /* ------------------------------------------------ refs methods ------------------------------------------------------ */
@@ -6521,24 +6605,24 @@ const ii = {
6521
6605
  processUndo() {
6522
6606
  this.bpmnModeler.get("commandStack").undo();
6523
6607
  },
6524
- processZoomIn(i = 0.1) {
6525
- const e = Math.floor(this.defaultZoom * 100 + i * 100) / 100;
6608
+ processZoomIn(n = 0.1) {
6609
+ const e = Math.floor(this.defaultZoom * 100 + n * 100) / 100;
6526
6610
  if (e > 4)
6527
6611
  throw new Error("[Process Designer Warn ]: The zoom ratio cannot be greater than 4");
6528
6612
  this.defaultZoom = e, this.bpmnModeler.get("canvas").zoom(this.defaultZoom);
6529
6613
  },
6530
- processZoomOut(i = 0.1) {
6531
- const e = Math.floor(this.defaultZoom * 100 - i * 100) / 100;
6614
+ processZoomOut(n = 0.1) {
6615
+ const e = Math.floor(this.defaultZoom * 100 - n * 100) / 100;
6532
6616
  if (e < 0.2)
6533
6617
  throw new Error("[Process Designer Warn ]: The zoom ratio cannot be less than 0.2");
6534
6618
  this.defaultZoom = e, this.bpmnModeler.get("canvas").zoom(this.defaultZoom);
6535
6619
  },
6536
- processZoomTo(i = 1) {
6537
- if (i < 0.2)
6620
+ processZoomTo(n = 1) {
6621
+ if (n < 0.2)
6538
6622
  throw new Error("[Process Designer Warn ]: The zoom ratio cannot be less than 0.2");
6539
- if (i > 4)
6623
+ if (n > 4)
6540
6624
  throw new Error("[Process Designer Warn ]: The zoom ratio cannot be greater than 4");
6541
- this.defaultZoom = i, this.bpmnModeler.get("canvas").zoom(i);
6625
+ this.defaultZoom = n, this.bpmnModeler.get("canvas").zoom(n);
6542
6626
  },
6543
6627
  processReZoom() {
6544
6628
  this.defaultZoom = 1, this.bpmnModeler.get("canvas").zoom("fit-viewport", "auto");
@@ -6546,9 +6630,9 @@ const ii = {
6546
6630
  processRestart() {
6547
6631
  this.recoverable = !1, this.revocable = !1, this.createNewDiagram(null);
6548
6632
  },
6549
- elementsAlign(i) {
6550
- const e = this.bpmnModeler.get("alignElements"), n = this.bpmnModeler.get("selection").get();
6551
- if (!n || n.length <= 1) {
6633
+ elementsAlign(n) {
6634
+ const e = this.bpmnModeler.get("alignElements"), i = this.bpmnModeler.get("selection").get();
6635
+ if (!i || i.length <= 1) {
6552
6636
  this.$message.warning("请按住 Shift 键选择多个元素对齐");
6553
6637
  return;
6554
6638
  }
@@ -6556,83 +6640,97 @@ const ii = {
6556
6640
  confirmButtonText: "确定",
6557
6641
  cancelButtonText: "取消",
6558
6642
  type: "warning"
6559
- }).then(() => e.trigger(n, i));
6643
+ }).then(() => e.trigger(i, n));
6560
6644
  },
6561
6645
  /* ----------------------------- 方法结束 --------------------------------- */
6562
6646
  previewProcessXML() {
6563
- this.bpmnModeler.saveXML({ format: !0 }).then(({ xml: i }) => {
6564
- this.previewResult = i, this.previewType = "xml", this.previewModelVisible = !0;
6647
+ this.bpmnModeler.saveXML({ format: !0 }).then(({ xml: n }) => {
6648
+ this.previewResult = n, this.previewType = "xml", this.previewModelVisible = !0;
6565
6649
  });
6566
6650
  },
6567
6651
  previewProcessJson() {
6568
- const i = new Be();
6652
+ const n = new Ve();
6569
6653
  this.bpmnModeler.saveXML({ format: !0 }).then(({ xml: e }) => {
6570
- const { definitions: t } = i.xml2js(e);
6654
+ const { definitions: t } = n.xml2js(e);
6571
6655
  t ? this.previewResult = JSON.stringify(t, null, 4) : this.previewResult = "", this.previewType = "json", this.previewModelVisible = !0;
6572
6656
  });
6573
6657
  }
6574
6658
  }
6575
6659
  };
6576
- var si = function() {
6660
+ var oi = function() {
6577
6661
  var e = this, t = e._self._c;
6578
6662
  return t("div", { staticClass: "my-process-designer" }, [t("div", { staticClass: "my-process-designer__header" }, [e._t("control-header", function() {
6579
- 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(n) {
6663
+ 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) {
6580
6664
  return e.$refs.refFile.click();
6581
6665
  } } }, [e._v(" 导入 ")])], 1) : e._e(), t("ElTooltip", { attrs: { effect: "light" }, scopedSlots: e._u([{ key: "content", fn: function() {
6582
- return [t("ElButton", { attrs: { size: e.headerButtonSize, type: "text" }, on: { click: function(n) {
6666
+ return [t("ElButton", { attrs: { size: e.headerButtonSize, type: "text" }, on: { click: function(i) {
6583
6667
  return e.downloadProcessAsXml();
6584
- } } }, [e._v("下载为XML文件")]), t("br"), t("ElButton", { attrs: { size: e.headerButtonSize, type: "text" }, on: { click: function(n) {
6668
+ } } }, [e._v("下载为XML文件")]), t("br"), t("ElButton", { attrs: { size: e.headerButtonSize, type: "text" }, on: { click: function(i) {
6585
6669
  return e.downloadProcessAsSvg();
6586
- } } }, [e._v("下载为SVG文件")]), t("br"), t("ElButton", { attrs: { size: e.headerButtonSize, type: "text" }, on: { click: function(n) {
6670
+ } } }, [e._v("下载为SVG文件")]), t("br"), t("ElButton", { attrs: { size: e.headerButtonSize, type: "text" }, on: { click: function(i) {
6587
6671
  return e.downloadProcessAsBpmn();
6588
6672
  } } }, [e._v("下载为BPMN文件")])];
6589
6673
  }, 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() {
6590
6674
  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")])];
6591
- }, 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(n) {
6675
+ }, 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) {
6592
6676
  return e.elementsAlign("left");
6593
- } } })], 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(n) {
6677
+ } } })], 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) {
6594
6678
  return e.elementsAlign("right");
6595
- } } })], 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(n) {
6679
+ } } })], 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) {
6596
6680
  return e.elementsAlign("top");
6597
- } } })], 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(n) {
6681
+ } } })], 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) {
6598
6682
  return e.elementsAlign("bottom");
6599
- } } })], 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(n) {
6683
+ } } })], 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) {
6600
6684
  return e.elementsAlign("center");
6601
- } } })], 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(n) {
6685
+ } } })], 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) {
6602
6686
  return e.elementsAlign("middle");
6603
- } } })], 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(n) {
6687
+ } } })], 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) {
6604
6688
  return e.processZoomOut();
6605
- } } })], 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(n) {
6689
+ } } })], 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) {
6606
6690
  return e.processZoomIn();
6607
- } } })], 1), t("ElTooltip", { attrs: { effect: "light", content: "重置视图并居中" } }, [t("ElButton", { attrs: { size: e.headerButtonSize, icon: "el-icon-c-scale-to-original" }, on: { click: function(n) {
6691
+ } } })], 1), t("ElTooltip", { attrs: { effect: "light", content: "重置视图并居中" } }, [t("ElButton", { attrs: { size: e.headerButtonSize, icon: "el-icon-c-scale-to-original" }, on: { click: function(i) {
6608
6692
  return e.processReZoom();
6609
- } } })], 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(n) {
6693
+ } } })], 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) {
6610
6694
  return e.processUndo();
6611
- } } })], 1), t("ElTooltip", { attrs: { effect: "light", content: "恢复" } }, [t("ElButton", { attrs: { size: e.headerButtonSize, disabled: !e.recoverable, icon: "el-icon-refresh-right" }, on: { click: function(n) {
6695
+ } } })], 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) {
6612
6696
  return e.processRedo();
6613
6697
  } } })], 1), t("ElTooltip", { attrs: { effect: "light", content: "重新绘制" } }, [t("ElButton", { attrs: { size: e.headerButtonSize, icon: "el-icon-refresh" }, on: { click: e.processRestart } })], 1)], 1)];
6614
- }), 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", { attrs: { title: "预览", width: "60vw", height: "60vh", visible: e.previewModelVisible, "body-padding": !1, "destroy-on-close": "" }, on: { "update:visible": function(n) {
6615
- e.previewModelVisible = n;
6698
+ }), 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", { attrs: { title: "预览", width: "60vw", height: "60vh", visible: e.previewModelVisible, "body-padding": !1, "destroy-on-close": "" }, on: { "update:visible": function(i) {
6699
+ e.previewModelVisible = i;
6616
6700
  } } }, [t("HighlightJS", { attrs: { language: e.previewType, code: e.previewResult } })], 1)], 1);
6617
- }, ri = [], ai = /* @__PURE__ */ h(
6618
- ii,
6619
- si,
6620
- ri,
6701
+ }, li = [], pi = /* @__PURE__ */ h(
6702
+ ai,
6703
+ oi,
6704
+ li,
6621
6705
  !1,
6622
6706
  null,
6623
6707
  null,
6624
6708
  null,
6625
6709
  null
6626
6710
  );
6627
- const oi = ai.exports, li = {
6711
+ const mi = pi.exports, ci = {
6628
6712
  name: "FlowDesigner",
6629
6713
  components: {
6630
- PropertiesPanel: En,
6631
- ProcessDesigner: oi
6714
+ PropertiesPanel: Sn,
6715
+ ProcessDesigner: mi
6632
6716
  },
6633
6717
  props: {
6634
6718
  value: String,
6635
- extendTypes: Array
6719
+ extendTypes: Array,
6720
+ context: {
6721
+ type: Object,
6722
+ default() {
6723
+ return {
6724
+ url: "",
6725
+ serviceId: "",
6726
+ services: ["test", "demo"],
6727
+ fields: ["serviceId", "url"],
6728
+ // eslint-disable-next-line no-template-curly-in-string
6729
+ delegateExpressions: ["${httpInvokeExecutionListener}"],
6730
+ apis: ["flowDraft", "flowStart", "flowEnd"]
6731
+ };
6732
+ }
6733
+ }
6636
6734
  },
6637
6735
  data() {
6638
6736
  return {
@@ -6646,41 +6744,41 @@ const oi = ai.exports, li = {
6646
6744
  labelVisible: !1,
6647
6745
  prefix: "flowable",
6648
6746
  headerButtonSize: "mini",
6649
- additionalModel: [ze, Ue, We]
6747
+ additionalModel: [Ue, Ne, Xe]
6650
6748
  }
6651
6749
  };
6652
6750
  },
6653
6751
  methods: {
6654
- initModeler(i) {
6655
- this.modeler = i;
6752
+ initModeler(n) {
6753
+ this.modeler = n;
6656
6754
  }
6657
6755
  }
6658
6756
  };
6659
- var pi = function() {
6757
+ var ui = function() {
6660
6758
  var e = this, t = e._self._c;
6661
6759
  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: {
6662
6760
  taskResizingEnabled: !0,
6663
6761
  eventResizingEnabled: !0
6664
- }, keyboard: "" }, on: { input: (n) => e.$emit("input", n), "init-finished": e.initModeler }, scopedSlots: e._u([{ key: "toolbar-buttons", fn: function() {
6762
+ }, keyboard: "" }, on: { input: (i) => e.$emit("input", i), "init-finished": e.initModeler }, scopedSlots: e._u([{ key: "toolbar-buttons", fn: function() {
6665
6763
  return [e._t("toolbar-buttons", null, { modeler: e.modeler })];
6666
- }, proxy: !0 }], null, !0) }, "ProcessDesigner", e.controlForm, !1)), t("PropertiesPanel", { key: `penal-${e.reloadIndex}`, staticClass: "process-panel", attrs: { "bpmn-modeler": e.modeler, prefix: e.controlForm.prefix }, scopedSlots: e._u([{ key: "task", fn: function({ id: n, bpmnInstances: s, element: r, type: a }) {
6667
- return [e._t("task", null, { id: n, bpmnInstances: s, element: r, type: a })];
6668
- } }, { key: "form", fn: function({ id: n, bpmnInstances: s, element: r, type: a }) {
6669
- return [e._t("form", null, { id: n, bpmnInstances: s, element: r, type: a })];
6670
- } }, { key: "extend", fn: function({ id: n, bpmnInstances: s, element: r, type: a }) {
6671
- return [e._t("extend", null, { id: n, bpmnInstances: s, element: r, type: a })];
6764
+ }, proxy: !0 }], null, !0) }, "ProcessDesigner", e.controlForm, !1)), t("PropertiesPanel", { key: `penal-${e.reloadIndex}`, staticClass: "process-panel", attrs: { "bpmn-modeler": e.modeler, context: e.context, prefix: e.controlForm.prefix }, scopedSlots: e._u([{ key: "task", fn: function({ id: i, bpmnInstances: s, element: a, type: r }) {
6765
+ return [e._t("task", null, { id: i, bpmnInstances: s, element: a, type: r })];
6766
+ } }, { key: "form", fn: function({ id: i, bpmnInstances: s, element: a, type: r }) {
6767
+ return [e._t("form", null, { id: i, bpmnInstances: s, element: a, type: r })];
6768
+ } }, { key: "extend", fn: function({ id: i, bpmnInstances: s, element: a, type: r }) {
6769
+ return [e._t("extend", null, { id: i, bpmnInstances: s, element: a, type: r })];
6672
6770
  } }], null, !0) })], 1);
6673
- }, mi = [], ci = /* @__PURE__ */ h(
6674
- li,
6675
- pi,
6676
- mi,
6771
+ }, di = [], fi = /* @__PURE__ */ h(
6772
+ ci,
6773
+ ui,
6774
+ di,
6677
6775
  !1,
6678
6776
  null,
6679
6777
  null,
6680
6778
  null,
6681
6779
  null
6682
6780
  );
6683
- const Bi = ci.exports;
6781
+ const zi = fi.exports;
6684
6782
  export {
6685
- Bi as default
6783
+ zi as default
6686
6784
  };