@progress/kendo-angular-upload 8.0.2-dev.202203071504 → 9.0.0-dev.202204131914
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/bundles/kendo-angular-upload.umd.js +5 -0
- package/{dist/es2015/common → common}/action-buttons-layout.d.ts +0 -0
- package/{dist/es2015/common → common}/util.d.ts +0 -0
- package/{dist/es2015/common → common}/validation-util.d.ts +0 -0
- package/{dist/es2015/dropzone-base.d.ts → dropzone-base.d.ts} +4 -1
- package/{dist/es2015/dropzone-external.directive.d.ts → dropzone-external.directive.d.ts} +4 -1
- package/{dist/es2015/dropzone-internal.directive.d.ts → dropzone-internal.directive.d.ts} +3 -0
- package/{dist/es2015/dropzone.component.d.ts → dropzone.component.d.ts} +5 -2
- package/{dist/es2015/dropzone.service.d.ts → dropzone.service.d.ts} +3 -0
- package/{dist/es2015 → esm2015}/common/action-buttons-layout.js +1 -0
- package/{dist/es2015 → esm2015}/common/util.js +1 -7
- package/{dist/es2015 → esm2015}/common/validation-util.js +0 -4
- package/{dist/es2015 → esm2015}/dropzone-base.js +18 -16
- package/{dist/es2015 → esm2015}/dropzone-external.directive.js +29 -35
- package/{dist/es2015 → esm2015}/dropzone-internal.directive.js +25 -37
- package/esm2015/dropzone.component.js +112 -0
- package/{dist/es2015 → esm2015}/dropzone.service.js +8 -7
- package/{dist/es2015 → esm2015}/events/cancel-event.js +1 -0
- package/{dist/es2015 → esm2015}/events/clear-event.js +1 -0
- package/{dist/es2015 → esm2015}/events/error-event.js +1 -0
- package/{dist/es2015 → esm2015}/events/pause-event.js +1 -0
- package/{dist/es2015 → esm2015}/events/preventable-event.js +0 -0
- package/{dist/es2015 → esm2015}/events/remove-event.js +1 -0
- package/{dist/es2015 → esm2015}/events/resume-event.js +1 -0
- package/{dist/es2015 → esm2015}/events/select-event.js +1 -0
- package/{dist/es2015 → esm2015}/events/success-event.js +1 -0
- package/{dist/es2015 → esm2015}/events/upload-event.js +1 -0
- package/{dist/es2015 → esm2015}/events/upload-progress-event.js +1 -0
- package/{dist/es → esm2015}/events.js +0 -0
- package/esm2015/file-select.directive.js +100 -0
- package/{dist/es2015 → esm2015}/fileselect.component.js +160 -132
- package/esm2015/fileselect.module.js +35 -0
- package/{dist/es/types/chunk-info.js → esm2015/kendo-angular-upload.js} +4 -0
- package/esm2015/localization/custom-messages.component.js +50 -0
- package/esm2015/localization/localized-messages.directive.js +40 -0
- package/esm2015/localization/messages.js +59 -0
- package/{dist/es → esm2015}/main.js +0 -0
- package/{dist/es2015 → esm2015}/navigation.service.js +9 -9
- package/{dist/es2015 → esm2015}/package-metadata.js +1 -1
- package/{dist/es2015 → esm2015}/rendering/file-list-item-action-button.component.js +70 -28
- package/{dist/es2015 → esm2015}/rendering/file-list-item-base.js +9 -0
- package/esm2015/rendering/file-list-item.js +107 -0
- package/esm2015/rendering/file-list-multiple-items.component.js +172 -0
- package/esm2015/rendering/file-list-single-item.component.js +154 -0
- package/esm2015/rendering/file-list.component.js +145 -0
- package/esm2015/rendering/upload-action-buttons.component.js +136 -0
- package/esm2015/rendering/upload-status-total.component.js +60 -0
- package/{dist/es2015 → esm2015}/shared.module.js +45 -18
- package/esm2015/templates/file-info-template.directive.js +22 -0
- package/esm2015/templates/file-template.directive.js +22 -0
- package/esm2015/templates/template-context.directive.js +34 -0
- package/{dist/es2015 → esm2015}/types/async-settings.js +1 -0
- package/{dist/es2015 → esm2015}/types/chunk-info.js +1 -0
- package/{dist/es2015 → esm2015}/types/chunk-map.js +0 -0
- package/{dist/es → esm2015}/types/chunk-metadata.js +1 -0
- package/{dist/es → esm2015}/types/chunk-settings.js +1 -0
- package/{dist/es → esm2015}/types/direction.js +1 -0
- package/{dist/es2015 → esm2015}/types/file-groups.js +3 -5
- package/{dist/es → esm2015}/types/file-info.js +1 -0
- package/{dist/es2015 → esm2015}/types/file-map.js +0 -0
- package/{dist/es → esm2015}/types/file-restrictions.js +1 -0
- package/{dist/es → esm2015}/types/file-state.js +0 -0
- package/{dist/es → esm2015}/types/operation-type.js +1 -0
- package/{dist/es → esm2015}/types.js +0 -0
- package/{dist/es2015 → esm2015}/upload.component.js +262 -243
- package/esm2015/upload.module.js +43 -0
- package/{dist/es2015 → esm2015}/upload.service.js +10 -9
- package/{dist/es2015 → esm2015}/uploads.module.js +17 -12
- package/{dist/es2015/events → events}/cancel-event.d.ts +4 -0
- package/{dist/es2015/events → events}/clear-event.d.ts +1 -0
- package/{dist/es2015/events → events}/error-event.d.ts +10 -0
- package/{dist/es2015/events → events}/pause-event.d.ts +4 -0
- package/{dist/es2015/events → events}/preventable-event.d.ts +0 -0
- package/{dist/es2015/events → events}/remove-event.d.ts +9 -2
- package/{dist/es2015/events → events}/resume-event.d.ts +4 -0
- package/{dist/es2015/events → events}/select-event.d.ts +4 -0
- package/{dist/es2015/events → events}/success-event.d.ts +10 -0
- package/{dist/es2015/events → events}/upload-event.d.ts +9 -2
- package/{dist/es2015/events → events}/upload-progress-event.d.ts +7 -0
- package/{dist/es2015/events.d.ts → events.d.ts} +0 -0
- package/{dist/fesm2015/index.js → fesm2015/kendo-angular-upload.js} +2192 -2010
- package/{dist/es2015/file-select.directive.d.ts → file-select.directive.d.ts} +7 -4
- package/{dist/es2015/fileselect.component.d.ts → fileselect.component.d.ts} +14 -6
- package/fileselect.module.d.ts +20 -0
- package/{dist/es/common/action-buttons-layout.js → kendo-angular-upload.d.ts} +5 -0
- package/{dist/es2015/localization → localization}/custom-messages.component.d.ts +4 -1
- package/{dist/es2015/localization → localization}/localized-messages.directive.d.ts +3 -0
- package/{dist/es2015/localization → localization}/messages.d.ts +3 -0
- package/{dist/es2015/main.d.ts → main.d.ts} +0 -0
- package/{dist/es2015/navigation.service.d.ts → navigation.service.d.ts} +7 -3
- package/{dist/es2015/package-metadata.d.ts → package-metadata.d.ts} +0 -0
- package/package.json +36 -104
- package/{dist/es2015/rendering → rendering}/file-list-item-action-button.component.d.ts +11 -8
- package/{dist/es2015/rendering → rendering}/file-list-item-base.d.ts +3 -0
- package/{dist/es2015/rendering → rendering}/file-list-item.d.ts +10 -7
- package/{dist/es2015/rendering → rendering}/file-list-multiple-items.component.d.ts +7 -4
- package/{dist/es2015/rendering → rendering}/file-list-single-item.component.d.ts +9 -6
- package/{dist/es2015/rendering → rendering}/file-list.component.d.ts +3 -0
- package/{dist/es2015/rendering → rendering}/upload-action-buttons.component.d.ts +7 -4
- package/{dist/es2015/rendering → rendering}/upload-status-total.component.d.ts +3 -0
- package/schematics/ngAdd/index.js +5 -2
- package/schematics/ngAdd/index.js.map +1 -1
- package/shared.module.d.ts +36 -0
- package/{dist/es2015/templates → templates}/file-info-template.directive.d.ts +3 -0
- package/{dist/es2015/templates → templates}/file-template.directive.d.ts +3 -0
- package/{dist/es2015/templates → templates}/template-context.directive.d.ts +4 -1
- package/{dist/es2015/types → types}/async-settings.d.ts +0 -0
- package/{dist/es2015/types → types}/chunk-info.d.ts +0 -0
- package/{dist/es2015/types → types}/chunk-map.d.ts +0 -0
- package/{dist/es2015/types → types}/chunk-metadata.d.ts +0 -0
- package/{dist/es2015/types → types}/chunk-settings.d.ts +0 -0
- package/{dist/es2015/types → types}/direction.d.ts +0 -0
- package/{dist/es2015/types → types}/file-groups.d.ts +0 -0
- package/{dist/es2015/types → types}/file-info.d.ts +0 -0
- package/{dist/es2015/types → types}/file-map.d.ts +5 -5
- package/{dist/es2015/types → types}/file-restrictions.d.ts +0 -0
- package/{dist/es2015/types → types}/file-state.d.ts +0 -0
- package/{dist/es2015/types → types}/operation-type.d.ts +0 -0
- package/{dist/es2015/types.d.ts → types.d.ts} +0 -0
- package/{dist/es2015/upload.component.d.ts → upload.component.d.ts} +42 -21
- package/upload.module.d.ts +22 -0
- package/{dist/es2015/upload.service.d.ts → upload.service.d.ts} +4 -1
- package/{dist/es2015/uploads.module.d.ts → uploads.module.d.ts} +6 -0
- package/dist/cdn/js/kendo-angular-upload.js +0 -20
- package/dist/cdn/main.js +0 -5
- package/dist/es/common/util.js +0 -234
- package/dist/es/common/validation-util.js +0 -64
- package/dist/es/dropzone-base.js +0 -66
- package/dist/es/dropzone-external.directive.js +0 -98
- package/dist/es/dropzone-internal.directive.js +0 -110
- package/dist/es/dropzone.component.js +0 -99
- package/dist/es/dropzone.service.js +0 -33
- package/dist/es/events/cancel-event.js +0 -41
- package/dist/es/events/clear-event.js +0 -43
- package/dist/es/events/error-event.js +0 -45
- package/dist/es/events/pause-event.js +0 -42
- package/dist/es/events/preventable-event.js +0 -29
- package/dist/es/events/remove-event.js +0 -47
- package/dist/es/events/resume-event.js +0 -42
- package/dist/es/events/select-event.js +0 -45
- package/dist/es/events/success-event.js +0 -49
- package/dist/es/events/upload-event.js +0 -47
- package/dist/es/events/upload-progress-event.js +0 -42
- package/dist/es/file-select.directive.js +0 -141
- package/dist/es/fileselect.component.js +0 -484
- package/dist/es/fileselect.module.js +0 -30
- package/dist/es/index.js +0 -21
- package/dist/es/localization/custom-messages.component.js +0 -53
- package/dist/es/localization/localized-messages.directive.js +0 -35
- package/dist/es/localization/messages.js +0 -102
- package/dist/es/navigation.service.js +0 -166
- package/dist/es/package-metadata.js +0 -15
- package/dist/es/rendering/file-list-item-action-button.component.js +0 -169
- package/dist/es/rendering/file-list-item-base.js +0 -41
- package/dist/es/rendering/file-list-item.js +0 -165
- package/dist/es/rendering/file-list-multiple-items.component.js +0 -107
- package/dist/es/rendering/file-list-single-item.component.js +0 -112
- package/dist/es/rendering/file-list.component.js +0 -98
- package/dist/es/rendering/upload-action-buttons.component.js +0 -149
- package/dist/es/rendering/upload-status-total.component.js +0 -42
- package/dist/es/shared.module.js +0 -68
- package/dist/es/templates/file-info-template.directive.js +0 -22
- package/dist/es/templates/file-template.directive.js +0 -22
- package/dist/es/templates/template-context.directive.js +0 -40
- package/dist/es/types/async-settings.js +0 -4
- package/dist/es/types/chunk-map.js +0 -36
- package/dist/es/types/file-groups.js +0 -45
- package/dist/es/types/file-map.js +0 -170
- package/dist/es/upload.component.js +0 -967
- package/dist/es/upload.module.js +0 -34
- package/dist/es/upload.service.js +0 -448
- package/dist/es/uploads.module.js +0 -47
- package/dist/es2015/dropzone.component.js +0 -100
- package/dist/es2015/events.js +0 -14
- package/dist/es2015/file-select.directive.js +0 -123
- package/dist/es2015/fileselect.module.d.ts +0 -9
- package/dist/es2015/fileselect.module.js +0 -27
- package/dist/es2015/index.d.ts +0 -21
- package/dist/es2015/index.js +0 -21
- package/dist/es2015/index.metadata.json +0 -1
- package/dist/es2015/localization/custom-messages.component.js +0 -45
- package/dist/es2015/localization/localized-messages.directive.js +0 -35
- package/dist/es2015/localization/messages.js +0 -96
- package/dist/es2015/main.js +0 -24
- package/dist/es2015/rendering/file-list-item.js +0 -136
- package/dist/es2015/rendering/file-list-multiple-items.component.js +0 -128
- package/dist/es2015/rendering/file-list-single-item.component.js +0 -117
- package/dist/es2015/rendering/file-list.component.js +0 -123
- package/dist/es2015/rendering/upload-action-buttons.component.js +0 -141
- package/dist/es2015/rendering/upload-status-total.component.js +0 -51
- package/dist/es2015/shared.module.d.ts +0 -17
- package/dist/es2015/templates/file-info-template.directive.js +0 -21
- package/dist/es2015/templates/file-template.directive.js +0 -21
- package/dist/es2015/templates/template-context.directive.js +0 -35
- package/dist/es2015/types/chunk-metadata.js +0 -4
- package/dist/es2015/types/chunk-settings.js +0 -4
- package/dist/es2015/types/direction.js +0 -4
- package/dist/es2015/types/file-info.js +0 -4
- package/dist/es2015/types/file-restrictions.js +0 -4
- package/dist/es2015/types/file-state.js +0 -34
- package/dist/es2015/types/operation-type.js +0 -4
- package/dist/es2015/types.js +0 -5
- package/dist/es2015/upload.module.d.ts +0 -9
- package/dist/es2015/upload.module.js +0 -31
- package/dist/fesm5/index.js +0 -4653
- package/dist/npm/common/action-buttons-layout.js +0 -6
- package/dist/npm/common/util.js +0 -240
- package/dist/npm/common/validation-util.js +0 -68
- package/dist/npm/dropzone-base.js +0 -68
- package/dist/npm/dropzone-external.directive.js +0 -100
- package/dist/npm/dropzone-internal.directive.js +0 -112
- package/dist/npm/dropzone.component.js +0 -101
- package/dist/npm/dropzone.service.js +0 -35
- package/dist/npm/events/cancel-event.js +0 -43
- package/dist/npm/events/clear-event.js +0 -45
- package/dist/npm/events/error-event.js +0 -47
- package/dist/npm/events/pause-event.js +0 -44
- package/dist/npm/events/preventable-event.js +0 -31
- package/dist/npm/events/remove-event.js +0 -49
- package/dist/npm/events/resume-event.js +0 -44
- package/dist/npm/events/select-event.js +0 -47
- package/dist/npm/events/success-event.js +0 -51
- package/dist/npm/events/upload-event.js +0 -49
- package/dist/npm/events/upload-progress-event.js +0 -44
- package/dist/npm/events.js +0 -26
- package/dist/npm/file-select.directive.js +0 -143
- package/dist/npm/fileselect.component.js +0 -486
- package/dist/npm/fileselect.module.js +0 -32
- package/dist/npm/index.js +0 -39
- package/dist/npm/localization/custom-messages.component.js +0 -55
- package/dist/npm/localization/localized-messages.directive.js +0 -37
- package/dist/npm/localization/messages.js +0 -104
- package/dist/npm/main.js +0 -45
- package/dist/npm/navigation.service.js +0 -168
- package/dist/npm/package-metadata.js +0 -17
- package/dist/npm/rendering/file-list-item-action-button.component.js +0 -171
- package/dist/npm/rendering/file-list-item-base.js +0 -43
- package/dist/npm/rendering/file-list-item.js +0 -167
- package/dist/npm/rendering/file-list-multiple-items.component.js +0 -109
- package/dist/npm/rendering/file-list-single-item.component.js +0 -114
- package/dist/npm/rendering/file-list.component.js +0 -100
- package/dist/npm/rendering/upload-action-buttons.component.js +0 -151
- package/dist/npm/rendering/upload-status-total.component.js +0 -44
- package/dist/npm/shared.module.js +0 -70
- package/dist/npm/templates/file-info-template.directive.js +0 -24
- package/dist/npm/templates/file-template.directive.js +0 -24
- package/dist/npm/templates/template-context.directive.js +0 -42
- package/dist/npm/types/async-settings.js +0 -6
- package/dist/npm/types/chunk-info.js +0 -6
- package/dist/npm/types/chunk-map.js +0 -38
- package/dist/npm/types/chunk-metadata.js +0 -6
- package/dist/npm/types/chunk-settings.js +0 -6
- package/dist/npm/types/direction.js +0 -6
- package/dist/npm/types/file-groups.js +0 -47
- package/dist/npm/types/file-info.js +0 -6
- package/dist/npm/types/file-map.js +0 -172
- package/dist/npm/types/file-restrictions.js +0 -6
- package/dist/npm/types/file-state.js +0 -36
- package/dist/npm/types/operation-type.js +0 -6
- package/dist/npm/types.js +0 -8
- package/dist/npm/upload.component.js +0 -969
- package/dist/npm/upload.module.js +0 -36
- package/dist/npm/upload.service.js +0 -450
- package/dist/npm/uploads.module.js +0 -49
- package/dist/systemjs/kendo-angular-upload.js +0 -5
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
/* eslint-disable @angular-eslint/component-selector */
|
|
6
|
+
import { Input, Component, ViewChildren } from '@angular/core';
|
|
7
|
+
import { Keys } from '@progress/kendo-angular-common';
|
|
8
|
+
import { FileState } from '../types';
|
|
9
|
+
import { FileListItemDirective } from './file-list-item';
|
|
10
|
+
import * as i0 from "@angular/core";
|
|
11
|
+
import * as i1 from "../upload.service";
|
|
12
|
+
import * as i2 from "../navigation.service";
|
|
13
|
+
import * as i3 from "./file-list-single-item.component";
|
|
14
|
+
import * as i4 from "./file-list-multiple-items.component";
|
|
15
|
+
import * as i5 from "@angular/common";
|
|
16
|
+
import * as i6 from "./file-list-item";
|
|
17
|
+
import * as i7 from "../templates/template-context.directive";
|
|
18
|
+
/**
|
|
19
|
+
* @hidden
|
|
20
|
+
*/
|
|
21
|
+
export class FileListComponent {
|
|
22
|
+
constructor(uploadService, navigation) {
|
|
23
|
+
this.uploadService = uploadService;
|
|
24
|
+
this.navigation = navigation;
|
|
25
|
+
this.onItemFocus();
|
|
26
|
+
this.onItemAction();
|
|
27
|
+
}
|
|
28
|
+
onItemFocus() {
|
|
29
|
+
this.focusSubscription = this.navigation.onFileFocus.subscribe((index) => {
|
|
30
|
+
this.fileListItems.toArray()[index].focus();
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
onItemAction() {
|
|
34
|
+
this.actionSubscription = this.navigation.onFileAction.subscribe((key) => {
|
|
35
|
+
this.itemActionHandler(key);
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
itemActionHandler(key) {
|
|
39
|
+
let index = this.navigation.focusedIndex;
|
|
40
|
+
let item = this.fileListItems.toArray()[index];
|
|
41
|
+
let uid = item.uidAttribute;
|
|
42
|
+
let files = this.uploadService.files.get(uid);
|
|
43
|
+
if (key === Keys.Escape && files[0].state === FileState.Uploading) {
|
|
44
|
+
this.uploadService.cancelFiles(uid);
|
|
45
|
+
this.navigation.focusSelectButton();
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
if (key === Keys.Enter && files[0].state === FileState.Failed) {
|
|
49
|
+
this.uploadService.retryFiles(uid);
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
if (key === Keys.Delete) {
|
|
53
|
+
if (files[0].state === FileState.Uploading) {
|
|
54
|
+
this.uploadService.cancelFiles(uid);
|
|
55
|
+
}
|
|
56
|
+
else if (this.hasDelete(item)) {
|
|
57
|
+
this.uploadService.removeFiles(uid);
|
|
58
|
+
}
|
|
59
|
+
this.navigation.focusSelectButton();
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
hasDelete(item) {
|
|
63
|
+
return item.element.nativeElement.getElementsByClassName('k-delete').length > 0;
|
|
64
|
+
}
|
|
65
|
+
ngOnDestroy() {
|
|
66
|
+
this.focusSubscription.unsubscribe();
|
|
67
|
+
this.actionSubscription.unsubscribe();
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
FileListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FileListComponent, deps: [{ token: i1.UploadService }, { token: i2.NavigationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
71
|
+
FileListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FileListComponent, selector: "[kendo-upload-file-list]", inputs: { disabled: "disabled", fileList: "fileList", fileTemplate: "fileTemplate", fileInfoTemplate: "fileInfoTemplate" }, viewQueries: [{ propertyName: "fileListItems", predicate: FileListItemDirective, descendants: true }], ngImport: i0, template: `
|
|
72
|
+
<ng-template ngFor
|
|
73
|
+
[ngForOf]="fileList"
|
|
74
|
+
let-files
|
|
75
|
+
let-index="index">
|
|
76
|
+
<li kendoUploadFileListItem [files]='files' [index]='index'>
|
|
77
|
+
<kendo-upload-file-list-single-item
|
|
78
|
+
class='k-file-single'
|
|
79
|
+
*ngIf='files.length === 1 && !fileTemplate'
|
|
80
|
+
[disabled]='disabled'
|
|
81
|
+
[file]='files[0]'
|
|
82
|
+
[fileInfoTemplate]="fileInfoTemplate">
|
|
83
|
+
</kendo-upload-file-list-single-item>
|
|
84
|
+
<kendo-upload-file-list-multiple-items
|
|
85
|
+
class='k-file-multiple'
|
|
86
|
+
*ngIf='files.length > 1 && !fileTemplate'
|
|
87
|
+
[disabled]='disabled'
|
|
88
|
+
[files]='files'
|
|
89
|
+
[fileInfoTemplate]="fileInfoTemplate">
|
|
90
|
+
</kendo-upload-file-list-multiple-items>
|
|
91
|
+
<ng-template *ngIf="fileTemplate"
|
|
92
|
+
[templateContext]="{
|
|
93
|
+
templateRef: fileTemplate.templateRef,
|
|
94
|
+
state: files[0].state,
|
|
95
|
+
$implicit: files
|
|
96
|
+
}"></ng-template>
|
|
97
|
+
</li>
|
|
98
|
+
</ng-template>
|
|
99
|
+
`, isInline: true, components: [{ type: i3.FileListSingleItemComponent, selector: "kendo-upload-file-list-single-item", inputs: ["disabled", "file", "fileInfoTemplate"] }, { type: i4.FileListMultipleItemsComponent, selector: "kendo-upload-file-list-multiple-items", inputs: ["disabled", "files", "fileInfoTemplate"] }], directives: [{ type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6.FileListItemDirective, selector: "[kendoUploadFileListItem]", inputs: ["files", "index"] }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7.TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }] });
|
|
100
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FileListComponent, decorators: [{
|
|
101
|
+
type: Component,
|
|
102
|
+
args: [{
|
|
103
|
+
selector: '[kendo-upload-file-list]',
|
|
104
|
+
template: `
|
|
105
|
+
<ng-template ngFor
|
|
106
|
+
[ngForOf]="fileList"
|
|
107
|
+
let-files
|
|
108
|
+
let-index="index">
|
|
109
|
+
<li kendoUploadFileListItem [files]='files' [index]='index'>
|
|
110
|
+
<kendo-upload-file-list-single-item
|
|
111
|
+
class='k-file-single'
|
|
112
|
+
*ngIf='files.length === 1 && !fileTemplate'
|
|
113
|
+
[disabled]='disabled'
|
|
114
|
+
[file]='files[0]'
|
|
115
|
+
[fileInfoTemplate]="fileInfoTemplate">
|
|
116
|
+
</kendo-upload-file-list-single-item>
|
|
117
|
+
<kendo-upload-file-list-multiple-items
|
|
118
|
+
class='k-file-multiple'
|
|
119
|
+
*ngIf='files.length > 1 && !fileTemplate'
|
|
120
|
+
[disabled]='disabled'
|
|
121
|
+
[files]='files'
|
|
122
|
+
[fileInfoTemplate]="fileInfoTemplate">
|
|
123
|
+
</kendo-upload-file-list-multiple-items>
|
|
124
|
+
<ng-template *ngIf="fileTemplate"
|
|
125
|
+
[templateContext]="{
|
|
126
|
+
templateRef: fileTemplate.templateRef,
|
|
127
|
+
state: files[0].state,
|
|
128
|
+
$implicit: files
|
|
129
|
+
}"></ng-template>
|
|
130
|
+
</li>
|
|
131
|
+
</ng-template>
|
|
132
|
+
`
|
|
133
|
+
}]
|
|
134
|
+
}], ctorParameters: function () { return [{ type: i1.UploadService }, { type: i2.NavigationService }]; }, propDecorators: { disabled: [{
|
|
135
|
+
type: Input
|
|
136
|
+
}], fileList: [{
|
|
137
|
+
type: Input
|
|
138
|
+
}], fileTemplate: [{
|
|
139
|
+
type: Input
|
|
140
|
+
}], fileInfoTemplate: [{
|
|
141
|
+
type: Input
|
|
142
|
+
}], fileListItems: [{
|
|
143
|
+
type: ViewChildren,
|
|
144
|
+
args: [FileListItemDirective]
|
|
145
|
+
}] } });
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { Component, Input, HostBinding, ViewChild } from '@angular/core';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
import * as i1 from "../upload.service";
|
|
8
|
+
import * as i2 from "@progress/kendo-angular-l10n";
|
|
9
|
+
import * as i3 from "../navigation.service";
|
|
10
|
+
/**
|
|
11
|
+
* @hidden
|
|
12
|
+
*/
|
|
13
|
+
export class UploadActionButtonsComponent {
|
|
14
|
+
constructor(uploadService, localization, navigation) {
|
|
15
|
+
this.uploadService = uploadService;
|
|
16
|
+
this.localization = localization;
|
|
17
|
+
this.navigation = navigation;
|
|
18
|
+
this.hostDefaultClass = true;
|
|
19
|
+
this.onAction();
|
|
20
|
+
this.onFocus();
|
|
21
|
+
}
|
|
22
|
+
get actionButtonsEndClassName() {
|
|
23
|
+
return this.actionsLayout === 'end';
|
|
24
|
+
}
|
|
25
|
+
get actionButtonsStretchedClassName() {
|
|
26
|
+
return this.actionsLayout === 'stretched';
|
|
27
|
+
}
|
|
28
|
+
get actionButtonsStartClassName() {
|
|
29
|
+
return this.actionsLayout === 'start';
|
|
30
|
+
}
|
|
31
|
+
get actionButtonsCenterClassName() {
|
|
32
|
+
return this.actionsLayout === 'center';
|
|
33
|
+
}
|
|
34
|
+
onAction() {
|
|
35
|
+
this.actionSubscription = this.navigation.onActionButtonAction.subscribe((button) => {
|
|
36
|
+
if (button === "clear") {
|
|
37
|
+
this.clearFiles();
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
this.performUpload();
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
onFocus() {
|
|
45
|
+
this.focusSubscription = this.navigation.onActionButtonFocus.subscribe((button) => {
|
|
46
|
+
this.focusButton(button);
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
focusButton(button) {
|
|
50
|
+
const el = (button === "clear") ? this.clearButton : this.uploadButton;
|
|
51
|
+
el.nativeElement.focus();
|
|
52
|
+
}
|
|
53
|
+
ngOnDestroy() {
|
|
54
|
+
this.actionSubscription.unsubscribe();
|
|
55
|
+
this.focusSubscription.unsubscribe();
|
|
56
|
+
}
|
|
57
|
+
onUploadButtonClick(event) {
|
|
58
|
+
event.stopImmediatePropagation();
|
|
59
|
+
this.performUpload();
|
|
60
|
+
}
|
|
61
|
+
performUpload() {
|
|
62
|
+
if (!this.disabled) {
|
|
63
|
+
this.uploadService.uploadFiles();
|
|
64
|
+
this.navigation.focusSelectButton();
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
onClearButtonClick(event) {
|
|
68
|
+
event.stopImmediatePropagation();
|
|
69
|
+
this.clearFiles();
|
|
70
|
+
}
|
|
71
|
+
clearFiles() {
|
|
72
|
+
if (!this.disabled) {
|
|
73
|
+
this.uploadService.clearFiles();
|
|
74
|
+
this.navigation.focusSelectButton();
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
textFor(key) {
|
|
78
|
+
return this.localization.get(key);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
UploadActionButtonsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: UploadActionButtonsComponent, deps: [{ token: i1.UploadService }, { token: i2.LocalizationService }, { token: i3.NavigationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
82
|
+
UploadActionButtonsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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: `
|
|
83
|
+
<button #clearButton type="button" class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-clear-selected"
|
|
84
|
+
[attr.tabIndex]="-1"
|
|
85
|
+
(click)="onClearButtonClick($event)">
|
|
86
|
+
{{textFor('clearSelectedFiles')}}
|
|
87
|
+
</button>
|
|
88
|
+
<button #uploadButton type="button" class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-primary k-upload-selected"
|
|
89
|
+
[attr.tabIndex]="-1"
|
|
90
|
+
(click)="onUploadButtonClick($event)">
|
|
91
|
+
{{textFor('uploadSelectedFiles')}}
|
|
92
|
+
</button>
|
|
93
|
+
`, isInline: true });
|
|
94
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: UploadActionButtonsComponent, decorators: [{
|
|
95
|
+
type: Component,
|
|
96
|
+
args: [{
|
|
97
|
+
selector: 'kendo-upload-action-buttons',
|
|
98
|
+
template: `
|
|
99
|
+
<button #clearButton type="button" class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-clear-selected"
|
|
100
|
+
[attr.tabIndex]="-1"
|
|
101
|
+
(click)="onClearButtonClick($event)">
|
|
102
|
+
{{textFor('clearSelectedFiles')}}
|
|
103
|
+
</button>
|
|
104
|
+
<button #uploadButton type="button" class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-primary k-upload-selected"
|
|
105
|
+
[attr.tabIndex]="-1"
|
|
106
|
+
(click)="onUploadButtonClick($event)">
|
|
107
|
+
{{textFor('uploadSelectedFiles')}}
|
|
108
|
+
</button>
|
|
109
|
+
`
|
|
110
|
+
}]
|
|
111
|
+
}], ctorParameters: function () { return [{ type: i1.UploadService }, { type: i2.LocalizationService }, { type: i3.NavigationService }]; }, propDecorators: { disabled: [{
|
|
112
|
+
type: Input
|
|
113
|
+
}], actionsLayout: [{
|
|
114
|
+
type: Input
|
|
115
|
+
}], clearButton: [{
|
|
116
|
+
type: ViewChild,
|
|
117
|
+
args: ['clearButton', { static: true }]
|
|
118
|
+
}], uploadButton: [{
|
|
119
|
+
type: ViewChild,
|
|
120
|
+
args: ['uploadButton', { static: true }]
|
|
121
|
+
}], hostDefaultClass: [{
|
|
122
|
+
type: HostBinding,
|
|
123
|
+
args: ['class.k-actions']
|
|
124
|
+
}], actionButtonsEndClassName: [{
|
|
125
|
+
type: HostBinding,
|
|
126
|
+
args: ['class.k-actions-end']
|
|
127
|
+
}], actionButtonsStretchedClassName: [{
|
|
128
|
+
type: HostBinding,
|
|
129
|
+
args: ['class.k-actions-stretched']
|
|
130
|
+
}], actionButtonsStartClassName: [{
|
|
131
|
+
type: HostBinding,
|
|
132
|
+
args: ['class.k-actions-start']
|
|
133
|
+
}], actionButtonsCenterClassName: [{
|
|
134
|
+
type: HostBinding,
|
|
135
|
+
args: ['class.k-actions-center']
|
|
136
|
+
}] } });
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { Component, Input } from '@angular/core';
|
|
6
|
+
import { FileState } from '../types';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
import * as i1 from "@progress/kendo-angular-l10n";
|
|
9
|
+
import * as i2 from "@angular/common";
|
|
10
|
+
/**
|
|
11
|
+
* @hidden
|
|
12
|
+
*/
|
|
13
|
+
export class UploadStatusTotalComponent {
|
|
14
|
+
constructor(localization) {
|
|
15
|
+
this.localization = localization;
|
|
16
|
+
}
|
|
17
|
+
ngDoCheck() {
|
|
18
|
+
this.isPaused = this.fileList.hasFileWithState([FileState.Paused]);
|
|
19
|
+
this.isFailed = this.fileList.hasFileWithState([FileState.Failed]);
|
|
20
|
+
this.isUploading = this.fileList.hasFileWithState([FileState.Uploading]);
|
|
21
|
+
if (this.isPaused && !this.isUploading) {
|
|
22
|
+
this.statusText = this.localization.get('headerStatusPaused');
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
this.statusText = this.isUploading ? this.localization.get('headerStatusUploading')
|
|
26
|
+
: this.localization.get('headerStatusUploaded');
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
UploadStatusTotalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: UploadStatusTotalComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
31
|
+
UploadStatusTotalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: UploadStatusTotalComponent, selector: "kendo-upload-status-total", inputs: { fileList: "fileList" }, ngImport: i0, template: `
|
|
32
|
+
<span class="k-icon"
|
|
33
|
+
[ngClass]="{
|
|
34
|
+
'k-i-checkmark': !this.isUploading && !this.isFailed,
|
|
35
|
+
'k-i-exception': !this.isUploading && this.isFailed,
|
|
36
|
+
'k-i-upload': this.isUploading,
|
|
37
|
+
'k-i-pause-sm': this.isPaused
|
|
38
|
+
}">
|
|
39
|
+
</span>
|
|
40
|
+
{{statusText}}
|
|
41
|
+
`, isInline: true, directives: [{ type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
42
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: UploadStatusTotalComponent, decorators: [{
|
|
43
|
+
type: Component,
|
|
44
|
+
args: [{
|
|
45
|
+
selector: 'kendo-upload-status-total',
|
|
46
|
+
template: `
|
|
47
|
+
<span class="k-icon"
|
|
48
|
+
[ngClass]="{
|
|
49
|
+
'k-i-checkmark': !this.isUploading && !this.isFailed,
|
|
50
|
+
'k-i-exception': !this.isUploading && this.isFailed,
|
|
51
|
+
'k-i-upload': this.isUploading,
|
|
52
|
+
'k-i-pause-sm': this.isPaused
|
|
53
|
+
}">
|
|
54
|
+
</span>
|
|
55
|
+
{{statusText}}
|
|
56
|
+
`
|
|
57
|
+
}]
|
|
58
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; }, propDecorators: { fileList: [{
|
|
59
|
+
type: Input
|
|
60
|
+
}] } });
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* Copyright © 2021 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 * as tslib_1 from "tslib";
|
|
6
5
|
import { FileInfoTemplateDirective } from './templates/file-info-template.directive';
|
|
7
6
|
import { NgModule } from '@angular/core';
|
|
8
7
|
import { CommonModule } from '@angular/common';
|
|
@@ -19,6 +18,7 @@ import { LocalizedMessagesDirective } from './localization/localized-messages.di
|
|
|
19
18
|
import { TemplateContextDirective } from './templates/template-context.directive';
|
|
20
19
|
import { UploadDropZoneDirective } from './dropzone-external.directive';
|
|
21
20
|
import { UploadDropZoneComponent } from './dropzone.component';
|
|
21
|
+
import * as i0 from "@angular/core";
|
|
22
22
|
/**
|
|
23
23
|
* @hidden
|
|
24
24
|
*/
|
|
@@ -46,20 +46,47 @@ export const PUBLIC_DIRECTIVES = [
|
|
|
46
46
|
/**
|
|
47
47
|
* @hidden
|
|
48
48
|
*/
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
SharedModule =
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
],
|
|
65
|
-
|
|
49
|
+
export class SharedModule {
|
|
50
|
+
}
|
|
51
|
+
SharedModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
52
|
+
SharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SharedModule, declarations: [FileTemplateDirective,
|
|
53
|
+
FileInfoTemplateDirective,
|
|
54
|
+
CustomMessagesComponent,
|
|
55
|
+
UploadDropZoneDirective,
|
|
56
|
+
UploadDropZoneComponent, DropZoneInternalDirective,
|
|
57
|
+
FileListComponent,
|
|
58
|
+
FileListItemDirective,
|
|
59
|
+
FileListItemActionButtonComponent,
|
|
60
|
+
FileListMultipleItemsComponent,
|
|
61
|
+
FileListSingleItemComponent,
|
|
62
|
+
FileSelectDirective,
|
|
63
|
+
LocalizedMessagesDirective,
|
|
64
|
+
TemplateContextDirective], imports: [CommonModule], exports: [FileTemplateDirective,
|
|
65
|
+
FileInfoTemplateDirective,
|
|
66
|
+
CustomMessagesComponent,
|
|
67
|
+
UploadDropZoneDirective,
|
|
68
|
+
UploadDropZoneComponent, DropZoneInternalDirective,
|
|
69
|
+
FileListComponent,
|
|
70
|
+
FileListItemDirective,
|
|
71
|
+
FileListItemActionButtonComponent,
|
|
72
|
+
FileListMultipleItemsComponent,
|
|
73
|
+
FileListSingleItemComponent,
|
|
74
|
+
FileSelectDirective,
|
|
75
|
+
LocalizedMessagesDirective,
|
|
76
|
+
TemplateContextDirective, CommonModule] });
|
|
77
|
+
SharedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SharedModule, imports: [[CommonModule], CommonModule] });
|
|
78
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SharedModule, decorators: [{
|
|
79
|
+
type: NgModule,
|
|
80
|
+
args: [{
|
|
81
|
+
declarations: [
|
|
82
|
+
PUBLIC_DIRECTIVES,
|
|
83
|
+
SHARED_DECLARATIONS
|
|
84
|
+
],
|
|
85
|
+
exports: [
|
|
86
|
+
PUBLIC_DIRECTIVES,
|
|
87
|
+
SHARED_DECLARATIONS,
|
|
88
|
+
CommonModule
|
|
89
|
+
],
|
|
90
|
+
imports: [CommonModule]
|
|
91
|
+
}]
|
|
92
|
+
}] });
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { Directive } from '@angular/core';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
/**
|
|
8
|
+
* Used to customize the rendering of the file info section in the list. All other elements of the default template, such as file icon, action buttons, upload progress etc. will be preserved in place. ([see example]({% slug templates_upload %}#toc-file-info-template)).
|
|
9
|
+
*/
|
|
10
|
+
export class FileInfoTemplateDirective {
|
|
11
|
+
constructor(templateRef) {
|
|
12
|
+
this.templateRef = templateRef;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
FileInfoTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FileInfoTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
16
|
+
FileInfoTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FileInfoTemplateDirective, selector: "[kendoUploadFileInfoTemplate], [kendoFileSelectFileInfoTemplate]", ngImport: i0 });
|
|
17
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FileInfoTemplateDirective, decorators: [{
|
|
18
|
+
type: Directive,
|
|
19
|
+
args: [{
|
|
20
|
+
selector: '[kendoUploadFileInfoTemplate], [kendoFileSelectFileInfoTemplate]'
|
|
21
|
+
}]
|
|
22
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { Directive } from '@angular/core';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
/**
|
|
8
|
+
* Used to customize the rendering of the files in the list ([see example]({% slug templates_upload %}#toc-file-template)).
|
|
9
|
+
*/
|
|
10
|
+
export class FileTemplateDirective {
|
|
11
|
+
constructor(templateRef) {
|
|
12
|
+
this.templateRef = templateRef;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
FileTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FileTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
16
|
+
FileTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FileTemplateDirective, selector: "[kendoUploadFileTemplate], [kendoFileSelectFileTemplate]", ngImport: i0 });
|
|
17
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FileTemplateDirective, decorators: [{
|
|
18
|
+
type: Directive,
|
|
19
|
+
args: [{
|
|
20
|
+
selector: '[kendoUploadFileTemplate], [kendoFileSelectFileTemplate]'
|
|
21
|
+
}]
|
|
22
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { Directive, Input } from '@angular/core';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
/**
|
|
8
|
+
* @hidden
|
|
9
|
+
*/
|
|
10
|
+
export class TemplateContextDirective {
|
|
11
|
+
constructor(viewContainerRef) {
|
|
12
|
+
this.viewContainerRef = viewContainerRef;
|
|
13
|
+
}
|
|
14
|
+
set templateContext(context) {
|
|
15
|
+
if (this.insertedViewRef) {
|
|
16
|
+
this.viewContainerRef.remove(this.viewContainerRef.indexOf(this.insertedViewRef));
|
|
17
|
+
this.insertedViewRef = undefined;
|
|
18
|
+
}
|
|
19
|
+
if (context.templateRef) {
|
|
20
|
+
this.insertedViewRef = this.viewContainerRef.createEmbeddedView(context.templateRef, context);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
TemplateContextDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TemplateContextDirective, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
25
|
+
TemplateContextDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TemplateContextDirective, selector: "[templateContext]", inputs: { templateContext: "templateContext" }, ngImport: i0 });
|
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TemplateContextDirective, decorators: [{
|
|
27
|
+
type: Directive,
|
|
28
|
+
args: [{
|
|
29
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
30
|
+
selector: '[templateContext]'
|
|
31
|
+
}]
|
|
32
|
+
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; }, propDecorators: { templateContext: [{
|
|
33
|
+
type: Input
|
|
34
|
+
}] } });
|
|
@@ -2,3 +2,4 @@
|
|
|
2
2
|
* Copyright © 2021 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
|
+
export {};
|
|
@@ -2,3 +2,4 @@
|
|
|
2
2
|
* Copyright © 2021 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
|
+
export {};
|
|
File without changes
|
|
@@ -2,3 +2,4 @@
|
|
|
2
2
|
* Copyright © 2021 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
|
+
export {};
|
|
@@ -2,3 +2,4 @@
|
|
|
2
2
|
* Copyright © 2021 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
|
+
export {};
|
|
@@ -2,3 +2,4 @@
|
|
|
2
2
|
* Copyright © 2021 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
|
+
export {};
|
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
* Copyright © 2021 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
|
-
const ɵ0 = [
|
|
6
|
-
".xlr", ".xls", ".xlsx"
|
|
7
|
-
];
|
|
8
5
|
/**
|
|
9
6
|
* @hidden
|
|
10
7
|
*/
|
|
@@ -24,7 +21,9 @@ export const fileGroupMap = {
|
|
|
24
21
|
presentation: [
|
|
25
22
|
".key", ".odp", ".pps", ".ppt", ".pptx"
|
|
26
23
|
],
|
|
27
|
-
data:
|
|
24
|
+
data: [
|
|
25
|
+
".xlr", ".xls", ".xlsx"
|
|
26
|
+
],
|
|
28
27
|
programming: [
|
|
29
28
|
".tmp", ".bak", ".msi", ".cab", ".cpl", ".cur", ".dll", ".dmp", ".drv", ".icns", ".ico", ".link", ".sys", ".cfg",
|
|
30
29
|
".ini", ".asp", ".aspx", ".cer", ".csr", ".css", ".dcr", ".htm", ".html", ".js", ".php", ".rss", ".xhtml"
|
|
@@ -42,4 +41,3 @@ export const fileGroupMap = {
|
|
|
42
41
|
".dmg", ".iso", ".toast", ".vcd", ".bin", ".cue", ".mdf"
|
|
43
42
|
]
|
|
44
43
|
};
|
|
45
|
-
export { ɵ0 };
|
|
@@ -2,3 +2,4 @@
|
|
|
2
2
|
* Copyright © 2021 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
|
+
export {};
|
|
File without changes
|
|
@@ -2,3 +2,4 @@
|
|
|
2
2
|
* Copyright © 2021 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
|
+
export {};
|
|
File without changes
|
|
@@ -2,3 +2,4 @@
|
|
|
2
2
|
* Copyright © 2021 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
|
+
export {};
|
|
File without changes
|