croco-html 3.0.4 → 3.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/esm2022/lib/components/editor/html-raw-editor/html-raw-editor.component.mjs +1 -1
  2. package/esm2022/lib/components/editor/image-editor/image-editor.component.mjs +1 -1
  3. package/esm2022/lib/components/editor/main-editor/main-editor.component.mjs +1 -7
  4. package/esm2022/lib/components/file-id-select/file-id-select.component.mjs +11 -9
  5. package/esm2022/lib/components/xml-tags/file-image-tag-view/file-image-tag-view.component.mjs +1 -1
  6. package/esm2022/lib/extensions/BodyTagsExtensions.mjs +1 -1
  7. package/esm2022/lib/extensions/BootstrapTableMethods.mjs +1 -1
  8. package/esm2022/lib/extensions/ImageMethods.mjs +1 -1
  9. package/esm2022/lib/index.mjs +1 -1
  10. package/esm2022/lib/models/image-models.mjs +2 -0
  11. package/esm2022/lib/models/index.mjs +3 -0
  12. package/esm2022/lib/options/index.mjs +1 -1
  13. package/esm2022/lib/services/PublicFilesQueryService.mjs +34 -0
  14. package/esm2022/lib/services/screen-width.service.mjs +1 -1
  15. package/esm2022/public-api.mjs +2 -2
  16. package/fesm2022/croco-html.mjs +14 -18
  17. package/fesm2022/croco-html.mjs.map +1 -1
  18. package/lib/components/editor/image-editor/image-editor.component.d.ts +1 -1
  19. package/lib/components/editor/main-editor/main-editor.component.d.ts +3 -3
  20. package/lib/components/file-id-select/file-id-select.component.d.ts +5 -4
  21. package/lib/components/xml-tags/file-image-tag-view/file-image-tag-view.component.d.ts +1 -1
  22. package/lib/extensions/HtmlExtractionMethods.d.ts +2 -2
  23. package/lib/extensions/ImageMethods.d.ts +1 -19
  24. package/lib/index.d.ts +7 -7
  25. package/lib/models/image-models.d.ts +19 -0
  26. package/lib/models/index.d.ts +2 -0
  27. package/lib/options/index.d.ts +10 -1
  28. package/lib/services/{files-query.service.d.ts → PublicFilesQueryService.d.ts} +9 -13
  29. package/package.json +1 -1
  30. package/public-api.d.ts +1 -1
  31. package/esm2022/lib/services/files-query.service.mjs +0 -37
@@ -1,8 +1,8 @@
1
1
  import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
2
- import { IMediaRequest } from '../../../extensions';
3
2
  import { HtmlBodyTag } from '../../../models/models';
4
3
  import { ScreenWidthService } from "../../../services/screen-width.service";
5
4
  import { CrocoHtmlOptions } from '../../../options';
5
+ import { IMediaRequest } from '../../../models';
6
6
  import * as i0 from "@angular/core";
