@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,40 +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, ViewContainerRef, Input } from '@angular/core';
|
|
7
|
-
/**
|
|
8
|
-
* @hidden
|
|
9
|
-
*/
|
|
10
|
-
var TemplateContextDirective = /** @class */ (function () {
|
|
11
|
-
function TemplateContextDirective(viewContainerRef) {
|
|
12
|
-
this.viewContainerRef = viewContainerRef;
|
|
13
|
-
}
|
|
14
|
-
Object.defineProperty(TemplateContextDirective.prototype, "templateContext", {
|
|
15
|
-
set: function (context) {
|
|
16
|
-
if (this.insertedViewRef) {
|
|
17
|
-
this.viewContainerRef.remove(this.viewContainerRef.indexOf(this.insertedViewRef));
|
|
18
|
-
this.insertedViewRef = undefined;
|
|
19
|
-
}
|
|
20
|
-
if (context.templateRef) {
|
|
21
|
-
this.insertedViewRef = this.viewContainerRef.createEmbeddedView(context.templateRef, context);
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
enumerable: true,
|
|
25
|
-
configurable: true
|
|
26
|
-
});
|
|
27
|
-
tslib_1.__decorate([
|
|
28
|
-
Input(),
|
|
29
|
-
tslib_1.__metadata("design:type", Object),
|
|
30
|
-
tslib_1.__metadata("design:paramtypes", [Object])
|
|
31
|
-
], TemplateContextDirective.prototype, "templateContext", null);
|
|
32
|
-
TemplateContextDirective = tslib_1.__decorate([
|
|
33
|
-
Directive({
|
|
34
|
-
selector: '[templateContext]' // tslint:disable-line:directive-selector
|
|
35
|
-
}),
|
|
36
|
-
tslib_1.__metadata("design:paramtypes", [ViewContainerRef])
|
|
37
|
-
], TemplateContextDirective);
|
|
38
|
-
return TemplateContextDirective;
|
|
39
|
-
}());
|
|
40
|
-
export { TemplateContextDirective };
|
|
@@ -1,4 +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
|
-
*-------------------------------------------------------------------------------------------*/
|
|
@@ -1,36 +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
|
-
/**
|
|
6
|
-
* @hidden
|
|
7
|
-
*/
|
|
8
|
-
var ChunkMap = /** @class */ (function () {
|
|
9
|
-
function ChunkMap() {
|
|
10
|
-
this._files = {};
|
|
11
|
-
}
|
|
12
|
-
ChunkMap.prototype.add = function (uid, totalChunks) {
|
|
13
|
-
var initialChunkInfo = {
|
|
14
|
-
index: 0,
|
|
15
|
-
position: 0,
|
|
16
|
-
retries: 0,
|
|
17
|
-
totalChunks: totalChunks
|
|
18
|
-
};
|
|
19
|
-
this._files[uid] = initialChunkInfo;
|
|
20
|
-
return initialChunkInfo;
|
|
21
|
-
};
|
|
22
|
-
ChunkMap.prototype.remove = function (uid) {
|
|
23
|
-
if (this.has(uid)) {
|
|
24
|
-
this._files[uid] = null;
|
|
25
|
-
delete this._files[uid];
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
ChunkMap.prototype.has = function (uid) {
|
|
29
|
-
return uid in this._files;
|
|
30
|
-
};
|
|
31
|
-
ChunkMap.prototype.get = function (uid) {
|
|
32
|
-
return this._files[uid];
|
|
33
|
-
};
|
|
34
|
-
return ChunkMap;
|
|
35
|
-
}());
|
|
36
|
-
export { ChunkMap };
|
|
@@ -1,45 +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
|
-
var ɵ0 = [
|
|
6
|
-
".xlr", ".xls", ".xlsx"
|
|
7
|
-
];
|
|
8
|
-
/**
|
|
9
|
-
* @hidden
|
|
10
|
-
*/
|
|
11
|
-
export var fileGroupMap = {
|
|
12
|
-
audio: [
|
|
13
|
-
".aif", ".iff", ".m3u", ".m4a", ".mid", ".mp3", ".mpa", ".wav", ".wma", ".ogg", ".wav", ".wma", ".wpl"
|
|
14
|
-
],
|
|
15
|
-
video: [
|
|
16
|
-
".3g2", ".3gp", ".avi", ".asf", ".flv", ".m4u", ".rm", ".h264", ".m4v", ".mkv", ".mov", ".mp4", ".mpg", ".rm", ".swf", ".vob", ".wmv"
|
|
17
|
-
],
|
|
18
|
-
image: [
|
|
19
|
-
".ai", ".dds", ".heic", ".jpe", "jfif", ".jif", ".jp2", ".jps", ".eps", ".bmp", ".gif", ".jpeg", ".jpg", ".png", ".ps", ".psd", ".svg", ".svgz", ".tif", ".tiff"
|
|
20
|
-
],
|
|
21
|
-
txt: [
|
|
22
|
-
".doc", ".docx", ".log", ".pages", ".tex", ".wpd", ".wps", ".odt", ".rtf", ".text", ".txt", ".wks"
|
|
23
|
-
],
|
|
24
|
-
presentation: [
|
|
25
|
-
".key", ".odp", ".pps", ".ppt", ".pptx"
|
|
26
|
-
],
|
|
27
|
-
data: ɵ0,
|
|
28
|
-
programming: [
|
|
29
|
-
".tmp", ".bak", ".msi", ".cab", ".cpl", ".cur", ".dll", ".dmp", ".drv", ".icns", ".ico", ".link", ".sys", ".cfg",
|
|
30
|
-
".ini", ".asp", ".aspx", ".cer", ".csr", ".css", ".dcr", ".htm", ".html", ".js", ".php", ".rss", ".xhtml"
|
|
31
|
-
],
|
|
32
|
-
pdf: [
|
|
33
|
-
".pdf"
|
|
34
|
-
],
|
|
35
|
-
config: [
|
|
36
|
-
".apk", ".app", ".bat", ".cgi", ".com", ".exe", ".gadget", ".jar", ".wsf"
|
|
37
|
-
],
|
|
38
|
-
zip: [
|
|
39
|
-
".7z", ".cbr", ".gz", ".sitx", ".arj", ".deb", ".pkg", ".rar", ".rpm", ".tar.gz", ".z", ".zip", ".zipx"
|
|
40
|
-
],
|
|
41
|
-
discImage: [
|
|
42
|
-
".dmg", ".iso", ".toast", ".vcd", ".bin", ".cue", ".mdf"
|
|
43
|
-
]
|
|
44
|
-
};
|
|
45
|
-
export { ɵ0 };
|
|
@@ -1,170 +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 { FileState } from '../types';
|
|
6
|
-
/**
|
|
7
|
-
* @hidden
|
|
8
|
-
*/
|
|
9
|
-
var FileMap = /** @class */ (function () {
|
|
10
|
-
function FileMap() {
|
|
11
|
-
this._files = {};
|
|
12
|
-
}
|
|
13
|
-
FileMap.prototype.add = function (file) {
|
|
14
|
-
var uid = file.uid;
|
|
15
|
-
if (this.has(uid)) {
|
|
16
|
-
if (file.validationErrors && file.validationErrors.length > 0) {
|
|
17
|
-
this._files[uid].unshift(file);
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
this._files[uid].push(file);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
else {
|
|
24
|
-
this._files[uid] = [file];
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
FileMap.prototype.remove = function (uid) {
|
|
28
|
-
if (this.has(uid)) {
|
|
29
|
-
this._files[uid] = null;
|
|
30
|
-
delete this._files[uid];
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
FileMap.prototype.clear = function () {
|
|
34
|
-
var allFiles = this._files;
|
|
35
|
-
for (var uid in allFiles) {
|
|
36
|
-
if (allFiles.hasOwnProperty(uid)) {
|
|
37
|
-
for (var _i = 0, _a = allFiles[uid]; _i < _a.length; _i++) {
|
|
38
|
-
var file = _a[_i];
|
|
39
|
-
if (file.httpSubscription) {
|
|
40
|
-
file.httpSubscription.unsubscribe();
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
allFiles[uid] = null;
|
|
44
|
-
delete allFiles[uid];
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
FileMap.prototype.has = function (uid) {
|
|
49
|
-
return uid in this._files;
|
|
50
|
-
};
|
|
51
|
-
FileMap.prototype.get = function (uid) {
|
|
52
|
-
return this._files[uid];
|
|
53
|
-
};
|
|
54
|
-
FileMap.prototype.setFilesState = function (files, state) {
|
|
55
|
-
for (var _i = 0, files_1 = files; _i < files_1.length; _i++) {
|
|
56
|
-
var file = files_1[_i];
|
|
57
|
-
this.setFilesStateByUid(file.uid, state);
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
FileMap.prototype.setFilesStateByUid = function (uid, state) {
|
|
61
|
-
this.get(uid).forEach(function (f) {
|
|
62
|
-
f.state = state;
|
|
63
|
-
});
|
|
64
|
-
};
|
|
65
|
-
Object.defineProperty(FileMap.prototype, "count", {
|
|
66
|
-
get: function () {
|
|
67
|
-
return Object.getOwnPropertyNames(this._files).length;
|
|
68
|
-
},
|
|
69
|
-
enumerable: true,
|
|
70
|
-
configurable: true
|
|
71
|
-
});
|
|
72
|
-
Object.defineProperty(FileMap.prototype, "files", {
|
|
73
|
-
get: function () {
|
|
74
|
-
var initial = this._files;
|
|
75
|
-
var transformed = [];
|
|
76
|
-
for (var uid in initial) {
|
|
77
|
-
if (initial.hasOwnProperty(uid)) {
|
|
78
|
-
transformed.push(initial[uid]);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
return transformed;
|
|
82
|
-
},
|
|
83
|
-
enumerable: true,
|
|
84
|
-
configurable: true
|
|
85
|
-
});
|
|
86
|
-
Object.defineProperty(FileMap.prototype, "filesFlat", {
|
|
87
|
-
get: function () {
|
|
88
|
-
var initial = this._files;
|
|
89
|
-
var transformed = [];
|
|
90
|
-
for (var uid in initial) {
|
|
91
|
-
if (initial.hasOwnProperty(uid)) {
|
|
92
|
-
var current = initial[uid];
|
|
93
|
-
current.forEach(function (file) {
|
|
94
|
-
transformed.push(file);
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
return transformed;
|
|
99
|
-
},
|
|
100
|
-
enumerable: true,
|
|
101
|
-
configurable: true
|
|
102
|
-
});
|
|
103
|
-
Object.defineProperty(FileMap.prototype, "filesToUpload", {
|
|
104
|
-
get: function () {
|
|
105
|
-
var files = this._files;
|
|
106
|
-
var notUploaded = [];
|
|
107
|
-
for (var uid in files) {
|
|
108
|
-
if (files.hasOwnProperty(uid)) {
|
|
109
|
-
var currentFiles = files[uid];
|
|
110
|
-
var currentFilesValid = true;
|
|
111
|
-
for (var _i = 0, currentFiles_1 = currentFiles; _i < currentFiles_1.length; _i++) {
|
|
112
|
-
var file = currentFiles_1[_i];
|
|
113
|
-
if (file.state !== FileState.Selected || (file.validationErrors && file.validationErrors.length > 0)) {
|
|
114
|
-
currentFilesValid = false;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
if (currentFilesValid) {
|
|
118
|
-
notUploaded.push(currentFiles);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
return notUploaded;
|
|
123
|
-
},
|
|
124
|
-
enumerable: true,
|
|
125
|
-
configurable: true
|
|
126
|
-
});
|
|
127
|
-
Object.defineProperty(FileMap.prototype, "firstFileToUpload", {
|
|
128
|
-
get: function () {
|
|
129
|
-
var files = this._files;
|
|
130
|
-
for (var uid in files) {
|
|
131
|
-
if (files.hasOwnProperty(uid)) {
|
|
132
|
-
var currentFiles = files[uid];
|
|
133
|
-
var currentFilesValid = true;
|
|
134
|
-
for (var _i = 0, currentFiles_2 = currentFiles; _i < currentFiles_2.length; _i++) {
|
|
135
|
-
var file = currentFiles_2[_i];
|
|
136
|
-
if (file.state !== FileState.Selected || (file.validationErrors && file.validationErrors.length > 0)) {
|
|
137
|
-
currentFilesValid = false;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
if (currentFilesValid) {
|
|
141
|
-
return currentFiles;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
return null;
|
|
146
|
-
},
|
|
147
|
-
enumerable: true,
|
|
148
|
-
configurable: true
|
|
149
|
-
});
|
|
150
|
-
FileMap.prototype.getFilesWithState = function (state) {
|
|
151
|
-
return this.filesFlat.filter(function (file) { return file.state === state; });
|
|
152
|
-
};
|
|
153
|
-
FileMap.prototype.hasFileWithState = function (fileStates) {
|
|
154
|
-
var files = this._files;
|
|
155
|
-
for (var uid in files) {
|
|
156
|
-
if (files.hasOwnProperty(uid)) {
|
|
157
|
-
var currentFiles = files[uid];
|
|
158
|
-
for (var _i = 0, currentFiles_3 = currentFiles; _i < currentFiles_3.length; _i++) {
|
|
159
|
-
var file = currentFiles_3[_i];
|
|
160
|
-
if (fileStates.indexOf(file.state) >= 0) {
|
|
161
|
-
return true;
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
return false;
|
|
167
|
-
};
|
|
168
|
-
return FileMap;
|
|
169
|
-
}());
|
|
170
|
-
export { FileMap };
|