@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.
@@ -330,7 +330,9 @@ export class UploadComponent {
330
330
  }
331
331
  ngOnInit() {
332
332
  this.verifySettings();
333
- this.renderer.removeAttribute(this.wrapper, "tabindex");
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
- i18n-cancel="kendo.upload.cancel|The text for the Cancel button"
702
- cancel="Cancel"
689
+ i18n-cancel="kendo.upload.cancel|The text for the Cancel button"
690
+ cancel="Cancel"
703
691
 
704
- i18n-clearSelectedFiles="kendo.upload.clearSelectedFiles|The text for the Clear button"
705
- clearSelectedFiles="Clear"
692
+ i18n-clearSelectedFiles="kendo.upload.clearSelectedFiles|The text for the Clear button"
693
+ clearSelectedFiles="Clear"
706
694
 
707
- i18n-dropFilesHere="kendo.upload.dropFilesHere|The drop zone hint"
708
- dropFilesHere="Drop files here to upload"
695
+ i18n-dropFilesHere="kendo.upload.dropFilesHere|The drop zone hint"
696
+ dropFilesHere="Drop files here to upload"
709
697
 
710
- i18n-filesBatchStatus="kendo.upload.filesBatchStatus|The status message for a batch of files"
711
- filesBatchStatus="files"
698
+ i18n-filesBatchStatus="kendo.upload.filesBatchStatus|The status message for a batch of files"
699
+ filesBatchStatus="files"
712
700
 
713
- i18n-filesBatchStatusFailed="kendo.upload.filesBatchStatusFailed|The status message for a batch of files after failed upload"
714
- filesBatchStatusFailed="files failed to upload."
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
- i18n-filesBatchStatusUploaded="kendo.upload.filesBatchStatusUploaded|The status message for a batch of files after successful upload"
717
- filesBatchStatusUploaded="files successfully uploaded."
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
- i18n-fileStatusFailed="kendo.upload.fileStatusFailed|The file status message after failed upload"
720
- fileStatusFailed="File failed to upload."
707
+ i18n-fileStatusFailed="kendo.upload.fileStatusFailed|The file status message after failed upload"
708
+ fileStatusFailed="File failed to upload."
721
709
 
722
- i18n-fileStatusUploaded="kendo.upload.fileStatusUploaded|The file status message after successful upload"
723
- fileStatusUploaded="File successfully uploaded."
710
+ i18n-fileStatusUploaded="kendo.upload.fileStatusUploaded|The file status message after successful upload"
711
+ fileStatusUploaded="File successfully uploaded."
724
712
 
725
- i18n-headerStatusPaused="kendo.upload.headerStatusPaused|The header status message when the file upload is paused"
726
- headerStatusPaused="Paused"
713
+ i18n-headerStatusPaused="kendo.upload.headerStatusPaused|The header status message when the file upload is paused"
714
+ headerStatusPaused="Paused"
727
715
 
728
- i18n-headerStatusUploaded="kendo.upload.headerStatusUploaded|The header status message after file upload completion"
729
- headerStatusUploaded="Done"
716
+ i18n-headerStatusUploaded="kendo.upload.headerStatusUploaded|The header status message after file upload completion"
717
+ headerStatusUploaded="Done"
730
718
 
731
- i18n-headerStatusUploading="kendo.upload.headerStatusUploading|The header status message during file upload"
732
- headerStatusUploading="Uploading..."
719
+ i18n-headerStatusUploading="kendo.upload.headerStatusUploading|The header status message during file upload"
720
+ headerStatusUploading="Uploading..."
733
721
 
734
- i18n-invalidFileExtension="kendo.upload.invalidFileExtension|The text for the invalid allowed extensions restriction message"
735
- invalidFileExtension="File type not allowed."
722
+ i18n-invalidFileExtension="kendo.upload.invalidFileExtension|The text for the invalid allowed extensions restriction message"
723
+ invalidFileExtension="File type not allowed."
736
724
 
737
- i18n-invalidMaxFileSize="kendo.upload.invalidMaxFileSize|The text for the invalid max file size restriction message"
738
- invalidMaxFileSize="File size too large."
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
- i18n-invalidMinFileSize="kendo.upload.invalidMinFileSize|The text for the invalid min file size restriction message"
741
- invalidMinFileSize="File size too small."
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
- i18n-pause="kendo.upload.pause|The text for the Pause button"
744
- pause="Pause"
731
+ i18n-pause="kendo.upload.pause|The text for the Pause button"
732
+ pause="Pause"
745
733
 
746
- i18n-remove="kendo.upload.remove|The text for the Remove button"
747
- remove="Remove"
734
+ i18n-remove="kendo.upload.remove|The text for the Remove button"
735
+ remove="Remove"
748
736
 
749
- i18n-resume="kendo.upload.resume|The text for the Resume button"
750
- resume="Resume"
737
+ i18n-resume="kendo.upload.resume|The text for the Resume button"
738
+ resume="Resume"
751
739
 
752
- i18n-retry="kendo.upload.retry|The text for the Retry button"
753
- retry="Retry"
740
+ i18n-retry="kendo.upload.retry|The text for the Retry button"
741
+ retry="Retry"
754
742
 
755
- i18n-select="kendo.upload.select|The text for the Select button"
756
- select="Select files..."
743
+ i18n-select="kendo.upload.select|The text for the Select button"
744
+ select="Select files..."
757
745
 
758
- i18n-uploadSelectedFiles="kendo.upload.uploadSelectedFiles|The text for the Upload files button"
759
- uploadSelectedFiles="Upload"
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
- [restrictions]="restrictions"
764
- [multiple]="multiple"
765
- [disabled]="disabled"
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]="selectButtonTabIndex"
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
- class="k-upload-status"
794
- [fileList]="fileList">
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
- *ngIf="showActionButtons"
807
- [disabled]="disabled"
808
- [actionsLayout]="actionsLayout">
796
+ *ngIf="showActionButtons"
797
+ [disabled]="disabled"
798
+ [actionsLayout]="actionsLayout">
809
799
  </kendo-upload-action-buttons>
