@bpmn-io/properties-panel 3.10.1 → 3.12.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.
@@ -1271,6 +1271,8 @@ textarea.bio-properties-panel-input {
1271
1271
  .bio-properties-panel-popup .bio-properties-panel-popup__footer {
1272
1272
  padding: 12px;
1273
1273
  display: flex;
1274
+ justify-content: center;
1275
+ align-items: center;
1274
1276
  }
1275
1277
 
1276
1278
  .bio-properties-panel-popup .bio-properties-panel-popup__body:not(:first-child) {
@@ -1278,11 +1280,12 @@ textarea.bio-properties-panel-input {
1278
1280
  }
1279
1281
 
1280
1282
  .bio-properties-panel-popup .bio-properties-panel-popup__header {
1283
+ --popup-header-line-height: 16px;
1281
1284
  background-color: var(--popup-header-background-color);
1282
1285
  margin: 0;
1283
1286
  font-size: 12px;
1284
1287
  font-weight: 400;
1285
- line-height: 16px;
1288
+ line-height: var(--popup-header-line-height);
1286
1289
  text-align: left;
1287
1290
  color: var(--popup-title-color);
1288
1291
  }
@@ -1310,7 +1313,7 @@ textarea.bio-properties-panel-input {
1310
1313
  text-transform: capitalize;
1311
1314
  }
1312
1315
 
1313
- .bio-properties-panel-popup .bio-properties-panel-popup__header svg {
1316
+ .bio-properties-panel-popup .bio-properties-panel-popup__header .bio-properties-panel-popup__drag-handle svg {
1314
1317
  margin-left: -4px;
1315
1318
  }
1316
1319
 
@@ -1341,6 +1344,18 @@ textarea.bio-properties-panel-input {
1341
1344
  width: 100%;
1342
1345
  }
1343
1346
 
1347
+ .bio-properties-panel-feel-popup__title-link {
1348
+ margin-left: auto;
1349
+ display: flex;
1350
+ }
1351
+
1352
+ .bio-properties-panel-feel-popup__title-link svg {
1353
+ width: var(--popup-header-line-height);
1354
+ height: var(--popup-header-line-height);
1355
+ fill: currentColor;
1356
+ margin: 0 0.5em;
1357
+ }
1358
+
1344
1359
  .bio-properties-panel-feel-popup .bio-properties-panel-feel-editor-container {
1345
1360
  display: flex;
1346
1361
  min-width: 100%;
package/dist/index.esm.js CHANGED
@@ -111,6 +111,29 @@ FeelIcon$1.defaultProps = {
111
111
  fill: "none",
112
112
  xmlns: "http://www.w3.org/2000/svg"
113
113
  };
114
+ var HelpIcon = function HelpIcon(props) {
115
+ return jsxs("svg", {
116
+ ...props,
117
+ children: [jsx("path", {
118
+ d: "M16 2a14 14 0 1 0 14 14A14 14 0 0 0 16 2Zm0 26a12 12 0 1 1 12-12 12 12 0 0 1-12 12Z"
119
+ }), jsx("circle", {
120
+ cx: "16",
121
+ cy: "23.5",
122
+ r: "1.5"
123
+ }), jsx("path", {
124
+ d: "M17 8h-1.5a4.49 4.49 0 0 0-4.5 4.5v.5h2v-.5a2.5 2.5 0 0 1 2.5-2.5H17a2.5 2.5 0 0 1 0 5h-2v4.5h2V17a4.5 4.5 0 0 0 0-9Z"
125
+ }), jsx("path", {
126
+ style: {
127
+ fill: "none"
128
+ },
129
+ d: "M0 0h32v32H0z"
130
+ })]
131
+ });
132
+ };
133
+ HelpIcon.defaultProps = {
134
+ xmlns: "http://www.w3.org/2000/svg",
135
+ viewBox: "0 0 32 32"
136
+ };
114
137
 
115
138
  function Header(props) {
116
139
  const {
@@ -702,6 +725,7 @@ function Group(props) {
702
725
  edited: edited,
703
726
  hasErrors: hasErrors
704
727
  }), jsx("button", {
728
+ type: "button",
705
729
  title: "Toggle section",
706
730
  class: "bio-properties-panel-group-header-button bio-properties-panel-arrow",
707
731
  children: jsx(ArrowIcon, {
@@ -884,6 +908,7 @@ const CodeEditor$1 = forwardRef((props, ref) => {
884
908
  ref: inputRef,
885
909
  onClick: handleClick
886
910
  }), jsx("button", {
911
+ type: "button",
887
912
  title: "Open pop-up editor",
888
913
  class: "bio-properties-panel-open-feel-popup",
889
914
  onClick: () => onPopupOpen('feelers'),
@@ -1005,6 +1030,7 @@ const CodeEditor = forwardRef((props, ref) => {
1005
1030
  ref: inputRef,
1006
1031
  onClick: handleClick
1007
1032
  }), jsx("button", {
1033
+ type: "button",
1008
1034
  title: "Open pop-up editor",
1009
1035
  class: "bio-properties-panel-open-feel-popup",
1010
1036
  onClick: () => onPopupOpen(),
@@ -1051,6 +1077,7 @@ function FeelIcon(props) {
1051
1077
  }
1052
1078
  };
1053
1079
  return jsx("button", {
1080
+ type: "button",
1054
1081
  class: classnames('bio-properties-panel-feel-icon', active ? 'active' : null, feel === 'required' ? 'required' : 'optional'),
1055
1082
  onClick: handleClick,
1056
1083
  disabled: feel === 'required' || disabled,
@@ -1500,6 +1527,12 @@ function FeelPopupComponent(props) {
1500
1527
  domNode: popupRef.current
1501
1528
  });
1502
1529
  }, []);
1530
+ useEffect(() => {
1531
+ // Set focus on editor when popup is opened
1532
+ if (editorRef.current) {
1533
+ editorRef.current.focus();
1534
+ }
1535
+ }, [editorRef]);
1503
1536
  return jsxs(Popup, {
1504
1537
  container: container,
1505
1538
  className: "bio-properties-panel-feel-popup",
@@ -1517,10 +1550,21 @@ function FeelPopupComponent(props) {
1517
1550
  height: FEEL_POPUP_HEIGHT,
1518
1551
  width: FEEL_POPUP_WIDTH,
1519
1552
  ref: popupRef,
1520
- children: [jsx(Popup.Title, {
1553
+ children: [jsxs(Popup.Title, {
1521
1554
  title: title,
1522
1555
  emit: emit,
1523
- draggable: true
1556
+ draggable: true,
1557
+ children: [type === 'feel' && jsxs("a", {
1558
+ href: "https://docs.camunda.io/docs/components/modeler/feel/what-is-feel/",
1559
+ target: "_blank",
1560
+ class: "bio-properties-panel-feel-popup__title-link",
1561
+ children: ["Learn FEEL expressions", jsx(HelpIcon, {})]
1562
+ }), type === 'feelers' && jsxs("a", {
1563
+ href: "https://docs.camunda.io/docs/components/modeler/forms/configuration/forms-config-templating-syntax/",
1564
+ target: "_blank",
1565
+ class: "bio-properties-panel-feel-popup__title-link",
1566
+ children: ["Learn templating", jsx(HelpIcon, {})]
1567
+ })]
1524
1568
  }), jsx(Popup.Body, {
1525
1569
  children: jsxs("div", {
1526
1570
  onKeyDownCapture: onKeyDownCapture,
@@ -1552,6 +1596,7 @@ function FeelPopupComponent(props) {
1552
1596
  })
1553
1597
  }), jsx(Popup.Footer, {
1554
1598
  children: jsx("button", {
1599
+ type: "button",
1555
1600
  onClick: onClose,
1556
1601
  title: "Close pop-up editor",
1557
1602
  class: "bio-properties-panel-feel-popup__close-btn",
@@ -2865,6 +2910,7 @@ function MenuItem({
2865
2910
  }
2866
2911
  if (item.action) {
2867
2912
  return jsx("button", {
2913
+ type: "button",
2868
2914
  class: "bio-properties-panel-dropdown-button__menu-item bio-properties-panel-dropdown-button__menu-item--actionable",
2869
2915
  onClick: event => onClick(event, item.action),
2870
2916
  children: item.entry
@@ -2909,6 +2955,7 @@ function HeaderButton(props) {
2909
2955
  ...otherProps
2910
2956
  } = props;
2911
2957
  return jsx("button", {
2958
+ type: "button",
2912
2959
  ...otherProps,
2913
2960
  onClick: onClick,
2914
2961
  class: classnames('bio-properties-panel-group-header-button', classname),
@@ -2953,12 +3000,14 @@ function CollapsibleEntry(props) {
2953
3000
  class: classnames('bio-properties-panel-collapsible-entry-header-title', !label && 'empty'),
2954
3001
  children: label || placeholderLabel
2955
3002
  }), jsx("button", {
3003
+ type: "button",
2956
3004
  title: "Toggle list item",
2957
3005
  class: "bio-properties-panel-arrow bio-properties-panel-collapsible-entry-arrow",
2958
3006
  children: jsx(ArrowIcon, {
2959
3007
  class: open ? 'bio-properties-panel-arrow-down' : 'bio-properties-panel-arrow-right'
2960
3008
  })
2961
3009
  }), remove ? jsx("button", {
3010
+ type: "button",
2962
3011
  title: "Delete item",
2963
3012
  class: "bio-properties-panel-remove-entry",
2964
3013
  onClick: remove,
@@ -3162,6 +3211,7 @@ function ListGroup(props) {
3162
3211
  }), jsxs("div", {
3163
3212
  class: "bio-properties-panel-group-header-buttons",
3164
3213
  children: [add ? jsxs("button", {
3214
+ type: "button",
3165
3215
  title: "Create new list item",
3166
3216
  class: "bio-properties-panel-group-header-button bio-properties-panel-add-entry",
3167
3217
  onClick: handleAddClick,
@@ -3174,6 +3224,7 @@ function ListGroup(props) {
3174
3224
  class: classnames('bio-properties-panel-list-badge', hasError ? 'bio-properties-panel-list-badge--error' : ''),
3175
3225
  children: items.length
3176
3226
  }) : null, hasItems ? jsx("button", {
3227
+ type: "button",
3177
3228
  title: "Toggle section",
3178
3229
  class: "bio-properties-panel-group-header-button bio-properties-panel-arrow",
3179
3230
  children: jsx(ArrowIcon, {
@@ -3556,6 +3607,7 @@ function List(props) {
3556
3607
  }), jsxs("div", {
3557
3608
  class: "bio-properties-panel-list-entry-header-buttons",
3558
3609
  children: [jsxs("button", {
3610
+ type: "button",
3559
3611
  title: "Create new list item",
3560
3612
  onClick: addItem,
3561
3613
  class: "bio-properties-panel-add-entry",
@@ -3568,6 +3620,7 @@ function List(props) {
3568
3620
  class: "bio-properties-panel-list-badge",
3569
3621
  children: items.length
3570
3622
  }), hasItems && jsx("button", {
3623
+ type: "button",
3571
3624
  title: "Toggle list item",
3572
3625
  class: "bio-properties-panel-arrow",
3573
3626
  children: jsx(ArrowIcon, {
@@ -4255,5 +4308,5 @@ var index = {
4255
4308
  feelPopup: ['type', FeelPopupModule]
4256
4309
  };
4257
4310
 
4258
- 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, LayoutContext, List as ListEntry, ListGroup, ListItem, NumberFieldEntry, Placeholder, Popup, PropertiesPanel, LayoutContext as PropertiesPanelContext, SelectEntry, Simple as SimpleEntry, TemplatingEntry, TextAreaEntry, TextfieldEntry as TextFieldEntry, ToggleSwitchEntry, TooltipContext, 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 };
4311
+ 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, PropertiesPanel, LayoutContext as PropertiesPanelContext, SelectEntry, Simple as SimpleEntry, TemplatingEntry, TextAreaEntry, TextfieldEntry as TextFieldEntry, ToggleSwitchEntry, TooltipContext, 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 };
4259
4312
  //# sourceMappingURL=index.esm.js.map