@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/assets/form-js.css
CHANGED
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
--color-accent-readonly: var(--cds-border-strong, var(--cds-border-strong-01, var(--color-grey-225-10-55)));
|
|
69
69
|
--color-datepicker-focused-day: var(--cds-button-primary, var(--color-grey-225-10-55));
|
|
70
70
|
--color-shadow: var(--cds-shadow, var(--color-grey-225-10-85));
|
|
71
|
-
--font-family:
|
|
71
|
+
--font-family: 'IBM Plex Sans', sans-serif;
|
|
72
72
|
--font-size-group: 15px;
|
|
73
73
|
--font-size-base: 14px;
|
|
74
74
|
--font-size-input: 14px;
|
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var ids$3 = require('ids');
|
|
4
4
|
var minDash = require('min-dash');
|
|
5
5
|
var Big = require('big.js');
|
|
6
6
|
var classNames = require('classnames');
|
|
@@ -13,7 +13,7 @@ var flatpickr = require('flatpickr');
|
|
|
13
13
|
var React = require('preact/compat');
|
|
14
14
|
var DOMPurify = require('dompurify');
|
|
15
15
|
var didi = require('didi');
|
|
16
|
-
var feelin = require('feelin');
|
|
16
|
+
var feelin = require('@bpmn-io/feelin');
|
|
17
17
|
var feelers = require('feelers');
|
|
18
18
|
var marked = require('marked');
|
|
19
19
|
|
|
@@ -42,7 +42,7 @@ const getFlavouredFeelVariableNames = (feelString, feelFlavour = 'expression', o
|
|
|
42
42
|
specialDepthAccessors = {}
|
|
43
43
|
} = options;
|
|
44
44
|
if (!['expression', 'unaryTest'].includes(feelFlavour)) return [];
|
|
45
|
-
const tree = feelFlavour === 'expression' ? feelin.parseExpression(feelString) : feelin.parseUnaryTests(feelString);
|
|
45
|
+
const tree = feelFlavour === 'expression' ? feelin.parseExpression(feelString, {}, undefined) : feelin.parseUnaryTests(feelString, {}, undefined);
|
|
46
46
|
const simpleExpressionTree = _buildSimpleFeelStructureTree(tree, feelString);
|
|
47
47
|
const variables = function _unfoldVariables(node) {
|
|
48
48
|
if (node.name === 'PathExpression') {
|
|
@@ -287,7 +287,9 @@ class FeelExpressionLanguage {
|
|
|
287
287
|
return null;
|
|
288
288
|
}
|
|
289
289
|
try {
|
|
290
|
-
const
|
|
290
|
+
const {
|
|
291
|
+
value: result
|
|
292
|
+
} = feelin.evaluate(expression.slice(1), data);
|
|
291
293
|
return result;
|
|
292
294
|
} catch (error) {
|
|
293
295
|
this._eventBus.fire('error', {
|
|
@@ -2014,7 +2016,7 @@ Checklist.config = {
|
|
|
2014
2016
|
};
|
|
2015
2017
|
|
|
2016
2018
|
const noop$1 = () => false;
|
|
2017
|
-
const ids$2 = new Ids([32, 36, 1]);
|
|
2019
|
+
const ids$2 = new ids$3.Ids([32, 36, 1]);
|
|
2018
2020
|
function FormField(props) {
|
|
2019
2021
|
const instanceIdRef = hooks.useRef(ids$2.next());
|
|
2020
2022
|
const {
|
|
@@ -2514,6 +2516,9 @@ function Datepicker(props) {
|
|
|
2514
2516
|
// flatpicker logic that was lost when setting allowInput to true
|
|
2515
2517
|
instance.config.onOpen = [() => instance.calendarContainer.addEventListener('focusout', onCalendarFocusOut), () => instance.calendarContainer.addEventListener('mousedown', onCalendarMouseDown)];
|
|
2516
2518
|
instance.config.onClose = [() => instance.calendarContainer.removeEventListener('focusout', onCalendarFocusOut), () => instance.calendarContainer.removeEventListener('mousedown', onCalendarMouseDown)];
|
|
2519
|
+
return () => {
|
|
2520
|
+
instance.destroy();
|
|
2521
|
+
};
|
|
2517
2522
|
}, [disallowPassedDates]);
|
|
2518
2523
|
|
|
2519
2524
|
// onChange is updated dynamically, so not to re-render the flatpicker every time it changes
|
|
@@ -5768,7 +5773,7 @@ function serializeCellData(cellData) {
|
|
|
5768
5773
|
const FILE_PICKER_FILE_KEY_PREFIX = 'files::';
|
|
5769
5774
|
|
|
5770
5775
|
const type$1 = 'filepicker';
|
|
5771
|
-
const ids$1 = new Ids();
|
|
5776
|
+
const ids$1 = new ids$3.Ids();
|
|
5772
5777
|
const EMPTY_ARRAY$1 = [];
|
|
5773
5778
|
|
|
5774
5779
|
/**
|
|
@@ -6723,7 +6728,9 @@ class ConditionChecker {
|
|
|
6723
6728
|
}
|
|
6724
6729
|
try {
|
|
6725
6730
|
// cut off initial '='
|
|
6726
|
-
const
|
|
6731
|
+
const {
|
|
6732
|
+
value: result
|
|
6733
|
+
} = feelin.unaryTest(condition.slice(1), data);
|
|
6727
6734
|
return result;
|
|
6728
6735
|
} catch (error) {
|
|
6729
6736
|
this._eventBus.fire('error', {
|
|
@@ -8941,7 +8948,7 @@ class FormLayouter {
|
|
|
8941
8948
|
constructor(eventBus) {
|
|
8942
8949
|
/** @type Array<FormRows> */
|
|
8943
8950
|
this._rows = [];
|
|
8944
|
-
this._ids = new Ids([32, 36, 1]);
|
|
8951
|
+
this._ids = new ids$3.Ids([32, 36, 1]);
|
|
8945
8952
|
this._eventBus = eventBus;
|
|
8946
8953
|
}
|
|
8947
8954
|
|
|
@@ -9069,7 +9076,7 @@ class FormFieldRegistry {
|
|
|
9069
9076
|
this._eventBus = eventBus;
|
|
9070
9077
|
this._formFields = {};
|
|
9071
9078
|
eventBus.on('form.clear', () => this.clear());
|
|
9072
|
-
this._ids = new Ids([32, 36, 1]);
|
|
9079
|
+
this._ids = new ids$3.Ids([32, 36, 1]);
|
|
9073
9080
|
}
|
|
9074
9081
|
add(formField) {
|
|
9075
9082
|
const {
|
|
@@ -9400,7 +9407,7 @@ const CoreModule = {
|
|
|
9400
9407
|
* @typedef { OnEventWithPriority & OnEventWithOutPriority } OnEventType
|
|
9401
9408
|
*/
|
|
9402
9409
|
|
|
9403
|
-
const ids = new Ids([32, 36, 1]);
|
|
9410
|
+
const ids = new ids$3.Ids([32, 36, 1]);
|
|
9404
9411
|
|
|
9405
9412
|
/**
|
|
9406
9413
|
* The form.
|