croco-html 3.1.0 → 3.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.
Files changed (35) hide show
  1. package/esm2022/lib/components/add-files-btn/add-files-btn.component.mjs +24 -22
  2. package/esm2022/lib/components/editor/html-editor-settings-modal/html-editor-settings-modal.component.mjs +47 -0
  3. package/esm2022/lib/components/editor/image-editor/image-editor.component.mjs +6 -6
  4. package/esm2022/lib/components/editor/main-editor/main-editor.component.mjs +40 -11
  5. package/esm2022/lib/components/file-id-select/file-id-select.component.mjs +33 -16
  6. package/esm2022/lib/components/upload-files-btn/upload-files-btn.component.mjs +27 -11
  7. package/esm2022/lib/consts/index.mjs +1 -1
  8. package/esm2022/lib/extensions/BodyTagsExtensions.mjs +1 -1
  9. package/esm2022/lib/extensions/HtmlExtractionMethods.mjs +1 -1
  10. package/esm2022/lib/extensions/ImageMethods.mjs +10 -4
  11. package/esm2022/lib/extensions/VideoMethods.mjs +5 -5
  12. package/esm2022/lib/models/image-models.mjs +1 -1
  13. package/esm2022/lib/options/index.mjs +1 -1
  14. package/esm2022/lib/services/PrivateFileUploadService.mjs +34 -0
  15. package/esm2022/lib/services/PrivateFilesQueryService.mjs +24 -0
  16. package/esm2022/lib/services/PublicFilesQueryService.mjs +1 -1
  17. package/esm2022/lib/services/croco-html-file-options.service.mjs +32 -0
  18. package/esm2022/sprites-ids.type.mjs +1 -1
  19. package/fesm2022/croco-html.mjs +249 -69
  20. package/fesm2022/croco-html.mjs.map +1 -1
  21. package/lib/components/add-files-btn/add-files-btn.component.d.ts +4 -1
  22. package/lib/components/editor/html-editor-settings-modal/html-editor-settings-modal.component.d.ts +17 -0
  23. package/lib/components/editor/image-editor/image-editor.component.d.ts +3 -3
  24. package/lib/components/editor/main-editor/main-editor.component.d.ts +8 -1
  25. package/lib/components/file-id-select/file-id-select.component.d.ts +16 -8
  26. package/lib/components/upload-files-btn/upload-files-btn.component.d.ts +8 -3
  27. package/lib/extensions/ImageMethods.d.ts +4 -3
  28. package/lib/index.d.ts +7 -7
  29. package/lib/models/image-models.d.ts +1 -1
  30. package/lib/options/index.d.ts +4 -0
  31. package/lib/services/PrivateFileUploadService.d.ts +26 -0
  32. package/lib/services/PrivateFilesQueryService.d.ts +21 -0
  33. package/lib/services/croco-html-file-options.service.d.ts +10 -0
  34. package/package.json +1 -1
  35. package/src/assets/sprites/symbol/croco-html-svg-sprite.svg +1 -1
@@ -2,6 +2,7 @@ import { EventEmitter, OnInit } 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
+ import { PrivateFilesCreatedResult } from "../../services/PrivateFileUploadService";
5
6
  import * as i0 from "@angular/core";
