diff --git a/packages/neos-ui-error/package.json b/packages/neos-ui-error/package.json index 124b7c3e1f..38151c7642 100644 --- a/packages/neos-ui-error/package.json +++ b/packages/neos-ui-error/package.json @@ -6,9 +6,11 @@ "main": "./src/index.ts", "dependencies": { "@neos-project/neos-ui-i18n": "workspace:*", + "@neos-project/neos-ui-redux-store": "workspace:*", "@neos-project/react-ui-components": "workspace:*", "classnames": "^2.2.3", - "react": "^16.12.0" + "react": "^16.12.0", + "react-redux": "^7.1.3" }, "license": "GNU GPLv3", "stableVersion": "8.3.4" diff --git a/packages/neos-ui/src/Containers/FlashMessages/FlashMessage/FlashMessage.tsx b/packages/neos-ui-error/src/container/FlashMessages/FlashMessage.tsx similarity index 100% rename from packages/neos-ui/src/Containers/FlashMessages/FlashMessage/FlashMessage.tsx rename to packages/neos-ui-error/src/container/FlashMessages/FlashMessage.tsx diff --git a/packages/neos-ui/src/Containers/FlashMessages/FlashMessages.tsx b/packages/neos-ui-error/src/container/FlashMessages/FlashMessages.tsx similarity index 97% rename from packages/neos-ui/src/Containers/FlashMessages/FlashMessages.tsx rename to packages/neos-ui-error/src/container/FlashMessages/FlashMessages.tsx index 120f322d02..d2ea544737 100644 --- a/packages/neos-ui/src/Containers/FlashMessages/FlashMessages.tsx +++ b/packages/neos-ui-error/src/container/FlashMessages/FlashMessages.tsx @@ -14,7 +14,7 @@ import {connect} from 'react-redux'; import {actions} from '@neos-project/neos-ui-redux-store'; import {GlobalState} from '@neos-project/neos-ui-redux-store/src/System'; -import FlashMessage from './FlashMessage'; +import {FlashMessage} from './FlashMessage'; import style from './style.module.css'; diff --git a/packages/neos-ui/src/Containers/FlashMessages/FlashMessage/index.ts b/packages/neos-ui-error/src/container/FlashMessages/index.ts similarity index 83% rename from packages/neos-ui/src/Containers/FlashMessages/FlashMessage/index.ts rename to packages/neos-ui-error/src/container/FlashMessages/index.ts index 24619772a9..097ed78742 100644 --- a/packages/neos-ui/src/Containers/FlashMessages/FlashMessage/index.ts +++ b/packages/neos-ui-error/src/container/FlashMessages/index.ts @@ -7,4 +7,4 @@ * information, please view the LICENSE file which was distributed with this * source code. */ -export {FlashMessage as default} from './FlashMessage'; +export {FlashMessages} from './FlashMessages'; diff --git a/packages/neos-ui/src/Containers/FlashMessages/FlashMessage/style.module.css b/packages/neos-ui-error/src/container/FlashMessages/style.module.css similarity index 77% rename from packages/neos-ui/src/Containers/FlashMessages/FlashMessage/style.module.css rename to packages/neos-ui-error/src/container/FlashMessages/style.module.css index a5a6bc1f2e..2c3b0378a8 100644 --- a/packages/neos-ui/src/Containers/FlashMessages/FlashMessage/style.module.css +++ b/packages/neos-ui-error/src/container/FlashMessages/style.module.css @@ -1,3 +1,19 @@ +.flashMessageContainer { + position: fixed; + z-index: var(--zIndex-FlashMessageContainer); + top: 0; + left: 50%; + width: 516px; + margin-top: 8px; + transform: translate(-50%, 0); + max-height: calc(100% - 16px); + overflow: auto; + + &:empty { + display: none; + } +} + .flashMessage { color: white; font-size: 14px; @@ -30,7 +46,7 @@ position: absolute; left: 0; top: 0; - height: 100%; + height: 100% !important; line-height: var(--spacing-GoldenUnit); width: var(--spacing-GoldenUnit) !important; text-align: center; diff --git a/packages/neos-ui-error/src/container/index.ts b/packages/neos-ui-error/src/container/index.ts index 954653a8b0..e4b02df376 100644 --- a/packages/neos-ui-error/src/container/index.ts +++ b/packages/neos-ui-error/src/container/index.ts @@ -9,3 +9,4 @@ */ export {ErrorBoundary, terminateDueToFatalInitializationError} from './ErrorBoundary'; export {ErrorView} from './ErrorView'; +export {FlashMessages} from './FlashMessages'; diff --git a/packages/neos-ui-error/src/index.ts b/packages/neos-ui-error/src/index.ts index 83227623b8..08c63eaeb3 100644 --- a/packages/neos-ui-error/src/index.ts +++ b/packages/neos-ui-error/src/index.ts @@ -17,5 +17,6 @@ export type { export { ErrorBoundary, ErrorView, + FlashMessages, terminateDueToFatalInitializationError } from './container'; diff --git a/packages/neos-ui/src/Containers/App.js b/packages/neos-ui/src/Containers/App.js index 21abe453f8..08fe022306 100644 --- a/packages/neos-ui/src/Containers/App.js +++ b/packages/neos-ui/src/Containers/App.js @@ -4,7 +4,7 @@ import {connect} from 'react-redux'; import mergeClassNames from 'classnames'; import style from './style.module.css'; -import FlashMessages from './FlashMessages/index'; +import {FlashMessages} from '@neos-project/neos-ui-error'; const App = ({globalRegistry, menu, isFullScreen, leftSidebarIsHidden, rightSidebarIsHidden}) => { const containerRegistry = globalRegistry.get('containers'); diff --git a/packages/neos-ui/src/Containers/FlashMessages/index.ts b/packages/neos-ui/src/Containers/FlashMessages/index.ts deleted file mode 100644 index d87c65f2db..0000000000 --- a/packages/neos-ui/src/Containers/FlashMessages/index.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* - * This file is part of the Neos.Neos.Ui package. - * - * (c) Contributors of the Neos Project - www.neos.io - * - * This package is Open Source Software. For the full copyright and license - * information, please view the LICENSE file which was distributed with this - * source code. - */ -export {FlashMessages as default} from './FlashMessages'; diff --git a/packages/neos-ui/src/Containers/FlashMessages/style.module.css b/packages/neos-ui/src/Containers/FlashMessages/style.module.css deleted file mode 100644 index 853c2c4c4f..0000000000 --- a/packages/neos-ui/src/Containers/FlashMessages/style.module.css +++ /dev/null @@ -1,15 +0,0 @@ -.flashMessageContainer { - position: fixed; - z-index: var(--zIndex-FlashMessageContainer); - top: 0; - left: 50%; - width: 516px; - margin-top: 8px; - transform: translate(-50%, 0); - max-height: calc(100% - 16px); - overflow: auto; - - &:empty { - display: none; - } -} diff --git a/yarn.lock b/yarn.lock index e9441ba281..01a2b3f39c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2442,9 +2442,11 @@ __metadata: resolution: "@neos-project/neos-ui-error@workspace:packages/neos-ui-error" dependencies: "@neos-project/neos-ui-i18n": "workspace:*" + "@neos-project/neos-ui-redux-store": "workspace:*" "@neos-project/react-ui-components": "workspace:*" classnames: ^2.2.3 react: ^16.12.0 + react-redux: ^7.1.3 languageName: unknown linkType: soft