@progress/kendo-angular-upload 11.2.0-develop.6 → 11.2.0-develop.8
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/esm2020/fileselect.component.mjs +15 -7
- package/esm2020/navigation.service.mjs +33 -13
- package/esm2020/package-metadata.mjs +2 -2
- package/esm2020/rendering/file-list-item-action-button.component.mjs +6 -2
- package/esm2020/rendering/file-list-multiple-items.component.mjs +2 -2
- package/esm2020/rendering/file-list-single-item.component.mjs +2 -2
- package/esm2020/rendering/file-list.component.mjs +10 -0
- package/esm2020/rendering/upload-action-buttons.component.mjs +5 -8
- package/esm2020/upload.component.mjs +14 -34
- package/fesm2015/progress-kendo-angular-upload.mjs +89 -70
- package/fesm2020/progress-kendo-angular-upload.mjs +89 -70
- package/fileselect.component.d.ts +1 -0
- package/navigation.service.d.ts +4 -3
- package/package.json +7 -7
- package/schematics/ngAdd/index.js +3 -3
- package/upload.component.d.ts +1 -9
|
@@ -1352,17 +1352,18 @@ class NavigationService {
|
|
|
1352
1352
|
process(event) {
|
|
1353
1353
|
const handler = this.action(event);
|
|
1354
1354
|
if (handler) {
|
|
1355
|
-
handler(event
|
|
1355
|
+
handler(event);
|
|
1356
1356
|
}
|
|
1357
1357
|
}
|
|
1358
1358
|
computeKeys(direction) {
|
|
1359
1359
|
this.keyBindings = {
|
|
1360
|
-
[Keys.
|
|
1360
|
+
[Keys.Space]: () => this.handleSpace(),
|
|
1361
|
+
[Keys.Enter]: (event) => this.handleEnter(event),
|
|
1361
1362
|
[Keys.Escape]: () => this.handleEscape(),
|
|
1362
1363
|
[Keys.Delete]: () => this.handleDelete(),
|
|
1363
|
-
[Keys.Tab]: (
|
|
1364
|
-
[Keys.ArrowUp]: () => this.handleUp(),
|
|
1365
|
-
[Keys.ArrowDown]: () => this.handleDown(),
|
|
1364
|
+
[Keys.Tab]: (event) => this.handleTab(event.shiftKey),
|
|
1365
|
+
[Keys.ArrowUp]: (event) => this.handleUp(event),
|
|
1366
|
+
[Keys.ArrowDown]: (event) => this.handleDown(event),
|
|
1366
1367
|
[this.invertKeys(direction, Keys.ArrowLeft, Keys.ArrowRight)]: () => this.handleLeft(),
|
|
1367
1368
|
[this.invertKeys(direction, Keys.ArrowRight, Keys.ArrowLeft)]: () => this.handleRight()
|
|
1368
1369
|
};
|
|
@@ -1375,7 +1376,7 @@ class NavigationService {
|
|
|
1375
1376
|
this._focusedIndex = -1;
|
|
1376
1377
|
this.onSelectButtonFocus.emit();
|
|
1377
1378
|
}
|
|
1378
|
-
handleEnter() {
|
|
1379
|
+
handleEnter(event) {
|
|
1379
1380
|
if (this.lastIndex >= 0) {
|
|
1380
1381
|
this.zone.run(() => {
|
|
1381
1382
|
if (this.focusedIndex <= this.lastFileIndex) {
|
|
@@ -1383,11 +1384,17 @@ class NavigationService {
|
|
|
1383
1384
|
return;
|
|
1384
1385
|
}
|
|
1385
1386
|
if (this.actionButtonsVisible && this.focusedIndex <= this.lastIndex) {
|
|
1387
|
+
event.preventDefault();
|
|
1386
1388
|
this.onActionButtonAction.emit(this.focusedIndex < this.lastIndex ? "clear" : "upload");
|
|
1387
1389
|
}
|
|
1388
1390
|
});
|
|
1389
1391
|
}
|
|
1390
1392
|
}
|
|
1393
|
+
handleSpace() {
|
|
1394
|
+
if (this.focusedIndex >= 0 && this.focusedIndex <= this.lastFileIndex) {
|
|
1395
|
+
this.zone.run(() => this.onFileAction.emit(Keys.Space));
|
|
1396
|
+
}
|
|
1397
|
+
}
|
|
1391
1398
|
handleDelete() {
|
|
1392
1399
|
if (this.focusedIndex >= 0 && this.focusedIndex <= this.lastFileIndex) {
|
|
1393
1400
|
this.zone.run(() => {
|
|
@@ -1417,16 +1424,28 @@ class NavigationService {
|
|
|
1417
1424
|
}
|
|
1418
1425
|
}
|
|
1419
1426
|
handleTab(shifted) {
|
|
1420
|
-
if (this.focusedIndex
|
|
1421
|
-
this.focusedIndex =
|
|
1427
|
+
if (this.focusedIndex === -1) {
|
|
1428
|
+
this.focusedIndex = this.lastFileIndex + 1;
|
|
1429
|
+
this.zone.run(() => this.onActionButtonFocus.emit("clear"));
|
|
1422
1430
|
return;
|
|
1423
1431
|
}
|
|
1424
|
-
this.
|
|
1425
|
-
this.
|
|
1426
|
-
|
|
1432
|
+
if (this.focusedIndex === this.lastFileIndex + 1) {
|
|
1433
|
+
this.focusedIndex += 1;
|
|
1434
|
+
this.zone.run(() => this.onActionButtonFocus.emit("upload"));
|
|
1435
|
+
return;
|
|
1436
|
+
}
|
|
1437
|
+
if (this.focusedIndex === this.lastIndex && shifted) {
|
|
1438
|
+
this.focusedIndex -= 1;
|
|
1439
|
+
return;
|
|
1440
|
+
}
|
|
1441
|
+
if (this.focusedIndex === this.lastFileIndex + 1 && shifted) {
|
|
1442
|
+
this.focusedIndex = -1;
|
|
1443
|
+
this.zone.run(() => this.onSelectButtonFocus.emit());
|
|
1444
|
+
}
|
|
1427
1445
|
}
|
|
1428
|
-
handleDown() {
|
|
1446
|
+
handleDown(event) {
|
|
1429
1447
|
if (this.lastIndex >= 0 && this.focusedIndex < this.lastIndex) {
|
|
1448
|
+
event.preventDefault();
|
|
1430
1449
|
this.zone.run(() => {
|
|
1431
1450
|
if (this.focusedIndex < this.lastFileIndex) {
|
|
1432
1451
|
this.focusedIndex += 1;
|
|
@@ -1440,8 +1459,9 @@ class NavigationService {
|
|
|
1440
1459
|
});
|
|
1441
1460
|
}
|
|
1442
1461
|
}
|
|
1443
|
-
handleUp() {
|
|
1462
|
+
handleUp(event) {
|
|
1444
1463
|
if (this.lastIndex >= 0 && this.focusedIndex > -1) {
|
|
1464
|
+
event.preventDefault();
|
|
1445
1465
|
this.zone.run(() => {
|
|
1446
1466
|
this.focusedIndex -= 1;
|
|
1447
1467
|
if (this.focusedIndex === -1) {
|
|
@@ -1493,8 +1513,8 @@ const packageMetadata = {
|
|
|
1493
1513
|
name: '@progress/kendo-angular-upload',
|
|
1494
1514
|
productName: 'Kendo UI for Angular',
|
|
1495
1515
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
1496
|
-
publishDate:
|
|
1497
|
-
version: '11.2.0-develop.
|
|
1516
|
+
publishDate: 1675699159,
|
|
1517
|
+
version: '11.2.0-develop.8',
|
|
1498
1518
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
1499
1519
|
};
|
|
1500
1520
|
|
|
@@ -1817,7 +1837,7 @@ FileListItemActionButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion
|
|
|
1817
1837
|
class="k-button k-icon-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-upload-action"
|
|
1818
1838
|
[ngClass]="{ 'k-focus': this.retryFocused }"
|
|
1819
1839
|
[attr.tabIndex]="-1"
|
|
1820
|
-
|
|
1840
|
+
[attr.aria-hidden]="true"
|
|
1821
1841
|
(focus)="onFocus('retry')"
|
|
1822
1842
|
(blur)="onBlur('retry')"
|
|
1823
1843
|
(click)="onRetryClick()"
|
|
@@ -1837,6 +1857,7 @@ FileListItemActionButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion
|
|
|
1837
1857
|
class="k-button k-icon-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-upload-action"
|
|
1838
1858
|
[ngClass]="{ 'k-focus': this.pauseResumeFocused }"
|
|
1839
1859
|
[attr.tabIndex]="-1"
|
|
1860
|
+
[attr.aria-hidden]="true"
|
|
1840
1861
|
(focus)="onFocus('pauseResume')"
|
|
1841
1862
|
(blur)="onBlur('pauseResume')"
|
|
1842
1863
|
(click)="onPauseResumeClick()"
|
|
@@ -1854,6 +1875,7 @@ FileListItemActionButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion
|
|
|
1854
1875
|
class="k-button k-icon-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-upload-action"
|
|
1855
1876
|
type="button"
|
|
1856
1877
|
[attr.tabIndex]="-1"
|
|
1878
|
+
[attr.aria-hidden]="true"
|
|
1857
1879
|
(focus)="onFocus('action')"
|
|
1858
1880
|
(blur)="onBlur('action')"
|
|
1859
1881
|
[ngClass]="{ 'k-focus': this.actionFocused }"
|
|
@@ -1883,7 +1905,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1883
1905
|
class="k-button k-icon-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-upload-action"
|
|
1884
1906
|
[ngClass]="{ 'k-focus': this.retryFocused }"
|
|
1885
1907
|
[attr.tabIndex]="-1"
|
|
1886
|
-
|
|
1908
|
+
[attr.aria-hidden]="true"
|
|
1887
1909
|
(focus)="onFocus('retry')"
|
|
1888
1910
|
(blur)="onBlur('retry')"
|
|
1889
1911
|
(click)="onRetryClick()"
|
|
@@ -1903,6 +1925,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1903
1925
|
class="k-button k-icon-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-upload-action"
|
|
1904
1926
|
[ngClass]="{ 'k-focus': this.pauseResumeFocused }"
|
|
1905
1927
|
[attr.tabIndex]="-1"
|
|
1928
|
+
[attr.aria-hidden]="true"
|
|
1906
1929
|
(focus)="onFocus('pauseResume')"
|
|
1907
1930
|
(blur)="onBlur('pauseResume')"
|
|
1908
1931
|
(click)="onPauseResumeClick()"
|
|
@@ -1920,6 +1943,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1920
1943
|
class="k-button k-icon-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-upload-action"
|
|
1921
1944
|
type="button"
|
|
1922
1945
|
[attr.tabIndex]="-1"
|
|
1946
|
+
[attr.aria-hidden]="true"
|
|
1923
1947
|
(focus)="onFocus('action')"
|
|
1924
1948
|
(blur)="onBlur('action')"
|
|
1925
1949
|
[ngClass]="{ 'k-focus': this.actionFocused }"
|
|
@@ -2017,7 +2041,7 @@ FileListSingleItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.
|
|
|
2017
2041
|
<span class="k-file-info">
|
|
2018
2042
|
<ng-container *ngIf="!fileInfoTemplate">
|
|
2019
2043
|
<span class="k-file-name" [title]="file.name">{{ file.name }}</span>
|
|
2020
|
-
<span [ngClass]="{
|
|
2044
|
+
<span [attr.aria-live]="'polite'" [ngClass]="{
|
|
2021
2045
|
'k-file-validation-message': file.validationErrors,
|
|
2022
2046
|
'k-file-size': !file.validationErrors && isNotYetUploaded,
|
|
2023
2047
|
'k-file-summary': isUploadSuccessful || isUploadFailed
|
|
@@ -2075,7 +2099,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
2075
2099
|
<span class="k-file-info">
|
|
2076
2100
|
<ng-container *ngIf="!fileInfoTemplate">
|
|
2077
2101
|
<span class="k-file-name" [title]="file.name">{{ file.name }}</span>
|
|
2078
|
-
<span [ngClass]="{
|
|
2102
|
+
<span [attr.aria-live]="'polite'" [ngClass]="{
|
|
2079
2103
|
'k-file-validation-message': file.validationErrors,
|
|
2080
2104
|
'k-file-size': !file.validationErrors && isNotYetUploaded,
|
|
2081
2105
|
'k-file-summary': isUploadSuccessful || isUploadFailed
|
|
@@ -2171,7 +2195,7 @@ FileListMultipleItemsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
|
2171
2195
|
<span [title]="file.name" class="k-file-name">
|
|
2172
2196
|
{{file.name}}
|
|
2173
2197
|
</span>
|
|
2174
|
-
<span [ngClass]="{
|
|
2198
|
+
<span [attr.aria-live]="'polite'" [ngClass]="{
|
|
2175
2199
|
'k-file-validation-message': file.validationErrors,
|
|
2176
2200
|
'k-file-size': !file.validationErrors
|
|
2177
2201
|
}"
|
|
@@ -2237,7 +2261,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
2237
2261
|
<span [title]="file.name" class="k-file-name">
|
|
2238
2262
|
{{file.name}}
|
|
2239
2263
|
</span>
|
|
2240
|
-
<span [ngClass]="{
|
|
2264
|
+
<span [attr.aria-live]="'polite'" [ngClass]="{
|
|
2241
2265
|
'k-file-validation-message': file.validationErrors,
|
|
2242
2266
|
'k-file-size': !file.validationErrors
|
|
2243
2267
|
}"
|
|
@@ -2314,6 +2338,16 @@ class FileListComponent {
|
|
|
2314
2338
|
}
|
|
2315
2339
|
this.navigation.focusSelectButton();
|
|
2316
2340
|
}
|
|
2341
|
+
const isUploadChunk = this.uploadService.async.chunk;
|
|
2342
|
+
const canTogglePauseResume = key === Keys.Space && files[0].state !== FileState.Uploaded;
|
|
2343
|
+
if (canTogglePauseResume && isUploadChunk) {
|
|
2344
|
+
if (files[0].state === FileState.Paused) {
|
|
2345
|
+
this.uploadService.resumeFile(uid);
|
|
2346
|
+
}
|
|
2347
|
+
else {
|
|
2348
|
+
this.uploadService.pauseFile(uid);
|
|
2349
|
+
}
|
|
2350
|
+
}
|
|
2317
2351
|
}
|
|
2318
2352
|
hasDelete(item) {
|
|
2319
2353
|
return item.element.nativeElement.getElementsByClassName('k-delete').length > 0;
|
|
@@ -2891,6 +2925,9 @@ class FileSelectComponent {
|
|
|
2891
2925
|
get dir() {
|
|
2892
2926
|
return this.direction;
|
|
2893
2927
|
}
|
|
2928
|
+
get hostRole() {
|
|
2929
|
+
return 'application';
|
|
2930
|
+
}
|
|
2894
2931
|
ngOnInit() {
|
|
2895
2932
|
const { buttonId, inputId } = this.getIds();
|
|
2896
2933
|
this.focusableId = buttonId;
|
|
@@ -2920,6 +2957,8 @@ class FileSelectComponent {
|
|
|
2920
2957
|
focus() {
|
|
2921
2958
|
setTimeout(() => {
|
|
2922
2959
|
this.fileSelectButton.nativeElement.focus();
|
|
2960
|
+
this.navigation.focused = true;
|
|
2961
|
+
this.onFocus.emit();
|
|
2923
2962
|
});
|
|
2924
2963
|
}
|
|
2925
2964
|
ngOnDestroy() {
|
|
@@ -3109,7 +3148,7 @@ class FileSelectComponent {
|
|
|
3109
3148
|
}
|
|
3110
3149
|
}
|
|
3111
3150
|
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 });
|
|
3112
|
-
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: [
|
|
3151
|
+
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", "attr.role": "this.hostRole" } }, providers: [
|
|
3113
3152
|
LocalizationService,
|
|
3114
3153
|
NavigationService,
|
|
3115
3154
|
UploadService,
|
|
@@ -3153,19 +3192,19 @@ FileSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
3153
3192
|
kendoButton
|
|
3154
3193
|
#fileSelectButton
|
|
3155
3194
|
class="k-upload-button"
|
|
3156
|
-
|
|
3195
|
+
type="button"
|
|
3196
|
+
(click)="fileSelectInput.click()"
|
|
3157
3197
|
[id]="focusableId"
|
|
3158
3198
|
[attr.aria-label]="textFor('select')"
|
|
3159
3199
|
[attr.tabindex]="tabindex"
|
|
3160
3200
|
[attr.aria-controls]="inputElementId"
|
|
3161
|
-
(focus)="onFileSelectButtonFocus($event)"
|
|
3162
|
-
(blur)="onFileSelectButtonBlur($event)"
|
|
3163
3201
|
>
|
|
3164
3202
|
{{textFor('select')}}
|
|
3165
3203
|
</button>
|
|
3166
3204
|
<input
|
|
3167
3205
|
#fileSelectInput
|
|
3168
3206
|
kendoFileSelect
|
|
3207
|
+
class="k-hidden"
|
|
3169
3208
|
[id]="inputElementId"
|
|
3170
3209
|
[attr.accept]="accept ? accept : null"
|
|
3171
3210
|
[attr.aria-hidden]="true"
|
|
@@ -3236,19 +3275,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
3236
3275
|
kendoButton
|
|
3237
3276
|
#fileSelectButton
|
|
3238
3277
|
class="k-upload-button"
|
|
3239
|
-
|
|
3278
|
+
type="button"
|
|
3279
|
+
(click)="fileSelectInput.click()"
|
|
3240
3280
|
[id]="focusableId"
|
|
3241
3281
|
[attr.aria-label]="textFor('select')"
|
|
3242
3282
|
[attr.tabindex]="tabindex"
|
|
3243
3283
|
[attr.aria-controls]="inputElementId"
|
|
3244
|
-
(focus)="onFileSelectButtonFocus($event)"
|
|
3245
|
-
(blur)="onFileSelectButtonBlur($event)"
|
|
3246
3284
|
>
|
|
3247
3285
|
{{textFor('select')}}
|
|
3248
3286
|
</button>
|
|
3249
3287
|
<input
|
|
3250
3288
|
#fileSelectInput
|
|
3251
3289
|
kendoFileSelect
|
|
3290
|
+
class="k-hidden"
|
|
3252
3291
|
[id]="inputElementId"
|
|
3253
3292
|
[attr.accept]="accept ? accept : null"
|
|
3254
3293
|
[attr.aria-hidden]="true"
|
|
@@ -3321,6 +3360,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
3321
3360
|
}], dir: [{
|
|
3322
3361
|
type: HostBinding,
|
|
3323
3362
|
args: ['attr.dir']
|
|
3363
|
+
}], hostRole: [{
|
|
3364
|
+
type: HostBinding,
|
|
3365
|
+
args: ['attr.role']
|
|
3324
3366
|
}] } });
|
|
3325
3367
|
|
|
3326
3368
|
/**
|
|
@@ -3444,6 +3486,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
3444
3486
|
type: Input
|
|
3445
3487
|
}] } });
|
|
3446
3488
|
|
|
3489
|
+
/* eslint-disable no-debugger */
|
|
3447
3490
|
/**
|
|
3448
3491
|
* @hidden
|
|
3449
3492
|
*/
|
|
@@ -3517,13 +3560,11 @@ class UploadActionButtonsComponent {
|
|
|
3517
3560
|
}
|
|
3518
3561
|
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 });
|
|
3519
3562
|
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: `
|
|
3520
|
-
<button #clearButton
|
|
3521
|
-
[attr.tabIndex]="-1"
|
|
3563
|
+
<button #clearButton role="button" class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-clear-selected"
|
|
3522
3564
|
(click)="onClearButtonClick($event)">
|
|
3523
3565
|
{{textFor('clearSelectedFiles')}}
|
|
3524
3566
|
</button>
|
|
3525
|
-
<button #uploadButton
|
|
3526
|
-
[attr.tabIndex]="-1"
|
|
3567
|
+
<button #uploadButton role="button" class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-primary k-upload-selected"
|
|
3527
3568
|
(click)="onUploadButtonClick($event)">
|
|
3528
3569
|
{{textFor('uploadSelectedFiles')}}
|
|
3529
3570
|
</button>
|
|
@@ -3533,13 +3574,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
3533
3574
|
args: [{
|
|
3534
3575
|
selector: 'kendo-upload-action-buttons',
|
|
3535
3576
|
template: `
|
|
3536
|
-
<button #clearButton
|
|
3537
|
-
[attr.tabIndex]="-1"
|
|
3577
|
+
<button #clearButton role="button" class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-clear-selected"
|
|
3538
3578
|
(click)="onClearButtonClick($event)">
|
|
3539
3579
|
{{textFor('clearSelectedFiles')}}
|
|
3540
3580
|
</button>
|
|
3541
|
-
<button #uploadButton
|
|
3542
|
-
[attr.tabIndex]="-1"
|
|
3581
|
+
<button #uploadButton role="button" class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-primary k-upload-selected"
|
|
3543
3582
|
(click)="onUploadButtonClick($event)">
|
|
3544
3583
|
{{textFor('uploadSelectedFiles')}}
|
|
3545
3584
|
</button>
|
|
@@ -3862,6 +3901,9 @@ class UploadComponent {
|
|
|
3862
3901
|
get restrictions() {
|
|
3863
3902
|
return this._restrictions;
|
|
3864
3903
|
}
|
|
3904
|
+
get hostRole() {
|
|
3905
|
+
return 'application';
|
|
3906
|
+
}
|
|
3865
3907
|
get hostDisabledClass() {
|
|
3866
3908
|
return this.disabled;
|
|
3867
3909
|
}
|
|
@@ -3870,21 +3912,12 @@ class UploadComponent {
|
|
|
3870
3912
|
}
|
|
3871
3913
|
ngOnInit() {
|
|
3872
3914
|
this.verifySettings();
|
|
3873
|
-
const { buttonId
|
|
3915
|
+
const { buttonId } = this.getIds();
|
|
3874
3916
|
this.focusableId = buttonId;
|
|
3875
|
-
this.inputElementId = inputId;
|
|
3876
3917
|
this.uploadService.setChunkSettings(this.chunkable);
|
|
3877
3918
|
if (this.zoneId) {
|
|
3878
3919
|
this.dropZoneService.addComponent(this, this.zoneId);
|
|
3879
3920
|
}
|
|
3880
|
-
const button = this.fileSelectButton.nativeElement;
|
|
3881
|
-
const input = this.fileSelectInput.nativeElement;
|
|
3882
|
-
this.subs.add(this.renderer.listen(input, 'mouseenter', () => {
|
|
3883
|
-
this.renderer.addClass(button, 'k-hover');
|
|
3884
|
-
}));
|
|
3885
|
-
this.subs.add(this.renderer.listen(input, 'mouseleave', () => {
|
|
3886
|
-
this.renderer.removeClass(button, 'k-hover');
|
|
3887
|
-
}));
|
|
3888
3921
|
this.zone.runOutsideAngular(() => {
|
|
3889
3922
|
this.subs.add(this.renderer.listen(this.wrapper, 'keydown', event => this.handleKeydown(event)));
|
|
3890
3923
|
});
|
|
@@ -3957,21 +3990,6 @@ class UploadComponent {
|
|
|
3957
3990
|
setDisabledState(isDisabled) {
|
|
3958
3991
|
this.disabled = isDisabled;
|
|
3959
3992
|
}
|
|
3960
|
-
/**
|
|
3961
|
-
* @hidden
|
|
3962
|
-
*/
|
|
3963
|
-
onFileSelectButtonFocus(_event) {
|
|
3964
|
-
this.renderer.addClass(this.fileSelectButton.nativeElement, 'k-focus');
|
|
3965
|
-
if (!this.navigation.focused) {
|
|
3966
|
-
this.navigation.focusedIndex = -1;
|
|
3967
|
-
}
|
|
3968
|
-
}
|
|
3969
|
-
/**
|
|
3970
|
-
* @hidden
|
|
3971
|
-
*/
|
|
3972
|
-
onFileSelectButtonBlur(_event) {
|
|
3973
|
-
this.renderer.removeClass(this.fileSelectButton.nativeElement, 'k-focus');
|
|
3974
|
-
}
|
|
3975
3993
|
/**
|
|
3976
3994
|
* @hidden
|
|
3977
3995
|
*/
|
|
@@ -4027,6 +4045,8 @@ class UploadComponent {
|
|
|
4027
4045
|
focus() {
|
|
4028
4046
|
setTimeout(() => {
|
|
4029
4047
|
this.fileSelectButton.nativeElement.focus();
|
|
4048
|
+
this.navigation.focused = true;
|
|
4049
|
+
this.onFocus.emit();
|
|
4030
4050
|
});
|
|
4031
4051
|
}
|
|
4032
4052
|
/**
|
|
@@ -4210,7 +4230,7 @@ class UploadComponent {
|
|
|
4210
4230
|
}
|
|
4211
4231
|
}
|
|
4212
4232
|
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 });
|
|
4213
|
-
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: [
|
|
4233
|
+
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", "attr.role": "this.hostRole", "class.k-disabled": "this.hostDisabledClass", "attr.dir": "this.dir" } }, providers: [
|
|
4214
4234
|
LocalizationService,
|
|
4215
4235
|
NavigationService,
|
|
4216
4236
|
UploadService,
|
|
@@ -4298,19 +4318,17 @@ UploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
|
|
|
4298
4318
|
#fileSelectButton
|
|
4299
4319
|
class="k-upload-button"
|
|
4300
4320
|
role="button"
|
|
4321
|
+
(click)="fileSelectInput.click()"
|
|
4301
4322
|
[id]="focusableId"
|
|
4302
4323
|
[attr.aria-label]="textFor('select')"
|
|
4303
4324
|
[attr.tabindex]="tabindex"
|
|
4304
|
-
[attr.aria-controls]="inputElementId"
|
|
4305
|
-
(focus)="onFileSelectButtonFocus($event)"
|
|
4306
|
-
(blur)="onFileSelectButtonBlur($event)"
|
|
4307
4325
|
>
|
|
4308
4326
|
{{textFor('select')}}
|
|
4309
4327
|
</button>
|
|
4310
4328
|
<input
|
|
4311
4329
|
#fileSelectInput
|
|
4312
4330
|
kendoFileSelect
|
|
4313
|
-
|
|
4331
|
+
class="k-hidden"
|
|
4314
4332
|
[attr.accept]="accept ? accept : null"
|
|
4315
4333
|
[attr.aria-hidden]="true"
|
|
4316
4334
|
[dir]="direction"
|
|
@@ -4432,19 +4450,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
4432
4450
|
#fileSelectButton
|
|
4433
4451
|
class="k-upload-button"
|
|
4434
4452
|
role="button"
|
|
4453
|
+
(click)="fileSelectInput.click()"
|
|
4435
4454
|
[id]="focusableId"
|
|
4436
4455
|
[attr.aria-label]="textFor('select')"
|
|
4437
4456
|
[attr.tabindex]="tabindex"
|
|
4438
|
-
[attr.aria-controls]="inputElementId"
|
|
4439
|
-
(focus)="onFileSelectButtonFocus($event)"
|
|
4440
|
-
(blur)="onFileSelectButtonBlur($event)"
|
|
4441
4457
|
>
|
|
4442
4458
|
{{textFor('select')}}
|
|
4443
4459
|
</button>
|
|
4444
4460
|
<input
|
|
4445
4461
|
#fileSelectInput
|
|
4446
4462
|
kendoFileSelect
|
|
4447
|
-
|
|
4463
|
+
class="k-hidden"
|
|
4448
4464
|
[attr.accept]="accept ? accept : null"
|
|
4449
4465
|
[attr.aria-hidden]="true"
|
|
4450
4466
|
[dir]="direction"
|
|
@@ -4567,6 +4583,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
4567
4583
|
}], hostDefaultClasses: [{
|
|
4568
4584
|
type: HostBinding,
|
|
4569
4585
|
args: ['class.k-upload']
|
|
4586
|
+
}], hostRole: [{
|
|
4587
|
+
type: HostBinding,
|
|
4588
|
+
args: ['attr.role']
|
|
4570
4589
|
}], hostDisabledClass: [{
|
|
4571
4590
|
type: HostBinding,
|
|
4572
4591
|
args: ['class.k-disabled']
|
package/navigation.service.d.ts
CHANGED
|
@@ -29,14 +29,15 @@ export declare class NavigationService {
|
|
|
29
29
|
computeKeys(direction: Direction): void;
|
|
30
30
|
invertKeys(direction: Direction, original: any, inverted: any): any;
|
|
31
31
|
focusSelectButton(): void;
|
|
32
|
-
handleEnter(): void;
|
|
32
|
+
handleEnter(event: any): void;
|
|
33
|
+
handleSpace(): void;
|
|
33
34
|
handleDelete(): void;
|
|
34
35
|
handleEscape(): void;
|
|
35
36
|
handleLeft(): void;
|
|
36
37
|
handleRight(): void;
|
|
37
38
|
handleTab(shifted: boolean): void;
|
|
38
|
-
handleDown(): void;
|
|
39
|
-
handleUp(): void;
|
|
39
|
+
handleDown(event: any): void;
|
|
40
|
+
handleUp(event: any): void;
|
|
40
41
|
get focusedIndex(): number;
|
|
41
42
|
set focusedIndex(index: number);
|
|
42
43
|
get lastFileIndex(): number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-upload",
|
|
3
|
-
"version": "11.2.0-develop.
|
|
3
|
+
"version": "11.2.0-develop.8",
|
|
4
4
|
"description": "Kendo UI Angular Upload Component",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "Progress",
|
|
@@ -23,16 +23,16 @@
|
|
|
23
23
|
"@angular/core": "13 - 15",
|
|
24
24
|
"@angular/platform-browser": "13 - 15",
|
|
25
25
|
"@progress/kendo-licensing": "^1.0.2",
|
|
26
|
-
"@progress/kendo-angular-common": "11.2.0-develop.
|
|
27
|
-
"@progress/kendo-angular-l10n": "11.2.0-develop.
|
|
28
|
-
"@progress/kendo-angular-icons": "11.2.0-develop.
|
|
29
|
-
"@progress/kendo-angular-buttons": "11.2.0-develop.
|
|
30
|
-
"@progress/kendo-angular-progressbar": "11.2.0-develop.
|
|
26
|
+
"@progress/kendo-angular-common": "11.2.0-develop.8",
|
|
27
|
+
"@progress/kendo-angular-l10n": "11.2.0-develop.8",
|
|
28
|
+
"@progress/kendo-angular-icons": "11.2.0-develop.8",
|
|
29
|
+
"@progress/kendo-angular-buttons": "11.2.0-develop.8",
|
|
30
|
+
"@progress/kendo-angular-progressbar": "11.2.0-develop.8",
|
|
31
31
|
"rxjs": "^6.5.3 || ^7.0.0"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"tslib": "^2.3.1",
|
|
35
|
-
"@progress/kendo-angular-schematics": "11.2.0-develop.
|
|
35
|
+
"@progress/kendo-angular-schematics": "11.2.0-develop.8"
|
|
36
36
|
},
|
|
37
37
|
"schematics": "./schematics/collection.json",
|
|
38
38
|
"module": "fesm2015/progress-kendo-angular-upload.mjs",
|
|
@@ -10,9 +10,9 @@ function default_1(options) {
|
|
|
10
10
|
], peerDependencies: {
|
|
11
11
|
// peer dep of the icons
|
|
12
12
|
'@progress/kendo-svg-icons': '^1.0.0',
|
|
13
|
-
'@progress/kendo-angular-buttons': '11.2.0-develop.
|
|
14
|
-
'@progress/kendo-angular-progressbar': '11.2.0-develop.
|
|
15
|
-
'@progress/kendo-angular-popup': '11.2.0-develop.
|
|
13
|
+
'@progress/kendo-angular-buttons': '11.2.0-develop.8',
|
|
14
|
+
'@progress/kendo-angular-progressbar': '11.2.0-develop.8',
|
|
15
|
+
'@progress/kendo-angular-popup': '11.2.0-develop.8',
|
|
16
16
|
} });
|
|
17
17
|
return (0, schematics_1.externalSchematic)('@progress/kendo-angular-schematics', 'ng-add', finalOptions);
|
|
18
18
|
}
|
package/upload.component.d.ts
CHANGED
|
@@ -233,6 +233,7 @@ export declare class UploadComponent implements OnInit, OnDestroy, ControlValueA
|
|
|
233
233
|
*/
|
|
234
234
|
valueChange: EventEmitter<Array<FileInfo>>;
|
|
235
235
|
hostDefaultClasses: boolean;
|
|
236
|
+
get hostRole(): string;
|
|
236
237
|
get hostDisabledClass(): boolean;
|
|
237
238
|
get dir(): string;
|
|
238
239
|
/**
|
|
@@ -242,7 +243,6 @@ export declare class UploadComponent implements OnInit, OnDestroy, ControlValueA
|
|
|
242
243
|
fileList: FileMap;
|
|
243
244
|
direction: Direction;
|
|
244
245
|
wrapper: HTMLElement;
|
|
245
|
-
inputElementId: string;
|
|
246
246
|
private documentClick;
|
|
247
247
|
private blurSubscription;
|
|
248
248
|
private wrapperFocusSubscription;
|
|
@@ -271,14 +271,6 @@ export declare class UploadComponent implements OnInit, OnDestroy, ControlValueA
|
|
|
271
271
|
* @hidden
|
|
272
272
|
*/
|
|
273
273
|
setDisabledState(isDisabled: boolean): void;
|
|
274
|
-
/**
|
|
275
|
-
* @hidden
|
|
276
|
-
*/
|
|
277
|
-
onFileSelectButtonFocus(_event?: any): void;
|
|
278
|
-
/**
|
|
279
|
-
* @hidden
|
|
280
|
-
*/
|
|
281
|
-
onFileSelectButtonBlur(_event?: any): void;
|
|
282
274
|
/**
|
|
283
275
|
* @hidden
|
|
284
276
|
*/
|