810
- `, 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"] }] });
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
- i18n-cancel="kendo.upload.cancel|The text for the Cancel button"
834
- cancel="Cancel"
823
+ i18n-cancel="kendo.upload.cancel|The text for the Cancel button"
824
+ cancel="Cancel"
835
825
 
836
- i18n-clearSelectedFiles="kendo.upload.clearSelectedFiles|The text for the Clear button"
837
- clearSelectedFiles="Clear"
826
+ i18n-clearSelectedFiles="kendo.upload.clearSelectedFiles|The text for the Clear button"
827
+ clearSelectedFiles="Clear"
838
828
 
839
- i18n-dropFilesHere="kendo.upload.dropFilesHere|The drop zone hint"
840
- dropFilesHere="Drop files here to upload"
829
+ i18n-dropFilesHere="kendo.upload.dropFilesHere|The drop zone hint"
830
+ dropFilesHere="Drop files here to upload"
841
831
 
842
- i18n-filesBatchStatus="kendo.upload.filesBatchStatus|The status message for a batch of files"
843
- filesBatchStatus="files"
832
+ i18n-filesBatchStatus="kendo.upload.filesBatchStatus|The status message for a batch of files"
833
+ filesBatchStatus="files"
844
834
 
845
- i18n-filesBatchStatusFailed="kendo.upload.filesBatchStatusFailed|The status message for a batch of files after failed upload"
846
- filesBatchStatusFailed="files failed to upload."
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
- i18n-filesBatchStatusUploaded="kendo.upload.filesBatchStatusUploaded|The status message for a batch of files after successful upload"
849
- filesBatchStatusUploaded="files successfully uploaded."
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
- i18n-fileStatusFailed="kendo.upload.fileStatusFailed|The file status message after failed upload"
852
- fileStatusFailed="File failed to upload."
841
+ i18n-fileStatusFailed="kendo.upload.fileStatusFailed|The file status message after failed upload"
842
+ fileStatusFailed="File failed to upload."
853
843
 
854
- i18n-fileStatusUploaded="kendo.upload.fileStatusUploaded|The file status message after successful upload"
855
- fileStatusUploaded="File successfully uploaded."
844
+ i18n-fileStatusUploaded="kendo.upload.fileStatusUploaded|The file status message after successful upload"
845
+ fileStatusUploaded="File successfully uploaded."
856
846
 
857
- i18n-headerStatusPaused="kendo.upload.headerStatusPaused|The header status message when the file upload is paused"
858
- headerStatusPaused="Paused"
847
+ i18n-headerStatusPaused="kendo.upload.headerStatusPaused|The header status message when the file upload is paused"
848
+ headerStatusPaused="Paused"
859
849
 
860
- i18n-headerStatusUploaded="kendo.upload.headerStatusUploaded|The header status message after file upload completion"
861
- headerStatusUploaded="Done"
850
+ i18n-headerStatusUploaded="kendo.upload.headerStatusUploaded|The header status message after file upload completion"
851
+ headerStatusUploaded="Done"
862
852
 
863
- i18n-headerStatusUploading="kendo.upload.headerStatusUploading|The header status message during file upload"
864
- headerStatusUploading="Uploading..."
853
+ i18n-headerStatusUploading="kendo.upload.headerStatusUploading|The header status message during file upload"
854
+ headerStatusUploading="Uploading..."
865
855
 
866
- i18n-invalidFileExtension="kendo.upload.invalidFileExtension|The text for the invalid allowed extensions restriction message"
867
- invalidFileExtension="File type not allowed."
856
+ i18n-invalidFileExtension="kendo.upload.invalidFileExtension|The text for the invalid allowed extensions restriction message"
857
+ invalidFileExtension="File type not allowed."
868
858
 
869
- i18n-invalidMaxFileSize="kendo.upload.invalidMaxFileSize|The text for the invalid max file size restriction message"
870
- invalidMaxFileSize="File size too large."
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
- i18n-invalidMinFileSize="kendo.upload.invalidMinFileSize|The text for the invalid min file size restriction message"
873
- invalidMinFileSize="File size too small."
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
- i18n-pause="kendo.upload.pause|The text for the Pause button"
876
- pause="Pause"
865
+ i18n-pause="kendo.upload.pause|The text for the Pause button"
866
+ pause="Pause"
877
867
 
878
- i18n-remove="kendo.upload.remove|The text for the Remove button"
879
- remove="Remove"
868
+ i18n-remove="kendo.upload.remove|The text for the Remove button"
869
+ remove="Remove"
880
870
 
881
- i18n-resume="kendo.upload.resume|The text for the Resume button"
882
- resume="Resume"
871
+ i18n-resume="kendo.upload.resume|The text for the Resume button"
872
+ resume="Resume"
883
873
 
884
- i18n-retry="kendo.upload.retry|The text for the Retry button"
885
- retry="Retry"
874
+ i18n-retry="kendo.upload.retry|The text for the Retry button"
875
+ retry="Retry"
886
876
 
887
- i18n-select="kendo.upload.select|The text for the Select button"
888
- select="Select files..."
877
+ i18n-select="kendo.upload.select|The text for the Select button"
878
+ select="Select files..."
889
879
 
890
- i18n-uploadSelectedFiles="kendo.upload.uploadSelectedFiles|The text for the Upload files button"
891
- uploadSelectedFiles="Upload"
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
- [restrictions]="restrictions"
896
- [multiple]="multiple"
897
- [disabled]="disabled"
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]="selectButtonTabIndex"
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
- class="k-upload-status"
926
- [fileList]="fileList">
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
- *ngIf="showActionButtons"
939
- [disabled]="disabled"
940
- [actionsLayout]="actionsLayout">
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, { static: false }]
987
+ args: [FileTemplateDirective]
996
988
  }], fileInfoTemplate: [{
997
989
  type: ContentChild,
998
- args: [FileInfoTemplateDirective, { static: false }]
990
+ args: [FileInfoTemplateDirective]
999
991
  }], fileSelectInput: [{
1000
992
  type: ViewChild,
1001
993
  args: ['fileSelectInput', { static: true }]