import { type JSONRefObject } from '../../data/JSONRefObject'; import { type AspectsProps } from '../../model/AspectsProps'; import { type Attachment } from '../../model/Attachment'; import { type AlignProps, type HeadlineCommonProps, type TextProps, } from '../../model/HeadlineType'; import { type LinkProps, type Target } from '../../model/LinkProps'; import { type IconProps } from '../../model/Picture'; import { type UniBlockContent } from '../../UniBlock/UniBlockProps'; /** * @title Отображение списка * @enumNames [ * "Одна колонка", * "Две колонки", * ] */ export type LinkColumnsMode = 'single' | 'double'; export interface LinkDoc extends LinkProps { /** @title Размер файла */ fileSize?: string; /** @title Формат файла */ fileFormat?: string; } export type AttachmentDoc = TextProps & { /** @title */ attachment?: Attachment; /** @default "" */ target?: Target; }; type DescriptionProps = { /** @title Описание */ __html?: string; }; type Report = { /** @hidden */ __html?: string; }; type ReportSource = { /** @title Текст согласия */ reportSource?: Report & JSONRefObject; }; /** * @title Ссылка на документ */ export type LinkDocDef = AspectsProps & LinkDoc & ReportSource & DescriptionProps & { /** @default "Link" */ docType: 'Link'; }; /** * @title Файл */ export type AttachmentDocDef = AttachmentDoc & AspectsProps & ReportSource & DescriptionProps & { /** @default "Attachment" */ docType: 'Attachment'; }; /** @title Не выбрано * */ export type EmptyDocType = { /** @default "" */ docType: ''; }; /** * @title Документ * @default {"docType": ""} */ export type DocBlockDef = EmptyDocType | LinkDocDef | AttachmentDocDef; /** * @title Список документов */ export type LinkDocsContent = UniBlockContent & HeadlineCommonProps & IconProps & AlignProps & { /** @title Список */ documents?: DocBlockDef[]; columnsMode?: LinkColumnsMode; };