croco-html 3.3.0 → 3.3.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.
Files changed (30) hide show
  1. package/esm2022/lib/components/add-files-btn/add-files-btn.component.mjs +1 -3
  2. package/esm2022/lib/components/editor/external-video-editor/youtube-video-player/youtube-video-player.component.mjs +1 -1
  3. package/esm2022/lib/components/editor/html-editor-settings-modal/html-editor-settings-modal.component.mjs +2 -2
  4. package/esm2022/lib/components/editor/main-editor/main-editor.component.mjs +2 -2
  5. package/esm2022/lib/components/editor/main-editor-block/main-editor-block.component.mjs +1 -5
  6. package/esm2022/lib/components/file-id-select/file-id-select.component.mjs +2 -2
  7. package/esm2022/lib/components/upload-files-btn/upload-files-btn.component.mjs +2 -2
  8. package/esm2022/lib/components/xml-tags/file-image-tag-view/file-image-tag-view.component.mjs +2 -2
  9. package/esm2022/lib/components/xml-tags/html-raw-view/html-raw-view.component.mjs +1 -1
  10. package/esm2022/lib/components/xml-tags/xml-tag-custom-button/xml-tag-button.component.mjs +1 -3
  11. package/esm2022/lib/components/xml-tags/xml-tag-custom-widget/xml-tag-custom-widget.component.mjs +1 -1
  12. package/esm2022/lib/components/xml-tags/xml-tag-download-file-button/xml-tag-download-file-button.component.mjs +1 -5
  13. package/esm2022/lib/components/xml-tags/xml-tag-html-view/xml-tag-html-view.component.mjs +2 -2
  14. package/esm2022/lib/components/xml-tags/xml-tag-rich-text-view/xml-tag-rich-text-view.component.mjs +2 -2
  15. package/esm2022/lib/services/CrocoHtmlFileOptionsService.mjs +32 -0
  16. package/esm2022/lib/services/blob-create.service.mjs +1 -1
  17. package/esm2022/lib/services/index.mjs +2 -1
  18. package/fesm2022/croco-html.mjs +4 -12
  19. package/fesm2022/croco-html.mjs.map +1 -1
  20. package/lib/components/add-files-btn/add-files-btn.component.d.ts +2 -3
  21. package/lib/components/editor/html-editor-settings-modal/html-editor-settings-modal.component.d.ts +1 -1
  22. package/lib/components/editor/main-editor/main-editor.component.d.ts +1 -1
  23. package/lib/components/editor/main-editor-block/main-editor-block.component.d.ts +2 -3
  24. package/lib/components/file-id-select/file-id-select.component.d.ts +1 -1
  25. package/lib/components/upload-files-btn/upload-files-btn.component.d.ts +1 -1
  26. package/lib/index.d.ts +7 -7
  27. package/lib/services/index.d.ts +1 -0
  28. package/package.json +1 -1
  29. package/esm2022/lib/services/croco-html-file-options.service.mjs +0 -32
  30. /package/lib/services/{croco-html-file-options.service.d.ts → CrocoHtmlFileOptionsService.d.ts} +0 -0
@@ -1,10 +1,10 @@
1
- import { EventEmitter, OnInit } from '@angular/core';
1
+ import { EventEmitter } from '@angular/core';
2
2
  import { HtmlBodyTag } from '../../models/models';
3
3
  import { FilePostingStarted, UploadFilesBtnComponent } from '../upload-files-btn/upload-files-btn.component';
4
4
  import { PublicFilesUploadResponse } from '../../services/PublicFileUploadService';
5
5
  import { PrivateFilesCreatedResult } from "../../services/PrivateFileUploadService";
6
6
  import * as i0 from "@angular/core";
