croco-html 3.0.5 → 3.0.7
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/esm2022/lib/components/add-files-btn/add-files-btn.component.mjs +5 -5
- package/esm2022/lib/components/editor/html-raw-editor/html-raw-editor.component.mjs +1 -1
- package/esm2022/lib/components/editor/image-editor/image-editor.component.mjs +1 -1
- package/esm2022/lib/components/editor/main-editor/main-editor.component.mjs +1 -7
- package/esm2022/lib/components/file-id-select/file-id-select.component.mjs +11 -9
- package/esm2022/lib/components/upload-files-btn/upload-files-btn.component.mjs +12 -16
- package/esm2022/lib/components/xml-tags/file-image-tag-view/file-image-tag-view.component.mjs +1 -1
- package/esm2022/lib/extensions/AngularMaterialTableMethods.mjs +1 -1
- package/esm2022/lib/extensions/BodyTagsExtensions.mjs +1 -1
- package/esm2022/lib/extensions/BootstrapTableMethods.mjs +1 -1
- package/esm2022/lib/extensions/ImageMethods.mjs +1 -1
- package/esm2022/lib/extensions/InterfaceBlock.mjs +1 -1
- package/esm2022/lib/extensions/TableMethods.mjs +1 -1
- package/esm2022/lib/extensions/TextSimpleMethods.mjs +1 -1
- package/esm2022/lib/index.mjs +1 -1
- package/esm2022/lib/models/image-models.mjs +2 -0
- package/esm2022/lib/models/index.mjs +3 -0
- package/esm2022/lib/models/models.mjs +1 -1
- package/esm2022/lib/options/index.mjs +1 -1
- package/esm2022/lib/services/PublicFileUploadService.mjs +34 -0
- package/esm2022/lib/services/PublicFilesQueryService.mjs +34 -0
- package/esm2022/lib/services/screen-width.service.mjs +1 -1
- package/esm2022/public-api.mjs +2 -2
- package/fesm2022/croco-html.mjs +39 -46
- package/fesm2022/croco-html.mjs.map +1 -1
- package/lib/components/add-files-btn/add-files-btn.component.d.ts +2 -2
- package/lib/components/editor/image-editor/image-editor.component.d.ts +1 -1
- package/lib/components/editor/main-editor/main-editor.component.d.ts +3 -3
- package/lib/components/file-id-select/file-id-select.component.d.ts +5 -4
- package/lib/components/upload-files-btn/upload-files-btn.component.d.ts +6 -9
- package/lib/components/xml-tags/file-image-tag-view/file-image-tag-view.component.d.ts +1 -1
- package/lib/extensions/AngularMaterialTableMethods.d.ts +2 -1
- package/lib/extensions/HtmlExtractionMethods.d.ts +12 -12
- package/lib/extensions/ImageMethods.d.ts +1 -19
- package/lib/extensions/InterfaceBlock.d.ts +1 -1
- package/lib/extensions/TableMethods.d.ts +1 -4
- package/lib/extensions/TextSimpleMethods.d.ts +1 -1
- package/lib/models/image-models.d.ts +19 -0
- package/lib/models/index.d.ts +2 -0
- package/lib/models/models.d.ts +4 -0
- package/lib/options/index.d.ts +14 -1
- package/lib/services/PublicFileUploadService.d.ts +26 -0
- package/lib/services/{files-query.service.d.ts → PublicFilesQueryService.d.ts} +10 -14
- package/package.json +1 -1
- package/public-api.d.ts +1 -1
- package/esm2022/lib/services/file-upload.service.mjs +0 -33
- package/esm2022/lib/services/files-query.service.mjs +0 -37
- package/lib/services/file-upload.service.d.ts +0 -30
package/fesm2022/croco-html.mjs
CHANGED
|
@@ -959,29 +959,30 @@ class TableBuilder {
|
|
|
959
959
|
}
|
|
960
960
|
}
|
|
961
961
|
|
|
962
|
-
class
|
|
962
|
+
class PublicFileUploadService {
|
|
963
963
|
constructor(_httpClient, baseUrl) {
|
|
964
964
|
this._httpClient = _httpClient;
|
|
965
965
|
this.baseUrl = baseUrl;
|
|
966
966
|
}
|
|
967
|
-
postFiles(files,
|
|
967
|
+
postFiles(files, applicationId) {
|
|
968
968
|
const formData = new FormData();
|
|
969
969
|
for (let i = 0; i < files.length; i++) {
|
|
970
970
|
var fileToUpload = files.item(i);
|
|
971
971
|
formData.append(`fileKey${i}`, fileToUpload, fileToUpload?.name);
|
|
972
972
|
}
|
|
973
|
-
return this.postFilesInner(formData,
|
|
973
|
+
return this.postFilesInner(formData, applicationId);
|
|
974
974
|
}
|
|
975
|
-
postFilesInner(formData,
|
|
976
|
-
let endpoint =
|
|
977
|
-
|
|
978
|
-
|
|
975
|
+
postFilesInner(formData, applicationId, withProgress = false) {
|
|
976
|
+
let endpoint = this.baseUrl + `api/files/upload?makeLocalCopiesNow=true&executeHandlersNow=true`;
|
|
977
|
+
if (applicationId) {
|
|
978
|
+
endpoint += `&applicationId=${applicationId}`;
|
|
979
|
+
}
|
|
979
980
|
return this._httpClient.post(endpoint, formData, withProgress ? { reportProgress: true, observe: 'events' } : undefined);
|
|
980
981
|
}
|
|
981
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type:
|
|
982
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type:
|
|
982
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: PublicFileUploadService, deps: [{ token: i1.HttpClient }, { token: 'BASE_URL' }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
983
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: PublicFileUploadService, providedIn: 'root' }); }
|
|
983
984
|
}
|
|
984
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type:
|
|
985
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: PublicFileUploadService, decorators: [{
|
|
985
986
|
type: Injectable,
|
|
986
987
|
args: [{ providedIn: 'root' }]
|
|
987
988
|
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
@@ -995,32 +996,30 @@ class UploadFilesBtnComponent {
|
|
|
995
996
|
this.extAccepts = "*/*";
|
|
996
997
|
this.isMultiple = true;
|
|
997
998
|
this.btnText = "Загрузить файлы";
|
|
998
|
-
this.createLocalCopiesNow = true;
|
|
999
999
|
this.hidden = false;
|
|
1000
1000
|
this.postFilesStarted = new EventEmitter();
|
|
1001
|
-
this.
|
|
1001
|
+
this.onPublicFilesUploaded = new EventEmitter();
|
|
1002
1002
|
}
|
|
1003
1003
|
handleFileInput(files) {
|
|
1004
1004
|
this.postFilesStarted.emit({
|
|
1005
|
-
filesCount: files.length
|
|
1006
|
-
createLocalCopiesNow: this.createLocalCopiesNow
|
|
1005
|
+
filesCount: files.length
|
|
1007
1006
|
});
|
|
1008
|
-
this._fileUploadService
|
|
1009
|
-
|
|
1007
|
+
this._fileUploadService
|
|
1008
|
+
.postFiles(files, null)
|
|
1009
|
+
.subscribe(data => {
|
|
1010
|
+
this.onPublicFilesUploaded.emit(data);
|
|
1010
1011
|
});
|
|
1011
1012
|
}
|
|
1012
1013
|
clickFileInput() {
|
|
1013
1014
|
this.fileInput.nativeElement.click();
|
|
1014
1015
|
}
|
|
1015
|
-
|
|
1016
|
-
}
|
|
1017
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: UploadFilesBtnComponent, deps: [{ token: FileUploadService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1018
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: UploadFilesBtnComponent, isStandalone: true, selector: "croco-app-upload-files-btn", inputs: { extAccepts: "extAccepts", isMultiple: "isMultiple", btnText: "btnText", createLocalCopiesNow: "createLocalCopiesNow", hidden: "hidden" }, outputs: { postFilesStarted: "postFilesStarted", onFilesUploaded: "onFilesUploaded" }, viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["filesInput"], descendants: true }], ngImport: i0, template: "<button [hidden]=\"hidden\" mat-raised-button color=\"primary\" (click)=\"filesInput.click()\">{{btnText}}</button>\n<input [hidden]=\"true\" [accept]=\"extAccepts\" [multiple]=\"isMultiple\" type=\"file\" #filesInput (change)=\"handleFileInput($event.target.files)\" />", styles: [""], dependencies: [{ kind: "component", type: MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }] }); }
|
|
1016
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: UploadFilesBtnComponent, deps: [{ token: PublicFileUploadService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1017
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: UploadFilesBtnComponent, isStandalone: true, selector: "croco-app-upload-files-btn", inputs: { extAccepts: "extAccepts", isMultiple: "isMultiple", btnText: "btnText", hidden: "hidden" }, outputs: { postFilesStarted: "postFilesStarted", onPublicFilesUploaded: "onPublicFilesUploaded" }, viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["filesInput"], descendants: true }], ngImport: i0, template: "<button [hidden]=\"hidden\" mat-raised-button color=\"primary\" (click)=\"filesInput.click()\">{{btnText}}</button>\n<input [hidden]=\"true\" [accept]=\"extAccepts\" [multiple]=\"isMultiple\" type=\"file\" #filesInput (change)=\"handleFileInput($event.target.files)\" />", styles: [""], dependencies: [{ kind: "component", type: MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }] }); }
|
|
1019
1018
|
}
|
|
1020
1019
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: UploadFilesBtnComponent, decorators: [{
|
|
1021
1020
|
type: Component,
|
|
1022
1021
|
args: [{ selector: 'croco-app-upload-files-btn', standalone: true, imports: [MatButton], template: "<button [hidden]=\"hidden\" mat-raised-button color=\"primary\" (click)=\"filesInput.click()\">{{btnText}}</button>\n<input [hidden]=\"true\" [accept]=\"extAccepts\" [multiple]=\"isMultiple\" type=\"file\" #filesInput (change)=\"handleFileInput($event.target.files)\" />" }]
|
|
1023
|
-
}], ctorParameters: () => [{ type:
|
|
1022
|
+
}], ctorParameters: () => [{ type: PublicFileUploadService }], propDecorators: { fileInput: [{
|
|
1024
1023
|
type: ViewChild,
|
|
1025
1024
|
args: ['filesInput']
|
|
1026
1025
|
}], extAccepts: [{
|
|
@@ -1029,13 +1028,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
|
|
|
1029
1028
|
type: Input
|
|
1030
1029
|
}], btnText: [{
|
|
1031
1030
|
type: Input
|
|
1032
|
-
}], createLocalCopiesNow: [{
|
|
1033
|
-
type: Input
|
|
1034
1031
|
}], hidden: [{
|
|
1035
1032
|
type: Input
|
|
1036
1033
|
}], postFilesStarted: [{
|
|
1037
1034
|
type: Output
|
|
1038
|
-
}],
|
|
1035
|
+
}], onPublicFilesUploaded: [{
|
|
1039
1036
|
type: Output
|
|
1040
1037
|
}] } });
|
|
1041
1038
|
|
|
@@ -1048,8 +1045,8 @@ class AddFilesBtnComponent {
|
|
|
1048
1045
|
postFilesStartedEventHandler(data) {
|
|
1049
1046
|
this.postFilesStarted.emit(data);
|
|
1050
1047
|
}
|
|
1051
|
-
|
|
1052
|
-
this.fileIds = data.
|
|
1048
|
+
publicFilesUploadedHandler(data) {
|
|
1049
|
+
this.fileIds = data.fileIds;
|
|
1053
1050
|
let fileTags = [];
|
|
1054
1051
|
for (let i = 0; i < this.fileIds.length; i++) {
|
|
1055
1052
|
let fileTag = {
|
|
@@ -1074,11 +1071,11 @@ class AddFilesBtnComponent {
|
|
|
1074
1071
|
ngOnInit() {
|
|
1075
1072
|
}
|
|
1076
1073
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: AddFilesBtnComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1077
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: AddFilesBtnComponent, isStandalone: true, selector: "croco-html-add-files-btn", outputs: { postFilesStarted: "postFilesStarted", filesTagsReady: "filesTagsReady" }, viewQueries: [{ propertyName: "fakeBtn", first: true, predicate: ["fakeBtn"], descendants: true }], ngImport: i0, template: "<div [hidden]=\"true\">\n <croco-app-upload-files-btn #fakeBtn (
|
|
1074
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: AddFilesBtnComponent, isStandalone: true, selector: "croco-html-add-files-btn", outputs: { postFilesStarted: "postFilesStarted", filesTagsReady: "filesTagsReady" }, viewQueries: [{ propertyName: "fakeBtn", first: true, predicate: ["fakeBtn"], descendants: true }], ngImport: i0, template: "<div [hidden]=\"true\">\n <croco-app-upload-files-btn #fakeBtn (onPublicFilesUploaded)=\"publicFilesUploadedHandler($event)\"\n [btnText]=\"'\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F'\"\n (postFilesStarted)=\"postFilesStartedEventHandler($event)\" [extAccepts]=\"'image/*'\"></croco-app-upload-files-btn>\n</div>\n\n<div>\n <button class=\"w-100\" (click)=\"handleClick()\" mat-stroked-button>\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F</button>\n</div>", dependencies: [{ kind: "component", type: UploadFilesBtnComponent, selector: "croco-app-upload-files-btn", inputs: ["extAccepts", "isMultiple", "btnText", "hidden"], outputs: ["postFilesStarted", "onPublicFilesUploaded"] }, { kind: "component", type: MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }] }); }
|
|
1078
1075
|
}
|
|
1079
1076
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: AddFilesBtnComponent, decorators: [{
|
|
1080
1077
|
type: Component,
|
|
1081
|
-
args: [{ selector: 'croco-html-add-files-btn', standalone: true, imports: [UploadFilesBtnComponent, MatButton], template: "<div [hidden]=\"true\">\n <croco-app-upload-files-btn #fakeBtn (
|
|
1078
|
+
args: [{ selector: 'croco-html-add-files-btn', standalone: true, imports: [UploadFilesBtnComponent, MatButton], template: "<div [hidden]=\"true\">\n <croco-app-upload-files-btn #fakeBtn (onPublicFilesUploaded)=\"publicFilesUploadedHandler($event)\"\n [btnText]=\"'\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F'\"\n (postFilesStarted)=\"postFilesStartedEventHandler($event)\" [extAccepts]=\"'image/*'\"></croco-app-upload-files-btn>\n</div>\n\n<div>\n <button class=\"w-100\" (click)=\"handleClick()\" mat-stroked-button>\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F</button>\n</div>" }]
|
|
1082
1079
|
}], ctorParameters: () => [], propDecorators: { postFilesStarted: [{
|
|
1083
1080
|
type: Output
|
|
1084
1081
|
}], fakeBtn: [{
|
|
@@ -1748,21 +1745,18 @@ var FileType;
|
|
|
1748
1745
|
FileType["Document"] = "Document";
|
|
1749
1746
|
FileType["Archive"] = "Archive";
|
|
1750
1747
|
})(FileType || (FileType = {}));
|
|
1751
|
-
class
|
|
1748
|
+
class PublicFilesQueryService {
|
|
1752
1749
|
constructor(_httpClient, baseUrl) {
|
|
1753
1750
|
this._httpClient = _httpClient;
|
|
1754
1751
|
this._baseControllerUrl = `${baseUrl}Api/Files`;
|
|
1755
1752
|
}
|
|
1756
|
-
|
|
1757
|
-
return this._httpClient.post(this._baseControllerUrl
|
|
1753
|
+
search(model) {
|
|
1754
|
+
return this._httpClient.post(`${this._baseControllerUrl}/GetFiles`, model);
|
|
1758
1755
|
}
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
}
|
|
1762
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FilesQueryService, deps: [{ token: i1.HttpClient }, { token: 'BASE_URL' }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1763
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FilesQueryService, providedIn: 'root' }); }
|
|
1756
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: PublicFilesQueryService, deps: [{ token: i1.HttpClient }, { token: 'BASE_URL' }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1757
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: PublicFilesQueryService, providedIn: 'root' }); }
|
|
1764
1758
|
}
|
|
1765
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type:
|
|
1759
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: PublicFilesQueryService, decorators: [{
|
|
1766
1760
|
type: Injectable,
|
|
1767
1761
|
args: [{
|
|
1768
1762
|
providedIn: 'root'
|
|
@@ -1773,8 +1767,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
|
|
|
1773
1767
|
}] }] });
|
|
1774
1768
|
|
|
1775
1769
|
class FileIdSelectComponent {
|
|
1776
|
-
constructor(
|
|
1777
|
-
this.
|
|
1770
|
+
constructor(_publicFileService, _options) {
|
|
1771
|
+
this._publicFileService = _publicFileService;
|
|
1778
1772
|
this._options = _options;
|
|
1779
1773
|
this.labelText = "Поиск файлов";
|
|
1780
1774
|
this.loading = false;
|
|
@@ -1792,14 +1786,16 @@ class FileIdSelectComponent {
|
|
|
1792
1786
|
}
|
|
1793
1787
|
loadFiles() {
|
|
1794
1788
|
this.loading = true;
|
|
1795
|
-
this.
|
|
1789
|
+
this._publicFileService
|
|
1790
|
+
.search({
|
|
1796
1791
|
count: 10,
|
|
1797
1792
|
offSet: 0,
|
|
1798
1793
|
fileName: null,
|
|
1799
1794
|
fileTypes: [FileType.Image],
|
|
1800
1795
|
applicationId: null,
|
|
1801
1796
|
q: this.q
|
|
1802
|
-
})
|
|
1797
|
+
})
|
|
1798
|
+
.subscribe(data => {
|
|
1803
1799
|
this.files = [...data.list];
|
|
1804
1800
|
this.loading = false;
|
|
1805
1801
|
});
|
|
@@ -1811,13 +1807,13 @@ class FileIdSelectComponent {
|
|
|
1811
1807
|
ngOnChanges(changes) {
|
|
1812
1808
|
this.loadFiles();
|
|
1813
1809
|
}
|
|
1814
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FileIdSelectComponent, deps: [{ token:
|
|
1810
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FileIdSelectComponent, deps: [{ token: PublicFilesQueryService }, { token: CrocoHtmlOptionsToken }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1815
1811
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: FileIdSelectComponent, isStandalone: true, selector: "croco-html-file-id-select", inputs: { labelText: "labelText", fileId: "fileId" }, outputs: { fileId: "fileId", onFileIdChanged: "onFileIdChanged" }, usesOnChanges: true, ngImport: i0, template: "<div>\n <div class=\"form-group\">\n <label for=\"fileName\">{{labelText}}</label>\n <ng-select [(ngModel)]=\"fileId\" (ngModelChange)=\"onModelChanged($event)\" [items]=\"files\" #select\n bindLabel=\"fileName\" (search)=\"onSearchChanged($event)\" [loading]=\"loading\" [loadingText]=\"'\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u044E \u0444\u0430\u0439\u043B\u044B'\"\n dropdownPosition=\"auto\" bindValue=\"fileId\" labelForId=\"fileName\" placeholder=\"\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0444\u0430\u0439\u043B\"\n [virtualScroll]=\"true\">\n <ng-template ng-option-tmp let-item=\"item\" let-index=\"index\" let-search=\"searchTerm\">\n <div>\n <img class=\"mx-auto d-block img-fluid\" [src]=\"getSrc(item.fileId)\" />\n </div>\n <div>\n <span class=\"h5\">\u0424\u0430\u0439\u043B: </span>\n <span class=\"h5\" [ngOptionHighlight]=\"search\"><b>{{item.fileName}}</b></span>\n </div>\n <div>\n <small>\n <span>\n \u0418\u0434\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440 \u0444\u0430\u0439\u043B\u0430: <b>{{item.fileId}}</b>\n </span>\n </small>\n </div>\n </ng-template>\n </ng-select>\n </div>\n</div>\n\n<div>\n \u0418\u0434\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440 \u0444\u0430\u0439\u043B\u0430: {{fileId}}\n</div>", styles: [""], dependencies: [{ kind: "ngmodule", type: NgSelectModule }, { kind: "component", type: i2$2.NgSelectComponent, selector: "ng-select", inputs: ["bindLabel", "bindValue", "markFirst", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "appearance", "dropdownPosition", "appendTo", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "typeahead", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd", "deselectOnClick"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }, { kind: "directive", type: i2$2.NgOptionTemplateDirective, selector: "[ng-option-tmp]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
|
|
1816
1812
|
}
|
|
1817
1813
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FileIdSelectComponent, decorators: [{
|
|
1818
1814
|
type: Component,
|
|
1819
1815
|
args: [{ selector: 'croco-html-file-id-select', standalone: true, imports: [NgSelectModule, FormsModule], template: "<div>\n <div class=\"form-group\">\n <label for=\"fileName\">{{labelText}}</label>\n <ng-select [(ngModel)]=\"fileId\" (ngModelChange)=\"onModelChanged($event)\" [items]=\"files\" #select\n bindLabel=\"fileName\" (search)=\"onSearchChanged($event)\" [loading]=\"loading\" [loadingText]=\"'\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u044E \u0444\u0430\u0439\u043B\u044B'\"\n dropdownPosition=\"auto\" bindValue=\"fileId\" labelForId=\"fileName\" placeholder=\"\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0444\u0430\u0439\u043B\"\n [virtualScroll]=\"true\">\n <ng-template ng-option-tmp let-item=\"item\" let-index=\"index\" let-search=\"searchTerm\">\n <div>\n <img class=\"mx-auto d-block img-fluid\" [src]=\"getSrc(item.fileId)\" />\n </div>\n <div>\n <span class=\"h5\">\u0424\u0430\u0439\u043B: </span>\n <span class=\"h5\" [ngOptionHighlight]=\"search\"><b>{{item.fileName}}</b></span>\n </div>\n <div>\n <small>\n <span>\n \u0418\u0434\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440 \u0444\u0430\u0439\u043B\u0430: <b>{{item.fileId}}</b>\n </span>\n </small>\n </div>\n </ng-template>\n </ng-select>\n </div>\n</div>\n\n<div>\n \u0418\u0434\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440 \u0444\u0430\u0439\u043B\u0430: {{fileId}}\n</div>" }]
|
|
1820
|
-
}], ctorParameters: () => [{ type:
|
|
1816
|
+
}], ctorParameters: () => [{ type: PublicFilesQueryService }, { type: undefined, decorators: [{
|
|
1821
1817
|
type: Inject,
|
|
1822
1818
|
args: [CrocoHtmlOptionsToken]
|
|
1823
1819
|
}] }], propDecorators: { labelText: [{
|
|
@@ -2410,10 +2406,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
|
|
|
2410
2406
|
FormsModule,
|
|
2411
2407
|
MatButton,
|
|
2412
2408
|
MatCardModule,
|
|
2413
|
-
XmlTagViewComponent,
|
|
2414
2409
|
HtmlViewComponent,
|
|
2415
|
-
MatIcon,
|
|
2416
|
-
NgTemplateOutlet,
|
|
2417
2410
|
SpriteIconPathPipe
|
|
2418
2411
|
], template: "<mat-tab-group mat-stretch-tabs=\"false\" mat-align-tabs=\"start\">\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\n [useHtmlRaw]=\"true\"\n [html]=\"html\"\n (onHtmlChanged)=\"onHtmlChangedHandler($event)\"\n (rendered)=\"visualEditorRenderedHandler()\">\n </croco-visual-editor>\n\n <div style=\"height: 20px;\"></div>\n\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\"\n cdkAutosizeMinRows=\"1\"\n placeholder=\"\u0418\u0441\u0445\u043E\u0434\u043D\u044B\u0439 \u043A\u043E\u0434\" [(ngModel)]=\"html\"\n (ngModelChange)=\"textAreaModelChangedHandler()\"></textarea>\n </mat-form-field>\n </div>\n }\n\n <button (click)=\"copyMarkUp()\"\n 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", 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}.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)}\n"] }]
|
|
2419
2412
|
}], ctorParameters: () => [{ type: i1$5.ClipboardService }, { type: i2$3.MatSnackBar }, { type: i0.ChangeDetectorRef }], propDecorators: { visualEditor: [{
|