@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.
- package/assets/properties-panel.css +1 -1
- package/dist/assets/properties-panel.css +7 -1
- package/dist/index.esm.js +25 -31
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +25 -31
- package/dist/index.js.map +1 -1
- package/package.json +4 -3
package/dist/index.js
CHANGED
|
@@ -162,22 +162,16 @@ LaunchIcon.defaultProps = {
|
|
|
162
162
|
viewBox: "0 0 32 32"
|
|
163
163
|
};
|
|
164
164
|
var OpenPopupIcon = function OpenPopupIcon(props) {
|
|
165
|
-
return jsxRuntime.
|
|
165
|
+
return jsxRuntime.jsx("svg", {
|
|
166
166
|
...props,
|
|
167
|
-
children:
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
}), jsxRuntime.jsx("path", {
|
|
171
|
-
fill: "currentColor",
|
|
172
|
-
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"
|
|
173
|
-
})]
|
|
167
|
+
children: jsxRuntime.jsx("path", {
|
|
168
|
+
d: "M6 15v-1H2.7L7 9.7 6.3 9 2 13.3V10H1v5zm4-14v1h3.3L9 6.3l.7.7L14 2.7V6h1V1z"
|
|
169
|
+
})
|
|
174
170
|
});
|
|
175
171
|
};
|
|
176
172
|
OpenPopupIcon.defaultProps = {
|
|
177
173
|
xmlns: "http://www.w3.org/2000/svg",
|
|
178
|
-
|
|
179
|
-
height: "16",
|
|
180
|
-
viewBox: "0 0 32 32"
|
|
174
|
+
viewBox: "0 0 16 16"
|
|
181
175
|
};
|
|
182
176
|
|
|
183
177
|
function Header(props) {
|
|
@@ -2227,7 +2221,7 @@ function FeelTextfield(props) {
|
|
|
2227
2221
|
element,
|
|
2228
2222
|
label,
|
|
2229
2223
|
hostLanguage,
|
|
2230
|
-
onInput,
|
|
2224
|
+
onInput: commitValue,
|
|
2231
2225
|
onBlur,
|
|
2232
2226
|
onError,
|
|
2233
2227
|
placeholder,
|
|
@@ -2243,6 +2237,12 @@ function FeelTextfield(props) {
|
|
|
2243
2237
|
const [localValue, setLocalValue] = hooks.useState(value);
|
|
2244
2238
|
const editorRef = useShowEntryEvent(id);
|
|
2245
2239
|
const containerRef = hooks.useRef();
|
|
2240
|
+
const onInput = hooks.useCallback(newValue => {
|
|
2241
|
+
// we don't commit empty FEEL expressions,
|
|
2242
|
+
// but instead serialize them as <undefined>
|
|
2243
|
+
const newModelValue = newValue === '' || newValue === '=' ? undefined : newValue;
|
|
2244
|
+
commitValue(newModelValue);
|
|
2245
|
+
}, [commitValue]);
|
|
2246
2246
|
const feelActive = minDash.isString(localValue) && localValue.startsWith('=') || feel === 'required';
|
|
2247
2247
|
const feelOnlyValue = minDash.isString(localValue) && localValue.startsWith('=') ? localValue.substring(1) : localValue;
|
|
2248
2248
|
const feelLanguageContext = hooks.useContext(FeelLanguageContext);
|
|
@@ -2262,13 +2262,7 @@ function FeelTextfield(props) {
|
|
|
2262
2262
|
/**
|
|
2263
2263
|
* @type { import('min-dash').DebouncedFunction }
|
|
2264
2264
|
*/
|
|
2265
|
-
const
|
|
2266
|
-
const handleInput = newValue => {
|
|
2267
|
-
// we don't commit empty FEEL expressions,
|
|
2268
|
-
// but instead serialize them as <undefined>
|
|
2269
|
-
const newModelValue = newValue === '' || newValue === '=' ? undefined : newValue;
|
|
2270
|
-
handleInputCallback(newModelValue);
|
|
2271
|
-
};
|
|
2265
|
+
const handleInput = useDebounce(onInput, debounce);
|
|
2272
2266
|
const handleFeelToggle = useStaticCallback(() => {
|
|
2273
2267
|
if (feel === 'required') {
|
|
2274
2268
|
return;
|
|
@@ -3459,7 +3453,7 @@ function TextArea(props) {
|
|
|
3459
3453
|
id,
|
|
3460
3454
|
label,
|
|
3461
3455
|
debounce,
|
|
3462
|
-
onInput,
|
|
3456
|
+
onInput: commitValue,
|
|
3463
3457
|
value = '',
|
|
3464
3458
|
disabled,
|
|
3465
3459
|
monospace,
|
|
@@ -3472,16 +3466,16 @@ function TextArea(props) {
|
|
|
3472
3466
|
} = props;
|
|
3473
3467
|
const [localValue, setLocalValue] = hooks.useState(value);
|
|
3474
3468
|
const ref = useShowEntryEvent(id);
|
|
3469
|
+
const onInput = hooks.useCallback(newValue => {
|
|
3470
|
+
const newModelValue = newValue === '' ? undefined : newValue;
|
|
3471
|
+
commitValue(newModelValue);
|
|
3472
|
+
}, [commitValue]);
|
|
3475
3473
|
const visible = useElementVisible(ref.current);
|
|
3476
3474
|
|
|
3477
3475
|
/**
|
|
3478
3476
|
* @type { import('min-dash').DebouncedFunction }
|
|
3479
3477
|
*/
|
|
3480
|
-
const
|
|
3481
|
-
const handleInput = newValue => {
|
|
3482
|
-
const newModelValue = newValue === '' ? undefined : newValue;
|
|
3483
|
-
handleInputCallback(newModelValue);
|
|
3484
|
-
};
|
|
3478
|
+
const handleInput = useDebounce(onInput, debounce);
|
|
3485
3479
|
const handleLocalInput = e => {
|
|
3486
3480
|
autoResize && resizeToContents(e.target);
|
|
3487
3481
|
if (e.target.value === localValue) {
|
|
@@ -3640,7 +3634,7 @@ function Textfield(props) {
|
|
|
3640
3634
|
disabled = false,
|
|
3641
3635
|
id,
|
|
3642
3636
|
label,
|
|
3643
|
-
onInput,
|
|
3637
|
+
onInput: commitValue,
|
|
3644
3638
|
onFocus,
|
|
3645
3639
|
onBlur,
|
|
3646
3640
|
placeholder,
|
|
@@ -3649,11 +3643,15 @@ function Textfield(props) {
|
|
|
3649
3643
|
} = props;
|
|
3650
3644
|
const [localValue, setLocalValue] = hooks.useState(value || '');
|
|
3651
3645
|
const ref = useShowEntryEvent(id);
|
|
3646
|
+
const onInput = hooks.useCallback(newValue => {
|
|
3647
|
+
const newModelValue = newValue === '' ? undefined : newValue;
|
|
3648
|
+
commitValue(newModelValue);
|
|
3649
|
+
}, [commitValue]);
|
|
3652
3650
|
|
|
3653
3651
|
/**
|
|
3654
3652
|
* @type { import('min-dash').DebouncedFunction }
|
|
3655
3653
|
*/
|
|
3656
|
-
const
|
|
3654
|
+
const handleInput = useDebounce(onInput, debounce);
|
|
3657
3655
|
const handleOnBlur = e => {
|
|
3658
3656
|
const trimmedValue = e.target.value.trim();
|
|
3659
3657
|
|
|
@@ -3663,10 +3661,6 @@ function Textfield(props) {
|
|
|
3663
3661
|
onBlur(e);
|
|
3664
3662
|
}
|
|
3665
3663
|
};
|
|
3666
|
-
const handleInput = newValue => {
|
|
3667
|
-
const newModelValue = newValue === '' ? undefined : newValue;
|
|
3668
|
-
handleInputCallback(newModelValue);
|
|
3669
|
-
};
|
|
3670
3664
|
const handleLocalInput = e => {
|
|
3671
3665
|
if (e.target.value === localValue) {
|
|
3672
3666
|
return;
|