croco-html 4.3.11 → 4.4.1
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 +85 -12
- package/fesm2022/croco-html.mjs.map +1 -1
- package/lib/components/editor/index.d.ts +1 -0
- package/lib/components/editor/main-editor-block/components/defined-custom-editor-block/defined-custom-editor-block.component.d.ts +10 -2
- package/lib/components/editor/visual-editor/components/custom-widget-icon/custom-widget-icon.component.d.ts +17 -0
- package/lib/components/editor/visual-editor/visual-editor.component.d.ts +2 -1
- package/lib/components/xml-tags/xml-tag-custom-widget/xml-tag-custom-widget.component.d.ts +2 -2
- package/lib/croco-html.module.d.ts +6 -5
- package/lib/index.d.ts +5 -3
- package/lib/options/index.d.ts +20 -0
- package/package.json +1 -1
|
@@ -7,3 +7,4 @@ export * from './main-editor-block/components/defined-custom-editor-block/define
|
|
|
7
7
|
export * from './text-editor/text-editor.component';
|
|
8
8
|
export * from './visual-editor/visual-editor.component';
|
|
9
9
|
export * from './custom-widget-editor/custom-widget-editor.component';
|
|
10
|
+
export * from './visual-editor/components/custom-widget-icon/custom-widget-icon.component';
|
|
@@ -1,9 +1,17 @@
|
|
|
1
|
-
import { EventEmitter } from '@angular/core';
|
|
1
|
+
import { ComponentRef, EventEmitter, OnInit, ViewContainerRef } from '@angular/core';
|
|
2
2
|
import { HtmlBodyTag } from '../../../../../models';
|
|
3
|
+
import { CrocoHtmlOptions } from '../../../../../options';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class DefinedCustomEditorBlockComponent {
|
|
5
|
+
export declare class DefinedCustomEditorBlockComponent implements OnInit {
|
|
6
|
+
private readonly _options;
|
|
7
|
+
viewContainerRef: ViewContainerRef;
|
|
8
|
+
useDynamicComponent: boolean;
|
|
9
|
+
dynamicContainerRef: ComponentRef<any>;
|
|
5
10
|
tag: HtmlBodyTag;
|
|
6
11
|
onTagUpdated: EventEmitter<HtmlBodyTag>;
|
|
12
|
+
constructor(_options: CrocoHtmlOptions);
|
|
13
|
+
getCustomComponent(): import("@angular/core").Type<any>;
|
|
14
|
+
ngOnInit(): void;
|
|
7
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<DefinedCustomEditorBlockComponent, never>;
|
|
8
16
|
static ɵcmp: i0.ɵɵComponentDeclaration<DefinedCustomEditorBlockComponent, "croco-html-defined-custom-editor-block", never, { "tag": { "alias": "tag"; "required": true; }; }, { "onTagUpdated": "onTagUpdated"; }, never, never, true, never>;
|
|
9
17
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ComponentRef, OnInit, ViewContainerRef } from '@angular/core';
|
|
2
|
+
import { CrocoHtmlOptions } from '../../../../../options';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class CustomWidgetIconComponent implements OnInit {
|
|
5
|
+
private readonly _options;
|
|
6
|
+
viewContainerRef: ViewContainerRef;
|
|
7
|
+
useDynamicComponent: boolean;
|
|
8
|
+
dynamicContainerRef: ComponentRef<any>;
|
|
9
|
+
set tagName(tagName: string);
|
|
10
|
+
constructor(_options: CrocoHtmlOptions);
|
|
11
|
+
getIconComponent(): import("@angular/core").Type<any>;
|
|
12
|
+
_tagName: string;
|
|
13
|
+
_shortTagName: string;
|
|
14
|
+
ngOnInit(): void;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CustomWidgetIconComponent, never>;
|
|
16
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CustomWidgetIconComponent, "croco-html-custom-widget-icon", never, { "tagName": { "alias": "tagName"; "required": true; }; }, {}, never, never, true, never>;
|
|
17
|
+
}
|
|
@@ -59,9 +59,10 @@ export declare class VisualEditorComponent implements OnInit, AfterViewInit {
|
|
|
59
59
|
recalculateHtml(): void;
|
|
60
60
|
recalculateBodyTags(): void;
|
|
61
61
|
selectTag(data: TagItem): void;
|
|
62
|
+
isDefinedCustomWidget(tagName: string): boolean;
|
|
62
63
|
customWidgetsClickHandler(): void;
|
|
63
64
|
ngOnInit(): void;
|
|
64
|
-
setTagButton(
|
|
65
|
+
setTagButton(tagName: string): SpriteIdsType;
|
|
65
66
|
setAlignButton(type: string): SpriteIdsType;
|
|
66
67
|
static ɵfac: i0.ɵɵFactoryDeclaration<VisualEditorComponent, never>;
|
|
67
68
|
static ɵcmp: i0.ɵɵComponentDeclaration<VisualEditorComponent, "croco-visual-editor", never, { "showMarkUp": { "alias": "showMarkUp"; "required": false; }; "useHtmlRaw": { "alias": "useHtmlRaw"; "required": false; }; "html": { "alias": "html"; "required": false; }; }, { "html": "html"; "onHtmlChanged": "onHtmlChanged"; "rendered": "rendered"; }, never, never, true, never>;
|
|
@@ -5,12 +5,12 @@ import * as i0 from "@angular/core";
|
|
|
5
5
|
export declare class XmlTagCustomWidgetComponent implements OnInit, OnDestroy {
|
|
6
6
|
private readonly _options;
|
|
7
7
|
viewContainerRef: ViewContainerRef;
|
|
8
|
+
useDynamicComponent: boolean;
|
|
9
|
+
dynamicContainerRef: ComponentRef<any>;
|
|
8
10
|
set tagData(value: CustomWidgetTagData);
|
|
9
11
|
get tagData(): CustomWidgetTagData;
|
|
10
12
|
_tagData: CustomWidgetTagData;
|
|
11
13
|
tooltipData: string;
|
|
12
|
-
useDynamicComponent: boolean;
|
|
13
|
-
dynamicContainerRef: ComponentRef<any>;
|
|
14
14
|
constructor(_options: CrocoHtmlOptions);
|
|
15
15
|
ngOnInit(): void;
|
|
16
16
|
ngOnDestroy(): void;
|
|
@@ -58,12 +58,13 @@ import * as i56 from "./components/add-files-btn/add-files-btn.component";
|
|
|
58
58
|
import * as i57 from "./components/editor/html-raw-editor/html-raw-editor.component";
|
|
59
59
|
import * as i58 from "./components/editor/custom-widget-editor/custom-widget-editor.component";
|
|
60
60
|
import * as i59 from "./components/editor/main-editor-block/components/defined-custom-editor-block/defined-custom-editor-block.component";
|
|
61
|
-
import * as i60 from "./
|
|
62
|
-
import * as i61 from "./pipes/
|
|
63
|
-
import * as i62 from "./pipes/
|
|
64
|
-
import * as i63 from "./pipes/
|
|
61
|
+
import * as i60 from "./components/editor/visual-editor/components/custom-widget-icon/custom-widget-icon.component";
|
|
62
|
+
import * as i61 from "./pipes/TagToSpanPipe";
|
|
63
|
+
import * as i62 from "./pipes/to-preview.pipe";
|
|
64
|
+
import * as i63 from "./pipes/ToHtmlBodyTagsPipe";
|
|
65
|
+
import * as i64 from "./pipes/ToPreviewHtmlPipe";
|
|
65
66
|
export declare class CrocoHtmlModule {
|
|
66
67
|
static ɵfac: i0.ɵɵFactoryDeclaration<CrocoHtmlModule, never>;
|
|
67
|
-
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.DefinedCustomTagViewComponent, typeof i50.MainEditorComponent, typeof i51.FileIdSelectComponent, typeof i52.TextEditorComponent, typeof i53.ImageEditorComponent, typeof i54.MainEditorBlockComponent, typeof i55.VisualEditorComponent, typeof i56.AddFilesBtnComponent, typeof i57.HtmlRawEditorComponent, typeof i58.CustomWidgetEditorComponent, typeof i59.DefinedCustomEditorBlockComponent, typeof i60.
|
|
68
|
+
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.DefinedCustomTagViewComponent, typeof i50.MainEditorComponent, typeof i51.FileIdSelectComponent, typeof i52.TextEditorComponent, typeof i53.ImageEditorComponent, typeof i54.MainEditorBlockComponent, typeof i55.VisualEditorComponent, typeof i56.AddFilesBtnComponent, typeof i57.HtmlRawEditorComponent, typeof i58.CustomWidgetEditorComponent, typeof i59.DefinedCustomEditorBlockComponent, typeof i60.CustomWidgetIconComponent, typeof i61.TagToSpanPipe, typeof i62.ToPreviewPipe, typeof i63.ToHtmlBodyTagsPipe, typeof i64.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.DefinedCustomTagViewComponent, typeof i50.MainEditorComponent, typeof i51.FileIdSelectComponent, typeof i52.TextEditorComponent, typeof i53.ImageEditorComponent, typeof i54.MainEditorBlockComponent, typeof i55.VisualEditorComponent, typeof i56.AddFilesBtnComponent, typeof i57.HtmlRawEditorComponent, typeof i58.CustomWidgetEditorComponent, typeof i59.DefinedCustomEditorBlockComponent, typeof i60.CustomWidgetIconComponent, typeof i61.TagToSpanPipe, typeof i62.ToPreviewPipe, typeof i63.ToHtmlBodyTagsPipe, typeof i64.ToPreviewHtmlPipe]>;
|
|
68
69
|
static ɵinj: i0.ɵɵInjectorDeclaration<CrocoHtmlModule>;
|
|
69
70
|
}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { DefinedCustomEditorBlockComponent, DefinedCustomTagViewComponent, ImageEditorComponent } from "./components";
|
|
1
|
+
import { CustomWidgetIconComponent, DefinedCustomEditorBlockComponent, DefinedCustomTagViewComponent, ImageEditorComponent } from "./components";
|
|
2
2
|
import { MainEditorBlockComponent } from "./components";
|
|
3
3
|
import { MainEditorComponent } from "./components";
|
|
4
|
+
import { TextEditorComponent } from "./components";
|
|
4
5
|
import { FileIdSelectComponent } from "./components";
|
|
5
6
|
import { XmlTagHeaderInnerTextViewComponent } from "./components";
|
|
6
7
|
import { XmlTagHtmlViewComponent } from "./components";
|
|
7
8
|
import { XmlTagViewComponent } from "./components";
|
|
9
|
+
import { CustomWidgetEditorComponent } from "./components";
|
|
8
10
|
import { VisualEditorComponent } from './components';
|
|
9
11
|
import { AddFilesBtnComponent } from './components';
|
|
10
12
|
import { XmlTagExternalVideoComponent } from "./components";
|
|
@@ -14,8 +16,8 @@ import { TagToSpanPipe, ToHtmlBodyTagsPipe, ToPreviewHtmlPipe, ToPreviewPipe } f
|
|
|
14
16
|
import { FileImageTagViewComponent, UploadFilesBtnComponent } from "./components";
|
|
15
17
|
import { HtmlRawViewComponent } from "./components";
|
|
16
18
|
import { XmlTagCustomWidgetComponent } from "./components";
|
|
17
|
-
export declare const EditorComponents: (typeof
|
|
19
|
+
export declare const EditorComponents: (typeof DefinedCustomEditorBlockComponent | typeof TextEditorComponent | typeof ImageEditorComponent | typeof HtmlRawEditorComponent | typeof CustomWidgetEditorComponent | typeof MainEditorBlockComponent | typeof AddFilesBtnComponent | typeof FileIdSelectComponent | typeof CustomWidgetIconComponent | typeof VisualEditorComponent | typeof MainEditorComponent)[];
|
|
18
20
|
export declare const XmlComponents: (typeof XmlTagExternalVideoComponent | typeof XmlTagHeaderInnerTextViewComponent | typeof XmlTagHtmlViewComponent | typeof FileImageTagViewComponent | typeof HtmlRawViewComponent | typeof XmlTagCustomWidgetComponent | typeof DefinedCustomTagViewComponent | typeof XmlTagViewComponent)[];
|
|
19
21
|
export declare const CrocoPipes: (typeof ToPreviewPipe | typeof TagToSpanPipe | typeof ToHtmlBodyTagsPipe | typeof ToPreviewHtmlPipe)[];
|
|
20
|
-
export declare const CrocoHtmlDeclarations: (typeof
|
|
22
|
+
export declare const CrocoHtmlDeclarations: (typeof DefinedCustomEditorBlockComponent | typeof TextEditorComponent | typeof ImageEditorComponent | typeof HtmlRawEditorComponent | typeof CustomWidgetEditorComponent | typeof MainEditorBlockComponent | typeof UploadFilesBtnComponent | typeof AddFilesBtnComponent | typeof XmlTagExternalVideoComponent | typeof XmlTagHeaderInnerTextViewComponent | typeof XmlTagHtmlViewComponent | typeof FileImageTagViewComponent | typeof HtmlRawViewComponent | typeof XmlTagCustomWidgetComponent | typeof DefinedCustomTagViewComponent | typeof XmlTagViewComponent | typeof FileIdSelectComponent | typeof CustomWidgetIconComponent | typeof VisualEditorComponent | typeof ToPreviewPipe | typeof MainEditorComponent | typeof TagToSpanPipe | typeof ToHtmlBodyTagsPipe | typeof ToPreviewHtmlPipe)[];
|
|
21
23
|
export declare const MaterialModules: (typeof MatCardModule)[];
|
package/lib/options/index.d.ts
CHANGED
|
@@ -25,12 +25,32 @@ export interface CrocoHtmlOptions {
|
|
|
25
25
|
definedCustomTags: {
|
|
26
26
|
[id: string]: IMarkUpTagService;
|
|
27
27
|
};
|
|
28
|
+
/**
|
|
29
|
+
* Рендеры для кастомных тегов.
|
|
30
|
+
*/
|
|
31
|
+
definedCustomTagViewRenderers: {
|
|
32
|
+
[id: string]: ICustomTagViewRender;
|
|
33
|
+
};
|
|
28
34
|
/**
|
|
29
35
|
* Обработчик нажатия на кнопку кастомных виджетов
|
|
30
36
|
* @returns
|
|
31
37
|
*/
|
|
32
38
|
customWidgetClickHandler: (editor: VisualEditorComponent) => void;
|
|
33
39
|
}
|
|
40
|
+
export interface ICustomTagViewRender {
|
|
41
|
+
/**
|
|
42
|
+
* Компонент для визуального редактора croco-html-custom-widget-editor
|
|
43
|
+
*/
|
|
44
|
+
editorComponent?: Type<any>;
|
|
45
|
+
/**
|
|
46
|
+
* Иконка в визуальном редакторе croco-html-custom-widget-icon
|
|
47
|
+
*/
|
|
48
|
+
iconComponent?: Type<any>;
|
|
49
|
+
/**
|
|
50
|
+
* Компонент для отрисовки на интерфейсе croco-html-defined-custom-tag-view
|
|
51
|
+
*/
|
|
52
|
+
viewComponent?: Type<any>;
|
|
53
|
+
}
|
|
34
54
|
export interface CrocoHtmlImageOptions {
|
|
35
55
|
/**
|
|
36
56
|
* Формат сслыки для показа изображений из публичных файлов.
|