@progress/kendo-angular-upload 8.0.2 → 9.0.0-dev.202204191139
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 +32 -102
- 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
|
@@ -1,107 +0,0 @@
|
|
|
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 * as tslib_1 from "tslib";
|
|
6
|
-
import { Input, Component } from '@angular/core';
|
|
7
|
-
import { animate, state, style, transition, trigger } from '@angular/animations';
|
|
8
|
-
import { FileState } from '../types';
|
|
9
|
-
import { FileListItemBase } from './file-list-item-base';
|
|
10
|
-
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
11
|
-
import { UploadService } from '../upload.service';
|
|
12
|
-
import { isPresent } from '../common/util';
|
|
13
|
-
import { FileInfoTemplateDirective } from '../templates/file-info-template.directive';
|
|
14
|
-
/**
|
|
15
|
-
* @hidden
|
|
16
|
-
*/
|
|
17
|
-
var FileListMultipleItemsComponent = /** @class */ (function (_super) {
|
|
18
|
-
tslib_1.__extends(FileListMultipleItemsComponent, _super);
|
|
19
|
-
function FileListMultipleItemsComponent(localization, uploadService) {
|
|
20
|
-
var _this = _super.call(this, uploadService) || this;
|
|
21
|
-
_this.localization = localization;
|
|
22
|
-
_this.subscribeUploadProgress(function (args) {
|
|
23
|
-
if (args.files[0].uid === _this.files[0].uid) {
|
|
24
|
-
_this.progressComplete = args.percentComplete;
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
return _this;
|
|
28
|
-
}
|
|
29
|
-
Object.defineProperty(FileListMultipleItemsComponent.prototype, "showProgress", {
|
|
30
|
-
get: function () {
|
|
31
|
-
var showProgress = this.files[0].state === FileState.Uploading || this.files[0].state === FileState.Paused;
|
|
32
|
-
return showProgress ? 'active' : 'inactive';
|
|
33
|
-
},
|
|
34
|
-
enumerable: true,
|
|
35
|
-
configurable: true
|
|
36
|
-
});
|
|
37
|
-
FileListMultipleItemsComponent.prototype.ngOnInit = function () {
|
|
38
|
-
this.filesHaveErrors = _super.prototype.filesHaveValidationErrors.call(this, this.files);
|
|
39
|
-
};
|
|
40
|
-
FileListMultipleItemsComponent.prototype.fileStatusText = function (file) {
|
|
41
|
-
var errors = file.validationErrors;
|
|
42
|
-
if (!isPresent(errors)) {
|
|
43
|
-
return this.getTotalFilesSizeMessage([file]);
|
|
44
|
-
}
|
|
45
|
-
return this.getFileValidationMessage(file);
|
|
46
|
-
};
|
|
47
|
-
Object.defineProperty(FileListMultipleItemsComponent.prototype, "batchStatusText", {
|
|
48
|
-
get: function () {
|
|
49
|
-
var state = this.files[0].state;
|
|
50
|
-
var fileCount = this.files.length;
|
|
51
|
-
if (state === FileState.Uploaded) {
|
|
52
|
-
return fileCount + " " + this.textFor('filesBatchStatusUploaded');
|
|
53
|
-
}
|
|
54
|
-
if (state === FileState.Failed) {
|
|
55
|
-
return fileCount + " " + this.textFor('filesBatchStatusFailed');
|
|
56
|
-
}
|
|
57
|
-
return fileCount + " " + this.textFor('filesBatchStatus');
|
|
58
|
-
},
|
|
59
|
-
enumerable: true,
|
|
60
|
-
configurable: true
|
|
61
|
-
});
|
|
62
|
-
Object.defineProperty(FileListMultipleItemsComponent.prototype, "isUploadSuccessful", {
|
|
63
|
-
get: function () {
|
|
64
|
-
return this.files[0].state === FileState.Uploaded;
|
|
65
|
-
},
|
|
66
|
-
enumerable: true,
|
|
67
|
-
configurable: true
|
|
68
|
-
});
|
|
69
|
-
Object.defineProperty(FileListMultipleItemsComponent.prototype, "isUploadFailed", {
|
|
70
|
-
get: function () {
|
|
71
|
-
return this.files[0].state === FileState.Failed;
|
|
72
|
-
},
|
|
73
|
-
enumerable: true,
|
|
74
|
-
configurable: true
|
|
75
|
-
});
|
|
76
|
-
tslib_1.__decorate([
|
|
77
|
-
Input(),
|
|
78
|
-
tslib_1.__metadata("design:type", Boolean)
|
|
79
|
-
], FileListMultipleItemsComponent.prototype, "disabled", void 0);
|
|
80
|
-
tslib_1.__decorate([
|
|
81
|
-
Input(),
|
|
82
|
-
tslib_1.__metadata("design:type", Array)
|
|
83
|
-
], FileListMultipleItemsComponent.prototype, "files", void 0);
|
|
84
|
-
tslib_1.__decorate([
|
|
85
|
-
Input(),
|
|
86
|
-
tslib_1.__metadata("design:type", FileInfoTemplateDirective)
|
|
87
|
-
], FileListMultipleItemsComponent.prototype, "fileInfoTemplate", void 0);
|
|
88
|
-
FileListMultipleItemsComponent = tslib_1.__decorate([
|
|
89
|
-
Component({
|
|
90
|
-
animations: [
|
|
91
|
-
trigger('progressState', [
|
|
92
|
-
state('active', style({ opacity: 1 })),
|
|
93
|
-
state('inactive', style({ opacity: 0 })),
|
|
94
|
-
transition('void => active', style({ opacity: 0 })),
|
|
95
|
-
transition('inactive => active', style({ opacity: 1 })),
|
|
96
|
-
transition('active => inactive', animate('1s 2s ease-out'))
|
|
97
|
-
])
|
|
98
|
-
],
|
|
99
|
-
selector: 'kendo-upload-file-list-multiple-items',
|
|
100
|
-
template: "\n <div class=\"k-progressbar\" [@progressState]=\"showProgress\">\n <span class=\"k-progress\" [style.width]=\"progressComplete + '%'\"></span>\n </div>\n <span class=\"k-multiple-files-group-wrapper\">\n <span class=\"k-file-group k-icon k-i-copy\"></span>\n </span>\n <span class=\"k-multiple-files-wrapper\">\n <ng-container *ngIf=\"!fileInfoTemplate\">\n <span *ngFor=\"let file of files\" class=\"k-file-name-size-wrapper\">\n <span [title]=\"file.name\" class=\"k-file-name\">\n {{file.name}}\n </span>\n <span [ngClass]=\"{\n 'k-text-error': file.validationErrors,\n 'k-file-validation-message': file.validationErrors,\n 'k-file-size': !file.validationErrors\n }\"\n >{{fileStatusText(file)}}</span>\n </span>\n <span class=\"k-file-information\"\n [ngClass]=\"{\n 'k-text-success': isUploadSuccessful,\n 'k-text-error': isUploadFailed\n }\"\n >{{batchStatusText}}</span>\n </ng-container>\n <ng-template *ngIf=\"fileInfoTemplate\"\n [templateContext]=\"{\n templateRef: fileInfoTemplate.templateRef,\n state: files[0].state,\n $implicit: files\n }\">\n </ng-template>\n </span>\n <kendo-upload-file-list-item-action-button\n [file]='files[0]'\n [disabled]='disabled'\n [progress]='progressComplete'>\n </kendo-upload-file-list-item-action-button>\n "
|
|
101
|
-
}),
|
|
102
|
-
tslib_1.__metadata("design:paramtypes", [LocalizationService,
|
|
103
|
-
UploadService])
|
|
104
|
-
], FileListMultipleItemsComponent);
|
|
105
|
-
return FileListMultipleItemsComponent;
|
|
106
|
-
}(FileListItemBase));
|
|
107
|
-
export { FileListMultipleItemsComponent };
|
|
@@ -1,112 +0,0 @@
|
|
|
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 * as tslib_1 from "tslib";
|
|
6
|
-
import { Input, Component } from '@angular/core';
|
|
7
|
-
import { animate, state, style, transition, trigger } from '@angular/animations';
|
|
8
|
-
import { FileState } from '../types';
|
|
9
|
-
import { FileListItemBase } from './file-list-item-base';
|
|
10
|
-
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
11
|
-
import { UploadService } from '../upload.service';
|
|
12
|
-
import { getFileGroupCssClass, isPresent } from '../common/util';
|
|
13
|
-
import { FileInfoTemplateDirective } from '../templates/file-info-template.directive';
|
|
14
|
-
/**
|
|
15
|
-
* @hidden
|
|
16
|
-
*/
|
|
17
|
-
var FileListSingleItemComponent = /** @class */ (function (_super) {
|
|
18
|
-
tslib_1.__extends(FileListSingleItemComponent, _super);
|
|
19
|
-
function FileListSingleItemComponent(localization, uploadService) {
|
|
20
|
-
var _this = _super.call(this, uploadService) || this;
|
|
21
|
-
_this.localization = localization;
|
|
22
|
-
_this.subscribeUploadProgress(function (args) {
|
|
23
|
-
if (args.files[0].uid === _this.file.uid) {
|
|
24
|
-
_this.progressComplete = args.percentComplete;
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
return _this;
|
|
28
|
-
}
|
|
29
|
-
Object.defineProperty(FileListSingleItemComponent.prototype, "fileStatusText", {
|
|
30
|
-
get: function () {
|
|
31
|
-
var errors = this.file.validationErrors;
|
|
32
|
-
if (this.file.state === FileState.Uploaded) {
|
|
33
|
-
return "" + this.textFor('fileStatusUploaded');
|
|
34
|
-
}
|
|
35
|
-
if (this.file.state === FileState.Failed) {
|
|
36
|
-
return "" + this.textFor('fileStatusFailed');
|
|
37
|
-
}
|
|
38
|
-
if (!isPresent(errors)) {
|
|
39
|
-
return this.getTotalFilesSizeMessage([this.file]);
|
|
40
|
-
}
|
|
41
|
-
return this.getFileValidationMessage(this.file);
|
|
42
|
-
},
|
|
43
|
-
enumerable: true,
|
|
44
|
-
configurable: true
|
|
45
|
-
});
|
|
46
|
-
Object.defineProperty(FileListSingleItemComponent.prototype, "showProgress", {
|
|
47
|
-
get: function () {
|
|
48
|
-
var showProgress = this.file.state === FileState.Uploading || this.file.state === FileState.Paused;
|
|
49
|
-
return showProgress ? 'active' : 'inactive';
|
|
50
|
-
},
|
|
51
|
-
enumerable: true,
|
|
52
|
-
configurable: true
|
|
53
|
-
});
|
|
54
|
-
Object.defineProperty(FileListSingleItemComponent.prototype, "fileGroupClass", {
|
|
55
|
-
get: function () {
|
|
56
|
-
return getFileGroupCssClass(this.file.extension ? this.file.extension : '');
|
|
57
|
-
},
|
|
58
|
-
enumerable: true,
|
|
59
|
-
configurable: true
|
|
60
|
-
});
|
|
61
|
-
Object.defineProperty(FileListSingleItemComponent.prototype, "isUploadSuccessful", {
|
|
62
|
-
get: function () {
|
|
63
|
-
return this.file.state === FileState.Uploaded;
|
|
64
|
-
},
|
|
65
|
-
enumerable: true,
|
|
66
|
-
configurable: true
|
|
67
|
-
});
|
|
68
|
-
Object.defineProperty(FileListSingleItemComponent.prototype, "isUploadFailed", {
|
|
69
|
-
get: function () {
|
|
70
|
-
return this.file.state === FileState.Failed;
|
|
71
|
-
},
|
|
72
|
-
enumerable: true,
|
|
73
|
-
configurable: true
|
|
74
|
-
});
|
|
75
|
-
Object.defineProperty(FileListSingleItemComponent.prototype, "isNotYetUploaded", {
|
|
76
|
-
get: function () {
|
|
77
|
-
return !this.isUploadFailed && !this.isUploadSuccessful;
|
|
78
|
-
},
|
|
79
|
-
enumerable: true,
|
|
80
|
-
configurable: true
|
|
81
|
-
});
|
|
82
|
-
tslib_1.__decorate([
|
|
83
|
-
Input(),
|
|
84
|
-
tslib_1.__metadata("design:type", Boolean)
|
|
85
|
-
], FileListSingleItemComponent.prototype, "disabled", void 0);
|
|
86
|
-
tslib_1.__decorate([
|
|
87
|
-
Input(),
|
|
88
|
-
tslib_1.__metadata("design:type", Object)
|
|
89
|
-
], FileListSingleItemComponent.prototype, "file", void 0);
|
|
90
|
-
tslib_1.__decorate([
|
|
91
|
-
Input(),
|
|
92
|
-
tslib_1.__metadata("design:type", FileInfoTemplateDirective)
|
|
93
|
-
], FileListSingleItemComponent.prototype, "fileInfoTemplate", void 0);
|
|
94
|
-
FileListSingleItemComponent = tslib_1.__decorate([
|
|
95
|
-
Component({
|
|
96
|
-
animations: [
|
|
97
|
-
trigger('progressState', [
|
|
98
|
-
state('active', style({ opacity: 1 })),
|
|
99
|
-
state('inactive', style({ opacity: 0 })),
|
|
100
|
-
transition('void => active', style({ opacity: 0 })),
|
|
101
|
-
transition('inactive => active', style({ opacity: 1 })),
|
|
102
|
-
transition('active => inactive', animate('1s 2s ease-out'))
|
|
103
|
-
])
|
|
104
|
-
],
|
|
105
|
-
selector: 'kendo-upload-file-list-single-item',
|
|
106
|
-
template: "\n <div class=\"k-progressbar\" [@progressState]=\"showProgress\">\n <span class=\"k-progress\" [style.width]=\"progressComplete + '%'\"></span>\n </div>\n <span class=\"k-file-group-wrapper\">\n <span class=\"k-file-group k-icon\" [ngClass]=\"fileGroupClass\"></span>\n </span>\n <span class=\"k-file-name-size-wrapper\">\n <ng-container *ngIf=\"!fileInfoTemplate\">\n <span class=\"k-file-name\" [title]=\"file.name\">{{ file.name }}</span>\n <span [ngClass]=\"{\n 'k-file-validation-message': file.validationErrors,\n 'k-file-size': !file.validationErrors && isNotYetUploaded,\n 'k-text-success': isUploadSuccessful,\n 'k-text-error': file.validationErrors || isUploadFailed,\n 'k-file-information': isUploadSuccessful || isUploadFailed\n }\"\n >{{fileStatusText}}</span>\n </ng-container>\n <ng-template *ngIf=\"fileInfoTemplate\"\n [templateContext]=\"{\n templateRef: fileInfoTemplate.templateRef,\n state: file.state,\n $implicit: [file]\n }\">\n </ng-template>\n </span>\n <kendo-upload-file-list-item-action-button\n [file]='file'\n [disabled]='disabled'\n [progress]='progressComplete'>\n </kendo-upload-file-list-item-action-button>\n "
|
|
107
|
-
}),
|
|
108
|
-
tslib_1.__metadata("design:paramtypes", [LocalizationService, UploadService])
|
|
109
|
-
], FileListSingleItemComponent);
|
|
110
|
-
return FileListSingleItemComponent;
|
|
111
|
-
}(FileListItemBase));
|
|
112
|
-
export { FileListSingleItemComponent };
|
|
@@ -1,98 +0,0 @@
|
|
|
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 * as tslib_1 from "tslib";
|
|
6
|
-
/* tslint:disable:component-selector */
|
|
7
|
-
import { Input, Component, ViewChildren, QueryList } from '@angular/core';
|
|
8
|
-
import { Keys } from '@progress/kendo-angular-common';
|
|
9
|
-
import { FileState } from '../types';
|
|
10
|
-
import { FileTemplateDirective } from '../templates/file-template.directive';
|
|
11
|
-
import { FileListItemDirective } from './file-list-item';
|
|
12
|
-
import { NavigationService } from '../navigation.service';
|
|
13
|
-
import { UploadService } from '../upload.service';
|
|
14
|
-
import { FileInfoTemplateDirective } from '../templates/file-info-template.directive';
|
|
15
|
-
/**
|
|
16
|
-
* @hidden
|
|
17
|
-
*/
|
|
18
|
-
var FileListComponent = /** @class */ (function () {
|
|
19
|
-
function FileListComponent(uploadService, navigation) {
|
|
20
|
-
this.uploadService = uploadService;
|
|
21
|
-
this.navigation = navigation;
|
|
22
|
-
this.onItemFocus();
|
|
23
|
-
this.onItemAction();
|
|
24
|
-
}
|
|
25
|
-
FileListComponent.prototype.onItemFocus = function () {
|
|
26
|
-
var _this = this;
|
|
27
|
-
this.focusSubscription = this.navigation.onFileFocus.subscribe(function (index) {
|
|
28
|
-
_this.fileListItems.toArray()[index].focus();
|
|
29
|
-
});
|
|
30
|
-
};
|
|
31
|
-
FileListComponent.prototype.onItemAction = function () {
|
|
32
|
-
var _this = this;
|
|
33
|
-
this.actionSubscription = this.navigation.onFileAction.subscribe(function (key) {
|
|
34
|
-
_this.itemActionHandler(key);
|
|
35
|
-
});
|
|
36
|
-
};
|
|
37
|
-
FileListComponent.prototype.itemActionHandler = function (key) {
|
|
38
|
-
var index = this.navigation.focusedIndex;
|
|
39
|
-
var item = this.fileListItems.toArray()[index];
|
|
40
|
-
var uid = item.uidAttribute;
|
|
41
|
-
var files = this.uploadService.files.get(uid);
|
|
42
|
-
if (key === Keys.Escape && files[0].state === FileState.Uploading) {
|
|
43
|
-
this.uploadService.cancelFiles(uid);
|
|
44
|
-
this.navigation.focusSelectButton();
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
if (key === Keys.Enter && files[0].state === FileState.Failed) {
|
|
48
|
-
this.uploadService.retryFiles(uid);
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
if (key === Keys.Delete) {
|
|
52
|
-
if (files[0].state === FileState.Uploading) {
|
|
53
|
-
this.uploadService.cancelFiles(uid);
|
|
54
|
-
}
|
|
55
|
-
else if (this.hasDelete(item)) {
|
|
56
|
-
this.uploadService.removeFiles(uid);
|
|
57
|
-
}
|
|
58
|
-
this.navigation.focusSelectButton();
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
FileListComponent.prototype.hasDelete = function (item) {
|
|
62
|
-
return item.element.nativeElement.getElementsByClassName('k-delete').length > 0;
|
|
63
|
-
};
|
|
64
|
-
FileListComponent.prototype.ngOnDestroy = function () {
|
|
65
|
-
this.focusSubscription.unsubscribe();
|
|
66
|
-
this.actionSubscription.unsubscribe();
|
|
67
|
-
};
|
|
68
|
-
tslib_1.__decorate([
|
|
69
|
-
Input(),
|
|
70
|
-
tslib_1.__metadata("design:type", Boolean)
|
|
71
|
-
], FileListComponent.prototype, "disabled", void 0);
|
|
72
|
-
tslib_1.__decorate([
|
|
73
|
-
Input(),
|
|
74
|
-
tslib_1.__metadata("design:type", Array)
|
|
75
|
-
], FileListComponent.prototype, "fileList", void 0);
|
|
76
|
-
tslib_1.__decorate([
|
|
77
|
-
Input(),
|
|
78
|
-
tslib_1.__metadata("design:type", FileTemplateDirective)
|
|
79
|
-
], FileListComponent.prototype, "fileTemplate", void 0);
|
|
80
|
-
tslib_1.__decorate([
|
|
81
|
-
Input(),
|
|
82
|
-
tslib_1.__metadata("design:type", FileInfoTemplateDirective)
|
|
83
|
-
], FileListComponent.prototype, "fileInfoTemplate", void 0);
|
|
84
|
-
tslib_1.__decorate([
|
|
85
|
-
ViewChildren(FileListItemDirective),
|
|
86
|
-
tslib_1.__metadata("design:type", QueryList)
|
|
87
|
-
], FileListComponent.prototype, "fileListItems", void 0);
|
|
88
|
-
FileListComponent = tslib_1.__decorate([
|
|
89
|
-
Component({
|
|
90
|
-
selector: '[kendo-upload-file-list]',
|
|
91
|
-
template: "\n <ng-template ngFor\n [ngForOf]=\"fileList\"\n let-files\n let-index=\"index\">\n <li kendoUploadFileListItem [files]='files' [index]='index'>\n <kendo-upload-file-list-single-item\n class='k-file-single'\n *ngIf='files.length === 1 && !fileTemplate'\n [disabled]='disabled'\n [file]='files[0]'\n [fileInfoTemplate]=\"fileInfoTemplate\">\n </kendo-upload-file-list-single-item>\n <kendo-upload-file-list-multiple-items\n class='k-file-multiple'\n *ngIf='files.length > 1 && !fileTemplate'\n [disabled]='disabled'\n [files]='files'\n [fileInfoTemplate]=\"fileInfoTemplate\">\n </kendo-upload-file-list-multiple-items>\n <ng-template *ngIf=\"fileTemplate\"\n [templateContext]=\"{\n templateRef: fileTemplate.templateRef,\n state: files[0].state,\n $implicit: files\n }\"></ng-template>\n </li>\n </ng-template>\n "
|
|
92
|
-
}),
|
|
93
|
-
tslib_1.__metadata("design:paramtypes", [UploadService,
|
|
94
|
-
NavigationService])
|
|
95
|
-
], FileListComponent);
|
|
96
|
-
return FileListComponent;
|
|
97
|
-
}());
|
|
98
|
-
export { FileListComponent };
|
|
@@ -1,149 +0,0 @@
|
|
|
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 * as tslib_1 from "tslib";
|
|
6
|
-
import { Component, Input, HostBinding, ViewChild, ElementRef } from '@angular/core';
|
|
7
|
-
import { UploadService } from '../upload.service';
|
|
8
|
-
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
9
|
-
import { NavigationService } from '../navigation.service';
|
|
10
|
-
/**
|
|
11
|
-
* @hidden
|
|
12
|
-
*/
|
|
13
|
-
var UploadActionButtonsComponent = /** @class */ (function () {
|
|
14
|
-
function UploadActionButtonsComponent(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
|
-
Object.defineProperty(UploadActionButtonsComponent.prototype, "actionButtonsEndClassName", {
|
|
23
|
-
get: function () {
|
|
24
|
-
return this.actionsLayout === 'end';
|
|
25
|
-
},
|
|
26
|
-
enumerable: true,
|
|
27
|
-
configurable: true
|
|
28
|
-
});
|
|
29
|
-
Object.defineProperty(UploadActionButtonsComponent.prototype, "actionButtonsStretchedClassName", {
|
|
30
|
-
get: function () {
|
|
31
|
-
return this.actionsLayout === 'stretched';
|
|
32
|
-
},
|
|
33
|
-
enumerable: true,
|
|
34
|
-
configurable: true
|
|
35
|
-
});
|
|
36
|
-
Object.defineProperty(UploadActionButtonsComponent.prototype, "actionButtonsStartClassName", {
|
|
37
|
-
get: function () {
|
|
38
|
-
return this.actionsLayout === 'start';
|
|
39
|
-
},
|
|
40
|
-
enumerable: true,
|
|
41
|
-
configurable: true
|
|
42
|
-
});
|
|
43
|
-
Object.defineProperty(UploadActionButtonsComponent.prototype, "actionButtonsCenterClassName", {
|
|
44
|
-
get: function () {
|
|
45
|
-
return this.actionsLayout === 'center';
|
|
46
|
-
},
|
|
47
|
-
enumerable: true,
|
|
48
|
-
configurable: true
|
|
49
|
-
});
|
|
50
|
-
UploadActionButtonsComponent.prototype.onAction = function () {
|
|
51
|
-
var _this = this;
|
|
52
|
-
this.actionSubscription = this.navigation.onActionButtonAction.subscribe(function (button) {
|
|
53
|
-
if (button === "clear") {
|
|
54
|
-
_this.clearFiles();
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
_this.performUpload();
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
};
|
|
61
|
-
UploadActionButtonsComponent.prototype.onFocus = function () {
|
|
62
|
-
var _this = this;
|
|
63
|
-
this.focusSubscription = this.navigation.onActionButtonFocus.subscribe(function (button) {
|
|
64
|
-
_this.focusButton(button);
|
|
65
|
-
});
|
|
66
|
-
};
|
|
67
|
-
UploadActionButtonsComponent.prototype.focusButton = function (button) {
|
|
68
|
-
var el = (button === "clear") ? this.clearButton : this.uploadButton;
|
|
69
|
-
el.nativeElement.focus();
|
|
70
|
-
};
|
|
71
|
-
UploadActionButtonsComponent.prototype.ngOnDestroy = function () {
|
|
72
|
-
this.actionSubscription.unsubscribe();
|
|
73
|
-
this.focusSubscription.unsubscribe();
|
|
74
|
-
};
|
|
75
|
-
UploadActionButtonsComponent.prototype.onUploadButtonClick = function (event) {
|
|
76
|
-
event.stopImmediatePropagation();
|
|
77
|
-
this.performUpload();
|
|
78
|
-
};
|
|
79
|
-
UploadActionButtonsComponent.prototype.performUpload = function () {
|
|
80
|
-
if (!this.disabled) {
|
|
81
|
-
this.uploadService.uploadFiles();
|
|
82
|
-
this.navigation.focusSelectButton();
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
UploadActionButtonsComponent.prototype.onClearButtonClick = function (event) {
|
|
86
|
-
event.stopImmediatePropagation();
|
|
87
|
-
this.clearFiles();
|
|
88
|
-
};
|
|
89
|
-
UploadActionButtonsComponent.prototype.clearFiles = function () {
|
|
90
|
-
if (!this.disabled) {
|
|
91
|
-
this.uploadService.clearFiles();
|
|
92
|
-
this.navigation.focusSelectButton();
|
|
93
|
-
}
|
|
94
|
-
};
|
|
95
|
-
UploadActionButtonsComponent.prototype.textFor = function (key) {
|
|
96
|
-
return this.localization.get(key);
|
|
97
|
-
};
|
|
98
|
-
tslib_1.__decorate([
|
|
99
|
-
Input(),
|
|
100
|
-
tslib_1.__metadata("design:type", Boolean)
|
|
101
|
-
], UploadActionButtonsComponent.prototype, "disabled", void 0);
|
|
102
|
-
tslib_1.__decorate([
|
|
103
|
-
Input(),
|
|
104
|
-
tslib_1.__metadata("design:type", String)
|
|
105
|
-
], UploadActionButtonsComponent.prototype, "actionsLayout", void 0);
|
|
106
|
-
tslib_1.__decorate([
|
|
107
|
-
ViewChild('clearButton', { static: true }),
|
|
108
|
-
tslib_1.__metadata("design:type", ElementRef)
|
|
109
|
-
], UploadActionButtonsComponent.prototype, "clearButton", void 0);
|
|
110
|
-
tslib_1.__decorate([
|
|
111
|
-
ViewChild('uploadButton', { static: true }),
|
|
112
|
-
tslib_1.__metadata("design:type", ElementRef)
|
|
113
|
-
], UploadActionButtonsComponent.prototype, "uploadButton", void 0);
|
|
114
|
-
tslib_1.__decorate([
|
|
115
|
-
HostBinding('class.k-actions'),
|
|
116
|
-
tslib_1.__metadata("design:type", Boolean)
|
|
117
|
-
], UploadActionButtonsComponent.prototype, "hostDefaultClass", void 0);
|
|
118
|
-
tslib_1.__decorate([
|
|
119
|
-
HostBinding('class.k-actions-end'),
|
|
120
|
-
tslib_1.__metadata("design:type", Boolean),
|
|
121
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
122
|
-
], UploadActionButtonsComponent.prototype, "actionButtonsEndClassName", null);
|
|
123
|
-
tslib_1.__decorate([
|
|
124
|
-
HostBinding('class.k-actions-stretched'),
|
|
125
|
-
tslib_1.__metadata("design:type", Boolean),
|
|
126
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
127
|
-
], UploadActionButtonsComponent.prototype, "actionButtonsStretchedClassName", null);
|
|
128
|
-
tslib_1.__decorate([
|
|
129
|
-
HostBinding('class.k-actions-start'),
|
|
130
|
-
tslib_1.__metadata("design:type", Boolean),
|
|
131
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
132
|
-
], UploadActionButtonsComponent.prototype, "actionButtonsStartClassName", null);
|
|
133
|
-
tslib_1.__decorate([
|
|
134
|
-
HostBinding('class.k-actions-center'),
|
|
135
|
-
tslib_1.__metadata("design:type", Boolean),
|
|
136
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
137
|
-
], UploadActionButtonsComponent.prototype, "actionButtonsCenterClassName", null);
|
|
138
|
-
UploadActionButtonsComponent = tslib_1.__decorate([
|
|
139
|
-
Component({
|
|
140
|
-
selector: 'kendo-upload-action-buttons',
|
|
141
|
-
template: "\n <button #clearButton type=\"button\" class=\"k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-clear-selected\"\n [attr.tabIndex]=\"-1\"\n (click)=\"onClearButtonClick($event)\">\n {{textFor('clearSelectedFiles')}}\n </button>\n <button #uploadButton type=\"button\" class=\"k-button k-button-md k-rounded-md k-button-solid k-button-solid-primary k-upload-selected\"\n [attr.tabIndex]=\"-1\"\n (click)=\"onUploadButtonClick($event)\">\n {{textFor('uploadSelectedFiles')}}\n </button>\n "
|
|
142
|
-
}),
|
|
143
|
-
tslib_1.__metadata("design:paramtypes", [UploadService,
|
|
144
|
-
LocalizationService,
|
|
145
|
-
NavigationService])
|
|
146
|
-
], UploadActionButtonsComponent);
|
|
147
|
-
return UploadActionButtonsComponent;
|
|
148
|
-
}());
|
|
149
|
-
export { UploadActionButtonsComponent };
|
|
@@ -1,42 +0,0 @@
|
|
|
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 * as tslib_1 from "tslib";
|
|
6
|
-
import { Component, Input } from '@angular/core';
|
|
7
|
-
import { FileMap } from '../types/file-map';
|
|
8
|
-
import { FileState } from '../types';
|
|
9
|
-
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
10
|
-
/**
|
|
11
|
-
* @hidden
|
|
12
|
-
*/
|
|
13
|
-
var UploadStatusTotalComponent = /** @class */ (function () {
|
|
14
|
-
function UploadStatusTotalComponent(localization) {
|
|
15
|
-
this.localization = localization;
|
|
16
|
-
}
|
|
17
|
-
UploadStatusTotalComponent.prototype.ngDoCheck = function () {
|
|
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
|
-
tslib_1.__decorate([
|
|
30
|
-
Input(),
|
|
31
|
-
tslib_1.__metadata("design:type", FileMap)
|
|
32
|
-
], UploadStatusTotalComponent.prototype, "fileList", void 0);
|
|
33
|
-
UploadStatusTotalComponent = tslib_1.__decorate([
|
|
34
|
-
Component({
|
|
35
|
-
selector: 'kendo-upload-status-total',
|
|
36
|
-
template: "\n <span class=\"k-icon\"\n [ngClass]=\"{\n 'k-i-checkmark': !this.isUploading && !this.isFailed,\n 'k-i-exception': !this.isUploading && this.isFailed,\n 'k-i-upload': this.isUploading,\n 'k-i-pause-sm': this.isPaused\n }\">\n </span>\n {{statusText}}\n "
|
|
37
|
-
}),
|
|
38
|
-
tslib_1.__metadata("design:paramtypes", [LocalizationService])
|
|
39
|
-
], UploadStatusTotalComponent);
|
|
40
|
-
return UploadStatusTotalComponent;
|
|
41
|
-
}());
|
|
42
|
-
export { UploadStatusTotalComponent };
|
package/dist/es/shared.module.js
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
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 * as tslib_1 from "tslib";
|
|
6
|
-
import { FileInfoTemplateDirective } from './templates/file-info-template.directive';
|
|
7
|
-
import { NgModule } from '@angular/core';
|
|
8
|
-
import { CommonModule } from '@angular/common';
|
|
9
|
-
import { CustomMessagesComponent } from './localization/custom-messages.component';
|
|
10
|
-
import { DropZoneInternalDirective } from './dropzone-internal.directive';
|
|
11
|
-
import { FileListComponent } from './rendering/file-list.component';
|
|
12
|
-
import { FileListItemDirective } from './rendering/file-list-item';
|
|
13
|
-
import { FileListItemActionButtonComponent } from './rendering/file-list-item-action-button.component';
|
|
14
|
-
import { FileListMultipleItemsComponent } from './rendering/file-list-multiple-items.component';
|
|
15
|
-
import { FileListSingleItemComponent } from './rendering/file-list-single-item.component';
|
|
16
|
-
import { FileSelectDirective } from './file-select.directive';
|
|
17
|
-
import { FileTemplateDirective } from './templates/file-template.directive';
|
|
18
|
-
import { LocalizedMessagesDirective } from './localization/localized-messages.directive';
|
|
19
|
-
import { TemplateContextDirective } from './templates/template-context.directive';
|
|
20
|
-
import { UploadDropZoneDirective } from './dropzone-external.directive';
|
|
21
|
-
import { UploadDropZoneComponent } from './dropzone.component';
|
|
22
|
-
/**
|
|
23
|
-
* @hidden
|
|
24
|
-
*/
|
|
25
|
-
export var SHARED_DECLARATIONS = [
|
|
26
|
-
DropZoneInternalDirective,
|
|
27
|
-
FileListComponent,
|
|
28
|
-
FileListItemDirective,
|
|
29
|
-
FileListItemActionButtonComponent,
|
|
30
|
-
FileListMultipleItemsComponent,
|
|
31
|
-
FileListSingleItemComponent,
|
|
32
|
-
FileSelectDirective,
|
|
33
|
-
LocalizedMessagesDirective,
|
|
34
|
-
TemplateContextDirective
|
|
35
|
-
];
|
|
36
|
-
/**
|
|
37
|
-
* @hidden
|
|
38
|
-
*/
|
|
39
|
-
export var PUBLIC_DIRECTIVES = [
|
|
40
|
-
FileTemplateDirective,
|
|
41
|
-
FileInfoTemplateDirective,
|
|
42
|
-
CustomMessagesComponent,
|
|
43
|
-
UploadDropZoneDirective,
|
|
44
|
-
UploadDropZoneComponent
|
|
45
|
-
];
|
|
46
|
-
/**
|
|
47
|
-
* @hidden
|
|
48
|
-
*/
|
|
49
|
-
var SharedModule = /** @class */ (function () {
|
|
50
|
-
function SharedModule() {
|
|
51
|
-
}
|
|
52
|
-
SharedModule = tslib_1.__decorate([
|
|
53
|
-
NgModule({
|
|
54
|
-
declarations: [
|
|
55
|
-
PUBLIC_DIRECTIVES,
|
|
56
|
-
SHARED_DECLARATIONS
|
|
57
|
-
],
|
|
58
|
-
exports: [
|
|
59
|
-
PUBLIC_DIRECTIVES,
|
|
60
|
-
SHARED_DECLARATIONS,
|
|
61
|
-
CommonModule
|
|
62
|
-
],
|
|
63
|
-
imports: [CommonModule]
|
|
64
|
-
})
|
|
65
|
-
], SharedModule);
|
|
66
|
-
return SharedModule;
|
|
67
|
-
}());
|
|
68
|
-
export { SharedModule };
|
|
@@ -1,22 +0,0 @@
|
|
|
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 * as tslib_1 from "tslib";
|
|
6
|
-
import { Directive, TemplateRef } 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
|
-
var FileInfoTemplateDirective = /** @class */ (function () {
|
|
11
|
-
function FileInfoTemplateDirective(templateRef) {
|
|
12
|
-
this.templateRef = templateRef;
|
|
13
|
-
}
|
|
14
|
-
FileInfoTemplateDirective = tslib_1.__decorate([
|
|
15
|
-
Directive({
|
|
16
|
-
selector: '[kendoUploadFileInfoTemplate], [kendoFileSelectFileInfoTemplate]'
|
|
17
|
-
}),
|
|
18
|
-
tslib_1.__metadata("design:paramtypes", [TemplateRef])
|
|
19
|
-
], FileInfoTemplateDirective);
|
|
20
|
-
return FileInfoTemplateDirective;
|
|
21
|
-
}());
|
|
22
|
-
export { FileInfoTemplateDirective };
|
|
@@ -1,22 +0,0 @@
|
|
|
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 * as tslib_1 from "tslib";
|
|
6
|
-
import { Directive, TemplateRef } 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
|
-
var FileTemplateDirective = /** @class */ (function () {
|
|
11
|
-
function FileTemplateDirective(templateRef) {
|
|
12
|
-
this.templateRef = templateRef;
|
|
13
|
-
}
|
|
14
|
-
FileTemplateDirective = tslib_1.__decorate([
|
|
15
|
-
Directive({
|
|
16
|
-
selector: '[kendoUploadFileTemplate], [kendoFileSelectFileTemplate]' // tslint:disable-line:directive-selector-prefix
|
|
17
|
-
}),
|
|
18
|
-
tslib_1.__metadata("design:paramtypes", [TemplateRef])
|
|
19
|
-
], FileTemplateDirective);
|
|
20
|
-
return FileTemplateDirective;
|
|
21
|
-
}());
|
|
22
|
-
export { FileTemplateDirective };
|