@progress/kendo-angular-upload 19.1.2-develop.1 → 19.1.2-develop.3

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 (49) hide show
  1. package/common/action-buttons-layout.d.ts +1 -1
  2. package/common/base.d.ts +15 -11
  3. package/directives.d.ts +3 -3
  4. package/dropzone-external.directive.d.ts +12 -4
  5. package/dropzone.component.d.ts +16 -9
  6. package/esm2022/common/base.mjs +15 -11
  7. package/esm2022/directives.mjs +3 -3
  8. package/esm2022/dropzone-external.directive.mjs +12 -4
  9. package/esm2022/dropzone.component.mjs +16 -9
  10. package/esm2022/events/cancel-event.mjs +7 -16
  11. package/esm2022/events/clear-event.mjs +5 -12
  12. package/esm2022/events/error-event.mjs +7 -13
  13. package/esm2022/events/pause-event.mjs +5 -12
  14. package/esm2022/events/remove-event.mjs +8 -12
  15. package/esm2022/events/resume-event.mjs +5 -12
  16. package/esm2022/events/select-event.mjs +5 -11
  17. package/esm2022/events/success-event.mjs +6 -12
  18. package/esm2022/events/upload-event.mjs +7 -34
  19. package/esm2022/events/upload-progress-event.mjs +5 -11
  20. package/esm2022/fileselect.component.mjs +16 -6
  21. package/esm2022/localization/messages.mjs +42 -0
  22. package/esm2022/package-metadata.mjs +2 -2
  23. package/esm2022/templates/file-info-template.directive.mjs +5 -6
  24. package/esm2022/templates/file-template.directive.mjs +5 -6
  25. package/esm2022/types/file-state.mjs +5 -5
  26. package/esm2022/upload.component.mjs +73 -56
  27. package/events/cancel-event.d.ts +7 -16
  28. package/events/clear-event.d.ts +5 -12
  29. package/events/error-event.d.ts +7 -13
  30. package/events/pause-event.d.ts +5 -12
  31. package/events/remove-event.d.ts +8 -12
  32. package/events/resume-event.d.ts +5 -12
  33. package/events/select-event.d.ts +5 -11
  34. package/events/success-event.d.ts +6 -12
  35. package/events/upload-event.d.ts +7 -34
  36. package/events/upload-progress-event.d.ts +5 -11
  37. package/fesm2022/progress-kendo-angular-upload.mjs +254 -253
  38. package/fileselect.component.d.ts +14 -4
  39. package/localization/messages.d.ts +42 -0
  40. package/package.json +8 -8
  41. package/schematics/ngAdd/index.js +3 -3
  42. package/templates/file-info-template.directive.d.ts +5 -6
  43. package/templates/file-template.directive.d.ts +5 -6
  44. package/types/chunk-metadata.d.ts +3 -3
  45. package/types/chunk-settings.d.ts +4 -4
  46. package/types/file-restrictions.d.ts +4 -5
  47. package/types/file-state.d.ts +5 -5
  48. package/types/operation-type.d.ts +1 -1
  49. package/upload.component.d.ts +71 -54
@@ -4,25 +4,19 @@
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { PreventableEvent } from './preventable-event';
6
6
  /**
7
- * Arguments for the `select` event. The `select` event fires when the user
8
- * selects a file or multiple files for upload. If you cancel the event, the selection is prevented.
7
+ * Arguments for the `select` event. The `select` event fires when
8
+ * a file or multiple files are selected for upload. The event can be canceled to prevent selection.
9
9
  *
10
- * ```ts-no-run
10
+ * ```typescript
11
11
  * @Component({
12
- * selector: 'my-upload',
13
12
  * template: `
14
13
  * <kendo-upload
15
- * [saveUrl]="uploadSaveUrl"
16
- * [removeUrl]="uploadRemoveUrl"
17
14
  * (select)="selectEventHandler($event)">
18
15
  * </kendo-upload>
19
16
  * `
20
17
  * })
21
18
  * export class UploadComponent {
22
- * uploadSaveUrl = 'saveUrl'; // should represent an actual API endpoint
23
- * uploadRemoveUrl = 'removeUrl'; // should represent an actual API endpoint
24
- *
25
- * selectEventHandler(e: SelectEvent) {
19
+ * public selectEventHandler(e: SelectEvent) {
26
20
  * console.log('File selected');
27
21
  * }
28
22
  * }
@@ -30,7 +24,7 @@ import { PreventableEvent } from './preventable-event';
30
24
  */
