@bpmn-io/properties-panel 2.2.0 → 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.
Files changed (114) hide show
  1. package/assets/properties-panel.css +11 -6
  2. package/dist/index.esm.js +12 -64
  3. package/dist/index.esm.js.map +1 -1
  4. package/dist/index.js +12 -64
  5. package/dist/index.js.map +1 -1
  6. package/package.json +7 -7
  7. package/preact/README.md +56 -51
  8. package/preact/compat/client.js +19 -0
  9. package/preact/compat/client.mjs +22 -0
  10. package/preact/compat/dist/compat.js +1 -1
  11. package/preact/compat/dist/compat.js.map +1 -1
  12. package/preact/compat/dist/compat.mjs +1 -1
  13. package/preact/compat/dist/compat.module.js +1 -1
  14. package/preact/compat/dist/compat.module.js.map +1 -1
  15. package/preact/compat/dist/compat.umd.js +1 -1
  16. package/preact/compat/dist/compat.umd.js.map +1 -1
  17. package/preact/compat/jsx-dev-runtime.js +2 -0
  18. package/preact/compat/jsx-dev-runtime.mjs +2 -0
  19. package/preact/compat/jsx-runtime.js +2 -0
  20. package/preact/compat/jsx-runtime.mjs +2 -0
  21. package/preact/compat/package.json +31 -0
  22. package/preact/compat/scheduler.js +15 -0
  23. package/preact/compat/{src/scheduler.js → scheduler.mjs} +8 -9
  24. package/preact/compat/server.browser.js +4 -0
  25. package/preact/compat/src/PureComponent.js +1 -1
  26. package/preact/compat/src/forwardRef.js +2 -9
  27. package/preact/compat/src/index.d.ts +58 -4
  28. package/preact/compat/src/index.js +73 -2
  29. package/preact/compat/src/portals.js +4 -2
  30. package/preact/compat/src/render.js +133 -76
  31. package/preact/compat/src/suspense-list.d.ts +2 -2
  32. package/preact/compat/src/suspense-list.js +14 -13
  33. package/preact/compat/src/suspense.d.ts +4 -4
  34. package/preact/compat/src/suspense.js +6 -6
  35. package/preact/compat/src/util.js +10 -0
  36. package/preact/debug/dist/debug.js +1 -1
  37. package/preact/debug/dist/debug.js.map +1 -1
  38. package/preact/debug/dist/debug.mjs +1 -1
  39. package/preact/debug/dist/debug.module.js +1 -1
  40. package/preact/debug/dist/debug.module.js.map +1 -1
  41. package/preact/debug/dist/debug.umd.js +1 -1
  42. package/preact/debug/dist/debug.umd.js.map +1 -1
  43. package/preact/debug/package.json +9 -0
  44. package/preact/debug/src/check-props.js +3 -3
  45. package/preact/debug/src/debug.js +38 -17
  46. package/preact/debug/src/index.d.ts +4 -0
  47. package/preact/debug/src/util.js +4 -0
  48. package/preact/devtools/dist/devtools.js +1 -1
  49. package/preact/devtools/dist/devtools.js.map +1 -1
  50. package/preact/devtools/dist/devtools.mjs +1 -1
  51. package/preact/devtools/dist/devtools.module.js +1 -1
  52. package/preact/devtools/dist/devtools.module.js.map +1 -1
  53. package/preact/devtools/dist/devtools.umd.js +1 -1
  54. package/preact/devtools/dist/devtools.umd.js.map +1 -1
  55. package/preact/devtools/package.json +23 -14
  56. package/preact/devtools/src/devtools.js +1 -1
  57. package/preact/dist/preact.js +1 -1
  58. package/preact/dist/preact.js.map +1 -1
  59. package/preact/dist/preact.min.js +1 -1
  60. package/preact/dist/preact.min.js.map +1 -1
  61. package/preact/dist/preact.min.module.js +2 -0
  62. package/preact/dist/preact.min.module.js.map +1 -0
  63. package/preact/dist/preact.min.umd.js +2 -0
  64. package/preact/dist/preact.min.umd.js.map +1 -0
  65. package/preact/dist/preact.mjs +1 -1
  66. package/preact/dist/preact.module.js +1 -1
  67. package/preact/dist/preact.module.js.map +1 -1
  68. package/preact/dist/preact.umd.js +1 -1
  69. package/preact/dist/preact.umd.js.map +1 -1
  70. package/preact/hooks/dist/hooks.js +1 -1
  71. package/preact/hooks/dist/hooks.js.map +1 -1
  72. package/preact/hooks/dist/hooks.mjs +1 -1
  73. package/preact/hooks/dist/hooks.module.js +1 -1
  74. package/preact/hooks/dist/hooks.module.js.map +1 -1
  75. package/preact/hooks/dist/hooks.umd.js +1 -1
  76. package/preact/hooks/dist/hooks.umd.js.map +1 -1
  77. package/preact/hooks/package.json +9 -0
  78. package/preact/hooks/src/index.d.ts +26 -14
  79. package/preact/hooks/src/index.js +169 -44
  80. package/preact/hooks/src/internal.d.ts +12 -2
  81. package/preact/jsx-runtime/dist/jsxRuntime.js +1 -1
  82. package/preact/jsx-runtime/dist/jsxRuntime.js.map +1 -1
  83. package/preact/jsx-runtime/dist/jsxRuntime.mjs +1 -1
  84. package/preact/jsx-runtime/dist/jsxRuntime.module.js +1 -1
  85. package/preact/jsx-runtime/dist/jsxRuntime.module.js.map +1 -1
  86. package/preact/jsx-runtime/dist/jsxRuntime.umd.js +1 -1
  87. package/preact/jsx-runtime/dist/jsxRuntime.umd.js.map +1 -1
  88. package/preact/jsx-runtime/package.json +26 -17
  89. package/preact/jsx-runtime/src/index.js +19 -13
  90. package/preact/package.json +315 -262
  91. package/preact/src/clone-element.js +16 -10
  92. package/preact/src/component.js +33 -23
  93. package/preact/src/constants.js +2 -1
  94. package/preact/src/create-context.js +8 -3
  95. package/preact/src/create-element.js +9 -11
  96. package/preact/src/diff/catch-error.js +4 -2
  97. package/preact/src/diff/children.js +41 -32
  98. package/preact/src/diff/index.js +81 -34
  99. package/preact/src/diff/props.js +15 -14
  100. package/preact/src/index.d.ts +369 -301
  101. package/preact/src/internal.d.ts +11 -2
  102. package/preact/src/jsx.d.ts +1862 -626
  103. package/preact/src/options.js +1 -2
  104. package/preact/src/render.js +5 -6
  105. package/preact/src/util.js +6 -0
  106. package/preact/test-utils/dist/testUtils.js +1 -1
  107. package/preact/test-utils/dist/testUtils.js.map +1 -1
  108. package/preact/test-utils/dist/testUtils.mjs +1 -1
  109. package/preact/test-utils/dist/testUtils.module.js +1 -1
  110. package/preact/test-utils/dist/testUtils.module.js.map +1 -1
  111. package/preact/test-utils/dist/testUtils.umd.js +1 -1
  112. package/preact/test-utils/dist/testUtils.umd.js.map +1 -1
  113. package/preact/test-utils/package.json +9 -0
  114. package/preact/test-utils/src/index.js +2 -1
