croco-html 4.1.0 → 4.2.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 +681 -608
- package/fesm2022/croco-html.mjs.map +1 -1
- package/lib/components/editor/image-editor/image-editor.component.d.ts +2 -2
- package/lib/components/editor/text-editor/text-editor.component.d.ts +2 -4
- package/lib/components/editor/visual-editor/DefaultAligments.d.ts +2 -6
- package/lib/components/editor/visual-editor/visual-editor.component.d.ts +3 -6
- package/lib/components/html-view/html-view.component.d.ts +1 -1
- package/lib/components/upload-files-btn/upload-files-btn.component.d.ts +4 -4
- package/lib/components/xml-tags/file-image-tag-view/file-image-tag-view.component.d.ts +3 -3
- package/lib/components/xml-tags/index.d.ts +0 -1
- package/lib/components/xml-tags/xml-tag-view/xml-tag-view.component.d.ts +4 -0
- package/lib/croco-html.module.d.ts +23 -24
- package/lib/extensions/ImageMethods.d.ts +5 -5
- package/lib/extensions/InterfaceBlock.d.ts +1 -1
- package/lib/extensions/TextSimpleMethods.d.ts +1 -4
- package/lib/index.d.ts +2 -3
- package/lib/models/image-models.d.ts +2 -2
- package/lib/options/index.d.ts +23 -10
- package/lib/tag-services/ButtonTagService.d.ts +2 -1
- package/lib/tag-services/CustomWidgetTagService.d.ts +2 -1
- package/lib/tag-services/DownloadButtonTagService.d.ts +2 -1
- package/lib/tag-services/ExternalVideoTagService.d.ts +2 -1
- package/lib/tag-services/FileImageTagService.d.ts +1 -0
- package/lib/tag-services/HtmlRawTagService.d.ts +2 -1
- package/lib/tag-services/IMarkUpTagService.d.ts +9 -0
- package/lib/tag-services/TextTagHtmlMarkupTagService.d.ts +10 -1
- package/package.json +1 -1
- package/lib/components/xml-tags/xml-tag-table-view/xml-tag-table-view.component.d.ts +0 -7
|
@@ -2,14 +2,14 @@ import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
|
2
2
|
import { HtmlBodyTag } from '../../../models/models';
|
|
3
3
|
import { ScreenWidthService } from "../../../services/screen-width.service";
|
|
4
4
|
import { CrocoHtmlOptions } from '../../../options';
|
|
5
|
-
import {
|
|
5
|
+
import { IImageMediaRequest } from '../../../models';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class ImageEditorComponent implements OnInit, OnDestroy {
|
|
8
8
|
private readonly _options;
|
|
9
9
|
private readonly screenWidthService;
|
|
10
10
|
hasImageError: boolean;
|
|
11
11
|
searchOrEdit: string;
|
|
12
|
-
requests:
|
|
12
|
+
requests: IImageMediaRequest[];
|
|
13
13
|
imageMaxHeight: number;
|
|
14
14
|
imageMaxWidth: number;
|
|
15
15
|
isShowMediaRequest: boolean;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { EventEmitter
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
2
|
import { HtmlBodyTag } from '../../../models/models';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class TextEditorComponent
|
|
4
|
+
export declare class TextEditorComponent {
|
|
5
5
|
tag: HtmlBodyTag;
|
|
6
6
|
onTagUpdated: EventEmitter<HtmlBodyTag>;
|
|
7
|
-
constructor();
|
|
8
|
-
ngOnInit(): void;
|
|
9
7
|
getInnerHtml(): string;
|
|
10
8
|
static ɵfac: i0.ɵɵFactoryDeclaration<TextEditorComponent, never>;
|
|
11
9
|
static ɵcmp: i0.ɵɵComponentDeclaration<TextEditorComponent, "croco-html-text-editor", never, { "tag": { "alias": "tag"; "required": false; }; }, { "onTagUpdated": "onTagUpdated"; }, never, never, true, never>;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
Left = "left",
|
|
3
|
-
Center = "center",
|
|
4
|
-
Right = "right"
|
|
5
|
-
}
|
|
1
|
+
import { TextAlignment } from "../../../tag-services";
|
|
6
2
|
export declare const AlignmentsData: {
|
|
7
|
-
value:
|
|
3
|
+
value: TextAlignment;
|
|
8
4
|
text: string;
|
|
9
5
|
}[];
|
|
@@ -3,14 +3,11 @@ import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnInit } fr
|
|
|
3
3
|
import { ExternalVideoSupportedTypes } from '../../../extensions';
|
|
4
4
|
import { ExternalVideoTagDataConsts } from '../../../extensions';
|
|
5
5
|
import { TagItem, HtmlBodyTag } from '../../../models/models';
|
|
6
|
-
import { EAlignments } from "./DefaultAligments";
|
|
7
6
|
import { CrocoHtmlOptions } from '../../../options';
|
|
8
7
|
import { HtmlRawTagDataConsts } from "../../../extensions/HtmlRawTagDataConsts";
|
|
9
8
|
import { SpriteIdsType } from "../../../../sprites-ids.type";
|
|
9
|
+
import { TextAlignment } from '../../../tag-services';
|
|
10
10
|
import * as i0 from "@angular/core";
|
|
11
|
-
export declare const defaultLinkYouTube = "https://www.youtube.com/embed/4CtSAnJDfsI?si=scyBNJa0Hs2t5aLE";
|
|
12
|
-
export declare const defaultLinkVk = "https://vk.com/video_ext.php?oid=-22822305&id=456241864&hd=2";
|
|
13
|
-
export declare const defaultLinkForDownload = "https://storage.yandexcloud.net/mega-academy/presentation.pdf";
|
|
14
11
|
export declare class VisualEditorComponent implements OnInit, AfterViewInit {
|
|
15
12
|
private readonly _cdref;
|
|
16
13
|
private readonly _options;
|
|
@@ -19,11 +16,11 @@ export declare class VisualEditorComponent implements OnInit, AfterViewInit {
|
|
|
19
16
|
loadingText: string;
|
|
20
17
|
text: string;
|
|
21
18
|
htmlRaw: string;
|
|
22
|
-
alignment:
|
|
19
|
+
alignment: TextAlignment;
|
|
23
20
|
textTag: string;
|
|
24
21
|
textTagOptions: TagItem[];
|
|
25
22
|
alignmentOptions: {
|
|
26
|
-
value:
|
|
23
|
+
value: TextAlignment;
|
|
27
24
|
text: string;
|
|
28
25
|
}[];
|
|
29
26
|
showMarkUp: boolean;
|
|
@@ -2,5 +2,5 @@ import * as i0 from "@angular/core";
|
|
|
2
2
|
export declare class HtmlViewComponent {
|
|
3
3
|
html: string;
|
|
4
4
|
static ɵfac: i0.ɵɵFactoryDeclaration<HtmlViewComponent, never>;
|
|
5
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<HtmlViewComponent, "croco-html-view", never, { "html": { "alias": "html"; "required":
|
|
5
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<HtmlViewComponent, "croco-html-view", never, { "html": { "alias": "html"; "required": true; }; }, {}, never, never, true, never>;
|
|
6
6
|
}
|
|
@@ -7,9 +7,9 @@ export interface FilePostingStarted {
|
|
|
7
7
|
filesCount: number;
|
|
8
8
|
}
|
|
9
9
|
export declare class UploadFilesBtnComponent {
|
|
10
|
-
private _publicFileUploadService;
|
|
11
|
-
private _privateFileUploadService;
|
|
12
|
-
private _htmlSettingsService;
|
|
10
|
+
private readonly _publicFileUploadService;
|
|
11
|
+
private readonly _privateFileUploadService;
|
|
12
|
+
private readonly _htmlSettingsService;
|
|
13
13
|
private fileInput;
|
|
14
14
|
extAccepts: string;
|
|
15
15
|
isMultiple: boolean;
|
|
@@ -19,7 +19,7 @@ export declare class UploadFilesBtnComponent {
|
|
|
19
19
|
onPublicFilesUploaded: EventEmitter<PublicFilesUploadResponse>;
|
|
20
20
|
onPrivateFilesUploaded: EventEmitter<PrivateFilesCreatedResult>;
|
|
21
21
|
constructor(_publicFileUploadService: PublicFileUploadService, _privateFileUploadService: PrivateFileUploadService, _htmlSettingsService: CrocoHtmlFileOptionsService);
|
|
22
|
-
handleFileInput(
|
|
22
|
+
handleFileInput(e: Event): void;
|
|
23
23
|
clickFileInput(): void;
|
|
24
24
|
static ɵfac: i0.ɵɵFactoryDeclaration<UploadFilesBtnComponent, never>;
|
|
25
25
|
static ɵcmp: i0.ɵɵComponentDeclaration<UploadFilesBtnComponent, "croco-app-upload-files-btn", never, { "extAccepts": { "alias": "extAccepts"; "required": false; }; "isMultiple": { "alias": "isMultiple"; "required": false; }; "btnText": { "alias": "btnText"; "required": false; }; "hidden": { "alias": "hidden"; "required": false; }; }, { "postFilesStarted": "postFilesStarted"; "onPublicFilesUploaded": "onPublicFilesUploaded"; "onPrivateFilesUploaded": "onPrivateFilesUploaded"; }, never, never, true, never>;
|
|
@@ -2,19 +2,19 @@ import { OnDestroy, OnInit } from '@angular/core';
|
|
|
2
2
|
import { InterfaceBlock } from '../../../extensions/InterfaceBlock';
|
|
3
3
|
import { ScreenWidthService } from "../../../services/screen-width.service";
|
|
4
4
|
import { CrocoHtmlOptions } from '../../../options';
|
|
5
|
-
import {
|
|
5
|
+
import { IImageMediaRequest } from '../../../models';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class FileImageTagViewComponent implements OnInit, OnDestroy {
|
|
8
8
|
private readonly screenWidthService;
|
|
9
9
|
private readonly _options;
|
|
10
10
|
set item(item: InterfaceBlock);
|
|
11
11
|
imageSrc: string;
|
|
12
|
-
requests:
|
|
12
|
+
requests: IImageMediaRequest[];
|
|
13
13
|
private unsubscribe;
|
|
14
14
|
imageMaxHeight: number;
|
|
15
15
|
imageMaxWidth: number;
|
|
16
16
|
constructor(screenWidthService: ScreenWidthService, _options: CrocoHtmlOptions);
|
|
17
|
-
getMediaRequests(screenMediaRequest: string):
|
|
17
|
+
getMediaRequests(screenMediaRequest: string): IImageMediaRequest[];
|
|
18
18
|
ngOnInit(): void;
|
|
19
19
|
ngOnDestroy(): void;
|
|
20
20
|
static ɵfac: i0.ɵɵFactoryDeclaration<FileImageTagViewComponent, never>;
|
|
@@ -2,7 +2,6 @@ export * from './xml-tag-external-video/xml-tag-external-video.component';
|
|
|
2
2
|
export * from './xml-tag-header-inner-text-view/xml-tag-header-inner-text-view.component';
|
|
3
3
|
export * from './xml-tag-header-text-view/xml-tag-header-text-view.component';
|
|
4
4
|
export * from './xml-tag-html-view/xml-tag-html-view.component';
|
|
5
|
-
export * from './xml-tag-table-view/xml-tag-table-view.component';
|
|
6
5
|
export * from './xml-tag-text-view/xml-tag-text-view.component';
|
|
7
6
|
export * from './xml-tag-view/xml-tag-view.component';
|
|
8
7
|
export * from './html-raw-view/html-raw-view.component';
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { InterfaceBlock } from "../../../extensions/InterfaceBlock";
|
|
2
|
+
import { CrocoHtmlOptions } from '../../../options';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
export declare class XmlTagViewComponent {
|
|
5
|
+
private readonly _options;
|
|
4
6
|
data: InterfaceBlock[];
|
|
7
|
+
constructor(_options: CrocoHtmlOptions);
|
|
5
8
|
isHeaderTextTag(item: InterfaceBlock): boolean;
|
|
9
|
+
isDefinedCustomTag(item: InterfaceBlock): boolean;
|
|
6
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<XmlTagViewComponent, never>;
|
|
7
11
|
static ɵcmp: i0.ɵɵComponentDeclaration<XmlTagViewComponent, "croco-html-xml-tag-view", never, { "data": { "alias": "data"; "required": false; }; }, {}, never, never, true, never>;
|
|
8
12
|
}
|
|
@@ -38,31 +38,30 @@ import * as i36 from "./components/editor/download-file-button-editor/download-f
|
|
|
38
38
|
import * as i37 from "./components/xml-tags/xml-tag-download-file-button/xml-tag-download-file-button.component";
|
|
39
39
|
import * as i38 from "./components/upload-files-btn/upload-files-btn.component";
|
|
40
40
|
import * as i39 from "./components/html-view/html-view.component";
|
|
41
|
-
import * as i40 from "./components/xml-tags/xml-tag-
|
|
42
|
-
import * as i41 from "./components/xml-tags/xml-tag-view/xml-tag-view.component";
|
|
43
|
-
import * as i42 from "./components/xml-tags/xml-tag-
|
|
44
|
-
import * as i43 from "./components/xml-tags/xml-tag-text-view/xml-tag-text-view.component";
|
|
45
|
-
import * as i44 from "./components/xml-tags/xml-tag-header-text-view/xml-tag-header-text-view.component";
|
|
46
|
-
import * as i45 from "./components/xml-tags/xml-tag-
|
|
47
|
-
import * as i46 from "./components/xml-tags/
|
|
48
|
-
import * as i47 from "./components/xml-tags/
|
|
49
|
-
import * as i48 from "./components/xml-tags/
|
|
50
|
-
import * as i49 from "./components/
|
|
51
|
-
import * as i50 from "./components/
|
|
52
|
-
import * as i51 from "./components/
|
|
53
|
-
import * as i52 from "./components/editor/
|
|
54
|
-
import * as i53 from "./components/editor/
|
|
55
|
-
import * as i54 from "./components/editor/
|
|
56
|
-
import * as i55 from "./components/
|
|
57
|
-
import * as i56 from "./components/
|
|
58
|
-
import * as i57 from "./components/editor/
|
|
59
|
-
import * as i58 from "./
|
|
60
|
-
import * as i59 from "./pipes/
|
|
61
|
-
import * as i60 from "./pipes/
|
|
62
|
-
import * as i61 from "./pipes/
|
|
63
|
-
import * as i62 from "./pipes/ToPreviewHtmlPipe";
|
|
41
|
+
import * as i40 from "./components/xml-tags/xml-tag-view/xml-tag-view.component";
|
|
42
|
+
import * as i41 from "./components/xml-tags/xml-tag-html-view/xml-tag-html-view.component";
|
|
43
|
+
import * as i42 from "./components/xml-tags/xml-tag-text-view/xml-tag-text-view.component";
|
|
44
|
+
import * as i43 from "./components/xml-tags/xml-tag-header-text-view/xml-tag-header-text-view.component";
|
|
45
|
+
import * as i44 from "./components/xml-tags/xml-tag-header-inner-text-view/xml-tag-header-inner-text-view.component";
|
|
46
|
+
import * as i45 from "./components/xml-tags/xml-tag-external-video/xml-tag-external-video.component";
|
|
47
|
+
import * as i46 from "./components/xml-tags/html-raw-view/html-raw-view.component";
|
|
48
|
+
import * as i47 from "./components/xml-tags/file-image-tag-view/file-image-tag-view.component";
|
|
49
|
+
import * as i48 from "./components/xml-tags/xml-tag-custom-widget/xml-tag-custom-widget.component";
|
|
50
|
+
import * as i49 from "./components/editor/main-editor/main-editor.component";
|
|
51
|
+
import * as i50 from "./components/file-id-select/file-id-select.component";
|
|
52
|
+
import * as i51 from "./components/editor/text-editor/text-editor.component";
|
|
53
|
+
import * as i52 from "./components/editor/image-editor/image-editor.component";
|
|
54
|
+
import * as i53 from "./components/editor/main-editor-block/main-editor-block.component";
|
|
55
|
+
import * as i54 from "./components/editor/visual-editor/visual-editor.component";
|
|
56
|
+
import * as i55 from "./components/add-files-btn/add-files-btn.component";
|
|
57
|
+
import * as i56 from "./components/editor/html-raw-editor/html-raw-editor.component";
|
|
58
|
+
import * as i57 from "./components/editor/custom-widget-editor/custom-widget-editor.component";
|
|
59
|
+
import * as i58 from "./pipes/TagToSpanPipe";
|
|
60
|
+
import * as i59 from "./pipes/to-preview.pipe";
|
|
61
|
+
import * as i60 from "./pipes/ToHtmlBodyTagsPipe";
|
|
62
|
+
import * as i61 from "./pipes/ToPreviewHtmlPipe";
|
|
64
63
|
export declare class CrocoHtmlModule {
|
|
65
64
|
static ɵfac: i0.ɵɵFactoryDeclaration<CrocoHtmlModule, never>;
|
|
66
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<CrocoHtmlModule, never, [typeof i1.CommonModule, typeof i2.FormsModule, typeof i2.ReactiveFormsModule, typeof i3.NgSelectModule, typeof i4.MatBadgeModule, typeof i5.MatTableModule, typeof i6.MatExpansionModule, typeof i7.MatFormFieldModule, typeof i8.MatSnackBarModule, typeof i9.MatProgressBarModule, typeof i10.MatProgressSpinnerModule, typeof i11.MatTabsModule, typeof i12.MatMenuModule, typeof i13.MatCardModule, typeof i14.MatSelectModule, typeof i15.MatTooltipModule, typeof i16.MatCheckboxModule, typeof i17.MatChipsModule, typeof i18.MatListModule, typeof i19.MatButtonModule, typeof i20.MatInputModule, typeof i21.MatDialogModule, typeof i22.MatPaginatorModule, typeof i23.MatDatepickerModule, typeof i24.MatGridListModule, typeof i25.MatSlideToggleModule, typeof i26.MatTreeModule, typeof i27.MatNativeDateModule, typeof i28.MatAutocompleteModule, typeof i29.MatSidenavModule, typeof i30.MatIconModule, typeof i31.DragDropModule, typeof i32.MatButtonToggleModule, typeof i33.ErrorBannerComponent, typeof i34.VkVideoPlayerComponent, typeof i35.YoutubeVideoPlayerComponent, typeof i36.DownloadFileButtonEditorComponent, typeof i37.XmlTagDownloadFileButtonComponent, typeof i38.UploadFilesBtnComponent, typeof i39.HtmlViewComponent, typeof i40.
|
|
65
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<CrocoHtmlModule, never, [typeof i1.CommonModule, typeof i2.FormsModule, typeof i2.ReactiveFormsModule, typeof i3.NgSelectModule, typeof i4.MatBadgeModule, typeof i5.MatTableModule, typeof i6.MatExpansionModule, typeof i7.MatFormFieldModule, typeof i8.MatSnackBarModule, typeof i9.MatProgressBarModule, typeof i10.MatProgressSpinnerModule, typeof i11.MatTabsModule, typeof i12.MatMenuModule, typeof i13.MatCardModule, typeof i14.MatSelectModule, typeof i15.MatTooltipModule, typeof i16.MatCheckboxModule, typeof i17.MatChipsModule, typeof i18.MatListModule, typeof i19.MatButtonModule, typeof i20.MatInputModule, typeof i21.MatDialogModule, typeof i22.MatPaginatorModule, typeof i23.MatDatepickerModule, typeof i24.MatGridListModule, typeof i25.MatSlideToggleModule, typeof i26.MatTreeModule, typeof i27.MatNativeDateModule, typeof i28.MatAutocompleteModule, typeof i29.MatSidenavModule, typeof i30.MatIconModule, typeof i31.DragDropModule, typeof i32.MatButtonToggleModule, typeof i33.ErrorBannerComponent, typeof i34.VkVideoPlayerComponent, typeof i35.YoutubeVideoPlayerComponent, typeof i36.DownloadFileButtonEditorComponent, typeof i37.XmlTagDownloadFileButtonComponent, typeof i38.UploadFilesBtnComponent, typeof i39.HtmlViewComponent, typeof i40.XmlTagViewComponent, typeof i41.XmlTagHtmlViewComponent, typeof i42.XmlTagTextViewComponent, typeof i43.XmlTagHeaderTextViewComponent, typeof i44.XmlTagHeaderInnerTextViewComponent, typeof i45.XmlTagExternalVideoComponent, typeof i46.HtmlRawViewComponent, typeof i47.FileImageTagViewComponent, typeof i48.XmlTagCustomWidgetComponent, typeof i39.HtmlViewComponent, typeof i49.MainEditorComponent, typeof i50.FileIdSelectComponent, typeof i51.TextEditorComponent, typeof i52.ImageEditorComponent, typeof i53.MainEditorBlockComponent, typeof i54.VisualEditorComponent, typeof i55.AddFilesBtnComponent, typeof i56.HtmlRawEditorComponent, typeof i57.CustomWidgetEditorComponent, typeof i58.TagToSpanPipe, typeof i59.ToPreviewPipe, typeof i60.ToHtmlBodyTagsPipe, typeof i61.ToPreviewHtmlPipe], [typeof i38.UploadFilesBtnComponent, typeof i39.HtmlViewComponent, typeof i40.XmlTagViewComponent, typeof i41.XmlTagHtmlViewComponent, typeof i42.XmlTagTextViewComponent, typeof i43.XmlTagHeaderTextViewComponent, typeof i44.XmlTagHeaderInnerTextViewComponent, typeof i45.XmlTagExternalVideoComponent, typeof i46.HtmlRawViewComponent, typeof i47.FileImageTagViewComponent, typeof i48.XmlTagCustomWidgetComponent, typeof i39.HtmlViewComponent, typeof i49.MainEditorComponent, typeof i50.FileIdSelectComponent, typeof i51.TextEditorComponent, typeof i52.ImageEditorComponent, typeof i53.MainEditorBlockComponent, typeof i54.VisualEditorComponent, typeof i55.AddFilesBtnComponent, typeof i56.HtmlRawEditorComponent, typeof i57.CustomWidgetEditorComponent, typeof i58.TagToSpanPipe, typeof i59.ToPreviewPipe, typeof i60.ToHtmlBodyTagsPipe, typeof i61.ToPreviewHtmlPipe]>;
|
|
67
66
|
static ɵinj: i0.ɵɵInjectorDeclaration<CrocoHtmlModule>;
|
|
68
67
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ImageRestrictions,
|
|
1
|
+
import { ImageRestrictions, IImageMediaRequest } from "../models";
|
|
2
2
|
import { CrocoHtmlOptions } from "../options";
|
|
3
3
|
export declare class FileImageTagDataConsts {
|
|
4
4
|
static readonly TagName = "file-image";
|
|
@@ -15,9 +15,9 @@ export declare class ImageMethods {
|
|
|
15
15
|
static buildSmallUrl(fileId: string, options: CrocoHtmlOptions): string;
|
|
16
16
|
static buildMediumUrl(fileId: string, options: CrocoHtmlOptions): string;
|
|
17
17
|
static isPrivateFileId(fileId: string): boolean;
|
|
18
|
-
static mediaRequestStringToArrayParser: (data: string) =>
|
|
18
|
+
static mediaRequestStringToArrayParser: (data: string) => IImageMediaRequest[];
|
|
19
19
|
static createMediaRequestValue(arr: string[], attribute: string): number | null;
|
|
20
|
-
static mediaRequestsArrayToString(data:
|
|
21
|
-
static mediaRequestToString(data:
|
|
22
|
-
static getImageRestrictionsByScreenSize(screenSize: number, requests:
|
|
20
|
+
static mediaRequestsArrayToString(data: IImageMediaRequest[]): string;
|
|
21
|
+
static mediaRequestToString(data: IImageMediaRequest): string;
|
|
22
|
+
static getImageRestrictionsByScreenSize(screenSize: number, requests: IImageMediaRequest[]): ImageRestrictions;
|
|
23
23
|
}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { BaseApiResponse } from "../models";
|
|
2
|
-
export declare class TextTagDataConsts {
|
|
3
|
-
static HAlign: string;
|
|
4
|
-
}
|
|
5
2
|
export declare const TextTag = "text";
|
|
6
3
|
export interface GenericTextTag {
|
|
7
|
-
|
|
4
|
+
tagName: string;
|
|
8
5
|
data: SimpleTextTagData;
|
|
9
6
|
}
|
|
10
7
|
export interface SimpleTextTagData {
|
package/lib/index.d.ts
CHANGED
|
@@ -5,7 +5,6 @@ import { TextEditorComponent } from "./components";
|
|
|
5
5
|
import { FileIdSelectComponent } from "./components";
|
|
6
6
|
import { XmlTagHeaderInnerTextViewComponent } from "./components";
|
|
7
7
|
import { XmlTagHtmlViewComponent } from "./components";
|
|
8
|
-
import { XmlTagTableViewComponent } from "./components";
|
|
9
8
|
import { XmlTagViewComponent } from "./components";
|
|
10
9
|
import { CustomWidgetEditorComponent } from "./components";
|
|
11
10
|
import { VisualEditorComponent } from './components';
|
|
@@ -18,7 +17,7 @@ import { FileImageTagViewComponent, UploadFilesBtnComponent } from "./components
|
|
|
18
17
|
import { HtmlRawViewComponent } from "./components";
|
|
19
18
|
import { XmlTagCustomWidgetComponent } from "./components";
|
|
20
19
|
export declare const EditorComponents: (typeof AddFilesBtnComponent | typeof HtmlRawEditorComponent | typeof FileIdSelectComponent | typeof ImageEditorComponent | typeof TextEditorComponent | typeof CustomWidgetEditorComponent | typeof MainEditorBlockComponent | typeof VisualEditorComponent | typeof MainEditorComponent)[];
|
|
21
|
-
export declare const XmlComponents: (typeof XmlTagExternalVideoComponent | typeof XmlTagHeaderInnerTextViewComponent | typeof XmlTagHtmlViewComponent | typeof
|
|
20
|
+
export declare const XmlComponents: (typeof XmlTagExternalVideoComponent | typeof XmlTagHeaderInnerTextViewComponent | typeof XmlTagHtmlViewComponent | typeof FileImageTagViewComponent | typeof HtmlRawViewComponent | typeof XmlTagCustomWidgetComponent | typeof XmlTagViewComponent)[];
|
|
22
21
|
export declare const CrocoPipes: (typeof ToPreviewPipe | typeof TagToSpanPipe | typeof ToHtmlBodyTagsPipe | typeof ToPreviewHtmlPipe)[];
|
|
23
|
-
export declare const CrocoHtmlDeclarations: (typeof UploadFilesBtnComponent | typeof AddFilesBtnComponent | typeof XmlTagExternalVideoComponent | typeof XmlTagHeaderInnerTextViewComponent | typeof XmlTagHtmlViewComponent | typeof
|
|
22
|
+
export declare const CrocoHtmlDeclarations: (typeof UploadFilesBtnComponent | typeof AddFilesBtnComponent | typeof XmlTagExternalVideoComponent | typeof XmlTagHeaderInnerTextViewComponent | typeof XmlTagHtmlViewComponent | typeof FileImageTagViewComponent | typeof HtmlRawViewComponent | typeof XmlTagCustomWidgetComponent | typeof XmlTagViewComponent | typeof HtmlRawEditorComponent | typeof FileIdSelectComponent | typeof ImageEditorComponent | typeof TextEditorComponent | typeof CustomWidgetEditorComponent | typeof MainEditorBlockComponent | typeof VisualEditorComponent | typeof ToPreviewPipe | typeof MainEditorComponent | typeof TagToSpanPipe | typeof ToHtmlBodyTagsPipe | typeof ToPreviewHtmlPipe)[];
|
|
24
23
|
export declare const MaterialModules: (typeof MatCardModule)[];
|
|
@@ -3,7 +3,7 @@ export interface ImageRestrictions {
|
|
|
3
3
|
maxHeight: number | undefined;
|
|
4
4
|
}
|
|
5
5
|
export interface FileImageTag {
|
|
6
|
-
|
|
6
|
+
tagName: string;
|
|
7
7
|
data: FileImageTagData;
|
|
8
8
|
}
|
|
9
9
|
export interface FileImageTagData {
|
|
@@ -11,7 +11,7 @@ export interface FileImageTagData {
|
|
|
11
11
|
fileId: string;
|
|
12
12
|
screenMediaRequest: string;
|
|
13
13
|
}
|
|
14
|
-
export interface
|
|
14
|
+
export interface IImageMediaRequest {
|
|
15
15
|
minScreenWidth: number;
|
|
16
16
|
maxScreenWidth: number;
|
|
17
17
|
maxImageHeight?: number;
|
package/lib/options/index.d.ts
CHANGED
|
@@ -1,18 +1,11 @@
|
|
|
1
1
|
import { Type } from "@angular/core";
|
|
2
|
-
import {
|
|
2
|
+
import { IImageMediaRequest } from "../models";
|
|
3
3
|
import { VisualEditorComponent } from "../components";
|
|
4
4
|
export interface CrocoHtmlOptions {
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
* Содержит переменные: {sizeType} - тип размера, {fileId} - идентификатор изображения.
|
|
8
|
-
*/
|
|
9
|
-
publicImageResizedUrlFormat: string;
|
|
10
|
-
/**
|
|
11
|
-
* Формат сслыки для показа изображений из приватный файлов.
|
|
12
|
-
* Содержит переменные: {sizeType} - тип размера, {fileId} - идентификатор изображения.
|
|
6
|
+
* Опции для отображения изображений.
|
|
13
7
|
*/
|
|
14
|
-
|
|
15
|
-
globalMediaRequests?: IMediaRequest[];
|
|
8
|
+
imageOptions: CrocoHtmlImageOptions;
|
|
16
9
|
/**
|
|
17
10
|
* Компонент для рендера кастомных виджетов
|
|
18
11
|
*/
|
|
@@ -25,12 +18,32 @@ export interface CrocoHtmlOptions {
|
|
|
25
18
|
* Показывать кнопку для запуска настроек
|
|
26
19
|
*/
|
|
27
20
|
showSettingsButton: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Кастомные объявленные теги
|
|
23
|
+
*/
|
|
24
|
+
definedCustomTags: string[];
|
|
28
25
|
/**
|
|
29
26
|
* Обработчик нажатия на кнопку кастомных виджетов
|
|
30
27
|
* @returns
|
|
31
28
|
*/
|
|
32
29
|
customWidgetClickHandler: (editor: VisualEditorComponent) => void;
|
|
33
30
|
}
|
|
31
|
+
export interface CrocoHtmlImageOptions {
|
|
32
|
+
/**
|
|
33
|
+
* Формат сслыки для показа изображений из публичных файлов.
|
|
34
|
+
* Содержит переменные: {sizeType} - тип размера, {fileId} - идентификатор изображения.
|
|
35
|
+
*/
|
|
36
|
+
publicImageResizedUrlFormat: string;
|
|
37
|
+
/**
|
|
38
|
+
* Формат сслыки для показа изображений из приватный файлов.
|
|
39
|
+
* Содержит переменные: {sizeType} - тип размера, {fileId} - идентификатор изображения.
|
|
40
|
+
*/
|
|
41
|
+
privateImageResizedUrlFormat: string;
|
|
42
|
+
/**
|
|
43
|
+
* Медиа запросы для изображений.
|
|
44
|
+
*/
|
|
45
|
+
globalMediaRequests?: IImageMediaRequest[];
|
|
46
|
+
}
|
|
34
47
|
/**
|
|
35
48
|
* Опции для работы с файлами в редакторе разметки
|
|
36
49
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { InterfaceBlock } from "../extensions/InterfaceBlock";
|
|
2
2
|
import { HtmlBodyTag } from "../models";
|
|
3
3
|
import { CrocoHtmlOptions } from "../options";
|
|
4
|
-
import { IMarkUpTagService } from "./IMarkUpTagService";
|
|
4
|
+
import { IMarkUpTagService, IVisualEditorProps } from "./IMarkUpTagService";
|
|
5
5
|
export declare class ButtonTagDataConsts {
|
|
6
6
|
static readonly TagName = "button";
|
|
7
7
|
static readonly TextAttrName = "text";
|
|
@@ -23,4 +23,5 @@ export declare class ButtonTagService implements IMarkUpTagService {
|
|
|
23
23
|
bodyTagToHtmlStringConverter(bodyTag: HtmlBodyTag): string;
|
|
24
24
|
extractBlockFromHtmlElement(elem: HTMLElement, options: CrocoHtmlOptions): InterfaceBlock;
|
|
25
25
|
toBodyTag(data: InterfaceBlock): HtmlBodyTag;
|
|
26
|
+
getDefaultValue(props: IVisualEditorProps): HtmlBodyTag;
|
|
26
27
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { InterfaceBlock } from "../extensions/InterfaceBlock";
|
|
2
2
|
import { HtmlBodyTag } from "../models";
|
|
3
3
|
import { CrocoHtmlOptions } from "../options";
|
|
4
|
-
import { IMarkUpTagService } from "./IMarkUpTagService";
|
|
4
|
+
import { IMarkUpTagService, IVisualEditorProps } from "./IMarkUpTagService";
|
|
5
5
|
export declare class CustomWidgetTagDataConsts {
|
|
6
6
|
static readonly TagName = "custom-widget";
|
|
7
7
|
static readonly TypeAttrName = "type";
|
|
@@ -23,6 +23,7 @@ export declare class CustomWidgetTagService implements IMarkUpTagService {
|
|
|
23
23
|
bodyTagToHtmlStringConverter(bodyTag: HtmlBodyTag): string;
|
|
24
24
|
extractBlockFromHtmlElement(elem: HTMLElement, options: CrocoHtmlOptions): InterfaceBlock;
|
|
25
25
|
toBodyTag(data: InterfaceBlock): HtmlBodyTag;
|
|
26
|
+
getDefaultValue(props: IVisualEditorProps): HtmlBodyTag;
|
|
26
27
|
static ExtractCustomWidgetTagData(attributes: any): CustomWidgetTagData;
|
|
27
28
|
static ExtractCustomWidgetAttributes(customWidgetTagData: CustomWidgetTagData): {
|
|
28
29
|
type: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { InterfaceBlock } from "../extensions/InterfaceBlock";
|
|
2
2
|
import { HtmlBodyTag } from "../models";
|
|
3
3
|
import { CrocoHtmlOptions } from "../options";
|
|
4
|
-
import { IMarkUpTagService } from "./IMarkUpTagService";
|
|
4
|
+
import { IMarkUpTagService, IVisualEditorProps } from "./IMarkUpTagService";
|
|
5
5
|
export declare class DownloadButtonTagDataConsts {
|
|
6
6
|
static readonly TagName = "download-file-button";
|
|
7
7
|
static readonly TitleAttrName = "title";
|
|
@@ -21,4 +21,5 @@ export declare class DownloadButtonTagService implements IMarkUpTagService {
|
|
|
21
21
|
bodyTagToHtmlStringConverter(bodyTag: HtmlBodyTag): string;
|
|
22
22
|
extractBlockFromHtmlElement(elem: HTMLElement, options: CrocoHtmlOptions): InterfaceBlock;
|
|
23
23
|
toBodyTag(data: InterfaceBlock): HtmlBodyTag;
|
|
24
|
+
getDefaultValue(props: IVisualEditorProps): HtmlBodyTag;
|
|
24
25
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { InterfaceBlock } from "../extensions/InterfaceBlock";
|
|
2
2
|
import { HtmlBodyTag } from "../models";
|
|
3
3
|
import { CrocoHtmlOptions } from "../options";
|
|
4
|
-
import { IMarkUpTagService } from "./IMarkUpTagService";
|
|
4
|
+
import { IMarkUpTagService, IVisualEditorProps } from "./IMarkUpTagService";
|
|
5
5
|
export declare class ExternalVideoTagService implements IMarkUpTagService {
|
|
6
6
|
tagName: string;
|
|
7
7
|
shortDescription: string;
|
|
8
8
|
bodyTagToHtmlStringConverter(bodyTag: HtmlBodyTag): string;
|
|
9
9
|
extractBlockFromHtmlElement(elem: HTMLElement, options: CrocoHtmlOptions): InterfaceBlock;
|
|
10
10
|
toBodyTag(data: InterfaceBlock): HtmlBodyTag;
|
|
11
|
+
getDefaultValue(props: IVisualEditorProps): HtmlBodyTag;
|
|
11
12
|
}
|
|
@@ -8,4 +8,5 @@ export declare class FileImageTagService implements IMarkUpTagService {
|
|
|
8
8
|
bodyTagToHtmlStringConverter(bodyTag: HtmlBodyTag): string;
|
|
9
9
|
extractBlockFromHtmlElement(elem: HTMLElement, options: CrocoHtmlOptions): InterfaceBlock;
|
|
10
10
|
toBodyTag(data: InterfaceBlock): HtmlBodyTag;
|
|
11
|
+
getDefaultValue(): HtmlBodyTag;
|
|
11
12
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { InterfaceBlock } from "../extensions/InterfaceBlock";
|
|
2
2
|
import { HtmlBodyTag } from "../models";
|
|
3
3
|
import { CrocoHtmlOptions } from "../options";
|
|
4
|
-
import { IMarkUpTagService } from "./IMarkUpTagService";
|
|
4
|
+
import { IMarkUpTagService, IVisualEditorProps } from "./IMarkUpTagService";
|
|
5
5
|
export declare class HtmlRawTagService implements IMarkUpTagService {
|
|
6
6
|
tagName: string;
|
|
7
7
|
shortDescription: string;
|
|
8
8
|
bodyTagToHtmlStringConverter(bodyTag: HtmlBodyTag): string;
|
|
9
9
|
extractBlockFromHtmlElement(elem: HTMLElement, options: CrocoHtmlOptions): InterfaceBlock;
|
|
10
10
|
toBodyTag(data: InterfaceBlock): HtmlBodyTag;
|
|
11
|
+
getDefaultValue(props: IVisualEditorProps): HtmlBodyTag;
|
|
11
12
|
}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { InterfaceBlock } from "../extensions/InterfaceBlock";
|
|
2
2
|
import { HtmlBodyTag } from "../models";
|
|
3
3
|
import { CrocoHtmlOptions } from "../options";
|
|
4
|
+
export interface IVisualEditorProps {
|
|
5
|
+
selectedVideoPlayer: string;
|
|
6
|
+
htmlRaw: string;
|
|
7
|
+
}
|
|
4
8
|
export interface IMarkUpTagService {
|
|
5
9
|
/**
|
|
6
10
|
* Название тега
|
|
@@ -23,4 +27,9 @@ export interface IMarkUpTagService {
|
|
|
23
27
|
* @returns
|
|
24
28
|
*/
|
|
25
29
|
toBodyTag: (data: InterfaceBlock) => HtmlBodyTag;
|
|
30
|
+
/**
|
|
31
|
+
* Получить значение по умолчанию
|
|
32
|
+
* @returns
|
|
33
|
+
*/
|
|
34
|
+
getDefaultValue: (props: IVisualEditorProps) => HtmlBodyTag;
|
|
26
35
|
}
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import { InterfaceBlock } from "../extensions/InterfaceBlock";
|
|
2
2
|
import { HtmlBodyTag } from "../models";
|
|
3
3
|
import { CrocoHtmlOptions } from "../options";
|
|
4
|
-
import { IMarkUpTagService } from "../tag-services/IMarkUpTagService";
|
|
4
|
+
import { IMarkUpTagService, IVisualEditorProps } from "../tag-services/IMarkUpTagService";
|
|
5
|
+
export declare enum TextAlignment {
|
|
6
|
+
Left = "left",
|
|
7
|
+
Center = "center",
|
|
8
|
+
Right = "right"
|
|
9
|
+
}
|
|
10
|
+
export declare class TextTagDataConsts {
|
|
11
|
+
static readonly HAlign = "h-align";
|
|
12
|
+
}
|
|
5
13
|
export declare class TextTagHtmlMarkupTagService implements IMarkUpTagService {
|
|
6
14
|
constructor(tagName: string, shortDescription: string);
|
|
7
15
|
tagName: string;
|
|
@@ -9,4 +17,5 @@ export declare class TextTagHtmlMarkupTagService implements IMarkUpTagService {
|
|
|
9
17
|
bodyTagToHtmlStringConverter(bodyTag: HtmlBodyTag): string;
|
|
10
18
|
extractBlockFromHtmlElement(elem: HTMLElement, options: CrocoHtmlOptions): InterfaceBlock;
|
|
11
19
|
toBodyTag(data: InterfaceBlock): HtmlBodyTag;
|
|
20
|
+
getDefaultValue(props: IVisualEditorProps): HtmlBodyTag;
|
|
12
21
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class XmlTagTableViewComponent {
|
|
3
|
-
displayedColumns: string[];
|
|
4
|
-
data: object;
|
|
5
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<XmlTagTableViewComponent, never>;
|
|
6
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<XmlTagTableViewComponent, "croco-html-xml-tag-table-view", never, { "displayedColumns": { "alias": "displayedColumns"; "required": false; }; "data": { "alias": "data"; "required": false; }; }, {}, never, never, true, never>;
|
|
7
|
-
}
|