@bpmn-io/form-js-editor 0.10.0 → 0.11.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/assets/form-js-editor.css +11 -3
- package/dist/index.cjs +24 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +24 -10
- package/dist/index.es.js.map +1 -1
- package/package.json +3 -3
|
@@ -79,12 +79,20 @@
|
|
|
79
79
|
margin: 0 5px;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
.fjs-editor-container .fjs-element
|
|
83
|
-
margin-top:
|
|
82
|
+
.fjs-editor-container .fjs-element {
|
|
83
|
+
margin-top: 4px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.fjs-editor-container .fjs-element:first-of-type {
|
|
87
|
+
margin-top: 8px;
|
|
84
88
|
}
|
|
85
89
|
|
|
86
90
|
.fjs-editor-container .fjs-form-field:not(.fjs-powered-by) {
|
|
87
|
-
margin: 1px
|
|
91
|
+
margin: 1px 12px;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.fjs-editor-container .fjs-powered-by {
|
|
95
|
+
margin-top: 4px;
|
|
88
96
|
}
|
|
89
97
|
|
|
90
98
|
.fjs-editor-container .fjs-form > .fjs-element {
|
package/dist/index.cjs
CHANGED
|
@@ -6106,7 +6106,12 @@ function NumberArrowStep(props) {
|
|
|
6106
6106
|
if (!isValidNumber(value)) return null;
|
|
6107
6107
|
return value;
|
|
6108
6108
|
};
|
|
6109
|
-
const
|
|
6109
|
+
const clearLeadingZeroes = value => {
|
|
6110
|
+
if (!value) return value;
|
|
6111
|
+
const trimmed = value.replace(/^0+/g, '');
|
|
6112
|
+
return (trimmed.startsWith('.') ? '0' : '') + trimmed;
|
|
6113
|
+
};
|
|
6114
|
+
const setValue = value => editField(field, ['increment'], clearLeadingZeroes(value));
|
|
6110
6115
|
const decimalDigitsSet = decimalDigits || decimalDigits === 0;
|
|
6111
6116
|
return TextfieldEntry({
|
|
6112
6117
|
debounce,
|
|
@@ -6991,7 +6996,7 @@ function ConstraintsGroup(field, editField) {
|
|
|
6991
6996
|
|
|
6992
6997
|
const VALIDATION_TYPE_OPTIONS = {
|
|
6993
6998
|
custom: {
|
|
6994
|
-
value:
|
|
6999
|
+
value: undefined,
|
|
6995
7000
|
label: 'Custom'
|
|
6996
7001
|
},
|
|
6997
7002
|
email: {
|
|
@@ -7170,10 +7175,10 @@ function Min(props) {
|
|
|
7170
7175
|
return NumberFieldEntry({
|
|
7171
7176
|
debounce,
|
|
7172
7177
|
element: field,
|
|
7173
|
-
getValue: getValue('min'),
|
|
7174
7178
|
id,
|
|
7175
7179
|
label: 'Minimum',
|
|
7176
|
-
|
|
7180
|
+
step: 'any',
|
|
7181
|
+
getValue: getValue('min'),
|
|
7177
7182
|
setValue: onChange('min')
|
|
7178
7183
|
});
|
|
7179
7184
|
}
|
|
@@ -7188,10 +7193,10 @@ function Max(props) {
|
|
|
7188
7193
|
return NumberFieldEntry({
|
|
7189
7194
|
debounce,
|
|
7190
7195
|
element: field,
|
|
7191
|
-
getValue: getValue('max'),
|
|
7192
7196
|
id,
|
|
7193
7197
|
label: 'Maximum',
|
|
7194
|
-
|
|
7198
|
+
step: 'any',
|
|
7199
|
+
getValue: getValue('max'),
|
|
7195
7200
|
setValue: onChange('max')
|
|
7196
7201
|
});
|
|
7197
7202
|
}
|
|
@@ -7203,16 +7208,25 @@ function ValidationType(props) {
|
|
|
7203
7208
|
onChange
|
|
7204
7209
|
} = props;
|
|
7205
7210
|
const debounce = useService('debounce');
|
|
7211
|
+
const clearCustomValidation = () => {
|
|
7212
|
+
onChange('minLength')(undefined);
|
|
7213
|
+
onChange('maxLength')(undefined);
|
|
7214
|
+
onChange('pattern')(undefined);
|
|
7215
|
+
};
|
|
7216
|
+
const setValue = validationType => {
|
|
7217
|
+
if (validationType) {
|
|
7218
|
+
clearCustomValidation();
|
|
7219
|
+
}
|
|
7220
|
+
onChange('validationType')(validationType || undefined);
|
|
7221
|
+
};
|
|
7206
7222
|
return SelectEntry({
|
|
7207
7223
|
debounce,
|
|
7208
7224
|
element: field,
|
|
7209
7225
|
getValue: getValue('validationType'),
|
|
7210
7226
|
id,
|
|
7211
7227
|
label: 'Regular expression validation',
|
|
7212
|
-
setValue
|
|
7213
|
-
getOptions()
|
|
7214
|
-
return Object.values(VALIDATION_TYPE_OPTIONS);
|
|
7215
|
-
}
|
|
7228
|
+
setValue,
|
|
7229
|
+
getOptions: () => Object.values(VALIDATION_TYPE_OPTIONS)
|
|
7216
7230
|
});
|
|
7217
7231
|
}
|
|
7218
7232
|
|