@bpmn-io/properties-panel 3.24.1 → 3.25.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/index.js CHANGED
@@ -45,6 +45,21 @@ ArrowIcon.defaultProps = {
45
45
  width: "16",
46
46
  height: "16"
47
47
  };
48
+ var CloseIcon = function CloseIcon(props) {
49
+ return jsxRuntime.jsx("svg", {
50
+ ...props,
51
+ children: jsxRuntime.jsx("path", {
52
+ fillRule: "evenodd",
53
+ 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",
54
+ fill: "currentColor"
55
+ })
56
+ });
57
+ };
58
+ CloseIcon.defaultProps = {
59
+ xmlns: "http://www.w3.org/2000/svg",
60
+ width: "16",
61
+ height: "16"
62
+ };
48
63
  var CreateIcon = function CreateIcon(props) {
49
64
  return jsxRuntime.jsx("svg", {
50
65
  ...props,
@@ -132,26 +147,17 @@ FeelIcon$1.defaultProps = {
132
147
  fill: "none",
133
148
  xmlns: "http://www.w3.org/2000/svg"
134
149
  };
135
- var HelpIcon = function HelpIcon(props) {
150
+ var LaunchIcon = function LaunchIcon(props) {
136
151
  return jsxRuntime.jsxs("svg", {
137
152
  ...props,
138
153
  children: [jsxRuntime.jsx("path", {
139
- 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"
140
- }), jsxRuntime.jsx("circle", {
141
- cx: "16",
142
- cy: "23.5",
143
- r: "1.5"
154
+ d: "M26 28H6a2.003 2.003 0 0 1-2-2V6a2.003 2.003 0 0 1 2-2h10v2H6v20h20V16h2v10a2.003 2.003 0 0 1-2 2Z"
144
155
  }), jsxRuntime.jsx("path", {
145
- 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"
146
- }), jsxRuntime.jsx("path", {
147
- style: {
148
- fill: "none"
149
- },
150
- d: "M0 0h32v32H0z"
156
+ d: "M20 2v2h6.586L18 12.586 19.414 14 28 5.414V12h2V2H20z"
151
157
  })]
152
158
  });
153
159
  };
154
- HelpIcon.defaultProps = {
160
+ LaunchIcon.defaultProps = {
155
161
  xmlns: "http://www.w3.org/2000/svg",
156
162
  viewBox: "0 0 32 32"
157
163
  };
@@ -173,21 +179,6 @@ PopupIcon.defaultProps = {
173
179
  height: "16",
174
180
  viewBox: "0 0 32 32"
175
181
  };
176
- var CloseIcon = function CloseIcon(props) {
177
- return jsxRuntime.jsx("svg", {
178
- ...props,
179
- children: jsxRuntime.jsx("path", {
180
- fillRule: "evenodd",
181
- 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",
182
- fill: "currentColor"
183
- })
184
- });
185
- };
186
- CloseIcon.defaultProps = {
187
- xmlns: "http://www.w3.org/2000/svg",
188
- width: "16",
189
- height: "16"
190
- };
191
182
 
192
183
  function Header(props) {
193
184
  const {
@@ -227,7 +218,7 @@ function Header(props) {
227
218
  }), jsxRuntime.jsx("div", {
228
219
  class: "bio-properties-panel-header-actions",
229
220
  children: documentationRef ? jsxRuntime.jsx("a", {
230
- rel: "noopener",
221
+ rel: "noreferrer",
231
222
  class: "bio-properties-panel-header-link",
232
223
  href: documentationRef,
233
224
  title: "Open documentation",
@@ -1498,7 +1489,8 @@ function FEELPopupRoot(props) {
1498
1489
  on() {},
1499
1490
  off() {}
1500
1491
  },
1501
- popupContainer
1492
+ popupContainer,
1493
+ getPopupLinks = () => []
1502
1494
  } = props;
1503
1495
  const prevElement = usePrevious(element);
1504
1496
  const [popupConfig, setPopupConfig] = hooks.useState({});
@@ -1573,6 +1565,7 @@ function FEELPopupRoot(props) {
1573
1565
  children: [open && jsxRuntime.jsx(FeelPopupComponent, {
1574
1566
  onClose: handleClose,
1575
1567
  container: popupContainer,
1568
+ getLinks: getPopupLinks,
1576
1569
  sourceElement: sourceElement,
1577
1570
  emit: emit,
1578
1571
  ...popupConfig
@@ -1582,6 +1575,7 @@ function FEELPopupRoot(props) {
1582
1575
  function FeelPopupComponent(props) {
1583
1576
  const {
1584
1577
  container,
1578
+ getLinks,
1585
1579
  id,
1586
1580
  hostLanguage,
1587
1581
  onInput,
@@ -1651,24 +1645,24 @@ function FeelPopupComponent(props) {
1651
1645
  height: FEEL_POPUP_HEIGHT,
1652
1646
  width: FEEL_POPUP_WIDTH,
1653
1647
  ref: popupRef,
1654
- children: [jsxRuntime.jsxs(Popup.Title, {
1648
+ children: [jsxRuntime.jsx(Popup.Title, {
1655
1649
  title: title,
1656
1650
  emit: emit,
1657
1651
  showCloseButton: true,
1658
1652
  closeButtonTooltip: "Save and close",
1659
1653
  onClose: onClose,
1660
1654
  draggable: true,
1661
- children: [type === 'feel' && jsxRuntime.jsxs("a", {
1662
- href: "https://docs.camunda.io/docs/components/modeler/feel/what-is-feel/",
1663
- target: "_blank",
1664
- class: "bio-properties-panel-feel-popup__title-link",
1665
- children: ["Learn FEEL expressions", jsxRuntime.jsx(HelpIcon, {})]
1666
- }), type === 'feelers' && jsxRuntime.jsxs("a", {
1667
- href: "https://docs.camunda.io/docs/components/modeler/forms/configuration/forms-config-templating-syntax/",
1668
- target: "_blank",
1669
- class: "bio-properties-panel-feel-popup__title-link",
1670
- children: ["Learn templating", jsxRuntime.jsx(HelpIcon, {})]
1671
- })]
1655
+ children: jsxRuntime.jsx(jsxRuntime.Fragment, {
1656
+ children: getLinks(type).map((link, index) => {
1657
+ return jsxRuntime.jsxs("a", {
1658
+ rel: "noreferrer",
1659
+ href: link.href,
1660
+ target: "_blank",
1661
+ class: "bio-properties-panel-feel-popup__title-link",
1662
+ children: [link.title, jsxRuntime.jsx(LaunchIcon, {})]
1663
+ }, index);
1664
+ })
1665
+ })
1672
1666
  }), jsxRuntime.jsx(Popup.Body, {
1673
1667
  children: jsxRuntime.jsxs("div", {
1674
1668
  onKeyDownCapture: onKeyDownCapture,
@@ -2797,6 +2791,7 @@ const DEFAULT_TOOLTIP = {};
2797
2791
  * @param {TooltipConfig} [props.tooltipConfig]
2798
2792
  * @param {Function} [props.tooltipLoaded]
2799
2793
  * @param {HTMLElement} [props.feelPopupContainer]
2794
+ * @param {Function} [props.getFeelPopupLinks]
2800
2795
  * @param {Object} [props.eventBus]
2801
2796
  */
2802
2797
  function PropertiesPanel(props) {
@@ -2812,6 +2807,7 @@ function PropertiesPanel(props) {
2812
2807
  tooltipConfig,
2813
2808
  tooltipLoaded,
2814
2809
  feelPopupContainer,
2810
+ getFeelPopupLinks,
2815
2811
  eventBus
2816
2812
  } = props;
2817
2813
 
@@ -2916,6 +2912,7 @@ function PropertiesPanel(props) {
2916
2912
  element: element,
2917
2913
  eventBus: eventBus,
2918
2914
  popupContainer: feelPopupContainer,
2915
+ getPopupLinks: getFeelPopupLinks,
2919
2916
  children: jsxRuntime.jsxs("div", {
2920
2917
  class: "bio-properties-panel",
2921
2918
  children: [jsxRuntime.jsx(Header, {
@@ -4376,7 +4373,7 @@ exports.FeelToggleSwitchEntry = FeelToggleSwitchEntry;
4376
4373
  exports.Group = Group;
4377
4374
  exports.Header = Header;
4378
4375
  exports.HeaderButton = HeaderButton;
4379
- exports.HelpIcon = HelpIcon;
4376
+ exports.LaunchIcon = LaunchIcon;
4380
4377
  exports.LayoutContext = LayoutContext;
4381
4378
  exports.ListEntry = List;
4382
4379
  exports.ListGroup = ListGroup;