@bpmn-io/properties-panel 3.8.0 → 3.10.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.
package/README.md CHANGED
@@ -5,31 +5,31 @@
5
5
 
6
6
  Library for creating bpmn-io properties panels.
7
7
 
8
+ ## Resources
8
9
 
9
- ## Hacking the Project
10
+ * [Changelog](./CHANGELOG.md)
10
11
 
11
- To get the development setup make sure to have [NodeJS](https://nodejs.org/en/download/) installed.
12
- As soon as you are set up, clone the project and execute
12
+ ## Build and Run
13
13
 
14
- ```
14
+ Prepare the project by installing all dependencies:
15
+
16
+ ```sh
15
17
  npm install
16
18
  ```
17
19
 
20
+ Then, depending on your use-case you may run any of the following commands:
18
21
 
19
- ### Testing
22
+ ```sh
23
+ # build the library and run all tests
24
+ npm run all
20
25
 
21
- Execute `npm run dev` to run the test suite in watch mode.
26
+ # run the full development setup
27
+ npm run dev
28
+ ```
22
29
 
23
30
  Expose an environment variable `TEST_BROWSERS=(Chrome|Firefox|IE)` to execute the tests in a non-headless browser.
24
31
 
25
32
 
26
- ### Package
27
-
28
- Execute `npm run all` to lint and test the project.
29
-
30
- __Note:__ We do not generate any build artifacts. Required parts of the library should be bundled by properties panels as needed instead.
31
-
32
-
33
33
  ## License
34
34
 
35
- MIT
35
+ MIT
@@ -564,7 +564,8 @@ textarea.bio-properties-panel-input {
564
564
  resize: vertical;
565
565
  }
566
566
 
567
- .bio-properties-panel-entry.has-error .bio-properties-panel-input {
567
+ .bio-properties-panel-entry.has-error .bio-properties-panel-input,
568
+ .bio-properties-panel-entry.has-error .bio-properties-panel-feel-editor__open-popup-placeholder {
568
569
  border-color: var(--input-error-border-color);
569
570
  background-color: var(--input-error-background-color);
570
571
  }
package/dist/index.js CHANGED
@@ -1199,6 +1199,7 @@ function PopupComponent(props, globalRef) {
1199
1199
  const focusTrapRef = hooks.useRef(null);
1200
1200
  const localRef = hooks.useRef(null);
1201
1201
  const popupRef = globalRef || localRef;
1202
+ const containerNode = hooks.useMemo(() => getContainerNode(container), [container]);
1202
1203
  const handleKeydown = event => {
1203
1204
  // do not allow keyboard events to bubble
1204
1205
  event.stopPropagation();
@@ -1258,7 +1259,7 @@ function PopupComponent(props, globalRef) {
1258
1259
  class: classnames__default["default"]('bio-properties-panel-popup', className),
1259
1260
  style: style,
1260
1261
  children: props.children
1261
- }), container || document.body);
1262
+ }), containerNode || document.body);
1262
1263
  }
1263
1264
  const Popup = compat.forwardRef(PopupComponent);
1264
1265
  Popup.Title = Title;
@@ -1378,6 +1379,12 @@ function cancel(event) {
1378
1379
  event.preventDefault();
1379
1380
  event.stopPropagation();
1380
1381
  }
1382
+ function getContainerNode(node) {
1383
+ if (typeof node === 'string') {
1384
+ return minDom.query(node);
1385
+ }
1386
+ return node;
1387
+ }
1381
1388
 
1382
1389
  const FEEL_POPUP_WIDTH = 700;
1383
1390
  const FEEL_POPUP_HEIGHT = 250;
@@ -1928,7 +1935,7 @@ function FeelTextfield(props) {
1928
1935
  }, [onInput, debounce]);
1929
1936
  const setLocalValue = newValue => {
1930
1937
  _setLocalValue(newValue);
1931
- if (!newValue || newValue === '=') {
1938
+ if (typeof newValue === 'undefined' || newValue === '' || newValue === '=') {
1932
1939
  handleInputCallback(undefined);
1933
1940
  } else {
1934
1941
  handleInputCallback(newValue);