@progress/kendo-angular-upload 20.0.0-develop.4 → 20.0.0-develop.5

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.
@@ -0,0 +1,50 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2025 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { FileRestrictions } from "../types";
6
+ /**
7
+ * Defines the settings interface for the FileSelect functionality used in components that integrate the FileSelect component.
8
+ *
9
+ * @example
10
+ * ```typescript
11
+ * const fileSelectSettings: FileSelectSettings = {
12
+ * multiple: true,
13
+ * disabled: false
14
+ * };
15
+ * ```
16
+ */
17
+ export interface FileSelectSettings {
18
+ /**
19
+ * Sets the `accept` attribute of the internal `input` element of the component.
20
+ */
21
+ accept?: string;
22
+ /**
23
+ * Disables the component.
24
+ */
25
+ disabled?: boolean;
26
+ /**
27
+ * Allows you to select multiple files. When you set this to `false`, you can select only one file at a time.
28
+ */
29
+ multiple?: boolean;
30
+ /**
31
+ * Specifies the `name` attribute of the `input` element of the FileSelect.
32
+ */
33
+ name?: string;
34
+ /**
35
+ * Sets the restrictions for selected files.
36
+ */
37
+ restrictions?: FileRestrictions;
38
+ /**
39
+ * Controls the visibility of the file list.
40
+ */
41
+ showFileList?: boolean;
42
+ /**
43
+ * Sets the `tabindex` of the component.
44
+ */
45
+ tabindex?: number;
46
+ /**
47
+ * Sets the `id` of the external drop zone that you want to associate with the component.
48
+ */
49
+ zoneId?: string;
50
+ }
package/common/util.d.ts CHANGED
@@ -2,8 +2,9 @@
2
2
  * Copyright © 2025 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
+ import { SVGIcon } from '@progress/kendo-angular-icons';
5
6
  /**
6
- * @hidden
7
+ * Calculates the total size of the files in KB or MB.
7
8
  */
8
9
  export declare const getTotalFilesSizeMessage: Function;
9
10
  /**
@@ -74,3 +75,13 @@ export declare const getFileGroupCssClass: Function;
74
75
  * @hidden
75
76
  */
76
77
  export declare const isPresent: (value: any) => boolean;
78
+ /**
79
+ * Matches the file extension with the corresponding SVG icon.
80
+ * @returns The SVG icon that corresponds to the file extension.
81
+ */
82
+ export declare const fileSVGGroupIcon: (extension: string) => SVGIcon;
83
+ /**
84
+ * Matches the file extension with the corresponding CSS class.
85
+ * @returns The CSS class name that corresponds to the file extension.
86
+ */
87
+ export declare const fileGroupClass: (extension: string) => string;
@@ -0,0 +1,5 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2025 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ export {};
@@ -5,9 +5,10 @@
5
5
  /* eslint-disable no-bitwise */
6
6
  import { FileState } from '../types';
7
7
  import { guid } from '@progress/kendo-angular-common';
8
- import { fileGroupMap } from '../types/file-groups';
8
+ import { fileGroupMap, fileSVGGroupMap } from '../types/file-groups';
9
+ import { fileIcon } from '@progress/kendo-svg-icons';
9
10
  /**
10
- * @hidden
11
+ * Calculates the total size of the files in KB or MB.
11
12
  */
