croco-html 4.5.4 → 4.5.5

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,20 +1,20 @@
1
1
  import { ComponentRef, OnDestroy, OnInit, ViewContainerRef } from '@angular/core';
2
- import { HtmlBodyTag, ISingleTagStorage } from '../../../../../models';
2
+ import { HtmlBodyTag, TagEditorService } from '../../../../../models';
3
3
  import { CrocoHtmlOptions } from '../../../../../options';
4
4
  import * as i0 from "@angular/core";
5
5
  export declare class DefinedCustomEditorBlockComponent implements OnInit, OnDestroy {
6
6
  private readonly _options;
7
+ private unsubscribe;
7
8
  viewContainerRef: ViewContainerRef;
8
9
  useDynamicComponent: boolean;
9
10
  dynamicContainerRef: ComponentRef<any>;
10
- _tagStorage: ISingleTagStorage;
11
+ _tagService: TagEditorService;
11
12
  _tag: HtmlBodyTag;
12
- set tagStorage(data: ISingleTagStorage);
13
- presentOrEdit: boolean;
13
+ set tagService(data: TagEditorService);
14
14
  constructor(_options: CrocoHtmlOptions);
15
15
  getCustomComponent(): import("@angular/core").Type<any>;
16
16
  ngOnInit(): void;
17
17
  ngOnDestroy(): void;
18
18
  static ɵfac: i0.ɵɵFactoryDeclaration<DefinedCustomEditorBlockComponent, never>;
19
- static ɵcmp: i0.ɵɵComponentDeclaration<DefinedCustomEditorBlockComponent, "croco-html-defined-custom-editor-block", never, { "tagStorage": { "alias": "tagStorage"; "required": true; }; "presentOrEdit": { "alias": "presentOrEdit"; "required": true; }; }, {}, never, never, true, never>;
19
+ static ɵcmp: i0.ɵɵComponentDeclaration<DefinedCustomEditorBlockComponent, "croco-html-defined-custom-editor-block", never, { "tagService": { "alias": "tagService"; "required": true; }; }, {}, never, never, true, never>;
20
20
  }
@@ -1,27 +1,24 @@
1
- import { EventEmitter } from '@angular/core';
1
+ import { EventEmitter, OnDestroy } from '@angular/core';
2
2
  import { HtmlBodyTag } from '../../../models/models';
3
3
  import { CrocoHtmlOptions } from '../../../options';
4
- import { ISingleTagStorage } from '../../../models/editor-models';
4
+ import { TagEditorService } from '../../../models/editor-models';
5
5
  import * as i0 from "@angular/core";
