croco-html 20.2.2 → 20.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.
@@ -1,11 +1,11 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Inject, Injectable, EventEmitter, Output, Input, ViewChild, Component, inject, ChangeDetectorRef, ChangeDetectionStrategy, ViewContainerRef, ViewEncapsulation, Pipe, NgModule } from '@angular/core';
2
+ import { Inject, Injectable, EventEmitter, Output, Input, ViewChild, Component, inject, ChangeDetectorRef, ChangeDetectionStrategy, ViewContainerRef, DestroyRef, ViewEncapsulation, Pipe, NgModule } from '@angular/core';
3
3
  import * as i2 from '@angular/material/button';
4
4
  import { MatButton, MatIconButton, MatButtonModule } from '@angular/material/button';
5
5
  import * as i1 from '@angular/common/http';
6
- import * as i2$2 from '@angular/material/input';
6
+ import * as i1$4 from '@angular/material/input';
7
7
  import { MatInput, MatInputModule, MatFormField as MatFormField$1, MatLabel as MatLabel$1 } from '@angular/material/input';
8
- import * as i1$4 from '@angular/material/form-field';
8
+ import * as i4 from '@angular/material/form-field';
9
9
  import { MatFormField, MatLabel, MatFormFieldModule } from '@angular/material/form-field';
10
10
  import * as i27 from '@angular/material/icon';
11
11
  import { MatIcon, MatIconModule } from '@angular/material/icon';
@@ -17,16 +17,18 @@ import { Subject, takeUntil, BehaviorSubject } from 'rxjs';
17
17
  import * as i6 from '@ng-select/ng-select';
18
18
  import { NgSelectModule } from '@ng-select/ng-select';
19
19
  import * as i1$2 from '@angular/platform-browser';
20
+ import { DomSanitizer } from '@angular/platform-browser';
20
21
  import * as i1$3 from '@angular/material/card';
21
22
  import { MatCardModule, MatCard, MatCardContent } from '@angular/material/card';
22
23
  import { NgStyle, JsonPipe, NgTemplateOutlet, CommonModule } from '@angular/common';
23
24
  import * as i2$1 from '@angular/router';
24
25
  import * as i12 from '@angular/material/tooltip';
25
26
  import { MatTooltip, MatTooltipModule } from '@angular/material/tooltip';
27
+ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
28
+ import * as i2$2 from '@angular/cdk/text-field';
29
+ import { CdkTextareaAutosize } from '@angular/cdk/text-field';
26
30
  import * as i13 from '@angular/material/checkbox';
27
31
  import { MatCheckbox, MatCheckboxModule } from '@angular/material/checkbox';
28
- import * as i3 from '@angular/cdk/text-field';
29
- import { CdkTextareaAutosize } from '@angular/cdk/text-field';
30
32
  import * as i22 from '@angular/material/slide-toggle';
31
33
  import { MatSlideToggle, MatSlideToggleModule } from '@angular/material/slide-toggle';
32
34
  import * as i28 from '@angular/cdk/drag-drop';
@@ -50,7 +52,7 @@ import * as i14 from '@angular/material/chips';
50
52
  import { MatChipsModule } from '@angular/material/chips';
51
53
  import * as i20 from '@angular/material/datepicker';
52
54
  import { MatDatepickerModule } from '@angular/material/datepicker';
53
- import * as i3$1 from '@angular/material/expansion';
55
+ import * as i3 from '@angular/material/expansion';
54
56
  import { MatExpansionModule } from '@angular/material/expansion';
55
57
  import * as i21 from '@angular/material/grid-list';
56
58
  import { MatGridListModule } from '@angular/material/grid-list';
@@ -2409,6 +2411,10 @@ class HtmlRawViewComponent {
2409
2411
  this.safeHtml = this._sanitizer.bypassSecurityTrustHtml(data.innerHTML);
2410
2412
  this._cdr.markForCheck();
2411
2413
  }
2414
+ set dataController(controller) {
2415
+ this._dataController = controller;
2416
+ this._cdr.markForCheck();
2417
+ }
2412
2418
  constructor(_sanitizer, router) {
2413
2419
  this._sanitizer = _sanitizer;
2414
2420
  this.router = router;
@@ -2440,7 +2446,7 @@ class HtmlRawViewComponent {
2440
2446
  this.router.navigate([path]);
2441
2447
  }
2442
2448
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: HtmlRawViewComponent, deps: [{ token: i1$2.DomSanitizer }, { token: i2$1.Router }], target: i0.ɵɵFactoryTarget.Component }); }
2443
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: HtmlRawViewComponent, isStandalone: true, selector: "croco-html-raw-view", inputs: { data: "data" }, ngImport: i0, template: "@if (safeHtml) {\n <div [innerHTML]=\"safeHtml\" (click)=\"handleLink($event)\"></div>\n}\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2449
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: HtmlRawViewComponent, isStandalone: true, selector: "croco-html-raw-view", inputs: { data: "data", dataController: "dataController" }, ngImport: i0, template: "@if (safeHtml) {\n <div [innerHTML]=\"safeHtml\" (click)=\"handleLink($event)\"></div>\n}\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2444
2450
  }
2445
2451
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: HtmlRawViewComponent, decorators: [{
2446
2452
  type: Component,
@@ -2448,6 +2454,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
2448
2454
  }], ctorParameters: () => [{ type: i1$2.DomSanitizer }, { type: i2$1.Router }], propDecorators: { data: [{
2449
2455
  type: Input,
2450
2456
  args: [{ required: true }]
2457
+ }], dataController: [{
2458
+ type: Input,
2459
+ args: [{ required: true }]
2451
2460
  }] } });
2452
2461
 
