Skip to content

Commit a4eb592

Browse files
ANKUR DWIVEDIANKUR DWIVEDI
authored andcommitted
added parameters
1 parent b76274e commit a4eb592

File tree

6 files changed

+83
-66
lines changed

6 files changed

+83
-66
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,8 @@ See the complete list of transformations supported in ImageKit [here](https://do
291291
| effectUSM | e-usm |
292292
| effectContrast | e-contrast |
293293
| effectGray | e-grayscale |
294+
| effectShadow | e-shadow |
295+
| effectGradient | e-gradient |
294296
| original | orig |
295297
| raw | The string provided in raw will be added to the URL as it is. |
296298

sdk/lib/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"name": "imagekitio-angular",
3-
"version": "3.0.0",
3+
"version": "4.0.0",
44
"author": "ImageKit",
55
"license": "MIT",
66
"private": false,
77
"dependencies": {
8-
"imagekit-javascript": "^2.0.0"
8+
"imagekit-javascript": "^3.0.0"
99
},
1010
"ngPackage": {
1111
"$schema": "./node_modules/ng-packagr/ng-package.schema.json",

sdk/lib/src/imagekitio-angular/ik-upload/ik-upload.component.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ export class IkUploadComponent implements AfterViewInit {
3737
@Input('validateFile') validateFile: (file: File) => boolean;
3838
@Input('onUploadStart') onUploadStart: (e: HTMLInputEvent) => void;
3939
@Input('onUploadProgress') onUploadProgress: (e: ProgressEvent) => void;
40+
@Input('transformation') transformation: Object; //optional
4041
fileToUpload: File = null;
4142
xhr: XMLHttpRequest;
4243

@@ -74,7 +75,8 @@ export class IkUploadComponent implements AfterViewInit {
7475
extensions: this.extensions,
7576
webhookUrl: this.webhookUrl,
7677
onError: this.onError,
77-
onSuccess: this.onSuccess
78+
onSuccess: this.onSuccess,
79+
transformation: this.transformation,
7880
}
7981

8082
// Custom validation
@@ -245,6 +247,10 @@ export class IkUploadComponent implements AfterViewInit {
245247
if (options.xhr !== undefined) {
246248
Object.assign(params, { xhr: options.xhr });
247249
}
250+
251+
if (options.transformation !== undefined) {
252+
Object.assign(params, { transformation: options.transformation });
253+
}
248254
return params;
249255
}
250256
}

sdk/lib/src/imagekitio-angular/utility/ik-type-def-collection.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,5 @@ export interface IkUploadComponentOptions {
5454
onSuccess?: EventEmitter<any>;
5555
validateFile?: Function;
5656
xhr?: XMLHttpRequest;
57+
transformation?: Object;
5758
}

sdk/package-lock.json

Lines changed: 69 additions & 61 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "imagekitio-angular",
3-
"version": "3.0.0",
3+
"version": "4.0.0",
44
"license": "MIT",
55
"scripts": {
66
"ng": "ng",
@@ -27,7 +27,7 @@
2727
"@angular/platform-browser-dynamic": "^4.2.4",
2828
"@angular/router": "^4.2.4",
2929
"core-js": "^2.4.1",
30-
"imagekit-javascript": "^2.0.0",
30+
"imagekit-javascript": "^3.0.0",
3131
"rxjs": "^5.4.2",
3232
"zone.js": "^0.8.14"
3333
},

0 commit comments

Comments
 (0)