@bpmn-io/properties-panel 3.29.1 → 3.30.1
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 +44 -9
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +44 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -257,6 +257,19 @@ const EventContext = preact.createContext({
|
|
|
257
257
|
eventBus: null
|
|
258
258
|
});
|
|
259
259
|
|
|
260
|
+
/**
|
|
261
|
+
* @typedef { {
|
|
262
|
+
* parserDialect?: import('@bpmn-io/feel-editor').ParserDialect,
|
|
263
|
+
* builtins?: import('@bpmn-io/feel-editor').Variable[],
|
|
264
|
+
* dialect?: import('@bpmn-io/feel-editor').Dialect
|
|
265
|
+
* } } FeelLanguageContextType
|
|
266
|
+
*/
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* @type {import('preact').Context<FeelLanguageContextType>}
|
|
270
|
+
*/
|
|
271
|
+
const FeelLanguageContext = preact.createContext({});
|
|
272
|
+
|
|
260
273
|
const LayoutContext = preact.createContext({
|
|
261
274
|
layout: {},
|
|
262
275
|
setLayout: () => {},
|
|
@@ -1757,11 +1770,17 @@ const FeelEditor = compat.forwardRef((props, ref) => {
|
|
|
1757
1770
|
popupOpen,
|
|
1758
1771
|
disabled,
|
|
1759
1772
|
tooltipContainer,
|
|
1760
|
-
variables
|
|
1773
|
+
variables,
|
|
1774
|
+
feelLanguageContext
|
|
1761
1775
|
} = props;
|
|
1762
1776
|
const inputRef = hooks.useRef();
|
|
1763
1777
|
const [editor, setEditor] = hooks.useState();
|
|
1764
1778
|
const [localValue, setLocalValue] = hooks.useState(value || '');
|
|
1779
|
+
const {
|
|
1780
|
+
builtins,
|
|
1781
|
+
dialect,
|
|
1782
|
+
parserDialect
|
|
1783
|
+
} = feelLanguageContext || {};
|
|
1765
1784
|
useBufferedFocus(editor, ref);
|
|
1766
1785
|
const handleInput = useStaticCallback(newValue => {
|
|
1767
1786
|
onInput(newValue);
|
|
@@ -1793,7 +1812,10 @@ const FeelEditor = compat.forwardRef((props, ref) => {
|
|
|
1793
1812
|
placeholder: placeholder,
|
|
1794
1813
|
tooltipContainer: tooltipContainer,
|
|
1795
1814
|
value: localValue,
|
|
1796
|
-
variables
|
|
1815
|
+
variables,
|
|
1816
|
+
builtins,
|
|
1817
|
+
dialect,
|
|
1818
|
+
parserDialect,
|
|
1797
1819
|
extensions: [...(enableGutters ? [view.lineNumbers()] : []), view.EditorView.lineWrapping],
|
|
1798
1820
|
contentAttributes
|
|
1799
1821
|
});
|
|
@@ -2031,7 +2053,8 @@ function NumberField(props) {
|
|
|
2031
2053
|
step,
|
|
2032
2054
|
value = '',
|
|
2033
2055
|
onFocus,
|
|
2034
|
-
onBlur
|
|
2056
|
+
onBlur,
|
|
2057
|
+
tooltip
|
|
2035
2058
|
} = props;
|
|
2036
2059
|
const [localValue, setLocalValue] = hooks.useState(value);
|
|
2037
2060
|
const handleInputCallback = hooks.useMemo(() => {
|
|
@@ -2056,7 +2079,12 @@ function NumberField(props) {
|
|
|
2056
2079
|
children: [displayLabel && jsxRuntime.jsx("label", {
|
|
2057
2080
|
for: prefixId$6(id),
|
|
2058
2081
|
class: "bio-properties-panel-label",
|
|
2059
|
-
children:
|
|
2082
|
+
children: jsxRuntime.jsx(TooltipWrapper, {
|
|
2083
|
+
value: tooltip,
|
|
2084
|
+
forId: id,
|
|
2085
|
+
element: props.element,
|
|
2086
|
+
children: label
|
|
2087
|
+
})
|
|
2060
2088
|
}), jsxRuntime.jsx("input", {
|
|
2061
2089
|
id: prefixId$6(id),
|
|
2062
2090
|
ref: inputRef,
|
|
@@ -2109,7 +2137,8 @@ function NumberFieldEntry(props) {
|
|
|
2109
2137
|
step,
|
|
2110
2138
|
onFocus,
|
|
2111
2139
|
onBlur,
|
|
2112
|
-
validate
|
|
2140
|
+
validate,
|
|
2141
|
+
tooltip
|
|
2113
2142
|
} = props;
|
|
2114
2143
|
const globalError = useError(id);
|
|
2115
2144
|
const [localError, setLocalError] = hooks.useState(null);
|
|
@@ -2143,7 +2172,8 @@ function NumberFieldEntry(props) {
|
|
|
2143
2172
|
max: max,
|
|
2144
2173
|
min: min,
|
|
2145
2174
|
step: step,
|
|
2146
|
-
value: value
|
|
2175
|
+
value: value,
|
|
2176
|
+
tooltip: tooltip
|
|
2147
2177
|
}, element), error && jsxRuntime.jsx("div", {
|
|
2148
2178
|
class: "bio-properties-panel-error",
|
|
2149
2179
|
children: error
|
|
@@ -2215,6 +2245,7 @@ function FeelTextfield(props) {
|
|
|
2215
2245
|
const containerRef = hooks.useRef();
|
|
2216
2246
|
const feelActive = minDash.isString(localValue) && localValue.startsWith('=') || feel === 'required';
|
|
2217
2247
|
const feelOnlyValue = minDash.isString(localValue) && localValue.startsWith('=') ? localValue.substring(1) : localValue;
|
|
2248
|
+
const feelLanguageContext = hooks.useContext(FeelLanguageContext);
|
|
2218
2249
|
const [focus, _setFocus] = hooks.useState(undefined);
|
|
2219
2250
|
const {
|
|
2220
2251
|
eventBus
|
|
@@ -2293,7 +2324,8 @@ function FeelTextfield(props) {
|
|
|
2293
2324
|
tooltipContainer,
|
|
2294
2325
|
type,
|
|
2295
2326
|
value: feelOnlyValue,
|
|
2296
|
-
variables
|
|
2327
|
+
variables,
|
|
2328
|
+
feelLanguageContext
|
|
2297
2329
|
});
|
|
2298
2330
|
if (isOpen) {
|
|
2299
2331
|
eventBus.once('propertiesPanelPopup.close', () => {
|
|
@@ -2399,6 +2431,7 @@ function FeelTextfield(props) {
|
|
|
2399
2431
|
placeholder: placeholder,
|
|
2400
2432
|
value: feelOnlyValue,
|
|
2401
2433
|
variables: variables,
|
|
2434
|
+
feelLanguageContext: feelLanguageContext,
|
|
2402
2435
|
ref: editorRef,
|
|
2403
2436
|
tooltipContainer: tooltipContainer
|
|
2404
2437
|
}) : jsxRuntime.jsx(OptionalComponent, {
|
|
@@ -4111,7 +4144,8 @@ function FeelPopup$1(props) {
|
|
|
4111
4144
|
singleLine,
|
|
4112
4145
|
sourceElement,
|
|
4113
4146
|
tooltipContainer,
|
|
4114
|
-
eventBus
|
|
4147
|
+
eventBus,
|
|
4148
|
+
feelLanguageContext
|
|
4115
4149
|
} = props;
|
|
4116
4150
|
const editorRef = hooks.useRef();
|
|
4117
4151
|
const popupRef = hooks.useRef();
|
|
@@ -4181,6 +4215,7 @@ function FeelPopup$1(props) {
|
|
|
4181
4215
|
onInput: onInput,
|
|
4182
4216
|
value: value,
|
|
4183
4217
|
variables: variables,
|
|
4218
|
+
feelLanguageContext: feelLanguageContext,
|
|
4184
4219
|
ref: editorRef,
|
|
4185
4220
|
tooltipContainer: tooltipContainer
|
|
4186
4221
|
}), type === 'feelers' && jsxRuntime.jsx(TemplatingEditor, {
|
|
@@ -4416,6 +4451,7 @@ exports.ExternalLinkIcon = ExternalLinkIcon;
|
|
|
4416
4451
|
exports.FeelCheckboxEntry = FeelCheckboxEntry;
|
|
4417
4452
|
exports.FeelEntry = FeelEntry;
|
|
4418
4453
|
exports.FeelIcon = FeelIcon$1;
|
|
4454
|
+
exports.FeelLanguageContext = FeelLanguageContext;
|
|
4419
4455
|
exports.FeelNumberEntry = FeelNumberEntry;
|
|
4420
4456
|
exports.FeelPopupModule = index;
|
|
4421
4457
|
exports.FeelTemplatingEntry = FeelTemplatingEntry;
|