6
- export declare class MainEditorBlockComponent {
6
+ export declare class MainEditorBlockComponent implements OnDestroy {
7
7
  private readonly _options;
8
8
  textTags: string[];
9
+ private unsubscribe;
9
10
  set tag(data: HtmlBodyTag);
10
11
  _tag: HtmlBodyTag;
11
- _tagStorage: SingleTagStorage;
12
+ _tagService: TagEditorService;
12
13
  presentOrEdit: boolean;
13
14
  onTagSaved: EventEmitter<HtmlBodyTag>;
14
15
  onTagRemoved: EventEmitter<HtmlBodyTag>;
15
16
  constructor(_options: CrocoHtmlOptions);
16
- tagUpdatedHandler(tag: HtmlBodyTag): void;
17
17
  save(): void;
18
+ cancelSave(): void;
18
19
  isDefinedCustomTag(): boolean;
19
20
  deleteItem(): void;
21
+ ngOnDestroy(): void;
20
22
  static ɵfac: i0.ɵɵFactoryDeclaration<MainEditorBlockComponent, never>;
21
23
  static ɵcmp: i0.ɵɵComponentDeclaration<MainEditorBlockComponent, "croco-html-main-editor-block", never, { "tag": { "alias": "tag"; "required": true; }; }, { "onTagSaved": "onTagSaved"; "onTagRemoved": "onTagRemoved"; }, never, never, true, never>;
22
24
  }
23
- export declare class SingleTagStorage implements ISingleTagStorage {
24
- private _tag;
25
- set(tag: HtmlBodyTag): void;
26
- get(): HtmlBodyTag;
27
- }
@@ -1,16 +1,19 @@
1
+ import { OnDestroy } from '@angular/core';
1
2
  import { HtmlBodyTag } from '../../../models/models';
2
- import { ISingleTagStorage } from '../../../models';
3
+ import { TagEditorService } from '../../../models';
3
4
  import { TextAlignment } from '../../../tag-services';
4
5
  import * as i0 from "@angular/core";
5
- export declare class TextEditorComponent {
6
+ export declare class TextEditorComponent implements OnDestroy {
7
+ private unsubscribe;
6
8
  _tag: HtmlBodyTag;
7
- _tagStorage: ISingleTagStorage;
8
- set tagStorage(data: ISingleTagStorage);
9
+ _tagService: TagEditorService;
10
+ set tagService(data: TagEditorService);
9
11
  presentOrEdit: boolean;
10
12
  TextAlignment: typeof TextAlignment;
11
13
  _horizontalAlignment: TextAlignment;
12
14
  changeData(): void;
13
15
  getInnerHtml(): string;
16
+ ngOnDestroy(): void;
14
17
  static ɵfac: i0.ɵɵFactoryDeclaration<TextEditorComponent, never>;
15
- static ɵcmp: i0.ɵɵComponentDeclaration<TextEditorComponent, "croco-html-text-editor", never, { "tagStorage": { "alias": "tagStorage"; "required": true; }; "presentOrEdit": { "alias": "presentOrEdit"; "required": true; }; }, {}, never, never, true, never>;
18
+ static ɵcmp: i0.ɵɵComponentDeclaration<TextEditorComponent, "croco-html-text-editor", never, { "tagService": { "alias": "tagService"; "required": true; }; }, {}, never, never, true, never>;
16
19
  }
package/lib/index.d.ts CHANGED
@@ -3,21 +3,21 @@ import { MainEditorBlockComponent } from "./components";
3
3
  import { MainEditorComponent } from "./components";
4
4
  import { TextEditorComponent } from "./components";
5
5
  import { FileIdSelectComponent } from "./components";
6
- import { XmlTagHeaderInnerTextViewComponent } from "./components";
7
- import { XmlTagHtmlViewComponent } from "./components";
6
+ import { XmlTagTextViewComponent } from "./components";
8
7
  import { XmlTagViewComponent } from "./components";
9
8
  import { CustomWidgetEditorComponent } from "./components";
10
9
  import { VisualEditorComponent } from './components';
11
10
  import { AddFilesBtnComponent } from './components';
12
11
  import { XmlTagExternalVideoComponent } from "./components";
13
12
  import { HtmlRawEditorComponent } from "./components";
14
- import { MatCardModule } from '@angular/material/card';
13
+ import { MatTabsModule } from '@angular/material/tabs';
15
14
  import { TagToSpanPipe, ToHtmlBodyTagsPipe, ToPreviewHtmlPipe, ToPreviewPipe } from "./pipes";
16
15
  import { FileImageTagViewComponent, UploadFilesBtnComponent } from "./components";
17
16
  import { HtmlRawViewComponent } from "./components";
17
+ import { HtmlViewComponent } from "./components";
18
18
  import { XmlTagCustomWidgetComponent } from "./components";
19
- export declare const EditorComponents: (typeof DefinedCustomEditorBlockComponent | typeof AddFilesBtnComponent | typeof HtmlRawEditorComponent | typeof FileIdSelectComponent | typeof ImageEditorComponent | typeof TextEditorComponent | typeof CustomWidgetEditorComponent | typeof MainEditorBlockComponent | typeof CustomWidgetIconComponent | typeof VisualEditorComponent | typeof MainEditorComponent)[];
20
- export declare const XmlComponents: (typeof XmlTagExternalVideoComponent | typeof XmlTagHeaderInnerTextViewComponent | typeof XmlTagHtmlViewComponent | typeof FileImageTagViewComponent | typeof HtmlRawViewComponent | typeof XmlTagCustomWidgetComponent | typeof DefinedCustomTagViewComponent | typeof XmlTagViewComponent)[];
21
- export declare const CrocoPipes: (typeof ToPreviewPipe | typeof TagToSpanPipe | typeof ToHtmlBodyTagsPipe | typeof ToPreviewHtmlPipe)[];
22
- export declare const CrocoHtmlDeclarations: (typeof DefinedCustomEditorBlockComponent | 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 MainEditorBlockComponent | typeof CustomWidgetIconComponent | typeof VisualEditorComponent | typeof ToPreviewPipe | typeof MainEditorComponent | typeof TagToSpanPipe | typeof ToHtmlBodyTagsPipe | typeof ToPreviewHtmlPipe)[];
23
- export declare const MaterialModules: (typeof MatCardModule)[];
19
+ export declare const EditorComponents: (typeof TextEditorComponent | typeof ImageEditorComponent | typeof HtmlRawEditorComponent | typeof CustomWidgetEditorComponent | typeof DefinedCustomEditorBlockComponent | typeof MainEditorBlockComponent | typeof AddFilesBtnComponent | typeof CustomWidgetIconComponent | typeof VisualEditorComponent | typeof MainEditorComponent | typeof FileIdSelectComponent)[];
20
+ export declare const XmlComponents: (typeof HtmlViewComponent | typeof XmlTagTextViewComponent | typeof HtmlRawViewComponent | typeof FileImageTagViewComponent | typeof XmlTagExternalVideoComponent | typeof XmlTagCustomWidgetComponent | typeof DefinedCustomTagViewComponent | typeof XmlTagViewComponent)[];
21
+ export declare const CrocoPipes: (typeof ToPreviewHtmlPipe | typeof ToHtmlBodyTagsPipe | typeof ToPreviewPipe | typeof TagToSpanPipe)[];
22
+ export declare const CrocoHtmlDeclarations: (typeof TextEditorComponent | typeof ImageEditorComponent | typeof HtmlRawEditorComponent | typeof CustomWidgetEditorComponent | typeof DefinedCustomEditorBlockComponent | typeof MainEditorBlockComponent | typeof AddFilesBtnComponent | typeof CustomWidgetIconComponent | typeof VisualEditorComponent | typeof ToPreviewHtmlPipe | typeof ToHtmlBodyTagsPipe | typeof HtmlViewComponent | typeof MainEditorComponent | typeof ToPreviewPipe | typeof FileIdSelectComponent | typeof XmlTagTextViewComponent | typeof HtmlRawViewComponent | typeof FileImageTagViewComponent | typeof XmlTagExternalVideoComponent | typeof XmlTagCustomWidgetComponent | typeof DefinedCustomTagViewComponent | typeof XmlTagViewComponent | typeof UploadFilesBtnComponent | typeof TagToSpanPipe)[];
23
+ export declare const MaterialModules: (typeof MatTabsModule)[];
@@ -1,5 +1,6 @@
1
+ import { BehaviorSubject } from "rxjs";
1
2
  import { HtmlBodyTag } from "./models";
2
- export interface ISingleTagStorage {
3
- set(tag: HtmlBodyTag): void;
4
- get(): HtmlBodyTag;
3
+ export declare class TagEditorService {
4
+ readonly tag$: BehaviorSubject<HtmlBodyTag>;
5
+ readonly presentOrEdit$: BehaviorSubject<boolean>;
5
6
  }
@@ -41,8 +41,7 @@ export interface ICustomTagViewRender {
41
41
  /**
42
42
  * Компонент для визуального редактора croco-html-custom-widget-editor
43
43
  * Должен содержать инпуты
44
- * tagEditor: ISingleTagVisualEditor
45
- * presentOrEdit: boolean
44
+ * tagService: TagEditorService
46
45
  */
47
46
  editorComponent?: Type<any>;
48
47
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "croco-html",
3
- "version": "4.5.4",
3
+ "version": "4.5.5",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^19.2.14",
6
6
  "@angular/core": "^19.2.14",