@progress/kendo-angular-upload 9.0.4 → 11.0.0-develop.79
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/NOTICE.txt +3 -3
- package/common/action-buttons-layout.d.ts +1 -1
- package/common/util.d.ts +1 -1
- package/common/validation-util.d.ts +1 -1
- package/dropzone-base.d.ts +2 -2
- package/dropzone-external.directive.d.ts +1 -1
- package/dropzone-internal.directive.d.ts +1 -1
- package/dropzone.component.d.ts +1 -1
- package/dropzone.service.d.ts +1 -1
- package/{esm2015/types/chunk-metadata.js → esm2020/common/action-buttons-layout.mjs} +1 -1
- package/{esm2015/common/util.js → esm2020/common/util.mjs} +9 -9
- package/{esm2015/common/validation-util.js → esm2020/common/validation-util.mjs} +2 -2
- package/{esm2015/dropzone-base.js → esm2020/dropzone-base.mjs} +5 -5
- package/{esm2015/dropzone-external.directive.js → esm2020/dropzone-external.directive.mjs} +5 -5
- package/{esm2015/dropzone-internal.directive.js → esm2020/dropzone-internal.directive.mjs} +11 -7
- package/{esm2015/dropzone.component.js → esm2020/dropzone.component.mjs} +5 -5
- package/{esm2015/dropzone.service.js → esm2020/dropzone.service.mjs} +5 -5
- package/{esm2015/events/cancel-event.js → esm2020/events/cancel-event.mjs} +1 -1
- package/{esm2015/events/clear-event.js → esm2020/events/clear-event.mjs} +1 -1
- package/{esm2015/events/error-event.js → esm2020/events/error-event.mjs} +1 -1
- package/{esm2015/events/pause-event.js → esm2020/events/pause-event.mjs} +1 -1
- package/{esm2015/events/preventable-event.js → esm2020/events/preventable-event.mjs} +1 -1
- package/{esm2015/events/remove-event.js → esm2020/events/remove-event.mjs} +1 -1
- package/{esm2015/events/resume-event.js → esm2020/events/resume-event.mjs} +1 -1
- package/{esm2015/events/select-event.js → esm2020/events/select-event.mjs} +1 -1
- package/{esm2015/events/success-event.js → esm2020/events/success-event.mjs} +1 -1
- package/{esm2015/events/upload-event.js → esm2020/events/upload-event.mjs} +1 -1
- package/{esm2015/events/upload-progress-event.js → esm2020/events/upload-progress-event.mjs} +1 -1
- package/{esm2015/events.js → esm2020/events.mjs} +1 -1
- package/{esm2015/file-select.directive.js → esm2020/file-select.directive.mjs} +7 -5
- package/{esm2015/fileselect.component.js → esm2020/fileselect.component.mjs} +100 -60
- package/{esm2015/fileselect.module.js → esm2020/fileselect.module.mjs} +5 -5
- package/{esm2015/main.js → esm2020/index.mjs} +2 -1
- package/{esm2015/localization/custom-messages.component.js → esm2020/localization/custom-messages.component.mjs} +5 -4
- package/{esm2015/localization/localized-messages.directive.js → esm2020/localization/localized-messages.directive.mjs} +5 -4
- package/{esm2015/localization/messages.js → esm2020/localization/messages.mjs} +4 -4
- package/{esm2015/navigation.service.js → esm2020/navigation.service.mjs} +56 -40
- package/{esm2015/package-metadata.js → esm2020/package-metadata.mjs} +3 -3
- package/{esm2015/kendo-angular-upload.js → esm2020/progress-kendo-angular-upload.mjs} +2 -2
- package/{esm2015/rendering/file-list-item-action-button.component.js → esm2020/rendering/file-list-item-action-button.component.mjs} +11 -8
- package/{esm2015/rendering/file-list-item-base.js → esm2020/rendering/file-list-item-base.mjs} +5 -4
- package/{esm2015/rendering/file-list-item.js → esm2020/rendering/file-list-item.mjs} +7 -5
- package/{esm2015/rendering/file-list-multiple-items.component.js → esm2020/rendering/file-list-multiple-items.component.mjs} +84 -83
- package/{esm2015/rendering/file-list-single-item.component.js → esm2020/rendering/file-list-single-item.component.mjs} +76 -69
- package/{esm2015/rendering/file-list.component.js → esm2020/rendering/file-list.component.mjs} +16 -11
- package/{esm2015/rendering/upload-action-buttons.component.js → esm2020/rendering/upload-action-buttons.component.mjs} +8 -5
- package/{esm2015/rendering/upload-status-total.component.js → esm2020/rendering/upload-status-total.component.mjs} +6 -4
- package/{esm2015/shared.module.js → esm2020/shared.module.mjs} +14 -9
- package/{esm2015/templates/file-info-template.directive.js → esm2020/templates/file-info-template.directive.mjs} +5 -5
- package/{esm2015/templates/file-template.directive.js → esm2020/templates/file-template.directive.mjs} +5 -5
- package/{esm2015/templates/template-context.directive.js → esm2020/templates/template-context.directive.mjs} +5 -5
- package/{esm2015/common/action-buttons-layout.js → esm2020/types/async-settings.mjs} +1 -1
- package/{esm2015/types/chunk-info.js → esm2020/types/chunk-info.mjs} +1 -1
- package/{esm2015/types/chunk-map.js → esm2020/types/chunk-map.mjs} +1 -1
- package/{esm2015/types/async-settings.js → esm2020/types/chunk-metadata.mjs} +1 -1
- package/esm2020/types/chunk-settings.mjs +5 -0
- package/esm2020/types/direction.mjs +5 -0
- package/{esm2015/types/file-groups.js → esm2020/types/file-groups.mjs} +1 -1
- package/esm2020/types/file-info.mjs +5 -0
- package/{esm2015/types/file-map.js → esm2020/types/file-map.mjs} +26 -26
- package/esm2020/types/file-restrictions.mjs +5 -0
- package/{esm2015/types/file-state.js → esm2020/types/file-state.mjs} +1 -1
- package/esm2020/types/operation-type.mjs +5 -0
- package/{esm2015/types.js → esm2020/types.mjs} +1 -1
- package/{esm2015/upload.component.js → esm2020/upload.component.mjs} +125 -80
- package/{esm2015/upload.module.js → esm2020/upload.module.mjs} +5 -5
- package/{esm2015/upload.service.js → esm2020/upload.service.mjs} +35 -35
- package/{esm2015/uploads.module.js → esm2020/uploads.module.mjs} +5 -5
- package/events/cancel-event.d.ts +1 -1
- package/events/clear-event.d.ts +1 -1
- package/events/error-event.d.ts +1 -1
- package/events/pause-event.d.ts +1 -1
- package/events/preventable-event.d.ts +1 -1
- package/events/remove-event.d.ts +1 -1
- package/events/resume-event.d.ts +1 -1
- package/events/select-event.d.ts +1 -1
- package/events/success-event.d.ts +1 -1
- package/events/upload-event.d.ts +1 -1
- package/events/upload-progress-event.d.ts +3 -3
- package/events.d.ts +1 -1
- package/fesm2015/progress-kendo-angular-upload.mjs +4864 -0
- package/{fesm2015/kendo-angular-upload.js → fesm2020/progress-kendo-angular-upload.mjs} +571 -467
- package/file-select.directive.d.ts +1 -1
- package/fileselect.component.d.ts +13 -8
- package/fileselect.module.d.ts +1 -1
- package/{main.d.ts → index.d.ts} +2 -1
- package/localization/custom-messages.component.d.ts +1 -1
- package/localization/localized-messages.directive.d.ts +1 -1
- package/localization/messages.d.ts +1 -1
- package/navigation.service.d.ts +4 -3
- package/package-metadata.d.ts +1 -1
- package/package.json +29 -55
- package/{kendo-angular-upload.d.ts → progress-kendo-angular-upload.d.ts} +2 -2
- package/rendering/file-list-item-action-button.component.d.ts +2 -2
- package/rendering/file-list-item-base.d.ts +2 -2
- package/rendering/file-list-item.d.ts +1 -1
- package/rendering/file-list-multiple-items.component.d.ts +1 -1
- package/rendering/file-list-single-item.component.d.ts +1 -1
- package/rendering/file-list.component.d.ts +1 -1
- package/rendering/upload-action-buttons.component.d.ts +1 -1
- package/rendering/upload-status-total.component.d.ts +1 -1
- package/schematics/ngAdd/index.js +6 -6
- package/shared.module.d.ts +4 -2
- package/templates/file-info-template.directive.d.ts +1 -1
- package/templates/file-template.directive.d.ts +1 -1
- package/templates/template-context.directive.d.ts +1 -1
- package/types/async-settings.d.ts +1 -1
- package/types/chunk-info.d.ts +1 -1
- package/types/chunk-map.d.ts +1 -1
- package/types/chunk-metadata.d.ts +1 -1
- package/types/chunk-settings.d.ts +1 -1
- package/types/direction.d.ts +1 -1
- package/types/file-groups.d.ts +1 -1
- package/types/file-info.d.ts +1 -1
- package/types/file-map.d.ts +1 -1
- package/types/file-restrictions.d.ts +1 -1
- package/types/file-state.d.ts +1 -1
- package/types/operation-type.d.ts +1 -1
- package/types.d.ts +1 -1
- package/upload.component.d.ts +15 -10
- package/upload.module.d.ts +1 -1
- package/upload.service.d.ts +1 -1
- package/uploads.module.d.ts +1 -1
- package/bundles/kendo-angular-upload.umd.js +0 -5
- package/esm2015/types/chunk-settings.js +0 -5
- package/esm2015/types/direction.js +0 -5
- package/esm2015/types/file-info.js +0 -5
- package/esm2015/types/file-restrictions.js +0 -5
- package/esm2015/types/operation-type.js +0 -5
- package/schematics/ngAdd/index.js.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2022 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
5
|
import * as i1 from '@angular/common/http';
|
|
6
6
|
import { HttpHeaders, HttpRequest, HttpEventType, HttpResponse } from '@angular/common/http';
|
|
7
7
|
import * as i0 from '@angular/core';
|
|
8
|
-
import { EventEmitter, Injectable, Directive, Input, HostBinding, HostListener, Component, ViewChildren, forwardRef, Inject, ContentChild, ViewChild, Output, isDevMode, NgModule } from '@angular/core';
|
|
8
|
+
import { EventEmitter, Injectable, Directive, Input, HostBinding, HostListener, Component, ViewChildren, forwardRef, Inject, ElementRef, ContentChild, ViewChild, Output, isDevMode, NgModule } from '@angular/core';
|
|
9
9
|
import { guid, Keys, isDocumentAvailable, KendoInput, isChanged } from '@progress/kendo-angular-common';
|
|
10
10
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
11
11
|
import * as i1$1 from '@progress/kendo-angular-l10n';
|
|
@@ -13,8 +13,12 @@ import { ComponentMessages, LocalizationService, L10N_PREFIX } from '@progress/k
|
|
|
13
13
|
import { fromEvent, merge } from 'rxjs';
|
|
14
14
|
import { filter } from 'rxjs/operators';
|
|
15
15
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
16
|
+
import * as i6 from '@progress/kendo-angular-buttons';
|
|
17
|
+
import { ButtonsModule } from '@progress/kendo-angular-buttons';
|
|
16
18
|
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
17
|
-
import * as
|
|
19
|
+
import * as i3 from '@progress/kendo-angular-progressbar';
|
|
20
|
+
import { ProgressBarModule } from '@progress/kendo-angular-progressbar';
|
|
21
|
+
import * as i5 from '@angular/common';
|
|
18
22
|
import { CommonModule } from '@angular/common';
|
|
19
23
|
|
|
20
24
|
/**
|
|
@@ -56,7 +60,7 @@ class FileMap {
|
|
|
56
60
|
this._files = {};
|
|
57
61
|
}
|
|
58
62
|
add(file) {
|
|
59
|
-
|
|
63
|
+
const uid = file.uid;
|
|
60
64
|
if (this.has(uid)) {
|
|
61
65
|
if (file.validationErrors && file.validationErrors.length > 0) {
|
|
62
66
|
this._files[uid].unshift(file);
|
|
@@ -76,10 +80,10 @@ class FileMap {
|
|
|
76
80
|
}
|
|
77
81
|
}
|
|
78
82
|
clear() {
|
|
79
|
-
|
|
80
|
-
for (
|
|
83
|
+
const allFiles = this._files;
|
|
84
|
+
for (const uid in allFiles) {
|
|
81
85
|
if (allFiles.hasOwnProperty(uid)) {
|
|
82
|
-
for (
|
|
86
|
+
for (const file of allFiles[uid]) {
|
|
83
87
|
if (file.httpSubscription) {
|
|
84
88
|
file.httpSubscription.unsubscribe();
|
|
85
89
|
}
|
|
@@ -96,7 +100,7 @@ class FileMap {
|
|
|
96
100
|
return this._files[uid];
|
|
97
101
|
}
|
|
98
102
|
setFilesState(files, state) {
|
|
99
|
-
for (
|
|
103
|
+
for (const file of files) {
|
|
100
104
|
this.setFilesStateByUid(file.uid, state);
|
|
101
105
|
}
|
|
102
106
|
}
|
|
@@ -109,9 +113,9 @@ class FileMap {
|
|
|
109
113
|
return Object.getOwnPropertyNames(this._files).length;
|
|
110
114
|
}
|
|
111
115
|
get files() {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
for (
|
|
116
|
+
const initial = this._files;
|
|
117
|
+
const transformed = [];
|
|
118
|
+
for (const uid in initial) {
|
|
115
119
|
if (initial.hasOwnProperty(uid)) {
|
|
116
120
|
transformed.push(initial[uid]);
|
|
117
121
|
}
|
|
@@ -119,11 +123,11 @@ class FileMap {
|
|
|
119
123
|
return transformed;
|
|
120
124
|
}
|
|
121
125
|
get filesFlat() {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
for (
|
|
126
|
+
const initial = this._files;
|
|
127
|
+
const transformed = [];
|
|
128
|
+
for (const uid in initial) {
|
|
125
129
|
if (initial.hasOwnProperty(uid)) {
|
|
126
|
-
|
|
130
|
+
const current = initial[uid];
|
|
127
131
|
current.forEach((file) => {
|
|
128
132
|
transformed.push(file);
|
|
129
133
|
});
|
|
@@ -132,13 +136,13 @@ class FileMap {
|
|
|
132
136
|
return transformed;
|
|
133
137
|
}
|
|
134
138
|
get filesToUpload() {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
for (
|
|
139
|
+
const files = this._files;
|
|
140
|
+
const notUploaded = [];
|
|
141
|
+
for (const uid in files) {
|
|
138
142
|
if (files.hasOwnProperty(uid)) {
|
|
139
|
-
|
|
143
|
+
const currentFiles = files[uid];
|
|
140
144
|
let currentFilesValid = true;
|
|
141
|
-
for (
|
|
145
|
+
for (const file of currentFiles) {
|
|
142
146
|
if (file.state !== FileState.Selected || (file.validationErrors && file.validationErrors.length > 0)) {
|
|
143
147
|
currentFilesValid = false;
|
|
144
148
|
}
|
|
@@ -151,12 +155,12 @@ class FileMap {
|
|
|
151
155
|
return notUploaded;
|
|
152
156
|
}
|
|
153
157
|
get firstFileToUpload() {
|
|
154
|
-
|
|
155
|
-
for (
|
|
158
|
+
const files = this._files;
|
|
159
|
+
for (const uid in files) {
|
|
156
160
|
if (files.hasOwnProperty(uid)) {
|
|
157
|
-
|
|
161
|
+
const currentFiles = files[uid];
|
|
158
162
|
let currentFilesValid = true;
|
|
159
|
-
for (
|
|
163
|
+
for (const file of currentFiles) {
|
|
160
164
|
if (file.state !== FileState.Selected || (file.validationErrors && file.validationErrors.length > 0)) {
|
|
161
165
|
currentFilesValid = false;
|
|
162
166
|
}
|
|
@@ -172,11 +176,11 @@ class FileMap {
|
|
|
172
176
|
return this.filesFlat.filter(file => file.state === state);
|
|
173
177
|
}
|
|
174
178
|
hasFileWithState(fileStates) {
|
|
175
|
-
|
|
176
|
-
for (
|
|
179
|
+
const files = this._files;
|
|
180
|
+
for (const uid in files) {
|
|
177
181
|
if (files.hasOwnProperty(uid)) {
|
|
178
|
-
|
|
179
|
-
for (
|
|
182
|
+
const currentFiles = files[uid];
|
|
183
|
+
for (const file of currentFiles) {
|
|
180
184
|
if (fileStates.indexOf(file.state) >= 0) {
|
|
181
185
|
return true;
|
|
182
186
|
}
|
|
@@ -659,7 +663,7 @@ const getTotalFilesSizeMessage = (files) => {
|
|
|
659
663
|
}
|
|
660
664
|
};
|
|
661
665
|
const stripPath = (name) => {
|
|
662
|
-
|
|
666
|
+
const slashIndex = name.lastIndexOf("\\");
|
|
663
667
|
return (slashIndex !== -1) ? name.substr(slashIndex + 1) : name;
|
|
664
668
|
};
|
|
665
669
|
const getFileExtension = (fileName) => {
|
|
@@ -690,7 +694,7 @@ const validateInitialFileSelectFile = (file) => {
|
|
|
690
694
|
*/
|
|
691
695
|
const getInitialFileInfo = (fakeFile) => {
|
|
692
696
|
fakeFile.extension = fakeFile.extension || getFileExtension(fakeFile.name);
|
|
693
|
-
fakeFile.name = fakeFile.name;
|
|
697
|
+
fakeFile.name = fakeFile.name; // eslint-disable-line no-self-assign
|
|
694
698
|
fakeFile.size = fakeFile.size || 0;
|
|
695
699
|
if (!fakeFile.hasOwnProperty("state")) {
|
|
696
700
|
fakeFile.state = FileState.Initial;
|
|
@@ -704,7 +708,7 @@ const getInitialFileInfo = (fakeFile) => {
|
|
|
704
708
|
* @hidden
|
|
705
709
|
*/
|
|
706
710
|
const convertFileToFileInfo = (file) => {
|
|
707
|
-
|
|
711
|
+
const fileInfo = getFileInfo(file);
|
|
708
712
|
fileInfo.uid = guid();
|
|
709
713
|
// Used to differentiate initial FileInfo objects and actual Files
|
|
710
714
|
fileInfo.state = FileState.Selected;
|
|
@@ -725,7 +729,7 @@ const getFileInfo = (rawFile) => {
|
|
|
725
729
|
* @hidden
|
|
726
730
|
*/
|
|
727
731
|
const getAllFileInfo = (rawFiles) => {
|
|
728
|
-
|
|
732
|
+
const allFileInfo = new Array();
|
|
729
733
|
let i;
|
|
730
734
|
for (i = 0; i < rawFiles.length; i++) {
|
|
731
735
|
allFileInfo.push(getFileInfo(rawFiles[i]));
|
|
@@ -745,7 +749,7 @@ const fileHasValidationErrors = (file) => {
|
|
|
745
749
|
* @hidden
|
|
746
750
|
*/
|
|
747
751
|
const filesHaveValidationErrors = (files) => {
|
|
748
|
-
for (
|
|
752
|
+
for (const file of files) {
|
|
749
753
|
if (fileHasValidationErrors(file)) {
|
|
750
754
|
return true;
|
|
751
755
|
}
|
|
@@ -761,8 +765,8 @@ const inputFiles = (input) => {
|
|
|
761
765
|
}
|
|
762
766
|
else {
|
|
763
767
|
//Required for testing
|
|
764
|
-
|
|
765
|
-
|
|
768
|
+
const fileNames = input.value.split("|").map((file, index) => {
|
|
769
|
+
const fileName = file.trim();
|
|
766
770
|
return {
|
|
767
771
|
extension: getFileExtension(fileName),
|
|
768
772
|
name: stripPath(fileName),
|
|
@@ -841,7 +845,7 @@ const isFocusable = (element, checkVisibility = true) => {
|
|
|
841
845
|
*/
|
|
842
846
|
const getFileGroupCssClass = (fileExtension) => {
|
|
843
847
|
const initial = 'k-i-file';
|
|
844
|
-
for (
|
|
848
|
+
for (const group in fileGroupMap) {
|
|
845
849
|
if (fileGroupMap[group].indexOf(fileExtension) >= 0) {
|
|
846
850
|
return `${initial}-${group}`;
|
|
847
851
|
}
|
|
@@ -949,17 +953,17 @@ class UploadService {
|
|
|
949
953
|
}
|
|
950
954
|
}
|
|
951
955
|
onChange() {
|
|
952
|
-
|
|
956
|
+
const files = this.fileList.filesFlat.filter((file) => {
|
|
953
957
|
return file.state === FileState.Initial ||
|
|
954
958
|
file.state === FileState.Uploaded;
|
|
955
959
|
});
|
|
956
960
|
this.changeEvent.emit(files.length > 0 ? files : null);
|
|
957
961
|
}
|
|
958
962
|
addFiles(files) {
|
|
959
|
-
|
|
963
|
+
const selectEventArgs = new SelectEvent(files);
|
|
960
964
|
this.selectEvent.emit(selectEventArgs);
|
|
961
965
|
if (!selectEventArgs.isDefaultPrevented()) {
|
|
962
|
-
for (
|
|
966
|
+
for (const file of files) {
|
|
963
967
|
this.fileList.add(file);
|
|
964
968
|
}
|
|
965
969
|
if (this.async.autoUpload) {
|
|
@@ -974,7 +978,7 @@ class UploadService {
|
|
|
974
978
|
addInitialFiles(initialFiles) {
|
|
975
979
|
this.fileList.clear();
|
|
976
980
|
initialFiles.forEach((file) => {
|
|
977
|
-
|
|
981
|
+
const fakeFile = getInitialFileInfo(file);
|
|
978
982
|
this.fileList.add(fakeFile);
|
|
979
983
|
});
|
|
980
984
|
}
|
|
@@ -996,14 +1000,14 @@ class UploadService {
|
|
|
996
1000
|
this._uploadFiles([fileToResume]);
|
|
997
1001
|
}
|
|
998
1002
|
pauseFile(uid) {
|
|
999
|
-
|
|
1003
|
+
const pausedFile = this.fileList.get(uid)[0];
|
|
1000
1004
|
this.pauseEvent.emit(new PauseEvent(pausedFile));
|
|
1001
1005
|
this.fileList.setFilesStateByUid(uid, FileState.Paused);
|
|
1002
1006
|
}
|
|
1003
1007
|
removeFiles(uid) {
|
|
1004
|
-
|
|
1008
|
+
const removedFiles = this.fileList.get(uid);
|
|
1005
1009
|
// Clone the Headers so that the default ones are not overridden
|
|
1006
|
-
|
|
1010
|
+
const removeEventArgs = new RemoveEvent(removedFiles, this.cloneRequestHeaders(this.async.removeHeaders));
|
|
1007
1011
|
this.removeEvent.emit(removeEventArgs);
|
|
1008
1012
|
if (!removeEventArgs.isDefaultPrevented()) {
|
|
1009
1013
|
if (this.component === 'Upload' &&
|
|
@@ -1021,10 +1025,10 @@ class UploadService {
|
|
|
1021
1025
|
}
|
|
1022
1026
|
}
|
|
1023
1027
|
cancelFiles(uid) {
|
|
1024
|
-
|
|
1025
|
-
|
|
1028
|
+
const canceledFiles = this.fileList.get(uid);
|
|
1029
|
+
const cancelEventArgs = new CancelEvent(canceledFiles);
|
|
1026
1030
|
this.cancelEvent.emit(cancelEventArgs);
|
|
1027
|
-
for (
|
|
1031
|
+
for (const file of canceledFiles) {
|
|
1028
1032
|
if (file.httpSubscription) {
|
|
1029
1033
|
file.httpSubscription.unsubscribe();
|
|
1030
1034
|
}
|
|
@@ -1033,10 +1037,10 @@ class UploadService {
|
|
|
1033
1037
|
this.checkAllComplete();
|
|
1034
1038
|
}
|
|
1035
1039
|
clearFiles() {
|
|
1036
|
-
|
|
1040
|
+
const clearEventArgs = new ClearEvent();
|
|
1037
1041
|
this.clearEvent.emit(clearEventArgs);
|
|
1038
1042
|
if (!clearEventArgs.isDefaultPrevented()) {
|
|
1039
|
-
|
|
1043
|
+
const triggerChange = this.fileList.hasFileWithState([
|
|
1040
1044
|
FileState.Initial,
|
|
1041
1045
|
FileState.Uploaded
|
|
1042
1046
|
]);
|
|
@@ -1059,22 +1063,22 @@ class UploadService {
|
|
|
1059
1063
|
}
|
|
1060
1064
|
}
|
|
1061
1065
|
retryFiles(uid) {
|
|
1062
|
-
|
|
1066
|
+
const filesToRetry = [this.fileList.get(uid)];
|
|
1063
1067
|
if (filesToRetry) {
|
|
1064
1068
|
this._uploadFiles(filesToRetry);
|
|
1065
1069
|
}
|
|
1066
1070
|
}
|
|
1067
1071
|
_uploadFiles(allFiles) {
|
|
1068
|
-
for (
|
|
1072
|
+
for (const filesToUpload of allFiles) {
|
|
1069
1073
|
if (filesToUpload[0].state === FileState.Paused) {
|
|
1070
1074
|
return;
|
|
1071
1075
|
}
|
|
1072
1076
|
// Clone the Headers so that the default ones are not overridden
|
|
1073
|
-
|
|
1077
|
+
const uploadEventArgs = new UploadEvent(filesToUpload, this.cloneRequestHeaders(this.async.saveHeaders));
|
|
1074
1078
|
this.uploadEvent.emit(uploadEventArgs);
|
|
1075
1079
|
if (!uploadEventArgs.isDefaultPrevented()) {
|
|
1076
1080
|
this.fileList.setFilesState(filesToUpload, FileState.Uploading);
|
|
1077
|
-
|
|
1081
|
+
const httpSubcription = this.performUpload(filesToUpload, uploadEventArgs);
|
|
1078
1082
|
filesToUpload.forEach((file) => {
|
|
1079
1083
|
file.httpSubscription = httpSubcription;
|
|
1080
1084
|
});
|
|
@@ -1086,12 +1090,12 @@ class UploadService {
|
|
|
1086
1090
|
}
|
|
1087
1091
|
performRemove(files, removeEventArgs) {
|
|
1088
1092
|
const async = this.async;
|
|
1089
|
-
|
|
1093
|
+
const fileNames = files.map((file) => {
|
|
1090
1094
|
return file.name;
|
|
1091
1095
|
});
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1096
|
+
const formData = this.populateRemoveFormData(fileNames, removeEventArgs.data);
|
|
1097
|
+
const options = this.populateRequestOptions(removeEventArgs.headers, false);
|
|
1098
|
+
const removeRequest = new HttpRequest(async.removeMethod, async.removeUrl, formData, options);
|
|
1095
1099
|
this.http.request(removeRequest)
|
|
1096
1100
|
.subscribe(success => {
|
|
1097
1101
|
this.onSuccess(success, files, "remove");
|
|
@@ -1101,10 +1105,10 @@ class UploadService {
|
|
|
1101
1105
|
}
|
|
1102
1106
|
performUpload(files, uploadEventArgs) {
|
|
1103
1107
|
const async = this.async;
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
+
const formData = this.populateUploadFormData(files, uploadEventArgs.data);
|
|
1109
|
+
const options = this.populateRequestOptions(uploadEventArgs.headers);
|
|
1110
|
+
const uploadRequest = new HttpRequest(async.saveMethod, async.saveUrl, formData, options);
|
|
1111
|
+
const httpSubscription = this.http.request(uploadRequest)
|
|
1108
1112
|
.subscribe(event => {
|
|
1109
1113
|
if (event.type === HttpEventType.UploadProgress && !this.async.chunk) {
|
|
1110
1114
|
this.onProgress(event, files);
|
|
@@ -1203,7 +1207,7 @@ class UploadService {
|
|
|
1203
1207
|
return validSelectedFiles.length === 0;
|
|
1204
1208
|
}
|
|
1205
1209
|
cloneRequestHeaders(headers) {
|
|
1206
|
-
|
|
1210
|
+
const cloned = {};
|
|
1207
1211
|
if (headers) {
|
|
1208
1212
|
headers.keys().forEach((key) => {
|
|
1209
1213
|
cloned[key] = headers.get(key);
|
|
@@ -1221,29 +1225,29 @@ class UploadService {
|
|
|
1221
1225
|
}
|
|
1222
1226
|
populateUploadFormData(files, clientData) {
|
|
1223
1227
|
const saveField = this.async.saveField;
|
|
1224
|
-
|
|
1228
|
+
const data = new FormData();
|
|
1225
1229
|
this.populateClientFormData(data, clientData);
|
|
1226
1230
|
if (this.async.chunk) {
|
|
1227
1231
|
data.append(saveField, this.getNextChunk(files[0]));
|
|
1228
1232
|
data.append("metadata", this.getChunkMetadata(files[0]));
|
|
1229
1233
|
}
|
|
1230
1234
|
else {
|
|
1231
|
-
for (
|
|
1235
|
+
for (const file of files) {
|
|
1232
1236
|
data.append(saveField, file.rawFile);
|
|
1233
1237
|
}
|
|
1234
1238
|
}
|
|
1235
1239
|
return data;
|
|
1236
1240
|
}
|
|
1237
1241
|
populateRemoveFormData(fileNames, clientData) {
|
|
1238
|
-
|
|
1242
|
+
const data = new FormData();
|
|
1239
1243
|
this.populateClientFormData(data, clientData);
|
|
1240
|
-
for (
|
|
1244
|
+
for (const fileName of fileNames) {
|
|
1241
1245
|
data.append(this.async.removeField, fileName);
|
|
1242
1246
|
}
|
|
1243
1247
|
return data;
|
|
1244
1248
|
}
|
|
1245
1249
|
populateClientFormData(data, clientData) {
|
|
1246
|
-
for (
|
|
1250
|
+
for (const key in clientData) {
|
|
1247
1251
|
if (clientData.hasOwnProperty(key)) {
|
|
1248
1252
|
data.append(key, clientData[key]);
|
|
1249
1253
|
}
|
|
@@ -1294,9 +1298,9 @@ class UploadService {
|
|
|
1294
1298
|
return false;
|
|
1295
1299
|
}
|
|
1296
1300
|
}
|
|
1297
|
-
UploadService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1298
|
-
UploadService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1299
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1301
|
+
UploadService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: UploadService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1302
|
+
UploadService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: UploadService });
|
|
1303
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: UploadService, decorators: [{
|
|
1300
1304
|
type: Injectable
|
|
1301
1305
|
}], ctorParameters: function () { return [{ type: i1.HttpClient }]; } });
|
|
1302
1306
|
|
|
@@ -1304,8 +1308,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1304
1308
|
* @hidden
|
|
1305
1309
|
*/
|
|
1306
1310
|
class NavigationService {
|
|
1307
|
-
constructor(uploadService) {
|
|
1311
|
+
constructor(uploadService, zone) {
|
|
1308
1312
|
this.uploadService = uploadService;
|
|
1313
|
+
this.zone = zone;
|
|
1309
1314
|
this.onActionButtonAction = new EventEmitter();
|
|
1310
1315
|
this.onActionButtonFocus = new EventEmitter();
|
|
1311
1316
|
this.onFileAction = new EventEmitter();
|
|
@@ -1349,18 +1354,22 @@ class NavigationService {
|
|
|
1349
1354
|
}
|
|
1350
1355
|
handleEnter() {
|
|
1351
1356
|
if (this.lastIndex >= 0) {
|
|
1352
|
-
|
|
1353
|
-
this.
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
this.
|
|
1358
|
-
|
|
1357
|
+
this.zone.run(() => {
|
|
1358
|
+
if (this.focusedIndex <= this.lastFileIndex) {
|
|
1359
|
+
this.onFileAction.emit(Keys.Enter);
|
|
1360
|
+
return;
|
|
1361
|
+
}
|
|
1362
|
+
if (this.actionButtonsVisible && this.focusedIndex <= this.lastIndex) {
|
|
1363
|
+
this.onActionButtonAction.emit(this.focusedIndex < this.lastIndex ? "clear" : "upload");
|
|
1364
|
+
}
|
|
1365
|
+
});
|
|
1359
1366
|
}
|
|
1360
1367
|
}
|
|
1361
1368
|
handleDelete() {
|
|
1362
1369
|
if (this.focusedIndex >= 0 && this.focusedIndex <= this.lastFileIndex) {
|
|
1363
|
-
this.
|
|
1370
|
+
this.zone.run(() => {
|
|
1371
|
+
this.onFileAction.emit(Keys.Delete);
|
|
1372
|
+
});
|
|
1364
1373
|
}
|
|
1365
1374
|
}
|
|
1366
1375
|
handleEscape() {
|
|
@@ -1371,13 +1380,17 @@ class NavigationService {
|
|
|
1371
1380
|
handleLeft() {
|
|
1372
1381
|
if (this.actionButtonsVisible && this.focusedIndex === this.lastIndex) {
|
|
1373
1382
|
this.focusedIndex -= 1;
|
|
1374
|
-
this.
|
|
1383
|
+
this.zone.run(() => {
|
|
1384
|
+
this.onActionButtonFocus.emit("clear");
|
|
1385
|
+
});
|
|
1375
1386
|
}
|
|
1376
1387
|
}
|
|
1377
1388
|
handleRight() {
|
|
1378
1389
|
if (this.actionButtonsVisible && this.focusedIndex === this.lastIndex - 1) {
|
|
1379
1390
|
this.focusedIndex += 1;
|
|
1380
|
-
this.
|
|
1391
|
+
this.zone.run(() => {
|
|
1392
|
+
this.onActionButtonFocus.emit("upload");
|
|
1393
|
+
});
|
|
1381
1394
|
}
|
|
1382
1395
|
}
|
|
1383
1396
|
handleTab(shifted) {
|
|
@@ -1385,36 +1398,42 @@ class NavigationService {
|
|
|
1385
1398
|
this.focusedIndex = -1;
|
|
1386
1399
|
return;
|
|
1387
1400
|
}
|
|
1388
|
-
this.
|
|
1401
|
+
this.zone.run(() => {
|
|
1402
|
+
this.onTab.emit();
|
|
1403
|
+
});
|
|
1389
1404
|
}
|
|
1390
1405
|
handleDown() {
|
|
1391
1406
|
if (this.lastIndex >= 0 && this.focusedIndex < this.lastIndex) {
|
|
1392
|
-
|
|
1393
|
-
this.focusedIndex
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
this.focusedIndex
|
|
1399
|
-
|
|
1400
|
-
|
|
1407
|
+
this.zone.run(() => {
|
|
1408
|
+
if (this.focusedIndex < this.lastFileIndex) {
|
|
1409
|
+
this.focusedIndex += 1;
|
|
1410
|
+
this.onFileFocus.emit(this.focusedIndex);
|
|
1411
|
+
return;
|
|
1412
|
+
}
|
|
1413
|
+
if (this.actionButtonsVisible && this.focusedIndex === this.lastFileIndex) {
|
|
1414
|
+
this.focusedIndex += 1;
|
|
1415
|
+
this.onActionButtonFocus.emit("clear");
|
|
1416
|
+
}
|
|
1417
|
+
});
|
|
1401
1418
|
}
|
|
1402
1419
|
}
|
|
1403
1420
|
handleUp() {
|
|
1404
1421
|
if (this.lastIndex >= 0 && this.focusedIndex > -1) {
|
|
1405
|
-
this.
|
|
1406
|
-
|
|
1407
|
-
this.
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
this.
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
this.focusedIndex
|
|
1416
|
-
|
|
1417
|
-
|
|
1422
|
+
this.zone.run(() => {
|
|
1423
|
+
this.focusedIndex -= 1;
|
|
1424
|
+
if (this.focusedIndex === -1) {
|
|
1425
|
+
this.onSelectButtonFocus.emit();
|
|
1426
|
+
return;
|
|
1427
|
+
}
|
|
1428
|
+
if (this.focusedIndex <= this.lastFileIndex) {
|
|
1429
|
+
this.onFileFocus.emit(this.focusedIndex);
|
|
1430
|
+
return;
|
|
1431
|
+
}
|
|
1432
|
+
if (this.actionButtonsVisible && this.focusedIndex <= this.lastIndex) {
|
|
1433
|
+
this.focusedIndex = this.lastFileIndex;
|
|
1434
|
+
this.onFileFocus.emit(this.focusedIndex);
|
|
1435
|
+
}
|
|
1436
|
+
});
|
|
1418
1437
|
}
|
|
1419
1438
|
}
|
|
1420
1439
|
get focusedIndex() {
|
|
@@ -1438,11 +1457,11 @@ class NavigationService {
|
|
|
1438
1457
|
return this.actionButtonsVisible ? fileCount + 1 : fileCount - 1;
|
|
1439
1458
|
}
|
|
1440
1459
|
}
|
|
1441
|
-
NavigationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1442
|
-
NavigationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1443
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1460
|
+
NavigationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NavigationService, deps: [{ token: UploadService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1461
|
+
NavigationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NavigationService });
|
|
1462
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NavigationService, decorators: [{
|
|
1444
1463
|
type: Injectable
|
|
1445
|
-
}], ctorParameters: function () { return [{ type: UploadService }]; } });
|
|
1464
|
+
}], ctorParameters: function () { return [{ type: UploadService }, { type: i0.NgZone }]; } });
|
|
1446
1465
|
|
|
1447
1466
|
/**
|
|
1448
1467
|
* @hidden
|
|
@@ -1451,9 +1470,9 @@ const packageMetadata = {
|
|
|
1451
1470
|
name: '@progress/kendo-angular-upload',
|
|
1452
1471
|
productName: 'Kendo UI for Angular',
|
|
1453
1472
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
1454
|
-
publishDate:
|
|
1473
|
+
publishDate: 1672320794,
|
|
1455
1474
|
version: '',
|
|
1456
|
-
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license
|
|
1475
|
+
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
1457
1476
|
};
|
|
1458
1477
|
|
|
1459
1478
|
/**
|
|
@@ -1464,16 +1483,16 @@ class FileTemplateDirective {
|
|
|
1464
1483
|
this.templateRef = templateRef;
|
|
1465
1484
|
}
|
|
1466
1485
|
}
|
|
1467
|
-
FileTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1468
|
-
FileTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
1469
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1486
|
+
FileTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1487
|
+
FileTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: FileTemplateDirective, selector: "[kendoUploadFileTemplate], [kendoFileSelectFileTemplate]", ngImport: i0 });
|
|
1488
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileTemplateDirective, decorators: [{
|
|
1470
1489
|
type: Directive,
|
|
1471
1490
|
args: [{
|
|
1472
1491
|
selector: '[kendoUploadFileTemplate], [kendoFileSelectFileTemplate]'
|
|
1473
1492
|
}]
|
|
1474
1493
|
}], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
|
|
1475
1494
|
|
|
1476
|
-
|
|
1495
|
+
const components = {};
|
|
1477
1496
|
/**
|
|
1478
1497
|
* @hidden
|
|
1479
1498
|
*/
|
|
@@ -1493,9 +1512,9 @@ class DropZoneService {
|
|
|
1493
1512
|
return id in components;
|
|
1494
1513
|
}
|
|
1495
1514
|
}
|
|
1496
|
-
DropZoneService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1497
|
-
DropZoneService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1498
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1515
|
+
DropZoneService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DropZoneService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1516
|
+
DropZoneService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DropZoneService });
|
|
1517
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DropZoneService, decorators: [{
|
|
1499
1518
|
type: Injectable
|
|
1500
1519
|
}] });
|
|
1501
1520
|
|
|
@@ -1507,9 +1526,9 @@ class FileInfoTemplateDirective {
|
|
|
1507
1526
|
this.templateRef = templateRef;
|
|
1508
1527
|
}
|
|
1509
1528
|
}
|
|
1510
|
-
FileInfoTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1511
|
-
FileInfoTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
1512
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1529
|
+
FileInfoTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileInfoTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1530
|
+
FileInfoTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: FileInfoTemplateDirective, selector: "[kendoUploadFileInfoTemplate], [kendoFileSelectFileInfoTemplate]", ngImport: i0 });
|
|
1531
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileInfoTemplateDirective, decorators: [{
|
|
1513
1532
|
type: Directive,
|
|
1514
1533
|
args: [{
|
|
1515
1534
|
selector: '[kendoUploadFileInfoTemplate], [kendoFileSelectFileInfoTemplate]'
|
|
@@ -1568,9 +1587,9 @@ class FileListItemDirective {
|
|
|
1568
1587
|
}
|
|
1569
1588
|
}
|
|
1570
1589
|
}
|
|
1571
|
-
FileListItemDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1572
|
-
FileListItemDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
1573
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1590
|
+
FileListItemDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileListItemDirective, deps: [{ token: i0.ElementRef }, { token: NavigationService }, { token: UploadService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1591
|
+
FileListItemDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: FileListItemDirective, selector: "[kendoUploadFileListItem]", inputs: { files: "files", index: "index" }, host: { listeners: { "focus": "onFocus()", "blur": "onBlur()", "click": "onClick($event)" }, properties: { "class.k-file": "this.fileClass", "attr.data-uid": "this.uidAttribute", "attr.tabIndex": "this.tabIndex", "class.k-file-error": "this.kFileError", "class.k-file-invalid": "this.kFileInvalid", "class.k-file-progress": "this.kFileProgress", "class.k-file-success": "this.kFileSuccess", "class.k-focus": "this.kStateFocused" } }, ngImport: i0 });
|
|
1592
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileListItemDirective, decorators: [{
|
|
1574
1593
|
type: Directive,
|
|
1575
1594
|
args: [{
|
|
1576
1595
|
selector: '[kendoUploadFileListItem]'
|
|
@@ -1648,9 +1667,9 @@ class FileListItemBase {
|
|
|
1648
1667
|
return this.localization.get(key);
|
|
1649
1668
|
}
|
|
1650
1669
|
}
|
|
1651
|
-
FileListItemBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1652
|
-
FileListItemBase.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "
|
|
1653
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1670
|
+
FileListItemBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileListItemBase, deps: [{ token: UploadService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1671
|
+
FileListItemBase.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: FileListItemBase, selector: "ng-component", ngImport: i0, template: '', isInline: true });
|
|
1672
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileListItemBase, decorators: [{
|
|
1654
1673
|
type: Component,
|
|
1655
1674
|
args: [{ template: '' }]
|
|
1656
1675
|
}], ctorParameters: function () { return [{ type: UploadService }]; } });
|
|
@@ -1759,9 +1778,9 @@ class FileListItemActionButtonComponent {
|
|
|
1759
1778
|
return true;
|
|
1760
1779
|
}
|
|
1761
1780
|
}
|
|
1762
|
-
FileListItemActionButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1763
|
-
FileListItemActionButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "
|
|
1764
|
-
<
|
|
1781
|
+
FileListItemActionButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileListItemActionButtonComponent, deps: [{ token: UploadService }, { token: i1$1.LocalizationService }, { token: NavigationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1782
|
+
FileListItemActionButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: FileListItemActionButtonComponent, selector: "kendo-upload-file-list-item-action-button", inputs: { file: "file", disabled: "disabled", progress: "progress" }, ngImport: i0, template: `
|
|
1783
|
+
<span class="k-upload-actions">
|
|
1765
1784
|
<span class="k-upload-pct" *ngIf="isUploading || isPaused">{{progress}}%</span>
|
|
1766
1785
|
|
|
1767
1786
|
<button type="button" *ngIf="isFailed" class="k-button k-icon-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-upload-action"
|
|
@@ -1807,14 +1826,14 @@ FileListItemActionButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion
|
|
|
1807
1826
|
[attr.title]='actionButtonTitle'>
|
|
1808
1827
|
</span>
|
|
1809
1828
|
</button>
|
|
1810
|
-
</
|
|
1811
|
-
`, isInline: true, directives: [{ type:
|
|
1812
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1829
|
+
</span>
|
|
1830
|
+
`, isInline: true, directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
1831
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileListItemActionButtonComponent, decorators: [{
|
|
1813
1832
|
type: Component,
|
|
1814
1833
|
args: [{
|
|
1815
1834
|
selector: 'kendo-upload-file-list-item-action-button',
|
|
1816
1835
|
template: `
|
|
1817
|
-
<
|
|
1836
|
+
<span class="k-upload-actions">
|
|
1818
1837
|
<span class="k-upload-pct" *ngIf="isUploading || isPaused">{{progress}}%</span>
|
|
1819
1838
|
|
|
1820
1839
|
<button type="button" *ngIf="isFailed" class="k-button k-icon-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-upload-action"
|
|
@@ -1860,7 +1879,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1860
1879
|
[attr.title]='actionButtonTitle'>
|
|
1861
1880
|
</span>
|
|
1862
1881
|
</button>
|
|
1863
|
-
</
|
|
1882
|
+
</span>
|
|
1864
1883
|
`
|
|
1865
1884
|
}]
|
|
1866
1885
|
}], ctorParameters: function () { return [{ type: UploadService }, { type: i1$1.LocalizationService }, { type: NavigationService }]; }, propDecorators: { file: [{
|
|
@@ -1888,9 +1907,9 @@ class TemplateContextDirective {
|
|
|
1888
1907
|
}
|
|
1889
1908
|
}
|
|
1890
1909
|
}
|
|
1891
|
-
TemplateContextDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1892
|
-
TemplateContextDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
1893
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1910
|
+
TemplateContextDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TemplateContextDirective, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1911
|
+
TemplateContextDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: TemplateContextDirective, selector: "[templateContext]", inputs: { templateContext: "templateContext" }, ngImport: i0 });
|
|
1912
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TemplateContextDirective, decorators: [{
|
|
1894
1913
|
type: Directive,
|
|
1895
1914
|
args: [{
|
|
1896
1915
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
@@ -1943,40 +1962,41 @@ class FileListSingleItemComponent extends FileListItemBase {
|
|
|
1943
1962
|
return !this.isUploadFailed && !this.isUploadSuccessful;
|
|
1944
1963
|
}
|
|
1945
1964
|
}
|
|
1946
|
-
FileListSingleItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1947
|
-
FileListSingleItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1965
|
+
FileListSingleItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileListSingleItemComponent, deps: [{ token: i1$1.LocalizationService }, { token: UploadService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1966
|
+
FileListSingleItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: FileListSingleItemComponent, selector: "kendo-upload-file-list-single-item", inputs: { disabled: "disabled", file: "file", fileInfoTemplate: "fileInfoTemplate" }, usesInheritance: true, ngImport: i0, template: `
|
|
1967
|
+
<kendo-progressbar
|
|
1968
|
+
[@progressState]="showProgress"
|
|
1969
|
+
[value]="progressComplete"
|
|
1970
|
+
[label]="{ visible: false }"
|
|
1971
|
+
>
|
|
1972
|
+
</kendo-progressbar>
|
|
1973
|
+
<span class="k-file-icon-wrapper">
|
|
1974
|
+
<span class="k-file-icon k-icon" [ngClass]="fileGroupClass"></span>
|
|
1975
|
+
</span>
|
|
1976
|
+
<span class="k-file-name-size-wrapper">
|
|
1977
|
+
<ng-container *ngIf="!fileInfoTemplate">
|
|
1978
|
+
<span class="k-file-name" [title]="file.name">{{ file.name }}</span>
|
|
1979
|
+
<span [ngClass]="{
|
|
1980
|
+
'k-file-validation-message': file.validationErrors,
|
|
1981
|
+
'k-file-size': !file.validationErrors && isNotYetUploaded,
|
|
1982
|
+
'k-file-summary': isUploadSuccessful || isUploadFailed
|
|
1963
1983
|
}"
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
`, isInline: true, components: [{ type: FileListItemActionButtonComponent, selector: "kendo-upload-file-list-item-action-button", inputs: ["file", "disabled", "progress"] }], directives: [{ type:
|
|
1984
|
+
>{{fileStatusText}}</span>
|
|
1985
|
+
</ng-container>
|
|
1986
|
+
<ng-template *ngIf="fileInfoTemplate"
|
|
1987
|
+
[templateContext]="{
|
|
1988
|
+
templateRef: fileInfoTemplate.templateRef,
|
|
1989
|
+
state: file.state,
|
|
1990
|
+
$implicit: [file]
|
|
1991
|
+
}">
|
|
1992
|
+
</ng-template>
|
|
1993
|
+
</span>
|
|
1994
|
+
<kendo-upload-file-list-item-action-button
|
|
1995
|
+
[file]='file'
|
|
1996
|
+
[disabled]='disabled'
|
|
1997
|
+
[progress]='progressComplete'>
|
|
1998
|
+
</kendo-upload-file-list-item-action-button>
|
|
1999
|
+
`, isInline: true, components: [{ type: i3.ProgressBarComponent, selector: "kendo-progressbar", inputs: ["label", "progressCssStyle", "progressCssClass", "emptyCssStyle", "emptyCssClass", "animation"], outputs: ["animationEnd"], exportAs: ["kendoProgressBar"] }, { type: FileListItemActionButtonComponent, selector: "kendo-upload-file-list-item-action-button", inputs: ["file", "disabled", "progress"] }], directives: [{ type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }, { type: TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }], animations: [
|
|
1980
2000
|
trigger('progressState', [
|
|
1981
2001
|
state('active', style({ opacity: 1 })),
|
|
1982
2002
|
state('inactive', style({ opacity: 0 })),
|
|
@@ -1985,7 +2005,7 @@ FileListSingleItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.
|
|
|
1985
2005
|
transition('active => inactive', animate('1s 2s ease-out'))
|
|
1986
2006
|
])
|
|
1987
2007
|
] });
|
|
1988
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2008
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileListSingleItemComponent, decorators: [{
|
|
1989
2009
|
type: Component,
|
|
1990
2010
|
args: [{
|
|
1991
2011
|
animations: [
|
|
@@ -1999,37 +2019,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1999
2019
|
],
|
|
2000
2020
|
selector: 'kendo-upload-file-list-single-item',
|
|
2001
2021
|
template: `
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2022
|
+
<kendo-progressbar
|
|
2023
|
+
[@progressState]="showProgress"
|
|
2024
|
+
[value]="progressComplete"
|
|
2025
|
+
[label]="{ visible: false }"
|
|
2026
|
+
>
|
|
2027
|
+
</kendo-progressbar>
|
|
2028
|
+
<span class="k-file-icon-wrapper">
|
|
2029
|
+
<span class="k-file-icon k-icon" [ngClass]="fileGroupClass"></span>
|
|
2030
|
+
</span>
|
|
2031
|
+
<span class="k-file-name-size-wrapper">
|
|
2032
|
+
<ng-container *ngIf="!fileInfoTemplate">
|
|
2033
|
+
<span class="k-file-name" [title]="file.name">{{ file.name }}</span>
|
|
2034
|
+
<span [ngClass]="{
|
|
2035
|
+
'k-file-validation-message': file.validationErrors,
|
|
2036
|
+
'k-file-size': !file.validationErrors && isNotYetUploaded,
|
|
2037
|
+
'k-file-summary': isUploadSuccessful || isUploadFailed
|
|
2017
2038
|
}"
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2039
|
+
>{{fileStatusText}}</span>
|
|
2040
|
+
</ng-container>
|
|
2041
|
+
<ng-template *ngIf="fileInfoTemplate"
|
|
2042
|
+
[templateContext]="{
|
|
2043
|
+
templateRef: fileInfoTemplate.templateRef,
|
|
2044
|
+
state: file.state,
|
|
2045
|
+
$implicit: [file]
|
|
2046
|
+
}">
|
|
2047
|
+
</ng-template>
|
|
2048
|
+
</span>
|
|
2049
|
+
<kendo-upload-file-list-item-action-button
|
|
2050
|
+
[file]='file'
|
|
2051
|
+
[disabled]='disabled'
|
|
2052
|
+
[progress]='progressComplete'>
|
|
2053
|
+
</kendo-upload-file-list-item-action-button>
|
|
2033
2054
|
`
|
|
2034
2055
|
}]
|
|
2035
2056
|
}], ctorParameters: function () { return [{ type: i1$1.LocalizationService }, { type: UploadService }]; }, propDecorators: { disabled: [{
|
|
@@ -2085,48 +2106,46 @@ class FileListMultipleItemsComponent extends FileListItemBase {
|
|
|
2085
2106
|
return this.files[0].state === FileState.Failed;
|
|
2086
2107
|
}
|
|
2087
2108
|
}
|
|
2088
|
-
FileListMultipleItemsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2089
|
-
FileListMultipleItemsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2109
|
+
FileListMultipleItemsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileListMultipleItemsComponent, deps: [{ token: i1$1.LocalizationService }, { token: UploadService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2110
|
+
FileListMultipleItemsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: FileListMultipleItemsComponent, selector: "kendo-upload-file-list-multiple-items", inputs: { disabled: "disabled", files: "files", fileInfoTemplate: "fileInfoTemplate" }, usesInheritance: true, ngImport: i0, template: `
|
|
2111
|
+
<kendo-progressbar
|
|
2112
|
+
[@progressState]="showProgress"
|
|
2113
|
+
[value]="progressComplete"
|
|
2114
|
+
[label]="{ visible: false }"
|
|
2115
|
+
>
|
|
2116
|
+
</kendo-progressbar>
|
|
2117
|
+
<span class="k-file-icon-wrapper">
|
|
2118
|
+
<span class="k-file-icon k-icon k-i-copy"></span>
|
|
2119
|
+
</span>
|
|
2120
|
+
<span class="k-multiple-files-wrapper">
|
|
2121
|
+
<ng-container *ngIf="!fileInfoTemplate">
|
|
2122
|
+
<span *ngFor="let file of files" class="k-file-name-size-wrapper">
|
|
2123
|
+
<span [title]="file.name" class="k-file-name">
|
|
2124
|
+
{{file.name}}
|
|
2125
|
+
</span>
|
|
2126
|
+
<span [ngClass]="{
|
|
2104
2127
|
'k-file-validation-message': file.validationErrors,
|
|
2105
2128
|
'k-file-size': !file.validationErrors
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
[disabled]='disabled'
|
|
2127
|
-
[progress]='progressComplete'>
|
|
2128
|
-
</kendo-upload-file-list-item-action-button>
|
|
2129
|
-
`, isInline: true, components: [{ type: FileListItemActionButtonComponent, selector: "kendo-upload-file-list-item-action-button", inputs: ["file", "disabled", "progress"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }], animations: [
|
|
2129
|
+
}"
|
|
2130
|
+
>{{fileStatusText(file)}}</span>
|
|
2131
|
+
</span>
|
|
2132
|
+
<span class="k-file-summary"
|
|
2133
|
+
>{{batchStatusText}}</span>
|
|
2134
|
+
</ng-container>
|
|
2135
|
+
<ng-template *ngIf="fileInfoTemplate"
|
|
2136
|
+
[templateContext]="{
|
|
2137
|
+
templateRef: fileInfoTemplate.templateRef,
|
|
2138
|
+
state: files[0].state,
|
|
2139
|
+
$implicit: files
|
|
2140
|
+
}">
|
|
2141
|
+
</ng-template>
|
|
2142
|
+
</span>
|
|
2143
|
+
<kendo-upload-file-list-item-action-button
|
|
2144
|
+
[file]='files[0]'
|
|
2145
|
+
[disabled]='disabled'
|
|
2146
|
+
[progress]='progressComplete'>
|
|
2147
|
+
</kendo-upload-file-list-item-action-button>
|
|
2148
|
+
`, isInline: true, components: [{ type: i3.ProgressBarComponent, selector: "kendo-progressbar", inputs: ["label", "progressCssStyle", "progressCssClass", "emptyCssStyle", "emptyCssClass", "animation"], outputs: ["animationEnd"], exportAs: ["kendoProgressBar"] }, { type: FileListItemActionButtonComponent, selector: "kendo-upload-file-list-item-action-button", inputs: ["file", "disabled", "progress"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6.TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }, { type: TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }], animations: [
|
|
2130
2149
|
trigger('progressState', [
|
|
2131
2150
|
state('active', style({ opacity: 1 })),
|
|
2132
2151
|
state('inactive', style({ opacity: 0 })),
|
|
@@ -2135,7 +2154,7 @@ FileListMultipleItemsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
|
2135
2154
|
transition('active => inactive', animate('1s 2s ease-out'))
|
|
2136
2155
|
])
|
|
2137
2156
|
] });
|
|
2138
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2157
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileListMultipleItemsComponent, decorators: [{
|
|
2139
2158
|
type: Component,
|
|
2140
2159
|
args: [{
|
|
2141
2160
|
animations: [
|
|
@@ -2149,45 +2168,43 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
2149
2168
|
],
|
|
2150
2169
|
selector: 'kendo-upload-file-list-multiple-items',
|
|
2151
2170
|
template: `
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2171
|
+
<kendo-progressbar
|
|
2172
|
+
[@progressState]="showProgress"
|
|
2173
|
+
[value]="progressComplete"
|
|
2174
|
+
[label]="{ visible: false }"
|
|
2175
|
+
>
|
|
2176
|
+
</kendo-progressbar>
|
|
2177
|
+
<span class="k-file-icon-wrapper">
|
|
2178
|
+
<span class="k-file-icon k-icon k-i-copy"></span>
|
|
2179
|
+
</span>
|
|
2180
|
+
<span class="k-multiple-files-wrapper">
|
|
2181
|
+
<ng-container *ngIf="!fileInfoTemplate">
|
|
2182
|
+
<span *ngFor="let file of files" class="k-file-name-size-wrapper">
|
|
2183
|
+
<span [title]="file.name" class="k-file-name">
|
|
2184
|
+
{{file.name}}
|
|
2185
|
+
</span>
|
|
2186
|
+
<span [ngClass]="{
|
|
2166
2187
|
'k-file-validation-message': file.validationErrors,
|
|
2167
2188
|
'k-file-size': !file.validationErrors
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
[file]='files[0]'
|
|
2188
|
-
[disabled]='disabled'
|
|
2189
|
-
[progress]='progressComplete'>
|
|
2190
|
-
</kendo-upload-file-list-item-action-button>
|
|
2189
|
+
}"
|
|
2190
|
+
>{{fileStatusText(file)}}</span>
|
|
2191
|
+
</span>
|
|
2192
|
+
<span class="k-file-summary"
|
|
2193
|
+
>{{batchStatusText}}</span>
|
|
2194
|
+
</ng-container>
|
|
2195
|
+
<ng-template *ngIf="fileInfoTemplate"
|
|
2196
|
+
[templateContext]="{
|
|
2197
|
+
templateRef: fileInfoTemplate.templateRef,
|
|
2198
|
+
state: files[0].state,
|
|
2199
|
+
$implicit: files
|
|
2200
|
+
}">
|
|
2201
|
+
</ng-template>
|
|
2202
|
+
</span>
|
|
2203
|
+
<kendo-upload-file-list-item-action-button
|
|
2204
|
+
[file]='files[0]'
|
|
2205
|
+
[disabled]='disabled'
|
|
2206
|
+
[progress]='progressComplete'>
|
|
2207
|
+
</kendo-upload-file-list-item-action-button>
|
|
2191
2208
|
`
|
|
2192
2209
|
}]
|
|
2193
2210
|
}], ctorParameters: function () { return [{ type: i1$1.LocalizationService }, { type: UploadService }]; }, propDecorators: { disabled: [{
|
|
@@ -2220,10 +2237,10 @@ class FileListComponent {
|
|
|
2220
2237
|
});
|
|
2221
2238
|
}
|
|
2222
2239
|
itemActionHandler(key) {
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2240
|
+
const index = this.navigation.focusedIndex;
|
|
2241
|
+
const item = this.fileListItems.toArray()[index];
|
|
2242
|
+
const uid = item.uidAttribute;
|
|
2243
|
+
const files = this.uploadService.files.get(uid);
|
|
2227
2244
|
if (key === Keys.Escape && files[0].state === FileState.Uploading) {
|
|
2228
2245
|
this.uploadService.cancelFiles(uid);
|
|
2229
2246
|
this.navigation.focusSelectButton();
|
|
@@ -2251,8 +2268,8 @@ class FileListComponent {
|
|
|
2251
2268
|
this.actionSubscription.unsubscribe();
|
|
2252
2269
|
}
|
|
2253
2270
|
}
|
|
2254
|
-
FileListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2255
|
-
FileListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "
|
|
2271
|
+
FileListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileListComponent, deps: [{ token: UploadService }, { token: NavigationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2272
|
+
FileListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: FileListComponent, selector: "[kendo-upload-file-list]", inputs: { disabled: "disabled", fileList: "fileList", fileTemplate: "fileTemplate", fileInfoTemplate: "fileInfoTemplate" }, viewQueries: [{ propertyName: "fileListItems", predicate: FileListItemDirective, descendants: true }], ngImport: i0, template: `
|
|
2256
2273
|
<ng-template ngFor
|
|
2257
2274
|
[ngForOf]="fileList"
|
|
2258
2275
|
let-files
|
|
@@ -2280,8 +2297,8 @@ FileListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
|
|
|
2280
2297
|
}"></ng-template>
|
|
2281
2298
|
</li>
|
|
2282
2299
|
</ng-template>
|
|
2283
|
-
`, isInline: true, components: [{ type: FileListSingleItemComponent, selector: "kendo-upload-file-list-single-item", inputs: ["disabled", "file", "fileInfoTemplate"] }, { type: FileListMultipleItemsComponent, selector: "kendo-upload-file-list-multiple-items", inputs: ["disabled", "files", "fileInfoTemplate"] }], directives: [{ type:
|
|
2284
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2300
|
+
`, isInline: true, components: [{ type: FileListSingleItemComponent, selector: "kendo-upload-file-list-single-item", inputs: ["disabled", "file", "fileInfoTemplate"] }, { type: FileListMultipleItemsComponent, selector: "kendo-upload-file-list-multiple-items", inputs: ["disabled", "files", "fileInfoTemplate"] }], directives: [{ type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: FileListItemDirective, selector: "[kendoUploadFileListItem]", inputs: ["files", "index"] }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }, { type: TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }] });
|
|
2301
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileListComponent, decorators: [{
|
|
2285
2302
|
type: Component,
|
|
2286
2303
|
args: [{
|
|
2287
2304
|
selector: '[kendo-upload-file-list]',
|
|
@@ -2333,9 +2350,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
2333
2350
|
*/
|
|
2334
2351
|
class Messages extends ComponentMessages {
|
|
2335
2352
|
}
|
|
2336
|
-
Messages.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2337
|
-
Messages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
2338
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2353
|
+
Messages.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: Messages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
2354
|
+
Messages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", 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 });
|
|
2355
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: Messages, decorators: [{
|
|
2339
2356
|
type: Directive
|
|
2340
2357
|
}], propDecorators: { cancel: [{
|
|
2341
2358
|
type: Input
|
|
@@ -2390,14 +2407,14 @@ class LocalizedMessagesDirective extends Messages {
|
|
|
2390
2407
|
this.service = service;
|
|
2391
2408
|
}
|
|
2392
2409
|
}
|
|
2393
|
-
LocalizedMessagesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2394
|
-
LocalizedMessagesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
2410
|
+
LocalizedMessagesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: LocalizedMessagesDirective, deps: [{ token: i1$1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2411
|
+
LocalizedMessagesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: LocalizedMessagesDirective, selector: "\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n ", providers: [
|
|
2395
2412
|
{
|
|
2396
2413
|
provide: Messages,
|
|
2397
2414
|
useExisting: forwardRef(() => LocalizedMessagesDirective)
|
|
2398
2415
|
}
|
|
2399
2416
|
], usesInheritance: true, ngImport: i0 });
|
|
2400
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2417
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: LocalizedMessagesDirective, decorators: [{
|
|
2401
2418
|
type: Directive,
|
|
2402
2419
|
args: [{
|
|
2403
2420
|
providers: [
|
|
@@ -2452,7 +2469,7 @@ const validateFileSize = (file, minFileSize, maxFileSize) => {
|
|
|
2452
2469
|
};
|
|
2453
2470
|
const parseAllowedExtensions = (extensions) => {
|
|
2454
2471
|
const allowedExtensions = extensions.map((ext) => {
|
|
2455
|
-
|
|
2472
|
+
const parsedExt = (ext.substring(0, 1) === ".") ? ext : ("." + ext);
|
|
2456
2473
|
return parsedExt.toLowerCase();
|
|
2457
2474
|
});
|
|
2458
2475
|
return allowedExtensions;
|
|
@@ -2516,9 +2533,9 @@ class DropZoneBase {
|
|
|
2516
2533
|
this.renderer.removeClass(this.element.nativeElement, className);
|
|
2517
2534
|
}
|
|
2518
2535
|
}
|
|
2519
|
-
DropZoneBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2520
|
-
DropZoneBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
2521
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2536
|
+
DropZoneBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DropZoneBase, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: 'hoverClass' }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2537
|
+
DropZoneBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: DropZoneBase, host: { listeners: { "dragenter": "onElementDragEnterListener()", "dragover": "onElementDragOverListener()" } }, ngImport: i0 });
|
|
2538
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DropZoneBase, decorators: [{
|
|
2522
2539
|
type: Directive
|
|
2523
2540
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: undefined, decorators: [{
|
|
2524
2541
|
type: Inject,
|
|
@@ -2536,7 +2553,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
2536
2553
|
*/
|
|
2537
2554
|
class DropZoneInternalDirective extends DropZoneBase {
|
|
2538
2555
|
constructor(element, renderer, ngZone, uploadService) {
|
|
2539
|
-
super(element, renderer, 'k-
|
|
2556
|
+
super(element, renderer, 'k-hover');
|
|
2540
2557
|
this.ngZone = ngZone;
|
|
2541
2558
|
this.uploadService = uploadService;
|
|
2542
2559
|
this.initialClassName = true;
|
|
@@ -2580,7 +2597,7 @@ class DropZoneInternalDirective extends DropZoneBase {
|
|
|
2580
2597
|
return false;
|
|
2581
2598
|
}
|
|
2582
2599
|
onDropListener(event) {
|
|
2583
|
-
|
|
2600
|
+
const droppedFiles = event.dataTransfer.files;
|
|
2584
2601
|
if (droppedFiles.length > 0 && !this.disabled) {
|
|
2585
2602
|
let files = getAllFileInfo(droppedFiles);
|
|
2586
2603
|
files = assignGuidToFiles(files, !this.uploadService.async.batch);
|
|
@@ -2594,9 +2611,9 @@ class DropZoneInternalDirective extends DropZoneBase {
|
|
|
2594
2611
|
return false;
|
|
2595
2612
|
}
|
|
2596
2613
|
}
|
|
2597
|
-
DropZoneInternalDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2598
|
-
DropZoneInternalDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
2599
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2614
|
+
DropZoneInternalDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DropZoneInternalDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: UploadService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2615
|
+
DropZoneInternalDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: DropZoneInternalDirective, selector: "\n [kendoUploadInternalDropZone],\n [kendoFileSelectInternalDropZone]\n ", inputs: { disabled: "disabled", multiple: "multiple", restrictions: "restrictions" }, host: { listeners: { "drop": "onDropListener($event)" }, properties: { "class.k-dropzone": "this.initialClassName", "class.k-upload-dropzone": "this.initialClassName" } }, usesInheritance: true, ngImport: i0 });
|
|
2616
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DropZoneInternalDirective, decorators: [{
|
|
2600
2617
|
type: Directive,
|
|
2601
2618
|
args: [{
|
|
2602
2619
|
selector: `
|
|
@@ -2613,6 +2630,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
2613
2630
|
}], initialClassName: [{
|
|
2614
2631
|
type: HostBinding,
|
|
2615
2632
|
args: ['class.k-dropzone']
|
|
2633
|
+
}, {
|
|
2634
|
+
type: HostBinding,
|
|
2635
|
+
args: ['class.k-upload-dropzone']
|
|
2616
2636
|
}], onDropListener: [{
|
|
2617
2637
|
type: HostListener,
|
|
2618
2638
|
args: ['drop', ['$event']]
|
|
@@ -2668,9 +2688,9 @@ class FileSelectDirective {
|
|
|
2668
2688
|
});
|
|
2669
2689
|
}
|
|
2670
2690
|
}
|
|
2671
|
-
FileSelectDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2672
|
-
FileSelectDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
2673
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2691
|
+
FileSelectDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileSelectDirective, deps: [{ token: UploadService }, { token: NavigationService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2692
|
+
FileSelectDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: FileSelectDirective, selector: "[kendoFileSelect]", inputs: { dir: "dir", disabled: "disabled", multiple: "multiple", restrictions: "restrictions" }, host: { listeners: { "change": "onInputChange($event)" }, properties: { "attr.type": "this.type", "attr.autocomplete": "this.autocomplete", "attr.tabindex": "this.tabIndex", "attr.name": "this.nameAttribute", "attr.multiple": "this.multipleAttribute", "attr.dir": "this.dirAttribute", "attr.disabled": "this.disabledAttribute" } }, ngImport: i0 });
|
|
2693
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileSelectDirective, decorators: [{
|
|
2674
2694
|
type: Directive,
|
|
2675
2695
|
args: [{
|
|
2676
2696
|
selector: '[kendoFileSelect]'
|
|
@@ -2717,6 +2737,7 @@ const FILESELECT_VALUE_ACCESSOR = {
|
|
|
2717
2737
|
provide: NG_VALUE_ACCESSOR,
|
|
2718
2738
|
useExisting: forwardRef(() => FileSelectComponent)
|
|
2719
2739
|
};
|
|
2740
|
+
let idx$1 = 0;
|
|
2720
2741
|
class FileSelectComponent {
|
|
2721
2742
|
constructor(uploadService, localization, navigation, dropZoneService, ngZone, renderer, cdr, wrapper) {
|
|
2722
2743
|
this.uploadService = uploadService;
|
|
@@ -2807,7 +2828,7 @@ class FileSelectComponent {
|
|
|
2807
2828
|
* Sets the restrictions for selected files.
|
|
2808
2829
|
*/
|
|
2809
2830
|
set restrictions(restrictions) {
|
|
2810
|
-
|
|
2831
|
+
const parsedRestrictions = Object.assign({}, this._restrictions, restrictions);
|
|
2811
2832
|
this._restrictions = parsedRestrictions;
|
|
2812
2833
|
}
|
|
2813
2834
|
get restrictions() {
|
|
@@ -2824,6 +2845,23 @@ class FileSelectComponent {
|
|
|
2824
2845
|
if (this.zoneId) {
|
|
2825
2846
|
this.dropZoneService.addComponent(this, this.zoneId);
|
|
2826
2847
|
}
|
|
2848
|
+
this.subs.add(this.renderer.listen(this.fileSelectInput.nativeElement, 'mouseenter', () => {
|
|
2849
|
+
this.renderer.addClass(this.fileSelectButton.nativeElement, 'k-hover');
|
|
2850
|
+
}));
|
|
2851
|
+
this.subs.add(this.renderer.listen(this.fileSelectInput.nativeElement, 'mouseleave', () => {
|
|
2852
|
+
this.renderer.removeClass(this.fileSelectButton.nativeElement, 'k-hover');
|
|
2853
|
+
}));
|
|
2854
|
+
this.ngZone.runOutsideAngular(() => {
|
|
2855
|
+
this.subs.add(this.renderer.listen(this.wrapper, 'keydown', event => this.handleKeydown(event)));
|
|
2856
|
+
});
|
|
2857
|
+
}
|
|
2858
|
+
ngAfterViewInit() {
|
|
2859
|
+
const { buttonId, inputId } = this.getIds();
|
|
2860
|
+
const button = this.fileSelectButton.nativeElement;
|
|
2861
|
+
const input = this.fileSelectInput.nativeElement;
|
|
2862
|
+
this.renderer.setAttribute(button, 'id', buttonId);
|
|
2863
|
+
this.renderer.setAttribute(button, 'aria-controls', inputId);
|
|
2864
|
+
this.renderer.setAttribute(input, 'id', inputId);
|
|
2827
2865
|
}
|
|
2828
2866
|
/**
|
|
2829
2867
|
* @hidden
|
|
@@ -2857,24 +2895,6 @@ class FileSelectComponent {
|
|
|
2857
2895
|
this.subs.unsubscribe();
|
|
2858
2896
|
}
|
|
2859
2897
|
}
|
|
2860
|
-
/**
|
|
2861
|
-
* @hidden
|
|
2862
|
-
*/
|
|
2863
|
-
handleKeydown(event) {
|
|
2864
|
-
if (this.disabled) {
|
|
2865
|
-
return;
|
|
2866
|
-
}
|
|
2867
|
-
if ((event.keyCode === Keys.Enter || event.keyCode === Keys.Space) &&
|
|
2868
|
-
event.target === this.fileSelectButton.nativeElement) {
|
|
2869
|
-
event.preventDefault();
|
|
2870
|
-
this.fileSelect.nativeElement.click();
|
|
2871
|
-
return;
|
|
2872
|
-
}
|
|
2873
|
-
if (hasClasses(event.target, UPLOAD_CLASSES) ||
|
|
2874
|
-
(!isFocusable(event.target) && !hasClasses(event.target, IGNORE_TARGET_CLASSES))) {
|
|
2875
|
-
this.navigation.process(event);
|
|
2876
|
-
}
|
|
2877
|
-
}
|
|
2878
2898
|
/**
|
|
2879
2899
|
* @hidden
|
|
2880
2900
|
*/
|
|
@@ -2945,6 +2965,16 @@ class FileSelectComponent {
|
|
|
2945
2965
|
get selectButtonTabIndex() {
|
|
2946
2966
|
return this.disabled ? undefined : this.tabindex;
|
|
2947
2967
|
}
|
|
2968
|
+
/**
|
|
2969
|
+
* @hidden
|
|
2970
|
+
*/
|
|
2971
|
+
getIds() {
|
|
2972
|
+
const id = ++idx$1;
|
|
2973
|
+
const buttonId = `k-fileselect-button-${id}`;
|
|
2974
|
+
const inputId = `k-fileselect-input-${id}`;
|
|
2975
|
+
return { buttonId, inputId };
|
|
2976
|
+
}
|
|
2977
|
+
;
|
|
2948
2978
|
/**
|
|
2949
2979
|
* @hidden
|
|
2950
2980
|
*/
|
|
@@ -2987,6 +3017,21 @@ class FileSelectComponent {
|
|
|
2987
3017
|
this.fileSelectButton.nativeElement.focus();
|
|
2988
3018
|
});
|
|
2989
3019
|
}
|
|
3020
|
+
handleKeydown(event) {
|
|
3021
|
+
if (this.disabled) {
|
|
3022
|
+
return;
|
|
3023
|
+
}
|
|
3024
|
+
if ((event.keyCode === Keys.Enter || event.keyCode === Keys.Space) &&
|
|
3025
|
+
event.target === this.fileSelectButton.nativeElement) {
|
|
3026
|
+
event.preventDefault();
|
|
3027
|
+
this.fileSelectInput.nativeElement.click();
|
|
3028
|
+
return;
|
|
3029
|
+
}
|
|
3030
|
+
if (hasClasses(event.target, UPLOAD_CLASSES) ||
|
|
3031
|
+
(!isFocusable(event.target) && !hasClasses(event.target, IGNORE_TARGET_CLASSES))) {
|
|
3032
|
+
this.navigation.process(event);
|
|
3033
|
+
}
|
|
3034
|
+
}
|
|
2990
3035
|
attachEventHandlers() {
|
|
2991
3036
|
this.subs = this.uploadService.changeEvent.subscribe((files) => {
|
|
2992
3037
|
let model = [];
|
|
@@ -3018,8 +3063,8 @@ class FileSelectComponent {
|
|
|
3018
3063
|
this.uploadService.component = 'FileSelect';
|
|
3019
3064
|
}
|
|
3020
3065
|
}
|
|
3021
|
-
FileSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3022
|
-
FileSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "
|
|
3066
|
+
FileSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileSelectComponent, deps: [{ token: UploadService }, { token: i1$1.LocalizationService }, { token: NavigationService }, { token: DropZoneService }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3067
|
+
FileSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: FileSelectComponent, selector: "kendo-fileselect", inputs: { accept: "accept", disabled: "disabled", multiple: "multiple", name: "name", showFileList: "showFileList", tabindex: "tabindex", restrictions: "restrictions", zoneId: "zoneId", focusableId: "focusableId" }, outputs: { onBlur: "blur", onFocus: "focus", select: "select", remove: "remove", valueChange: "valueChange" }, host: { properties: { "class.k-upload": "this.hostDefaultClasses", "class.k-disabled": "this.hostDisabledClass", "attr.dir": "this.dir" } }, providers: [
|
|
3023
3068
|
LocalizationService,
|
|
3024
3069
|
NavigationService,
|
|
3025
3070
|
UploadService,
|
|
@@ -3033,7 +3078,7 @@ FileSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
3033
3078
|
provide: KendoInput,
|
|
3034
3079
|
useExisting: forwardRef(() => FileSelectComponent)
|
|
3035
3080
|
}
|
|
3036
|
-
], queries: [{ propertyName: "fileTemplate", first: true, predicate: FileTemplateDirective, descendants: true }, { propertyName: "fileInfoTemplate", first: true, predicate: FileInfoTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "
|
|
3081
|
+
], queries: [{ propertyName: "fileTemplate", first: true, predicate: FileTemplateDirective, descendants: true }, { propertyName: "fileInfoTemplate", first: true, predicate: FileInfoTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "fileSelectInput", first: true, predicate: ["fileSelectInput"], descendants: true, static: true }, { propertyName: "fileSelectButton", first: true, predicate: ["fileSelectButton"], descendants: true, read: ElementRef, static: true }], exportAs: ["kendoFileSelect"], ngImport: i0, template: `
|
|
3037
3082
|
<ng-container kendoFileSelectLocalizedMessages
|
|
3038
3083
|
i18n-dropFilesHere="kendo.fileselect.dropFilesHere|The drop zone hint"
|
|
3039
3084
|
dropFilesHere="Drop files here to select"
|
|
@@ -3058,21 +3103,31 @@ FileSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
3058
3103
|
[restrictions]="restrictions"
|
|
3059
3104
|
[multiple]="multiple"
|
|
3060
3105
|
[disabled]="disabled">
|
|
3061
|
-
<div
|
|
3106
|
+
<div class="k-upload-button-wrap">
|
|
3107
|
+
<button
|
|
3108
|
+
kendoButton
|
|
3109
|
+
#fileSelectButton
|
|
3110
|
+
class="k-upload-button"
|
|
3111
|
+
role="button"
|
|
3062
3112
|
[id]="focusableId"
|
|
3063
3113
|
[attr.aria-label]="textFor('select')"
|
|
3064
3114
|
[attr.tabindex]="selectButtonTabIndex"
|
|
3065
3115
|
(focus)="onFileSelectButtonFocus($event)"
|
|
3066
3116
|
(blur)="onFileSelectButtonBlur($event)"
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3117
|
+
>
|
|
3118
|
+
{{textFor('select')}}
|
|
3119
|
+
</button>
|
|
3120
|
+
<input
|
|
3121
|
+
#fileSelectInput
|
|
3122
|
+
kendoFileSelect
|
|
3123
|
+
[attr.accept]="accept ? accept : null"
|
|
3124
|
+
[attr.aria-hidden]="true"
|
|
3125
|
+
[dir]="direction"
|
|
3126
|
+
[restrictions]="restrictions"
|
|
3127
|
+
[multiple]="multiple"
|
|
3128
|
+
[disabled]="disabled"
|
|
3129
|
+
/>
|
|
3130
|
+
</div>
|
|
3076
3131
|
<div class="k-dropzone-hint">{{textFor('dropFilesHere')}}</div>
|
|
3077
3132
|
</div>
|
|
3078
3133
|
<ul kendo-upload-file-list
|
|
@@ -3083,8 +3138,8 @@ FileSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
3083
3138
|
[fileTemplate]="fileTemplate"
|
|
3084
3139
|
[fileInfoTemplate]="fileInfoTemplate">
|
|
3085
3140
|
</ul>
|
|
3086
|
-
`, isInline: true, components: [{ type: FileListComponent, selector: "[kendo-upload-file-list]", inputs: ["disabled", "fileList", "fileTemplate", "fileInfoTemplate"] }], directives: [{ type: LocalizedMessagesDirective, selector: "\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n " }, { type: DropZoneInternalDirective, selector: "\n [kendoUploadInternalDropZone],\n [kendoFileSelectInternalDropZone]\n ", inputs: ["disabled", "multiple", "restrictions"] }, { type: FileSelectDirective, selector: "[kendoFileSelect]", inputs: ["dir", "disabled", "multiple", "restrictions"] }, { type:
|
|
3087
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3141
|
+
`, isInline: true, components: [{ type: i6.Button, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: FileListComponent, selector: "[kendo-upload-file-list]", inputs: ["disabled", "fileList", "fileTemplate", "fileInfoTemplate"] }], directives: [{ type: LocalizedMessagesDirective, selector: "\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n " }, { type: DropZoneInternalDirective, selector: "\n [kendoUploadInternalDropZone],\n [kendoFileSelectInternalDropZone]\n ", inputs: ["disabled", "multiple", "restrictions"] }, { type: FileSelectDirective, selector: "[kendoFileSelect]", inputs: ["dir", "disabled", "multiple", "restrictions"] }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
3142
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileSelectComponent, decorators: [{
|
|
3088
3143
|
type: Component,
|
|
3089
3144
|
args: [{
|
|
3090
3145
|
exportAs: 'kendoFileSelect',
|
|
@@ -3129,21 +3184,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
3129
3184
|
[restrictions]="restrictions"
|
|
3130
3185
|
[multiple]="multiple"
|
|
3131
3186
|
[disabled]="disabled">
|
|
3132
|
-
<div
|
|
3187
|
+
<div class="k-upload-button-wrap">
|
|
3188
|
+
<button
|
|
3189
|
+
kendoButton
|
|
3190
|
+
#fileSelectButton
|
|
3191
|
+
class="k-upload-button"
|
|
3192
|
+
role="button"
|
|
3133
3193
|
[id]="focusableId"
|
|
3134
3194
|
[attr.aria-label]="textFor('select')"
|
|
3135
3195
|
[attr.tabindex]="selectButtonTabIndex"
|
|
3136
3196
|
(focus)="onFileSelectButtonFocus($event)"
|
|
3137
3197
|
(blur)="onFileSelectButtonBlur($event)"
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3198
|
+
>
|
|
3199
|
+
{{textFor('select')}}
|
|
3200
|
+
</button>
|
|
3201
|
+
<input
|
|
3202
|
+
#fileSelectInput
|
|
3203
|
+
kendoFileSelect
|
|
3204
|
+
[attr.accept]="accept ? accept : null"
|
|
3205
|
+
[attr.aria-hidden]="true"
|
|
3206
|
+
[dir]="direction"
|
|
3207
|
+
[restrictions]="restrictions"
|
|
3208
|
+
[multiple]="multiple"
|
|
3209
|
+
[disabled]="disabled"
|
|
3210
|
+
/>
|
|
3211
|
+
</div>
|
|
3147
3212
|
<div class="k-dropzone-hint">{{textFor('dropFilesHere')}}</div>
|
|
3148
3213
|
</div>
|
|
3149
3214
|
<ul kendo-upload-file-list
|
|
@@ -3180,12 +3245,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
3180
3245
|
}], fileInfoTemplate: [{
|
|
3181
3246
|
type: ContentChild,
|
|
3182
3247
|
args: [FileInfoTemplateDirective, { static: false }]
|
|
3183
|
-
}],
|
|
3248
|
+
}], fileSelectInput: [{
|
|
3184
3249
|
type: ViewChild,
|
|
3185
|
-
args: ['
|
|
3250
|
+
args: ['fileSelectInput', { static: true }]
|
|
3186
3251
|
}], fileSelectButton: [{
|
|
3187
3252
|
type: ViewChild,
|
|
3188
|
-
args: ['fileSelectButton', { static: true }]
|
|
3253
|
+
args: ['fileSelectButton', { static: true, read: ElementRef }]
|
|
3189
3254
|
}], onBlur: [{
|
|
3190
3255
|
type: Output,
|
|
3191
3256
|
args: ['blur']
|
|
@@ -3199,9 +3264,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
3199
3264
|
}], valueChange: [{
|
|
3200
3265
|
type: Output
|
|
3201
3266
|
}], hostDefaultClasses: [{
|
|
3202
|
-
type: HostBinding,
|
|
3203
|
-
args: ['class.k-widget']
|
|
3204
|
-
}, {
|
|
3205
3267
|
type: HostBinding,
|
|
3206
3268
|
args: ['class.k-upload']
|
|
3207
3269
|
}], hostDisabledClass: [{
|
|
@@ -3210,9 +3272,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
3210
3272
|
}], dir: [{
|
|
3211
3273
|
type: HostBinding,
|
|
3212
3274
|
args: ['attr.dir']
|
|
3213
|
-
}], handleKeydown: [{
|
|
3214
|
-
type: HostListener,
|
|
3215
|
-
args: ['keydown', ['$event']]
|
|
3216
3275
|
}] } });
|
|
3217
3276
|
|
|
3218
3277
|
/**
|
|
@@ -3237,14 +3296,14 @@ class CustomMessagesComponent extends Messages {
|
|
|
3237
3296
|
return true;
|
|
3238
3297
|
}
|
|
3239
3298
|
}
|
|
3240
|
-
CustomMessagesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3241
|
-
CustomMessagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "
|
|
3299
|
+
CustomMessagesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CustomMessagesComponent, deps: [{ token: i1$1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3300
|
+
CustomMessagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: CustomMessagesComponent, selector: "kendo-upload-messages, kendo-fileselect-messages, kendo-uploaddropzone-messages", providers: [
|
|
3242
3301
|
{
|
|
3243
3302
|
provide: Messages,
|
|
3244
3303
|
useExisting: forwardRef(() => CustomMessagesComponent)
|
|
3245
3304
|
}
|
|
3246
3305
|
], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
|
|
3247
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3306
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CustomMessagesComponent, decorators: [{
|
|
3248
3307
|
type: Component,
|
|
3249
3308
|
args: [{
|
|
3250
3309
|
providers: [
|
|
@@ -3278,8 +3337,8 @@ class UploadStatusTotalComponent {
|
|
|
3278
3337
|
}
|
|
3279
3338
|
}
|
|
3280
3339
|
}
|
|
3281
|
-
UploadStatusTotalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3282
|
-
UploadStatusTotalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "
|
|
3340
|
+
UploadStatusTotalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: UploadStatusTotalComponent, deps: [{ token: i1$1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3341
|
+
UploadStatusTotalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: UploadStatusTotalComponent, selector: "kendo-upload-status-total", inputs: { fileList: "fileList" }, ngImport: i0, template: `
|
|
3283
3342
|
<span class="k-icon"
|
|
3284
3343
|
[ngClass]="{
|
|
3285
3344
|
'k-i-checkmark': !this.isUploading && !this.isFailed,
|
|
@@ -3289,8 +3348,8 @@ UploadStatusTotalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0
|
|
|
3289
3348
|
}">
|
|
3290
3349
|
</span>
|
|
3291
3350
|
{{statusText}}
|
|
3292
|
-
`, isInline: true, directives: [{ type:
|
|
3293
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3351
|
+
`, isInline: true, directives: [{ type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
3352
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: UploadStatusTotalComponent, decorators: [{
|
|
3294
3353
|
type: Component,
|
|
3295
3354
|
args: [{
|
|
3296
3355
|
selector: 'kendo-upload-status-total',
|
|
@@ -3381,8 +3440,8 @@ class UploadActionButtonsComponent {
|
|
|
3381
3440
|
return this.localization.get(key);
|
|
3382
3441
|
}
|
|
3383
3442
|
}
|
|
3384
|
-
UploadActionButtonsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3385
|
-
UploadActionButtonsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "
|
|
3443
|
+
UploadActionButtonsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: UploadActionButtonsComponent, deps: [{ token: UploadService }, { token: i1$1.LocalizationService }, { token: NavigationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3444
|
+
UploadActionButtonsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: UploadActionButtonsComponent, 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: `
|
|
3386
3445
|
<button #clearButton type="button" class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-clear-selected"
|
|
3387
3446
|
[attr.tabIndex]="-1"
|
|
3388
3447
|
(click)="onClearButtonClick($event)">
|
|
@@ -3394,7 +3453,7 @@ UploadActionButtonsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12
|
|
|
3394
3453
|
{{textFor('uploadSelectedFiles')}}
|
|
3395
3454
|
</button>
|
|
3396
3455
|
`, isInline: true });
|
|
3397
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3456
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: UploadActionButtonsComponent, decorators: [{
|
|
3398
3457
|
type: Component,
|
|
3399
3458
|
args: [{
|
|
3400
3459
|
selector: 'kendo-upload-action-buttons',
|
|
@@ -3438,6 +3497,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
3438
3497
|
args: ['class.k-actions-center']
|
|
3439
3498
|
}] } });
|
|
3440
3499
|
|
|
3500
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
3441
3501
|
/**
|
|
3442
3502
|
* @hidden
|
|
3443
3503
|
*/
|
|
@@ -3446,16 +3506,17 @@ const UPLOAD_VALUE_ACCESSOR = {
|
|
|
3446
3506
|
provide: NG_VALUE_ACCESSOR,
|
|
3447
3507
|
useExisting: forwardRef(() => UploadComponent)
|
|
3448
3508
|
};
|
|
3509
|
+
let idx = 0;
|
|
3449
3510
|
/**
|
|
3450
3511
|
* Represents the [Kendo UI Upload component for Angular]({% slug overview_upload %}).
|
|
3451
3512
|
*/
|
|
3452
3513
|
class UploadComponent {
|
|
3453
|
-
constructor(uploadService, localization, navigation, dropZoneService,
|
|
3514
|
+
constructor(uploadService, localization, navigation, dropZoneService, zone, renderer, cdr, wrapper) {
|
|
3454
3515
|
this.uploadService = uploadService;
|
|
3455
3516
|
this.localization = localization;
|
|
3456
3517
|
this.navigation = navigation;
|
|
3457
3518
|
this.dropZoneService = dropZoneService;
|
|
3458
|
-
this.
|
|
3519
|
+
this.zone = zone;
|
|
3459
3520
|
this.renderer = renderer;
|
|
3460
3521
|
this.cdr = cdr;
|
|
3461
3522
|
/**
|
|
@@ -3720,7 +3781,7 @@ class UploadComponent {
|
|
|
3720
3781
|
* Sets the restrictions for selected files ([see example]({% slug api_upload_filerestrictions %})).
|
|
3721
3782
|
*/
|
|
3722
3783
|
set restrictions(restrictions) {
|
|
3723
|
-
|
|
3784
|
+
const parsedRestrictions = Object.assign({}, this._restrictions, restrictions);
|
|
3724
3785
|
this._restrictions = parsedRestrictions;
|
|
3725
3786
|
}
|
|
3726
3787
|
get restrictions() {
|
|
@@ -3739,6 +3800,25 @@ class UploadComponent {
|
|
|
3739
3800
|
if (this.zoneId) {
|
|
3740
3801
|
this.dropZoneService.addComponent(this, this.zoneId);
|
|
3741
3802
|
}
|
|
3803
|
+
const button = this.fileSelectButton.nativeElement;
|
|
3804
|
+
const input = this.fileSelectInput.nativeElement;
|
|
3805
|
+
this.subs.add(this.renderer.listen(input, 'mouseenter', () => {
|
|
3806
|
+
this.renderer.addClass(button, 'k-hover');
|
|
3807
|
+
}));
|
|
3808
|
+
this.subs.add(this.renderer.listen(input, 'mouseleave', () => {
|
|
3809
|
+
this.renderer.removeClass(button, 'k-hover');
|
|
3810
|
+
}));
|
|
3811
|
+
this.zone.runOutsideAngular(() => {
|
|
3812
|
+
this.subs.add(this.renderer.listen(this.wrapper, 'keydown', event => this.handleKeydown(event)));
|
|
3813
|
+
});
|
|
3814
|
+
}
|
|
3815
|
+
ngAfterViewInit() {
|
|
3816
|
+
const { buttonId, inputId } = this.getIds();
|
|
3817
|
+
const button = this.fileSelectButton.nativeElement;
|
|
3818
|
+
const input = this.fileSelectInput.nativeElement;
|
|
3819
|
+
this.renderer.setAttribute(button, 'id', buttonId);
|
|
3820
|
+
this.renderer.setAttribute(button, 'aria-controls', inputId);
|
|
3821
|
+
this.renderer.setAttribute(input, 'id', inputId);
|
|
3742
3822
|
}
|
|
3743
3823
|
ngOnChanges(changes) {
|
|
3744
3824
|
if (isChanged("chunkable", changes)) {
|
|
@@ -3770,24 +3850,6 @@ class UploadComponent {
|
|
|
3770
3850
|
this.subs.unsubscribe();
|
|
3771
3851
|
}
|
|
3772
3852
|
}
|
|
3773
|
-
/**
|
|
3774
|
-
* @hidden
|
|
3775
|
-
*/
|
|
3776
|
-
handleKeydown(event) {
|
|
3777
|
-
if (this.disabled) {
|
|
3778
|
-
return;
|
|
3779
|
-
}
|
|
3780
|
-
if ((event.keyCode === Keys.Enter || event.keyCode === Keys.Space) &&
|
|
3781
|
-
event.target === this.fileSelectButton.nativeElement) {
|
|
3782
|
-
event.preventDefault();
|
|
3783
|
-
this.fileSelect.nativeElement.click();
|
|
3784
|
-
return;
|
|
3785
|
-
}
|
|
3786
|
-
if (hasClasses(event.target, UPLOAD_CLASSES) ||
|
|
3787
|
-
(!isFocusable(event.target) && !hasClasses(event.target, IGNORE_TARGET_CLASSES))) {
|
|
3788
|
-
this.navigation.process(event);
|
|
3789
|
-
}
|
|
3790
|
-
}
|
|
3791
3853
|
/**
|
|
3792
3854
|
* @hidden
|
|
3793
3855
|
*/
|
|
@@ -3886,6 +3948,16 @@ class UploadComponent {
|
|
|
3886
3948
|
textFor(key) {
|
|
3887
3949
|
return this.localization.get(key);
|
|
3888
3950
|
}
|
|
3951
|
+
/**
|
|
3952
|
+
* @hidden
|
|
3953
|
+
*/
|
|
3954
|
+
getIds() {
|
|
3955
|
+
const id = ++idx;
|
|
3956
|
+
const buttonId = `k-upload-button-${id}`;
|
|
3957
|
+
const inputId = `k-upload-input-${id}`;
|
|
3958
|
+
return { buttonId, inputId };
|
|
3959
|
+
}
|
|
3960
|
+
;
|
|
3889
3961
|
/**
|
|
3890
3962
|
* Focuses the underlying input element.
|
|
3891
3963
|
*/
|
|
@@ -3996,13 +4068,13 @@ class UploadComponent {
|
|
|
3996
4068
|
if (!isDocumentAvailable()) {
|
|
3997
4069
|
return;
|
|
3998
4070
|
}
|
|
3999
|
-
this.
|
|
4071
|
+
this.zone.runOutsideAngular(() => {
|
|
4000
4072
|
this.documentClick = fromEvent(document, 'click').pipe(filter((event) => {
|
|
4001
4073
|
return !(this.wrapper !== event.target && this.wrapper.contains(event.target));
|
|
4002
4074
|
}));
|
|
4003
4075
|
this.blurSubscription = merge(this.documentClick, this.navigation.onTab).subscribe(() => {
|
|
4004
4076
|
if (this.navigation.focused) {
|
|
4005
|
-
this.
|
|
4077
|
+
this.zone.run(() => {
|
|
4006
4078
|
this.navigation.focused = false;
|
|
4007
4079
|
this.onTouchedCallback();
|
|
4008
4080
|
this.onBlur.emit();
|
|
@@ -4011,6 +4083,21 @@ class UploadComponent {
|
|
|
4011
4083
|
});
|
|
4012
4084
|
});
|
|
4013
4085
|
}
|
|
4086
|
+
handleKeydown(event) {
|
|
4087
|
+
if (this.disabled) {
|
|
4088
|
+
return;
|
|
4089
|
+
}
|
|
4090
|
+
if ((event.keyCode === Keys.Enter || event.keyCode === Keys.Space) &&
|
|
4091
|
+
event.target === this.fileSelectButton.nativeElement) {
|
|
4092
|
+
event.preventDefault();
|
|
4093
|
+
this.fileSelectInput.nativeElement.click();
|
|
4094
|
+
return;
|
|
4095
|
+
}
|
|
4096
|
+
if (hasClasses(event.target, UPLOAD_CLASSES) ||
|
|
4097
|
+
(!isFocusable(event.target) && !hasClasses(event.target, IGNORE_TARGET_CLASSES))) {
|
|
4098
|
+
this.navigation.process(event);
|
|
4099
|
+
}
|
|
4100
|
+
}
|
|
4014
4101
|
subscribeFocus() {
|
|
4015
4102
|
this.wrapperFocusSubscription = this.navigation.onWrapperFocus.subscribe(() => {
|
|
4016
4103
|
this.onFocus.emit();
|
|
@@ -4059,8 +4146,8 @@ class UploadComponent {
|
|
|
4059
4146
|
}));
|
|
4060
4147
|
}
|
|
4061
4148
|
}
|
|
4062
|
-
UploadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4063
|
-
UploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "
|
|
4149
|
+
UploadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: UploadComponent, deps: [{ token: UploadService }, { token: i1$1.LocalizationService }, { token: NavigationService }, { token: DropZoneService }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
4150
|
+
UploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: UploadComponent, selector: "kendo-upload", inputs: { autoUpload: "autoUpload", batch: "batch", withCredentials: "withCredentials", saveField: "saveField", saveHeaders: "saveHeaders", saveMethod: "saveMethod", saveUrl: "saveUrl", responseType: "responseType", removeField: "removeField", removeHeaders: "removeHeaders", removeMethod: "removeMethod", removeUrl: "removeUrl", chunkable: "chunkable", concurrent: "concurrent", multiple: "multiple", disabled: "disabled", showFileList: "showFileList", tabindex: "tabindex", zoneId: "zoneId", tabIndex: "tabIndex", accept: "accept", restrictions: "restrictions", focusableId: "focusableId", actionsLayout: "actionsLayout" }, outputs: { onBlur: "blur", cancel: "cancel", clear: "clear", complete: "complete", error: "error", onFocus: "focus", pause: "pause", remove: "remove", resume: "resume", select: "select", success: "success", upload: "upload", uploadProgress: "uploadProgress", valueChange: "valueChange" }, host: { properties: { "class.k-upload": "this.hostDefaultClasses", "class.k-disabled": "this.hostDisabledClass", "attr.dir": "this.dir" } }, providers: [
|
|
4064
4151
|
LocalizationService,
|
|
4065
4152
|
NavigationService,
|
|
4066
4153
|
UploadService,
|
|
@@ -4074,7 +4161,7 @@ UploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
|
|
|
4074
4161
|
provide: KendoInput,
|
|
4075
4162
|
useExisting: forwardRef(() => UploadComponent)
|
|
4076
4163
|
}
|
|
4077
|
-
], queries: [{ propertyName: "fileTemplate", first: true, predicate: FileTemplateDirective, descendants: true }, { propertyName: "fileInfoTemplate", first: true, predicate: FileInfoTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "
|
|
4164
|
+
], queries: [{ propertyName: "fileTemplate", first: true, predicate: FileTemplateDirective, descendants: true }, { propertyName: "fileInfoTemplate", first: true, predicate: FileInfoTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "fileSelectInput", first: true, predicate: ["fileSelectInput"], descendants: true, static: true }, { propertyName: "fileSelectButton", first: true, predicate: ["fileSelectButton"], descendants: true, read: ElementRef, static: true }], exportAs: ["kendoUpload"], usesOnChanges: true, ngImport: i0, template: `
|
|
4078
4165
|
<ng-container kendoUploadLocalizedMessages
|
|
4079
4166
|
i18n-cancel="kendo.upload.cancel|The text for the Cancel button"
|
|
4080
4167
|
cancel="Cancel"
|
|
@@ -4140,25 +4227,35 @@ UploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
|
|
|
4140
4227
|
<div kendoUploadInternalDropZone
|
|
4141
4228
|
[restrictions]="restrictions"
|
|
4142
4229
|
[multiple]="multiple"
|
|
4143
|
-
[disabled]="disabled"
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4230
|
+
[disabled]="disabled"
|
|
4231
|
+
>
|
|
4232
|
+
<div class="k-upload-button-wrap">
|
|
4233
|
+
<button
|
|
4234
|
+
kendoButton
|
|
4235
|
+
#fileSelectButton
|
|
4236
|
+
class="k-upload-button"
|
|
4237
|
+
role="button"
|
|
4238
|
+
[id]="focusableId"
|
|
4239
|
+
[attr.aria-label]="textFor('select')"
|
|
4240
|
+
[attr.tabindex]="selectButtonTabIndex"
|
|
4241
|
+
(focus)="onFileSelectButtonFocus($event)"
|
|
4242
|
+
(blur)="onFileSelectButtonBlur($event)"
|
|
4243
|
+
>
|
|
4244
|
+
{{textFor('select')}}
|
|
4245
|
+
</button>
|
|
4246
|
+
<input
|
|
4247
|
+
#fileSelectInput
|
|
4248
|
+
kendoFileSelect
|
|
4249
|
+
[attr.accept]="accept ? accept : null"
|
|
4250
|
+
[attr.aria-hidden]="true"
|
|
4251
|
+
[dir]="direction"
|
|
4252
|
+
[restrictions]="restrictions"
|
|
4253
|
+
[multiple]="multiple"
|
|
4254
|
+
[disabled]="disabled"
|
|
4255
|
+
/>
|
|
4159
4256
|
</div>
|
|
4160
4257
|
<kendo-upload-status-total *ngIf="showTotalStatus"
|
|
4161
|
-
class="k-upload-
|
|
4258
|
+
class="k-upload-actions"
|
|
4162
4259
|
[fileList]="fileList">
|
|
4163
4260
|
</kendo-upload-status-total>
|
|
4164
4261
|
<div class="k-dropzone-hint">{{textFor('dropFilesHere')}}</div>
|
|
@@ -4175,8 +4272,8 @@ UploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
|
|
|
4175
4272
|
[disabled]="disabled"
|
|
4176
4273
|
[actionsLayout]="actionsLayout">
|
|
4177
4274
|
</kendo-upload-action-buttons>
|
|
4178
|
-
`, isInline: true, components: [{ type: UploadStatusTotalComponent, selector: "kendo-upload-status-total", inputs: ["fileList"] }, { type: FileListComponent, selector: "[kendo-upload-file-list]", inputs: ["disabled", "fileList", "fileTemplate", "fileInfoTemplate"] }, { type: UploadActionButtonsComponent, selector: "kendo-upload-action-buttons", inputs: ["disabled", "actionsLayout"] }], directives: [{ type: LocalizedMessagesDirective, selector: "\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n " }, { type: DropZoneInternalDirective, selector: "\n [kendoUploadInternalDropZone],\n [kendoFileSelectInternalDropZone]\n ", inputs: ["disabled", "multiple", "restrictions"] }, { type: FileSelectDirective, selector: "[kendoFileSelect]", inputs: ["dir", "disabled", "multiple", "restrictions"] }, { type:
|
|
4179
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4275
|
+
`, isInline: true, components: [{ type: i6.Button, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: UploadStatusTotalComponent, selector: "kendo-upload-status-total", inputs: ["fileList"] }, { type: FileListComponent, selector: "[kendo-upload-file-list]", inputs: ["disabled", "fileList", "fileTemplate", "fileInfoTemplate"] }, { type: UploadActionButtonsComponent, selector: "kendo-upload-action-buttons", inputs: ["disabled", "actionsLayout"] }], directives: [{ type: LocalizedMessagesDirective, selector: "\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n " }, { type: DropZoneInternalDirective, selector: "\n [kendoUploadInternalDropZone],\n [kendoFileSelectInternalDropZone]\n ", inputs: ["disabled", "multiple", "restrictions"] }, { type: FileSelectDirective, selector: "[kendoFileSelect]", inputs: ["dir", "disabled", "multiple", "restrictions"] }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
4276
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: UploadComponent, decorators: [{
|
|
4180
4277
|
type: Component,
|
|
4181
4278
|
args: [{
|
|
4182
4279
|
exportAs: 'kendoUpload',
|
|
@@ -4262,25 +4359,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
4262
4359
|
<div kendoUploadInternalDropZone
|
|
4263
4360
|
[restrictions]="restrictions"
|
|
4264
4361
|
[multiple]="multiple"
|
|
4265
|
-
[disabled]="disabled"
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4362
|
+
[disabled]="disabled"
|
|
4363
|
+
>
|
|
4364
|
+
<div class="k-upload-button-wrap">
|
|
4365
|
+
<button
|
|
4366
|
+
kendoButton
|
|
4367
|
+
#fileSelectButton
|
|
4368
|
+
class="k-upload-button"
|
|
4369
|
+
role="button"
|
|
4370
|
+
[id]="focusableId"
|
|
4371
|
+
[attr.aria-label]="textFor('select')"
|
|
4372
|
+
[attr.tabindex]="selectButtonTabIndex"
|
|
4373
|
+
(focus)="onFileSelectButtonFocus($event)"
|
|
4374
|
+
(blur)="onFileSelectButtonBlur($event)"
|
|
4375
|
+
>
|
|
4376
|
+
{{textFor('select')}}
|
|
4377
|
+
</button>
|
|
4378
|
+
<input
|
|
4379
|
+
#fileSelectInput
|
|
4380
|
+
kendoFileSelect
|
|
4381
|
+
[attr.accept]="accept ? accept : null"
|
|
4382
|
+
[attr.aria-hidden]="true"
|
|
4383
|
+
[dir]="direction"
|
|
4384
|
+
[restrictions]="restrictions"
|
|
4385
|
+
[multiple]="multiple"
|
|
4386
|
+
[disabled]="disabled"
|
|
4387
|
+
/>
|
|
4281
4388
|
</div>
|
|
4282
4389
|
<kendo-upload-status-total *ngIf="showTotalStatus"
|
|
4283
|
-
class="k-upload-
|
|
4390
|
+
class="k-upload-actions"
|
|
4284
4391
|
[fileList]="fileList">
|
|
4285
4392
|
</kendo-upload-status-total>
|
|
4286
4393
|
<div class="k-dropzone-hint">{{textFor('dropFilesHere')}}</div>
|
|
@@ -4354,12 +4461,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
4354
4461
|
}], fileInfoTemplate: [{
|
|
4355
4462
|
type: ContentChild,
|
|
4356
4463
|
args: [FileInfoTemplateDirective, { static: false }]
|
|
4357
|
-
}],
|
|
4464
|
+
}], fileSelectInput: [{
|
|
4358
4465
|
type: ViewChild,
|
|
4359
|
-
args: ['
|
|
4466
|
+
args: ['fileSelectInput', { static: true }]
|
|
4360
4467
|
}], fileSelectButton: [{
|
|
4361
4468
|
type: ViewChild,
|
|
4362
|
-
args: ['fileSelectButton', { static: true }]
|
|
4469
|
+
args: ['fileSelectButton', { static: true, read: ElementRef }]
|
|
4363
4470
|
}], onBlur: [{
|
|
4364
4471
|
type: Output,
|
|
4365
4472
|
args: ['blur']
|
|
@@ -4391,9 +4498,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
4391
4498
|
}], valueChange: [{
|
|
4392
4499
|
type: Output
|
|
4393
4500
|
}], hostDefaultClasses: [{
|
|
4394
|
-
type: HostBinding,
|
|
4395
|
-
args: ['class.k-widget']
|
|
4396
|
-
}, {
|
|
4397
4501
|
type: HostBinding,
|
|
4398
4502
|
args: ['class.k-upload']
|
|
4399
4503
|
}], hostDisabledClass: [{
|
|
@@ -4402,9 +4506,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
4402
4506
|
}], dir: [{
|
|
4403
4507
|
type: HostBinding,
|
|
4404
4508
|
args: ['attr.dir']
|
|
4405
|
-
}], handleKeydown: [{
|
|
4406
|
-
type: HostListener,
|
|
4407
|
-
args: ['keydown', ['$event']]
|
|
4408
4509
|
}] } });
|
|
4409
4510
|
|
|
4410
4511
|
class UploadDropZoneDirective {
|
|
@@ -4432,7 +4533,7 @@ class UploadDropZoneDirective {
|
|
|
4432
4533
|
return;
|
|
4433
4534
|
}
|
|
4434
4535
|
components.forEach((component) => {
|
|
4435
|
-
|
|
4536
|
+
const droppedFiles = event.dataTransfer.files;
|
|
4436
4537
|
if (droppedFiles.length > 0 && !component.disabled) {
|
|
4437
4538
|
let files = getAllFileInfo(droppedFiles);
|
|
4438
4539
|
if (component instanceof UploadComponent) {
|
|
@@ -4458,11 +4559,11 @@ class UploadDropZoneDirective {
|
|
|
4458
4559
|
return this.dropZoneService.getComponents(this.zoneId);
|
|
4459
4560
|
}
|
|
4460
4561
|
}
|
|
4461
|
-
UploadDropZoneDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4462
|
-
UploadDropZoneDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
4562
|
+
UploadDropZoneDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: UploadDropZoneDirective, deps: [{ token: DropZoneService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
4563
|
+
UploadDropZoneDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: UploadDropZoneDirective, selector: "[kendoUploadDropZone], [kendoFileSelectDropZone]", inputs: { zoneId: ["kendoUploadDropZone", "zoneId"] }, host: { listeners: { "dragenter": "onElementDragEnter()", "dragover": "onElementDragOver()", "drop": "onDropListener($event)" } }, providers: [
|
|
4463
4564
|
DropZoneService
|
|
4464
4565
|
], ngImport: i0 });
|
|
4465
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4566
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: UploadDropZoneDirective, decorators: [{
|
|
4466
4567
|
type: Directive,
|
|
4467
4568
|
args: [{
|
|
4468
4569
|
providers: [
|
|
@@ -4523,8 +4624,8 @@ class UploadDropZoneComponent extends DropZoneBase {
|
|
|
4523
4624
|
}
|
|
4524
4625
|
}
|
|
4525
4626
|
}
|
|
4526
|
-
UploadDropZoneComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4527
|
-
UploadDropZoneComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "
|
|
4627
|
+
UploadDropZoneComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: UploadDropZoneComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i1$1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4628
|
+
UploadDropZoneComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: UploadDropZoneComponent, selector: "kendo-uploaddropzone", inputs: { zoneId: "zoneId", icon: "icon", iconClass: "iconClass" }, host: { properties: { "class.k-external-dropzone": "this.hostClass", "attr.dir": "this.dirAttribute" } }, providers: [
|
|
4528
4629
|
LocalizationService,
|
|
4529
4630
|
{
|
|
4530
4631
|
provide: L10N_PREFIX,
|
|
@@ -4543,8 +4644,8 @@ UploadDropZoneComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
|
|
|
4543
4644
|
<ng-content></ng-content>
|
|
4544
4645
|
</span>
|
|
4545
4646
|
</div>
|
|
4546
|
-
`, isInline: true, directives: [{ type: LocalizedMessagesDirective, selector: "\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n " }, { type: UploadDropZoneDirective, selector: "[kendoUploadDropZone], [kendoFileSelectDropZone]", inputs: ["kendoUploadDropZone"] }, { type:
|
|
4547
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4647
|
+
`, isInline: true, directives: [{ type: LocalizedMessagesDirective, selector: "\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n " }, { type: UploadDropZoneDirective, selector: "[kendoUploadDropZone], [kendoFileSelectDropZone]", inputs: ["kendoUploadDropZone"] }, { type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
4648
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: UploadDropZoneComponent, decorators: [{
|
|
4548
4649
|
type: Component,
|
|
4549
4650
|
args: [{
|
|
4550
4651
|
exportAs: 'kendoUploadDropZone',
|
|
@@ -4614,8 +4715,8 @@ const PUBLIC_DIRECTIVES = [
|
|
|
4614
4715
|
*/
|
|
4615
4716
|
class SharedModule {
|
|
4616
4717
|
}
|
|
4617
|
-
SharedModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4618
|
-
SharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
4718
|
+
SharedModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4719
|
+
SharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SharedModule, declarations: [FileTemplateDirective,
|
|
4619
4720
|
FileInfoTemplateDirective,
|
|
4620
4721
|
CustomMessagesComponent,
|
|
4621
4722
|
UploadDropZoneDirective,
|
|
@@ -4627,7 +4728,7 @@ SharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
|
4627
4728
|
FileListSingleItemComponent,
|
|
4628
4729
|
FileSelectDirective,
|
|
4629
4730
|
LocalizedMessagesDirective,
|
|
4630
|
-
TemplateContextDirective], imports: [CommonModule], exports: [FileTemplateDirective,
|
|
4731
|
+
TemplateContextDirective], imports: [CommonModule, ButtonsModule, ProgressBarModule], exports: [FileTemplateDirective,
|
|
4631
4732
|
FileInfoTemplateDirective,
|
|
4632
4733
|
CustomMessagesComponent,
|
|
4633
4734
|
UploadDropZoneDirective,
|
|
@@ -4639,9 +4740,11 @@ SharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
|
4639
4740
|
FileListSingleItemComponent,
|
|
4640
4741
|
FileSelectDirective,
|
|
4641
4742
|
LocalizedMessagesDirective,
|
|
4642
|
-
TemplateContextDirective, CommonModule
|
|
4643
|
-
|
|
4644
|
-
i0.ɵɵ
|
|
4743
|
+
TemplateContextDirective, CommonModule,
|
|
4744
|
+
ButtonsModule] });
|
|
4745
|
+
SharedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SharedModule, imports: [[CommonModule, ButtonsModule, ProgressBarModule], CommonModule,
|
|
4746
|
+
ButtonsModule] });
|
|
4747
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SharedModule, decorators: [{
|
|
4645
4748
|
type: NgModule,
|
|
4646
4749
|
args: [{
|
|
4647
4750
|
declarations: [
|
|
@@ -4651,9 +4754,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
4651
4754
|
exports: [
|
|
4652
4755
|
PUBLIC_DIRECTIVES,
|
|
4653
4756
|
SHARED_DECLARATIONS,
|
|
4654
|
-
CommonModule
|
|
4757
|
+
CommonModule,
|
|
4758
|
+
ButtonsModule
|
|
4655
4759
|
],
|
|
4656
|
-
imports: [CommonModule]
|
|
4760
|
+
imports: [CommonModule, ButtonsModule, ProgressBarModule]
|
|
4657
4761
|
}]
|
|
4658
4762
|
}] });
|
|
4659
4763
|
|
|
@@ -4665,10 +4769,10 @@ const FILESELECT_DECLARATIONS = [
|
|
|
4665
4769
|
*/
|
|
4666
4770
|
class FileSelectModule {
|
|
4667
4771
|
}
|
|
4668
|
-
FileSelectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4669
|
-
FileSelectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
4670
|
-
FileSelectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
4671
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4772
|
+
FileSelectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4773
|
+
FileSelectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileSelectModule, declarations: [FileSelectComponent], imports: [SharedModule], exports: [FileTemplateDirective, FileInfoTemplateDirective, CustomMessagesComponent, UploadDropZoneDirective, UploadDropZoneComponent, FileSelectComponent] });
|
|
4774
|
+
FileSelectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileSelectModule, imports: [[SharedModule]] });
|
|
4775
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileSelectModule, decorators: [{
|
|
4672
4776
|
type: NgModule,
|
|
4673
4777
|
args: [{
|
|
4674
4778
|
declarations: [FILESELECT_DECLARATIONS],
|
|
@@ -4690,14 +4794,14 @@ const UPLOAD_DECLARATIONS = [
|
|
|
4690
4794
|
*/
|
|
4691
4795
|
class UploadModule {
|
|
4692
4796
|
}
|
|
4693
|
-
UploadModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4694
|
-
UploadModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
4797
|
+
UploadModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: UploadModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4798
|
+
UploadModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: UploadModule, declarations: [UploadComponent,
|
|
4695
4799
|
UploadActionButtonsComponent,
|
|
4696
4800
|
UploadStatusTotalComponent], imports: [SharedModule], exports: [FileTemplateDirective, FileInfoTemplateDirective, CustomMessagesComponent, UploadDropZoneDirective, UploadDropZoneComponent, UploadComponent,
|
|
4697
4801
|
UploadActionButtonsComponent,
|
|
4698
4802
|
UploadStatusTotalComponent] });
|
|
4699
|
-
UploadModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
4700
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4803
|
+
UploadModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: UploadModule, imports: [[SharedModule]] });
|
|
4804
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: UploadModule, decorators: [{
|
|
4701
4805
|
type: NgModule,
|
|
4702
4806
|
args: [{
|
|
4703
4807
|
declarations: [UPLOAD_DECLARATIONS],
|
|
@@ -4736,12 +4840,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
4736
4840
|
*/
|
|
4737
4841
|
class UploadsModule {
|
|
4738
4842
|
}
|
|
4739
|
-
UploadsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4740
|
-
UploadsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
4843
|
+
UploadsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: UploadsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4844
|
+
UploadsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: UploadsModule, exports: [FileSelectModule,
|
|
4741
4845
|
UploadModule] });
|
|
4742
|
-
UploadsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
4846
|
+
UploadsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: UploadsModule, imports: [FileSelectModule,
|
|
4743
4847
|
UploadModule] });
|
|
4744
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4848
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: UploadsModule, decorators: [{
|
|
4745
4849
|
type: NgModule,
|
|
4746
4850
|
args: [{
|
|
4747
4851
|
exports: [
|
|
@@ -4755,5 +4859,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
4755
4859
|
* Generated bundle index. Do not edit.
|
|
4756
4860
|
*/
|
|
4757
4861
|
|
|
4758
|
-
export { CancelEvent, ClearEvent, CustomMessagesComponent, ErrorEvent, FileInfoTemplateDirective, FileListComponent, FileListItemActionButtonComponent, FileListItemBase, FileListMultipleItemsComponent, FileListSingleItemComponent, FileMap, FileSelectComponent, FileSelectDirective, FileSelectModule, FileState, FileTemplateDirective, NavigationService, PauseEvent, RemoveEvent, ResumeEvent, SelectEvent, SuccessEvent, TemplateContextDirective, UploadActionButtonsComponent, UploadComponent, UploadDropZoneComponent, UploadDropZoneDirective, UploadEvent, UploadModule, UploadProgressEvent, UploadService, UploadStatusTotalComponent, UploadsModule };
|
|
4862
|
+
export { CancelEvent, ClearEvent, CustomMessagesComponent, ErrorEvent, FileInfoTemplateDirective, FileListComponent, FileListItemActionButtonComponent, FileListItemBase, FileListMultipleItemsComponent, FileListSingleItemComponent, FileMap, FileSelectComponent, FileSelectDirective, FileSelectModule, FileState, FileTemplateDirective, NavigationService, PauseEvent, RemoveEvent, ResumeEvent, SelectEvent, SuccessEvent, TemplateContextDirective, UploadActionButtonsComponent, UploadComponent, UploadDropZoneComponent, UploadDropZoneDirective, UploadEvent, UploadModule, UploadProgressEvent, UploadService, UploadStatusTotalComponent, UploadsModule, validateFiles };
|
|
4759
4863
|
|