camunda-bpmn-js 4.10.0 → 4.11.0
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/assets/properties-panel.css +25 -0
- package/dist/base-modeler.development.js +238 -196
- package/dist/base-modeler.production.min.js +3 -3
- package/dist/camunda-cloud-modeler.development.js +302 -216
- package/dist/camunda-cloud-modeler.production.min.js +5 -5
- package/dist/camunda-platform-modeler.development.js +279 -210
- package/dist/camunda-platform-modeler.production.min.js +3 -3
- package/package.json +4 -4
|
@@ -65138,7 +65138,7 @@
|
|
|
65138
65138
|
* @return {SearchResult[]}
|
|
65139
65139
|
*/
|
|
65140
65140
|
BpmnSearchProvider.prototype.find = function(pattern) {
|
|
65141
|
-
var
|
|
65141
|
+
var rootElements = this._canvas.getRootElements();
|
|
65142
65142
|
|
|
65143
65143
|
var elements = this._elementRegistry.filter(function(element) {
|
|
65144
65144
|
if (element.labelTarget) {
|
|
@@ -65149,7 +65149,7 @@
|
|
|
65149
65149
|
|
|
65150
65150
|
// do not include root element
|
|
65151
65151
|
elements = filter$1(elements, function(element) {
|
|
65152
|
-
return element
|
|
65152
|
+
return !rootElements.includes(element);
|
|
65153
65153
|
});
|
|
65154
65154
|
|
|
65155
65155
|
elements = map$3(elements, function(element) {
|
|
@@ -69204,6 +69204,8 @@
|
|
|
69204
69204
|
var _a;
|
|
69205
69205
|
let depth = action >> 19 /* Action.ReduceDepthShift */, type = action & 65535 /* Action.ValueMask */;
|
|
69206
69206
|
let { parser } = this.p;
|
|
69207
|
+
if (this.reducePos < this.pos - 25 /* Lookahead.Margin */)
|
|
69208
|
+
this.setLookAhead(this.pos);
|
|
69207
69209
|
let dPrec = parser.dynamicPrecedence(type);
|
|
69208
69210
|
if (dPrec)
|
|
69209
69211
|
this.score += dPrec;
|
|
@@ -70083,8 +70085,8 @@
|
|
|
70083
70085
|
if (!(side < 0 ? cursor.childBefore(pos) : cursor.childAfter(pos)))
|
|
70084
70086
|
for (;;) {
|
|
70085
70087
|
if ((side < 0 ? cursor.to < pos : cursor.from > pos) && !cursor.type.isError)
|
|
70086
|
-
return side < 0 ? Math.max(0, Math.min(cursor.to - 1, pos - 25 /*
|
|
70087
|
-
: Math.min(tree.length, Math.max(cursor.from + 1, pos + 25 /*
|
|
70088
|
+
return side < 0 ? Math.max(0, Math.min(cursor.to - 1, pos - 25 /* Lookahead.Margin */))
|
|
70089
|
+
: Math.min(tree.length, Math.max(cursor.from + 1, pos + 25 /* Lookahead.Margin */));
|
|
70088
70090
|
if (side < 0 ? cursor.prevSibling() : cursor.nextSibling())
|
|
70089
70091
|
break;
|
|
70090
70092
|
if (!cursor.parent())
|
|
@@ -70202,7 +70204,7 @@
|
|
|
70202
70204
|
token.mask = mask;
|
|
70203
70205
|
token.context = context;
|
|
70204
70206
|
}
|
|
70205
|
-
if (token.lookAhead > token.end + 25 /*
|
|
70207
|
+
if (token.lookAhead > token.end + 25 /* Lookahead.Margin */)
|
|
70206
70208
|
lookAhead = Math.max(token.lookAhead, lookAhead);
|
|
70207
70209
|
if (token.value != 0 /* Term.Err */) {
|
|
70208
70210
|
let startIndex = actionIndex;
|
|
@@ -71825,8 +71827,13 @@
|
|
|
71825
71827
|
/* global console,process */
|
|
71826
71828
|
|
|
71827
71829
|
|
|
71830
|
+
// @ts-expect-error env access
|
|
71828
71831
|
const LOG_PARSE = typeof process != 'undefined' && process.env && /\bfparse(:dbg)?\b/.test(process.env.LOG);
|
|
71832
|
+
|
|
71833
|
+
// @ts-expect-error env access
|
|
71829
71834
|
const LOG_PARSE_DEBUG = typeof process != 'undefined' && process.env && /\bfparse:dbg\b/.test(process.env.LOG);
|
|
71835
|
+
|
|
71836
|
+
// @ts-expect-error env access
|
|
71830
71837
|
const LOG_VARS = typeof process != 'undefined' && process.env && /\bcontext\b/.test(process.env.LOG);
|
|
71831
71838
|
|
|
71832
71839
|
const spaceChars = [
|
|
@@ -72220,7 +72227,7 @@
|
|
|
72220
72227
|
}
|
|
72221
72228
|
|
|
72222
72229
|
/**
|
|
72223
|
-
* @param { Function }
|
|
72230
|
+
* @param { Function } fn
|
|
72224
72231
|
*
|
|
72225
72232
|
* @return { ValueProducer }
|
|
72226
72233
|
*/
|
|
@@ -72279,11 +72286,13 @@
|
|
|
72279
72286
|
get(key) {
|
|
72280
72287
|
const result = this.value[key];
|
|
72281
72288
|
|
|
72282
|
-
|
|
72289
|
+
const constructor = /** @type { typeof VariableContext } */ (this.constructor);
|
|
72290
|
+
|
|
72291
|
+
if (constructor.isAtomic(result)) {
|
|
72283
72292
|
return result;
|
|
72284
72293
|
}
|
|
72285
72294
|
|
|
72286
|
-
return
|
|
72295
|
+
return constructor.of(result);
|
|
72287
72296
|
}
|
|
72288
72297
|
|
|
72289
72298
|
/**
|
|
@@ -72291,10 +72300,14 @@
|
|
|
72291
72300
|
*
|
|
72292
72301
|
* @param {String} key
|
|
72293
72302
|
* @param {any} value
|
|
72303
|
+
*
|
|
72294
72304
|
* @returns {VariableContext} new context with the given key added
|
|
72295
72305
|
*/
|
|
72296
72306
|
set(key, value) {
|
|
72297
|
-
|
|
72307
|
+
|
|
72308
|
+
const constructor = /** @type { typeof VariableContext } */ (this.constructor);
|
|
72309
|
+
|
|
72310
|
+
return constructor.of({
|
|
72298
72311
|
...this.value,
|
|
72299
72312
|
[key]: value
|
|
72300
72313
|
});
|
|
@@ -72352,9 +72365,9 @@
|
|
|
72352
72365
|
tokens = [],
|
|
72353
72366
|
children = [],
|
|
72354
72367
|
parent = null,
|
|
72355
|
-
context,
|
|
72356
|
-
value,
|
|
72357
|
-
raw
|
|
72368
|
+
context = null,
|
|
72369
|
+
value = null,
|
|
72370
|
+
raw = null
|
|
72358
72371
|
} = {}) {
|
|
72359
72372
|
this.name = name;
|
|
72360
72373
|
this.tokens = tokens;
|
|
@@ -72500,6 +72513,9 @@
|
|
|
72500
72513
|
|
|
72501
72514
|
pushChildren(children) {
|
|
72502
72515
|
|
|
72516
|
+
/**
|
|
72517
|
+
* @type {Variables}
|
|
72518
|
+
*/
|
|
72503
72519
|
let parent = this;
|
|
72504
72520
|
|
|
72505
72521
|
for (const child of children) {
|
|
@@ -72619,7 +72635,7 @@
|
|
|
72619
72635
|
* Wrap children of variables under the given named child.
|
|
72620
72636
|
*
|
|
72621
72637
|
* @param { Variables } variables
|
|
72622
|
-
* @param { string }
|
|
72638
|
+
* @param { string } scopeName
|
|
72623
72639
|
* @param { string } code
|
|
72624
72640
|
* @return { Variables }
|
|
72625
72641
|
*/
|
|
@@ -72741,6 +72757,7 @@
|
|
|
72741
72757
|
.assign({ context: newContext || currentContext });
|
|
72742
72758
|
}
|
|
72743
72759
|
|
|
72760
|
+
// @ts-expect-error internal method
|
|
72744
72761
|
const code = input.read(input.pos, stack.pos);
|
|
72745
72762
|
|
|
72746
72763
|
const end = contextEnds[term];
|
|
@@ -72948,7 +72965,7 @@
|
|
|
72948
72965
|
function: tags$1.definitionKeyword,
|
|
72949
72966
|
as: tags$1.keyword,
|
|
72950
72967
|
'Type/...': tags$1.typeName,
|
|
72951
|
-
Wildcard: tags$1.special,
|
|
72968
|
+
Wildcard: tags$1.special(tags$1.variableName),
|
|
72952
72969
|
null: tags$1.null,
|
|
72953
72970
|
LineComment: tags$1.lineComment,
|
|
72954
72971
|
BlockComment: tags$1.blockComment,
|
|
@@ -72989,7 +73006,7 @@
|
|
|
72989
73006
|
tokenData: "+l~RuXY#fYZ$ZZ[#f]^$Zpq#fqr$`rs$kwx&cxy&hyz&mz{&r{|'P|}'U}!O'Z!O!P'h!P!Q(Q!Q![){![!]*^!]!^*c!^!_*h!_!`$f!`!a*w!b!c+R!}#O+W#P#Q+]#Q#R&z#o#p+b#q#r+g$f$g#f#BY#BZ#f$IS$I_#f$I|$I}$Z$I}$JO$Z$JT$JU#f$KV$KW#f&FU&FV#f?HT?HU#f~#kY#q~XY#fZ[#fpq#f$f$g#f#BY#BZ#f$IS$I_#f$JT$JU#f$KV$KW#f&FU&FV#f?HT?HU#f~$`O#r~~$cP!_!`$f~$kOr~~$pW$h~OY$kZr$krs%Ys#O$k#O#P%_#P;'S$k;'S;=`&]<%lO$k~%_O$h~~%bRO;'S$k;'S;=`%k;=`O$k~%pX$h~OY$kZr$krs%Ys#O$k#O#P%_#P;'S$k;'S;=`&];=`<%l$k<%lO$k~&`P;=`<%l$k~&hO#z~~&mOv~~&rOx~~&wP^~z{&z~'PO_~~'UO[~~'ZO#}~R'`PZP!`!a'cQ'hO$]Q~'mQ#y~!O!P's!Q!['x~'xO#|~~'}P$g~!Q!['x~(VQ]~z{(]!P!Q)d~(`TOz(]z{(o{;'S(];'S;=`)^<%lO(]~(rVOz(]z{(o{!P(]!P!Q)X!Q;'S(];'S;=`)^<%lO(]~)^OQ~~)aP;=`<%l(]~)iSP~OY)dZ;'S)d;'S;=`)u<%lO)d~)xP;=`<%l)d~*QQ$g~!O!P*W!Q![){~*ZP!Q!['x~*cO$Z~~*hO$q~R*oP![QsP!_!`*rP*wOsPR+OP!XQsP!_!`*r~+WO$j~~+]O!h~~+bO!f~~+gO#R~~+lO#Q~",
|
|
72990
73007
|
tokenizers: [propertyIdentifiers, identifiers, insertSemicolon, 0, 1],
|
|
72991
73008
|
topRules: {"Expression":[0,3],"Expressions":[1,101],"UnaryTests":[2,102]},
|
|
72992
|
-
dynamicPrecedences: {"31":-1,"71":-1,"73":-1},
|
|
73009
|
+
dynamicPrecedences: {"31":-1,"67":1,"71":-1,"73":-1},
|
|
72993
73010
|
specialized: [{term: 121, get: (value) => spec_identifier[value] || -1}],
|
|
72994
73011
|
tokenPrec: 2500
|
|
72995
73012
|
});
|
|
@@ -94178,176 +94195,182 @@
|
|
|
94178
94195
|
|
|
94179
94196
|
var lint = linter$1(cmFeelersLinter());
|
|
94180
94197
|
|
|
94181
|
-
/**
|
|
94182
|
-
* Creates a Feelers editor in the supplied container.
|
|
94183
|
-
*
|
|
94184
|
-
* @param {Object} config Configuration options for the Feelers editor.
|
|
94185
|
-
* @param {DOMNode} [config.container] The DOM node that will contain the editor.
|
|
94186
|
-
* @param {DOMNode|String} [config.tooltipContainer] The DOM node or CSS selector string for the tooltip container.
|
|
94187
|
-
* @param {String} [config.hostLanguage] The host language for the editor (e.g., 'markdown').
|
|
94188
|
-
* @param {Object} [config.hostLanguageParser] A custom parser for the host language.
|
|
94189
|
-
* @param {Function} [config.onChange] Callback function that is called when the editor's content changes.
|
|
94190
|
-
* @param {Function} [config.onKeyDown] Callback function that is called when a key is pressed within the editor.
|
|
94191
|
-
* @param {Function} [config.onLint] Callback function that is called when linting messages are available.
|
|
94192
|
-
* @param {Object} [config.contentAttributes] Additional attributes to set on the editor's content element.
|
|
94193
|
-
* @param {Boolean} [config.readOnly] Set to true to make the editor read-only.
|
|
94194
|
-
* @param {String} [config.value] Initial value of the editor.
|
|
94195
|
-
* @param {Boolean} [config.enableGutters] Set to true to enable gutter decorations (e.g., line numbers).
|
|
94196
|
-
* @param {Boolean} [config.
|
|
94197
|
-
*
|
|
94198
|
-
* @
|
|
94199
|
-
|
|
94200
|
-
|
|
94201
|
-
|
|
94202
|
-
|
|
94203
|
-
|
|
94204
|
-
|
|
94205
|
-
|
|
94206
|
-
|
|
94207
|
-
|
|
94208
|
-
|
|
94209
|
-
|
|
94210
|
-
|
|
94211
|
-
|
|
94212
|
-
|
|
94213
|
-
|
|
94214
|
-
|
|
94215
|
-
|
|
94216
|
-
|
|
94217
|
-
|
|
94218
|
-
|
|
94219
|
-
|
|
94220
|
-
|
|
94221
|
-
|
|
94222
|
-
|
|
94223
|
-
|
|
94224
|
-
|
|
94225
|
-
|
|
94226
|
-
|
|
94227
|
-
|
|
94228
|
-
|
|
94229
|
-
|
|
94230
|
-
|
|
94231
|
-
|
|
94232
|
-
|
|
94233
|
-
|
|
94234
|
-
|
|
94235
|
-
|
|
94236
|
-
|
|
94237
|
-
|
|
94238
|
-
|
|
94239
|
-
|
|
94240
|
-
|
|
94241
|
-
|
|
94242
|
-
|
|
94243
|
-
|
|
94244
|
-
|
|
94245
|
-
|
|
94246
|
-
|
|
94247
|
-
|
|
94248
|
-
|
|
94249
|
-
|
|
94250
|
-
|
|
94251
|
-
|
|
94252
|
-
|
|
94253
|
-
|
|
94254
|
-
|
|
94255
|
-
|
|
94256
|
-
|
|
94257
|
-
|
|
94258
|
-
|
|
94259
|
-
|
|
94260
|
-
|
|
94261
|
-
|
|
94262
|
-
|
|
94263
|
-
|
|
94264
|
-
|
|
94265
|
-
|
|
94266
|
-
|
|
94267
|
-
|
|
94268
|
-
|
|
94269
|
-
|
|
94270
|
-
|
|
94271
|
-
|
|
94272
|
-
|
|
94273
|
-
|
|
94274
|
-
|
|
94275
|
-
|
|
94276
|
-
|
|
94277
|
-
|
|
94278
|
-
|
|
94279
|
-
|
|
94280
|
-
|
|
94281
|
-
|
|
94282
|
-
|
|
94283
|
-
|
|
94284
|
-
|
|
94285
|
-
|
|
94286
|
-
|
|
94287
|
-
|
|
94288
|
-
] : [])
|
|
94289
|
-
|
|
94290
|
-
|
|
94291
|
-
|
|
94292
|
-
|
|
94293
|
-
|
|
94294
|
-
|
|
94295
|
-
|
|
94296
|
-
|
|
94297
|
-
|
|
94298
|
-
|
|
94299
|
-
|
|
94300
|
-
|
|
94301
|
-
|
|
94302
|
-
|
|
94303
|
-
|
|
94304
|
-
|
|
94305
|
-
|
|
94306
|
-
|
|
94307
|
-
|
|
94308
|
-
|
|
94309
|
-
|
|
94310
|
-
|
|
94311
|
-
|
|
94312
|
-
|
|
94313
|
-
|
|
94314
|
-
|
|
94315
|
-
|
|
94316
|
-
|
|
94317
|
-
|
|
94318
|
-
|
|
94319
|
-
|
|
94320
|
-
|
|
94321
|
-
|
|
94322
|
-
|
|
94323
|
-
|
|
94324
|
-
|
|
94325
|
-
|
|
94326
|
-
|
|
94327
|
-
|
|
94328
|
-
|
|
94329
|
-
|
|
94330
|
-
|
|
94331
|
-
|
|
94332
|
-
|
|
94333
|
-
|
|
94334
|
-
|
|
94335
|
-
|
|
94336
|
-
|
|
94337
|
-
|
|
94338
|
-
|
|
94339
|
-
|
|
94340
|
-
|
|
94341
|
-
|
|
94342
|
-
|
|
94343
|
-
|
|
94344
|
-
|
|
94345
|
-
|
|
94346
|
-
|
|
94347
|
-
|
|
94348
|
-
|
|
94349
|
-
|
|
94350
|
-
|
|
94198
|
+
/**
|
|
94199
|
+
* Creates a Feelers editor in the supplied container.
|
|
94200
|
+
*
|
|
94201
|
+
* @param {Object} config Configuration options for the Feelers editor.
|
|
94202
|
+
* @param {DOMNode} [config.container] The DOM node that will contain the editor.
|
|
94203
|
+
* @param {DOMNode|String} [config.tooltipContainer] The DOM node or CSS selector string for the tooltip container.
|
|
94204
|
+
* @param {String} [config.hostLanguage] The host language for the editor (e.g., 'markdown').
|
|
94205
|
+
* @param {Object} [config.hostLanguageParser] A custom parser for the host language.
|
|
94206
|
+
* @param {Function} [config.onChange] Callback function that is called when the editor's content changes.
|
|
94207
|
+
* @param {Function} [config.onKeyDown] Callback function that is called when a key is pressed within the editor.
|
|
94208
|
+
* @param {Function} [config.onLint] Callback function that is called when linting messages are available.
|
|
94209
|
+
* @param {Object} [config.contentAttributes] Additional attributes to set on the editor's content element.
|
|
94210
|
+
* @param {Boolean} [config.readOnly] Set to true to make the editor read-only.
|
|
94211
|
+
* @param {String} [config.value] Initial value of the editor.
|
|
94212
|
+
* @param {Boolean} [config.enableGutters] Set to true to enable gutter decorations (e.g., line numbers).
|
|
94213
|
+
* @param {Boolean} [config.singleLine] Set to true to limit the editor to a single line.
|
|
94214
|
+
* @param {Boolean} [config.lineWrap] Set to true to enable line wrapping.
|
|
94215
|
+
* @param {Boolean} [config.darkMode] Set to true to use the dark theme for the editor.
|
|
94216
|
+
*
|
|
94217
|
+
* @returns {Object} editor An instance of the FeelersEditor class.
|
|
94218
|
+
*/
|
|
94219
|
+
function FeelersEditor({
|
|
94220
|
+
container,
|
|
94221
|
+
tooltipContainer,
|
|
94222
|
+
hostLanguage,
|
|
94223
|
+
hostLanguageParser,
|
|
94224
|
+
onChange = () => { },
|
|
94225
|
+
onKeyDown = () => { },
|
|
94226
|
+
onLint = () => { },
|
|
94227
|
+
contentAttributes = { },
|
|
94228
|
+
readOnly = false,
|
|
94229
|
+
value = '',
|
|
94230
|
+
enableGutters = false,
|
|
94231
|
+
singleLine = false,
|
|
94232
|
+
lineWrap = false,
|
|
94233
|
+
darkMode = false
|
|
94234
|
+
}) {
|
|
94235
|
+
|
|
94236
|
+
const changeHandler = EditorView.updateListener.of((update) => {
|
|
94237
|
+
if (update.docChanged) {
|
|
94238
|
+
onChange(update.state.doc.toString());
|
|
94239
|
+
}
|
|
94240
|
+
});
|
|
94241
|
+
|
|
94242
|
+
const lintHandler = EditorView.updateListener.of((update) => {
|
|
94243
|
+
const diagnosticEffects = update.transactions
|
|
94244
|
+
.flatMap(t => t.effects)
|
|
94245
|
+
.filter(effect => effect.is(setDiagnosticsEffect));
|
|
94246
|
+
|
|
94247
|
+
if (!diagnosticEffects.length) {
|
|
94248
|
+
return;
|
|
94249
|
+
}
|
|
94250
|
+
|
|
94251
|
+
const messages = diagnosticEffects.flatMap(effect => effect.value);
|
|
94252
|
+
|
|
94253
|
+
onLint(messages);
|
|
94254
|
+
});
|
|
94255
|
+
|
|
94256
|
+
const contentAttributesExtension = EditorView.contentAttributes.of(contentAttributes);
|
|
94257
|
+
|
|
94258
|
+
const keyHandler = EditorView.domEventHandlers(
|
|
94259
|
+
{
|
|
94260
|
+
keydown: onKeyDown
|
|
94261
|
+
}
|
|
94262
|
+
);
|
|
94263
|
+
|
|
94264
|
+
if (typeof tooltipContainer === 'string') {
|
|
94265
|
+
// eslint-disable-next-line no-undef
|
|
94266
|
+
tooltipContainer = document.querySelector(tooltipContainer);
|
|
94267
|
+
}
|
|
94268
|
+
|
|
94269
|
+
const tooltipLayout = tooltipContainer ? tooltips({
|
|
94270
|
+
tooltipSpace: function() {
|
|
94271
|
+
return tooltipContainer.getBoundingClientRect();
|
|
94272
|
+
}
|
|
94273
|
+
}) : [];
|
|
94274
|
+
|
|
94275
|
+
const _getHostLanguageParser = (hostLanguage) => {
|
|
94276
|
+
switch (hostLanguage) {
|
|
94277
|
+
case 'markdown':
|
|
94278
|
+
return parser$1;
|
|
94279
|
+
default:
|
|
94280
|
+
return null;
|
|
94281
|
+
}
|
|
94282
|
+
};
|
|
94283
|
+
|
|
94284
|
+
const feelersLanguageSupport = createFeelersLanguageSupport(hostLanguageParser || hostLanguage && _getHostLanguageParser(hostLanguage));
|
|
94285
|
+
|
|
94286
|
+
const extensions = [
|
|
94287
|
+
bracketMatching(),
|
|
94288
|
+
changeHandler,
|
|
94289
|
+
contentAttributesExtension,
|
|
94290
|
+
closeBrackets(),
|
|
94291
|
+
indentOnInput(),
|
|
94292
|
+
keyHandler,
|
|
94293
|
+
keymap.of([
|
|
94294
|
+
...defaultKeymap,
|
|
94295
|
+
]),
|
|
94296
|
+
feelersLanguageSupport,
|
|
94297
|
+
lint,
|
|
94298
|
+
lintHandler,
|
|
94299
|
+
tooltipLayout,
|
|
94300
|
+
darkMode ? darkTheme : lightTheme,
|
|
94301
|
+
...(enableGutters ? [
|
|
94302
|
+
|
|
94303
|
+
// todo: adjust folding boundaries first foldGutter(),
|
|
94304
|
+
lineNumbers()
|
|
94305
|
+
] : []),
|
|
94306
|
+
...(singleLine ? [
|
|
94307
|
+
EditorState.transactionFilter.of(tr => tr.newDoc.lines > 1 ? [] : tr)
|
|
94308
|
+
] : []),
|
|
94309
|
+
...(lineWrap ? [
|
|
94310
|
+
EditorView.lineWrapping
|
|
94311
|
+
] : [])
|
|
94312
|
+
];
|
|
94313
|
+
|
|
94314
|
+
if (readOnly) {
|
|
94315
|
+
extensions.push(EditorView.editable.of(false));
|
|
94316
|
+
}
|
|
94317
|
+
|
|
94318
|
+
if (singleLine && value) {
|
|
94319
|
+
value = value.toString().split('\n')[0];
|
|
94320
|
+
}
|
|
94321
|
+
|
|
94322
|
+
this._cmEditor = new EditorView({
|
|
94323
|
+
state: EditorState.create({
|
|
94324
|
+
doc: value,
|
|
94325
|
+
extensions: extensions
|
|
94326
|
+
}),
|
|
94327
|
+
parent: container
|
|
94328
|
+
});
|
|
94329
|
+
|
|
94330
|
+
return this;
|
|
94331
|
+
}
|
|
94332
|
+
|
|
94333
|
+
/**
|
|
94334
|
+
* Replaces the content of the Editor
|
|
94335
|
+
*
|
|
94336
|
+
* @param {String} value
|
|
94337
|
+
*/
|
|
94338
|
+
FeelersEditor.prototype.setValue = function(value) {
|
|
94339
|
+
this._cmEditor.dispatch({
|
|
94340
|
+
changes: {
|
|
94341
|
+
from: 0,
|
|
94342
|
+
to: this._cmEditor.state.doc.length,
|
|
94343
|
+
insert: value,
|
|
94344
|
+
}
|
|
94345
|
+
});
|
|
94346
|
+
};
|
|
94347
|
+
|
|
94348
|
+
/**
|
|
94349
|
+
* Sets the focus in the editor.
|
|
94350
|
+
*/
|
|
94351
|
+
FeelersEditor.prototype.focus = function(position) {
|
|
94352
|
+
const cmEditor = this._cmEditor;
|
|
94353
|
+
|
|
94354
|
+
// the Codemirror `focus` method always calls `focus` with `preventScroll`,
|
|
94355
|
+
// so we have to focus + scroll manually
|
|
94356
|
+
cmEditor.contentDOM.focus();
|
|
94357
|
+
cmEditor.focus();
|
|
94358
|
+
|
|
94359
|
+
if (typeof position === 'number') {
|
|
94360
|
+
const end = cmEditor.state.doc.length;
|
|
94361
|
+
cmEditor.dispatch({ selection: { anchor: position <= end ? position : end } });
|
|
94362
|
+
}
|
|
94363
|
+
};
|
|
94364
|
+
|
|
94365
|
+
/**
|
|
94366
|
+
* Returns the current selection ranges. If no text is selected, a single
|
|
94367
|
+
* range with the start and end index at the cursor position will be returned.
|
|
94368
|
+
*
|
|
94369
|
+
* @returns {Object} selection
|
|
94370
|
+
* @returns {Array} selection.ranges
|
|
94371
|
+
*/
|
|
94372
|
+
FeelersEditor.prototype.getSelection = function() {
|
|
94373
|
+
return this._cmEditor.state.selection;
|
|
94351
94374
|
};
|
|
94352
94375
|
|
|
94353
94376
|
/**
|
|
@@ -97182,6 +97205,21 @@
|
|
|
97182
97205
|
height: "16",
|
|
97183
97206
|
viewBox: "0 0 32 32"
|
|
97184
97207
|
};
|
|
97208
|
+
var CloseIcon = function CloseIcon(props) {
|
|
97209
|
+
return u("svg", {
|
|
97210
|
+
...props,
|
|
97211
|
+
children: u("path", {
|
|
97212
|
+
fillRule: "evenodd",
|
|
97213
|
+
d: "m12 4.7-.7-.7L8 7.3 4.7 4l-.7.7L7.3 8 4 11.3l.7.7L8 8.7l3.3 3.3.7-.7L8.7 8 12 4.7Z",
|
|
97214
|
+
fill: "currentColor"
|
|
97215
|
+
})
|
|
97216
|
+
});
|
|
97217
|
+
};
|
|
97218
|
+
CloseIcon.defaultProps = {
|
|
97219
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
97220
|
+
width: "16",
|
|
97221
|
+
height: "16"
|
|
97222
|
+
};
|
|
97185
97223
|
|
|
97186
97224
|
function Header(props) {
|
|
97187
97225
|
const {
|
|
@@ -97926,7 +97964,8 @@
|
|
|
97926
97964
|
tooltipContainer,
|
|
97927
97965
|
enableGutters,
|
|
97928
97966
|
hostLanguage,
|
|
97929
|
-
singleLine
|
|
97967
|
+
singleLine,
|
|
97968
|
+
lineWrap: true
|
|
97930
97969
|
});
|
|
97931
97970
|
setEditor(editor);
|
|
97932
97971
|
return () => {
|
|
@@ -97963,7 +98002,7 @@
|
|
|
97963
98002
|
title: "Open pop-up editor",
|
|
97964
98003
|
class: "bio-properties-panel-open-feel-popup",
|
|
97965
98004
|
onClick: () => onPopupOpen('feelers'),
|
|
97966
|
-
children: u(
|
|
98005
|
+
children: u(PopupIcon, {})
|
|
97967
98006
|
})]
|
|
97968
98007
|
});
|
|
97969
98008
|
});
|
|
@@ -98286,6 +98325,9 @@
|
|
|
98286
98325
|
draggable,
|
|
98287
98326
|
emit = () => {},
|
|
98288
98327
|
title,
|
|
98328
|
+
showCloseButton = false,
|
|
98329
|
+
closeButtonTooltip = 'Close popup',
|
|
98330
|
+
onClose,
|
|
98289
98331
|
...rest
|
|
98290
98332
|
} = props;
|
|
98291
98333
|
|
|
@@ -98356,7 +98398,12 @@
|
|
|
98356
98398
|
}), u("div", {
|
|
98357
98399
|
class: "bio-properties-panel-popup__title",
|
|
98358
98400
|
children: title
|
|
98359
|
-
}), children
|
|
98401
|
+
}), children, showCloseButton && u("button", {
|
|
98402
|
+
title: closeButtonTooltip,
|
|
98403
|
+
class: "bio-properties-panel-popup__close",
|
|
98404
|
+
onClick: onClose,
|
|
98405
|
+
children: u(CloseIcon, {})
|
|
98406
|
+
})]
|
|
98360
98407
|
});
|
|
98361
98408
|
}
|
|
98362
98409
|
function Body(props) {
|
|
@@ -98574,6 +98621,9 @@
|
|
|
98574
98621
|
children: [u(Popup.Title, {
|
|
98575
98622
|
title: title,
|
|
98576
98623
|
emit: emit,
|
|
98624
|
+
showCloseButton: true,
|
|
98625
|
+
closeButtonTooltip: "Save and close",
|
|
98626
|
+
onClose: onClose,
|
|
98577
98627
|
draggable: true,
|
|
98578
98628
|
children: [type === 'feel' && u("a", {
|
|
98579
98629
|
href: "https://docs.camunda.io/docs/components/modeler/feel/what-is-feel/",
|
|
@@ -98615,14 +98665,6 @@
|
|
|
98615
98665
|
tooltipContainer: tooltipContainer
|
|
98616
98666
|
})]
|
|
98617
98667
|
})
|
|
98618
|
-
}), u(Popup.Footer, {
|
|
98619
|
-
children: u("button", {
|
|
98620
|
-
type: "button",
|
|
98621
|
-
onClick: () => onClose(),
|
|
98622
|
-
title: "Close pop-up editor",
|
|
98623
|
-
class: "bio-properties-panel-feel-popup__close-btn",
|
|
98624
|
-
children: "Close"
|
|
98625
|
-
})
|
|
98626
98668
|
})]
|
|
98627
98669
|
});
|
|
98628
98670
|
}
|
|
@@ -99424,6 +99466,28 @@
|
|
|
99424
99466
|
});
|
|
99425
99467
|
}
|
|
99426
99468
|
|
|
99469
|
+
/**
|
|
99470
|
+
* @typedef { {
|
|
99471
|
+
* [key: string]: string;
|
|
99472
|
+
* } } TranslateReplacements
|
|
99473
|
+
*/
|
|
99474
|
+
|
|
99475
|
+
/**
|
|
99476
|
+
* A simple translation stub to be used for multi-language support.
|
|
99477
|
+
* Can be easily replaced with a more sophisticated solution.
|
|
99478
|
+
*
|
|
99479
|
+
* @param {string} template to interpolate
|
|
99480
|
+
* @param {TranslateReplacements} [replacements] a map with substitutes
|
|
99481
|
+
*
|
|
99482
|
+
* @return {string} the translated string
|
|
99483
|
+
*/
|
|
99484
|
+
function translateFallback(template, replacements) {
|
|
99485
|
+
replacements = replacements || {};
|
|
99486
|
+
return template.replace(/{([^}]+)}/g, function (_, key) {
|
|
99487
|
+
return replacements[key] || '{' + key + '}';
|
|
99488
|
+
});
|
|
99489
|
+
}
|
|
99490
|
+
|
|
99427
99491
|
function CollapsibleEntry(props) {
|
|
99428
99492
|
const {
|
|
99429
99493
|
element,
|
|
@@ -99431,7 +99495,8 @@
|
|
|
99431
99495
|
id,
|
|
99432
99496
|
label,
|
|
99433
99497
|
open: shouldOpen,
|
|
99434
|
-
remove
|
|
99498
|
+
remove,
|
|
99499
|
+
translate = translateFallback
|
|
99435
99500
|
} = props;
|
|
99436
99501
|
const [open, setOpen] = h(shouldOpen);
|
|
99437
99502
|
const toggleOpen = () => setOpen(!open);
|
|
@@ -99447,9 +99512,7 @@
|
|
|
99447
99512
|
}
|
|
99448
99513
|
}, [onShow, setOpen])
|
|
99449
99514
|
};
|
|
99450
|
-
|
|
99451
|
-
// todo(pinussilvestrus): translate once we have a translate mechanism for the core
|
|
99452
|
-
const placeholderLabel = '<empty>';
|
|
99515
|
+
const placeholderLabel = translate('<empty>');
|
|
99453
99516
|
return u("div", {
|
|
99454
99517
|
"data-entry-id": id,
|
|
99455
99518
|
class: classnames('bio-properties-panel-collapsible-entry', open ? 'open' : ''),
|
|
@@ -99462,14 +99525,14 @@
|
|
|
99462
99525
|
children: label || placeholderLabel
|
|
99463
99526
|
}), u("button", {
|
|
99464
99527
|
type: "button",
|
|
99465
|
-
title:
|
|
99528
|
+
title: translate('Toggle list item'),
|
|
99466
99529
|
class: "bio-properties-panel-arrow bio-properties-panel-collapsible-entry-arrow",
|
|
99467
99530
|
children: u(ArrowIcon, {
|
|
99468
99531
|
class: open ? 'bio-properties-panel-arrow-down' : 'bio-properties-panel-arrow-right'
|
|
99469
99532
|
})
|
|
99470
99533
|
}), remove ? u("button", {
|
|
99471
99534
|
type: "button",
|
|
99472
|
-
title:
|
|
99535
|
+
title: translate('Delete item'),
|
|
99473
99536
|
class: "bio-properties-panel-remove-entry",
|
|
99474
99537
|
onClick: remove,
|
|
99475
99538
|
children: u(DeleteIcon, {})
|
|
@@ -99497,7 +99560,8 @@
|
|
|
99497
99560
|
function ListItem$1(props) {
|
|
99498
99561
|
const {
|
|
99499
99562
|
autoFocusEntry,
|
|
99500
|
-
autoOpen
|
|
99563
|
+
autoOpen,
|
|
99564
|
+
translate = translateFallback
|
|
99501
99565
|
} = props;
|
|
99502
99566
|
|
|
99503
99567
|
// focus specified entry on auto open
|
|
@@ -99519,7 +99583,8 @@
|
|
|
99519
99583
|
class: "bio-properties-panel-list-item",
|
|
99520
99584
|
children: u(CollapsibleEntry, {
|
|
99521
99585
|
...props,
|
|
99522
|
-
open: autoOpen
|
|
99586
|
+
open: autoOpen,
|
|
99587
|
+
translate: translate
|
|
99523
99588
|
})
|
|
99524
99589
|
});
|
|
99525
99590
|
}
|
|
@@ -99536,7 +99601,8 @@
|
|
|
99536
99601
|
id,
|
|
99537
99602
|
items,
|
|
99538
99603
|
label,
|
|
99539
|
-
shouldOpen = true
|
|
99604
|
+
shouldOpen = true,
|
|
99605
|
+
translate = translateFallback
|
|
99540
99606
|
} = props;
|
|
99541
99607
|
p$1(() => {
|
|
99542
99608
|
if (props.shouldSort != undefined) {
|
|
@@ -99638,20 +99704,22 @@
|
|
|
99638
99704
|
class: "bio-properties-panel-group-header-buttons",
|
|
99639
99705
|
children: [add ? u("button", {
|
|
99640
99706
|
type: "button",
|
|
99641
|
-
title:
|
|
99707
|
+
title: translate('Create new list item'),
|
|
99642
99708
|
class: "bio-properties-panel-group-header-button bio-properties-panel-add-entry",
|
|
99643
99709
|
onClick: handleAddClick,
|
|
99644
99710
|
children: [u(CreateIcon, {}), !hasItems ? u("span", {
|
|
99645
99711
|
class: "bio-properties-panel-add-entry-label",
|
|
99646
|
-
children:
|
|
99712
|
+
children: translate('Create')
|
|
99647
99713
|
}) : null]
|
|
99648
99714
|
}) : null, hasItems ? u("div", {
|
|
99649
|
-
title: `List contains
|
|
99715
|
+
title: translate(`List contains {numOfItems} item${items.length != 1 ? 's' : ''}`, {
|
|
99716
|
+
numOfItems: items.length
|
|
99717
|
+
}),
|
|
99650
99718
|
class: classnames('bio-properties-panel-list-badge', hasError ? 'bio-properties-panel-list-badge--error' : ''),
|
|
99651
99719
|
children: items.length
|
|
99652
99720
|
}) : null, hasItems ? u("button", {
|
|
99653
99721
|
type: "button",
|
|
99654
|
-
title:
|
|
99722
|
+
title: translate('Toggle section'),
|
|
99655
99723
|
class: "bio-properties-panel-group-header-button bio-properties-panel-arrow",
|
|
99656
99724
|
children: u(ArrowIcon, {
|
|
99657
99725
|
class: open ? 'bio-properties-panel-arrow-down' : 'bio-properties-panel-arrow-right'
|
|
@@ -99678,7 +99746,8 @@
|
|
|
99678
99746
|
autoOpen: autoOpen,
|
|
99679
99747
|
element: element,
|
|
99680
99748
|
index: index,
|
|
99681
|
-
key: id
|
|
99749
|
+
key: id,
|
|
99750
|
+
translate: translate
|
|
99682
99751
|
});
|
|
99683
99752
|
})
|
|
99684
99753
|
})
|