@progress/kendo-angular-upload 25.1.0-develop.1 → 25.1.0-develop.10

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.
@@ -5,13 +5,13 @@
5
5
  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
- import { EventEmitter, Injectable, Directive, ElementRef, Output, HostBinding, Input, ViewChild, ContentChild, Component, HostListener, ViewChildren, Inject, forwardRef, isDevMode, NgModule } from '@angular/core';
9
- import { guid, isDocumentAvailable, normalizeKeys, Keys, isControlRequired, isChanged, KendoInput, KENDO_WEBMCP_HOST, provideComponentName, ResizeBatchService } from '@progress/kendo-angular-common';
8
+ import { EventEmitter, Injectable, Directive, signal, ElementRef, Output, HostBinding, Input, ViewChild, ContentChild, ChangeDetectionStrategy, Component, HostListener, ViewChildren, Inject, forwardRef, isDevMode, NgModule } from '@angular/core';
9
+ import { guid, isDocumentAvailable, normalizeKeys, Keys, isControlRequired, KendoInput, KENDO_WEBMCP_HOST, provideComponentName, ResizeBatchService } from '@progress/kendo-angular-common';
10
10
  import { fileCsvIcon, filePsdIcon, fileDiscImageIcon, fileZipIcon, fileConfigIcon, filePdfIcon, fileProgrammingIcon, fileDataIcon, filePresentationIcon, fileTxtIcon, fileImageIcon, fileVideoIcon, fileAudioIcon, fileIcon, arrowRotateCwIcon, playIcon, pauseIcon, cancelIcon, xIcon, copyIcon, checkIcon, exclamationCircleIcon, uploadIcon } from '@progress/kendo-svg-icons';
11
11
  import { NgControl, NG_VALUE_ACCESSOR } 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
- import { fromEvent, merge } from 'rxjs';
14
+ import { merge, fromEvent } from 'rxjs';
15
15
  import { filter } from 'rxjs/operators';
16
16
  import { validatePackage } from '@progress/kendo-licensing';
17
17
  import { trigger, state, style, transition, animate } from '@angular/animations';
@@ -1591,8 +1591,8 @@ const packageMetadata = {
1591
1591
  productName: 'Kendo UI for Angular',
1592
1592
  productCode: 'KENDOUIANGULAR',
1593
1593
  productCodes: ['KENDOUIANGULAR'],
1594
- publishDate: 1786626659,
1595
- version: '25.1.0-develop.1',
1594
+ publishDate: 1787669927,
1595
+ version: '25.1.0-develop.10',
1596
1596
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
1597
1597
  };
1598
1598
 
