@bpmn-io/form-js-editor 1.8.1 → 1.8.3
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 +23 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +23 -7
- package/dist/index.es.js.map +1 -1
- package/dist/types/features/properties-panel/Util.d.ts +4 -0
- package/dist/types/render/components/editor-form-fields/EditorExpressionField.d.ts +1 -0
- package/package.json +4 -3
package/dist/index.cjs
CHANGED
|
@@ -1080,7 +1080,7 @@ function EditorHtml(props) {
|
|
|
1080
1080
|
class: "fjs-form-field-placeholder",
|
|
1081
1081
|
children: [jsxRuntime.jsx(Icon, {
|
|
1082
1082
|
viewBox: "0 0 54 54"
|
|
1083
|
-
}), "Html is empty"]
|
|
1083
|
+
}), "Html view is empty"]
|
|
1084
1084
|
})
|
|
1085
1085
|
});
|
|
1086
1086
|
}
|
|
@@ -1091,7 +1091,7 @@ function EditorHtml(props) {
|
|
|
1091
1091
|
class: "fjs-form-field-placeholder",
|
|
1092
1092
|
children: [jsxRuntime.jsx(Icon, {
|
|
1093
1093
|
viewBox: "0 0 54 54"
|
|
1094
|
-
}), "Html is populated by an expression"]
|
|
1094
|
+
}), "Html view is populated by an expression"]
|
|
1095
1095
|
})
|
|
1096
1096
|
});
|
|
1097
1097
|
}
|
|
@@ -1102,7 +1102,7 @@ function EditorHtml(props) {
|
|
|
1102
1102
|
class: "fjs-form-field-placeholder",
|
|
1103
1103
|
children: [jsxRuntime.jsx(Icon, {
|
|
1104
1104
|
viewBox: "0 0 54 54"
|
|
1105
|
-
}), "Html is templated"]
|
|
1105
|
+
}), "Html view is templated"]
|
|
1106
1106
|
})
|
|
1107
1107
|
});
|
|
1108
1108
|
}
|
|
@@ -1183,13 +1183,14 @@ function EditorExpressionField(props) {
|
|
|
1183
1183
|
field
|
|
1184
1184
|
} = props;
|
|
1185
1185
|
const {
|
|
1186
|
-
expression = ''
|
|
1186
|
+
expression = '',
|
|
1187
|
+
key
|
|
1187
1188
|
} = field;
|
|
1188
1189
|
const Icon = formJsViewer.iconsByType('expression');
|
|
1189
1190
|
const expressionLanguage = useService$1('expressionLanguage');
|
|
1190
1191
|
let placeholderContent = 'Expression is empty';
|
|
1191
1192
|
if (expression.trim() && expressionLanguage.isExpression(expression)) {
|
|
1192
|
-
placeholderContent =
|
|
1193
|
+
placeholderContent = `Expression for '${key}'`;
|
|
1193
1194
|
}
|
|
1194
1195
|
return jsxRuntime.jsx("div", {
|
|
1195
1196
|
class: editorFormFieldClasses(type),
|
|
@@ -9001,6 +9002,14 @@ function textToLabel(text) {
|
|
|
9001
9002
|
function isValidDotPath(path) {
|
|
9002
9003
|
return /^\w+(\.\w+)*$/.test(path);
|
|
9003
9004
|
}
|
|
9005
|
+
|
|
9006
|
+
/**
|
|
9007
|
+
* @param {string} path
|
|
9008
|
+
*/
|
|
9009
|
+
function isProhibitedPath(path) {
|
|
9010
|
+
const prohibitedSegments = ['__proto__', 'prototype', 'constructor'];
|
|
9011
|
+
return path.split('.').some(segment => prohibitedSegments.includes(segment));
|
|
9012
|
+
}
|
|
9004
9013
|
const LABELED_NON_INPUTS = ['button', 'group', 'dynamiclist', 'iframe', 'table'];
|
|
9005
9014
|
const INPUTS = ['checkbox', 'checklist', 'datetime', 'number', 'radio', 'select', 'taglist', 'textfield', 'textarea'];
|
|
9006
9015
|
const OPTIONS_INPUTS = ['checklist', 'radio', 'select', 'taglist'];
|
|
@@ -9940,6 +9949,9 @@ function Key$2(props) {
|
|
|
9940
9949
|
if (hasIntegerPathSegment(value)) {
|
|
9941
9950
|
return 'Must not contain numerical path segments.';
|
|
9942
9951
|
}
|
|
9952
|
+
if (isProhibitedPath(value)) {
|
|
9953
|
+
return 'Must not be a prohibited path.';
|
|
9954
|
+
}
|
|
9943
9955
|
const replacements = {
|
|
9944
9956
|
[field.id]: value.split('.')
|
|
9945
9957
|
};
|
|
@@ -10032,11 +10044,15 @@ function Path(props) {
|
|
|
10032
10044
|
}
|
|
10033
10045
|
|
|
10034
10046
|
// Check for integer segments in the path
|
|
10035
|
-
|
|
10036
|
-
if (hasIntegerPathSegment) {
|
|
10047
|
+
if (hasIntegerPathSegment(value)) {
|
|
10037
10048
|
return 'Must not contain numerical path segments.';
|
|
10038
10049
|
}
|
|
10039
10050
|
|
|
10051
|
+
// Check for special prohibited paths
|
|
10052
|
+
if (isProhibitedPath(value)) {
|
|
10053
|
+
return 'Must not be a prohibited path.';
|
|
10054
|
+
}
|
|
10055
|
+
|
|
10040
10056
|
// Check for path collisions
|
|
10041
10057
|
const options = {
|
|
10042
10058
|
replacements: {
|