6
7
  export declare class AddFilesBtnComponent implements OnInit {
7
8
  postFilesStarted: EventEmitter<FilePostingStarted>;
@@ -10,7 +11,9 @@ export declare class AddFilesBtnComponent implements OnInit {
10
11
  constructor();
11
12
  filesTagsReady: EventEmitter<HtmlBodyTag[]>;
12
13
  postFilesStartedEventHandler(data: FilePostingStarted): void;
13
- publicFilesUploadedHandler(data: PublicFilesUploadResponse): void;
14
+ filesUploadedPublicHandler(data: PublicFilesUploadResponse): void;
15
+ filesUploadedPrivateHandler(data: PrivateFilesCreatedResult): void;
16
+ private buildFileTags;
14
17
  handleClick(): void;
15
18
  ngOnInit(): void;
16
19
  static ɵfac: i0.ɵɵFactoryDeclaration<AddFilesBtnComponent, never>;
@@ -0,0 +1,17 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { FormBuilder, FormGroup } from "@angular/forms";
3
+ import { MatDialogRef } from "@angular/material/dialog";
4
+ import { CrocoHtmlFileOptionsService } from "../../../services/croco-html-file-options.service";
5
+ import * as i0 from "@angular/core";
6
+ export declare class HtmlEditorSettingsModalComponent implements OnInit {
7
+ private readonly fb;
8
+ readonly dialogRef: MatDialogRef<HtmlEditorSettingsModalComponent>;
9
+ private readonly _htmlSettingsService;
10
+ form: FormGroup;
11
+ constructor(fb: FormBuilder, dialogRef: MatDialogRef<HtmlEditorSettingsModalComponent>, _htmlSettingsService: CrocoHtmlFileOptionsService);
12
+ ngOnInit(): void;
13
+ cancel(): void;
14
+ setSettings(): void;
15
+ static ɵfac: i0.ɵɵFactoryDeclaration<HtmlEditorSettingsModalComponent, never>;
16
+ static ɵcmp: i0.ɵɵComponentDeclaration<HtmlEditorSettingsModalComponent, "croco-html-html-editor-settings-modal", never, {}, {}, never, never, true, never>;
17
+ }
@@ -17,12 +17,12 @@ export declare class ImageEditorComponent implements OnInit, OnDestroy {
17
17
  tag: HtmlBodyTag;
18
18
  onErrorHandler(): void;
19
19
  onTagUpdated: EventEmitter<HtmlBodyTag>;
20
- get fileId(): unknown;
21
- set fileId(value: unknown);
20
+ get fileId(): string;
21
+ set fileId(value: string);
22
22
  constructor(_options: CrocoHtmlOptions, screenWidthService: ScreenWidthService);
23
23
  getSrc(): string;
24
24
  hasFileId(): boolean;
25
- onFileIdChanged(fileId: number): void;
25
+ onFileIdChanged(fileId: string): void;
26
26
  removeImageError(): void;
27
27
  ngOnInit(): void;
28
28
  requestChanged(): void;
@@ -2,18 +2,24 @@ import { AfterContentChecked, AfterViewInit, ChangeDetectorRef, EventEmitter, On
2
2
  import { MatSnackBar } from '@angular/material/snack-bar';
3
3
  import { ClipboardService } from 'ngx-clipboard';
4
4
  import { VisualEditorComponent } from '../visual-editor/visual-editor.component';
5
+ import { MatDialog } from "@angular/material/dialog";
6
+ import { CrocoHtmlOptions } from "../../../options";
7
+ import { CrocoHtmlFileOptionsService } from "../../../services/croco-html-file-options.service";
5
8
  import * as i0 from "@angular/core";
6
9
  export declare class MainEditorComponent implements OnInit, AfterContentChecked, AfterViewInit {
7
10
  private readonly _clipboardService;
8
11
  private readonly _snackBar;
9
12
  private readonly _cdref;
13
+ private readonly _dialog;
14
+ private readonly _htmlSettingsService;
10
15
  visualEditorRendered: boolean;
11
16
  visualEditor: VisualEditorComponent;
12
17
  showMarkUp: boolean;
13
18
  useHtmlRaw: boolean;
14
19
  html: string;
15
20
  onHtmlChanged: EventEmitter<string>;
16
- constructor(_clipboardService: ClipboardService, _snackBar: MatSnackBar, _cdref: ChangeDetectorRef);
21
+ showSettingsButton: boolean;
22
+ constructor(_clipboardService: ClipboardService, _snackBar: MatSnackBar, _cdref: ChangeDetectorRef, _dialog: MatDialog, _htmlSettingsService: CrocoHtmlFileOptionsService, options: CrocoHtmlOptions);
17
23
  ngAfterViewInit(): void;
18
24
  ngAfterContentChecked(): void;
19
25
  visualEditorRenderedHandler(): void;
@@ -22,6 +28,7 @@ export declare class MainEditorComponent implements OnInit, AfterContentChecked,
22
28
  recalculateBodyTags(): void;
23
29
  copyMarkUp(): void;
24
30
  ngOnInit(): void;
31
+ openSettingsModal(): void;
25
32
  static ɵfac: i0.ɵɵFactoryDeclaration<MainEditorComponent, never>;
26
33
  static ɵcmp: i0.ɵɵComponentDeclaration<MainEditorComponent, "croco-html-main-editor", never, { "showMarkUp": { "alias": "showMarkUp"; "required": false; }; "useHtmlRaw": { "alias": "useHtmlRaw"; "required": false; }; "html": { "alias": "html"; "required": false; }; }, { "html": "html"; "onHtmlChanged": "onHtmlChanged"; }, never, never, true, never>;
27
34
  }
@@ -1,23 +1,31 @@
1
1
  import { EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
2
2
  import { PublicFilesQueryService } from '../../services/PublicFilesQueryService';
3
- import { CrocoHtmlOptions } from '../../options';
4
- import { FileSimpleModel } from 'croco-generic-app-logic';
3
+ import { CrocoHtmlEditorFileOptions, CrocoHtmlOptions } from '../../options';
4
+ import { PrivateFilesQueryService } from "../../services/PrivateFilesQueryService";
5
+ import { CrocoHtmlFileOptionsService } from "../../services/croco-html-file-options.service";
5
6
  import * as i0 from "@angular/core";
6
7
  export interface SearchQuestionsFormData {
7
8
  q: string;
8
9
  }
10
+ export interface FileUnifiedModel {
11
+ fileId: string;
12
+ fileName: string;
13
+ }
9
14
  export declare class FileIdSelectComponent implements OnInit, OnChanges {
10
15
  private readonly _publicFileService;
16
+ private readonly _privateFileService;
17
+ private _htmlSettingsService;
11
18
  private readonly _options;
12
19
  q: string;
13
20
  labelText: string;
14
- fileId: number;
21
+ fileId: string;
15
22
  loading: boolean;
16
- files: FileSimpleModel[];
17
- onFileIdChanged: EventEmitter<number>;
18
- constructor(_publicFileService: PublicFilesQueryService, _options: CrocoHtmlOptions);
19
- onModelChanged(fileId: number): void;
20
- getSrc(fileId: number): string;
23
+ files: FileUnifiedModel[];
24
+ onFileIdChanged: EventEmitter<string>;
25
+ get crocoHtmlEditorFileOptions(): CrocoHtmlEditorFileOptions;
26
+ constructor(_publicFileService: PublicFilesQueryService, _privateFileService: PrivateFilesQueryService, _htmlSettingsService: CrocoHtmlFileOptionsService, _options: CrocoHtmlOptions);
27
+ onModelChanged(fileId: string): void;
28
+ getSrc(fileId: string): string;
21
29
  ngOnInit(): void;
22
30
  loadFiles(): void;
23
31
  onSearchChanged(q: {
@@ -1,11 +1,15 @@
1
1
  import { EventEmitter } from '@angular/core';
2
2
  import { PublicFilesUploadResponse, PublicFileUploadService } from '../../services/PublicFileUploadService';
3
+ import { PrivateFilesCreatedResult, PrivateFileUploadService } from "../../services/PrivateFileUploadService";
4
+ import { CrocoHtmlFileOptionsService } from "../../services/croco-html-file-options.service";
3
5
  import * as i0 from "@angular/core";
4
6
  export interface FilePostingStarted {
5
7
  filesCount: number;
6
8
  }
7
9
  export declare class UploadFilesBtnComponent {
8
- private _fileUploadService;
10
+ private _publicFileUploadService;
11
+ private _privateFileUploadService;
12
+ private _htmlSettingsService;
9
13
  private fileInput;
10
14
  extAccepts: string;
11
15
  isMultiple: boolean;
@@ -13,9 +17,10 @@ export declare class UploadFilesBtnComponent {
13
17
  hidden: boolean;
14
18
  postFilesStarted: EventEmitter<FilePostingStarted>;
15
19
  onPublicFilesUploaded: EventEmitter<PublicFilesUploadResponse>;
16
- constructor(_fileUploadService: PublicFileUploadService);
20
+ onPrivateFilesUploaded: EventEmitter<PrivateFilesCreatedResult>;
21
+ constructor(_publicFileUploadService: PublicFileUploadService, _privateFileUploadService: PrivateFileUploadService, _htmlSettingsService: CrocoHtmlFileOptionsService);
17
22
  handleFileInput(files: FileList): void;
18
23
  clickFileInput(): void;
19
24
  static ɵfac: i0.ɵɵFactoryDeclaration<UploadFilesBtnComponent, never>;
20
- static ɵcmp: i0.ɵɵComponentDeclaration<UploadFilesBtnComponent, "croco-app-upload-files-btn", never, { "extAccepts": { "alias": "extAccepts"; "required": false; }; "isMultiple": { "alias": "isMultiple"; "required": false; }; "btnText": { "alias": "btnText"; "required": false; }; "hidden": { "alias": "hidden"; "required": false; }; }, { "postFilesStarted": "postFilesStarted"; "onPublicFilesUploaded": "onPublicFilesUploaded"; }, never, never, true, never>;
25
+ static ɵcmp: i0.ɵɵComponentDeclaration<UploadFilesBtnComponent, "croco-app-upload-files-btn", never, { "extAccepts": { "alias": "extAccepts"; "required": false; }; "isMultiple": { "alias": "isMultiple"; "required": false; }; "btnText": { "alias": "btnText"; "required": false; }; "hidden": { "alias": "hidden"; "required": false; }; }, { "postFilesStarted": "postFilesStarted"; "onPublicFilesUploaded": "onPublicFilesUploaded"; "onPrivateFilesUploaded": "onPrivateFilesUploaded"; }, never, never, true, never>;
21
26
  }
@@ -11,9 +11,10 @@ export declare class FileImageTagDataConsts {
11
11
  static DefaultValueForFileImage: string;
12
12
  }
13
13
  export declare class ImageMethods {
14
- static buildUrl(fileId: number, sizeType: string, options: CrocoHtmlOptions): string;
15
- static buildSmallUrl(fileId: number, options: CrocoHtmlOptions): string;
16
- static buildMediumUrl(fileId: number, options: CrocoHtmlOptions): string;
14
+ static buildUrl(fileId: string, sizeType: string, options: CrocoHtmlOptions): string;
15
+ static buildSmallUrl(fileId: string, options: CrocoHtmlOptions): string;
16
+ static buildMediumUrl(fileId: string, options: CrocoHtmlOptions): string;
17
+ static isPrivateFileId(fileId: string): boolean;
17
18
  static ExtractImage(elem: HTMLElement, options: CrocoHtmlOptions): FileImageTag;
18
19
  static mediaRequestStringToArrayParser: (data: string) => IMediaRequest[];
19
20
  static createMediaRequestValue(arr: string[], attribute: string): number | null;
package/lib/index.d.ts CHANGED
@@ -4,7 +4,6 @@ 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";
8
7
  import { XmlTagRichTextViewComponent } from "./components";
9
8
  import { XmlTagTableViewComponent } from "./components";
10
9
  import { XmlTagViewComponent } from "./components";
@@ -13,13 +12,14 @@ import { VisualEditorComponent } from './components';
13
12
  import { AddFilesBtnComponent } from './components';
14
13
  import { XmlTagExternalVideoComponent } from "./components";
15
14
  import { HtmlRawEditorComponent } from "./components";
16
- import { MatFormFieldModule } from '@angular/material/form-field';
15
+ import { MatTabsModule } from '@angular/material/tabs';
17
16
  import { RichTextToHtmlPipe, TagToSpanPipe, ToHtmlBodyTagsPipe, ToPreviewHtmlPipe, ToPreviewPipe } from "./pipes";
18
17
  import { FileImageTagViewComponent, UploadFilesBtnComponent } from "./components";
19
18
  import { HtmlRawViewComponent } from "./components";
19
+ import { HtmlViewComponent } from "./components";
20
20
  import { XmlTagCustomWidgetComponent } from "./components";
21
- export declare const EditorComponents: (typeof AddFilesBtnComponent | typeof HtmlRawEditorComponent | typeof FileIdSelectComponent | typeof ImageEditorComponent | typeof TextEditorComponent | typeof CustomWidgetEditorComponent | typeof MainEditorBlockComponent | typeof VisualEditorComponent | typeof MainEditorComponent)[];
22
- export declare const XmlComponents: (typeof XmlTagExternalVideoComponent | typeof XmlTagHeaderInnerTextViewComponent | typeof XmlTagHtmlViewComponent | typeof XmlTagRichTextViewComponent | typeof XmlTagTableViewComponent | typeof FileImageTagViewComponent | typeof HtmlRawViewComponent | typeof XmlTagCustomWidgetComponent | 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 XmlTagExternalVideoComponent | typeof XmlTagHeaderInnerTextViewComponent | typeof XmlTagHtmlViewComponent | typeof RichTextToHtmlPipe | typeof XmlTagRichTextViewComponent | typeof XmlTagTableViewComponent | typeof FileImageTagViewComponent | typeof HtmlRawViewComponent | typeof XmlTagCustomWidgetComponent | typeof XmlTagViewComponent | typeof HtmlRawEditorComponent | typeof FileIdSelectComponent | typeof ImageEditorComponent | typeof TextEditorComponent | typeof CustomWidgetEditorComponent | typeof MainEditorBlockComponent | typeof VisualEditorComponent | typeof ToPreviewPipe | typeof MainEditorComponent | typeof TagToSpanPipe | typeof ToHtmlBodyTagsPipe | typeof ToPreviewHtmlPipe)[];
25
- export declare const MaterialModules: (typeof MatFormFieldModule)[];
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)[];
@@ -8,7 +8,7 @@ export interface FileImageTag {
8
8
  }
9
9
  export interface FileImageTagData {
10
10
  src: string;
11
- fileId: number;
11
+ fileId: string;
12
12
  screenMediaRequest: string;
13
13
  }
14
14
  export interface IMediaRequest {
@@ -21,6 +21,10 @@ export interface CrocoHtmlOptions {
21
21
  * Использовать кнопку для отрисовки кастомных виджетов
22
22
  */
23
23
  useCustomWidgetsButton: boolean;
24
+ /**
25
+ * Показывать кнопку для запуска настроек
26
+ */
27
+ showSettingsButton: boolean;
24
28
  /**
25
29
  * Обработчик нажатия на кнопку кастомных виджетов
26
30
  * @returns
@@ -0,0 +1,26 @@
1
+ import { HttpClient, HttpEvent } from '@angular/common/http';
2
+ import { Observable } from 'rxjs';
3
+ import * as i0 from "@angular/core";
4
+ export interface UploadPrivateFilesWithProgressEvent {
5
+ loading: boolean;
6
+ response?: PrivateFilesCreatedResult;
7
+ uploadingLoaded: number;
8
+ uploadingTotal: number;
9
+ }
10
+ export interface PrivateFilesCreatedResult {
11
+ succeeded: boolean;
12
+ errorMessage: string;
13
+ setId: string;
14
+ fileIds: Array<string>;
15
+ }
16
+ export declare class PrivateFileUploadService {
17
+ private readonly _httpClient;
18
+ private readonly baseUrl;
19
+ constructor(_httpClient: HttpClient, baseUrl: string);
20
+ postFiles(files: FileList, applicationId: string | null): Observable<PrivateFilesCreatedResult>;
21
+ postFilesInner(formData: FormData, applicationId: string | null, withProgress: true): Observable<HttpEvent<PrivateFilesCreatedResult>>;
22
+ postFilesInner(formData: FormData, applicationId: string | null, withProgress?: false): Observable<PrivateFilesCreatedResult>;
23
+ postFilesInner(formData: FormData, applicationId: string | null, withProgress: boolean): Observable<PrivateFilesCreatedResult> | Observable<HttpEvent<PrivateFilesCreatedResult>>;
24
+ static ɵfac: i0.ɵɵFactoryDeclaration<PrivateFileUploadService, never>;
25
+ static ɵprov: i0.ɵɵInjectableDeclaration<PrivateFileUploadService>;
26
+ }
@@ -0,0 +1,21 @@
1
+ import { HttpClient } from "@angular/common/http";
2
+ import { Observable } from "rxjs";
3
+ import { GetListResult, FileType, SearchFilesRequest } from "./PublicFilesQueryService";
4
+ import * as i0 from "@angular/core";
5
+ export interface PrivateFileNameModel {
6
+ id: string;
7
+ setId: string;
8
+ fileName: string;
9
+ type: FileType;
10
+ downloadUrl: string;
11
+ createdOn: string;
12
+ applicationId: string;
13
+ }
14
+ export declare class PrivateFilesQueryService {
15
+ private readonly _httpClient;
16
+ private readonly _baseControllerUrl;
17
+ constructor(_httpClient: HttpClient, baseUrl: string);
18
+ search(model: SearchFilesRequest): Observable<GetListResult<PrivateFileNameModel>>;
19
+ static ɵfac: i0.ɵɵFactoryDeclaration<PrivateFilesQueryService, never>;
20
+ static ɵprov: i0.ɵɵInjectableDeclaration<PrivateFilesQueryService>;
21
+ }
@@ -0,0 +1,10 @@
1
+ import { CrocoHtmlEditorFileOptions } from "../options";
2
+ import * as i0 from "@angular/core";
3
+ export declare class CrocoHtmlFileOptionsService {
4
+ private readonly localStorageToken;
5
+ private readonly defaultOptions;
6
+ set(data: CrocoHtmlEditorFileOptions): void;
7
+ get(): CrocoHtmlEditorFileOptions;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<CrocoHtmlFileOptionsService, never>;
9
+ static ɵprov: i0.ɵɵInjectableDeclaration<CrocoHtmlFileOptionsService>;
10
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "croco-html",
3
- "version": "3.1.0",
3
+ "version": "3.3.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^18.2.13",
6
6
  "@angular/core": "^18.2.13",
@@ -1 +1 @@
1
- <?xml version="1.0" encoding="utf-8"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><symbol fill="none" viewBox="0 0 20 20" id="align-center" xmlns="http://www.w3.org/2000/svg"><path d="M5 14.688h10M3.125 11.562h13.75M5 8.438h10M3.125 5.312h13.75" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" stroke="currentColor"/></symbol><symbol fill="none" viewBox="0 0 20 20" id="align-left" xmlns="http://www.w3.org/2000/svg"><path d="M3.125 14.688h10m-10-3.126h13.75M3.125 8.438h10m-10-3.126h13.75" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" stroke="currentColor"/></symbol><symbol fill="currentColor" viewBox="0 0 20 20" id="align-right" xmlns="http://www.w3.org/2000/svg"><path d="M6.875 14.688h10m-13.75-3.126h13.75m-10-3.124h10M3.125 5.312h13.75" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" stroke="currentColor"/></symbol><symbol fill="none" viewBox="0 0 24 24" id="move-icon" xmlns="http://www.w3.org/2000/svg"><path d="M14.652 19.098 12 21.75m0 0-2.652-2.652M12 21.75V15m-7.098-.348L2.25 12m0 0 2.652-2.652M2.25 12H9m10.098-2.652L21.75 12m0 0-2.652 2.652M21.75 12H15M9.348 4.902 12 2.25m0 0 2.652 2.652M12 2.25V9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/></symbol><symbol viewBox="0 0 30 24" id="source-code-tab" xmlns="http://www.w3.org/2000/svg"><path d="m13.075 23.976-2.86-.83a.563.563 0 0 1-.384-.698L16.229.407a.563.563 0 0 1 .699-.384l2.86.83c.3.084.468.398.384.698l-6.399 22.04a.562.562 0 0 1-.698.385Zm-5.344-5.26 2.039-2.175a.563.563 0 0 0-.038-.806L5.486 12l4.246-3.736a.559.559 0 0 0 .038-.806L7.73 5.282a.563.563 0 0 0-.796-.023L.179 11.587c-.239.22-.239.6 0 .82l6.755 6.333c.23.215.586.206.797-.024Zm15.337.028 6.755-6.332c.24-.22.24-.6 0-.82l-6.755-6.338a.568.568 0 0 0-.797.023l-2.039 2.175a.563.563 0 0 0 .038.807l4.247 3.74-4.247 3.736a.559.559 0 0 0-.038.806l2.04 2.175c.21.23.567.24.796.028Z"/></symbol><symbol fill="none" viewBox="0 0 20 20" id="tag-button-button" xmlns="http://www.w3.org/2000/svg"><path stroke="currentColor" d="M10 3.75v5.938m3.75-5.451a6.875 6.875 0 1 1-7.5 0" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></symbol><symbol fill="none" viewBox="0 0 20 20" id="tag-button-custom-widget" xmlns="http://www.w3.org/2000/svg"><path stroke="currentColor" d="M16.25 15v1.25m-2.5-3.75h2.5m-5 3.75h2.5v-5m-2.5 0v2.5m-6.875-2.5h3.75c.345 0 .625.28.625.625v3.75c0 .345-.28.625-.625.625h-3.75a.625.625 0 0 1-.625-.625v-3.75c0-.345.28-.625.625-.625Zm7.5-7.5h3.75c.345 0 .625.28.625.625v3.75c0 .345-.28.625-.625.625h-3.75a.625.625 0 0 1-.625-.625v-3.75c0-.345.28-.625.625-.625Zm-7.5 0h3.75c.345 0 .625.28.625.625v3.75c0 .345-.28.625-.625.625h-3.75a.625.625 0 0 1-.625-.625v-3.75c0-.345.28-.625.625-.625Z" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></symbol><symbol fill="none" viewBox="0 0 24 24" id="tag-button-download-file-button" xmlns="http://www.w3.org/2000/svg"><path stroke="currentColor" clip-rule="evenodd" d="M4.424 9.417c-.924 0-1.674.75-1.674 1.674v8.485c0 .924.75 1.674 1.674 1.674h15.152c.924 0 1.674-.75 1.674-1.674V11.09c0-.925-.75-1.674-1.674-1.674h-3.637a.75.75 0 0 1 0-1.5h3.637a3.174 3.174 0 0 1 3.174 3.174v8.485a3.174 3.174 0 0 1-3.174 3.174H4.424a3.174 3.174 0 0 1-3.174-3.174V11.09a3.174 3.174 0 0 1 3.174-3.174h3.637a.75.75 0 1 1 0 1.5H4.424Z"/><path stroke="currentColor" clip-rule="evenodd" d="M12 1.25a.75.75 0 0 1 .75.75v13.94a.75.75 0 0 1-1.5 0V2a.75.75 0 0 1 .75-.75Z"/><path stroke="currentColor" clip-rule="evenodd" d="M7.833 12.985a.75.75 0 0 1 1.061 0L12 16.09l3.106-3.106a.75.75 0 0 1 1.06 1.06l-3.636 3.637a.75.75 0 0 1-1.06 0l-3.637-3.636a.75.75 0 0 1 0-1.061Z"/></symbol><symbol fill="none" viewBox="0 0 20 20" id="tag-button-external-video" xmlns="http://www.w3.org/2000/svg"><path stroke="currentColor" d="m14.375 8.75 4.375-2.5v7.5l-4.375-2.5m-12.5-6.563h10a2.5 2.5 0 0 1 2.5 2.5v7.5a.624.624 0 0 1-.625.626h-10a2.5 2.5 0 0 1-2.5-2.5v-7.5a.625.625 0 0 1 .625-.625Z" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></symbol><symbol fill="none" viewBox="0 0 20 20" id="tag-button-file-image" xmlns="http://www.w3.org/2000/svg"><path d="m2.5 13.125 3.933-3.933a.625.625 0 0 1 .884 0l3.491 3.491a.626.626 0 0 0 .884 0l1.616-1.616a.626.626 0 0 1 .884 0l3.308 3.308M3.125 3.75h13.75c.345 0 .625.28.625.625v11.25c0 .345-.28.625-.625.625H3.125a.625.625 0 0 1-.625-.625V4.375c0-.345.28-.625.625-.625Zm10 4.063a.937.937 0 1 1-1.875 0 .937.937 0 0 1 1.875 0Z" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" stroke="currentColor"/></symbol><symbol fill="none" viewBox="0 0 20 20" id="tag-button-html-raw" xmlns="http://www.w3.org/2000/svg"><path d="M15 6.875 18.75 10 15 13.125M5 6.875 1.25 10 5 13.125m7.5-10-5 13.75" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></symbol><symbol fill="none" viewBox="0 0 20 20" id="tag-button-text" xmlns="http://www.w3.org/2000/svg"><path d="M7.5 15.625h5M10 4.375v11.25m-6.25-8.75v-2.5h12.5v2.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></symbol><symbol viewBox="0 0 32 30" id="viewer-tab" xmlns="http://www.w3.org/2000/svg"><path d="M31.808 14.189C28.797 8.31 22.83 4.333 16.003 4.333 9.175 4.333 3.208 8.311.197 14.19a1.8 1.8 0 0 0 0 1.622c3.011 5.878 8.978 9.856 15.806 9.856 6.827 0 12.794-3.978 15.805-9.856a1.8 1.8 0 0 0 0-1.622ZM16.003 23a8 8 0 1 1 0-16 8 8 0 0 1 0 16Zm0-13.333a5.294 5.294 0 0 0-1.406.21 2.661 2.661 0 0 1-3.717 3.717 5.323 5.323 0 1 0 5.123-3.927Z"/><path fill="none" d="M0 0h32v28.444H0z"/></symbol><symbol viewBox="0 0 32 26" id="visual-editor-tab" xmlns="http://www.w3.org/2000/svg"><path d="M12.75 13.285a.794.794 0 0 0 1.13 0l.565-.565a.794.794 0 0 0 0-1.13l-1.78-1.79 1.785-1.785a.794.794 0 0 0 0-1.13l-.565-.565a.794.794 0 0 0-1.13 0L9.84 9.235a.794.794 0 0 0 0 1.13l2.92 2.915-.01.005Zm4.8-.565.565.565a.794.794 0 0 0 1.13 0l2.915-2.915a.794.794 0 0 0 0-1.13l-2.915-2.915a.794.794 0 0 0-1.13 0l-.565.565a.794.794 0 0 0 0 1.13l1.79 1.78-1.785 1.785a.794.794 0 0 0 0 1.13l-.005.005ZM31.2 21H19.075c-.035.99-.735 1.6-1.635 1.6H14.4c-.935 0-1.65-.875-1.64-1.6H.8c-.44 0-.8.36-.8.8v.8c0 1.76 1.44 3.2 3.2 3.2h25.6c1.76 0 3.2-1.44 3.2-3.2v-.8c0-.44-.36-.8-.8-.8ZM28.8 2.6c0-1.32-1.08-2.4-2.4-2.4H5.6C4.28.2 3.2 1.28 3.2 2.6v16.8h25.6V2.6Zm-3.2 13.6H6.4V3.4h19.2v12.8Z"/><path fill="none" d="M0 0h32v25.6H0z"/></symbol></svg>
1
+ <?xml version="1.0" encoding="utf-8"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><symbol fill="none" viewBox="0 0 20 20" id="align-center" xmlns="http://www.w3.org/2000/svg"><path d="M5 14.688h10M3.125 11.562h13.75M5 8.438h10M3.125 5.312h13.75" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" stroke="currentColor"/></symbol><symbol fill="none" viewBox="0 0 20 20" id="align-left" xmlns="http://www.w3.org/2000/svg"><path d="M3.125 14.688h10m-10-3.126h13.75M3.125 8.438h10m-10-3.126h13.75" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" stroke="currentColor"/></symbol><symbol fill="currentColor" viewBox="0 0 20 20" id="align-right" xmlns="http://www.w3.org/2000/svg"><path d="M6.875 14.688h10m-13.75-3.126h13.75m-10-3.124h10M3.125 5.312h13.75" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" stroke="currentColor"/></symbol><symbol fill="none" viewBox="0 0 32 32" id="gear" xmlns="http://www.w3.org/2000/svg"><path d="M16 22a6 6 0 1 0 0-12 6 6 0 0 0 0 12Z" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M15.359 5.52 13 3.75a1 1 0 0 0-.897-.155c-.73.229-1.44.522-2.118.876a1 1 0 0 0-.526.746l-.417 2.919a10.704 10.704 0 0 0-.906.906l-2.919.418a1 1 0 0 0-.744.524 12.915 12.915 0 0 0-.878 2.117 1 1 0 0 0 .155.9l1.77 2.358a10.734 10.734 0 0 0 0 1.282L3.75 19a1 1 0 0 0-.155.897c.229.73.522 1.44.876 2.118a1.002 1.002 0 0 0 .746.526l2.919.417a10.636 10.636 0 0 0 .906.906l.418 2.919a1 1 0 0 0 .524.744 12.91 12.91 0 0 0 2.117.878 1 1 0 0 0 .9-.155l2.358-1.77a10.631 10.631 0 0 0 1.282 0L19 28.25a.998.998 0 0 0 .897.155 12.9 12.9 0 0 0 2.118-.876 1 1 0 0 0 .526-.746l.417-2.919a10.812 10.812 0 0 0 .906-.906l2.919-.418a.998.998 0 0 0 .744-.524c.355-.678.649-1.387.878-2.117a1 1 0 0 0-.155-.9l-1.77-2.358a10.972 10.972 0 0 0 0-1.282L28.25 13a1 1 0 0 0 .155-.897c-.229-.73-.522-1.44-.876-2.118a1 1 0 0 0-.746-.526l-2.919-.417a10.584 10.584 0 0 0-.906-.906l-.418-2.919a1 1 0 0 0-.524-.744 12.92 12.92 0 0 0-2.117-.878 1 1 0 0 0-.9.155l-2.358 1.77a10.7 10.7 0 0 0-1.282 0Z" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></symbol><symbol fill="none" viewBox="0 0 24 24" id="move-icon" xmlns="http://www.w3.org/2000/svg"><path d="M14.652 19.098 12 21.75m0 0-2.652-2.652M12 21.75V15m-7.098-.348L2.25 12m0 0 2.652-2.652M2.25 12H9m10.098-2.652L21.75 12m0 0-2.652 2.652M21.75 12H15M9.348 4.902 12 2.25m0 0 2.652 2.652M12 2.25V9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/></symbol><symbol viewBox="0 0 30 24" id="source-code-tab" xmlns="http://www.w3.org/2000/svg"><path d="m13.075 23.976-2.86-.83a.563.563 0 0 1-.384-.698L16.229.407a.563.563 0 0 1 .699-.384l2.86.83c.3.084.468.398.384.698l-6.399 22.04a.562.562 0 0 1-.698.385Zm-5.344-5.26 2.039-2.175a.563.563 0 0 0-.038-.806L5.486 12l4.246-3.736a.559.559 0 0 0 .038-.806L7.73 5.282a.563.563 0 0 0-.796-.023L.179 11.587c-.239.22-.239.6 0 .82l6.755 6.333c.23.215.586.206.797-.024Zm15.337.028 6.755-6.332c.24-.22.24-.6 0-.82l-6.755-6.338a.568.568 0 0 0-.797.023l-2.039 2.175a.563.563 0 0 0 .038.807l4.247 3.74-4.247 3.736a.559.559 0 0 0-.038.806l2.04 2.175c.21.23.567.24.796.028Z"/></symbol><symbol fill="none" viewBox="0 0 20 20" id="tag-button-button" xmlns="http://www.w3.org/2000/svg"><path stroke="currentColor" d="M10 3.75v5.938m3.75-5.451a6.875 6.875 0 1 1-7.5 0" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></symbol><symbol fill="none" viewBox="0 0 20 20" id="tag-button-custom-widget" xmlns="http://www.w3.org/2000/svg"><path stroke="currentColor" d="M16.25 15v1.25m-2.5-3.75h2.5m-5 3.75h2.5v-5m-2.5 0v2.5m-6.875-2.5h3.75c.345 0 .625.28.625.625v3.75c0 .345-.28.625-.625.625h-3.75a.625.625 0 0 1-.625-.625v-3.75c0-.345.28-.625.625-.625Zm7.5-7.5h3.75c.345 0 .625.28.625.625v3.75c0 .345-.28.625-.625.625h-3.75a.625.625 0 0 1-.625-.625v-3.75c0-.345.28-.625.625-.625Zm-7.5 0h3.75c.345 0 .625.28.625.625v3.75c0 .345-.28.625-.625.625h-3.75a.625.625 0 0 1-.625-.625v-3.75c0-.345.28-.625.625-.625Z" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></symbol><symbol fill="none" viewBox="0 0 24 24" id="tag-button-download-file-button" xmlns="http://www.w3.org/2000/svg"><path stroke="currentColor" clip-rule="evenodd" d="M4.424 9.417c-.924 0-1.674.75-1.674 1.674v8.485c0 .924.75 1.674 1.674 1.674h15.152c.924 0 1.674-.75 1.674-1.674V11.09c0-.925-.75-1.674-1.674-1.674h-3.637a.75.75 0 0 1 0-1.5h3.637a3.174 3.174 0 0 1 3.174 3.174v8.485a3.174 3.174 0 0 1-3.174 3.174H4.424a3.174 3.174 0 0 1-3.174-3.174V11.09a3.174 3.174 0 0 1 3.174-3.174h3.637a.75.75 0 1 1 0 1.5H4.424Z"/><path stroke="currentColor" clip-rule="evenodd" d="M12 1.25a.75.75 0 0 1 .75.75v13.94a.75.75 0 0 1-1.5 0V2a.75.75 0 0 1 .75-.75Z"/><path stroke="currentColor" clip-rule="evenodd" d="M7.833 12.985a.75.75 0 0 1 1.061 0L12 16.09l3.106-3.106a.75.75 0 0 1 1.06 1.06l-3.636 3.637a.75.75 0 0 1-1.06 0l-3.637-3.636a.75.75 0 0 1 0-1.061Z"/></symbol><symbol fill="none" viewBox="0 0 20 20" id="tag-button-external-video" xmlns="http://www.w3.org/2000/svg"><path stroke="currentColor" d="m14.375 8.75 4.375-2.5v7.5l-4.375-2.5m-12.5-6.563h10a2.5 2.5 0 0 1 2.5 2.5v7.5a.624.624 0 0 1-.625.626h-10a2.5 2.5 0 0 1-2.5-2.5v-7.5a.625.625 0 0 1 .625-.625Z" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></symbol><symbol fill="none" viewBox="0 0 20 20" id="tag-button-file-image" xmlns="http://www.w3.org/2000/svg"><path d="m2.5 13.125 3.933-3.933a.625.625 0 0 1 .884 0l3.491 3.491a.626.626 0 0 0 .884 0l1.616-1.616a.626.626 0 0 1 .884 0l3.308 3.308M3.125 3.75h13.75c.345 0 .625.28.625.625v11.25c0 .345-.28.625-.625.625H3.125a.625.625 0 0 1-.625-.625V4.375c0-.345.28-.625.625-.625Zm10 4.063a.937.937 0 1 1-1.875 0 .937.937 0 0 1 1.875 0Z" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" stroke="currentColor"/></symbol><symbol fill="none" viewBox="0 0 20 20" id="tag-button-html-raw" xmlns="http://www.w3.org/2000/svg"><path d="M15 6.875 18.75 10 15 13.125M5 6.875 1.25 10 5 13.125m7.5-10-5 13.75" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></symbol><symbol fill="none" viewBox="0 0 20 20" id="tag-button-text" xmlns="http://www.w3.org/2000/svg"><path d="M7.5 15.625h5M10 4.375v11.25m-6.25-8.75v-2.5h12.5v2.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></symbol><symbol viewBox="0 0 32 30" id="viewer-tab" xmlns="http://www.w3.org/2000/svg"><path d="M31.808 14.189C28.797 8.31 22.83 4.333 16.003 4.333 9.175 4.333 3.208 8.311.197 14.19a1.8 1.8 0 0 0 0 1.622c3.011 5.878 8.978 9.856 15.806 9.856 6.827 0 12.794-3.978 15.805-9.856a1.8 1.8 0 0 0 0-1.622ZM16.003 23a8 8 0 1 1 0-16 8 8 0 0 1 0 16Zm0-13.333a5.294 5.294 0 0 0-1.406.21 2.661 2.661 0 0 1-3.717 3.717 5.323 5.323 0 1 0 5.123-3.927Z"/><path fill="none" d="M0 0h32v28.444H0z"/></symbol><symbol viewBox="0 0 32 26" id="visual-editor-tab" xmlns="http://www.w3.org/2000/svg"><path d="M12.75 13.285a.794.794 0 0 0 1.13 0l.565-.565a.794.794 0 0 0 0-1.13l-1.78-1.79 1.785-1.785a.794.794 0 0 0 0-1.13l-.565-.565a.794.794 0 0 0-1.13 0L9.84 9.235a.794.794 0 0 0 0 1.13l2.92 2.915-.01.005Zm4.8-.565.565.565a.794.794 0 0 0 1.13 0l2.915-2.915a.794.794 0 0 0 0-1.13l-2.915-2.915a.794.794 0 0 0-1.13 0l-.565.565a.794.794 0 0 0 0 1.13l1.79 1.78-1.785 1.785a.794.794 0 0 0 0 1.13l-.005.005ZM31.2 21H19.075c-.035.99-.735 1.6-1.635 1.6H14.4c-.935 0-1.65-.875-1.64-1.6H.8c-.44 0-.8.36-.8.8v.8c0 1.76 1.44 3.2 3.2 3.2h25.6c1.76 0 3.2-1.44 3.2-3.2v-.8c0-.44-.36-.8-.8-.8ZM28.8 2.6c0-1.32-1.08-2.4-2.4-2.4H5.6C4.28.2 3.2 1.28 3.2 2.6v16.8h25.6V2.6Zm-3.2 13.6H6.4V3.4h19.2v12.8Z"/><path fill="none" d="M0 0h32v25.6H0z"/></symbol></svg>