@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,484 +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, forwardRef, Renderer2, ViewChild, ElementRef, Output, EventEmitter, HostListener, NgZone, ContentChild, ChangeDetectorRef } from "@angular/core";
|
|
7
|
-
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
8
|
-
import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
9
|
-
import { KendoInput, guid, Keys, isDocumentAvailable } from '@progress/kendo-angular-common';
|
|
10
|
-
import { fromEvent, merge } from 'rxjs';
|
|
11
|
-
import { filter } from 'rxjs/operators';
|
|
12
|
-
import { validatePackage } from '@progress/kendo-licensing';
|
|
13
|
-
import { packageMetadata } from './package-metadata';
|
|
14
|
-
import { UploadService } from './upload.service';
|
|
15
|
-
import { NavigationService } from './navigation.service';
|
|
16
|
-
import { UPLOAD_CLASSES, hasClasses, isFocusable, IGNORE_TARGET_CLASSES, validateInitialFileSelectFile } from './common/util';
|
|
17
|
-
import { FileTemplateDirective } from './templates/file-template.directive';
|
|
18
|
-
import { FileState } from './types/file-state';
|
|
19
|
-
import { DropZoneService } from './dropzone.service';
|
|
20
|
-
import { FileInfoTemplateDirective } from './templates/file-info-template.directive';
|
|
21
|
-
/**
|
|
22
|
-
* @hidden
|
|
23
|
-
*/
|
|
24
|
-
export var FILESELECT_VALUE_ACCESSOR = {
|
|
25
|
-
multi: true,
|
|
26
|
-
provide: NG_VALUE_ACCESSOR,
|
|
27
|
-
useExisting: forwardRef(function () { return FileSelectComponent; }) // tslint:disable-line:no-forward-ref
|
|
28
|
-
};
|
|
29
|
-
var FileSelectComponent = /** @class */ (function () {
|
|
30
|
-
function FileSelectComponent(uploadService, localization, navigation, dropZoneService, ngZone, renderer, cdr, wrapper) {
|
|
31
|
-
var _this = this;
|
|
32
|
-
this.uploadService = uploadService;
|
|
33
|
-
this.localization = localization;
|
|
34
|
-
this.navigation = navigation;
|
|
35
|
-
this.dropZoneService = dropZoneService;
|
|
36
|
-
this.ngZone = ngZone;
|
|
37
|
-
this.renderer = renderer;
|
|
38
|
-
this.cdr = cdr;
|
|
39
|
-
/**
|
|
40
|
-
* Disables the FileSelect.
|
|
41
|
-
* The default value is `false`.
|
|
42
|
-
*/
|
|
43
|
-
this.disabled = false;
|
|
44
|
-
/**
|
|
45
|
-
* Enables the selection of multiple files
|
|
46
|
-
* ([see example]({% slug fileprocessing_upload %}#toc-upload-of-sinlge-or-multiple-files)).
|
|
47
|
-
* If set to `false`, only one file can be selected at a time.
|
|
48
|
-
*/
|
|
49
|
-
this.multiple = true;
|
|
50
|
-
/**
|
|
51
|
-
* Toggles the visibility of the file list.
|
|
52
|
-
*/
|
|
53
|
-
this.showFileList = true;
|
|
54
|
-
/**
|
|
55
|
-
* Specifies the [`tabindex`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the FileSelect.
|
|
56
|
-
*/
|
|
57
|
-
this.tabindex = 0;
|
|
58
|
-
/**
|
|
59
|
-
* @hidden
|
|
60
|
-
*/
|
|
61
|
-
this.focusableId = "k-" + guid();
|
|
62
|
-
/**
|
|
63
|
-
* Fires when the user navigates outside the component.
|
|
64
|
-
*/
|
|
65
|
-
this.onBlur = new EventEmitter();
|
|
66
|
-
/**
|
|
67
|
-
* Fires when the component is focused.
|
|
68
|
-
*/
|
|
69
|
-
this.onFocus = new EventEmitter();
|
|
70
|
-
/**
|
|
71
|
-
* Fires when files are selected. If prevented, the selected files will not be added to the list.
|
|
72
|
-
*/
|
|
73
|
-
this.select = new EventEmitter();
|
|
74
|
-
/**
|
|
75
|
-
* Fires when a file is about to be removed. If prevented, the file will remain in the list.
|
|
76
|
-
*/
|
|
77
|
-
this.remove = new EventEmitter();
|
|
78
|
-
/**
|
|
79
|
-
* Fires when the value of the component has changed as a result of a successful `select` or `remove` operation.
|
|
80
|
-
*/
|
|
81
|
-
this.valueChange = new EventEmitter();
|
|
82
|
-
this.hostDefaultClasses = true;
|
|
83
|
-
/**
|
|
84
|
-
* @hidden
|
|
85
|
-
*/
|
|
86
|
-
this._restrictions = {
|
|
87
|
-
allowedExtensions: [],
|
|
88
|
-
maxFileSize: 0,
|
|
89
|
-
minFileSize: 0
|
|
90
|
-
};
|
|
91
|
-
this.onTouchedCallback = function (_) { };
|
|
92
|
-
this.onChangeCallback = function (_) { };
|
|
93
|
-
validatePackage(packageMetadata);
|
|
94
|
-
this.wrapper = wrapper.nativeElement;
|
|
95
|
-
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
96
|
-
this.navigation.computeKeys(this.direction);
|
|
97
|
-
this.fileList = this.uploadService.files;
|
|
98
|
-
this.localizationChangeSubscription = localization.changes.subscribe(function (_a) {
|
|
99
|
-
var rtl = _a.rtl;
|
|
100
|
-
_this.direction = rtl ? 'rtl' : 'ltr';
|
|
101
|
-
_this.navigation.computeKeys(_this.direction);
|
|
102
|
-
});
|
|
103
|
-
this.subscribeBlur();
|
|
104
|
-
this.subscribeFocus();
|
|
105
|
-
this.attachEventHandlers();
|
|
106
|
-
this.setDefaultSettings();
|
|
107
|
-
}
|
|
108
|
-
FileSelectComponent_1 = FileSelectComponent;
|
|
109
|
-
Object.defineProperty(FileSelectComponent.prototype, "name", {
|
|
110
|
-
get: function () {
|
|
111
|
-
return this.uploadService.async.saveField;
|
|
112
|
-
},
|
|
113
|
-
/**
|
|
114
|
-
* Sets the `name` attribute of the `input` element of the FileSelect.
|
|
115
|
-
*/
|
|
116
|
-
set: function (name) {
|
|
117
|
-
this.uploadService.async.saveField = name;
|
|
118
|
-
},
|
|
119
|
-
enumerable: true,
|
|
120
|
-
configurable: true
|
|
121
|
-
});
|
|
122
|
-
Object.defineProperty(FileSelectComponent.prototype, "restrictions", {
|
|
123
|
-
get: function () {
|
|
124
|
-
return this._restrictions;
|
|
125
|
-
},
|
|
126
|
-
/**
|
|
127
|
-
* Sets the restrictions for selected files.
|
|
128
|
-
*/
|
|
129
|
-
set: function (restrictions) {
|
|
130
|
-
var parsedRestrictions = Object.assign({}, this._restrictions, restrictions);
|
|
131
|
-
this._restrictions = parsedRestrictions;
|
|
132
|
-
},
|
|
133
|
-
enumerable: true,
|
|
134
|
-
configurable: true
|
|
135
|
-
});
|
|
136
|
-
Object.defineProperty(FileSelectComponent.prototype, "hostDisabledClass", {
|
|
137
|
-
get: function () {
|
|
138
|
-
return this.disabled;
|
|
139
|
-
},
|
|
140
|
-
enumerable: true,
|
|
141
|
-
configurable: true
|
|
142
|
-
});
|
|
143
|
-
Object.defineProperty(FileSelectComponent.prototype, "dir", {
|
|
144
|
-
get: function () {
|
|
145
|
-
return this.direction;
|
|
146
|
-
},
|
|
147
|
-
enumerable: true,
|
|
148
|
-
configurable: true
|
|
149
|
-
});
|
|
150
|
-
FileSelectComponent.prototype.ngOnInit = function () {
|
|
151
|
-
this.renderer.removeAttribute(this.wrapper, "tabindex");
|
|
152
|
-
if (this.zoneId) {
|
|
153
|
-
this.dropZoneService.addComponent(this, this.zoneId);
|
|
154
|
-
}
|
|
155
|
-
};
|
|
156
|
-
/**
|
|
157
|
-
* @hidden
|
|
158
|
-
*/
|
|
159
|
-
FileSelectComponent.prototype.textFor = function (key) {
|
|
160
|
-
return this.localization.get(key);
|
|
161
|
-
};
|
|
162
|
-
/**
|
|
163
|
-
* Focuses the underlying input element.
|
|
164
|
-
*/
|
|
165
|
-
FileSelectComponent.prototype.focus = function () {
|
|
166
|
-
var _this = this;
|
|
167
|
-
setTimeout(function () {
|
|
168
|
-
_this.fileSelectButton.nativeElement.focus();
|
|
169
|
-
});
|
|
170
|
-
};
|
|
171
|
-
FileSelectComponent.prototype.ngOnDestroy = function () {
|
|
172
|
-
this.fileList.clear();
|
|
173
|
-
if (this.blurSubscription) {
|
|
174
|
-
this.blurSubscription.unsubscribe();
|
|
175
|
-
}
|
|
176
|
-
if (this.wrapperFocusSubscription) {
|
|
177
|
-
this.wrapperFocusSubscription.unsubscribe();
|
|
178
|
-
}
|
|
179
|
-
if (this.selectButtonFocusSubscription) {
|
|
180
|
-
this.selectButtonFocusSubscription.unsubscribe();
|
|
181
|
-
}
|
|
182
|
-
if (this.localizationChangeSubscription) {
|
|
183
|
-
this.localizationChangeSubscription.unsubscribe();
|
|
184
|
-
}
|
|
185
|
-
if (this.subs) {
|
|
186
|
-
this.subs.unsubscribe();
|
|
187
|
-
}
|
|
188
|
-
};
|
|
189
|
-
/**
|
|
190
|
-
* @hidden
|
|
191
|
-
*/
|
|
192
|
-
FileSelectComponent.prototype.handleKeydown = function (event) {
|
|
193
|
-
if (this.disabled) {
|
|
194
|
-
return;
|
|
195
|
-
}
|
|
196
|
-
if ((event.keyCode === Keys.Enter || event.keyCode === Keys.Space) &&
|
|
197
|
-
event.target === this.fileSelectButton.nativeElement) {
|
|
198
|
-
event.preventDefault();
|
|
199
|
-
this.fileSelect.nativeElement.click();
|
|
200
|
-
return;
|
|
201
|
-
}
|
|
202
|
-
if (hasClasses(event.target, UPLOAD_CLASSES) ||
|
|
203
|
-
(!isFocusable(event.target) && !hasClasses(event.target, IGNORE_TARGET_CLASSES))) {
|
|
204
|
-
this.navigation.process(event);
|
|
205
|
-
}
|
|
206
|
-
};
|
|
207
|
-
/**
|
|
208
|
-
* @hidden
|
|
209
|
-
*/
|
|
210
|
-
FileSelectComponent.prototype.writeValue = function (newValue) {
|
|
211
|
-
var isValid = true;
|
|
212
|
-
if (newValue instanceof Array) {
|
|
213
|
-
newValue.forEach(function (file) {
|
|
214
|
-
if (!validateInitialFileSelectFile(file)) {
|
|
215
|
-
isValid = false;
|
|
216
|
-
}
|
|
217
|
-
});
|
|
218
|
-
if (isValid) {
|
|
219
|
-
this.uploadService.addInitialFileSelectFiles(newValue);
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
if (newValue === null) {
|
|
223
|
-
this.fileList.clear();
|
|
224
|
-
}
|
|
225
|
-
this.cdr.markForCheck();
|
|
226
|
-
};
|
|
227
|
-
/**
|
|
228
|
-
* @hidden
|
|
229
|
-
*/
|
|
230
|
-
FileSelectComponent.prototype.registerOnChange = function (fn) {
|
|
231
|
-
this.onChangeCallback = fn;
|
|
232
|
-
};
|
|
233
|
-
/**
|
|
234
|
-
* @hidden
|
|
235
|
-
*/
|
|
236
|
-
FileSelectComponent.prototype.registerOnTouched = function (fn) {
|
|
237
|
-
this.onTouchedCallback = fn;
|
|
238
|
-
};
|
|
239
|
-
/**
|
|
240
|
-
* @hidden
|
|
241
|
-
*/
|
|
242
|
-
FileSelectComponent.prototype.setDisabledState = function (isDisabled) {
|
|
243
|
-
this.disabled = isDisabled;
|
|
244
|
-
};
|
|
245
|
-
/**
|
|
246
|
-
* Removes specific file from the file list.
|
|
247
|
-
*/
|
|
248
|
-
FileSelectComponent.prototype.removeFileByUid = function (uid) {
|
|
249
|
-
this.uploadService.removeFiles(uid);
|
|
250
|
-
};
|
|
251
|
-
/**
|
|
252
|
-
* Visually clears all files from the UI.
|
|
253
|
-
*/
|
|
254
|
-
FileSelectComponent.prototype.clearFiles = function () {
|
|
255
|
-
this.uploadService.clearFiles();
|
|
256
|
-
};
|
|
257
|
-
/**
|
|
258
|
-
* @hidden
|
|
259
|
-
* Used to determine if the component is empty.
|
|
260
|
-
*/
|
|
261
|
-
FileSelectComponent.prototype.isEmpty = function () {
|
|
262
|
-
return false;
|
|
263
|
-
};
|
|
264
|
-
/**
|
|
265
|
-
* @hidden
|
|
266
|
-
* Used by the external dropzone to add files to the FileSelect
|
|
267
|
-
*/
|
|
268
|
-
FileSelectComponent.prototype.addFiles = function (files) {
|
|
269
|
-
this.uploadService.addFiles(files);
|
|
270
|
-
};
|
|
271
|
-
Object.defineProperty(FileSelectComponent.prototype, "selectButtonTabIndex", {
|
|
272
|
-
/**
|
|
273
|
-
* @hidden
|
|
274
|
-
*/
|
|
275
|
-
get: function () {
|
|
276
|
-
return this.disabled ? undefined : this.tabindex;
|
|
277
|
-
},
|
|
278
|
-
enumerable: true,
|
|
279
|
-
configurable: true
|
|
280
|
-
});
|
|
281
|
-
/**
|
|
282
|
-
* @hidden
|
|
283
|
-
*/
|
|
284
|
-
FileSelectComponent.prototype.onFileSelectButtonFocus = function (_event) {
|
|
285
|
-
this.renderer.addClass(this.fileSelectButton.nativeElement, 'k-focus');
|
|
286
|
-
if (!this.navigation.focused) {
|
|
287
|
-
this.navigation.focusedIndex = -1;
|
|
288
|
-
}
|
|
289
|
-
};
|
|
290
|
-
/**
|
|
291
|
-
* @hidden
|
|
292
|
-
*/
|
|
293
|
-
FileSelectComponent.prototype.onFileSelectButtonBlur = function (_event) {
|
|
294
|
-
this.renderer.removeClass(this.fileSelectButton.nativeElement, 'k-focus');
|
|
295
|
-
};
|
|
296
|
-
FileSelectComponent.prototype.subscribeBlur = function () {
|
|
297
|
-
var _this = this;
|
|
298
|
-
if (!isDocumentAvailable()) {
|
|
299
|
-
return;
|
|
300
|
-
}
|
|
301
|
-
this.ngZone.runOutsideAngular(function () {
|
|
302
|
-
_this.documentClick = fromEvent(document, 'click').pipe(filter(function (event) {
|
|
303
|
-
return !(_this.wrapper !== event.target && _this.wrapper.contains(event.target));
|
|
304
|
-
}));
|
|
305
|
-
_this.blurSubscription = merge(_this.documentClick, _this.navigation.onTab).subscribe(function () {
|
|
306
|
-
if (_this.navigation.focused) {
|
|
307
|
-
_this.ngZone.run(function () {
|
|
308
|
-
_this.navigation.focused = false;
|
|
309
|
-
_this.onTouchedCallback();
|
|
310
|
-
_this.onBlur.emit();
|
|
311
|
-
});
|
|
312
|
-
}
|
|
313
|
-
});
|
|
314
|
-
});
|
|
315
|
-
};
|
|
316
|
-
FileSelectComponent.prototype.subscribeFocus = function () {
|
|
317
|
-
var _this = this;
|
|
318
|
-
this.wrapperFocusSubscription = this.navigation.onWrapperFocus.subscribe(function () {
|
|
319
|
-
_this.onFocus.emit();
|
|
320
|
-
});
|
|
321
|
-
this.selectButtonFocusSubscription = this.navigation.onSelectButtonFocus.subscribe(function () {
|
|
322
|
-
_this.fileSelectButton.nativeElement.focus();
|
|
323
|
-
});
|
|
324
|
-
};
|
|
325
|
-
FileSelectComponent.prototype.attachEventHandlers = function () {
|
|
326
|
-
var _this = this;
|
|
327
|
-
this.subs = this.uploadService.changeEvent.subscribe(function (files) {
|
|
328
|
-
var model = [];
|
|
329
|
-
if (files !== null) {
|
|
330
|
-
files.forEach(function (file) {
|
|
331
|
-
if (file.state === FileState.Initial) {
|
|
332
|
-
model.push(file);
|
|
333
|
-
}
|
|
334
|
-
if (file.state === FileState.Selected && file.rawFile && !file.validationErrors) {
|
|
335
|
-
model.push(file.rawFile);
|
|
336
|
-
}
|
|
337
|
-
});
|
|
338
|
-
}
|
|
339
|
-
if (model.length === 0) {
|
|
340
|
-
model = null;
|
|
341
|
-
}
|
|
342
|
-
_this.onChangeCallback(model);
|
|
343
|
-
_this.valueChange.emit(model);
|
|
344
|
-
});
|
|
345
|
-
this.subs.add(this.uploadService.removeEvent.subscribe(function (args) {
|
|
346
|
-
_this.remove.emit(args);
|
|
347
|
-
}));
|
|
348
|
-
this.subs.add(this.uploadService.selectEvent.subscribe(function (args) {
|
|
349
|
-
_this.select.emit(args);
|
|
350
|
-
}));
|
|
351
|
-
};
|
|
352
|
-
FileSelectComponent.prototype.setDefaultSettings = function () {
|
|
353
|
-
this.uploadService.async.autoUpload = false;
|
|
354
|
-
this.uploadService.component = 'FileSelect';
|
|
355
|
-
};
|
|
356
|
-
var FileSelectComponent_1;
|
|
357
|
-
tslib_1.__decorate([
|
|
358
|
-
Input(),
|
|
359
|
-
tslib_1.__metadata("design:type", String)
|
|
360
|
-
], FileSelectComponent.prototype, "accept", void 0);
|
|
361
|
-
tslib_1.__decorate([
|
|
362
|
-
Input(),
|
|
363
|
-
tslib_1.__metadata("design:type", Boolean)
|
|
364
|
-
], FileSelectComponent.prototype, "disabled", void 0);
|
|
365
|
-
tslib_1.__decorate([
|
|
366
|
-
Input(),
|
|
367
|
-
tslib_1.__metadata("design:type", Boolean)
|
|
368
|
-
], FileSelectComponent.prototype, "multiple", void 0);
|
|
369
|
-
tslib_1.__decorate([
|
|
370
|
-
Input(),
|
|
371
|
-
tslib_1.__metadata("design:type", String),
|
|
372
|
-
tslib_1.__metadata("design:paramtypes", [String])
|
|
373
|
-
], FileSelectComponent.prototype, "name", null);
|
|
374
|
-
tslib_1.__decorate([
|
|
375
|
-
Input(),
|
|
376
|
-
tslib_1.__metadata("design:type", Boolean)
|
|
377
|
-
], FileSelectComponent.prototype, "showFileList", void 0);
|
|
378
|
-
tslib_1.__decorate([
|
|
379
|
-
Input(),
|
|
380
|
-
tslib_1.__metadata("design:type", Number)
|
|
381
|
-
], FileSelectComponent.prototype, "tabindex", void 0);
|
|
382
|
-
tslib_1.__decorate([
|
|
383
|
-
Input(),
|
|
384
|
-
tslib_1.__metadata("design:type", Object),
|
|
385
|
-
tslib_1.__metadata("design:paramtypes", [Object])
|
|
386
|
-
], FileSelectComponent.prototype, "restrictions", null);
|
|
387
|
-
tslib_1.__decorate([
|
|
388
|
-
Input(),
|
|
389
|
-
tslib_1.__metadata("design:type", String)
|
|
390
|
-
], FileSelectComponent.prototype, "zoneId", void 0);
|
|
391
|
-
tslib_1.__decorate([
|
|
392
|
-
Input(),
|
|
393
|
-
tslib_1.__metadata("design:type", String)
|
|
394
|
-
], FileSelectComponent.prototype, "focusableId", void 0);
|
|
395
|
-
tslib_1.__decorate([
|
|
396
|
-
ContentChild(FileTemplateDirective, { static: false }),
|
|
397
|
-
tslib_1.__metadata("design:type", FileTemplateDirective)
|
|
398
|
-
], FileSelectComponent.prototype, "fileTemplate", void 0);
|
|
399
|
-
tslib_1.__decorate([
|
|
400
|
-
ContentChild(FileInfoTemplateDirective, { static: false }),
|
|
401
|
-
tslib_1.__metadata("design:type", FileInfoTemplateDirective)
|
|
402
|
-
], FileSelectComponent.prototype, "fileInfoTemplate", void 0);
|
|
403
|
-
tslib_1.__decorate([
|
|
404
|
-
ViewChild('fileSelect', { static: true }),
|
|
405
|
-
tslib_1.__metadata("design:type", ElementRef)
|
|
406
|
-
], FileSelectComponent.prototype, "fileSelect", void 0);
|
|
407
|
-
tslib_1.__decorate([
|
|
408
|
-
ViewChild('fileSelectButton', { static: true }),
|
|
409
|
-
tslib_1.__metadata("design:type", ElementRef)
|
|
410
|
-
], FileSelectComponent.prototype, "fileSelectButton", void 0);
|
|
411
|
-
tslib_1.__decorate([
|
|
412
|
-
Output('blur'),
|
|
413
|
-
tslib_1.__metadata("design:type", EventEmitter)
|
|
414
|
-
], FileSelectComponent.prototype, "onBlur", void 0);
|
|
415
|
-
tslib_1.__decorate([
|
|
416
|
-
Output('focus'),
|
|
417
|
-
tslib_1.__metadata("design:type", EventEmitter)
|
|
418
|
-
], FileSelectComponent.prototype, "onFocus", void 0);
|
|
419
|
-
tslib_1.__decorate([
|
|
420
|
-
Output(),
|
|
421
|
-
tslib_1.__metadata("design:type", EventEmitter)
|
|
422
|
-
], FileSelectComponent.prototype, "select", void 0);
|
|
423
|
-
tslib_1.__decorate([
|
|
424
|
-
Output(),
|
|
425
|
-
tslib_1.__metadata("design:type", EventEmitter)
|
|
426
|
-
], FileSelectComponent.prototype, "remove", void 0);
|
|
427
|
-
tslib_1.__decorate([
|
|
428
|
-
Output(),
|
|
429
|
-
tslib_1.__metadata("design:type", EventEmitter)
|
|
430
|
-
], FileSelectComponent.prototype, "valueChange", void 0);
|
|
431
|
-
tslib_1.__decorate([
|
|
432
|
-
HostBinding('class.k-widget'),
|
|
433
|
-
HostBinding('class.k-upload'),
|
|
434
|
-
tslib_1.__metadata("design:type", Boolean)
|
|
435
|
-
], FileSelectComponent.prototype, "hostDefaultClasses", void 0);
|
|
436
|
-
tslib_1.__decorate([
|
|
437
|
-
HostBinding('class.k-disabled'),
|
|
438
|
-
tslib_1.__metadata("design:type", Boolean),
|
|
439
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
440
|
-
], FileSelectComponent.prototype, "hostDisabledClass", null);
|
|
441
|
-
tslib_1.__decorate([
|
|
442
|
-
HostBinding('attr.dir'),
|
|
443
|
-
tslib_1.__metadata("design:type", String),
|
|
444
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
445
|
-
], FileSelectComponent.prototype, "dir", null);
|
|
446
|
-
tslib_1.__decorate([
|
|
447
|
-
HostListener('keydown', ['$event']),
|
|
448
|
-
tslib_1.__metadata("design:type", Function),
|
|
449
|
-
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
450
|
-
tslib_1.__metadata("design:returntype", void 0)
|
|
451
|
-
], FileSelectComponent.prototype, "handleKeydown", null);
|
|
452
|
-
FileSelectComponent = FileSelectComponent_1 = tslib_1.__decorate([
|
|
453
|
-
Component({
|
|
454
|
-
exportAs: 'kendoFileSelect',
|
|
455
|
-
providers: [
|
|
456
|
-
LocalizationService,
|
|
457
|
-
NavigationService,
|
|
458
|
-
UploadService,
|
|
459
|
-
DropZoneService,
|
|
460
|
-
FILESELECT_VALUE_ACCESSOR,
|
|
461
|
-
{
|
|
462
|
-
provide: L10N_PREFIX,
|
|
463
|
-
useValue: 'kendo.fileselect'
|
|
464
|
-
},
|
|
465
|
-
{
|
|
466
|
-
provide: KendoInput,
|
|
467
|
-
useExisting: forwardRef(function () { return FileSelectComponent_1; })
|
|
468
|
-
}
|
|
469
|
-
],
|
|
470
|
-
selector: 'kendo-fileselect',
|
|
471
|
-
template: "\n <ng-container kendoFileSelectLocalizedMessages\n i18n-dropFilesHere=\"kendo.fileselect.dropFilesHere|The drop zone hint\"\n dropFilesHere=\"Drop files here to select\"\n\n i18n-invalidFileExtension=\"kendo.fileselect.invalidFileExtension|The text for the invalid allowed extensions restriction message\"\n invalidFileExtension=\"File type not allowed.\"\n\n i18n-invalidMaxFileSize=\"kendo.fileselect.invalidMaxFileSize|The text for the invalid max file size restriction message\"\n invalidMaxFileSize=\"File size too large.\"\n\n i18n-invalidMinFileSize=\"kendo.fileselect.invalidMinFileSize|The text for the invalid min file size restriction message\"\n invalidMinFileSize=\"File size too small.\"\n\n i18n-remove=\"kendo.fileselect.remove|The text for the Remove button\"\n remove=\"Remove\"\n\n i18n-select=\"kendo.fileselect.select|The text for the Select button\"\n select=\"Select files...\"\n >\n </ng-container>\n <div kendoFileSelectInternalDropZone\n [restrictions]=\"restrictions\"\n [multiple]=\"multiple\"\n [disabled]=\"disabled\">\n <div role=\"button\" #fileSelectButton\n [id]=\"focusableId\"\n [attr.aria-label]=\"textFor('select')\"\n [attr.tabindex]=\"selectButtonTabIndex\"\n (focus)=\"onFileSelectButtonFocus($event)\"\n (blur)=\"onFileSelectButtonBlur($event)\"\n class=\"k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-upload-button\">\n <input #fileSelect kendoFileSelect\n [attr.accept]=\"accept ? accept : null\"\n [dir]=\"direction\"\n [restrictions]=\"restrictions\"\n [multiple]=\"multiple\"\n [disabled]=\"disabled\" />\n <span>{{textFor('select')}}</span>\n </div>\n <div class=\"k-dropzone-hint\">{{textFor('dropFilesHere')}}</div>\n </div>\n <ul kendo-upload-file-list\n class=\"k-upload-files k-reset\"\n *ngIf=\"showFileList && fileList.count > 0\"\n [disabled]=\"disabled\"\n [fileList]=\"fileList.files\"\n [fileTemplate]=\"fileTemplate\"\n [fileInfoTemplate]=\"fileInfoTemplate\">\n </ul>\n "
|
|
472
|
-
}),
|
|
473
|
-
tslib_1.__metadata("design:paramtypes", [UploadService,
|
|
474
|
-
LocalizationService,
|
|
475
|
-
NavigationService,
|
|
476
|
-
DropZoneService,
|
|
477
|
-
NgZone,
|
|
478
|
-
Renderer2,
|
|
479
|
-
ChangeDetectorRef,
|
|
480
|
-
ElementRef])
|
|
481
|
-
], FileSelectComponent);
|
|
482
|
-
return FileSelectComponent;
|
|
483
|
-
}());
|
|
484
|
-
export { FileSelectComponent };
|
|
@@ -1,30 +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 { NgModule } from '@angular/core';
|
|
7
|
-
import { FileSelectComponent } from './fileselect.component';
|
|
8
|
-
import { SharedModule, PUBLIC_DIRECTIVES } from './shared.module';
|
|
9
|
-
var FILESELECT_DECLARATIONS = [
|
|
10
|
-
FileSelectComponent
|
|
11
|
-
];
|
|
12
|
-
/**
|
|
13
|
-
* Represents the [NgModule](https://angular.io/api/core/NgModule) definition for the FileSelect component.
|
|
14
|
-
*/
|
|
15
|
-
var FileSelectModule = /** @class */ (function () {
|
|
16
|
-
function FileSelectModule() {
|
|
17
|
-
}
|
|
18
|
-
FileSelectModule = tslib_1.__decorate([
|
|
19
|
-
NgModule({
|
|
20
|
-
declarations: [FILESELECT_DECLARATIONS],
|
|
21
|
-
exports: [
|
|
22
|
-
PUBLIC_DIRECTIVES,
|
|
23
|
-
FILESELECT_DECLARATIONS
|
|
24
|
-
],
|
|
25
|
-
imports: [SharedModule]
|
|
26
|
-
})
|
|
27
|
-
], FileSelectModule);
|
|
28
|
-
return FileSelectModule;
|
|
29
|
-
}());
|
|
30
|
-
export { FileSelectModule };
|
package/dist/es/index.js
DELETED
|
@@ -1,21 +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
|
-
* Generated bundle index. Do not edit.
|
|
7
|
-
*/
|
|
8
|
-
export * from './main';
|
|
9
|
-
export { DropZoneBase } from './dropzone-base';
|
|
10
|
-
export { DropZoneInternalDirective } from './dropzone-internal.directive';
|
|
11
|
-
export { DropZoneService } from './dropzone.service';
|
|
12
|
-
export { PreventableEvent } from './events/preventable-event';
|
|
13
|
-
export { FILESELECT_VALUE_ACCESSOR } from './fileselect.component';
|
|
14
|
-
export { LocalizedMessagesDirective } from './localization/localized-messages.directive';
|
|
15
|
-
export { Messages } from './localization/messages';
|
|
16
|
-
export { NavigationService } from './navigation.service';
|
|
17
|
-
export { FileListItemDirective } from './rendering/file-list-item';
|
|
18
|
-
export { FileListItemBase } from './rendering/file-list-item-base';
|
|
19
|
-
export { PUBLIC_DIRECTIVES, SHARED_DECLARATIONS, SharedModule } from './shared.module';
|
|
20
|
-
export { UPLOAD_VALUE_ACCESSOR } from './upload.component';
|
|
21
|
-
export { UploadService } from './upload.service';
|
|
@@ -1,53 +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, forwardRef } from '@angular/core';
|
|
7
|
-
import { Messages } from './messages';
|
|
8
|
-
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
9
|
-
/**
|
|
10
|
-
* Custom component messages override default component messages ([more information and example]({% slug globalization_upload %})).
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```html-no-run
|
|
14
|
-
* <kendo-fileselect>
|
|
15
|
-
* <kendo-fileselect-messages
|
|
16
|
-
* dropFilesHere="Drop your file here"
|
|
17
|
-
* select="Upload file">
|
|
18
|
-
* </kendo-fileselect-messages>
|
|
19
|
-
* </kendo-fileselect>
|
|
20
|
-
* ```
|
|
21
|
-
*/
|
|
22
|
-
var CustomMessagesComponent = /** @class */ (function (_super) {
|
|
23
|
-
tslib_1.__extends(CustomMessagesComponent, _super);
|
|
24
|
-
function CustomMessagesComponent(service) {
|
|
25
|
-
var _this = _super.call(this) || this;
|
|
26
|
-
_this.service = service;
|
|
27
|
-
return _this;
|
|
28
|
-
}
|
|
29
|
-
CustomMessagesComponent_1 = CustomMessagesComponent;
|
|
30
|
-
Object.defineProperty(CustomMessagesComponent.prototype, "override", {
|
|
31
|
-
get: function () {
|
|
32
|
-
return true;
|
|
33
|
-
},
|
|
34
|
-
enumerable: true,
|
|
35
|
-
configurable: true
|
|
36
|
-
});
|
|
37
|
-
var CustomMessagesComponent_1;
|
|
38
|
-
CustomMessagesComponent = CustomMessagesComponent_1 = tslib_1.__decorate([
|
|
39
|
-
Component({
|
|
40
|
-
providers: [
|
|
41
|
-
{
|
|
42
|
-
provide: Messages,
|
|
43
|
-
useExisting: forwardRef(function () { return CustomMessagesComponent_1; }) // tslint:disable-line:no-forward-ref
|
|
44
|
-
}
|
|
45
|
-
],
|
|
46
|
-
selector: 'kendo-upload-messages, kendo-fileselect-messages, kendo-uploaddropzone-messages',
|
|
47
|
-
template: ""
|
|
48
|
-
}),
|
|
49
|
-
tslib_1.__metadata("design:paramtypes", [LocalizationService])
|
|
50
|
-
], CustomMessagesComponent);
|
|
51
|
-
return CustomMessagesComponent;
|
|
52
|
-
}(Messages));
|
|
53
|
-
export { CustomMessagesComponent };
|
|
@@ -1,35 +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, forwardRef } from '@angular/core';
|
|
7
|
-
import { Messages } from './messages';
|
|
8
|
-
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
9
|
-
/**
|
|
10
|
-
* @hidden
|
|
11
|
-
*/
|
|
12
|
-
var LocalizedMessagesDirective = /** @class */ (function (_super) {
|
|
13
|
-
tslib_1.__extends(LocalizedMessagesDirective, _super);
|
|
14
|
-
function LocalizedMessagesDirective(service) {
|
|
15
|
-
var _this = _super.call(this) || this;
|
|
16
|
-
_this.service = service;
|
|
17
|
-
return _this;
|
|
18
|
-
}
|
|
19
|
-
LocalizedMessagesDirective_1 = LocalizedMessagesDirective;
|
|
20
|
-
var LocalizedMessagesDirective_1;
|
|
21
|
-
LocalizedMessagesDirective = LocalizedMessagesDirective_1 = tslib_1.__decorate([
|
|
22
|
-
Directive({
|
|
23
|
-
providers: [
|
|
24
|
-
{
|
|
25
|
-
provide: Messages,
|
|
26
|
-
useExisting: forwardRef(function () { return LocalizedMessagesDirective_1; }) // tslint:disable-line:no-forward-ref
|
|
27
|
-
}
|
|
28
|
-
],
|
|
29
|
-
selector: "\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n "
|
|
30
|
-
}),
|
|
31
|
-
tslib_1.__metadata("design:paramtypes", [LocalizationService])
|
|
32
|
-
], LocalizedMessagesDirective);
|
|
33
|
-
return LocalizedMessagesDirective;
|
|
34
|
-
}(Messages));
|
|
35
|
-
export { LocalizedMessagesDirective };
|