croco-html 2.0.8 → 2.1.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.
@@ -0,0 +1,9 @@
1
+ export declare enum EAlignments {
2
+ Left = "left",
3
+ Center = "center",
4
+ Right = "right"
5
+ }
6
+ export declare const AlignmentsData: {
7
+ value: EAlignments;
8
+ text: string;
9
+ }[];
@@ -1,12 +1,23 @@
1
1
  import { CdkDragDrop } from '@angular/cdk/drag-drop';
2
- import { AfterViewInit, ChangeDetectorRef, EventEmitter, OnInit } from '@angular/core';
2
+ import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnInit } from '@angular/core';
3
3
  import { TagItem, HtmlBodyTag } from '../../../models/models';
4
4
  import { FilePostingStarted } from '../../upload-files-btn/upload-files-btn.component';
5
+ import { EAlignments } from "./DefaultAligments";
5
6
  import * as i0 from "@angular/core";
6
7
  export declare class VisualEditorComponent implements OnInit, AfterViewInit {
7
8
  private _cdref;
9
+ textArea: ElementRef;
8
10
  isLoading: boolean;
9
11
  loadingText: string;
12
+ isActiveAddText: boolean;
13
+ text: string;
14
+ alignment: EAlignments;
15
+ textTag: string;
16
+ textTagOptions: TagItem[];
17
+ alignmentOptions: {
18
+ value: EAlignments;
19
+ text: string;
20
+ }[];
10
21
  showMarkUp: boolean;
11
22
  tags: TagItem[];
12
23
  selectedValue: string;
@@ -18,10 +29,15 @@ export declare class VisualEditorComponent implements OnInit, AfterViewInit {
18
29
  onHtmlChanged: EventEmitter<string>;
19
30
  rendered: EventEmitter<boolean>;
20
31
  bodyTags: HtmlBodyTag[];
32
+ saveBodyTags: HtmlBodyTag[];
21
33
  constructor(_cdref: ChangeDetectorRef);
22
34
  ngAfterViewInit(): void;
23
35
  ngAfterContentChecked(): void;
24
36
  addTag(): void;
37
+ addText(): void;
38
+ closeText(): void;
39
+ resetTextStyle(): void;
40
+ modelChanged(): void;
25
41
  postFilesStartedEventHandler(model: FilePostingStarted): void;
26
42
  addTagCustom(tag: HtmlBodyTag): void;
27
43
  filesTagsReadyHandler(tags: HtmlBodyTag[]): void;
@@ -0,0 +1,2 @@
1
+ import { Observable } from 'rxjs';
2
+ export declare function resizeObservable(elem: Element, options?: ResizeObserverOptions): Observable<ResizeObserverEntry>;
@@ -1,14 +1,16 @@
1
- import { OnInit } from '@angular/core';
2
- import { DomSanitizer } from '@angular/platform-browser';
1
+ import { DestroyRef, ElementRef, OnInit } from '@angular/core';
3
2
  import { InterfaceBlock } from "../../../extensions/InterfaceBlock";
4
3
  import { ExternalVideoTagData } from '../../../extensions';
5
4
  import * as i0 from "@angular/core";
6
5
  export declare class XmlTagExternalVideoComponent implements OnInit {
7
- private _domSanitizer;
6
+ private destroyRef;
8
7
  set data(value: InterfaceBlock);
9
8
  set tagData(value: ExternalVideoTagData);
9
+ playerContainerRef?: ElementRef<HTMLElement>;
10
10
  videoId?: string;
11
- constructor(_domSanitizer: DomSanitizer);
11
+ playerWidth: import("@angular/core").WritableSignal<number>;
12
+ playerHeight: import("@angular/core").WritableSignal<number>;
13
+ constructor(destroyRef: DestroyRef);
12
14
  ngOnInit(): void;
13
15
  private getYouTubeId;
14
16
  static ɵfac: i0.ɵɵFactoryDeclaration<XmlTagExternalVideoComponent, never>;
package/lib/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { MainEditorBlockComponent } from "./components/editor/main-editor-block/main-editor-block.component";
2
2
  import { MainEditorComponent } from "./components/editor/main-editor/main-editor.component";
3
3
  import { FileIdSelectComponent } from "./components/file-id-select/file-id-select.component";
4
- import { XmlTagHeaderInnerTextViewComponent } from "./components/xml-tags/xml-tag-header-inner-text-view/xml-tag-header-inner-text-view.component";
4
+ import { XmlTagHeaderTextViewComponent } from "./components/xml-tags/xml-tag-header-text-view/xml-tag-header-text-view.component";
5
5
  import { XmlTagHtmlViewComponent } from "./components/xml-tags/xml-tag-html-view/xml-tag-html-view.component";
6
6
  import { XmlTagRichTextViewComponent } from "./components/xml-tags/xml-tag-rich-text-view/xml-tag-rich-text-view.component";
7
7
  import { XmlTagTableViewComponent } from "./components/xml-tags/xml-tag-table-view/xml-tag-table-view.component";
@@ -10,12 +10,12 @@ import { VisualEditorComponent } from './components/editor/visual-editor/visual-
10
10
  import { AddFilesBtnComponent } from './components/add-files-btn/add-files-btn.component';
11
11
  import { XmlTagExternalVideoComponent } from "./components/xml-tags/xml-tag-external-video/xml-tag-external-video.component";
12
12
  import { HtmlRawEditorComponent } from "./components/editor/html-raw-editor/html-raw-editor.component";
13
- import { MatButtonModule } from '@angular/material/button';
13
+ import { MatBadgeModule } from '@angular/material/badge';
14
14
  import { RichTextToHtmlPipe, TagToSpanPipe, ToHtmlBodyTagsPipe, ToPreviewHtmlPipe } from "./pipes";
15
15
  import { FileImageTagViewComponent, UploadFilesBtnComponent } from "./components";
16
16
  import { HtmlRawViewComponent } from "./components/xml-tags/html-raw-view/html-raw-view.component";
17
- export declare const EditorComponents: (typeof AddFilesBtnComponent | typeof HtmlRawEditorComponent | typeof VisualEditorComponent | typeof MainEditorComponent | typeof MainEditorBlockComponent | typeof FileIdSelectComponent)[];
18
- export declare const XmlComponents: (typeof FileImageTagViewComponent | typeof XmlTagExternalVideoComponent | typeof XmlTagHeaderInnerTextViewComponent | typeof XmlTagHtmlViewComponent | typeof XmlTagRichTextViewComponent | typeof XmlTagTableViewComponent | typeof XmlTagViewComponent | typeof HtmlRawViewComponent)[];
17
+ export declare const EditorComponents: (typeof VisualEditorComponent | typeof MainEditorComponent | typeof FileIdSelectComponent | typeof MainEditorBlockComponent | typeof AddFilesBtnComponent | typeof HtmlRawEditorComponent)[];
18
+ export declare const XmlComponents: (typeof XmlTagTableViewComponent | typeof XmlTagViewComponent | typeof XmlTagRichTextViewComponent | typeof XmlTagHtmlViewComponent | typeof XmlTagHeaderTextViewComponent | typeof XmlTagExternalVideoComponent | typeof HtmlRawViewComponent | typeof FileImageTagViewComponent)[];
19
19
  export declare const CrocoPipes: (typeof RichTextToHtmlPipe | typeof TagToSpanPipe | typeof ToHtmlBodyTagsPipe | typeof ToPreviewHtmlPipe)[];
20
- export declare const CrocoHtmlDeclarations: (typeof FileImageTagViewComponent | typeof UploadFilesBtnComponent | typeof AddFilesBtnComponent | typeof HtmlRawEditorComponent | typeof VisualEditorComponent | typeof MainEditorComponent | typeof MainEditorBlockComponent | typeof FileIdSelectComponent | typeof XmlTagExternalVideoComponent | typeof XmlTagHeaderInnerTextViewComponent | typeof XmlTagHtmlViewComponent | typeof XmlTagRichTextViewComponent | typeof XmlTagTableViewComponent | typeof XmlTagViewComponent | typeof HtmlRawViewComponent | typeof RichTextToHtmlPipe | typeof TagToSpanPipe | typeof ToHtmlBodyTagsPipe | typeof ToPreviewHtmlPipe)[];
21
- export declare const MaterialModules: (typeof MatButtonModule)[];
20
+ export declare const CrocoHtmlDeclarations: (typeof VisualEditorComponent | typeof MainEditorComponent | typeof FileIdSelectComponent | typeof MainEditorBlockComponent | typeof AddFilesBtnComponent | typeof HtmlRawEditorComponent | typeof XmlTagTableViewComponent | typeof XmlTagViewComponent | typeof XmlTagRichTextViewComponent | typeof XmlTagHtmlViewComponent | typeof XmlTagHeaderTextViewComponent | typeof XmlTagExternalVideoComponent | typeof HtmlRawViewComponent | typeof FileImageTagViewComponent | typeof RichTextToHtmlPipe | typeof TagToSpanPipe | typeof ToHtmlBodyTagsPipe | typeof ToPreviewHtmlPipe | typeof UploadFilesBtnComponent)[];
21
+ export declare const MaterialModules: (typeof MatBadgeModule)[];
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "croco-html",
3
- "version": "2.0.8",
3
+ "version": "2.1.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^17.3.4",
6
6
  "@angular/core": "^17.3.4",
7
7
  "@angular/cdk": "^17.3.4",
8
8
  "@angular/youtube-player": "^17.3.4",
9
9
  "@angular/material": ">=17.0.0",
10
- "ngx-clipboard": ">=15.1.0",
10
+ "ngx-clipboard": "^16.0.0",
11
11
  "@ng-select/ng-select": "^12.0.7"
12
12
  },
13
13
  "dependencies": {