Юниверс MDM SDK UI
v6.15.0

Интерфейс UEUserViewContent

Точка расширения позволяет кастомизировать вывод компонента информации о пользователе

import {Universe} from '@universe-ee/sdk';

const {React, MobxReact} = Universe.Vendor;

interface Props {
userData: Universe.Platform.UserComponents.UserTooltip | undefined;
login: string;
content: React.ReactNode;
isLoading: boolean;
}

@MobxReact.observer
export class CustomSubstitutionUserViewContent extends React.Component<Props> {
override render () {
return (
<span style={{color: 'red'}}>UE content!</span>
);
}
}

Подключение точки расширения:

import {Universe} from '@universe-ee/sdk';
import {CustomSubstitutionUserViewContent} from './CustomSubstitutionUserViewContent';

export default {
type: 'UserViewContent',
moduleId: 'UserViewContentCustomUE',
active: true,
system: false,
meta: {},
resolver: () => true,
component: CustomSubstitutionUserViewContent
} satisfies Universe.Platform.UserExit.UserExitDeclaration;
interface UEUserViewContent {
    active: boolean;
    component: ComponentType<
        {
            content: ReactNode;
            isLoading: boolean;
            login: string;
            userData: UserTooltip
            | undefined;
        },
    >;
    meta: {};
    moduleId: string;
    resolver: AbstractUserExitResolver;
    system: boolean;
}

Иерархия (Просмотр сводки)

Индекс

Свойства

active: boolean

Является ли экземпляр точки расширения активным

component: ComponentType<
    {
        content: ReactNode;
        isLoading: boolean;
        login: string;
        userData: UserTooltip
        | undefined;
    },
>
meta: {}

Мета-информация точки расширения

moduleId: string

Уникальный идентификатор экземпляра точки расширения

Функция указывает, следует ли применять данный экземпляр точки расширения

system: boolean

Является ли системным экземпляром