@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,185 +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, Input } from '@angular/core';
|
|
6
|
-
import { ComponentMessages } from '@progress/kendo-angular-l10n';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
/**
|
|
9
|
-
* @hidden
|
|
10
|
-
*/
|
|
11
|
-
export class Messages extends ComponentMessages {
|
|
12
|
-
/**
|
|
13
|
-
* Sets the text for the **Cancel** button.
|
|
14
|
-
*
|
|
15
|
-
* @default 'Cancel'
|
|
16
|
-
*/
|
|
17
|
-
cancel;
|
|
18
|
-
/**
|
|
19
|
-
* Sets the text for the **Clear** button.
|
|
20
|
-
*
|
|
21
|
-
* @default 'Clear'
|
|
22
|
-
*/
|
|
23
|
-
clearSelectedFiles;
|
|
24
|
-
/**
|
|
25
|
-
* Sets the drop-zone hint.
|
|
26
|
-
*
|
|
27
|
-
* @default 'Drop files here to upload'
|
|
28
|
-
*/
|
|
29
|
-
dropFilesHere;
|
|
30
|
-
/**
|
|
31
|
-
* Sets the external drop-zone hint.
|
|
32
|
-
*
|
|
33
|
-
* @default 'Drag and drop files here to upload'
|
|
34
|
-
*/
|
|
35
|
-
externalDropFilesHere;
|
|
36
|
-
/**
|
|
37
|
-
* Sets the status message for a batch of files.
|
|
38
|
-
*
|
|
39
|
-
* @default 'files'
|
|
40
|
-
*/
|
|
41
|
-
filesBatchStatus;
|
|
42
|
-
/**
|
|
43
|
-
* Sets the status message for a batch of files after failed upload.
|
|
44
|
-
*
|
|
45
|
-
* @default 'files failed to upload.'
|
|
46
|
-
*/
|
|
47
|
-
filesBatchStatusFailed;
|
|
48
|
-
/**
|
|
49
|
-
* Sets the status message for a batch of files after successful upload.
|
|
50
|
-
*
|
|
51
|
-
* @default 'files successfully uploaded.'
|
|
52
|
-
*/
|
|
53
|
-
filesBatchStatusUploaded;
|
|
54
|
-
/**
|
|
55
|
-
* Sets the file status message after failed upload.
|
|
56
|
-
*
|
|
57
|
-
* @default 'File failed to upload.'
|
|
58
|
-
*/
|
|
59
|
-
fileStatusFailed;
|
|
60
|
-
/**
|
|
61
|
-
* Sets the file status message after successful upload.
|
|
62
|
-
*
|
|
63
|
-
* @default 'File successfully uploaded.'
|
|
64
|
-
*/
|
|
65
|
-
fileStatusUploaded;
|
|
66
|
-
/**
|
|
67
|
-
* Sets the header status message when the file upload is paused.
|
|
68
|
-
*
|
|
69
|
-
* @default 'Paused'
|
|
70
|
-
*/
|
|
71
|
-
headerStatusPaused;
|
|
72
|
-
/**
|
|
73
|
-
* Sets the header status message after the file upload completes.
|
|
74
|
-
*
|
|
75
|
-
* @default 'Done'
|
|
76
|
-
*/
|
|
77
|
-
headerStatusUploaded;
|
|
78
|
-
/**
|
|
79
|
-
* Sets the header status message during the upload of the file.
|
|
80
|
-
*
|
|
81
|
-
* @default 'Uploading...'
|
|
82
|
-
*/
|
|
83
|
-
headerStatusUploading;
|
|
84
|
-
/**
|
|
85
|
-
* Sets the text for the invalid `allowedExtensions` restriction message.
|
|
86
|
-
*
|
|
87
|
-
* @default 'File type not allowed.'
|
|
88
|
-
*/
|
|
89
|
-
invalidFileExtension;
|
|
90
|
-
/**
|
|
91
|
-
* Sets the text for the invalid `maxFileSize` restriction message.
|
|
92
|
-
*
|
|
93
|
-
* @default 'File size too large.'
|
|
94
|
-
*/
|
|
95
|
-
invalidMaxFileSize;
|
|
96
|
-
/**
|
|
97
|
-
* Sets the text for the invalid `minFileSize` restriction message.
|
|
98
|
-
*
|
|
99
|
-
* @default 'File size too small.'
|
|
100
|
-
*/
|
|
101
|
-
invalidMinFileSize;
|
|
102
|
-
/**
|
|
103
|
-
* Sets the text for the **Pause** button.
|
|
104
|
-
*
|
|
105
|
-
* @default 'Pause'
|
|
106
|
-
*/
|
|
107
|
-
pause;
|
|
108
|
-
/**
|
|
109
|
-
* Sets the text for the **Remove** button.
|
|
110
|
-
*
|
|
111
|
-
* @default 'Remove'
|
|
112
|
-
*/
|
|
113
|
-
remove;
|
|
114
|
-
/**
|
|
115
|
-
* Sets the text for the **Resume** button.
|
|
116
|
-
*
|
|
117
|
-
* @default 'Resume'
|
|
118
|
-
*/
|
|
119
|
-
resume;
|
|
120
|
-
/**
|
|
121
|
-
* Sets the text for the **Retry** button.
|
|
122
|
-
*
|
|
123
|
-
* @default 'Retry'
|
|
124
|
-
*/
|
|
125
|
-
retry;
|
|
126
|
-
/**
|
|
127
|
-
* Sets the text for the **Select** button.
|
|
128
|
-
*
|
|
129
|
-
* @default 'Select files...'
|
|
130
|
-
*/
|
|
131
|
-
select;
|
|
132
|
-
/**
|
|
133
|
-
* Sets the text for the **Upload files** button.
|
|
134
|
-
*
|
|
135
|
-
* @default 'Upload'
|
|
136
|
-
*/
|
|
137
|
-
uploadSelectedFiles;
|
|
138
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: Messages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
139
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: Messages, inputs: { cancel: "cancel", clearSelectedFiles: "clearSelectedFiles", dropFilesHere: "dropFilesHere", externalDropFilesHere: "externalDropFilesHere", filesBatchStatus: "filesBatchStatus", filesBatchStatusFailed: "filesBatchStatusFailed", filesBatchStatusUploaded: "filesBatchStatusUploaded", fileStatusFailed: "fileStatusFailed", fileStatusUploaded: "fileStatusUploaded", headerStatusPaused: "headerStatusPaused", headerStatusUploaded: "headerStatusUploaded", headerStatusUploading: "headerStatusUploading", invalidFileExtension: "invalidFileExtension", invalidMaxFileSize: "invalidMaxFileSize", invalidMinFileSize: "invalidMinFileSize", pause: "pause", remove: "remove", resume: "resume", retry: "retry", select: "select", uploadSelectedFiles: "uploadSelectedFiles" }, usesInheritance: true, ngImport: i0 });
|
|
140
|
-
}
|
|
141
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: Messages, decorators: [{
|
|
142
|
-
type: Directive
|
|
143
|
-
}], propDecorators: { cancel: [{
|
|
144
|
-
type: Input
|
|
145
|
-
}], clearSelectedFiles: [{
|
|
146
|
-
type: Input
|
|
147
|
-
}], dropFilesHere: [{
|
|
148
|
-
type: Input
|
|
149
|
-
}], externalDropFilesHere: [{
|
|
150
|
-
type: Input
|
|
151
|
-
}], filesBatchStatus: [{
|
|
152
|
-
type: Input
|
|
153
|
-
}], filesBatchStatusFailed: [{
|
|
154
|
-
type: Input
|
|
155
|
-
}], filesBatchStatusUploaded: [{
|
|
156
|
-
type: Input
|
|
157
|
-
}], fileStatusFailed: [{
|
|
158
|
-
type: Input
|
|
159
|
-
}], fileStatusUploaded: [{
|
|
160
|
-
type: Input
|
|
161
|
-
}], headerStatusPaused: [{
|
|
162
|
-
type: Input
|
|
163
|
-
}], headerStatusUploaded: [{
|
|
164
|
-
type: Input
|
|
165
|
-
}], headerStatusUploading: [{
|
|
166
|
-
type: Input
|
|
167
|
-
}], invalidFileExtension: [{
|
|
168
|
-
type: Input
|
|
169
|
-
}], invalidMaxFileSize: [{
|
|
170
|
-
type: Input
|
|
171
|
-
}], invalidMinFileSize: [{
|
|
172
|
-
type: Input
|
|
173
|
-
}], pause: [{
|
|
174
|
-
type: Input
|
|
175
|
-
}], remove: [{
|
|
176
|
-
type: Input
|
|
177
|
-
}], resume: [{
|
|
178
|
-
type: Input
|
|
179
|
-
}], retry: [{
|
|
180
|
-
type: Input
|
|
181
|
-
}], select: [{
|
|
182
|
-
type: Input
|
|
183
|
-
}], uploadSelectedFiles: [{
|
|
184
|
-
type: Input
|
|
185
|
-
}] } });
|
|
@@ -1,151 +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 { Injectable, EventEmitter, NgZone } from '@angular/core';
|
|
6
|
-
import { UploadService } from './upload.service';
|
|
7
|
-
import { Keys, normalizeKeys } from '@progress/kendo-angular-common';
|
|
8
|
-
import * as i0 from "@angular/core";
|
|
9
|
-
import * as i1 from "./upload.service";
|
|
10
|
-
/**
|
|
11
|
-
* @hidden
|
|
12
|
-
*/
|
|
13
|
-
export class NavigationService {
|
|
14
|
-
uploadService;
|
|
15
|
-
zone;
|
|
16
|
-
onActionButtonFocus = new EventEmitter();
|
|
17
|
-
onFileAction = new EventEmitter();
|
|
18
|
-
onFileFocus = new EventEmitter();
|
|
19
|
-
onTabOut = new EventEmitter();
|
|
20
|
-
onWrapperFocus = new EventEmitter();
|
|
21
|
-
onSelectButtonFocus = new EventEmitter();
|
|
22
|
-
actionButtonsVisible = false;
|
|
23
|
-
fileListVisible = false;
|
|
24
|
-
focused = false;
|
|
25
|
-
keyBindings;
|
|
26
|
-
focusedFileIndex = 0;
|
|
27
|
-
_focusedIndex = -1;
|
|
28
|
-
constructor(uploadService, zone) {
|
|
29
|
-
this.uploadService = uploadService;
|
|
30
|
-
this.zone = zone;
|
|
31
|
-
}
|
|
32
|
-
action(event) {
|
|
33
|
-
const key = normalizeKeys(event);
|
|
34
|
-
return this.keyBindings[key];
|
|
35
|
-
}
|
|
36
|
-
process(event, component) {
|
|
37
|
-
const handler = this.action(event);
|
|
38
|
-
if (handler) {
|
|
39
|
-
handler(event, component);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
computeKeys() {
|
|
43
|
-
this.keyBindings = {
|
|
44
|
-
[Keys.Space]: () => this.handleSpace(),
|
|
45
|
-
[Keys.Enter]: () => this.handleEnter(),
|
|
46
|
-
[Keys.NumpadEnter]: () => this.handleEnter(),
|
|
47
|
-
[Keys.Escape]: () => this.handleEscape(),
|
|
48
|
-
[Keys.Delete]: () => this.handleDelete(),
|
|
49
|
-
[Keys.Tab]: (event, component) => this.handleTab(event, component),
|
|
50
|
-
[Keys.ArrowUp]: (event) => this.handleUpDown(event, -1),
|
|
51
|
-
[Keys.ArrowDown]: (event) => this.handleUpDown(event, 1)
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
focusSelectButton() {
|
|
55
|
-
this.focused = true;
|
|
56
|
-
this._focusedIndex = -1;
|
|
57
|
-
this.onSelectButtonFocus.emit();
|
|
58
|
-
}
|
|
59
|
-
handleEnter() {
|
|
60
|
-
if (this.lastIndex >= 0 && this.focusedIndex >= 0 && this.focusedIndex <= this.lastFileIndex) {
|
|
61
|
-
this.zone.run(() => this.onFileAction.emit(Keys.Enter));
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
handleSpace() {
|
|
65
|
-
if (this.lastIndex >= 0 && this.focusedIndex >= 0 && this.focusedIndex <= this.lastFileIndex) {
|
|
66
|
-
this.zone.run(() => this.onFileAction.emit(Keys.Space));
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
handleDelete() {
|
|
70
|
-
if (this.focusedIndex >= 0 && this.focusedIndex <= this.lastFileIndex) {
|
|
71
|
-
this.zone.run(() => this.onFileAction.emit(Keys.Delete));
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
handleEscape() {
|
|
75
|
-
if (this.focusedIndex >= 0 && this.focusedIndex <= this.lastFileIndex) {
|
|
76
|
-
this.zone.run(() => this.onFileAction.emit(Keys.Escape));
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
handleTab(event, component) {
|
|
80
|
-
const shifted = event.shiftKey;
|
|
81
|
-
/* Select Files button is focused */
|
|
82
|
-
if (this.focusedIndex === -1 && this.fileListVisible && !shifted) {
|
|
83
|
-
this.focusedIndex = this.focusedFileIndex;
|
|
84
|
-
event.preventDefault();
|
|
85
|
-
this.onFileFocus.emit(this.focusedFileIndex);
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
|
-
/* File in the list is focused */
|
|
89
|
-
if (this.focusedIndex > -1 && this.focusedIndex <= this.lastFileIndex) {
|
|
90
|
-
if (shifted) {
|
|
91
|
-
this.focusedIndex = -1;
|
|
92
|
-
}
|
|
93
|
-
else if (component !== 'fileselect' && this.actionButtonsVisible) {
|
|
94
|
-
this.focusedIndex = this.lastFileIndex + 1;
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
/* Clear button is focused */
|
|
99
|
-
if (this.focusedIndex === this.lastFileIndex + 1) {
|
|
100
|
-
this.focusedIndex = shifted ? this.focusedFileIndex : this.lastIndex;
|
|
101
|
-
if (shifted) {
|
|
102
|
-
event.preventDefault();
|
|
103
|
-
this.onFileFocus.emit(this.focusedFileIndex);
|
|
104
|
-
}
|
|
105
|
-
return;
|
|
106
|
-
}
|
|
107
|
-
/* Upload button is focused */
|
|
108
|
-
if (this.focusedIndex === this.lastIndex && this.actionButtonsVisible && shifted) {
|
|
109
|
-
this.focusedIndex -= 1;
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
112
|
-
this.onTabOut.emit();
|
|
113
|
-
}
|
|
114
|
-
handleUpDown(event, direction) {
|
|
115
|
-
const focusOnFileList = this.focusedIndex > -1 && this.uploadService.files.count >= 0;
|
|
116
|
-
const nextFocusableIndexInBoundaries = direction > 0 ? this.focusedFileIndex < this.lastFileIndex : this.focusedFileIndex > 0;
|
|
117
|
-
const focusNextFile = focusOnFileList && nextFocusableIndexInBoundaries;
|
|
118
|
-
if (focusNextFile) {
|
|
119
|
-
event.preventDefault();
|
|
120
|
-
this.zone.run(() => {
|
|
121
|
-
this.focusedIndex += direction;
|
|
122
|
-
this.focusedFileIndex += direction;
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
get focusedIndex() {
|
|
127
|
-
return this._focusedIndex;
|
|
128
|
-
}
|
|
129
|
-
set focusedIndex(index) {
|
|
130
|
-
if (!this.focused) {
|
|
131
|
-
this.onWrapperFocus.emit();
|
|
132
|
-
}
|
|
133
|
-
this._focusedIndex = index;
|
|
134
|
-
this.focused = true;
|
|
135
|
-
if (this._focusedIndex >= 0 && this._focusedIndex <= this.lastFileIndex) {
|
|
136
|
-
this.onFileFocus.emit(index);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
get lastFileIndex() {
|
|
140
|
-
return this.actionButtonsVisible ? this.lastIndex - 2 : this.lastIndex;
|
|
141
|
-
}
|
|
142
|
-
get lastIndex() {
|
|
143
|
-
const fileCount = this.uploadService.files.count;
|
|
144
|
-
return this.actionButtonsVisible ? fileCount + 1 : fileCount - 1;
|
|
145
|
-
}
|
|
146
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NavigationService, deps: [{ token: i1.UploadService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
147
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NavigationService });
|
|
148
|
-
}
|
|
149
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NavigationService, decorators: [{
|
|
150
|
-
type: Injectable
|
|
151
|
-
}], ctorParameters: () => [{ type: i1.UploadService }, { type: i0.NgZone }] });
|
|
@@ -1,16 +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 const packageMetadata = {
|
|
9
|
-
name: '@progress/kendo-angular-upload',
|
|
10
|
-
productName: 'Kendo UI for Angular',
|
|
11
|
-
productCode: 'KENDOUIANGULAR',
|
|
12
|
-
productCodes: ['KENDOUIANGULAR'],
|
|
13
|
-
publishDate: 1768393077,
|
|
14
|
-
version: '21.4.1',
|
|
15
|
-
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
16
|
-
};
|
|
@@ -1,8 +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
|
-
* Generated bundle index. Do not edit.
|
|
7
|
-
*/
|
|
8
|
-
export * from './index';
|
|
@@ -1,230 +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 { Input, Component } from '@angular/core';
|
|
6
|
-
import { FileState } from '../types';
|
|
7
|
-
import { UploadService } from '../upload.service';
|
|
8
|
-
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
9
|
-
import { NavigationService } from './../navigation.service';
|
|
10
|
-
import { arrowRotateCwSmallIcon, cancelIcon, pauseSmIcon, playSmIcon, xIcon } from '@progress/kendo-svg-icons';
|
|
11
|
-
import { ButtonComponent } from '@progress/kendo-angular-buttons';
|
|
12
|
-
import * as i0 from "@angular/core";
|
|
13
|
-
import * as i1 from "../upload.service";
|
|
14
|
-
import * as i2 from "@progress/kendo-angular-l10n";
|
|
15
|
-
import * as i3 from "./../navigation.service";
|
|
16
|
-
/**
|
|
17
|
-
* @hidden
|
|
18
|
-
*/
|
|
19
|
-
export class FileListItemActionButtonComponent {
|
|
20
|
-
uploadService;
|
|
21
|
-
localization;
|
|
22
|
-
navigation;
|
|
23
|
-
file;
|
|
24
|
-
disabled;
|
|
25
|
-
progress;
|
|
26
|
-
retrySVGIcon = arrowRotateCwSmallIcon;
|
|
27
|
-
playSVGIcon = playSmIcon;
|
|
28
|
-
pauseSVGIcon = pauseSmIcon;
|
|
29
|
-
cancelSVGIcon = cancelIcon;
|
|
30
|
-
deleteSVGIcon = xIcon;
|
|
31
|
-
constructor(uploadService, localization, navigation) {
|
|
32
|
-
this.uploadService = uploadService;
|
|
33
|
-
this.localization = localization;
|
|
34
|
-
this.navigation = navigation;
|
|
35
|
-
}
|
|
36
|
-
onRetryClick() {
|
|
37
|
-
if (this.disabled) {
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
this.uploadService.retryFiles(this.file.uid);
|
|
41
|
-
}
|
|
42
|
-
onRemoveCancelClick(event) {
|
|
43
|
-
if (this.disabled) {
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
event.stopImmediatePropagation();
|
|
47
|
-
const uid = this.file.uid;
|
|
48
|
-
if (this.file.state === FileState.Uploading) {
|
|
49
|
-
this.uploadService.cancelFiles(uid);
|
|
50
|
-
}
|
|
51
|
-
else {
|
|
52
|
-
this.uploadService.removeFiles(uid);
|
|
53
|
-
}
|
|
54
|
-
this.navigation.focusSelectButton();
|
|
55
|
-
}
|
|
56
|
-
onPauseResumeClick() {
|
|
57
|
-
if (this.disabled) {
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
const uid = this.file.uid;
|
|
61
|
-
if (this.file.state === FileState.Paused) {
|
|
62
|
-
this.uploadService.resumeFile(uid);
|
|
63
|
-
}
|
|
64
|
-
else {
|
|
65
|
-
this.uploadService.pauseFile(uid);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
get actionButtonTitle() {
|
|
69
|
-
if (this.file.state === FileState.Uploading) {
|
|
70
|
-
return this.localization.get('cancel');
|
|
71
|
-
}
|
|
72
|
-
return this.localization.get('remove');
|
|
73
|
-
}
|
|
74
|
-
get retryButtonTitle() {
|
|
75
|
-
return this.localization.get('retry');
|
|
76
|
-
}
|
|
77
|
-
get pauseResumeButtonTitle() {
|
|
78
|
-
if (this.file.state === FileState.Uploading) {
|
|
79
|
-
return this.localization.get('pause');
|
|
80
|
-
}
|
|
81
|
-
return this.localization.get('resume');
|
|
82
|
-
}
|
|
83
|
-
get isUploading() {
|
|
84
|
-
return this.file.state === FileState.Uploading;
|
|
85
|
-
}
|
|
86
|
-
get isFailed() {
|
|
87
|
-
return this.file.state === FileState.Failed;
|
|
88
|
-
}
|
|
89
|
-
get isPaused() {
|
|
90
|
-
return this.file.state === FileState.Paused;
|
|
91
|
-
}
|
|
92
|
-
get isResumable() {
|
|
93
|
-
const service = this.uploadService;
|
|
94
|
-
const isResumable = service.async.chunk && service.chunk.resumable;
|
|
95
|
-
const isUploading = (this.file.state === FileState.Paused) || (this.file.state === FileState.Uploading);
|
|
96
|
-
return isResumable && isUploading;
|
|
97
|
-
}
|
|
98
|
-
get isActionButtonVisible() {
|
|
99
|
-
if ((this.file.state === FileState.Uploaded || this.file.state === FileState.Initial) &&
|
|
100
|
-
!this.uploadService.async.removeUrl && this.uploadService.component === 'Upload') {
|
|
101
|
-
return false;
|
|
102
|
-
}
|
|
103
|
-
return true;
|
|
104
|
-
}
|
|
105
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FileListItemActionButtonComponent, deps: [{ token: i1.UploadService }, { token: i2.LocalizationService }, { token: i3.NavigationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
106
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: FileListItemActionButtonComponent, isStandalone: true, selector: "kendo-upload-file-list-item-action-button", inputs: { file: "file", disabled: "disabled", progress: "progress" }, ngImport: i0, template: `
|
|
107
|
-
<span class="k-upload-actions">
|
|
108
|
-
@if (isUploading || isPaused) {
|
|
109
|
-
<span class="k-upload-pct">{{progress}}%</span>
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
@if (isFailed) {
|
|
113
|
-
<button
|
|
114
|
-
kendoButton
|
|
115
|
-
type="button"
|
|
116
|
-
class="k-upload-action k-retry"
|
|
117
|
-
fillMode="flat"
|
|
118
|
-
[attr.tabIndex]="-1"
|
|
119
|
-
[attr.aria-hidden]="true"
|
|
120
|
-
[attr.title]="retryButtonTitle"
|
|
121
|
-
[svgIcon]="retrySVGIcon"
|
|
122
|
-
icon="refresh-sm"
|
|
123
|
-
(pointerdown)="$event.preventDefault()"
|
|
124
|
-
(click)="onRetryClick()"
|
|
125
|
-
></button>
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
@if (isResumable) {
|
|
129
|
-
<button
|
|
130
|
-
kendoButton
|
|
131
|
-
type="button"
|
|
132
|
-
class="k-upload-action"
|
|
133
|
-
fillMode="flat"
|
|
134
|
-
[attr.tabIndex]="-1"
|
|
135
|
-
[attr.aria-hidden]="true"
|
|
136
|
-
[attr.title]="pauseResumeButtonTitle"
|
|
137
|
-
[svgIcon]="isPaused ? playSVGIcon : pauseSVGIcon"
|
|
138
|
-
[icon]="isPaused ? 'play-sm' : 'pause-sm'"
|
|
139
|
-
(pointerdown)="$event.preventDefault()"
|
|
140
|
-
(click)="onPauseResumeClick()"
|
|
141
|
-
></button>
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
@if (isActionButtonVisible) {
|
|
145
|
-
<button
|
|
146
|
-
kendoButton
|
|
147
|
-
class="k-upload-action"
|
|
148
|
-
[class.k-delete]="!isUploading"
|
|
149
|
-
fillMode="flat"
|
|
150
|
-
type="button"
|
|
151
|
-
[attr.tabIndex]="-1"
|
|
152
|
-
[attr.aria-hidden]="true"
|
|
153
|
-
[attr.title]="actionButtonTitle"
|
|
154
|
-
[svgIcon]="isUploading ? cancelSVGIcon : deleteSVGIcon"
|
|
155
|
-
[icon]="isUploading ? 'cancel' : 'x'"
|
|
156
|
-
(click)="onRemoveCancelClick($event)"
|
|
157
|
-
></button>
|
|
158
|
-
}
|
|
159
|
-
</span>
|
|
160
|
-
`, isInline: true, dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
|
|
161
|
-
}
|
|
162
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FileListItemActionButtonComponent, decorators: [{
|
|
163
|
-
type: Component,
|
|
164
|
-
args: [{
|
|
165
|
-
selector: 'kendo-upload-file-list-item-action-button',
|
|
166
|
-
template: `
|
|
167
|
-
<span class="k-upload-actions">
|
|
168
|
-
@if (isUploading || isPaused) {
|
|
169
|
-
<span class="k-upload-pct">{{progress}}%</span>
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
@if (isFailed) {
|
|
173
|
-
<button
|
|
174
|
-
kendoButton
|
|
175
|
-
type="button"
|
|
176
|
-
class="k-upload-action k-retry"
|
|
177
|
-
fillMode="flat"
|
|
178
|
-
[attr.tabIndex]="-1"
|
|
179
|
-
[attr.aria-hidden]="true"
|
|
180
|
-
[attr.title]="retryButtonTitle"
|
|
181
|
-
[svgIcon]="retrySVGIcon"
|
|
182
|
-
icon="refresh-sm"
|
|
183
|
-
(pointerdown)="$event.preventDefault()"
|
|
184
|
-
(click)="onRetryClick()"
|
|
185
|
-
></button>
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
@if (isResumable) {
|
|
189
|
-
<button
|
|
190
|
-
kendoButton
|
|
191
|
-
type="button"
|
|
192
|
-
class="k-upload-action"
|
|
193
|
-
fillMode="flat"
|
|
194
|
-
[attr.tabIndex]="-1"
|
|
195
|
-
[attr.aria-hidden]="true"
|
|
196
|
-
[attr.title]="pauseResumeButtonTitle"
|
|
197
|
-
[svgIcon]="isPaused ? playSVGIcon : pauseSVGIcon"
|
|
198
|
-
[icon]="isPaused ? 'play-sm' : 'pause-sm'"
|
|
199
|
-
(pointerdown)="$event.preventDefault()"
|
|
200
|
-
(click)="onPauseResumeClick()"
|
|
201
|
-
></button>
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
@if (isActionButtonVisible) {
|
|
205
|
-
<button
|
|
206
|
-
kendoButton
|
|
207
|
-
class="k-upload-action"
|
|
208
|
-
[class.k-delete]="!isUploading"
|
|
209
|
-
fillMode="flat"
|
|
210
|
-
type="button"
|
|
211
|
-
[attr.tabIndex]="-1"
|
|
212
|
-
[attr.aria-hidden]="true"
|
|
213
|
-
[attr.title]="actionButtonTitle"
|
|
214
|
-
[svgIcon]="isUploading ? cancelSVGIcon : deleteSVGIcon"
|
|
215
|
-
[icon]="isUploading ? 'cancel' : 'x'"
|
|
216
|
-
(click)="onRemoveCancelClick($event)"
|
|
217
|
-
></button>
|
|
218
|
-
}
|
|
219
|
-
</span>
|
|
220
|
-
`,
|
|
221
|
-
standalone: true,
|
|
222
|
-
imports: [ButtonComponent]
|
|
223
|
-
}]
|
|
224
|
-
}], ctorParameters: () => [{ type: i1.UploadService }, { type: i2.LocalizationService }, { type: i3.NavigationService }], propDecorators: { file: [{
|
|
225
|
-
type: Input
|
|
226
|
-
}], disabled: [{
|
|
227
|
-
type: Input
|
|
228
|
-
}], progress: [{
|
|
229
|
-
type: Input
|
|
230
|
-
}] } });
|
|
@@ -1,52 +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 } from '@angular/core';
|
|
6
|
-
import { UploadService } from '../upload.service';
|
|
7
|
-
import { fileHasValidationErrors, filesHaveValidationErrors, getTotalFilesSizeMessage } from '../common/util';
|
|
8
|
-
import * as i0 from "@angular/core";
|
|
9
|
-
import * as i1 from "../upload.service";
|
|
10
|
-
/**
|
|
11
|
-
* @hidden
|
|
12
|
-
*/
|
|
13
|
-
export class FileListItemBase {
|
|
14
|
-
uploadService;
|
|
15
|
-
progressComplete = 0;
|
|
16
|
-
localization;
|
|
17
|
-
uploadProgressSubscription;
|
|
18
|
-
constructor(uploadService) {
|
|
19
|
-
this.uploadService = uploadService;
|
|
20
|
-
}
|
|
21
|
-
subscribeUploadProgress(uploadProgressHandler) {
|
|
22
|
-
this.uploadProgressSubscription = this.uploadService.uploadProgressEvent.subscribe(uploadProgressHandler);
|
|
23
|
-
}
|
|
24
|
-
fileHasValidationErrors(file) {
|
|
25
|
-
return fileHasValidationErrors(file);
|
|
26
|
-
}
|
|
27
|
-
filesHaveValidationErrors(files) {
|
|
28
|
-
return filesHaveValidationErrors(files);
|
|
29
|
-
}
|
|
30
|
-
ngOnDestroy() {
|
|
31
|
-
this.uploadProgressSubscription.unsubscribe();
|
|
32
|
-
}
|
|
33
|
-
getFileValidationMessage(file) {
|
|
34
|
-
let validationMessage;
|
|
35
|
-
if (file.validationErrors && file.validationErrors.length > 0) {
|
|
36
|
-
validationMessage = this.localization.get(file.validationErrors[0]);
|
|
37
|
-
}
|
|
38
|
-
return validationMessage;
|
|
39
|
-
}
|
|
40
|
-
getTotalFilesSizeMessage(files) {
|
|
41
|
-
return getTotalFilesSizeMessage(files);
|
|
42
|
-
}
|
|
43
|
-
textFor(key) {
|
|
44
|
-
return this.localization.get(key);
|
|
45
|
-
}
|
|
46
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FileListItemBase, deps: [{ token: i1.UploadService }], target: i0.ɵɵFactoryTarget.Component });
|
|
47
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: FileListItemBase, selector: "ng-component", ngImport: i0, template: '', isInline: true });
|
|
48
|
-
}
|
|
49
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FileListItemBase, decorators: [{
|
|
50
|
-
type: Component,
|
|
51
|
-
args: [{ template: '' }]
|
|
52
|
-
}], ctorParameters: () => [{ type: i1.UploadService }] });
|