@bpmn-io/form-js-viewer 1.18.0 → 1.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/form-js.css +1 -1
- package/dist/index.cjs +17 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +12 -5
- package/dist/index.es.js.map +1 -1
- package/dist/types/core/FormFieldRegistry.d.ts +2 -1
- package/dist/types/core/FormLayouter.d.ts +2 -1
- package/package.json +11 -11
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Ids from 'ids';
|
|
1
|
+
import { Ids } from 'ids';
|
|
2
2
|
import { isString, get, isNil, isObject, some, isNumber, set, findIndex, isArray, isDefined, values, uniqueBy, isFunction, bind, assign, groupBy, isUndefined } from 'min-dash';
|
|
3
3
|
import Big from 'big.js';
|
|
4
4
|
import classNames from 'classnames';
|
|
@@ -12,7 +12,7 @@ import * as React from 'preact/compat';
|
|
|
12
12
|
import { createPortal } from 'preact/compat';
|
|
13
13
|
import DOMPurify from 'dompurify';
|
|
14
14
|
import { Injector } from 'didi';
|
|
15
|
-
import { parseExpression, parseUnaryTests, evaluate, unaryTest } from 'feelin';
|
|
15
|
+
import { parseExpression, parseUnaryTests, evaluate, unaryTest } from '@bpmn-io/feelin';
|
|
16
16
|
import { evaluate as evaluate$1, parser, buildSimpleTree } from 'feelers';
|
|
17
17
|
import { marked } from 'marked';
|
|
18
18
|
|
|
@@ -22,7 +22,7 @@ const getFlavouredFeelVariableNames = (feelString, feelFlavour = 'expression', o
|
|
|
22
22
|
specialDepthAccessors = {}
|
|
23
23
|
} = options;
|
|
24
24
|
if (!['expression', 'unaryTest'].includes(feelFlavour)) return [];
|
|
25
|
-
const tree = feelFlavour === 'expression' ? parseExpression(feelString) : parseUnaryTests(feelString);
|
|
25
|
+
const tree = feelFlavour === 'expression' ? parseExpression(feelString, {}, undefined) : parseUnaryTests(feelString, {}, undefined);
|
|
26
26
|
const simpleExpressionTree = _buildSimpleFeelStructureTree(tree, feelString);
|
|
27
27
|
const variables = function _unfoldVariables(node) {
|
|
28
28
|
if (node.name === 'PathExpression') {
|
|
@@ -267,7 +267,9 @@ class FeelExpressionLanguage {
|
|
|
267
267
|
return null;
|
|
268
268
|
}
|
|
269
269
|
try {
|
|
270
|
-
const
|
|
270
|
+
const {
|
|
271
|
+
value: result
|
|
272
|
+
} = evaluate(expression.slice(1), data);
|
|
271
273
|
return result;
|
|
272
274
|
} catch (error) {
|
|
273
275
|
this._eventBus.fire('error', {
|
|
@@ -2494,6 +2496,9 @@ function Datepicker(props) {
|
|
|
2494
2496
|
// flatpicker logic that was lost when setting allowInput to true
|
|
2495
2497
|
instance.config.onOpen = [() => instance.calendarContainer.addEventListener('focusout', onCalendarFocusOut), () => instance.calendarContainer.addEventListener('mousedown', onCalendarMouseDown)];
|
|
2496
2498
|
instance.config.onClose = [() => instance.calendarContainer.removeEventListener('focusout', onCalendarFocusOut), () => instance.calendarContainer.removeEventListener('mousedown', onCalendarMouseDown)];
|
|
2499
|
+
return () => {
|
|
2500
|
+
instance.destroy();
|
|
2501
|
+
};
|
|
2497
2502
|
}, [disallowPassedDates]);
|
|
2498
2503
|
|
|
2499
2504
|
// onChange is updated dynamically, so not to re-render the flatpicker every time it changes
|
|
@@ -6703,7 +6708,9 @@ class ConditionChecker {
|
|
|
6703
6708
|
}
|
|
6704
6709
|
try {
|
|
6705
6710
|
// cut off initial '='
|
|
6706
|
-
const
|
|
6711
|
+
const {
|
|
6712
|
+
value: result
|
|
6713
|
+
} = unaryTest(condition.slice(1), data);
|
|
6707
6714
|
return result;
|
|
6708
6715
|
} catch (error) {
|
|
6709
6716
|
this._eventBus.fire('error', {
|