@progress/kendo-angular-upload 9.0.4-dev.202211170816 → 11.0.0-develop.100
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +1 -1
- package/NOTICE.txt +4 -4
- package/README.md +1 -1
- package/common/action-buttons-layout.d.ts +1 -1
- package/common/util.d.ts +1 -1
- package/common/validation-util.d.ts +1 -1
- package/dropzone-base.d.ts +2 -2
- package/dropzone-external.directive.d.ts +1 -1
- package/dropzone-internal.directive.d.ts +1 -1
- package/dropzone.component.d.ts +11 -3
- package/dropzone.service.d.ts +1 -1
- package/{esm2015/types/chunk-metadata.js → esm2020/common/action-buttons-layout.mjs} +1 -1
- package/{esm2015/common/util.js → esm2020/common/util.mjs} +13 -10
- package/{esm2015/common/validation-util.js → esm2020/common/validation-util.mjs} +2 -2
- package/{esm2015/dropzone-base.js → esm2020/dropzone-base.mjs} +5 -5
- package/{esm2015/dropzone-external.directive.js → esm2020/dropzone-external.directive.mjs} +5 -5
- package/{esm2015/dropzone-internal.directive.js → esm2020/dropzone-internal.directive.mjs} +11 -7
- package/esm2020/dropzone.component.mjs +134 -0
- package/{esm2015/dropzone.service.js → esm2020/dropzone.service.mjs} +5 -5
- package/{esm2015/events/cancel-event.js → esm2020/events/cancel-event.mjs} +1 -1
- package/{esm2015/events/clear-event.js → esm2020/events/clear-event.mjs} +1 -1
- package/{esm2015/events/error-event.js → esm2020/events/error-event.mjs} +1 -1
- package/{esm2015/events/pause-event.js → esm2020/events/pause-event.mjs} +1 -1
- package/{esm2015/events/preventable-event.js → esm2020/events/preventable-event.mjs} +1 -1
- package/{esm2015/events/remove-event.js → esm2020/events/remove-event.mjs} +1 -1
- package/{esm2015/events/resume-event.js → esm2020/events/resume-event.mjs} +1 -1
- package/{esm2015/events/select-event.js → esm2020/events/select-event.mjs} +1 -1
- package/{esm2015/events/success-event.js → esm2020/events/success-event.mjs} +1 -1
- package/{esm2015/events/upload-event.js → esm2020/events/upload-event.mjs} +1 -1
- package/{esm2015/events/upload-progress-event.js → esm2020/events/upload-progress-event.mjs} +1 -1
- package/{esm2015/events.js → esm2020/events.mjs} +1 -1
- package/{esm2015/file-select.directive.js → esm2020/file-select.directive.mjs} +7 -5
- package/{esm2015/fileselect.component.js → esm2020/fileselect.component.mjs} +100 -60
- package/{esm2015/fileselect.module.js → esm2020/fileselect.module.mjs} +7 -6
- package/{esm2015/main.js → esm2020/index.mjs} +2 -1
- package/{esm2015/localization/custom-messages.component.js → esm2020/localization/custom-messages.component.mjs} +5 -4
- package/{esm2015/localization/localized-messages.directive.js → esm2020/localization/localized-messages.directive.mjs} +5 -4
- package/{esm2015/localization/messages.js → esm2020/localization/messages.mjs} +4 -4
- package/{esm2015/navigation.service.js → esm2020/navigation.service.mjs} +56 -40
- package/{esm2015/package-metadata.js → esm2020/package-metadata.mjs} +3 -3
- package/{esm2015/kendo-angular-upload.js → esm2020/progress-kendo-angular-upload.mjs} +2 -2
- package/esm2020/rendering/file-list-item-action-button.component.mjs +262 -0
- package/{esm2015/rendering/file-list-item-base.js → esm2020/rendering/file-list-item-base.mjs} +5 -4
- package/{esm2015/rendering/file-list-item.js → esm2020/rendering/file-list-item.mjs} +7 -5
- package/esm2020/rendering/file-list-multiple-items.component.mjs +186 -0
- package/esm2020/rendering/file-list-single-item.component.mjs +185 -0
- package/{esm2015/rendering/file-list.component.js → esm2020/rendering/file-list.component.mjs} +16 -11
- package/{esm2015/rendering/upload-action-buttons.component.js → esm2020/rendering/upload-action-buttons.component.mjs} +8 -5
- package/{esm2015/rendering/upload-status-total.component.js → esm2020/rendering/upload-status-total.component.mjs} +51 -22
- package/{esm2015/shared.module.js → esm2020/shared.module.mjs} +15 -9
- package/{esm2015/templates/file-info-template.directive.js → esm2020/templates/file-info-template.directive.mjs} +5 -5
- package/{esm2015/templates/file-template.directive.js → esm2020/templates/file-template.directive.mjs} +5 -5
- package/{esm2015/templates/template-context.directive.js → esm2020/templates/template-context.directive.mjs} +5 -5
- package/{esm2015/common/action-buttons-layout.js → esm2020/types/async-settings.mjs} +1 -1
- package/{esm2015/types/chunk-info.js → esm2020/types/chunk-info.mjs} +1 -1
- package/{esm2015/types/chunk-map.js → esm2020/types/chunk-map.mjs} +1 -1
- package/{esm2015/types/async-settings.js → esm2020/types/chunk-metadata.mjs} +1 -1
- package/esm2020/types/chunk-settings.mjs +5 -0
- package/esm2020/types/direction.mjs +5 -0
- package/{esm2015/types/file-groups.js → esm2020/types/file-groups.mjs} +19 -1
- package/esm2020/types/file-info.mjs +5 -0
- package/{esm2015/types/file-map.js → esm2020/types/file-map.mjs} +26 -26
- package/esm2020/types/file-restrictions.mjs +5 -0
- package/{esm2015/types/file-state.js → esm2020/types/file-state.mjs} +1 -1
- package/esm2020/types/operation-type.mjs +5 -0
- package/{esm2015/types.js → esm2020/types.mjs} +1 -1
- package/{esm2015/upload.component.js → esm2020/upload.component.mjs} +125 -80
- package/{esm2015/upload.module.js → esm2020/upload.module.mjs} +8 -7
- package/{esm2015/upload.service.js → esm2020/upload.service.mjs} +35 -35
- package/{esm2015/uploads.module.js → esm2020/uploads.module.mjs} +5 -5
- package/events/cancel-event.d.ts +1 -1
- package/events/clear-event.d.ts +1 -1
- package/events/error-event.d.ts +1 -1
- package/events/pause-event.d.ts +1 -1
- package/events/preventable-event.d.ts +1 -1
- package/events/remove-event.d.ts +1 -1
- package/events/resume-event.d.ts +1 -1
- package/events/select-event.d.ts +1 -1
- package/events/success-event.d.ts +1 -1
- package/events/upload-event.d.ts +1 -1
- package/events/upload-progress-event.d.ts +3 -3
- package/events.d.ts +1 -1
- package/fesm2015/progress-kendo-angular-upload.mjs +4997 -0
- package/{fesm2015/kendo-angular-upload.js → fesm2020/progress-kendo-angular-upload.mjs} +829 -592
- package/file-select.directive.d.ts +1 -1
- package/fileselect.component.d.ts +13 -8
- package/fileselect.module.d.ts +8 -7
- package/{main.d.ts → index.d.ts} +2 -1
- package/localization/custom-messages.component.d.ts +1 -1
- package/localization/localized-messages.directive.d.ts +1 -1
- package/localization/messages.d.ts +1 -1
- package/navigation.service.d.ts +4 -3
- package/package-metadata.d.ts +1 -1
- package/package.json +30 -55
- package/{kendo-angular-upload.d.ts → progress-kendo-angular-upload.d.ts} +2 -2
- package/rendering/file-list-item-action-button.component.d.ts +8 -2
- package/rendering/file-list-item-base.d.ts +2 -2
- package/rendering/file-list-item.d.ts +1 -1
- package/rendering/file-list-multiple-items.component.d.ts +3 -1
- package/rendering/file-list-single-item.component.d.ts +3 -1
- package/rendering/file-list.component.d.ts +1 -1
- package/rendering/upload-action-buttons.component.d.ts +1 -1
- package/rendering/upload-status-total.component.d.ts +8 -1
- package/schematics/ngAdd/index.js +8 -6
- package/shared.module.d.ts +5 -2
- package/templates/file-info-template.directive.d.ts +1 -1
- package/templates/file-template.directive.d.ts +1 -1
- package/templates/template-context.directive.d.ts +1 -1
- package/types/async-settings.d.ts +1 -1
- package/types/chunk-info.d.ts +1 -1
- package/types/chunk-map.d.ts +1 -1
- package/types/chunk-metadata.d.ts +1 -1
- package/types/chunk-settings.d.ts +1 -1
- package/types/direction.d.ts +1 -1
- package/types/file-groups.d.ts +22 -1
- package/types/file-info.d.ts +1 -1
- package/types/file-map.d.ts +1 -1
- package/types/file-restrictions.d.ts +1 -1
- package/types/file-state.d.ts +1 -1
- package/types/operation-type.d.ts +1 -1
- package/types.d.ts +1 -1
- package/upload.component.d.ts +15 -10
- package/upload.module.d.ts +8 -7
- package/upload.service.d.ts +1 -1
- package/uploads.module.d.ts +1 -1
- package/bundles/kendo-angular-upload.umd.js +0 -5
- package/esm2015/dropzone.component.js +0 -112
- package/esm2015/rendering/file-list-item-action-button.component.js +0 -226
- package/esm2015/rendering/file-list-multiple-items.component.js +0 -172
- package/esm2015/rendering/file-list-single-item.component.js +0 -154
- package/esm2015/types/chunk-settings.js +0 -5
- package/esm2015/types/direction.js +0 -5
- package/esm2015/types/file-info.js +0 -5
- package/esm2015/types/file-restrictions.js +0 -5
- package/esm2015/types/operation-type.js +0 -5
- package/schematics/ngAdd/index.js.map +0 -1
package/{esm2015/events/upload-progress-event.js → esm2020/events/upload-progress-event.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
export { CancelEvent } from './events/cancel-event';
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Directive, HostBinding, HostListener, Input } from '@angular/core';
|
|
5
|
+
import { Directive, ElementRef, HostBinding, HostListener, Input } from '@angular/core';
|
|
6
|
+
import { NavigationService } from './navigation.service';
|
|
7
|
+
import { UploadService } from './upload.service';
|
|
6
8
|
import { assignGuidToFiles, inputFiles } from './common/util';
|
|
7
9
|
import { validateFiles } from './common/validation-util';
|
|
8
10
|
import * as i0 from "@angular/core";
|
|
@@ -58,9 +60,9 @@ export class FileSelectDirective {
|
|
|
58
60
|
});
|
|
59
61
|
}
|
|
60
62
|
}
|
|
61
|
-
FileSelectDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
62
|
-
FileSelectDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
63
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
63
|
+
FileSelectDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileSelectDirective, deps: [{ token: i1.UploadService }, { token: i2.NavigationService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
64
|
+
FileSelectDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: FileSelectDirective, selector: "[kendoFileSelect]", inputs: { dir: "dir", disabled: "disabled", multiple: "multiple", restrictions: "restrictions" }, host: { listeners: { "change": "onInputChange($event)" }, properties: { "attr.type": "this.type", "attr.autocomplete": "this.autocomplete", "attr.tabindex": "this.tabIndex", "attr.name": "this.nameAttribute", "attr.multiple": "this.multipleAttribute", "attr.dir": "this.dirAttribute", "attr.disabled": "this.disabledAttribute" } }, ngImport: i0 });
|
|
65
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileSelectDirective, decorators: [{
|
|
64
66
|
type: Directive,
|
|
65
67
|
args: [{
|
|
66
68
|
selector: '[kendoFileSelect]'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Component, Input, HostBinding, forwardRef, ViewChild, Output, EventEmitter,
|
|
5
|
+
import { Component, Input, HostBinding, forwardRef, Renderer2, ViewChild, ElementRef, Output, EventEmitter, NgZone, ContentChild, ChangeDetectorRef } from "@angular/core";
|
|
6
6
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
7
7
|
import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
8
8
|
import { KendoInput, guid, Keys, isDocumentAvailable } from '@progress/kendo-angular-common';
|
|
@@ -22,11 +22,12 @@ import * as i1 from "./upload.service";
|
|
|
22
22
|
import * as i2 from "@progress/kendo-angular-l10n";
|
|
23
23
|
import * as i3 from "./navigation.service";
|
|
24
24
|
import * as i4 from "./dropzone.service";
|
|
25
|
-
import * as i5 from "
|
|
26
|
-
import * as i6 from "./
|
|
27
|
-
import * as i7 from "./
|
|
28
|
-
import * as i8 from "./
|
|
29
|
-
import * as i9 from "
|
|
25
|
+
import * as i5 from "@progress/kendo-angular-buttons";
|
|
26
|
+
import * as i6 from "./rendering/file-list.component";
|
|
27
|
+
import * as i7 from "./localization/localized-messages.directive";
|
|
28
|
+
import * as i8 from "./dropzone-internal.directive";
|
|
29
|
+
import * as i9 from "./file-select.directive";
|
|
30
|
+
import * as i10 from "@angular/common";
|
|
30
31
|
/**
|
|
31
32
|
* @hidden
|
|
32
33
|
*/
|
|
@@ -35,6 +36,7 @@ export const FILESELECT_VALUE_ACCESSOR = {
|
|
|
35
36
|
provide: NG_VALUE_ACCESSOR,
|
|
36
37
|
useExisting: forwardRef(() => FileSelectComponent)
|
|
37
38
|
};
|
|
39
|
+
let idx = 0;
|
|
38
40
|
export class FileSelectComponent {
|
|
39
41
|
constructor(uploadService, localization, navigation, dropZoneService, ngZone, renderer, cdr, wrapper) {
|
|
40
42
|
this.uploadService = uploadService;
|
|
@@ -125,7 +127,7 @@ export class FileSelectComponent {
|
|
|
125
127
|
* Sets the restrictions for selected files.
|
|
126
128
|
*/
|
|
127
129
|
set restrictions(restrictions) {
|
|
128
|
-
|
|
130
|
+
const parsedRestrictions = Object.assign({}, this._restrictions, restrictions);
|
|
129
131
|
this._restrictions = parsedRestrictions;
|
|
130
132
|
}
|
|
131
133
|
get restrictions() {
|
|
@@ -142,6 +144,23 @@ export class FileSelectComponent {
|
|
|
142
144
|
if (this.zoneId) {
|
|
143
145
|
this.dropZoneService.addComponent(this, this.zoneId);
|
|
144
146
|
}
|
|
147
|
+
this.subs.add(this.renderer.listen(this.fileSelectInput.nativeElement, 'mouseenter', () => {
|
|
148
|
+
this.renderer.addClass(this.fileSelectButton.nativeElement, 'k-hover');
|
|
149
|
+
}));
|
|
150
|
+
this.subs.add(this.renderer.listen(this.fileSelectInput.nativeElement, 'mouseleave', () => {
|
|
151
|
+
this.renderer.removeClass(this.fileSelectButton.nativeElement, 'k-hover');
|
|
152
|
+
}));
|
|
153
|
+
this.ngZone.runOutsideAngular(() => {
|
|
154
|
+
this.subs.add(this.renderer.listen(this.wrapper, 'keydown', event => this.handleKeydown(event)));
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
ngAfterViewInit() {
|
|
158
|
+
const { buttonId, inputId } = this.getIds();
|
|
159
|
+
const button = this.fileSelectButton.nativeElement;
|
|
160
|
+
const input = this.fileSelectInput.nativeElement;
|
|
161
|
+
this.renderer.setAttribute(button, 'id', buttonId);
|
|
162
|
+
this.renderer.setAttribute(button, 'aria-controls', inputId);
|
|
163
|
+
this.renderer.setAttribute(input, 'id', inputId);
|
|
145
164
|
}
|
|
146
165
|
/**
|
|
147
166
|
* @hidden
|
|
@@ -175,24 +194,6 @@ export class FileSelectComponent {
|
|
|
175
194
|
this.subs.unsubscribe();
|
|
176
195
|
}
|
|
177
196
|
}
|
|
178
|
-
/**
|
|
179
|
-
* @hidden
|
|
180
|
-
*/
|
|
181
|
-
handleKeydown(event) {
|
|
182
|
-
if (this.disabled) {
|
|
183
|
-
return;
|
|
184
|
-
}
|
|
185
|
-
if ((event.keyCode === Keys.Enter || event.keyCode === Keys.Space) &&
|
|
186
|
-
event.target === this.fileSelectButton.nativeElement) {
|
|
187
|
-
event.preventDefault();
|
|
188
|
-
this.fileSelect.nativeElement.click();
|
|
189
|
-
return;
|
|
190
|
-
}
|
|
191
|
-
if (hasClasses(event.target, UPLOAD_CLASSES) ||
|
|
192
|
-
(!isFocusable(event.target) && !hasClasses(event.target, IGNORE_TARGET_CLASSES))) {
|
|
193
|
-
this.navigation.process(event);
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
197
|
/**
|
|
197
198
|
* @hidden
|
|
198
199
|
*/
|
|
@@ -263,6 +264,16 @@ export class FileSelectComponent {
|
|
|
263
264
|
get selectButtonTabIndex() {
|
|
264
265
|
return this.disabled ? undefined : this.tabindex;
|
|
265
266
|
}
|
|
267
|
+
/**
|
|
268
|
+
* @hidden
|
|
269
|
+
*/
|
|
270
|
+
getIds() {
|
|
271
|
+
const id = ++idx;
|
|
272
|
+
const buttonId = `k-fileselect-button-${id}`;
|
|
273
|
+
const inputId = `k-fileselect-input-${id}`;
|
|
274
|
+
return { buttonId, inputId };
|
|
275
|
+
}
|
|
276
|
+
;
|
|
266
277
|
/**
|
|
267
278
|
* @hidden
|
|
268
279
|
*/
|
|
@@ -305,6 +316,21 @@ export class FileSelectComponent {
|
|
|
305
316
|
this.fileSelectButton.nativeElement.focus();
|
|
306
317
|
});
|
|
307
318
|
}
|
|
319
|
+
handleKeydown(event) {
|
|
320
|
+
if (this.disabled) {
|
|
321
|
+
return;
|
|
322
|
+
}
|
|
323
|
+
if ((event.keyCode === Keys.Enter || event.keyCode === Keys.Space) &&
|
|
324
|
+
event.target === this.fileSelectButton.nativeElement) {
|
|
325
|
+
event.preventDefault();
|
|
326
|
+
this.fileSelectInput.nativeElement.click();
|
|
327
|
+
return;
|
|
328
|
+
}
|
|
329
|
+
if (hasClasses(event.target, UPLOAD_CLASSES) ||
|
|
330
|
+
(!isFocusable(event.target) && !hasClasses(event.target, IGNORE_TARGET_CLASSES))) {
|
|
331
|
+
this.navigation.process(event);
|
|
332
|
+
}
|
|
333
|
+
}
|
|
308
334
|
attachEventHandlers() {
|
|
309
335
|
this.subs = this.uploadService.changeEvent.subscribe((files) => {
|
|
310
336
|
let model = [];
|
|
@@ -336,8 +362,8 @@ export class FileSelectComponent {
|
|
|
336
362
|
this.uploadService.component = 'FileSelect';
|
|
337
363
|
}
|
|
338
364
|
}
|
|
339
|
-
FileSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
340
|
-
FileSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "
|
|
365
|
+
FileSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileSelectComponent, deps: [{ token: i1.UploadService }, { token: i2.LocalizationService }, { token: i3.NavigationService }, { token: i4.DropZoneService }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
366
|
+
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: [
|
|
341
367
|
LocalizationService,
|
|
342
368
|
NavigationService,
|
|
343
369
|
UploadService,
|
|
@@ -351,7 +377,7 @@ FileSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
351
377
|
provide: KendoInput,
|
|
352
378
|
useExisting: forwardRef(() => FileSelectComponent)
|
|
353
379
|
}
|
|
354
|
-
], queries: [{ propertyName: "fileTemplate", first: true, predicate: FileTemplateDirective, descendants: true }, { propertyName: "fileInfoTemplate", first: true, predicate: FileInfoTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "
|
|
380
|
+
], queries: [{ propertyName: "fileTemplate", first: true, predicate: FileTemplateDirective, descendants: true }, { propertyName: "fileInfoTemplate", first: true, predicate: FileInfoTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "fileSelectInput", first: true, predicate: ["fileSelectInput"], descendants: true, static: true }, { propertyName: "fileSelectButton", first: true, predicate: ["fileSelectButton"], descendants: true, read: ElementRef, static: true }], exportAs: ["kendoFileSelect"], ngImport: i0, template: `
|
|
355
381
|
<ng-container kendoFileSelectLocalizedMessages
|
|
356
382
|
i18n-dropFilesHere="kendo.fileselect.dropFilesHere|The drop zone hint"
|
|
357
383
|
dropFilesHere="Drop files here to select"
|
|
@@ -376,21 +402,31 @@ FileSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
376
402
|
[restrictions]="restrictions"
|
|
377
403
|
[multiple]="multiple"
|
|
378
404
|
[disabled]="disabled">
|
|
379
|
-
<div
|
|
405
|
+
<div class="k-upload-button-wrap">
|
|
406
|
+
<button
|
|
407
|
+
kendoButton
|
|
408
|
+
#fileSelectButton
|
|
409
|
+
class="k-upload-button"
|
|
410
|
+
role="button"
|
|
380
411
|
[id]="focusableId"
|
|
381
412
|
[attr.aria-label]="textFor('select')"
|
|
382
413
|
[attr.tabindex]="selectButtonTabIndex"
|
|
383
414
|
(focus)="onFileSelectButtonFocus($event)"
|
|
384
415
|
(blur)="onFileSelectButtonBlur($event)"
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
416
|
+
>
|
|
417
|
+
{{textFor('select')}}
|
|
418
|
+
</button>
|
|
419
|
+
<input
|
|
420
|
+
#fileSelectInput
|
|
421
|
+
kendoFileSelect
|
|
422
|
+
[attr.accept]="accept ? accept : null"
|
|
423
|
+
[attr.aria-hidden]="true"
|
|
424
|
+
[dir]="direction"
|
|
425
|
+
[restrictions]="restrictions"
|
|
426
|
+
[multiple]="multiple"
|
|
427
|
+
[disabled]="disabled"
|
|
428
|
+
/>
|
|
429
|
+
</div>
|
|
394
430
|
<div class="k-dropzone-hint">{{textFor('dropFilesHere')}}</div>
|
|
395
431
|
</div>
|
|
396
432
|
<ul kendo-upload-file-list
|
|
@@ -401,8 +437,8 @@ FileSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
401
437
|
[fileTemplate]="fileTemplate"
|
|
402
438
|
[fileInfoTemplate]="fileInfoTemplate">
|
|
403
439
|
</ul>
|
|
404
|
-
`, isInline: true, components: [{ type: i5.FileListComponent, selector: "[kendo-upload-file-list]", inputs: ["disabled", "fileList", "fileTemplate", "fileInfoTemplate"] }], directives: [{ type:
|
|
405
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
440
|
+
`, isInline: true, components: [{ type: i5.Button, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: i6.FileListComponent, selector: "[kendo-upload-file-list]", inputs: ["disabled", "fileList", "fileTemplate", "fileInfoTemplate"] }], directives: [{ type: i7.LocalizedMessagesDirective, selector: "\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n " }, { type: i8.DropZoneInternalDirective, selector: "\n [kendoUploadInternalDropZone],\n [kendoFileSelectInternalDropZone]\n ", inputs: ["disabled", "multiple", "restrictions"] }, { type: i9.FileSelectDirective, selector: "[kendoFileSelect]", inputs: ["dir", "disabled", "multiple", "restrictions"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
441
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileSelectComponent, decorators: [{
|
|
406
442
|
type: Component,
|
|
407
443
|
args: [{
|
|
408
444
|
exportAs: 'kendoFileSelect',
|
|
@@ -447,21 +483,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
447
483
|
[restrictions]="restrictions"
|
|
448
484
|
[multiple]="multiple"
|
|
449
485
|
[disabled]="disabled">
|
|
450
|
-
<div
|
|
486
|
+
<div class="k-upload-button-wrap">
|
|
487
|
+
<button
|
|
488
|
+
kendoButton
|
|
489
|
+
#fileSelectButton
|
|
490
|
+
class="k-upload-button"
|
|
491
|
+
role="button"
|
|
451
492
|
[id]="focusableId"
|
|
452
493
|
[attr.aria-label]="textFor('select')"
|
|
453
494
|
[attr.tabindex]="selectButtonTabIndex"
|
|
454
495
|
(focus)="onFileSelectButtonFocus($event)"
|
|
455
496
|
(blur)="onFileSelectButtonBlur($event)"
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
497
|
+
>
|
|
498
|
+
{{textFor('select')}}
|
|
499
|
+
</button>
|
|
500
|
+
<input
|
|
501
|
+
#fileSelectInput
|
|
502
|
+
kendoFileSelect
|
|
503
|
+
[attr.accept]="accept ? accept : null"
|
|
504
|
+
[attr.aria-hidden]="true"
|
|
505
|
+
[dir]="direction"
|
|
506
|
+
[restrictions]="restrictions"
|
|
507
|
+
[multiple]="multiple"
|
|
508
|
+
[disabled]="disabled"
|
|
509
|
+
/>
|
|
510
|
+
</div>
|
|
465
511
|
<div class="k-dropzone-hint">{{textFor('dropFilesHere')}}</div>
|
|
466
512
|
</div>
|
|
467
513
|
<ul kendo-upload-file-list
|
|
@@ -498,12 +544,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
498
544
|
}], fileInfoTemplate: [{
|
|
499
545
|
type: ContentChild,
|
|
500
546
|
args: [FileInfoTemplateDirective, { static: false }]
|
|
501
|
-
}],
|
|
547
|
+
}], fileSelectInput: [{
|
|
502
548
|
type: ViewChild,
|
|
503
|
-
args: ['
|
|
549
|
+
args: ['fileSelectInput', { static: true }]
|
|
504
550
|
}], fileSelectButton: [{
|
|
505
551
|
type: ViewChild,
|
|
506
|
-
args: ['fileSelectButton', { static: true }]
|
|
552
|
+
args: ['fileSelectButton', { static: true, read: ElementRef }]
|
|
507
553
|
}], onBlur: [{
|
|
508
554
|
type: Output,
|
|
509
555
|
args: ['blur']
|
|
@@ -517,9 +563,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
517
563
|
}], valueChange: [{
|
|
518
564
|
type: Output
|
|
519
565
|
}], hostDefaultClasses: [{
|
|
520
|
-
type: HostBinding,
|
|
521
|
-
args: ['class.k-widget']
|
|
522
|
-
}, {
|
|
523
566
|
type: HostBinding,
|
|
524
567
|
args: ['class.k-upload']
|
|
525
568
|
}], hostDisabledClass: [{
|
|
@@ -528,7 +571,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
528
571
|
}], dir: [{
|
|
529
572
|
type: HostBinding,
|
|
530
573
|
args: ['attr.dir']
|
|
531
|
-
}], handleKeydown: [{
|
|
532
|
-
type: HostListener,
|
|
533
|
-
args: ['keydown', ['$event']]
|
|
534
574
|
}] } });
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { NgModule } from '@angular/core';
|
|
6
6
|
import { FileSelectComponent } from './fileselect.component';
|
|
7
|
+
import { IconsModule } from '@progress/kendo-angular-icons';
|
|
7
8
|
import { SharedModule, PUBLIC_DIRECTIVES } from './shared.module';
|
|
8
9
|
import * as i0 from "@angular/core";
|
|
9
10
|
import * as i1 from "./templates/file-template.directive";
|
|
@@ -19,10 +20,10 @@ const FILESELECT_DECLARATIONS = [
|
|
|
19
20
|
*/
|
|
20
21
|
export class FileSelectModule {
|
|
21
22
|
}
|
|
22
|
-
FileSelectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
23
|
-
FileSelectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
24
|
-
FileSelectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
25
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
23
|
+
FileSelectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
24
|
+
FileSelectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileSelectModule, declarations: [FileSelectComponent], imports: [SharedModule, IconsModule], exports: [i1.FileTemplateDirective, i2.FileInfoTemplateDirective, i3.CustomMessagesComponent, i4.UploadDropZoneDirective, i5.UploadDropZoneComponent, FileSelectComponent] });
|
|
25
|
+
FileSelectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileSelectModule, imports: [[SharedModule, IconsModule]] });
|
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileSelectModule, decorators: [{
|
|
26
27
|
type: NgModule,
|
|
27
28
|
args: [{
|
|
28
29
|
declarations: [FILESELECT_DECLARATIONS],
|
|
@@ -30,6 +31,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
30
31
|
PUBLIC_DIRECTIVES,
|
|
31
32
|
FILESELECT_DECLARATIONS
|
|
32
33
|
],
|
|
33
|
-
imports: [SharedModule]
|
|
34
|
+
imports: [SharedModule, IconsModule]
|
|
34
35
|
}]
|
|
35
36
|
}] });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
export { UploadService } from './upload.service';
|
|
@@ -23,5 +23,6 @@ export { UploadStatusTotalComponent } from './rendering/upload-status-total.comp
|
|
|
23
23
|
export { UploadActionButtonsComponent } from './rendering/upload-action-buttons.component';
|
|
24
24
|
export { UploadDropZoneDirective } from './dropzone-external.directive';
|
|
25
25
|
export { CustomMessagesComponent } from './localization/custom-messages.component';
|
|
26
|
+
export { validateFiles } from './common/validation-util';
|
|
26
27
|
export * from './events';
|
|
27
28
|
export * from './types';
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { Component, forwardRef } from '@angular/core';
|
|
6
6
|
import { Messages } from './messages';
|
|
7
|
+
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
import * as i1 from "@progress/kendo-angular-l10n";
|
|
9
10
|
/**
|
|
@@ -28,14 +29,14 @@ export class CustomMessagesComponent extends Messages {
|
|
|
28
29
|
return true;
|
|
29
30
|
}
|
|
30
31
|
}
|
|
31
|
-
CustomMessagesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
32
|
-
CustomMessagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "
|
|
32
|
+
CustomMessagesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CustomMessagesComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
33
|
+
CustomMessagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: CustomMessagesComponent, selector: "kendo-upload-messages, kendo-fileselect-messages, kendo-uploaddropzone-messages", providers: [
|
|
33
34
|
{
|
|
34
35
|
provide: Messages,
|
|
35
36
|
useExisting: forwardRef(() => CustomMessagesComponent)
|
|
36
37
|
}
|
|
37
38
|
], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
|
|
38
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
39
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CustomMessagesComponent, decorators: [{
|
|
39
40
|
type: Component,
|
|
40
41
|
args: [{
|
|
41
42
|
providers: [
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { Directive, forwardRef } from '@angular/core';
|
|
6
6
|
import { Messages } from './messages';
|
|
7
|
+
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
import * as i1 from "@progress/kendo-angular-l10n";
|
|
9
10
|
/**
|
|
@@ -15,14 +16,14 @@ export class LocalizedMessagesDirective extends Messages {
|
|
|
15
16
|
this.service = service;
|
|
16
17
|
}
|
|
17
18
|
}
|
|
18
|
-
LocalizedMessagesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
19
|
-
LocalizedMessagesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
19
|
+
LocalizedMessagesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: LocalizedMessagesDirective, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
20
|
+
LocalizedMessagesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: LocalizedMessagesDirective, selector: "\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n ", providers: [
|
|
20
21
|
{
|
|
21
22
|
provide: Messages,
|
|
22
23
|
useExisting: forwardRef(() => LocalizedMessagesDirective)
|
|
23
24
|
}
|
|
24
25
|
], usesInheritance: true, ngImport: i0 });
|
|
25
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: LocalizedMessagesDirective, decorators: [{
|
|
26
27
|
type: Directive,
|
|
27
28
|
args: [{
|
|
28
29
|
providers: [
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { Directive, Input } from '@angular/core';
|
|
@@ -10,9 +10,9 @@ import * as i0 from "@angular/core";
|
|
|
10
10
|
*/
|
|
11
11
|
export class Messages extends ComponentMessages {
|
|
12
12
|
}
|
|
13
|
-
Messages.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
14
|
-
Messages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
15
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
13
|
+
Messages.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: Messages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
14
|
+
Messages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: Messages, inputs: { cancel: "cancel", clearSelectedFiles: "clearSelectedFiles", dropFilesHere: "dropFilesHere", externalDropFilesHere: "externalDropFilesHere", filesBatchStatus: "filesBatchStatus", filesBatchStatusFailed: "filesBatchStatusFailed", filesBatchStatusUploaded: "filesBatchStatusUploaded", fileStatusFailed: "fileStatusFailed", fileStatusUploaded: "fileStatusUploaded", headerStatusPaused: "headerStatusPaused", headerStatusUploaded: "headerStatusUploaded", headerStatusUploading: "headerStatusUploading", invalidFileExtension: "invalidFileExtension", invalidMaxFileSize: "invalidMaxFileSize", invalidMinFileSize: "invalidMinFileSize", pause: "pause", remove: "remove", resume: "resume", retry: "retry", select: "select", uploadSelectedFiles: "uploadSelectedFiles" }, usesInheritance: true, ngImport: i0 });
|
|
15
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: Messages, decorators: [{
|
|
16
16
|
type: Directive
|
|
17
17
|
}], propDecorators: { cancel: [{
|
|
18
18
|
type: Input
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Injectable, EventEmitter } from '@angular/core';
|
|
5
|
+
import { Injectable, EventEmitter, NgZone } from '@angular/core';
|
|
6
|
+
import { UploadService } from './upload.service';
|
|
6
7
|
import { Keys } from '@progress/kendo-angular-common';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
import * as i1 from "./upload.service";
|
|
@@ -10,8 +11,9 @@ import * as i1 from "./upload.service";
|
|
|
10
11
|
* @hidden
|
|
11
12
|
*/
|
|
12
13
|
export class NavigationService {
|
|
13
|
-
constructor(uploadService) {
|
|
14
|
+
constructor(uploadService, zone) {
|
|
14
15
|
this.uploadService = uploadService;
|
|
16
|
+
this.zone = zone;
|
|
15
17
|
this.onActionButtonAction = new EventEmitter();
|
|
16
18
|
this.onActionButtonFocus = new EventEmitter();
|
|
17
19
|
this.onFileAction = new EventEmitter();
|
|
@@ -55,18 +57,22 @@ export class NavigationService {
|
|
|
55
57
|
}
|
|
56
58
|
handleEnter() {
|
|
57
59
|
if (this.lastIndex >= 0) {
|
|
58
|
-
|
|
59
|
-
this.
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
this.
|
|
64
|
-
|
|
60
|
+
this.zone.run(() => {
|
|
61
|
+
if (this.focusedIndex <= this.lastFileIndex) {
|
|
62
|
+
this.onFileAction.emit(Keys.Enter);
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
if (this.actionButtonsVisible && this.focusedIndex <= this.lastIndex) {
|
|
66
|
+
this.onActionButtonAction.emit(this.focusedIndex < this.lastIndex ? "clear" : "upload");
|
|
67
|
+
}
|
|
68
|
+
});
|
|
65
69
|
}
|
|
66
70
|
}
|
|
67
71
|
handleDelete() {
|
|
68
72
|
if (this.focusedIndex >= 0 && this.focusedIndex <= this.lastFileIndex) {
|
|
69
|
-
this.
|
|
73
|
+
this.zone.run(() => {
|
|
74
|
+
this.onFileAction.emit(Keys.Delete);
|
|
75
|
+
});
|
|
70
76
|
}
|
|
71
77
|
}
|
|
72
78
|
handleEscape() {
|
|
@@ -77,13 +83,17 @@ export class NavigationService {
|
|
|
77
83
|
handleLeft() {
|
|
78
84
|
if (this.actionButtonsVisible && this.focusedIndex === this.lastIndex) {
|
|
79
85
|
this.focusedIndex -= 1;
|
|
80
|
-
this.
|
|
86
|
+
this.zone.run(() => {
|
|
87
|
+
this.onActionButtonFocus.emit("clear");
|
|
88
|
+
});
|
|
81
89
|
}
|
|
82
90
|
}
|
|
83
91
|
handleRight() {
|
|
84
92
|
if (this.actionButtonsVisible && this.focusedIndex === this.lastIndex - 1) {
|
|
85
93
|
this.focusedIndex += 1;
|
|
86
|
-
this.
|
|
94
|
+
this.zone.run(() => {
|
|
95
|
+
this.onActionButtonFocus.emit("upload");
|
|
96
|
+
});
|
|
87
97
|
}
|
|
88
98
|
}
|
|
89
99
|
handleTab(shifted) {
|
|
@@ -91,36 +101,42 @@ export class NavigationService {
|
|
|
91
101
|
this.focusedIndex = -1;
|
|
92
102
|
return;
|
|
93
103
|
}
|
|
94
|
-
this.
|
|
104
|
+
this.zone.run(() => {
|
|
105
|
+
this.onTab.emit();
|
|
106
|
+
});
|
|
95
107
|
}
|
|
96
108
|
handleDown() {
|
|
97
109
|
if (this.lastIndex >= 0 && this.focusedIndex < this.lastIndex) {
|
|
98
|
-
|
|
99
|
-
this.focusedIndex
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
this.focusedIndex
|
|
105
|
-
|
|
106
|
-
|
|
110
|
+
this.zone.run(() => {
|
|
111
|
+
if (this.focusedIndex < this.lastFileIndex) {
|
|
112
|
+
this.focusedIndex += 1;
|
|
113
|
+
this.onFileFocus.emit(this.focusedIndex);
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
if (this.actionButtonsVisible && this.focusedIndex === this.lastFileIndex) {
|
|
117
|
+
this.focusedIndex += 1;
|
|
118
|
+
this.onActionButtonFocus.emit("clear");
|
|
119
|
+
}
|
|
120
|
+
});
|
|
107
121
|
}
|
|
108
122
|
}
|
|
109
123
|
handleUp() {
|
|
110
124
|
if (this.lastIndex >= 0 && this.focusedIndex > -1) {
|
|
111
|
-
this.
|
|
112
|
-
|
|
113
|
-
this.
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
this.
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
this.focusedIndex
|
|
122
|
-
|
|
123
|
-
|
|
125
|
+
this.zone.run(() => {
|
|
126
|
+
this.focusedIndex -= 1;
|
|
127
|
+
if (this.focusedIndex === -1) {
|
|
128
|
+
this.onSelectButtonFocus.emit();
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
if (this.focusedIndex <= this.lastFileIndex) {
|
|
132
|
+
this.onFileFocus.emit(this.focusedIndex);
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
if (this.actionButtonsVisible && this.focusedIndex <= this.lastIndex) {
|
|
136
|
+
this.focusedIndex = this.lastFileIndex;
|
|
137
|
+
this.onFileFocus.emit(this.focusedIndex);
|
|
138
|
+
}
|
|
139
|
+
});
|
|
124
140
|
}
|
|
125
141
|
}
|
|
126
142
|
get focusedIndex() {
|
|
@@ -144,8 +160,8 @@ export class NavigationService {
|
|
|
144
160
|
return this.actionButtonsVisible ? fileCount + 1 : fileCount - 1;
|
|
145
161
|
}
|
|
146
162
|
}
|
|
147
|
-
NavigationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
148
|
-
NavigationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
149
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
163
|
+
NavigationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NavigationService, deps: [{ token: i1.UploadService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
164
|
+
NavigationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NavigationService });
|
|
165
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NavigationService, decorators: [{
|
|
150
166
|
type: Injectable
|
|
151
|
-
}], ctorParameters: function () { return [{ type: i1.UploadService }]; } });
|
|
167
|
+
}], ctorParameters: function () { return [{ type: i1.UploadService }, { type: i0.NgZone }]; } });
|