croco-html 4.6.0 → 4.6.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.
- package/fesm2022/croco-html.mjs +115 -58
- package/fesm2022/croco-html.mjs.map +1 -1
- package/lib/components/html-view/html-view.component.d.ts +3 -1
- package/lib/components/xml-tags/defined-custom-tag-view/defined-custom-tag-view.component.d.ts +3 -1
- package/lib/components/xml-tags/xml-tag-view/xml-tag-view.component.d.ts +3 -1
- package/lib/extensions/BootstrapTableMethods.d.ts +5 -5
- package/lib/extensions/TextSimpleMethods.d.ts +11 -3
- package/lib/index.d.ts +2 -2
- package/lib/services/HtmlPageDataController.d.ts +17 -0
- package/lib/services/index.d.ts +1 -0
- package/package.json +1 -1
- package/src/assets/sprites/symbol/croco-html-svg-sprite.svg +1 -1
package/fesm2022/croco-html.mjs
CHANGED
|
@@ -340,7 +340,7 @@ class TextTagHtmlMarkupTagService {
|
|
|
340
340
|
return `<${this.tagName} h-align="${bodyTag.attributes[TextTagDataConsts.HAlign]}">${bodyTag.innerHtml}</${this.tagName}>`;
|
|
341
341
|
}
|
|
342
342
|
extractBlockFromHtmlElement(elem, options) {
|
|
343
|
-
return TextSimpleMethods.
|
|
343
|
+
return TextSimpleMethods.extractTextTag(elem);
|
|
344
344
|
}
|
|
345
345
|
toBodyTag(data) {
|
|
346
346
|
let textTagData = data.data;
|
|
@@ -705,49 +705,63 @@ class Tags {
|
|
|
705
705
|
const TextTag = "text";
|
|
706
706
|
class TextSimpleMethods {
|
|
707
707
|
static { this.supportedTags = ["sup", "sub", "strong", "b", "i", "u"]; }
|
|
708
|
-
static
|
|
709
|
-
|
|
708
|
+
static extractTextTag(elem) {
|
|
709
|
+
const hAlignExtractResult = this.extractHorizontalAlignment(elem);
|
|
710
710
|
var data = {
|
|
711
711
|
textTagName: elem.tagName.toLowerCase(),
|
|
712
|
-
text: elem.innerText
|
|
713
|
-
html: elem.innerHTML
|
|
714
|
-
horizontalAlignment:
|
|
712
|
+
text: this.prepareText(elem.innerText),
|
|
713
|
+
html: this.prepareText(elem.innerHTML),
|
|
714
|
+
horizontalAlignment: hAlignExtractResult.result,
|
|
715
715
|
validationResult: {
|
|
716
716
|
isSucceeded: true,
|
|
717
717
|
message: "Ok"
|
|
718
718
|
}
|
|
719
719
|
};
|
|
720
|
+
if (!hAlignExtractResult.succeeded) {
|
|
721
|
+
data.validationResult.isSucceeded = false;
|
|
722
|
+
data.validationResult.message = hAlignExtractResult.errorMessage;
|
|
723
|
+
}
|
|
720
724
|
let result = {
|
|
721
725
|
tagName: data.textTagName,
|
|
722
726
|
data: data
|
|
723
727
|
};
|
|
724
|
-
|
|
725
|
-
|
|
728
|
+
var html = result.data.html;
|
|
729
|
+
var htmlValidation = this.validateTextHtml(html);
|
|
730
|
+
if (!htmlValidation.isSucceeded) {
|
|
731
|
+
result.data.validationResult = htmlValidation;
|
|
726
732
|
}
|
|
727
|
-
|
|
728
|
-
|
|
733
|
+
return result;
|
|
734
|
+
}
|
|
735
|
+
static prepareText(s) {
|
|
736
|
+
s = s.trim().replace('\n\t', '');
|
|
737
|
+
if (s === '\n') {
|
|
738
|
+
s = '';
|
|
729
739
|
}
|
|
730
|
-
|
|
740
|
+
return s;
|
|
741
|
+
}
|
|
742
|
+
static extractHorizontalAlignment(elem) {
|
|
743
|
+
const hAlignValue = elem.getAttribute("h-align") ?? TextAlignment.Left;
|
|
744
|
+
const alignmentVals = [TextAlignment.Left, TextAlignment.Right, TextAlignment.Center];
|
|
731
745
|
if (alignmentVals.indexOf(hAlignValue) < 0) {
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
746
|
+
return {
|
|
747
|
+
result: TextAlignment.Left,
|
|
748
|
+
succeeded: false,
|
|
749
|
+
errorMessage: `Недопустимое значение атрибута h-align. Допустимые значения: ${alignmentVals.join(', ')}. `
|
|
735
750
|
+ 'Данный тег можно не указывать, по-умолчанию будет применено выравнивание слева.'
|
|
736
751
|
};
|
|
737
752
|
}
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
}
|
|
743
|
-
return result;
|
|
753
|
+
return {
|
|
754
|
+
result: hAlignValue,
|
|
755
|
+
succeeded: true,
|
|
756
|
+
errorMessage: ""
|
|
757
|
+
};
|
|
744
758
|
}
|
|
745
|
-
static
|
|
759
|
+
static validateTextHtml(html) {
|
|
746
760
|
var p = document.createElement("p");
|
|
747
761
|
p.innerHTML = html;
|
|
748
762
|
for (let i = 0; i < p.children.length; i++) {
|
|
749
763
|
const element = p.children.item(i);
|
|
750
|
-
var validationResult = this.
|
|
764
|
+
var validationResult = this.validateTag(element);
|
|
751
765
|
if (!validationResult.isSucceeded) {
|
|
752
766
|
return validationResult;
|
|
753
767
|
}
|
|
@@ -757,7 +771,7 @@ class TextSimpleMethods {
|
|
|
757
771
|
message: `Ok`
|
|
758
772
|
};
|
|
759
773
|
}
|
|
760
|
-
static
|
|
774
|
+
static validateTag(element) {
|
|
761
775
|
let lowerTag = element.tagName.toLowerCase();
|
|
762
776
|
if (!this.supportedTags.includes(lowerTag)) {
|
|
763
777
|
return {
|
|
@@ -767,7 +781,7 @@ class TextSimpleMethods {
|
|
|
767
781
|
}
|
|
768
782
|
for (let i = 0; i < element.children.length; i++) {
|
|
769
783
|
const nElement = element.children.item(i);
|
|
770
|
-
var innerValidationResult = this.
|
|
784
|
+
var innerValidationResult = this.validateTag(nElement);
|
|
771
785
|
if (!innerValidationResult.isSucceeded) {
|
|
772
786
|
return innerValidationResult;
|
|
773
787
|
}
|
|
@@ -780,14 +794,14 @@ class TextSimpleMethods {
|
|
|
780
794
|
}
|
|
781
795
|
|
|
782
796
|
class BootstrapTableMethods {
|
|
783
|
-
static
|
|
797
|
+
static buildTable(header, rows) {
|
|
784
798
|
let result = `<table class="table table-bordered">`;
|
|
785
|
-
result += this.
|
|
786
|
-
result += this.
|
|
799
|
+
result += this.buildHeader(header);
|
|
800
|
+
result += this.buildBody(rows);
|
|
787
801
|
result += "</table>";
|
|
788
802
|
return result;
|
|
789
803
|
}
|
|
790
|
-
static
|
|
804
|
+
static buildHeader(data) {
|
|
791
805
|
if (data === null) {
|
|
792
806
|
return "";
|
|
793
807
|
}
|
|
@@ -800,28 +814,28 @@ class BootstrapTableMethods {
|
|
|
800
814
|
result += "</thead>";
|
|
801
815
|
return result;
|
|
802
816
|
}
|
|
803
|
-
static
|
|
817
|
+
static buildBody(rows) {
|
|
804
818
|
let result = "<tbody>";
|
|
805
819
|
for (let i = 0; i < rows.length; i++) {
|
|
806
820
|
const row = rows[i];
|
|
807
821
|
result += "<tr>";
|
|
808
822
|
for (let j = 0; j < row.columns.length; j++) {
|
|
809
823
|
const col = row.columns[j];
|
|
810
|
-
result += `<td class="align-middle">${this.
|
|
824
|
+
result += `<td class="align-middle">${this.buildInnerTags(col.data.children)}</td>`;
|
|
811
825
|
}
|
|
812
826
|
result += "</tr>";
|
|
813
827
|
}
|
|
814
828
|
result += "</tbody>";
|
|
815
829
|
return result;
|
|
816
830
|
}
|
|
817
|
-
static
|
|
831
|
+
static buildInnerTags(tags) {
|
|
818
832
|
let result = "";
|
|
819
833
|
for (let i = 0; i < tags.length; i++) {
|
|
820
|
-
result += this.
|
|
834
|
+
result += this.buildInnerTag(tags[i]);
|
|
821
835
|
}
|
|
822
836
|
return result;
|
|
823
837
|
}
|
|
824
|
-
static
|
|
838
|
+
static buildInnerTag(data) {
|
|
825
839
|
if (data.tagName === FileImageTagDataConsts.TagName) {
|
|
826
840
|
let fileImageTag = data;
|
|
827
841
|
return `<img src=${fileImageTag.data.src} class="mx-auto d-block img-fluid" />`;
|
|
@@ -856,7 +870,7 @@ class TableMethods {
|
|
|
856
870
|
let tableData = {
|
|
857
871
|
header: tableHeader,
|
|
858
872
|
rows: tableRows,
|
|
859
|
-
bootstrapHtml: BootstrapTableMethods.
|
|
873
|
+
bootstrapHtml: BootstrapTableMethods.buildTable(tableHeader, tableRows),
|
|
860
874
|
html: tableTag.outerHTML,
|
|
861
875
|
angularMaterialTableDataCheck: AngularMaterialTableMethods.checkAngularMaterialTableData(tableHeader, tableRows)
|
|
862
876
|
};
|
|
@@ -912,9 +926,9 @@ class TableMethods {
|
|
|
912
926
|
const jElement = iElement.children.item(j);
|
|
913
927
|
let children = HtmlExtractionMethods.transformHtmlElementToBlocks(jElement, options);
|
|
914
928
|
if (children.length === 0) {
|
|
915
|
-
var textTag = document.createElement(
|
|
929
|
+
var textTag = document.createElement(TextTags.text);
|
|
916
930
|
textTag.innerHTML = jElement.innerHTML;
|
|
917
|
-
var textElem = TextSimpleMethods.
|
|
931
|
+
var textElem = TextSimpleMethods.extractTextTag(textTag);
|
|
918
932
|
children.push(textElem);
|
|
919
933
|
}
|
|
920
934
|
var result = {
|
|
@@ -1733,6 +1747,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
1733
1747
|
class DefinedCustomTagViewComponent {
|
|
1734
1748
|
set data(value) {
|
|
1735
1749
|
this._data = value;
|
|
1750
|
+
if (this.dynamicContainerRef) {
|
|
1751
|
+
this.dynamicContainerRef.setInput("data", this._data);
|
|
1752
|
+
}
|
|
1736
1753
|
}
|
|
1737
1754
|
;
|
|
1738
1755
|
constructor(_options) {
|
|
@@ -1753,17 +1770,18 @@ class DefinedCustomTagViewComponent {
|
|
|
1753
1770
|
this.viewContainerRef.remove();
|
|
1754
1771
|
this.dynamicContainerRef = this.viewContainerRef.createComponent(component);
|
|
1755
1772
|
this.dynamicContainerRef.setInput("data", this._data);
|
|
1773
|
+
this.dynamicContainerRef.setInput("dataController", this.dataController);
|
|
1756
1774
|
}
|
|
1757
1775
|
}
|
|
1758
1776
|
ngOnDestroy() {
|
|
1759
1777
|
this.dynamicContainerRef.destroy();
|
|
1760
1778
|
}
|
|
1761
1779
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DefinedCustomTagViewComponent, deps: [{ token: CrocoHtmlOptionsToken }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1762
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: DefinedCustomTagViewComponent, isStandalone: true, selector: "croco-html-defined-custom-tag-view", inputs: { data: "data" }, 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 {{data | json}}\n </div>\n }\n</ng-container>", dependencies: [{ kind: "pipe", type: JsonPipe, name: "json" }] }); }
|
|
1780
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: DefinedCustomTagViewComponent, isStandalone: true, selector: "croco-html-defined-custom-tag-view", inputs: { data: "data", dataController: "dataController" }, 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 {{data | json}}\n </div>\n }\n</ng-container>", dependencies: [{ kind: "pipe", type: JsonPipe, name: "json" }] }); }
|
|
1763
1781
|
}
|
|
1764
1782
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DefinedCustomTagViewComponent, decorators: [{
|
|
1765
1783
|
type: Component,
|
|
1766
|
-
args: [{ selector: 'croco-html-defined-custom-tag-view', imports: [JsonPipe], template: "<ng-container #container>\n @if (!useDynamicComponent) {\n <div>\n {{data | json}}\n </div>\n }\n</ng-container>" }]
|
|
1784
|
+
args: [{ selector: 'croco-html-defined-custom-tag-view', imports: [JsonPipe], standalone: true, template: "<ng-container #container>\n @if (!useDynamicComponent) {\n <div>\n {{data | json}}\n </div>\n }\n</ng-container>" }]
|
|
1767
1785
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
1768
1786
|
type: Inject,
|
|
1769
1787
|
args: [CrocoHtmlOptionsToken]
|
|
@@ -1773,12 +1791,54 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
1773
1791
|
}], data: [{
|
|
1774
1792
|
type: Input,
|
|
1775
1793
|
args: [{ required: true }]
|
|
1794
|
+
}], dataController: [{
|
|
1795
|
+
type: Input,
|
|
1796
|
+
args: [{ required: true }]
|
|
1776
1797
|
}] } });
|
|
1777
1798
|
|
|
1799
|
+
var FileType;
|
|
1800
|
+
(function (FileType) {
|
|
1801
|
+
FileType["Undefined"] = "Undefined";
|
|
1802
|
+
FileType["Unknown"] = "Unknown";
|
|
1803
|
+
FileType["Image"] = "Image";
|
|
1804
|
+
FileType["Audio"] = "Audio";
|
|
1805
|
+
FileType["Video"] = "Video";
|
|
1806
|
+
FileType["Document"] = "Document";
|
|
1807
|
+
FileType["Archive"] = "Archive";
|
|
1808
|
+
})(FileType || (FileType = {}));
|
|
1809
|
+
|
|
1810
|
+
/**
|
|
1811
|
+
* Сервис для прокидывания предрасчитанных данных для виджетов Html разметки.
|
|
1812
|
+
* Используется для оптимизации Http запросов за данными.
|
|
1813
|
+
*/
|
|
1814
|
+
class HtmlPageDataController {
|
|
1815
|
+
constructor() {
|
|
1816
|
+
this.data = null;
|
|
1817
|
+
}
|
|
1818
|
+
/**
|
|
1819
|
+
* Получить данные.
|
|
1820
|
+
* @returns
|
|
1821
|
+
*/
|
|
1822
|
+
get() {
|
|
1823
|
+
if (!this.data) {
|
|
1824
|
+
return null;
|
|
1825
|
+
}
|
|
1826
|
+
return this.data;
|
|
1827
|
+
}
|
|
1828
|
+
/**
|
|
1829
|
+
* Установить данные.
|
|
1830
|
+
* @param data
|
|
1831
|
+
*/
|
|
1832
|
+
set(data) {
|
|
1833
|
+
this.data = data;
|
|
1834
|
+
}
|
|
1835
|
+
}
|
|
1836
|
+
|
|
1778
1837
|
class XmlTagViewComponent {
|
|
1779
1838
|
constructor(_options) {
|
|
1780
1839
|
this._options = _options;
|
|
1781
1840
|
this.data = [];
|
|
1841
|
+
this.dataController = new HtmlPageDataController();
|
|
1782
1842
|
}
|
|
1783
1843
|
isHeaderTextTag(item) {
|
|
1784
1844
|
return TextTags.headerTextTags.includes(item.tagName);
|
|
@@ -1787,7 +1847,7 @@ class XmlTagViewComponent {
|
|
|
1787
1847
|
return this._options.definedCustomTags.hasOwnProperty(item.tagName);
|
|
1788
1848
|
}
|
|
1789
1849
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: XmlTagViewComponent, deps: [{ token: CrocoHtmlOptionsToken }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1790
|
-
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
|
|
1850
|
+
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", dataController: "dataController" }, 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 @else if (item.tagName === 'html-raw') {\n <div>\n <croco-html-raw-view [rawHtml]=\"item.data.innerHTML\"></croco-html-raw-view>\n </div>\n }\n @else 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 @else 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 @else 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 @else 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 @else 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 @else 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 @else if (item.tagName === 'button') {\n <div>\n <croco-html-xml-tag-button [data]=\"item\"></croco-html-xml-tag-button>\n </div>\n }\n @else 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 @else if (isDefinedCustomTag(item)) {\n <div>\n <croco-html-defined-custom-tag-view [data]=\"item\"\n [dataController]=\"dataController\"></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", "dataController"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
1791
1851
|
}
|
|
1792
1852
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: XmlTagViewComponent, decorators: [{
|
|
1793
1853
|
type: Component,
|
|
@@ -1803,12 +1863,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
1803
1863
|
XmlTagButtonComponent,
|
|
1804
1864
|
XmlTagCustomWidgetComponent,
|
|
1805
1865
|
DefinedCustomTagViewComponent
|
|
1806
|
-
], 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
|
|
1866
|
+
], 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 @else if (item.tagName === 'html-raw') {\n <div>\n <croco-html-raw-view [rawHtml]=\"item.data.innerHTML\"></croco-html-raw-view>\n </div>\n }\n @else 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 @else 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 @else 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 @else 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 @else 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 @else 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 @else if (item.tagName === 'button') {\n <div>\n <croco-html-xml-tag-button [data]=\"item\"></croco-html-xml-tag-button>\n </div>\n }\n @else 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 @else if (isDefinedCustomTag(item)) {\n <div>\n <croco-html-defined-custom-tag-view [data]=\"item\"\n [dataController]=\"dataController\"></croco-html-defined-custom-tag-view>\n </div>\n }\n\n </div>\n }\n</div>", styles: [".red{background-color:#c94444;color:#fff}\n"] }]
|
|
1807
1867
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
1808
1868
|
type: Inject,
|
|
1809
1869
|
args: [CrocoHtmlOptionsToken]
|
|
1810
1870
|
}] }], propDecorators: { data: [{
|
|
1811
|
-
type: Input
|
|
1871
|
+
type: Input,
|
|
1872
|
+
args: [{ required: true }]
|
|
1873
|
+
}], dataController: [{
|
|
1874
|
+
type: Input,
|
|
1875
|
+
args: [{ required: true }]
|
|
1812
1876
|
}] } });
|
|
1813
1877
|
|
|
1814
1878
|
class ExternalVideoEditorComponent {
|
|
@@ -1866,7 +1930,7 @@ class ExternalVideoEditorComponent {
|
|
|
1866
1930
|
this.tagData.link = src;
|
|
1867
1931
|
}
|
|
1868
1932
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ExternalVideoEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1869
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: ExternalVideoEditorComponent, isStandalone: true, selector: "croco-html-external-video-editor", inputs: { tag: "tag", presentOrEdit: "presentOrEdit" }, ngImport: i0, template: "@if (presentOrEdit) {\n <div>\n <div>\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$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$3.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2$1.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$4.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$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.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"] }] }); }
|
|
1933
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", 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$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$3.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2$1.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$4.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$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.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"] }] }); }
|
|
1870
1934
|
}
|
|
1871
1935
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ExternalVideoEditorComponent, decorators: [{
|
|
1872
1936
|
type: Component,
|
|
@@ -1876,7 +1940,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
1876
1940
|
FormsModule,
|
|
1877
1941
|
XmlTagExternalVideoComponent,
|
|
1878
1942
|
MatCheckbox,
|
|
1879
|
-
], template: "@if (presentOrEdit) {\n <div>\n <div>\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"] }]
|
|
1943
|
+
], 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"] }]
|
|
1880
1944
|
}], propDecorators: { tag: [{
|
|
1881
1945
|
type: Input,
|
|
1882
1946
|
args: [{ required: true }]
|
|
@@ -1912,17 +1976,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
1912
1976
|
args: [{ required: true }]
|
|
1913
1977
|
}] } });
|
|
1914
1978
|
|
|
1915
|
-
var FileType;
|
|
1916
|
-
(function (FileType) {
|
|
1917
|
-
FileType["Undefined"] = "Undefined";
|
|
1918
|
-
FileType["Unknown"] = "Unknown";
|
|
1919
|
-
FileType["Image"] = "Image";
|
|
1920
|
-
FileType["Audio"] = "Audio";
|
|
1921
|
-
FileType["Video"] = "Video";
|
|
1922
|
-
FileType["Document"] = "Document";
|
|
1923
|
-
FileType["Archive"] = "Archive";
|
|
1924
|
-
})(FileType || (FileType = {}));
|
|
1925
|
-
|
|
1926
1979
|
class PublicFilesQueryService {
|
|
1927
1980
|
constructor(_httpClient, baseUrl) {
|
|
1928
1981
|
this._httpClient = _httpClient;
|
|
@@ -2749,16 +2802,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
2749
2802
|
class HtmlViewComponent {
|
|
2750
2803
|
constructor() {
|
|
2751
2804
|
this.html = "<body></body>";
|
|
2805
|
+
this.dataController = new HtmlPageDataController();
|
|
2752
2806
|
}
|
|
2753
2807
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: HtmlViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2754
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: HtmlViewComponent, isStandalone: true, selector: "croco-html-view", inputs: { html: "html" }, ngImport: i0, template: "<croco-html-xml-tag-view [data]=\"html | topreview\"></croco-html-xml-tag-view>", dependencies: [{ kind: "component", type: XmlTagViewComponent, selector: "croco-html-xml-tag-view", inputs: ["data"] }, { kind: "pipe", type: ToPreviewPipe, name: "topreview" }] }); }
|
|
2808
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: HtmlViewComponent, isStandalone: true, selector: "croco-html-view", inputs: { html: "html", dataController: "dataController" }, ngImport: i0, template: "<croco-html-xml-tag-view [data]=\"html | topreview\" [dataController]=\"dataController\"></croco-html-xml-tag-view>", dependencies: [{ kind: "component", type: XmlTagViewComponent, selector: "croco-html-xml-tag-view", inputs: ["data", "dataController"] }, { kind: "pipe", type: ToPreviewPipe, name: "topreview" }] }); }
|
|
2755
2809
|
}
|
|
2756
2810
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: HtmlViewComponent, decorators: [{
|
|
2757
2811
|
type: Component,
|
|
2758
|
-
args: [{ selector: 'croco-html-view', standalone: true, imports: [XmlTagViewComponent, ToPreviewPipe], template: "<croco-html-xml-tag-view [data]=\"html | topreview\"></croco-html-xml-tag-view>" }]
|
|
2812
|
+
args: [{ selector: 'croco-html-view', standalone: true, imports: [XmlTagViewComponent, ToPreviewPipe], template: "<croco-html-xml-tag-view [data]=\"html | topreview\" [dataController]=\"dataController\"></croco-html-xml-tag-view>" }]
|
|
2759
2813
|
}], propDecorators: { html: [{
|
|
2760
2814
|
type: Input,
|
|
2761
2815
|
args: [{ required: true }]
|
|
2816
|
+
}], dataController: [{
|
|
2817
|
+
type: Input,
|
|
2818
|
+
args: [{ required: false }]
|
|
2762
2819
|
}] } });
|
|
2763
2820
|
|
|
2764
2821
|
class HtmlEditorSettingsModalComponent {
|
|
@@ -2860,7 +2917,7 @@ class MainEditorComponent {
|
|
|
2860
2917
|
});
|
|
2861
2918
|
}
|
|
2862
2919
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MainEditorComponent, deps: [{ token: i1$5.ClipboardService }, { token: i2$3.MatSnackBar }, { token: i0.ChangeDetectorRef }, { token: i2$2.MatDialog }, { token: CrocoHtmlFileOptionsService }, { token: CrocoHtmlOptionsToken }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2863
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: MainEditorComponent, isStandalone: true, selector: "croco-html-main-editor", inputs: { showMarkUp: "showMarkUp", useHtmlRaw: "useHtmlRaw", html: "html" }, outputs: { html: "html", onHtmlChanged: "onHtmlChanged" }, viewQueries: [{ propertyName: "visualEditor", first: true, predicate: ["visualEditor"], descendants: true, static: true }], ngImport: i0, template: "<mat-tab-group mat-stretch-tabs=\"false\" mat-align-tabs=\"start\" style=\"position: relative\">\n <mat-tab>\n <ng-template mat-tab-label>\n <svg class=\"custom-icon\" width=\"32\" height=\"26\">\n <use [attr.xlink:href]=\"'visual-editor-tab' | spriteIconPath\"></use>\n </svg>\n </ng-template>\n\n <div style=\"height: 20px;\"></div>\n\n <croco-visual-editor #visualEditor [useHtmlRaw]=\"true\" [html]=\"html\" (onHtmlChanged)=\"onHtmlChangedHandler($event)\"\n (rendered)=\"visualEditorRenderedHandler()\">\n </croco-visual-editor>\n\n <div style=\"height: 20px;\"></div>\n </mat-tab>\n\n <mat-tab>\n <ng-template mat-tab-label>\n <svg class=\"custom-icon\" width=\"32\" height=\"26\">\n <use [attr.xlink:href]=\"'source-code-tab' | spriteIconPath\"></use>\n </svg>\n </ng-template>\n\n <div style=\"height: 10px;\"></div>\n @if (visualEditorRendered) {\n <div>\n <mat-form-field class=\"w-100\">\n <mat-label>\u0418\u0441\u0445\u043E\u0434\u043D\u044B\u0439 \u043A\u043E\u0434</mat-label>\n <textarea matInput cdkTextareaAutosize #autosize=\"cdkTextareaAutosize\" cdkAutosizeMinRows=\"1\"\n placeholder=\"\u0418\u0441\u0445\u043E\u0434\u043D\u044B\u0439 \u043A\u043E\u0434\" [(ngModel)]=\"html\" (ngModelChange)=\"textAreaModelChangedHandler()\"></textarea>\n </mat-form-field>\n </div>\n }\n\n <button (click)=\"copyMarkUp()\" mat-raised-button color=\"primary\">\n \u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0440\u0430\u0437\u043C\u0435\u0442\u043A\u0443\n </button>\n </mat-tab>\n <mat-tab>\n <ng-template mat-tab-label>\n <svg class=\"custom-icon\" width=\"32\" height=\"30\">\n <use [attr.xlink:href]=\"'viewer-tab' | spriteIconPath\"></use>\n </svg>\n </ng-template>\n\n\n <mat-card style=\"padding: 2px;\" class=\"mat-card\">\n <mat-card-content>\n <croco-html-view [html]=\"html\">\n </croco-html-view>\n </mat-card-content>\n </mat-card>\n </mat-tab>\n</mat-tab-group>\n\n<div [hidden]=\"!showSettingsButton\">\n <mat-icon class=\"settings\" (click)=\"openSettingsModal()\">settings</mat-icon>\n</div>\n", styles: [":host ::ng-deep .mdc-tab.mat-mdc-tab{background-color:#f7f7fa}:host ::ng-deep .mdc-tab.mat-mdc-tab .custom-icon{fill:#323e8b}:host ::ng-deep .mdc-tab.mat-mdc-tab:hover{background-color:#f7f7fa}:host ::ng-deep .mdc-tab.mat-mdc-tab:hover .custom-icon{fill:#747ebf}:host ::ng-deep .mdc-tab.mat-mdc-tab.mdc-tab--active{background-color:#323e8b}:host ::ng-deep .mdc-tab.mat-mdc-tab.mdc-tab--active svg.custom-icon{fill:#fff}:host ::ng-deep div.mat-mdc-tab-labels{justify-content:center}:host{position:relative}:host ::ng-deep .mat-expansion-panel,:host ::ng-deep .mat-mdc-tab-body-content,:host ::ng-deep .mat-mdc-tab-body,:host ::ng-deep .mat-mdc-tab-body-wrapper{overflow:visible}.example-list{width:500px;max-width:100%;border:solid 1px #ccc;min-height:60px;display:block;background:#fff;border-radius:4px;overflow:hidden}.example-box{padding:20px 10px;border-bottom:solid 1px #ccc;color:#000000de;display:flex;flex-direction:row;align-items:center;justify-content:space-between;box-sizing:border-box;cursor:move;background:#fff;font-size:14px}.cdk-drag-preview{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.example-box:last-child{border:none}.example-list.cdk-drop-list-dragging .example-box:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.settings{position:absolute;top:20px;right:20px;cursor:pointer;z-index:1000}\n"], dependencies: [{ kind: "ngmodule", type: MatTabsModule }, { kind: "directive", type: i5.MatTabLabel, selector: "[mat-tab-label], [matTabLabel]" }, { kind: "component", type: i5.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass", "id"], exportAs: ["matTab"] }, { kind: "component", type: i5.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "mat-align-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "component", type: VisualEditorComponent, selector: "croco-visual-editor", inputs: ["showMarkUp", "useHtmlRaw", "html"], outputs: ["html", "onHtmlChanged", "rendered"] }, { 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$4.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$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i1$2.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i1$2.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: HtmlViewComponent, selector: "croco-html-view", inputs: ["html"] }, { kind: "pipe", type: SpriteIconPathPipe, name: "spriteIconPath" }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
|
|
2920
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: MainEditorComponent, isStandalone: true, selector: "croco-html-main-editor", inputs: { showMarkUp: "showMarkUp", useHtmlRaw: "useHtmlRaw", html: "html" }, outputs: { html: "html", onHtmlChanged: "onHtmlChanged" }, viewQueries: [{ propertyName: "visualEditor", first: true, predicate: ["visualEditor"], descendants: true, static: true }], ngImport: i0, template: "<mat-tab-group mat-stretch-tabs=\"false\" mat-align-tabs=\"start\" style=\"position: relative\">\n <mat-tab>\n <ng-template mat-tab-label>\n <svg class=\"custom-icon\" width=\"32\" height=\"26\">\n <use [attr.xlink:href]=\"'visual-editor-tab' | spriteIconPath\"></use>\n </svg>\n </ng-template>\n\n <div style=\"height: 20px;\"></div>\n\n <croco-visual-editor #visualEditor [useHtmlRaw]=\"true\" [html]=\"html\" (onHtmlChanged)=\"onHtmlChangedHandler($event)\"\n (rendered)=\"visualEditorRenderedHandler()\">\n </croco-visual-editor>\n\n <div style=\"height: 20px;\"></div>\n </mat-tab>\n\n <mat-tab>\n <ng-template mat-tab-label>\n <svg class=\"custom-icon\" width=\"32\" height=\"26\">\n <use [attr.xlink:href]=\"'source-code-tab' | spriteIconPath\"></use>\n </svg>\n </ng-template>\n\n <div style=\"height: 10px;\"></div>\n @if (visualEditorRendered) {\n <div>\n <mat-form-field class=\"w-100\">\n <mat-label>\u0418\u0441\u0445\u043E\u0434\u043D\u044B\u0439 \u043A\u043E\u0434</mat-label>\n <textarea matInput cdkTextareaAutosize #autosize=\"cdkTextareaAutosize\" cdkAutosizeMinRows=\"1\"\n placeholder=\"\u0418\u0441\u0445\u043E\u0434\u043D\u044B\u0439 \u043A\u043E\u0434\" [(ngModel)]=\"html\" (ngModelChange)=\"textAreaModelChangedHandler()\"></textarea>\n </mat-form-field>\n </div>\n }\n\n <button (click)=\"copyMarkUp()\" mat-raised-button color=\"primary\">\n \u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0440\u0430\u0437\u043C\u0435\u0442\u043A\u0443\n </button>\n </mat-tab>\n <mat-tab>\n <ng-template mat-tab-label>\n <svg class=\"custom-icon\" width=\"32\" height=\"30\">\n <use [attr.xlink:href]=\"'viewer-tab' | spriteIconPath\"></use>\n </svg>\n </ng-template>\n\n\n <mat-card style=\"padding: 2px;\" class=\"mat-card\">\n <mat-card-content>\n <croco-html-view [html]=\"html\">\n </croco-html-view>\n </mat-card-content>\n </mat-card>\n </mat-tab>\n</mat-tab-group>\n\n<div [hidden]=\"!showSettingsButton\">\n <mat-icon class=\"settings\" (click)=\"openSettingsModal()\">settings</mat-icon>\n</div>\n", styles: [":host ::ng-deep .mdc-tab.mat-mdc-tab{background-color:#f7f7fa}:host ::ng-deep .mdc-tab.mat-mdc-tab .custom-icon{fill:#323e8b}:host ::ng-deep .mdc-tab.mat-mdc-tab:hover{background-color:#f7f7fa}:host ::ng-deep .mdc-tab.mat-mdc-tab:hover .custom-icon{fill:#747ebf}:host ::ng-deep .mdc-tab.mat-mdc-tab.mdc-tab--active{background-color:#323e8b}:host ::ng-deep .mdc-tab.mat-mdc-tab.mdc-tab--active svg.custom-icon{fill:#fff}:host ::ng-deep div.mat-mdc-tab-labels{justify-content:center}:host{position:relative}:host ::ng-deep .mat-expansion-panel,:host ::ng-deep .mat-mdc-tab-body-content,:host ::ng-deep .mat-mdc-tab-body,:host ::ng-deep .mat-mdc-tab-body-wrapper{overflow:visible}.example-list{width:500px;max-width:100%;border:solid 1px #ccc;min-height:60px;display:block;background:#fff;border-radius:4px;overflow:hidden}.example-box{padding:20px 10px;border-bottom:solid 1px #ccc;color:#000000de;display:flex;flex-direction:row;align-items:center;justify-content:space-between;box-sizing:border-box;cursor:move;background:#fff;font-size:14px}.cdk-drag-preview{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.example-box:last-child{border:none}.example-list.cdk-drop-list-dragging .example-box:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.settings{position:absolute;top:20px;right:20px;cursor:pointer;z-index:1000}\n"], dependencies: [{ kind: "ngmodule", type: MatTabsModule }, { kind: "directive", type: i5.MatTabLabel, selector: "[mat-tab-label], [matTabLabel]" }, { kind: "component", type: i5.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass", "id"], exportAs: ["matTab"] }, { kind: "component", type: i5.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "mat-align-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "component", type: VisualEditorComponent, selector: "croco-visual-editor", inputs: ["showMarkUp", "useHtmlRaw", "html"], outputs: ["html", "onHtmlChanged", "rendered"] }, { 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$4.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$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i1$2.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i1$2.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: HtmlViewComponent, selector: "croco-html-view", inputs: ["html", "dataController"] }, { kind: "pipe", type: SpriteIconPathPipe, name: "spriteIconPath" }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
|
|
2864
2921
|
}
|
|
2865
2922
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MainEditorComponent, decorators: [{
|
|
2866
2923
|
type: Component,
|
|
@@ -3071,5 +3128,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
3071
3128
|
* Generated bundle index. Do not edit.
|
|
3072
3129
|
*/
|
|
3073
3130
|
|
|
3074
|
-
export { AddFilesBtnComponent, AngularMaterialTableMethods, BodyTagsExtensions, BootstrapTableMethods, ButtonTagDataConsts, ButtonTagService, CrocoHtmlFileOptionsService, CrocoHtmlModule, CrocoHtmlOptionsToken, CustomWidgetEditorComponent, CustomWidgetIconComponent, CustomWidgetTagDataConsts, CustomWidgetTagService, DefinedCustomEditorBlockComponent, DefinedCustomTagViewComponent, DownloadButtonTagDataConsts, DownloadButtonTagService, ExternalVideoEditorComponent, ExternalVideoPlayers, ExternalVideoSupportedTypes, ExternalVideoTagDataConsts, ExternalVideoTagService, FileIdSelectComponent, FileImageTagDataConsts, FileImageTagService, FileImageTagViewComponent, FileType, HtmlRawEditorComponent, HtmlRawTagDataConsts, HtmlRawTagService, HtmlRawViewComponent, HtmlViewComponent, HtmlViewController, ImageEditorComponent, ImageMethods, 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 };
|
|
3131
|
+
export { AddFilesBtnComponent, AngularMaterialTableMethods, BodyTagsExtensions, BootstrapTableMethods, ButtonTagDataConsts, ButtonTagService, CrocoHtmlFileOptionsService, CrocoHtmlModule, CrocoHtmlOptionsToken, CustomWidgetEditorComponent, CustomWidgetIconComponent, CustomWidgetTagDataConsts, CustomWidgetTagService, DefinedCustomEditorBlockComponent, DefinedCustomTagViewComponent, DownloadButtonTagDataConsts, DownloadButtonTagService, ExternalVideoEditorComponent, ExternalVideoPlayers, ExternalVideoSupportedTypes, ExternalVideoTagDataConsts, ExternalVideoTagService, FileIdSelectComponent, FileImageTagDataConsts, FileImageTagService, FileImageTagViewComponent, FileType, HtmlPageDataController, HtmlRawEditorComponent, HtmlRawTagDataConsts, HtmlRawTagService, HtmlRawViewComponent, HtmlViewComponent, HtmlViewController, ImageEditorComponent, ImageMethods, 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 };
|
|
3075
3132
|
//# sourceMappingURL=croco-html.mjs.map
|