croco-html 2.26.0 → 2.28.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.
Files changed (31) hide show
  1. package/esm2022/lib/components/editor/image-editor/image-editor.component.mjs +19 -2
  2. package/esm2022/lib/components/editor/main-editor/main-editor.component.mjs +2 -1
  3. package/esm2022/lib/components/editor/visual-editor/visual-editor.component.mjs +1 -1
  4. package/esm2022/lib/components/file-id-select/file-id-select.component.mjs +1 -1
  5. package/esm2022/lib/components/xml-tags/file-image-tag-view/file-image-tag-view.component.mjs +18 -6
  6. package/esm2022/lib/extensions/BodyTagsExtensions.mjs +1 -1
  7. package/esm2022/lib/extensions/HtmlExtractionMethods.mjs +1 -1
  8. package/esm2022/lib/extensions/ImageMethods.mjs +1 -1
  9. package/esm2022/lib/extensions/TableMethods.mjs +1 -1
  10. package/esm2022/lib/options/index.mjs +2 -0
  11. package/esm2022/lib/pipes/ToHtmlBodyTagsPipe.mjs +1 -1
  12. package/esm2022/lib/pipes/ToPreviewHtmlPipe.mjs +1 -1
  13. package/esm2022/lib/pipes/to-preview.pipe.mjs +1 -1
  14. package/esm2022/public-api.mjs +2 -1
  15. package/fesm2022/croco-html.mjs +36 -7
  16. package/fesm2022/croco-html.mjs.map +1 -1
  17. package/lib/components/editor/image-editor/image-editor.component.d.ts +1 -1
  18. package/lib/components/editor/visual-editor/visual-editor.component.d.ts +1 -1
  19. package/lib/components/file-id-select/file-id-select.component.d.ts +1 -1
  20. package/lib/components/xml-tags/file-image-tag-view/file-image-tag-view.component.d.ts +4 -1
  21. package/lib/extensions/BodyTagsExtensions.d.ts +1 -1
  22. package/lib/extensions/HtmlExtractionMethods.d.ts +1 -3
  23. package/lib/extensions/ImageMethods.d.ts +1 -1
  24. package/lib/extensions/TableMethods.d.ts +1 -1
  25. package/lib/index.d.ts +8 -8
  26. package/lib/options/index.d.ts +5 -0
  27. package/lib/pipes/ToHtmlBodyTagsPipe.d.ts +1 -1
  28. package/lib/pipes/ToPreviewHtmlPipe.d.ts +1 -1
  29. package/lib/pipes/to-preview.pipe.d.ts +1 -1
  30. package/package.json +1 -1
  31. package/public-api.d.ts +1 -0
@@ -1,8 +1,8 @@
1
1
  import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
2
2
  import { IMediaRequest } from '../../../extensions';
3
3
  import { HtmlBodyTag } from '../../../models/models';
4
- import { CrocoHtmlOptions } from '../../../extensions/HtmlExtractionMethods';
5
4
  import { ScreenWidthService } from "../../../services/screen-width.service";
5
+ import { CrocoHtmlOptions } from '../../../options';
6
6
  import * as i0 from "@angular/core";