@@ -1688,50 +1688,85 @@ class UploadFileSelectBase {
1688
1688
  /**
1689
1689
  * Sets the `accept` attribute of the internal `input` element of the component.
1690
1690
  */
1691
- accept;
1691
+ set accept(value) {
1692
+ this._accept.set(value);
1693
+ }
1694
+ get accept() {
1695
+ return this._accept();
1696
+ }
1692
1697
  /**
1693
1698
  * Disables the component.
1694
1699
  *
1695
1700
  * @default false
1696
1701
  */
1697
- disabled = false;
1702
+ set disabled(value) {
1703
+ this._disabled.set(value);
1704
+ }
1705
+ get disabled() {
1706
+ return this._disabled();
1707
+ }
1698
1708
  /**
1699
1709
  * Allows you to select multiple files.
1700
1710
  * When you set this to `false`, you can select only one file at a time.
1701
1711
  *
1702
1712
  * @default true
1703
1713
  */
1704
- multiple = true;
1714
+ set multiple(value) {
1715
+ this._multiple.set(value);
1716
+ }
1717
+ get multiple() {
1718
+ return this._multiple();
1719
+ }
1705
1720
  /**
1706
1721
  * Controls the visibility of the file list.
1707
1722
  *
1708
1723
  * @default true
1709
1724
  */
1710
- showFileList = true;
1725
+ set showFileList(value) {
1726
+ this._showFileList.set(value);
1727
+ }
1728
+ get showFileList() {
1729
+ return this._showFileList();
1730
+ }
1711
1731
  /**
1712
1732
  * Sets the [`tabindex`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the component.
1713
1733
  *
1714
1734
  * @default 0
1715
1735
  */
1716
- tabindex = 0;
1736
+ set tabindex(value) {
1737
+ this._tabindex.set(value);
1738
+ }
1739
+ get tabindex() {
1740
+ return this._tabindex();
1741
+ }
1717
1742
  /**
1718
1743
  * Sets the restrictions for selected files.
1719
1744
  */
1720
1745
  set restrictions(restrictions) {
1721
1746
  const parsedRestrictions = Object.assign({}, this.restrictions, restrictions);
1722
- this._restrictions = parsedRestrictions;
1747
+ this._restrictionsSignal.set(parsedRestrictions);
1723
1748
  }
1724
1749
  get restrictions() {
1725
- return this._restrictions;
1750
+ return this._restrictionsSignal();
1726
1751
  }
1727
1752
  /**
1728
1753
  * Sets the `id` of the external drop zone that you want to associate with the component.
1729
1754
  */
1730
- zoneId;
1755
+ set zoneId(value) {
1756
+ this._zoneId.set(value);
1757
+ }
1758
+ get zoneId() {
1759
+ return this._zoneId();
1760
+ }
1731
1761
  /**
1732
1762
  * @hidden
1733
1763
  */
1734
- focusableId = `k-${guid()}`;
1764
+ set focusableId(value) {
1765
+ this._focusableId.set(value);
1766
+ }
1767
+ get focusableId() {
1768
+ return this._focusableId();
1769
+ }
1735
1770
  /**
1736
1771
  * @hidden
1737
1772
  */
@@ -1768,14 +1803,18 @@ class UploadFileSelectBase {
1768
1803
  * Fires when you are about to remove a file. If you prevent this event, the file will remain in the list.
1769
1804
  */
1770
1805
  remove = new EventEmitter();
1771
- /**
1772
- * @hidden
1773
- */
1774
- _restrictions = {
1806
+ _accept = signal(undefined, ...(ngDevMode ? [{ debugName: "_accept" }] : []));
1807
+ _disabled = signal(false, ...(ngDevMode ? [{ debugName: "_disabled" }] : []));
1808
+ _multiple = signal(true, ...(ngDevMode ? [{ debugName: "_multiple" }] : []));
1809
+ _showFileList = signal(true, ...(ngDevMode ? [{ debugName: "_showFileList" }] : []));
1810
+ _tabindex = signal(0, ...(ngDevMode ? [{ debugName: "_tabindex" }] : []));
1811
+ _restrictionsSignal = signal({
1775
1812
  allowedExtensions: [],
1776
1813
  maxFileSize: 0,
1777
1814
  minFileSize: 0
1778
- };
1815
+ }, ...(ngDevMode ? [{ debugName: "_restrictionsSignal" }] : []));
1816
+ _zoneId = signal(undefined, ...(ngDevMode ? [{ debugName: "_zoneId" }] : []));
1817
+ _focusableId = signal(`k-${guid()}`, ...(ngDevMode ? [{ debugName: "_focusableId" }] : []));
1779
1818
  /**
1780
1819
  * @hidden
1781
1820
  */
@@ -1827,6 +1866,8 @@ class UploadFileSelectBase {
1827
1866
  if (newValue === null) {
1828
1867
  this.fileList.clear();
1829
1868
  }
1869
+ // FileMap state is managed by UploadService and is not signal-tracked;
1870
+ // explicit markForCheck is required to update the view after writeValue.
1830
1871
  this.cdr.markForCheck();
1831
1872
  }
1832
1873
  onTouchedCallback = (_) => { };
@@ -1847,7 +1888,7 @@ class UploadFileSelectBase {
1847
1888
  * @hidden
1848
1889
  */
1849
1890
  setDisabledState(isDisabled) {
1850
- this.disabled = isDisabled;
1891
+ this._disabled.set(isDisabled);
1851
1892
  }
1852
1893
  /**
1853
1894
  * @hidden
@@ -1953,8 +1994,18 @@ class UploadActionButtonsComponent {
1953
1994
  uploadService;
1954
1995
  localization;
1955
1996
  navigation;
1956
- disabled;
1957
- actionsLayout;
1997
+ set disabled(value) {
1998
+ this._disabled.set(value);
1999
+ }
2000
+ get disabled() {
2001
+ return this._disabled();
2002
+ }
2003
+ set actionsLayout(value) {
2004
+ this._actionsLayout.set(value);
2005
+ }
2006
+ get actionsLayout() {
2007
+ return this._actionsLayout();
2008
+ }
1958
2009
  clearButton;
1959
2010
  uploadButton;
1960
2011
  hostDefaultClass = true;
@@ -1971,6 +2022,8 @@ class UploadActionButtonsComponent {
1971
2022
  get actionButtonsCenterClassName() {
1972
2023
  return this.actionsLayout === 'center';
1973
2024
  }
2025
+ _disabled = signal(false, ...(ngDevMode ? [{ debugName: "_disabled" }] : []));
2026
+ _actionsLayout = signal('end', ...(ngDevMode ? [{ debugName: "_actionsLayout" }] : []));
1974
2027
  constructor(uploadService, localization, navigation) {
1975
2028
  this.uploadService = uploadService;
1976
2029
  this.localization = localization;
@@ -2015,7 +2068,7 @@ class UploadActionButtonsComponent {
2015
2068
  (click)="onUploadButtonClick($event)">
2016
2069
  <span class="k-button-text">{{textFor('uploadSelectedFiles')}}</span>
2017
2070
  </button>
2018
- `, isInline: true });
2071
+ `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
2019
2072
  }
2020
2073
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: UploadActionButtonsComponent, decorators: [{
2021
2074
  type: Component,
@@ -2032,7 +2085,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImpo
2032
2085
  <span class="k-button-text">{{textFor('uploadSelectedFiles')}}</span>
2033
2086
  </button>
2034
2087
  `,
2035
- standalone: true
2088
+ standalone: true,
2089
+ changeDetection: ChangeDetectionStrategy.OnPush
2036
2090
  }]
2037
2091
  }], ctorParameters: () => [{ type: UploadService }, { type: i1$1.LocalizationService }, { type: NavigationService }], propDecorators: { disabled: [{
2038
2092
  type: Input
@@ -2174,7 +2228,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImpo
2174
2228
  class FileListItemBase {
2175
2229
  uploadService;
2176
2230
  cdr;
2177
- progressComplete = 0;
2231
+ _progressComplete = signal(0, ...(ngDevMode ? [{ debugName: "_progressComplete" }] : []));
2232
+ get progressComplete() {
2233
+ return this._progressComplete();
2234
+ }
2235
+ set progressComplete(value) {
2236
+ this._progressComplete.set(value);
2237
+ }
2178
2238
  localization;
2179
2239
  uploadProgressSubscription;
2180
2240
  constructor(uploadService, cdr) {
@@ -2183,12 +2243,11 @@ class FileListItemBase {
2183
2243
  }
2184
2244
  subscribeUploadProgress(uploadProgressHandler) {
2185
2245
  this.uploadProgressSubscription = this.uploadService.uploadProgressEvent.subscribe((args) => {
2186
- const previousProgress = this.progressComplete;
2187
2246
  uploadProgressHandler(args);
2188
- if (this.progressComplete !== previousProgress) {
2189
- this.cdr.markForCheck();
2190
- }
2191
2247
  });
2248
+ this.uploadProgressSubscription.add(merge(this.uploadService.successEvent, this.uploadService.errorEvent, this.uploadService.cancelEvent, this.uploadService.pauseEvent, this.uploadService.resumeEvent).subscribe(() => {
2249
+ this.cdr.markForCheck();
2250
+ }));
2192
2251
  }
2193
2252
  fileHasValidationErrors(file) {
2194
2253
  return fileHasValidationErrors(file);
@@ -2227,18 +2286,45 @@ class FileListItemActionButtonComponent {
2227
2286
  uploadService;
2228
2287
  localization;
2229
2288
  navigation;
2230
- file;
2231
- disabled;
2232
- progress;
2289
+ cdr;
2290
+ set file(value) {
2291
+ this._file.set(value);
2292
+ }
2293
+ get file() {
2294
+ return this._file();
2295
+ }
2296
+ set disabled(value) {
2297
+ this._disabled.set(value);
2298
+ }
2299
+ get disabled() {
2300
+ return this._disabled();
2301
+ }
2302
+ set progress(value) {
2303
+ this._progress.set(value);
2304
+ }
2305
+ get progress() {
2306
+ return this._progress();
2307
+ }
2233
2308
  retrySVGIcon = arrowRotateCwIcon;
2234
2309
  playSVGIcon = playIcon;
2235
2310
  pauseSVGIcon = pauseIcon;
2236
2311
  cancelSVGIcon = cancelIcon;
2237
2312
  deleteSVGIcon = xIcon;
2238
- constructor(uploadService, localization, navigation) {
2313
+ _file = signal(undefined, ...(ngDevMode ? [{ debugName: "_file" }] : []));
2314
+ _disabled = signal(false, ...(ngDevMode ? [{ debugName: "_disabled" }] : []));
2315
+ _progress = signal(0, ...(ngDevMode ? [{ debugName: "_progress" }] : []));
2316
+ subs;
2317
+ constructor(uploadService, localization, navigation, cdr) {
2239
2318
  this.uploadService = uploadService;
2240
2319
  this.localization = localization;
2241
2320
  this.navigation = navigation;
2321
+ this.cdr = cdr;
2322
+ this.subs = merge(this.uploadService.successEvent, this.uploadService.errorEvent, this.uploadService.cancelEvent, this.uploadService.pauseEvent, this.uploadService.resumeEvent).subscribe(() => {
2323
+ this.cdr.markForCheck();
2324
+ });
2325
+ }
2326
+ ngOnDestroy() {
2327
+ this.subs.unsubscribe();
2242
2328
  }
2243
2329
  onRetryClick() {
2244
2330
  if (this.disabled) {
@@ -2309,7 +2395,7 @@ class FileListItemActionButtonComponent {
2309
2395
  }
2310
2396
  return true;
2311
2397
  }
2312
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: FileListItemActionButtonComponent, deps: [{ token: UploadService }, { token: i1$1.LocalizationService }, { token: NavigationService }], target: i0.ɵɵFactoryTarget.Component });
2398
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: FileListItemActionButtonComponent, deps: [{ token: UploadService }, { token: i1$1.LocalizationService }, { token: NavigationService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
2313
2399
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.27", type: FileListItemActionButtonComponent, isStandalone: true, selector: "kendo-upload-file-list-item-action-button", inputs: { file: "file", disabled: "disabled", progress: "progress" }, ngImport: i0, template: `
2314
2400
  <span class="k-upload-actions">
2315
2401
  @if (isUploading || isPaused) {
@@ -2365,7 +2451,7 @@ class FileListItemActionButtonComponent {
2365
2451
  ></button>
2366
2452
  }
2367
2453
  </span>
2368
- `, isInline: true, dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconPosition", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
2454
+ `, isInline: true, dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconPosition", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2369
2455
  }
2370
2456
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: FileListItemActionButtonComponent, decorators: [{
2371
2457
  type: Component,
@@ -2428,9 +2514,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImpo
2428
2514
  </span>
2429
2515
  `,
2430
2516
  standalone: true,
2431
- imports: [ButtonComponent]
2517
+ imports: [ButtonComponent],
2518
+ changeDetection: ChangeDetectionStrategy.OnPush
2432
2519
  }]
2433
- }], ctorParameters: () => [{ type: UploadService }, { type: i1$1.LocalizationService }, { type: NavigationService }], propDecorators: { file: [{
2520
+ }], ctorParameters: () => [{ type: UploadService }, { type: i1$1.LocalizationService }, { type: NavigationService }, { type: i0.ChangeDetectorRef }], propDecorators: { file: [{
2434
2521
  type: Input
2435
2522
  }], disabled: [{
2436
2523
  type: Input
@@ -2443,11 +2530,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImpo
2443
2530
  */
2444
2531
  class FileListMultipleItemsComponent extends FileListItemBase {
2445
2532
  localization;
2446
- disabled;
2447
- files;
2448
- fileInfoTemplate;
2533
+ set disabled(value) {
2534
+ this._disabled.set(value);
2535
+ }
2536
+ get disabled() {
2537
+ return this._disabled();
2538
+ }
2539
+ set files(value) {
2540
+ this._files.set(value);
2541
+ }
2542
+ get files() {
2543
+ return this._files();
2544
+ }
2545
+ set fileInfoTemplate(value) {
2546
+ this._fileInfoTemplate.set(value);
2547
+ }
2548
+ get fileInfoTemplate() {
2549
+ return this._fileInfoTemplate();
2550
+ }
2449
2551
  filesHaveErrors;
2450
2552
  copySVGIcon = copyIcon;
2553
+ _disabled = signal(false, ...(ngDevMode ? [{ debugName: "_disabled" }] : []));
2554
+ _files = signal([], ...(ngDevMode ? [{ debugName: "_files" }] : []));
2555
+ _fileInfoTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_fileInfoTemplate" }] : []));
2451
2556
  constructor(localization, uploadService, cdr) {
2452
2557
  super(uploadService, cdr);
2453
2558
  this.localization = localization;
@@ -2545,7 +2650,7 @@ class FileListMultipleItemsComponent extends FileListItemBase {
2545
2650
  transition('inactive => active', style({ opacity: 1 })),
2546
2651
  transition('active => inactive', animate('1s 2s ease-out'))
2547
2652
  ])
2548
- ] });
2653
+ ], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2549
2654
  }
