import * as i0 from '@angular/core'; import { Type, EventEmitter, OnInit, OnDestroy, ElementRef, OnChanges, SimpleChanges, AfterViewInit, ChangeDetectorRef, AfterContentChecked, ViewContainerRef, ComponentRef, PipeTransform } from '@angular/core'; import { HttpClient, HttpEvent } from '@angular/common/http'; import * as rxjs from 'rxjs'; import { Observable, BehaviorSubject, Subject } from 'rxjs'; import * as i31 from '@angular/cdk/drag-drop'; import { CdkDragDrop } from '@angular/cdk/drag-drop'; import { SafeHtml, DomSanitizer, SafeResourceUrl } from '@angular/platform-browser'; import * as i8 from '@angular/material/snack-bar'; import { MatSnackBar } from '@angular/material/snack-bar'; import { ClipboardService } from 'ngx-clipboard'; import * as i21 from '@angular/material/dialog'; import { MatDialog } from '@angular/material/dialog'; import { Router } from '@angular/router'; import * as i1 from '@angular/common'; import * as i2 from '@angular/forms'; import * as i3 from '@ng-select/ng-select'; import * as i4 from '@angular/material/badge'; import * as i5 from '@angular/material/table'; import * as i6 from '@angular/material/expansion'; import * as i7 from '@angular/material/form-field'; import * as i9 from '@angular/material/progress-bar'; import * as i10 from '@angular/material/progress-spinner'; import * as i11 from '@angular/material/tabs'; import * as i12 from '@angular/material/menu'; import * as i13 from '@angular/material/card'; import * as i14 from '@angular/material/select'; import * as i15 from '@angular/material/tooltip'; import * as i16 from '@angular/material/checkbox'; import * as i17 from '@angular/material/chips'; import * as i18 from '@angular/material/list'; import * as i19 from '@angular/material/button'; import * as i20 from '@angular/material/input'; import * as i22 from '@angular/material/paginator'; import * as i23 from '@angular/material/datepicker'; import * as i24 from '@angular/material/grid-list'; import * as i25 from '@angular/material/slide-toggle'; import * as i26 from '@angular/material/tree'; import * as i27 from '@angular/material/core'; import * as i28 from '@angular/material/autocomplete'; import * as i29 from '@angular/material/sidenav'; import * as i30 from '@angular/material/icon'; import * as i32 from '@angular/material/button-toggle'; interface TagItem { /** * Название тега */ tag: string; displayValue: string; isCustom: boolean; } interface HtmlBodyTag { tagDescription: TagItem; innerHtml: string; attributes: Object; } interface BaseApiResponse { isSucceeded: boolean; message: string; } interface PublicFilesUploadResponse { succeeded: boolean; errorMessage: string; fileIds: Array; filesUploadedEventId: string; } declare class PublicFileUploadService { private readonly _httpClient; private readonly baseUrl; constructor(_httpClient: HttpClient, baseUrl: string); postFiles(files: FileList, applicationId: string | null): Observable; postFilesInner(formData: FormData, applicationId: string | null, withProgress: true): Observable>; postFilesInner(formData: FormData, applicationId: string | null, withProgress?: false): Observable; postFilesInner(formData: FormData, applicationId: string | null, withProgress: boolean): Observable | Observable>; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } interface PrivateFilesCreatedResult { succeeded: boolean; errorMessage: string; setId: string; fileIds: Array; } declare class PrivateFileUploadService { private readonly _httpClient; private readonly baseUrl; constructor(_httpClient: HttpClient, baseUrl: string); postFiles(files: FileList, applicationId: string | null): Observable; postFilesInner(formData: FormData, applicationId: string | null, withProgress: true): Observable>; postFilesInner(formData: FormData, applicationId: string | null, withProgress?: false): Observable; postFilesInner(formData: FormData, applicationId: string | null, withProgress: boolean): Observable | Observable>; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } interface ImageRestrictions { maxWidth: number | undefined; maxHeight: number | undefined; } interface FileImageTag { tagName: string; data: FileImageTagData; } interface FileImageTagData { src: string; fileId: string; screenMediaRequest: string; } interface IImageMediaRequest { minScreenWidth: number; maxScreenWidth: number; maxImageHeight?: number; maxImageWidth?: number; } interface FileAudioTagData { fileId: string; title?: string; } interface FileAudioTag { tagName: string; data: FileAudioTagData; } interface InterfaceBlock { /** * Название тега */ tagName: string; data: any; validationResult?: BaseApiResponse | undefined; } declare class TagEditorService { readonly tag$: BehaviorSubject; readonly presentOrEdit$: BehaviorSubject; } interface IVisualEditorProps { selectedVideoPlayer: string; htmlRaw: string; } interface IMarkUpTagService { /** * Название тега */ tagName: string; /** * Описание тега */ shortDescription: string; /** * Функция для конвертации из модели редактора в Html строку разметки * @param bodyTag тег * @returns */ bodyTagToHtmlStringConverter: (bodyTag: HtmlBodyTag) => string; extractBlockFromHtmlElement: (elem: HTMLElement, options: CrocoHtmlOptions) => InterfaceBlock; /** * Конвертация блока интерфейса в модель тега для редактора * @param data * @returns */ toBodyTag: (data: InterfaceBlock) => HtmlBodyTag; /** * Получить значение по умолчанию * @returns */ getDefaultValue: (props: IVisualEditorProps) => HtmlBodyTag; } declare class FileImageTagService implements IMarkUpTagService { tagName: string; shortDescription: string; bodyTagToHtmlStringConverter(bodyTag: HtmlBodyTag): string; extractBlockFromHtmlElement(elem: HTMLElement, options: CrocoHtmlOptions): InterfaceBlock; toBodyTag(data: InterfaceBlock): HtmlBodyTag; getDefaultValue(): HtmlBodyTag; } declare enum TextAlignment { Left = "left", Center = "center", Right = "right" } declare class TextTagDataConsts { static readonly HAlign = "h-align"; } declare class TextTagHtmlMarkupTagService implements IMarkUpTagService { constructor(tagName: string, shortDescription: string); tagName: string; shortDescription: string; bodyTagToHtmlStringConverter(bodyTag: HtmlBodyTag): string; extractBlockFromHtmlElement(elem: HTMLElement, options: CrocoHtmlOptions): InterfaceBlock; toBodyTag(data: InterfaceBlock): HtmlBodyTag; getDefaultValue(props: IVisualEditorProps): HtmlBodyTag; } declare class ExternalVideoTagService implements IMarkUpTagService { tagName: string; shortDescription: string; bodyTagToHtmlStringConverter(bodyTag: HtmlBodyTag): string; extractBlockFromHtmlElement(elem: HTMLElement, options: CrocoHtmlOptions): InterfaceBlock; toBodyTag(data: InterfaceBlock): HtmlBodyTag; getDefaultValue(props: IVisualEditorProps): HtmlBodyTag; } declare class HtmlRawTagDataConsts { static readonly TagName = "html-raw"; } interface ExtractHtmlRawTag { type: string; data: ExtractHtmlRawTagData; } interface ExtractHtmlRawTagData { innerHTML: string; } declare class HtmlRawTagService implements IMarkUpTagService { tagName: string; shortDescription: string; bodyTagToHtmlStringConverter(bodyTag: HtmlBodyTag): string; extractBlockFromHtmlElement(elem: HTMLElement, options: CrocoHtmlOptions): InterfaceBlock; toBodyTag(data: InterfaceBlock): HtmlBodyTag; getDefaultValue(props: IVisualEditorProps): HtmlBodyTag; } declare class DownloadButtonTagDataConsts { static readonly TagName = "download-file-button"; static readonly TitleAttrName = "title"; static readonly LinkAttrName = "link"; } interface DownloadButtonTag { type: string; data: DownloadButtonTagData; } interface DownloadButtonTagData { title: string; link: string; } declare class DownloadButtonTagService implements IMarkUpTagService { tagName: string; shortDescription: string; bodyTagToHtmlStringConverter(bodyTag: HtmlBodyTag): string; extractBlockFromHtmlElement(elem: HTMLElement, options: CrocoHtmlOptions): InterfaceBlock; toBodyTag(data: InterfaceBlock): HtmlBodyTag; getDefaultValue(props: IVisualEditorProps): HtmlBodyTag; } declare class ButtonTagDataConsts { static readonly TagName = "button"; static readonly TextAttrName = "text"; static readonly TypeAttrName = "type"; static readonly ClickAttrName = "click"; } interface ButtonTag { type: string; data: ButtonTagData; } interface ButtonTagData { text: string; type: string; click: string; } declare class ButtonTagService implements IMarkUpTagService { tagName: string; shortDescription: string; bodyTagToHtmlStringConverter(bodyTag: HtmlBodyTag): string; extractBlockFromHtmlElement(elem: HTMLElement, options: CrocoHtmlOptions): InterfaceBlock; toBodyTag(data: InterfaceBlock): HtmlBodyTag; getDefaultValue(props: IVisualEditorProps): HtmlBodyTag; } declare class CustomWidgetTagDataConsts { static readonly TagName = "custom-widget"; static readonly TypeAttrName = "type"; static readonly DataIdAttrName = "data-id"; static readonly WidgetIdAttrName = "widget-id"; } interface CustomWidgetTag { type: string; data: CustomWidgetTagData; } interface CustomWidgetTagData { type: string; dataId: string; widgetId: string; } declare class CustomWidgetTagService implements IMarkUpTagService { tagName: string; shortDescription: string; bodyTagToHtmlStringConverter(bodyTag: HtmlBodyTag): string; extractBlockFromHtmlElement(elem: HTMLElement, options: CrocoHtmlOptions): InterfaceBlock; toBodyTag(data: InterfaceBlock): HtmlBodyTag; getDefaultValue(props: IVisualEditorProps): HtmlBodyTag; static ExtractCustomWidgetTagData(attributes: any): CustomWidgetTagData; static ExtractCustomWidgetAttributes(customWidgetTagData: CustomWidgetTagData): { type: string; "data-id": string; "widget-id": string; }; } interface CrocoHtmlOptions { /** * Опции для отображения изображений. */ imageOptions: CrocoHtmlImageOptions; /** * Формат адреса до оригиналов файлов по идентификатору и имени */ fileIdAndNamePathUrlFormat: string; /** * Компонент для рендера кастомных виджетов */ customWidgetRendererComponent?: Type; /** * Использовать кнопку для отрисовки кастомных виджетов */ useCustomWidgetsButton: boolean; /** * Показывать кнопку для запуска настроек */ showSettingsButton: boolean; /** * Кастомные объявленные теги */ definedCustomTags: { [id: string]: IMarkUpTagService; }; /** * Рендеры для кастомных тегов. */ definedCustomTagViewRenderers: { [id: string]: ICustomTagViewRender; }; /** * Обработчик нажатия на кнопку кастомных виджетов * @returns */ customWidgetClickHandler: (editor: VisualEditorComponent) => void; } interface ICustomTagViewRender { /** * Компонент для визуального редактора croco-html-custom-widget-editor * Должен содержать инпуты * tagService: TagEditorService */ editorComponent?: Type; /** * Иконка в визуальном редакторе croco-html-custom-widget-icon */ iconComponent?: Type; /** * Компонент для отрисовки на интерфейсе croco-html-defined-custom-tag-view. * Должен содержать input({required: true}) data: InterfaceBlock */ viewComponent?: Type; } interface CrocoHtmlImageOptions { /** * Формат сслыки для показа изображений из файлов. * Содержит переменные: {sizeType} - тип размера, {fileId} - идентификатор изображения. */ sizeTypeAndFileIdImageUrlFormat: string; /** * Медиа запросы для изображений. */ globalMediaRequests?: IImageMediaRequest[]; /** * Обработчик клика на изображение в теге file-image. * @param imageData - данные изображения */ onImageClick?: (imageData: FileImageTagData) => void; /** * Опции для визуального редактора изображений. */ visualEditorOptions?: { /** * Максимальная высота изображения в режиме редактора в пикселях (например, 200). * Если указано, изображения в ImageEditorComponent не будут превышать эту высоту. */ editorModeImageMaxHeight?: number; /** * Максимальная высота изображения в режиме предпросмотра в пикселях (например, 200). * Если указано, изображения в FileImageTagViewComponent не будут превышать эту высоту. */ previewModeImageMaxHeight?: number; }; } /** * Опции для работы с файлами в редакторе разметки */ interface CrocoHtmlEditorFileOptions { /** * Использовать приватные файлы */ usePrivateFiles: boolean; /** * Свойство которое подставляется в фильтр с файлами */ applicationId: string | null; } declare class CrocoHtmlFileOptionsService { private readonly localStorageToken; private readonly defaultOptions; set(data: CrocoHtmlEditorFileOptions): void; get(): CrocoHtmlEditorFileOptions; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } interface FilePostingStarted { filesCount: number; } declare class UploadFilesBtnComponent { private readonly _publicFileUploadService; private readonly _privateFileUploadService; private readonly _htmlSettingsService; private fileInput; extAccepts: string; isMultiple: boolean; btnText: string; hidden: boolean; postFilesStarted: EventEmitter; onPublicFilesUploaded: EventEmitter; onPrivateFilesUploaded: EventEmitter; constructor(_publicFileUploadService: PublicFileUploadService, _privateFileUploadService: PrivateFileUploadService, _htmlSettingsService: CrocoHtmlFileOptionsService); handleFileInput(e: Event): void; clickFileInput(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class AddFilesBtnComponent { postFilesStarted: EventEmitter; fakeBtn: UploadFilesBtnComponent; fileIds: number[]; constructor(); filesTagsReady: EventEmitter; postFilesStartedEventHandler(data: FilePostingStarted): void; filesUploadedPublicHandler(data: PublicFilesUploadResponse): void; filesUploadedPrivateHandler(data: PrivateFilesCreatedResult): void; private buildFileTags; handleClick(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } interface GetListResult { totalCount: number; list: Array; } interface FileRelationModel { entityTypeFullName: string; entityKey: string; relationName: string; relationValue: string; relationCustomData: string; } interface SearchFilesRequest { q: string; fileName: string; applicationId: string; fileTypes: Array; count: number | null; offSet: number; } declare enum FileType { Undefined = "Undefined", Unknown = "Unknown", Image = "Image", Audio = "Audio", Video = "Video", Document = "Document", Archive = "Archive" } interface GetListSearchModel { count: number | null; offSet: number; } interface FileSimpleModel { fileId: number; fileName: string; type: FileType; downloadUrl: string; } interface FileInfoModel { type: FileType; name: string; downloadUrl: string; } interface CommonFileInfoResultModel { id: string; isPrivateId: boolean; fileInfo: FileInfoModel; } declare class PublicFilesQueryService { private readonly _httpClient; private readonly _baseControllerUrl; constructor(_httpClient: HttpClient, baseUrl: string); search(model: SearchFilesRequest): Observable>; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } interface PrivateFileNameModel { id: string; setId: string; fileName: string; type: FileType; downloadUrl: string; createdOn: string; applicationId: string; } declare class PrivateFilesQueryService { private readonly _httpClient; private readonly _baseControllerUrl; constructor(_httpClient: HttpClient, baseUrl: string); search(model: SearchFilesRequest): Observable>; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class CommonFileInfoQueryService { private readonly _httpClient; private readonly _baseControllerUrl; constructor(_httpClient: HttpClient, baseUrl: string); /** * Получить информацию о файле на сервере по идентификатору. * @param model * @returns */ getInfo(id: string): rxjs.Observable; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class AudioEditorComponent implements OnInit, OnDestroy { private readonly _publicFileService; private readonly _privateFileService; private readonly _htmlSettingsService; private readonly _commonFileInfoService; hasAudioError: boolean; errorMessage: string; isPlaying: boolean; isLoading: boolean; currentTime: number; duration: number; volume: number; isMuted: boolean; audioSrc: string; searchOrEdit: string; files: Array<{ fileId: string; fileName: string; }>; loading: boolean; q: string; private unsubscribe; audioPlayer: ElementRef; tag: HtmlBodyTag; presentOrEdit: boolean; constructor(_publicFileService: PublicFilesQueryService, _privateFileService: PrivateFilesQueryService, _htmlSettingsService: CrocoHtmlFileOptionsService, _commonFileInfoService: CommonFileInfoQueryService); get fileId(): string; set fileId(value: string); get title(): string; set title(value: string); hasFileId(): boolean; private get audioElement(); onErrorHandler(): void; removeAudioError(): void; setError(message: string): void; onFileIdChanged(fileId: string): void; checkAndLoadAudioFile(): void; loadAudioFile(): void; onLoadedMetadata(): void; onTimeUpdate(): void; onEnded(): void; onCanPlay(): void; togglePlayPause(): void; restart(): void; rewind(): void; forward(): void; onVolumeChange(event: Event): void; toggleMute(): void; onSeekChange(event: Event): void; formatTime(seconds: number): string; getProgress(): number; loadFiles(): void; onSearchChanged(q: { term: string; items: object[]; }): void; onFileSelected(fileId: string): void; onFilesUploaded(fileIds: string[] | number[]): void; removeAudio(): void; ngOnInit(): void; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } interface TableHeaderData { type: "table-header"; columns: string[]; } interface TableRowColumnData { type: "table-row-column-data"; data: { text: string; children: InterfaceBlock[]; }; } interface TableRowData { type: "table-row-column"; columns: TableRowColumnData[]; } interface TableData { header: TableHeaderData; rows: TableRowData[]; bootstrapHtml: string; html: string; angularMaterialTableDataCheck?: BaseApiResponse; } interface TableTagData { type: "table"; data: TableData; } declare class TableTypes { static readonly TableRowColumnData = "table-row-column-data"; static readonly Table = "table"; static readonly TableRowColumn = "table-row-column"; } interface AngularMaterialTableData { displayedColumns: string[]; data: object[]; } declare class TableMethods { static getTableFromHtmlTag(tableTag: HTMLTableElement, options: CrocoHtmlOptions): InterfaceBlock; static checkTable(tableData: TableData): BaseApiResponse; static getHeader(tableTag: HTMLTableElement): TableHeaderData; static getTableRows(tableTag: HTMLTableElement, options: CrocoHtmlOptions): Array; } declare class AngularMaterialTableMethods { static getAngularMaterialTableData(columns: string[], rows: TableRowData[]): AngularMaterialTableData; static checkHeaders(header: TableHeaderData): BaseApiResponse; static checkAngularMaterialTableData(header: TableHeaderData, rows: TableRowData[], checkHeaders?: boolean): BaseApiResponse; } declare class FileAudioTagDataConsts { static readonly TagName = "audio-player"; static readonly FileIdAttrName = "file-id"; static readonly TitleAttrName = "title"; } declare class AudioMethods { static buildUrl(fileId: string, fileName: string): string; static isPrivateFileId(fileId: string): boolean; static formatTime(seconds: number): string; static calculateProgress(currentTime: number, duration: number): number; } declare class BodyTagsExtensions { private static readonly _tagServices; static hasTagService(tagName: string, options: CrocoHtmlOptions): boolean; static getTagService(tagName: string, options: CrocoHtmlOptions): IMarkUpTagService; static convertToHtmlString(bodyTag: HtmlBodyTag, options: CrocoHtmlOptions): string; static bodyTagsToHtml(bodyTags: HtmlBodyTag[], options: CrocoHtmlOptions): string; static getBodyTags(html: string, options: CrocoHtmlOptions): HtmlBodyTag[]; static sanitizeInnerHtml(html: string): string; static toBodyTag(data: InterfaceBlock, options: CrocoHtmlOptions): HtmlBodyTag; } declare class BootstrapTableMethods { static buildTable(header: TableHeaderData, rows: TableRowData[]): string; static buildHeader(data: TableHeaderData): string; static buildBody(rows: TableRowData[]): string; static buildInnerTags(tags: InterfaceBlock[]): string; static buildInnerTag(data: InterfaceBlock): string; } declare class FileImageTagDataConsts { static readonly TagName = "file-image"; static readonly FileIdAttrName = "file-id"; static readonly ScreenMediaRequest = "screen-media-request"; static readonly MaxScreenWidth = "max-screen-width"; static readonly MinScreenWidth = "min-screen-width"; static readonly MaxImageHeight = "max-image-height"; static readonly MaxImageWidth = "max-image-width"; static readonly DefaultValueForFileImage = "max-screen-width:1200,min-screen-width:900,max-image-height:300;max-screen-width:900,min-screen-width:600,max-image-height:200"; } declare class ImageMethods { static buildUrl(fileId: string, sizeType: string, options: CrocoHtmlOptions): string; static buildSmallUrl(fileId: string, options: CrocoHtmlOptions): string; static buildMediumUrl(fileId: string, options: CrocoHtmlOptions): string; static isPrivateFileId(fileId: string): boolean; static mediaRequestStringToArrayParser: (data: string) => IImageMediaRequest[]; static createMediaRequestValue(arr: string[], attribute: string): number | null; static mediaRequestsArrayToString(data: IImageMediaRequest[]): string; static mediaRequestToString(data: IImageMediaRequest): string; static getImageRestrictionsByScreenSize(screenSize: number, requests: IImageMediaRequest[]): ImageRestrictions; } declare class TableBuilder { static getTableMarkUp(rows: number, cols: number, generateHeaders: boolean): string; static getTableHeaderMarkUp(cols: number): string; static getTableBodyMarkUp(cols: number, rows: number): string; } declare class TextTags { static readonly text = "text"; static readonly h1 = "h1"; static readonly h2 = "h2"; static readonly h3 = "h3"; static readonly h4 = "h4"; static readonly h5 = "h5"; static readonly h6 = "h6"; static headerTextTags: string[]; static allTextTags: string[]; } declare const TextTag = "text"; interface GenericTextTag { tagName: string; data: SimpleTextTagData; } interface IHorizontalAlignmentExtractionResult { succeeded: boolean; result: TextAlignment; errorMessage: string; } interface SimpleTextTagData { textTagName: string; text: string; html: string; horizontalAlignment: "left" | "right" | "center"; validationResult: BaseApiResponse; } declare class TextSimpleMethods { static supportedTags: string[]; static extractTextTag(elem: HTMLElement): GenericTextTag; static prepareText(s: string): string; static extractHorizontalAlignment(elem: HTMLElement): IHorizontalAlignmentExtractionResult; static validateTextHtml(html: string): BaseApiResponse; static validateTag(element: Element): BaseApiResponse; } declare class ExternalVideoTagDataConsts { static readonly TagName = "external-video"; static readonly VideoTypeAttrName = "type"; static readonly LinkAttrName = "link"; static readonly UseResponsiveWrapperAttrName = "use-responsive-wrapper"; static readonly IframeAttrName = "iframe"; } declare class ExternalVideoSupportedTypes { static readonly Youtube = "youtube"; static readonly VkVideo = "vk-video"; static readonly Code = "code"; } declare const ExternalVideoPlayers: { type: string; displayValue: string; }[]; interface ExternalVideoTag { type: string; data: ExternalVideoTagData; } interface ExternalVideoTagData { type: string; link: string; innerHtml: string; useResponsiveWrapper: boolean; } declare class XmlExtensions { static formatXml(xml: string, tab?: string): string; static tagsToLower(xml: string): string; static replaceTagToLower(xml: string, tag: string): string; } declare class ExternalVideoEditorComponent implements OnInit { tag: HtmlBodyTag; presentOrEdit: boolean; protected readonly ExternalVideoSupportedTypes: typeof ExternalVideoSupportedTypes; tagData: ExternalVideoTagData; linkText: string; ngOnInit(): void; linkChanged(): void; onCheck(checked: boolean): void; createLinkByIFrame(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class HtmlRawEditorComponent implements OnChanges { private readonly _sanitizer; tag: HtmlBodyTag; presentOrEdit: boolean; safeHtml: SafeHtml; constructor(_sanitizer: DomSanitizer); ngOnChanges(changes: SimpleChanges): void; onSafeHtmlChange(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class ScreenWidthService { private screenWidth; constructor(); private onResize; getScreenWidth(): Observable; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class ImageEditorComponent implements OnInit, OnDestroy { private readonly _options; private readonly screenWidthService; hasImageError: boolean; searchOrEdit: string; requests: IImageMediaRequest[]; imageMaxHeight: number; imageMaxWidth: number; isShowMediaRequest: boolean; private unsubscribe; tag: HtmlBodyTag; presentOrEdit: boolean; onErrorHandler(): void; get fileId(): string; set fileId(value: string); constructor(_options: CrocoHtmlOptions, screenWidthService: ScreenWidthService); getSrc(): string; hasFileId(): boolean; onFileIdChanged(fileId: string): void; removeImageError(): void; ngOnInit(): void; requestChanged(): void; addNewMediaRequest(): void; deleteMediaRequest(index: number): void; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } type SpriteIdsType = 'align-center' | 'align-left' | 'align-right' | 'move-icon' | 'source-code-tab' | 'tag-button-audio-player' | 'tag-button-button' | 'tag-button-custom-widget' | 'tag-button-download-file-button' | 'tag-button-external-video' | 'tag-button-file-image' | 'tag-button-html-raw' | 'tag-button-text' | 'viewer-tab' | 'visual-editor-tab'; declare class VisualEditorComponent implements OnInit, AfterViewInit { private readonly _cdref; private readonly _options; textArea: ElementRef; imageUploadBtn: UploadFilesBtnComponent; isLoading: boolean; loadingText: string; text: string; htmlRaw: string; alignment: TextAlignment; textTag: string; textTagOptions: TagItem[]; alignmentOptions: { value: TextAlignment; text: string; }[]; isTagAdditionStarted: boolean; showMarkUp: boolean; tags: TagItem[]; videoPlayers: { type: string; displayValue: string; }[]; selectedValue: string; selectedVideoPlayer: string; imageMode: 'select' | 'upload' | null; protected readonly ExternalVideoTagDataConsts: typeof ExternalVideoTagDataConsts; protected readonly HtmlRawTagDataConsts: typeof HtmlRawTagDataConsts; protected readonly ExternalVideoSupportedTypes: typeof ExternalVideoSupportedTypes; protected readonly FileImageTagDataConsts: typeof FileImageTagDataConsts; useHtmlRaw: boolean; html: string; isHtmlSet(): boolean; clearHtml(): void; getHtml(): string; onHtmlChanged: EventEmitter; rendered: EventEmitter; bodyTags: HtmlBodyTag[]; saveBodyTags: HtmlBodyTag[]; useCustomWidgetsButton: boolean; constructor(_cdref: ChangeDetectorRef, _options: CrocoHtmlOptions); ngAfterViewInit(): void; resetTextStyle(): void; drop(event: CdkDragDrop): void; addTag(tag: HtmlBodyTag): void; onTagChangedHandler(data: HtmlBodyTag, index: number): void; onTagRemovedHandler(index: number): void; recalculateHtml(): void; recalculateBodyTags(): void; selectTag(data: TagItem): void; isTagRequiringForm(): boolean; addTagWithForm(): void; selectExistingImage(): void; uploadNewImages(): void; onImageFilesUploaded(fileIds: string[] | number[]): void; addTextTag(): void; addExternalVideoTag(): void; addHtmlRawTag(): void; resetTagForm(): void; addRegularTag(): void; isDefinedCustomWidget(tagName: string): boolean; customWidgetsClickHandler(): void; ngOnInit(): void; setTagButton(tagName: string): SpriteIdsType; setAlignButton(type: string): SpriteIdsType; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class MainEditorComponent implements OnInit, AfterContentChecked, AfterViewInit { private readonly _clipboardService; private readonly _snackBar; private readonly _cdref; private readonly _dialog; private readonly _htmlSettingsService; visualEditorRendered: boolean; visualEditor: VisualEditorComponent; showMarkUp: boolean; useHtmlRaw: boolean; html: string; onHtmlChanged: EventEmitter; showSettingsButton: boolean; constructor(_clipboardService: ClipboardService, _snackBar: MatSnackBar, _cdref: ChangeDetectorRef, _dialog: MatDialog, _htmlSettingsService: CrocoHtmlFileOptionsService, options: CrocoHtmlOptions); ngOnChanges(changes: SimpleChanges): void; ngAfterViewInit(): void; ngAfterContentChecked(): void; visualEditorRenderedHandler(): void; onHtmlChangedHandler(html: string): void; textAreaModelChangedHandler(): void; recalculateBodyTags(): void; copyMarkUp(): void; ngOnInit(): void; openSettingsModal(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class MainEditorBlockComponent implements OnDestroy { private readonly _options; textTags: string[]; private unsubscribe; set tag(data: HtmlBodyTag); _tag: HtmlBodyTag; _tagService: TagEditorService; presentOrEdit: boolean; onTagSaved: EventEmitter; onTagRemoved: EventEmitter; constructor(_options: CrocoHtmlOptions); save(): void; cancelSave(): void; isDefinedCustomTag(): boolean; deleteItem(): void; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class DefinedCustomEditorBlockComponent implements OnInit, OnDestroy { private readonly _options; private unsubscribe; viewContainerRef: ViewContainerRef; useDynamicComponent: boolean; dynamicContainerRef: ComponentRef; _tagService: TagEditorService; _tag: HtmlBodyTag; set tagService(data: TagEditorService); constructor(_options: CrocoHtmlOptions); getCustomComponent(): i0.Type; ngOnInit(): void; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class TextEditorComponent implements OnDestroy { private unsubscribe; _tag: HtmlBodyTag; _tagService: TagEditorService; set tagService(data: TagEditorService); presentOrEdit: boolean; TextAlignment: typeof TextAlignment; _horizontalAlignment: TextAlignment; changeData(): void; getInnerHtml(): string; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class CustomWidgetEditorComponent implements OnInit { tag: HtmlBodyTag; presentOrEdit: boolean; tagData: CustomWidgetTagData; ngOnInit(): void; dataChanged(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class CustomWidgetIconComponent implements OnInit { private readonly _options; viewContainerRef: ViewContainerRef; useDynamicComponent: boolean; dynamicContainerRef: ComponentRef; set tagName(tagName: string); constructor(_options: CrocoHtmlOptions); getIconComponent(): i0.Type; _tagName: string; _shortTagName: string; ngOnInit(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } interface SearchQuestionsFormData { q: string; } interface FileUnifiedModel { fileId: string; fileName: string; } declare class FileIdSelectComponent implements OnInit, OnChanges { private readonly _publicFileService; private readonly _privateFileService; private _htmlSettingsService; private readonly _options; q: string; labelText: string; fileId: string; loading: boolean; files: FileUnifiedModel[]; onFileIdChanged: EventEmitter; get crocoHtmlEditorFileOptions(): CrocoHtmlEditorFileOptions; constructor(_publicFileService: PublicFilesQueryService, _privateFileService: PrivateFilesQueryService, _htmlSettingsService: CrocoHtmlFileOptionsService, _options: CrocoHtmlOptions); onModelChanged(fileId: string): void; getSrc(fileId: string): string; ngOnInit(): void; loadFiles(): void; onSearchChanged(q: { term: string; items: object[]; }): void; ngOnChanges(changes: SimpleChanges): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class AudioPlayerTagViewComponent implements OnInit, OnDestroy, OnChanges { private readonly _options; private readonly _commonFileInfoService; hasAudioError: boolean; errorMessage: string; isPlaying: boolean; isLoading: boolean; currentTime: number; duration: number; volume: number; isMuted: boolean; audioSrc: string; private unsubscribe; audioPlayer: ElementRef; data: InterfaceBlock; constructor(_options: CrocoHtmlOptions, _commonFileInfoService: CommonFileInfoQueryService); get fileId(): string; get title(): string; private get audioElement(); hasFileId(): boolean; onErrorHandler(): void; setError(message: string): void; onLoadedMetadata(): void; onTimeUpdate(): void; onEnded(): void; onCanPlay(): void; togglePlayPause(): void; restart(): void; rewind(): void; forward(): void; onVolumeChange(event: Event): void; toggleMute(): void; onSeekChange(event: Event): void; formatTime(seconds: number): string; getProgress(): number; ngOnInit(): void; checkAndLoadAudioFile(): void; loadAudioFile(): void; ngOnDestroy(): void; ngOnChanges(changes: SimpleChanges): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class XmlTagExternalVideoComponent { set data(value: InterfaceBlock); set tagData(value: ExternalVideoTagData); protected readonly ExternalVideoSupportedTypes: typeof ExternalVideoSupportedTypes; _block: ExternalVideoTagData; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class XmlTagHeaderInnerTextViewComponent { item: GenericTextTag; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class XmlTagHeaderTextViewComponent { item: GenericTextTag; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class XmlTagHtmlViewComponent { html: string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class XmlTagTextViewComponent { item: GenericTextTag; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * Сервис для обработки логики разметки */ declare class HtmlViewController { onScriptCalled(script: string): void; scriptCalled: Subject; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** * Сервис для прокидывания предрасчитанных данных для виджетов Html разметки. * Используется для оптимизации Http запросов за данными. */ declare class HtmlPageDataController { data: object | null; /** * Получить данные. * @returns */ get(): T | null; /** * Установить данные. * @param data */ set(data: object): void; } declare class XmlTagViewComponent { private readonly _options; data: InterfaceBlock[]; dataController: HtmlPageDataController; isEditor: boolean; constructor(_options: CrocoHtmlOptions); isHeaderTextTag(item: InterfaceBlock): boolean; isDefinedCustomTag(item: InterfaceBlock): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class HtmlRawViewComponent implements OnChanges { private readonly _sanitizer; private readonly router; rawHtml: string; safeHtml: SafeHtml; constructor(_sanitizer: DomSanitizer, router: Router); ngOnChanges(changes: SimpleChanges): void; handleLink(event: MouseEvent): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class FileImageTagViewComponent implements OnInit, OnDestroy { private readonly screenWidthService; private readonly _options; set item(item: InterfaceBlock); isEditor: boolean; imageSrc: string; imageData: FileImageTagData | null; requests: IImageMediaRequest[]; private unsubscribe; imageMaxHeight: number; imageMaxWidth: number; constructor(screenWidthService: ScreenWidthService, _options: CrocoHtmlOptions); getMediaRequests(screenMediaRequest: string): IImageMediaRequest[]; ngOnInit(): void; ngOnDestroy(): void; onImageClick(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class XmlTagCustomWidgetComponent implements OnInit, OnDestroy { private readonly _options; viewContainerRef: ViewContainerRef; useDynamicComponent: boolean; dynamicContainerRef: ComponentRef; set tagData(value: CustomWidgetTagData); get tagData(): CustomWidgetTagData; _tagData: CustomWidgetTagData; tooltipData: string; constructor(_options: CrocoHtmlOptions); ngOnInit(): void; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class DefinedCustomTagViewComponent implements OnInit, OnDestroy { private readonly _options; viewContainerRef: ViewContainerRef; useDynamicComponent: boolean; dynamicContainerRef: ComponentRef; set data(value: InterfaceBlock); dataController: HtmlPageDataController; _data: InterfaceBlock; constructor(_options: CrocoHtmlOptions); getCustomComponent(): i0.Type; ngOnInit(): void; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class HtmlViewComponent { html: string; isEditor: boolean; dataController: HtmlPageDataController; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class TagToSpanPipe implements PipeTransform { transform(value: string[]): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵpipe: i0.ɵɵPipeDeclaration; } declare class ToPreviewPipe implements PipeTransform { private readonly _options; constructor(_options: CrocoHtmlOptions); transform(value: string): InterfaceBlock[]; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵpipe: i0.ɵɵPipeDeclaration; } declare class ToHtmlBodyTagsPipe implements PipeTransform { private readonly _options; constructor(_options: CrocoHtmlOptions); transform(value: string): HtmlBodyTag[]; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵpipe: i0.ɵɵPipeDeclaration; } declare class ToPreviewHtmlPipe implements PipeTransform { private readonly _options; constructor(_options: CrocoHtmlOptions); transform(value: string): InterfaceBlock[]; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵpipe: i0.ɵɵPipeDeclaration; } declare class ErrorBannerComponent { message: string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class VkVideoPlayerComponent { private sanitizer; set link(link: string); safeUrl: SafeResourceUrl; constructor(sanitizer: DomSanitizer); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class YoutubeVideoPlayerComponent { private sanitizer; set link(link: string); safeUrl: SafeResourceUrl; constructor(sanitizer: DomSanitizer); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class DownloadFileButtonEditorComponent { tag: HtmlBodyTag; presentOrEdit: boolean; tagData: DownloadButtonTagData; ngOnInit(): void; linkChanged(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class BlobCreateService { private readonly _http; constructor(_http: HttpClient); getBlob(link: string): Observable; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class XmlTagDownloadFileButtonComponent { private readonly _blobCreateService; set data(value: InterfaceBlock); set tagData(value: DownloadButtonTagData); constructor(_blobCreateService: BlobCreateService); _block: DownloadButtonTagData; downloadFile(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class CrocoHtmlModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare const CrocoHtmlOptionsToken = "croco-html-options"; export { AddFilesBtnComponent, AngularMaterialTableMethods, AudioEditorComponent, AudioMethods, AudioPlayerTagViewComponent, BodyTagsExtensions, BootstrapTableMethods, ButtonTagDataConsts, ButtonTagService, CrocoHtmlFileOptionsService, CrocoHtmlModule, CrocoHtmlOptionsToken, CustomWidgetEditorComponent, CustomWidgetIconComponent, CustomWidgetTagDataConsts, CustomWidgetTagService, DefinedCustomEditorBlockComponent, DefinedCustomTagViewComponent, DownloadButtonTagDataConsts, DownloadButtonTagService, ExternalVideoEditorComponent, ExternalVideoPlayers, ExternalVideoSupportedTypes, ExternalVideoTagDataConsts, ExternalVideoTagService, FileAudioTagDataConsts, FileIdSelectComponent, FileImageTagDataConsts, FileImageTagService, FileImageTagViewComponent, FileType, HtmlPageDataController, HtmlRawEditorComponent, HtmlRawTagDataConsts, HtmlRawTagService, HtmlRawViewComponent, HtmlViewComponent, HtmlViewController, ImageEditorComponent, ImageMethods, MainEditorBlockComponent, MainEditorComponent, TableBuilder, TableMethods, TableTypes, TagEditorService, TagToSpanPipe, TextAlignment, TextEditorComponent, TextSimpleMethods, TextTag, TextTagDataConsts, TextTagHtmlMarkupTagService, TextTags, ToHtmlBodyTagsPipe, ToPreviewHtmlPipe, ToPreviewPipe, UploadFilesBtnComponent, VisualEditorComponent, XmlExtensions, XmlTagCustomWidgetComponent, XmlTagExternalVideoComponent, XmlTagHeaderInnerTextViewComponent, XmlTagHeaderTextViewComponent, XmlTagHtmlViewComponent, XmlTagTextViewComponent, XmlTagViewComponent }; export type { AngularMaterialTableData, BaseApiResponse, ButtonTag, ButtonTagData, CommonFileInfoResultModel, CrocoHtmlEditorFileOptions, CrocoHtmlImageOptions, CrocoHtmlOptions, CustomWidgetTag, CustomWidgetTagData, DownloadButtonTag, DownloadButtonTagData, ExternalVideoTag, ExternalVideoTagData, ExtractHtmlRawTag, ExtractHtmlRawTagData, FileAudioTag, FileAudioTagData, FileImageTag, FileImageTagData, FileInfoModel, FilePostingStarted, FileRelationModel, FileSimpleModel, FileUnifiedModel, GenericTextTag, GetListResult, GetListSearchModel, HtmlBodyTag, ICustomTagViewRender, IHorizontalAlignmentExtractionResult, IImageMediaRequest, IMarkUpTagService, IVisualEditorProps, ImageRestrictions, InterfaceBlock, SearchFilesRequest, SearchQuestionsFormData, SimpleTextTagData, TableData, TableHeaderData, TableRowColumnData, TableRowData, TableTagData, TagItem };