@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.esm.js
CHANGED
|
@@ -236,6 +236,19 @@ const EventContext = createContext({
|
|
|
236
236
|
eventBus: null
|
|
237
237
|
});
|
|
238
238
|
|
|
239
|
+
/**
|
|
240
|
+
* @typedef { {
|
|
241
|
+
* parserDialect?: import('@bpmn-io/feel-editor').ParserDialect,
|
|
242
|
+
* builtins?: import('@bpmn-io/feel-editor').Variable[],
|
|
243
|
+
* dialect?: import('@bpmn-io/feel-editor').Dialect
|
|
244
|
+
* } } FeelLanguageContextType
|
|
245
|
+
*/
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* @type {import('preact').Context<FeelLanguageContextType>}
|
|
249
|
+
*/
|
|
250
|
+
const FeelLanguageContext = createContext({});
|
|
251
|
+
|
|
239
252
|
const LayoutContext = createContext({
|
|
240
253
|
layout: {},
|
|
241
254
|
setLayout: () => {},
|
|
@@ -1736,11 +1749,17 @@ const FeelEditor = forwardRef((props, ref) => {
|
|
|
1736
1749
|
popupOpen,
|
|
1737
1750
|
disabled,
|
|
1738
1751
|
tooltipContainer,
|
|
1739
|
-
variables
|
|
1752
|
+
variables,
|
|
1753
|
+
feelLanguageContext
|
|
1740
1754
|
} = props;
|
|
1741
1755
|
const inputRef = useRef();
|
|
1742
1756
|
const [editor, setEditor] = useState();
|
|
1743
1757
|
const [localValue, setLocalValue] = useState(value || '');
|
|
1758
|
+
const {
|
|
1759
|
+
builtins,
|
|
1760
|
+
dialect,
|
|
1761
|
+
parserDialect
|
|
1762
|
+
} = feelLanguageContext || {};
|
|
1744
1763
|
useBufferedFocus(editor, ref);
|
|
1745
1764
|
const handleInput = useStaticCallback(newValue => {
|
|
1746
1765
|
onInput(newValue);
|
|
@@ -1772,7 +1791,10 @@ const FeelEditor = forwardRef((props, ref) => {
|
|
|
1772
1791
|
placeholder: placeholder,
|
|
1773
1792
|
tooltipContainer: tooltipContainer,
|
|
1774
1793
|
value: localValue,
|
|
1775
|
-
variables
|
|
1794
|
+
variables,
|
|
1795
|
+
builtins,
|
|
1796
|
+
dialect,
|
|
1797
|
+
parserDialect,
|
|
1776
1798
|
extensions: [...(enableGutters ? [lineNumbers()] : []), EditorView.lineWrapping],
|
|
1777
1799
|
contentAttributes
|
|
1778
1800
|
});
|
|
@@ -2010,7 +2032,8 @@ function NumberField(props) {
|
|
|
2010
2032
|
step,
|
|
2011
2033
|
value = '',
|
|
2012
2034
|
onFocus,
|
|
2013
|
-
onBlur
|
|
2035
|
+
onBlur,
|
|
2036
|
+
tooltip
|
|
2014
2037
|
} = props;
|
|
2015
2038
|
const [localValue, setLocalValue] = useState(value);
|
|
2016
2039
|
const handleInputCallback = useMemo(() => {
|
|
@@ -2035,7 +2058,12 @@ function NumberField(props) {
|
|
|
2035
2058
|
children: [displayLabel && jsx("label", {
|
|
2036
2059
|
for: prefixId$6(id),
|
|
2037
2060
|
class: "bio-properties-panel-label",
|
|
2038
|
-
children:
|
|
2061
|
+
children: jsx(TooltipWrapper, {
|
|
2062
|
+
value: tooltip,
|
|
2063
|
+
forId: id,
|
|
2064
|
+
element: props.element,
|
|
2065
|
+
children: label
|
|
2066
|
+
})
|
|
2039
2067
|
}), jsx("input", {
|
|
2040
2068
|
id: prefixId$6(id),
|
|
2041
2069
|
ref: inputRef,
|
|
@@ -2088,7 +2116,8 @@ function NumberFieldEntry(props) {
|
|
|
2088
2116
|
step,
|
|
2089
2117
|
onFocus,
|
|
2090
2118
|
onBlur,
|
|
2091
|
-
validate
|
|
2119
|
+
validate,
|
|
2120
|
+
tooltip
|
|
2092
2121
|
} = props;
|
|
2093
2122
|
const globalError = useError(id);
|
|
2094
2123
|
const [localError, setLocalError] = useState(null);
|
|
@@ -2122,7 +2151,8 @@ function NumberFieldEntry(props) {
|
|
|
2122
2151
|
max: max,
|
|
2123
2152
|
min: min,
|
|
2124
2153
|
step: step,
|
|
2125
|
-
value: value
|
|
2154
|
+
value: value,
|
|
2155
|
+
tooltip: tooltip
|
|
2126
2156
|
}, element), error && jsx("div", {
|
|
2127
2157
|
class: "bio-properties-panel-error",
|
|
2128
2158
|
children: error
|
|
@@ -2194,6 +2224,7 @@ function FeelTextfield(props) {
|
|
|
2194
2224
|
const containerRef = useRef();
|
|
2195
2225
|
const feelActive = isString(localValue) && localValue.startsWith('=') || feel === 'required';
|
|
2196
2226
|
const feelOnlyValue = isString(localValue) && localValue.startsWith('=') ? localValue.substring(1) : localValue;
|
|
2227
|
+
const feelLanguageContext = useContext(FeelLanguageContext);
|
|
2197
2228
|
const [focus, _setFocus] = useState(undefined);
|
|
2198
2229
|
const {
|
|
2199
2230
|
eventBus
|
|
@@ -2272,7 +2303,8 @@ function FeelTextfield(props) {
|
|
|
2272
2303
|
tooltipContainer,
|
|
2273
2304
|
type,
|
|
2274
2305
|
value: feelOnlyValue,
|
|
2275
|
-
variables
|
|
2306
|
+
variables,
|
|
2307
|
+
feelLanguageContext
|
|
2276
2308
|
});
|
|
2277
2309
|
if (isOpen) {
|
|
2278
2310
|
eventBus.once('propertiesPanelPopup.close', () => {
|
|
@@ -2378,6 +2410,7 @@ function FeelTextfield(props) {
|
|
|
2378
2410
|
placeholder: placeholder,
|
|
2379
2411
|
value: feelOnlyValue,
|
|
2380
2412
|
variables: variables,
|
|
2413
|
+
feelLanguageContext: feelLanguageContext,
|
|
2381
2414
|
ref: editorRef,
|
|
2382
2415
|
tooltipContainer: tooltipContainer
|
|
2383
2416
|
}) : jsx(OptionalComponent, {
|
|
@@ -4090,7 +4123,8 @@ function FeelPopup$1(props) {
|
|
|
4090
4123
|
singleLine,
|
|
4091
4124
|
sourceElement,
|
|
4092
4125
|
tooltipContainer,
|
|
4093
|
-
eventBus
|
|
4126
|
+
eventBus,
|
|
4127
|
+
feelLanguageContext
|
|
4094
4128
|
} = props;
|
|
4095
4129
|
const editorRef = useRef();
|
|
4096
4130
|
const popupRef = useRef();
|
|
@@ -4160,6 +4194,7 @@ function FeelPopup$1(props) {
|
|
|
4160
4194
|
onInput: onInput,
|
|
4161
4195
|
value: value,
|
|
4162
4196
|
variables: variables,
|
|
4197
|
+
feelLanguageContext: feelLanguageContext,
|
|
4163
4198
|
ref: editorRef,
|
|
4164
4199
|
tooltipContainer: tooltipContainer
|
|
4165
4200
|
}), type === 'feelers' && jsx(TemplatingEditor, {
|
|
@@ -4378,5 +4413,5 @@ var index = {
|
|
|
4378
4413
|
feelPopupRenderer: ['type', FeelPopupRenderer]
|
|
4379
4414
|
};
|
|
4380
4415
|
|
|
4381
|
-
export { ArrowIcon, CheckboxEntry, CloseIcon, CollapsibleEntry, CreateIcon, index$1 as DebounceInputModule, DeleteIcon, DescriptionContext, Description as DescriptionEntry, DragIcon, DropdownButton, ErrorsContext, EventContext, ExternalLinkIcon, FeelCheckboxEntry, FeelEntry, FeelIcon$1 as FeelIcon, FeelNumberEntry, index as FeelPopupModule, FeelTemplatingEntry, FeelTextAreaEntry, FeelToggleSwitchEntry, Group, Header, HeaderButton, LaunchIcon, LayoutContext, List as ListEntry, ListGroup, ListItem, NumberFieldEntry, OpenPopupIcon, Placeholder, PropertiesPanel, LayoutContext as PropertiesPanelContext, SelectEntry, Simple as SimpleEntry, TemplatingEntry, TextAreaEntry, TextfieldEntry as TextFieldEntry, ToggleSwitchEntry, TooltipContext, TooltipWrapper as TooltipEntry, isEdited$8 as isCheckboxEntryEdited, isEdited$5 as isFeelEntryEdited, isEdited$6 as isNumberFieldEntryEdited, isEdited$3 as isSelectEntryEdited, isEdited$2 as isSimpleEntryEdited, isEdited$4 as isTemplatingEntryEdited, isEdited$1 as isTextAreaEntryEdited, isEdited as isTextFieldEntryEdited, isEdited$7 as isToggleSwitchEntryEdited, useDebounce, useDescriptionContext, useElementVisible, useError, useErrors, useEvent, useKeyFactory, useLayoutState, usePrevious, useShowEntryEvent, useStaticCallback, useStickyIntersectionObserver, useTooltipContext };
|
|
4416
|
+
export { ArrowIcon, CheckboxEntry, CloseIcon, CollapsibleEntry, CreateIcon, index$1 as DebounceInputModule, DeleteIcon, DescriptionContext, Description as DescriptionEntry, DragIcon, DropdownButton, ErrorsContext, EventContext, ExternalLinkIcon, FeelCheckboxEntry, FeelEntry, FeelIcon$1 as FeelIcon, FeelLanguageContext, FeelNumberEntry, index as FeelPopupModule, FeelTemplatingEntry, FeelTextAreaEntry, FeelToggleSwitchEntry, Group, Header, HeaderButton, LaunchIcon, LayoutContext, List as ListEntry, ListGroup, ListItem, NumberFieldEntry, OpenPopupIcon, Placeholder, PropertiesPanel, LayoutContext as PropertiesPanelContext, SelectEntry, Simple as SimpleEntry, TemplatingEntry, TextAreaEntry, TextfieldEntry as TextFieldEntry, ToggleSwitchEntry, TooltipContext, TooltipWrapper as TooltipEntry, isEdited$8 as isCheckboxEntryEdited, isEdited$5 as isFeelEntryEdited, isEdited$6 as isNumberFieldEntryEdited, isEdited$3 as isSelectEntryEdited, isEdited$2 as isSimpleEntryEdited, isEdited$4 as isTemplatingEntryEdited, isEdited$1 as isTextAreaEntryEdited, isEdited as isTextFieldEntryEdited, isEdited$7 as isToggleSwitchEntryEdited, useDebounce, useDescriptionContext, useElementVisible, useError, useErrors, useEvent, useKeyFactory, useLayoutState, usePrevious, useShowEntryEvent, useStaticCallback, useStickyIntersectionObserver, useTooltipContext };
|
|
4382
4417
|
//# sourceMappingURL=index.esm.js.map
|