croco-html 4.0.2 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/croco-html.mjs +471 -512
- package/fesm2022/croco-html.mjs.map +1 -1
- package/index.d.ts +3 -954
- package/lib/components/add-files-btn/add-files-btn.component.d.ts +20 -0
- package/lib/components/editor/button-editor/button-editor.component.d.ts +13 -0
- package/lib/components/editor/custom-widget-editor/custom-widget-editor.component.d.ts +13 -0
- package/lib/components/editor/download-file-button-editor/download-file-button-editor.component.d.ts +13 -0
- package/lib/components/editor/external-video-editor/embedded-video/code-video.component.d.ts +14 -0
- package/lib/components/editor/external-video-editor/external-video-editor.component.d.ts +17 -0
- package/lib/components/editor/external-video-editor/vk-video-player/vk-video-player.component.d.ts +10 -0
- package/lib/components/editor/external-video-editor/youtube-video-player/youtube-video-player.component.d.ts +10 -0
- package/lib/components/editor/html-editor-settings-modal/html-editor-settings-modal.component.d.ts +17 -0
- package/lib/components/editor/html-raw-editor/html-raw-editor.component.d.ts +15 -0
- package/lib/components/editor/image-editor/image-editor.component.d.ts +34 -0
- package/lib/components/editor/index.d.ts +8 -0
- package/lib/components/editor/main-editor/main-editor.component.d.ts +34 -0
- package/lib/components/editor/main-editor-block/main-editor-block.component.d.ts +14 -0
- package/lib/components/editor/text-editor/text-editor.component.d.ts +12 -0
- package/lib/components/editor/visual-editor/DefaultAligments.d.ts +9 -0
- package/lib/components/editor/visual-editor/DefaultTags.d.ts +6 -0
- package/lib/components/editor/visual-editor/visual-editor.component.d.ts +72 -0
- package/lib/components/error-banner/error-banner.component.d.ts +6 -0
- package/lib/components/file-id-select/file-id-select.component.d.ts +38 -0
- package/lib/components/html-view/html-view.component.d.ts +6 -0
- package/lib/components/index.d.ts +6 -0
- package/lib/components/upload-files-btn/upload-files-btn.component.d.ts +26 -0
- package/lib/components/xml-tags/file-image-tag-view/file-image-tag-view.component.d.ts +22 -0
- package/lib/components/xml-tags/html-raw-view/html-raw-view.component.d.ts +12 -0
- package/lib/components/xml-tags/index.d.ts +10 -0
- package/lib/components/xml-tags/xml-tag-custom-button/xml-tag-button.component.d.ts +14 -0
- package/lib/components/xml-tags/xml-tag-custom-widget/xml-tag-custom-widget.component.d.ts +19 -0
- package/lib/components/xml-tags/xml-tag-download-file-button/xml-tag-download-file-button.component.d.ts +14 -0
- package/lib/components/xml-tags/xml-tag-external-video/xml-tag-external-video.component.d.ts +11 -0
- package/lib/components/xml-tags/xml-tag-header-inner-text-view/xml-tag-header-inner-text-view.component.d.ts +7 -0
- package/lib/components/xml-tags/xml-tag-header-text-view/xml-tag-header-text-view.component.d.ts +7 -0
- package/lib/components/xml-tags/xml-tag-html-view/xml-tag-html-view.component.d.ts +7 -0
- package/lib/components/xml-tags/xml-tag-table-view/xml-tag-table-view.component.d.ts +7 -0
- package/lib/components/xml-tags/xml-tag-text-view/xml-tag-text-view.component.d.ts +7 -0
- package/lib/components/xml-tags/xml-tag-view/xml-tag-view.component.d.ts +8 -0
- package/lib/consts/index.d.ts +1 -0
- package/lib/croco-html.module.d.ts +68 -0
- package/lib/extensions/AngularMaterialTableMethods.d.ts +7 -0
- package/lib/extensions/BodyTagsExtensions.d.ts +14 -0
- package/lib/extensions/BootstrapTableMethods.d.ts +9 -0
- package/lib/extensions/HtmlExtractionMethods.d.ts +28 -0
- package/lib/extensions/HtmlRawTagDataConsts.d.ts +10 -0
- package/lib/extensions/ImageMethods.d.ts +23 -0
- package/lib/extensions/InterfaceBlock.d.ts +10 -0
- package/lib/extensions/TableBuilder.d.ts +5 -0
- package/lib/extensions/TableMethods.d.ts +60 -0
- package/lib/extensions/Tags.d.ts +16 -0
- package/lib/extensions/TextMethods.d.ts +11 -0
- package/lib/extensions/TextSimpleMethods.d.ts +22 -0
- package/lib/extensions/VideoMethods.d.ts +26 -0
- package/lib/extensions/XmlExtensions.d.ts +5 -0
- package/lib/extensions/index.d.ts +10 -0
- package/lib/index.d.ts +24 -0
- package/lib/models/image-models.d.ts +19 -0
- package/lib/models/index.d.ts +2 -0
- package/lib/models/models.d.ts +18 -0
- package/lib/options/index.d.ts +46 -0
- package/lib/pipes/TagToSpanPipe.d.ts +7 -0
- package/lib/pipes/ToHtmlBodyTagsPipe.d.ts +11 -0
- package/lib/pipes/ToPreviewHtmlPipe.d.ts +11 -0
- package/lib/pipes/index.d.ts +4 -0
- package/lib/pipes/sprite-icon-path.pipe.d.ts +8 -0
- package/lib/pipes/to-preview.pipe.d.ts +11 -0
- package/lib/services/CrocoHtmlFileOptionsService.d.ts +10 -0
- package/lib/services/HtmlViewController.d.ts +11 -0
- package/lib/services/PrivateFileUploadService.d.ts +26 -0
- package/lib/services/PrivateFilesQueryService.d.ts +21 -0
- package/lib/services/PublicFileUploadService.d.ts +26 -0
- package/lib/services/PublicFilesQueryService.d.ts +12 -0
- package/lib/services/blob-create.service.d.ts +10 -0
- package/lib/services/file-models.d.ts +38 -0
- package/lib/services/index.d.ts +3 -0
- package/lib/services/screen-width.service.d.ts +10 -0
- package/lib/tag-services/ButtonTagService.d.ts +26 -0
- package/lib/tag-services/CustomWidgetTagService.d.ts +32 -0
- package/lib/tag-services/DownloadButtonTagService.d.ts +24 -0
- package/lib/tag-services/ExternalVideoTagService.d.ts +11 -0
- package/lib/tag-services/FileImageTagService.d.ts +11 -0
- package/lib/tag-services/HtmlRawTagService.d.ts +11 -0
- package/lib/tag-services/IMarkUpTagService.d.ts +26 -0
- package/lib/tag-services/TextTagHtmlMarkupTagService.d.ts +12 -0
- package/lib/tag-services/index.d.ts +8 -0
- package/package.json +1 -1
- package/public-api.d.ts +8 -0
- package/sprites-ids.type.d.ts +1 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { HttpClient } from "@angular/common/http";
|
|
2
|
+
import { Observable } from "rxjs";
|
|
3
|
+
import { FileSimpleModel, GetListResult, SearchFilesRequest } from "./file-models";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class PublicFilesQueryService {
|
|
6
|
+
private readonly _httpClient;
|
|
7
|
+
private readonly _baseControllerUrl;
|
|
8
|
+
constructor(_httpClient: HttpClient, baseUrl: string);
|
|
9
|
+
search(model: SearchFilesRequest): Observable<GetListResult<FileSimpleModel>>;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PublicFilesQueryService, never>;
|
|
11
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<PublicFilesQueryService>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HttpClient } from "@angular/common/http";
|
|
2
|
+
import { Observable } from "rxjs";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class BlobCreateService {
|
|
5
|
+
private readonly _http;
|
|
6
|
+
constructor(_http: HttpClient);
|
|
7
|
+
getBlob(link: string): Observable<Blob>;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BlobCreateService, never>;
|
|
9
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<BlobCreateService>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export interface GetListResult<T> {
|
|
2
|
+
totalCount: number;
|
|
3
|
+
list: Array<T>;
|
|
4
|
+
}
|
|
5
|
+
export interface FileRelationModel {
|
|
6
|
+
entityTypeFullName: string;
|
|
7
|
+
entityKey: string;
|
|
8
|
+
relationName: string;
|
|
9
|
+
relationValue: string;
|
|
10
|
+
relationCustomData: string;
|
|
11
|
+
}
|
|
12
|
+
export interface SearchFilesRequest {
|
|
13
|
+
q: string;
|
|
14
|
+
fileName: string;
|
|
15
|
+
applicationId: string;
|
|
16
|
+
fileTypes: Array<FileType>;
|
|
17
|
+
count: number | null;
|
|
18
|
+
offSet: number;
|
|
19
|
+
}
|
|
20
|
+
export declare enum FileType {
|
|
21
|
+
Undefined = "Undefined",
|
|
22
|
+
Unknown = "Unknown",
|
|
23
|
+
Image = "Image",
|
|
24
|
+
Audio = "Audio",
|
|
25
|
+
Video = "Video",
|
|
26
|
+
Document = "Document",
|
|
27
|
+
Archive = "Archive"
|
|
28
|
+
}
|
|
29
|
+
export interface GetListSearchModel {
|
|
30
|
+
count: number | null;
|
|
31
|
+
offSet: number;
|
|
32
|
+
}
|
|
33
|
+
export interface FileSimpleModel {
|
|
34
|
+
fileId: number;
|
|
35
|
+
fileName: string;
|
|
36
|
+
type: FileType;
|
|
37
|
+
downloadUrl: string;
|
|
38
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class ScreenWidthService {
|
|
4
|
+
private screenWidth;
|
|
5
|
+
constructor();
|
|
6
|
+
private onResize;
|
|
7
|
+
getScreenWidth(): Observable<number>;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ScreenWidthService, never>;
|
|
9
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ScreenWidthService>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { InterfaceBlock } from "../extensions/InterfaceBlock";
|
|
2
|
+
import { HtmlBodyTag } from "../models";
|
|
3
|
+
import { CrocoHtmlOptions } from "../options";
|
|
4
|
+
import { IMarkUpTagService } from "./IMarkUpTagService";
|
|
5
|
+
export declare class ButtonTagDataConsts {
|
|
6
|
+
static readonly TagName = "button";
|
|
7
|
+
static readonly TextAttrName = "text";
|
|
8
|
+
static readonly TypeAttrName = "type";
|
|
9
|
+
static readonly ClickAttrName = "click";
|
|
10
|
+
}
|
|
11
|
+
export interface ButtonTag {
|
|
12
|
+
type: string;
|
|
13
|
+
data: ButtonTagData;
|
|
14
|
+
}
|
|
15
|
+
export interface ButtonTagData {
|
|
16
|
+
text: string;
|
|
17
|
+
type: string;
|
|
18
|
+
click: string;
|
|
19
|
+
}
|
|
20
|
+
export declare class ButtonTagService implements IMarkUpTagService {
|
|
21
|
+
tagName: string;
|
|
22
|
+
shortDescription: string;
|
|
23
|
+
bodyTagToHtmlStringConverter(bodyTag: HtmlBodyTag): string;
|
|
24
|
+
extractBlockFromHtmlElement(elem: HTMLElement, options: CrocoHtmlOptions): InterfaceBlock;
|
|
25
|
+
toBodyTag(data: InterfaceBlock): HtmlBodyTag;
|
|
26
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { InterfaceBlock } from "../extensions/InterfaceBlock";
|
|
2
|
+
import { HtmlBodyTag } from "../models";
|
|
3
|
+
import { CrocoHtmlOptions } from "../options";
|
|
4
|
+
import { IMarkUpTagService } from "./IMarkUpTagService";
|
|
5
|
+
export declare class CustomWidgetTagDataConsts {
|
|
6
|
+
static readonly TagName = "custom-widget";
|
|
7
|
+
static readonly TypeAttrName = "type";
|
|
8
|
+
static readonly DataIdAttrName = "data-id";
|
|
9
|
+
static readonly WidgetIdAttrName = "widget-id";
|
|
10
|
+
}
|
|
11
|
+
export interface CustomWidgetTag {
|
|
12
|
+
type: string;
|
|
13
|
+
data: CustomWidgetTagData;
|
|
14
|
+
}
|
|
15
|
+
export interface CustomWidgetTagData {
|
|
16
|
+
type: string;
|
|
17
|
+
dataId: string;
|
|
18
|
+
widgetId: string;
|
|
19
|
+
}
|
|
20
|
+
export declare class CustomWidgetTagService implements IMarkUpTagService {
|
|
21
|
+
tagName: string;
|
|
22
|
+
shortDescription: string;
|
|
23
|
+
bodyTagToHtmlStringConverter(bodyTag: HtmlBodyTag): string;
|
|
24
|
+
extractBlockFromHtmlElement(elem: HTMLElement, options: CrocoHtmlOptions): InterfaceBlock;
|
|
25
|
+
toBodyTag(data: InterfaceBlock): HtmlBodyTag;
|
|
26
|
+
static ExtractCustomWidgetTagData(attributes: any): CustomWidgetTagData;
|
|
27
|
+
static ExtractCustomWidgetAttributes(customWidgetTagData: CustomWidgetTagData): {
|
|
28
|
+
type: string;
|
|
29
|
+
"data-id": string;
|
|
30
|
+
"widget-id": string;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { InterfaceBlock } from "../extensions/InterfaceBlock";
|
|
2
|
+
import { HtmlBodyTag } from "../models";
|
|
3
|
+
import { CrocoHtmlOptions } from "../options";
|
|
4
|
+
import { IMarkUpTagService } from "./IMarkUpTagService";
|
|
5
|
+
export declare class DownloadButtonTagDataConsts {
|
|
6
|
+
static readonly TagName = "download-file-button";
|
|
7
|
+
static readonly TitleAttrName = "title";
|
|
8
|
+
static readonly LinkAttrName = "link";
|
|
9
|
+
}
|
|
10
|
+
export interface DownloadButtonTag {
|
|
11
|
+
type: string;
|
|
12
|
+
data: DownloadButtonTagData;
|
|
13
|
+
}
|
|
14
|
+
export interface DownloadButtonTagData {
|
|
15
|
+
title: string;
|
|
16
|
+
link: string;
|
|
17
|
+
}
|
|
18
|
+
export declare class DownloadButtonTagService implements IMarkUpTagService {
|
|
19
|
+
tagName: string;
|
|
20
|
+
shortDescription: string;
|
|
21
|
+
bodyTagToHtmlStringConverter(bodyTag: HtmlBodyTag): string;
|
|
22
|
+
extractBlockFromHtmlElement(elem: HTMLElement, options: CrocoHtmlOptions): InterfaceBlock;
|
|
23
|
+
toBodyTag(data: InterfaceBlock): HtmlBodyTag;
|
|
24
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { InterfaceBlock } from "../extensions/InterfaceBlock";
|
|
2
|
+
import { HtmlBodyTag } from "../models";
|
|
3
|
+
import { CrocoHtmlOptions } from "../options";
|
|
4
|
+
import { IMarkUpTagService } from "./IMarkUpTagService";
|
|
5
|
+
export declare class ExternalVideoTagService implements IMarkUpTagService {
|
|
6
|
+
tagName: string;
|
|
7
|
+
shortDescription: string;
|
|
8
|
+
bodyTagToHtmlStringConverter(bodyTag: HtmlBodyTag): string;
|
|
9
|
+
extractBlockFromHtmlElement(elem: HTMLElement, options: CrocoHtmlOptions): InterfaceBlock;
|
|
10
|
+
toBodyTag(data: InterfaceBlock): HtmlBodyTag;
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { InterfaceBlock } from "../extensions/InterfaceBlock";
|
|
2
|
+
import { HtmlBodyTag } from "../models";
|
|
3
|
+
import { CrocoHtmlOptions } from "../options";
|
|
4
|
+
import { IMarkUpTagService } from "../tag-services/IMarkUpTagService";
|
|
5
|
+
export declare class FileImageTagService implements IMarkUpTagService {
|
|
6
|
+
tagName: string;
|
|
7
|
+
shortDescription: string;
|
|
8
|
+
bodyTagToHtmlStringConverter(bodyTag: HtmlBodyTag): string;
|
|
9
|
+
extractBlockFromHtmlElement(elem: HTMLElement, options: CrocoHtmlOptions): InterfaceBlock;
|
|
10
|
+
toBodyTag(data: InterfaceBlock): HtmlBodyTag;
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { InterfaceBlock } from "../extensions/InterfaceBlock";
|
|
2
|
+
import { HtmlBodyTag } from "../models";
|
|
3
|
+
import { CrocoHtmlOptions } from "../options";
|
|
4
|
+
import { IMarkUpTagService } from "./IMarkUpTagService";
|
|
5
|
+
export declare class HtmlRawTagService implements IMarkUpTagService {
|
|
6
|
+
tagName: string;
|
|
7
|
+
shortDescription: string;
|
|
8
|
+
bodyTagToHtmlStringConverter(bodyTag: HtmlBodyTag): string;
|
|
9
|
+
extractBlockFromHtmlElement(elem: HTMLElement, options: CrocoHtmlOptions): InterfaceBlock;
|
|
10
|
+
toBodyTag(data: InterfaceBlock): HtmlBodyTag;
|
|
11
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { InterfaceBlock } from "../extensions/InterfaceBlock";
|
|
2
|
+
import { HtmlBodyTag } from "../models";
|
|
3
|
+
import { CrocoHtmlOptions } from "../options";
|
|
4
|
+
export interface IMarkUpTagService {
|
|
5
|
+
/**
|
|
6
|
+
* Название тега
|
|
7
|
+
*/
|
|
8
|
+
tagName: string;
|
|
9
|
+
/**
|
|
10
|
+
* Описание тега
|
|
11
|
+
*/
|
|
12
|
+
shortDescription: string;
|
|
13
|
+
/**
|
|
14
|
+
* Функция для конвертации из модели редактора в Html строку разметки
|
|
15
|
+
* @param bodyTag тег
|
|
16
|
+
* @returns
|
|
17
|
+
*/
|
|
18
|
+
bodyTagToHtmlStringConverter: (bodyTag: HtmlBodyTag) => string;
|
|
19
|
+
extractBlockFromHtmlElement: (elem: HTMLElement, options: CrocoHtmlOptions) => InterfaceBlock;
|
|
20
|
+
/**
|
|
21
|
+
* Конвертация блока интерфейса в модель тега для редактора
|
|
22
|
+
* @param data
|
|
23
|
+
* @returns
|
|
24
|
+
*/
|
|
25
|
+
toBodyTag: (data: InterfaceBlock) => HtmlBodyTag;
|
|
26
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { InterfaceBlock } from "../extensions/InterfaceBlock";
|
|
2
|
+
import { HtmlBodyTag } from "../models";
|
|
3
|
+
import { CrocoHtmlOptions } from "../options";
|
|
4
|
+
import { IMarkUpTagService } from "../tag-services/IMarkUpTagService";
|
|
5
|
+
export declare class TextTagHtmlMarkupTagService implements IMarkUpTagService {
|
|
6
|
+
constructor(tagName: string, shortDescription: string);
|
|
7
|
+
tagName: string;
|
|
8
|
+
shortDescription: string;
|
|
9
|
+
bodyTagToHtmlStringConverter(bodyTag: HtmlBodyTag): string;
|
|
10
|
+
extractBlockFromHtmlElement(elem: HTMLElement, options: CrocoHtmlOptions): InterfaceBlock;
|
|
11
|
+
toBodyTag(data: InterfaceBlock): HtmlBodyTag;
|
|
12
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from "./IMarkUpTagService";
|
|
2
|
+
export * from "./FileImageTagService";
|
|
3
|
+
export * from "./TextTagHtmlMarkupTagService";
|
|
4
|
+
export * from "./ExternalVideoTagService";
|
|
5
|
+
export * from "./HtmlRawTagService";
|
|
6
|
+
export * from "./DownloadButtonTagService";
|
|
7
|
+
export * from "./ButtonTagService";
|
|
8
|
+
export * from "./CustomWidgetTagService";
|
package/package.json
CHANGED
package/public-api.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './lib/components';
|
|
2
|
+
export * from './lib/pipes';
|
|
3
|
+
export * from './lib/extensions';
|
|
4
|
+
export * from './lib/croco-html.module';
|
|
5
|
+
export * from './lib/models';
|
|
6
|
+
export * from './lib/consts';
|
|
7
|
+
export * from './lib/services';
|
|
8
|
+
export * from './lib/options';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type SpriteIdsType = 'align-center' | 'align-left' | 'align-right' | 'move-icon' | 'source-code-tab' | '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';
|