2453
2462
  /**
@@ -2554,6 +2563,117 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
2554
2563
  type: Input
2555
2564
  }] } });
2556
2565
 
2566
+ class LinkEditorComponent {
2567
+ constructor() {
2568
+ this._destroyRef = inject(DestroyRef);
2569
+ this._cdr = inject(ChangeDetectorRef);
2570
+ this.linkData = {
2571
+ url: '',
2572
+ title: 'Текст ссылки',
2573
+ type: null,
2574
+ fileId: null
2575
+ };
2576
+ this.isValid = true;
2577
+ this.errorMessage = "";
2578
+ this.presentOrEdit = true;
2579
+ }
2580
+ set tagService(data) {
2581
+ this._tagService = data;
2582
+ this._tagService.tag$
2583
+ .pipe(takeUntilDestroyed(this._destroyRef))
2584
+ .subscribe(tag => {
2585
+ this._data = tag;
2586
+ this.linkData.url = this._data.attributes[LinkTagAttrs.Url];
2587
+ this.linkData.title = this._data.attributes[LinkTagAttrs.Title];
2588
+ this.linkData.type = this._data.attributes[LinkTagAttrs.Type];
2589
+ this.validate();
2590
+ this._cdr.markForCheck();
2591
+ });
2592
+ this._tagService.presentOrEdit$
2593
+ .pipe(takeUntilDestroyed(this._destroyRef))
2594
+ .subscribe(val => {
2595
+ this.presentOrEdit = val;
2596
+ this._cdr.markForCheck();
2597
+ });
2598
+ }
2599
+ validate() {
2600
+ if (!this.linkData.url || this.linkData.url.length === 0) {
2601
+ this.errorMessage = "Ссылка не указана";
2602
+ this.isValid = false;
2603
+ return;
2604
+ }
2605
+ if (!this.linkData.title || this.linkData.title.length === 0) {
2606
+ this.errorMessage = "Название ссылки не указано";
2607
+ this.isValid = false;
2608
+ return;
2609
+ }
2610
+ this.isValid = true;
2611
+ }
2612
+ saveTag() {
2613
+ const attrs = {
2614
+ [LinkTagAttrs.Url]: this.linkData.url,
2615
+ [LinkTagAttrs.Title]: this.linkData.title,
2616
+ [LinkTagAttrs.Type]: this.linkData.type,
2617
+ [LinkTagAttrs.FileId]: this.linkData.fileId,
2618
+ };
2619
+ this._data.attributes = attrs;
2620
+ this._tagService.tag$.next(this._data);
2621
+ }
2622
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: LinkEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2623
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: LinkEditorComponent, isStandalone: true, selector: "croco-html-file-link-editor", inputs: { tagService: "tagService" }, ngImport: i0, template: "@if (presentOrEdit) {\n\n @if (isValid){\n <div>\n <a target=\"_blank\" [attr.href]=\"linkData.url\">{{linkData.title}}</a>\n </div>\n }\n @else {\n <div class=\"alert alert-danger\">\n {{errorMessage}}\n </div>\n }\n}\n@else {\n<div>\n <mat-form-field class=\"w-100\">\n <mat-label>\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435</mat-label>\n <input type=\"text\" matInput [(ngModel)]=\"linkData.title\" (ngModelChange)=\"saveTag()\" />\n </mat-form-field>\n\n <mat-form-field class=\"w-100\">\n <mat-label>\u0421\u0441\u044B\u043B\u043A\u0430</mat-label>\n <input type=\"text\" matInput [(ngModel)]=\"linkData.url\" (ngModelChange)=\"saveTag()\" />\n </mat-form-field>\n\n <mat-form-field class=\"w-100\">\n <mat-label>\u0422\u0438\u043F \u0441\u0441\u044B\u043B\u043A\u0438</mat-label>\n <input type=\"text\" matInput [(ngModel)]=\"linkData.type\" (ngModelChange)=\"saveTag()\" />\n </mat-form-field>\n</div>\n}", dependencies: [{ kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i1$4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i1$4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$4.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatFormFieldModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2624
+ }
2625
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: LinkEditorComponent, decorators: [{
2626
+ type: Component,
2627
+ args: [{ selector: 'croco-html-file-link-editor', imports: [MatInputModule, FormsModule, MatFormFieldModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (presentOrEdit) {\n\n @if (isValid){\n <div>\n <a target=\"_blank\" [attr.href]=\"linkData.url\">{{linkData.title}}</a>\n </div>\n }\n @else {\n <div class=\"alert alert-danger\">\n {{errorMessage}}\n </div>\n }\n}\n@else {\n<div>\n <mat-form-field class=\"w-100\">\n <mat-label>\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435</mat-label>\n <input type=\"text\" matInput [(ngModel)]=\"linkData.title\" (ngModelChange)=\"saveTag()\" />\n </mat-form-field>\n\n <mat-form-field class=\"w-100\">\n <mat-label>\u0421\u0441\u044B\u043B\u043A\u0430</mat-label>\n <input type=\"text\" matInput [(ngModel)]=\"linkData.url\" (ngModelChange)=\"saveTag()\" />\n </mat-form-field>\n\n <mat-form-field class=\"w-100\">\n <mat-label>\u0422\u0438\u043F \u0441\u0441\u044B\u043B\u043A\u0438</mat-label>\n <input type=\"text\" matInput [(ngModel)]=\"linkData.type\" (ngModelChange)=\"saveTag()\" />\n </mat-form-field>\n</div>\n}" }]
2628
+ }], propDecorators: { tagService: [{
2629
+ type: Input,
2630
+ args: [{ required: true }]
2631
+ }] } });
2632
+
2633
+ class HtmlRawEditorComponent {
2634
+ constructor() {
2635
+ this._cdr = inject(ChangeDetectorRef);
2636
+ this._destroyRef = inject(DestroyRef);
2637
+ this._sanitizer = inject(DomSanitizer);
2638
+ this.presentOrEdit = true;
2639
+ this.safeHtml = null;
2640
+ }
2641
+ set tagService(data) {
2642
+ this._tagService = data;
2643
+ this._tagService.tag$
2644
+ .pipe(takeUntilDestroyed(this._destroyRef))
2645
+ .subscribe(tag => {
2646
+ this._tag = tag;
2647
+ this.onHtmlChanged();
2648
+ });
2649
+ this._tagService.presentOrEdit$
2650
+ .pipe(takeUntilDestroyed(this._destroyRef))
2651
+ .subscribe(val => {
2652
+ this.presentOrEdit = val;
2653
+ this._cdr.markForCheck();
2654
+ });
2655
+ }
2656
+ onHtmlChanged() {
2657
+ this.safeHtml = this._sanitizer.bypassSecurityTrustHtml(this._tag.innerHtml);
2658
+ this._cdr.markForCheck();
2659
+ }
2660
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: HtmlRawEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2661
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: HtmlRawEditorComponent, isStandalone: true, selector: "croco-html-html-raw-editor", inputs: { tagService: "tagService" }, ngImport: i0, template: "@if (presentOrEdit) {\n <div [innerHTML]=\"safeHtml\">\n </div>\n}\n@else {\n <div>\n <div style=\"height: 10px;\">\n </div>\n <div>\n <mat-form-field class=\"w-100\">\n <mat-label>\n \u0412\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u044F\u044F \u0440\u0430\u0437\u043C\u0435\u0442\u043A\u0430 \u0442\u0435\u0433\u0430\n </mat-label>\n <textarea matInput cdkTextareaAutosize #autosize=\"cdkTextareaAutosize\"\n cdkAutosizeMinRows=\"1\"\n placeholder=\"\u0412\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u044F\u044F \u0440\u0430\u0437\u043C\u0435\u0442\u043A\u0430 \u0442\u0435\u0433\u0430\"\n [(ngModel)]=\"_tag.innerHtml\"\n (ngModelChange)=\"onHtmlChanged()\"\n ></textarea>\n </mat-form-field>\n </div>\n </div>\n}\n\n", styles: [".code-view.video-player{margin:0 auto;max-width:640px;width:100%;height:360px}.code-view.use-responsive ::ng-deep iframe{width:100%;height:100%}@media screen and (max-width: 768px){.code-view.use-responsive{height:300px}}@media screen and (max-width: 575px){.code-view.use-responsive{height:250px}}@media screen and (max-width: 480px){.code-view.use-responsive{height:200px}}@media screen and (max-width: 380px){.code-view.use-responsive{height:180px}}\n"], dependencies: [{ kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { 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", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: CdkTextareaAutosize, selector: "textarea[cdkTextareaAutosize]", inputs: ["cdkAutosizeMinRows", "cdkAutosizeMaxRows", "cdkTextareaAutosize", "placeholder"], exportAs: ["cdkTextareaAutosize"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2662
+ }
2663
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: HtmlRawEditorComponent, decorators: [{
2664
+ type: Component,
2665
+ args: [{ selector: 'croco-html-html-raw-editor', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
2666
+ MatFormField,
2667
+ MatLabel,
2668
+ MatInput,
2669
+ CdkTextareaAutosize,
2670
+ FormsModule
2671
+ ], template: "@if (presentOrEdit) {\n <div [innerHTML]=\"safeHtml\">\n </div>\n}\n@else {\n <div>\n <div style=\"height: 10px;\">\n </div>\n <div>\n <mat-form-field class=\"w-100\">\n <mat-label>\n \u0412\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u044F\u044F \u0440\u0430\u0437\u043C\u0435\u0442\u043A\u0430 \u0442\u0435\u0433\u0430\n </mat-label>\n <textarea matInput cdkTextareaAutosize #autosize=\"cdkTextareaAutosize\"\n cdkAutosizeMinRows=\"1\"\n placeholder=\"\u0412\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u044F\u044F \u0440\u0430\u0437\u043C\u0435\u0442\u043A\u0430 \u0442\u0435\u0433\u0430\"\n [(ngModel)]=\"_tag.innerHtml\"\n (ngModelChange)=\"onHtmlChanged()\"\n ></textarea>\n </mat-form-field>\n </div>\n </div>\n}\n\n", styles: [".code-view.video-player{margin:0 auto;max-width:640px;width:100%;height:360px}.code-view.use-responsive ::ng-deep iframe{width:100%;height:100%}@media screen and (max-width: 768px){.code-view.use-responsive{height:300px}}@media screen and (max-width: 575px){.code-view.use-responsive{height:250px}}@media screen and (max-width: 480px){.code-view.use-responsive{height:200px}}@media screen and (max-width: 380px){.code-view.use-responsive{height:180px}}\n"] }]
2672
+ }], propDecorators: { tagService: [{
2673
+ type: Input,
2674
+ args: [{ required: true }]
2675
+ }] } });
2676
+
2557
2677
  class DefaultTags {
2558
2678
  static { this.textTags = [
2559
2679
  { tag: 'text', displayValue: 'T', isCustom: false },
@@ -2577,6 +2697,10 @@ class DefaultTags {
2577
2697
  static { this.tagRenderers = {
2578
2698
  [HtmlRawTagDataConsts.TagName]: { viewComponent: HtmlRawViewComponent }
2579
2699
  }; }
2700
+ static { this.tagEditors = {
2701
+ [HtmlRawTagDataConsts.TagName]: { editorComponent: HtmlRawEditorComponent },
2702
+ [LinkTagConsts.TagName]: { editorComponent: LinkEditorComponent }
2703
+ }; }
2580
2704
  static isViewDefined(item, options) {
2581
2705
  const tagName = item.tagName;
2582
2706
  if (options.definedViewRenderers.hasOwnProperty(tagName)) {
@@ -2584,6 +2708,26 @@ class DefaultTags {
2584
2708
  }
2585
2709
  return DefaultTags.tagRenderers.hasOwnProperty(item.tagName);
2586
2710
  }
2711
+ static isEditorDefined(tag, options) {
2712
+ const tagName = tag.tagDescription.tag;
2713
+ if (options.definedEditorViewRenderers.hasOwnProperty(tagName)) {
2714
+ return true;
2715
+ }
2716
+ if (DefaultTags.tagEditors.hasOwnProperty(tagName)) {
2717
+ return true;
2718
+ }
2719
+ return false;
2720
+ }
2721
+ static getEditor(tag, options) {
2722
+ const tagName = tag.tagDescription.tag;
2723
+ if (options.definedEditorViewRenderers.hasOwnProperty(tagName)) {
2724
+ return options.definedEditorViewRenderers[tagName].editorComponent;
2725
+ }
2726
+ if (DefaultTags.tagEditors.hasOwnProperty(tagName)) {
2727
+ return DefaultTags.tagEditors[tagName].editorComponent;
2728
+ }
2729
+ return null;
2730
+ }
2587
2731
  static getTags(options) {
2588
2732
  if (options.editorCustomAddTagButtons) {
2589
2733
  return [...options.editorCustomAddTagButtons];
@@ -2782,7 +2926,7 @@ class ExternalVideoEditorComponent {
2782
2926
  this._cdr.markForCheck();
2783
2927
  }
2784
2928
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ExternalVideoEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2785
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: ExternalVideoEditorComponent, isStandalone: true, selector: "croco-html-external-video-editor", inputs: { tag: "tag", presentOrEdit: "presentOrEdit" }, ngImport: i0, template: "@if (presentOrEdit) {\n <div>\n <div style=\"word-break: break-all\">\n @switch (tagData.type) {\n @case (ExternalVideoSupportedTypes.VkVideo) {\n {{linkText}}: {{tagData.link}}\n }\n @case (ExternalVideoSupportedTypes.Youtube) {\n {{linkText}}: {{tagData.link}}\n }\n @case (ExternalVideoSupportedTypes.Code) {\n <div>\n \u0412\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043C\u044B\u0439 \u043A\u043E\u0434 \u043F\u043B\u0435\u0435\u0440\u0430.\n </div>\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@else {\n @if(tagData.type !== ExternalVideoSupportedTypes.Code) {\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 } @else {\n <div>\n <mat-label>\n {{linkText}}\n </mat-label>\n <mat-form-field class=\"w-100\">\n <mat-label>\u0420\u0430\u0437\u043C\u0435\u0442\u043A\u0430</mat-label>\n <textarea\n #autosize=\"cdkTextareaAutosize\"\n matInput\n cdkTextareaAutosize\n cdkAutosizeMinRows=\"1\"\n cdkAutosizeMaxRows=\"5\"\n placeholder=\"\u0422\u0435\u043A\u0441\u0442\"\n #textArea\n [(ngModel)]=\"tagData.innerHtml\"\n (ngModelChange)=\"linkChanged()\"\n ></textarea>\n </mat-form-field>\n\n <mat-checkbox\n [checked]=\"tagData.useResponsiveWrapper\"\n (change)=\"onCheck($event.checked)\"\n >\n \u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0430\u0434\u0430\u043F\u0442\u0438\u0432?\n </mat-checkbox>\n </div>\n }\n}\n", styles: [".code-view.video-player{margin:0 auto;max-width:640px;width:100%;height:360px}.code-view.use-responsive ::ng-deep iframe{width:100%;height:100%}@media screen and (max-width: 768px){.code-view.use-responsive{height:300px}}@media screen and (max-width: 575px){.code-view.use-responsive{height:250px}}@media screen and (max-width: 480px){.code-view.use-responsive{height:200px}}@media screen and (max-width: 380px){.code-view.use-responsive{height:180px}}\n"], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$4.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: i3.CdkTextareaAutosize, selector: "textarea[cdkTextareaAutosize]", inputs: ["cdkAutosizeMinRows", "cdkAutosizeMaxRows", "cdkTextareaAutosize", "placeholder"], exportAs: ["cdkTextareaAutosize"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.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"] }, { kind: "component", type: MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2929
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: ExternalVideoEditorComponent, isStandalone: true, selector: "croco-html-external-video-editor", inputs: { tag: "tag", presentOrEdit: "presentOrEdit" }, ngImport: i0, template: "@if (presentOrEdit) {\n <div>\n <div style=\"word-break: break-all\">\n @switch (tagData.type) {\n @case (ExternalVideoSupportedTypes.VkVideo) {\n {{linkText}}: {{tagData.link}}\n }\n @case (ExternalVideoSupportedTypes.Youtube) {\n {{linkText}}: {{tagData.link}}\n }\n @case (ExternalVideoSupportedTypes.Code) {\n <div>\n \u0412\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043C\u044B\u0439 \u043A\u043E\u0434 \u043F\u043B\u0435\u0435\u0440\u0430.\n </div>\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@else {\n @if(tagData.type !== ExternalVideoSupportedTypes.Code) {\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 } @else {\n <div>\n <mat-label>\n {{linkText}}\n </mat-label>\n <mat-form-field class=\"w-100\">\n <mat-label>\u0420\u0430\u0437\u043C\u0435\u0442\u043A\u0430</mat-label>\n <textarea\n #autosize=\"cdkTextareaAutosize\"\n matInput\n cdkTextareaAutosize\n cdkAutosizeMinRows=\"1\"\n cdkAutosizeMaxRows=\"5\"\n placeholder=\"\u0422\u0435\u043A\u0441\u0442\"\n #textArea\n [(ngModel)]=\"tagData.innerHtml\"\n (ngModelChange)=\"linkChanged()\"\n ></textarea>\n </mat-form-field>\n\n <mat-checkbox\n [checked]=\"tagData.useResponsiveWrapper\"\n (change)=\"onCheck($event.checked)\"\n >\n \u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0430\u0434\u0430\u043F\u0442\u0438\u0432?\n </mat-checkbox>\n </div>\n }\n}\n", styles: [".code-view.video-player{margin:0 auto;max-width:640px;width:100%;height:360px}.code-view.use-responsive ::ng-deep iframe{width:100%;height:100%}@media screen and (max-width: 768px){.code-view.use-responsive{height:300px}}@media screen and (max-width: 575px){.code-view.use-responsive{height:250px}}@media screen and (max-width: 480px){.code-view.use-responsive{height:200px}}@media screen and (max-width: 380px){.code-view.use-responsive{height:180px}}\n"], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$4.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i1$4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: i2$2.CdkTextareaAutosize, selector: "textarea[cdkTextareaAutosize]", inputs: ["cdkAutosizeMinRows", "cdkAutosizeMaxRows", "cdkTextareaAutosize", "placeholder"], exportAs: ["cdkTextareaAutosize"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.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"] }, { kind: "component", type: MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2786
2930
  }
2787
2931
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ExternalVideoEditorComponent, decorators: [{
2788
2932
  type: Component,
@@ -2801,36 +2945,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
2801
2945
  args: [{ required: true }]
2802
2946
  }] } });
2803
2947
 
2804
- class HtmlRawEditorComponent {
2805
- constructor(_sanitizer) {
2806
- this._sanitizer = _sanitizer;
2807
- this._cdr = inject(ChangeDetectorRef);
2808
- this.presentOrEdit = true;
2809
- }
2810
- ngOnChanges(changes) {
2811
- if (changes['tag'] && changes['tag'].currentValue !== changes['tag'].previousValue) {
2812
- this.safeHtml = this._sanitizer.bypassSecurityTrustHtml(this.tag.innerHtml);
2813
- this._cdr.markForCheck();
2814
- }
2815
- }
2816
- onSafeHtmlChange() {
2817
- this.safeHtml = this._sanitizer.bypassSecurityTrustHtml(this.tag.innerHtml);
2818
- this._cdr.markForCheck();
2819
- }
2820
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: HtmlRawEditorComponent, deps: [{ token: i1$2.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component }); }
2821
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: HtmlRawEditorComponent, isStandalone: true, selector: "croco-html-html-raw-editor", inputs: { tag: "tag", presentOrEdit: "presentOrEdit" }, usesOnChanges: true, ngImport: i0, template: "@if (presentOrEdit) {\n <div [innerHTML]=\"safeHtml\">\n </div>\n}\n@else {\n <div>\n <div style=\"height: 10px;\">\n </div>\n <div>\n <mat-form-field class=\"w-100\">\n <mat-label>\n \u0412\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u044F\u044F \u0440\u0430\u0437\u043C\u0435\u0442\u043A\u0430 \u0442\u0435\u0433\u0430\n </mat-label>\n <textarea matInput cdkTextareaAutosize #autosize=\"cdkTextareaAutosize\"\n cdkAutosizeMinRows=\"1\"\n placeholder=\"\u0412\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u044F\u044F \u0440\u0430\u0437\u043C\u0435\u0442\u043A\u0430 \u0442\u0435\u0433\u0430\"\n [(ngModel)]=\"tag.innerHtml\"\n (ngModelChange)=\"onSafeHtmlChange()\"\n ></textarea>\n </mat-form-field>\n </div>\n </div>\n}\n\n", styles: [".code-view.video-player{margin:0 auto;max-width:640px;width:100%;height:360px}.code-view.use-responsive ::ng-deep iframe{width:100%;height:100%}@media screen and (max-width: 768px){.code-view.use-responsive{height:300px}}@media screen and (max-width: 575px){.code-view.use-responsive{height:250px}}@media screen and (max-width: 480px){.code-view.use-responsive{height:200px}}@media screen and (max-width: 380px){.code-view.use-responsive{height:180px}}\n"], dependencies: [{ kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { 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", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: CdkTextareaAutosize, selector: "textarea[cdkTextareaAutosize]", inputs: ["cdkAutosizeMinRows", "cdkAutosizeMaxRows", "cdkTextareaAutosize", "placeholder"], exportAs: ["cdkTextareaAutosize"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2822
- }
2823
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: HtmlRawEditorComponent, decorators: [{
2824
- type: Component,
2825
- args: [{ selector: 'croco-html-html-raw-editor', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatFormField, MatLabel, MatInput, CdkTextareaAutosize, FormsModule], template: "@if (presentOrEdit) {\n <div [innerHTML]=\"safeHtml\">\n </div>\n}\n@else {\n <div>\n <div style=\"height: 10px;\">\n </div>\n <div>\n <mat-form-field class=\"w-100\">\n <mat-label>\n \u0412\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u044F\u044F \u0440\u0430\u0437\u043C\u0435\u0442\u043A\u0430 \u0442\u0435\u0433\u0430\n </mat-label>\n <textarea matInput cdkTextareaAutosize #autosize=\"cdkTextareaAutosize\"\n cdkAutosizeMinRows=\"1\"\n placeholder=\"\u0412\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u044F\u044F \u0440\u0430\u0437\u043C\u0435\u0442\u043A\u0430 \u0442\u0435\u0433\u0430\"\n [(ngModel)]=\"tag.innerHtml\"\n (ngModelChange)=\"onSafeHtmlChange()\"\n ></textarea>\n </mat-form-field>\n </div>\n </div>\n}\n\n", styles: [".code-view.video-player{margin:0 auto;max-width:640px;width:100%;height:360px}.code-view.use-responsive ::ng-deep iframe{width:100%;height:100%}@media screen and (max-width: 768px){.code-view.use-responsive{height:300px}}@media screen and (max-width: 575px){.code-view.use-responsive{height:250px}}@media screen and (max-width: 480px){.code-view.use-responsive{height:200px}}@media screen and (max-width: 380px){.code-view.use-responsive{height:180px}}\n"] }]
2826
- }], ctorParameters: () => [{ type: i1$2.DomSanitizer }], propDecorators: { tag: [{
2827
- type: Input,
2828
- args: [{ required: true }]
2829
- }], presentOrEdit: [{
2830
- type: Input,
2831
- args: [{ required: true }]
2832
- }] } });
2833
-
2834
2948
  class FileIdSelectComponent {
2835
2949
  get crocoHtmlEditorFileOptions() {
2836
2950
  return this._htmlSettingsService.get();
@@ -3196,43 +3310,38 @@ class DefinedCustomEditorBlockComponent {
3196
3310
  set tagService(data) {
3197
3311
  this._tagService = data;
3198
3312
  this._tagService.tag$
3199
- .pipe(takeUntil(this.unsubscribe))
3313
+ .pipe(takeUntilDestroyed(this._destroyRef))
3200
3314
  .subscribe(tag => {
3201
3315
  this._tag = tag;
3316
+ this._cdr.markForCheck();
3202
3317
  });
3318
+ this._cdr.markForCheck();
3203
3319
  }
3204
3320
  constructor(_options) {
3205
3321
  this._options = _options;
3206
- this.unsubscribe = new Subject();
3322
+ this._cdr = inject(ChangeDetectorRef);
3323
+ this._destroyRef = inject(DestroyRef);
3207
3324
  this.useDynamicComponent = false;
3208
3325
  }
3209
- getCustomComponent() {
3210
- const tagName = this._tag.tagDescription.tag;
3211
- if (this._options.definedEditorViewRenderers.hasOwnProperty(tagName)) {
3212
- return this._options.definedEditorViewRenderers[tagName].editorComponent;
3213
- }
3214
- return null;
3215
- }
3216
3326
  ngOnInit() {
3217
- var component = this.getCustomComponent();
3327
+ var component = DefaultTags.getEditor(this._tag, this._options);
3218
3328
  if (component) {
3219
3329
  this.useDynamicComponent = true;
3220
3330
  this.viewContainerRef.remove();
3221
3331
  this.dynamicContainerRef = this.viewContainerRef.createComponent(component);
3222
3332
  this.dynamicContainerRef.setInput("tagService", this._tagService);
3223
3333
  }
3334
+ this._cdr.markForCheck();
3224
3335
  }
3225
3336
  ngOnDestroy() {
3226
3337
  this.dynamicContainerRef.destroy();
3227
- this.unsubscribe.next();
3228
- this.unsubscribe.complete();
3229
3338
  }
3230
3339
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: DefinedCustomEditorBlockComponent, deps: [{ token: CrocoHtmlOptionsToken }], target: i0.ɵɵFactoryTarget.Component }); }
3231
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: DefinedCustomEditorBlockComponent, isStandalone: true, selector: "croco-html-defined-custom-editor-block", inputs: { tagService: "tagService" }, viewQueries: [{ propertyName: "viewContainerRef", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: "<ng-container #container>\n @if (!useDynamicComponent) {\n <div>\n \u0420\u0435\u0434\u0430\u043A\u0442\u043E\u0440 \u0440\u0430\u0437\u043C\u0435\u0442\u043A\u0438 \u0434\u043B\u044F {{_tag.tagDescription.tag}} \u043D\u0435 \u043E\u043F\u0438\u0441\u0430\u043D.\n </div>\n <div>\n \u0423\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u0435 CrocoHtmlOptions.definedCustomTagViewRenderers[{{_tag.tagDescription.tag}}].editorComponent\n </div>\n }\n</ng-container>" }); }
3340
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: DefinedCustomEditorBlockComponent, isStandalone: true, selector: "croco-html-defined-custom-editor-block", inputs: { tagService: "tagService" }, viewQueries: [{ propertyName: "viewContainerRef", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: "<ng-container #container>\n @if (!useDynamicComponent) {\n <div>\n \u0420\u0435\u0434\u0430\u043A\u0442\u043E\u0440 \u0440\u0430\u0437\u043C\u0435\u0442\u043A\u0438 \u0434\u043B\u044F {{_tag.tagDescription.tag}} \u043D\u0435 \u043E\u043F\u0438\u0441\u0430\u043D.\n </div>\n <div>\n \u0423\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u0435 CrocoHtmlOptions.definedCustomTagViewRenderers[{{_tag.tagDescription.tag}}].editorComponent\n </div>\n }\n</ng-container>", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3232
3341
  }
3233
3342
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: DefinedCustomEditorBlockComponent, decorators: [{
3234
3343
  type: Component,
3235
- args: [{ selector: 'croco-html-defined-custom-editor-block', imports: [], standalone: true, template: "<ng-container #container>\n @if (!useDynamicComponent) {\n <div>\n \u0420\u0435\u0434\u0430\u043A\u0442\u043E\u0440 \u0440\u0430\u0437\u043C\u0435\u0442\u043A\u0438 \u0434\u043B\u044F {{_tag.tagDescription.tag}} \u043D\u0435 \u043E\u043F\u0438\u0441\u0430\u043D.\n </div>\n <div>\n \u0423\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u0435 CrocoHtmlOptions.definedCustomTagViewRenderers[{{_tag.tagDescription.tag}}].editorComponent\n </div>\n }\n</ng-container>" }]
3344
+ args: [{ selector: 'croco-html-defined-custom-editor-block', imports: [], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container #container>\n @if (!useDynamicComponent) {\n <div>\n \u0420\u0435\u0434\u0430\u043A\u0442\u043E\u0440 \u0440\u0430\u0437\u043C\u0435\u0442\u043A\u0438 \u0434\u043B\u044F {{_tag.tagDescription.tag}} \u043D\u0435 \u043E\u043F\u0438\u0441\u0430\u043D.\n </div>\n <div>\n \u0423\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u0435 CrocoHtmlOptions.definedCustomTagViewRenderers[{{_tag.tagDescription.tag}}].editorComponent\n </div>\n }\n</ng-container>" }]
3236
3345
  }], ctorParameters: () => [{ type: undefined, decorators: [{
3237
3346
  type: Inject,
3238
3347
  args: [CrocoHtmlOptionsToken]
@@ -3274,11 +3383,7 @@ class MainEditorBlockComponent {
3274
3383
  this._tagService.presentOrEdit$.next(false);
3275
3384
  }
3276
3385
  isEditorDefined() {
3277
- const tagName = this._tag.tagDescription.tag;
3278
- if (this._options.definedEditorViewRenderers.hasOwnProperty(tagName)) {
3279
- return true;
3280
- }
3281
- return false;
3386
+ return DefaultTags.isEditorDefined(this.tag, this._options);
3282
3387
  }
3283
3388
  deleteItem() {
3284
3389
  this.onTagRemoved.emit(this.tag);
@@ -3288,7 +3393,7 @@ class MainEditorBlockComponent {
3288
3393
  this.unsubscribe.complete();
3289
3394
  }
3290
3395
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: MainEditorBlockComponent, deps: [{ token: CrocoHtmlOptionsToken }], target: i0.ɵɵFactoryTarget.Component }); }
3291
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: MainEditorBlockComponent, isStandalone: true, selector: "croco-html-main-editor-block", inputs: { tag: "tag" }, outputs: { onTagSaved: "onTagSaved", onTagRemoved: "onTagRemoved" }, ngImport: i0, template: "<div class=\"main-editor-block\">\n <div class=\"editor-container\">\n @if (textTags.includes(_tag.tagDescription.tag)) {\n <div>\n <croco-html-text-editor [tagService]=\"_tagService\">\n </croco-html-text-editor>\n </div>\n }\n @else if (_tag.tagDescription.tag === 'file-image') {\n <div>\n <croco-html-image-editor [presentOrEdit]=\"presentOrEdit\" [tag]=\"_tag\">\n </croco-html-image-editor>\n </div>\n }\n @else if (_tag.tagDescription.tag === 'audio-player') {\n <div>\n <croco-html-audio-editor [presentOrEdit]=\"presentOrEdit\" [tag]=\"_tag\">\n </croco-html-audio-editor>\n </div>\n }\n @else if (_tag.tagDescription.tag === 'custom-widget') {\n <div>\n <croco-html-custom-widget-editor [presentOrEdit]=\"presentOrEdit\" [tag]=\"_tag\">\n </croco-html-custom-widget-editor>\n </div>\n }\n @else if (_tag.tagDescription.tag === 'external-video') {\n <div>\n <croco-html-external-video-editor [presentOrEdit]=\"presentOrEdit\" [tag]=\"_tag\">\n </croco-html-external-video-editor>\n </div>\n }\n @else if (_tag.tagDescription.tag === 'download-file-button') {\n <div>\n <croco-html-download-file-button-editor [presentOrEdit]=\"presentOrEdit\" [tag]=\"_tag\">\n </croco-html-download-file-button-editor>\n </div>\n }\n @else if (_tag.tagDescription.tag === 'button') {\n <div>\n <croco-html-button-editor [presentOrEdit]=\"presentOrEdit\" [tag]=\"_tag\">\n </croco-html-button-editor>\n </div>\n }\n @else if (_tag.tagDescription.tag === 'html-raw') {\n <div>\n <croco-html-html-raw-editor [presentOrEdit]=\"presentOrEdit\" [tag]=\"_tag\">\n </croco-html-html-raw-editor>\n </div>\n }\n @else if (isEditorDefined()) {\n <div>\n <croco-html-defined-custom-editor-block [tagService]=\"_tagService\"></croco-html-defined-custom-editor-block>\n </div>\n }\n @else {\n <div>\n {{_tag.tagDescription.tag}} \u043D\u0435 \u043F\u043E\u043A\u0430\u0437\u0430\u043D\n </div>\n <div>\n {{_tag | json}}\n </div>\n }\n\n </div>\n\n <div class=\"d-flex justify-content-between\">\n <div class=\"d-flex justify-content-end align-self-center\">\n <div style=\"margin-left: 16px;min-width: 96px\">\n @if (presentOrEdit) {\n <button (click)=\"cancelSave()\" mat-icon-button>\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\"\n d=\"M14.4374 0C15.0921 0 15.7197 0.261421 16.1781 0.723424L19.279 3.82432C19.7407 4.286 20.0001 4.91217 20.0001 5.56508C20.0001 6.21799 19.7407 6.84416 19.279 7.30584L7.95751 18.6238C7.25903 19.4295 6.2689 19.9245 5.1346 20.0023H0V19.0023L0.00324754 14.7873C0.0884381 13.7328 0.578667 12.7523 1.3265 12.0934L12.6954 0.72463C13.1564 0.260831 13.7834 0 14.4374 0ZM5.06401 18.0048C5.59823 17.967 6.09551 17.7184 6.49482 17.2616L14.0567 9.69971L10.3024 5.94518L2.69613 13.5496C2.29098 13.9079 2.04034 14.4092 2.00003 14.8678V18.0029L5.06401 18.0048ZM11.7167 4.53114L15.471 8.28549L17.8648 5.89162C17.9514 5.80502 18.0001 5.68756 18.0001 5.56508C18.0001 5.4426 17.9514 5.32514 17.8648 5.23854L14.7612 2.13486C14.6755 2.04855 14.559 2 14.4374 2C14.3158 2 14.1992 2.04855 14.1136 2.13486L11.7167 4.53114Z\"\n fill=\"#323E8B\" />\n </svg>\n </button>\n }\n @else {\n <button (click)=\"save()\" mat-icon-button>\n <svg width=\"800px\" height=\"800px\" viewBox=\"0 0 24 24\" role=\"img\" xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"saveIconTitle\" stroke=\"#000000\" stroke-width=\"1\" stroke-linecap=\"square\"\n stroke-linejoin=\"miter\" fill=\"none\" color=\"#000000\">\n <title id=\"saveIconTitle\">Save</title>\n <path\n d=\"M17.2928932,3.29289322 L21,7 L21,20 C21,20.5522847 20.5522847,21 20,21 L4,21 C3.44771525,21 3,20.5522847 3,20 L3,4 C3,3.44771525 3.44771525,3 4,3 L16.5857864,3 C16.8510029,3 17.1053568,3.10535684 17.2928932,3.29289322 Z\" />\n <rect width=\"10\" height=\"8\" x=\"7\" y=\"13\" />\n <rect width=\"8\" height=\"5\" x=\"8\" y=\"3\" />\n </svg>\n </button>\n }\n <button (click)=\"deleteItem()\" mat-icon-button color=\"warn\">\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\"\n d=\"M7.49988 0.833332H12.4999C13.4204 0.833332 14.1665 1.57952 14.1665 2.5V3.33333H16.6665C17.587 3.33333 18.3332 4.07952 18.3332 4.99999V6.66666C18.3332 7.58714 17.587 8.33333 16.6665 8.33333H16.5998L15.8332 17.5C15.8332 18.4205 15.087 19.1667 14.1665 19.1667H5.8332C4.91272 19.1667 4.16653 18.4205 4.16941 17.5692L3.39975 8.33333H3.33317C2.4127 8.33333 1.6665 7.58714 1.6665 6.66666V4.99999C1.6665 4.07952 2.4127 3.33333 3.33317 3.33333H5.83321V2.5C5.83321 1.57952 6.5794 0.833332 7.49988 0.833332ZM5.83321 5V4.99999H3.33317V6.66666H16.6665V4.99999L14.1665 5H5.83321ZM5.83324 17.5L5.07198 8.33333H14.9276L14.1695 17.4308L14.1666 17.5H5.83324ZM12.4999 2.5V3.33334H7.49992V2.5H12.4999Z\"\n fill=\"#F96666\" />\n </svg>\n </button>\n </div>\n </div>\n\n </div>\n</div>\n", styles: [".main-editor-block{display:flex;justify-content:space-between}.editor-container{flex-grow:1}@media screen and (max-width: 700px){.main-editor-block{display:flex;flex-direction:column}}\n"], dependencies: [{ kind: "component", type: TextEditorComponent, selector: "croco-html-text-editor", inputs: ["tagService"] }, { kind: "component", type: ImageEditorComponent, selector: "croco-html-image-editor", inputs: ["tag", "presentOrEdit"] }, { kind: "component", type: AudioEditorComponent, selector: "croco-html-audio-editor", inputs: ["tag", "presentOrEdit"] }, { kind: "component", type: DownloadFileButtonEditorComponent, selector: "croco-html-download-file-button-editor", inputs: ["tag", "presentOrEdit"] }, { kind: "component", type: HtmlRawEditorComponent, selector: "croco-html-html-raw-editor", inputs: ["tag", "presentOrEdit"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: ExternalVideoEditorComponent, selector: "croco-html-external-video-editor", inputs: ["tag", "presentOrEdit"] }, { kind: "component", type: ButtonEditorComponent, selector: "croco-html-button-editor", inputs: ["tag", "presentOrEdit"] }, { kind: "component", type: CustomWidgetEditorComponent, selector: "croco-html-custom-widget-editor", inputs: ["tag", "presentOrEdit"] }, { kind: "component", type: DefinedCustomEditorBlockComponent, selector: "croco-html-defined-custom-editor-block", inputs: ["tagService"] }, { kind: "pipe", type: JsonPipe, name: "json" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3396
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: MainEditorBlockComponent, isStandalone: true, selector: "croco-html-main-editor-block", inputs: { tag: "tag" }, outputs: { onTagSaved: "onTagSaved", onTagRemoved: "onTagRemoved" }, ngImport: i0, template: "<div class=\"main-editor-block\">\n <div class=\"editor-container\">\n @if (textTags.includes(_tag.tagDescription.tag)) {\n <div>\n <croco-html-text-editor [tagService]=\"_tagService\">\n </croco-html-text-editor>\n </div>\n }\n @else if (_tag.tagDescription.tag === 'file-image') {\n <div>\n <croco-html-image-editor [presentOrEdit]=\"presentOrEdit\" [tag]=\"_tag\">\n </croco-html-image-editor>\n </div>\n }\n @else if (_tag.tagDescription.tag === 'audio-player') {\n <div>\n <croco-html-audio-editor [presentOrEdit]=\"presentOrEdit\" [tag]=\"_tag\">\n </croco-html-audio-editor>\n </div>\n }\n @else if (_tag.tagDescription.tag === 'custom-widget') {\n <div>\n <croco-html-custom-widget-editor [presentOrEdit]=\"presentOrEdit\" [tag]=\"_tag\">\n </croco-html-custom-widget-editor>\n </div>\n }\n @else if (_tag.tagDescription.tag === 'external-video') {\n <div>\n <croco-html-external-video-editor [presentOrEdit]=\"presentOrEdit\" [tag]=\"_tag\">\n </croco-html-external-video-editor>\n </div>\n }\n @else if (_tag.tagDescription.tag === 'download-file-button') {\n <div>\n <croco-html-download-file-button-editor [presentOrEdit]=\"presentOrEdit\" [tag]=\"_tag\">\n </croco-html-download-file-button-editor>\n </div>\n }\n @else if (_tag.tagDescription.tag === 'button') {\n <div>\n <croco-html-button-editor [presentOrEdit]=\"presentOrEdit\" [tag]=\"_tag\">\n </croco-html-button-editor>\n </div>\n }\n @else if (isEditorDefined()) {\n <div>\n <croco-html-defined-custom-editor-block [tagService]=\"_tagService\"></croco-html-defined-custom-editor-block>\n </div>\n }\n @else {\n <div>\n {{_tag.tagDescription.tag}} \u043D\u0435 \u043F\u043E\u043A\u0430\u0437\u0430\u043D\n </div>\n <div>\n {{_tag | json}}\n </div>\n }\n\n </div>\n\n <div class=\"d-flex justify-content-between\">\n <div class=\"d-flex justify-content-end align-self-center\">\n <div style=\"margin-left: 16px;min-width: 96px\">\n @if (presentOrEdit) {\n <button (click)=\"cancelSave()\" mat-icon-button>\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\"\n d=\"M14.4374 0C15.0921 0 15.7197 0.261421 16.1781 0.723424L19.279 3.82432C19.7407 4.286 20.0001 4.91217 20.0001 5.56508C20.0001 6.21799 19.7407 6.84416 19.279 7.30584L7.95751 18.6238C7.25903 19.4295 6.2689 19.9245 5.1346 20.0023H0V19.0023L0.00324754 14.7873C0.0884381 13.7328 0.578667 12.7523 1.3265 12.0934L12.6954 0.72463C13.1564 0.260831 13.7834 0 14.4374 0ZM5.06401 18.0048C5.59823 17.967 6.09551 17.7184 6.49482 17.2616L14.0567 9.69971L10.3024 5.94518L2.69613 13.5496C2.29098 13.9079 2.04034 14.4092 2.00003 14.8678V18.0029L5.06401 18.0048ZM11.7167 4.53114L15.471 8.28549L17.8648 5.89162C17.9514 5.80502 18.0001 5.68756 18.0001 5.56508C18.0001 5.4426 17.9514 5.32514 17.8648 5.23854L14.7612 2.13486C14.6755 2.04855 14.559 2 14.4374 2C14.3158 2 14.1992 2.04855 14.1136 2.13486L11.7167 4.53114Z\"\n fill=\"#323E8B\" />\n </svg>\n </button>\n }\n @else {\n <button (click)=\"save()\" mat-icon-button>\n <svg width=\"800px\" height=\"800px\" viewBox=\"0 0 24 24\" role=\"img\" xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"saveIconTitle\" stroke=\"#000000\" stroke-width=\"1\" stroke-linecap=\"square\"\n stroke-linejoin=\"miter\" fill=\"none\" color=\"#000000\">\n <title id=\"saveIconTitle\">Save</title>\n <path\n d=\"M17.2928932,3.29289322 L21,7 L21,20 C21,20.5522847 20.5522847,21 20,21 L4,21 C3.44771525,21 3,20.5522847 3,20 L3,4 C3,3.44771525 3.44771525,3 4,3 L16.5857864,3 C16.8510029,3 17.1053568,3.10535684 17.2928932,3.29289322 Z\" />\n <rect width=\"10\" height=\"8\" x=\"7\" y=\"13\" />\n <rect width=\"8\" height=\"5\" x=\"8\" y=\"3\" />\n </svg>\n </button>\n }\n <button (click)=\"deleteItem()\" mat-icon-button color=\"warn\">\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\"\n d=\"M7.49988 0.833332H12.4999C13.4204 0.833332 14.1665 1.57952 14.1665 2.5V3.33333H16.6665C17.587 3.33333 18.3332 4.07952 18.3332 4.99999V6.66666C18.3332 7.58714 17.587 8.33333 16.6665 8.33333H16.5998L15.8332 17.5C15.8332 18.4205 15.087 19.1667 14.1665 19.1667H5.8332C4.91272 19.1667 4.16653 18.4205 4.16941 17.5692L3.39975 8.33333H3.33317C2.4127 8.33333 1.6665 7.58714 1.6665 6.66666V4.99999C1.6665 4.07952 2.4127 3.33333 3.33317 3.33333H5.83321V2.5C5.83321 1.57952 6.5794 0.833332 7.49988 0.833332ZM5.83321 5V4.99999H3.33317V6.66666H16.6665V4.99999L14.1665 5H5.83321ZM5.83324 17.5L5.07198 8.33333H14.9276L14.1695 17.4308L14.1666 17.5H5.83324ZM12.4999 2.5V3.33334H7.49992V2.5H12.4999Z\"\n fill=\"#F96666\" />\n </svg>\n </button>\n </div>\n </div>\n\n </div>\n</div>", styles: [".main-editor-block{display:flex;justify-content:space-between}.editor-container{flex-grow:1}@media screen and (max-width: 700px){.main-editor-block{display:flex;flex-direction:column}}\n"], dependencies: [{ kind: "component", type: TextEditorComponent, selector: "croco-html-text-editor", inputs: ["tagService"] }, { kind: "component", type: ImageEditorComponent, selector: "croco-html-image-editor", inputs: ["tag", "presentOrEdit"] }, { kind: "component", type: AudioEditorComponent, selector: "croco-html-audio-editor", inputs: ["tag", "presentOrEdit"] }, { kind: "component", type: DownloadFileButtonEditorComponent, selector: "croco-html-download-file-button-editor", inputs: ["tag", "presentOrEdit"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: ExternalVideoEditorComponent, selector: "croco-html-external-video-editor", inputs: ["tag", "presentOrEdit"] }, { kind: "component", type: ButtonEditorComponent, selector: "croco-html-button-editor", inputs: ["tag", "presentOrEdit"] }, { kind: "component", type: CustomWidgetEditorComponent, selector: "croco-html-custom-widget-editor", inputs: ["tag", "presentOrEdit"] }, { kind: "component", type: DefinedCustomEditorBlockComponent, selector: "croco-html-defined-custom-editor-block", inputs: ["tagService"] }, { kind: "pipe", type: JsonPipe, name: "json" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3292
3397
  }
3293
3398
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: MainEditorBlockComponent, decorators: [{
3294
3399
  type: Component,
@@ -3297,14 +3402,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
3297
3402
  ImageEditorComponent,
3298
3403
  AudioEditorComponent,
3299
3404
  DownloadFileButtonEditorComponent,
3300
- HtmlRawEditorComponent,
3301
3405
  MatIconButton,
3302
3406
  ExternalVideoEditorComponent,
3303
3407
  ButtonEditorComponent,
3304
3408
  CustomWidgetEditorComponent,
3305
3409
  JsonPipe,
3306
3410
  DefinedCustomEditorBlockComponent,
3307
- ], template: "<div class=\"main-editor-block\">\n <div class=\"editor-container\">\n @if (textTags.includes(_tag.tagDescription.tag)) {\n <div>\n <croco-html-text-editor [tagService]=\"_tagService\">\n </croco-html-text-editor>\n </div>\n }\n @else if (_tag.tagDescription.tag === 'file-image') {\n <div>\n <croco-html-image-editor [presentOrEdit]=\"presentOrEdit\" [tag]=\"_tag\">\n </croco-html-image-editor>\n </div>\n }\n @else if (_tag.tagDescription.tag === 'audio-player') {\n <div>\n <croco-html-audio-editor [presentOrEdit]=\"presentOrEdit\" [tag]=\"_tag\">\n </croco-html-audio-editor>\n </div>\n }\n @else if (_tag.tagDescription.tag === 'custom-widget') {\n <div>\n <croco-html-custom-widget-editor [presentOrEdit]=\"presentOrEdit\" [tag]=\"_tag\">\n </croco-html-custom-widget-editor>\n </div>\n }\n @else if (_tag.tagDescription.tag === 'external-video') {\n <div>\n <croco-html-external-video-editor [presentOrEdit]=\"presentOrEdit\" [tag]=\"_tag\">\n </croco-html-external-video-editor>\n </div>\n }\n @else if (_tag.tagDescription.tag === 'download-file-button') {\n <div>\n <croco-html-download-file-button-editor [presentOrEdit]=\"presentOrEdit\" [tag]=\"_tag\">\n </croco-html-download-file-button-editor>\n </div>\n }\n @else if (_tag.tagDescription.tag === 'button') {\n <div>\n <croco-html-button-editor [presentOrEdit]=\"presentOrEdit\" [tag]=\"_tag\">\n </croco-html-button-editor>\n </div>\n }\n @else if (_tag.tagDescription.tag === 'html-raw') {\n <div>\n <croco-html-html-raw-editor [presentOrEdit]=\"presentOrEdit\" [tag]=\"_tag\">\n </croco-html-html-raw-editor>\n </div>\n }\n @else if (isEditorDefined()) {\n <div>\n <croco-html-defined-custom-editor-block [tagService]=\"_tagService\"></croco-html-defined-custom-editor-block>\n </div>\n }\n @else {\n <div>\n {{_tag.tagDescription.tag}} \u043D\u0435 \u043F\u043E\u043A\u0430\u0437\u0430\u043D\n </div>\n <div>\n {{_tag | json}}\n </div>\n }\n\n </div>\n\n <div class=\"d-flex justify-content-between\">\n <div class=\"d-flex justify-content-end align-self-center\">\n <div style=\"margin-left: 16px;min-width: 96px\">\n @if (presentOrEdit) {\n <button (click)=\"cancelSave()\" mat-icon-button>\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\"\n d=\"M14.4374 0C15.0921 0 15.7197 0.261421 16.1781 0.723424L19.279 3.82432C19.7407 4.286 20.0001 4.91217 20.0001 5.56508C20.0001 6.21799 19.7407 6.84416 19.279 7.30584L7.95751 18.6238C7.25903 19.4295 6.2689 19.9245 5.1346 20.0023H0V19.0023L0.00324754 14.7873C0.0884381 13.7328 0.578667 12.7523 1.3265 12.0934L12.6954 0.72463C13.1564 0.260831 13.7834 0 14.4374 0ZM5.06401 18.0048C5.59823 17.967 6.09551 17.7184 6.49482 17.2616L14.0567 9.69971L10.3024 5.94518L2.69613 13.5496C2.29098 13.9079 2.04034 14.4092 2.00003 14.8678V18.0029L5.06401 18.0048ZM11.7167 4.53114L15.471 8.28549L17.8648 5.89162C17.9514 5.80502 18.0001 5.68756 18.0001 5.56508C18.0001 5.4426 17.9514 5.32514 17.8648 5.23854L14.7612 2.13486C14.6755 2.04855 14.559 2 14.4374 2C14.3158 2 14.1992 2.04855 14.1136 2.13486L11.7167 4.53114Z\"\n fill=\"#323E8B\" />\n </svg>\n </button>\n }\n @else {\n <button (click)=\"save()\" mat-icon-button>\n <svg width=\"800px\" height=\"800px\" viewBox=\"0 0 24 24\" role=\"img\" xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"saveIconTitle\" stroke=\"#000000\" stroke-width=\"1\" stroke-linecap=\"square\"\n stroke-linejoin=\"miter\" fill=\"none\" color=\"#000000\">\n <title id=\"saveIconTitle\">Save</title>\n <path\n d=\"M17.2928932,3.29289322 L21,7 L21,20 C21,20.5522847 20.5522847,21 20,21 L4,21 C3.44771525,21 3,20.5522847 3,20 L3,4 C3,3.44771525 3.44771525,3 4,3 L16.5857864,3 C16.8510029,3 17.1053568,3.10535684 17.2928932,3.29289322 Z\" />\n <rect width=\"10\" height=\"8\" x=\"7\" y=\"13\" />\n <rect width=\"8\" height=\"5\" x=\"8\" y=\"3\" />\n </svg>\n </button>\n }\n <button (click)=\"deleteItem()\" mat-icon-button color=\"warn\">\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\"\n d=\"M7.49988 0.833332H12.4999C13.4204 0.833332 14.1665 1.57952 14.1665 2.5V3.33333H16.6665C17.587 3.33333 18.3332 4.07952 18.3332 4.99999V6.66666C18.3332 7.58714 17.587 8.33333 16.6665 8.33333H16.5998L15.8332 17.5C15.8332 18.4205 15.087 19.1667 14.1665 19.1667H5.8332C4.91272 19.1667 4.16653 18.4205 4.16941 17.5692L3.39975 8.33333H3.33317C2.4127 8.33333 1.6665 7.58714 1.6665 6.66666V4.99999C1.6665 4.07952 2.4127 3.33333 3.33317 3.33333H5.83321V2.5C5.83321 1.57952 6.5794 0.833332 7.49988 0.833332ZM5.83321 5V4.99999H3.33317V6.66666H16.6665V4.99999L14.1665 5H5.83321ZM5.83324 17.5L5.07198 8.33333H14.9276L14.1695 17.4308L14.1666 17.5H5.83324ZM12.4999 2.5V3.33334H7.49992V2.5H12.4999Z\"\n fill=\"#F96666\" />\n </svg>\n </button>\n </div>\n </div>\n\n </div>\n</div>\n", styles: [".main-editor-block{display:flex;justify-content:space-between}.editor-container{flex-grow:1}@media screen and (max-width: 700px){.main-editor-block{display:flex;flex-direction:column}}\n"] }]
3411
+ ], template: "<div class=\"main-editor-block\">\n <div class=\"editor-container\">\n @if (textTags.includes(_tag.tagDescription.tag)) {\n <div>\n <croco-html-text-editor [tagService]=\"_tagService\">\n </croco-html-text-editor>\n </div>\n }\n @else if (_tag.tagDescription.tag === 'file-image') {\n <div>\n <croco-html-image-editor [presentOrEdit]=\"presentOrEdit\" [tag]=\"_tag\">\n </croco-html-image-editor>\n </div>\n }\n @else if (_tag.tagDescription.tag === 'audio-player') {\n <div>\n <croco-html-audio-editor [presentOrEdit]=\"presentOrEdit\" [tag]=\"_tag\">\n </croco-html-audio-editor>\n </div>\n }\n @else if (_tag.tagDescription.tag === 'custom-widget') {\n <div>\n <croco-html-custom-widget-editor [presentOrEdit]=\"presentOrEdit\" [tag]=\"_tag\">\n </croco-html-custom-widget-editor>\n </div>\n }\n @else if (_tag.tagDescription.tag === 'external-video') {\n <div>\n <croco-html-external-video-editor [presentOrEdit]=\"presentOrEdit\" [tag]=\"_tag\">\n </croco-html-external-video-editor>\n </div>\n }\n @else if (_tag.tagDescription.tag === 'download-file-button') {\n <div>\n <croco-html-download-file-button-editor [presentOrEdit]=\"presentOrEdit\" [tag]=\"_tag\">\n </croco-html-download-file-button-editor>\n </div>\n }\n @else if (_tag.tagDescription.tag === 'button') {\n <div>\n <croco-html-button-editor [presentOrEdit]=\"presentOrEdit\" [tag]=\"_tag\">\n </croco-html-button-editor>\n </div>\n }\n @else if (isEditorDefined()) {\n <div>\n <croco-html-defined-custom-editor-block [tagService]=\"_tagService\"></croco-html-defined-custom-editor-block>\n </div>\n }\n @else {\n <div>\n {{_tag.tagDescription.tag}} \u043D\u0435 \u043F\u043E\u043A\u0430\u0437\u0430\u043D\n </div>\n <div>\n {{_tag | json}}\n </div>\n }\n\n </div>\n\n <div class=\"d-flex justify-content-between\">\n <div class=\"d-flex justify-content-end align-self-center\">\n <div style=\"margin-left: 16px;min-width: 96px\">\n @if (presentOrEdit) {\n <button (click)=\"cancelSave()\" mat-icon-button>\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\"\n d=\"M14.4374 0C15.0921 0 15.7197 0.261421 16.1781 0.723424L19.279 3.82432C19.7407 4.286 20.0001 4.91217 20.0001 5.56508C20.0001 6.21799 19.7407 6.84416 19.279 7.30584L7.95751 18.6238C7.25903 19.4295 6.2689 19.9245 5.1346 20.0023H0V19.0023L0.00324754 14.7873C0.0884381 13.7328 0.578667 12.7523 1.3265 12.0934L12.6954 0.72463C13.1564 0.260831 13.7834 0 14.4374 0ZM5.06401 18.0048C5.59823 17.967 6.09551 17.7184 6.49482 17.2616L14.0567 9.69971L10.3024 5.94518L2.69613 13.5496C2.29098 13.9079 2.04034 14.4092 2.00003 14.8678V18.0029L5.06401 18.0048ZM11.7167 4.53114L15.471 8.28549L17.8648 5.89162C17.9514 5.80502 18.0001 5.68756 18.0001 5.56508C18.0001 5.4426 17.9514 5.32514 17.8648 5.23854L14.7612 2.13486C14.6755 2.04855 14.559 2 14.4374 2C14.3158 2 14.1992 2.04855 14.1136 2.13486L11.7167 4.53114Z\"\n fill=\"#323E8B\" />\n </svg>\n </button>\n }\n @else {\n <button (click)=\"save()\" mat-icon-button>\n <svg width=\"800px\" height=\"800px\" viewBox=\"0 0 24 24\" role=\"img\" xmlns=\"http://www.w3.org/2000/svg\"\n aria-labelledby=\"saveIconTitle\" stroke=\"#000000\" stroke-width=\"1\" stroke-linecap=\"square\"\n stroke-linejoin=\"miter\" fill=\"none\" color=\"#000000\">\n <title id=\"saveIconTitle\">Save</title>\n <path\n d=\"M17.2928932,3.29289322 L21,7 L21,20 C21,20.5522847 20.5522847,21 20,21 L4,21 C3.44771525,21 3,20.5522847 3,20 L3,4 C3,3.44771525 3.44771525,3 4,3 L16.5857864,3 C16.8510029,3 17.1053568,3.10535684 17.2928932,3.29289322 Z\" />\n <rect width=\"10\" height=\"8\" x=\"7\" y=\"13\" />\n <rect width=\"8\" height=\"5\" x=\"8\" y=\"3\" />\n </svg>\n </button>\n }\n <button (click)=\"deleteItem()\" mat-icon-button color=\"warn\">\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\"\n d=\"M7.49988 0.833332H12.4999C13.4204 0.833332 14.1665 1.57952 14.1665 2.5V3.33333H16.6665C17.587 3.33333 18.3332 4.07952 18.3332 4.99999V6.66666C18.3332 7.58714 17.587 8.33333 16.6665 8.33333H16.5998L15.8332 17.5C15.8332 18.4205 15.087 19.1667 14.1665 19.1667H5.8332C4.91272 19.1667 4.16653 18.4205 4.16941 17.5692L3.39975 8.33333H3.33317C2.4127 8.33333 1.6665 7.58714 1.6665 6.66666V4.99999C1.6665 4.07952 2.4127 3.33333 3.33317 3.33333H5.83321V2.5C5.83321 1.57952 6.5794 0.833332 7.49988 0.833332ZM5.83321 5V4.99999H3.33317V6.66666H16.6665V4.99999L14.1665 5H5.83321ZM5.83324 17.5L5.07198 8.33333H14.9276L14.1695 17.4308L14.1666 17.5H5.83324ZM12.4999 2.5V3.33334H7.49992V2.5H12.4999Z\"\n fill=\"#F96666\" />\n </svg>\n </button>\n </div>\n </div>\n\n </div>\n</div>", styles: [".main-editor-block{display:flex;justify-content:space-between}.editor-container{flex-grow:1}@media screen and (max-width: 700px){.main-editor-block{display:flex;flex-direction:column}}\n"] }]
3308
3412
  }], ctorParameters: () => [{ type: undefined, decorators: [{
3309
3413
  type: Inject,
3310
3414
  args: [CrocoHtmlOptionsToken]
@@ -3454,6 +3558,7 @@ class VisualEditorComponent {
3454
3558
  recalculateBodyTags() {
3455
3559
  this.bodyTags = BodyTagsExtensions.getBodyTags(this.html, this._options);
3456
3560
  this.saveBodyTags = [...this.bodyTags];
3561
+ this._options.onBodyTagsRecalculated?.(this.saveBodyTags);
3457
3562
  this._cdr.markForCheck();
3458
3563
  }
3459
3564
  selectTag(data) {
@@ -4007,7 +4112,7 @@ class CrocoHtmlModule {
4007
4112
  static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: CrocoHtmlModule, imports: [CommonModule,
4008
4113
  FormsModule,
4009
4114
  ReactiveFormsModule,
4010
- NgSelectModule, i1$6.MatBadgeModule, i2$5.MatTableModule, i3$1.MatExpansionModule, i1$4.MatFormFieldModule, i2$4.MatSnackBarModule, i6$1.MatProgressBarModule, i7.MatProgressSpinnerModule, i5.MatTabsModule, i9.MatMenuModule, i1$3.MatCardModule, i11.MatSelectModule, i12.MatTooltipModule, i13.MatCheckboxModule, i14.MatChipsModule, i15.MatListModule, i2.MatButtonModule, i2$2.MatInputModule, i2$3.MatDialogModule, i19.MatPaginatorModule, i20.MatDatepickerModule, i21.MatGridListModule, i22.MatSlideToggleModule, i23.MatTreeModule, i24.MatNativeDateModule, i25.MatAutocompleteModule, i26.MatSidenavModule, i27.MatIconModule, i28.DragDropModule, i29.MatButtonToggleModule, ErrorBannerComponent,
4115
+ NgSelectModule, i1$6.MatBadgeModule, i2$5.MatTableModule, i3.MatExpansionModule, i4.MatFormFieldModule, i2$4.MatSnackBarModule, i6$1.MatProgressBarModule, i7.MatProgressSpinnerModule, i5.MatTabsModule, i9.MatMenuModule, i1$3.MatCardModule, i11.MatSelectModule, i12.MatTooltipModule, i13.MatCheckboxModule, i14.MatChipsModule, i15.MatListModule, i2.MatButtonModule, i1$4.MatInputModule, i2$3.MatDialogModule, i19.MatPaginatorModule, i20.MatDatepickerModule, i21.MatGridListModule, i22.MatSlideToggleModule, i23.MatTreeModule, i24.MatNativeDateModule, i25.MatAutocompleteModule, i26.MatSidenavModule, i27.MatIconModule, i28.DragDropModule, i29.MatButtonToggleModule, ErrorBannerComponent,
4011
4116
  VkVideoPlayerComponent,
4012
4117
  YoutubeVideoPlayerComponent,
4013
4118
  DownloadFileButtonEditorComponent,
@@ -4049,5 +4154,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
4049
4154
  * Generated bundle index. Do not edit.
4050
4155
  */
