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