7
7
  export declare class ImageEditorComponent implements OnInit, OnDestroy {
8
8
  private readonly _options;
@@ -4,9 +4,9 @@ import { ClipboardService } from 'ngx-clipboard';
4
4
  import { VisualEditorComponent } from '../visual-editor/visual-editor.component';
5
5
  import * as i0 from "@angular/core";
6
6
  export declare class MainEditorComponent implements OnInit, AfterContentChecked, AfterViewInit {
7
- private _clipboardService;
8
- private _snackBar;
9
- private _cdref;
7
+ private readonly _clipboardService;
8
+ private readonly _snackBar;
9
+ private readonly _cdref;
10
10
  visualEditorRendered: boolean;
11
11
  visualEditor: VisualEditorComponent;
12
12
  showMarkUp: boolean;
@@ -1,20 +1,21 @@
1
1
  import { EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
2
- import { FileNameAndIdModel, FilesQueryService } from '../../services/files-query.service';
2
+ import { PublicFilesQueryService } from '../../services/PublicFilesQueryService';
3
3
  import { CrocoHtmlOptions } from '../../options';
4
+ import { FileSimpleModel } from 'croco-generic-app-logic';
4
5
  import * as i0 from "@angular/core";
5
6
  export interface SearchQuestionsFormData {
6
7
  q: string;
7
8
  }
8
9
  export declare class FileIdSelectComponent implements OnInit, OnChanges {
9
- private readonly _fileService;
10
+ private readonly _publicFileService;
10
11
  private readonly _options;
11
12
  q: string;
12
13
  labelText: string;
13
14
  fileId: number;
14
15
  loading: boolean;
15
- files: FileNameAndIdModel[];
16
+ files: FileSimpleModel[];
16
17
  onFileIdChanged: EventEmitter<number>;
17
- constructor(_fileService: FilesQueryService, _options: CrocoHtmlOptions);
18
+ constructor(_publicFileService: PublicFilesQueryService, _options: CrocoHtmlOptions);
18
19
  onModelChanged(fileId: number): void;
19
20
  getSrc(fileId: number): string;
20
21
  ngOnInit(): void;
@@ -1,8 +1,8 @@
1
1
  import { OnDestroy, OnInit } from '@angular/core';
2
2
  import { InterfaceBlock } from '../../../extensions/InterfaceBlock';
3
- import { IMediaRequest } from '../../../extensions';
4
3
  import { ScreenWidthService } from "../../../services/screen-width.service";
5
4
  import { CrocoHtmlOptions } from '../../../options';
5
+ import { IMediaRequest } from '../../../models';
6
6
  import * as i0 from "@angular/core";
7
7
  export declare class FileImageTagViewComponent implements OnInit, OnDestroy {
8
8
  private readonly screenWidthService;
@@ -4,7 +4,7 @@ import { CrocoHtmlOptions } from "../options";
4
4
  export declare class HtmlExtractionMethods {
5
5
  static ExtractHeaderTag(elem: HTMLElement, tagName: string): GenericTextTag;
6
6
  static Extractors: {
7
- [x: string]: ((elem: HTMLElement, options: CrocoHtmlOptions) => import("./ImageMethods").FileImageTag) | ((elem: HTMLElement, options: CrocoHtmlOptions) => {
7
+ [x: string]: ((elem: HTMLElement, options: CrocoHtmlOptions) => import("croco-html").FileImageTag) | ((elem: HTMLElement, options: CrocoHtmlOptions) => {
8
8
  type: string;
9
9
  data: import("./TableMethods").TableData;
10
10
  validationResult: import("./TableMethods").BaseApiResponse;
@@ -25,7 +25,7 @@ export declare class HtmlExtractionMethods {
25
25
  bootstrapHtml: string;
26
26
  }) | ((elem: HTMLElement, options: CrocoHtmlOptions) => import("./TextMethods").RichTextData) | ((elem: HTMLElement, options: CrocoHtmlOptions) => GenericTextTag) | ((elem: HTMLElement, options: CrocoHtmlOptions) => import("./VideoMethods").ExternalVideoTag) | ((elem: HTMLElement, options: CrocoHtmlOptions) => import("./DownloadButtonMethods").DownloadButtonTag) | ((elem: HTMLElement, options: CrocoHtmlOptions) => import("./ButtonMethods").ButtonTag) | ((elem: HTMLElement, options: CrocoHtmlOptions) => import("./CustomWidgetMethods").CustomWidgetTag) | ((elem: HTMLElement, options: CrocoHtmlOptions) => import("./HtmlRawTagDataConsts").ExtractHtmlRawTag);
27
27
  TEXT: (elem: HTMLElement, options: CrocoHtmlOptions) => import("./TextSimpleMethods").SimpleTextTag;
28
- "FILE-IMAGE": (elem: HTMLElement, options: CrocoHtmlOptions) => import("./ImageMethods").FileImageTag;
28
+ "FILE-IMAGE": (elem: HTMLElement, options: CrocoHtmlOptions) => import("croco-html").FileImageTag;
29
29
  TABLE: (elem: HTMLElement, options: CrocoHtmlOptions) => {
30
30
  type: string;
31
31
  data: import("./TableMethods").TableData;
@@ -1,3 +1,4 @@
1
+ import { FileImageTag, ImageRestrictions, IMediaRequest } from "../models";
1
2
  import { CrocoHtmlOptions } from "../options";
2
3
  export declare class FileImageTagDataConsts {
3
4
  static TagName: string;
@@ -9,25 +10,6 @@ export declare class FileImageTagDataConsts {
9
10
  static MaxImageWidth: string;
10
11
  static DefaultValueForFileImage: string;
11
12
  }
12
- export interface ImageRestrictions {
13
- maxWidth: number | undefined;
14
- maxHeight: number | undefined;
15
- }
16
- export interface FileImageTag {
17
- type: string;
18
- data: FileImageTagData;
19
- }
20
- export interface FileImageTagData {
21
- src: string;
22
- fileId: number;
23
- screenMediaRequest: string;
24
- }
25
- export interface IMediaRequest {
26
- minScreenWidth: number;
27
- maxScreenWidth: number;
28
- maxImageHeight?: number;
29
- maxImageWidth?: number;
30
- }
31
13
  export declare class ImageMethods {
32
14
  static buildUrl(fileId: number, sizeType: string, options: CrocoHtmlOptions): string;
33
15
  static buildSmallUrl(fileId: number, options: CrocoHtmlOptions): string;
package/lib/index.d.ts CHANGED
@@ -3,7 +3,7 @@ import { MainEditorBlockComponent } from "./components";
3
3
  import { MainEditorComponent } from "./components";
4
4
  import { TextEditorComponent } from "./components";
5
5
  import { FileIdSelectComponent } from "./components";
6
- import { XmlTagHeaderInnerTextViewComponent } from "./components";
6
+ import { XmlTagHeaderTextViewComponent } from "./components";
7
7
  import { XmlTagHtmlViewComponent } from "./components";
8
8
  import { XmlTagRichTextViewComponent } from "./components";
9
9
  import { XmlTagTableViewComponent } from "./components";
@@ -13,13 +13,13 @@ import { VisualEditorComponent } from './components';
13
13
  import { AddFilesBtnComponent } from './components';
14
14
  import { XmlTagExternalVideoComponent } from "./components";
15
15
  import { HtmlRawEditorComponent } from "./components";
16
- import { MatFormFieldModule } from '@angular/material/form-field';
16
+ import { MatTabsModule } from '@angular/material/tabs';
17
17
  import { RichTextToHtmlPipe, TagToSpanPipe, ToHtmlBodyTagsPipe, ToPreviewHtmlPipe, ToPreviewPipe } from "./pipes";
18
18
  import { FileImageTagViewComponent, UploadFilesBtnComponent } from "./components";
19
19
  import { HtmlRawViewComponent } from "./components";
20
20
  import { XmlTagCustomWidgetComponent } from "./components";
21
- export declare const EditorComponents: (typeof AddFilesBtnComponent | typeof HtmlRawEditorComponent | typeof FileIdSelectComponent | typeof ImageEditorComponent | typeof TextEditorComponent | typeof CustomWidgetEditorComponent | typeof MainEditorBlockComponent | typeof VisualEditorComponent | typeof MainEditorComponent)[];
22
- export declare const XmlComponents: (typeof XmlTagExternalVideoComponent | typeof XmlTagHeaderInnerTextViewComponent | typeof XmlTagHtmlViewComponent | typeof XmlTagRichTextViewComponent | typeof XmlTagTableViewComponent | typeof FileImageTagViewComponent | typeof HtmlRawViewComponent | typeof XmlTagCustomWidgetComponent | typeof XmlTagViewComponent)[];
23
- export declare const CrocoPipes: (typeof RichTextToHtmlPipe | typeof ToPreviewPipe | typeof TagToSpanPipe | typeof ToHtmlBodyTagsPipe | typeof ToPreviewHtmlPipe)[];
24
- export declare const CrocoHtmlDeclarations: (typeof UploadFilesBtnComponent | typeof AddFilesBtnComponent | typeof XmlTagExternalVideoComponent | typeof XmlTagHeaderInnerTextViewComponent | typeof XmlTagHtmlViewComponent | typeof RichTextToHtmlPipe | typeof XmlTagRichTextViewComponent | typeof XmlTagTableViewComponent | typeof FileImageTagViewComponent | typeof HtmlRawViewComponent | typeof XmlTagCustomWidgetComponent | typeof XmlTagViewComponent | typeof HtmlRawEditorComponent | typeof FileIdSelectComponent | typeof ImageEditorComponent | typeof TextEditorComponent | typeof CustomWidgetEditorComponent | typeof MainEditorBlockComponent | typeof VisualEditorComponent | typeof ToPreviewPipe | typeof MainEditorComponent | typeof TagToSpanPipe | typeof ToHtmlBodyTagsPipe | typeof ToPreviewHtmlPipe)[];
25
- export declare const MaterialModules: (typeof MatFormFieldModule)[];
21
+ export declare const EditorComponents: (typeof FileIdSelectComponent | typeof ImageEditorComponent | typeof TextEditorComponent | typeof HtmlRawEditorComponent | typeof CustomWidgetEditorComponent | typeof MainEditorBlockComponent | typeof AddFilesBtnComponent | typeof VisualEditorComponent | typeof MainEditorComponent)[];
22
+ export declare const XmlComponents: (typeof FileImageTagViewComponent | typeof HtmlRawViewComponent | typeof XmlTagHeaderTextViewComponent | typeof XmlTagHtmlViewComponent | typeof XmlTagExternalVideoComponent | typeof XmlTagCustomWidgetComponent | typeof XmlTagViewComponent | typeof XmlTagTableViewComponent | typeof XmlTagRichTextViewComponent)[];
23
+ export declare const CrocoPipes: (typeof ToPreviewHtmlPipe | typeof ToPreviewPipe | typeof ToHtmlBodyTagsPipe | typeof RichTextToHtmlPipe | typeof TagToSpanPipe)[];
24
+ export declare const CrocoHtmlDeclarations: (typeof FileIdSelectComponent | typeof ImageEditorComponent | typeof TextEditorComponent | typeof HtmlRawEditorComponent | typeof CustomWidgetEditorComponent | typeof MainEditorBlockComponent | typeof FileImageTagViewComponent | typeof HtmlRawViewComponent | typeof XmlTagHeaderTextViewComponent | typeof XmlTagHtmlViewComponent | typeof XmlTagExternalVideoComponent | typeof XmlTagCustomWidgetComponent | typeof XmlTagViewComponent | typeof ToPreviewHtmlPipe | typeof ToPreviewPipe | typeof ToHtmlBodyTagsPipe | typeof AddFilesBtnComponent | typeof VisualEditorComponent | typeof MainEditorComponent | typeof XmlTagTableViewComponent | typeof XmlTagRichTextViewComponent | typeof RichTextToHtmlPipe | typeof TagToSpanPipe | typeof UploadFilesBtnComponent)[];
25
+ export declare const MaterialModules: (typeof MatTabsModule)[];
@@ -0,0 +1,19 @@
1
+ export interface ImageRestrictions {
2
+ maxWidth: number | undefined;
3
+ maxHeight: number | undefined;
4
+ }
5
+ export interface FileImageTag {
6
+ type: string;
7
+ data: FileImageTagData;
8
+ }
9
+ export interface FileImageTagData {
10
+ src: string;
11
+ fileId: number;
12
+ screenMediaRequest: string;
13
+ }
14
+ export interface IMediaRequest {
15
+ minScreenWidth: number;
16
+ maxScreenWidth: number;
17
+ maxImageHeight?: number;
18
+ maxImageWidth?: number;
19
+ }
@@ -0,0 +1,2 @@
1
+ export * from './image-models';
2
+ export * from './models';
@@ -1,7 +1,16 @@
1
- import { IMediaRequest } from "../extensions";
2
1
  import { Type } from "@angular/core";
2
+ import { IMediaRequest } from "../models";
3
3
  export interface CrocoHtmlOptions {
4
+ /**
5
+ * Формат сслыки для показа изображений из публичных файлов.
6
+ * Содержит переменные: {sizeType} - тип размера, {fileId} - идентификатор изображения.
7
+ */
4
8
  publicImageResizedUrlFormat: string;
9
+ /**
10
+ * Формат сслыки для показа изображений из приватный файлов.
11
+ * Содержит переменные: {sizeType} - тип размера, {fileId} - идентификатор изображения.
12
+ */
13
+ privateImageResizedUrlFormat: string;
5
14
  globalMediaRequests?: IMediaRequest[];
6
15
  /**
7
16
  * Компонент для рендера кастомных виджетов
@@ -5,11 +5,6 @@ export interface GetListResult<T> {
5
5
  totalCount: number;
6
6
  list: Array<T>;
7
7
  }
8
- export interface DbFileNoDataWithRelations {
9
- id: number;
10
- fileName: string;
11
- relations: Array<FileRelationModel>;
12
- }
13
8
  export interface FileRelationModel {
14
9
  entityTypeFullName: string;
15
10
  entityKey: string;
@@ -38,16 +33,17 @@ export interface GetListSearchModel {
38
33
  count: number | null;
39
34
  offSet: number;
40
35
  }
41
- export interface FileNameAndIdModel {
36
+ export interface FileSimpleModel {
42
37
  fileId: number;
43
38
  fileName: string;
39
+ type: FileType;
40
+ downloadUrl: string;
44
41
  }
45
- export declare class FilesQueryService {
46
- private _httpClient;
47
- _baseControllerUrl: string;
42
+ export declare class PublicFilesQueryService {
43
+ private readonly _httpClient;
44
+ private readonly _baseControllerUrl;
48
45
  constructor(_httpClient: HttpClient, baseUrl: string);
49
- getFilesWithRelations(model: SearchFiles): Observable<GetListResult<DbFileNoDataWithRelations>>;
50
- getFiles(model: SearchFiles): Observable<GetListResult<FileNameAndIdModel>>;
51
- static ɵfac: i0.ɵɵFactoryDeclaration<FilesQueryService, never>;
52
- static ɵprov: i0.ɵɵInjectableDeclaration<FilesQueryService>;
46
+ search(model: SearchFiles): Observable<GetListResult<FileSimpleModel>>;
47
+ static ɵfac: i0.ɵɵFactoryDeclaration<PublicFilesQueryService, never>;
48
+ static ɵprov: i0.ɵɵInjectableDeclaration<PublicFilesQueryService>;
53
49
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "croco-html",
3
- "version": "3.0.4",
3
+ "version": "3.0.6",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^18.2.13",
6
6
  "@angular/core": "^18.2.13",
package/public-api.d.ts CHANGED
@@ -2,7 +2,7 @@ export * from './lib/components';
2
2
  export * from './lib/pipes';
3
3
  export * from './lib/extensions';
4
4
  export * from './lib/croco-html.module';
5
- export * from './lib/models/models';
5
+ export * from './lib/models';
6
6
  export * from './lib/consts';
7
7
  export * from './lib/services';
8
8
  export * from './lib/options';
@@ -1,37 +0,0 @@
1
- import { Inject, Injectable } from "@angular/core";
2
- import * as i0 from "@angular/core";
3
- import * as i1 from "@angular/common/http";
4
- export var FileType;
5
- (function (FileType) {
6
- FileType["Undefined"] = "Undefined";
7
- FileType["Unknown"] = "Unknown";
8
- FileType["Image"] = "Image";
9
- FileType["Audio"] = "Audio";
10
- FileType["Video"] = "Video";
11
- FileType["Document"] = "Document";
12
- FileType["Archive"] = "Archive";
13
- })(FileType || (FileType = {}));
14
- export class FilesQueryService {
15
- constructor(_httpClient, baseUrl) {
16
- this._httpClient = _httpClient;
17
- this._baseControllerUrl = `${baseUrl}Api/Files`;
18
- }
19
- getFilesWithRelations(model) {
20
- return this._httpClient.post(this._baseControllerUrl + `/GetFiles/WithRelations`, model);
21
- }
22
- getFiles(model) {
23
- return this._httpClient.post(this._baseControllerUrl + `/GetFiles`, model);
24
- }
25
- 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 }); }
26
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FilesQueryService, providedIn: 'root' }); }
27
- }
28
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: FilesQueryService, decorators: [{
29
- type: Injectable,
30
- args: [{
31
- providedIn: 'root'
32
- }]
33
- }], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
34
- type: Inject,
35
- args: ['BASE_URL']
36
- }] }] });
37
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlsZXMtcXVlcnkuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2Nyb2NvLWh0bWwvc3JjL2xpYi9zZXJ2aWNlcy9maWxlcy1xdWVyeS5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sRUFBRSxNQUFNLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDOzs7QUF1Q25ELE1BQU0sQ0FBTixJQUFZLFFBUVg7QUFSRCxXQUFZLFFBQVE7SUFDaEIsbUNBQXVCLENBQUE7SUFDdkIsK0JBQW1CLENBQUE7SUFDbkIsMkJBQWUsQ0FBQTtJQUNmLDJCQUFlLENBQUE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