@eccenca/gui-elements 22.0.1 → 22.1.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 +37 -4
- package/dist/cjs/cmem/ActivityControl/ActivityControlWidget.js +23 -15
- 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 +59 -31
- package/dist/cjs/cmem/ActivityControl/SilkActivityControl.js.map +1 -1
- package/dist/cjs/cmem/ActivityControl/index.js +11 -0
- package/dist/cjs/cmem/ActivityControl/index.js.map +1 -0
- package/dist/cjs/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.js +1 -1
- package/dist/cjs/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.js.map +1 -1
- package/dist/cjs/cmem/ContentBlobToggler/index.js +8 -0
- package/dist/cjs/cmem/ContentBlobToggler/index.js.map +1 -0
- package/dist/cjs/cmem/index.js +14 -13
- package/dist/cjs/cmem/index.js.map +1 -1
- package/dist/cjs/cmem/react-flow/ReactFlow/ReactFlow.js +57 -0
- package/dist/cjs/cmem/react-flow/ReactFlow/ReactFlow.js.map +1 -0
- package/dist/cjs/cmem/react-flow/configuration/_colors-graph.module.scss +35 -0
- package/dist/cjs/cmem/react-flow/configuration/_colors-linking.module.scss +29 -0
- package/dist/cjs/cmem/react-flow/configuration/_colors-workflow.module.scss +22 -0
- package/dist/cjs/cmem/react-flow/configuration/graph.js +31 -0
- package/dist/cjs/cmem/react-flow/configuration/graph.js.map +1 -0
- package/dist/cjs/cmem/react-flow/configuration/linking.js +29 -0
- package/dist/cjs/cmem/react-flow/configuration/linking.js.map +1 -0
- package/dist/cjs/cmem/react-flow/configuration/unspecified.js +15 -0
- package/dist/cjs/cmem/react-flow/configuration/unspecified.js.map +1 -0
- package/dist/cjs/cmem/react-flow/configuration/workflow.js +27 -0
- package/dist/cjs/cmem/react-flow/configuration/workflow.js.map +1 -0
- 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 +286 -0
- package/dist/cjs/components/AutoSuggestion/AutoSuggestion.js.map +1 -0
- package/dist/cjs/components/AutoSuggestion/AutoSuggestionList.js +81 -0
- package/dist/cjs/components/AutoSuggestion/AutoSuggestionList.js.map +1 -0
- package/dist/cjs/components/AutoSuggestion/SingleLineCodeEditor.js +46 -0
- package/dist/cjs/components/AutoSuggestion/SingleLineCodeEditor.js.map +1 -0
- package/dist/cjs/components/AutocompleteField/AutoCompleteField.js +13 -15
- 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/ContextOverlay/ContextMenu.js +1 -1
- package/dist/cjs/components/ContextOverlay/ContextMenu.js.map +1 -1
- package/dist/cjs/components/Dialog/Modal.js +3 -3
- package/dist/cjs/components/Dialog/Modal.js.map +1 -1
- package/dist/cjs/components/Dialog/SimpleDialog.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/Icon/Icon.js.map +1 -1
- package/dist/cjs/components/Icon/canonicalIconNames.js +30 -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/MultiSelect/MultiSelect.js +212 -0
- package/dist/cjs/components/MultiSelect/MultiSelect.js.map +1 -0
- 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 +94 -0
- package/dist/cjs/components/Tabs/Tab.js.map +1 -0
- package/dist/cjs/components/Tabs/TabTitle.js +20 -0
- package/dist/cjs/components/Tabs/TabTitle.js.map +1 -0
- package/dist/cjs/components/Tabs/Tabs.js +26 -19
- package/dist/cjs/components/Tabs/Tabs.js.map +1 -1
- package/dist/cjs/components/Tag/Tag.js +7 -1
- package/dist/cjs/components/Tag/Tag.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/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 +97 -4
- 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 +11 -8
- package/dist/cjs/extensions/react-flow/nodes/NodeContent.js.map +1 -1
- package/dist/cjs/extensions/react-flow/nodes/NodeContentExtension.js +5 -4
- 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 +17 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/legacy-replacements/Button/AffirmativeButton.js +25 -0
- package/dist/cjs/legacy-replacements/Button/AffirmativeButton.js.map +1 -0
- package/dist/cjs/legacy-replacements/Button/Button.js +61 -0
- package/dist/cjs/legacy-replacements/Button/Button.js.map +1 -0
- package/dist/cjs/legacy-replacements/Button/DismissiveButton.js +25 -0
- package/dist/cjs/legacy-replacements/Button/DismissiveButton.js.map +1 -0
- package/dist/cjs/legacy-replacements/Button/DisruptiveButton.js +25 -0
- package/dist/cjs/legacy-replacements/Button/DisruptiveButton.js.map +1 -0
- package/dist/cjs/legacy-replacements/Checkbox/Checkbox.js +55 -0
- package/dist/cjs/legacy-replacements/Checkbox/Checkbox.js.map +1 -0
- package/dist/cjs/legacy-replacements/Radio/RadioButton.js +48 -0
- package/dist/cjs/legacy-replacements/Radio/RadioButton.js.map +1 -0
- package/dist/cjs/legacy-replacements/Tabs/Tabs.js +36 -0
- package/dist/cjs/legacy-replacements/Tabs/Tabs.js.map +1 -0
- package/dist/cjs/legacy-replacements/TextField/TextField.js +75 -0
- package/dist/cjs/legacy-replacements/TextField/TextField.js.map +1 -0
- package/dist/cjs/legacy-replacements/index.js +22 -0
- package/dist/cjs/legacy-replacements/index.js.map +1 -0
- package/dist/{es5 → esm}/cmem/ActivityControl/ActivityControlTypes.js +0 -0
- package/dist/{es5 → esm}/cmem/ActivityControl/ActivityControlTypes.js.map +0 -0
- package/dist/esm/cmem/ActivityControl/ActivityControlWidget.js +47 -0
- 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 +60 -34
- package/dist/esm/cmem/ActivityControl/SilkActivityControl.js.map +1 -0
- package/dist/esm/cmem/ActivityControl/index.js +4 -0
- package/dist/esm/cmem/ActivityControl/index.js.map +1 -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/esm/cmem/ContentBlobToggler/index.js.map +1 -0
- package/dist/{es5 → esm}/cmem/DateTimeDisplay/ElapsedDateTimeDisplay.js +0 -0
- package/dist/{es5 → esm}/cmem/DateTimeDisplay/ElapsedDateTimeDisplay.js.map +0 -0
- package/dist/esm/cmem/index.js +7 -0
- package/dist/esm/cmem/index.js.map +1 -0
- package/dist/{es5 → esm}/cmem/markdown/Markdown.js +2 -2
- package/dist/{es5 → esm}/cmem/markdown/Markdown.js.map +0 -0
- package/dist/esm/cmem/react-flow/ReactFlow/ReactFlow.js +43 -0
- package/dist/esm/cmem/react-flow/ReactFlow/ReactFlow.js.map +1 -0
- package/dist/esm/cmem/react-flow/configuration/_colors-graph.module.scss +35 -0
- package/dist/esm/cmem/react-flow/configuration/_colors-linking.module.scss +29 -0
- package/dist/esm/cmem/react-flow/configuration/_colors-workflow.module.scss +22 -0
- package/dist/esm/cmem/react-flow/configuration/graph.js +23 -0
- package/dist/esm/cmem/react-flow/configuration/graph.js.map +1 -0
- package/dist/esm/cmem/react-flow/configuration/linking.js +21 -0
- package/dist/esm/cmem/react-flow/configuration/linking.js.map +1 -0
- package/dist/esm/cmem/react-flow/configuration/unspecified.js +12 -0
- package/dist/esm/cmem/react-flow/configuration/unspecified.js.map +1 -0
- package/dist/esm/cmem/react-flow/configuration/workflow.js +19 -0
- 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/esm/components/AutoSuggestion/AutoSuggestion.js +348 -0
- package/dist/esm/components/AutoSuggestion/AutoSuggestion.js.map +1 -0
- package/dist/esm/components/AutoSuggestion/AutoSuggestionList.js +93 -0
- package/dist/esm/components/AutoSuggestion/AutoSuggestionList.js.map +1 -0
- package/dist/esm/components/AutoSuggestion/SingleLineCodeEditor.js +42 -0
- package/dist/esm/components/AutoSuggestion/SingleLineCodeEditor.js.map +1 -0
- package/dist/{es5 → esm}/components/AutocompleteField/AutoCompleteField.js +15 -17
- 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 +5 -5
- package/dist/{es5 → esm}/components/ContextOverlay/ContextMenu.js.map +1 -1
- 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 +5 -5
- package/dist/esm/components/Dialog/Modal.js.map +1 -0
- package/dist/{es5 → esm}/components/Dialog/SimpleDialog.js +4 -4
- package/dist/{es5 → esm}/components/Dialog/SimpleDialog.js.map +1 -1
- 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/esm/components/Icon/Icon.js.map +1 -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 +30 -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 +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/esm/components/MultiSelect/MultiSelect.js +290 -0
- 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/esm/components/Tabs/Tab.js +97 -0
- package/dist/esm/components/Tabs/Tab.js.map +1 -0
- package/dist/esm/components/Tabs/TabTitle.js +16 -0
- package/dist/esm/components/Tabs/TabTitle.js.map +1 -0
- package/dist/esm/components/Tabs/Tabs.js +37 -0
- package/dist/esm/components/Tabs/Tabs.js.map +1 -0
- package/dist/{es5 → esm}/components/Tag/Tag.js +8 -2
- package/dist/esm/components/Tag/Tag.js.map +1 -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/{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/esm/extensions/react-flow/edges/utils.js +113 -0
- 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 +30 -11
- package/dist/esm/extensions/react-flow/nodes/NodeContent.js.map +1 -0
- package/dist/{es5 → esm}/extensions/react-flow/nodes/NodeContentExtension.js +7 -6
- 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/esm/index.js.map +1 -0
- package/dist/esm/legacy-replacements/Button/AffirmativeButton.js +29 -0
- package/dist/esm/legacy-replacements/Button/AffirmativeButton.js.map +1 -0
- package/dist/esm/legacy-replacements/Button/Button.js +65 -0
- package/dist/esm/legacy-replacements/Button/Button.js.map +1 -0
- package/dist/esm/legacy-replacements/Button/DismissiveButton.js +29 -0
- package/dist/esm/legacy-replacements/Button/DismissiveButton.js.map +1 -0
- package/dist/esm/legacy-replacements/Button/DisruptiveButton.js +29 -0
- package/dist/esm/legacy-replacements/Button/DisruptiveButton.js.map +1 -0
- package/dist/esm/legacy-replacements/Checkbox/Checkbox.js +59 -0
- package/dist/esm/legacy-replacements/Checkbox/Checkbox.js.map +1 -0
- package/dist/esm/legacy-replacements/Radio/RadioButton.js +52 -0
- package/dist/esm/legacy-replacements/Radio/RadioButton.js.map +1 -0
- package/dist/esm/legacy-replacements/Tabs/Tabs.js +40 -0
- package/dist/esm/legacy-replacements/Tabs/Tabs.js.map +1 -0
- package/dist/esm/legacy-replacements/TextField/TextField.js +81 -0
- package/dist/esm/legacy-replacements/TextField/TextField.js.map +1 -0
- package/dist/esm/legacy-replacements/index.js +10 -0
- package/dist/esm/legacy-replacements/index.js.map +1 -0
- package/dist/{es5 → esm}/package.json +0 -0
- package/dist/types/cmem/ActivityControl/ActivityControlTypes.d.ts +2 -1
- package/dist/types/cmem/ActivityControl/ActivityControlWidget.d.ts +48 -2
- package/dist/types/cmem/ActivityControl/SilkActivityControl.d.ts +18 -3
- package/dist/types/cmem/ActivityControl/index.d.ts +3 -0
- package/dist/types/cmem/ContentBlobToggler/index.d.ts +2 -0
- package/dist/types/cmem/index.d.ts +8 -8
- package/dist/types/cmem/react-flow/ReactFlow/ReactFlow.d.ts +14 -0
- package/dist/types/cmem/react-flow/configuration/graph.d.ts +21 -0
- package/dist/types/cmem/react-flow/configuration/linking.d.ts +19 -0
- package/dist/types/cmem/react-flow/configuration/unspecified.d.ts +9 -0
- package/dist/types/cmem/react-flow/configuration/workflow.d.ts +17 -0
- package/dist/types/common/utils/stringUtils.d.ts +2 -0
- package/dist/types/components/AutoSuggestion/AutoSuggestion.d.ts +67 -0
- package/dist/types/components/AutoSuggestion/AutoSuggestionList.d.ts +13 -0
- package/dist/types/components/AutoSuggestion/SingleLineCodeEditor.d.ts +25 -0
- package/dist/types/components/AutocompleteField/AutoCompleteField.d.ts +8 -7
- package/dist/types/components/Button/Button.d.ts +3 -2
- package/dist/types/components/Card/Card.d.ts +9 -4
- package/dist/types/components/ContextOverlay/ContextMenu.d.ts +6 -1
- package/dist/types/components/Dialog/Modal.d.ts +4 -3
- package/dist/types/components/Dialog/SimpleDialog.d.ts +2 -0
- package/dist/types/components/Form/FieldItemRow.d.ts +1 -0
- package/dist/types/components/Icon/Icon.d.ts +2 -2
- package/dist/types/components/Icon/IconButton.d.ts +1 -1
- package/dist/types/components/Icon/canonicalIconNames.d.ts +1 -1
- package/dist/types/components/MultiSelect/MultiSelect.d.ts +86 -0
- 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/Tabs/Tab.d.ts +549 -0
- package/dist/types/components/Tabs/TabTitle.d.ts +38 -0
- package/dist/types/components/Tabs/Tabs.d.ts +14 -20
- package/dist/types/components/Tag/Tag.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/react-flow/edges/getSmoothStepPath.d.ts +18 -0
- package/dist/types/extensions/react-flow/edges/utils.d.ts +1 -1
- package/dist/types/extensions/react-flow/nodes/NodeContent.d.ts +15 -9
- package/dist/types/extensions/react-flow/nodes/NodeContentExtension.d.ts +5 -1
- package/dist/types/extensions/react-flow/nodes/NodeDefault.d.ts +2 -2
- package/dist/types/extensions/react-flow/nodes/NodeTools.d.ts +9 -2
- package/dist/types/extensions/react-flow/nodes/nodeTypes.d.ts +10 -10
- package/dist/types/index.d.ts +9 -4
- package/dist/types/legacy-replacements/Button/AffirmativeButton.d.ts +2 -0
- package/dist/types/legacy-replacements/Button/Button.d.ts +5 -0
- package/dist/types/legacy-replacements/Button/DismissiveButton.d.ts +2 -0
- package/dist/types/legacy-replacements/Button/DisruptiveButton.d.ts +2 -0
- package/dist/types/legacy-replacements/Checkbox/Checkbox.d.ts +2 -0
- package/dist/types/legacy-replacements/Radio/RadioButton.d.ts +2 -0
- package/dist/types/legacy-replacements/Tabs/Tabs.d.ts +22 -0
- package/dist/types/legacy-replacements/TextField/TextField.d.ts +2 -0
- package/dist/types/legacy-replacements/index.d.ts +10 -0
- package/package.json +43 -24
- package/src/cmem/ActivityControl/ActivityControlTypes.ts +3 -1
- package/src/cmem/ActivityControl/ActivityControlWidget.stories.tsx +98 -0
- package/src/cmem/ActivityControl/ActivityControlWidget.tsx +144 -89
- package/src/cmem/ActivityControl/ActivityExecutionErrorReportModal.tsx +11 -3
- package/src/cmem/ActivityControl/SilkActivityControl.tsx +182 -120
- package/src/cmem/ActivityControl/index.ts +3 -0
- package/src/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.tsx +1 -1
- package/src/cmem/ContentBlobToggler/index.ts +2 -0
- package/src/cmem/_index.scss +6 -0
- package/src/cmem/index.ts +10 -23
- package/src/cmem/react-flow/ReactFlow/ReactFlow.stories.tsx +222 -0
- package/src/cmem/react-flow/ReactFlow/ReactFlow.tsx +40 -0
- package/src/cmem/react-flow/_edges.scss +23 -0
- package/src/cmem/react-flow/_handles.scss +34 -0
- package/src/cmem/react-flow/_index.scss +5 -0
- package/src/cmem/react-flow/_minimap.scss +33 -0
- package/src/cmem/react-flow/_nodes.scss +66 -0
- package/src/cmem/react-flow/configuration/_colors-graph.module.scss +35 -0
- package/src/cmem/react-flow/configuration/_colors-linking.module.scss +29 -0
- package/src/cmem/react-flow/configuration/_colors-workflow.module.scss +22 -0
- package/src/cmem/react-flow/configuration/_colors.scss +3 -0
- package/src/cmem/react-flow/configuration/graph.ts +29 -0
- package/src/cmem/react-flow/configuration/linking.ts +28 -0
- package/src/cmem/react-flow/configuration/unspecified.ts +13 -0
- package/src/cmem/react-flow/configuration/workflow.ts +25 -0
- package/src/common/utils/stringUtils.ts +2 -0
- package/src/components/Accordion/accordion.scss +1 -2
- package/src/components/Application/ApplicationContent.tsx +0 -5
- package/src/components/Application/ApplicationTitle.tsx +0 -5
- package/src/components/AutoSuggestion/AutoSuggestion.scss +100 -0
- package/src/components/AutoSuggestion/AutoSuggestion.tsx +448 -0
- package/src/components/AutoSuggestion/AutoSuggestionList.tsx +170 -0
- package/src/components/AutoSuggestion/SingleLineCodeEditor.tsx +97 -0
- package/src/components/AutoSuggestion/tests/AutoSuggestion.test.tsx +37 -0
- package/src/components/AutoSuggestion/tests/AutoSuggestionList.test.tsx +124 -0
- package/src/components/AutoSuggestion/tests/SingleLineCodeEditor.test.tsx +55 -0
- package/src/components/AutocompleteField/AutoCompleteField.tsx +25 -23
- package/src/components/AutocompleteField/autoCompleteFieldUtils.tsx +2 -1
- 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 +4 -3
- 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/ContextOverlay/ContextMenu.tsx +8 -2
- package/src/components/Dialog/Modal.tsx +10 -3
- package/src/components/Dialog/SimpleDialog.tsx +2 -0
- 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/Icon.tsx +4 -4
- package/src/components/Icon/IconButton.tsx +3 -3
- package/src/components/Icon/canonicalIconNames.tsx +39 -2
- package/src/components/Iframe/Iframe.tsx +1 -1
- package/src/components/Menu/MenuItem.tsx +1 -1
- package/src/components/MultiSelect/MultiSelect.stories.tsx +71 -0
- package/src/components/MultiSelect/MultiSelect.tsx +373 -0
- 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 +111 -0
- package/src/components/Tabs/TabTitle.tsx +71 -0
- package/src/components/Tabs/Tabs.tsx +22 -90
- package/src/components/Tabs/stories/Tab.stories.tsx +65 -0
- package/src/components/Tabs/stories/TabTitle.stories.tsx +35 -0
- package/src/components/Tabs/stories/Tabs.stories.tsx +98 -0
- package/src/components/Tabs/tabs.scss +11 -4
- package/src/components/Tag/Tag.tsx +10 -3
- package/src/components/Tag/TagList.tsx +1 -0
- package/src/components/Tag/tag.scss +2 -2
- package/src/components/TextField/TextField.tsx +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/configuration/_variables.scss +3 -3
- package/src/extensions/react-flow/_config.scss +2 -2
- 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/_edges.scss +3 -28
- package/src/extensions/react-flow/edges/getSmoothStepPath.ts +118 -0
- package/src/extensions/react-flow/edges/utils.ts +131 -4
- package/src/extensions/react-flow/handles/_handles.scss +4 -58
- package/src/extensions/react-flow/minimap/MiniMap.tsx +1 -1
- package/src/extensions/react-flow/minimap/_minimap.scss +0 -45
- package/src/extensions/react-flow/nodes/NodeContent.tsx +141 -134
- package/src/extensions/react-flow/nodes/NodeContentExtension.tsx +17 -10
- package/src/extensions/react-flow/nodes/NodeDefault.tsx +2 -2
- package/src/extensions/react-flow/nodes/NodeTools.tsx +27 -10
- package/src/extensions/react-flow/nodes/_nodes.scss +61 -196
- package/src/extensions/react-flow/nodes/{NodeContent.stories.tsx → stories/NodeContent.stories.tsx} +14 -5
- package/src/extensions/react-flow/nodes/stories/NodeContentExtension.stories.tsx +59 -0
- package/src/extensions/react-flow/nodes/{NodeDefault.stories.tsx → stories/NodeDefault.stories.tsx} +5 -4
- package/src/index.scss +1 -0
- package/src/index.ts +19 -4
- package/src/legacy-replacements/Tabs/Tabs.stories.tsx +46 -0
- package/src/legacy-replacements/Tabs/Tabs.tsx +84 -0
- package/src/legacy-replacements/index.ts +11 -0
- package/src/test/setupTests.js +19 -0
- package/dist/es5/cmem/ActivityControl/ActivityControlWidget.js +0 -39
- 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/SilkActivityControl.js.map +0 -1
- package/dist/es5/cmem/index.js +0 -9
- package/dist/es5/cmem/index.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/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/Dialog/Modal.js.map +0 -1
- 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/Icon/Icon.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 +0 -50
- package/dist/es5/components/Tabs/Tabs.js.map +0 -1
- package/dist/es5/components/Tag/Tag.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 +0 -18
- 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 -92
- package/dist/es5/index.js.map +0 -1
- package/src/extensions/react-flow/nodes/NodeContentExtension.stories.tsx +0 -36
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
//@import "~@eccenca/gui-elements/src/configuration.default";
|
|
2
|
+
|
|
3
|
+
.ecc-auto-suggestion-box {
|
|
4
|
+
position: relative;
|
|
5
|
+
|
|
6
|
+
&__dropdown {
|
|
7
|
+
transition: all 300ms;
|
|
8
|
+
// TODO: Replace by variable
|
|
9
|
+
background-color: #fff;
|
|
10
|
+
position: absolute;
|
|
11
|
+
top: $eccgui-size-textfield-height-regular;
|
|
12
|
+
z-index:2;
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-flow: column wrap;
|
|
15
|
+
margin-top: 0;
|
|
16
|
+
max-width: 25rem;
|
|
17
|
+
max-height: 30rem;
|
|
18
|
+
// TODO: was: 1px solid $list-container-item-border-color
|
|
19
|
+
border: 1px solid;
|
|
20
|
+
border-radius: 0.3rem;
|
|
21
|
+
overflow-x:hidden;
|
|
22
|
+
overflow-y: auto;
|
|
23
|
+
|
|
24
|
+
.#{$ns}-menu, .#{$eccgui}-overviewitem__item {
|
|
25
|
+
max-width: 24rem;
|
|
26
|
+
box-sizing: border-box;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.ecc-input-editor {
|
|
32
|
+
position: relative;
|
|
33
|
+
|
|
34
|
+
.CodeMirror {
|
|
35
|
+
height: calc(#{$eccgui-size-textfield-height-regular} - 4px);
|
|
36
|
+
margin: 0;
|
|
37
|
+
padding: 0;
|
|
38
|
+
top: 2px;
|
|
39
|
+
overflow: hidden;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.CodeMirror-scroll {
|
|
43
|
+
margin: 0;
|
|
44
|
+
padding: 0;
|
|
45
|
+
overflow-y: hidden !important;
|
|
46
|
+
overflow-x: auto !important;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.CodeMirror-vscrollbar {
|
|
50
|
+
display: none !important;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.CodeMirror-sizer {
|
|
54
|
+
border: none;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.CodeMirror-lines {
|
|
58
|
+
padding: 0;
|
|
59
|
+
line-height: calc(#{$eccgui-size-textfield-height-regular} - 4px - 6px);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
pre.CodeMirror-line {
|
|
63
|
+
font-family: $eccgui-font-family-monospace;
|
|
64
|
+
font-size: 0.9em;
|
|
65
|
+
padding: 3px 0;
|
|
66
|
+
height: calc(#{$eccgui-size-textfield-height-regular} - 4px - 6px);
|
|
67
|
+
box-sizing: content-box;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.CodeMirror-cursor {
|
|
71
|
+
border: none;
|
|
72
|
+
margin: 0;
|
|
73
|
+
width: 1px;
|
|
74
|
+
background-color: transparent;
|
|
75
|
+
|
|
76
|
+
&::after {
|
|
77
|
+
content: " ";
|
|
78
|
+
height: 1rem;
|
|
79
|
+
width: 1px;
|
|
80
|
+
overflow: hidden;
|
|
81
|
+
background-color: black;
|
|
82
|
+
position: absolute;
|
|
83
|
+
top: 50%;
|
|
84
|
+
right: 0;
|
|
85
|
+
margin-top: -0.5rem;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.ecc-text-highlighting {
|
|
91
|
+
display: inline-block;
|
|
92
|
+
background-color: $eccgui-color-warning-background;
|
|
93
|
+
color:$eccgui-color-warning-text;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.ecc-text-error-highlighting {
|
|
97
|
+
background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg==");
|
|
98
|
+
background-position: left bottom;
|
|
99
|
+
background-repeat: repeat-x;
|
|
100
|
+
}
|
|
@@ -0,0 +1,448 @@
|
|
|
1
|
+
import React, {useCallback, useEffect, useState} from "react";
|
|
2
|
+
import CodeMirror from "codemirror";
|
|
3
|
+
import {FieldItem, IconButton, Spinner, Toolbar, ToolbarSection} from "./../../";
|
|
4
|
+
import {Classes as BlueprintClassNames} from "@blueprintjs/core";
|
|
5
|
+
|
|
6
|
+
//custom components
|
|
7
|
+
import SingleLineCodeEditor, {IRange} from "./SingleLineCodeEditor";
|
|
8
|
+
import {AutoSuggestionList} from "./AutoSuggestionList";
|
|
9
|
+
import {debounce} from "lodash";
|
|
10
|
+
|
|
11
|
+
export enum OVERWRITTEN_KEYS {
|
|
12
|
+
ArrowUp = "ArrowUp",
|
|
13
|
+
ArrowDown = "ArrowDown",
|
|
14
|
+
Enter = "Enter",
|
|
15
|
+
Tab = "Tab",
|
|
16
|
+
}
|
|
17
|
+
export type OverwrittenKeyTypes = typeof OVERWRITTEN_KEYS[keyof typeof OVERWRITTEN_KEYS];
|
|
18
|
+
|
|
19
|
+
/** A single suggestion. */
|
|
20
|
+
export interface ISuggestionBase {
|
|
21
|
+
// The actual value
|
|
22
|
+
value: string
|
|
23
|
+
// Optional human-readable label
|
|
24
|
+
label?: string
|
|
25
|
+
// Optional description of the value.
|
|
26
|
+
description?: string
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/** Same as ISuggestionBase, but with the query that was used to fetch this suggestion. */
|
|
30
|
+
export interface ISuggestionWithReplacementInfo extends ISuggestionBase {
|
|
31
|
+
// The query this result was filtered by
|
|
32
|
+
query: string
|
|
33
|
+
// The offset of the original string that should be replaced
|
|
34
|
+
from: number
|
|
35
|
+
// The length of the original string that should be replaced
|
|
36
|
+
length: number
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** The suggestions for a specific substring of the given input string. */
|
|
40
|
+
export interface IReplacementResult {
|
|
41
|
+
// The range of the input string that should be replaced
|
|
42
|
+
replacementInterval: {
|
|
43
|
+
from: number
|
|
44
|
+
length: number
|
|
45
|
+
}
|
|
46
|
+
// The extracted query from the local value at the cursor position of the path that was used to retrieve the suggestions.
|
|
47
|
+
extractedQuery: string
|
|
48
|
+
// The suggested replacements for the substring that should be replaced.
|
|
49
|
+
replacements: ISuggestionBase[]
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export interface IPartialAutoCompleteResult {
|
|
53
|
+
// Repeats the input string from the corresponding request
|
|
54
|
+
inputString: string
|
|
55
|
+
// Repeats the cursor position from the corresponding request
|
|
56
|
+
cursorPosition: number
|
|
57
|
+
replacementResults: IReplacementResult[]
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/** Validation result */
|
|
61
|
+
export interface IValidationResult {
|
|
62
|
+
// If the input value is valid or not
|
|
63
|
+
valid: boolean,
|
|
64
|
+
parseError?: {
|
|
65
|
+
// Detail error message
|
|
66
|
+
message: string
|
|
67
|
+
// Start of the parse error in the input string
|
|
68
|
+
start: number
|
|
69
|
+
// End of the parse error in the input string
|
|
70
|
+
end: number
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface IProps {
|
|
75
|
+
// Optional label to be shown for the input (above). This will create a FieldItem around the input.
|
|
76
|
+
label?: string
|
|
77
|
+
// The value the component is initialized with, do not use this to control value changes.
|
|
78
|
+
initialValue: string
|
|
79
|
+
// Callback on value change
|
|
80
|
+
onChange: (currentValue: string) => any
|
|
81
|
+
// Fetches the suggestions
|
|
82
|
+
fetchSuggestions: (inputString: string, cursorPosition: number) => (IPartialAutoCompleteResult | undefined) | Promise<IPartialAutoCompleteResult | undefined>
|
|
83
|
+
// Checks if the input is valid
|
|
84
|
+
checkInput?: (inputString: string) => IValidationResult | Promise<IValidationResult | undefined>
|
|
85
|
+
// Called with the input validation result
|
|
86
|
+
onInputChecked?: (validInput: boolean) => any
|
|
87
|
+
// Text that should be shown if the input validation failed.
|
|
88
|
+
validationErrorText?: string
|
|
89
|
+
// Text that should be shown when hovering over the clear icon
|
|
90
|
+
clearIconText?: string
|
|
91
|
+
// Called when focus status changes
|
|
92
|
+
onFocusChange?: (hasFocus: boolean) => any
|
|
93
|
+
// Optional ID to attach to the outer element
|
|
94
|
+
id?: string
|
|
95
|
+
// If the <Tab> key should be used for auto-completing items. Else it will have its default behavior.
|
|
96
|
+
useTabForCompletions?: boolean
|
|
97
|
+
/** An additional element that is put to the left side of the input field */
|
|
98
|
+
leftElement?: JSX.Element | null
|
|
99
|
+
// An additional element that is put to the right side of the input field
|
|
100
|
+
rightElement?: JSX.Element | null
|
|
101
|
+
/** Placeholder tobe shown when no text has been entered, yet. */
|
|
102
|
+
placeholder?: string
|
|
103
|
+
/** If the horizontal scrollbars should be shown. */
|
|
104
|
+
showScrollBar?: boolean
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/** Input component that allows partial, fine-grained auto-completion, i.e. of sub-strings of the input string.
|
|
108
|
+
* This is comparable to a one line code editor. */
|
|
109
|
+
const AutoSuggestion = ({
|
|
110
|
+
label,
|
|
111
|
+
initialValue,
|
|
112
|
+
onChange,
|
|
113
|
+
fetchSuggestions,
|
|
114
|
+
checkInput,
|
|
115
|
+
validationErrorText = "Invalid value",
|
|
116
|
+
clearIconText = "Clear",
|
|
117
|
+
onFocusChange,
|
|
118
|
+
id,
|
|
119
|
+
onInputChecked,
|
|
120
|
+
leftElement,
|
|
121
|
+
rightElement,
|
|
122
|
+
useTabForCompletions = false,
|
|
123
|
+
placeholder,
|
|
124
|
+
showScrollBar = true
|
|
125
|
+
}: IProps) => {
|
|
126
|
+
const [value, setValue] = React.useState(initialValue);
|
|
127
|
+
const [cursorPosition, setCursorPosition] = React.useState(0);
|
|
128
|
+
const [coords, setCoords] = React.useState({left: 0});
|
|
129
|
+
const [shouldShowDropdown, setShouldShowDropdown] = React.useState(false);
|
|
130
|
+
const [suggestions, setSuggestions] = React.useState<ISuggestionWithReplacementInfo[]>([]);
|
|
131
|
+
const [suggestionsPending, setSuggestionsPending] = React.useState(false);
|
|
132
|
+
const [pathValidationPending, setPathValidationPending] = React.useState(false)
|
|
133
|
+
const [, setErrorMarkers] = React.useState<CodeMirror.TextMarker[]>([]);
|
|
134
|
+
const [validationResponse, setValidationResponse] = useState<IValidationResult | undefined>(undefined)
|
|
135
|
+
const [suggestionResponse, setSuggestionResponse] = useState<IPartialAutoCompleteResult | undefined>(undefined)
|
|
136
|
+
// The element that should be used for replacement highlighting
|
|
137
|
+
const [highlightedElement, setHighlightedElement] = useState<ISuggestionWithReplacementInfo | undefined>(undefined)
|
|
138
|
+
const [editorInstance, setEditorInstance] = React.useState<CodeMirror.Editor>();
|
|
139
|
+
const [isFocused, setIsFocused] = React.useState(false);
|
|
140
|
+
/** Mutable editor state, since this needs to be current in scope of the SingleLineEditorComponent. */
|
|
141
|
+
const [editorState] = React.useState<{
|
|
142
|
+
index: number,
|
|
143
|
+
suggestions: ISuggestionWithReplacementInfo[],
|
|
144
|
+
editorInstance?: CodeMirror.Editor,
|
|
145
|
+
dropdownShown: boolean
|
|
146
|
+
}>({index: 0, suggestions: [], dropdownShown: false})
|
|
147
|
+
/** This is for the AutoSuggestionList component in order to re-render. */
|
|
148
|
+
const [focusedIndex, setFocusedIndex] = React.useState(0)
|
|
149
|
+
const [selectedTextRanges, setSelectedTextRanges] = useState<IRange[]>([])
|
|
150
|
+
|
|
151
|
+
const pathIsValid = validationResponse?.valid ?? true;
|
|
152
|
+
|
|
153
|
+
const setCurrentIndex = (newIndex: number) => {
|
|
154
|
+
editorState.index = newIndex
|
|
155
|
+
setFocusedIndex(newIndex)
|
|
156
|
+
}
|
|
157
|
+
const currentIndex = () => editorState.index
|
|
158
|
+
|
|
159
|
+
React.useEffect(() => {
|
|
160
|
+
editorState.editorInstance = editorInstance
|
|
161
|
+
}, [editorInstance, editorState])
|
|
162
|
+
|
|
163
|
+
React.useEffect(() => {
|
|
164
|
+
setValue(initialValue)
|
|
165
|
+
}, [initialValue])
|
|
166
|
+
|
|
167
|
+
React.useEffect(() => {
|
|
168
|
+
editorState.dropdownShown = shouldShowDropdown
|
|
169
|
+
}, [shouldShowDropdown, editorState])
|
|
170
|
+
|
|
171
|
+
// Handle replacement highlighting
|
|
172
|
+
useEffect(() => {
|
|
173
|
+
if (highlightedElement && editorInstance) {
|
|
174
|
+
const { from, length } = highlightedElement;
|
|
175
|
+
if(length > 0 && selectedTextRanges.length === 0) {
|
|
176
|
+
const to = from + length;
|
|
177
|
+
const marker = editorInstance.markText(
|
|
178
|
+
{line: 0, ch: from},
|
|
179
|
+
{line: 0, ch: to},
|
|
180
|
+
{className: "ecc-text-highlighting"}
|
|
181
|
+
);
|
|
182
|
+
return () => marker.clear()
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
return;
|
|
186
|
+
}, [highlightedElement, selectedTextRanges, editorInstance])
|
|
187
|
+
|
|
188
|
+
//handle linting
|
|
189
|
+
React.useEffect(() => {
|
|
190
|
+
const parseError = validationResponse?.parseError;
|
|
191
|
+
if (parseError && editorInstance) {
|
|
192
|
+
const { message, start, end } = parseError;
|
|
193
|
+
editorInstance.getDoc().getEditor()
|
|
194
|
+
const marker = editorInstance.markText(
|
|
195
|
+
{ line: 0, ch: start },
|
|
196
|
+
{ line: 0, ch: end },
|
|
197
|
+
{ className: "ecc-text-error-highlighting", title: message }
|
|
198
|
+
);
|
|
199
|
+
setErrorMarkers((previousMarkers) => {
|
|
200
|
+
previousMarkers.forEach(marker => marker.clear())
|
|
201
|
+
return [marker]
|
|
202
|
+
});
|
|
203
|
+
} else {
|
|
204
|
+
// Valid, clear all error markers
|
|
205
|
+
setErrorMarkers((previous) => {
|
|
206
|
+
previous.forEach(marker => marker.clear())
|
|
207
|
+
return []
|
|
208
|
+
})
|
|
209
|
+
}
|
|
210
|
+
onInputChecked && onInputChecked(!!validationResponse?.valid)
|
|
211
|
+
}, [validationResponse?.valid, validationResponse?.parseError, editorInstance, onInputChecked]);
|
|
212
|
+
|
|
213
|
+
/** generate suggestions and also populate the replacement indexes dict */
|
|
214
|
+
React.useEffect(() => {
|
|
215
|
+
let newSuggestions: ISuggestionWithReplacementInfo[] = [];
|
|
216
|
+
if (
|
|
217
|
+
suggestionResponse?.replacementResults?.length === 1 &&
|
|
218
|
+
!suggestionResponse?.replacementResults[0]?.replacements?.length
|
|
219
|
+
) {
|
|
220
|
+
setShouldShowDropdown(false);
|
|
221
|
+
}
|
|
222
|
+
if (suggestionResponse?.replacementResults?.length) {
|
|
223
|
+
suggestionResponse.replacementResults.forEach(
|
|
224
|
+
({ replacements, replacementInterval: { from, length }, extractedQuery }) => {
|
|
225
|
+
const replacementsWithMetaData = replacements.map(r => ({...r, query: extractedQuery, from, length}))
|
|
226
|
+
newSuggestions = [...newSuggestions, ...replacementsWithMetaData];
|
|
227
|
+
}
|
|
228
|
+
);
|
|
229
|
+
editorState.suggestions = newSuggestions
|
|
230
|
+
setSuggestions(newSuggestions);
|
|
231
|
+
} else {
|
|
232
|
+
editorState.suggestions = []
|
|
233
|
+
setSuggestions([])
|
|
234
|
+
}
|
|
235
|
+
editorState.index = 0
|
|
236
|
+
}, [suggestionResponse, editorState]);
|
|
237
|
+
|
|
238
|
+
const asyncCheckInput = async (inputString: string) => {
|
|
239
|
+
if(!checkInput) {
|
|
240
|
+
return
|
|
241
|
+
}
|
|
242
|
+
setPathValidationPending(true)
|
|
243
|
+
try {
|
|
244
|
+
const result: IValidationResult | undefined = await checkInput(inputString)
|
|
245
|
+
setValidationResponse(result)
|
|
246
|
+
} catch(e) {
|
|
247
|
+
setValidationResponse(undefined)
|
|
248
|
+
// TODO: Error handling
|
|
249
|
+
} finally {
|
|
250
|
+
setPathValidationPending(false)
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
const checkValuePathValidity = useCallback(
|
|
255
|
+
debounce((inputString: string) => asyncCheckInput(inputString), 200),
|
|
256
|
+
[checkInput]
|
|
257
|
+
)
|
|
258
|
+
|
|
259
|
+
const handleEditorInputChange = useCallback(
|
|
260
|
+
debounce((inputString: string, cursorPosition: number) => asyncHandleEditorInputChange(inputString, cursorPosition), 200),
|
|
261
|
+
[fetchSuggestions]
|
|
262
|
+
)
|
|
263
|
+
|
|
264
|
+
React.useEffect(() => {
|
|
265
|
+
if (isFocused) {
|
|
266
|
+
setShouldShowDropdown(true);
|
|
267
|
+
handleEditorInputChange(value, cursorPosition)
|
|
268
|
+
return handleEditorInputChange.cancel
|
|
269
|
+
}
|
|
270
|
+
return;
|
|
271
|
+
}, [cursorPosition, value, isFocused, handleEditorInputChange]);
|
|
272
|
+
|
|
273
|
+
// Trigger input validation
|
|
274
|
+
useEffect(() => {
|
|
275
|
+
checkValuePathValidity(value)
|
|
276
|
+
return checkValuePathValidity.cancel
|
|
277
|
+
}, [value, checkValuePathValidity])
|
|
278
|
+
|
|
279
|
+
const asyncHandleEditorInputChange = async (inputString: string, cursorPosition: number) => {
|
|
280
|
+
setSuggestionsPending(true)
|
|
281
|
+
try {
|
|
282
|
+
const result: IPartialAutoCompleteResult | undefined = await fetchSuggestions(inputString, cursorPosition)
|
|
283
|
+
setSuggestionResponse(result)
|
|
284
|
+
} catch(e) {
|
|
285
|
+
setSuggestionResponse(undefined)
|
|
286
|
+
// TODO: Error handling
|
|
287
|
+
} finally {
|
|
288
|
+
setSuggestionsPending(false)
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
const handleChange = (val: string) => {
|
|
293
|
+
setValue(val);
|
|
294
|
+
onChange(val)
|
|
295
|
+
};
|
|
296
|
+
|
|
297
|
+
const handleCursorChange = (pos: any, coords: any) => {
|
|
298
|
+
setCursorPosition(pos.ch);
|
|
299
|
+
setCoords(() => coords);
|
|
300
|
+
};
|
|
301
|
+
|
|
302
|
+
const handleInputEditorKeyPress = (event: KeyboardEvent) => {
|
|
303
|
+
const overWrittenKeys: Array<string> = Object.values(OVERWRITTEN_KEYS);
|
|
304
|
+
if (overWrittenKeys.includes(event.key) && (useTabForCompletions || event.key !== OVERWRITTEN_KEYS.Tab)) {
|
|
305
|
+
event.preventDefault();
|
|
306
|
+
makeDropDownRespondToKeyPress(OVERWRITTEN_KEYS[event.key as keyof typeof OVERWRITTEN_KEYS]);
|
|
307
|
+
}
|
|
308
|
+
};
|
|
309
|
+
|
|
310
|
+
const closeDropDown = () => {
|
|
311
|
+
setHighlightedElement(undefined)
|
|
312
|
+
setShouldShowDropdown(false)
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
const handleDropdownChange = (selectedSuggestion: ISuggestionWithReplacementInfo) => {
|
|
316
|
+
if (selectedSuggestion && editorState.editorInstance) {
|
|
317
|
+
const { from, length, value } = selectedSuggestion;
|
|
318
|
+
const to = from + length;
|
|
319
|
+
editorState.editorInstance.replaceRange(selectedSuggestion.value, {line: 0, ch: from}, {line: 0, ch: to})
|
|
320
|
+
closeDropDown()
|
|
321
|
+
editorState.editorInstance.setCursor({ line: 0, ch: from + value.length });
|
|
322
|
+
editorState.editorInstance.focus();
|
|
323
|
+
}
|
|
324
|
+
};
|
|
325
|
+
|
|
326
|
+
const handleInputEditorClear = () => {
|
|
327
|
+
handleChange("");
|
|
328
|
+
setValue("")
|
|
329
|
+
editorInstance?.focus();
|
|
330
|
+
};
|
|
331
|
+
|
|
332
|
+
const handleInputFocus = (focusState: boolean) => {
|
|
333
|
+
onFocusChange && onFocusChange(focusState)
|
|
334
|
+
setIsFocused(focusState)
|
|
335
|
+
focusState ? setShouldShowDropdown(true) : closeDropDown()
|
|
336
|
+
};
|
|
337
|
+
|
|
338
|
+
//keyboard handlers
|
|
339
|
+
const handleArrowDown = () => {
|
|
340
|
+
const lastSuggestionIndex = editorState.suggestions.length - 1;
|
|
341
|
+
setCurrentIndex(currentIndex() === lastSuggestionIndex ? 0 : currentIndex() + 1)
|
|
342
|
+
};
|
|
343
|
+
|
|
344
|
+
const handleArrowUp = () => {
|
|
345
|
+
const lastSuggestionIndex = editorState.suggestions.length - 1;
|
|
346
|
+
setCurrentIndex(currentIndex() === 0 ? lastSuggestionIndex : currentIndex() - 1)
|
|
347
|
+
};
|
|
348
|
+
|
|
349
|
+
const handleEnterPressed = () => {
|
|
350
|
+
handleDropdownChange(editorState.suggestions[currentIndex()]);
|
|
351
|
+
setCurrentIndex(0);
|
|
352
|
+
};
|
|
353
|
+
|
|
354
|
+
const handleTabPressed = () => {
|
|
355
|
+
handleDropdownChange(editorState.suggestions[currentIndex()]);
|
|
356
|
+
};
|
|
357
|
+
|
|
358
|
+
const makeDropDownRespondToKeyPress = (keyPressedFromInput: OverwrittenKeyTypes) => {
|
|
359
|
+
// React state unknown
|
|
360
|
+
if (editorState.dropdownShown) {
|
|
361
|
+
switch (keyPressedFromInput) {
|
|
362
|
+
case OVERWRITTEN_KEYS.ArrowUp:
|
|
363
|
+
handleArrowUp();
|
|
364
|
+
break;
|
|
365
|
+
case OVERWRITTEN_KEYS.ArrowDown:
|
|
366
|
+
handleArrowDown();
|
|
367
|
+
break;
|
|
368
|
+
case OVERWRITTEN_KEYS.Enter:
|
|
369
|
+
handleEnterPressed();
|
|
370
|
+
break;
|
|
371
|
+
case OVERWRITTEN_KEYS.Tab:
|
|
372
|
+
handleTabPressed();
|
|
373
|
+
break;
|
|
374
|
+
default:
|
|
375
|
+
//do nothing
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
};
|
|
379
|
+
|
|
380
|
+
const handleItemHighlighting = React.useCallback((item: ISuggestionWithReplacementInfo | undefined) => {
|
|
381
|
+
setHighlightedElement(item)
|
|
382
|
+
}, [])
|
|
383
|
+
|
|
384
|
+
const hasError = !!value && !pathIsValid && !pathValidationPending;
|
|
385
|
+
const autoSuggestionInput = <div id={id} className="ecc-auto-suggestion-box">
|
|
386
|
+
<div className={`ecc-auto-suggestion-box__editor-box ${BlueprintClassNames.INPUT_GROUP} ${BlueprintClassNames.FILL} ${hasError ? BlueprintClassNames.INTENT_DANGER : ""}`}>
|
|
387
|
+
<SingleLineCodeEditor
|
|
388
|
+
mode="null"
|
|
389
|
+
setEditorInstance={setEditorInstance}
|
|
390
|
+
onChange={handleChange}
|
|
391
|
+
onCursorChange={handleCursorChange}
|
|
392
|
+
initialValue={value}
|
|
393
|
+
onFocusChange={handleInputFocus}
|
|
394
|
+
onKeyDown={handleInputEditorKeyPress}
|
|
395
|
+
enableTab={useTabForCompletions}
|
|
396
|
+
placeholder={placeholder}
|
|
397
|
+
onSelection={setSelectedTextRanges}
|
|
398
|
+
showScrollBar={showScrollBar}
|
|
399
|
+
/>
|
|
400
|
+
{!!value && (
|
|
401
|
+
<span className={BlueprintClassNames.INPUT_ACTION}>
|
|
402
|
+
<IconButton
|
|
403
|
+
data-test-id={"value-path-clear-btn"}
|
|
404
|
+
name="operation-clear"
|
|
405
|
+
text={clearIconText}
|
|
406
|
+
onClick={handleInputEditorClear}
|
|
407
|
+
/>
|
|
408
|
+
</span>
|
|
409
|
+
)}
|
|
410
|
+
</div>
|
|
411
|
+
{shouldShowDropdown ? <AutoSuggestionList
|
|
412
|
+
left={coords.left}
|
|
413
|
+
loading={suggestionsPending}
|
|
414
|
+
options={suggestions}
|
|
415
|
+
isOpen={!suggestionsPending && shouldShowDropdown}
|
|
416
|
+
onItemSelectionChange={handleDropdownChange}
|
|
417
|
+
currentlyFocusedIndex={focusedIndex}
|
|
418
|
+
itemToHighlight={handleItemHighlighting}
|
|
419
|
+
/> : null}
|
|
420
|
+
</div>
|
|
421
|
+
|
|
422
|
+
const withRightElement = rightElement || leftElement ? <Toolbar noWrap={true}>
|
|
423
|
+
{leftElement && <ToolbarSection>{leftElement}</ToolbarSection>}
|
|
424
|
+
<ToolbarSection canGrow={true}>{autoSuggestionInput}</ToolbarSection>
|
|
425
|
+
{rightElement && <ToolbarSection>{rightElement}</ToolbarSection>}
|
|
426
|
+
</Toolbar> : autoSuggestionInput
|
|
427
|
+
|
|
428
|
+
return label ? (
|
|
429
|
+
<FieldItem
|
|
430
|
+
labelAttributes={{
|
|
431
|
+
text: (
|
|
432
|
+
<>
|
|
433
|
+
{label}
|
|
434
|
+
|
|
435
|
+
{(pathValidationPending || suggestionsPending) && (
|
|
436
|
+
<Spinner size="tiny" position="inline" description="Validating value path" />
|
|
437
|
+
)}
|
|
438
|
+
</>)
|
|
439
|
+
}}
|
|
440
|
+
hasStateDanger={hasError}
|
|
441
|
+
messageText={hasError ? validationErrorText : undefined}
|
|
442
|
+
>
|
|
443
|
+
{withRightElement}
|
|
444
|
+
</FieldItem>
|
|
445
|
+
) : withRightElement
|
|
446
|
+
};
|
|
447
|
+
|
|
448
|
+
export default AutoSuggestion;
|