croco-html 2.17.0 → 2.19.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 (44) hide show
  1. package/esm2022/lib/components/editor/button-editor/button-editor.component.mjs +45 -0
  2. package/esm2022/lib/components/editor/download-file-button-editor/download-file-button-editor.component.mjs +42 -0
  3. package/esm2022/lib/components/editor/external-video-editor/external-video-editor.component.mjs +55 -0
  4. package/esm2022/lib/components/editor/{external-video-block → external-video-editor}/vk-video-player/vk-video-player.component.mjs +1 -1
  5. package/esm2022/lib/components/editor/external-video-editor/youtube-video-player/youtube-video-player.component.mjs +20 -0
  6. package/esm2022/lib/components/editor/image-editor/image-editor.component.mjs +12 -10
  7. package/esm2022/lib/components/editor/index.mjs +2 -2
  8. package/esm2022/lib/components/editor/main-editor-block/main-editor-block.component.mjs +9 -7
  9. package/esm2022/lib/components/editor/visual-editor/DefaultTags.mjs +3 -1
  10. package/esm2022/lib/components/editor/visual-editor/visual-editor.component.mjs +7 -1
  11. package/esm2022/lib/components/xml-tags/file-image-tag-view/file-image-tag-view.component.mjs +30 -8
  12. package/esm2022/lib/components/xml-tags/xml-tag-custom-button/xml-tag-button.component.mjs +39 -0
  13. package/esm2022/lib/components/xml-tags/xml-tag-download-file-button/xml-tag-download-file-button.component.mjs +2 -2
  14. package/esm2022/lib/components/xml-tags/xml-tag-external-video/xml-tag-external-video.component.mjs +3 -3
  15. package/esm2022/lib/components/xml-tags/xml-tag-view/xml-tag-view.component.mjs +7 -3
  16. package/esm2022/lib/croco-html.module.mjs +7 -7
  17. package/esm2022/lib/extensions/BodyTagsExtensions.mjs +16 -9
  18. package/esm2022/lib/extensions/ButtonMethods.mjs +19 -0
  19. package/esm2022/lib/extensions/HtmlExtractionMethods.mjs +3 -1
  20. package/esm2022/lib/extensions/ImageMethods.mjs +12 -11
  21. package/esm2022/lib/extensions/TextSimpleMethods.mjs +4 -1
  22. package/esm2022/lib/index.mjs +19 -19
  23. package/esm2022/lib/models/models.mjs +1 -1
  24. package/fesm2022/croco-html.mjs +219 -89
  25. package/fesm2022/croco-html.mjs.map +1 -1
  26. package/lib/components/editor/button-editor/button-editor.component.d.ts +13 -0
  27. package/lib/components/editor/{download-file-button-block/download-file-button-block.component.d.ts → download-file-button-editor/download-file-button-editor.component.d.ts} +3 -3
  28. package/lib/components/editor/{external-video-block/external-video-block.component.d.ts → external-video-editor/external-video-editor.component.d.ts} +3 -3
  29. package/lib/components/editor/image-editor/image-editor.component.d.ts +2 -1
  30. package/lib/components/editor/index.d.ts +1 -1
  31. package/lib/components/xml-tags/file-image-tag-view/file-image-tag-view.component.d.ts +11 -3
  32. package/lib/components/xml-tags/xml-tag-custom-button/xml-tag-button.component.d.ts +10 -0
  33. package/lib/croco-html.module.d.ts +4 -4
  34. package/lib/extensions/ButtonMethods.d.ts +18 -0
  35. package/lib/extensions/HtmlExtractionMethods.d.ts +1 -1
  36. package/lib/extensions/ImageMethods.d.ts +5 -3
  37. package/lib/extensions/TextSimpleMethods.d.ts +3 -0
  38. package/lib/index.d.ts +20 -20
  39. package/package.json +1 -1
  40. package/esm2022/lib/components/editor/download-file-button-block/download-file-button-block.component.mjs +0 -42
  41. package/esm2022/lib/components/editor/external-video-block/external-video-block.component.mjs +0 -55
  42. package/esm2022/lib/components/editor/external-video-block/youtube-video-player/youtube-video-player.component.mjs +0 -20
  43. /package/lib/components/editor/{external-video-block → external-video-editor}/vk-video-player/vk-video-player.component.d.ts +0 -0
  44. /package/lib/components/editor/{external-video-block → external-video-editor}/youtube-video-player/youtube-video-player.component.d.ts +0 -0
@@ -0,0 +1,13 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import { HtmlBodyTag } from "../../../models/models";
3
+ import { ButtonTagData } from "../../../extensions/ButtonMethods";
4
+ import * as i0 from "@angular/core";
5
+ export declare class ButtonEditorComponent {
6
+ tag: HtmlBodyTag;
7
+ onTagUpdated: EventEmitter<HtmlBodyTag>;
8
+ tagData: ButtonTagData;
9
+ ngOnInit(): void;
10
+ linkChanged(): void;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<ButtonEditorComponent, never>;
12
+ static ɵcmp: i0.ɵɵComponentDeclaration<ButtonEditorComponent, "croco-html-button-editor", never, { "tag": { "alias": "tag"; "required": false; }; }, { "onTagUpdated": "onTagUpdated"; }, never, never, true, never>;
13
+ }
@@ -2,12 +2,12 @@ import { EventEmitter } from '@angular/core';
2
2
  import { HtmlBodyTag } from "../../../models/models";
3
3
  import { DownloadButtonTagData } from "../../../extensions/DownloadButtonMethods";
4
4
  import * as i0 from "@angular/core";
