@bpmn-io/properties-panel 3.33.0 → 3.33.2

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.
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Compatibility with @bpmn-io/properties-panel < v3.4.0
3
3
  */
4
- @import '../dist/assets/properties-panel.css'
4
+ @import '../dist/assets/properties-panel.css';
@@ -1467,7 +1467,7 @@ textarea.bio-properties-panel-input {
1467
1467
  top: 0;
1468
1468
  right: 0;
1469
1469
  line-height: 1;
1470
- padding: 2px 4px;
1470
+ padding: 3px 4px;
1471
1471
  margin: 3px;
1472
1472
  display: none;
1473
1473
  background: none;
@@ -1476,6 +1476,12 @@ textarea.bio-properties-panel-input {
1476
1476
  cursor: pointer;
1477
1477
  }
1478
1478
 
1479
+ .bio-properties-panel-feelers-editor-container .bio-properties-panel-open-feel-popup svg,
1480
+ .bio-properties-panel-feel-container .bio-properties-panel-open-feel-popup svg {
1481
+ width: 16px;
1482
+ height: 16px;
1483
+ }
1484
+
1479
1485
  .bio-properties-panel-feelers-editor-container:hover .bio-properties-panel-open-feel-popup,
1480
1486
  .bio-properties-panel-feel-container:hover .bio-properties-panel-open-feel-popup,
1481
1487
  .bio-properties-panel-feelers-editor-container:focus-within .bio-properties-panel-open-feel-popup,
package/dist/index.esm.js CHANGED
@@ -141,22 +141,16 @@ LaunchIcon.defaultProps = {
141
141
  viewBox: "0 0 32 32"
142
142
  };
143
143
  var OpenPopupIcon = function OpenPopupIcon(props) {
144
- return jsxs("svg", {
144
+ return jsx("svg", {
145
145
  ...props,
146
- children: [jsx("path", {
147
- fill: "currentColor",
148
- d: "M28 4H10a2.006 2.006 0 0 0-2 2v14a2.006 2.006 0 0 0 2 2h18a2.006 2.006 0 0 0 2-2V6a2.006 2.006 0 0 0-2-2Zm0 16H10V6h18Z"
149
- }), jsx("path", {
150
- fill: "currentColor",
151
- d: "M18 26H4V16h2v-2H4a2.006 2.006 0 0 0-2 2v10a2.006 2.006 0 0 0 2 2h14a2.006 2.006 0 0 0 2-2v-2h-2Z"
152
- })]
146
+ children: jsx("path", {
147
+ d: "M6 15v-1H2.7L7 9.7 6.3 9 2 13.3V10H1v5zm4-14v1h3.3L9 6.3l.7.7L14 2.7V6h1V1z"
148
+ })
153
149
  });
154
150
  };
155
151
  OpenPopupIcon.defaultProps = {
156
152
  xmlns: "http://www.w3.org/2000/svg",
157
- width: "16",
158
- height: "16",
159
- viewBox: "0 0 32 32"
153
+ viewBox: "0 0 16 16"
160
154
  };
161
155
 
162
156
  function Header(props) {
@@ -2206,7 +2200,7 @@ function FeelTextfield(props) {
2206
2200
  element,
2207
2201
  label,
2208
2202
  hostLanguage,
2209
- onInput,
2203
+ onInput: commitValue,
2210
2204
  onBlur,
2211
2205
  onError,
2212
2206
  placeholder,
@@ -2222,6 +2216,12 @@ function FeelTextfield(props) {
2222
2216
  const [localValue, setLocalValue] = useState(value);
2223
2217
  const editorRef = useShowEntryEvent(id);
2224
2218
  const containerRef = useRef();
2219
+ const onInput = useCallback(newValue => {
2220
+ // we don't commit empty FEEL expressions,
2221
+ // but instead serialize them as <undefined>
2222
+ const newModelValue = newValue === '' || newValue === '=' ? undefined : newValue;
2223
+ commitValue(newModelValue);
2224
+ }, [commitValue]);
2225
2225
  const feelActive = isString(localValue) && localValue.startsWith('=') || feel === 'required';
2226
2226
  const feelOnlyValue = isString(localValue) && localValue.startsWith('=') ? localValue.substring(1) : localValue;
2227
2227
  const feelLanguageContext = useContext(FeelLanguageContext);
@@ -2241,13 +2241,7 @@ function FeelTextfield(props) {
2241
2241
  /**
2242
2242
  * @type { import('min-dash').DebouncedFunction }
2243
2243
  */
2244
- const handleInputCallback = useDebounce(onInput, debounce);
2245
- const handleInput = newValue => {
2246
- // we don't commit empty FEEL expressions,
2247
- // but instead serialize them as <undefined>
2248
- const newModelValue = newValue === '' || newValue === '=' ? undefined : newValue;
2249
- handleInputCallback(newModelValue);
2250
- };
2244
+ const handleInput = useDebounce(onInput, debounce);
2251
2245
  const handleFeelToggle = useStaticCallback(() => {
2252
2246
  if (feel === 'required') {
2253
2247
  return;
@@ -3438,7 +3432,7 @@ function TextArea(props) {
3438
3432
  id,
3439
3433
  label,
3440
3434
  debounce,
3441
- onInput,
3435
+ onInput: commitValue,
3442
3436
  value = '',
3443
3437
  disabled,
3444
3438
  monospace,
@@ -3451,16 +3445,16 @@ function TextArea(props) {
3451
3445
  } = props;
3452
3446
  const [localValue, setLocalValue] = useState(value);
3453
3447
  const ref = useShowEntryEvent(id);
3448
+ const onInput = useCallback(newValue => {
3449
+ const newModelValue = newValue === '' ? undefined : newValue;
3450
+ commitValue(newModelValue);
3451
+ }, [commitValue]);
3454
3452
  const visible = useElementVisible(ref.current);
3455
3453
 
3456
3454
  /**
3457
3455
  * @type { import('min-dash').DebouncedFunction }
3458
3456
  */
3459
- const handleInputCallback = useDebounce(onInput, debounce);
3460
- const handleInput = newValue => {
3461
- const newModelValue = newValue === '' ? undefined : newValue;
3462
- handleInputCallback(newModelValue);
3463
- };
3457
+ const handleInput = useDebounce(onInput, debounce);
3464
3458
  const handleLocalInput = e => {
3465
3459
  autoResize && resizeToContents(e.target);
3466
3460
  if (e.target.value === localValue) {
@@ -3619,7 +3613,7 @@ function Textfield(props) {
3619
3613
  disabled = false,
3620
3614
  id,
3621
3615
  label,
3622
- onInput,
3616
+ onInput: commitValue,
3623
3617
  onFocus,
3624
3618
  onBlur,
3625
3619
  placeholder,
@@ -3628,11 +3622,15 @@ function Textfield(props) {
3628
3622
  } = props;
3629
3623
  const [localValue, setLocalValue] = useState(value || '');
3630
3624
  const ref = useShowEntryEvent(id);
3625
+ const onInput = useCallback(newValue => {
3626
+ const newModelValue = newValue === '' ? undefined : newValue;
3627
+ commitValue(newModelValue);
3628
+ }, [commitValue]);
3631
3629
 
3632
3630
  /**
3633
3631
  * @type { import('min-dash').DebouncedFunction }
3634
3632
  */
3635
- const handleInputCallback = useDebounce(onInput, debounce);
3633
+ const handleInput = useDebounce(onInput, debounce);
3636
3634
  const handleOnBlur = e => {
3637
3635
  const trimmedValue = e.target.value.trim();
3638
3636
 
@@ -3642,10 +3640,6 @@ function Textfield(props) {
3642
3640
  onBlur(e);
3643
3641
  }
3644
3642
  };
3645
- const handleInput = newValue => {
3646
- const newModelValue = newValue === '' ? undefined : newValue;
3647
- handleInputCallback(newModelValue);
3648
- };
3649
3643
  const handleLocalInput = e => {
3650
3644
  if (e.target.value === localValue) {
3651
3645
  return;