@progress/kendo-angular-upload 21.4.1 → 22.0.0-develop.1
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/common/base.d.ts +1 -1
- package/dropzone-base.d.ts +1 -1
- package/fesm2022/progress-kendo-angular-upload.mjs +89 -89
- package/localization/messages.d.ts +1 -1
- package/package.json +13 -21
- package/rendering/file-list-item-base.d.ts +1 -1
- package/schematics/ngAdd/index.js +3 -3
- package/esm2022/common/action-buttons-layout.mjs +0 -5
- package/esm2022/common/base.mjs +0 -280
- package/esm2022/common/fileselect-settings.mjs +0 -5
- package/esm2022/common/util.mjs +0 -253
- package/esm2022/common/validation-util.mjs +0 -60
- package/esm2022/directives.mjs +0 -89
- package/esm2022/dropzone-base.mjs +0 -69
- package/esm2022/dropzone-external.directive.mjs +0 -111
- package/esm2022/dropzone-internal.directive.mjs +0 -109
- package/esm2022/dropzone.component.mjs +0 -169
- package/esm2022/dropzone.service.mjs +0 -37
- package/esm2022/events/cancel-event.mjs +0 -35
- package/esm2022/events/clear-event.mjs +0 -29
- package/esm2022/events/error-event.mjs +0 -48
- package/esm2022/events/pause-event.mjs +0 -38
- package/esm2022/events/preventable-event.mjs +0 -25
- package/esm2022/events/remove-event.mjs +0 -49
- package/esm2022/events/resume-event.mjs +0 -38
- package/esm2022/events/select-event.mjs +0 -37
- package/esm2022/events/success-event.mjs +0 -49
- package/esm2022/events/upload-event.mjs +0 -49
- package/esm2022/events/upload-progress-event.mjs +0 -41
- package/esm2022/events.mjs +0 -14
- package/esm2022/file-select.directive.mjs +0 -136
- package/esm2022/fileselect.component.mjs +0 -452
- package/esm2022/fileselect.module.mjs +0 -41
- package/esm2022/index.mjs +0 -31
- package/esm2022/localization/custom-messages.component.mjs +0 -70
- package/esm2022/localization/localized-messages.directive.mjs +0 -43
- package/esm2022/localization/messages.mjs +0 -185
- package/esm2022/navigation.service.mjs +0 -151
- package/esm2022/package-metadata.mjs +0 -16
- package/esm2022/progress-kendo-angular-upload.mjs +0 -8
- package/esm2022/rendering/file-list-item-action-button.component.mjs +0 -230
- package/esm2022/rendering/file-list-item-base.mjs +0 -52
- package/esm2022/rendering/file-list-item.mjs +0 -115
- package/esm2022/rendering/file-list-multiple-items.component.mjs +0 -201
- package/esm2022/rendering/file-list-single-item.component.mjs +0 -181
- package/esm2022/rendering/file-list.component.mjs +0 -189
- package/esm2022/rendering/upload-action-buttons.component.mjs +0 -126
- package/esm2022/rendering/upload-status-total.component.mjs +0 -97
- package/esm2022/templates/file-info-template.directive.mjs +0 -39
- package/esm2022/templates/file-template.directive.mjs +0 -39
- package/esm2022/types/async-settings.mjs +0 -5
- package/esm2022/types/chunk-info.mjs +0 -5
- package/esm2022/types/chunk-map.mjs +0 -35
- package/esm2022/types/chunk-metadata.mjs +0 -5
- package/esm2022/types/chunk-settings.mjs +0 -5
- package/esm2022/types/direction.mjs +0 -5
- package/esm2022/types/file-groups.mjs +0 -60
- package/esm2022/types/file-info.mjs +0 -5
- package/esm2022/types/file-map.mjs +0 -144
- package/esm2022/types/file-restrictions.mjs +0 -5
- package/esm2022/types/file-state.mjs +0 -34
- package/esm2022/types/operation-type.mjs +0 -5
- package/esm2022/types.mjs +0 -6
- package/esm2022/upload.component.mjs +0 -901
- package/esm2022/upload.module.mjs +0 -43
- package/esm2022/upload.service.mjs +0 -431
- package/esm2022/uploads.module.mjs +0 -66
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
/* eslint-disable @angular-eslint/component-selector */
|
|
6
|
-
import { Input, Component, ViewChildren, QueryList, HostBinding } from '@angular/core';
|
|
7
|
-
import { Keys } from '@progress/kendo-angular-common';
|
|
8
|
-
import { FileState } from '../types';
|
|
9
|
-
import { FileTemplateDirective } from '../templates/file-template.directive';
|
|
10
|
-
import { FileListItemDirective } from './file-list-item';
|
|
11
|
-
import { NavigationService } from '../navigation.service';
|
|
12
|
-
import { UploadService } from '../upload.service';
|
|
13
|
-
import { FileInfoTemplateDirective } from '../templates/file-info-template.directive';
|
|
14
|
-
import { FileListMultipleItemsComponent } from './file-list-multiple-items.component';
|
|
15
|
-
import { FileListSingleItemComponent } from './file-list-single-item.component';
|
|
16
|
-
import { NgTemplateOutlet } from '@angular/common';
|
|
17
|
-
import * as i0 from "@angular/core";
|
|
18
|
-
import * as i1 from "../upload.service";
|
|
19
|
-
import * as i2 from "../navigation.service";
|
|
20
|
-
/**
|
|
21
|
-
* @hidden
|
|
22
|
-
*/
|
|
23
|
-
export class FileListComponent {
|
|
24
|
-
uploadService;
|
|
25
|
-
navigation;
|
|
26
|
-
disabled;
|
|
27
|
-
fileList;
|
|
28
|
-
fileTemplate;
|
|
29
|
-
fileInfoTemplate;
|
|
30
|
-
fileListItems;
|
|
31
|
-
fileListRole = 'list';
|
|
32
|
-
focusSubscription;
|
|
33
|
-
actionSubscription;
|
|
34
|
-
constructor(uploadService, navigation) {
|
|
35
|
-
this.uploadService = uploadService;
|
|
36
|
-
this.navigation = navigation;
|
|
37
|
-
this.onItemFocus();
|
|
38
|
-
this.onItemAction();
|
|
39
|
-
}
|
|
40
|
-
onItemFocus() {
|
|
41
|
-
this.focusSubscription = this.navigation.onFileFocus.subscribe((index) => {
|
|
42
|
-
this.fileListItems.toArray()[index].focus();
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
onItemAction() {
|
|
46
|
-
this.actionSubscription = this.navigation.onFileAction.subscribe((key) => {
|
|
47
|
-
this.itemActionHandler(key);
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
itemActionHandler(key) {
|
|
51
|
-
const index = this.navigation.focusedIndex;
|
|
52
|
-
const filesArray = this.fileListItems.toArray();
|
|
53
|
-
const numberOfFiles = filesArray.length;
|
|
54
|
-
const item = filesArray[index];
|
|
55
|
-
const uid = item.uidAttribute;
|
|
56
|
-
const files = this.uploadService.files.get(uid);
|
|
57
|
-
if (key === Keys.Escape && files[0].state === FileState.Uploading) {
|
|
58
|
-
this.uploadService.cancelFiles(uid);
|
|
59
|
-
this.navigation.focusSelectButton();
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
if ((key === Keys.Enter || key === Keys.NumpadEnter) && files[0].state === FileState.Failed) {
|
|
63
|
-
this.uploadService.retryFiles(uid);
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
if (key === Keys.Delete) {
|
|
67
|
-
if (files[0].state === FileState.Uploading) {
|
|
68
|
-
this.uploadService.cancelFiles(uid);
|
|
69
|
-
}
|
|
70
|
-
else if (this.hasDelete(item)) {
|
|
71
|
-
this.uploadService.removeFiles(uid);
|
|
72
|
-
}
|
|
73
|
-
if (index < numberOfFiles - 1) {
|
|
74
|
-
filesArray[index + 1].focus();
|
|
75
|
-
}
|
|
76
|
-
else if (numberOfFiles === 1) {
|
|
77
|
-
this.navigation.focusSelectButton();
|
|
78
|
-
}
|
|
79
|
-
else if (index === numberOfFiles - 1) {
|
|
80
|
-
this.navigation.focusedIndex = this.navigation.focusedFileIndex = index - 1;
|
|
81
|
-
filesArray[index - 1].focus();
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
const isUploadChunk = this.uploadService.async.chunk;
|
|
85
|
-
const canTogglePauseResume = key === Keys.Space && files[0].state !== FileState.Uploaded;
|
|
86
|
-
if (canTogglePauseResume && isUploadChunk) {
|
|
87
|
-
if (files[0].state === FileState.Paused) {
|
|
88
|
-
this.uploadService.resumeFile(uid);
|
|
89
|
-
}
|
|
90
|
-
else {
|
|
91
|
-
this.uploadService.pauseFile(uid);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
hasDelete(item) {
|
|
96
|
-
return item.element.nativeElement.getElementsByClassName('k-svg-i-x').length > 0;
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Tracks files array by the UID of the first file in the batch.
|
|
100
|
-
* Each batch of files shares the same UID, which remains stable
|
|
101
|
-
* throughout the file lifecycle until the batch is removed.
|
|
102
|
-
*/
|
|
103
|
-
trackByUid(index, files) {
|
|
104
|
-
return files[0]?.uid || index.toString();
|
|
105
|
-
}
|
|
106
|
-
ngOnDestroy() {
|
|
107
|
-
this.focusSubscription.unsubscribe();
|
|
108
|
-
this.actionSubscription.unsubscribe();
|
|
109
|
-
}
|
|
110
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FileListComponent, deps: [{ token: i1.UploadService }, { token: i2.NavigationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
111
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: FileListComponent, isStandalone: true, selector: "[kendo-upload-file-list]", inputs: { disabled: "disabled", fileList: "fileList", fileTemplate: "fileTemplate", fileInfoTemplate: "fileInfoTemplate" }, host: { properties: { "attr.role": "this.fileListRole" } }, viewQueries: [{ propertyName: "fileListItems", predicate: FileListItemDirective, descendants: true }], ngImport: i0, template: `
|
|
112
|
-
@for (files of fileList; track trackByUid($index, files); let index = $index) {
|
|
113
|
-
<li kendoUploadFileListItem [files]='files' [index]='index' role="listitem">
|
|
114
|
-
@if (files.length === 1 && !fileTemplate) {
|
|
115
|
-
<kendo-upload-file-list-single-item
|
|
116
|
-
class='k-file-single'
|
|
117
|
-
[disabled]='disabled'
|
|
118
|
-
[file]='files[0]'
|
|
119
|
-
[fileInfoTemplate]="fileInfoTemplate"></kendo-upload-file-list-single-item>
|
|
120
|
-
}
|
|
121
|
-
@if (files.length > 1 && !fileTemplate) {
|
|
122
|
-
<kendo-upload-file-list-multiple-items
|
|
123
|
-
class='k-file-multiple'
|
|
124
|
-
[disabled]='disabled'
|
|
125
|
-
[files]='files'
|
|
126
|
-
[fileInfoTemplate]="fileInfoTemplate"></kendo-upload-file-list-multiple-items>
|
|
127
|
-
}
|
|
128
|
-
@if (fileTemplate) {
|
|
129
|
-
<ng-container
|
|
130
|
-
[ngTemplateOutlet]="fileTemplate.templateRef" [ngTemplateOutletContext]="{
|
|
131
|
-
templateRef: fileTemplate.templateRef,
|
|
132
|
-
state: files[0].state,
|
|
133
|
-
$implicit: files
|
|
134
|
-
}"></ng-container>
|
|
135
|
-
}
|
|
136
|
-
</li>
|
|
137
|
-
}
|
|
138
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: FileListItemDirective, selector: "[kendoUploadFileListItem]", inputs: ["files", "index"] }, { kind: "component", type: FileListSingleItemComponent, selector: "kendo-upload-file-list-single-item", inputs: ["disabled", "file", "fileInfoTemplate"] }, { kind: "component", type: FileListMultipleItemsComponent, selector: "kendo-upload-file-list-multiple-items", inputs: ["disabled", "files", "fileInfoTemplate"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
139
|
-
}
|
|
140
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FileListComponent, decorators: [{
|
|
141
|
-
type: Component,
|
|
142
|
-
args: [{
|
|
143
|
-
selector: '[kendo-upload-file-list]',
|
|
144
|
-
template: `
|
|
145
|
-
@for (files of fileList; track trackByUid($index, files); let index = $index) {
|
|
146
|
-
<li kendoUploadFileListItem [files]='files' [index]='index' role="listitem">
|
|
147
|
-
@if (files.length === 1 && !fileTemplate) {
|
|
148
|
-
<kendo-upload-file-list-single-item
|
|
149
|
-
class='k-file-single'
|
|
150
|
-
[disabled]='disabled'
|
|
151
|
-
[file]='files[0]'
|
|
152
|
-
[fileInfoTemplate]="fileInfoTemplate"></kendo-upload-file-list-single-item>
|
|
153
|
-
}
|
|
154
|
-
@if (files.length > 1 && !fileTemplate) {
|
|
155
|
-
<kendo-upload-file-list-multiple-items
|
|
156
|
-
class='k-file-multiple'
|
|
157
|
-
[disabled]='disabled'
|
|
158
|
-
[files]='files'
|
|
159
|
-
[fileInfoTemplate]="fileInfoTemplate"></kendo-upload-file-list-multiple-items>
|
|
160
|
-
}
|
|
161
|
-
@if (fileTemplate) {
|
|
162
|
-
<ng-container
|
|
163
|
-
[ngTemplateOutlet]="fileTemplate.templateRef" [ngTemplateOutletContext]="{
|
|
164
|
-
templateRef: fileTemplate.templateRef,
|
|
165
|
-
state: files[0].state,
|
|
166
|
-
$implicit: files
|
|
167
|
-
}"></ng-container>
|
|
168
|
-
}
|
|
169
|
-
</li>
|
|
170
|
-
}
|
|
171
|
-
`,
|
|
172
|
-
standalone: true,
|
|
173
|
-
imports: [FileListItemDirective, FileListSingleItemComponent, FileListMultipleItemsComponent, NgTemplateOutlet]
|
|
174
|
-
}]
|
|
175
|
-
}], ctorParameters: () => [{ type: i1.UploadService }, { type: i2.NavigationService }], propDecorators: { disabled: [{
|
|
176
|
-
type: Input
|
|
177
|
-
}], fileList: [{
|
|
178
|
-
type: Input
|
|
179
|
-
}], fileTemplate: [{
|
|
180
|
-
type: Input
|
|
181
|
-
}], fileInfoTemplate: [{
|
|
182
|
-
type: Input
|
|
183
|
-
}], fileListItems: [{
|
|
184
|
-
type: ViewChildren,
|
|
185
|
-
args: [FileListItemDirective]
|
|
186
|
-
}], fileListRole: [{
|
|
187
|
-
type: HostBinding,
|
|
188
|
-
args: ['attr.role']
|
|
189
|
-
}] } });
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
/* eslint-disable no-debugger */
|
|
6
|
-
import { Component, Input, HostBinding, ViewChild, ElementRef } from '@angular/core';
|
|
7
|
-
import { UploadService } from '../upload.service';
|
|
8
|
-
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
9
|
-
import { NavigationService } from '../navigation.service';
|
|
10
|
-
import * as i0 from "@angular/core";
|
|
11
|
-
import * as i1 from "../upload.service";
|
|
12
|
-
import * as i2 from "@progress/kendo-angular-l10n";
|
|
13
|
-
import * as i3 from "../navigation.service";
|
|
14
|
-
/**
|
|
15
|
-
* @hidden
|
|
16
|
-
*/
|
|
17
|
-
export class UploadActionButtonsComponent {
|
|
18
|
-
uploadService;
|
|
19
|
-
localization;
|
|
20
|
-
navigation;
|
|
21
|
-
disabled;
|
|
22
|
-
actionsLayout;
|
|
23
|
-
clearButton;
|
|
24
|
-
uploadButton;
|
|
25
|
-
hostDefaultClass = true;
|
|
26
|
-
get actionButtonsEndClassName() {
|
|
27
|
-
return this.actionsLayout === 'end';
|
|
28
|
-
}
|
|
29
|
-
get actionButtonsStretchedClassName() {
|
|
30
|
-
return this.actionsLayout === 'stretched';
|
|
31
|
-
}
|
|
32
|
-
get actionButtonsStartClassName() {
|
|
33
|
-
return this.actionsLayout === 'start';
|
|
34
|
-
}
|
|
35
|
-
get actionButtonsCenterClassName() {
|
|
36
|
-
return this.actionsLayout === 'center';
|
|
37
|
-
}
|
|
38
|
-
constructor(uploadService, localization, navigation) {
|
|
39
|
-
this.uploadService = uploadService;
|
|
40
|
-
this.localization = localization;
|
|
41
|
-
this.navigation = navigation;
|
|
42
|
-
}
|
|
43
|
-
onUploadButtonFocus() {
|
|
44
|
-
if (!this.navigation.focused) {
|
|
45
|
-
this.navigation.focusedIndex = this.navigation.lastIndex;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
onUploadButtonClick(event) {
|
|
49
|
-
event.stopImmediatePropagation();
|
|
50
|
-
this.performUpload();
|
|
51
|
-
}
|
|
52
|
-
performUpload() {
|
|
53
|
-
if (!this.disabled) {
|
|
54
|
-
this.uploadService.uploadFiles();
|
|
55
|
-
this.navigation.focusSelectButton();
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
onClearButtonClick(event) {
|
|
59
|
-
event.stopImmediatePropagation();
|
|
60
|
-
this.clearFiles();
|
|
61
|
-
}
|
|
62
|
-
clearFiles() {
|
|
63
|
-
if (!this.disabled) {
|
|
64
|
-
this.uploadService.clearFiles();
|
|
65
|
-
this.navigation.focusSelectButton();
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
textFor(key) {
|
|
69
|
-
return this.localization.get(key);
|
|
70
|
-
}
|
|
71
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: UploadActionButtonsComponent, deps: [{ token: i1.UploadService }, { token: i2.LocalizationService }, { token: i3.NavigationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
72
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: UploadActionButtonsComponent, isStandalone: true, selector: "kendo-upload-action-buttons", inputs: { disabled: "disabled", actionsLayout: "actionsLayout" }, host: { properties: { "class.k-actions": "this.hostDefaultClass", "class.k-actions-end": "this.actionButtonsEndClassName", "class.k-actions-stretched": "this.actionButtonsStretchedClassName", "class.k-actions-start": "this.actionButtonsStartClassName", "class.k-actions-center": "this.actionButtonsCenterClassName" } }, viewQueries: [{ propertyName: "clearButton", first: true, predicate: ["clearButton"], descendants: true, static: true }, { propertyName: "uploadButton", first: true, predicate: ["uploadButton"], descendants: true, static: true }], ngImport: i0, template: `
|
|
73
|
-
<button #clearButton role="button" class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-clear-selected"
|
|
74
|
-
(click)="onClearButtonClick($event)">
|
|
75
|
-
{{textFor('clearSelectedFiles')}}
|
|
76
|
-
</button>
|
|
77
|
-
<button #uploadButton role="button" class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-primary k-upload-selected"
|
|
78
|
-
(focus)="onUploadButtonFocus()"
|
|
79
|
-
(click)="onUploadButtonClick($event)">
|
|
80
|
-
{{textFor('uploadSelectedFiles')}}
|
|
81
|
-
</button>
|
|
82
|
-
`, isInline: true });
|
|
83
|
-
}
|
|
84
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: UploadActionButtonsComponent, decorators: [{
|
|
85
|
-
type: Component,
|
|
86
|
-
args: [{
|
|
87
|
-
selector: 'kendo-upload-action-buttons',
|
|
88
|
-
template: `
|
|
89
|
-
<button #clearButton role="button" class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-clear-selected"
|
|
90
|
-
(click)="onClearButtonClick($event)">
|
|
91
|
-
{{textFor('clearSelectedFiles')}}
|
|
92
|
-
</button>
|
|
93
|
-
<button #uploadButton role="button" class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-primary k-upload-selected"
|
|
94
|
-
(focus)="onUploadButtonFocus()"
|
|
95
|
-
(click)="onUploadButtonClick($event)">
|
|
96
|
-
{{textFor('uploadSelectedFiles')}}
|
|
97
|
-
</button>
|
|
98
|
-
`,
|
|
99
|
-
standalone: true
|
|
100
|
-
}]
|
|
101
|
-
}], ctorParameters: () => [{ type: i1.UploadService }, { type: i2.LocalizationService }, { type: i3.NavigationService }], propDecorators: { disabled: [{
|
|
102
|
-
type: Input
|
|
103
|
-
}], actionsLayout: [{
|
|
104
|
-
type: Input
|
|
105
|
-
}], clearButton: [{
|
|
106
|
-
type: ViewChild,
|
|
107
|
-
args: ['clearButton', { static: true }]
|
|
108
|
-
}], uploadButton: [{
|
|
109
|
-
type: ViewChild,
|
|
110
|
-
args: ['uploadButton', { static: true }]
|
|
111
|
-
}], hostDefaultClass: [{
|
|
112
|
-
type: HostBinding,
|
|
113
|
-
args: ['class.k-actions']
|
|
114
|
-
}], actionButtonsEndClassName: [{
|
|
115
|
-
type: HostBinding,
|
|
116
|
-
args: ['class.k-actions-end']
|
|
117
|
-
}], actionButtonsStretchedClassName: [{
|
|
118
|
-
type: HostBinding,
|
|
119
|
-
args: ['class.k-actions-stretched']
|
|
120
|
-
}], actionButtonsStartClassName: [{
|
|
121
|
-
type: HostBinding,
|
|
122
|
-
args: ['class.k-actions-start']
|
|
123
|
-
}], actionButtonsCenterClassName: [{
|
|
124
|
-
type: HostBinding,
|
|
125
|
-
args: ['class.k-actions-center']
|
|
126
|
-
}] } });
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Component, Input } from '@angular/core';
|
|
6
|
-
import { FileMap } from '../types/file-map';
|
|
7
|
-
import { FileState } from '../types';
|
|
8
|
-
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
9
|
-
import { checkIcon, exclamationCircleIcon, pauseSmIcon, uploadIcon } from '@progress/kendo-svg-icons';
|
|
10
|
-
import { IconWrapperComponent } from '@progress/kendo-angular-icons';
|
|
11
|
-
import * as i0 from "@angular/core";
|
|
12
|
-
import * as i1 from "@progress/kendo-angular-l10n";
|
|
13
|
-
/**
|
|
14
|
-
* @hidden
|
|
15
|
-
*/
|
|
16
|
-
export class UploadStatusTotalComponent {
|
|
17
|
-
localization;
|
|
18
|
-
fileList;
|
|
19
|
-
isFailed;
|
|
20
|
-
isPaused;
|
|
21
|
-
isUploading;
|
|
22
|
-
statusText;
|
|
23
|
-
checkmarkIcon = checkIcon;
|
|
24
|
-
exceptionSVGIcon = exclamationCircleIcon;
|
|
25
|
-
uploadSVGIcon = uploadIcon;
|
|
26
|
-
pauseSVGIcon = pauseSmIcon;
|
|
27
|
-
constructor(localization) {
|
|
28
|
-
this.localization = localization;
|
|
29
|
-
}
|
|
30
|
-
get iconClass() {
|
|
31
|
-
if (!this.isUploading && !this.isFailed) {
|
|
32
|
-
return 'checkmark';
|
|
33
|
-
}
|
|
34
|
-
if (!this.isUploading && this.isFailed) {
|
|
35
|
-
return 'exception';
|
|
36
|
-
}
|
|
37
|
-
if (this.isUploading) {
|
|
38
|
-
return 'upload';
|
|
39
|
-
}
|
|
40
|
-
if (this.isPaused) {
|
|
41
|
-
return 'pause-sm';
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
get SVGIconClass() {
|
|
45
|
-
if (!this.isUploading && !this.isFailed) {
|
|
46
|
-
return this.checkmarkIcon;
|
|
47
|
-
}
|
|
48
|
-
if (!this.isUploading && this.isFailed) {
|
|
49
|
-
return this.exceptionSVGIcon;
|
|
50
|
-
}
|
|
51
|
-
if (this.isUploading) {
|
|
52
|
-
return this.uploadSVGIcon;
|
|
53
|
-
}
|
|
54
|
-
if (this.isPaused) {
|
|
55
|
-
return this.pauseSVGIcon;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
ngDoCheck() {
|
|
59
|
-
this.isPaused = this.fileList.hasFileWithState([FileState.Paused]);
|
|
60
|
-
this.isFailed = this.fileList.hasFileWithState([FileState.Failed]);
|
|
61
|
-
this.isUploading = this.fileList.hasFileWithState([FileState.Uploading]);
|
|
62
|
-
if (this.isPaused && !this.isUploading) {
|
|
63
|
-
this.statusText = this.localization.get('headerStatusPaused');
|
|
64
|
-
}
|
|
65
|
-
else {
|
|
66
|
-
this.statusText = this.isUploading ? this.localization.get('headerStatusUploading')
|
|
67
|
-
: this.localization.get('headerStatusUploaded');
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: UploadStatusTotalComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
71
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: UploadStatusTotalComponent, isStandalone: true, selector: "kendo-upload-status-total", inputs: { fileList: "fileList" }, ngImport: i0, template: `
|
|
72
|
-
<kendo-icon-wrapper
|
|
73
|
-
[name]="iconClass"
|
|
74
|
-
[svgIcon]="SVGIconClass"
|
|
75
|
-
>
|
|
76
|
-
</kendo-icon-wrapper>
|
|
77
|
-
{{statusText}}
|
|
78
|
-
`, isInline: true, dependencies: [{ kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }] });
|
|
79
|
-
}
|
|
80
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: UploadStatusTotalComponent, decorators: [{
|
|
81
|
-
type: Component,
|
|
82
|
-
args: [{
|
|
83
|
-
selector: 'kendo-upload-status-total',
|
|
84
|
-
template: `
|
|
85
|
-
<kendo-icon-wrapper
|
|
86
|
-
[name]="iconClass"
|
|
87
|
-
[svgIcon]="SVGIconClass"
|
|
88
|
-
>
|
|
89
|
-
</kendo-icon-wrapper>
|
|
90
|
-
{{statusText}}
|
|
91
|
-
`,
|
|
92
|
-
standalone: true,
|
|
93
|
-
imports: [IconWrapperComponent]
|
|
94
|
-
}]
|
|
95
|
-
}], ctorParameters: () => [{ type: i1.LocalizationService }], propDecorators: { fileList: [{
|
|
96
|
-
type: Input
|
|
97
|
-
}] } });
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Directive, TemplateRef } from '@angular/core';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
/**
|
|
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
|
-
*
|
|
10
|
-
* The following context variables are available in the template:
|
|
11
|
-
*
|
|
12
|
-
* * `let-files`—A reference to the files associated with the current item.
|
|
13
|
-
* * `let-state`—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"`—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
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* ```html
|
|
18
|
-
* <kendo-upload #myUpload="kendoUpload">
|
|
19
|
-
* <ng-template kendoUploadFileInfoTemplate let-files let-state>
|
|
20
|
-
* <div>Name: {{ files[0].name }}</div>
|
|
21
|
-
* </ng-template>
|
|
22
|
-
* </kendo-upload>
|
|
23
|
-
* ```
|
|
24
|
-
*/
|
|
25
|
-
export class FileInfoTemplateDirective {
|
|
26
|
-
templateRef;
|
|
27
|
-
constructor(templateRef) {
|
|
28
|
-
this.templateRef = templateRef;
|
|
29
|
-
}
|
|
30
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FileInfoTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
31
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: FileInfoTemplateDirective, isStandalone: true, selector: "[kendoUploadFileInfoTemplate], [kendoFileSelectFileInfoTemplate]", ngImport: i0 });
|
|
32
|
-
}
|
|
33
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FileInfoTemplateDirective, decorators: [{
|
|
34
|
-
type: Directive,
|
|
35
|
-
args: [{
|
|
36
|
-
selector: '[kendoUploadFileInfoTemplate], [kendoFileSelectFileInfoTemplate]',
|
|
37
|
-
standalone: true
|
|
38
|
-
}]
|
|
39
|
-
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Directive, TemplateRef } from '@angular/core';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
/**
|
|
8
|
-
* Customizes the rendering of files in the list. ([See example.](slug:templates_upload#toc-file-template))
|
|
9
|
-
*
|
|
10
|
-
* The following context variables are available in the template:
|
|
11
|
-
*
|
|
12
|
-
* * `let-files`—A reference to the files associated with the current item.
|
|
13
|
-
* * `let-state`—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"`—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
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* ```html
|
|
18
|
-
* <kendo-upload #myUpload="kendoUpload">
|
|
19
|
-
* <ng-template kendoUploadFileTemplate let-files let-state>
|
|
20
|
-
* <div>Name: {{ files[0].name }} Size: {{ files[0].size }} bytes</div>
|
|
21
|
-
* </ng-template>
|
|
22
|
-
* </kendo-upload>
|
|
23
|
-
* ```
|
|
24
|
-
*/
|
|
25
|
-
export class FileTemplateDirective {
|
|
26
|
-
templateRef;
|
|
27
|
-
constructor(templateRef) {
|
|
28
|
-
this.templateRef = templateRef;
|
|
29
|
-
}
|
|
30
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FileTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
31
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: FileTemplateDirective, isStandalone: true, selector: "[kendoUploadFileTemplate], [kendoFileSelectFileTemplate]", ngImport: i0 });
|
|
32
|
-
}
|
|
33
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FileTemplateDirective, decorators: [{
|
|
34
|
-
type: Directive,
|
|
35
|
-
args: [{
|
|
36
|
-
selector: '[kendoUploadFileTemplate], [kendoFileSelectFileTemplate]',
|
|
37
|
-
standalone: true
|
|
38
|
-
}]
|
|
39
|
-
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
export {};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
/**
|
|
6
|
-
* @hidden
|
|
7
|
-
*/
|
|
8
|
-
export class ChunkMap {
|
|
9
|
-
_files;
|
|
10
|
-
constructor() {
|
|
11
|
-
this._files = {};
|
|
12
|
-
}
|
|
13
|
-
add(uid, totalChunks) {
|
|
14
|
-
const initialChunkInfo = {
|
|
15
|
-
index: 0,
|
|
16
|
-
position: 0,
|
|
17
|
-
retries: 0,
|
|
18
|
-
totalChunks: totalChunks
|
|
19
|
-
};
|
|
20
|
-
this._files[uid] = initialChunkInfo;
|
|
21
|
-
return initialChunkInfo;
|
|
22
|
-
}
|
|
23
|
-
remove(uid) {
|
|
24
|
-
if (this.has(uid)) {
|
|
25
|
-
this._files[uid] = null;
|
|
26
|
-
delete this._files[uid];
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
has(uid) {
|
|
30
|
-
return uid in this._files;
|
|
31
|
-
}
|
|
32
|
-
get(uid) {
|
|
33
|
-
return this._files[uid];
|
|
34
|
-
}
|
|
35
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
export {};
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { fileAudioIcon, fileConfigIcon, fileDiscImageIcon, fileDataIcon, fileImageIcon, filePdfIcon, filePresentationIcon, fileProgrammingIcon, fileTxtIcon, fileVideoIcon, fileZipIcon } from "@progress/kendo-svg-icons";
|
|
6
|
-
/**
|
|
7
|
-
* @hidden
|
|
8
|
-
*/
|
|
9
|
-
export const fileGroupMap = {
|
|
10
|
-
audio: [
|
|
11
|
-
".aif", ".iff", ".m3u", ".m4a", ".mid", ".mp3", ".mpa", ".wav", ".wma", ".ogg", ".wav", ".wma", ".wpl"
|
|
12
|
-
],
|
|
13
|
-
video: [
|
|
14
|
-
".3g2", ".3gp", ".avi", ".asf", ".flv", ".m4u", ".rm", ".h264", ".m4v", ".mkv", ".mov", ".mp4", ".mpg", ".rm", ".swf", ".vob", ".wmv"
|
|
15
|
-
],
|
|
16
|
-
image: [
|
|
17
|
-
".ai", ".dds", ".heic", ".jpe", "jfif", ".jif", ".jp2", ".jps", ".eps", ".bmp", ".gif", ".jpeg", ".jpg", ".png", ".ps", ".psd", ".svg", ".svgz", ".tif", ".tiff"
|
|
18
|
-
],
|
|
19
|
-
txt: [
|
|
20
|
-
".doc", ".docx", ".log", ".pages", ".tex", ".wpd", ".wps", ".odt", ".rtf", ".text", ".txt", ".wks"
|
|
21
|
-
],
|
|
22
|
-
presentation: [
|
|
23
|
-
".key", ".odp", ".pps", ".ppt", ".pptx"
|
|
24
|
-
],
|
|
25
|
-
data: [
|
|
26
|
-
".xlr", ".xls", ".xlsx"
|
|
27
|
-
],
|
|
28
|
-
programming: [
|
|
29
|
-
".tmp", ".bak", ".msi", ".cab", ".cpl", ".cur", ".dll", ".dmp", ".drv", ".icns", ".ico", ".link", ".sys", ".cfg",
|
|
30
|
-
".ini", ".asp", ".aspx", ".cer", ".csr", ".css", ".dcr", ".htm", ".html", ".js", ".php", ".rss", ".xhtml"
|
|
31
|
-
],
|
|
32
|
-
pdf: [
|
|
33
|
-
".pdf"
|
|
34
|
-
],
|
|
35
|
-
config: [
|
|
36
|
-
".apk", ".app", ".bat", ".cgi", ".com", ".exe", ".gadget", ".jar", ".wsf"
|
|
37
|
-
],
|
|
38
|
-
zip: [
|
|
39
|
-
".7z", ".cbr", ".gz", ".sitx", ".arj", ".deb", ".pkg", ".rar", ".rpm", ".tar.gz", ".z", ".zip", ".zipx"
|
|
40
|
-
],
|
|
41
|
-
discImage: [
|
|
42
|
-
".dmg", ".iso", ".toast", ".vcd", ".bin", ".cue", ".mdf"
|
|
43
|
-
]
|
|
44
|
-
};
|
|
45
|
-
/**
|
|
46
|
-
* @hidden
|
|
47
|
-
*/
|
|
48
|
-
export const fileSVGGroupMap = {
|
|
49
|
-
audio: fileAudioIcon,
|
|
50
|
-
video: fileVideoIcon,
|
|
51
|
-
image: fileImageIcon,
|
|
52
|
-
txt: fileTxtIcon,
|
|
53
|
-
presentation: filePresentationIcon,
|
|
54
|
-
data: fileDataIcon,
|
|
55
|
-
programming: fileProgrammingIcon,
|
|
56
|
-
pdf: filePdfIcon,
|
|
57
|
-
config: fileConfigIcon,
|
|
58
|
-
zip: fileZipIcon,
|
|
59
|
-
discImage: fileDiscImageIcon
|
|
60
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
export {};
|