croco-html 4.4.0 → 4.4.3

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,19 +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
- _tagName: string;
15
- _shortTagName: string;
16
15
  ngOnInit(): void;
16
+ ngOnDestroy(): void;
17
17
  static ɵfac: i0.ɵɵFactoryDeclaration<DefinedCustomEditorBlockComponent, never>;
18
18
  static ɵcmp: i0.ɵɵComponentDeclaration<DefinedCustomEditorBlockComponent, "croco-html-defined-custom-editor-block", never, { "tag": { "alias": "tag"; "required": true; }; }, { "onTagUpdated": "onTagUpdated"; }, never, never, true, never>;
19
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 { FileImageTagViewComponent, UploadFilesBtnComponent } from "./components
16
16
  import { HtmlRawViewComponent } from "./components";
17
17
  import { HtmlViewComponent } from "./components";
18
18
  import { XmlTagCustomWidgetComponent } from "./components";
19
- export declare const EditorComponents: (typeof VisualEditorComponent | typeof MainEditorComponent | typeof AddFilesBtnComponent | typeof MainEditorBlockComponent | typeof CustomWidgetIconComponent | typeof TextEditorComponent | typeof ImageEditorComponent | typeof HtmlRawEditorComponent | typeof CustomWidgetEditorComponent | typeof DefinedCustomEditorBlockComponent | typeof FileIdSelectComponent)[];
20
- export declare const XmlComponents: (typeof HtmlViewComponent | typeof XmlTagTextViewComponent | typeof HtmlRawViewComponent | typeof FileImageTagViewComponent | typeof XmlTagExternalVideoComponent | typeof XmlTagCustomWidgetComponent | typeof DefinedCustomTagViewComponent | typeof XmlTagViewComponent)[];
19
+ export declare const EditorComponents: (typeof DefinedCustomEditorBlockComponent | typeof TextEditorComponent | typeof ImageEditorComponent | typeof HtmlRawEditorComponent | typeof CustomWidgetEditorComponent | typeof MainEditorBlockComponent | typeof FileIdSelectComponent | typeof VisualEditorComponent | typeof MainEditorComponent | typeof AddFilesBtnComponent | typeof CustomWidgetIconComponent)[];
20
+ export declare const XmlComponents: (typeof FileImageTagViewComponent | typeof HtmlViewComponent | typeof XmlTagTextViewComponent | typeof HtmlRawViewComponent | typeof XmlTagExternalVideoComponent | typeof XmlTagCustomWidgetComponent | typeof DefinedCustomTagViewComponent | typeof XmlTagViewComponent)[];
21
21
  export declare const CrocoPipes: (typeof ToPreviewHtmlPipe | typeof ToHtmlBodyTagsPipe | typeof ToPreviewPipe | typeof TagToSpanPipe)[];
22
- export declare const CrocoHtmlDeclarations: (typeof ToPreviewHtmlPipe | typeof ToHtmlBodyTagsPipe | typeof VisualEditorComponent | typeof HtmlViewComponent | typeof MainEditorComponent | typeof ToPreviewPipe | typeof AddFilesBtnComponent | typeof MainEditorBlockComponent | typeof CustomWidgetIconComponent | typeof TextEditorComponent | typeof ImageEditorComponent | typeof HtmlRawEditorComponent | typeof CustomWidgetEditorComponent | typeof DefinedCustomEditorBlockComponent | typeof FileIdSelectComponent | typeof XmlTagTextViewComponent | typeof HtmlRawViewComponent | typeof FileImageTagViewComponent | typeof XmlTagExternalVideoComponent | typeof XmlTagCustomWidgetComponent | typeof DefinedCustomTagViewComponent | typeof XmlTagViewComponent | typeof TagToSpanPipe | typeof UploadFilesBtnComponent)[];
22
+ export declare const CrocoHtmlDeclarations: (typeof DefinedCustomEditorBlockComponent | typeof TextEditorComponent | typeof ImageEditorComponent | typeof HtmlRawEditorComponent | typeof CustomWidgetEditorComponent | typeof MainEditorBlockComponent | typeof FileIdSelectComponent | typeof FileImageTagViewComponent | typeof ToPreviewHtmlPipe | typeof ToHtmlBodyTagsPipe | typeof VisualEditorComponent | typeof HtmlViewComponent | typeof MainEditorComponent | typeof ToPreviewPipe | typeof AddFilesBtnComponent | typeof CustomWidgetIconComponent | typeof XmlTagTextViewComponent | typeof HtmlRawViewComponent | typeof XmlTagExternalVideoComponent | typeof XmlTagCustomWidgetComponent | typeof DefinedCustomTagViewComponent | typeof XmlTagViewComponent | typeof UploadFilesBtnComponent | typeof TagToSpanPipe)[];
23
23
  export declare const MaterialModules: (typeof MatTabsModule)[];
@@ -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.0",
3
+ "version": "4.4.3",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^19.2.14",
6
6
  "@angular/core": "^19.2.14",