31
25
  export class SelectEvent extends PreventableEvent {
32
26
  /**
33
- * The list of the selected files.
27
+ * The files that are selected for upload.
34
28
  */
35
29
  files;
36
30
  /**
@@ -5,24 +5,18 @@
5
5
  import { PreventableEvent } from './preventable-event';
6
6
  /**
7
7
  * Arguments for the `success` event. The `success` event fires when
8
- * the selected files are successfully uploaded or removed.
8
+ * you successfully upload or remove the selected files.
9
9
  *
10
- * ```ts-no-run
10
+ * ```typescript
11
11
  * @Component({
12
- * selector: 'my-upload',
13
12
  * template: `
14
13
  * <kendo-upload
15
- * [saveUrl]="uploadSaveUrl"
16
- * [removeUrl]="uploadRemoveUrl"
17
14
  * (success)="successEventHandler($event)">
18
15
  * </kendo-upload>
19
16
  * `
20
17
  * })
21
18
  * export class UploadComponent {
22
- * uploadSaveUrl = 'saveUrl'; // should represent an actual API endpoint
23
- * uploadRemoveUrl = 'removeUrl'; // should represent an actual API endpoint
24
- *
25
- * successEventHandler(e: SuccessEvent) {
19
+ * public successEventHandler(e: SuccessEvent) {
26
20
  * console.log('The ' + e.operation + ' was successful!');
27
21
  * }
28
22
  * }
@@ -30,15 +24,15 @@ import { PreventableEvent } from './preventable-event';
30
24
  */
31
25
  export class SuccessEvent extends PreventableEvent {
32
26
  /**
33
- * The list of the files that were uploaded or removed.
27
+ * The files that you successfully uploaded or removed.
34
28
  */
35
29
  files;
36
30
  /**
37
- * The operation type (`upload` or `remove`).
31
+ * The operation type that succeeded (`upload` or `remove`).
38
32
  */
39
33
  operation;
40
34
  /**
41
- * The response object returned by the server.
35
+ * The HTTP response that the server returns to confirm success.
42
36
  */
43
37
  response;
44
38
  /**
@@ -4,25 +4,19 @@
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { PreventableEvent } from './preventable-event';
6
6
  /**
7
- * Arguments for the `upload` event. The `upload` event fires when one or more files are about
8
- * to be uploaded. If you cancel the event, the upload is prevented. You can add headers to the request.
7
+ * Arguments for the `upload` event. The `upload` event fires when you are about
8
+ * to upload one or more files. You can cancel this event to prevent upload and add headers to the request.
9
9
  *
10
- * ```ts-no-run
10
+ * ```typescript
11
11
  * @Component({
12
- * selector: 'my-upload',
13
12
  * template: `
14
13
  * <kendo-upload
15
- * [saveUrl]="uploadSaveUrl"
16
- * [removeUrl]="uploadRemoveUrl"
17
14
  * (upload)="uploadEventHandler($event)">
18
15
  * </kendo-upload>
19
16
  * `
20
17
  * })
21
18
  * export class UploadComponent {
22
- * uploadSaveUrl = 'saveUrl'; // should represent an actual API endpoint
23
- * uploadRemoveUrl = 'removeUrl'; // should represent an actual API endpoint
24
- *
25
- * uploadEventHandler(e: UploadEvent) {
19
+ * public uploadEventHandler(e: UploadEvent) {
26
20
  * e.headers = e.headers.append('X-Foo', 'Bar');
27
21
  * }
28
22
  * }
@@ -30,38 +24,17 @@ import { PreventableEvent } from './preventable-event';
30
24
  */
31
25
  export class UploadEvent extends PreventableEvent {
32
26
  /**
33
- * The optional object that is sent to the `upload` handler in the form of key/value pair.
34
- *
35
- * ```ts-no-run
36
- * @Component({
37
- * selector: 'my-upload',
38
- * template: `
39
- * <kendo-upload
40
- * [saveUrl]="uploadSaveUrl"
41
- * [removeUrl]="uploadRemoveUrl"
42
- * (upload)="uploadEventHandler($event)">
43
- * </kendo-upload>
44
- * `
45
- * })
46
- * export class UploadComponent {
47
- * uploadSaveUrl = 'saveUrl'; // should represent an actual API endpoint
48
- * uploadRemoveUrl = 'removeUrl'; // should represent an actual API endpoint
27
+ * The optional object that you send to the `upload` handler as key/value pairs.
49
28
  *
50
- * uploadEventHandler(e: UploadEvent) {
51
- * e.data = {
52
- * description: 'File description'
53
- * };
54
- * }
55
- * }
56
- * ```
57
29
  */
58
30
  data;
59
31
  /**
60
- * The list of the files that will be uploaded.
32
+ * The files that you will upload to the server.
61
33
  */
62
34
  files;
63
35
  /**
64
36
  * The headers of the request.
37
+ * You can use this to add custom headers to the upload request.
65
38
  */
66
39
  headers;
67
40
  /**
@@ -4,24 +4,18 @@
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  /**
6
6
  * Arguments for the `uploadprogress` event. The `uploadprogress` event
7
- * fires when the files are in the process of uploading.
7
+ * fires when you upload files.
8
8
  *
9
- * ```ts-no-run
9
+ * ```typescript
10
10
  * @Component({
11
- * selector: 'my-upload',
12
11
  * template: `
13
12
  * <kendo-upload
14
- * [saveUrl]="uploadSaveUrl"
15
- * [removeUrl]="uploadRemoveUrl"
16
13
  * (uploadProgress)="uploadProgressEventHandler($event)">
17
14
  * </kendo-upload>
18
15
  * `
19
16
  * })
20
17
  * export class UploadComponent {
21
- * uploadSaveUrl = 'saveUrl'; // should represent an actual API endpoint
22
- * uploadRemoveUrl = 'removeUrl'; // should represent an actual API endpoint
23
- *
24
- * uploadProgressEventHandler(e: UploadProgressEvent) {
18
+ * public uploadProgressEventHandler(e: UploadProgressEvent) {
25
19
  * console.log(e.files[0].name + ' is ' + e.percentComplete + ' uploaded');
26
20
  * }
27
21
  * }
@@ -29,11 +23,11 @@
29
23
  */
30
24
  export class UploadProgressEvent {
31
25
  /**
32
- * The list of files that are being uploaded.
26
+ * The files that you are currently uploading.
33
27
  */
34
28
  files;
35
29
  /**
36
- * The portion that has been uploaded.
30
+ * The upload progress as a percentage from 0 to 100.
37
31
  */
38
32
  percentComplete;
39
33
  /**
@@ -36,6 +36,14 @@ export const FILESELECT_VALUE_ACCESSOR = {
36
36
  useExisting: forwardRef(() => FileSelectComponent)
37
37
  };
38
38
  let idx = 0;
39
+ /**
40
+ * Represents the [Kendo UI FileSelect component for Angular](slug:overview_fileselect_uploads).
41
+ *
42
+ * @example
43
+ * ```html
44
+ * <kendo-fileselect> </kendo-fileselect>
45
+ * ```
46
+ */
39
47
  export class FileSelectComponent extends UploadFileSelectBase {
40
48
  uploadService;
41
49
  localization;
@@ -50,7 +58,7 @@ export class FileSelectComponent extends UploadFileSelectBase {
50
58
  return this.direction;
51
59
  }
52
60
  /**
53
- * Sets the `name` attribute of the `input` element of the FileSelect.
61
+ * Specifies the `name` attribute of the `input` element of the FileSelect.
54
62
  */
55
63
  set name(name) {
56
64
  this.uploadService.async.saveField = name;
@@ -59,7 +67,7 @@ export class FileSelectComponent extends UploadFileSelectBase {
59
67
  return this.uploadService.async.saveField;
60
68
  }
61
69
  /**
62
- * Fires when the value of the component has changed as a result of a successful `select` or `remove` operation.
70
+ * Fires when the component value changes after a successful `select` or `remove` operation.
63
71
  */
64
72
  valueChange = new EventEmitter();
65
73
  /**
@@ -143,13 +151,15 @@ export class FileSelectComponent extends UploadFileSelectBase {
143
151
  }
144
152
  }
145
153
  /**
146
- * Removes specific file from the file list.
154
+ * Removes a specific file from the file list.
155
+ *
156
+ * @param uid The `uid` of the file to be removed.
147
157
  */
148
158
  removeFileByUid(uid) {
149
159
  this.uploadService.removeFiles(uid);
150
160
  }
151
161
  /**
152
- * Visually clears all files from the UI.
162
+ * Clears all files from the UI.
153
163
  */
154
164
  clearFiles() {
155
165
  this.uploadService.clearFiles();
@@ -301,7 +311,7 @@ export class FileSelectComponent extends UploadFileSelectBase {
301
311
  [multiple]="multiple"
302
312
  [disabled]="disabled">
303
313
  <div class="k-upload-button-wrap">
304
- <button
314
+ <button
305
315
  kendoButton
306
316
  #fileSelectButton
307
317
  class="k-upload-button"
@@ -385,7 +395,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
385
395
  [multiple]="multiple"
386
396
  [disabled]="disabled">
387
397
  <div class="k-upload-button-wrap">
388
- <button
398
+ <button
389
399
  kendoButton
390
400
  #fileSelectButton
391
401
  class="k-upload-button"
@@ -11,86 +11,128 @@ import * as i0 from "@angular/core";
11
11
  export class Messages extends ComponentMessages {
12
12
  /**
13
13
  * Sets the text for the **Cancel** button.
14
+ *
15
+ * @default 'Cancel'
14
16
  */
15
17
  cancel;
16
18
  /**
17
19
  * Sets the text for the **Clear** button.
20
+ *
21
+ * @default 'Clear'
18
22
  */
19
23
  clearSelectedFiles;
20
24
  /**
21
25
  * Sets the drop-zone hint.
26
+ *
27
+ * @default 'Drop files here to upload'
22
28
  */
23
29
  dropFilesHere;
24
30
  /**
25
31
  * Sets the external drop-zone hint.
32
+ *
33
+ * @default 'Drag and drop files here to upload'
26
34
  */
27
35
  externalDropFilesHere;
28
36
  /**
29
37
  * Sets the status message for a batch of files.
38
+ *
39
+ * @default 'files'
30
40
  */
31
41
  filesBatchStatus;
32
42
  /**
33
43
  * Sets the status message for a batch of files after failed upload.
44
+ *
45
+ * @default 'files failed to upload.'
34
46
  */
35
47
  filesBatchStatusFailed;
36
48
  /**
37
49
  * Sets the status message for a batch of files after successful upload.
50
+ *
51
+ * @default 'files successfully uploaded.'
38
52
  */
39
53
  filesBatchStatusUploaded;
40
54
  /**
41
55
  * Sets the file status message after failed upload.
56
+ *
57
+ * @default 'File failed to upload.'
42
58
  */
43
59
  fileStatusFailed;
44
60
  /**
45
61
  * Sets the file status message after successful upload.
62
+ *
63
+ * @default 'File successfully uploaded.'
46
64
  */
47
65
  fileStatusUploaded;
48
66
  /**
49
67
  * Sets the header status message when the file upload is paused.
68
+ *
69
+ * @default 'Paused'
50
70
  */
51
71
  headerStatusPaused;
52
72
  /**
53
73
  * Sets the header status message after the file upload completes.
74
+ *
75
+ * @default 'Done'
54
76
  */
55
77
  headerStatusUploaded;
56
78
  /**
57
79
  * Sets the header status message during the upload of the file.
80
+ *
81
+ * @default 'Uploading...'
58
82
  */
59
83
  headerStatusUploading;
60
84
  /**
61
85
  * Sets the text for the invalid `allowedExtensions` restriction message.
86
+ *
87
+ * @default 'File type not allowed.'
62
88
  */
63
89
  invalidFileExtension;
64
90
  /**
65
91
  * Sets the text for the invalid `maxFileSize` restriction message.
92
+ *
93
+ * @default 'File size too large.'
66
94
  */
67
95
  invalidMaxFileSize;
68
96
  /**
69
97
  * Sets the text for the invalid `minFileSize` restriction message.
98
+ *
99
+ * @default 'File size too small.'
70
100
  */
71
101
  invalidMinFileSize;
72
102
  /**
73
103
  * Sets the text for the **Pause** button.
104
+ *
105
+ * @default 'Pause'
74
106
  */
75
107
  pause;
76
108
  /**
77
109
  * Sets the text for the **Remove** button.
110
+ *
111
+ * @default 'Remove'
78
112
  */
79
113
  remove;
80
114
  /**
81
115
  * Sets the text for the **Resume** button.
116
+ *
117
+ * @default 'Resume'
82
118
  */
83
119
  resume;
84
120
  /**
85
121
  * Sets the text for the **Retry** button.
122
+ *
123
+ * @default 'Retry'
86
124
  */
87
125
  retry;
88
126
  /**
89
127
  * Sets the text for the **Select** button.
128
+ *
129
+ * @default 'Select files...'
90
130
  */
91
131
  select;
92
132
  /**
93
133
  * Sets the text for the **Upload files** button.
134
+ *
135
+ * @default 'Upload'
94
136
  */
95
137
  uploadSelectedFiles;
96
138
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: Messages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
@@ -10,7 +10,7 @@ export const packageMetadata = {
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCode: 'KENDOUIANGULAR',
12
12
  productCodes: ['KENDOUIANGULAR'],
13
- publishDate: 1749804144,
14
- version: '19.1.2-develop.1',
13
+ publishDate: 1750152453,
14
+ version: '19.1.2-develop.3',
15
15
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
16
16
  };
@@ -5,20 +5,19 @@
5
5
  import { Directive, TemplateRef } from '@angular/core';
6
6
  import * as i0 from "@angular/core";
7
7
  /**
8
- * Used to customize the rendering of the file info section in the list. All other elements of the default template, such as file icon, action buttons, upload progress etc. will be preserved in place. ([See example.](slug:templates_upload#toc-file-info-template))
8
+ * 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](slug:templates_upload#toc-file-info-template)).
9
9
  *
10
10
  * The following context variables are available in the template:
11
11
  *
12
- * * `let-files`&mdash;Provides a reference to the files which are associated with the current item.
13
- * * `let-state`&mdash;Gets a reference to the current state of each file. If the [`batch`](slug:api_upload_uploadcomponent#toc-batch) option of the Upload is set to `true`, the field reflects the state of the whole batch.
14
- * * `#myUpload="kendoUpload"` or `#myFileSelect="kendoFileSelect"`&mdash;Provides 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.
12
+ * * `let-files`&mdash;A reference to the files associated with the current item.
13
+ * * `let-state`&mdash;A reference to the current state of each file. If the [`batch`](slug:api_upload_uploadcomponent#toc-batch) option of the Upload is set to `true`, the field reflects the state of the whole batch.
14
+ * * `#myUpload="kendoUpload"` or `#myFileSelect="kendoFileSelect"`&mdash;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.
15
15
  *
16
16
  * @example
17
17
  * ```html
18
- * <kendo-upload #myUpload="kendoUpload" ... >
18
+ * <kendo-upload #myUpload="kendoUpload">
19
19
  * <ng-template kendoUploadFileInfoTemplate let-files let-state>
20
20
  * <div>Name: {{ files[0].name }}</div>
21
- * ...
22
21
  * </ng-template>
23
22
  * </kendo-upload>
24
23
  * ```
@@ -5,20 +5,19 @@
5
5
  import { Directive, TemplateRef } from '@angular/core';
6
6
  import * as i0 from "@angular/core";
7
7
  /**
8
- * Used to customize the rendering of the files in the list. ([See example.](slug:templates_upload#toc-file-template))
8
+ * Customizes the rendering of files in the list. ([See example.](slug:templates_upload#toc-file-template))
9
9
  *
10
10
  * The following context variables are available in the template:
11
11
  *
12
- * * `let-files`&mdash;Provides a reference to the files which are associated with the current item.
13
- * * `let-state`&mdash;Gets a reference to the current state of each file. If the [`batch`](slug:api_upload_uploadcomponent#toc-batch) option of the Upload is set to `true`, the field reflects the state of the whole batch.
14
- * * `#myUpload="kendoUpload"` or `#myFileSelect="kendoFileSelect"`&mdash;Provides 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.
12
+ * * `let-files`&mdash;A reference to the files associated with the current item.
13
+ * * `let-state`&mdash;A reference to the current state of each file. If the [`batch`](slug:api_upload_uploadcomponent#toc-batch) option of the Upload is set to `true`, the field reflects the state of the whole batch.
14
+ * * `#myUpload="kendoUpload"` or `#myFileSelect="kendoFileSelect"`&mdash;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.
15
15
  *
16
16
  * @example
17
17
  * ```html
18
- * <kendo-upload #myUpload="kendoUpload" ... >
18
+ * <kendo-upload #myUpload="kendoUpload">
19
19
  * <ng-template kendoUploadFileTemplate let-files let-state>
20
20
  * <div>Name: {{ files[0].name }} Size: {{ files[0].size }} bytes</div>
21
- * ...
22
21
  * </ng-template>
23
22
  * </kendo-upload>
24
23
  * ```
@@ -8,11 +8,11 @@
8
8
  export var FileState;
9
9
  (function (FileState) {
10
10
  /**
11
- * The file upload process has failed.
11
+ * The file upload process failed.
12
12
  */
13
13
  FileState[FileState["Failed"] = 0] = "Failed";
14
14
  /**
15
- * An initially selected fake file without a set state.
15
+ * An initially selected file without a set state.
16
16
  */
17
17
  FileState[FileState["Initial"] = 1] = "Initial";
18
18
  /**
@@ -20,15 +20,15 @@ export var FileState;
20
20
  */
21
21
  FileState[FileState["Selected"] = 2] = "Selected";
22
22
  /**
23
- * The file is successfully uploaded.
23
+ * The file uploaded successfully.
24
24
  */
25
25
  FileState[FileState["Uploaded"] = 3] = "Uploaded";
26
26
  /**
27
- * The file is in the process of uploading.
27
+ * The file is uploading.
28
28
  */
29
29
  FileState[FileState["Uploading"] = 4] = "Uploading";
30
30
  /**
31
- * The file upload process has been paused.
31
+ * The file upload process is paused.
32
32
  */
33
33
  FileState[FileState["Paused"] = 5] = "Paused";
34
34
  })(FileState || (FileState = {}));