@progress/kendo-angular-upload 11.1.0-develop.3 → 11.1.0-develop.5
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/esm2020/fileselect.component.mjs +11 -13
- package/esm2020/index.mjs +0 -1
- package/esm2020/package-metadata.mjs +2 -2
- package/esm2020/rendering/file-list-multiple-items.component.mjs +39 -39
- package/esm2020/rendering/file-list-single-item.component.mjs +25 -31
- package/esm2020/rendering/file-list.component.mjs +51 -57
- package/esm2020/shared.module.mjs +3 -7
- package/esm2020/upload.component.mjs +109 -117
- package/fesm2015/progress-kendo-angular-upload.mjs +243 -291
- package/fesm2020/progress-kendo-angular-upload.mjs +243 -291
- package/fileselect.component.d.ts +3 -9
- package/index.d.ts +0 -1
- package/package.json +7 -7
- package/schematics/ngAdd/index.js +3 -3
- package/shared.module.d.ts +5 -6
- package/upload.component.d.ts +3 -13
- package/esm2020/templates/template-context.directive.mjs +0 -34
- package/templates/template-context.directive.d.ts +0 -17
|
@@ -330,7 +330,9 @@ export class UploadComponent {
|
|
|
330
330
|
}
|
|
331
331
|
ngOnInit() {
|
|
332
332
|
this.verifySettings();
|
|
333
|
-
this.
|
|
333
|
+
const { buttonId, inputId } = this.getIds();
|
|
334
|
+
this.focusableId = buttonId;
|
|
335
|
+
this.inputElementId = inputId;
|
|
334
336
|
this.uploadService.setChunkSettings(this.chunkable);
|
|
335
337
|
if (this.zoneId) {
|
|
336
338
|
this.dropZoneService.addComponent(this, this.zoneId);
|
|
@@ -347,14 +349,6 @@ export class UploadComponent {
|
|
|
347
349
|
this.subs.add(this.renderer.listen(this.wrapper, 'keydown', event => this.handleKeydown(event)));
|
|
348
350
|
});
|
|
349
351
|
}
|
|
350
|
-
ngAfterViewInit() {
|
|
351
|
-
const { buttonId, inputId } = this.getIds();
|
|
352
|
-
const button = this.fileSelectButton.nativeElement;
|
|
353
|
-
const input = this.fileSelectInput.nativeElement;
|
|
354
|
-
this.renderer.setAttribute(button, 'id', buttonId);
|
|
355
|
-
this.renderer.setAttribute(button, 'aria-controls', inputId);
|
|
356
|
-
this.renderer.setAttribute(input, 'id', inputId);
|
|
357
|
-
}
|
|
358
352
|
ngOnChanges(changes) {
|
|
359
353
|
if (isChanged("chunkable", changes)) {
|
|
360
354
|
const newChunkable = changes.chunkable.currentValue;
|
|
@@ -423,12 +417,6 @@ export class UploadComponent {
|
|
|
423
417
|
setDisabledState(isDisabled) {
|
|
424
418
|
this.disabled = isDisabled;
|
|
425
419
|
}
|
|
426
|
-
/**
|
|
427
|
-
* @hidden
|
|
428
|
-
*/
|
|
429
|
-
get selectButtonTabIndex() {
|
|
430
|
-
return this.disabled ? undefined : this.tabIndex;
|
|
431
|
-
}
|
|
432
420
|
/**
|
|
433
421
|
* @hidden
|
|
434
422
|
*/
|
|
@@ -698,71 +686,71 @@ UploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
|
|
|
698
686
|
}
|
|
699
687
|
], queries: [{ propertyName: "fileTemplate", first: true, predicate: FileTemplateDirective, descendants: true }, { propertyName: "fileInfoTemplate", first: true, predicate: FileInfoTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "fileSelectInput", first: true, predicate: ["fileSelectInput"], descendants: true, static: true }, { propertyName: "fileSelectButton", first: true, predicate: ["fileSelectButton"], descendants: true, read: ElementRef, static: true }], exportAs: ["kendoUpload"], usesOnChanges: true, ngImport: i0, template: `
|
|
700
688
|
<ng-container kendoUploadLocalizedMessages
|
|
701
|
-
|
|
702
|
-
|
|
689
|
+
i18n-cancel="kendo.upload.cancel|The text for the Cancel button"
|
|
690
|
+
cancel="Cancel"
|
|
703
691
|
|
|
704
|
-
|
|
705
|
-
|
|
692
|
+
i18n-clearSelectedFiles="kendo.upload.clearSelectedFiles|The text for the Clear button"
|
|
693
|
+
clearSelectedFiles="Clear"
|
|
706
694
|
|
|
707
|
-
|
|
708
|
-
|
|
695
|
+
i18n-dropFilesHere="kendo.upload.dropFilesHere|The drop zone hint"
|
|
696
|
+
dropFilesHere="Drop files here to upload"
|
|
709
697
|
|
|
710
|
-
|
|
711
|
-
|
|
698
|
+
i18n-filesBatchStatus="kendo.upload.filesBatchStatus|The status message for a batch of files"
|
|
699
|
+
filesBatchStatus="files"
|
|
712
700
|
|
|
713
|
-
|
|
714
|
-
|
|
701
|
+
i18n-filesBatchStatusFailed="kendo.upload.filesBatchStatusFailed|The status message for a batch of files after failed upload"
|
|
702
|
+
filesBatchStatusFailed="files failed to upload."
|
|
715
703
|
|
|
716
|
-
|
|
717
|
-
|
|
704
|
+
i18n-filesBatchStatusUploaded="kendo.upload.filesBatchStatusUploaded|The status message for a batch of files after successful upload"
|
|
705
|
+
filesBatchStatusUploaded="files successfully uploaded."
|
|
718
706
|
|
|
719
|
-
|
|
720
|
-
|
|
707
|
+
i18n-fileStatusFailed="kendo.upload.fileStatusFailed|The file status message after failed upload"
|
|
708
|
+
fileStatusFailed="File failed to upload."
|
|
721
709
|
|
|
722
|
-
|
|
723
|
-
|
|
710
|
+
i18n-fileStatusUploaded="kendo.upload.fileStatusUploaded|The file status message after successful upload"
|
|
711
|
+
fileStatusUploaded="File successfully uploaded."
|
|
724
712
|
|
|
725
|
-
|
|
726
|
-
|
|
713
|
+
i18n-headerStatusPaused="kendo.upload.headerStatusPaused|The header status message when the file upload is paused"
|
|
714
|
+
headerStatusPaused="Paused"
|
|
727
715
|
|
|
728
|
-
|
|
729
|
-
|
|
716
|
+
i18n-headerStatusUploaded="kendo.upload.headerStatusUploaded|The header status message after file upload completion"
|
|
717
|
+
headerStatusUploaded="Done"
|
|
730
718
|
|
|
731
|
-
|
|
732
|
-
|
|
719
|
+
i18n-headerStatusUploading="kendo.upload.headerStatusUploading|The header status message during file upload"
|
|
720
|
+
headerStatusUploading="Uploading..."
|
|
733
721
|
|
|
734
|
-
|
|
735
|
-
|
|
722
|
+
i18n-invalidFileExtension="kendo.upload.invalidFileExtension|The text for the invalid allowed extensions restriction message"
|
|
723
|
+
invalidFileExtension="File type not allowed."
|
|
736
724
|
|
|
737
|
-
|
|
738
|
-
|
|
725
|
+
i18n-invalidMaxFileSize="kendo.upload.invalidMaxFileSize|The text for the invalid max file size restriction message"
|
|
726
|
+
invalidMaxFileSize="File size too large."
|
|
739
727
|
|
|
740
|
-
|
|
741
|
-
|
|
728
|
+
i18n-invalidMinFileSize="kendo.upload.invalidMinFileSize|The text for the invalid min file size restriction message"
|
|
729
|
+
invalidMinFileSize="File size too small."
|
|
742
730
|
|
|
743
|
-
|
|
744
|
-
|
|
731
|
+
i18n-pause="kendo.upload.pause|The text for the Pause button"
|
|
732
|
+
pause="Pause"
|
|
745
733
|
|
|
746
|
-
|
|
747
|
-
|
|
734
|
+
i18n-remove="kendo.upload.remove|The text for the Remove button"
|
|
735
|
+
remove="Remove"
|
|
748
736
|
|
|
749
|
-
|
|
750
|
-
|
|
737
|
+
i18n-resume="kendo.upload.resume|The text for the Resume button"
|
|
738
|
+
resume="Resume"
|
|
751
739
|
|
|
752
|
-
|
|
753
|
-
|
|
740
|
+
i18n-retry="kendo.upload.retry|The text for the Retry button"
|
|
741
|
+
retry="Retry"
|
|
754
742
|
|
|
755
|
-
|
|
756
|
-
|
|
743
|
+
i18n-select="kendo.upload.select|The text for the Select button"
|
|
744
|
+
select="Select files..."
|
|
757
745
|
|
|
758
|
-
|
|
759
|
-
|
|
746
|
+
i18n-uploadSelectedFiles="kendo.upload.uploadSelectedFiles|The text for the Upload files button"
|
|
747
|
+
uploadSelectedFiles="Upload"
|
|
760
748
|
>
|
|
761
749
|
</ng-container>
|
|
762
750
|
<div kendoUploadInternalDropZone
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
751
|
+
[restrictions]="restrictions"
|
|
752
|
+
[multiple]="multiple"
|
|
753
|
+
[disabled]="disabled"
|
|
766
754
|
>
|
|
767
755
|
<div class="k-upload-button-wrap">
|
|
768
756
|
<button
|
|
@@ -772,7 +760,8 @@ UploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
|
|
|
772
760
|
role="button"
|
|
773
761
|
[id]="focusableId"
|
|
774
762
|
[attr.aria-label]="textFor('select')"
|
|
775
|
-
[attr.tabindex]="
|
|
763
|
+
[attr.tabindex]="tabindex"
|
|
764
|
+
[attr.aria-controls]="inputElementId"
|
|
776
765
|
(focus)="onFileSelectButtonFocus($event)"
|
|
777
766
|
(blur)="onFileSelectButtonBlur($event)"
|
|
778
767
|
>
|
|
@@ -781,6 +770,7 @@ UploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
|
|
|
781
770
|
<input
|
|
782
771
|
#fileSelectInput
|
|
783
772
|
kendoFileSelect
|
|
773
|
+
[id]="inputElementId"
|
|
784
774
|
[attr.accept]="accept ? accept : null"
|
|
785
775
|
[attr.aria-hidden]="true"
|
|
786
776
|
[dir]="direction"
|
|
@@ -790,8 +780,8 @@ UploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
|
|
|
790
780
|
/>
|
|
791
781
|
</div>
|
|
792
782
|
<kendo-upload-status-total *ngIf="showTotalStatus"
|
|
793
|
-
|
|
794
|
-
|
|
783
|
+
class="k-upload-status"
|
|
784
|
+
[fileList]="fileList">
|
|
795
785
|
</kendo-upload-status-total>
|
|
796
786
|
<div class="k-dropzone-hint">{{textFor('dropFilesHere')}}</div>
|
|
797
787
|
</div>
|
|
@@ -803,11 +793,11 @@ UploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
|
|
|
803
793
|
[fileInfoTemplate]="fileInfoTemplate">
|
|
804
794
|
</ul>
|
|
805
795
|
<kendo-upload-action-buttons
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
796
|
+
*ngIf="showActionButtons"
|
|
797
|
+
[disabled]="disabled"
|
|
798
|
+
[actionsLayout]="actionsLayout">
|
|
809
799
|
</kendo-upload-action-buttons>
|
|
810
|
-
|
|
800
|
+
`, isInline: true, components: [{ type: i5.Button, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: i6.UploadStatusTotalComponent, selector: "kendo-upload-status-total", inputs: ["fileList"] }, { type: i7.FileListComponent, selector: "[kendo-upload-file-list]", inputs: ["disabled", "fileList", "fileTemplate", "fileInfoTemplate"] }, { type: i8.UploadActionButtonsComponent, selector: "kendo-upload-action-buttons", inputs: ["disabled", "actionsLayout"] }], directives: [{ type: i9.LocalizedMessagesDirective, selector: "\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n " }, { type: i10.DropZoneInternalDirective, selector: "\n [kendoUploadInternalDropZone],\n [kendoFileSelectInternalDropZone]\n ", inputs: ["disabled", "multiple", "restrictions"] }, { type: i11.FileSelectDirective, selector: "[kendoFileSelect]", inputs: ["dir", "disabled", "multiple", "restrictions"] }, { type: i12.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
811
801
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: UploadComponent, decorators: [{
|
|
812
802
|
type: Component,
|
|
813
803
|
args: [{
|
|
@@ -830,71 +820,71 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
830
820
|
selector: 'kendo-upload',
|
|
831
821
|
template: `
|
|
832
822
|
<ng-container kendoUploadLocalizedMessages
|
|
833
|
-
|
|
834
|
-
|
|
823
|
+
i18n-cancel="kendo.upload.cancel|The text for the Cancel button"
|
|
824
|
+
cancel="Cancel"
|
|
835
825
|
|
|
836
|
-
|
|
837
|
-
|
|
826
|
+
i18n-clearSelectedFiles="kendo.upload.clearSelectedFiles|The text for the Clear button"
|
|
827
|
+
clearSelectedFiles="Clear"
|
|
838
828
|
|
|
839
|
-
|
|
840
|
-
|
|
829
|
+
i18n-dropFilesHere="kendo.upload.dropFilesHere|The drop zone hint"
|
|
830
|
+
dropFilesHere="Drop files here to upload"
|
|
841
831
|
|
|
842
|
-
|
|
843
|
-
|
|
832
|
+
i18n-filesBatchStatus="kendo.upload.filesBatchStatus|The status message for a batch of files"
|
|
833
|
+
filesBatchStatus="files"
|
|
844
834
|
|
|
845
|
-
|
|
846
|
-
|
|
835
|
+
i18n-filesBatchStatusFailed="kendo.upload.filesBatchStatusFailed|The status message for a batch of files after failed upload"
|
|
836
|
+
filesBatchStatusFailed="files failed to upload."
|
|
847
837
|
|
|
848
|
-
|
|
849
|
-
|
|
838
|
+
i18n-filesBatchStatusUploaded="kendo.upload.filesBatchStatusUploaded|The status message for a batch of files after successful upload"
|
|
839
|
+
filesBatchStatusUploaded="files successfully uploaded."
|
|
850
840
|
|
|
851
|
-
|
|
852
|
-
|
|
841
|
+
i18n-fileStatusFailed="kendo.upload.fileStatusFailed|The file status message after failed upload"
|
|
842
|
+
fileStatusFailed="File failed to upload."
|
|
853
843
|
|
|
854
|
-
|
|
855
|
-
|
|
844
|
+
i18n-fileStatusUploaded="kendo.upload.fileStatusUploaded|The file status message after successful upload"
|
|
845
|
+
fileStatusUploaded="File successfully uploaded."
|
|
856
846
|
|
|
857
|
-
|
|
858
|
-
|
|
847
|
+
i18n-headerStatusPaused="kendo.upload.headerStatusPaused|The header status message when the file upload is paused"
|
|
848
|
+
headerStatusPaused="Paused"
|
|
859
849
|
|
|
860
|
-
|
|
861
|
-
|
|
850
|
+
i18n-headerStatusUploaded="kendo.upload.headerStatusUploaded|The header status message after file upload completion"
|
|
851
|
+
headerStatusUploaded="Done"
|
|
862
852
|
|
|
863
|
-
|
|
864
|
-
|
|
853
|
+
i18n-headerStatusUploading="kendo.upload.headerStatusUploading|The header status message during file upload"
|
|
854
|
+
headerStatusUploading="Uploading..."
|
|
865
855
|
|
|
866
|
-
|
|
867
|
-
|
|
856
|
+
i18n-invalidFileExtension="kendo.upload.invalidFileExtension|The text for the invalid allowed extensions restriction message"
|
|
857
|
+
invalidFileExtension="File type not allowed."
|
|
868
858
|
|
|
869
|
-
|
|
870
|
-
|
|
859
|
+
i18n-invalidMaxFileSize="kendo.upload.invalidMaxFileSize|The text for the invalid max file size restriction message"
|
|
860
|
+
invalidMaxFileSize="File size too large."
|
|
871
861
|
|
|
872
|
-
|
|
873
|
-
|
|
862
|
+
i18n-invalidMinFileSize="kendo.upload.invalidMinFileSize|The text for the invalid min file size restriction message"
|
|
863
|
+
invalidMinFileSize="File size too small."
|
|
874
864
|
|
|
875
|
-
|
|
876
|
-
|
|
865
|
+
i18n-pause="kendo.upload.pause|The text for the Pause button"
|
|
866
|
+
pause="Pause"
|
|
877
867
|
|
|
878
|
-
|
|
879
|
-
|
|
868
|
+
i18n-remove="kendo.upload.remove|The text for the Remove button"
|
|
869
|
+
remove="Remove"
|
|
880
870
|
|
|
881
|
-
|
|
882
|
-
|
|
871
|
+
i18n-resume="kendo.upload.resume|The text for the Resume button"
|
|
872
|
+
resume="Resume"
|
|
883
873
|
|
|
884
|
-
|
|
885
|
-
|
|
874
|
+
i18n-retry="kendo.upload.retry|The text for the Retry button"
|
|
875
|
+
retry="Retry"
|
|
886
876
|
|
|
887
|
-
|
|
888
|
-
|
|
877
|
+
i18n-select="kendo.upload.select|The text for the Select button"
|
|
878
|
+
select="Select files..."
|
|
889
879
|
|
|
890
|
-
|
|
891
|
-
|
|
880
|
+
i18n-uploadSelectedFiles="kendo.upload.uploadSelectedFiles|The text for the Upload files button"
|
|
881
|
+
uploadSelectedFiles="Upload"
|
|
892
882
|
>
|
|
893
883
|
</ng-container>
|
|
894
884
|
<div kendoUploadInternalDropZone
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
885
|
+
[restrictions]="restrictions"
|
|
886
|
+
[multiple]="multiple"
|
|
887
|
+
[disabled]="disabled"
|
|
898
888
|
>
|
|
899
889
|
<div class="k-upload-button-wrap">
|
|
900
890
|
<button
|
|
@@ -904,7 +894,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
904
894
|
role="button"
|
|
905
895
|
[id]="focusableId"
|
|
906
896
|
[attr.aria-label]="textFor('select')"
|
|
907
|
-
[attr.tabindex]="
|
|
897
|
+
[attr.tabindex]="tabindex"
|
|
898
|
+
[attr.aria-controls]="inputElementId"
|
|
908
899
|
(focus)="onFileSelectButtonFocus($event)"
|
|
909
900
|
(blur)="onFileSelectButtonBlur($event)"
|
|
910
901
|
>
|
|
@@ -913,6 +904,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
913
904
|
<input
|
|
914
905
|
#fileSelectInput
|
|
915
906
|
kendoFileSelect
|
|
907
|
+
[id]="inputElementId"
|
|
916
908
|
[attr.accept]="accept ? accept : null"
|
|
917
909
|
[attr.aria-hidden]="true"
|
|
918
910
|
[dir]="direction"
|
|
@@ -922,8 +914,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
922
914
|
/>
|
|
923
915
|
</div>
|
|
924
916
|
<kendo-upload-status-total *ngIf="showTotalStatus"
|
|
925
|
-
|
|
926
|
-
|
|
917
|
+
class="k-upload-status"
|
|
918
|
+
[fileList]="fileList">
|
|
927
919
|
</kendo-upload-status-total>
|
|
928
920
|
<div class="k-dropzone-hint">{{textFor('dropFilesHere')}}</div>
|
|
929
921
|
</div>
|
|
@@ -935,11 +927,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
935
927
|
[fileInfoTemplate]="fileInfoTemplate">
|
|
936
928
|
</ul>
|
|
937
929
|
<kendo-upload-action-buttons
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
930
|
+
*ngIf="showActionButtons"
|
|
931
|
+
[disabled]="disabled"
|
|
932
|
+
[actionsLayout]="actionsLayout">
|
|
941
933
|
</kendo-upload-action-buttons>
|
|
942
|
-
|
|
934
|
+
`
|
|
943
935
|
}]
|
|
944
936
|
}], ctorParameters: function () { return [{ type: i1.UploadService }, { type: i2.LocalizationService }, { type: i3.NavigationService }, { type: i4.DropZoneService }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }]; }, propDecorators: { autoUpload: [{
|
|
945
937
|
type: Input
|
|
@@ -992,10 +984,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
992
984
|
type: Input
|
|
993
985
|
}], fileTemplate: [{
|
|
994
986
|
type: ContentChild,
|
|
995
|
-
args: [FileTemplateDirective
|
|
987
|
+
args: [FileTemplateDirective]
|
|
996
988
|
}], fileInfoTemplate: [{
|
|
997
989
|
type: ContentChild,
|
|
998
|
-
args: [FileInfoTemplateDirective
|
|
990
|
+
args: [FileInfoTemplateDirective]
|
|
999
991
|
}], fileSelectInput: [{
|
|
1000
992
|
type: ViewChild,
|
|
1001
993
|
args: ['fileSelectInput', { static: true }]
|