@progress/kendo-angular-upload 11.1.0-develop.2 → 11.1.0-develop.4
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 +11 -13
- package/esm2020/index.mjs +0 -1
- package/esm2020/package-metadata.mjs +2 -2
- package/esm2020/rendering/file-list-multiple-items.component.mjs +39 -39
- package/esm2020/rendering/file-list-single-item.component.mjs +25 -31
- package/esm2020/rendering/file-list.component.mjs +51 -57
- package/esm2020/shared.module.mjs +3 -7
- package/esm2020/upload.component.mjs +109 -117
- package/fesm2015/progress-kendo-angular-upload.mjs +243 -291
- package/fesm2020/progress-kendo-angular-upload.mjs +243 -291
- package/fileselect.component.d.ts +3 -9
- package/index.d.ts +0 -1
- package/package.json +7 -7
- package/schematics/ngAdd/index.js +3 -3
- package/shared.module.d.ts +5 -6
- package/upload.component.d.ts +3 -13
- package/esm2020/templates/template-context.directive.mjs +0 -34
- package/templates/template-context.directive.d.ts +0 -17
|
@@ -140,7 +140,9 @@ export class FileSelectComponent {
|
|
|
140
140
|
return this.direction;
|
|
141
141
|
}
|
|
142
142
|
ngOnInit() {
|
|
143
|
-
this.
|
|
143
|
+
const { buttonId, inputId } = this.getIds();
|
|
144
|
+
this.focusableId = buttonId;
|
|
145
|
+
this.inputElementId = inputId;
|
|
144
146
|
if (this.zoneId) {
|
|
145
147
|
this.dropZoneService.addComponent(this, this.zoneId);
|
|
146
148
|
}
|
|
@@ -154,14 +156,6 @@ export class FileSelectComponent {
|
|
|
154
156
|
this.subs.add(this.renderer.listen(this.wrapper, 'keydown', event => this.handleKeydown(event)));
|
|
155
157
|
});
|
|
156
158
|
}
|
|
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);
|
|
164
|
-
}
|
|
165
159
|
/**
|
|
166
160
|
* @hidden
|
|
167
161
|
*/
|
|
@@ -410,7 +404,8 @@ FileSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
410
404
|
role="button"
|
|
411
405
|
[id]="focusableId"
|
|
412
406
|
[attr.aria-label]="textFor('select')"
|
|
413
|
-
[attr.tabindex]="
|
|
407
|
+
[attr.tabindex]="tabindex"
|
|
408
|
+
[attr.aria-controls]="inputElementId"
|
|
414
409
|
(focus)="onFileSelectButtonFocus($event)"
|
|
415
410
|
(blur)="onFileSelectButtonBlur($event)"
|
|
416
411
|
>
|
|
@@ -419,6 +414,7 @@ FileSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
419
414
|
<input
|
|
420
415
|
#fileSelectInput
|
|
421
416
|
kendoFileSelect
|
|
417
|
+
[id]="inputElementId"
|
|
422
418
|
[attr.accept]="accept ? accept : null"
|
|
423
419
|
[attr.aria-hidden]="true"
|
|
424
420
|
[dir]="direction"
|
|
@@ -491,7 +487,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
491
487
|
role="button"
|
|
492
488
|
[id]="focusableId"
|
|
493
489
|
[attr.aria-label]="textFor('select')"
|
|
494
|
-
[attr.tabindex]="
|
|
490
|
+
[attr.tabindex]="tabindex"
|
|
491
|
+
[attr.aria-controls]="inputElementId"
|
|
495
492
|
(focus)="onFileSelectButtonFocus($event)"
|
|
496
493
|
(blur)="onFileSelectButtonBlur($event)"
|
|
497
494
|
>
|
|
@@ -500,6 +497,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
500
497
|
<input
|
|
501
498
|
#fileSelectInput
|
|
502
499
|
kendoFileSelect
|
|
500
|
+
[id]="inputElementId"
|
|
503
501
|
[attr.accept]="accept ? accept : null"
|
|
504
502
|
[attr.aria-hidden]="true"
|
|
505
503
|
[dir]="direction"
|
|
@@ -540,10 +538,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
540
538
|
type: Input
|
|
541
539
|
}], fileTemplate: [{
|
|
542
540
|
type: ContentChild,
|
|
543
|
-
args: [FileTemplateDirective
|
|
541
|
+
args: [FileTemplateDirective]
|
|
544
542
|
}], fileInfoTemplate: [{
|
|
545
543
|
type: ContentChild,
|
|
546
|
-
args: [FileInfoTemplateDirective
|
|
544
|
+
args: [FileInfoTemplateDirective]
|
|
547
545
|
}], fileSelectInput: [{
|
|
548
546
|
type: ViewChild,
|
|
549
547
|
args: ['fileSelectInput', { static: true }]
|
package/esm2020/index.mjs
CHANGED
|
@@ -18,7 +18,6 @@ export { FileListItemActionButtonComponent } from './rendering/file-list-item-ac
|
|
|
18
18
|
export { FileListMultipleItemsComponent } from './rendering/file-list-multiple-items.component';
|
|
19
19
|
export { FileTemplateDirective } from './templates/file-template.directive';
|
|
20
20
|
export { FileInfoTemplateDirective } from './templates/file-info-template.directive';
|
|
21
|
-
export { TemplateContextDirective } from './templates/template-context.directive';
|
|
22
21
|
export { UploadStatusTotalComponent } from './rendering/upload-status-total.component';
|
|
23
22
|
export { UploadActionButtonsComponent } from './rendering/upload-action-buttons.component';
|
|
24
23
|
export { UploadDropZoneDirective } from './dropzone-external.directive';
|
|
@@ -9,7 +9,7 @@ export const packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-upload',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
13
|
-
version: '11.1.0-develop.
|
|
12
|
+
publishDate: 1674490316,
|
|
13
|
+
version: '11.1.0-develop.4',
|
|
14
14
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
15
15
|
};
|
|
@@ -18,8 +18,6 @@ import * as i3 from "@progress/kendo-angular-progressbar";
|
|
|
18
18
|
import * as i4 from "@progress/kendo-angular-icons";
|
|
19
19
|
import * as i5 from "./file-list-item-action-button.component";
|
|
20
20
|
import * as i6 from "@angular/common";
|
|
21
|
-
import * as i7 from "@progress/kendo-angular-buttons";
|
|
22
|
-
import * as i8 from "../templates/template-context.directive";
|
|
23
21
|
/**
|
|
24
22
|
* @hidden
|
|
25
23
|
*/
|
|
@@ -84,33 +82,34 @@ FileListMultipleItemsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
|
84
82
|
</span>
|
|
85
83
|
<span class="k-multiple-files-wrapper">
|
|
86
84
|
<ng-container *ngIf="!fileInfoTemplate">
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
85
|
+
<span *ngFor="let file of files" class="k-file-info">
|
|
86
|
+
<span [title]="file.name" class="k-file-name">
|
|
87
|
+
{{file.name}}
|
|
88
|
+
</span>
|
|
89
|
+
<span [ngClass]="{
|
|
90
|
+
'k-file-validation-message': file.validationErrors,
|
|
91
|
+
'k-file-size': !file.validationErrors
|
|
92
|
+
}"
|
|
93
|
+
>{{fileStatusText(file)}}</span>
|
|
90
94
|
</span>
|
|
91
|
-
<span
|
|
92
|
-
|
|
93
|
-
'k-file-size': !file.validationErrors
|
|
94
|
-
}"
|
|
95
|
-
>{{fileStatusText(file)}}</span>
|
|
96
|
-
</span>
|
|
97
|
-
<span class="k-file-summary"
|
|
98
|
-
>{{batchStatusText}}</span>
|
|
95
|
+
<span class="k-file-summary"
|
|
96
|
+
>{{batchStatusText}}</span>
|
|
99
97
|
</ng-container>
|
|
100
|
-
<ng-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
98
|
+
<ng-container
|
|
99
|
+
*ngIf="fileInfoTemplate"
|
|
100
|
+
[ngTemplateOutlet]="fileInfoTemplate.templateRef"
|
|
101
|
+
[ngTemplateOutletContext]="{
|
|
102
|
+
templateRef: fileInfoTemplate.templateRef,
|
|
103
|
+
state: files[0].state,
|
|
104
|
+
$implicit: files
|
|
105
|
+
}"></ng-container>
|
|
107
106
|
</span>
|
|
108
107
|
<kendo-upload-file-list-item-action-button
|
|
109
108
|
[file]='files[0]'
|
|
110
109
|
[disabled]='disabled'
|
|
111
110
|
[progress]='progressComplete'>
|
|
112
111
|
</kendo-upload-file-list-item-action-button>
|
|
113
|
-
`, isInline: true, components: [{ type: i3.ProgressBarComponent, selector: "kendo-progressbar", inputs: ["label", "progressCssStyle", "progressCssClass", "emptyCssStyle", "emptyCssClass", "animation"], outputs: ["animationEnd"], exportAs: ["kendoProgressBar"] }, { type: i4.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass"], exportAs: ["kendoIconWrapper"] }, { type: i5.FileListItemActionButtonComponent, selector: "kendo-upload-file-list-item-action-button", inputs: ["file", "disabled", "progress"] }], directives: [{ type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type:
|
|
112
|
+
`, isInline: true, components: [{ type: i3.ProgressBarComponent, selector: "kendo-progressbar", inputs: ["label", "progressCssStyle", "progressCssClass", "emptyCssStyle", "emptyCssClass", "animation"], outputs: ["animationEnd"], exportAs: ["kendoProgressBar"] }, { type: i4.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass"], exportAs: ["kendoIconWrapper"] }, { type: i5.FileListItemActionButtonComponent, selector: "kendo-upload-file-list-item-action-button", inputs: ["file", "disabled", "progress"] }], directives: [{ type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], animations: [
|
|
114
113
|
trigger('progressState', [
|
|
115
114
|
state('active', style({ opacity: 1 })),
|
|
116
115
|
state('inactive', style({ opacity: 0 })),
|
|
@@ -149,26 +148,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
149
148
|
</span>
|
|
150
149
|
<span class="k-multiple-files-wrapper">
|
|
151
150
|
<ng-container *ngIf="!fileInfoTemplate">
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
151
|
+
<span *ngFor="let file of files" class="k-file-info">
|
|
152
|
+
<span [title]="file.name" class="k-file-name">
|
|
153
|
+
{{file.name}}
|
|
154
|
+
</span>
|
|
155
|
+
<span [ngClass]="{
|
|
156
|
+
'k-file-validation-message': file.validationErrors,
|
|
157
|
+
'k-file-size': !file.validationErrors
|
|
158
|
+
}"
|
|
159
|
+
>{{fileStatusText(file)}}</span>
|
|
155
160
|
</span>
|
|
156
|
-
<span
|
|
157
|
-
|
|
158
|
-
'k-file-size': !file.validationErrors
|
|
159
|
-
}"
|
|
160
|
-
>{{fileStatusText(file)}}</span>
|
|
161
|
-
</span>
|
|
162
|
-
<span class="k-file-summary"
|
|
163
|
-
>{{batchStatusText}}</span>
|
|
161
|
+
<span class="k-file-summary"
|
|
162
|
+
>{{batchStatusText}}</span>
|
|
164
163
|
</ng-container>
|
|
165
|
-
<ng-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
164
|
+
<ng-container
|
|
165
|
+
*ngIf="fileInfoTemplate"
|
|
166
|
+
[ngTemplateOutlet]="fileInfoTemplate.templateRef"
|
|
167
|
+
[ngTemplateOutletContext]="{
|
|
168
|
+
templateRef: fileInfoTemplate.templateRef,
|
|
169
|
+
state: files[0].state,
|
|
170
|
+
$implicit: files
|
|
171
|
+
}"></ng-container>
|
|
172
172
|
</span>
|
|
173
173
|
<kendo-upload-file-list-item-action-button
|
|
174
174
|
[file]='files[0]'
|
|
@@ -19,8 +19,6 @@ import * as i3 from "@progress/kendo-angular-progressbar";
|
|
|
19
19
|
import * as i4 from "@progress/kendo-angular-icons";
|
|
20
20
|
import * as i5 from "./file-list-item-action-button.component";
|
|
21
21
|
import * as i6 from "@angular/common";
|
|
22
|
-
import * as i7 from "@progress/kendo-angular-buttons";
|
|
23
|
-
import * as i8 from "../templates/template-context.directive";
|
|
24
22
|
/**
|
|
25
23
|
* @hidden
|
|
26
24
|
*/
|
|
@@ -93,28 +91,26 @@ FileListSingleItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.
|
|
|
93
91
|
</span>
|
|
94
92
|
<span class="k-file-info">
|
|
95
93
|
<ng-container *ngIf="!fileInfoTemplate">
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
94
|
+
<span class="k-file-name" [title]="file.name">{{ file.name }}</span>
|
|
95
|
+
<span [ngClass]="{
|
|
96
|
+
'k-file-validation-message': file.validationErrors,
|
|
97
|
+
'k-file-size': !file.validationErrors && isNotYetUploaded,
|
|
98
|
+
'k-file-summary': isUploadSuccessful || isUploadFailed
|
|
99
|
+
}"
|
|
100
|
+
>{{fileStatusText}}</span>
|
|
103
101
|
</ng-container>
|
|
104
|
-
<ng-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
}">
|
|
110
|
-
</ng-template>
|
|
102
|
+
<ng-container *ngIf="fileInfoTemplate" [ngTemplateOutlet]="fileInfoTemplate.templateRef" [ngTemplateOutletContext]="{
|
|
103
|
+
templateRef: fileInfoTemplate.templateRef,
|
|
104
|
+
state: file.state,
|
|
105
|
+
$implicit: [file]
|
|
106
|
+
}"></ng-container>
|
|
111
107
|
</span>
|
|
112
108
|
<kendo-upload-file-list-item-action-button
|
|
113
109
|
[file]='file'
|
|
114
110
|
[disabled]='disabled'
|
|
115
111
|
[progress]='progressComplete'>
|
|
116
112
|
</kendo-upload-file-list-item-action-button>
|
|
117
|
-
`, isInline: true, components: [{ type: i3.ProgressBarComponent, selector: "kendo-progressbar", inputs: ["label", "progressCssStyle", "progressCssClass", "emptyCssStyle", "emptyCssClass", "animation"], outputs: ["animationEnd"], exportAs: ["kendoProgressBar"] }, { type: i4.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass"], exportAs: ["kendoIconWrapper"] }, { type: i5.FileListItemActionButtonComponent, selector: "kendo-upload-file-list-item-action-button", inputs: ["file", "disabled", "progress"] }], directives: [{ type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type:
|
|
113
|
+
`, isInline: true, components: [{ type: i3.ProgressBarComponent, selector: "kendo-progressbar", inputs: ["label", "progressCssStyle", "progressCssClass", "emptyCssStyle", "emptyCssClass", "animation"], outputs: ["animationEnd"], exportAs: ["kendoProgressBar"] }, { type: i4.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass"], exportAs: ["kendoIconWrapper"] }, { type: i5.FileListItemActionButtonComponent, selector: "kendo-upload-file-list-item-action-button", inputs: ["file", "disabled", "progress"] }], directives: [{ type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], animations: [
|
|
118
114
|
trigger('progressState', [
|
|
119
115
|
state('active', style({ opacity: 1 })),
|
|
120
116
|
state('inactive', style({ opacity: 0 })),
|
|
@@ -153,21 +149,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
153
149
|
</span>
|
|
154
150
|
<span class="k-file-info">
|
|
155
151
|
<ng-container *ngIf="!fileInfoTemplate">
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
152
|
+
<span class="k-file-name" [title]="file.name">{{ file.name }}</span>
|
|
153
|
+
<span [ngClass]="{
|
|
154
|
+
'k-file-validation-message': file.validationErrors,
|
|
155
|
+
'k-file-size': !file.validationErrors && isNotYetUploaded,
|
|
156
|
+
'k-file-summary': isUploadSuccessful || isUploadFailed
|
|
157
|
+
}"
|
|
158
|
+
>{{fileStatusText}}</span>
|
|
163
159
|
</ng-container>
|
|
164
|
-
<ng-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
}">
|
|
170
|
-
</ng-template>
|
|
160
|
+
<ng-container *ngIf="fileInfoTemplate" [ngTemplateOutlet]="fileInfoTemplate.templateRef" [ngTemplateOutletContext]="{
|
|
161
|
+
templateRef: fileInfoTemplate.templateRef,
|
|
162
|
+
state: file.state,
|
|
163
|
+
$implicit: [file]
|
|
164
|
+
}"></ng-container>
|
|
171
165
|
</span>
|
|
172
166
|
<kendo-upload-file-list-item-action-button
|
|
173
167
|
[file]='file'
|
|
@@ -18,8 +18,6 @@ import * as i3 from "./file-list-single-item.component";
|
|
|
18
18
|
import * as i4 from "./file-list-multiple-items.component";
|
|
19
19
|
import * as i5 from "@angular/common";
|
|
20
20
|
import * as i6 from "./file-list-item";
|
|
21
|
-
import * as i7 from "@progress/kendo-angular-buttons";
|
|
22
|
-
import * as i8 from "../templates/template-context.directive";
|
|
23
21
|
/**
|
|
24
22
|
* @hidden
|
|
25
23
|
*/
|
|
@@ -74,66 +72,62 @@ export class FileListComponent {
|
|
|
74
72
|
}
|
|
75
73
|
FileListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileListComponent, deps: [{ token: i1.UploadService }, { token: i2.NavigationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
76
74
|
FileListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", 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: `
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
</ng-template>
|
|
104
|
-
`, 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"] }, { type: i8.TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }] });
|
|
75
|
+
<ng-template ngFor
|
|
76
|
+
[ngForOf]="fileList"
|
|
77
|
+
let-files
|
|
78
|
+
let-index="index">
|
|
79
|
+
<li kendoUploadFileListItem [files]='files' [index]='index'>
|
|
80
|
+
<kendo-upload-file-list-single-item
|
|
81
|
+
class='k-file-single'
|
|
82
|
+
*ngIf='files.length === 1 && !fileTemplate'
|
|
83
|
+
[disabled]='disabled'
|
|
84
|
+
[file]='files[0]'
|
|
85
|
+
[fileInfoTemplate]="fileInfoTemplate"></kendo-upload-file-list-single-item>
|
|
86
|
+
<kendo-upload-file-list-multiple-items
|
|
87
|
+
class='k-file-multiple'
|
|
88
|
+
*ngIf='files.length > 1 && !fileTemplate'
|
|
89
|
+
[disabled]='disabled'
|
|
90
|
+
[files]='files'
|
|
91
|
+
[fileInfoTemplate]="fileInfoTemplate"></kendo-upload-file-list-multiple-items>
|
|
92
|
+
<ng-container
|
|
93
|
+
*ngIf="fileTemplate" [ngTemplateOutlet]="fileTemplate.templateRef" [ngTemplateOutletContext]="{
|
|
94
|
+
templateRef: fileTemplate.templateRef,
|
|
95
|
+
state: files[0].state,
|
|
96
|
+
$implicit: files
|
|
97
|
+
}"></ng-container>
|
|
98
|
+
</li>
|
|
99
|
+
</ng-template>
|
|
100
|
+
`, 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: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
|
|
105
101
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FileListComponent, decorators: [{
|
|
106
102
|
type: Component,
|
|
107
103
|
args: [{
|
|
108
104
|
selector: '[kendo-upload-file-list]',
|
|
109
105
|
template: `
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
</li>
|
|
136
|
-
</ng-template>
|
|
106
|
+
<ng-template ngFor
|
|
107
|
+
[ngForOf]="fileList"
|
|
108
|
+
let-files
|
|
109
|
+
let-index="index">
|
|
110
|
+
<li kendoUploadFileListItem [files]='files' [index]='index'>
|
|
111
|
+
<kendo-upload-file-list-single-item
|
|
112
|
+
class='k-file-single'
|
|
113
|
+
*ngIf='files.length === 1 && !fileTemplate'
|
|
114
|
+
[disabled]='disabled'
|
|
115
|
+
[file]='files[0]'
|
|
116
|
+
[fileInfoTemplate]="fileInfoTemplate"></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"></kendo-upload-file-list-multiple-items>
|
|
123
|
+
<ng-container
|
|
124
|
+
*ngIf="fileTemplate" [ngTemplateOutlet]="fileTemplate.templateRef" [ngTemplateOutletContext]="{
|
|
125
|
+
templateRef: fileTemplate.templateRef,
|
|
126
|
+
state: files[0].state,
|
|
127
|
+
$implicit: files
|
|
128
|
+
}"></ng-container>
|
|
129
|
+
</li>
|
|
130
|
+
</ng-template>
|
|
137
131
|
`
|
|
138
132
|
}]
|
|
139
133
|
}], ctorParameters: function () { return [{ type: i1.UploadService }, { type: i2.NavigationService }]; }, propDecorators: { disabled: [{
|
|
@@ -15,7 +15,6 @@ import { FileListSingleItemComponent } from './rendering/file-list-single-item.c
|
|
|
15
15
|
import { FileSelectDirective } from './file-select.directive';
|
|
16
16
|
import { FileTemplateDirective } from './templates/file-template.directive';
|
|
17
17
|
import { LocalizedMessagesDirective } from './localization/localized-messages.directive';
|
|
18
|
-
import { TemplateContextDirective } from './templates/template-context.directive';
|
|
19
18
|
import { UploadDropZoneDirective } from './dropzone-external.directive';
|
|
20
19
|
import { UploadDropZoneComponent } from './dropzone.component';
|
|
21
20
|
import { ButtonsModule } from '@progress/kendo-angular-buttons';
|
|
@@ -33,8 +32,7 @@ export const SHARED_DECLARATIONS = [
|
|
|
33
32
|
FileListMultipleItemsComponent,
|
|
34
33
|
FileListSingleItemComponent,
|
|
35
34
|
FileSelectDirective,
|
|
36
|
-
LocalizedMessagesDirective
|
|
37
|
-
TemplateContextDirective
|
|
35
|
+
LocalizedMessagesDirective
|
|
38
36
|
];
|
|
39
37
|
/**
|
|
40
38
|
* @hidden
|
|
@@ -63,8 +61,7 @@ SharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
|
63
61
|
FileListMultipleItemsComponent,
|
|
64
62
|
FileListSingleItemComponent,
|
|
65
63
|
FileSelectDirective,
|
|
66
|
-
LocalizedMessagesDirective,
|
|
67
|
-
TemplateContextDirective], imports: [CommonModule, ButtonsModule, ProgressBarModule, IconsModule], exports: [FileTemplateDirective,
|
|
64
|
+
LocalizedMessagesDirective], imports: [CommonModule, ButtonsModule, ProgressBarModule, IconsModule], exports: [FileTemplateDirective,
|
|
68
65
|
FileInfoTemplateDirective,
|
|
69
66
|
CustomMessagesComponent,
|
|
70
67
|
UploadDropZoneDirective,
|
|
@@ -75,8 +72,7 @@ SharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
|
75
72
|
FileListMultipleItemsComponent,
|
|
76
73
|
FileListSingleItemComponent,
|
|
77
74
|
FileSelectDirective,
|
|
78
|
-
LocalizedMessagesDirective,
|
|
79
|
-
TemplateContextDirective, CommonModule,
|
|
75
|
+
LocalizedMessagesDirective, CommonModule,
|
|
80
76
|
ButtonsModule] });
|
|
81
77
|
SharedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SharedModule, imports: [[CommonModule, ButtonsModule, ProgressBarModule, IconsModule], CommonModule,
|
|
82
78
|
ButtonsModule] });
|