@bpmn-io/form-js-viewer 1.15.2 → 1.15.4
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/index.cjs +19 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +19 -6
- package/dist/index.es.js.map +1 -1
- package/dist/types/Form.d.ts +3 -1
- package/dist/types/features/viewerCommands/index.d.ts +3 -1
- package/dist/types/util/constants/SpacerConstants.d.ts +1 -0
- package/dist/types/util/constants/TextConstants.d.ts +1 -0
- package/dist/types/util/constants/index.d.ts +1 -0
- package/package.json +8 -8
package/dist/index.cjs
CHANGED
|
@@ -12,7 +12,6 @@ var luxon = require('luxon');
|
|
|
12
12
|
var flatpickr = require('flatpickr');
|
|
13
13
|
var React = require('preact/compat');
|
|
14
14
|
var DOMPurify = require('dompurify');
|
|
15
|
-
var lodash = require('lodash');
|
|
16
15
|
var didi = require('didi');
|
|
17
16
|
var feelin = require('feelin');
|
|
18
17
|
var feelers = require('feelers');
|
|
@@ -549,6 +548,8 @@ const SECURITY_ATTRIBUTES_DEFINITIONS = [{
|
|
|
549
548
|
label: 'Storage access by user'
|
|
550
549
|
}];
|
|
551
550
|
|
|
551
|
+
const TEXT_VIEW_DEFAULT_TEXT = '# Text';
|
|
552
|
+
|
|
552
553
|
function createInjector(bootstrapModules) {
|
|
553
554
|
const injector = new didi.Injector(bootstrapModules);
|
|
554
555
|
injector.init();
|
|
@@ -3878,6 +3879,9 @@ function Numberfield(props) {
|
|
|
3878
3879
|
e.preventDefault();
|
|
3879
3880
|
return;
|
|
3880
3881
|
}
|
|
3882
|
+
if (e.code === 'Enter') {
|
|
3883
|
+
flushOnChange && flushOnChange();
|
|
3884
|
+
}
|
|
3881
3885
|
};
|
|
3882
3886
|
|
|
3883
3887
|
// intercept key presses which would lead to an invalid number
|
|
@@ -5016,7 +5020,7 @@ Text.config = {
|
|
|
5016
5020
|
name: 'Text view',
|
|
5017
5021
|
group: 'presentation',
|
|
5018
5022
|
create: (options = {}) => ({
|
|
5019
|
-
text:
|
|
5023
|
+
text: TEXT_VIEW_DEFAULT_TEXT,
|
|
5020
5024
|
...options
|
|
5021
5025
|
}),
|
|
5022
5026
|
getSubheading: field => {
|
|
@@ -5113,7 +5117,7 @@ function ExpressionField(props) {
|
|
|
5113
5117
|
});
|
|
5114
5118
|
}, [field, evaluationMemo, onChange]);
|
|
5115
5119
|
hooks.useEffect(() => {
|
|
5116
|
-
if (computeOn !== 'change' ||
|
|
5120
|
+
if (computeOn !== 'change' || isEqual(evaluationMemo, value) || !expressionLoopPreventer.registerExpressionExecution(this)) {
|
|
5117
5121
|
return;
|
|
5118
5122
|
}
|
|
5119
5123
|
sendValue();
|
|
@@ -5187,6 +5191,11 @@ function Textfield(props) {
|
|
|
5187
5191
|
const onInputFocus = () => {
|
|
5188
5192
|
onFocus && onFocus();
|
|
5189
5193
|
};
|
|
5194
|
+
const onKeyDown = e => {
|
|
5195
|
+
if (e.code === 'Enter') {
|
|
5196
|
+
flushOnChange && flushOnChange();
|
|
5197
|
+
}
|
|
5198
|
+
};
|
|
5190
5199
|
const descriptionId = `${domId}-description`;
|
|
5191
5200
|
const errorMessageId = `${domId}-error-message`;
|
|
5192
5201
|
return jsxRuntime.jsxs("div", {
|
|
@@ -5212,6 +5221,7 @@ function Textfield(props) {
|
|
|
5212
5221
|
onInput: onInputChange,
|
|
5213
5222
|
onBlur: onInputBlur,
|
|
5214
5223
|
onFocus: onInputFocus,
|
|
5224
|
+
onKeyDown: onKeyDown,
|
|
5215
5225
|
type: "text",
|
|
5216
5226
|
value: value,
|
|
5217
5227
|
"aria-describedby": [descriptionId, errorMessageId].join(' '),
|
|
@@ -5749,7 +5759,10 @@ function serializeCellData(cellData) {
|
|
|
5749
5759
|
if (cellData !== null && typeof cellData === 'object') {
|
|
5750
5760
|
return JSON.stringify(cellData);
|
|
5751
5761
|
}
|
|
5752
|
-
|
|
5762
|
+
if (cellData === null || cellData === undefined) {
|
|
5763
|
+
return '';
|
|
5764
|
+
}
|
|
5765
|
+
return `${cellData}`;
|
|
5753
5766
|
}
|
|
5754
5767
|
|
|
5755
5768
|
const FILE_PICKER_FILE_KEY_PREFIX = 'files::';
|
|
@@ -7971,7 +7984,7 @@ EventBus.prototype.once = function (events, priority, callback, that) {
|
|
|
7971
7984
|
* If no callback is given, all listeners for a given event name are being removed.
|
|
7972
7985
|
*
|
|
7973
7986
|
* @param {string|string[]} events
|
|
7974
|
-
* @param {EventBusEventCallback} [callback]
|
|
7987
|
+
* @param {EventBusEventCallback<unknown>} [callback]
|
|
7975
7988
|
*/
|
|
7976
7989
|
EventBus.prototype.off = function (events, callback) {
|
|
7977
7990
|
events = minDash.isArray(events) ? events : [events];
|
|
@@ -9920,6 +9933,7 @@ exports.SECURITY_ATTRIBUTES_DEFINITIONS = SECURITY_ATTRIBUTES_DEFINITIONS;
|
|
|
9920
9933
|
exports.Select = Select;
|
|
9921
9934
|
exports.Separator = Separator;
|
|
9922
9935
|
exports.Spacer = Spacer;
|
|
9936
|
+
exports.TEXT_VIEW_DEFAULT_TEXT = TEXT_VIEW_DEFAULT_TEXT;
|
|
9923
9937
|
exports.TIME_INTERVAL_PATH = TIME_INTERVAL_PATH;
|
|
9924
9938
|
exports.TIME_LABEL_PATH = TIME_LABEL_PATH;
|
|
9925
9939
|
exports.TIME_SERIALISINGFORMAT_LABELS = TIME_SERIALISINGFORMAT_LABELS;
|