@syncfusion/ej2-inputs 31.1.17 → 31.1.21

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.
Files changed (107) hide show
  1. package/dist/ej2-inputs.min.js +2 -2
  2. package/dist/ej2-inputs.umd.min.js +2 -2
  3. package/dist/ej2-inputs.umd.min.js.map +1 -1
  4. package/dist/es6/ej2-inputs.es2015.js +11 -3
  5. package/dist/es6/ej2-inputs.es2015.js.map +1 -1
  6. package/dist/es6/ej2-inputs.es5.js +11 -3
  7. package/dist/es6/ej2-inputs.es5.js.map +1 -1
  8. package/dist/global/ej2-inputs.min.js +2 -2
  9. package/dist/global/ej2-inputs.min.js.map +1 -1
  10. package/dist/global/index.d.ts +1 -1
  11. package/package.json +11 -61
  12. package/src/color-picker/color-picker.js +4 -3
  13. package/src/textbox/textbox.js +7 -0
  14. package/styles/bootstrap4-lite.css +2 -2
  15. package/styles/bootstrap4.css +2 -2
  16. package/styles/bootstrap5-dark-lite.css +2 -2
  17. package/styles/bootstrap5-dark.css +2 -2
  18. package/styles/bootstrap5-lite.css +2 -2
  19. package/styles/bootstrap5.css +2 -2
  20. package/styles/input/_bootstrap4-definition.scss +1 -1
  21. package/styles/input/_bootstrap5-definition.scss +1 -1
  22. package/styles/input/bootstrap4.css +2 -2
  23. package/styles/input/bootstrap5-dark.css +2 -2
  24. package/styles/input/bootstrap5.css +2 -2
  25. package/dist/ts/color-picker/color-picker-model.d.ts +0 -186
  26. package/dist/ts/color-picker/color-picker.d.ts +0 -398
  27. package/dist/ts/color-picker/color-picker.ts +0 -2209
  28. package/dist/ts/color-picker/index.d.ts +0 -5
  29. package/dist/ts/color-picker/index.ts +0 -5
  30. package/dist/ts/common/index.d.ts +0 -4
  31. package/dist/ts/common/index.ts +0 -4
  32. package/dist/ts/common/signature-base.d.ts +0 -340
  33. package/dist/ts/common/signature-base.ts +0 -1170
  34. package/dist/ts/form-validator/form-validator-model.d.ts +0 -121
  35. package/dist/ts/form-validator/form-validator.d.ts +0 -312
  36. package/dist/ts/form-validator/form-validator.ts +0 -1068
  37. package/dist/ts/form-validator/index.d.ts +0 -5
  38. package/dist/ts/form-validator/index.ts +0 -5
  39. package/dist/ts/index.d.ts +0 -18
  40. package/dist/ts/index.ts +0 -18
  41. package/dist/ts/input/index.d.ts +0 -4
  42. package/dist/ts/input/index.ts +0 -4
  43. package/dist/ts/input/input.d.ts +0 -345
  44. package/dist/ts/input/input.ts +0 -1277
  45. package/dist/ts/maskedtextbox/base/index.d.ts +0 -4
  46. package/dist/ts/maskedtextbox/base/index.ts +0 -4
  47. package/dist/ts/maskedtextbox/base/mask-base.d.ts +0 -134
  48. package/dist/ts/maskedtextbox/base/mask-base.ts +0 -1207
  49. package/dist/ts/maskedtextbox/index.d.ts +0 -5
  50. package/dist/ts/maskedtextbox/index.ts +0 -5
  51. package/dist/ts/maskedtextbox/maskedtextbox/index.d.ts +0 -5
  52. package/dist/ts/maskedtextbox/maskedtextbox/index.ts +0 -5
  53. package/dist/ts/maskedtextbox/maskedtextbox/maskedtextbox-model.d.ts +0 -167
  54. package/dist/ts/maskedtextbox/maskedtextbox/maskedtextbox.d.ts +0 -307
  55. package/dist/ts/maskedtextbox/maskedtextbox/maskedtextbox.ts +0 -709
  56. package/dist/ts/numerictextbox/index.d.ts +0 -5
  57. package/dist/ts/numerictextbox/index.ts +0 -5
  58. package/dist/ts/numerictextbox/numerictextbox-model.d.ts +0 -228
  59. package/dist/ts/numerictextbox/numerictextbox.d.ts +0 -431
  60. package/dist/ts/numerictextbox/numerictextbox.ts +0 -1672
  61. package/dist/ts/otp-input/index.d.ts +0 -5
  62. package/dist/ts/otp-input/index.ts +0 -5
  63. package/dist/ts/otp-input/otp-input-model.d.ts +0 -165
  64. package/dist/ts/otp-input/otp-input.d.ts +0 -365
  65. package/dist/ts/otp-input/otp-input.ts +0 -924
  66. package/dist/ts/rating/index.d.ts +0 -5
  67. package/dist/ts/rating/index.ts +0 -5
  68. package/dist/ts/rating/rating-model.d.ts +0 -239
  69. package/dist/ts/rating/rating.d.ts +0 -416
  70. package/dist/ts/rating/rating.ts +0 -1101
  71. package/dist/ts/signature/index.d.ts +0 -5
  72. package/dist/ts/signature/index.ts +0 -5
  73. package/dist/ts/signature/signature-model.d.ts +0 -131
  74. package/dist/ts/signature/signature.d.ts +0 -167
  75. package/dist/ts/signature/signature.ts +0 -266
  76. package/dist/ts/slider/index.d.ts +0 -5
  77. package/dist/ts/slider/index.ts +0 -5
  78. package/dist/ts/slider/slider-model.d.ts +0 -401
  79. package/dist/ts/slider/slider.d.ts +0 -721
  80. package/dist/ts/slider/slider.ts +0 -3497
  81. package/dist/ts/smart-textarea/caret-helper.d.ts +0 -17
  82. package/dist/ts/smart-textarea/caret-helper.ts +0 -95
  83. package/dist/ts/smart-textarea/index.d.ts +0 -5
  84. package/dist/ts/smart-textarea/index.ts +0 -5
  85. package/dist/ts/smart-textarea/smart-textarea-model.d.ts +0 -44
  86. package/dist/ts/smart-textarea/smart-textarea.d.ts +0 -80
  87. package/dist/ts/smart-textarea/smart-textarea.ts +0 -518
  88. package/dist/ts/speech-to-text/index.d.ts +0 -5
  89. package/dist/ts/speech-to-text/index.ts +0 -5
  90. package/dist/ts/speech-to-text/speech-to-text-model.d.ts +0 -270
  91. package/dist/ts/speech-to-text/speech-to-text.d.ts +0 -487
  92. package/dist/ts/speech-to-text/speech-to-text.ts +0 -1008
  93. package/dist/ts/textarea/index.d.ts +0 -5
  94. package/dist/ts/textarea/index.ts +0 -5
  95. package/dist/ts/textarea/textarea-model.d.ts +0 -161
  96. package/dist/ts/textarea/textarea.d.ts +0 -237
  97. package/dist/ts/textarea/textarea.ts +0 -812
  98. package/dist/ts/textbox/index.d.ts +0 -5
  99. package/dist/ts/textbox/index.ts +0 -5
  100. package/dist/ts/textbox/textbox-model.d.ts +0 -155
  101. package/dist/ts/textbox/textbox.d.ts +0 -288
  102. package/dist/ts/textbox/textbox.ts +0 -872
  103. package/dist/ts/uploader/index.d.ts +0 -5
  104. package/dist/ts/uploader/index.ts +0 -5
  105. package/dist/ts/uploader/uploader-model.d.ts +0 -555
  106. package/dist/ts/uploader/uploader.d.ts +0 -1216
  107. package/dist/ts/uploader/uploader.ts +0 -4391
