croco-html 2.29.0 → 2.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/components/editor/image-editor/image-editor.component.mjs +8 -4
- package/esm2022/lib/components/xml-tags/file-image-tag-view/file-image-tag-view.component.mjs +7 -4
- package/esm2022/lib/extensions/ImageMethods.mjs +35 -12
- package/fesm2022/croco-html.mjs +47 -17
- package/fesm2022/croco-html.mjs.map +1 -1
- package/lib/components/editor/image-editor/image-editor.component.d.ts +1 -0
- package/lib/components/xml-tags/file-image-tag-view/file-image-tag-view.component.d.ts +1 -0
- package/lib/extensions/ImageMethods.d.ts +12 -5
- package/package.json +1 -1
|
@@ -12,6 +12,7 @@ export declare class FileImageTagViewComponent implements OnInit, OnDestroy {
|
|
|
12
12
|
requests: IMediaRequest[];
|
|
13
13
|
private unsubscribe;
|
|
14
14
|
imageMaxHeight: number;
|
|
15
|
+
imageMaxWidth: number;
|
|
15
16
|
constructor(screenWidthService: ScreenWidthService, _options: CrocoHtmlOptions);
|
|
16
17
|
getMediaRequests(screenMediaRequest: string): IMediaRequest[];
|
|
17
18
|
ngOnInit(): void;
|
|
@@ -3,10 +3,15 @@ export declare class FileImageTagDataConsts {
|
|
|
3
3
|
static TagName: string;
|
|
4
4
|
static FileIdAttrName: string;
|
|
5
5
|
static ScreenMediaRequest: string;
|
|
6
|
-
static DefaultValueForFileImage: string;
|
|
7
6
|
static MaxScreenWidth: string;
|
|
8
7
|
static MinScreenWidth: string;
|
|
9
8
|
static MaxImageHeight: string;
|
|
9
|
+
static MaxImageWidth: string;
|
|
10
|
+
static DefaultValueForFileImage: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ImageRestrictions {
|
|
13
|
+
maxWidth: number | undefined;
|
|
14
|
+
maxHeight: number | undefined;
|
|
10
15
|
}
|
|
11
16
|
export interface FileImageTag {
|
|
12
17
|
type: string;
|
|
@@ -20,7 +25,8 @@ export interface FileImageTagData {
|
|
|
20
25
|
export interface IMediaRequest {
|
|
21
26
|
minScreenWidth: number;
|
|
22
27
|
maxScreenWidth: number;
|
|
23
|
-
maxImageHeight
|
|
28
|
+
maxImageHeight?: number;
|
|
29
|
+
maxImageWidth?: number;
|
|
24
30
|
}
|
|
25
31
|
export declare class ImageMethods {
|
|
26
32
|
static buildUrl(fileId: number, sizeType: string, options: CrocoHtmlOptions): string;
|
|
@@ -28,7 +34,8 @@ export declare class ImageMethods {
|
|
|
28
34
|
static buildMediumUrl(fileId: number, options: CrocoHtmlOptions): string;
|
|
29
35
|
static ExtractImage(elem: HTMLElement, options: CrocoHtmlOptions): FileImageTag;
|
|
30
36
|
static mediaRequestStringToArrayParser: (data: string) => IMediaRequest[];
|
|
31
|
-
static createMediaRequestValue(arr: string[], attribute: string): number;
|
|
32
|
-
static mediaRequestsArrayToStringParser
|
|
33
|
-
static
|
|
37
|
+
static createMediaRequestValue(arr: string[], attribute: string): number | null;
|
|
38
|
+
static mediaRequestsArrayToStringParser(data: IMediaRequest[]): string;
|
|
39
|
+
static mediaRequestToString(data: IMediaRequest): string;
|
|
40
|
+
static getImageRestrictionsByScreenSize(screenSize: number, requests: IMediaRequest[]): ImageRestrictions;
|
|
34
41
|
}
|