@progress/kendo-angular-upload 7.1.4 → 8.0.0-dev.202201190956
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 +119 -79
- package/README.md +1 -1
- package/dist/cdn/js/kendo-angular-upload.js +2 -2
- package/dist/cdn/main.js +1 -1
- package/dist/es/fileselect.component.js +4 -4
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/rendering/file-list-item-action-button.component.js +9 -4
- package/dist/es/rendering/upload-action-buttons.component.js +13 -4
- package/dist/es/upload.component.js +4 -4
- package/dist/es2015/fileselect.component.js +4 -4
- package/dist/es2015/index.metadata.json +1 -1
- package/dist/es2015/package-metadata.js +1 -1
- package/dist/es2015/rendering/file-list-item-action-button.component.d.ts +4 -2
- package/dist/es2015/rendering/file-list-item-action-button.component.js +18 -13
- package/dist/es2015/rendering/upload-action-buttons.component.d.ts +4 -2
- package/dist/es2015/rendering/upload-action-buttons.component.js +16 -7
- package/dist/es2015/upload.component.js +4 -4
- package/dist/fesm2015/index.js +42 -29
- package/dist/fesm5/index.js +30 -17
- package/dist/npm/fileselect.component.js +4 -4
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/rendering/file-list-item-action-button.component.js +9 -4
- package/dist/npm/rendering/upload-action-buttons.component.js +13 -4
- package/dist/npm/upload.component.js +4 -4
- package/dist/systemjs/kendo-angular-upload.js +1 -1
- package/package.json +14 -10
|
@@ -9,7 +9,7 @@ export const packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-upload',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
12
|
+
publishDate: 1642586091,
|
|
13
13
|
version: '',
|
|
14
14
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
15
15
|
};
|
|
@@ -5,23 +5,25 @@
|
|
|
5
5
|
import { FileInfo } from '../types';
|
|
6
6
|
import { UploadService } from '../upload.service';
|
|
7
7
|
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
8
|
+
import { NavigationService } from './../navigation.service';
|
|
8
9
|
/**
|
|
9
10
|
* @hidden
|
|
10
11
|
*/
|
|
11
12
|
export declare class FileListItemActionButtonComponent {
|
|
12
13
|
private uploadService;
|
|
13
14
|
private localization;
|
|
15
|
+
private navigation;
|
|
14
16
|
file: FileInfo;
|
|
15
17
|
disabled: boolean;
|
|
16
18
|
progress: Number;
|
|
17
19
|
actionFocused: boolean;
|
|
18
20
|
retryFocused: boolean;
|
|
19
21
|
pauseResumeFocused: boolean;
|
|
20
|
-
constructor(uploadService: UploadService, localization: LocalizationService);
|
|
22
|
+
constructor(uploadService: UploadService, localization: LocalizationService, navigation: NavigationService);
|
|
21
23
|
onFocus(type: string): void;
|
|
22
24
|
onBlur(type: string): void;
|
|
23
25
|
onRetryClick(): void;
|
|
24
|
-
onRemoveCancelClick(): void;
|
|
26
|
+
onRemoveCancelClick(event?: any): void;
|
|
25
27
|
onPauseResumeClick(): void;
|
|
26
28
|
readonly actionButtonTitle: string;
|
|
27
29
|
readonly retryButtonTitle: string;
|
|
@@ -7,13 +7,15 @@ import { Input, Component } from '@angular/core';
|
|
|
7
7
|
import { FileState } from '../types';
|
|
8
8
|
import { UploadService } from '../upload.service';
|
|
9
9
|
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
10
|
+
import { NavigationService } from './../navigation.service';
|
|
10
11
|
/**
|
|
11
12
|
* @hidden
|
|
12
13
|
*/
|
|
13
14
|
let FileListItemActionButtonComponent = class FileListItemActionButtonComponent {
|
|
14
|
-
constructor(uploadService, localization) {
|
|
15
|
+
constructor(uploadService, localization, navigation) {
|
|
15
16
|
this.uploadService = uploadService;
|
|
16
17
|
this.localization = localization;
|
|
18
|
+
this.navigation = navigation;
|
|
17
19
|
this.actionFocused = false;
|
|
18
20
|
this.retryFocused = false;
|
|
19
21
|
this.pauseResumeFocused = false;
|
|
@@ -46,10 +48,11 @@ let FileListItemActionButtonComponent = class FileListItemActionButtonComponent
|
|
|
46
48
|
}
|
|
47
49
|
this.uploadService.retryFiles(this.file.uid);
|
|
48
50
|
}
|
|
49
|
-
onRemoveCancelClick() {
|
|
51
|
+
onRemoveCancelClick(event) {
|
|
50
52
|
if (this.disabled) {
|
|
51
53
|
return;
|
|
52
54
|
}
|
|
55
|
+
event.stopImmediatePropagation();
|
|
53
56
|
const uid = this.file.uid;
|
|
54
57
|
if (this.file.state === FileState.Uploading) {
|
|
55
58
|
this.uploadService.cancelFiles(uid);
|
|
@@ -57,6 +60,7 @@ let FileListItemActionButtonComponent = class FileListItemActionButtonComponent
|
|
|
57
60
|
else {
|
|
58
61
|
this.uploadService.removeFiles(uid);
|
|
59
62
|
}
|
|
63
|
+
this.navigation.focusSelectButton();
|
|
60
64
|
}
|
|
61
65
|
onPauseResumeClick() {
|
|
62
66
|
if (this.disabled) {
|
|
@@ -127,25 +131,25 @@ FileListItemActionButtonComponent = tslib_1.__decorate([
|
|
|
127
131
|
<strong class="k-upload-status">
|
|
128
132
|
<span class="k-upload-pct" *ngIf="isUploading || isPaused">{{progress}}%</span>
|
|
129
133
|
|
|
130
|
-
<button type="button" *ngIf="isFailed" class="k-button k-button-
|
|
131
|
-
[ngClass]="{ 'k-
|
|
134
|
+
<button type="button" *ngIf="isFailed" class="k-button k-icon-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-upload-action"
|
|
135
|
+
[ngClass]="{ 'k-focus': this.retryFocused }"
|
|
132
136
|
[attr.tabIndex]="-1"
|
|
133
137
|
(focus)="onFocus('retry')"
|
|
134
138
|
(blur)="onBlur('retry')"
|
|
135
139
|
(click)="onRetryClick()">
|
|
136
|
-
<span class="k-icon k-retry k-i-refresh-sm"
|
|
140
|
+
<span class="k-icon k-button-icon k-retry k-i-refresh-sm"
|
|
137
141
|
[attr.aria-label]="retryButtonTitle"
|
|
138
142
|
[attr.title]="retryButtonTitle">
|
|
139
143
|
</span>
|
|
140
144
|
</button>
|
|
141
145
|
|
|
142
|
-
<button *ngIf="isResumable" type="button" class="k-button k-button-
|
|
143
|
-
[ngClass]="{ 'k-
|
|
146
|
+
<button *ngIf="isResumable" type="button" class="k-button k-icon-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-upload-action"
|
|
147
|
+
[ngClass]="{ 'k-focus': this.pauseResumeFocused }"
|
|
144
148
|
[attr.tabIndex]="-1"
|
|
145
149
|
(focus)="onFocus('pauseResume')"
|
|
146
150
|
(blur)="onBlur('pauseResume')"
|
|
147
151
|
(click)="onPauseResumeClick()">
|
|
148
|
-
<span class="k-icon"
|
|
152
|
+
<span class="k-icon k-button-icon"
|
|
149
153
|
[ngClass]="{
|
|
150
154
|
'k-i-play-sm': isPaused,
|
|
151
155
|
'k-i-pause-sm': !isPaused
|
|
@@ -155,13 +159,13 @@ FileListItemActionButtonComponent = tslib_1.__decorate([
|
|
|
155
159
|
</span>
|
|
156
160
|
</button>
|
|
157
161
|
|
|
158
|
-
<button type="button" *ngIf="isActionButtonVisible" class="k-button k-button-
|
|
159
|
-
[ngClass]="{ 'k-
|
|
162
|
+
<button type="button" *ngIf="isActionButtonVisible" class="k-button k-icon-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-upload-action"
|
|
163
|
+
[ngClass]="{ 'k-focus': this.actionFocused }"
|
|
160
164
|
[attr.tabIndex]="-1"
|
|
161
165
|
(focus)="onFocus('action')"
|
|
162
166
|
(blur)="onBlur('action')"
|
|
163
|
-
(click)="onRemoveCancelClick()">
|
|
164
|
-
<span class="k-icon"
|
|
167
|
+
(click)="onRemoveCancelClick($event)">
|
|
168
|
+
<span class="k-icon k-button-icon"
|
|
165
169
|
[ngClass]="{
|
|
166
170
|
'k-i-cancel': isUploading,
|
|
167
171
|
'k-delete k-i-x': !isUploading
|
|
@@ -174,6 +178,7 @@ FileListItemActionButtonComponent = tslib_1.__decorate([
|
|
|
174
178
|
`
|
|
175
179
|
}),
|
|
176
180
|
tslib_1.__metadata("design:paramtypes", [UploadService,
|
|
177
|
-
LocalizationService
|
|
181
|
+
LocalizationService,
|
|
182
|
+
NavigationService])
|
|
178
183
|
], FileListItemActionButtonComponent);
|
|
179
184
|
export { FileListItemActionButtonComponent };
|
|
@@ -30,7 +30,9 @@ export declare class UploadActionButtonsComponent implements OnDestroy {
|
|
|
30
30
|
onFocus(): void;
|
|
31
31
|
focusButton(button: string): void;
|
|
32
32
|
ngOnDestroy(): void;
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
onUploadButtonClick(event?: any): void;
|
|
34
|
+
performUpload(): void;
|
|
35
|
+
onClearButtonClick(event?: any): void;
|
|
36
|
+
clearFiles(): void;
|
|
35
37
|
textFor(key: string): string;
|
|
36
38
|
}
|
|
@@ -39,7 +39,6 @@ let UploadActionButtonsComponent = class UploadActionButtonsComponent {
|
|
|
39
39
|
else {
|
|
40
40
|
this.performUpload();
|
|
41
41
|
}
|
|
42
|
-
this.navigation.focusSelectButton();
|
|
43
42
|
});
|
|
44
43
|
}
|
|
45
44
|
onFocus() {
|
|
@@ -55,14 +54,24 @@ let UploadActionButtonsComponent = class UploadActionButtonsComponent {
|
|
|
55
54
|
this.actionSubscription.unsubscribe();
|
|
56
55
|
this.focusSubscription.unsubscribe();
|
|
57
56
|
}
|
|
58
|
-
|
|
57
|
+
onUploadButtonClick(event) {
|
|
58
|
+
event.stopImmediatePropagation();
|
|
59
|
+
this.performUpload();
|
|
60
|
+
}
|
|
61
|
+
performUpload() {
|
|
59
62
|
if (!this.disabled) {
|
|
60
63
|
this.uploadService.uploadFiles();
|
|
64
|
+
this.navigation.focusSelectButton();
|
|
61
65
|
}
|
|
62
66
|
}
|
|
63
|
-
|
|
67
|
+
onClearButtonClick(event) {
|
|
68
|
+
event.stopImmediatePropagation();
|
|
69
|
+
this.clearFiles();
|
|
70
|
+
}
|
|
71
|
+
clearFiles() {
|
|
64
72
|
if (!this.disabled) {
|
|
65
73
|
this.uploadService.clearFiles();
|
|
74
|
+
this.navigation.focusSelectButton();
|
|
66
75
|
}
|
|
67
76
|
}
|
|
68
77
|
textFor(key) {
|
|
@@ -113,14 +122,14 @@ UploadActionButtonsComponent = tslib_1.__decorate([
|
|
|
113
122
|
Component({
|
|
114
123
|
selector: 'kendo-upload-action-buttons',
|
|
115
124
|
template: `
|
|
116
|
-
<button #clearButton type="button" class="k-button k-clear-selected"
|
|
125
|
+
<button #clearButton type="button" class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-clear-selected"
|
|
117
126
|
[attr.tabIndex]="-1"
|
|
118
|
-
(click)="
|
|
127
|
+
(click)="onClearButtonClick($event)">
|
|
119
128
|
{{textFor('clearSelectedFiles')}}
|
|
120
129
|
</button>
|
|
121
|
-
<button #uploadButton type="button" class="k-button k-primary k-upload-selected"
|
|
130
|
+
<button #uploadButton type="button" class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-primary k-upload-selected"
|
|
122
131
|
[attr.tabIndex]="-1"
|
|
123
|
-
(click)="
|
|
132
|
+
(click)="onUploadButtonClick($event)">
|
|
124
133
|
{{textFor('uploadSelectedFiles')}}
|
|
125
134
|
</button>
|
|
126
135
|
`
|
|
@@ -419,7 +419,7 @@ let UploadComponent = UploadComponent_1 = class UploadComponent {
|
|
|
419
419
|
* @hidden
|
|
420
420
|
*/
|
|
421
421
|
onFileSelectButtonFocus(_event) {
|
|
422
|
-
this.renderer.addClass(this.fileSelectButton.nativeElement, 'k-
|
|
422
|
+
this.renderer.addClass(this.fileSelectButton.nativeElement, 'k-focus');
|
|
423
423
|
if (!this.navigation.focused) {
|
|
424
424
|
this.navigation.focusedIndex = -1;
|
|
425
425
|
}
|
|
@@ -428,7 +428,7 @@ let UploadComponent = UploadComponent_1 = class UploadComponent {
|
|
|
428
428
|
* @hidden
|
|
429
429
|
*/
|
|
430
430
|
onFileSelectButtonBlur(_event) {
|
|
431
|
-
this.renderer.removeClass(this.fileSelectButton.nativeElement, 'k-
|
|
431
|
+
this.renderer.removeClass(this.fileSelectButton.nativeElement, 'k-focus');
|
|
432
432
|
}
|
|
433
433
|
/**
|
|
434
434
|
* @hidden
|
|
@@ -831,7 +831,7 @@ tslib_1.__decorate([
|
|
|
831
831
|
tslib_1.__metadata("design:type", Boolean)
|
|
832
832
|
], UploadComponent.prototype, "hostDefaultClasses", void 0);
|
|
833
833
|
tslib_1.__decorate([
|
|
834
|
-
HostBinding('class.k-
|
|
834
|
+
HostBinding('class.k-disabled'),
|
|
835
835
|
tslib_1.__metadata("design:type", Boolean),
|
|
836
836
|
tslib_1.__metadata("design:paramtypes", [])
|
|
837
837
|
], UploadComponent.prototype, "hostDisabledClass", null);
|
|
@@ -938,7 +938,7 @@ UploadComponent = UploadComponent_1 = tslib_1.__decorate([
|
|
|
938
938
|
[attr.tabindex]="selectButtonTabIndex"
|
|
939
939
|
(focus)="onFileSelectButtonFocus($event)"
|
|
940
940
|
(blur)="onFileSelectButtonBlur($event)"
|
|
941
|
-
class="k-button k-upload-button">
|
|
941
|
+
class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-upload-button">
|
|
942
942
|
<input #fileSelect kendoFileSelect
|
|
943
943
|
[attr.accept]="accept ? accept : null"
|
|
944
944
|
[attr.aria-hidden]="true"
|
package/dist/fesm2015/index.js
CHANGED
|
@@ -21,7 +21,7 @@ const packageMetadata = {
|
|
|
21
21
|
name: '@progress/kendo-angular-upload',
|
|
22
22
|
productName: 'Kendo UI for Angular',
|
|
23
23
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
24
|
-
publishDate:
|
|
24
|
+
publishDate: 1642586091,
|
|
25
25
|
version: '',
|
|
26
26
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
27
27
|
};
|
|
@@ -1725,7 +1725,7 @@ let FileSelectComponent = FileSelectComponent_1 = class FileSelectComponent {
|
|
|
1725
1725
|
* @hidden
|
|
1726
1726
|
*/
|
|
1727
1727
|
onFileSelectButtonFocus(_event) {
|
|
1728
|
-
this.renderer.addClass(this.fileSelectButton.nativeElement, 'k-
|
|
1728
|
+
this.renderer.addClass(this.fileSelectButton.nativeElement, 'k-focus');
|
|
1729
1729
|
if (!this.navigation.focused) {
|
|
1730
1730
|
this.navigation.focusedIndex = -1;
|
|
1731
1731
|
}
|
|
@@ -1734,7 +1734,7 @@ let FileSelectComponent = FileSelectComponent_1 = class FileSelectComponent {
|
|
|
1734
1734
|
* @hidden
|
|
1735
1735
|
*/
|
|
1736
1736
|
onFileSelectButtonBlur(_event) {
|
|
1737
|
-
this.renderer.removeClass(this.fileSelectButton.nativeElement, 'k-
|
|
1737
|
+
this.renderer.removeClass(this.fileSelectButton.nativeElement, 'k-focus');
|
|
1738
1738
|
}
|
|
1739
1739
|
subscribeBlur() {
|
|
1740
1740
|
if (!isDocumentAvailable()) {
|
|
@@ -1874,7 +1874,7 @@ __decorate([
|
|
|
1874
1874
|
__metadata("design:type", Boolean)
|
|
1875
1875
|
], FileSelectComponent.prototype, "hostDefaultClasses", void 0);
|
|
1876
1876
|
__decorate([
|
|
1877
|
-
HostBinding('class.k-
|
|
1877
|
+
HostBinding('class.k-disabled'),
|
|
1878
1878
|
__metadata("design:type", Boolean),
|
|
1879
1879
|
__metadata("design:paramtypes", [])
|
|
1880
1880
|
], FileSelectComponent.prototype, "hostDisabledClass", null);
|
|
@@ -1939,7 +1939,7 @@ FileSelectComponent = FileSelectComponent_1 = __decorate([
|
|
|
1939
1939
|
[attr.tabindex]="selectButtonTabIndex"
|
|
1940
1940
|
(focus)="onFileSelectButtonFocus($event)"
|
|
1941
1941
|
(blur)="onFileSelectButtonBlur($event)"
|
|
1942
|
-
class="k-button k-upload-button">
|
|
1942
|
+
class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-upload-button">
|
|
1943
1943
|
<input #fileSelect kendoFileSelect
|
|
1944
1944
|
[attr.accept]="accept ? accept : null"
|
|
1945
1945
|
[dir]="direction"
|
|
@@ -2549,9 +2549,10 @@ FileListComponent = __decorate([
|
|
|
2549
2549
|
* @hidden
|
|
2550
2550
|
*/
|
|
2551
2551
|
let FileListItemActionButtonComponent = class FileListItemActionButtonComponent {
|
|
2552
|
-
constructor(uploadService, localization) {
|
|
2552
|
+
constructor(uploadService, localization, navigation) {
|
|
2553
2553
|
this.uploadService = uploadService;
|
|
2554
2554
|
this.localization = localization;
|
|
2555
|
+
this.navigation = navigation;
|
|
2555
2556
|
this.actionFocused = false;
|
|
2556
2557
|
this.retryFocused = false;
|
|
2557
2558
|
this.pauseResumeFocused = false;
|
|
@@ -2584,10 +2585,11 @@ let FileListItemActionButtonComponent = class FileListItemActionButtonComponent
|
|
|
2584
2585
|
}
|
|
2585
2586
|
this.uploadService.retryFiles(this.file.uid);
|
|
2586
2587
|
}
|
|
2587
|
-
onRemoveCancelClick() {
|
|
2588
|
+
onRemoveCancelClick(event) {
|
|
2588
2589
|
if (this.disabled) {
|
|
2589
2590
|
return;
|
|
2590
2591
|
}
|
|
2592
|
+
event.stopImmediatePropagation();
|
|
2591
2593
|
const uid = this.file.uid;
|
|
2592
2594
|
if (this.file.state === FileState.Uploading) {
|
|
2593
2595
|
this.uploadService.cancelFiles(uid);
|
|
@@ -2595,6 +2597,7 @@ let FileListItemActionButtonComponent = class FileListItemActionButtonComponent
|
|
|
2595
2597
|
else {
|
|
2596
2598
|
this.uploadService.removeFiles(uid);
|
|
2597
2599
|
}
|
|
2600
|
+
this.navigation.focusSelectButton();
|
|
2598
2601
|
}
|
|
2599
2602
|
onPauseResumeClick() {
|
|
2600
2603
|
if (this.disabled) {
|
|
@@ -2665,25 +2668,25 @@ FileListItemActionButtonComponent = __decorate([
|
|
|
2665
2668
|
<strong class="k-upload-status">
|
|
2666
2669
|
<span class="k-upload-pct" *ngIf="isUploading || isPaused">{{progress}}%</span>
|
|
2667
2670
|
|
|
2668
|
-
<button type="button" *ngIf="isFailed" class="k-button k-button-
|
|
2669
|
-
[ngClass]="{ 'k-
|
|
2671
|
+
<button type="button" *ngIf="isFailed" class="k-button k-icon-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-upload-action"
|
|
2672
|
+
[ngClass]="{ 'k-focus': this.retryFocused }"
|
|
2670
2673
|
[attr.tabIndex]="-1"
|
|
2671
2674
|
(focus)="onFocus('retry')"
|
|
2672
2675
|
(blur)="onBlur('retry')"
|
|
2673
2676
|
(click)="onRetryClick()">
|
|
2674
|
-
<span class="k-icon k-retry k-i-refresh-sm"
|
|
2677
|
+
<span class="k-icon k-button-icon k-retry k-i-refresh-sm"
|
|
2675
2678
|
[attr.aria-label]="retryButtonTitle"
|
|
2676
2679
|
[attr.title]="retryButtonTitle">
|
|
2677
2680
|
</span>
|
|
2678
2681
|
</button>
|
|
2679
2682
|
|
|
2680
|
-
<button *ngIf="isResumable" type="button" class="k-button k-button-
|
|
2681
|
-
[ngClass]="{ 'k-
|
|
2683
|
+
<button *ngIf="isResumable" type="button" class="k-button k-icon-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-upload-action"
|
|
2684
|
+
[ngClass]="{ 'k-focus': this.pauseResumeFocused }"
|
|
2682
2685
|
[attr.tabIndex]="-1"
|
|
2683
2686
|
(focus)="onFocus('pauseResume')"
|
|
2684
2687
|
(blur)="onBlur('pauseResume')"
|
|
2685
2688
|
(click)="onPauseResumeClick()">
|
|
2686
|
-
<span class="k-icon"
|
|
2689
|
+
<span class="k-icon k-button-icon"
|
|
2687
2690
|
[ngClass]="{
|
|
2688
2691
|
'k-i-play-sm': isPaused,
|
|
2689
2692
|
'k-i-pause-sm': !isPaused
|
|
@@ -2693,13 +2696,13 @@ FileListItemActionButtonComponent = __decorate([
|
|
|
2693
2696
|
</span>
|
|
2694
2697
|
</button>
|
|
2695
2698
|
|
|
2696
|
-
<button type="button" *ngIf="isActionButtonVisible" class="k-button k-button-
|
|
2697
|
-
[ngClass]="{ 'k-
|
|
2699
|
+
<button type="button" *ngIf="isActionButtonVisible" class="k-button k-icon-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-upload-action"
|
|
2700
|
+
[ngClass]="{ 'k-focus': this.actionFocused }"
|
|
2698
2701
|
[attr.tabIndex]="-1"
|
|
2699
2702
|
(focus)="onFocus('action')"
|
|
2700
2703
|
(blur)="onBlur('action')"
|
|
2701
|
-
(click)="onRemoveCancelClick()">
|
|
2702
|
-
<span class="k-icon"
|
|
2704
|
+
(click)="onRemoveCancelClick($event)">
|
|
2705
|
+
<span class="k-icon k-button-icon"
|
|
2703
2706
|
[ngClass]="{
|
|
2704
2707
|
'k-i-cancel': isUploading,
|
|
2705
2708
|
'k-delete k-i-x': !isUploading
|
|
@@ -2712,7 +2715,8 @@ FileListItemActionButtonComponent = __decorate([
|
|
|
2712
2715
|
`
|
|
2713
2716
|
}),
|
|
2714
2717
|
__metadata("design:paramtypes", [UploadService,
|
|
2715
|
-
LocalizationService
|
|
2718
|
+
LocalizationService,
|
|
2719
|
+
NavigationService])
|
|
2716
2720
|
], FileListItemActionButtonComponent);
|
|
2717
2721
|
|
|
2718
2722
|
/**
|
|
@@ -3538,7 +3542,7 @@ let UploadComponent = UploadComponent_1 = class UploadComponent {
|
|
|
3538
3542
|
* @hidden
|
|
3539
3543
|
*/
|
|
3540
3544
|
onFileSelectButtonFocus(_event) {
|
|
3541
|
-
this.renderer.addClass(this.fileSelectButton.nativeElement, 'k-
|
|
3545
|
+
this.renderer.addClass(this.fileSelectButton.nativeElement, 'k-focus');
|
|
3542
3546
|
if (!this.navigation.focused) {
|
|
3543
3547
|
this.navigation.focusedIndex = -1;
|
|
3544
3548
|
}
|
|
@@ -3547,7 +3551,7 @@ let UploadComponent = UploadComponent_1 = class UploadComponent {
|
|
|
3547
3551
|
* @hidden
|
|
3548
3552
|
*/
|
|
3549
3553
|
onFileSelectButtonBlur(_event) {
|
|
3550
|
-
this.renderer.removeClass(this.fileSelectButton.nativeElement, 'k-
|
|
3554
|
+
this.renderer.removeClass(this.fileSelectButton.nativeElement, 'k-focus');
|
|
3551
3555
|
}
|
|
3552
3556
|
/**
|
|
3553
3557
|
* @hidden
|
|
@@ -3950,7 +3954,7 @@ __decorate([
|
|
|
3950
3954
|
__metadata("design:type", Boolean)
|
|
3951
3955
|
], UploadComponent.prototype, "hostDefaultClasses", void 0);
|
|
3952
3956
|
__decorate([
|
|
3953
|
-
HostBinding('class.k-
|
|
3957
|
+
HostBinding('class.k-disabled'),
|
|
3954
3958
|
__metadata("design:type", Boolean),
|
|
3955
3959
|
__metadata("design:paramtypes", [])
|
|
3956
3960
|
], UploadComponent.prototype, "hostDisabledClass", null);
|
|
@@ -4057,7 +4061,7 @@ UploadComponent = UploadComponent_1 = __decorate([
|
|
|
4057
4061
|
[attr.tabindex]="selectButtonTabIndex"
|
|
4058
4062
|
(focus)="onFileSelectButtonFocus($event)"
|
|
4059
4063
|
(blur)="onFileSelectButtonBlur($event)"
|
|
4060
|
-
class="k-button k-upload-button">
|
|
4064
|
+
class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-upload-button">
|
|
4061
4065
|
<input #fileSelect kendoFileSelect
|
|
4062
4066
|
[attr.accept]="accept ? accept : null"
|
|
4063
4067
|
[attr.aria-hidden]="true"
|
|
@@ -4367,7 +4371,6 @@ let UploadActionButtonsComponent = class UploadActionButtonsComponent {
|
|
|
4367
4371
|
else {
|
|
4368
4372
|
this.performUpload();
|
|
4369
4373
|
}
|
|
4370
|
-
this.navigation.focusSelectButton();
|
|
4371
4374
|
});
|
|
4372
4375
|
}
|
|
4373
4376
|
onFocus() {
|
|
@@ -4383,14 +4386,24 @@ let UploadActionButtonsComponent = class UploadActionButtonsComponent {
|
|
|
4383
4386
|
this.actionSubscription.unsubscribe();
|
|
4384
4387
|
this.focusSubscription.unsubscribe();
|
|
4385
4388
|
}
|
|
4386
|
-
|
|
4389
|
+
onUploadButtonClick(event) {
|
|
4390
|
+
event.stopImmediatePropagation();
|
|
4391
|
+
this.performUpload();
|
|
4392
|
+
}
|
|
4393
|
+
performUpload() {
|
|
4387
4394
|
if (!this.disabled) {
|
|
4388
4395
|
this.uploadService.uploadFiles();
|
|
4396
|
+
this.navigation.focusSelectButton();
|
|
4389
4397
|
}
|
|
4390
4398
|
}
|
|
4391
|
-
|
|
4399
|
+
onClearButtonClick(event) {
|
|
4400
|
+
event.stopImmediatePropagation();
|
|
4401
|
+
this.clearFiles();
|
|
4402
|
+
}
|
|
4403
|
+
clearFiles() {
|
|
4392
4404
|
if (!this.disabled) {
|
|
4393
4405
|
this.uploadService.clearFiles();
|
|
4406
|
+
this.navigation.focusSelectButton();
|
|
4394
4407
|
}
|
|
4395
4408
|
}
|
|
4396
4409
|
textFor(key) {
|
|
@@ -4441,14 +4454,14 @@ UploadActionButtonsComponent = __decorate([
|
|
|
4441
4454
|
Component({
|
|
4442
4455
|
selector: 'kendo-upload-action-buttons',
|
|
4443
4456
|
template: `
|
|
4444
|
-
<button #clearButton type="button" class="k-button k-clear-selected"
|
|
4457
|
+
<button #clearButton type="button" class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-clear-selected"
|
|
4445
4458
|
[attr.tabIndex]="-1"
|
|
4446
|
-
(click)="
|
|
4459
|
+
(click)="onClearButtonClick($event)">
|
|
4447
4460
|
{{textFor('clearSelectedFiles')}}
|
|
4448
4461
|
</button>
|
|
4449
|
-
<button #uploadButton type="button" class="k-button k-primary k-upload-selected"
|
|
4462
|
+
<button #uploadButton type="button" class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-primary k-upload-selected"
|
|
4450
4463
|
[attr.tabIndex]="-1"
|
|
4451
|
-
(click)="
|
|
4464
|
+
(click)="onUploadButtonClick($event)">
|
|
4452
4465
|
{{textFor('uploadSelectedFiles')}}
|
|
4453
4466
|
</button>
|
|
4454
4467
|
`
|