2550
2655
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: FileListMultipleItemsComponent, decorators: [{
2551
2656
  type: Component,
@@ -2610,7 +2715,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImpo
2610
2715
  </kendo-upload-file-list-item-action-button>
2611
2716
  `,
2612
2717
  standalone: true,
2613
- imports: [ProgressBarComponent, IconWrapperComponent, NgClass, NgTemplateOutlet, FileListItemActionButtonComponent]
2718
+ imports: [ProgressBarComponent, IconWrapperComponent, NgClass, NgTemplateOutlet, FileListItemActionButtonComponent],
2719
+ changeDetection: ChangeDetectionStrategy.OnPush
2614
2720
  }]
2615
2721
  }], ctorParameters: () => [{ type: i1$1.LocalizationService }, { type: UploadService }, { type: i0.ChangeDetectorRef }], propDecorators: { disabled: [{
2616
2722
  type: Input
@@ -2625,9 +2731,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImpo
2625
2731
  */
2626
2732
  class FileListSingleItemComponent extends FileListItemBase {
2627
2733
  localization;
2628
- disabled;
2629
- file;
2630
- fileInfoTemplate;
2734
+ set disabled(value) {
2735
+ this._disabled.set(value);
2736
+ }
2737
+ get disabled() {
2738
+ return this._disabled();
2739
+ }
2740
+ set file(value) {
2741
+ this._file.set(value);
2742
+ }
2743
+ get file() {
2744
+ return this._file();
2745
+ }
2746
+ set fileInfoTemplate(value) {
2747
+ this._fileInfoTemplate.set(value);
2748
+ }
2749
+ get fileInfoTemplate() {
2750
+ return this._fileInfoTemplate();
2751
+ }
2752
+ _disabled = signal(false, ...(ngDevMode ? [{ debugName: "_disabled" }] : []));
2753
+ _file = signal(undefined, ...(ngDevMode ? [{ debugName: "_file" }] : []));
2754
+ _fileInfoTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_fileInfoTemplate" }] : []));
2631
2755
  constructor(localization, uploadService, cdr) {
2632
2756
  super(uploadService, cdr);
2633
2757
  this.localization = localization;
@@ -2717,7 +2841,7 @@ class FileListSingleItemComponent extends FileListItemBase {
2717
2841
  transition('inactive => active', style({ opacity: 1 })),
2718
2842
  transition('active => inactive', animate('1s 2s ease-out'))
2719
2843
  ])
2720
- ] });
2844
+ ], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2721
2845
  }
2722
2846
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: FileListSingleItemComponent, decorators: [{
2723
2847
  type: Component,
@@ -2773,7 +2897,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImpo
2773
2897
  </kendo-upload-file-list-item-action-button>
2774
2898
  `,
2775
2899
  standalone: true,
2776
- imports: [ProgressBarComponent, IconWrapperComponent, NgClass, NgTemplateOutlet, FileListItemActionButtonComponent]
2900
+ imports: [ProgressBarComponent, IconWrapperComponent, NgClass, NgTemplateOutlet, FileListItemActionButtonComponent],
2901
+ changeDetection: ChangeDetectionStrategy.OnPush
2777
2902
  }]
