@bpmn-io/form-js-editor 1.8.6 → 1.8.8
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 +25 -0
- package/dist/assets/properties-panel.css +25 -0
- package/dist/index.cjs +115 -132
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +115 -132
- package/dist/index.es.js.map +1 -1
- package/dist/types/features/palette/components/Palette.d.ts +0 -1
- package/dist/types/features/properties-panel/PropertiesPanelRenderer.d.ts +1 -6
- package/dist/types/features/properties-panel/entries/StaticColumnsSourceEntry.d.ts +0 -1
- package/dist/types/features/properties-panel/entries/StaticOptionsSourceEntry.d.ts +0 -1
- package/dist/types/features/properties-panel/groups/CustomPropertiesGroup.d.ts +0 -1
- package/dist/types/render/components/Util.d.ts +1 -1
- package/dist/types/render/components/editor-form-fields/EditorTable.d.ts +1 -1
- package/package.json +6 -6
|
@@ -2135,6 +2135,31 @@ textarea.bio-properties-panel-input {
|
|
|
2135
2135
|
text-transform: capitalize;
|
|
2136
2136
|
}
|
|
2137
2137
|
|
|
2138
|
+
.bio-properties-panel-popup .bio-properties-panel-popup__close {
|
|
2139
|
+
margin: -12px;
|
|
2140
|
+
margin-left: 12px;
|
|
2141
|
+
width: 40px;
|
|
2142
|
+
height: 40px;
|
|
2143
|
+
border: none;
|
|
2144
|
+
background-color: var(--popup-header-background-color);
|
|
2145
|
+
}
|
|
2146
|
+
|
|
2147
|
+
.bio-properties-panel-popup .bio-properties-panel-popup__close:hover,
|
|
2148
|
+
.bio-properties-panel-popup .bio-properties-panel-popup__close:focus-visible {
|
|
2149
|
+
background-color: var(--popup-background-color);
|
|
2150
|
+
}
|
|
2151
|
+
|
|
2152
|
+
.bio-properties-panel-popup .bio-properties-panel-popup__close:focus-visible {
|
|
2153
|
+
outline-offset: -2px;
|
|
2154
|
+
}
|
|
2155
|
+
|
|
2156
|
+
.bio-properties-panel-popup .bio-properties-panel-popup__close svg {
|
|
2157
|
+
width: 16px;
|
|
2158
|
+
height: 16px;
|
|
2159
|
+
fill: currentColor;
|
|
2160
|
+
margin-top: 2px;
|
|
2161
|
+
}
|
|
2162
|
+
|
|
2138
2163
|
.bio-properties-panel-popup .bio-properties-panel-popup__header .bio-properties-panel-popup__drag-handle svg {
|
|
2139
2164
|
margin-left: -4px;
|
|
2140
2165
|
}
|
|
@@ -1334,6 +1334,31 @@ textarea.bio-properties-panel-input {
|
|
|
1334
1334
|
text-transform: capitalize;
|
|
1335
1335
|
}
|
|
1336
1336
|
|
|
1337
|
+
.bio-properties-panel-popup .bio-properties-panel-popup__close {
|
|
1338
|
+
margin: -12px;
|
|
1339
|
+
margin-left: 12px;
|
|
1340
|
+
width: 40px;
|
|
1341
|
+
height: 40px;
|
|
1342
|
+
border: none;
|
|
1343
|
+
background-color: var(--popup-header-background-color);
|
|
1344
|
+
}
|
|
1345
|
+
|
|
1346
|
+
.bio-properties-panel-popup .bio-properties-panel-popup__close:hover,
|
|
1347
|
+
.bio-properties-panel-popup .bio-properties-panel-popup__close:focus-visible {
|
|
1348
|
+
background-color: var(--popup-background-color);
|
|
1349
|
+
}
|
|
1350
|
+
|
|
1351
|
+
.bio-properties-panel-popup .bio-properties-panel-popup__close:focus-visible {
|
|
1352
|
+
outline-offset: -2px;
|
|
1353
|
+
}
|
|
1354
|
+
|
|
1355
|
+
.bio-properties-panel-popup .bio-properties-panel-popup__close svg {
|
|
1356
|
+
width: 16px;
|
|
1357
|
+
height: 16px;
|
|
1358
|
+
fill: currentColor;
|
|
1359
|
+
margin-top: 2px;
|
|
1360
|
+
}
|
|
1361
|
+
|
|
1337
1362
|
.bio-properties-panel-popup .bio-properties-panel-popup__header .bio-properties-panel-popup__drag-handle svg {
|
|
1338
1363
|
margin-left: -4px;
|
|
1339
1364
|
}
|
package/dist/index.cjs
CHANGED
|
@@ -886,11 +886,10 @@ var SvgClose = function SvgClose(props) {
|
|
|
886
886
|
fill: "currentColor"
|
|
887
887
|
}, props), _path$5 || (_path$5 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
888
888
|
fillRule: "evenodd",
|
|
889
|
-
d: "m12 4.7-.7-.7L8 7.3 4.7 4l-.7.7L7.3 8 4 11.3l.7.7L8 8.7l3.3 3.3.7-.7L8.7
|
|
889
|
+
d: "m12 4.7-.7-.7L8 7.3 4.7 4l-.7.7L7.3 8 4 11.3l.7.7L8 8.7l3.3 3.3.7-.7L8.7 8z",
|
|
890
890
|
clipRule: "evenodd"
|
|
891
891
|
})));
|
|
892
892
|
};
|
|
893
|
-
var CloseIcon = SvgClose;
|
|
894
893
|
|
|
895
894
|
var _path$4, _path2$1;
|
|
896
895
|
function _extends$4() { _extends$4 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$4.apply(this, arguments); }
|
|
@@ -918,13 +917,12 @@ var SvgDelete = function SvgDelete(props) {
|
|
|
918
917
|
transform: "translate(.536)"
|
|
919
918
|
}), _path$4 || (_path$4 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
920
919
|
fill: "currentcolor",
|
|
921
|
-
d: "M7.536 6h-
|
|
920
|
+
d: "M7.536 6h-1v6h1zm3 0h-1v6h1z"
|
|
922
921
|
})), _path2$1 || (_path2$1 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
923
922
|
fill: "currentcolor",
|
|
924
|
-
d: "M2.536 3v1h1v10a1 1 0 0 0 1 1h8a1 1 0 0 0 1-
|
|
923
|
+
d: "M2.536 3v1h1v10a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V4h1V3zm2 11V4h8v10zm6-13h-4v1h4z"
|
|
925
924
|
})));
|
|
926
925
|
};
|
|
927
|
-
var DeleteIcon$1 = SvgDelete;
|
|
928
926
|
|
|
929
927
|
var _path$3;
|
|
930
928
|
function _extends$3() { _extends$3 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$3.apply(this, arguments); }
|
|
@@ -945,7 +943,6 @@ var SvgDraggable = function SvgDraggable(props) {
|
|
|
945
943
|
}
|
|
946
944
|
}));
|
|
947
945
|
};
|
|
948
|
-
var DraggableIcon = SvgDraggable;
|
|
949
946
|
|
|
950
947
|
var _path$2;
|
|
951
948
|
function _extends$2() { _extends$2 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$2.apply(this, arguments); }
|
|
@@ -957,10 +954,9 @@ var SvgSearch = function SvgSearch(props) {
|
|
|
957
954
|
fill: "none"
|
|
958
955
|
}, props), _path$2 || (_path$2 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
959
956
|
fill: "currentColor",
|
|
960
|
-
d: "m14.5 13.793-3.776-3.776a5.508 5.508 0 1 0-.707.707l3.776 3.
|
|
957
|
+
d: "m14.5 13.793-3.776-3.776a5.508 5.508 0 1 0-.707.707l3.776 3.776zM2 6.5a4.5 4.5 0 1 1 9 0 4.5 4.5 0 0 1-9 0"
|
|
961
958
|
})));
|
|
962
959
|
};
|
|
963
|
-
var SearchIcon = SvgSearch;
|
|
964
960
|
|
|
965
961
|
var _path$1, _rect, _mask, _path2, _path3, _path4, _path5, _path6;
|
|
966
962
|
function _extends$1() { _extends$1 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1.apply(this, arguments); }
|
|
@@ -973,7 +969,7 @@ var SvgEmptyForm = function SvgEmptyForm(props) {
|
|
|
973
969
|
}, props), _path$1 || (_path$1 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
974
970
|
fill: "#FF832B",
|
|
975
971
|
fillRule: "evenodd",
|
|
976
|
-
d: "M70 78v8a3 3 0 0 1-3 3h-8v-5h6v-
|
|
972
|
+
d: "M70 78v8a3 3 0 0 1-3 3h-8v-5h6v-6zm0-16h-5V46h5zm0-32h-5v-6h-6v-5h8a3 3 0 0 1 3 3zM43 19v5H27v-5zm-32 0v5H5v6H0v-8a3 3 0 0 1 3-3zM0 46h5v16H0zm0 32h5v6h6v5H3a3 3 0 0 1-3-3zm27 11v-5h16v5z",
|
|
977
973
|
clipRule: "evenodd"
|
|
978
974
|
})), _rect || (_rect = /*#__PURE__*/React__namespace.createElement("rect", {
|
|
979
975
|
width: 70,
|
|
@@ -986,16 +982,16 @@ var SvgEmptyForm = function SvgEmptyForm(props) {
|
|
|
986
982
|
fill: "#fff"
|
|
987
983
|
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
988
984
|
fillRule: "evenodd",
|
|
989
|
-
d: "M87.085 88.684 75.43 45.185l43.499 11.656-11.044 8.072 8.557 8.556-12.728 12.728-8.557-8.
|
|
985
|
+
d: "M87.085 88.684 75.43 45.185l43.499 11.656-11.044 8.072 8.557 8.556-12.728 12.728-8.557-8.556z",
|
|
990
986
|
clipRule: "evenodd"
|
|
991
987
|
}))), _path2 || (_path2 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
992
988
|
fill: "#393939",
|
|
993
989
|
fillRule: "evenodd",
|
|
994
|
-
d: "M87.085 88.684 75.43 45.185l43.499 11.656-11.044 8.072 8.557 8.556-12.728 12.728-8.557-8.
|
|
990
|
+
d: "M87.085 88.684 75.43 45.185l43.499 11.656-11.044 8.072 8.557 8.556-12.728 12.728-8.557-8.556z",
|
|
995
991
|
clipRule: "evenodd"
|
|
996
992
|
})), _path3 || (_path3 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
997
993
|
fill: "#393939",
|
|
998
|
-
d: "M75.43 45.185 70.6 46.48l-2.241-8.365 8.365 2.
|
|
994
|
+
d: "M75.43 45.185 70.6 46.48l-2.241-8.365 8.365 2.242zm11.655 43.499 4.037 2.95-6.163 8.432-2.704-10.088zm31.844-31.843 1.294-4.83 10.088 2.703-8.432 6.163zm-11.044 8.072-3.535 3.535-4.128-4.127 4.713-3.445zm8.557 8.556 3.535-3.535 3.536 3.535-3.536 3.536zm-12.728 12.728 3.536 3.536-3.536 3.535-3.536-3.535zm-8.557-8.556-4.036-2.951 3.444-4.713 4.128 4.128zM80.26 43.89 91.915 87.39l-9.66 2.588L70.6 46.48zm37.375 17.78L74.136 50.014l2.588-9.66 43.499 11.656zm-12.699-.795 11.043-8.072 5.901 8.073-11.043 8.072zm7.971 16.129-8.556-8.557 7.071-7.07 8.556 8.556zm-12.728 5.657 12.728-12.728 7.071 7.07-12.727 12.729zm-1.485-8.557 8.557 8.557-7.072 7.07-8.556-8.556zM83.049 85.733 91.12 74.69l8.073 5.901-8.072 11.044z",
|
|
999
995
|
mask: "url(#EmptyForm_svg__a)"
|
|
1000
996
|
})), _path4 || (_path4 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1001
997
|
stroke: "#000",
|
|
@@ -1015,7 +1011,6 @@ var SvgEmptyForm = function SvgEmptyForm(props) {
|
|
|
1015
1011
|
d: "M78.969 36.367v-8"
|
|
1016
1012
|
})));
|
|
1017
1013
|
};
|
|
1018
|
-
var EmptyFormIcon = SvgEmptyForm;
|
|
1019
1014
|
|
|
1020
1015
|
function EditorText(props) {
|
|
1021
1016
|
const {
|
|
@@ -1558,7 +1553,7 @@ function Palette(props) {
|
|
|
1558
1553
|
class: "fjs-palette-search-container",
|
|
1559
1554
|
children: [jsxRuntime.jsx("span", {
|
|
1560
1555
|
class: "fjs-palette-search-icon",
|
|
1561
|
-
children: jsxRuntime.jsx(
|
|
1556
|
+
children: jsxRuntime.jsx(SvgSearch, {})
|
|
1562
1557
|
}), jsxRuntime.jsx("input", {
|
|
1563
1558
|
class: "fjs-palette-search",
|
|
1564
1559
|
ref: inputRef,
|
|
@@ -1571,7 +1566,7 @@ function Palette(props) {
|
|
|
1571
1566
|
title: "Clear content",
|
|
1572
1567
|
class: "fjs-palette-search-clear",
|
|
1573
1568
|
onClick: handleClear,
|
|
1574
|
-
children: jsxRuntime.jsx(
|
|
1569
|
+
children: jsxRuntime.jsx(SvgClose, {})
|
|
1575
1570
|
})]
|
|
1576
1571
|
}), jsxRuntime.jsxs("div", {
|
|
1577
1572
|
class: "fjs-palette-entries",
|
|
@@ -2202,7 +2197,7 @@ function EmptyForm() {
|
|
|
2202
2197
|
class: "fjs-empty-editor",
|
|
2203
2198
|
children: jsxRuntime.jsxs("div", {
|
|
2204
2199
|
class: "fjs-empty-editor-card",
|
|
2205
|
-
children: [jsxRuntime.jsx(
|
|
2200
|
+
children: [jsxRuntime.jsx(SvgEmptyForm, {}), jsxRuntime.jsx("h2", {
|
|
2206
2201
|
children: "Build your form"
|
|
2207
2202
|
}), jsxRuntime.jsx("span", {
|
|
2208
2203
|
children: "Drag and drop components here to start designing."
|
|
@@ -2328,7 +2323,7 @@ function Element$1(props) {
|
|
|
2328
2323
|
title: getRemoveButtonTitle(field, formFields),
|
|
2329
2324
|
class: "fjs-context-pad-item",
|
|
2330
2325
|
onClick: onRemove,
|
|
2331
|
-
children: jsxRuntime.jsx(
|
|
2326
|
+
children: jsxRuntime.jsx(SvgDelete, {})
|
|
2332
2327
|
}) : null
|
|
2333
2328
|
}), props.children, jsxRuntime.jsx(FieldResizer, {
|
|
2334
2329
|
position: "left",
|
|
@@ -2385,7 +2380,7 @@ function Row(props) {
|
|
|
2385
2380
|
class: classnames(DRAG_ROW_MOVE_CLS),
|
|
2386
2381
|
children: [jsxRuntime.jsx("span", {
|
|
2387
2382
|
class: "fjs-row-dragger",
|
|
2388
|
-
children: jsxRuntime.jsx(
|
|
2383
|
+
children: jsxRuntime.jsx(SvgDraggable, {})
|
|
2389
2384
|
}), jsxRuntime.jsx("div", {
|
|
2390
2385
|
class: classes.join(' '),
|
|
2391
2386
|
style: props.style,
|
|
@@ -5398,6 +5393,21 @@ PopupIcon.defaultProps = {
|
|
|
5398
5393
|
height: "16",
|
|
5399
5394
|
viewBox: "0 0 32 32"
|
|
5400
5395
|
};
|
|
5396
|
+
var CloseIcon = function CloseIcon(props) {
|
|
5397
|
+
return jsxRuntime.jsx("svg", {
|
|
5398
|
+
...props,
|
|
5399
|
+
children: jsxRuntime.jsx("path", {
|
|
5400
|
+
fillRule: "evenodd",
|
|
5401
|
+
d: "m12 4.7-.7-.7L8 7.3 4.7 4l-.7.7L7.3 8 4 11.3l.7.7L8 8.7l3.3 3.3.7-.7L8.7 8 12 4.7Z",
|
|
5402
|
+
fill: "currentColor"
|
|
5403
|
+
})
|
|
5404
|
+
});
|
|
5405
|
+
};
|
|
5406
|
+
CloseIcon.defaultProps = {
|
|
5407
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5408
|
+
width: "16",
|
|
5409
|
+
height: "16"
|
|
5410
|
+
};
|
|
5401
5411
|
function Header(props) {
|
|
5402
5412
|
const {
|
|
5403
5413
|
element,
|
|
@@ -6098,7 +6108,8 @@ const CodeEditor$1 = React.forwardRef((props, ref) => {
|
|
|
6098
6108
|
tooltipContainer,
|
|
6099
6109
|
enableGutters,
|
|
6100
6110
|
hostLanguage,
|
|
6101
|
-
singleLine
|
|
6111
|
+
singleLine,
|
|
6112
|
+
lineWrap: true
|
|
6102
6113
|
});
|
|
6103
6114
|
setEditor(editor);
|
|
6104
6115
|
return () => {
|
|
@@ -6135,7 +6146,7 @@ const CodeEditor$1 = React.forwardRef((props, ref) => {
|
|
|
6135
6146
|
title: "Open pop-up editor",
|
|
6136
6147
|
class: "bio-properties-panel-open-feel-popup",
|
|
6137
6148
|
onClick: () => onPopupOpen('feelers'),
|
|
6138
|
-
children: jsxRuntime.jsx(
|
|
6149
|
+
children: jsxRuntime.jsx(PopupIcon, {})
|
|
6139
6150
|
})]
|
|
6140
6151
|
});
|
|
6141
6152
|
});
|
|
@@ -6175,6 +6186,7 @@ const CodeEditor = React.forwardRef((props, ref) => {
|
|
|
6175
6186
|
onFeelToggle = noop$5,
|
|
6176
6187
|
onLint = noop$5,
|
|
6177
6188
|
onPopupOpen = noop$5,
|
|
6189
|
+
placeholder,
|
|
6178
6190
|
popupOpen,
|
|
6179
6191
|
disabled,
|
|
6180
6192
|
tooltipContainer,
|
|
@@ -6211,6 +6223,7 @@ const CodeEditor = React.forwardRef((props, ref) => {
|
|
|
6211
6223
|
onChange: handleInput,
|
|
6212
6224
|
onKeyDown: onKeyDown,
|
|
6213
6225
|
onLint: onLint,
|
|
6226
|
+
placeholder: placeholder,
|
|
6214
6227
|
tooltipContainer: tooltipContainer,
|
|
6215
6228
|
value: localValue,
|
|
6216
6229
|
variables: variables,
|
|
@@ -6240,6 +6253,12 @@ const CodeEditor = React.forwardRef((props, ref) => {
|
|
|
6240
6253
|
}
|
|
6241
6254
|
editor.setVariables(variables);
|
|
6242
6255
|
}, [variables]);
|
|
6256
|
+
hooks.useEffect(() => {
|
|
6257
|
+
if (!editor) {
|
|
6258
|
+
return;
|
|
6259
|
+
}
|
|
6260
|
+
editor.setPlaceholder(placeholder);
|
|
6261
|
+
}, [placeholder]);
|
|
6243
6262
|
const handleClick = () => {
|
|
6244
6263
|
ref.current.focus();
|
|
6245
6264
|
};
|
|
@@ -6492,6 +6511,9 @@ function Title(props) {
|
|
|
6492
6511
|
draggable,
|
|
6493
6512
|
emit = () => {},
|
|
6494
6513
|
title,
|
|
6514
|
+
showCloseButton = false,
|
|
6515
|
+
closeButtonTooltip = 'Close popup',
|
|
6516
|
+
onClose,
|
|
6495
6517
|
...rest
|
|
6496
6518
|
} = props;
|
|
6497
6519
|
|
|
@@ -6562,7 +6584,12 @@ function Title(props) {
|
|
|
6562
6584
|
}), jsxRuntime.jsx("div", {
|
|
6563
6585
|
class: "bio-properties-panel-popup__title",
|
|
6564
6586
|
children: title
|
|
6565
|
-
}), children
|
|
6587
|
+
}), children, showCloseButton && jsxRuntime.jsx("button", {
|
|
6588
|
+
title: closeButtonTooltip,
|
|
6589
|
+
class: "bio-properties-panel-popup__close",
|
|
6590
|
+
onClick: onClose,
|
|
6591
|
+
children: jsxRuntime.jsx(CloseIcon, {})
|
|
6592
|
+
})]
|
|
6566
6593
|
});
|
|
6567
6594
|
}
|
|
6568
6595
|
function Body(props) {
|
|
@@ -6780,6 +6807,9 @@ function FeelPopupComponent(props) {
|
|
|
6780
6807
|
children: [jsxRuntime.jsxs(Popup.Title, {
|
|
6781
6808
|
title: title,
|
|
6782
6809
|
emit: emit,
|
|
6810
|
+
showCloseButton: true,
|
|
6811
|
+
closeButtonTooltip: "Save and close",
|
|
6812
|
+
onClose: onClose,
|
|
6783
6813
|
draggable: true,
|
|
6784
6814
|
children: [type === 'feel' && jsxRuntime.jsxs("a", {
|
|
6785
6815
|
href: "https://docs.camunda.io/docs/components/modeler/feel/what-is-feel/",
|
|
@@ -6821,14 +6851,6 @@ function FeelPopupComponent(props) {
|
|
|
6821
6851
|
tooltipContainer: tooltipContainer
|
|
6822
6852
|
})]
|
|
6823
6853
|
})
|
|
6824
|
-
}), jsxRuntime.jsx(Popup.Footer, {
|
|
6825
|
-
children: jsxRuntime.jsx("button", {
|
|
6826
|
-
type: "button",
|
|
6827
|
-
onClick: () => onClose(),
|
|
6828
|
-
title: "Close pop-up editor",
|
|
6829
|
-
class: "bio-properties-panel-feel-popup__close-btn",
|
|
6830
|
-
children: "Close"
|
|
6831
|
-
})
|
|
6832
6854
|
})]
|
|
6833
6855
|
});
|
|
6834
6856
|
}
|
|
@@ -7138,6 +7160,7 @@ function FeelTextfieldComponent(props) {
|
|
|
7138
7160
|
hostLanguage,
|
|
7139
7161
|
onInput,
|
|
7140
7162
|
onError,
|
|
7163
|
+
placeholder,
|
|
7141
7164
|
feel,
|
|
7142
7165
|
value = '',
|
|
7143
7166
|
disabled = false,
|
|
@@ -7312,6 +7335,7 @@ function FeelTextfieldComponent(props) {
|
|
|
7312
7335
|
},
|
|
7313
7336
|
onLint: handleLint,
|
|
7314
7337
|
onPopupOpen: handlePopupOpen,
|
|
7338
|
+
placeholder: placeholder,
|
|
7315
7339
|
value: feelOnlyValue,
|
|
7316
7340
|
variables: variables,
|
|
7317
7341
|
ref: editorRef,
|
|
@@ -7340,7 +7364,8 @@ const OptionalFeelInput = React.forwardRef((props, ref) => {
|
|
|
7340
7364
|
onInput,
|
|
7341
7365
|
value,
|
|
7342
7366
|
onFocus,
|
|
7343
|
-
onBlur
|
|
7367
|
+
onBlur,
|
|
7368
|
+
placeholder
|
|
7344
7369
|
} = props;
|
|
7345
7370
|
const inputRef = hooks.useRef();
|
|
7346
7371
|
|
|
@@ -7373,6 +7398,7 @@ const OptionalFeelInput = React.forwardRef((props, ref) => {
|
|
|
7373
7398
|
onInput: e => onInput(e.target.value),
|
|
7374
7399
|
onFocus: onFocus,
|
|
7375
7400
|
onBlur: onBlur,
|
|
7401
|
+
placeholder: placeholder,
|
|
7376
7402
|
value: value || ''
|
|
7377
7403
|
});
|
|
7378
7404
|
});
|
|
@@ -7430,7 +7456,8 @@ React.forwardRef((props, ref) => {
|
|
|
7430
7456
|
onInput,
|
|
7431
7457
|
value,
|
|
7432
7458
|
onFocus,
|
|
7433
|
-
onBlur
|
|
7459
|
+
onBlur,
|
|
7460
|
+
placeholder
|
|
7434
7461
|
} = props;
|
|
7435
7462
|
const inputRef = hooks.useRef();
|
|
7436
7463
|
|
|
@@ -7458,6 +7485,7 @@ React.forwardRef((props, ref) => {
|
|
|
7458
7485
|
onInput: e => onInput(e.target.value),
|
|
7459
7486
|
onFocus: onFocus,
|
|
7460
7487
|
onBlur: onBlur,
|
|
7488
|
+
placeholder: placeholder,
|
|
7461
7489
|
value: value || '',
|
|
7462
7490
|
"data-gramm": "false"
|
|
7463
7491
|
});
|
|
@@ -7553,6 +7581,7 @@ React.forwardRef((props, ref) => {
|
|
|
7553
7581
|
* @param {Function} props.variables
|
|
7554
7582
|
* @param {Function} props.onFocus
|
|
7555
7583
|
* @param {Function} props.onBlur
|
|
7584
|
+
* @param {string} [props.placeholder]
|
|
7556
7585
|
* @param {string|import('preact').Component} props.tooltip
|
|
7557
7586
|
*/
|
|
7558
7587
|
function FeelEntry(props) {
|
|
@@ -7575,6 +7604,7 @@ function FeelEntry(props) {
|
|
|
7575
7604
|
variables,
|
|
7576
7605
|
onFocus,
|
|
7577
7606
|
onBlur,
|
|
7607
|
+
placeholder,
|
|
7578
7608
|
tooltip
|
|
7579
7609
|
} = props;
|
|
7580
7610
|
const [validationError, setValidationError] = hooks.useState(null);
|
|
@@ -7618,6 +7648,7 @@ function FeelEntry(props) {
|
|
|
7618
7648
|
onError: onError,
|
|
7619
7649
|
onFocus: onFocus,
|
|
7620
7650
|
onBlur: onBlur,
|
|
7651
|
+
placeholder: placeholder,
|
|
7621
7652
|
example: example,
|
|
7622
7653
|
hostLanguage: hostLanguage,
|
|
7623
7654
|
singleLine: singleLine,
|
|
@@ -7805,7 +7836,6 @@ const DEFAULT_TOOLTIP = {};
|
|
|
7805
7836
|
* id: String,
|
|
7806
7837
|
* items: Array<ListItemDefinition>,
|
|
7807
7838
|
* label: String,
|
|
7808
|
-
* shouldSort?: Boolean,
|
|
7809
7839
|
* shouldOpen?: Boolean
|
|
7810
7840
|
* } } ListGroupDefinition
|
|
7811
7841
|
*
|
|
@@ -8133,6 +8163,7 @@ function ListItem(props) {
|
|
|
8133
8163
|
} else if (minDash.isFunction(focusableInput.focus)) {
|
|
8134
8164
|
focusableInput.focus();
|
|
8135
8165
|
}
|
|
8166
|
+
focusableInput.scrollIntoView();
|
|
8136
8167
|
}
|
|
8137
8168
|
}
|
|
8138
8169
|
}, [autoOpen, autoFocusEntry]);
|
|
@@ -8156,97 +8187,61 @@ function ListGroup(props) {
|
|
|
8156
8187
|
id,
|
|
8157
8188
|
items,
|
|
8158
8189
|
label,
|
|
8159
|
-
shouldOpen = true
|
|
8160
|
-
shouldSort = true
|
|
8190
|
+
shouldOpen = true
|
|
8161
8191
|
} = props;
|
|
8192
|
+
hooks.useEffect(() => {
|
|
8193
|
+
if (props.shouldSort != undefined) {
|
|
8194
|
+
console.warn('the property \'shouldSort\' is no longer supported');
|
|
8195
|
+
}
|
|
8196
|
+
}, [props.shouldSort]);
|
|
8162
8197
|
const groupRef = hooks.useRef(null);
|
|
8163
8198
|
const [open, setOpen] = useLayoutState(['groups', id, 'open'], false);
|
|
8164
8199
|
const [sticky, setSticky] = hooks.useState(false);
|
|
8165
8200
|
const onShow = hooks.useCallback(() => setOpen(true), [setOpen]);
|
|
8166
|
-
const [
|
|
8167
|
-
const [
|
|
8201
|
+
const [localItems, setLocalItems] = hooks.useState([]);
|
|
8202
|
+
const [newlyAddedItemIds, setNewlyAddedItemIds] = hooks.useState([]);
|
|
8168
8203
|
|
|
8169
8204
|
// Flag to mark that add button was clicked in the last render cycle
|
|
8170
8205
|
const [addTriggered, setAddTriggered] = hooks.useState(false);
|
|
8171
|
-
const prevItems = usePrevious(items);
|
|
8172
8206
|
const prevElement = usePrevious(element);
|
|
8173
8207
|
const elementChanged = element !== prevElement;
|
|
8174
|
-
const shouldHandleEffects = !elementChanged &&
|
|
8175
|
-
|
|
8176
|
-
//
|
|
8177
|
-
|
|
8178
|
-
|
|
8179
|
-
|
|
8180
|
-
|
|
8181
|
-
//
|
|
8182
|
-
|
|
8183
|
-
// (0) set initial ordering from given items
|
|
8208
|
+
const shouldHandleEffects = !elementChanged && shouldOpen;
|
|
8209
|
+
|
|
8210
|
+
// (0) delay setting items
|
|
8211
|
+
//
|
|
8212
|
+
// We need to this to align the render cycles of items
|
|
8213
|
+
// with the detection of newly added items.
|
|
8214
|
+
// This is important, because the autoOpen property can
|
|
8215
|
+
// only set per list item on its very first render.
|
|
8184
8216
|
hooks.useEffect(() => {
|
|
8185
|
-
|
|
8186
|
-
|
|
8187
|
-
}
|
|
8188
|
-
}, [items, element]);
|
|
8217
|
+
setLocalItems(items);
|
|
8218
|
+
}, [items]);
|
|
8189
8219
|
|
|
8190
|
-
// (1) items were added
|
|
8220
|
+
// (1) handle auto opening when items were added
|
|
8191
8221
|
hooks.useEffect(() => {
|
|
8192
8222
|
// reset addTriggered flag
|
|
8193
8223
|
setAddTriggered(false);
|
|
8194
|
-
if (shouldHandleEffects &&
|
|
8195
|
-
|
|
8196
|
-
|
|
8197
|
-
|
|
8198
|
-
|
|
8224
|
+
if (shouldHandleEffects && localItems) {
|
|
8225
|
+
if (addTriggered) {
|
|
8226
|
+
const previousItemIds = localItems.map(item => item.id);
|
|
8227
|
+
const currentItemsIds = items.map(item => item.id);
|
|
8228
|
+
const newItemIds = currentItemsIds.filter(itemId => !previousItemIds.includes(itemId));
|
|
8229
|
+
|
|
8230
|
+
// open if not open, configured and triggered by add button
|
|
8231
|
+
//
|
|
8232
|
+
// TODO(marstamm): remove once we refactor layout handling for listGroups.
|
|
8233
|
+
// Ideally, opening should be handled as part of the `add` callback and
|
|
8234
|
+
// not be a concern for the ListGroup component.
|
|
8235
|
+
if (!open && shouldOpen && newItemIds.length > 0) {
|
|
8236
|
+
toggleOpen();
|
|
8199
8237
|
}
|
|
8200
|
-
|
|
8201
|
-
let newOrdering = ordering;
|
|
8202
|
-
|
|
8203
|
-
// open if not open, configured and triggered by add button
|
|
8204
|
-
//
|
|
8205
|
-
// TODO(marstamm): remove once we refactor layout handling for listGroups.
|
|
8206
|
-
// Ideally, opening should be handled as part of the `add` callback and
|
|
8207
|
-
// not be a concern for the ListGroup component.
|
|
8208
|
-
if (addTriggered && !open && shouldOpen) {
|
|
8209
|
-
toggleOpen();
|
|
8210
|
-
}
|
|
8211
|
-
|
|
8212
|
-
// filter when not open and configured
|
|
8213
|
-
if (!open && shouldSort) {
|
|
8214
|
-
newOrdering = createOrdering(sortItems(items));
|
|
8215
|
-
}
|
|
8216
|
-
|
|
8217
|
-
// add new items on top or bottom depending on sorting behavior
|
|
8218
|
-
newOrdering = newOrdering.filter(item => !add.includes(item));
|
|
8219
|
-
if (shouldSort) {
|
|
8220
|
-
newOrdering.unshift(...add);
|
|
8238
|
+
setNewlyAddedItemIds(newItemIds);
|
|
8221
8239
|
} else {
|
|
8222
|
-
|
|
8240
|
+
// ignore newly added items that do not result from a triggered add
|
|
8241
|
+
setNewlyAddedItemIds([]);
|
|
8223
8242
|
}
|
|
8224
|
-
setOrdering(newOrdering);
|
|
8225
|
-
setNewItemAdded(addTriggered);
|
|
8226
|
-
} else {
|
|
8227
|
-
setNewItemAdded(false);
|
|
8228
8243
|
}
|
|
8229
|
-
}, [items, open, shouldHandleEffects, addTriggered]);
|
|
8230
|
-
|
|
8231
|
-
// (2) sort items on open if shouldSort is set
|
|
8232
|
-
hooks.useEffect(() => {
|
|
8233
|
-
if (shouldSort && open && !newItemAdded) {
|
|
8234
|
-
setOrdering(createOrdering(sortItems(items)));
|
|
8235
|
-
}
|
|
8236
|
-
}, [open, shouldSort]);
|
|
8237
|
-
|
|
8238
|
-
// (3) items were deleted
|
|
8239
|
-
hooks.useEffect(() => {
|
|
8240
|
-
if (shouldHandleEffects && prevItems && items.length < prevItems.length) {
|
|
8241
|
-
let keep = [];
|
|
8242
|
-
ordering.forEach(o => {
|
|
8243
|
-
if (getItem(items, o)) {
|
|
8244
|
-
keep.push(o);
|
|
8245
|
-
}
|
|
8246
|
-
});
|
|
8247
|
-
setOrdering(keep);
|
|
8248
|
-
}
|
|
8249
|
-
}, [items, shouldHandleEffects]);
|
|
8244
|
+
}, [items, open, shouldHandleEffects, addTriggered, localItems]);
|
|
8250
8245
|
|
|
8251
8246
|
// set css class when group is sticky to top
|
|
8252
8247
|
useStickyIntersectionObserver(groupRef, 'div.bio-properties-panel-scroll-container', setSticky);
|
|
@@ -8318,8 +8313,7 @@ function ListGroup(props) {
|
|
|
8318
8313
|
class: classnames('bio-properties-panel-list', open && hasItems ? 'open' : ''),
|
|
8319
8314
|
children: jsxRuntime.jsx(LayoutContext.Provider, {
|
|
8320
8315
|
value: propertiesPanelContext,
|
|
8321
|
-
children:
|
|
8322
|
-
const item = getItem(items, o);
|
|
8316
|
+
children: localItems.map((item, index) => {
|
|
8323
8317
|
if (!item) {
|
|
8324
8318
|
return;
|
|
8325
8319
|
}
|
|
@@ -8329,7 +8323,7 @@ function ListGroup(props) {
|
|
|
8329
8323
|
|
|
8330
8324
|
// if item was added, open it
|
|
8331
8325
|
// Existing items will not be affected as autoOpen is only applied on first render
|
|
8332
|
-
const autoOpen =
|
|
8326
|
+
const autoOpen = newlyAddedItemIds.includes(item.id);
|
|
8333
8327
|
return preact.createElement(ListItem, {
|
|
8334
8328
|
...item,
|
|
8335
8329
|
autoOpen: autoOpen,
|
|
@@ -8342,21 +8336,6 @@ function ListGroup(props) {
|
|
|
8342
8336
|
})]
|
|
8343
8337
|
});
|
|
8344
8338
|
}
|
|
8345
|
-
|
|
8346
|
-
// helpers ////////////////////
|
|
8347
|
-
|
|
8348
|
-
/**
|
|
8349
|
-
* Sorts given items alphanumeric by label
|
|
8350
|
-
*/
|
|
8351
|
-
function sortItems(items) {
|
|
8352
|
-
return minDash.sortBy(items, i => i.label.toLowerCase());
|
|
8353
|
-
}
|
|
8354
|
-
function getItem(items, id) {
|
|
8355
|
-
return minDash.find(items, i => i.id === id);
|
|
8356
|
-
}
|
|
8357
|
-
function createOrdering(items) {
|
|
8358
|
-
return items.map(i => i.id);
|
|
8359
|
-
}
|
|
8360
8339
|
function Checkbox(props) {
|
|
8361
8340
|
const {
|
|
8362
8341
|
id,
|
|
@@ -8643,6 +8622,7 @@ function TextArea(props) {
|
|
|
8643
8622
|
onFocus,
|
|
8644
8623
|
onBlur,
|
|
8645
8624
|
autoResize,
|
|
8625
|
+
placeholder,
|
|
8646
8626
|
rows = autoResize ? 1 : 2,
|
|
8647
8627
|
tooltip
|
|
8648
8628
|
} = props;
|
|
@@ -8685,6 +8665,7 @@ function TextArea(props) {
|
|
|
8685
8665
|
onInput: handleInput,
|
|
8686
8666
|
onFocus: onFocus,
|
|
8687
8667
|
onBlur: onBlur,
|
|
8668
|
+
placeholder: placeholder,
|
|
8688
8669
|
rows: rows,
|
|
8689
8670
|
value: localValue,
|
|
8690
8671
|
disabled: disabled,
|
|
@@ -8724,6 +8705,7 @@ function TextAreaEntry(props) {
|
|
|
8724
8705
|
validate,
|
|
8725
8706
|
onFocus,
|
|
8726
8707
|
onBlur,
|
|
8708
|
+
placeholder,
|
|
8727
8709
|
autoResize,
|
|
8728
8710
|
tooltip
|
|
8729
8711
|
} = props;
|
|
@@ -8759,6 +8741,7 @@ function TextAreaEntry(props) {
|
|
|
8759
8741
|
debounce: debounce,
|
|
8760
8742
|
monospace: monospace,
|
|
8761
8743
|
disabled: disabled,
|
|
8744
|
+
placeholder: placeholder,
|
|
8762
8745
|
autoResize: autoResize,
|
|
8763
8746
|
tooltip: tooltip,
|
|
8764
8747
|
element: element
|
|
@@ -8790,6 +8773,7 @@ function Textfield(props) {
|
|
|
8790
8773
|
onInput,
|
|
8791
8774
|
onFocus,
|
|
8792
8775
|
onBlur,
|
|
8776
|
+
placeholder,
|
|
8793
8777
|
value = '',
|
|
8794
8778
|
tooltip
|
|
8795
8779
|
} = props;
|
|
@@ -8831,6 +8815,7 @@ function Textfield(props) {
|
|
|
8831
8815
|
onInput: handleInput,
|
|
8832
8816
|
onFocus: onFocus,
|
|
8833
8817
|
onBlur: onBlur,
|
|
8818
|
+
placeholder: placeholder,
|
|
8834
8819
|
value: localValue
|
|
8835
8820
|
})]
|
|
8836
8821
|
});
|
|
@@ -8864,6 +8849,7 @@ function TextfieldEntry(props) {
|
|
|
8864
8849
|
validate,
|
|
8865
8850
|
onFocus,
|
|
8866
8851
|
onBlur,
|
|
8852
|
+
placeholder,
|
|
8867
8853
|
tooltip
|
|
8868
8854
|
} = props;
|
|
8869
8855
|
const globalError = useError(id);
|
|
@@ -8895,6 +8881,7 @@ function TextfieldEntry(props) {
|
|
|
8895
8881
|
onInput: onInput,
|
|
8896
8882
|
onFocus: onFocus,
|
|
8897
8883
|
onBlur: onBlur,
|
|
8884
|
+
placeholder: placeholder,
|
|
8898
8885
|
value: value,
|
|
8899
8886
|
tooltip: tooltip,
|
|
8900
8887
|
element: element
|
|
@@ -11658,8 +11645,7 @@ function StaticOptionsSourceEntry(props) {
|
|
|
11658
11645
|
});
|
|
11659
11646
|
return {
|
|
11660
11647
|
items,
|
|
11661
|
-
add: addEntry
|
|
11662
|
-
shouldSort: false
|
|
11648
|
+
add: addEntry
|
|
11663
11649
|
};
|
|
11664
11650
|
}
|
|
11665
11651
|
|
|
@@ -12503,8 +12489,7 @@ function StaticColumnsSourceEntry(props) {
|
|
|
12503
12489
|
});
|
|
12504
12490
|
return {
|
|
12505
12491
|
items,
|
|
12506
|
-
add: addEntry
|
|
12507
|
-
shouldSort: false
|
|
12492
|
+
add: addEntry
|
|
12508
12493
|
};
|
|
12509
12494
|
}
|
|
12510
12495
|
|
|
@@ -13006,8 +12991,7 @@ function CustomPropertiesGroup(field, editField) {
|
|
|
13006
12991
|
id: 'custom-values',
|
|
13007
12992
|
items,
|
|
13008
12993
|
label: 'Custom properties',
|
|
13009
|
-
tooltip: 'Add properties directly to the form schema, useful to configure functionality in custom-built task applications and form renderers.'
|
|
13010
|
-
shouldSort: false
|
|
12994
|
+
tooltip: 'Add properties directly to the form schema, useful to configure functionality in custom-built task applications and form renderers.'
|
|
13011
12995
|
};
|
|
13012
12996
|
}
|
|
13013
12997
|
|
|
@@ -13323,10 +13307,9 @@ var SvgRepeat = function SvgRepeat(props) {
|
|
|
13323
13307
|
fill: "none"
|
|
13324
13308
|
}, props), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
|
|
13325
13309
|
fill: "currentColor",
|
|
13326
|
-
d: "M3 3h10.086l-1.793-1.793L12 .5l3 3-3 3-.707-.707L13.086 4H3v3.5H2V4a1
|
|
13310
|
+
d: "M3 3h10.086l-1.793-1.793L12 .5l3 3-3 3-.707-.707L13.086 4H3v3.5H2V4a1 1 0 0 1 1-1M4.707 10.207 2.914 12H13V8.5h1V12a1 1 0 0 1-1 1H2.914l1.793 1.793L4 15.5l-3-3 3-3z"
|
|
13327
13311
|
})));
|
|
13328
13312
|
};
|
|
13329
|
-
var RepeatSvg = SvgRepeat;
|
|
13330
13313
|
|
|
13331
13314
|
class EditorRepeatRenderManager {
|
|
13332
13315
|
constructor(formFields, formFieldRegistry) {
|
|
@@ -13352,7 +13335,7 @@ class EditorRepeatRenderManager {
|
|
|
13352
13335
|
RepeatFooter() {
|
|
13353
13336
|
return jsxRuntime.jsxs("div", {
|
|
13354
13337
|
className: "fjs-repeat-render-footer",
|
|
13355
|
-
children: [jsxRuntime.jsx(
|
|
13338
|
+
children: [jsxRuntime.jsx(SvgRepeat, {}), jsxRuntime.jsx("span", {
|
|
13356
13339
|
children: "Repeatable"
|
|
13357
13340
|
})]
|
|
13358
13341
|
});
|
|
@@ -13670,7 +13653,7 @@ function createFormEditor(options) {
|
|
|
13670
13653
|
});
|
|
13671
13654
|
}
|
|
13672
13655
|
|
|
13673
|
-
Object.defineProperty(exports,
|
|
13656
|
+
Object.defineProperty(exports, "schemaVersion", {
|
|
13674
13657
|
enumerable: true,
|
|
13675
13658
|
get: function () { return formJsViewer.schemaVersion; }
|
|
13676
13659
|
});
|