mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-05-07 17:35:46 +02:00
Move frontendcomponents into ui-core
The new architecture has been implemented. Co-authored-by: Eduard Heimbuch<eduard.heimbuch@cloudogu.com> Committed-by: Eduard Heimbuch<eduard.heimbuch@cloudogu.com> Pushed-by: Tarik Gürsoy<tarik.guersoy@cloudogu.com> Committed-by: Tarik Gürsoy<tarik.guersoy@cloudogu.com> Pushed-by: Eduard Heimbuch<eduard.heimbuch@cloudogu.com> Co-authored-by: Tarik Gürsoy<tarik.guersoy@cloudogu.com> Reviewed-by: Konstantin Schaper <konstantin.schaper@cloudogu.com>
This commit is contained in:
@@ -30,6 +30,10 @@ type Props = Omit<ComponentProps<typeof Notification>, "type" | "role"> & {
|
||||
error: BackendError;
|
||||
};
|
||||
|
||||
/**
|
||||
* @deprecated Please import the identical module from "@scm-manager/ui-core"
|
||||
*/
|
||||
|
||||
const BackendErrorNotification: FC<Props> = ({ error, ...props }) => {
|
||||
const [t] = useTranslation("plugins");
|
||||
|
||||
|
||||
@@ -50,6 +50,9 @@ const BasicErrorMessage: FC<Omit<ComponentProps<typeof Notification>, "type" | "
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* @deprecated Please import the identical module from "@scm-manager/ui-core"
|
||||
*/
|
||||
const ErrorNotification: FC<Props> = ({ error, ...props }) => {
|
||||
const [t] = useTranslation("commons");
|
||||
if (error) {
|
||||
|
||||
@@ -31,6 +31,9 @@ type Props = {
|
||||
className?: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* @deprecated Please import the identical module from "@scm-manager/ui-core"
|
||||
*/
|
||||
class Image extends React.Component<Props> {
|
||||
createImageSrc = () => {
|
||||
const { src } = this.props;
|
||||
|
||||
@@ -40,6 +40,10 @@ const FixedSizedImage = styled(Image)`
|
||||
height: 128px;
|
||||
`;
|
||||
|
||||
/**
|
||||
* @deprecated Please import the identical module from "@scm-manager/ui-core"
|
||||
*/
|
||||
|
||||
class Loading extends React.Component<Props> {
|
||||
render() {
|
||||
const { message, t } = this.props;
|
||||
|
||||
@@ -34,6 +34,10 @@ type Props = {
|
||||
role?: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* @deprecated Please import the identical module from "@scm-manager/ui-core"
|
||||
*/
|
||||
|
||||
const Notification: FC<Props> = ({ type = "info", onClose, className, children, role }) => {
|
||||
const renderCloseButton = () => {
|
||||
if (onClose) {
|
||||
|
||||
@@ -71110,7 +71110,7 @@ exports[`Storyshots Repositories/RepositoryEntry Archived 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className="sc-iBkjds idsAPT is-flex is-flex-direction-column is-justify-content-center is-flex-grow-1 is-overflow-hidden is-overflow-wrap-anywhere"
|
||||
className="Card__RowsContainer-sc-16vnzfd-0 rKDzD is-flex is-flex-direction-column is-justify-content-center is-flex-grow-1 is-overflow-hidden is-overflow-wrap-anywhere"
|
||||
style={
|
||||
Object {
|
||||
"gap": "0.25rem",
|
||||
@@ -71238,7 +71238,7 @@ exports[`Storyshots Repositories/RepositoryEntry Avatar EP 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className="sc-iBkjds idsAPT is-flex is-flex-direction-column is-justify-content-center is-flex-grow-1 is-overflow-hidden is-overflow-wrap-anywhere"
|
||||
className="Card__RowsContainer-sc-16vnzfd-0 rKDzD is-flex is-flex-direction-column is-justify-content-center is-flex-grow-1 is-overflow-hidden is-overflow-wrap-anywhere"
|
||||
style={
|
||||
Object {
|
||||
"gap": "0.25rem",
|
||||
@@ -71354,7 +71354,7 @@ exports[`Storyshots Repositories/RepositoryEntry Before Title EP 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className="sc-iBkjds idsAPT is-flex is-flex-direction-column is-justify-content-center is-flex-grow-1 is-overflow-hidden is-overflow-wrap-anywhere"
|
||||
className="Card__RowsContainer-sc-16vnzfd-0 rKDzD is-flex is-flex-direction-column is-justify-content-center is-flex-grow-1 is-overflow-hidden is-overflow-wrap-anywhere"
|
||||
style={
|
||||
Object {
|
||||
"gap": "0.25rem",
|
||||
@@ -71473,7 +71473,7 @@ exports[`Storyshots Repositories/RepositoryEntry Default 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className="sc-iBkjds idsAPT is-flex is-flex-direction-column is-justify-content-center is-flex-grow-1 is-overflow-hidden is-overflow-wrap-anywhere"
|
||||
className="Card__RowsContainer-sc-16vnzfd-0 rKDzD is-flex is-flex-direction-column is-justify-content-center is-flex-grow-1 is-overflow-hidden is-overflow-wrap-anywhere"
|
||||
style={
|
||||
Object {
|
||||
"gap": "0.25rem",
|
||||
@@ -71589,7 +71589,7 @@ exports[`Storyshots Repositories/RepositoryEntry Exporting 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className="sc-iBkjds idsAPT is-flex is-flex-direction-column is-justify-content-center is-flex-grow-1 is-overflow-hidden is-overflow-wrap-anywhere"
|
||||
className="Card__RowsContainer-sc-16vnzfd-0 rKDzD is-flex is-flex-direction-column is-justify-content-center is-flex-grow-1 is-overflow-hidden is-overflow-wrap-anywhere"
|
||||
style={
|
||||
Object {
|
||||
"gap": "0.25rem",
|
||||
@@ -71717,7 +71717,7 @@ exports[`Storyshots Repositories/RepositoryEntry HealthCheck Failure 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className="sc-iBkjds idsAPT is-flex is-flex-direction-column is-justify-content-center is-flex-grow-1 is-overflow-hidden is-overflow-wrap-anywhere"
|
||||
className="Card__RowsContainer-sc-16vnzfd-0 rKDzD is-flex is-flex-direction-column is-justify-content-center is-flex-grow-1 is-overflow-hidden is-overflow-wrap-anywhere"
|
||||
style={
|
||||
Object {
|
||||
"gap": "0.25rem",
|
||||
@@ -71846,7 +71846,7 @@ exports[`Storyshots Repositories/RepositoryEntry MultiRepositoryTags 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className="sc-iBkjds idsAPT is-flex is-flex-direction-column is-justify-content-center is-flex-grow-1 is-overflow-hidden is-overflow-wrap-anywhere"
|
||||
className="Card__RowsContainer-sc-16vnzfd-0 rKDzD is-flex is-flex-direction-column is-justify-content-center is-flex-grow-1 is-overflow-hidden is-overflow-wrap-anywhere"
|
||||
style={
|
||||
Object {
|
||||
"gap": "0.25rem",
|
||||
@@ -71986,7 +71986,7 @@ exports[`Storyshots Repositories/RepositoryEntry RepositoryFlag EP 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className="sc-iBkjds idsAPT is-flex is-flex-direction-column is-justify-content-center is-flex-grow-1 is-overflow-hidden is-overflow-wrap-anywhere"
|
||||
className="Card__RowsContainer-sc-16vnzfd-0 rKDzD is-flex is-flex-direction-column is-justify-content-center is-flex-grow-1 is-overflow-hidden is-overflow-wrap-anywhere"
|
||||
style={
|
||||
Object {
|
||||
"gap": "0.25rem",
|
||||
@@ -72115,7 +72115,7 @@ exports[`Storyshots Repositories/RepositoryEntry With long texts 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className="sc-iBkjds idsAPT is-flex is-flex-direction-column is-justify-content-center is-flex-grow-1 is-overflow-hidden is-overflow-wrap-anywhere"
|
||||
className="Card__RowsContainer-sc-16vnzfd-0 rKDzD is-flex is-flex-direction-column is-justify-content-center is-flex-grow-1 is-overflow-hidden is-overflow-wrap-anywhere"
|
||||
style={
|
||||
Object {
|
||||
"gap": "0.25rem",
|
||||
|
||||
@@ -26,6 +26,10 @@
|
||||
// @ts-ignore scmStage is set on the index page
|
||||
export const isDevBuild = () => (window.scmStage || "").toUpperCase() !== "PRODUCTION";
|
||||
|
||||
/**
|
||||
* @deprecated Please import the identical module from "@scm-manager/ui-core"
|
||||
*/
|
||||
|
||||
export const createAttributesForTesting = (testId?: string) => {
|
||||
if (!testId) {
|
||||
return undefined;
|
||||
|
||||
@@ -31,6 +31,10 @@ type Props = {
|
||||
right?: ReactNode;
|
||||
};
|
||||
|
||||
/**
|
||||
* @deprecated Please import the identical module from "@scm-manager/ui-core"
|
||||
*/
|
||||
|
||||
export default class Level extends React.Component<Props> {
|
||||
render() {
|
||||
const { className, left, children, right } = this.props;
|
||||
|
||||
@@ -28,6 +28,10 @@ type Props = {
|
||||
className?: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* @deprecated Please import the identical module from "@scm-manager/ui-core"
|
||||
*/
|
||||
|
||||
class SubSubtitle extends React.Component<Props> {
|
||||
render() {
|
||||
const { className, children } = this.props;
|
||||
|
||||
@@ -29,6 +29,10 @@ type Props = {
|
||||
className?: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* @deprecated Please import the identical module from "@scm-manager/ui-core"
|
||||
*/
|
||||
|
||||
const Subtitle: FC<Props> = ({ subtitle, className, children }) => {
|
||||
if (subtitle) {
|
||||
return <h2 className={classNames("subtitle", className)}>{subtitle}</h2>;
|
||||
|
||||
@@ -31,6 +31,10 @@ type Props = {
|
||||
className?: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* @deprecated Please import the identical module from "@scm-manager/ui-core"
|
||||
*/
|
||||
|
||||
const Title: FC<Props> = ({ title, preventRefreshingPageTitle, customPageTitle, className, children }) => {
|
||||
useEffect(() => {
|
||||
if (!preventRefreshingPageTitle) {
|
||||
|
||||
@@ -22,10 +22,11 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
import { useMemo } from "react";
|
||||
|
||||
let counter = 0;
|
||||
import { useAriaId } from "@scm-manager/ui-core";
|
||||
|
||||
/**
|
||||
* @deprecated Please import the identical module from "@scm-manager/ui-core"
|
||||
*/
|
||||
export default function useGeneratedId(fallback?: string) {
|
||||
return useMemo(() => fallback ?? `scm-id-${++counter}`, [fallback]);
|
||||
return useAriaId(fallback);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user