4051
4156
 
4052
- export { AddFilesBtnComponent, AngularMaterialTableMethods, AudioEditorComponent, AudioMethods, AudioPlayerTagViewComponent, BodyTagsExtensions, BootstrapTableMethods, ButtonTagDataConsts, ButtonTagService, CrocoHtmlFileOptionsService, CrocoHtmlModule, CrocoHtmlOptionsToken, CustomWidgetEditorComponent, CustomWidgetIconComponent, CustomWidgetTagDataConsts, CustomWidgetTagService, DefinedCustomEditorBlockComponent, DefinedCustomTagViewComponent, DownloadButtonTagDataConsts, DownloadButtonTagService, ExternalVideoEditorComponent, ExternalVideoPlayers, ExternalVideoSupportedTypes, ExternalVideoTagDataConsts, ExternalVideoTagService, FileAudioTagDataConsts, FileIdSelectComponent, FileImageTagDataConsts, FileImageTagService, FileImageTagViewComponent, FileType, HtmlPageDataController, HtmlRawEditorComponent, HtmlRawTagDataConsts, HtmlRawTagService, HtmlRawViewComponent, HtmlViewComponent, HtmlViewController, ImageEditorComponent, ImageMethods, LinkTagAttrs, LinkTagConsts, LinkTagService, MainEditorBlockComponent, MainEditorComponent, TableBuilder, TableMethods, TableTypes, TagEditorService, TagToSpanPipe, TextAlignment, TextEditorComponent, TextSimpleMethods, TextTag, TextTagDataConsts, TextTagHtmlMarkupTagService, TextTags, ToHtmlBodyTagsPipe, ToPreviewHtmlPipe, ToPreviewPipe, UploadFilesBtnComponent, VisualEditorComponent, XmlExtensions, XmlTagCustomWidgetComponent, XmlTagExternalVideoComponent, XmlTagHeaderInnerTextViewComponent, XmlTagHeaderTextViewComponent, XmlTagHtmlViewComponent, XmlTagTextViewComponent, XmlTagViewComponent };
4157
+ export { AddFilesBtnComponent, AngularMaterialTableMethods, AudioEditorComponent, AudioMethods, AudioPlayerTagViewComponent, BodyTagsExtensions, BootstrapTableMethods, ButtonTagDataConsts, ButtonTagService, CrocoHtmlFileOptionsService, CrocoHtmlModule, CrocoHtmlOptionsToken, CustomWidgetEditorComponent, CustomWidgetIconComponent, CustomWidgetTagDataConsts, CustomWidgetTagService, DefinedCustomEditorBlockComponent, DefinedCustomTagViewComponent, DownloadButtonTagDataConsts, DownloadButtonTagService, ExternalVideoEditorComponent, ExternalVideoPlayers, ExternalVideoSupportedTypes, ExternalVideoTagDataConsts, ExternalVideoTagService, FileAudioTagDataConsts, FileIdSelectComponent, FileImageTagDataConsts, FileImageTagService, FileImageTagViewComponent, FileType, HtmlPageDataController, HtmlRawEditorComponent, HtmlRawTagDataConsts, HtmlRawTagService, HtmlRawViewComponent, HtmlViewComponent, HtmlViewController, ImageEditorComponent, ImageMethods, LinkEditorComponent, LinkTagAttrs, LinkTagConsts, LinkTagService, MainEditorBlockComponent, MainEditorComponent, TableBuilder, TableMethods, TableTypes, TagEditorService, TagToSpanPipe, TextAlignment, TextEditorComponent, TextSimpleMethods, TextTag, TextTagDataConsts, TextTagHtmlMarkupTagService, TextTags, ToHtmlBodyTagsPipe, ToPreviewHtmlPipe, ToPreviewPipe, UploadFilesBtnComponent, VisualEditorComponent, XmlExtensions, XmlTagCustomWidgetComponent, XmlTagExternalVideoComponent, XmlTagHeaderInnerTextViewComponent, XmlTagHeaderTextViewComponent, XmlTagHtmlViewComponent, XmlTagTextViewComponent, XmlTagViewComponent };
4053
4158
  //# sourceMappingURL=croco-html.mjs.map