@bpmn-io/properties-panel 2.2.1 → 3.0.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/dist/index.esm.js +12 -64
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +12 -64
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
- package/preact/README.md +56 -51
- package/preact/compat/client.js +19 -0
- package/preact/compat/client.mjs +22 -0
- package/preact/compat/dist/compat.js +1 -1
- package/preact/compat/dist/compat.js.map +1 -1
- package/preact/compat/dist/compat.mjs +1 -1
- package/preact/compat/dist/compat.module.js +1 -1
- package/preact/compat/dist/compat.module.js.map +1 -1
- package/preact/compat/dist/compat.umd.js +1 -1
- package/preact/compat/dist/compat.umd.js.map +1 -1
- package/preact/compat/jsx-dev-runtime.js +2 -0
- package/preact/compat/jsx-dev-runtime.mjs +2 -0
- package/preact/compat/jsx-runtime.js +2 -0
- package/preact/compat/jsx-runtime.mjs +2 -0
- package/preact/compat/package.json +31 -0
- package/preact/compat/scheduler.js +15 -0
- package/preact/compat/{src/scheduler.js → scheduler.mjs} +8 -9
- package/preact/compat/server.browser.js +4 -0
- package/preact/compat/src/PureComponent.js +1 -1
- package/preact/compat/src/forwardRef.js +2 -9
- package/preact/compat/src/index.d.ts +58 -4
- package/preact/compat/src/index.js +73 -2
- package/preact/compat/src/portals.js +4 -2
- package/preact/compat/src/render.js +133 -76
- package/preact/compat/src/suspense-list.d.ts +2 -2
- package/preact/compat/src/suspense-list.js +14 -13
- package/preact/compat/src/suspense.d.ts +4 -4
- package/preact/compat/src/suspense.js +6 -6
- package/preact/compat/src/util.js +10 -0
- package/preact/debug/dist/debug.js +1 -1
- package/preact/debug/dist/debug.js.map +1 -1
- package/preact/debug/dist/debug.mjs +1 -1
- package/preact/debug/dist/debug.module.js +1 -1
- package/preact/debug/dist/debug.module.js.map +1 -1
- package/preact/debug/dist/debug.umd.js +1 -1
- package/preact/debug/dist/debug.umd.js.map +1 -1
- package/preact/debug/package.json +9 -0
- package/preact/debug/src/check-props.js +3 -3
- package/preact/debug/src/debug.js +38 -17
- package/preact/debug/src/index.d.ts +4 -0
- package/preact/debug/src/util.js +4 -0
- package/preact/devtools/dist/devtools.js +1 -1
- package/preact/devtools/dist/devtools.js.map +1 -1
- package/preact/devtools/dist/devtools.mjs +1 -1
- package/preact/devtools/dist/devtools.module.js +1 -1
- package/preact/devtools/dist/devtools.module.js.map +1 -1
- package/preact/devtools/dist/devtools.umd.js +1 -1
- package/preact/devtools/dist/devtools.umd.js.map +1 -1
- package/preact/devtools/package.json +23 -14
- package/preact/devtools/src/devtools.js +1 -1
- package/preact/dist/preact.js +1 -1
- package/preact/dist/preact.js.map +1 -1
- package/preact/dist/preact.min.js +1 -1
- package/preact/dist/preact.min.js.map +1 -1
- package/preact/dist/preact.min.module.js +2 -0
- package/preact/dist/preact.min.module.js.map +1 -0
- package/preact/dist/preact.min.umd.js +2 -0
- package/preact/dist/preact.min.umd.js.map +1 -0
- package/preact/dist/preact.mjs +1 -1
- package/preact/dist/preact.module.js +1 -1
- package/preact/dist/preact.module.js.map +1 -1
- package/preact/dist/preact.umd.js +1 -1
- package/preact/dist/preact.umd.js.map +1 -1
- package/preact/hooks/dist/hooks.js +1 -1
- package/preact/hooks/dist/hooks.js.map +1 -1
- package/preact/hooks/dist/hooks.mjs +1 -1
- package/preact/hooks/dist/hooks.module.js +1 -1
- package/preact/hooks/dist/hooks.module.js.map +1 -1
- package/preact/hooks/dist/hooks.umd.js +1 -1
- package/preact/hooks/dist/hooks.umd.js.map +1 -1
- package/preact/hooks/package.json +9 -0
- package/preact/hooks/src/index.d.ts +26 -14
- package/preact/hooks/src/index.js +169 -44
- package/preact/hooks/src/internal.d.ts +12 -2
- package/preact/jsx-runtime/dist/jsxRuntime.js +1 -1
- package/preact/jsx-runtime/dist/jsxRuntime.js.map +1 -1
- package/preact/jsx-runtime/dist/jsxRuntime.mjs +1 -1
- package/preact/jsx-runtime/dist/jsxRuntime.module.js +1 -1
- package/preact/jsx-runtime/dist/jsxRuntime.module.js.map +1 -1
- package/preact/jsx-runtime/dist/jsxRuntime.umd.js +1 -1
- package/preact/jsx-runtime/dist/jsxRuntime.umd.js.map +1 -1
- package/preact/jsx-runtime/package.json +26 -17
- package/preact/jsx-runtime/src/index.js +19 -13
- package/preact/package.json +315 -262
- package/preact/src/clone-element.js +16 -10
- package/preact/src/component.js +33 -23
- package/preact/src/constants.js +2 -1
- package/preact/src/create-context.js +8 -3
- package/preact/src/create-element.js +9 -11
- package/preact/src/diff/catch-error.js +4 -2
- package/preact/src/diff/children.js +41 -32
- package/preact/src/diff/index.js +81 -34
- package/preact/src/diff/props.js +15 -14
- package/preact/src/index.d.ts +369 -301
- package/preact/src/internal.d.ts +11 -2
- package/preact/src/jsx.d.ts +1862 -626
- package/preact/src/options.js +1 -2
- package/preact/src/render.js +5 -6
- package/preact/src/util.js +6 -0
- package/preact/test-utils/dist/testUtils.js +1 -1
- package/preact/test-utils/dist/testUtils.js.map +1 -1
- package/preact/test-utils/dist/testUtils.mjs +1 -1
- package/preact/test-utils/dist/testUtils.module.js +1 -1
- package/preact/test-utils/dist/testUtils.module.js.map +1 -1
- package/preact/test-utils/dist/testUtils.umd.js +1 -1
- package/preact/test-utils/dist/testUtils.umd.js.map +1 -1
- package/preact/test-utils/package.json +9 -0
- package/preact/test-utils/src/index.js +2 -1
package/dist/index.js
CHANGED
|
@@ -1729,11 +1729,9 @@ function NumberFieldEntry(props) {
|
|
|
1729
1729
|
onBlur,
|
|
1730
1730
|
validate
|
|
1731
1731
|
} = props;
|
|
1732
|
-
const [cachedInvalidValue, setCachedInvalidValue] = hooks.useState(null);
|
|
1733
1732
|
const globalError = useError(id);
|
|
1734
1733
|
const [localError, setLocalError] = hooks.useState(null);
|
|
1735
1734
|
let value = getValue(element);
|
|
1736
|
-
const previousValue = usePrevious(value);
|
|
1737
1735
|
hooks.useEffect(() => {
|
|
1738
1736
|
if (minDash.isFunction(validate)) {
|
|
1739
1737
|
const newValidationError = validate(value) || null;
|
|
@@ -1745,16 +1743,9 @@ function NumberFieldEntry(props) {
|
|
|
1745
1743
|
if (minDash.isFunction(validate)) {
|
|
1746
1744
|
newValidationError = validate(newValue) || null;
|
|
1747
1745
|
}
|
|
1748
|
-
|
|
1749
|
-
setCachedInvalidValue(newValue);
|
|
1750
|
-
} else {
|
|
1751
|
-
setValue(newValue);
|
|
1752
|
-
}
|
|
1746
|
+
setValue(newValue, newValidationError);
|
|
1753
1747
|
setLocalError(newValidationError);
|
|
1754
1748
|
};
|
|
1755
|
-
if (previousValue === value && localError) {
|
|
1756
|
-
value = cachedInvalidValue;
|
|
1757
|
-
}
|
|
1758
1749
|
const error = globalError || localError;
|
|
1759
1750
|
return jsxRuntime.jsxs("div", {
|
|
1760
1751
|
class: classnames__default["default"]('bio-properties-panel-entry', error ? 'has-error' : ''),
|
|
@@ -2202,11 +2193,9 @@ function FeelEntry(props) {
|
|
|
2202
2193
|
onFocus,
|
|
2203
2194
|
onBlur
|
|
2204
2195
|
} = props;
|
|
2205
|
-
const [cachedInvalidValue, setCachedInvalidValue] = hooks.useState(null);
|
|
2206
2196
|
const [validationError, setValidationError] = hooks.useState(null);
|
|
2207
2197
|
const [localError, setLocalError] = hooks.useState(null);
|
|
2208
2198
|
let value = getValue(element);
|
|
2209
|
-
const previousValue = usePrevious(value);
|
|
2210
2199
|
hooks.useEffect(() => {
|
|
2211
2200
|
if (minDash.isFunction(validate)) {
|
|
2212
2201
|
const newValidationError = validate(value) || null;
|
|
@@ -2218,22 +2207,16 @@ function FeelEntry(props) {
|
|
|
2218
2207
|
if (minDash.isFunction(validate)) {
|
|
2219
2208
|
newValidationError = validate(newValue) || null;
|
|
2220
2209
|
}
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
if (newValue !== value) {
|
|
2226
|
-
setValue(newValue);
|
|
2227
|
-
}
|
|
2210
|
+
|
|
2211
|
+
// don't create multiple commandStack entries for the same value
|
|
2212
|
+
if (newValue !== value) {
|
|
2213
|
+
setValue(newValue, newValidationError);
|
|
2228
2214
|
}
|
|
2229
2215
|
setValidationError(newValidationError);
|
|
2230
2216
|
});
|
|
2231
2217
|
const onError = hooks.useCallback(err => {
|
|
2232
2218
|
setLocalError(err);
|
|
2233
2219
|
}, []);
|
|
2234
|
-
if (previousValue === value && validationError) {
|
|
2235
|
-
value = cachedInvalidValue;
|
|
2236
|
-
}
|
|
2237
2220
|
const temporaryError = useError(id);
|
|
2238
2221
|
const error = localError || temporaryError || validationError;
|
|
2239
2222
|
return jsxRuntime.jsxs("div", {
|
|
@@ -2455,11 +2438,9 @@ function TemplatingEntry(props) {
|
|
|
2455
2438
|
validate,
|
|
2456
2439
|
show = noop
|
|
2457
2440
|
} = props;
|
|
2458
|
-
const [cachedInvalidValue, setCachedInvalidValue] = hooks.useState(null);
|
|
2459
2441
|
const [validationError, setValidationError] = hooks.useState(null);
|
|
2460
2442
|
const [localError, setLocalError] = hooks.useState(null);
|
|
2461
2443
|
let value = getValue(element);
|
|
2462
|
-
const previousValue = usePrevious(value);
|
|
2463
2444
|
hooks.useEffect(() => {
|
|
2464
2445
|
if (minDash.isFunction(validate)) {
|
|
2465
2446
|
const newValidationError = validate(value) || null;
|
|
@@ -2471,22 +2452,16 @@ function TemplatingEntry(props) {
|
|
|
2471
2452
|
if (minDash.isFunction(validate)) {
|
|
2472
2453
|
newValidationError = validate(newValue) || null;
|
|
2473
2454
|
}
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
if (newValue !== value) {
|
|
2479
|
-
setValue(newValue);
|
|
2480
|
-
}
|
|
2455
|
+
|
|
2456
|
+
// don't create multiple commandStack entries for the same value
|
|
2457
|
+
if (newValue !== value) {
|
|
2458
|
+
setValue(newValue, newValidationError);
|
|
2481
2459
|
}
|
|
2482
2460
|
setValidationError(newValidationError);
|
|
2483
2461
|
});
|
|
2484
2462
|
const onError = hooks.useCallback(err => {
|
|
2485
2463
|
setLocalError(err);
|
|
2486
2464
|
}, []);
|
|
2487
|
-
if (previousValue === value && validationError) {
|
|
2488
|
-
value = cachedInvalidValue;
|
|
2489
|
-
}
|
|
2490
2465
|
const temporaryError = useError(id);
|
|
2491
2466
|
const error = localError || temporaryError || validationError;
|
|
2492
2467
|
return jsxRuntime.jsxs("div", {
|
|
@@ -2875,11 +2850,9 @@ function SelectEntry(props) {
|
|
|
2875
2850
|
validate
|
|
2876
2851
|
} = props;
|
|
2877
2852
|
const options = getOptions(element);
|
|
2878
|
-
const [cachedInvalidValue, setCachedInvalidValue] = hooks.useState(null);
|
|
2879
2853
|
const globalError = useError(id);
|
|
2880
2854
|
const [localError, setLocalError] = hooks.useState(null);
|
|
2881
2855
|
let value = getValue(element);
|
|
2882
|
-
const previousValue = usePrevious(value);
|
|
2883
2856
|
hooks.useEffect(() => {
|
|
2884
2857
|
if (minDash.isFunction(validate)) {
|
|
2885
2858
|
const newValidationError = validate(value) || null;
|
|
@@ -2891,16 +2864,9 @@ function SelectEntry(props) {
|
|
|
2891
2864
|
if (minDash.isFunction(validate)) {
|
|
2892
2865
|
newValidationError = validate(newValue) || null;
|
|
2893
2866
|
}
|
|
2894
|
-
|
|
2895
|
-
setCachedInvalidValue(newValue);
|
|
2896
|
-
} else {
|
|
2897
|
-
setValue(newValue);
|
|
2898
|
-
}
|
|
2867
|
+
setValue(newValue, newValidationError);
|
|
2899
2868
|
setLocalError(newValidationError);
|
|
2900
2869
|
};
|
|
2901
|
-
if (previousValue === value && localError) {
|
|
2902
|
-
value = cachedInvalidValue;
|
|
2903
|
-
}
|
|
2904
2870
|
const error = globalError || localError;
|
|
2905
2871
|
return jsxRuntime.jsxs("div", {
|
|
2906
2872
|
class: classnames__default["default"]('bio-properties-panel-entry', error ? 'has-error' : ''),
|
|
@@ -3088,11 +3054,9 @@ function TextAreaEntry(props) {
|
|
|
3088
3054
|
onBlur,
|
|
3089
3055
|
autoResize
|
|
3090
3056
|
} = props;
|
|
3091
|
-
const [cachedInvalidValue, setCachedInvalidValue] = hooks.useState(null);
|
|
3092
3057
|
const globalError = useError(id);
|
|
3093
3058
|
const [localError, setLocalError] = hooks.useState(null);
|
|
3094
3059
|
let value = getValue(element);
|
|
3095
|
-
const previousValue = usePrevious(value);
|
|
3096
3060
|
hooks.useEffect(() => {
|
|
3097
3061
|
if (minDash.isFunction(validate)) {
|
|
3098
3062
|
const newValidationError = validate(value) || null;
|
|
@@ -3104,16 +3068,9 @@ function TextAreaEntry(props) {
|
|
|
3104
3068
|
if (minDash.isFunction(validate)) {
|
|
3105
3069
|
newValidationError = validate(newValue) || null;
|
|
3106
3070
|
}
|
|
3107
|
-
|
|
3108
|
-
setCachedInvalidValue(newValue);
|
|
3109
|
-
} else {
|
|
3110
|
-
setValue(newValue);
|
|
3111
|
-
}
|
|
3071
|
+
setValue(newValue, newValidationError);
|
|
3112
3072
|
setLocalError(newValidationError);
|
|
3113
3073
|
};
|
|
3114
|
-
if (previousValue === value && localError) {
|
|
3115
|
-
value = cachedInvalidValue;
|
|
3116
|
-
}
|
|
3117
3074
|
const error = globalError || localError;
|
|
3118
3075
|
return jsxRuntime.jsxs("div", {
|
|
3119
3076
|
class: classnames__default["default"]('bio-properties-panel-entry', error ? 'has-error' : ''),
|
|
@@ -3229,11 +3186,9 @@ function TextfieldEntry(props) {
|
|
|
3229
3186
|
onFocus,
|
|
3230
3187
|
onBlur
|
|
3231
3188
|
} = props;
|
|
3232
|
-
const [cachedInvalidValue, setCachedInvalidValue] = hooks.useState(null);
|
|
3233
3189
|
const globalError = useError(id);
|
|
3234
3190
|
const [localError, setLocalError] = hooks.useState(null);
|
|
3235
3191
|
let value = getValue(element);
|
|
3236
|
-
const previousValue = usePrevious(value);
|
|
3237
3192
|
hooks.useEffect(() => {
|
|
3238
3193
|
if (minDash.isFunction(validate)) {
|
|
3239
3194
|
const newValidationError = validate(value) || null;
|
|
@@ -3245,16 +3200,9 @@ function TextfieldEntry(props) {
|
|
|
3245
3200
|
if (minDash.isFunction(validate)) {
|
|
3246
3201
|
newValidationError = validate(newValue) || null;
|
|
3247
3202
|
}
|
|
3248
|
-
|
|
3249
|
-
setCachedInvalidValue(newValue);
|
|
3250
|
-
} else {
|
|
3251
|
-
setValue(newValue);
|
|
3252
|
-
}
|
|
3203
|
+
setValue(newValue, newValidationError);
|
|
3253
3204
|
setLocalError(newValidationError);
|
|
3254
3205
|
};
|
|
3255
|
-
if (previousValue === value && localError) {
|
|
3256
|
-
value = cachedInvalidValue;
|
|
3257
|
-
}
|
|
3258
3206
|
const error = globalError || localError;
|
|
3259
3207
|
return jsxRuntime.jsxs("div", {
|
|
3260
3208
|
class: classnames__default["default"]('bio-properties-panel-entry', error ? 'has-error' : ''),
|