@eccenca/gui-elements 22.1.0-rc.1 → 23.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +40 -4
- package/README.md +1 -11
- 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/ReactFlow/ReactFlow.js +7 -1
- package/dist/cjs/cmem/react-flow/ReactFlow/ReactFlow.js.map +1 -1
- package/dist/cjs/cmem/react-flow/configuration/customLabel.js +13 -0
- package/dist/cjs/cmem/react-flow/configuration/customLabel.js.map +1 -0
- 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/inverseEdge.js +13 -0
- package/dist/cjs/cmem/react-flow/configuration/inverseEdge.js.map +1 -0
- 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/components/AutoSuggestion/AutoSuggestion.js +2 -0
- 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 +1 -0
- package/dist/cjs/components/AutocompleteField/AutoCompleteField.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/Dialog/SimpleDialog.js +9 -4
- package/dist/cjs/components/Dialog/SimpleDialog.js.map +1 -1
- package/dist/cjs/components/Form/FieldItemRow.js +1 -1
- 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/Icon/canonicalIconNames.js +10 -0
- package/dist/cjs/components/Icon/canonicalIconNames.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/Iframe/IframeModal.js +2 -6
- package/dist/cjs/components/Iframe/IframeModal.js.map +1 -1
- package/dist/cjs/components/MultiSelect/MultiSelect.js.map +1 -1
- package/dist/cjs/components/OverviewItem/OverviewItemList.js +1 -1
- package/dist/cjs/components/OverviewItem/OverviewItemList.js.map +1 -1
- package/dist/cjs/components/Spinner/Spinner.js +1 -0
- package/dist/cjs/components/Spinner/Spinner.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/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 +5 -5
- package/dist/cjs/extensions/react-flow/edges/EdgeDefault.js.map +1 -1
- package/dist/cjs/extensions/react-flow/index.js +5 -1
- package/dist/cjs/extensions/react-flow/index.js.map +1 -1
- package/dist/cjs/extensions/react-flow/markers/MarkerArrowClosedInverse.js +13 -0
- package/dist/cjs/extensions/react-flow/markers/MarkerArrowClosedInverse.js.map +1 -0
- package/dist/cjs/extensions/react-flow/markers/ReactFlowMarkers.js +15 -0
- package/dist/cjs/extensions/react-flow/markers/ReactFlowMarkers.js.map +1 -0
- 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/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 +2 -2
- package/dist/{es5 → esm}/cmem/ActivityControl/ActivityControlWidget.js.map +0 -0
- package/dist/{es5 → esm}/cmem/ActivityControl/ActivityExecutionErrorReportModal.js +1 -1
- package/dist/{es5 → esm}/cmem/ActivityControl/ActivityExecutionErrorReportModal.js.map +0 -0
- package/dist/{es5 → esm}/cmem/ActivityControl/SilkActivityControl.js +4 -4
- package/dist/{es5 → esm}/cmem/ActivityControl/SilkActivityControl.js.map +0 -0
- 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 +11 -5
- package/dist/esm/cmem/react-flow/ReactFlow/ReactFlow.js.map +1 -0
- package/dist/esm/cmem/react-flow/configuration/customLabel.js +10 -0
- package/dist/esm/cmem/react-flow/configuration/customLabel.js.map +1 -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/esm/cmem/react-flow/configuration/inverseEdge.js +10 -0
- package/dist/esm/cmem/react-flow/configuration/inverseEdge.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/{es5 → esm}/common/utils/stringUtils.js +0 -0
- package/dist/{es5 → esm}/common/utils/stringUtils.js.map +0 -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 +1 -1
- package/dist/{es5 → esm}/components/Application/ApplicationContent.js.map +0 -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 +1 -1
- package/dist/{es5 → esm}/components/Application/ApplicationTitle.js.map +0 -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 -3
- 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 +3 -2
- package/dist/esm/components/AutocompleteField/AutoCompleteField.js.map +1 -0
- package/dist/{es5 → esm}/components/Breadcrumb/BreadcrumbItem.js +2 -2
- 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 +3 -3
- package/dist/{es5 → esm}/components/Button/Button.js.map +0 -0
- package/dist/{es5 → esm}/components/Card/Card.js +1 -1
- package/dist/{es5 → esm}/components/Card/Card.js.map +0 -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 +29 -8
- package/dist/esm/components/Dialog/SimpleDialog.js.map +1 -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 +10 -0
- package/dist/{es5 → esm}/components/Icon/canonicalIconNames.js.map +1 -1
- 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 +5 -25
- package/dist/esm/components/Iframe/IframeModal.js.map +1 -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 +5 -5
- package/dist/{es5 → esm}/components/MultiSelect/MultiSelect.js.map +1 -1
- package/dist/{es5 → esm}/components/Notification/Notification.js +3 -3
- package/dist/{es5 → esm}/components/Notification/Notification.js.map +0 -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 +2 -2
- 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 +2 -1
- 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 +2 -2
- package/dist/{es5 → esm}/components/Tabs/Tab.js.map +0 -0
- 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 +2 -2
- package/dist/{es5 → esm}/components/Tabs/Tabs.js.map +0 -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/{es5 → esm}/components/Typography/HtmlContentBlock.js +2 -2
- package/dist/{es5 → esm}/components/Typography/HtmlContentBlock.js.map +0 -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 +1 -1
- package/dist/{es5 → esm}/components/Typography/classnames.js.map +0 -0
- 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 +7 -7
- package/dist/esm/extensions/react-flow/edges/EdgeDefault.js.map +1 -0
- 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/{es5 → esm}/extensions/react-flow/edges/getSmoothStepPath.js +0 -0
- package/dist/{es5 → esm}/extensions/react-flow/edges/getSmoothStepPath.js.map +0 -0
- package/dist/{es5 → esm}/extensions/react-flow/edges/utils.js +1 -1
- package/dist/{es5 → esm}/extensions/react-flow/edges/utils.js.map +0 -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 +14 -0
- package/dist/{es5 → esm}/extensions/react-flow/index.js.map +1 -1
- package/dist/esm/extensions/react-flow/markers/MarkerArrowClosedInverse.js +6 -0
- package/dist/esm/extensions/react-flow/markers/MarkerArrowClosedInverse.js.map +1 -0
- package/dist/esm/extensions/react-flow/markers/ReactFlowMarkers.js +8 -0
- package/dist/esm/extensions/react-flow/markers/ReactFlowMarkers.js.map +1 -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 +3 -3
- package/dist/{es5 → esm}/extensions/react-flow/nodes/NodeContent.js.map +0 -0
- package/dist/{es5 → esm}/extensions/react-flow/nodes/NodeContentExtension.js +2 -2
- package/dist/{es5 → esm}/extensions/react-flow/nodes/NodeContentExtension.js.map +0 -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 +2 -2
- package/dist/{es5 → esm}/extensions/react-flow/nodes/NodeTools.js.map +0 -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/react-flow/ReactFlow/ReactFlow.d.ts +2 -3
- package/dist/types/cmem/react-flow/configuration/customLabel.d.ts +8 -0
- package/dist/types/cmem/react-flow/configuration/graph.d.ts +1 -2
- package/dist/types/cmem/react-flow/configuration/inverseEdge.d.ts +8 -0
- 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/components/AutoSuggestion/SingleLineCodeEditor.d.ts +1 -1
- package/dist/types/components/Dialog/SimpleDialog.d.ts +5 -1
- package/dist/types/components/Icon/canonicalIconNames.d.ts +1 -1
- package/dist/types/components/MultiSelect/MultiSelect.d.ts +1 -1
- 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/EdgeDefault.d.ts +3 -0
- package/dist/types/extensions/react-flow/index.d.ts +2 -0
- package/dist/types/extensions/react-flow/markers/MarkerArrowClosedInverse.d.ts +2 -0
- package/dist/types/extensions/react-flow/markers/ReactFlowMarkers.d.ts +2 -0
- package/dist/types/index.d.ts +1 -1
- package/package.json +15 -10
- package/src/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.tsx +1 -1
- package/src/cmem/react-flow/ReactFlow/ReactFlow.stories.tsx +115 -39
- package/src/cmem/react-flow/ReactFlow/ReactFlow.tsx +10 -3
- 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/customLabel.ts +11 -0
- package/src/cmem/react-flow/configuration/graph.ts +0 -2
- package/src/cmem/react-flow/configuration/inverseEdge.ts +11 -0
- 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 +133 -0
- package/src/common/utils/getColorConfiguration.ts +21 -0
- package/src/components/Accordion/accordion.scss +8 -2
- package/src/components/AutoSuggestion/AutoSuggestion.tsx +2 -0
- package/src/components/AutoSuggestion/SingleLineCodeEditor.tsx +3 -3
- package/src/components/AutocompleteField/AutoCompleteField.tsx +1 -0
- package/src/components/Dialog/Modal.tsx +1 -1
- package/src/components/Dialog/SimpleDialog.tsx +25 -4
- package/src/components/Form/FieldItemRow.tsx +1 -1
- package/src/components/Form/FieldSet.tsx +1 -0
- package/src/components/Icon/canonicalIconNames.tsx +12 -0
- package/src/components/Iframe/Iframe.tsx +1 -1
- package/src/components/Iframe/IframeModal.tsx +6 -17
- package/src/components/MultiSelect/MultiSelect.tsx +2 -2
- package/src/components/OverviewItem/OverviewItemList.tsx +1 -1
- package/src/components/Spinner/Spinner.tsx +1 -0
- package/src/components/Tag/TagList.tsx +1 -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/edges/EdgeDefault.tsx +7 -2
- package/src/extensions/react-flow/index.ts +2 -0
- package/src/extensions/react-flow/markers/MarkerArrowClosedInverse.tsx +25 -0
- package/src/extensions/react-flow/markers/ReactFlowMarkers.tsx +13 -0
- package/src/extensions/react-flow/minimap/MiniMap.tsx +1 -1
- package/src/index.scss +1 -4
- package/src/index.ts +1 -1
- 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/index.js +0 -4
- package/dist/es5/cmem/ContentBlobToggler/index.js +0 -3
- package/dist/es5/cmem/react-flow/ReactFlow/ReactFlow.js.map +0 -1
- 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/AutoSuggestion/AutoSuggestion.js.map +0 -1
- package/dist/es5/components/AutocompleteField/AutoCompleteField.js.map +0 -1
- package/dist/es5/components/Card/index.js +0 -9
- package/dist/es5/components/Dialog/SimpleDialog.js.map +0 -1
- package/dist/es5/components/Form/FieldItemRow.js +0 -23
- package/dist/es5/components/Form/FieldItemRow.js.map +0 -1
- package/dist/es5/components/Form/FieldSet.js.map +0 -1
- package/dist/es5/components/Iframe/IframeModal.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/Tag/TagList.js.map +0 -1
- package/dist/es5/extensions/react-flow/edges/EdgeDefault.js.map +0 -1
- package/dist/es5/extensions/react-flow/index.js +0 -12
- package/dist/es5/index.js +0 -97
- 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
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import React, { useState, useEffect, useCallback } from "react";
|
|
1
|
+
import React, { useState, useEffect, useCallback, FC } from "react";
|
|
2
2
|
import { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
3
|
+
import IconButton from "../../../components/Icon/IconButton";
|
|
4
|
+
import { ReactFlow, ReactFlowProps } from "./ReactFlow";
|
|
5
|
+
import { ArrowHeadType, Elements, getMarkerEnd } from "react-flow-renderer";
|
|
5
6
|
|
|
6
7
|
export default {
|
|
7
8
|
title: "CMEM/React Flow/Configurations",
|
|
@@ -13,7 +14,7 @@ export default {
|
|
|
13
14
|
const nodeExamples = {
|
|
14
15
|
unspecified: [
|
|
15
16
|
{
|
|
16
|
-
id: 1,
|
|
17
|
+
id: 'unspecified-1',
|
|
17
18
|
type: "default",
|
|
18
19
|
data: {
|
|
19
20
|
label: "Default ", content: "Example content.", minimalShape: "none"
|
|
@@ -21,7 +22,7 @@ const nodeExamples = {
|
|
|
21
22
|
position: { x: 200, y: 50 },
|
|
22
23
|
},
|
|
23
24
|
{
|
|
24
|
-
id: 2,
|
|
25
|
+
id: 'unspecified-2',
|
|
25
26
|
type: "default",
|
|
26
27
|
data: {
|
|
27
28
|
label: "Default ", content: "Example content.", minimalShape: "none",
|
|
@@ -30,15 +31,15 @@ const nodeExamples = {
|
|
|
30
31
|
position: { x: 200, y: 300 },
|
|
31
32
|
},
|
|
32
33
|
{
|
|
33
|
-
id: 'e1', type: 'straight', label: "straight edge", arrowHeadType: "arrowclosed",source: '1', target: '2',
|
|
34
|
+
id: 'unspecified-e1', type: 'straight', label: "straight edge", arrowHeadType: "arrowclosed",source: 'unspecified-1', target: 'unspecified-2',
|
|
34
35
|
},
|
|
35
36
|
{
|
|
36
|
-
id: 'e2', type: 'step', label: "step edge", arrowHeadType: "arrowclosed",source: '2', target: '1',
|
|
37
|
+
id: 'unspecified-e2', type: 'step', label: "step edge", arrowHeadType: "arrowclosed",source: 'unspecified-2', target: 'unspecified-1',
|
|
37
38
|
}
|
|
38
39
|
],
|
|
39
40
|
linking: [
|
|
40
41
|
{
|
|
41
|
-
id: 1,
|
|
42
|
+
id: 'linking-1',
|
|
42
43
|
type: "sourcepath",
|
|
43
44
|
data: {
|
|
44
45
|
label: "Source path", content: "Example content.", minimalShape: "none"
|
|
@@ -46,7 +47,7 @@ const nodeExamples = {
|
|
|
46
47
|
position: { x: 100, y: 50 },
|
|
47
48
|
},
|
|
48
49
|
{
|
|
49
|
-
id: 2,
|
|
50
|
+
id: 'linking-2',
|
|
50
51
|
type: "targetpath",
|
|
51
52
|
data: {
|
|
52
53
|
label: "Target path", content: "Example content.", minimalShape: "none"
|
|
@@ -54,7 +55,7 @@ const nodeExamples = {
|
|
|
54
55
|
position: { x: 400, y: 200 },
|
|
55
56
|
},
|
|
56
57
|
{
|
|
57
|
-
id: 3,
|
|
58
|
+
id: 'linking-3',
|
|
58
59
|
type: "transformation",
|
|
59
60
|
data: {
|
|
60
61
|
label: "Transformation", content: "Example content.", minimalShape: "none"
|
|
@@ -62,7 +63,7 @@ const nodeExamples = {
|
|
|
62
63
|
position: { x: 700, y: 50 },
|
|
63
64
|
},
|
|
64
65
|
{
|
|
65
|
-
id: 4,
|
|
66
|
+
id: 'linking-4',
|
|
66
67
|
type: "comparator",
|
|
67
68
|
data: {
|
|
68
69
|
label: "Comparation", content: "Example content.", minimalShape: "none",
|
|
@@ -71,7 +72,7 @@ const nodeExamples = {
|
|
|
71
72
|
position: { x: 750, y: 300 },
|
|
72
73
|
},
|
|
73
74
|
{
|
|
74
|
-
id: 5,
|
|
75
|
+
id: 'linking-5',
|
|
75
76
|
type: "aggregator",
|
|
76
77
|
data: {
|
|
77
78
|
label: "Aggregation", content: "Example content.", minimalShape: "none",
|
|
@@ -79,15 +80,15 @@ const nodeExamples = {
|
|
|
79
80
|
},
|
|
80
81
|
position: { x: 50, y: 300 },
|
|
81
82
|
},
|
|
82
|
-
{ id: 'e1', type: 'value', label: "value edge", arrowHeadType: "arrowclosed",source: '1', target: '2' },
|
|
83
|
-
{ id: 'e2', type: 'score', label: "score edge", arrowHeadType: "arrowclosed",source: '2', target: '3' },
|
|
84
|
-
{ id: 'e3', type: 'success', label: "success edge", arrowHeadType: "arrowclosed",source: '3', target: '4' },
|
|
85
|
-
{ id: 'e4', type: 'warning', label: "warning edge", arrowHeadType: "arrowclosed",source: '4', target: '5' },
|
|
86
|
-
{ id: 'e5', type: 'danger', label: "danger edge", arrowHeadType: "arrowclosed",source: '5', target: '1' },
|
|
83
|
+
{ id: 'linking-e1', type: 'value', label: "value edge", arrowHeadType: "arrowclosed",source: 'linking-1', target: 'linking-2' },
|
|
84
|
+
{ id: 'linking-e2', type: 'score', label: "score edge", arrowHeadType: "arrowclosed",source: 'linking-2', target: 'linking-3' },
|
|
85
|
+
{ id: 'linking-e3', type: 'success', label: "success edge", arrowHeadType: "arrowclosed",source: 'linking-3', target: 'linking-4' },
|
|
86
|
+
{ id: 'linking-e4', type: 'warning', label: "warning edge", arrowHeadType: "arrowclosed",source: 'linking-4', target: 'linking-5' },
|
|
87
|
+
{ id: 'linking-e5', type: 'danger', label: "danger edge", arrowHeadType: "arrowclosed",source: 'linking-5', target: 'linking-1' },
|
|
87
88
|
],
|
|
88
89
|
workflow: [
|
|
89
90
|
{
|
|
90
|
-
id: 1,
|
|
91
|
+
id: 'workflow-1',
|
|
91
92
|
type: "dataset",
|
|
92
93
|
data: {
|
|
93
94
|
label: "Dataset", content: "Example content.", minimalShape: "none"
|
|
@@ -95,7 +96,7 @@ const nodeExamples = {
|
|
|
95
96
|
position: { x: 100, y: 50 },
|
|
96
97
|
},
|
|
97
98
|
{
|
|
98
|
-
id: 2,
|
|
99
|
+
id: 'workflow-2',
|
|
99
100
|
type: "linking",
|
|
100
101
|
data: {
|
|
101
102
|
label: "Linking", content: "Example content.", minimalShape: "none"
|
|
@@ -103,7 +104,7 @@ const nodeExamples = {
|
|
|
103
104
|
position: { x: 400, y: 200 },
|
|
104
105
|
},
|
|
105
106
|
{
|
|
106
|
-
id: 3,
|
|
107
|
+
id: 'workflow-3',
|
|
107
108
|
type: "transform",
|
|
108
109
|
data: {
|
|
109
110
|
label: "Transform", content: "Example content.", minimalShape: "none"
|
|
@@ -111,7 +112,7 @@ const nodeExamples = {
|
|
|
111
112
|
position: { x: 700, y: 50 },
|
|
112
113
|
},
|
|
113
114
|
{
|
|
114
|
-
id: 4,
|
|
115
|
+
id: 'workflow-4',
|
|
115
116
|
type: "task",
|
|
116
117
|
data: {
|
|
117
118
|
label: "Task", content: "Example content.", minimalShape: "none",
|
|
@@ -120,7 +121,7 @@ const nodeExamples = {
|
|
|
120
121
|
position: { x: 750, y: 300 },
|
|
121
122
|
},
|
|
122
123
|
{
|
|
123
|
-
id: 5,
|
|
124
|
+
id: 'workflow-5',
|
|
124
125
|
type: "workflow",
|
|
125
126
|
data: {
|
|
126
127
|
label: "Workflow", content: "Example content.", minimalShape: "none",
|
|
@@ -128,15 +129,15 @@ const nodeExamples = {
|
|
|
128
129
|
},
|
|
129
130
|
position: { x: 50, y: 300 },
|
|
130
131
|
},
|
|
131
|
-
{ id: 'e1', arrowHeadType: "arrowclosed",source: '1', target: '2' },
|
|
132
|
-
{ id: 'e2', arrowHeadType: "arrowclosed",source: '2', target: '3' },
|
|
133
|
-
{ id: 'e3', type: 'success', label: "success edge", arrowHeadType: "arrowclosed",source: '3', target: '4' },
|
|
134
|
-
{ id: 'e4', type: 'warning', label: "warning edge", arrowHeadType: "arrowclosed",source: '4', target: '5' },
|
|
135
|
-
{ id: 'e5', type: 'danger', label: "danger edge", arrowHeadType: "arrowclosed",source: '5', target: '1' },
|
|
132
|
+
{ id: 'workflow-e1', arrowHeadType: "arrowclosed",source: 'workflow-1', target: 'workflow-2' },
|
|
133
|
+
{ id: 'workflow-e2', arrowHeadType: "arrowclosed",source: 'workflow-2', target: 'workflow-3' },
|
|
134
|
+
{ id: 'workflow-e3', type: 'success', label: "success edge", arrowHeadType: "arrowclosed",source: 'workflow-3', target: 'workflow-4' },
|
|
135
|
+
{ id: 'workflow-e4', type: 'warning', label: "warning edge", arrowHeadType: "arrowclosed",source: 'workflow-4', target: 'workflow-5' },
|
|
136
|
+
{ id: 'workflow-e5', type: 'danger', label: "danger edge", arrowHeadType: "arrowclosed",source: 'workflow-5', target: 'workflow-1' },
|
|
136
137
|
],
|
|
137
138
|
graph: [
|
|
138
139
|
{
|
|
139
|
-
id: 1,
|
|
140
|
+
id: 'graph-1',
|
|
140
141
|
type: "default",
|
|
141
142
|
data: {
|
|
142
143
|
label: "Default ", content: "Example content.", minimalShape: "none"
|
|
@@ -144,7 +145,7 @@ const nodeExamples = {
|
|
|
144
145
|
position: { x: 100, y: 50 },
|
|
145
146
|
},
|
|
146
147
|
{
|
|
147
|
-
id: 2,
|
|
148
|
+
id: 'graph-2',
|
|
148
149
|
type: "graph",
|
|
149
150
|
data: {
|
|
150
151
|
label: "Graph", content: "Example content.", minimalShape: "none"
|
|
@@ -152,7 +153,7 @@ const nodeExamples = {
|
|
|
152
153
|
position: { x: 400, y: 200 },
|
|
153
154
|
},
|
|
154
155
|
{
|
|
155
|
-
id: 3,
|
|
156
|
+
id: 'graph-3',
|
|
156
157
|
type: "class",
|
|
157
158
|
data: {
|
|
158
159
|
label: "Class", content: "Example content.", minimalShape: "none"
|
|
@@ -160,7 +161,7 @@ const nodeExamples = {
|
|
|
160
161
|
position: { x: 700, y: 50 },
|
|
161
162
|
},
|
|
162
163
|
{
|
|
163
|
-
id: 4,
|
|
164
|
+
id: 'graph-4',
|
|
164
165
|
type: "instance",
|
|
165
166
|
data: {
|
|
166
167
|
label: "Instance", content: "Example content.", minimalShape: "none",
|
|
@@ -169,7 +170,7 @@ const nodeExamples = {
|
|
|
169
170
|
position: { x: 750, y: 300 },
|
|
170
171
|
},
|
|
171
172
|
{
|
|
172
|
-
id: 5,
|
|
173
|
+
id: 'graph-5',
|
|
173
174
|
type: "property",
|
|
174
175
|
data: {
|
|
175
176
|
label: "Property", content: "Example content.", minimalShape: "none",
|
|
@@ -177,21 +178,96 @@ const nodeExamples = {
|
|
|
177
178
|
},
|
|
178
179
|
position: { x: 50, y: 300 },
|
|
179
180
|
},
|
|
180
|
-
{ id: 'e1', type: 'implicit', label: "implicit edge", arrowHeadType: "arrowclosed",source: '1', target: '2' },
|
|
181
|
-
{ id: 'e2', type: 'import', label: "import edge", arrowHeadType: "arrowclosed",source: '2', target: '3' },
|
|
182
|
-
{ id: 'e3', type: 'subclass', label: "subclass edge", arrowHeadType: "arrowclosed",source: '3', target: '4' },
|
|
183
|
-
{ id: 'e4', type: 'subproperty', label: "subproperty edge", arrowHeadType: "arrowclosed",source: '4', target: '5' },
|
|
184
|
-
{ id: 'e5', type: 'rdftype', label: "rdftype edge", arrowHeadType: "arrowclosed",source: '5', target: '1' },
|
|
181
|
+
{ id: 'graph-e1', type: 'implicit', label: "implicit edge", arrowHeadType: "arrowclosed",source: 'graph-1', target: 'graph-2' },
|
|
182
|
+
{ id: 'graph-e2', type: 'import', label: "import edge", arrowHeadType: "arrowclosed",source: 'graph-2', target: 'graph-3' },
|
|
183
|
+
{ id: 'graph-e3', type: 'subclass', label: "subclass edge", arrowHeadType: "arrowclosed",source: 'graph-3', target: 'graph-4' },
|
|
184
|
+
{ id: 'graph-e4', type: 'subproperty', label: "subproperty edge", arrowHeadType: "arrowclosed",source: 'graph-4', target: 'graph-5' },
|
|
185
|
+
{ id: 'graph-e5', type: 'rdftype', label: "rdftype edge", arrowHeadType: "arrowclosed",source: 'graph-5', target: 'graph-1' },
|
|
185
186
|
],
|
|
187
|
+
inverseEdge: [
|
|
188
|
+
{
|
|
189
|
+
id: 'inverseEdge-1',
|
|
190
|
+
type: "default",
|
|
191
|
+
data: {
|
|
192
|
+
label: "Default ", content: "Example content.", minimalShape: "none"
|
|
193
|
+
},
|
|
194
|
+
position: { x: 200, y: 50 },
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
id: 'inverseEdge-2',
|
|
198
|
+
type: "default",
|
|
199
|
+
data: {
|
|
200
|
+
label: "Default ", content: "Example content.", minimalShape: "none",
|
|
201
|
+
handles: [ { type: "source", position: "left" }, { type: "target", position: "right" } ],
|
|
202
|
+
inversePath: true,
|
|
203
|
+
},
|
|
204
|
+
position: { x: 200, y: 300 },
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
id: 'inverseEdge-e1', type: 'straight', label: "straight edge", arrowHeadType: "arrowclosed",source: 'inverseEdge-1', target: 'inverseEdge-2',
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
id: 'inverseEdge-e2', type: 'default', label: "inverse edge", source: 'inverseEdge-2', target: 'inverseEdge-1',
|
|
211
|
+
data: {
|
|
212
|
+
markerStart: getMarkerEnd(
|
|
213
|
+
`${ArrowHeadType.ArrowClosed}-inverse` as ArrowHeadType
|
|
214
|
+
),
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
],
|
|
218
|
+
customLabel: [
|
|
219
|
+
{
|
|
220
|
+
id: 'customLabel-1',
|
|
221
|
+
type: "default",
|
|
222
|
+
data: {
|
|
223
|
+
label: "Default ", content: "Example content.", minimalShape: "none"
|
|
224
|
+
},
|
|
225
|
+
position: { x: 200, y: 50 },
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
id: 'customLabel-2',
|
|
229
|
+
type: "default",
|
|
230
|
+
data: {
|
|
231
|
+
label: "Default ", content: "Example content.", minimalShape: "none",
|
|
232
|
+
handles: [ { type: "source", position: "left" }, { type: "target", position: "right" } ],
|
|
233
|
+
inversePath: true,
|
|
234
|
+
},
|
|
235
|
+
position: { x: 200, y: 300 },
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
id: 'customLabel-e1', type: 'straight', label: "straight edge", arrowHeadType: "arrowclosed", source: 'customLabel-1', target: 'customLabel-2',
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
id: 'customLabel-e2', type: 'default', label: "custom edge", arrowHeadType: "arrowclosed", source: 'customLabel-2', target: 'customLabel-1',
|
|
242
|
+
data: {
|
|
243
|
+
renderLabel: (
|
|
244
|
+
edgeCenter: [number, number, number, number]
|
|
245
|
+
) => (
|
|
246
|
+
<foreignObject
|
|
247
|
+
width={30}
|
|
248
|
+
height={30}
|
|
249
|
+
x={edgeCenter[0] - 15}
|
|
250
|
+
y={edgeCenter[1] - 15}
|
|
251
|
+
className="instance-viz-multiedge"
|
|
252
|
+
requiredExtensions="http://www.w3.org/1999/xhtml"
|
|
253
|
+
>
|
|
254
|
+
<body>
|
|
255
|
+
<IconButton name="navigation-close" />
|
|
256
|
+
</body>
|
|
257
|
+
</foreignObject>
|
|
258
|
+
)
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
]
|
|
186
262
|
}
|
|
187
263
|
|
|
188
|
-
const ReactFlowExample = (args) => {
|
|
264
|
+
const ReactFlowExample: FC<ReactFlowProps> = (args) => {
|
|
189
265
|
const [reactflowInstance, setReactflowInstance] = useState(null);
|
|
190
266
|
const [elements, setElements] = useState([] as Elements);
|
|
191
267
|
//const [edgeTools, setEdgeTools] = useState<JSX.Element>(<></>);
|
|
192
268
|
|
|
193
269
|
useEffect(() => {
|
|
194
|
-
setElements(nodeExamples[args.configuration] as Elements);
|
|
270
|
+
setElements(nodeExamples[args.configuration ?? "unspecified"] as Elements);
|
|
195
271
|
}, [args]);
|
|
196
272
|
|
|
197
273
|
const onLoad = useCallback(
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import {default as ReactFlowOriginal, ReactFlowProps as ReactFlowOriginalProps} from "react-flow-renderer";
|
|
3
|
+
import { ReactFlowMarkers } from "../../../extensions/react-flow/markers/ReactFlowMarkers";
|
|
3
4
|
import * as unspecifiedConfig from "./../configuration/unspecified";
|
|
4
5
|
import * as graphConfig from "./../configuration/graph";
|
|
5
6
|
import * as workflowConfig from "./../configuration/workflow";
|
|
6
7
|
import * as linkingConfig from "./../configuration/linking";
|
|
8
|
+
import * as inverseEdgeConfig from "./../configuration/inverseEdge";
|
|
9
|
+
import * as customLabelConfig from "./../configuration/customLabel";
|
|
7
10
|
|
|
8
|
-
interface ReactFlowProps extends ReactFlowOriginalProps {
|
|
11
|
+
export interface ReactFlowProps extends ReactFlowOriginalProps {
|
|
9
12
|
/**
|
|
10
13
|
* Load `ReactFlow` component with pre-configured values for `nodeTypes` and `edgeTypes`
|
|
11
14
|
*/
|
|
12
|
-
configuration?: "unspecified" | "graph" | "workflow" | "linking";
|
|
15
|
+
configuration?: "unspecified" | "graph" | "workflow" | "linking" | "inverseEdge" | "customLabel";
|
|
13
16
|
}
|
|
14
17
|
|
|
15
18
|
/**
|
|
@@ -27,6 +30,8 @@ export const ReactFlow = React.forwardRef<HTMLDivElement, ReactFlowProps>((
|
|
|
27
30
|
graph: graphConfig,
|
|
28
31
|
workflow: workflowConfig,
|
|
29
32
|
linking: linkingConfig,
|
|
33
|
+
inverseEdge: inverseEdgeConfig,
|
|
34
|
+
customLabel: customLabelConfig,
|
|
30
35
|
}
|
|
31
36
|
|
|
32
37
|
return (
|
|
@@ -35,6 +40,8 @@ export const ReactFlow = React.forwardRef<HTMLDivElement, ReactFlowProps>((
|
|
|
35
40
|
nodeTypes={ configReactFlow[configuration].nodeTypes }
|
|
36
41
|
edgeTypes={ configReactFlow[configuration].edgeTypes }
|
|
37
42
|
{...originalProps}
|
|
38
|
-
|
|
43
|
+
>
|
|
44
|
+
<ReactFlowMarkers />
|
|
45
|
+
</ReactFlowOriginal>
|
|
39
46
|
);
|
|
40
47
|
})
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
$reactflow-color-graph-node: #745a85 !default;
|
|
2
|
+
$reactflow-color-class-node: #3a7896 !default;
|
|
3
|
+
$reactflow-color-instance-node: #0097a7 !default;
|
|
4
|
+
$reactflow-color-property-node: #ffd54f !default;
|
|
5
|
+
|
|
6
|
+
$reactflow-color-implicit-edge: #ae3c74 !default;
|
|
7
|
+
$reactflow-color-import-edge: $reactflow-color-graph-node !default;
|
|
8
|
+
$reactflow-color-subclass-edge: $reactflow-color-class-node !default;
|
|
9
|
+
$reactflow-color-subproperty-edge: $reactflow-color-property-node !default;
|
|
10
|
+
$reactflow-color-rdftype-edge: $reactflow-color-instance-node !default;
|
|
11
|
+
|
|
12
|
+
@function bright($color) {
|
|
13
|
+
@return mix($color, #fff, 24%);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.#{eccgui}-configuration--colors__react-flow-graph {
|
|
17
|
+
--graphNode: #{$reactflow-color-graph-node};
|
|
18
|
+
--classNode: #{$reactflow-color-class-node};
|
|
19
|
+
--instanceNode: #{$reactflow-color-instance-node};
|
|
20
|
+
--propertyNode: #{$reactflow-color-property-node};
|
|
21
|
+
--implicitEdge: #{$reactflow-color-implicit-edge};
|
|
22
|
+
--importEdge: #{$reactflow-color-import-edge};
|
|
23
|
+
--subclassEdge: #{$reactflow-color-subclass-edge};
|
|
24
|
+
--subpropertyEdge: #{$reactflow-color-subproperty-edge};
|
|
25
|
+
--rdftypeEdge: #{$reactflow-color-rdftype-edge};
|
|
26
|
+
--graphNodeBright: #{bright($reactflow-color-graph-node)};
|
|
27
|
+
--classNodeBright: #{bright($reactflow-color-class-node)};
|
|
28
|
+
--instanceNodeBright: #{bright($reactflow-color-instance-node)};
|
|
29
|
+
--propertyNodeBright: #{bright($reactflow-color-property-node)};
|
|
30
|
+
--implicitEdgeBright: #{bright($reactflow-color-implicit-edge)};
|
|
31
|
+
--importEdgeBright: #{bright($reactflow-color-import-edge)};
|
|
32
|
+
--subclassEdgeBright: #{bright($reactflow-color-subclass-edge)};
|
|
33
|
+
--subpropertyEdgeBright: #{bright($reactflow-color-subproperty-edge)};
|
|
34
|
+
--rdftypeEdgeBright: #{bright($reactflow-color-rdftype-edge)};
|
|
35
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
$reactflow-color-sourcepath-node: #745a85 !default;
|
|
2
|
+
$reactflow-color-targetpath-node: #3a7896 !default;
|
|
3
|
+
$reactflow-color-transformation-node: #ae3c74 !default;
|
|
4
|
+
$reactflow-color-comparator-node: #40a691 !default;
|
|
5
|
+
$reactflow-color-aggregator-node: #0097a7 !default;
|
|
6
|
+
|
|
7
|
+
$reactflow-color-value-edge: #222 !default;
|
|
8
|
+
$reactflow-color-score-edge: $reactflow-color-aggregator-node !default;
|
|
9
|
+
|
|
10
|
+
@function bright($color) {
|
|
11
|
+
@return mix($color, #fff, 24%);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.#{eccgui}-configuration--colors__react-flow-linking {
|
|
15
|
+
--sourcepathNode: #{$reactflow-color-sourcepath-node};
|
|
16
|
+
--targetpathNode: #{$reactflow-color-targetpath-node};
|
|
17
|
+
--transformationNode: #{$reactflow-color-transformation-node};
|
|
18
|
+
--comparatorNode: #{$reactflow-color-comparator-node};
|
|
19
|
+
--aggregatorNode: #{$reactflow-color-aggregator-node};
|
|
20
|
+
--valueEdge: #{$reactflow-color-value-edge};
|
|
21
|
+
--scoreEdge: #{$reactflow-color-score-edge};
|
|
22
|
+
--sourcepathNodeBright: #{bright($reactflow-color-sourcepath-node)};
|
|
23
|
+
--targetpathNodeBright: #{bright($reactflow-color-targetpath-node)};
|
|
24
|
+
--transformationNodeBright: #{bright($reactflow-color-transformation-node)};
|
|
25
|
+
--comparatorNodeBright: #{bright($reactflow-color-comparator-node)};
|
|
26
|
+
--aggregatorNodeBright: #{bright($reactflow-color-aggregator-node)};
|
|
27
|
+
--valueEdgeBright: #{bright($reactflow-color-value-edge)};
|
|
28
|
+
--scoreEdgeBright: #{bright($reactflow-color-score-edge)};
|
|
29
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
$reactflow-color-dataset-node: #3a7896 !default;
|
|
2
|
+
$reactflow-color-linking-node: #0097a7 !default;
|
|
3
|
+
$reactflow-color-transform-node: #40a691 !default;
|
|
4
|
+
$reactflow-color-task-node: #80b67b !default;
|
|
5
|
+
$reactflow-color-workflow-node: #745a85 !default;
|
|
6
|
+
|
|
7
|
+
@function bright($color) {
|
|
8
|
+
@return mix($color, #fff, 24%);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.#{eccgui}-configuration--colors__react-flow-workflow {
|
|
12
|
+
--datasetNode: #{$reactflow-color-dataset-node};
|
|
13
|
+
--linkingNode: #{$reactflow-color-linking-node};
|
|
14
|
+
--transformNode: #{$reactflow-color-transform-node};
|
|
15
|
+
--taskNode: #{$reactflow-color-task-node};
|
|
16
|
+
--workflowNode: #{$reactflow-color-workflow-node};
|
|
17
|
+
--datasetNodeBright: #{bright($reactflow-color-dataset-node)};
|
|
18
|
+
--linkingNodeBright: #{bright($reactflow-color-linking-node)};
|
|
19
|
+
--transformNodeBright: #{bright($reactflow-color-transform-node)};
|
|
20
|
+
--taskNodeBright: #{bright($reactflow-color-task-node)};
|
|
21
|
+
--workflowNodeBright: #{bright($reactflow-color-workflow-node)};
|
|
22
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
@import "colors-graph
|
|
2
|
-
@import "colors-workflow
|
|
3
|
-
@import "colors-linking
|
|
1
|
+
@import "colors-graph";
|
|
2
|
+
@import "colors-workflow";
|
|
3
|
+
@import "colors-linking";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { EdgeDefault } from "./../../../extensions/react-flow/edges/EdgeDefault";
|
|
2
|
+
import { NodeDefault } from "./../../../extensions/react-flow/nodes/NodeDefault";
|
|
3
|
+
|
|
4
|
+
export const edgeTypes = {
|
|
5
|
+
default: EdgeDefault,
|
|
6
|
+
straight: EdgeDefault,
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export const nodeTypes = {
|
|
10
|
+
default: NodeDefault,
|
|
11
|
+
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { EdgeDefault } from "./../../../extensions/react-flow/edges/EdgeDefault";
|
|
2
2
|
import { NodeDefault } from "./../../../extensions/react-flow/nodes/NodeDefault";
|
|
3
|
-
import colors from "./_colors-graph.module.scss";
|
|
4
3
|
|
|
5
4
|
const edgeTypes = {
|
|
6
5
|
default: EdgeDefault,
|
|
@@ -25,5 +24,4 @@ const nodeTypes = {
|
|
|
25
24
|
export {
|
|
26
25
|
edgeTypes,
|
|
27
26
|
nodeTypes,
|
|
28
|
-
colors,
|
|
29
27
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { EdgeDefault } from "./../../../extensions/react-flow/edges/EdgeDefault";
|
|
2
|
+
import { NodeDefault } from "./../../../extensions/react-flow/nodes/NodeDefault";
|
|
3
|
+
|
|
4
|
+
export const edgeTypes = {
|
|
5
|
+
default: EdgeDefault,
|
|
6
|
+
straight: EdgeDefault,
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export const nodeTypes = {
|
|
10
|
+
default: NodeDefault,
|
|
11
|
+
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { EdgeStep } from "./../../../extensions/react-flow/edges/EdgeStep";
|
|
3
3
|
import { NodeDefault } from "./../../../extensions/react-flow/nodes/NodeDefault";
|
|
4
|
-
import colors from "./_colors-linking.module.scss";
|
|
5
4
|
|
|
6
5
|
const edgeTypes = {
|
|
7
6
|
default: EdgeStep,
|
|
@@ -24,5 +23,4 @@ const nodeTypes = {
|
|
|
24
23
|
export {
|
|
25
24
|
edgeTypes,
|
|
26
25
|
nodeTypes,
|
|
27
|
-
colors,
|
|
28
26
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { EdgeStep } from "./../../../extensions/react-flow/edges/EdgeStep";
|
|
2
2
|
import { NodeDefault } from "./../../../extensions/react-flow/nodes/NodeDefault";
|
|
3
|
-
import colors from "./_colors-workflow.module.scss";
|
|
4
3
|
|
|
5
4
|
const edgeTypes = {
|
|
6
5
|
default: EdgeStep,
|
|
@@ -21,5 +20,4 @@ const nodeTypes = {
|
|
|
21
20
|
export {
|
|
22
21
|
edgeTypes,
|
|
23
22
|
nodeTypes,
|
|
24
|
-
colors,
|
|
25
23
|
}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Based on CSS Tricks tutorial.
|
|
3
|
+
* @see https://css-tricks.com/how-to-get-all-custom-properties-on-a-page-in-javascript/
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
interface getLocalCssStyleRulesProps {
|
|
7
|
+
cssRuleType?: "CSSStyleRule";
|
|
8
|
+
selectorText?: string;
|
|
9
|
+
}
|
|
10
|
+
interface getLocalCssStyleRulePropertiesProps extends getLocalCssStyleRulesProps {
|
|
11
|
+
propertyType?: "all" | "normal" | "custom";
|
|
12
|
+
}
|
|
13
|
+
interface getCustomPropertiesProps extends getLocalCssStyleRulesProps {
|
|
14
|
+
removeDashPrefix?: boolean;
|
|
15
|
+
returnObject?: boolean;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export default class CssCustomProperties {
|
|
19
|
+
|
|
20
|
+
getterDefaultProps = {} as getCustomPropertiesProps;
|
|
21
|
+
customprops = {};
|
|
22
|
+
|
|
23
|
+
constructor(props: getCustomPropertiesProps = {}) {
|
|
24
|
+
this.getterDefaultProps = props;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// Methods
|
|
28
|
+
|
|
29
|
+
customProperties = (props: getCustomPropertiesProps = {}) => {
|
|
30
|
+
// FIXME:
|
|
31
|
+
// in case of performance issues results should get saved at least into intern variables
|
|
32
|
+
// other cache strategies could be also tested
|
|
33
|
+
if (Object.keys(this.customprops).length > 1) {
|
|
34
|
+
return this.customprops;
|
|
35
|
+
}
|
|
36
|
+
const customprops = CssCustomProperties.listCustomProperties({
|
|
37
|
+
...this.getterDefaultProps,
|
|
38
|
+
...props
|
|
39
|
+
});
|
|
40
|
+
this.customprops = customprops;
|
|
41
|
+
return customprops;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
static listLocalStylesheets = (): CSSStyleSheet[] => {
|
|
45
|
+
if (document && document.styleSheets) {
|
|
46
|
+
return Array.from(document.styleSheets)
|
|
47
|
+
.filter((stylesheet) => {
|
|
48
|
+
// is inline stylesheet or from same domain
|
|
49
|
+
if (!stylesheet.href) {
|
|
50
|
+
return true;
|
|
51
|
+
}
|
|
52
|
+
return stylesheet.href.indexOf(window.location.origin) === 0;
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return [];
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
static listLocalCssRules = (): CSSRule[] => {
|
|
60
|
+
return CssCustomProperties.listLocalStylesheets()
|
|
61
|
+
.map((stylesheet) => {
|
|
62
|
+
return Array.from(stylesheet.cssRules);
|
|
63
|
+
})
|
|
64
|
+
.flat();
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
static listLocalCssStyleRules = (filter: getLocalCssStyleRulesProps = {}): CSSStyleRule[] => {
|
|
68
|
+
const {cssRuleType = "CSSStyleRule", selectorText} = filter;
|
|
69
|
+
const cssStyleRules = CssCustomProperties.listLocalCssRules()
|
|
70
|
+
.filter((cssrule) => {
|
|
71
|
+
if((cssrule as CSSStyleRule).style) {
|
|
72
|
+
const cssStyleRule = cssrule as CSSStyleRule
|
|
73
|
+
if (cssStyleRule.constructor.name !== cssRuleType) {
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
if (!!selectorText && cssStyleRule.selectorText !== selectorText) {
|
|
77
|
+
return false;
|
|
78
|
+
}
|
|
79
|
+
return true;
|
|
80
|
+
} else {
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
})
|
|
84
|
+
return cssStyleRules as CSSStyleRule[]
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
static listLocalCssStyleRuleProperties = (filter: getLocalCssStyleRulePropertiesProps = {}) => {
|
|
88
|
+
const { propertyType = "all", ...otherFilters } = filter;
|
|
89
|
+
return CssCustomProperties.listLocalCssStyleRules(otherFilters)
|
|
90
|
+
.map((cssrule) => {
|
|
91
|
+
return [...cssrule.style]
|
|
92
|
+
.map((propertyname) => {
|
|
93
|
+
return [
|
|
94
|
+
propertyname.trim(),
|
|
95
|
+
cssrule.style.getPropertyValue(propertyname).trim()
|
|
96
|
+
];
|
|
97
|
+
});
|
|
98
|
+
})
|
|
99
|
+
.flat()
|
|
100
|
+
.filter((declaration) => {
|
|
101
|
+
switch(propertyType) {
|
|
102
|
+
case "normal":
|
|
103
|
+
return declaration[0].indexOf("--") !== 0;
|
|
104
|
+
case "custom":
|
|
105
|
+
return declaration[0].indexOf("--") === 0;
|
|
106
|
+
}
|
|
107
|
+
return true; // case "all"
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
static listCustomProperties = (props: getCustomPropertiesProps = {}) => {
|
|
112
|
+
const {
|
|
113
|
+
removeDashPrefix = true,
|
|
114
|
+
returnObject = true,
|
|
115
|
+
...filterProps
|
|
116
|
+
} = props;
|
|
117
|
+
|
|
118
|
+
const customProperties = CssCustomProperties.listLocalCssStyleRuleProperties({
|
|
119
|
+
...filterProps,
|
|
120
|
+
propertyType: "custom",
|
|
121
|
+
}).map((declaration) => {
|
|
122
|
+
if (removeDashPrefix) {
|
|
123
|
+
return [
|
|
124
|
+
declaration[0].substr(2),
|
|
125
|
+
declaration[1]
|
|
126
|
+
];
|
|
127
|
+
}
|
|
128
|
+
return declaration;
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
return returnObject ? Object.fromEntries(customProperties) : customProperties;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import CssCustomProperties from "./CssCustomProperties";
|
|
2
|
+
import { CLASSPREFIX as eccgui } from "../../configuration/constants";
|
|
3
|
+
|
|
4
|
+
// Configurations can be found in `src/cmem/react-flow/configuration/_colors-*.scss`
|
|
5
|
+
type colorconfigs = "react-flow-graph" | "react-flow-linking" | "react-flow-workflow";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Read and returns color values provided by CSS custom properties.
|
|
9
|
+
* They are defined for special CSS classes.
|
|
10
|
+
* Currently color configurations for the react flow editors are supported.
|
|
11
|
+
**/
|
|
12
|
+
const getColorConfiguration = (configId: colorconfigs) => {
|
|
13
|
+
return new CssCustomProperties({
|
|
14
|
+
selectorText: `.${eccgui}-configuration--colors__${configId}`,
|
|
15
|
+
cssRuleType: "CSSStyleRule",
|
|
16
|
+
removeDashPrefix: true,
|
|
17
|
+
returnObject: true,
|
|
18
|
+
}).customProperties();
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export default getColorConfiguration;
|