@progress/kendo-angular-upload 9.0.4-dev.202211170816 → 11.0.0-develop.100
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/LICENSE.md +1 -1
- package/NOTICE.txt +4 -4
- package/README.md +1 -1
- 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 +11 -3
- 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} +13 -10
- 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/esm2020/dropzone.component.mjs +134 -0
- 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} +7 -6
- 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/esm2020/rendering/file-list-item-action-button.component.mjs +262 -0
- 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/esm2020/rendering/file-list-multiple-items.component.mjs +186 -0
- package/esm2020/rendering/file-list-single-item.component.mjs +185 -0
- 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} +51 -22
- package/{esm2015/shared.module.js → esm2020/shared.module.mjs} +15 -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} +19 -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} +8 -7
- 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 +4997 -0
- package/{fesm2015/kendo-angular-upload.js → fesm2020/progress-kendo-angular-upload.mjs} +829 -592
- package/file-select.directive.d.ts +1 -1
- package/fileselect.component.d.ts +13 -8
- package/fileselect.module.d.ts +8 -7
- 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 +30 -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 +8 -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 +3 -1
- package/rendering/file-list-single-item.component.d.ts +3 -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 +8 -1
- package/schematics/ngAdd/index.js +8 -6
- package/shared.module.d.ts +5 -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 +22 -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 +8 -7
- 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/dropzone.component.js +0 -112
- package/esm2015/rendering/file-list-item-action-button.component.js +0 -226
- package/esm2015/rendering/file-list-multiple-items.component.js +0 -172
- package/esm2015/rendering/file-list-single-item.component.js +0 -154
- 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,20 +1,27 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2023 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
|
+
import { fileAudioIcon, fileVideoIcon, fileImageIcon, fileTxtIcon, filePresentationIcon, fileExcelIcon, fileProgrammingIcon, filePdfIcon, fileConfigIcon, fileZipIcon, fileDiscImageIcon, arrowRotateCwSmallIcon, playSmIcon, pauseSmIcon, cancelIcon, xIcon, fileIcon, copyIcon, checkIcon, exclamationCircleIcon, uploadIcon } from '@progress/kendo-svg-icons';
|
|
10
11
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
11
12
|
import * as i1$1 from '@progress/kendo-angular-l10n';
|
|
12
13
|
import { ComponentMessages, LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
13
14
|
import { fromEvent, merge } from 'rxjs';
|
|
14
15
|
import { filter } from 'rxjs/operators';
|
|
15
16
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
17
|
+
import * as i7 from '@progress/kendo-angular-buttons';
|
|
18
|
+
import { ButtonsModule } from '@progress/kendo-angular-buttons';
|
|
16
19
|
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
17
|
-
import * as
|
|
20
|
+
import * as i3 from '@progress/kendo-angular-progressbar';
|
|
21
|
+
import { ProgressBarModule } from '@progress/kendo-angular-progressbar';
|
|
22
|
+
import * as i4 from '@progress/kendo-angular-icons';
|
|
23
|
+
import { IconsModule } from '@progress/kendo-angular-icons';
|
|
24
|
+
import * as i6 from '@angular/common';
|
|
18
25
|
import { CommonModule } from '@angular/common';
|
|
19
26
|
|
|
20
27
|
/**
|
|
@@ -56,7 +63,7 @@ class FileMap {
|
|
|
56
63
|
this._files = {};
|
|
57
64
|
}
|
|
58
65
|
add(file) {
|
|
59
|
-
|
|
66
|
+
const uid = file.uid;
|
|
60
67
|
if (this.has(uid)) {
|
|
61
68
|
if (file.validationErrors && file.validationErrors.length > 0) {
|
|
62
69
|
this._files[uid].unshift(file);
|
|
@@ -76,10 +83,10 @@ class FileMap {
|
|
|
76
83
|
}
|
|
77
84
|
}
|
|
78
85
|
clear() {
|
|
79
|
-
|
|
80
|
-
for (
|
|
86
|
+
const allFiles = this._files;
|
|
87
|
+
for (const uid in allFiles) {
|
|
81
88
|
if (allFiles.hasOwnProperty(uid)) {
|
|
82
|
-
for (
|
|
89
|
+
for (const file of allFiles[uid]) {
|
|
83
90
|
if (file.httpSubscription) {
|
|
84
91
|
file.httpSubscription.unsubscribe();
|
|
85
92
|
}
|
|
@@ -96,7 +103,7 @@ class FileMap {
|
|
|
96
103
|
return this._files[uid];
|
|
97
104
|
}
|
|
98
105
|
setFilesState(files, state) {
|
|
99
|
-
for (
|
|
106
|
+
for (const file of files) {
|
|
100
107
|
this.setFilesStateByUid(file.uid, state);
|
|
101
108
|
}
|
|
102
109
|
}
|
|
@@ -109,9 +116,9 @@ class FileMap {
|
|
|
109
116
|
return Object.getOwnPropertyNames(this._files).length;
|
|
110
117
|
}
|
|
111
118
|
get files() {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
for (
|
|
119
|
+
const initial = this._files;
|
|
120
|
+
const transformed = [];
|
|
121
|
+
for (const uid in initial) {
|
|
115
122
|
if (initial.hasOwnProperty(uid)) {
|
|
116
123
|
transformed.push(initial[uid]);
|
|
117
124
|
}
|
|
@@ -119,11 +126,11 @@ class FileMap {
|
|
|
119
126
|
return transformed;
|
|
120
127
|
}
|
|
121
128
|
get filesFlat() {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
for (
|
|
129
|
+
const initial = this._files;
|
|
130
|
+
const transformed = [];
|
|
131
|
+
for (const uid in initial) {
|
|
125
132
|
if (initial.hasOwnProperty(uid)) {
|
|
126
|
-
|
|
133
|
+
const current = initial[uid];
|
|
127
134
|
current.forEach((file) => {
|
|
128
135
|
transformed.push(file);
|
|
129
136
|
});
|
|
@@ -132,13 +139,13 @@ class FileMap {
|
|
|
132
139
|
return transformed;
|
|
133
140
|
}
|
|
134
141
|
get filesToUpload() {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
for (
|
|
142
|
+
const files = this._files;
|
|
143
|
+
const notUploaded = [];
|
|
144
|
+
for (const uid in files) {
|
|
138
145
|
if (files.hasOwnProperty(uid)) {
|
|
139
|
-
|
|
146
|
+
const currentFiles = files[uid];
|
|
140
147
|
let currentFilesValid = true;
|
|
141
|
-
for (
|
|
148
|
+
for (const file of currentFiles) {
|
|
142
149
|
if (file.state !== FileState.Selected || (file.validationErrors && file.validationErrors.length > 0)) {
|
|
143
150
|
currentFilesValid = false;
|
|
144
151
|
}
|
|
@@ -151,12 +158,12 @@ class FileMap {
|
|
|
151
158
|
return notUploaded;
|
|
152
159
|
}
|
|
153
160
|
get firstFileToUpload() {
|
|
154
|
-
|
|
155
|
-
for (
|
|
161
|
+
const files = this._files;
|
|
162
|
+
for (const uid in files) {
|
|
156
163
|
if (files.hasOwnProperty(uid)) {
|
|
157
|
-
|
|
164
|
+
const currentFiles = files[uid];
|
|
158
165
|
let currentFilesValid = true;
|
|
159
|
-
for (
|
|
166
|
+
for (const file of currentFiles) {
|
|
160
167
|
if (file.state !== FileState.Selected || (file.validationErrors && file.validationErrors.length > 0)) {
|
|
161
168
|
currentFilesValid = false;
|
|
162
169
|
}
|
|
@@ -172,11 +179,11 @@ class FileMap {
|
|
|
172
179
|
return this.filesFlat.filter(file => file.state === state);
|
|
173
180
|
}
|
|
174
181
|
hasFileWithState(fileStates) {
|
|
175
|
-
|
|
176
|
-
for (
|
|
182
|
+
const files = this._files;
|
|
183
|
+
for (const uid in files) {
|
|
177
184
|
if (files.hasOwnProperty(uid)) {
|
|
178
|
-
|
|
179
|
-
for (
|
|
185
|
+
const currentFiles = files[uid];
|
|
186
|
+
for (const file of currentFiles) {
|
|
180
187
|
if (fileStates.indexOf(file.state) >= 0) {
|
|
181
188
|
return true;
|
|
182
189
|
}
|
|
@@ -632,6 +639,23 @@ const fileGroupMap = {
|
|
|
632
639
|
".dmg", ".iso", ".toast", ".vcd", ".bin", ".cue", ".mdf"
|
|
633
640
|
]
|
|
634
641
|
};
|
|
642
|
+
;
|
|
643
|
+
/**
|
|
644
|
+
* @hidden
|
|
645
|
+
*/
|
|
646
|
+
const fileSVGGroupMap = {
|
|
647
|
+
audio: fileAudioIcon,
|
|
648
|
+
video: fileVideoIcon,
|
|
649
|
+
image: fileImageIcon,
|
|
650
|
+
txt: fileTxtIcon,
|
|
651
|
+
presentation: filePresentationIcon,
|
|
652
|
+
data: fileExcelIcon,
|
|
653
|
+
programming: fileProgrammingIcon,
|
|
654
|
+
pdf: filePdfIcon,
|
|
655
|
+
config: fileConfigIcon,
|
|
656
|
+
zip: fileZipIcon,
|
|
657
|
+
discImage: fileDiscImageIcon
|
|
658
|
+
};
|
|
635
659
|
|
|
636
660
|
/* eslint-disable no-bitwise */
|
|
637
661
|
/**
|
|
@@ -659,7 +683,7 @@ const getTotalFilesSizeMessage = (files) => {
|
|
|
659
683
|
}
|
|
660
684
|
};
|
|
661
685
|
const stripPath = (name) => {
|
|
662
|
-
|
|
686
|
+
const slashIndex = name.lastIndexOf("\\");
|
|
663
687
|
return (slashIndex !== -1) ? name.substr(slashIndex + 1) : name;
|
|
664
688
|
};
|
|
665
689
|
const getFileExtension = (fileName) => {
|
|
@@ -690,7 +714,7 @@ const validateInitialFileSelectFile = (file) => {
|
|
|
690
714
|
*/
|
|
691
715
|
const getInitialFileInfo = (fakeFile) => {
|
|
692
716
|
fakeFile.extension = fakeFile.extension || getFileExtension(fakeFile.name);
|
|
693
|
-
fakeFile.name = fakeFile.name;
|
|
717
|
+
fakeFile.name = fakeFile.name; // eslint-disable-line no-self-assign
|
|
694
718
|
fakeFile.size = fakeFile.size || 0;
|
|
695
719
|
if (!fakeFile.hasOwnProperty("state")) {
|
|
696
720
|
fakeFile.state = FileState.Initial;
|
|
@@ -704,7 +728,7 @@ const getInitialFileInfo = (fakeFile) => {
|
|
|
704
728
|
* @hidden
|
|
705
729
|
*/
|
|
706
730
|
const convertFileToFileInfo = (file) => {
|
|
707
|
-
|
|
731
|
+
const fileInfo = getFileInfo(file);
|
|
708
732
|
fileInfo.uid = guid();
|
|
709
733
|
// Used to differentiate initial FileInfo objects and actual Files
|
|
710
734
|
fileInfo.state = FileState.Selected;
|
|
@@ -725,7 +749,7 @@ const getFileInfo = (rawFile) => {
|
|
|
725
749
|
* @hidden
|
|
726
750
|
*/
|
|
727
751
|
const getAllFileInfo = (rawFiles) => {
|
|
728
|
-
|
|
752
|
+
const allFileInfo = new Array();
|
|
729
753
|
let i;
|
|
730
754
|
for (i = 0; i < rawFiles.length; i++) {
|
|
731
755
|
allFileInfo.push(getFileInfo(rawFiles[i]));
|
|
@@ -745,7 +769,7 @@ const fileHasValidationErrors = (file) => {
|
|
|
745
769
|
* @hidden
|
|
746
770
|
*/
|
|
747
771
|
const filesHaveValidationErrors = (files) => {
|
|
748
|
-
for (
|
|
772
|
+
for (const file of files) {
|
|
749
773
|
if (fileHasValidationErrors(file)) {
|
|
750
774
|
return true;
|
|
751
775
|
}
|
|
@@ -761,8 +785,8 @@ const inputFiles = (input) => {
|
|
|
761
785
|
}
|
|
762
786
|
else {
|
|
763
787
|
//Required for testing
|
|
764
|
-
|
|
765
|
-
|
|
788
|
+
const fileNames = input.value.split("|").map((file, index) => {
|
|
789
|
+
const fileName = file.trim();
|
|
766
790
|
return {
|
|
767
791
|
extension: getFileExtension(fileName),
|
|
768
792
|
name: stripPath(fileName),
|
|
@@ -840,9 +864,12 @@ const isFocusable = (element, checkVisibility = true) => {
|
|
|
840
864
|
* @hidden
|
|
841
865
|
*/
|
|
842
866
|
const getFileGroupCssClass = (fileExtension) => {
|
|
843
|
-
const initial = '
|
|
844
|
-
for (
|
|
867
|
+
const initial = 'file';
|
|
868
|
+
for (const group in fileGroupMap) {
|
|
845
869
|
if (fileGroupMap[group].indexOf(fileExtension) >= 0) {
|
|
870
|
+
if (group === 'discImage') {
|
|
871
|
+
return `${initial}-disc-image`;
|
|
872
|
+
}
|
|
846
873
|
return `${initial}-${group}`;
|
|
847
874
|
}
|
|
848
875
|
}
|
|
@@ -949,17 +976,17 @@ class UploadService {
|
|
|
949
976
|
}
|
|
950
977
|
}
|
|
951
978
|
onChange() {
|
|
952
|
-
|
|
979
|
+
const files = this.fileList.filesFlat.filter((file) => {
|
|
953
980
|
return file.state === FileState.Initial ||
|
|
954
981
|
file.state === FileState.Uploaded;
|
|
955
982
|
});
|
|
956
983
|
this.changeEvent.emit(files.length > 0 ? files : null);
|
|
957
984
|
}
|
|
958
985
|
addFiles(files) {
|
|
959
|
-
|
|
986
|
+
const selectEventArgs = new SelectEvent(files);
|
|
960
987
|
this.selectEvent.emit(selectEventArgs);
|
|
961
988
|
if (!selectEventArgs.isDefaultPrevented()) {
|
|
962
|
-
for (
|
|
989
|
+
for (const file of files) {
|
|
963
990
|
this.fileList.add(file);
|
|
964
991
|
}
|
|
965
992
|
if (this.async.autoUpload) {
|
|
@@ -974,7 +1001,7 @@ class UploadService {
|
|
|
974
1001
|
addInitialFiles(initialFiles) {
|
|
975
1002
|
this.fileList.clear();
|
|
976
1003
|
initialFiles.forEach((file) => {
|
|
977
|
-
|
|
1004
|
+
const fakeFile = getInitialFileInfo(file);
|
|
978
1005
|
this.fileList.add(fakeFile);
|
|
979
1006
|
});
|
|
980
1007
|
}
|
|
@@ -996,14 +1023,14 @@ class UploadService {
|
|
|
996
1023
|
this._uploadFiles([fileToResume]);
|
|
997
1024
|
}
|
|
998
1025
|
pauseFile(uid) {
|
|
999
|
-
|
|
1026
|
+
const pausedFile = this.fileList.get(uid)[0];
|
|
1000
1027
|
this.pauseEvent.emit(new PauseEvent(pausedFile));
|
|
1001
1028
|
this.fileList.setFilesStateByUid(uid, FileState.Paused);
|
|
1002
1029
|
}
|
|
1003
1030
|
removeFiles(uid) {
|
|
1004
|
-
|
|
1031
|
+
const removedFiles = this.fileList.get(uid);
|
|
1005
1032
|
// Clone the Headers so that the default ones are not overridden
|
|
1006
|
-
|
|
1033
|
+
const removeEventArgs = new RemoveEvent(removedFiles, this.cloneRequestHeaders(this.async.removeHeaders));
|
|
1007
1034
|
this.removeEvent.emit(removeEventArgs);
|
|
1008
1035
|
if (!removeEventArgs.isDefaultPrevented()) {
|
|
1009
1036
|
if (this.component === 'Upload' &&
|
|
@@ -1021,10 +1048,10 @@ class UploadService {
|
|
|
1021
1048
|
}
|
|
1022
1049
|
}
|
|
1023
1050
|
cancelFiles(uid) {
|
|
1024
|
-
|
|
1025
|
-
|
|
1051
|
+
const canceledFiles = this.fileList.get(uid);
|
|
1052
|
+
const cancelEventArgs = new CancelEvent(canceledFiles);
|
|
1026
1053
|
this.cancelEvent.emit(cancelEventArgs);
|
|
1027
|
-
for (
|
|
1054
|
+
for (const file of canceledFiles) {
|
|
1028
1055
|
if (file.httpSubscription) {
|
|
1029
1056
|
file.httpSubscription.unsubscribe();
|
|
1030
1057
|
}
|
|
@@ -1033,10 +1060,10 @@ class UploadService {
|
|
|
1033
1060
|
this.checkAllComplete();
|
|
1034
1061
|
}
|
|
1035
1062
|
clearFiles() {
|
|
1036
|
-
|
|
1063
|
+
const clearEventArgs = new ClearEvent();
|
|
1037
1064
|
this.clearEvent.emit(clearEventArgs);
|
|
1038
1065
|
if (!clearEventArgs.isDefaultPrevented()) {
|
|
1039
|
-
|
|
1066
|
+
const triggerChange = this.fileList.hasFileWithState([
|
|
1040
1067
|
FileState.Initial,
|
|
1041
1068
|
FileState.Uploaded
|
|
1042
1069
|
]);
|
|
@@ -1059,22 +1086,22 @@ class UploadService {
|
|
|
1059
1086
|
}
|
|
1060
1087
|
}
|
|
1061
1088
|
retryFiles(uid) {
|
|
1062
|
-
|
|
1089
|
+
const filesToRetry = [this.fileList.get(uid)];
|
|
1063
1090
|
if (filesToRetry) {
|
|
1064
1091
|
this._uploadFiles(filesToRetry);
|
|
1065
1092
|
}
|
|
1066
1093
|
}
|
|
1067
1094
|
_uploadFiles(allFiles) {
|
|
1068
|
-
for (
|
|
1095
|
+
for (const filesToUpload of allFiles) {
|
|
1069
1096
|
if (filesToUpload[0].state === FileState.Paused) {
|
|
1070
1097
|
return;
|
|
1071
1098
|
}
|
|
1072
1099
|
// Clone the Headers so that the default ones are not overridden
|
|
1073
|
-
|
|
1100
|
+
const uploadEventArgs = new UploadEvent(filesToUpload, this.cloneRequestHeaders(this.async.saveHeaders));
|
|
1074
1101
|
this.uploadEvent.emit(uploadEventArgs);
|
|
1075
1102
|
if (!uploadEventArgs.isDefaultPrevented()) {
|
|
1076
1103
|
this.fileList.setFilesState(filesToUpload, FileState.Uploading);
|
|
1077
|
-
|
|
1104
|
+
const httpSubcription = this.performUpload(filesToUpload, uploadEventArgs);
|
|
1078
1105
|
filesToUpload.forEach((file) => {
|
|
1079
1106
|
file.httpSubscription = httpSubcription;
|
|
1080
1107
|
});
|
|
@@ -1086,12 +1113,12 @@ class UploadService {
|
|
|
1086
1113
|
}
|
|
1087
1114
|
performRemove(files, removeEventArgs) {
|
|
1088
1115
|
const async = this.async;
|
|
1089
|
-
|
|
1116
|
+
const fileNames = files.map((file) => {
|
|
1090
1117
|
return file.name;
|
|
1091
1118
|
});
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1119
|
+
const formData = this.populateRemoveFormData(fileNames, removeEventArgs.data);
|
|
1120
|
+
const options = this.populateRequestOptions(removeEventArgs.headers, false);
|
|
1121
|
+
const removeRequest = new HttpRequest(async.removeMethod, async.removeUrl, formData, options);
|
|
1095
1122
|
this.http.request(removeRequest)
|
|
1096
1123
|
.subscribe(success => {
|
|
1097
1124
|
this.onSuccess(success, files, "remove");
|
|
@@ -1101,10 +1128,10 @@ class UploadService {
|
|
|
1101
1128
|
}
|
|
1102
1129
|
performUpload(files, uploadEventArgs) {
|
|
1103
1130
|
const async = this.async;
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1131
|
+
const formData = this.populateUploadFormData(files, uploadEventArgs.data);
|
|
1132
|
+
const options = this.populateRequestOptions(uploadEventArgs.headers);
|
|
1133
|
+
const uploadRequest = new HttpRequest(async.saveMethod, async.saveUrl, formData, options);
|
|
1134
|
+
const httpSubscription = this.http.request(uploadRequest)
|
|
1108
1135
|
.subscribe(event => {
|
|
1109
1136
|
if (event.type === HttpEventType.UploadProgress && !this.async.chunk) {
|
|
1110
1137
|
this.onProgress(event, files);
|
|
@@ -1203,7 +1230,7 @@ class UploadService {
|
|
|
1203
1230
|
return validSelectedFiles.length === 0;
|
|
1204
1231
|
}
|
|
1205
1232
|
cloneRequestHeaders(headers) {
|
|
1206
|
-
|
|
1233
|
+
const cloned = {};
|
|
1207
1234
|
if (headers) {
|
|
1208
1235
|
headers.keys().forEach((key) => {
|
|
1209
1236
|
cloned[key] = headers.get(key);
|
|
@@ -1221,29 +1248,29 @@ class UploadService {
|
|
|
1221
1248
|
}
|
|
1222
1249
|
populateUploadFormData(files, clientData) {
|
|
1223
1250
|
const saveField = this.async.saveField;
|
|
1224
|
-
|
|
1251
|
+
const data = new FormData();
|
|
1225
1252
|
this.populateClientFormData(data, clientData);
|
|
1226
1253
|
if (this.async.chunk) {
|
|
1227
1254
|
data.append(saveField, this.getNextChunk(files[0]));
|
|
1228
1255
|
data.append("metadata", this.getChunkMetadata(files[0]));
|
|
1229
1256
|
}
|
|
1230
1257
|
else {
|
|
1231
|
-
for (
|
|
1258
|
+
for (const file of files) {
|
|
1232
1259
|
data.append(saveField, file.rawFile);
|
|
1233
1260
|
}
|
|
1234
1261
|
}
|
|
1235
1262
|
return data;
|
|
1236
1263
|
}
|
|
1237
1264
|
populateRemoveFormData(fileNames, clientData) {
|
|
1238
|
-
|
|
1265
|
+
const data = new FormData();
|
|
1239
1266
|
this.populateClientFormData(data, clientData);
|
|
1240
|
-
for (
|
|
1267
|
+
for (const fileName of fileNames) {
|
|
1241
1268
|
data.append(this.async.removeField, fileName);
|
|
1242
1269
|
}
|
|
1243
1270
|
return data;
|
|
1244
1271
|
}
|
|
1245
1272
|
populateClientFormData(data, clientData) {
|
|
1246
|
-
for (
|
|
1273
|
+
for (const key in clientData) {
|
|
1247
1274
|
if (clientData.hasOwnProperty(key)) {
|
|
1248
1275
|
data.append(key, clientData[key]);
|
|
1249
1276
|
}
|
|
@@ -1294,9 +1321,9 @@ class UploadService {
|
|
|
1294
1321
|
return false;
|
|
1295
1322
|
}
|
|
1296
1323
|
}
|
|
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: "
|
|
1324
|
+
UploadService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: UploadService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1325
|
+
UploadService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: UploadService });
|
|
1326
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: UploadService, decorators: [{
|
|
1300
1327
|
type: Injectable
|
|
1301
1328
|
}], ctorParameters: function () { return [{ type: i1.HttpClient }]; } });
|
|
1302
1329
|
|
|
@@ -1304,8 +1331,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1304
1331
|
* @hidden
|
|
1305
1332
|
*/
|
|
1306
1333
|
class NavigationService {
|
|
1307
|
-
constructor(uploadService) {
|
|
1334
|
+
constructor(uploadService, zone) {
|
|
1308
1335
|
this.uploadService = uploadService;
|
|
1336
|
+
this.zone = zone;
|
|
1309
1337
|
this.onActionButtonAction = new EventEmitter();
|
|
1310
1338
|
this.onActionButtonFocus = new EventEmitter();
|
|
1311
1339
|
this.onFileAction = new EventEmitter();
|
|
@@ -1349,18 +1377,22 @@ class NavigationService {
|
|
|
1349
1377
|
}
|
|
1350
1378
|
handleEnter() {
|
|
1351
1379
|
if (this.lastIndex >= 0) {
|
|
1352
|
-
|
|
1353
|
-
this.
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
this.
|
|
1358
|
-
|
|
1380
|
+
this.zone.run(() => {
|
|
1381
|
+
if (this.focusedIndex <= this.lastFileIndex) {
|
|
1382
|
+
this.onFileAction.emit(Keys.Enter);
|
|
1383
|
+
return;
|
|
1384
|
+
}
|
|
1385
|
+
if (this.actionButtonsVisible && this.focusedIndex <= this.lastIndex) {
|
|
1386
|
+
this.onActionButtonAction.emit(this.focusedIndex < this.lastIndex ? "clear" : "upload");
|
|
1387
|
+
}
|
|
1388
|
+
});
|
|
1359
1389
|
}
|
|
1360
1390
|
}
|
|
1361
1391
|
handleDelete() {
|
|
1362
1392
|
if (this.focusedIndex >= 0 && this.focusedIndex <= this.lastFileIndex) {
|
|
1363
|
-
this.
|
|
1393
|
+
this.zone.run(() => {
|
|
1394
|
+
this.onFileAction.emit(Keys.Delete);
|
|
1395
|
+
});
|
|
1364
1396
|
}
|
|
1365
1397
|
}
|
|
1366
1398
|
handleEscape() {
|
|
@@ -1371,13 +1403,17 @@ class NavigationService {
|
|
|
1371
1403
|
handleLeft() {
|
|
1372
1404
|
if (this.actionButtonsVisible && this.focusedIndex === this.lastIndex) {
|
|
1373
1405
|
this.focusedIndex -= 1;
|
|
1374
|
-
this.
|
|
1406
|
+
this.zone.run(() => {
|
|
1407
|
+
this.onActionButtonFocus.emit("clear");
|
|
1408
|
+
});
|
|
1375
1409
|
}
|
|
1376
1410
|
}
|
|
1377
1411
|
handleRight() {
|
|
1378
1412
|
if (this.actionButtonsVisible && this.focusedIndex === this.lastIndex - 1) {
|
|
1379
1413
|
this.focusedIndex += 1;
|
|
1380
|
-
this.
|
|
1414
|
+
this.zone.run(() => {
|
|
1415
|
+
this.onActionButtonFocus.emit("upload");
|
|
1416
|
+
});
|
|
1381
1417
|
}
|
|
1382
1418
|
}
|
|
1383
1419
|
handleTab(shifted) {
|
|
@@ -1385,36 +1421,42 @@ class NavigationService {
|
|
|
1385
1421
|
this.focusedIndex = -1;
|
|
1386
1422
|
return;
|
|
1387
1423
|
}
|
|
1388
|
-
this.
|
|
1424
|
+
this.zone.run(() => {
|
|
1425
|
+
this.onTab.emit();
|
|
1426
|
+
});
|
|
1389
1427
|
}
|
|
1390
1428
|
handleDown() {
|
|
1391
1429
|
if (this.lastIndex >= 0 && this.focusedIndex < this.lastIndex) {
|
|
1392
|
-
|
|
1393
|
-
this.focusedIndex
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
this.focusedIndex
|
|
1399
|
-
|
|
1400
|
-
|
|
1430
|
+
this.zone.run(() => {
|
|
1431
|
+
if (this.focusedIndex < this.lastFileIndex) {
|
|
1432
|
+
this.focusedIndex += 1;
|
|
1433
|
+
this.onFileFocus.emit(this.focusedIndex);
|
|
1434
|
+
return;
|
|
1435
|
+
}
|
|
1436
|
+
if (this.actionButtonsVisible && this.focusedIndex === this.lastFileIndex) {
|
|
1437
|
+
this.focusedIndex += 1;
|
|
1438
|
+
this.onActionButtonFocus.emit("clear");
|
|
1439
|
+
}
|
|
1440
|
+
});
|
|
1401
1441
|
}
|
|
1402
1442
|
}
|
|
1403
1443
|
handleUp() {
|
|
1404
1444
|
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
|
-
|
|
1445
|
+
this.zone.run(() => {
|
|
1446
|
+
this.focusedIndex -= 1;
|
|
1447
|
+
if (this.focusedIndex === -1) {
|
|
1448
|
+
this.onSelectButtonFocus.emit();
|
|
1449
|
+
return;
|
|
1450
|
+
}
|
|
1451
|
+
if (this.focusedIndex <= this.lastFileIndex) {
|
|
1452
|
+
this.onFileFocus.emit(this.focusedIndex);
|
|
1453
|
+
return;
|
|
1454
|
+
}
|
|
1455
|
+
if (this.actionButtonsVisible && this.focusedIndex <= this.lastIndex) {
|
|
1456
|
+
this.focusedIndex = this.lastFileIndex;
|
|
1457
|
+
this.onFileFocus.emit(this.focusedIndex);
|
|
1458
|
+
}
|
|
1459
|
+
});
|
|
1418
1460
|
}
|
|
1419
1461
|
}
|
|
1420
1462
|
get focusedIndex() {
|
|
@@ -1438,11 +1480,11 @@ class NavigationService {
|
|
|
1438
1480
|
return this.actionButtonsVisible ? fileCount + 1 : fileCount - 1;
|
|
1439
1481
|
}
|
|
1440
1482
|
}
|
|
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: "
|
|
1483
|
+
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 });
|
|
1484
|
+
NavigationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NavigationService });
|
|
1485
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NavigationService, decorators: [{
|
|
1444
1486
|
type: Injectable
|
|
1445
|
-
}], ctorParameters: function () { return [{ type: UploadService }]; } });
|
|
1487
|
+
}], ctorParameters: function () { return [{ type: UploadService }, { type: i0.NgZone }]; } });
|
|
1446
1488
|
|
|
1447
1489
|
/**
|
|
1448
1490
|
* @hidden
|
|
@@ -1451,9 +1493,9 @@ const packageMetadata = {
|
|
|
1451
1493
|
name: '@progress/kendo-angular-upload',
|
|
1452
1494
|
productName: 'Kendo UI for Angular',
|
|
1453
1495
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
1454
|
-
publishDate:
|
|
1496
|
+
publishDate: 1673469251,
|
|
1455
1497
|
version: '',
|
|
1456
|
-
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license
|
|
1498
|
+
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
1457
1499
|
};
|
|
1458
1500
|
|
|
1459
1501
|
/**
|
|
@@ -1464,16 +1506,16 @@ class FileTemplateDirective {
|
|
|
1464
1506
|
this.templateRef = templateRef;
|
|
1465
1507
|
}
|
|
1466
1508
|
}
|
|
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: "
|
|
1509
|
+
FileTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1510
|
+
FileTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: FileTemplateDirective, selector: "[kendoUploadFileTemplate], [kendoFileSelectFileTemplate]", ngImport: i0 });
|
|
1511
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileTemplateDirective, decorators: [{
|
|
1470
1512
|
type: Directive,
|
|
1471
1513
|
args: [{
|
|
1472
1514
|
selector: '[kendoUploadFileTemplate], [kendoFileSelectFileTemplate]'
|
|
1473
1515
|
}]
|
|
1474
1516
|
}], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
|
|
1475
1517
|
|
|
1476
|
-
|
|
1518
|
+
const components = {};
|
|
1477
1519
|
/**
|
|
1478
1520
|
* @hidden
|
|
1479
1521
|
*/
|
|
@@ -1493,9 +1535,9 @@ class DropZoneService {
|
|
|
1493
1535
|
return id in components;
|
|
1494
1536
|
}
|
|
1495
1537
|
}
|
|
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: "
|
|
1538
|
+
DropZoneService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DropZoneService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1539
|
+
DropZoneService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DropZoneService });
|
|
1540
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DropZoneService, decorators: [{
|
|
1499
1541
|
type: Injectable
|
|
1500
1542
|
}] });
|
|
1501
1543
|
|
|
@@ -1507,9 +1549,9 @@ class FileInfoTemplateDirective {
|
|
|
1507
1549
|
this.templateRef = templateRef;
|
|
1508
1550
|
}
|
|
1509
1551
|
}
|
|
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: "
|
|
1552
|
+
FileInfoTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileInfoTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1553
|
+
FileInfoTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: FileInfoTemplateDirective, selector: "[kendoUploadFileInfoTemplate], [kendoFileSelectFileInfoTemplate]", ngImport: i0 });
|
|
1554
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileInfoTemplateDirective, decorators: [{
|
|
1513
1555
|
type: Directive,
|
|
1514
1556
|
args: [{
|
|
1515
1557
|
selector: '[kendoUploadFileInfoTemplate], [kendoFileSelectFileInfoTemplate]'
|
|
@@ -1568,9 +1610,9 @@ class FileListItemDirective {
|
|
|
1568
1610
|
}
|
|
1569
1611
|
}
|
|
1570
1612
|
}
|
|
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: "
|
|
1613
|
+
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 });
|
|
1614
|
+
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 });
|
|
1615
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileListItemDirective, decorators: [{
|
|
1574
1616
|
type: Directive,
|
|
1575
1617
|
args: [{
|
|
1576
1618
|
selector: '[kendoUploadFileListItem]'
|
|
@@ -1648,9 +1690,9 @@ class FileListItemBase {
|
|
|
1648
1690
|
return this.localization.get(key);
|
|
1649
1691
|
}
|
|
1650
1692
|
}
|
|
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: "
|
|
1693
|
+
FileListItemBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileListItemBase, deps: [{ token: UploadService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1694
|
+
FileListItemBase.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: FileListItemBase, selector: "ng-component", ngImport: i0, template: '', isInline: true });
|
|
1695
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileListItemBase, decorators: [{
|
|
1654
1696
|
type: Component,
|
|
1655
1697
|
args: [{ template: '' }]
|
|
1656
1698
|
}], ctorParameters: function () { return [{ type: UploadService }]; } });
|
|
@@ -1666,6 +1708,11 @@ class FileListItemActionButtonComponent {
|
|
|
1666
1708
|
this.actionFocused = false;
|
|
1667
1709
|
this.retryFocused = false;
|
|
1668
1710
|
this.pauseResumeFocused = false;
|
|
1711
|
+
this.retrySVGIcon = arrowRotateCwSmallIcon;
|
|
1712
|
+
this.playSVGIcon = playSmIcon;
|
|
1713
|
+
this.pauseSVGIcon = pauseSmIcon;
|
|
1714
|
+
this.cancelSVGIcon = cancelIcon;
|
|
1715
|
+
this.deleteSVGIcon = xIcon;
|
|
1669
1716
|
}
|
|
1670
1717
|
onFocus(type) {
|
|
1671
1718
|
if (type === 'action') {
|
|
@@ -1759,108 +1806,134 @@ class FileListItemActionButtonComponent {
|
|
|
1759
1806
|
return true;
|
|
1760
1807
|
}
|
|
1761
1808
|
}
|
|
1762
|
-
FileListItemActionButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1763
|
-
FileListItemActionButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "
|
|
1764
|
-
|
|
1809
|
+
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 });
|
|
1810
|
+
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: `
|
|
1811
|
+
<span class="k-upload-actions">
|
|
1765
1812
|
<span class="k-upload-pct" *ngIf="isUploading || isPaused">{{progress}}%</span>
|
|
1766
1813
|
|
|
1767
|
-
<button
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1814
|
+
<button
|
|
1815
|
+
*ngIf="isFailed"
|
|
1816
|
+
type="button"
|
|
1817
|
+
class="k-button k-icon-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-upload-action"
|
|
1818
|
+
[ngClass]="{ 'k-focus': this.retryFocused }"
|
|
1819
|
+
[attr.tabIndex]="-1"
|
|
1820
|
+
|
|
1821
|
+
(focus)="onFocus('retry')"
|
|
1822
|
+
(blur)="onBlur('retry')"
|
|
1823
|
+
(click)="onRetryClick()"
|
|
1824
|
+
>
|
|
1825
|
+
<kendo-icon-wrapper
|
|
1826
|
+
name="refresh-sm"
|
|
1827
|
+
[svgIcon]="retrySVGIcon"
|
|
1828
|
+
innerCssClass="k-retry"
|
|
1829
|
+
[attr.aria-label]="retryButtonTitle"
|
|
1830
|
+
[attr.title]="retryButtonTitle"
|
|
1831
|
+
></kendo-icon-wrapper>
|
|
1777
1832
|
</button>
|
|
1778
1833
|
|
|
1779
|
-
<button
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1834
|
+
<button
|
|
1835
|
+
*ngIf="isResumable"
|
|
1836
|
+
type="button"
|
|
1837
|
+
class="k-button k-icon-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-upload-action"
|
|
1838
|
+
[ngClass]="{ 'k-focus': this.pauseResumeFocused }"
|
|
1839
|
+
[attr.tabIndex]="-1"
|
|
1840
|
+
(focus)="onFocus('pauseResume')"
|
|
1841
|
+
(blur)="onBlur('pauseResume')"
|
|
1842
|
+
(click)="onPauseResumeClick()"
|
|
1843
|
+
>
|
|
1844
|
+
<kendo-icon-wrapper
|
|
1845
|
+
[name]="isPaused ? 'play-sm' : 'pause-sm'"
|
|
1846
|
+
[svgIcon]="isPaused ? playSVGIcon : pauseSVGIcon"
|
|
1847
|
+
[attr.aria-label]='pauseResumeButtonTitle'
|
|
1848
|
+
[attr.title]='pauseResumeButtonTitle'
|
|
1849
|
+
></kendo-icon-wrapper>
|
|
1793
1850
|
</button>
|
|
1794
1851
|
|
|
1795
|
-
<button
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
[ngClass]="{
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1852
|
+
<button
|
|
1853
|
+
*ngIf="isActionButtonVisible"
|
|
1854
|
+
class="k-button k-icon-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-upload-action"
|
|
1855
|
+
type="button"
|
|
1856
|
+
[attr.tabIndex]="-1"
|
|
1857
|
+
(focus)="onFocus('action')"
|
|
1858
|
+
(blur)="onBlur('action')"
|
|
1859
|
+
[ngClass]="{ 'k-focus': this.actionFocused }"
|
|
1860
|
+
(click)="onRemoveCancelClick($event)"
|
|
1861
|
+
>
|
|
1862
|
+
<kendo-icon-wrapper
|
|
1863
|
+
[name]="isUploading ? 'cancel' : 'x'"
|
|
1864
|
+
[svgIcon]="isUploading ? cancelSVGIcon : deleteSVGIcon"
|
|
1865
|
+
[innerCssClass]="!isUploading ? 'k-delete' : ''"
|
|
1866
|
+
[attr.aria-label]='actionButtonTitle'
|
|
1867
|
+
[attr.title]='actionButtonTitle'
|
|
1868
|
+
></kendo-icon-wrapper>
|
|
1809
1869
|
</button>
|
|
1810
|
-
|
|
1811
|
-
`, isInline: true,
|
|
1812
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1870
|
+
</span>
|
|
1871
|
+
`, isInline: true, components: [{ type: i4.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass"], exportAs: ["kendoIconWrapper"] }], directives: [{ type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
1872
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileListItemActionButtonComponent, decorators: [{
|
|
1813
1873
|
type: Component,
|
|
1814
1874
|
args: [{
|
|
1815
1875
|
selector: 'kendo-upload-file-list-item-action-button',
|
|
1816
1876
|
template: `
|
|
1817
|
-
|
|
1877
|
+
<span class="k-upload-actions">
|
|
1818
1878
|
<span class="k-upload-pct" *ngIf="isUploading || isPaused">{{progress}}%</span>
|
|
1819
1879
|
|
|
1820
|
-
<button
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1880
|
+
<button
|
|
1881
|
+
*ngIf="isFailed"
|
|
1882
|
+
type="button"
|
|
1883
|
+
class="k-button k-icon-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-upload-action"
|
|
1884
|
+
[ngClass]="{ 'k-focus': this.retryFocused }"
|
|
1885
|
+
[attr.tabIndex]="-1"
|
|
1886
|
+
|
|
1887
|
+
(focus)="onFocus('retry')"
|
|
1888
|
+
(blur)="onBlur('retry')"
|
|
1889
|
+
(click)="onRetryClick()"
|
|
1890
|
+
>
|
|
1891
|
+
<kendo-icon-wrapper
|
|
1892
|
+
name="refresh-sm"
|
|
1893
|
+
[svgIcon]="retrySVGIcon"
|
|
1894
|
+
innerCssClass="k-retry"
|
|
1895
|
+
[attr.aria-label]="retryButtonTitle"
|
|
1896
|
+
[attr.title]="retryButtonTitle"
|
|
1897
|
+
></kendo-icon-wrapper>
|
|
1830
1898
|
</button>
|
|
1831
1899
|
|
|
1832
|
-
<button
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1900
|
+
<button
|
|
1901
|
+
*ngIf="isResumable"
|
|
1902
|
+
type="button"
|
|
1903
|
+
class="k-button k-icon-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-upload-action"
|
|
1904
|
+
[ngClass]="{ 'k-focus': this.pauseResumeFocused }"
|
|
1905
|
+
[attr.tabIndex]="-1"
|
|
1906
|
+
(focus)="onFocus('pauseResume')"
|
|
1907
|
+
(blur)="onBlur('pauseResume')"
|
|
1908
|
+
(click)="onPauseResumeClick()"
|
|
1909
|
+
>
|
|
1910
|
+
<kendo-icon-wrapper
|
|
1911
|
+
[name]="isPaused ? 'play-sm' : 'pause-sm'"
|
|
1912
|
+
[svgIcon]="isPaused ? playSVGIcon : pauseSVGIcon"
|
|
1913
|
+
[attr.aria-label]='pauseResumeButtonTitle'
|
|
1914
|
+
[attr.title]='pauseResumeButtonTitle'
|
|
1915
|
+
></kendo-icon-wrapper>
|
|
1846
1916
|
</button>
|
|
1847
1917
|
|
|
1848
|
-
<button
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
[ngClass]="{
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1918
|
+
<button
|
|
1919
|
+
*ngIf="isActionButtonVisible"
|
|
1920
|
+
class="k-button k-icon-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-upload-action"
|
|
1921
|
+
type="button"
|
|
1922
|
+
[attr.tabIndex]="-1"
|
|
1923
|
+
(focus)="onFocus('action')"
|
|
1924
|
+
(blur)="onBlur('action')"
|
|
1925
|
+
[ngClass]="{ 'k-focus': this.actionFocused }"
|
|
1926
|
+
(click)="onRemoveCancelClick($event)"
|
|
1927
|
+
>
|
|
1928
|
+
<kendo-icon-wrapper
|
|
1929
|
+
[name]="isUploading ? 'cancel' : 'x'"
|
|
1930
|
+
[svgIcon]="isUploading ? cancelSVGIcon : deleteSVGIcon"
|
|
1931
|
+
[innerCssClass]="!isUploading ? 'k-delete' : ''"
|
|
1932
|
+
[attr.aria-label]='actionButtonTitle'
|
|
1933
|
+
[attr.title]='actionButtonTitle'
|
|
1934
|
+
></kendo-icon-wrapper>
|
|
1862
1935
|
</button>
|
|
1863
|
-
|
|
1936
|
+
</span>
|
|
1864
1937
|
`
|
|
1865
1938
|
}]
|
|
1866
1939
|
}], ctorParameters: function () { return [{ type: UploadService }, { type: i1$1.LocalizationService }, { type: NavigationService }]; }, propDecorators: { file: [{
|
|
@@ -1888,9 +1961,9 @@ class TemplateContextDirective {
|
|
|
1888
1961
|
}
|
|
1889
1962
|
}
|
|
1890
1963
|
}
|
|
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: "
|
|
1964
|
+
TemplateContextDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TemplateContextDirective, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1965
|
+
TemplateContextDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: TemplateContextDirective, selector: "[templateContext]", inputs: { templateContext: "templateContext" }, ngImport: i0 });
|
|
1966
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TemplateContextDirective, decorators: [{
|
|
1894
1967
|
type: Directive,
|
|
1895
1968
|
args: [{
|
|
1896
1969
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
@@ -1933,6 +2006,17 @@ class FileListSingleItemComponent extends FileListItemBase {
|
|
|
1933
2006
|
get fileGroupClass() {
|
|
1934
2007
|
return getFileGroupCssClass(this.file.extension ? this.file.extension : '');
|
|
1935
2008
|
}
|
|
2009
|
+
get fileSVGGroupIcon() {
|
|
2010
|
+
const initial = fileIcon;
|
|
2011
|
+
if (this.file.extension) {
|
|
2012
|
+
for (const group in fileGroupMap) {
|
|
2013
|
+
if (fileGroupMap[group].indexOf(this.file.extension) >= 0) {
|
|
2014
|
+
return fileSVGGroupMap[group];
|
|
2015
|
+
}
|
|
2016
|
+
}
|
|
2017
|
+
}
|
|
2018
|
+
return initial;
|
|
2019
|
+
}
|
|
1936
2020
|
get isUploadSuccessful() {
|
|
1937
2021
|
return this.file.state === FileState.Uploaded;
|
|
1938
2022
|
}
|
|
@@ -1943,40 +2027,46 @@ class FileListSingleItemComponent extends FileListItemBase {
|
|
|
1943
2027
|
return !this.isUploadFailed && !this.isUploadSuccessful;
|
|
1944
2028
|
}
|
|
1945
2029
|
}
|
|
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
|
-
|
|
2030
|
+
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 });
|
|
2031
|
+
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: `
|
|
2032
|
+
<kendo-progressbar
|
|
2033
|
+
[@progressState]="showProgress"
|
|
2034
|
+
[value]="progressComplete"
|
|
2035
|
+
[label]="{ visible: false }"
|
|
2036
|
+
>
|
|
2037
|
+
</kendo-progressbar>
|
|
2038
|
+
<span class="k-file-icon-wrapper">
|
|
2039
|
+
<kendo-icon-wrapper
|
|
2040
|
+
[name]="fileGroupClass"
|
|
2041
|
+
[svgIcon]="fileSVGGroupIcon"
|
|
2042
|
+
innerCssClass="k-file-icon"
|
|
2043
|
+
>
|
|
2044
|
+
</kendo-icon-wrapper>
|
|
2045
|
+
</span>
|
|
2046
|
+
<span class="k-file-info">
|
|
2047
|
+
<ng-container *ngIf="!fileInfoTemplate">
|
|
2048
|
+
<span class="k-file-name" [title]="file.name">{{ file.name }}</span>
|
|
2049
|
+
<span [ngClass]="{
|
|
2050
|
+
'k-file-validation-message': file.validationErrors,
|
|
2051
|
+
'k-file-size': !file.validationErrors && isNotYetUploaded,
|
|
2052
|
+
'k-file-summary': isUploadSuccessful || isUploadFailed
|
|
1963
2053
|
}"
|
|
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:
|
|
2054
|
+
>{{fileStatusText}}</span>
|
|
2055
|
+
</ng-container>
|
|
2056
|
+
<ng-template *ngIf="fileInfoTemplate"
|
|
2057
|
+
[templateContext]="{
|
|
2058
|
+
templateRef: fileInfoTemplate.templateRef,
|
|
2059
|
+
state: file.state,
|
|
2060
|
+
$implicit: [file]
|
|
2061
|
+
}">
|
|
2062
|
+
</ng-template>
|
|
2063
|
+
</span>
|
|
2064
|
+
<kendo-upload-file-list-item-action-button
|
|
2065
|
+
[file]='file'
|
|
2066
|
+
[disabled]='disabled'
|
|
2067
|
+
[progress]='progressComplete'>
|
|
2068
|
+
</kendo-upload-file-list-item-action-button>
|
|
2069
|
+
`, isInline: true, components: [{ type: i3.ProgressBarComponent, selector: "kendo-progressbar", inputs: ["label", "progressCssStyle", "progressCssClass", "emptyCssStyle", "emptyCssClass", "animation"], outputs: ["animationEnd"], exportAs: ["kendoProgressBar"] }, { type: i4.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass"], exportAs: ["kendoIconWrapper"] }, { type: FileListItemActionButtonComponent, selector: "kendo-upload-file-list-item-action-button", inputs: ["file", "disabled", "progress"] }], directives: [{ type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i7.TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }, { type: TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }], animations: [
|
|
1980
2070
|
trigger('progressState', [
|
|
1981
2071
|
state('active', style({ opacity: 1 })),
|
|
1982
2072
|
state('inactive', style({ opacity: 0 })),
|
|
@@ -1985,7 +2075,7 @@ FileListSingleItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.
|
|
|
1985
2075
|
transition('active => inactive', animate('1s 2s ease-out'))
|
|
1986
2076
|
])
|
|
1987
2077
|
] });
|
|
1988
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2078
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileListSingleItemComponent, decorators: [{
|
|
1989
2079
|
type: Component,
|
|
1990
2080
|
args: [{
|
|
1991
2081
|
animations: [
|
|
@@ -1999,37 +2089,43 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1999
2089
|
],
|
|
2000
2090
|
selector: 'kendo-upload-file-list-single-item',
|
|
2001
2091
|
template: `
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2092
|
+
<kendo-progressbar
|
|
2093
|
+
[@progressState]="showProgress"
|
|
2094
|
+
[value]="progressComplete"
|
|
2095
|
+
[label]="{ visible: false }"
|
|
2096
|
+
>
|
|
2097
|
+
</kendo-progressbar>
|
|
2098
|
+
<span class="k-file-icon-wrapper">
|
|
2099
|
+
<kendo-icon-wrapper
|
|
2100
|
+
[name]="fileGroupClass"
|
|
2101
|
+
[svgIcon]="fileSVGGroupIcon"
|
|
2102
|
+
innerCssClass="k-file-icon"
|
|
2103
|
+
>
|
|
2104
|
+
</kendo-icon-wrapper>
|
|
2105
|
+
</span>
|
|
2106
|
+
<span class="k-file-info">
|
|
2107
|
+
<ng-container *ngIf="!fileInfoTemplate">
|
|
2108
|
+
<span class="k-file-name" [title]="file.name">{{ file.name }}</span>
|
|
2109
|
+
<span [ngClass]="{
|
|
2110
|
+
'k-file-validation-message': file.validationErrors,
|
|
2111
|
+
'k-file-size': !file.validationErrors && isNotYetUploaded,
|
|
2112
|
+
'k-file-summary': isUploadSuccessful || isUploadFailed
|
|
2017
2113
|
}"
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2114
|
+
>{{fileStatusText}}</span>
|
|
2115
|
+
</ng-container>
|
|
2116
|
+
<ng-template *ngIf="fileInfoTemplate"
|
|
2117
|
+
[templateContext]="{
|
|
2118
|
+
templateRef: fileInfoTemplate.templateRef,
|
|
2119
|
+
state: file.state,
|
|
2120
|
+
$implicit: [file]
|
|
2121
|
+
}">
|
|
2122
|
+
</ng-template>
|
|
2123
|
+
</span>
|
|
2124
|
+
<kendo-upload-file-list-item-action-button
|
|
2125
|
+
[file]='file'
|
|
2126
|
+
[disabled]='disabled'
|
|
2127
|
+
[progress]='progressComplete'>
|
|
2128
|
+
</kendo-upload-file-list-item-action-button>
|
|
2033
2129
|
`
|
|
2034
2130
|
}]
|
|
2035
2131
|
}], ctorParameters: function () { return [{ type: i1$1.LocalizationService }, { type: UploadService }]; }, propDecorators: { disabled: [{
|
|
@@ -2047,6 +2143,7 @@ class FileListMultipleItemsComponent extends FileListItemBase {
|
|
|
2047
2143
|
constructor(localization, uploadService) {
|
|
2048
2144
|
super(uploadService);
|
|
2049
2145
|
this.localization = localization;
|
|
2146
|
+
this.copySVGIcon = copyIcon;
|
|
2050
2147
|
this.subscribeUploadProgress((args) => {
|
|
2051
2148
|
if (args.files[0].uid === this.files[0].uid) {
|
|
2052
2149
|
this.progressComplete = args.percentComplete;
|
|
@@ -2085,48 +2182,51 @@ class FileListMultipleItemsComponent extends FileListItemBase {
|
|
|
2085
2182
|
return this.files[0].state === FileState.Failed;
|
|
2086
2183
|
}
|
|
2087
2184
|
}
|
|
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
|
-
|
|
2185
|
+
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 });
|
|
2186
|
+
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: `
|
|
2187
|
+
<kendo-progressbar
|
|
2188
|
+
[@progressState]="showProgress"
|
|
2189
|
+
[value]="progressComplete"
|
|
2190
|
+
[label]="{ visible: false }"
|
|
2191
|
+
>
|
|
2192
|
+
</kendo-progressbar>
|
|
2193
|
+
<span class="k-file-icon-wrapper">
|
|
2194
|
+
<kendo-icon-wrapper
|
|
2195
|
+
name="copy"
|
|
2196
|
+
[svgIcon]="copySVGIcon"
|
|
2197
|
+
innerCssClass="k-file-icon"
|
|
2198
|
+
>
|
|
2199
|
+
</kendo-icon-wrapper>
|
|
2200
|
+
</span>
|
|
2201
|
+
<span class="k-multiple-files-wrapper">
|
|
2202
|
+
<ng-container *ngIf="!fileInfoTemplate">
|
|
2203
|
+
<span *ngFor="let file of files" class="k-file-info">
|
|
2204
|
+
<span [title]="file.name" class="k-file-name">
|
|
2205
|
+
{{file.name}}
|
|
2206
|
+
</span>
|
|
2207
|
+
<span [ngClass]="{
|
|
2104
2208
|
'k-file-validation-message': file.validationErrors,
|
|
2105
2209
|
'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: [
|
|
2210
|
+
}"
|
|
2211
|
+
>{{fileStatusText(file)}}</span>
|
|
2212
|
+
</span>
|
|
2213
|
+
<span class="k-file-summary"
|
|
2214
|
+
>{{batchStatusText}}</span>
|
|
2215
|
+
</ng-container>
|
|
2216
|
+
<ng-template *ngIf="fileInfoTemplate"
|
|
2217
|
+
[templateContext]="{
|
|
2218
|
+
templateRef: fileInfoTemplate.templateRef,
|
|
2219
|
+
state: files[0].state,
|
|
2220
|
+
$implicit: files
|
|
2221
|
+
}">
|
|
2222
|
+
</ng-template>
|
|
2223
|
+
</span>
|
|
2224
|
+
<kendo-upload-file-list-item-action-button
|
|
2225
|
+
[file]='files[0]'
|
|
2226
|
+
[disabled]='disabled'
|
|
2227
|
+
[progress]='progressComplete'>
|
|
2228
|
+
</kendo-upload-file-list-item-action-button>
|
|
2229
|
+
`, isInline: true, components: [{ type: i3.ProgressBarComponent, selector: "kendo-progressbar", inputs: ["label", "progressCssStyle", "progressCssClass", "emptyCssStyle", "emptyCssClass", "animation"], outputs: ["animationEnd"], exportAs: ["kendoProgressBar"] }, { type: i4.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass"], exportAs: ["kendoIconWrapper"] }, { type: FileListItemActionButtonComponent, selector: "kendo-upload-file-list-item-action-button", inputs: ["file", "disabled", "progress"] }], directives: [{ type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i7.TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }, { type: TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }], animations: [
|
|
2130
2230
|
trigger('progressState', [
|
|
2131
2231
|
state('active', style({ opacity: 1 })),
|
|
2132
2232
|
state('inactive', style({ opacity: 0 })),
|
|
@@ -2135,7 +2235,7 @@ FileListMultipleItemsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
|
2135
2235
|
transition('active => inactive', animate('1s 2s ease-out'))
|
|
2136
2236
|
])
|
|
2137
2237
|
] });
|
|
2138
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2238
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileListMultipleItemsComponent, decorators: [{
|
|
2139
2239
|
type: Component,
|
|
2140
2240
|
args: [{
|
|
2141
2241
|
animations: [
|
|
@@ -2149,45 +2249,48 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
2149
2249
|
],
|
|
2150
2250
|
selector: 'kendo-upload-file-list-multiple-items',
|
|
2151
2251
|
template: `
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2252
|
+
<kendo-progressbar
|
|
2253
|
+
[@progressState]="showProgress"
|
|
2254
|
+
[value]="progressComplete"
|
|
2255
|
+
[label]="{ visible: false }"
|
|
2256
|
+
>
|
|
2257
|
+
</kendo-progressbar>
|
|
2258
|
+
<span class="k-file-icon-wrapper">
|
|
2259
|
+
<kendo-icon-wrapper
|
|
2260
|
+
name="copy"
|
|
2261
|
+
[svgIcon]="copySVGIcon"
|
|
2262
|
+
innerCssClass="k-file-icon"
|
|
2263
|
+
>
|
|
2264
|
+
</kendo-icon-wrapper>
|
|
2265
|
+
</span>
|
|
2266
|
+
<span class="k-multiple-files-wrapper">
|
|
2267
|
+
<ng-container *ngIf="!fileInfoTemplate">
|
|
2268
|
+
<span *ngFor="let file of files" class="k-file-info">
|
|
2269
|
+
<span [title]="file.name" class="k-file-name">
|
|
2270
|
+
{{file.name}}
|
|
2271
|
+
</span>
|
|
2272
|
+
<span [ngClass]="{
|
|
2166
2273
|
'k-file-validation-message': file.validationErrors,
|
|
2167
2274
|
'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>
|
|
2275
|
+
}"
|
|
2276
|
+
>{{fileStatusText(file)}}</span>
|
|
2277
|
+
</span>
|
|
2278
|
+
<span class="k-file-summary"
|
|
2279
|
+
>{{batchStatusText}}</span>
|
|
2280
|
+
</ng-container>
|
|
2281
|
+
<ng-template *ngIf="fileInfoTemplate"
|
|
2282
|
+
[templateContext]="{
|
|
2283
|
+
templateRef: fileInfoTemplate.templateRef,
|
|
2284
|
+
state: files[0].state,
|
|
2285
|
+
$implicit: files
|
|
2286
|
+
}">
|
|
2287
|
+
</ng-template>
|
|
2288
|
+
</span>
|
|
2289
|
+
<kendo-upload-file-list-item-action-button
|
|
2290
|
+
[file]='files[0]'
|
|
2291
|
+
[disabled]='disabled'
|
|
2292
|
+
[progress]='progressComplete'>
|
|
2293
|
+
</kendo-upload-file-list-item-action-button>
|
|
2191
2294
|
`
|
|
2192
2295
|
}]
|
|
2193
2296
|
}], ctorParameters: function () { return [{ type: i1$1.LocalizationService }, { type: UploadService }]; }, propDecorators: { disabled: [{
|
|
@@ -2220,10 +2323,10 @@ class FileListComponent {
|
|
|
2220
2323
|
});
|
|
2221
2324
|
}
|
|
2222
2325
|
itemActionHandler(key) {
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2326
|
+
const index = this.navigation.focusedIndex;
|
|
2327
|
+
const item = this.fileListItems.toArray()[index];
|
|
2328
|
+
const uid = item.uidAttribute;
|
|
2329
|
+
const files = this.uploadService.files.get(uid);
|
|
2227
2330
|
if (key === Keys.Escape && files[0].state === FileState.Uploading) {
|
|
2228
2331
|
this.uploadService.cancelFiles(uid);
|
|
2229
2332
|
this.navigation.focusSelectButton();
|
|
@@ -2251,8 +2354,8 @@ class FileListComponent {
|
|
|
2251
2354
|
this.actionSubscription.unsubscribe();
|
|
2252
2355
|
}
|
|
2253
2356
|
}
|
|
2254
|
-
FileListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2255
|
-
FileListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "
|
|
2357
|
+
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 });
|
|
2358
|
+
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
2359
|
<ng-template ngFor
|
|
2257
2360
|
[ngForOf]="fileList"
|
|
2258
2361
|
let-files
|
|
@@ -2280,8 +2383,8 @@ FileListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
|
|
|
2280
2383
|
}"></ng-template>
|
|
2281
2384
|
</li>
|
|
2282
2385
|
</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: "
|
|
2386
|
+
`, 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: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: FileListItemDirective, selector: "[kendoUploadFileListItem]", inputs: ["files", "index"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7.TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }, { type: TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }] });
|
|
2387
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileListComponent, decorators: [{
|
|
2285
2388
|
type: Component,
|
|
2286
2389
|
args: [{
|
|
2287
2390
|
selector: '[kendo-upload-file-list]',
|
|
@@ -2333,9 +2436,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
2333
2436
|
*/
|
|
2334
2437
|
class Messages extends ComponentMessages {
|
|
2335
2438
|
}
|
|
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: "
|
|
2439
|
+
Messages.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: Messages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
2440
|
+
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 });
|
|
2441
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: Messages, decorators: [{
|
|
2339
2442
|
type: Directive
|
|
2340
2443
|
}], propDecorators: { cancel: [{
|
|
2341
2444
|
type: Input
|
|
@@ -2390,14 +2493,14 @@ class LocalizedMessagesDirective extends Messages {
|
|
|
2390
2493
|
this.service = service;
|
|
2391
2494
|
}
|
|
2392
2495
|
}
|
|
2393
|
-
LocalizedMessagesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2394
|
-
LocalizedMessagesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
2496
|
+
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 });
|
|
2497
|
+
LocalizedMessagesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: LocalizedMessagesDirective, selector: "\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n ", providers: [
|
|
2395
2498
|
{
|
|
2396
2499
|
provide: Messages,
|
|
2397
2500
|
useExisting: forwardRef(() => LocalizedMessagesDirective)
|
|
2398
2501
|
}
|
|
2399
2502
|
], usesInheritance: true, ngImport: i0 });
|
|
2400
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2503
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: LocalizedMessagesDirective, decorators: [{
|
|
2401
2504
|
type: Directive,
|
|
2402
2505
|
args: [{
|
|
2403
2506
|
providers: [
|
|
@@ -2452,7 +2555,7 @@ const validateFileSize = (file, minFileSize, maxFileSize) => {
|
|
|
2452
2555
|
};
|
|
2453
2556
|
const parseAllowedExtensions = (extensions) => {
|
|
2454
2557
|
const allowedExtensions = extensions.map((ext) => {
|
|
2455
|
-
|
|
2558
|
+
const parsedExt = (ext.substring(0, 1) === ".") ? ext : ("." + ext);
|
|
2456
2559
|
return parsedExt.toLowerCase();
|
|
2457
2560
|
});
|
|
2458
2561
|
return allowedExtensions;
|
|
@@ -2516,9 +2619,9 @@ class DropZoneBase {
|
|
|
2516
2619
|
this.renderer.removeClass(this.element.nativeElement, className);
|
|
2517
2620
|
}
|
|
2518
2621
|
}
|
|
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: "
|
|
2622
|
+
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 });
|
|
2623
|
+
DropZoneBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: DropZoneBase, host: { listeners: { "dragenter": "onElementDragEnterListener()", "dragover": "onElementDragOverListener()" } }, ngImport: i0 });
|
|
2624
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DropZoneBase, decorators: [{
|
|
2522
2625
|
type: Directive
|
|
2523
2626
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: undefined, decorators: [{
|
|
2524
2627
|
type: Inject,
|
|
@@ -2536,7 +2639,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
2536
2639
|
*/
|
|
2537
2640
|
class DropZoneInternalDirective extends DropZoneBase {
|
|
2538
2641
|
constructor(element, renderer, ngZone, uploadService) {
|
|
2539
|
-
super(element, renderer, 'k-
|
|
2642
|
+
super(element, renderer, 'k-hover');
|
|
2540
2643
|
this.ngZone = ngZone;
|
|
2541
2644
|
this.uploadService = uploadService;
|
|
2542
2645
|
this.initialClassName = true;
|
|
@@ -2580,7 +2683,7 @@ class DropZoneInternalDirective extends DropZoneBase {
|
|
|
2580
2683
|
return false;
|
|
2581
2684
|
}
|
|
2582
2685
|
onDropListener(event) {
|
|
2583
|
-
|
|
2686
|
+
const droppedFiles = event.dataTransfer.files;
|
|
2584
2687
|
if (droppedFiles.length > 0 && !this.disabled) {
|
|
2585
2688
|
let files = getAllFileInfo(droppedFiles);
|
|
2586
2689
|
files = assignGuidToFiles(files, !this.uploadService.async.batch);
|
|
@@ -2594,9 +2697,9 @@ class DropZoneInternalDirective extends DropZoneBase {
|
|
|
2594
2697
|
return false;
|
|
2595
2698
|
}
|
|
2596
2699
|
}
|
|
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: "
|
|
2700
|
+
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 });
|
|
2701
|
+
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 });
|
|
2702
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DropZoneInternalDirective, decorators: [{
|
|
2600
2703
|
type: Directive,
|
|
2601
2704
|
args: [{
|
|
2602
2705
|
selector: `
|
|
@@ -2613,6 +2716,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
2613
2716
|
}], initialClassName: [{
|
|
2614
2717
|
type: HostBinding,
|
|
2615
2718
|
args: ['class.k-dropzone']
|
|
2719
|
+
}, {
|
|
2720
|
+
type: HostBinding,
|
|
2721
|
+
args: ['class.k-upload-dropzone']
|
|
2616
2722
|
}], onDropListener: [{
|
|
2617
2723
|
type: HostListener,
|
|
2618
2724
|
args: ['drop', ['$event']]
|
|
@@ -2668,9 +2774,9 @@ class FileSelectDirective {
|
|
|
2668
2774
|
});
|
|
2669
2775
|
}
|
|
2670
2776
|
}
|
|
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: "
|
|
2777
|
+
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 });
|
|
2778
|
+
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 });
|
|
2779
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileSelectDirective, decorators: [{
|
|
2674
2780
|
type: Directive,
|
|
2675
2781
|
args: [{
|
|
2676
2782
|
selector: '[kendoFileSelect]'
|
|
@@ -2717,6 +2823,7 @@ const FILESELECT_VALUE_ACCESSOR = {
|
|
|
2717
2823
|
provide: NG_VALUE_ACCESSOR,
|
|
2718
2824
|
useExisting: forwardRef(() => FileSelectComponent)
|
|
2719
2825
|
};
|
|
2826
|
+
let idx$1 = 0;
|
|
2720
2827
|
class FileSelectComponent {
|
|
2721
2828
|
constructor(uploadService, localization, navigation, dropZoneService, ngZone, renderer, cdr, wrapper) {
|
|
2722
2829
|
this.uploadService = uploadService;
|
|
@@ -2807,7 +2914,7 @@ class FileSelectComponent {
|
|
|
2807
2914
|
* Sets the restrictions for selected files.
|
|
2808
2915
|
*/
|
|
2809
2916
|
set restrictions(restrictions) {
|
|
2810
|
-
|
|
2917
|
+
const parsedRestrictions = Object.assign({}, this._restrictions, restrictions);
|
|
2811
2918
|
this._restrictions = parsedRestrictions;
|
|
2812
2919
|
}
|
|
2813
2920
|
get restrictions() {
|
|
@@ -2824,6 +2931,23 @@ class FileSelectComponent {
|
|
|
2824
2931
|
if (this.zoneId) {
|
|
2825
2932
|
this.dropZoneService.addComponent(this, this.zoneId);
|
|
2826
2933
|
}
|
|
2934
|
+
this.subs.add(this.renderer.listen(this.fileSelectInput.nativeElement, 'mouseenter', () => {
|
|
2935
|
+
this.renderer.addClass(this.fileSelectButton.nativeElement, 'k-hover');
|
|
2936
|
+
}));
|
|
2937
|
+
this.subs.add(this.renderer.listen(this.fileSelectInput.nativeElement, 'mouseleave', () => {
|
|
2938
|
+
this.renderer.removeClass(this.fileSelectButton.nativeElement, 'k-hover');
|
|
2939
|
+
}));
|
|
2940
|
+
this.ngZone.runOutsideAngular(() => {
|
|
2941
|
+
this.subs.add(this.renderer.listen(this.wrapper, 'keydown', event => this.handleKeydown(event)));
|
|
2942
|
+
});
|
|
2943
|
+
}
|
|
2944
|
+
ngAfterViewInit() {
|
|
2945
|
+
const { buttonId, inputId } = this.getIds();
|
|
2946
|
+
const button = this.fileSelectButton.nativeElement;
|
|
2947
|
+
const input = this.fileSelectInput.nativeElement;
|
|
2948
|
+
this.renderer.setAttribute(button, 'id', buttonId);
|
|
2949
|
+
this.renderer.setAttribute(button, 'aria-controls', inputId);
|
|
2950
|
+
this.renderer.setAttribute(input, 'id', inputId);
|
|
2827
2951
|
}
|
|
2828
2952
|
/**
|
|
2829
2953
|
* @hidden
|
|
@@ -2857,24 +2981,6 @@ class FileSelectComponent {
|
|
|
2857
2981
|
this.subs.unsubscribe();
|
|
2858
2982
|
}
|
|
2859
2983
|
}
|
|
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
2984
|
/**
|
|
2879
2985
|
* @hidden
|
|
2880
2986
|
*/
|
|
@@ -2945,6 +3051,16 @@ class FileSelectComponent {
|
|
|
2945
3051
|
get selectButtonTabIndex() {
|
|
2946
3052
|
return this.disabled ? undefined : this.tabindex;
|
|
2947
3053
|
}
|
|
3054
|
+
/**
|
|
3055
|
+
* @hidden
|
|
3056
|
+
*/
|
|
3057
|
+
getIds() {
|
|
3058
|
+
const id = ++idx$1;
|
|
3059
|
+
const buttonId = `k-fileselect-button-${id}`;
|
|
3060
|
+
const inputId = `k-fileselect-input-${id}`;
|
|
3061
|
+
return { buttonId, inputId };
|
|
3062
|
+
}
|
|
3063
|
+
;
|
|
2948
3064
|
/**
|
|
2949
3065
|
* @hidden
|
|
2950
3066
|
*/
|
|
@@ -2987,6 +3103,21 @@ class FileSelectComponent {
|
|
|
2987
3103
|
this.fileSelectButton.nativeElement.focus();
|
|
2988
3104
|
});
|
|
2989
3105
|
}
|
|
3106
|
+
handleKeydown(event) {
|
|
3107
|
+
if (this.disabled) {
|
|
3108
|
+
return;
|
|
3109
|
+
}
|
|
3110
|
+
if ((event.keyCode === Keys.Enter || event.keyCode === Keys.Space) &&
|
|
3111
|
+
event.target === this.fileSelectButton.nativeElement) {
|
|
3112
|
+
event.preventDefault();
|
|
3113
|
+
this.fileSelectInput.nativeElement.click();
|
|
3114
|
+
return;
|
|
3115
|
+
}
|
|
3116
|
+
if (hasClasses(event.target, UPLOAD_CLASSES) ||
|
|
3117
|
+
(!isFocusable(event.target) && !hasClasses(event.target, IGNORE_TARGET_CLASSES))) {
|
|
3118
|
+
this.navigation.process(event);
|
|
3119
|
+
}
|
|
3120
|
+
}
|
|
2990
3121
|
attachEventHandlers() {
|
|
2991
3122
|
this.subs = this.uploadService.changeEvent.subscribe((files) => {
|
|
2992
3123
|
let model = [];
|
|
@@ -3018,8 +3149,8 @@ class FileSelectComponent {
|
|
|
3018
3149
|
this.uploadService.component = 'FileSelect';
|
|
3019
3150
|
}
|
|
3020
3151
|
}
|
|
3021
|
-
FileSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3022
|
-
FileSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "
|
|
3152
|
+
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 });
|
|
3153
|
+
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
3154
|
LocalizationService,
|
|
3024
3155
|
NavigationService,
|
|
3025
3156
|
UploadService,
|
|
@@ -3033,7 +3164,7 @@ FileSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
3033
3164
|
provide: KendoInput,
|
|
3034
3165
|
useExisting: forwardRef(() => FileSelectComponent)
|
|
3035
3166
|
}
|
|
3036
|
-
], queries: [{ propertyName: "fileTemplate", first: true, predicate: FileTemplateDirective, descendants: true }, { propertyName: "fileInfoTemplate", first: true, predicate: FileInfoTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "
|
|
3167
|
+
], 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
3168
|
<ng-container kendoFileSelectLocalizedMessages
|
|
3038
3169
|
i18n-dropFilesHere="kendo.fileselect.dropFilesHere|The drop zone hint"
|
|
3039
3170
|
dropFilesHere="Drop files here to select"
|
|
@@ -3058,21 +3189,31 @@ FileSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
3058
3189
|
[restrictions]="restrictions"
|
|
3059
3190
|
[multiple]="multiple"
|
|
3060
3191
|
[disabled]="disabled">
|
|
3061
|
-
<div
|
|
3192
|
+
<div class="k-upload-button-wrap">
|
|
3193
|
+
<button
|
|
3194
|
+
kendoButton
|
|
3195
|
+
#fileSelectButton
|
|
3196
|
+
class="k-upload-button"
|
|
3197
|
+
role="button"
|
|
3062
3198
|
[id]="focusableId"
|
|
3063
3199
|
[attr.aria-label]="textFor('select')"
|
|
3064
3200
|
[attr.tabindex]="selectButtonTabIndex"
|
|
3065
3201
|
(focus)="onFileSelectButtonFocus($event)"
|
|
3066
3202
|
(blur)="onFileSelectButtonBlur($event)"
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3203
|
+
>
|
|
3204
|
+
{{textFor('select')}}
|
|
3205
|
+
</button>
|
|
3206
|
+
<input
|
|
3207
|
+
#fileSelectInput
|
|
3208
|
+
kendoFileSelect
|
|
3209
|
+
[attr.accept]="accept ? accept : null"
|
|
3210
|
+
[attr.aria-hidden]="true"
|
|
3211
|
+
[dir]="direction"
|
|
3212
|
+
[restrictions]="restrictions"
|
|
3213
|
+
[multiple]="multiple"
|
|
3214
|
+
[disabled]="disabled"
|
|
3215
|
+
/>
|
|
3216
|
+
</div>
|
|
3076
3217
|
<div class="k-dropzone-hint">{{textFor('dropFilesHere')}}</div>
|
|
3077
3218
|
</div>
|
|
3078
3219
|
<ul kendo-upload-file-list
|
|
@@ -3083,8 +3224,8 @@ FileSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
3083
3224
|
[fileTemplate]="fileTemplate"
|
|
3084
3225
|
[fileInfoTemplate]="fileInfoTemplate">
|
|
3085
3226
|
</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: "
|
|
3227
|
+
`, isInline: true, components: [{ type: i7.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: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
3228
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileSelectComponent, decorators: [{
|
|
3088
3229
|
type: Component,
|
|
3089
3230
|
args: [{
|
|
3090
3231
|
exportAs: 'kendoFileSelect',
|
|
@@ -3129,21 +3270,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
3129
3270
|
[restrictions]="restrictions"
|
|
3130
3271
|
[multiple]="multiple"
|
|
3131
3272
|
[disabled]="disabled">
|
|
3132
|
-
<div
|
|
3273
|
+
<div class="k-upload-button-wrap">
|
|
3274
|
+
<button
|
|
3275
|
+
kendoButton
|
|
3276
|
+
#fileSelectButton
|
|
3277
|
+
class="k-upload-button"
|
|
3278
|
+
role="button"
|
|
3133
3279
|
[id]="focusableId"
|
|
3134
3280
|
[attr.aria-label]="textFor('select')"
|
|
3135
3281
|
[attr.tabindex]="selectButtonTabIndex"
|
|
3136
3282
|
(focus)="onFileSelectButtonFocus($event)"
|
|
3137
3283
|
(blur)="onFileSelectButtonBlur($event)"
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3284
|
+
>
|
|
3285
|
+
{{textFor('select')}}
|
|
3286
|
+
</button>
|
|
3287
|
+
<input
|
|
3288
|
+
#fileSelectInput
|
|
3289
|
+
kendoFileSelect
|
|
3290
|
+
[attr.accept]="accept ? accept : null"
|
|
3291
|
+
[attr.aria-hidden]="true"
|
|
3292
|
+
[dir]="direction"
|
|
3293
|
+
[restrictions]="restrictions"
|
|
3294
|
+
[multiple]="multiple"
|
|
3295
|
+
[disabled]="disabled"
|
|
3296
|
+
/>
|
|
3297
|
+
</div>
|
|
3147
3298
|
<div class="k-dropzone-hint">{{textFor('dropFilesHere')}}</div>
|
|
3148
3299
|
</div>
|
|
3149
3300
|
<ul kendo-upload-file-list
|
|
@@ -3180,12 +3331,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
3180
3331
|
}], fileInfoTemplate: [{
|
|
3181
3332
|
type: ContentChild,
|
|
3182
3333
|
args: [FileInfoTemplateDirective, { static: false }]
|
|
3183
|
-
}],
|
|
3334
|
+
}], fileSelectInput: [{
|
|
3184
3335
|
type: ViewChild,
|
|
3185
|
-
args: ['
|
|
3336
|
+
args: ['fileSelectInput', { static: true }]
|
|
3186
3337
|
}], fileSelectButton: [{
|
|
3187
3338
|
type: ViewChild,
|
|
3188
|
-
args: ['fileSelectButton', { static: true }]
|
|
3339
|
+
args: ['fileSelectButton', { static: true, read: ElementRef }]
|
|
3189
3340
|
}], onBlur: [{
|
|
3190
3341
|
type: Output,
|
|
3191
3342
|
args: ['blur']
|
|
@@ -3199,9 +3350,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
3199
3350
|
}], valueChange: [{
|
|
3200
3351
|
type: Output
|
|
3201
3352
|
}], hostDefaultClasses: [{
|
|
3202
|
-
type: HostBinding,
|
|
3203
|
-
args: ['class.k-widget']
|
|
3204
|
-
}, {
|
|
3205
3353
|
type: HostBinding,
|
|
3206
3354
|
args: ['class.k-upload']
|
|
3207
3355
|
}], hostDisabledClass: [{
|
|
@@ -3210,9 +3358,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
3210
3358
|
}], dir: [{
|
|
3211
3359
|
type: HostBinding,
|
|
3212
3360
|
args: ['attr.dir']
|
|
3213
|
-
}], handleKeydown: [{
|
|
3214
|
-
type: HostListener,
|
|
3215
|
-
args: ['keydown', ['$event']]
|
|
3216
3361
|
}] } });
|
|
3217
3362
|
|
|
3218
3363
|
/**
|
|
@@ -3237,14 +3382,14 @@ class CustomMessagesComponent extends Messages {
|
|
|
3237
3382
|
return true;
|
|
3238
3383
|
}
|
|
3239
3384
|
}
|
|
3240
|
-
CustomMessagesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3241
|
-
CustomMessagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "
|
|
3385
|
+
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 });
|
|
3386
|
+
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
3387
|
{
|
|
3243
3388
|
provide: Messages,
|
|
3244
3389
|
useExisting: forwardRef(() => CustomMessagesComponent)
|
|
3245
3390
|
}
|
|
3246
3391
|
], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
|
|
3247
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3392
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CustomMessagesComponent, decorators: [{
|
|
3248
3393
|
type: Component,
|
|
3249
3394
|
args: [{
|
|
3250
3395
|
providers: [
|
|
@@ -3264,6 +3409,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
3264
3409
|
class UploadStatusTotalComponent {
|
|
3265
3410
|
constructor(localization) {
|
|
3266
3411
|
this.localization = localization;
|
|
3412
|
+
this.checkmarkIcon = checkIcon;
|
|
3413
|
+
this.exceptionSVGIcon = exclamationCircleIcon;
|
|
3414
|
+
this.uploadSVGIcon = uploadIcon;
|
|
3415
|
+
this.pauseSVGIcon = pauseSmIcon;
|
|
3416
|
+
}
|
|
3417
|
+
get iconClass() {
|
|
3418
|
+
if (!this.isUploading && !this.isFailed) {
|
|
3419
|
+
return 'checkmark';
|
|
3420
|
+
}
|
|
3421
|
+
if (!this.isUploading && this.isFailed) {
|
|
3422
|
+
return 'exception';
|
|
3423
|
+
}
|
|
3424
|
+
if (this.isUploading) {
|
|
3425
|
+
return 'upload';
|
|
3426
|
+
}
|
|
3427
|
+
if (this.isPaused) {
|
|
3428
|
+
return 'pause-sm';
|
|
3429
|
+
}
|
|
3430
|
+
}
|
|
3431
|
+
get SVGIconClass() {
|
|
3432
|
+
if (!this.isUploading && !this.isFailed) {
|
|
3433
|
+
return this.checkmarkIcon;
|
|
3434
|
+
}
|
|
3435
|
+
if (!this.isUploading && this.isFailed) {
|
|
3436
|
+
return this.exceptionSVGIcon;
|
|
3437
|
+
}
|
|
3438
|
+
if (this.isUploading) {
|
|
3439
|
+
return this.uploadSVGIcon;
|
|
3440
|
+
}
|
|
3441
|
+
if (this.isPaused) {
|
|
3442
|
+
return this.pauseSVGIcon;
|
|
3443
|
+
}
|
|
3267
3444
|
}
|
|
3268
3445
|
ngDoCheck() {
|
|
3269
3446
|
this.isPaused = this.fileList.hasFileWithState([FileState.Paused]);
|
|
@@ -3278,31 +3455,25 @@ class UploadStatusTotalComponent {
|
|
|
3278
3455
|
}
|
|
3279
3456
|
}
|
|
3280
3457
|
}
|
|
3281
|
-
UploadStatusTotalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3282
|
-
UploadStatusTotalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "
|
|
3283
|
-
<
|
|
3284
|
-
[
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
'k-i-pause-sm': this.isPaused
|
|
3289
|
-
}">
|
|
3290
|
-
</span>
|
|
3458
|
+
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 });
|
|
3459
|
+
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: `
|
|
3460
|
+
<kendo-icon-wrapper
|
|
3461
|
+
[name]="iconClass"
|
|
3462
|
+
[svgIcon]="SVGIconClass"
|
|
3463
|
+
>
|
|
3464
|
+
</kendo-icon-wrapper>
|
|
3291
3465
|
{{statusText}}
|
|
3292
|
-
`, isInline: true,
|
|
3293
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3466
|
+
`, isInline: true, components: [{ type: i4.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass"], exportAs: ["kendoIconWrapper"] }] });
|
|
3467
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: UploadStatusTotalComponent, decorators: [{
|
|
3294
3468
|
type: Component,
|
|
3295
3469
|
args: [{
|
|
3296
3470
|
selector: 'kendo-upload-status-total',
|
|
3297
3471
|
template: `
|
|
3298
|
-
<
|
|
3299
|
-
[
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
'k-i-pause-sm': this.isPaused
|
|
3304
|
-
}">
|
|
3305
|
-
</span>
|
|
3472
|
+
<kendo-icon-wrapper
|
|
3473
|
+
[name]="iconClass"
|
|
3474
|
+
[svgIcon]="SVGIconClass"
|
|
3475
|
+
>
|
|
3476
|
+
</kendo-icon-wrapper>
|
|
3306
3477
|
{{statusText}}
|
|
3307
3478
|
`
|
|
3308
3479
|
}]
|
|
@@ -3381,8 +3552,8 @@ class UploadActionButtonsComponent {
|
|
|
3381
3552
|
return this.localization.get(key);
|
|
3382
3553
|
}
|
|
3383
3554
|
}
|
|
3384
|
-
UploadActionButtonsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3385
|
-
UploadActionButtonsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "
|
|
3555
|
+
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 });
|
|
3556
|
+
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
3557
|
<button #clearButton type="button" class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-clear-selected"
|
|
3387
3558
|
[attr.tabIndex]="-1"
|
|
3388
3559
|
(click)="onClearButtonClick($event)">
|
|
@@ -3394,7 +3565,7 @@ UploadActionButtonsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12
|
|
|
3394
3565
|
{{textFor('uploadSelectedFiles')}}
|
|
3395
3566
|
</button>
|
|
3396
3567
|
`, isInline: true });
|
|
3397
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3568
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: UploadActionButtonsComponent, decorators: [{
|
|
3398
3569
|
type: Component,
|
|
3399
3570
|
args: [{
|
|
3400
3571
|
selector: 'kendo-upload-action-buttons',
|
|
@@ -3438,6 +3609,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
3438
3609
|
args: ['class.k-actions-center']
|
|
3439
3610
|
}] } });
|
|
3440
3611
|
|
|
3612
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
3441
3613
|
/**
|
|
3442
3614
|
* @hidden
|
|
3443
3615
|
*/
|
|
@@ -3446,16 +3618,17 @@ const UPLOAD_VALUE_ACCESSOR = {
|
|
|
3446
3618
|
provide: NG_VALUE_ACCESSOR,
|
|
3447
3619
|
useExisting: forwardRef(() => UploadComponent)
|
|
3448
3620
|
};
|
|
3621
|
+
let idx = 0;
|
|
3449
3622
|
/**
|
|
3450
3623
|
* Represents the [Kendo UI Upload component for Angular]({% slug overview_upload %}).
|
|
3451
3624
|
*/
|
|
3452
3625
|
class UploadComponent {
|
|
3453
|
-
constructor(uploadService, localization, navigation, dropZoneService,
|
|
3626
|
+
constructor(uploadService, localization, navigation, dropZoneService, zone, renderer, cdr, wrapper) {
|
|
3454
3627
|
this.uploadService = uploadService;
|
|
3455
3628
|
this.localization = localization;
|
|
3456
3629
|
this.navigation = navigation;
|
|
3457
3630
|
this.dropZoneService = dropZoneService;
|
|
3458
|
-
this.
|
|
3631
|
+
this.zone = zone;
|
|
3459
3632
|
this.renderer = renderer;
|
|
3460
3633
|
this.cdr = cdr;
|
|
3461
3634
|
/**
|
|
@@ -3720,7 +3893,7 @@ class UploadComponent {
|
|
|
3720
3893
|
* Sets the restrictions for selected files ([see example]({% slug api_upload_filerestrictions %})).
|
|
3721
3894
|
*/
|
|
3722
3895
|
set restrictions(restrictions) {
|
|
3723
|
-
|
|
3896
|
+
const parsedRestrictions = Object.assign({}, this._restrictions, restrictions);
|
|
3724
3897
|
this._restrictions = parsedRestrictions;
|
|
3725
3898
|
}
|
|
3726
3899
|
get restrictions() {
|
|
@@ -3739,6 +3912,25 @@ class UploadComponent {
|
|
|
3739
3912
|
if (this.zoneId) {
|
|
3740
3913
|
this.dropZoneService.addComponent(this, this.zoneId);
|
|
3741
3914
|
}
|
|
3915
|
+
const button = this.fileSelectButton.nativeElement;
|
|
3916
|
+
const input = this.fileSelectInput.nativeElement;
|
|
3917
|
+
this.subs.add(this.renderer.listen(input, 'mouseenter', () => {
|
|
3918
|
+
this.renderer.addClass(button, 'k-hover');
|
|
3919
|
+
}));
|
|
3920
|
+
this.subs.add(this.renderer.listen(input, 'mouseleave', () => {
|
|
3921
|
+
this.renderer.removeClass(button, 'k-hover');
|
|
3922
|
+
}));
|
|
3923
|
+
this.zone.runOutsideAngular(() => {
|
|
3924
|
+
this.subs.add(this.renderer.listen(this.wrapper, 'keydown', event => this.handleKeydown(event)));
|
|
3925
|
+
});
|
|
3926
|
+
}
|
|
3927
|
+
ngAfterViewInit() {
|
|
3928
|
+
const { buttonId, inputId } = this.getIds();
|
|
3929
|
+
const button = this.fileSelectButton.nativeElement;
|
|
3930
|
+
const input = this.fileSelectInput.nativeElement;
|
|
3931
|
+
this.renderer.setAttribute(button, 'id', buttonId);
|
|
3932
|
+
this.renderer.setAttribute(button, 'aria-controls', inputId);
|
|
3933
|
+
this.renderer.setAttribute(input, 'id', inputId);
|
|
3742
3934
|
}
|
|
3743
3935
|
ngOnChanges(changes) {
|
|
3744
3936
|
if (isChanged("chunkable", changes)) {
|
|
@@ -3770,24 +3962,6 @@ class UploadComponent {
|
|
|
3770
3962
|
this.subs.unsubscribe();
|
|
3771
3963
|
}
|
|
3772
3964
|
}
|
|
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
3965
|
/**
|
|
3792
3966
|
* @hidden
|
|
3793
3967
|
*/
|
|
@@ -3886,6 +4060,16 @@ class UploadComponent {
|
|
|
3886
4060
|
textFor(key) {
|
|
3887
4061
|
return this.localization.get(key);
|
|
3888
4062
|
}
|
|
4063
|
+
/**
|
|
4064
|
+
* @hidden
|
|
4065
|
+
*/
|
|
4066
|
+
getIds() {
|
|
4067
|
+
const id = ++idx;
|
|
4068
|
+
const buttonId = `k-upload-button-${id}`;
|
|
4069
|
+
const inputId = `k-upload-input-${id}`;
|
|
4070
|
+
return { buttonId, inputId };
|
|
4071
|
+
}
|
|
4072
|
+
;
|
|
3889
4073
|
/**
|
|
3890
4074
|
* Focuses the underlying input element.
|
|
3891
4075
|
*/
|
|
@@ -3996,13 +4180,13 @@ class UploadComponent {
|
|
|
3996
4180
|
if (!isDocumentAvailable()) {
|
|
3997
4181
|
return;
|
|
3998
4182
|
}
|
|
3999
|
-
this.
|
|
4183
|
+
this.zone.runOutsideAngular(() => {
|
|
4000
4184
|
this.documentClick = fromEvent(document, 'click').pipe(filter((event) => {
|
|
4001
4185
|
return !(this.wrapper !== event.target && this.wrapper.contains(event.target));
|
|
4002
4186
|
}));
|
|
4003
4187
|
this.blurSubscription = merge(this.documentClick, this.navigation.onTab).subscribe(() => {
|
|
4004
4188
|
if (this.navigation.focused) {
|
|
4005
|
-
this.
|
|
4189
|
+
this.zone.run(() => {
|
|
4006
4190
|
this.navigation.focused = false;
|
|
4007
4191
|
this.onTouchedCallback();
|
|
4008
4192
|
this.onBlur.emit();
|
|
@@ -4011,6 +4195,21 @@ class UploadComponent {
|
|
|
4011
4195
|
});
|
|
4012
4196
|
});
|
|
4013
4197
|
}
|
|
4198
|
+
handleKeydown(event) {
|
|
4199
|
+
if (this.disabled) {
|
|
4200
|
+
return;
|
|
4201
|
+
}
|
|
4202
|
+
if ((event.keyCode === Keys.Enter || event.keyCode === Keys.Space) &&
|
|
4203
|
+
event.target === this.fileSelectButton.nativeElement) {
|
|
4204
|
+
event.preventDefault();
|
|
4205
|
+
this.fileSelectInput.nativeElement.click();
|
|
4206
|
+
return;
|
|
4207
|
+
}
|
|
4208
|
+
if (hasClasses(event.target, UPLOAD_CLASSES) ||
|
|
4209
|
+
(!isFocusable(event.target) && !hasClasses(event.target, IGNORE_TARGET_CLASSES))) {
|
|
4210
|
+
this.navigation.process(event);
|
|
4211
|
+
}
|
|
4212
|
+
}
|
|
4014
4213
|
subscribeFocus() {
|
|
4015
4214
|
this.wrapperFocusSubscription = this.navigation.onWrapperFocus.subscribe(() => {
|
|
4016
4215
|
this.onFocus.emit();
|
|
@@ -4059,8 +4258,8 @@ class UploadComponent {
|
|
|
4059
4258
|
}));
|
|
4060
4259
|
}
|
|
4061
4260
|
}
|
|
4062
|
-
UploadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4063
|
-
UploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "
|
|
4261
|
+
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 });
|
|
4262
|
+
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
4263
|
LocalizationService,
|
|
4065
4264
|
NavigationService,
|
|
4066
4265
|
UploadService,
|
|
@@ -4074,7 +4273,7 @@ UploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
|
|
|
4074
4273
|
provide: KendoInput,
|
|
4075
4274
|
useExisting: forwardRef(() => UploadComponent)
|
|
4076
4275
|
}
|
|
4077
|
-
], queries: [{ propertyName: "fileTemplate", first: true, predicate: FileTemplateDirective, descendants: true }, { propertyName: "fileInfoTemplate", first: true, predicate: FileInfoTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "
|
|
4276
|
+
], 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
4277
|
<ng-container kendoUploadLocalizedMessages
|
|
4079
4278
|
i18n-cancel="kendo.upload.cancel|The text for the Cancel button"
|
|
4080
4279
|
cancel="Cancel"
|
|
@@ -4140,25 +4339,35 @@ UploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
|
|
|
4140
4339
|
<div kendoUploadInternalDropZone
|
|
4141
4340
|
[restrictions]="restrictions"
|
|
4142
4341
|
[multiple]="multiple"
|
|
4143
|
-
[disabled]="disabled"
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4342
|
+
[disabled]="disabled"
|
|
4343
|
+
>
|
|
4344
|
+
<div class="k-upload-button-wrap">
|
|
4345
|
+
<button
|
|
4346
|
+
kendoButton
|
|
4347
|
+
#fileSelectButton
|
|
4348
|
+
class="k-upload-button"
|
|
4349
|
+
role="button"
|
|
4350
|
+
[id]="focusableId"
|
|
4351
|
+
[attr.aria-label]="textFor('select')"
|
|
4352
|
+
[attr.tabindex]="selectButtonTabIndex"
|
|
4353
|
+
(focus)="onFileSelectButtonFocus($event)"
|
|
4354
|
+
(blur)="onFileSelectButtonBlur($event)"
|
|
4355
|
+
>
|
|
4356
|
+
{{textFor('select')}}
|
|
4357
|
+
</button>
|
|
4358
|
+
<input
|
|
4359
|
+
#fileSelectInput
|
|
4360
|
+
kendoFileSelect
|
|
4361
|
+
[attr.accept]="accept ? accept : null"
|
|
4362
|
+
[attr.aria-hidden]="true"
|
|
4363
|
+
[dir]="direction"
|
|
4364
|
+
[restrictions]="restrictions"
|
|
4365
|
+
[multiple]="multiple"
|
|
4366
|
+
[disabled]="disabled"
|
|
4367
|
+
/>
|
|
4159
4368
|
</div>
|
|
4160
4369
|
<kendo-upload-status-total *ngIf="showTotalStatus"
|
|
4161
|
-
class="k-upload-status
|
|
4370
|
+
class="k-upload-status"
|
|
4162
4371
|
[fileList]="fileList">
|
|
4163
4372
|
</kendo-upload-status-total>
|
|
4164
4373
|
<div class="k-dropzone-hint">{{textFor('dropFilesHere')}}</div>
|
|
@@ -4175,8 +4384,8 @@ UploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
|
|
|
4175
4384
|
[disabled]="disabled"
|
|
4176
4385
|
[actionsLayout]="actionsLayout">
|
|
4177
4386
|
</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: "
|
|
4387
|
+
`, isInline: true, components: [{ type: i7.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: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
4388
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: UploadComponent, decorators: [{
|
|
4180
4389
|
type: Component,
|
|
4181
4390
|
args: [{
|
|
4182
4391
|
exportAs: 'kendoUpload',
|
|
@@ -4262,25 +4471,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
4262
4471
|
<div kendoUploadInternalDropZone
|
|
4263
4472
|
[restrictions]="restrictions"
|
|
4264
4473
|
[multiple]="multiple"
|
|
4265
|
-
[disabled]="disabled"
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4474
|
+
[disabled]="disabled"
|
|
4475
|
+
>
|
|
4476
|
+
<div class="k-upload-button-wrap">
|
|
4477
|
+
<button
|
|
4478
|
+
kendoButton
|
|
4479
|
+
#fileSelectButton
|
|
4480
|
+
class="k-upload-button"
|
|
4481
|
+
role="button"
|
|
4482
|
+
[id]="focusableId"
|
|
4483
|
+
[attr.aria-label]="textFor('select')"
|
|
4484
|
+
[attr.tabindex]="selectButtonTabIndex"
|
|
4485
|
+
(focus)="onFileSelectButtonFocus($event)"
|
|
4486
|
+
(blur)="onFileSelectButtonBlur($event)"
|
|
4487
|
+
>
|
|
4488
|
+
{{textFor('select')}}
|
|
4489
|
+
</button>
|
|
4490
|
+
<input
|
|
4491
|
+
#fileSelectInput
|
|
4492
|
+
kendoFileSelect
|
|
4493
|
+
[attr.accept]="accept ? accept : null"
|
|
4494
|
+
[attr.aria-hidden]="true"
|
|
4495
|
+
[dir]="direction"
|
|
4496
|
+
[restrictions]="restrictions"
|
|
4497
|
+
[multiple]="multiple"
|
|
4498
|
+
[disabled]="disabled"
|
|
4499
|
+
/>
|
|
4281
4500
|
</div>
|
|
4282
4501
|
<kendo-upload-status-total *ngIf="showTotalStatus"
|
|
4283
|
-
class="k-upload-status
|
|
4502
|
+
class="k-upload-status"
|
|
4284
4503
|
[fileList]="fileList">
|
|
4285
4504
|
</kendo-upload-status-total>
|
|
4286
4505
|
<div class="k-dropzone-hint">{{textFor('dropFilesHere')}}</div>
|
|
@@ -4354,12 +4573,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
4354
4573
|
}], fileInfoTemplate: [{
|
|
4355
4574
|
type: ContentChild,
|
|
4356
4575
|
args: [FileInfoTemplateDirective, { static: false }]
|
|
4357
|
-
}],
|
|
4576
|
+
}], fileSelectInput: [{
|
|
4358
4577
|
type: ViewChild,
|
|
4359
|
-
args: ['
|
|
4578
|
+
args: ['fileSelectInput', { static: true }]
|
|
4360
4579
|
}], fileSelectButton: [{
|
|
4361
4580
|
type: ViewChild,
|
|
4362
|
-
args: ['fileSelectButton', { static: true }]
|
|
4581
|
+
args: ['fileSelectButton', { static: true, read: ElementRef }]
|
|
4363
4582
|
}], onBlur: [{
|
|
4364
4583
|
type: Output,
|
|
4365
4584
|
args: ['blur']
|
|
@@ -4391,9 +4610,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
4391
4610
|
}], valueChange: [{
|
|
4392
4611
|
type: Output
|
|
4393
4612
|
}], hostDefaultClasses: [{
|
|
4394
|
-
type: HostBinding,
|
|
4395
|
-
args: ['class.k-widget']
|
|
4396
|
-
}, {
|
|
4397
4613
|
type: HostBinding,
|
|
4398
4614
|
args: ['class.k-upload']
|
|
4399
4615
|
}], hostDisabledClass: [{
|
|
@@ -4402,9 +4618,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
4402
4618
|
}], dir: [{
|
|
4403
4619
|
type: HostBinding,
|
|
4404
4620
|
args: ['attr.dir']
|
|
4405
|
-
}], handleKeydown: [{
|
|
4406
|
-
type: HostListener,
|
|
4407
|
-
args: ['keydown', ['$event']]
|
|
4408
4621
|
}] } });
|
|
4409
4622
|
|
|
4410
4623
|
class UploadDropZoneDirective {
|
|
@@ -4432,7 +4645,7 @@ class UploadDropZoneDirective {
|
|
|
4432
4645
|
return;
|
|
4433
4646
|
}
|
|
4434
4647
|
components.forEach((component) => {
|
|
4435
|
-
|
|
4648
|
+
const droppedFiles = event.dataTransfer.files;
|
|
4436
4649
|
if (droppedFiles.length > 0 && !component.disabled) {
|
|
4437
4650
|
let files = getAllFileInfo(droppedFiles);
|
|
4438
4651
|
if (component instanceof UploadComponent) {
|
|
@@ -4458,11 +4671,11 @@ class UploadDropZoneDirective {
|
|
|
4458
4671
|
return this.dropZoneService.getComponents(this.zoneId);
|
|
4459
4672
|
}
|
|
4460
4673
|
}
|
|
4461
|
-
UploadDropZoneDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4462
|
-
UploadDropZoneDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
4674
|
+
UploadDropZoneDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: UploadDropZoneDirective, deps: [{ token: DropZoneService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
4675
|
+
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
4676
|
DropZoneService
|
|
4464
4677
|
], ngImport: i0 });
|
|
4465
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4678
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: UploadDropZoneDirective, decorators: [{
|
|
4466
4679
|
type: Directive,
|
|
4467
4680
|
args: [{
|
|
4468
4681
|
providers: [
|
|
@@ -4492,6 +4705,7 @@ class UploadDropZoneComponent extends DropZoneBase {
|
|
|
4492
4705
|
super(element, renderer, 'k-external-dropzone-hover');
|
|
4493
4706
|
this.localization = localization;
|
|
4494
4707
|
this.hostClass = true;
|
|
4708
|
+
this._svgIcon = uploadIcon;
|
|
4495
4709
|
this.localizationChangeSubscription = this.localization.changes.subscribe(({ rtl }) => {
|
|
4496
4710
|
this.direction = rtl ? 'rtl' : 'ltr';
|
|
4497
4711
|
});
|
|
@@ -4499,6 +4713,19 @@ class UploadDropZoneComponent extends DropZoneBase {
|
|
|
4499
4713
|
get dirAttribute() {
|
|
4500
4714
|
return this.direction;
|
|
4501
4715
|
}
|
|
4716
|
+
/**
|
|
4717
|
+
* Defines an SVGIcon to be rendered inside the DropZone.
|
|
4718
|
+
* The input can take either an [existing Kendo SVG icon](slug:svgicon_list) or a custom one.
|
|
4719
|
+
*/
|
|
4720
|
+
set svgIcon(icon) {
|
|
4721
|
+
if (isDevMode() && icon && this.icon && this.iconClass) {
|
|
4722
|
+
throw new Error('Setting both icon/svgIcon and iconClass options at the same time is not supported.');
|
|
4723
|
+
}
|
|
4724
|
+
this._svgIcon = icon;
|
|
4725
|
+
}
|
|
4726
|
+
get svgIcon() {
|
|
4727
|
+
return this._svgIcon;
|
|
4728
|
+
}
|
|
4502
4729
|
/**
|
|
4503
4730
|
* @hidden
|
|
4504
4731
|
*/
|
|
@@ -4510,12 +4737,11 @@ class UploadDropZoneComponent extends DropZoneBase {
|
|
|
4510
4737
|
*/
|
|
4511
4738
|
get iconClasses() {
|
|
4512
4739
|
if (this.icon) {
|
|
4513
|
-
return
|
|
4740
|
+
return `${this.icon}`;
|
|
4514
4741
|
}
|
|
4515
|
-
if (this.iconClass) {
|
|
4516
|
-
return
|
|
4742
|
+
if (!this.icon && !this.iconClass) {
|
|
4743
|
+
return 'upload';
|
|
4517
4744
|
}
|
|
4518
|
-
return 'k-icon k-i-upload';
|
|
4519
4745
|
}
|
|
4520
4746
|
ngOnDestroy() {
|
|
4521
4747
|
if (this.localizationChangeSubscription) {
|
|
@@ -4523,28 +4749,31 @@ class UploadDropZoneComponent extends DropZoneBase {
|
|
|
4523
4749
|
}
|
|
4524
4750
|
}
|
|
4525
4751
|
}
|
|
4526
|
-
UploadDropZoneComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4527
|
-
UploadDropZoneComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "
|
|
4752
|
+
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 });
|
|
4753
|
+
UploadDropZoneComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: UploadDropZoneComponent, selector: "kendo-uploaddropzone", inputs: { zoneId: "zoneId", icon: "icon", iconClass: "iconClass", svgIcon: "svgIcon" }, host: { properties: { "class.k-external-dropzone": "this.hostClass", "attr.dir": "this.dirAttribute" } }, providers: [
|
|
4528
4754
|
LocalizationService,
|
|
4529
4755
|
{
|
|
4530
4756
|
provide: L10N_PREFIX,
|
|
4531
4757
|
useValue: 'kendo.uploaddropzone'
|
|
4532
4758
|
}
|
|
4533
4759
|
], exportAs: ["kendoUploadDropZone"], usesInheritance: true, ngImport: i0, template: `
|
|
4534
|
-
|
|
4535
|
-
|
|
4536
|
-
|
|
4537
|
-
|
|
4538
|
-
|
|
4539
|
-
|
|
4540
|
-
|
|
4541
|
-
|
|
4542
|
-
|
|
4543
|
-
|
|
4544
|
-
|
|
4545
|
-
|
|
4546
|
-
|
|
4547
|
-
|
|
4760
|
+
<ng-container kendoUploadDropZoneLocalizedMessages
|
|
4761
|
+
i18n-externalDropFilesHere='kendo.uploaddropzone.externalDropFilesHere|Sets the external drop-zone hint'
|
|
4762
|
+
externalDropFilesHere='Drag and drop files here to upload'>
|
|
4763
|
+
</ng-container>
|
|
4764
|
+
<div class='k-dropzone-inner' [kendoUploadDropZone]="zoneId">
|
|
4765
|
+
<kendo-icon-wrapper
|
|
4766
|
+
[name]="iconClasses"
|
|
4767
|
+
[customFontClass]="iconClass"
|
|
4768
|
+
[svgIcon]="svgIcon"
|
|
4769
|
+
></kendo-icon-wrapper>
|
|
4770
|
+
<span class="k-dropzone-hint">{{ textFor('externalDropFilesHere') }}</span>
|
|
4771
|
+
<span class="k-dropzone-note">
|
|
4772
|
+
<ng-content></ng-content>
|
|
4773
|
+
</span>
|
|
4774
|
+
</div>
|
|
4775
|
+
`, isInline: true, components: [{ type: i4.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass"], exportAs: ["kendoIconWrapper"] }], directives: [{ type: LocalizedMessagesDirective, selector: "\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n " }, { type: UploadDropZoneDirective, selector: "[kendoUploadDropZone], [kendoFileSelectDropZone]", inputs: ["kendoUploadDropZone"] }] });
|
|
4776
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: UploadDropZoneComponent, decorators: [{
|
|
4548
4777
|
type: Component,
|
|
4549
4778
|
args: [{
|
|
4550
4779
|
exportAs: 'kendoUploadDropZone',
|
|
@@ -4557,19 +4786,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
4557
4786
|
],
|
|
4558
4787
|
selector: 'kendo-uploaddropzone',
|
|
4559
4788
|
template: `
|
|
4560
|
-
|
|
4561
|
-
|
|
4562
|
-
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
|
|
4566
|
-
|
|
4567
|
-
|
|
4568
|
-
|
|
4569
|
-
|
|
4570
|
-
|
|
4571
|
-
|
|
4572
|
-
|
|
4789
|
+
<ng-container kendoUploadDropZoneLocalizedMessages
|
|
4790
|
+
i18n-externalDropFilesHere='kendo.uploaddropzone.externalDropFilesHere|Sets the external drop-zone hint'
|
|
4791
|
+
externalDropFilesHere='Drag and drop files here to upload'>
|
|
4792
|
+
</ng-container>
|
|
4793
|
+
<div class='k-dropzone-inner' [kendoUploadDropZone]="zoneId">
|
|
4794
|
+
<kendo-icon-wrapper
|
|
4795
|
+
[name]="iconClasses"
|
|
4796
|
+
[customFontClass]="iconClass"
|
|
4797
|
+
[svgIcon]="svgIcon"
|
|
4798
|
+
></kendo-icon-wrapper>
|
|
4799
|
+
<span class="k-dropzone-hint">{{ textFor('externalDropFilesHere') }}</span>
|
|
4800
|
+
<span class="k-dropzone-note">
|
|
4801
|
+
<ng-content></ng-content>
|
|
4802
|
+
</span>
|
|
4803
|
+
</div>
|
|
4804
|
+
`
|
|
4573
4805
|
}]
|
|
4574
4806
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i1$1.LocalizationService }]; }, propDecorators: { hostClass: [{
|
|
4575
4807
|
type: HostBinding,
|
|
@@ -4583,6 +4815,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
4583
4815
|
type: Input
|
|
4584
4816
|
}], iconClass: [{
|
|
4585
4817
|
type: Input
|
|
4818
|
+
}], svgIcon: [{
|
|
4819
|
+
type: Input
|
|
4586
4820
|
}] } });
|
|
4587
4821
|
|
|
4588
4822
|
/**
|
|
@@ -4614,8 +4848,8 @@ const PUBLIC_DIRECTIVES = [
|
|
|
4614
4848
|
*/
|
|
4615
4849
|
class SharedModule {
|
|
4616
4850
|
}
|
|
4617
|
-
SharedModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4618
|
-
SharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
4851
|
+
SharedModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4852
|
+
SharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SharedModule, declarations: [FileTemplateDirective,
|
|
4619
4853
|
FileInfoTemplateDirective,
|
|
4620
4854
|
CustomMessagesComponent,
|
|
4621
4855
|
UploadDropZoneDirective,
|
|
@@ -4627,7 +4861,7 @@ SharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
|
4627
4861
|
FileListSingleItemComponent,
|
|
4628
4862
|
FileSelectDirective,
|
|
4629
4863
|
LocalizedMessagesDirective,
|
|
4630
|
-
TemplateContextDirective], imports: [CommonModule], exports: [FileTemplateDirective,
|
|
4864
|
+
TemplateContextDirective], imports: [CommonModule, ButtonsModule, ProgressBarModule, IconsModule], exports: [FileTemplateDirective,
|
|
4631
4865
|
FileInfoTemplateDirective,
|
|
4632
4866
|
CustomMessagesComponent,
|
|
4633
4867
|
UploadDropZoneDirective,
|
|
@@ -4639,9 +4873,11 @@ SharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
|
4639
4873
|
FileListSingleItemComponent,
|
|
4640
4874
|
FileSelectDirective,
|
|
4641
4875
|
LocalizedMessagesDirective,
|
|
4642
|
-
TemplateContextDirective, CommonModule
|
|
4643
|
-
|
|
4644
|
-
i0.ɵɵ
|
|
4876
|
+
TemplateContextDirective, CommonModule,
|
|
4877
|
+
ButtonsModule] });
|
|
4878
|
+
SharedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SharedModule, imports: [[CommonModule, ButtonsModule, ProgressBarModule, IconsModule], CommonModule,
|
|
4879
|
+
ButtonsModule] });
|
|
4880
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SharedModule, decorators: [{
|
|
4645
4881
|
type: NgModule,
|
|
4646
4882
|
args: [{
|
|
4647
4883
|
declarations: [
|
|
@@ -4651,9 +4887,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
4651
4887
|
exports: [
|
|
4652
4888
|
PUBLIC_DIRECTIVES,
|
|
4653
4889
|
SHARED_DECLARATIONS,
|
|
4654
|
-
CommonModule
|
|
4890
|
+
CommonModule,
|
|
4891
|
+
ButtonsModule
|
|
4655
4892
|
],
|
|
4656
|
-
imports: [CommonModule]
|
|
4893
|
+
imports: [CommonModule, ButtonsModule, ProgressBarModule, IconsModule]
|
|
4657
4894
|
}]
|
|
4658
4895
|
}] });
|
|
4659
4896
|
|
|
@@ -4665,10 +4902,10 @@ const FILESELECT_DECLARATIONS = [
|
|
|
4665
4902
|
*/
|
|
4666
4903
|
class FileSelectModule {
|
|
4667
4904
|
}
|
|
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: "
|
|
4905
|
+
FileSelectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4906
|
+
FileSelectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileSelectModule, declarations: [FileSelectComponent], imports: [SharedModule, IconsModule], exports: [FileTemplateDirective, FileInfoTemplateDirective, CustomMessagesComponent, UploadDropZoneDirective, UploadDropZoneComponent, FileSelectComponent] });
|
|
4907
|
+
FileSelectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileSelectModule, imports: [[SharedModule, IconsModule]] });
|
|
4908
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileSelectModule, decorators: [{
|
|
4672
4909
|
type: NgModule,
|
|
4673
4910
|
args: [{
|
|
4674
4911
|
declarations: [FILESELECT_DECLARATIONS],
|
|
@@ -4676,7 +4913,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
4676
4913
|
PUBLIC_DIRECTIVES,
|
|
4677
4914
|
FILESELECT_DECLARATIONS
|
|
4678
4915
|
],
|
|
4679
|
-
imports: [SharedModule]
|
|
4916
|
+
imports: [SharedModule, IconsModule]
|
|
4680
4917
|
}]
|
|
4681
4918
|
}] });
|
|
4682
4919
|
|
|
@@ -4690,14 +4927,14 @@ const UPLOAD_DECLARATIONS = [
|
|
|
4690
4927
|
*/
|
|
4691
4928
|
class UploadModule {
|
|
4692
4929
|
}
|
|
4693
|
-
UploadModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4694
|
-
UploadModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
4930
|
+
UploadModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: UploadModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4931
|
+
UploadModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: UploadModule, declarations: [UploadComponent,
|
|
4695
4932
|
UploadActionButtonsComponent,
|
|
4696
|
-
UploadStatusTotalComponent], imports: [SharedModule], exports: [FileTemplateDirective, FileInfoTemplateDirective, CustomMessagesComponent, UploadDropZoneDirective, UploadDropZoneComponent, UploadComponent,
|
|
4933
|
+
UploadStatusTotalComponent], imports: [SharedModule, IconsModule], exports: [FileTemplateDirective, FileInfoTemplateDirective, CustomMessagesComponent, UploadDropZoneDirective, UploadDropZoneComponent, UploadComponent,
|
|
4697
4934
|
UploadActionButtonsComponent,
|
|
4698
4935
|
UploadStatusTotalComponent] });
|
|
4699
|
-
UploadModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
4700
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4936
|
+
UploadModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: UploadModule, imports: [[SharedModule, IconsModule]] });
|
|
4937
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: UploadModule, decorators: [{
|
|
4701
4938
|
type: NgModule,
|
|
4702
4939
|
args: [{
|
|
4703
4940
|
declarations: [UPLOAD_DECLARATIONS],
|
|
@@ -4705,7 +4942,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
4705
4942
|
PUBLIC_DIRECTIVES,
|
|
4706
4943
|
UPLOAD_DECLARATIONS
|
|
4707
4944
|
],
|
|
4708
|
-
imports: [SharedModule]
|
|
4945
|
+
imports: [SharedModule, IconsModule]
|
|
4709
4946
|
}]
|
|
4710
4947
|
}] });
|
|
4711
4948
|
|
|
@@ -4736,12 +4973,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
4736
4973
|
*/
|
|
4737
4974
|
class UploadsModule {
|
|
4738
4975
|
}
|
|
4739
|
-
UploadsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4740
|
-
UploadsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
4976
|
+
UploadsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: UploadsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4977
|
+
UploadsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: UploadsModule, exports: [FileSelectModule,
|
|
4741
4978
|
UploadModule] });
|
|
4742
|
-
UploadsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
4979
|
+
UploadsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: UploadsModule, imports: [FileSelectModule,
|
|
4743
4980
|
UploadModule] });
|
|
4744
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4981
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: UploadsModule, decorators: [{
|
|
4745
4982
|
type: NgModule,
|
|
4746
4983
|
args: [{
|
|
4747
4984
|
exports: [
|
|
@@ -4755,5 +4992,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
4755
4992
|
* Generated bundle index. Do not edit.
|
|
4756
4993
|
*/
|
|
4757
4994
|
|
|
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 };
|
|
4995
|
+
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
4996
|
|