@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.
- package/dist/cdn/js/kendo-angular-upload.js +1 -1
- package/dist/cdn/main.js +1 -1
- 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/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 +9 -4
- package/dist/es2015/rendering/upload-action-buttons.component.d.ts +4 -2
- package/dist/es2015/rendering/upload-action-buttons.component.js +14 -5
- package/dist/fesm2015/index.js +23 -10
- package/dist/fesm5/index.js +22 -9
- 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/systemjs/kendo-angular-upload.js +1 -1
- package/package.json +1 -1
|
@@ -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
|
var FileListItemActionButtonComponent = /** @class */ (function () {
|
|
14
|
-
function FileListItemActionButtonComponent(uploadService, localization) {
|
|
15
|
+
function FileListItemActionButtonComponent(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 @@ var FileListItemActionButtonComponent = /** @class */ (function () {
|
|
|
46
48
|
}
|
|
47
49
|
this.uploadService.retryFiles(this.file.uid);
|
|
48
50
|
};
|
|
49
|
-
FileListItemActionButtonComponent.prototype.onRemoveCancelClick = function () {
|
|
51
|
+
FileListItemActionButtonComponent.prototype.onRemoveCancelClick = function (event) {
|
|
50
52
|
if (this.disabled) {
|
|
51
53
|
return;
|
|
52
54
|
}
|
|
55
|
+
event.stopImmediatePropagation();
|
|
53
56
|
var uid = this.file.uid;
|
|
54
57
|
if (this.file.state === FileState.Uploading) {
|
|
55
58
|
this.uploadService.cancelFiles(uid);
|
|
@@ -57,6 +60,7 @@ var FileListItemActionButtonComponent = /** @class */ (function () {
|
|
|
57
60
|
else {
|
|
58
61
|
this.uploadService.removeFiles(uid);
|
|
59
62
|
}
|
|
63
|
+
this.navigation.focusSelectButton();
|
|
60
64
|
};
|
|
61
65
|
FileListItemActionButtonComponent.prototype.onPauseResumeClick = function () {
|
|
62
66
|
if (this.disabled) {
|
|
@@ -154,10 +158,11 @@ var FileListItemActionButtonComponent = /** @class */ (function () {
|
|
|
154
158
|
FileListItemActionButtonComponent = tslib_1.__decorate([
|
|
155
159
|
Component({
|
|
156
160
|
selector: 'kendo-upload-file-list-item-action-button',
|
|
157
|
-
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 "
|
|
161
|
+
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 "
|
|
158
162
|
}),
|
|
159
163
|
tslib_1.__metadata("design:paramtypes", [UploadService,
|
|
160
|
-
LocalizationService
|
|
164
|
+
LocalizationService,
|
|
165
|
+
NavigationService])
|
|
161
166
|
], FileListItemActionButtonComponent);
|
|
162
167
|
return FileListItemActionButtonComponent;
|
|
163
168
|
}());
|
|
@@ -56,7 +56,6 @@ var UploadActionButtonsComponent = /** @class */ (function () {
|
|
|
56
56
|
else {
|
|
57
57
|
_this.performUpload();
|
|
58
58
|
}
|
|
59
|
-
_this.navigation.focusSelectButton();
|
|
60
59
|
});
|
|
61
60
|
};
|
|
62
61
|
UploadActionButtonsComponent.prototype.onFocus = function () {
|
|
@@ -73,14 +72,24 @@ var UploadActionButtonsComponent = /** @class */ (function () {
|
|
|
73
72
|
this.actionSubscription.unsubscribe();
|
|
74
73
|
this.focusSubscription.unsubscribe();
|
|
75
74
|
};
|
|
76
|
-
UploadActionButtonsComponent.prototype.
|
|
75
|
+
UploadActionButtonsComponent.prototype.onUploadButtonClick = function (event) {
|
|
76
|
+
event.stopImmediatePropagation();
|
|
77
|
+
this.performUpload();
|
|
78
|
+
};
|
|
79
|
+
UploadActionButtonsComponent.prototype.performUpload = function () {
|
|
77
80
|
if (!this.disabled) {
|
|
78
81
|
this.uploadService.uploadFiles();
|
|
82
|
+
this.navigation.focusSelectButton();
|
|
79
83
|
}
|
|
80
84
|
};
|
|
81
|
-
UploadActionButtonsComponent.prototype.
|
|
85
|
+
UploadActionButtonsComponent.prototype.onClearButtonClick = function (event) {
|
|
86
|
+
event.stopImmediatePropagation();
|
|
87
|
+
this.clearFiles();
|
|
88
|
+
};
|
|
89
|
+
UploadActionButtonsComponent.prototype.clearFiles = function () {
|
|
82
90
|
if (!this.disabled) {
|
|
83
91
|
this.uploadService.clearFiles();
|
|
92
|
+
this.navigation.focusSelectButton();
|
|
84
93
|
}
|
|
85
94
|
};
|
|
86
95
|
UploadActionButtonsComponent.prototype.textFor = function (key) {
|
|
@@ -129,7 +138,7 @@ var UploadActionButtonsComponent = /** @class */ (function () {
|
|
|
129
138
|
UploadActionButtonsComponent = tslib_1.__decorate([
|
|
130
139
|
Component({
|
|
131
140
|
selector: 'kendo-upload-action-buttons',
|
|
132
|
-
template: "\n <button #clearButton type=\"button\" class=\"k-button k-clear-selected\"\n [attr.tabIndex]=\"-1\"\n (click)=\"
|
|
141
|
+
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 "
|
|
133
142
|
}),
|
|
134
143
|
tslib_1.__metadata("design:paramtypes", [UploadService,
|
|
135
144
|
LocalizationService,
|