7
7
  export declare class ImageEditorComponent implements OnInit, OnDestroy {
8
8
  private readonly _options;
@@ -4,7 +4,7 @@ import { ExternalVideoTagDataConsts } from '../../../extensions';
4
4
  import { TagItem, HtmlBodyTag } from '../../../models/models';
5
5
  import { FilePostingStarted } from '../../upload-files-btn/upload-files-btn.component';
6
6
  import { EAlignments } from "./DefaultAligments";
7
- import { CrocoHtmlOptions } from '../../../extensions/HtmlExtractionMethods';
7
+ import { CrocoHtmlOptions } from '../../../options';
8
8
  import * as i0 from "@angular/core";
9
9
  export declare const defaultLinkYouTube = "https://www.youtube.com/embed/4CtSAnJDfsI?si=scyBNJa0Hs2t5aLE";
10
10
  export declare const defaultLinkVk = "https://vk.com/video_ext.php?oid=-22822305&id=456241864&hd=2";
@@ -1,6 +1,6 @@
1
1
  import { EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
2
2
  import { FileNameAndIdModel, FilesQueryService } from '../../services/files-query.service';
3
- import { CrocoHtmlOptions } from '../../extensions/HtmlExtractionMethods';
3
+ import { CrocoHtmlOptions } from '../../options';
4
4
  import * as i0 from "@angular/core";
5
5
  export interface SearchQuestionsFormData {
6
6
  q: string;
@@ -2,15 +2,18 @@ import { OnDestroy, OnInit } from '@angular/core';
2
2
  import { InterfaceBlock } from '../../../extensions/InterfaceBlock';
3
3
  import { IMediaRequest } from '../../../extensions';
4
4
  import { ScreenWidthService } from "../../../services/screen-width.service";
5
+ import { CrocoHtmlOptions } from '../../../options';
5
6
  import * as i0 from "@angular/core";
6
7
  export declare class FileImageTagViewComponent implements OnInit, OnDestroy {
7
8
  private readonly screenWidthService;
9
+ private readonly _options;
8
10
  set item(item: InterfaceBlock);
9
11
  imageSrc: string;
10
12
  requests: IMediaRequest[];
11
13
  private unsubscribe;
12
14
  imageMaxHeight: any;
13
- constructor(screenWidthService: ScreenWidthService);
15
+ constructor(screenWidthService: ScreenWidthService, _options: CrocoHtmlOptions);
16
+ getMediaRequests(screenMediaRequest: string): IMediaRequest[];
14
17
  ngOnInit(): void;
15
18
  ngOnDestroy(): void;
16
19
  static ɵfac: i0.ɵɵFactoryDeclaration<FileImageTagViewComponent, never>;
@@ -1,6 +1,6 @@
1
1
  import { HtmlBodyTag } from "../models/models";
2
- import { CrocoHtmlOptions } from "./HtmlExtractionMethods";
3
2
  import { InterfaceBlock } from "./InterfaceBlock";
3
+ import { CrocoHtmlOptions } from "../options";
4
4
  export declare class BodyTagsExtensions {
5
5
  static getDescription(tagName: string): string;
6
6
  static toHtml(bodyTags: HtmlBodyTag[]): string;
@@ -1,8 +1,6 @@
1
1
  import { InterfaceBlock } from "./InterfaceBlock";
2
2
  import { GenericTextTag } from "./TextSimpleMethods";
3
- export interface CrocoHtmlOptions {
4
- publicImageResizedUrlFormat: string;
5
- }
3
+ import { CrocoHtmlOptions } from "../options";
6
4
  export declare class HtmlExtractionMethods {
7
5
  static ExtractHeaderTag(elem: HTMLElement, tagName: string): GenericTextTag;
8
6
  static Extractors: {
@@ -1,4 +1,4 @@
1
- import { CrocoHtmlOptions } from "./HtmlExtractionMethods";
1
+ import { CrocoHtmlOptions } from "../options";
2
2
  export declare class FileImageTagDataConsts {
3
3
  static TagName: string;
4
4
  static FileIdAttrName: string;
@@ -1,4 +1,4 @@
1
- import { CrocoHtmlOptions } from './HtmlExtractionMethods';
1
+ import { CrocoHtmlOptions } from '../options';
2
2
  import { InterfaceBlock } from "./InterfaceBlock";
3
3
  export interface BaseApiResponse {
4
4
  isSucceeded: boolean;
package/lib/index.d.ts CHANGED
@@ -2,8 +2,7 @@ import { ImageEditorComponent } from "./components";
2
2
  import { MainEditorBlockComponent } from "./components";
3
3
  import { MainEditorComponent } from "./components";
4
4
  import { FileIdSelectComponent } from "./components";
5
- import { XmlTagHeaderInnerTextViewComponent } from "./components";
6
- import { XmlTagHtmlViewComponent } from "./components";
5
+ import { XmlTagHeaderTextViewComponent } from "./components";
7
6
  import { XmlTagRichTextViewComponent } from "./components";
8
7
  import { XmlTagTableViewComponent } from "./components";
9
8
  import { XmlTagViewComponent } from "./components";
@@ -11,12 +10,13 @@ import { VisualEditorComponent } from './components';
11
10
  import { AddFilesBtnComponent } from './components';
12
11
  import { XmlTagExternalVideoComponent } from "./components";
13
12
  import { HtmlRawEditorComponent } from "./components";
14
- import { MatFormFieldModule } from '@angular/material/form-field';
13
+ import { MatTabsModule } from '@angular/material/tabs';
15
14
  import { RichTextToHtmlPipe, TagToSpanPipe, ToHtmlBodyTagsPipe, ToPreviewHtmlPipe, ToPreviewPipe } from "./pipes";
16
15
  import { FileImageTagViewComponent, UploadFilesBtnComponent } from "./components";
17
16
  import { HtmlRawViewComponent } from "./components";
18
- export declare const EditorComponents: (typeof AddFilesBtnComponent | typeof MainEditorBlockComponent | typeof VisualEditorComponent | typeof HtmlRawEditorComponent | typeof FileIdSelectComponent | typeof ImageEditorComponent | typeof MainEditorComponent)[];
19
- export declare const XmlComponents: (typeof XmlTagExternalVideoComponent | typeof XmlTagHeaderInnerTextViewComponent | typeof XmlTagHtmlViewComponent | typeof XmlTagRichTextViewComponent | typeof XmlTagTableViewComponent | typeof FileImageTagViewComponent | typeof HtmlRawViewComponent | typeof XmlTagViewComponent)[];
20
- export declare const CrocoPipes: (typeof RichTextToHtmlPipe | typeof ToPreviewPipe | typeof TagToSpanPipe | typeof ToHtmlBodyTagsPipe | typeof ToPreviewHtmlPipe)[];
21
- export declare const CrocoHtmlDeclarations: (typeof AddFilesBtnComponent | typeof MainEditorBlockComponent | typeof VisualEditorComponent | typeof UploadFilesBtnComponent | typeof XmlTagExternalVideoComponent | typeof XmlTagHeaderInnerTextViewComponent | typeof XmlTagHtmlViewComponent | typeof RichTextToHtmlPipe | typeof XmlTagRichTextViewComponent | typeof XmlTagTableViewComponent | typeof FileImageTagViewComponent | typeof HtmlRawViewComponent | typeof XmlTagViewComponent | typeof HtmlRawEditorComponent | typeof FileIdSelectComponent | typeof ImageEditorComponent | typeof ToPreviewPipe | typeof MainEditorComponent | typeof TagToSpanPipe | typeof ToHtmlBodyTagsPipe | typeof ToPreviewHtmlPipe)[];
22
- export declare const MaterialModules: (typeof MatFormFieldModule)[];
17
+ import { HtmlViewComponent } from "./components";
18
+ export declare const EditorComponents: (typeof AddFilesBtnComponent | typeof MainEditorBlockComponent | typeof VisualEditorComponent | typeof MainEditorComponent | typeof FileIdSelectComponent | typeof ImageEditorComponent | typeof HtmlRawEditorComponent)[];
19
+ export declare const XmlComponents: (typeof XmlTagViewComponent | typeof HtmlViewComponent | typeof XmlTagExternalVideoComponent | typeof FileImageTagViewComponent | typeof HtmlRawViewComponent | typeof XmlTagHeaderTextViewComponent | typeof XmlTagRichTextViewComponent | typeof XmlTagTableViewComponent)[];
20
+ export declare const CrocoPipes: (typeof ToPreviewHtmlPipe | typeof ToHtmlBodyTagsPipe | typeof ToPreviewPipe | typeof RichTextToHtmlPipe | typeof TagToSpanPipe)[];
21
+ export declare const CrocoHtmlDeclarations: (typeof ToPreviewHtmlPipe | typeof ToHtmlBodyTagsPipe | typeof ToPreviewPipe | typeof XmlTagViewComponent | typeof HtmlViewComponent | typeof AddFilesBtnComponent | typeof MainEditorBlockComponent | typeof VisualEditorComponent | typeof MainEditorComponent | typeof FileIdSelectComponent | typeof XmlTagExternalVideoComponent | typeof ImageEditorComponent | typeof HtmlRawEditorComponent | typeof FileImageTagViewComponent | typeof HtmlRawViewComponent | typeof XmlTagHeaderTextViewComponent | typeof UploadFilesBtnComponent | typeof RichTextToHtmlPipe | typeof XmlTagRichTextViewComponent | typeof XmlTagTableViewComponent | typeof TagToSpanPipe)[];
22
+ export declare const MaterialModules: (typeof MatTabsModule)[];
@@ -0,0 +1,5 @@
1
+ import { IMediaRequest } from "../extensions";
2
+ export interface CrocoHtmlOptions {
3
+ publicImageResizedUrlFormat: string;
4
+ globalMediaRequests?: IMediaRequest[];
5
+ }
@@ -1,6 +1,6 @@
1
1
  import { PipeTransform } from '@angular/core';
2
2
  import { HtmlBodyTag } from '../models/models';
3
- import { CrocoHtmlOptions } from '../extensions/HtmlExtractionMethods';
3
+ import { CrocoHtmlOptions } from '../options';
4
4
  import * as i0 from "@angular/core";
5
5
  export declare class ToHtmlBodyTagsPipe implements PipeTransform {
6
6
  private readonly _options;
@@ -1,6 +1,6 @@
1
1
  import { PipeTransform } from '@angular/core';
2
- import { CrocoHtmlOptions } from '../extensions/HtmlExtractionMethods';
3
2
  import { InterfaceBlock } from "../extensions/InterfaceBlock";
3
+ import { CrocoHtmlOptions } from '../options';
4
4
  import * as i0 from "@angular/core";
5
5
  export declare class ToPreviewHtmlPipe implements PipeTransform {
6
6
  private readonly _options;
@@ -1,6 +1,6 @@
1
1
  import { PipeTransform } from '@angular/core';
2
- import { CrocoHtmlOptions } from '../extensions/HtmlExtractionMethods';
3
2
  import { InterfaceBlock } from "../extensions/InterfaceBlock";
3
+ import { CrocoHtmlOptions } from '../options';
4
4
  import * as i0 from "@angular/core";
5
5
  export declare class ToPreviewPipe implements PipeTransform {
6
6
  private readonly _options;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "croco-html",
3
- "version": "2.26.0",
3
+ "version": "2.28.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^17.3.4",
6
6
  "@angular/core": "^17.3.4",
package/public-api.d.ts CHANGED
@@ -5,3 +5,4 @@ export * from './lib/croco-html.module';
5
5
  export * from './lib/models/models';
6
6
  export * from './lib/consts';
7
7
  export * from './lib/services';
8
+ export * from './lib/options';