2778
2903
  }], ctorParameters: () => [{ type: i1$1.LocalizationService }, { type: UploadService }, { type: i0.ChangeDetectorRef }], propDecorators: { disabled: [{
2779
2904
  type: Input
@@ -2789,12 +2914,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImpo
2789
2914
  class FileListComponent {
2790
2915
  uploadService;
2791
2916
  navigation;
2792
- disabled;
2793
- fileList;
2794
- fileTemplate;
2795
- fileInfoTemplate;
2917
+ set disabled(value) {
2918
+ this._disabled.set(value);
2919
+ }
2920
+ get disabled() {
2921
+ return this._disabled();
2922
+ }
2923
+ set fileList(value) {
2924
+ this._fileList.set(value);
2925
+ }
2926
+ get fileList() {
2927
+ return this._fileList();
2928
+ }
2929
+ set fileTemplate(value) {
2930
+ this._fileTemplate.set(value);
2931
+ }
2932
+ get fileTemplate() {
2933
+ return this._fileTemplate();
2934
+ }
2935
+ set fileInfoTemplate(value) {
2936
+ this._fileInfoTemplate.set(value);
2937
+ }
2938
+ get fileInfoTemplate() {
2939
+ return this._fileInfoTemplate();
2940
+ }
2796
2941
  fileListItems;
2797
2942
  fileListRole = 'list';
2943
+ _disabled = signal(false, ...(ngDevMode ? [{ debugName: "_disabled" }] : []));
2944
+ _fileList = signal([], ...(ngDevMode ? [{ debugName: "_fileList" }] : []));
2945
+ _fileTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_fileTemplate" }] : []));
2946
+ _fileInfoTemplate = signal(undefined, ...(ngDevMode ? [{ debugName: "_fileInfoTemplate" }] : []));
2798
2947
  focusSubscription;
2799
2948
  actionSubscription;
2800
2949
  constructor(uploadService, navigation) {
@@ -2901,7 +3050,7 @@ class FileListComponent {
2901
3050
  }
2902
3051
  </li>
2903
3052
  }
2904
- `, isInline: true, dependencies: [{ kind: "directive", type: FileListItemDirective, selector: "[kendoUploadFileListItem]", inputs: ["files", "index"] }, { kind: "component", type: FileListSingleItemComponent, selector: "kendo-upload-file-list-single-item", inputs: ["disabled", "file", "fileInfoTemplate"] }, { kind: "component", type: FileListMultipleItemsComponent, selector: "kendo-upload-file-list-multiple-items", inputs: ["disabled", "files", "fileInfoTemplate"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
3053
+ `, isInline: true, dependencies: [{ kind: "directive", type: FileListItemDirective, selector: "[kendoUploadFileListItem]", inputs: ["files", "index"] }, { kind: "component", type: FileListSingleItemComponent, selector: "kendo-upload-file-list-single-item", inputs: ["disabled", "file", "fileInfoTemplate"] }, { kind: "component", type: FileListMultipleItemsComponent, selector: "kendo-upload-file-list-multiple-items", inputs: ["disabled", "files", "fileInfoTemplate"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2905
3054
  }
2906
3055
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: FileListComponent, decorators: [{
2907
3056
  type: Component,
@@ -2936,7 +3085,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImpo
2936
3085
  }
2937
3086
  `,
2938
3087
  standalone: true,
2939
- imports: [FileListItemDirective, FileListSingleItemComponent, FileListMultipleItemsComponent, NgTemplateOutlet]
3088
+ imports: [FileListItemDirective, FileListSingleItemComponent, FileListMultipleItemsComponent, NgTemplateOutlet],
3089
+ changeDetection: ChangeDetectionStrategy.OnPush
2940
3090
  }]
2941
3091
  }], ctorParameters: () => [{ type: UploadService }, { type: NavigationService }], propDecorators: { disabled: [{
2942
3092
  type: Input
@@ -2959,59 +3109,72 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImpo
2959
3109
  */
2960
3110
  class UploadStatusTotalComponent {
2961
3111
  localization;
3112
+ uploadService;
2962
3113
  fileList;
2963
- isFailed;
2964
- isPaused;
2965
- isUploading;
2966
- statusText;
2967
3114
  checkmarkIcon = checkIcon;
2968
3115
  exceptionSVGIcon = exclamationCircleIcon;
2969
3116
  uploadSVGIcon = uploadIcon;
2970
3117
  pauseSVGIcon = pauseIcon;
2971
- constructor(localization) {
3118
+ _isFailed = signal(false, ...(ngDevMode ? [{ debugName: "_isFailed" }] : []));
3119
+ _isPaused = signal(false, ...(ngDevMode ? [{ debugName: "_isPaused" }] : []));
3120
+ _isUploading = signal(false, ...(ngDevMode ? [{ debugName: "_isUploading" }] : []));
3121
+ subs;
3122
+ constructor(localization, uploadService) {
2972
3123
  this.localization = localization;
3124
+ this.uploadService = uploadService;
3125
+ }
3126
+ ngOnInit() {
3127
+ this._isPaused.set(this.fileList.hasFileWithState([FileState.Paused]));
3128
+ this._isFailed.set(this.fileList.hasFileWithState([FileState.Failed]));
3129
+ this._isUploading.set(this.fileList.hasFileWithState([FileState.Uploading]));
3130
+ this.subs = merge(this.uploadService.cancelEvent, this.uploadService.clearEvent, this.uploadService.completeEvent, this.uploadService.errorEvent, this.uploadService.pauseEvent, this.uploadService.resumeEvent, this.uploadService.successEvent, this.uploadService.selectEvent, this.uploadService.uploadProgressEvent).subscribe(() => {
3131
+ this._isPaused.set(this.fileList.hasFileWithState([FileState.Paused]));
3132
+ this._isFailed.set(this.fileList.hasFileWithState([FileState.Failed]));
3133
+ this._isUploading.set(this.fileList.hasFileWithState([FileState.Uploading]));
3134
+ });
3135
+ }
3136
+ ngOnDestroy() {
3137
+ this.subs.unsubscribe();
2973
3138
  }
2974
3139
  get iconClass() {
2975
- if (!this.isUploading && !this.isFailed) {
3140
+ if (this._isPaused() && !this._isUploading()) {
3141
+ return 'pause';
3142
+ }
3143
+ if (!this._isUploading() && !this._isFailed()) {
2976
3144
  return 'checkmark';
2977
3145
  }
2978
- if (!this.isUploading && this.isFailed) {
3146
+ if (!this._isUploading() && this._isFailed()) {
2979
3147
  return 'exception';
2980
3148
  }
2981
- if (this.isUploading) {
3149
+ if (this._isUploading()) {
2982
3150
  return 'upload';
2983
3151
  }
2984
- if (this.isPaused) {
2985
- return 'pause';
2986
- }
2987
3152
  }
2988
3153
  get SVGIconClass() {
2989
- if (!this.isUploading && !this.isFailed) {
3154
+ if (this._isPaused() && !this._isUploading()) {
3155
+ return this.pauseSVGIcon;
3156
+ }
3157
+ if (!this._isUploading() && !this._isFailed()) {
2990
3158
  return this.checkmarkIcon;
2991
3159
  }
2992
- if (!this.isUploading && this.isFailed) {
3160
+ if (!this._isUploading() && this._isFailed()) {
2993
3161
  return this.exceptionSVGIcon;
2994
3162
  }
2995
- if (this.isUploading) {
3163
+ if (this._isUploading()) {
2996
3164
  return this.uploadSVGIcon;
2997
3165
  }
2998
- if (this.isPaused) {
2999
- return this.pauseSVGIcon;
3000
- }
3001
3166
  }
3002
- ngDoCheck() {
3003
- this.isPaused = this.fileList.hasFileWithState([FileState.Paused]);
3004
- this.isFailed = this.fileList.hasFileWithState([FileState.Failed]);
3005
- this.isUploading = this.fileList.hasFileWithState([FileState.Uploading]);
3006
- if (this.isPaused && !this.isUploading) {
3007
- this.statusText = this.localization.get('headerStatusPaused');
3167
+ get statusText() {
3168
+ if (this._isPaused() && !this._isUploading()) {
3169
+ return this.localization.get('headerStatusPaused');
3008
3170
  }
3009
3171
  else {
3010
- this.statusText = this.isUploading ? this.localization.get('headerStatusUploading')
3172
+ return this._isUploading()
3173
+ ? this.localization.get('headerStatusUploading')
3011
3174
  : this.localization.get('headerStatusUploaded');
3012
3175
  }
3013
3176
  }
3014
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: UploadStatusTotalComponent, deps: [{ token: i1$1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
3177
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: UploadStatusTotalComponent, deps: [{ token: i1$1.LocalizationService }, { token: UploadService }], target: i0.ɵɵFactoryTarget.Component });
3015
3178
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.27", type: UploadStatusTotalComponent, isStandalone: true, selector: "kendo-upload-status-total", inputs: { fileList: "fileList" }, ngImport: i0, template: `
3016
3179
  <kendo-icon-wrapper
3017
3180
  [name]="iconClass"
@@ -3019,7 +3182,7 @@ class UploadStatusTotalComponent {
3019
3182
  >
3020
3183
  </kendo-icon-wrapper>
3021
3184
  {{statusText}}
3022
- `, isInline: true, dependencies: [{ kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }] });
3185
+ `, isInline: true, dependencies: [{ kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3023
3186
  }
3024
3187
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: UploadStatusTotalComponent, decorators: [{
3025
3188
  type: Component,
@@ -3034,9 +3197,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImpo
3034
3197
  {{statusText}}
3035
3198
  `,
3036
3199
  standalone: true,
3037
- imports: [IconWrapperComponent]
3200
+ imports: [IconWrapperComponent],
3201
+ changeDetection: ChangeDetectionStrategy.OnPush
3038
3202
  }]
3039
- }], ctorParameters: () => [{ type: i1$1.LocalizationService }], propDecorators: { fileList: [{
3203
+ }], ctorParameters: () => [{ type: i1$1.LocalizationService }, { type: UploadService }], propDecorators: { fileList: [{
3040
3204
  type: Input
3041
3205
  }] } });
3042
3206
 
@@ -3337,127 +3501,253 @@ class Messages extends ComponentMessages {
3337
3501
  *
3338
3502
  * @default 'Cancel'
3339
3503
  */
3340
- cancel;
3504
+ set cancel(value) {
3505
+ this._cancel.set(value);
3506
+ }
3507
+ get cancel() {
3508
+ return this._cancel();
3509
+ }
3341
3510
  /**
3342
3511
  * Sets the text for the **Clear** button.
3343
3512
  *
3344
3513
  * @default 'Clear'
3345
3514
  */
3346
- clearSelectedFiles;
3515
+ set clearSelectedFiles(value) {
3516
+ this._clearSelectedFiles.set(value);
3517
+ }
3518
+ get clearSelectedFiles() {
3519
+ return this._clearSelectedFiles();
3520
+ }
3347
3521
  /**
3348
3522
  * Sets the drop-zone hint.
3349
3523
  *
3350
3524
  * @default 'Drop files here to upload'
3351
3525
  */
3352
- dropFilesHere;
3526
+ set dropFilesHere(value) {
3527
+ this._dropFilesHere.set(value);
3528
+ }
3529
+ get dropFilesHere() {
3530
+ return this._dropFilesHere();
3531
+ }
3353
3532
  /**
3354
3533
  * Sets the external drop-zone hint.
3355
3534
  *
3356
3535
  * @default 'Drag and drop files here to upload'
3357
3536
  */
3358
- externalDropFilesHere;
3537
+ set externalDropFilesHere(value) {
3538
+ this._externalDropFilesHere.set(value);
3539
+ }
3540
+ get externalDropFilesHere() {
3541
+ return this._externalDropFilesHere();
3542
+ }
3359
3543
  /**
3360
3544
  * Sets the status message for a batch of files.
3361
3545
  *
3362
3546
  * @default 'files'
3363
3547
  */
3364
- filesBatchStatus;
3548
+ set filesBatchStatus(value) {
3549
+ this._filesBatchStatus.set(value);
3550
+ }
3551
+ get filesBatchStatus() {
3552
+ return this._filesBatchStatus();
3553
+ }
3365
3554
  /**
3366
3555
  * Sets the status message for a batch of files after failed upload.
3367
3556
  *
3368
3557
  * @default 'files failed to upload.'
3369
3558
  */
3370
- filesBatchStatusFailed;
3559
+ set filesBatchStatusFailed(value) {
3560
+ this._filesBatchStatusFailed.set(value);
3561
+ }
3562
+ get filesBatchStatusFailed() {
3563
+ return this._filesBatchStatusFailed();
3564
+ }
3371
3565
  /**
3372
3566
  * Sets the status message for a batch of files after successful upload.
3373
3567
  *
3374
3568
  * @default 'files successfully uploaded.'
3375
3569
  */
3376
- filesBatchStatusUploaded;
3570
+ set filesBatchStatusUploaded(value) {
3571
+ this._filesBatchStatusUploaded.set(value);
3572
+ }
3573
+ get filesBatchStatusUploaded() {
3574
+ return this._filesBatchStatusUploaded();
3575
+ }
3377
3576
  /**
3378
3577
  * Sets the file status message after failed upload.
3379
3578
  *
3380
3579
  * @default 'File failed to upload.'
3381
3580
  */
3382
- fileStatusFailed;
3581
+ set fileStatusFailed(value) {
3582
+ this._fileStatusFailed.set(value);
3583
+ }
3584
+ get fileStatusFailed() {
3585
+ return this._fileStatusFailed();
3586
+ }
3383
3587
  /**
3384
3588
  * Sets the file status message after successful upload.
3385
3589
  *
3386
3590
  * @default 'File successfully uploaded.'
3387
3591
  */
3388
- fileStatusUploaded;
3592
+ set fileStatusUploaded(value) {
3593
+ this._fileStatusUploaded.set(value);
3594
+ }
3595
+ get fileStatusUploaded() {
3596
+ return this._fileStatusUploaded();
3597
+ }
3389
3598
  /**
3390
3599
  * Sets the header status message when the file upload is paused.
3391
3600
  *
3392
3601
  * @default 'Paused'
3393
3602
  */
3394
- headerStatusPaused;
3603
+ set headerStatusPaused(value) {
3604
+ this._headerStatusPaused.set(value);
3605
+ }
3606
+ get headerStatusPaused() {
3607
+ return this._headerStatusPaused();
3608
+ }
3395
3609
  /**
3396
3610
  * Sets the header status message after the file upload completes.
3397
3611
  *
3398
3612
  * @default 'Done'
3399
3613
  */
3400
- headerStatusUploaded;
3614
+ set headerStatusUploaded(value) {
3615
+ this._headerStatusUploaded.set(value);
3616
+ }
3617
+ get headerStatusUploaded() {
3618
+ return this._headerStatusUploaded();
3619
+ }
3401
3620
  /**
3402
3621
  * Sets the header status message during the upload of the file.
3403
3622
  *
3404
3623
  * @default 'Uploading...'
3405
3624
  */
3406
- headerStatusUploading;
3625
+ set headerStatusUploading(value) {
3626
+ this._headerStatusUploading.set(value);
3627
+ }
3628
+ get headerStatusUploading() {
3629
+ return this._headerStatusUploading();
3630
+ }
3407
3631
  /**
3408
3632
  * Sets the text for the invalid `allowedExtensions` restriction message.
3409
3633
  *
3410
3634
  * @default 'File type not allowed.'
3411
3635
  */
3412
- invalidFileExtension;
3636
+ set invalidFileExtension(value) {
3637
+ this._invalidFileExtension.set(value);
3638
+ }
3639
+ get invalidFileExtension() {
3640
+ return this._invalidFileExtension();
3641
+ }
3413
3642
  /**
3414
3643
  * Sets the text for the invalid `maxFileSize` restriction message.
3415
3644
  *
3416
3645
  * @default 'File size too large.'
3417
3646
  */
3418
- invalidMaxFileSize;
3647
+ set invalidMaxFileSize(value) {
3648
+ this._invalidMaxFileSize.set(value);
3649
+ }
3650
+ get invalidMaxFileSize() {
3651
+ return this._invalidMaxFileSize();
3652
+ }
3419
3653
  /**
3420
3654
  * Sets the text for the invalid `minFileSize` restriction message.
3421
3655
  *
3422
3656
  * @default 'File size too small.'
3423
3657
  */
3424
- invalidMinFileSize;
3658
+ set invalidMinFileSize(value) {
3659
+ this._invalidMinFileSize.set(value);
3660
+ }
3661
+ get invalidMinFileSize() {
3662
+ return this._invalidMinFileSize();
3663
+ }
3425
3664
  /**
3426
3665
  * Sets the text for the **Pause** button.
3427
3666
  *
3428
3667
  * @default 'Pause'
3429
3668
  */
3430
- pause;
3669
+ set pause(value) {
3670
+ this._pause.set(value);
3671
+ }
3672
+ get pause() {
3673
+ return this._pause();
3674
+ }
3431
3675
  /**
3432
3676
  * Sets the text for the **Remove** button.
3433
3677
  *
3434
3678
  * @default 'Remove'
3435
3679
  */
3436
- remove;
3680
+ set remove(value) {
3681
+ this._remove.set(value);
3682
+ }
3683
+ get remove() {
3684
+ return this._remove();
3685
+ }
3437
3686
  /**
3438
3687
  * Sets the text for the **Resume** button.
3439
3688
  *
3440
3689
  * @default 'Resume'
3441
3690
  */
3442
- resume;
3691
+ set resume(value) {
3692
+ this._resume.set(value);
3693
+ }
3694
+ get resume() {
3695
+ return this._resume();
3696
+ }
3443
3697
  /**
3444
3698
  * Sets the text for the **Retry** button.
3445
3699
  *
3446
3700
  * @default 'Retry'
3447
3701
  */
3448
- retry;
3702
+ set retry(value) {
3703
+ this._retry.set(value);
3704
+ }
3705
+ get retry() {
3706
+ return this._retry();
3707
+ }
3449
3708
  /**
3450
3709
  * Sets the text for the **Select** button.
3451
3710
  *
3452
3711
  * @default 'Select files...'
3453
3712
  */
3454
- select;
3713
+ set select(value) {
3714
+ this._select.set(value);
3715
+ }
3716
+ get select() {
3717
+ return this._select();
3718
+ }
3455
3719
  /**
3456
3720
  * Sets the text for the **Upload files** button.
3457
3721
  *
3458
3722
  * @default 'Upload'
3459
3723
  */
3460
- uploadSelectedFiles;
3724
+ set uploadSelectedFiles(value) {
3725
+ this._uploadSelectedFiles.set(value);
3726
+ }
3727
+ get uploadSelectedFiles() {
3728
+ return this._uploadSelectedFiles();
3729
+ }
3730
+ _cancel = signal(undefined, ...(ngDevMode ? [{ debugName: "_cancel" }] : []));
3731
+ _clearSelectedFiles = signal(undefined, ...(ngDevMode ? [{ debugName: "_clearSelectedFiles" }] : []));
3732
+ _dropFilesHere = signal(undefined, ...(ngDevMode ? [{ debugName: "_dropFilesHere" }] : []));
3733
+ _externalDropFilesHere = signal(undefined, ...(ngDevMode ? [{ debugName: "_externalDropFilesHere" }] : []));
3734
+ _filesBatchStatus = signal(undefined, ...(ngDevMode ? [{ debugName: "_filesBatchStatus" }] : []));
3735
+ _filesBatchStatusFailed = signal(undefined, ...(ngDevMode ? [{ debugName: "_filesBatchStatusFailed" }] : []));
3736
+ _filesBatchStatusUploaded = signal(undefined, ...(ngDevMode ? [{ debugName: "_filesBatchStatusUploaded" }] : []));
3737
+ _fileStatusFailed = signal(undefined, ...(ngDevMode ? [{ debugName: "_fileStatusFailed" }] : []));
3738
+ _fileStatusUploaded = signal(undefined, ...(ngDevMode ? [{ debugName: "_fileStatusUploaded" }] : []));
3739
+ _headerStatusPaused = signal(undefined, ...(ngDevMode ? [{ debugName: "_headerStatusPaused" }] : []));
3740
+ _headerStatusUploaded = signal(undefined, ...(ngDevMode ? [{ debugName: "_headerStatusUploaded" }] : []));
3741
+ _headerStatusUploading = signal(undefined, ...(ngDevMode ? [{ debugName: "_headerStatusUploading" }] : []));
3742
+ _invalidFileExtension = signal(undefined, ...(ngDevMode ? [{ debugName: "_invalidFileExtension" }] : []));
3743
+ _invalidMaxFileSize = signal(undefined, ...(ngDevMode ? [{ debugName: "_invalidMaxFileSize" }] : []));
3744
+ _invalidMinFileSize = signal(undefined, ...(ngDevMode ? [{ debugName: "_invalidMinFileSize" }] : []));
3745
+ _pause = signal(undefined, ...(ngDevMode ? [{ debugName: "_pause" }] : []));
3746
+ _remove = signal(undefined, ...(ngDevMode ? [{ debugName: "_remove" }] : []));
3747
+ _resume = signal(undefined, ...(ngDevMode ? [{ debugName: "_resume" }] : []));
3748
+ _retry = signal(undefined, ...(ngDevMode ? [{ debugName: "_retry" }] : []));
3749
+ _select = signal(undefined, ...(ngDevMode ? [{ debugName: "_select" }] : []));
3750
+ _uploadSelectedFiles = signal(undefined, ...(ngDevMode ? [{ debugName: "_uploadSelectedFiles" }] : []));
3461
3751
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: Messages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
3462
3752
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.27", type: Messages, isStandalone: true, inputs: { cancel: "cancel", clearSelectedFiles: "clearSelectedFiles", dropFilesHere: "dropFilesHere", externalDropFilesHere: "externalDropFilesHere", filesBatchStatus: "filesBatchStatus", filesBatchStatusFailed: "filesBatchStatusFailed", filesBatchStatusUploaded: "filesBatchStatusUploaded", fileStatusFailed: "fileStatusFailed", fileStatusUploaded: "fileStatusUploaded", headerStatusPaused: "headerStatusPaused", headerStatusUploaded: "headerStatusUploaded", headerStatusUploading: "headerStatusUploading", invalidFileExtension: "invalidFileExtension", invalidMaxFileSize: "invalidMaxFileSize", invalidMinFileSize: "invalidMinFileSize", pause: "pause", remove: "remove", resume: "resume", retry: "retry", select: "select", uploadSelectedFiles: "uploadSelectedFiles" }, usesInheritance: true, ngImport: i0 });
3463
3753
  }
@@ -3708,7 +3998,19 @@ class UploadComponent extends UploadFileSelectBase {
3708
3998
  *
3709
3999
  * @default false
3710
4000
  */
3711
- chunkable = false;
4001
+ set chunkable(value) {
4002
+ this._chunkable.set(value);
4003
+ if (typeof value === 'boolean') {
4004
+ this.uploadService.async.chunk = value;
4005
+ }
4006
+ if (typeof value === 'object' && value !== null) {
4007
+ this.uploadService.async.chunk = true;
4008
+ this.uploadService.chunk = Object.assign({}, this.uploadService.chunk, value);
4009
+ }
4010
+ }
4011
+ get chunkable() {
4012
+ return this._chunkable();
4013
+ }
3712
4014
  /**
3713
4015
  * Specifies whether selected files upload simultaneously or one by one.
3714
4016
  *
@@ -3720,12 +4022,6 @@ class UploadComponent extends UploadFileSelectBase {
3720
4022
  get concurrent() {
3721
4023
  return this.uploadService.async.concurrent;
3722
4024
  }
3723
- /**
3724
- * Specifies whether the file list is visible.
3725
- *
3726
- * @default true
3727
- */
3728
- showFileList = true;
3729
4025
  /**
3730
4026
  * @hidden
3731
4027
  */
@@ -3740,7 +4036,12 @@ class UploadComponent extends UploadFileSelectBase {
3740
4036
  *
3741
4037
  * @default 'end'
3742
4038
  */
3743
- actionsLayout = 'end';
4039
+ set actionsLayout(value) {
4040
+ this._actionsLayout.set(value);
4041
+ }
4042
+ get actionsLayout() {
4043
+ return this._actionsLayout();
4044
+ }
3744
4045
  fileSelectInput;
3745
4046
  /**
3746
4047
  * Fires when the upload is canceled while in progress.
@@ -3790,6 +4091,8 @@ class UploadComponent extends UploadFileSelectBase {
3790
4091
  direction;
3791
4092
  wrapper;
3792
4093
  fileListId;
4094
+ _chunkable = signal(false, ...(ngDevMode ? [{ debugName: "_chunkable" }] : []));
4095
+ _actionsLayout = signal('end', ...(ngDevMode ? [{ debugName: "_actionsLayout" }] : []));
3793
4096
  documentClick;
3794
4097
  blurSubscription;
3795
4098
  wrapperFocusSubscription;
@@ -3831,18 +4134,6 @@ class UploadComponent extends UploadFileSelectBase {
3831
4134
  this.subs.add(this.renderer.listen(this.wrapper, 'keydown', event => this.handleKeydown(event)));
3832
4135
  });
3833
4136
  }
3834
- ngOnChanges(changes) {
3835
- if (isChanged("chunkable", changes)) {
3836
- const newChunkable = changes.chunkable.currentValue;
3837
- if (typeof newChunkable === 'boolean') {
3838
- this.uploadService.async.chunk = newChunkable;
3839
- }
3840
- if (typeof newChunkable === "object" && newChunkable !== null) {
3841
- this.uploadService.async.chunk = true;
3842
- this.uploadService.chunk = Object.assign({}, this.uploadService.chunk, newChunkable);
3843
- }
3844
- }
3845
- }
3846
4137
  ngOnDestroy() {
3847
4138
  this.fileList.clear();
3848
4139
  if (this.zoneId) {
@@ -4042,13 +4333,16 @@ class UploadComponent extends UploadFileSelectBase {
4042
4333
  this.cancel.emit(args);
4043
4334
  });
4044
4335
  this.subs.add(this.uploadService.changeEvent.subscribe((files) => {
4336
+ this.cdr.markForCheck();
4045
4337
  this.onChangeCallback(files);
4046
4338
  this.valueChange.emit(files);
4047
4339
  }));
4048
4340
  this.subs.add(this.uploadService.clearEvent.subscribe((args) => {
4341
+ this.cdr.markForCheck();
4049
4342
  this.clear.emit(args);
4050
4343
  }));
4051
4344
  this.subs.add(this.uploadService.completeEvent.subscribe(() => {
4345
+ this.cdr.markForCheck();
4052
4346
  this.complete.emit();
4053
4347
  }));
4054
4348
  this.subs.add(this.uploadService.errorEvent.subscribe((args) => {
@@ -4056,15 +4350,19 @@ class UploadComponent extends UploadFileSelectBase {
4056
4350
  this.error.emit(args);
4057
4351
  }));
4058
4352
  this.subs.add(this.uploadService.pauseEvent.subscribe((args) => {
4353
+ this.cdr.markForCheck();
4059
4354
  this.pause.emit(args);
4060
4355
  }));
4061
4356
  this.subs.add(this.uploadService.removeEvent.subscribe((args) => {
4357
+ this.cdr.markForCheck();
4062
4358
  this.remove.emit(args);
4063
4359
  }));
4064
4360
  this.subs.add(this.uploadService.resumeEvent.subscribe((args) => {
4361
+ this.cdr.markForCheck();
4065
4362
  this.resume.emit(args);
4066
4363
  }));
4067
4364
  this.subs.add(this.uploadService.selectEvent.subscribe((args) => {
4365
+ this.cdr.markForCheck();
4068
4366
  this.select.emit(args);
4069
4367
  }));
4070
4368
  this.subs.add(this.uploadService.successEvent.subscribe((args) => {
@@ -4072,14 +4370,16 @@ class UploadComponent extends UploadFileSelectBase {
4072
4370
  this.success.emit(args);
4073
4371
  }));
4074
4372
  this.subs.add(this.uploadService.uploadEvent.subscribe((args) => {
4373
+ this.cdr.markForCheck();
4075
4374
  this.upload.emit(args);
4076
4375
  }));
4077
4376
  this.subs.add(this.uploadService.uploadProgressEvent.subscribe((args) => {
4377
+ this.cdr.markForCheck();
4078
4378
  this.uploadProgress.emit(args);
4079
4379
  }));
4080
4380
  }
4081
4381
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.27", 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 });
4082
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.27", type: UploadComponent, isStandalone: true, 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", showFileList: "showFileList", tabIndex: "tabIndex", actionsLayout: "actionsLayout" }, outputs: { cancel: "cancel", clear: "clear", complete: "complete", error: "error", pause: "pause", resume: "resume", success: "success", upload: "upload", uploadProgress: "uploadProgress", valueChange: "valueChange" }, host: { properties: { "attr.dir": "this.dir" } }, providers: [
4382
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.27", type: UploadComponent, isStandalone: true, 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", tabIndex: "tabIndex", actionsLayout: "actionsLayout" }, outputs: { cancel: "cancel", clear: "clear", complete: "complete", error: "error", pause: "pause", resume: "resume", success: "success", upload: "upload", uploadProgress: "uploadProgress", valueChange: "valueChange" }, host: { properties: { "attr.dir": "this.dir" } }, providers: [
4083
4383
  LocalizationService,
4084
4384
  NavigationService,
4085
4385
  UploadService,
@@ -4098,7 +4398,7 @@ class UploadComponent extends UploadFileSelectBase {
4098
4398
  useExisting: forwardRef(() => UploadComponent)
4099
4399
  },
4100
4400
  provideComponentName('upload')
4101
- ], viewQueries: [{ propertyName: "fileSelectInput", first: true, predicate: ["fileSelectInput"], descendants: true, static: true }], exportAs: ["kendoUpload"], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: `
4401
+ ], viewQueries: [{ propertyName: "fileSelectInput", first: true, predicate: ["fileSelectInput"], descendants: true, static: true }], exportAs: ["kendoUpload"], usesInheritance: true, ngImport: i0, template: `
4102
4402
  <ng-container kendoUploadLocalizedMessages
4103
4403
  i18n-cancel="kendo.upload.cancel|The text for the Cancel button"
4104
4404
  cancel="Cancel"
@@ -4214,7 +4514,7 @@ class UploadComponent extends UploadFileSelectBase {
4214
4514
  [actionsLayout]="actionsLayout">
4215
4515
  </kendo-upload-action-buttons>
4216
4516
  }
4217
- `, 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", "iconPosition", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: FileSelectDirective, selector: "[kendoFileSelect]", inputs: ["dir", "disabled", "multiple", "restrictions", "accept", "required"] }, { kind: "component", type: UploadStatusTotalComponent, selector: "kendo-upload-status-total", inputs: ["fileList"] }, { kind: "component", type: FileListComponent, selector: "[kendo-upload-file-list]", inputs: ["disabled", "fileList", "fileTemplate", "fileInfoTemplate"] }, { kind: "component", type: UploadActionButtonsComponent, selector: "kendo-upload-action-buttons", inputs: ["disabled", "actionsLayout"] }] });
4517
+ `, 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", "iconPosition", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: FileSelectDirective, selector: "[kendoFileSelect]", inputs: ["dir", "disabled", "multiple", "restrictions", "accept", "required"] }, { kind: "component", type: UploadStatusTotalComponent, selector: "kendo-upload-status-total", inputs: ["fileList"] }, { kind: "component", type: FileListComponent, selector: "[kendo-upload-file-list]", inputs: ["disabled", "fileList", "fileTemplate", "fileInfoTemplate"] }, { kind: "component", type: UploadActionButtonsComponent, selector: "kendo-upload-action-buttons", inputs: ["disabled", "actionsLayout"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
4218
4518
  }
4219
4519
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: UploadComponent, decorators: [{
4220
4520
  type: Component,
@@ -4241,6 +4541,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImpo
4241
4541
  provideComponentName('upload')
4242
4542
  ],
4243
4543
  selector: 'kendo-upload',
4544
+ changeDetection: ChangeDetectionStrategy.OnPush,
4244
4545
  template: `
4245
4546
  <ng-container kendoUploadLocalizedMessages
4246
4547
  i18n-cancel="kendo.upload.cancel|The text for the Cancel button"
@@ -4389,8 +4690,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImpo
4389
4690
  type: Input
4390
4691
  }], concurrent: [{
4391
4692
  type: Input
4392
- }], showFileList: [{
4393
- type: Input
4394
4693
  }], tabIndex: [{
4395
4694
  type: Input,
4396
4695
  args: ['tabIndex']
@@ -4549,17 +4848,32 @@ class UploadDropZoneComponent extends DropZoneBase {
4549
4848
  * Specifies the id of the component.
4550
4849
  * Use this id to associate the DropZone with an existing Upload or FileSelect component.
4551
4850
  */
4552
- zoneId;
4851
+ set zoneId(value) {
4852
+ this._zoneId.set(value);
4853
+ }
4854
+ get zoneId() {
4855
+ return this._zoneId();
4856
+ }
4553
4857
  /**
4554
4858
  * Specifies the name for an existing icon in a Kendo UI theme.
4555
4859
  * The icon renders inside the DropZone.
4556
4860
  */
4557
- icon;
4861
+ set icon(value) {
4862
+ this._icon.set(value);
4863
+ }
4864
+ get icon() {
4865
+ return this._icon();
4866
+ }
4558
4867
  /**
4559
4868
  * Specifies a CSS class or multiple classes separated by spaces which apply to a span element.
4560
4869
  * Use this property to apply custom icons.
4561
4870
  */
4562
- iconClass;
4871
+ set iconClass(value) {
4872
+ this._iconClass.set(value);
4873
+ }
4874
+ get iconClass() {
4875
+ return this._iconClass();
4876
+ }
4563
4877
  /**
4564
4878
  * Specifies an SVGIcon to render inside the DropZone.
4565
4879
  * The input accepts either an [existing Kendo SVG icon](https://www.telerik.com/kendo-angular-ui/components/icons/svgicon/svgicon-list) or a custom one.
@@ -4568,14 +4882,17 @@ class UploadDropZoneComponent extends DropZoneBase {
4568
4882
  if (isDevMode() && icon && this.icon && this.iconClass) {
4569
4883
  throw new Error('Setting both icon/svgIcon and iconClass options at the same time is not supported.');
4570
4884
  }
4571
- this._svgIcon = icon;
4885
+ this._svgIcon.set(icon);
4572
4886
  }
4573
4887
  get svgIcon() {
4574
- return this._svgIcon;
4888
+ return this._svgIcon();
4575
4889
  }
4576
4890
  direction;
4577
4891
  localizationChangeSubscription;
4578
- _svgIcon = uploadIcon;
4892
+ _zoneId = signal(undefined, ...(ngDevMode ? [{ debugName: "_zoneId" }] : []));
4893
+ _icon = signal(undefined, ...(ngDevMode ? [{ debugName: "_icon" }] : []));
4894
+ _iconClass = signal(undefined, ...(ngDevMode ? [{ debugName: "_iconClass" }] : []));
4895
+ _svgIcon = signal(uploadIcon, ...(ngDevMode ? [{ debugName: "_svgIcon" }] : []));
4579
4896
  constructor(element, renderer, localization) {
4580
4897
  super(element, renderer, 'k-external-dropzone-hover');
4581
4898
  this.localization = localization;
@@ -4631,7 +4948,7 @@ class UploadDropZoneComponent extends DropZoneBase {
4631
4948
  <ng-content></ng-content>
4632
4949
  </span>
4633
4950
  </div>
4634
- `, isInline: true, dependencies: [{ kind: "directive", type: LocalizedMessagesDirective, selector: "\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n " }, { kind: "directive", type: UploadDropZoneDirective, selector: "[kendoUploadDropZone], [kendoFileSelectDropZone]", inputs: ["kendoUploadDropZone", "kendoFileSelectDropZone"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }] });
4951
+ `, isInline: true, dependencies: [{ kind: "directive", type: LocalizedMessagesDirective, selector: "\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n " }, { kind: "directive", type: UploadDropZoneDirective, selector: "[kendoUploadDropZone], [kendoFileSelectDropZone]", inputs: ["kendoUploadDropZone", "kendoFileSelectDropZone"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
4635
4952
  }
4636
4953
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: UploadDropZoneComponent, decorators: [{
4637
4954
  type: Component,
@@ -4666,7 +4983,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImpo
4666
4983
  </div>
4667
4984
  `,
4668
4985
  standalone: true,
4669
- imports: [LocalizedMessagesDirective, UploadDropZoneDirective, IconWrapperComponent]
4986
+ imports: [LocalizedMessagesDirective, UploadDropZoneDirective, IconWrapperComponent],
4987
+ changeDetection: ChangeDetectionStrategy.OnPush
4670
4988
  }]
4671
4989
  }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i1$1.LocalizationService }], propDecorators: { hostClass: [{
4672
4990
  type: HostBinding,
@@ -4730,14 +5048,6 @@ class FileSelectComponent extends UploadFileSelectBase {
4730
5048
  * Fires when the component value changes after a successful `select` or `remove` operation.
4731
5049
  */
4732
5050
  valueChange = new EventEmitter();
4733
- /**
4734
- * @hidden
4735
- */
4736
- _restrictions = {
4737
- allowedExtensions: [],
4738
- maxFileSize: 0,
4739
- minFileSize: 0
4740
- };
4741
5051
  direction;
4742
5052
  wrapper;
4743
5053
  fileListId;
@@ -4901,7 +5211,11 @@ class FileSelectComponent extends UploadFileSelectBase {
4901
5211
  }
4902
5212
  }
4903
5213
  attachEventHandlers() {
5214
+ // FileMap state is managed by UploadService and is not signal-tracked.
5215
+ // markForCheck() is required on all events to keep the OnPush view in sync
5216
+ // (e.g. hasFileList reads the mutable FileMap and must re-evaluate after changes).
4904
5217
  this.subs = this.uploadService.changeEvent.subscribe((files) => {
5218
+ this.cdr.markForCheck();
4905
5219
  let model = [];
4906
5220
  if (files !== null) {
4907
5221
  files.forEach((file) => {
@@ -4920,9 +5234,11 @@ class FileSelectComponent extends UploadFileSelectBase {
4920
5234
  this.valueChange.emit(model);
4921
5235
  });
4922
5236
  this.subs.add(this.uploadService.removeEvent.subscribe((args) => {
5237
+ this.cdr.markForCheck();
4923
5238
  this.remove.emit(args);
4924
5239
  }));
4925
5240
  this.subs.add(this.uploadService.selectEvent.subscribe((args) => {
5241
+ this.cdr.markForCheck();
4926
5242
  this.select.emit(args);
4927
5243
  }));
4928
5244
  }
@@ -5009,7 +5325,7 @@ class FileSelectComponent extends UploadFileSelectBase {
5009
5325
  [id]="fileListId">
5010
5326
  </ul>
5011
5327
  }
5012
- `, 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", "iconPosition", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon"], 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"] }] });
5328
+ `, 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", "iconPosition", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon"], 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
5013
5329
  }
5014
5330
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: FileSelectComponent, decorators: [{
5015
5331
  type: Component,
@@ -5097,7 +5413,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImpo
5097
5413
  }
5098
5414
  `,
5099
5415
  standalone: true,
5100
- imports: [LocalizedMessagesDirective, DropZoneInternalDirective, ButtonComponent, FileSelectDirective, FileListComponent]
5416
+ imports: [LocalizedMessagesDirective, DropZoneInternalDirective, ButtonComponent, FileSelectDirective, FileListComponent],
5417
+ changeDetection: ChangeDetectionStrategy.OnPush
5101
5418
  }]
5102
5419
  }], ctorParameters: () => [{ 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: { fileSelectInput: [{
5103
5420
  type: ViewChild,