@progress/kendo-angular-upload 24.2.2 → 25.0.0-develop.2
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/fesm2022/progress-kendo-angular-upload.mjs +86 -86
- package/index.d.ts +1994 -29
- package/package-metadata.mjs +2 -2
- package/package.json +13 -13
- package/schematics/ngAdd/index.js +3 -3
- package/common/action-buttons-layout.d.ts +0 -8
- package/common/base.d.ts +0 -172
- package/common/fileselect-settings.d.ts +0 -50
- package/common/util.d.ts +0 -87
- package/common/validation-util.d.ts +0 -20
- package/directives.d.ts +0 -70
- package/dropzone-base.d.ts +0 -30
- package/dropzone-external.directive.d.ts +0 -48
- package/dropzone-internal.directive.d.ts +0 -35
- package/dropzone.component.d.ts +0 -64
- package/dropzone.service.d.ts +0 -18
- package/events/cancel-event.d.ts +0 -34
- package/events/clear-event.d.ts +0 -29
- package/events/error-event.d.ts +0 -46
- package/events/pause-event.d.ts +0 -37
- package/events/preventable-event.d.ts +0 -21
- package/events/remove-event.d.ts +0 -47
- package/events/resume-event.d.ts +0 -37
- package/events/select-event.d.ts +0 -35
- package/events/success-event.d.ts +0 -46
- package/events/upload-event.d.ts +0 -47
- package/events/upload-progress-event.d.ts +0 -39
- package/events.d.ts +0 -14
- package/file-select.directive.d.ts +0 -39
- package/fileselect.component.d.ts +0 -111
- package/fileselect.module.d.ts +0 -19
- package/localization/custom-messages.component.d.ts +0 -44
- package/localization/localized-messages.directive.d.ts +0 -16
- package/localization/messages.d.ts +0 -139
- package/navigation.service.d.ts +0 -43
- package/package-metadata.d.ts +0 -9
- package/rendering/file-list-item-action-button.component.d.ts +0 -40
- package/rendering/file-list-item-base.d.ts +0 -31
- package/rendering/file-list-item.d.ts +0 -35
- package/rendering/file-list-multiple-items.component.d.ts +0 -32
- package/rendering/file-list-single-item.component.d.ts +0 -31
- package/rendering/file-list.component.d.ts +0 -41
- package/rendering/upload-action-buttons.component.d.ts +0 -37
- package/rendering/upload-status-total.component.d.ts +0 -30
- package/templates/file-info-template.directive.d.ts +0 -30
- package/templates/file-template.directive.d.ts +0 -30
- package/types/async-settings.d.ts +0 -24
- package/types/chunk-info.d.ts +0 -25
- package/types/chunk-map.d.ts +0 -16
- package/types/chunk-metadata.d.ts +0 -34
- package/types/chunk-settings.d.ts +0 -33
- package/types/direction.d.ts +0 -8
- package/types/file-groups.d.ts +0 -45
- package/types/file-info.d.ts +0 -45
- package/types/file-map.d.ts +0 -26
- package/types/file-restrictions.d.ts +0 -25
- package/types/file-state.d.ts +0 -33
- package/types/operation-type.d.ts +0 -8
- package/types.d.ts +0 -11
- package/upload.component.d.ts +0 -298
- package/upload.module.d.ts +0 -21
- package/upload.service.d.ts +0 -85
- package/uploads.module.d.ts +0 -44
package/index.d.ts
CHANGED
|
@@ -2,32 +2,1997 @@
|
|
|
2
2
|
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
5
|
+
import { HttpHeaders, HttpResponse, HttpClient } from '@angular/common/http';
|
|
6
|
+
import * as i0 from '@angular/core';
|
|
7
|
+
import { EventEmitter, NgZone, TemplateRef, ChangeDetectorRef, Injector, ElementRef, OnInit, OnDestroy, Renderer2, DoCheck, QueryList } from '@angular/core';
|
|
8
|
+
import { Subscription } from 'rxjs';
|
|
9
|
+
import { FormControl, ControlValueAccessor } from '@angular/forms';
|
|
10
|
+
import { LocalizationService, ComponentMessages } from '@progress/kendo-angular-l10n';
|
|
11
|
+
import { SVGIcon } from '@progress/kendo-svg-icons';
|
|
12
|
+
import { SVGIcon as SVGIcon$1 } from '@progress/kendo-angular-icons';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @hidden
|
|
16
|
+
*/
|
|
17
|
+
interface AsyncSettings {
|
|
18
|
+
autoUpload?: boolean;
|
|
19
|
+
batch?: boolean;
|
|
20
|
+
chunk?: boolean;
|
|
21
|
+
concurrent?: boolean;
|
|
22
|
+
removeField?: string;
|
|
23
|
+
removeHeaders?: HttpHeaders;
|
|
24
|
+
removeMethod?: string;
|
|
25
|
+
removeUrl?: string;
|
|
26
|
+
responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
|
|
27
|
+
saveField?: string;
|
|
28
|
+
saveHeaders?: HttpHeaders;
|
|
29
|
+
saveMethod?: string;
|
|
30
|
+
saveUrl: string;
|
|
31
|
+
withCredentials?: boolean;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* The settings for the Upload chunk functionality.
|
|
36
|
+
*/
|
|
37
|
+
interface ChunkSettings {
|
|
38
|
+
/**
|
|
39
|
+
* The size of the chunks in bytes.
|
|
40
|
+
*
|
|
41
|
+
* @default 1048576
|
|
42
|
+
*/
|
|
43
|
+
size?: number;
|
|
44
|
+
/**
|
|
45
|
+
* The number of milliseconds to wait before retrying a failed chunk upload.
|
|
46
|
+
*
|
|
47
|
+
* @default 100
|
|
48
|
+
*/
|
|
49
|
+
autoRetryAfter?: number;
|
|
50
|
+
/**
|
|
51
|
+
* The number of attempts to retry uploading a failed chunk.
|
|
52
|
+
*
|
|
53
|
+
* @default 1
|
|
54
|
+
*/
|
|
55
|
+
maxAutoRetries?: number;
|
|
56
|
+
/**
|
|
57
|
+
* Specifies whether the file upload process can be paused and later resumed.
|
|
58
|
+
*
|
|
59
|
+
* @default true
|
|
60
|
+
*/
|
|
61
|
+
resumable?: boolean;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Contains information related to the uploaded file.
|
|
66
|
+
* Use this metadata to process file chunks and merge them into a file on the back-end.
|
|
67
|
+
*/
|
|
68
|
+
interface ChunkMetadata {
|
|
69
|
+
/**
|
|
70
|
+
* The MIME type of the file.
|
|
71
|
+
*/
|
|
72
|
+
contentType: string;
|
|
73
|
+
/**
|
|
74
|
+
* The file name.
|
|
75
|
+
*/
|
|
76
|
+
fileName: string;
|
|
77
|
+
/**
|
|
78
|
+
* The file size in bytes.
|
|
79
|
+
*/
|
|
80
|
+
fileSize: number;
|
|
81
|
+
/**
|
|
82
|
+
* The unique identifier of the file.
|
|
83
|
+
*/
|
|
84
|
+
fileUid: string;
|
|
85
|
+
/**
|
|
86
|
+
* The index of the currently uploaded chunk.
|
|
87
|
+
*/
|
|
88
|
+
chunkIndex: number;
|
|
89
|
+
/**
|
|
90
|
+
* The total number of chunks that the file is split into.
|
|
91
|
+
*/
|
|
92
|
+
totalChunks: number;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Lists the possible states of a file.
|
|
97
|
+
*/
|
|
98
|
+
declare enum FileState {
|
|
99
|
+
/**
|
|
100
|
+
* The file upload process failed.
|
|
101
|
+
*/
|
|
102
|
+
Failed = 0,
|
|
103
|
+
/**
|
|
104
|
+
* An initially selected file without a set state.
|
|
105
|
+
*/
|
|
106
|
+
Initial = 1,
|
|
107
|
+
/**
|
|
108
|
+
* The file is selected.
|
|
109
|
+
*/
|
|
110
|
+
Selected = 2,
|
|
111
|
+
/**
|
|
112
|
+
* The file uploaded successfully.
|
|
113
|
+
*/
|
|
114
|
+
Uploaded = 3,
|
|
115
|
+
/**
|
|
116
|
+
* The file is uploading.
|
|
117
|
+
*/
|
|
118
|
+
Uploading = 4,
|
|
119
|
+
/**
|
|
120
|
+
* The file upload process is paused.
|
|
121
|
+
*/
|
|
122
|
+
Paused = 5
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Contains information which is related to the selected file.
|
|
127
|
+
*/
|
|
128
|
+
interface FileInfo {
|
|
129
|
+
/**
|
|
130
|
+
* The unique identifier of the file or the batch of files.
|
|
131
|
+
*/
|
|
132
|
+
uid?: string;
|
|
133
|
+
/**
|
|
134
|
+
* The file name.
|
|
135
|
+
*/
|
|
136
|
+
name: string;
|
|
137
|
+
/**
|
|
138
|
+
* The file extension including the leading dot—for example, `.jpg`, `.png`, or other.
|
|
139
|
+
*/
|
|
140
|
+
extension?: string;
|
|
141
|
+
/**
|
|
142
|
+
* The file size in bytes.
|
|
143
|
+
*/
|
|
144
|
+
size?: number;
|
|
145
|
+
/**
|
|
146
|
+
* An in-memory representation of the file.
|
|
147
|
+
*/
|
|
148
|
+
rawFile?: File;
|
|
149
|
+
/**
|
|
150
|
+
* A list containing the validation errors (if any).
|
|
151
|
+
*/
|
|
152
|
+
validationErrors?: Array<string>;
|
|
153
|
+
/**
|
|
154
|
+
* The current state of the file—`Failed`, `Selected`, `Uploaded`, or `Uploading`.
|
|
155
|
+
* `Initial` is a special value for `FileState`.
|
|
156
|
+
* It is automatically applied to initial files without you having to explicitly set their state.
|
|
157
|
+
*/
|
|
158
|
+
state?: FileState;
|
|
159
|
+
/**
|
|
160
|
+
* The observable subscription of the upload request.
|
|
161
|
+
*/
|
|
162
|
+
httpSubscription?: Subscription;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Configures the restrictions for the files that can be uploaded.
|
|
167
|
+
*/
|
|
168
|
+
interface FileRestrictions {
|
|
169
|
+
/**
|
|
170
|
+
* The list of allowed file extensions
|
|
171
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/uploads/upload/restrictions#file-extension)).
|
|
172
|
+
* Accepts entries of both `.type` (for example, `.docx`, `.png`, `.svg`, `.xls`) and `type` (for example, `docx`, `png`, `svg`, `xls`) values.
|
|
173
|
+
*/
|
|
174
|
+
allowedExtensions?: Array<string>;
|
|
175
|
+
/**
|
|
176
|
+
* The maximum file size in bytes
|
|
177
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/uploads/upload/restrictions#maximum-file-size)).
|
|
178
|
+
*/
|
|
179
|
+
maxFileSize?: number;
|
|
180
|
+
/**
|
|
181
|
+
* The minimum file size in bytes
|
|
182
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/uploads/upload/restrictions#minimum-file-size)).
|
|
183
|
+
*/
|
|
184
|
+
minFileSize?: number;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* The operation (`upload` or `remove`) for which the `success` or `error` event is raised.
|
|
189
|
+
*/
|
|
190
|
+
type OperationType = "upload" | "remove";
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* @hidden
|
|
194
|
+
*/
|
|
195
|
+
declare class FileMap {
|
|
196
|
+
private _files;
|
|
197
|
+
constructor();
|
|
198
|
+
add(file: FileInfo): void;
|
|
199
|
+
remove(uid: string): void;
|
|
200
|
+
clear(): void;
|
|
201
|
+
has(uid: string): boolean;
|
|
202
|
+
get(uid: string): Array<FileInfo>;
|
|
203
|
+
setFilesState(files: Array<FileInfo>, state: FileState): void;
|
|
204
|
+
setFilesStateByUid(uid: string, state: FileState): void;
|
|
205
|
+
get count(): number;
|
|
206
|
+
get files(): Array<Array<FileInfo>>;
|
|
207
|
+
get filesFlat(): Array<FileInfo>;
|
|
208
|
+
get filesToUpload(): Array<Array<FileInfo>>;
|
|
209
|
+
get firstFileToUpload(): Array<FileInfo>;
|
|
210
|
+
getFilesWithState(state: FileState): Array<FileInfo>;
|
|
211
|
+
hasFileWithState(fileStates: Array<FileState>): boolean;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Arguments for the `cancel` event. The `cancel` event fires when
|
|
216
|
+
* you cancel the upload of a file or batch of files.
|
|
217
|
+
*
|
|
218
|
+
* ```typescript
|
|
219
|
+
* @Component({
|
|
220
|
+
* template: `
|
|
221
|
+
* <kendo-upload (cancel)="cancelEventHandler($event)"></kendo-upload>
|
|
222
|
+
* `
|
|
223
|
+
* })
|
|
224
|
+
* export class UploadComponent {
|
|
225
|
+
* public cancelEventHandler(e: CancelEvent) {
|
|
226
|
+
* console.log('Canceling file upload', e.files);
|
|
227
|
+
* }
|
|
228
|
+
* }
|
|
229
|
+
* ```
|
|
230
|
+
*/
|
|
231
|
+
declare class CancelEvent {
|
|
232
|
+
/**
|
|
233
|
+
* The files that you canceled during the upload process.
|
|
234
|
+
*/
|
|
235
|
+
files: Array<FileInfo>;
|
|
236
|
+
/**
|
|
237
|
+
* @hidden
|
|
238
|
+
* Constructs the event arguments for the `cancel` event.
|
|
239
|
+
* @param files - The list of the files that were going to be uploaded.
|
|
240
|
+
*/
|
|
241
|
+
constructor(files: Array<FileInfo>);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* @hidden
|
|
246
|
+
*/
|
|
247
|
+
declare abstract class PreventableEvent {
|
|
248
|
+
private prevented;
|
|
249
|
+
/**
|
|
250
|
+
* Prevents the default action for a specified event.
|
|
251
|
+
* In this way, the source component suppresses the built-in behavior that follows the event.
|
|
252
|
+
*/
|
|
253
|
+
preventDefault(): void;
|
|
254
|
+
/**
|
|
255
|
+
* If the event is prevented by any of its subscribers, returns `true`.
|
|
256
|
+
*
|
|
257
|
+
* @returns `true` if the default action was prevented. Otherwise, returns `false`.
|
|
258
|
+
*/
|
|
259
|
+
isDefaultPrevented(): boolean;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* Arguments for the `clear` event. The `clear` event fires when
|
|
264
|
+
* the **Clear** button is clicked and selected files are about to be cleared.
|
|
265
|
+
*
|
|
266
|
+
* ```typescript
|
|
267
|
+
* @Component({
|
|
268
|
+
* template: `
|
|
269
|
+
* <kendo-upload (clear)="clearEventHandler($event)"></kendo-upload>
|
|
270
|
+
* `
|
|
271
|
+
* })
|
|
272
|
+
* export class UploadComponent {
|
|
273
|
+
* public clearEventHandler(e: ClearEvent) {
|
|
274
|
+
* console.log('Clearing the file upload');
|
|
275
|
+
* }
|
|
276
|
+
* }
|
|
277
|
+
* ```
|
|
278
|
+
*/
|
|
279
|
+
declare class ClearEvent extends PreventableEvent {
|
|
280
|
+
/**
|
|
281
|
+
* @hidden
|
|
282
|
+
* Constructs the event arguments for the `clear` event.
|
|
283
|
+
*/
|
|
284
|
+
constructor();
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Arguments for the `error` event. The `error` event fires when
|
|
289
|
+
* an `upload` or `remove` operation fails.
|
|
290
|
+
*
|
|
291
|
+
* ```typescript
|
|
292
|
+
* @Component({
|
|
293
|
+
* template: `
|
|
294
|
+
* <kendo-upload (error)="errorEventHandler($event)"></kendo-upload>
|
|
295
|
+
* `
|
|
296
|
+
* })
|
|
297
|
+
* export class UploadComponent {
|
|
298
|
+
* public errorEventHandler(e: ErrorEvent) {
|
|
299
|
+
* console.log('An error occurred');
|
|
300
|
+
* }
|
|
301
|
+
* }
|
|
302
|
+
* ```
|
|
303
|
+
*/
|
|
304
|
+
declare class ErrorEvent {
|
|
305
|
+
/**
|
|
306
|
+
* The array of files that failed to be uploaded or removed.
|
|
307
|
+
*/
|
|
308
|
+
files: Array<FileInfo>;
|
|
309
|
+
/**
|
|
310
|
+
* The operation type that failed (`upload` or `remove`).
|
|
311
|
+
*/
|
|
312
|
+
operation: OperationType;
|
|
313
|
+
/**
|
|
314
|
+
* The HTTP response returned by the server containing error details.
|
|
315
|
+
*/
|
|
316
|
+
response: HttpResponse<any>;
|
|
317
|
+
/**
|
|
318
|
+
* @hidden
|
|
319
|
+
* Constructs the event arguments for the `error` event.
|
|
320
|
+
*
|
|
321
|
+
* @param files - The list of the files that failed to be uploaded or removed.
|
|
322
|
+
* @param operation - The operation type (`upload` or `remove`).
|
|
323
|
+
* @param response - The response object returned by the server.
|
|
324
|
+
*/
|
|
325
|
+
constructor(files: Array<FileInfo>, operation: OperationType, response: HttpResponse<any>);
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* Arguments for the `pause` event. The `pause` event fires when
|
|
330
|
+
* you pause a file that is currently uploading.
|
|
331
|
+
*
|
|
332
|
+
* ```typescript
|
|
333
|
+
* @Component({
|
|
334
|
+
* template: `
|
|
335
|
+
* <kendo-upload
|
|
336
|
+
* [chunkable]="true"
|
|
337
|
+
* (pause)="pauseEventHandler($event)">
|
|
338
|
+
* </kendo-upload>
|
|
339
|
+
* `
|
|
340
|
+
* })
|
|
341
|
+
* export class UploadComponent {
|
|
342
|
+
* public pauseEventHandler(ev: PauseEvent) {
|
|
343
|
+
* console.log('File paused');
|
|
344
|
+
* }
|
|
345
|
+
* }
|
|
346
|
+
* ```
|
|
347
|
+
*/
|
|
348
|
+
declare class PauseEvent {
|
|
349
|
+
/**
|
|
350
|
+
* The file that you paused during the upload process.
|
|
351
|
+
*/
|
|
352
|
+
file: FileInfo;
|
|
353
|
+
/**
|
|
354
|
+
* @hidden
|
|
355
|
+
* Constructs the event arguments for the `pause` event.
|
|
356
|
+
* @param file - The file that is going to be paused.
|
|
357
|
+
*/
|
|
358
|
+
constructor(file: FileInfo);
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* Arguments for the `remove` event. The `remove` event fires when you are about to remove an uploaded
|
|
363
|
+
* or selected file. You can cancel this event to prevent removal.
|
|
364
|
+
*
|
|
365
|
+
* ```typescript
|
|
366
|
+
* @Component({
|
|
367
|
+
* template: `
|
|
368
|
+
* <kendo-upload (remove)="removeEventHandler($event)"></kendo-upload>
|
|
369
|
+
* `
|
|
370
|
+
* })
|
|
371
|
+
* export class UploadComponent {
|
|
372
|
+
* public removeEventHandler(e: RemoveEvent) {
|
|
373
|
+
* console.log('Removing a file');
|
|
374
|
+
* }
|
|
375
|
+
* }
|
|
376
|
+
* ```
|
|
377
|
+
*/
|
|
378
|
+
declare class RemoveEvent extends PreventableEvent {
|
|
379
|
+
/**
|
|
380
|
+
* An optional object that you send to the `remove` handler as key/value pairs.
|
|
381
|
+
*
|
|
382
|
+
*/
|
|
383
|
+
data: object;
|
|
384
|
+
/**
|
|
385
|
+
* The files that you will remove from the server.
|
|
386
|
+
*/
|
|
387
|
+
files: Array<FileInfo>;
|
|
388
|
+
/**
|
|
389
|
+
* The headers of the request.
|
|
390
|
+
* You can use this to add custom headers to the remove request.
|
|
391
|
+
*/
|
|
392
|
+
headers: HttpHeaders;
|
|
393
|
+
/**
|
|
394
|
+
* @hidden
|
|
395
|
+
* Constructs the event arguments for the `remove` event.
|
|
396
|
+
* @param files - The list of the files that will be removed.
|
|
397
|
+
* @param headers - The headers of the request.
|
|
398
|
+
*/
|
|
399
|
+
constructor(files: Array<FileInfo>, headers: HttpHeaders);
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* Arguments for the `resume` event. The `resume` event fires when
|
|
404
|
+
* you resume a previously paused file upload.
|
|
405
|
+
*
|
|
406
|
+
* ```typescript
|
|
407
|
+
* @Component({
|
|
408
|
+
* template: `
|
|
409
|
+
* <kendo-upload
|
|
410
|
+
* [chunkable]="true"
|
|
411
|
+
* (resume)="resumeEventHandler($event)">
|
|
412
|
+
* </kendo-upload>
|
|
413
|
+
* `
|
|
414
|
+
* })
|
|
415
|
+
* export class UploadComponent {
|
|
416
|
+
* public resumeEventHandler(ev: ResumeEvent) {
|
|
417
|
+
* console.log('File resumed');
|
|
418
|
+
* }
|
|
419
|
+
* }
|
|
420
|
+
* ```
|
|
421
|
+
*/
|
|
422
|
+
declare class ResumeEvent {
|
|
423
|
+
/**
|
|
424
|
+
* The file that you resumed during the upload process.
|
|
425
|
+
*/
|
|
426
|
+
file: FileInfo;
|
|
427
|
+
/**
|
|
428
|
+
* @hidden
|
|
429
|
+
* Constructs the event arguments for the `resume` event.
|
|
430
|
+
* @param file - The file that is going to be resumed.
|
|
431
|
+
*/
|
|
432
|
+
constructor(file: FileInfo);
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
/**
|
|
436
|
+
* Arguments for the `select` event. The `select` event fires when
|
|
437
|
+
* a file or multiple files are selected for upload. The event can be canceled to prevent selection.
|
|
438
|
+
*
|
|
439
|
+
* ```typescript
|
|
440
|
+
* @Component({
|
|
441
|
+
* template: `
|
|
442
|
+
* <kendo-upload (select)="selectEventHandler($event)"></kendo-upload>
|
|
443
|
+
* `
|
|
444
|
+
* })
|
|
445
|
+
* export class UploadComponent {
|
|
446
|
+
* public selectEventHandler(e: SelectEvent) {
|
|
447
|
+
* console.log('File selected');
|
|
448
|
+
* }
|
|
449
|
+
* }
|
|
450
|
+
* ```
|
|
451
|
+
*/
|
|
452
|
+
declare class SelectEvent extends PreventableEvent {
|
|
453
|
+
/**
|
|
454
|
+
* The files that are selected for upload.
|
|
455
|
+
*/
|
|
456
|
+
files: Array<FileInfo>;
|
|
457
|
+
/**
|
|
458
|
+
* @hidden
|
|
459
|
+
* Constructs the event arguments for the `select` event.
|
|
460
|
+
* @param files - The list of the selected files.
|
|
461
|
+
*/
|
|
462
|
+
constructor(files: Array<FileInfo>);
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* Arguments for the `success` event. The `success` event fires when
|
|
467
|
+
* you successfully upload or remove the selected files.
|
|
468
|
+
*
|
|
469
|
+
* ```typescript
|
|
470
|
+
* @Component({
|
|
471
|
+
* template: `
|
|
472
|
+
* <kendo-upload (success)="successEventHandler($event)"></kendo-upload>
|
|
473
|
+
* `
|
|
474
|
+
* })
|
|
475
|
+
* export class UploadComponent {
|
|
476
|
+
* public successEventHandler(e: SuccessEvent) {
|
|
477
|
+
* console.log('The ' + e.operation + ' was successful!');
|
|
478
|
+
* }
|
|
479
|
+
* }
|
|
480
|
+
* ```
|
|
481
|
+
*/
|
|
482
|
+
declare class SuccessEvent extends PreventableEvent {
|
|
483
|
+
/**
|
|
484
|
+
* The files that you successfully uploaded or removed.
|
|
485
|
+
*/
|
|
486
|
+
files: Array<FileInfo>;
|
|
487
|
+
/**
|
|
488
|
+
* The operation type that succeeded (`upload` or `remove`).
|
|
489
|
+
*/
|
|
490
|
+
operation: OperationType;
|
|
491
|
+
/**
|
|
492
|
+
* The HTTP response that the server returns to confirm success.
|
|
493
|
+
*/
|
|
494
|
+
response: HttpResponse<any>;
|
|
495
|
+
/**
|
|
496
|
+
* @hidden
|
|
497
|
+
* Constructs the event arguments for the `success` event.
|
|
498
|
+
* @param files - The list of the files that were uploaded or removed.
|
|
499
|
+
* @param operation - The operation type (`upload` or `remove`).
|
|
500
|
+
* @param response - The response object returned by the server.
|
|
501
|
+
*/
|
|
502
|
+
constructor(files: Array<FileInfo>, operation: OperationType, response: HttpResponse<any>);
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
/**
|
|
506
|
+
* Arguments for the `upload` event. The `upload` event fires when you are about
|
|
507
|
+
* to upload one or more files. You can cancel this event to prevent upload and add headers to the request.
|
|
508
|
+
*
|
|
509
|
+
* ```typescript
|
|
510
|
+
* @Component({
|
|
511
|
+
* template: `
|
|
512
|
+
* <kendo-upload (upload)="uploadEventHandler($event)"></kendo-upload>
|
|
513
|
+
* `
|
|
514
|
+
* })
|
|
515
|
+
* export class UploadComponent {
|
|
516
|
+
* public uploadEventHandler(e: UploadEvent) {
|
|
517
|
+
* e.headers = e.headers.append('X-Foo', 'Bar');
|
|
518
|
+
* }
|
|
519
|
+
* }
|
|
520
|
+
* ```
|
|
521
|
+
*/
|
|
522
|
+
declare class UploadEvent extends PreventableEvent {
|
|
523
|
+
/**
|
|
524
|
+
* The optional object that you send to the `upload` handler as key/value pairs.
|
|
525
|
+
*
|
|
526
|
+
*/
|
|
527
|
+
data: object;
|
|
528
|
+
/**
|
|
529
|
+
* The files that you will upload to the server.
|
|
530
|
+
*/
|
|
531
|
+
files: Array<FileInfo>;
|
|
532
|
+
/**
|
|
533
|
+
* The headers of the request.
|
|
534
|
+
* You can use this to add custom headers to the upload request.
|
|
535
|
+
*/
|
|
536
|
+
headers: HttpHeaders;
|
|
537
|
+
/**
|
|
538
|
+
* @hidden
|
|
539
|
+
* Constructs the event arguments for the `upload` event.
|
|
540
|
+
* @param files - The list of the files that will be uploaded.
|
|
541
|
+
* @param headers - The headers of the request.
|
|
542
|
+
*/
|
|
543
|
+
constructor(files: Array<FileInfo>, headers: HttpHeaders);
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
/**
|
|
547
|
+
* Arguments for the `uploadprogress` event. The `uploadprogress` event
|
|
548
|
+
* fires when you upload files.
|
|
549
|
+
*
|
|
550
|
+
* ```typescript
|
|
551
|
+
* @Component({
|
|
552
|
+
* template: `
|
|
553
|
+
* <kendo-upload (uploadProgress)="uploadProgressEventHandler($event)"></kendo-upload>
|
|
554
|
+
* `
|
|
555
|
+
* })
|
|
556
|
+
* export class UploadComponent {
|
|
557
|
+
* public uploadProgressEventHandler(e: UploadProgressEvent) {
|
|
558
|
+
* console.log(e.files[0].name + ' is ' + e.percentComplete + ' uploaded');
|
|
559
|
+
* }
|
|
560
|
+
* }
|
|
561
|
+
* ```
|
|
562
|
+
*/
|
|
563
|
+
declare class UploadProgressEvent {
|
|
564
|
+
/**
|
|
565
|
+
* The files that you are currently uploading.
|
|
566
|
+
*/
|
|
567
|
+
files: Array<FileInfo>;
|
|
568
|
+
/**
|
|
569
|
+
* The upload progress as a percentage from 0 to 100.
|
|
570
|
+
*/
|
|
571
|
+
percentComplete: number;
|
|
572
|
+
/**
|
|
573
|
+
* @hidden
|
|
574
|
+
* Constructs the event arguments for the `uploadprogress` event.
|
|
575
|
+
* @param files - The list of files that are being uploaded.
|
|
576
|
+
* @param percentComplete - The portion that has been uploaded.
|
|
577
|
+
*/
|
|
578
|
+
constructor(files: Array<FileInfo>, percentComplete: number);
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
/**
|
|
582
|
+
* @hidden
|
|
583
|
+
*/
|
|
584
|
+
type ComponentType = 'FileSelect' | 'Upload';
|
|
585
|
+
/**
|
|
586
|
+
* @hidden
|
|
587
|
+
*/
|
|
588
|
+
declare class UploadService {
|
|
589
|
+
private http;
|
|
590
|
+
cancelEvent: EventEmitter<CancelEvent>;
|
|
591
|
+
clearEvent: EventEmitter<ClearEvent>;
|
|
592
|
+
completeEvent: EventEmitter<any>;
|
|
593
|
+
errorEvent: EventEmitter<ErrorEvent>;
|
|
594
|
+
pauseEvent: EventEmitter<PauseEvent>;
|
|
595
|
+
removeEvent: EventEmitter<RemoveEvent>;
|
|
596
|
+
resumeEvent: EventEmitter<ResumeEvent>;
|
|
597
|
+
selectEvent: EventEmitter<SelectEvent>;
|
|
598
|
+
successEvent: EventEmitter<SuccessEvent>;
|
|
599
|
+
uploadEvent: EventEmitter<UploadEvent>;
|
|
600
|
+
uploadProgressEvent: EventEmitter<UploadProgressEvent>;
|
|
601
|
+
/**
|
|
602
|
+
* Required for the `ControlValueAccessor` integration
|
|
603
|
+
*/
|
|
604
|
+
changeEvent: EventEmitter<Array<FileInfo>>;
|
|
605
|
+
/**
|
|
606
|
+
* Default async settings
|
|
607
|
+
*/
|
|
608
|
+
async: AsyncSettings;
|
|
609
|
+
/**
|
|
610
|
+
* Default chunk settings
|
|
611
|
+
*/
|
|
612
|
+
chunk: ChunkSettings;
|
|
613
|
+
component: ComponentType;
|
|
614
|
+
private chunkMap;
|
|
615
|
+
private fileList;
|
|
616
|
+
constructor(http: HttpClient);
|
|
617
|
+
get files(): FileMap;
|
|
618
|
+
setChunkSettings(settings: ChunkSettings | boolean): void;
|
|
619
|
+
onChange(): void;
|
|
620
|
+
addFiles(files: Array<FileInfo>): void;
|
|
621
|
+
addInitialFiles(initialFiles: Array<FileInfo>): void;
|
|
622
|
+
addInitialFileSelectFiles(initialFiles: Array<any>): void;
|
|
623
|
+
resumeFile(uid: string): void;
|
|
624
|
+
pauseFile(uid: string): void;
|
|
625
|
+
removeFiles(uid: string): void;
|
|
626
|
+
cancelFiles(uid: string): void;
|
|
627
|
+
clearFiles(): void;
|
|
628
|
+
uploadFiles(): void;
|
|
629
|
+
retryFiles(uid: string): void;
|
|
630
|
+
private _uploadFiles;
|
|
631
|
+
private performRemove;
|
|
632
|
+
private performUpload;
|
|
633
|
+
private onSuccess;
|
|
634
|
+
private onError;
|
|
635
|
+
private onProgress;
|
|
636
|
+
private onChunkProgress;
|
|
637
|
+
private checkAllComplete;
|
|
638
|
+
private shouldUploadNextFile;
|
|
639
|
+
private areAllSelectedFilesHandled;
|
|
640
|
+
private cloneRequestHeaders;
|
|
641
|
+
private populateRequestOptions;
|
|
642
|
+
private populateUploadFormData;
|
|
643
|
+
private populateRemoveFormData;
|
|
644
|
+
private populateClientFormData;
|
|
645
|
+
private getNextChunk;
|
|
646
|
+
private getChunkInfo;
|
|
647
|
+
private updateChunkInfo;
|
|
648
|
+
private removeChunkInfo;
|
|
649
|
+
private getChunkMetadata;
|
|
650
|
+
private isChunkUploadComplete;
|
|
651
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UploadService, never>;
|
|
652
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<UploadService>;
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
/**
|
|
656
|
+
* @hidden
|
|
657
|
+
*/
|
|
658
|
+
declare class NavigationService {
|
|
659
|
+
private uploadService;
|
|
660
|
+
private zone;
|
|
661
|
+
onActionButtonFocus: EventEmitter<string>;
|
|
662
|
+
onFileAction: EventEmitter<string>;
|
|
663
|
+
onFileFocus: EventEmitter<number>;
|
|
664
|
+
onTabOut: EventEmitter<any>;
|
|
665
|
+
onWrapperFocus: EventEmitter<any>;
|
|
666
|
+
onSelectButtonFocus: EventEmitter<any>;
|
|
667
|
+
actionButtonsVisible: boolean;
|
|
668
|
+
fileListVisible: boolean;
|
|
669
|
+
focused: boolean;
|
|
670
|
+
keyBindings: object;
|
|
671
|
+
focusedFileIndex: number;
|
|
672
|
+
private _focusedIndex;
|
|
673
|
+
constructor(uploadService: UploadService, zone: NgZone);
|
|
674
|
+
action(event: KeyboardEvent): Function;
|
|
675
|
+
process(event: KeyboardEvent, component?: string): void;
|
|
676
|
+
computeKeys(): void;
|
|
677
|
+
focusSelectButton(): void;
|
|
678
|
+
handleEnter(): void;
|
|
679
|
+
handleSpace(): void;
|
|
680
|
+
handleDelete(): void;
|
|
681
|
+
handleEscape(): void;
|
|
682
|
+
handleTab(event: any, component: any): void;
|
|
683
|
+
handleUpDown(event: any, direction: any): void;
|
|
684
|
+
get focusedIndex(): number;
|
|
685
|
+
set focusedIndex(index: number);
|
|
686
|
+
get lastFileIndex(): number;
|
|
687
|
+
get lastIndex(): number;
|
|
688
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NavigationService, never>;
|
|
689
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<NavigationService>;
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
/**
|
|
693
|
+
* @hidden
|
|
694
|
+
*/
|
|
695
|
+
type Direction = 'rtl' | 'ltr';
|
|
696
|
+
|
|
697
|
+
/**
|
|
698
|
+
* Specifies the layout options for the Upload action buttons.
|
|
699
|
+
*/
|
|
700
|
+
type ActionsLayout = 'start' | 'center' | 'end' | 'stretched';
|
|
701
|
+
|
|
702
|
+
/**
|
|
703
|
+
* Customizes the rendering of files in the list. ([See example.](https://www.telerik.com/kendo-angular-ui/components/uploads/upload/templates#file-template))
|
|
704
|
+
*
|
|
705
|
+
* The following context variables are available in the template:
|
|
706
|
+
*
|
|
707
|
+
* * `let-files`—A reference to the files associated with the current item.
|
|
708
|
+
* * `let-state`—A reference to the current state of each file. If the [`batch`](https://www.telerik.com/kendo-angular-ui/components/uploads/api/uploadcomponent#batch) option of the Upload is set to `true`, the field reflects the state of the whole batch.
|
|
709
|
+
* * `#myUpload="kendoUpload"` or `#myFileSelect="kendoFileSelect"`—A reference to the instance of the Upload/FileSelect component. It is exported as `kendoUpload`/`kendoFileSelect` by using the [`exportAs`](https://angular.io/api/core/Component) metadata property.
|
|
710
|
+
*
|
|
711
|
+
* @example
|
|
712
|
+
* ```html
|
|
713
|
+
* <kendo-upload #myUpload="kendoUpload">
|
|
714
|
+
* <ng-template kendoUploadFileTemplate let-files let-state>
|
|
715
|
+
* <div>Name: {{ files[0].name }} Size: {{ files[0].size }} bytes</div>
|
|
716
|
+
* </ng-template>
|
|
717
|
+
* </kendo-upload>
|
|
718
|
+
* ```
|
|
719
|
+
*/
|
|
720
|
+
declare class FileTemplateDirective {
|
|
721
|
+
templateRef: TemplateRef<any>;
|
|
722
|
+
constructor(templateRef: TemplateRef<any>);
|
|
723
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FileTemplateDirective, never>;
|
|
724
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FileTemplateDirective, "[kendoUploadFileTemplate], [kendoFileSelectFileTemplate]", never, {}, {}, never, never, true, never>;
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
/**
|
|
728
|
+
* Customizes the rendering of the file info section in the list. All other elements of the default template, such as file icon, action buttons, and upload progress, are preserved in place. ([See example](https://www.telerik.com/kendo-angular-ui/components/uploads/upload/templates#file-info-template)).
|
|
729
|
+
*
|
|
730
|
+
* The following context variables are available in the template:
|
|
731
|
+
*
|
|
732
|
+
* * `let-files`—A reference to the files associated with the current item.
|
|
733
|
+
* * `let-state`—A reference to the current state of each file. If the [`batch`](https://www.telerik.com/kendo-angular-ui/components/uploads/api/uploadcomponent#batch) option of the Upload is set to `true`, the field reflects the state of the whole batch.
|
|
734
|
+
* * `#myUpload="kendoUpload"` or `#myFileSelect="kendoFileSelect"`—A reference to the instance of the Upload/FileSelect component. It is exported as `kendoUpload`/`kendoFileSelect` by using the [`exportAs`](https://angular.io/api/core/Component) metadata property.
|
|
735
|
+
*
|
|
736
|
+
* @example
|
|
737
|
+
* ```html
|
|
738
|
+
* <kendo-upload #myUpload="kendoUpload">
|
|
739
|
+
* <ng-template kendoUploadFileInfoTemplate let-files let-state>
|
|
740
|
+
* <div>Name: {{ files[0].name }}</div>
|
|
741
|
+
* </ng-template>
|
|
742
|
+
* </kendo-upload>
|
|
743
|
+
* ```
|
|
744
|
+
*/
|
|
745
|
+
declare class FileInfoTemplateDirective {
|
|
746
|
+
templateRef: TemplateRef<any>;
|
|
747
|
+
constructor(templateRef: TemplateRef<any>);
|
|
748
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FileInfoTemplateDirective, never>;
|
|
749
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FileInfoTemplateDirective, "[kendoUploadFileInfoTemplate], [kendoFileSelectFileInfoTemplate]", never, {}, {}, never, never, true, never>;
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
/**
|
|
753
|
+
* @hidden
|
|
754
|
+
*/
|
|
755
|
+
declare abstract class UploadFileSelectBase {
|
|
756
|
+
protected uploadService: UploadService;
|
|
757
|
+
protected navigation: NavigationService;
|
|
758
|
+
protected cdr: ChangeDetectorRef;
|
|
759
|
+
protected injector: Injector;
|
|
760
|
+
protected zone: NgZone;
|
|
761
|
+
/**
|
|
762
|
+
* @hidden
|
|
763
|
+
*/
|
|
764
|
+
fileTemplate: FileTemplateDirective;
|
|
765
|
+
/**
|
|
766
|
+
* @hidden
|
|
767
|
+
*/
|
|
768
|
+
fileInfoTemplate: FileInfoTemplateDirective;
|
|
769
|
+
/**
|
|
770
|
+
* @hidden
|
|
771
|
+
*/
|
|
772
|
+
fileSelectButton: ElementRef;
|
|
773
|
+
/**
|
|
774
|
+
* Sets the `accept` attribute of the internal `input` element of the component.
|
|
775
|
+
*/
|
|
776
|
+
accept: string;
|
|
777
|
+
/**
|
|
778
|
+
* Disables the component.
|
|
779
|
+
*
|
|
780
|
+
* @default false
|
|
781
|
+
*/
|
|
782
|
+
disabled: boolean;
|
|
783
|
+
/**
|
|
784
|
+
* Allows you to select multiple files.
|
|
785
|
+
* When you set this to `false`, you can select only one file at a time.
|
|
786
|
+
*
|
|
787
|
+
* @default true
|
|
788
|
+
*/
|
|
789
|
+
multiple: boolean;
|
|
790
|
+
/**
|
|
791
|
+
* Controls the visibility of the file list.
|
|
792
|
+
*
|
|
793
|
+
* @default true
|
|
794
|
+
*/
|
|
795
|
+
showFileList: boolean;
|
|
796
|
+
/**
|
|
797
|
+
* Sets the [`tabindex`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the component.
|
|
798
|
+
*
|
|
799
|
+
* @default 0
|
|
800
|
+
*/
|
|
801
|
+
tabindex: number;
|
|
802
|
+
/**
|
|
803
|
+
* Sets the restrictions for selected files.
|
|
804
|
+
*/
|
|
805
|
+
set restrictions(restrictions: FileRestrictions);
|
|
806
|
+
get restrictions(): FileRestrictions;
|
|
807
|
+
/**
|
|
808
|
+
* Sets the `id` of the external drop zone that you want to associate with the component.
|
|
809
|
+
*/
|
|
810
|
+
zoneId: string;
|
|
811
|
+
/**
|
|
812
|
+
* @hidden
|
|
813
|
+
*/
|
|
814
|
+
focusableId: string;
|
|
815
|
+
/**
|
|
816
|
+
* @hidden
|
|
817
|
+
*/
|
|
818
|
+
hostUploadClass: boolean;
|
|
819
|
+
/**
|
|
820
|
+
* @hidden
|
|
821
|
+
*/
|
|
822
|
+
hostUploadAsyncClass: boolean;
|
|
823
|
+
/**
|
|
824
|
+
* @hidden
|
|
825
|
+
*/
|
|
826
|
+
get hostDisabledClass(): boolean;
|
|
827
|
+
/**
|
|
828
|
+
* @hidden
|
|
829
|
+
*/
|
|
830
|
+
get hostEmptyClass(): boolean;
|
|
831
|
+
/**
|
|
832
|
+
* Fires when you navigate outside the component.
|
|
833
|
+
*/
|
|
834
|
+
onBlur: EventEmitter<any>;
|
|
835
|
+
/**
|
|
836
|
+
* Fires when you focus the component.
|
|
837
|
+
*/
|
|
838
|
+
onFocus: EventEmitter<any>;
|
|
839
|
+
/**
|
|
840
|
+
* Fires when you select files. If you prevent this event, the component will not add the selected files to the list.
|
|
841
|
+
*/
|
|
842
|
+
select: EventEmitter<SelectEvent>;
|
|
843
|
+
/**
|
|
844
|
+
* Fires when you are about to remove a file. If you prevent this event, the file will remain in the list.
|
|
845
|
+
*/
|
|
846
|
+
remove: EventEmitter<RemoveEvent>;
|
|
847
|
+
/**
|
|
848
|
+
* @hidden
|
|
849
|
+
*/
|
|
850
|
+
_restrictions: FileRestrictions;
|
|
851
|
+
/**
|
|
852
|
+
* @hidden
|
|
853
|
+
*/
|
|
854
|
+
fileList: FileMap;
|
|
855
|
+
constructor(uploadService: UploadService, navigation: NavigationService, cdr: ChangeDetectorRef, injector: Injector, zone: NgZone);
|
|
856
|
+
/**
|
|
857
|
+
* @hidden
|
|
858
|
+
*/
|
|
859
|
+
get formControl(): FormControl;
|
|
860
|
+
/**
|
|
861
|
+
* @hidden
|
|
862
|
+
*/
|
|
863
|
+
get isControlRequired(): boolean;
|
|
864
|
+
/**
|
|
865
|
+
* @hidden
|
|
866
|
+
*/
|
|
867
|
+
get hasFileList(): boolean;
|
|
868
|
+
/**
|
|
869
|
+
* @hidden
|
|
870
|
+
*/
|
|
871
|
+
writeValue(newValue: any, validation: Function, callback: string): void;
|
|
872
|
+
protected onTouchedCallback: Function;
|
|
873
|
+
protected onChangeCallback: Function;
|
|
874
|
+
/**
|
|
875
|
+
* @hidden
|
|
876
|
+
*/
|
|
877
|
+
registerOnChange(fn: any): void;
|
|
878
|
+
/**
|
|
879
|
+
* @hidden
|
|
880
|
+
*/
|
|
881
|
+
registerOnTouched(fn: any): void;
|
|
882
|
+
/**
|
|
883
|
+
* @hidden
|
|
884
|
+
*/
|
|
885
|
+
setDisabledState(isDisabled: boolean): void;
|
|
886
|
+
/**
|
|
887
|
+
* @hidden
|
|
888
|
+
*/
|
|
889
|
+
onFileSelectButtonFocus(): void;
|
|
890
|
+
/**
|
|
891
|
+
* Focuses the component's **Select files** button.
|
|
892
|
+
*/
|
|
893
|
+
focus(): void;
|
|
894
|
+
/**
|
|
895
|
+
* @hidden
|
|
896
|
+
* @deprecated
|
|
897
|
+
*/
|
|
898
|
+
focusComponent(): void;
|
|
899
|
+
/**
|
|
900
|
+
* Blurs the component if you previously focused it.
|
|
901
|
+
*/
|
|
902
|
+
blur(): void;
|
|
903
|
+
/**
|
|
904
|
+
* @hidden
|
|
905
|
+
* @deprecated
|
|
906
|
+
*/
|
|
907
|
+
blurComponent(): void;
|
|
908
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UploadFileSelectBase, never>;
|
|
909
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<UploadFileSelectBase, never, never, { "accept": { "alias": "accept"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "showFileList": { "alias": "showFileList"; "required": false; }; "tabindex": { "alias": "tabindex"; "required": false; }; "restrictions": { "alias": "restrictions"; "required": false; }; "zoneId": { "alias": "zoneId"; "required": false; }; "focusableId": { "alias": "focusableId"; "required": false; }; }, { "onBlur": "blur"; "onFocus": "focus"; "select": "select"; "remove": "remove"; }, ["fileTemplate", "fileInfoTemplate"], never, true, never>;
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
/**
|
|
913
|
+
* @hidden
|
|
914
|
+
*/
|
|
915
|
+
declare const UPLOAD_VALUE_ACCESSOR: any;
|
|
916
|
+
/**
|
|
917
|
+
* Represents the [Kendo UI Upload component for Angular](https://www.telerik.com/kendo-angular-ui/components/uploads).
|
|
918
|
+
*
|
|
919
|
+
* @example
|
|
920
|
+
* ```html
|
|
921
|
+
* <kendo-upload
|
|
922
|
+
* [saveUrl]="uploadSaveUrl"
|
|
923
|
+
* [removeUrl]="uploadRemoveUrl">
|
|
924
|
+
* </kendo-upload>
|
|
925
|
+
* ```
|
|
926
|
+
*
|
|
927
|
+
* @remarks
|
|
928
|
+
* Supported children components are: {@link CustomMessagesComponent}
|
|
929
|
+
*/
|
|
930
|
+
declare class UploadComponent extends UploadFileSelectBase implements OnInit, OnDestroy, ControlValueAccessor {
|
|
931
|
+
protected uploadService: UploadService;
|
|
932
|
+
private localization;
|
|
933
|
+
protected navigation: NavigationService;
|
|
934
|
+
private dropZoneService;
|
|
935
|
+
protected zone: NgZone;
|
|
936
|
+
private renderer;
|
|
937
|
+
protected cdr: ChangeDetectorRef;
|
|
938
|
+
protected injector: Injector;
|
|
939
|
+
/**
|
|
940
|
+
* Specifies whether selected files upload automatically
|
|
941
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/uploads/upload/file-processing#automatic-upload-of-files)).
|
|
942
|
+
* Set `autoUpload` to `false` to change this behavior.
|
|
943
|
+
*
|
|
944
|
+
* @default true
|
|
945
|
+
*/
|
|
946
|
+
set autoUpload(autoUpload: boolean);
|
|
947
|
+
get autoUpload(): boolean;
|
|
948
|
+
/**
|
|
949
|
+
* Specifies whether all files in the selection upload in a single request
|
|
950
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/uploads/upload/file-processing#upload-of-batches-of-files)).
|
|
951
|
+
* Files selected one after the other upload in separate requests.
|
|
952
|
+
*
|
|
953
|
+
* @default false
|
|
954
|
+
*/
|
|
955
|
+
set batch(batch: boolean);
|
|
956
|
+
get batch(): boolean;
|
|
957
|
+
/**
|
|
958
|
+
* Specifies whether credentials (cookies, headers) are sent for cross-site requests
|
|
959
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/uploads/upload/credentials#attaching-credentials-to-requests)).
|
|
960
|
+
* Set `withCredentials` has no effect on same-site requests.
|
|
961
|
+
* Use the `saveHeaders` or `removeHeaders` property to add credentials to the request.
|
|
962
|
+
* You can also use the [`upload`](https://www.telerik.com/kendo-angular-ui/components/uploads/api/uploadevent) event.
|
|
963
|
+
*
|
|
964
|
+
* @default true
|
|
965
|
+
*/
|
|
966
|
+
set withCredentials(withCredentials: boolean);
|
|
967
|
+
get withCredentials(): boolean;
|
|
968
|
+
/**
|
|
969
|
+
* Specifies the [`FormData`](https://developer.mozilla.org/en-US/docs/Web/API/FormData) key which contains the files submitted to `saveUrl`.
|
|
970
|
+
*
|
|
971
|
+
*/
|
|
972
|
+
set saveField(saveField: string);
|
|
973
|
+
get saveField(): string;
|
|
974
|
+
/**
|
|
975
|
+
* Specifies the [`HttpHeaders`](https://angular.io/api/common/http/HttpHeaders) attached to each upload request.
|
|
976
|
+
*/
|
|
977
|
+
set saveHeaders(saveHeaders: HttpHeaders);
|
|
978
|
+
get saveHeaders(): HttpHeaders;
|
|
979
|
+
/**
|
|
980
|
+
* Specifies the [`RequestMethod`](https://angular.io/api/http/RequestMethod) of the upload request.
|
|
981
|
+
*
|
|
982
|
+
*/
|
|
983
|
+
set saveMethod(saveMethod: string);
|
|
984
|
+
get saveMethod(): string;
|
|
985
|
+
/**
|
|
986
|
+
* Specifies the URL of the endpoint for the upload request.
|
|
987
|
+
* The request [`FormData`](https://developer.mozilla.org/en-US/docs/Web/API/FormData) key uses the name from the `saveField` property.
|
|
988
|
+
* This key contains the list of files to be uploaded.
|
|
989
|
+
*/
|
|
990
|
+
set saveUrl(saveUrl: string);
|
|
991
|
+
get saveUrl(): string;
|
|
992
|
+
/**
|
|
993
|
+
* Specifies the expected [`response type`](https://angular.io/api/common/http/HttpRequest#responseType) of the server.
|
|
994
|
+
* The response type determines how the response is parsed.
|
|
995
|
+
*
|
|
996
|
+
* @default 'json'
|
|
997
|
+
*/
|
|
998
|
+
set responseType(responseType: 'arraybuffer' | 'blob' | 'json' | 'text');
|
|
999
|
+
get responseType(): 'arraybuffer' | 'blob' | 'json' | 'text';
|
|
1000
|
+
/**
|
|
1001
|
+
* Specifies the [`FormData`](https://developer.mozilla.org/en-US/docs/Web/API/FormData) key which contains the list of file names submitted to `removeUrl`.
|
|
1002
|
+
*
|
|
1003
|
+
*/
|
|
1004
|
+
set removeField(removeField: string);
|
|
1005
|
+
get removeField(): string;
|
|
1006
|
+
/**
|
|
1007
|
+
* Specifies the [`HttpHeaders`](https://angular.io/api/common/http/HttpHeaders) attached to each `remove` request.
|
|
1008
|
+
*/
|
|
1009
|
+
set removeHeaders(removeHeaders: HttpHeaders);
|
|
1010
|
+
get removeHeaders(): HttpHeaders;
|
|
1011
|
+
/**
|
|
1012
|
+
* Specifies the [`RequestMethod`](https://angular.io/api/http/RequestMethod) of the `remove` request.
|
|
1013
|
+
*
|
|
1014
|
+
*/
|
|
1015
|
+
set removeMethod(removeMethod: string);
|
|
1016
|
+
get removeMethod(): string;
|
|
1017
|
+
/**
|
|
1018
|
+
* Specifies the URL of the endpoint for the `remove` request.
|
|
1019
|
+
* The [`FormData`](https://developer.mozilla.org/en-US/docs/Web/API/FormData) request key uses the name from the `removeField` property.
|
|
1020
|
+
* This key contains the list of file names to be removed.
|
|
1021
|
+
*/
|
|
1022
|
+
set removeUrl(removeUrl: string);
|
|
1023
|
+
get removeUrl(): string;
|
|
1024
|
+
/**
|
|
1025
|
+
* Specifies whether the chunk functionality of the Upload is enabled.
|
|
1026
|
+
*
|
|
1027
|
+
* @default false
|
|
1028
|
+
*/
|
|
1029
|
+
chunkable: ChunkSettings | boolean;
|
|
1030
|
+
/**
|
|
1031
|
+
* Specifies whether selected files upload simultaneously or one by one.
|
|
1032
|
+
*
|
|
1033
|
+
* @default true
|
|
1034
|
+
*/
|
|
1035
|
+
set concurrent(concurrent: boolean);
|
|
1036
|
+
get concurrent(): boolean;
|
|
1037
|
+
/**
|
|
1038
|
+
* Specifies whether the file list is visible.
|
|
1039
|
+
*
|
|
1040
|
+
* @default true
|
|
1041
|
+
*/
|
|
1042
|
+
showFileList: boolean;
|
|
1043
|
+
/**
|
|
1044
|
+
* @hidden
|
|
1045
|
+
*/
|
|
1046
|
+
set tabIndex(tabIndex: number);
|
|
1047
|
+
get tabIndex(): number;
|
|
1048
|
+
/**
|
|
1049
|
+
* Specifies the layout of the action buttons.
|
|
1050
|
+
*
|
|
1051
|
+
* @default 'end'
|
|
1052
|
+
*/
|
|
1053
|
+
actionsLayout: ActionsLayout;
|
|
1054
|
+
fileSelectInput: ElementRef;
|
|
1055
|
+
/**
|
|
1056
|
+
* Fires when the upload is canceled while in progress.
|
|
1057
|
+
*/
|
|
1058
|
+
cancel: EventEmitter<CancelEvent>;
|
|
1059
|
+
/**
|
|
1060
|
+
* Fires when the file list is about to be cleared.
|
|
1061
|
+
* Prevent this event to keep the files in the list.
|
|
1062
|
+
*/
|
|
1063
|
+
clear: EventEmitter<ClearEvent>;
|
|
1064
|
+
/**
|
|
1065
|
+
* Fires when all active uploads complete successfully or with errors.
|
|
1066
|
+
*/
|
|
1067
|
+
complete: EventEmitter<any>;
|
|
1068
|
+
/**
|
|
1069
|
+
* Fires when an `upload` or `remove` operation fails.
|
|
1070
|
+
*/
|
|
1071
|
+
error: EventEmitter<ErrorEvent>;
|
|
1072
|
+
/**
|
|
1073
|
+
* Fires when the upload of a file is paused.
|
|
1074
|
+
*/
|
|
1075
|
+
pause: EventEmitter<any>;
|
|
1076
|
+
/**
|
|
1077
|
+
* Fires when the upload of a file is resumed.
|
|
1078
|
+
*/
|
|
1079
|
+
resume: EventEmitter<any>;
|
|
1080
|
+
/**
|
|
1081
|
+
* Fires when an `upload` or `remove` operation completes successfully.
|
|
1082
|
+
*/
|
|
1083
|
+
success: EventEmitter<SuccessEvent>;
|
|
1084
|
+
/**
|
|
1085
|
+
* Fires when one or more files are about to be uploaded.
|
|
1086
|
+
* Prevent this event to stop the files from uploading and being added to the file list.
|
|
1087
|
+
*/
|
|
1088
|
+
upload: EventEmitter<UploadEvent>;
|
|
1089
|
+
/**
|
|
1090
|
+
* Fires when one or more files are uploading.
|
|
1091
|
+
*/
|
|
1092
|
+
uploadProgress: EventEmitter<UploadProgressEvent>;
|
|
1093
|
+
/**
|
|
1094
|
+
* Fires when the component value changes after a successful `upload`, `remove`, or `clear` operation.
|
|
1095
|
+
*/
|
|
1096
|
+
valueChange: EventEmitter<Array<FileInfo>>;
|
|
1097
|
+
get dir(): string;
|
|
1098
|
+
direction: Direction;
|
|
1099
|
+
wrapper: HTMLElement;
|
|
1100
|
+
fileListId: string;
|
|
1101
|
+
private documentClick;
|
|
1102
|
+
private blurSubscription;
|
|
1103
|
+
private wrapperFocusSubscription;
|
|
1104
|
+
private selectButtonFocusSubscription;
|
|
1105
|
+
private localizationChangeSubscription;
|
|
1106
|
+
private subs;
|
|
1107
|
+
constructor(uploadService: UploadService, localization: LocalizationService, navigation: NavigationService, dropZoneService: DropZoneService, zone: NgZone, renderer: Renderer2, cdr: ChangeDetectorRef, wrapper: ElementRef, injector: Injector);
|
|
1108
|
+
ngOnInit(): void;
|
|
1109
|
+
ngOnChanges(changes: any): void;
|
|
1110
|
+
ngOnDestroy(): void;
|
|
1111
|
+
/**
|
|
1112
|
+
* @hidden
|
|
1113
|
+
*/
|
|
1114
|
+
writeValue(newValue: any): void;
|
|
1115
|
+
/**
|
|
1116
|
+
* @hidden
|
|
1117
|
+
*/
|
|
1118
|
+
get showActionButtons(): boolean;
|
|
1119
|
+
/**
|
|
1120
|
+
* @hidden
|
|
1121
|
+
*/
|
|
1122
|
+
get showTotalStatus(): boolean;
|
|
1123
|
+
/**
|
|
1124
|
+
* @hidden
|
|
1125
|
+
*/
|
|
1126
|
+
textFor(key: string): string;
|
|
1127
|
+
/**
|
|
1128
|
+
* @hidden
|
|
1129
|
+
*/
|
|
1130
|
+
getIds(): {
|
|
1131
|
+
buttonId: string;
|
|
1132
|
+
fileListId: string;
|
|
1133
|
+
};
|
|
1134
|
+
/**
|
|
1135
|
+
* Pauses the upload process of a file that is currently uploading.
|
|
1136
|
+
* This method requires the `chunkable` option of the Upload to be enabled.
|
|
1137
|
+
*
|
|
1138
|
+
* @param uid The `uid` of the file that will be paused.
|
|
1139
|
+
*/
|
|
1140
|
+
pauseFileByUid(uid: string): void;
|
|
1141
|
+
/**
|
|
1142
|
+
* Resumes the upload process for a file that was previously paused.
|
|
1143
|
+
* This method requires the `chunkable` option of the Upload to be enabled.
|
|
1144
|
+
*
|
|
1145
|
+
* @param uid The `uid` of the file that will be resumed.
|
|
1146
|
+
*/
|
|
1147
|
+
resumeFileByUid(uid: string): void;
|
|
1148
|
+
/**
|
|
1149
|
+
* Removes a file or a batch of files.
|
|
1150
|
+
*
|
|
1151
|
+
* @param uid The `uid` of the file or a batch of files that will be removed.
|
|
1152
|
+
*/
|
|
1153
|
+
removeFilesByUid(uid: string): void;
|
|
1154
|
+
/**
|
|
1155
|
+
* Retries the upload of a file or batch of files that failed to upload.
|
|
1156
|
+
*
|
|
1157
|
+
* @param uid The `uid` of the file or a batch of files to be retried.
|
|
1158
|
+
*/
|
|
1159
|
+
retryUploadByUid(uid: string): void;
|
|
1160
|
+
/**
|
|
1161
|
+
* Cancels the upload of a file or a batch of files.
|
|
1162
|
+
*
|
|
1163
|
+
* @param uid The `uid` of the file or a batch of files that will be canceled.
|
|
1164
|
+
*/
|
|
1165
|
+
cancelUploadByUid(uid: string): void;
|
|
1166
|
+
/**
|
|
1167
|
+
* Uploads the currently selected files that pass the set restrictions.
|
|
1168
|
+
*/
|
|
1169
|
+
uploadFiles(): void;
|
|
1170
|
+
/**
|
|
1171
|
+
* Clears all files from the UI without sending requests to the remove handler.
|
|
1172
|
+
*/
|
|
1173
|
+
clearFiles(): void;
|
|
1174
|
+
/**
|
|
1175
|
+
* @hidden
|
|
1176
|
+
* Used by the external dropzone to add files to the Upload
|
|
1177
|
+
*/
|
|
1178
|
+
addFiles(files: FileInfo[]): void;
|
|
1179
|
+
/**
|
|
1180
|
+
* @hidden
|
|
1181
|
+
* Used to determine if the component is empty.
|
|
1182
|
+
*/
|
|
1183
|
+
isEmpty(): boolean;
|
|
1184
|
+
private verifySettings;
|
|
1185
|
+
private subscribeBlur;
|
|
1186
|
+
private handleKeydown;
|
|
1187
|
+
private subscribeFocus;
|
|
1188
|
+
private attachEventHandlers;
|
|
1189
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UploadComponent, never>;
|
|
1190
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UploadComponent, "kendo-upload", ["kendoUpload"], { "autoUpload": { "alias": "autoUpload"; "required": false; }; "batch": { "alias": "batch"; "required": false; }; "withCredentials": { "alias": "withCredentials"; "required": false; }; "saveField": { "alias": "saveField"; "required": false; }; "saveHeaders": { "alias": "saveHeaders"; "required": false; }; "saveMethod": { "alias": "saveMethod"; "required": false; }; "saveUrl": { "alias": "saveUrl"; "required": false; }; "responseType": { "alias": "responseType"; "required": false; }; "removeField": { "alias": "removeField"; "required": false; }; "removeHeaders": { "alias": "removeHeaders"; "required": false; }; "removeMethod": { "alias": "removeMethod"; "required": false; }; "removeUrl": { "alias": "removeUrl"; "required": false; }; "chunkable": { "alias": "chunkable"; "required": false; }; "concurrent": { "alias": "concurrent"; "required": false; }; "showFileList": { "alias": "showFileList"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "actionsLayout": { "alias": "actionsLayout"; "required": false; }; }, { "cancel": "cancel"; "clear": "clear"; "complete": "complete"; "error": "error"; "pause": "pause"; "resume": "resume"; "success": "success"; "upload": "upload"; "uploadProgress": "uploadProgress"; "valueChange": "valueChange"; }, never, never, true, never>;
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
/**
|
|
1194
|
+
* Represents the [Kendo UI FileSelect component for Angular](https://www.telerik.com/kendo-angular-ui/components/uploads/fileselect).
|
|
1195
|
+
*
|
|
1196
|
+
* @example
|
|
1197
|
+
* ```html
|
|
1198
|
+
* <kendo-fileselect> </kendo-fileselect>
|
|
1199
|
+
* ```
|
|
1200
|
+
*
|
|
1201
|
+
* @remarks
|
|
1202
|
+
* Supported children components are: {@link CustomMessagesComponent}
|
|
1203
|
+
*/
|
|
1204
|
+
declare class FileSelectComponent extends UploadFileSelectBase implements OnInit, OnDestroy {
|
|
1205
|
+
protected uploadService: UploadService;
|
|
1206
|
+
private localization;
|
|
1207
|
+
protected navigation: NavigationService;
|
|
1208
|
+
private dropZoneService;
|
|
1209
|
+
protected ngZone: NgZone;
|
|
1210
|
+
private renderer;
|
|
1211
|
+
protected cdr: ChangeDetectorRef;
|
|
1212
|
+
protected injector: Injector;
|
|
1213
|
+
fileSelectInput: ElementRef;
|
|
1214
|
+
get dir(): string;
|
|
1215
|
+
/**
|
|
1216
|
+
* Specifies the `name` attribute of the `input` element of the FileSelect.
|
|
1217
|
+
*/
|
|
1218
|
+
set name(name: string);
|
|
1219
|
+
get name(): string;
|
|
1220
|
+
/**
|
|
1221
|
+
* Fires when the component value changes after a successful `select` or `remove` operation.
|
|
1222
|
+
*/
|
|
1223
|
+
valueChange: EventEmitter<Array<File>>;
|
|
1224
|
+
/**
|
|
1225
|
+
* @hidden
|
|
1226
|
+
*/
|
|
1227
|
+
_restrictions: FileRestrictions;
|
|
1228
|
+
direction: Direction;
|
|
1229
|
+
wrapper: HTMLElement;
|
|
1230
|
+
fileListId: string;
|
|
1231
|
+
private documentClick;
|
|
1232
|
+
private blurSubscription;
|
|
1233
|
+
private wrapperFocusSubscription;
|
|
1234
|
+
private selectButtonFocusSubscription;
|
|
1235
|
+
private localizationChangeSubscription;
|
|
1236
|
+
private subs;
|
|
1237
|
+
constructor(uploadService: UploadService, localization: LocalizationService, navigation: NavigationService, dropZoneService: DropZoneService, ngZone: NgZone, renderer: Renderer2, cdr: ChangeDetectorRef, wrapper: ElementRef, injector: Injector);
|
|
1238
|
+
ngOnInit(): void;
|
|
1239
|
+
/**
|
|
1240
|
+
* @hidden
|
|
1241
|
+
*/
|
|
1242
|
+
textFor(key: string): string;
|
|
1243
|
+
ngOnDestroy(): void;
|
|
1244
|
+
/**
|
|
1245
|
+
* Removes a specific file from the file list.
|
|
1246
|
+
*
|
|
1247
|
+
* @param uid The `uid` of the file to be removed.
|
|
1248
|
+
*/
|
|
1249
|
+
removeFileByUid(uid: string): void;
|
|
1250
|
+
/**
|
|
1251
|
+
* Clears all files from the UI.
|
|
1252
|
+
*/
|
|
1253
|
+
clearFiles(): void;
|
|
1254
|
+
/**
|
|
1255
|
+
* @hidden
|
|
1256
|
+
* Used to determine if the component is empty.
|
|
1257
|
+
*/
|
|
1258
|
+
isEmpty(): boolean;
|
|
1259
|
+
/**
|
|
1260
|
+
* @hidden
|
|
1261
|
+
* Used by the external dropzone to add files to the FileSelect
|
|
1262
|
+
*/
|
|
1263
|
+
addFiles(files: FileInfo[]): void;
|
|
1264
|
+
/**
|
|
1265
|
+
* @hidden
|
|
1266
|
+
*/
|
|
1267
|
+
get selectButtonTabIndex(): number;
|
|
1268
|
+
/**
|
|
1269
|
+
* @hidden
|
|
1270
|
+
*/
|
|
1271
|
+
getIds(): {
|
|
1272
|
+
buttonId: string;
|
|
1273
|
+
fileListId: string;
|
|
1274
|
+
};
|
|
1275
|
+
/**
|
|
1276
|
+
* @hidden
|
|
1277
|
+
*/
|
|
1278
|
+
writeValue(newValue: any): void;
|
|
1279
|
+
private subscribeBlur;
|
|
1280
|
+
private subscribeFocus;
|
|
1281
|
+
private handleKeydown;
|
|
1282
|
+
private attachEventHandlers;
|
|
1283
|
+
private setDefaultSettings;
|
|
1284
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FileSelectComponent, never>;
|
|
1285
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FileSelectComponent, "kendo-fileselect", ["kendoFileSelect"], { "name": { "alias": "name"; "required": false; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
|
|
1286
|
+
}
|
|
1287
|
+
|
|
1288
|
+
/**
|
|
1289
|
+
* @hidden
|
|
1290
|
+
*/
|
|
1291
|
+
declare class DropZoneService {
|
|
1292
|
+
addComponent(component: UploadComponent | FileSelectComponent, zoneId: string): void;
|
|
1293
|
+
clearComponent(component: UploadComponent | FileSelectComponent, zoneId: string): void;
|
|
1294
|
+
getComponents(zoneId: string): Array<UploadComponent | FileSelectComponent>;
|
|
1295
|
+
private has;
|
|
1296
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DropZoneService, never>;
|
|
1297
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DropZoneService>;
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1300
|
+
/**
|
|
1301
|
+
* @hidden
|
|
1302
|
+
*/
|
|
1303
|
+
declare class Messages extends ComponentMessages {
|
|
1304
|
+
/**
|
|
1305
|
+
* Sets the text for the **Cancel** button.
|
|
1306
|
+
*
|
|
1307
|
+
* @default 'Cancel'
|
|
1308
|
+
*/
|
|
1309
|
+
cancel: string;
|
|
1310
|
+
/**
|
|
1311
|
+
* Sets the text for the **Clear** button.
|
|
1312
|
+
*
|
|
1313
|
+
* @default 'Clear'
|
|
1314
|
+
*/
|
|
1315
|
+
clearSelectedFiles: string;
|
|
1316
|
+
/**
|
|
1317
|
+
* Sets the drop-zone hint.
|
|
1318
|
+
*
|
|
1319
|
+
* @default 'Drop files here to upload'
|
|
1320
|
+
*/
|
|
1321
|
+
dropFilesHere: string;
|
|
1322
|
+
/**
|
|
1323
|
+
* Sets the external drop-zone hint.
|
|
1324
|
+
*
|
|
1325
|
+
* @default 'Drag and drop files here to upload'
|
|
1326
|
+
*/
|
|
1327
|
+
externalDropFilesHere: string;
|
|
1328
|
+
/**
|
|
1329
|
+
* Sets the status message for a batch of files.
|
|
1330
|
+
*
|
|
1331
|
+
* @default 'files'
|
|
1332
|
+
*/
|
|
1333
|
+
filesBatchStatus: string;
|
|
1334
|
+
/**
|
|
1335
|
+
* Sets the status message for a batch of files after failed upload.
|
|
1336
|
+
*
|
|
1337
|
+
* @default 'files failed to upload.'
|
|
1338
|
+
*/
|
|
1339
|
+
filesBatchStatusFailed: string;
|
|
1340
|
+
/**
|
|
1341
|
+
* Sets the status message for a batch of files after successful upload.
|
|
1342
|
+
*
|
|
1343
|
+
* @default 'files successfully uploaded.'
|
|
1344
|
+
*/
|
|
1345
|
+
filesBatchStatusUploaded: string;
|
|
1346
|
+
/**
|
|
1347
|
+
* Sets the file status message after failed upload.
|
|
1348
|
+
*
|
|
1349
|
+
* @default 'File failed to upload.'
|
|
1350
|
+
*/
|
|
1351
|
+
fileStatusFailed: string;
|
|
1352
|
+
/**
|
|
1353
|
+
* Sets the file status message after successful upload.
|
|
1354
|
+
*
|
|
1355
|
+
* @default 'File successfully uploaded.'
|
|
1356
|
+
*/
|
|
1357
|
+
fileStatusUploaded: string;
|
|
1358
|
+
/**
|
|
1359
|
+
* Sets the header status message when the file upload is paused.
|
|
1360
|
+
*
|
|
1361
|
+
* @default 'Paused'
|
|
1362
|
+
*/
|
|
1363
|
+
headerStatusPaused: string;
|
|
1364
|
+
/**
|
|
1365
|
+
* Sets the header status message after the file upload completes.
|
|
1366
|
+
*
|
|
1367
|
+
* @default 'Done'
|
|
1368
|
+
*/
|
|
1369
|
+
headerStatusUploaded: string;
|
|
1370
|
+
/**
|
|
1371
|
+
* Sets the header status message during the upload of the file.
|
|
1372
|
+
*
|
|
1373
|
+
* @default 'Uploading...'
|
|
1374
|
+
*/
|
|
1375
|
+
headerStatusUploading: string;
|
|
1376
|
+
/**
|
|
1377
|
+
* Sets the text for the invalid `allowedExtensions` restriction message.
|
|
1378
|
+
*
|
|
1379
|
+
* @default 'File type not allowed.'
|
|
1380
|
+
*/
|
|
1381
|
+
invalidFileExtension: string;
|
|
1382
|
+
/**
|
|
1383
|
+
* Sets the text for the invalid `maxFileSize` restriction message.
|
|
1384
|
+
*
|
|
1385
|
+
* @default 'File size too large.'
|
|
1386
|
+
*/
|
|
1387
|
+
invalidMaxFileSize: string;
|
|
1388
|
+
/**
|
|
1389
|
+
* Sets the text for the invalid `minFileSize` restriction message.
|
|
1390
|
+
*
|
|
1391
|
+
* @default 'File size too small.'
|
|
1392
|
+
*/
|
|
1393
|
+
invalidMinFileSize: string;
|
|
1394
|
+
/**
|
|
1395
|
+
* Sets the text for the **Pause** button.
|
|
1396
|
+
*
|
|
1397
|
+
* @default 'Pause'
|
|
1398
|
+
*/
|
|
1399
|
+
pause: string;
|
|
1400
|
+
/**
|
|
1401
|
+
* Sets the text for the **Remove** button.
|
|
1402
|
+
*
|
|
1403
|
+
* @default 'Remove'
|
|
1404
|
+
*/
|
|
1405
|
+
remove: string;
|
|
1406
|
+
/**
|
|
1407
|
+
* Sets the text for the **Resume** button.
|
|
1408
|
+
*
|
|
1409
|
+
* @default 'Resume'
|
|
1410
|
+
*/
|
|
1411
|
+
resume: string;
|
|
1412
|
+
/**
|
|
1413
|
+
* Sets the text for the **Retry** button.
|
|
1414
|
+
*
|
|
1415
|
+
* @default 'Retry'
|
|
1416
|
+
*/
|
|
1417
|
+
retry: string;
|
|
1418
|
+
/**
|
|
1419
|
+
* Sets the text for the **Select** button.
|
|
1420
|
+
*
|
|
1421
|
+
* @default 'Select files...'
|
|
1422
|
+
*/
|
|
1423
|
+
select: string;
|
|
1424
|
+
/**
|
|
1425
|
+
* Sets the text for the **Upload files** button.
|
|
1426
|
+
*
|
|
1427
|
+
* @default 'Upload'
|
|
1428
|
+
*/
|
|
1429
|
+
uploadSelectedFiles: string;
|
|
1430
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Messages, never>;
|
|
1431
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<Messages, never, never, { "cancel": { "alias": "cancel"; "required": false; }; "clearSelectedFiles": { "alias": "clearSelectedFiles"; "required": false; }; "dropFilesHere": { "alias": "dropFilesHere"; "required": false; }; "externalDropFilesHere": { "alias": "externalDropFilesHere"; "required": false; }; "filesBatchStatus": { "alias": "filesBatchStatus"; "required": false; }; "filesBatchStatusFailed": { "alias": "filesBatchStatusFailed"; "required": false; }; "filesBatchStatusUploaded": { "alias": "filesBatchStatusUploaded"; "required": false; }; "fileStatusFailed": { "alias": "fileStatusFailed"; "required": false; }; "fileStatusUploaded": { "alias": "fileStatusUploaded"; "required": false; }; "headerStatusPaused": { "alias": "headerStatusPaused"; "required": false; }; "headerStatusUploaded": { "alias": "headerStatusUploaded"; "required": false; }; "headerStatusUploading": { "alias": "headerStatusUploading"; "required": false; }; "invalidFileExtension": { "alias": "invalidFileExtension"; "required": false; }; "invalidMaxFileSize": { "alias": "invalidMaxFileSize"; "required": false; }; "invalidMinFileSize": { "alias": "invalidMinFileSize"; "required": false; }; "pause": { "alias": "pause"; "required": false; }; "remove": { "alias": "remove"; "required": false; }; "resume": { "alias": "resume"; "required": false; }; "retry": { "alias": "retry"; "required": false; }; "select": { "alias": "select"; "required": false; }; "uploadSelectedFiles": { "alias": "uploadSelectedFiles"; "required": false; }; }, {}, never, never, true, never>;
|
|
1432
|
+
}
|
|
1433
|
+
|
|
1434
|
+
/**
|
|
1435
|
+
* Custom component messages override default component messages ([more information and example](https://www.telerik.com/kendo-angular-ui/components/uploads/globalization)).
|
|
1436
|
+
*
|
|
1437
|
+
* @example
|
|
1438
|
+
* ```html
|
|
1439
|
+
* <!-- Custom messages for FileSelect -->
|
|
1440
|
+
* <kendo-fileselect>
|
|
1441
|
+
* <kendo-fileselect-messages
|
|
1442
|
+
* dropFilesHere="Drop your file here"
|
|
1443
|
+
* select="Upload file">
|
|
1444
|
+
* </kendo-fileselect-messages>
|
|
1445
|
+
* </kendo-fileselect>
|
|
1446
|
+
*
|
|
1447
|
+
* <!-- Custom messages for Upload -->
|
|
1448
|
+
* <kendo-upload>
|
|
1449
|
+
* <kendo-upload-messages
|
|
1450
|
+
* dropFilesHere="Drop your file here"
|
|
1451
|
+
* fileStatusFailed="File upload failed"
|
|
1452
|
+
* fileStatusSuccessful="File upload successful">
|
|
1453
|
+
* </kendo-upload-messages>
|
|
1454
|
+
* </kendo-upload>
|
|
1455
|
+
*
|
|
1456
|
+
* <!-- Custom messages for UploadDropZone -->
|
|
1457
|
+
* <kendo-uploaddropzone>
|
|
1458
|
+
* <kendo-uploaddropzone-messages
|
|
1459
|
+
* externalDropFilesHere="Drag and your file here">
|
|
1460
|
+
* </kendo-uploaddropzone-messages>
|
|
1461
|
+
* </kendo-uploaddropzone>
|
|
1462
|
+
* ```
|
|
1463
|
+
*/
|
|
1464
|
+
declare class CustomMessagesComponent extends Messages {
|
|
1465
|
+
protected service: LocalizationService;
|
|
1466
|
+
protected get override(): boolean;
|
|
1467
|
+
constructor(service: LocalizationService);
|
|
1468
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CustomMessagesComponent, never>;
|
|
1469
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CustomMessagesComponent, "kendo-upload-messages, kendo-fileselect-messages, kendo-uploaddropzone-messages", never, {}, {}, never, never, true, never>;
|
|
1470
|
+
}
|
|
1471
|
+
|
|
1472
|
+
/**
|
|
1473
|
+
* Represents the [Kendo UI UploadDropZone directive for Angular](https://www.telerik.com/kendo-angular-ui/components/uploads).
|
|
1474
|
+
* Use this directive to create external drop zones for Upload and FileSelect components.
|
|
1475
|
+
*
|
|
1476
|
+
* @example
|
|
1477
|
+
* ```html
|
|
1478
|
+
* <div kendoUploadDropZone="upload1">Drop files here</div>
|
|
1479
|
+
* <kendo-upload [saveUrl]="uploadSaveUrl" zoneId="upload1"></kendo-upload>
|
|
1480
|
+
* ```
|
|
1481
|
+
*/
|
|
1482
|
+
declare class UploadDropZoneDirective {
|
|
1483
|
+
private dropZoneService;
|
|
1484
|
+
/**
|
|
1485
|
+
* The id of the drop zone to associate with an existing Upload component.
|
|
1486
|
+
*/
|
|
1487
|
+
zoneId: string;
|
|
1488
|
+
/**
|
|
1489
|
+
* The id of the drop zone to associate with an existing FileSelect component.
|
|
1490
|
+
*/
|
|
1491
|
+
fileSelectZoneId: string;
|
|
1492
|
+
constructor(dropZoneService: DropZoneService);
|
|
1493
|
+
/**
|
|
1494
|
+
* @hidden
|
|
1495
|
+
*/
|
|
1496
|
+
onElementDragEnter(): boolean;
|
|
1497
|
+
/**
|
|
1498
|
+
* @hidden
|
|
1499
|
+
*/
|
|
1500
|
+
onElementDragOver(): boolean;
|
|
1501
|
+
/**
|
|
1502
|
+
* @hidden
|
|
1503
|
+
*/
|
|
1504
|
+
onDropListener(event: any): boolean;
|
|
1505
|
+
/**
|
|
1506
|
+
* @hidden
|
|
1507
|
+
*/
|
|
1508
|
+
get componentInstance(): Array<UploadComponent | FileSelectComponent>;
|
|
1509
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UploadDropZoneDirective, never>;
|
|
1510
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<UploadDropZoneDirective, "[kendoUploadDropZone], [kendoFileSelectDropZone]", never, { "zoneId": { "alias": "kendoUploadDropZone"; "required": false; }; "fileSelectZoneId": { "alias": "kendoFileSelectDropZone"; "required": false; }; }, {}, never, never, true, never>;
|
|
1511
|
+
}
|
|
1512
|
+
|
|
1513
|
+
/**
|
|
1514
|
+
* @hidden
|
|
1515
|
+
*/
|
|
1516
|
+
declare abstract class DropZoneBase {
|
|
1517
|
+
protected element: ElementRef;
|
|
1518
|
+
protected renderer: Renderer2;
|
|
1519
|
+
protected hoverClass: string;
|
|
1520
|
+
protected lastDragElement: Date;
|
|
1521
|
+
protected hideIntervalElement: any;
|
|
1522
|
+
/**
|
|
1523
|
+
* @hidden
|
|
1524
|
+
*/
|
|
1525
|
+
onElementDragEnterListener(): boolean;
|
|
1526
|
+
/**
|
|
1527
|
+
* @hidden
|
|
1528
|
+
*/
|
|
1529
|
+
onElementDragOverListener(): boolean;
|
|
1530
|
+
constructor(element: ElementRef, renderer: Renderer2, cssClass: string);
|
|
1531
|
+
protected calculateTimeDiff(prevEvent: Date): number;
|
|
1532
|
+
protected addClass(className: string): void;
|
|
1533
|
+
protected removeClass(className: string): void;
|
|
1534
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DropZoneBase, never>;
|
|
1535
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DropZoneBase, never, never, {}, {}, never, never, true, never>;
|
|
1536
|
+
}
|
|
1537
|
+
|
|
1538
|
+
/**
|
|
1539
|
+
* Represents the [Kendo UI UploadDropZone component for Angular](https://www.telerik.com/kendo-angular-ui/components/uploads).
|
|
1540
|
+
*
|
|
1541
|
+
* @example
|
|
1542
|
+
* ```html
|
|
1543
|
+
* <kendo-uploaddropzone zoneId="upload1">
|
|
1544
|
+
* Drop files here to upload
|
|
1545
|
+
* </kendo-uploaddropzone>
|
|
1546
|
+
* <kendo-upload [saveUrl]="uploadSaveUrl" zoneId="upload1"></kendo-upload>
|
|
1547
|
+
* ```
|
|
1548
|
+
*
|
|
1549
|
+
* @remarks
|
|
1550
|
+
* Supported children components are: {@link CustomMessagesComponent}
|
|
1551
|
+
*/
|
|
1552
|
+
declare class UploadDropZoneComponent extends DropZoneBase {
|
|
1553
|
+
private localization;
|
|
1554
|
+
hostClass: boolean;
|
|
1555
|
+
get dirAttribute(): string;
|
|
1556
|
+
/**
|
|
1557
|
+
* Specifies the id of the component.
|
|
1558
|
+
* Use this id to associate the DropZone with an existing Upload or FileSelect component.
|
|
1559
|
+
*/
|
|
1560
|
+
zoneId: string;
|
|
1561
|
+
/**
|
|
1562
|
+
* Specifies the name for an existing icon in a Kendo UI theme.
|
|
1563
|
+
* The icon renders inside the DropZone.
|
|
1564
|
+
*/
|
|
1565
|
+
icon: string;
|
|
1566
|
+
/**
|
|
1567
|
+
* Specifies a CSS class or multiple classes separated by spaces which apply to a span element.
|
|
1568
|
+
* Use this property to apply custom icons.
|
|
1569
|
+
*/
|
|
1570
|
+
iconClass: string;
|
|
1571
|
+
/**
|
|
1572
|
+
* Specifies an SVGIcon to render inside the DropZone.
|
|
1573
|
+
* The input accepts either an [existing Kendo SVG icon](https://www.telerik.com/kendo-angular-ui/components/icons/svgicon/svgicon-list) or a custom one.
|
|
1574
|
+
*/
|
|
1575
|
+
set svgIcon(icon: SVGIcon);
|
|
1576
|
+
get svgIcon(): SVGIcon;
|
|
1577
|
+
private direction;
|
|
1578
|
+
private localizationChangeSubscription;
|
|
1579
|
+
private _svgIcon;
|
|
1580
|
+
constructor(element: ElementRef, renderer: Renderer2, localization: LocalizationService);
|
|
1581
|
+
/**
|
|
1582
|
+
* @hidden
|
|
1583
|
+
*/
|
|
1584
|
+
textFor(key: string): string;
|
|
1585
|
+
/**
|
|
1586
|
+
* @hidden
|
|
1587
|
+
*/
|
|
1588
|
+
get iconClasses(): string;
|
|
1589
|
+
ngOnDestroy(): void;
|
|
1590
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UploadDropZoneComponent, never>;
|
|
1591
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UploadDropZoneComponent, "kendo-uploaddropzone", ["kendoUploadDropZone"], { "zoneId": { "alias": "zoneId"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "iconClass": { "alias": "iconClass"; "required": false; }; "svgIcon": { "alias": "svgIcon"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
1592
|
+
}
|
|
1593
|
+
|
|
1594
|
+
/**
|
|
1595
|
+
* Represents the [NgModule](https://angular.io/api/core/NgModule) definition for the FileSelect component.
|
|
1596
|
+
*/
|
|
1597
|
+
declare class FileSelectModule {
|
|
1598
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FileSelectModule, never>;
|
|
1599
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<FileSelectModule, never, [typeof FileSelectComponent, typeof FileTemplateDirective, typeof FileInfoTemplateDirective, typeof CustomMessagesComponent, typeof UploadDropZoneDirective, typeof UploadDropZoneComponent], [typeof FileSelectComponent, typeof FileTemplateDirective, typeof FileInfoTemplateDirective, typeof CustomMessagesComponent, typeof UploadDropZoneDirective, typeof UploadDropZoneComponent]>;
|
|
1600
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<FileSelectModule>;
|
|
1601
|
+
}
|
|
1602
|
+
|
|
1603
|
+
/**
|
|
1604
|
+
* @hidden
|
|
1605
|
+
*/
|
|
1606
|
+
declare class UploadActionButtonsComponent {
|
|
1607
|
+
private uploadService;
|
|
1608
|
+
private localization;
|
|
1609
|
+
private navigation;
|
|
1610
|
+
disabled: boolean;
|
|
1611
|
+
actionsLayout: ActionsLayout;
|
|
1612
|
+
clearButton: ElementRef;
|
|
1613
|
+
uploadButton: ElementRef;
|
|
1614
|
+
hostDefaultClass: boolean;
|
|
1615
|
+
hostHorizontalClass: boolean;
|
|
1616
|
+
get actionButtonsEndClassName(): boolean;
|
|
1617
|
+
get actionButtonsStretchedClassName(): boolean;
|
|
1618
|
+
get actionButtonsStartClassName(): boolean;
|
|
1619
|
+
get actionButtonsCenterClassName(): boolean;
|
|
1620
|
+
constructor(uploadService: UploadService, localization: LocalizationService, navigation: NavigationService);
|
|
1621
|
+
onUploadButtonFocus(): void;
|
|
1622
|
+
onUploadButtonClick(event?: any): void;
|
|
1623
|
+
performUpload(): void;
|
|
1624
|
+
onClearButtonClick(event?: any): void;
|
|
1625
|
+
clearFiles(): void;
|
|
1626
|
+
textFor(key: string): string;
|
|
1627
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UploadActionButtonsComponent, never>;
|
|
1628
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UploadActionButtonsComponent, "kendo-upload-action-buttons", never, { "disabled": { "alias": "disabled"; "required": false; }; "actionsLayout": { "alias": "actionsLayout"; "required": false; }; }, {}, never, never, true, never>;
|
|
1629
|
+
}
|
|
1630
|
+
|
|
1631
|
+
/**
|
|
1632
|
+
* @hidden
|
|
1633
|
+
*/
|
|
1634
|
+
declare class UploadStatusTotalComponent implements DoCheck {
|
|
1635
|
+
private localization;
|
|
1636
|
+
fileList: FileMap;
|
|
1637
|
+
isFailed: boolean;
|
|
1638
|
+
isPaused: boolean;
|
|
1639
|
+
isUploading: boolean;
|
|
1640
|
+
statusText: string;
|
|
1641
|
+
checkmarkIcon: SVGIcon;
|
|
1642
|
+
exceptionSVGIcon: SVGIcon;
|
|
1643
|
+
uploadSVGIcon: SVGIcon;
|
|
1644
|
+
pauseSVGIcon: SVGIcon;
|
|
1645
|
+
constructor(localization: LocalizationService);
|
|
1646
|
+
get iconClass(): string;
|
|
1647
|
+
get SVGIconClass(): SVGIcon;
|
|
1648
|
+
ngDoCheck(): void;
|
|
1649
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UploadStatusTotalComponent, never>;
|
|
1650
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UploadStatusTotalComponent, "kendo-upload-status-total", never, { "fileList": { "alias": "fileList"; "required": false; }; }, {}, never, never, true, never>;
|
|
1651
|
+
}
|
|
1652
|
+
|
|
1653
|
+
/**
|
|
1654
|
+
* Represents the [NgModule](https://angular.io/api/core/NgModule) definition for the Upload component.
|
|
1655
|
+
*/
|
|
1656
|
+
declare class UploadModule {
|
|
1657
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UploadModule, never>;
|
|
1658
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<UploadModule, never, [typeof UploadComponent, typeof UploadActionButtonsComponent, typeof UploadStatusTotalComponent, typeof FileTemplateDirective, typeof FileInfoTemplateDirective, typeof CustomMessagesComponent, typeof UploadDropZoneDirective, typeof UploadDropZoneComponent], [typeof UploadComponent, typeof UploadActionButtonsComponent, typeof UploadStatusTotalComponent, typeof FileTemplateDirective, typeof FileInfoTemplateDirective, typeof CustomMessagesComponent, typeof UploadDropZoneDirective, typeof UploadDropZoneComponent]>;
|
|
1659
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<UploadModule>;
|
|
1660
|
+
}
|
|
1661
|
+
|
|
1662
|
+
/**
|
|
1663
|
+
* Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
|
|
1664
|
+
* definition for the Uploads components.
|
|
1665
|
+
*
|
|
1666
|
+
* @example
|
|
1667
|
+
*
|
|
1668
|
+
* ```ts-no-run
|
|
1669
|
+
* import { UploadsModule } from '@progress/kendo-angular-upload';
|
|
1670
|
+
*
|
|
1671
|
+
* import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
1672
|
+
* import { NgModule } from '@angular/core';
|
|
1673
|
+
*
|
|
1674
|
+
* import { AppComponent } from './app.component';
|
|
1675
|
+
*
|
|
1676
|
+
* _@NgModule({
|
|
1677
|
+
* declarations: [AppComponent],
|
|
1678
|
+
* imports: [BrowserModule, UploadsModule],
|
|
1679
|
+
* bootstrap: [AppComponent]
|
|
1680
|
+
* })
|
|
1681
|
+
* export class AppModule {}
|
|
1682
|
+
*
|
|
1683
|
+
* platformBrowserDynamic().bootstrapModule(AppModule);
|
|
1684
|
+
*
|
|
1685
|
+
* ```
|
|
1686
|
+
*/
|
|
1687
|
+
declare class UploadsModule {
|
|
1688
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UploadsModule, never>;
|
|
1689
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<UploadsModule, never, [typeof FileSelectComponent, typeof FileTemplateDirective, typeof FileInfoTemplateDirective, typeof CustomMessagesComponent, typeof UploadDropZoneDirective, typeof UploadDropZoneComponent, typeof UploadComponent, typeof UploadActionButtonsComponent, typeof UploadStatusTotalComponent, typeof FileTemplateDirective, typeof FileInfoTemplateDirective, typeof CustomMessagesComponent, typeof UploadDropZoneDirective, typeof UploadDropZoneComponent], [typeof FileSelectComponent, typeof FileTemplateDirective, typeof FileInfoTemplateDirective, typeof CustomMessagesComponent, typeof UploadDropZoneDirective, typeof UploadDropZoneComponent, typeof UploadComponent, typeof UploadActionButtonsComponent, typeof UploadStatusTotalComponent, typeof FileTemplateDirective, typeof FileInfoTemplateDirective, typeof CustomMessagesComponent, typeof UploadDropZoneDirective, typeof UploadDropZoneComponent]>;
|
|
1690
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<UploadsModule>;
|
|
1691
|
+
}
|
|
1692
|
+
|
|
1693
|
+
/**
|
|
1694
|
+
* @hidden
|
|
1695
|
+
*/
|
|
1696
|
+
declare class FileSelectDirective {
|
|
1697
|
+
private uploadService;
|
|
1698
|
+
private navigation;
|
|
1699
|
+
dir: Direction;
|
|
1700
|
+
disabled: boolean;
|
|
1701
|
+
multiple: boolean;
|
|
1702
|
+
restrictions: FileRestrictions;
|
|
1703
|
+
accept: string;
|
|
1704
|
+
required: boolean;
|
|
1705
|
+
type: string;
|
|
1706
|
+
autocomplete: string;
|
|
1707
|
+
tabIndex: number;
|
|
1708
|
+
ariaHidden: boolean;
|
|
1709
|
+
element: ElementRef;
|
|
1710
|
+
constructor(uploadService: UploadService, navigation: NavigationService, el: ElementRef);
|
|
1711
|
+
classNames: boolean;
|
|
1712
|
+
get nameAttribute(): string;
|
|
1713
|
+
get multipleAttribute(): string;
|
|
1714
|
+
get dirAttribute(): string;
|
|
1715
|
+
get disabledAttribute(): string;
|
|
1716
|
+
get acceptAttribute(): string;
|
|
1717
|
+
get requiredAttribute(): string;
|
|
1718
|
+
onInputChange(event: any): void;
|
|
1719
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FileSelectDirective, never>;
|
|
1720
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FileSelectDirective, "[kendoFileSelect]", never, { "dir": { "alias": "dir"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "restrictions": { "alias": "restrictions"; "required": false; }; "accept": { "alias": "accept"; "required": false; }; "required": { "alias": "required"; "required": false; }; }, {}, never, never, true, never>;
|
|
1721
|
+
}
|
|
1722
|
+
|
|
1723
|
+
/**
|
|
1724
|
+
* @hidden
|
|
1725
|
+
*/
|
|
1726
|
+
declare class FileListItemDirective {
|
|
1727
|
+
private navigationService;
|
|
1728
|
+
private uploadService;
|
|
1729
|
+
files: Array<FileInfo>;
|
|
1730
|
+
index: number;
|
|
1731
|
+
fileClass: boolean;
|
|
1732
|
+
focused: boolean;
|
|
1733
|
+
element: ElementRef;
|
|
1734
|
+
constructor(el: ElementRef, navigationService: NavigationService, uploadService: UploadService);
|
|
1735
|
+
focus(): void;
|
|
1736
|
+
get uidAttribute(): string;
|
|
1737
|
+
get tabIndex(): string;
|
|
1738
|
+
get kFileError(): boolean;
|
|
1739
|
+
get kFileInvalid(): boolean;
|
|
1740
|
+
get kFileProgress(): boolean;
|
|
1741
|
+
get kFileSuccess(): boolean;
|
|
1742
|
+
get kStateFocused(): boolean;
|
|
1743
|
+
onFocus(): void;
|
|
1744
|
+
onBlur(): void;
|
|
1745
|
+
onClick(event: any): void;
|
|
1746
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FileListItemDirective, never>;
|
|
1747
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FileListItemDirective, "[kendoUploadFileListItem]", never, { "files": { "alias": "files"; "required": false; }; "index": { "alias": "index"; "required": false; }; }, {}, never, never, true, never>;
|
|
1748
|
+
}
|
|
1749
|
+
|
|
1750
|
+
/**
|
|
1751
|
+
* @hidden
|
|
1752
|
+
*/
|
|
1753
|
+
declare class FileListComponent implements OnDestroy {
|
|
1754
|
+
private uploadService;
|
|
1755
|
+
private navigation;
|
|
1756
|
+
disabled: boolean;
|
|
1757
|
+
fileList: Array<Array<FileInfo>>;
|
|
1758
|
+
fileTemplate: FileTemplateDirective;
|
|
1759
|
+
fileInfoTemplate: FileInfoTemplateDirective;
|
|
1760
|
+
fileListItems: QueryList<FileListItemDirective>;
|
|
1761
|
+
fileListRole: string;
|
|
1762
|
+
private focusSubscription;
|
|
1763
|
+
private actionSubscription;
|
|
1764
|
+
constructor(uploadService: UploadService, navigation: NavigationService);
|
|
1765
|
+
onItemFocus(): void;
|
|
1766
|
+
onItemAction(): void;
|
|
1767
|
+
itemActionHandler(key: string): void;
|
|
1768
|
+
hasDelete(item: FileListItemDirective): boolean;
|
|
1769
|
+
/**
|
|
1770
|
+
* Tracks files array by the UID of the first file in the batch.
|
|
1771
|
+
* Each batch of files shares the same UID, which remains stable
|
|
1772
|
+
* throughout the file lifecycle until the batch is removed.
|
|
1773
|
+
*/
|
|
1774
|
+
trackByUid(index: number, files: Array<FileInfo>): string;
|
|
1775
|
+
ngOnDestroy(): void;
|
|
1776
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FileListComponent, never>;
|
|
1777
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FileListComponent, "[kendo-upload-file-list]", never, { "disabled": { "alias": "disabled"; "required": false; }; "fileList": { "alias": "fileList"; "required": false; }; "fileTemplate": { "alias": "fileTemplate"; "required": false; }; "fileInfoTemplate": { "alias": "fileInfoTemplate"; "required": false; }; }, {}, never, never, true, never>;
|
|
1778
|
+
}
|
|
1779
|
+
|
|
1780
|
+
/**
|
|
1781
|
+
* @hidden
|
|
1782
|
+
*/
|
|
1783
|
+
declare class FileListItemBase implements OnDestroy {
|
|
1784
|
+
protected uploadService: UploadService;
|
|
1785
|
+
protected cdr: ChangeDetectorRef;
|
|
1786
|
+
progressComplete: number;
|
|
1787
|
+
protected localization: LocalizationService;
|
|
1788
|
+
protected uploadProgressSubscription: Subscription;
|
|
1789
|
+
constructor(uploadService: UploadService, cdr: ChangeDetectorRef);
|
|
1790
|
+
protected subscribeUploadProgress(uploadProgressHandler: (args: UploadProgressEvent) => void): void;
|
|
1791
|
+
protected fileHasValidationErrors(file: FileInfo): boolean;
|
|
1792
|
+
protected filesHaveValidationErrors(files: Array<FileInfo>): boolean;
|
|
1793
|
+
ngOnDestroy(): void;
|
|
1794
|
+
getFileValidationMessage(file: FileInfo): string;
|
|
1795
|
+
getTotalFilesSizeMessage(files: Array<FileInfo>): string;
|
|
1796
|
+
textFor(key: string): string;
|
|
1797
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FileListItemBase, never>;
|
|
1798
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FileListItemBase, "ng-component", never, {}, {}, never, never, true, never>;
|
|
1799
|
+
}
|
|
1800
|
+
|
|
1801
|
+
/**
|
|
1802
|
+
* @hidden
|
|
1803
|
+
*/
|
|
1804
|
+
declare class FileListSingleItemComponent extends FileListItemBase {
|
|
1805
|
+
protected localization: LocalizationService;
|
|
1806
|
+
disabled: boolean;
|
|
1807
|
+
file: FileInfo;
|
|
1808
|
+
fileInfoTemplate: FileInfoTemplateDirective;
|
|
1809
|
+
constructor(localization: LocalizationService, uploadService: UploadService, cdr: ChangeDetectorRef);
|
|
1810
|
+
get fileStatusText(): string;
|
|
1811
|
+
get showProgress(): string;
|
|
1812
|
+
get fileGroupClass(): string;
|
|
1813
|
+
get fileSVGGroupIcon(): SVGIcon;
|
|
1814
|
+
get isUploadSuccessful(): boolean;
|
|
1815
|
+
get isUploadFailed(): boolean;
|
|
1816
|
+
get isNotYetUploaded(): boolean;
|
|
1817
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FileListSingleItemComponent, never>;
|
|
1818
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FileListSingleItemComponent, "kendo-upload-file-list-single-item", never, { "disabled": { "alias": "disabled"; "required": false; }; "file": { "alias": "file"; "required": false; }; "fileInfoTemplate": { "alias": "fileInfoTemplate"; "required": false; }; }, {}, never, never, true, never>;
|
|
1819
|
+
}
|
|
1820
|
+
|
|
1821
|
+
/**
|
|
1822
|
+
* @hidden
|
|
1823
|
+
*/
|
|
1824
|
+
declare class FileListItemActionButtonComponent {
|
|
1825
|
+
private uploadService;
|
|
1826
|
+
private localization;
|
|
1827
|
+
private navigation;
|
|
1828
|
+
file: FileInfo;
|
|
1829
|
+
disabled: boolean;
|
|
1830
|
+
progress: number;
|
|
1831
|
+
retrySVGIcon: SVGIcon;
|
|
1832
|
+
playSVGIcon: SVGIcon;
|
|
1833
|
+
pauseSVGIcon: SVGIcon;
|
|
1834
|
+
cancelSVGIcon: SVGIcon;
|
|
1835
|
+
deleteSVGIcon: SVGIcon;
|
|
1836
|
+
constructor(uploadService: UploadService, localization: LocalizationService, navigation: NavigationService);
|
|
1837
|
+
onRetryClick(): void;
|
|
1838
|
+
onRemoveCancelClick(event?: any): void;
|
|
1839
|
+
onPauseResumeClick(): void;
|
|
1840
|
+
get actionButtonTitle(): string;
|
|
1841
|
+
get retryButtonTitle(): string;
|
|
1842
|
+
get pauseResumeButtonTitle(): string;
|
|
1843
|
+
get isUploading(): boolean;
|
|
1844
|
+
get isFailed(): boolean;
|
|
1845
|
+
get isPaused(): boolean;
|
|
1846
|
+
get isResumable(): boolean;
|
|
1847
|
+
get isActionButtonVisible(): boolean;
|
|
1848
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FileListItemActionButtonComponent, never>;
|
|
1849
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FileListItemActionButtonComponent, "kendo-upload-file-list-item-action-button", never, { "file": { "alias": "file"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "progress": { "alias": "progress"; "required": false; }; }, {}, never, never, true, never>;
|
|
1850
|
+
}
|
|
1851
|
+
|
|
1852
|
+
/**
|
|
1853
|
+
* @hidden
|
|
1854
|
+
*/
|
|
1855
|
+
declare class FileListMultipleItemsComponent extends FileListItemBase implements OnInit {
|
|
1856
|
+
protected localization: LocalizationService;
|
|
1857
|
+
disabled: boolean;
|
|
1858
|
+
files: Array<FileInfo>;
|
|
1859
|
+
fileInfoTemplate: FileInfoTemplateDirective;
|
|
1860
|
+
filesHaveErrors: boolean;
|
|
1861
|
+
copySVGIcon: SVGIcon;
|
|
1862
|
+
constructor(localization: LocalizationService, uploadService: UploadService, cdr: ChangeDetectorRef);
|
|
1863
|
+
get showProgress(): string;
|
|
1864
|
+
ngOnInit(): void;
|
|
1865
|
+
fileStatusText(file: FileInfo): any;
|
|
1866
|
+
get batchStatusText(): string;
|
|
1867
|
+
get isUploadSuccessful(): boolean;
|
|
1868
|
+
get isUploadFailed(): boolean;
|
|
1869
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FileListMultipleItemsComponent, never>;
|
|
1870
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FileListMultipleItemsComponent, "kendo-upload-file-list-multiple-items", never, { "disabled": { "alias": "disabled"; "required": false; }; "files": { "alias": "files"; "required": false; }; "fileInfoTemplate": { "alias": "fileInfoTemplate"; "required": false; }; }, {}, never, never, true, never>;
|
|
1871
|
+
}
|
|
1872
|
+
|
|
1873
|
+
/**
|
|
1874
|
+
* @hidden
|
|
1875
|
+
*/
|
|
1876
|
+
declare const validateFiles: Function;
|
|
1877
|
+
|
|
1878
|
+
/**
|
|
1879
|
+
* Calculates the total size of the files in KB or MB.
|
|
1880
|
+
*/
|
|
1881
|
+
declare const getTotalFilesSizeMessage: Function;
|
|
1882
|
+
/**
|
|
1883
|
+
* Matches the file extension with the corresponding SVG icon.
|
|
1884
|
+
* @returns The SVG icon that corresponds to the file extension.
|
|
1885
|
+
*/
|
|
1886
|
+
declare const fileSVGGroupIcon: (extension: string) => SVGIcon$1;
|
|
1887
|
+
/**
|
|
1888
|
+
* Matches the file extension with the corresponding CSS class.
|
|
1889
|
+
* @returns The CSS class name that corresponds to the file extension.
|
|
1890
|
+
*/
|
|
1891
|
+
declare const fileGroupClass: (extension: string) => string;
|
|
1892
|
+
|
|
1893
|
+
/**
|
|
1894
|
+
* Defines the settings interface for the FileSelect functionality used in components that integrate the FileSelect component.
|
|
1895
|
+
*
|
|
1896
|
+
* @example
|
|
1897
|
+
* ```typescript
|
|
1898
|
+
* const fileSelectSettings: FileSelectSettings = {
|
|
1899
|
+
* multiple: true,
|
|
1900
|
+
* disabled: false
|
|
1901
|
+
* };
|
|
1902
|
+
* ```
|
|
1903
|
+
*/
|
|
1904
|
+
interface FileSelectSettings {
|
|
1905
|
+
/**
|
|
1906
|
+
* Sets the `accept` attribute of the internal `input` element of the component.
|
|
1907
|
+
*/
|
|
1908
|
+
accept?: string;
|
|
1909
|
+
/**
|
|
1910
|
+
* Disables the component.
|
|
1911
|
+
*/
|
|
1912
|
+
disabled?: boolean;
|
|
1913
|
+
/**
|
|
1914
|
+
* Allows you to select multiple files. When you set this to `false`, you can select only one file at a time.
|
|
1915
|
+
*/
|
|
1916
|
+
multiple?: boolean;
|
|
1917
|
+
/**
|
|
1918
|
+
* Specifies the `name` attribute of the `input` element of the FileSelect.
|
|
1919
|
+
*/
|
|
1920
|
+
name?: string;
|
|
1921
|
+
/**
|
|
1922
|
+
* Sets the restrictions for selected files.
|
|
1923
|
+
*/
|
|
1924
|
+
restrictions?: FileRestrictions;
|
|
1925
|
+
/**
|
|
1926
|
+
* Controls the visibility of the file list.
|
|
1927
|
+
*/
|
|
1928
|
+
showFileList?: boolean;
|
|
1929
|
+
/**
|
|
1930
|
+
* Sets the `tabindex` of the component.
|
|
1931
|
+
*/
|
|
1932
|
+
tabindex?: number;
|
|
1933
|
+
/**
|
|
1934
|
+
* Sets the `id` of the external drop zone that you want to associate with the component.
|
|
1935
|
+
*/
|
|
1936
|
+
zoneId?: string;
|
|
1937
|
+
}
|
|
1938
|
+
|
|
1939
|
+
/**
|
|
1940
|
+
* Use the `KENDO_FILESELECT` utility array to add all FileSelect-related components and directives to a standalone Angular component.
|
|
1941
|
+
*
|
|
1942
|
+
* @example
|
|
1943
|
+
* ```typescript
|
|
1944
|
+
* import { Component } from '@angular/core';
|
|
1945
|
+
* import { KENDO_FILESELECT } from '@progress/kendo-angular-upload';
|
|
1946
|
+
*
|
|
1947
|
+
* @Component({
|
|
1948
|
+
* selector: 'my-app',
|
|
1949
|
+
* standalone: true,
|
|
1950
|
+
* imports: [KENDO_FILESELECT],
|
|
1951
|
+
* template: `<kendo-fileselect></kendo-fileselect>`
|
|
1952
|
+
* })
|
|
1953
|
+
* export class AppComponent {}
|
|
1954
|
+
* ```
|
|
1955
|
+
*/
|
|
1956
|
+
declare const KENDO_FILESELECT: readonly [typeof FileSelectComponent, typeof FileTemplateDirective, typeof FileInfoTemplateDirective, typeof CustomMessagesComponent, typeof UploadDropZoneDirective, typeof UploadDropZoneComponent];
|
|
1957
|
+
/**
|
|
1958
|
+
* Use the `KENDO_UPLOAD` utility array to add all Upload-related components and directives to a standalone Angular component.
|
|
1959
|
+
*
|
|
1960
|
+
* @example
|
|
1961
|
+
* ```typescript
|
|
1962
|
+
* import { Component } from '@angular/core';
|
|
1963
|
+
* import { KENDO_UPLOAD } from '@progress/kendo-angular-upload';
|
|
1964
|
+
*
|
|
1965
|
+
* @Component({
|
|
1966
|
+
* selector: 'my-app',
|
|
1967
|
+
* standalone: true,
|
|
1968
|
+
* imports: [KENDO_UPLOAD],
|
|
1969
|
+
* template: `<kendo-upload></kendo-upload>`
|
|
1970
|
+
* })
|
|
1971
|
+
* export class AppComponent {}
|
|
1972
|
+
* ```
|
|
1973
|
+
*/
|
|
1974
|
+
declare const KENDO_UPLOAD: readonly [typeof UploadComponent, typeof UploadActionButtonsComponent, typeof UploadStatusTotalComponent, typeof FileTemplateDirective, typeof FileInfoTemplateDirective, typeof CustomMessagesComponent, typeof UploadDropZoneDirective, typeof UploadDropZoneComponent];
|
|
1975
|
+
/**
|
|
1976
|
+
* Use the `KENDO_UPLOADS` utility array to add all `@progress/kendo-angular-upload`-related components and directives to a standalone Angular component.
|
|
1977
|
+
*
|
|
1978
|
+
* @example
|
|
1979
|
+
* ```typescript
|
|
1980
|
+
* import { Component } from '@angular/core';
|
|
1981
|
+
* import { KENDO_UPLOADS } from '@progress/kendo-angular-upload';
|
|
1982
|
+
*
|
|
1983
|
+
* @Component({
|
|
1984
|
+
* selector: 'my-app',
|
|
1985
|
+
* standalone: true,
|
|
1986
|
+
* imports: [KENDO_UPLOADS],
|
|
1987
|
+
* template: `
|
|
1988
|
+
* <kendo-upload></kendo-upload>
|
|
1989
|
+
* <kendo-fileselect></kendo-fileselect>
|
|
1990
|
+
* `
|
|
1991
|
+
* })
|
|
1992
|
+
* export class AppComponent {}
|
|
1993
|
+
* ```
|
|
1994
|
+
*/
|
|
1995
|
+
declare const KENDO_UPLOADS: readonly [typeof FileSelectComponent, typeof FileTemplateDirective, typeof FileInfoTemplateDirective, typeof CustomMessagesComponent, typeof UploadDropZoneDirective, typeof UploadDropZoneComponent, typeof UploadComponent, typeof UploadActionButtonsComponent, typeof UploadStatusTotalComponent, typeof FileTemplateDirective, typeof FileInfoTemplateDirective, typeof CustomMessagesComponent, typeof UploadDropZoneDirective, typeof UploadDropZoneComponent];
|
|
1996
|
+
|
|
1997
|
+
export { CancelEvent, ClearEvent, CustomMessagesComponent, DropZoneService, ErrorEvent, FileInfoTemplateDirective, FileListComponent, FileListItemActionButtonComponent, FileListItemBase, FileListMultipleItemsComponent, FileListSingleItemComponent, FileMap, FileSelectComponent, FileSelectDirective, FileSelectModule, FileState, FileTemplateDirective, KENDO_FILESELECT, KENDO_UPLOAD, KENDO_UPLOADS, NavigationService, PauseEvent, RemoveEvent, ResumeEvent, SelectEvent, SuccessEvent, UPLOAD_VALUE_ACCESSOR, UploadActionButtonsComponent, UploadComponent, UploadDropZoneComponent, UploadDropZoneDirective, UploadEvent, UploadModule, UploadProgressEvent, UploadService, UploadStatusTotalComponent, UploadsModule, fileGroupClass, fileSVGGroupIcon, getTotalFilesSizeMessage, validateFiles };
|
|
1998
|
+
export type { ActionsLayout, ChunkMetadata, ChunkSettings, FileInfo, FileRestrictions, FileSelectSettings, OperationType };
|