croco-html 4.2.0 → 4.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,7 +13,7 @@ import { MatIcon, MatIconModule } from '@angular/material/icon';
13
13
  import * as i1$2 from '@angular/material/card';
14
14
  import { MatCardModule, MatCard, MatCardContent } from '@angular/material/card';
15
15
  import { BehaviorSubject, Subject, takeUntil } from 'rxjs';
16
- import { NgStyle, NgTemplateOutlet, CommonModule } from '@angular/common';
16
+ import { NgStyle, JsonPipe, NgTemplateOutlet, CommonModule } from '@angular/common';
17
17
  import * as i12 from '@angular/material/tooltip';
18
18
  import { MatTooltip, MatTooltipModule } from '@angular/material/tooltip';
19
19
  import * as i2$1 from '@angular/material/input';
@@ -87,14 +87,14 @@ class AngularMaterialTableMethods {
87
87
  data: data,
88
88
  };
89
89
  }
90
- static checkHeaders(tableData) {
91
- if (tableData.header === null) {
90
+ static checkHeaders(header) {
91
+ if (header === null) {
92
92
  return {
93
93
  isSucceeded: false,
94
94
  message: "Необходимо указать заголовок таблицы"
95
95
  };
96
96
  }
97
- let columns = tableData.header.columns;
97
+ let columns = header.columns;
98
98
  var uniqueDislayedColumns = columns.filter((v, i, a) => a.indexOf(v) === i);
99
99
  if (uniqueDislayedColumns.length !== columns.length) {
100
100
  return {
@@ -107,15 +107,14 @@ class AngularMaterialTableMethods {
107
107
  message: "Ok"
108
108
  };
109
109
  }
110
- static checkAngularMaterialTableData(tableData, checkHeaders = true) {
110
+ static checkAngularMaterialTableData(header, rows, checkHeaders = true) {
111
111
  if (checkHeaders) {
112
- var checkHeadersResult = this.checkHeaders(tableData);
112
+ var checkHeadersResult = this.checkHeaders(header);
113
113
  if (!checkHeadersResult.isSucceeded) {
114
114
  return checkHeadersResult;
115
115
  }
116
116
  }
117
- let rows = tableData.rows;
118
- let columns = tableData.header.columns;
117
+ let columns = header.columns;
119
118
  for (let i = 0; i < rows.length; i++) {
120
119
  const row = rows[i];
121
120
  if (row.columns.length !== columns.length) {
@@ -134,6 +133,42 @@ class AngularMaterialTableMethods {
134
133
  }
135
134
  }
136
135
 
136
+ class HtmlExtractionMethods {
137
+ static transformHtmlElementToBlocks(element, options) {
138
+ const data = [];
139
+ for (let i = 0; i < element.children.length; i++) {
140
+ const elem = element.children.item(i);
141
+ const loweredTagName = elem.tagName.toLowerCase();
142
+ if (BodyTagsExtensions.tagServices.hasOwnProperty(loweredTagName)) {
143
+ const tagService = BodyTagsExtensions.tagServices[loweredTagName];
144
+ const resultBlock = tagService.extractBlockFromHtmlElement(elem, options);
145
+ data.push(resultBlock);
146
+ continue;
147
+ }
148
+ else {
149
+ data.push({
150
+ tagName: "unsupported-tag",
151
+ data: {
152
+ tagString: elem.outerHTML
153
+ }
154
+ });
155
+ }
156
+ }
157
+ return data;
158
+ }
159
+ static transformHtmlStringToBlocks(value, options) {
160
+ if (value === undefined || value === null) {
161
+ return [];
162
+ }
163
+ value = value
164
+ .replace('\n', '')
165
+ .replace('\t', '');
166
+ var div = document.createElement("div");
167
+ div.innerHTML = value;
168
+ return this.transformHtmlElementToBlocks(div, options);
169
+ }
170
+ }
171
+
137
172
  class FileImageTagDataConsts {
138
173
  static { this.TagName = "file-image"; }
139
174
  static { this.FileIdAttrName = "file-id"; }
@@ -405,7 +440,6 @@ class ExternalVideoTagService {
405
440
  class HtmlRawTagDataConsts {
406
441
  static { this.TagName = "html-raw"; }
407
442
  }
408
-
409
443
  class HtmlRawTagService {
410
444
  constructor() {
411
445
  this.tagName = HtmlRawTagDataConsts.TagName;
@@ -627,6 +661,62 @@ class CustomWidgetTagService {
627
661
  }
628
662
  }
629
663
 
664
+ class TextTags {
665
+ static { this.text = "text"; }
666
+ static { this.h1 = "h1"; }
667
+ static { this.h2 = "h2"; }
668
+ static { this.h3 = "h3"; }
669
+ static { this.h4 = "h4"; }
670
+ static { this.h5 = "h5"; }
671
+ static { this.h6 = "h6"; }
672
+ static { this.headerTextTags = [TextTags.h1, TextTags.h2, TextTags.h3, TextTags.h4, TextTags.h5, TextTags.h6]; }
673
+ static { this.allTextTags = [TextTags.text, ...TextTags.headerTextTags]; }
674
+ }
675
+
676
+ class ExternalVideoTagDataConsts {
677
+ static { this.TagName = "external-video"; }
678
+ static { this.VideoTypeAttrName = "type"; }
679
+ static { this.LinkAttrName = "link"; }
680
+ static { this.UseResponsiveWrapperAttrName = "use-responsive-wrapper"; }
681
+ static { this.IframeAttrName = "iframe"; }
682
+ }
683
+ class ExternalVideoSupportedTypes {
684
+ static { this.Youtube = "youtube"; }
685
+ static { this.VkVideo = "vk-video"; }
686
+ static { this.Code = "code"; }
687
+ }
688
+ const ExternalVideoPlayers = [
689
+ {
690
+ type: ExternalVideoSupportedTypes.Code,
691
+ displayValue: 'Встраиваемое Видео',
692
+ },
693
+ {
694
+ type: ExternalVideoSupportedTypes.Youtube,
695
+ displayValue: 'Youtube',
696
+ },
697
+ {
698
+ type: ExternalVideoSupportedTypes.VkVideo,
699
+ displayValue: 'Vk Video',
700
+ }
701
+ ];
702
+
703
+ class Tags {
704
+ static { this.Text = TextTags.text; }
705
+ static { this.H1 = TextTags.h1; }
706
+ static { this.H2 = TextTags.h2; }
707
+ static { this.H3 = TextTags.h3; }
708
+ static { this.H4 = TextTags.h4; }
709
+ static { this.H5 = TextTags.h5; }
710
+ static { this.H6 = TextTags.h6; }
711
+ static { this.HtmlRaw = HtmlRawTagDataConsts.TagName; }
712
+ static { this.FileImage = FileImageTagDataConsts.TagName; }
713
+ static { this.Table = 'table'; }
714
+ static { this.RichText = 'rich-text'; }
715
+ static { this.ExternalVideo = ExternalVideoTagDataConsts.TagName; }
716
+ static { this.UnsupportedTag = 'unsupported-tag'; }
717
+ static { this.CustomWidget = CustomWidgetTagDataConsts.TagName; }
718
+ }
719
+
630
720
  const TextTag = "text";
631
721
  class TextSimpleMethods {
632
722
  static { this.supportedTags = ["sup", "sub", "strong", "b", "i", "u"]; }
@@ -705,10 +795,10 @@ class TextSimpleMethods {
705
795
  }
706
796
 
707
797
  class BootstrapTableMethods {
708
- static BuildTable(data) {
798
+ static BuildTable(header, rows) {
709
799
  let result = `<table class="table table-bordered">`;
710
- result += this.BuildHeader(data.header);
711
- result += this.BuildBody(data.rows);
800
+ result += this.BuildHeader(header);
801
+ result += this.BuildBody(rows);
712
802
  result += "</table>";
713
803
  return result;
714
804
  }
@@ -776,32 +866,19 @@ class TableTypes {
776
866
  }
777
867
  class TableMethods {
778
868
  static getTableFromHtmlTag(tableTag, options) {
869
+ const tableHeader = TableMethods.getHeader(tableTag);
870
+ const tableRows = TableMethods.getTableRows(tableTag, options);
779
871
  let tableData = {
780
- header: TableMethods.getHeader(tableTag),
781
- rows: TableMethods.getTableRows(tableTag, options)
782
- };
783
- var result = {
784
- type: TableTypes.Table,
785
- data: tableData,
786
- validationResult: this.checkTable(tableData),
787
- bootstrapHtml: ""
872
+ header: tableHeader,
873
+ rows: tableRows,
874
+ bootstrapHtml: BootstrapTableMethods.BuildTable(tableHeader, tableRows),
875
+ html: tableTag.outerHTML,
876
+ angularMaterialTableDataCheck: AngularMaterialTableMethods.checkAngularMaterialTableData(tableHeader, tableRows)
788
877
  };
789
- if (!result.validationResult) {
790
- return result;
791
- }
792
- result.bootstrapHtml = BootstrapTableMethods.BuildTable(result.data);
793
- var angularMaterialTableDataCheck = AngularMaterialTableMethods.checkAngularMaterialTableData(tableData);
794
- if (!angularMaterialTableDataCheck.isSucceeded) {
795
- return {
796
- ...result,
797
- angularMaterialTableDataCheck
798
- };
799
- }
800
878
  return {
801
- ...result,
802
- angularMaterialTableDataCheck,
803
- html: tableTag.outerHTML,
804
- angularMaterialTableData: AngularMaterialTableMethods.getAngularMaterialTableData(tableData.header.columns, tableData.rows),
879
+ tagName: TableTypes.Table,
880
+ data: tableData,
881
+ validationResult: this.checkTable(tableData)
805
882
  };
806
883
  }
807
884
  static checkTable(tableData) {
@@ -873,105 +950,42 @@ class TableMethods {
873
950
  }
874
951
  }
875
952
 
876
- class HtmlExtractionMethods {
877
- // TODO удалить в пользу BodyTagsExtensions
878
- static { this.Extractors = {
879
- [TableTypes.Table]: (elem, options) => TableMethods.getTableFromHtmlTag(elem, options),
880
- }; }
881
- static transformHtmlElementToBlocks(element, options) {
882
- var data = [];
883
- for (let i = 0; i < element.children.length; i++) {
884
- var elem = element.children.item(i);
885
- var loweredTagName = elem.tagName.toLowerCase();
886
- if (BodyTagsExtensions.tagServices.hasOwnProperty(loweredTagName)) {
887
- var tagService = BodyTagsExtensions.tagServices[loweredTagName];
888
- var resultBlock = tagService.extractBlockFromHtmlElement(elem, options);
889
- data.push(resultBlock);
890
- continue;
891
- }
892
- if (!HtmlExtractionMethods.Extractors.hasOwnProperty(loweredTagName)) {
893
- data.push({
894
- tagName: "unsupported-tag",
895
- data: {
896
- tagString: elem.outerHTML
897
- }
898
- });
899
- }
900
- else {
901
- var extractor = HtmlExtractionMethods.Extractors[loweredTagName];
902
- var result = extractor(elem, options);
903
- data.push(result);
904
- }
905
- }
906
- return data;
953
+ class TableTagService {
954
+ constructor() {
955
+ this.tagName = TableTypes.Table;
956
+ this.shortDescription = "Таблица";
907
957
  }
908
- static transformHtmlStringToBlocks(value, options) {
909
- if (value === undefined || value === null) {
910
- return [];
911
- }
912
- value = value
913
- .replace('\n', '')
914
- .replace('\t', '');
915
- var div = document.createElement("div");
916
- div.innerHTML = value;
917
- return this.transformHtmlElementToBlocks(div, options);
958
+ bodyTagToHtmlStringConverter(bodyTag) {
959
+ return `<${this.tagName}>${bodyTag.innerHtml}</${this.tagName}>`;
918
960
  }
919
- }
920
-
921
- class TextTags {
922
- static { this.text = "text"; }
923
- static { this.h1 = "h1"; }
924
- static { this.h2 = "h2"; }
925
- static { this.h3 = "h3"; }
926
- static { this.h4 = "h4"; }
927
- static { this.h5 = "h5"; }
928
- static { this.h6 = "h6"; }
929
- static { this.headerTextTags = [TextTags.h1, TextTags.h2, TextTags.h3, TextTags.h4, TextTags.h5, TextTags.h6]; }
930
- static { this.allTextTags = [TextTags.text, ...TextTags.headerTextTags]; }
931
- }
932
-
933
- class ExternalVideoTagDataConsts {
934
- static { this.TagName = "external-video"; }
935
- static { this.VideoTypeAttrName = "type"; }
936
- static { this.LinkAttrName = "link"; }
937
- static { this.UseResponsiveWrapperAttrName = "use-responsive-wrapper"; }
938
- static { this.IframeAttrName = "iframe"; }
939
- }
940
- class ExternalVideoSupportedTypes {
941
- static { this.Youtube = "youtube"; }
942
- static { this.VkVideo = "vk-video"; }
943
- static { this.Code = "code"; }
944
- }
945
- const ExternalVideoPlayers = [
946
- {
947
- type: ExternalVideoSupportedTypes.Code,
948
- displayValue: 'Встраиваемое Видео',
949
- },
950
- {
951
- type: ExternalVideoSupportedTypes.Youtube,
952
- displayValue: 'Youtube',
953
- },
954
- {
955
- type: ExternalVideoSupportedTypes.VkVideo,
956
- displayValue: 'Vk Video',
961
+ extractBlockFromHtmlElement(elem, options) {
962
+ return TableMethods.getTableFromHtmlTag(elem, options);
963
+ }
964
+ toBodyTag(data) {
965
+ let tableData = data.data;
966
+ return {
967
+ presentOrEdit: true,
968
+ tagDescription: {
969
+ tag: data.tagName,
970
+ displayValue: this.shortDescription,
971
+ isCustom: false
972
+ },
973
+ attributes: tableData,
974
+ innerHtml: null
975
+ };
976
+ }
977
+ getDefaultValue(props) {
978
+ return {
979
+ tagDescription: {
980
+ tag: this.tagName,
981
+ displayValue: this.shortDescription,
982
+ isCustom: false
983
+ },
984
+ attributes: {},
985
+ presentOrEdit: false,
986
+ innerHtml: props.htmlRaw,
987
+ };
957
988
  }
958
- ];
959
-
960
- class Tags {
961
- static { this.Text = TextTags.text; }
962
- static { this.H1 = TextTags.h1; }
963
- static { this.H2 = TextTags.h2; }
964
- static { this.H3 = TextTags.h3; }
965
- static { this.H4 = TextTags.h4; }
966
- static { this.H5 = TextTags.h5; }
967
- static { this.H6 = TextTags.h6; }
968
- static { this.HtmlRaw = HtmlRawTagDataConsts.TagName; }
969
- static { this.FileImage = FileImageTagDataConsts.TagName; }
970
- static { this.Table = 'table'; }
971
- static { this.RichText = 'rich-text'; }
972
- static { this.ExternalVideo = ExternalVideoTagDataConsts.TagName; }
973
- static { this.UnsupportedTag = 'unsupported-tag'; }
974
- static { this.CustomWidget = CustomWidgetTagDataConsts.TagName; }
975
989
  }
976
990
 
977
991
  class BodyTagsExtensions {
@@ -987,7 +1001,8 @@ class BodyTagsExtensions {
987
1001
  [ExternalVideoTagDataConsts.TagName]: new ExternalVideoTagService(),
988
1002
  [HtmlRawTagDataConsts.TagName]: new HtmlRawTagService(),
989
1003
  [DownloadButtonTagDataConsts.TagName]: new DownloadButtonTagService(),
990
- [ButtonTagDataConsts.TagName]: new ButtonTagService()
1004
+ [ButtonTagDataConsts.TagName]: new ButtonTagService(),
1005
+ [TableTypes.Table]: new TableTagService()
991
1006
  }; }
992
1007
  static convertToHtmlString(bodyTag) {
993
1008
  const tagName = bodyTag.tagDescription.tag;
@@ -1717,6 +1732,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
1717
1732
  type: Input
1718
1733
  }] } });
1719
1734
 
1735
+ class DefinedCustomTagViewComponent {
1736
+ set data(value) {
1737
+ this._data = value;
1738
+ }
1739
+ ;
1740
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DefinedCustomTagViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1741
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DefinedCustomTagViewComponent, isStandalone: true, selector: "croco-html-defined-custom-tag-view", inputs: { data: "data" }, ngImport: i0, template: "<div>\n {{_data | json}}\n</div>", dependencies: [{ kind: "pipe", type: JsonPipe, name: "json" }] }); }
1742
+ }
1743
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DefinedCustomTagViewComponent, decorators: [{
1744
+ type: Component,
1745
+ args: [{ selector: 'croco-html-defined-custom-tag-view', imports: [JsonPipe], template: "<div>\n {{_data | json}}\n</div>" }]
1746
+ }], propDecorators: { data: [{
1747
+ type: Input,
1748
+ args: [{ required: true }]
1749
+ }] } });
1750
+
1720
1751
  class XmlTagViewComponent {
1721
1752
  constructor(_options) {
1722
1753
  this._options = _options;
@@ -1729,7 +1760,7 @@ class XmlTagViewComponent {
1729
1760
  return this._options.definedCustomTags.includes(item.tagName);
1730
1761
  }
1731
1762
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: XmlTagViewComponent, deps: [{ token: CrocoHtmlOptionsToken }], target: i0.ɵɵFactoryTarget.Component }); }
1732
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: XmlTagViewComponent, isStandalone: true, selector: "croco-html-xml-tag-view", inputs: { data: "data" }, ngImport: i0, template: "<div>\n @for (item of data; track $index) {\n <div class=\"row\">\n\n @if (item.tagName === 'text') {\n <div>\n <croco-html-xml-tag-text-view [item]=\"item\"></croco-html-xml-tag-text-view>\n </div>\n }\n\n @if (item.tagName === 'html-raw') {\n <div>\n <croco-html-raw-view [rawHtml]=\"item.data.innerHTML\"></croco-html-raw-view>\n </div>\n }\n\n @if (isHeaderTextTag(item)) {\n <div>\n <croco-html-xml-tag-header-text-view [item]=\"item\"></croco-html-xml-tag-header-text-view>\n </div>\n }\n\n @if (item.tagName === 'file-image') {\n <div>\n <croco-html-file-image-tag-view [item]=\"item\"></croco-html-file-image-tag-view>\n </div>\n }\n\n @if (item.tagName === 'custom-widget') {\n <div>\n <croco-html-xml-tag-custom-widget [tagData]=\"item.data\"></croco-html-xml-tag-custom-widget>\n </div>\n }\n\n @if (item.tagName === 'table' && item.validationResult) {\n\n @if (item.validationResult.isSucceeded){\n <croco-html-xml-tag-html-view [html]=\"item.bootstrapHtml\">\n </croco-html-xml-tag-html-view>\n }\n @else {\n <croco-html-error-banner [message]=\"item.validationResult.message\">\n </croco-html-error-banner>\n }\n }\n\n @if (item.tagName === 'external-video') {\n <div>\n <croco-html-xml-tag-external-video [data]=\"item\"></croco-html-xml-tag-external-video>\n </div>\n }\n\n @if (item.tagName === 'download-file-button') {\n <div>\n <croco-html-xml-tag-download-file-button [data]=\"item\"></croco-html-xml-tag-download-file-button>\n </div>\n }\n\n @if (item.tagName === 'button') {\n <div>\n <croco-html-xml-tag-button [data]=\"item\"></croco-html-xml-tag-button>\n </div>\n }\n @if (item.tagName === 'unsupported-tag') {\n <div class=\"red\" style=\"margin-top: 10px;\">\n <h4>\u0414\u0430\u043D\u043D\u044B\u0439 \u0442\u0435\u0433 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F</h4>\n <span>\n {{item.data.tagString}}\n </span>\n </div>\n }\n </div>\n }\n</div>", styles: [".red{background-color:#c94444;color:#fff}\n"], dependencies: [{ kind: "component", type: XmlTagTextViewComponent, selector: "croco-html-xml-tag-text-view", inputs: ["item"] }, { kind: "component", type: HtmlRawViewComponent, selector: "croco-html-raw-view", inputs: ["rawHtml"] }, { kind: "component", type: XmlTagHeaderTextViewComponent, selector: "croco-html-xml-tag-header-text-view", inputs: ["item"] }, { kind: "component", type: FileImageTagViewComponent, selector: "croco-html-file-image-tag-view", inputs: ["item"] }, { kind: "component", type: XmlTagHtmlViewComponent, selector: "croco-html-xml-tag-html-view", inputs: ["html"] }, { kind: "component", type: ErrorBannerComponent, selector: "croco-html-error-banner", inputs: ["message"] }, { kind: "component", type: XmlTagExternalVideoComponent, selector: "croco-html-xml-tag-external-video", inputs: ["data", "tagData"] }, { kind: "component", type: XmlTagDownloadFileButtonComponent, selector: "croco-html-xml-tag-download-file-button", inputs: ["data", "tagData"] }, { kind: "component", type: XmlTagButtonComponent, selector: "croco-html-xml-tag-button", inputs: ["data", "tagData"] }, { kind: "component", type: XmlTagCustomWidgetComponent, selector: "croco-html-xml-tag-custom-widget", inputs: ["tagData"] }], encapsulation: i0.ViewEncapsulation.None }); }
1763
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: XmlTagViewComponent, isStandalone: true, selector: "croco-html-xml-tag-view", inputs: { data: "data" }, ngImport: i0, template: "<div>\n @for (item of data; track $index) {\n <div class=\"row\">\n\n @if (item.tagName === 'text') {\n <div>\n <croco-html-xml-tag-text-view [item]=\"item\"></croco-html-xml-tag-text-view>\n </div>\n }\n\n @if (item.tagName === 'html-raw') {\n <div>\n <croco-html-raw-view [rawHtml]=\"item.data.innerHTML\"></croco-html-raw-view>\n </div>\n }\n\n @if (isHeaderTextTag(item)) {\n <div>\n <croco-html-xml-tag-header-text-view [item]=\"item\"></croco-html-xml-tag-header-text-view>\n </div>\n }\n\n @if (item.tagName === 'file-image') {\n <div>\n <croco-html-file-image-tag-view [item]=\"item\"></croco-html-file-image-tag-view>\n </div>\n }\n\n @if (item.tagName === 'custom-widget') {\n <div>\n <croco-html-xml-tag-custom-widget [tagData]=\"item.data\"></croco-html-xml-tag-custom-widget>\n </div>\n }\n\n @if (item.tagName === 'table' && item.validationResult) {\n\n @if (item.validationResult.isSucceeded){\n <croco-html-xml-tag-html-view [html]=\"item.data.bootstrapHtml\">\n </croco-html-xml-tag-html-view>\n }\n @else {\n <croco-html-error-banner [message]=\"item.validationResult.message\">\n </croco-html-error-banner>\n }\n }\n\n @if (item.tagName === 'external-video') {\n <div>\n <croco-html-xml-tag-external-video [data]=\"item\"></croco-html-xml-tag-external-video>\n </div>\n }\n\n @if (item.tagName === 'download-file-button') {\n <div>\n <croco-html-xml-tag-download-file-button [data]=\"item\"></croco-html-xml-tag-download-file-button>\n </div>\n }\n\n @if (item.tagName === 'button') {\n <div>\n <croco-html-xml-tag-button [data]=\"item\"></croco-html-xml-tag-button>\n </div>\n }\n\n @if (item.tagName === 'unsupported-tag') {\n <div class=\"red\" style=\"margin-top: 10px;\">\n <h4>\u0414\u0430\u043D\u043D\u044B\u0439 \u0442\u0435\u0433 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F</h4>\n <span>\n {{item.data.tagString}}\n </span>\n </div>\n }\n\n @if (isDefinedCustomTag(item)) {\n <div>\n <croco-html-defined-custom-tag-view [data]=\"item\"></croco-html-defined-custom-tag-view>\n </div>\n }\n\n </div>\n }\n</div>", styles: [".red{background-color:#c94444;color:#fff}\n"], dependencies: [{ kind: "component", type: XmlTagTextViewComponent, selector: "croco-html-xml-tag-text-view", inputs: ["item"] }, { kind: "component", type: HtmlRawViewComponent, selector: "croco-html-raw-view", inputs: ["rawHtml"] }, { kind: "component", type: XmlTagHeaderTextViewComponent, selector: "croco-html-xml-tag-header-text-view", inputs: ["item"] }, { kind: "component", type: FileImageTagViewComponent, selector: "croco-html-file-image-tag-view", inputs: ["item"] }, { kind: "component", type: XmlTagHtmlViewComponent, selector: "croco-html-xml-tag-html-view", inputs: ["html"] }, { kind: "component", type: ErrorBannerComponent, selector: "croco-html-error-banner", inputs: ["message"] }, { kind: "component", type: XmlTagExternalVideoComponent, selector: "croco-html-xml-tag-external-video", inputs: ["data", "tagData"] }, { kind: "component", type: XmlTagDownloadFileButtonComponent, selector: "croco-html-xml-tag-download-file-button", inputs: ["data", "tagData"] }, { kind: "component", type: XmlTagButtonComponent, selector: "croco-html-xml-tag-button", inputs: ["data", "tagData"] }, { kind: "component", type: XmlTagCustomWidgetComponent, selector: "croco-html-xml-tag-custom-widget", inputs: ["tagData"] }, { kind: "component", type: DefinedCustomTagViewComponent, selector: "croco-html-defined-custom-tag-view", inputs: ["data"] }], encapsulation: i0.ViewEncapsulation.None }); }
1733
1764
  }
1734
1765
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: XmlTagViewComponent, decorators: [{
1735
1766
  type: Component,
@@ -1744,7 +1775,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
1744
1775
  XmlTagDownloadFileButtonComponent,
1745
1776
  XmlTagButtonComponent,
1746
1777
  XmlTagCustomWidgetComponent,
1747
- ], template: "<div>\n @for (item of data; track $index) {\n <div class=\"row\">\n\n @if (item.tagName === 'text') {\n <div>\n <croco-html-xml-tag-text-view [item]=\"item\"></croco-html-xml-tag-text-view>\n </div>\n }\n\n @if (item.tagName === 'html-raw') {\n <div>\n <croco-html-raw-view [rawHtml]=\"item.data.innerHTML\"></croco-html-raw-view>\n </div>\n }\n\n @if (isHeaderTextTag(item)) {\n <div>\n <croco-html-xml-tag-header-text-view [item]=\"item\"></croco-html-xml-tag-header-text-view>\n </div>\n }\n\n @if (item.tagName === 'file-image') {\n <div>\n <croco-html-file-image-tag-view [item]=\"item\"></croco-html-file-image-tag-view>\n </div>\n }\n\n @if (item.tagName === 'custom-widget') {\n <div>\n <croco-html-xml-tag-custom-widget [tagData]=\"item.data\"></croco-html-xml-tag-custom-widget>\n </div>\n }\n\n @if (item.tagName === 'table' && item.validationResult) {\n\n @if (item.validationResult.isSucceeded){\n <croco-html-xml-tag-html-view [html]=\"item.bootstrapHtml\">\n </croco-html-xml-tag-html-view>\n }\n @else {\n <croco-html-error-banner [message]=\"item.validationResult.message\">\n </croco-html-error-banner>\n }\n }\n\n @if (item.tagName === 'external-video') {\n <div>\n <croco-html-xml-tag-external-video [data]=\"item\"></croco-html-xml-tag-external-video>\n </div>\n }\n\n @if (item.tagName === 'download-file-button') {\n <div>\n <croco-html-xml-tag-download-file-button [data]=\"item\"></croco-html-xml-tag-download-file-button>\n </div>\n }\n\n @if (item.tagName === 'button') {\n <div>\n <croco-html-xml-tag-button [data]=\"item\"></croco-html-xml-tag-button>\n </div>\n }\n @if (item.tagName === 'unsupported-tag') {\n <div class=\"red\" style=\"margin-top: 10px;\">\n <h4>\u0414\u0430\u043D\u043D\u044B\u0439 \u0442\u0435\u0433 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F</h4>\n <span>\n {{item.data.tagString}}\n </span>\n </div>\n }\n </div>\n }\n</div>", styles: [".red{background-color:#c94444;color:#fff}\n"] }]
1778
+ DefinedCustomTagViewComponent
1779
+ ], template: "<div>\n @for (item of data; track $index) {\n <div class=\"row\">\n\n @if (item.tagName === 'text') {\n <div>\n <croco-html-xml-tag-text-view [item]=\"item\"></croco-html-xml-tag-text-view>\n </div>\n }\n\n @if (item.tagName === 'html-raw') {\n <div>\n <croco-html-raw-view [rawHtml]=\"item.data.innerHTML\"></croco-html-raw-view>\n </div>\n }\n\n @if (isHeaderTextTag(item)) {\n <div>\n <croco-html-xml-tag-header-text-view [item]=\"item\"></croco-html-xml-tag-header-text-view>\n </div>\n }\n\n @if (item.tagName === 'file-image') {\n <div>\n <croco-html-file-image-tag-view [item]=\"item\"></croco-html-file-image-tag-view>\n </div>\n }\n\n @if (item.tagName === 'custom-widget') {\n <div>\n <croco-html-xml-tag-custom-widget [tagData]=\"item.data\"></croco-html-xml-tag-custom-widget>\n </div>\n }\n\n @if (item.tagName === 'table' && item.validationResult) {\n\n @if (item.validationResult.isSucceeded){\n <croco-html-xml-tag-html-view [html]=\"item.data.bootstrapHtml\">\n </croco-html-xml-tag-html-view>\n }\n @else {\n <croco-html-error-banner [message]=\"item.validationResult.message\">\n </croco-html-error-banner>\n }\n }\n\n @if (item.tagName === 'external-video') {\n <div>\n <croco-html-xml-tag-external-video [data]=\"item\"></croco-html-xml-tag-external-video>\n </div>\n }\n\n @if (item.tagName === 'download-file-button') {\n <div>\n <croco-html-xml-tag-download-file-button [data]=\"item\"></croco-html-xml-tag-download-file-button>\n </div>\n }\n\n @if (item.tagName === 'button') {\n <div>\n <croco-html-xml-tag-button [data]=\"item\"></croco-html-xml-tag-button>\n </div>\n }\n\n @if (item.tagName === 'unsupported-tag') {\n <div class=\"red\" style=\"margin-top: 10px;\">\n <h4>\u0414\u0430\u043D\u043D\u044B\u0439 \u0442\u0435\u0433 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F</h4>\n <span>\n {{item.data.tagString}}\n </span>\n </div>\n }\n\n @if (isDefinedCustomTag(item)) {\n <div>\n <croco-html-defined-custom-tag-view [data]=\"item\"></croco-html-defined-custom-tag-view>\n </div>\n }\n\n </div>\n }\n</div>", styles: [".red{background-color:#c94444;color:#fff}\n"] }]
1748
1780
  }], ctorParameters: () => [{ type: undefined, decorators: [{
1749
1781
  type: Inject,
1750
1782
  args: [CrocoHtmlOptionsToken]
@@ -2821,5 +2853,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
2821
2853
  * Generated bundle index. Do not edit.
2822
2854
  */
2823
2855
 
2824
- export { AddFilesBtnComponent, AngularMaterialTableMethods, BodyTagsExtensions, BootstrapTableMethods, CrocoHtmlFileOptionsService, CrocoHtmlModule, CrocoHtmlOptionsToken, CustomWidgetEditorComponent, ExternalVideoEditorComponent, ExternalVideoPlayers, ExternalVideoSupportedTypes, ExternalVideoTagDataConsts, FileIdSelectComponent, FileImageTagDataConsts, FileImageTagViewComponent, FileType, HtmlRawEditorComponent, HtmlRawViewComponent, HtmlViewComponent, HtmlViewController, ImageEditorComponent, ImageMethods, MainEditorBlockComponent, MainEditorComponent, TableBuilder, TableMethods, TableTypes, TagToSpanPipe, TextEditorComponent, TextSimpleMethods, TextTag, TextTags, ToHtmlBodyTagsPipe, ToPreviewHtmlPipe, ToPreviewPipe, UploadFilesBtnComponent, VisualEditorComponent, XmlExtensions, XmlTagCustomWidgetComponent, XmlTagExternalVideoComponent, XmlTagHeaderInnerTextViewComponent, XmlTagHeaderTextViewComponent, XmlTagHtmlViewComponent, XmlTagTextViewComponent, XmlTagViewComponent };
2856
+ export { AddFilesBtnComponent, AngularMaterialTableMethods, BodyTagsExtensions, BootstrapTableMethods, CrocoHtmlFileOptionsService, CrocoHtmlModule, CrocoHtmlOptionsToken, CustomWidgetEditorComponent, DefinedCustomTagViewComponent, ExternalVideoEditorComponent, ExternalVideoPlayers, ExternalVideoSupportedTypes, ExternalVideoTagDataConsts, FileIdSelectComponent, FileImageTagDataConsts, FileImageTagViewComponent, FileType, HtmlRawEditorComponent, HtmlRawViewComponent, HtmlViewComponent, HtmlViewController, ImageEditorComponent, ImageMethods, MainEditorBlockComponent, MainEditorComponent, TableBuilder, TableMethods, TableTypes, TagToSpanPipe, TextEditorComponent, TextSimpleMethods, TextTag, TextTags, ToHtmlBodyTagsPipe, ToPreviewHtmlPipe, ToPreviewPipe, UploadFilesBtnComponent, VisualEditorComponent, XmlExtensions, XmlTagCustomWidgetComponent, XmlTagExternalVideoComponent, XmlTagHeaderInnerTextViewComponent, XmlTagHeaderTextViewComponent, XmlTagHtmlViewComponent, XmlTagTextViewComponent, XmlTagViewComponent };
2825
2857
  //# sourceMappingURL=croco-html.mjs.map