camunda-bpmn-js 5.12.0 → 5.13.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/LICENSE +20 -20
- package/README.md +88 -88
- package/dist/assets/base-modeler.css +5 -5
- package/dist/assets/base-navigated-viewer.css +1 -1
- package/dist/assets/base-viewer.css +1 -1
- package/dist/assets/camunda-cloud-modeler.css +2 -2
- package/dist/assets/camunda-platform-modeler.css +1 -1
- package/dist/base-modeler.development.js +2072 -540
- package/dist/base-modeler.production.min.js +32 -32
- package/dist/camunda-cloud-modeler.development.js +2424 -892
- package/dist/camunda-cloud-modeler.production.min.js +29 -29
- package/dist/camunda-cloud-navigated-viewer.development.js +40 -40
- package/dist/camunda-cloud-viewer.development.js +40 -40
- package/dist/camunda-platform-modeler.development.js +2517 -985
- package/dist/camunda-platform-modeler.production.min.js +29 -29
- package/dist/camunda-platform-navigated-viewer.development.js +27 -27
- package/dist/camunda-platform-viewer.development.js +27 -27
- package/lib/base/Modeler.d.ts +20 -20
- package/lib/base/Modeler.js +65 -65
- package/lib/base/NavigatedViewer.d.ts +2 -2
- package/lib/base/NavigatedViewer.js +2 -2
- package/lib/base/Viewer.d.ts +2 -2
- package/lib/base/Viewer.js +2 -2
- package/lib/camunda-cloud/ElementTemplatesValidator.d.ts +1 -1
- package/lib/camunda-cloud/Modeler.d.ts +3 -3
- package/lib/camunda-cloud/NavigatedViewer.d.ts +9 -9
- package/lib/camunda-cloud/NavigatedViewer.js +36 -36
- package/lib/camunda-cloud/Viewer.d.ts +9 -9
- package/lib/camunda-cloud/Viewer.js +36 -36
- package/lib/camunda-cloud/features/external-resources/ResourceLoader.d.ts +6 -6
- package/lib/camunda-cloud/features/external-resources/Resources.d.ts +7 -7
- package/lib/camunda-cloud/features/external-resources/cmd/ComposedCommandHandler.d.ts +12 -12
- package/lib/camunda-cloud/features/external-resources/cmd/index.d.ts +4 -4
- package/lib/camunda-cloud/features/external-resources/handlers/decision/AppendMenuProvider.d.ts +5 -5
- package/lib/camunda-cloud/features/external-resources/handlers/decision/CreateMenuProvider.d.ts +5 -5
- package/lib/camunda-cloud/features/external-resources/handlers/decision/ReplaceMenuProvider.d.ts +5 -5
- package/lib/camunda-cloud/features/external-resources/handlers/decision/createElement.d.ts +13 -13
- package/lib/camunda-cloud/features/external-resources/handlers/decision/index.d.ts +8 -8
- package/lib/camunda-cloud/features/external-resources/handlers/decision/replaceElement.d.ts +15 -15
- package/lib/camunda-cloud/features/external-resources/handlers/decision/searchTerms.d.ts +1 -1
- package/lib/camunda-cloud/features/external-resources/handlers/form/AppendMenuProvider.d.ts +5 -5
- package/lib/camunda-cloud/features/external-resources/handlers/form/CreateMenuProvider.d.ts +5 -5
- package/lib/camunda-cloud/features/external-resources/handlers/form/ReplaceMenuProvider.d.ts +5 -5
- package/lib/camunda-cloud/features/external-resources/handlers/form/createElement.d.ts +9 -9
- package/lib/camunda-cloud/features/external-resources/handlers/form/index.d.ts +8 -8
- package/lib/camunda-cloud/features/external-resources/handlers/form/replaceElement.d.ts +15 -15
- package/lib/camunda-cloud/features/external-resources/handlers/form/searchTerms.d.ts +1 -1
- package/lib/camunda-cloud/features/external-resources/handlers/process/AppendMenuProvider.d.ts +5 -5
- package/lib/camunda-cloud/features/external-resources/handlers/process/CreateMenuProvider.d.ts +5 -5
- package/lib/camunda-cloud/features/external-resources/handlers/process/ReplaceMenuProvider.d.ts +5 -5
- package/lib/camunda-cloud/features/external-resources/handlers/process/createElement.d.ts +14 -14
- package/lib/camunda-cloud/features/external-resources/handlers/process/index.d.ts +8 -8
- package/lib/camunda-cloud/features/external-resources/handlers/process/replaceElement.d.ts +16 -16
- package/lib/camunda-cloud/features/external-resources/handlers/process/searchTerms.d.ts +1 -1
- package/lib/camunda-cloud/features/external-resources/handlers/util/BaseAppendMenuProvider.d.ts +18 -18
- package/lib/camunda-cloud/features/external-resources/handlers/util/BaseCreateMenuProvider.d.ts +17 -17
- package/lib/camunda-cloud/features/external-resources/handlers/util/BaseReplaceMenuProvider.d.ts +22 -22
- package/lib/camunda-cloud/features/external-resources/index.d.ts +23 -23
- package/lib/camunda-cloud/features/popup-menu/CamundaDetailsPopupMenuProvider.d.ts +26 -26
- package/lib/camunda-cloud/features/popup-menu/CamundaDetailsPopupMenuProvider.js +153 -153
- package/lib/camunda-cloud/features/popup-menu/index.d.ts +6 -6
- package/lib/camunda-cloud/util/commonModules.d.ts +9 -9
- package/lib/camunda-cloud/util/commonModules.js +15 -15
- package/lib/camunda-platform/Modeler.d.ts +3 -3
- package/lib/camunda-platform/Modeler.js +68 -68
- package/lib/camunda-platform/NavigatedViewer.d.ts +9 -9
- package/lib/camunda-platform/NavigatedViewer.js +27 -27
- package/lib/camunda-platform/Viewer.d.ts +9 -9
- package/lib/camunda-platform/Viewer.js +27 -27
- package/lib/camunda-platform/util/commonModules.d.ts +9 -9
- package/lib/camunda-platform/util/commonModules.js +11 -11
- package/lib/util/ExtensionElementsUtil.d.ts +24 -24
- package/lib/util/ExtensionElementsUtil.js +68 -68
- package/package.json +141 -141
- package/styles/base-modeler.css +5 -5
- package/styles/base-navigated-viewer.css +1 -1
- package/styles/base-viewer.css +1 -1
- package/styles/camunda-cloud-modeler.css +2 -2
- package/styles/camunda-platform-modeler.css +1 -1
|
@@ -9277,7 +9277,7 @@
|
|
|
9277
9277
|
*
|
|
9278
9278
|
* @return {Object} the parsed name
|
|
9279
9279
|
*/
|
|
9280
|
-
function parseName$
|
|
9280
|
+
function parseName$3(name, defaultPrefix) {
|
|
9281
9281
|
var parts = name.split(/:/),
|
|
9282
9282
|
localName, prefix;
|
|
9283
9283
|
|
|
@@ -9413,8 +9413,8 @@
|
|
|
9413
9413
|
var nsPrefix = p.ns.prefix;
|
|
9414
9414
|
var parts = targetPropertyName.split('#');
|
|
9415
9415
|
|
|
9416
|
-
var name = parseName$
|
|
9417
|
-
var attrName = parseName$
|
|
9416
|
+
var name = parseName$3(parts[0], nsPrefix);
|
|
9417
|
+
var attrName = parseName$3(parts[1], name.prefix).name;
|
|
9418
9418
|
|
|
9419
9419
|
var redefinedProperty = this.propertiesByName[attrName];
|
|
9420
9420
|
if (!redefinedProperty) {
|
|
@@ -9602,7 +9602,7 @@
|
|
|
9602
9602
|
meta: assign$3((type.meta || {}))
|
|
9603
9603
|
});
|
|
9604
9604
|
|
|
9605
|
-
var ns = parseName$
|
|
9605
|
+
var ns = parseName$3(type.name, pkg.prefix),
|
|
9606
9606
|
name = ns.name,
|
|
9607
9607
|
propertiesByName = {};
|
|
9608
9608
|
|
|
@@ -9610,12 +9610,12 @@
|
|
|
9610
9610
|
forEach$3(type.properties, bind$3(function(p) {
|
|
9611
9611
|
|
|
9612
9612
|
// namespace property names
|
|
9613
|
-
var propertyNs = parseName$
|
|
9613
|
+
var propertyNs = parseName$3(p.name, ns.prefix),
|
|
9614
9614
|
propertyName = propertyNs.name;
|
|
9615
9615
|
|
|
9616
9616
|
// namespace property types
|
|
9617
9617
|
if (!isBuiltIn$1(p.type)) {
|
|
9618
|
-
p.type = parseName$
|
|
9618
|
+
p.type = parseName$3(p.type, propertyNs.prefix).name;
|
|
9619
9619
|
}
|
|
9620
9620
|
|
|
9621
9621
|
assign$3(p, {
|
|
@@ -9634,7 +9634,7 @@
|
|
|
9634
9634
|
});
|
|
9635
9635
|
|
|
9636
9636
|
forEach$3(type.extends, bind$3(function(extendsName) {
|
|
9637
|
-
var extendsNameNs = parseName$
|
|
9637
|
+
var extendsNameNs = parseName$3(extendsName, ns.prefix);
|
|
9638
9638
|
|
|
9639
9639
|
var extended = this.typeMap[extendsNameNs.name];
|
|
9640
9640
|
|
|
@@ -9672,7 +9672,7 @@
|
|
|
9672
9672
|
* @param {Boolean} [trait=false]
|
|
9673
9673
|
*/
|
|
9674
9674
|
function traverse(cls, trait) {
|
|
9675
|
-
var parentNs = parseName$
|
|
9675
|
+
var parentNs = parseName$3(cls, isBuiltIn$1(cls) ? '' : nsName.prefix);
|
|
9676
9676
|
self.mapTypes(parentNs, iterator, trait);
|
|
9677
9677
|
}
|
|
9678
9678
|
|
|
@@ -9716,7 +9716,7 @@
|
|
|
9716
9716
|
*/
|
|
9717
9717
|
Registry$1.prototype.getEffectiveDescriptor = function(name) {
|
|
9718
9718
|
|
|
9719
|
-
var nsName = parseName$
|
|
9719
|
+
var nsName = parseName$3(name);
|
|
9720
9720
|
|
|
9721
9721
|
var builder = new DescriptorBuilder$1(nsName);
|
|
9722
9722
|
|
|
@@ -10048,7 +10048,7 @@
|
|
|
10048
10048
|
*/
|
|
10049
10049
|
Moddle$1.prototype.createAny = function(name, nsUri, properties) {
|
|
10050
10050
|
|
|
10051
|
-
var nameNs = parseName$
|
|
10051
|
+
var nameNs = parseName$3(name);
|
|
10052
10052
|
|
|
10053
10053
|
var element = {
|
|
10054
10054
|
$type: name,
|
|
@@ -11246,11 +11246,11 @@
|
|
|
11246
11246
|
function normalizeTypeName$1(name, nsMap, model) {
|
|
11247
11247
|
|
|
11248
11248
|
// normalize against actual NS
|
|
11249
|
-
const nameNs = parseName$
|
|
11249
|
+
const nameNs = parseName$3(name, nsMap.xmlns);
|
|
11250
11250
|
|
|
11251
11251
|
const normalizedName = `${ nsMap[nameNs.prefix] || nameNs.prefix }:${ nameNs.localName }`;
|
|
11252
11252
|
|
|
11253
|
-
const normalizedNameNs = parseName$
|
|
11253
|
+
const normalizedNameNs = parseName$3(normalizedName);
|
|
11254
11254
|
|
|
11255
11255
|
// determine actual type name, based on package-defined prefix
|
|
11256
11256
|
var pkg = model.getPackage(normalizedNameNs.prefix);
|
|
@@ -11283,7 +11283,7 @@
|
|
|
11283
11283
|
* @param {ElementHandler} options.rootHandler the root handler for parsing a document
|
|
11284
11284
|
* @param {boolean} [options.lax=false] whether or not to ignore invalid elements
|
|
11285
11285
|
*/
|
|
11286
|
-
function Context$
|
|
11286
|
+
function Context$3(options) {
|
|
11287
11287
|
|
|
11288
11288
|
/**
|
|
11289
11289
|
* @property {ElementHandler} rootHandler
|
|
@@ -11547,7 +11547,7 @@
|
|
|
11547
11547
|
} else if (name === 'xmlns') {
|
|
11548
11548
|
name = ':' + name;
|
|
11549
11549
|
} else {
|
|
11550
|
-
propNameNs = parseName$
|
|
11550
|
+
propNameNs = parseName$3(name, descriptor.ns.prefix);
|
|
11551
11551
|
|
|
11552
11552
|
// check whether attribute is defined in a well-known namespace
|
|
11553
11553
|
// if that is the case we emit a warning to indicate potential misuse
|
|
@@ -11572,7 +11572,7 @@
|
|
|
11572
11572
|
ElementHandler$1.prototype.getPropertyForNode = function(node) {
|
|
11573
11573
|
|
|
11574
11574
|
var name = node.name;
|
|
11575
|
-
var nameNs = parseName$
|
|
11575
|
+
var nameNs = parseName$3(name);
|
|
11576
11576
|
|
|
11577
11577
|
var type = this.type,
|
|
11578
11578
|
model = this.model,
|
|
@@ -11731,7 +11731,7 @@
|
|
|
11731
11731
|
RootElementHandler$1.prototype.createElement = function(node) {
|
|
11732
11732
|
|
|
11733
11733
|
var name = node.name,
|
|
11734
|
-
nameNs = parseName$
|
|
11734
|
+
nameNs = parseName$3(name),
|
|
11735
11735
|
model = this.model,
|
|
11736
11736
|
type = this.type,
|
|
11737
11737
|
pkg = model.getPackage(nameNs.prefix),
|
|
@@ -11759,7 +11759,7 @@
|
|
|
11759
11759
|
GenericElementHandler$1.prototype.createElement = function(node) {
|
|
11760
11760
|
|
|
11761
11761
|
var name = node.name,
|
|
11762
|
-
ns = parseName$
|
|
11762
|
+
ns = parseName$3(name),
|
|
11763
11763
|
prefix = ns.prefix,
|
|
11764
11764
|
uri = node.ns[prefix + '$uri'],
|
|
11765
11765
|
attributes = node.attributes;
|
|
@@ -11862,7 +11862,7 @@
|
|
|
11862
11862
|
var model = this.model,
|
|
11863
11863
|
lax = this.lax;
|
|
11864
11864
|
|
|
11865
|
-
var context = new Context$
|
|
11865
|
+
var context = new Context$3(assign$3({}, options, { rootHandler: rootHandler })),
|
|
11866
11866
|
parser = new Parser$2({ proxy: true }),
|
|
11867
11867
|
stack = createStack$1();
|
|
11868
11868
|
|
|
@@ -12488,7 +12488,7 @@
|
|
|
12488
12488
|
var ns;
|
|
12489
12489
|
|
|
12490
12490
|
if (isString(element)) {
|
|
12491
|
-
ns = parseName$
|
|
12491
|
+
ns = parseName$3(element);
|
|
12492
12492
|
} else {
|
|
12493
12493
|
ns = element.ns;
|
|
12494
12494
|
}
|
|
@@ -12540,7 +12540,7 @@
|
|
|
12540
12540
|
ElementSerializer$1.prototype.parseNsAttribute = function(element, name, value) {
|
|
12541
12541
|
var model = element.$model;
|
|
12542
12542
|
|
|
12543
|
-
var nameNs = parseName$
|
|
12543
|
+
var nameNs = parseName$3(name);
|
|
12544
12544
|
|
|
12545
12545
|
var ns;
|
|
12546
12546
|
|
|
@@ -26972,7 +26972,7 @@
|
|
|
26972
26972
|
* @typedef { 'top' | 'right' | 'bottom' | 'left' | 'center' | 'middle' } Alignment
|
|
26973
26973
|
*/
|
|
26974
26974
|
|
|
26975
|
-
function last$
|
|
26975
|
+
function last$2(arr) {
|
|
26976
26976
|
return arr && arr[arr.length - 1];
|
|
26977
26977
|
}
|
|
26978
26978
|
|
|
@@ -27071,7 +27071,7 @@
|
|
|
27071
27071
|
alignment[type] = sortedElements[0][axis];
|
|
27072
27072
|
|
|
27073
27073
|
} else if (this._isType(type, [ 'right', 'bottom' ])) {
|
|
27074
|
-
lastElement = last$
|
|
27074
|
+
lastElement = last$2(sortedElements);
|
|
27075
27075
|
|
|
27076
27076
|
alignment[type] = lastElement[axis] + lastElement[dimension];
|
|
27077
27077
|
|
|
@@ -27101,7 +27101,7 @@
|
|
|
27101
27101
|
});
|
|
27102
27102
|
|
|
27103
27103
|
if (hasSharedCenters) {
|
|
27104
|
-
alignment[type] = last$
|
|
27104
|
+
alignment[type] = last$2(centeredElements).center;
|
|
27105
27105
|
|
|
27106
27106
|
return alignment;
|
|
27107
27107
|
}
|
|
@@ -27112,7 +27112,7 @@
|
|
|
27112
27112
|
return element[axis] + element[dimension];
|
|
27113
27113
|
});
|
|
27114
27114
|
|
|
27115
|
-
lastElement = last$
|
|
27115
|
+
lastElement = last$2(sortedElements);
|
|
27116
27116
|
|
|
27117
27117
|
alignment[type] = getMiddleOrTop(firstElement, lastElement);
|
|
27118
27118
|
}
|
|
@@ -64172,7 +64172,7 @@
|
|
|
64172
64172
|
});
|
|
64173
64173
|
|
|
64174
64174
|
keyboard && keyboard.addListener(HIGH_PRIORITY$5, function(e) {
|
|
64175
|
-
if (!isSpace$
|
|
64175
|
+
if (!isSpace$2(e.keyEvent) || self.isActive()) {
|
|
64176
64176
|
return;
|
|
64177
64177
|
}
|
|
64178
64178
|
|
|
@@ -64182,7 +64182,7 @@
|
|
|
64182
64182
|
}, 'keyboard.keydown');
|
|
64183
64183
|
|
|
64184
64184
|
keyboard && keyboard.addListener(HIGH_PRIORITY$5, function(e) {
|
|
64185
|
-
if (!isSpace$
|
|
64185
|
+
if (!isSpace$2(e.keyEvent) || !self.isActive()) {
|
|
64186
64186
|
return;
|
|
64187
64187
|
}
|
|
64188
64188
|
|
|
@@ -64302,7 +64302,7 @@
|
|
|
64302
64302
|
|
|
64303
64303
|
// helpers //////////
|
|
64304
64304
|
|
|
64305
|
-
function isSpace$
|
|
64305
|
+
function isSpace$2(keyEvent) {
|
|
64306
64306
|
return isKey$1('Space', keyEvent);
|
|
64307
64307
|
}
|
|
64308
64308
|
|
|
@@ -74053,74 +74053,74 @@
|
|
|
74053
74053
|
]);
|
|
74054
74054
|
|
|
74055
74055
|
// This file was generated by lezer-generator. You probably shouldn't edit it.
|
|
74056
|
-
const propertyIdentifier = 121,
|
|
74057
|
-
identifier = 122,
|
|
74058
|
-
nameIdentifier = 123,
|
|
74059
|
-
insertSemi = 124,
|
|
74060
|
-
expression0 = 128,
|
|
74061
|
-
ForExpression = 4,
|
|
74062
|
-
forExpressionStart = 131,
|
|
74063
|
-
ForInExpression = 7,
|
|
74064
|
-
Name$
|
|
74065
|
-
Identifier = 9,
|
|
74066
|
-
AdditionalIdentifier = 10,
|
|
74067
|
-
forExpressionBodyStart = 139,
|
|
74068
|
-
IfExpression = 19,
|
|
74069
|
-
ifExpressionStart = 140,
|
|
74070
|
-
QuantifiedExpression = 23,
|
|
74071
|
-
quantifiedExpressionStart = 141,
|
|
74072
|
-
QuantifiedInExpression = 27,
|
|
74073
|
-
PositiveUnaryTest = 37,
|
|
74074
|
-
ArithmeticExpression = 41,
|
|
74075
|
-
arithmeticPlusStart = 145,
|
|
74076
|
-
arithmeticTimesStart = 146,
|
|
74077
|
-
arithmeticExpStart = 147,
|
|
74078
|
-
arithmeticUnaryStart = 148,
|
|
74079
|
-
VariableName$
|
|
74080
|
-
PathExpression = 68,
|
|
74081
|
-
pathExpressionStart = 154,
|
|
74082
|
-
FilterExpression = 70,
|
|
74083
|
-
filterExpressionStart = 155,
|
|
74084
|
-
FunctionInvocation = 72,
|
|
74085
|
-
functionInvocationStart = 156,
|
|
74086
|
-
ParameterName = 76,
|
|
74087
|
-
nil = 161,
|
|
74088
|
-
NumericLiteral = 79,
|
|
74089
|
-
StringLiteral = 80,
|
|
74090
|
-
BooleanLiteral = 81,
|
|
74091
|
-
listStart = 167,
|
|
74092
|
-
List$
|
|
74093
|
-
FunctionDefinition = 90,
|
|
74094
|
-
functionDefinitionStart = 169,
|
|
74095
|
-
Context$
|
|
74096
|
-
contextStart = 171,
|
|
74097
|
-
ContextEntry = 98,
|
|
74098
|
-
PropertyName = 100,
|
|
74099
|
-
PropertyIdentifier = 101;
|
|
74056
|
+
const propertyIdentifier$1 = 121,
|
|
74057
|
+
identifier$1 = 122,
|
|
74058
|
+
nameIdentifier$1 = 123,
|
|
74059
|
+
insertSemi$1 = 124,
|
|
74060
|
+
expression0$1 = 128,
|
|
74061
|
+
ForExpression$1 = 4,
|
|
74062
|
+
forExpressionStart$1 = 131,
|
|
74063
|
+
ForInExpression$1 = 7,
|
|
74064
|
+
Name$5 = 8,
|
|
74065
|
+
Identifier$1 = 9,
|
|
74066
|
+
AdditionalIdentifier$1 = 10,
|
|
74067
|
+
forExpressionBodyStart$1 = 139,
|
|
74068
|
+
IfExpression$1 = 19,
|
|
74069
|
+
ifExpressionStart$1 = 140,
|
|
74070
|
+
QuantifiedExpression$1 = 23,
|
|
74071
|
+
quantifiedExpressionStart$1 = 141,
|
|
74072
|
+
QuantifiedInExpression$1 = 27,
|
|
74073
|
+
PositiveUnaryTest$1 = 37,
|
|
74074
|
+
ArithmeticExpression$1 = 41,
|
|
74075
|
+
arithmeticPlusStart$1 = 145,
|
|
74076
|
+
arithmeticTimesStart$1 = 146,
|
|
74077
|
+
arithmeticExpStart$1 = 147,
|
|
74078
|
+
arithmeticUnaryStart$1 = 148,
|
|
74079
|
+
VariableName$2 = 47,
|
|
74080
|
+
PathExpression$1 = 68,
|
|
74081
|
+
pathExpressionStart$1 = 154,
|
|
74082
|
+
FilterExpression$1 = 70,
|
|
74083
|
+
filterExpressionStart$1 = 155,
|
|
74084
|
+
FunctionInvocation$1 = 72,
|
|
74085
|
+
functionInvocationStart$1 = 156,
|
|
74086
|
+
ParameterName$1 = 76,
|
|
74087
|
+
nil$1 = 161,
|
|
74088
|
+
NumericLiteral$1 = 79,
|
|
74089
|
+
StringLiteral$1 = 80,
|
|
74090
|
+
BooleanLiteral$1 = 81,
|
|
74091
|
+
listStart$1 = 167,
|
|
74092
|
+
List$2 = 89,
|
|
74093
|
+
FunctionDefinition$1 = 90,
|
|
74094
|
+
functionDefinitionStart$1 = 169,
|
|
74095
|
+
Context$2 = 97,
|
|
74096
|
+
contextStart$1 = 171,
|
|
74097
|
+
ContextEntry$1 = 98,
|
|
74098
|
+
PropertyName$1 = 100,
|
|
74099
|
+
PropertyIdentifier$1 = 101;
|
|
74100
74100
|
|
|
74101
74101
|
/* global console,process */
|
|
74102
74102
|
|
|
74103
74103
|
|
|
74104
74104
|
// @ts-expect-error env access
|
|
74105
|
-
const LOG_PARSE = typeof process != 'undefined' && process.env && /\bfparse(:dbg)?\b/.test(process.env.LOG);
|
|
74105
|
+
const LOG_PARSE$1 = typeof process != 'undefined' && process.env && /\bfparse(:dbg)?\b/.test(process.env.LOG);
|
|
74106
74106
|
|
|
74107
74107
|
// @ts-expect-error env access
|
|
74108
|
-
const LOG_PARSE_DEBUG = typeof process != 'undefined' && process.env && /\bfparse:dbg\b/.test(process.env.LOG);
|
|
74108
|
+
const LOG_PARSE_DEBUG$1 = typeof process != 'undefined' && process.env && /\bfparse:dbg\b/.test(process.env.LOG);
|
|
74109
74109
|
|
|
74110
74110
|
// @ts-expect-error env access
|
|
74111
|
-
const LOG_VARS = typeof process != 'undefined' && process.env && /\bcontext\b/.test(process.env.LOG);
|
|
74111
|
+
const LOG_VARS$1 = typeof process != 'undefined' && process.env && /\bcontext\b/.test(process.env.LOG);
|
|
74112
74112
|
|
|
74113
|
-
const spaceChars = [
|
|
74113
|
+
const spaceChars$1 = [
|
|
74114
74114
|
9, 11, 12, 32, 133, 160,
|
|
74115
74115
|
5760, 8192, 8193, 8194, 8195, 8196, 8197, 8198,
|
|
74116
74116
|
8199, 8200, 8201, 8202, 8232, 8233, 8239, 8287, 12288
|
|
74117
74117
|
];
|
|
74118
74118
|
|
|
74119
|
-
const newlineChars = chars('\n\r');
|
|
74119
|
+
const newlineChars$1 = chars$1('\n\r');
|
|
74120
74120
|
|
|
74121
|
-
const asterix = '*'.charCodeAt(0);
|
|
74121
|
+
const asterix$1 = '*'.charCodeAt(0);
|
|
74122
74122
|
|
|
74123
|
-
const additionalNameChars = chars("'./-+*^");
|
|
74123
|
+
const additionalNameChars$1 = chars$1("'./-+*^");
|
|
74124
74124
|
|
|
74125
74125
|
/**
|
|
74126
74126
|
* @typedef { VariableContext | any } ContextValue
|
|
@@ -74130,7 +74130,7 @@
|
|
|
74130
74130
|
* @param { string } str
|
|
74131
74131
|
* @return { number[] }
|
|
74132
74132
|
*/
|
|
74133
|
-
function chars(str) {
|
|
74133
|
+
function chars$1(str) {
|
|
74134
74134
|
return Array.from(str).map(s => s.charCodeAt(0));
|
|
74135
74135
|
}
|
|
74136
74136
|
|
|
@@ -74138,7 +74138,7 @@
|
|
|
74138
74138
|
* @param { number } ch
|
|
74139
74139
|
* @return { boolean }
|
|
74140
74140
|
*/
|
|
74141
|
-
function isStartChar(ch) {
|
|
74141
|
+
function isStartChar$1(ch) {
|
|
74142
74142
|
return (
|
|
74143
74143
|
ch === 63 // ?
|
|
74144
74144
|
) || (
|
|
@@ -74180,15 +74180,15 @@
|
|
|
74180
74180
|
* @param { number } ch
|
|
74181
74181
|
* @return { boolean }
|
|
74182
74182
|
*/
|
|
74183
|
-
function isAdditional(ch) {
|
|
74184
|
-
return additionalNameChars.includes(ch);
|
|
74183
|
+
function isAdditional$1(ch) {
|
|
74184
|
+
return additionalNameChars$1.includes(ch);
|
|
74185
74185
|
}
|
|
74186
74186
|
|
|
74187
74187
|
/**
|
|
74188
74188
|
* @param { number } ch
|
|
74189
74189
|
* @return { boolean }
|
|
74190
74190
|
*/
|
|
74191
|
-
function isPartChar(ch) {
|
|
74191
|
+
function isPartChar$1(ch) {
|
|
74192
74192
|
return (
|
|
74193
74193
|
ch >= 48 && ch <= 57 // 0-9
|
|
74194
74194
|
) || (
|
|
@@ -74204,11 +74204,11 @@
|
|
|
74204
74204
|
* @param { number } ch
|
|
74205
74205
|
* @return { boolean }
|
|
74206
74206
|
*/
|
|
74207
|
-
function isSpace(ch) {
|
|
74208
|
-
return spaceChars.includes(ch);
|
|
74207
|
+
function isSpace$1(ch) {
|
|
74208
|
+
return spaceChars$1.includes(ch);
|
|
74209
74209
|
}
|
|
74210
74210
|
|
|
74211
|
-
function indent(str, spaces) {
|
|
74211
|
+
function indent$1(str, spaces) {
|
|
74212
74212
|
return spaces.concat(
|
|
74213
74213
|
str.split(/\n/g).join('\n' + spaces)
|
|
74214
74214
|
);
|
|
@@ -74220,11 +74220,11 @@
|
|
|
74220
74220
|
*
|
|
74221
74221
|
* @return { { token: string, offset: number } | null }
|
|
74222
74222
|
*/
|
|
74223
|
-
function parseAdditionalSymbol(input, offset = 0) {
|
|
74223
|
+
function parseAdditionalSymbol$1(input, offset = 0) {
|
|
74224
74224
|
|
|
74225
74225
|
const next = input.peek(offset);
|
|
74226
74226
|
|
|
74227
|
-
if (next === asterix && input.peek(offset + 1) === asterix) {
|
|
74227
|
+
if (next === asterix$1 && input.peek(offset + 1) === asterix$1) {
|
|
74228
74228
|
|
|
74229
74229
|
return {
|
|
74230
74230
|
offset: 2,
|
|
@@ -74232,7 +74232,7 @@
|
|
|
74232
74232
|
};
|
|
74233
74233
|
}
|
|
74234
74234
|
|
|
74235
|
-
if (isAdditional(next)) {
|
|
74235
|
+
if (isAdditional$1(next)) {
|
|
74236
74236
|
return {
|
|
74237
74237
|
offset: 1,
|
|
74238
74238
|
token: String.fromCharCode(next)
|
|
@@ -74249,11 +74249,11 @@
|
|
|
74249
74249
|
*
|
|
74250
74250
|
* @return { { token: string, offset: number } | null }
|
|
74251
74251
|
*/
|
|
74252
|
-
function parseIdentifier(input, offset = 0, namePart = false) {
|
|
74252
|
+
function parseIdentifier$1(input, offset = 0, namePart = false) {
|
|
74253
74253
|
for (let inside = false, chars = [], i = 0;; i++) {
|
|
74254
74254
|
const next = input.peek(offset + i);
|
|
74255
74255
|
|
|
74256
|
-
if (isStartChar(next) || ((inside || namePart) && isPartChar(next))) {
|
|
74256
|
+
if (isStartChar$1(next) || ((inside || namePart) && isPartChar$1(next))) {
|
|
74257
74257
|
if (!inside) {
|
|
74258
74258
|
inside = true;
|
|
74259
74259
|
}
|
|
@@ -74279,12 +74279,12 @@
|
|
|
74279
74279
|
*
|
|
74280
74280
|
* @return { { token: string, offset: number } | null }
|
|
74281
74281
|
*/
|
|
74282
|
-
function parseSpaces(input, offset) {
|
|
74282
|
+
function parseSpaces$1(input, offset) {
|
|
74283
74283
|
|
|
74284
74284
|
for (let inside = false, i = 0;; i++) {
|
|
74285
74285
|
let next = input.peek(offset + i);
|
|
74286
74286
|
|
|
74287
|
-
if (isSpace(next)) {
|
|
74287
|
+
if (isSpace$1(next)) {
|
|
74288
74288
|
if (!inside) {
|
|
74289
74289
|
inside = true;
|
|
74290
74290
|
}
|
|
@@ -74309,7 +74309,7 @@
|
|
|
74309
74309
|
*
|
|
74310
74310
|
* @return { { token: string, offset: number, term: number } | null }
|
|
74311
74311
|
*/
|
|
74312
|
-
function parseName$
|
|
74312
|
+
function parseName$2(input, variables) {
|
|
74313
74313
|
const contextKeys = variables.contextKeys();
|
|
74314
74314
|
|
|
74315
74315
|
const start = variables.tokens;
|
|
@@ -74320,9 +74320,9 @@
|
|
|
74320
74320
|
const maybeSpace = tokens.length > 0;
|
|
74321
74321
|
|
|
74322
74322
|
const match = (
|
|
74323
|
-
parseIdentifier(input, i, namePart) ||
|
|
74324
|
-
namePart && parseAdditionalSymbol(input, i) ||
|
|
74325
|
-
maybeSpace && parseSpaces(input, i)
|
|
74323
|
+
parseIdentifier$1(input, i, namePart) ||
|
|
74324
|
+
namePart && parseAdditionalSymbol$1(input, i) ||
|
|
74325
|
+
maybeSpace && parseSpaces$1(input, i)
|
|
74326
74326
|
);
|
|
74327
74327
|
|
|
74328
74328
|
// match is required
|
|
@@ -74351,7 +74351,7 @@
|
|
|
74351
74351
|
nextMatch = {
|
|
74352
74352
|
token,
|
|
74353
74353
|
offset: token.length,
|
|
74354
|
-
term: nameIdentifier
|
|
74354
|
+
term: nameIdentifier$1
|
|
74355
74355
|
};
|
|
74356
74356
|
}
|
|
74357
74357
|
|
|
@@ -74359,7 +74359,7 @@
|
|
|
74359
74359
|
continue;
|
|
74360
74360
|
}
|
|
74361
74361
|
|
|
74362
|
-
if (dateTimeIdentifiers.some(el => el === name)) {
|
|
74362
|
+
if (dateTimeIdentifiers$1.some(el => el === name)) {
|
|
74363
74363
|
const token = tokens[0];
|
|
74364
74364
|
|
|
74365
74365
|
// parse date time identifiers as normal
|
|
@@ -74369,11 +74369,11 @@
|
|
|
74369
74369
|
nextMatch = {
|
|
74370
74370
|
token,
|
|
74371
74371
|
offset: token.length,
|
|
74372
|
-
term: identifier
|
|
74372
|
+
term: identifier$1
|
|
74373
74373
|
};
|
|
74374
74374
|
}
|
|
74375
74375
|
|
|
74376
|
-
if (dateTimeIdentifiers.some(el => el.startsWith(name))) {
|
|
74376
|
+
if (dateTimeIdentifiers$1.some(el => el.startsWith(name))) {
|
|
74377
74377
|
continue;
|
|
74378
74378
|
}
|
|
74379
74379
|
|
|
@@ -74382,50 +74382,50 @@
|
|
|
74382
74382
|
|
|
74383
74383
|
}
|
|
74384
74384
|
|
|
74385
|
-
const identifiersMap = {
|
|
74386
|
-
[ identifier ]: 'identifier',
|
|
74387
|
-
[ nameIdentifier ]: 'nameIdentifier'
|
|
74385
|
+
const identifiersMap$1 = {
|
|
74386
|
+
[ identifier$1 ]: 'identifier',
|
|
74387
|
+
[ nameIdentifier$1 ]: 'nameIdentifier'
|
|
74388
74388
|
};
|
|
74389
74389
|
|
|
74390
|
-
const identifiers$
|
|
74390
|
+
const identifiers$2 = new ExternalTokenizer((input, stack) => {
|
|
74391
74391
|
|
|
74392
|
-
LOG_PARSE_DEBUG && console.log('%s: T <identifier | nameIdentifier>', input.pos);
|
|
74392
|
+
LOG_PARSE_DEBUG$1 && console.log('%s: T <identifier | nameIdentifier>', input.pos);
|
|
74393
74393
|
|
|
74394
|
-
const nameMatch = parseName$
|
|
74394
|
+
const nameMatch = parseName$2(input, stack.context);
|
|
74395
74395
|
|
|
74396
74396
|
const start = stack.context.tokens;
|
|
74397
74397
|
|
|
74398
|
-
const match = nameMatch || parseIdentifier(input, 0, start.length > 0);
|
|
74398
|
+
const match = nameMatch || parseIdentifier$1(input, 0, start.length > 0);
|
|
74399
74399
|
|
|
74400
74400
|
if (match) {
|
|
74401
74401
|
input.advance(match.offset);
|
|
74402
|
-
input.acceptToken(nameMatch ? nameMatch.term : identifier);
|
|
74402
|
+
input.acceptToken(nameMatch ? nameMatch.term : identifier$1);
|
|
74403
74403
|
|
|
74404
|
-
LOG_PARSE && console.log('%s: MATCH <%s> <%s>', input.pos, nameMatch ? identifiersMap[nameMatch.term] : 'identifier', match.token);
|
|
74404
|
+
LOG_PARSE$1 && console.log('%s: MATCH <%s> <%s>', input.pos, nameMatch ? identifiersMap$1[nameMatch.term] : 'identifier', match.token);
|
|
74405
74405
|
}
|
|
74406
74406
|
}, { contextual: true });
|
|
74407
74407
|
|
|
74408
74408
|
|
|
74409
|
-
const propertyIdentifiers = new ExternalTokenizer((input, stack) => {
|
|
74409
|
+
const propertyIdentifiers$1 = new ExternalTokenizer((input, stack) => {
|
|
74410
74410
|
|
|
74411
|
-
LOG_PARSE_DEBUG && console.log('%s: T <propertyIdentifier>', input.pos);
|
|
74411
|
+
LOG_PARSE_DEBUG$1 && console.log('%s: T <propertyIdentifier>', input.pos);
|
|
74412
74412
|
|
|
74413
74413
|
const start = stack.context.tokens;
|
|
74414
74414
|
|
|
74415
|
-
const match = parseIdentifier(input, 0, start.length > 0);
|
|
74415
|
+
const match = parseIdentifier$1(input, 0, start.length > 0);
|
|
74416
74416
|
|
|
74417
74417
|
if (match) {
|
|
74418
74418
|
input.advance(match.offset);
|
|
74419
|
-
input.acceptToken(propertyIdentifier);
|
|
74419
|
+
input.acceptToken(propertyIdentifier$1);
|
|
74420
74420
|
|
|
74421
|
-
LOG_PARSE && console.log('%s: MATCH <propertyIdentifier> <%s>', input.pos, match.token);
|
|
74421
|
+
LOG_PARSE$1 && console.log('%s: MATCH <propertyIdentifier> <%s>', input.pos, match.token);
|
|
74422
74422
|
}
|
|
74423
74423
|
});
|
|
74424
74424
|
|
|
74425
74425
|
|
|
74426
|
-
const insertSemicolon = new ExternalTokenizer((input, stack) => {
|
|
74426
|
+
const insertSemicolon$1 = new ExternalTokenizer((input, stack) => {
|
|
74427
74427
|
|
|
74428
|
-
LOG_PARSE_DEBUG && console.log('%s: T <insertSemi>', input.pos);
|
|
74428
|
+
LOG_PARSE_DEBUG$1 && console.log('%s: T <insertSemi>', input.pos);
|
|
74429
74429
|
|
|
74430
74430
|
let offset;
|
|
74431
74431
|
let insert = false;
|
|
@@ -74433,11 +74433,11 @@
|
|
|
74433
74433
|
for (offset = 0;; offset++) {
|
|
74434
74434
|
const char = input.peek(offset);
|
|
74435
74435
|
|
|
74436
|
-
if (spaceChars.includes(char)) {
|
|
74436
|
+
if (spaceChars$1.includes(char)) {
|
|
74437
74437
|
continue;
|
|
74438
74438
|
}
|
|
74439
74439
|
|
|
74440
|
-
if (newlineChars.includes(char)) {
|
|
74440
|
+
if (newlineChars$1.includes(char)) {
|
|
74441
74441
|
insert = true;
|
|
74442
74442
|
}
|
|
74443
74443
|
|
|
@@ -74446,51 +74446,51 @@
|
|
|
74446
74446
|
|
|
74447
74447
|
if (insert) {
|
|
74448
74448
|
|
|
74449
|
-
const identifier = parseIdentifier(input, offset + 1);
|
|
74450
|
-
const spaces = parseSpaces(input, offset + 1);
|
|
74449
|
+
const identifier = parseIdentifier$1(input, offset + 1);
|
|
74450
|
+
const spaces = parseSpaces$1(input, offset + 1);
|
|
74451
74451
|
|
|
74452
74452
|
if (spaces || identifier && /^(then|else|return|satisfies)$/.test(identifier.token)) {
|
|
74453
74453
|
return;
|
|
74454
74454
|
}
|
|
74455
74455
|
|
|
74456
|
-
LOG_PARSE && console.log('%s: MATCH <insertSemi>', input.pos);
|
|
74457
|
-
input.acceptToken(insertSemi);
|
|
74456
|
+
LOG_PARSE$1 && console.log('%s: MATCH <insertSemi>', input.pos);
|
|
74457
|
+
input.acceptToken(insertSemi$1);
|
|
74458
74458
|
}
|
|
74459
74459
|
});
|
|
74460
74460
|
|
|
74461
|
-
const prefixedContextStarts = {
|
|
74462
|
-
[ functionInvocationStart ]: 'FunctionInvocation',
|
|
74463
|
-
[ filterExpressionStart ]: 'FilterExpression',
|
|
74464
|
-
[ pathExpressionStart ]: 'PathExpression'
|
|
74461
|
+
const prefixedContextStarts$1 = {
|
|
74462
|
+
[ functionInvocationStart$1 ]: 'FunctionInvocation',
|
|
74463
|
+
[ filterExpressionStart$1 ]: 'FilterExpression',
|
|
74464
|
+
[ pathExpressionStart$1 ]: 'PathExpression'
|
|
74465
74465
|
};
|
|
74466
74466
|
|
|
74467
|
-
const contextStarts = {
|
|
74468
|
-
[ contextStart ]: 'Context',
|
|
74469
|
-
[ functionDefinitionStart ]: 'FunctionDefinition',
|
|
74470
|
-
[ forExpressionStart ]: 'ForExpression',
|
|
74471
|
-
[ listStart ]: 'List',
|
|
74472
|
-
[ ifExpressionStart ]: 'IfExpression',
|
|
74473
|
-
[ quantifiedExpressionStart ]: 'QuantifiedExpression'
|
|
74467
|
+
const contextStarts$1 = {
|
|
74468
|
+
[ contextStart$1 ]: 'Context',
|
|
74469
|
+
[ functionDefinitionStart$1 ]: 'FunctionDefinition',
|
|
74470
|
+
[ forExpressionStart$1 ]: 'ForExpression',
|
|
74471
|
+
[ listStart$1 ]: 'List',
|
|
74472
|
+
[ ifExpressionStart$1 ]: 'IfExpression',
|
|
74473
|
+
[ quantifiedExpressionStart$1 ]: 'QuantifiedExpression'
|
|
74474
74474
|
};
|
|
74475
74475
|
|
|
74476
|
-
const contextEnds = {
|
|
74477
|
-
[ Context$
|
|
74478
|
-
[ FunctionDefinition ]: 'FunctionDefinition',
|
|
74479
|
-
[ ForExpression ]: 'ForExpression',
|
|
74480
|
-
[ List$
|
|
74481
|
-
[ IfExpression ]: 'IfExpression',
|
|
74482
|
-
[ QuantifiedExpression ]: 'QuantifiedExpression',
|
|
74483
|
-
[ PathExpression ]: 'PathExpression',
|
|
74484
|
-
[ FunctionInvocation ]: 'FunctionInvocation',
|
|
74485
|
-
[ FilterExpression ]: 'FilterExpression',
|
|
74486
|
-
[ ArithmeticExpression ]: 'ArithmeticExpression'
|
|
74476
|
+
const contextEnds$1 = {
|
|
74477
|
+
[ Context$2 ]: 'Context',
|
|
74478
|
+
[ FunctionDefinition$1 ]: 'FunctionDefinition',
|
|
74479
|
+
[ ForExpression$1 ]: 'ForExpression',
|
|
74480
|
+
[ List$2 ]: 'List',
|
|
74481
|
+
[ IfExpression$1 ]: 'IfExpression',
|
|
74482
|
+
[ QuantifiedExpression$1 ]: 'QuantifiedExpression',
|
|
74483
|
+
[ PathExpression$1 ]: 'PathExpression',
|
|
74484
|
+
[ FunctionInvocation$1 ]: 'FunctionInvocation',
|
|
74485
|
+
[ FilterExpression$1 ]: 'FilterExpression',
|
|
74486
|
+
[ ArithmeticExpression$1 ]: 'ArithmeticExpression'
|
|
74487
74487
|
};
|
|
74488
74488
|
|
|
74489
74489
|
/**
|
|
74490
74490
|
* A simple producer that retrievs a value from
|
|
74491
74491
|
* a given context. Used to lazily take things.
|
|
74492
74492
|
*/
|
|
74493
|
-
class ValueProducer {
|
|
74493
|
+
let ValueProducer$1 = class ValueProducer {
|
|
74494
74494
|
|
|
74495
74495
|
/**
|
|
74496
74496
|
* @param { Function } fn
|
|
@@ -74512,22 +74512,22 @@
|
|
|
74512
74512
|
return new ValueProducer(fn);
|
|
74513
74513
|
}
|
|
74514
74514
|
|
|
74515
|
-
}
|
|
74515
|
+
};
|
|
74516
74516
|
|
|
74517
|
-
const dateTimeLiterals = {
|
|
74517
|
+
const dateTimeLiterals$1 = {
|
|
74518
74518
|
'date and time': 1,
|
|
74519
74519
|
'date': 1,
|
|
74520
74520
|
'time': 1,
|
|
74521
74521
|
'duration': 1
|
|
74522
74522
|
};
|
|
74523
74523
|
|
|
74524
|
-
const dateTimeIdentifiers = Object.keys(dateTimeLiterals);
|
|
74524
|
+
const dateTimeIdentifiers$1 = Object.keys(dateTimeLiterals$1);
|
|
74525
74525
|
|
|
74526
74526
|
|
|
74527
74527
|
/**
|
|
74528
74528
|
* A basic key-value store to hold context values.
|
|
74529
74529
|
*/
|
|
74530
|
-
class VariableContext {
|
|
74530
|
+
let VariableContext$1 = class VariableContext {
|
|
74531
74531
|
|
|
74532
74532
|
/**
|
|
74533
74533
|
* Creates a new context from a JavaScript object.
|
|
@@ -74616,7 +74616,7 @@
|
|
|
74616
74616
|
static isAtomic(value) {
|
|
74617
74617
|
return !value ||
|
|
74618
74618
|
value instanceof this ||
|
|
74619
|
-
value instanceof ValueProducer ||
|
|
74619
|
+
value instanceof ValueProducer$1 ||
|
|
74620
74620
|
typeof value !== 'object';
|
|
74621
74621
|
}
|
|
74622
74622
|
|
|
@@ -74667,7 +74667,7 @@
|
|
|
74667
74667
|
static __merge(context, other) {
|
|
74668
74668
|
|
|
74669
74669
|
return reduce(this.__unwrap(other), (merged, value, key) => {
|
|
74670
|
-
if (value instanceof ValueProducer) {
|
|
74670
|
+
if (value instanceof ValueProducer$1) {
|
|
74671
74671
|
|
|
74672
74672
|
// keep value producers in tact
|
|
74673
74673
|
return {
|
|
@@ -74689,9 +74689,9 @@
|
|
|
74689
74689
|
}, this.__unwrap(context));
|
|
74690
74690
|
}
|
|
74691
74691
|
|
|
74692
|
-
}
|
|
74692
|
+
};
|
|
74693
74693
|
|
|
74694
|
-
class Variables {
|
|
74694
|
+
let Variables$1 = class Variables {
|
|
74695
74695
|
|
|
74696
74696
|
/**
|
|
74697
74697
|
* @param { {
|
|
@@ -74729,7 +74729,7 @@
|
|
|
74729
74729
|
parent: this
|
|
74730
74730
|
});
|
|
74731
74731
|
|
|
74732
|
-
LOG_VARS && console.log('[%s] enter', childScope.path, childScope.context);
|
|
74732
|
+
LOG_VARS$1 && console.log('[%s] enter', childScope.path, childScope.context);
|
|
74733
74733
|
|
|
74734
74734
|
return childScope;
|
|
74735
74735
|
}
|
|
@@ -74737,19 +74737,19 @@
|
|
|
74737
74737
|
exitScope(str) {
|
|
74738
74738
|
|
|
74739
74739
|
if (!this.parent) {
|
|
74740
|
-
LOG_VARS && console.log('[%s] NO exit %o\n%s', this.path, this.context, indent(str, ' '));
|
|
74740
|
+
LOG_VARS$1 && console.log('[%s] NO exit %o\n%s', this.path, this.context, indent$1(str, ' '));
|
|
74741
74741
|
|
|
74742
74742
|
return this;
|
|
74743
74743
|
}
|
|
74744
74744
|
|
|
74745
|
-
LOG_VARS && console.log('[%s] exit %o\n%s', this.path, this.context, indent(str, ' '));
|
|
74745
|
+
LOG_VARS$1 && console.log('[%s] exit %o\n%s', this.path, this.context, indent$1(str, ' '));
|
|
74746
74746
|
|
|
74747
74747
|
return this.parent.pushChild(this);
|
|
74748
74748
|
}
|
|
74749
74749
|
|
|
74750
74750
|
token(part) {
|
|
74751
74751
|
|
|
74752
|
-
LOG_VARS && console.log('[%s] token <%s> + <%s>', this.path, this.tokens.join(' '), part);
|
|
74752
|
+
LOG_VARS$1 && console.log('[%s] token <%s> + <%s>', this.path, this.tokens.join(' '), part);
|
|
74753
74753
|
|
|
74754
74754
|
return this.assign({
|
|
74755
74755
|
tokens: [ ...this.tokens, part ]
|
|
@@ -74758,7 +74758,7 @@
|
|
|
74758
74758
|
|
|
74759
74759
|
literal(value) {
|
|
74760
74760
|
|
|
74761
|
-
LOG_VARS && console.log('[%s] literal %o', this.path, value);
|
|
74761
|
+
LOG_VARS$1 && console.log('[%s] literal %o', this.path, value);
|
|
74762
74762
|
|
|
74763
74763
|
return this.pushChild(this.of({
|
|
74764
74764
|
name: 'Literal',
|
|
@@ -74772,7 +74772,7 @@
|
|
|
74772
74772
|
* @return {any}
|
|
74773
74773
|
*/
|
|
74774
74774
|
computedValue() {
|
|
74775
|
-
for (let scope = this;;scope = last(scope.children)) {
|
|
74775
|
+
for (let scope = this;;scope = last$1(scope.children)) {
|
|
74776
74776
|
|
|
74777
74777
|
if (!scope) {
|
|
74778
74778
|
return null;
|
|
@@ -74785,7 +74785,7 @@
|
|
|
74785
74785
|
}
|
|
74786
74786
|
|
|
74787
74787
|
contextKeys() {
|
|
74788
|
-
return this.context.getKeys().map(normalizeContextKey);
|
|
74788
|
+
return this.context.getKeys().map(normalizeContextKey$1);
|
|
74789
74789
|
}
|
|
74790
74790
|
|
|
74791
74791
|
get path() {
|
|
@@ -74800,10 +74800,10 @@
|
|
|
74800
74800
|
*/
|
|
74801
74801
|
get(variable) {
|
|
74802
74802
|
|
|
74803
|
-
const names = [ variable, variable && normalizeContextKey(variable) ];
|
|
74803
|
+
const names = [ variable, variable && normalizeContextKey$1(variable) ];
|
|
74804
74804
|
|
|
74805
74805
|
const contextKey = this.context.getKeys().find(
|
|
74806
|
-
key => names.includes(normalizeContextKey(key))
|
|
74806
|
+
key => names.includes(normalizeContextKey$1(key))
|
|
74807
74807
|
);
|
|
74808
74808
|
|
|
74809
74809
|
if (typeof contextKey === 'undefined') {
|
|
@@ -74812,7 +74812,7 @@
|
|
|
74812
74812
|
|
|
74813
74813
|
const val = this.context.get(contextKey);
|
|
74814
74814
|
|
|
74815
|
-
if (val instanceof ValueProducer) {
|
|
74815
|
+
if (val instanceof ValueProducer$1) {
|
|
74816
74816
|
return val.get(this);
|
|
74817
74817
|
} else {
|
|
74818
74818
|
return val;
|
|
@@ -74835,7 +74835,7 @@
|
|
|
74835
74835
|
raw: variable
|
|
74836
74836
|
});
|
|
74837
74837
|
|
|
74838
|
-
LOG_VARS && console.log('[%s] resolve name <%s=%s>', variableScope.path, variable, this.get(variable));
|
|
74838
|
+
LOG_VARS$1 && console.log('[%s] resolve name <%s=%s>', variableScope.path, variable, this.get(variable));
|
|
74839
74839
|
|
|
74840
74840
|
return parentScope.pushChild(variableScope);
|
|
74841
74841
|
}
|
|
@@ -74877,7 +74877,7 @@
|
|
|
74877
74877
|
|
|
74878
74878
|
const variableName = this.tokens.join(' ');
|
|
74879
74879
|
|
|
74880
|
-
LOG_VARS && console.log('[%s] declareName <%s>', this.path, variableName);
|
|
74880
|
+
LOG_VARS$1 && console.log('[%s] declareName <%s>', this.path, variableName);
|
|
74881
74881
|
|
|
74882
74882
|
return this.assign({
|
|
74883
74883
|
tokens: []
|
|
@@ -74892,12 +74892,12 @@
|
|
|
74892
74892
|
define(name, value) {
|
|
74893
74893
|
|
|
74894
74894
|
if (typeof name !== 'string') {
|
|
74895
|
-
LOG_VARS && console.log('[%s] no define <%s=%s>', this.path, name, value);
|
|
74895
|
+
LOG_VARS$1 && console.log('[%s] no define <%s=%s>', this.path, name, value);
|
|
74896
74896
|
|
|
74897
74897
|
return this;
|
|
74898
74898
|
}
|
|
74899
74899
|
|
|
74900
|
-
LOG_VARS && console.log('[%s] define <%s=%s>', this.path, name, value);
|
|
74900
|
+
LOG_VARS$1 && console.log('[%s] define <%s=%s>', this.path, name, value);
|
|
74901
74901
|
|
|
74902
74902
|
const context = this.context.set(name, value);
|
|
74903
74903
|
|
|
@@ -74977,14 +74977,14 @@
|
|
|
74977
74977
|
});
|
|
74978
74978
|
}
|
|
74979
74979
|
|
|
74980
|
-
}
|
|
74980
|
+
};
|
|
74981
74981
|
|
|
74982
74982
|
/**
|
|
74983
74983
|
* @param { string } name
|
|
74984
74984
|
*
|
|
74985
74985
|
* @return { string } normalizedName
|
|
74986
74986
|
*/
|
|
74987
|
-
function normalizeContextKey(name) {
|
|
74987
|
+
function normalizeContextKey$1(name) {
|
|
74988
74988
|
return name.replace(/\s*([./\-'+]|\*\*?)\s*/g, ' $1 ').replace(/\s{2,}/g, ' ').trim();
|
|
74989
74989
|
}
|
|
74990
74990
|
|
|
@@ -74996,7 +74996,7 @@
|
|
|
74996
74996
|
* @param { string } code
|
|
74997
74997
|
* @return { Variables }
|
|
74998
74998
|
*/
|
|
74999
|
-
function wrap(variables, scopeName, code) {
|
|
74999
|
+
function wrap$1(variables, scopeName, code) {
|
|
75000
75000
|
|
|
75001
75001
|
const parts = variables.children.filter(c => c.name !== scopeName);
|
|
75002
75002
|
const children = variables.children.filter(c => c.name === scopeName);
|
|
@@ -75023,9 +75023,9 @@
|
|
|
75023
75023
|
*
|
|
75024
75024
|
* @return { ContextTracker<Variables> }
|
|
75025
75025
|
*/
|
|
75026
|
-
function trackVariables(context = {}, Context = VariableContext) {
|
|
75026
|
+
function trackVariables$1(context = {}, Context = VariableContext$1) {
|
|
75027
75027
|
|
|
75028
|
-
const start = Variables.of({
|
|
75028
|
+
const start = Variables$1.of({
|
|
75029
75029
|
context: Context.of(context)
|
|
75030
75030
|
});
|
|
75031
75031
|
|
|
@@ -75033,7 +75033,7 @@
|
|
|
75033
75033
|
start,
|
|
75034
75034
|
reduce(variables, term, stack, input) {
|
|
75035
75035
|
|
|
75036
|
-
if (term === IfExpression) {
|
|
75036
|
+
if (term === IfExpression$1) {
|
|
75037
75037
|
const [ thenPart, elsePart ] = variables.children.slice(-2);
|
|
75038
75038
|
|
|
75039
75039
|
variables = variables.assign({
|
|
@@ -75044,7 +75044,7 @@
|
|
|
75044
75044
|
});
|
|
75045
75045
|
}
|
|
75046
75046
|
|
|
75047
|
-
if (term === List$
|
|
75047
|
+
if (term === List$2) {
|
|
75048
75048
|
variables = variables.assign({
|
|
75049
75049
|
value: Context.of(
|
|
75050
75050
|
...variables.children.map(
|
|
@@ -75054,7 +75054,7 @@
|
|
|
75054
75054
|
});
|
|
75055
75055
|
}
|
|
75056
75056
|
|
|
75057
|
-
if (term === FilterExpression) {
|
|
75057
|
+
if (term === FilterExpression$1) {
|
|
75058
75058
|
const [ sourcePart, _ ] = variables.children.slice(-2);
|
|
75059
75059
|
|
|
75060
75060
|
variables = variables.assign({
|
|
@@ -75062,7 +75062,7 @@
|
|
|
75062
75062
|
});
|
|
75063
75063
|
}
|
|
75064
75064
|
|
|
75065
|
-
if (term === FunctionInvocation) {
|
|
75065
|
+
if (term === FunctionInvocation$1) {
|
|
75066
75066
|
|
|
75067
75067
|
const [
|
|
75068
75068
|
name,
|
|
@@ -75071,17 +75071,17 @@
|
|
|
75071
75071
|
|
|
75072
75072
|
// preserve type information through `get value(context, key)` utility
|
|
75073
75073
|
if (name?.raw === 'get value') {
|
|
75074
|
-
variables = getContextValue(variables, args);
|
|
75074
|
+
variables = getContextValue$1(variables, args);
|
|
75075
75075
|
}
|
|
75076
75076
|
}
|
|
75077
75077
|
|
|
75078
|
-
const start = contextStarts[term];
|
|
75078
|
+
const start = contextStarts$1[term];
|
|
75079
75079
|
|
|
75080
75080
|
if (start) {
|
|
75081
75081
|
return variables.enterScope(start);
|
|
75082
75082
|
}
|
|
75083
75083
|
|
|
75084
|
-
const prefixedStart = prefixedContextStarts[term];
|
|
75084
|
+
const prefixedStart = prefixedContextStarts$1[term];
|
|
75085
75085
|
|
|
75086
75086
|
// pull <expression> into new <prefixedStart> context
|
|
75087
75087
|
if (prefixedStart) {
|
|
@@ -75092,15 +75092,15 @@
|
|
|
75092
75092
|
} = variables;
|
|
75093
75093
|
|
|
75094
75094
|
const children = currentChildren.slice(0, -1);
|
|
75095
|
-
const lastChild = last(currentChildren);
|
|
75095
|
+
const lastChild = last$1(currentChildren);
|
|
75096
75096
|
|
|
75097
75097
|
let newContext = null;
|
|
75098
75098
|
|
|
75099
|
-
if (term === pathExpressionStart) {
|
|
75099
|
+
if (term === pathExpressionStart$1) {
|
|
75100
75100
|
newContext = Context.of(lastChild?.computedValue());
|
|
75101
75101
|
}
|
|
75102
75102
|
|
|
75103
|
-
if (term === filterExpressionStart) {
|
|
75103
|
+
if (term === filterExpressionStart$1) {
|
|
75104
75104
|
newContext = Context.of(
|
|
75105
75105
|
currentContext,
|
|
75106
75106
|
lastChild?.computedValue()
|
|
@@ -75117,19 +75117,19 @@
|
|
|
75117
75117
|
// @ts-expect-error internal method
|
|
75118
75118
|
const code = input.read(input.pos, stack.pos);
|
|
75119
75119
|
|
|
75120
|
-
const end = contextEnds[term];
|
|
75120
|
+
const end = contextEnds$1[term];
|
|
75121
75121
|
|
|
75122
75122
|
if (end) {
|
|
75123
75123
|
return variables.exitScope(code);
|
|
75124
75124
|
}
|
|
75125
75125
|
|
|
75126
|
-
if (term === ContextEntry) {
|
|
75126
|
+
if (term === ContextEntry$1) {
|
|
75127
75127
|
const parts = variables.children.filter(c => c.name !== 'ContextEntry');
|
|
75128
75128
|
|
|
75129
75129
|
const name = parts[0];
|
|
75130
|
-
const value = last(parts);
|
|
75130
|
+
const value = last$1(parts);
|
|
75131
75131
|
|
|
75132
|
-
return wrap(variables, 'ContextEntry', code).assign(
|
|
75132
|
+
return wrap$1(variables, 'ContextEntry', code).assign(
|
|
75133
75133
|
{
|
|
75134
75134
|
value: Context
|
|
75135
75135
|
.of(variables.value)
|
|
@@ -75139,27 +75139,27 @@
|
|
|
75139
75139
|
}
|
|
75140
75140
|
|
|
75141
75141
|
if (
|
|
75142
|
-
term === ForInExpression ||
|
|
75143
|
-
term === QuantifiedInExpression
|
|
75142
|
+
term === ForInExpression$1 ||
|
|
75143
|
+
term === QuantifiedInExpression$1
|
|
75144
75144
|
) {
|
|
75145
|
-
return wrap(variables, 'InExpression', code);
|
|
75145
|
+
return wrap$1(variables, 'InExpression', code);
|
|
75146
75146
|
}
|
|
75147
75147
|
|
|
75148
75148
|
// define <partial> within ForExpression body
|
|
75149
|
-
if (term === forExpressionBodyStart) {
|
|
75149
|
+
if (term === forExpressionBodyStart$1) {
|
|
75150
75150
|
|
|
75151
75151
|
return variables.define(
|
|
75152
75152
|
'partial',
|
|
75153
|
-
ValueProducer.of(variables => {
|
|
75154
|
-
return last(variables.children)?.computedValue();
|
|
75153
|
+
ValueProducer$1.of(variables => {
|
|
75154
|
+
return last$1(variables.children)?.computedValue();
|
|
75155
75155
|
})
|
|
75156
75156
|
);
|
|
75157
75157
|
}
|
|
75158
75158
|
|
|
75159
75159
|
if (
|
|
75160
|
-
term === ParameterName
|
|
75160
|
+
term === ParameterName$1
|
|
75161
75161
|
) {
|
|
75162
|
-
const name = last(variables.children).computedValue();
|
|
75162
|
+
const name = last$1(variables.children).computedValue();
|
|
75163
75163
|
|
|
75164
75164
|
// TODO: attach type information
|
|
75165
75165
|
return variables.define(name, 1);
|
|
@@ -75167,71 +75167,71 @@
|
|
|
75167
75167
|
|
|
75168
75168
|
// pull <expression> into ArithmeticExpression child
|
|
75169
75169
|
if (
|
|
75170
|
-
term === arithmeticPlusStart ||
|
|
75171
|
-
term === arithmeticTimesStart ||
|
|
75172
|
-
term === arithmeticExpStart
|
|
75170
|
+
term === arithmeticPlusStart$1 ||
|
|
75171
|
+
term === arithmeticTimesStart$1 ||
|
|
75172
|
+
term === arithmeticExpStart$1
|
|
75173
75173
|
) {
|
|
75174
75174
|
const children = variables.children.slice(0, -1);
|
|
75175
|
-
const lastChild = last(variables.children);
|
|
75175
|
+
const lastChild = last$1(variables.children);
|
|
75176
75176
|
|
|
75177
75177
|
return variables.assign({
|
|
75178
75178
|
children
|
|
75179
75179
|
}).enterScope('ArithmeticExpression').pushChild(lastChild);
|
|
75180
75180
|
}
|
|
75181
75181
|
|
|
75182
|
-
if (term === arithmeticUnaryStart) {
|
|
75182
|
+
if (term === arithmeticUnaryStart$1) {
|
|
75183
75183
|
return variables.enterScope('ArithmeticExpression');
|
|
75184
75184
|
}
|
|
75185
75185
|
|
|
75186
75186
|
if (
|
|
75187
|
-
term === Identifier ||
|
|
75188
|
-
term === AdditionalIdentifier ||
|
|
75189
|
-
term === PropertyIdentifier
|
|
75187
|
+
term === Identifier$1 ||
|
|
75188
|
+
term === AdditionalIdentifier$1 ||
|
|
75189
|
+
term === PropertyIdentifier$1
|
|
75190
75190
|
) {
|
|
75191
75191
|
return variables.token(code);
|
|
75192
75192
|
}
|
|
75193
75193
|
|
|
75194
75194
|
if (
|
|
75195
|
-
term === StringLiteral
|
|
75195
|
+
term === StringLiteral$1
|
|
75196
75196
|
) {
|
|
75197
75197
|
return variables.literal(code.replace(/^"|"$/g, ''));
|
|
75198
75198
|
}
|
|
75199
75199
|
|
|
75200
|
-
if (term === BooleanLiteral) {
|
|
75200
|
+
if (term === BooleanLiteral$1) {
|
|
75201
75201
|
return variables.literal(code === 'true' ? true : false);
|
|
75202
75202
|
}
|
|
75203
75203
|
|
|
75204
|
-
if (term === NumericLiteral) {
|
|
75204
|
+
if (term === NumericLiteral$1) {
|
|
75205
75205
|
return variables.literal(parseFloat(code));
|
|
75206
75206
|
}
|
|
75207
75207
|
|
|
75208
|
-
if (term === nil) {
|
|
75208
|
+
if (term === nil$1) {
|
|
75209
75209
|
return variables.literal(null);
|
|
75210
75210
|
}
|
|
75211
75211
|
|
|
75212
75212
|
if (
|
|
75213
|
-
term === VariableName$
|
|
75213
|
+
term === VariableName$2
|
|
75214
75214
|
) {
|
|
75215
75215
|
return variables.resolveName();
|
|
75216
75216
|
}
|
|
75217
75217
|
|
|
75218
75218
|
if (
|
|
75219
|
-
term === Name$
|
|
75220
|
-
term === PropertyName
|
|
75219
|
+
term === Name$5 ||
|
|
75220
|
+
term === PropertyName$1
|
|
75221
75221
|
) {
|
|
75222
75222
|
return variables.declareName();
|
|
75223
75223
|
}
|
|
75224
75224
|
|
|
75225
75225
|
if (
|
|
75226
|
-
term === expression0 ||
|
|
75227
|
-
term === PositiveUnaryTest
|
|
75226
|
+
term === expression0$1 ||
|
|
75227
|
+
term === PositiveUnaryTest$1
|
|
75228
75228
|
) {
|
|
75229
75229
|
if (variables.tokens.length > 0) {
|
|
75230
75230
|
throw new Error('uncleared name');
|
|
75231
75231
|
}
|
|
75232
75232
|
}
|
|
75233
75233
|
|
|
75234
|
-
if (term === expression0) {
|
|
75234
|
+
if (term === expression0$1) {
|
|
75235
75235
|
|
|
75236
75236
|
let parent = variables;
|
|
75237
75237
|
|
|
@@ -75247,12 +75247,12 @@
|
|
|
75247
75247
|
});
|
|
75248
75248
|
}
|
|
75249
75249
|
|
|
75250
|
-
const variableTracker = trackVariables({});
|
|
75250
|
+
const variableTracker$1 = trackVariables$1({});
|
|
75251
75251
|
|
|
75252
75252
|
|
|
75253
75253
|
// helpers //////////////
|
|
75254
75254
|
|
|
75255
|
-
function getContextValue(variables, args) {
|
|
75255
|
+
function getContextValue$1(variables, args) {
|
|
75256
75256
|
|
|
75257
75257
|
if (!args.length) {
|
|
75258
75258
|
return variables.assign({
|
|
@@ -75261,7 +75261,7 @@
|
|
|
75261
75261
|
}
|
|
75262
75262
|
|
|
75263
75263
|
if (args[0].name === 'Name') {
|
|
75264
|
-
args = extractNamedArgs(args, [ 'm', 'key' ]);
|
|
75264
|
+
args = extractNamedArgs$1(args, [ 'm', 'key' ]);
|
|
75265
75265
|
}
|
|
75266
75266
|
|
|
75267
75267
|
if (args.length !== 2) {
|
|
@@ -75287,13 +75287,13 @@
|
|
|
75287
75287
|
}
|
|
75288
75288
|
|
|
75289
75289
|
return variables.assign({
|
|
75290
|
-
value: [ normalizeContextKey(keyValue), keyValue ].reduce((value, keyValue) => {
|
|
75290
|
+
value: [ normalizeContextKey$1(keyValue), keyValue ].reduce((value, keyValue) => {
|
|
75291
75291
|
return contextValue.get(keyValue) || value;
|
|
75292
75292
|
}, null)
|
|
75293
75293
|
});
|
|
75294
75294
|
}
|
|
75295
75295
|
|
|
75296
|
-
function extractNamedArgs(args, argNames) {
|
|
75296
|
+
function extractNamedArgs$1(args, argNames) {
|
|
75297
75297
|
|
|
75298
75298
|
const context = {};
|
|
75299
75299
|
|
|
@@ -75306,11 +75306,11 @@
|
|
|
75306
75306
|
return argNames.map(name => context[name]);
|
|
75307
75307
|
}
|
|
75308
75308
|
|
|
75309
|
-
function last(arr) {
|
|
75309
|
+
function last$1(arr) {
|
|
75310
75310
|
return arr[arr.length - 1];
|
|
75311
75311
|
}
|
|
75312
75312
|
|
|
75313
|
-
const feelHighlighting = styleTags({
|
|
75313
|
+
const feelHighlighting$1 = styleTags({
|
|
75314
75314
|
StringLiteral: tags.string,
|
|
75315
75315
|
NumericLiteral: tags.number,
|
|
75316
75316
|
BooleanLiteral: tags.bool,
|
|
@@ -75343,29 +75343,29 @@
|
|
|
75343
75343
|
});
|
|
75344
75344
|
|
|
75345
75345
|
// This file was generated by lezer-generator. You probably shouldn't edit it.
|
|
75346
|
-
const spec_identifier = {__proto__:null,for:10, in:32, return:36, if:40, then:42, else:44, some:48, every:50, satisfies:56, or:60, and:64, between:72, instance:86, of:89, days:101, time:103, duration:105, years:107, months:109, date:111, list:117, context:123, function:130, null:156, true:330, false:330, "?":170, external:186, not:211};
|
|
75347
|
-
const parser$
|
|
75346
|
+
const spec_identifier$1 = {__proto__:null,for:10, in:32, return:36, if:40, then:42, else:44, some:48, every:50, satisfies:56, or:60, and:64, between:72, instance:86, of:89, days:101, time:103, duration:105, years:107, months:109, date:111, list:117, context:123, function:130, null:156, true:330, false:330, "?":170, external:186, not:211};
|
|
75347
|
+
const parser$3 =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!h!i!j!k!p#Z#]#_#c#g#r$O$P$Y$^$_$b$q$}%X%d%y%z!mlOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$P$Y$^$_$b$q$}%X%d%y%z!mmOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$P$Y$^$_$b$q$}%X%d%y%zR$U!x!moOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$P$Y$^$_$b$q$}%X%d%y%zR#Oo",
|
|
75352
75352
|
nodeNames: "⚠ LineComment BlockComment Expression ForExpression for InExpressions InExpression Name Identifier Identifier ArithOp ArithOp ArithOp ArithOp ArithOp in IterationContext return IfExpression if then else QuantifiedExpression some every InExpressions InExpression satisfies Disjunction or Conjunction and Comparison CompareOp CompareOp between PositiveUnaryTest ( PositiveUnaryTests ) ArithmeticExpression InstanceOfExpression instance of Type QualifiedName VariableName BacktickIdentifier SpecialType days time duration years months date > ListType list < ContextType context ContextEntryTypes ContextEntryType FunctionType function ArgumentTypes ArgumentType PathExpression ] FilterExpression [ FunctionInvocation SpecialFunctionName NamedParameters NamedParameter ParameterName PositionalParameters null NumericLiteral StringLiteral BooleanLiteral DateTimeLiteral DateTimeConstructor AtLiteral ? SimplePositiveUnaryTest Interval ParenthesizedExpression List FunctionDefinition FormalParameters FormalParameter external FunctionBody } { Context ContextEntry Key Name Identifier Expressions UnaryTests Wildcard not",
|
|
75353
75353
|
maxTerm: 173,
|
|
75354
|
-
context: variableTracker,
|
|
75354
|
+
context: variableTracker$1,
|
|
75355
75355
|
nodeProps: [
|
|
75356
75356
|
["group", -17,4,19,23,29,31,33,41,42,68,70,72,85,86,88,89,90,97,"Expr",47,"Expr Expr",-5,78,79,80,81,82,"Expr Literal"],
|
|
75357
75357
|
["closedBy", 38,")",71,"]",96,"}"],
|
|
75358
75358
|
["openedBy", 40,"(",69,"[",95,"{"]
|
|
75359
75359
|
],
|
|
75360
|
-
propSources: [feelHighlighting],
|
|
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Y,]Z#O,]#O#P,x#P#S,]#S#T-t#T;'S,];'S;=`-y<%lO,]~,{RO;'S,];'S;=`-U;=`O,]~-XXOY,]Z#O,]#O#P,x#P#S,]#S#T-t#T;'S,];'S;=`-y;=`<%l,]<%lO,]~-yO$Z~~-|P;=`<%l,]~.UO#S~~.ZO#R~",
|
|
75364
|
-
tokenizers: [propertyIdentifiers, identifiers$
|
|
75364
|
+
tokenizers: [propertyIdentifiers$1, identifiers$2, insertSemicolon$1, 0, 1],
|
|
75365
75365
|
topRules: {"Expression":[0,3],"Expressions":[1,102],"UnaryTests":[2,103]},
|
|
75366
75366
|
dialects: {camunda: 2544},
|
|
75367
75367
|
dynamicPrecedences: {"31":-1,"68":1,"72":-1,"74":-1},
|
|
75368
|
-
specialized: [{term: 122, get: (value) => spec_identifier[value] || -1}],
|
|
75368
|
+
specialized: [{term: 122, get: (value) => spec_identifier$1[value] || -1}],
|
|
75369
75369
|
tokenPrec: 2546
|
|
75370
75370
|
});
|
|
75371
75371
|
|
|
@@ -96442,7 +96442,7 @@
|
|
|
96442
96442
|
Paragraph: tags.content
|
|
96443
96443
|
});
|
|
96444
96444
|
/// The default CommonMark parser.
|
|
96445
|
-
const parser$
|
|
96445
|
+
const parser$2 = new MarkdownParser(new NodeSet(nodeTypes).extend(markdownHighlighting), Object.keys(DefaultBlockParsers).map(n => DefaultBlockParsers[n]), Object.keys(DefaultBlockParsers).map(n => DefaultLeafBlocks[n]), Object.keys(DefaultBlockParsers), DefaultEndLeaf, DefaultSkipMarkup, Object.keys(DefaultInline).map(n => DefaultInline[n]), Object.keys(DefaultInline), []);
|
|
96446
96446
|
/// Extension providing
|
|
96447
96447
|
/// [Pandoc-style](https://pandoc.org/MANUAL.html#superscripts-and-subscripts)
|
|
96448
96448
|
/// superscript using `^` markers.
|
|
@@ -96471,7 +96471,7 @@
|
|
|
96471
96471
|
* @param {Tree} syntaxTree
|
|
96472
96472
|
* @returns {LintMessage[]} array of syntax errors
|
|
96473
96473
|
*/
|
|
96474
|
-
function lintSyntax(syntaxTree) {
|
|
96474
|
+
function lintSyntax$1(syntaxTree) {
|
|
96475
96475
|
|
|
96476
96476
|
const lintMessages = [];
|
|
96477
96477
|
|
|
@@ -96484,7 +96484,7 @@
|
|
|
96484
96484
|
}
|
|
96485
96485
|
|
|
96486
96486
|
const parent = node.parent;
|
|
96487
|
-
const next = getNextNode(node);
|
|
96487
|
+
const next = getNextNode$1(node);
|
|
96488
96488
|
|
|
96489
96489
|
const message = {
|
|
96490
96490
|
from: node.from,
|
|
@@ -96510,12 +96510,12 @@
|
|
|
96510
96510
|
return lintMessages;
|
|
96511
96511
|
}
|
|
96512
96512
|
|
|
96513
|
-
function getNextNode(node) {
|
|
96513
|
+
function getNextNode$1(node) {
|
|
96514
96514
|
if (!node) {
|
|
96515
96515
|
return null;
|
|
96516
96516
|
}
|
|
96517
96517
|
|
|
96518
|
-
return node.nextSibling || getNextNode(node.parent);
|
|
96518
|
+
return node.nextSibling || getNextNode$1(node.parent);
|
|
96519
96519
|
}
|
|
96520
96520
|
|
|
96521
96521
|
/**
|
|
@@ -96525,9 +96525,9 @@
|
|
|
96525
96525
|
* @property {(from: number, to: number, content: string) => void} updateContent
|
|
96526
96526
|
*/
|
|
96527
96527
|
|
|
96528
|
-
const RULE_NAME = 'first-item';
|
|
96528
|
+
const RULE_NAME$1 = 'first-item';
|
|
96529
96529
|
|
|
96530
|
-
var firstItem = {
|
|
96530
|
+
var firstItem$1 = {
|
|
96531
96531
|
create(/** @type {Context} */ context) {
|
|
96532
96532
|
return {
|
|
96533
96533
|
enter(node) {
|
|
@@ -96537,7 +96537,7 @@
|
|
|
96537
96537
|
|
|
96538
96538
|
const content = context.readContent(node.from, node.to);
|
|
96539
96539
|
|
|
96540
|
-
if (zeroIndexPattern().test(content)) {
|
|
96540
|
+
if (zeroIndexPattern$1().test(content)) {
|
|
96541
96541
|
const {
|
|
96542
96542
|
from,
|
|
96543
96543
|
to
|
|
@@ -96548,12 +96548,12 @@
|
|
|
96548
96548
|
to,
|
|
96549
96549
|
message: 'First item is accessed via [1]',
|
|
96550
96550
|
severity: 'warning',
|
|
96551
|
-
type: RULE_NAME,
|
|
96551
|
+
type: RULE_NAME$1,
|
|
96552
96552
|
actions: [
|
|
96553
96553
|
{
|
|
96554
96554
|
name: 'fix',
|
|
96555
96555
|
apply(_, start = from, end = to) {
|
|
96556
|
-
context.updateContent(start, end, content.replace(zeroIndexPattern(), '[1]'));
|
|
96556
|
+
context.updateContent(start, end, content.replace(zeroIndexPattern$1(), '[1]'));
|
|
96557
96557
|
}
|
|
96558
96558
|
}
|
|
96559
96559
|
]
|
|
@@ -96564,7 +96564,7 @@
|
|
|
96564
96564
|
}
|
|
96565
96565
|
};
|
|
96566
96566
|
|
|
96567
|
-
function zeroIndexPattern() {
|
|
96567
|
+
function zeroIndexPattern$1() {
|
|
96568
96568
|
return /\[\s*0\s*\]$/;
|
|
96569
96569
|
}
|
|
96570
96570
|
|
|
@@ -96574,8 +96574,8 @@
|
|
|
96574
96574
|
* @typedef {import('./index').LintAllContext} LintAllContext
|
|
96575
96575
|
*/
|
|
96576
96576
|
|
|
96577
|
-
const RULES = [
|
|
96578
|
-
firstItem
|
|
96577
|
+
const RULES$1 = [
|
|
96578
|
+
firstItem$1
|
|
96579
96579
|
];
|
|
96580
96580
|
|
|
96581
96581
|
/**
|
|
@@ -96584,7 +96584,7 @@
|
|
|
96584
96584
|
* @param {LintAllContext} context
|
|
96585
96585
|
* @returns {LintMessage[]} array of syntax errors
|
|
96586
96586
|
*/
|
|
96587
|
-
function lintRules(context) {
|
|
96587
|
+
function lintRules$1(context) {
|
|
96588
96588
|
const {
|
|
96589
96589
|
readContent,
|
|
96590
96590
|
syntaxTree,
|
|
@@ -96601,7 +96601,7 @@
|
|
|
96601
96601
|
updateContent
|
|
96602
96602
|
};
|
|
96603
96603
|
|
|
96604
|
-
const rules = RULES.map(rule => rule.create(ruleContext));
|
|
96604
|
+
const rules = RULES$1.map(rule => rule.create(ruleContext));
|
|
96605
96605
|
|
|
96606
96606
|
syntaxTree.iterate({
|
|
96607
96607
|
enter: ref => {
|
|
@@ -96637,11 +96637,11 @@
|
|
|
96637
96637
|
* @param {LintAllContext} context
|
|
96638
96638
|
* @returns {LintMessage[]} array of all lint messages
|
|
96639
96639
|
*/
|
|
96640
|
-
function lintAll$
|
|
96640
|
+
function lintAll$2(context) {
|
|
96641
96641
|
|
|
96642
96642
|
const lintMessages = [
|
|
96643
|
-
...lintSyntax(context.syntaxTree),
|
|
96644
|
-
...lintRules(context)
|
|
96643
|
+
...lintSyntax$1(context.syntaxTree),
|
|
96644
|
+
...lintRules$1(context)
|
|
96645
96645
|
];
|
|
96646
96646
|
|
|
96647
96647
|
return lintMessages;
|
|
@@ -96652,7 +96652,7 @@
|
|
|
96652
96652
|
*
|
|
96653
96653
|
* @returns {import('@codemirror/lint').LintSource} CodeMirror linting source
|
|
96654
96654
|
*/
|
|
96655
|
-
const cmFeelLinter = () => editorView => {
|
|
96655
|
+
const cmFeelLinter$1 = () => editorView => {
|
|
96656
96656
|
|
|
96657
96657
|
// don't lint if the Editor is empty
|
|
96658
96658
|
if (editorView.state.doc.length === 0) {
|
|
@@ -96661,7 +96661,7 @@
|
|
|
96661
96661
|
|
|
96662
96662
|
const tree = syntaxTree(editorView.state);
|
|
96663
96663
|
|
|
96664
|
-
const messages = lintAll$
|
|
96664
|
+
const messages = lintAll$2({
|
|
96665
96665
|
syntaxTree: tree,
|
|
96666
96666
|
readContent: (from, to) => editorView.state.sliceDoc(from, to),
|
|
96667
96667
|
updateContent: (from, to, content) => editorView.dispatch({
|
|
@@ -97141,7 +97141,7 @@
|
|
|
97141
97141
|
});
|
|
97142
97142
|
|
|
97143
97143
|
// This file was generated by lezer-generator. You probably shouldn't edit it.
|
|
97144
|
-
const parser = LRParser.deserialize({
|
|
97144
|
+
const parser$1 = LRParser.deserialize({
|
|
97145
97145
|
version: 14,
|
|
97146
97146
|
states: "$bOQOaOOOfOXO'#CbOOO`'#Cm'#CmOqOWO'#CcOvOWO'#CfOOO`'#Cp'#CpOOO`'#Ci'#CiO{OaO'#ClO!jOSOOQOOOOOO!oOPO,58{O!tOXO,58|OOO`,58|,58|O!|OQO,58}O#ROQO,59QOOO`-E6g-E6gOOO`1G.g1G.gO#WOPO1G.gOOO`1G.h1G.hO#]OaO1G.iO#qOaO1G.lOOO`7+$R7+$RO$VOPO7+$TO$_OPO7+$WOOO`<<Go<<GoOOO`<<Gr<<Gr",
|
|
97147
97147
|
stateData: "$g~ORUO_WObPOeROgSO^`P~OQYO_ZOc[O~OQ]O~OQ^O~ORUObPOeROgSO^`XW`XX`XZ`X[`X~OPXO~Oc`O~OQaOcbO~OfcO~OfdO~OceO~ORUObPOeROgSOW`PX`P~ORUObPOeROgSOZ`P[`P~OWhOXhO~OZiO[iO~O",
|
|
@@ -97163,12 +97163,12 @@
|
|
|
97163
97163
|
};
|
|
97164
97164
|
|
|
97165
97165
|
function createMixedLanguage(hostLanguage = null) {
|
|
97166
|
-
const _mixedParser = parser.configure({
|
|
97166
|
+
const _mixedParser = parser$1.configure({
|
|
97167
97167
|
|
|
97168
97168
|
wrap: parseMixed(node => {
|
|
97169
97169
|
|
|
97170
97170
|
if (node.name == 'Feel' || node.name == 'FeelBlock') {
|
|
97171
|
-
return { parser: parser$
|
|
97171
|
+
return { parser: parser$3 };
|
|
97172
97172
|
}
|
|
97173
97173
|
|
|
97174
97174
|
if (hostLanguage && node.name == 'SimpleTextBlock') {
|
|
@@ -97223,7 +97223,7 @@
|
|
|
97223
97223
|
* @param {Tree} syntaxTree
|
|
97224
97224
|
* @returns {LintMessage[]} array of all lint messages
|
|
97225
97225
|
*/
|
|
97226
|
-
function lintAll(syntaxTree) {
|
|
97226
|
+
function lintAll$1(syntaxTree) {
|
|
97227
97227
|
|
|
97228
97228
|
const lintMessages = [
|
|
97229
97229
|
|
|
@@ -97241,7 +97241,7 @@
|
|
|
97241
97241
|
* @returns {Source} CodeMirror linting source
|
|
97242
97242
|
*/
|
|
97243
97243
|
function cmFeelersLinter() {
|
|
97244
|
-
const lintFeel = cmFeelLinter();
|
|
97244
|
+
const lintFeel = cmFeelLinter$1();
|
|
97245
97245
|
return editorView => {
|
|
97246
97246
|
|
|
97247
97247
|
const feelMessages = lintFeel(editorView);
|
|
@@ -97253,7 +97253,7 @@
|
|
|
97253
97253
|
|
|
97254
97254
|
const tree = syntaxTree(editorView.state);
|
|
97255
97255
|
|
|
97256
|
-
const feelersMessages = lintAll(tree);
|
|
97256
|
+
const feelersMessages = lintAll$1(tree);
|
|
97257
97257
|
|
|
97258
97258
|
return [
|
|
97259
97259
|
...feelMessages,
|
|
@@ -97347,7 +97347,7 @@
|
|
|
97347
97347
|
const _getHostLanguageParser = (hostLanguage) => {
|
|
97348
97348
|
switch (hostLanguage) {
|
|
97349
97349
|
case 'markdown':
|
|
97350
|
-
return parser$
|
|
97350
|
+
return parser$2;
|
|
97351
97351
|
default:
|
|
97352
97352
|
return null;
|
|
97353
97353
|
}
|
|
@@ -97445,147 +97445,1679 @@
|
|
|
97445
97445
|
return this._cmEditor.state.selection;
|
|
97446
97446
|
};
|
|
97447
97447
|
|
|
97448
|
+
// This file was generated by lezer-generator. You probably shouldn't edit it.
|
|
97449
|
+
const propertyIdentifier = 121,
|
|
97450
|
+
identifier = 122,
|
|
97451
|
+
nameIdentifier = 123,
|
|
97452
|
+
insertSemi = 124,
|
|
97453
|
+
expression0 = 128,
|
|
97454
|
+
ForExpression = 4,
|
|
97455
|
+
forExpressionStart = 131,
|
|
97456
|
+
ForInExpression = 7,
|
|
97457
|
+
Name$4 = 8,
|
|
97458
|
+
Identifier = 9,
|
|
97459
|
+
AdditionalIdentifier = 10,
|
|
97460
|
+
forExpressionBodyStart = 139,
|
|
97461
|
+
IfExpression = 19,
|
|
97462
|
+
ifExpressionStart = 140,
|
|
97463
|
+
QuantifiedExpression = 23,
|
|
97464
|
+
quantifiedExpressionStart = 141,
|
|
97465
|
+
QuantifiedInExpression = 27,
|
|
97466
|
+
PositiveUnaryTest = 37,
|
|
97467
|
+
ArithmeticExpression = 41,
|
|
97468
|
+
arithmeticPlusStart = 145,
|
|
97469
|
+
arithmeticTimesStart = 146,
|
|
97470
|
+
arithmeticExpStart = 147,
|
|
97471
|
+
arithmeticUnaryStart = 148,
|
|
97472
|
+
VariableName$1 = 47,
|
|
97473
|
+
PathExpression = 68,
|
|
97474
|
+
pathExpressionStart = 154,
|
|
97475
|
+
FilterExpression = 70,
|
|
97476
|
+
filterExpressionStart = 155,
|
|
97477
|
+
FunctionInvocation = 72,
|
|
97478
|
+
functionInvocationStart = 156,
|
|
97479
|
+
ParameterName = 76,
|
|
97480
|
+
nil = 161,
|
|
97481
|
+
NumericLiteral = 79,
|
|
97482
|
+
StringLiteral = 80,
|
|
97483
|
+
BooleanLiteral = 81,
|
|
97484
|
+
listStart = 168,
|
|
97485
|
+
List$1 = 89,
|
|
97486
|
+
FunctionDefinition = 90,
|
|
97487
|
+
functionDefinitionStart = 170,
|
|
97488
|
+
Context$1 = 97,
|
|
97489
|
+
contextStart = 172,
|
|
97490
|
+
ContextEntry = 98,
|
|
97491
|
+
PropertyName = 100,
|
|
97492
|
+
PropertyIdentifier = 101;
|
|
97493
|
+
|
|
97494
|
+
/* global console,process */
|
|
97495
|
+
|
|
97496
|
+
|
|
97497
|
+
// @ts-expect-error env access
|
|
97498
|
+
const LOG_PARSE = typeof process != 'undefined' && process.env && /\bfparse(:dbg)?\b/.test(process.env.LOG);
|
|
97499
|
+
|
|
97500
|
+
// @ts-expect-error env access
|
|
97501
|
+
const LOG_PARSE_DEBUG = typeof process != 'undefined' && process.env && /\bfparse:dbg\b/.test(process.env.LOG);
|
|
97502
|
+
|
|
97503
|
+
// @ts-expect-error env access
|
|
97504
|
+
const LOG_VARS = typeof process != 'undefined' && process.env && /\bcontext\b/.test(process.env.LOG);
|
|
97505
|
+
|
|
97506
|
+
const spaceChars = [
|
|
97507
|
+
9, 11, 12, 32, 133, 160,
|
|
97508
|
+
5760, 8192, 8193, 8194, 8195, 8196, 8197, 8198,
|
|
97509
|
+
8199, 8200, 8201, 8202, 8232, 8233, 8239, 8287, 12288
|
|
97510
|
+
];
|
|
97511
|
+
|
|
97512
|
+
const newlineChars = chars('\n\r');
|
|
97513
|
+
|
|
97514
|
+
const asterix = '*'.charCodeAt(0);
|
|
97515
|
+
|
|
97516
|
+
const additionalNameChars = chars("'./-+*^");
|
|
97517
|
+
|
|
97448
97518
|
/**
|
|
97449
|
-
*
|
|
97519
|
+
* @typedef { VariableContext | any } ContextValue
|
|
97450
97520
|
*/
|
|
97451
|
-
const snippets = [snippetCompletion$1('function(${params}) ${body}', {
|
|
97452
|
-
label: 'function',
|
|
97453
|
-
detail: 'definition',
|
|
97454
|
-
type: 'keyword'
|
|
97455
|
-
}), snippetCompletion$1('for ${var} in ${collection} return ${value}', {
|
|
97456
|
-
label: 'for',
|
|
97457
|
-
detail: 'expression',
|
|
97458
|
-
type: 'keyword'
|
|
97459
|
-
}), snippetCompletion$1('every ${var} in ${collection} satisfies ${condition}', {
|
|
97460
|
-
label: 'every',
|
|
97461
|
-
detail: 'quantified expression',
|
|
97462
|
-
type: 'keyword'
|
|
97463
|
-
}), snippetCompletion$1('some ${var} in ${collection} satisfies ${condition}', {
|
|
97464
|
-
label: 'some',
|
|
97465
|
-
detail: 'quantified expression',
|
|
97466
|
-
type: 'keyword'
|
|
97467
|
-
}), snippetCompletion$1('if ${condition} then ${value} else ${other value}', {
|
|
97468
|
-
label: 'if',
|
|
97469
|
-
detail: 'block',
|
|
97470
|
-
type: 'keyword'
|
|
97471
|
-
}), snippetCompletion$1('{ ${key}: ${value} }', {
|
|
97472
|
-
label: 'context',
|
|
97473
|
-
detail: 'block',
|
|
97474
|
-
type: 'keyword'
|
|
97475
|
-
}), snippetCompletion$1('null', {
|
|
97476
|
-
label: 'null',
|
|
97477
|
-
detail: 'literal',
|
|
97478
|
-
type: 'keyword'
|
|
97479
|
-
}), snippetCompletion$1('true', {
|
|
97480
|
-
label: 'true',
|
|
97481
|
-
detail: 'literal',
|
|
97482
|
-
type: 'keyword'
|
|
97483
|
-
}), snippetCompletion$1('false', {
|
|
97484
|
-
label: 'false',
|
|
97485
|
-
detail: 'literal',
|
|
97486
|
-
type: 'keyword'
|
|
97487
|
-
})];
|
|
97488
97521
|
|
|
97489
|
-
|
|
97490
|
-
|
|
97491
|
-
|
|
97492
|
-
|
|
97493
|
-
|
|
97494
|
-
|
|
97495
|
-
target[key] = source[key];
|
|
97496
|
-
}
|
|
97497
|
-
}
|
|
97498
|
-
}
|
|
97499
|
-
return target;
|
|
97500
|
-
};
|
|
97501
|
-
return _extends$1p.apply(this, arguments);
|
|
97522
|
+
/**
|
|
97523
|
+
* @param { string } str
|
|
97524
|
+
* @return { number[] }
|
|
97525
|
+
*/
|
|
97526
|
+
function chars(str) {
|
|
97527
|
+
return Array.from(str).map(s => s.charCodeAt(0));
|
|
97502
97528
|
}
|
|
97503
97529
|
|
|
97504
|
-
|
|
97505
|
-
|
|
97506
|
-
|
|
97507
|
-
|
|
97508
|
-
|
|
97509
|
-
|
|
97510
|
-
|
|
97511
|
-
|
|
97512
|
-
|
|
97513
|
-
|
|
97514
|
-
|
|
97515
|
-
|
|
97516
|
-
|
|
97517
|
-
|
|
97518
|
-
|
|
97519
|
-
|
|
97520
|
-
|
|
97530
|
+
/**
|
|
97531
|
+
* @param { number } ch
|
|
97532
|
+
* @return { boolean }
|
|
97533
|
+
*/
|
|
97534
|
+
function isStartChar(ch) {
|
|
97535
|
+
return (
|
|
97536
|
+
ch === 63 // ?
|
|
97537
|
+
) || (
|
|
97538
|
+
ch >= 65 && ch <= 90 // A-Z
|
|
97539
|
+
) || (
|
|
97540
|
+
ch === 95 // _
|
|
97541
|
+
) || (
|
|
97542
|
+
ch >= 97 && ch <= 122 // a-z
|
|
97543
|
+
) || (
|
|
97544
|
+
ch >= 0xC0 && ch <= 0xD6
|
|
97545
|
+
) || (
|
|
97546
|
+
ch >= 0xD8 && ch <= 0xF6
|
|
97547
|
+
) || (
|
|
97548
|
+
ch >= 0xF8 && ch <= 0x2FF
|
|
97549
|
+
) || (
|
|
97550
|
+
ch >= 0x370 && ch <= 0x37D
|
|
97551
|
+
) || (
|
|
97552
|
+
ch >= 0x37F && ch <= 0x1FFF
|
|
97553
|
+
) || (
|
|
97554
|
+
ch >= 0x200C && ch <= 0x200D
|
|
97555
|
+
) || (
|
|
97556
|
+
ch >= 0x2070 && ch <= 0x218F
|
|
97557
|
+
) || (
|
|
97558
|
+
ch >= 0x2C00 && ch <= 0x2FEF
|
|
97559
|
+
) || (
|
|
97560
|
+
ch >= 0x3001 && ch <= 0xD7FF
|
|
97561
|
+
) || (
|
|
97562
|
+
ch >= 0xF900 && ch <= 0xFDCF
|
|
97563
|
+
) || (
|
|
97564
|
+
ch >= 0xFDF0 && ch <= 0xFFFD
|
|
97565
|
+
) || (
|
|
97566
|
+
ch >= 0xD800 && ch <= 0xDBFF // upper surrogate
|
|
97567
|
+
) || (
|
|
97568
|
+
ch >= 0xDC00 && ch <= 0xDFFF // lower surrogate
|
|
97569
|
+
);
|
|
97521
97570
|
}
|
|
97522
|
-
|
|
97523
|
-
|
|
97524
|
-
|
|
97525
|
-
|
|
97526
|
-
|
|
97527
|
-
|
|
97528
|
-
|
|
97529
|
-
before: 'else'
|
|
97530
|
-
}), contextualKeyword({
|
|
97531
|
-
context: 'IfExpression',
|
|
97532
|
-
keyword: 'else',
|
|
97533
|
-
after: 'then'
|
|
97534
|
-
}), contextualKeyword({
|
|
97535
|
-
context: 'QuantifiedExpression',
|
|
97536
|
-
keyword: 'satisfies'
|
|
97537
|
-
}), contextualKeyword({
|
|
97538
|
-
context: 'ForExpression',
|
|
97539
|
-
after: 'InExpressions',
|
|
97540
|
-
keyword: 'return'
|
|
97541
|
-
})];
|
|
97542
|
-
const dontComplete = ['StringLiteral', 'Identifier', 'LineComment', 'BlockComment', 'PathExpression', 'Context', 'Key', 'ParameterName'];
|
|
97543
|
-
const doComplete = ['Expr', 'ContextEntry'];
|
|
97544
|
-
function ifExpression(completionSource) {
|
|
97545
|
-
const allNodes = [...dontComplete, ...doComplete];
|
|
97546
|
-
return context => {
|
|
97547
|
-
const {
|
|
97548
|
-
state,
|
|
97549
|
-
pos
|
|
97550
|
-
} = context;
|
|
97551
|
-
const match = matchUp(syntaxTree(state).resolveInner(pos, -1), allNodes);
|
|
97552
|
-
if (match) {
|
|
97553
|
-
const [_, name] = match;
|
|
97554
|
-
if (dontComplete.includes(name)) {
|
|
97555
|
-
return null;
|
|
97556
|
-
}
|
|
97557
|
-
}
|
|
97558
|
-
return completionSource(context);
|
|
97559
|
-
};
|
|
97571
|
+
|
|
97572
|
+
/**
|
|
97573
|
+
* @param { number } ch
|
|
97574
|
+
* @return { boolean }
|
|
97575
|
+
*/
|
|
97576
|
+
function isAdditional(ch) {
|
|
97577
|
+
return additionalNameChars.includes(ch);
|
|
97560
97578
|
}
|
|
97561
|
-
|
|
97562
|
-
|
|
97563
|
-
|
|
97564
|
-
|
|
97579
|
+
|
|
97580
|
+
/**
|
|
97581
|
+
* @param { number } ch
|
|
97582
|
+
* @return { boolean }
|
|
97583
|
+
*/
|
|
97584
|
+
function isPartChar(ch) {
|
|
97585
|
+
return (
|
|
97586
|
+
ch >= 48 && ch <= 57 // 0-9
|
|
97587
|
+
) || (
|
|
97588
|
+
ch === 0xB7
|
|
97589
|
+
) || (
|
|
97590
|
+
ch >= 0x0300 && ch <= 0x036F
|
|
97591
|
+
) || (
|
|
97592
|
+
ch >= 0x203F && ch <= 0x2040
|
|
97593
|
+
);
|
|
97565
97594
|
}
|
|
97566
|
-
|
|
97567
|
-
|
|
97595
|
+
|
|
97596
|
+
/**
|
|
97597
|
+
* @param { number } ch
|
|
97598
|
+
* @return { boolean }
|
|
97599
|
+
*/
|
|
97600
|
+
function isSpace(ch) {
|
|
97601
|
+
return spaceChars.includes(ch);
|
|
97568
97602
|
}
|
|
97569
|
-
|
|
97570
|
-
|
|
97603
|
+
|
|
97604
|
+
function indent(str, spaces) {
|
|
97605
|
+
return spaces.concat(
|
|
97606
|
+
str.split(/\n/g).join('\n' + spaces)
|
|
97607
|
+
);
|
|
97571
97608
|
}
|
|
97572
|
-
|
|
97573
|
-
|
|
97574
|
-
|
|
97575
|
-
|
|
97576
|
-
|
|
97577
|
-
|
|
97578
|
-
|
|
97579
|
-
|
|
97580
|
-
|
|
97581
|
-
|
|
97582
|
-
|
|
97583
|
-
|
|
97609
|
+
|
|
97610
|
+
/**
|
|
97611
|
+
* @param { import('@lezer/lr').InputStream } input
|
|
97612
|
+
* @param { number } [offset]
|
|
97613
|
+
*
|
|
97614
|
+
* @return { { token: string, offset: number } | null }
|
|
97615
|
+
*/
|
|
97616
|
+
function parseAdditionalSymbol(input, offset = 0) {
|
|
97617
|
+
|
|
97618
|
+
const next = input.peek(offset);
|
|
97619
|
+
|
|
97620
|
+
if (next === asterix && input.peek(offset + 1) === asterix) {
|
|
97621
|
+
|
|
97622
|
+
return {
|
|
97623
|
+
offset: 2,
|
|
97624
|
+
token: '**'
|
|
97625
|
+
};
|
|
97584
97626
|
}
|
|
97585
|
-
|
|
97586
|
-
|
|
97587
|
-
|
|
97588
|
-
|
|
97627
|
+
|
|
97628
|
+
if (isAdditional(next)) {
|
|
97629
|
+
return {
|
|
97630
|
+
offset: 1,
|
|
97631
|
+
token: String.fromCharCode(next)
|
|
97632
|
+
};
|
|
97633
|
+
}
|
|
97634
|
+
|
|
97635
|
+
return null;
|
|
97636
|
+
}
|
|
97637
|
+
|
|
97638
|
+
/**
|
|
97639
|
+
* @param { import('@lezer/lr').InputStream } input
|
|
97640
|
+
* @param { number } [offset]
|
|
97641
|
+
* @param { boolean } [namePart]
|
|
97642
|
+
*
|
|
97643
|
+
* @return { { token: string, offset: number } | null }
|
|
97644
|
+
*/
|
|
97645
|
+
function parseIdentifier(input, offset = 0, namePart = false) {
|
|
97646
|
+
for (let inside = false, chars = [], i = 0;; i++) {
|
|
97647
|
+
const next = input.peek(offset + i);
|
|
97648
|
+
|
|
97649
|
+
if (isStartChar(next) || ((inside || namePart) && isPartChar(next))) {
|
|
97650
|
+
if (!inside) {
|
|
97651
|
+
inside = true;
|
|
97652
|
+
}
|
|
97653
|
+
|
|
97654
|
+
chars.push(next);
|
|
97655
|
+
} else {
|
|
97656
|
+
|
|
97657
|
+
if (chars.length) {
|
|
97658
|
+
return {
|
|
97659
|
+
token: String.fromCharCode(...chars),
|
|
97660
|
+
offset: i
|
|
97661
|
+
};
|
|
97662
|
+
}
|
|
97663
|
+
|
|
97664
|
+
return null;
|
|
97665
|
+
}
|
|
97666
|
+
}
|
|
97667
|
+
}
|
|
97668
|
+
|
|
97669
|
+
/**
|
|
97670
|
+
* @param { import('@lezer/lr').InputStream } input
|
|
97671
|
+
* @param { number } offset
|
|
97672
|
+
*
|
|
97673
|
+
* @return { { token: string, offset: number } | null }
|
|
97674
|
+
*/
|
|
97675
|
+
function parseSpaces(input, offset) {
|
|
97676
|
+
|
|
97677
|
+
for (let inside = false, i = 0;; i++) {
|
|
97678
|
+
let next = input.peek(offset + i);
|
|
97679
|
+
|
|
97680
|
+
if (isSpace(next)) {
|
|
97681
|
+
if (!inside) {
|
|
97682
|
+
inside = true;
|
|
97683
|
+
}
|
|
97684
|
+
} else {
|
|
97685
|
+
if (inside) {
|
|
97686
|
+
return {
|
|
97687
|
+
token: ' ',
|
|
97688
|
+
offset: i
|
|
97689
|
+
};
|
|
97690
|
+
}
|
|
97691
|
+
|
|
97692
|
+
return null;
|
|
97693
|
+
}
|
|
97694
|
+
}
|
|
97695
|
+
}
|
|
97696
|
+
|
|
97697
|
+
/**
|
|
97698
|
+
* Parse a name from the input and return the first match, if any.
|
|
97699
|
+
*
|
|
97700
|
+
* @param { import('@lezer/lr').InputStream } input
|
|
97701
|
+
* @param { Variables } variables
|
|
97702
|
+
*
|
|
97703
|
+
* @return { { token: string, offset: number, term: number } | null }
|
|
97704
|
+
*/
|
|
97705
|
+
function parseName$1(input, variables) {
|
|
97706
|
+
const contextKeys = variables.contextKeys();
|
|
97707
|
+
|
|
97708
|
+
const start = variables.tokens;
|
|
97709
|
+
|
|
97710
|
+
for (let i = 0, tokens = [], nextMatch = null;;) {
|
|
97711
|
+
|
|
97712
|
+
const namePart = (start.length + tokens.length) > 0;
|
|
97713
|
+
const maybeSpace = tokens.length > 0;
|
|
97714
|
+
|
|
97715
|
+
const match = (
|
|
97716
|
+
parseIdentifier(input, i, namePart) ||
|
|
97717
|
+
namePart && parseAdditionalSymbol(input, i) ||
|
|
97718
|
+
maybeSpace && parseSpaces(input, i)
|
|
97719
|
+
);
|
|
97720
|
+
|
|
97721
|
+
// match is required
|
|
97722
|
+
if (!match) {
|
|
97723
|
+
return nextMatch;
|
|
97724
|
+
}
|
|
97725
|
+
|
|
97726
|
+
const {
|
|
97727
|
+
token,
|
|
97728
|
+
offset
|
|
97729
|
+
} = match;
|
|
97730
|
+
|
|
97731
|
+
i += offset;
|
|
97732
|
+
|
|
97733
|
+
if (token === ' ') {
|
|
97734
|
+
continue;
|
|
97735
|
+
}
|
|
97736
|
+
|
|
97737
|
+
tokens = [ ...tokens, token ];
|
|
97738
|
+
|
|
97739
|
+
const name = [ ...start, ...tokens ].join(' ');
|
|
97740
|
+
|
|
97741
|
+
if (contextKeys.some(el => el === name)) {
|
|
97742
|
+
const token = tokens[0];
|
|
97743
|
+
|
|
97744
|
+
nextMatch = {
|
|
97745
|
+
token,
|
|
97746
|
+
offset: token.length,
|
|
97747
|
+
term: nameIdentifier
|
|
97748
|
+
};
|
|
97749
|
+
}
|
|
97750
|
+
|
|
97751
|
+
if (contextKeys.some(el => el.startsWith(name))) {
|
|
97752
|
+
continue;
|
|
97753
|
+
}
|
|
97754
|
+
|
|
97755
|
+
if (dateTimeIdentifiers.some(el => el === name)) {
|
|
97756
|
+
const token = tokens[0];
|
|
97757
|
+
|
|
97758
|
+
// parse date time identifiers as normal
|
|
97759
|
+
// identifiers to allow specialization to kick in
|
|
97760
|
+
//
|
|
97761
|
+
// cf. https://github.com/nikku/lezer-feel/issues/8
|
|
97762
|
+
nextMatch = {
|
|
97763
|
+
token,
|
|
97764
|
+
offset: token.length,
|
|
97765
|
+
term: identifier
|
|
97766
|
+
};
|
|
97767
|
+
}
|
|
97768
|
+
|
|
97769
|
+
if (dateTimeIdentifiers.some(el => el.startsWith(name))) {
|
|
97770
|
+
continue;
|
|
97771
|
+
}
|
|
97772
|
+
|
|
97773
|
+
return nextMatch;
|
|
97774
|
+
}
|
|
97775
|
+
|
|
97776
|
+
}
|
|
97777
|
+
|
|
97778
|
+
const identifiersMap = {
|
|
97779
|
+
[ identifier ]: 'identifier',
|
|
97780
|
+
[ nameIdentifier ]: 'nameIdentifier'
|
|
97781
|
+
};
|
|
97782
|
+
|
|
97783
|
+
const identifiers$1 = new ExternalTokenizer((input, stack) => {
|
|
97784
|
+
|
|
97785
|
+
LOG_PARSE_DEBUG && console.log('%s: T <identifier | nameIdentifier>', input.pos);
|
|
97786
|
+
|
|
97787
|
+
const nameMatch = parseName$1(input, stack.context);
|
|
97788
|
+
|
|
97789
|
+
const start = stack.context.tokens;
|
|
97790
|
+
|
|
97791
|
+
const match = nameMatch || parseIdentifier(input, 0, start.length > 0);
|
|
97792
|
+
|
|
97793
|
+
if (match) {
|
|
97794
|
+
input.advance(match.offset);
|
|
97795
|
+
input.acceptToken(nameMatch ? nameMatch.term : identifier);
|
|
97796
|
+
|
|
97797
|
+
LOG_PARSE && console.log('%s: MATCH <%s> <%s>', input.pos, nameMatch ? identifiersMap[nameMatch.term] : 'identifier', match.token);
|
|
97798
|
+
}
|
|
97799
|
+
}, { contextual: true });
|
|
97800
|
+
|
|
97801
|
+
|
|
97802
|
+
const propertyIdentifiers = new ExternalTokenizer((input, stack) => {
|
|
97803
|
+
|
|
97804
|
+
LOG_PARSE_DEBUG && console.log('%s: T <propertyIdentifier>', input.pos);
|
|
97805
|
+
|
|
97806
|
+
const start = stack.context.tokens;
|
|
97807
|
+
|
|
97808
|
+
const match = parseIdentifier(input, 0, start.length > 0);
|
|
97809
|
+
|
|
97810
|
+
if (match) {
|
|
97811
|
+
input.advance(match.offset);
|
|
97812
|
+
input.acceptToken(propertyIdentifier);
|
|
97813
|
+
|
|
97814
|
+
LOG_PARSE && console.log('%s: MATCH <propertyIdentifier> <%s>', input.pos, match.token);
|
|
97815
|
+
}
|
|
97816
|
+
});
|
|
97817
|
+
|
|
97818
|
+
|
|
97819
|
+
const insertSemicolon = new ExternalTokenizer((input, stack) => {
|
|
97820
|
+
|
|
97821
|
+
LOG_PARSE_DEBUG && console.log('%s: T <insertSemi>', input.pos);
|
|
97822
|
+
|
|
97823
|
+
let offset;
|
|
97824
|
+
let insert = false;
|
|
97825
|
+
|
|
97826
|
+
for (offset = 0;; offset++) {
|
|
97827
|
+
const char = input.peek(offset);
|
|
97828
|
+
|
|
97829
|
+
if (spaceChars.includes(char)) {
|
|
97830
|
+
continue;
|
|
97831
|
+
}
|
|
97832
|
+
|
|
97833
|
+
if (newlineChars.includes(char)) {
|
|
97834
|
+
insert = true;
|
|
97835
|
+
}
|
|
97836
|
+
|
|
97837
|
+
break;
|
|
97838
|
+
}
|
|
97839
|
+
|
|
97840
|
+
if (insert) {
|
|
97841
|
+
|
|
97842
|
+
const identifier = parseIdentifier(input, offset + 1);
|
|
97843
|
+
const spaces = parseSpaces(input, offset + 1);
|
|
97844
|
+
|
|
97845
|
+
if (spaces || identifier && /^(then|else|return|satisfies)$/.test(identifier.token)) {
|
|
97846
|
+
return;
|
|
97847
|
+
}
|
|
97848
|
+
|
|
97849
|
+
LOG_PARSE && console.log('%s: MATCH <insertSemi>', input.pos);
|
|
97850
|
+
input.acceptToken(insertSemi);
|
|
97851
|
+
}
|
|
97852
|
+
});
|
|
97853
|
+
|
|
97854
|
+
const prefixedContextStarts = {
|
|
97855
|
+
[ functionInvocationStart ]: 'FunctionInvocation',
|
|
97856
|
+
[ filterExpressionStart ]: 'FilterExpression',
|
|
97857
|
+
[ pathExpressionStart ]: 'PathExpression'
|
|
97858
|
+
};
|
|
97859
|
+
|
|
97860
|
+
const contextStarts = {
|
|
97861
|
+
[ contextStart ]: 'Context',
|
|
97862
|
+
[ functionDefinitionStart ]: 'FunctionDefinition',
|
|
97863
|
+
[ forExpressionStart ]: 'ForExpression',
|
|
97864
|
+
[ listStart ]: 'List',
|
|
97865
|
+
[ ifExpressionStart ]: 'IfExpression',
|
|
97866
|
+
[ quantifiedExpressionStart ]: 'QuantifiedExpression'
|
|
97867
|
+
};
|
|
97868
|
+
|
|
97869
|
+
const contextEnds = {
|
|
97870
|
+
[ Context$1 ]: 'Context',
|
|
97871
|
+
[ FunctionDefinition ]: 'FunctionDefinition',
|
|
97872
|
+
[ ForExpression ]: 'ForExpression',
|
|
97873
|
+
[ List$1 ]: 'List',
|
|
97874
|
+
[ IfExpression ]: 'IfExpression',
|
|
97875
|
+
[ QuantifiedExpression ]: 'QuantifiedExpression',
|
|
97876
|
+
[ PathExpression ]: 'PathExpression',
|
|
97877
|
+
[ FunctionInvocation ]: 'FunctionInvocation',
|
|
97878
|
+
[ FilterExpression ]: 'FilterExpression',
|
|
97879
|
+
[ ArithmeticExpression ]: 'ArithmeticExpression'
|
|
97880
|
+
};
|
|
97881
|
+
|
|
97882
|
+
/**
|
|
97883
|
+
* A simple producer that retrievs a value from
|
|
97884
|
+
* a given context. Used to lazily take things.
|
|
97885
|
+
*/
|
|
97886
|
+
class ValueProducer {
|
|
97887
|
+
|
|
97888
|
+
/**
|
|
97889
|
+
* @param { Function } fn
|
|
97890
|
+
*/
|
|
97891
|
+
constructor(fn) {
|
|
97892
|
+
this.fn = fn;
|
|
97893
|
+
}
|
|
97894
|
+
|
|
97895
|
+
get(variables) {
|
|
97896
|
+
return this.fn(variables);
|
|
97897
|
+
}
|
|
97898
|
+
|
|
97899
|
+
/**
|
|
97900
|
+
* @param { Function } fn
|
|
97901
|
+
*
|
|
97902
|
+
* @return { ValueProducer }
|
|
97903
|
+
*/
|
|
97904
|
+
static of(fn) {
|
|
97905
|
+
return new ValueProducer(fn);
|
|
97906
|
+
}
|
|
97907
|
+
|
|
97908
|
+
}
|
|
97909
|
+
|
|
97910
|
+
const dateTimeLiterals = {
|
|
97911
|
+
'date and time': 1,
|
|
97912
|
+
'date': 1,
|
|
97913
|
+
'time': 1,
|
|
97914
|
+
'duration': 1
|
|
97915
|
+
};
|
|
97916
|
+
|
|
97917
|
+
const dateTimeIdentifiers = Object.keys(dateTimeLiterals);
|
|
97918
|
+
|
|
97919
|
+
|
|
97920
|
+
/**
|
|
97921
|
+
* A basic key-value store to hold context values.
|
|
97922
|
+
*/
|
|
97923
|
+
class VariableContext {
|
|
97924
|
+
|
|
97925
|
+
/**
|
|
97926
|
+
* Creates a new context from a JavaScript object.
|
|
97927
|
+
*
|
|
97928
|
+
* @param {any} [value]
|
|
97929
|
+
*/
|
|
97930
|
+
constructor(value = {}) {
|
|
97931
|
+
|
|
97932
|
+
/**
|
|
97933
|
+
* @protected
|
|
97934
|
+
*/
|
|
97935
|
+
this.value = value;
|
|
97936
|
+
}
|
|
97937
|
+
|
|
97938
|
+
/**
|
|
97939
|
+
* Return all defined keys of the context.
|
|
97940
|
+
*
|
|
97941
|
+
* @returns {Array<string>} the keys of the context
|
|
97942
|
+
*/
|
|
97943
|
+
getKeys() {
|
|
97944
|
+
return Object.keys(this.value);
|
|
97945
|
+
}
|
|
97946
|
+
|
|
97947
|
+
/**
|
|
97948
|
+
* Returns the value of the given key.
|
|
97949
|
+
*
|
|
97950
|
+
* If the value represents a context itself, it should be wrapped in a
|
|
97951
|
+
* context class.
|
|
97952
|
+
*
|
|
97953
|
+
* @param {String} key
|
|
97954
|
+
* @returns {VariableContext|ValueProducer|null}
|
|
97955
|
+
*/
|
|
97956
|
+
get(key) {
|
|
97957
|
+
const result = this.value[key];
|
|
97958
|
+
|
|
97959
|
+
const constructor = /** @type { typeof VariableContext } */ (this.constructor);
|
|
97960
|
+
|
|
97961
|
+
if (constructor.isAtomic(result)) {
|
|
97962
|
+
return result;
|
|
97963
|
+
}
|
|
97964
|
+
|
|
97965
|
+
return constructor.of(result);
|
|
97966
|
+
}
|
|
97967
|
+
|
|
97968
|
+
/**
|
|
97969
|
+
* Creates a new context with the given key added.
|
|
97970
|
+
*
|
|
97971
|
+
* @param {String} key
|
|
97972
|
+
* @param {any} value
|
|
97973
|
+
*
|
|
97974
|
+
* @returns {VariableContext} new context with the given key added
|
|
97975
|
+
*/
|
|
97976
|
+
set(key, value) {
|
|
97977
|
+
|
|
97978
|
+
const constructor = /** @type { typeof VariableContext } */ (this.constructor);
|
|
97979
|
+
|
|
97980
|
+
return constructor.of({
|
|
97981
|
+
...this.value,
|
|
97982
|
+
[key]: value
|
|
97983
|
+
});
|
|
97984
|
+
}
|
|
97985
|
+
|
|
97986
|
+
/**
|
|
97987
|
+
* Non-destructively merge another context into this one,
|
|
97988
|
+
* and return the result.
|
|
97989
|
+
*
|
|
97990
|
+
* @param {ContextValue} other
|
|
97991
|
+
*
|
|
97992
|
+
* @return {VariableContext}
|
|
97993
|
+
*/
|
|
97994
|
+
merge(other) {
|
|
97995
|
+
const constructor = /** @type { typeof VariableContext } */ (this.constructor);
|
|
97996
|
+
|
|
97997
|
+
return new constructor(
|
|
97998
|
+
constructor.__merge(this.value, other)
|
|
97999
|
+
);
|
|
98000
|
+
}
|
|
98001
|
+
|
|
98002
|
+
/**
|
|
98003
|
+
* Wether the given value is atomic. Non-atomic values need to be wrapped in a
|
|
98004
|
+
* context Class.
|
|
98005
|
+
*
|
|
98006
|
+
* @param {any} value
|
|
98007
|
+
* @returns {Boolean}
|
|
98008
|
+
*/
|
|
98009
|
+
static isAtomic(value) {
|
|
98010
|
+
return !value ||
|
|
98011
|
+
value instanceof this ||
|
|
98012
|
+
value instanceof ValueProducer ||
|
|
98013
|
+
typeof value !== 'object';
|
|
98014
|
+
}
|
|
98015
|
+
|
|
98016
|
+
/**
|
|
98017
|
+
* Takes any number of Contexts and merges them into a single context.
|
|
98018
|
+
*
|
|
98019
|
+
* @param { ...VariableContext } contexts
|
|
98020
|
+
* @returns { VariableContext }
|
|
98021
|
+
*/
|
|
98022
|
+
static of(...contexts) {
|
|
98023
|
+
return contexts.reduce((context, otherContext) => {
|
|
98024
|
+
return context.merge(otherContext);
|
|
98025
|
+
}, new this({}));
|
|
98026
|
+
}
|
|
98027
|
+
|
|
98028
|
+
/**
|
|
98029
|
+
* Returns the raw representation of the given context.
|
|
98030
|
+
*
|
|
98031
|
+
* @param {VariableContext | any} context
|
|
98032
|
+
*
|
|
98033
|
+
* @return {any}
|
|
98034
|
+
*/
|
|
98035
|
+
static __unwrap(context) {
|
|
98036
|
+
if (!context) {
|
|
98037
|
+
return {};
|
|
98038
|
+
}
|
|
98039
|
+
|
|
98040
|
+
if (context instanceof this) {
|
|
98041
|
+
return context.value;
|
|
98042
|
+
}
|
|
98043
|
+
|
|
98044
|
+
if (typeof context !== 'object') {
|
|
98045
|
+
return {};
|
|
98046
|
+
}
|
|
98047
|
+
|
|
98048
|
+
return { ...context };
|
|
98049
|
+
}
|
|
98050
|
+
|
|
98051
|
+
/**
|
|
98052
|
+
* Non-destructively merges two contexts (or their values)
|
|
98053
|
+
* with each other, returning the result.
|
|
98054
|
+
*
|
|
98055
|
+
* @param {ContextValue} context
|
|
98056
|
+
* @param {ContextValue} other
|
|
98057
|
+
*
|
|
98058
|
+
* @return {any}
|
|
98059
|
+
*/
|
|
98060
|
+
static __merge(context, other) {
|
|
98061
|
+
|
|
98062
|
+
return reduce(this.__unwrap(other), (merged, value, key) => {
|
|
98063
|
+
if (value instanceof ValueProducer) {
|
|
98064
|
+
|
|
98065
|
+
// keep value producers in tact
|
|
98066
|
+
return {
|
|
98067
|
+
...merged,
|
|
98068
|
+
[key]: value
|
|
98069
|
+
};
|
|
98070
|
+
}
|
|
98071
|
+
|
|
98072
|
+
value = this.__unwrap(value);
|
|
98073
|
+
|
|
98074
|
+
if (has$3(merged, key)) {
|
|
98075
|
+
value = this.__merge(this.__unwrap(merged[key]), value);
|
|
98076
|
+
}
|
|
98077
|
+
|
|
98078
|
+
return {
|
|
98079
|
+
...merged,
|
|
98080
|
+
[key]: value
|
|
98081
|
+
};
|
|
98082
|
+
}, this.__unwrap(context));
|
|
98083
|
+
}
|
|
98084
|
+
|
|
98085
|
+
}
|
|
98086
|
+
|
|
98087
|
+
class Variables {
|
|
98088
|
+
|
|
98089
|
+
/**
|
|
98090
|
+
* @param { {
|
|
98091
|
+
* name?: string,
|
|
98092
|
+
* tokens?: string[],
|
|
98093
|
+
* children?: Variables[],
|
|
98094
|
+
* parent: Variables | null
|
|
98095
|
+
* context: VariableContext,
|
|
98096
|
+
* value?: any,
|
|
98097
|
+
* raw?: any
|
|
98098
|
+
* } } options
|
|
98099
|
+
*/
|
|
98100
|
+
constructor({
|
|
98101
|
+
name = 'Expressions',
|
|
98102
|
+
tokens = [],
|
|
98103
|
+
children = [],
|
|
98104
|
+
parent = null,
|
|
98105
|
+
context,
|
|
98106
|
+
value,
|
|
98107
|
+
raw
|
|
98108
|
+
}) {
|
|
98109
|
+
this.name = name;
|
|
98110
|
+
this.tokens = tokens;
|
|
98111
|
+
this.children = children;
|
|
98112
|
+
this.parent = parent;
|
|
98113
|
+
this.context = context;
|
|
98114
|
+
this.value = value;
|
|
98115
|
+
this.raw = raw;
|
|
98116
|
+
}
|
|
98117
|
+
|
|
98118
|
+
enterScope(name) {
|
|
98119
|
+
|
|
98120
|
+
const childScope = this.of({
|
|
98121
|
+
name,
|
|
98122
|
+
parent: this
|
|
98123
|
+
});
|
|
98124
|
+
|
|
98125
|
+
LOG_VARS && console.log('[%s] enter', childScope.path, childScope.context);
|
|
98126
|
+
|
|
98127
|
+
return childScope;
|
|
98128
|
+
}
|
|
98129
|
+
|
|
98130
|
+
exitScope(str) {
|
|
98131
|
+
|
|
98132
|
+
if (!this.parent) {
|
|
98133
|
+
LOG_VARS && console.log('[%s] NO exit %o\n%s', this.path, this.context, indent(str, ' '));
|
|
98134
|
+
|
|
98135
|
+
return this;
|
|
98136
|
+
}
|
|
98137
|
+
|
|
98138
|
+
LOG_VARS && console.log('[%s] exit %o\n%s', this.path, this.context, indent(str, ' '));
|
|
98139
|
+
|
|
98140
|
+
return this.parent.pushChild(this);
|
|
98141
|
+
}
|
|
98142
|
+
|
|
98143
|
+
token(part) {
|
|
98144
|
+
|
|
98145
|
+
LOG_VARS && console.log('[%s] token <%s> + <%s>', this.path, this.tokens.join(' '), part);
|
|
98146
|
+
|
|
98147
|
+
return this.assign({
|
|
98148
|
+
tokens: [ ...this.tokens, part ]
|
|
98149
|
+
});
|
|
98150
|
+
}
|
|
98151
|
+
|
|
98152
|
+
literal(value) {
|
|
98153
|
+
|
|
98154
|
+
LOG_VARS && console.log('[%s] literal %o', this.path, value);
|
|
98155
|
+
|
|
98156
|
+
return this.pushChild(this.of({
|
|
98157
|
+
name: 'Literal',
|
|
98158
|
+
value
|
|
98159
|
+
}));
|
|
98160
|
+
}
|
|
98161
|
+
|
|
98162
|
+
/**
|
|
98163
|
+
* Return computed scope value
|
|
98164
|
+
*
|
|
98165
|
+
* @return {any}
|
|
98166
|
+
*/
|
|
98167
|
+
computedValue() {
|
|
98168
|
+
for (let scope = this;;scope = last(scope.children)) {
|
|
98169
|
+
|
|
98170
|
+
if (!scope) {
|
|
98171
|
+
return null;
|
|
98172
|
+
}
|
|
98173
|
+
|
|
98174
|
+
if (scope.value) {
|
|
98175
|
+
return scope.value;
|
|
98176
|
+
}
|
|
98177
|
+
}
|
|
98178
|
+
}
|
|
98179
|
+
|
|
98180
|
+
contextKeys() {
|
|
98181
|
+
return this.context.getKeys().map(normalizeContextKey);
|
|
98182
|
+
}
|
|
98183
|
+
|
|
98184
|
+
get path() {
|
|
98185
|
+
return this.parent?.path?.concat(' > ', this.name) || this.name;
|
|
98186
|
+
}
|
|
98187
|
+
|
|
98188
|
+
/**
|
|
98189
|
+
* Return value of variable.
|
|
98190
|
+
*
|
|
98191
|
+
* @param { string } variable
|
|
98192
|
+
* @return { any } value
|
|
98193
|
+
*/
|
|
98194
|
+
get(variable) {
|
|
98195
|
+
|
|
98196
|
+
const names = [ variable, variable && normalizeContextKey(variable) ];
|
|
98197
|
+
|
|
98198
|
+
const contextKey = this.context.getKeys().find(
|
|
98199
|
+
key => names.includes(normalizeContextKey(key))
|
|
98200
|
+
);
|
|
98201
|
+
|
|
98202
|
+
if (typeof contextKey === 'undefined') {
|
|
98203
|
+
return undefined;
|
|
98204
|
+
}
|
|
98205
|
+
|
|
98206
|
+
const val = this.context.get(contextKey);
|
|
98207
|
+
|
|
98208
|
+
if (val instanceof ValueProducer) {
|
|
98209
|
+
return val.get(this);
|
|
98210
|
+
} else {
|
|
98211
|
+
return val;
|
|
98212
|
+
}
|
|
98213
|
+
}
|
|
98214
|
+
|
|
98215
|
+
resolveName() {
|
|
98216
|
+
|
|
98217
|
+
const variable = this.tokens.join(' ');
|
|
98218
|
+
const tokens = [];
|
|
98219
|
+
|
|
98220
|
+
const parentScope = this.assign({
|
|
98221
|
+
tokens
|
|
98222
|
+
});
|
|
98223
|
+
|
|
98224
|
+
const variableScope = this.of({
|
|
98225
|
+
name: 'VariableName',
|
|
98226
|
+
parent: parentScope,
|
|
98227
|
+
value: this.get(variable),
|
|
98228
|
+
raw: variable
|
|
98229
|
+
});
|
|
98230
|
+
|
|
98231
|
+
LOG_VARS && console.log('[%s] resolve name <%s=%s>', variableScope.path, variable, this.get(variable));
|
|
98232
|
+
|
|
98233
|
+
return parentScope.pushChild(variableScope);
|
|
98234
|
+
}
|
|
98235
|
+
|
|
98236
|
+
pushChild(child) {
|
|
98237
|
+
|
|
98238
|
+
if (!child) {
|
|
98239
|
+
return this;
|
|
98240
|
+
}
|
|
98241
|
+
|
|
98242
|
+
const parent = this.assign({
|
|
98243
|
+
children: [ ...this.children, child ]
|
|
98244
|
+
});
|
|
98245
|
+
|
|
98246
|
+
child.parent = parent;
|
|
98247
|
+
|
|
98248
|
+
return parent;
|
|
98249
|
+
}
|
|
98250
|
+
|
|
98251
|
+
pushChildren(children) {
|
|
98252
|
+
|
|
98253
|
+
/**
|
|
98254
|
+
* @type {Variables}
|
|
98255
|
+
*/
|
|
98256
|
+
let parent = this;
|
|
98257
|
+
|
|
98258
|
+
for (const child of children) {
|
|
98259
|
+
parent = parent.pushChild(child);
|
|
98260
|
+
}
|
|
98261
|
+
|
|
98262
|
+
return parent;
|
|
98263
|
+
}
|
|
98264
|
+
|
|
98265
|
+
declareName() {
|
|
98266
|
+
|
|
98267
|
+
if (this.tokens.length === 0) {
|
|
98268
|
+
throw Error('no tokens to declare name');
|
|
98269
|
+
}
|
|
98270
|
+
|
|
98271
|
+
const variableName = this.tokens.join(' ');
|
|
98272
|
+
|
|
98273
|
+
LOG_VARS && console.log('[%s] declareName <%s>', this.path, variableName);
|
|
98274
|
+
|
|
98275
|
+
return this.assign({
|
|
98276
|
+
tokens: []
|
|
98277
|
+
}).pushChild(
|
|
98278
|
+
this.of({
|
|
98279
|
+
name: 'Name',
|
|
98280
|
+
value: variableName
|
|
98281
|
+
})
|
|
98282
|
+
);
|
|
98283
|
+
}
|
|
98284
|
+
|
|
98285
|
+
define(name, value) {
|
|
98286
|
+
|
|
98287
|
+
if (typeof name !== 'string') {
|
|
98288
|
+
LOG_VARS && console.log('[%s] no define <%s=%s>', this.path, name, value);
|
|
98289
|
+
|
|
98290
|
+
return this;
|
|
98291
|
+
}
|
|
98292
|
+
|
|
98293
|
+
LOG_VARS && console.log('[%s] define <%s=%s>', this.path, name, value);
|
|
98294
|
+
|
|
98295
|
+
const context = this.context.set(name, value);
|
|
98296
|
+
|
|
98297
|
+
return this.assign({
|
|
98298
|
+
context
|
|
98299
|
+
});
|
|
98300
|
+
}
|
|
98301
|
+
|
|
98302
|
+
/**
|
|
98303
|
+
* @param { Record<string, any> } [options]
|
|
98304
|
+
*
|
|
98305
|
+
* @return { Variables }
|
|
98306
|
+
*/
|
|
98307
|
+
assign(options = {}) {
|
|
98308
|
+
|
|
98309
|
+
return Variables.of({
|
|
98310
|
+
...this,
|
|
98311
|
+
...options
|
|
98312
|
+
});
|
|
98313
|
+
}
|
|
98314
|
+
|
|
98315
|
+
/**
|
|
98316
|
+
* @param { Record<string, any> } [options]
|
|
98317
|
+
*
|
|
98318
|
+
* @return { Variables }
|
|
98319
|
+
*/
|
|
98320
|
+
of(options = {}) {
|
|
98321
|
+
|
|
98322
|
+
const defaultOptions = {
|
|
98323
|
+
context: this.context,
|
|
98324
|
+
parent: this.parent
|
|
98325
|
+
};
|
|
98326
|
+
|
|
98327
|
+
return Variables.of({
|
|
98328
|
+
...defaultOptions,
|
|
98329
|
+
...options
|
|
98330
|
+
});
|
|
98331
|
+
}
|
|
98332
|
+
|
|
98333
|
+
/**
|
|
98334
|
+
* @param { {
|
|
98335
|
+
* name?: string,
|
|
98336
|
+
* tokens?: string[],
|
|
98337
|
+
* children?: Variables[],
|
|
98338
|
+
* parent?: Variables | null
|
|
98339
|
+
* context: VariableContext,
|
|
98340
|
+
* value?: any,
|
|
98341
|
+
* raw?: any
|
|
98342
|
+
* } } options
|
|
98343
|
+
*
|
|
98344
|
+
* @return {Variables}
|
|
98345
|
+
*/
|
|
98346
|
+
static of(options) {
|
|
98347
|
+
|
|
98348
|
+
const {
|
|
98349
|
+
name,
|
|
98350
|
+
tokens = [],
|
|
98351
|
+
children = [],
|
|
98352
|
+
parent = null,
|
|
98353
|
+
context,
|
|
98354
|
+
value,
|
|
98355
|
+
raw
|
|
98356
|
+
} = options;
|
|
98357
|
+
|
|
98358
|
+
if (!context) {
|
|
98359
|
+
throw new Error('must provide <context>');
|
|
98360
|
+
}
|
|
98361
|
+
|
|
98362
|
+
return new Variables({
|
|
98363
|
+
name,
|
|
98364
|
+
tokens: [ ...tokens ],
|
|
98365
|
+
children: [ ...children ],
|
|
98366
|
+
context,
|
|
98367
|
+
parent,
|
|
98368
|
+
value,
|
|
98369
|
+
raw
|
|
98370
|
+
});
|
|
98371
|
+
}
|
|
98372
|
+
|
|
98373
|
+
}
|
|
98374
|
+
|
|
98375
|
+
/**
|
|
98376
|
+
* @param { string } name
|
|
98377
|
+
*
|
|
98378
|
+
* @return { string } normalizedName
|
|
98379
|
+
*/
|
|
98380
|
+
function normalizeContextKey(name) {
|
|
98381
|
+
return name.replace(/\s*([./\-'+]|\*\*?)\s*/g, ' $1 ').replace(/\s{2,}/g, ' ').trim();
|
|
98382
|
+
}
|
|
98383
|
+
|
|
98384
|
+
/**
|
|
98385
|
+
* Wrap children of variables under the given named child.
|
|
98386
|
+
*
|
|
98387
|
+
* @param { Variables } variables
|
|
98388
|
+
* @param { string } scopeName
|
|
98389
|
+
* @param { string } code
|
|
98390
|
+
* @return { Variables }
|
|
98391
|
+
*/
|
|
98392
|
+
function wrap(variables, scopeName, code) {
|
|
98393
|
+
|
|
98394
|
+
const parts = variables.children.filter(c => c.name !== scopeName);
|
|
98395
|
+
const children = variables.children.filter(c => c.name === scopeName);
|
|
98396
|
+
|
|
98397
|
+
const namePart = parts[0];
|
|
98398
|
+
const valuePart = parts[Math.max(1, parts.length - 1)];
|
|
98399
|
+
|
|
98400
|
+
const name = namePart?.computedValue();
|
|
98401
|
+
const value = valuePart?.computedValue() || null;
|
|
98402
|
+
|
|
98403
|
+
return variables
|
|
98404
|
+
.assign({
|
|
98405
|
+
children
|
|
98406
|
+
})
|
|
98407
|
+
.enterScope(scopeName)
|
|
98408
|
+
.pushChildren(parts)
|
|
98409
|
+
.exitScope(code)
|
|
98410
|
+
.define(name, value);
|
|
98411
|
+
}
|
|
98412
|
+
|
|
98413
|
+
/**
|
|
98414
|
+
* @param { ContextValue } [context]
|
|
98415
|
+
* @param { typeof VariableContext } [Context]
|
|
98416
|
+
*
|
|
98417
|
+
* @return { ContextTracker<Variables> }
|
|
98418
|
+
*/
|
|
98419
|
+
function trackVariables(context = {}, Context = VariableContext) {
|
|
98420
|
+
|
|
98421
|
+
const start = Variables.of({
|
|
98422
|
+
context: Context.of(context)
|
|
98423
|
+
});
|
|
98424
|
+
|
|
98425
|
+
return new ContextTracker({
|
|
98426
|
+
start,
|
|
98427
|
+
reduce(variables, term, stack, input) {
|
|
98428
|
+
|
|
98429
|
+
if (term === IfExpression) {
|
|
98430
|
+
const [ thenPart, elsePart ] = variables.children.slice(-2);
|
|
98431
|
+
|
|
98432
|
+
variables = variables.assign({
|
|
98433
|
+
value: Context.of(
|
|
98434
|
+
thenPart?.computedValue(),
|
|
98435
|
+
elsePart?.computedValue()
|
|
98436
|
+
)
|
|
98437
|
+
});
|
|
98438
|
+
}
|
|
98439
|
+
|
|
98440
|
+
if (term === List$1) {
|
|
98441
|
+
variables = variables.assign({
|
|
98442
|
+
value: Context.of(
|
|
98443
|
+
...variables.children.map(
|
|
98444
|
+
c => c?.computedValue()
|
|
98445
|
+
)
|
|
98446
|
+
)
|
|
98447
|
+
});
|
|
98448
|
+
}
|
|
98449
|
+
|
|
98450
|
+
if (term === FilterExpression) {
|
|
98451
|
+
const [ sourcePart, _ ] = variables.children.slice(-2);
|
|
98452
|
+
|
|
98453
|
+
variables = variables.assign({
|
|
98454
|
+
value: sourcePart?.computedValue()
|
|
98455
|
+
});
|
|
98456
|
+
}
|
|
98457
|
+
|
|
98458
|
+
if (term === FunctionInvocation) {
|
|
98459
|
+
|
|
98460
|
+
const [
|
|
98461
|
+
name,
|
|
98462
|
+
...args
|
|
98463
|
+
] = variables.children;
|
|
98464
|
+
|
|
98465
|
+
// preserve type information through `get value(context, key)` utility
|
|
98466
|
+
if (name?.raw === 'get value') {
|
|
98467
|
+
variables = getContextValue(variables, args);
|
|
98468
|
+
}
|
|
98469
|
+
}
|
|
98470
|
+
|
|
98471
|
+
const start = contextStarts[term];
|
|
98472
|
+
|
|
98473
|
+
if (start) {
|
|
98474
|
+
return variables.enterScope(start);
|
|
98475
|
+
}
|
|
98476
|
+
|
|
98477
|
+
const prefixedStart = prefixedContextStarts[term];
|
|
98478
|
+
|
|
98479
|
+
// pull <expression> into new <prefixedStart> context
|
|
98480
|
+
if (prefixedStart) {
|
|
98481
|
+
|
|
98482
|
+
const {
|
|
98483
|
+
children: currentChildren,
|
|
98484
|
+
context: currentContext,
|
|
98485
|
+
} = variables;
|
|
98486
|
+
|
|
98487
|
+
const children = currentChildren.slice(0, -1);
|
|
98488
|
+
const lastChild = last(currentChildren);
|
|
98489
|
+
|
|
98490
|
+
let newContext = null;
|
|
98491
|
+
|
|
98492
|
+
if (term === pathExpressionStart) {
|
|
98493
|
+
newContext = Context.of(lastChild?.computedValue());
|
|
98494
|
+
}
|
|
98495
|
+
|
|
98496
|
+
if (term === filterExpressionStart) {
|
|
98497
|
+
newContext = Context.of(
|
|
98498
|
+
currentContext,
|
|
98499
|
+
lastChild?.computedValue()
|
|
98500
|
+
).set('item', lastChild?.computedValue());
|
|
98501
|
+
}
|
|
98502
|
+
|
|
98503
|
+
return variables
|
|
98504
|
+
.assign({ children })
|
|
98505
|
+
.enterScope(prefixedStart)
|
|
98506
|
+
.pushChild(lastChild)
|
|
98507
|
+
.assign({ context: newContext || currentContext });
|
|
98508
|
+
}
|
|
98509
|
+
|
|
98510
|
+
// @ts-expect-error internal method
|
|
98511
|
+
const code = input.read(input.pos, stack.pos);
|
|
98512
|
+
|
|
98513
|
+
const end = contextEnds[term];
|
|
98514
|
+
|
|
98515
|
+
if (end) {
|
|
98516
|
+
return variables.exitScope(code);
|
|
98517
|
+
}
|
|
98518
|
+
|
|
98519
|
+
if (term === ContextEntry) {
|
|
98520
|
+
const parts = variables.children.filter(c => c.name !== 'ContextEntry');
|
|
98521
|
+
|
|
98522
|
+
const name = parts[0];
|
|
98523
|
+
const value = last(parts);
|
|
98524
|
+
|
|
98525
|
+
return wrap(variables, 'ContextEntry', code).assign(
|
|
98526
|
+
{
|
|
98527
|
+
value: Context
|
|
98528
|
+
.of(variables.value)
|
|
98529
|
+
.set(name?.computedValue(), value?.computedValue())
|
|
98530
|
+
}
|
|
98531
|
+
);
|
|
98532
|
+
}
|
|
98533
|
+
|
|
98534
|
+
if (
|
|
98535
|
+
term === ForInExpression ||
|
|
98536
|
+
term === QuantifiedInExpression
|
|
98537
|
+
) {
|
|
98538
|
+
return wrap(variables, 'InExpression', code);
|
|
98539
|
+
}
|
|
98540
|
+
|
|
98541
|
+
// define <partial> within ForExpression body
|
|
98542
|
+
if (term === forExpressionBodyStart) {
|
|
98543
|
+
|
|
98544
|
+
return variables.define(
|
|
98545
|
+
'partial',
|
|
98546
|
+
ValueProducer.of(variables => {
|
|
98547
|
+
return last(variables.children)?.computedValue();
|
|
98548
|
+
})
|
|
98549
|
+
);
|
|
98550
|
+
}
|
|
98551
|
+
|
|
98552
|
+
if (
|
|
98553
|
+
term === ParameterName
|
|
98554
|
+
) {
|
|
98555
|
+
const name = last(variables.children).computedValue();
|
|
98556
|
+
|
|
98557
|
+
// TODO: attach type information
|
|
98558
|
+
return variables.define(name, 1);
|
|
98559
|
+
}
|
|
98560
|
+
|
|
98561
|
+
// pull <expression> into ArithmeticExpression child
|
|
98562
|
+
if (
|
|
98563
|
+
term === arithmeticPlusStart ||
|
|
98564
|
+
term === arithmeticTimesStart ||
|
|
98565
|
+
term === arithmeticExpStart
|
|
98566
|
+
) {
|
|
98567
|
+
const children = variables.children.slice(0, -1);
|
|
98568
|
+
const lastChild = last(variables.children);
|
|
98569
|
+
|
|
98570
|
+
return variables.assign({
|
|
98571
|
+
children
|
|
98572
|
+
}).enterScope('ArithmeticExpression').pushChild(lastChild);
|
|
98573
|
+
}
|
|
98574
|
+
|
|
98575
|
+
if (term === arithmeticUnaryStart) {
|
|
98576
|
+
return variables.enterScope('ArithmeticExpression');
|
|
98577
|
+
}
|
|
98578
|
+
|
|
98579
|
+
if (
|
|
98580
|
+
term === Identifier ||
|
|
98581
|
+
term === AdditionalIdentifier ||
|
|
98582
|
+
term === PropertyIdentifier
|
|
98583
|
+
) {
|
|
98584
|
+
return variables.token(code);
|
|
98585
|
+
}
|
|
98586
|
+
|
|
98587
|
+
if (
|
|
98588
|
+
term === StringLiteral
|
|
98589
|
+
) {
|
|
98590
|
+
return variables.literal(code.replace(/^"|"$/g, ''));
|
|
98591
|
+
}
|
|
98592
|
+
|
|
98593
|
+
if (term === BooleanLiteral) {
|
|
98594
|
+
return variables.literal(code === 'true' ? true : false);
|
|
98595
|
+
}
|
|
98596
|
+
|
|
98597
|
+
if (term === NumericLiteral) {
|
|
98598
|
+
return variables.literal(parseFloat(code));
|
|
98599
|
+
}
|
|
98600
|
+
|
|
98601
|
+
if (term === nil) {
|
|
98602
|
+
return variables.literal(null);
|
|
98603
|
+
}
|
|
98604
|
+
|
|
98605
|
+
if (
|
|
98606
|
+
term === VariableName$1
|
|
98607
|
+
) {
|
|
98608
|
+
return variables.resolveName();
|
|
98609
|
+
}
|
|
98610
|
+
|
|
98611
|
+
if (
|
|
98612
|
+
term === Name$4 ||
|
|
98613
|
+
term === PropertyName
|
|
98614
|
+
) {
|
|
98615
|
+
return variables.declareName();
|
|
98616
|
+
}
|
|
98617
|
+
|
|
98618
|
+
if (
|
|
98619
|
+
term === expression0 ||
|
|
98620
|
+
term === PositiveUnaryTest
|
|
98621
|
+
) {
|
|
98622
|
+
if (variables.tokens.length > 0) {
|
|
98623
|
+
throw new Error('uncleared name');
|
|
98624
|
+
}
|
|
98625
|
+
}
|
|
98626
|
+
|
|
98627
|
+
if (term === expression0) {
|
|
98628
|
+
|
|
98629
|
+
let parent = variables;
|
|
98630
|
+
|
|
98631
|
+
while (parent.parent) {
|
|
98632
|
+
parent = parent.exitScope(code);
|
|
98633
|
+
}
|
|
98634
|
+
|
|
98635
|
+
return parent;
|
|
98636
|
+
}
|
|
98637
|
+
|
|
98638
|
+
return variables;
|
|
98639
|
+
}
|
|
98640
|
+
});
|
|
98641
|
+
}
|
|
98642
|
+
|
|
98643
|
+
const variableTracker = trackVariables({});
|
|
98644
|
+
|
|
98645
|
+
|
|
98646
|
+
// helpers //////////////
|
|
98647
|
+
|
|
98648
|
+
function getContextValue(variables, args) {
|
|
98649
|
+
|
|
98650
|
+
if (!args.length) {
|
|
98651
|
+
return variables.assign({
|
|
98652
|
+
value: null
|
|
98653
|
+
});
|
|
98654
|
+
}
|
|
98655
|
+
|
|
98656
|
+
if (args[0].name === 'Name') {
|
|
98657
|
+
args = extractNamedArgs(args, [ 'm', 'key' ]);
|
|
98658
|
+
}
|
|
98659
|
+
|
|
98660
|
+
if (args.length !== 2) {
|
|
98661
|
+
return variables.assign({
|
|
98662
|
+
value: null
|
|
98663
|
+
});
|
|
98664
|
+
}
|
|
98665
|
+
|
|
98666
|
+
const [
|
|
98667
|
+
context,
|
|
98668
|
+
key
|
|
98669
|
+
] = args;
|
|
98670
|
+
|
|
98671
|
+
const keyValue = key?.computedValue();
|
|
98672
|
+
const contextValue = context?.computedValue();
|
|
98673
|
+
|
|
98674
|
+
if (
|
|
98675
|
+
(!contextValue || typeof contextValue !== 'object') || typeof keyValue !== 'string'
|
|
98676
|
+
) {
|
|
98677
|
+
return variables.assign({
|
|
98678
|
+
value: null
|
|
98679
|
+
});
|
|
98680
|
+
}
|
|
98681
|
+
|
|
98682
|
+
return variables.assign({
|
|
98683
|
+
value: [ normalizeContextKey(keyValue), keyValue ].reduce((value, keyValue) => {
|
|
98684
|
+
return contextValue.get(keyValue) || value;
|
|
98685
|
+
}, null)
|
|
98686
|
+
});
|
|
98687
|
+
}
|
|
98688
|
+
|
|
98689
|
+
function extractNamedArgs(args, argNames) {
|
|
98690
|
+
|
|
98691
|
+
const context = {};
|
|
98692
|
+
|
|
98693
|
+
for (let i = 0; i < args.length; i += 2) {
|
|
98694
|
+
const [ name, value ] = args.slice(i, i + 2);
|
|
98695
|
+
|
|
98696
|
+
context[name.value] = value;
|
|
98697
|
+
}
|
|
98698
|
+
|
|
98699
|
+
return argNames.map(name => context[name]);
|
|
98700
|
+
}
|
|
98701
|
+
|
|
98702
|
+
function last(arr) {
|
|
98703
|
+
return arr[arr.length - 1];
|
|
98704
|
+
}
|
|
98705
|
+
|
|
98706
|
+
const feelHighlighting = styleTags({
|
|
98707
|
+
StringLiteral: tags.string,
|
|
98708
|
+
NumericLiteral: tags.number,
|
|
98709
|
+
BooleanLiteral: tags.bool,
|
|
98710
|
+
'AtLiteral!': tags.special(tags.string),
|
|
98711
|
+
CompareOp: tags.compareOperator,
|
|
98712
|
+
ArithOp: tags.arithmeticOperator,
|
|
98713
|
+
'for if then else some every satisfies between return': tags.controlKeyword,
|
|
98714
|
+
'in instance of and or': tags.operatorKeyword,
|
|
98715
|
+
function: tags.definitionKeyword,
|
|
98716
|
+
as: tags.keyword,
|
|
98717
|
+
'Type/...': tags.typeName,
|
|
98718
|
+
Wildcard: tags.special(tags.variableName),
|
|
98719
|
+
null: tags.null,
|
|
98720
|
+
LineComment: tags.lineComment,
|
|
98721
|
+
BlockComment: tags.blockComment,
|
|
98722
|
+
'VariableName! "?"': tags.variableName,
|
|
98723
|
+
'DateTimeConstructor! SpecialFunctionName!': tags.function(tags.special(tags.variableName)),
|
|
98724
|
+
'List Interval': tags.list,
|
|
98725
|
+
Context: tags.definition(tags.literal),
|
|
98726
|
+
'Name!': tags.definition(tags.variableName),
|
|
98727
|
+
'Key/Name! ContextEntryType/Name!': tags.definition(tags.propertyName),
|
|
98728
|
+
'PathExpression/VariableName!': tags.function(tags.propertyName),
|
|
98729
|
+
'FormalParameter/ParameterName!': tags.function(tags.definition(tags.variableName)),
|
|
98730
|
+
'( )': tags.paren,
|
|
98731
|
+
'[ ]': tags.squareBracket,
|
|
98732
|
+
'{ }': tags.brace,
|
|
98733
|
+
'.': tags.derefOperator,
|
|
98734
|
+
', ;': tags.separator,
|
|
98735
|
+
'..': tags.punctuation
|
|
98736
|
+
});
|
|
98737
|
+
|
|
98738
|
+
// This file was generated by lezer-generator. You probably shouldn't edit it.
|
|
98739
|
+
const spec_identifier = {__proto__:null,for:10, in:32, return:36, if:40, then:42, else:44, some:48, every:50, satisfies:56, or:60, and:64, between:72, instance:86, of:89, days:101, time:103, duration:105, years:107, months:109, date:111, list:117, context:123, function:130, null:156, true:332, false:332, "?":170, external:186, not:211};
|
|
98740
|
+
const parser = LRParser.deserialize({
|
|
98741
|
+
version: 14,
|
|
98742
|
+
states: "C|O`QYO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i!j!k!p#Z#]#_#c#g#r$O$P$Y$^$_$b$q$}%X%d%y%z!mlOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$P$Y$^$_$b$q$}%X%d%y%z!mmOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$P$Y$^$_$b$q$}%X%d%y%zR$U!x!moOPQWilu|}!]!a!b!c!g!h!i!j!k!p#Z#]#_#c#g#r$O$P$Y$^$_$b$q$}%X%d%y%zR#Oo",
|
|
98745
|
+
nodeNames: "⚠ LineComment BlockComment Expression ForExpression for InExpressions InExpression Name Identifier Identifier ArithOp ArithOp ArithOp ArithOp ArithOp in IterationContext return IfExpression if then else QuantifiedExpression some every InExpressions InExpression satisfies Disjunction or Conjunction and Comparison CompareOp CompareOp between PositiveUnaryTest ( PositiveUnaryTests ) ArithmeticExpression InstanceOfExpression instance of Type QualifiedName VariableName BacktickIdentifier SpecialType days time duration years months date > ListType list < ContextType context ContextEntryTypes ContextEntryType FunctionType function ArgumentTypes ArgumentType PathExpression ] FilterExpression [ FunctionInvocation SpecialFunctionName NamedParameters NamedParameter ParameterName PositionalParameters null NumericLiteral StringLiteral BooleanLiteral DateTimeLiteral DateTimeConstructor AtLiteral ? SimplePositiveUnaryTest Interval ParenthesizedExpression List FunctionDefinition FormalParameters FormalParameter external FunctionBody } { Context ContextEntry Key Name Identifier Expressions UnaryTests Wildcard not",
|
|
98746
|
+
maxTerm: 174,
|
|
98747
|
+
context: variableTracker,
|
|
98748
|
+
nodeProps: [
|
|
98749
|
+
["group", -17,4,19,23,29,31,33,41,42,68,70,72,85,86,88,89,90,97,"Expr",47,"Expr Expr",-5,78,79,80,81,82,"Expr Literal"],
|
|
98750
|
+
["closedBy", 38,")",71,"]",96,"}"],
|
|
98751
|
+
["openedBy", 40,"(",69,"[",95,"{"]
|
|
98752
|
+
],
|
|
98753
|
+
propSources: [feelHighlighting],
|
|
98754
|
+
skippedNodes: [0,1,2],
|
|
98755
|
+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;'S;=`-w<%lO,v~-]VOz,vz{-Y{!P,v!P!Q-r!Q;'S,v;'S;=`-w<%lO,v~-wOQ~~-zP;=`<%l,v~.SSP~OY-}Z;'S-};'S;=`.`<%lO-}~.cP;=`<%l-}~.kS$i~!O!P.w!Q![.f!g!h,P#X#Y,P~.zP!Q![+q~/SO$]~~/XO$t~R/`P!]QsP!_!`/cP/hOsPR/oP!YQsP!_!`/c~/wO$m~~/|O!i~~0RO!g~~0UVO#O0R#O#P0k#P#S0R#S#T1r#T;'S0R;'S;=`1w<%lO0R~0nWO#O0R#O#P0k#P#S0R#S#T1W#T;'S0R;'S;=`1};=`<%l0R<%lO0R~1]V$Z~O#O0R#O#P0k#P#S0R#S#T1r#T;'S0R;'S;=`1w<%lO0R~1wO$Z~~1zP;=`<%l0R~2QWO#O0R#O#P0k#P#S0R#S#T1r#T;'S0R;'S;=`1w;=`<%l0R<%lO0R~2oO#S~~2tO#R~",
|
|
98757
|
+
tokenizers: [propertyIdentifiers, identifiers$1, insertSemicolon, 0, 1],
|
|
98758
|
+
topRules: {"Expression":[0,3],"Expressions":[1,102],"UnaryTests":[2,103]},
|
|
98759
|
+
dialects: {camunda: 2568},
|
|
98760
|
+
dynamicPrecedences: {"31":-1,"68":1,"72":-1,"74":-1},
|
|
98761
|
+
specialized: [{term: 122, get: (value) => spec_identifier[value] || -1}],
|
|
98762
|
+
tokenPrec: 2571
|
|
98763
|
+
});
|
|
98764
|
+
|
|
98765
|
+
/**
|
|
98766
|
+
* @typedef {import('@lezer/common').Tree} Tree
|
|
98767
|
+
* @typedef {import('@codemirror/lint').Diagnostic} LintMessage
|
|
98768
|
+
*/
|
|
98769
|
+
|
|
98770
|
+
/**
|
|
98771
|
+
* Create an array of syntax errors in the given tree.
|
|
98772
|
+
*
|
|
98773
|
+
* @param {Tree} syntaxTree
|
|
98774
|
+
* @returns {LintMessage[]} array of syntax errors
|
|
98775
|
+
*/
|
|
98776
|
+
function lintSyntax(syntaxTree) {
|
|
98777
|
+
|
|
98778
|
+
const lintMessages = [];
|
|
98779
|
+
|
|
98780
|
+
syntaxTree.iterate({
|
|
98781
|
+
enter: ref => {
|
|
98782
|
+
const node = ref.node;
|
|
98783
|
+
|
|
98784
|
+
if (!node.type.isError) {
|
|
98785
|
+
return;
|
|
98786
|
+
}
|
|
98787
|
+
|
|
98788
|
+
const parent = node.parent;
|
|
98789
|
+
const next = getNextNode(node);
|
|
98790
|
+
|
|
98791
|
+
const message = {
|
|
98792
|
+
from: node.from,
|
|
98793
|
+
to: node.to,
|
|
98794
|
+
severity: 'error',
|
|
98795
|
+
type: 'Syntax Error'
|
|
98796
|
+
};
|
|
98797
|
+
|
|
98798
|
+
if (node.from !== node.to) {
|
|
98799
|
+
message.message = `Unrecognized token in <${parent.name}>`;
|
|
98800
|
+
} else if (next) {
|
|
98801
|
+
message.message = `Unrecognized token <${next.name}> in <${parent.name}>`;
|
|
98802
|
+
message.to = next.to;
|
|
98803
|
+
} else {
|
|
98804
|
+
const before = parent.enterUnfinishedNodesBefore(node.to);
|
|
98805
|
+
message.message = `Incomplete <${ (before || parent).name }>`;
|
|
98806
|
+
}
|
|
98807
|
+
|
|
98808
|
+
lintMessages.push(message);
|
|
98809
|
+
}
|
|
98810
|
+
});
|
|
98811
|
+
|
|
98812
|
+
return lintMessages;
|
|
98813
|
+
}
|
|
98814
|
+
|
|
98815
|
+
function getNextNode(node) {
|
|
98816
|
+
if (!node) {
|
|
98817
|
+
return null;
|
|
98818
|
+
}
|
|
98819
|
+
|
|
98820
|
+
return node.nextSibling || getNextNode(node.parent);
|
|
98821
|
+
}
|
|
98822
|
+
|
|
98823
|
+
/**
|
|
98824
|
+
* @typedef {object} Context
|
|
98825
|
+
* @property {function} report
|
|
98826
|
+
* @property {(from: number, to: number) => string} readContent
|
|
98827
|
+
* @property {(from: number, to: number, content: string) => void} updateContent
|
|
98828
|
+
*/
|
|
98829
|
+
|
|
98830
|
+
const RULE_NAME = 'first-item';
|
|
98831
|
+
|
|
98832
|
+
var firstItem = {
|
|
98833
|
+
create(/** @type {Context} */ context) {
|
|
98834
|
+
return {
|
|
98835
|
+
enter(node) {
|
|
98836
|
+
if (node.name !== 'FilterExpression') {
|
|
98837
|
+
return;
|
|
98838
|
+
}
|
|
98839
|
+
|
|
98840
|
+
const content = context.readContent(node.from, node.to);
|
|
98841
|
+
|
|
98842
|
+
if (zeroIndexPattern().test(content)) {
|
|
98843
|
+
const {
|
|
98844
|
+
from,
|
|
98845
|
+
to
|
|
98846
|
+
} = node;
|
|
98847
|
+
|
|
98848
|
+
context.report({
|
|
98849
|
+
from,
|
|
98850
|
+
to,
|
|
98851
|
+
message: 'First item is accessed via [1]',
|
|
98852
|
+
severity: 'warning',
|
|
98853
|
+
type: RULE_NAME,
|
|
98854
|
+
actions: [
|
|
98855
|
+
{
|
|
98856
|
+
name: 'fix',
|
|
98857
|
+
apply(_, start = from, end = to) {
|
|
98858
|
+
context.updateContent(start, end, content.replace(zeroIndexPattern(), '[1]'));
|
|
98859
|
+
}
|
|
98860
|
+
}
|
|
98861
|
+
]
|
|
98862
|
+
});
|
|
98863
|
+
}
|
|
98864
|
+
}
|
|
98865
|
+
};
|
|
98866
|
+
}
|
|
98867
|
+
};
|
|
98868
|
+
|
|
98869
|
+
function zeroIndexPattern() {
|
|
98870
|
+
return /\[\s*0\s*\]$/;
|
|
98871
|
+
}
|
|
98872
|
+
|
|
98873
|
+
/**
|
|
98874
|
+
* @typedef {import('@lezer/common').Tree} Tree
|
|
98875
|
+
* @typedef {import('@codemirror/lint').Diagnostic} LintMessage
|
|
98876
|
+
* @typedef {import('./index').LintAllContext} LintAllContext
|
|
98877
|
+
*/
|
|
98878
|
+
|
|
98879
|
+
const RULES = [
|
|
98880
|
+
firstItem
|
|
98881
|
+
];
|
|
98882
|
+
|
|
98883
|
+
/**
|
|
98884
|
+
* Create an array of messages reported from rules in the given tree.
|
|
98885
|
+
*
|
|
98886
|
+
* @param {LintAllContext} context
|
|
98887
|
+
* @returns {LintMessage[]} array of syntax errors
|
|
98888
|
+
*/
|
|
98889
|
+
function lintRules(context) {
|
|
98890
|
+
const {
|
|
98891
|
+
readContent,
|
|
98892
|
+
syntaxTree,
|
|
98893
|
+
updateContent
|
|
98894
|
+
} = context;
|
|
98895
|
+
|
|
98896
|
+
const lintMessages = [];
|
|
98897
|
+
|
|
98898
|
+
const ruleContext = {
|
|
98899
|
+
readContent,
|
|
98900
|
+
report: message => {
|
|
98901
|
+
lintMessages.push(message);
|
|
98902
|
+
},
|
|
98903
|
+
updateContent
|
|
98904
|
+
};
|
|
98905
|
+
|
|
98906
|
+
const rules = RULES.map(rule => rule.create(ruleContext));
|
|
98907
|
+
|
|
98908
|
+
syntaxTree.iterate({
|
|
98909
|
+
enter: ref => {
|
|
98910
|
+
for (const rule of rules) {
|
|
98911
|
+
rule.enter && rule.enter(ref);
|
|
98912
|
+
}
|
|
98913
|
+
},
|
|
98914
|
+
leave: ref => {
|
|
98915
|
+
for (const rule of rules) {
|
|
98916
|
+
rule.leave && rule.leave(ref);
|
|
98917
|
+
}
|
|
98918
|
+
}
|
|
98919
|
+
});
|
|
98920
|
+
|
|
98921
|
+
return lintMessages;
|
|
98922
|
+
}
|
|
98923
|
+
|
|
98924
|
+
/**
|
|
98925
|
+
* @typedef {import('@lezer/common').Tree} Tree
|
|
98926
|
+
* @typedef {import('@codemirror/lint').Diagnostic} LintMessage
|
|
98927
|
+
*/
|
|
98928
|
+
|
|
98929
|
+
/**
|
|
98930
|
+
* @typedef {object} LintAllContext
|
|
98931
|
+
* @property {Tree} syntaxTree
|
|
98932
|
+
* @property {(from: number, to: number) => string} readContent
|
|
98933
|
+
* @property {(from: number, to: number, content: string) => void} updateContent
|
|
98934
|
+
*/
|
|
98935
|
+
|
|
98936
|
+
/**
|
|
98937
|
+
* Generates lint messages for the given context.
|
|
98938
|
+
*
|
|
98939
|
+
* @param {LintAllContext} context
|
|
98940
|
+
* @returns {LintMessage[]} array of all lint messages
|
|
98941
|
+
*/
|
|
98942
|
+
function lintAll(context) {
|
|
98943
|
+
|
|
98944
|
+
const lintMessages = [
|
|
98945
|
+
...lintSyntax(context.syntaxTree),
|
|
98946
|
+
...lintRules(context)
|
|
98947
|
+
];
|
|
98948
|
+
|
|
98949
|
+
return lintMessages;
|
|
98950
|
+
}
|
|
98951
|
+
|
|
98952
|
+
/**
|
|
98953
|
+
* CodeMirror extension that provides linting for FEEL expressions.
|
|
98954
|
+
*
|
|
98955
|
+
* @returns {import('@codemirror/lint').LintSource} CodeMirror linting source
|
|
98956
|
+
*/
|
|
98957
|
+
const cmFeelLinter = () => editorView => {
|
|
98958
|
+
|
|
98959
|
+
// don't lint if the Editor is empty
|
|
98960
|
+
if (editorView.state.doc.length === 0) {
|
|
98961
|
+
return [];
|
|
98962
|
+
}
|
|
98963
|
+
|
|
98964
|
+
const tree = syntaxTree(editorView.state);
|
|
98965
|
+
|
|
98966
|
+
const messages = lintAll({
|
|
98967
|
+
syntaxTree: tree,
|
|
98968
|
+
readContent: (from, to) => editorView.state.sliceDoc(from, to),
|
|
98969
|
+
updateContent: (from, to, content) => editorView.dispatch({
|
|
98970
|
+
changes: { from, to, insert: content }
|
|
98971
|
+
})
|
|
98972
|
+
});
|
|
98973
|
+
|
|
98974
|
+
return messages.map(message => ({
|
|
98975
|
+
...message,
|
|
98976
|
+
source: message.type
|
|
98977
|
+
}));
|
|
98978
|
+
};
|
|
98979
|
+
|
|
98980
|
+
/**
|
|
98981
|
+
* A collection of FEEL-related [snippets](#autocomplete.snippet).
|
|
98982
|
+
*/
|
|
98983
|
+
const snippets = [snippetCompletion$1('function(${params}) ${body}', {
|
|
98984
|
+
label: 'function',
|
|
98985
|
+
detail: 'definition',
|
|
98986
|
+
type: 'keyword'
|
|
98987
|
+
}), snippetCompletion$1('for ${var} in ${collection} return ${value}', {
|
|
98988
|
+
label: 'for',
|
|
98989
|
+
detail: 'expression',
|
|
98990
|
+
type: 'keyword'
|
|
98991
|
+
}), snippetCompletion$1('every ${var} in ${collection} satisfies ${condition}', {
|
|
98992
|
+
label: 'every',
|
|
98993
|
+
detail: 'quantified expression',
|
|
98994
|
+
type: 'keyword'
|
|
98995
|
+
}), snippetCompletion$1('some ${var} in ${collection} satisfies ${condition}', {
|
|
98996
|
+
label: 'some',
|
|
98997
|
+
detail: 'quantified expression',
|
|
98998
|
+
type: 'keyword'
|
|
98999
|
+
}), snippetCompletion$1('if ${condition} then ${value} else ${other value}', {
|
|
99000
|
+
label: 'if',
|
|
99001
|
+
detail: 'block',
|
|
99002
|
+
type: 'keyword'
|
|
99003
|
+
}), snippetCompletion$1('{ ${key}: ${value} }', {
|
|
99004
|
+
label: 'context',
|
|
99005
|
+
detail: 'block',
|
|
99006
|
+
type: 'keyword'
|
|
99007
|
+
}), snippetCompletion$1('null', {
|
|
99008
|
+
label: 'null',
|
|
99009
|
+
detail: 'literal',
|
|
99010
|
+
type: 'keyword'
|
|
99011
|
+
}), snippetCompletion$1('true', {
|
|
99012
|
+
label: 'true',
|
|
99013
|
+
detail: 'literal',
|
|
99014
|
+
type: 'keyword'
|
|
99015
|
+
}), snippetCompletion$1('false', {
|
|
99016
|
+
label: 'false',
|
|
99017
|
+
detail: 'literal',
|
|
99018
|
+
type: 'keyword'
|
|
99019
|
+
})];
|
|
99020
|
+
|
|
99021
|
+
function _extends$1p() {
|
|
99022
|
+
_extends$1p = Object.assign ? Object.assign.bind() : function (target) {
|
|
99023
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
99024
|
+
var source = arguments[i];
|
|
99025
|
+
for (var key in source) {
|
|
99026
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
99027
|
+
target[key] = source[key];
|
|
99028
|
+
}
|
|
99029
|
+
}
|
|
99030
|
+
}
|
|
99031
|
+
return target;
|
|
99032
|
+
};
|
|
99033
|
+
return _extends$1p.apply(this, arguments);
|
|
99034
|
+
}
|
|
99035
|
+
|
|
99036
|
+
function contextualKeyword(options) {
|
|
99037
|
+
const {
|
|
99038
|
+
context: nodes,
|
|
99039
|
+
after,
|
|
99040
|
+
before,
|
|
99041
|
+
keyword
|
|
99042
|
+
} = options;
|
|
99043
|
+
return ifInside({
|
|
99044
|
+
nodes,
|
|
99045
|
+
before,
|
|
99046
|
+
after,
|
|
99047
|
+
keyword
|
|
99048
|
+
}, completeFromList([{
|
|
99049
|
+
label: keyword,
|
|
99050
|
+
type: 'keyword',
|
|
99051
|
+
boost: 10
|
|
99052
|
+
}]));
|
|
99053
|
+
}
|
|
99054
|
+
const keywordCompletions = [contextualKeyword({
|
|
99055
|
+
context: 'InExpression',
|
|
99056
|
+
keyword: 'in'
|
|
99057
|
+
}), contextualKeyword({
|
|
99058
|
+
context: 'IfExpression',
|
|
99059
|
+
keyword: 'then',
|
|
99060
|
+
after: 'if',
|
|
99061
|
+
before: 'else'
|
|
99062
|
+
}), contextualKeyword({
|
|
99063
|
+
context: 'IfExpression',
|
|
99064
|
+
keyword: 'else',
|
|
99065
|
+
after: 'then'
|
|
99066
|
+
}), contextualKeyword({
|
|
99067
|
+
context: 'QuantifiedExpression',
|
|
99068
|
+
keyword: 'satisfies'
|
|
99069
|
+
}), contextualKeyword({
|
|
99070
|
+
context: 'ForExpression',
|
|
99071
|
+
after: 'InExpressions',
|
|
99072
|
+
keyword: 'return'
|
|
99073
|
+
})];
|
|
99074
|
+
const dontComplete = ['StringLiteral', 'Identifier', 'LineComment', 'BlockComment', 'PathExpression', 'Context', 'Key', 'ParameterName'];
|
|
99075
|
+
const doComplete = ['Expr', 'ContextEntry'];
|
|
99076
|
+
function ifExpression(completionSource) {
|
|
99077
|
+
const allNodes = [...dontComplete, ...doComplete];
|
|
99078
|
+
return context => {
|
|
99079
|
+
const {
|
|
99080
|
+
state,
|
|
99081
|
+
pos
|
|
99082
|
+
} = context;
|
|
99083
|
+
const match = matchUp(syntaxTree(state).resolveInner(pos, -1), allNodes);
|
|
99084
|
+
if (match) {
|
|
99085
|
+
const [_, name] = match;
|
|
99086
|
+
if (dontComplete.includes(name)) {
|
|
99087
|
+
return null;
|
|
99088
|
+
}
|
|
99089
|
+
}
|
|
99090
|
+
return completionSource(context);
|
|
99091
|
+
};
|
|
99092
|
+
}
|
|
99093
|
+
function snippetCompletion(snippets) {
|
|
99094
|
+
return ifExpression(completeFromList(snippets.map(s => _extends$1p({}, s, {
|
|
99095
|
+
type: 'text'
|
|
99096
|
+
}))));
|
|
99097
|
+
}
|
|
99098
|
+
function matchLeft(node, position, nodes) {
|
|
99099
|
+
return matchChildren(node, position, nodes, -1);
|
|
99100
|
+
}
|
|
99101
|
+
function matchRight(node, position, nodes) {
|
|
99102
|
+
return matchChildren(node, position, nodes, 1);
|
|
99103
|
+
}
|
|
99104
|
+
function matchChildren(node, position, nodes, direction) {
|
|
99105
|
+
let child = node[direction > 0 ? 'childAfter' : 'childBefore'](position);
|
|
99106
|
+
while (child) {
|
|
99107
|
+
if (nodes.includes(child.name)) {
|
|
99108
|
+
return child;
|
|
99109
|
+
}
|
|
99110
|
+
if (child.type.isError && child.firstChild) {
|
|
99111
|
+
if (nodes.includes(child.firstChild.name)) {
|
|
99112
|
+
return child.firstChild;
|
|
99113
|
+
}
|
|
99114
|
+
}
|
|
99115
|
+
child = child[direction > 0 ? 'nextSibling' : 'prevSibling'];
|
|
99116
|
+
}
|
|
99117
|
+
return null;
|
|
99118
|
+
}
|
|
99119
|
+
function matchUp(node, nodeNames) {
|
|
99120
|
+
if (!Array.isArray(nodeNames)) {
|
|
97589
99121
|
nodeNames = [nodeNames];
|
|
97590
99122
|
}
|
|
97591
99123
|
for (; node; node = node.parent) {
|
|
@@ -97636,7 +99168,7 @@
|
|
|
97636
99168
|
* extended with highlighting and indentation information.
|
|
97637
99169
|
*/
|
|
97638
99170
|
const feelLanguage = LRLanguage.define({
|
|
97639
|
-
parser: parser
|
|
99171
|
+
parser: parser.configure({
|
|
97640
99172
|
props: [indentNodeProp.add({
|
|
97641
99173
|
'Context': delimitedIndent({
|
|
97642
99174
|
closing: '}'
|
|
@@ -107373,16 +108905,16 @@
|
|
|
107373
108905
|
parserDialect: 'camunda'
|
|
107374
108906
|
};
|
|
107375
108907
|
|
|
107376
|
-
/**
|
|
107377
|
-
* @param {Object} props
|
|
107378
|
-
* @param {djs.model.Base|Array<djs.model.Base>} [props.element]
|
|
107379
|
-
* @param {Injector} props.injector
|
|
107380
|
-
* @param { (djs.model.Base) => Array<PropertiesProvider> } props.getProviders
|
|
107381
|
-
* @param {Object} props.layoutConfig
|
|
107382
|
-
* @param {Object} props.descriptionConfig
|
|
107383
|
-
* @param {Object} props.tooltipConfig
|
|
107384
|
-
* @param {HTMLElement} props.feelPopupContainer
|
|
107385
|
-
* @param {Function} props.getFeelPopupLinks
|
|
108908
|
+
/**
|
|
108909
|
+
* @param {Object} props
|
|
108910
|
+
* @param {djs.model.Base|Array<djs.model.Base>} [props.element]
|
|
108911
|
+
* @param {Injector} props.injector
|
|
108912
|
+
* @param { (djs.model.Base) => Array<PropertiesProvider> } props.getProviders
|
|
108913
|
+
* @param {Object} props.layoutConfig
|
|
108914
|
+
* @param {Object} props.descriptionConfig
|
|
108915
|
+
* @param {Object} props.tooltipConfig
|
|
108916
|
+
* @param {HTMLElement} props.feelPopupContainer
|
|
108917
|
+
* @param {Function} props.getFeelPopupLinks
|
|
107386
108918
|
*/
|
|
107387
108919
|
function BpmnPropertiesPanel(props) {
|
|
107388
108920
|
const {
|
|
@@ -107404,8 +108936,8 @@
|
|
|
107404
108936
|
});
|
|
107405
108937
|
const selectedElement = state.selectedElement;
|
|
107406
108938
|
|
|
107407
|
-
/**
|
|
107408
|
-
* @param {djs.model.Base | Array<djs.model.Base>} element
|
|
108939
|
+
/**
|
|
108940
|
+
* @param {djs.model.Base | Array<djs.model.Base>} element
|
|
107409
108941
|
*/
|
|
107410
108942
|
const _update = element => {
|
|
107411
108943
|
if (!element) {
|
|
@@ -107593,10 +109125,10 @@
|
|
|
107593
109125
|
|
|
107594
109126
|
const DEFAULT_PRIORITY$1 = 1000;
|
|
107595
109127
|
|
|
107596
|
-
/**
|
|
107597
|
-
* @typedef { import('@bpmn-io/properties-panel').GroupDefinition } GroupDefinition
|
|
107598
|
-
* @typedef { import('@bpmn-io/properties-panel').ListGroupDefinition } ListGroupDefinition
|
|
107599
|
-
* @typedef { { getGroups: (ModdleElement) => (Array{GroupDefinition|ListGroupDefinition}) => Array{GroupDefinition|ListGroupDefinition}) } PropertiesProvider
|
|
109128
|
+
/**
|
|
109129
|
+
* @typedef { import('@bpmn-io/properties-panel').GroupDefinition } GroupDefinition
|
|
109130
|
+
* @typedef { import('@bpmn-io/properties-panel').ListGroupDefinition } ListGroupDefinition
|
|
109131
|
+
* @typedef { { getGroups: (ModdleElement) => (Array{GroupDefinition|ListGroupDefinition}) => Array{GroupDefinition|ListGroupDefinition}) } PropertiesProvider
|
|
107600
109132
|
*/
|
|
107601
109133
|
|
|
107602
109134
|
class BpmnPropertiesPanelRenderer {
|
|
@@ -107635,10 +109167,10 @@
|
|
|
107635
109167
|
});
|
|
107636
109168
|
}
|
|
107637
109169
|
|
|
107638
|
-
/**
|
|
107639
|
-
* Attach the properties panel to a parent node.
|
|
107640
|
-
*
|
|
107641
|
-
* @param {HTMLElement} container
|
|
109170
|
+
/**
|
|
109171
|
+
* Attach the properties panel to a parent node.
|
|
109172
|
+
*
|
|
109173
|
+
* @param {HTMLElement} container
|
|
107642
109174
|
*/
|
|
107643
109175
|
attachTo(container) {
|
|
107644
109176
|
if (!container) {
|
|
@@ -107663,8 +109195,8 @@
|
|
|
107663
109195
|
this._eventBus.fire('propertiesPanel.attach');
|
|
107664
109196
|
}
|
|
107665
109197
|
|
|
107666
|
-
/**
|
|
107667
|
-
* Detach the properties panel from its parent node.
|
|
109198
|
+
/**
|
|
109199
|
+
* Detach the properties panel from its parent node.
|
|
107668
109200
|
*/
|
|
107669
109201
|
detach() {
|
|
107670
109202
|
const parentNode = this._container.parentNode;
|
|
@@ -107674,11 +109206,11 @@
|
|
|
107674
109206
|
}
|
|
107675
109207
|
}
|
|
107676
109208
|
|
|
107677
|
-
/**
|
|
107678
|
-
* Register a new properties provider to the properties panel.
|
|
107679
|
-
*
|
|
107680
|
-
* @param {Number} [priority]
|
|
107681
|
-
* @param {PropertiesProvider} provider
|
|
109209
|
+
/**
|
|
109210
|
+
* Register a new properties provider to the properties panel.
|
|
109211
|
+
*
|
|
109212
|
+
* @param {Number} [priority]
|
|
109213
|
+
* @param {PropertiesProvider} provider
|
|
107682
109214
|
*/
|
|
107683
109215
|
registerProvider(priority, provider) {
|
|
107684
109216
|
if (!provider) {
|
|
@@ -107695,9 +109227,9 @@
|
|
|
107695
109227
|
this._eventBus.fire('propertiesPanel.providersChanged');
|
|
107696
109228
|
}
|
|
107697
109229
|
|
|
107698
|
-
/**
|
|
107699
|
-
* Updates the layout of the properties panel.
|
|
107700
|
-
* @param {Object} layout
|
|
109230
|
+
/**
|
|
109231
|
+
* Updates the layout of the properties panel.
|
|
109232
|
+
* @param {Object} layout
|
|
107701
109233
|
*/
|
|
107702
109234
|
setLayout(layout) {
|
|
107703
109235
|
this._eventBus.fire('propertiesPanel.setLayout', {
|
|
@@ -107747,12 +109279,12 @@
|
|
|
107747
109279
|
return element && element.isImplicit;
|
|
107748
109280
|
}
|
|
107749
109281
|
|
|
107750
|
-
/**
|
|
107751
|
-
* Setup keyboard bindings (undo, redo) on the given container.
|
|
107752
|
-
*
|
|
107753
|
-
* @param {Element} container
|
|
107754
|
-
* @param {EventBus} eventBus
|
|
107755
|
-
* @param {CommandStack} commandStack
|
|
109282
|
+
/**
|
|
109283
|
+
* Setup keyboard bindings (undo, redo) on the given container.
|
|
109284
|
+
*
|
|
109285
|
+
* @param {Element} container
|
|
109286
|
+
* @param {EventBus} eventBus
|
|
109287
|
+
* @param {CommandStack} commandStack
|
|
107756
109288
|
*/
|
|
107757
109289
|
function setupKeyboard(container, eventBus, commandStack) {
|
|
107758
109290
|
function cancel(event) {
|
|
@@ -107777,14 +109309,14 @@
|
|
|
107777
109309
|
});
|
|
107778
109310
|
}
|
|
107779
109311
|
|
|
107780
|
-
/**
|
|
107781
|
-
* A handler that combines and executes multiple commands.
|
|
107782
|
-
*
|
|
107783
|
-
* All updates are bundled on the command stack and executed in one step.
|
|
107784
|
-
* This also makes it possible to revert the changes in one step.
|
|
107785
|
-
*
|
|
107786
|
-
* Example use case: remove the camunda:formKey attribute and in addition
|
|
107787
|
-
* add all form fields needed for the camunda:formData property.
|
|
109312
|
+
/**
|
|
109313
|
+
* A handler that combines and executes multiple commands.
|
|
109314
|
+
*
|
|
109315
|
+
* All updates are bundled on the command stack and executed in one step.
|
|
109316
|
+
* This also makes it possible to revert the changes in one step.
|
|
109317
|
+
*
|
|
109318
|
+
* Example use case: remove the camunda:formKey attribute and in addition
|
|
109319
|
+
* add all form fields needed for the camunda:formData property.
|
|
107788
109320
|
*/
|
|
107789
109321
|
let MultiCommandHandler$1 = class MultiCommandHandler {
|
|
107790
109322
|
constructor(commandStack) {
|
|
@@ -107820,15 +109352,15 @@
|
|
|
107820
109352
|
propertiesPanel: ['type', BpmnPropertiesPanelRenderer]
|
|
107821
109353
|
};
|
|
107822
109354
|
|
|
107823
|
-
/**
|
|
107824
|
-
* Create a new element and (optionally) set its parent.
|
|
107825
|
-
*
|
|
107826
|
-
* @param {string} type
|
|
107827
|
-
* @param {Object} properties
|
|
107828
|
-
* @param {import('bpmn-js/lib/model/Types').ModdleElement} parent
|
|
107829
|
-
* @param {import('bpmn-js/lib/features/modeling/BpmnFactory').default} bpmnFactory
|
|
107830
|
-
*
|
|
107831
|
-
* @returns {import('bpmn-js/lib/model/Types').ModdleElement}
|
|
109355
|
+
/**
|
|
109356
|
+
* Create a new element and (optionally) set its parent.
|
|
109357
|
+
*
|
|
109358
|
+
* @param {string} type
|
|
109359
|
+
* @param {Object} properties
|
|
109360
|
+
* @param {import('bpmn-js/lib/model/Types').ModdleElement} parent
|
|
109361
|
+
* @param {import('bpmn-js/lib/features/modeling/BpmnFactory').default} bpmnFactory
|
|
109362
|
+
*
|
|
109363
|
+
* @returns {import('bpmn-js/lib/model/Types').ModdleElement}
|
|
107832
109364
|
*/
|
|
107833
109365
|
function createElement$1(type, properties, parent, bpmnFactory) {
|
|
107834
109366
|
const element = bpmnFactory.create(type, properties);
|
|
@@ -107838,8 +109370,8 @@
|
|
|
107838
109370
|
return element;
|
|
107839
109371
|
}
|
|
107840
109372
|
|
|
107841
|
-
/**
|
|
107842
|
-
* generate a semantic id with given prefix
|
|
109373
|
+
/**
|
|
109374
|
+
* generate a semantic id with given prefix
|
|
107843
109375
|
*/
|
|
107844
109376
|
function nextId$1(prefix) {
|
|
107845
109377
|
const ids = new Ids$1([32, 32, 1]);
|
|
@@ -107865,32 +109397,32 @@
|
|
|
107865
109397
|
return elements.find(element => element.id === id);
|
|
107866
109398
|
}
|
|
107867
109399
|
|
|
107868
|
-
/**
|
|
107869
|
-
* createOrUpdateFormalExpression - upserts a specific formal expression
|
|
107870
|
-
*
|
|
107871
|
-
* If the value is falsy, the formal expression is removed.
|
|
107872
|
-
*
|
|
107873
|
-
* @param {djs.model.Base} element
|
|
107874
|
-
* @param {ModdleElement} moddleElement
|
|
107875
|
-
* @param {string} propertyName
|
|
107876
|
-
* @param {string} newValue
|
|
107877
|
-
* @param {BpmnFactory} bpmnFactory
|
|
107878
|
-
* @param {CommandStack} commandStack
|
|
109400
|
+
/**
|
|
109401
|
+
* createOrUpdateFormalExpression - upserts a specific formal expression
|
|
109402
|
+
*
|
|
109403
|
+
* If the value is falsy, the formal expression is removed.
|
|
109404
|
+
*
|
|
109405
|
+
* @param {djs.model.Base} element
|
|
109406
|
+
* @param {ModdleElement} moddleElement
|
|
109407
|
+
* @param {string} propertyName
|
|
109408
|
+
* @param {string} newValue
|
|
109409
|
+
* @param {BpmnFactory} bpmnFactory
|
|
109410
|
+
* @param {CommandStack} commandStack
|
|
107879
109411
|
*/
|
|
107880
109412
|
function createOrUpdateFormalExpression(element, moddleElement, propertyName, newValue, bpmnFactory, commandStack) {
|
|
107881
109413
|
return commandStack.execute('element.updateModdleProperties', createOrUpdateFormalExpressionCommand(element, moddleElement, propertyName, newValue, bpmnFactory));
|
|
107882
109414
|
}
|
|
107883
109415
|
|
|
107884
|
-
/**
|
|
107885
|
-
* createOrUpdateFormalExpressionCommand - creates a command to upsert a specific formal expression
|
|
107886
|
-
*
|
|
107887
|
-
* If the value is falsy, the formal expression is removed.
|
|
107888
|
-
*
|
|
107889
|
-
* @param {djs.model.Base} element
|
|
107890
|
-
* @param {ModdleElement} moddleElement
|
|
107891
|
-
* @param {string} propertyName
|
|
107892
|
-
* @param {string} newValue
|
|
107893
|
-
* @param {BpmnFactory} bpmnFactory
|
|
109416
|
+
/**
|
|
109417
|
+
* createOrUpdateFormalExpressionCommand - creates a command to upsert a specific formal expression
|
|
109418
|
+
*
|
|
109419
|
+
* If the value is falsy, the formal expression is removed.
|
|
109420
|
+
*
|
|
109421
|
+
* @param {djs.model.Base} element
|
|
109422
|
+
* @param {ModdleElement} moddleElement
|
|
109423
|
+
* @param {string} propertyName
|
|
109424
|
+
* @param {string} newValue
|
|
109425
|
+
* @param {BpmnFactory} bpmnFactory
|
|
107894
109426
|
*/
|
|
107895
109427
|
function createOrUpdateFormalExpressionCommand(element, moddleElement, propertyName, newValue, bpmnFactory) {
|
|
107896
109428
|
const expressionProps = {};
|
|
@@ -107926,12 +109458,12 @@
|
|
|
107926
109458
|
};
|
|
107927
109459
|
}
|
|
107928
109460
|
|
|
107929
|
-
/**
|
|
107930
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
109461
|
+
/**
|
|
109462
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
107931
109463
|
*/
|
|
107932
109464
|
|
|
107933
|
-
/**
|
|
107934
|
-
* @returns {Array<Entry>} entries
|
|
109465
|
+
/**
|
|
109466
|
+
* @returns {Array<Entry>} entries
|
|
107935
109467
|
*/
|
|
107936
109468
|
function AdHocCompletionProps$1(props) {
|
|
107937
109469
|
const {
|
|
@@ -108096,12 +109628,12 @@
|
|
|
108096
109628
|
return compensateEventDefinition && compensateEventDefinition.get('activityRef');
|
|
108097
109629
|
}
|
|
108098
109630
|
|
|
108099
|
-
/**
|
|
108100
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
109631
|
+
/**
|
|
109632
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
108101
109633
|
*/
|
|
108102
109634
|
|
|
108103
|
-
/**
|
|
108104
|
-
* @returns {Array<Entry>} entries
|
|
109635
|
+
/**
|
|
109636
|
+
* @returns {Array<Entry>} entries
|
|
108105
109637
|
*/
|
|
108106
109638
|
function CompensationProps(props) {
|
|
108107
109639
|
const {
|
|
@@ -108211,12 +109743,12 @@
|
|
|
108211
109743
|
return getFlowElements(element, 'bpmn:BoundaryEvent');
|
|
108212
109744
|
}
|
|
108213
109745
|
|
|
108214
|
-
/**
|
|
108215
|
-
* Checks whether an Activity is attaching a CompensateEvent of the parent container.
|
|
108216
|
-
*
|
|
108217
|
-
* @param {ModdleElement} activity
|
|
108218
|
-
* @param {Array<ModdleElement>} boundaryEvents
|
|
108219
|
-
* @returns {Boolean}
|
|
109746
|
+
/**
|
|
109747
|
+
* Checks whether an Activity is attaching a CompensateEvent of the parent container.
|
|
109748
|
+
*
|
|
109749
|
+
* @param {ModdleElement} activity
|
|
109750
|
+
* @param {Array<ModdleElement>} boundaryEvents
|
|
109751
|
+
* @returns {Boolean}
|
|
108220
109752
|
*/
|
|
108221
109753
|
function hasCompensationEventAttached(activity, boundaryEvents) {
|
|
108222
109754
|
const {
|
|
@@ -108231,15 +109763,15 @@
|
|
|
108231
109763
|
});
|
|
108232
109764
|
}
|
|
108233
109765
|
|
|
108234
|
-
/**
|
|
108235
|
-
* Checks whether an Activity can be compensated. That's the case when it is
|
|
108236
|
-
* a) a CallActivity
|
|
108237
|
-
* b) a SubProcess, when it is not event based and not a compensation
|
|
108238
|
-
* c) any other Activity, when it is attaching a CompensateEvent of the parent container
|
|
108239
|
-
*
|
|
108240
|
-
* @param {ModdleElement} activity
|
|
108241
|
-
* @param {Array<ModdleElement>} boundaryEvents
|
|
108242
|
-
* @returns {Boolean}
|
|
109766
|
+
/**
|
|
109767
|
+
* Checks whether an Activity can be compensated. That's the case when it is
|
|
109768
|
+
* a) a CallActivity
|
|
109769
|
+
* b) a SubProcess, when it is not event based and not a compensation
|
|
109770
|
+
* c) any other Activity, when it is attaching a CompensateEvent of the parent container
|
|
109771
|
+
*
|
|
109772
|
+
* @param {ModdleElement} activity
|
|
109773
|
+
* @param {Array<ModdleElement>} boundaryEvents
|
|
109774
|
+
* @returns {Boolean}
|
|
108243
109775
|
*/
|
|
108244
109776
|
function canBeCompensated(activity, boundaryEvents) {
|
|
108245
109777
|
return is$4(activity, 'bpmn:CallActivity') || is$4(activity, 'bpmn:SubProcess') && !activity.triggeredByEvent && !activity.isForCompensation || hasCompensationEventAttached(activity, boundaryEvents);
|
|
@@ -108252,11 +109784,11 @@
|
|
|
108252
109784
|
});
|
|
108253
109785
|
}
|
|
108254
109786
|
|
|
108255
|
-
/**
|
|
108256
|
-
* Retrieves all possible activities to reference for a Compensation.
|
|
108257
|
-
*
|
|
108258
|
-
* @param {djs.model.Base} element
|
|
108259
|
-
* @returns {Array<ModdleElement>}
|
|
109787
|
+
/**
|
|
109788
|
+
* Retrieves all possible activities to reference for a Compensation.
|
|
109789
|
+
*
|
|
109790
|
+
* @param {djs.model.Base} element
|
|
109791
|
+
* @returns {Array<ModdleElement>}
|
|
108260
109792
|
*/
|
|
108261
109793
|
function findActivityRefs(element) {
|
|
108262
109794
|
const businessObject = getBusinessObject$1(element);
|
|
@@ -108276,13 +109808,13 @@
|
|
|
108276
109808
|
return activities;
|
|
108277
109809
|
}
|
|
108278
109810
|
|
|
108279
|
-
/**
|
|
108280
|
-
* Retrieves an option label in the form
|
|
108281
|
-
* a) with name: "my Task (id=Task_1)"
|
|
108282
|
-
* b) without name: "(id=Task_1)"
|
|
108283
|
-
*
|
|
108284
|
-
* @param {ModdleElement} activity
|
|
108285
|
-
* @returns {String}
|
|
109811
|
+
/**
|
|
109812
|
+
* Retrieves an option label in the form
|
|
109813
|
+
* a) with name: "my Task (id=Task_1)"
|
|
109814
|
+
* b) without name: "(id=Task_1)"
|
|
109815
|
+
*
|
|
109816
|
+
* @param {ModdleElement} activity
|
|
109817
|
+
* @returns {String}
|
|
108286
109818
|
*/
|
|
108287
109819
|
function createOptionLabel(activity) {
|
|
108288
109820
|
const {
|
|
@@ -108297,12 +109829,12 @@
|
|
|
108297
109829
|
|
|
108298
109830
|
const DOCUMENTATION_TEXT_FORMAT = 'text/plain';
|
|
108299
109831
|
|
|
108300
|
-
/**
|
|
108301
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
109832
|
+
/**
|
|
109833
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
108302
109834
|
*/
|
|
108303
109835
|
|
|
108304
|
-
/**
|
|
108305
|
-
* @returns {Array<Entry>} entries
|
|
109836
|
+
/**
|
|
109837
|
+
* @returns {Array<Entry>} entries
|
|
108306
109838
|
*/
|
|
108307
109839
|
function DocumentationProps(props) {
|
|
108308
109840
|
const {
|
|
@@ -108373,12 +109905,12 @@
|
|
|
108373
109905
|
});
|
|
108374
109906
|
}
|
|
108375
109907
|
|
|
108376
|
-
/**
|
|
108377
|
-
* Retrieves a documentation element from a given moddle element.
|
|
108378
|
-
*
|
|
108379
|
-
* @param {ModdleElement} businessObject
|
|
108380
|
-
*
|
|
108381
|
-
* @returns {ModdleElement} documentation element inside the given moddle element.
|
|
109908
|
+
/**
|
|
109909
|
+
* Retrieves a documentation element from a given moddle element.
|
|
109910
|
+
*
|
|
109911
|
+
* @param {ModdleElement} businessObject
|
|
109912
|
+
*
|
|
109913
|
+
* @returns {ModdleElement} documentation element inside the given moddle element.
|
|
108382
109914
|
*/
|
|
108383
109915
|
function getDocumentation(businessObject) {
|
|
108384
109916
|
return function () {
|
|
@@ -108387,10 +109919,10 @@
|
|
|
108387
109919
|
};
|
|
108388
109920
|
}
|
|
108389
109921
|
|
|
108390
|
-
/**
|
|
108391
|
-
* Sets a documentation element for a given moddle element.
|
|
108392
|
-
*
|
|
108393
|
-
* @param {ModdleElement} businessObject
|
|
109922
|
+
/**
|
|
109923
|
+
* Sets a documentation element for a given moddle element.
|
|
109924
|
+
*
|
|
109925
|
+
* @param {ModdleElement} businessObject
|
|
108394
109926
|
*/
|
|
108395
109927
|
function setDocumentation(element, businessObject, bpmnFactory, commandStack) {
|
|
108396
109928
|
return function (value) {
|
|
@@ -108436,12 +109968,12 @@
|
|
|
108436
109968
|
const EMPTY_OPTION$4 = '';
|
|
108437
109969
|
const CREATE_NEW_OPTION$4 = 'create-new';
|
|
108438
109970
|
|
|
108439
|
-
/**
|
|
108440
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
109971
|
+
/**
|
|
109972
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
108441
109973
|
*/
|
|
108442
109974
|
|
|
108443
|
-
/**
|
|
108444
|
-
* @returns {Array<Entry>} entries
|
|
109975
|
+
/**
|
|
109976
|
+
* @returns {Array<Entry>} entries
|
|
108445
109977
|
*/
|
|
108446
109978
|
function ErrorProps$2(props) {
|
|
108447
109979
|
const {
|
|
@@ -108617,12 +110149,12 @@
|
|
|
108617
110149
|
|
|
108618
110150
|
const CREATE_NEW_OPTION$3 = 'create-new';
|
|
108619
110151
|
|
|
108620
|
-
/**
|
|
108621
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
110152
|
+
/**
|
|
110153
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
108622
110154
|
*/
|
|
108623
110155
|
|
|
108624
|
-
/**
|
|
108625
|
-
* @returns {Array<Entry>} entries
|
|
110156
|
+
/**
|
|
110157
|
+
* @returns {Array<Entry>} entries
|
|
108626
110158
|
*/
|
|
108627
110159
|
function EscalationProps$2(props) {
|
|
108628
110160
|
const {
|
|
@@ -108795,12 +110327,12 @@
|
|
|
108795
110327
|
return sortBy(elements, e => (e.name || '').toLowerCase());
|
|
108796
110328
|
}
|
|
108797
110329
|
|
|
108798
|
-
/**
|
|
108799
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
110330
|
+
/**
|
|
110331
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
108800
110332
|
*/
|
|
108801
110333
|
|
|
108802
|
-
/**
|
|
108803
|
-
* @returns {Array<Entry>} entries
|
|
110334
|
+
/**
|
|
110335
|
+
* @returns {Array<Entry>} entries
|
|
108804
110336
|
*/
|
|
108805
110337
|
function ExecutableProps(props) {
|
|
108806
110338
|
const {
|
|
@@ -108871,14 +110403,14 @@
|
|
|
108871
110403
|
// for ID validation as per BPMN Schema (QName - Namespace)
|
|
108872
110404
|
const ID_REGEX = /^[a-z_][\w-.]*$/i;
|
|
108873
110405
|
|
|
108874
|
-
/**
|
|
108875
|
-
* checks whether the id value is valid
|
|
108876
|
-
*
|
|
108877
|
-
* @param {ModdleElement} element
|
|
108878
|
-
* @param {String} idValue
|
|
108879
|
-
* @param {Function} translate
|
|
108880
|
-
*
|
|
108881
|
-
* @return {String} error message
|
|
110406
|
+
/**
|
|
110407
|
+
* checks whether the id value is valid
|
|
110408
|
+
*
|
|
110409
|
+
* @param {ModdleElement} element
|
|
110410
|
+
* @param {String} idValue
|
|
110411
|
+
* @param {Function} translate
|
|
110412
|
+
*
|
|
110413
|
+
* @return {String} error message
|
|
108882
110414
|
*/
|
|
108883
110415
|
function isIdValid(element, idValue, translate) {
|
|
108884
110416
|
const assigned = element.$model.ids.assigned(idValue);
|
|
@@ -108906,12 +110438,12 @@
|
|
|
108906
110438
|
return SPACE_REGEX$1.test(value);
|
|
108907
110439
|
}
|
|
108908
110440
|
|
|
108909
|
-
/**
|
|
108910
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
110441
|
+
/**
|
|
110442
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
108911
110443
|
*/
|
|
108912
110444
|
|
|
108913
|
-
/**
|
|
108914
|
-
* @returns {Array<Entry>} entries
|
|
110445
|
+
/**
|
|
110446
|
+
* @returns {Array<Entry>} entries
|
|
108915
110447
|
*/
|
|
108916
110448
|
function IdProps$1() {
|
|
108917
110449
|
return [{
|
|
@@ -108953,12 +110485,12 @@
|
|
|
108953
110485
|
});
|
|
108954
110486
|
}
|
|
108955
110487
|
|
|
108956
|
-
/**
|
|
108957
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
110488
|
+
/**
|
|
110489
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
108958
110490
|
*/
|
|
108959
110491
|
|
|
108960
|
-
/**
|
|
108961
|
-
* @returns {Array<Entry>} entries
|
|
110492
|
+
/**
|
|
110493
|
+
* @returns {Array<Entry>} entries
|
|
108962
110494
|
*/
|
|
108963
110495
|
function LinkProps(props) {
|
|
108964
110496
|
const {
|
|
@@ -109006,12 +110538,12 @@
|
|
|
109006
110538
|
const EMPTY_OPTION$3 = '';
|
|
109007
110539
|
const CREATE_NEW_OPTION$2 = 'create-new';
|
|
109008
110540
|
|
|
109009
|
-
/**
|
|
109010
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
110541
|
+
/**
|
|
110542
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
109011
110543
|
*/
|
|
109012
110544
|
|
|
109013
|
-
/**
|
|
109014
|
-
* @returns {Array<Entry>} entries
|
|
110545
|
+
/**
|
|
110546
|
+
* @returns {Array<Entry>} entries
|
|
109015
110547
|
*/
|
|
109016
110548
|
function MessageProps$1(props) {
|
|
109017
110549
|
const {
|
|
@@ -109154,12 +110686,12 @@
|
|
|
109154
110686
|
return sortBy(elements, e => (e.name || '').toLowerCase());
|
|
109155
110687
|
}
|
|
109156
110688
|
|
|
109157
|
-
/**
|
|
109158
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
110689
|
+
/**
|
|
110690
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
109159
110691
|
*/
|
|
109160
110692
|
|
|
109161
|
-
/**
|
|
109162
|
-
* @returns {Array<Entry>} entries
|
|
110693
|
+
/**
|
|
110694
|
+
* @returns {Array<Entry>} entries
|
|
109163
110695
|
*/
|
|
109164
110696
|
function MultiInstanceProps$2(props) {
|
|
109165
110697
|
const {
|
|
@@ -109230,45 +110762,45 @@
|
|
|
109230
110762
|
|
|
109231
110763
|
// generic ///////////////////////////
|
|
109232
110764
|
|
|
109233
|
-
/**
|
|
109234
|
-
* isMultiInstanceSupported - check whether given element supports MultiInstanceLoopCharacteristics.
|
|
109235
|
-
*
|
|
109236
|
-
* @param {djs.model.Base} element
|
|
109237
|
-
* @return {boolean}
|
|
110765
|
+
/**
|
|
110766
|
+
* isMultiInstanceSupported - check whether given element supports MultiInstanceLoopCharacteristics.
|
|
110767
|
+
*
|
|
110768
|
+
* @param {djs.model.Base} element
|
|
110769
|
+
* @return {boolean}
|
|
109238
110770
|
*/
|
|
109239
110771
|
function isMultiInstanceSupported$1(element) {
|
|
109240
110772
|
const loopCharacteristics = getLoopCharacteristics$2(element);
|
|
109241
110773
|
return !!loopCharacteristics && is$4(loopCharacteristics, 'bpmn:MultiInstanceLoopCharacteristics');
|
|
109242
110774
|
}
|
|
109243
110775
|
|
|
109244
|
-
/**
|
|
109245
|
-
* getBody - get the body of a given expression.
|
|
109246
|
-
*
|
|
109247
|
-
* @param {ModdleElement<bpmn:FormalExpression>} expression
|
|
109248
|
-
* @return {string} the body (value) of the expression
|
|
110776
|
+
/**
|
|
110777
|
+
* getBody - get the body of a given expression.
|
|
110778
|
+
*
|
|
110779
|
+
* @param {ModdleElement<bpmn:FormalExpression>} expression
|
|
110780
|
+
* @return {string} the body (value) of the expression
|
|
109249
110781
|
*/
|
|
109250
110782
|
function getBody(expression) {
|
|
109251
110783
|
return expression && expression.get('body');
|
|
109252
110784
|
}
|
|
109253
110785
|
|
|
109254
|
-
/**
|
|
109255
|
-
* getProperty - get a property value of the loop characteristics.
|
|
109256
|
-
*
|
|
109257
|
-
* @param {djs.model.Base} element
|
|
109258
|
-
* @param {string} propertyName
|
|
109259
|
-
*
|
|
109260
|
-
* @return {any} the property value
|
|
110786
|
+
/**
|
|
110787
|
+
* getProperty - get a property value of the loop characteristics.
|
|
110788
|
+
*
|
|
110789
|
+
* @param {djs.model.Base} element
|
|
110790
|
+
* @param {string} propertyName
|
|
110791
|
+
*
|
|
110792
|
+
* @return {any} the property value
|
|
109261
110793
|
*/
|
|
109262
110794
|
function getProperty$3(element, propertyName) {
|
|
109263
110795
|
const loopCharacteristics = getLoopCharacteristics$2(element);
|
|
109264
110796
|
return loopCharacteristics && loopCharacteristics.get(propertyName);
|
|
109265
110797
|
}
|
|
109266
110798
|
|
|
109267
|
-
/**
|
|
109268
|
-
* getLoopCharacteristics - get loopCharacteristics of a given element.
|
|
109269
|
-
*
|
|
109270
|
-
* @param {djs.model.Base} element
|
|
109271
|
-
* @return {ModdleElement<bpmn:MultiInstanceLoopCharacteristics> | undefined}
|
|
110799
|
+
/**
|
|
110800
|
+
* getLoopCharacteristics - get loopCharacteristics of a given element.
|
|
110801
|
+
*
|
|
110802
|
+
* @param {djs.model.Base} element
|
|
110803
|
+
* @return {ModdleElement<bpmn:MultiInstanceLoopCharacteristics> | undefined}
|
|
109272
110804
|
*/
|
|
109273
110805
|
function getLoopCharacteristics$2(element) {
|
|
109274
110806
|
const bo = getBusinessObject$1(element);
|
|
@@ -109277,23 +110809,23 @@
|
|
|
109277
110809
|
|
|
109278
110810
|
// loopCardinality
|
|
109279
110811
|
|
|
109280
|
-
/**
|
|
109281
|
-
* getLoopCardinality - get the loop cardinality of the loop characteristics.
|
|
109282
|
-
*
|
|
109283
|
-
* @param {djs.model.Base} element
|
|
109284
|
-
*
|
|
109285
|
-
* @return {ModdleElement<bpmn:FormalExpression>} an expression representing the loop cardinality
|
|
110812
|
+
/**
|
|
110813
|
+
* getLoopCardinality - get the loop cardinality of the loop characteristics.
|
|
110814
|
+
*
|
|
110815
|
+
* @param {djs.model.Base} element
|
|
110816
|
+
*
|
|
110817
|
+
* @return {ModdleElement<bpmn:FormalExpression>} an expression representing the loop cardinality
|
|
109286
110818
|
*/
|
|
109287
110819
|
function getLoopCardinality(element) {
|
|
109288
110820
|
return getProperty$3(element, 'loopCardinality');
|
|
109289
110821
|
}
|
|
109290
110822
|
|
|
109291
|
-
/**
|
|
109292
|
-
* getLoopCardinalityValue - get the loop cardinality value of the loop characteristics.
|
|
109293
|
-
*
|
|
109294
|
-
* @param {djs.model.Base} element
|
|
109295
|
-
*
|
|
109296
|
-
* @return {string} the loop cardinality value
|
|
110823
|
+
/**
|
|
110824
|
+
* getLoopCardinalityValue - get the loop cardinality value of the loop characteristics.
|
|
110825
|
+
*
|
|
110826
|
+
* @param {djs.model.Base} element
|
|
110827
|
+
*
|
|
110828
|
+
* @return {string} the loop cardinality value
|
|
109297
110829
|
*/
|
|
109298
110830
|
function getLoopCardinalityValue(element) {
|
|
109299
110831
|
const loopCardinality = getLoopCardinality(element);
|
|
@@ -109302,35 +110834,35 @@
|
|
|
109302
110834
|
|
|
109303
110835
|
// completionCondition /////////////////////
|
|
109304
110836
|
|
|
109305
|
-
/**
|
|
109306
|
-
* getCompletionCondition - get the completion condition of the loop characteristics.
|
|
109307
|
-
*
|
|
109308
|
-
* @param {djs.model.Base} element
|
|
109309
|
-
*
|
|
109310
|
-
* @return {ModdleElement<bpmn:FormalExpression>} an expression representing the completion condition
|
|
110837
|
+
/**
|
|
110838
|
+
* getCompletionCondition - get the completion condition of the loop characteristics.
|
|
110839
|
+
*
|
|
110840
|
+
* @param {djs.model.Base} element
|
|
110841
|
+
*
|
|
110842
|
+
* @return {ModdleElement<bpmn:FormalExpression>} an expression representing the completion condition
|
|
109311
110843
|
*/
|
|
109312
110844
|
function getCompletionCondition$1(element) {
|
|
109313
110845
|
return getProperty$3(element, 'completionCondition');
|
|
109314
110846
|
}
|
|
109315
110847
|
|
|
109316
|
-
/**
|
|
109317
|
-
* getCompletionConditionValue - get the completion condition value of the loop characteristics.
|
|
109318
|
-
*
|
|
109319
|
-
* @param {djs.model.Base} element
|
|
109320
|
-
*
|
|
109321
|
-
* @return {string} the completion condition value
|
|
110848
|
+
/**
|
|
110849
|
+
* getCompletionConditionValue - get the completion condition value of the loop characteristics.
|
|
110850
|
+
*
|
|
110851
|
+
* @param {djs.model.Base} element
|
|
110852
|
+
*
|
|
110853
|
+
* @return {string} the completion condition value
|
|
109322
110854
|
*/
|
|
109323
110855
|
function getCompletionConditionValue(element) {
|
|
109324
110856
|
const completionCondition = getCompletionCondition$1(element);
|
|
109325
110857
|
return getBody(completionCondition);
|
|
109326
110858
|
}
|
|
109327
110859
|
|
|
109328
|
-
/**
|
|
109329
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
110860
|
+
/**
|
|
110861
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
109330
110862
|
*/
|
|
109331
110863
|
|
|
109332
|
-
/**
|
|
109333
|
-
* @returns {Array<Entry>} entries
|
|
110864
|
+
/**
|
|
110865
|
+
* @returns {Array<Entry>} entries
|
|
109334
110866
|
*/
|
|
109335
110867
|
function NameProps(props) {
|
|
109336
110868
|
const {
|
|
@@ -109434,12 +110966,12 @@
|
|
|
109434
110966
|
return categoryValue;
|
|
109435
110967
|
}
|
|
109436
110968
|
|
|
109437
|
-
/**
|
|
109438
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
110969
|
+
/**
|
|
110970
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
109439
110971
|
*/
|
|
109440
110972
|
|
|
109441
|
-
/**
|
|
109442
|
-
* @returns {Array<Entry>} entries
|
|
110973
|
+
/**
|
|
110974
|
+
* @returns {Array<Entry>} entries
|
|
109443
110975
|
*/
|
|
109444
110976
|
function ProcessProps$1(props) {
|
|
109445
110977
|
const {
|
|
@@ -109530,15 +111062,15 @@
|
|
|
109530
111062
|
return is$4(element, 'bpmn:Participant') && element.businessObject.get('processRef');
|
|
109531
111063
|
}
|
|
109532
111064
|
|
|
109533
|
-
/**
|
|
109534
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
111065
|
+
/**
|
|
111066
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
109535
111067
|
*/
|
|
109536
111068
|
|
|
109537
111069
|
const EMPTY_OPTION$2 = '';
|
|
109538
111070
|
const CREATE_NEW_OPTION$1 = 'create-new';
|
|
109539
111071
|
|
|
109540
|
-
/**
|
|
109541
|
-
* @returns {Entry[]}
|
|
111072
|
+
/**
|
|
111073
|
+
* @returns {Entry[]}
|
|
109542
111074
|
*/
|
|
109543
111075
|
function SignalProps$1(props) {
|
|
109544
111076
|
const {
|
|
@@ -109684,12 +111216,12 @@
|
|
|
109684
111216
|
return isAny$1(element, ['bpmn:StartEvent', 'bpmn:IntermediateCatchEvent', 'bpmn:BoundaryEvent']) && !!getTimerEventDefinition$2(element);
|
|
109685
111217
|
}
|
|
109686
111218
|
|
|
109687
|
-
/**
|
|
109688
|
-
* Get the timer definition type for a given timer event definition.
|
|
109689
|
-
*
|
|
109690
|
-
* @param {ModdleElement<bpmn:TimerEventDefinition>} timer
|
|
109691
|
-
*
|
|
109692
|
-
* @return {string|undefined} the timer definition type
|
|
111219
|
+
/**
|
|
111220
|
+
* Get the timer definition type for a given timer event definition.
|
|
111221
|
+
*
|
|
111222
|
+
* @param {ModdleElement<bpmn:TimerEventDefinition>} timer
|
|
111223
|
+
*
|
|
111224
|
+
* @return {string|undefined} the timer definition type
|
|
109693
111225
|
*/
|
|
109694
111226
|
function getTimerDefinitionType(timer) {
|
|
109695
111227
|
if (!timer) {
|
|
@@ -109759,12 +111291,12 @@
|
|
|
109759
111291
|
return entries;
|
|
109760
111292
|
}
|
|
109761
111293
|
|
|
109762
|
-
/**
|
|
109763
|
-
* TimerEventDefinitionType - Generic select entry allowing to select a specific
|
|
109764
|
-
* timerEventDefintionType. To be used together with timerEventDefinitionValue.
|
|
109765
|
-
*
|
|
109766
|
-
* @param {type} props
|
|
109767
|
-
* @return {SelectEntry}
|
|
111294
|
+
/**
|
|
111295
|
+
* TimerEventDefinitionType - Generic select entry allowing to select a specific
|
|
111296
|
+
* timerEventDefintionType. To be used together with timerEventDefinitionValue.
|
|
111297
|
+
*
|
|
111298
|
+
* @param {type} props
|
|
111299
|
+
* @return {SelectEntry}
|
|
109768
111300
|
*/
|
|
109769
111301
|
function TimerEventDefinitionType$2(props) {
|
|
109770
111302
|
const {
|
|
@@ -109832,13 +111364,13 @@
|
|
|
109832
111364
|
});
|
|
109833
111365
|
}
|
|
109834
111366
|
|
|
109835
|
-
/**
|
|
109836
|
-
* TimerEventDefinitionValue - Generic textField entry allowing to specify the
|
|
109837
|
-
* timerEventDefintionValue based on the set timerEventDefintionType. To be used
|
|
109838
|
-
* together with timerEventDefinitionType.
|
|
109839
|
-
*
|
|
109840
|
-
* @param {type} props
|
|
109841
|
-
* @return {TextFieldEntry}
|
|
111367
|
+
/**
|
|
111368
|
+
* TimerEventDefinitionValue - Generic textField entry allowing to specify the
|
|
111369
|
+
* timerEventDefintionValue based on the set timerEventDefintionType. To be used
|
|
111370
|
+
* together with timerEventDefinitionType.
|
|
111371
|
+
*
|
|
111372
|
+
* @param {type} props
|
|
111373
|
+
* @return {TextFieldEntry}
|
|
109842
111374
|
*/
|
|
109843
111375
|
function TimerEventDefinitionValue$2(props) {
|
|
109844
111376
|
const {
|
|
@@ -110138,12 +111670,12 @@
|
|
|
110138
111670
|
bpmnPropertiesProvider: ['type', BpmnPropertiesProvider]
|
|
110139
111671
|
};
|
|
110140
111672
|
|
|
110141
|
-
/**
|
|
110142
|
-
* Get extension elements of business object. Optionally filter by type.
|
|
110143
|
-
*
|
|
110144
|
-
* @param {ModdleElement} businessObject
|
|
110145
|
-
* @param {string} [type=undefined]
|
|
110146
|
-
* @returns {Array<ModdleElement>}
|
|
111673
|
+
/**
|
|
111674
|
+
* Get extension elements of business object. Optionally filter by type.
|
|
111675
|
+
*
|
|
111676
|
+
* @param {ModdleElement} businessObject
|
|
111677
|
+
* @param {string} [type=undefined]
|
|
111678
|
+
* @returns {Array<ModdleElement>}
|
|
110147
111679
|
*/
|
|
110148
111680
|
function getExtensionElementsList$1(businessObject, type = undefined) {
|
|
110149
111681
|
const extensionElements = businessObject.get('extensionElements');
|
|
@@ -110160,13 +111692,13 @@
|
|
|
110160
111692
|
return values;
|
|
110161
111693
|
}
|
|
110162
111694
|
|
|
110163
|
-
/**
|
|
110164
|
-
* Add one or more extension elements. Create bpmn:ExtensionElements if it doesn't exist.
|
|
110165
|
-
*
|
|
110166
|
-
* @param {ModdleElement} element
|
|
110167
|
-
* @param {ModdleElement} businessObject
|
|
110168
|
-
* @param {ModdleElement|Array<ModdleElement>} extensionElementsToAdd
|
|
110169
|
-
* @param {CommandStack} commandStack
|
|
111695
|
+
/**
|
|
111696
|
+
* Add one or more extension elements. Create bpmn:ExtensionElements if it doesn't exist.
|
|
111697
|
+
*
|
|
111698
|
+
* @param {ModdleElement} element
|
|
111699
|
+
* @param {ModdleElement} businessObject
|
|
111700
|
+
* @param {ModdleElement|Array<ModdleElement>} extensionElementsToAdd
|
|
111701
|
+
* @param {CommandStack} commandStack
|
|
110170
111702
|
*/
|
|
110171
111703
|
function addExtensionElements(element, businessObject, extensionElementToAdd, bpmnFactory, commandStack) {
|
|
110172
111704
|
const commands = [];
|
|
@@ -110204,13 +111736,13 @@
|
|
|
110204
111736
|
commandStack.execute('properties-panel.multi-command-executor', commands);
|
|
110205
111737
|
}
|
|
110206
111738
|
|
|
110207
|
-
/**
|
|
110208
|
-
* Remove one or more extension elements. Remove bpmn:ExtensionElements afterwards if it's empty.
|
|
110209
|
-
*
|
|
110210
|
-
* @param {ModdleElement} element
|
|
110211
|
-
* @param {ModdleElement} businessObject
|
|
110212
|
-
* @param {ModdleElement|Array<ModdleElement>} extensionElementsToRemove
|
|
110213
|
-
* @param {CommandStack} commandStack
|
|
111739
|
+
/**
|
|
111740
|
+
* Remove one or more extension elements. Remove bpmn:ExtensionElements afterwards if it's empty.
|
|
111741
|
+
*
|
|
111742
|
+
* @param {ModdleElement} element
|
|
111743
|
+
* @param {ModdleElement} businessObject
|
|
111744
|
+
* @param {ModdleElement|Array<ModdleElement>} extensionElementsToRemove
|
|
111745
|
+
* @param {CommandStack} commandStack
|
|
110214
111746
|
*/
|
|
110215
111747
|
function removeExtensionElements$1(element, businessObject, extensionElementsToRemove, commandStack) {
|
|
110216
111748
|
if (!isArray$5(extensionElementsToRemove)) {
|
|
@@ -110602,37 +112134,37 @@
|
|
|
110602
112134
|
|
|
110603
112135
|
// helper //////////////////
|
|
110604
112136
|
|
|
110605
|
-
/**
|
|
110606
|
-
* Returns true if the attribute 'camunda:asyncBefore' is set
|
|
110607
|
-
* to true.
|
|
110608
|
-
*
|
|
110609
|
-
* @param {ModdleElement} bo
|
|
110610
|
-
*
|
|
110611
|
-
* @return {boolean} a boolean value
|
|
112137
|
+
/**
|
|
112138
|
+
* Returns true if the attribute 'camunda:asyncBefore' is set
|
|
112139
|
+
* to true.
|
|
112140
|
+
*
|
|
112141
|
+
* @param {ModdleElement} bo
|
|
112142
|
+
*
|
|
112143
|
+
* @return {boolean} a boolean value
|
|
110612
112144
|
*/
|
|
110613
112145
|
function isAsyncBefore$2(bo) {
|
|
110614
112146
|
return !!(bo.get('camunda:asyncBefore') || bo.get('camunda:async'));
|
|
110615
112147
|
}
|
|
110616
112148
|
|
|
110617
|
-
/**
|
|
110618
|
-
* Returns true if the attribute 'camunda:asyncAfter' is set
|
|
110619
|
-
* to true.
|
|
110620
|
-
*
|
|
110621
|
-
* @param {ModdleElement} bo
|
|
110622
|
-
*
|
|
110623
|
-
* @return {boolean} a boolean value
|
|
112149
|
+
/**
|
|
112150
|
+
* Returns true if the attribute 'camunda:asyncAfter' is set
|
|
112151
|
+
* to true.
|
|
112152
|
+
*
|
|
112153
|
+
* @param {ModdleElement} bo
|
|
112154
|
+
*
|
|
112155
|
+
* @return {boolean} a boolean value
|
|
110624
112156
|
*/
|
|
110625
112157
|
function isAsyncAfter$2(bo) {
|
|
110626
112158
|
return !!bo.get('camunda:asyncAfter');
|
|
110627
112159
|
}
|
|
110628
112160
|
|
|
110629
|
-
/**
|
|
110630
|
-
* Returns true if the attribute 'camunda:exclusive' is set
|
|
110631
|
-
* to true.
|
|
110632
|
-
*
|
|
110633
|
-
* @param {ModdleElement} bo
|
|
110634
|
-
*
|
|
110635
|
-
* @return {boolean} a boolean value
|
|
112161
|
+
/**
|
|
112162
|
+
* Returns true if the attribute 'camunda:exclusive' is set
|
|
112163
|
+
* to true.
|
|
112164
|
+
*
|
|
112165
|
+
* @param {ModdleElement} bo
|
|
112166
|
+
*
|
|
112167
|
+
* @return {boolean} a boolean value
|
|
110636
112168
|
*/
|
|
110637
112169
|
function isExclusive$1(bo) {
|
|
110638
112170
|
return !!bo.get('camunda:exclusive');
|
|
@@ -111448,12 +112980,12 @@
|
|
|
111448
112980
|
|
|
111449
112981
|
// helper //////////////////
|
|
111450
112982
|
|
|
111451
|
-
/**
|
|
111452
|
-
* getProcess - get the businessObject of the process referred to by a bpmn:Process
|
|
111453
|
-
* or by a bpmn:Participant
|
|
111454
|
-
*
|
|
111455
|
-
* @param {ModdleElement} element either a bpmn:Process or a bpmn:Participant
|
|
111456
|
-
* @return {BusinessObject}
|
|
112983
|
+
/**
|
|
112984
|
+
* getProcess - get the businessObject of the process referred to by a bpmn:Process
|
|
112985
|
+
* or by a bpmn:Participant
|
|
112986
|
+
*
|
|
112987
|
+
* @param {ModdleElement} element either a bpmn:Process or a bpmn:Participant
|
|
112988
|
+
* @return {BusinessObject}
|
|
111457
112989
|
*/
|
|
111458
112990
|
function getProcess$3(element) {
|
|
111459
112991
|
return is$4(element, 'bpmn:Process') ? getBusinessObject$1(element) : getBusinessObject$1(element).get('processRef');
|
|
@@ -111845,12 +113377,12 @@
|
|
|
111845
113377
|
}
|
|
111846
113378
|
}
|
|
111847
113379
|
|
|
111848
|
-
/**
|
|
111849
|
-
* getConditionExpression - get the body value of a condition expression for a given element
|
|
111850
|
-
*
|
|
111851
|
-
* @param {ModdleElement} element
|
|
111852
|
-
*
|
|
111853
|
-
* @return {string|undefined}
|
|
113380
|
+
/**
|
|
113381
|
+
* getConditionExpression - get the body value of a condition expression for a given element
|
|
113382
|
+
*
|
|
113383
|
+
* @param {ModdleElement} element
|
|
113384
|
+
*
|
|
113385
|
+
* @return {string|undefined}
|
|
111854
113386
|
*/
|
|
111855
113387
|
function getConditionExpression(element) {
|
|
111856
113388
|
const businessObject = getBusinessObject$1(element);
|
|
@@ -111896,8 +113428,8 @@
|
|
|
111896
113428
|
return is$4(parent, 'bpmn:SubProcess') && parent.triggeredByEvent;
|
|
111897
113429
|
}
|
|
111898
113430
|
|
|
111899
|
-
/**
|
|
111900
|
-
* Cf. https://docs.camunda.org/manual/latest/user-guide/process-engine/scripting/
|
|
113431
|
+
/**
|
|
113432
|
+
* Cf. https://docs.camunda.org/manual/latest/user-guide/process-engine/scripting/
|
|
111901
113433
|
*/
|
|
111902
113434
|
function ScriptProps(props) {
|
|
111903
113435
|
const {
|
|
@@ -112125,12 +113657,12 @@
|
|
|
112125
113657
|
return inputOutput && inputOutput.get(prop) || [];
|
|
112126
113658
|
}
|
|
112127
113659
|
|
|
112128
|
-
/**
|
|
112129
|
-
* Get a camunda:inputOutput from the business object
|
|
112130
|
-
*
|
|
112131
|
-
* @param {djs.model.Base | ModdleElement} element
|
|
112132
|
-
*
|
|
112133
|
-
* @return {ModdleElement} the inputOutput object
|
|
113660
|
+
/**
|
|
113661
|
+
* Get a camunda:inputOutput from the business object
|
|
113662
|
+
*
|
|
113663
|
+
* @param {djs.model.Base | ModdleElement} element
|
|
113664
|
+
*
|
|
113665
|
+
* @return {ModdleElement} the inputOutput object
|
|
112134
113666
|
*/
|
|
112135
113667
|
function getInputOutput$1(element) {
|
|
112136
113668
|
if (is$4(element, 'camunda:Connector')) {
|
|
@@ -112140,25 +113672,25 @@
|
|
|
112140
113672
|
return (getElements(businessObject, 'camunda:InputOutput') || [])[0];
|
|
112141
113673
|
}
|
|
112142
113674
|
|
|
112143
|
-
/**
|
|
112144
|
-
* Return all input parameters existing in the business object, and
|
|
112145
|
-
* an empty array if none exist.
|
|
112146
|
-
*
|
|
112147
|
-
* @param {djs.model.Base} element
|
|
112148
|
-
*
|
|
112149
|
-
* @return {Array} a list of input parameter objects
|
|
113675
|
+
/**
|
|
113676
|
+
* Return all input parameters existing in the business object, and
|
|
113677
|
+
* an empty array if none exist.
|
|
113678
|
+
*
|
|
113679
|
+
* @param {djs.model.Base} element
|
|
113680
|
+
*
|
|
113681
|
+
* @return {Array} a list of input parameter objects
|
|
112150
113682
|
*/
|
|
112151
113683
|
function getInputParameters$2(element) {
|
|
112152
113684
|
return getParameters$1(element, 'inputParameters');
|
|
112153
113685
|
}
|
|
112154
113686
|
|
|
112155
|
-
/**
|
|
112156
|
-
* Return all output parameters existing in the business object, and
|
|
112157
|
-
* an empty array if none exist.
|
|
112158
|
-
*
|
|
112159
|
-
* @param {djs.model.Base} element
|
|
112160
|
-
*
|
|
112161
|
-
* @return {Array} a list of output parameter objects
|
|
113687
|
+
/**
|
|
113688
|
+
* Return all output parameters existing in the business object, and
|
|
113689
|
+
* an empty array if none exist.
|
|
113690
|
+
*
|
|
113691
|
+
* @param {djs.model.Base} element
|
|
113692
|
+
*
|
|
113693
|
+
* @return {Array} a list of output parameter objects
|
|
112162
113694
|
*/
|
|
112163
113695
|
function getOutputParameters$2(element) {
|
|
112164
113696
|
return getParameters$1(element, 'outputParameters');
|
|
@@ -112734,47 +114266,47 @@
|
|
|
112734
114266
|
return is$4(parameter, 'camunda:InputParameter');
|
|
112735
114267
|
}
|
|
112736
114268
|
|
|
112737
|
-
/**
|
|
112738
|
-
* Check whether an element is camunda:ServiceTaskLike
|
|
112739
|
-
*
|
|
112740
|
-
* @param {djs.model.Base} element
|
|
112741
|
-
*
|
|
112742
|
-
* @return {boolean} a boolean value
|
|
114269
|
+
/**
|
|
114270
|
+
* Check whether an element is camunda:ServiceTaskLike
|
|
114271
|
+
*
|
|
114272
|
+
* @param {djs.model.Base} element
|
|
114273
|
+
*
|
|
114274
|
+
* @return {boolean} a boolean value
|
|
112743
114275
|
*/
|
|
112744
114276
|
function isServiceTaskLike(element) {
|
|
112745
114277
|
return is$4(element, 'camunda:ServiceTaskLike');
|
|
112746
114278
|
}
|
|
112747
114279
|
|
|
112748
|
-
/**
|
|
112749
|
-
* Returns 'true' if the given element is 'camunda:DmnCapable'
|
|
112750
|
-
*
|
|
112751
|
-
* @param {djs.model.Base} element
|
|
112752
|
-
*
|
|
112753
|
-
* @return {boolean} a boolean value
|
|
114280
|
+
/**
|
|
114281
|
+
* Returns 'true' if the given element is 'camunda:DmnCapable'
|
|
114282
|
+
*
|
|
114283
|
+
* @param {djs.model.Base} element
|
|
114284
|
+
*
|
|
114285
|
+
* @return {boolean} a boolean value
|
|
112754
114286
|
*/
|
|
112755
114287
|
function isDmnCapable(element) {
|
|
112756
114288
|
return is$4(element, 'camunda:DmnCapable');
|
|
112757
114289
|
}
|
|
112758
114290
|
|
|
112759
|
-
/**
|
|
112760
|
-
* Returns 'true' if the given element is 'camunda:ExternalCapable'
|
|
112761
|
-
*
|
|
112762
|
-
* @param {djs.model.Base} element
|
|
112763
|
-
*
|
|
112764
|
-
* @return {boolean} a boolean value
|
|
114291
|
+
/**
|
|
114292
|
+
* Returns 'true' if the given element is 'camunda:ExternalCapable'
|
|
114293
|
+
*
|
|
114294
|
+
* @param {djs.model.Base} element
|
|
114295
|
+
*
|
|
114296
|
+
* @return {boolean} a boolean value
|
|
112765
114297
|
*/
|
|
112766
114298
|
function isExternalCapable(element) {
|
|
112767
114299
|
return is$4(element, 'camunda:ExternalCapable');
|
|
112768
114300
|
}
|
|
112769
114301
|
|
|
112770
|
-
/**
|
|
112771
|
-
* getServiceTaskLikeBusinessObject - Get a 'camunda:ServiceTaskLike' business object.
|
|
112772
|
-
*
|
|
112773
|
-
* If the given element is not a 'camunda:ServiceTaskLike', then 'false'
|
|
112774
|
-
* is returned.
|
|
112775
|
-
*
|
|
112776
|
-
* @param {djs.model.Base} element
|
|
112777
|
-
* @return {ModdleElement} the 'camunda:ServiceTaskLike' business object
|
|
114302
|
+
/**
|
|
114303
|
+
* getServiceTaskLikeBusinessObject - Get a 'camunda:ServiceTaskLike' business object.
|
|
114304
|
+
*
|
|
114305
|
+
* If the given element is not a 'camunda:ServiceTaskLike', then 'false'
|
|
114306
|
+
* is returned.
|
|
114307
|
+
*
|
|
114308
|
+
* @param {djs.model.Base} element
|
|
114309
|
+
* @return {ModdleElement} the 'camunda:ServiceTaskLike' business object
|
|
112778
114310
|
*/
|
|
112779
114311
|
function getServiceTaskLikeBusinessObject(element) {
|
|
112780
114312
|
if (is$4(element, 'bpmn:IntermediateThrowEvent') || is$4(element, 'bpmn:EndEvent')) {
|
|
@@ -112790,22 +114322,22 @@
|
|
|
112790
114322
|
return isServiceTaskLike(element) && getBusinessObject$1(element);
|
|
112791
114323
|
}
|
|
112792
114324
|
|
|
112793
|
-
/**
|
|
112794
|
-
* Returns the implementation type of the given element.
|
|
112795
|
-
*
|
|
112796
|
-
* Possible implementation types are:
|
|
112797
|
-
* - dmn
|
|
112798
|
-
* - connector
|
|
112799
|
-
* - external
|
|
112800
|
-
* - class
|
|
112801
|
-
* - expression
|
|
112802
|
-
* - delegateExpression
|
|
112803
|
-
* - script
|
|
112804
|
-
* - or undefined, when no matching implementation type is found
|
|
112805
|
-
*
|
|
112806
|
-
* @param {djs.model.Base} element
|
|
112807
|
-
*
|
|
112808
|
-
* @return {String} the implementation type
|
|
114325
|
+
/**
|
|
114326
|
+
* Returns the implementation type of the given element.
|
|
114327
|
+
*
|
|
114328
|
+
* Possible implementation types are:
|
|
114329
|
+
* - dmn
|
|
114330
|
+
* - connector
|
|
114331
|
+
* - external
|
|
114332
|
+
* - class
|
|
114333
|
+
* - expression
|
|
114334
|
+
* - delegateExpression
|
|
114335
|
+
* - script
|
|
114336
|
+
* - or undefined, when no matching implementation type is found
|
|
114337
|
+
*
|
|
114338
|
+
* @param {djs.model.Base} element
|
|
114339
|
+
*
|
|
114340
|
+
* @return {String} the implementation type
|
|
112809
114341
|
*/
|
|
112810
114342
|
function getImplementationType(element) {
|
|
112811
114343
|
const businessObject = getListenerBusinessObject(element) || getServiceTaskLikeBusinessObject(element);
|
|
@@ -113512,12 +115044,12 @@
|
|
|
113512
115044
|
return name;
|
|
113513
115045
|
}
|
|
113514
115046
|
|
|
113515
|
-
/**
|
|
113516
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
115047
|
+
/**
|
|
115048
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
113517
115049
|
*/
|
|
113518
115050
|
|
|
113519
|
-
/**
|
|
113520
|
-
* @returns {Array<Entry>} entries
|
|
115051
|
+
/**
|
|
115052
|
+
* @returns {Array<Entry>} entries
|
|
113521
115053
|
*/
|
|
113522
115054
|
function EscalationProps(props) {
|
|
113523
115055
|
const {
|
|
@@ -113771,12 +115303,12 @@
|
|
|
113771
115303
|
|
|
113772
115304
|
// helper ///////////////////
|
|
113773
115305
|
|
|
113774
|
-
/**
|
|
113775
|
-
* determineType - get the type of a fieldInjection based on the attributes
|
|
113776
|
-
* set on it
|
|
113777
|
-
*
|
|
113778
|
-
* @param {ModdleElement} field
|
|
113779
|
-
* @return {('string'|'expression')}
|
|
115306
|
+
/**
|
|
115307
|
+
* determineType - get the type of a fieldInjection based on the attributes
|
|
115308
|
+
* set on it
|
|
115309
|
+
*
|
|
115310
|
+
* @param {ModdleElement} field
|
|
115311
|
+
* @return {('string'|'expression')}
|
|
113780
115312
|
*/
|
|
113781
115313
|
function determineType(field) {
|
|
113782
115314
|
// string is the default type
|
|
@@ -115907,8 +117439,8 @@
|
|
|
115907
117439
|
return is$4(element, 'camunda:Initiator') && !is$4(element.parent, 'bpmn:SubProcess');
|
|
115908
117440
|
}
|
|
115909
117441
|
|
|
115910
|
-
/**
|
|
115911
|
-
* Cf. https://docs.camunda.org/manual/7.15/reference/bpmn20/subprocesses/call-activity/#passing-variables
|
|
117442
|
+
/**
|
|
117443
|
+
* Cf. https://docs.camunda.org/manual/7.15/reference/bpmn20/subprocesses/call-activity/#passing-variables
|
|
115912
117444
|
*/
|
|
115913
117445
|
function InMappingPropagationProps(props) {
|
|
115914
117446
|
const {
|
|
@@ -116250,8 +117782,8 @@
|
|
|
116250
117782
|
return inOutType;
|
|
116251
117783
|
}
|
|
116252
117784
|
|
|
116253
|
-
/**
|
|
116254
|
-
* Cf. https://docs.camunda.org/manual/latest/reference/bpmn20/custom-extensions/extension-elements/#in
|
|
117785
|
+
/**
|
|
117786
|
+
* Cf. https://docs.camunda.org/manual/latest/reference/bpmn20/custom-extensions/extension-elements/#in
|
|
116255
117787
|
*/
|
|
116256
117788
|
function InMappingProps({
|
|
116257
117789
|
element,
|
|
@@ -116533,49 +118065,49 @@
|
|
|
116533
118065
|
|
|
116534
118066
|
// helper //////////////////
|
|
116535
118067
|
|
|
116536
|
-
/**
|
|
116537
|
-
* @param {ModdleElement} bo
|
|
116538
|
-
* @return {boolean} a boolean value
|
|
118068
|
+
/**
|
|
118069
|
+
* @param {ModdleElement} bo
|
|
118070
|
+
* @return {boolean} a boolean value
|
|
116539
118071
|
*/
|
|
116540
118072
|
function isAsyncBefore$1$1(bo) {
|
|
116541
118073
|
return !!(bo.get('camunda:asyncBefore') || bo.get('camunda:async'));
|
|
116542
118074
|
}
|
|
116543
118075
|
|
|
116544
|
-
/**
|
|
116545
|
-
* @param {ModdleElement} bo
|
|
116546
|
-
* @return {boolean}
|
|
118076
|
+
/**
|
|
118077
|
+
* @param {ModdleElement} bo
|
|
118078
|
+
* @return {boolean}
|
|
116547
118079
|
*/
|
|
116548
118080
|
function isAsyncAfter$1$1(bo) {
|
|
116549
118081
|
return !!bo.get('camunda:asyncAfter');
|
|
116550
118082
|
}
|
|
116551
118083
|
|
|
116552
|
-
/**
|
|
116553
|
-
* isAsync - returns true if the attribute 'camunda:asyncAfter' or 'camunda:asyncBefore'
|
|
116554
|
-
* is set to true.
|
|
116555
|
-
*
|
|
116556
|
-
* @param {ModdleElement} bo
|
|
116557
|
-
* @return {boolean}
|
|
118084
|
+
/**
|
|
118085
|
+
* isAsync - returns true if the attribute 'camunda:asyncAfter' or 'camunda:asyncBefore'
|
|
118086
|
+
* is set to true.
|
|
118087
|
+
*
|
|
118088
|
+
* @param {ModdleElement} bo
|
|
118089
|
+
* @return {boolean}
|
|
116558
118090
|
*/
|
|
116559
118091
|
function isAsync$1(bo) {
|
|
116560
118092
|
return isAsyncAfter$1$1(bo) || isAsyncBefore$1$1(bo);
|
|
116561
118093
|
}
|
|
116562
118094
|
|
|
116563
|
-
/**
|
|
116564
|
-
* isTimerEvent - returns true if the element is a bpmn:Event with a timerEventDefinition
|
|
116565
|
-
*
|
|
116566
|
-
* @param {ModdleElement} element
|
|
116567
|
-
* @return {boolean}
|
|
118095
|
+
/**
|
|
118096
|
+
* isTimerEvent - returns true if the element is a bpmn:Event with a timerEventDefinition
|
|
118097
|
+
*
|
|
118098
|
+
* @param {ModdleElement} element
|
|
118099
|
+
* @return {boolean}
|
|
116568
118100
|
*/
|
|
116569
118101
|
function isTimerEvent(element) {
|
|
116570
118102
|
return is$4(element, 'bpmn:Event') && getTimerEventDefinition$1(element);
|
|
116571
118103
|
}
|
|
116572
118104
|
|
|
116573
|
-
/**
|
|
116574
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
118105
|
+
/**
|
|
118106
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
116575
118107
|
*/
|
|
116576
118108
|
|
|
116577
|
-
/**
|
|
116578
|
-
* @returns {Array<Entry>} entries
|
|
118109
|
+
/**
|
|
118110
|
+
* @returns {Array<Entry>} entries
|
|
116579
118111
|
*/
|
|
116580
118112
|
function MultiInstanceProps(props) {
|
|
116581
118113
|
const {
|
|
@@ -116837,36 +118369,36 @@
|
|
|
116837
118369
|
|
|
116838
118370
|
// generic ///////////////////////////
|
|
116839
118371
|
|
|
116840
|
-
/**
|
|
116841
|
-
* isMultiInstanceSupported - check whether given element supports camunda specific props
|
|
116842
|
-
* for multiInstance (ref. <camunda:Cllectable>).
|
|
116843
|
-
*
|
|
116844
|
-
* @param {djs.model.Base} element
|
|
116845
|
-
* @return {boolean}
|
|
118372
|
+
/**
|
|
118373
|
+
* isMultiInstanceSupported - check whether given element supports camunda specific props
|
|
118374
|
+
* for multiInstance (ref. <camunda:Cllectable>).
|
|
118375
|
+
*
|
|
118376
|
+
* @param {djs.model.Base} element
|
|
118377
|
+
* @return {boolean}
|
|
116846
118378
|
*/
|
|
116847
118379
|
function isMultiInstanceSupported(element) {
|
|
116848
118380
|
const loopCharacteristics = getLoopCharacteristics(element);
|
|
116849
118381
|
return !!loopCharacteristics && is$4(loopCharacteristics, 'camunda:Collectable');
|
|
116850
118382
|
}
|
|
116851
118383
|
|
|
116852
|
-
/**
|
|
116853
|
-
* getProperty - get a property value of the loop characteristics.
|
|
116854
|
-
*
|
|
116855
|
-
* @param {djs.model.Base} element
|
|
116856
|
-
* @param {string} propertyName
|
|
116857
|
-
*
|
|
116858
|
-
* @return {any} the property value
|
|
118384
|
+
/**
|
|
118385
|
+
* getProperty - get a property value of the loop characteristics.
|
|
118386
|
+
*
|
|
118387
|
+
* @param {djs.model.Base} element
|
|
118388
|
+
* @param {string} propertyName
|
|
118389
|
+
*
|
|
118390
|
+
* @return {any} the property value
|
|
116859
118391
|
*/
|
|
116860
118392
|
function getProperty$1(element, propertyName) {
|
|
116861
118393
|
var loopCharacteristics = getLoopCharacteristics(element);
|
|
116862
118394
|
return loopCharacteristics && loopCharacteristics.get(propertyName);
|
|
116863
118395
|
}
|
|
116864
118396
|
|
|
116865
|
-
/**
|
|
116866
|
-
* getLoopCharacteristics - get loopCharacteristics of a given element.
|
|
116867
|
-
*
|
|
116868
|
-
* @param {djs.model.Base} element
|
|
116869
|
-
* @return {ModdleElement<bpmn:MultiInstanceLoopCharacteristics> | undefined}
|
|
118397
|
+
/**
|
|
118398
|
+
* getLoopCharacteristics - get loopCharacteristics of a given element.
|
|
118399
|
+
*
|
|
118400
|
+
* @param {djs.model.Base} element
|
|
118401
|
+
* @return {ModdleElement<bpmn:MultiInstanceLoopCharacteristics> | undefined}
|
|
116870
118402
|
*/
|
|
116871
118403
|
function getLoopCharacteristics(element) {
|
|
116872
118404
|
const bo = getBusinessObject$1(element);
|
|
@@ -116875,12 +118407,12 @@
|
|
|
116875
118407
|
|
|
116876
118408
|
// collection
|
|
116877
118409
|
|
|
116878
|
-
/**
|
|
116879
|
-
* getCollection - get the 'camunda:collection' attribute value of the loop characteristics.
|
|
116880
|
-
*
|
|
116881
|
-
* @param {djs.model.Base} element
|
|
116882
|
-
*
|
|
116883
|
-
* @return {string} the 'camunda:collection' value
|
|
118410
|
+
/**
|
|
118411
|
+
* getCollection - get the 'camunda:collection' attribute value of the loop characteristics.
|
|
118412
|
+
*
|
|
118413
|
+
* @param {djs.model.Base} element
|
|
118414
|
+
*
|
|
118415
|
+
* @return {string} the 'camunda:collection' value
|
|
116884
118416
|
*/
|
|
116885
118417
|
function getCollection(element) {
|
|
116886
118418
|
return getProperty$1(element, 'camunda:collection');
|
|
@@ -116888,12 +118420,12 @@
|
|
|
116888
118420
|
|
|
116889
118421
|
// elementVariable
|
|
116890
118422
|
|
|
116891
|
-
/**
|
|
116892
|
-
* getElementVariable - get the 'camunda:elementVariable' attribute value of the loop characteristics.
|
|
116893
|
-
*
|
|
116894
|
-
* @param {djs.model.Base} element
|
|
116895
|
-
*
|
|
116896
|
-
* @return {string} the 'camunda:elementVariable' value
|
|
118423
|
+
/**
|
|
118424
|
+
* getElementVariable - get the 'camunda:elementVariable' attribute value of the loop characteristics.
|
|
118425
|
+
*
|
|
118426
|
+
* @param {djs.model.Base} element
|
|
118427
|
+
*
|
|
118428
|
+
* @return {string} the 'camunda:elementVariable' value
|
|
116897
118429
|
*/
|
|
116898
118430
|
function getElementVariable(element) {
|
|
116899
118431
|
return getProperty$1(element, 'camunda:elementVariable');
|
|
@@ -116901,48 +118433,48 @@
|
|
|
116901
118433
|
|
|
116902
118434
|
// asyncBefore asyncAfter
|
|
116903
118435
|
|
|
116904
|
-
/**
|
|
116905
|
-
* Returns true if the attribute 'camunda:asyncBefore' is set
|
|
116906
|
-
* to true.
|
|
116907
|
-
*
|
|
116908
|
-
* @param {ModdleElement} bo
|
|
116909
|
-
*
|
|
116910
|
-
* @return {boolean} a boolean value
|
|
118436
|
+
/**
|
|
118437
|
+
* Returns true if the attribute 'camunda:asyncBefore' is set
|
|
118438
|
+
* to true.
|
|
118439
|
+
*
|
|
118440
|
+
* @param {ModdleElement} bo
|
|
118441
|
+
*
|
|
118442
|
+
* @return {boolean} a boolean value
|
|
116911
118443
|
*/
|
|
116912
118444
|
function isAsyncBefore$3(bo) {
|
|
116913
118445
|
return !!(bo.get('camunda:asyncBefore') || bo.get('camunda:async'));
|
|
116914
118446
|
}
|
|
116915
118447
|
|
|
116916
|
-
/**
|
|
116917
|
-
* Returns true if the attribute 'camunda:asyncAfter' is set
|
|
116918
|
-
* to true.
|
|
116919
|
-
*
|
|
116920
|
-
* @param {ModdleElement} bo
|
|
116921
|
-
*
|
|
116922
|
-
* @return {boolean} a boolean value
|
|
118448
|
+
/**
|
|
118449
|
+
* Returns true if the attribute 'camunda:asyncAfter' is set
|
|
118450
|
+
* to true.
|
|
118451
|
+
*
|
|
118452
|
+
* @param {ModdleElement} bo
|
|
118453
|
+
*
|
|
118454
|
+
* @return {boolean} a boolean value
|
|
116923
118455
|
*/
|
|
116924
118456
|
function isAsyncAfter$3(bo) {
|
|
116925
118457
|
return !!bo.get('camunda:asyncAfter');
|
|
116926
118458
|
}
|
|
116927
118459
|
|
|
116928
|
-
/**
|
|
116929
|
-
* Returns true if the attribute 'camunda:exclusive' is set
|
|
116930
|
-
* to true.
|
|
116931
|
-
*
|
|
116932
|
-
* @param {ModdleElement} bo
|
|
116933
|
-
*
|
|
116934
|
-
* @return {boolean} a boolean value
|
|
118460
|
+
/**
|
|
118461
|
+
* Returns true if the attribute 'camunda:exclusive' is set
|
|
118462
|
+
* to true.
|
|
118463
|
+
*
|
|
118464
|
+
* @param {ModdleElement} bo
|
|
118465
|
+
*
|
|
118466
|
+
* @return {boolean} a boolean value
|
|
116935
118467
|
*/
|
|
116936
118468
|
function isExclusive$2(bo) {
|
|
116937
118469
|
return !!bo.get('camunda:exclusive');
|
|
116938
118470
|
}
|
|
116939
118471
|
|
|
116940
|
-
/**
|
|
116941
|
-
* isAsync - returns true if the attribute 'camunda:asyncAfter' or 'camunda:asyncBefore'
|
|
116942
|
-
* is set to true.
|
|
116943
|
-
*
|
|
116944
|
-
* @param {ModdleElement} bo
|
|
116945
|
-
* @return {boolean}
|
|
118472
|
+
/**
|
|
118473
|
+
* isAsync - returns true if the attribute 'camunda:asyncAfter' or 'camunda:asyncBefore'
|
|
118474
|
+
* is set to true.
|
|
118475
|
+
*
|
|
118476
|
+
* @param {ModdleElement} bo
|
|
118477
|
+
* @return {boolean}
|
|
116946
118478
|
*/
|
|
116947
118479
|
function isAsync(bo) {
|
|
116948
118480
|
return isAsyncAfter$3(bo) || isAsyncBefore$3(bo);
|
|
@@ -116954,8 +118486,8 @@
|
|
|
116954
118486
|
return node && !node.checked;
|
|
116955
118487
|
}
|
|
116956
118488
|
|
|
116957
|
-
/**
|
|
116958
|
-
* Cf. https://docs.camunda.org/manual/7.15/reference/bpmn20/subprocesses/call-activity/#passing-variables
|
|
118489
|
+
/**
|
|
118490
|
+
* Cf. https://docs.camunda.org/manual/7.15/reference/bpmn20/subprocesses/call-activity/#passing-variables
|
|
116959
118491
|
*/
|
|
116960
118492
|
function OutMappingPropagationProps(props) {
|
|
116961
118493
|
const {
|
|
@@ -117063,8 +118595,8 @@
|
|
|
117063
118595
|
return !!mappings.length;
|
|
117064
118596
|
}
|
|
117065
118597
|
|
|
117066
|
-
/**
|
|
117067
|
-
* Cf. https://docs.camunda.org/manual/latest/reference/bpmn20/custom-extensions/extension-elements/#out
|
|
118598
|
+
/**
|
|
118599
|
+
* Cf. https://docs.camunda.org/manual/latest/reference/bpmn20/custom-extensions/extension-elements/#out
|
|
117068
118600
|
*/
|
|
117069
118601
|
function OutMappingProps({
|
|
117070
118602
|
element,
|
|
@@ -117254,12 +118786,12 @@
|
|
|
117254
118786
|
return entries;
|
|
117255
118787
|
}
|
|
117256
118788
|
|
|
117257
|
-
/**
|
|
117258
|
-
* TimerEventDefinitionType - Generic select entry allowing to select a specific
|
|
117259
|
-
* timerEventDefintionType. To be used together with timerEventDefinitionValue.
|
|
117260
|
-
*
|
|
117261
|
-
* @param {type} props
|
|
117262
|
-
* @return {SelectEntry}
|
|
118789
|
+
/**
|
|
118790
|
+
* TimerEventDefinitionType - Generic select entry allowing to select a specific
|
|
118791
|
+
* timerEventDefintionType. To be used together with timerEventDefinitionValue.
|
|
118792
|
+
*
|
|
118793
|
+
* @param {type} props
|
|
118794
|
+
* @return {SelectEntry}
|
|
117263
118795
|
*/
|
|
117264
118796
|
function TimerEventDefinitionType(props) {
|
|
117265
118797
|
const {
|
|
@@ -117327,13 +118859,13 @@
|
|
|
117327
118859
|
});
|
|
117328
118860
|
}
|
|
117329
118861
|
|
|
117330
|
-
/**
|
|
117331
|
-
* TimerEventDefinitionValue - Generic textField entry allowing to specify the
|
|
117332
|
-
* timerEventDefintionValue based on the set timerEventDefintionType. To be used
|
|
117333
|
-
* together with timerEventDefinitionType.
|
|
117334
|
-
*
|
|
117335
|
-
* @param {type} props
|
|
117336
|
-
* @return {TextFieldEntry}
|
|
118862
|
+
/**
|
|
118863
|
+
* TimerEventDefinitionValue - Generic textField entry allowing to specify the
|
|
118864
|
+
* timerEventDefintionValue based on the set timerEventDefintionType. To be used
|
|
118865
|
+
* together with timerEventDefinitionType.
|
|
118866
|
+
*
|
|
118867
|
+
* @param {type} props
|
|
118868
|
+
* @return {TextFieldEntry}
|
|
117337
118869
|
*/
|
|
117338
118870
|
function TimerEventDefinitionValue(props) {
|
|
117339
118871
|
const {
|
|
@@ -117495,8 +119027,8 @@
|
|
|
117495
119027
|
timeout: 'Timeout'
|
|
117496
119028
|
};
|
|
117497
119029
|
|
|
117498
|
-
/**
|
|
117499
|
-
* Cf. https://docs.camunda.org/manual/latest/user-guide/process-engine/delegation-code/#execution-listener
|
|
119030
|
+
/**
|
|
119031
|
+
* Cf. https://docs.camunda.org/manual/latest/user-guide/process-engine/delegation-code/#execution-listener
|
|
117500
119032
|
*/
|
|
117501
119033
|
function ExecutionListenerProps({
|
|
117502
119034
|
element,
|
|
@@ -117907,11 +119439,11 @@
|
|
|
117907
119439
|
|
|
117908
119440
|
// helper
|
|
117909
119441
|
|
|
117910
|
-
/**
|
|
117911
|
-
* Get a readable label for a listener.
|
|
117912
|
-
*
|
|
117913
|
-
* @param {ModdleElement} listener
|
|
117914
|
-
* @param {string => string} [translate]
|
|
119442
|
+
/**
|
|
119443
|
+
* Get a readable label for a listener.
|
|
119444
|
+
*
|
|
119445
|
+
* @param {ModdleElement} listener
|
|
119446
|
+
* @param {string => string} [translate]
|
|
117915
119447
|
*/
|
|
117916
119448
|
function getListenerLabel(listener, translate = value => value) {
|
|
117917
119449
|
const event = listener.get('event');
|
|
@@ -118258,8 +119790,8 @@
|
|
|
118258
119790
|
return is$4(element, 'bpmn:Process') ? getBusinessObject$1(element) : getBusinessObject$1(element).get('processRef');
|
|
118259
119791
|
}
|
|
118260
119792
|
|
|
118261
|
-
/**
|
|
118262
|
-
* Cf. https://docs.camunda.org/manual/latest/reference/bpmn20/tasks/user-task/
|
|
119793
|
+
/**
|
|
119794
|
+
* Cf. https://docs.camunda.org/manual/latest/reference/bpmn20/tasks/user-task/
|
|
118263
119795
|
*/
|
|
118264
119796
|
function UserAssignmentProps(props) {
|
|
118265
119797
|
const {
|
|
@@ -118521,12 +120053,12 @@
|
|
|
118521
120053
|
return is$4(element, 'bpmn:Process') ? getBusinessObject$1(element) : getBusinessObject$1(element).get('processRef');
|
|
118522
120054
|
}
|
|
118523
120055
|
|
|
118524
|
-
/**
|
|
118525
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
120056
|
+
/**
|
|
120057
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
118526
120058
|
*/
|
|
118527
120059
|
|
|
118528
|
-
/**
|
|
118529
|
-
* @returns {Array<Entry>} entries
|
|
120060
|
+
/**
|
|
120061
|
+
* @returns {Array<Entry>} entries
|
|
118530
120062
|
*/
|
|
118531
120063
|
function IdProps() {
|
|
118532
120064
|
return [{
|
|
@@ -118570,12 +120102,12 @@
|
|
|
118570
120102
|
});
|
|
118571
120103
|
}
|
|
118572
120104
|
|
|
118573
|
-
/**
|
|
118574
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
120105
|
+
/**
|
|
120106
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
118575
120107
|
*/
|
|
118576
120108
|
|
|
118577
|
-
/**
|
|
118578
|
-
* @returns {Array<Entry>} entries
|
|
120109
|
+
/**
|
|
120110
|
+
* @returns {Array<Entry>} entries
|
|
118579
120111
|
*/
|
|
118580
120112
|
function ProcessProps(props) {
|
|
118581
120113
|
const {
|
|
@@ -118638,30 +120170,30 @@
|
|
|
118638
120170
|
const LOW_PRIORITY$4 = 500;
|
|
118639
120171
|
const CAMUNDA_PLATFORM_GROUPS = [HistoryCleanupGroup, TasklistGroup, CandidateStarterGroup, ImplementationGroup, ExternalTaskGroup, ProcessVariablesGroup, ErrorsGroup, UserAssignmentGroup, FormGroup, FormDataGroup, TaskListenerGroup, StartInitiatorGroup, ScriptGroup, ConditionGroup, CallActivityGroup, AsynchronousContinuationsGroup, JobExecutionGroup, InMappingPropagationGroup, InMappingGroup, InputGroup, ConnectorInputGroup, OutMappingPropagationGroup, OutMappingGroup, OutputGroup, ConnectorOutputGroup, ExecutionListenerGroup, ExtensionPropertiesGroup, FieldInjectionGroup, BusinessKeyGroup];
|
|
118640
120172
|
|
|
118641
|
-
/**
|
|
118642
|
-
* Provides `camunda` namespace properties.
|
|
118643
|
-
*
|
|
118644
|
-
* @example
|
|
118645
|
-
* ```javascript
|
|
118646
|
-
* import BpmnModeler from 'bpmn-js/lib/Modeler';
|
|
118647
|
-
* import {
|
|
118648
|
-
* BpmnPropertiesPanelModule,
|
|
118649
|
-
* BpmnPropertiesProviderModule,
|
|
118650
|
-
* CamundaPlatformPropertiesProviderModule
|
|
118651
|
-
* } from 'bpmn-js-properties-panel';
|
|
118652
|
-
*
|
|
118653
|
-
* const modeler = new BpmnModeler({
|
|
118654
|
-
* container: '#canvas',
|
|
118655
|
-
* propertiesPanel: {
|
|
118656
|
-
* parent: '#properties'
|
|
118657
|
-
* },
|
|
118658
|
-
* additionalModules: [
|
|
118659
|
-
* BpmnPropertiesPanelModule,
|
|
118660
|
-
* BpmnPropertiesProviderModule,
|
|
118661
|
-
* CamundaPlatformPropertiesProviderModule
|
|
118662
|
-
* ]
|
|
118663
|
-
* });
|
|
118664
|
-
* ```
|
|
120173
|
+
/**
|
|
120174
|
+
* Provides `camunda` namespace properties.
|
|
120175
|
+
*
|
|
120176
|
+
* @example
|
|
120177
|
+
* ```javascript
|
|
120178
|
+
* import BpmnModeler from 'bpmn-js/lib/Modeler';
|
|
120179
|
+
* import {
|
|
120180
|
+
* BpmnPropertiesPanelModule,
|
|
120181
|
+
* BpmnPropertiesProviderModule,
|
|
120182
|
+
* CamundaPlatformPropertiesProviderModule
|
|
120183
|
+
* } from 'bpmn-js-properties-panel';
|
|
120184
|
+
*
|
|
120185
|
+
* const modeler = new BpmnModeler({
|
|
120186
|
+
* container: '#canvas',
|
|
120187
|
+
* propertiesPanel: {
|
|
120188
|
+
* parent: '#properties'
|
|
120189
|
+
* },
|
|
120190
|
+
* additionalModules: [
|
|
120191
|
+
* BpmnPropertiesPanelModule,
|
|
120192
|
+
* BpmnPropertiesProviderModule,
|
|
120193
|
+
* CamundaPlatformPropertiesProviderModule
|
|
120194
|
+
* ]
|
|
120195
|
+
* });
|
|
120196
|
+
* ```
|
|
118665
120197
|
*/
|
|
118666
120198
|
class CamundaPlatformPropertiesProvider {
|
|
118667
120199
|
constructor(propertiesPanel, injector) {
|
|
@@ -118694,8 +120226,8 @@
|
|
|
118694
120226
|
}
|
|
118695
120227
|
CamundaPlatformPropertiesProvider.$inject = ['propertiesPanel', 'injector'];
|
|
118696
120228
|
|
|
118697
|
-
/**
|
|
118698
|
-
* This ensures the <Implementation> group always locates after <Documentation>
|
|
120229
|
+
/**
|
|
120230
|
+
* This ensures the <Implementation> group always locates after <Documentation>
|
|
118699
120231
|
*/
|
|
118700
120232
|
function moveImplementationGroup(groups) {
|
|
118701
120233
|
const documentationGroupIdx = findGroupIndex(groups, 'documentation');
|
|
@@ -119266,54 +120798,54 @@
|
|
|
119266
120798
|
}
|
|
119267
120799
|
};
|
|
119268
120800
|
|
|
119269
|
-
/**
|
|
119270
|
-
* @typedef {import('bpmn-js/lib/BaseViewer').BaseViewerOptions} BaseViewerOptions
|
|
119271
|
-
*
|
|
119272
|
-
* @typedef {import('didi').ModuleDeclaration} ModuleDeclaration
|
|
119273
|
-
*/
|
|
119274
|
-
|
|
119275
|
-
/**
|
|
119276
|
-
*
|
|
119277
|
-
* @param {BaseViewerOptions} options
|
|
119278
|
-
*/
|
|
119279
|
-
function Modeler$1(options = {}) {
|
|
119280
|
-
Modeler$2.call(this, options);
|
|
119281
|
-
}
|
|
119282
|
-
|
|
119283
|
-
e$7(Modeler$1, Modeler$2);
|
|
119284
|
-
|
|
119285
|
-
/**
|
|
119286
|
-
* @param { {
|
|
119287
|
-
* disableAdjustOrigin?: boolean;
|
|
119288
|
-
* disableGrid?: boolean;
|
|
119289
|
-
* } } [options]
|
|
119290
|
-
*
|
|
119291
|
-
* @returns {ModuleDeclaration[]}
|
|
119292
|
-
*/
|
|
119293
|
-
Modeler$1.prototype.getModules = function(options = {}) {
|
|
119294
|
-
const modules = Modeler$2.prototype.getModules.call(this, options);
|
|
119295
|
-
|
|
119296
|
-
return [
|
|
119297
|
-
...modules,
|
|
119298
|
-
options.disableAdjustOrigin
|
|
119299
|
-
? diagramOriginModule
|
|
119300
|
-
: alignToOriginModule,
|
|
119301
|
-
options.disableGrid
|
|
119302
|
-
? {}
|
|
119303
|
-
: index$6
|
|
119304
|
-
];
|
|
119305
|
-
};
|
|
119306
|
-
|
|
119307
|
-
Modeler$1.prototype._extensionModules = [
|
|
119308
|
-
index$7,
|
|
119309
|
-
ExecutableFixModule,
|
|
119310
|
-
index$3,
|
|
119311
|
-
index$2
|
|
119312
|
-
];
|
|
119313
|
-
|
|
119314
|
-
Modeler$1.prototype._modules = [].concat(
|
|
119315
|
-
Modeler$2.prototype._modules,
|
|
119316
|
-
Modeler$1.prototype._extensionModules
|
|
120801
|
+
/**
|
|
120802
|
+
* @typedef {import('bpmn-js/lib/BaseViewer').BaseViewerOptions} BaseViewerOptions
|
|
120803
|
+
*
|
|
120804
|
+
* @typedef {import('didi').ModuleDeclaration} ModuleDeclaration
|
|
120805
|
+
*/
|
|
120806
|
+
|
|
120807
|
+
/**
|
|
120808
|
+
*
|
|
120809
|
+
* @param {BaseViewerOptions} options
|
|
120810
|
+
*/
|
|
120811
|
+
function Modeler$1(options = {}) {
|
|
120812
|
+
Modeler$2.call(this, options);
|
|
120813
|
+
}
|
|
120814
|
+
|
|
120815
|
+
e$7(Modeler$1, Modeler$2);
|
|
120816
|
+
|
|
120817
|
+
/**
|
|
120818
|
+
* @param { {
|
|
120819
|
+
* disableAdjustOrigin?: boolean;
|
|
120820
|
+
* disableGrid?: boolean;
|
|
120821
|
+
* } } [options]
|
|
120822
|
+
*
|
|
120823
|
+
* @returns {ModuleDeclaration[]}
|
|
120824
|
+
*/
|
|
120825
|
+
Modeler$1.prototype.getModules = function(options = {}) {
|
|
120826
|
+
const modules = Modeler$2.prototype.getModules.call(this, options);
|
|
120827
|
+
|
|
120828
|
+
return [
|
|
120829
|
+
...modules,
|
|
120830
|
+
options.disableAdjustOrigin
|
|
120831
|
+
? diagramOriginModule
|
|
120832
|
+
: alignToOriginModule,
|
|
120833
|
+
options.disableGrid
|
|
120834
|
+
? {}
|
|
120835
|
+
: index$6
|
|
120836
|
+
];
|
|
120837
|
+
};
|
|
120838
|
+
|
|
120839
|
+
Modeler$1.prototype._extensionModules = [
|
|
120840
|
+
index$7,
|
|
120841
|
+
ExecutableFixModule,
|
|
120842
|
+
index$3,
|
|
120843
|
+
index$2
|
|
120844
|
+
];
|
|
120845
|
+
|
|
120846
|
+
Modeler$1.prototype._modules = [].concat(
|
|
120847
|
+
Modeler$2.prototype._modules,
|
|
120848
|
+
Modeler$1.prototype._extensionModules
|
|
119317
120849
|
);
|
|
119318
120850
|
|
|
119319
120851
|
const WILDCARD = '*';
|
|
@@ -135664,13 +137196,13 @@
|
|
|
135664
137196
|
emumerations: emumerations
|
|
135665
137197
|
};
|
|
135666
137198
|
|
|
135667
|
-
/**
|
|
135668
|
-
* @type { {
|
|
135669
|
-
* camunda: any
|
|
135670
|
-
* } }
|
|
135671
|
-
*/
|
|
135672
|
-
const commonModdleExtensions = {
|
|
135673
|
-
camunda: camundaModdle
|
|
137199
|
+
/**
|
|
137200
|
+
* @type { {
|
|
137201
|
+
* camunda: any
|
|
137202
|
+
* } }
|
|
137203
|
+
*/
|
|
137204
|
+
const commonModdleExtensions = {
|
|
137205
|
+
camunda: camundaModdle
|
|
135674
137206
|
};
|
|
135675
137207
|
|
|
135676
137208
|
const colorImageSvg = `<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" fill="currentColor">
|
|
@@ -139639,45 +141171,45 @@
|
|
|
139639
141171
|
removeTemplateReplaceProvider: [ 'type', RemoveTemplateReplaceProvider ]
|
|
139640
141172
|
};
|
|
139641
141173
|
|
|
139642
|
-
/**
|
|
139643
|
-
* @typedef {import('bpmn-js/lib/BaseViewer').BaseViewerOptions} BaseViewerOptions
|
|
139644
|
-
*/
|
|
139645
|
-
|
|
139646
|
-
/**
|
|
139647
|
-
* @param {BaseViewerOptions} options
|
|
139648
|
-
*/
|
|
139649
|
-
function Modeler(options = {}) {
|
|
139650
|
-
|
|
139651
|
-
options = {
|
|
139652
|
-
...options,
|
|
139653
|
-
moddleExtensions: {
|
|
139654
|
-
...commonModdleExtensions,
|
|
139655
|
-
...options.moddleExtensions
|
|
139656
|
-
},
|
|
139657
|
-
propertiesPanel: {
|
|
139658
|
-
tooltip: TooltipProvider,
|
|
139659
|
-
...options.propertiesPanel
|
|
139660
|
-
}
|
|
139661
|
-
};
|
|
139662
|
-
|
|
139663
|
-
Modeler$1.call(this, options);
|
|
139664
|
-
}
|
|
139665
|
-
|
|
139666
|
-
e$7(Modeler, Modeler$1);
|
|
139667
|
-
|
|
139668
|
-
Modeler.prototype._camundaPlatformModules = [
|
|
139669
|
-
behaviorsModule,
|
|
139670
|
-
index$4,
|
|
139671
|
-
index,
|
|
139672
|
-
colorPickerModule,
|
|
139673
|
-
index$1,
|
|
139674
|
-
CamundaVariableResolverModule,
|
|
139675
|
-
RemoveTemplatesModule
|
|
139676
|
-
];
|
|
139677
|
-
|
|
139678
|
-
Modeler.prototype._modules = [].concat(
|
|
139679
|
-
Modeler$1.prototype._modules,
|
|
139680
|
-
Modeler.prototype._camundaPlatformModules
|
|
141174
|
+
/**
|
|
141175
|
+
* @typedef {import('bpmn-js/lib/BaseViewer').BaseViewerOptions} BaseViewerOptions
|
|
141176
|
+
*/
|
|
141177
|
+
|
|
141178
|
+
/**
|
|
141179
|
+
* @param {BaseViewerOptions} options
|
|
141180
|
+
*/
|
|
141181
|
+
function Modeler(options = {}) {
|
|
141182
|
+
|
|
141183
|
+
options = {
|
|
141184
|
+
...options,
|
|
141185
|
+
moddleExtensions: {
|
|
141186
|
+
...commonModdleExtensions,
|
|
141187
|
+
...options.moddleExtensions
|
|
141188
|
+
},
|
|
141189
|
+
propertiesPanel: {
|
|
141190
|
+
tooltip: TooltipProvider,
|
|
141191
|
+
...options.propertiesPanel
|
|
141192
|
+
}
|
|
141193
|
+
};
|
|
141194
|
+
|
|
141195
|
+
Modeler$1.call(this, options);
|
|
141196
|
+
}
|
|
141197
|
+
|
|
141198
|
+
e$7(Modeler, Modeler$1);
|
|
141199
|
+
|
|
141200
|
+
Modeler.prototype._camundaPlatformModules = [
|
|
141201
|
+
behaviorsModule,
|
|
141202
|
+
index$4,
|
|
141203
|
+
index,
|
|
141204
|
+
colorPickerModule,
|
|
141205
|
+
index$1,
|
|
141206
|
+
CamundaVariableResolverModule,
|
|
141207
|
+
RemoveTemplatesModule
|
|
141208
|
+
];
|
|
141209
|
+
|
|
141210
|
+
Modeler.prototype._modules = [].concat(
|
|
141211
|
+
Modeler$1.prototype._modules,
|
|
141212
|
+
Modeler.prototype._camundaPlatformModules
|
|
139681
141213
|
);
|
|
139682
141214
|
|
|
139683
141215
|
return Modeler;
|