@bpmn-io/form-js-editor 0.12.1 → 0.12.2
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.es.js
CHANGED
|
@@ -886,7 +886,7 @@ function Palette(props) {
|
|
|
886
886
|
return jsxs("div", {
|
|
887
887
|
class: "fjs-palette-field fjs-drag-copy fjs-no-drop",
|
|
888
888
|
"data-field-type": type,
|
|
889
|
-
title: `Create
|
|
889
|
+
title: `Create ${getIndefiniteArticle(type)} ${label} element`,
|
|
890
890
|
children: [Icon ? jsx(Icon, {
|
|
891
891
|
class: "fjs-palette-field-icon",
|
|
892
892
|
width: "36",
|
|
@@ -925,6 +925,12 @@ function groupEntries(entries) {
|
|
|
925
925
|
});
|
|
926
926
|
return groups.filter(g => g.entries.length);
|
|
927
927
|
}
|
|
928
|
+
function getIndefiniteArticle(type) {
|
|
929
|
+
if (['image'].includes(type)) {
|
|
930
|
+
return 'an';
|
|
931
|
+
}
|
|
932
|
+
return 'a';
|
|
933
|
+
}
|
|
928
934
|
|
|
929
935
|
const CURSOR_CLS_PATTERN = /^fjs-cursor-.*$/;
|
|
930
936
|
function set(mode) {
|
|
@@ -5733,6 +5739,7 @@ function Description(props) {
|
|
|
5733
5739
|
});
|
|
5734
5740
|
}
|
|
5735
5741
|
|
|
5742
|
+
const EMPTY_OPTION = null;
|
|
5736
5743
|
function DefaultOptionEntry(props) {
|
|
5737
5744
|
const {
|
|
5738
5745
|
editField,
|
|
@@ -5878,13 +5885,14 @@ function DefaultValueSingleSelect(props) {
|
|
|
5878
5885
|
label
|
|
5879
5886
|
} = props;
|
|
5880
5887
|
const {
|
|
5881
|
-
defaultValue,
|
|
5888
|
+
defaultValue = EMPTY_OPTION,
|
|
5882
5889
|
values = []
|
|
5883
5890
|
} = field;
|
|
5884
5891
|
const path = ['defaultValue'];
|
|
5885
5892
|
const getOptions = () => {
|
|
5886
5893
|
return [{
|
|
5887
|
-
label: '<none>'
|
|
5894
|
+
label: '<none>',
|
|
5895
|
+
value: EMPTY_OPTION
|
|
5888
5896
|
}, ...values];
|
|
5889
5897
|
};
|
|
5890
5898
|
const setValue = value => {
|