@eccenca/gui-elements 22.1.0-rc.0 → 23.0.0-rc.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 +41 -4
- package/dist/cjs/cmem/ActivityControl/ActivityControlWidget.js +13 -9
- package/dist/cjs/cmem/ActivityControl/ActivityControlWidget.js.map +1 -1
- package/dist/cjs/cmem/ActivityControl/ActivityExecutionErrorReportModal.js +23 -6
- package/dist/cjs/cmem/ActivityControl/ActivityExecutionErrorReportModal.js.map +1 -1
- package/dist/cjs/cmem/ActivityControl/SilkActivityControl.js +1 -1
- package/dist/cjs/cmem/ActivityControl/SilkActivityControl.js.map +1 -1
- package/dist/cjs/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.js +1 -1
- package/dist/cjs/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.js.map +1 -1
- package/dist/cjs/cmem/react-flow/configuration/graph.js +1 -6
- package/dist/cjs/cmem/react-flow/configuration/graph.js.map +1 -1
- package/dist/cjs/cmem/react-flow/configuration/linking.js +1 -6
- package/dist/cjs/cmem/react-flow/configuration/linking.js.map +1 -1
- package/dist/cjs/cmem/react-flow/configuration/workflow.js +1 -6
- package/dist/cjs/cmem/react-flow/configuration/workflow.js.map +1 -1
- package/dist/cjs/common/utils/stringUtils.js +7 -0
- package/dist/cjs/common/utils/stringUtils.js.map +1 -0
- package/dist/cjs/components/Application/ApplicationContent.js +1 -7
- package/dist/cjs/components/Application/ApplicationContent.js.map +1 -1
- package/dist/cjs/components/Application/ApplicationTitle.js +1 -7
- package/dist/cjs/components/Application/ApplicationTitle.js.map +1 -1
- package/dist/cjs/components/AutoSuggestion/AutoSuggestion.js +2 -1
- package/dist/cjs/components/AutoSuggestion/AutoSuggestion.js.map +1 -1
- package/dist/cjs/components/AutoSuggestion/SingleLineCodeEditor.js +3 -3
- package/dist/cjs/components/AutoSuggestion/SingleLineCodeEditor.js.map +1 -1
- package/dist/cjs/components/AutocompleteField/AutoCompleteField.js +6 -4
- package/dist/cjs/components/AutocompleteField/AutoCompleteField.js.map +1 -1
- package/dist/cjs/components/Breadcrumb/BreadcrumbItem.js +1 -1
- package/dist/cjs/components/Button/Button.js +1 -1
- package/dist/cjs/components/Button/Button.js.map +1 -1
- package/dist/cjs/components/Card/Card.js +18 -3
- package/dist/cjs/components/Card/Card.js.map +1 -1
- package/dist/cjs/components/Dialog/Modal.js +1 -1
- package/dist/cjs/components/Dialog/Modal.js.map +1 -1
- package/dist/cjs/components/Form/FieldItemRow.js +3 -4
- package/dist/cjs/components/Form/FieldItemRow.js.map +1 -1
- package/dist/cjs/components/Form/FieldSet.js +2 -2
- package/dist/cjs/components/Form/FieldSet.js.map +1 -1
- package/dist/cjs/components/Iframe/Iframe.js +1 -1
- package/dist/cjs/components/Iframe/Iframe.js.map +1 -1
- package/dist/cjs/components/MultiSelect/MultiSelect.js +34 -41
- package/dist/cjs/components/MultiSelect/MultiSelect.js.map +1 -1
- package/dist/cjs/components/Notification/Notification.js +8 -2
- package/dist/cjs/components/Notification/Notification.js.map +1 -1
- package/dist/cjs/components/OverviewItem/OverviewItemList.js +2 -2
- package/dist/cjs/components/OverviewItem/OverviewItemList.js.map +1 -1
- package/dist/cjs/components/Spinner/Spinner.js +2 -1
- package/dist/cjs/components/Spinner/Spinner.js.map +1 -1
- package/dist/cjs/components/Tabs/Tab.js +1 -2
- package/dist/cjs/components/Tabs/Tab.js.map +1 -1
- package/dist/cjs/components/Tabs/Tabs.js +1 -4
- package/dist/cjs/components/Tabs/Tabs.js.map +1 -1
- package/dist/cjs/components/Tag/TagList.js +2 -2
- package/dist/cjs/components/Tag/TagList.js.map +1 -1
- package/dist/cjs/components/Typography/HtmlContentBlock.js +6 -6
- package/dist/cjs/components/Typography/HtmlContentBlock.js.map +1 -1
- package/dist/cjs/components/Typography/classnames.js +2 -1
- package/dist/cjs/components/Typography/classnames.js.map +1 -1
- package/dist/cjs/extensions/codemirror/CodeMirror.js +59 -0
- package/dist/cjs/extensions/codemirror/CodeMirror.js.map +1 -0
- package/dist/cjs/extensions/index.js +15 -0
- package/dist/cjs/extensions/index.js.map +1 -0
- package/dist/cjs/extensions/react-flow/edges/EdgeDefault.js.map +1 -1
- package/dist/cjs/extensions/react-flow/edges/getSmoothStepPath.js +98 -0
- package/dist/cjs/extensions/react-flow/edges/getSmoothStepPath.js.map +1 -0
- package/dist/cjs/extensions/react-flow/edges/utils.js +21 -20
- package/dist/cjs/extensions/react-flow/edges/utils.js.map +1 -1
- package/dist/cjs/extensions/react-flow/minimap/MiniMap.js +1 -1
- package/dist/cjs/extensions/react-flow/minimap/MiniMap.js.map +1 -1
- package/dist/cjs/extensions/react-flow/nodes/NodeContent.js +6 -4
- package/dist/cjs/extensions/react-flow/nodes/NodeContent.js.map +1 -1
- package/dist/cjs/extensions/react-flow/nodes/NodeContentExtension.js +3 -2
- package/dist/cjs/extensions/react-flow/nodes/NodeContentExtension.js.map +1 -1
- package/dist/cjs/extensions/react-flow/nodes/NodeTools.js +11 -9
- package/dist/cjs/extensions/react-flow/nodes/NodeTools.js.map +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/{es5 → esm}/cmem/ActivityControl/ActivityControlTypes.js +0 -0
- package/dist/{es5 → esm}/cmem/ActivityControl/ActivityControlTypes.js.map +0 -0
- package/dist/{es5 → esm}/cmem/ActivityControl/ActivityControlWidget.js +15 -11
- package/dist/esm/cmem/ActivityControl/ActivityControlWidget.js.map +1 -0
- package/dist/{es5 → esm}/cmem/ActivityControl/ActivityExecutionErrorReportModal.js +21 -4
- package/dist/esm/cmem/ActivityControl/ActivityExecutionErrorReportModal.js.map +1 -0
- package/dist/{es5 → esm}/cmem/ActivityControl/SilkActivityControl.js +5 -5
- package/dist/{es5 → esm}/cmem/ActivityControl/SilkActivityControl.js.map +1 -1
- package/dist/esm/cmem/ActivityControl/index.js +4 -0
- package/dist/{es5 → esm}/cmem/ActivityControl/index.js.map +0 -0
- package/dist/{es5 → esm}/cmem/ContentBlobToggler/ContentBlobToggler.js +1 -1
- package/dist/{es5 → esm}/cmem/ContentBlobToggler/ContentBlobToggler.js.map +0 -0
- package/dist/{es5 → esm}/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.js +1 -1
- package/dist/{es5 → esm}/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.js.map +1 -1
- package/dist/esm/cmem/ContentBlobToggler/index.js +3 -0
- package/dist/{es5 → esm}/cmem/ContentBlobToggler/index.js.map +0 -0
- package/dist/{es5 → esm}/cmem/DateTimeDisplay/ElapsedDateTimeDisplay.js +0 -0
- package/dist/{es5 → esm}/cmem/DateTimeDisplay/ElapsedDateTimeDisplay.js.map +0 -0
- package/dist/{es5 → esm}/cmem/index.js +6 -6
- package/dist/{es5 → esm}/cmem/index.js.map +0 -0
- package/dist/{es5 → esm}/cmem/markdown/Markdown.js +2 -2
- package/dist/{es5 → esm}/cmem/markdown/Markdown.js.map +0 -0
- package/dist/{es5 → esm}/cmem/react-flow/ReactFlow/ReactFlow.js +4 -4
- package/dist/{es5 → esm}/cmem/react-flow/ReactFlow/ReactFlow.js.map +0 -0
- package/dist/{es5 → esm}/cmem/react-flow/configuration/graph.js +3 -4
- package/dist/esm/cmem/react-flow/configuration/graph.js.map +1 -0
- package/dist/{es5 → esm}/cmem/react-flow/configuration/linking.js +3 -4
- package/dist/esm/cmem/react-flow/configuration/linking.js.map +1 -0
- package/dist/{es5 → esm}/cmem/react-flow/configuration/unspecified.js +3 -3
- package/dist/{es5 → esm}/cmem/react-flow/configuration/unspecified.js.map +0 -0
- package/dist/{es5 → esm}/cmem/react-flow/configuration/workflow.js +3 -4
- package/dist/esm/cmem/react-flow/configuration/workflow.js.map +1 -0
- package/dist/{es5 → esm}/common/Intent/index.js +1 -1
- package/dist/{es5 → esm}/common/Intent/index.js.map +0 -0
- package/dist/{es5 → esm}/common/utils/openInNewTab.js +0 -0
- package/dist/{es5 → esm}/common/utils/openInNewTab.js.map +0 -0
- package/dist/esm/common/utils/stringUtils.js +3 -0
- package/dist/esm/common/utils/stringUtils.js.map +1 -0
- package/dist/{es5 → esm}/components/Accordion/Accordion.js +1 -1
- package/dist/{es5 → esm}/components/Accordion/Accordion.js.map +0 -0
- package/dist/{es5 → esm}/components/Accordion/AccordionItem.js +1 -1
- package/dist/{es5 → esm}/components/Accordion/AccordionItem.js.map +0 -0
- package/dist/{es5 → esm}/components/Application/ApplicationContainer.js +1 -1
- package/dist/{es5 → esm}/components/Application/ApplicationContainer.js.map +0 -0
- package/dist/{es5 → esm}/components/Application/ApplicationContent.js +2 -8
- package/dist/esm/components/Application/ApplicationContent.js.map +1 -0
- package/dist/{es5 → esm}/components/Application/ApplicationHeader.js +1 -1
- package/dist/{es5 → esm}/components/Application/ApplicationHeader.js.map +0 -0
- package/dist/{es5 → esm}/components/Application/ApplicationSidebarNavigation.js +1 -1
- package/dist/{es5 → esm}/components/Application/ApplicationSidebarNavigation.js.map +0 -0
- package/dist/{es5 → esm}/components/Application/ApplicationSidebarToggler.js +1 -1
- package/dist/{es5 → esm}/components/Application/ApplicationSidebarToggler.js.map +0 -0
- package/dist/{es5 → esm}/components/Application/ApplicationTitle.js +2 -8
- package/dist/esm/components/Application/ApplicationTitle.js.map +1 -0
- package/dist/{es5 → esm}/components/Application/ApplicationToolbar.js +1 -1
- package/dist/{es5 → esm}/components/Application/ApplicationToolbar.js.map +0 -0
- package/dist/{es5 → esm}/components/Application/ApplicationToolbarAction.js +1 -1
- package/dist/{es5 → esm}/components/Application/ApplicationToolbarAction.js.map +0 -0
- package/dist/{es5 → esm}/components/Application/ApplicationToolbarPanel.js +1 -1
- package/dist/{es5 → esm}/components/Application/ApplicationToolbarPanel.js.map +0 -0
- package/dist/{es5 → esm}/components/Application/ApplicationToolbarSection.js +1 -1
- package/dist/{es5 → esm}/components/Application/ApplicationToolbarSection.js.map +0 -0
- package/dist/{es5 → esm}/components/AutoSuggestion/AutoSuggestion.js +5 -4
- package/dist/esm/components/AutoSuggestion/AutoSuggestion.js.map +1 -0
- package/dist/{es5 → esm}/components/AutoSuggestion/AutoSuggestionList.js +1 -1
- package/dist/{es5 → esm}/components/AutoSuggestion/AutoSuggestionList.js.map +0 -0
- package/dist/{es5 → esm}/components/AutoSuggestion/SingleLineCodeEditor.js +3 -3
- package/dist/{es5 → esm}/components/AutoSuggestion/SingleLineCodeEditor.js.map +1 -1
- package/dist/{es5 → esm}/components/AutocompleteField/AutoCompleteField.js +8 -6
- package/dist/esm/components/AutocompleteField/AutoCompleteField.js.map +1 -0
- package/dist/{es5 → esm}/components/Breadcrumb/BreadcrumbItem.js +3 -3
- package/dist/{es5 → esm}/components/Breadcrumb/BreadcrumbItem.js.map +0 -0
- package/dist/{es5 → esm}/components/Breadcrumb/BreadcrumbList.js +2 -2
- package/dist/{es5 → esm}/components/Breadcrumb/BreadcrumbList.js.map +0 -0
- package/dist/{es5 → esm}/components/Button/Button.js +4 -4
- package/dist/{es5 → esm}/components/Button/Button.js.map +1 -1
- package/dist/{es5 → esm}/components/Card/Card.js +19 -4
- package/dist/esm/components/Card/Card.js.map +1 -0
- package/dist/{es5 → esm}/components/Card/CardActions.js +1 -1
- package/dist/{es5 → esm}/components/Card/CardActions.js.map +0 -0
- package/dist/{es5 → esm}/components/Card/CardActionsAux.js +1 -1
- package/dist/{es5 → esm}/components/Card/CardActionsAux.js.map +0 -0
- package/dist/{es5 → esm}/components/Card/CardContent.js +1 -1
- package/dist/{es5 → esm}/components/Card/CardContent.js.map +0 -0
- package/dist/{es5 → esm}/components/Card/CardHeader.js +5 -5
- package/dist/{es5 → esm}/components/Card/CardHeader.js.map +0 -0
- package/dist/{es5 → esm}/components/Card/CardOptions.js +2 -2
- package/dist/{es5 → esm}/components/Card/CardOptions.js.map +0 -0
- package/dist/{es5 → esm}/components/Card/CardTitle.js +2 -2
- package/dist/{es5 → esm}/components/Card/CardTitle.js.map +0 -0
- package/dist/esm/components/Card/index.js +9 -0
- package/dist/{es5 → esm}/components/Card/index.js.map +0 -0
- package/dist/{es5 → esm}/components/Checkbox/Checkbox.js +1 -1
- package/dist/{es5 → esm}/components/Checkbox/Checkbox.js.map +0 -0
- package/dist/{es5 → esm}/components/ContextOverlay/ContextMenu.js +4 -4
- package/dist/{es5 → esm}/components/ContextOverlay/ContextMenu.js.map +0 -0
- package/dist/{es5 → esm}/components/ContextOverlay/ContextOverlay.js +1 -1
- package/dist/{es5 → esm}/components/ContextOverlay/ContextOverlay.js.map +0 -0
- package/dist/{es5 → esm}/components/Dialog/AlertDialog.js +2 -2
- package/dist/{es5 → esm}/components/Dialog/AlertDialog.js.map +0 -0
- package/dist/{es5 → esm}/components/Dialog/Modal.js +3 -3
- package/dist/{es5 → esm}/components/Dialog/Modal.js.map +1 -1
- package/dist/{es5 → esm}/components/Dialog/SimpleDialog.js +4 -4
- package/dist/{es5 → esm}/components/Dialog/SimpleDialog.js.map +0 -0
- package/dist/{es5 → esm}/components/Form/FieldItem.js +3 -3
- package/dist/{es5 → esm}/components/Form/FieldItem.js.map +0 -0
- package/dist/esm/components/Form/FieldItemRow.js +34 -0
- package/dist/esm/components/Form/FieldItemRow.js.map +1 -0
- package/dist/{es5 → esm}/components/Form/FieldSet.js +15 -4
- package/dist/esm/components/Form/FieldSet.js.map +1 -0
- package/dist/{es5 → esm}/components/Grid/Grid.js +1 -1
- package/dist/{es5 → esm}/components/Grid/Grid.js.map +0 -0
- package/dist/{es5 → esm}/components/Grid/GridColumn.js +1 -1
- package/dist/{es5 → esm}/components/Grid/GridColumn.js.map +0 -0
- package/dist/{es5 → esm}/components/Grid/GridRow.js +1 -1
- package/dist/{es5 → esm}/components/Grid/GridRow.js.map +0 -0
- package/dist/{es5 → esm}/components/Icon/Icon.js +3 -3
- package/dist/{es5 → esm}/components/Icon/Icon.js.map +0 -0
- package/dist/{es5 → esm}/components/Icon/IconButton.js +3 -3
- package/dist/{es5 → esm}/components/Icon/IconButton.js.map +0 -0
- package/dist/{es5 → esm}/components/Icon/canonicalIconNames.js +0 -0
- package/dist/{es5 → esm}/components/Icon/canonicalIconNames.js.map +0 -0
- package/dist/{es5 → esm}/components/Iframe/Iframe.js +3 -3
- package/dist/{es5 → esm}/components/Iframe/Iframe.js.map +1 -1
- package/dist/{es5 → esm}/components/Iframe/IframeModal.js +4 -4
- package/dist/{es5 → esm}/components/Iframe/IframeModal.js.map +0 -0
- package/dist/{es5 → esm}/components/Label/Label.js +3 -3
- package/dist/{es5 → esm}/components/Label/Label.js.map +0 -0
- package/dist/{es5 → esm}/components/Link/Link.js +2 -2
- package/dist/{es5 → esm}/components/Link/Link.js.map +0 -0
- package/dist/{es5 → esm}/components/List/List.js +1 -1
- package/dist/{es5 → esm}/components/List/List.js.map +0 -0
- package/dist/{es5 → esm}/components/Menu/Menu.js +1 -1
- package/dist/{es5 → esm}/components/Menu/Menu.js.map +0 -0
- package/dist/{es5 → esm}/components/Menu/MenuDivider.js +1 -1
- package/dist/{es5 → esm}/components/Menu/MenuDivider.js.map +0 -0
- package/dist/{es5 → esm}/components/Menu/MenuItem.js +3 -3
- package/dist/{es5 → esm}/components/Menu/MenuItem.js.map +0 -0
- package/dist/{es5 → esm}/components/MultiSelect/MultiSelect.js +44 -55
- package/dist/esm/components/MultiSelect/MultiSelect.js.map +1 -0
- package/dist/{es5 → esm}/components/Notification/Notification.js +13 -6
- package/dist/esm/components/Notification/Notification.js.map +1 -0
- package/dist/{es5 → esm}/components/Notification/Toast.js +2 -2
- package/dist/{es5 → esm}/components/Notification/Toast.js.map +0 -0
- package/dist/{es5 → esm}/components/NumericInput/NumericInput.js +0 -0
- package/dist/{es5 → esm}/components/NumericInput/NumericInput.js.map +0 -0
- package/dist/{es5 → esm}/components/OverviewItem/OverviewItem.js +1 -1
- package/dist/{es5 → esm}/components/OverviewItem/OverviewItem.js.map +0 -0
- package/dist/{es5 → esm}/components/OverviewItem/OverviewItemActions.js +1 -1
- package/dist/{es5 → esm}/components/OverviewItem/OverviewItemActions.js.map +0 -0
- package/dist/{es5 → esm}/components/OverviewItem/OverviewItemDepiction.js +1 -1
- package/dist/{es5 → esm}/components/OverviewItem/OverviewItemDepiction.js.map +0 -0
- package/dist/{es5 → esm}/components/OverviewItem/OverviewItemDescription.js +1 -1
- package/dist/{es5 → esm}/components/OverviewItem/OverviewItemDescription.js.map +0 -0
- package/dist/{es5 → esm}/components/OverviewItem/OverviewItemLine.js +1 -1
- package/dist/{es5 → esm}/components/OverviewItem/OverviewItemLine.js.map +0 -0
- package/dist/{es5 → esm}/components/OverviewItem/OverviewItemList.js +3 -3
- package/dist/{es5 → esm}/components/OverviewItem/OverviewItemList.js.map +1 -1
- package/dist/esm/components/OverviewItem/index.js +8 -0
- package/dist/{es5 → esm}/components/OverviewItem/index.js.map +0 -0
- package/dist/{es5 → esm}/components/Pagination/Pagination.js +1 -1
- package/dist/{es5 → esm}/components/Pagination/Pagination.js.map +0 -0
- package/dist/{es5 → esm}/components/ProgressBar/ProgressBar.js +0 -0
- package/dist/{es5 → esm}/components/ProgressBar/ProgressBar.js.map +0 -0
- package/dist/{es5 → esm}/components/PropertyValuePair/PropertyName.js +2 -2
- package/dist/{es5 → esm}/components/PropertyValuePair/PropertyName.js.map +0 -0
- package/dist/{es5 → esm}/components/PropertyValuePair/PropertyValue.js +1 -1
- package/dist/{es5 → esm}/components/PropertyValuePair/PropertyValue.js.map +0 -0
- package/dist/{es5 → esm}/components/PropertyValuePair/PropertyValueList.js +1 -1
- package/dist/{es5 → esm}/components/PropertyValuePair/PropertyValueList.js.map +0 -0
- package/dist/{es5 → esm}/components/PropertyValuePair/PropertyValuePair.js +1 -1
- package/dist/{es5 → esm}/components/PropertyValuePair/PropertyValuePair.js.map +0 -0
- package/dist/esm/components/PropertyValuePair/index.js +6 -0
- package/dist/{es5 → esm}/components/PropertyValuePair/index.js.map +0 -0
- package/dist/{es5 → esm}/components/RadioButton/RadioButton.js +1 -1
- package/dist/{es5 → esm}/components/RadioButton/RadioButton.js.map +0 -0
- package/dist/{es5 → esm}/components/Separation/Divider.js +1 -1
- package/dist/{es5 → esm}/components/Separation/Divider.js.map +0 -0
- package/dist/{es5 → esm}/components/Separation/Spacing.js +1 -1
- package/dist/{es5 → esm}/components/Separation/Spacing.js.map +0 -0
- package/dist/{es5 → esm}/components/SimpleTable/TableContainer.js +1 -1
- package/dist/{es5 → esm}/components/SimpleTable/TableContainer.js.map +0 -0
- package/dist/{es5 → esm}/components/SimpleTable/index.js +1 -1
- package/dist/{es5 → esm}/components/SimpleTable/index.js.map +0 -0
- package/dist/{es5 → esm}/components/Spinner/Spinner.js +4 -3
- package/dist/esm/components/Spinner/Spinner.js.map +1 -0
- package/dist/{es5 → esm}/components/Structure/Section.js +1 -1
- package/dist/{es5 → esm}/components/Structure/Section.js.map +0 -0
- package/dist/{es5 → esm}/components/Structure/SectionHeader.js +1 -1
- package/dist/{es5 → esm}/components/Structure/SectionHeader.js.map +0 -0
- package/dist/{es5 → esm}/components/Structure/TitleMainsection.js +1 -1
- package/dist/{es5 → esm}/components/Structure/TitleMainsection.js.map +0 -0
- package/dist/{es5 → esm}/components/Structure/TitlePage.js +1 -1
- package/dist/{es5 → esm}/components/Structure/TitlePage.js.map +0 -0
- package/dist/{es5 → esm}/components/Structure/TitleSubsection.js +1 -1
- package/dist/{es5 → esm}/components/Structure/TitleSubsection.js.map +0 -0
- package/dist/{es5 → esm}/components/Switch/Switch.js +1 -1
- package/dist/{es5 → esm}/components/Switch/Switch.js.map +0 -0
- package/dist/{es5 → esm}/components/Tabs/Tab.js +3 -4
- package/dist/{es5 → esm}/components/Tabs/Tab.js.map +1 -1
- package/dist/{es5 → esm}/components/Tabs/TabTitle.js +2 -2
- package/dist/{es5 → esm}/components/Tabs/TabTitle.js.map +0 -0
- package/dist/{es5 → esm}/components/Tabs/Tabs.js +3 -6
- package/dist/esm/components/Tabs/Tabs.js.map +1 -0
- package/dist/{es5 → esm}/components/Tag/Tag.js +1 -1
- package/dist/{es5 → esm}/components/Tag/Tag.js.map +0 -0
- package/dist/{es5 → esm}/components/Tag/TagList.js +14 -3
- package/dist/esm/components/Tag/TagList.js.map +1 -0
- package/dist/{es5 → esm}/components/TextField/SearchField.js +4 -4
- package/dist/{es5 → esm}/components/TextField/SearchField.js.map +0 -0
- package/dist/{es5 → esm}/components/TextField/TextArea.js +1 -1
- package/dist/{es5 → esm}/components/TextField/TextArea.js.map +0 -0
- package/dist/{es5 → esm}/components/TextField/TextField.js +2 -2
- package/dist/{es5 → esm}/components/TextField/TextField.js.map +0 -0
- package/dist/{es5 → esm}/components/Toolbar/Toolbar.js +1 -1
- package/dist/{es5 → esm}/components/Toolbar/Toolbar.js.map +0 -0
- package/dist/{es5 → esm}/components/Toolbar/ToolbarSection.js +1 -1
- package/dist/{es5 → esm}/components/Toolbar/ToolbarSection.js.map +0 -0
- package/dist/{es5 → esm}/components/Tooltip/Tooltip.js +1 -1
- package/dist/{es5 → esm}/components/Tooltip/Tooltip.js.map +0 -0
- package/dist/{es5 → esm}/components/Typography/Highlighter.js +0 -0
- package/dist/{es5 → esm}/components/Typography/Highlighter.js.map +0 -0
- package/dist/esm/components/Typography/HtmlContentBlock.js +39 -0
- package/dist/esm/components/Typography/HtmlContentBlock.js.map +1 -0
- package/dist/{es5 → esm}/components/Typography/OverflowText.js +1 -1
- package/dist/{es5 → esm}/components/Typography/OverflowText.js.map +0 -0
- package/dist/{es5 → esm}/components/Typography/WhiteSpaceContainer.js +1 -1
- package/dist/{es5 → esm}/components/Typography/WhiteSpaceContainer.js.map +0 -0
- package/dist/{es5 → esm}/components/Typography/classnames.js +2 -1
- package/dist/{es5 → esm}/components/Typography/classnames.js.map +1 -1
- package/dist/{es5 → esm}/components/Workspace/WorkspaceContent.js +3 -3
- package/dist/{es5 → esm}/components/Workspace/WorkspaceContent.js.map +0 -0
- package/dist/{es5 → esm}/components/Workspace/WorkspaceHeader.js +1 -1
- package/dist/{es5 → esm}/components/Workspace/WorkspaceHeader.js.map +0 -0
- package/dist/{es5 → esm}/components/Workspace/WorkspaceMain.js +2 -2
- package/dist/{es5 → esm}/components/Workspace/WorkspaceMain.js.map +0 -0
- package/dist/{es5 → esm}/components/Workspace/WorkspaceSide.js +2 -2
- package/dist/{es5 → esm}/components/Workspace/WorkspaceSide.js.map +0 -0
- package/dist/{es5 → esm}/components/interfaces.js +0 -0
- package/dist/{es5 → esm}/components/interfaces.js.map +0 -0
- package/dist/{es5 → esm}/configuration/constants.js +0 -0
- package/dist/{es5 → esm}/configuration/constants.js.map +0 -0
- package/dist/esm/extensions/codemirror/CodeMirror.js +34 -0
- package/dist/esm/extensions/codemirror/CodeMirror.js.map +1 -0
- package/dist/esm/extensions/index.js +3 -0
- package/dist/esm/extensions/index.js.map +1 -0
- package/dist/{es5 → esm}/extensions/react-flow/edges/EdgeDefault.js +1 -1
- package/dist/{es5 → esm}/extensions/react-flow/edges/EdgeDefault.js.map +1 -1
- package/dist/{es5 → esm}/extensions/react-flow/edges/EdgeStep.js +2 -2
- package/dist/{es5 → esm}/extensions/react-flow/edges/EdgeStep.js.map +0 -0
- package/dist/{es5 → esm}/extensions/react-flow/edges/EdgeTools.js +2 -2
- package/dist/{es5 → esm}/extensions/react-flow/edges/EdgeTools.js.map +0 -0
- package/dist/{es5 → esm}/extensions/react-flow/edges/edgeTypes.js +2 -2
- package/dist/{es5 → esm}/extensions/react-flow/edges/edgeTypes.js.map +0 -0
- package/dist/esm/extensions/react-flow/edges/getSmoothStepPath.js +119 -0
- package/dist/esm/extensions/react-flow/edges/getSmoothStepPath.js.map +1 -0
- package/dist/{es5 → esm}/extensions/react-flow/edges/utils.js +21 -20
- package/dist/esm/extensions/react-flow/edges/utils.js.map +1 -0
- package/dist/{es5 → esm}/extensions/react-flow/handles/HandleContent.js +2 -2
- package/dist/{es5 → esm}/extensions/react-flow/handles/HandleContent.js.map +0 -0
- package/dist/{es5 → esm}/extensions/react-flow/handles/HandleDefault.js +1 -1
- package/dist/{es5 → esm}/extensions/react-flow/handles/HandleDefault.js.map +0 -0
- package/dist/esm/extensions/react-flow/index.js +12 -0
- package/dist/{es5 → esm}/extensions/react-flow/index.js.map +0 -0
- package/dist/{es5 → esm}/extensions/react-flow/minimap/MiniMap.js +1 -1
- package/dist/{es5 → esm}/extensions/react-flow/minimap/MiniMap.js.map +1 -1
- package/dist/{es5 → esm}/extensions/react-flow/minimap/utils.js +2 -2
- package/dist/{es5 → esm}/extensions/react-flow/minimap/utils.js.map +0 -0
- package/dist/{es5 → esm}/extensions/react-flow/nodes/NodeContent.js +10 -8
- package/dist/esm/extensions/react-flow/nodes/NodeContent.js.map +1 -0
- package/dist/{es5 → esm}/extensions/react-flow/nodes/NodeContentExtension.js +5 -4
- package/dist/esm/extensions/react-flow/nodes/NodeContentExtension.js.map +1 -0
- package/dist/{es5 → esm}/extensions/react-flow/nodes/NodeDefault.js +2 -2
- package/dist/{es5 → esm}/extensions/react-flow/nodes/NodeDefault.js.map +0 -0
- package/dist/{es5 → esm}/extensions/react-flow/nodes/NodeTools.js +14 -12
- package/dist/esm/extensions/react-flow/nodes/NodeTools.js.map +1 -0
- package/dist/{es5 → esm}/extensions/react-flow/nodes/nodeTypes.js +1 -1
- package/dist/{es5 → esm}/extensions/react-flow/nodes/nodeTypes.js.map +0 -0
- package/dist/esm/index.js +97 -0
- package/dist/{es5 → esm}/index.js.map +1 -1
- package/dist/{es5 → esm}/legacy-replacements/Button/AffirmativeButton.js +1 -1
- package/dist/{es5 → esm}/legacy-replacements/Button/AffirmativeButton.js.map +0 -0
- package/dist/{es5 → esm}/legacy-replacements/Button/Button.js +1 -1
- package/dist/{es5 → esm}/legacy-replacements/Button/Button.js.map +0 -0
- package/dist/{es5 → esm}/legacy-replacements/Button/DismissiveButton.js +1 -1
- package/dist/{es5 → esm}/legacy-replacements/Button/DismissiveButton.js.map +0 -0
- package/dist/{es5 → esm}/legacy-replacements/Button/DisruptiveButton.js +1 -1
- package/dist/{es5 → esm}/legacy-replacements/Button/DisruptiveButton.js.map +0 -0
- package/dist/{es5 → esm}/legacy-replacements/Checkbox/Checkbox.js +1 -1
- package/dist/{es5 → esm}/legacy-replacements/Checkbox/Checkbox.js.map +0 -0
- package/dist/{es5 → esm}/legacy-replacements/Radio/RadioButton.js +1 -1
- package/dist/{es5 → esm}/legacy-replacements/Radio/RadioButton.js.map +0 -0
- package/dist/{es5 → esm}/legacy-replacements/Tabs/Tabs.js +1 -1
- package/dist/{es5 → esm}/legacy-replacements/Tabs/Tabs.js.map +0 -0
- package/dist/{es5 → esm}/legacy-replacements/TextField/TextField.js +4 -4
- package/dist/{es5 → esm}/legacy-replacements/TextField/TextField.js.map +0 -0
- package/dist/{es5 → esm}/legacy-replacements/index.js +9 -9
- package/dist/{es5 → esm}/legacy-replacements/index.js.map +0 -0
- package/dist/{es5 → esm}/package.json +0 -0
- package/dist/types/cmem/ActivityControl/ActivityControlWidget.d.ts +9 -0
- package/dist/types/cmem/ActivityControl/SilkActivityControl.d.ts +2 -0
- package/dist/types/cmem/react-flow/configuration/graph.d.ts +1 -2
- package/dist/types/cmem/react-flow/configuration/linking.d.ts +1 -2
- package/dist/types/cmem/react-flow/configuration/workflow.d.ts +1 -2
- package/dist/types/common/utils/stringUtils.d.ts +2 -0
- package/dist/types/components/AutoSuggestion/SingleLineCodeEditor.d.ts +1 -1
- package/dist/types/components/Card/Card.d.ts +9 -4
- package/dist/types/components/Form/FieldItemRow.d.ts +1 -0
- package/dist/types/components/MultiSelect/MultiSelect.d.ts +17 -10
- package/dist/types/components/Notification/Notification.d.ts +55 -2
- package/dist/types/components/OverviewItem/OverviewItemList.d.ts +1 -1
- package/dist/types/components/Spinner/Spinner.d.ts +1 -1
- package/dist/types/components/Typography/HtmlContentBlock.d.ts +15 -5
- package/dist/types/components/Typography/classnames.d.ts +1 -0
- package/dist/types/extensions/codemirror/CodeMirror.d.ts +35 -0
- package/dist/types/extensions/index.d.ts +2 -0
- package/dist/types/extensions/react-flow/edges/getSmoothStepPath.d.ts +18 -0
- package/dist/types/extensions/react-flow/nodes/NodeContent.d.ts +8 -2
- package/dist/types/extensions/react-flow/nodes/NodeContentExtension.d.ts +5 -1
- package/dist/types/extensions/react-flow/nodes/NodeTools.d.ts +7 -1
- package/dist/types/index.d.ts +2 -4
- package/package.json +29 -19
- package/src/cmem/ActivityControl/ActivityControlWidget.stories.tsx +6 -6
- package/src/cmem/ActivityControl/ActivityControlWidget.tsx +27 -14
- package/src/cmem/ActivityControl/ActivityExecutionErrorReportModal.tsx +11 -3
- package/src/cmem/ActivityControl/SilkActivityControl.tsx +5 -1
- package/src/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.tsx +1 -1
- package/src/cmem/react-flow/_nodes.scss +12 -6
- package/src/cmem/react-flow/configuration/_colors-graph.scss +35 -0
- package/src/cmem/react-flow/configuration/_colors-linking.scss +29 -0
- package/src/cmem/react-flow/configuration/_colors-workflow.scss +22 -0
- package/src/cmem/react-flow/configuration/_colors.scss +3 -3
- package/src/cmem/react-flow/configuration/graph.ts +0 -2
- package/src/cmem/react-flow/configuration/linking.ts +0 -2
- package/src/cmem/react-flow/configuration/workflow.ts +0 -2
- package/src/common/utils/CssCustomProperties.ts +123 -0
- package/src/common/utils/getColorConfiguration.ts +21 -0
- package/src/common/utils/stringUtils.ts +2 -0
- package/src/components/Accordion/accordion.scss +8 -2
- package/src/components/Application/ApplicationContent.tsx +0 -5
- package/src/components/Application/ApplicationTitle.tsx +0 -5
- package/src/components/AutoSuggestion/AutoSuggestion.tsx +2 -1
- package/src/components/AutoSuggestion/SingleLineCodeEditor.tsx +3 -3
- package/src/components/AutocompleteField/AutoCompleteField.tsx +6 -4
- package/src/components/Breadcrumb/BreadcrumbItem.tsx +5 -5
- package/src/components/Breadcrumb/BreadcrumbList.tsx +1 -1
- package/src/components/Button/Button.stories.tsx +1 -1
- package/src/components/Button/Button.tsx +1 -1
- package/src/components/Card/Card.tsx +23 -4
- package/src/components/Card/card.scss +4 -0
- package/src/components/Checkbox/checkbox.scss +4 -0
- package/src/components/Dialog/Modal.tsx +1 -1
- package/src/components/Form/FieldItem.tsx +3 -3
- package/src/components/Form/FieldItemRow.tsx +3 -5
- package/src/components/Form/FieldSet.tsx +1 -0
- package/src/components/Icon/IconButton.tsx +2 -2
- package/src/components/Iframe/Iframe.tsx +1 -1
- package/src/components/Menu/MenuItem.tsx +1 -1
- package/src/components/MultiSelect/MultiSelect.stories.tsx +15 -7
- package/src/components/MultiSelect/MultiSelect.tsx +65 -62
- package/src/components/Notification/Notification.stories.tsx +82 -0
- package/src/components/Notification/Notification.tsx +62 -4
- package/src/components/Notification/notification.scss +2 -1
- package/src/components/OverviewItem/OverviewItemList.tsx +3 -3
- package/src/components/RadioButton/radiobutton.scss +4 -0
- package/src/components/Spinner/Spinner.tsx +2 -1
- package/src/components/Switch/switch.scss +1 -0
- package/src/components/Tabs/Tab.tsx +1 -2
- package/src/components/Tabs/Tabs.tsx +1 -5
- package/src/components/Tabs/stories/Tabs.stories.tsx +3 -3
- package/src/components/Tag/TagList.tsx +1 -0
- package/src/components/Tag/tag.scss +1 -1
- package/src/components/Toolbar/toolbar.scss +1 -1
- package/src/components/Typography/HtmlContentBlock.tsx +27 -4
- package/src/components/Typography/classnames.ts +1 -0
- package/src/components/Typography/typography.scss +8 -0
- package/src/extensions/_index.scss +5 -0
- package/src/extensions/codemirror/CodeMirror.stories.tsx +26 -0
- package/src/extensions/codemirror/CodeMirror.tsx +82 -0
- package/src/extensions/codemirror/_codemirror.scss +31 -0
- package/src/extensions/index.ts +2 -0
- package/src/extensions/react-flow/_react-flow.scss +4 -0
- package/src/extensions/react-flow/edges/EdgeDefault.tsx +0 -1
- package/src/extensions/react-flow/edges/getSmoothStepPath.ts +118 -0
- package/src/extensions/react-flow/edges/utils.ts +21 -29
- package/src/extensions/react-flow/minimap/MiniMap.tsx +1 -1
- package/src/extensions/react-flow/nodes/NodeContent.tsx +13 -7
- package/src/extensions/react-flow/nodes/NodeContentExtension.tsx +6 -0
- package/src/extensions/react-flow/nodes/NodeTools.tsx +25 -9
- package/src/extensions/react-flow/nodes/_nodes.scss +31 -12
- package/src/extensions/react-flow/nodes/stories/NodeContent.stories.tsx +10 -1
- package/src/extensions/react-flow/nodes/stories/NodeContentExtension.stories.tsx +23 -0
- package/src/index.scss +1 -4
- package/src/index.ts +4 -4
- package/dist/cjs/cmem/react-flow/configuration/_colors-graph.module.scss +0 -35
- package/dist/cjs/cmem/react-flow/configuration/_colors-linking.module.scss +0 -29
- package/dist/cjs/cmem/react-flow/configuration/_colors-workflow.module.scss +0 -22
- package/dist/es5/cmem/ActivityControl/ActivityControlWidget.js.map +0 -1
- package/dist/es5/cmem/ActivityControl/ActivityExecutionErrorReportModal.js.map +0 -1
- package/dist/es5/cmem/ActivityControl/index.js +0 -4
- package/dist/es5/cmem/ContentBlobToggler/index.js +0 -3
- package/dist/es5/cmem/react-flow/configuration/_colors-graph.module.scss +0 -35
- package/dist/es5/cmem/react-flow/configuration/_colors-linking.module.scss +0 -29
- package/dist/es5/cmem/react-flow/configuration/_colors-workflow.module.scss +0 -22
- package/dist/es5/cmem/react-flow/configuration/graph.js.map +0 -1
- package/dist/es5/cmem/react-flow/configuration/linking.js.map +0 -1
- package/dist/es5/cmem/react-flow/configuration/workflow.js.map +0 -1
- package/dist/es5/components/Application/ApplicationContent.js.map +0 -1
- package/dist/es5/components/Application/ApplicationTitle.js.map +0 -1
- package/dist/es5/components/AutoSuggestion/AutoSuggestion.js.map +0 -1
- package/dist/es5/components/AutocompleteField/AutoCompleteField.js.map +0 -1
- package/dist/es5/components/Card/Card.js.map +0 -1
- package/dist/es5/components/Card/index.js +0 -9
- package/dist/es5/components/Form/FieldItemRow.js +0 -24
- package/dist/es5/components/Form/FieldItemRow.js.map +0 -1
- package/dist/es5/components/Form/FieldSet.js.map +0 -1
- package/dist/es5/components/MultiSelect/MultiSelect.js.map +0 -1
- package/dist/es5/components/Notification/Notification.js.map +0 -1
- package/dist/es5/components/OverviewItem/index.js +0 -8
- package/dist/es5/components/PropertyValuePair/index.js +0 -6
- package/dist/es5/components/Spinner/Spinner.js.map +0 -1
- package/dist/es5/components/Tabs/Tabs.js.map +0 -1
- package/dist/es5/components/Tag/TagList.js.map +0 -1
- package/dist/es5/components/Typography/HtmlContentBlock.js +0 -30
- package/dist/es5/components/Typography/HtmlContentBlock.js.map +0 -1
- package/dist/es5/extensions/react-flow/edges/utils.js.map +0 -1
- package/dist/es5/extensions/react-flow/index.js +0 -12
- package/dist/es5/extensions/react-flow/nodes/NodeContent.js.map +0 -1
- package/dist/es5/extensions/react-flow/nodes/NodeContentExtension.js.map +0 -1
- package/dist/es5/extensions/react-flow/nodes/NodeTools.js.map +0 -1
- package/dist/es5/index.js +0 -99
- package/src/cmem/react-flow/configuration/_colors-graph.module.scss +0 -35
- package/src/cmem/react-flow/configuration/_colors-linking.module.scss +0 -29
- package/src/cmem/react-flow/configuration/_colors-workflow.module.scss +0 -22
|
@@ -2,15 +2,34 @@ import React from "react";
|
|
|
2
2
|
import { CLASSPREFIX as eccgui } from "../../configuration/constants";
|
|
3
3
|
import * as TypographyClassNames from "./classnames";
|
|
4
4
|
|
|
5
|
+
// FIXME: CMEM-3742: comment + add story
|
|
6
|
+
|
|
7
|
+
export interface HtmlContentBlockProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
8
|
+
className?: string;
|
|
9
|
+
small?: boolean;
|
|
10
|
+
/** currently not supported */
|
|
11
|
+
large?: boolean;
|
|
12
|
+
/** currently not supported */
|
|
13
|
+
muted ?: boolean;
|
|
14
|
+
/** currently not supported */
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
linebreakForced?: boolean;
|
|
17
|
+
linebreakPrevented?: boolean;
|
|
18
|
+
noScrollbarsOnChildren?: boolean;
|
|
19
|
+
}
|
|
20
|
+
|
|
5
21
|
function HtmlContentBlock({
|
|
6
22
|
className = "",
|
|
7
23
|
children,
|
|
8
24
|
small = false,
|
|
9
|
-
large = false,
|
|
10
|
-
muted = false,
|
|
11
|
-
disabled = false,
|
|
25
|
+
large = false,
|
|
26
|
+
muted = false,
|
|
27
|
+
disabled = false,
|
|
28
|
+
linebreakForced = false,
|
|
29
|
+
linebreakPrevented = false,
|
|
30
|
+
noScrollbarsOnChildren = false,
|
|
12
31
|
...otherProps
|
|
13
|
-
}:
|
|
32
|
+
}: HtmlContentBlockProps) {
|
|
14
33
|
return (
|
|
15
34
|
<div
|
|
16
35
|
className={
|
|
@@ -19,8 +38,12 @@ function HtmlContentBlock({
|
|
|
19
38
|
(small ? " " + TypographyClassNames.SMALL : "") +
|
|
20
39
|
(large ? " " + TypographyClassNames.LARGE : "") +
|
|
21
40
|
(muted ? " " + TypographyClassNames.MUTED : "") +
|
|
41
|
+
(linebreakForced ? " " + TypographyClassNames.FORCELINEBREAK : "") +
|
|
42
|
+
(linebreakPrevented ? " " + TypographyClassNames.PREVENTLINEBREAK : "") +
|
|
43
|
+
(noScrollbarsOnChildren ? " " + TypographyClassNames.NOSCROLLBARSONCHILDREN : "") +
|
|
22
44
|
(disabled ? " " + TypographyClassNames.DISABLED : "")
|
|
23
45
|
}
|
|
46
|
+
{...otherProps}
|
|
24
47
|
>
|
|
25
48
|
{children}
|
|
26
49
|
</div>
|
|
@@ -4,6 +4,7 @@ import { CLASSPREFIX as eccgui } from "../../configuration/constants";
|
|
|
4
4
|
export const NOOVERFLOW = eccgui + "-typography--nooverflow";
|
|
5
5
|
export const FORCELINEBREAK = eccgui + "-typography--forcelinebreak";
|
|
6
6
|
export const PREVENTLINEBREAK = eccgui + "-typography--preventlinebreak";
|
|
7
|
+
export const NOSCROLLBARSONCHILDREN = eccgui + "-typography--noscrollbarsonchildren";
|
|
7
8
|
export const LARGE = eccgui + "-typography--large";
|
|
8
9
|
export const SMALL = eccgui + "-typography--small";
|
|
9
10
|
export const MUTED = eccgui + "-typography--muted";
|
|
@@ -261,6 +261,14 @@ table {
|
|
|
261
261
|
white-space: nowrap;
|
|
262
262
|
}
|
|
263
263
|
|
|
264
|
+
.#{$eccgui}-typography--noscrollbarsonchildren * {
|
|
265
|
+
overflow: visible;
|
|
266
|
+
|
|
267
|
+
pre {
|
|
268
|
+
width: fit-content;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
|
|
264
272
|
// white spaces
|
|
265
273
|
@each $whitespacePlace in ("margin", "padding") {
|
|
266
274
|
@each $whitespaceDirection in ("top", "right", "bottom", "left") {
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
3
|
+
|
|
4
|
+
import { CodeEditor } from "./CodeMirror";
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title: "Extensions/CodeEditor",
|
|
8
|
+
component: CodeEditor,
|
|
9
|
+
//parameters: { actions: { argTypesRegex: '^on.*' } },
|
|
10
|
+
argTypes: {
|
|
11
|
+
onChange: {
|
|
12
|
+
action: "value changed"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
} as ComponentMeta<typeof CodeEditor>;
|
|
16
|
+
|
|
17
|
+
const TemplateFull: ComponentStory<typeof CodeEditor> = (args) => (
|
|
18
|
+
<CodeEditor {...args} />
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
export const BasicExample = TemplateFull.bind({});
|
|
22
|
+
BasicExample.args = {
|
|
23
|
+
name: "codeinput",
|
|
24
|
+
mode: "markdown",
|
|
25
|
+
defaultValue: "**test me**",
|
|
26
|
+
};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import React, { useEffect, useRef } from "react";
|
|
2
|
+
import CodeMirror from "codemirror";
|
|
3
|
+
import { CLASSPREFIX as eccgui } from "../../configuration/constants";
|
|
4
|
+
import "codemirror/mode/markdown/markdown.js";
|
|
5
|
+
import "codemirror/mode/python/python.js";
|
|
6
|
+
import "codemirror/mode/sparql/sparql.js";
|
|
7
|
+
import "codemirror/mode/sql/sql.js";
|
|
8
|
+
import "codemirror/mode/turtle/turtle.js";
|
|
9
|
+
import "codemirror/mode/xml/xml.js";
|
|
10
|
+
|
|
11
|
+
export interface CodeEditorProps {
|
|
12
|
+
/**
|
|
13
|
+
* `name` attribute of connected textarea element.
|
|
14
|
+
*/
|
|
15
|
+
name: string;
|
|
16
|
+
/**
|
|
17
|
+
* `id` attribute of connected textarea element.
|
|
18
|
+
* If not set then the default value is created by `codemirror-${name-attribute}`.
|
|
19
|
+
*/
|
|
20
|
+
id?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Handler method to receive onChange events.
|
|
23
|
+
* As input the new value is given.
|
|
24
|
+
*/
|
|
25
|
+
onChange: (v: any) => void;
|
|
26
|
+
/**
|
|
27
|
+
* Syntax mode of the code editor.
|
|
28
|
+
*/
|
|
29
|
+
mode?: "markdown" | "python" | "sparql" | "sql" | "turtle" | "xml" | "undefined";
|
|
30
|
+
/**
|
|
31
|
+
* Default value used first when the editor is instanciated.
|
|
32
|
+
*/
|
|
33
|
+
defaultValue?: any;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Includes a code editor, currently we use CodeMirror library as base.
|
|
38
|
+
*/
|
|
39
|
+
export const CodeEditor = ({
|
|
40
|
+
onChange,
|
|
41
|
+
name,
|
|
42
|
+
id,
|
|
43
|
+
mode = "undefined",
|
|
44
|
+
defaultValue
|
|
45
|
+
}: CodeEditorProps) => {
|
|
46
|
+
const domRef = useRef<HTMLTextAreaElement>(null);
|
|
47
|
+
|
|
48
|
+
useEffect(() => {
|
|
49
|
+
const editorInstance = CodeMirror.fromTextArea(domRef.current!, {
|
|
50
|
+
mode: mode === "undefined" ? undefined : mode,
|
|
51
|
+
lineWrapping: true,
|
|
52
|
+
lineNumbers: true,
|
|
53
|
+
tabSize: 2,
|
|
54
|
+
theme: "xq-light",
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
editorInstance.on("change", (api) => {
|
|
58
|
+
onChange(api.getValue());
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
return function cleanup() {
|
|
62
|
+
editorInstance.toTextArea();
|
|
63
|
+
};
|
|
64
|
+
}, [onChange, mode]);
|
|
65
|
+
|
|
66
|
+
return (
|
|
67
|
+
<div className={`${eccgui}-codeeditor`}>
|
|
68
|
+
<textarea
|
|
69
|
+
ref={domRef}
|
|
70
|
+
/**
|
|
71
|
+
* FIXME: same `data-test-id` for multiple code editor elements are valid
|
|
72
|
+
* but may not make really sense for testing purposes. Currently let it
|
|
73
|
+
* unchanged from the code what was took over here.
|
|
74
|
+
*/
|
|
75
|
+
data-test-id="codemirror-wrapper"
|
|
76
|
+
id={!!id ? id : `codemirror-${name}`}
|
|
77
|
+
name={name}
|
|
78
|
+
defaultValue={defaultValue}
|
|
79
|
+
/>
|
|
80
|
+
</div>
|
|
81
|
+
);
|
|
82
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
@import "~codemirror/lib/codemirror.css";
|
|
2
|
+
@import "~codemirror/theme/xq-light.css";
|
|
3
|
+
|
|
4
|
+
// adjustments
|
|
5
|
+
|
|
6
|
+
.#{$eccgui}-codeeditor {
|
|
7
|
+
.CodeMirror {
|
|
8
|
+
border-radius: $pt-border-radius;
|
|
9
|
+
|
|
10
|
+
// get them a "border" like input boxes from blueprintjs
|
|
11
|
+
box-shadow: input-transition-shadow($input-shadow-color-focus), $pt-input-box-shadow;
|
|
12
|
+
&.CodeMirror-focused {
|
|
13
|
+
box-shadow: input-transition-shadow($input-shadow-color-focus, true), $input-box-shadow-focus;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.CodeMirror-gutters {
|
|
17
|
+
// allow "borders" to shine through
|
|
18
|
+
background-color: rgba(0,0,0,0.05);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.CodeMirror-scroll {
|
|
22
|
+
cursor: text;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.#{$prefix}--accordion__content {
|
|
28
|
+
.CodeMirror-scroll, .CodeMirror-sizer, .CodeMirror-gutter, .CodeMirror-gutters, .CodeMirror-linenumber {
|
|
29
|
+
box-sizing: content-box;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copied from `react-flow` because we need to change there routing.
|
|
3
|
+
* We use the 10.2.0cversion minus commit 87d518f8b5540a91a3f9c163a2315c2de47abc31
|
|
4
|
+
* @see https://github.com/wbkd/react-flow/commit/87d518f8b5540a91a3f9c163a2315c2de47abc31
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { getEdgeCenter as getCenter, Position } from "react-flow-renderer";
|
|
8
|
+
|
|
9
|
+
// These are some helper methods for drawing the round corners
|
|
10
|
+
// The name indicates the direction of the path. "bottomLeftCorner" goes
|
|
11
|
+
// from bottom to the left and "leftBottomCorner" goes from left to the bottom.
|
|
12
|
+
// We have to consider the direction of the paths because of the animated lines.
|
|
13
|
+
const bottomLeftCorner = (x: number, y: number, size: number): string =>
|
|
14
|
+
`L ${x},${y - size}Q ${x},${y} ${x + size},${y}`;
|
|
15
|
+
const leftBottomCorner = (x: number, y: number, size: number): string =>
|
|
16
|
+
`L ${x + size},${y}Q ${x},${y} ${x},${y - size}`;
|
|
17
|
+
const bottomRightCorner = (x: number, y: number, size: number): string =>
|
|
18
|
+
`L ${x},${y - size}Q ${x},${y} ${x - size},${y}`;
|
|
19
|
+
const rightBottomCorner = (x: number, y: number, size: number): string =>
|
|
20
|
+
`L ${x - size},${y}Q ${x},${y} ${x},${y - size}`;
|
|
21
|
+
const leftTopCorner = (x: number, y: number, size: number): string => `L ${x + size},${y}Q ${x},${y} ${x},${y + size}`;
|
|
22
|
+
const topLeftCorner = (x: number, y: number, size: number): string => `L ${x},${y + size}Q ${x},${y} ${x + size},${y}`;
|
|
23
|
+
const topRightCorner = (x: number, y: number, size: number): string => `L ${x},${y + size}Q ${x},${y} ${x - size},${y}`;
|
|
24
|
+
const rightTopCorner = (x: number, y: number, size: number): string => `L ${x - size},${y}Q ${x},${y} ${x},${y + size}`;
|
|
25
|
+
|
|
26
|
+
export interface GetSmoothStepPathParams {
|
|
27
|
+
sourceX: number;
|
|
28
|
+
sourceY: number;
|
|
29
|
+
sourcePosition?: Position;
|
|
30
|
+
targetX: number;
|
|
31
|
+
targetY: number;
|
|
32
|
+
targetPosition?: Position;
|
|
33
|
+
borderRadius?: number;
|
|
34
|
+
centerX?: number;
|
|
35
|
+
centerY?: number;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function getSmoothStepPath({
|
|
39
|
+
sourceX,
|
|
40
|
+
sourceY,
|
|
41
|
+
sourcePosition = Position.Bottom,
|
|
42
|
+
targetX,
|
|
43
|
+
targetY,
|
|
44
|
+
targetPosition = Position.Top,
|
|
45
|
+
borderRadius = 5,
|
|
46
|
+
centerX,
|
|
47
|
+
centerY,
|
|
48
|
+
}: GetSmoothStepPathParams): string {
|
|
49
|
+
const [_centerX, _centerY, offsetX, offsetY] = getCenter({ sourceX, sourceY, targetX, targetY });
|
|
50
|
+
const cornerWidth = Math.min(borderRadius, Math.abs(targetX - sourceX));
|
|
51
|
+
const cornerHeight = Math.min(borderRadius, Math.abs(targetY - sourceY));
|
|
52
|
+
const cornerSize = Math.min(cornerWidth, cornerHeight, offsetX, offsetY);
|
|
53
|
+
const cX = typeof centerX !== 'undefined' ? centerX : _centerX;
|
|
54
|
+
const cY = typeof centerY !== 'undefined' ? centerY : _centerY;
|
|
55
|
+
|
|
56
|
+
let firstCornerPath = "";
|
|
57
|
+
let secondCornerPath = "";
|
|
58
|
+
|
|
59
|
+
if (sourceX <= targetX) {
|
|
60
|
+
if (sourceY <= targetY) {
|
|
61
|
+
firstCornerPath = bottomLeftCorner(sourceX, cY, cornerSize);
|
|
62
|
+
secondCornerPath = rightTopCorner(targetX, cY, cornerSize);
|
|
63
|
+
if (sourcePosition === Position.Right) {
|
|
64
|
+
if (targetPosition === Position.Left) {
|
|
65
|
+
firstCornerPath = rightTopCorner(cX, sourceY, cornerSize);
|
|
66
|
+
secondCornerPath = bottomLeftCorner(cX, targetY, cornerSize);
|
|
67
|
+
}
|
|
68
|
+
} else {
|
|
69
|
+
if (targetPosition === Position.Left) {
|
|
70
|
+
// no change
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
} else {
|
|
74
|
+
firstCornerPath = topLeftCorner(sourceX, cY, cornerSize);
|
|
75
|
+
secondCornerPath = rightBottomCorner(targetX, cY, cornerSize);
|
|
76
|
+
if (sourcePosition === Position.Right) {
|
|
77
|
+
if (targetPosition === Position.Left) {
|
|
78
|
+
firstCornerPath = rightBottomCorner(cX, sourceY, cornerSize);
|
|
79
|
+
secondCornerPath = topLeftCorner(cX, targetY, cornerSize);
|
|
80
|
+
}
|
|
81
|
+
} else {
|
|
82
|
+
if (targetPosition === Position.Left) {
|
|
83
|
+
// no change
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
} else {
|
|
88
|
+
if (sourceY <= targetY) {
|
|
89
|
+
firstCornerPath = bottomRightCorner(sourceX, cY, cornerSize);
|
|
90
|
+
secondCornerPath = leftTopCorner(targetX, cY, cornerSize);
|
|
91
|
+
if (sourcePosition === Position.Left) {
|
|
92
|
+
if (targetPosition === Position.Right) {
|
|
93
|
+
firstCornerPath = leftTopCorner(cX, sourceY, cornerSize);
|
|
94
|
+
secondCornerPath = bottomRightCorner(cX, targetY, cornerSize);
|
|
95
|
+
}
|
|
96
|
+
} else {
|
|
97
|
+
if (targetPosition === Position.Right) {
|
|
98
|
+
// no change
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
} else {
|
|
102
|
+
firstCornerPath = topRightCorner(sourceX, cY, cornerSize);
|
|
103
|
+
secondCornerPath = leftBottomCorner(targetX, cY, cornerSize);
|
|
104
|
+
if (sourcePosition === Position.Left) {
|
|
105
|
+
if (targetPosition === Position.Right) {
|
|
106
|
+
firstCornerPath = leftBottomCorner(cX, sourceY, cornerSize);
|
|
107
|
+
secondCornerPath = topRightCorner(cX, targetY, cornerSize);
|
|
108
|
+
}
|
|
109
|
+
} else {
|
|
110
|
+
if (targetPosition === Position.Right) {
|
|
111
|
+
// no change
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
return `M ${sourceX},${sourceY}${firstCornerPath}${secondCornerPath}L ${targetX},${targetY}`;
|
|
118
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { EdgeDefaultProps } from "./EdgeDefault";
|
|
2
2
|
import { EdgeStepProps } from "./EdgeStep";
|
|
3
|
-
import {
|
|
3
|
+
import { Position } from "react-flow-renderer";
|
|
4
|
+
import { getSmoothStepPath } from "./getSmoothStepPath";
|
|
4
5
|
|
|
5
6
|
interface EdgePositionCorrectionProps extends Omit<EdgeDefaultProps, "id" | "source" | "target" | "drawSvgPath" | "data"> {
|
|
6
7
|
correctionLength?: number;
|
|
@@ -25,58 +26,49 @@ const posCorrectionEdge = ({
|
|
|
25
26
|
let endCommandCorrection = ``;
|
|
26
27
|
|
|
27
28
|
if (sourcePosition === Position.Left && sourceX < targetX) {
|
|
28
|
-
newSourceX = newSourceX - correctionLength;
|
|
29
|
+
newSourceX = newSourceX - 2 * correctionLength;
|
|
29
30
|
if (sourceY < targetY) {
|
|
30
|
-
newSourceY = sourceY +
|
|
31
|
-
startCommandCorrection = startCommandCorrection + ` L ${newSourceX},${sourceY} A ${correctionRadius} ${correctionRadius} ${
|
|
31
|
+
newSourceY = sourceY + correctionRadius;
|
|
32
|
+
startCommandCorrection = startCommandCorrection + ` L ${newSourceX + correctionRadius},${sourceY} A ${correctionRadius} ${correctionRadius} ${90} ${0} ${0} `;
|
|
32
33
|
} else {
|
|
33
|
-
newSourceY = sourceY -
|
|
34
|
-
startCommandCorrection = startCommandCorrection + ` L ${newSourceX},${sourceY} A ${correctionRadius} ${correctionRadius} ${
|
|
34
|
+
newSourceY = sourceY - correctionRadius;
|
|
35
|
+
startCommandCorrection = startCommandCorrection + ` L ${newSourceX + correctionRadius},${sourceY} A ${correctionRadius} ${correctionRadius} ${90} ${0} ${1} `;
|
|
35
36
|
}
|
|
36
37
|
}
|
|
37
38
|
|
|
38
39
|
if (sourcePosition === Position.Right && sourceX > targetX) {
|
|
39
40
|
newSourceX = targetPosition === Position.Right ? newSourceX + correctionLength + correctionRadius : newSourceX + correctionLength;
|
|
40
41
|
if (sourceY < targetY) {
|
|
41
|
-
newSourceY =
|
|
42
|
-
startCommandCorrection =
|
|
43
|
-
startCommandCorrection + ` L ${newSourceX - correctionRadius},${sourceY} A ${correctionRadius} ${correctionRadius} ${90} ${0} ${1} `
|
|
44
|
-
) : (
|
|
45
|
-
startCommandCorrection + ` L ${newSourceX},${sourceY} A ${correctionRadius} ${correctionRadius} ${180} ${1} ${1} `
|
|
46
|
-
);
|
|
42
|
+
newSourceY = sourceY + correctionRadius;
|
|
43
|
+
startCommandCorrection = startCommandCorrection + ` L ${newSourceX - correctionRadius},${sourceY} A ${correctionRadius} ${correctionRadius} ${90} ${0} ${1} `;
|
|
47
44
|
} else {
|
|
48
|
-
newSourceY =
|
|
49
|
-
startCommandCorrection =
|
|
50
|
-
startCommandCorrection + ` L ${newSourceX - correctionRadius},${sourceY} A ${correctionRadius} ${correctionRadius} ${90} ${0} ${0} `
|
|
51
|
-
) : (
|
|
52
|
-
startCommandCorrection + ` L ${newSourceX},${sourceY} A ${correctionRadius} ${correctionRadius} ${180} ${1} ${0} `
|
|
53
|
-
);
|
|
45
|
+
newSourceY = sourceY - correctionRadius;
|
|
46
|
+
startCommandCorrection = startCommandCorrection + ` L ${newSourceX - correctionRadius},${sourceY} A ${correctionRadius} ${correctionRadius} ${90} ${0} ${0} `;
|
|
54
47
|
}
|
|
55
48
|
}
|
|
56
49
|
|
|
57
50
|
if (targetPosition === Position.Left && sourceX > targetX) {
|
|
58
|
-
newTargetX = newTargetX - correctionLength;
|
|
51
|
+
newTargetX = newTargetX - 3 * correctionLength;
|
|
59
52
|
if (sourceY < targetY) {
|
|
60
|
-
newTargetY = targetY -
|
|
61
|
-
endCommandCorrection = ` A ${correctionRadius} ${correctionRadius} ${
|
|
53
|
+
newTargetY = targetY - correctionRadius;
|
|
54
|
+
endCommandCorrection = ` A ${correctionRadius} ${correctionRadius} ${90} ${0} ${0} ${newTargetX + correctionRadius},${targetY} L ${targetX},${targetY}`;
|
|
62
55
|
} else {
|
|
63
|
-
newTargetY = targetY +
|
|
64
|
-
endCommandCorrection = ` A ${correctionRadius} ${correctionRadius} ${
|
|
56
|
+
newTargetY = targetY + correctionRadius;
|
|
57
|
+
endCommandCorrection = ` A ${correctionRadius} ${correctionRadius} ${90} ${0} ${1} ${newTargetX + correctionRadius},${targetY} L ${targetX},${targetY}`;
|
|
65
58
|
}
|
|
66
59
|
}
|
|
67
60
|
|
|
68
61
|
if (targetPosition === Position.Right && sourceX < targetX) {
|
|
69
|
-
newTargetX = newTargetX + correctionLength;
|
|
62
|
+
newTargetX = newTargetX + 3 * correctionLength;
|
|
70
63
|
if (sourceY < targetY) {
|
|
71
|
-
newTargetY = targetY -
|
|
72
|
-
endCommandCorrection = ` A ${correctionRadius} ${correctionRadius} ${
|
|
64
|
+
newTargetY = targetY - correctionRadius;
|
|
65
|
+
endCommandCorrection = ` A ${correctionRadius} ${correctionRadius} ${90} ${0} ${1} ${newTargetX - correctionRadius},${targetY} L ${targetX},${targetY}`;
|
|
73
66
|
} else {
|
|
74
|
-
newTargetY = targetY +
|
|
75
|
-
endCommandCorrection = ` A ${correctionRadius} ${correctionRadius} ${
|
|
67
|
+
newTargetY = targetY + correctionRadius;
|
|
68
|
+
endCommandCorrection = ` A ${correctionRadius} ${correctionRadius} ${90} ${0} ${0} ${newTargetX - correctionRadius},${targetY} L ${targetX},${targetY}`;
|
|
76
69
|
}
|
|
77
70
|
}
|
|
78
71
|
|
|
79
|
-
|
|
80
72
|
return {
|
|
81
73
|
newSourceX,
|
|
82
74
|
newSourceY,
|
|
@@ -91,7 +91,7 @@ export const MiniMap = memo(({
|
|
|
91
91
|
/**
|
|
92
92
|
enables the mini-map fake drag effect see "handleMiniMapMouseMove" above.
|
|
93
93
|
**/
|
|
94
|
-
const handleMiniMapMouseDown = (
|
|
94
|
+
const handleMiniMapMouseDown = () => {
|
|
95
95
|
if (enableNavigation && flowInstance) { minimapCalcConf.navigationOn = true; }
|
|
96
96
|
};
|
|
97
97
|
|
|
@@ -7,6 +7,7 @@ import { CLASSPREFIX as eccgui } from "../../../configuration/constants";
|
|
|
7
7
|
import {ValidIconName} from "../../../components/Icon/canonicalIconNames";
|
|
8
8
|
import { HandleDefault, HandleProps } from "./../handles/HandleDefault";
|
|
9
9
|
import { NodeProps } from "./NodeDefault";
|
|
10
|
+
import { NodeContentExtensionProps } from "./NodeContentExtension";
|
|
10
11
|
|
|
11
12
|
export type HighlightingState = "success" | "warning" | "danger" | "match" | "altmatch";
|
|
12
13
|
|
|
@@ -35,7 +36,7 @@ interface NodeContentData<CONTENT_PROPS = any> {
|
|
|
35
36
|
/**
|
|
36
37
|
* Content extension, displayed at the bottom side of a node.
|
|
37
38
|
*/
|
|
38
|
-
contentExtension?: React.
|
|
39
|
+
contentExtension?: React.ReactElement<NodeContentExtensionProps>;
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
export interface NodeContentProps<NODE_DATA, NODE_CONTENT_PROPS = any> extends NodeContentData, React.HTMLAttributes<HTMLDivElement> {
|
|
@@ -124,6 +125,11 @@ export interface NodeContentProps<NODE_DATA, NODE_CONTENT_PROPS = any> extends N
|
|
|
124
125
|
* If set then it will be always overwritten internally.
|
|
125
126
|
*/
|
|
126
127
|
selected?: boolean;
|
|
128
|
+
/**
|
|
129
|
+
* Allow react flow wheel events, e.g. for zooming using the mouse wheel over a node.
|
|
130
|
+
* If this is allowed scrolling inside a node is not possible.
|
|
131
|
+
*/
|
|
132
|
+
letPassWheelEvents?: boolean;
|
|
127
133
|
}
|
|
128
134
|
|
|
129
135
|
interface MemoHandlerProps extends HandleProps {
|
|
@@ -226,6 +232,7 @@ const MemoHandler = React.memo(
|
|
|
226
232
|
sourcePosition = Position.Right,
|
|
227
233
|
isConnectable = true,
|
|
228
234
|
selected,
|
|
235
|
+
letPassWheelEvents = false,
|
|
229
236
|
// businessData is just being ignored
|
|
230
237
|
businessData,
|
|
231
238
|
// other props for DOM element
|
|
@@ -279,7 +286,8 @@ const MemoHandler = React.memo(
|
|
|
279
286
|
` ${eccgui}-graphviz__node--minimal-${minimalShape}` +
|
|
280
287
|
(!!highlightedState ? " " + gethighlightedStateClasses(highlightedState, `${eccgui}-graphviz__node`) : "") +
|
|
281
288
|
(animated ? ` ${eccgui}-graphviz__node--animated` : "") +
|
|
282
|
-
(showUnconnectableHandles === false ? ` ${eccgui}-graphviz__node--hidehandles` : "")
|
|
289
|
+
(showUnconnectableHandles === false ? ` ${eccgui}-graphviz__node--hidehandles` : "") +
|
|
290
|
+
(letPassWheelEvents === false ? ` nowheel` : "")
|
|
283
291
|
}
|
|
284
292
|
>
|
|
285
293
|
<header className={`${eccgui}-graphviz__node__header`}>
|
|
@@ -311,11 +319,9 @@ const MemoHandler = React.memo(
|
|
|
311
319
|
{typeof content === "function" ? content(adjustedContentProps) : content}
|
|
312
320
|
</div>
|
|
313
321
|
)}
|
|
314
|
-
{
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
</div>
|
|
318
|
-
)}
|
|
322
|
+
<div className={`${eccgui}-graphviz__node__footer`}>
|
|
323
|
+
</div>
|
|
324
|
+
{contentExtension}
|
|
319
325
|
</section>
|
|
320
326
|
{!!handles && (
|
|
321
327
|
<>
|
|
@@ -3,6 +3,10 @@ import { CLASSPREFIX as eccgui } from "../../../configuration/constants";
|
|
|
3
3
|
import IconButton from "../../../components/Icon/IconButton";
|
|
4
4
|
|
|
5
5
|
export interface NodeContentExtensionProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
/**
|
|
7
|
+
* When enabled the element is displayed in a way that it does not count into the node size calculation.
|
|
8
|
+
*/
|
|
9
|
+
slideOutOfNode?: boolean;
|
|
6
10
|
/**
|
|
7
11
|
* Element is displayed in expanded state.
|
|
8
12
|
* If it has no `onToggle` handler property set then it is always expanded.
|
|
@@ -33,6 +37,7 @@ export interface NodeContentExtensionProps extends React.HTMLAttributes<HTMLDivE
|
|
|
33
37
|
*/
|
|
34
38
|
export const NodeContentExtension = ({
|
|
35
39
|
children,
|
|
40
|
+
slideOutOfNode = false,
|
|
36
41
|
isExpanded = false,
|
|
37
42
|
onToggle = undefined,
|
|
38
43
|
actionButtons,
|
|
@@ -50,6 +55,7 @@ export const NodeContentExtension = ({
|
|
|
50
55
|
{...otherProps}
|
|
51
56
|
className={
|
|
52
57
|
`${eccgui}-graphviz__node__extension` +
|
|
58
|
+
(slideOutOfNode ? ` ${eccgui}-graphviz__node__extension--slideout` : "") +
|
|
53
59
|
(expanded ? ` ${eccgui}-graphviz__node__extension--expanded` : "")
|
|
54
60
|
}
|
|
55
61
|
>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, {memo, useState} from "react";import {
|
|
1
|
+
import React, {memo, useEffect, useState} from "react";import {
|
|
2
2
|
IPopoverProps as IBlueprintPopoverProps,
|
|
3
3
|
PopoverInteractionKind as BlueprintPopoverInteractionKind,
|
|
4
4
|
} from "@blueprintjs/core";
|
|
@@ -11,6 +11,14 @@ export interface NodeToolsProps extends IBlueprintPopoverProps {
|
|
|
11
11
|
togglerElement?: ValidIconName | JSX.Element;
|
|
12
12
|
togglerText?: string;
|
|
13
13
|
menuButtonDataTestId?: string
|
|
14
|
+
/** If defined this function will be called with the menu API object to be used externally. */
|
|
15
|
+
menuFunctionsCallback?: (menuFunctions: NodeToolsMenuFunctions) => any
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// Functions regarding the menu that can be called from the outside
|
|
19
|
+
export interface NodeToolsMenuFunctions {
|
|
20
|
+
/** Closes the menu if its open. */
|
|
21
|
+
closeMenu: () => void
|
|
14
22
|
}
|
|
15
23
|
|
|
16
24
|
export const NodeTools = memo(({
|
|
@@ -18,16 +26,25 @@ export const NodeTools = memo(({
|
|
|
18
26
|
togglerElement = "item-moremenu",
|
|
19
27
|
togglerText = "Show more options",
|
|
20
28
|
menuButtonDataTestId,
|
|
29
|
+
menuFunctionsCallback,
|
|
21
30
|
...otherOverlayProps
|
|
22
31
|
}: NodeToolsProps) => {
|
|
23
|
-
const [
|
|
32
|
+
const [isOpen, setIsOpen] = useState<boolean>(false);
|
|
33
|
+
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
menuFunctionsCallback && menuFunctionsCallback({
|
|
36
|
+
closeMenu(): void {
|
|
37
|
+
setIsOpen(false)
|
|
38
|
+
}
|
|
39
|
+
})
|
|
40
|
+
}, [menuFunctionsCallback])
|
|
24
41
|
|
|
25
42
|
return (
|
|
26
43
|
<ContextOverlay
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
44
|
+
isOpen={isOpen}
|
|
45
|
+
onClose={() => setIsOpen(false)}
|
|
46
|
+
hoverCloseDelay={500}
|
|
47
|
+
interactionKind={isOpen ? BlueprintPopoverInteractionKind.HOVER : BlueprintPopoverInteractionKind.CLICK}
|
|
31
48
|
{...otherOverlayProps}
|
|
32
49
|
>
|
|
33
50
|
{typeof togglerElement === "string" ? (
|
|
@@ -35,9 +52,8 @@ export const NodeTools = memo(({
|
|
|
35
52
|
data-test-id={menuButtonDataTestId}
|
|
36
53
|
name={togglerElement}
|
|
37
54
|
text={togglerText}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}}/>
|
|
55
|
+
onClick={() => setIsOpen(previous => !previous)}
|
|
56
|
+
/>
|
|
41
57
|
) : (
|
|
42
58
|
{ togglerElement }
|
|
43
59
|
)}
|