5
- export declare class DownloadFileButtonBlockComponent {
5
+ export declare class DownloadFileButtonEditorComponent {
6
6
  tag: HtmlBodyTag;
7
7
  onTagUpdated: EventEmitter<HtmlBodyTag>;
8
8
  tagData: DownloadButtonTagData;
9
9
  ngOnInit(): void;
10
10
  linkChanged(): void;
11
- static ɵfac: i0.ɵɵFactoryDeclaration<DownloadFileButtonBlockComponent, never>;
12
- static ɵcmp: i0.ɵɵComponentDeclaration<DownloadFileButtonBlockComponent, "croco-html-download-file-button-block", never, { "tag": { "alias": "tag"; "required": false; }; }, { "onTagUpdated": "onTagUpdated"; }, never, never, true, never>;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<DownloadFileButtonEditorComponent, never>;
12
+ static ɵcmp: i0.ɵɵComponentDeclaration<DownloadFileButtonEditorComponent, "croco-html-download-file-button-editor", never, { "tag": { "alias": "tag"; "required": false; }; }, { "onTagUpdated": "onTagUpdated"; }, never, never, true, never>;
13
13
  }
@@ -2,7 +2,7 @@ import { EventEmitter, OnInit } from '@angular/core';
2
2
  import { ExternalVideoTagData, ExternalVideoSupportedTypes } from '../../../extensions';
3
3
  import { HtmlBodyTag } from '../../../models/models';
4
4
  import * as i0 from "@angular/core";
5
- export declare class ExternalVideoBlockComponent implements OnInit {
5
+ export declare class ExternalVideoEditorComponent implements OnInit {
6
6
  tag: HtmlBodyTag;
7
7
  onTagUpdated: EventEmitter<HtmlBodyTag>;
8
8
  protected readonly ExternalVideoSupportedTypes: typeof ExternalVideoSupportedTypes;
@@ -11,6 +11,6 @@ export declare class ExternalVideoBlockComponent implements OnInit {
11
11
  ngOnInit(): void;
12
12
  linkChanged(): void;
13
13
  createLinkByIFrame(): void;
14
- static ɵfac: i0.ɵɵFactoryDeclaration<ExternalVideoBlockComponent, never>;
15
- static ɵcmp: i0.ɵɵComponentDeclaration<ExternalVideoBlockComponent, "croco-html-external-video-block", never, { "tag": { "alias": "tag"; "required": false; }; }, { "onTagUpdated": "onTagUpdated"; }, never, never, true, never>;
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<ExternalVideoEditorComponent, never>;
15
+ static ɵcmp: i0.ɵɵComponentDeclaration<ExternalVideoEditorComponent, "croco-html-external-video-editor", never, { "tag": { "alias": "tag"; "required": false; }; }, { "onTagUpdated": "onTagUpdated"; }, never, never, true, never>;
16
16
  }
@@ -6,6 +6,7 @@ import { ScreenWidthService } from "../../../services/screen-width.service";
6
6
  import * as i0 from "@angular/core";
7
7
  export declare class ImageEditorComponent implements OnInit, OnDestroy {
8
8
  private readonly _options;
9
+ private readonly screenWidthService;
9
10
  hasImageError: boolean;
10
11
  searchOrEdit: string;
11
12
  requests: IMediaRequest[];
@@ -15,7 +16,7 @@ export declare class ImageEditorComponent implements OnInit, OnDestroy {
15
16
  tag: HtmlBodyTag;
16
17
  onErrorHandler(): void;
17
18
  onTagUpdated: EventEmitter<HtmlBodyTag>;
18
- constructor(_options: CrocoHtmlOptions, screenWidth: ScreenWidthService);
19
+ constructor(_options: CrocoHtmlOptions, screenWidthService: ScreenWidthService);
19
20
  getSrc(): string;
20
21
  hasFileId(): boolean;
21
22
  onFileIdChanged(fileId: number): void;
@@ -1,4 +1,4 @@
1
- export * from './external-video-block/external-video-block.component';
1
+ export * from './external-video-editor/external-video-editor.component';
2
2
  export * from './html-raw-editor/html-raw-editor.component';
3
3
  export * from './image-editor/image-editor.component';
4
4
  export * from './main-editor/main-editor.component';
@@ -1,10 +1,18 @@
1
- import { OnInit } from '@angular/core';
1
+ import { OnDestroy, OnInit } from '@angular/core';
2
2
  import { InterfaceBlock } from '../../../extensions/InterfaceBlock';
3
+ import { IMediaRequest } from '../../../extensions';
4
+ import { ScreenWidthService } from "../../../services/screen-width.service";
3
5
  import * as i0 from "@angular/core";
4
- export declare class FileImageTagViewComponent implements OnInit {
5
- item: InterfaceBlock;
6
+ export declare class FileImageTagViewComponent implements OnInit, OnDestroy {
7
+ private readonly screenWidthService;
8
+ set item(item: InterfaceBlock);
6
9
  imageSrc: string;
10
+ requests: IMediaRequest[];
11
+ private unsubscribe;
12
+ imageMaxHeight: any;
13
+ constructor(screenWidthService: ScreenWidthService);
7
14
  ngOnInit(): void;
15
+ ngOnDestroy(): void;
8
16
  static ɵfac: i0.ɵɵFactoryDeclaration<FileImageTagViewComponent, never>;
9
17
  static ɵcmp: i0.ɵɵComponentDeclaration<FileImageTagViewComponent, "croco-html-file-image-tag-view", never, { "item": { "alias": "item"; "required": false; }; }, {}, never, never, true, never>;
10
18
  }
@@ -0,0 +1,10 @@
1
+ import { InterfaceBlock } from "../../../extensions/InterfaceBlock";
2
+ import { ButtonTagData } from "../../../extensions/ButtonMethods";
3
+ import * as i0 from "@angular/core";
4
+ export declare class XmlTagButtonComponent {
5
+ set data(value: InterfaceBlock);
6
+ set tagData(value: ButtonTagData);
7
+ _block: ButtonTagData;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<XmlTagButtonComponent, never>;
9
+ static ɵcmp: i0.ɵɵComponentDeclaration<XmlTagButtonComponent, "croco-html-xml-tag-button", never, { "data": { "alias": "data"; "required": false; }; "tagData": { "alias": "tagData"; "required": false; }; }, {}, never, never, true, never>;
10
+ }
@@ -32,9 +32,9 @@ import * as i30 from "@angular/material/icon";
32
32
  import * as i31 from "@angular/cdk/drag-drop";
33
33
  import * as i32 from "@angular/material/button-toggle";
34
34
  import * as i33 from "./components/error-banner/error-banner.component";
35
- import * as i34 from "./components/editor/external-video-block/vk-video-player/vk-video-player.component";
36
- import * as i35 from "./components/editor/external-video-block/youtube-video-player/youtube-video-player.component";
37
- import * as i36 from "./components/editor/download-file-button-block/download-file-button-block.component";
35
+ import * as i34 from "./components/editor/external-video-editor/vk-video-player/vk-video-player.component";
36
+ import * as i35 from "./components/editor/external-video-editor/youtube-video-player/youtube-video-player.component";
37
+ import * as i36 from "./components/editor/download-file-button-editor/download-file-button-editor.component";
38
38
  import * as i37 from "./components/xml-tags/xml-tag-download-file-button/xml-tag-download-file-button.component";
39
39
  import * as i38 from "./components/upload-files-btn/upload-files-btn.component";
40
40
  import * as i39 from "./components/html-view/html-view.component";
@@ -63,6 +63,6 @@ import * as i61 from "./pipes/ToHtmlBodyTagsPipe";
63
63
  import * as i62 from "./pipes/ToPreviewHtmlPipe";
64
64
  export declare class CrocoHtmlModule {
65
65
  static ɵfac: i0.ɵɵFactoryDeclaration<CrocoHtmlModule, never>;
66
- static ɵmod: i0.ɵɵNgModuleDeclaration<CrocoHtmlModule, never, [typeof i1.CommonModule, typeof i2.FormsModule, typeof i2.ReactiveFormsModule, typeof i3.NgSelectModule, typeof i4.MatBadgeModule, typeof i5.MatTableModule, typeof i6.MatExpansionModule, typeof i7.MatFormFieldModule, typeof i8.MatSnackBarModule, typeof i9.MatProgressBarModule, typeof i10.MatProgressSpinnerModule, typeof i11.MatTabsModule, typeof i12.MatMenuModule, typeof i13.MatCardModule, typeof i14.MatSelectModule, typeof i15.MatTooltipModule, typeof i16.MatCheckboxModule, typeof i17.MatChipsModule, typeof i18.MatListModule, typeof i19.MatButtonModule, typeof i20.MatInputModule, typeof i21.MatDialogModule, typeof i22.MatPaginatorModule, typeof i23.MatDatepickerModule, typeof i24.MatGridListModule, typeof i25.MatSlideToggleModule, typeof i26.MatTreeModule, typeof i27.MatNativeDateModule, typeof i28.MatAutocompleteModule, typeof i29.MatSidenavModule, typeof i30.MatIconModule, typeof i31.DragDropModule, typeof i32.MatButtonToggleModule, typeof i33.ErrorBannerComponent, typeof i34.VkVideoPlayerComponent, typeof i35.YoutubeVideoPlayerComponent, typeof i36.DownloadFileButtonBlockComponent, typeof i37.XmlTagDownloadFileButtonComponent, typeof i38.UploadFilesBtnComponent, typeof i39.HtmlViewComponent, typeof i40.XmlTagTableViewComponent, typeof i41.XmlTagViewComponent, typeof i42.XmlTagRichTextViewComponent, typeof i43.XmlTagHtmlViewComponent, typeof i44.XmlTagTextViewComponent, typeof i45.XmlTagHeaderTextViewComponent, typeof i46.XmlTagHeaderInnerTextViewComponent, typeof i47.XmlTagExternalVideoComponent, typeof i48.HtmlRawViewComponent, typeof i49.FileImageTagViewComponent, typeof i39.HtmlViewComponent, typeof i50.MainEditorComponent, typeof i51.FileIdSelectComponent, typeof i52.TextEditorComponent, typeof i53.ImageEditorComponent, typeof i54.MainEditorBlockComponent, typeof i55.VisualEditorComponent, typeof i56.AddFilesBtnComponent, typeof i57.HtmlRawEditorComponent, typeof i58.RichTextToHtmlPipe, typeof i59.TagToSpanPipe, typeof i60.ToPreviewPipe, typeof i61.ToHtmlBodyTagsPipe, typeof i62.ToPreviewHtmlPipe], [typeof i38.UploadFilesBtnComponent, typeof i39.HtmlViewComponent, typeof i40.XmlTagTableViewComponent, typeof i41.XmlTagViewComponent, typeof i42.XmlTagRichTextViewComponent, typeof i43.XmlTagHtmlViewComponent, typeof i44.XmlTagTextViewComponent, typeof i45.XmlTagHeaderTextViewComponent, typeof i46.XmlTagHeaderInnerTextViewComponent, typeof i47.XmlTagExternalVideoComponent, typeof i48.HtmlRawViewComponent, typeof i49.FileImageTagViewComponent, typeof i39.HtmlViewComponent, typeof i50.MainEditorComponent, typeof i51.FileIdSelectComponent, typeof i52.TextEditorComponent, typeof i53.ImageEditorComponent, typeof i54.MainEditorBlockComponent, typeof i55.VisualEditorComponent, typeof i56.AddFilesBtnComponent, typeof i57.HtmlRawEditorComponent, typeof i58.RichTextToHtmlPipe, typeof i59.TagToSpanPipe, typeof i60.ToPreviewPipe, typeof i61.ToHtmlBodyTagsPipe, typeof i62.ToPreviewHtmlPipe]>;
66
+ static ɵmod: i0.ɵɵNgModuleDeclaration<CrocoHtmlModule, never, [typeof i1.CommonModule, typeof i2.FormsModule, typeof i2.ReactiveFormsModule, typeof i3.NgSelectModule, typeof i4.MatBadgeModule, typeof i5.MatTableModule, typeof i6.MatExpansionModule, typeof i7.MatFormFieldModule, typeof i8.MatSnackBarModule, typeof i9.MatProgressBarModule, typeof i10.MatProgressSpinnerModule, typeof i11.MatTabsModule, typeof i12.MatMenuModule, typeof i13.MatCardModule, typeof i14.MatSelectModule, typeof i15.MatTooltipModule, typeof i16.MatCheckboxModule, typeof i17.MatChipsModule, typeof i18.MatListModule, typeof i19.MatButtonModule, typeof i20.MatInputModule, typeof i21.MatDialogModule, typeof i22.MatPaginatorModule, typeof i23.MatDatepickerModule, typeof i24.MatGridListModule, typeof i25.MatSlideToggleModule, typeof i26.MatTreeModule, typeof i27.MatNativeDateModule, typeof i28.MatAutocompleteModule, typeof i29.MatSidenavModule, typeof i30.MatIconModule, typeof i31.DragDropModule, typeof i32.MatButtonToggleModule, typeof i33.ErrorBannerComponent, typeof i34.VkVideoPlayerComponent, typeof i35.YoutubeVideoPlayerComponent, typeof i36.DownloadFileButtonEditorComponent, typeof i37.XmlTagDownloadFileButtonComponent, typeof i38.UploadFilesBtnComponent, typeof i39.HtmlViewComponent, typeof i40.XmlTagTableViewComponent, typeof i41.XmlTagViewComponent, typeof i42.XmlTagRichTextViewComponent, typeof i43.XmlTagHtmlViewComponent, typeof i44.XmlTagTextViewComponent, typeof i45.XmlTagHeaderTextViewComponent, typeof i46.XmlTagHeaderInnerTextViewComponent, typeof i47.XmlTagExternalVideoComponent, typeof i48.HtmlRawViewComponent, typeof i49.FileImageTagViewComponent, typeof i39.HtmlViewComponent, typeof i50.MainEditorComponent, typeof i51.FileIdSelectComponent, typeof i52.TextEditorComponent, typeof i53.ImageEditorComponent, typeof i54.MainEditorBlockComponent, typeof i55.VisualEditorComponent, typeof i56.AddFilesBtnComponent, typeof i57.HtmlRawEditorComponent, typeof i58.RichTextToHtmlPipe, typeof i59.TagToSpanPipe, typeof i60.ToPreviewPipe, typeof i61.ToHtmlBodyTagsPipe, typeof i62.ToPreviewHtmlPipe], [typeof i38.UploadFilesBtnComponent, typeof i39.HtmlViewComponent, typeof i40.XmlTagTableViewComponent, typeof i41.XmlTagViewComponent, typeof i42.XmlTagRichTextViewComponent, typeof i43.XmlTagHtmlViewComponent, typeof i44.XmlTagTextViewComponent, typeof i45.XmlTagHeaderTextViewComponent, typeof i46.XmlTagHeaderInnerTextViewComponent, typeof i47.XmlTagExternalVideoComponent, typeof i48.HtmlRawViewComponent, typeof i49.FileImageTagViewComponent, typeof i39.HtmlViewComponent, typeof i50.MainEditorComponent, typeof i51.FileIdSelectComponent, typeof i52.TextEditorComponent, typeof i53.ImageEditorComponent, typeof i54.MainEditorBlockComponent, typeof i55.VisualEditorComponent, typeof i56.AddFilesBtnComponent, typeof i57.HtmlRawEditorComponent, typeof i58.RichTextToHtmlPipe, typeof i59.TagToSpanPipe, typeof i60.ToPreviewPipe, typeof i61.ToHtmlBodyTagsPipe, typeof i62.ToPreviewHtmlPipe]>;
67
67
  static ɵinj: i0.ɵɵInjectorDeclaration<CrocoHtmlModule>;
68
68
  }
@@ -0,0 +1,18 @@
1
+ export declare class ButtonTagDataConsts {
2
+ static TagName: string;
3
+ static TextAttrName: string;
4
+ static TypeAttrName: string;
5
+ static ClickAttrName: string;
6
+ }
7
+ export interface ButtonTag {
8
+ type: string;
9
+ data: ButtonTagData;
10
+ }
11
+ export interface ButtonTagData {
12
+ text: string;
13
+ type: string;
14
+ click: string;
15
+ }
16
+ export declare class ButtonMethods {
17
+ static ExtractDownloadButtonTag(elem: HTMLElement): ButtonTag;
18
+ }
@@ -30,7 +30,7 @@ export declare class HtmlExtractionMethods {
30
30
  data: {
31
31
  innerHTML: string;
32
32
  };
33
- }) | ((elem: HTMLElement, options: CrocoHtmlOptions) => GenericTextTag) | ((elem: HTMLElement, options: CrocoHtmlOptions) => import("./VideoMethods").ExternalVideoTag) | ((elem: HTMLElement, options: CrocoHtmlOptions) => import("./DownloadButtonMethods").DownloadButtonTag);
33
+ }) | ((elem: HTMLElement, options: CrocoHtmlOptions) => GenericTextTag) | ((elem: HTMLElement, options: CrocoHtmlOptions) => import("./VideoMethods").ExternalVideoTag) | ((elem: HTMLElement, options: CrocoHtmlOptions) => import("./DownloadButtonMethods").DownloadButtonTag) | ((elem: HTMLElement, options: CrocoHtmlOptions) => import("./ButtonMethods").ButtonTag);
34
34
  TEXT: (elem: HTMLElement, options: CrocoHtmlOptions) => import("./TextSimpleMethods").SimpleTextTag;
35
35
  "FILE-IMAGE": (elem: HTMLElement, options: CrocoHtmlOptions) => import("./ImageMethods").FileImageTag;
36
36
  TABLE: (elem: HTMLElement, options: CrocoHtmlOptions) => {
@@ -4,7 +4,8 @@ export declare class FileImageTagDataConsts {
4
4
  static FileIdAttrName: string;
5
5
  static ScreenMediaRequest: string;
6
6
  static DefaultValueForFileImage: string;
7
- static ScreenWidth: string;
7
+ static MaxScreenWidth: string;
8
+ static MinScreenWidth: string;
8
9
  static MaxImageHeight: string;
9
10
  }
10
11
  export interface FileImageTag {
@@ -17,7 +18,8 @@ export interface FileImageTagData {
17
18
  screenMediaRequest: string;
18
19
  }
19
20
  export interface IMediaRequest {
20
- screenWidth: number;
21
+ minScreenWidth: number;
22
+ maxScreenWidth: number;
21
23
  maxImageHeight: number;
22
24
  }
23
25
  export declare class ImageMethods {
@@ -28,5 +30,5 @@ export declare class ImageMethods {
28
30
  static mediaRequestStringToArrayParser: (data: string) => IMediaRequest[];
29
31
  static createMediaRequestValue(arr: string[], attribute: string): number;
30
32
  static mediaRequestsArrayToStringParser: (data: IMediaRequest[]) => string;
31
- static screenSizeChanged: (screenSize: number, requests: IMediaRequest[]) => any;
33
+ static screenSizeChanged: (screenSize: number, requests: IMediaRequest[]) => void;
32
34
  }
@@ -1,4 +1,7 @@
1
1
  import { BaseApiResponse } from "./TableMethods";
2
+ export declare class TextTagDataConsts {
3
+ static HAlign: string;
4
+ }
2
5
  export declare const TextTag = "text";
3
6
  export interface SimpleTextTag {
4
7
  type: "text";
package/lib/index.d.ts CHANGED
@@ -1,22 +1,22 @@
1
- import { ImageEditorComponent } from "./components/editor/image-editor/image-editor.component";
2
- import { MainEditorBlockComponent } from "./components/editor/main-editor-block/main-editor-block.component";
3
- import { MainEditorComponent } from "./components/editor/main-editor/main-editor.component";
4
- import { FileIdSelectComponent } from "./components/file-id-select/file-id-select.component";
5
- import { XmlTagHeaderInnerTextViewComponent } from "./components/xml-tags/xml-tag-header-inner-text-view/xml-tag-header-inner-text-view.component";
6
- import { XmlTagHtmlViewComponent } from "./components/xml-tags/xml-tag-html-view/xml-tag-html-view.component";
7
- import { XmlTagRichTextViewComponent } from "./components/xml-tags/xml-tag-rich-text-view/xml-tag-rich-text-view.component";
8
- import { XmlTagTableViewComponent } from "./components/xml-tags/xml-tag-table-view/xml-tag-table-view.component";
9
- import { XmlTagViewComponent } from "./components/xml-tags/xml-tag-view/xml-tag-view.component";
10
- import { VisualEditorComponent } from './components/editor/visual-editor/visual-editor.component';
11
- import { AddFilesBtnComponent } from './components/add-files-btn/add-files-btn.component';
12
- import { XmlTagExternalVideoComponent } from "./components/xml-tags/xml-tag-external-video/xml-tag-external-video.component";
13
- import { HtmlRawEditorComponent } from "./components/editor/html-raw-editor/html-raw-editor.component";
14
- import { MatFormFieldModule } from '@angular/material/form-field';
1
+ import { ImageEditorComponent } from "./components";
2
+ import { MainEditorBlockComponent } from "./components";
3
+ import { MainEditorComponent } from "./components";
4
+ import { FileIdSelectComponent } from "./components";
5
+ import { XmlTagHeaderInnerTextViewComponent } from "./components";
6
+ import { XmlTagHtmlViewComponent } from "./components";
7
+ import { XmlTagRichTextViewComponent } from "./components";
8
+ import { XmlTagTableViewComponent } from "./components";
9
+ import { XmlTagViewComponent } from "./components";
10
+ import { VisualEditorComponent } from './components';
11
+ import { AddFilesBtnComponent } from './components';
12
+ import { XmlTagExternalVideoComponent } from "./components";
13
+ import { HtmlRawEditorComponent } from "./components";
14
+ import { MatBadgeModule } from '@angular/material/badge';
15
15
  import { RichTextToHtmlPipe, TagToSpanPipe, ToHtmlBodyTagsPipe, ToPreviewHtmlPipe, ToPreviewPipe } from "./pipes";
16
16
  import { FileImageTagViewComponent, UploadFilesBtnComponent } from "./components";
17
- import { HtmlRawViewComponent } from "./components/xml-tags/html-raw-view/html-raw-view.component";
18
- export declare const EditorComponents: (typeof FileIdSelectComponent | typeof ImageEditorComponent | typeof AddFilesBtnComponent | typeof HtmlRawEditorComponent | typeof MainEditorBlockComponent | typeof VisualEditorComponent | typeof MainEditorComponent)[];
19
- export declare const XmlComponents: (typeof FileImageTagViewComponent | typeof XmlTagExternalVideoComponent | typeof XmlTagHeaderInnerTextViewComponent | typeof XmlTagHtmlViewComponent | typeof XmlTagRichTextViewComponent | typeof XmlTagTableViewComponent | 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 FileImageTagViewComponent | typeof FileIdSelectComponent | typeof XmlTagExternalVideoComponent | typeof ImageEditorComponent | typeof UploadFilesBtnComponent | typeof AddFilesBtnComponent | typeof XmlTagHeaderInnerTextViewComponent | typeof XmlTagHtmlViewComponent | typeof RichTextToHtmlPipe | typeof XmlTagRichTextViewComponent | typeof XmlTagTableViewComponent | typeof HtmlRawViewComponent | typeof XmlTagViewComponent | typeof HtmlRawEditorComponent | typeof MainEditorBlockComponent | typeof VisualEditorComponent | typeof ToPreviewPipe | typeof MainEditorComponent | typeof TagToSpanPipe | typeof ToHtmlBodyTagsPipe | typeof ToPreviewHtmlPipe)[];
22
- export declare const MaterialModules: (typeof MatFormFieldModule)[];
17
+ import { HtmlRawViewComponent } from "./components";
18
+ export declare const EditorComponents: (typeof AddFilesBtnComponent | typeof MainEditorBlockComponent | typeof VisualEditorComponent | typeof FileIdSelectComponent | typeof ImageEditorComponent | typeof HtmlRawEditorComponent | typeof MainEditorComponent)[];
19
+ export declare const XmlComponents: (typeof XmlTagHeaderInnerTextViewComponent | typeof XmlTagExternalVideoComponent | typeof HtmlRawViewComponent | typeof FileImageTagViewComponent | typeof XmlTagHtmlViewComponent | typeof XmlTagViewComponent | typeof XmlTagTableViewComponent | typeof XmlTagRichTextViewComponent)[];
20
+ export declare const CrocoPipes: (typeof ToPreviewHtmlPipe | typeof ToHtmlBodyTagsPipe | typeof ToPreviewPipe | typeof RichTextToHtmlPipe | typeof TagToSpanPipe)[];
21
+ export declare const CrocoHtmlDeclarations: (typeof XmlTagHeaderInnerTextViewComponent | typeof ToPreviewHtmlPipe | typeof ToHtmlBodyTagsPipe | typeof ToPreviewPipe | typeof AddFilesBtnComponent | typeof MainEditorBlockComponent | typeof VisualEditorComponent | typeof FileIdSelectComponent | typeof XmlTagExternalVideoComponent | typeof ImageEditorComponent | typeof HtmlRawEditorComponent | typeof HtmlRawViewComponent | typeof FileImageTagViewComponent | typeof XmlTagHtmlViewComponent | typeof XmlTagViewComponent | typeof UploadFilesBtnComponent | typeof XmlTagTableViewComponent | typeof XmlTagRichTextViewComponent | typeof MainEditorComponent | typeof RichTextToHtmlPipe | typeof TagToSpanPipe)[];
22
+ export declare const MaterialModules: (typeof MatBadgeModule)[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "croco-html",
3
- "version": "2.17.0",
3
+ "version": "2.19.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^17.3.4",
6
6
  "@angular/core": "^17.3.4",
@@ -1,42 +0,0 @@
1
- import { Component, EventEmitter, Input, Output } from '@angular/core';
2
- import { MatFormField, MatFormFieldModule } from "@angular/material/form-field";
3
- import { MatInput } from "@angular/material/input";
4
- import { FormsModule, ReactiveFormsModule } from "@angular/forms";
5
- import { XmlTagDownloadFileButtonComponent } from "../../xml-tags/xml-tag-download-file-button/xml-tag-download-file-button.component";
6
- import * as i0 from "@angular/core";
7
- import * as i1 from "@angular/forms";
8
- import * as i2 from "@angular/material/form-field";
9
- export class DownloadFileButtonBlockComponent {
10
- constructor() {
11
- this.onTagUpdated = new EventEmitter();
12
- this.tagData = {
13
- link: '',
14
- title: ''
15
- };
16
- }
17
- ngOnInit() {
18
- this.tagData.link = this.tag.attributes.link;
19
- this.tagData.title = this.tag.attributes.title;
20
- }
21
- linkChanged() {
22
- this.tag.attributes = this.tagData;
23
- }
24
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: DownloadFileButtonBlockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
25
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", type: DownloadFileButtonBlockComponent, isStandalone: true, selector: "croco-html-download-file-button-block", inputs: { tag: "tag" }, outputs: { onTagUpdated: "onTagUpdated" }, ngImport: i0, template: "@if (tag.presentOrEdit) {\n <div>\n <div>\n \u0421\u0441\u044B\u043B\u043A\u0430 \u0434\u043B\u044F \u0441\u043A\u0430\u0447\u0438\u0432\u0430\u043D\u0438\u044F: {{tagData.link}}\n </div>\n <div style=\"height: 10px;\"></div>\n <div>\n \u0422\u0435\u043A\u0441\u0442 \u043A\u043D\u043E\u043F\u043A\u0438: {{tagData.title}}\n </div>\n <div style=\"height: 20px;\"></div>\n <croco-html-xml-tag-download-file-button [tagData]=\"tagData\"></croco-html-xml-tag-download-file-button>\n </div>\n}\n\n@if (!tag.presentOrEdit) {\n <div>\n <mat-form-field class=\"w-100\">\n <mat-label>\n \u0421\u0441\u044B\u043B\u043A\u0430 \u043D\u0430 \u0441\u043A\u0430\u0447\u0438\u0432\u0430\u043D\u0438\u0435\n </mat-label>\n <input matInput placeholder=\"\u0421\u0441\u044B\u043B\u043A\u0430 \u043D\u0430 \u0441\u043A\u0430\u0447\u0438\u0432\u0430\u043D\u0438\u0435\"\n autocomplete=\"off\"\n [(ngModel)]=\"tagData.link\"\n (ngModelChange)=\"linkChanged()\">\n </mat-form-field>\n\n <mat-form-field class=\"w-100\">\n <mat-label>\n \u0422\u0435\u043A\u0441\u0442 \u043D\u0430 \u043A\u043D\u043E\u043F\u043A\u0435\n </mat-label>\n <input matInput placeholder=\"\u0422\u0435\u043A\u0441\u0442 \u043D\u0430 \u043A\u043D\u043E\u043F\u043A\u0435\"\n autocomplete=\"off\"\n [(ngModel)]=\"tagData.title\"\n (ngModelChange)=\"linkChanged()\">\n </mat-form-field>\n </div>\n}\n", styles: [""], dependencies: [{ kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: XmlTagDownloadFileButtonComponent, selector: "croco-html-xml-tag-download-file-button", inputs: ["data", "tagData"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }] }); }
26
- }
27
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: DownloadFileButtonBlockComponent, decorators: [{
28
- type: Component,
29
- args: [{ selector: 'croco-html-download-file-button-block', standalone: true, imports: [
30
- MatFormField,
31
- MatInput,
32
- ReactiveFormsModule,
33
- FormsModule,
34
- XmlTagDownloadFileButtonComponent,
35
- MatFormFieldModule
36
- ], template: "@if (tag.presentOrEdit) {\n <div>\n <div>\n \u0421\u0441\u044B\u043B\u043A\u0430 \u0434\u043B\u044F \u0441\u043A\u0430\u0447\u0438\u0432\u0430\u043D\u0438\u044F: {{tagData.link}}\n </div>\n <div style=\"height: 10px;\"></div>\n <div>\n \u0422\u0435\u043A\u0441\u0442 \u043A\u043D\u043E\u043F\u043A\u0438: {{tagData.title}}\n </div>\n <div style=\"height: 20px;\"></div>\n <croco-html-xml-tag-download-file-button [tagData]=\"tagData\"></croco-html-xml-tag-download-file-button>\n </div>\n}\n\n@if (!tag.presentOrEdit) {\n <div>\n <mat-form-field class=\"w-100\">\n <mat-label>\n \u0421\u0441\u044B\u043B\u043A\u0430 \u043D\u0430 \u0441\u043A\u0430\u0447\u0438\u0432\u0430\u043D\u0438\u0435\n </mat-label>\n <input matInput placeholder=\"\u0421\u0441\u044B\u043B\u043A\u0430 \u043D\u0430 \u0441\u043A\u0430\u0447\u0438\u0432\u0430\u043D\u0438\u0435\"\n autocomplete=\"off\"\n [(ngModel)]=\"tagData.link\"\n (ngModelChange)=\"linkChanged()\">\n </mat-form-field>\n\n <mat-form-field class=\"w-100\">\n <mat-label>\n \u0422\u0435\u043A\u0441\u0442 \u043D\u0430 \u043A\u043D\u043E\u043F\u043A\u0435\n </mat-label>\n <input matInput placeholder=\"\u0422\u0435\u043A\u0441\u0442 \u043D\u0430 \u043A\u043D\u043E\u043F\u043A\u0435\"\n autocomplete=\"off\"\n [(ngModel)]=\"tagData.title\"\n (ngModelChange)=\"linkChanged()\">\n </mat-form-field>\n </div>\n}\n" }]
37
- }], propDecorators: { t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iPjwvY3JvY28taHRtbC14bWwtdGFnLWRvd25sb2FkLWZpbGUtYnV0dG9uPlxuICA8L2Rpdj5cbn1cblxuQGlmICghdGFnLnByZXNlbnRPckVkaXQpIHtcbiAgICAgIDxkaXY+XG4gICAgICAgIDxtYXQtZm9ybS1maWVsZCBjbGFzcz1cInctMTAwXCI+XG4gICAgICAgICAgPG1hdC1sYWJlbD5cbiAgICAgICAgICAgINCh0YHRi9C70LrQsCDQvdCwINGB0LrQsNGH0LjQstCw0L3QuNC1XG4gICAgICAgICAgPC9tYXQtbGFiZWw+XG4gICAgICAgICAgPGlucHV0IG1hdElucHV0IHBsYWNlaG9sZGVyPVwi0KHRgdGL0LvQutCwINC90LAg0YHQutCw0YfQuNCy0LDQvdC40LVcIlxuICAgICAgICAgICAgICAgICBhdXRvY29tcGxldGU9XCJvZmZcIlxuICAgICAgICAgICAgICAgICBbKG5nTW9kZWwpXT1cInRhZ0RhdGEubGlua1wiXG4gICAgICAgICAgICAgICAgIChuZ01vZGVsQ2hhbmdlKT1cImxpbmtDaGFuZ2VkKClcIj5cbiAgICAgICAgPC9tYXQtZm9ybS1maWVsZD5cblxuICAgICAgICA8bWF0LWZvcm0tZmllbGQgY2xhc3M9XCJ3LTEwMFwiPlxuICAgICAgICAgIDxtYXQtbGFiZWw+XG4gICAgICAgICAgICDQotC10LrRgdGCINC90LAg0LrQvdC+0L/QutC1XG4gICAgICAgICAgPC9tYXQtbGFiZWw+XG4gICAgICAgICAgPGlucHV0IG1hdElucHV0IHBsYWNlaG9sZGVyPVwi0KLQtdC60YHRgiDQvdCwINC60L3QvtC/0LrQtVwiXG4gICAgICAgICAgICAgICAgIGF1dG9jb21wbGV0ZT1cIm9mZlwiXG4gICAgICAgICAgICAgICAgIFsobmdNb2RlbCldPVwidGFnRGF0YS50aXRsZVwiXG4gICAgICAgICAgICAgICAgIChuZ01vZGVsQ2hhbmdlKT1cImxpbmtDaGFuZ2VkKClcIj5cbiAgICAgICAgPC9tYXQtZm9ybS1maWVsZD5cbiAgICAgIDwvZGl2PlxufVxuIl19
@@ -1,55 +0,0 @@
1
- import { Component, EventEmitter, Input, Output } from '@angular/core';
2
- import { ExternalVideoSupportedTypes, } from '../../../extensions';
3
- import { MatFormFieldModule } from '@angular/material/form-field';
4
- import { FormsModule } from '@angular/forms';
5
- import { XmlTagExternalVideoComponent } from '../../xml-tags';
6
- import { MatInputModule } from '@angular/material/input';
7
- import * as i0 from "@angular/core";
8
- import * as i1 from "@angular/material/form-field";
9
- import * as i2 from "@angular/material/input";
10
- import * as i3 from "@angular/forms";
11
- export class ExternalVideoBlockComponent {
12
- constructor() {
13
- this.onTagUpdated = new EventEmitter();
14
- this.ExternalVideoSupportedTypes = ExternalVideoSupportedTypes;
15
- this.tagData = {
16
- link: '',
17
- type: ExternalVideoSupportedTypes.Youtube
18
- };
19
- this.linkText = '';
20
- }
21
- ngOnInit() {
22
- this.tagData.link = this.tag.attributes.link;
23
- this.tagData.type = this.tag.attributes.type;
24
- this.linkText = this.tagData.type === ExternalVideoSupportedTypes.VkVideo ? 'Ссылка на Vk Video' : ' Ссылка на YouTube';
25
- }
26
- linkChanged() {
27
- if (this.tagData.link.includes('iframe')) {
28
- this.createLinkByIFrame();
29
- }
30
- this.tag.attributes = this.tagData;
31
- }
32
- createLinkByIFrame() {
33
- const parser = new DOMParser();
34
- const document = parser.parseFromString(this.tagData.link, "text/html");
35
- const elem = document.body.children[0];
36
- const src = elem.getAttribute("src");
37
- this.tagData.link = src;
38
- }
39
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ExternalVideoBlockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
40
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", type: ExternalVideoBlockComponent, isStandalone: true, selector: "croco-html-external-video-block", inputs: { tag: "tag" }, outputs: { onTagUpdated: "onTagUpdated" }, ngImport: i0, template: "@if (tag.presentOrEdit) {\n <div>\n <div>\n @switch (tagData.type) {\n @case (ExternalVideoSupportedTypes.VkVideo) {\n {{linkText}}: {{tagData.link}}\n }\n @case (ExternalVideoSupportedTypes.Youtube) {\n {{linkText}}: {{tagData.link}}\n }\n }\n </div>\n <div style=\"height: 10px;\"></div>\n <croco-html-xml-tag-external-video [tagData]=\"tagData\"></croco-html-xml-tag-external-video>\n </div>\n}\n\n@if (!tag.presentOrEdit) {\n <div>\n <mat-form-field class=\"w-100\">\n <mat-label>\n {{linkText}}\n </mat-label>\n <input matInput placeholder=\"{{linkText}}\"\n autocomplete=\"off\"\n [(ngModel)]=\"tagData.link\"\n (ngModelChange)=\"linkChanged()\">\n </mat-form-field>\n </div>\n}\n", styles: [".video-player{margin:0 auto;max-width:640px;width:100%;height:360px}@media screen and (max-width: 760px){.video-player{height:300px}}@media screen and (max-width: 540px){.video-player{height:250px}}@media screen and (max-width: 450px){.video-player{height:200px}}@media screen and (max-width: 380px){.video-player{height:180px}}\n"], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: XmlTagExternalVideoComponent, selector: "croco-html-xml-tag-external-video", inputs: ["data", "tagData"] }] }); }
41
- }
42
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ExternalVideoBlockComponent, decorators: [{
43
- type: Component,
44
- args: [{ selector: 'croco-html-external-video-block', standalone: true, imports: [
45
- MatFormFieldModule,
46
- MatInputModule,
47
- FormsModule,
48
- XmlTagExternalVideoComponent,
49
- ], template: "@if (tag.presentOrEdit) {\n <div>\n <div>\n @switch (tagData.type) {\n @case (ExternalVideoSupportedTypes.VkVideo) {\n {{linkText}}: {{tagData.link}}\n }\n @case (ExternalVideoSupportedTypes.Youtube) {\n {{linkText}}: {{tagData.link}}\n }\n }\n </div>\n <div style=\"height: 10px;\"></div>\n <croco-html-xml-tag-external-video [tagData]=\"tagData\"></croco-html-xml-tag-external-video>\n </div>\n}\n\n@if (!tag.presentOrEdit) {\n <div>\n <mat-form-field class=\"w-100\">\n <mat-label>\n {{linkText}}\n </mat-label>\n <input matInput placeholder=\"{{linkText}}\"\n autocomplete=\"off\"\n [(ngModel)]=\"tagData.link\"\n (ngModelChange)=\"linkChanged()\">\n </mat-form-field>\n </div>\n}\n", styles: [".video-player{margin:0 auto;max-width:640px;width:100%;height:360px}@media screen and (max-width: 760px){.video-player{height:300px}}@media screen and (max-width: 540px){.video-player{height:250px}}@media screen and (max-width: 450px){.video-player{height:200px}}@media screen and (max-width: 380px){.video-player{height:180px}}\n"] }]
50
- }], propDecorators: { tag: [{
51
- type: Input
52
- }], onTagUpdated: [{
53
- type: Output
54
- }] } });
55
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXh0ZXJuYWwtdmlkZW8tYmxvY2suY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6I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IChFeHRlcm5hbFZpZGVvU3VwcG9ydGVkVHlwZXMuWW91dHViZSkge1xuICAgICAgICAgIHt7bGlua1RleHR9fToge3t0YWdEYXRhLmxpbmt9fVxuICAgICAgICB9XG4gICAgICB9XG4gICAgPC9kaXY+XG4gICAgPGRpdiBzdHlsZT1cImhlaWdodDogMTBweDtcIj48L2Rpdj5cbiAgICA8Y3JvY28taHRtbC14bWwtdGFnLWV4dGVybmFsLXZpZGVvIFt0YWdEYXRhXT1cInRhZ0RhdGFcIj48L2Nyb2NvLWh0bWwteG1sLXRhZy1leHRlcm5hbC12aWRlbz5cbiAgPC9kaXY+XG59XG5cbkBpZiAoIXRhZy5wcmVzZW50T3JFZGl0KSB7XG4gICAgPGRpdj5cbiAgICAgIDxtYXQtZm9ybS1maWVsZCBjbGFzcz1cInctMTAwXCI+XG4gICAgICAgIDxtYXQtbGFiZWw+XG4gICAgICAgICAge3tsaW5rVGV4dH19XG4gICAgICAgIDwvbWF0LWxhYmVsPlxuICAgICAgICA8aW5wdXQgbWF0SW5wdXQgcGxhY2Vob2xkZXI9XCJ7e2xpbmtUZXh0fX1cIlxuICAgICAgICAgIGF1dG9jb21wbGV0ZT1cIm9mZlwiXG4gICAgICAgICAgWyhuZ01vZGVsKV09XCJ0YWdEYXRhLmxpbmtcIlxuICAgICAgICAgICAgICAgICAgKG5nTW9kZWxDaGFuZ2UpPVwibGlua0NoYW5nZWQoKVwiPlxuICAgICAgICAgIDwvbWF0LWZvcm0tZmllbGQ+XG4gICAgPC9kaXY+XG59XG4iXX0=
@@ -1,20 +0,0 @@
1
- import { Component, Input } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- import * as i1 from "@angular/platform-browser";
4
- export class YoutubeVideoPlayerComponent {
5
- set link(link) {
6
- this.safeUrl = this.sanitizer.bypassSecurityTrustResourceUrl(link);
7
- }
8
- constructor(sanitizer) {
9
- this.sanitizer = sanitizer;
10
- }
11
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: YoutubeVideoPlayerComponent, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component }); }
12
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: YoutubeVideoPlayerComponent, isStandalone: true, selector: "youtube-video-player", inputs: { link: "link" }, ngImport: i0, template: "<div class=\"video-player\">\n <iframe\n width=\"100%\"\n height=\"100%\"\n [src]=\"safeUrl\"\n title=\"YouTube video player\"\n frameborder=\"0\"\n allow=\"accelerometer;\n autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\"\n referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen></iframe>\n</div>\n", styles: [".video-player{margin:0 auto;max-width:640px;width:100%;height:360px}@media screen and (max-width: 760px){.video-player{height:300px}}@media screen and (max-width: 540px){.video-player{height:250px}}@media screen and (max-width: 450px){.video-player{height:200px}}@media screen and (max-width: 380px){.video-player{height:180px}}\n"] }); }
13
- }
14
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: YoutubeVideoPlayerComponent, decorators: [{
15
- type: Component,
16
- args: [{ selector: 'youtube-video-player', standalone: true, imports: [], template: "<div class=\"video-player\">\n <iframe\n width=\"100%\"\n height=\"100%\"\n [src]=\"safeUrl\"\n title=\"YouTube video player\"\n frameborder=\"0\"\n allow=\"accelerometer;\n autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\"\n referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen></iframe>\n</div>\n", styles: [".video-player{margin:0 auto;max-width:640px;width:100%;height:360px}@media screen and (max-width: 760px){.video-player{height:300px}}@media screen and (max-width: 540px){.video-player{height:250px}}@media screen and (max-width: 450px){.video-player{height:200px}}@media screen and (max-width: 380px){.video-player{height:180px}}\n"] }]
17
- }], ctorParameters: () => [{ type: i1.DomSanitizer }], propDecorators: { link: [{
18
- type: Input
19
- }] } });
20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