croco-html 4.10.1 → 4.10.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.
@@ -2,7 +2,8 @@ import { HtmlPageDataController } from '../../services';
2
2
  import * as i0 from "@angular/core";
3
3
  export declare class HtmlViewComponent {
4
4
  html: string;
5
+ isEditor: boolean;
5
6
  dataController: HtmlPageDataController;
6
7
  static ɵfac: i0.ɵɵFactoryDeclaration<HtmlViewComponent, never>;
7
- static ɵcmp: i0.ɵɵComponentDeclaration<HtmlViewComponent, "croco-html-view", never, { "html": { "alias": "html"; "required": true; }; "dataController": { "alias": "dataController"; "required": false; }; }, {}, never, never, true, never>;
8
+ static ɵcmp: i0.ɵɵComponentDeclaration<HtmlViewComponent, "croco-html-view", never, { "html": { "alias": "html"; "required": true; }; "isEditor": { "alias": "isEditor"; "required": false; }; "dataController": { "alias": "dataController"; "required": false; }; }, {}, never, never, true, never>;
8
9
  }
@@ -8,6 +8,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
+ isEditor: boolean;
11
12
  imageSrc: string;
12
13
  imageData: FileImageTagData | null;
13
14
  requests: IImageMediaRequest[];
@@ -20,5 +21,5 @@ export declare class FileImageTagViewComponent implements OnInit, OnDestroy {
20
21
  ngOnDestroy(): void;
21
22
  onImageClick(): void;
22
23
  static ɵfac: i0.ɵɵFactoryDeclaration<FileImageTagViewComponent, never>;
23
- static ɵcmp: i0.ɵɵComponentDeclaration<FileImageTagViewComponent, "croco-html-file-image-tag-view", never, { "item": { "alias": "item"; "required": false; }; }, {}, never, never, true, never>;
24
+ static ɵcmp: i0.ɵɵComponentDeclaration<FileImageTagViewComponent, "croco-html-file-image-tag-view", never, { "item": { "alias": "item"; "required": false; }; "isEditor": { "alias": "isEditor"; "required": true; }; }, {}, never, never, true, never>;
24
25
  }
@@ -1,12 +1,15 @@
1
1
  import { OnChanges, SimpleChanges } from '@angular/core';
2
2
  import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
3
+ import { Router } from "@angular/router";
3
4
  import * as i0 from "@angular/core";
4
5
  export declare class HtmlRawViewComponent implements OnChanges {
5
6
  private readonly _sanitizer;
7
+ private readonly router;
6
8
  rawHtml: string;
7
9
  safeHtml: SafeHtml;
8
- constructor(_sanitizer: DomSanitizer);
10
+ constructor(_sanitizer: DomSanitizer, router: Router);
9
11
  ngOnChanges(changes: SimpleChanges): void;
12
+ handleLink(event: MouseEvent): void;
10
13
  static ɵfac: i0.ɵɵFactoryDeclaration<HtmlRawViewComponent, never>;
11
14
  static ɵcmp: i0.ɵɵComponentDeclaration<HtmlRawViewComponent, "croco-html-raw-view", never, { "rawHtml": { "alias": "rawHtml"; "required": false; }; }, {}, never, never, true, never>;
12
15
  }
@@ -6,9 +6,10 @@ export declare class XmlTagViewComponent {
6
6
  private readonly _options;
7
7
  data: InterfaceBlock[];
8
8
  dataController: HtmlPageDataController;
9
+ isEditor: boolean;
9
10
  constructor(_options: CrocoHtmlOptions);
10
11
  isHeaderTextTag(item: InterfaceBlock): boolean;
11
12
  isDefinedCustomTag(item: InterfaceBlock): boolean;
12
13
  static ɵfac: i0.ɵɵFactoryDeclaration<XmlTagViewComponent, never>;
13
- static ɵcmp: i0.ɵɵComponentDeclaration<XmlTagViewComponent, "croco-html-xml-tag-view", never, { "data": { "alias": "data"; "required": true; }; "dataController": { "alias": "dataController"; "required": true; }; }, {}, never, never, true, never>;
14
+ static ɵcmp: i0.ɵɵComponentDeclaration<XmlTagViewComponent, "croco-html-xml-tag-view", never, { "data": { "alias": "data"; "required": true; }; "dataController": { "alias": "dataController"; "required": true; }; "isEditor": { "alias": "isEditor"; "required": true; }; }, {}, never, never, true, never>;
14
15
  }