7
- export declare class AddFilesBtnComponent implements OnInit {
7
+ export declare class AddFilesBtnComponent {
8
8
  postFilesStarted: EventEmitter<FilePostingStarted>;
9
9
  fakeBtn: UploadFilesBtnComponent;
10
10
  fileIds: number[];
@@ -15,7 +15,6 @@ export declare class AddFilesBtnComponent implements OnInit {
15
15
  filesUploadedPrivateHandler(data: PrivateFilesCreatedResult): void;
16
16
  private buildFileTags;
17
17
  handleClick(): void;
18
- ngOnInit(): void;
19
18
  static ɵfac: i0.ɵɵFactoryDeclaration<AddFilesBtnComponent, never>;
20
19
  static ɵcmp: i0.ɵɵComponentDeclaration<AddFilesBtnComponent, "croco-html-add-files-btn", never, {}, { "postFilesStarted": "postFilesStarted"; "filesTagsReady": "filesTagsReady"; }, never, never, true, never>;
21
20
  }
@@ -1,7 +1,7 @@
1
1
  import { OnInit } from '@angular/core';
2
2
  import { FormBuilder, FormGroup } from "@angular/forms";
3
3
  import { MatDialogRef } from "@angular/material/dialog";
4
- import { CrocoHtmlFileOptionsService } from "../../../services/croco-html-file-options.service";
4
+ import { CrocoHtmlFileOptionsService } from "../../../services/CrocoHtmlFileOptionsService";
5
5
  import * as i0 from "@angular/core";
6
6
  export declare class HtmlEditorSettingsModalComponent implements OnInit {
7
7
  private readonly fb;
@@ -4,7 +4,7 @@ import { ClipboardService } from 'ngx-clipboard';
4
4
  import { VisualEditorComponent } from '../visual-editor/visual-editor.component';
5
5
  import { MatDialog } from "@angular/material/dialog";
6
6
  import { CrocoHtmlOptions } from "../../../options";
7
- import { CrocoHtmlFileOptionsService } from "../../../services/croco-html-file-options.service";
7
+ import { CrocoHtmlFileOptionsService } from "../../../services/CrocoHtmlFileOptionsService";
8
8
  import * as i0 from "@angular/core";
9
9
  export declare class MainEditorComponent implements OnInit, AfterContentChecked, AfterViewInit {
10
10
  private readonly _clipboardService;
@@ -1,7 +1,7 @@
1
- import { EventEmitter, OnInit } from '@angular/core';
1
+ import { EventEmitter } from '@angular/core';
2
2
  import { HtmlBodyTag } from '../../../models/models';
3
3
  import * as i0 from "@angular/core";
4
- export declare class MainEditorBlockComponent implements OnInit {
4
+ export declare class MainEditorBlockComponent {
5
5
  textTags: string[];
6
6
  tag: HtmlBodyTag;
7
7
  onTagSaved: EventEmitter<HtmlBodyTag>;
@@ -9,7 +9,6 @@ export declare class MainEditorBlockComponent implements OnInit {
9
9
  tagUpdatedHandler(tag: HtmlBodyTag): void;
10
10
  save(): void;
11
11
  deleteItem(): void;
12
- ngOnInit(): void;
13
12
  static ɵfac: i0.ɵɵFactoryDeclaration<MainEditorBlockComponent, never>;
14
13
  static ɵcmp: i0.ɵɵComponentDeclaration<MainEditorBlockComponent, "croco-html-main-editor-block", never, { "tag": { "alias": "tag"; "required": false; }; }, { "onTagSaved": "onTagSaved"; "onTagRemoved": "onTagRemoved"; }, never, never, true, never>;
15
14
  }
@@ -2,7 +2,7 @@ import { EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
2
2
  import { PublicFilesQueryService } from '../../services/PublicFilesQueryService';
3
3
  import { CrocoHtmlEditorFileOptions, CrocoHtmlOptions } from '../../options';
4
4
  import { PrivateFilesQueryService } from "../../services/PrivateFilesQueryService";
5
- import { CrocoHtmlFileOptionsService } from "../../services/croco-html-file-options.service";
5
+ import { CrocoHtmlFileOptionsService } from "../../services/CrocoHtmlFileOptionsService";
6
6
  import * as i0 from "@angular/core";
7
7
  export interface SearchQuestionsFormData {
8
8
  q: string;
@@ -1,7 +1,7 @@
1
1
  import { EventEmitter } from '@angular/core';
2
2
  import { PublicFilesUploadResponse, PublicFileUploadService } from '../../services/PublicFileUploadService';
3
3
  import { PrivateFilesCreatedResult, PrivateFileUploadService } from "../../services/PrivateFileUploadService";
4
- import { CrocoHtmlFileOptionsService } from "../../services/croco-html-file-options.service";
4
+ import { CrocoHtmlFileOptionsService } from "../../services/CrocoHtmlFileOptionsService";
5
5
  import * as i0 from "@angular/core";
6
6
  export interface FilePostingStarted {
7
7
  filesCount: number;
package/lib/index.d.ts CHANGED
@@ -4,6 +4,7 @@ import { MainEditorComponent } from "./components";
4
4
  import { TextEditorComponent } from "./components";
5
5
  import { FileIdSelectComponent } from "./components";
6
6
  import { XmlTagHeaderInnerTextViewComponent } from "./components";
7
+ import { XmlTagHtmlViewComponent } from "./components";
7
8
  import { XmlTagRichTextViewComponent } from "./components";
8
9
  import { XmlTagTableViewComponent } from "./components";
9
10
  import { XmlTagViewComponent } from "./components";
@@ -12,14 +13,13 @@ import { VisualEditorComponent } from './components';
12
13
  import { AddFilesBtnComponent } from './components';
13
14
  import { XmlTagExternalVideoComponent } from "./components";
14
15
  import { HtmlRawEditorComponent } from "./components";
15
- import { MatTabsModule } from '@angular/material/tabs';
16
+ import { MatFormFieldModule } from '@angular/material/form-field';
16
17
  import { RichTextToHtmlPipe, TagToSpanPipe, ToHtmlBodyTagsPipe, ToPreviewHtmlPipe, ToPreviewPipe } from "./pipes";
17
18
  import { FileImageTagViewComponent, UploadFilesBtnComponent } from "./components";
18
19
  import { HtmlRawViewComponent } from "./components";
19
- import { HtmlViewComponent } from "./components";
20
20
  import { XmlTagCustomWidgetComponent } from "./components";
21
- export declare const EditorComponents: (typeof VisualEditorComponent | typeof MainEditorComponent | typeof AddFilesBtnComponent | typeof MainEditorBlockComponent | typeof FileIdSelectComponent | typeof ImageEditorComponent | typeof HtmlRawEditorComponent | typeof TextEditorComponent | typeof CustomWidgetEditorComponent)[];
22
- export declare const XmlComponents: (typeof HtmlViewComponent | typeof XmlTagCustomWidgetComponent | typeof FileImageTagViewComponent | typeof XmlTagExternalVideoComponent | typeof XmlTagHeaderInnerTextViewComponent | typeof XmlTagRichTextViewComponent | typeof XmlTagTableViewComponent | typeof HtmlRawViewComponent | typeof XmlTagViewComponent)[];
23
- export declare const CrocoPipes: (typeof ToPreviewHtmlPipe | typeof ToHtmlBodyTagsPipe | typeof ToPreviewPipe | typeof RichTextToHtmlPipe | typeof TagToSpanPipe)[];
24
- export declare const CrocoHtmlDeclarations: (typeof ToPreviewHtmlPipe | typeof ToHtmlBodyTagsPipe | typeof VisualEditorComponent | typeof HtmlViewComponent | typeof MainEditorComponent | typeof ToPreviewPipe | typeof AddFilesBtnComponent | typeof MainEditorBlockComponent | typeof FileIdSelectComponent | typeof ImageEditorComponent | typeof XmlTagCustomWidgetComponent | typeof FileImageTagViewComponent | typeof UploadFilesBtnComponent | typeof XmlTagExternalVideoComponent | typeof XmlTagHeaderInnerTextViewComponent | typeof RichTextToHtmlPipe | typeof XmlTagRichTextViewComponent | typeof XmlTagTableViewComponent | typeof HtmlRawViewComponent | typeof XmlTagViewComponent | typeof HtmlRawEditorComponent | typeof TextEditorComponent | typeof CustomWidgetEditorComponent | typeof TagToSpanPipe)[];
25
- export declare const MaterialModules: (typeof MatTabsModule)[];
21
+ export declare const EditorComponents: (typeof AddFilesBtnComponent | typeof MainEditorBlockComponent | typeof VisualEditorComponent | typeof TextEditorComponent | typeof ImageEditorComponent | typeof HtmlRawEditorComponent | typeof CustomWidgetEditorComponent | typeof FileIdSelectComponent | typeof MainEditorComponent)[];
22
+ export declare const XmlComponents: (typeof XmlTagHtmlViewComponent | typeof XmlTagRichTextViewComponent | typeof FileImageTagViewComponent | typeof HtmlRawViewComponent | typeof XmlTagCustomWidgetComponent | typeof XmlTagExternalVideoComponent | typeof XmlTagHeaderInnerTextViewComponent | typeof XmlTagTableViewComponent | typeof XmlTagViewComponent)[];
23
+ export declare const CrocoPipes: (typeof RichTextToHtmlPipe | typeof ToPreviewPipe | typeof TagToSpanPipe | typeof ToHtmlBodyTagsPipe | typeof ToPreviewHtmlPipe)[];
24
+ export declare const CrocoHtmlDeclarations: (typeof UploadFilesBtnComponent | typeof AddFilesBtnComponent | typeof MainEditorBlockComponent | typeof VisualEditorComponent | typeof XmlTagHtmlViewComponent | typeof RichTextToHtmlPipe | typeof XmlTagRichTextViewComponent | typeof FileImageTagViewComponent | typeof HtmlRawViewComponent | typeof XmlTagCustomWidgetComponent | typeof TextEditorComponent | typeof ImageEditorComponent | typeof HtmlRawEditorComponent | typeof CustomWidgetEditorComponent | typeof XmlTagExternalVideoComponent | typeof XmlTagHeaderInnerTextViewComponent | typeof XmlTagTableViewComponent | typeof XmlTagViewComponent | typeof FileIdSelectComponent | typeof ToPreviewPipe | typeof MainEditorComponent | typeof TagToSpanPipe | typeof ToHtmlBodyTagsPipe | typeof ToPreviewHtmlPipe)[];
25
+ export declare const MaterialModules: (typeof MatFormFieldModule)[];
@@ -1 +1,2 @@
1
1
  export * from "./HtmlViewController";
2
+ export * from "./CrocoHtmlFileOptionsService";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "croco-html",
3
- "version": "3.3.0",
3
+ "version": "3.3.3",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^18.2.13",
6
6
  "@angular/core": "^18.2.13",
@@ -1,32 +0,0 @@
1
- import { Injectable } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export class CrocoHtmlFileOptionsService {
4
- constructor() {
5
- this.localStorageToken = 'crocoHtmlEditorFileOptions';
6
- this.defaultOptions = {
7
- applicationId: null,
8
- usePrivateFiles: false,
9
- };
10
- }
11
- set(data) {
12
- localStorage.setItem(this.localStorageToken, JSON.stringify(data));
13
- }
14
- get() {
15
- try {
16
- const data = localStorage.getItem(this.localStorageToken);
17
- return data ? JSON.parse(data) : this.defaultOptions;
18
- }
19
- catch (e) {
20
- return this.defaultOptions;
21
- }
22
- }
23
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: CrocoHtmlFileOptionsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
24
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: CrocoHtmlFileOptionsService, providedIn: 'root' }); }
25
- }
26
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: CrocoHtmlFileOptionsService, decorators: [{
27
- type: Injectable,
28
- args: [{
29
- providedIn: 'root'
30
- }]
31
- }] });
32
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JvY28taHRtbC1maWxlLW9wdGlvbnMuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2Nyb2NvLWh0bWwvc3JjL2xpYi9zZXJ2aWNlcy9jcm9jby1odG1sLWZpbGUtb3B0aW9ucy5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7O0FBTTNDLE1BQU0sT0FBTywyQkFBMkI7SUFIeEM7UUFJbUIsc0JBQWlCLEdBQUcsNEJBQTRCLENBQUE7UUFDaEQsbUJBQWMsR0FBRztZQUNoQyxhQUFhLEVBQUUsSUFBSTtZQUNuQixlQUFlLEVBQUUsS0FB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