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
|
@@ -1334,6 +1334,31 @@ textarea.bio-properties-panel-input {
|
|
|
1334
1334
|
text-transform: capitalize;
|
|
1335
1335
|
}
|
|
1336
1336
|
|
|
1337
|
+
.bio-properties-panel-popup .bio-properties-panel-popup__close {
|
|
1338
|
+
margin: -12px;
|
|
1339
|
+
margin-left: 12px;
|
|
1340
|
+
width: 40px;
|
|
1341
|
+
height: 40px;
|
|
1342
|
+
border: none;
|
|
1343
|
+
background-color: var(--popup-header-background-color);
|
|
1344
|
+
}
|
|
1345
|
+
|
|
1346
|
+
.bio-properties-panel-popup .bio-properties-panel-popup__close:hover,
|
|
1347
|
+
.bio-properties-panel-popup .bio-properties-panel-popup__close:focus-visible {
|
|
1348
|
+
background-color: var(--popup-background-color);
|
|
1349
|
+
}
|
|
1350
|
+
|
|
1351
|
+
.bio-properties-panel-popup .bio-properties-panel-popup__close:focus-visible {
|
|
1352
|
+
outline-offset: -2px;
|
|
1353
|
+
}
|
|
1354
|
+
|
|
1355
|
+
.bio-properties-panel-popup .bio-properties-panel-popup__close svg {
|
|
1356
|
+
width: 16px;
|
|
1357
|
+
height: 16px;
|
|
1358
|
+
fill: currentColor;
|
|
1359
|
+
margin-top: 2px;
|
|
1360
|
+
}
|
|
1361
|
+
|
|
1337
1362
|
.bio-properties-panel-popup .bio-properties-panel-popup__header .bio-properties-panel-popup__drag-handle svg {
|
|
1338
1363
|
margin-left: -4px;
|
|
1339
1364
|
}
|
|
@@ -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
|
/**
|
|
@@ -97154,6 +97177,21 @@
|
|
|
97154
97177
|
height: "16",
|
|
97155
97178
|
viewBox: "0 0 32 32"
|
|
97156
97179
|
};
|
|
97180
|
+
var CloseIcon = function CloseIcon(props) {
|
|
97181
|
+
return u("svg", {
|
|
97182
|
+
...props,
|
|
97183
|
+
children: u("path", {
|
|
97184
|
+
fillRule: "evenodd",
|
|
97185
|
+
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",
|
|
97186
|
+
fill: "currentColor"
|
|
97187
|
+
})
|
|
97188
|
+
});
|
|
97189
|
+
};
|
|
97190
|
+
CloseIcon.defaultProps = {
|
|
97191
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
97192
|
+
width: "16",
|
|
97193
|
+
height: "16"
|
|
97194
|
+
};
|
|
97157
97195
|
|
|
97158
97196
|
function Header(props) {
|
|
97159
97197
|
const {
|
|
@@ -97864,7 +97902,8 @@
|
|
|
97864
97902
|
tooltipContainer,
|
|
97865
97903
|
enableGutters,
|
|
97866
97904
|
hostLanguage,
|
|
97867
|
-
singleLine
|
|
97905
|
+
singleLine,
|
|
97906
|
+
lineWrap: true
|
|
97868
97907
|
});
|
|
97869
97908
|
setEditor(editor);
|
|
97870
97909
|
return () => {
|
|
@@ -97901,7 +97940,7 @@
|
|
|
97901
97940
|
title: "Open pop-up editor",
|
|
97902
97941
|
class: "bio-properties-panel-open-feel-popup",
|
|
97903
97942
|
onClick: () => onPopupOpen('feelers'),
|
|
97904
|
-
children: u(
|
|
97943
|
+
children: u(PopupIcon, {})
|
|
97905
97944
|
})]
|
|
97906
97945
|
});
|
|
97907
97946
|
});
|
|
@@ -98224,6 +98263,9 @@
|
|
|
98224
98263
|
draggable,
|
|
98225
98264
|
emit = () => {},
|
|
98226
98265
|
title,
|
|
98266
|
+
showCloseButton = false,
|
|
98267
|
+
closeButtonTooltip = 'Close popup',
|
|
98268
|
+
onClose,
|
|
98227
98269
|
...rest
|
|
98228
98270
|
} = props;
|
|
98229
98271
|
|
|
@@ -98294,7 +98336,12 @@
|
|
|
98294
98336
|
}), u("div", {
|
|
98295
98337
|
class: "bio-properties-panel-popup__title",
|
|
98296
98338
|
children: title
|
|
98297
|
-
}), children
|
|
98339
|
+
}), children, showCloseButton && u("button", {
|
|
98340
|
+
title: closeButtonTooltip,
|
|
98341
|
+
class: "bio-properties-panel-popup__close",
|
|
98342
|
+
onClick: onClose,
|
|
98343
|
+
children: u(CloseIcon, {})
|
|
98344
|
+
})]
|
|
98298
98345
|
});
|
|
98299
98346
|
}
|
|
98300
98347
|
function Body(props) {
|
|
@@ -98512,6 +98559,9 @@
|
|
|
98512
98559
|
children: [u(Popup.Title, {
|
|
98513
98560
|
title: title,
|
|
98514
98561
|
emit: emit,
|
|
98562
|
+
showCloseButton: true,
|
|
98563
|
+
closeButtonTooltip: "Save and close",
|
|
98564
|
+
onClose: onClose,
|
|
98515
98565
|
draggable: true,
|
|
98516
98566
|
children: [type === 'feel' && u("a", {
|
|
98517
98567
|
href: "https://docs.camunda.io/docs/components/modeler/feel/what-is-feel/",
|
|
@@ -98553,14 +98603,6 @@
|
|
|
98553
98603
|
tooltipContainer: tooltipContainer
|
|
98554
98604
|
})]
|
|
98555
98605
|
})
|
|
98556
|
-
}), u(Popup.Footer, {
|
|
98557
|
-
children: u("button", {
|
|
98558
|
-
type: "button",
|
|
98559
|
-
onClick: () => onClose(),
|
|
98560
|
-
title: "Close pop-up editor",
|
|
98561
|
-
class: "bio-properties-panel-feel-popup__close-btn",
|
|
98562
|
-
children: "Close"
|
|
98563
|
-
})
|
|
98564
98606
|
})]
|
|
98565
98607
|
});
|
|
98566
98608
|
}
|