@bpmn-io/form-js-viewer 1.15.2 → 1.16.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/index.cjs +20 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +20 -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/index.d.ts +1 -1
- package/dist/types/util/constants/TextConstants.d.ts +1 -0
- package/dist/types/util/constants/index.d.ts +1 -0
- package/package.json +3 -3
package/dist/index.es.js
CHANGED
|
@@ -529,6 +529,8 @@ const SECURITY_ATTRIBUTES_DEFINITIONS = [{
|
|
|
529
529
|
label: 'Storage access by user'
|
|
530
530
|
}];
|
|
531
531
|
|
|
532
|
+
const TEXT_VIEW_DEFAULT_TEXT = '# Text';
|
|
533
|
+
|
|
532
534
|
function createInjector(bootstrapModules) {
|
|
533
535
|
const injector = new Injector(bootstrapModules);
|
|
534
536
|
injector.init();
|
|
@@ -3858,6 +3860,9 @@ function Numberfield(props) {
|
|
|
3858
3860
|
e.preventDefault();
|
|
3859
3861
|
return;
|
|
3860
3862
|
}
|
|
3863
|
+
if (e.code === 'Enter') {
|
|
3864
|
+
flushOnChange && flushOnChange();
|
|
3865
|
+
}
|
|
3861
3866
|
};
|
|
3862
3867
|
|
|
3863
3868
|
// intercept key presses which would lead to an invalid number
|
|
@@ -4996,7 +5001,7 @@ Text.config = {
|
|
|
4996
5001
|
name: 'Text view',
|
|
4997
5002
|
group: 'presentation',
|
|
4998
5003
|
create: (options = {}) => ({
|
|
4999
|
-
text:
|
|
5004
|
+
text: TEXT_VIEW_DEFAULT_TEXT,
|
|
5000
5005
|
...options
|
|
5001
5006
|
}),
|
|
5002
5007
|
getSubheading: field => {
|
|
@@ -5167,6 +5172,11 @@ function Textfield(props) {
|
|
|
5167
5172
|
const onInputFocus = () => {
|
|
5168
5173
|
onFocus && onFocus();
|
|
5169
5174
|
};
|
|
5175
|
+
const onKeyDown = e => {
|
|
5176
|
+
if (e.code === 'Enter') {
|
|
5177
|
+
flushOnChange && flushOnChange();
|
|
5178
|
+
}
|
|
5179
|
+
};
|
|
5170
5180
|
const descriptionId = `${domId}-description`;
|
|
5171
5181
|
const errorMessageId = `${domId}-error-message`;
|
|
5172
5182
|
return jsxs("div", {
|
|
@@ -5192,6 +5202,7 @@ function Textfield(props) {
|
|
|
5192
5202
|
onInput: onInputChange,
|
|
5193
5203
|
onBlur: onInputBlur,
|
|
5194
5204
|
onFocus: onInputFocus,
|
|
5205
|
+
onKeyDown: onKeyDown,
|
|
5195
5206
|
type: "text",
|
|
5196
5207
|
value: value,
|
|
5197
5208
|
"aria-describedby": [descriptionId, errorMessageId].join(' '),
|
|
@@ -5729,7 +5740,10 @@ function serializeCellData(cellData) {
|
|
|
5729
5740
|
if (cellData !== null && typeof cellData === 'object') {
|
|
5730
5741
|
return JSON.stringify(cellData);
|
|
5731
5742
|
}
|
|
5732
|
-
|
|
5743
|
+
if (cellData === null || cellData === undefined) {
|
|
5744
|
+
return '';
|
|
5745
|
+
}
|
|
5746
|
+
return `${cellData}`;
|
|
5733
5747
|
}
|
|
5734
5748
|
|
|
5735
5749
|
const FILE_PICKER_FILE_KEY_PREFIX = 'files::';
|
|
@@ -7951,7 +7965,7 @@ EventBus.prototype.once = function (events, priority, callback, that) {
|
|
|
7951
7965
|
* If no callback is given, all listeners for a given event name are being removed.
|
|
7952
7966
|
*
|
|
7953
7967
|
* @param {string|string[]} events
|
|
7954
|
-
* @param {EventBusEventCallback} [callback]
|
|
7968
|
+
* @param {EventBusEventCallback<unknown>} [callback]
|
|
7955
7969
|
*/
|
|
7956
7970
|
EventBus.prototype.off = function (events, callback) {
|
|
7957
7971
|
events = isArray(events) ? events : [events];
|
|
@@ -8339,7 +8353,7 @@ function runNumberValidation(field, value) {
|
|
|
8339
8353
|
function runPresetValidation(field, validation, value) {
|
|
8340
8354
|
const errors = [];
|
|
8341
8355
|
if (validation.pattern && value && !new RegExp(validation.pattern).test(value)) {
|
|
8342
|
-
errors.push(`Field must match pattern ${validation.pattern}.`);
|
|
8356
|
+
errors.push(validation.patternErrorMessage || `Field must match pattern ${validation.pattern}.`);
|
|
8343
8357
|
}
|
|
8344
8358
|
if (validation.required) {
|
|
8345
8359
|
const isUncheckedCheckbox = field.type === 'checkbox' && value === false;
|
|
@@ -9817,7 +9831,7 @@ class Form {
|
|
|
9817
9831
|
}
|
|
9818
9832
|
}
|
|
9819
9833
|
|
|
9820
|
-
const schemaVersion =
|
|
9834
|
+
const schemaVersion = 19;
|
|
9821
9835
|
|
|
9822
9836
|
/**
|
|
9823
9837
|
* @typedef { import('./types').CreateFormOptions } CreateFormOptions
|
|
@@ -9842,5 +9856,5 @@ function createForm(options) {
|
|
|
9842
9856
|
});
|
|
9843
9857
|
}
|
|
9844
9858
|
|
|
9845
|
-
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 };
|
|
9859
|
+
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 };
|
|
9846
9860
|
//# sourceMappingURL=index.es.js.map
|