@progress/kendo-angular-upload 15.4.0 → 15.5.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.
@@ -39,6 +39,9 @@ export class FileSelectDirective {
39
39
  get acceptAttribute() {
40
40
  return this.accept ? this.accept : null;
41
41
  }
42
+ get requiredAttribute() {
43
+ return this.required ? "" : null;
44
+ }
42
45
  onInputChange(event) {
43
46
  const ua = navigator.userAgent;
44
47
  const webkit = /(webkit)[ \/]([\w.]+)/i;
@@ -66,7 +69,7 @@ export class FileSelectDirective {
66
69
  }
67
70
  }
68
71
  FileSelectDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FileSelectDirective, deps: [{ token: i1.UploadService }, { token: i2.NavigationService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
69
- FileSelectDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: FileSelectDirective, selector: "[kendoFileSelect]", inputs: { dir: "dir", disabled: "disabled", multiple: "multiple", restrictions: "restrictions", accept: "accept" }, host: { listeners: { "change": "onInputChange($event)" }, properties: { "attr.type": "this.type", "attr.autocomplete": "this.autocomplete", "attr.tabindex": "this.tabIndex", "attr.aria-hidden": "this.ariaHidden", "class.k-hidden": "this.classNames", "attr.name": "this.nameAttribute", "attr.multiple": "this.multipleAttribute", "attr.dir": "this.dirAttribute", "attr.disabled": "this.disabledAttribute", "attr.accept": "this.acceptAttribute" } }, ngImport: i0 });
72
+ FileSelectDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: FileSelectDirective, selector: "[kendoFileSelect]", inputs: { dir: "dir", disabled: "disabled", multiple: "multiple", restrictions: "restrictions", accept: "accept", required: "required" }, host: { listeners: { "change": "onInputChange($event)" }, properties: { "attr.type": "this.type", "attr.autocomplete": "this.autocomplete", "attr.tabindex": "this.tabIndex", "attr.aria-hidden": "this.ariaHidden", "class.k-hidden": "this.classNames", "attr.name": "this.nameAttribute", "attr.multiple": "this.multipleAttribute", "attr.dir": "this.dirAttribute", "attr.disabled": "this.disabledAttribute", "attr.accept": "this.acceptAttribute", "attr.required": "this.requiredAttribute" } }, ngImport: i0 });
70
73
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FileSelectDirective, decorators: [{
71
74
  type: Directive,
72
75
  args: [{
@@ -82,6 +85,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
82
85
  type: Input
83
86
  }], accept: [{
84
87
  type: Input
88
+ }], required: [{
89
+ type: Input
85
90
  }], type: [{
86
91
  type: HostBinding,
87
92
  args: ["attr.type"]
@@ -112,6 +117,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
112
117
  }], acceptAttribute: [{
113
118
  type: HostBinding,
114
119
  args: ["attr.accept"]
120
+ }], requiredAttribute: [{
121
+ type: HostBinding,
122
+ args: ["attr.required"]
115
123
  }], onInputChange: [{
116
124
  type: HostListener,
117
125
  args: ["change", ["$event"]]
@@ -2,10 +2,10 @@
2
2
  * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- import { Component, Input, HostBinding, forwardRef, Renderer2, ViewChild, ElementRef, Output, EventEmitter, NgZone, ContentChild, ChangeDetectorRef } from "@angular/core";
6
- import { NG_VALUE_ACCESSOR } from '@angular/forms';
5
+ import { Component, Input, HostBinding, forwardRef, Renderer2, ViewChild, ElementRef, Output, EventEmitter, NgZone, ContentChild, ChangeDetectorRef, Injector } from "@angular/core";
6
+ import { NG_VALUE_ACCESSOR, NgControl } from '@angular/forms';
7
7
  import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
8
- import { KendoInput, guid, Keys, isDocumentAvailable } from '@progress/kendo-angular-common';
8
+ import { KendoInput, guid, Keys, isDocumentAvailable, isControlRequired } from '@progress/kendo-angular-common';
9
9
  import { fromEvent, merge } from 'rxjs';
10
10
  import { filter } from 'rxjs/operators';
11
11
  import { validatePackage } from '@progress/kendo-licensing';
@@ -38,7 +38,7 @@ export const FILESELECT_VALUE_ACCESSOR = {
38
38
  };
39
39
  let idx = 0;
40
40
  export class FileSelectComponent {
41
- constructor(uploadService, localization, navigation, dropZoneService, ngZone, renderer, cdr, wrapper) {
41
+ constructor(uploadService, localization, navigation, dropZoneService, ngZone, renderer, cdr, wrapper, injector) {
42
42
  this.uploadService = uploadService;
43
43
  this.localization = localization;
44
44
  this.navigation = navigation;
@@ -46,6 +46,7 @@ export class FileSelectComponent {
46
46
  this.ngZone = ngZone;
47
47
  this.renderer = renderer;
48
48
  this.cdr = cdr;
49
+ this.injector = injector;
49
50
  /**
50
51
  * Disables the FileSelect.
51
52
  * To learn how to disable the component in reactive forms, refer to the article on [Forms Support](slug:formssupport_fileselect#toc-managing-the-fileselect-disabled-state-in-reactive-forms).
@@ -145,6 +146,19 @@ export class FileSelectComponent {
145
146
  get hostRole() {
146
147
  return 'application';
147
148
  }
149
+ /**
150
+ * @hidden
151
+ */
152
+ get formControl() {
153
+ const ngControl = this.injector.get(NgControl, null);
154
+ return ngControl?.control || null;
155
+ }
156
+ /**
157
+ * @hidden
158
+ */
159
+ get isControlRequired() {
160
+ return isControlRequired(this.formControl);
161
+ }
148
162
  ngOnInit() {
149
163
  const { buttonId, inputId } = this.getIds();
150
164
  this.focusableId = buttonId;
@@ -356,7 +370,7 @@ export class FileSelectComponent {
356
370
  this.uploadService.component = 'FileSelect';
357
371
  }
358
372
  }
359
- FileSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", 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 }], target: i0.ɵɵFactoryTarget.Component });
373
+ FileSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", 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 });
360
374
  FileSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: FileSelectComponent, selector: "kendo-fileselect", inputs: { accept: "accept", disabled: "disabled", multiple: "multiple", name: "name", showFileList: "showFileList", tabindex: "tabindex", restrictions: "restrictions", zoneId: "zoneId", focusableId: "focusableId" }, outputs: { onBlur: "blur", onFocus: "focus", select: "select", remove: "remove", valueChange: "valueChange" }, host: { properties: { "class.k-upload": "this.hostDefaultClasses", "class.k-disabled": "this.hostDisabledClass", "attr.dir": "this.dir", "attr.role": "this.hostRole" } }, providers: [
361
375
  LocalizationService,
362
376
  NavigationService,
@@ -419,6 +433,7 @@ FileSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
419
433
  [restrictions]="restrictions"
420
434
  [multiple]="multiple"
421
435
  [disabled]="disabled"
436
+ [required]="isControlRequired"
422
437
  />
423
438
  </div>
424
439
  <div class="k-dropzone-hint">{{textFor('dropFilesHere')}}</div>
@@ -431,7 +446,7 @@ FileSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
431
446
  [fileTemplate]="fileTemplate"
432
447
  [fileInfoTemplate]="fileInfoTemplate">
433
448
  </ul>
434
- `, isInline: true, components: [{ type: i5.ButtonComponent, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: i6.FileListComponent, selector: "[kendo-upload-file-list]", inputs: ["disabled", "fileList", "fileTemplate", "fileInfoTemplate"] }], directives: [{ type: i7.LocalizedMessagesDirective, selector: "\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n " }, { type: i8.DropZoneInternalDirective, selector: "\n [kendoUploadInternalDropZone],\n [kendoFileSelectInternalDropZone]\n ", inputs: ["disabled", "multiple", "restrictions"] }, { type: i9.FileSelectDirective, selector: "[kendoFileSelect]", inputs: ["dir", "disabled", "multiple", "restrictions", "accept"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
449
+ `, isInline: true, components: [{ type: i5.ButtonComponent, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: i6.FileListComponent, selector: "[kendo-upload-file-list]", inputs: ["disabled", "fileList", "fileTemplate", "fileInfoTemplate"] }], directives: [{ type: i7.LocalizedMessagesDirective, selector: "\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n " }, { type: i8.DropZoneInternalDirective, selector: "\n [kendoUploadInternalDropZone],\n [kendoFileSelectInternalDropZone]\n ", inputs: ["disabled", "multiple", "restrictions"] }, { type: i9.FileSelectDirective, selector: "[kendoFileSelect]", inputs: ["dir", "disabled", "multiple", "restrictions", "accept", "required"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
435
450
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FileSelectComponent, decorators: [{
436
451
  type: Component,
437
452
  args: [{
@@ -500,6 +515,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
500
515
  [restrictions]="restrictions"
501
516
  [multiple]="multiple"
502
517
  [disabled]="disabled"
518
+ [required]="isControlRequired"
503
519
  />
504
520
  </div>
505
521
  <div class="k-dropzone-hint">{{textFor('dropFilesHere')}}</div>
@@ -514,7 +530,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
514
530
  </ul>
515
531
  `
516
532
  }]
517
- }], ctorParameters: function () { return [{ type: i1.UploadService }, { type: i2.LocalizationService }, { type: i3.NavigationService }, { type: i4.DropZoneService }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }]; }, propDecorators: { accept: [{
533
+ }], ctorParameters: function () { return [{ 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: { accept: [{
518
534
  type: Input
519
535
  }], disabled: [{
520
536
  type: Input
@@ -9,7 +9,7 @@ export const packageMetadata = {
9
9
  name: '@progress/kendo-angular-upload',
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
12
- publishDate: 1712142336,
13
- version: '15.4.0',
12
+ publishDate: 1712152306,
13
+ version: '15.5.0-develop.1',
14
14
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
15
15
  };
@@ -5,9 +5,9 @@
5
5
  /* eslint-disable @typescript-eslint/no-unused-vars */
6
6
  /* eslint-disable @typescript-eslint/no-explicit-any */
7
7
  import { HttpHeaders } from '@angular/common/http';
8
- import { Component, ContentChild, ElementRef, EventEmitter, forwardRef, HostBinding, Input, NgZone, Output, Renderer2, ViewChild, isDevMode, ChangeDetectorRef } from '@angular/core';
9
- import { NG_VALUE_ACCESSOR } from '@angular/forms';
10
- import { guid, isDocumentAvailable, KendoInput, Keys, isChanged } from '@progress/kendo-angular-common';
8
+ import { Component, ContentChild, ElementRef, EventEmitter, forwardRef, HostBinding, Input, NgZone, Output, Renderer2, ViewChild, isDevMode, ChangeDetectorRef, Injector } from '@angular/core';
9
+ import { NG_VALUE_ACCESSOR, NgControl } from '@angular/forms';
10
+ import { guid, isDocumentAvailable, KendoInput, Keys, isChanged, isControlRequired } from '@progress/kendo-angular-common';
11
11
  import { L10N_PREFIX, LocalizationService } from '@progress/kendo-angular-l10n';
12
12
  import { fromEvent, merge } from 'rxjs';
13
13
  import { filter } from 'rxjs/operators';
@@ -46,7 +46,7 @@ let idx = 0;
46
46
  * Represents the [Kendo UI Upload component for Angular]({% slug overview_upload %}).
47
47
  */
48
48
  export class UploadComponent {
49
- constructor(uploadService, localization, navigation, dropZoneService, zone, renderer, cdr, wrapper) {
49
+ constructor(uploadService, localization, navigation, dropZoneService, zone, renderer, cdr, wrapper, injector) {
50
50
  this.uploadService = uploadService;
51
51
  this.localization = localization;
52
52
  this.navigation = navigation;
@@ -54,6 +54,7 @@ export class UploadComponent {
54
54
  this.zone = zone;
55
55
  this.renderer = renderer;
56
56
  this.cdr = cdr;
57
+ this.injector = injector;
57
58
  /**
58
59
  * Enables the chunk functionality of the Upload.
59
60
  *
@@ -334,6 +335,19 @@ export class UploadComponent {
334
335
  get dir() {
335
336
  return this.direction;
336
337
  }
338
+ /**
339
+ * @hidden
340
+ */
341
+ get formControl() {
342
+ const ngControl = this.injector.get(NgControl, null);
343
+ return ngControl?.control || null;
344
+ }
345
+ /**
346
+ * @hidden
347
+ */
348
+ get isControlRequired() {
349
+ return isControlRequired(this.formControl);
350
+ }
337
351
  ngOnInit() {
338
352
  this.verifySettings();
339
353
  const { buttonId } = this.getIds();
@@ -660,7 +674,7 @@ export class UploadComponent {
660
674
  }));
661
675
  }
662
676
  }
663
- UploadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UploadComponent, 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 }], target: i0.ɵɵFactoryTarget.Component });
677
+ UploadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UploadComponent, 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 });
664
678
  UploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: UploadComponent, selector: "kendo-upload", inputs: { autoUpload: "autoUpload", batch: "batch", withCredentials: "withCredentials", saveField: "saveField", saveHeaders: "saveHeaders", saveMethod: "saveMethod", saveUrl: "saveUrl", responseType: "responseType", removeField: "removeField", removeHeaders: "removeHeaders", removeMethod: "removeMethod", removeUrl: "removeUrl", chunkable: "chunkable", concurrent: "concurrent", multiple: "multiple", disabled: "disabled", showFileList: "showFileList", tabindex: "tabindex", zoneId: "zoneId", tabIndex: "tabIndex", accept: "accept", restrictions: "restrictions", focusableId: "focusableId", actionsLayout: "actionsLayout" }, outputs: { onBlur: "blur", cancel: "cancel", clear: "clear", complete: "complete", error: "error", onFocus: "focus", pause: "pause", remove: "remove", resume: "resume", select: "select", success: "success", upload: "upload", uploadProgress: "uploadProgress", valueChange: "valueChange" }, host: { properties: { "class.k-upload": "this.hostDefaultClasses", "attr.role": "this.hostRole", "class.k-disabled": "this.hostDisabledClass", "attr.dir": "this.dir" } }, providers: [
665
679
  LocalizationService,
666
680
  NavigationService,
@@ -763,7 +777,8 @@ UploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
763
777
  [accept]="accept"
764
778
  [restrictions]="restrictions"
765
779
  [multiple]="multiple"
766
- [disabled]="disabled" />
780
+ [disabled]="disabled"
781
+ [required]="isControlRequired" />
767
782
  </div>
768
783
  <kendo-upload-status-total *ngIf="showTotalStatus"
769
784
  class="k-upload-status"
@@ -783,7 +798,7 @@ UploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
783
798
  [disabled]="disabled"
784
799
  [actionsLayout]="actionsLayout">
785
800
  </kendo-upload-action-buttons>
786
- `, isInline: true, components: [{ type: i5.ButtonComponent, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: i6.UploadStatusTotalComponent, selector: "kendo-upload-status-total", inputs: ["fileList"] }, { type: i7.FileListComponent, selector: "[kendo-upload-file-list]", inputs: ["disabled", "fileList", "fileTemplate", "fileInfoTemplate"] }, { type: i8.UploadActionButtonsComponent, selector: "kendo-upload-action-buttons", inputs: ["disabled", "actionsLayout"] }], directives: [{ type: i9.LocalizedMessagesDirective, selector: "\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n " }, { type: i10.DropZoneInternalDirective, selector: "\n [kendoUploadInternalDropZone],\n [kendoFileSelectInternalDropZone]\n ", inputs: ["disabled", "multiple", "restrictions"] }, { type: i11.FileSelectDirective, selector: "[kendoFileSelect]", inputs: ["dir", "disabled", "multiple", "restrictions", "accept"] }, { type: i12.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
801
+ `, isInline: true, components: [{ type: i5.ButtonComponent, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: i6.UploadStatusTotalComponent, selector: "kendo-upload-status-total", inputs: ["fileList"] }, { type: i7.FileListComponent, selector: "[kendo-upload-file-list]", inputs: ["disabled", "fileList", "fileTemplate", "fileInfoTemplate"] }, { type: i8.UploadActionButtonsComponent, selector: "kendo-upload-action-buttons", inputs: ["disabled", "actionsLayout"] }], directives: [{ type: i9.LocalizedMessagesDirective, selector: "\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n " }, { type: i10.DropZoneInternalDirective, selector: "\n [kendoUploadInternalDropZone],\n [kendoFileSelectInternalDropZone]\n ", inputs: ["disabled", "multiple", "restrictions"] }, { type: i11.FileSelectDirective, selector: "[kendoFileSelect]", inputs: ["dir", "disabled", "multiple", "restrictions", "accept", "required"] }, { type: i12.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
787
802
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UploadComponent, decorators: [{
788
803
  type: Component,
789
804
  args: [{
@@ -892,7 +907,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
892
907
  [accept]="accept"
893
908
  [restrictions]="restrictions"
894
909
  [multiple]="multiple"
895
- [disabled]="disabled" />
910
+ [disabled]="disabled"
911
+ [required]="isControlRequired" />
896
912
  </div>
897
913
  <kendo-upload-status-total *ngIf="showTotalStatus"
898
914
  class="k-upload-status"
@@ -914,7 +930,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
914
930
  </kendo-upload-action-buttons>
915
931
  `
916
932
  }]
917
- }], ctorParameters: function () { return [{ type: i1.UploadService }, { type: i2.LocalizationService }, { type: i3.NavigationService }, { type: i4.DropZoneService }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }]; }, propDecorators: { autoUpload: [{
933
+ }], ctorParameters: function () { return [{ 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: { autoUpload: [{
918
934
  type: Input
919
935
  }], batch: [{
920
936
  type: Input
@@ -6,9 +6,9 @@ import * as i1 from '@angular/common/http';
6
6
  import { HttpHeaders, HttpRequest, HttpEventType, HttpResponse } from '@angular/common/http';
7
7
  import * as i0 from '@angular/core';
8
8
  import { EventEmitter, Injectable, Directive, Input, HostBinding, HostListener, Component, ViewChildren, forwardRef, Inject, ElementRef, ContentChild, ViewChild, Output, isDevMode, NgModule } from '@angular/core';
9
- import { guid, Keys, isDocumentAvailable, KendoInput, isChanged } from '@progress/kendo-angular-common';
9
+ import { guid, Keys, isControlRequired, isDocumentAvailable, KendoInput, isChanged } from '@progress/kendo-angular-common';
10
10
  import { fileAudioIcon, fileVideoIcon, fileImageIcon, fileTxtIcon, filePresentationIcon, fileDataIcon, fileProgrammingIcon, filePdfIcon, fileConfigIcon, fileZipIcon, fileDiscImageIcon, arrowRotateCwSmallIcon, playSmIcon, pauseSmIcon, cancelIcon, xIcon, fileIcon, copyIcon, checkIcon, exclamationCircleIcon, uploadIcon } from '@progress/kendo-svg-icons';
11
- import { NG_VALUE_ACCESSOR } from '@angular/forms';
11
+ import { NG_VALUE_ACCESSOR, NgControl } from '@angular/forms';
12
12
  import * as i1$1 from '@progress/kendo-angular-l10n';
13
13
  import { ComponentMessages, LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
14
14
  import { fromEvent, merge } from 'rxjs';
@@ -1510,8 +1510,8 @@ const packageMetadata = {
1510
1510
  name: '@progress/kendo-angular-upload',
1511
1511
  productName: 'Kendo UI for Angular',
1512
1512
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
1513
- publishDate: 1712142336,
1514
- version: '15.4.0',
1513
+ publishDate: 1712152306,
1514
+ version: '15.5.0-develop.1',
1515
1515
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
1516
1516
  };
1517
1517
 
@@ -2729,6 +2729,9 @@ class FileSelectDirective {
2729
2729
  get acceptAttribute() {
2730
2730
  return this.accept ? this.accept : null;
2731
2731
  }
2732
+ get requiredAttribute() {
2733
+ return this.required ? "" : null;
2734
+ }
2732
2735
  onInputChange(event) {
2733
2736
  const ua = navigator.userAgent;
2734
2737
  const webkit = /(webkit)[ \/]([\w.]+)/i;
@@ -2756,7 +2759,7 @@ class FileSelectDirective {
2756
2759
  }
2757
2760
  }
2758
2761
  FileSelectDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FileSelectDirective, deps: [{ token: UploadService }, { token: NavigationService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
2759
- FileSelectDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: FileSelectDirective, selector: "[kendoFileSelect]", inputs: { dir: "dir", disabled: "disabled", multiple: "multiple", restrictions: "restrictions", accept: "accept" }, host: { listeners: { "change": "onInputChange($event)" }, properties: { "attr.type": "this.type", "attr.autocomplete": "this.autocomplete", "attr.tabindex": "this.tabIndex", "attr.aria-hidden": "this.ariaHidden", "class.k-hidden": "this.classNames", "attr.name": "this.nameAttribute", "attr.multiple": "this.multipleAttribute", "attr.dir": "this.dirAttribute", "attr.disabled": "this.disabledAttribute", "attr.accept": "this.acceptAttribute" } }, ngImport: i0 });
2762
+ FileSelectDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: FileSelectDirective, selector: "[kendoFileSelect]", inputs: { dir: "dir", disabled: "disabled", multiple: "multiple", restrictions: "restrictions", accept: "accept", required: "required" }, host: { listeners: { "change": "onInputChange($event)" }, properties: { "attr.type": "this.type", "attr.autocomplete": "this.autocomplete", "attr.tabindex": "this.tabIndex", "attr.aria-hidden": "this.ariaHidden", "class.k-hidden": "this.classNames", "attr.name": "this.nameAttribute", "attr.multiple": "this.multipleAttribute", "attr.dir": "this.dirAttribute", "attr.disabled": "this.disabledAttribute", "attr.accept": "this.acceptAttribute", "attr.required": "this.requiredAttribute" } }, ngImport: i0 });
2760
2763
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FileSelectDirective, decorators: [{
2761
2764
  type: Directive,
2762
2765
  args: [{
@@ -2772,6 +2775,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
2772
2775
  type: Input
2773
2776
  }], accept: [{
2774
2777
  type: Input
2778
+ }], required: [{
2779
+ type: Input
2775
2780
  }], type: [{
2776
2781
  type: HostBinding,
2777
2782
  args: ["attr.type"]
@@ -2802,6 +2807,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
2802
2807
  }], acceptAttribute: [{
2803
2808
  type: HostBinding,
2804
2809
  args: ["attr.accept"]
2810
+ }], requiredAttribute: [{
2811
+ type: HostBinding,
2812
+ args: ["attr.required"]
2805
2813
  }], onInputChange: [{
2806
2814
  type: HostListener,
2807
2815
  args: ["change", ["$event"]]
@@ -2817,7 +2825,7 @@ const FILESELECT_VALUE_ACCESSOR = {
2817
2825
  };
2818
2826
  let idx$1 = 0;
2819
2827
  class FileSelectComponent {
2820
- constructor(uploadService, localization, navigation, dropZoneService, ngZone, renderer, cdr, wrapper) {
2828
+ constructor(uploadService, localization, navigation, dropZoneService, ngZone, renderer, cdr, wrapper, injector) {
2821
2829
  this.uploadService = uploadService;
2822
2830
  this.localization = localization;
2823
2831
  this.navigation = navigation;
@@ -2825,6 +2833,7 @@ class FileSelectComponent {
2825
2833
  this.ngZone = ngZone;
2826
2834
  this.renderer = renderer;
2827
2835
  this.cdr = cdr;
2836
+ this.injector = injector;
2828
2837
  /**
2829
2838
  * Disables the FileSelect.
2830
2839
  * To learn how to disable the component in reactive forms, refer to the article on [Forms Support](slug:formssupport_fileselect#toc-managing-the-fileselect-disabled-state-in-reactive-forms).
@@ -2924,6 +2933,19 @@ class FileSelectComponent {
2924
2933
  get hostRole() {
2925
2934
  return 'application';
2926
2935
  }
2936
+ /**
2937
+ * @hidden
2938
+ */
2939
+ get formControl() {
2940
+ const ngControl = this.injector.get(NgControl, null);
2941
+ return (ngControl === null || ngControl === void 0 ? void 0 : ngControl.control) || null;
2942
+ }
2943
+ /**
2944
+ * @hidden
2945
+ */
2946
+ get isControlRequired() {
2947
+ return isControlRequired(this.formControl);
2948
+ }
2927
2949
  ngOnInit() {
2928
2950
  const { buttonId, inputId } = this.getIds();
2929
2951
  this.focusableId = buttonId;
@@ -3135,7 +3157,7 @@ class FileSelectComponent {
3135
3157
  this.uploadService.component = 'FileSelect';
3136
3158
  }
3137
3159
  }
3138
- FileSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FileSelectComponent, deps: [{ token: UploadService }, { token: i1$1.LocalizationService }, { token: NavigationService }, { token: DropZoneService }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
3160
+ FileSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FileSelectComponent, deps: [{ token: UploadService }, { token: i1$1.LocalizationService }, { token: NavigationService }, { token: DropZoneService }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
3139
3161
  FileSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: FileSelectComponent, selector: "kendo-fileselect", inputs: { accept: "accept", disabled: "disabled", multiple: "multiple", name: "name", showFileList: "showFileList", tabindex: "tabindex", restrictions: "restrictions", zoneId: "zoneId", focusableId: "focusableId" }, outputs: { onBlur: "blur", onFocus: "focus", select: "select", remove: "remove", valueChange: "valueChange" }, host: { properties: { "class.k-upload": "this.hostDefaultClasses", "class.k-disabled": "this.hostDisabledClass", "attr.dir": "this.dir", "attr.role": "this.hostRole" } }, providers: [
3140
3162
  LocalizationService,
3141
3163
  NavigationService,
@@ -3198,6 +3220,7 @@ FileSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
3198
3220
  [restrictions]="restrictions"
3199
3221
  [multiple]="multiple"
3200
3222
  [disabled]="disabled"
3223
+ [required]="isControlRequired"
3201
3224
  />
3202
3225
  </div>
3203
3226
  <div class="k-dropzone-hint">{{textFor('dropFilesHere')}}</div>
@@ -3210,7 +3233,7 @@ FileSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
3210
3233
  [fileTemplate]="fileTemplate"
3211
3234
  [fileInfoTemplate]="fileInfoTemplate">
3212
3235
  </ul>
3213
- `, isInline: true, components: [{ type: i5.ButtonComponent, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: FileListComponent, selector: "[kendo-upload-file-list]", inputs: ["disabled", "fileList", "fileTemplate", "fileInfoTemplate"] }], directives: [{ type: LocalizedMessagesDirective, selector: "\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n " }, { type: DropZoneInternalDirective, selector: "\n [kendoUploadInternalDropZone],\n [kendoFileSelectInternalDropZone]\n ", inputs: ["disabled", "multiple", "restrictions"] }, { type: FileSelectDirective, selector: "[kendoFileSelect]", inputs: ["dir", "disabled", "multiple", "restrictions", "accept"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
3236
+ `, isInline: true, components: [{ type: i5.ButtonComponent, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: FileListComponent, selector: "[kendo-upload-file-list]", inputs: ["disabled", "fileList", "fileTemplate", "fileInfoTemplate"] }], directives: [{ type: LocalizedMessagesDirective, selector: "\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n " }, { type: DropZoneInternalDirective, selector: "\n [kendoUploadInternalDropZone],\n [kendoFileSelectInternalDropZone]\n ", inputs: ["disabled", "multiple", "restrictions"] }, { type: FileSelectDirective, selector: "[kendoFileSelect]", inputs: ["dir", "disabled", "multiple", "restrictions", "accept", "required"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
3214
3237
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FileSelectComponent, decorators: [{
3215
3238
  type: Component,
3216
3239
  args: [{
@@ -3279,6 +3302,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
3279
3302
  [restrictions]="restrictions"
3280
3303
  [multiple]="multiple"
3281
3304
  [disabled]="disabled"
3305
+ [required]="isControlRequired"
3282
3306
  />
3283
3307
  </div>
3284
3308
  <div class="k-dropzone-hint">{{textFor('dropFilesHere')}}</div>
@@ -3293,7 +3317,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
3293
3317
  </ul>
3294
3318
  `
3295
3319
  }]
3296
- }], ctorParameters: function () { return [{ type: UploadService }, { type: i1$1.LocalizationService }, { type: NavigationService }, { type: DropZoneService }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }]; }, propDecorators: { accept: [{
3320
+ }], ctorParameters: function () { return [{ type: UploadService }, { type: i1$1.LocalizationService }, { type: NavigationService }, { type: DropZoneService }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.Injector }]; }, propDecorators: { accept: [{
3297
3321
  type: Input
3298
3322
  }], disabled: [{
3299
3323
  type: Input
@@ -3590,7 +3614,7 @@ let idx = 0;
3590
3614
  * Represents the [Kendo UI Upload component for Angular]({% slug overview_upload %}).
3591
3615
  */
3592
3616
  class UploadComponent {
3593
- constructor(uploadService, localization, navigation, dropZoneService, zone, renderer, cdr, wrapper) {
3617
+ constructor(uploadService, localization, navigation, dropZoneService, zone, renderer, cdr, wrapper, injector) {
3594
3618
  this.uploadService = uploadService;
3595
3619
  this.localization = localization;
3596
3620
  this.navigation = navigation;
@@ -3598,6 +3622,7 @@ class UploadComponent {
3598
3622
  this.zone = zone;
3599
3623
  this.renderer = renderer;
3600
3624
  this.cdr = cdr;
3625
+ this.injector = injector;
3601
3626
  /**
3602
3627
  * Enables the chunk functionality of the Upload.
3603
3628
  *
@@ -3878,6 +3903,19 @@ class UploadComponent {
3878
3903
  get dir() {
3879
3904
  return this.direction;
3880
3905
  }
3906
+ /**
3907
+ * @hidden
3908
+ */
3909
+ get formControl() {
3910
+ const ngControl = this.injector.get(NgControl, null);
3911
+ return (ngControl === null || ngControl === void 0 ? void 0 : ngControl.control) || null;
3912
+ }
3913
+ /**
3914
+ * @hidden
3915
+ */
3916
+ get isControlRequired() {
3917
+ return isControlRequired(this.formControl);
3918
+ }
3881
3919
  ngOnInit() {
3882
3920
  this.verifySettings();
3883
3921
  const { buttonId } = this.getIds();
@@ -4204,7 +4242,7 @@ class UploadComponent {
4204
4242
  }));
4205
4243
  }
4206
4244
  }
4207
- UploadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UploadComponent, deps: [{ token: UploadService }, { token: i1$1.LocalizationService }, { token: NavigationService }, { token: DropZoneService }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
4245
+ UploadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UploadComponent, deps: [{ token: UploadService }, { token: i1$1.LocalizationService }, { token: NavigationService }, { token: DropZoneService }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
4208
4246
  UploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: UploadComponent, selector: "kendo-upload", inputs: { autoUpload: "autoUpload", batch: "batch", withCredentials: "withCredentials", saveField: "saveField", saveHeaders: "saveHeaders", saveMethod: "saveMethod", saveUrl: "saveUrl", responseType: "responseType", removeField: "removeField", removeHeaders: "removeHeaders", removeMethod: "removeMethod", removeUrl: "removeUrl", chunkable: "chunkable", concurrent: "concurrent", multiple: "multiple", disabled: "disabled", showFileList: "showFileList", tabindex: "tabindex", zoneId: "zoneId", tabIndex: "tabIndex", accept: "accept", restrictions: "restrictions", focusableId: "focusableId", actionsLayout: "actionsLayout" }, outputs: { onBlur: "blur", cancel: "cancel", clear: "clear", complete: "complete", error: "error", onFocus: "focus", pause: "pause", remove: "remove", resume: "resume", select: "select", success: "success", upload: "upload", uploadProgress: "uploadProgress", valueChange: "valueChange" }, host: { properties: { "class.k-upload": "this.hostDefaultClasses", "attr.role": "this.hostRole", "class.k-disabled": "this.hostDisabledClass", "attr.dir": "this.dir" } }, providers: [
4209
4247
  LocalizationService,
4210
4248
  NavigationService,
@@ -4307,7 +4345,8 @@ UploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
4307
4345
  [accept]="accept"
4308
4346
  [restrictions]="restrictions"
4309
4347
  [multiple]="multiple"
4310
- [disabled]="disabled" />
4348
+ [disabled]="disabled"
4349
+ [required]="isControlRequired" />
4311
4350
  </div>
4312
4351
  <kendo-upload-status-total *ngIf="showTotalStatus"
4313
4352
  class="k-upload-status"
@@ -4327,7 +4366,7 @@ UploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
4327
4366
  [disabled]="disabled"
4328
4367
  [actionsLayout]="actionsLayout">
4329
4368
  </kendo-upload-action-buttons>
4330
- `, isInline: true, components: [{ type: i5.ButtonComponent, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: UploadStatusTotalComponent, selector: "kendo-upload-status-total", inputs: ["fileList"] }, { type: FileListComponent, selector: "[kendo-upload-file-list]", inputs: ["disabled", "fileList", "fileTemplate", "fileInfoTemplate"] }, { type: UploadActionButtonsComponent, selector: "kendo-upload-action-buttons", inputs: ["disabled", "actionsLayout"] }], directives: [{ type: LocalizedMessagesDirective, selector: "\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n " }, { type: DropZoneInternalDirective, selector: "\n [kendoUploadInternalDropZone],\n [kendoFileSelectInternalDropZone]\n ", inputs: ["disabled", "multiple", "restrictions"] }, { type: FileSelectDirective, selector: "[kendoFileSelect]", inputs: ["dir", "disabled", "multiple", "restrictions", "accept"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
4369
+ `, isInline: true, components: [{ type: i5.ButtonComponent, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: UploadStatusTotalComponent, selector: "kendo-upload-status-total", inputs: ["fileList"] }, { type: FileListComponent, selector: "[kendo-upload-file-list]", inputs: ["disabled", "fileList", "fileTemplate", "fileInfoTemplate"] }, { type: UploadActionButtonsComponent, selector: "kendo-upload-action-buttons", inputs: ["disabled", "actionsLayout"] }], directives: [{ type: LocalizedMessagesDirective, selector: "\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n " }, { type: DropZoneInternalDirective, selector: "\n [kendoUploadInternalDropZone],\n [kendoFileSelectInternalDropZone]\n ", inputs: ["disabled", "multiple", "restrictions"] }, { type: FileSelectDirective, selector: "[kendoFileSelect]", inputs: ["dir", "disabled", "multiple", "restrictions", "accept", "required"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
4331
4370
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UploadComponent, decorators: [{
4332
4371
  type: Component,
4333
4372
  args: [{
@@ -4436,7 +4475,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
4436
4475
  [accept]="accept"
4437
4476
  [restrictions]="restrictions"
4438
4477
  [multiple]="multiple"
4439
- [disabled]="disabled" />
4478
+ [disabled]="disabled"
4479
+ [required]="isControlRequired" />
4440
4480
  </div>
4441
4481
  <kendo-upload-status-total *ngIf="showTotalStatus"
4442
4482
  class="k-upload-status"
@@ -4458,7 +4498,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
4458
4498
  </kendo-upload-action-buttons>
4459
4499
  `
4460
4500
  }]
4461
- }], ctorParameters: function () { return [{ type: UploadService }, { type: i1$1.LocalizationService }, { type: NavigationService }, { type: DropZoneService }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }]; }, propDecorators: { autoUpload: [{
4501
+ }], ctorParameters: function () { return [{ type: UploadService }, { type: i1$1.LocalizationService }, { type: NavigationService }, { type: DropZoneService }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.Injector }]; }, propDecorators: { autoUpload: [{
4462
4502
  type: Input
4463
4503
  }], batch: [{
4464
4504
  type: Input
@@ -6,9 +6,9 @@ import * as i1 from '@angular/common/http';
6
6
  import { HttpHeaders, HttpRequest, HttpEventType, HttpResponse } from '@angular/common/http';
7
7
  import * as i0 from '@angular/core';
8
8
  import { EventEmitter, Injectable, Directive, Input, HostBinding, HostListener, Component, ViewChildren, forwardRef, Inject, ElementRef, ContentChild, ViewChild, Output, isDevMode, NgModule } from '@angular/core';
9
- import { guid, Keys, isDocumentAvailable, KendoInput, isChanged } from '@progress/kendo-angular-common';
9
+ import { guid, Keys, isControlRequired, isDocumentAvailable, KendoInput, isChanged } from '@progress/kendo-angular-common';
10
10
  import { fileAudioIcon, fileVideoIcon, fileImageIcon, fileTxtIcon, filePresentationIcon, fileDataIcon, fileProgrammingIcon, filePdfIcon, fileConfigIcon, fileZipIcon, fileDiscImageIcon, arrowRotateCwSmallIcon, playSmIcon, pauseSmIcon, cancelIcon, xIcon, fileIcon, copyIcon, checkIcon, exclamationCircleIcon, uploadIcon } from '@progress/kendo-svg-icons';
11
- import { NG_VALUE_ACCESSOR } from '@angular/forms';
11
+ import { NG_VALUE_ACCESSOR, NgControl } from '@angular/forms';
12
12
  import * as i1$1 from '@progress/kendo-angular-l10n';
13
13
  import { ComponentMessages, LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
14
14
  import { fromEvent, merge } from 'rxjs';
@@ -1510,8 +1510,8 @@ const packageMetadata = {
1510
1510
  name: '@progress/kendo-angular-upload',
1511
1511
  productName: 'Kendo UI for Angular',
1512
1512
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
1513
- publishDate: 1712142336,
1514
- version: '15.4.0',
1513
+ publishDate: 1712152306,
1514
+ version: '15.5.0-develop.1',
1515
1515
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
1516
1516
  };
1517
1517
 
@@ -2727,6 +2727,9 @@ class FileSelectDirective {
2727
2727
  get acceptAttribute() {
2728
2728
  return this.accept ? this.accept : null;
2729
2729
  }
2730
+ get requiredAttribute() {
2731
+ return this.required ? "" : null;
2732
+ }
2730
2733
  onInputChange(event) {
2731
2734
  const ua = navigator.userAgent;
2732
2735
  const webkit = /(webkit)[ \/]([\w.]+)/i;
@@ -2754,7 +2757,7 @@ class FileSelectDirective {
2754
2757
  }
2755
2758
  }
2756
2759
  FileSelectDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FileSelectDirective, deps: [{ token: UploadService }, { token: NavigationService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
2757
- FileSelectDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: FileSelectDirective, selector: "[kendoFileSelect]", inputs: { dir: "dir", disabled: "disabled", multiple: "multiple", restrictions: "restrictions", accept: "accept" }, host: { listeners: { "change": "onInputChange($event)" }, properties: { "attr.type": "this.type", "attr.autocomplete": "this.autocomplete", "attr.tabindex": "this.tabIndex", "attr.aria-hidden": "this.ariaHidden", "class.k-hidden": "this.classNames", "attr.name": "this.nameAttribute", "attr.multiple": "this.multipleAttribute", "attr.dir": "this.dirAttribute", "attr.disabled": "this.disabledAttribute", "attr.accept": "this.acceptAttribute" } }, ngImport: i0 });
2760
+ FileSelectDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: FileSelectDirective, selector: "[kendoFileSelect]", inputs: { dir: "dir", disabled: "disabled", multiple: "multiple", restrictions: "restrictions", accept: "accept", required: "required" }, host: { listeners: { "change": "onInputChange($event)" }, properties: { "attr.type": "this.type", "attr.autocomplete": "this.autocomplete", "attr.tabindex": "this.tabIndex", "attr.aria-hidden": "this.ariaHidden", "class.k-hidden": "this.classNames", "attr.name": "this.nameAttribute", "attr.multiple": "this.multipleAttribute", "attr.dir": "this.dirAttribute", "attr.disabled": "this.disabledAttribute", "attr.accept": "this.acceptAttribute", "attr.required": "this.requiredAttribute" } }, ngImport: i0 });
2758
2761
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FileSelectDirective, decorators: [{
2759
2762
  type: Directive,
2760
2763
  args: [{
@@ -2770,6 +2773,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
2770
2773
  type: Input
2771
2774
  }], accept: [{
2772
2775
  type: Input
2776
+ }], required: [{
2777
+ type: Input
2773
2778
  }], type: [{
2774
2779
  type: HostBinding,
2775
2780
  args: ["attr.type"]
@@ -2800,6 +2805,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
2800
2805
  }], acceptAttribute: [{
2801
2806
  type: HostBinding,
2802
2807
  args: ["attr.accept"]
2808
+ }], requiredAttribute: [{
2809
+ type: HostBinding,
2810
+ args: ["attr.required"]
2803
2811
  }], onInputChange: [{
2804
2812
  type: HostListener,
2805
2813
  args: ["change", ["$event"]]
@@ -2815,7 +2823,7 @@ const FILESELECT_VALUE_ACCESSOR = {
2815
2823
  };
2816
2824
  let idx$1 = 0;
2817
2825
  class FileSelectComponent {
2818
- constructor(uploadService, localization, navigation, dropZoneService, ngZone, renderer, cdr, wrapper) {
2826
+ constructor(uploadService, localization, navigation, dropZoneService, ngZone, renderer, cdr, wrapper, injector) {
2819
2827
  this.uploadService = uploadService;
2820
2828
  this.localization = localization;
2821
2829
  this.navigation = navigation;
@@ -2823,6 +2831,7 @@ class FileSelectComponent {
2823
2831
  this.ngZone = ngZone;
2824
2832
  this.renderer = renderer;
2825
2833
  this.cdr = cdr;
2834
+ this.injector = injector;
2826
2835
  /**
2827
2836
  * Disables the FileSelect.
2828
2837
  * To learn how to disable the component in reactive forms, refer to the article on [Forms Support](slug:formssupport_fileselect#toc-managing-the-fileselect-disabled-state-in-reactive-forms).
@@ -2922,6 +2931,19 @@ class FileSelectComponent {
2922
2931
  get hostRole() {
2923
2932
  return 'application';
2924
2933
  }
2934
+ /**
2935
+ * @hidden
2936
+ */
2937
+ get formControl() {
2938
+ const ngControl = this.injector.get(NgControl, null);
2939
+ return ngControl?.control || null;
2940
+ }
2941
+ /**
2942
+ * @hidden
2943
+ */
2944
+ get isControlRequired() {
2945
+ return isControlRequired(this.formControl);
2946
+ }
2925
2947
  ngOnInit() {
2926
2948
  const { buttonId, inputId } = this.getIds();
2927
2949
  this.focusableId = buttonId;
@@ -3133,7 +3155,7 @@ class FileSelectComponent {
3133
3155
  this.uploadService.component = 'FileSelect';
3134
3156
  }
3135
3157
  }
3136
- FileSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FileSelectComponent, deps: [{ token: UploadService }, { token: i1$1.LocalizationService }, { token: NavigationService }, { token: DropZoneService }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
3158
+ FileSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FileSelectComponent, deps: [{ token: UploadService }, { token: i1$1.LocalizationService }, { token: NavigationService }, { token: DropZoneService }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
3137
3159
  FileSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: FileSelectComponent, selector: "kendo-fileselect", inputs: { accept: "accept", disabled: "disabled", multiple: "multiple", name: "name", showFileList: "showFileList", tabindex: "tabindex", restrictions: "restrictions", zoneId: "zoneId", focusableId: "focusableId" }, outputs: { onBlur: "blur", onFocus: "focus", select: "select", remove: "remove", valueChange: "valueChange" }, host: { properties: { "class.k-upload": "this.hostDefaultClasses", "class.k-disabled": "this.hostDisabledClass", "attr.dir": "this.dir", "attr.role": "this.hostRole" } }, providers: [
3138
3160
  LocalizationService,
3139
3161
  NavigationService,
@@ -3196,6 +3218,7 @@ FileSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
3196
3218
  [restrictions]="restrictions"
3197
3219
  [multiple]="multiple"
3198
3220
  [disabled]="disabled"
3221
+ [required]="isControlRequired"
3199
3222
  />
3200
3223
  </div>
3201
3224
  <div class="k-dropzone-hint">{{textFor('dropFilesHere')}}</div>
@@ -3208,7 +3231,7 @@ FileSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
3208
3231
  [fileTemplate]="fileTemplate"
3209
3232
  [fileInfoTemplate]="fileInfoTemplate">
3210
3233
  </ul>
3211
- `, isInline: true, components: [{ type: i5.ButtonComponent, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: FileListComponent, selector: "[kendo-upload-file-list]", inputs: ["disabled", "fileList", "fileTemplate", "fileInfoTemplate"] }], directives: [{ type: LocalizedMessagesDirective, selector: "\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n " }, { type: DropZoneInternalDirective, selector: "\n [kendoUploadInternalDropZone],\n [kendoFileSelectInternalDropZone]\n ", inputs: ["disabled", "multiple", "restrictions"] }, { type: FileSelectDirective, selector: "[kendoFileSelect]", inputs: ["dir", "disabled", "multiple", "restrictions", "accept"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
3234
+ `, isInline: true, components: [{ type: i5.ButtonComponent, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: FileListComponent, selector: "[kendo-upload-file-list]", inputs: ["disabled", "fileList", "fileTemplate", "fileInfoTemplate"] }], directives: [{ type: LocalizedMessagesDirective, selector: "\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n " }, { type: DropZoneInternalDirective, selector: "\n [kendoUploadInternalDropZone],\n [kendoFileSelectInternalDropZone]\n ", inputs: ["disabled", "multiple", "restrictions"] }, { type: FileSelectDirective, selector: "[kendoFileSelect]", inputs: ["dir", "disabled", "multiple", "restrictions", "accept", "required"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
3212
3235
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FileSelectComponent, decorators: [{
3213
3236
  type: Component,
3214
3237
  args: [{
@@ -3277,6 +3300,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
3277
3300
  [restrictions]="restrictions"
3278
3301
  [multiple]="multiple"
3279
3302
  [disabled]="disabled"
3303
+ [required]="isControlRequired"
3280
3304
  />
3281
3305
  </div>
3282
3306
  <div class="k-dropzone-hint">{{textFor('dropFilesHere')}}</div>
@@ -3291,7 +3315,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
3291
3315
  </ul>
3292
3316
  `
3293
3317
  }]
3294
- }], ctorParameters: function () { return [{ type: UploadService }, { type: i1$1.LocalizationService }, { type: NavigationService }, { type: DropZoneService }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }]; }, propDecorators: { accept: [{
3318
+ }], ctorParameters: function () { return [{ type: UploadService }, { type: i1$1.LocalizationService }, { type: NavigationService }, { type: DropZoneService }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.Injector }]; }, propDecorators: { accept: [{
3295
3319
  type: Input
3296
3320
  }], disabled: [{
3297
3321
  type: Input
@@ -3589,7 +3613,7 @@ let idx = 0;
3589
3613
  * Represents the [Kendo UI Upload component for Angular]({% slug overview_upload %}).
3590
3614
  */
3591
3615
  class UploadComponent {
3592
- constructor(uploadService, localization, navigation, dropZoneService, zone, renderer, cdr, wrapper) {
3616
+ constructor(uploadService, localization, navigation, dropZoneService, zone, renderer, cdr, wrapper, injector) {
3593
3617
  this.uploadService = uploadService;
3594
3618
  this.localization = localization;
3595
3619
  this.navigation = navigation;
@@ -3597,6 +3621,7 @@ class UploadComponent {
3597
3621
  this.zone = zone;
3598
3622
  this.renderer = renderer;
3599
3623
  this.cdr = cdr;
3624
+ this.injector = injector;
3600
3625
  /**
3601
3626
  * Enables the chunk functionality of the Upload.
3602
3627
  *
@@ -3877,6 +3902,19 @@ class UploadComponent {
3877
3902
  get dir() {
3878
3903
  return this.direction;
3879
3904
  }
3905
+ /**
3906
+ * @hidden
3907
+ */
3908
+ get formControl() {
3909
+ const ngControl = this.injector.get(NgControl, null);
3910
+ return ngControl?.control || null;
3911
+ }
3912
+ /**
3913
+ * @hidden
3914
+ */
3915
+ get isControlRequired() {
3916
+ return isControlRequired(this.formControl);
3917
+ }
3880
3918
  ngOnInit() {
3881
3919
  this.verifySettings();
3882
3920
  const { buttonId } = this.getIds();
@@ -4203,7 +4241,7 @@ class UploadComponent {
4203
4241
  }));
4204
4242
  }
4205
4243
  }
4206
- UploadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UploadComponent, deps: [{ token: UploadService }, { token: i1$1.LocalizationService }, { token: NavigationService }, { token: DropZoneService }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
4244
+ UploadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UploadComponent, deps: [{ token: UploadService }, { token: i1$1.LocalizationService }, { token: NavigationService }, { token: DropZoneService }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
4207
4245
  UploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: UploadComponent, selector: "kendo-upload", inputs: { autoUpload: "autoUpload", batch: "batch", withCredentials: "withCredentials", saveField: "saveField", saveHeaders: "saveHeaders", saveMethod: "saveMethod", saveUrl: "saveUrl", responseType: "responseType", removeField: "removeField", removeHeaders: "removeHeaders", removeMethod: "removeMethod", removeUrl: "removeUrl", chunkable: "chunkable", concurrent: "concurrent", multiple: "multiple", disabled: "disabled", showFileList: "showFileList", tabindex: "tabindex", zoneId: "zoneId", tabIndex: "tabIndex", accept: "accept", restrictions: "restrictions", focusableId: "focusableId", actionsLayout: "actionsLayout" }, outputs: { onBlur: "blur", cancel: "cancel", clear: "clear", complete: "complete", error: "error", onFocus: "focus", pause: "pause", remove: "remove", resume: "resume", select: "select", success: "success", upload: "upload", uploadProgress: "uploadProgress", valueChange: "valueChange" }, host: { properties: { "class.k-upload": "this.hostDefaultClasses", "attr.role": "this.hostRole", "class.k-disabled": "this.hostDisabledClass", "attr.dir": "this.dir" } }, providers: [
4208
4246
  LocalizationService,
4209
4247
  NavigationService,
@@ -4306,7 +4344,8 @@ UploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
4306
4344
  [accept]="accept"
4307
4345
  [restrictions]="restrictions"
4308
4346
  [multiple]="multiple"
4309
- [disabled]="disabled" />
4347
+ [disabled]="disabled"
4348
+ [required]="isControlRequired" />
4310
4349
  </div>
4311
4350
  <kendo-upload-status-total *ngIf="showTotalStatus"
4312
4351
  class="k-upload-status"
@@ -4326,7 +4365,7 @@ UploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
4326
4365
  [disabled]="disabled"
4327
4366
  [actionsLayout]="actionsLayout">
4328
4367
  </kendo-upload-action-buttons>
4329
- `, isInline: true, components: [{ type: i5.ButtonComponent, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: UploadStatusTotalComponent, selector: "kendo-upload-status-total", inputs: ["fileList"] }, { type: FileListComponent, selector: "[kendo-upload-file-list]", inputs: ["disabled", "fileList", "fileTemplate", "fileInfoTemplate"] }, { type: UploadActionButtonsComponent, selector: "kendo-upload-action-buttons", inputs: ["disabled", "actionsLayout"] }], directives: [{ type: LocalizedMessagesDirective, selector: "\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n " }, { type: DropZoneInternalDirective, selector: "\n [kendoUploadInternalDropZone],\n [kendoFileSelectInternalDropZone]\n ", inputs: ["disabled", "multiple", "restrictions"] }, { type: FileSelectDirective, selector: "[kendoFileSelect]", inputs: ["dir", "disabled", "multiple", "restrictions", "accept"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
4368
+ `, isInline: true, components: [{ type: i5.ButtonComponent, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: UploadStatusTotalComponent, selector: "kendo-upload-status-total", inputs: ["fileList"] }, { type: FileListComponent, selector: "[kendo-upload-file-list]", inputs: ["disabled", "fileList", "fileTemplate", "fileInfoTemplate"] }, { type: UploadActionButtonsComponent, selector: "kendo-upload-action-buttons", inputs: ["disabled", "actionsLayout"] }], directives: [{ type: LocalizedMessagesDirective, selector: "\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n " }, { type: DropZoneInternalDirective, selector: "\n [kendoUploadInternalDropZone],\n [kendoFileSelectInternalDropZone]\n ", inputs: ["disabled", "multiple", "restrictions"] }, { type: FileSelectDirective, selector: "[kendoFileSelect]", inputs: ["dir", "disabled", "multiple", "restrictions", "accept", "required"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
4330
4369
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UploadComponent, decorators: [{
4331
4370
  type: Component,
4332
4371
  args: [{
@@ -4435,7 +4474,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
4435
4474
  [accept]="accept"
4436
4475
  [restrictions]="restrictions"
4437
4476
  [multiple]="multiple"
4438
- [disabled]="disabled" />
4477
+ [disabled]="disabled"
4478
+ [required]="isControlRequired" />
4439
4479
  </div>
4440
4480
  <kendo-upload-status-total *ngIf="showTotalStatus"
4441
4481
  class="k-upload-status"
@@ -4457,7 +4497,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
4457
4497
  </kendo-upload-action-buttons>
4458
4498
  `
4459
4499
  }]
4460
- }], ctorParameters: function () { return [{ type: UploadService }, { type: i1$1.LocalizationService }, { type: NavigationService }, { type: DropZoneService }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }]; }, propDecorators: { autoUpload: [{
4500
+ }], ctorParameters: function () { return [{ type: UploadService }, { type: i1$1.LocalizationService }, { type: NavigationService }, { type: DropZoneService }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.Injector }]; }, propDecorators: { autoUpload: [{
4461
4501
  type: Input
4462
4502
  }], batch: [{
4463
4503
  type: Input
@@ -19,6 +19,7 @@ export declare class FileSelectDirective {
19
19
  multiple: boolean;
20
20
  restrictions: FileRestrictions;
21
21
  accept: string;
22
+ required: boolean;
22
23
  type: string;
23
24
  autocomplete: string;
24
25
  tabIndex: number;
@@ -31,7 +32,8 @@ export declare class FileSelectDirective {
31
32
  get dirAttribute(): string;
32
33
  get disabledAttribute(): string;
33
34
  get acceptAttribute(): string;
35
+ get requiredAttribute(): string;
34
36
  onInputChange(event: any): void;
35
37
  static ɵfac: i0.ɵɵFactoryDeclaration<FileSelectDirective, never>;
36
- static ɵdir: i0.ɵɵDirectiveDeclaration<FileSelectDirective, "[kendoFileSelect]", never, { "dir": "dir"; "disabled": "disabled"; "multiple": "multiple"; "restrictions": "restrictions"; "accept": "accept"; }, {}, never>;
38
+ static ɵdir: i0.ɵɵDirectiveDeclaration<FileSelectDirective, "[kendoFileSelect]", never, { "dir": "dir"; "disabled": "disabled"; "multiple": "multiple"; "restrictions": "restrictions"; "accept": "accept"; "required": "required"; }, {}, never>;
37
39
  }
@@ -2,8 +2,9 @@
2
2
  * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- import { OnDestroy, Renderer2, ElementRef, EventEmitter, NgZone, OnInit, ChangeDetectorRef } from "@angular/core";
5
+ import { OnDestroy, Renderer2, ElementRef, EventEmitter, NgZone, OnInit, ChangeDetectorRef, Injector } from "@angular/core";
6
6
  import { FileRestrictions, FileInfo } from './types';
7
+ import { FormControl } from '@angular/forms';
7
8
  import { LocalizationService } from '@progress/kendo-angular-l10n';
8
9
  import { UploadService } from './upload.service';
9
10
  import { FileMap } from './types/file-map';
@@ -26,6 +27,7 @@ export declare class FileSelectComponent implements OnInit, OnDestroy {
26
27
  private ngZone;
27
28
  private renderer;
28
29
  private cdr;
30
+ private injector;
29
31
  /**
30
32
  * Sets the `accept` attribute of the `input` element of the FileSelect.
31
33
  */
@@ -99,6 +101,14 @@ export declare class FileSelectComponent implements OnInit, OnDestroy {
99
101
  get hostDisabledClass(): boolean;
100
102
  get dir(): string;
101
103
  get hostRole(): string;
104
+ /**
105
+ * @hidden
106
+ */
107
+ get formControl(): FormControl;
108
+ /**
109
+ * @hidden
110
+ */
111
+ get isControlRequired(): boolean;
102
112
  /**
103
113
  * @hidden
104
114
  */
@@ -113,7 +123,7 @@ export declare class FileSelectComponent implements OnInit, OnDestroy {
113
123
  private selectButtonFocusSubscription;
114
124
  private localizationChangeSubscription;
115
125
  private subs;
116
- constructor(uploadService: UploadService, localization: LocalizationService, navigation: NavigationService, dropZoneService: DropZoneService, ngZone: NgZone, renderer: Renderer2, cdr: ChangeDetectorRef, wrapper: ElementRef);
126
+ constructor(uploadService: UploadService, localization: LocalizationService, navigation: NavigationService, dropZoneService: DropZoneService, ngZone: NgZone, renderer: Renderer2, cdr: ChangeDetectorRef, wrapper: ElementRef, injector: Injector);
117
127
  ngOnInit(): void;
118
128
  /**
119
129
  * @hidden
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-upload",
3
- "version": "15.4.0",
3
+ "version": "15.5.0-develop.1",
4
4
  "description": "Kendo UI Angular Upload Component",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Progress",
@@ -24,16 +24,16 @@
24
24
  "@angular/forms": "13 - 17",
25
25
  "@angular/platform-browser": "13 - 17",
26
26
  "@progress/kendo-licensing": "^1.0.2",
27
- "@progress/kendo-angular-common": "15.4.0",
28
- "@progress/kendo-angular-l10n": "15.4.0",
29
- "@progress/kendo-angular-icons": "15.4.0",
30
- "@progress/kendo-angular-buttons": "15.4.0",
31
- "@progress/kendo-angular-progressbar": "15.4.0",
27
+ "@progress/kendo-angular-common": "15.5.0-develop.1",
28
+ "@progress/kendo-angular-l10n": "15.5.0-develop.1",
29
+ "@progress/kendo-angular-icons": "15.5.0-develop.1",
30
+ "@progress/kendo-angular-buttons": "15.5.0-develop.1",
31
+ "@progress/kendo-angular-progressbar": "15.5.0-develop.1",
32
32
  "rxjs": "^6.5.3 || ^7.0.0"
33
33
  },
34
34
  "dependencies": {
35
35
  "tslib": "^2.3.1",
36
- "@progress/kendo-angular-schematics": "15.4.0"
36
+ "@progress/kendo-angular-schematics": "15.5.0-develop.1"
37
37
  },
38
38
  "schematics": "./schematics/collection.json",
39
39
  "module": "fesm2015/progress-kendo-angular-upload.mjs",
@@ -10,9 +10,9 @@ function default_1(options) {
10
10
  ], peerDependencies: {
11
11
  // peer dep of the icons
12
12
  '@progress/kendo-svg-icons': '^2.0.0',
13
- '@progress/kendo-angular-buttons': '15.4.0',
14
- '@progress/kendo-angular-progressbar': '15.4.0',
15
- '@progress/kendo-angular-popup': '15.4.0',
13
+ '@progress/kendo-angular-buttons': '15.5.0-develop.1',
14
+ '@progress/kendo-angular-progressbar': '15.5.0-develop.1',
15
+ '@progress/kendo-angular-popup': '15.5.0-develop.1',
16
16
  } });
17
17
  return (0, schematics_1.externalSchematic)('@progress/kendo-angular-schematics', 'ng-add', finalOptions);
18
18
  }
@@ -3,8 +3,8 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { HttpHeaders } from '@angular/common/http';
6
- import { ElementRef, EventEmitter, NgZone, OnDestroy, OnInit, Renderer2, ChangeDetectorRef } from '@angular/core';
7
- import { ControlValueAccessor } from '@angular/forms';
6
+ import { ElementRef, EventEmitter, NgZone, OnDestroy, OnInit, Renderer2, ChangeDetectorRef, Injector } from '@angular/core';
7
+ import { ControlValueAccessor, FormControl } from '@angular/forms';
8
8
  import { LocalizationService } from '@progress/kendo-angular-l10n';
9
9
  import { Direction } from './types/direction';
10
10
  import { FileInfo, FileRestrictions } from './types';
@@ -33,6 +33,7 @@ export declare class UploadComponent implements OnInit, OnDestroy, ControlValueA
33
33
  private zone;
34
34
  private renderer;
35
35
  private cdr;
36
+ private injector;
36
37
  /**
37
38
  * By default, the selected files are immediately uploaded
38
39
  * ([see example]({% slug fileprocessing_upload %}#toc-automatic-upload-of-files)).
@@ -240,6 +241,14 @@ export declare class UploadComponent implements OnInit, OnDestroy, ControlValueA
240
241
  get hostRole(): string;
241
242
  get hostDisabledClass(): boolean;
242
243
  get dir(): string;
244
+ /**
245
+ * @hidden
246
+ */
247
+ get formControl(): FormControl;
248
+ /**
249
+ * @hidden
250
+ */
251
+ get isControlRequired(): boolean;
243
252
  /**
244
253
  * @hidden
245
254
  */
@@ -253,7 +262,7 @@ export declare class UploadComponent implements OnInit, OnDestroy, ControlValueA
253
262
  private selectButtonFocusSubscription;
254
263
  private localizationChangeSubscription;
255
264
  private subs;
256
- constructor(uploadService: UploadService, localization: LocalizationService, navigation: NavigationService, dropZoneService: DropZoneService, zone: NgZone, renderer: Renderer2, cdr: ChangeDetectorRef, wrapper: ElementRef);
265
+ constructor(uploadService: UploadService, localization: LocalizationService, navigation: NavigationService, dropZoneService: DropZoneService, zone: NgZone, renderer: Renderer2, cdr: ChangeDetectorRef, wrapper: ElementRef, injector: Injector);
257
266
  ngOnInit(): void;
258
267
  ngOnChanges(changes: any): void;
259
268
  ngOnDestroy(): void;