@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
|
@@ -1,151 +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
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
var tslib_1 = require("tslib");
|
|
8
|
-
var core_1 = require("@angular/core");
|
|
9
|
-
var upload_service_1 = require("../upload.service");
|
|
10
|
-
var kendo_angular_l10n_1 = require("@progress/kendo-angular-l10n");
|
|
11
|
-
var navigation_service_1 = require("../navigation.service");
|
|
12
|
-
/**
|
|
13
|
-
* @hidden
|
|
14
|
-
*/
|
|
15
|
-
var UploadActionButtonsComponent = /** @class */ (function () {
|
|
16
|
-
function UploadActionButtonsComponent(uploadService, localization, navigation) {
|
|
17
|
-
this.uploadService = uploadService;
|
|
18
|
-
this.localization = localization;
|
|
19
|
-
this.navigation = navigation;
|
|
20
|
-
this.hostDefaultClass = true;
|
|
21
|
-
this.onAction();
|
|
22
|
-
this.onFocus();
|
|
23
|
-
}
|
|
24
|
-
Object.defineProperty(UploadActionButtonsComponent.prototype, "actionButtonsEndClassName", {
|
|
25
|
-
get: function () {
|
|
26
|
-
return this.actionsLayout === 'end';
|
|
27
|
-
},
|
|
28
|
-
enumerable: true,
|
|
29
|
-
configurable: true
|
|
30
|
-
});
|
|
31
|
-
Object.defineProperty(UploadActionButtonsComponent.prototype, "actionButtonsStretchedClassName", {
|
|
32
|
-
get: function () {
|
|
33
|
-
return this.actionsLayout === 'stretched';
|
|
34
|
-
},
|
|
35
|
-
enumerable: true,
|
|
36
|
-
configurable: true
|
|
37
|
-
});
|
|
38
|
-
Object.defineProperty(UploadActionButtonsComponent.prototype, "actionButtonsStartClassName", {
|
|
39
|
-
get: function () {
|
|
40
|
-
return this.actionsLayout === 'start';
|
|
41
|
-
},
|
|
42
|
-
enumerable: true,
|
|
43
|
-
configurable: true
|
|
44
|
-
});
|
|
45
|
-
Object.defineProperty(UploadActionButtonsComponent.prototype, "actionButtonsCenterClassName", {
|
|
46
|
-
get: function () {
|
|
47
|
-
return this.actionsLayout === 'center';
|
|
48
|
-
},
|
|
49
|
-
enumerable: true,
|
|
50
|
-
configurable: true
|
|
51
|
-
});
|
|
52
|
-
UploadActionButtonsComponent.prototype.onAction = function () {
|
|
53
|
-
var _this = this;
|
|
54
|
-
this.actionSubscription = this.navigation.onActionButtonAction.subscribe(function (button) {
|
|
55
|
-
if (button === "clear") {
|
|
56
|
-
_this.clearFiles();
|
|
57
|
-
}
|
|
58
|
-
else {
|
|
59
|
-
_this.performUpload();
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
};
|
|
63
|
-
UploadActionButtonsComponent.prototype.onFocus = function () {
|
|
64
|
-
var _this = this;
|
|
65
|
-
this.focusSubscription = this.navigation.onActionButtonFocus.subscribe(function (button) {
|
|
66
|
-
_this.focusButton(button);
|
|
67
|
-
});
|
|
68
|
-
};
|
|
69
|
-
UploadActionButtonsComponent.prototype.focusButton = function (button) {
|
|
70
|
-
var el = (button === "clear") ? this.clearButton : this.uploadButton;
|
|
71
|
-
el.nativeElement.focus();
|
|
72
|
-
};
|
|
73
|
-
UploadActionButtonsComponent.prototype.ngOnDestroy = function () {
|
|
74
|
-
this.actionSubscription.unsubscribe();
|
|
75
|
-
this.focusSubscription.unsubscribe();
|
|
76
|
-
};
|
|
77
|
-
UploadActionButtonsComponent.prototype.onUploadButtonClick = function (event) {
|
|
78
|
-
event.stopImmediatePropagation();
|
|
79
|
-
this.performUpload();
|
|
80
|
-
};
|
|
81
|
-
UploadActionButtonsComponent.prototype.performUpload = function () {
|
|
82
|
-
if (!this.disabled) {
|
|
83
|
-
this.uploadService.uploadFiles();
|
|
84
|
-
this.navigation.focusSelectButton();
|
|
85
|
-
}
|
|
86
|
-
};
|
|
87
|
-
UploadActionButtonsComponent.prototype.onClearButtonClick = function (event) {
|
|
88
|
-
event.stopImmediatePropagation();
|
|
89
|
-
this.clearFiles();
|
|
90
|
-
};
|
|
91
|
-
UploadActionButtonsComponent.prototype.clearFiles = function () {
|
|
92
|
-
if (!this.disabled) {
|
|
93
|
-
this.uploadService.clearFiles();
|
|
94
|
-
this.navigation.focusSelectButton();
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
UploadActionButtonsComponent.prototype.textFor = function (key) {
|
|
98
|
-
return this.localization.get(key);
|
|
99
|
-
};
|
|
100
|
-
tslib_1.__decorate([
|
|
101
|
-
core_1.Input(),
|
|
102
|
-
tslib_1.__metadata("design:type", Boolean)
|
|
103
|
-
], UploadActionButtonsComponent.prototype, "disabled", void 0);
|
|
104
|
-
tslib_1.__decorate([
|
|
105
|
-
core_1.Input(),
|
|
106
|
-
tslib_1.__metadata("design:type", String)
|
|
107
|
-
], UploadActionButtonsComponent.prototype, "actionsLayout", void 0);
|
|
108
|
-
tslib_1.__decorate([
|
|
109
|
-
core_1.ViewChild('clearButton', { static: true }),
|
|
110
|
-
tslib_1.__metadata("design:type", core_1.ElementRef)
|
|
111
|
-
], UploadActionButtonsComponent.prototype, "clearButton", void 0);
|
|
112
|
-
tslib_1.__decorate([
|
|
113
|
-
core_1.ViewChild('uploadButton', { static: true }),
|
|
114
|
-
tslib_1.__metadata("design:type", core_1.ElementRef)
|
|
115
|
-
], UploadActionButtonsComponent.prototype, "uploadButton", void 0);
|
|
116
|
-
tslib_1.__decorate([
|
|
117
|
-
core_1.HostBinding('class.k-actions'),
|
|
118
|
-
tslib_1.__metadata("design:type", Boolean)
|
|
119
|
-
], UploadActionButtonsComponent.prototype, "hostDefaultClass", void 0);
|
|
120
|
-
tslib_1.__decorate([
|
|
121
|
-
core_1.HostBinding('class.k-actions-end'),
|
|
122
|
-
tslib_1.__metadata("design:type", Boolean),
|
|
123
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
124
|
-
], UploadActionButtonsComponent.prototype, "actionButtonsEndClassName", null);
|
|
125
|
-
tslib_1.__decorate([
|
|
126
|
-
core_1.HostBinding('class.k-actions-stretched'),
|
|
127
|
-
tslib_1.__metadata("design:type", Boolean),
|
|
128
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
129
|
-
], UploadActionButtonsComponent.prototype, "actionButtonsStretchedClassName", null);
|
|
130
|
-
tslib_1.__decorate([
|
|
131
|
-
core_1.HostBinding('class.k-actions-start'),
|
|
132
|
-
tslib_1.__metadata("design:type", Boolean),
|
|
133
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
134
|
-
], UploadActionButtonsComponent.prototype, "actionButtonsStartClassName", null);
|
|
135
|
-
tslib_1.__decorate([
|
|
136
|
-
core_1.HostBinding('class.k-actions-center'),
|
|
137
|
-
tslib_1.__metadata("design:type", Boolean),
|
|
138
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
139
|
-
], UploadActionButtonsComponent.prototype, "actionButtonsCenterClassName", null);
|
|
140
|
-
UploadActionButtonsComponent = tslib_1.__decorate([
|
|
141
|
-
core_1.Component({
|
|
142
|
-
selector: 'kendo-upload-action-buttons',
|
|
143
|
-
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 "
|
|
144
|
-
}),
|
|
145
|
-
tslib_1.__metadata("design:paramtypes", [upload_service_1.UploadService,
|
|
146
|
-
kendo_angular_l10n_1.LocalizationService,
|
|
147
|
-
navigation_service_1.NavigationService])
|
|
148
|
-
], UploadActionButtonsComponent);
|
|
149
|
-
return UploadActionButtonsComponent;
|
|
150
|
-
}());
|
|
151
|
-
exports.UploadActionButtonsComponent = UploadActionButtonsComponent;
|
|
@@ -1,44 +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
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
var tslib_1 = require("tslib");
|
|
8
|
-
var core_1 = require("@angular/core");
|
|
9
|
-
var file_map_1 = require("../types/file-map");
|
|
10
|
-
var types_1 = require("../types");
|
|
11
|
-
var kendo_angular_l10n_1 = require("@progress/kendo-angular-l10n");
|
|
12
|
-
/**
|
|
13
|
-
* @hidden
|
|
14
|
-
*/
|
|
15
|
-
var UploadStatusTotalComponent = /** @class */ (function () {
|
|
16
|
-
function UploadStatusTotalComponent(localization) {
|
|
17
|
-
this.localization = localization;
|
|
18
|
-
}
|
|
19
|
-
UploadStatusTotalComponent.prototype.ngDoCheck = function () {
|
|
20
|
-
this.isPaused = this.fileList.hasFileWithState([types_1.FileState.Paused]);
|
|
21
|
-
this.isFailed = this.fileList.hasFileWithState([types_1.FileState.Failed]);
|
|
22
|
-
this.isUploading = this.fileList.hasFileWithState([types_1.FileState.Uploading]);
|
|
23
|
-
if (this.isPaused && !this.isUploading) {
|
|
24
|
-
this.statusText = this.localization.get('headerStatusPaused');
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
this.statusText = this.isUploading ? this.localization.get('headerStatusUploading')
|
|
28
|
-
: this.localization.get('headerStatusUploaded');
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
tslib_1.__decorate([
|
|
32
|
-
core_1.Input(),
|
|
33
|
-
tslib_1.__metadata("design:type", file_map_1.FileMap)
|
|
34
|
-
], UploadStatusTotalComponent.prototype, "fileList", void 0);
|
|
35
|
-
UploadStatusTotalComponent = tslib_1.__decorate([
|
|
36
|
-
core_1.Component({
|
|
37
|
-
selector: 'kendo-upload-status-total',
|
|
38
|
-
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 "
|
|
39
|
-
}),
|
|
40
|
-
tslib_1.__metadata("design:paramtypes", [kendo_angular_l10n_1.LocalizationService])
|
|
41
|
-
], UploadStatusTotalComponent);
|
|
42
|
-
return UploadStatusTotalComponent;
|
|
43
|
-
}());
|
|
44
|
-
exports.UploadStatusTotalComponent = UploadStatusTotalComponent;
|
|
@@ -1,70 +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
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
var tslib_1 = require("tslib");
|
|
8
|
-
var file_info_template_directive_1 = require("./templates/file-info-template.directive");
|
|
9
|
-
var core_1 = require("@angular/core");
|
|
10
|
-
var common_1 = require("@angular/common");
|
|
11
|
-
var custom_messages_component_1 = require("./localization/custom-messages.component");
|
|
12
|
-
var dropzone_internal_directive_1 = require("./dropzone-internal.directive");
|
|
13
|
-
var file_list_component_1 = require("./rendering/file-list.component");
|
|
14
|
-
var file_list_item_1 = require("./rendering/file-list-item");
|
|
15
|
-
var file_list_item_action_button_component_1 = require("./rendering/file-list-item-action-button.component");
|
|
16
|
-
var file_list_multiple_items_component_1 = require("./rendering/file-list-multiple-items.component");
|
|
17
|
-
var file_list_single_item_component_1 = require("./rendering/file-list-single-item.component");
|
|
18
|
-
var file_select_directive_1 = require("./file-select.directive");
|
|
19
|
-
var file_template_directive_1 = require("./templates/file-template.directive");
|
|
20
|
-
var localized_messages_directive_1 = require("./localization/localized-messages.directive");
|
|
21
|
-
var template_context_directive_1 = require("./templates/template-context.directive");
|
|
22
|
-
var dropzone_external_directive_1 = require("./dropzone-external.directive");
|
|
23
|
-
var dropzone_component_1 = require("./dropzone.component");
|
|
24
|
-
/**
|
|
25
|
-
* @hidden
|
|
26
|
-
*/
|
|
27
|
-
exports.SHARED_DECLARATIONS = [
|
|
28
|
-
dropzone_internal_directive_1.DropZoneInternalDirective,
|
|
29
|
-
file_list_component_1.FileListComponent,
|
|
30
|
-
file_list_item_1.FileListItemDirective,
|
|
31
|
-
file_list_item_action_button_component_1.FileListItemActionButtonComponent,
|
|
32
|
-
file_list_multiple_items_component_1.FileListMultipleItemsComponent,
|
|
33
|
-
file_list_single_item_component_1.FileListSingleItemComponent,
|
|
34
|
-
file_select_directive_1.FileSelectDirective,
|
|
35
|
-
localized_messages_directive_1.LocalizedMessagesDirective,
|
|
36
|
-
template_context_directive_1.TemplateContextDirective
|
|
37
|
-
];
|
|
38
|
-
/**
|
|
39
|
-
* @hidden
|
|
40
|
-
*/
|
|
41
|
-
exports.PUBLIC_DIRECTIVES = [
|
|
42
|
-
file_template_directive_1.FileTemplateDirective,
|
|
43
|
-
file_info_template_directive_1.FileInfoTemplateDirective,
|
|
44
|
-
custom_messages_component_1.CustomMessagesComponent,
|
|
45
|
-
dropzone_external_directive_1.UploadDropZoneDirective,
|
|
46
|
-
dropzone_component_1.UploadDropZoneComponent
|
|
47
|
-
];
|
|
48
|
-
/**
|
|
49
|
-
* @hidden
|
|
50
|
-
*/
|
|
51
|
-
var SharedModule = /** @class */ (function () {
|
|
52
|
-
function SharedModule() {
|
|
53
|
-
}
|
|
54
|
-
SharedModule = tslib_1.__decorate([
|
|
55
|
-
core_1.NgModule({
|
|
56
|
-
declarations: [
|
|
57
|
-
exports.PUBLIC_DIRECTIVES,
|
|
58
|
-
exports.SHARED_DECLARATIONS
|
|
59
|
-
],
|
|
60
|
-
exports: [
|
|
61
|
-
exports.PUBLIC_DIRECTIVES,
|
|
62
|
-
exports.SHARED_DECLARATIONS,
|
|
63
|
-
common_1.CommonModule
|
|
64
|
-
],
|
|
65
|
-
imports: [common_1.CommonModule]
|
|
66
|
-
})
|
|
67
|
-
], SharedModule);
|
|
68
|
-
return SharedModule;
|
|
69
|
-
}());
|
|
70
|
-
exports.SharedModule = SharedModule;
|
|
@@ -1,24 +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
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
var tslib_1 = require("tslib");
|
|
8
|
-
var core_1 = require("@angular/core");
|
|
9
|
-
/**
|
|
10
|
-
* 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)).
|
|
11
|
-
*/
|
|
12
|
-
var FileInfoTemplateDirective = /** @class */ (function () {
|
|
13
|
-
function FileInfoTemplateDirective(templateRef) {
|
|
14
|
-
this.templateRef = templateRef;
|
|
15
|
-
}
|
|
16
|
-
FileInfoTemplateDirective = tslib_1.__decorate([
|
|
17
|
-
core_1.Directive({
|
|
18
|
-
selector: '[kendoUploadFileInfoTemplate], [kendoFileSelectFileInfoTemplate]'
|
|
19
|
-
}),
|
|
20
|
-
tslib_1.__metadata("design:paramtypes", [core_1.TemplateRef])
|
|
21
|
-
], FileInfoTemplateDirective);
|
|
22
|
-
return FileInfoTemplateDirective;
|
|
23
|
-
}());
|
|
24
|
-
exports.FileInfoTemplateDirective = FileInfoTemplateDirective;
|
|
@@ -1,24 +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
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
var tslib_1 = require("tslib");
|
|
8
|
-
var core_1 = require("@angular/core");
|
|
9
|
-
/**
|
|
10
|
-
* Used to customize the rendering of the files in the list ([see example]({% slug templates_upload %}#toc-file-template)).
|
|
11
|
-
*/
|
|
12
|
-
var FileTemplateDirective = /** @class */ (function () {
|
|
13
|
-
function FileTemplateDirective(templateRef) {
|
|
14
|
-
this.templateRef = templateRef;
|
|
15
|
-
}
|
|
16
|
-
FileTemplateDirective = tslib_1.__decorate([
|
|
17
|
-
core_1.Directive({
|
|
18
|
-
selector: '[kendoUploadFileTemplate], [kendoFileSelectFileTemplate]' // tslint:disable-line:directive-selector-prefix
|
|
19
|
-
}),
|
|
20
|
-
tslib_1.__metadata("design:paramtypes", [core_1.TemplateRef])
|
|
21
|
-
], FileTemplateDirective);
|
|
22
|
-
return FileTemplateDirective;
|
|
23
|
-
}());
|
|
24
|
-
exports.FileTemplateDirective = FileTemplateDirective;
|
|
@@ -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
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
var tslib_1 = require("tslib");
|
|
8
|
-
var core_1 = require("@angular/core");
|
|
9
|
-
/**
|
|
10
|
-
* @hidden
|
|
11
|
-
*/
|
|
12
|
-
var TemplateContextDirective = /** @class */ (function () {
|
|
13
|
-
function TemplateContextDirective(viewContainerRef) {
|
|
14
|
-
this.viewContainerRef = viewContainerRef;
|
|
15
|
-
}
|
|
16
|
-
Object.defineProperty(TemplateContextDirective.prototype, "templateContext", {
|
|
17
|
-
set: function (context) {
|
|
18
|
-
if (this.insertedViewRef) {
|
|
19
|
-
this.viewContainerRef.remove(this.viewContainerRef.indexOf(this.insertedViewRef));
|
|
20
|
-
this.insertedViewRef = undefined;
|
|
21
|
-
}
|
|
22
|
-
if (context.templateRef) {
|
|
23
|
-
this.insertedViewRef = this.viewContainerRef.createEmbeddedView(context.templateRef, context);
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
enumerable: true,
|
|
27
|
-
configurable: true
|
|
28
|
-
});
|
|
29
|
-
tslib_1.__decorate([
|
|
30
|
-
core_1.Input(),
|
|
31
|
-
tslib_1.__metadata("design:type", Object),
|
|
32
|
-
tslib_1.__metadata("design:paramtypes", [Object])
|
|
33
|
-
], TemplateContextDirective.prototype, "templateContext", null);
|
|
34
|
-
TemplateContextDirective = tslib_1.__decorate([
|
|
35
|
-
core_1.Directive({
|
|
36
|
-
selector: '[templateContext]' // tslint:disable-line:directive-selector
|
|
37
|
-
}),
|
|
38
|
-
tslib_1.__metadata("design:paramtypes", [core_1.ViewContainerRef])
|
|
39
|
-
], TemplateContextDirective);
|
|
40
|
-
return TemplateContextDirective;
|
|
41
|
-
}());
|
|
42
|
-
exports.TemplateContextDirective = TemplateContextDirective;
|
|
@@ -1,6 +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
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,6 +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
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,38 +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
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
/**
|
|
8
|
-
* @hidden
|
|
9
|
-
*/
|
|
10
|
-
var ChunkMap = /** @class */ (function () {
|
|
11
|
-
function ChunkMap() {
|
|
12
|
-
this._files = {};
|
|
13
|
-
}
|
|
14
|
-
ChunkMap.prototype.add = function (uid, totalChunks) {
|
|
15
|
-
var initialChunkInfo = {
|
|
16
|
-
index: 0,
|
|
17
|
-
position: 0,
|
|
18
|
-
retries: 0,
|
|
19
|
-
totalChunks: totalChunks
|
|
20
|
-
};
|
|
21
|
-
this._files[uid] = initialChunkInfo;
|
|
22
|
-
return initialChunkInfo;
|
|
23
|
-
};
|
|
24
|
-
ChunkMap.prototype.remove = function (uid) {
|
|
25
|
-
if (this.has(uid)) {
|
|
26
|
-
this._files[uid] = null;
|
|
27
|
-
delete this._files[uid];
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
ChunkMap.prototype.has = function (uid) {
|
|
31
|
-
return uid in this._files;
|
|
32
|
-
};
|
|
33
|
-
ChunkMap.prototype.get = function (uid) {
|
|
34
|
-
return this._files[uid];
|
|
35
|
-
};
|
|
36
|
-
return ChunkMap;
|
|
37
|
-
}());
|
|
38
|
-
exports.ChunkMap = ChunkMap;
|
|
@@ -1,6 +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
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,6 +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
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,6 +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
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,47 +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
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
var ɵ0 = [
|
|
8
|
-
".xlr", ".xls", ".xlsx"
|
|
9
|
-
];
|
|
10
|
-
exports.ɵ0 = ɵ0;
|
|
11
|
-
/**
|
|
12
|
-
* @hidden
|
|
13
|
-
*/
|
|
14
|
-
exports.fileGroupMap = {
|
|
15
|
-
audio: [
|
|
16
|
-
".aif", ".iff", ".m3u", ".m4a", ".mid", ".mp3", ".mpa", ".wav", ".wma", ".ogg", ".wav", ".wma", ".wpl"
|
|
17
|
-
],
|
|
18
|
-
video: [
|
|
19
|
-
".3g2", ".3gp", ".avi", ".asf", ".flv", ".m4u", ".rm", ".h264", ".m4v", ".mkv", ".mov", ".mp4", ".mpg", ".rm", ".swf", ".vob", ".wmv"
|
|
20
|
-
],
|
|
21
|
-
image: [
|
|
22
|
-
".ai", ".dds", ".heic", ".jpe", "jfif", ".jif", ".jp2", ".jps", ".eps", ".bmp", ".gif", ".jpeg", ".jpg", ".png", ".ps", ".psd", ".svg", ".svgz", ".tif", ".tiff"
|
|
23
|
-
],
|
|
24
|
-
txt: [
|
|
25
|
-
".doc", ".docx", ".log", ".pages", ".tex", ".wpd", ".wps", ".odt", ".rtf", ".text", ".txt", ".wks"
|
|
26
|
-
],
|
|
27
|
-
presentation: [
|
|
28
|
-
".key", ".odp", ".pps", ".ppt", ".pptx"
|
|
29
|
-
],
|
|
30
|
-
data: ɵ0,
|
|
31
|
-
programming: [
|
|
32
|
-
".tmp", ".bak", ".msi", ".cab", ".cpl", ".cur", ".dll", ".dmp", ".drv", ".icns", ".ico", ".link", ".sys", ".cfg",
|
|
33
|
-
".ini", ".asp", ".aspx", ".cer", ".csr", ".css", ".dcr", ".htm", ".html", ".js", ".php", ".rss", ".xhtml"
|
|
34
|
-
],
|
|
35
|
-
pdf: [
|
|
36
|
-
".pdf"
|
|
37
|
-
],
|
|
38
|
-
config: [
|
|
39
|
-
".apk", ".app", ".bat", ".cgi", ".com", ".exe", ".gadget", ".jar", ".wsf"
|
|
40
|
-
],
|
|
41
|
-
zip: [
|
|
42
|
-
".7z", ".cbr", ".gz", ".sitx", ".arj", ".deb", ".pkg", ".rar", ".rpm", ".tar.gz", ".z", ".zip", ".zipx"
|
|
43
|
-
],
|
|
44
|
-
discImage: [
|
|
45
|
-
".dmg", ".iso", ".toast", ".vcd", ".bin", ".cue", ".mdf"
|
|
46
|
-
]
|
|
47
|
-
};
|
|
@@ -1,6 +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
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,172 +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
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
var types_1 = require("../types");
|
|
8
|
-
/**
|
|
9
|
-
* @hidden
|
|
10
|
-
*/
|
|
11
|
-
var FileMap = /** @class */ (function () {
|
|
12
|
-
function FileMap() {
|
|
13
|
-
this._files = {};
|
|
14
|
-
}
|
|
15
|
-
FileMap.prototype.add = function (file) {
|
|
16
|
-
var uid = file.uid;
|
|
17
|
-
if (this.has(uid)) {
|
|
18
|
-
if (file.validationErrors && file.validationErrors.length > 0) {
|
|
19
|
-
this._files[uid].unshift(file);
|
|
20
|
-
}
|
|
21
|
-
else {
|
|
22
|
-
this._files[uid].push(file);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
26
|
-
this._files[uid] = [file];
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
FileMap.prototype.remove = function (uid) {
|
|
30
|
-
if (this.has(uid)) {
|
|
31
|
-
this._files[uid] = null;
|
|
32
|
-
delete this._files[uid];
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
FileMap.prototype.clear = function () {
|
|
36
|
-
var allFiles = this._files;
|
|
37
|
-
for (var uid in allFiles) {
|
|
38
|
-
if (allFiles.hasOwnProperty(uid)) {
|
|
39
|
-
for (var _i = 0, _a = allFiles[uid]; _i < _a.length; _i++) {
|
|
40
|
-
var file = _a[_i];
|
|
41
|
-
if (file.httpSubscription) {
|
|
42
|
-
file.httpSubscription.unsubscribe();
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
allFiles[uid] = null;
|
|
46
|
-
delete allFiles[uid];
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
FileMap.prototype.has = function (uid) {
|
|
51
|
-
return uid in this._files;
|
|
52
|
-
};
|
|
53
|
-
FileMap.prototype.get = function (uid) {
|
|
54
|
-
return this._files[uid];
|
|
55
|
-
};
|
|
56
|
-
FileMap.prototype.setFilesState = function (files, state) {
|
|
57
|
-
for (var _i = 0, files_1 = files; _i < files_1.length; _i++) {
|
|
58
|
-
var file = files_1[_i];
|
|
59
|
-
this.setFilesStateByUid(file.uid, state);
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
FileMap.prototype.setFilesStateByUid = function (uid, state) {
|
|
63
|
-
this.get(uid).forEach(function (f) {
|
|
64
|
-
f.state = state;
|
|
65
|
-
});
|
|
66
|
-
};
|
|
67
|
-
Object.defineProperty(FileMap.prototype, "count", {
|
|
68
|
-
get: function () {
|
|
69
|
-
return Object.getOwnPropertyNames(this._files).length;
|
|
70
|
-
},
|
|
71
|
-
enumerable: true,
|
|
72
|
-
configurable: true
|
|
73
|
-
});
|
|
74
|
-
Object.defineProperty(FileMap.prototype, "files", {
|
|
75
|
-
get: function () {
|
|
76
|
-
var initial = this._files;
|
|
77
|
-
var transformed = [];
|
|
78
|
-
for (var uid in initial) {
|
|
79
|
-
if (initial.hasOwnProperty(uid)) {
|
|
80
|
-
transformed.push(initial[uid]);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
return transformed;
|
|
84
|
-
},
|
|
85
|
-
enumerable: true,
|
|
86
|
-
configurable: true
|
|
87
|
-
});
|
|
88
|
-
Object.defineProperty(FileMap.prototype, "filesFlat", {
|
|
89
|
-
get: function () {
|
|
90
|
-
var initial = this._files;
|
|
91
|
-
var transformed = [];
|
|
92
|
-
for (var uid in initial) {
|
|
93
|
-
if (initial.hasOwnProperty(uid)) {
|
|
94
|
-
var current = initial[uid];
|
|
95
|
-
current.forEach(function (file) {
|
|
96
|
-
transformed.push(file);
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
return transformed;
|
|
101
|
-
},
|
|
102
|
-
enumerable: true,
|
|
103
|
-
configurable: true
|
|
104
|
-
});
|
|
105
|
-
Object.defineProperty(FileMap.prototype, "filesToUpload", {
|
|
106
|
-
get: function () {
|
|
107
|
-
var files = this._files;
|
|
108
|
-
var notUploaded = [];
|
|
109
|
-
for (var uid in files) {
|
|
110
|
-
if (files.hasOwnProperty(uid)) {
|
|
111
|
-
var currentFiles = files[uid];
|
|
112
|
-
var currentFilesValid = true;
|
|
113
|
-
for (var _i = 0, currentFiles_1 = currentFiles; _i < currentFiles_1.length; _i++) {
|
|
114
|
-
var file = currentFiles_1[_i];
|
|
115
|
-
if (file.state !== types_1.FileState.Selected || (file.validationErrors && file.validationErrors.length > 0)) {
|
|
116
|
-
currentFilesValid = false;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
if (currentFilesValid) {
|
|
120
|
-
notUploaded.push(currentFiles);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
return notUploaded;
|
|
125
|
-
},
|
|
126
|
-
enumerable: true,
|
|
127
|
-
configurable: true
|
|
128
|
-
});
|
|
129
|
-
Object.defineProperty(FileMap.prototype, "firstFileToUpload", {
|
|
130
|
-
get: function () {
|
|
131
|
-
var files = this._files;
|
|
132
|
-
for (var uid in files) {
|
|
133
|
-
if (files.hasOwnProperty(uid)) {
|
|
134
|
-
var currentFiles = files[uid];
|
|
135
|
-
var currentFilesValid = true;
|
|
136
|
-
for (var _i = 0, currentFiles_2 = currentFiles; _i < currentFiles_2.length; _i++) {
|
|
137
|
-
var file = currentFiles_2[_i];
|
|
138
|
-
if (file.state !== types_1.FileState.Selected || (file.validationErrors && file.validationErrors.length > 0)) {
|
|
139
|
-
currentFilesValid = false;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
if (currentFilesValid) {
|
|
143
|
-
return currentFiles;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
return null;
|
|
148
|
-
},
|
|
149
|
-
enumerable: true,
|
|
150
|
-
configurable: true
|
|
151
|
-
});
|
|
152
|
-
FileMap.prototype.getFilesWithState = function (state) {
|
|
153
|
-
return this.filesFlat.filter(function (file) { return file.state === state; });
|
|
154
|
-
};
|
|
155
|
-
FileMap.prototype.hasFileWithState = function (fileStates) {
|
|
156
|
-
var files = this._files;
|
|
157
|
-
for (var uid in files) {
|
|
158
|
-
if (files.hasOwnProperty(uid)) {
|
|
159
|
-
var currentFiles = files[uid];
|
|
160
|
-
for (var _i = 0, currentFiles_3 = currentFiles; _i < currentFiles_3.length; _i++) {
|
|
161
|
-
var file = currentFiles_3[_i];
|
|
162
|
-
if (fileStates.indexOf(file.state) >= 0) {
|
|
163
|
-
return true;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
return false;
|
|
169
|
-
};
|
|
170
|
-
return FileMap;
|
|
171
|
-
}());
|
|
172
|
-
exports.FileMap = FileMap;
|