@@ -1,1216 +0,0 @@
1
- import { Component, EmitType } from '@syncfusion/ej2-base';
2
- import { INotifyPropertyChanged } from '@syncfusion/ej2-base';
3
- import { KeyboardEventArgs, ChildProperty } from '@syncfusion/ej2-base';
4
- import { Ajax } from '@syncfusion/ej2-base';
5
- import { UploaderModel, AsyncSettingsModel, ButtonsPropsModel, FilesPropModel } from './uploader-model';
6
- export declare type DropEffect = 'Copy' | 'Move' | 'Link' | 'None' | 'Default';
7
- export declare class FilesProp extends ChildProperty<FilesProp> {
8
- /**
9
- * Specifies the name of the file
10
- *
11
- * @default ''
12
- */
13
- name: string;
14
- /**
15
- * Specifies the size of the file
16
- *
17
- * @default null
18
- */
19
- size: number;
20
- /**
21
- * Specifies the type of the file
22
- *
23
- * @default ''
24
- */
25
- type: string;
26
- }
27
- export declare class ButtonsProps extends ChildProperty<ButtonsProps> {
28
- /**
29
- * Specifies the text or html content to browse button
30
- *
31
- * @default 'Browse...'
32
- */
33
- browse: string | HTMLElement;
34
- /**
35
- * Specifies the text or html content to upload button
36
- *
37
- * @default 'Upload'
38
- */
39
- upload: string | HTMLElement;
40
- /**
41
- * Specifies the text or html content to clear button
42
- *
43
- * @default 'Clear'
44
- */
45
- clear: string | HTMLElement;
46
- }
47
- export declare class AsyncSettings extends ChildProperty<AsyncSettings> {
48
- /**
49
- * Specifies the URL of save action that will receive the upload files and save in the server.
50
- * The save action type must be POST request and define the argument as same input name used to render the component.
51
- * The upload operations could not perform without this property.
52
- *
53
- * @default ''
54
- */
55
- saveUrl: string;
56
- /**
57
- * Specifies the URL of remove action that receives the file information and handle the remove operation in server.
58
- * The remove action type must be POST request and define “removeFileNames” attribute to get file information that will be removed.
59
- * This property is optional.
60
- *
61
- * @default ''
62
- */
63
- removeUrl: string;
64
- /**
65
- * Specifies the chunk size to split the large file into chunks, and upload it to the server in a sequential order.
66
- * If the chunk size property has value, the uploader enables the chunk upload by default.
67
- * It must be specified in bytes value.
68
- *
69
- * > For more information, refer to the [chunk upload](../../uploader/chunk-upload/) section from the documentation.
70
- *
71
- * @default 0
72
- */
73
- chunkSize: number;
74
- /**
75
- * Specifies the number of retries that the uploader can perform on the file failed to upload.
76
- * By default, the uploader set 3 as maximum retries. This property must be specified to prevent infinity looping.
77
- *
78
- * @default 3
79
- */
80
- retryCount: number;
81
- /**
82
- * Specifies the delay time in milliseconds that the automatic retry happens after the delay.
83
- *
84
- * @default 500
85
- */
86
- retryAfterDelay: number;
87
- }
88
- export interface FileInfo {
89
- /**
90
- * Returns the upload file name.
91
- */
92
- name: string;
93
- /**
94
- * Returns the details about upload file.
95
- *
96
- */
97
- rawFile: string | Blob;
98
- /**
99
- * Returns the size of file in bytes.
100
- */
101
- size: number;
102
- /**
103
- * Returns the status of the file.
104
- */
105
- status: string;
106
- /**
107
- * Returns the MIME type of file as a string. Returns empty string if the file’s type is not determined.
108
- */
109
- type: string;
110
- /**
111
- * Returns the list of validation errors (if any).
112
- */
113
- validationMessages: ValidationMessages;
114
- /**
115
- * Returns the current state of the file such as Failed, Canceled, Selected, Uploaded, or Uploading.
116
- */
117
- statusCode: string;
118
- /**
119
- * Returns where the file selected from, to upload.
120
- */
121
- fileSource?: string;
122
- /**
123
- * Returns the respective file list item.
124
- */
125
- list?: HTMLElement;
126
- /**
127
- * Returns the input element mapped with file list item.
128
- */
129
- input?: HTMLInputElement;
130
- /**
131
- * Returns the unique upload file name ID.
132
- */
133
- id?: string;
134
- }
135
- export interface MetaData {
136
- chunkIndex: number;
137
- blob: Blob | string;
138
- file: FileInfo;
139
- start: number;
140
- end: number;
141
- retryCount: number;
142
- request: Ajax;
143
- }
144
- export interface ValidationMessages {
145
- /**
146
- * Returns the minimum file size validation message, if selected file size is less than specified minFileSize property.
147
- */
148
- minSize?: string;
149
- /**
150
- * Returns the maximum file size validation message, if selected file size is less than specified maxFileSize property.
151
- */
152
- maxSize?: string;
153
- }
154
- export interface SelectedEventArgs {
155
- /**
156
- * Returns the original event arguments.
157
- */
158
- event: MouseEvent | TouchEvent | DragEvent | ClipboardEvent;
159
- /**
160
- * Defines whether the current action can be prevented.
161
- */
162
- cancel: boolean;
163
- /**
164
- * Returns the list of selected files.
165
- */
166
- filesData: FileInfo[];
167
- /**
168
- * Determines whether the file list generates based on the modified data.
169
- */
170
- isModified: boolean;
171
- /**
172
- * Specifies the modified files data to generate the file items. The argument depends on `isModified` argument.
173
- */
174
- modifiedFilesData: FileInfo[];
175
- /**
176
- * Specifies the step value to the progress bar.
177
- */
178
- progressInterval: string;
179
- /**
180
- * Specifies whether the file selection has been canceled
181
- */
182
- isCanceled?: boolean;
183
- /**
184
- * Set the current request header to the XMLHttpRequest instance.
185
- *
186
- */
187
- currentRequest?: {
188
- [key: string]: string;
189
- }[];
190
- /**
191
- * Defines the additional data in key and value pair format that will be submitted to the upload action.
192
- */
193
- customFormData: {
194
- [key: string]: Object;
195
- }[];
196
- }
197
- export interface BeforeRemoveEventArgs {
198
- /**
199
- * Defines whether the current action can be prevented.
200
- */
201
- cancel: boolean;
202
- /**
203
- * Defines the additional data with key and value pair format that will be submitted to the remove action.
204
- *
205
- */
206
- customFormData: {
207
- [key: string]: Object;
208
- }[];
209
- /**
210
- * Returns the XMLHttpRequest instance that is associated with remove action.
211
- *
212
- */
213
- currentRequest?: {
214
- [key: string]: string;
215
- }[];
216
- }
217
- export interface RemovingEventArgs {
218
- /**
219
- * Defines whether the current action can be prevented.
220
- */
221
- cancel: boolean;
222
- /**
223
- * Defines the additional data with key and value pair format that will be submitted to the remove action.
224
- *
225
- */
226
- customFormData: {
227
- [key: string]: Object;
228
- }[];
229
- /**
230
- * Returns the original event arguments.
231
- */
232
- event: MouseEvent | TouchEvent | KeyboardEventArgs;
233
- /**
234
- * Returns the list of files’ details that will be removed.
235
- */
236
- filesData: FileInfo[];
237
- /**
238
- * Returns the XMLHttpRequest instance that is associated with remove action.
239
- *
240
- */
241
- currentRequest?: XMLHttpRequest;
242
- /**
243
- * Defines whether the selected raw file send to server remove action.
244
- * Set true to send raw file.
245
- * Set false to send file name only.
246
- */
247
- postRawFile?: boolean;
248
- }
249
- export interface ClearingEventArgs {
250
- /**
251
- * Defines whether the current action can be prevented.
252
- */
253
- cancel: boolean;
254
- /**
255
- * Returns the list of files that will be cleared from the FileList.
256
- */
257
- filesData: FileInfo[];
258
- }
259
- export interface BeforeUploadEventArgs {
260
- /**
261
- * Defines whether the current action can be prevented.
262
- */
263
- cancel: boolean;
264
- /**
265
- * Defines the additional data in key and value pair format that will be submitted to the upload action.
266
- *
267
- */
268
- customFormData: {
269
- [key: string]: Object;
270
- }[];
271
- /**
272
- * Returns the XMLHttpRequest instance that is associated with upload action.
273
- *
274
- */
275
- currentRequest?: {
276
- [key: string]: string;
277
- }[];
278
- }
279
- export interface UploadingEventArgs {
280
- /**
281
- * Returns the list of files that will be uploaded.
282
- */
283
- fileData: FileInfo;
284
- /**
285
- * Defines the additional data in key and value pair format that will be submitted to the upload action.
286
- *
287
- * @deprecated
288
- */
289
- customFormData: {
290
- [key: string]: Object;
291
- }[];
292
- /**
293
- * Defines whether the current action can be prevented.
294
- */
295
- cancel: boolean;
296
- /**
297
- * Returns the chunk size in bytes if the chunk upload is enabled.
298
- */
299
- chunkSize?: number;
300
- /**
301
- * Returns the index of current chunk if the chunk upload is enabled.
302
- */
303
- currentChunkIndex?: number;
304
- /**
305
- * Returns the XMLHttpRequest instance that is associated with upload action.
306
- *
307
- * @deprecated
308
- */
309
- currentRequest?: XMLHttpRequest;
310
- }
311
- export interface ProgressEventArgs {
312
- /**
313
- * Returns the original event arguments.
314
- */
315
- e?: object;
316
- /**
317
- * Returns the details about upload file.
318
- */
319
- file?: FileInfo;
320
- /**
321
- * Returns the upload event operation.
322
- */
323
- operation?: string;
324
- }
325
- export interface UploadChangeEventArgs {
326
- /**
327
- * Returns the list of files that will be cleared from the FileList.
328
- *
329
- */
330
- files?: FileInfo[];
331
- }
332
- export interface FailureEventArgs extends SuccessEventArgs {
333
- }
334
- export interface SuccessEventArgs {
335
- /**
336
- * Returns the original event arguments.
337
- */
338
- e?: object;
339
- /**
340
- * Returns the details about upload file.
341
- */
342
- file?: FileInfo;
343
- /**
344
- * Returns the upload status.
345
- */
346
- statusText?: string;
347
- /**
348
- * Returns the upload event operation.
349
- */
350
- operation: string;
351
- /**
352
- * Returns the upload event operation.
353
- */
354
- response?: ResponseEventArgs;
355
- /**
356
- * Returns the upload chunk index.
357
- */
358
- chunkIndex?: number;
359
- /**
360
- * Returns the upload chunk size.
361
- */
362
- chunkSize?: number;
363
- /**
364
- * Returns the total chunk size.
365
- */
366
- totalChunk?: number;
367
- /**
368
- * Returns the original event arguments.
369
- */
370
- event?: object;
371
- }
372
- export interface ResponseEventArgs {
373
- headers?: string;
374
- readyState?: object;
375
- statusCode?: object;
376
- statusText?: string;
377
- withCredentials?: boolean;
378
- }
379
- export interface CancelEventArgs {
380
- /**
381
- * Defines whether the current action can be prevented.
382
- */
383
- cancel: boolean;
384
- /**
385
- * Returns the original event arguments.
386
- */
387
- event: ProgressEventInit;
388
- /**
389
- * Returns the file details that will be canceled.
390
- */
391
- fileData: FileInfo;
392
- /**
393
- * Defines the additional data in key and value pair format that will be submitted when the upload action is canceled.
394
- *
395
- */
396
- customFormData: {
397
- [key: string]: Object;
398
- }[];
399
- /**
400
- * Defines the additional data in key and value pair format that will be submitted on the header when the upload action is canceled.
401
- *
402
- */
403
- currentRequest?: {
404
- [key: string]: string;
405
- }[];
406
- }
407
- export interface PauseResumeEventArgs {
408
- /**
409
- * Returns the original event arguments.
410
- */
411
- event: Event;
412
- /**
413
- * Returns the file data that is Paused or Resumed.
414
- */
415
- file: FileInfo;
416
- /**
417
- * Returns the total number of chunks.
418
- */
419
- chunkCount: number;
420
- /**
421
- * Returns the index of chunk that is Paused or Resumed.
422
- */
423
- chunkIndex: number;
424
- /**
425
- * Returns the chunk size value in bytes.
426
- */
427
- chunkSize: number;
428
- }
429
- export interface ActionCompleteEventArgs {
430
- /**
431
- * Return the selected file details.
432
- */
433
- fileData: FileInfo[];
434
- }
435
- export interface RenderingEventArgs {
436
- /**
437
- * Return the current file item element.
438
- */
439
- element: HTMLElement;
440
- /**
441
- * Return the current rendering file item data as File object.
442
- */
443
- fileInfo: FileInfo;
444
- /**
445
- * Return the index of the file item in the file list.
446
- */
447
- index: number;
448
- /**
449
- * Return whether the file is preloaded
450
- */
451
- isPreload: boolean;
452
- }
453
- export interface FileListRenderingEventArgs {
454
- /**
455
- * Return the current file item element.
456
- */
457
- element: HTMLElement;
458
- /**
459
- * Return the current rendering file item data as File object.
460
- */
461
- fileInfo: FileInfo;
462
- /**
463
- * Return the index of the file item in the file list.
464
- */
465
- index: number;
466
- /**
467
- * Return whether the file is preloaded
468
- */
469
- isPreload: boolean;
470
- }
471
- /**
472
- * The uploader component allows to upload images, documents, and other files from local to server.
473
- * ```html
474
- * <input type='file' name='images[]' id='upload'/>
475
- * ```
476
- * ```typescript
477
- * <script>
478
- * var uploadObj = new Uploader();
479
- * uploadObj.appendTo('#upload');
480
- * </script>
481
- * ```
482
- */
483
- export declare class Uploader extends Component<HTMLInputElement> implements INotifyPropertyChanged {
484
- private initialAttr;
485
- private uploadWrapper;
486
- private browseButton;
487
- private listParent;
488
- private sortFilesList;
489
- private actionButtons;
490
- private uploadButton;
491
- private clearButton;
492
- private pauseButton;
493
- private formElement;
494
- private dropAreaWrapper;
495
- private filesEntries;
496
- private uploadedFilesData;
497
- private base64String;
498
- private currentRequestHeader;
499
- private customFormDatas;
500
- private dropZoneElement;
501
- private l10n;
502
- private preLocaleObj;
503
- private uploadTemplateFn;
504
- private keyboardModule;
505
- private progressInterval;
506
- private progressAnimation;
507
- private isForm;
508
- private allTypes;
509
- private keyConfigs;
510
- private localeText;
511
- private pausedData;
512
- private uploadMetaData;
513
- private tabIndex;
514
- private btnTabIndex;
515
- private disableKeyboardNavigation;
516
- private count;
517
- private actionCompleteCount;
518
- private flag;
519
- private selectedFiles;
520
- private browserName;
521
- private uploaderOptions;
522
- private uploaderName;
523
- private fileStreams;
524
- private newFileRef;
525
- private isFirstFileOnSelection;
526
- private dragCounter;
527
- private isPreloadFiles;
528
- /**
529
- * Get the file item(li) which are shown in file list.
530
- *
531
- * @private
532
- */
533
- fileList: HTMLElement[];
534
- /**
535
- * Get the data of files which are shown in file list.
536
- *
537
- * @private
538
- */
539
- filesData: FileInfo[];
540
- /**
541
- * Configures the save and remove URL to perform the upload operations in the server asynchronously.
542
- *
543
- * @default { saveUrl: '', removeUrl: '' }
544
- */
545
- asyncSettings: AsyncSettingsModel;
546
- /**
547
- * By default, the file uploader component is processing the multiple files simultaneously.
548
- * If sequentialUpload property is enabled, the file upload component performs the upload one after the other.
549
- *
550
- * @default false
551
- */
552
- sequentialUpload: boolean;
553
- /**
554
- * You can add the additional html attributes such as disabled, value etc., to the element.
555
- * If you configured both property and equivalent html attribute then the component considers the property value.
556
- *
557
- * {% codeBlock src='uploader/htmlAttributes/index.md' %}{% endcodeBlock %}
558
- *
559
- * @default {}
560
- */
561
- htmlAttributes: {
562
- [key: string]: string;
563
- };
564
- /**
565
- * Specifies the CSS class name that can be appended with root element of the uploader.
566
- * One or more custom CSS classes can be added to a uploader.
567
- *
568
- * @default ''
569
- */
570
- cssClass: string;
571
- /**
572
- * Specifies Boolean value that indicates whether the component is enabled or disabled.
573
- * The uploader component does not allow to interact when this property is disabled.
574
- *
575
- * @default true
576
- */
577
- enabled: boolean;
578
- /**
579
- * Specifies the HTML string that used to customize the content of each file in the list.
580
- *
581
- * > For more information, refer to the [template](../../uploader/template/) section from the documentation.
582
- *
583
- * @default null
584
- * @aspType string
585
- */
586
- template: string | Function;
587
- /**
588
- * Specifies a Boolean value that indicates whether the multiple files can be browsed or
589
- * dropped simultaneously in the uploader component.
590
- *
591
- * @default true
592
- */
593
- multiple: boolean;
594
- /**
595
- * By default, the uploader component initiates automatic upload when the files are added in upload queue.
596
- * If you want to manipulate the files before uploading to server, disable the autoUpload property.
597
- * The buttons “upload” and “clear” will be hided from file list when autoUpload property is true.
598
- *
599
- * @default true
600
- */
601
- autoUpload: boolean;
602
- /**
603
- * Specifies Boolean value that indicates whether to prevent the cross site scripting code in filename or not.
604
- * The uploader component removes the cross-site scripting code or functions from the filename and shows the validation error message to the user when enableHtmlSanitizer is true.
605
- *
606
- * @default true
607
- */
608
- enableHtmlSanitizer: boolean;
609
- /**
610
- * You can customize the default text of “browse, clear, and upload” buttons with plain text or HTML elements.
611
- * The buttons’ text can be customized from localization also. If you configured both locale and buttons property,
612
- * the uploader component considers the buttons property value.
613
- * {% codeBlock src='uploader/buttons/index.md' %}{% endcodeBlock %}
614
- *
615
- * @default { browse : 'Browse...', clear: 'Clear', upload: 'Upload' }
616
- */
617
- buttons: ButtonsPropsModel;
618
- /**
619
- * Specifies the extensions of the file types allowed in the uploader component and pass the extensions
620
- * with comma separators. For example,
621
- * if you want to upload specific image files, pass allowedExtensions as “.jpg,.png”.
622
- *
623
- * @default ''
624
- */
625
- allowedExtensions: string;
626
- /**
627
- * Specifies the minimum file size to be uploaded in bytes.
628
- * The property used to make sure that you cannot upload empty files and small files.
629
- *
630
- * @default 0
631
- */
632
- minFileSize: number;
633
- /**
634
- * Specifies the maximum allowed file size to be uploaded in bytes.
635
- * The property used to make sure that you cannot upload too large files.
636
- *
637
- * @default 30000000
638
- */
639
- maxFileSize: number;
640
- /**
641
- * Specifies the drop target to handle the drag-and-drop upload.
642
- * By default, the component creates wrapper around file input that will act as drop target.
643
- *
644
- * > For more information, refer to the [drag-and-drop](../../uploader/file-source/#drag-and-drop) section from the documentation.
645
- *
646
- * @default null
647
- */
648
- dropArea: string | HTMLElement;
649
- /**
650
- * Specifies the list of files that will be preloaded on rendering of uploader component.
651
- * The property used to view and remove the uploaded files from server. By default, the files are configured with
652
- * uploaded successfully state. The following properties are mandatory to configure the preload files:
653
- * * Name
654
- * * Size
655
- * * Type
656
- *
657
- * {% codeBlock src='uploader/files/index.md' %}{% endcodeBlock %}
658
- *
659
- * @default { name: '', size: null, type: '' }
660
- */
661
- files: FilesPropModel[];
662
- /**
663
- * Specifies a Boolean value that indicates whether the default file list can be rendered.
664
- * The property used to prevent default file list and design own template for file list.
665
- *
666
- * @default true
667
- */
668
- showFileList: boolean;
669
- /**
670
- * Specifies a Boolean value that indicates whether the folder of files can be browsed in the uploader component.
671
- *
672
- * > When enabled this property, it allows only files of folder to select or drop to upload and
673
- * it cannot be allowed to select or drop files.
674
- *
675
- * @default false
676
- */
677
- directoryUpload: boolean;
678
- /**
679
- * Specifies the drag operation effect to the uploader component. Possible values are Copy , Move, Link and None.
680
- *
681
- * By default, the uploader component works based on the browser drag operation effect.
682
- *
683
- * @default 'Default'
684
- */
685
- dropEffect: DropEffect;
686
- /**
687
- * Triggers when the component is created.
688
- *
689
- * @event created
690
- */
691
- created: EmitType<Object>;
692
- /**
693
- * Triggers after all the selected files has processed to upload successfully or failed to server.
694
- *
695
- * @event actionComplete
696
- */
697
- actionComplete: EmitType<ActionCompleteEventArgs>;
698
- /**
699
- * DEPRECATED-Triggers before rendering each file item from the file list in a page.
700
- * It helps to customize specific file item structure.
701
- *
702
- * @event rendering
703
- */
704
- rendering: EmitType<RenderingEventArgs>;
705
- /**
706
- * Triggers when the upload process before. This event is used to add additional parameter with upload request.
707
- *
708
- * @event beforeUpload
709
- */
710
- beforeUpload: EmitType<BeforeUploadEventArgs>;
711
- /**
712
- * Triggers before rendering each file item from the file list in a page.
713
- * It helps to customize specific file item structure.
714
- *
715
- * @event fileListRendering
716
- */
717
- fileListRendering: EmitType<FileListRenderingEventArgs>;
718
- /**
719
- * Triggers after selecting or dropping the files by adding the files in upload queue.
720
- *
721
- * @event selected
722
- */
723
- selected: EmitType<SelectedEventArgs>;
724
- /**
725
- * Triggers when the upload process gets started. This event is used to add additional parameter with upload request.
726
- *
727
- * @event uploading
728
- */
729
- uploading: EmitType<UploadingEventArgs>;
730
- /**
731
- * Triggers when the AJAX request gets success on uploading files or removing files.
732
- *
733
- * <table>
734
- * <tr>
735
- * <td colSpan=1 rowSpan=1>
736
- * Event arguments<br/></td><td colSpan=1 rowSpan=1>
737
- * Description<br/></td></tr>
738
- * <tr>
739
- * <td colSpan=1 rowSpan=1>
740
- * event<br/></td><td colSpan=1 rowSpan=1>
741
- * Ajax progress event arguments.<br/></td></tr>
742
- * <tr>
743
- * <td colSpan=1 rowSpan=1>
744
- * file<br/></td><td colSpan=1 rowSpan=1>
745
- * File information which is uploaded/removed.<br/></td></tr>
746
- * <tr>
747
- * <td colSpan=1 rowSpan=1>
748
- * name<br/></td><td colSpan=1 rowSpan=1>
749
- * Name of the event<br/></td></tr>
750
- * <tr>
751
- * <td colSpan=1 rowSpan=1>
752
- * operation<br/></td><td colSpan=1 rowSpan=1>
753
- * It indicates the success of the operation whether its uploaded or removed<br/></td></tr>
754
- * </table>
755
- *
756
- * @event success
757
- */
758
- success: EmitType<Object>;
759
- /**
760
- * Triggers when the AJAX request fails on uploading or removing files.
761
- *
762
- * <table>
763
- * <tr>
764
- * <td colSpan=1 rowSpan=1>
765
- * Event arguments<br/></td><td colSpan=1 rowSpan=1>
766
- * Description<br/></td></tr>
767
- * <tr>
768
- * <td colSpan=1 rowSpan=1>
769
- * event<br/></td><td colSpan=1 rowSpan=1>
770
- * Ajax progress event arguments.<br/></td></tr>
771
- * <tr>
772
- * <td colSpan=1 rowSpan=1>
773
- * file<br/></td><td colSpan=1 rowSpan=1>
774
- * File information which is failed from upload/remove.<br/></td></tr>
775
- * <tr>
776
- * <td colSpan=1 rowSpan=1>
777
- * name<br/></td><td colSpan=1 rowSpan=1>
778
- * Name of the event<br/></td></tr>
779
- * <tr>
780
- * <td colSpan=1 rowSpan=1>
781
- * operation<br/></td><td colSpan=1 rowSpan=1>
782
- * It indicates the failure of the operation whether its upload or remove<br/></td></tr>
783
- * </table>
784
- *
785
- * @event failure
786
- */
787
- failure: EmitType<Object>;
788
- /**
789
- * Triggers on removing the uploaded file. The event used to get confirm before removing the file from server.
790
- *
791
- * @event removing
792
- */
793
- removing: EmitType<RemovingEventArgs>;
794
- /**
795
- * Triggers on remove the uploaded file. The event used to get confirm before remove the file from server.
796
- *
797
- * @event beforeRemove
798
- */
799
- beforeRemove: EmitType<BeforeRemoveEventArgs>;
800
- /**
801
- * Triggers before clearing the items in file list when clicking “clear”.
802
- *
803
- * @event clearing
804
- */
805
- clearing: EmitType<ClearingEventArgs>;
806
- /**
807
- * Triggers when uploading a file to the server using the AJAX request.
808
- *
809
- * <table>
810
- * <tr>
811
- * <td colSpan=1 rowSpan=1>
812
- * Event arguments<br/></td><td colSpan=1 rowSpan=1>
813
- * Description<br/></td></tr>
814
- * <tr>
815
- * <td colSpan=1 rowSpan=1>
816
- * event<br/></td><td colSpan=1 rowSpan=1>
817
- * Ajax progress event arguments.<br/></td></tr>
818
- * <tr>
819
- * <td colSpan=1 rowSpan=1>
820
- * file<br/></td><td colSpan=1 rowSpan=1>
821
- * File information which is uploading to server.<br/></td></tr>
822
- * <tr>
823
- * <td colSpan=1 rowSpan=1>
824
- * name<br/></td><td colSpan=1 rowSpan=1>
825
- * Name of the event<br/></td></tr>
826
- * </table>
827
- *
828
- * @event progress
829
- */
830
- progress: EmitType<Object>;
831
- /**
832
- * Triggers when changes occur in uploaded file list by selecting or dropping files.
833
- *
834
- * <table>
835
- * <tr>
836
- * <td colSpan=1 rowSpan=1>
837
- * Event arguments<br/></td><td colSpan=1 rowSpan=1>
838
- * Description<br/></td></tr>
839
- * <tr>
840
- * <td colSpan=1 rowSpan=1>
841
- * file<br/></td><td colSpan=1 rowSpan=1>
842
- * File information which is successfully uploaded to server or removed in server.<br/></td></tr>
843
- * <tr>
844
- * <td colSpan=1 rowSpan=1>
845
- * name<br/></td><td colSpan=1 rowSpan=1>
846
- * Name of the event<br/></td></tr>
847
- * </table>
848
- *
849
- * @event change
850
- */
851
- change: EmitType<Object>;
852
- /**
853
- * Fires when the chunk file uploaded successfully.
854
- *
855
- * <table>
856
- * <tr>
857
- * <td colSpan=1 rowSpan=1>
858
- * Event arguments<br/></td><td colSpan=1 rowSpan=1>
859
- * Description<br/></td></tr>
860
- * <tr>
861
- * <td colSpan=1 rowSpan=1>
862
- * chunkIndex<br/></td><td colSpan=1 rowSpan=1>
863
- * Returns current chunk index.<br/></td></tr>
864
- * <tr>
865
- * <td colSpan=1 rowSpan=1>
866
- * chunkSize<br/></td><td colSpan=1 rowSpan=1>
867
- * Returns the size of the chunk file.<br/></td></tr>
868
- * <tr>
869
- * <td colSpan=1 rowSpan=1>
870
- * file<br/></td><td colSpan=1 rowSpan=1>
871
- * File information which is uploading to server.<br/></td></tr>
872
- * <tr>
873
- * <td colSpan=1 rowSpan=1>
874
- * name<br/></td><td colSpan=1 rowSpan=1>
875
- * Name of the event<br/></td></tr>
876
- * </table>
877
- *
878
- * @event chunkSuccess
879
- */
880
- chunkSuccess: EmitType<Object>;
881
- /**
882
- * Fires if the chunk file failed to upload.
883
- *
884
- * <table>
885
- * <tr>
886
- * <td colSpan=1 rowSpan=1>
887
- * Event arguments<br/></td><td colSpan=1 rowSpan=1>
888
- * Description<br/></td></tr>
889
- * <tr>
890
- * <td colSpan=1 rowSpan=1>
891
- * chunkIndex<br/></td><td colSpan=1 rowSpan=1>
892
- * Returns current chunk index.<br/></td></tr>
893
- * <tr>
894
- * <td colSpan=1 rowSpan=1>
895
- * chunkSize<br/></td><td colSpan=1 rowSpan=1>
896
- * Returns the size of the chunk file.<br/></td></tr>
897
- * <tr>
898
- * <td colSpan=1 rowSpan=1>
899
- * file<br/></td><td colSpan=1 rowSpan=1>
900
- * File information which is uploading to server.<br/></td></tr>
901
- * <tr>
902
- * <td colSpan=1 rowSpan=1>
903
- * name<br/></td><td colSpan=1 rowSpan=1>
904
- * Name of the event<br/></td></tr>
905
- * <tr>
906
- * <td colSpan=1 rowSpan=1>
907
- * totalChunk<br/></td><td colSpan=1 rowSpan=1>
908
- * Returns the total chunk count<br/></td></tr>
909
- * <tr>
910
- * <td colSpan=1 rowSpan=1>
911
- * cancel<br/></td><td colSpan=1 rowSpan=1>
912
- * Prevent triggering of failure event when we pass true to this attribute<br/></td></tr>
913
- * </table>
914
- *
915
- * @event chunkFailure
916
- */
917
- chunkFailure: EmitType<Object>;
918
- /**
919
- * Fires when every chunk upload process gets started. This event is used to add additional parameter with upload request.
920
- *
921
- * @event chunkUploading
922
- */
923
- chunkUploading: EmitType<UploadingEventArgs>;
924
- /**
925
- * Fires if cancel the chunk file uploading.
926
- *
927
- * @event canceling
928
- */
929
- canceling: EmitType<CancelEventArgs>;
930
- /**
931
- * Fires if pause the chunk file uploading.
932
- *
933
- * @event pausing
934
- */
935
- pausing: EmitType<PauseResumeEventArgs>;
936
- /**
937
- * Fires if resume the paused chunk file upload.
938
- *
939
- * @event resuming
940
- */
941
- resuming: EmitType<PauseResumeEventArgs>;
942
- /**
943
- * Triggers when change the Uploader value.
944
- *
945
- * @param {UploaderModel} options - Specifies the Uploader model.
946
- * @param {string | HTMLInputElement} element - Specifies the element to render as component.
947
- * @private
948
- */
949
- constructor(options?: UploaderModel, element?: string | HTMLInputElement);
950
- /**
951
- * Calls internally if any of the property value is changed.
952
- *
953
- * @param {UploaderModel} newProp - Returns the dynamic property value of the component.
954
- * @param {UploaderModel} oldProp - Returns the previous property value of the component.
955
- * @returns {void}
956
- * @private
957
- */
958
- onPropertyChanged(newProp: UploaderModel, oldProp: UploaderModel): void;
959
- private setLocalizedTexts;
960
- private getKeyValue;
961
- private updateFileList;
962
- private reRenderFileList;
963
- protected preRender(): void;
964
- private formRendered;
965
- protected getPersistData(): string;
966
- /**
967
- * Return the module name of the component.
968
- *
969
- * @returns {string} Returns the component name.
970
- */
971
- getModuleName(): string;
972
- private updateDirectoryAttributes;
973
- /**
974
- * To Initialize the control rendering
975
- *
976
- * @private
977
- * @returns {void}
978
- */
979
- render(): void;
980
- private renderBrowseButton;
981
- private renderActionButtons;
982
- private serverActionButtonsEventBind;
983
- private wireActionButtonEvents;
984
- private unwireActionButtonEvents;
985
- private removeActionButtons;
986
- private renderButtonTemplates;
987
- private initializeUpload;
988
- private renderPreLoadFiles;
989
- private checkActionButtonStatus;
990
- private setDropArea;
991
- private updateDropArea;
992
- private createDropTextHint;
993
- private updateHTMLAttrToElement;
994
- private updateHTMLAttrToWrapper;
995
- private setMultipleSelection;
996
- private checkAutoUpload;
997
- private sequenceUpload;
998
- private setCSSClass;
999
- private wireEvents;
1000
- private unWireEvents;
1001
- private resetForm;
1002
- private keyActionHandler;
1003
- private getCurrentMetaData;
1004
- private removeFocus;
1005
- private browseButtonClick;
1006
- private uploadButtonClick;
1007
- private clearButtonClick;
1008
- private bindDropEvents;
1009
- private unBindDropEvents;
1010
- private onDragEnter;
1011
- private onDragLeave;
1012
- private dragHover;
1013
- private dropElement;
1014
- private onPasteFile;
1015
- private getSelectedFiles;
1016
- private removeFiles;
1017
- private removeFilesData;
1018
- private removeUploadedFile;
1019
- private removingEventCallback;
1020
- private updateFormData;
1021
- private updateCustomheader;
1022
- private removeCompleted;
1023
- private removeFailed;
1024
- private getFilesFromFolder;
1025
- private checkDirectoryUpload;
1026
- traverseFileTree(item: any, event?: MouseEvent | TouchEvent | DragEvent | ClipboardEvent): void;
1027
- private readFileFromDirectory;
1028
- private pushFilesEntries;
1029
- private onSelectFiles;
1030
- private getBase64;
1031
- private renderSelectedFiles;
1032
- private updateInitialFileDetails;
1033
- private _internalRenderSelect;
1034
- private allowUpload;
1035
- private isFormUpload;
1036
- private clearData;
1037
- private updateSortedFileList;
1038
- private isBlank;
1039
- private checkGenericExtension;
1040
- private checkExtension;
1041
- private validatedFileSize;
1042
- private isPreLoadFile;
1043
- private createCustomfileList;
1044
- private createParentUL;
1045
- private formFileList;
1046
- private formValidateFileInfo;
1047
- private addInvalidClass;
1048
- private createFormInput;
1049
- private getFileSize;
1050
- private mergeFileInfo;
1051
- private statusForFormUpload;
1052
- private formCustomFileList;
1053
- /**
1054
- * Create the file list for specified files data.
1055
- *
1056
- * @param { FileInfo[] } fileData - Specifies the files data for file list creation.
1057
- * @returns {void}
1058
- */
1059
- createFileList(fileData: FileInfo[]): void;
1060
- private internalCreateFileList;
1061
- private getSlicedName;
1062
- private setListToFileInfo;
1063
- private truncateName;
1064
- private getFileType;
1065
- private getFileNameOnly;
1066
- private setInitialAttributes;
1067
- private filterfileList;
1068
- private updateStatus;
1069
- private getLiElement;
1070
- private createProgressBar;
1071
- private updateProgressbar;
1072
- private changeProgressValue;
1073
- private uploadInProgress;
1074
- private cancelUploadingFile;
1075
- private removecanceledFile;
1076
- private renderFailureState;
1077
- private reloadcanceledFile;
1078
- private uploadComplete;
1079
- private getResponse;
1080
- private raiseSuccessEvent;
1081
- private uploadFailed;
1082
- private uploadSequential;
1083
- private checkActionComplete;
1084
- private raiseActionComplete;
1085
- private getSelectedFileStatus;
1086
- private updateProgressBarClasses;
1087
- private removeProgressbar;
1088
- private animateProgressBar;
1089
- private setExtensions;
1090
- private templateComplier;
1091
- private setRTL;
1092
- private localizedTexts;
1093
- private setControlStatus;
1094
- private checkHTMLAttributes;
1095
- private chunkUpload;
1096
- private sendRequest;
1097
- private uploadingEventCallback;
1098
- private eventCancelByArgs;
1099
- private checkChunkUpload;
1100
- private chunkUploadComplete;
1101
- private sendNextRequest;
1102
- private removeChunkFile;
1103
- private pauseUpload;
1104
- private abortUpload;
1105
- private resumeUpload;
1106
- private updateMetaData;
1107
- private removeChunkProgressBar;
1108
- private chunkUploadFailed;
1109
- private retryRequest;
1110
- private checkPausePlayAction;
1111
- private retryUpload;
1112
- private chunkUploadInProgress;
1113
- /**
1114
- * It is used to convert bytes value into kilobytes or megabytes depending on the size based
1115
- * on [binary prefix](https://en.wikipedia.org/wiki/Binary_prefix).
1116
- *
1117
- * @param { number } bytes - Specifies the file size in bytes.
1118
- * @returns {string} - Returns the file size.
1119
- */
1120
- bytesToSize(bytes: number): string;
1121
- /**
1122
- * Allows you to sort the file data alphabetically based on its file name clearly.
1123
- *
1124
- * @param { FileList } filesData - specifies the files data for upload.
1125
- * @returns {File[]}
1126
- */
1127
- sortFileList(filesData?: FileList): File[];
1128
- /**
1129
- * Removes the component from the DOM and detaches all its related event handlers. Also it removes the attributes and classes.
1130
- *
1131
- * @method destroy
1132
- * @returns {void}
1133
- */
1134
- destroy(): void;
1135
- /**
1136
- * Allows you to call the upload process manually by calling save URL action.
1137
- * To process the selected files (added in upload queue), pass an empty argument otherwise
1138
- * upload the specific file based on its argument.
1139
- *
1140
- * @param { FileInfo | FileInfo[] } files - Specifies the files data for upload.
1141
- * @param {boolean} custom - Specifies whether the uploader is rendered with custom file list.
1142
- * @returns {void}
1143
- */
1144
- upload(files?: FileInfo | FileInfo[], custom?: boolean): void;
1145
- private getFilesInArray;
1146
- private serverReadFileBase64;
1147
- private uploadFileCount;
1148
- private getFileRead;
1149
- private uploadFiles;
1150
- private uploadFilesRequest;
1151
- private spliceFiles;
1152
- /**
1153
- * Remove the uploaded file from server manually by calling the remove URL action.
1154
- * If you pass an empty argument to this method, the complete file list can be cleared,
1155
- * otherwise remove the specific file based on its argument (“file_data”).
1156
- *
1157
- * @param { FileInfo | FileInfo[] } fileData - specifies the files data to remove from file list/server.
1158
- * @param { boolean } customTemplate - Set true if the component rendering with customize template.
1159
- * @param { boolean } removeDirectly - Set true if files remove without removing event.
1160
- * @param { boolean } postRawFile - Set false, to post file name only to the remove action.
1161
- * @returns {void}
1162
- */
1163
- remove(fileData?: FileInfo | FileInfo[], customTemplate?: boolean, removeDirectly?: boolean, postRawFile?: boolean, args?: MouseEvent | TouchEvent | KeyboardEventArgs): void;
1164
- /**
1165
- * Clear all the file entries from list that can be uploaded files or added in upload queue.
1166
- *
1167
- * @returns {void}
1168
- */
1169
- clearAll(): void;
1170
- /**
1171
- * Get the data of files which are shown in file list.
1172
- *
1173
- * @param { number } index - specifies the file list item(li) index.
1174
- * @returns {FileInfo[]}
1175
- */
1176
- getFilesData(index?: number): FileInfo[];
1177
- /**
1178
- * Pauses the in-progress chunked upload based on the file data.
1179
- *
1180
- * @param { FileInfo | FileInfo[] } fileData - specifies the files data to pause from uploading.
1181
- * @param { boolean } custom - Set true if used custom UI.
1182
- * @returns {void}
1183
- */
1184
- pause(fileData?: FileInfo | FileInfo[], custom?: boolean): void;
1185
- private pauseUploading;
1186
- private getFiles;
1187
- /**
1188
- * Resumes the chunked upload that is previously paused based on the file data.
1189
- *
1190
- * @param { FileInfo | FileInfo[] } fileData - specifies the files data to resume the paused file.
1191
- * @param { boolean } custom - Set true if used custom UI.
1192
- * @returns {void}
1193
- */
1194
- resume(fileData?: FileInfo | FileInfo[], custom?: boolean): void;
1195
- private resumeFiles;
1196
- /**
1197
- * Retries the canceled or failed file upload based on the file data.
1198
- *
1199
- * @param { FileInfo | FileInfo[] } fileData - specifies the files data to retry the canceled or failed file.
1200
- * @param { boolean } fromcanceledStage - Set true to retry from canceled stage and set false to retry from initial stage.
1201
- * @param {boolean} custom -Specifies whether the uploader is rendered with custom file list.
1202
- * @returns {void}
1203
- */
1204
- retry(fileData?: FileInfo | FileInfo[], fromcanceledStage?: boolean, custom?: boolean): void;
1205
- private retryFailedFiles;
1206
- /**
1207
- * Stops the in-progress chunked upload based on the file data.
1208
- * When the file upload is canceled, the partially uploaded file is removed from server.
1209
- *
1210
- * @param { FileInfo | FileInfo[] } fileData - specifies the files data to cancel the progressing file.
1211
- * @returns {void}
1212
- */
1213
- cancel(fileData?: FileInfo[]): void;
1214
- private cancelUpload;
1215
- private showHideUploadSpinner;
1216
- }