@eccenca/gui-elements 24.4.1-featurechatcomponentscmem6775.3 → 24.4.1-featurepreparefinalnextcmem6943.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/CHANGELOG.md +102 -5
- package/README.md +63 -16
- package/dist/cjs/cmem/markdown/Markdown.js.map +1 -1
- package/dist/cjs/cmem/react-flow/ReactFlow/ReactFlow.js +67 -13
- package/dist/cjs/cmem/react-flow/ReactFlow/ReactFlow.js.map +1 -1
- package/dist/cjs/cmem/react-flow/ReactFlow/ReactFlowV12.js +45 -0
- package/dist/cjs/cmem/react-flow/ReactFlow/ReactFlowV12.js.map +1 -0
- package/dist/cjs/cmem/react-flow/ReactFlow/ReactFlowV9.js +30 -0
- package/dist/cjs/cmem/react-flow/ReactFlow/ReactFlowV9.js.map +1 -0
- package/dist/cjs/cmem/react-flow/StickyNoteModal/StickyNoteModal.js +2 -2
- package/dist/cjs/cmem/react-flow/StickyNoteModal/StickyNoteModal.js.map +1 -1
- package/dist/cjs/cmem/react-flow/configuration/graph.js +12 -10
- package/dist/cjs/cmem/react-flow/configuration/graph.js.map +1 -1
- package/dist/cjs/cmem/react-flow/configuration/linking.js +2 -0
- package/dist/cjs/cmem/react-flow/configuration/linking.js.map +1 -1
- package/dist/cjs/cmem/react-flow/configuration/unspecified.js +2 -1
- package/dist/cjs/cmem/react-flow/configuration/unspecified.js.map +1 -1
- package/dist/cjs/cmem/react-flow/configuration/workflow.js +2 -0
- package/dist/cjs/cmem/react-flow/configuration/workflow.js.map +1 -1
- package/dist/cjs/cmem/react-flow/extensions/scrollOnDragHook.js +9 -3
- package/dist/cjs/cmem/react-flow/extensions/scrollOnDragHook.js.map +1 -1
- package/dist/cjs/cmem/react-flow/index.js +5 -1
- package/dist/cjs/cmem/react-flow/index.js.map +1 -1
- package/dist/cjs/common/index.js +5 -0
- package/dist/cjs/common/index.js.map +1 -1
- package/dist/cjs/common/utils/CssCustomProperties.js +9 -3
- package/dist/cjs/common/utils/CssCustomProperties.js.map +1 -1
- package/dist/cjs/common/utils/colorCalculateDistance.js +27 -0
- package/dist/cjs/common/utils/colorCalculateDistance.js.map +1 -0
- package/dist/cjs/common/utils/colorHash.js +143 -0
- package/dist/cjs/common/utils/colorHash.js.map +1 -0
- package/dist/cjs/common/utils/getColorConfiguration.js +37 -4
- package/dist/cjs/common/utils/getColorConfiguration.js.map +1 -1
- package/dist/cjs/components/AutoSuggestion/AutoSuggestion.js +11 -7
- package/dist/cjs/components/AutoSuggestion/AutoSuggestion.js.map +1 -1
- package/dist/cjs/components/AutoSuggestion/AutoSuggestionList.js +3 -0
- package/dist/cjs/components/AutoSuggestion/AutoSuggestionList.js.map +1 -1
- package/dist/cjs/components/AutoSuggestion/ExtendedCodeEditor.js.map +1 -1
- package/dist/cjs/components/AutocompleteField/AutoCompleteField.js +16 -6
- package/dist/cjs/components/AutocompleteField/AutoCompleteField.js.map +1 -1
- package/dist/cjs/components/AutocompleteField/autoCompleteFieldUtils.js.map +1 -1
- package/dist/cjs/components/Button/Button.js +11 -26
- package/dist/cjs/components/Button/Button.js.map +1 -1
- package/dist/cjs/components/Chat/ChatArea.js +1 -1
- package/dist/cjs/components/Chat/ChatArea.js.map +1 -1
- package/dist/cjs/components/Chat/ChatContent.js +4 -16
- package/dist/cjs/components/Chat/ChatContent.js.map +1 -1
- package/dist/cjs/components/Chat/ChatContentCollapsed.js +24 -0
- package/dist/cjs/components/Chat/ChatContentCollapsed.js.map +1 -0
- package/dist/cjs/components/Chat/ChatField.js +10 -4
- package/dist/cjs/components/Chat/ChatField.js.map +1 -1
- package/dist/cjs/components/Chat/index.js +1 -0
- package/dist/cjs/components/Chat/index.js.map +1 -1
- package/dist/cjs/components/CodeAutocompleteField/index.js +6 -1
- package/dist/cjs/components/CodeAutocompleteField/index.js.map +1 -1
- package/dist/cjs/components/Dialog/Modal.js +2 -1
- package/dist/cjs/components/Dialog/Modal.js.map +1 -1
- package/dist/cjs/components/Dialog/SimpleDialog.js +2 -1
- package/dist/cjs/components/Dialog/SimpleDialog.js.map +1 -1
- package/dist/cjs/components/Form/FieldItem.js +2 -19
- package/dist/cjs/components/Form/FieldItem.js.map +1 -1
- package/dist/cjs/components/Form/FieldSet.js +2 -20
- package/dist/cjs/components/Form/FieldSet.js.map +1 -1
- package/dist/cjs/components/Icon/BaseIcon.js +2 -2
- package/dist/cjs/components/Icon/BaseIcon.js.map +1 -1
- package/dist/cjs/components/Icon/IconButton.js.map +1 -1
- package/dist/cjs/components/Icon/canonicalIconNames.js +2 -0
- package/dist/cjs/components/Icon/canonicalIconNames.js.map +1 -1
- package/dist/cjs/components/MultiSelect/MultiSelect.js +14 -27
- package/dist/cjs/components/MultiSelect/MultiSelect.js.map +1 -1
- package/dist/cjs/components/{AutocompleteField → MultiSuggestField}/index.js +1 -7
- package/dist/cjs/components/MultiSuggestField/index.js.map +1 -0
- package/dist/cjs/components/Notification/Notification.js +3 -23
- package/dist/cjs/components/Notification/Notification.js.map +1 -1
- package/dist/cjs/components/OverviewItem/OverviewItemList.js +1 -2
- package/dist/cjs/components/OverviewItem/OverviewItemList.js.map +1 -1
- package/dist/cjs/components/Spinner/Spinner.js +17 -8
- package/dist/cjs/components/Spinner/Spinner.js.map +1 -1
- package/dist/cjs/components/SuggestField/index.js +5 -2
- package/dist/cjs/components/SuggestField/index.js.map +1 -1
- package/dist/cjs/components/Table/Table.js.map +1 -1
- package/dist/cjs/components/Table/TableContainer.js.map +1 -1
- package/dist/cjs/components/Tabs/Tab.js +3 -2
- package/dist/cjs/components/Tabs/Tab.js.map +1 -1
- package/dist/cjs/components/TextField/SearchField.js.map +1 -1
- package/dist/cjs/components/{ContentShrinker/ContentShrinker.js → TextReducer/TextReducer.js} +21 -25
- package/dist/cjs/components/TextReducer/TextReducer.js.map +1 -0
- package/dist/cjs/components/Tooltip/Tooltip.js +3 -1
- package/dist/cjs/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/cjs/components/Typography/OverflowText.js.map +1 -1
- package/dist/cjs/components/VisualTour/VisualTour.js +200 -0
- package/dist/cjs/components/VisualTour/VisualTour.js.map +1 -0
- package/dist/cjs/components/index.js +6 -8
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/cjs/configuration/constants.js +3 -1
- package/dist/cjs/configuration/constants.js.map +1 -1
- package/dist/cjs/extensions/codemirror/CodeMirror.js +3 -2
- package/dist/cjs/extensions/codemirror/CodeMirror.js.map +1 -1
- package/dist/cjs/extensions/codemirror/hooks/useCodemirrorModeExtension.hooks.js +3 -0
- package/dist/cjs/extensions/codemirror/hooks/useCodemirrorModeExtension.hooks.js.map +1 -1
- package/dist/cjs/extensions/react-flow/edges/EdgeBezier.js +50 -0
- package/dist/cjs/extensions/react-flow/edges/EdgeBezier.js.map +1 -0
- package/dist/cjs/extensions/react-flow/edges/EdgeDefault.js +21 -3
- package/dist/cjs/extensions/react-flow/edges/EdgeDefault.js.map +1 -1
- package/dist/cjs/extensions/react-flow/edges/EdgeDefaultV12.js +45 -21
- package/dist/cjs/extensions/react-flow/edges/EdgeDefaultV12.js.map +1 -1
- package/dist/cjs/extensions/react-flow/edges/EdgeDefs.js +3 -0
- package/dist/cjs/extensions/react-flow/edges/EdgeDefs.js.map +1 -1
- package/dist/cjs/extensions/react-flow/edges/EdgeNew.js +41 -0
- package/dist/cjs/extensions/react-flow/edges/EdgeNew.js.map +1 -0
- package/dist/cjs/extensions/react-flow/edges/EdgeStep.js +19 -2
- package/dist/cjs/extensions/react-flow/edges/EdgeStep.js.map +1 -1
- package/dist/cjs/extensions/react-flow/edges/EdgeStraight.js +6 -0
- package/dist/cjs/extensions/react-flow/edges/EdgeStraight.js.map +1 -0
- package/dist/cjs/extensions/react-flow/edges/utils.js +12 -1
- package/dist/cjs/extensions/react-flow/edges/utils.js.map +1 -1
- package/dist/cjs/extensions/react-flow/handles/HandleDefault.js +14 -15
- package/dist/cjs/extensions/react-flow/handles/HandleDefault.js.map +1 -1
- package/dist/cjs/extensions/react-flow/index.js +6 -6
- package/dist/cjs/extensions/react-flow/index.js.map +1 -1
- package/dist/cjs/extensions/react-flow/markers/MarkerArrowClosedInverse.js +3 -0
- package/dist/cjs/extensions/react-flow/markers/MarkerArrowClosedInverse.js.map +1 -1
- package/dist/cjs/extensions/react-flow/markers/ReactFlowMarkers.js +17 -2
- package/dist/cjs/extensions/react-flow/markers/ReactFlowMarkers.js.map +1 -1
- package/dist/cjs/extensions/react-flow/minimap/MiniMap.js +21 -2
- package/dist/cjs/extensions/react-flow/minimap/MiniMap.js.map +1 -1
- package/dist/cjs/extensions/react-flow/minimap/MiniMapV12.js +51 -0
- package/dist/cjs/extensions/react-flow/minimap/MiniMapV12.js.map +1 -0
- package/dist/cjs/extensions/react-flow/nodes/NodeContent.js +57 -54
- package/dist/cjs/extensions/react-flow/nodes/NodeContent.js.map +1 -1
- package/dist/cjs/extensions/react-flow/nodes/NodeDefault.js +2 -2
- package/dist/cjs/extensions/react-flow/nodes/NodeDefault.js.map +1 -1
- package/dist/cjs/extensions/react-flow/nodes/nodeUtils.js +2 -1
- package/dist/cjs/extensions/react-flow/nodes/nodeUtils.js.map +1 -1
- package/dist/cjs/extensions/react-flow/versionsupport.js +13 -11
- package/dist/cjs/extensions/react-flow/versionsupport.js.map +1 -1
- package/dist/cjs/index.js +1 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/cmem/markdown/Markdown.js.map +1 -1
- package/dist/esm/cmem/react-flow/ReactFlow/ReactFlow.js +67 -13
- package/dist/esm/cmem/react-flow/ReactFlow/ReactFlow.js.map +1 -1
- package/dist/esm/cmem/react-flow/ReactFlow/ReactFlowV12.js +66 -0
- package/dist/esm/cmem/react-flow/ReactFlow/ReactFlowV12.js.map +1 -0
- package/dist/esm/{legacy-replacements/Button/DismissiveButton.js → cmem/react-flow/ReactFlow/ReactFlowV9.js} +12 -7
- package/dist/esm/cmem/react-flow/ReactFlow/ReactFlowV9.js.map +1 -0
- package/dist/esm/cmem/react-flow/StickyNoteModal/StickyNoteModal.js +3 -3
- package/dist/esm/cmem/react-flow/StickyNoteModal/StickyNoteModal.js.map +1 -1
- package/dist/esm/cmem/react-flow/configuration/graph.js +12 -10
- package/dist/esm/cmem/react-flow/configuration/graph.js.map +1 -1
- package/dist/esm/cmem/react-flow/configuration/linking.js +2 -0
- package/dist/esm/cmem/react-flow/configuration/linking.js.map +1 -1
- package/dist/esm/cmem/react-flow/configuration/unspecified.js +2 -1
- package/dist/esm/cmem/react-flow/configuration/unspecified.js.map +1 -1
- package/dist/esm/cmem/react-flow/configuration/workflow.js +2 -0
- package/dist/esm/cmem/react-flow/configuration/workflow.js.map +1 -1
- package/dist/esm/cmem/react-flow/extensions/scrollOnDragHook.js +7 -1
- package/dist/esm/cmem/react-flow/extensions/scrollOnDragHook.js.map +1 -1
- package/dist/esm/cmem/react-flow/index.js +2 -1
- package/dist/esm/cmem/react-flow/index.js.map +1 -1
- package/dist/esm/common/index.js +5 -0
- package/dist/esm/common/index.js.map +1 -1
- package/dist/esm/common/utils/CssCustomProperties.js +9 -3
- package/dist/esm/common/utils/CssCustomProperties.js.map +1 -1
- package/dist/esm/common/utils/colorCalculateDistance.js +21 -0
- package/dist/esm/common/utils/colorCalculateDistance.js.map +1 -0
- package/dist/esm/common/utils/colorHash.js +140 -0
- package/dist/esm/common/utils/colorHash.js.map +1 -0
- package/dist/esm/common/utils/getColorConfiguration.js +37 -4
- package/dist/esm/common/utils/getColorConfiguration.js.map +1 -1
- package/dist/esm/components/AutoSuggestion/AutoSuggestion.js +9 -6
- package/dist/esm/components/AutoSuggestion/AutoSuggestion.js.map +1 -1
- package/dist/esm/components/AutoSuggestion/AutoSuggestionList.js +3 -0
- package/dist/esm/components/AutoSuggestion/AutoSuggestionList.js.map +1 -1
- package/dist/esm/components/AutoSuggestion/ExtendedCodeEditor.js.map +1 -1
- package/dist/esm/components/AutocompleteField/AutoCompleteField.js +15 -6
- package/dist/esm/components/AutocompleteField/AutoCompleteField.js.map +1 -1
- package/dist/esm/components/AutocompleteField/autoCompleteFieldUtils.js.map +1 -1
- package/dist/esm/components/Button/Button.js +11 -26
- package/dist/esm/components/Button/Button.js.map +1 -1
- package/dist/esm/components/Chat/ChatArea.js +1 -1
- package/dist/esm/components/Chat/ChatArea.js.map +1 -1
- package/dist/esm/components/Chat/ChatContent.js +4 -32
- package/dist/esm/components/Chat/ChatContent.js.map +1 -1
- package/dist/esm/components/Chat/ChatContentCollapsed.js +45 -0
- package/dist/esm/components/Chat/ChatContentCollapsed.js.map +1 -0
- package/dist/esm/components/Chat/ChatField.js +10 -4
- package/dist/esm/components/Chat/ChatField.js.map +1 -1
- package/dist/esm/components/Chat/index.js +1 -0
- package/dist/esm/components/Chat/index.js.map +1 -1
- package/dist/esm/components/CodeAutocompleteField/index.js +4 -1
- package/dist/esm/components/CodeAutocompleteField/index.js.map +1 -1
- package/dist/esm/components/Dialog/Modal.js +2 -1
- package/dist/esm/components/Dialog/Modal.js.map +1 -1
- package/dist/esm/components/Dialog/SimpleDialog.js +2 -1
- package/dist/esm/components/Dialog/SimpleDialog.js.map +1 -1
- package/dist/esm/components/Form/FieldItem.js +2 -19
- package/dist/esm/components/Form/FieldItem.js.map +1 -1
- package/dist/esm/components/Form/FieldSet.js +2 -20
- package/dist/esm/components/Form/FieldSet.js.map +1 -1
- package/dist/esm/components/Icon/BaseIcon.js +2 -2
- package/dist/esm/components/Icon/BaseIcon.js.map +1 -1
- package/dist/esm/components/Icon/IconButton.js.map +1 -1
- package/dist/esm/components/Icon/canonicalIconNames.js +2 -0
- package/dist/esm/components/Icon/canonicalIconNames.js.map +1 -1
- package/dist/esm/components/MultiSelect/MultiSelect.js +13 -27
- package/dist/esm/components/MultiSelect/MultiSelect.js.map +1 -1
- package/dist/esm/components/MultiSuggestField/index.js +2 -0
- package/dist/esm/components/MultiSuggestField/index.js.map +1 -0
- package/dist/esm/components/Notification/Notification.js +3 -23
- package/dist/esm/components/Notification/Notification.js.map +1 -1
- package/dist/esm/components/OverviewItem/OverviewItemList.js +1 -2
- package/dist/esm/components/OverviewItem/OverviewItemList.js.map +1 -1
- package/dist/esm/components/Spinner/Spinner.js +14 -8
- package/dist/esm/components/Spinner/Spinner.js.map +1 -1
- package/dist/esm/components/SuggestField/index.js +4 -1
- package/dist/esm/components/SuggestField/index.js.map +1 -1
- package/dist/esm/components/Table/Table.js.map +1 -1
- package/dist/esm/components/Table/TableContainer.js.map +1 -1
- package/dist/esm/components/Tabs/Tab.js +3 -2
- package/dist/esm/components/Tabs/Tab.js.map +1 -1
- package/dist/esm/components/TextField/SearchField.js.map +1 -1
- package/dist/esm/components/{ContentShrinker/ContentShrinker.js → TextReducer/TextReducer.js} +20 -23
- package/dist/esm/components/TextReducer/TextReducer.js.map +1 -0
- package/dist/esm/components/Tooltip/Tooltip.js +3 -1
- package/dist/esm/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/esm/components/Typography/OverflowText.js.map +1 -1
- package/dist/esm/components/VisualTour/VisualTour.js +213 -0
- package/dist/esm/components/VisualTour/VisualTour.js.map +1 -0
- package/dist/esm/components/index.js +6 -8
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/configuration/constants.js +2 -0
- package/dist/esm/configuration/constants.js.map +1 -1
- package/dist/esm/extensions/codemirror/CodeMirror.js +5 -4
- package/dist/esm/extensions/codemirror/CodeMirror.js.map +1 -1
- package/dist/esm/extensions/codemirror/hooks/useCodemirrorModeExtension.hooks.js +3 -0
- package/dist/esm/extensions/codemirror/hooks/useCodemirrorModeExtension.hooks.js.map +1 -1
- package/dist/esm/extensions/react-flow/edges/EdgeBezier.js +35 -0
- package/dist/esm/extensions/react-flow/edges/EdgeBezier.js.map +1 -0
- package/dist/esm/extensions/react-flow/edges/EdgeDefault.js +21 -3
- package/dist/esm/extensions/react-flow/edges/EdgeDefault.js.map +1 -1
- package/dist/esm/extensions/react-flow/edges/EdgeDefaultV12.js +24 -20
- package/dist/esm/extensions/react-flow/edges/EdgeDefaultV12.js.map +1 -1
- package/dist/esm/extensions/react-flow/edges/EdgeDefs.js +3 -0
- package/dist/esm/extensions/react-flow/edges/EdgeDefs.js.map +1 -1
- package/dist/esm/extensions/react-flow/edges/EdgeNew.js +45 -0
- package/dist/esm/extensions/react-flow/edges/EdgeNew.js.map +1 -0
- package/dist/esm/extensions/react-flow/edges/EdgeStep.js +19 -2
- package/dist/esm/extensions/react-flow/edges/EdgeStep.js.map +1 -1
- package/dist/esm/extensions/react-flow/edges/EdgeStraight.js +2 -0
- package/dist/esm/extensions/react-flow/edges/EdgeStraight.js.map +1 -0
- package/dist/esm/extensions/react-flow/edges/utils.js +27 -1
- package/dist/esm/extensions/react-flow/edges/utils.js.map +1 -1
- package/dist/esm/extensions/react-flow/handles/HandleDefault.js +16 -17
- package/dist/esm/extensions/react-flow/handles/HandleDefault.js.map +1 -1
- package/dist/esm/extensions/react-flow/index.js +6 -3
- package/dist/esm/extensions/react-flow/index.js.map +1 -1
- package/dist/esm/extensions/react-flow/markers/MarkerArrowClosedInverse.js +3 -0
- package/dist/esm/extensions/react-flow/markers/MarkerArrowClosedInverse.js.map +1 -1
- package/dist/esm/extensions/react-flow/markers/ReactFlowMarkers.js +17 -2
- package/dist/esm/extensions/react-flow/markers/ReactFlowMarkers.js.map +1 -1
- package/dist/esm/extensions/react-flow/minimap/MiniMap.js +22 -3
- package/dist/esm/extensions/react-flow/minimap/MiniMap.js.map +1 -1
- package/dist/esm/extensions/react-flow/minimap/MiniMapV12.js +36 -0
- package/dist/esm/extensions/react-flow/minimap/MiniMapV12.js.map +1 -0
- package/dist/esm/extensions/react-flow/nodes/NodeContent.js +84 -81
- package/dist/esm/extensions/react-flow/nodes/NodeContent.js.map +1 -1
- package/dist/esm/extensions/react-flow/nodes/NodeDefault.js +1 -1
- package/dist/esm/extensions/react-flow/nodes/NodeDefault.js.map +1 -1
- package/dist/esm/extensions/react-flow/nodes/nodeUtils.js +2 -1
- package/dist/esm/extensions/react-flow/nodes/nodeUtils.js.map +1 -1
- package/dist/esm/extensions/react-flow/versionsupport.js +15 -13
- package/dist/esm/extensions/react-flow/versionsupport.js.map +1 -1
- package/dist/esm/index.js +1 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/types/cmem/markdown/Markdown.d.ts +1 -8
- package/dist/types/cmem/react-flow/ReactFlow/ReactFlow.d.ts +38 -6
- package/dist/types/cmem/react-flow/ReactFlow/ReactFlowV12.d.ts +7 -0
- package/dist/types/cmem/react-flow/ReactFlow/ReactFlowV9.d.ts +7 -0
- package/dist/types/cmem/react-flow/configuration/graph.d.ts +9 -9
- package/dist/types/cmem/react-flow/configuration/linking.d.ts +6 -6
- package/dist/types/cmem/react-flow/configuration/unspecified.d.ts +3 -3
- package/dist/types/cmem/react-flow/configuration/workflow.d.ts +4 -4
- package/dist/types/cmem/react-flow/extensions/scrollOnDragHook.d.ts +19 -16
- package/dist/types/cmem/react-flow/index.d.ts +2 -1
- package/dist/types/common/index.d.ts +5 -1
- package/dist/types/common/utils/CssCustomProperties.d.ts +6 -6
- package/dist/types/common/utils/colorCalculateDistance.d.ts +12 -0
- package/dist/types/common/utils/colorHash.d.ts +29 -0
- package/dist/types/common/utils/getColorConfiguration.d.ts +1 -1
- package/dist/types/components/AutoSuggestion/AutoSuggestion.d.ts +7 -17
- package/dist/types/components/AutoSuggestion/AutoSuggestionList.d.ts +4 -4
- package/dist/types/components/AutoSuggestion/ExtendedCodeEditor.d.ts +0 -1
- package/dist/types/components/AutocompleteField/AutoCompleteField.d.ts +17 -10
- package/dist/types/components/AutocompleteField/autoCompleteFieldUtils.d.ts +2 -2
- package/dist/types/components/AutocompleteField/interfaces.d.ts +2 -4
- package/dist/types/components/Button/Button.d.ts +1 -21
- package/dist/types/components/Chat/ChatContent.d.ts +6 -18
- package/dist/types/components/Chat/ChatContentCollapsed.d.ts +28 -0
- package/dist/types/components/Chat/ChatField.d.ts +1 -1
- package/dist/types/components/Chat/index.d.ts +1 -0
- package/dist/types/components/CodeAutocompleteField/index.d.ts +5 -1
- package/dist/types/components/Dialog/Modal.d.ts +2 -1
- package/dist/types/components/Dialog/SimpleDialog.d.ts +0 -1
- package/dist/types/components/Form/FieldItem.d.ts +1 -25
- package/dist/types/components/Form/FieldSet.d.ts +1 -21
- package/dist/types/components/Icon/BaseIcon.d.ts +1 -10
- package/dist/types/components/Icon/IconButton.d.ts +2 -1
- package/dist/types/components/Icon/canonicalIconNames.d.ts +2 -0
- package/dist/types/components/MultiSelect/MultiSelect.d.ts +17 -33
- package/dist/types/components/MultiSuggestField/index.d.ts +1 -0
- package/dist/types/components/Notification/Notification.d.ts +1 -24
- package/dist/types/components/OverviewItem/OverviewItemList.d.ts +1 -6
- package/dist/types/components/Spinner/Spinner.d.ts +6 -5
- package/dist/types/components/SuggestField/index.d.ts +6 -2
- package/dist/types/components/Table/Table.d.ts +1 -1
- package/dist/types/components/Table/TableContainer.d.ts +2 -2
- package/dist/types/components/Tabs/Tab.d.ts +4 -4
- package/dist/types/components/TextField/SearchField.d.ts +1 -1
- package/dist/types/components/TextReducer/TextReducer.d.ts +28 -0
- package/dist/types/components/Tooltip/Tooltip.d.ts +2 -1
- package/dist/types/components/Typography/OverflowText.d.ts +0 -5
- package/dist/types/components/VisualTour/VisualTour.d.ts +39 -0
- package/dist/types/components/index.d.ts +6 -8
- package/dist/types/configuration/constants.d.ts +2 -0
- package/dist/types/extensions/codemirror/CodeMirror.d.ts +4 -5
- package/dist/types/extensions/codemirror/hooks/useCodemirrorModeExtension.hooks.d.ts +2 -0
- package/dist/types/extensions/react-flow/edges/EdgeBezier.d.ts +20 -0
- package/dist/types/extensions/react-flow/edges/EdgeDefault.d.ts +24 -8
- package/dist/types/extensions/react-flow/edges/EdgeDefaultV12.d.ts +16 -27
- package/dist/types/extensions/react-flow/edges/EdgeDefs.d.ts +3 -0
- package/dist/types/extensions/react-flow/edges/EdgeNew.d.ts +3 -0
- package/dist/types/extensions/react-flow/edges/EdgeStep.d.ts +23 -5
- package/dist/types/extensions/react-flow/edges/EdgeStraight.d.ts +1 -0
- package/dist/types/extensions/react-flow/edges/utils.d.ts +2 -0
- package/dist/types/extensions/react-flow/handles/HandleDefault.d.ts +12 -6
- package/dist/types/extensions/react-flow/index.d.ts +6 -2
- package/dist/types/extensions/react-flow/markers/MarkerArrowClosedInverse.d.ts +3 -0
- package/dist/types/extensions/react-flow/markers/ReactFlowMarkers.d.ts +21 -2
- package/dist/types/extensions/react-flow/minimap/MiniMap.d.ts +18 -7
- package/dist/types/extensions/react-flow/minimap/MiniMapV12.d.ts +10 -0
- package/dist/types/extensions/react-flow/nodes/NodeContent.d.ts +15 -12
- package/dist/types/extensions/react-flow/nodes/NodeDefault.d.ts +7 -3
- package/dist/types/extensions/react-flow/nodes/nodeUtils.d.ts +12 -5
- package/dist/types/extensions/react-flow/versionsupport.d.ts +8 -4
- package/dist/types/index.d.ts +1 -2
- package/package.json +2 -3
- package/src/_shame.scss +1 -1
- package/src/cmem/markdown/Markdown.stories.tsx +0 -1
- package/src/cmem/markdown/Markdown.tsx +4 -12
- package/src/cmem/react-flow/ReactFlow/ReactFlow.stories.tsx +472 -366
- package/src/cmem/react-flow/ReactFlow/ReactFlow.tsx +176 -72
- package/src/cmem/react-flow/ReactFlow/ReactFlowV12.tsx +56 -0
- package/src/cmem/react-flow/ReactFlow/ReactFlowV9.tsx +29 -0
- package/src/cmem/react-flow/StickyNoteModal/StickyNoteModal.tsx +0 -1
- package/src/cmem/react-flow/_canvas.scss +1 -1
- package/src/cmem/react-flow/_edges.scss +13 -13
- package/src/cmem/react-flow/_handles.scss +18 -18
- package/src/cmem/react-flow/_minimap.scss +19 -19
- package/src/cmem/react-flow/configuration/_colors-graph.scss +19 -36
- package/src/cmem/react-flow/configuration/_colors-linking.scss +14 -26
- package/src/cmem/react-flow/configuration/_colors-workflow.scss +15 -27
- package/src/cmem/react-flow/configuration/graph.ts +13 -11
- package/src/cmem/react-flow/configuration/linking.ts +3 -1
- package/src/cmem/react-flow/configuration/unspecified.ts +2 -1
- package/src/cmem/react-flow/configuration/workflow.ts +3 -1
- package/src/cmem/react-flow/extensions/scrollOnDragHook.ts +19 -21
- package/src/cmem/react-flow/index.ts +2 -1
- package/src/cmem/react-flow/nodes/_colors.scss +20 -20
- package/src/common/index.ts +5 -0
- package/src/common/scss/_color-functions.scss +111 -0
- package/src/common/utils/CssCustomProperties.ts +22 -15
- package/src/common/utils/colorCalculateDistance.ts +28 -0
- package/src/common/utils/colorHash.ts +195 -0
- package/src/common/utils/getColorConfiguration.ts +45 -7
- package/src/components/Accordion/accordion.scss +6 -5
- package/src/components/Application/_colors.scss +15 -0
- package/src/components/Application/_header.scss +7 -7
- package/src/components/Application/_toolbar.scss +5 -5
- package/src/components/Application/application.scss +1 -0
- package/src/components/Application/stories/Application.stories.tsx +2 -2
- package/src/components/Application/stories/ColorPalettes.stories.tsx +885 -0
- package/src/components/AutoSuggestion/AutoSuggestion.tsx +13 -28
- package/src/components/AutoSuggestion/AutoSuggestionList.tsx +12 -5
- package/src/components/AutoSuggestion/ExtendedCodeEditor.tsx +0 -2
- package/src/components/AutocompleteField/AutoCompleteField.tsx +19 -13
- package/src/components/AutocompleteField/autoCompleteFieldUtils.tsx +2 -2
- package/src/components/AutocompleteField/interfaces.ts +1 -5
- package/src/components/Button/Button.stories.tsx +0 -4
- package/src/components/Button/Button.tsx +10 -57
- package/src/components/Button/button.scss +17 -17
- package/src/components/Card/card.scss +13 -13
- package/src/components/Chat/ChatArea.tsx +2 -2
- package/src/components/Chat/ChatContent.tsx +9 -40
- package/src/components/Chat/ChatContentCollapsed.tsx +64 -0
- package/src/components/Chat/ChatField.tsx +18 -5
- package/src/components/Chat/index.ts +1 -0
- package/src/components/Chat/stories/ChatArea.stories.tsx +28 -3
- package/src/components/Chat/stories/ChatContent.stories.tsx +3 -2
- package/src/components/Chat/stories/ChatContentCollapsed.stories.tsx +24 -0
- package/src/components/Checkbox/checkbox.scss +2 -2
- package/src/components/CodeAutocompleteField/index.ts +8 -1
- package/src/components/ContentGroup/_contentgroup.scss +8 -2
- package/src/components/Dialog/Modal.tsx +5 -2
- package/src/components/Dialog/SimpleDialog.tsx +2 -1
- package/src/components/Dialog/dialog.scss +4 -1
- package/src/components/Form/FieldItem.tsx +3 -49
- package/src/components/Form/FieldSet.tsx +1 -45
- package/src/components/Form/form.scss +2 -2
- package/src/components/Icon/BaseIcon.tsx +0 -14
- package/src/components/Icon/IconButton.tsx +2 -1
- package/src/components/Icon/canonicalIconNames.tsx +2 -0
- package/src/components/Label/label.scss +1 -1
- package/src/components/Link/link.scss +1 -1
- package/src/components/Menu/menu.scss +4 -27
- package/src/components/MultiSelect/MultiSelect.tsx +23 -60
- package/src/components/MultiSuggestField/MultiSuggestField.stories.tsx +1 -1
- package/src/components/MultiSuggestField/index.ts +1 -0
- package/src/components/Notification/Notification.stories.tsx +4 -4
- package/src/components/Notification/Notification.tsx +3 -51
- package/src/components/Notification/notification.scss +3 -3
- package/src/components/OverviewItem/OverviewItemList.tsx +0 -7
- package/src/components/OverviewItem/overviewitem.scss +6 -9
- package/src/components/OverviewItem/stories/OverviewItemList.stories.tsx +0 -1
- package/src/components/Pagination/pagination.scss +1 -1
- package/src/components/Spinner/Spinner.tsx +19 -14
- package/src/components/Spinner/spinner.scss +5 -4
- package/src/components/Sticky/sticky.scss +7 -7
- package/src/components/SuggestField/index.ts +7 -1
- package/src/components/Table/Table.tsx +1 -2
- package/src/components/Table/TableContainer.tsx +2 -2
- package/src/components/Table/table.scss +34 -46
- package/src/components/Tabs/Tab.tsx +3 -2
- package/src/components/Tabs/stories/Tab.stories.tsx +1 -1
- package/src/components/Tabs/stories/TabPanel.stories.tsx +1 -1
- package/src/components/Tabs/stories/TabTitle.stories.tsx +1 -1
- package/src/components/Tag/tag.scss +20 -20
- package/src/components/TextField/SearchField.tsx +1 -6
- package/src/components/TextField/stories/SearchField.stories.tsx +0 -4
- package/src/components/TextField/textfield.scss +8 -8
- package/src/components/TextReducer/TextReducer.stories.tsx +47 -0
- package/src/components/TextReducer/TextReducer.tsx +98 -0
- package/src/components/Tooltip/Tooltip.test.tsx +63 -0
- package/src/components/Tooltip/Tooltip.tsx +7 -2
- package/src/components/Tooltip/tooltip.scss +7 -3
- package/src/components/Typography/OverflowText.tsx +1 -6
- package/src/components/Typography/typography.scss +1 -1
- package/src/components/VisualTour/VisualTour.tsx +381 -0
- package/src/components/VisualTour/stories/VisualTour.stories.tsx +112 -0
- package/src/components/VisualTour/stories/defaultTour.ts +42 -0
- package/src/components/VisualTour/visualTour.scss +83 -0
- package/src/components/index.scss +1 -0
- package/src/components/index.ts +6 -8
- package/src/configuration/_libprefix.scss +1 -0
- package/src/configuration/_palettes.scss +39 -0
- package/src/configuration/_variables.scss +21 -20
- package/src/configuration/constants.ts +2 -0
- package/src/extensions/codemirror/CodeMirror.tsx +7 -8
- package/src/extensions/codemirror/_codemirror.scss +2 -2
- package/src/extensions/codemirror/hooks/useCodemirrorModeExtension.hooks.ts +4 -0
- package/src/extensions/react-flow/_config.scss +7 -6
- package/src/extensions/react-flow/_react-flow.scss +1 -4
- package/src/extensions/react-flow/_react-flow_v12.scss +215 -3
- package/src/extensions/react-flow/edges/EdgeBezier.tsx +47 -0
- package/src/extensions/react-flow/edges/EdgeDefault.tsx +47 -11
- package/src/extensions/react-flow/edges/EdgeDefaultV12.tsx +68 -77
- package/src/extensions/react-flow/edges/EdgeDefs.tsx +3 -0
- package/src/extensions/react-flow/edges/EdgeNew.tsx +52 -0
- package/src/extensions/react-flow/edges/EdgeStep.tsx +41 -6
- package/src/extensions/react-flow/edges/EdgeStraight.tsx +1 -0
- package/src/extensions/react-flow/edges/_edges.scss +10 -4
- package/src/extensions/react-flow/edges/stories/EdgeDefault.stories.tsx +1 -1
- package/src/extensions/react-flow/edges/stories/EdgeDefaultV12.stories.tsx +22 -24
- package/src/extensions/react-flow/edges/utils.ts +19 -1
- package/src/extensions/react-flow/handles/HandleDefault.tsx +40 -35
- package/src/extensions/react-flow/handles/_handles.scss +2 -2
- package/src/extensions/react-flow/handles/stories/HandleDefault.stories.tsx +4 -6
- package/src/extensions/react-flow/index.ts +7 -5
- package/src/extensions/react-flow/markers/MarkerArrowClosedInverse.tsx +3 -0
- package/src/extensions/react-flow/markers/ReactFlowMarkers.tsx +58 -1
- package/src/extensions/react-flow/markers/_markers.scss +31 -0
- package/src/extensions/react-flow/minimap/MiniMap.stories.tsx +12 -18
- package/src/extensions/react-flow/minimap/MiniMap.tsx +44 -9
- package/src/extensions/react-flow/minimap/MiniMapV12.tsx +39 -0
- package/src/extensions/react-flow/minimap/_minimap.scss +14 -0
- package/src/extensions/react-flow/nodes/NodeContent.tsx +135 -113
- package/src/extensions/react-flow/nodes/NodeDefault.tsx +9 -5
- package/src/extensions/react-flow/nodes/_nodes.scss +29 -23
- package/src/extensions/react-flow/nodes/nodeUtils.tsx +15 -6
- package/src/extensions/react-flow/nodes/stories/NodeDefault.stories.tsx +3 -5
- package/src/extensions/react-flow/versionsupport.ts +17 -15
- package/src/extensions/uppy/_fileupload.scss +2 -2
- package/src/includes/blueprintjs/_colormap.scss +150 -0
- package/src/includes/blueprintjs/_variables.scss +39 -9
- package/src/includes/carbon-components/_variables.scss +23 -8
- package/src/index.scss +11 -0
- package/src/index.ts +1 -2
- package/dist/cjs/components/AutoSuggestion/index.js +0 -8
- package/dist/cjs/components/AutoSuggestion/index.js.map +0 -1
- package/dist/cjs/components/AutocompleteField/index.js.map +0 -1
- package/dist/cjs/components/CodeAutocompleteField/CodeAutocompleteField.js +0 -32
- package/dist/cjs/components/CodeAutocompleteField/CodeAutocompleteField.js.map +0 -1
- package/dist/cjs/components/ContentShrinker/ContentShrinker.js.map +0 -1
- package/dist/cjs/components/MultiSuggestField/MultiSuggestField.js +0 -37
- package/dist/cjs/components/MultiSuggestField/MultiSuggestField.js.map +0 -1
- package/dist/cjs/components/SuggestField/SuggestField.js +0 -38
- package/dist/cjs/components/SuggestField/SuggestField.js.map +0 -1
- package/dist/cjs/extensions/react-flow/edges/edgeTypes.js +0 -28
- package/dist/cjs/extensions/react-flow/edges/edgeTypes.js.map +0 -1
- package/dist/cjs/extensions/react-flow/nodes/nodeTypes.js +0 -18
- package/dist/cjs/extensions/react-flow/nodes/nodeTypes.js.map +0 -1
- package/dist/cjs/legacy-replacements/Button/AffirmativeButton.js +0 -25
- package/dist/cjs/legacy-replacements/Button/AffirmativeButton.js.map +0 -1
- package/dist/cjs/legacy-replacements/Button/Button.js +0 -65
- package/dist/cjs/legacy-replacements/Button/Button.js.map +0 -1
- package/dist/cjs/legacy-replacements/Button/DismissiveButton.js +0 -25
- package/dist/cjs/legacy-replacements/Button/DismissiveButton.js.map +0 -1
- package/dist/cjs/legacy-replacements/Button/DisruptiveButton.js +0 -25
- package/dist/cjs/legacy-replacements/Button/DisruptiveButton.js.map +0 -1
- package/dist/cjs/legacy-replacements/Checkbox/Checkbox.js +0 -58
- package/dist/cjs/legacy-replacements/Checkbox/Checkbox.js.map +0 -1
- package/dist/cjs/legacy-replacements/Radio/RadioButton.js +0 -51
- package/dist/cjs/legacy-replacements/Radio/RadioButton.js.map +0 -1
- package/dist/cjs/legacy-replacements/Tabs/Tabs.js +0 -34
- package/dist/cjs/legacy-replacements/Tabs/Tabs.js.map +0 -1
- package/dist/cjs/legacy-replacements/TextField/TextField.js +0 -75
- package/dist/cjs/legacy-replacements/TextField/TextField.js.map +0 -1
- package/dist/cjs/legacy-replacements/index.js +0 -22
- package/dist/cjs/legacy-replacements/index.js.map +0 -1
- package/dist/esm/components/AutoSuggestion/index.js +0 -4
- package/dist/esm/components/AutoSuggestion/index.js.map +0 -1
- package/dist/esm/components/AutocompleteField/index.js +0 -7
- package/dist/esm/components/AutocompleteField/index.js.map +0 -1
- package/dist/esm/components/CodeAutocompleteField/CodeAutocompleteField.js +0 -37
- package/dist/esm/components/CodeAutocompleteField/CodeAutocompleteField.js.map +0 -1
- package/dist/esm/components/ContentShrinker/ContentShrinker.js.map +0 -1
- package/dist/esm/components/MultiSuggestField/MultiSuggestField.js +0 -42
- package/dist/esm/components/MultiSuggestField/MultiSuggestField.js.map +0 -1
- package/dist/esm/components/SuggestField/SuggestField.js +0 -43
- package/dist/esm/components/SuggestField/SuggestField.js.map +0 -1
- package/dist/esm/extensions/react-flow/edges/edgeTypes.js +0 -25
- package/dist/esm/extensions/react-flow/edges/edgeTypes.js.map +0 -1
- package/dist/esm/extensions/react-flow/nodes/nodeTypes.js +0 -15
- package/dist/esm/extensions/react-flow/nodes/nodeTypes.js.map +0 -1
- package/dist/esm/legacy-replacements/Button/AffirmativeButton.js +0 -30
- package/dist/esm/legacy-replacements/Button/AffirmativeButton.js.map +0 -1
- package/dist/esm/legacy-replacements/Button/Button.js +0 -69
- package/dist/esm/legacy-replacements/Button/Button.js.map +0 -1
- package/dist/esm/legacy-replacements/Button/DismissiveButton.js.map +0 -1
- package/dist/esm/legacy-replacements/Button/DisruptiveButton.js +0 -30
- package/dist/esm/legacy-replacements/Button/DisruptiveButton.js.map +0 -1
- package/dist/esm/legacy-replacements/Checkbox/Checkbox.js +0 -63
- package/dist/esm/legacy-replacements/Checkbox/Checkbox.js.map +0 -1
- package/dist/esm/legacy-replacements/Radio/RadioButton.js +0 -56
- package/dist/esm/legacy-replacements/Radio/RadioButton.js.map +0 -1
- package/dist/esm/legacy-replacements/Tabs/Tabs.js +0 -39
- package/dist/esm/legacy-replacements/Tabs/Tabs.js.map +0 -1
- package/dist/esm/legacy-replacements/TextField/TextField.js +0 -82
- package/dist/esm/legacy-replacements/TextField/TextField.js.map +0 -1
- package/dist/esm/legacy-replacements/index.js +0 -10
- package/dist/esm/legacy-replacements/index.js.map +0 -1
- package/dist/types/components/AutoSuggestion/index.d.ts +0 -5
- package/dist/types/components/AutocompleteField/index.d.ts +0 -5
- package/dist/types/components/CodeAutocompleteField/CodeAutocompleteField.d.ts +0 -11
- package/dist/types/components/ContentShrinker/ContentShrinker.d.ts +0 -9
- package/dist/types/components/MultiSuggestField/MultiSuggestField.d.ts +0 -19
- package/dist/types/components/SuggestField/SuggestField.d.ts +0 -21
- package/dist/types/extensions/react-flow/edges/edgeTypes.d.ts +0 -16
- package/dist/types/extensions/react-flow/nodes/nodeTypes.d.ts +0 -13
- package/dist/types/legacy-replacements/Button/AffirmativeButton.d.ts +0 -3
- package/dist/types/legacy-replacements/Button/Button.d.ts +0 -6
- package/dist/types/legacy-replacements/Button/DismissiveButton.d.ts +0 -3
- package/dist/types/legacy-replacements/Button/DisruptiveButton.d.ts +0 -3
- package/dist/types/legacy-replacements/Checkbox/Checkbox.d.ts +0 -3
- package/dist/types/legacy-replacements/Radio/RadioButton.d.ts +0 -3
- package/dist/types/legacy-replacements/Tabs/Tabs.d.ts +0 -24
- package/dist/types/legacy-replacements/TextField/TextField.d.ts +0 -3
- package/dist/types/legacy-replacements/index.d.ts +0 -10
- package/src/components/AutoSuggestion/index.ts +0 -7
- package/src/components/AutocompleteField/AutoCompleteField.stories.tsx +0 -14
- package/src/components/AutocompleteField/index.ts +0 -6
- package/src/components/CodeAutocompleteField/CodeAutocompleteField.tsx +0 -22
- package/src/components/ContentShrinker/ContentShrinker.stories.tsx +0 -25
- package/src/components/ContentShrinker/ContentShrinker.tsx +0 -59
- package/src/components/MultiSuggestField/MultiSuggestField.tsx +0 -35
- package/src/components/SuggestField/SuggestField.tsx +0 -33
- package/src/extensions/react-flow/edges/edgeTypes.ts +0 -29
- package/src/extensions/react-flow/nodes/nodeTypes.ts +0 -15
- package/src/legacy-replacements/Button/AffirmativeButton.tsx +0 -12
- package/src/legacy-replacements/Button/Button.tsx +0 -80
- package/src/legacy-replacements/Button/DismissiveButton.tsx +0 -12
- package/src/legacy-replacements/Button/DisruptiveButton.tsx +0 -12
- package/src/legacy-replacements/Checkbox/Checkbox.tsx +0 -59
- package/src/legacy-replacements/Radio/RadioButton.tsx +0 -37
- package/src/legacy-replacements/Tabs/Tabs.stories.tsx +0 -36
- package/src/legacy-replacements/Tabs/Tabs.tsx +0 -69
- package/src/legacy-replacements/TextField/TextField.tsx +0 -89
- package/src/legacy-replacements/index.ts +0 -11
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { Position, useStoreState as
|
|
3
|
-
import { useStore as
|
|
4
|
-
import { useStore as useStoreFlowV12 } from "@xyflow/react";
|
|
2
|
+
import { Position, useStoreState as getStoreStateFlowV9 } from "react-flow-renderer";
|
|
3
|
+
import { useStore as getStoreStateFlowV12 } from "@xyflow/react";
|
|
5
4
|
import Color from "color";
|
|
6
5
|
import { Resizable } from "re-resizable";
|
|
7
6
|
|
|
@@ -9,24 +8,18 @@ import { intentClassName, IntentTypes } from "../../../common/Intent";
|
|
|
9
8
|
import { DepictionProps } from "../../../components";
|
|
10
9
|
import { ValidIconName } from "../../../components/Icon/canonicalIconNames";
|
|
11
10
|
import { CLASSPREFIX as eccgui } from "../../../configuration/constants";
|
|
12
|
-
import { Depiction,
|
|
13
|
-
import {
|
|
14
|
-
import { ReacFlowVersionSupportProps, useReactFlowVersion } from "../versionsupport";
|
|
11
|
+
import { Depiction, Icon, OverflowText } from "../../../index";
|
|
12
|
+
import { ReacFlowVersionSupportProps, ReactFlowVersions, useReactFlowVersion } from "../versionsupport";
|
|
15
13
|
|
|
14
|
+
import { HandleDefault, HandleDefaultProps } from "./../handles/HandleDefault";
|
|
16
15
|
import { NodeContentExtensionProps } from "./NodeContentExtension";
|
|
17
16
|
import { NodeDefaultProps } from "./NodeDefault";
|
|
18
17
|
import { NodeHighlightColor } from "./sharedTypes";
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
type NodeContentHandleV12Props = HandleV12Props;
|
|
25
|
-
|
|
26
|
-
export type NodeContentHandleProps =
|
|
27
|
-
| NodeContentHandleLegacyProps
|
|
28
|
-
| NodeContentHandleNextProps
|
|
29
|
-
| NodeContentHandleV12Props;
|
|
19
|
+
/**
|
|
20
|
+
* @deprecated (v26) use `HandleDefaultProps`
|
|
21
|
+
*/
|
|
22
|
+
export type NodeContentHandleProps = HandleDefaultProps;
|
|
30
23
|
|
|
31
24
|
export type NodeDimensions = {
|
|
32
25
|
width?: number;
|
|
@@ -92,7 +85,7 @@ interface NodeContentData<CONTENT_PROPS = any> {
|
|
|
92
85
|
footerContent?: React.ReactNode;
|
|
93
86
|
}
|
|
94
87
|
|
|
95
|
-
export interface NodeContentProps<
|
|
88
|
+
export interface NodeContentProps<CONTENT_PROPS = any>
|
|
96
89
|
extends NodeContentData,
|
|
97
90
|
ReacFlowVersionSupportProps,
|
|
98
91
|
Omit<React.HTMLAttributes<HTMLDivElement>, "content"> {
|
|
@@ -144,9 +137,9 @@ export interface NodeContentProps<NODE_DATA, NODE_CONTENT_PROPS = any>
|
|
|
144
137
|
* Set of defined buttons and icons that can be displayed.
|
|
145
138
|
*/
|
|
146
139
|
executionButtons?: (
|
|
147
|
-
adjustedContentProps: Partial<
|
|
148
|
-
setAdjustedContentProps: React.Dispatch<React.SetStateAction<Partial<
|
|
149
|
-
) => React.ReactElement<
|
|
140
|
+
adjustedContentProps: Partial<CONTENT_PROPS>,
|
|
141
|
+
setAdjustedContentProps: React.Dispatch<React.SetStateAction<Partial<CONTENT_PROPS>>>
|
|
142
|
+
) => React.ReactElement<React.HTMLAttributes<HTMLElement>>;
|
|
150
143
|
/**
|
|
151
144
|
* Can be used for permanent action button or context menu.
|
|
152
145
|
* It is displayed at the node header right to the label.
|
|
@@ -156,7 +149,7 @@ export interface NodeContentProps<NODE_DATA, NODE_CONTENT_PROPS = any>
|
|
|
156
149
|
* Array of property definition objects for `Handle` components that need to be created for the node.
|
|
157
150
|
* @see https://reactflow.dev/docs/api/handle/
|
|
158
151
|
*/
|
|
159
|
-
handles?:
|
|
152
|
+
handles?: HandleDefaultProps[];
|
|
160
153
|
/**
|
|
161
154
|
* Set the minimal number of handles on left or right side of the node to activate the recalculation of the minimal height of the node.
|
|
162
155
|
*/
|
|
@@ -169,7 +162,7 @@ export interface NodeContentProps<NODE_DATA, NODE_CONTENT_PROPS = any>
|
|
|
169
162
|
* Callback function to provide content for the tooltip on a node with a defined `minimalShape`.
|
|
170
163
|
* If you do not want a tooltip in this state you need to provide a callback that returns an empty value.
|
|
171
164
|
*/
|
|
172
|
-
getMinimalTooltipData?: (node: NodeDefaultProps<
|
|
165
|
+
getMinimalTooltipData?: (node: NodeDefaultProps<CONTENT_PROPS>) => NodeContentData;
|
|
173
166
|
/**
|
|
174
167
|
* Set if a handle is displayed even if it does not allow a connection to an edge.
|
|
175
168
|
*/
|
|
@@ -183,8 +176,11 @@ export interface NodeContentProps<NODE_DATA, NODE_CONTENT_PROPS = any>
|
|
|
183
176
|
*/
|
|
184
177
|
introductionTime?: number | IntroductionTime;
|
|
185
178
|
|
|
186
|
-
/**
|
|
187
|
-
|
|
179
|
+
/**
|
|
180
|
+
* Additional data stored in the node.
|
|
181
|
+
* @deprecated (v26) is not used anymore.
|
|
182
|
+
*/
|
|
183
|
+
businessData?: never;
|
|
188
184
|
|
|
189
185
|
// we need to forward some ReactFlowNodeProps here
|
|
190
186
|
|
|
@@ -227,37 +223,20 @@ export interface NodeContentProps<NODE_DATA, NODE_CONTENT_PROPS = any>
|
|
|
227
223
|
resizeMaxDimensions?: Partial<NodeDimensions>;
|
|
228
224
|
}
|
|
229
225
|
|
|
230
|
-
|
|
231
|
-
posdirection:
|
|
232
|
-
style: React.CSSProperties;
|
|
233
|
-
flowVersion: "legacy";
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
interface MemoHandlerNextProps extends HandleNextProps {
|
|
237
|
-
posdirection: string;
|
|
226
|
+
type MemoHandlerProps = HandleDefaultProps & {
|
|
227
|
+
posdirection: "left" | "top";
|
|
238
228
|
style: React.CSSProperties;
|
|
239
|
-
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
interface MemoHandlerV12Props extends HandleV12Props {
|
|
243
|
-
posdirection: string;
|
|
244
|
-
style: React.CSSProperties;
|
|
245
|
-
flowVersion: "v12";
|
|
246
|
-
}
|
|
229
|
+
};
|
|
247
230
|
|
|
248
|
-
type
|
|
231
|
+
type HandleStack = { [key: string]: HandleDefaultProps[] };
|
|
249
232
|
|
|
250
233
|
const defaultHandles = (flowVersion: ReacFlowVersionSupportProps["flowVersion"]): NodeContentHandleProps[] => {
|
|
251
234
|
switch (flowVersion) {
|
|
252
|
-
case "
|
|
253
|
-
return [{ type: "target" }, { type: "source" }] as NodeContentHandleLegacyProps[];
|
|
254
|
-
case "next":
|
|
255
|
-
return [{ type: "target" }, { type: "source" }] as NodeContentHandleNextProps[];
|
|
235
|
+
case "v9":
|
|
256
236
|
case "v12":
|
|
257
|
-
return [{ type: "target" }, { type: "source" }] as
|
|
258
|
-
|
|
237
|
+
return [{ type: "target" }, { type: "source" }] as HandleDefaultProps[];
|
|
259
238
|
default:
|
|
260
|
-
return [];
|
|
239
|
+
return [] as HandleDefaultProps[];
|
|
261
240
|
}
|
|
262
241
|
};
|
|
263
242
|
|
|
@@ -271,17 +250,17 @@ const getDefaultMinimalTooltipData = (node: any) => {
|
|
|
271
250
|
};
|
|
272
251
|
|
|
273
252
|
const addHandles = (
|
|
274
|
-
handles:
|
|
275
|
-
position:
|
|
276
|
-
posDirection:
|
|
277
|
-
isConnectable:
|
|
278
|
-
nodeStyle:
|
|
279
|
-
flowVersion:
|
|
253
|
+
handles: HandleStack,
|
|
254
|
+
position: MemoHandlerProps["position"],
|
|
255
|
+
posDirection: MemoHandlerProps["posdirection"],
|
|
256
|
+
isConnectable: MemoHandlerProps["isConnectable"],
|
|
257
|
+
nodeStyle: MemoHandlerProps["style"],
|
|
258
|
+
flowVersion: ReacFlowVersionSupportProps["flowVersion"] = ReactFlowVersions.V9
|
|
280
259
|
) => {
|
|
281
260
|
return handles[position].map((handle: HandleDefaultProps, idx: number) => {
|
|
282
261
|
// FIXME: remove? orig v12 change: return handles[position].map((handle: any, idx: any) => {
|
|
283
262
|
const { style = {}, ...otherHandleProps } = handle;
|
|
284
|
-
const styleAdditions:
|
|
263
|
+
const styleAdditions: MemoHandlerProps["style"] = {
|
|
285
264
|
color: nodeStyle.borderColor ?? undefined,
|
|
286
265
|
};
|
|
287
266
|
styleAdditions[posDirection] = (100 / (handles[position].length + 1)) * (idx + 1) + "%";
|
|
@@ -294,8 +273,10 @@ const addHandles = (
|
|
|
294
273
|
isConnectable: typeof handle.isConnectable !== "undefined" ? handle.isConnectable : isConnectable,
|
|
295
274
|
},
|
|
296
275
|
};
|
|
297
|
-
|
|
298
|
-
|
|
276
|
+
return (
|
|
277
|
+
<MemoHandler flowVersion={flowVersion} {...(handleProperties as MemoHandlerProps)} key={"handle" + idx} />
|
|
278
|
+
);
|
|
279
|
+
// FIXME: remove? orig v12 change: return <MemoHandler flowVersion={flowVersion} {...handleProperties} key={"handle" + idx} />;
|
|
299
280
|
});
|
|
300
281
|
};
|
|
301
282
|
|
|
@@ -317,11 +298,12 @@ const MemoHandler = React.memo(
|
|
|
317
298
|
}
|
|
318
299
|
);
|
|
319
300
|
|
|
301
|
+
const DEFAULT_RESIZE_DIRECTIONS: ResizeDirections = { bottom: true, right: true }
|
|
320
302
|
/**
|
|
321
303
|
* The `NodeContent` element manages the main view of how a node is displaying which content.
|
|
322
304
|
* This element cannot be used directly, all properties must be routed through the `data` property of an `elements` property item inside the `ReactFlow` container.
|
|
323
305
|
*/
|
|
324
|
-
export function NodeContent<CONTENT_PROPS =
|
|
306
|
+
export function NodeContent<CONTENT_PROPS = React.HTMLAttributes<HTMLElement>>({
|
|
325
307
|
flowVersion,
|
|
326
308
|
iconName,
|
|
327
309
|
depiction,
|
|
@@ -354,7 +336,7 @@ export function NodeContent<CONTENT_PROPS = any>({
|
|
|
354
336
|
// resizing
|
|
355
337
|
onNodeResize,
|
|
356
338
|
nodeDimensions,
|
|
357
|
-
resizeDirections =
|
|
339
|
+
resizeDirections = DEFAULT_RESIZE_DIRECTIONS,
|
|
358
340
|
resizeMaxDimensions,
|
|
359
341
|
// forwarded props
|
|
360
342
|
targetPosition = Position.Left,
|
|
@@ -366,11 +348,15 @@ export function NodeContent<CONTENT_PROPS = any>({
|
|
|
366
348
|
businessData,
|
|
367
349
|
// other props for DOM element
|
|
368
350
|
...otherDomProps
|
|
369
|
-
}: NodeContentProps<
|
|
351
|
+
}: NodeContentProps<CONTENT_PROPS>) {
|
|
370
352
|
const evaluateFlowVersion = useReactFlowVersion();
|
|
371
353
|
const flowVersionCheck = flowVersion || evaluateFlowVersion;
|
|
372
354
|
const [introductionDone, setIntroductionDone] = React.useState(false);
|
|
373
355
|
|
|
356
|
+
// ignore some properties for now (remove them later)
|
|
357
|
+
// if (otherDomProps.businessData) { delete otherDomProps.businessData }
|
|
358
|
+
// if (otherDomProps.getMinimalTooltipData) { delete otherDomProps.getMinimalTooltipData }
|
|
359
|
+
|
|
374
360
|
const { handles = defaultHandles(flowVersionCheck), ...otherProps } = otherDomProps;
|
|
375
361
|
|
|
376
362
|
const hasValidResizeDirection = resizeDirections.bottom || resizeDirections.right;
|
|
@@ -385,16 +371,13 @@ export function NodeContent<CONTENT_PROPS = any>({
|
|
|
385
371
|
if (isResizable)
|
|
386
372
|
try {
|
|
387
373
|
switch (flowVersionCheck) {
|
|
388
|
-
case "
|
|
389
|
-
[, , zoom] =
|
|
390
|
-
break;
|
|
391
|
-
case "next":
|
|
392
|
-
[, , zoom] = getStoreStateFlowNext((state) => state.transform);
|
|
374
|
+
case "v9":
|
|
375
|
+
[, , zoom] = getStoreStateFlowV9((state) => state.transform);
|
|
393
376
|
break;
|
|
394
377
|
case "v12":
|
|
395
378
|
// we are calling a hook here conditionally. Not recommended, by the flowversion check is
|
|
396
379
|
// is basically compile time determined. So we just do it.
|
|
397
|
-
[, , zoom] =
|
|
380
|
+
[, , zoom] = getStoreStateFlowV12((state) => state.transform);
|
|
398
381
|
break;
|
|
399
382
|
}
|
|
400
383
|
} catch (error) {
|
|
@@ -523,19 +506,23 @@ export function NodeContent<CONTENT_PROPS = any>({
|
|
|
523
506
|
return 0;
|
|
524
507
|
})
|
|
525
508
|
.forEach((handle) => {
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
509
|
+
let position: HandleDefaultProps["position"] = handle.position;
|
|
510
|
+
|
|
511
|
+
// force position regarding special configuration
|
|
512
|
+
if (handle.category === "configuration") {
|
|
513
|
+
position = Position.Top;
|
|
530
514
|
} else {
|
|
531
515
|
const handleType = handle as { type?: string };
|
|
532
516
|
if (handleType.type === "target") {
|
|
533
|
-
|
|
517
|
+
position = targetPosition;
|
|
534
518
|
}
|
|
535
519
|
if (handleType.type === "source") {
|
|
536
|
-
|
|
520
|
+
position = sourcePosition;
|
|
537
521
|
}
|
|
538
522
|
}
|
|
523
|
+
|
|
524
|
+
handle.position = position;
|
|
525
|
+
handleStack[position].push(handle);
|
|
539
526
|
});
|
|
540
527
|
}
|
|
541
528
|
const styleExpandDimensions: { [key: string]: string | number } = Object.create(null);
|
|
@@ -589,6 +576,7 @@ export function NodeContent<CONTENT_PROPS = any>({
|
|
|
589
576
|
}}
|
|
590
577
|
className={
|
|
591
578
|
`${eccgui}-graphviz__node` +
|
|
579
|
+
` ${eccgui}-graphviz__node--${flowVersionCheck}` +
|
|
592
580
|
` ${eccgui}-graphviz__node--${size}` +
|
|
593
581
|
` ${eccgui}-graphviz__node--minimal-${minimalShape}` +
|
|
594
582
|
(fullWidth ? ` ${eccgui}-graphviz__node--fullwidth` : "") +
|
|
@@ -686,10 +674,38 @@ export function NodeContent<CONTENT_PROPS = any>({
|
|
|
686
674
|
</section>
|
|
687
675
|
{!!handles && (
|
|
688
676
|
<>
|
|
689
|
-
{addHandles(
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
677
|
+
{addHandles(
|
|
678
|
+
handleStack,
|
|
679
|
+
Position.Top,
|
|
680
|
+
"left",
|
|
681
|
+
isConnectable,
|
|
682
|
+
style as MemoHandlerProps["style"],
|
|
683
|
+
flowVersionCheck
|
|
684
|
+
)}
|
|
685
|
+
{addHandles(
|
|
686
|
+
handleStack,
|
|
687
|
+
Position.Right,
|
|
688
|
+
"top",
|
|
689
|
+
isConnectable,
|
|
690
|
+
style as MemoHandlerProps["style"],
|
|
691
|
+
flowVersionCheck
|
|
692
|
+
)}
|
|
693
|
+
{addHandles(
|
|
694
|
+
handleStack,
|
|
695
|
+
Position.Bottom,
|
|
696
|
+
"left",
|
|
697
|
+
isConnectable,
|
|
698
|
+
style as MemoHandlerProps["style"],
|
|
699
|
+
flowVersionCheck
|
|
700
|
+
)}
|
|
701
|
+
{addHandles(
|
|
702
|
+
handleStack,
|
|
703
|
+
Position.Left,
|
|
704
|
+
"top",
|
|
705
|
+
isConnectable,
|
|
706
|
+
style as MemoHandlerProps["style"],
|
|
707
|
+
flowVersionCheck
|
|
708
|
+
)}
|
|
693
709
|
</>
|
|
694
710
|
)}
|
|
695
711
|
</>
|
|
@@ -719,53 +735,59 @@ export function NodeContent<CONTENT_PROPS = any>({
|
|
|
719
735
|
return validatedHeight;
|
|
720
736
|
};
|
|
721
737
|
|
|
738
|
+
const onResize = React.useCallback((_0, _1, _2, d) => {
|
|
739
|
+
if (nodeContentRef.current) {
|
|
740
|
+
const nextWidth = resizeDirections.right
|
|
741
|
+
? (width ?? originalSize.current.width ?? 0) + d.width
|
|
742
|
+
: undefined;
|
|
743
|
+
const nextHeight = resizeDirections.bottom
|
|
744
|
+
? (height ?? originalSize.current.height ?? 0) + d.height
|
|
745
|
+
: undefined;
|
|
746
|
+
if (nextWidth || nextHeight) {
|
|
747
|
+
const currentClassNames = nodeContentRef.current.classList;
|
|
748
|
+
currentClassNames.add("was-resized");
|
|
749
|
+
}
|
|
750
|
+
if (nextWidth) {
|
|
751
|
+
nodeContentRef.current.style.width = `${nextWidth}px`;
|
|
752
|
+
}
|
|
753
|
+
if (nextHeight) {
|
|
754
|
+
nodeContentRef.current.style.height = `${nextHeight}px`;
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
}, [resizeDirections, originalSize])
|
|
758
|
+
|
|
759
|
+
const onResizeStop = React.useCallback((_0, _1, _2, d) => {
|
|
760
|
+
const nextWidth = validateWidth((width ?? originalSize.current.width ?? 0) + d.width);
|
|
761
|
+
const nextHeight = validateHeight((height ?? originalSize.current.height ?? 0) + d.height);
|
|
762
|
+
setWidth(nextWidth);
|
|
763
|
+
setHeight(nextHeight);
|
|
764
|
+
if (onNodeResize) {
|
|
765
|
+
onNodeResize({
|
|
766
|
+
height: nextHeight,
|
|
767
|
+
width: nextWidth,
|
|
768
|
+
});
|
|
769
|
+
}
|
|
770
|
+
}, [onNodeResize])
|
|
771
|
+
|
|
772
|
+
const resizableSize = React.useMemo(() => ({ height: height ?? "auto", width: width ?? "auto" }), [height, width]);
|
|
773
|
+
const enableResize = React.useMemo(() => resizeDirections!.bottom && resizeDirections!.right ? { bottomRight: true } : resizeDirections, [resizeDirections]);
|
|
774
|
+
|
|
722
775
|
const resizableNode = () => {
|
|
723
|
-
const size = { height: height ?? "auto", width: width ?? "auto" };
|
|
724
776
|
return (
|
|
725
777
|
<Resizable
|
|
726
778
|
className={
|
|
727
779
|
`${eccgui}-graphviz__node__resizer` +
|
|
728
|
-
(resizeDirections
|
|
729
|
-
(resizeDirections
|
|
780
|
+
(resizeDirections!.right ? ` ${eccgui}-graphviz__node__resizer--right` : "") +
|
|
781
|
+
(resizeDirections!.bottom ? ` ${eccgui}-graphviz__node__resizer--bottom` : "")
|
|
730
782
|
}
|
|
731
783
|
handleWrapperClass={`${eccgui}-graphviz__node__resizer--cursorhandles` + " nodrag"}
|
|
732
|
-
size={
|
|
784
|
+
size={resizableSize}
|
|
733
785
|
maxHeight={resizeMaxDimensions?.height ?? undefined}
|
|
734
786
|
maxWidth={resizeMaxDimensions?.width ?? undefined}
|
|
735
|
-
enable={
|
|
787
|
+
enable={enableResize}
|
|
736
788
|
scale={zoom}
|
|
737
|
-
onResize={
|
|
738
|
-
|
|
739
|
-
const nextWidth = resizeDirections.right
|
|
740
|
-
? (width ?? originalSize.current.width ?? 0) + d.width
|
|
741
|
-
: undefined;
|
|
742
|
-
const nextHeight = resizeDirections.bottom
|
|
743
|
-
? (height ?? originalSize.current.height ?? 0) + d.height
|
|
744
|
-
: undefined;
|
|
745
|
-
if (nextWidth || nextHeight) {
|
|
746
|
-
const currentClassNames = nodeContentRef.current.classList;
|
|
747
|
-
currentClassNames.add("was-resized");
|
|
748
|
-
}
|
|
749
|
-
if (nextWidth) {
|
|
750
|
-
nodeContentRef.current.style.width = `${nextWidth}px`;
|
|
751
|
-
}
|
|
752
|
-
if (nextHeight) {
|
|
753
|
-
nodeContentRef.current.style.height = `${nextHeight}px`;
|
|
754
|
-
}
|
|
755
|
-
}
|
|
756
|
-
}}
|
|
757
|
-
onResizeStop={(_0, _1, _2, d) => {
|
|
758
|
-
const nextWidth = validateWidth((width ?? originalSize.current.width ?? 0) + d.width);
|
|
759
|
-
const nextHeight = validateHeight((height ?? originalSize.current.height ?? 0) + d.height);
|
|
760
|
-
setWidth(nextWidth);
|
|
761
|
-
setHeight(nextHeight);
|
|
762
|
-
if (onNodeResize) {
|
|
763
|
-
onNodeResize({
|
|
764
|
-
height: nextHeight,
|
|
765
|
-
width: nextWidth,
|
|
766
|
-
});
|
|
767
|
-
}
|
|
768
|
-
}}
|
|
789
|
+
onResize={onResize}
|
|
790
|
+
onResizeStop={onResizeStop}
|
|
769
791
|
>
|
|
770
792
|
{nodeContent}
|
|
771
793
|
</Resizable>
|
|
@@ -1,21 +1,25 @@
|
|
|
1
1
|
import React, { memo } from "react";
|
|
2
|
-
import { NodeProps as
|
|
2
|
+
import { NodeProps as ReactFlowNodeV9Props } from "react-flow-renderer";
|
|
3
|
+
import { NodeProps as ReactFlowNodeV12Props, Position } from "@xyflow/react";
|
|
3
4
|
|
|
4
5
|
import { Tooltip } from "../../../index";
|
|
5
6
|
import { ReacFlowVersionSupportProps, useReactFlowVersion } from "../versionsupport";
|
|
6
7
|
|
|
7
8
|
import { NodeContent, NodeContentProps } from "./NodeContent";
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
extends ReacFlowVersionSupportProps,
|
|
11
|
-
ReactFlowNodeProps {
|
|
10
|
+
interface NodeDefaultExtendedProps<CONTENT_PROPS = any> extends ReacFlowVersionSupportProps {
|
|
12
11
|
/**
|
|
13
12
|
* Contains all properties for our implementation of the React-Flow node.
|
|
14
13
|
* For details pls see the `NodeContent` element documentation.
|
|
15
14
|
*/
|
|
16
|
-
data: NodeContentProps<
|
|
15
|
+
data: NodeContentProps<CONTENT_PROPS>;
|
|
17
16
|
}
|
|
18
17
|
|
|
18
|
+
type NodeDefaultV9Props<CONTENT_PROPS = any> = NodeDefaultExtendedProps<CONTENT_PROPS> & ReactFlowNodeV9Props;
|
|
19
|
+
type NodeDefaultV12Props<CONTENT_PROPS = any> = NodeDefaultExtendedProps<CONTENT_PROPS> & Omit<ReactFlowNodeV12Props, "data">;
|
|
20
|
+
|
|
21
|
+
export type NodeDefaultProps<CONTENT_PROPS = any> = NodeDefaultV9Props<CONTENT_PROPS> | NodeDefaultV12Props<CONTENT_PROPS>;
|
|
22
|
+
|
|
19
23
|
/**
|
|
20
24
|
* The `NodeDefault` element manages the display of React-Flow nodes.
|
|
21
25
|
* This element cannot be used directly, it must be connected via a `nodeTypes` definition and all properties need to be routed through the `elements` property items inside the `ReactFlow` container.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
inset: -6 * $reactflow-node-border-width;
|
|
7
7
|
z-index: 0;
|
|
8
8
|
content: " ";
|
|
9
|
-
background-color: rgba($reactflow-edge-stroke-color-selected, 0.05);
|
|
9
|
+
background-color: eccgui-color-rgba($reactflow-edge-stroke-color-selected, 0.05);
|
|
10
10
|
border-color: $reactflow-edge-stroke-color-selected;
|
|
11
11
|
border-style: dotted;
|
|
12
12
|
border-width: 1px;
|
|
@@ -29,6 +29,12 @@
|
|
|
29
29
|
box-shadow: none;
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
+
|
|
33
|
+
&.selected,
|
|
34
|
+
&:focus,
|
|
35
|
+
&:focus-visible {
|
|
36
|
+
outline: none;
|
|
37
|
+
}
|
|
32
38
|
}
|
|
33
39
|
|
|
34
40
|
.#{$eccgui}-graphviz__node {
|
|
@@ -47,7 +53,7 @@
|
|
|
47
53
|
border-radius: $reactflow-node-border-radius;
|
|
48
54
|
|
|
49
55
|
&:hover {
|
|
50
|
-
box-shadow: 0 0 0 6 * $reactflow-node-border-width rgba($reactflow-edge-stroke-color-selected, 0.05);
|
|
56
|
+
box-shadow: 0 0 0 6 * $reactflow-node-border-width eccgui-color-rgba($reactflow-edge-stroke-color-selected, 0.05);
|
|
51
57
|
}
|
|
52
58
|
|
|
53
59
|
&.was-resized.is-resizable-vertical {
|
|
@@ -193,13 +199,13 @@
|
|
|
193
199
|
|
|
194
200
|
.#{$eccgui}-graphviz__node__header-label {
|
|
195
201
|
display: inline-flex;
|
|
196
|
-
flex-direction: column;
|
|
197
202
|
flex-grow: 1;
|
|
198
203
|
flex-shrink: 1;
|
|
204
|
+
flex-direction: column;
|
|
199
205
|
margin: 0 $eccgui-size-block-whitespace * 0.25;
|
|
200
206
|
overflow: hidden;
|
|
201
|
-
text-align: left;
|
|
202
207
|
text-overflow: ellipsis;
|
|
208
|
+
text-align: left;
|
|
203
209
|
white-space: nowrap;
|
|
204
210
|
}
|
|
205
211
|
|
|
@@ -242,24 +248,24 @@
|
|
|
242
248
|
|
|
243
249
|
.#{$eccgui}-graphviz__node__resizer--cursorhandles {
|
|
244
250
|
position: absolute;
|
|
245
|
-
height: 0;
|
|
246
|
-
width: 0;
|
|
247
|
-
bottom: 0;
|
|
248
251
|
right: 0;
|
|
249
|
-
|
|
252
|
+
bottom: 0;
|
|
250
253
|
display: none;
|
|
254
|
+
width: 0;
|
|
255
|
+
height: 0;
|
|
256
|
+
overflow: visible;
|
|
251
257
|
|
|
252
258
|
& > div {
|
|
253
|
-
overflow: visible;
|
|
254
|
-
z-index: 0 !important;
|
|
255
|
-
height: $reactflow-cursor-delimiter-offset * 3 !important;
|
|
256
|
-
width: $reactflow-cursor-delimiter-offset * 3 !important;
|
|
257
259
|
top: unset !important;
|
|
258
|
-
left: unset !important;
|
|
259
|
-
bottom: -1 * $reactflow-cursor-delimiter-offset !important;
|
|
260
260
|
right: -1 * $reactflow-cursor-delimiter-offset !important;
|
|
261
|
-
|
|
261
|
+
bottom: -1 * $reactflow-cursor-delimiter-offset !important;
|
|
262
|
+
left: unset !important;
|
|
263
|
+
z-index: 0 !important;
|
|
264
|
+
width: $reactflow-cursor-delimiter-offset * 3 !important;
|
|
265
|
+
height: $reactflow-cursor-delimiter-offset * 3 !important;
|
|
266
|
+
overflow: visible;
|
|
262
267
|
border-right: $reactflow-node-border-width solid $reactflow-node-border-color;
|
|
268
|
+
border-bottom: $reactflow-node-border-width solid $reactflow-node-border-color;
|
|
263
269
|
|
|
264
270
|
.#{$eccgui}-graphviz__node__resizer--right:not(.#{$eccgui}-graphviz__node__resizer--bottom) & {
|
|
265
271
|
bottom: 0 !important;
|
|
@@ -437,8 +443,8 @@
|
|
|
437
443
|
.#{$eccgui}-graphviz__node--introduction-runs {
|
|
438
444
|
animation-name: outline;
|
|
439
445
|
animation-duration: var(--node-introduction-time);
|
|
440
|
-
animation-play-state: running;
|
|
441
446
|
animation-timing-function: linear;
|
|
447
|
+
animation-play-state: running;
|
|
442
448
|
|
|
443
449
|
&[data-introduction-animation="landing"] {
|
|
444
450
|
animation-name: landing;
|
|
@@ -450,48 +456,48 @@
|
|
|
450
456
|
|
|
451
457
|
@keyframes landing {
|
|
452
458
|
0% {
|
|
453
|
-
filter: blur($eccgui-size-block-whitespace);
|
|
454
459
|
outline: solid 0 rgb(0 0 0 / 0%);
|
|
455
460
|
outline-offset: 0;
|
|
456
461
|
opacity: 0;
|
|
462
|
+
filter: blur($eccgui-size-block-whitespace);
|
|
457
463
|
transform: scale(2);
|
|
458
464
|
}
|
|
459
465
|
|
|
460
466
|
61% {
|
|
461
|
-
filter: blur(0);
|
|
462
467
|
outline: solid 0 rgb(0 0 0 / 39%);
|
|
463
468
|
outline-offset: 0;
|
|
464
469
|
opacity: 1;
|
|
470
|
+
filter: blur(0);
|
|
465
471
|
transform: scale(1);
|
|
466
472
|
}
|
|
467
473
|
|
|
468
474
|
100% {
|
|
469
|
-
filter: blur(0);
|
|
470
475
|
outline: solid $eccgui-size-block-whitespace rgb(0 0 0 / 0%);
|
|
471
476
|
outline-offset: 2 * $eccgui-size-block-whitespace;
|
|
472
477
|
opacity: 1;
|
|
478
|
+
filter: blur(0);
|
|
473
479
|
transform: scale(1);
|
|
474
480
|
}
|
|
475
481
|
}
|
|
476
482
|
|
|
477
483
|
@keyframes outline {
|
|
478
484
|
0% {
|
|
479
|
-
outline: solid 0 rgba($eccgui-color-accent, 0);
|
|
485
|
+
outline: solid 0 eccgui-color-rgba($eccgui-color-accent, 0);
|
|
480
486
|
outline-offset: 0;
|
|
481
487
|
}
|
|
482
488
|
|
|
483
489
|
9% {
|
|
484
|
-
outline: solid 0.5 * $eccgui-size-block-whitespace rgba($eccgui-color-accent, 0.39);
|
|
490
|
+
outline: solid 0.5 * $eccgui-size-block-whitespace eccgui-color-rgba($eccgui-color-accent, 0.39);
|
|
485
491
|
outline-offset: 0;
|
|
486
492
|
}
|
|
487
493
|
|
|
488
494
|
85% {
|
|
489
|
-
outline: solid 0.5 * $eccgui-size-block-whitespace rgba($eccgui-color-accent, 0.39);
|
|
495
|
+
outline: solid 0.5 * $eccgui-size-block-whitespace eccgui-color-rgba($eccgui-color-accent, 0.39);
|
|
490
496
|
outline-offset: 0;
|
|
491
497
|
}
|
|
492
498
|
|
|
493
499
|
100% {
|
|
494
|
-
outline: solid 0 rgba($eccgui-color-accent, 0);
|
|
500
|
+
outline: solid 0 eccgui-color-rgba($eccgui-color-accent, 0);
|
|
495
501
|
outline-offset: 2 * $eccgui-size-block-whitespace;
|
|
496
502
|
}
|
|
497
503
|
}
|
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
import { CSSProperties } from "react";
|
|
2
|
-
import {Node, XYPosition} from "react-flow-renderer";
|
|
2
|
+
import {Node as NodeV9, XYPosition as XYPositionV9} from "react-flow-renderer";
|
|
3
|
+
import {Node as NodeV12, XYPosition as XYPositionV12} from "@xyflow/react";
|
|
3
4
|
import Color from "color";
|
|
4
5
|
import {NodeDimensions} from "./NodeContent";
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
export interface StickyNote {
|
|
7
|
+
interface StickyNoteBase {
|
|
8
8
|
id: string;
|
|
9
9
|
content: string;
|
|
10
10
|
color: string;
|
|
11
|
-
position: XYPosition & NodeDimensions;
|
|
12
11
|
}
|
|
12
|
+
interface StickyNotePositionV9 {
|
|
13
|
+
position: XYPositionV9 & NodeDimensions;
|
|
14
|
+
}
|
|
15
|
+
interface StickyNotePositionV12 {
|
|
16
|
+
position: XYPositionV12 & NodeDimensions;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** A sticky note for display in the UI as returned from the backend. */
|
|
20
|
+
export type StickyNote = (StickyNoteBase & StickyNotePositionV9) | (StickyNoteBase & StickyNotePositionV12);
|
|
13
21
|
|
|
14
22
|
/**
|
|
15
23
|
* converts a react-flow node with
|
|
@@ -17,7 +25,7 @@ export interface StickyNote {
|
|
|
17
25
|
* @param node
|
|
18
26
|
* @returns {StickyNote}
|
|
19
27
|
*/
|
|
20
|
-
const transformNodeToStickyNode = (node:
|
|
28
|
+
const transformNodeToStickyNode = (node: NodeV9<any> | NodeV12<any>): StickyNote => {
|
|
21
29
|
return {
|
|
22
30
|
id: node.id,
|
|
23
31
|
content: node.data.businessData.stickyNote!,
|
|
@@ -41,7 +49,8 @@ const generateStyleWithColor = (color: string): CSSProperties => {
|
|
|
41
49
|
borderColor: color,
|
|
42
50
|
color: colorObj.isLight() ? "#000" : "#fff",
|
|
43
51
|
};
|
|
44
|
-
} catch
|
|
52
|
+
} catch {
|
|
53
|
+
// eslint-disable-next-line no-console
|
|
45
54
|
console.warn("Received invalid color for sticky note: " + color);
|
|
46
55
|
}
|
|
47
56
|
return style;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useState } from "react";
|
|
2
|
-
import { Elements } from "react-flow-renderer";
|
|
2
|
+
import { Elements, Node } from "react-flow-renderer";
|
|
3
3
|
import { Meta, StoryFn } from "@storybook/react";
|
|
4
4
|
|
|
5
5
|
import { ReactFlow } from "./../../../../cmem";
|
|
6
|
-
import { NodeContent } from "./../NodeContent";
|
|
7
6
|
import { NodeDefault } from "./../NodeDefault";
|
|
8
7
|
import { Default as NodeContentExample } from "./NodeContent.stories";
|
|
9
8
|
import { nodeTypes } from "./nodeTypes";
|
|
@@ -97,10 +96,9 @@ export default {
|
|
|
97
96
|
},
|
|
98
97
|
} as Meta<typeof NodeDefault>;
|
|
99
98
|
|
|
100
|
-
const NodeDefaultExample = (args:
|
|
99
|
+
const NodeDefaultExample = (args: Node) => {
|
|
101
100
|
const [reactflowInstance, setReactflowInstance] = useState(null);
|
|
102
101
|
const [elements, setElements] = useState([] as Elements);
|
|
103
|
-
//const [edgeTools, setEdgeTools] = useState<JSX.Element>(<></>);
|
|
104
102
|
|
|
105
103
|
useEffect(() => {
|
|
106
104
|
setElements([args] as Elements);
|
|
@@ -126,7 +124,7 @@ const NodeDefaultExample = (args: any) => {
|
|
|
126
124
|
);
|
|
127
125
|
};
|
|
128
126
|
|
|
129
|
-
const Template: StoryFn<typeof
|
|
127
|
+
const Template: StoryFn<typeof NodeDefaultExample> = (args) => <NodeDefaultExample {...args} /*some comment*/ />;
|
|
130
128
|
|
|
131
129
|
export const Default = Template.bind({});
|
|
132
130
|
Default.args = {
|