@progress/kendo-angular-upload 16.5.0-develop.6 → 16.6.0-develop.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/directives.d.ts +25 -0
- package/dropzone-external.directive.d.ts +1 -1
- package/dropzone-internal.directive.d.ts +1 -1
- package/dropzone.component.d.ts +1 -1
- package/esm2020/directives.mjs +44 -0
- package/esm2020/dropzone-external.directive.mjs +3 -2
- package/esm2020/dropzone-internal.directive.mjs +3 -2
- package/esm2020/dropzone.component.mjs +8 -6
- package/esm2020/file-select.directive.mjs +3 -2
- package/esm2020/fileselect.component.mjs +11 -9
- package/esm2020/fileselect.module.mjs +24 -19
- package/esm2020/index.mjs +1 -0
- package/esm2020/localization/custom-messages.component.mjs +3 -2
- package/esm2020/localization/localized-messages.directive.mjs +3 -2
- package/esm2020/package-metadata.mjs +2 -2
- package/esm2020/rendering/file-list-item-action-button.component.mjs +7 -5
- package/esm2020/rendering/file-list-item.mjs +3 -2
- package/esm2020/rendering/file-list-multiple-items.component.mjs +9 -7
- package/esm2020/rendering/file-list-single-item.component.mjs +9 -7
- package/esm2020/rendering/file-list.component.mjs +8 -7
- package/esm2020/rendering/upload-action-buttons.component.mjs +3 -2
- package/esm2020/rendering/upload-status-total.component.mjs +6 -4
- package/esm2020/templates/file-info-template.directive.mjs +3 -2
- package/esm2020/templates/file-template.directive.mjs +3 -2
- package/esm2020/upload.component.mjs +13 -11
- package/esm2020/upload.module.mjs +26 -27
- package/esm2020/uploads.module.mjs +26 -9
- package/fesm2015/progress-kendo-angular-upload.mjs +1124 -1136
- package/fesm2020/progress-kendo-angular-upload.mjs +1122 -1134
- package/file-select.directive.d.ts +1 -1
- package/fileselect.component.d.ts +1 -1
- package/fileselect.module.d.ts +6 -8
- package/index.d.ts +1 -0
- package/localization/custom-messages.component.d.ts +1 -1
- package/localization/localized-messages.directive.d.ts +1 -1
- package/package.json +7 -7
- package/rendering/file-list-item-action-button.component.d.ts +1 -1
- package/rendering/file-list-item.d.ts +1 -1
- package/rendering/file-list-multiple-items.component.d.ts +1 -1
- package/rendering/file-list-single-item.component.d.ts +1 -1
- package/rendering/file-list.component.d.ts +1 -1
- package/rendering/upload-action-buttons.component.d.ts +1 -1
- package/rendering/upload-status-total.component.d.ts +1 -1
- package/schematics/ngAdd/index.js +3 -3
- package/templates/file-info-template.directive.d.ts +1 -1
- package/templates/file-template.directive.d.ts +1 -1
- package/upload.component.d.ts +1 -1
- package/upload.module.d.ts +6 -8
- package/uploads.module.d.ts +10 -3
- package/esm2020/shared.module.mjs +0 -94
- package/shared.module.d.ts +0 -38
|
@@ -5,8 +5,8 @@
|
|
|
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, ContentChild, ViewChild, Input, HostBinding, Output,
|
|
9
|
-
import { guid, Keys, isControlRequired, isDocumentAvailable, KendoInput,
|
|
8
|
+
import { EventEmitter, Injectable, Directive, ElementRef, ContentChild, ViewChild, Input, HostBinding, Output, Component, HostListener, ViewChildren, Inject, forwardRef, isDevMode, NgModule } from '@angular/core';
|
|
9
|
+
import { guid, Keys, isControlRequired, isChanged, isDocumentAvailable, KendoInput, ResizeBatchService } from '@progress/kendo-angular-common';
|
|
10
10
|
import { fileAudioIcon, fileVideoIcon, fileImageIcon, fileTxtIcon, filePresentationIcon, fileDataIcon, fileProgrammingIcon, filePdfIcon, fileConfigIcon, fileZipIcon, fileDiscImageIcon, arrowRotateCwSmallIcon, playSmIcon, pauseSmIcon, cancelIcon, xIcon, copyIcon, fileIcon, 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';
|
|
@@ -14,15 +14,12 @@ import { ComponentMessages, LocalizationService, L10N_PREFIX } from '@progress/k
|
|
|
14
14
|
import { fromEvent, merge } from 'rxjs';
|
|
15
15
|
import { filter } from 'rxjs/operators';
|
|
16
16
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
17
|
-
import * as i3 from '@angular/common';
|
|
18
|
-
import { CommonModule } from '@angular/common';
|
|
19
17
|
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
20
|
-
import
|
|
21
|
-
import {
|
|
22
|
-
import
|
|
23
|
-
import {
|
|
24
|
-
import
|
|
25
|
-
import { ButtonsModule } from '@progress/kendo-angular-buttons';
|
|
18
|
+
import { ButtonComponent } from '@progress/kendo-angular-buttons';
|
|
19
|
+
import { NgIf, NgFor, NgClass, NgTemplateOutlet } from '@angular/common';
|
|
20
|
+
import { IconWrapperComponent, IconsService } from '@progress/kendo-angular-icons';
|
|
21
|
+
import { ProgressBarComponent } from '@progress/kendo-angular-progressbar';
|
|
22
|
+
import { PopupService } from '@progress/kendo-angular-popup';
|
|
26
23
|
|
|
27
24
|
/**
|
|
28
25
|
* Lists the possible states of a file.
|
|
@@ -1491,6 +1488,63 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1491
1488
|
type: Injectable
|
|
1492
1489
|
}] });
|
|
1493
1490
|
|
|
1491
|
+
/**
|
|
1492
|
+
* @hidden
|
|
1493
|
+
*/
|
|
1494
|
+
const INVALIDMAXFILESIZE = "invalidMaxFileSize";
|
|
1495
|
+
/**
|
|
1496
|
+
* @hidden
|
|
1497
|
+
*/
|
|
1498
|
+
const INVALIDMINFILESIZE = "invalidMinFileSize";
|
|
1499
|
+
/**
|
|
1500
|
+
* @hidden
|
|
1501
|
+
*/
|
|
1502
|
+
const INVALIDFILEEXTENSION = "invalidFileExtension";
|
|
1503
|
+
const validateFileExtension = (file, allowedExtensions) => {
|
|
1504
|
+
if (allowedExtensions.length > 0) {
|
|
1505
|
+
if (allowedExtensions.indexOf(file.extension.toLowerCase()) < 0) {
|
|
1506
|
+
file.validationErrors = file.validationErrors || [];
|
|
1507
|
+
if (file.validationErrors.indexOf(INVALIDFILEEXTENSION) < 0) {
|
|
1508
|
+
file.validationErrors.push(INVALIDFILEEXTENSION);
|
|
1509
|
+
}
|
|
1510
|
+
}
|
|
1511
|
+
}
|
|
1512
|
+
};
|
|
1513
|
+
const validateFileSize = (file, minFileSize, maxFileSize) => {
|
|
1514
|
+
if (minFileSize !== 0 && file.size < minFileSize) {
|
|
1515
|
+
file.validationErrors = file.validationErrors || [];
|
|
1516
|
+
if (file.validationErrors.indexOf(INVALIDMINFILESIZE) < 0) {
|
|
1517
|
+
file.validationErrors.push(INVALIDMINFILESIZE);
|
|
1518
|
+
}
|
|
1519
|
+
}
|
|
1520
|
+
if (maxFileSize !== 0 && file.size > maxFileSize) {
|
|
1521
|
+
file.validationErrors = file.validationErrors || [];
|
|
1522
|
+
if (file.validationErrors.indexOf(INVALIDMAXFILESIZE) < 0) {
|
|
1523
|
+
file.validationErrors.push(INVALIDMAXFILESIZE);
|
|
1524
|
+
}
|
|
1525
|
+
}
|
|
1526
|
+
};
|
|
1527
|
+
const parseAllowedExtensions = (extensions) => {
|
|
1528
|
+
const allowedExtensions = extensions.map((ext) => {
|
|
1529
|
+
const parsedExt = (ext.substring(0, 1) === ".") ? ext : ("." + ext);
|
|
1530
|
+
return parsedExt.toLowerCase();
|
|
1531
|
+
});
|
|
1532
|
+
return allowedExtensions;
|
|
1533
|
+
};
|
|
1534
|
+
/**
|
|
1535
|
+
* @hidden
|
|
1536
|
+
*/
|
|
1537
|
+
const validateFiles = (files, restrictionInfo) => {
|
|
1538
|
+
const allowedExtensions = parseAllowedExtensions(restrictionInfo.allowedExtensions);
|
|
1539
|
+
const maxFileSize = restrictionInfo.maxFileSize;
|
|
1540
|
+
const minFileSize = restrictionInfo.minFileSize;
|
|
1541
|
+
let i;
|
|
1542
|
+
for (i = 0; i < files.length; i++) {
|
|
1543
|
+
validateFileExtension(files[i], allowedExtensions);
|
|
1544
|
+
validateFileSize(files[i], minFileSize, maxFileSize);
|
|
1545
|
+
}
|
|
1546
|
+
};
|
|
1547
|
+
|
|
1494
1548
|
/**
|
|
1495
1549
|
* @hidden
|
|
1496
1550
|
*/
|
|
@@ -1498,8 +1552,8 @@ const packageMetadata = {
|
|
|
1498
1552
|
name: '@progress/kendo-angular-upload',
|
|
1499
1553
|
productName: 'Kendo UI for Angular',
|
|
1500
1554
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
1501
|
-
publishDate:
|
|
1502
|
-
version: '16.
|
|
1555
|
+
publishDate: 1721827607,
|
|
1556
|
+
version: '16.6.0-develop.1',
|
|
1503
1557
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
1504
1558
|
};
|
|
1505
1559
|
|
|
@@ -1512,11 +1566,12 @@ class FileTemplateDirective {
|
|
|
1512
1566
|
}
|
|
1513
1567
|
}
|
|
1514
1568
|
FileTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FileTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1515
|
-
FileTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: FileTemplateDirective, selector: "[kendoUploadFileTemplate], [kendoFileSelectFileTemplate]", ngImport: i0 });
|
|
1569
|
+
FileTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: FileTemplateDirective, isStandalone: true, selector: "[kendoUploadFileTemplate], [kendoFileSelectFileTemplate]", ngImport: i0 });
|
|
1516
1570
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FileTemplateDirective, decorators: [{
|
|
1517
1571
|
type: Directive,
|
|
1518
1572
|
args: [{
|
|
1519
|
-
selector: '[kendoUploadFileTemplate], [kendoFileSelectFileTemplate]'
|
|
1573
|
+
selector: '[kendoUploadFileTemplate], [kendoFileSelectFileTemplate]',
|
|
1574
|
+
standalone: true
|
|
1520
1575
|
}]
|
|
1521
1576
|
}], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
|
|
1522
1577
|
|
|
@@ -1529,11 +1584,12 @@ class FileInfoTemplateDirective {
|
|
|
1529
1584
|
}
|
|
1530
1585
|
}
|
|
1531
1586
|
FileInfoTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FileInfoTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1532
|
-
FileInfoTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: FileInfoTemplateDirective, selector: "[kendoUploadFileInfoTemplate], [kendoFileSelectFileInfoTemplate]", ngImport: i0 });
|
|
1587
|
+
FileInfoTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: FileInfoTemplateDirective, isStandalone: true, selector: "[kendoUploadFileInfoTemplate], [kendoFileSelectFileInfoTemplate]", ngImport: i0 });
|
|
1533
1588
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FileInfoTemplateDirective, decorators: [{
|
|
1534
1589
|
type: Directive,
|
|
1535
1590
|
args: [{
|
|
1536
|
-
selector: '[kendoUploadFileInfoTemplate], [kendoFileSelectFileInfoTemplate]'
|
|
1591
|
+
selector: '[kendoUploadFileInfoTemplate], [kendoFileSelectFileInfoTemplate]',
|
|
1592
|
+
standalone: true
|
|
1537
1593
|
}]
|
|
1538
1594
|
}], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
|
|
1539
1595
|
|
|
@@ -1771,221 +1827,120 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1771
1827
|
type: Output
|
|
1772
1828
|
}] } });
|
|
1773
1829
|
|
|
1830
|
+
/* eslint-disable no-debugger */
|
|
1774
1831
|
/**
|
|
1775
1832
|
* @hidden
|
|
1776
1833
|
*/
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
* @hidden
|
|
1784
|
-
*/
|
|
1785
|
-
const INVALIDFILEEXTENSION = "invalidFileExtension";
|
|
1786
|
-
const validateFileExtension = (file, allowedExtensions) => {
|
|
1787
|
-
if (allowedExtensions.length > 0) {
|
|
1788
|
-
if (allowedExtensions.indexOf(file.extension.toLowerCase()) < 0) {
|
|
1789
|
-
file.validationErrors = file.validationErrors || [];
|
|
1790
|
-
if (file.validationErrors.indexOf(INVALIDFILEEXTENSION) < 0) {
|
|
1791
|
-
file.validationErrors.push(INVALIDFILEEXTENSION);
|
|
1792
|
-
}
|
|
1793
|
-
}
|
|
1834
|
+
class UploadActionButtonsComponent {
|
|
1835
|
+
constructor(uploadService, localization, navigation) {
|
|
1836
|
+
this.uploadService = uploadService;
|
|
1837
|
+
this.localization = localization;
|
|
1838
|
+
this.navigation = navigation;
|
|
1839
|
+
this.hostDefaultClass = true;
|
|
1794
1840
|
}
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
if (minFileSize !== 0 && file.size < minFileSize) {
|
|
1798
|
-
file.validationErrors = file.validationErrors || [];
|
|
1799
|
-
if (file.validationErrors.indexOf(INVALIDMINFILESIZE) < 0) {
|
|
1800
|
-
file.validationErrors.push(INVALIDMINFILESIZE);
|
|
1801
|
-
}
|
|
1841
|
+
get actionButtonsEndClassName() {
|
|
1842
|
+
return this.actionsLayout === 'end';
|
|
1802
1843
|
}
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
if (file.validationErrors.indexOf(INVALIDMAXFILESIZE) < 0) {
|
|
1806
|
-
file.validationErrors.push(INVALIDMAXFILESIZE);
|
|
1807
|
-
}
|
|
1844
|
+
get actionButtonsStretchedClassName() {
|
|
1845
|
+
return this.actionsLayout === 'stretched';
|
|
1808
1846
|
}
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
const allowedExtensions = extensions.map((ext) => {
|
|
1812
|
-
const parsedExt = (ext.substring(0, 1) === ".") ? ext : ("." + ext);
|
|
1813
|
-
return parsedExt.toLowerCase();
|
|
1814
|
-
});
|
|
1815
|
-
return allowedExtensions;
|
|
1816
|
-
};
|
|
1817
|
-
/**
|
|
1818
|
-
* @hidden
|
|
1819
|
-
*/
|
|
1820
|
-
const validateFiles = (files, restrictionInfo) => {
|
|
1821
|
-
const allowedExtensions = parseAllowedExtensions(restrictionInfo.allowedExtensions);
|
|
1822
|
-
const maxFileSize = restrictionInfo.maxFileSize;
|
|
1823
|
-
const minFileSize = restrictionInfo.minFileSize;
|
|
1824
|
-
let i;
|
|
1825
|
-
for (i = 0; i < files.length; i++) {
|
|
1826
|
-
validateFileExtension(files[i], allowedExtensions);
|
|
1827
|
-
validateFileSize(files[i], minFileSize, maxFileSize);
|
|
1847
|
+
get actionButtonsStartClassName() {
|
|
1848
|
+
return this.actionsLayout === 'start';
|
|
1828
1849
|
}
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
/**
|
|
1832
|
-
* @hidden
|
|
1833
|
-
*/
|
|
1834
|
-
class DropZoneBase {
|
|
1835
|
-
constructor(element, renderer, cssClass) {
|
|
1836
|
-
this.element = element;
|
|
1837
|
-
this.renderer = renderer;
|
|
1838
|
-
this.hideIntervalElement = null;
|
|
1839
|
-
this.hoverClass = cssClass;
|
|
1850
|
+
get actionButtonsCenterClassName() {
|
|
1851
|
+
return this.actionsLayout === 'center';
|
|
1840
1852
|
}
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
onElementDragEnterListener() {
|
|
1845
|
-
this.addClass(this.hoverClass);
|
|
1846
|
-
this.lastDragElement = new Date();
|
|
1847
|
-
if (!this.hideIntervalElement) {
|
|
1848
|
-
this.hideIntervalElement = setInterval(() => {
|
|
1849
|
-
if (this.calculateTimeDiff(this.lastDragElement) < 100) {
|
|
1850
|
-
return;
|
|
1851
|
-
}
|
|
1852
|
-
this.removeClass(this.hoverClass);
|
|
1853
|
-
clearInterval(this.hideIntervalElement);
|
|
1854
|
-
this.hideIntervalElement = null;
|
|
1855
|
-
}, 100);
|
|
1853
|
+
onUploadButtonFocus() {
|
|
1854
|
+
if (!this.navigation.focused) {
|
|
1855
|
+
this.navigation.focusedIndex = this.navigation.lastIndex;
|
|
1856
1856
|
}
|
|
1857
|
-
return false;
|
|
1858
1857
|
}
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
onElementDragOverListener() {
|
|
1863
|
-
this.lastDragElement = new Date();
|
|
1864
|
-
return false;
|
|
1858
|
+
onUploadButtonClick(event) {
|
|
1859
|
+
event.stopImmediatePropagation();
|
|
1860
|
+
this.performUpload();
|
|
1865
1861
|
}
|
|
1866
|
-
|
|
1867
|
-
|
|
1862
|
+
performUpload() {
|
|
1863
|
+
if (!this.disabled) {
|
|
1864
|
+
this.uploadService.uploadFiles();
|
|
1865
|
+
this.navigation.focusSelectButton();
|
|
1866
|
+
}
|
|
1868
1867
|
}
|
|
1869
|
-
|
|
1870
|
-
|
|
1868
|
+
onClearButtonClick(event) {
|
|
1869
|
+
event.stopImmediatePropagation();
|
|
1870
|
+
this.clearFiles();
|
|
1871
1871
|
}
|
|
1872
|
-
|
|
1873
|
-
|
|
1872
|
+
clearFiles() {
|
|
1873
|
+
if (!this.disabled) {
|
|
1874
|
+
this.uploadService.clearFiles();
|
|
1875
|
+
this.navigation.focusSelectButton();
|
|
1876
|
+
}
|
|
1877
|
+
}
|
|
1878
|
+
textFor(key) {
|
|
1879
|
+
return this.localization.get(key);
|
|
1874
1880
|
}
|
|
1875
1881
|
}
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1882
|
+
UploadActionButtonsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UploadActionButtonsComponent, deps: [{ token: UploadService }, { token: i1$1.LocalizationService }, { token: NavigationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1883
|
+
UploadActionButtonsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: UploadActionButtonsComponent, isStandalone: true, selector: "kendo-upload-action-buttons", inputs: { disabled: "disabled", actionsLayout: "actionsLayout" }, host: { properties: { "class.k-actions": "this.hostDefaultClass", "class.k-actions-end": "this.actionButtonsEndClassName", "class.k-actions-stretched": "this.actionButtonsStretchedClassName", "class.k-actions-start": "this.actionButtonsStartClassName", "class.k-actions-center": "this.actionButtonsCenterClassName" } }, viewQueries: [{ propertyName: "clearButton", first: true, predicate: ["clearButton"], descendants: true, static: true }, { propertyName: "uploadButton", first: true, predicate: ["uploadButton"], descendants: true, static: true }], ngImport: i0, template: `
|
|
1884
|
+
<button #clearButton role="button" class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-clear-selected"
|
|
1885
|
+
(click)="onClearButtonClick($event)">
|
|
1886
|
+
{{textFor('clearSelectedFiles')}}
|
|
1887
|
+
</button>
|
|
1888
|
+
<button #uploadButton role="button" class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-primary k-upload-selected"
|
|
1889
|
+
(focus)="onUploadButtonFocus()"
|
|
1890
|
+
(click)="onUploadButtonClick($event)">
|
|
1891
|
+
{{textFor('uploadSelectedFiles')}}
|
|
1892
|
+
</button>
|
|
1893
|
+
`, isInline: true });
|
|
1894
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UploadActionButtonsComponent, decorators: [{
|
|
1895
|
+
type: Component,
|
|
1896
|
+
args: [{
|
|
1897
|
+
selector: 'kendo-upload-action-buttons',
|
|
1898
|
+
template: `
|
|
1899
|
+
<button #clearButton role="button" class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-clear-selected"
|
|
1900
|
+
(click)="onClearButtonClick($event)">
|
|
1901
|
+
{{textFor('clearSelectedFiles')}}
|
|
1902
|
+
</button>
|
|
1903
|
+
<button #uploadButton role="button" class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-primary k-upload-selected"
|
|
1904
|
+
(focus)="onUploadButtonFocus()"
|
|
1905
|
+
(click)="onUploadButtonClick($event)">
|
|
1906
|
+
{{textFor('uploadSelectedFiles')}}
|
|
1907
|
+
</button>
|
|
1908
|
+
`,
|
|
1909
|
+
standalone: true
|
|
1910
|
+
}]
|
|
1911
|
+
}], ctorParameters: function () { return [{ type: UploadService }, { type: i1$1.LocalizationService }, { type: NavigationService }]; }, propDecorators: { disabled: [{
|
|
1912
|
+
type: Input
|
|
1913
|
+
}], actionsLayout: [{
|
|
1914
|
+
type: Input
|
|
1915
|
+
}], clearButton: [{
|
|
1916
|
+
type: ViewChild,
|
|
1917
|
+
args: ['clearButton', { static: true }]
|
|
1918
|
+
}], uploadButton: [{
|
|
1919
|
+
type: ViewChild,
|
|
1920
|
+
args: ['uploadButton', { static: true }]
|
|
1921
|
+
}], hostDefaultClass: [{
|
|
1922
|
+
type: HostBinding,
|
|
1923
|
+
args: ['class.k-actions']
|
|
1924
|
+
}], actionButtonsEndClassName: [{
|
|
1925
|
+
type: HostBinding,
|
|
1926
|
+
args: ['class.k-actions-end']
|
|
1927
|
+
}], actionButtonsStretchedClassName: [{
|
|
1928
|
+
type: HostBinding,
|
|
1929
|
+
args: ['class.k-actions-stretched']
|
|
1930
|
+
}], actionButtonsStartClassName: [{
|
|
1931
|
+
type: HostBinding,
|
|
1932
|
+
args: ['class.k-actions-start']
|
|
1933
|
+
}], actionButtonsCenterClassName: [{
|
|
1934
|
+
type: HostBinding,
|
|
1935
|
+
args: ['class.k-actions-center']
|
|
1891
1936
|
}] } });
|
|
1892
1937
|
|
|
1893
1938
|
/**
|
|
1894
1939
|
* @hidden
|
|
1895
1940
|
*/
|
|
1896
|
-
class
|
|
1897
|
-
constructor(
|
|
1898
|
-
|
|
1899
|
-
this.ngZone = ngZone;
|
|
1900
|
-
this.uploadService = uploadService;
|
|
1901
|
-
this.initialClassName = true;
|
|
1902
|
-
this.hideIntervalDocument = null;
|
|
1903
|
-
this.activeClass = 'k-dropzone-active';
|
|
1904
|
-
this.ngZone.runOutsideAngular(() => {
|
|
1905
|
-
this.unsubscribeDocumentDragEnter = this.renderer.listen('document', 'dragenter', () => this.onDocumentDragEnter());
|
|
1906
|
-
this.unsubscribeDocumentDragOver = this.renderer.listen('document', 'dragover', () => this.onDocumentDragOver());
|
|
1907
|
-
});
|
|
1908
|
-
}
|
|
1909
|
-
ngOnDestroy() {
|
|
1910
|
-
this.ngZone.runOutsideAngular(() => {
|
|
1911
|
-
if (this.unsubscribeDocumentDragEnter) {
|
|
1912
|
-
this.unsubscribeDocumentDragEnter();
|
|
1913
|
-
}
|
|
1914
|
-
if (this.unsubscribeDocumentDragOver) {
|
|
1915
|
-
this.unsubscribeDocumentDragOver();
|
|
1916
|
-
}
|
|
1917
|
-
});
|
|
1918
|
-
}
|
|
1919
|
-
onDocumentDragEnter() {
|
|
1920
|
-
this.addClass(this.activeClass);
|
|
1921
|
-
this.lastDragDocument = new Date();
|
|
1922
|
-
if (!this.hideIntervalDocument) {
|
|
1923
|
-
this.hideIntervalDocument = setInterval(() => {
|
|
1924
|
-
if (this.calculateTimeDiff(this.lastDragDocument) < 100) {
|
|
1925
|
-
return;
|
|
1926
|
-
}
|
|
1927
|
-
this.removeClass(this.activeClass);
|
|
1928
|
-
clearInterval(this.hideIntervalDocument);
|
|
1929
|
-
this.hideIntervalDocument = null;
|
|
1930
|
-
}, 100);
|
|
1931
|
-
}
|
|
1932
|
-
return false;
|
|
1933
|
-
}
|
|
1934
|
-
/**
|
|
1935
|
-
* @hidden
|
|
1936
|
-
*/
|
|
1937
|
-
onDocumentDragOver() {
|
|
1938
|
-
this.lastDragDocument = new Date();
|
|
1939
|
-
return false;
|
|
1940
|
-
}
|
|
1941
|
-
onDropListener(event) {
|
|
1942
|
-
const droppedFiles = event.dataTransfer.files;
|
|
1943
|
-
if (droppedFiles.length > 0 && !this.disabled) {
|
|
1944
|
-
let files = getAllFileInfo(droppedFiles);
|
|
1945
|
-
files = assignGuidToFiles(files, !this.uploadService.async.batch);
|
|
1946
|
-
if (!this.multiple) {
|
|
1947
|
-
files.splice(1, files.length - 1);
|
|
1948
|
-
this.uploadService.clearFiles();
|
|
1949
|
-
}
|
|
1950
|
-
validateFiles(files, this.restrictions);
|
|
1951
|
-
this.uploadService.addFiles(files);
|
|
1952
|
-
}
|
|
1953
|
-
return false;
|
|
1954
|
-
}
|
|
1955
|
-
}
|
|
1956
|
-
DropZoneInternalDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DropZoneInternalDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: UploadService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1957
|
-
DropZoneInternalDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: DropZoneInternalDirective, selector: "\n [kendoUploadInternalDropZone],\n [kendoFileSelectInternalDropZone]\n ", inputs: { disabled: "disabled", multiple: "multiple", restrictions: "restrictions" }, host: { listeners: { "drop": "onDropListener($event)" }, properties: { "class.k-dropzone": "this.initialClassName", "class.k-upload-dropzone": "this.initialClassName" } }, usesInheritance: true, ngImport: i0 });
|
|
1958
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DropZoneInternalDirective, decorators: [{
|
|
1959
|
-
type: Directive,
|
|
1960
|
-
args: [{
|
|
1961
|
-
selector: `
|
|
1962
|
-
[kendoUploadInternalDropZone],
|
|
1963
|
-
[kendoFileSelectInternalDropZone]
|
|
1964
|
-
`
|
|
1965
|
-
}]
|
|
1966
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: UploadService }]; }, propDecorators: { disabled: [{
|
|
1967
|
-
type: Input
|
|
1968
|
-
}], multiple: [{
|
|
1969
|
-
type: Input
|
|
1970
|
-
}], restrictions: [{
|
|
1971
|
-
type: Input
|
|
1972
|
-
}], initialClassName: [{
|
|
1973
|
-
type: HostBinding,
|
|
1974
|
-
args: ['class.k-dropzone']
|
|
1975
|
-
}, {
|
|
1976
|
-
type: HostBinding,
|
|
1977
|
-
args: ['class.k-upload-dropzone']
|
|
1978
|
-
}], onDropListener: [{
|
|
1979
|
-
type: HostListener,
|
|
1980
|
-
args: ['drop', ['$event']]
|
|
1981
|
-
}] } });
|
|
1982
|
-
|
|
1983
|
-
/**
|
|
1984
|
-
* @hidden
|
|
1985
|
-
*/
|
|
1986
|
-
class FileListItemDirective {
|
|
1987
|
-
constructor(el, navigationService, uploadService) {
|
|
1988
|
-
this.navigationService = navigationService;
|
|
1941
|
+
class FileListItemDirective {
|
|
1942
|
+
constructor(el, navigationService, uploadService) {
|
|
1943
|
+
this.navigationService = navigationService;
|
|
1989
1944
|
this.uploadService = uploadService;
|
|
1990
1945
|
this.fileClass = true;
|
|
1991
1946
|
this.focused = false;
|
|
@@ -2033,11 +1988,12 @@ class FileListItemDirective {
|
|
|
2033
1988
|
}
|
|
2034
1989
|
}
|
|
2035
1990
|
FileListItemDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FileListItemDirective, deps: [{ token: i0.ElementRef }, { token: NavigationService }, { token: UploadService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2036
|
-
FileListItemDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: FileListItemDirective, selector: "[kendoUploadFileListItem]", inputs: { files: "files", index: "index" }, host: { listeners: { "focus": "onFocus()", "blur": "onBlur()", "click": "onClick($event)" }, properties: { "class.k-file": "this.fileClass", "attr.data-uid": "this.uidAttribute", "attr.tabIndex": "this.tabIndex", "class.k-file-error": "this.kFileError", "class.k-file-invalid": "this.kFileInvalid", "class.k-file-progress": "this.kFileProgress", "class.k-file-success": "this.kFileSuccess", "class.k-focus": "this.kStateFocused" } }, ngImport: i0 });
|
|
1991
|
+
FileListItemDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: FileListItemDirective, isStandalone: true, selector: "[kendoUploadFileListItem]", inputs: { files: "files", index: "index" }, host: { listeners: { "focus": "onFocus()", "blur": "onBlur()", "click": "onClick($event)" }, properties: { "class.k-file": "this.fileClass", "attr.data-uid": "this.uidAttribute", "attr.tabIndex": "this.tabIndex", "class.k-file-error": "this.kFileError", "class.k-file-invalid": "this.kFileInvalid", "class.k-file-progress": "this.kFileProgress", "class.k-file-success": "this.kFileSuccess", "class.k-focus": "this.kStateFocused" } }, ngImport: i0 });
|
|
2037
1992
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FileListItemDirective, decorators: [{
|
|
2038
1993
|
type: Directive,
|
|
2039
1994
|
args: [{
|
|
2040
|
-
selector: '[kendoUploadFileListItem]'
|
|
1995
|
+
selector: '[kendoUploadFileListItem]',
|
|
1996
|
+
standalone: true
|
|
2041
1997
|
}]
|
|
2042
1998
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: NavigationService }, { type: UploadService }]; }, propDecorators: { files: [{
|
|
2043
1999
|
type: Input
|
|
@@ -2204,7 +2160,7 @@ class FileListItemActionButtonComponent {
|
|
|
2204
2160
|
}
|
|
2205
2161
|
}
|
|
2206
2162
|
FileListItemActionButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FileListItemActionButtonComponent, deps: [{ token: UploadService }, { token: i1$1.LocalizationService }, { token: NavigationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2207
|
-
FileListItemActionButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: FileListItemActionButtonComponent, selector: "kendo-upload-file-list-item-action-button", inputs: { file: "file", disabled: "disabled", progress: "progress" }, ngImport: i0, template: `
|
|
2163
|
+
FileListItemActionButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: FileListItemActionButtonComponent, isStandalone: true, selector: "kendo-upload-file-list-item-action-button", inputs: { file: "file", disabled: "disabled", progress: "progress" }, ngImport: i0, template: `
|
|
2208
2164
|
<span class="k-upload-actions">
|
|
2209
2165
|
<span class="k-upload-pct" *ngIf="isUploading || isPaused">{{progress}}%</span>
|
|
2210
2166
|
|
|
@@ -2253,7 +2209,7 @@ FileListItemActionButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion
|
|
|
2253
2209
|
(click)="onRemoveCancelClick($event)"
|
|
2254
2210
|
></button>
|
|
2255
2211
|
</span>
|
|
2256
|
-
`, isInline: true, dependencies: [{ kind: "directive", type:
|
|
2212
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: 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"] }] });
|
|
2257
2213
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FileListItemActionButtonComponent, decorators: [{
|
|
2258
2214
|
type: Component,
|
|
2259
2215
|
args: [{
|
|
@@ -2307,7 +2263,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2307
2263
|
(click)="onRemoveCancelClick($event)"
|
|
2308
2264
|
></button>
|
|
2309
2265
|
</span>
|
|
2310
|
-
|
|
2266
|
+
`,
|
|
2267
|
+
standalone: true,
|
|
2268
|
+
imports: [NgIf, ButtonComponent]
|
|
2311
2269
|
}]
|
|
2312
2270
|
}], ctorParameters: function () { return [{ type: UploadService }, { type: i1$1.LocalizationService }, { type: NavigationService }]; }, propDecorators: { file: [{
|
|
2313
2271
|
type: Input
|
|
@@ -2364,7 +2322,7 @@ class FileListMultipleItemsComponent extends FileListItemBase {
|
|
|
2364
2322
|
}
|
|
2365
2323
|
}
|
|
2366
2324
|
FileListMultipleItemsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FileListMultipleItemsComponent, deps: [{ token: i1$1.LocalizationService }, { token: UploadService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2367
|
-
FileListMultipleItemsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: FileListMultipleItemsComponent, selector: "kendo-upload-file-list-multiple-items", inputs: { disabled: "disabled", files: "files", fileInfoTemplate: "fileInfoTemplate" }, usesInheritance: true, ngImport: i0, template: `
|
|
2325
|
+
FileListMultipleItemsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: FileListMultipleItemsComponent, isStandalone: true, selector: "kendo-upload-file-list-multiple-items", inputs: { disabled: "disabled", files: "files", fileInfoTemplate: "fileInfoTemplate" }, usesInheritance: true, ngImport: i0, template: `
|
|
2368
2326
|
<kendo-progressbar
|
|
2369
2327
|
[@progressState]="showProgress"
|
|
2370
2328
|
[value]="progressComplete"
|
|
@@ -2409,7 +2367,7 @@ FileListMultipleItemsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
|
2409
2367
|
[disabled]='disabled'
|
|
2410
2368
|
[progress]='progressComplete'>
|
|
2411
2369
|
</kendo-upload-file-list-item-action-button>
|
|
2412
|
-
`, isInline: true, dependencies: [{ kind: "
|
|
2370
|
+
`, isInline: true, dependencies: [{ kind: "component", type: ProgressBarComponent, selector: "kendo-progressbar", inputs: ["label", "progressCssStyle", "progressCssClass", "emptyCssStyle", "emptyCssClass", "animation"], outputs: ["animationEnd"], exportAs: ["kendoProgressBar"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: FileListItemActionButtonComponent, selector: "kendo-upload-file-list-item-action-button", inputs: ["file", "disabled", "progress"] }], animations: [
|
|
2413
2371
|
trigger('progressState', [
|
|
2414
2372
|
state('active', style({ opacity: 1 })),
|
|
2415
2373
|
state('inactive', style({ opacity: 0 })),
|
|
@@ -2476,7 +2434,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2476
2434
|
[disabled]='disabled'
|
|
2477
2435
|
[progress]='progressComplete'>
|
|
2478
2436
|
</kendo-upload-file-list-item-action-button>
|
|
2479
|
-
|
|
2437
|
+
`,
|
|
2438
|
+
standalone: true,
|
|
2439
|
+
imports: [ProgressBarComponent, IconWrapperComponent, NgIf, NgFor, NgClass, NgTemplateOutlet, FileListItemActionButtonComponent]
|
|
2480
2440
|
}]
|
|
2481
2441
|
}], ctorParameters: function () { return [{ type: i1$1.LocalizationService }, { type: UploadService }]; }, propDecorators: { disabled: [{
|
|
2482
2442
|
type: Input
|
|
@@ -2541,7 +2501,7 @@ class FileListSingleItemComponent extends FileListItemBase {
|
|
|
2541
2501
|
}
|
|
2542
2502
|
}
|
|
2543
2503
|
FileListSingleItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FileListSingleItemComponent, deps: [{ token: i1$1.LocalizationService }, { token: UploadService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2544
|
-
FileListSingleItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: FileListSingleItemComponent, selector: "kendo-upload-file-list-single-item", inputs: { disabled: "disabled", file: "file", fileInfoTemplate: "fileInfoTemplate" }, usesInheritance: true, ngImport: i0, template: `
|
|
2504
|
+
FileListSingleItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: FileListSingleItemComponent, isStandalone: true, selector: "kendo-upload-file-list-single-item", inputs: { disabled: "disabled", file: "file", fileInfoTemplate: "fileInfoTemplate" }, usesInheritance: true, ngImport: i0, template: `
|
|
2545
2505
|
<kendo-progressbar
|
|
2546
2506
|
[@progressState]="showProgress"
|
|
2547
2507
|
[value]="progressComplete"
|
|
@@ -2578,7 +2538,7 @@ FileListSingleItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.
|
|
|
2578
2538
|
[disabled]='disabled'
|
|
2579
2539
|
[progress]='progressComplete'>
|
|
2580
2540
|
</kendo-upload-file-list-item-action-button>
|
|
2581
|
-
`, isInline: true, dependencies: [{ kind: "
|
|
2541
|
+
`, isInline: true, dependencies: [{ kind: "component", type: ProgressBarComponent, selector: "kendo-progressbar", inputs: ["label", "progressCssStyle", "progressCssClass", "emptyCssStyle", "emptyCssClass", "animation"], outputs: ["animationEnd"], exportAs: ["kendoProgressBar"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: FileListItemActionButtonComponent, selector: "kendo-upload-file-list-item-action-button", inputs: ["file", "disabled", "progress"] }], animations: [
|
|
2582
2542
|
trigger('progressState', [
|
|
2583
2543
|
state('active', style({ opacity: 1 })),
|
|
2584
2544
|
state('inactive', style({ opacity: 0 })),
|
|
@@ -2637,7 +2597,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2637
2597
|
[disabled]='disabled'
|
|
2638
2598
|
[progress]='progressComplete'>
|
|
2639
2599
|
</kendo-upload-file-list-item-action-button>
|
|
2640
|
-
|
|
2600
|
+
`,
|
|
2601
|
+
standalone: true,
|
|
2602
|
+
imports: [ProgressBarComponent, IconWrapperComponent, NgIf, NgClass, NgTemplateOutlet, FileListItemActionButtonComponent]
|
|
2641
2603
|
}]
|
|
2642
2604
|
}], ctorParameters: function () { return [{ type: i1$1.LocalizationService }, { type: UploadService }]; }, propDecorators: { disabled: [{
|
|
2643
2605
|
type: Input
|
|
@@ -2723,7 +2685,7 @@ class FileListComponent {
|
|
|
2723
2685
|
}
|
|
2724
2686
|
}
|
|
2725
2687
|
FileListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FileListComponent, deps: [{ token: UploadService }, { token: NavigationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2726
|
-
FileListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: FileListComponent, selector: "[kendo-upload-file-list]", inputs: { disabled: "disabled", fileList: "fileList", fileTemplate: "fileTemplate", fileInfoTemplate: "fileInfoTemplate" }, host: { properties: { "attr.role": "this.fileListRole" } }, viewQueries: [{ propertyName: "fileListItems", predicate: FileListItemDirective, descendants: true }], ngImport: i0, template: `
|
|
2688
|
+
FileListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: FileListComponent, isStandalone: true, selector: "[kendo-upload-file-list]", inputs: { disabled: "disabled", fileList: "fileList", fileTemplate: "fileTemplate", fileInfoTemplate: "fileInfoTemplate" }, host: { properties: { "attr.role": "this.fileListRole" } }, viewQueries: [{ propertyName: "fileListItems", predicate: FileListItemDirective, descendants: true }], ngImport: i0, template: `
|
|
2727
2689
|
<ng-template ngFor
|
|
2728
2690
|
[ngForOf]="fileList"
|
|
2729
2691
|
let-files
|
|
@@ -2749,7 +2711,7 @@ FileListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
|
|
|
2749
2711
|
}"></ng-container>
|
|
2750
2712
|
</li>
|
|
2751
2713
|
</ng-template>
|
|
2752
|
-
`, isInline: true, dependencies: [{ kind: "directive", type:
|
|
2714
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: FileListItemDirective, selector: "[kendoUploadFileListItem]", inputs: ["files", "index"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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"] }] });
|
|
2753
2715
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FileListComponent, decorators: [{
|
|
2754
2716
|
type: Component,
|
|
2755
2717
|
args: [{
|
|
@@ -2780,7 +2742,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2780
2742
|
}"></ng-container>
|
|
2781
2743
|
</li>
|
|
2782
2744
|
</ng-template>
|
|
2783
|
-
|
|
2745
|
+
`,
|
|
2746
|
+
standalone: true,
|
|
2747
|
+
imports: [NgFor, FileListItemDirective, NgIf, FileListSingleItemComponent, FileListMultipleItemsComponent, NgTemplateOutlet]
|
|
2784
2748
|
}]
|
|
2785
2749
|
}], ctorParameters: function () { return [{ type: UploadService }, { type: NavigationService }]; }, propDecorators: { disabled: [{
|
|
2786
2750
|
type: Input
|
|
@@ -2798,6 +2762,86 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2798
2762
|
args: ['attr.role']
|
|
2799
2763
|
}] } });
|
|
2800
2764
|
|
|
2765
|
+
/**
|
|
2766
|
+
* @hidden
|
|
2767
|
+
*/
|
|
2768
|
+
class UploadStatusTotalComponent {
|
|
2769
|
+
constructor(localization) {
|
|
2770
|
+
this.localization = localization;
|
|
2771
|
+
this.checkmarkIcon = checkIcon;
|
|
2772
|
+
this.exceptionSVGIcon = exclamationCircleIcon;
|
|
2773
|
+
this.uploadSVGIcon = uploadIcon;
|
|
2774
|
+
this.pauseSVGIcon = pauseSmIcon;
|
|
2775
|
+
}
|
|
2776
|
+
get iconClass() {
|
|
2777
|
+
if (!this.isUploading && !this.isFailed) {
|
|
2778
|
+
return 'checkmark';
|
|
2779
|
+
}
|
|
2780
|
+
if (!this.isUploading && this.isFailed) {
|
|
2781
|
+
return 'exception';
|
|
2782
|
+
}
|
|
2783
|
+
if (this.isUploading) {
|
|
2784
|
+
return 'upload';
|
|
2785
|
+
}
|
|
2786
|
+
if (this.isPaused) {
|
|
2787
|
+
return 'pause-sm';
|
|
2788
|
+
}
|
|
2789
|
+
}
|
|
2790
|
+
get SVGIconClass() {
|
|
2791
|
+
if (!this.isUploading && !this.isFailed) {
|
|
2792
|
+
return this.checkmarkIcon;
|
|
2793
|
+
}
|
|
2794
|
+
if (!this.isUploading && this.isFailed) {
|
|
2795
|
+
return this.exceptionSVGIcon;
|
|
2796
|
+
}
|
|
2797
|
+
if (this.isUploading) {
|
|
2798
|
+
return this.uploadSVGIcon;
|
|
2799
|
+
}
|
|
2800
|
+
if (this.isPaused) {
|
|
2801
|
+
return this.pauseSVGIcon;
|
|
2802
|
+
}
|
|
2803
|
+
}
|
|
2804
|
+
ngDoCheck() {
|
|
2805
|
+
this.isPaused = this.fileList.hasFileWithState([FileState.Paused]);
|
|
2806
|
+
this.isFailed = this.fileList.hasFileWithState([FileState.Failed]);
|
|
2807
|
+
this.isUploading = this.fileList.hasFileWithState([FileState.Uploading]);
|
|
2808
|
+
if (this.isPaused && !this.isUploading) {
|
|
2809
|
+
this.statusText = this.localization.get('headerStatusPaused');
|
|
2810
|
+
}
|
|
2811
|
+
else {
|
|
2812
|
+
this.statusText = this.isUploading ? this.localization.get('headerStatusUploading')
|
|
2813
|
+
: this.localization.get('headerStatusUploaded');
|
|
2814
|
+
}
|
|
2815
|
+
}
|
|
2816
|
+
}
|
|
2817
|
+
UploadStatusTotalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UploadStatusTotalComponent, deps: [{ token: i1$1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2818
|
+
UploadStatusTotalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: UploadStatusTotalComponent, isStandalone: true, selector: "kendo-upload-status-total", inputs: { fileList: "fileList" }, ngImport: i0, template: `
|
|
2819
|
+
<kendo-icon-wrapper
|
|
2820
|
+
[name]="iconClass"
|
|
2821
|
+
[svgIcon]="SVGIconClass"
|
|
2822
|
+
>
|
|
2823
|
+
</kendo-icon-wrapper>
|
|
2824
|
+
{{statusText}}
|
|
2825
|
+
`, isInline: true, dependencies: [{ kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }] });
|
|
2826
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UploadStatusTotalComponent, decorators: [{
|
|
2827
|
+
type: Component,
|
|
2828
|
+
args: [{
|
|
2829
|
+
selector: 'kendo-upload-status-total',
|
|
2830
|
+
template: `
|
|
2831
|
+
<kendo-icon-wrapper
|
|
2832
|
+
[name]="iconClass"
|
|
2833
|
+
[svgIcon]="SVGIconClass"
|
|
2834
|
+
>
|
|
2835
|
+
</kendo-icon-wrapper>
|
|
2836
|
+
{{statusText}}
|
|
2837
|
+
`,
|
|
2838
|
+
standalone: true,
|
|
2839
|
+
imports: [IconWrapperComponent]
|
|
2840
|
+
}]
|
|
2841
|
+
}], ctorParameters: function () { return [{ type: i1$1.LocalizationService }]; }, propDecorators: { fileList: [{
|
|
2842
|
+
type: Input
|
|
2843
|
+
}] } });
|
|
2844
|
+
|
|
2801
2845
|
/**
|
|
2802
2846
|
* @hidden
|
|
2803
2847
|
*/
|
|
@@ -2857,11 +2901,12 @@ class FileSelectDirective {
|
|
|
2857
2901
|
}
|
|
2858
2902
|
}
|
|
2859
2903
|
FileSelectDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FileSelectDirective, deps: [{ token: UploadService }, { token: NavigationService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2860
|
-
FileSelectDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", 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 });
|
|
2904
|
+
FileSelectDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: FileSelectDirective, isStandalone: true, 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 });
|
|
2861
2905
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FileSelectDirective, decorators: [{
|
|
2862
2906
|
type: Directive,
|
|
2863
2907
|
args: [{
|
|
2864
|
-
selector: '[kendoFileSelect]'
|
|
2908
|
+
selector: '[kendoFileSelect]',
|
|
2909
|
+
standalone: true
|
|
2865
2910
|
}]
|
|
2866
2911
|
}], ctorParameters: function () { return [{ type: UploadService }, { type: NavigationService }, { type: i0.ElementRef }]; }, propDecorators: { dir: [{
|
|
2867
2912
|
type: Input
|
|
@@ -2916,706 +2961,242 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2916
2961
|
/**
|
|
2917
2962
|
* @hidden
|
|
2918
2963
|
*/
|
|
2919
|
-
class
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
}], propDecorators: { cancel: [{
|
|
2926
|
-
type: Input
|
|
2927
|
-
}], clearSelectedFiles: [{
|
|
2928
|
-
type: Input
|
|
2929
|
-
}], dropFilesHere: [{
|
|
2930
|
-
type: Input
|
|
2931
|
-
}], externalDropFilesHere: [{
|
|
2932
|
-
type: Input
|
|
2933
|
-
}], filesBatchStatus: [{
|
|
2934
|
-
type: Input
|
|
2935
|
-
}], filesBatchStatusFailed: [{
|
|
2936
|
-
type: Input
|
|
2937
|
-
}], filesBatchStatusUploaded: [{
|
|
2938
|
-
type: Input
|
|
2939
|
-
}], fileStatusFailed: [{
|
|
2940
|
-
type: Input
|
|
2941
|
-
}], fileStatusUploaded: [{
|
|
2942
|
-
type: Input
|
|
2943
|
-
}], headerStatusPaused: [{
|
|
2944
|
-
type: Input
|
|
2945
|
-
}], headerStatusUploaded: [{
|
|
2946
|
-
type: Input
|
|
2947
|
-
}], headerStatusUploading: [{
|
|
2948
|
-
type: Input
|
|
2949
|
-
}], invalidFileExtension: [{
|
|
2950
|
-
type: Input
|
|
2951
|
-
}], invalidMaxFileSize: [{
|
|
2952
|
-
type: Input
|
|
2953
|
-
}], invalidMinFileSize: [{
|
|
2954
|
-
type: Input
|
|
2955
|
-
}], pause: [{
|
|
2956
|
-
type: Input
|
|
2957
|
-
}], remove: [{
|
|
2958
|
-
type: Input
|
|
2959
|
-
}], resume: [{
|
|
2960
|
-
type: Input
|
|
2961
|
-
}], retry: [{
|
|
2962
|
-
type: Input
|
|
2963
|
-
}], select: [{
|
|
2964
|
-
type: Input
|
|
2965
|
-
}], uploadSelectedFiles: [{
|
|
2966
|
-
type: Input
|
|
2967
|
-
}] } });
|
|
2968
|
-
|
|
2969
|
-
/**
|
|
2970
|
-
* @hidden
|
|
2971
|
-
*/
|
|
2972
|
-
class LocalizedMessagesDirective extends Messages {
|
|
2973
|
-
constructor(service) {
|
|
2974
|
-
super();
|
|
2975
|
-
this.service = service;
|
|
2964
|
+
class DropZoneBase {
|
|
2965
|
+
constructor(element, renderer, cssClass) {
|
|
2966
|
+
this.element = element;
|
|
2967
|
+
this.renderer = renderer;
|
|
2968
|
+
this.hideIntervalElement = null;
|
|
2969
|
+
this.hoverClass = cssClass;
|
|
2976
2970
|
}
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2971
|
+
/**
|
|
2972
|
+
* @hidden
|
|
2973
|
+
*/
|
|
2974
|
+
onElementDragEnterListener() {
|
|
2975
|
+
this.addClass(this.hoverClass);
|
|
2976
|
+
this.lastDragElement = new Date();
|
|
2977
|
+
if (!this.hideIntervalElement) {
|
|
2978
|
+
this.hideIntervalElement = setInterval(() => {
|
|
2979
|
+
if (this.calculateTimeDiff(this.lastDragElement) < 100) {
|
|
2980
|
+
return;
|
|
2981
|
+
}
|
|
2982
|
+
this.removeClass(this.hoverClass);
|
|
2983
|
+
clearInterval(this.hideIntervalElement);
|
|
2984
|
+
this.hideIntervalElement = null;
|
|
2985
|
+
}, 100);
|
|
2983
2986
|
}
|
|
2984
|
-
], usesInheritance: true, ngImport: i0 });
|
|
2985
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LocalizedMessagesDirective, decorators: [{
|
|
2986
|
-
type: Directive,
|
|
2987
|
-
args: [{
|
|
2988
|
-
providers: [
|
|
2989
|
-
{
|
|
2990
|
-
provide: Messages,
|
|
2991
|
-
useExisting: forwardRef(() => LocalizedMessagesDirective)
|
|
2992
|
-
}
|
|
2993
|
-
],
|
|
2994
|
-
selector: `
|
|
2995
|
-
[kendoUploadLocalizedMessages],
|
|
2996
|
-
[kendoFileSelectLocalizedMessages],
|
|
2997
|
-
[kendoUploadDropZoneLocalizedMessages]
|
|
2998
|
-
`
|
|
2999
|
-
}]
|
|
3000
|
-
}], ctorParameters: function () { return [{ type: i1$1.LocalizationService }]; } });
|
|
3001
|
-
|
|
3002
|
-
/**
|
|
3003
|
-
* @hidden
|
|
3004
|
-
*/
|
|
3005
|
-
const FILESELECT_VALUE_ACCESSOR = {
|
|
3006
|
-
multi: true,
|
|
3007
|
-
provide: NG_VALUE_ACCESSOR,
|
|
3008
|
-
useExisting: forwardRef(() => FileSelectComponent)
|
|
3009
|
-
};
|
|
3010
|
-
let idx$1 = 0;
|
|
3011
|
-
class FileSelectComponent extends UploadFileSelectBase {
|
|
3012
|
-
constructor(uploadService, localization, navigation, dropZoneService, ngZone, renderer, cdr, wrapper, injector) {
|
|
3013
|
-
super(uploadService, navigation, cdr, injector, ngZone);
|
|
3014
|
-
this.uploadService = uploadService;
|
|
3015
|
-
this.localization = localization;
|
|
3016
|
-
this.navigation = navigation;
|
|
3017
|
-
this.dropZoneService = dropZoneService;
|
|
3018
|
-
this.ngZone = ngZone;
|
|
3019
|
-
this.renderer = renderer;
|
|
3020
|
-
this.cdr = cdr;
|
|
3021
|
-
this.injector = injector;
|
|
3022
|
-
/**
|
|
3023
|
-
* Fires when the value of the component has changed as a result of a successful `select` or `remove` operation.
|
|
3024
|
-
*/
|
|
3025
|
-
this.valueChange = new EventEmitter();
|
|
3026
|
-
/**
|
|
3027
|
-
* @hidden
|
|
3028
|
-
*/
|
|
3029
|
-
this._restrictions = {
|
|
3030
|
-
allowedExtensions: [],
|
|
3031
|
-
maxFileSize: 0,
|
|
3032
|
-
minFileSize: 0
|
|
3033
|
-
};
|
|
3034
|
-
validatePackage(packageMetadata);
|
|
3035
|
-
this.wrapper = wrapper.nativeElement;
|
|
3036
|
-
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
3037
|
-
this.navigation.computeKeys();
|
|
3038
|
-
this.localizationChangeSubscription = localization.changes.subscribe(({ rtl }) => {
|
|
3039
|
-
this.direction = rtl ? 'rtl' : 'ltr';
|
|
3040
|
-
});
|
|
3041
|
-
this.subscribeBlur();
|
|
3042
|
-
this.subscribeFocus();
|
|
3043
|
-
this.attachEventHandlers();
|
|
3044
|
-
this.setDefaultSettings();
|
|
3045
|
-
}
|
|
3046
|
-
get dir() {
|
|
3047
|
-
return this.direction;
|
|
3048
|
-
}
|
|
3049
|
-
/**
|
|
3050
|
-
* Sets the `name` attribute of the `input` element of the FileSelect.
|
|
3051
|
-
*/
|
|
3052
|
-
set name(name) {
|
|
3053
|
-
this.uploadService.async.saveField = name;
|
|
3054
|
-
}
|
|
3055
|
-
get name() {
|
|
3056
|
-
return this.uploadService.async.saveField;
|
|
3057
|
-
}
|
|
3058
|
-
ngOnInit() {
|
|
3059
|
-
const { buttonId, fileListId } = this.getIds();
|
|
3060
|
-
this.focusableId = buttonId;
|
|
3061
|
-
this.fileListId = fileListId;
|
|
3062
|
-
if (this.zoneId) {
|
|
3063
|
-
this.dropZoneService.addComponent(this, this.zoneId);
|
|
3064
|
-
}
|
|
3065
|
-
this.subs.add(this.renderer.listen(this.fileSelectInput.nativeElement, 'mouseenter', () => {
|
|
3066
|
-
this.renderer.addClass(this.fileSelectButton.nativeElement, 'k-hover');
|
|
3067
|
-
}));
|
|
3068
|
-
this.subs.add(this.renderer.listen(this.fileSelectInput.nativeElement, 'mouseleave', () => {
|
|
3069
|
-
this.renderer.removeClass(this.fileSelectButton.nativeElement, 'k-hover');
|
|
3070
|
-
}));
|
|
3071
|
-
this.ngZone.runOutsideAngular(() => {
|
|
3072
|
-
this.subs.add(this.renderer.listen(this.wrapper, 'keydown', event => this.handleKeydown(event)));
|
|
3073
|
-
});
|
|
3074
|
-
}
|
|
3075
|
-
/**
|
|
3076
|
-
* @hidden
|
|
3077
|
-
*/
|
|
3078
|
-
textFor(key) {
|
|
3079
|
-
return this.localization.get(key);
|
|
3080
|
-
}
|
|
3081
|
-
ngOnDestroy() {
|
|
3082
|
-
this.fileList.clear();
|
|
3083
|
-
if (this.blurSubscription) {
|
|
3084
|
-
this.blurSubscription.unsubscribe();
|
|
3085
|
-
}
|
|
3086
|
-
if (this.wrapperFocusSubscription) {
|
|
3087
|
-
this.wrapperFocusSubscription.unsubscribe();
|
|
3088
|
-
}
|
|
3089
|
-
if (this.selectButtonFocusSubscription) {
|
|
3090
|
-
this.selectButtonFocusSubscription.unsubscribe();
|
|
3091
|
-
}
|
|
3092
|
-
if (this.localizationChangeSubscription) {
|
|
3093
|
-
this.localizationChangeSubscription.unsubscribe();
|
|
3094
|
-
}
|
|
3095
|
-
if (this.subs) {
|
|
3096
|
-
this.subs.unsubscribe();
|
|
3097
|
-
}
|
|
3098
|
-
}
|
|
3099
|
-
/**
|
|
3100
|
-
* Removes specific file from the file list.
|
|
3101
|
-
*/
|
|
3102
|
-
removeFileByUid(uid) {
|
|
3103
|
-
this.uploadService.removeFiles(uid);
|
|
3104
|
-
}
|
|
3105
|
-
/**
|
|
3106
|
-
* Visually clears all files from the UI.
|
|
3107
|
-
*/
|
|
3108
|
-
clearFiles() {
|
|
3109
|
-
this.uploadService.clearFiles();
|
|
3110
|
-
}
|
|
3111
|
-
/**
|
|
3112
|
-
* @hidden
|
|
3113
|
-
* Used to determine if the component is empty.
|
|
3114
|
-
*/
|
|
3115
|
-
isEmpty() {
|
|
3116
2987
|
return false;
|
|
3117
2988
|
}
|
|
3118
|
-
/**
|
|
3119
|
-
* @hidden
|
|
3120
|
-
* Used by the external dropzone to add files to the FileSelect
|
|
3121
|
-
*/
|
|
3122
|
-
addFiles(files) {
|
|
3123
|
-
this.uploadService.addFiles(files);
|
|
3124
|
-
}
|
|
3125
|
-
/**
|
|
3126
|
-
* @hidden
|
|
3127
|
-
*/
|
|
3128
|
-
get selectButtonTabIndex() {
|
|
3129
|
-
return this.disabled ? undefined : this.tabindex;
|
|
3130
|
-
}
|
|
3131
|
-
/**
|
|
3132
|
-
* @hidden
|
|
3133
|
-
*/
|
|
3134
|
-
getIds() {
|
|
3135
|
-
const id = ++idx$1;
|
|
3136
|
-
const buttonId = `k-fileselect-button-${id}`;
|
|
3137
|
-
const fileListId = `k-fileselect-file-list-${id}`;
|
|
3138
|
-
return { buttonId, fileListId };
|
|
3139
|
-
}
|
|
3140
2989
|
/**
|
|
3141
2990
|
* @hidden
|
|
3142
2991
|
*/
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
subscribeBlur() {
|
|
3147
|
-
if (!isDocumentAvailable()) {
|
|
3148
|
-
return;
|
|
3149
|
-
}
|
|
3150
|
-
this.ngZone.runOutsideAngular(() => {
|
|
3151
|
-
this.documentClick = fromEvent(document, 'click').pipe(filter((event) => {
|
|
3152
|
-
return !(this.wrapper !== event.target && this.wrapper.contains(event.target));
|
|
3153
|
-
}));
|
|
3154
|
-
this.blurSubscription = merge(this.documentClick, this.navigation.onTabOut).subscribe(() => {
|
|
3155
|
-
if (this.navigation.focused) {
|
|
3156
|
-
this.ngZone.run(() => {
|
|
3157
|
-
this.navigation.focused = false;
|
|
3158
|
-
this.onTouchedCallback();
|
|
3159
|
-
this.onBlur.emit();
|
|
3160
|
-
});
|
|
3161
|
-
}
|
|
3162
|
-
});
|
|
3163
|
-
});
|
|
3164
|
-
}
|
|
3165
|
-
subscribeFocus() {
|
|
3166
|
-
this.wrapperFocusSubscription = this.navigation.onWrapperFocus.subscribe(() => {
|
|
3167
|
-
this.onFocus.emit();
|
|
3168
|
-
});
|
|
3169
|
-
this.selectButtonFocusSubscription = this.navigation.onSelectButtonFocus.subscribe(() => {
|
|
3170
|
-
this.fileSelectButton.nativeElement.focus();
|
|
3171
|
-
});
|
|
3172
|
-
}
|
|
3173
|
-
handleKeydown(event) {
|
|
3174
|
-
if (this.disabled) {
|
|
3175
|
-
return;
|
|
3176
|
-
}
|
|
3177
|
-
if (event.target === this.fileSelectButton.nativeElement && (event.keyCode === Keys.Enter || event.keyCode === Keys.Space)) {
|
|
3178
|
-
event.preventDefault();
|
|
3179
|
-
this.fileSelectInput.nativeElement.click();
|
|
3180
|
-
return;
|
|
3181
|
-
}
|
|
3182
|
-
if (hasClasses(event.target, UPLOAD_CLASSES) ||
|
|
3183
|
-
(!isFocusable(event.target) && !hasClasses(event.target, IGNORE_TARGET_CLASSES))) {
|
|
3184
|
-
this.navigation.process(event, 'fileselect');
|
|
3185
|
-
}
|
|
3186
|
-
}
|
|
3187
|
-
attachEventHandlers() {
|
|
3188
|
-
this.subs = this.uploadService.changeEvent.subscribe((files) => {
|
|
3189
|
-
let model = [];
|
|
3190
|
-
if (files !== null) {
|
|
3191
|
-
files.forEach((file) => {
|
|
3192
|
-
if (file.state === FileState.Initial) {
|
|
3193
|
-
model.push(file);
|
|
3194
|
-
}
|
|
3195
|
-
if (file.state === FileState.Selected && file.rawFile && !file.validationErrors) {
|
|
3196
|
-
model.push(file.rawFile);
|
|
3197
|
-
}
|
|
3198
|
-
});
|
|
3199
|
-
}
|
|
3200
|
-
if (model.length === 0) {
|
|
3201
|
-
model = null;
|
|
3202
|
-
}
|
|
3203
|
-
this.onChangeCallback(model);
|
|
3204
|
-
this.valueChange.emit(model);
|
|
3205
|
-
});
|
|
3206
|
-
this.subs.add(this.uploadService.removeEvent.subscribe((args) => {
|
|
3207
|
-
this.remove.emit(args);
|
|
3208
|
-
}));
|
|
3209
|
-
this.subs.add(this.uploadService.selectEvent.subscribe((args) => {
|
|
3210
|
-
this.select.emit(args);
|
|
3211
|
-
}));
|
|
2992
|
+
onElementDragOverListener() {
|
|
2993
|
+
this.lastDragElement = new Date();
|
|
2994
|
+
return false;
|
|
3212
2995
|
}
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
this.uploadService.component = 'FileSelect';
|
|
2996
|
+
calculateTimeDiff(prevEvent) {
|
|
2997
|
+
return new Date().getTime() - prevEvent.getTime();
|
|
3216
2998
|
}
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
FileSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: FileSelectComponent, selector: "kendo-fileselect", inputs: { name: "name" }, outputs: { valueChange: "valueChange" }, host: { properties: { "attr.dir": "this.dir" } }, providers: [
|
|
3220
|
-
LocalizationService,
|
|
3221
|
-
NavigationService,
|
|
3222
|
-
UploadService,
|
|
3223
|
-
DropZoneService,
|
|
3224
|
-
FILESELECT_VALUE_ACCESSOR,
|
|
3225
|
-
{
|
|
3226
|
-
provide: L10N_PREFIX,
|
|
3227
|
-
useValue: 'kendo.fileselect'
|
|
3228
|
-
},
|
|
3229
|
-
{
|
|
3230
|
-
provide: KendoInput,
|
|
3231
|
-
useExisting: forwardRef(() => FileSelectComponent)
|
|
3232
|
-
}
|
|
3233
|
-
], viewQueries: [{ propertyName: "fileSelectInput", first: true, predicate: ["fileSelectInput"], descendants: true, static: true }], exportAs: ["kendoFileSelect"], usesInheritance: true, ngImport: i0, template: `
|
|
3234
|
-
<ng-container kendoFileSelectLocalizedMessages
|
|
3235
|
-
i18n-dropFilesHere="kendo.fileselect.dropFilesHere|The drop zone hint"
|
|
3236
|
-
dropFilesHere="Drop files here to select"
|
|
3237
|
-
|
|
3238
|
-
i18n-invalidFileExtension="kendo.fileselect.invalidFileExtension|The text for the invalid allowed extensions restriction message"
|
|
3239
|
-
invalidFileExtension="File type not allowed."
|
|
3240
|
-
|
|
3241
|
-
i18n-invalidMaxFileSize="kendo.fileselect.invalidMaxFileSize|The text for the invalid max file size restriction message"
|
|
3242
|
-
invalidMaxFileSize="File size too large."
|
|
3243
|
-
|
|
3244
|
-
i18n-invalidMinFileSize="kendo.fileselect.invalidMinFileSize|The text for the invalid min file size restriction message"
|
|
3245
|
-
invalidMinFileSize="File size too small."
|
|
3246
|
-
|
|
3247
|
-
i18n-remove="kendo.fileselect.remove|The text for the Remove button"
|
|
3248
|
-
remove="Remove"
|
|
3249
|
-
|
|
3250
|
-
i18n-select="kendo.fileselect.select|The text for the Select button"
|
|
3251
|
-
select="Select files..."
|
|
3252
|
-
>
|
|
3253
|
-
</ng-container>
|
|
3254
|
-
<div kendoFileSelectInternalDropZone
|
|
3255
|
-
[restrictions]="restrictions"
|
|
3256
|
-
[multiple]="multiple"
|
|
3257
|
-
[disabled]="disabled">
|
|
3258
|
-
<div class="k-upload-button-wrap">
|
|
3259
|
-
<button
|
|
3260
|
-
kendoButton
|
|
3261
|
-
#fileSelectButton
|
|
3262
|
-
class="k-upload-button"
|
|
3263
|
-
type="button"
|
|
3264
|
-
role="button"
|
|
3265
|
-
(click)="fileSelectInput.click()"
|
|
3266
|
-
(focus)="onFileSelectButtonFocus()"
|
|
3267
|
-
[id]="focusableId"
|
|
3268
|
-
[attr.aria-label]="textFor('select')"
|
|
3269
|
-
[attr.tabindex]="tabindex"
|
|
3270
|
-
[attr.aria-expanded]="hasFileList"
|
|
3271
|
-
[attr.aria-controls]="hasFileList ? fileListId : undefined"
|
|
3272
|
-
>
|
|
3273
|
-
{{textFor('select')}}
|
|
3274
|
-
</button>
|
|
3275
|
-
<input kendoFileSelect #fileSelectInput
|
|
3276
|
-
[dir]="direction"
|
|
3277
|
-
[accept]="accept"
|
|
3278
|
-
[restrictions]="restrictions"
|
|
3279
|
-
[multiple]="multiple"
|
|
3280
|
-
[disabled]="disabled"
|
|
3281
|
-
[required]="isControlRequired"
|
|
3282
|
-
/>
|
|
3283
|
-
</div>
|
|
3284
|
-
<div class="k-dropzone-hint">{{textFor('dropFilesHere')}}</div>
|
|
3285
|
-
</div>
|
|
3286
|
-
<ul kendo-upload-file-list
|
|
3287
|
-
class="k-upload-files k-reset"
|
|
3288
|
-
*ngIf="hasFileList"
|
|
3289
|
-
[disabled]="disabled"
|
|
3290
|
-
[fileList]="fileList.files"
|
|
3291
|
-
[fileTemplate]="fileTemplate"
|
|
3292
|
-
[fileInfoTemplate]="fileInfoTemplate"
|
|
3293
|
-
[id]="fileListId">
|
|
3294
|
-
</ul>
|
|
3295
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: DropZoneInternalDirective, selector: "\n [kendoUploadInternalDropZone],\n [kendoFileSelectInternalDropZone]\n ", inputs: ["disabled", "multiple", "restrictions"] }, { kind: "component", type: FileListComponent, selector: "[kendo-upload-file-list]", inputs: ["disabled", "fileList", "fileTemplate", "fileInfoTemplate"] }, { kind: "directive", type: FileSelectDirective, selector: "[kendoFileSelect]", inputs: ["dir", "disabled", "multiple", "restrictions", "accept", "required"] }, { kind: "directive", type: LocalizedMessagesDirective, selector: "\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n " }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i10.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"] }] });
|
|
3296
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FileSelectComponent, decorators: [{
|
|
3297
|
-
type: Component,
|
|
3298
|
-
args: [{
|
|
3299
|
-
exportAs: 'kendoFileSelect',
|
|
3300
|
-
providers: [
|
|
3301
|
-
LocalizationService,
|
|
3302
|
-
NavigationService,
|
|
3303
|
-
UploadService,
|
|
3304
|
-
DropZoneService,
|
|
3305
|
-
FILESELECT_VALUE_ACCESSOR,
|
|
3306
|
-
{
|
|
3307
|
-
provide: L10N_PREFIX,
|
|
3308
|
-
useValue: 'kendo.fileselect'
|
|
3309
|
-
},
|
|
3310
|
-
{
|
|
3311
|
-
provide: KendoInput,
|
|
3312
|
-
useExisting: forwardRef(() => FileSelectComponent)
|
|
3313
|
-
}
|
|
3314
|
-
],
|
|
3315
|
-
selector: 'kendo-fileselect',
|
|
3316
|
-
template: `
|
|
3317
|
-
<ng-container kendoFileSelectLocalizedMessages
|
|
3318
|
-
i18n-dropFilesHere="kendo.fileselect.dropFilesHere|The drop zone hint"
|
|
3319
|
-
dropFilesHere="Drop files here to select"
|
|
3320
|
-
|
|
3321
|
-
i18n-invalidFileExtension="kendo.fileselect.invalidFileExtension|The text for the invalid allowed extensions restriction message"
|
|
3322
|
-
invalidFileExtension="File type not allowed."
|
|
3323
|
-
|
|
3324
|
-
i18n-invalidMaxFileSize="kendo.fileselect.invalidMaxFileSize|The text for the invalid max file size restriction message"
|
|
3325
|
-
invalidMaxFileSize="File size too large."
|
|
3326
|
-
|
|
3327
|
-
i18n-invalidMinFileSize="kendo.fileselect.invalidMinFileSize|The text for the invalid min file size restriction message"
|
|
3328
|
-
invalidMinFileSize="File size too small."
|
|
3329
|
-
|
|
3330
|
-
i18n-remove="kendo.fileselect.remove|The text for the Remove button"
|
|
3331
|
-
remove="Remove"
|
|
3332
|
-
|
|
3333
|
-
i18n-select="kendo.fileselect.select|The text for the Select button"
|
|
3334
|
-
select="Select files..."
|
|
3335
|
-
>
|
|
3336
|
-
</ng-container>
|
|
3337
|
-
<div kendoFileSelectInternalDropZone
|
|
3338
|
-
[restrictions]="restrictions"
|
|
3339
|
-
[multiple]="multiple"
|
|
3340
|
-
[disabled]="disabled">
|
|
3341
|
-
<div class="k-upload-button-wrap">
|
|
3342
|
-
<button
|
|
3343
|
-
kendoButton
|
|
3344
|
-
#fileSelectButton
|
|
3345
|
-
class="k-upload-button"
|
|
3346
|
-
type="button"
|
|
3347
|
-
role="button"
|
|
3348
|
-
(click)="fileSelectInput.click()"
|
|
3349
|
-
(focus)="onFileSelectButtonFocus()"
|
|
3350
|
-
[id]="focusableId"
|
|
3351
|
-
[attr.aria-label]="textFor('select')"
|
|
3352
|
-
[attr.tabindex]="tabindex"
|
|
3353
|
-
[attr.aria-expanded]="hasFileList"
|
|
3354
|
-
[attr.aria-controls]="hasFileList ? fileListId : undefined"
|
|
3355
|
-
>
|
|
3356
|
-
{{textFor('select')}}
|
|
3357
|
-
</button>
|
|
3358
|
-
<input kendoFileSelect #fileSelectInput
|
|
3359
|
-
[dir]="direction"
|
|
3360
|
-
[accept]="accept"
|
|
3361
|
-
[restrictions]="restrictions"
|
|
3362
|
-
[multiple]="multiple"
|
|
3363
|
-
[disabled]="disabled"
|
|
3364
|
-
[required]="isControlRequired"
|
|
3365
|
-
/>
|
|
3366
|
-
</div>
|
|
3367
|
-
<div class="k-dropzone-hint">{{textFor('dropFilesHere')}}</div>
|
|
3368
|
-
</div>
|
|
3369
|
-
<ul kendo-upload-file-list
|
|
3370
|
-
class="k-upload-files k-reset"
|
|
3371
|
-
*ngIf="hasFileList"
|
|
3372
|
-
[disabled]="disabled"
|
|
3373
|
-
[fileList]="fileList.files"
|
|
3374
|
-
[fileTemplate]="fileTemplate"
|
|
3375
|
-
[fileInfoTemplate]="fileInfoTemplate"
|
|
3376
|
-
[id]="fileListId">
|
|
3377
|
-
</ul>
|
|
3378
|
-
`
|
|
3379
|
-
}]
|
|
3380
|
-
}], 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: { fileSelectInput: [{
|
|
3381
|
-
type: ViewChild,
|
|
3382
|
-
args: ['fileSelectInput', { static: true }]
|
|
3383
|
-
}], dir: [{
|
|
3384
|
-
type: HostBinding,
|
|
3385
|
-
args: ['attr.dir']
|
|
3386
|
-
}], name: [{
|
|
3387
|
-
type: Input
|
|
3388
|
-
}], valueChange: [{
|
|
3389
|
-
type: Output
|
|
3390
|
-
}] } });
|
|
3391
|
-
|
|
3392
|
-
/**
|
|
3393
|
-
* Custom component messages override default component messages ([more information and example]({% slug globalization_upload %})).
|
|
3394
|
-
*
|
|
3395
|
-
* @example
|
|
3396
|
-
* ```html-no-run
|
|
3397
|
-
* <kendo-fileselect>
|
|
3398
|
-
* <kendo-fileselect-messages
|
|
3399
|
-
* dropFilesHere="Drop your file here"
|
|
3400
|
-
* select="Upload file">
|
|
3401
|
-
* </kendo-fileselect-messages>
|
|
3402
|
-
* </kendo-fileselect>
|
|
3403
|
-
* ```
|
|
3404
|
-
*/
|
|
3405
|
-
class CustomMessagesComponent extends Messages {
|
|
3406
|
-
constructor(service) {
|
|
3407
|
-
super();
|
|
3408
|
-
this.service = service;
|
|
2999
|
+
addClass(className) {
|
|
3000
|
+
this.renderer.addClass(this.element.nativeElement, className);
|
|
3409
3001
|
}
|
|
3410
|
-
|
|
3411
|
-
|
|
3002
|
+
removeClass(className) {
|
|
3003
|
+
this.renderer.removeClass(this.element.nativeElement, className);
|
|
3412
3004
|
}
|
|
3413
3005
|
}
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
}
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
this.
|
|
3442
|
-
this.
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
get actionButtonsEndClassName() {
|
|
3447
|
-
return this.actionsLayout === 'end';
|
|
3448
|
-
}
|
|
3449
|
-
get actionButtonsStretchedClassName() {
|
|
3450
|
-
return this.actionsLayout === 'stretched';
|
|
3451
|
-
}
|
|
3452
|
-
get actionButtonsStartClassName() {
|
|
3453
|
-
return this.actionsLayout === 'start';
|
|
3454
|
-
}
|
|
3455
|
-
get actionButtonsCenterClassName() {
|
|
3456
|
-
return this.actionsLayout === 'center';
|
|
3457
|
-
}
|
|
3458
|
-
onUploadButtonFocus() {
|
|
3459
|
-
if (!this.navigation.focused) {
|
|
3460
|
-
this.navigation.focusedIndex = this.navigation.lastIndex;
|
|
3461
|
-
}
|
|
3006
|
+
DropZoneBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DropZoneBase, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: 'hoverClass' }], target: i0.ɵɵFactoryTarget.Directive });
|
|
3007
|
+
DropZoneBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: DropZoneBase, host: { listeners: { "dragenter": "onElementDragEnterListener()", "dragover": "onElementDragOverListener()" } }, ngImport: i0 });
|
|
3008
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DropZoneBase, decorators: [{
|
|
3009
|
+
type: Directive
|
|
3010
|
+
}], ctorParameters: function () {
|
|
3011
|
+
return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: undefined, decorators: [{
|
|
3012
|
+
type: Inject,
|
|
3013
|
+
args: ['hoverClass']
|
|
3014
|
+
}] }];
|
|
3015
|
+
}, propDecorators: { onElementDragEnterListener: [{
|
|
3016
|
+
type: HostListener,
|
|
3017
|
+
args: ['dragenter']
|
|
3018
|
+
}], onElementDragOverListener: [{
|
|
3019
|
+
type: HostListener,
|
|
3020
|
+
args: ['dragover']
|
|
3021
|
+
}] } });
|
|
3022
|
+
|
|
3023
|
+
/**
|
|
3024
|
+
* @hidden
|
|
3025
|
+
*/
|
|
3026
|
+
class DropZoneInternalDirective extends DropZoneBase {
|
|
3027
|
+
constructor(element, renderer, ngZone, uploadService) {
|
|
3028
|
+
super(element, renderer, 'k-hover');
|
|
3029
|
+
this.ngZone = ngZone;
|
|
3030
|
+
this.uploadService = uploadService;
|
|
3031
|
+
this.initialClassName = true;
|
|
3032
|
+
this.hideIntervalDocument = null;
|
|
3033
|
+
this.activeClass = 'k-dropzone-active';
|
|
3034
|
+
this.ngZone.runOutsideAngular(() => {
|
|
3035
|
+
this.unsubscribeDocumentDragEnter = this.renderer.listen('document', 'dragenter', () => this.onDocumentDragEnter());
|
|
3036
|
+
this.unsubscribeDocumentDragOver = this.renderer.listen('document', 'dragover', () => this.onDocumentDragOver());
|
|
3037
|
+
});
|
|
3462
3038
|
}
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3039
|
+
ngOnDestroy() {
|
|
3040
|
+
this.ngZone.runOutsideAngular(() => {
|
|
3041
|
+
if (this.unsubscribeDocumentDragEnter) {
|
|
3042
|
+
this.unsubscribeDocumentDragEnter();
|
|
3043
|
+
}
|
|
3044
|
+
if (this.unsubscribeDocumentDragOver) {
|
|
3045
|
+
this.unsubscribeDocumentDragOver();
|
|
3046
|
+
}
|
|
3047
|
+
});
|
|
3466
3048
|
}
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3049
|
+
onDocumentDragEnter() {
|
|
3050
|
+
this.addClass(this.activeClass);
|
|
3051
|
+
this.lastDragDocument = new Date();
|
|
3052
|
+
if (!this.hideIntervalDocument) {
|
|
3053
|
+
this.hideIntervalDocument = setInterval(() => {
|
|
3054
|
+
if (this.calculateTimeDiff(this.lastDragDocument) < 100) {
|
|
3055
|
+
return;
|
|
3056
|
+
}
|
|
3057
|
+
this.removeClass(this.activeClass);
|
|
3058
|
+
clearInterval(this.hideIntervalDocument);
|
|
3059
|
+
this.hideIntervalDocument = null;
|
|
3060
|
+
}, 100);
|
|
3471
3061
|
}
|
|
3062
|
+
return false;
|
|
3472
3063
|
}
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3064
|
+
/**
|
|
3065
|
+
* @hidden
|
|
3066
|
+
*/
|
|
3067
|
+
onDocumentDragOver() {
|
|
3068
|
+
this.lastDragDocument = new Date();
|
|
3069
|
+
return false;
|
|
3476
3070
|
}
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3071
|
+
onDropListener(event) {
|
|
3072
|
+
const droppedFiles = event.dataTransfer.files;
|
|
3073
|
+
if (droppedFiles.length > 0 && !this.disabled) {
|
|
3074
|
+
let files = getAllFileInfo(droppedFiles);
|
|
3075
|
+
files = assignGuidToFiles(files, !this.uploadService.async.batch);
|
|
3076
|
+
if (!this.multiple) {
|
|
3077
|
+
files.splice(1, files.length - 1);
|
|
3078
|
+
this.uploadService.clearFiles();
|
|
3079
|
+
}
|
|
3080
|
+
validateFiles(files, this.restrictions);
|
|
3081
|
+
this.uploadService.addFiles(files);
|
|
3481
3082
|
}
|
|
3482
|
-
|
|
3483
|
-
textFor(key) {
|
|
3484
|
-
return this.localization.get(key);
|
|
3083
|
+
return false;
|
|
3485
3084
|
}
|
|
3486
3085
|
}
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
{{textFor('clearSelectedFiles')}}
|
|
3492
|
-
</button>
|
|
3493
|
-
<button #uploadButton role="button" class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-primary k-upload-selected"
|
|
3494
|
-
(focus)="onUploadButtonFocus()"
|
|
3495
|
-
(click)="onUploadButtonClick($event)">
|
|
3496
|
-
{{textFor('uploadSelectedFiles')}}
|
|
3497
|
-
</button>
|
|
3498
|
-
`, isInline: true });
|
|
3499
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UploadActionButtonsComponent, decorators: [{
|
|
3500
|
-
type: Component,
|
|
3086
|
+
DropZoneInternalDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DropZoneInternalDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: UploadService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
3087
|
+
DropZoneInternalDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: DropZoneInternalDirective, isStandalone: true, selector: "\n [kendoUploadInternalDropZone],\n [kendoFileSelectInternalDropZone]\n ", inputs: { disabled: "disabled", multiple: "multiple", restrictions: "restrictions" }, host: { listeners: { "drop": "onDropListener($event)" }, properties: { "class.k-dropzone": "this.initialClassName", "class.k-upload-dropzone": "this.initialClassName" } }, usesInheritance: true, ngImport: i0 });
|
|
3088
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DropZoneInternalDirective, decorators: [{
|
|
3089
|
+
type: Directive,
|
|
3501
3090
|
args: [{
|
|
3502
|
-
selector:
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
</button>
|
|
3508
|
-
<button #uploadButton role="button" class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-primary k-upload-selected"
|
|
3509
|
-
(focus)="onUploadButtonFocus()"
|
|
3510
|
-
(click)="onUploadButtonClick($event)">
|
|
3511
|
-
{{textFor('uploadSelectedFiles')}}
|
|
3512
|
-
</button>
|
|
3513
|
-
`
|
|
3091
|
+
selector: `
|
|
3092
|
+
[kendoUploadInternalDropZone],
|
|
3093
|
+
[kendoFileSelectInternalDropZone]
|
|
3094
|
+
`,
|
|
3095
|
+
standalone: true
|
|
3514
3096
|
}]
|
|
3515
|
-
}], ctorParameters: function () { return [{ type:
|
|
3097
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: UploadService }]; }, propDecorators: { disabled: [{
|
|
3516
3098
|
type: Input
|
|
3517
|
-
}],
|
|
3099
|
+
}], multiple: [{
|
|
3518
3100
|
type: Input
|
|
3519
|
-
}],
|
|
3520
|
-
type:
|
|
3521
|
-
|
|
3522
|
-
}], uploadButton: [{
|
|
3523
|
-
type: ViewChild,
|
|
3524
|
-
args: ['uploadButton', { static: true }]
|
|
3525
|
-
}], hostDefaultClass: [{
|
|
3526
|
-
type: HostBinding,
|
|
3527
|
-
args: ['class.k-actions']
|
|
3528
|
-
}], actionButtonsEndClassName: [{
|
|
3529
|
-
type: HostBinding,
|
|
3530
|
-
args: ['class.k-actions-end']
|
|
3531
|
-
}], actionButtonsStretchedClassName: [{
|
|
3532
|
-
type: HostBinding,
|
|
3533
|
-
args: ['class.k-actions-stretched']
|
|
3534
|
-
}], actionButtonsStartClassName: [{
|
|
3101
|
+
}], restrictions: [{
|
|
3102
|
+
type: Input
|
|
3103
|
+
}], initialClassName: [{
|
|
3535
3104
|
type: HostBinding,
|
|
3536
|
-
args: ['class.k-
|
|
3537
|
-
}
|
|
3105
|
+
args: ['class.k-dropzone']
|
|
3106
|
+
}, {
|
|
3538
3107
|
type: HostBinding,
|
|
3539
|
-
args: ['class.k-
|
|
3108
|
+
args: ['class.k-upload-dropzone']
|
|
3109
|
+
}], onDropListener: [{
|
|
3110
|
+
type: HostListener,
|
|
3111
|
+
args: ['drop', ['$event']]
|
|
3540
3112
|
}] } });
|
|
3541
3113
|
|
|
3542
3114
|
/**
|
|
3543
3115
|
* @hidden
|
|
3544
3116
|
*/
|
|
3545
|
-
class
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
:
|
|
3591
|
-
|
|
3117
|
+
class Messages extends ComponentMessages {
|
|
3118
|
+
}
|
|
3119
|
+
Messages.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: Messages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
3120
|
+
Messages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: Messages, 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 });
|
|
3121
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: Messages, decorators: [{
|
|
3122
|
+
type: Directive
|
|
3123
|
+
}], propDecorators: { cancel: [{
|
|
3124
|
+
type: Input
|
|
3125
|
+
}], clearSelectedFiles: [{
|
|
3126
|
+
type: Input
|
|
3127
|
+
}], dropFilesHere: [{
|
|
3128
|
+
type: Input
|
|
3129
|
+
}], externalDropFilesHere: [{
|
|
3130
|
+
type: Input
|
|
3131
|
+
}], filesBatchStatus: [{
|
|
3132
|
+
type: Input
|
|
3133
|
+
}], filesBatchStatusFailed: [{
|
|
3134
|
+
type: Input
|
|
3135
|
+
}], filesBatchStatusUploaded: [{
|
|
3136
|
+
type: Input
|
|
3137
|
+
}], fileStatusFailed: [{
|
|
3138
|
+
type: Input
|
|
3139
|
+
}], fileStatusUploaded: [{
|
|
3140
|
+
type: Input
|
|
3141
|
+
}], headerStatusPaused: [{
|
|
3142
|
+
type: Input
|
|
3143
|
+
}], headerStatusUploaded: [{
|
|
3144
|
+
type: Input
|
|
3145
|
+
}], headerStatusUploading: [{
|
|
3146
|
+
type: Input
|
|
3147
|
+
}], invalidFileExtension: [{
|
|
3148
|
+
type: Input
|
|
3149
|
+
}], invalidMaxFileSize: [{
|
|
3150
|
+
type: Input
|
|
3151
|
+
}], invalidMinFileSize: [{
|
|
3152
|
+
type: Input
|
|
3153
|
+
}], pause: [{
|
|
3154
|
+
type: Input
|
|
3155
|
+
}], remove: [{
|
|
3156
|
+
type: Input
|
|
3157
|
+
}], resume: [{
|
|
3158
|
+
type: Input
|
|
3159
|
+
}], retry: [{
|
|
3160
|
+
type: Input
|
|
3161
|
+
}], select: [{
|
|
3162
|
+
type: Input
|
|
3163
|
+
}], uploadSelectedFiles: [{
|
|
3164
|
+
type: Input
|
|
3165
|
+
}] } });
|
|
3166
|
+
|
|
3167
|
+
/**
|
|
3168
|
+
* @hidden
|
|
3169
|
+
*/
|
|
3170
|
+
class LocalizedMessagesDirective extends Messages {
|
|
3171
|
+
constructor(service) {
|
|
3172
|
+
super();
|
|
3173
|
+
this.service = service;
|
|
3592
3174
|
}
|
|
3593
3175
|
}
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UploadStatusTotalComponent, decorators: [{
|
|
3604
|
-
type: Component,
|
|
3176
|
+
LocalizedMessagesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LocalizedMessagesDirective, deps: [{ token: i1$1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
3177
|
+
LocalizedMessagesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: LocalizedMessagesDirective, isStandalone: true, selector: "\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n ", providers: [
|
|
3178
|
+
{
|
|
3179
|
+
provide: Messages,
|
|
3180
|
+
useExisting: forwardRef(() => LocalizedMessagesDirective)
|
|
3181
|
+
}
|
|
3182
|
+
], usesInheritance: true, ngImport: i0 });
|
|
3183
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LocalizedMessagesDirective, decorators: [{
|
|
3184
|
+
type: Directive,
|
|
3605
3185
|
args: [{
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3186
|
+
providers: [
|
|
3187
|
+
{
|
|
3188
|
+
provide: Messages,
|
|
3189
|
+
useExisting: forwardRef(() => LocalizedMessagesDirective)
|
|
3190
|
+
}
|
|
3191
|
+
],
|
|
3192
|
+
selector: `
|
|
3193
|
+
[kendoUploadLocalizedMessages],
|
|
3194
|
+
[kendoFileSelectLocalizedMessages],
|
|
3195
|
+
[kendoUploadDropZoneLocalizedMessages]
|
|
3196
|
+
`,
|
|
3197
|
+
standalone: true
|
|
3615
3198
|
}]
|
|
3616
|
-
}], ctorParameters: function () { return [{ type: i1$1.LocalizationService }]; }
|
|
3617
|
-
type: Input
|
|
3618
|
-
}] } });
|
|
3199
|
+
}], ctorParameters: function () { return [{ type: i1$1.LocalizationService }]; } });
|
|
3619
3200
|
|
|
3620
3201
|
/**
|
|
3621
3202
|
* @hidden
|
|
@@ -3625,7 +3206,7 @@ const UPLOAD_VALUE_ACCESSOR = {
|
|
|
3625
3206
|
provide: NG_VALUE_ACCESSOR,
|
|
3626
3207
|
useExisting: forwardRef(() => UploadComponent)
|
|
3627
3208
|
};
|
|
3628
|
-
let idx = 0;
|
|
3209
|
+
let idx$1 = 0;
|
|
3629
3210
|
/**
|
|
3630
3211
|
* Represents the [Kendo UI Upload component for Angular]({% slug overview_upload %}).
|
|
3631
3212
|
*/
|
|
@@ -3947,7 +3528,7 @@ class UploadComponent extends UploadFileSelectBase {
|
|
|
3947
3528
|
* @hidden
|
|
3948
3529
|
*/
|
|
3949
3530
|
getIds() {
|
|
3950
|
-
const id = ++idx;
|
|
3531
|
+
const id = ++idx$1;
|
|
3951
3532
|
const buttonId = `k-upload-button-${id}`;
|
|
3952
3533
|
const fileListId = `k-upload-file-list-${id}`;
|
|
3953
3534
|
return { buttonId, fileListId };
|
|
@@ -4108,7 +3689,7 @@ class UploadComponent extends UploadFileSelectBase {
|
|
|
4108
3689
|
}
|
|
4109
3690
|
}
|
|
4110
3691
|
UploadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", 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 });
|
|
4111
|
-
UploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", 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", 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: [
|
|
3692
|
+
UploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", 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: [
|
|
4112
3693
|
LocalizationService,
|
|
4113
3694
|
NavigationService,
|
|
4114
3695
|
UploadService,
|
|
@@ -4233,7 +3814,7 @@ UploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", versio
|
|
|
4233
3814
|
[disabled]="disabled"
|
|
4234
3815
|
[actionsLayout]="actionsLayout">
|
|
4235
3816
|
</kendo-upload-action-buttons>
|
|
4236
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: DropZoneInternalDirective, selector: "\n [kendoUploadInternalDropZone],\n [kendoFileSelectInternalDropZone]\n ", inputs: ["disabled", "multiple", "restrictions"] }, { kind: "component", type:
|
|
3817
|
+
`, 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], 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"] }, { kind: "directive", type: FileSelectDirective, selector: "[kendoFileSelect]", inputs: ["dir", "disabled", "multiple", "restrictions", "accept", "required"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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"] }] });
|
|
4237
3818
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UploadComponent, decorators: [{
|
|
4238
3819
|
type: Component,
|
|
4239
3820
|
args: [{
|
|
@@ -4365,7 +3946,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
4365
3946
|
[disabled]="disabled"
|
|
4366
3947
|
[actionsLayout]="actionsLayout">
|
|
4367
3948
|
</kendo-upload-action-buttons>
|
|
4368
|
-
|
|
3949
|
+
`,
|
|
3950
|
+
standalone: true,
|
|
3951
|
+
imports: [LocalizedMessagesDirective, DropZoneInternalDirective, ButtonComponent, FileSelectDirective, NgIf, UploadStatusTotalComponent, FileListComponent, UploadActionButtonsComponent]
|
|
4369
3952
|
}]
|
|
4370
3953
|
}], 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: [{
|
|
4371
3954
|
type: Input
|
|
@@ -4435,221 +4018,661 @@ class UploadDropZoneDirective {
|
|
|
4435
4018
|
this.dropZoneService = dropZoneService;
|
|
4436
4019
|
}
|
|
4437
4020
|
/**
|
|
4438
|
-
* @hidden
|
|
4021
|
+
* @hidden
|
|
4022
|
+
*/
|
|
4023
|
+
onElementDragEnter() {
|
|
4024
|
+
return false;
|
|
4025
|
+
}
|
|
4026
|
+
/**
|
|
4027
|
+
* @hidden
|
|
4028
|
+
*/
|
|
4029
|
+
onElementDragOver() {
|
|
4030
|
+
return false;
|
|
4031
|
+
}
|
|
4032
|
+
/**
|
|
4033
|
+
* @hidden
|
|
4034
|
+
*/
|
|
4035
|
+
onDropListener(event) {
|
|
4036
|
+
const components = this.componentInstance;
|
|
4037
|
+
if (!isPresent(components)) {
|
|
4038
|
+
return;
|
|
4039
|
+
}
|
|
4040
|
+
components.forEach((component) => {
|
|
4041
|
+
const droppedFiles = event.dataTransfer.files;
|
|
4042
|
+
if (droppedFiles.length > 0 && !component.disabled) {
|
|
4043
|
+
let files = getAllFileInfo(droppedFiles);
|
|
4044
|
+
if (component instanceof UploadComponent) {
|
|
4045
|
+
files = assignGuidToFiles(files, !component.batch);
|
|
4046
|
+
}
|
|
4047
|
+
else {
|
|
4048
|
+
files = assignGuidToFiles(files, true);
|
|
4049
|
+
}
|
|
4050
|
+
if (!component.multiple) {
|
|
4051
|
+
files.splice(1, files.length - 1);
|
|
4052
|
+
component.clearFiles();
|
|
4053
|
+
}
|
|
4054
|
+
validateFiles(files, component.restrictions);
|
|
4055
|
+
component.addFiles(files);
|
|
4056
|
+
}
|
|
4057
|
+
});
|
|
4058
|
+
return false;
|
|
4059
|
+
}
|
|
4060
|
+
/**
|
|
4061
|
+
* @hidden
|
|
4062
|
+
*/
|
|
4063
|
+
get componentInstance() {
|
|
4064
|
+
return this.dropZoneService.getComponents(this.zoneId);
|
|
4065
|
+
}
|
|
4066
|
+
}
|
|
4067
|
+
UploadDropZoneDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UploadDropZoneDirective, deps: [{ token: DropZoneService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
4068
|
+
UploadDropZoneDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: UploadDropZoneDirective, isStandalone: true, selector: "[kendoUploadDropZone], [kendoFileSelectDropZone]", inputs: { zoneId: ["kendoUploadDropZone", "zoneId"] }, host: { listeners: { "dragenter": "onElementDragEnter()", "dragover": "onElementDragOver()", "drop": "onDropListener($event)" } }, providers: [
|
|
4069
|
+
DropZoneService
|
|
4070
|
+
], ngImport: i0 });
|
|
4071
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UploadDropZoneDirective, decorators: [{
|
|
4072
|
+
type: Directive,
|
|
4073
|
+
args: [{
|
|
4074
|
+
providers: [
|
|
4075
|
+
DropZoneService
|
|
4076
|
+
],
|
|
4077
|
+
selector: '[kendoUploadDropZone], [kendoFileSelectDropZone]',
|
|
4078
|
+
standalone: true
|
|
4079
|
+
}]
|
|
4080
|
+
}], ctorParameters: function () { return [{ type: DropZoneService }]; }, propDecorators: { zoneId: [{
|
|
4081
|
+
type: Input,
|
|
4082
|
+
args: ['kendoUploadDropZone']
|
|
4083
|
+
}], onElementDragEnter: [{
|
|
4084
|
+
type: HostListener,
|
|
4085
|
+
args: ['dragenter']
|
|
4086
|
+
}], onElementDragOver: [{
|
|
4087
|
+
type: HostListener,
|
|
4088
|
+
args: ['dragover']
|
|
4089
|
+
}], onDropListener: [{
|
|
4090
|
+
type: HostListener,
|
|
4091
|
+
args: ['drop', ['$event']]
|
|
4092
|
+
}] } });
|
|
4093
|
+
|
|
4094
|
+
/**
|
|
4095
|
+
* Represents the [Kendo UI UploadDropZone component for Angular]({% slug overview_upload %}).
|
|
4096
|
+
*/
|
|
4097
|
+
class UploadDropZoneComponent extends DropZoneBase {
|
|
4098
|
+
constructor(element, renderer, localization) {
|
|
4099
|
+
super(element, renderer, 'k-external-dropzone-hover');
|
|
4100
|
+
this.localization = localization;
|
|
4101
|
+
this.hostClass = true;
|
|
4102
|
+
this._svgIcon = uploadIcon;
|
|
4103
|
+
this.localizationChangeSubscription = this.localization.changes.subscribe(({ rtl }) => {
|
|
4104
|
+
this.direction = rtl ? 'rtl' : 'ltr';
|
|
4105
|
+
});
|
|
4106
|
+
}
|
|
4107
|
+
get dirAttribute() {
|
|
4108
|
+
return this.direction;
|
|
4109
|
+
}
|
|
4110
|
+
/**
|
|
4111
|
+
* Defines an SVGIcon to be rendered inside the DropZone.
|
|
4112
|
+
* The input can take either an [existing Kendo SVG icon](slug:svgicon_list) or a custom one.
|
|
4113
|
+
*/
|
|
4114
|
+
set svgIcon(icon) {
|
|
4115
|
+
if (isDevMode() && icon && this.icon && this.iconClass) {
|
|
4116
|
+
throw new Error('Setting both icon/svgIcon and iconClass options at the same time is not supported.');
|
|
4117
|
+
}
|
|
4118
|
+
this._svgIcon = icon;
|
|
4119
|
+
}
|
|
4120
|
+
get svgIcon() {
|
|
4121
|
+
return this._svgIcon;
|
|
4122
|
+
}
|
|
4123
|
+
/**
|
|
4124
|
+
* @hidden
|
|
4125
|
+
*/
|
|
4126
|
+
textFor(key) {
|
|
4127
|
+
return this.localization.get(key);
|
|
4128
|
+
}
|
|
4129
|
+
/**
|
|
4130
|
+
* @hidden
|
|
4131
|
+
*/
|
|
4132
|
+
get iconClasses() {
|
|
4133
|
+
if (this.icon) {
|
|
4134
|
+
return `${this.icon}`;
|
|
4135
|
+
}
|
|
4136
|
+
if (!this.icon && !this.iconClass) {
|
|
4137
|
+
return 'upload';
|
|
4138
|
+
}
|
|
4139
|
+
}
|
|
4140
|
+
ngOnDestroy() {
|
|
4141
|
+
if (this.localizationChangeSubscription) {
|
|
4142
|
+
this.localizationChangeSubscription.unsubscribe();
|
|
4143
|
+
}
|
|
4144
|
+
}
|
|
4145
|
+
}
|
|
4146
|
+
UploadDropZoneComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UploadDropZoneComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i1$1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4147
|
+
UploadDropZoneComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: UploadDropZoneComponent, isStandalone: true, selector: "kendo-uploaddropzone", inputs: { zoneId: "zoneId", icon: "icon", iconClass: "iconClass", svgIcon: "svgIcon" }, host: { properties: { "class.k-external-dropzone": "this.hostClass", "attr.dir": "this.dirAttribute" } }, providers: [
|
|
4148
|
+
LocalizationService,
|
|
4149
|
+
{
|
|
4150
|
+
provide: L10N_PREFIX,
|
|
4151
|
+
useValue: 'kendo.uploaddropzone'
|
|
4152
|
+
}
|
|
4153
|
+
], exportAs: ["kendoUploadDropZone"], usesInheritance: true, ngImport: i0, template: `
|
|
4154
|
+
<ng-container kendoUploadDropZoneLocalizedMessages
|
|
4155
|
+
i18n-externalDropFilesHere='kendo.uploaddropzone.externalDropFilesHere|Sets the external drop-zone hint'
|
|
4156
|
+
externalDropFilesHere='Drag and drop files here to upload'>
|
|
4157
|
+
</ng-container>
|
|
4158
|
+
<div class='k-dropzone-inner' [kendoUploadDropZone]="zoneId">
|
|
4159
|
+
<kendo-icon-wrapper
|
|
4160
|
+
size="xxxlarge"
|
|
4161
|
+
innerCssClass="k-dropzone-icon"
|
|
4162
|
+
[name]="iconClasses"
|
|
4163
|
+
[customFontClass]="iconClass"
|
|
4164
|
+
[svgIcon]="svgIcon"
|
|
4165
|
+
></kendo-icon-wrapper>
|
|
4166
|
+
<span class="k-dropzone-hint">{{ textFor('externalDropFilesHere') }}</span>
|
|
4167
|
+
<span class="k-dropzone-note">
|
|
4168
|
+
<ng-content></ng-content>
|
|
4169
|
+
</span>
|
|
4170
|
+
</div>
|
|
4171
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: LocalizedMessagesDirective, selector: "\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n " }, { kind: "directive", type: UploadDropZoneDirective, selector: "[kendoUploadDropZone], [kendoFileSelectDropZone]", inputs: ["kendoUploadDropZone"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }] });
|
|
4172
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UploadDropZoneComponent, decorators: [{
|
|
4173
|
+
type: Component,
|
|
4174
|
+
args: [{
|
|
4175
|
+
exportAs: 'kendoUploadDropZone',
|
|
4176
|
+
providers: [
|
|
4177
|
+
LocalizationService,
|
|
4178
|
+
{
|
|
4179
|
+
provide: L10N_PREFIX,
|
|
4180
|
+
useValue: 'kendo.uploaddropzone'
|
|
4181
|
+
}
|
|
4182
|
+
],
|
|
4183
|
+
selector: 'kendo-uploaddropzone',
|
|
4184
|
+
template: `
|
|
4185
|
+
<ng-container kendoUploadDropZoneLocalizedMessages
|
|
4186
|
+
i18n-externalDropFilesHere='kendo.uploaddropzone.externalDropFilesHere|Sets the external drop-zone hint'
|
|
4187
|
+
externalDropFilesHere='Drag and drop files here to upload'>
|
|
4188
|
+
</ng-container>
|
|
4189
|
+
<div class='k-dropzone-inner' [kendoUploadDropZone]="zoneId">
|
|
4190
|
+
<kendo-icon-wrapper
|
|
4191
|
+
size="xxxlarge"
|
|
4192
|
+
innerCssClass="k-dropzone-icon"
|
|
4193
|
+
[name]="iconClasses"
|
|
4194
|
+
[customFontClass]="iconClass"
|
|
4195
|
+
[svgIcon]="svgIcon"
|
|
4196
|
+
></kendo-icon-wrapper>
|
|
4197
|
+
<span class="k-dropzone-hint">{{ textFor('externalDropFilesHere') }}</span>
|
|
4198
|
+
<span class="k-dropzone-note">
|
|
4199
|
+
<ng-content></ng-content>
|
|
4200
|
+
</span>
|
|
4201
|
+
</div>
|
|
4202
|
+
`,
|
|
4203
|
+
standalone: true,
|
|
4204
|
+
imports: [LocalizedMessagesDirective, UploadDropZoneDirective, IconWrapperComponent]
|
|
4205
|
+
}]
|
|
4206
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i1$1.LocalizationService }]; }, propDecorators: { hostClass: [{
|
|
4207
|
+
type: HostBinding,
|
|
4208
|
+
args: ['class.k-external-dropzone']
|
|
4209
|
+
}], dirAttribute: [{
|
|
4210
|
+
type: HostBinding,
|
|
4211
|
+
args: ['attr.dir']
|
|
4212
|
+
}], zoneId: [{
|
|
4213
|
+
type: Input
|
|
4214
|
+
}], icon: [{
|
|
4215
|
+
type: Input
|
|
4216
|
+
}], iconClass: [{
|
|
4217
|
+
type: Input
|
|
4218
|
+
}], svgIcon: [{
|
|
4219
|
+
type: Input
|
|
4220
|
+
}] } });
|
|
4221
|
+
|
|
4222
|
+
/**
|
|
4223
|
+
* @hidden
|
|
4224
|
+
*/
|
|
4225
|
+
const FILESELECT_VALUE_ACCESSOR = {
|
|
4226
|
+
multi: true,
|
|
4227
|
+
provide: NG_VALUE_ACCESSOR,
|
|
4228
|
+
useExisting: forwardRef(() => FileSelectComponent)
|
|
4229
|
+
};
|
|
4230
|
+
let idx = 0;
|
|
4231
|
+
class FileSelectComponent extends UploadFileSelectBase {
|
|
4232
|
+
constructor(uploadService, localization, navigation, dropZoneService, ngZone, renderer, cdr, wrapper, injector) {
|
|
4233
|
+
super(uploadService, navigation, cdr, injector, ngZone);
|
|
4234
|
+
this.uploadService = uploadService;
|
|
4235
|
+
this.localization = localization;
|
|
4236
|
+
this.navigation = navigation;
|
|
4237
|
+
this.dropZoneService = dropZoneService;
|
|
4238
|
+
this.ngZone = ngZone;
|
|
4239
|
+
this.renderer = renderer;
|
|
4240
|
+
this.cdr = cdr;
|
|
4241
|
+
this.injector = injector;
|
|
4242
|
+
/**
|
|
4243
|
+
* Fires when the value of the component has changed as a result of a successful `select` or `remove` operation.
|
|
4244
|
+
*/
|
|
4245
|
+
this.valueChange = new EventEmitter();
|
|
4246
|
+
/**
|
|
4247
|
+
* @hidden
|
|
4248
|
+
*/
|
|
4249
|
+
this._restrictions = {
|
|
4250
|
+
allowedExtensions: [],
|
|
4251
|
+
maxFileSize: 0,
|
|
4252
|
+
minFileSize: 0
|
|
4253
|
+
};
|
|
4254
|
+
validatePackage(packageMetadata);
|
|
4255
|
+
this.wrapper = wrapper.nativeElement;
|
|
4256
|
+
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
4257
|
+
this.navigation.computeKeys();
|
|
4258
|
+
this.localizationChangeSubscription = localization.changes.subscribe(({ rtl }) => {
|
|
4259
|
+
this.direction = rtl ? 'rtl' : 'ltr';
|
|
4260
|
+
});
|
|
4261
|
+
this.subscribeBlur();
|
|
4262
|
+
this.subscribeFocus();
|
|
4263
|
+
this.attachEventHandlers();
|
|
4264
|
+
this.setDefaultSettings();
|
|
4265
|
+
}
|
|
4266
|
+
get dir() {
|
|
4267
|
+
return this.direction;
|
|
4268
|
+
}
|
|
4269
|
+
/**
|
|
4270
|
+
* Sets the `name` attribute of the `input` element of the FileSelect.
|
|
4439
4271
|
*/
|
|
4440
|
-
|
|
4441
|
-
|
|
4272
|
+
set name(name) {
|
|
4273
|
+
this.uploadService.async.saveField = name;
|
|
4274
|
+
}
|
|
4275
|
+
get name() {
|
|
4276
|
+
return this.uploadService.async.saveField;
|
|
4277
|
+
}
|
|
4278
|
+
ngOnInit() {
|
|
4279
|
+
const { buttonId, fileListId } = this.getIds();
|
|
4280
|
+
this.focusableId = buttonId;
|
|
4281
|
+
this.fileListId = fileListId;
|
|
4282
|
+
if (this.zoneId) {
|
|
4283
|
+
this.dropZoneService.addComponent(this, this.zoneId);
|
|
4284
|
+
}
|
|
4285
|
+
this.subs.add(this.renderer.listen(this.fileSelectInput.nativeElement, 'mouseenter', () => {
|
|
4286
|
+
this.renderer.addClass(this.fileSelectButton.nativeElement, 'k-hover');
|
|
4287
|
+
}));
|
|
4288
|
+
this.subs.add(this.renderer.listen(this.fileSelectInput.nativeElement, 'mouseleave', () => {
|
|
4289
|
+
this.renderer.removeClass(this.fileSelectButton.nativeElement, 'k-hover');
|
|
4290
|
+
}));
|
|
4291
|
+
this.ngZone.runOutsideAngular(() => {
|
|
4292
|
+
this.subs.add(this.renderer.listen(this.wrapper, 'keydown', event => this.handleKeydown(event)));
|
|
4293
|
+
});
|
|
4442
4294
|
}
|
|
4443
4295
|
/**
|
|
4444
4296
|
* @hidden
|
|
4445
4297
|
*/
|
|
4446
|
-
|
|
4447
|
-
return
|
|
4298
|
+
textFor(key) {
|
|
4299
|
+
return this.localization.get(key);
|
|
4300
|
+
}
|
|
4301
|
+
ngOnDestroy() {
|
|
4302
|
+
this.fileList.clear();
|
|
4303
|
+
if (this.blurSubscription) {
|
|
4304
|
+
this.blurSubscription.unsubscribe();
|
|
4305
|
+
}
|
|
4306
|
+
if (this.wrapperFocusSubscription) {
|
|
4307
|
+
this.wrapperFocusSubscription.unsubscribe();
|
|
4308
|
+
}
|
|
4309
|
+
if (this.selectButtonFocusSubscription) {
|
|
4310
|
+
this.selectButtonFocusSubscription.unsubscribe();
|
|
4311
|
+
}
|
|
4312
|
+
if (this.localizationChangeSubscription) {
|
|
4313
|
+
this.localizationChangeSubscription.unsubscribe();
|
|
4314
|
+
}
|
|
4315
|
+
if (this.subs) {
|
|
4316
|
+
this.subs.unsubscribe();
|
|
4317
|
+
}
|
|
4318
|
+
}
|
|
4319
|
+
/**
|
|
4320
|
+
* Removes specific file from the file list.
|
|
4321
|
+
*/
|
|
4322
|
+
removeFileByUid(uid) {
|
|
4323
|
+
this.uploadService.removeFiles(uid);
|
|
4324
|
+
}
|
|
4325
|
+
/**
|
|
4326
|
+
* Visually clears all files from the UI.
|
|
4327
|
+
*/
|
|
4328
|
+
clearFiles() {
|
|
4329
|
+
this.uploadService.clearFiles();
|
|
4448
4330
|
}
|
|
4449
4331
|
/**
|
|
4450
4332
|
* @hidden
|
|
4333
|
+
* Used to determine if the component is empty.
|
|
4451
4334
|
*/
|
|
4452
|
-
|
|
4453
|
-
const components = this.componentInstance;
|
|
4454
|
-
if (!isPresent(components)) {
|
|
4455
|
-
return;
|
|
4456
|
-
}
|
|
4457
|
-
components.forEach((component) => {
|
|
4458
|
-
const droppedFiles = event.dataTransfer.files;
|
|
4459
|
-
if (droppedFiles.length > 0 && !component.disabled) {
|
|
4460
|
-
let files = getAllFileInfo(droppedFiles);
|
|
4461
|
-
if (component instanceof UploadComponent) {
|
|
4462
|
-
files = assignGuidToFiles(files, !component.batch);
|
|
4463
|
-
}
|
|
4464
|
-
else {
|
|
4465
|
-
files = assignGuidToFiles(files, true);
|
|
4466
|
-
}
|
|
4467
|
-
if (!component.multiple) {
|
|
4468
|
-
files.splice(1, files.length - 1);
|
|
4469
|
-
component.clearFiles();
|
|
4470
|
-
}
|
|
4471
|
-
validateFiles(files, component.restrictions);
|
|
4472
|
-
component.addFiles(files);
|
|
4473
|
-
}
|
|
4474
|
-
});
|
|
4335
|
+
isEmpty() {
|
|
4475
4336
|
return false;
|
|
4476
4337
|
}
|
|
4477
4338
|
/**
|
|
4478
4339
|
* @hidden
|
|
4340
|
+
* Used by the external dropzone to add files to the FileSelect
|
|
4479
4341
|
*/
|
|
4480
|
-
|
|
4481
|
-
|
|
4482
|
-
}
|
|
4483
|
-
}
|
|
4484
|
-
UploadDropZoneDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UploadDropZoneDirective, deps: [{ token: DropZoneService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
4485
|
-
UploadDropZoneDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: UploadDropZoneDirective, selector: "[kendoUploadDropZone], [kendoFileSelectDropZone]", inputs: { zoneId: ["kendoUploadDropZone", "zoneId"] }, host: { listeners: { "dragenter": "onElementDragEnter()", "dragover": "onElementDragOver()", "drop": "onDropListener($event)" } }, providers: [
|
|
4486
|
-
DropZoneService
|
|
4487
|
-
], ngImport: i0 });
|
|
4488
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UploadDropZoneDirective, decorators: [{
|
|
4489
|
-
type: Directive,
|
|
4490
|
-
args: [{
|
|
4491
|
-
providers: [
|
|
4492
|
-
DropZoneService
|
|
4493
|
-
],
|
|
4494
|
-
selector: '[kendoUploadDropZone], [kendoFileSelectDropZone]'
|
|
4495
|
-
}]
|
|
4496
|
-
}], ctorParameters: function () { return [{ type: DropZoneService }]; }, propDecorators: { zoneId: [{
|
|
4497
|
-
type: Input,
|
|
4498
|
-
args: ['kendoUploadDropZone']
|
|
4499
|
-
}], onElementDragEnter: [{
|
|
4500
|
-
type: HostListener,
|
|
4501
|
-
args: ['dragenter']
|
|
4502
|
-
}], onElementDragOver: [{
|
|
4503
|
-
type: HostListener,
|
|
4504
|
-
args: ['dragover']
|
|
4505
|
-
}], onDropListener: [{
|
|
4506
|
-
type: HostListener,
|
|
4507
|
-
args: ['drop', ['$event']]
|
|
4508
|
-
}] } });
|
|
4509
|
-
|
|
4510
|
-
/**
|
|
4511
|
-
* Represents the [Kendo UI UploadDropZone component for Angular]({% slug overview_upload %}).
|
|
4512
|
-
*/
|
|
4513
|
-
class UploadDropZoneComponent extends DropZoneBase {
|
|
4514
|
-
constructor(element, renderer, localization) {
|
|
4515
|
-
super(element, renderer, 'k-external-dropzone-hover');
|
|
4516
|
-
this.localization = localization;
|
|
4517
|
-
this.hostClass = true;
|
|
4518
|
-
this._svgIcon = uploadIcon;
|
|
4519
|
-
this.localizationChangeSubscription = this.localization.changes.subscribe(({ rtl }) => {
|
|
4520
|
-
this.direction = rtl ? 'rtl' : 'ltr';
|
|
4521
|
-
});
|
|
4522
|
-
}
|
|
4523
|
-
get dirAttribute() {
|
|
4524
|
-
return this.direction;
|
|
4342
|
+
addFiles(files) {
|
|
4343
|
+
this.uploadService.addFiles(files);
|
|
4525
4344
|
}
|
|
4526
4345
|
/**
|
|
4527
|
-
*
|
|
4528
|
-
* The input can take either an [existing Kendo SVG icon](slug:svgicon_list) or a custom one.
|
|
4346
|
+
* @hidden
|
|
4529
4347
|
*/
|
|
4530
|
-
|
|
4531
|
-
|
|
4532
|
-
throw new Error('Setting both icon/svgIcon and iconClass options at the same time is not supported.');
|
|
4533
|
-
}
|
|
4534
|
-
this._svgIcon = icon;
|
|
4535
|
-
}
|
|
4536
|
-
get svgIcon() {
|
|
4537
|
-
return this._svgIcon;
|
|
4348
|
+
get selectButtonTabIndex() {
|
|
4349
|
+
return this.disabled ? undefined : this.tabindex;
|
|
4538
4350
|
}
|
|
4539
4351
|
/**
|
|
4540
4352
|
* @hidden
|
|
4541
4353
|
*/
|
|
4542
|
-
|
|
4543
|
-
|
|
4354
|
+
getIds() {
|
|
4355
|
+
const id = ++idx;
|
|
4356
|
+
const buttonId = `k-fileselect-button-${id}`;
|
|
4357
|
+
const fileListId = `k-fileselect-file-list-${id}`;
|
|
4358
|
+
return { buttonId, fileListId };
|
|
4544
4359
|
}
|
|
4545
4360
|
/**
|
|
4546
4361
|
* @hidden
|
|
4547
4362
|
*/
|
|
4548
|
-
|
|
4549
|
-
|
|
4550
|
-
|
|
4551
|
-
|
|
4552
|
-
if (!
|
|
4553
|
-
return
|
|
4363
|
+
writeValue(newValue) {
|
|
4364
|
+
super.writeValue(newValue, validateInitialFileSelectFile, 'addInitialFileSelectFiles');
|
|
4365
|
+
}
|
|
4366
|
+
subscribeBlur() {
|
|
4367
|
+
if (!isDocumentAvailable()) {
|
|
4368
|
+
return;
|
|
4554
4369
|
}
|
|
4370
|
+
this.ngZone.runOutsideAngular(() => {
|
|
4371
|
+
this.documentClick = fromEvent(document, 'click').pipe(filter((event) => {
|
|
4372
|
+
return !(this.wrapper !== event.target && this.wrapper.contains(event.target));
|
|
4373
|
+
}));
|
|
4374
|
+
this.blurSubscription = merge(this.documentClick, this.navigation.onTabOut).subscribe(() => {
|
|
4375
|
+
if (this.navigation.focused) {
|
|
4376
|
+
this.ngZone.run(() => {
|
|
4377
|
+
this.navigation.focused = false;
|
|
4378
|
+
this.onTouchedCallback();
|
|
4379
|
+
this.onBlur.emit();
|
|
4380
|
+
});
|
|
4381
|
+
}
|
|
4382
|
+
});
|
|
4383
|
+
});
|
|
4555
4384
|
}
|
|
4556
|
-
|
|
4557
|
-
|
|
4558
|
-
this.
|
|
4385
|
+
subscribeFocus() {
|
|
4386
|
+
this.wrapperFocusSubscription = this.navigation.onWrapperFocus.subscribe(() => {
|
|
4387
|
+
this.onFocus.emit();
|
|
4388
|
+
});
|
|
4389
|
+
this.selectButtonFocusSubscription = this.navigation.onSelectButtonFocus.subscribe(() => {
|
|
4390
|
+
this.fileSelectButton.nativeElement.focus();
|
|
4391
|
+
});
|
|
4392
|
+
}
|
|
4393
|
+
handleKeydown(event) {
|
|
4394
|
+
if (this.disabled) {
|
|
4395
|
+
return;
|
|
4396
|
+
}
|
|
4397
|
+
if (event.target === this.fileSelectButton.nativeElement && (event.keyCode === Keys.Enter || event.keyCode === Keys.Space)) {
|
|
4398
|
+
event.preventDefault();
|
|
4399
|
+
this.fileSelectInput.nativeElement.click();
|
|
4400
|
+
return;
|
|
4401
|
+
}
|
|
4402
|
+
if (hasClasses(event.target, UPLOAD_CLASSES) ||
|
|
4403
|
+
(!isFocusable(event.target) && !hasClasses(event.target, IGNORE_TARGET_CLASSES))) {
|
|
4404
|
+
this.navigation.process(event, 'fileselect');
|
|
4559
4405
|
}
|
|
4560
4406
|
}
|
|
4407
|
+
attachEventHandlers() {
|
|
4408
|
+
this.subs = this.uploadService.changeEvent.subscribe((files) => {
|
|
4409
|
+
let model = [];
|
|
4410
|
+
if (files !== null) {
|
|
4411
|
+
files.forEach((file) => {
|
|
4412
|
+
if (file.state === FileState.Initial) {
|
|
4413
|
+
model.push(file);
|
|
4414
|
+
}
|
|
4415
|
+
if (file.state === FileState.Selected && file.rawFile && !file.validationErrors) {
|
|
4416
|
+
model.push(file.rawFile);
|
|
4417
|
+
}
|
|
4418
|
+
});
|
|
4419
|
+
}
|
|
4420
|
+
if (model.length === 0) {
|
|
4421
|
+
model = null;
|
|
4422
|
+
}
|
|
4423
|
+
this.onChangeCallback(model);
|
|
4424
|
+
this.valueChange.emit(model);
|
|
4425
|
+
});
|
|
4426
|
+
this.subs.add(this.uploadService.removeEvent.subscribe((args) => {
|
|
4427
|
+
this.remove.emit(args);
|
|
4428
|
+
}));
|
|
4429
|
+
this.subs.add(this.uploadService.selectEvent.subscribe((args) => {
|
|
4430
|
+
this.select.emit(args);
|
|
4431
|
+
}));
|
|
4432
|
+
}
|
|
4433
|
+
setDefaultSettings() {
|
|
4434
|
+
this.uploadService.async.autoUpload = false;
|
|
4435
|
+
this.uploadService.component = 'FileSelect';
|
|
4436
|
+
}
|
|
4561
4437
|
}
|
|
4562
|
-
|
|
4563
|
-
|
|
4438
|
+
FileSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", 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 });
|
|
4439
|
+
FileSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: FileSelectComponent, isStandalone: true, selector: "kendo-fileselect", inputs: { name: "name" }, outputs: { valueChange: "valueChange" }, host: { properties: { "attr.dir": "this.dir" } }, providers: [
|
|
4564
4440
|
LocalizationService,
|
|
4441
|
+
NavigationService,
|
|
4442
|
+
UploadService,
|
|
4443
|
+
DropZoneService,
|
|
4444
|
+
FILESELECT_VALUE_ACCESSOR,
|
|
4565
4445
|
{
|
|
4566
4446
|
provide: L10N_PREFIX,
|
|
4567
|
-
useValue: 'kendo.
|
|
4447
|
+
useValue: 'kendo.fileselect'
|
|
4448
|
+
},
|
|
4449
|
+
{
|
|
4450
|
+
provide: KendoInput,
|
|
4451
|
+
useExisting: forwardRef(() => FileSelectComponent)
|
|
4568
4452
|
}
|
|
4569
|
-
], exportAs: ["
|
|
4570
|
-
<ng-container
|
|
4571
|
-
i18n-
|
|
4572
|
-
|
|
4453
|
+
], viewQueries: [{ propertyName: "fileSelectInput", first: true, predicate: ["fileSelectInput"], descendants: true, static: true }], exportAs: ["kendoFileSelect"], usesInheritance: true, ngImport: i0, template: `
|
|
4454
|
+
<ng-container kendoFileSelectLocalizedMessages
|
|
4455
|
+
i18n-dropFilesHere="kendo.fileselect.dropFilesHere|The drop zone hint"
|
|
4456
|
+
dropFilesHere="Drop files here to select"
|
|
4457
|
+
|
|
4458
|
+
i18n-invalidFileExtension="kendo.fileselect.invalidFileExtension|The text for the invalid allowed extensions restriction message"
|
|
4459
|
+
invalidFileExtension="File type not allowed."
|
|
4460
|
+
|
|
4461
|
+
i18n-invalidMaxFileSize="kendo.fileselect.invalidMaxFileSize|The text for the invalid max file size restriction message"
|
|
4462
|
+
invalidMaxFileSize="File size too large."
|
|
4463
|
+
|
|
4464
|
+
i18n-invalidMinFileSize="kendo.fileselect.invalidMinFileSize|The text for the invalid min file size restriction message"
|
|
4465
|
+
invalidMinFileSize="File size too small."
|
|
4466
|
+
|
|
4467
|
+
i18n-remove="kendo.fileselect.remove|The text for the Remove button"
|
|
4468
|
+
remove="Remove"
|
|
4469
|
+
|
|
4470
|
+
i18n-select="kendo.fileselect.select|The text for the Select button"
|
|
4471
|
+
select="Select files..."
|
|
4472
|
+
>
|
|
4573
4473
|
</ng-container>
|
|
4574
|
-
<div
|
|
4575
|
-
|
|
4576
|
-
|
|
4577
|
-
|
|
4578
|
-
|
|
4579
|
-
|
|
4580
|
-
|
|
4581
|
-
|
|
4582
|
-
|
|
4583
|
-
|
|
4584
|
-
|
|
4585
|
-
|
|
4474
|
+
<div kendoFileSelectInternalDropZone
|
|
4475
|
+
[restrictions]="restrictions"
|
|
4476
|
+
[multiple]="multiple"
|
|
4477
|
+
[disabled]="disabled">
|
|
4478
|
+
<div class="k-upload-button-wrap">
|
|
4479
|
+
<button
|
|
4480
|
+
kendoButton
|
|
4481
|
+
#fileSelectButton
|
|
4482
|
+
class="k-upload-button"
|
|
4483
|
+
type="button"
|
|
4484
|
+
role="button"
|
|
4485
|
+
(click)="fileSelectInput.click()"
|
|
4486
|
+
(focus)="onFileSelectButtonFocus()"
|
|
4487
|
+
[id]="focusableId"
|
|
4488
|
+
[attr.aria-label]="textFor('select')"
|
|
4489
|
+
[attr.tabindex]="tabindex"
|
|
4490
|
+
[attr.aria-expanded]="hasFileList"
|
|
4491
|
+
[attr.aria-controls]="hasFileList ? fileListId : undefined"
|
|
4492
|
+
>
|
|
4493
|
+
{{textFor('select')}}
|
|
4494
|
+
</button>
|
|
4495
|
+
<input kendoFileSelect #fileSelectInput
|
|
4496
|
+
[dir]="direction"
|
|
4497
|
+
[accept]="accept"
|
|
4498
|
+
[restrictions]="restrictions"
|
|
4499
|
+
[multiple]="multiple"
|
|
4500
|
+
[disabled]="disabled"
|
|
4501
|
+
[required]="isControlRequired"
|
|
4502
|
+
/>
|
|
4586
4503
|
</div>
|
|
4587
|
-
|
|
4588
|
-
|
|
4504
|
+
<div class="k-dropzone-hint">{{textFor('dropFilesHere')}}</div>
|
|
4505
|
+
</div>
|
|
4506
|
+
<ul kendo-upload-file-list
|
|
4507
|
+
class="k-upload-files k-reset"
|
|
4508
|
+
*ngIf="hasFileList"
|
|
4509
|
+
[disabled]="disabled"
|
|
4510
|
+
[fileList]="fileList.files"
|
|
4511
|
+
[fileTemplate]="fileTemplate"
|
|
4512
|
+
[fileInfoTemplate]="fileInfoTemplate"
|
|
4513
|
+
[id]="fileListId">
|
|
4514
|
+
</ul>
|
|
4515
|
+
`, 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], 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"] }, { kind: "directive", type: FileSelectDirective, selector: "[kendoFileSelect]", inputs: ["dir", "disabled", "multiple", "restrictions", "accept", "required"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: FileListComponent, selector: "[kendo-upload-file-list]", inputs: ["disabled", "fileList", "fileTemplate", "fileInfoTemplate"] }] });
|
|
4516
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FileSelectComponent, decorators: [{
|
|
4589
4517
|
type: Component,
|
|
4590
4518
|
args: [{
|
|
4591
|
-
exportAs: '
|
|
4519
|
+
exportAs: 'kendoFileSelect',
|
|
4592
4520
|
providers: [
|
|
4593
4521
|
LocalizationService,
|
|
4522
|
+
NavigationService,
|
|
4523
|
+
UploadService,
|
|
4524
|
+
DropZoneService,
|
|
4525
|
+
FILESELECT_VALUE_ACCESSOR,
|
|
4594
4526
|
{
|
|
4595
4527
|
provide: L10N_PREFIX,
|
|
4596
|
-
useValue: 'kendo.
|
|
4528
|
+
useValue: 'kendo.fileselect'
|
|
4529
|
+
},
|
|
4530
|
+
{
|
|
4531
|
+
provide: KendoInput,
|
|
4532
|
+
useExisting: forwardRef(() => FileSelectComponent)
|
|
4597
4533
|
}
|
|
4598
4534
|
],
|
|
4599
|
-
selector: 'kendo-
|
|
4535
|
+
selector: 'kendo-fileselect',
|
|
4600
4536
|
template: `
|
|
4601
|
-
<ng-container
|
|
4602
|
-
i18n-
|
|
4603
|
-
|
|
4537
|
+
<ng-container kendoFileSelectLocalizedMessages
|
|
4538
|
+
i18n-dropFilesHere="kendo.fileselect.dropFilesHere|The drop zone hint"
|
|
4539
|
+
dropFilesHere="Drop files here to select"
|
|
4540
|
+
|
|
4541
|
+
i18n-invalidFileExtension="kendo.fileselect.invalidFileExtension|The text for the invalid allowed extensions restriction message"
|
|
4542
|
+
invalidFileExtension="File type not allowed."
|
|
4543
|
+
|
|
4544
|
+
i18n-invalidMaxFileSize="kendo.fileselect.invalidMaxFileSize|The text for the invalid max file size restriction message"
|
|
4545
|
+
invalidMaxFileSize="File size too large."
|
|
4546
|
+
|
|
4547
|
+
i18n-invalidMinFileSize="kendo.fileselect.invalidMinFileSize|The text for the invalid min file size restriction message"
|
|
4548
|
+
invalidMinFileSize="File size too small."
|
|
4549
|
+
|
|
4550
|
+
i18n-remove="kendo.fileselect.remove|The text for the Remove button"
|
|
4551
|
+
remove="Remove"
|
|
4552
|
+
|
|
4553
|
+
i18n-select="kendo.fileselect.select|The text for the Select button"
|
|
4554
|
+
select="Select files..."
|
|
4555
|
+
>
|
|
4604
4556
|
</ng-container>
|
|
4605
|
-
<div
|
|
4606
|
-
|
|
4607
|
-
|
|
4608
|
-
|
|
4609
|
-
|
|
4610
|
-
|
|
4611
|
-
|
|
4612
|
-
|
|
4613
|
-
|
|
4614
|
-
|
|
4615
|
-
|
|
4616
|
-
|
|
4557
|
+
<div kendoFileSelectInternalDropZone
|
|
4558
|
+
[restrictions]="restrictions"
|
|
4559
|
+
[multiple]="multiple"
|
|
4560
|
+
[disabled]="disabled">
|
|
4561
|
+
<div class="k-upload-button-wrap">
|
|
4562
|
+
<button
|
|
4563
|
+
kendoButton
|
|
4564
|
+
#fileSelectButton
|
|
4565
|
+
class="k-upload-button"
|
|
4566
|
+
type="button"
|
|
4567
|
+
role="button"
|
|
4568
|
+
(click)="fileSelectInput.click()"
|
|
4569
|
+
(focus)="onFileSelectButtonFocus()"
|
|
4570
|
+
[id]="focusableId"
|
|
4571
|
+
[attr.aria-label]="textFor('select')"
|
|
4572
|
+
[attr.tabindex]="tabindex"
|
|
4573
|
+
[attr.aria-expanded]="hasFileList"
|
|
4574
|
+
[attr.aria-controls]="hasFileList ? fileListId : undefined"
|
|
4575
|
+
>
|
|
4576
|
+
{{textFor('select')}}
|
|
4577
|
+
</button>
|
|
4578
|
+
<input kendoFileSelect #fileSelectInput
|
|
4579
|
+
[dir]="direction"
|
|
4580
|
+
[accept]="accept"
|
|
4581
|
+
[restrictions]="restrictions"
|
|
4582
|
+
[multiple]="multiple"
|
|
4583
|
+
[disabled]="disabled"
|
|
4584
|
+
[required]="isControlRequired"
|
|
4585
|
+
/>
|
|
4586
|
+
</div>
|
|
4587
|
+
<div class="k-dropzone-hint">{{textFor('dropFilesHere')}}</div>
|
|
4617
4588
|
</div>
|
|
4618
|
-
|
|
4589
|
+
<ul kendo-upload-file-list
|
|
4590
|
+
class="k-upload-files k-reset"
|
|
4591
|
+
*ngIf="hasFileList"
|
|
4592
|
+
[disabled]="disabled"
|
|
4593
|
+
[fileList]="fileList.files"
|
|
4594
|
+
[fileTemplate]="fileTemplate"
|
|
4595
|
+
[fileInfoTemplate]="fileInfoTemplate"
|
|
4596
|
+
[id]="fileListId">
|
|
4597
|
+
</ul>
|
|
4598
|
+
`,
|
|
4599
|
+
standalone: true,
|
|
4600
|
+
imports: [LocalizedMessagesDirective, DropZoneInternalDirective, ButtonComponent, FileSelectDirective, NgIf, FileListComponent]
|
|
4619
4601
|
}]
|
|
4620
|
-
}], ctorParameters: function () { return [{ type: i0.
|
|
4621
|
-
type:
|
|
4622
|
-
args: ['
|
|
4623
|
-
}],
|
|
4602
|
+
}], 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: { fileSelectInput: [{
|
|
4603
|
+
type: ViewChild,
|
|
4604
|
+
args: ['fileSelectInput', { static: true }]
|
|
4605
|
+
}], dir: [{
|
|
4624
4606
|
type: HostBinding,
|
|
4625
4607
|
args: ['attr.dir']
|
|
4626
|
-
}],
|
|
4627
|
-
type: Input
|
|
4628
|
-
}], icon: [{
|
|
4629
|
-
type: Input
|
|
4630
|
-
}], iconClass: [{
|
|
4631
|
-
type: Input
|
|
4632
|
-
}], svgIcon: [{
|
|
4608
|
+
}], name: [{
|
|
4633
4609
|
type: Input
|
|
4610
|
+
}], valueChange: [{
|
|
4611
|
+
type: Output
|
|
4634
4612
|
}] } });
|
|
4635
4613
|
|
|
4636
4614
|
/**
|
|
4637
|
-
*
|
|
4615
|
+
* Custom component messages override default component messages ([more information and example]({% slug globalization_upload %})).
|
|
4616
|
+
*
|
|
4617
|
+
* @example
|
|
4618
|
+
* ```html-no-run
|
|
4619
|
+
* <kendo-fileselect>
|
|
4620
|
+
* <kendo-fileselect-messages
|
|
4621
|
+
* dropFilesHere="Drop your file here"
|
|
4622
|
+
* select="Upload file">
|
|
4623
|
+
* </kendo-fileselect-messages>
|
|
4624
|
+
* </kendo-fileselect>
|
|
4625
|
+
* ```
|
|
4626
|
+
*/
|
|
4627
|
+
class CustomMessagesComponent extends Messages {
|
|
4628
|
+
constructor(service) {
|
|
4629
|
+
super();
|
|
4630
|
+
this.service = service;
|
|
4631
|
+
}
|
|
4632
|
+
get override() {
|
|
4633
|
+
return true;
|
|
4634
|
+
}
|
|
4635
|
+
}
|
|
4636
|
+
CustomMessagesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CustomMessagesComponent, deps: [{ token: i1$1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4637
|
+
CustomMessagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CustomMessagesComponent, isStandalone: true, selector: "kendo-upload-messages, kendo-fileselect-messages, kendo-uploaddropzone-messages", providers: [
|
|
4638
|
+
{
|
|
4639
|
+
provide: Messages,
|
|
4640
|
+
useExisting: forwardRef(() => CustomMessagesComponent)
|
|
4641
|
+
}
|
|
4642
|
+
], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
|
|
4643
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CustomMessagesComponent, decorators: [{
|
|
4644
|
+
type: Component,
|
|
4645
|
+
args: [{
|
|
4646
|
+
providers: [
|
|
4647
|
+
{
|
|
4648
|
+
provide: Messages,
|
|
4649
|
+
useExisting: forwardRef(() => CustomMessagesComponent)
|
|
4650
|
+
}
|
|
4651
|
+
],
|
|
4652
|
+
selector: 'kendo-upload-messages, kendo-fileselect-messages, kendo-uploaddropzone-messages',
|
|
4653
|
+
template: ``,
|
|
4654
|
+
standalone: true
|
|
4655
|
+
}]
|
|
4656
|
+
}], ctorParameters: function () { return [{ type: i1$1.LocalizationService }]; } });
|
|
4657
|
+
|
|
4658
|
+
/**
|
|
4659
|
+
* Utility array that contains all `FileSelect` related components and directives
|
|
4638
4660
|
*/
|
|
4639
|
-
const
|
|
4640
|
-
|
|
4641
|
-
|
|
4642
|
-
|
|
4643
|
-
|
|
4644
|
-
|
|
4645
|
-
|
|
4646
|
-
FileSelectDirective,
|
|
4647
|
-
LocalizedMessagesDirective
|
|
4661
|
+
const KENDO_FILESELECT = [
|
|
4662
|
+
FileSelectComponent,
|
|
4663
|
+
FileTemplateDirective,
|
|
4664
|
+
FileInfoTemplateDirective,
|
|
4665
|
+
CustomMessagesComponent,
|
|
4666
|
+
UploadDropZoneDirective,
|
|
4667
|
+
UploadDropZoneComponent
|
|
4648
4668
|
];
|
|
4649
4669
|
/**
|
|
4650
|
-
*
|
|
4670
|
+
* Utility array that contains all `Upload` related components and directives
|
|
4651
4671
|
*/
|
|
4652
|
-
const
|
|
4672
|
+
const KENDO_UPLOAD = [
|
|
4673
|
+
UploadComponent,
|
|
4674
|
+
UploadActionButtonsComponent,
|
|
4675
|
+
UploadStatusTotalComponent,
|
|
4653
4676
|
FileTemplateDirective,
|
|
4654
4677
|
FileInfoTemplateDirective,
|
|
4655
4678
|
CustomMessagesComponent,
|
|
@@ -4657,106 +4680,66 @@ const PUBLIC_DIRECTIVES = [
|
|
|
4657
4680
|
UploadDropZoneComponent
|
|
4658
4681
|
];
|
|
4659
4682
|
/**
|
|
4660
|
-
*
|
|
4683
|
+
* Utility array that contains all `@progress/kendo-angular-upload` related components and directives
|
|
4661
4684
|
*/
|
|
4662
|
-
|
|
4663
|
-
|
|
4664
|
-
|
|
4665
|
-
SharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: SharedModule, declarations: [FileTemplateDirective,
|
|
4666
|
-
FileInfoTemplateDirective,
|
|
4667
|
-
CustomMessagesComponent,
|
|
4668
|
-
UploadDropZoneDirective,
|
|
4669
|
-
UploadDropZoneComponent, DropZoneInternalDirective,
|
|
4670
|
-
FileListComponent,
|
|
4671
|
-
FileListItemDirective,
|
|
4672
|
-
FileListItemActionButtonComponent,
|
|
4673
|
-
FileListMultipleItemsComponent,
|
|
4674
|
-
FileListSingleItemComponent,
|
|
4675
|
-
FileSelectDirective,
|
|
4676
|
-
LocalizedMessagesDirective], imports: [CommonModule, ButtonsModule, ProgressBarModule, IconsModule], exports: [FileTemplateDirective,
|
|
4677
|
-
FileInfoTemplateDirective,
|
|
4678
|
-
CustomMessagesComponent,
|
|
4679
|
-
UploadDropZoneDirective,
|
|
4680
|
-
UploadDropZoneComponent, DropZoneInternalDirective,
|
|
4681
|
-
FileListComponent,
|
|
4682
|
-
FileListItemDirective,
|
|
4683
|
-
FileListItemActionButtonComponent,
|
|
4684
|
-
FileListMultipleItemsComponent,
|
|
4685
|
-
FileListSingleItemComponent,
|
|
4686
|
-
FileSelectDirective,
|
|
4687
|
-
LocalizedMessagesDirective, CommonModule,
|
|
4688
|
-
ButtonsModule] });
|
|
4689
|
-
SharedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SharedModule, imports: [CommonModule, ButtonsModule, ProgressBarModule, IconsModule, CommonModule,
|
|
4690
|
-
ButtonsModule] });
|
|
4691
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SharedModule, decorators: [{
|
|
4692
|
-
type: NgModule,
|
|
4693
|
-
args: [{
|
|
4694
|
-
declarations: [
|
|
4695
|
-
PUBLIC_DIRECTIVES,
|
|
4696
|
-
SHARED_DECLARATIONS
|
|
4697
|
-
],
|
|
4698
|
-
exports: [
|
|
4699
|
-
PUBLIC_DIRECTIVES,
|
|
4700
|
-
SHARED_DECLARATIONS,
|
|
4701
|
-
CommonModule,
|
|
4702
|
-
ButtonsModule
|
|
4703
|
-
],
|
|
4704
|
-
imports: [CommonModule, ButtonsModule, ProgressBarModule, IconsModule]
|
|
4705
|
-
}]
|
|
4706
|
-
}] });
|
|
4707
|
-
|
|
4708
|
-
const FILESELECT_DECLARATIONS = [
|
|
4709
|
-
FileSelectComponent
|
|
4685
|
+
const KENDO_UPLOADS = [
|
|
4686
|
+
...KENDO_FILESELECT,
|
|
4687
|
+
...KENDO_UPLOAD
|
|
4710
4688
|
];
|
|
4689
|
+
|
|
4690
|
+
// IMPORTANT: NgModule export kept for backwards compatibility
|
|
4711
4691
|
/**
|
|
4712
4692
|
* Represents the [NgModule](https://angular.io/api/core/NgModule) definition for the FileSelect component.
|
|
4713
4693
|
*/
|
|
4714
4694
|
class FileSelectModule {
|
|
4715
4695
|
}
|
|
4716
4696
|
FileSelectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FileSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4717
|
-
FileSelectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: FileSelectModule,
|
|
4718
|
-
FileSelectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FileSelectModule,
|
|
4697
|
+
FileSelectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: FileSelectModule, imports: [FileSelectComponent, FileTemplateDirective, FileInfoTemplateDirective, CustomMessagesComponent, UploadDropZoneDirective, UploadDropZoneComponent], exports: [FileSelectComponent, FileTemplateDirective, FileInfoTemplateDirective, CustomMessagesComponent, UploadDropZoneDirective, UploadDropZoneComponent] });
|
|
4698
|
+
FileSelectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FileSelectModule, providers: [
|
|
4699
|
+
IconsService,
|
|
4700
|
+
PopupService,
|
|
4701
|
+
ResizeBatchService
|
|
4702
|
+
], imports: [FileSelectComponent, CustomMessagesComponent, UploadDropZoneComponent] });
|
|
4719
4703
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FileSelectModule, decorators: [{
|
|
4720
4704
|
type: NgModule,
|
|
4721
4705
|
args: [{
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4706
|
+
exports: [...KENDO_FILESELECT],
|
|
4707
|
+
imports: [...KENDO_FILESELECT],
|
|
4708
|
+
providers: [
|
|
4709
|
+
IconsService,
|
|
4710
|
+
PopupService,
|
|
4711
|
+
ResizeBatchService
|
|
4712
|
+
]
|
|
4728
4713
|
}]
|
|
4729
4714
|
}] });
|
|
4730
4715
|
|
|
4731
|
-
|
|
4732
|
-
UploadComponent,
|
|
4733
|
-
UploadActionButtonsComponent,
|
|
4734
|
-
UploadStatusTotalComponent
|
|
4735
|
-
];
|
|
4716
|
+
// IMPORTANT: NgModule export kept for backwards compatibility
|
|
4736
4717
|
/**
|
|
4737
4718
|
* Represents the [NgModule](https://angular.io/api/core/NgModule) definition for the Upload component.
|
|
4738
4719
|
*/
|
|
4739
4720
|
class UploadModule {
|
|
4740
4721
|
}
|
|
4741
4722
|
UploadModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UploadModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4742
|
-
UploadModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: UploadModule,
|
|
4743
|
-
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
4723
|
+
UploadModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: UploadModule, imports: [UploadComponent, UploadActionButtonsComponent, UploadStatusTotalComponent, FileTemplateDirective, FileInfoTemplateDirective, CustomMessagesComponent, UploadDropZoneDirective, UploadDropZoneComponent], exports: [UploadComponent, UploadActionButtonsComponent, UploadStatusTotalComponent, FileTemplateDirective, FileInfoTemplateDirective, CustomMessagesComponent, UploadDropZoneDirective, UploadDropZoneComponent] });
|
|
4724
|
+
UploadModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UploadModule, providers: [
|
|
4725
|
+
IconsService,
|
|
4726
|
+
PopupService,
|
|
4727
|
+
ResizeBatchService
|
|
4728
|
+
], imports: [UploadComponent, UploadActionButtonsComponent, UploadStatusTotalComponent, CustomMessagesComponent, UploadDropZoneComponent] });
|
|
4748
4729
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UploadModule, decorators: [{
|
|
4749
4730
|
type: NgModule,
|
|
4750
4731
|
args: [{
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4732
|
+
exports: [...KENDO_UPLOAD],
|
|
4733
|
+
imports: [...KENDO_UPLOAD],
|
|
4734
|
+
providers: [
|
|
4735
|
+
IconsService,
|
|
4736
|
+
PopupService,
|
|
4737
|
+
ResizeBatchService
|
|
4738
|
+
]
|
|
4757
4739
|
}]
|
|
4758
4740
|
}] });
|
|
4759
4741
|
|
|
4742
|
+
// IMPORTANT: NgModule export kept for backwards compatibility
|
|
4760
4743
|
/**
|
|
4761
4744
|
* Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
|
|
4762
4745
|
* definition for the Uploads components.
|
|
@@ -4785,16 +4768,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
4785
4768
|
class UploadsModule {
|
|
4786
4769
|
}
|
|
4787
4770
|
UploadsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UploadsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4788
|
-
UploadsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: UploadsModule, exports: [
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4771
|
+
UploadsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: UploadsModule, imports: [FileSelectComponent, FileTemplateDirective, FileInfoTemplateDirective, CustomMessagesComponent, UploadDropZoneDirective, UploadDropZoneComponent, UploadComponent, UploadActionButtonsComponent, UploadStatusTotalComponent, FileTemplateDirective, FileInfoTemplateDirective, CustomMessagesComponent, UploadDropZoneDirective, UploadDropZoneComponent], exports: [FileSelectComponent, FileTemplateDirective, FileInfoTemplateDirective, CustomMessagesComponent, UploadDropZoneDirective, UploadDropZoneComponent, UploadComponent, UploadActionButtonsComponent, UploadStatusTotalComponent, FileTemplateDirective, FileInfoTemplateDirective, CustomMessagesComponent, UploadDropZoneDirective, UploadDropZoneComponent] });
|
|
4772
|
+
UploadsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UploadsModule, providers: [
|
|
4773
|
+
IconsService,
|
|
4774
|
+
PopupService,
|
|
4775
|
+
ResizeBatchService
|
|
4776
|
+
], imports: [FileSelectComponent, CustomMessagesComponent, UploadDropZoneComponent, UploadComponent, UploadActionButtonsComponent, UploadStatusTotalComponent, CustomMessagesComponent, UploadDropZoneComponent] });
|
|
4792
4777
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UploadsModule, decorators: [{
|
|
4793
4778
|
type: NgModule,
|
|
4794
4779
|
args: [{
|
|
4795
|
-
exports: [
|
|
4796
|
-
|
|
4797
|
-
|
|
4780
|
+
exports: [...KENDO_UPLOADS],
|
|
4781
|
+
imports: [...KENDO_UPLOADS],
|
|
4782
|
+
providers: [
|
|
4783
|
+
IconsService,
|
|
4784
|
+
PopupService,
|
|
4785
|
+
ResizeBatchService
|
|
4798
4786
|
]
|
|
4799
4787
|
}]
|
|
4800
4788
|
}] });
|
|
@@ -4803,5 +4791,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
4803
4791
|
* Generated bundle index. Do not edit.
|
|
4804
4792
|
*/
|
|
4805
4793
|
|
|
4806
|
-
export { CancelEvent, ClearEvent, CustomMessagesComponent, DropZoneService, ErrorEvent, FileInfoTemplateDirective, FileListComponent, FileListItemActionButtonComponent, FileListItemBase, FileListMultipleItemsComponent, FileListSingleItemComponent, FileMap, FileSelectComponent, FileSelectDirective, FileSelectModule, FileState, FileTemplateDirective, NavigationService, PauseEvent, RemoveEvent, ResumeEvent, SelectEvent, SuccessEvent, UPLOAD_VALUE_ACCESSOR, UploadActionButtonsComponent, UploadComponent, UploadDropZoneComponent, UploadDropZoneDirective, UploadEvent, UploadModule, UploadProgressEvent, UploadService, UploadStatusTotalComponent, UploadsModule, validateFiles };
|
|
4794
|
+
export { CancelEvent, ClearEvent, CustomMessagesComponent, DropZoneService, ErrorEvent, FileInfoTemplateDirective, FileListComponent, FileListItemActionButtonComponent, FileListItemBase, FileListMultipleItemsComponent, FileListSingleItemComponent, FileMap, FileSelectComponent, FileSelectDirective, FileSelectModule, FileState, FileTemplateDirective, KENDO_FILESELECT, KENDO_UPLOAD, KENDO_UPLOADS, NavigationService, PauseEvent, RemoveEvent, ResumeEvent, SelectEvent, SuccessEvent, UPLOAD_VALUE_ACCESSOR, UploadActionButtonsComponent, UploadComponent, UploadDropZoneComponent, UploadDropZoneDirective, UploadEvent, UploadModule, UploadProgressEvent, UploadService, UploadStatusTotalComponent, UploadsModule, validateFiles };
|
|
4807
4795
|
|