@bpmn-io/form-js-viewer 1.15.3 → 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 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: '# 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' || lodash.isEqual(evaluationMemo, value) || !expressionLoopPreventer.registerExpressionExecution(this)) {
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(' '),
@@ -7974,7 +7984,7 @@ EventBus.prototype.once = function (events, priority, callback, that) {
7974
7984
  * If no callback is given, all listeners for a given event name are being removed.
7975
7985
  *
7976
7986
  * @param {string|string[]} events
7977
- * @param {EventBusEventCallback} [callback]
7987
+ * @param {EventBusEventCallback<unknown>} [callback]
7978
7988
  */
7979
7989
  EventBus.prototype.off = function (events, callback) {
7980
7990
  events = minDash.isArray(events) ? events : [events];
@@ -9923,6 +9933,7 @@ exports.SECURITY_ATTRIBUTES_DEFINITIONS = SECURITY_ATTRIBUTES_DEFINITIONS;
9923
9933
  exports.Select = Select;
9924
9934
  exports.Separator = Separator;
9925
9935
  exports.Spacer = Spacer;
9936
+ exports.TEXT_VIEW_DEFAULT_TEXT = TEXT_VIEW_DEFAULT_TEXT;
9926
9937
  exports.TIME_INTERVAL_PATH = TIME_INTERVAL_PATH;
9927
9938
  exports.TIME_LABEL_PATH = TIME_LABEL_PATH;
9928
9939
  exports.TIME_SERIALISINGFORMAT_LABELS = TIME_SERIALISINGFORMAT_LABELS;