@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
|
@@ -2,16 +2,17 @@
|
|
|
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 { Input, Component } from '@angular/core';
|
|
7
6
|
import { FileState } from '../types';
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
import * as i1 from "../upload.service";
|
|
9
|
+
import * as i2 from "@progress/kendo-angular-l10n";
|
|
10
|
+
import * as i3 from "./../navigation.service";
|
|
11
|
+
import * as i4 from "@angular/common";
|
|
11
12
|
/**
|
|
12
13
|
* @hidden
|
|
13
14
|
*/
|
|
14
|
-
|
|
15
|
+
export class FileListItemActionButtonComponent {
|
|
15
16
|
constructor(uploadService, localization, navigation) {
|
|
16
17
|
this.uploadService = uploadService;
|
|
17
18
|
this.localization = localization;
|
|
@@ -111,23 +112,62 @@ let FileListItemActionButtonComponent = class FileListItemActionButtonComponent
|
|
|
111
112
|
}
|
|
112
113
|
return true;
|
|
113
114
|
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
]
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
115
|
+
}
|
|
116
|
+
FileListItemActionButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FileListItemActionButtonComponent, deps: [{ token: i1.UploadService }, { token: i2.LocalizationService }, { token: i3.NavigationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
117
|
+
FileListItemActionButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FileListItemActionButtonComponent, selector: "kendo-upload-file-list-item-action-button", inputs: { file: "file", disabled: "disabled", progress: "progress" }, ngImport: i0, template: `
|
|
118
|
+
<strong class="k-upload-status">
|
|
119
|
+
<span class="k-upload-pct" *ngIf="isUploading || isPaused">{{progress}}%</span>
|
|
120
|
+
|
|
121
|
+
<button type="button" *ngIf="isFailed" class="k-button k-icon-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-upload-action"
|
|
122
|
+
[ngClass]="{ 'k-focus': this.retryFocused }"
|
|
123
|
+
[attr.tabIndex]="-1"
|
|
124
|
+
(focus)="onFocus('retry')"
|
|
125
|
+
(blur)="onBlur('retry')"
|
|
126
|
+
(click)="onRetryClick()">
|
|
127
|
+
<span class="k-icon k-button-icon k-retry k-i-refresh-sm"
|
|
128
|
+
[attr.aria-label]="retryButtonTitle"
|
|
129
|
+
[attr.title]="retryButtonTitle">
|
|
130
|
+
</span>
|
|
131
|
+
</button>
|
|
132
|
+
|
|
133
|
+
<button *ngIf="isResumable" type="button" class="k-button k-icon-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-upload-action"
|
|
134
|
+
[ngClass]="{ 'k-focus': this.pauseResumeFocused }"
|
|
135
|
+
[attr.tabIndex]="-1"
|
|
136
|
+
(focus)="onFocus('pauseResume')"
|
|
137
|
+
(blur)="onBlur('pauseResume')"
|
|
138
|
+
(click)="onPauseResumeClick()">
|
|
139
|
+
<span class="k-icon k-button-icon"
|
|
140
|
+
[ngClass]="{
|
|
141
|
+
'k-i-play-sm': isPaused,
|
|
142
|
+
'k-i-pause-sm': !isPaused
|
|
143
|
+
}"
|
|
144
|
+
[attr.aria-label]='pauseResumeButtonTitle'
|
|
145
|
+
[attr.title]='pauseResumeButtonTitle'>
|
|
146
|
+
</span>
|
|
147
|
+
</button>
|
|
148
|
+
|
|
149
|
+
<button type="button" *ngIf="isActionButtonVisible" class="k-button k-icon-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-upload-action"
|
|
150
|
+
[ngClass]="{ 'k-focus': this.actionFocused }"
|
|
151
|
+
[attr.tabIndex]="-1"
|
|
152
|
+
(focus)="onFocus('action')"
|
|
153
|
+
(blur)="onBlur('action')"
|
|
154
|
+
(click)="onRemoveCancelClick($event)">
|
|
155
|
+
<span class="k-icon k-button-icon"
|
|
156
|
+
[ngClass]="{
|
|
157
|
+
'k-i-cancel': isUploading,
|
|
158
|
+
'k-delete k-i-x': !isUploading
|
|
159
|
+
}"
|
|
160
|
+
[attr.aria-label]='actionButtonTitle'
|
|
161
|
+
[attr.title]='actionButtonTitle'>
|
|
162
|
+
</span>
|
|
163
|
+
</button>
|
|
164
|
+
</strong>
|
|
165
|
+
`, isInline: true, directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
166
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FileListItemActionButtonComponent, decorators: [{
|
|
167
|
+
type: Component,
|
|
168
|
+
args: [{
|
|
169
|
+
selector: 'kendo-upload-file-list-item-action-button',
|
|
170
|
+
template: `
|
|
131
171
|
<strong class="k-upload-status">
|
|
132
172
|
<span class="k-upload-pct" *ngIf="isUploading || isPaused">{{progress}}%</span>
|
|
133
173
|
|
|
@@ -176,9 +216,11 @@ FileListItemActionButtonComponent = tslib_1.__decorate([
|
|
|
176
216
|
</button>
|
|
177
217
|
</strong>
|
|
178
218
|
`
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
219
|
+
}]
|
|
220
|
+
}], ctorParameters: function () { return [{ type: i1.UploadService }, { type: i2.LocalizationService }, { type: i3.NavigationService }]; }, propDecorators: { file: [{
|
|
221
|
+
type: Input
|
|
222
|
+
}], disabled: [{
|
|
223
|
+
type: Input
|
|
224
|
+
}], progress: [{
|
|
225
|
+
type: Input
|
|
226
|
+
}] } });
|
|
@@ -2,7 +2,10 @@
|
|
|
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 { Component } from '@angular/core';
|
|
5
6
|
import { fileHasValidationErrors, filesHaveValidationErrors, getTotalFilesSizeMessage } from '../common/util';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
import * as i1 from "../upload.service";
|
|
6
9
|
/**
|
|
7
10
|
* @hidden
|
|
8
11
|
*/
|
|
@@ -37,3 +40,9 @@ export class FileListItemBase {
|
|
|
37
40
|
return this.localization.get(key);
|
|
38
41
|
}
|
|
39
42
|
}
|
|
43
|
+
FileListItemBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FileListItemBase, deps: [{ token: i1.UploadService }], target: i0.ɵɵFactoryTarget.Component });
|
|
44
|
+
FileListItemBase.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FileListItemBase, selector: "ng-component", ngImport: i0, template: '', isInline: true });
|
|
45
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FileListItemBase, decorators: [{
|
|
46
|
+
type: Component,
|
|
47
|
+
args: [{ template: '' }]
|
|
48
|
+
}], ctorParameters: function () { return [{ type: i1.UploadService }]; } });
|
|
@@ -0,0 +1,107 @@
|
|
|
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, HostBinding, HostListener, Input } from '@angular/core';
|
|
6
|
+
import { FileState } from '../types';
|
|
7
|
+
import { filesHaveValidationErrors, hasClasses, IGNORE_TARGET_CLASSES, isFocusable } from '../common/util';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
import * as i1 from "../navigation.service";
|
|
10
|
+
import * as i2 from "../upload.service";
|
|
11
|
+
/**
|
|
12
|
+
* @hidden
|
|
13
|
+
*/
|
|
14
|
+
export class FileListItemDirective {
|
|
15
|
+
constructor(el, navigationService, uploadService) {
|
|
16
|
+
this.navigationService = navigationService;
|
|
17
|
+
this.uploadService = uploadService;
|
|
18
|
+
this.fileClass = true;
|
|
19
|
+
this.focused = false;
|
|
20
|
+
this.element = el;
|
|
21
|
+
}
|
|
22
|
+
focus() {
|
|
23
|
+
this.element.nativeElement.focus();
|
|
24
|
+
}
|
|
25
|
+
get uidAttribute() {
|
|
26
|
+
return this.files[0].uid;
|
|
27
|
+
}
|
|
28
|
+
get tabIndex() {
|
|
29
|
+
return "-1";
|
|
30
|
+
}
|
|
31
|
+
get kFileError() {
|
|
32
|
+
return this.files[0].state === FileState.Failed;
|
|
33
|
+
}
|
|
34
|
+
get kFileInvalid() {
|
|
35
|
+
return filesHaveValidationErrors(this.files);
|
|
36
|
+
}
|
|
37
|
+
get kFileProgress() {
|
|
38
|
+
return this.files[0].state === FileState.Uploading ||
|
|
39
|
+
this.files[0].state === FileState.Paused;
|
|
40
|
+
}
|
|
41
|
+
get kFileSuccess() {
|
|
42
|
+
if (this.uploadService.component === 'Upload') {
|
|
43
|
+
return this.files[0].state === FileState.Uploaded ||
|
|
44
|
+
this.files[0].state === FileState.Initial;
|
|
45
|
+
}
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
48
|
+
get kStateFocused() {
|
|
49
|
+
return this.focused;
|
|
50
|
+
}
|
|
51
|
+
onFocus() {
|
|
52
|
+
this.focused = true;
|
|
53
|
+
}
|
|
54
|
+
onBlur() {
|
|
55
|
+
this.focused = false;
|
|
56
|
+
}
|
|
57
|
+
onClick(event) {
|
|
58
|
+
if (!isFocusable(event.target) && !hasClasses(event.target, IGNORE_TARGET_CLASSES)) {
|
|
59
|
+
this.navigationService.focusedIndex = this.index;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
FileListItemDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FileListItemDirective, deps: [{ token: i0.ElementRef }, { token: i1.NavigationService }, { token: i2.UploadService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
64
|
+
FileListItemDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FileListItemDirective, selector: "[kendoUploadFileListItem]", inputs: { files: "files", index: "index" }, host: { listeners: { "focus": "onFocus()", "blur": "onBlur()", "click": "onClick($event)" }, properties: { "class.k-file": "this.fileClass", "attr.data-uid": "this.uidAttribute", "attr.tabIndex": "this.tabIndex", "class.k-file-error": "this.kFileError", "class.k-file-invalid": "this.kFileInvalid", "class.k-file-progress": "this.kFileProgress", "class.k-file-success": "this.kFileSuccess", "class.k-state-focused": "this.kStateFocused" } }, ngImport: i0 });
|
|
65
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FileListItemDirective, decorators: [{
|
|
66
|
+
type: Directive,
|
|
67
|
+
args: [{
|
|
68
|
+
selector: '[kendoUploadFileListItem]'
|
|
69
|
+
}]
|
|
70
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.NavigationService }, { type: i2.UploadService }]; }, propDecorators: { files: [{
|
|
71
|
+
type: Input
|
|
72
|
+
}], index: [{
|
|
73
|
+
type: Input
|
|
74
|
+
}], fileClass: [{
|
|
75
|
+
type: HostBinding,
|
|
76
|
+
args: ['class.k-file']
|
|
77
|
+
}], uidAttribute: [{
|
|
78
|
+
type: HostBinding,
|
|
79
|
+
args: ['attr.data-uid']
|
|
80
|
+
}], tabIndex: [{
|
|
81
|
+
type: HostBinding,
|
|
82
|
+
args: ['attr.tabIndex']
|
|
83
|
+
}], kFileError: [{
|
|
84
|
+
type: HostBinding,
|
|
85
|
+
args: ['class.k-file-error']
|
|
86
|
+
}], kFileInvalid: [{
|
|
87
|
+
type: HostBinding,
|
|
88
|
+
args: ['class.k-file-invalid']
|
|
89
|
+
}], kFileProgress: [{
|
|
90
|
+
type: HostBinding,
|
|
91
|
+
args: ['class.k-file-progress']
|
|
92
|
+
}], kFileSuccess: [{
|
|
93
|
+
type: HostBinding,
|
|
94
|
+
args: ['class.k-file-success']
|
|
95
|
+
}], kStateFocused: [{
|
|
96
|
+
type: HostBinding,
|
|
97
|
+
args: ['class.k-state-focused']
|
|
98
|
+
}], onFocus: [{
|
|
99
|
+
type: HostListener,
|
|
100
|
+
args: ["focus"]
|
|
101
|
+
}], onBlur: [{
|
|
102
|
+
type: HostListener,
|
|
103
|
+
args: ["blur"]
|
|
104
|
+
}], onClick: [{
|
|
105
|
+
type: HostListener,
|
|
106
|
+
args: ['click', ['$event']]
|
|
107
|
+
}] } });
|
|
@@ -0,0 +1,172 @@
|
|
|
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 { Input, Component } from '@angular/core';
|
|
6
|
+
import { animate, state, style, transition, trigger } from '@angular/animations';
|
|
7
|
+
import { FileState } from '../types';
|
|
8
|
+
import { FileListItemBase } from './file-list-item-base';
|
|
9
|
+
import { isPresent } from '../common/util';
|
|
10
|
+
import * as i0 from "@angular/core";
|
|
11
|
+
import * as i1 from "@progress/kendo-angular-l10n";
|
|
12
|
+
import * as i2 from "../upload.service";
|
|
13
|
+
import * as i3 from "./file-list-item-action-button.component";
|
|
14
|
+
import * as i4 from "@angular/common";
|
|
15
|
+
import * as i5 from "../templates/template-context.directive";
|
|
16
|
+
/**
|
|
17
|
+
* @hidden
|
|
18
|
+
*/
|
|
19
|
+
export class FileListMultipleItemsComponent extends FileListItemBase {
|
|
20
|
+
constructor(localization, uploadService) {
|
|
21
|
+
super(uploadService);
|
|
22
|
+
this.localization = localization;
|
|
23
|
+
this.subscribeUploadProgress((args) => {
|
|
24
|
+
if (args.files[0].uid === this.files[0].uid) {
|
|
25
|
+
this.progressComplete = args.percentComplete;
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
get showProgress() {
|
|
30
|
+
const showProgress = this.files[0].state === FileState.Uploading || this.files[0].state === FileState.Paused;
|
|
31
|
+
return showProgress ? 'active' : 'inactive';
|
|
32
|
+
}
|
|
33
|
+
ngOnInit() {
|
|
34
|
+
this.filesHaveErrors = super.filesHaveValidationErrors(this.files);
|
|
35
|
+
}
|
|
36
|
+
fileStatusText(file) {
|
|
37
|
+
const errors = file.validationErrors;
|
|
38
|
+
if (!isPresent(errors)) {
|
|
39
|
+
return this.getTotalFilesSizeMessage([file]);
|
|
40
|
+
}
|
|
41
|
+
return this.getFileValidationMessage(file);
|
|
42
|
+
}
|
|
43
|
+
get batchStatusText() {
|
|
44
|
+
const state = this.files[0].state;
|
|
45
|
+
const fileCount = this.files.length;
|
|
46
|
+
if (state === FileState.Uploaded) {
|
|
47
|
+
return `${fileCount} ${this.textFor('filesBatchStatusUploaded')}`;
|
|
48
|
+
}
|
|
49
|
+
if (state === FileState.Failed) {
|
|
50
|
+
return `${fileCount} ${this.textFor('filesBatchStatusFailed')}`;
|
|
51
|
+
}
|
|
52
|
+
return `${fileCount} ${this.textFor('filesBatchStatus')}`;
|
|
53
|
+
}
|
|
54
|
+
get isUploadSuccessful() {
|
|
55
|
+
return this.files[0].state === FileState.Uploaded;
|
|
56
|
+
}
|
|
57
|
+
get isUploadFailed() {
|
|
58
|
+
return this.files[0].state === FileState.Failed;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
FileListMultipleItemsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FileListMultipleItemsComponent, deps: [{ token: i1.LocalizationService }, { token: i2.UploadService }], target: i0.ɵɵFactoryTarget.Component });
|
|
62
|
+
FileListMultipleItemsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FileListMultipleItemsComponent, selector: "kendo-upload-file-list-multiple-items", inputs: { disabled: "disabled", files: "files", fileInfoTemplate: "fileInfoTemplate" }, usesInheritance: true, ngImport: i0, template: `
|
|
63
|
+
<div class="k-progressbar" [@progressState]="showProgress">
|
|
64
|
+
<span class="k-progress" [style.width]="progressComplete + '%'"></span>
|
|
65
|
+
</div>
|
|
66
|
+
<span class="k-multiple-files-group-wrapper">
|
|
67
|
+
<span class="k-file-group k-icon k-i-copy"></span>
|
|
68
|
+
</span>
|
|
69
|
+
<span class="k-multiple-files-wrapper">
|
|
70
|
+
<ng-container *ngIf="!fileInfoTemplate">
|
|
71
|
+
<span *ngFor="let file of files" class="k-file-name-size-wrapper">
|
|
72
|
+
<span [title]="file.name" class="k-file-name">
|
|
73
|
+
{{file.name}}
|
|
74
|
+
</span>
|
|
75
|
+
<span [ngClass]="{
|
|
76
|
+
'k-text-error': file.validationErrors,
|
|
77
|
+
'k-file-validation-message': file.validationErrors,
|
|
78
|
+
'k-file-size': !file.validationErrors
|
|
79
|
+
}"
|
|
80
|
+
>{{fileStatusText(file)}}</span>
|
|
81
|
+
</span>
|
|
82
|
+
<span class="k-file-information"
|
|
83
|
+
[ngClass]="{
|
|
84
|
+
'k-text-success': isUploadSuccessful,
|
|
85
|
+
'k-text-error': isUploadFailed
|
|
86
|
+
}"
|
|
87
|
+
>{{batchStatusText}}</span>
|
|
88
|
+
</ng-container>
|
|
89
|
+
<ng-template *ngIf="fileInfoTemplate"
|
|
90
|
+
[templateContext]="{
|
|
91
|
+
templateRef: fileInfoTemplate.templateRef,
|
|
92
|
+
state: files[0].state,
|
|
93
|
+
$implicit: files
|
|
94
|
+
}">
|
|
95
|
+
</ng-template>
|
|
96
|
+
</span>
|
|
97
|
+
<kendo-upload-file-list-item-action-button
|
|
98
|
+
[file]='files[0]'
|
|
99
|
+
[disabled]='disabled'
|
|
100
|
+
[progress]='progressComplete'>
|
|
101
|
+
</kendo-upload-file-list-item-action-button>
|
|
102
|
+
`, isInline: true, components: [{ type: i3.FileListItemActionButtonComponent, selector: "kendo-upload-file-list-item-action-button", inputs: ["file", "disabled", "progress"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i5.TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }], animations: [
|
|
103
|
+
trigger('progressState', [
|
|
104
|
+
state('active', style({ opacity: 1 })),
|
|
105
|
+
state('inactive', style({ opacity: 0 })),
|
|
106
|
+
transition('void => active', style({ opacity: 0 })),
|
|
107
|
+
transition('inactive => active', style({ opacity: 1 })),
|
|
108
|
+
transition('active => inactive', animate('1s 2s ease-out'))
|
|
109
|
+
])
|
|
110
|
+
] });
|
|
111
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FileListMultipleItemsComponent, decorators: [{
|
|
112
|
+
type: Component,
|
|
113
|
+
args: [{
|
|
114
|
+
animations: [
|
|
115
|
+
trigger('progressState', [
|
|
116
|
+
state('active', style({ opacity: 1 })),
|
|
117
|
+
state('inactive', style({ opacity: 0 })),
|
|
118
|
+
transition('void => active', style({ opacity: 0 })),
|
|
119
|
+
transition('inactive => active', style({ opacity: 1 })),
|
|
120
|
+
transition('active => inactive', animate('1s 2s ease-out'))
|
|
121
|
+
])
|
|
122
|
+
],
|
|
123
|
+
selector: 'kendo-upload-file-list-multiple-items',
|
|
124
|
+
template: `
|
|
125
|
+
<div class="k-progressbar" [@progressState]="showProgress">
|
|
126
|
+
<span class="k-progress" [style.width]="progressComplete + '%'"></span>
|
|
127
|
+
</div>
|
|
128
|
+
<span class="k-multiple-files-group-wrapper">
|
|
129
|
+
<span class="k-file-group k-icon k-i-copy"></span>
|
|
130
|
+
</span>
|
|
131
|
+
<span class="k-multiple-files-wrapper">
|
|
132
|
+
<ng-container *ngIf="!fileInfoTemplate">
|
|
133
|
+
<span *ngFor="let file of files" class="k-file-name-size-wrapper">
|
|
134
|
+
<span [title]="file.name" class="k-file-name">
|
|
135
|
+
{{file.name}}
|
|
136
|
+
</span>
|
|
137
|
+
<span [ngClass]="{
|
|
138
|
+
'k-text-error': file.validationErrors,
|
|
139
|
+
'k-file-validation-message': file.validationErrors,
|
|
140
|
+
'k-file-size': !file.validationErrors
|
|
141
|
+
}"
|
|
142
|
+
>{{fileStatusText(file)}}</span>
|
|
143
|
+
</span>
|
|
144
|
+
<span class="k-file-information"
|
|
145
|
+
[ngClass]="{
|
|
146
|
+
'k-text-success': isUploadSuccessful,
|
|
147
|
+
'k-text-error': isUploadFailed
|
|
148
|
+
}"
|
|
149
|
+
>{{batchStatusText}}</span>
|
|
150
|
+
</ng-container>
|
|
151
|
+
<ng-template *ngIf="fileInfoTemplate"
|
|
152
|
+
[templateContext]="{
|
|
153
|
+
templateRef: fileInfoTemplate.templateRef,
|
|
154
|
+
state: files[0].state,
|
|
155
|
+
$implicit: files
|
|
156
|
+
}">
|
|
157
|
+
</ng-template>
|
|
158
|
+
</span>
|
|
159
|
+
<kendo-upload-file-list-item-action-button
|
|
160
|
+
[file]='files[0]'
|
|
161
|
+
[disabled]='disabled'
|
|
162
|
+
[progress]='progressComplete'>
|
|
163
|
+
</kendo-upload-file-list-item-action-button>
|
|
164
|
+
`
|
|
165
|
+
}]
|
|
166
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i2.UploadService }]; }, propDecorators: { disabled: [{
|
|
167
|
+
type: Input
|
|
168
|
+
}], files: [{
|
|
169
|
+
type: Input
|
|
170
|
+
}], fileInfoTemplate: [{
|
|
171
|
+
type: Input
|
|
172
|
+
}] } });
|
|
@@ -0,0 +1,154 @@
|
|
|
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 { Input, Component } from '@angular/core';
|
|
6
|
+
import { animate, state, style, transition, trigger } from '@angular/animations';
|
|
7
|
+
import { FileState } from '../types';
|
|
8
|
+
import { FileListItemBase } from './file-list-item-base';
|
|
9
|
+
import { getFileGroupCssClass, isPresent } from '../common/util';
|
|
10
|
+
import * as i0 from "@angular/core";
|
|
11
|
+
import * as i1 from "@progress/kendo-angular-l10n";
|
|
12
|
+
import * as i2 from "../upload.service";
|
|
13
|
+
import * as i3 from "./file-list-item-action-button.component";
|
|
14
|
+
import * as i4 from "@angular/common";
|
|
15
|
+
import * as i5 from "../templates/template-context.directive";
|
|
16
|
+
/**
|
|
17
|
+
* @hidden
|
|
18
|
+
*/
|
|
19
|
+
export class FileListSingleItemComponent extends FileListItemBase {
|
|
20
|
+
constructor(localization, uploadService) {
|
|
21
|
+
super(uploadService);
|
|
22
|
+
this.localization = localization;
|
|
23
|
+
this.subscribeUploadProgress((args) => {
|
|
24
|
+
if (args.files[0].uid === this.file.uid) {
|
|
25
|
+
this.progressComplete = args.percentComplete;
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
get fileStatusText() {
|
|
30
|
+
const errors = this.file.validationErrors;
|
|
31
|
+
if (this.file.state === FileState.Uploaded) {
|
|
32
|
+
return `${this.textFor('fileStatusUploaded')}`;
|
|
33
|
+
}
|
|
34
|
+
if (this.file.state === FileState.Failed) {
|
|
35
|
+
return `${this.textFor('fileStatusFailed')}`;
|
|
36
|
+
}
|
|
37
|
+
if (!isPresent(errors)) {
|
|
38
|
+
return this.getTotalFilesSizeMessage([this.file]);
|
|
39
|
+
}
|
|
40
|
+
return this.getFileValidationMessage(this.file);
|
|
41
|
+
}
|
|
42
|
+
get showProgress() {
|
|
43
|
+
const showProgress = this.file.state === FileState.Uploading || this.file.state === FileState.Paused;
|
|
44
|
+
return showProgress ? 'active' : 'inactive';
|
|
45
|
+
}
|
|
46
|
+
get fileGroupClass() {
|
|
47
|
+
return getFileGroupCssClass(this.file.extension ? this.file.extension : '');
|
|
48
|
+
}
|
|
49
|
+
get isUploadSuccessful() {
|
|
50
|
+
return this.file.state === FileState.Uploaded;
|
|
51
|
+
}
|
|
52
|
+
get isUploadFailed() {
|
|
53
|
+
return this.file.state === FileState.Failed;
|
|
54
|
+
}
|
|
55
|
+
get isNotYetUploaded() {
|
|
56
|
+
return !this.isUploadFailed && !this.isUploadSuccessful;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
FileListSingleItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FileListSingleItemComponent, deps: [{ token: i1.LocalizationService }, { token: i2.UploadService }], target: i0.ɵɵFactoryTarget.Component });
|
|
60
|
+
FileListSingleItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FileListSingleItemComponent, selector: "kendo-upload-file-list-single-item", inputs: { disabled: "disabled", file: "file", fileInfoTemplate: "fileInfoTemplate" }, usesInheritance: true, ngImport: i0, template: `
|
|
61
|
+
<div class="k-progressbar" [@progressState]="showProgress">
|
|
62
|
+
<span class="k-progress" [style.width]="progressComplete + '%'"></span>
|
|
63
|
+
</div>
|
|
64
|
+
<span class="k-file-group-wrapper">
|
|
65
|
+
<span class="k-file-group k-icon" [ngClass]="fileGroupClass"></span>
|
|
66
|
+
</span>
|
|
67
|
+
<span class="k-file-name-size-wrapper">
|
|
68
|
+
<ng-container *ngIf="!fileInfoTemplate">
|
|
69
|
+
<span class="k-file-name" [title]="file.name">{{ file.name }}</span>
|
|
70
|
+
<span [ngClass]="{
|
|
71
|
+
'k-file-validation-message': file.validationErrors,
|
|
72
|
+
'k-file-size': !file.validationErrors && isNotYetUploaded,
|
|
73
|
+
'k-text-success': isUploadSuccessful,
|
|
74
|
+
'k-text-error': file.validationErrors || isUploadFailed,
|
|
75
|
+
'k-file-information': isUploadSuccessful || isUploadFailed
|
|
76
|
+
}"
|
|
77
|
+
>{{fileStatusText}}</span>
|
|
78
|
+
</ng-container>
|
|
79
|
+
<ng-template *ngIf="fileInfoTemplate"
|
|
80
|
+
[templateContext]="{
|
|
81
|
+
templateRef: fileInfoTemplate.templateRef,
|
|
82
|
+
state: file.state,
|
|
83
|
+
$implicit: [file]
|
|
84
|
+
}">
|
|
85
|
+
</ng-template>
|
|
86
|
+
</span>
|
|
87
|
+
<kendo-upload-file-list-item-action-button
|
|
88
|
+
[file]='file'
|
|
89
|
+
[disabled]='disabled'
|
|
90
|
+
[progress]='progressComplete'>
|
|
91
|
+
</kendo-upload-file-list-item-action-button>
|
|
92
|
+
`, isInline: true, components: [{ type: i3.FileListItemActionButtonComponent, selector: "kendo-upload-file-list-item-action-button", inputs: ["file", "disabled", "progress"] }], directives: [{ type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }], animations: [
|
|
93
|
+
trigger('progressState', [
|
|
94
|
+
state('active', style({ opacity: 1 })),
|
|
95
|
+
state('inactive', style({ opacity: 0 })),
|
|
96
|
+
transition('void => active', style({ opacity: 0 })),
|
|
97
|
+
transition('inactive => active', style({ opacity: 1 })),
|
|
98
|
+
transition('active => inactive', animate('1s 2s ease-out'))
|
|
99
|
+
])
|
|
100
|
+
] });
|
|
101
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FileListSingleItemComponent, decorators: [{
|
|
102
|
+
type: Component,
|
|
103
|
+
args: [{
|
|
104
|
+
animations: [
|
|
105
|
+
trigger('progressState', [
|
|
106
|
+
state('active', style({ opacity: 1 })),
|
|
107
|
+
state('inactive', style({ opacity: 0 })),
|
|
108
|
+
transition('void => active', style({ opacity: 0 })),
|
|
109
|
+
transition('inactive => active', style({ opacity: 1 })),
|
|
110
|
+
transition('active => inactive', animate('1s 2s ease-out'))
|
|
111
|
+
])
|
|
112
|
+
],
|
|
113
|
+
selector: 'kendo-upload-file-list-single-item',
|
|
114
|
+
template: `
|
|
115
|
+
<div class="k-progressbar" [@progressState]="showProgress">
|
|
116
|
+
<span class="k-progress" [style.width]="progressComplete + '%'"></span>
|
|
117
|
+
</div>
|
|
118
|
+
<span class="k-file-group-wrapper">
|
|
119
|
+
<span class="k-file-group k-icon" [ngClass]="fileGroupClass"></span>
|
|
120
|
+
</span>
|
|
121
|
+
<span class="k-file-name-size-wrapper">
|
|
122
|
+
<ng-container *ngIf="!fileInfoTemplate">
|
|
123
|
+
<span class="k-file-name" [title]="file.name">{{ file.name }}</span>
|
|
124
|
+
<span [ngClass]="{
|
|
125
|
+
'k-file-validation-message': file.validationErrors,
|
|
126
|
+
'k-file-size': !file.validationErrors && isNotYetUploaded,
|
|
127
|
+
'k-text-success': isUploadSuccessful,
|
|
128
|
+
'k-text-error': file.validationErrors || isUploadFailed,
|
|
129
|
+
'k-file-information': isUploadSuccessful || isUploadFailed
|
|
130
|
+
}"
|
|
131
|
+
>{{fileStatusText}}</span>
|
|
132
|
+
</ng-container>
|
|
133
|
+
<ng-template *ngIf="fileInfoTemplate"
|
|
134
|
+
[templateContext]="{
|
|
135
|
+
templateRef: fileInfoTemplate.templateRef,
|
|
136
|
+
state: file.state,
|
|
137
|
+
$implicit: [file]
|
|
138
|
+
}">
|
|
139
|
+
</ng-template>
|
|
140
|
+
</span>
|
|
141
|
+
<kendo-upload-file-list-item-action-button
|
|
142
|
+
[file]='file'
|
|
143
|
+
[disabled]='disabled'
|
|
144
|
+
[progress]='progressComplete'>
|
|
145
|
+
</kendo-upload-file-list-item-action-button>
|
|
146
|
+
`
|
|
147
|
+
}]
|
|
148
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i2.UploadService }]; }, propDecorators: { disabled: [{
|
|
149
|
+
type: Input
|
|
150
|
+
}], file: [{
|
|
151
|
+
type: Input
|
|
152
|
+
}], fileInfoTemplate: [{
|
|
153
|
+
type: Input
|
|
154
|
+
}] } });
|