@bpmn-io/form-js-viewer 1.15.3 → 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 +16 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +16 -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/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.cjs
CHANGED
|
@@ -549,6 +549,8 @@ const SECURITY_ATTRIBUTES_DEFINITIONS = [{
|
|
|
549
549
|
label: 'Storage access by user'
|
|
550
550
|
}];
|
|
551
551
|
|
|
552
|
+
const TEXT_VIEW_DEFAULT_TEXT = '# Text';
|
|
553
|
+
|
|
552
554
|
function createInjector(bootstrapModules) {
|
|
553
555
|
const injector = new didi.Injector(bootstrapModules);
|
|
554
556
|
injector.init();
|
|
@@ -3878,6 +3880,9 @@ function Numberfield(props) {
|
|
|
3878
3880
|
e.preventDefault();
|
|
3879
3881
|
return;
|
|
3880
3882
|
}
|
|
3883
|
+
if (e.code === 'Enter') {
|
|
3884
|
+
flushOnChange && flushOnChange();
|
|
3885
|
+
}
|
|
3881
3886
|
};
|
|
3882
3887
|
|
|
3883
3888
|
// intercept key presses which would lead to an invalid number
|
|
@@ -5016,7 +5021,7 @@ Text.config = {
|
|
|
5016
5021
|
name: 'Text view',
|
|
5017
5022
|
group: 'presentation',
|
|
5018
5023
|
create: (options = {}) => ({
|
|
5019
|
-
text:
|
|
5024
|
+
text: TEXT_VIEW_DEFAULT_TEXT,
|
|
5020
5025
|
...options
|
|
5021
5026
|
}),
|
|
5022
5027
|
getSubheading: field => {
|
|
@@ -5187,6 +5192,11 @@ function Textfield(props) {
|
|
|
5187
5192
|
const onInputFocus = () => {
|
|
5188
5193
|
onFocus && onFocus();
|
|
5189
5194
|
};
|
|
5195
|
+
const onKeyDown = e => {
|
|
5196
|
+
if (e.code === 'Enter') {
|
|
5197
|
+
flushOnChange && flushOnChange();
|
|
5198
|
+
}
|
|
5199
|
+
};
|
|
5190
5200
|
const descriptionId = `${domId}-description`;
|
|
5191
5201
|
const errorMessageId = `${domId}-error-message`;
|
|
5192
5202
|
return jsxRuntime.jsxs("div", {
|
|
@@ -5212,6 +5222,7 @@ function Textfield(props) {
|
|
|
5212
5222
|
onInput: onInputChange,
|
|
5213
5223
|
onBlur: onInputBlur,
|
|
5214
5224
|
onFocus: onInputFocus,
|
|
5225
|
+
onKeyDown: onKeyDown,
|
|
5215
5226
|
type: "text",
|
|
5216
5227
|
value: value,
|
|
5217
5228
|
"aria-describedby": [descriptionId, errorMessageId].join(' '),
|
|
@@ -7974,7 +7985,7 @@ EventBus.prototype.once = function (events, priority, callback, that) {
|
|
|
7974
7985
|
* If no callback is given, all listeners for a given event name are being removed.
|
|
7975
7986
|
*
|
|
7976
7987
|
* @param {string|string[]} events
|
|
7977
|
-
* @param {EventBusEventCallback} [callback]
|
|
7988
|
+
* @param {EventBusEventCallback<unknown>} [callback]
|
|
7978
7989
|
*/
|
|
7979
7990
|
EventBus.prototype.off = function (events, callback) {
|
|
7980
7991
|
events = minDash.isArray(events) ? events : [events];
|
|
@@ -8362,7 +8373,7 @@ function runNumberValidation(field, value) {
|
|
|
8362
8373
|
function runPresetValidation(field, validation, value) {
|
|
8363
8374
|
const errors = [];
|
|
8364
8375
|
if (validation.pattern && value && !new RegExp(validation.pattern).test(value)) {
|
|
8365
|
-
errors.push(`Field must match pattern ${validation.pattern}.`);
|
|
8376
|
+
errors.push(validation.patternErrorMessage || `Field must match pattern ${validation.pattern}.`);
|
|
8366
8377
|
}
|
|
8367
8378
|
if (validation.required) {
|
|
8368
8379
|
const isUncheckedCheckbox = field.type === 'checkbox' && value === false;
|
|
@@ -9840,7 +9851,7 @@ class Form {
|
|
|
9840
9851
|
}
|
|
9841
9852
|
}
|
|
9842
9853
|
|
|
9843
|
-
const schemaVersion =
|
|
9854
|
+
const schemaVersion = 19;
|
|
9844
9855
|
|
|
9845
9856
|
/**
|
|
9846
9857
|
* @typedef { import('./types').CreateFormOptions } CreateFormOptions
|
|
@@ -9923,6 +9934,7 @@ exports.SECURITY_ATTRIBUTES_DEFINITIONS = SECURITY_ATTRIBUTES_DEFINITIONS;
|
|
|
9923
9934
|
exports.Select = Select;
|
|
9924
9935
|
exports.Separator = Separator;
|
|
9925
9936
|
exports.Spacer = Spacer;
|
|
9937
|
+
exports.TEXT_VIEW_DEFAULT_TEXT = TEXT_VIEW_DEFAULT_TEXT;
|
|
9926
9938
|
exports.TIME_INTERVAL_PATH = TIME_INTERVAL_PATH;
|
|
9927
9939
|
exports.TIME_LABEL_PATH = TIME_LABEL_PATH;
|
|
9928
9940
|
exports.TIME_SERIALISINGFORMAT_LABELS = TIME_SERIALISINGFORMAT_LABELS;
|