@bpmn-io/properties-panel 3.19.0 → 3.20.1
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/properties-panel.css +25 -0
- package/dist/index.esm.js +59 -14
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +59 -13
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -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.esm.js
CHANGED
|
@@ -152,6 +152,21 @@ PopupIcon.defaultProps = {
|
|
|
152
152
|
height: "16",
|
|
153
153
|
viewBox: "0 0 32 32"
|
|
154
154
|
};
|
|
155
|
+
var CloseIcon = function CloseIcon(props) {
|
|
156
|
+
return jsx("svg", {
|
|
157
|
+
...props,
|
|
158
|
+
children: jsx("path", {
|
|
159
|
+
fillRule: "evenodd",
|
|
160
|
+
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",
|
|
161
|
+
fill: "currentColor"
|
|
162
|
+
})
|
|
163
|
+
});
|
|
164
|
+
};
|
|
165
|
+
CloseIcon.defaultProps = {
|
|
166
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
167
|
+
width: "16",
|
|
168
|
+
height: "16"
|
|
169
|
+
};
|
|
155
170
|
|
|
156
171
|
function Header(props) {
|
|
157
172
|
const {
|
|
@@ -896,7 +911,8 @@ const CodeEditor$1 = forwardRef((props, ref) => {
|
|
|
896
911
|
tooltipContainer,
|
|
897
912
|
enableGutters,
|
|
898
913
|
hostLanguage,
|
|
899
|
-
singleLine
|
|
914
|
+
singleLine,
|
|
915
|
+
lineWrap: true
|
|
900
916
|
});
|
|
901
917
|
setEditor(editor);
|
|
902
918
|
return () => {
|
|
@@ -933,7 +949,7 @@ const CodeEditor$1 = forwardRef((props, ref) => {
|
|
|
933
949
|
title: "Open pop-up editor",
|
|
934
950
|
class: "bio-properties-panel-open-feel-popup",
|
|
935
951
|
onClick: () => onPopupOpen('feelers'),
|
|
936
|
-
children: jsx(
|
|
952
|
+
children: jsx(PopupIcon, {})
|
|
937
953
|
})]
|
|
938
954
|
});
|
|
939
955
|
});
|
|
@@ -974,6 +990,7 @@ const CodeEditor = forwardRef((props, ref) => {
|
|
|
974
990
|
onFeelToggle = noop$5,
|
|
975
991
|
onLint = noop$5,
|
|
976
992
|
onPopupOpen = noop$5,
|
|
993
|
+
placeholder,
|
|
977
994
|
popupOpen,
|
|
978
995
|
disabled,
|
|
979
996
|
tooltipContainer,
|
|
@@ -1010,6 +1027,7 @@ const CodeEditor = forwardRef((props, ref) => {
|
|
|
1010
1027
|
onChange: handleInput,
|
|
1011
1028
|
onKeyDown: onKeyDown,
|
|
1012
1029
|
onLint: onLint,
|
|
1030
|
+
placeholder: placeholder,
|
|
1013
1031
|
tooltipContainer: tooltipContainer,
|
|
1014
1032
|
value: localValue,
|
|
1015
1033
|
variables: variables,
|
|
@@ -1039,6 +1057,12 @@ const CodeEditor = forwardRef((props, ref) => {
|
|
|
1039
1057
|
}
|
|
1040
1058
|
editor.setVariables(variables);
|
|
1041
1059
|
}, [variables]);
|
|
1060
|
+
useEffect(() => {
|
|
1061
|
+
if (!editor) {
|
|
1062
|
+
return;
|
|
1063
|
+
}
|
|
1064
|
+
editor.setPlaceholder(placeholder);
|
|
1065
|
+
}, [placeholder]);
|
|
1042
1066
|
const handleClick = () => {
|
|
1043
1067
|
ref.current.focus();
|
|
1044
1068
|
};
|
|
@@ -1295,6 +1319,9 @@ function Title(props) {
|
|
|
1295
1319
|
draggable,
|
|
1296
1320
|
emit = () => {},
|
|
1297
1321
|
title,
|
|
1322
|
+
showCloseButton = false,
|
|
1323
|
+
closeButtonTooltip = 'Close popup',
|
|
1324
|
+
onClose,
|
|
1298
1325
|
...rest
|
|
1299
1326
|
} = props;
|
|
1300
1327
|
|
|
@@ -1365,7 +1392,12 @@ function Title(props) {
|
|
|
1365
1392
|
}), jsx("div", {
|
|
1366
1393
|
class: "bio-properties-panel-popup__title",
|
|
1367
1394
|
children: title
|
|
1368
|
-
}), children
|
|
1395
|
+
}), children, showCloseButton && jsx("button", {
|
|
1396
|
+
title: closeButtonTooltip,
|
|
1397
|
+
class: "bio-properties-panel-popup__close",
|
|
1398
|
+
onClick: onClose,
|
|
1399
|
+
children: jsx(CloseIcon, {})
|
|
1400
|
+
})]
|
|
1369
1401
|
});
|
|
1370
1402
|
}
|
|
1371
1403
|
function Body(props) {
|
|
@@ -1583,6 +1615,9 @@ function FeelPopupComponent(props) {
|
|
|
1583
1615
|
children: [jsxs(Popup.Title, {
|
|
1584
1616
|
title: title,
|
|
1585
1617
|
emit: emit,
|
|
1618
|
+
showCloseButton: true,
|
|
1619
|
+
closeButtonTooltip: "Save and close",
|
|
1620
|
+
onClose: onClose,
|
|
1586
1621
|
draggable: true,
|
|
1587
1622
|
children: [type === 'feel' && jsxs("a", {
|
|
1588
1623
|
href: "https://docs.camunda.io/docs/components/modeler/feel/what-is-feel/",
|
|
@@ -1624,14 +1659,6 @@ function FeelPopupComponent(props) {
|
|
|
1624
1659
|
tooltipContainer: tooltipContainer
|
|
1625
1660
|
})]
|
|
1626
1661
|
})
|
|
1627
|
-
}), jsx(Popup.Footer, {
|
|
1628
|
-
children: jsx("button", {
|
|
1629
|
-
type: "button",
|
|
1630
|
-
onClick: () => onClose(),
|
|
1631
|
-
title: "Close pop-up editor",
|
|
1632
|
-
class: "bio-properties-panel-feel-popup__close-btn",
|
|
1633
|
-
children: "Close"
|
|
1634
|
-
})
|
|
1635
1662
|
})]
|
|
1636
1663
|
});
|
|
1637
1664
|
}
|
|
@@ -1944,6 +1971,7 @@ function FeelTextfieldComponent(props) {
|
|
|
1944
1971
|
hostLanguage,
|
|
1945
1972
|
onInput,
|
|
1946
1973
|
onError,
|
|
1974
|
+
placeholder,
|
|
1947
1975
|
feel,
|
|
1948
1976
|
value = '',
|
|
1949
1977
|
disabled = false,
|
|
@@ -2118,6 +2146,7 @@ function FeelTextfieldComponent(props) {
|
|
|
2118
2146
|
},
|
|
2119
2147
|
onLint: handleLint,
|
|
2120
2148
|
onPopupOpen: handlePopupOpen,
|
|
2149
|
+
placeholder: placeholder,
|
|
2121
2150
|
value: feelOnlyValue,
|
|
2122
2151
|
variables: variables,
|
|
2123
2152
|
ref: editorRef,
|
|
@@ -2146,7 +2175,8 @@ const OptionalFeelInput = forwardRef((props, ref) => {
|
|
|
2146
2175
|
onInput,
|
|
2147
2176
|
value,
|
|
2148
2177
|
onFocus,
|
|
2149
|
-
onBlur
|
|
2178
|
+
onBlur,
|
|
2179
|
+
placeholder
|
|
2150
2180
|
} = props;
|
|
2151
2181
|
const inputRef = useRef();
|
|
2152
2182
|
|
|
@@ -2179,6 +2209,7 @@ const OptionalFeelInput = forwardRef((props, ref) => {
|
|
|
2179
2209
|
onInput: e => onInput(e.target.value),
|
|
2180
2210
|
onFocus: onFocus,
|
|
2181
2211
|
onBlur: onBlur,
|
|
2212
|
+
placeholder: placeholder,
|
|
2182
2213
|
value: value || ''
|
|
2183
2214
|
});
|
|
2184
2215
|
});
|
|
@@ -2236,7 +2267,8 @@ const OptionalFeelTextArea = forwardRef((props, ref) => {
|
|
|
2236
2267
|
onInput,
|
|
2237
2268
|
value,
|
|
2238
2269
|
onFocus,
|
|
2239
|
-
onBlur
|
|
2270
|
+
onBlur,
|
|
2271
|
+
placeholder
|
|
2240
2272
|
} = props;
|
|
2241
2273
|
const inputRef = useRef();
|
|
2242
2274
|
|
|
@@ -2264,6 +2296,7 @@ const OptionalFeelTextArea = forwardRef((props, ref) => {
|
|
|
2264
2296
|
onInput: e => onInput(e.target.value),
|
|
2265
2297
|
onFocus: onFocus,
|
|
2266
2298
|
onBlur: onBlur,
|
|
2299
|
+
placeholder: placeholder,
|
|
2267
2300
|
value: value || '',
|
|
2268
2301
|
"data-gramm": "false"
|
|
2269
2302
|
});
|
|
@@ -2359,6 +2392,7 @@ const OptionalFeelCheckbox = forwardRef((props, ref) => {
|
|
|
2359
2392
|
* @param {Function} props.variables
|
|
2360
2393
|
* @param {Function} props.onFocus
|
|
2361
2394
|
* @param {Function} props.onBlur
|
|
2395
|
+
* @param {string} [props.placeholder]
|
|
2362
2396
|
* @param {string|import('preact').Component} props.tooltip
|
|
2363
2397
|
*/
|
|
2364
2398
|
function FeelEntry(props) {
|
|
@@ -2381,6 +2415,7 @@ function FeelEntry(props) {
|
|
|
2381
2415
|
variables,
|
|
2382
2416
|
onFocus,
|
|
2383
2417
|
onBlur,
|
|
2418
|
+
placeholder,
|
|
2384
2419
|
tooltip
|
|
2385
2420
|
} = props;
|
|
2386
2421
|
const [validationError, setValidationError] = useState(null);
|
|
@@ -2424,6 +2459,7 @@ function FeelEntry(props) {
|
|
|
2424
2459
|
onError: onError,
|
|
2425
2460
|
onFocus: onFocus,
|
|
2426
2461
|
onBlur: onBlur,
|
|
2462
|
+
placeholder: placeholder,
|
|
2427
2463
|
example: example,
|
|
2428
2464
|
hostLanguage: hostLanguage,
|
|
2429
2465
|
singleLine: singleLine,
|
|
@@ -2492,6 +2528,7 @@ function FeelNumberEntry(props) {
|
|
|
2492
2528
|
* @param {Function} props.variables
|
|
2493
2529
|
* @param {Function} props.onFocus
|
|
2494
2530
|
* @param {Function} props.onBlur
|
|
2531
|
+
* @param {string} [props.placeholder]
|
|
2495
2532
|
*/
|
|
2496
2533
|
function FeelTextAreaEntry(props) {
|
|
2497
2534
|
return jsx(FeelEntry, {
|
|
@@ -3926,6 +3963,7 @@ function TextArea(props) {
|
|
|
3926
3963
|
onFocus,
|
|
3927
3964
|
onBlur,
|
|
3928
3965
|
autoResize,
|
|
3966
|
+
placeholder,
|
|
3929
3967
|
rows = autoResize ? 1 : 2,
|
|
3930
3968
|
tooltip
|
|
3931
3969
|
} = props;
|
|
@@ -3968,6 +4006,7 @@ function TextArea(props) {
|
|
|
3968
4006
|
onInput: handleInput,
|
|
3969
4007
|
onFocus: onFocus,
|
|
3970
4008
|
onBlur: onBlur,
|
|
4009
|
+
placeholder: placeholder,
|
|
3971
4010
|
rows: rows,
|
|
3972
4011
|
value: localValue,
|
|
3973
4012
|
disabled: disabled,
|
|
@@ -4007,6 +4046,7 @@ function TextAreaEntry(props) {
|
|
|
4007
4046
|
validate,
|
|
4008
4047
|
onFocus,
|
|
4009
4048
|
onBlur,
|
|
4049
|
+
placeholder,
|
|
4010
4050
|
autoResize,
|
|
4011
4051
|
tooltip
|
|
4012
4052
|
} = props;
|
|
@@ -4042,6 +4082,7 @@ function TextAreaEntry(props) {
|
|
|
4042
4082
|
debounce: debounce,
|
|
4043
4083
|
monospace: monospace,
|
|
4044
4084
|
disabled: disabled,
|
|
4085
|
+
placeholder: placeholder,
|
|
4045
4086
|
autoResize: autoResize,
|
|
4046
4087
|
tooltip: tooltip,
|
|
4047
4088
|
element: element
|
|
@@ -4074,6 +4115,7 @@ function Textfield(props) {
|
|
|
4074
4115
|
onInput,
|
|
4075
4116
|
onFocus,
|
|
4076
4117
|
onBlur,
|
|
4118
|
+
placeholder,
|
|
4077
4119
|
value = '',
|
|
4078
4120
|
tooltip
|
|
4079
4121
|
} = props;
|
|
@@ -4115,6 +4157,7 @@ function Textfield(props) {
|
|
|
4115
4157
|
onInput: handleInput,
|
|
4116
4158
|
onFocus: onFocus,
|
|
4117
4159
|
onBlur: onBlur,
|
|
4160
|
+
placeholder: placeholder,
|
|
4118
4161
|
value: localValue
|
|
4119
4162
|
})]
|
|
4120
4163
|
});
|
|
@@ -4148,6 +4191,7 @@ function TextfieldEntry(props) {
|
|
|
4148
4191
|
validate,
|
|
4149
4192
|
onFocus,
|
|
4150
4193
|
onBlur,
|
|
4194
|
+
placeholder,
|
|
4151
4195
|
tooltip
|
|
4152
4196
|
} = props;
|
|
4153
4197
|
const globalError = useError(id);
|
|
@@ -4179,6 +4223,7 @@ function TextfieldEntry(props) {
|
|
|
4179
4223
|
onInput: onInput,
|
|
4180
4224
|
onFocus: onFocus,
|
|
4181
4225
|
onBlur: onBlur,
|
|
4226
|
+
placeholder: placeholder,
|
|
4182
4227
|
value: value,
|
|
4183
4228
|
tooltip: tooltip,
|
|
4184
4229
|
element: element
|
|
@@ -4260,5 +4305,5 @@ var index = {
|
|
|
4260
4305
|
feelPopup: ['type', FeelPopupModule]
|
|
4261
4306
|
};
|
|
4262
4307
|
|
|
4263
|
-
export { ArrowIcon, CheckboxEntry, CollapsibleEntry, CreateIcon, index$1 as DebounceInputModule, DeleteIcon, DescriptionContext, Description as DescriptionEntry, DragIcon, DropdownButton, ErrorsContext, EventContext, ExternalLinkIcon, FeelCheckboxEntry, FeelEntry, FeelIcon$1 as FeelIcon, FeelNumberEntry, index as FeelPopupModule, FeelTemplatingEntry, FeelTextAreaEntry, FeelToggleSwitchEntry, Group, Header, HeaderButton, HelpIcon, LayoutContext, List as ListEntry, ListGroup, ListItem, NumberFieldEntry, Placeholder, Popup, PopupIcon, PropertiesPanel, LayoutContext as PropertiesPanelContext, SelectEntry, Simple as SimpleEntry, TemplatingEntry, TextAreaEntry, TextfieldEntry as TextFieldEntry, ToggleSwitchEntry, TooltipContext, TooltipWrapper as TooltipEntry, isEdited$5 as isCheckboxEntryEdited, isEdited$6 as isFeelEntryEdited, isEdited$7 as isNumberFieldEntryEdited, isEdited$3 as isSelectEntryEdited, isEdited$2 as isSimpleEntryEdited, isEdited$4 as isTemplatingEntryEdited, isEdited$1 as isTextAreaEntryEdited, isEdited as isTextFieldEntryEdited, isEdited$8 as isToggleSwitchEntryEdited, useDescriptionContext, useError, useErrors, useEvent, useKeyFactory, useLayoutState, usePrevious, useShowEntryEvent, useStaticCallback, useStickyIntersectionObserver, useTooltipContext };
|
|
4308
|
+
export { ArrowIcon, CheckboxEntry, CloseIcon, CollapsibleEntry, CreateIcon, index$1 as DebounceInputModule, DeleteIcon, DescriptionContext, Description as DescriptionEntry, DragIcon, DropdownButton, ErrorsContext, EventContext, ExternalLinkIcon, FeelCheckboxEntry, FeelEntry, FeelIcon$1 as FeelIcon, FeelNumberEntry, index as FeelPopupModule, FeelTemplatingEntry, FeelTextAreaEntry, FeelToggleSwitchEntry, Group, Header, HeaderButton, HelpIcon, LayoutContext, List as ListEntry, ListGroup, ListItem, NumberFieldEntry, Placeholder, Popup, PopupIcon, PropertiesPanel, LayoutContext as PropertiesPanelContext, SelectEntry, Simple as SimpleEntry, TemplatingEntry, TextAreaEntry, TextfieldEntry as TextFieldEntry, ToggleSwitchEntry, TooltipContext, TooltipWrapper as TooltipEntry, isEdited$5 as isCheckboxEntryEdited, isEdited$6 as isFeelEntryEdited, isEdited$7 as isNumberFieldEntryEdited, isEdited$3 as isSelectEntryEdited, isEdited$2 as isSimpleEntryEdited, isEdited$4 as isTemplatingEntryEdited, isEdited$1 as isTextAreaEntryEdited, isEdited as isTextFieldEntryEdited, isEdited$8 as isToggleSwitchEntryEdited, useDescriptionContext, useError, useErrors, useEvent, useKeyFactory, useLayoutState, usePrevious, useShowEntryEvent, useStaticCallback, useStickyIntersectionObserver, useTooltipContext };
|
|
4264
4309
|
//# sourceMappingURL=index.esm.js.map
|