@camunda/task-testing 0.2.5 → 0.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -11,8 +11,8 @@ import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
11
11
 
12
12
  __webpack_require__.r(__webpack_exports__);
13
13
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
14
- /* harmony export */ ElementConfig: () => (/* binding */ ElementConfig),
15
- /* harmony export */ createDefaultInputConfig: () => (/* binding */ createDefaultInputConfig)
14
+ /* harmony export */ DEFAULT_CONFIG: () => (/* binding */ DEFAULT_CONFIG),
15
+ /* harmony export */ ElementConfig: () => (/* binding */ ElementConfig)
16
16
  /* harmony export */ });
17
17
  /* harmony import */ var events__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! events */ "./node_modules/events/events.js");
18
18
  /* harmony import */ var events__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(events__WEBPACK_IMPORTED_MODULE_0__);
@@ -33,8 +33,8 @@ class ElementConfig extends (events__WEBPACK_IMPORTED_MODULE_0___default()) {
33
33
  this._injector = injector;
34
34
  this._elementVariables = elementVariables;
35
35
 
36
- /**
37
- * @type {import('./types').Config}
36
+ /**
37
+ * @type {import('./types').Config}
38
38
  */
39
39
  this._config = {
40
40
  ...DEFAULT_CONFIG,
@@ -98,19 +98,19 @@ class ElementConfig extends (events__WEBPACK_IMPORTED_MODULE_0___default()) {
98
98
  };
99
99
  this.emit('config.changed');
100
100
  }
101
- async getInputConfigForElement(element) {
101
+ getInputConfigForElement(element) {
102
102
  if (!(0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.isAny)(element, SUPPORTED_ELEMENT_TYPES)) {
103
103
  throw new Error(`Unsupported element type: ${element.type}`);
104
104
  }
105
105
  if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_2__.isString)(this._config.input[element.id])) {
106
- return this._getDefaultInputConfig(element);
106
+ return this._getDefaultInputConfig();
107
107
  }
108
108
  return this._config.input[element.id];
109
109
  }
110
110
 
111
- /**
112
- * @param {import('./types').Element} element
113
- * @returns {import('./types').ElementOutput}
111
+ /**
112
+ * @param {import('./types').Element} element
113
+ * @returns {import('./types').ElementOutput}
114
114
  */
115
115
  getOutputConfigForElement(element) {
116
116
  if (!(0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.isAny)(element, SUPPORTED_ELEMENT_TYPES)) {
@@ -121,175 +121,9 @@ class ElementConfig extends (events__WEBPACK_IMPORTED_MODULE_0___default()) {
121
121
  }
122
122
  return this._config.output[element.id];
123
123
  }
124
- async _getDefaultInputConfig(element) {
125
- const variables = await this._elementVariables.getVariablesForElement(element);
126
- return createDefaultInputConfig(element, variables);
127
- }
128
- }
129
-
130
- /**
131
- * Get input parameters from a BPMN element.
132
- *
133
- * @param {import('./types').Element} element
134
- *
135
- * @returns {import('./types').ModdleElement[]}
136
- */
137
- function getInputParameters(element) {
138
- const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getBusinessObject)(element);
139
- const extensionElements = businessObject.get('extensionElements');
140
- if (!extensionElements) {
141
- return [];
142
- }
143
- const values = extensionElements.get('values');
144
- if (!values) {
145
- return [];
146
- }
147
- const ioMapping = values.find(value => (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(value, 'zeebe:IoMapping'));
148
- if (!ioMapping) {
149
- return [];
150
- }
151
- return ioMapping.get('inputParameters');
152
- }
153
-
154
- /**
155
- * Unflatten an object with dot notation keys into a nested object.
156
- *
157
- * Example:
158
- *
159
- * ```
160
- * unflatten({
161
- * 'foo.bar': 'baz'
162
- * }) // returns { foo: { bar: 'baz' } }
163
- * ```
164
- *
165
- * @param {Object} obj
166
- *
167
- * @returns {Object}
168
- */
169
- function unflatten(obj) {
170
- const result = {};
171
- for (const [path, value] of Object.entries(obj)) {
172
- const parts = path.split('.');
173
- const lastKey = parts.pop();
174
- let current = result;
175
- for (const part of parts) {
176
- if (!(part in current)) {
177
- current[part] = {};
178
- }
179
- current = current[part];
180
- }
181
- current[lastKey] = value;
124
+ _getDefaultInputConfig() {
125
+ return '{}';
182
126
  }
183
- return result;
184
- }
185
-
186
- /**
187
- * Create default input config for a BPMN element.
188
- *
189
- * @todo Only simple input parameter sources can be handled until
190
- * https://github.com/bpmn-io/internal-docs/issues/1218 is implemented.
191
- *
192
- * @param {import('./types').Element} element
193
- * @param {import('./types').Variable[]} variablesForElement
194
- *
195
- * @returns {string}
196
- */
197
- function createDefaultInputConfig(element, variablesForElement) {
198
- const inputParameters = getInputParameters(element);
199
- const foundVariables = inputParameters.reduce((foundVariables, inputParameter) => {
200
- const source = inputParameter.get('source'),
201
- target = inputParameter.get('target');
202
- const variable = variablesForElement.find(({
203
- name
204
- }) => name === target);
205
- if (!variable) {
206
- return foundVariables;
207
- }
208
- const {
209
- name,
210
- type
211
- } = variable;
212
-
213
- // for context inputs, we cannot determine the structure, so we
214
- // just create an empty object
215
- if (type === 'Context') {
216
- return {
217
- ...foundVariables,
218
- [name]: {}
219
- };
220
- }
221
-
222
- // only handle simple sources for now
223
- if (isFeel(source) && !isBoolean(source)) {
224
- const nameFromSource = getNameFromSource(source);
225
- if (nameFromSource) {
226
- return {
227
- ...foundVariables,
228
- [nameFromSource]: ''
229
- };
230
- }
231
- }
232
- return foundVariables;
233
- }, {});
234
- return JSON.stringify(unflatten(foundVariables), null, 2);
235
- }
236
-
237
- /**
238
- * Get the name from a source string.
239
- *
240
- * @example
241
- *
242
- * getNameFromSource('=foo') // 'foo'
243
- * getNameFromSource('=foo + bar') // null
244
- * getNameFromSource('= 1 + 2') // null
245
- *
246
- * @param {string} source
247
- *
248
- * @returns {string|null}
249
- */
250
- function getNameFromSource(source) {
251
- if (source && isFeel(source)) {
252
- const name = source.slice(1).trim();
253
- if (/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(name)) {
254
- return name;
255
- }
256
- }
257
- return null;
258
- }
259
-
260
- /**
261
- * Check if a source string is a FEEL expression.
262
- *
263
- * @example
264
- *
265
- * isFeel('=foo') // true
266
- * isFeel('= 1 + 2') // true
267
- * isFeel('foo') // false
268
- *
269
- * @param {string} source
270
- *
271
- * @returns {boolean}
272
- */
273
- function isFeel(source) {
274
- return !!source && source.startsWith('=');
275
- }
276
-
277
- /**
278
- * Check if a source string is a boolean FEEL expression.
279
- *
280
- * @example
281
- *
282
- * isBoolean('=true') // true
283
- * isBoolean('= false') // true
284
- * isBoolean('=foo') // false
285
- * isBoolean('=1 + 2') // false
286
- *
287
- * @param {string} source
288
- *
289
- * @return {boolean}
290
- */
291
- function isBoolean(source) {
292
- return !!source && /^=\s*(true|false)\s*$/i.test(source);
293
127
  }
294
128
 
295
129
  /***/ }),
@@ -352,33 +186,33 @@ __webpack_require__.r(__webpack_exports__);
352
186
  /* harmony export */ });
353
187
  /* harmony import */ var events__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! events */ "./node_modules/events/events.js");
354
188
  /* harmony import */ var events__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(events__WEBPACK_IMPORTED_MODULE_0__);
355
- /**
356
- * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
357
- * under one or more contributor license agreements. See the NOTICE file
358
- * distributed with this work for additional information regarding copyright
359
- * ownership.
360
- *
361
- * Camunda licenses this file to you under the MIT; you may not use this file
362
- * except in compliance with the MIT License.
189
+ /**
190
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
191
+ * under one or more contributor license agreements. See the NOTICE file
192
+ * distributed with this work for additional information regarding copyright
193
+ * ownership.
194
+ *
195
+ * Camunda licenses this file to you under the MIT; you may not use this file
196
+ * except in compliance with the MIT License.
363
197
  */
364
198
 
365
199
 
366
200
  const INTERVAL_MS = 1000;
367
201
 
368
- /**
369
- * @import { TaskExecutionApi, TaskExecutionResult, TaskExecutionError, TaskExecutionStatus } from './types';
202
+ /**
203
+ * @import { TaskExecutionApi, TaskExecutionResult, TaskExecutionError, TaskExecutionStatus } from './types';
370
204
  */
371
205
 
372
- /**
373
- * Emits:
374
- * - `taskExecution.status.changed` with one of {@link TaskExecutionStatus}
375
- * - `taskExecution.finished` with {@link TaskExecutionResult}
376
- * - `taskExecution.error` with {@link TaskExecutionError}
206
+ /**
207
+ * Emits:
208
+ * - `taskExecution.status.changed` with one of {@link TaskExecutionStatus}
209
+ * - `taskExecution.finished` with {@link TaskExecutionResult}
210
+ * - `taskExecution.error` with {@link TaskExecutionError}
377
211
  */
