@progress/kendo-angular-upload 21.4.1-develop.1 → 22.0.0-develop.1
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/common/base.d.ts +1 -1
- package/dropzone-base.d.ts +1 -1
- package/fesm2022/progress-kendo-angular-upload.mjs +89 -89
- package/localization/messages.d.ts +1 -1
- package/package.json +13 -21
- package/rendering/file-list-item-base.d.ts +1 -1
- package/schematics/ngAdd/index.js +3 -3
- package/esm2022/common/action-buttons-layout.mjs +0 -5
- package/esm2022/common/base.mjs +0 -280
- package/esm2022/common/fileselect-settings.mjs +0 -5
- package/esm2022/common/util.mjs +0 -253
- package/esm2022/common/validation-util.mjs +0 -60
- package/esm2022/directives.mjs +0 -89
- package/esm2022/dropzone-base.mjs +0 -69
- package/esm2022/dropzone-external.directive.mjs +0 -111
- package/esm2022/dropzone-internal.directive.mjs +0 -109
- package/esm2022/dropzone.component.mjs +0 -169
- package/esm2022/dropzone.service.mjs +0 -37
- package/esm2022/events/cancel-event.mjs +0 -35
- package/esm2022/events/clear-event.mjs +0 -29
- package/esm2022/events/error-event.mjs +0 -48
- package/esm2022/events/pause-event.mjs +0 -38
- package/esm2022/events/preventable-event.mjs +0 -25
- package/esm2022/events/remove-event.mjs +0 -49
- package/esm2022/events/resume-event.mjs +0 -38
- package/esm2022/events/select-event.mjs +0 -37
- package/esm2022/events/success-event.mjs +0 -49
- package/esm2022/events/upload-event.mjs +0 -49
- package/esm2022/events/upload-progress-event.mjs +0 -41
- package/esm2022/events.mjs +0 -14
- package/esm2022/file-select.directive.mjs +0 -136
- package/esm2022/fileselect.component.mjs +0 -452
- package/esm2022/fileselect.module.mjs +0 -41
- package/esm2022/index.mjs +0 -31
- package/esm2022/localization/custom-messages.component.mjs +0 -70
- package/esm2022/localization/localized-messages.directive.mjs +0 -43
- package/esm2022/localization/messages.mjs +0 -185
- package/esm2022/navigation.service.mjs +0 -151
- package/esm2022/package-metadata.mjs +0 -16
- package/esm2022/progress-kendo-angular-upload.mjs +0 -8
- package/esm2022/rendering/file-list-item-action-button.component.mjs +0 -230
- package/esm2022/rendering/file-list-item-base.mjs +0 -52
- package/esm2022/rendering/file-list-item.mjs +0 -115
- package/esm2022/rendering/file-list-multiple-items.component.mjs +0 -201
- package/esm2022/rendering/file-list-single-item.component.mjs +0 -181
- package/esm2022/rendering/file-list.component.mjs +0 -189
- package/esm2022/rendering/upload-action-buttons.component.mjs +0 -126
- package/esm2022/rendering/upload-status-total.component.mjs +0 -97
- package/esm2022/templates/file-info-template.directive.mjs +0 -39
- package/esm2022/templates/file-template.directive.mjs +0 -39
- package/esm2022/types/async-settings.mjs +0 -5
- package/esm2022/types/chunk-info.mjs +0 -5
- package/esm2022/types/chunk-map.mjs +0 -35
- package/esm2022/types/chunk-metadata.mjs +0 -5
- package/esm2022/types/chunk-settings.mjs +0 -5
- package/esm2022/types/direction.mjs +0 -5
- package/esm2022/types/file-groups.mjs +0 -60
- package/esm2022/types/file-info.mjs +0 -5
- package/esm2022/types/file-map.mjs +0 -144
- package/esm2022/types/file-restrictions.mjs +0 -5
- package/esm2022/types/file-state.mjs +0 -34
- package/esm2022/types/operation-type.mjs +0 -5
- package/esm2022/types.mjs +0 -6
- package/esm2022/upload.component.mjs +0 -901
- package/esm2022/upload.module.mjs +0 -43
- package/esm2022/upload.service.mjs +0 -431
- package/esm2022/uploads.module.mjs +0 -66
|
@@ -1,452 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Component, HostBinding, forwardRef, Renderer2, ViewChild, ElementRef, NgZone, ChangeDetectorRef, Injector, Input, Output, EventEmitter } from "@angular/core";
|
|
6
|
-
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
7
|
-
import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
8
|
-
import { KendoInput, Keys, isDocumentAvailable } from '@progress/kendo-angular-common';
|
|
9
|
-
import { fromEvent, merge } from 'rxjs';
|
|
10
|
-
import { filter } from 'rxjs/operators';
|
|
11
|
-
import { validatePackage } from '@progress/kendo-licensing';
|
|
12
|
-
import { packageMetadata } from './package-metadata';
|
|
13
|
-
import { UploadService } from './upload.service';
|
|
14
|
-
import { NavigationService } from './navigation.service';
|
|
15
|
-
import { UPLOAD_CLASSES, hasClasses, isFocusable, IGNORE_TARGET_CLASSES, validateInitialFileSelectFile } from './common/util';
|
|
16
|
-
import { FileState } from './types/file-state';
|
|
17
|
-
import { DropZoneService } from './dropzone.service';
|
|
18
|
-
import { UploadFileSelectBase } from "./common/base";
|
|
19
|
-
import { FileListComponent } from "./rendering/file-list.component";
|
|
20
|
-
import { FileSelectDirective } from "./file-select.directive";
|
|
21
|
-
import { ButtonComponent } from "@progress/kendo-angular-buttons";
|
|
22
|
-
import { DropZoneInternalDirective } from "./dropzone-internal.directive";
|
|
23
|
-
import { LocalizedMessagesDirective } from "./localization/localized-messages.directive";
|
|
24
|
-
import * as i0 from "@angular/core";
|
|
25
|
-
import * as i1 from "./upload.service";
|
|
26
|
-
import * as i2 from "@progress/kendo-angular-l10n";
|
|
27
|
-
import * as i3 from "./navigation.service";
|
|
28
|
-
import * as i4 from "./dropzone.service";
|
|
29
|
-
/**
|
|
30
|
-
* @hidden
|
|
31
|
-
*/
|
|
32
|
-
export const FILESELECT_VALUE_ACCESSOR = {
|
|
33
|
-
multi: true,
|
|
34
|
-
provide: NG_VALUE_ACCESSOR,
|
|
35
|
-
useExisting: forwardRef(() => FileSelectComponent)
|
|
36
|
-
};
|
|
37
|
-
let idx = 0;
|
|
38
|
-
/**
|
|
39
|
-
* Represents the [Kendo UI FileSelect component for Angular](slug:overview_fileselect_uploads).
|
|
40
|
-
*
|
|
41
|
-
* @example
|
|
42
|
-
* ```html
|
|
43
|
-
* <kendo-fileselect> </kendo-fileselect>
|
|
44
|
-
* ```
|
|
45
|
-
*
|
|
46
|
-
* @remarks
|
|
47
|
-
* Supported children components are: {@link CustomMessagesComponent}
|
|
48
|
-
*/
|
|
49
|
-
export class FileSelectComponent extends UploadFileSelectBase {
|
|
50
|
-
uploadService;
|
|
51
|
-
localization;
|
|
52
|
-
navigation;
|
|
53
|
-
dropZoneService;
|
|
54
|
-
ngZone;
|
|
55
|
-
renderer;
|
|
56
|
-
cdr;
|
|
57
|
-
injector;
|
|
58
|
-
fileSelectInput;
|
|
59
|
-
get dir() {
|
|
60
|
-
return this.direction;
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Specifies the `name` attribute of the `input` element of the FileSelect.
|
|
64
|
-
*/
|
|
65
|
-
set name(name) {
|
|
66
|
-
this.uploadService.async.saveField = name;
|
|
67
|
-
}
|
|
68
|
-
get name() {
|
|
69
|
-
return this.uploadService.async.saveField;
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Fires when the component value changes after a successful `select` or `remove` operation.
|
|
73
|
-
*/
|
|
74
|
-
valueChange = new EventEmitter();
|
|
75
|
-
/**
|
|
76
|
-
* @hidden
|
|
77
|
-
*/
|
|
78
|
-
_restrictions = {
|
|
79
|
-
allowedExtensions: [],
|
|
80
|
-
maxFileSize: 0,
|
|
81
|
-
minFileSize: 0
|
|
82
|
-
};
|
|
83
|
-
direction;
|
|
84
|
-
wrapper;
|
|
85
|
-
fileListId;
|
|
86
|
-
documentClick;
|
|
87
|
-
blurSubscription;
|
|
88
|
-
wrapperFocusSubscription;
|
|
89
|
-
selectButtonFocusSubscription;
|
|
90
|
-
localizationChangeSubscription;
|
|
91
|
-
subs;
|
|
92
|
-
constructor(uploadService, localization, navigation, dropZoneService, ngZone, renderer, cdr, wrapper, injector) {
|
|
93
|
-
super(uploadService, navigation, cdr, injector, ngZone);
|
|
94
|
-
this.uploadService = uploadService;
|
|
95
|
-
this.localization = localization;
|
|
96
|
-
this.navigation = navigation;
|
|
97
|
-
this.dropZoneService = dropZoneService;
|
|
98
|
-
this.ngZone = ngZone;
|
|
99
|
-
this.renderer = renderer;
|
|
100
|
-
this.cdr = cdr;
|
|
101
|
-
this.injector = injector;
|
|
102
|
-
validatePackage(packageMetadata);
|
|
103
|
-
this.wrapper = wrapper.nativeElement;
|
|
104
|
-
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
105
|
-
this.navigation.computeKeys();
|
|
106
|
-
this.localizationChangeSubscription = localization.changes.subscribe(({ rtl }) => {
|
|
107
|
-
this.direction = rtl ? 'rtl' : 'ltr';
|
|
108
|
-
});
|
|
109
|
-
this.subscribeBlur();
|
|
110
|
-
this.subscribeFocus();
|
|
111
|
-
this.attachEventHandlers();
|
|
112
|
-
this.setDefaultSettings();
|
|
113
|
-
}
|
|
114
|
-
ngOnInit() {
|
|
115
|
-
const { buttonId, fileListId } = this.getIds();
|
|
116
|
-
this.focusableId = buttonId;
|
|
117
|
-
this.fileListId = fileListId;
|
|
118
|
-
if (this.zoneId) {
|
|
119
|
-
this.dropZoneService.addComponent(this, this.zoneId);
|
|
120
|
-
}
|
|
121
|
-
this.subs.add(this.renderer.listen(this.fileSelectInput.nativeElement, 'mouseenter', () => {
|
|
122
|
-
this.renderer.addClass(this.fileSelectButton.nativeElement, 'k-hover');
|
|
123
|
-
}));
|
|
124
|
-
this.subs.add(this.renderer.listen(this.fileSelectInput.nativeElement, 'mouseleave', () => {
|
|
125
|
-
this.renderer.removeClass(this.fileSelectButton.nativeElement, 'k-hover');
|
|
126
|
-
}));
|
|
127
|
-
this.ngZone.runOutsideAngular(() => {
|
|
128
|
-
this.subs.add(this.renderer.listen(this.wrapper, 'keydown', event => this.handleKeydown(event)));
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* @hidden
|
|
133
|
-
*/
|
|
134
|
-
textFor(key) {
|
|
135
|
-
return this.localization.get(key);
|
|
136
|
-
}
|
|
137
|
-
ngOnDestroy() {
|
|
138
|
-
this.fileList.clear();
|
|
139
|
-
if (this.blurSubscription) {
|
|
140
|
-
this.blurSubscription.unsubscribe();
|
|
141
|
-
}
|
|
142
|
-
if (this.wrapperFocusSubscription) {
|
|
143
|
-
this.wrapperFocusSubscription.unsubscribe();
|
|
144
|
-
}
|
|
145
|
-
if (this.selectButtonFocusSubscription) {
|
|
146
|
-
this.selectButtonFocusSubscription.unsubscribe();
|
|
147
|
-
}
|
|
148
|
-
if (this.localizationChangeSubscription) {
|
|
149
|
-
this.localizationChangeSubscription.unsubscribe();
|
|
150
|
-
}
|
|
151
|
-
if (this.subs) {
|
|
152
|
-
this.subs.unsubscribe();
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
/**
|
|
156
|
-
* Removes a specific file from the file list.
|
|
157
|
-
*
|
|
158
|
-
* @param uid The `uid` of the file to be removed.
|
|
159
|
-
*/
|
|
160
|
-
removeFileByUid(uid) {
|
|
161
|
-
this.uploadService.removeFiles(uid);
|
|
162
|
-
}
|
|
163
|
-
/**
|
|
164
|
-
* Clears all files from the UI.
|
|
165
|
-
*/
|
|
166
|
-
clearFiles() {
|
|
167
|
-
this.uploadService.clearFiles();
|
|
168
|
-
}
|
|
169
|
-
/**
|
|
170
|
-
* @hidden
|
|
171
|
-
* Used to determine if the component is empty.
|
|
172
|
-
*/
|
|
173
|
-
isEmpty() {
|
|
174
|
-
return false;
|
|
175
|
-
}
|
|
176
|
-
/**
|
|
177
|
-
* @hidden
|
|
178
|
-
* Used by the external dropzone to add files to the FileSelect
|
|
179
|
-
*/
|
|
180
|
-
addFiles(files) {
|
|
181
|
-
this.uploadService.addFiles(files);
|
|
182
|
-
}
|
|
183
|
-
/**
|
|
184
|
-
* @hidden
|
|
185
|
-
*/
|
|
186
|
-
get selectButtonTabIndex() {
|
|
187
|
-
return this.disabled ? undefined : this.tabindex;
|
|
188
|
-
}
|
|
189
|
-
/**
|
|
190
|
-
* @hidden
|
|
191
|
-
*/
|
|
192
|
-
getIds() {
|
|
193
|
-
const id = ++idx;
|
|
194
|
-
const buttonId = `k-fileselect-button-${id}`;
|
|
195
|
-
const fileListId = `k-fileselect-file-list-${id}`;
|
|
196
|
-
return { buttonId, fileListId };
|
|
197
|
-
}
|
|
198
|
-
/**
|
|
199
|
-
* @hidden
|
|
200
|
-
*/
|
|
201
|
-
writeValue(newValue) {
|
|
202
|
-
super.writeValue(newValue, validateInitialFileSelectFile, 'addInitialFileSelectFiles');
|
|
203
|
-
}
|
|
204
|
-
subscribeBlur() {
|
|
205
|
-
if (!isDocumentAvailable()) {
|
|
206
|
-
return;
|
|
207
|
-
}
|
|
208
|
-
this.ngZone.runOutsideAngular(() => {
|
|
209
|
-
this.documentClick = fromEvent(document, 'click').pipe(filter((event) => {
|
|
210
|
-
return !(this.wrapper !== event.target && this.wrapper.contains(event.target));
|
|
211
|
-
}));
|
|
212
|
-
this.blurSubscription = merge(this.documentClick, this.navigation.onTabOut).subscribe(() => {
|
|
213
|
-
if (this.navigation.focused) {
|
|
214
|
-
this.ngZone.run(() => {
|
|
215
|
-
this.navigation.focused = false;
|
|
216
|
-
this.onTouchedCallback();
|
|
217
|
-
this.onBlur.emit();
|
|
218
|
-
});
|
|
219
|
-
}
|
|
220
|
-
});
|
|
221
|
-
});
|
|
222
|
-
}
|
|
223
|
-
subscribeFocus() {
|
|
224
|
-
this.wrapperFocusSubscription = this.navigation.onWrapperFocus.subscribe(() => {
|
|
225
|
-
this.onFocus.emit();
|
|
226
|
-
});
|
|
227
|
-
this.selectButtonFocusSubscription = this.navigation.onSelectButtonFocus.subscribe(() => {
|
|
228
|
-
this.fileSelectButton.nativeElement.focus();
|
|
229
|
-
});
|
|
230
|
-
}
|
|
231
|
-
handleKeydown(event) {
|
|
232
|
-
if (this.disabled) {
|
|
233
|
-
return;
|
|
234
|
-
}
|
|
235
|
-
if (event.target === this.fileSelectButton.nativeElement && (event.code === Keys.Enter || event.code === Keys.NumpadEnter || event.code === Keys.Space)) {
|
|
236
|
-
event.preventDefault();
|
|
237
|
-
this.fileSelectInput.nativeElement.click();
|
|
238
|
-
return;
|
|
239
|
-
}
|
|
240
|
-
if (hasClasses(event.target, UPLOAD_CLASSES) ||
|
|
241
|
-
(!isFocusable(event.target) && !hasClasses(event.target, IGNORE_TARGET_CLASSES))) {
|
|
242
|
-
this.navigation.process(event, 'fileselect');
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
attachEventHandlers() {
|
|
246
|
-
this.subs = this.uploadService.changeEvent.subscribe((files) => {
|
|
247
|
-
let model = [];
|
|
248
|
-
if (files !== null) {
|
|
249
|
-
files.forEach((file) => {
|
|
250
|
-
if (file.state === FileState.Initial) {
|
|
251
|
-
model.push(file);
|
|
252
|
-
}
|
|
253
|
-
if (file.state === FileState.Selected && file.rawFile && !file.validationErrors) {
|
|
254
|
-
model.push(file.rawFile);
|
|
255
|
-
}
|
|
256
|
-
});
|
|
257
|
-
}
|
|
258
|
-
if (model.length === 0) {
|
|
259
|
-
model = null;
|
|
260
|
-
}
|
|
261
|
-
this.onChangeCallback(model);
|
|
262
|
-
this.valueChange.emit(model);
|
|
263
|
-
});
|
|
264
|
-
this.subs.add(this.uploadService.removeEvent.subscribe((args) => {
|
|
265
|
-
this.remove.emit(args);
|
|
266
|
-
}));
|
|
267
|
-
this.subs.add(this.uploadService.selectEvent.subscribe((args) => {
|
|
268
|
-
this.select.emit(args);
|
|
269
|
-
}));
|
|
270
|
-
}
|
|
271
|
-
setDefaultSettings() {
|
|
272
|
-
this.uploadService.async.autoUpload = false;
|
|
273
|
-
this.uploadService.component = 'FileSelect';
|
|
274
|
-
}
|
|
275
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FileSelectComponent, deps: [{ token: i1.UploadService }, { token: i2.LocalizationService }, { token: i3.NavigationService }, { token: i4.DropZoneService }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
276
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: FileSelectComponent, isStandalone: true, selector: "kendo-fileselect", inputs: { name: "name" }, outputs: { valueChange: "valueChange" }, host: { properties: { "attr.dir": "this.dir" } }, providers: [
|
|
277
|
-
LocalizationService,
|
|
278
|
-
NavigationService,
|
|
279
|
-
UploadService,
|
|
280
|
-
DropZoneService,
|
|
281
|
-
FILESELECT_VALUE_ACCESSOR,
|
|
282
|
-
{
|
|
283
|
-
provide: L10N_PREFIX,
|
|
284
|
-
useValue: 'kendo.fileselect'
|
|
285
|
-
},
|
|
286
|
-
{
|
|
287
|
-
provide: KendoInput,
|
|
288
|
-
useExisting: forwardRef(() => FileSelectComponent)
|
|
289
|
-
}
|
|
290
|
-
], viewQueries: [{ propertyName: "fileSelectInput", first: true, predicate: ["fileSelectInput"], descendants: true, static: true }], exportAs: ["kendoFileSelect"], usesInheritance: true, ngImport: i0, template: `
|
|
291
|
-
<ng-container kendoFileSelectLocalizedMessages
|
|
292
|
-
i18n-dropFilesHere="kendo.fileselect.dropFilesHere|The drop zone hint"
|
|
293
|
-
dropFilesHere="Drop files here to select"
|
|
294
|
-
|
|
295
|
-
i18n-invalidFileExtension="kendo.fileselect.invalidFileExtension|The text for the invalid allowed extensions restriction message"
|
|
296
|
-
invalidFileExtension="File type not allowed."
|
|
297
|
-
|
|
298
|
-
i18n-invalidMaxFileSize="kendo.fileselect.invalidMaxFileSize|The text for the invalid max file size restriction message"
|
|
299
|
-
invalidMaxFileSize="File size too large."
|
|
300
|
-
|
|
301
|
-
i18n-invalidMinFileSize="kendo.fileselect.invalidMinFileSize|The text for the invalid min file size restriction message"
|
|
302
|
-
invalidMinFileSize="File size too small."
|
|
303
|
-
|
|
304
|
-
i18n-remove="kendo.fileselect.remove|The text for the Remove button"
|
|
305
|
-
remove="Remove"
|
|
306
|
-
|
|
307
|
-
i18n-select="kendo.fileselect.select|The text for the Select button"
|
|
308
|
-
select="Select files..."
|
|
309
|
-
>
|
|
310
|
-
</ng-container>
|
|
311
|
-
<div kendoFileSelectInternalDropZone
|
|
312
|
-
[restrictions]="restrictions"
|
|
313
|
-
[multiple]="multiple"
|
|
314
|
-
[disabled]="disabled">
|
|
315
|
-
<div class="k-upload-button-wrap">
|
|
316
|
-
<button
|
|
317
|
-
kendoButton
|
|
318
|
-
#fileSelectButton
|
|
319
|
-
class="k-upload-button"
|
|
320
|
-
type="button"
|
|
321
|
-
role="button"
|
|
322
|
-
(click)="fileSelectInput.click()"
|
|
323
|
-
(focus)="onFileSelectButtonFocus()"
|
|
324
|
-
[id]="focusableId"
|
|
325
|
-
[attr.aria-label]="textFor('select')"
|
|
326
|
-
[attr.tabindex]="tabindex"
|
|
327
|
-
[attr.aria-expanded]="hasFileList"
|
|
328
|
-
[attr.aria-controls]="hasFileList ? fileListId : undefined"
|
|
329
|
-
>
|
|
330
|
-
{{textFor('select')}}
|
|
331
|
-
</button>
|
|
332
|
-
<input kendoFileSelect #fileSelectInput
|
|
333
|
-
[dir]="direction"
|
|
334
|
-
[accept]="accept"
|
|
335
|
-
[restrictions]="restrictions"
|
|
336
|
-
[multiple]="multiple"
|
|
337
|
-
[disabled]="disabled"
|
|
338
|
-
[required]="isControlRequired"
|
|
339
|
-
/>
|
|
340
|
-
</div>
|
|
341
|
-
<div class="k-dropzone-hint">{{textFor('dropFilesHere')}}</div>
|
|
342
|
-
</div>
|
|
343
|
-
@if (hasFileList) {
|
|
344
|
-
<ul kendo-upload-file-list
|
|
345
|
-
class="k-upload-files k-reset"
|
|
346
|
-
[disabled]="disabled"
|
|
347
|
-
[fileList]="fileList.files"
|
|
348
|
-
[fileTemplate]="fileTemplate"
|
|
349
|
-
[fileInfoTemplate]="fileInfoTemplate"
|
|
350
|
-
[id]="fileListId">
|
|
351
|
-
</ul>
|
|
352
|
-
}
|
|
353
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: LocalizedMessagesDirective, selector: "\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n " }, { kind: "directive", type: DropZoneInternalDirective, selector: "\n [kendoUploadInternalDropZone],\n [kendoFileSelectInternalDropZone]\n ", inputs: ["disabled", "multiple", "restrictions"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: FileSelectDirective, selector: "[kendoFileSelect]", inputs: ["dir", "disabled", "multiple", "restrictions", "accept", "required"] }, { kind: "component", type: FileListComponent, selector: "[kendo-upload-file-list]", inputs: ["disabled", "fileList", "fileTemplate", "fileInfoTemplate"] }] });
|
|
354
|
-
}
|
|
355
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FileSelectComponent, decorators: [{
|
|
356
|
-
type: Component,
|
|
357
|
-
args: [{
|
|
358
|
-
exportAs: 'kendoFileSelect',
|
|
359
|
-
providers: [
|
|
360
|
-
LocalizationService,
|
|
361
|
-
NavigationService,
|
|
362
|
-
UploadService,
|
|
363
|
-
DropZoneService,
|
|
364
|
-
FILESELECT_VALUE_ACCESSOR,
|
|
365
|
-
{
|
|
366
|
-
provide: L10N_PREFIX,
|
|
367
|
-
useValue: 'kendo.fileselect'
|
|
368
|
-
},
|
|
369
|
-
{
|
|
370
|
-
provide: KendoInput,
|
|
371
|
-
useExisting: forwardRef(() => FileSelectComponent)
|
|
372
|
-
}
|
|
373
|
-
],
|
|
374
|
-
selector: 'kendo-fileselect',
|
|
375
|
-
template: `
|
|
376
|
-
<ng-container kendoFileSelectLocalizedMessages
|
|
377
|
-
i18n-dropFilesHere="kendo.fileselect.dropFilesHere|The drop zone hint"
|
|
378
|
-
dropFilesHere="Drop files here to select"
|
|
379
|
-
|
|
380
|
-
i18n-invalidFileExtension="kendo.fileselect.invalidFileExtension|The text for the invalid allowed extensions restriction message"
|
|
381
|
-
invalidFileExtension="File type not allowed."
|
|
382
|
-
|
|
383
|
-
i18n-invalidMaxFileSize="kendo.fileselect.invalidMaxFileSize|The text for the invalid max file size restriction message"
|
|
384
|
-
invalidMaxFileSize="File size too large."
|
|
385
|
-
|
|
386
|
-
i18n-invalidMinFileSize="kendo.fileselect.invalidMinFileSize|The text for the invalid min file size restriction message"
|
|
387
|
-
invalidMinFileSize="File size too small."
|
|
388
|
-
|
|
389
|
-
i18n-remove="kendo.fileselect.remove|The text for the Remove button"
|
|
390
|
-
remove="Remove"
|
|
391
|
-
|
|
392
|
-
i18n-select="kendo.fileselect.select|The text for the Select button"
|
|
393
|
-
select="Select files..."
|
|
394
|
-
>
|
|
395
|
-
</ng-container>
|
|
396
|
-
<div kendoFileSelectInternalDropZone
|
|
397
|
-
[restrictions]="restrictions"
|
|
398
|
-
[multiple]="multiple"
|
|
399
|
-
[disabled]="disabled">
|
|
400
|
-
<div class="k-upload-button-wrap">
|
|
401
|
-
<button
|
|
402
|
-
kendoButton
|
|
403
|
-
#fileSelectButton
|
|
404
|
-
class="k-upload-button"
|
|
405
|
-
type="button"
|
|
406
|
-
role="button"
|
|
407
|
-
(click)="fileSelectInput.click()"
|
|
408
|
-
(focus)="onFileSelectButtonFocus()"
|
|
409
|
-
[id]="focusableId"
|
|
410
|
-
[attr.aria-label]="textFor('select')"
|
|
411
|
-
[attr.tabindex]="tabindex"
|
|
412
|
-
[attr.aria-expanded]="hasFileList"
|
|
413
|
-
[attr.aria-controls]="hasFileList ? fileListId : undefined"
|
|
414
|
-
>
|
|
415
|
-
{{textFor('select')}}
|
|
416
|
-
</button>
|
|
417
|
-
<input kendoFileSelect #fileSelectInput
|
|
418
|
-
[dir]="direction"
|
|
419
|
-
[accept]="accept"
|
|
420
|
-
[restrictions]="restrictions"
|
|
421
|
-
[multiple]="multiple"
|
|
422
|
-
[disabled]="disabled"
|
|
423
|
-
[required]="isControlRequired"
|
|
424
|
-
/>
|
|
425
|
-
</div>
|
|
426
|
-
<div class="k-dropzone-hint">{{textFor('dropFilesHere')}}</div>
|
|
427
|
-
</div>
|
|
428
|
-
@if (hasFileList) {
|
|
429
|
-
<ul kendo-upload-file-list
|
|
430
|
-
class="k-upload-files k-reset"
|
|
431
|
-
[disabled]="disabled"
|
|
432
|
-
[fileList]="fileList.files"
|
|
433
|
-
[fileTemplate]="fileTemplate"
|
|
434
|
-
[fileInfoTemplate]="fileInfoTemplate"
|
|
435
|
-
[id]="fileListId">
|
|
436
|
-
</ul>
|
|
437
|
-
}
|
|
438
|
-
`,
|
|
439
|
-
standalone: true,
|
|
440
|
-
imports: [LocalizedMessagesDirective, DropZoneInternalDirective, ButtonComponent, FileSelectDirective, FileListComponent]
|
|
441
|
-
}]
|
|
442
|
-
}], ctorParameters: () => [{ type: i1.UploadService }, { type: i2.LocalizationService }, { type: i3.NavigationService }, { type: i4.DropZoneService }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.Injector }], propDecorators: { fileSelectInput: [{
|
|
443
|
-
type: ViewChild,
|
|
444
|
-
args: ['fileSelectInput', { static: true }]
|
|
445
|
-
}], dir: [{
|
|
446
|
-
type: HostBinding,
|
|
447
|
-
args: ['attr.dir']
|
|
448
|
-
}], name: [{
|
|
449
|
-
type: Input
|
|
450
|
-
}], valueChange: [{
|
|
451
|
-
type: Output
|
|
452
|
-
}] } });
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { NgModule } from '@angular/core';
|
|
6
|
-
import { KENDO_FILESELECT } from './directives';
|
|
7
|
-
import { IconsService } from '@progress/kendo-angular-icons';
|
|
8
|
-
import { ResizeBatchService } from '@progress/kendo-angular-common';
|
|
9
|
-
import { PopupService } from '@progress/kendo-angular-popup';
|
|
10
|
-
import * as i0 from "@angular/core";
|
|
11
|
-
import * as i1 from "./fileselect.component";
|
|
12
|
-
import * as i2 from "./templates/file-template.directive";
|
|
13
|
-
import * as i3 from "./templates/file-info-template.directive";
|
|
14
|
-
import * as i4 from "./localization/custom-messages.component";
|
|
15
|
-
import * as i5 from "./dropzone-external.directive";
|
|
16
|
-
import * as i6 from "./dropzone.component";
|
|
17
|
-
// IMPORTANT: NgModule export kept for backwards compatibility
|
|
18
|
-
/**
|
|
19
|
-
* Represents the [NgModule](https://angular.io/api/core/NgModule) definition for the FileSelect component.
|
|
20
|
-
*/
|
|
21
|
-
export class FileSelectModule {
|
|
22
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FileSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
23
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: FileSelectModule, imports: [i1.FileSelectComponent, i2.FileTemplateDirective, i3.FileInfoTemplateDirective, i4.CustomMessagesComponent, i5.UploadDropZoneDirective, i6.UploadDropZoneComponent], exports: [i1.FileSelectComponent, i2.FileTemplateDirective, i3.FileInfoTemplateDirective, i4.CustomMessagesComponent, i5.UploadDropZoneDirective, i6.UploadDropZoneComponent] });
|
|
24
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FileSelectModule, providers: [
|
|
25
|
-
IconsService,
|
|
26
|
-
PopupService,
|
|
27
|
-
ResizeBatchService
|
|
28
|
-
], imports: [i1.FileSelectComponent, i6.UploadDropZoneComponent] });
|
|
29
|
-
}
|
|
30
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FileSelectModule, decorators: [{
|
|
31
|
-
type: NgModule,
|
|
32
|
-
args: [{
|
|
33
|
-
exports: [...KENDO_FILESELECT],
|
|
34
|
-
imports: [...KENDO_FILESELECT],
|
|
35
|
-
providers: [
|
|
36
|
-
IconsService,
|
|
37
|
-
PopupService,
|
|
38
|
-
ResizeBatchService
|
|
39
|
-
]
|
|
40
|
-
}]
|
|
41
|
-
}] });
|
package/esm2022/index.mjs
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
export { UploadService } from './upload.service';
|
|
6
|
-
export { NavigationService } from './navigation.service';
|
|
7
|
-
export { DropZoneService } from './dropzone.service';
|
|
8
|
-
export { FileSelectModule } from './fileselect.module';
|
|
9
|
-
export { UploadModule } from './upload.module';
|
|
10
|
-
export { UploadsModule } from './uploads.module';
|
|
11
|
-
export { UploadComponent } from './upload.component';
|
|
12
|
-
export { FileSelectComponent } from './fileselect.component';
|
|
13
|
-
export { UploadDropZoneComponent } from './dropzone.component';
|
|
14
|
-
export { FileSelectDirective } from './file-select.directive';
|
|
15
|
-
export { FileListComponent } from './rendering/file-list.component';
|
|
16
|
-
export { FileListItemBase } from './rendering/file-list-item-base';
|
|
17
|
-
export { FileListSingleItemComponent } from './rendering/file-list-single-item.component';
|
|
18
|
-
export { FileListItemActionButtonComponent } from './rendering/file-list-item-action-button.component';
|
|
19
|
-
export { FileListMultipleItemsComponent } from './rendering/file-list-multiple-items.component';
|
|
20
|
-
export { FileTemplateDirective } from './templates/file-template.directive';
|
|
21
|
-
export { FileInfoTemplateDirective } from './templates/file-info-template.directive';
|
|
22
|
-
export { UploadStatusTotalComponent } from './rendering/upload-status-total.component';
|
|
23
|
-
export { UploadActionButtonsComponent } from './rendering/upload-action-buttons.component';
|
|
24
|
-
export { UploadDropZoneDirective } from './dropzone-external.directive';
|
|
25
|
-
export { CustomMessagesComponent } from './localization/custom-messages.component';
|
|
26
|
-
export { validateFiles } from './common/validation-util';
|
|
27
|
-
export { UPLOAD_VALUE_ACCESSOR } from './upload.component';
|
|
28
|
-
export { getTotalFilesSizeMessage, fileSVGGroupIcon, fileGroupClass } from './common/util';
|
|
29
|
-
export * from './events';
|
|
30
|
-
export * from './types';
|
|
31
|
-
export * from './directives';
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Component, forwardRef } from '@angular/core';
|
|
6
|
-
import { Messages } from './messages';
|
|
7
|
-
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
8
|
-
import * as i0 from "@angular/core";
|
|
9
|
-
import * as i1 from "@progress/kendo-angular-l10n";
|
|
10
|
-
/**
|
|
11
|
-
* Custom component messages override default component messages ([more information and example]({% slug globalization_upload %})).
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```html
|
|
15
|
-
* <!-- Custom messages for FileSelect -->
|
|
16
|
-
* <kendo-fileselect>
|
|
17
|
-
* <kendo-fileselect-messages
|
|
18
|
-
* dropFilesHere="Drop your file here"
|
|
19
|
-
* select="Upload file">
|
|
20
|
-
* </kendo-fileselect-messages>
|
|
21
|
-
* </kendo-fileselect>
|
|
22
|
-
*
|
|
23
|
-
* <!-- Custom messages for Upload -->
|
|
24
|
-
* <kendo-upload>
|
|
25
|
-
* <kendo-upload-messages
|
|
26
|
-
* dropFilesHere="Drop your file here"
|
|
27
|
-
* fileStatusFailed="File upload failed"
|
|
28
|
-
* fileStatusSuccessful="File upload successful">
|
|
29
|
-
* </kendo-upload-messages>
|
|
30
|
-
* </kendo-upload>
|
|
31
|
-
*
|
|
32
|
-
* <!-- Custom messages for UploadDropZone -->
|
|
33
|
-
* <kendo-uploaddropzone>
|
|
34
|
-
* <kendo-uploaddropzone-messages
|
|
35
|
-
* externalDropFilesHere="Drag and your file here">
|
|
36
|
-
* </kendo-uploaddropzone-messages>
|
|
37
|
-
* </kendo-uploaddropzone>
|
|
38
|
-
* ```
|
|
39
|
-
*/
|
|
40
|
-
export class CustomMessagesComponent extends Messages {
|
|
41
|
-
service;
|
|
42
|
-
get override() {
|
|
43
|
-
return true;
|
|
44
|
-
}
|
|
45
|
-
constructor(service) {
|
|
46
|
-
super();
|
|
47
|
-
this.service = service;
|
|
48
|
-
}
|
|
49
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CustomMessagesComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
50
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: CustomMessagesComponent, isStandalone: true, selector: "kendo-upload-messages, kendo-fileselect-messages, kendo-uploaddropzone-messages", providers: [
|
|
51
|
-
{
|
|
52
|
-
provide: Messages,
|
|
53
|
-
useExisting: forwardRef(() => CustomMessagesComponent)
|
|
54
|
-
}
|
|
55
|
-
], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
|
|
56
|
-
}
|
|
57
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CustomMessagesComponent, decorators: [{
|
|
58
|
-
type: Component,
|
|
59
|
-
args: [{
|
|
60
|
-
providers: [
|
|
61
|
-
{
|
|
62
|
-
provide: Messages,
|
|
63
|
-
useExisting: forwardRef(() => CustomMessagesComponent)
|
|
64
|
-
}
|
|
65
|
-
],
|
|
66
|
-
selector: 'kendo-upload-messages, kendo-fileselect-messages, kendo-uploaddropzone-messages',
|
|
67
|
-
template: ``,
|
|
68
|
-
standalone: true
|
|
69
|
-
}]
|
|
70
|
-
}], ctorParameters: () => [{ type: i1.LocalizationService }] });
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Directive, forwardRef } from '@angular/core';
|
|
6
|
-
import { Messages } from './messages';
|
|
7
|
-
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
8
|
-
import * as i0 from "@angular/core";
|
|
9
|
-
import * as i1 from "@progress/kendo-angular-l10n";
|
|
10
|
-
/**
|
|
11
|
-
* @hidden
|
|
12
|
-
*/
|
|
13
|
-
export class LocalizedMessagesDirective extends Messages {
|
|
14
|
-
service;
|
|
15
|
-
constructor(service) {
|
|
16
|
-
super();
|
|
17
|
-
this.service = service;
|
|
18
|
-
}
|
|
19
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LocalizedMessagesDirective, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
20
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: LocalizedMessagesDirective, isStandalone: true, selector: "\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n ", providers: [
|
|
21
|
-
{
|
|
22
|
-
provide: Messages,
|
|
23
|
-
useExisting: forwardRef(() => LocalizedMessagesDirective)
|
|
24
|
-
}
|
|
25
|
-
], usesInheritance: true, ngImport: i0 });
|
|
26
|
-
}
|
|
27
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LocalizedMessagesDirective, decorators: [{
|
|
28
|
-
type: Directive,
|
|
29
|
-
args: [{
|
|
30
|
-
providers: [
|
|
31
|
-
{
|
|
32
|
-
provide: Messages,
|
|
33
|
-
useExisting: forwardRef(() => LocalizedMessagesDirective)
|
|
34
|
-
}
|
|
35
|
-
],
|
|
36
|
-
selector: `
|
|
37
|
-
[kendoUploadLocalizedMessages],
|
|
38
|
-
[kendoFileSelectLocalizedMessages],
|
|
39
|
-
[kendoUploadDropZoneLocalizedMessages]
|
|
40
|
-
`,
|
|
41
|
-
standalone: true
|
|
42
|
-
}]
|
|
43
|
-
}], ctorParameters: () => [{ type: i1.LocalizationService }] });
|