croco-html 20.2.2 → 20.3.0

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/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Type, EventEmitter, OnInit, OnDestroy, ElementRef, OnChanges, SimpleChanges, AfterViewInit, ChangeDetectorRef, AfterContentChecked, ViewContainerRef, ComponentRef, PipeTransform } from '@angular/core';
2
+ import { Type, EventEmitter, OnInit, OnDestroy, ElementRef, AfterViewInit, ChangeDetectorRef, AfterContentChecked, SimpleChanges, ViewContainerRef, ComponentRef, OnChanges, PipeTransform } from '@angular/core';
3
3
  import { HttpClient, HttpEvent } from '@angular/common/http';
4
4
  import * as rxjs from 'rxjs';
5
5
  import { Observable, BehaviorSubject, Subject } from 'rxjs';
@@ -375,6 +375,11 @@ interface CrocoHtmlOptions {
375
375
  * Кастомные кнопки для добавления тега
376
376
  */
377
377
  editorCustomAddTagButtons?: TagItem[] | null | undefined;
378
+ /**
379
+ * Функция обратного вызова когда теги в редакторе перерасчитаны.
380
+ * @returns
381
+ */
382
+ onBodyTagsRecalculated?: (data: HtmlBodyTag[]) => void;
378
383
  }
379
384
  interface ITagEditorViewRender {
380
385
  /**
@@ -833,17 +838,19 @@ declare class ExternalVideoEditorComponent implements OnInit {
833
838
  static ɵcmp: i0.ɵɵComponentDeclaration<ExternalVideoEditorComponent, "croco-html-external-video-editor", never, { "tag": { "alias": "tag"; "required": true; }; "presentOrEdit": { "alias": "presentOrEdit"; "required": true; }; }, {}, never, never, true, never>;
834
839
  }
835
840
 
836
- declare class HtmlRawEditorComponent implements OnChanges {
837
- private readonly _sanitizer;
841
+ declare class HtmlRawEditorComponent {
838
842
  private readonly _cdr;
839
- tag: HtmlBodyTag;
843
+ private readonly _destroyRef;
844
+ private readonly _sanitizer;
845
+ _data: HtmlBodyTag;
846
+ _tagService: TagEditorService;
840
847
  presentOrEdit: boolean;
841
- safeHtml: SafeHtml;
842
- constructor(_sanitizer: DomSanitizer);
843
- ngOnChanges(changes: SimpleChanges): void;
844
- onSafeHtmlChange(): void;
848
+ safeHtml: SafeHtml | null;
849
+ _tag: HtmlBodyTag;
850
+ set tagService(data: TagEditorService);
851
+ onHtmlChanged(): void;
845
852
  static ɵfac: i0.ɵɵFactoryDeclaration<HtmlRawEditorComponent, never>;
846
- static ɵcmp: i0.ɵɵComponentDeclaration<HtmlRawEditorComponent, "croco-html-html-raw-editor", never, { "tag": { "alias": "tag"; "required": true; }; "presentOrEdit": { "alias": "presentOrEdit"; "required": true; }; }, {}, never, never, true, never>;
853
+ static ɵcmp: i0.ɵɵComponentDeclaration<HtmlRawEditorComponent, "croco-html-html-raw-editor", never, { "tagService": { "alias": "tagService"; "required": true; }; }, {}, never, never, true, never>;
847
854
  }
848
855
 
849
856
  declare class ScreenWidthService {
@@ -1007,7 +1014,8 @@ declare class MainEditorBlockComponent implements OnDestroy {
1007
1014
 
1008
1015
  declare class DefinedCustomEditorBlockComponent implements OnInit, OnDestroy {
1009
1016
  private readonly _options;
1010
- private unsubscribe;
1017
+ private readonly _cdr;
1018
+ private readonly _destroyRef;
1011
1019
  viewContainerRef: ViewContainerRef;
1012
1020
  useDynamicComponent: boolean;
1013
1021
  dynamicContainerRef: ComponentRef<any>;
@@ -1015,7 +1023,6 @@ declare class DefinedCustomEditorBlockComponent implements OnInit, OnDestroy {
1015
1023
  _tag: HtmlBodyTag;
1016
1024
  set tagService(data: TagEditorService);
1017
1025
  constructor(_options: CrocoHtmlOptions);
1018
- getCustomComponent(): i0.Type<any>;
1019
1026
  ngOnInit(): void;
1020
1027
  ngOnDestroy(): void;
1021
1028
  static ɵfac: i0.ɵɵFactoryDeclaration<DefinedCustomEditorBlockComponent, never>;
@@ -1064,6 +1071,22 @@ declare class CustomWidgetIconComponent implements OnInit {
1064
1071
  static ɵcmp: i0.ɵɵComponentDeclaration<CustomWidgetIconComponent, "croco-html-custom-widget-icon", never, { "tagName": { "alias": "tagName"; "required": true; }; }, {}, never, never, true, never>;
1065
1072
  }
1066
1073
 
1074
+ declare class LinkEditorComponent {
1075
+ private readonly _destroyRef;
1076
+ private readonly _cdr;
1077
+ linkData: LinkTagData;
1078
+ isValid: boolean;
1079
+ errorMessage: string;
1080
+ _data: HtmlBodyTag;
1081
+ _tagService: TagEditorService;
1082
+ presentOrEdit: boolean;
1083
+ set tagService(data: TagEditorService);
1084
+ validate(): void;
1085
+ saveTag(): void;
1086
+ static ɵfac: i0.ɵɵFactoryDeclaration<LinkEditorComponent, never>;
1087
+ static ɵcmp: i0.ɵɵComponentDeclaration<LinkEditorComponent, "croco-html-file-link-editor", never, { "tagService": { "alias": "tagService"; "required": true; }; }, {}, never, never, true, never>;
1088
+ }
1089
+
1067
1090
  interface SearchQuestionsFormData {
1068
1091
  q: string;
1069
1092
  }
@@ -1220,11 +1243,13 @@ declare class HtmlRawViewComponent {
1220
1243
  private readonly router;
1221
1244
  private readonly _cdr;
1222
1245
  set data(item: InterfaceBlock);
1246
+ _dataController: HtmlPageDataController;
1247
+ set dataController(controller: HtmlPageDataController);
1223
1248
  safeHtml: SafeHtml | null;
1224
1249
  constructor(_sanitizer: DomSanitizer, router: Router);
1225
1250
  handleLink(event: MouseEvent): void;
1226
1251
  static ɵfac: i0.ɵɵFactoryDeclaration<HtmlRawViewComponent, never>;
1227
- static ɵcmp: i0.ɵɵComponentDeclaration<HtmlRawViewComponent, "croco-html-raw-view", never, { "data": { "alias": "data"; "required": true; }; }, {}, never, never, true, never>;
1252
+ static ɵcmp: i0.ɵɵComponentDeclaration<HtmlRawViewComponent, "croco-html-raw-view", never, { "data": { "alias": "data"; "required": true; }; "dataController": { "alias": "dataController"; "required": true; }; }, {}, never, never, true, never>;
1228
1253
  }
1229
1254
 
1230
1255
  declare class FileImageTagViewComponent implements OnInit, OnDestroy {
@@ -1381,5 +1406,5 @@ declare class CrocoHtmlModule {
1381
1406
 
1382
1407
  declare const CrocoHtmlOptionsToken = "croco-html-options";
1383
1408
 
1384
- export { AddFilesBtnComponent, AngularMaterialTableMethods, AudioEditorComponent, AudioMethods, AudioPlayerTagViewComponent, BodyTagsExtensions, BootstrapTableMethods, ButtonTagDataConsts, ButtonTagService, CrocoHtmlFileOptionsService, CrocoHtmlModule, CrocoHtmlOptionsToken, CustomWidgetEditorComponent, CustomWidgetIconComponent, CustomWidgetTagDataConsts, CustomWidgetTagService, DefinedCustomEditorBlockComponent, DefinedCustomTagViewComponent, DownloadButtonTagDataConsts, DownloadButtonTagService, ExternalVideoEditorComponent, ExternalVideoPlayers, ExternalVideoSupportedTypes, ExternalVideoTagDataConsts, ExternalVideoTagService, FileAudioTagDataConsts, FileIdSelectComponent, FileImageTagDataConsts, FileImageTagService, FileImageTagViewComponent, FileType, HtmlPageDataController, HtmlRawEditorComponent, HtmlRawTagDataConsts, HtmlRawTagService, HtmlRawViewComponent, HtmlViewComponent, HtmlViewController, ImageEditorComponent, ImageMethods, LinkTagAttrs, LinkTagConsts, LinkTagService, MainEditorBlockComponent, MainEditorComponent, TableBuilder, TableMethods, TableTypes, TagEditorService, TagToSpanPipe, TextAlignment, TextEditorComponent, TextSimpleMethods, TextTag, TextTagDataConsts, TextTagHtmlMarkupTagService, TextTags, ToHtmlBodyTagsPipe, ToPreviewHtmlPipe, ToPreviewPipe, UploadFilesBtnComponent, VisualEditorComponent, XmlExtensions, XmlTagCustomWidgetComponent, XmlTagExternalVideoComponent, XmlTagHeaderInnerTextViewComponent, XmlTagHeaderTextViewComponent, XmlTagHtmlViewComponent, XmlTagTextViewComponent, XmlTagViewComponent };
1409
+ export { AddFilesBtnComponent, AngularMaterialTableMethods, AudioEditorComponent, AudioMethods, AudioPlayerTagViewComponent, BodyTagsExtensions, BootstrapTableMethods, ButtonTagDataConsts, ButtonTagService, CrocoHtmlFileOptionsService, CrocoHtmlModule, CrocoHtmlOptionsToken, CustomWidgetEditorComponent, CustomWidgetIconComponent, CustomWidgetTagDataConsts, CustomWidgetTagService, DefinedCustomEditorBlockComponent, DefinedCustomTagViewComponent, DownloadButtonTagDataConsts, DownloadButtonTagService, ExternalVideoEditorComponent, ExternalVideoPlayers, ExternalVideoSupportedTypes, ExternalVideoTagDataConsts, ExternalVideoTagService, FileAudioTagDataConsts, FileIdSelectComponent, FileImageTagDataConsts, FileImageTagService, FileImageTagViewComponent, FileType, HtmlPageDataController, HtmlRawEditorComponent, HtmlRawTagDataConsts, HtmlRawTagService, HtmlRawViewComponent, HtmlViewComponent, HtmlViewController, ImageEditorComponent, ImageMethods, LinkEditorComponent, LinkTagAttrs, LinkTagConsts, LinkTagService, MainEditorBlockComponent, MainEditorComponent, TableBuilder, TableMethods, TableTypes, TagEditorService, TagToSpanPipe, TextAlignment, TextEditorComponent, TextSimpleMethods, TextTag, TextTagDataConsts, TextTagHtmlMarkupTagService, TextTags, ToHtmlBodyTagsPipe, ToPreviewHtmlPipe, ToPreviewPipe, UploadFilesBtnComponent, VisualEditorComponent, XmlExtensions, XmlTagCustomWidgetComponent, XmlTagExternalVideoComponent, XmlTagHeaderInnerTextViewComponent, XmlTagHeaderTextViewComponent, XmlTagHtmlViewComponent, XmlTagTextViewComponent, XmlTagViewComponent };
1385
1410
  export type { AngularMaterialTableData, BaseApiResponse, ButtonTag, ButtonTagData, CommonFileInfoResultModel, CrocoHtmlEditorFileOptions, CrocoHtmlImageOptions, CrocoHtmlOptions, CustomWidgetTag, CustomWidgetTagData, DownloadButtonTag, DownloadButtonTagData, ExternalVideoTag, ExternalVideoTagData, FileAudioTag, FileAudioTagData, FileImageTag, FileImageTagData, FileInfoModel, FilePostingStarted, FileRelationModel, FileSimpleModel, FileUnifiedModel, GenericTextTag, GetListResult, GetListSearchModel, HtmlBodyTag, HtmlRawTag, HtmlRawTagData, IHorizontalAlignmentExtractionResult, IImageMediaRequest, IMarkUpTagService, ITagEditorViewRender, ITagViewViewRender, IVisualEditorProps, ImageRestrictions, InterfaceBlock, LinkTagData, SearchFilesRequest, SearchQuestionsFormData, SimpleTextTagData, TableData, TableHeaderData, TableRowColumnData, TableRowData, TableTagData, TagItem };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "croco-html",
3
- "version": "20.2.2",
3
+ "version": "20.3.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^20.3.15",
6
6
  "@angular/core": "^20.3.15",