378
212
  class TaskExecution extends (events__WEBPACK_IMPORTED_MODULE_0___default()) {
379
- /**
380
- * @param {Object} injector
381
- * @param {TaskExecutionApi} api
213
+ /**
214
+ * @param {Object} injector
215
+ * @param {TaskExecutionApi} api
382
216
  */
383
217
  constructor(injector, api) {
384
218
  super();
@@ -398,13 +232,13 @@ class TaskExecution extends (events__WEBPACK_IMPORTED_MODULE_0___default()) {
398
232
  });
399
233
  }
400
234
 
401
- /**
402
- * Start task execution.
403
- *
404
- * @param {string} elementId
405
- * @param {Object} variables
406
- *
407
- * @returns {Promise<void>}
235
+ /**
236
+ * Start task execution.
237
+ *
238
+ * @param {string} elementId
239
+ * @param {Object} variables
240
+ *
241
+ * @returns {Promise<void>}
408
242
  */
409
243
  async executeTask(elementId, variables) {
410
244
  this._changeStatus('deploying');
@@ -498,8 +332,8 @@ class TaskExecution extends (events__WEBPACK_IMPORTED_MODULE_0___default()) {
498
332
  this._interval = setInterval(intervalCallback, INTERVAL_MS);
499
333
  }
500
334
 
501
- /**
502
- * Cancel current task execution, clean up and change status to `idle`.
335
+ /**
336
+ * Cancel current task execution, clean up and change status to `idle`.
503
337
  */
504
338
  async cancelTaskExecution() {
505
339
  // TODO: Proper clean up:
@@ -513,11 +347,11 @@ class TaskExecution extends (events__WEBPACK_IMPORTED_MODULE_0___default()) {
513
347
  this._changeStatus('idle');
514
348
  }
515
349
 
516
- /**
517
- * Emit `taskExecution.error` event.
518
- *
519
- * @param {string} message
520
- * @param {any} [response]
350
+ /**
351
+ * Emit `taskExecution.error` event.
352
+ *
353
+ * @param {string} message
354
+ * @param {any} [response]
521
355
  */
522
356
  _emitError(message, response) {
523
357
  /** @type {import('./types').TaskExecutionError} */
@@ -538,12 +372,12 @@ class TaskExecution extends (events__WEBPACK_IMPORTED_MODULE_0___default()) {
538
372
  }
539
373
  }
540
374
 
541
- /**
542
- * Get the process ID from the deployment response.
543
- *
544
- * @param {import('./types').DeploymentResponse} [response]
545
- *
546
- * @returns {string|null} The process ID or null if not found.
375
+ /**
376
+ * Get the process ID from the deployment response.
377
+ *
378
+ * @param {import('./types').DeploymentResponse} [response]
379
+ *
380
+ * @returns {string|null} The process ID or null if not found.
547
381
  */
548
382
  function getProcessId(response) {
549
383
  if (!response) {
@@ -560,12 +394,12 @@ function getProcessId(response) {
560
394
  return null;
561
395
  }
562
396
 
563
- /**
564
- * Get the process instance key from the response.
565
- *
566
- * @param {import('./types').StartInstanceResponse} [response]
567
- *
568
- * @returns {string|null} The process instance key or null if not found.
397
+ /**
398
+ * Get the process instance key from the response.
399
+ *
400
+ * @param {import('./types').StartInstanceResponse} [response]
401
+ *
402
+ * @returns {string|null} The process instance key or null if not found.
569
403
  */
570
404
  function getProcessInstanceKey(response) {
571
405
  if (!response) {
@@ -651,7 +485,7 @@ __webpack_require__.r(__webpack_exports__);
651
485
 
652
486
  function Input({
653
487
  allOutputs,
654
- input,
488
+ input = '',
655
489
  onErrorChange,
656
490
  onResetInput,
657
491
  onSetInput,
@@ -680,7 +514,7 @@ function Input({
680
514
  children: "Reset"
681
515
  })
682
516
  })]
683
- }), input && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_InputEditor__WEBPACK_IMPORTED_MODULE_3__["default"], {
517
+ }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_InputEditor__WEBPACK_IMPORTED_MODULE_3__["default"], {
684
518
  allOutputs: allOutputs,
685
519
  value: input,
686
520
  onChange: onSetInput,
@@ -769,21 +603,21 @@ function InputEditor({
769
603
  value
770
604
  }));
771
605
 
772
- /**
773
- * @type {import('@codemirror/autocomplete').Completion[]}
606
+ /**
607
+ * @type {import('@codemirror/autocomplete').Completion[]}
774
608
  */
775
609
  const result = [...variablesForElementAutocompletions, ...outputVariablesAutocompletions];
776
610
  return result;
777
611
  }, [allOutputs, variablesForElement]);
778
612
  const ref = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
779
613
 
780
- /**
781
- * @type {ReturnType<typeof useState<EditorView>>}
614
+ /**
615
+ * @type {ReturnType<typeof useState<EditorView>>}
782
616
  */
783
617
  const [editorView, setEditorView] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)();
784
618
 
785
- /**
786
- * @type {ReturnType<typeof useState<string?>>}
619
+ /**
620
+ * @type {ReturnType<typeof useState<string?>>}
787
621
  */
788
622
  const [error, setError] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)();
789
623
  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
@@ -891,19 +725,19 @@ function getAllOutputVariables(allOutputs) {
891
725
  return allOutputVariables;
892
726
  }
893
727
 
894
- /**
895
- * Get a string representation of the type of a value.
896
- *
897
- * @example
898
- *
899
- * getDetail('foo') // String
900
- * getDetail(1337) // Number
901
- * getDetail(true) // Boolean
902
- * getDetail({}) // Object
903
- *
904
- * @param {any} value
905
- *
906
- * @return {string}
728
+ /**
729
+ * Get a string representation of the type of a value.
730
+ *
731
+ * @example
732
+ *
733
+ * getDetail('foo') // String
734
+ * getDetail(1337) // Number
735
+ * getDetail(true) // Boolean
736
+ * getDetail({}) // Object
737
+ *
738
+ * @param {any} value
739
+ *
740
+ * @return {string}
907
741
  */
