@eccenca/gui-elements 6.3.0 → 22.0.0-rc.6
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 +98 -880
- package/LICENSE +202 -0
- package/README.md +56 -1240
- package/blueprint/constants.ts +7 -0
- package/blueprint/toaster/index.tsx +1 -0
- package/dist/cmem/ActivityControl/ActivityControlTypes.d.ts +15 -0
- package/dist/cmem/ActivityControl/ActivityControlTypes.js +1 -0
- package/dist/cmem/ActivityControl/ActivityControlWidget.d.ts +32 -0
- package/dist/cmem/ActivityControl/ActivityControlWidget.js +92 -0
- package/dist/cmem/ActivityControl/ActivityControlWidget.jsx +45 -0
- package/dist/cmem/ActivityControl/ActivityExecutionErrorReportModal.d.ts +12 -0
- package/dist/cmem/ActivityControl/ActivityExecutionErrorReportModal.js +59 -0
- package/dist/cmem/ActivityControl/ActivityExecutionErrorReportModal.jsx +76 -0
- package/dist/cmem/ActivityControl/SilkActivityControl.d.ts +62 -0
- package/dist/cmem/ActivityControl/SilkActivityControl.js +219 -0
- package/dist/cmem/ActivityControl/SilkActivityControl.jsx +217 -0
- package/dist/cmem/ContentBlobToggler/ContentBlobToggler.d.ts +34 -0
- package/dist/cmem/ContentBlobToggler/ContentBlobToggler.js +56 -0
- package/dist/cmem/ContentBlobToggler/ContentBlobToggler.jsx +62 -0
- package/dist/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.d.ts +42 -0
- package/dist/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.js +52 -0
- package/dist/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.jsx +17 -0
- package/dist/cmem/DateTimeDisplay/ElapsedDateTimeDisplay.d.ts +15 -0
- package/dist/cmem/DateTimeDisplay/ElapsedDateTimeDisplay.js +80 -0
- package/dist/cmem/DateTimeDisplay/ElapsedDateTimeDisplay.jsx +77 -0
- package/dist/cmem/index.d.ts +10 -0
- package/dist/cmem/index.js +67 -0
- package/dist/cmem/markdown/Markdown.d.ts +16 -0
- package/dist/cmem/markdown/Markdown.js +75 -0
- package/dist/cmem/markdown/Markdown.jsx +87 -0
- package/dist/cmem/markdown/highlightSearchWords.js +84 -0
- package/dist/common/Intent/index.d.ts +7 -0
- package/dist/common/Intent/index.js +33 -0
- package/dist/common/utils/openInNewTab.d.ts +3 -0
- package/dist/common/utils/openInNewTab.js +22 -0
- package/dist/components/Accordion/Accordion.d.ts +3 -0
- package/dist/components/Accordion/Accordion.js +31 -0
- package/dist/components/Accordion/Accordion.jsx +21 -0
- package/dist/components/Accordion/AccordionItem.d.ts +15 -0
- package/dist/components/Accordion/AccordionItem.js +37 -0
- package/dist/components/Accordion/AccordionItem.jsx +27 -0
- package/dist/components/Application/ApplicationContainer.d.ts +6 -0
- package/dist/components/Application/ApplicationContainer.js +27 -0
- package/dist/components/Application/ApplicationContainer.jsx +20 -0
- package/dist/components/Application/ApplicationContent.d.ts +22 -0
- package/dist/components/Application/ApplicationContent.js +48 -0
- package/dist/components/Application/ApplicationContent.jsx +34 -0
- package/dist/components/Application/ApplicationHeader.d.ts +3 -0
- package/dist/components/Application/ApplicationHeader.js +29 -0
- package/dist/components/Application/ApplicationHeader.jsx +22 -0
- package/dist/components/Application/ApplicationSidebarNavigation.d.ts +12 -0
- package/dist/components/Application/ApplicationSidebarNavigation.js +36 -0
- package/dist/components/Application/ApplicationSidebarNavigation.jsx +22 -0
- package/dist/components/Application/ApplicationSidebarToggler.d.ts +3 -0
- package/dist/components/Application/ApplicationSidebarToggler.js +28 -0
- package/dist/components/Application/ApplicationSidebarToggler.jsx +19 -0
- package/dist/components/Application/ApplicationTitle.d.ts +40 -0
- package/dist/components/Application/ApplicationTitle.js +53 -0
- package/dist/components/Application/ApplicationTitle.jsx +39 -0
- package/dist/components/Application/ApplicationToolbar.d.ts +3 -0
- package/dist/components/Application/ApplicationToolbar.js +30 -0
- package/dist/components/Application/ApplicationToolbar.jsx +22 -0
- package/dist/components/Application/ApplicationToolbarAction.d.ts +3 -0
- package/dist/components/Application/ApplicationToolbarAction.js +30 -0
- package/dist/components/Application/ApplicationToolbarAction.jsx +22 -0
- package/dist/components/Application/ApplicationToolbarPanel.d.ts +3 -0
- package/dist/components/Application/ApplicationToolbarPanel.js +30 -0
- package/dist/components/Application/ApplicationToolbarPanel.jsx +22 -0
- package/dist/components/Application/ApplicationToolbarSection.d.ts +3 -0
- package/dist/components/Application/ApplicationToolbarSection.js +27 -0
- package/dist/components/Application/ApplicationToolbarSection.jsx +20 -0
- package/dist/components/AutocompleteField/AutoCompleteField.d.ts +110 -0
- package/dist/components/AutocompleteField/AutoCompleteField.js +309 -0
- package/dist/components/AutocompleteField/AutoCompleteField.jsx +295 -0
- package/dist/components/AutocompleteField/autoCompleteFieldUtils.js +42 -0
- package/dist/components/Breadcrumb/BreadcrumbItem.d.ts +5 -0
- package/dist/components/Breadcrumb/BreadcrumbItem.js +45 -0
- package/dist/components/Breadcrumb/BreadcrumbItem.jsx +30 -0
- package/dist/components/Breadcrumb/BreadcrumbList.d.ts +24 -0
- package/dist/components/Breadcrumb/BreadcrumbList.js +60 -0
- package/dist/components/Breadcrumb/BreadcrumbList.jsx +35 -0
- package/dist/components/Button/Button.d.ts +58 -0
- package/dist/components/Button/Button.js +84 -0
- package/dist/components/Button/Button.jsx +48 -0
- package/dist/components/Card/Card.d.ts +23 -0
- package/dist/components/Card/Card.js +44 -0
- package/dist/components/Card/Card.jsx +31 -0
- package/dist/components/Card/CardActions.d.ts +14 -0
- package/dist/components/Card/CardActions.js +33 -0
- package/dist/components/Card/CardActions.jsx +27 -0
- package/dist/components/Card/CardActionsAux.d.ts +9 -0
- package/dist/components/Card/CardActionsAux.js +32 -0
- package/dist/components/Card/CardActionsAux.jsx +26 -0
- package/dist/components/Card/CardContent.d.ts +9 -0
- package/dist/components/Card/CardContent.js +32 -0
- package/dist/components/Card/CardContent.jsx +25 -0
- package/dist/components/Card/CardHeader.d.ts +7 -0
- package/dist/components/Card/CardHeader.js +52 -0
- package/dist/components/Card/CardHeader.jsx +41 -0
- package/dist/components/Card/CardOptions.d.ts +11 -0
- package/dist/components/Card/CardOptions.js +35 -0
- package/dist/components/Card/CardOptions.jsx +28 -0
- package/dist/components/Card/CardTitle.d.ts +13 -0
- package/dist/components/Card/CardTitle.js +37 -0
- package/dist/components/Card/CardTitle.jsx +26 -0
- package/dist/components/Card/index.d.ts +8 -0
- package/dist/components/Card/index.js +63 -0
- package/dist/components/Card/index.jsx +8 -0
- package/dist/components/Checkbox/Checkbox.d.ts +3 -0
- package/dist/components/Checkbox/Checkbox.js +30 -0
- package/dist/components/Checkbox/Checkbox.jsx +22 -0
- package/dist/components/ContextOverlay/ContextMenu.d.ts +3 -0
- package/dist/components/ContextOverlay/ContextMenu.js +48 -0
- package/dist/components/ContextOverlay/ContextMenu.jsx +30 -0
- package/dist/components/ContextOverlay/ContextOverlay.d.ts +3 -0
- package/dist/components/ContextOverlay/ContextOverlay.js +37 -0
- package/dist/components/ContextOverlay/ContextOverlay.jsx +27 -0
- package/dist/components/Dialog/AlertDialog.d.ts +22 -0
- package/dist/components/Dialog/AlertDialog.js +56 -0
- package/dist/components/Dialog/AlertDialog.jsx +39 -0
- package/dist/components/Dialog/Modal.d.ts +25 -0
- package/dist/components/Dialog/Modal.js +67 -0
- package/dist/components/Dialog/Modal.jsx +49 -0
- package/dist/components/Dialog/SimpleDialog.d.ts +41 -0
- package/dist/components/Dialog/SimpleDialog.js +62 -0
- package/dist/components/Dialog/SimpleDialog.jsx +50 -0
- package/dist/components/Form/FieldItem.d.ts +16 -0
- package/dist/components/Form/FieldItem.js +82 -0
- package/dist/components/Form/FieldItem.jsx +48 -0
- package/dist/components/Form/FieldItemRow.d.ts +3 -0
- package/dist/components/Form/FieldItemRow.js +30 -0
- package/dist/components/Form/FieldItemRow.jsx +23 -0
- package/dist/components/Form/FieldSet.d.ts +3 -0
- package/dist/components/Form/FieldSet.js +73 -0
- package/dist/components/Form/FieldSet.jsx +49 -0
- package/dist/components/Grid/Grid.d.ts +3 -0
- package/dist/components/Grid/Grid.js +33 -0
- package/dist/components/Grid/Grid.jsx +25 -0
- package/dist/components/Grid/GridColumn.d.ts +3 -0
- package/dist/components/Grid/GridColumn.js +43 -0
- package/dist/components/Grid/GridColumn.jsx +29 -0
- package/dist/components/Grid/GridRow.d.ts +3 -0
- package/dist/components/Grid/GridRow.js +33 -0
- package/dist/components/Grid/GridRow.jsx +26 -0
- package/dist/components/Icon/Icon.d.ts +20 -0
- package/dist/components/Icon/Icon.js +91 -0
- package/dist/components/Icon/Icon.jsx +88 -0
- package/dist/components/Icon/IconButton.d.ts +17 -0
- package/dist/components/Icon/IconButton.js +49 -0
- package/dist/components/Icon/IconButton.jsx +21 -0
- package/dist/components/Icon/canonicalIconNames.d.ts +10 -0
- package/dist/components/Icon/canonicalIconNames.js +547 -0
- package/dist/components/Icon/canonicalIconNames.jsx +534 -0
- package/dist/components/Iframe/Iframe.d.ts +18 -0
- package/dist/components/Iframe/Iframe.js +92 -0
- package/dist/components/Iframe/Iframe.jsx +79 -0
- package/dist/components/Iframe/IframeModal.d.ts +12 -0
- package/dist/components/Iframe/IframeModal.js +66 -0
- package/dist/components/Iframe/IframeModal.jsx +49 -0
- package/dist/components/Label/Label.d.ts +3 -0
- package/dist/components/Label/Label.js +58 -0
- package/dist/components/Label/Label.jsx +32 -0
- package/dist/components/Link/Link.d.ts +3 -0
- package/dist/components/Link/Link.js +36 -0
- package/dist/components/Link/Link.jsx +22 -0
- package/dist/components/List/List.d.ts +17 -0
- package/dist/components/List/List.js +50 -0
- package/dist/components/List/List.jsx +44 -0
- package/dist/components/Menu/Menu.d.ts +3 -0
- package/dist/components/Menu/Menu.js +29 -0
- package/dist/components/Menu/Menu.jsx +19 -0
- package/dist/components/Menu/MenuDivider.d.ts +3 -0
- package/dist/components/Menu/MenuDivider.js +29 -0
- package/dist/components/Menu/MenuDivider.jsx +19 -0
- package/dist/components/Menu/MenuItem.d.ts +13 -0
- package/dist/components/Menu/MenuItem.js +45 -0
- package/dist/components/Menu/MenuItem.jsx +27 -0
- package/dist/components/Notification/Notification.d.ts +3 -0
- package/dist/components/Notification/Notification.js +79 -0
- package/dist/components/Notification/Notification.jsx +48 -0
- package/dist/components/Notification/Toast.d.ts +3 -0
- package/dist/components/Notification/Toast.js +31 -0
- package/dist/components/Notification/Toast.jsx +21 -0
- package/dist/components/NumericInput/NumericInput.d.ts +4 -0
- package/dist/components/NumericInput/NumericInput.js +14 -0
- package/dist/components/NumericInput/NumericInput.jsx +3 -0
- package/dist/components/OverviewItem/OverviewItem.d.ts +17 -0
- package/dist/components/OverviewItem/OverviewItem.js +45 -0
- package/dist/components/OverviewItem/OverviewItem.jsx +37 -0
- package/dist/components/OverviewItem/OverviewItemActions.d.ts +13 -0
- package/dist/components/OverviewItem/OverviewItemActions.js +32 -0
- package/dist/components/OverviewItem/OverviewItemActions.jsx +26 -0
- package/dist/components/OverviewItem/OverviewItemDepiction.d.ts +6 -0
- package/dist/components/OverviewItem/OverviewItemDepiction.js +28 -0
- package/dist/components/OverviewItem/OverviewItemDepiction.jsx +22 -0
- package/dist/components/OverviewItem/OverviewItemDescription.d.ts +3 -0
- package/dist/components/OverviewItem/OverviewItemDescription.js +27 -0
- package/dist/components/OverviewItem/OverviewItemDescription.jsx +20 -0
- package/dist/components/OverviewItem/OverviewItemLine.d.ts +19 -0
- package/dist/components/OverviewItem/OverviewItemLine.js +35 -0
- package/dist/components/OverviewItem/OverviewItemLine.jsx +29 -0
- package/dist/components/OverviewItem/OverviewItemList.d.ts +26 -0
- package/dist/components/OverviewItem/OverviewItemList.js +38 -0
- package/dist/components/OverviewItem/OverviewItemList.jsx +31 -0
- package/dist/components/OverviewItem/index.d.ts +7 -0
- package/dist/components/OverviewItem/index.js +55 -0
- package/dist/components/OverviewItem/index.jsx +7 -0
- package/dist/components/Pagination/Pagination.d.ts +17 -0
- package/dist/components/Pagination/Pagination.js +80 -0
- package/dist/components/Pagination/Pagination.jsx +81 -0
- package/dist/components/ProgressBar/ProgressBar.d.ts +3 -0
- package/dist/components/ProgressBar/ProgressBar.js +12 -0
- package/dist/components/ProgressBar/ProgressBar.jsx +3 -0
- package/dist/components/PropertyValuePair/PropertyName.d.ts +3 -0
- package/dist/components/PropertyValuePair/PropertyName.js +32 -0
- package/dist/components/PropertyValuePair/PropertyName.jsx +21 -0
- package/dist/components/PropertyValuePair/PropertyValue.d.ts +3 -0
- package/dist/components/PropertyValuePair/PropertyValue.js +27 -0
- package/dist/components/PropertyValuePair/PropertyValue.jsx +20 -0
- package/dist/components/PropertyValuePair/PropertyValueList.d.ts +3 -0
- package/dist/components/PropertyValuePair/PropertyValueList.js +27 -0
- package/dist/components/PropertyValuePair/PropertyValueList.jsx +20 -0
- package/dist/components/PropertyValuePair/PropertyValuePair.d.ts +3 -0
- package/dist/components/PropertyValuePair/PropertyValuePair.js +29 -0
- package/dist/components/PropertyValuePair/PropertyValuePair.jsx +23 -0
- package/dist/components/PropertyValuePair/index.d.ts +5 -0
- package/dist/components/PropertyValuePair/index.js +39 -0
- package/dist/components/PropertyValuePair/index.jsx +5 -0
- package/dist/components/RadioButton/RadioButton.d.ts +3 -0
- package/dist/components/RadioButton/RadioButton.js +30 -0
- package/dist/components/RadioButton/RadioButton.jsx +22 -0
- package/dist/components/Separation/Divider.d.ts +3 -0
- package/dist/components/Separation/Divider.js +23 -0
- package/dist/components/Separation/Divider.jsx +7 -0
- package/dist/components/Separation/Spacing.d.ts +9 -0
- package/dist/components/Separation/Spacing.js +27 -0
- package/dist/components/Separation/Spacing.jsx +11 -0
- package/dist/components/SimpleTable/TableContainer.d.ts +3 -0
- package/dist/components/SimpleTable/TableContainer.js +37 -0
- package/dist/components/SimpleTable/TableContainer.jsx +27 -0
- package/dist/components/SimpleTable/index.d.ts +3 -0
- package/dist/components/SimpleTable/index.js +53 -0
- package/dist/components/SimpleTable/index.jsx +3 -0
- package/dist/components/Spinner/Spinner.d.ts +19 -0
- package/dist/components/Spinner/Spinner.js +98 -0
- package/dist/components/Spinner/Spinner.jsx +83 -0
- package/dist/components/Structure/Section.d.ts +3 -0
- package/dist/components/Structure/Section.js +27 -0
- package/dist/components/Structure/Section.jsx +20 -0
- package/dist/components/Structure/SectionHeader.d.ts +3 -0
- package/dist/components/Structure/SectionHeader.js +27 -0
- package/dist/components/Structure/SectionHeader.jsx +20 -0
- package/dist/components/Structure/TitleMainsection.d.ts +3 -0
- package/dist/components/Structure/TitleMainsection.js +35 -0
- package/dist/components/Structure/TitleMainsection.jsx +26 -0
- package/dist/components/Structure/TitlePage.d.ts +3 -0
- package/dist/components/Structure/TitlePage.js +35 -0
- package/dist/components/Structure/TitlePage.jsx +26 -0
- package/dist/components/Structure/TitleSubsection.d.ts +3 -0
- package/dist/components/Structure/TitleSubsection.js +32 -0
- package/dist/components/Structure/TitleSubsection.jsx +23 -0
- package/dist/components/Switch/Switch.d.ts +4 -0
- package/dist/components/Switch/Switch.js +39 -0
- package/dist/components/Switch/Switch.jsx +22 -0
- package/dist/components/Tabs/Tabs.d.ts +24 -0
- package/dist/components/Tabs/Tabs.js +95 -0
- package/dist/components/Tabs/Tabs.jsx +49 -0
- package/dist/components/Tag/Tag.d.ts +27 -0
- package/dist/components/Tag/Tag.js +50 -0
- package/dist/components/Tag/Tag.jsx +46 -0
- package/dist/components/Tag/TagList.d.ts +3 -0
- package/dist/components/Tag/TagList.js +44 -0
- package/dist/components/Tag/TagList.jsx +38 -0
- package/dist/components/TextField/SearchField.d.ts +23 -0
- package/dist/components/TextField/SearchField.js +54 -0
- package/dist/components/TextField/SearchField.jsx +27 -0
- package/dist/components/TextField/TextArea.d.ts +22 -0
- package/dist/components/TextField/TextArea.js +60 -0
- package/dist/components/TextField/TextArea.jsx +36 -0
- package/dist/components/TextField/TextField.d.ts +34 -0
- package/dist/components/TextField/TextField.js +73 -0
- package/dist/components/TextField/TextField.jsx +40 -0
- package/dist/components/Toolbar/Toolbar.d.ts +18 -0
- package/dist/components/Toolbar/Toolbar.js +32 -0
- package/dist/components/Toolbar/Toolbar.jsx +26 -0
- package/dist/components/Toolbar/ToolbarSection.d.ts +22 -0
- package/dist/components/Toolbar/ToolbarSection.js +34 -0
- package/dist/components/Toolbar/ToolbarSection.jsx +28 -0
- package/dist/components/Tooltip/Tooltip.d.ts +17 -0
- package/dist/components/Tooltip/Tooltip.js +40 -0
- package/dist/components/Tooltip/Tooltip.jsx +25 -0
- package/dist/components/Typography/Highlighter.d.ts +18 -0
- package/dist/components/Typography/Highlighter.js +89 -0
- package/dist/components/Typography/Highlighter.jsx +58 -0
- package/dist/components/Typography/HtmlContentBlock.d.ts +6 -0
- package/dist/components/Typography/HtmlContentBlock.js +38 -0
- package/dist/components/Typography/HtmlContentBlock.jsx +31 -0
- package/dist/components/Typography/OverflowText.d.ts +12 -0
- package/dist/components/Typography/OverflowText.js +34 -0
- package/dist/components/Typography/OverflowText.jsx +31 -0
- package/dist/components/Typography/WhiteSpaceContainer.d.ts +5 -0
- package/dist/components/Typography/WhiteSpaceContainer.js +38 -0
- package/dist/components/Typography/WhiteSpaceContainer.jsx +34 -0
- package/dist/components/Typography/classnames.d.ts +7 -0
- package/dist/components/Typography/classnames.js +24 -0
- package/dist/components/Workspace/WorkspaceContent.d.ts +3 -0
- package/dist/components/Workspace/WorkspaceContent.js +34 -0
- package/dist/components/Workspace/WorkspaceContent.jsx +25 -0
- package/dist/components/Workspace/WorkspaceHeader.d.ts +10 -0
- package/dist/components/Workspace/WorkspaceHeader.js +27 -0
- package/dist/components/Workspace/WorkspaceHeader.jsx +20 -0
- package/dist/components/Workspace/WorkspaceMain.d.ts +3 -0
- package/dist/components/Workspace/WorkspaceMain.js +30 -0
- package/dist/components/Workspace/WorkspaceMain.jsx +22 -0
- package/dist/components/Workspace/WorkspaceSide.d.ts +3 -0
- package/dist/components/Workspace/WorkspaceSide.js +34 -0
- package/dist/components/Workspace/WorkspaceSide.jsx +22 -0
- package/dist/components/interfaces.d.ts +3 -0
- package/dist/components/interfaces.js +1 -0
- package/dist/configuration/constants.d.ts +1 -0
- package/dist/configuration/constants.js +9 -0
- package/dist/extensions/react-flow/edges/EdgeDefault.d.ts +10 -0
- package/dist/extensions/react-flow/edges/EdgeDefault.js +62 -0
- package/dist/extensions/react-flow/edges/EdgeDefault.jsx +45 -0
- package/dist/extensions/react-flow/edges/EdgeStep.d.ts +9 -0
- package/dist/extensions/react-flow/edges/EdgeStep.js +27 -0
- package/dist/extensions/react-flow/edges/EdgeStep.jsx +6 -0
- package/dist/extensions/react-flow/edges/EdgeTools.d.ts +12 -0
- package/dist/extensions/react-flow/edges/EdgeTools.js +48 -0
- package/dist/extensions/react-flow/edges/EdgeTools.jsx +32 -0
- package/dist/extensions/react-flow/edges/edgeTypes.d.ts +15 -0
- package/dist/extensions/react-flow/edges/edgeTypes.js +32 -0
- package/dist/extensions/react-flow/edges/utils.d.ts +4 -0
- package/dist/extensions/react-flow/edges/utils.js +41 -0
- package/dist/extensions/react-flow/handles/HandleContent.d.ts +6 -0
- package/dist/extensions/react-flow/handles/HandleContent.js +40 -0
- package/dist/extensions/react-flow/handles/HandleContent.jsx +15 -0
- package/dist/extensions/react-flow/handles/HandleDefault.d.ts +9 -0
- package/dist/extensions/react-flow/handles/HandleDefault.js +33 -0
- package/dist/extensions/react-flow/handles/HandleDefault.jsx +23 -0
- package/dist/extensions/react-flow/index.d.ts +14 -0
- package/dist/extensions/react-flow/index.js +83 -0
- package/dist/extensions/react-flow/minimap/MiniMap.d.ts +8 -0
- package/dist/extensions/react-flow/minimap/MiniMap.js +111 -0
- package/dist/extensions/react-flow/minimap/MiniMap.jsx +83 -0
- package/dist/extensions/react-flow/minimap/utils.d.ts +2 -0
- package/dist/extensions/react-flow/minimap/utils.js +29 -0
- package/dist/extensions/react-flow/nodes/NodeContentExtension.js +56 -0
- package/dist/extensions/react-flow/nodes/NodeDefault.d.ts +133 -0
- package/dist/extensions/react-flow/nodes/NodeDefault.js +223 -0
- package/dist/extensions/react-flow/nodes/NodeDefault.jsx +175 -0
- package/dist/extensions/react-flow/nodes/NodeTools.d.ts +9 -0
- package/dist/extensions/react-flow/nodes/NodeTools.js +58 -0
- package/dist/extensions/react-flow/nodes/NodeTools.jsx +46 -0
- package/dist/extensions/react-flow/nodes/nodeTypes.d.ts +13 -0
- package/dist/extensions/react-flow/nodes/nodeTypes.js +22 -0
- package/dist/index.d.ts +92 -0
- package/dist/index.js +876 -0
- package/dist/legacy-replacements/Button/AffirmativeButton.js +23 -0
- package/dist/legacy-replacements/Button/Button.js +91 -0
- package/dist/legacy-replacements/Button/DismissiveButton.js +23 -0
- package/dist/legacy-replacements/Button/DisruptiveButton.js +23 -0
- package/dist/legacy-replacements/Checkbox/Checkbox.js +66 -0
- package/dist/legacy-replacements/Radio/RadioButton.js +48 -0
- package/dist/legacy-replacements/TextField/TextField.js +96 -0
- package/package.json +151 -70
- package/src/_shame.scss +111 -0
- package/src/cmem/ActivityControl/ActivityControlTypes.ts +28 -0
- package/src/cmem/ActivityControl/ActivityControlWidget.tsx +165 -0
- package/src/cmem/ActivityControl/ActivityExecutionErrorReportModal.tsx +55 -0
- package/src/cmem/ActivityControl/SilkActivityControl.tsx +303 -0
- package/src/cmem/ActivityControl/activitycontrol.scss +27 -0
- package/src/cmem/ContentBlobToggler/ContentBlobToggler.tsx +95 -0
- package/src/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.tsx +76 -0
- package/src/cmem/DateTimeDisplay/ElapsedDateTimeDisplay.tsx +69 -0
- package/src/cmem/DateTimeDisplay/tests/ElapsedDateTimeDisplay.test.tsx +29 -0
- package/src/cmem/_index.scss +2 -0
- package/src/cmem/index.ts +35 -0
- package/src/cmem/markdown/Markdown.tsx +89 -0
- package/src/cmem/markdown/highlightSearchWords.test.ts +36 -0
- package/src/cmem/markdown/highlightSearchWords.ts +67 -0
- package/src/cmem/markdown/markdown.scss +32 -0
- package/src/common/Intent/index.ts +23 -0
- package/src/common/utils/openInNewTab.ts +17 -0
- package/src/components/Accordion/Accordion.tsx +13 -0
- package/src/components/Accordion/AccordionItem.tsx +73 -0
- package/src/components/Accordion/accordion.scss +96 -0
- package/src/components/Application/ApplicationContainer.tsx +21 -0
- package/src/components/Application/ApplicationContent.tsx +57 -0
- package/src/components/Application/ApplicationHeader.tsx +14 -0
- package/src/components/Application/ApplicationSidebarNavigation.tsx +39 -0
- package/src/components/Application/ApplicationSidebarToggler.tsx +15 -0
- package/src/components/Application/ApplicationTitle.tsx +95 -0
- package/src/components/Application/ApplicationToolbar.tsx +17 -0
- package/src/components/Application/ApplicationToolbarAction.tsx +17 -0
- package/src/components/Application/ApplicationToolbarPanel.tsx +17 -0
- package/src/components/Application/ApplicationToolbarSection.tsx +15 -0
- package/src/components/Application/_config.scss +40 -0
- package/src/components/Application/_content.scss +27 -0
- package/src/components/Application/_header.scss +237 -0
- package/src/components/Application/_sidebar.scss +37 -0
- package/src/components/Application/_toolbar.scss +75 -0
- package/src/components/Application/application.scss +9 -0
- package/src/components/AutocompleteField/AutoCompleteField.tsx +399 -0
- package/src/components/AutocompleteField/autoCompleteFieldUtils.tsx +32 -0
- package/src/components/AutocompleteField/autocompletefield.scss +6 -0
- package/src/components/Breadcrumb/BreadcrumbItem.tsx +46 -0
- package/src/components/Breadcrumb/BreadcrumbList.tsx +81 -0
- package/src/components/Breadcrumb/breadcrumb.scss +47 -0
- package/src/components/Button/Button.stories.tsx +199 -0
- package/src/components/Button/Button.test.tsx +37 -0
- package/src/components/Button/Button.tsx +127 -0
- package/src/components/Button/button.scss +55 -0
- package/src/components/Card/Card.tsx +58 -0
- package/src/components/Card/CardActions.tsx +36 -0
- package/src/components/Card/CardActionsAux.tsx +29 -0
- package/src/components/Card/CardContent.tsx +26 -0
- package/src/components/Card/CardHeader.tsx +44 -0
- package/src/components/Card/CardOptions.tsx +32 -0
- package/src/components/Card/CardTitle.tsx +32 -0
- package/src/components/Card/card.scss +138 -0
- package/src/components/Card/index.tsx +17 -0
- package/src/components/Card/stories/Card.stories.tsx +82 -0
- package/src/components/Card/stories/CardActions.stories.tsx +41 -0
- package/src/components/Card/stories/CardContent.stories.tsx +28 -0
- package/src/components/Card/stories/CardHeader.stories.tsx +38 -0
- package/src/components/Card/stories/CardOptions.stories.tsx +27 -0
- package/src/components/Card/stories/CardTitle.stories.tsx +27 -0
- package/src/components/Checkbox/Checkbox.tsx +20 -0
- package/src/components/Checkbox/checkbox.scss +61 -0
- package/src/components/ContextOverlay/ContextMenu.tsx +36 -0
- package/src/components/ContextOverlay/ContextOverlay.tsx +29 -0
- package/src/components/ContextOverlay/contextoverlay.scss +15 -0
- package/src/components/Dialog/AlertDialog.tsx +52 -0
- package/src/components/Dialog/Modal.tsx +86 -0
- package/src/components/Dialog/SimpleDialog.tsx +113 -0
- package/src/components/Dialog/dialog.scss +75 -0
- package/src/components/Dialog/stories/AlertDialog.stories.tsx +42 -0
- package/src/components/Dialog/stories/Modal.stories.tsx +88 -0
- package/src/components/Dialog/stories/SimpleDialog.stories.tsx +39 -0
- package/src/components/Form/FieldItem.tsx +95 -0
- package/src/components/Form/FieldItemRow.tsx +14 -0
- package/src/components/Form/FieldSet.tsx +71 -0
- package/src/components/Form/form.scss +159 -0
- package/src/components/Grid/Grid.tsx +29 -0
- package/src/components/Grid/GridColumn.tsx +33 -0
- package/src/components/Grid/GridRow.tsx +30 -0
- package/src/components/Grid/grid.scss +89 -0
- package/src/components/Icon/Icon.tsx +96 -0
- package/src/components/Icon/IconButton.tsx +59 -0
- package/src/components/Icon/canonicalIconNames.json +120 -0
- package/src/components/Icon/canonicalIconNames.tsx +661 -0
- package/src/components/Icon/icon.scss +40 -0
- package/src/components/Iframe/Iframe.tsx +89 -0
- package/src/components/Iframe/IframeModal.tsx +77 -0
- package/src/components/Iframe/iframe.scss +49 -0
- package/src/components/Label/Label.tsx +43 -0
- package/src/components/Label/label.scss +75 -0
- package/src/components/Link/Link.tsx +19 -0
- package/src/components/Link/link.scss +6 -0
- package/src/components/List/List.tsx +46 -0
- package/src/components/Menu/Menu.tsx +9 -0
- package/src/components/Menu/MenuDivider.tsx +9 -0
- package/src/components/Menu/MenuItem.tsx +46 -0
- package/src/components/Menu/menu.scss +79 -0
- package/src/components/Notification/Notification.tsx +69 -0
- package/src/components/Notification/Toast.tsx +17 -0
- package/src/components/Notification/notification.scss +83 -0
- package/src/components/NumericInput/NumericInput.tsx +4 -0
- package/src/components/OverviewItem/OverviewItem.tsx +61 -0
- package/src/components/OverviewItem/OverviewItemActions.tsx +35 -0
- package/src/components/OverviewItem/OverviewItemDepiction.tsx +29 -0
- package/src/components/OverviewItem/OverviewItemDescription.tsx +16 -0
- package/src/components/OverviewItem/OverviewItemLine.tsx +43 -0
- package/src/components/OverviewItem/OverviewItemList.tsx +58 -0
- package/src/components/OverviewItem/index.tsx +15 -0
- package/src/components/OverviewItem/overviewitem.scss +193 -0
- package/src/components/OverviewItem/stories/OverviewItem.stories.tsx +56 -0
- package/src/components/OverviewItem/stories/OverviewItemActions.stories.tsx +31 -0
- package/src/components/OverviewItem/stories/OverviewItemDepiction.stories.tsx +26 -0
- package/src/components/OverviewItem/stories/OverviewItemDescription.stories.tsx +32 -0
- package/src/components/OverviewItem/stories/OverviewItemLine.stories.tsx +25 -0
- package/src/components/OverviewItem/stories/OverviewItemList.stories.tsx +41 -0
- package/src/components/Pagination/Pagination.tsx +80 -0
- package/src/components/Pagination/pagination.scss +47 -0
- package/src/components/ProgressBar/ProgressBar.tsx +8 -0
- package/src/components/PropertyValuePair/PropertyName.tsx +13 -0
- package/src/components/PropertyValuePair/PropertyValue.tsx +12 -0
- package/src/components/PropertyValuePair/PropertyValueList.tsx +12 -0
- package/src/components/PropertyValuePair/PropertyValuePair.tsx +20 -0
- package/src/components/PropertyValuePair/index.tsx +6 -0
- package/src/components/PropertyValuePair/propertyvalue.scss +56 -0
- package/src/components/RadioButton/RadioButton.tsx +20 -0
- package/src/components/RadioButton/radiobutton.scss +29 -0
- package/src/components/Separation/Divider.tsx +8 -0
- package/src/components/Separation/Spacing.tsx +25 -0
- package/src/components/Separation/separation.scss +77 -0
- package/src/components/SimpleTable/TableContainer.tsx +20 -0
- package/src/components/SimpleTable/index.tsx +4 -0
- package/src/components/SimpleTable/simpletable.scss +121 -0
- package/src/components/Spinner/Spinner.tsx +113 -0
- package/src/components/Spinner/spinner.scss +85 -0
- package/src/components/Structure/Section.tsx +15 -0
- package/src/components/Structure/SectionHeader.tsx +15 -0
- package/src/components/Structure/TitleMainsection.tsx +29 -0
- package/src/components/Structure/TitlePage.tsx +29 -0
- package/src/components/Structure/TitleSubsection.tsx +16 -0
- package/src/components/Structure/_titles.scss +56 -0
- package/src/components/Switch/Switch.tsx +17 -0
- package/src/components/Switch/switch.scss +4 -0
- package/src/components/Tabs/Tabs.tsx +121 -0
- package/src/components/Tabs/tabs.scss +65 -0
- package/src/components/Tag/Tag.stories.tsx +41 -0
- package/src/components/Tag/Tag.tsx +84 -0
- package/src/components/Tag/TagList.tsx +51 -0
- package/src/components/Tag/tag.scss +132 -0
- package/src/components/TagInput/taginput.scss +1 -0
- package/src/components/TextField/SearchField.tsx +71 -0
- package/src/components/TextField/TextArea.tsx +66 -0
- package/src/components/TextField/TextField.tsx +96 -0
- package/src/components/TextField/stories/SearchField.stories.tsx +40 -0
- package/src/components/TextField/stories/TextArea.stories.tsx +39 -0
- package/src/components/TextField/stories/TextField.stories.tsx +99 -0
- package/src/components/TextField/textfield.scss +63 -0
- package/src/components/Toolbar/Toolbar.stories.tsx +41 -0
- package/src/components/Toolbar/Toolbar.tsx +42 -0
- package/src/components/Toolbar/ToolbarSection.tsx +48 -0
- package/src/components/Toolbar/toolbar.scss +52 -0
- package/src/components/Tooltip/Tooltip.tsx +53 -0
- package/src/components/Tooltip/tooltip.scss +37 -0
- package/src/components/Typography/Highlighter.tsx +70 -0
- package/src/components/Typography/HtmlContentBlock.tsx +30 -0
- package/src/components/Typography/OverflowText.tsx +46 -0
- package/src/components/Typography/WhiteSpaceContainer.tsx +41 -0
- package/src/components/Typography/_reset.scss +36 -0
- package/src/components/Typography/classnames.ts +10 -0
- package/src/components/Typography/typography.scss +282 -0
- package/src/components/Workspace/WorkspaceContent.tsx +22 -0
- package/src/components/Workspace/WorkspaceHeader.tsx +20 -0
- package/src/components/Workspace/WorkspaceMain.tsx +14 -0
- package/src/components/Workspace/WorkspaceSide.tsx +18 -0
- package/src/components/Workspace/_header.scss +9 -0
- package/src/components/Workspace/workspace.scss +1 -0
- package/src/components/interfaces.ts +3 -0
- package/src/configuration/_variables.scss +130 -0
- package/src/configuration/constants.ts +2 -0
- package/src/extensions/_index.scss +1 -0
- package/src/extensions/react-flow/_config.scss +16 -0
- package/src/extensions/react-flow/_react-flow.scss +5 -0
- package/src/extensions/react-flow/edges/EdgeDefault.tsx +77 -0
- package/src/extensions/react-flow/edges/EdgeStep.tsx +19 -0
- package/src/extensions/react-flow/edges/EdgeTools.tsx +39 -0
- package/src/extensions/react-flow/edges/_edges.scss +181 -0
- package/src/extensions/react-flow/edges/edgeTypes.ts +24 -0
- package/src/extensions/react-flow/edges/utils.ts +32 -0
- package/src/extensions/react-flow/handles/HandleContent.tsx +39 -0
- package/src/extensions/react-flow/handles/HandleDefault.tsx +29 -0
- package/src/extensions/react-flow/handles/_handles.scss +208 -0
- package/src/extensions/react-flow/index.ts +15 -0
- package/src/extensions/react-flow/minimap/MiniMap.tsx +110 -0
- package/src/extensions/react-flow/minimap/_minimap.scss +79 -0
- package/src/extensions/react-flow/minimap/utils.ts +13 -0
- package/src/extensions/react-flow/nodes/NodeContent.stories.tsx +83 -0
- package/src/extensions/react-flow/nodes/NodeContentExtension.stories.tsx +36 -0
- package/src/extensions/react-flow/nodes/NodeContentExtension.tsx +87 -0
- package/src/extensions/react-flow/nodes/NodeDefault.stories.tsx +138 -0
- package/src/extensions/react-flow/nodes/NodeDefault.tsx +376 -0
- package/src/extensions/react-flow/nodes/NodeTools.tsx +48 -0
- package/src/extensions/react-flow/nodes/_nodes.scss +490 -0
- package/src/extensions/react-flow/nodes/nodeTypes.ts +14 -0
- package/src/includes/blueprintjs/_variables.scss +195 -0
- package/src/includes/carbon-components/_variables.scss +107 -0
- package/src/index.scss +190 -0
- package/src/index.ts +238 -0
- package/src/legacy-replacements/Button/AffirmativeButton.tsx +16 -0
- package/src/legacy-replacements/Button/Button.tsx +73 -0
- package/src/legacy-replacements/Button/DismissiveButton.tsx +16 -0
- package/src/legacy-replacements/Button/DisruptiveButton.tsx +16 -0
- package/src/legacy-replacements/Checkbox/Checkbox.tsx +54 -0
- package/src/legacy-replacements/Radio/RadioButton.tsx +38 -0
- package/src/legacy-replacements/TextField/TextField.tsx +90 -0
- package/src/test/setupTests.js +2 -0
- package/.cached-fonts +0 -1
- package/Ruleset.md +0 -93
- package/additionalLicenses.yml +0 -21
- package/buildConfig.js +0 -25
- package/dist/fonts/iconfont/MaterialIcons-Regular.woff +0 -0
- package/dist/fonts/iconfont/MaterialIcons-Regular.woff2 +0 -0
- package/dist/fonts/iconfont/codepoints +0 -932
- package/dist/fonts/roboto/Black/Roboto-Black.woff +0 -0
- package/dist/fonts/roboto/Black/Roboto-Black.woff2 +0 -0
- package/dist/fonts/roboto/BlackItalic/Roboto-BlackItalic.woff +0 -0
- package/dist/fonts/roboto/BlackItalic/Roboto-BlackItalic.woff2 +0 -0
- package/dist/fonts/roboto/Bold/Roboto-Bold.woff +0 -0
- package/dist/fonts/roboto/Bold/Roboto-Bold.woff2 +0 -0
- package/dist/fonts/roboto/BoldItalic/Roboto-BoldItalic.woff +0 -0
- package/dist/fonts/roboto/BoldItalic/Roboto-BoldItalic.woff2 +0 -0
- package/dist/fonts/roboto/Italic/Roboto-Italic.woff +0 -0
- package/dist/fonts/roboto/Italic/Roboto-Italic.woff2 +0 -0
- package/dist/fonts/roboto/Light/Roboto-Light.woff +0 -0
- package/dist/fonts/roboto/Light/Roboto-Light.woff2 +0 -0
- package/dist/fonts/roboto/LightItalic/Roboto-LightItalic.woff +0 -0
- package/dist/fonts/roboto/LightItalic/Roboto-LightItalic.woff2 +0 -0
- package/dist/fonts/roboto/Medium/Roboto-Medium.woff +0 -0
- package/dist/fonts/roboto/Medium/Roboto-Medium.woff2 +0 -0
- package/dist/fonts/roboto/MediumItalic/Roboto-MediumItalic.woff +0 -0
- package/dist/fonts/roboto/MediumItalic/Roboto-MediumItalic.woff2 +0 -0
- package/dist/fonts/roboto/Regular/Roboto-Regular.woff +0 -0
- package/dist/fonts/roboto/Regular/Roboto-Regular.woff2 +0 -0
- package/dist/fonts/roboto/Thin/Roboto-Thin.woff +0 -0
- package/dist/fonts/roboto/Thin/Roboto-Thin.woff2 +0 -0
- package/dist/fonts/roboto/ThinItalic/Roboto-ThinItalic.woff +0 -0
- package/dist/fonts/roboto/ThinItalic/Roboto-ThinItalic.woff2 +0 -0
- package/docs/README.md +0 -953
- package/docs/docTemplate.md +0 -140
- package/es5/component.js +0 -6686
- package/index.js +0 -136
- package/jest.config.js +0 -42
- package/src/_configuration.default.scss +0 -97
- package/src/_configuration.mdl.scss +0 -518
- package/src/elements/Alert/Alert.jsx +0 -141
- package/src/elements/Alert/Error.jsx +0 -22
- package/src/elements/Alert/Info.jsx +0 -21
- package/src/elements/Alert/Success.jsx +0 -20
- package/src/elements/Alert/Warning.jsx +0 -19
- package/src/elements/Alert/_alert.scss +0 -93
- package/src/elements/Alert/index.js +0 -13
- package/src/elements/AutoCompleteBox/AutoCompleteBox.jsx +0 -149
- package/src/elements/AutoCompleteBox/_autocomplete.scss +0 -33
- package/src/elements/Breadcrumbs/BreadcrumbItem.jsx +0 -34
- package/src/elements/Breadcrumbs/BreadcrumbList.jsx +0 -56
- package/src/elements/Breadcrumbs/_breadcrumbs.scss +0 -47
- package/src/elements/Breadcrumbs/index.js +0 -7
- package/src/elements/Button/AffirmativeButton.jsx +0 -73
- package/src/elements/Button/Button.jsx +0 -216
- package/src/elements/Button/DismissiveButton.jsx +0 -77
- package/src/elements/Button/DisruptiveButton.jsx +0 -74
- package/src/elements/Button/ProgressButton.jsx +0 -95
- package/src/elements/Button/_button.scss +0 -61
- package/src/elements/Button/index.js +0 -13
- package/src/elements/Card/Card.jsx +0 -61
- package/src/elements/Card/CardActions.jsx +0 -37
- package/src/elements/Card/CardTitle.jsx +0 -78
- package/src/elements/Card/FloatingActionList.jsx +0 -260
- package/src/elements/Card/_card.scss +0 -179
- package/src/elements/Card/index.js +0 -18
- package/src/elements/Checkbox/Checkbox.jsx +0 -113
- package/src/elements/Checkbox/_checkbox.scss +0 -14
- package/src/elements/Chip/Chip.jsx +0 -141
- package/src/elements/Chip/ChipVisual.jsx +0 -88
- package/src/elements/Chip/_chip.scss +0 -82
- package/src/elements/Chip/index.js +0 -7
- package/src/elements/ContextMenu/ContextMenu.jsx +0 -101
- package/src/elements/ContextMenu/_contextmenu.scss +0 -23
- package/src/elements/DateField/DateField.jsx +0 -178
- package/src/elements/DateField/DateTimefield.jsx +0 -20
- package/src/elements/DateField/_datefield.scss +0 -116
- package/src/elements/DateField/index.js +0 -7
- package/src/elements/Dialog/BaseDialog.jsx +0 -161
- package/src/elements/Dialog/ConfirmationDialog.jsx +0 -48
- package/src/elements/Dialog/_dialog.scss +0 -58
- package/src/elements/Dialog/index.js +0 -7
- package/src/elements/Footer/Footer.jsx +0 -171
- package/src/elements/Footer/_footer.scss +0 -17
- package/src/elements/Grid/_grid.scss +0 -18
- package/src/elements/Icon/Icon.jsx +0 -97
- package/src/elements/Icon/canonicalicons.json +0 -32
- package/src/elements/Icon/canonicaltooltips.json +0 -32
- package/src/elements/Icon/icontable.json +0 -934
- package/src/elements/Layout/_layout.scss +0 -82
- package/src/elements/NotAvailable/NotAvailable.jsx +0 -87
- package/src/elements/NotAvailable/_notavailable.scss +0 -18
- package/src/elements/Pagination/Pagination.jsx +0 -431
- package/src/elements/Pagination/_pagination.scss +0 -98
- package/src/elements/Progressbar/Progressbar.jsx +0 -34
- package/src/elements/Progressbar/_progressbar.scss +0 -22
- package/src/elements/Radio/RadioButton.jsx +0 -129
- package/src/elements/Radio/RadioGroup.jsx +0 -35
- package/src/elements/Radio/_radio.scss +0 -46
- package/src/elements/Radio/index.js +0 -7
- package/src/elements/SelectBox/SelectBox.jsx +0 -321
- package/src/elements/SelectBox/_selectbox.scss +0 -144
- package/src/elements/Spinner/Spinner.jsx +0 -44
- package/src/elements/Spinner/_spinner.scss +0 -20
- package/src/elements/Switch/Switch.jsx +0 -38
- package/src/elements/Table/Table.jsx +0 -100
- package/src/elements/Table/TableBody.jsx +0 -66
- package/src/elements/Table/TableCell.jsx +0 -94
- package/src/elements/Table/TableHead.jsx +0 -66
- package/src/elements/Table/TableRow.jsx +0 -78
- package/src/elements/Table/_datatable.scss +0 -78
- package/src/elements/Table/_table.scss +0 -143
- package/src/elements/Tabs/Tabs.jsx +0 -116
- package/src/elements/TextField/TextField.jsx +0 -172
- package/src/elements/TextField/_textfield.scss +0 -80
- package/src/elements/Tooltip/Tooltip.jsx +0 -3
- package/src/elements/Tooltip/_tooltip.scss +0 -21
- package/src/elements/Version/Version.jsx +0 -19
- package/src/hocs/ScrollingHOC.js +0 -122
- package/src/main.scss +0 -83
- package/src/scss/_adjustments.scss +0 -16
- package/src/scss/_helpers.scss +0 -29
- package/src/scss/_iconfont.scss +0 -35
- package/src/scss/_patches.scss +0 -19
- package/src/scss/_roboto.scss +0 -30
- package/src/scss/main.build-css.scss +0 -4
- package/src/utils/classnameSeperator.js +0 -10
- package/src/utils/extendedOnChangeBoolean.jsx +0 -14
- package/src/utils/uniqueId.jsx +0 -36
- package/style/test.scss +0 -30
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
12
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
+
function step(op) {
|
|
15
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
+
while (_) try {
|
|
17
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
+
switch (op[0]) {
|
|
20
|
+
case 0: case 1: t = op; break;
|
|
21
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
+
default:
|
|
25
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
+
if (t[2]) _.ops.pop();
|
|
30
|
+
_.trys.pop(); continue;
|
|
31
|
+
}
|
|
32
|
+
op = body.call(thisArg, _);
|
|
33
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
38
|
+
var t = {};
|
|
39
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
40
|
+
t[p] = s[p];
|
|
41
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
42
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
43
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
44
|
+
t[p[i]] = s[p[i]];
|
|
45
|
+
}
|
|
46
|
+
return t;
|
|
47
|
+
};
|
|
48
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
49
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
50
|
+
if (!m) return o;
|
|
51
|
+
var i = m.call(o), r, ar = [], e;
|
|
52
|
+
try {
|
|
53
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
54
|
+
}
|
|
55
|
+
catch (error) { e = { error: error }; }
|
|
56
|
+
finally {
|
|
57
|
+
try {
|
|
58
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
59
|
+
}
|
|
60
|
+
finally { if (e) throw e.error; }
|
|
61
|
+
}
|
|
62
|
+
return ar;
|
|
63
|
+
};
|
|
64
|
+
import { ActivityControlWidget } from "./ActivityControlWidget";
|
|
65
|
+
import React, { useEffect, useState } from "react";
|
|
66
|
+
import { ActivityExecutionErrorReportModal } from "./ActivityExecutionErrorReportModal";
|
|
67
|
+
import { Spacing } from "../../index";
|
|
68
|
+
import { ElapsedDateTimeDisplay } from "../DateTimeDisplay/ElapsedDateTimeDisplay";
|
|
69
|
+
var progressBreakpointIndetermination = 10;
|
|
70
|
+
var progressBreakpointAnimation = 99;
|
|
71
|
+
var defaultLayout = { small: false, border: false, canShrink: false, visualization: "spinner" };
|
|
72
|
+
/** Silk activity control. */
|
|
73
|
+
export function SilkActivityControl(_a) {
|
|
74
|
+
var _this = this;
|
|
75
|
+
var label = _a.label, initialStatus = _a.initialStatus, registerForUpdates = _a.registerForUpdates, executeActivityAction = _a.executeActivityAction, showReloadAction = _a.showReloadAction, showStartAction = _a.showStartAction, viewValueAction = _a.viewValueAction, showStopAction = _a.showStopAction, failureReportAction = _a.failureReportAction, unregisterFromUpdates = _a.unregisterFromUpdates, translate = _a.translate, elapsedTimeOfLastStart = _a.elapsedTimeOfLastStart, _b = _a.layoutConfig, layoutConfig = _b === void 0 ? defaultLayout : _b, props = __rest(_a, ["label", "initialStatus", "registerForUpdates", "executeActivityAction", "showReloadAction", "showStartAction", "viewValueAction", "showStopAction", "failureReportAction", "unregisterFromUpdates", "translate", "elapsedTimeOfLastStart", "layoutConfig"]);
|
|
76
|
+
var _c = __read(useState(initialStatus), 2), activityStatus = _c[0], setActivityStatus = _c[1];
|
|
77
|
+
var _d = __read(useState(undefined), 2), errorReport = _d[0], setErrorReport = _d[1];
|
|
78
|
+
// Register update function
|
|
79
|
+
useEffect(function () {
|
|
80
|
+
var updateActivityStatus = function (status) {
|
|
81
|
+
setActivityStatus(status);
|
|
82
|
+
};
|
|
83
|
+
registerForUpdates(updateActivityStatus);
|
|
84
|
+
return unregisterFromUpdates;
|
|
85
|
+
},
|
|
86
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
87
|
+
[]);
|
|
88
|
+
// Create activity actions
|
|
89
|
+
var actions = [];
|
|
90
|
+
if (failureReportAction && (activityStatus === null || activityStatus === void 0 ? void 0 : activityStatus.failed) && activityStatus.concreteStatus !== "Cancelled") {
|
|
91
|
+
actions.push({
|
|
92
|
+
"data-test-id": "activity-show-error-report",
|
|
93
|
+
icon: "artefact-report",
|
|
94
|
+
action: function () { return showErrorReport(failureReportAction); },
|
|
95
|
+
tooltip: translate("showErrorReport"),
|
|
96
|
+
hasStateWarning: true
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
if (showStartAction) {
|
|
100
|
+
actions.push({
|
|
101
|
+
"data-test-id": "activity-start-activity",
|
|
102
|
+
icon: "item-start",
|
|
103
|
+
action: function () { return executeActivityAction("start"); },
|
|
104
|
+
tooltip: translate("startActivity"),
|
|
105
|
+
disabled: (activityStatus === null || activityStatus === void 0 ? void 0 : activityStatus.isRunning) === true
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
if (showReloadAction) {
|
|
109
|
+
actions.push({
|
|
110
|
+
"data-test-id": "activity-reload-activity",
|
|
111
|
+
icon: "item-reload",
|
|
112
|
+
action: function () { return executeActivityAction("restart"); },
|
|
113
|
+
tooltip: translate("reloadActivity"),
|
|
114
|
+
disabled: (activityStatus === null || activityStatus === void 0 ? void 0 : activityStatus.isRunning) === true
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
if (showStopAction) {
|
|
118
|
+
actions.push({
|
|
119
|
+
"data-test-id": "activity-stop-activity",
|
|
120
|
+
icon: "item-stop",
|
|
121
|
+
action: function () { return executeActivityAction("cancel"); },
|
|
122
|
+
tooltip: translate("stopActivity"),
|
|
123
|
+
disabled: (activityStatus === null || activityStatus === void 0 ? void 0 : activityStatus.isRunning) === false
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
if (viewValueAction && (activityStatus === null || activityStatus === void 0 ? void 0 : activityStatus.concreteStatus) !== "Not executed") {
|
|
127
|
+
var action = typeof viewValueAction.action === "string" ? function () {
|
|
128
|
+
window.open(viewValueAction.action, "_blank");
|
|
129
|
+
} : viewValueAction.action;
|
|
130
|
+
actions.push({
|
|
131
|
+
"data-test-id": "activity-view-data",
|
|
132
|
+
icon: "artefact-rawdata",
|
|
133
|
+
action: action,
|
|
134
|
+
tooltip: viewValueAction.tooltip
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
var showErrorReport = function (action) { return __awaiter(_this, void 0, void 0, function () {
|
|
138
|
+
var errorReport;
|
|
139
|
+
return __generator(this, function (_a) {
|
|
140
|
+
switch (_a.label) {
|
|
141
|
+
case 0: return [4 /*yield*/, action.fetchErrorReport(action.renderMarkdown)];
|
|
142
|
+
case 1:
|
|
143
|
+
errorReport = _a.sent();
|
|
144
|
+
setErrorReport(errorReport);
|
|
145
|
+
return [2 /*return*/];
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
}); };
|
|
149
|
+
var closeErrorReport = function () {
|
|
150
|
+
setErrorReport(undefined);
|
|
151
|
+
};
|
|
152
|
+
var activityControlLabel = (activityStatus === null || activityStatus === void 0 ? void 0 : activityStatus.startTime) && elapsedTimeOfLastStart ? <>
|
|
153
|
+
{label}
|
|
154
|
+
<Spacing vertical={true} size={"tiny"}/>
|
|
155
|
+
<ElapsedDateTimeDisplay dateTime={activityStatus.startTime} prefix={elapsedTimeOfLastStart.prefix} suffix={elapsedTimeOfLastStart.suffix} translateUnits={elapsedTimeOfLastStart.translate}/>
|
|
156
|
+
</> : label;
|
|
157
|
+
var visualization = layoutConfig.visualization, otherLayoutConfig = __rest(layoutConfig, ["visualization"]);
|
|
158
|
+
var visualizationProps = {}; // visualization==="none" or undefined
|
|
159
|
+
var runningProgress = activityStatus && activityStatus.isRunning;
|
|
160
|
+
var waitingProgress = activityStatus && activityStatus.concreteStatus === "Waiting";
|
|
161
|
+
var animateProgress = activityStatus && activityStatus.progress > 0 && activityStatus.progress < progressBreakpointAnimation;
|
|
162
|
+
var indeterminateProgress = activityStatus && activityStatus.progress < progressBreakpointIndetermination;
|
|
163
|
+
if (visualization === "progressbar") {
|
|
164
|
+
visualizationProps = {
|
|
165
|
+
progressBar: {
|
|
166
|
+
animate: waitingProgress || (runningProgress && animateProgress),
|
|
167
|
+
stripes: waitingProgress || (runningProgress && animateProgress),
|
|
168
|
+
value: (waitingProgress || (runningProgress && indeterminateProgress)) ? undefined : ((activityStatus && activityStatus.progress > 0) ? (activityStatus.progress / 100) : 0),
|
|
169
|
+
intent: activityStatus ? calcIntent(activityStatus) : "none",
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
;
|
|
174
|
+
if (visualization === "spinner") {
|
|
175
|
+
visualizationProps = {
|
|
176
|
+
progressSpinner: {
|
|
177
|
+
value: (waitingProgress || (runningProgress && indeterminateProgress)) ? undefined : ((activityStatus && activityStatus.progress > 0) ? (activityStatus.progress / 100) : 0),
|
|
178
|
+
intent: activityStatus ? calcIntent(activityStatus) : "none",
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
;
|
|
183
|
+
return <>
|
|
184
|
+
<ActivityControlWidget key={"activity-control"} data-test-id={props["data-test-id"]} label={activityControlLabel} activityActions={actions} statusMessage={activityStatus === null || activityStatus === void 0 ? void 0 : activityStatus.message} {...visualizationProps} {...otherLayoutConfig}/>
|
|
185
|
+
{errorReport && failureReportAction && <ActivityExecutionErrorReportModal title={failureReportAction.title} key={"error-report-modal"} closeButtonValue={failureReportAction.closeButtonValue} downloadButtonValue={failureReportAction.downloadButtonValue} fetchErrorReport={function () { return __awaiter(_this, void 0, void 0, function () {
|
|
186
|
+
return __generator(this, function (_a) {
|
|
187
|
+
switch (_a.label) {
|
|
188
|
+
case 0: return [4 /*yield*/, failureReportAction.fetchErrorReport(true)];
|
|
189
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
}); }} report={failureReportAction.renderReport(errorReport)} onDiscard={closeErrorReport}/>}
|
|
193
|
+
</>;
|
|
194
|
+
}
|
|
195
|
+
var calcIntent = function (activityStatus) {
|
|
196
|
+
var concreteStatus = activityStatus.concreteStatus;
|
|
197
|
+
var intent;
|
|
198
|
+
switch (concreteStatus) {
|
|
199
|
+
case "Running":
|
|
200
|
+
case "Successful":
|
|
201
|
+
intent = "success";
|
|
202
|
+
break;
|
|
203
|
+
case "Cancelled":
|
|
204
|
+
case "Canceling":
|
|
205
|
+
intent = "warning";
|
|
206
|
+
break;
|
|
207
|
+
case "Failed":
|
|
208
|
+
intent = "danger";
|
|
209
|
+
break;
|
|
210
|
+
case "Waiting":
|
|
211
|
+
intent = "none"; // TODO: This is 100% yellow in the old activity control
|
|
212
|
+
break;
|
|
213
|
+
default:
|
|
214
|
+
intent = "none";
|
|
215
|
+
}
|
|
216
|
+
return intent;
|
|
217
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface IContentBlobTogglerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/**
|
|
4
|
+
space-delimited list of class names
|
|
5
|
+
*/
|
|
6
|
+
className?: string;
|
|
7
|
+
/**
|
|
8
|
+
text label used for toggler when preview is displayed
|
|
9
|
+
*/
|
|
10
|
+
toggleExtendText: string;
|
|
11
|
+
/**
|
|
12
|
+
text label used for toggler when full view is displayed
|
|
13
|
+
*/
|
|
14
|
+
toggleReduceText: string;
|
|
15
|
+
/**
|
|
16
|
+
content that is displayed as preview
|
|
17
|
+
*/
|
|
18
|
+
previewContent: React.ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
content that is displayed as extended full view
|
|
21
|
+
*/
|
|
22
|
+
fullviewContent: React.ReactNode;
|
|
23
|
+
/**
|
|
24
|
+
Show extended full view initially. Default: false
|
|
25
|
+
*/
|
|
26
|
+
startExtended?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
Callback if toggler is necessary. Default: true
|
|
29
|
+
*/
|
|
30
|
+
enableToggler?: boolean;
|
|
31
|
+
}
|
|
32
|
+
/** Shows a preview with the option to expand to a full view (and back). */
|
|
33
|
+
export declare function ContentBlobToggler({ className, toggleExtendText, toggleReduceText, previewContent, fullviewContent, startExtended, enableToggler, ...otherProps }: IContentBlobTogglerProps): JSX.Element;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.ContentBlobToggler = ContentBlobToggler;
|
|
9
|
+
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
|
|
12
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
+
|
|
14
|
+
var _index = require("../../index");
|
|
15
|
+
|
|
16
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
17
|
+
|
|
18
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
|
+
|
|
20
|
+
/** Shows a preview with the option to expand to a full view (and back). */
|
|
21
|
+
function ContentBlobToggler({
|
|
22
|
+
className = "",
|
|
23
|
+
toggleExtendText,
|
|
24
|
+
toggleReduceText,
|
|
25
|
+
previewContent,
|
|
26
|
+
fullviewContent,
|
|
27
|
+
startExtended = false,
|
|
28
|
+
enableToggler = true,
|
|
29
|
+
...otherProps
|
|
30
|
+
}) {
|
|
31
|
+
const [isExtended, setViewState] = (0, _react.useState)(startExtended);
|
|
32
|
+
|
|
33
|
+
const handlerToggleView = event => {
|
|
34
|
+
event.preventDefault();
|
|
35
|
+
event.stopPropagation();
|
|
36
|
+
setViewState(!isExtended);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
return /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({
|
|
40
|
+
className: className
|
|
41
|
+
}, otherProps), !isExtended ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, previewContent, enableToggler && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, "\u2026", " ", /*#__PURE__*/_react.default.createElement(_index.Link, {
|
|
42
|
+
href: "#more",
|
|
43
|
+
"data-test-id": "content-blob-toggler-more-link",
|
|
44
|
+
onClick: e => {
|
|
45
|
+
handlerToggleView(e);
|
|
46
|
+
}
|
|
47
|
+
}, toggleExtendText))) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, fullviewContent, enableToggler && /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_index.Spacing, {
|
|
48
|
+
size: "small"
|
|
49
|
+
}), /*#__PURE__*/_react.default.createElement(_index.Link, {
|
|
50
|
+
"data-test-id": "content-blob-toggler-less-link",
|
|
51
|
+
href: "#less",
|
|
52
|
+
onClick: e => {
|
|
53
|
+
handlerToggleView(e);
|
|
54
|
+
}
|
|
55
|
+
}, toggleReduceText))));
|
|
56
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
13
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
14
|
+
if (!m) return o;
|
|
15
|
+
var i = m.call(o), r, ar = [], e;
|
|
16
|
+
try {
|
|
17
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
18
|
+
}
|
|
19
|
+
catch (error) { e = { error: error }; }
|
|
20
|
+
finally {
|
|
21
|
+
try {
|
|
22
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
23
|
+
}
|
|
24
|
+
finally { if (e) throw e.error; }
|
|
25
|
+
}
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
import React, { useState } from "react";
|
|
29
|
+
import { Link, Spacing } from "../../index";
|
|
30
|
+
/** Shows a preview with the option to expand to a full view (and back). */
|
|
31
|
+
export function ContentBlobToggler(_a) {
|
|
32
|
+
var _b = _a.className, className = _b === void 0 ? "" : _b, toggleExtendText = _a.toggleExtendText, toggleReduceText = _a.toggleReduceText, previewContent = _a.previewContent, fullviewContent = _a.fullviewContent, _c = _a.startExtended, startExtended = _c === void 0 ? false : _c, _d = _a.enableToggler, enableToggler = _d === void 0 ? true : _d, otherProps = __rest(_a, ["className", "toggleExtendText", "toggleReduceText", "previewContent", "fullviewContent", "startExtended", "enableToggler"]);
|
|
33
|
+
var _e = __read(useState(startExtended), 2), isExtended = _e[0], setViewState = _e[1];
|
|
34
|
+
var handlerToggleView = function (event) {
|
|
35
|
+
event.preventDefault();
|
|
36
|
+
event.stopPropagation();
|
|
37
|
+
setViewState(!isExtended);
|
|
38
|
+
};
|
|
39
|
+
return (<div className={className} {...otherProps}>
|
|
40
|
+
{!isExtended ? (<>
|
|
41
|
+
{previewContent}
|
|
42
|
+
{enableToggler && (<>
|
|
43
|
+
…{" "}
|
|
44
|
+
<Link href="#more" data-test-id={"content-blob-toggler-more-link"} onClick={function (e) {
|
|
45
|
+
handlerToggleView(e);
|
|
46
|
+
}}>
|
|
47
|
+
{toggleExtendText}
|
|
48
|
+
</Link>
|
|
49
|
+
</>)}
|
|
50
|
+
</>) : (<>
|
|
51
|
+
{fullviewContent}
|
|
52
|
+
{enableToggler && (<div>
|
|
53
|
+
<Spacing size="small"/>
|
|
54
|
+
<Link data-test-id={"content-blob-toggler-less-link"} href="#less" onClick={function (e) {
|
|
55
|
+
handlerToggleView(e);
|
|
56
|
+
}}>
|
|
57
|
+
{toggleReduceText}
|
|
58
|
+
</Link>
|
|
59
|
+
</div>)}
|
|
60
|
+
</>)}
|
|
61
|
+
</div>);
|
|
62
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface IStringPreviewContentBlobTogglerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/**
|
|
4
|
+
space-delimited list of class names
|
|
5
|
+
*/
|
|
6
|
+
className?: string;
|
|
7
|
+
/**
|
|
8
|
+
The preview content will be cut to this length if it is too long.
|
|
9
|
+
*/
|
|
10
|
+
previewMaxLength?: number;
|
|
11
|
+
/**
|
|
12
|
+
text label used for toggler when preview is displayed
|
|
13
|
+
*/
|
|
14
|
+
toggleExtendText: string;
|
|
15
|
+
/**
|
|
16
|
+
text label used for toggler when full view is displayed
|
|
17
|
+
*/
|
|
18
|
+
toggleReduceText: string;
|
|
19
|
+
/**
|
|
20
|
+
The content string. If it is smaller than previewMaxLength this will be displayed in full, else fullviewContent will be displayed.
|
|
21
|
+
*/
|
|
22
|
+
content: string;
|
|
23
|
+
/**
|
|
24
|
+
Content that is displayed as extended full view
|
|
25
|
+
*/
|
|
26
|
+
fullviewContent: React.ReactNode;
|
|
27
|
+
/**
|
|
28
|
+
show extended full view initially
|
|
29
|
+
*/
|
|
30
|
+
startExtended?: boolean;
|
|
31
|
+
/** If only the first non-empty line should be shown in the preview. This will in addition also be shortened according to previewMaxLength. */
|
|
32
|
+
firstNonEmptyLineOnly?: boolean;
|
|
33
|
+
/** If enabled the preview is rendered as markdown. */
|
|
34
|
+
renderPreviewAsMarkdown?: boolean;
|
|
35
|
+
/** White-listing of HTML elements that will be rendered when renderPreviewAsMarkdown is enabled. */
|
|
36
|
+
allowedHtmlElementsInPreview?: string[];
|
|
37
|
+
}
|
|
38
|
+
/** Version of the content toggler for text only content. */
|
|
39
|
+
export declare function StringPreviewContentBlobToggler({ className, previewMaxLength, toggleExtendText, toggleReduceText, content, fullviewContent, startExtended, firstNonEmptyLineOnly, renderPreviewAsMarkdown, allowedHtmlElementsInPreview }: IStringPreviewContentBlobTogglerProps): JSX.Element;
|
|
40
|
+
/** Takes the first non-empty line from a preview string. */
|
|
41
|
+
export declare function firstNonEmptyLine(preview: string): string;
|
|
42
|
+
export {};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.StringPreviewContentBlobToggler = StringPreviewContentBlobToggler;
|
|
9
|
+
exports.firstNonEmptyLine = firstNonEmptyLine;
|
|
10
|
+
|
|
11
|
+
var _react = _interopRequireDefault(require("react"));
|
|
12
|
+
|
|
13
|
+
var _ = require("../");
|
|
14
|
+
|
|
15
|
+
/** Version of the content toggler for text only content. */
|
|
16
|
+
function StringPreviewContentBlobToggler({
|
|
17
|
+
className = "",
|
|
18
|
+
previewMaxLength,
|
|
19
|
+
toggleExtendText,
|
|
20
|
+
toggleReduceText,
|
|
21
|
+
content,
|
|
22
|
+
fullviewContent,
|
|
23
|
+
startExtended,
|
|
24
|
+
firstNonEmptyLineOnly,
|
|
25
|
+
renderPreviewAsMarkdown = false,
|
|
26
|
+
allowedHtmlElementsInPreview
|
|
27
|
+
}) {
|
|
28
|
+
const previewMaybeFirstLine = firstNonEmptyLineOnly ? firstNonEmptyLine(content) : content;
|
|
29
|
+
const previewString = previewMaxLength ? previewMaybeFirstLine.substr(0, previewMaxLength) : previewMaybeFirstLine;
|
|
30
|
+
const enableToggler = previewString !== content;
|
|
31
|
+
return /*#__PURE__*/_react.default.createElement(_.ContentBlobToggler, {
|
|
32
|
+
className: className,
|
|
33
|
+
previewContent: renderPreviewAsMarkdown ? /*#__PURE__*/_react.default.createElement(_.Markdown, {
|
|
34
|
+
allowedElements: allowedHtmlElementsInPreview
|
|
35
|
+
}, previewString) : previewString,
|
|
36
|
+
toggleExtendText: toggleExtendText,
|
|
37
|
+
toggleReduceText: toggleReduceText,
|
|
38
|
+
fullviewContent: fullviewContent,
|
|
39
|
+
startExtended: startExtended,
|
|
40
|
+
enableToggler: enableToggler
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const newLineRegex = new RegExp("\r|\n"); // eslint-disable-line
|
|
45
|
+
|
|
46
|
+
/** Takes the first non-empty line from a preview string. */
|
|
47
|
+
|
|
48
|
+
function firstNonEmptyLine(preview) {
|
|
49
|
+
const previewString = preview.trim();
|
|
50
|
+
const result = newLineRegex.exec(previewString);
|
|
51
|
+
return result !== null ? previewString.substr(0, result.index) : previewString;
|
|
52
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ContentBlobToggler, Markdown } from "../";
|
|
3
|
+
/** Version of the content toggler for text only content. */
|
|
4
|
+
export function StringPreviewContentBlobToggler(_a) {
|
|
5
|
+
var _b = _a.className, className = _b === void 0 ? "" : _b, previewMaxLength = _a.previewMaxLength, toggleExtendText = _a.toggleExtendText, toggleReduceText = _a.toggleReduceText, content = _a.content, fullviewContent = _a.fullviewContent, startExtended = _a.startExtended, firstNonEmptyLineOnly = _a.firstNonEmptyLineOnly, _c = _a.renderPreviewAsMarkdown, renderPreviewAsMarkdown = _c === void 0 ? false : _c, allowedHtmlElementsInPreview = _a.allowedHtmlElementsInPreview;
|
|
6
|
+
var previewMaybeFirstLine = firstNonEmptyLineOnly ? firstNonEmptyLine(content) : content;
|
|
7
|
+
var previewString = previewMaxLength ? previewMaybeFirstLine.substr(0, previewMaxLength) : previewMaybeFirstLine;
|
|
8
|
+
var enableToggler = previewString !== content;
|
|
9
|
+
return <ContentBlobToggler className={className} previewContent={renderPreviewAsMarkdown ? <Markdown allowedElements={allowedHtmlElementsInPreview}>{previewString}</Markdown> : previewString} toggleExtendText={toggleExtendText} toggleReduceText={toggleReduceText} fullviewContent={fullviewContent} startExtended={startExtended} enableToggler={enableToggler}/>;
|
|
10
|
+
}
|
|
11
|
+
var newLineRegex = new RegExp("\r|\n"); // eslint-disable-line
|
|
12
|
+
/** Takes the first non-empty line from a preview string. */
|
|
13
|
+
export function firstNonEmptyLine(preview) {
|
|
14
|
+
var previewString = preview.trim();
|
|
15
|
+
var result = newLineRegex.exec(previewString);
|
|
16
|
+
return result !== null ? previewString.substr(0, result.index) : previewString;
|
|
17
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TestableComponent } from "../../components/interfaces";
|
|
3
|
+
interface IProps extends TestableComponent {
|
|
4
|
+
dateTime: string | number;
|
|
5
|
+
prefix?: string;
|
|
6
|
+
suffix?: string;
|
|
7
|
+
showDateTimeTooltip?: boolean;
|
|
8
|
+
translateUnits: (unit: TimeUnits) => string;
|
|
9
|
+
}
|
|
10
|
+
export declare type TimeUnits = "minute" | "minutes" | "hour" | "hours" | "day" | "days";
|
|
11
|
+
export declare const elapsedTimeSegmented: (elapsedTimeInMs: number) => number[];
|
|
12
|
+
export declare const simplifiedElapsedTime: (timeSegments: number[], translateUnits: (unit: TimeUnits) => string) => string;
|
|
13
|
+
/** Displays the elapsed time in a human readable way. */
|
|
14
|
+
export declare const ElapsedDateTimeDisplay: ({ dateTime, prefix, suffix, showDateTimeTooltip, translateUnits, ...otherProps }: IProps) => JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.simplifiedElapsedTime = exports.elapsedTimeSegmented = exports.ElapsedDateTimeDisplay = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
10
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
11
|
+
|
|
12
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
13
|
+
|
|
14
|
+
const dateTimeToElapsedTimeInMs = dateTime => {
|
|
15
|
+
const absoluteMs = typeof dateTime === "number" ? dateTime : new Date(dateTime).getTime();
|
|
16
|
+
return new Date().getTime() - absoluteMs;
|
|
17
|
+
}; // Returns a segmentation of the elapsed time, i.e. an array with the nr of days, hours, minutes, seconds
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
const elapsedTimeSegmented = elapsedTimeInMs => {
|
|
21
|
+
// In how many segments the time should be split, i.e. hours, minutes, seconds
|
|
22
|
+
const segmentSteps = [24, 60, 60]; // First convert to time in seconds
|
|
23
|
+
|
|
24
|
+
let remaining = Math.floor(elapsedTimeInMs / 1000);
|
|
25
|
+
const segmentValues = [];
|
|
26
|
+
segmentSteps.reverse().forEach(segmentSize => {
|
|
27
|
+
const segmentValue = remaining % segmentSize;
|
|
28
|
+
remaining = Math.floor(remaining / segmentSize);
|
|
29
|
+
segmentValues.push(segmentValue);
|
|
30
|
+
});
|
|
31
|
+
segmentValues.push(remaining);
|
|
32
|
+
return segmentValues.reverse();
|
|
33
|
+
}; // Returns the simplified elapsed time
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
exports.elapsedTimeSegmented = elapsedTimeSegmented;
|
|
37
|
+
|
|
38
|
+
const simplifiedElapsedTime = (timeSegments, translateUnits) => {
|
|
39
|
+
const units = ["day", "hour", "minute"]; // Find first non-null value
|
|
40
|
+
|
|
41
|
+
let idx = 0;
|
|
42
|
+
|
|
43
|
+
while (idx < 3 && timeSegments[idx] === 0) {
|
|
44
|
+
idx++;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (idx === 3) {
|
|
48
|
+
// Do not show exact seconds
|
|
49
|
+
return `< 1 ${translateUnits("minute")}`;
|
|
50
|
+
} else {
|
|
51
|
+
return `${timeSegments[idx]} ${translateUnits(units[idx] + (timeSegments[idx] > 1 ? "s" : ""))}`;
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
/** Displays the elapsed time in a human readable way. */
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
exports.simplifiedElapsedTime = simplifiedElapsedTime;
|
|
58
|
+
|
|
59
|
+
const ElapsedDateTimeDisplay = ({
|
|
60
|
+
dateTime,
|
|
61
|
+
prefix = "",
|
|
62
|
+
suffix = "",
|
|
63
|
+
showDateTimeTooltip = true,
|
|
64
|
+
translateUnits,
|
|
65
|
+
...otherProps
|
|
66
|
+
}) => {
|
|
67
|
+
const [elapsedTime, setElapsedTime] = (0, _react.useState)(dateTimeToElapsedTimeInMs(dateTime));
|
|
68
|
+
(0, _react.useEffect)(() => {
|
|
69
|
+
const timeout = setInterval(() => {
|
|
70
|
+
setElapsedTime(dateTimeToElapsedTimeInMs(dateTime));
|
|
71
|
+
}, 1000);
|
|
72
|
+
return () => clearInterval(timeout);
|
|
73
|
+
}, [dateTime]);
|
|
74
|
+
return /*#__PURE__*/_react.default.createElement("span", {
|
|
75
|
+
"data-test-id": otherProps["data-test-id"],
|
|
76
|
+
title: showDateTimeTooltip ? new Date(dateTime).toString() : ""
|
|
77
|
+
}, prefix + simplifiedElapsedTime(elapsedTimeSegmented(elapsedTime), translateUnits) + suffix);
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
exports.ElapsedDateTimeDisplay = ElapsedDateTimeDisplay;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
13
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
14
|
+
if (!m) return o;
|
|
15
|
+
var i = m.call(o), r, ar = [], e;
|
|
16
|
+
try {
|
|
17
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
18
|
+
}
|
|
19
|
+
catch (error) { e = { error: error }; }
|
|
20
|
+
finally {
|
|
21
|
+
try {
|
|
22
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
23
|
+
}
|
|
24
|
+
finally { if (e) throw e.error; }
|
|
25
|
+
}
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
import React, { useEffect, useState } from "react";
|
|
29
|
+
var dateTimeToElapsedTimeInMs = function (dateTime) {
|
|
30
|
+
var absoluteMs = typeof dateTime === "number" ? dateTime : new Date(dateTime).getTime();
|
|
31
|
+
return new Date().getTime() - absoluteMs;
|
|
32
|
+
};
|
|
33
|
+
// Returns a segmentation of the elapsed time, i.e. an array with the nr of days, hours, minutes, seconds
|
|
34
|
+
export var elapsedTimeSegmented = function (elapsedTimeInMs) {
|
|
35
|
+
// In how many segments the time should be split, i.e. hours, minutes, seconds
|
|
36
|
+
var segmentSteps = [24, 60, 60];
|
|
37
|
+
// First convert to time in seconds
|
|
38
|
+
var remaining = Math.floor(elapsedTimeInMs / 1000);
|
|
39
|
+
var segmentValues = [];
|
|
40
|
+
segmentSteps.reverse().forEach(function (segmentSize) {
|
|
41
|
+
var segmentValue = remaining % segmentSize;
|
|
42
|
+
remaining = Math.floor(remaining / segmentSize);
|
|
43
|
+
segmentValues.push(segmentValue);
|
|
44
|
+
});
|
|
45
|
+
segmentValues.push(remaining);
|
|
46
|
+
return segmentValues.reverse();
|
|
47
|
+
};
|
|
48
|
+
// Returns the simplified elapsed time
|
|
49
|
+
export var simplifiedElapsedTime = function (timeSegments, translateUnits) {
|
|
50
|
+
var units = ["day", "hour", "minute"];
|
|
51
|
+
// Find first non-null value
|
|
52
|
+
var idx = 0;
|
|
53
|
+
while (idx < 3 && timeSegments[idx] === 0) {
|
|
54
|
+
idx++;
|
|
55
|
+
}
|
|
56
|
+
if (idx === 3) {
|
|
57
|
+
// Do not show exact seconds
|
|
58
|
+
return "< 1 " + translateUnits("minute");
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
return timeSegments[idx] + " " + translateUnits(units[idx] + (timeSegments[idx] > 1 ? "s" : ""));
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
/** Displays the elapsed time in a human readable way. */
|
|
65
|
+
export var ElapsedDateTimeDisplay = function (_a) {
|
|
66
|
+
var dateTime = _a.dateTime, _b = _a.prefix, prefix = _b === void 0 ? "" : _b, _c = _a.suffix, suffix = _c === void 0 ? "" : _c, _d = _a.showDateTimeTooltip, showDateTimeTooltip = _d === void 0 ? true : _d, translateUnits = _a.translateUnits, otherProps = __rest(_a, ["dateTime", "prefix", "suffix", "showDateTimeTooltip", "translateUnits"]);
|
|
67
|
+
var _e = __read(useState(dateTimeToElapsedTimeInMs(dateTime)), 2), elapsedTime = _e[0], setElapsedTime = _e[1];
|
|
68
|
+
useEffect(function () {
|
|
69
|
+
var timeout = setInterval(function () {
|
|
70
|
+
setElapsedTime(dateTimeToElapsedTimeInMs(dateTime));
|
|
71
|
+
}, 1000);
|
|
72
|
+
return function () { return clearInterval(timeout); };
|
|
73
|
+
}, [dateTime]);
|
|
74
|
+
return <span data-test-id={otherProps["data-test-id"]} title={showDateTimeTooltip ? new Date(dateTime).toString() : ""}>
|
|
75
|
+
{prefix + simplifiedElapsedTime(elapsedTimeSegmented(elapsedTime), translateUnits) + suffix}
|
|
76
|
+
</span>;
|
|
77
|
+
};
|