@progress/kendo-angular-upload 7.1.4 → 7.1.5-dev.202111161429

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.
@@ -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: 1635939353,
12
+ publishDate: 1637072903,
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) {
@@ -160,7 +164,7 @@ FileListItemActionButtonComponent = tslib_1.__decorate([
160
164
  [attr.tabIndex]="-1"
161
165
  (focus)="onFocus('action')"
162
166
  (blur)="onBlur('action')"
163
- (click)="onRemoveCancelClick()">
167
+ (click)="onRemoveCancelClick($event)">
164
168
  <span class="k-icon"
165
169
  [ngClass]="{
166
170
  'k-i-cancel': 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
- performUpload(_event?: any): void;
34
- clearFiles(_event?: any): void;
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
- performUpload(_event) {
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
- clearFiles(_event) {
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) {
@@ -115,12 +124,12 @@ UploadActionButtonsComponent = tslib_1.__decorate([
115
124
  template: `
116
125
  <button #clearButton type="button" class="k-button k-clear-selected"
117
126
  [attr.tabIndex]="-1"
118
- (click)="clearFiles($event)">
127
+ (click)="onClearButtonClick($event)">
119
128
  {{textFor('clearSelectedFiles')}}
120
129
  </button>
121
130
  <button #uploadButton type="button" class="k-button k-primary k-upload-selected"
122
131
  [attr.tabIndex]="-1"
123
- (click)="performUpload($event)">
132
+ (click)="onUploadButtonClick($event)">
124
133
  {{textFor('uploadSelectedFiles')}}
125
134
  </button>
126
135
  `
@@ -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: 1635939353,
24
+ publishDate: 1637072903,
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
  };
@@ -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) {
@@ -2698,7 +2701,7 @@ FileListItemActionButtonComponent = __decorate([
2698
2701
  [attr.tabIndex]="-1"
2699
2702
  (focus)="onFocus('action')"
2700
2703
  (blur)="onBlur('action')"
2701
- (click)="onRemoveCancelClick()">
2704
+ (click)="onRemoveCancelClick($event)">
2702
2705
  <span class="k-icon"
2703
2706
  [ngClass]="{
2704
2707
  'k-i-cancel': 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
  /**
@@ -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
- performUpload(_event) {
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
- clearFiles(_event) {
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) {
@@ -4443,12 +4456,12 @@ UploadActionButtonsComponent = __decorate([
4443
4456
  template: `
4444
4457
  <button #clearButton type="button" class="k-button k-clear-selected"
4445
4458
  [attr.tabIndex]="-1"
4446
- (click)="clearFiles($event)">
4459
+ (click)="onClearButtonClick($event)">
4447
4460
  {{textFor('clearSelectedFiles')}}
4448
4461
  </button>
4449
4462
  <button #uploadButton type="button" class="k-button k-primary k-upload-selected"
4450
4463
  [attr.tabIndex]="-1"
4451
- (click)="performUpload($event)">
4464
+ (click)="onUploadButtonClick($event)">
4452
4465
  {{textFor('uploadSelectedFiles')}}
4453
4466
  </button>
4454
4467
  `
@@ -21,7 +21,7 @@ var packageMetadata = {
21
21
  name: '@progress/kendo-angular-upload',
22
22
  productName: 'Kendo UI for Angular',
23
23
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
24
- publishDate: 1635939353,
24
+ publishDate: 1637072903,
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
  };
@@ -2640,9 +2640,10 @@ var FileListComponent = /** @class */ (function () {
2640
2640
  * @hidden
2641
2641
  */
2642
2642
  var FileListItemActionButtonComponent = /** @class */ (function () {
2643
- function FileListItemActionButtonComponent(uploadService, localization) {
2643
+ function FileListItemActionButtonComponent(uploadService, localization, navigation) {
2644
2644
  this.uploadService = uploadService;
2645
2645
  this.localization = localization;
2646
+ this.navigation = navigation;
2646
2647
  this.actionFocused = false;
2647
2648
  this.retryFocused = false;
2648
2649
  this.pauseResumeFocused = false;
@@ -2675,10 +2676,11 @@ var FileListItemActionButtonComponent = /** @class */ (function () {
2675
2676
  }
2676
2677
  this.uploadService.retryFiles(this.file.uid);
2677
2678
  };
2678
- FileListItemActionButtonComponent.prototype.onRemoveCancelClick = function () {
2679
+ FileListItemActionButtonComponent.prototype.onRemoveCancelClick = function (event) {
2679
2680
  if (this.disabled) {
2680
2681
  return;
2681
2682
  }
2683
+ event.stopImmediatePropagation();
2682
2684
  var uid = this.file.uid;
2683
2685
  if (this.file.state === FileState.Uploading) {
2684
2686
  this.uploadService.cancelFiles(uid);
@@ -2686,6 +2688,7 @@ var FileListItemActionButtonComponent = /** @class */ (function () {
2686
2688
  else {
2687
2689
  this.uploadService.removeFiles(uid);
2688
2690
  }
2691
+ this.navigation.focusSelectButton();
2689
2692
  };
2690
2693
  FileListItemActionButtonComponent.prototype.onPauseResumeClick = function () {
2691
2694
  if (this.disabled) {
@@ -2783,10 +2786,11 @@ var FileListItemActionButtonComponent = /** @class */ (function () {
2783
2786
  FileListItemActionButtonComponent = __decorate([
2784
2787
  Component({
2785
2788
  selector: 'kendo-upload-file-list-item-action-button',
2786
- template: "\n <strong class=\"k-upload-status\">\n <span class=\"k-upload-pct\" *ngIf=\"isUploading || isPaused\">{{progress}}%</span>\n\n <button type=\"button\" *ngIf=\"isFailed\" class=\"k-button k-button-icon k-flat k-upload-action\"\n [ngClass]=\"{ 'k-state-focused': this.retryFocused }\"\n [attr.tabIndex]=\"-1\"\n (focus)=\"onFocus('retry')\"\n (blur)=\"onBlur('retry')\"\n (click)=\"onRetryClick()\">\n <span class=\"k-icon k-retry k-i-refresh-sm\"\n [attr.aria-label]=\"retryButtonTitle\"\n [attr.title]=\"retryButtonTitle\">\n </span>\n </button>\n\n <button *ngIf=\"isResumable\" type=\"button\" class=\"k-button k-button-icon k-flat k-upload-action\"\n [ngClass]=\"{ 'k-state-focused': this.pauseResumeFocused }\"\n [attr.tabIndex]=\"-1\"\n (focus)=\"onFocus('pauseResume')\"\n (blur)=\"onBlur('pauseResume')\"\n (click)=\"onPauseResumeClick()\">\n <span class=\"k-icon\"\n [ngClass]=\"{\n 'k-i-play-sm': isPaused,\n 'k-i-pause-sm': !isPaused\n }\"\n [attr.aria-label]='pauseResumeButtonTitle'\n [attr.title]='pauseResumeButtonTitle'>\n </span>\n </button>\n\n <button type=\"button\" *ngIf=\"isActionButtonVisible\" class=\"k-button k-button-icon k-flat k-upload-action\"\n [ngClass]=\"{ 'k-state-focused': this.actionFocused }\"\n [attr.tabIndex]=\"-1\"\n (focus)=\"onFocus('action')\"\n (blur)=\"onBlur('action')\"\n (click)=\"onRemoveCancelClick()\">\n <span class=\"k-icon\"\n [ngClass]=\"{\n 'k-i-cancel': isUploading,\n 'k-delete k-i-x': !isUploading\n }\"\n [attr.aria-label]='actionButtonTitle'\n [attr.title]='actionButtonTitle'>\n </span>\n </button>\n </strong>\n "
2789
+ template: "\n <strong class=\"k-upload-status\">\n <span class=\"k-upload-pct\" *ngIf=\"isUploading || isPaused\">{{progress}}%</span>\n\n <button type=\"button\" *ngIf=\"isFailed\" class=\"k-button k-button-icon k-flat k-upload-action\"\n [ngClass]=\"{ 'k-state-focused': this.retryFocused }\"\n [attr.tabIndex]=\"-1\"\n (focus)=\"onFocus('retry')\"\n (blur)=\"onBlur('retry')\"\n (click)=\"onRetryClick()\">\n <span class=\"k-icon k-retry k-i-refresh-sm\"\n [attr.aria-label]=\"retryButtonTitle\"\n [attr.title]=\"retryButtonTitle\">\n </span>\n </button>\n\n <button *ngIf=\"isResumable\" type=\"button\" class=\"k-button k-button-icon k-flat k-upload-action\"\n [ngClass]=\"{ 'k-state-focused': this.pauseResumeFocused }\"\n [attr.tabIndex]=\"-1\"\n (focus)=\"onFocus('pauseResume')\"\n (blur)=\"onBlur('pauseResume')\"\n (click)=\"onPauseResumeClick()\">\n <span class=\"k-icon\"\n [ngClass]=\"{\n 'k-i-play-sm': isPaused,\n 'k-i-pause-sm': !isPaused\n }\"\n [attr.aria-label]='pauseResumeButtonTitle'\n [attr.title]='pauseResumeButtonTitle'>\n </span>\n </button>\n\n <button type=\"button\" *ngIf=\"isActionButtonVisible\" class=\"k-button k-button-icon k-flat k-upload-action\"\n [ngClass]=\"{ 'k-state-focused': this.actionFocused }\"\n [attr.tabIndex]=\"-1\"\n (focus)=\"onFocus('action')\"\n (blur)=\"onBlur('action')\"\n (click)=\"onRemoveCancelClick($event)\">\n <span class=\"k-icon\"\n [ngClass]=\"{\n 'k-i-cancel': isUploading,\n 'k-delete k-i-x': !isUploading\n }\"\n [attr.aria-label]='actionButtonTitle'\n [attr.title]='actionButtonTitle'>\n </span>\n </button>\n </strong>\n "
2787
2790
  }),
2788
2791
  __metadata("design:paramtypes", [UploadService,
2789
- LocalizationService])
2792
+ LocalizationService,
2793
+ NavigationService])
2790
2794
  ], FileListItemActionButtonComponent);
2791
2795
  return FileListItemActionButtonComponent;
2792
2796
  }());
@@ -4455,7 +4459,6 @@ var UploadActionButtonsComponent = /** @class */ (function () {
4455
4459
  else {
4456
4460
  _this.performUpload();
4457
4461
  }
4458
- _this.navigation.focusSelectButton();
4459
4462
  });
4460
4463
  };
4461
4464
  UploadActionButtonsComponent.prototype.onFocus = function () {
@@ -4472,14 +4475,24 @@ var UploadActionButtonsComponent = /** @class */ (function () {
4472
4475
  this.actionSubscription.unsubscribe();
4473
4476
  this.focusSubscription.unsubscribe();
4474
4477
  };
4475
- UploadActionButtonsComponent.prototype.performUpload = function (_event) {
4478
+ UploadActionButtonsComponent.prototype.onUploadButtonClick = function (event) {
4479
+ event.stopImmediatePropagation();
4480
+ this.performUpload();
4481
+ };
4482
+ UploadActionButtonsComponent.prototype.performUpload = function () {
4476
4483
  if (!this.disabled) {
4477
4484
  this.uploadService.uploadFiles();
4485
+ this.navigation.focusSelectButton();
4478
4486
  }
4479
4487
  };
4480
- UploadActionButtonsComponent.prototype.clearFiles = function (_event) {
4488
+ UploadActionButtonsComponent.prototype.onClearButtonClick = function (event) {
4489
+ event.stopImmediatePropagation();
4490
+ this.clearFiles();
4491
+ };
4492
+ UploadActionButtonsComponent.prototype.clearFiles = function () {
4481
4493
  if (!this.disabled) {
4482
4494
  this.uploadService.clearFiles();
4495
+ this.navigation.focusSelectButton();
4483
4496
  }
4484
4497
  };
4485
4498
  UploadActionButtonsComponent.prototype.textFor = function (key) {
@@ -4528,7 +4541,7 @@ var UploadActionButtonsComponent = /** @class */ (function () {
4528
4541
  UploadActionButtonsComponent = __decorate([
4529
4542
  Component({
4530
4543
  selector: 'kendo-upload-action-buttons',
4531
- template: "\n <button #clearButton type=\"button\" class=\"k-button k-clear-selected\"\n [attr.tabIndex]=\"-1\"\n (click)=\"clearFiles($event)\">\n {{textFor('clearSelectedFiles')}}\n </button>\n <button #uploadButton type=\"button\" class=\"k-button k-primary k-upload-selected\"\n [attr.tabIndex]=\"-1\"\n (click)=\"performUpload($event)\">\n {{textFor('uploadSelectedFiles')}}\n </button>\n "
4544
+ template: "\n <button #clearButton type=\"button\" class=\"k-button k-clear-selected\"\n [attr.tabIndex]=\"-1\"\n (click)=\"onClearButtonClick($event)\">\n {{textFor('clearSelectedFiles')}}\n </button>\n <button #uploadButton type=\"button\" class=\"k-button k-primary k-upload-selected\"\n [attr.tabIndex]=\"-1\"\n (click)=\"onUploadButtonClick($event)\">\n {{textFor('uploadSelectedFiles')}}\n </button>\n "
4532
4545
  }),
4533
4546
  __metadata("design:paramtypes", [UploadService,
4534
4547
  LocalizationService,
@@ -11,7 +11,7 @@ exports.packageMetadata = {
11
11
  name: '@progress/kendo-angular-upload',
12
12
  productName: 'Kendo UI for Angular',
13
13
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
14
- publishDate: 1635939353,
14
+ publishDate: 1637072903,
15
15
  version: '',
16
16
  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'
17
17
  };
@@ -9,13 +9,15 @@ var core_1 = require("@angular/core");
9
9
  var types_1 = require("../types");
10
10
  var upload_service_1 = require("../upload.service");
11
11
  var kendo_angular_l10n_1 = require("@progress/kendo-angular-l10n");
12
+ var navigation_service_1 = require("./../navigation.service");
12
13
  /**
13
14
  * @hidden
14
15
  */
15
16
  var FileListItemActionButtonComponent = /** @class */ (function () {
16
- function FileListItemActionButtonComponent(uploadService, localization) {
17
+ function FileListItemActionButtonComponent(uploadService, localization, navigation) {
17
18
  this.uploadService = uploadService;
18
19
  this.localization = localization;
20
+ this.navigation = navigation;
19
21
  this.actionFocused = false;
20
22
  this.retryFocused = false;
21
23
  this.pauseResumeFocused = false;
@@ -48,10 +50,11 @@ var FileListItemActionButtonComponent = /** @class */ (function () {
48
50
  }
49
51
  this.uploadService.retryFiles(this.file.uid);
50
52
  };
51
- FileListItemActionButtonComponent.prototype.onRemoveCancelClick = function () {
53
+ FileListItemActionButtonComponent.prototype.onRemoveCancelClick = function (event) {
52
54
  if (this.disabled) {
53
55
  return;
54
56
  }
57
+ event.stopImmediatePropagation();
55
58
  var uid = this.file.uid;
56
59
  if (this.file.state === types_1.FileState.Uploading) {
57
60
  this.uploadService.cancelFiles(uid);
@@ -59,6 +62,7 @@ var FileListItemActionButtonComponent = /** @class */ (function () {
59
62
  else {
60
63
  this.uploadService.removeFiles(uid);
61
64
  }
65
+ this.navigation.focusSelectButton();
62
66
  };
63
67
  FileListItemActionButtonComponent.prototype.onPauseResumeClick = function () {
64
68
  if (this.disabled) {
@@ -156,10 +160,11 @@ var FileListItemActionButtonComponent = /** @class */ (function () {
156
160
  FileListItemActionButtonComponent = tslib_1.__decorate([
157
161
  core_1.Component({
158
162
  selector: 'kendo-upload-file-list-item-action-button',
159
- template: "\n <strong class=\"k-upload-status\">\n <span class=\"k-upload-pct\" *ngIf=\"isUploading || isPaused\">{{progress}}%</span>\n\n <button type=\"button\" *ngIf=\"isFailed\" class=\"k-button k-button-icon k-flat k-upload-action\"\n [ngClass]=\"{ 'k-state-focused': this.retryFocused }\"\n [attr.tabIndex]=\"-1\"\n (focus)=\"onFocus('retry')\"\n (blur)=\"onBlur('retry')\"\n (click)=\"onRetryClick()\">\n <span class=\"k-icon k-retry k-i-refresh-sm\"\n [attr.aria-label]=\"retryButtonTitle\"\n [attr.title]=\"retryButtonTitle\">\n </span>\n </button>\n\n <button *ngIf=\"isResumable\" type=\"button\" class=\"k-button k-button-icon k-flat k-upload-action\"\n [ngClass]=\"{ 'k-state-focused': this.pauseResumeFocused }\"\n [attr.tabIndex]=\"-1\"\n (focus)=\"onFocus('pauseResume')\"\n (blur)=\"onBlur('pauseResume')\"\n (click)=\"onPauseResumeClick()\">\n <span class=\"k-icon\"\n [ngClass]=\"{\n 'k-i-play-sm': isPaused,\n 'k-i-pause-sm': !isPaused\n }\"\n [attr.aria-label]='pauseResumeButtonTitle'\n [attr.title]='pauseResumeButtonTitle'>\n </span>\n </button>\n\n <button type=\"button\" *ngIf=\"isActionButtonVisible\" class=\"k-button k-button-icon k-flat k-upload-action\"\n [ngClass]=\"{ 'k-state-focused': this.actionFocused }\"\n [attr.tabIndex]=\"-1\"\n (focus)=\"onFocus('action')\"\n (blur)=\"onBlur('action')\"\n (click)=\"onRemoveCancelClick()\">\n <span class=\"k-icon\"\n [ngClass]=\"{\n 'k-i-cancel': isUploading,\n 'k-delete k-i-x': !isUploading\n }\"\n [attr.aria-label]='actionButtonTitle'\n [attr.title]='actionButtonTitle'>\n </span>\n </button>\n </strong>\n "
163
+ template: "\n <strong class=\"k-upload-status\">\n <span class=\"k-upload-pct\" *ngIf=\"isUploading || isPaused\">{{progress}}%</span>\n\n <button type=\"button\" *ngIf=\"isFailed\" class=\"k-button k-button-icon k-flat k-upload-action\"\n [ngClass]=\"{ 'k-state-focused': this.retryFocused }\"\n [attr.tabIndex]=\"-1\"\n (focus)=\"onFocus('retry')\"\n (blur)=\"onBlur('retry')\"\n (click)=\"onRetryClick()\">\n <span class=\"k-icon k-retry k-i-refresh-sm\"\n [attr.aria-label]=\"retryButtonTitle\"\n [attr.title]=\"retryButtonTitle\">\n </span>\n </button>\n\n <button *ngIf=\"isResumable\" type=\"button\" class=\"k-button k-button-icon k-flat k-upload-action\"\n [ngClass]=\"{ 'k-state-focused': this.pauseResumeFocused }\"\n [attr.tabIndex]=\"-1\"\n (focus)=\"onFocus('pauseResume')\"\n (blur)=\"onBlur('pauseResume')\"\n (click)=\"onPauseResumeClick()\">\n <span class=\"k-icon\"\n [ngClass]=\"{\n 'k-i-play-sm': isPaused,\n 'k-i-pause-sm': !isPaused\n }\"\n [attr.aria-label]='pauseResumeButtonTitle'\n [attr.title]='pauseResumeButtonTitle'>\n </span>\n </button>\n\n <button type=\"button\" *ngIf=\"isActionButtonVisible\" class=\"k-button k-button-icon k-flat k-upload-action\"\n [ngClass]=\"{ 'k-state-focused': this.actionFocused }\"\n [attr.tabIndex]=\"-1\"\n (focus)=\"onFocus('action')\"\n (blur)=\"onBlur('action')\"\n (click)=\"onRemoveCancelClick($event)\">\n <span class=\"k-icon\"\n [ngClass]=\"{\n 'k-i-cancel': isUploading,\n 'k-delete k-i-x': !isUploading\n }\"\n [attr.aria-label]='actionButtonTitle'\n [attr.title]='actionButtonTitle'>\n </span>\n </button>\n </strong>\n "
160
164
  }),
161
165
  tslib_1.__metadata("design:paramtypes", [upload_service_1.UploadService,
162
- kendo_angular_l10n_1.LocalizationService])
166
+ kendo_angular_l10n_1.LocalizationService,
167
+ navigation_service_1.NavigationService])
163
168
  ], FileListItemActionButtonComponent);
164
169
  return FileListItemActionButtonComponent;
165
170
  }());
@@ -58,7 +58,6 @@ var UploadActionButtonsComponent = /** @class */ (function () {
58
58
  else {
59
59
  _this.performUpload();
60
60
  }
61
- _this.navigation.focusSelectButton();
62
61
  });
63
62
  };
64
63
  UploadActionButtonsComponent.prototype.onFocus = function () {
@@ -75,14 +74,24 @@ var UploadActionButtonsComponent = /** @class */ (function () {
75
74
  this.actionSubscription.unsubscribe();
76
75
  this.focusSubscription.unsubscribe();
77
76
  };
78
- UploadActionButtonsComponent.prototype.performUpload = function (_event) {
77
+ UploadActionButtonsComponent.prototype.onUploadButtonClick = function (event) {
78
+ event.stopImmediatePropagation();
79
+ this.performUpload();
80
+ };
81
+ UploadActionButtonsComponent.prototype.performUpload = function () {
79
82
  if (!this.disabled) {
80
83
  this.uploadService.uploadFiles();
84
+ this.navigation.focusSelectButton();
81
85
  }
82
86
  };
83
- UploadActionButtonsComponent.prototype.clearFiles = function (_event) {
87
+ UploadActionButtonsComponent.prototype.onClearButtonClick = function (event) {
88
+ event.stopImmediatePropagation();
89
+ this.clearFiles();
90
+ };
91
+ UploadActionButtonsComponent.prototype.clearFiles = function () {
84
92
  if (!this.disabled) {
85
93
  this.uploadService.clearFiles();
94
+ this.navigation.focusSelectButton();
86
95
  }
87
96
  };
88
97
  UploadActionButtonsComponent.prototype.textFor = function (key) {
@@ -131,7 +140,7 @@ var UploadActionButtonsComponent = /** @class */ (function () {
131
140
  UploadActionButtonsComponent = tslib_1.__decorate([
132
141
  core_1.Component({
133
142
  selector: 'kendo-upload-action-buttons',
134
- template: "\n <button #clearButton type=\"button\" class=\"k-button k-clear-selected\"\n [attr.tabIndex]=\"-1\"\n (click)=\"clearFiles($event)\">\n {{textFor('clearSelectedFiles')}}\n </button>\n <button #uploadButton type=\"button\" class=\"k-button k-primary k-upload-selected\"\n [attr.tabIndex]=\"-1\"\n (click)=\"performUpload($event)\">\n {{textFor('uploadSelectedFiles')}}\n </button>\n "
143
+ template: "\n <button #clearButton type=\"button\" class=\"k-button k-clear-selected\"\n [attr.tabIndex]=\"-1\"\n (click)=\"onClearButtonClick($event)\">\n {{textFor('clearSelectedFiles')}}\n </button>\n <button #uploadButton type=\"button\" class=\"k-button k-primary k-upload-selected\"\n [attr.tabIndex]=\"-1\"\n (click)=\"onUploadButtonClick($event)\">\n {{textFor('uploadSelectedFiles')}}\n </button>\n "
135
144
  }),
136
145
  tslib_1.__metadata("design:paramtypes", [upload_service_1.UploadService,
137
146
  kendo_angular_l10n_1.LocalizationService,