908
742
  function getDetail(value) {
909
743
  const type = typeof value;
@@ -948,17 +782,17 @@ const TASK_EXECUTION_STATUS_LABEL = {
948
782
  executing: 'Waiting for task to be completed...'
949
783
  };
950
784
 
951
- /**
952
- * @param {Object} props
953
- * @param {boolean} props.isConnectionConfigured
954
- * @param {string} [props.configureConnectionBannerTitle]
955
- * @param {string} [props.configureConnectionBannerDescription]
956
- * @param {string} [props.configureConnectionLabel]
957
- * @param {Function} [props.onConfigureConnection]
958
- * @param {boolean} props.isTaskExecuting
959
- * @param {import('../../types').ElementOutput} props.output
960
- * @param {Function} props.onResetOutput
961
- * @param {import('../../types').TaskExecutionStatus} props.taskExecutionStatus
785
+ /**
786
+ * @param {Object} props
787
+ * @param {boolean} props.isConnectionConfigured
788
+ * @param {string} [props.configureConnectionBannerTitle]
789
+ * @param {string} [props.configureConnectionBannerDescription]
790
+ * @param {string} [props.configureConnectionLabel]
791
+ * @param {Function} [props.onConfigureConnection]
792
+ * @param {boolean} props.isTaskExecuting
793
+ * @param {import('../../types').ElementOutput} props.output
794
+ * @param {Function} props.onResetOutput
795
+ * @param {import('../../types').TaskExecutionStatus} props.taskExecutionStatus
962
796
  */
963
797
  function Output({
964
798
  isConnectionConfigured,
@@ -1137,14 +971,14 @@ function OutputVariables({
1137
971
  });
1138
972
  }
1139
973
 
1140
- /**
1141
- *
1142
- * @param {Object} props
1143
- * @param {string} props.title
1144
- * @param {string} props.description
1145
- * @param {string} [props.actionLabel]
1146
- * @param {string} [props.actionUrl]
1147
- * @param {Function} [props.onActionClick]
974
+ /**
975
+ *
976
+ * @param {Object} props
977
+ * @param {string} props.title
978
+ * @param {string} props.description
979
+ * @param {string} [props.actionLabel]
980
+ * @param {string} [props.actionUrl]
981
+ * @param {Function} [props.onActionClick]
1148
982
  */
1149
983
  function ErrorBanner({
1150
984
  title,
@@ -1176,12 +1010,12 @@ function ErrorBanner({
1176
1010
  });
1177
1011
  }
1178
1012
 
1179
- /**
1180
- * Print the details of an incident.
1181
- *
1182
- * @param {Object} incident
1183
- *
1184
- * @returns {string}
1013
+ /**
1014
+ * Print the details of an incident.
1015
+ *
1016
+ * @param {Object} incident
1017
+ *
1018
+ * @returns {string}
1185
1019
  */
1186
1020
  function printIncident(incident) {
1187
1021
  let text = '';
@@ -1191,16 +1025,16 @@ function printIncident(incident) {
1191
1025
  return text;
1192
1026
  }
1193
1027
 
1194
- /**
1195
- * Capitalize a string, adding spaces before capital letters.
1196
- *
1197
- * @example
1198
- *
1199
- * capitalize('fooBar'); // Foo Bar
1200
- *
1201
- * @param {string} string
1202
- *
1203
- * @returns {string}
1028
+ /**
1029
+ * Capitalize a string, adding spaces before capital letters.
1030
+ *
1031
+ * @example
1032
+ *
1033
+ * capitalize('fooBar'); // Foo Bar
1034
+ *
1035
+ * @param {string} string
1036
+ *
1037
+ * @returns {string}
1204
1038
  */
1205
1039
  function capitalize(string) {
1206
1040
  return string.replace(/([A-Z])/g, ' $1').replace(/^./, match => match.toUpperCase());
@@ -1239,8 +1073,8 @@ function OutputEditor({
1239
1073
  }) {
1240
1074
  const ref = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
1241
1075
 
1242
- /**
1243
- * @type {ReturnType<typeof useState<EditorView>>}
1076
+ /**
1077
+ * @type {ReturnType<typeof useState<EditorView>>}
1244
1078
  */
1245
1079
  const [editorView, setEditorView] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)();
1246
1080
  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
@@ -1305,7 +1139,6 @@ function OutputEditor({
1305
1139
 
1306
1140
  __webpack_require__.r(__webpack_exports__);
1307
1141
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1308
- /* harmony export */ NO_ELEMENT_TEXT: () => (/* binding */ NO_ELEMENT_TEXT),
1309
1142
  /* harmony export */ "default": () => (/* binding */ TaskTesting)
1310
1143
  /* harmony export */ });
1311
1144
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
@@ -1335,25 +1168,24 @@ __webpack_require__.r(__webpack_exports__);
1335
1168
 
1336
1169
 
1337
1170
 
1338
- const NO_ELEMENT_TEXT = 'Select a task to start testing.';
1339
-
1340
- /**
1341
- * @param {Object} props
1342
- * @param {Object} props.injector
1343
- * @param {import('../../types').TaskExecutionApi} props.api
1344
- * @param {boolean} props.isConnectionConfigured
1345
- * @param {string} [props.configureConnectionBannerTitle]
1346
- * @param {string} [props.configureConnectionBannerDescription]
1347
- * @param {string} [props.configureConnectionLabel]
1348
- * @param {Function} [props.onConfigureConnection]
1349
- * @param {import('../../types').Config|undefined} [props.config]
1350
- * @param {Function} [props.onConfigChanged=() => {}]
1351
- * @param {string} [props.operateBaseUrl]
1352
- * @param {string} [props.documentationUrl]
1353
- * @param {Function} [props.onTaskExecutionStarted=() => {}]
1354
- * @param {Function} [props.onTaskExecutionFinished=() => {}]
1355
- * @param {Function} [props.onTaskExecutionInterrupted=() => {}]
1171
+ /**
1172
+ * @param {Object} props
1173
+ * @param {Object} props.injector
1174
+ * @param {import('../../types').TaskExecutionApi} props.api
1175
+ * @param {boolean} props.isConnectionConfigured
1176
+ * @param {string} [props.configureConnectionBannerTitle]
1177
+ * @param {string} [props.configureConnectionBannerDescription]
1178
+ * @param {string} [props.configureConnectionLabel]
1179
+ * @param {Function} [props.onConfigureConnection]
1180
+ * @param {import('../../types').Config|undefined} [props.config]
1181
+ * @param {Function} [props.onConfigChanged=() => {}]
1182
+ * @param {string} [props.operateBaseUrl]
1183
+ * @param {string} [props.documentationUrl]
1184
+ * @param {Function} [props.onTaskExecutionStarted=() => {}]
1185
+ * @param {Function} [props.onTaskExecutionFinished=() => {}]
1186
+ * @param {Function} [props.onTaskExecutionInterrupted=() => {}]
1356
1187
  */
1188
+
1357
1189
  function TaskTesting({
1358
1190
  injector,
1359
1191
  api,
@@ -1370,37 +1202,37 @@ function TaskTesting({
1370
1202
  onTaskExecutionFinished = () => {},
1371
1203
  onTaskExecutionInterrupted = () => {}
1372
1204
  }) {
1373
- /**
1374
- * @type {React.RefObject<ElementVariables?>}
1205
+ /**
1206
+ * @type {React.RefObject<ElementVariables?>}
1375
1207
  */
1376
1208
  const elementVariablesRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
1377
1209
 
1378
- /**
1379
- * @type {React.RefObject<ElementConfig?>}
1210
+ /**
1211
+ * @type {React.RefObject<ElementConfig?>}
1380
1212
  */
1381
1213
  const elementConfigRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
1382
1214
  const [variablesForElement, setVariablesForElement] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]);
1383
1215
 
1384
- /**
1385
- * @type {ReturnType<typeof useState<import('../../types').TaskExecutionStatus>>}
1216
+ /**
1217
+ * @type {ReturnType<typeof useState<import('../../types').TaskExecutionStatus>>}
1386
1218
  */
1387
1219
  const [taskExecutionStatus, setTaskExecutionStatus] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)();
1388
1220
 
1389
- /**
1390
- * @type {ReturnType<typeof useState<string>>}
1221
+ /**
1222
+ * @type {ReturnType<typeof useState<string>>}
1391
1223
  */
1392
1224
  const [input, setInput] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)();
1393
1225
 
1394
- /**
1395
- * @type {ReturnType<typeof useState<import('../../types').ElementOutput>>}
1226
+ /**
1227
+ * @type {ReturnType<typeof useState<import('../../types').ElementOutput>>}
1396
1228
  */
1397
1229
  const [output, setOutput] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)();
1398
1230
  const [allOutputs, setAllOutputs] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)({});
1399
1231
  const [inputError, setInputError] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null);
1400
- const element = (0,_hooks_useSelectedElement__WEBPACK_IMPORTED_MODULE_4__.useSelectedElement)(injector);
1232
+ const [element, selectedElementMessage] = (0,_hooks_useSelectedElement__WEBPACK_IMPORTED_MODULE_4__.useSelectedElement)(injector);
1401
1233
 
1402
- /**
1403
- * @type {React.RefObject<TaskExecution?>}
1234
+ /**
1235
+ * @type {React.RefObject<TaskExecution?>}
1404
1236
  */
1405
1237
  const taskExecutionRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
1406
1238
 
@@ -1455,7 +1287,7 @@ function TaskTesting({
1455
1287
  if (!element) {
1456
1288
  return;
1457
1289
  }
1458
- elementConfigRef.current.getInputConfigForElement(element).then(setInput);
1290
+ setInput(elementConfigRef.current.getInputConfigForElement(element));
1459
1291
  setOutput(elementConfigRef.current.getOutputConfigForElement(element));
1460
1292
  setAllOutputs(elementConfigRef.current.getConfig().output);
1461
1293
  };
@@ -1479,9 +1311,9 @@ function TaskTesting({
1479
1311
  });
1480
1312
  };
1481
1313
 
1482
- /**
1483
- * @param {import('../../types').TaskExecutionStatus} status
1484
- * @param {string} [processInstanceKey]
1314
+ /**
1315
+ * @param {import('../../types').TaskExecutionStatus} status
1316
+ * @param {string} [processInstanceKey]
1485
1317
  */
1486
1318
  const handleStatusChange = (status, processInstanceKey) => {
1487
1319
  setTaskExecutionStatus(status);
@@ -1535,7 +1367,7 @@ function TaskTesting({
1535
1367
  setInput(undefined);
1536
1368
  return;
1537
1369
  }
1538
- elementConfigRef === null || elementConfigRef === void 0 || (_elementConfigRef$cur5 = elementConfigRef.current) === null || _elementConfigRef$cur5 === void 0 || _elementConfigRef$cur5.getInputConfigForElement(element).then(setInput);
1370
+ setInput(elementConfigRef === null || elementConfigRef === void 0 || (_elementConfigRef$cur5 = elementConfigRef.current) === null || _elementConfigRef$cur5 === void 0 ? void 0 : _elementConfigRef$cur5.getInputConfigForElement(element));
1539
1371
  setOutput(elementConfigRef === null || elementConfigRef === void 0 || (_elementConfigRef$cur6 = elementConfigRef.current) === null || _elementConfigRef$cur6 === void 0 ? void 0 : _elementConfigRef$cur6.getOutputConfigForElement(element));
1540
1372
  }, [element]);
1541
1373
  const handleSetInput = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(newInput => {
@@ -1553,7 +1385,7 @@ function TaskTesting({
1553
1385
  return;
1554
1386
  }
1555
1387
  onTaskExecutionStarted(element);
1556
- const inputConfig = await elementConfigRef.current.getInputConfigForElement(element);
1388
+ const inputConfig = elementConfigRef.current.getInputConfigForElement(element);
1557
1389
  elementConfigRef.current.setOutputConfigForElement(element, null);
1558
1390
  taskExecutionRef.current.executeTask(element.id, JSON.parse(inputConfig));
1559
1391
  };
@@ -1587,7 +1419,7 @@ function TaskTesting({
1587
1419
  children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsxs)("div", {
1588
1420
  className: "task-testing__container-no-element",
1589
1421
  children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)(_carbon_icons_react__WEBPACK_IMPORTED_MODULE_2__.Cursor_1, {}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)("span", {
1590
- children: NO_ELEMENT_TEXT
1422
+ children: selectedElementMessage
1591
1423
  }), documentationUrl && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)(_carbon_react__WEBPACK_IMPORTED_MODULE_1__.Link, {
1592
1424
  href: documentationUrl,
1593
1425
  target: "_blank",
@@ -1597,8 +1429,21 @@ function TaskTesting({
1597
1429
  });
1598
1430
  }
1599
1431
  const showTooltip = !isConnectionConfigured || !!inputError;
1600
- const tooltipLabel = !isConnectionConfigured ? 'Connection not configured' : inputError;
1432
+ const tooltipLabel = !isConnectionConfigured ? configureConnectionBannerTitle : inputError;
1601
1433
  const isTaskExecuting = !!taskExecutionStatus && taskExecutionStatus !== 'idle';
1434
+ const handleClick = () => {
1435
+ if (!isConnectionConfigured) {
1436
+ if (onConfigureConnection) {
1437
+ onConfigureConnection();
1438
+ }
1439
+ return;
1440
+ }
1441
+ if (isTaskExecuting) {
1442
+ handleCancelTaskExecution();
1443
+ return;
1444
+ }
1445
+ handleExecuteTask();
1446
+ };
1602
1447
  return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsxs)("div", {
1603
1448
  className: "task-testing__container",
1604
1449
  children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsxs)("div", {
@@ -1609,8 +1454,9 @@ function TaskTesting({
1609
1454
  className: "task-header",
1610
1455
  children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)("span", {
1611
1456
  className: "task-type",
1612
- children: (0,_utils_element__WEBPACK_IMPORTED_MODULE_10__.getType)(element)
1457
+ children: (0,_utils_element__WEBPACK_IMPORTED_MODULE_10__.getType)(element, injector)
1613
1458
  }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)("span", {
1459
+ className: "task-name",
1614
1460
  children: (0,_utils_element__WEBPACK_IMPORTED_MODULE_10__.getName)(element)
1615
1461
  })]
1616
1462
  }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)(_carbon_react__WEBPACK_IMPORTED_MODULE_1__.Tooltip, {
@@ -1620,11 +1466,12 @@ function TaskTesting({
1620
1466
  label: tooltipLabel,
1621
1467
  align: "left-start",
1622
1468
  children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx)(_carbon_react__WEBPACK_IMPORTED_MODULE_1__.Button, {
1469
+ "data-testid": "test-task-btn",
1623
1470
  className: "btn-execute",
1624
1471
  kind: "primary",
1625
1472
  size: "sm",
1626
1473
  renderIcon: isTaskExecuting ? _carbon_icons_react__WEBPACK_IMPORTED_MODULE_2__.StopFilledAlt : _carbon_icons_react__WEBPACK_IMPORTED_MODULE_2__.PlayFilledAlt,
1627
- onClick: isTaskExecuting ? handleCancelTaskExecution : handleExecuteTask,
1474
+ onClick: handleClick,
1628
1475
  children: isTaskExecuting ? 'Cancel' : 'Test task'
1629
1476
  })
1630
1477
  })]
@@ -1779,6 +1626,8 @@ const syntaxClasses = (0,_codemirror_language__WEBPACK_IMPORTED_MODULE_2__.synta
1779
1626
 
1780
1627
  __webpack_require__.r(__webpack_exports__);
1781
1628
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1629
+ /* harmony export */ SINGLE_TASK_SELECTION_REQUIRED_MESSAGE: () => (/* binding */ SINGLE_TASK_SELECTION_REQUIRED_MESSAGE),
1630
+ /* harmony export */ TASK_SELECTION_REQUIRED_MESSAGE: () => (/* binding */ TASK_SELECTION_REQUIRED_MESSAGE),
1782
1631
  /* harmony export */ useSelectedElement: () => (/* binding */ useSelectedElement)
1783
1632
  /* harmony export */ });
1784
1633
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
@@ -1786,15 +1635,21 @@ __webpack_require__.r(__webpack_exports__);
1786
1635
 
1787
1636
 
1788
1637
  const SUPPORTED_ELEMENT_TYPES = ['bpmn:Task'];
1638
+ const SINGLE_TASK_SELECTION_REQUIRED_MESSAGE = 'Select a task to start testing.';
1639
+ const TASK_SELECTION_REQUIRED_MESSAGE = 'Task testing is only supported for tasks. Select a task to start testing.';
1789
1640
 
1790
- /**
1791
- * Get currently selected BPMN element, if it is a single `bpmn:Task`.
1792
- *
1793
- * @param {Object} injector
1794
- * @return {Object|null} Selected BPMN element or null
1641
+ /**
1642
+ * Get currently selected BPMN element, if it is a single `bpmn:Task`. If not,
1643
+ * return null and a message indicating what to do.
1644
+ *
1645
+ * @param {Object} injector
1646
+ * @return {[ Object|null, string|null ]}
1795
1647
  */
1796
1648
  function useSelectedElement(injector) {
1797
1649
  const [selectedElement, setSelectedElement] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null);
1650
+
1651
+ /** @type {[ string|null, Function ]} */
1652
+ const [message, setMessage] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(SINGLE_TASK_SELECTION_REQUIRED_MESSAGE);
1798
1653
  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
1799
1654
  const selection = injector.get('selection');
1800
1655
  handleSelection({
@@ -1809,13 +1664,18 @@ function useSelectedElement(injector) {
1809
1664
  const handleSelection = ({
1810
1665
  newSelection
1811
1666
  }) => {
1812
- if (newSelection.length === 1 && (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.isAny)(newSelection[0], SUPPORTED_ELEMENT_TYPES)) {
1813
- setSelectedElement(newSelection[0]);
1814
- } else {
1667
+ if (newSelection.length !== 1) {
1668
+ setSelectedElement(null);
1669
+ setMessage(SINGLE_TASK_SELECTION_REQUIRED_MESSAGE);
1670
+ } else if (!(0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.isAny)(newSelection[0], SUPPORTED_ELEMENT_TYPES)) {
1815
1671
  setSelectedElement(null);
1672
+ setMessage(TASK_SELECTION_REQUIRED_MESSAGE);
1673
+ } else {
1674
+ setSelectedElement(newSelection[0]);
1675
+ setMessage(null);
1816
1676
  }
1817
1677
  };
1818
- return selectedElement;
1678
+ return [selectedElement, message];
1819
1679
  }
1820
1680
 
1821
1681
  /***/ }),
@@ -1889,21 +1749,21 @@ __webpack_require__.r(__webpack_exports__);
1889
1749
 
1890
1750
 
1891
1751
 
1892
- /**
1893
- * @typedef {import('@codemirror/autocomplete').Completion} Completion
1894
- * @typedef {import('@codemirror/autocomplete').CompletionContext} CompletionContext
1895
- * @typedef {import('@codemirror/autocomplete').CompletionResult} CompletionResult
1752
+ /**
1753
+ * @typedef {import('@codemirror/autocomplete').Completion} Completion
1754
+ * @typedef {import('@codemirror/autocomplete').CompletionContext} CompletionContext
1755
+ * @typedef {import('@codemirror/autocomplete').CompletionResult} CompletionResult
1896
1756
  */
1897
1757
 
1898
- /**
1899
- * @param {Completion[]} variables
1758
+ /**
1759
+ * @param {Completion[]} variables
1900
1760
  */
1901
1761
  function getAutocompletionExtensions(variables) {
1902
1762
  return [autoCompletionExtension(variables), startCompletionExtension()];
1903
1763
  }
1904
1764
 
1905
- /**
1906
- * @param {Completion[]} variables
1765
+ /**
1766
+ * @param {Completion[]} variables
1907
1767
  */
1908
1768
  function autoCompletionExtension(variables) {
1909
1769
  return (0,_codemirror_autocomplete__WEBPACK_IMPORTED_MODULE_0__.autocompletion)({
@@ -1911,8 +1771,8 @@ function autoCompletionExtension(variables) {
1911
1771
  });
1912
1772
  }
1913
1773
 
1914
- /**
1915
- * Trigger autocompletion when the user goes into a new line.
1774
+ /**
1775
+ * Trigger autocompletion when the user goes into a new line.
1916
1776
  */
1917
1777
  function startCompletionExtension() {
1918
1778
  return _codemirror_view__WEBPACK_IMPORTED_MODULE_1__.EditorView.updateListener.of(update => {
@@ -1936,11 +1796,11 @@ function startCompletionExtension() {
1936
1796
  });
1937
1797
  }
1938
1798
 
1939
- /**
1940
- * @param {CompletionContext} context
1941
- * @param {Array} variables
1942
- *
1943
- * @returns {CompletionResult | null}
1799
+ /**
1800
+ * @param {CompletionContext} context
1801
+ * @param {Array} variables
1802
+ *
1803
+ * @returns {CompletionResult | null}
1944
1804
  */
1945
1805
  function autocomplete(context, variables) {
1946
1806
  const {
@@ -2031,13 +1891,13 @@ function autocomplete(context, variables) {
2031
1891
  };
2032
1892
  }
2033
1893
 
2034
- /**
2035
- * Check if there is a property after the current position by looking for a `"` character.
2036
- *
2037
- * @param {*} state
2038
- * @param {number} pos
2039
- *
2040
- * @returns {boolean}
1894
+ /**
1895
+ * Check if there is a property after the current position by looking for a `"` character.
1896
+ *
1897
+ * @param {*} state
1898
+ * @param {number} pos
1899
+ *
1900
+ * @returns {boolean}
2041
1901
  */
2042
1902
  function hasPropertyAfter(state, pos) {
2043
1903
  const textAfter = state.sliceDoc(pos).trimStart();
@@ -2054,60 +1914,33 @@ function hasPropertyAfter(state, pos) {
2054
1914
 
2055
1915
  __webpack_require__.r(__webpack_exports__);
2056
1916
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1917
+ /* harmony export */ getConcreteType: () => (/* binding */ getConcreteType),
2057
1918
  /* harmony export */ getName: () => (/* binding */ getName),
2058
1919
  /* harmony export */ getType: () => (/* binding */ getType)
2059
1920
  /* harmony export */ });
2060
- /* harmony import */ var bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! bpmn-js/lib/util/ModelUtil */ "./node_modules/bpmn-js/lib/util/ModelUtil.js");
1921
+ /* harmony import */ var bpmn_js_lib_features_label_editing_LabelUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! bpmn-js/lib/features/label-editing/LabelUtil */ "./node_modules/bpmn-js/lib/util/LabelUtil.js");
2061
1922
 
2062
-
2063
- /**
2064
- * Get the name of a BPMN element.
2065
- *
2066
- * @param {import('../types').Element} element
2067
- *
2068
- * @returns {string}
2069
- */
2070
1923
  function getName(element) {
2071
- const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.getBusinessObject)(element);
2072
- const name = businessObject.get('name') || businessObject.get('id');
2073
- if (name.length > 30) {
2074
- return `${name.substring(0, 27)}...`;
2075
- }
2076
- return name;
1924
+ return (0,bpmn_js_lib_features_label_editing_LabelUtil__WEBPACK_IMPORTED_MODULE_0__.getLabel)(element);
2077
1925
  }
2078
-
2079
- /**
2080
- * Get the name of a BPMN element.
2081
- *
2082
- * @param {import('../types').Element} element
2083
- *
2084
- * @returns {string}
2085
- */
2086
- function getType(element) {
2087
- const businessObject = (0,bpmn_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.getBusinessObject)(element);
2088
- const {
2089
- $type: type
2090
- } = businessObject;
2091
- switch (type) {
2092
- case 'bpmn:Task':
2093
- return 'Task';
2094
- case 'bpmn:UserTask':
2095
- return 'User Task';
2096
- case 'bpmn:ScriptTask':
2097
- return 'Script Task';
2098
- case 'bpmn:ServiceTask':
2099
- return 'Service Task';
2100
- case 'bpmn:BusinessRuleTask':
2101
- return 'Business Rule Task';
2102
- case 'bpmn:SendTask':
2103
- return 'Send Task';
2104
- case 'bpmn:ManualTask':
2105
- return 'Manual Task';
2106
- case 'bpmn:ReceiveTask':
2107
- return 'Receive Task';
2108
- default:
2109
- return 'Task';
1926
+ function getType(element, injector) {
1927
+ const translate = injector.get('translate') || (text => text);
1928
+ const elementTemplates = injector.get('elementTemplates', false);
1929
+ if (elementTemplates) {
1930
+ const template = getTemplate(element, elementTemplates);
1931
+ if (template && template.name) {
1932
+ return translate(template.name);
1933
+ }
2110
1934
  }
1935
+ const concreteType = getConcreteType(element);
1936
+ return translate(concreteType.replace(/(\B[A-Z])/g, ' $1'));
1937
+ }
1938
+ ;
1939
+ function getTemplate(element, elementTemplates) {
1940
+ return elementTemplates.get(element);
1941
+ }
1942
+ function getConcreteType(element) {
1943
+ return element.type.split(':')[1];
2111
1944
  }
2112
1945
 
2113
1946
  /***/ }),
@@ -32362,6 +32195,297 @@ function surrogateHigh(ch) { return ch >= 0xD800 && ch < 0xDC00 }
32362
32195
  function codePointSize(code) { return code < 0x10000 ? 1 : 2 }
32363
32196
 
32364
32197
 
32198
+ /***/ }),
32199
+
32200
+ /***/ "./node_modules/bpmn-js/lib/util/LabelUtil.js":
32201
+ /*!****************************************************!*\
32202
+ !*** ./node_modules/bpmn-js/lib/util/LabelUtil.js ***!
32203
+ \****************************************************/
32204
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
32205
+
32206
+ __webpack_require__.r(__webpack_exports__);
32207
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
32208
+ /* harmony export */ DEFAULT_LABEL_SIZE: () => (/* binding */ DEFAULT_LABEL_SIZE),
32209
+ /* harmony export */ FLOW_LABEL_INDENT: () => (/* binding */ FLOW_LABEL_INDENT),
32210
+ /* harmony export */ getExternalLabelBounds: () => (/* binding */ getExternalLabelBounds),
32211
+ /* harmony export */ getExternalLabelMid: () => (/* binding */ getExternalLabelMid),
32212
+ /* harmony export */ getFlowLabelPosition: () => (/* binding */ getFlowLabelPosition),
32213
+ /* harmony export */ getLabel: () => (/* binding */ getLabel),
32214
+ /* harmony export */ getWaypointsMid: () => (/* binding */ getWaypointsMid),
32215
+ /* harmony export */ hasExternalLabel: () => (/* binding */ hasExternalLabel),
32216
+ /* harmony export */ isLabel: () => (/* reexport safe */ diagram_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.isLabel),
32217
+ /* harmony export */ isLabelExternal: () => (/* binding */ isLabelExternal),
32218
+ /* harmony export */ setLabel: () => (/* binding */ setLabel)
32219
+ /* harmony export */ });
32220
+ /* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! min-dash */ "./node_modules/min-dash/dist/index.esm.js");
32221
+ /* harmony import */ var _ModelUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ModelUtil */ "./node_modules/bpmn-js/lib/util/ModelUtil.js");
32222
+ /* harmony import */ var diagram_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/util/ModelUtil */ "./node_modules/diagram-js/lib/util/ModelUtil.js");
32223
+
32224
+
32225
+
32226
+
32227
+
32228
+
32229
+
32230
+
32231
+ /**
32232
+ * @typedef {import('diagram-js/lib/util/Types').Point} Point
32233
+ * @typedef {import('diagram-js/lib/util/Types').Rect} Rect
32234
+ *
32235
+ * @typedef {import('../model/Types').Element} Element
32236
+ * @typedef {import('../model/Types').ModdleElement} ModdleElement
32237
+ */
32238
+
32239
+ var DEFAULT_LABEL_SIZE = {
32240
+ width: 90,
32241
+ height: 20
32242
+ };
32243
+
32244
+ var FLOW_LABEL_INDENT = 15;
32245
+
32246
+
32247
+ /**
32248
+ * Return true if the given semantic has an external label.
32249
+ *
32250
+ * @param {Element} semantic
32251
+ *
32252
+ * @return {boolean}
32253
+ */
32254
+ function isLabelExternal(semantic) {
32255
+ return (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(semantic, 'bpmn:Event') ||
32256
+ (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(semantic, 'bpmn:Gateway') ||
32257
+ (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(semantic, 'bpmn:DataStoreReference') ||
32258
+ (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(semantic, 'bpmn:DataObjectReference') ||
32259
+ (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(semantic, 'bpmn:DataInput') ||
32260
+ (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(semantic, 'bpmn:DataOutput') ||
32261
+ (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(semantic, 'bpmn:SequenceFlow') ||
32262
+ (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(semantic, 'bpmn:MessageFlow') ||
32263
+ (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(semantic, 'bpmn:Group');
32264
+ }
32265
+
32266
+ /**
32267
+ * Return true if the given element has an external label.
32268
+ *
32269
+ * @param {Element} element
32270
+ *
32271
+ * @return {boolean}
32272
+ */
32273
+ function hasExternalLabel(element) {
32274
+ return (0,diagram_js_lib_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.isLabel)(element.label);
32275
+ }
32276
+
32277
+ /**
32278
+ * Get the position of a sequence flow label.
32279
+ *
32280
+ * @param {Point[]} waypoints
32281
+ *
32282
+ * @return {Point}
32283
+ */
32284
+ function getFlowLabelPosition(waypoints) {
32285
+
32286
+ // get the waypoints mid
32287
+ var mid = waypoints.length / 2 - 1;
32288
+
32289
+ var first = waypoints[Math.floor(mid)];
32290
+ var second = waypoints[Math.ceil(mid + 0.01)];
32291
+
32292
+ // get position
32293
+ var position = getWaypointsMid(waypoints);
32294
+
32295
+ // calculate angle
32296
+ var angle = Math.atan((second.y - first.y) / (second.x - first.x));
32297
+
32298
+ var x = position.x,
32299
+ y = position.y;
32300
+
32301
+ if (Math.abs(angle) < Math.PI / 2) {
32302
+ y -= FLOW_LABEL_INDENT;
32303
+ } else {
32304
+ x += FLOW_LABEL_INDENT;
32305
+ }
32306
+
32307
+ return { x: x, y: y };
32308
+ }
32309
+
32310
+
32311
+ /**
32312
+ * Get the middle of a number of waypoints.
32313
+ *
32314
+ * @param {Point[]} waypoints
32315
+ *
32316
+ * @return {Point}
32317
+ */
32318
+ function getWaypointsMid(waypoints) {
32319
+
32320
+ var mid = waypoints.length / 2 - 1;
32321
+
32322
+ var first = waypoints[Math.floor(mid)];
32323
+ var second = waypoints[Math.ceil(mid + 0.01)];
32324
+
32325
+ return {
32326
+ x: first.x + (second.x - first.x) / 2,
32327
+ y: first.y + (second.y - first.y) / 2
32328
+ };
32329
+ }
32330
+
32331
+ /**
32332
+ * Get the middle of the external label of an element.
32333
+ *
32334
+ * @param {Element} element
32335
+ *
32336
+ * @return {Point}
32337
+ */
32338
+ function getExternalLabelMid(element) {
32339
+
32340
+ if (element.waypoints) {
32341
+ return getFlowLabelPosition(element.waypoints);
32342
+ } else if ((0,_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(element, 'bpmn:Group')) {
32343
+ return {
32344
+ x: element.x + element.width / 2,
32345
+ y: element.y + DEFAULT_LABEL_SIZE.height / 2
32346
+ };
32347
+ } else {
32348
+ return {
32349
+ x: element.x + element.width / 2,
32350
+ y: element.y + element.height + DEFAULT_LABEL_SIZE.height / 2
32351
+ };
32352
+ }
32353
+ }
32354
+
32355
+
32356
+ /**
32357
+ * Return the bounds of an elements label, parsed from the elements DI or
32358
+ * generated from its bounds.
32359
+ *
32360
+ * @param {ModdleElement} di
32361
+ * @param {Element} element
32362
+ *
32363
+ * @return {Rect}
32364
+ */
32365
+ function getExternalLabelBounds(di, element) {
32366
+
32367
+ var mid,
32368
+ size,
32369
+ bounds,
32370
+ label = di.label;
32371
+
32372
+ if (label && label.bounds) {
32373
+ bounds = label.bounds;
32374
+
32375
+ size = {
32376
+ width: Math.max(DEFAULT_LABEL_SIZE.width, bounds.width),
32377
+ height: bounds.height
32378
+ };
32379
+
32380
+ mid = {
32381
+ x: bounds.x + bounds.width / 2,
32382
+ y: bounds.y + bounds.height / 2
32383
+ };
32384
+ } else {
32385
+
32386
+ mid = getExternalLabelMid(element);
32387
+
32388
+ size = DEFAULT_LABEL_SIZE;
32389
+ }
32390
+
32391
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)({
32392
+ x: mid.x - size.width / 2,
32393
+ y: mid.y - size.height / 2
32394
+ }, size);
32395
+ }
32396
+
32397
+ /**
32398
+ * @param {ModdleElement} semantic
32399
+ *
32400
+ * @returns {string}
32401
+ */
32402
+ function getLabelAttr(semantic) {
32403
+ if (
32404
+ (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(semantic, 'bpmn:FlowElement') ||
32405
+ (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(semantic, 'bpmn:Participant') ||
32406
+ (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(semantic, 'bpmn:Lane') ||
32407
+ (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(semantic, 'bpmn:SequenceFlow') ||
32408
+ (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(semantic, 'bpmn:MessageFlow') ||
32409
+ (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(semantic, 'bpmn:DataInput') ||
32410
+ (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(semantic, 'bpmn:DataOutput')
32411
+ ) {
32412
+ return 'name';
32413
+ }
32414
+
32415
+ if ((0,_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(semantic, 'bpmn:TextAnnotation')) {
32416
+ return 'text';
32417
+ }
32418
+
32419
+ if ((0,_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(semantic, 'bpmn:Group')) {
32420
+ return 'categoryValueRef';
32421
+ }
32422
+ }
32423
+
32424
+ /**
32425
+ * @param {ModdleElement} semantic
32426
+ *
32427
+ * @returns {string}
32428
+ */
32429
+ function getCategoryValue(semantic) {
32430
+ var categoryValueRef = semantic['categoryValueRef'];
32431
+
32432
+ if (!categoryValueRef) {
32433
+ return '';
32434
+ }
32435
+
32436
+
32437
+ return categoryValueRef.value || '';
32438
+ }
32439
+
32440
+ /**
32441
+ * @param {Element} element
32442
+ *
32443
+ * @return {string}
32444
+ */
32445
+ function getLabel(element) {
32446
+ var semantic = element.businessObject,
32447
+ attr = getLabelAttr(semantic);
32448
+
32449
+ if (attr) {
32450
+
32451
+ if (attr === 'categoryValueRef') {
32452
+
32453
+ return getCategoryValue(semantic);
32454
+ }
32455
+
32456
+ return semantic[attr] || '';
32457
+ }
32458
+ }
32459
+
32460
+
32461
+ /**
32462
+ * @param {Element} element
32463
+ * @param {string} text
32464
+ *
32465
+ * @return {Element}
32466
+ */
32467
+ function setLabel(element, text) {
32468
+ var semantic = element.businessObject,
32469
+ attr = getLabelAttr(semantic);
32470
+
32471
+ if (attr) {
32472
+
32473
+ if (attr === 'categoryValueRef') {
32474
+ if (!semantic[attr]) {
32475
+ return element;
32476
+ }
32477
+
32478
+ semantic[attr].value = text;
32479
+ } else {
32480
+ semantic[attr] = text;
32481
+ }
32482
+
32483
+ }
32484
+
32485
+ return element;
32486
+ }
32487
+
32488
+
32365
32489
  /***/ }),
32366
32490
 
32367
32491
  /***/ "./node_modules/bpmn-js/lib/util/ModelUtil.js":
@@ -32630,10 +32754,20 @@ ___CSS_LOADER_EXPORT___.push([module.id, `.task-testing__container {
32630
32754
  .task-testing__container .task-testing__container--header .task-header {
32631
32755
  display: flex;
32632
32756
  gap: 6px;
32757
+ min-width: 0;
32633
32758
  }
32634
32759
  .task-testing__container .task-testing__container--header .task-header .task-type {
32635
32760
  font-weight: bold;
32636
32761
  }
32762
+ .task-testing__container .task-testing__container--header .task-header .task-type,
32763
+ .task-testing__container .task-testing__container--header .task-header .task-name {
32764
+ min-width: 0;
32765
+ overflow: hidden;
32766
+ white-space: nowrap;
32767
+ text-overflow: ellipsis;
32768
+ flex-shrink: 1;
32769
+ flex-grow: 1;
32770
+ }
32637
32771
  .task-testing__container .task-testing__container--header .btn-execute {
32638
32772
  width: 138px;
32639
32773
  }
@@ -32819,7 +32953,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, `.task-testing__container {
32819
32953
  }
32820
32954
  .code__editor .code__editor-copy-button svg {
32821
32955
  fill: #525252;
32822
- }`, "",{"version":3,"sources":["webpack://./lib/style/style.scss"],"names":[],"mappings":"AAAA;EACE,aAAA;EACA,mBAAA;EACA,YAAA;EACA,WAAA;EACA,aAAA;EACA,eAAA;AACF;AAEI;;EAEE,aAAA;EACA,mBAAA;EACA,QAAA;EACA,YAAA;AAAN;AAEM;;EACE,oBAAA;EACA,uBAAA;AACR;AAIE;EACE,UAAA;EACA,aAAA;EACA,sBAAA;EACA,+BAAA;EACA,kBAAA;AAFJ;AAKE;EACE,UAAA;EACA,aAAA;EACA,sBAAA;EACA,iBAAA;AAHJ;AAME;EACE,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,8BAAA;EACA,SAAA;EACA,WAAA;AAJJ;AAMI;EACE,aAAA;EACA,QAAA;AAJN;AAMM;EACE,iBAAA;AAJR;AAQI;EACE,YAAA;AANN;AASI;EACE,aAAA;AAPN;AAUI;EACE,aAAA;AARN;AAWI;EACE,oBAAA;EACA,uBAAA;AATN;AAaE;EACE,YAAA;EACA,aAAA;EACA,sBAAA;EACA,QAAA;AAXJ;AAaI;EACE,aAAA;EACA,mBAAA;EACA,QAAA;AAXN;AAcI;EACE,cAAA;AAZN;AAgBE;EACE,YAAA;EACA,aAAA;EACA,sBAAA;EACA,QAAA;AAdJ;AAgBI;EACE,aAAA;EACA,mBAAA;EACA,YAAA;EACA,WAAA;AAdN;AAiBI;EACE,cAAA;EACA,aAAA;EACA,mBAAA;EACA,QAAA;AAfN;AAiBM;EACE,aAAA;AAfR;AAkBM;EACE,aAAA;AAhBR;AAmBM;EACE,aAAA;AAjBR;AAoBM;EACE,iBAAA;EACA,uBAAA;AAlBR;AAsBI;EACE,iBAAA;AApBN;AAuBI;EACE,aAAA;EACA,sBAAA;EACA,YAAA;EACA,kBAAA;AArBN;AAuBM;EACE,oCAAA;AArBR;AAwBM;EACE,UAAA;EACA,yBAAA;AAtBR;AAyBM;EACE,aAAA;AAvBR;AA2BM;EACE,aAAA;AAzBR;AA6BI;EACE,aAAA;EACA,sBAAA;EACA,SAAA;EACA,aAAA;EACA,mBAAA;EACA,yBAAA;EACA,sBAAA;EACA,yBAAA;AA3BN;AA6BM;EACE,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,iBAAA;AA3BR;AA6BQ;EACE,aAAA;AA3BV;AA8BQ;EACE,iBAAA;AA5BV;AAiCI;EACE,YAAA;EACA,aAAA;EACA,mBAAA;EACA,cAAA;AA/BN;AAkCI;EACE,iBAAA;AAhCN;AAmCI;EACE,WAAA;AAjCN;AAoCI;EACE,qBAAA;EACA,YAAA;AAlCN;AAqCI;EACE,eAAA;AAnCN;;AAwCA;EACE,kBAAA;EACA,YAAA;EACA,aAAA;EACA,sBAAA;AArCF;AAuCE;EACE,0BAAA;EACA,oBAAA;AArCJ;AAwCE;EACE,kBAAA;EACA,YAAA;AAtCJ;AAwCI;EACE,kBAAA;EACA,MAAA;EACA,OAAA;EACA,QAAA;EACA,SAAA;AAtCN;AAwCM;EACE,YAAA;EACA,2CAAA;AAtCR;AAyCM;EACE,2BAAA;AAvCR;AA0CM;EACE,aAAA;AAxCR;AA2CM;EACE,aAAA;AAzCR;AA4CM;EACE,eAAA;AA1CR;AA6CM;EACE,YAAA;EACA,sBAAA;EACA,eAAA;EACA,gBAAA;EACA,qBAAA;AA3CR;AA6CQ;EACE,kBAAA;AA3CV;AA8CQ;EACE,eAAA;AA5CV;AAkDE;EACE,cAAA;EACA,eAAA;EACA,eAAA;AAhDJ;AAmDE;EACE,kBAAA;EACA,SAAA;EACA,WAAA;EACA,WAAA;AAjDJ;AAmDI;EACE,aAAA;AAjDN","sourcesContent":[".task-testing__container {\r\n display: flex;\r\n flex-direction: row;\r\n height: 100%;\r\n width: 100%;\r\n padding: 10px;\r\n font-size: 14px;\r\n\r\n &.task-testing__container--empty {\r\n .task-testing__container-no-config,\r\n .task-testing__container-no-element {\r\n display: flex;\r\n align-items: center;\r\n gap: 5px;\r\n height: 32px;\r\n\r\n .cds--inline-loading {\r\n inline-size: initial;\r\n min-block-size: initial;\r\n }\r\n }\r\n }\r\n\r\n .task-testing__container--left {\r\n width: 50%;\r\n display: flex;\r\n flex-direction: column;\r\n border-right: 1px solid #E0E0E0;\r\n padding-right: 6px;\r\n }\r\n\r\n .task-testing__container--right {\r\n width: 50%;\r\n display: flex;\r\n flex-direction: column;\r\n padding-left: 6px;\r\n }\r\n\r\n .task-testing__container--header {\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n justify-content: space-between;\r\n gap: 12px;\r\n width: 100%;\r\n\r\n .task-header {\r\n display: flex;\r\n gap: 6px;\r\n \r\n .task-type {\r\n font-weight: bold;\r\n }\r\n }\r\n\r\n .btn-execute {\r\n width: 138px;\r\n }\r\n\r\n .cds--popover-container:not(.has-error) .cds--popover {\r\n display: none;\r\n }\r\n\r\n .cds--tooltip-content {\r\n padding: 12px;\r\n }\r\n\r\n .cds--btn .cds--inline-loading {\r\n inline-size: initial;\r\n min-block-size: initial;\r\n }\r\n }\r\n\r\n .input {\r\n flex-grow: 1;\r\n display: flex;\r\n flex-direction: column;\r\n gap: 5px;\r\n\r\n .input__header {\r\n display: flex;\r\n align-items: center;\r\n gap: 5px;\r\n }\r\n\r\n .input__header--title {\r\n color: #525252;\r\n }\r\n }\r\n\r\n .output {\r\n flex-grow: 1;\r\n display: flex;\r\n flex-direction: column;\r\n gap: 5px;\r\n\r\n .output__header {\r\n display: flex;\r\n align-items: center;\r\n height: 32px;\r\n width: 100%;\r\n }\r\n\r\n .output__header--title {\r\n color: #525252;\r\n display: flex;\r\n align-items: center;\r\n gap: 6px;\r\n\r\n svg.output__status-icon--ready {\r\n fill: #0043ce;\r\n }\r\n\r\n svg.output__status-icon--success {\r\n fill: #24a148;\r\n }\r\n\r\n svg.output__status-icon--error {\r\n fill: #da1e28;\r\n }\r\n\r\n .cds--inline-loading {\r\n inline-size: 16px;\r\n min-block-size: initial;\r\n }\r\n }\r\n\r\n .output__header--button-operate {\r\n margin-left: auto;\r\n }\r\n\r\n .output__body {\r\n display: flex;\r\n flex-direction: column;\r\n flex-grow: 1;\r\n position: relative;\r\n\r\n .cds--tabs {\r\n --cds-layout-size-height-local: 32px;\r\n }\r\n \r\n .cds--tab-content {\r\n padding: 0;\r\n height: calc(100% - 20px);\r\n }\r\n\r\n .cds--tab-content:not([hidden]) {\r\n display: flex;\r\n }\r\n\r\n // Tooltip on Carbon Button with absolute position is broken.\r\n .cds--popover {\r\n display: none;\r\n }\r\n }\r\n\r\n .output__error {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 12px;\r\n padding: 12px;\r\n margin-bottom: 12px;\r\n border: 1px solid #da1e28;\r\n border-left-width: 3px;\r\n background-color: #fff1f1;\r\n\r\n .output__error--title {\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n font-weight: bold;\r\n\r\n svg {\r\n fill: #da1e28;\r\n }\r\n\r\n .output__error--action {\r\n margin-left: auto;\r\n }\r\n }\r\n }\r\n\r\n .output__variables--empty {\r\n height: 32px;\r\n display: flex;\r\n align-items: center;\r\n color: #525252;\r\n }\r\n\r\n .output__variables--empty-action {\r\n font-weight: bold;\r\n }\r\n\r\n .cds--snippet-container {\r\n width: 100%;\r\n }\r\n\r\n .cds--snippet {\r\n max-inline-size: 100%;\r\n height: 100%;\r\n }\r\n\r\n code {\r\n font-size: 14px;\r\n }\r\n }\r\n}\r\n\r\n.code__editor {\r\n position: relative;\r\n flex-grow: 1;\r\n display: flex;\r\n flex-direction: column;\r\n\r\n &.code__editor--error .code__editor-codemirror .code__editor-codemirror-inner .cm-editor {\r\n outline: 1px solid #da1e28;\r\n outline-offset: -1px;\r\n }\r\n\r\n .code__editor-codemirror {\r\n position: relative;\r\n flex-grow: 1;\r\n\r\n .code__editor-codemirror-inner {\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n right: 0;\r\n bottom: 0;\r\n\r\n .cm-editor {\r\n height: 100%;\r\n background-color: var(--cds-layer, #f4f4f4);\r\n }\r\n\r\n .cm-scroller {\r\n overflow-y: auto !important;\r\n }\r\n\r\n .cm-content {\r\n padding: 15px;\r\n }\r\n\r\n .cm-focused {\r\n outline: none;\r\n }\r\n\r\n .cm-tooltip {\r\n font-size: 14px;\r\n }\r\n\r\n .info {\r\n padding: 5px;\r\n font-family: monospace;\r\n font-size: 12px;\r\n max-width: 300px;\r\n word-wrap: break-word;\r\n\r\n span {\r\n font-style: italic;\r\n }\r\n\r\n pre {\r\n margin-top: 5px;\r\n }\r\n }\r\n }\r\n }\r\n\r\n .code__editor-error {\r\n color: #da1e28;\r\n font-size: 13px;\r\n margin-top: 5px;\r\n }\r\n\r\n .code__editor-copy-button {\r\n position: absolute;\r\n top: 10px;\r\n right: 10px;\r\n z-index: 10;\r\n\r\n svg {\r\n fill: #525252;\r\n }\r\n }\r\n}"],"sourceRoot":""}]);
32956
+ }`, "",{"version":3,"sources":["webpack://./lib/style/style.scss"],"names":[],"mappings":"AAAA;EACE,aAAA;EACA,mBAAA;EACA,YAAA;EACA,WAAA;EACA,aAAA;EACA,eAAA;AACF;AAEI;;EAEE,aAAA;EACA,mBAAA;EACA,QAAA;EACA,YAAA;AAAN;AAEM;;EACE,oBAAA;EACA,uBAAA;AACR;AAIE;EACE,UAAA;EACA,aAAA;EACA,sBAAA;EACA,+BAAA;EACA,kBAAA;AAFJ;AAKE;EACE,UAAA;EACA,aAAA;EACA,sBAAA;EACA,iBAAA;AAHJ;AAME;EACE,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,8BAAA;EACA,SAAA;EACA,WAAA;AAJJ;AAMI;EACE,aAAA;EACA,QAAA;EACA,YAAA;AAJN;AAMM;EACE,iBAAA;AAJR;AAOM;;EAEE,YAAA;EACA,gBAAA;EACA,mBAAA;EACA,uBAAA;EACA,cAAA;EACA,YAAA;AALR;AASI;EACE,YAAA;AAPN;AAUI;EACE,aAAA;AARN;AAWI;EACE,aAAA;AATN;AAYI;EACE,oBAAA;EACA,uBAAA;AAVN;AAcE;EACE,YAAA;EACA,aAAA;EACA,sBAAA;EACA,QAAA;AAZJ;AAcI;EACE,aAAA;EACA,mBAAA;EACA,QAAA;AAZN;AAeI;EACE,cAAA;AAbN;AAiBE;EACE,YAAA;EACA,aAAA;EACA,sBAAA;EACA,QAAA;AAfJ;AAiBI;EACE,aAAA;EACA,mBAAA;EACA,YAAA;EACA,WAAA;AAfN;AAkBI;EACE,cAAA;EACA,aAAA;EACA,mBAAA;EACA,QAAA;AAhBN;AAkBM;EACE,aAAA;AAhBR;AAmBM;EACE,aAAA;AAjBR;AAoBM;EACE,aAAA;AAlBR;AAqBM;EACE,iBAAA;EACA,uBAAA;AAnBR;AAuBI;EACE,iBAAA;AArBN;AAwBI;EACE,aAAA;EACA,sBAAA;EACA,YAAA;EACA,kBAAA;AAtBN;AAwBM;EACE,oCAAA;AAtBR;AAyBM;EACE,UAAA;EACA,yBAAA;AAvBR;AA0BM;EACE,aAAA;AAxBR;AA4BM;EACE,aAAA;AA1BR;AA8BI;EACE,aAAA;EACA,sBAAA;EACA,SAAA;EACA,aAAA;EACA,mBAAA;EACA,yBAAA;EACA,sBAAA;EACA,yBAAA;AA5BN;AA8BM;EACE,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,iBAAA;AA5BR;AA8BQ;EACE,aAAA;AA5BV;AA+BQ;EACE,iBAAA;AA7BV;AAkCI;EACE,YAAA;EACA,aAAA;EACA,mBAAA;EACA,cAAA;AAhCN;AAmCI;EACE,iBAAA;AAjCN;AAoCI;EACE,WAAA;AAlCN;AAqCI;EACE,qBAAA;EACA,YAAA;AAnCN;AAsCI;EACE,eAAA;AApCN;;AAyCA;EACE,kBAAA;EACA,YAAA;EACA,aAAA;EACA,sBAAA;AAtCF;AAwCE;EACE,0BAAA;EACA,oBAAA;AAtCJ;AAyCE;EACE,kBAAA;EACA,YAAA;AAvCJ;AAyCI;EACE,kBAAA;EACA,MAAA;EACA,OAAA;EACA,QAAA;EACA,SAAA;AAvCN;AAyCM;EACE,YAAA;EACA,2CAAA;AAvCR;AA0CM;EACE,2BAAA;AAxCR;AA2CM;EACE,aAAA;AAzCR;AA4CM;EACE,aAAA;AA1CR;AA6CM;EACE,eAAA;AA3CR;AA8CM;EACE,YAAA;EACA,sBAAA;EACA,eAAA;EACA,gBAAA;EACA,qBAAA;AA5CR;AA8CQ;EACE,kBAAA;AA5CV;AA+CQ;EACE,eAAA;AA7CV;AAmDE;EACE,cAAA;EACA,eAAA;EACA,eAAA;AAjDJ;AAoDE;EACE,kBAAA;EACA,SAAA;EACA,WAAA;EACA,WAAA;AAlDJ;AAoDI;EACE,aAAA;AAlDN","sourcesContent":[".task-testing__container {\n display: flex;\n flex-direction: row;\n height: 100%;\n width: 100%;\n padding: 10px;\n font-size: 14px;\n\n &.task-testing__container--empty {\n .task-testing__container-no-config,\n .task-testing__container-no-element {\n display: flex;\n align-items: center;\n gap: 5px;\n height: 32px;\n\n .cds--inline-loading {\n inline-size: initial;\n min-block-size: initial;\n }\n }\n }\n\n .task-testing__container--left {\n width: 50%;\n display: flex;\n flex-direction: column;\n border-right: 1px solid #E0E0E0;\n padding-right: 6px;\n }\n\n .task-testing__container--right {\n width: 50%;\n display: flex;\n flex-direction: column;\n padding-left: 6px;\n }\n\n .task-testing__container--header {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n width: 100%;\n\n .task-header {\n display: flex;\n gap: 6px;\n min-width: 0;\n \n .task-type {\n font-weight: bold;\n }\n\n .task-type,\n .task-name {\n min-width: 0;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n flex-shrink: 1;\n flex-grow: 1;\n }\n }\n\n .btn-execute {\n width: 138px;\n }\n\n .cds--popover-container:not(.has-error) .cds--popover {\n display: none;\n }\n\n .cds--tooltip-content {\n padding: 12px;\n }\n\n .cds--btn .cds--inline-loading {\n inline-size: initial;\n min-block-size: initial;\n }\n }\n\n .input {\n flex-grow: 1;\n display: flex;\n flex-direction: column;\n gap: 5px;\n\n .input__header {\n display: flex;\n align-items: center;\n gap: 5px;\n }\n\n .input__header--title {\n color: #525252;\n }\n }\n\n .output {\n flex-grow: 1;\n display: flex;\n flex-direction: column;\n gap: 5px;\n\n .output__header {\n display: flex;\n align-items: center;\n height: 32px;\n width: 100%;\n }\n\n .output__header--title {\n color: #525252;\n display: flex;\n align-items: center;\n gap: 6px;\n\n svg.output__status-icon--ready {\n fill: #0043ce;\n }\n\n svg.output__status-icon--success {\n fill: #24a148;\n }\n\n svg.output__status-icon--error {\n fill: #da1e28;\n }\n\n .cds--inline-loading {\n inline-size: 16px;\n min-block-size: initial;\n }\n }\n\n .output__header--button-operate {\n margin-left: auto;\n }\n\n .output__body {\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n position: relative;\n\n .cds--tabs {\n --cds-layout-size-height-local: 32px;\n }\n \n .cds--tab-content {\n padding: 0;\n height: calc(100% - 20px);\n }\n\n .cds--tab-content:not([hidden]) {\n display: flex;\n }\n\n // Tooltip on Carbon Button with absolute position is broken.\n .cds--popover {\n display: none;\n }\n }\n\n .output__error {\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 12px;\n margin-bottom: 12px;\n border: 1px solid #da1e28;\n border-left-width: 3px;\n background-color: #fff1f1;\n\n .output__error--title {\n display: flex;\n flex-direction: row;\n align-items: center;\n font-weight: bold;\n\n svg {\n fill: #da1e28;\n }\n\n .output__error--action {\n margin-left: auto;\n }\n }\n }\n\n .output__variables--empty {\n height: 32px;\n display: flex;\n align-items: center;\n color: #525252;\n }\n\n .output__variables--empty-action {\n font-weight: bold;\n }\n\n .cds--snippet-container {\n width: 100%;\n }\n\n .cds--snippet {\n max-inline-size: 100%;\n height: 100%;\n }\n\n code {\n font-size: 14px;\n }\n }\n}\n\n.code__editor {\n position: relative;\n flex-grow: 1;\n display: flex;\n flex-direction: column;\n\n &.code__editor--error .code__editor-codemirror .code__editor-codemirror-inner .cm-editor {\n outline: 1px solid #da1e28;\n outline-offset: -1px;\n }\n\n .code__editor-codemirror {\n position: relative;\n flex-grow: 1;\n\n .code__editor-codemirror-inner {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n\n .cm-editor {\n height: 100%;\n background-color: var(--cds-layer, #f4f4f4);\n }\n\n .cm-scroller {\n overflow-y: auto !important;\n }\n\n .cm-content {\n padding: 15px;\n }\n\n .cm-focused {\n outline: none;\n }\n\n .cm-tooltip {\n font-size: 14px;\n }\n\n .info {\n padding: 5px;\n font-family: monospace;\n font-size: 12px;\n max-width: 300px;\n word-wrap: break-word;\n\n span {\n font-style: italic;\n }\n\n pre {\n margin-top: 5px;\n }\n }\n }\n }\n\n .code__editor-error {\n color: #da1e28;\n font-size: 13px;\n margin-top: 5px;\n }\n\n .code__editor-copy-button {\n position: absolute;\n top: 10px;\n right: 10px;\n z-index: 10;\n\n svg {\n fill: #525252;\n }\n }\n}"],"sourceRoot":""}]);
32823
32957
  // Exports
32824
32958
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
32825
32959
 
@@ -32945,6 +33079,56 @@ module.exports = function (item) {
32945
33079
 
32946
33080
  /***/ }),
32947
33081
 
33082
+ /***/ "./node_modules/diagram-js/lib/util/ModelUtil.js":
33083
+ /*!*******************************************************!*\
33084
+ !*** ./node_modules/diagram-js/lib/util/ModelUtil.js ***!
33085
+ \*******************************************************/
33086
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
33087
+
33088
+ __webpack_require__.r(__webpack_exports__);
33089
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
33090
+ /* harmony export */ isConnection: () => (/* binding */ isConnection),
33091
+ /* harmony export */ isLabel: () => (/* binding */ isLabel),
33092
+ /* harmony export */ isRoot: () => (/* binding */ isRoot)
33093
+ /* harmony export */ });
33094
+ /* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ "./node_modules/min-dash/dist/index.esm.js");
33095
+
33096
+
33097
+ /**
33098
+ * Checks whether a value is an instance of Connection.
33099
+ *
33100
+ * @param {any} value
33101
+ *
33102
+ * @return {boolean}
33103
+ */
33104
+ function isConnection(value) {
33105
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isObject)(value) && (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.has)(value, 'waypoints');
33106
+ }
33107
+
33108
+ /**
33109
+ * Checks whether a value is an instance of Label.
33110
+ *
33111
+ * @param {any} value
33112
+ *
33113
+ * @return {boolean}
33114
+ */
33115
+ function isLabel(value) {
33116
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isObject)(value) && (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.has)(value, 'labelTarget');
33117
+ }
33118
+
33119
+ /**
33120
+ * Checks whether a value is an instance of Root.
33121
+ *
33122
+ * @param {any} value
33123
+ *
33124
+ * @return {boolean}
33125
+ */
33126
+ function isRoot(value) {
33127
+ return (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isObject)(value) && (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isNil)(value.parent);
33128
+ }
33129
+
33130
+ /***/ }),
33131
+
32948
33132
  /***/ "./node_modules/events/events.js":
32949
33133
  /*!***************************************!*\
32950
33134
  !*** ./node_modules/events/events.js ***!