package/lib/index.d.ts CHANGED
@@ -11,13 +11,13 @@ import { VisualEditorComponent } from './components';
11
11
  import { AddFilesBtnComponent } from './components';
12
12
  import { XmlTagExternalVideoComponent } from "./components";
13
13
  import { HtmlRawEditorComponent } from "./components";
14
- import { MatTabsModule } from '@angular/material/tabs';
14
+ import { MatCardModule } from '@angular/material/card';
15
15
  import { TagToSpanPipe, ToHtmlBodyTagsPipe, ToPreviewHtmlPipe, ToPreviewPipe } from "./pipes";
16
16
  import { FileImageTagViewComponent, AudioPlayerTagViewComponent, UploadFilesBtnComponent } from "./components";
17
17
  import { HtmlRawViewComponent } from "./components";
18
18
  import { XmlTagCustomWidgetComponent } from "./components";
19
- export declare const EditorComponents: (typeof FileIdSelectComponent | typeof ImageEditorComponent | typeof TextEditorComponent | typeof HtmlRawEditorComponent | typeof CustomWidgetEditorComponent | typeof DefinedCustomEditorBlockComponent | typeof MainEditorBlockComponent | typeof AddFilesBtnComponent | 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 AudioPlayerTagViewComponent | 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 FileIdSelectComponent | typeof ImageEditorComponent | typeof TextEditorComponent | typeof HtmlRawEditorComponent | typeof CustomWidgetEditorComponent | typeof DefinedCustomEditorBlockComponent | typeof MainEditorBlockComponent | typeof AddFilesBtnComponent | typeof CustomWidgetIconComponent | typeof UploadFilesBtnComponent | typeof VisualEditorComponent | typeof MainEditorComponent | typeof AudioPlayerTagViewComponent | typeof XmlTagExternalVideoComponent | typeof XmlTagHeaderInnerTextViewComponent | typeof XmlTagHtmlViewComponent | typeof FileImageTagViewComponent | typeof HtmlRawViewComponent | typeof XmlTagCustomWidgetComponent | typeof DefinedCustomTagViewComponent | typeof XmlTagViewComponent | typeof ToPreviewPipe | typeof TagToSpanPipe | typeof ToHtmlBodyTagsPipe | typeof ToPreviewHtmlPipe)[];
23
- export declare const MaterialModules: (typeof MatTabsModule)[];
22
+ export declare const CrocoHtmlDeclarations: (typeof UploadFilesBtnComponent | typeof AddFilesBtnComponent | typeof AudioPlayerTagViewComponent | 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
+ export declare const MaterialModules: (typeof MatCardModule)[];
@@ -73,6 +73,21 @@ export interface CrocoHtmlImageOptions {
73
73
  * @param imageData - данные изображения
74
74
  */
75
75
  onImageClick?: (imageData: FileImageTagData) => void;
76
+ /**
77
+ * Опции для визуального редактора изображений.
78
+ */
79
+ visualEditorOptions?: {
80
+ /**
81
+ * Максимальная высота изображения в режиме редактора в пикселях (например, 200).
82
+ * Если указано, изображения в ImageEditorComponent не будут превышать эту высоту.
83
+ */
84
+ editorModeImageMaxHeight?: number;
85
+ /**
86
+ * Максимальная высота изображения в режиме предпросмотра в пикселях (например, 200).
87
+ * Если указано, изображения в FileImageTagViewComponent не будут превышать эту высоту.
88
+ */
89
+ previewModeImageMaxHeight?: number;
90
+ };
76
91
  }
77
92
  /**
78
93
  * Опции для работы с файлами в редакторе разметки
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "croco-html",
3
- "version": "4.10.1",
3
+ "version": "4.10.3",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^19.2.14",
6
6
  "@angular/core": "^19.2.14",