@@ -99,11 +99,13 @@
99
99
  --dropdown-item-hover-background-color: var(--color-grey-225-10-95);
100
100
  --dropdown-separator-background-color: var(--color-grey-225-10-75);
101
101
 
102
- --feel-background-color: var(--color-grey-225-10-95);
102
+ --feel-background-color: transparent;
103
103
  --feel-active-color: var(--color-blue-205-100-45);
104
104
  --feel-inactive-color: var(--color-grey-225-10-35);
105
- --feel-hover-background-color: var(--color-grey-225-10-90);
106
- --feel-active-background-color: var(--color-grey-225-10-95);
105
+ --feel-hover-color: var(--color-grey-225-10-15);
106
+ --feel-hover-background-color: var(--color-grey-225-10-97);
107
+ --feel-active-background-color: transparent;
108
+ --feel-required-color: var(--color-grey-225-10-55);
107
109
 
108
110
  --feel-indicator-background-color: var(--color-grey-225-10-90);
109
111
 
@@ -990,7 +992,7 @@ textarea.bio-properties-panel-input {
990
992
 
991
993
  .bio-properties-panel-feel-icon {
992
994
  display: inline-flex;
993
- height: 22px;
995
+ height: 18px;
994
996
  width: 22px;
995
997
  vertical-align: text-bottom;
996
998
  padding: 0;
@@ -1005,7 +1007,6 @@ textarea.bio-properties-panel-input {
1005
1007
 
1006
1008
  .bio-properties-panel-feel-icon.optional {
1007
1009
  cursor: pointer;
1008
-
1009
1010
  background: var(--feel-background-color);
1010
1011
  }
1011
1012
 
@@ -1017,6 +1018,10 @@ textarea.bio-properties-panel-input {
1017
1018
  background: var(--feel-hover-background-color);
1018
1019
  }
1019
1020
 
1021
+ .bio-properties-panel-feel-icon:hover svg * {
1022
+ fill: var(--feel-hover-color);
1023
+ }
1024
+
1020
1025
  .bio-properties-panel-feel-icon.active {
1021
1026
  background: var(--feel-active-background-color);
1022
1027
  }
@@ -1034,7 +1039,7 @@ textarea.bio-properties-panel-input {
1034
1039
  }
1035
1040
 
1036
1041
  .bio-properties-panel-feel-icon.required.active svg * {
1037
- fill: var(--feel-inactive-color);
1042
+ fill: var(--feel-required-color);
1038
1043
  }
1039
1044
 
1040
1045
  .bio-properties-panel-feel-editor-container {
package/dist/index.esm.js CHANGED
@@ -1720,11 +1720,9 @@ function NumberFieldEntry(props) {
1720
1720
  onBlur,
1721
1721
  validate
1722
1722
  } = props;
1723
- const [cachedInvalidValue, setCachedInvalidValue] = useState(null);
1724
1723
  const globalError = useError(id);
1725
1724
  const [localError, setLocalError] = useState(null);
1726
1725
  let value = getValue(element);
1727
- const previousValue = usePrevious(value);
1728
1726
  useEffect(() => {
1729
1727
  if (isFunction(validate)) {
1730
1728
  const newValidationError = validate(value) || null;
@@ -1736,16 +1734,9 @@ function NumberFieldEntry(props) {
1736
1734
  if (isFunction(validate)) {
1737
1735
  newValidationError = validate(newValue) || null;
1738
1736
  }
1739
- if (newValidationError) {
1740
- setCachedInvalidValue(newValue);
1741
- } else {
1742
- setValue(newValue);
1743
- }
1737
+ setValue(newValue, newValidationError);
1744
1738
  setLocalError(newValidationError);
1745
1739
  };
1746
- if (previousValue === value && localError) {
1747
- value = cachedInvalidValue;
1748
- }
1749
1740
  const error = globalError || localError;
1750
1741
  return jsxs("div", {
1751
1742
  class: classnames('bio-properties-panel-entry', error ? 'has-error' : ''),
@@ -2193,11 +2184,9 @@ function FeelEntry(props) {
2193
2184
  onFocus,
2194
2185
  onBlur
2195
2186
  } = props;
2196
- const [cachedInvalidValue, setCachedInvalidValue] = useState(null);
2197
2187
  const [validationError, setValidationError] = useState(null);
2198
2188
  const [localError, setLocalError] = useState(null);
2199
2189
  let value = getValue(element);
2200
- const previousValue = usePrevious(value);
2201
2190
  useEffect(() => {
2202
2191
  if (isFunction(validate)) {
2203
2192
  const newValidationError = validate(value) || null;
@@ -2209,22 +2198,16 @@ function FeelEntry(props) {
2209
2198
  if (isFunction(validate)) {
2210
2199
  newValidationError = validate(newValue) || null;
2211
2200
  }
2212
- if (newValidationError) {
2213
- setCachedInvalidValue(newValue);
2214
- } else {
2215
- // don't create multiple commandStack entries for the same value
2216
- if (newValue !== value) {
2217
- setValue(newValue);
2218
- }
2201
+
2202
+ // don't create multiple commandStack entries for the same value
2203
+ if (newValue !== value) {
2204
+ setValue(newValue, newValidationError);
2219
2205
  }
2220
2206
  setValidationError(newValidationError);
2221
2207
  });
2222
2208
  const onError = useCallback(err => {
2223
2209
  setLocalError(err);
2224
2210
  }, []);
2225
- if (previousValue === value && validationError) {
2226
- value = cachedInvalidValue;
2227
- }
2228
2211
  const temporaryError = useError(id);
2229
2212
  const error = localError || temporaryError || validationError;
2230
2213
  return jsxs("div", {
@@ -2446,11 +2429,9 @@ function TemplatingEntry(props) {
2446
2429
  validate,
2447
2430
  show = noop
2448
2431
  } = props;
2449
- const [cachedInvalidValue, setCachedInvalidValue] = useState(null);
2450
2432
  const [validationError, setValidationError] = useState(null);
2451
2433
  const [localError, setLocalError] = useState(null);
2452
2434
  let value = getValue(element);
2453
- const previousValue = usePrevious(value);
2454
2435
  useEffect(() => {
2455
2436
  if (isFunction(validate)) {
2456
2437
  const newValidationError = validate(value) || null;
@@ -2462,22 +2443,16 @@ function TemplatingEntry(props) {
2462
2443
  if (isFunction(validate)) {
2463
2444
  newValidationError = validate(newValue) || null;
2464
2445
  }
2465
- if (newValidationError) {
2466
- setCachedInvalidValue(newValue);
2467
- } else {
2468
- // don't create multiple commandStack entries for the same value
2469
- if (newValue !== value) {
2470
- setValue(newValue);
2471
- }
2446
+
2447
+ // don't create multiple commandStack entries for the same value
2448
+ if (newValue !== value) {
2449
+ setValue(newValue, newValidationError);
2472
2450
  }
2473
2451
  setValidationError(newValidationError);
2474
2452
  });
2475
2453
  const onError = useCallback(err => {
2476
2454
  setLocalError(err);
2477
2455
  }, []);
2478
- if (previousValue === value && validationError) {
2479
- value = cachedInvalidValue;
2480
- }
2481
2456
  const temporaryError = useError(id);
2482
2457
  const error = localError || temporaryError || validationError;
2483
2458
  return jsxs("div", {
@@ -2866,11 +2841,9 @@ function SelectEntry(props) {
2866
2841
  validate
2867
2842
  } = props;
2868
2843
  const options = getOptions(element);
2869
- const [cachedInvalidValue, setCachedInvalidValue] = useState(null);
2870
2844
  const globalError = useError(id);
2871
2845
  const [localError, setLocalError] = useState(null);
2872
2846
  let value = getValue(element);
2873
- const previousValue = usePrevious(value);
2874
2847
  useEffect(() => {
2875
2848
  if (isFunction(validate)) {
2876
2849
  const newValidationError = validate(value) || null;
@@ -2882,16 +2855,9 @@ function SelectEntry(props) {
2882
2855
  if (isFunction(validate)) {
2883
2856
  newValidationError = validate(newValue) || null;
2884
2857
  }
2885
- if (newValidationError) {
2886
- setCachedInvalidValue(newValue);
2887
- } else {
2888
- setValue(newValue);
2889
- }
2858
+ setValue(newValue, newValidationError);
2890
2859
  setLocalError(newValidationError);
2891
2860
  };
2892
- if (previousValue === value && localError) {
2893
- value = cachedInvalidValue;
2894
- }
2895
2861
  const error = globalError || localError;
2896
2862
  return jsxs("div", {
2897
2863
  class: classnames('bio-properties-panel-entry', error ? 'has-error' : ''),
@@ -3079,11 +3045,9 @@ function TextAreaEntry(props) {
3079
3045
  onBlur,
3080
3046
  autoResize
3081
3047
  } = props;
3082
- const [cachedInvalidValue, setCachedInvalidValue] = useState(null);
3083
3048
  const globalError = useError(id);
3084
3049
  const [localError, setLocalError] = useState(null);
3085
3050
  let value = getValue(element);
3086
- const previousValue = usePrevious(value);
3087
3051
  useEffect(() => {
3088
3052
  if (isFunction(validate)) {
3089
3053
  const newValidationError = validate(value) || null;
@@ -3095,16 +3059,9 @@ function TextAreaEntry(props) {
3095
3059
  if (isFunction(validate)) {
3096
3060
  newValidationError = validate(newValue) || null;
3097
3061
  }
3098
- if (newValidationError) {
3099
- setCachedInvalidValue(newValue);
3100
- } else {
3101
- setValue(newValue);
3102
- }
3062
+ setValue(newValue, newValidationError);
3103
3063
  setLocalError(newValidationError);
3104
3064
  };
3105
- if (previousValue === value && localError) {
3106
- value = cachedInvalidValue;
3107
- }
3108
3065
  const error = globalError || localError;
3109
3066
  return jsxs("div", {
3110
3067
  class: classnames('bio-properties-panel-entry', error ? 'has-error' : ''),
@@ -3220,11 +3177,9 @@ function TextfieldEntry(props) {
3220
3177
  onFocus,
3221
3178
  onBlur
3222
3179
  } = props;
3223
- const [cachedInvalidValue, setCachedInvalidValue] = useState(null);
3224
3180
  const globalError = useError(id);
3225
3181
  const [localError, setLocalError] = useState(null);
3226
3182
  let value = getValue(element);
3227
- const previousValue = usePrevious(value);
3228
3183
  useEffect(() => {
3229
3184
  if (isFunction(validate)) {
3230
3185
  const newValidationError = validate(value) || null;
@@ -3236,16 +3191,9 @@ function TextfieldEntry(props) {
3236
3191
  if (isFunction(validate)) {
3237
3192
  newValidationError = validate(newValue) || null;
3238
3193
  }
3239
- if (newValidationError) {
3240
- setCachedInvalidValue(newValue);
3241
- } else {
3242
- setValue(newValue);
3243
- }
3194
+ setValue(newValue, newValidationError);
3244
3195
  setLocalError(newValidationError);
3245
3196
  };
3246
- if (previousValue === value && localError) {
3247
- value = cachedInvalidValue;
3248
- }
3249
3197
  const error = globalError || localError;
3250
3198
  return jsxs("div", {
3251
3199
  class: classnames('bio-properties-panel-entry', error ? 'has-error' : ''),