@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 +15 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +15 -5
- 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.es.js
CHANGED
|
@@ -11,7 +11,6 @@ import flatpickr from 'flatpickr';
|
|
|
11
11
|
import * as React from 'preact/compat';
|
|
12
12
|
import { createPortal } from 'preact/compat';
|
|
13
13
|
import DOMPurify from 'dompurify';
|
|
14
|
-
import { isEqual as isEqual$1 } from 'lodash';
|
|
15
14
|
import { Injector } from 'didi';
|
|
16
15
|
import { parseExpression, parseUnaryTests, evaluate, unaryTest } from 'feelin';
|
|
17
16
|
import { evaluate as evaluate$1, parser, buildSimpleTree } from 'feelers';
|
|
@@ -529,6 +528,8 @@ const SECURITY_ATTRIBUTES_DEFINITIONS = [{
|
|
|
529
528
|
label: 'Storage access by user'
|
|
530
529
|
}];
|
|
531
530
|
|
|
531
|
+
const TEXT_VIEW_DEFAULT_TEXT = '# Text';
|
|
532
|
+
|
|
532
533
|
function createInjector(bootstrapModules) {
|
|
533
534
|
const injector = new Injector(bootstrapModules);
|
|
534
535
|
injector.init();
|
|
@@ -3858,6 +3859,9 @@ function Numberfield(props) {
|
|
|
3858
3859
|
e.preventDefault();
|
|
3859
3860
|
return;
|
|
3860
3861
|
}
|
|
3862
|
+
if (e.code === 'Enter') {
|
|
3863
|
+
flushOnChange && flushOnChange();
|
|
3864
|
+
}
|
|
3861
3865
|
};
|
|
3862
3866
|
|
|
3863
3867
|
// intercept key presses which would lead to an invalid number
|
|
@@ -4996,7 +5000,7 @@ Text.config = {
|
|
|
4996
5000
|
name: 'Text view',
|
|
4997
5001
|
group: 'presentation',
|
|
4998
5002
|
create: (options = {}) => ({
|
|
4999
|
-
text:
|
|
5003
|
+
text: TEXT_VIEW_DEFAULT_TEXT,
|
|
5000
5004
|
...options
|
|
5001
5005
|
}),
|
|
5002
5006
|
getSubheading: field => {
|
|
@@ -5093,7 +5097,7 @@ function ExpressionField(props) {
|
|
|
5093
5097
|
});
|
|
5094
5098
|
}, [field, evaluationMemo, onChange]);
|
|
5095
5099
|
useEffect(() => {
|
|
5096
|
-
if (computeOn !== 'change' || isEqual
|
|
5100
|
+
if (computeOn !== 'change' || isEqual(evaluationMemo, value) || !expressionLoopPreventer.registerExpressionExecution(this)) {
|
|
5097
5101
|
return;
|
|
5098
5102
|
}
|
|
5099
5103
|
sendValue();
|
|
@@ -5167,6 +5171,11 @@ function Textfield(props) {
|
|
|
5167
5171
|
const onInputFocus = () => {
|
|
5168
5172
|
onFocus && onFocus();
|
|
5169
5173
|
};
|
|
5174
|
+
const onKeyDown = e => {
|
|
5175
|
+
if (e.code === 'Enter') {
|
|
5176
|
+
flushOnChange && flushOnChange();
|
|
5177
|
+
}
|
|
5178
|
+
};
|
|
5170
5179
|
const descriptionId = `${domId}-description`;
|
|
5171
5180
|
const errorMessageId = `${domId}-error-message`;
|
|
5172
5181
|
return jsxs("div", {
|
|
@@ -5192,6 +5201,7 @@ function Textfield(props) {
|
|
|
5192
5201
|
onInput: onInputChange,
|
|
5193
5202
|
onBlur: onInputBlur,
|
|
5194
5203
|
onFocus: onInputFocus,
|
|
5204
|
+
onKeyDown: onKeyDown,
|
|
5195
5205
|
type: "text",
|
|
5196
5206
|
value: value,
|
|
5197
5207
|
"aria-describedby": [descriptionId, errorMessageId].join(' '),
|
|
@@ -7954,7 +7964,7 @@ EventBus.prototype.once = function (events, priority, callback, that) {
|
|
|
7954
7964
|
* If no callback is given, all listeners for a given event name are being removed.
|
|
7955
7965
|
*
|
|
7956
7966
|
* @param {string|string[]} events
|
|
7957
|
-
* @param {EventBusEventCallback} [callback]
|
|
7967
|
+
* @param {EventBusEventCallback<unknown>} [callback]
|
|
7958
7968
|
*/
|
|
7959
7969
|
EventBus.prototype.off = function (events, callback) {
|
|
7960
7970
|
events = isArray(events) ? events : [events];
|
|
@@ -9845,5 +9855,5 @@ function createForm(options) {
|
|
|
9845
9855
|
});
|
|
9846
9856
|
}
|
|
9847
9857
|
|
|
9848
|
-
export { ALLOW_ATTRIBUTE, Button, Checkbox, Checklist, ConditionChecker, DATETIME_SUBTYPES, DATETIME_SUBTYPES_LABELS, DATETIME_SUBTYPE_PATH, DATE_DISALLOW_PAST_PATH, DATE_LABEL_PATH, Datetime, Default, Description, DocumentPreview, DynamicList, Errors, ExpressionField, ExpressionFieldModule, ExpressionLanguageModule, ExpressionLoopPreventer, FeelExpressionLanguage, FeelersTemplating, FieldFactory, FilePicker, Form, FormComponent, FormContext, FormField, FormFieldRegistry, FormFields, FormLayouter, FormRenderContext, Group, Html, IFrame, Image, Importer, Label, LocalExpressionContext, MINUTES_IN_DAY, MarkdownRenderer, MarkdownRendererModule, Numberfield, OPTIONS_SOURCES, OPTIONS_SOURCES_DEFAULTS, OPTIONS_SOURCES_LABELS, OPTIONS_SOURCES_PATHS, OPTIONS_SOURCE_DEFAULT, PathRegistry, Radio, RenderModule, RepeatRenderManager, RepeatRenderModule, SANDBOX_ATTRIBUTE, SECURITY_ATTRIBUTES_DEFINITIONS, Select, Separator, Spacer, TIME_INTERVAL_PATH, TIME_LABEL_PATH, TIME_SERIALISINGFORMAT_LABELS, TIME_SERIALISING_FORMATS, TIME_SERIALISING_FORMAT_PATH, TIME_USE24H_PATH, Table, Taglist, Text, Textarea, Textfield, ViewerCommands, ViewerCommandsModule, buildExpressionContext, clone, createForm, createFormContainer, createInjector, escapeHTML, formFields, generateIdForType, generateIndexForType, getAncestryList, getOptionsSource, getSchemaVariables, getScrollContainer, hasEqualValue, iconsByType, isRequired, pathParse, pathsEqual, runExpressionEvaluation, runRecursively, sanitizeDateTimePickerValue, sanitizeHTML, sanitizeIFrameSource, sanitizeImageSource, sanitizeMultiSelectValue, sanitizeSingleSelectValue, schemaVersion, useExpressionEvaluation, useSingleLineTemplateEvaluation, useTemplateEvaluation, wrapCSSStyles, wrapObjectKeysWithUnderscores };
|
|
9858
|
+
export { ALLOW_ATTRIBUTE, Button, Checkbox, Checklist, ConditionChecker, DATETIME_SUBTYPES, DATETIME_SUBTYPES_LABELS, DATETIME_SUBTYPE_PATH, DATE_DISALLOW_PAST_PATH, DATE_LABEL_PATH, Datetime, Default, Description, DocumentPreview, DynamicList, Errors, ExpressionField, ExpressionFieldModule, ExpressionLanguageModule, ExpressionLoopPreventer, FeelExpressionLanguage, FeelersTemplating, FieldFactory, FilePicker, Form, FormComponent, FormContext, FormField, FormFieldRegistry, FormFields, FormLayouter, FormRenderContext, Group, Html, IFrame, Image, Importer, Label, LocalExpressionContext, MINUTES_IN_DAY, MarkdownRenderer, MarkdownRendererModule, Numberfield, OPTIONS_SOURCES, OPTIONS_SOURCES_DEFAULTS, OPTIONS_SOURCES_LABELS, OPTIONS_SOURCES_PATHS, OPTIONS_SOURCE_DEFAULT, PathRegistry, Radio, RenderModule, RepeatRenderManager, RepeatRenderModule, SANDBOX_ATTRIBUTE, SECURITY_ATTRIBUTES_DEFINITIONS, Select, Separator, Spacer, TEXT_VIEW_DEFAULT_TEXT, TIME_INTERVAL_PATH, TIME_LABEL_PATH, TIME_SERIALISINGFORMAT_LABELS, TIME_SERIALISING_FORMATS, TIME_SERIALISING_FORMAT_PATH, TIME_USE24H_PATH, Table, Taglist, Text, Textarea, Textfield, ViewerCommands, ViewerCommandsModule, buildExpressionContext, clone, createForm, createFormContainer, createInjector, escapeHTML, formFields, generateIdForType, generateIndexForType, getAncestryList, getOptionsSource, getSchemaVariables, getScrollContainer, hasEqualValue, iconsByType, isRequired, pathParse, pathsEqual, runExpressionEvaluation, runRecursively, sanitizeDateTimePickerValue, sanitizeHTML, sanitizeIFrameSource, sanitizeImageSource, sanitizeMultiSelectValue, sanitizeSingleSelectValue, schemaVersion, useExpressionEvaluation, useSingleLineTemplateEvaluation, useTemplateEvaluation, wrapCSSStyles, wrapObjectKeysWithUnderscores };
|
|
9849
9859
|
//# sourceMappingURL=index.es.js.map
|