itlab-internal-services 2.6.6 → 2.6.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.
|
@@ -8,6 +8,7 @@ import { ApiPropertyOptions } from '@nestjs/swagger';
|
|
|
8
8
|
* @property {string[]} background - The background color or gradient for the thumbnail.
|
|
9
9
|
* @property {boolean} contain - Indicates whether the thumbnail should be cropped or not.
|
|
10
10
|
* @property {number} maxHeight - The maximum height of the thumbnail.
|
|
11
|
+
* @property {number} maxWidth - The maximum width of the thumbnail.
|
|
11
12
|
*/
|
|
12
13
|
export declare class Thumbnail {
|
|
13
14
|
/** The source of the thumbnail image. */
|
|
@@ -20,6 +21,8 @@ export declare class Thumbnail {
|
|
|
20
21
|
contain: boolean;
|
|
21
22
|
/** The maximum height of the thumbnail. */
|
|
22
23
|
maxHeight?: number;
|
|
24
|
+
/** The maximum width of the thumbnail. */
|
|
25
|
+
maxWidth?: number;
|
|
23
26
|
}
|
|
24
27
|
/**
|
|
25
28
|
* Creates a ThumbnailDecorator with the given options.
|
|
@@ -18,6 +18,7 @@ const alt_property_1 = require("./alt.property");
|
|
|
18
18
|
const background_property_1 = require("./background.property");
|
|
19
19
|
const contain_property_1 = require("./contain.property");
|
|
20
20
|
const max_height_property_1 = require("./max-height.property");
|
|
21
|
+
const max_width_property_1 = require("./max-width.property");
|
|
21
22
|
const src_property_1 = require("./src.property");
|
|
22
23
|
/**
|
|
23
24
|
* Represents a thumbnail.
|
|
@@ -28,6 +29,7 @@ const src_property_1 = require("./src.property");
|
|
|
28
29
|
* @property {string[]} background - The background color or gradient for the thumbnail.
|
|
29
30
|
* @property {boolean} contain - Indicates whether the thumbnail should be cropped or not.
|
|
30
31
|
* @property {number} maxHeight - The maximum height of the thumbnail.
|
|
32
|
+
* @property {number} maxWidth - The maximum width of the thumbnail.
|
|
31
33
|
*/
|
|
32
34
|
class Thumbnail {
|
|
33
35
|
}
|
|
@@ -52,6 +54,10 @@ __decorate([
|
|
|
52
54
|
(0, max_height_property_1.ThumbnailMaxHeight)(),
|
|
53
55
|
__metadata("design:type", Number)
|
|
54
56
|
], Thumbnail.prototype, "maxHeight", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, max_width_property_1.ThumbnailMaxWidth)(),
|
|
59
|
+
__metadata("design:type", Number)
|
|
60
|
+
], Thumbnail.prototype, "maxWidth", void 0);
|
|
55
61
|
/**
|
|
56
62
|
* Creates a ThumbnailDecorator with the given options.
|
|
57
63
|
*
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ApiPropertyOptions } from '@nestjs/swagger';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a ThumbnailMaxWidthDecorator with the given options.
|
|
4
|
+
*
|
|
5
|
+
* @param {ApiPropertyOptions} options - the options for the ThumbnailMaxWidth
|
|
6
|
+
* @return PropertyDecorator
|
|
7
|
+
*/
|
|
8
|
+
export declare const ThumbnailMaxWidth: (options?: ApiPropertyOptions) => <TFunction extends Function, Y>(target: object | TFunction, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor<Y>) => void;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ThumbnailMaxWidth = void 0;
|
|
4
|
+
const common_1 = require("@nestjs/common");
|
|
5
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
6
|
+
const class_validator_1 = require("class-validator");
|
|
7
|
+
/**
|
|
8
|
+
* Creates a ThumbnailMaxWidthDecorator with the given options.
|
|
9
|
+
*
|
|
10
|
+
* @param {ApiPropertyOptions} options - the options for the ThumbnailMaxWidth
|
|
11
|
+
* @return PropertyDecorator
|
|
12
|
+
*/
|
|
13
|
+
const ThumbnailMaxWidth = (options = {}) => (0, common_1.applyDecorators)(
|
|
14
|
+
/** ApiProperty with the given options */
|
|
15
|
+
(0, swagger_1.ApiProperty)(Object.assign({ description: 'Die maximale Breite des Thumbnails in Pixel (>= 100)', example: 200, minimum: 100 }, options)),
|
|
16
|
+
/** The property is optional */
|
|
17
|
+
(0, class_validator_1.IsOptional)(),
|
|
18
|
+
/** If set, the value must be at least 100 */
|
|
19
|
+
(0, class_validator_1.Min)(100, { message: 'Die maximale Breite muss mindestens 100 Pixel betragen' }));
|
|
20
|
+
exports.ThumbnailMaxWidth = ThumbnailMaxWidth;
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"email": "timo.scheuermann@sv-informatik.de",
|
|
6
6
|
"url": "https://timos.design"
|
|
7
7
|
},
|
|
8
|
-
"version": "2.6.
|
|
8
|
+
"version": "2.6.7",
|
|
9
9
|
"type": "commonjs",
|
|
10
10
|
"files": [
|
|
11
11
|
"dist"
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"axios": "1.7.2",
|
|
26
|
-
"itlab-functions": "^0.7.
|
|
26
|
+
"itlab-functions": "^0.7.2",
|
|
27
27
|
"passport-custom": "1.1.1"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|