(customHeaders: H, id: number): void;
- setDeleteFileEndpoint(path: string, identifier: number | HTMLElement): void;
- setDeleteFileParams(params: P, id: number): void;
- setItemLimit(newItemLimit: number): void;
- setForm(formElementOrId: HTMLFormElement | string): void;
- setName(id: number, name: string): void;
- setParams
(params: P, id: number): void;
- setUuid(id: number, uuid: string): void;
- uploadStoredFiles(): void; // throws NoFilesError
-
- // ui
- addExtraDropzone(element: HTMLElement): void;
- getDropTarget(id: number): HTMLElement;
- getId(element: HTMLElement): number;
- getItemByFileId(id: number): HTMLElement;
- removeExtraDropzone(element: HTMLElement): void;
- }
-}
diff --git a/fine-uploader/test/blobs.ts b/fine-uploader/test/blobs.ts
deleted file mode 100644
index 99e5355460..0000000000
--- a/fine-uploader/test/blobs.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-function testBlob() {
- const config: qq.BasicOptions = {
- blobs: {
- defaultName: "hi.png"
- }
- };
-
- const uploader = new qq.FineUploaderBasic(config);
-}
diff --git a/fine-uploader/test/callbacks.ts b/fine-uploader/test/callbacks.ts
deleted file mode 100644
index eba85ad2a0..0000000000
--- a/fine-uploader/test/callbacks.ts
+++ /dev/null
@@ -1,59 +0,0 @@
-class CallbacksTest {
- constructor(private opts: qq.CallbackOptions) {
-
- }
-
- testCallbacks() {
- const opts = this.opts;
-
- interface CustomType {
- myTypeOfClass: string;
- }
-
- opts.onAutoRetry = (id, name, attemptNumber) => {};
-
- opts.onCancel = (id, name) => {};
-
- opts.onComplete = (id: number, name: string, responseJSON: CustomType, xhr: XMLHttpRequest) => {};
-
- opts.onAllComplete = (succeeded, failed) => {};
-
- opts.onDelete = (id) => {};
-
- opts.onDeleteComplete = (id, xhr, isError) => {};
-
- opts.onError = (id, name, errorReason, xhr) => {};
-
- opts.onManualRetry = (id, name) => {
- return true;
- };
-
- opts.onPasteReceived = (blob) => {};
-
- opts.onProgress = (id, name, uploadedBytes, totalBytes) => {};
-
- opts.onResume = (id: number, name: string, chunkData: CustomType) => {};
-
- opts.onSessionRequestComplete = (response: CustomType[], success: boolean, xhrOrXdr: XMLHttpRequest) => {};
-
- opts.onStatusChange = (id, oldStatus, newStatus) => {};
-
- opts.onSubmit = (id, name) => {};
-
- opts.onSubmitDelete = (id) => {};
-
- opts.onSubmitted = (id, name) => {};
-
- opts.onTotalProgress = (totalUploadedBytes, totalBytes) => {};
-
- opts.onUpload = (id, name) => {};
-
- opts.onUploadChunk = (id, name, chunkData) => {};
-
- opts.onUploadChunkSuccess = (id: number, chunkData: qq.ChunkData, responseJSON: CustomType, xhr: XMLHttpRequest) => {};
-
- opts.onValidate = (data, buttonContainer) => {};
-
- opts.onValidateBatch = (fileOrBlobDataArray, buttonContaine) => {};
- }
-}
diff --git a/fine-uploader/test/camera.ts b/fine-uploader/test/camera.ts
deleted file mode 100644
index b42a080778..0000000000
--- a/fine-uploader/test/camera.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-function cameraTest() {
- const cameraButton = new HTMLButtonElement();
-
- const cameraOptions: qq.CameraOptions = {
- button: cameraButton,
- ios: false
- };
-
- const config: qq.BasicOptions = {
- camera: cameraOptions
- };
-
- const uploader = new qq.FineUploaderBasic(config);
-}
diff --git a/fine-uploader/test/chunking.ts b/fine-uploader/test/chunking.ts
deleted file mode 100644
index 386dd67738..0000000000
--- a/fine-uploader/test/chunking.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-function chunkingTest() {
-
- const chunkingOptions: qq.ChunkingOptions = {
- concurrent: {
- enabled: false
- },
- enabled: true,
- mandatory: true,
- partSize: 1000000,
- paramNames: {
- chunkSize: "chunkSize",
- partByteOffset: "partByteOffset",
- partIndex: "partIndex",
- totalParts: "totalParts"
- },
- success: {
- endpoint: "/some/web/endpoint/yaySuccesss"
- }
- };
-
- const config: qq.BasicOptions = {
- chunking: chunkingOptions
- };
-
- const uploader = new qq.FineUploaderBasic(config);
-}
diff --git a/fine-uploader/test/core.ts b/fine-uploader/test/core.ts
deleted file mode 100644
index dbc06e95d6..0000000000
--- a/fine-uploader/test/core.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-function testCore() {
- const button: HTMLElement = new HTMLButtonElement();
-
- const config: qq.BasicOptions = {
- autoUpload: true,
- button,
- debug: true,
- disableCancelForFormUploads: true,
- formatFileName: (rawFileName: string) => {
- return "hi";
- },
- maxConnections: 10,
- multiple: true
- };
-
- const uploader = new qq.FineUploaderBasic(config);
-}
diff --git a/fine-uploader/test/cors.ts b/fine-uploader/test/cors.ts
deleted file mode 100644
index 771b210208..0000000000
--- a/fine-uploader/test/cors.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-function corsTest() {
- const corsOptions: qq.CorsOptions = {
- allowXdr: true,
- expected: true,
- sendCredentials: true
- };
-
- const config: qq.BasicOptions = {
- cors: corsOptions
- };
-
- const uploader = new qq.FineUploaderBasic(config);
-}
diff --git a/fine-uploader/test/deleteFile.ts b/fine-uploader/test/deleteFile.ts
deleted file mode 100644
index 49c3e68890..0000000000
--- a/fine-uploader/test/deleteFile.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-function deleteFileTest() {
- interface CustomHeader {
- myOption: string;
- }
-
- interface CustomParams {
- myParam: string;
- }
-
- const deleteFileOptions: qq.DeleteFileOptions = {
- customHeader: {
- myOption: "ewwww"
- },
- enabled: true,
- endpoint: "/my/server/location/delete",
- method: "POST",
- params: {
- myParam: "u"
- }
- };
-
-
- const config: qq.BasicOptions = {
- deleteFile: deleteFileOptions
- };
-
- const uploader = new qq.FineUploaderBasic(config);
-}
diff --git a/fine-uploader/test/extraButtons.ts b/fine-uploader/test/extraButtons.ts
deleted file mode 100644
index eef709bea8..0000000000
--- a/fine-uploader/test/extraButtons.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-function extraButtons() {
- interface Validation {
- myValue: string;
- }
-
- const element: HTMLElement = new HTMLElement();
-
- const extraButtonOptions: qq.ExtraButtonsOptions = {
- element,
- fileInputTitle: "inputTitle",
- folders: true,
- multiple: false,
- validation: {
- myValue: "ew"
- }
- };
-
- const config: qq.BasicOptions = {
- extraButtons: extraButtonOptions
- };
-
- const uploader = new qq.FineUploaderBasic(config);
-}
diff --git a/fine-uploader/test/form.ts b/fine-uploader/test/form.ts
deleted file mode 100644
index ccc08b69a1..0000000000
--- a/fine-uploader/test/form.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-function formTest() {
- const formOptions: qq.FormOptions = {
- element: "qq-form",
- autoUpload: true,
- interceptSubmit: true
- };
-
- const config: qq.BasicOptions = {
- form: formOptions
- };
-
- const uploader = new qq.FineUploaderBasic(config);
-}
diff --git a/fine-uploader/test/message.ts b/fine-uploader/test/message.ts
deleted file mode 100644
index 726584bf7b..0000000000
--- a/fine-uploader/test/message.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-function messageTest() {
- const messageOptions: qq.MessagesOptions = {
- emptyError: "emptyError",
- maxHeightImageError: "maxHeightImageError",
- maxWidthImageError: "error occurred",
- minHeightImageError: "error occurred",
- minWidthImageError: "error occurred",
- minSizeError: "error occurred",
- noFilesError: "error occurred",
- onLeave: "error occurred",
- retryFailTooManyItemsError: "error occurred",
- typeError: "error occurred",
- unsupportedBrowserIos8Safari: "error occurred"
- };
-
- const config: qq.BasicOptions = {
- messages: messageOptions
- };
-
- const uploader = new qq.FineUploaderBasic(config);
-}
diff --git a/fine-uploader/test/method.ts b/fine-uploader/test/method.ts
deleted file mode 100644
index 1adb13db81..0000000000
--- a/fine-uploader/test/method.ts
+++ /dev/null
@@ -1,140 +0,0 @@
-class TestMethods {
- constructor(private uploader: qq.FineUploaderBasic) {
- }
-
- testAddFiles() {
- interface ParamType {
- field: string;
- }
-
- const params: ParamType = {
- field: 'hiiiii'
- };
-
- this.uploader.addFiles(
- new FileList(),
- params,
- "/my/happy/endpoint"
- );
- }
-
- testAddInitialFiles() {
- interface InitialFiles {
- myField: number;
- }
-
- const initialFiles: InitialFiles[] = [{
- myField: 1324
- }];
-
- this.uploader.addInitialFiles(initialFiles);
- }
-
- testDrawThumbnail() {
- const promise: Promise = this.uploader.drawThumbnail(
- 1234,
- new HTMLElement(),
- 1234565,
- false,
- (resizeInfo) => {
- return new Promise(() => {
- return new Blob();
- });
- }
- );
- }
-
- testGetUploads() {
- interface ResponseType {
- hi: string;
- }
- const response: ResponseType | ResponseType[] = this.uploader.getUploads({
- status: "proggresssssssesees"
- });
- }
-
- testSetCustomHeaders() {
- interface CustomHeader {
- customField: number;
- }
-
- this.uploader.setCustomHeaders({
- customField: 1234
- }, 1234);
- }
-
- testSetDeleteCustomHeaders() {
- interface CustomHeader {
- customField: number;
- }
-
- this.uploader.setDeleteFileCustomHeaders({
- customField: 1234
- }, 1234);
- }
-
- testSetDeleteFileParams() {
- interface CustomParams {
- paramField: boolean;
- }
- this.uploader.setDeleteFileParams({
- paramField: false
- }, 1234);
- }
-
- testSetParams() {
- interface CustomParams {
- customParams: number;
- }
-
- this.uploader.setParams({
- customParams: 1234
- }, 1234);
- }
-
- bulkTests() {
- this.uploader.cancel(1);
- this.uploader.cancelAll();
- this.uploader.clearStoredFiles();
- const shouldContinue: boolean = this.uploader.continueUpload(1234);
- this.uploader.deleteFile(1234);
- const elem: HTMLElement = this.uploader.getButton(1234);
- const fileOrBlob: File | Blob = this.uploader.getFile(1234);
- let num: number = this.uploader.getInProgress();
- let s: string = this.uploader.getName(1234);
- num = this.uploader.getParentId(1234);
- num = this.uploader.getRemainingAllowedItems();
- const resumables: qq.ResumableItem[] = this.uploader.getResumableFilesData();
- num = this.uploader.getSize(1234);
- s = this.uploader.getUuid(1234);
- this.uploader.log("why am i doing this?", "info");
- const b: boolean = this.uploader.pauseUpload(1234);
- this.uploader.reset();
- this.uploader.retry(1234);
- const blobPromise: Promise = this.uploader.scaleImage(1234, {
- maxSize: 20,
- orient: false,
- type: "png",
- quality: 10,
- includeExif: false,
- });
- this.uploader.setEndpoint("/my/path/is/my/own", 1234);
- this.uploader.setEndpoint("/my/path/is/my/own", new HTMLElement());
- this.uploader.setDeleteFileEndpoint("/some/path", 1234);
- this.uploader.setDeleteFileEndpoint("/some/path", new HTMLElement());
- this.uploader.setItemLimit(1234);
- this.uploader.setForm(new HTMLFormElement());
- this.uploader.setForm("myFormElement");
- this.uploader.setName(1234, "myCustomName");
- this.uploader.setUuid(1234, "12341234");
- this.uploader.uploadStoredFiles();
- }
-
- uiTests() {
- this.uploader.addExtraDropzone(new HTMLElement());
- let elem: HTMLElement = this.uploader.getDropTarget(1234);
- const n: number = this.uploader.getId(elem);
- elem = this.uploader.getItemByFileId(n);
- this.uploader.removeExtraDropzone(elem);
- }
-}
diff --git a/fine-uploader/test/paste.ts b/fine-uploader/test/paste.ts
deleted file mode 100644
index 9b3c7d9007..0000000000
--- a/fine-uploader/test/paste.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-function pasteTest() {
- const targetElement: HTMLElement = new HTMLElement();
-
- const pasteOptions: qq.PasteOptions = {
- defaultName: "pasted_image",
- targetElement
- };
-
- const config: qq.BasicOptions = {
- paste: pasteOptions
- };
-
- const uploader = new qq.FineUploaderBasic(config);
-}
diff --git a/fine-uploader/test/request.ts b/fine-uploader/test/request.ts
deleted file mode 100644
index 54b29c9be9..0000000000
--- a/fine-uploader/test/request.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-function requestTest() {
- interface CustomHeader {
- customHeader: string;
- }
-
- interface CustomParam {
- customParam: boolean;
- }
-
- const requestOptions: qq.RequestOptions = {
- customHeaders: {
- customHeader: "my custom header hehehehee"
- },
- endpoint: "/my/custom/endpoint",
- filenameParam: "newFilenameParam",
- forceMultipart: true,
- inputName: "filenameParamMapping",
- method: "POST",
- params: {
- customParam: false
- },
- paramsInBody: false,
- uuid: "asdf123456",
- totalFileSizeName: "totalFileSize"
- };
-
- const config: qq.BasicOptions = {
- request: requestOptions
- };
-
- const uploader = new qq.FineUploaderBasic(config);
-}
\ No newline at end of file
diff --git a/fine-uploader/test/resume.ts b/fine-uploader/test/resume.ts
deleted file mode 100644
index dc588d19f5..0000000000
--- a/fine-uploader/test/resume.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-function resumeTest() {
- const resumeOptions: qq.ResumeOptions = {
- recordsExpireIn: 10,
- enabled: true,
- paramNames: {
- resuming: "ew you"
- }
- };
-
- const config: qq.BasicOptions = {
- resume: resumeOptions
- };
-
- const uploader = new qq.FineUploaderBasic(config);
-}
diff --git a/fine-uploader/test/retry.ts b/fine-uploader/test/retry.ts
deleted file mode 100644
index 85c9f71af3..0000000000
--- a/fine-uploader/test/retry.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-function retryTest() {
-
- const retryOptions: qq.RetryOptions = {
- autoAttemptDelay: 1,
- enableAuto: true,
- maxAutoAttempts: 32,
- preventRetryResponseProperty: "preventRetry"
- };
-
- const config: qq.BasicOptions = {
- retry: retryOptions
- };
-
- const uploader = new qq.FineUploaderBasic(config);
-}
\ No newline at end of file
diff --git a/fine-uploader/test/scaling.ts b/fine-uploader/test/scaling.ts
deleted file mode 100644
index 5e8ff3dc51..0000000000
--- a/fine-uploader/test/scaling.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-function scalingTest() {
- const scalingOptions: qq.ScalingOptions = {
- customResizer: (blob, height, image, sourceCanvas, targetCanvas, width) => {
- const promise = new Promise(() => {
- return blob;
- });
- return promise;
- },
- defaultQuality: 10,
- defaultType: "JPEG",
- failureText: "you have failed me for the last time",
- includeExif: true,
- orient: false,
- sendOriginal: true,
- sizes: [
- {
- maxSize: 10,
- name: "i am added to name",
- type: "mime type"
- }
- ]
- };
-
- const config: qq.BasicOptions = {
- scaling: scalingOptions
- };
-
- const uploader = new qq.FineUploaderBasic(config);
-}
diff --git a/fine-uploader/test/session.ts b/fine-uploader/test/session.ts
deleted file mode 100644
index 7d8d6069b9..0000000000
--- a/fine-uploader/test/session.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-function sessionTest() {
- interface CustomHeader {
- customHeader: string;
- }
-
- interface CustomParam {
- customParam: boolean;
- }
-
- const sessionOptions: qq.SessionOptions = {
- customHeaders: {
- customHeader: "customHeader"
- },
- endpoint: "/mysession/endpoint",
- params: {
- customParam: false
- },
- refreshOnReset: false
- };
-
- const config: qq.BasicOptions = {
- session: sessionOptions
- };
-
- const uploader = new qq.FineUploaderBasic(config);
-}
diff --git a/fine-uploader/test/text.ts b/fine-uploader/test/text.ts
deleted file mode 100644
index e83ddb4bcf..0000000000
--- a/fine-uploader/test/text.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-function textTest() {
- const textOptions: qq.TextOptions = {
- defaultResponseError: "you have failed me for the last time",
- fileInputTitle: "file input title",
- sizeSymbols: ['kb']
- };
-
- const config: qq.BasicOptions = {
- text: textOptions
- };
-
- const uploader = new qq.FineUploaderBasic(config);
-}
diff --git a/fine-uploader/test/validation.ts b/fine-uploader/test/validation.ts
deleted file mode 100644
index 60324157f9..0000000000
--- a/fine-uploader/test/validation.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-function validationTest() {
-
- const validationOptions: qq.ValidationOptions = {
- acceptFiles: [new MimeType()],
- allowedExtensions: ['csv, xls'],
- itemLimit: 5,
- sizeLimit: 10000000,
- stopOnFirstInvalidFile: false,
- image: {
- maxHeight: 10,
- maxWidth: 10,
- minHeight: 1,
- minWidth: 1
- }
- };
-
- const config: qq.BasicOptions = {
- validation: validationOptions
- };
-
- const uploader = new qq.FineUploaderBasic(config);
-}
diff --git a/fine-uploader/test/workarounds.ts b/fine-uploader/test/workarounds.ts
deleted file mode 100644
index 42fa5ceee7..0000000000
--- a/fine-uploader/test/workarounds.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-function workaroundsTest() {
- const workaroundOptions: qq.WorkaroundOptions = {
- iosEmptyVideos: false,
- ios8BrowserCrash: false,
- ios8SafariUploads: false
- };
-
- const config: qq.BasicOptions = {
- workarounds: workaroundOptions
- };
-
- const uploader = new qq.FineUploaderBasic(config);
-}
diff --git a/fine-uploader/tsconfig.json b/fine-uploader/tsconfig.json
deleted file mode 100644
index c02e485091..0000000000
--- a/fine-uploader/tsconfig.json
+++ /dev/null
@@ -1,42 +0,0 @@
-{
- "files": [
- "index.d.ts",
- "test/blobs.ts",
- "test/camera.ts",
- "test/chunking.ts",
- "test/core.ts",
- "test/cors.ts",
- "test/deleteFile.ts",
- "test/extraButtons.ts",
- "test/form.ts",
- "test/message.ts",
- "test/paste.ts",
- "test/resume.ts",
- "test/retry.ts",
- "test/request.ts",
- "test/scaling.ts",
- "test/session.ts",
- "test/text.ts",
- "test/validation.ts",
- "test/workarounds.ts",
- "test/method.ts",
- "test/callbacks.ts"
- ],
- "compilerOptions": {
- "module": "commonjs",
- "lib": [
- "es6",
- "dom"
- ],
- "noImplicitAny": true,
- "noImplicitThis": true,
- "strictNullChecks": true,
- "baseUrl": "../",
- "typeRoots": [
- "../"
- ],
- "types": [],
- "noEmit": true,
- "forceConsistentCasingInFileNames": true
- }
-}
\ No newline at end of file
diff --git a/fine-uploader/tslint.json b/fine-uploader/tslint.json
deleted file mode 100644
index 377cc837d4..0000000000
--- a/fine-uploader/tslint.json
+++ /dev/null
@@ -1 +0,0 @@
-{ "extends": "../tslint.json" }
diff --git a/notNeededPackages.json b/notNeededPackages.json
index c8b59ea072..fce0ef50f0 100644
--- a/notNeededPackages.json
+++ b/notNeededPackages.json
@@ -323,6 +323,12 @@
"typingsPackageName": "antd",
"sourceRepoURL": "https://github.com/ant-design/ant-design",
"asOfVersion": "1.0.0"
+ },
+ {
+ "libraryName": "FineUploader",
+ "typingsPackageName": "fine-uploader",
+ "sourceRepoURL": "http://fineuploader.com/",
+ "asOfVersion": "5.14.0"
}
]
}
\ No newline at end of file