croco-html 4.4.1 → 4.4.4

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.
@@ -1,17 +1,24 @@
1
- import { ComponentRef, EventEmitter, OnInit, ViewContainerRef } from '@angular/core';
2
- import { HtmlBodyTag } from '../../../../../models';
1
+ import { ComponentRef, EventEmitter, OnDestroy, OnInit, ViewContainerRef } from '@angular/core';
2
+ import { HtmlBodyTag, ISingleTagVisualEditor } from '../../../../../models';
3
3
  import { CrocoHtmlOptions } from '../../../../../options';
4
4
  import * as i0 from "@angular/core";
5
- export declare class DefinedCustomEditorBlockComponent implements OnInit {
5
+ export declare class DefinedCustomEditorBlockComponent implements OnInit, OnDestroy {
6
6
  private readonly _options;
7
7
  viewContainerRef: ViewContainerRef;
8
8
  useDynamicComponent: boolean;
9
9
  dynamicContainerRef: ComponentRef<any>;
10
+ private editor;
10
11
  tag: HtmlBodyTag;
11
12
  onTagUpdated: EventEmitter<HtmlBodyTag>;
12
13
  constructor(_options: CrocoHtmlOptions);
13
14
  getCustomComponent(): import("@angular/core").Type<any>;
14
15
  ngOnInit(): void;
16
+ ngOnDestroy(): void;
15
17
  static ɵfac: i0.ɵɵFactoryDeclaration<DefinedCustomEditorBlockComponent, never>;
16
18
  static ɵcmp: i0.ɵɵComponentDeclaration<DefinedCustomEditorBlockComponent, "croco-html-defined-custom-editor-block", never, { "tag": { "alias": "tag"; "required": true; }; }, { "onTagUpdated": "onTagUpdated"; }, never, never, true, never>;
17
19
  }
20
+ export declare class SingleTagVisualEditor implements ISingleTagVisualEditor {
21
+ private readonly _emitter;
22
+ constructor(_emitter: EventEmitter<HtmlBodyTag>);
23
+ tagUpdated(tag: HtmlBodyTag): void;
24
+ }
@@ -1,8 +1,18 @@
1
+ import { ComponentRef, OnDestroy, OnInit, ViewContainerRef } from '@angular/core';
1
2
  import { InterfaceBlock } from '../../../models/InterfaceBlock';
3
+ import { CrocoHtmlOptions } from '../../../options';
2
4
  import * as i0 from "@angular/core";
3
- export declare class DefinedCustomTagViewComponent {
5
+ export declare class DefinedCustomTagViewComponent implements OnInit, OnDestroy {
6
+ private readonly _options;
7
+ viewContainerRef: ViewContainerRef;
8
+ useDynamicComponent: boolean;
9
+ dynamicContainerRef: ComponentRef<any>;
4
10
  set data(value: InterfaceBlock);
5
11
  _data: InterfaceBlock;
12
+ constructor(_options: CrocoHtmlOptions);
13
+ getCustomComponent(): import("@angular/core").Type<any>;
14
+ ngOnInit(): void;
15
+ ngOnDestroy(): void;
6
16
  static ɵfac: i0.ɵɵFactoryDeclaration<DefinedCustomTagViewComponent, never>;
7
17
  static ɵcmp: i0.ɵɵComponentDeclaration<DefinedCustomTagViewComponent, "croco-html-defined-custom-tag-view", never, { "data": { "alias": "data"; "required": true; }; }, {}, never, never, true, never>;
8
18
  }
package/lib/index.d.ts CHANGED
@@ -16,8 +16,8 @@ import { TagToSpanPipe, ToHtmlBodyTagsPipe, ToPreviewHtmlPipe, ToPreviewPipe } f
16
16
  import { FileImageTagViewComponent, UploadFilesBtnComponent } from "./components";
17
17
  import { HtmlRawViewComponent } from "./components";
18
18
  import { XmlTagCustomWidgetComponent } from "./components";
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)[];
19
+ export declare const EditorComponents: (typeof AddFilesBtnComponent | typeof HtmlRawEditorComponent | typeof FileIdSelectComponent | typeof ImageEditorComponent | typeof TextEditorComponent | typeof CustomWidgetEditorComponent | typeof DefinedCustomEditorBlockComponent | typeof MainEditorBlockComponent | typeof CustomWidgetIconComponent | typeof VisualEditorComponent | typeof MainEditorComponent)[];
20
20
  export declare const XmlComponents: (typeof XmlTagExternalVideoComponent | typeof XmlTagHeaderInnerTextViewComponent | typeof XmlTagHtmlViewComponent | typeof FileImageTagViewComponent | typeof HtmlRawViewComponent | typeof XmlTagCustomWidgetComponent | typeof DefinedCustomTagViewComponent | typeof XmlTagViewComponent)[];
21
21
  export declare const CrocoPipes: (typeof ToPreviewPipe | typeof TagToSpanPipe | typeof ToHtmlBodyTagsPipe | typeof ToPreviewHtmlPipe)[];
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)[];
22
+ export declare const CrocoHtmlDeclarations: (typeof UploadFilesBtnComponent | typeof AddFilesBtnComponent | typeof XmlTagExternalVideoComponent | typeof XmlTagHeaderInnerTextViewComponent | typeof XmlTagHtmlViewComponent | typeof FileImageTagViewComponent | typeof HtmlRawViewComponent | typeof XmlTagCustomWidgetComponent | typeof DefinedCustomTagViewComponent | typeof XmlTagViewComponent | typeof HtmlRawEditorComponent | typeof FileIdSelectComponent | typeof ImageEditorComponent | typeof TextEditorComponent | typeof CustomWidgetEditorComponent | typeof DefinedCustomEditorBlockComponent | typeof MainEditorBlockComponent | typeof CustomWidgetIconComponent | typeof VisualEditorComponent | typeof ToPreviewPipe | typeof MainEditorComponent | typeof TagToSpanPipe | typeof ToHtmlBodyTagsPipe | typeof ToPreviewHtmlPipe)[];
23
23
  export declare const MaterialModules: (typeof MatCardModule)[];
@@ -0,0 +1,4 @@
1
+ import { HtmlBodyTag } from "./models";
2
+ export interface ISingleTagVisualEditor {
3
+ tagUpdated(tag: HtmlBodyTag): void;
4
+ }
@@ -1,3 +1,4 @@
1
1
  export * from './image-models';
2
2
  export * from './models';
3
3
  export * from './InterfaceBlock';
4
+ export * from './editor-models';
@@ -40,6 +40,9 @@ export interface CrocoHtmlOptions {
40
40
  export interface ICustomTagViewRender {
41
41
  /**
42
42
  * Компонент для визуального редактора croco-html-custom-widget-editor
43
+ * Должен содержать инпуты
44
+ * tag: HtmlBodyTag
45
+ * tagEditor: ISingleTagVisualEditor
43
46
  */
44
47
  editorComponent?: Type<any>;
45
48
  /**
@@ -47,7 +50,8 @@ export interface ICustomTagViewRender {
47
50
  */
48
51
  iconComponent?: Type<any>;
49
52
  /**
50
- * Компонент для отрисовки на интерфейсе croco-html-defined-custom-tag-view
53
+ * Компонент для отрисовки на интерфейсе croco-html-defined-custom-tag-view.
54
+ * Должен содержать input({required: true}) data: InterfaceBlock
51
55
  */
52
56
  viewComponent?: Type<any>;
53
57
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "croco-html",
3
- "version": "4.4.1",
3
+ "version": "4.4.4",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^19.2.14",
6
6
  "@angular/core": "^19.2.14",