12
13
  export const getTotalFilesSizeMessage = (files) => {
13
14
  let totalSize = 0;
@@ -227,3 +228,23 @@ export const getFileGroupCssClass = (fileExtension) => {
227
228
  * @hidden
228
229
  */
229
230
  export const isPresent = (value) => value !== null && value !== undefined;
231
+ /**
232
+ * Matches the file extension with the corresponding SVG icon.
233
+ * @returns The SVG icon that corresponds to the file extension.
234
+ */
235
+ export const fileSVGGroupIcon = (extension) => {
236
+ const initial = fileIcon;
237
+ if (extension) {
238
+ for (const group in fileGroupMap) {
239
+ if (fileGroupMap[group].indexOf(extension.toLowerCase()) >= 0) {
240
+ return fileSVGGroupMap[group];
241
+ }
242
+ }
243
+ }
244
+ return initial;
245
+ };
246
+ /**
247
+ * Matches the file extension with the corresponding CSS class.
248
+ * @returns The CSS class name that corresponds to the file extension.
249
+ */
250
+ export const fileGroupClass = (extension) => getFileGroupCssClass(extension || '');
package/esm2022/index.mjs CHANGED
@@ -25,6 +25,7 @@ export { UploadDropZoneDirective } from './dropzone-external.directive';
25
25
  export { CustomMessagesComponent } from './localization/custom-messages.component';
26
26
  export { validateFiles } from './common/validation-util';
27
27
  export { UPLOAD_VALUE_ACCESSOR } from './upload.component';
28
+ export { getTotalFilesSizeMessage, fileSVGGroupIcon, fileGroupClass } from './common/util';
28
29
  export * from './events';
29
30
  export * from './types';
30
31
  export * from './directives';
@@ -10,7 +10,7 @@ export const packageMetadata = {
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCode: 'KENDOUIANGULAR',
12
12
  productCodes: ['KENDOUIANGULAR'],
13
- publishDate: 1755865244,
14
- version: '20.0.0-develop.4',
13
+ publishDate: 1755868793,
14
+ version: '20.0.0-develop.5',
15
15
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
16
16
  };
@@ -7,11 +7,9 @@ import { FileState } from '../types';
7
7
  import { FileListItemBase } from './file-list-item-base';
8
8
  import { LocalizationService } from '@progress/kendo-angular-l10n';
9
9
  import { UploadService } from '../upload.service';
10
- import { getFileGroupCssClass, isPresent } from '../common/util';
10
+ import { fileGroupClass, isPresent, fileSVGGroupIcon } from '../common/util';
11
11
  import { FileInfoTemplateDirective } from '../templates/file-info-template.directive';
12
12
  import { animate, state, style, transition, trigger } from '@angular/animations';
13
- import { fileIcon } from '@progress/kendo-svg-icons';
14
- import { fileGroupMap, fileSVGGroupMap } from '../types/file-groups';
15
13
  import { FileListItemActionButtonComponent } from './file-list-item-action-button.component';
16
14
  import { NgIf, NgClass, NgTemplateOutlet } from '@angular/common';
17
15
  import { IconWrapperComponent } from '@progress/kendo-angular-icons';
@@ -54,19 +52,10 @@ export class FileListSingleItemComponent extends FileListItemBase {
54
52
  return showProgress ? 'active' : 'inactive';
55
53
  }
56
54
  get fileGroupClass() {
57
- return getFileGroupCssClass(this.file.extension ? this.file.extension : '');
55
+ return fileGroupClass(this.file.extension);
58
56
  }
59
57
  get fileSVGGroupIcon() {
60
- const initial = fileIcon;
61
- if (this.file.extension) {
62
- const extension = this.file.extension.toLowerCase();
63
- for (const group in fileGroupMap) {
64
- if (fileGroupMap[group].indexOf(extension) >= 0) {
65
- return fileSVGGroupMap[group];
66
- }
67
- }
68
- }
69
- return initial;
58
+ return fileSVGGroupIcon(this.file.extension);
70
59
  }
71
60
  get isUploadSuccessful() {
72
61
  return this.file.state === FileState.Uploaded;
@@ -7,7 +7,7 @@ import { HttpHeaders, HttpRequest, HttpEventType, HttpResponse } from '@angular/
7
7
  import * as i0 from '@angular/core';
8
8
  import { EventEmitter, Injectable, Directive, ElementRef, ContentChild, ViewChild, Input, HostBinding, Output, Component, HostListener, ViewChildren, Inject, forwardRef, isDevMode, NgModule } from '@angular/core';
9
9
  import { guid, normalizeNumpadKeys, Keys, isControlRequired, isChanged, isDocumentAvailable, KendoInput, ResizeBatchService } from '@progress/kendo-angular-common';
10
- import { fileAudioIcon, fileVideoIcon, fileImageIcon, fileTxtIcon, filePresentationIcon, fileDataIcon, fileProgrammingIcon, filePdfIcon, fileConfigIcon, fileZipIcon, fileDiscImageIcon, arrowRotateCwSmallIcon, playSmIcon, pauseSmIcon, cancelIcon, xIcon, copyIcon, fileIcon, checkIcon, exclamationCircleIcon, uploadIcon } from '@progress/kendo-svg-icons';
10
+ import { fileAudioIcon, fileVideoIcon, fileImageIcon, fileTxtIcon, filePresentationIcon, fileDataIcon, fileProgrammingIcon, filePdfIcon, fileConfigIcon, fileZipIcon, fileDiscImageIcon, fileIcon, arrowRotateCwSmallIcon, playSmIcon, pauseSmIcon, cancelIcon, xIcon, copyIcon, checkIcon, exclamationCircleIcon, uploadIcon } from '@progress/kendo-svg-icons';
11
11
  import { NgControl, NG_VALUE_ACCESSOR } from '@angular/forms';
12
12
  import * as i1$1 from '@progress/kendo-angular-l10n';
13
13
  import { ComponentMessages, LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
@@ -650,7 +650,7 @@ const fileSVGGroupMap = {
650
650
 
651
651
  /* eslint-disable no-bitwise */
652
652
  /**
653
- * @hidden
653
+ * Calculates the total size of the files in KB or MB.
654
654
  */
655
655
  const getTotalFilesSizeMessage = (files) => {
656
656
  let totalSize = 0;
@@ -870,6 +870,26 @@ const getFileGroupCssClass = (fileExtension) => {
870
870
  * @hidden
871
871
  */
872
872
  const isPresent = (value) => value !== null && value !== undefined;
873
+ /**
874
+ * Matches the file extension with the corresponding SVG icon.
875
+ * @returns The SVG icon that corresponds to the file extension.
876
+ */
877
+ const fileSVGGroupIcon = (extension) => {
878
+ const initial = fileIcon;
879
+ if (extension) {
880
+ for (const group in fileGroupMap) {
881
+ if (fileGroupMap[group].indexOf(extension.toLowerCase()) >= 0) {
882
+ return fileSVGGroupMap[group];
883
+ }
884
+ }
885
+ }
886
+ return initial;
887
+ };
888
+ /**
889
+ * Matches the file extension with the corresponding CSS class.
890
+ * @returns The CSS class name that corresponds to the file extension.
891
+ */
892
+ const fileGroupClass = (extension) => getFileGroupCssClass(extension || '');
873
893
 
874
894
  /**
875
895
  * @hidden
@@ -1562,8 +1582,8 @@ const packageMetadata = {
1562
1582
  productName: 'Kendo UI for Angular',
1563
1583
  productCode: 'KENDOUIANGULAR',
1564
1584
  productCodes: ['KENDOUIANGULAR'],
1565
- publishDate: 1755865244,
1566
- version: '20.0.0-develop.4',
1585
+ publishDate: 1755868793,
1586
+ version: '20.0.0-develop.5',
1567
1587
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
1568
1588
  };
1569
1589
 
@@ -2582,19 +2602,10 @@ class FileListSingleItemComponent extends FileListItemBase {
2582
2602
  return showProgress ? 'active' : 'inactive';
2583
2603
  }
2584
2604
  get fileGroupClass() {
2585
- return getFileGroupCssClass(this.file.extension ? this.file.extension : '');
2605
+ return fileGroupClass(this.file.extension);
2586
2606
  }
2587
2607
  get fileSVGGroupIcon() {
2588
- const initial = fileIcon;
2589
- if (this.file.extension) {
2590
- const extension = this.file.extension.toLowerCase();
2591
- for (const group in fileGroupMap) {
2592
- if (fileGroupMap[group].indexOf(extension) >= 0) {
2593
- return fileSVGGroupMap[group];
2594
- }
2595
- }
2596
- }
2597
- return initial;
2608
+ return fileSVGGroupIcon(this.file.extension);
2598
2609
  }
2599
2610
  get isUploadSuccessful() {
2600
2611
  return this.file.state === FileState.Uploaded;
@@ -5250,5 +5261,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
5250
5261
  * Generated bundle index. Do not edit.
5251
5262
  */
5252
5263
 
5253
- 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, validateFiles };
5264
+ 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 };
5254
5265
 
package/index.d.ts CHANGED
@@ -26,6 +26,8 @@ export { CustomMessagesComponent } from './localization/custom-messages.componen
26
26
  export { ActionsLayout } from './common/action-buttons-layout';
27
27
  export { validateFiles } from './common/validation-util';
28
28
  export { UPLOAD_VALUE_ACCESSOR } from './upload.component';
29
+ export { getTotalFilesSizeMessage, fileSVGGroupIcon, fileGroupClass } from './common/util';
30
+ export { FileSelectSettings } from './common/fileselect-settings';
29
31
  export * from './events';
30
32
  export * from './types';
31
33
  export * from './directives';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-upload",
3
- "version": "20.0.0-develop.4",
3
+ "version": "20.0.0-develop.5",
4
4
  "description": "Kendo UI Angular Upload Component",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Progress",
@@ -19,7 +19,7 @@
19
19
  "package": {
20
20
  "productName": "Kendo UI for Angular",
21
21
  "productCode": "KENDOUIANGULAR",
22
- "publishDate": 1755865244,
22
+ "publishDate": 1755868793,
23
23
  "licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
24
24
  }
25
25
  },
@@ -30,16 +30,16 @@
30
30
  "@angular/forms": "16 - 20",
31
31
  "@angular/platform-browser": "16 - 20",
32
32
  "@progress/kendo-licensing": "^1.7.0",
33
- "@progress/kendo-angular-common": "20.0.0-develop.4",
34
- "@progress/kendo-angular-l10n": "20.0.0-develop.4",
35
- "@progress/kendo-angular-icons": "20.0.0-develop.4",
36
- "@progress/kendo-angular-buttons": "20.0.0-develop.4",
37
- "@progress/kendo-angular-progressbar": "20.0.0-develop.4",
33
+ "@progress/kendo-angular-common": "20.0.0-develop.5",
34
+ "@progress/kendo-angular-l10n": "20.0.0-develop.5",
35
+ "@progress/kendo-angular-icons": "20.0.0-develop.5",
36
+ "@progress/kendo-angular-buttons": "20.0.0-develop.5",
37
+ "@progress/kendo-angular-progressbar": "20.0.0-develop.5",
38
38
  "rxjs": "^6.5.3 || ^7.0.0"
39
39
  },
40
40
  "dependencies": {
41
41
  "tslib": "^2.3.1",
42
- "@progress/kendo-angular-schematics": "20.0.0-develop.4"
42
+ "@progress/kendo-angular-schematics": "20.0.0-develop.5"
43
43
  },
44
44
  "schematics": "./schematics/collection.json",
45
45
  "module": "fesm2022/progress-kendo-angular-upload.mjs",
@@ -10,9 +10,9 @@ function default_1(options) {
10
10
  ], peerDependencies: {
11
11
  // peer dep of the icons
12
12
  '@progress/kendo-svg-icons': '^4.0.0',
13
- '@progress/kendo-angular-buttons': '20.0.0-develop.4',
14
- '@progress/kendo-angular-progressbar': '20.0.0-develop.4',
15
- '@progress/kendo-angular-popup': '20.0.0-develop.4',
13
+ '@progress/kendo-angular-buttons': '20.0.0-develop.5',
14
+ '@progress/kendo-angular-progressbar': '20.0.0-develop.5',
15
+ '@progress/kendo-angular-popup': '20.0.0-develop.5',
16
16
  } });
17
17
  return (0, schematics_1.externalSchematic)('@progress/kendo-angular-schematics', 'ng-add', finalOptions);
18
18
  }