New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@progress/kendo-angular-upload

Package Overview
Dependencies
Maintainers
1
Versions
952
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@progress/kendo-angular-upload - npm Package Compare versions

Comparing version 0.15.0 to 0.15.1

2

dist/cdn/js/kendo-angular-upload.js
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@angular/core"),require("@angular/common"),require("@angular/forms"),require("@angular/http"),require("rxjs/Rx")):"function"==typeof define&&define.amd?define(["@angular/core","@angular/common","@angular/forms","@angular/http","rxjs/Rx"],t):"object"==typeof exports?exports.KendoAngularUpload=t(require("@angular/core"),require("@angular/common"),require("@angular/forms"),require("@angular/http"),require("rxjs/Rx")):e.KendoAngularUpload=t(e["@angular/core"],e["@angular/common"],e["@angular/forms"],e["@angular/http"],e["rxjs/Rx"])}(this,function(e,t,n,i,o){return function(e){function t(i){if(n[i])return n[i].exports;var o=n[i]={exports:{},id:i,loaded:!1};return e[i].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";var i=n(1);t.UploadModule=i.UploadModule;var o=n(5);t.UploadComponent=o.UploadComponent;var r=n(21);t.FileSelectDirective=r.FileSelectDirective;var s=n(16);t.FileListComponent=s.FileListComponent;var a=n(17);t.FileListSingleItemComponent=a.FileListSingleItemComponent;var l=n(20);t.FileListItemActionButtonComponent=l.FileListItemActionButtonComponent;var p=n(19);t.FileListMultipleItemsComponent=p.FileListMultipleItemsComponent;var c=n(12);t.FileTemplateDirective=c.FileTemplateDirective;var u=n(25);t.TemplateContextDirective=u.TemplateContextDirective;var d=n(24);t.UploadStatusTotalComponent=d.UploadStatusTotalComponent;var f=n(23);t.UploadActionButtonsComponent=f.UploadActionButtonsComponent;var h=n(8);t.FileState=h.FileState;var v=n(14);t.DropZoneDirective=v.DropZoneDirective;var y=n(28);t.CustomMessagesComponent=y.CustomMessagesComponent;var m=n(10);t.CancelEvent=m.CancelEvent,t.ClearEvent=m.ClearEvent,t.ErrorEvent=m.ErrorEvent,t.RemoveEvent=m.RemoveEvent,t.SelectEvent=m.SelectEvent,t.SuccessEvent=m.SuccessEvent,t.UploadEvent=m.UploadEvent},function(e,t,n){"use strict";var i=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},r=n(2),s=n(3),a=n(4),l=n(5),p=n(14),c=n(16),u=n(17),d=n(19),f=n(20),h=n(12),v=n(21),y=n(23),m=n(24),g=n(25),b=n(26),F=n(28),S=[F.CustomMessagesComponent,p.DropZoneDirective,c.FileListComponent,f.FileListItemActionButtonComponent,d.FileListMultipleItemsComponent,u.FileListSingleItemComponent,v.FileSelectDirective,h.FileTemplateDirective,b.LocalizedMessagesDirective,g.TemplateContextDirective,l.UploadComponent,y.UploadActionButtonsComponent,m.UploadStatusTotalComponent],E=function(){function e(){}return e=i([r.NgModule({declarations:[S],exports:[l.UploadComponent,h.FileTemplateDirective,F.CustomMessagesComponent],imports:[s.CommonModule,a.FormsModule]}),o("design:paramtypes",[])],e)}();t.UploadModule=E},function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.exports=n},function(e,t,n){"use strict";var i=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},r=this&&this.__param||function(e,t){return function(n,i){t(n,i,e)}},s=n(2),a=n(4),l=n(6),p=n(7),c=n(8),u=n(12),d=n(13),f=n(11);t.UPLOAD_VALUE_ACCESSOR={multi:!0,provide:a.NG_VALUE_ACCESSOR,useExisting:s.forwardRef(function(){return h})};var h=function(){function e(e,t,n){this.uploadService=e,this.localization=t,this.multiple=!0,this.disabled=!1,this.showFileList=!0,this.cancel=new s.EventEmitter,this.clear=new s.EventEmitter,this.complete=new s.EventEmitter,this.error=new s.EventEmitter,this.remove=new s.EventEmitter,this.select=new s.EventEmitter,this.success=new s.EventEmitter,this.upload=new s.EventEmitter,this.async={autoUpload:!0,batch:!1,removeField:"fileNames",removeHeaders:new l.Headers,removeMethod:l.RequestMethod.Post,removeUrl:"",saveField:"files",saveHeaders:new l.Headers,saveMethod:l.RequestMethod.Post,saveUrl:"",withCredentials:!0},this._restrictions={allowedExtensions:[],maxFileSize:0,minFileSize:0},this.fileSelectFocused=!1,this.onTouchedCallback=function(e){},this.onChangeCallback=function(e){},this.fileList=this.uploadService.files,this.direction=n,this.onCancel(),this.onChange(),this.onClear(),this.onComplete(),this.onError(),this.onRemove(),this.onSelect(),this.onSuccess(),this.onUpload()}return Object.defineProperty(e.prototype,"autoUpload",{get:function(){return this.async.autoUpload},set:function(e){this.async.autoUpload=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"batch",{get:function(){return this.async.batch},set:function(e){this.async.batch=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"withCredentials",{get:function(){return this.async.withCredentials},set:function(e){this.async.withCredentials=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"saveField",{get:function(){return this.async.saveField},set:function(e){this.async.saveField=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"saveHeaders",{get:function(){return this.async.saveHeaders},set:function(e){this.async.saveHeaders=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"saveMethod",{get:function(){return this.async.saveMethod},set:function(e){this.async.saveMethod=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"saveUrl",{get:function(){return this.async.saveUrl},set:function(e){this.async.saveUrl=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"removeField",{get:function(){return this.async.removeField},set:function(e){this.async.removeField=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"removeHeaders",{get:function(){return this.async.removeHeaders},set:function(e){this.async.removeHeaders=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"removeMethod",{get:function(){return this.async.removeMethod},set:function(e){this.async.removeMethod=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"removeUrl",{get:function(){return this.async.removeUrl},set:function(e){this.async.removeUrl=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"restrictions",{get:function(){return this._restrictions},set:function(e){var t=Object.assign({},this._restrictions,e);this._restrictions=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dir",{get:function(){return this.direction},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hostDefaultClasses",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hostDisabledClass",{get:function(){return this.disabled},enumerable:!0,configurable:!0}),e.prototype.ngOnDestroy=function(){this.fileList.clear(),this.cancelSubscription.unsubscribe(),this.changeSubscription.unsubscribe(),this.clearSubscription.unsubscribe(),this.completeSubscription.unsubscribe(),this.errorSubscription.unsubscribe(),this.removeSubscription.unsubscribe(),this.selectSubscription.unsubscribe(),this.successSubscription.unsubscribe(),this.uploadSubscription.unsubscribe()},e.prototype.writeValue=function(e){var t=!0;e instanceof Array&&(e.forEach(function(e){f.default.validateInitialFileInfo(e)||(t=!1)}),t&&this.uploadService.addInitialFiles(e))},e.prototype.onInputFocusChange=function(e){this.fileSelectFocused=e},e.prototype.registerOnChange=function(e){this.onChangeCallback=e},e.prototype.registerOnTouched=function(e){this.onTouchedCallback=e},e.prototype.setDisabledState=function(e){this.disabled=e},e.prototype.setSelectButtonClasses=function(){return{"k-button":!0,"k-state-focused":this.fileSelectFocused,"k-upload-button":!0}},e.prototype.showActionButtons=function(){return this.fileList.filesToUpload.length>0&&!this.async.autoUpload},e.prototype.showTotalStatus=function(){var e=[c.FileState.Uploaded,c.FileState.Uploading,c.FileState.Failed];return 0!==this.fileList.count&&!!this.fileList.hasFileWithState(e)},e.prototype.textFor=function(e){return this.localization.get(e)},e.prototype.removeFilesByUid=function(e){this.uploadService.removeFiles(e,this.async)},e.prototype.retryUploadByUid=function(e){this.uploadService.retryFiles(e,this.async)},e.prototype.cancelUploadByUid=function(e){this.uploadService.cancelFiles(e)},e.prototype.onCancel=function(){var e=this;this.cancelSubscription=this.uploadService.cancelEvent.subscribe(function(t){e.cancel.emit(t)})},e.prototype.onChange=function(){var e=this;this.changeSubscription=this.uploadService.changeEvent.subscribe(function(t){e.onChangeCallback(t)})},e.prototype.onClear=function(){var e=this;this.clearSubscription=this.uploadService.clearEvent.subscribe(function(t){e.clear.emit(t)})},e.prototype.onComplete=function(){var e=this;this.completeSubscription=this.uploadService.completeEvent.subscribe(function(){e.complete.emit()})},e.prototype.onError=function(){var e=this;this.errorSubscription=this.uploadService.errorEvent.subscribe(function(t){e.error.emit(t)})},e.prototype.onRemove=function(){var e=this;this.removeSubscription=this.uploadService.removeEvent.subscribe(function(t){e.remove.emit(t)})},e.prototype.onSelect=function(){var e=this;this.selectSubscription=this.uploadService.selectEvent.subscribe(function(t){e.select.emit(t)})},e.prototype.onSuccess=function(){var e=this;this.successSubscription=this.uploadService.successEvent.subscribe(function(t){e.success.emit(t)})},e.prototype.onUpload=function(){var e=this;this.uploadSubscription=this.uploadService.uploadEvent.subscribe(function(t){e.upload.emit(t)})},i([s.Input(),o("design:type",Boolean),o("design:paramtypes",[Boolean])],e.prototype,"autoUpload",null),i([s.Input(),o("design:type",Boolean),o("design:paramtypes",[Boolean])],e.prototype,"batch",null),i([s.Input(),o("design:type",Boolean),o("design:paramtypes",[Boolean])],e.prototype,"withCredentials",null),i([s.Input(),o("design:type",String),o("design:paramtypes",[String])],e.prototype,"saveField",null),i([s.Input(),o("design:type",l.Headers),o("design:paramtypes",[l.Headers])],e.prototype,"saveHeaders",null),i([s.Input(),o("design:type",Number),o("design:paramtypes",[Number])],e.prototype,"saveMethod",null),i([s.Input(),o("design:type",String),o("design:paramtypes",[String])],e.prototype,"saveUrl",null),i([s.Input(),o("design:type",String),o("design:paramtypes",[String])],e.prototype,"removeField",null),i([s.Input(),o("design:type",l.Headers),o("design:paramtypes",[l.Headers])],e.prototype,"removeHeaders",null),i([s.Input(),o("design:type",Number),o("design:paramtypes",[Number])],e.prototype,"removeMethod",null),i([s.Input(),o("design:type",String),o("design:paramtypes",[String])],e.prototype,"removeUrl",null),i([s.Input(),o("design:type",Boolean)],e.prototype,"multiple",void 0),i([s.Input(),o("design:type",Boolean)],e.prototype,"disabled",void 0),i([s.Input(),o("design:type",Boolean)],e.prototype,"showFileList",void 0),i([s.Input(),o("design:type",Object),o("design:paramtypes",[Object])],e.prototype,"restrictions",null),i([s.ContentChild(u.FileTemplateDirective),o("design:type",u.FileTemplateDirective)],e.prototype,"fileTemplate",void 0),i([s.Output(),o("design:type",s.EventEmitter)],e.prototype,"cancel",void 0),i([s.Output(),o("design:type",s.EventEmitter)],e.prototype,"clear",void 0),i([s.Output(),o("design:type",s.EventEmitter)],e.prototype,"complete",void 0),i([s.Output(),o("design:type",s.EventEmitter)],e.prototype,"error",void 0),i([s.Output(),o("design:type",s.EventEmitter)],e.prototype,"remove",void 0),i([s.Output(),o("design:type",s.EventEmitter)],e.prototype,"select",void 0),i([s.Output(),o("design:type",s.EventEmitter)],e.prototype,"success",void 0),i([s.Output(),o("design:type",s.EventEmitter)],e.prototype,"upload",void 0),i([s.HostBinding("attr.dir"),o("design:type",String)],e.prototype,"dir",null),i([s.HostBinding("class.k-widget"),s.HostBinding("class.k-upload"),s.HostBinding("class.k-header"),o("design:type",Boolean)],e.prototype,"hostDefaultClasses",null),i([s.HostBinding("class.k-state-disabled"),o("design:type",Boolean)],e.prototype,"hostDisabledClass",null),e=i([s.Component({exportAs:"kendoUpload",providers:[d.LocalizationService,p.UploadService,t.UPLOAD_VALUE_ACCESSOR],selector:"kendo-upload",template:'\n <ng-container kendoUploadLocalizedMessages\n i18n-cancel="kendo.upload.cancel|The text for the Cancel button"\n cancel="Cancel"\n\n i18n-clearSelectedFiles="kendo.upload.clearSelectedFiles|The text for the Clear button"\n clearSelectedFiles="Clear"\n\n i18n-dropFilesHere="kendo.upload.dropFilesHere|The drop zone hint"\n dropFilesHere="Drop files here to upload"\n\n i18n-headerStatusUploaded="kendo.upload.headerStatusUploaded|The header status message after file upload completion"\n headerStatusUploaded="Done"\n\n i18n-headerStatusUploading="kendo.upload.headerStatusUploading|The header status message during file upload"\n headerStatusUploading="Uploading..."\n\n i18n-invalidFileExtension="kendo.upload.invalidFileExtension|The text for the invalid allowed extensions restriction message"\n invalidFileExtension="File type not allowed."\n\n i18n-invalidFiles="kendo.upload.invalidFiles|The text for the invalid files message"\n invalidFiles="Invalid file(s). Please check file upload requirements."\n\n i18n-invalidMaxFileSize="kendo.upload.invalidMaxFileSize|The text for the invalid max file size restriction message"\n invalidMaxFileSize="File size too large."\n\n i18n-invalidMinFileSize="kendo.upload.invalidMinFileSize|The text for the invalid min file size restriction message"\n invalidMinFileSize="File size too small."\n\n i18n-remove="kendo.upload.remove|The text for the Remove button"\n remove="Remove"\n\n i18n-retry="kendo.upload.retry|The text for the Retry button"\n retry="Retry"\n\n i18n-select="kendo.upload.select|The text for the Select button"\n select="Select files..."\n\n i18n-uploadSelectedFiles="kendo.upload.uploadSelectedFiles|The text for the Upload files button"\n uploadSelectedFiles="Upload"\n >\n </ng-container>\n <div kendoUploadDropzone\n [async]="async"\n [restrictions]="restrictions"\n [multiple]="multiple"\n [disabled]="disabled">\n <div [ngClass]=\'setSelectButtonClasses()\' role="button" [attr.aria-label]="textFor(\'select\')">\n <input kendoFileSelect\n [async]="async"\n [dir]="direction"\n [restrictions]="restrictions"\n [multiple]="multiple"\n [disabled]="disabled"\n (focusChange)="onInputFocusChange($event)" />\n <span>{{textFor(\'select\')}}</span>\n </div>\n <em>{{textFor(\'dropFilesHere\')}}</em>\n <kendo-upload-status-total\n *ngIf="showTotalStatus()"\n [fileList]="fileList">\n </kendo-upload-status-total>\n </div>\n <ul kendo-upload-file-list\n class="k-upload-files k-reset"\n *ngIf="showFileList && fileList.count > 0"\n [async]="async"\n [disabled]="disabled"\n [fileList]="fileList.files"\n [fileTemplate]="fileTemplate">\n </ul>\n <kendo-upload-action-buttons\n *ngIf="showActionButtons()"\n [async]="async"\n [disabled]="disabled"\n [fileList]="fileList">\n </kendo-upload-action-buttons>\n '}),r(2,s.Optional()),r(2,s.Inject("kendo-direction")),o("design:paramtypes",[p.UploadService,d.LocalizationService,String])],e)}();t.UploadComponent=h},function(e,t){e.exports=i},function(e,t,n){"use strict";var i=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},r=n(2),s=n(8),a=n(9),l=n(6),p=n(10),c=n(11),u=function(){function e(e){this.http=e,this.cancelEvent=new r.EventEmitter,this.clearEvent=new r.EventEmitter,this.completeEvent=new r.EventEmitter,this.errorEvent=new r.EventEmitter,this.removeEvent=new r.EventEmitter,this.selectEvent=new r.EventEmitter,this.successEvent=new r.EventEmitter,this.uploadEvent=new r.EventEmitter,this.changeEvent=new r.EventEmitter,this.fileList=new a.FileMap}return Object.defineProperty(e.prototype,"files",{get:function(){return this.fileList},enumerable:!0,configurable:!0}),e.prototype.onChange=function(){var e=this.fileList.filesFlat.filter(function(e){return e.state===s.FileState.Initial||e.state===s.FileState.Uploaded});this.changeEvent.emit(e.length>0?e:null)},e.prototype.addFiles=function(e,t){var n=new p.SelectEvent(e);if(this.selectEvent.emit(n),!n.isDefaultPrevented()){for(var i=0,o=e;i<o.length;i++){var r=o[i];this.fileList.add(r)}t.autoUpload&&this.uploadFiles(t)}},e.prototype.addInitialFiles=function(e){var t=this;e.forEach(function(e){var n=c.default.getInitialFileInfo(e);t.fileList.add(n)})},e.prototype.removeFiles=function(e,t){var n=this.fileList.get(e),i=new p.RemoveEvent(n,new l.Headers(t.removeHeaders));this.removeEvent.emit(i),i.isDefaultPrevented()||(n[0].state===s.FileState.Uploaded||n[0].state===s.FileState.Initial?this.performRemove(n,t,i):this.fileList.remove(e))},e.prototype.cancelFiles=function(e){var t=this.fileList.get(e),n=new p.CancelEvent(t);this.cancelEvent.emit(n);for(var i=0,o=t;i<o.length;i++){var r=o[i];r.httpSubscription&&r.httpSubscription.unsubscribe()}this.fileList.remove(e)},e.prototype.clearFiles=function(){var e=new p.ClearEvent;if(this.clearEvent.emit(e),!e.isDefaultPrevented()){var t=this.fileList.hasFileWithState([s.FileState.Initial,s.FileState.Uploaded]);this.fileList.clear(),t&&this.onChange()}},e.prototype.uploadFiles=function(e){var t=this.fileList.filesToUpload;this._uploadFiles(t,e)},e.prototype.retryFiles=function(e,t){var n=[this.fileList.get(e)];this._uploadFiles(n,t)},e.prototype._uploadFiles=function(e,t){for(var n=function(e){var n=new p.UploadEvent(e,new l.Headers(t.saveHeaders));if(i.uploadEvent.emit(n),n.isDefaultPrevented())i.fileList.remove(e[0].uid);else{i.fileList.setFilesState(e,s.FileState.Uploading);var o=i.performUpload(e,t,n);e.forEach(function(e){e.httpSubscription=o})}},i=this,o=0,r=e;o<r.length;o++){var a=r[o];n(a)}},e.prototype.performRemove=function(e,t,n){var i=this,o=e.map(function(e){return e.name}),r=this.populateRemoveFormData(o,t.removeField,n.data),s=this.populateRequestOptions(t,r,n.headers,"remove"),a=new l.Request(s);this.http.request(a).subscribe(function(t){i.onSuccess(t,e,"remove")},function(t){i.onError(t,e,"remove")})},e.prototype.performUpload=function(e,t,n){var i=this,o=this.populateUploadFormData(e,t.saveField,n.data),r=this.populateRequestOptions(t,o,n.headers,"upload"),s=new l.Request(r),a=this.http.request(s).subscribe(function(t){i.onSuccess(t,e,"upload"),i.checkAllComplete()},function(t){i.onError(t,e,"upload"),i.checkAllComplete()});return a},e.prototype.onSuccess=function(e,t,n){var i=new p.SuccessEvent(t,n,e);this.successEvent.emit(i),"upload"===n?this.fileList.setFilesState(t,i.isDefaultPrevented()?s.FileState.Failed:s.FileState.Uploaded):i.isDefaultPrevented()||this.fileList.remove(t[0].uid),i.isDefaultPrevented()||this.onChange()},e.prototype.onError=function(e,t,n){var i=new p.ErrorEvent(t,n,e);this.errorEvent.emit(i),"upload"===n&&this.fileList.setFilesState(t,s.FileState.Failed)},e.prototype.checkAllComplete=function(){this.fileList.hasFileWithState([s.FileState.Selected,s.FileState.Uploading])||this.completeEvent.emit()},e.prototype.populateRequestOptions=function(e,t,n,i){var o=new l.RequestOptions({body:t,method:"upload"===i?e.saveMethod:e.removeMethod,url:"upload"===i?e.saveUrl:e.removeUrl,withCredentials:e.withCredentials});return n.keys().length>0&&(o.headers=n),o},e.prototype.populateUploadFormData=function(e,t,n){var i=new FormData;this.populateClientFormData(i,n);for(var o=0,r=e;o<r.length;o++){var s=r[o];i.append(t,s.rawFile)}return i},e.prototype.populateRemoveFormData=function(e,t,n){var i=new FormData;this.populateClientFormData(i,n);for(var o=0,r=e;o<r.length;o++){var s=r[o];i.append(t,s)}return i},e.prototype.populateClientFormData=function(e,t){for(var n in t)t.hasOwnProperty(n)&&e.append(n,t[n])},e=i([r.Injectable(),o("design:paramtypes",[l.Http])],e)}();t.UploadService=u},function(e,t){"use strict";!function(e){e[e.Failed=0]="Failed",e[e.Initial=1]="Initial",e[e.Selected=2]="Selected",e[e.Uploaded=3]="Uploaded",e[e.Uploading=4]="Uploading"}(t.FileState||(t.FileState={}));t.FileState},function(e,t,n){"use strict";var i=n(8),o=function(){function e(){this._files={}}return e.prototype.add=function(e){var t=e.uid;this.has(t)?e.validationErrors&&e.validationErrors.length>0?this._files[t].unshift(e):this._files[t].push(e):this._files[t]=[e]},e.prototype.remove=function(e){this.has(e)&&(this._files[e]=null,delete this._files[e])},e.prototype.clear=function(){var e=this._files;for(var t in e)if(e.hasOwnProperty(t)){for(var n=0,i=e[t];n<i.length;n++){var o=i[n];o.httpSubscription&&o.httpSubscription.unsubscribe()}e[t]=null,delete e[t]}},e.prototype.has=function(e){return e in this._files},e.prototype.get=function(e){return this._files[e]},e.prototype.setFilesState=function(e,t){for(var n=0,i=e;n<i.length;n++){var o=i[n];this.get(o.uid).forEach(function(e){e.state=t})}},Object.defineProperty(e.prototype,"count",{get:function(){return Object.getOwnPropertyNames(this._files).length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"files",{get:function(){var e=this._files,t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"filesFlat",{get:function(){var e=this._files,t=[];for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];i.forEach(function(e){t.push(e)})}return t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"filesToUpload",{get:function(){var e=this._files,t=[];for(var n in e)if(e.hasOwnProperty(n)){for(var o=e[n],r=!0,s=0,a=o;s<a.length;s++){var l=a[s];(l.state!==i.FileState.Selected||l.validationErrors&&l.validationErrors.length>0)&&(r=!1)}r&&t.push(o)}return t},enumerable:!0,configurable:!0}),e.prototype.hasFileWithState=function(e){var t=this._files;for(var n in t)if(t.hasOwnProperty(n))for(var i=t[n],o=0,r=i;o<r.length;o++){var s=r[o];if(e.indexOf(s.state)>=0)return!0}return!1},e}();t.FileMap=o},function(e,t){"use strict";var n=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=function(){function e(){this.prevented=!1}return e.prototype.preventDefault=function(){this.prevented=!0},e.prototype.isDefaultPrevented=function(){return this.prevented},e}();t.PreventableEvent=i;var o=function(){function e(e){this.files=e}return e}();t.CancelEvent=o;var r=function(e){function t(){e.call(this)}return n(t,e),t}(i);t.ClearEvent=r;var s=function(){function e(e,t,n){this.files=e,this.operation=t,this.response=n}return e}();t.ErrorEvent=s;var a=function(e){function t(t,n){e.call(this),this.files=t,this.headers=n}return n(t,e),t}(i);t.RemoveEvent=a;var l=function(e){function t(t){e.call(this),this.files=t}return n(t,e),t}(i);t.SelectEvent=l;var p=function(e){function t(t,n,i){e.call(this),this.files=t,this.operation=n,this.response=i}return n(t,e),t}(i);t.SuccessEvent=p;var c=function(e){function t(t,n){e.call(this),this.files=t,this.headers=n}return n(t,e),t}(i);t.UploadEvent=c},function(e,t,n){"use strict";var i=n(8),o=function(){var e,t,n="";for(e=0;e<32;e++)t=16*Math.random()|0,8!==e&&12!==e&&16!==e&&20!==e||(n+="-"),n+=(12===e?4:16===e?3&t|8:t).toString(16);return n},r=function(e){var t,n=0;if("number"!=typeof e[0].size)return"";for(t=0;t<e.length;t++)e[t].size&&(n+=e[t].size);return n/=1024,n<1024?n.toFixed(2)+" KB":(n/1024).toFixed(2)+" MB"},s=function(e){var t=e.lastIndexOf("\\");return t!==-1?e.substr(t+1):e},a=function(e){var t=/\.([^\.]+)$/,n=e.match(t);return n?n[0]:""},l=/&/g,p=/</g,c=/"/g,u=/'/g,d=/>/g,f=function(e){return(""+e).replace(l,"&amp;").replace(p,"&lt;").replace(d,"&gt;").replace(c,"&quot;").replace(u,"&#39;")},h=function(e){return!!(e instanceof Object&&e.hasOwnProperty("name"))},v=function(e){return{extension:e.extension||a(e.name),name:f(e.name),rawFile:null,size:e.size||0,state:i.FileState.Initial,uid:e.uid||o()}},y=function(e){var t=e.name,n=e.size;return{extension:a(t),name:f(t),rawFile:e,size:n,state:i.FileState.Selected}},m=function(e){var t,n=new Array;for(t=0;t<e.length;t++)n.push(y(e[t]));return n},g=function(e){return!!(e.validationErrors&&e.validationErrors.length>0)},b=function(e){for(var t=0,n=e;t<n.length;t++){var i=n[t];if(g(i))return!0}return!1},F=function(e){if(e.files)return m(e.files);var t=e.value.split("|").map(function(e,t){var n=e.trim();return{extension:a(n),name:s(n),rawFile:null,size:1e3*(t+1),state:i.FileState.Selected}});return t},S=function(e,t){var n=o();return e.map(function(e){return e.uid=t?o():n,e})},E=function(){return"undefined"!=typeof FormData},C=function(){return navigator.userAgent},O=function(){return"undefined"!=typeof document};Object.defineProperty(t,"__esModule",{value:!0}),t.default={fileHasValidationErrors:g,filesHaveValidationErrors:b,getAllFileInfo:m,getInitialFileInfo:v,validateInitialFileInfo:h,getTotalFilesSizeMessage:r,assignGuidToFiles:S,inputFiles:F,isDocumentAvailable:O,supportsFormData:E,userAgent:C}},function(e,t,n){"use strict";var i=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},r=n(2),s=function(){function e(e){this.templateRef=e}return e=i([r.Directive({selector:"[kendoUploadFileTemplate]"}),o("design:paramtypes",[r.TemplateRef])],e)}();t.FileTemplateDirective=s},function(e,t,n){"use strict";var i=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},r=n(2),s=function(){function e(){this.dictionary={}}return e.prototype.get=function(e){return void 0===this.dictionary[e]?this[e]:this.dictionary[e]},e.prototype.set=function(e,t,n){void 0===n&&(n=!1),this.dictionary[e]&&!n||(this.dictionary[e]=t)},e=i([r.Injectable(),o("design:paramtypes",[])],e)}();t.LocalizationService=s},function(e,t,n){"use strict";var i=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},r=n(2),s=n(7),a=n(11),l=n(15),p=function(){function e(e,t,n){var i=this;this.element=e,this.uploadService=t,this._ngZone=n,this.hideIntervalDocument=null,this.hideIntervalElement=null,this.state={active:"k-dropzone k-dropzone-active",hovered:"k-dropzone k-dropzone-active k-dropzone-hovered",inactive:"k-dropzone"},this.element=e,this.setClasses(this.state.inactive),a.default.isDocumentAvailable()&&this._ngZone.runOutsideAngular(function(){document.addEventListener("dragenter",i.onDocumentDragEnterListener.bind(i)),document.addEventListener("dragover",i.onDocumentDragOverListener.bind(i))})}return e.prototype.onDocumentDragEnterListener=function(){var e=this;return this.lastDragElement?this.calculateTimeDiff(this.lastDragElement)>100&&this.setClasses(this.state.active):this.setClasses(this.state.active),this.lastDragDocument=new Date,this.hideIntervalDocument||(this.hideIntervalDocument=setInterval(function(){e.calculateTimeDiff(e.lastDragDocument)<100||(e.setClasses(e.state.inactive),clearInterval(e.hideIntervalDocument),e.hideIntervalDocument=null)},100)),!1},e.prototype.onElementDragEnterListener=function(){var e=this;return this.setClasses(this.state.hovered),this.lastDragElement=new Date,this.hideIntervalElement||(this.hideIntervalElement=setInterval(function(){if(!(e.calculateTimeDiff(e.lastDragElement)<100)){if(e.lastDrop){var t=e.calculateTimeDiff(e.lastDrop);e.setClasses(t>200?e.state.active:e.state.inactive)}else e.setClasses(e.state.active);clearInterval(e.hideIntervalElement),e.hideIntervalElement=null}},100)),!1},e.prototype.onDocumentDragOverListener=function(){return this.lastDragDocument=new Date,!1},e.prototype.onElementDragOverListener=function(){return this.lastDragElement=new Date,!1},e.prototype.onDropListener=function(e){this.lastDrop=new Date;var t=e.dataTransfer.files;if(t.length>0&&!this.disabled){var n=a.default.getAllFileInfo(t);n=a.default.assignGuidToFiles(n,!this.async.batch),this.multiple||(n.splice(1,n.length-1),this.uploadService.clearFiles()),l.default.validateFiles(n,this.restrictions),this.uploadService.addFiles(n,this.async)}return!1},e.prototype.calculateTimeDiff=function(e){return(new Date).getTime()-e.getTime()},e.prototype.setClasses=function(e){this.disabled||(this.element.nativeElement.className=e)},Object.defineProperty(e.prototype,"initialClassName",{get:function(){return!0},enumerable:!0,configurable:!0}),i([r.Input(),o("design:type",Object)],e.prototype,"async",void 0),i([r.Input(),o("design:type",Boolean)],e.prototype,"disabled",void 0),i([r.Input(),o("design:type",Boolean)],e.prototype,"multiple",void 0),i([r.Input(),o("design:type",Object)],e.prototype,"restrictions",void 0),i([r.HostListener("dragenter"),o("design:type",Function),o("design:paramtypes",[]),o("design:returntype",Boolean)],e.prototype,"onElementDragEnterListener",null),i([r.HostListener("dragover"),o("design:type",Function),o("design:paramtypes",[]),o("design:returntype",Boolean)],e.prototype,"onElementDragOverListener",null),i([r.HostListener("drop",["$event"]),o("design:type",Function),o("design:paramtypes",[Object]),o("design:returntype",Boolean)],e.prototype,"onDropListener",null),i([r.HostBinding("class.k-dropzone"),o("design:type",Boolean)],e.prototype,"initialClassName",null),e=i([r.Directive({selector:"[kendoUploadDropzone]"}),o("design:paramtypes",[r.ElementRef,s.UploadService,r.NgZone])],e)}();t.DropZoneDirective=p},function(e,t){"use strict";var n="invalidMaxFileSize",i="invalidMinFileSize",o="invalidFileExtension",r=function(e,t){t.length>0&&t.indexOf(e.extension.toLowerCase())<0&&(e.validationErrors=e.validationErrors||[],
e.validationErrors.indexOf(o)<0&&e.validationErrors.push(o))},s=function(e,t,o){0!==t&&e.size<t&&(e.validationErrors=e.validationErrors||[],e.validationErrors.indexOf(i)<0&&e.validationErrors.push(i)),0!==o&&e.size>o&&(e.validationErrors=e.validationErrors||[],e.validationErrors.indexOf(n)<0&&e.validationErrors.push(n))},a=function(e){var t=e.map(function(e){var t="."===e.substring(0,1)?e:"."+e;return t.toLowerCase()});return t},l=function(e,t){var n,i=a(t.allowedExtensions),o=t.maxFileSize,l=t.minFileSize;for(n=0;n<e.length;n++)r(e[n],i),s(e[n],l,o)};Object.defineProperty(t,"__esModule",{value:!0}),t.default={validateFiles:l}},function(e,t,n){"use strict";var i=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},r=n(2),s=n(8),a=n(12),l=n(11),p=function(){function e(){}return e.prototype.setFileClasses=function(e){return{"k-file":!0,"k-file-error":e[0].state===s.FileState.Failed,"k-file-invalid":l.default.filesHaveValidationErrors(e),"k-file-progress":e[0].state===s.FileState.Uploading,"k-file-success":e[0].state===s.FileState.Uploaded||e[0].state===s.FileState.Initial}},i([r.Input(),o("design:type",Object)],e.prototype,"async",void 0),i([r.Input(),o("design:type",Boolean)],e.prototype,"disabled",void 0),i([r.Input(),o("design:type",Array)],e.prototype,"fileList",void 0),i([r.Input(),o("design:type",a.FileTemplateDirective)],e.prototype,"fileTemplate",void 0),e=i([r.Component({selector:"[kendo-upload-file-list]",template:"\n <template ngFor\n [ngForOf]=\"fileList\"\n let-files>\n <li [ngClass]='setFileClasses(files)' [attr.data-uid]='files[0].uid'>\n <kendo-upload-file-list-single-item\n class='k-file-single'\n *ngIf='files.length === 1 && !fileTemplate'\n [disabled]='disabled'\n [file]='files[0]'\n [async]='async'>\n </kendo-upload-file-list-single-item>\n <kendo-upload-file-list-multiple-items\n class='k-file-multiple'\n *ngIf='files.length > 1 && !fileTemplate'\n [disabled]='disabled'\n [files]='files'\n [async]='async'>\n </kendo-upload-file-list-multiple-items>\n <template *ngIf=\"fileTemplate\"\n [templateContext]=\"{\n templateRef: fileTemplate.templateRef,\n state: files[0].state,\n $implicit: files\n }\"></template>\n </li>\n </template>\n "}),o("design:paramtypes",[])],e)}();t.FileListComponent=p},function(e,t,n){"use strict";var i=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},o=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=n(2),a=n(18),l=n(13),p=function(e){function t(t){e.call(this),this.localization=t}return i(t,e),t.prototype.textFor=function(e){return this.localization.get(e)},o([s.Input(),r("design:type",Boolean)],t.prototype,"disabled",void 0),o([s.Input(),r("design:type",Object)],t.prototype,"file",void 0),o([s.Input(),r("design:type",Object)],t.prototype,"async",void 0),t=o([s.Component({selector:"kendo-upload-file-list-single-item",template:'\n <span class="k-progress" style="width: 100%;"></span>\n <template [ngIf]=\'file.validationErrors && file.validationErrors.length > 0\'>\n <span class="k-file-invalid-extension-wrapper">\n <span class="k-file-invalid-icon">!</span>\n <span class="k-file-state"></span>\n </span>\n <span class="k-file-name-size-wrapper">\n <span class="k-file-name k-file-name-invalid" [title]="file.name">{{ file.name }}</span>\n <span class="k-file-validation-message">{{ getFileValidationMessage(file, localization) }}</span>\n </span>\n </template>\n <template [ngIf]=\'!file.validationErrors || file.validationErrors.length === 0\'>\n <span class="k-file-extension-wrapper">\n <span class="k-file-extension">{{ file.extension.substring(1) }}</span>\n <span class="k-file-state"></span>\n </span>\n <span class="k-file-name-size-wrapper">\n <span class="k-file-name" [title]="file.name">{{ file.name }}</span>\n <span class="k-file-size">{{ getTotalFilesSizeMessage([file]) }}</span>\n </span>\n </template>\n <kendo-upload-file-list-item-action-button\n [file]=\'file\'\n [disabled]=\'disabled\'\n [async]=\'async\'>\n </kendo-upload-file-list-item-action-button>\n '}),r("design:paramtypes",[l.LocalizationService])],t)}(a.FileListItemBase);t.FileListSingleItemComponent=p},function(e,t,n){"use strict";var i=n(11),o=function(){function e(){}return e.prototype.fileHasValidationErrors=function(e){return i.default.fileHasValidationErrors(e)},e.prototype.filesHaveValidationErrors=function(e){return i.default.filesHaveValidationErrors(e)},e.prototype.getFileValidationMessage=function(e){var t;return e.validationErrors&&e.validationErrors.length>0&&(t=this.localization.get(e.validationErrors[0])),t},e.prototype.getInvalidFilesMessage=function(){return this.localization.get("invalidFiles")},e.prototype.getTotalFilesSizeMessage=function(e){return i.default.getTotalFilesSizeMessage(e)},e}();t.FileListItemBase=o},function(e,t,n){"use strict";var i=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},o=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=n(2),a=n(18),l=n(13),p=function(e){function t(t){e.call(this),this.localization=t}return i(t,e),t.prototype.setFileNameClasses=function(t){return{"k-file-name":!0,"k-file-name-invalid":e.prototype.fileHasValidationErrors.call(this,t)}},t.prototype.ngOnInit=function(){this.filesHaveErrors=e.prototype.filesHaveValidationErrors.call(this,this.files)},o([s.Input(),r("design:type",Boolean)],t.prototype,"disabled",void 0),o([s.Input(),r("design:type",Array)],t.prototype,"files",void 0),o([s.Input(),r("design:type",Object)],t.prototype,"async",void 0),t=o([s.Component({selector:"kendo-upload-file-list-multiple-items",template:'\n <span class="k-progress" style="width: 100%;"></span>\n <span *ngIf="!filesHaveErrors" class="k-multiple-files-extension-wrapper">\n <span class="k-file-state"></span>\n </span>\n <span *ngIf="filesHaveErrors" class="k-multiple-files-invalid-extension-wrapper">\n <span class=\'k-file-invalid-icon\'>!</span>\n <span class="k-file-state"></span>\n </span>\n <span class="k-file-name-size-wrapper">\n <span *ngFor="let file of files" [ngClass]="setFileNameClasses(file)" [title]="file.name">{{file.name}}</span>\n <span *ngIf="!filesHaveErrors"\n class="k-file-information">Total: {{ files.length }} files, {{ getTotalFilesSizeMessage(files) }}</span>\n <span *ngIf="filesHaveErrors" class="k-file-validation-message">{{ getInvalidFilesMessage() }}</span>\n </span>\n <kendo-upload-file-list-item-action-button\n [file]=\'files[0]\'\n [disabled]=\'disabled\'\n [async]=\'async\'>\n </kendo-upload-file-list-item-action-button>\n '}),r("design:paramtypes",[l.LocalizationService])],t)}(a.FileListItemBase);t.FileListMultipleItemsComponent=p},function(e,t,n){"use strict";var i=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},r=n(2),s=n(8),a=n(7),l=n(13),p=function(){function e(e,t){this.uploadService=e,this.localization=t,this.isFocused=!1}return e.prototype.setActionButtonWrapperClasses=function(){return{"k-button k-upload-action":!0,"k-state-focused":this.isFocused}},e.prototype.setActionButtonClasses=function(e){return{"k-i-deny k-cancel":e.state===s.FileState.Uploading,"k-i-refresh k-retry":e.state===s.FileState.Failed,"k-i-x k-delete":e.state===s.FileState.Selected||e.state===s.FileState.Initial||e.state===s.FileState.Uploaded,"k-icon":!0}},e.prototype.setActionButtonTitle=function(e){switch(e.state){case s.FileState.Failed:return this.localization.get("retry");case s.FileState.Uploading:return this.localization.get("cancel");default:return this.localization.get("remove")}},e.prototype.onActionButtonWrapperFocus=function(){this.isFocused=!0},e.prototype.onActionButtonWrapperBlur=function(){this.isFocused=!1},e.prototype.onFileActionClick=function(e){var t=this.actionButton.nativeElement.className.split(" ");this.disabled||(t.indexOf("k-delete")>=0?this.uploadService.removeFiles(e,this.async):t.indexOf("k-cancel")>=0?this.uploadService.cancelFiles(e):t.indexOf("k-retry")>=0&&this.uploadService.retryFiles(e,this.async))},e.prototype.isVisible=function(e){return!!(e.state!==s.FileState.Uploaded&&e.state!==s.FileState.Initial||this.async.removeUrl)},i([r.Input(),o("design:type",Object)],e.prototype,"file",void 0),i([r.Input(),o("design:type",Object)],e.prototype,"async",void 0),i([r.Input(),o("design:type",Boolean)],e.prototype,"disabled",void 0),i([r.ViewChild("actionButton"),o("design:type",r.ElementRef)],e.prototype,"actionButton",void 0),e=i([r.Component({selector:"kendo-upload-file-list-item-action-button",template:"\n <strong class=\"k-upload-status\">\n <button\n type=\"button\" [ngClass]=\"setActionButtonWrapperClasses()\"\n (focus)='onActionButtonWrapperFocus()'\n (blur)='onActionButtonWrapperBlur()'\n *ngIf=\"isVisible(file)\"\n (click)=\"onFileActionClick(file.uid)\">\n <span #actionButton\n [attr.aria-label]='setActionButtonTitle(file)'\n [ngClass]='setActionButtonClasses(file)'\n [attr.title]='setActionButtonTitle(file)' \n ></span>\n </button>\n </strong>\n "}),o("design:paramtypes",[a.UploadService,l.LocalizationService])],e)}();t.FileListItemActionButtonComponent=p},function(e,t,n){"use strict";var i=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},r=n(2),s=n(7),a=n(11),l=n(15);n(22);var p=function(){function e(e,t){this.uploadService=e,this.focusChange=new r.EventEmitter,this.type="file",this.autocomplete="off",this.element=t}return Object.defineProperty(e.prototype,"nameAttribute",{get:function(){return this.async.saveField},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"multipleAttribute",{get:function(){return this.multiple?"multiple":null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dirAttribute",{get:function(){return this.dir},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabledAttribute",{get:function(){return this.disabled?"true":null},enumerable:!0,configurable:!0}),e.prototype.onInputChange=function(e){var t=a.default.inputFiles(e.target);t=a.default.assignGuidToFiles(t,!this.async.batch),l.default.validateFiles(t,this.restrictions),this.multiple||this.uploadService.clearFiles(),this.uploadService.addFiles(t,this.async);var n=this.element.nativeElement;n.type="",n.type="file",setTimeout(function(){n.focus()})},e.prototype.onInputFocus=function(){this.focusChange.emit(!0)},e.prototype.onInputBlur=function(){this.focusChange.emit(!1)},i([r.Input(),o("design:type",Object)],e.prototype,"async",void 0),i([r.Input(),o("design:type",String)],e.prototype,"dir",void 0),i([r.Input(),o("design:type",Boolean)],e.prototype,"disabled",void 0),i([r.Input(),o("design:type",Boolean)],e.prototype,"multiple",void 0),i([r.Input(),o("design:type",Object)],e.prototype,"restrictions",void 0),i([r.Output(),o("design:type",r.EventEmitter)],e.prototype,"focusChange",void 0),i([r.HostBinding("attr.type"),o("design:type",String)],e.prototype,"type",void 0),i([r.HostBinding("attr.autocomplete"),o("design:type",String)],e.prototype,"autocomplete",void 0),i([r.HostBinding("attr.name"),o("design:type",String)],e.prototype,"nameAttribute",null),i([r.HostBinding("attr.multiple"),o("design:type",String)],e.prototype,"multipleAttribute",null),i([r.HostBinding("attr.dir"),o("design:type",String)],e.prototype,"dirAttribute",null),i([r.HostBinding("attr.disabled"),o("design:type",String)],e.prototype,"disabledAttribute",null),i([r.HostListener("change",["$event"]),o("design:type",Function),o("design:paramtypes",[Object]),o("design:returntype",void 0)],e.prototype,"onInputChange",null),i([r.HostListener("focus"),o("design:type",Function),o("design:paramtypes",[]),o("design:returntype",void 0)],e.prototype,"onInputFocus",null),i([r.HostListener("blur"),o("design:type",Function),o("design:paramtypes",[]),o("design:returntype",void 0)],e.prototype,"onInputBlur",null),e=i([r.Directive({selector:"[kendoFileSelect]"}),o("design:paramtypes",[s.UploadService,r.ElementRef])],e)}();t.FileSelectDirective=p},function(e,t){e.exports=o},function(e,t,n){"use strict";var i=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},r=n(2),s=n(9),a=n(7),l=n(13),p=function(){function e(e,t){this.uploadService=e,this.localization=t}return e.prototype.performUpload=function(){this.disabled||this.uploadService.uploadFiles(this.async)},e.prototype.clearFiles=function(){this.disabled||this.uploadService.clearFiles()},e.prototype.textFor=function(e){return this.localization.get(e)},Object.defineProperty(e.prototype,"className",{get:function(){return"k-action-buttons"},enumerable:!0,configurable:!0}),i([r.Input(),o("design:type",Object)],e.prototype,"async",void 0),i([r.Input(),o("design:type",Boolean)],e.prototype,"disabled",void 0),i([r.Input(),o("design:type",s.FileMap)],e.prototype,"fileList",void 0),i([r.HostBinding("class"),o("design:type",String)],e.prototype,"className",null),e=i([r.Component({selector:"kendo-upload-action-buttons",template:'\n <button type="button" class="k-button k-clear-selected" (click)="clearFiles()">\n {{textFor(\'clearSelectedFiles\')}}\n </button>\n <button type="button" class="k-button k-primary k-upload-selected" (click)="performUpload()">\n {{textFor(\'uploadSelectedFiles\')}}\n </button>\n '}),o("design:paramtypes",[a.UploadService,l.LocalizationService])],e)}();t.UploadActionButtonsComponent=p},function(e,t,n){"use strict";var i=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},r=n(2),s=n(9),a=n(8),l=n(13),p=function(){function e(e){this.localization=e}return e.prototype.ngDoCheck=function(){var e=this.fileList.hasFileWithState([a.FileState.Uploading]);this.isUploading!==e&&(this.isUploading=e,this.isFailed=this.fileList.hasFileWithState([a.FileState.Failed]),this.statusText=this.isUploading?this.localization.get("headerStatusUploading"):this.localization.get("headerStatusUploaded"))},e.prototype.setStatusClasses=function(){return{"k-i-checkmark":!this.isUploading&&!this.isFailed,"k-i-exception":!this.isUploading&&this.isFailed,"k-i-loading":this.isUploading,"k-icon":!0}},i([r.Input(),o("design:type",s.FileMap)],e.prototype,"fileList",void 0),e=i([r.Component({selector:"kendo-upload-status-total",template:'\n <strong\n class="k-upload-status k-upload-status-total">\n <span [ngClass]="setStatusClasses()"></span>\n {{statusText}}\n </strong>\n '}),o("design:paramtypes",[l.LocalizationService])],e)}();t.UploadStatusTotalComponent=p},function(e,t,n){"use strict";var i=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},r=n(2),s=function(){function e(e){this.viewContainerRef=e}return Object.defineProperty(e.prototype,"templateContext",{set:function(e){this.insertedViewRef&&(this.viewContainerRef.remove(this.viewContainerRef.indexOf(this.insertedViewRef)),this.insertedViewRef=void 0),e.templateRef&&(this.insertedViewRef=this.viewContainerRef.createEmbeddedView(e.templateRef,e))},enumerable:!0,configurable:!0}),i([r.Input(),o("design:type",Object),o("design:paramtypes",[Object])],e.prototype,"templateContext",null),e=i([r.Directive({selector:"[templateContext]"}),o("design:paramtypes",[r.ViewContainerRef])],e)}();t.TemplateContextDirective=s},function(e,t,n){"use strict";var i=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},o=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=n(2),a=n(27),l=n(13),p=function(e){function t(t){e.call(this),this.service=t}return i(t,e),t=o([s.Directive({providers:[{provide:a.Messages,useExisting:s.forwardRef(function(){return t})}],selector:"[kendoUploadLocalizedMessages]"}),r("design:paramtypes",[l.LocalizationService])],t)}(a.Messages);t.LocalizedMessagesDirective=p},function(e,t,n){"use strict";var i=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},r=n(2),s=function(){function e(){}return Object.defineProperty(e.prototype,"override",{get:function(){return!1},enumerable:!0,configurable:!0}),e.prototype.ngOnChanges=function(e){var t=this,n=Object.keys(e);n.forEach(function(e){return t.service.set(e,t[e],t.override)})},i([r.Input(),o("design:type",String)],e.prototype,"cancel",void 0),i([r.Input(),o("design:type",String)],e.prototype,"clearSelectedFiles",void 0),i([r.Input(),o("design:type",String)],e.prototype,"dropFilesHere",void 0),i([r.Input(),o("design:type",String)],e.prototype,"headerStatusUploaded",void 0),i([r.Input(),o("design:type",String)],e.prototype,"headerStatusUploading",void 0),i([r.Input(),o("design:type",String)],e.prototype,"invalidFileExtension",void 0),i([r.Input(),o("design:type",String)],e.prototype,"invalidFiles",void 0),i([r.Input(),o("design:type",String)],e.prototype,"invalidMaxFileSize",void 0),i([r.Input(),o("design:type",String)],e.prototype,"invalidMinFileSize",void 0),i([r.Input(),o("design:type",String)],e.prototype,"remove",void 0),i([r.Input(),o("design:type",String)],e.prototype,"retry",void 0),i([r.Input(),o("design:type",String)],e.prototype,"select",void 0),i([r.Input(),o("design:type",String)],e.prototype,"uploadSelectedFiles",void 0),e}();t.Messages=s},function(e,t,n){"use strict";var i=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},o=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=n(2),a=n(27),l=n(13),p=function(e){function t(t){e.call(this),this.service=t}return i(t,e),Object.defineProperty(t.prototype,"override",{get:function(){return!0},enumerable:!0,configurable:!0}),t=o([s.Component({providers:[{provide:a.Messages,useExisting:s.forwardRef(function(){return t})}],selector:"kendo-upload-messages",template:""}),r("design:paramtypes",[l.LocalizationService])],t)}(a.Messages);t.CustomMessagesComponent=p}])});
e.validationErrors.indexOf(o)<0&&e.validationErrors.push(o))},s=function(e,t,o){0!==t&&e.size<t&&(e.validationErrors=e.validationErrors||[],e.validationErrors.indexOf(i)<0&&e.validationErrors.push(i)),0!==o&&e.size>o&&(e.validationErrors=e.validationErrors||[],e.validationErrors.indexOf(n)<0&&e.validationErrors.push(n))},a=function(e){var t=e.map(function(e){var t="."===e.substring(0,1)?e:"."+e;return t.toLowerCase()});return t},l=function(e,t){var n,i=a(t.allowedExtensions),o=t.maxFileSize,l=t.minFileSize;for(n=0;n<e.length;n++)r(e[n],i),s(e[n],l,o)};Object.defineProperty(t,"__esModule",{value:!0}),t.default={validateFiles:l}},function(e,t,n){"use strict";var i=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},r=n(2),s=n(8),a=n(12),l=n(11),p=function(){function e(){}return e.prototype.setFileClasses=function(e){return{"k-file":!0,"k-file-error":e[0].state===s.FileState.Failed,"k-file-invalid":l.default.filesHaveValidationErrors(e),"k-file-progress":e[0].state===s.FileState.Uploading,"k-file-success":e[0].state===s.FileState.Uploaded||e[0].state===s.FileState.Initial}},i([r.Input(),o("design:type",Object)],e.prototype,"async",void 0),i([r.Input(),o("design:type",Boolean)],e.prototype,"disabled",void 0),i([r.Input(),o("design:type",Array)],e.prototype,"fileList",void 0),i([r.Input(),o("design:type",a.FileTemplateDirective)],e.prototype,"fileTemplate",void 0),e=i([r.Component({selector:"[kendo-upload-file-list]",template:"\n <template ngFor\n [ngForOf]=\"fileList\"\n let-files>\n <li [ngClass]='setFileClasses(files)' [attr.data-uid]='files[0].uid'>\n <kendo-upload-file-list-single-item\n class='k-file-single'\n *ngIf='files.length === 1 && !fileTemplate'\n [disabled]='disabled'\n [file]='files[0]'\n [async]='async'>\n </kendo-upload-file-list-single-item>\n <kendo-upload-file-list-multiple-items\n class='k-file-multiple'\n *ngIf='files.length > 1 && !fileTemplate'\n [disabled]='disabled'\n [files]='files'\n [async]='async'>\n </kendo-upload-file-list-multiple-items>\n <template *ngIf=\"fileTemplate\"\n [templateContext]=\"{\n templateRef: fileTemplate.templateRef,\n state: files[0].state,\n $implicit: files\n }\"></template>\n </li>\n </template>\n "}),o("design:paramtypes",[])],e)}();t.FileListComponent=p},function(e,t,n){"use strict";var i=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},o=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=n(2),a=n(18),l=n(13),p=function(e){function t(t){e.call(this),this.localization=t}return i(t,e),t.prototype.textFor=function(e){return this.localization.get(e)},o([s.Input(),r("design:type",Boolean)],t.prototype,"disabled",void 0),o([s.Input(),r("design:type",Object)],t.prototype,"file",void 0),o([s.Input(),r("design:type",Object)],t.prototype,"async",void 0),t=o([s.Component({selector:"kendo-upload-file-list-single-item",template:'\n <span class="k-progress" style="width: 100%;"></span>\n <template [ngIf]=\'file.validationErrors && file.validationErrors.length > 0\'>\n <span class="k-file-invalid-extension-wrapper">\n <span class="k-file-invalid-icon">!</span>\n <span class="k-file-state"></span>\n </span>\n <span class="k-file-name-size-wrapper">\n <span class="k-file-name k-file-name-invalid" [title]="file.name">{{ file.name }}</span>\n <span class="k-file-validation-message">{{ getFileValidationMessage(file, localization) }}</span>\n </span>\n </template>\n <template [ngIf]=\'!file.validationErrors || file.validationErrors.length === 0\'>\n <span class="k-file-extension-wrapper">\n <span class="k-file-extension">{{ file.extension.substring(1) }}</span>\n <span class="k-file-state"></span>\n </span>\n <span class="k-file-name-size-wrapper">\n <span class="k-file-name" [title]="file.name">{{ file.name }}</span>\n <span class="k-file-size">{{ getTotalFilesSizeMessage([file]) }}</span>\n </span>\n </template>\n <kendo-upload-file-list-item-action-button\n [file]=\'file\'\n [disabled]=\'disabled\'\n [async]=\'async\'>\n </kendo-upload-file-list-item-action-button>\n '}),r("design:paramtypes",[l.LocalizationService])],t)}(a.FileListItemBase);t.FileListSingleItemComponent=p},function(e,t,n){"use strict";var i=n(11),o=function(){function e(){}return e.prototype.fileHasValidationErrors=function(e){return i.default.fileHasValidationErrors(e)},e.prototype.filesHaveValidationErrors=function(e){return i.default.filesHaveValidationErrors(e)},e.prototype.getFileValidationMessage=function(e){var t;return e.validationErrors&&e.validationErrors.length>0&&(t=this.localization.get(e.validationErrors[0])),t},e.prototype.getInvalidFilesMessage=function(){return this.localization.get("invalidFiles")},e.prototype.getTotalFilesSizeMessage=function(e){return i.default.getTotalFilesSizeMessage(e)},e}();t.FileListItemBase=o},function(e,t,n){"use strict";var i=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},o=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=n(2),a=n(18),l=n(13),p=function(e){function t(t){e.call(this),this.localization=t}return i(t,e),t.prototype.setFileNameClasses=function(t){return{"k-file-name":!0,"k-file-name-invalid":e.prototype.fileHasValidationErrors.call(this,t)}},t.prototype.ngOnInit=function(){this.filesHaveErrors=e.prototype.filesHaveValidationErrors.call(this,this.files)},o([s.Input(),r("design:type",Boolean)],t.prototype,"disabled",void 0),o([s.Input(),r("design:type",Array)],t.prototype,"files",void 0),o([s.Input(),r("design:type",Object)],t.prototype,"async",void 0),t=o([s.Component({selector:"kendo-upload-file-list-multiple-items",template:'\n <span class="k-progress" style="width: 100%;"></span>\n <span *ngIf="!filesHaveErrors" class="k-multiple-files-extension-wrapper">\n <span class="k-file-state"></span>\n </span>\n <span *ngIf="filesHaveErrors" class="k-multiple-files-invalid-extension-wrapper">\n <span class=\'k-file-invalid-icon\'>!</span>\n <span class="k-file-state"></span>\n </span>\n <span class="k-file-name-size-wrapper">\n <span *ngFor="let file of files" [ngClass]="setFileNameClasses(file)" [title]="file.name">{{file.name}}</span>\n <span *ngIf="!filesHaveErrors"\n class="k-file-information">Total: {{ files.length }} files, {{ getTotalFilesSizeMessage(files) }}</span>\n <span *ngIf="filesHaveErrors" class="k-file-validation-message">{{ getInvalidFilesMessage() }}</span>\n </span>\n <kendo-upload-file-list-item-action-button\n [file]=\'files[0]\'\n [disabled]=\'disabled\'\n [async]=\'async\'>\n </kendo-upload-file-list-item-action-button>\n '}),r("design:paramtypes",[l.LocalizationService])],t)}(a.FileListItemBase);t.FileListMultipleItemsComponent=p},function(e,t,n){"use strict";var i=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},r=n(2),s=n(8),a=n(7),l=n(13),p=function(){function e(e,t){this.uploadService=e,this.localization=t,this.isFocused=!1}return e.prototype.setActionButtonWrapperClasses=function(){return{"k-button k-upload-action":!0,"k-state-focused":this.isFocused}},e.prototype.setActionButtonClasses=function(e){return{"k-i-deny k-cancel":e.state===s.FileState.Uploading,"k-i-refresh k-retry":e.state===s.FileState.Failed,"k-i-x k-delete":e.state===s.FileState.Selected||e.state===s.FileState.Initial||e.state===s.FileState.Uploaded,"k-icon":!0}},e.prototype.setActionButtonTitle=function(e){switch(e.state){case s.FileState.Failed:return this.localization.get("retry");case s.FileState.Uploading:return this.localization.get("cancel");default:return this.localization.get("remove")}},e.prototype.onActionButtonWrapperFocus=function(){this.isFocused=!0},e.prototype.onActionButtonWrapperBlur=function(){this.isFocused=!1},e.prototype.onFileActionClick=function(e){var t=this.actionButton.nativeElement.className.split(" ");this.disabled||(t.indexOf("k-delete")>=0?this.uploadService.removeFiles(e,this.async):t.indexOf("k-cancel")>=0?this.uploadService.cancelFiles(e):t.indexOf("k-retry")>=0&&this.uploadService.retryFiles(e,this.async))},e.prototype.isVisible=function(e){return!!(e.state!==s.FileState.Uploaded&&e.state!==s.FileState.Initial||this.async.removeUrl)},i([r.Input(),o("design:type",Object)],e.prototype,"file",void 0),i([r.Input(),o("design:type",Object)],e.prototype,"async",void 0),i([r.Input(),o("design:type",Boolean)],e.prototype,"disabled",void 0),i([r.ViewChild("actionButton"),o("design:type",r.ElementRef)],e.prototype,"actionButton",void 0),e=i([r.Component({selector:"kendo-upload-file-list-item-action-button",template:"\n <strong class=\"k-upload-status\">\n <button\n type=\"button\" [ngClass]=\"setActionButtonWrapperClasses()\"\n (focus)='onActionButtonWrapperFocus()'\n (blur)='onActionButtonWrapperBlur()'\n *ngIf=\"isVisible(file)\"\n (click)=\"onFileActionClick(file.uid)\">\n <span #actionButton\n [attr.aria-label]='setActionButtonTitle(file)'\n [ngClass]='setActionButtonClasses(file)'\n [attr.title]='setActionButtonTitle(file)' \n ></span>\n </button>\n </strong>\n "}),o("design:paramtypes",[a.UploadService,l.LocalizationService])],e)}();t.FileListItemActionButtonComponent=p},function(e,t,n){"use strict";var i=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},r=n(2),s=n(7),a=n(11),l=n(15);n(22);var p=function(){function e(e,t){this.uploadService=e,this.focusChange=new r.EventEmitter,this.type="file",this.autocomplete="off",this.element=t}return Object.defineProperty(e.prototype,"nameAttribute",{get:function(){return this.async.saveField},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"multipleAttribute",{get:function(){return this.multiple?"multiple":null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dirAttribute",{get:function(){return this.dir},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabledAttribute",{get:function(){return this.disabled?"true":null},enumerable:!0,configurable:!0}),e.prototype.onInputChange=function(e){var t=navigator.userAgent,n=/(chrome)[ \/]([\w.]+)/i,i=/(webkit)[ \/]([\w.]+)/i,o=a.default.inputFiles(e.target);o=a.default.assignGuidToFiles(o,!this.async.batch),l.default.validateFiles(o,this.restrictions),this.multiple||this.uploadService.clearFiles(),this.uploadService.addFiles(o,this.async);var r=this.element.nativeElement;!t.match(n)&&t.match(i)||(r.type="",r.type="file"),setTimeout(function(){r.focus()})},e.prototype.onInputFocus=function(){this.focusChange.emit(!0)},e.prototype.onInputBlur=function(){this.focusChange.emit(!1)},i([r.Input(),o("design:type",Object)],e.prototype,"async",void 0),i([r.Input(),o("design:type",String)],e.prototype,"dir",void 0),i([r.Input(),o("design:type",Boolean)],e.prototype,"disabled",void 0),i([r.Input(),o("design:type",Boolean)],e.prototype,"multiple",void 0),i([r.Input(),o("design:type",Object)],e.prototype,"restrictions",void 0),i([r.Output(),o("design:type",r.EventEmitter)],e.prototype,"focusChange",void 0),i([r.HostBinding("attr.type"),o("design:type",String)],e.prototype,"type",void 0),i([r.HostBinding("attr.autocomplete"),o("design:type",String)],e.prototype,"autocomplete",void 0),i([r.HostBinding("attr.name"),o("design:type",String)],e.prototype,"nameAttribute",null),i([r.HostBinding("attr.multiple"),o("design:type",String)],e.prototype,"multipleAttribute",null),i([r.HostBinding("attr.dir"),o("design:type",String)],e.prototype,"dirAttribute",null),i([r.HostBinding("attr.disabled"),o("design:type",String)],e.prototype,"disabledAttribute",null),i([r.HostListener("change",["$event"]),o("design:type",Function),o("design:paramtypes",[Object]),o("design:returntype",void 0)],e.prototype,"onInputChange",null),i([r.HostListener("focus"),o("design:type",Function),o("design:paramtypes",[]),o("design:returntype",void 0)],e.prototype,"onInputFocus",null),i([r.HostListener("blur"),o("design:type",Function),o("design:paramtypes",[]),o("design:returntype",void 0)],e.prototype,"onInputBlur",null),e=i([r.Directive({selector:"[kendoFileSelect]"}),o("design:paramtypes",[s.UploadService,r.ElementRef])],e)}();t.FileSelectDirective=p},function(e,t){e.exports=o},function(e,t,n){"use strict";var i=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},r=n(2),s=n(9),a=n(7),l=n(13),p=function(){function e(e,t){this.uploadService=e,this.localization=t}return e.prototype.performUpload=function(){this.disabled||this.uploadService.uploadFiles(this.async)},e.prototype.clearFiles=function(){this.disabled||this.uploadService.clearFiles()},e.prototype.textFor=function(e){return this.localization.get(e)},Object.defineProperty(e.prototype,"className",{get:function(){return"k-action-buttons"},enumerable:!0,configurable:!0}),i([r.Input(),o("design:type",Object)],e.prototype,"async",void 0),i([r.Input(),o("design:type",Boolean)],e.prototype,"disabled",void 0),i([r.Input(),o("design:type",s.FileMap)],e.prototype,"fileList",void 0),i([r.HostBinding("class"),o("design:type",String)],e.prototype,"className",null),e=i([r.Component({selector:"kendo-upload-action-buttons",template:'\n <button type="button" class="k-button k-clear-selected" (click)="clearFiles()">\n {{textFor(\'clearSelectedFiles\')}}\n </button>\n <button type="button" class="k-button k-primary k-upload-selected" (click)="performUpload()">\n {{textFor(\'uploadSelectedFiles\')}}\n </button>\n '}),o("design:paramtypes",[a.UploadService,l.LocalizationService])],e)}();t.UploadActionButtonsComponent=p},function(e,t,n){"use strict";var i=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},r=n(2),s=n(9),a=n(8),l=n(13),p=function(){function e(e){this.localization=e}return e.prototype.ngDoCheck=function(){var e=this.fileList.hasFileWithState([a.FileState.Uploading]);this.isUploading!==e&&(this.isUploading=e,this.isFailed=this.fileList.hasFileWithState([a.FileState.Failed]),this.statusText=this.isUploading?this.localization.get("headerStatusUploading"):this.localization.get("headerStatusUploaded"))},e.prototype.setStatusClasses=function(){return{"k-i-checkmark":!this.isUploading&&!this.isFailed,"k-i-exception":!this.isUploading&&this.isFailed,"k-i-loading":this.isUploading,"k-icon":!0}},i([r.Input(),o("design:type",s.FileMap)],e.prototype,"fileList",void 0),e=i([r.Component({selector:"kendo-upload-status-total",template:'\n <strong\n class="k-upload-status k-upload-status-total">\n <span [ngClass]="setStatusClasses()"></span>\n {{statusText}}\n </strong>\n '}),o("design:paramtypes",[l.LocalizationService])],e)}();t.UploadStatusTotalComponent=p},function(e,t,n){"use strict";var i=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},r=n(2),s=function(){function e(e){this.viewContainerRef=e}return Object.defineProperty(e.prototype,"templateContext",{set:function(e){this.insertedViewRef&&(this.viewContainerRef.remove(this.viewContainerRef.indexOf(this.insertedViewRef)),this.insertedViewRef=void 0),e.templateRef&&(this.insertedViewRef=this.viewContainerRef.createEmbeddedView(e.templateRef,e))},enumerable:!0,configurable:!0}),i([r.Input(),o("design:type",Object),o("design:paramtypes",[Object])],e.prototype,"templateContext",null),e=i([r.Directive({selector:"[templateContext]"}),o("design:paramtypes",[r.ViewContainerRef])],e)}();t.TemplateContextDirective=s},function(e,t,n){"use strict";var i=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},o=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=n(2),a=n(27),l=n(13),p=function(e){function t(t){e.call(this),this.service=t}return i(t,e),t=o([s.Directive({providers:[{provide:a.Messages,useExisting:s.forwardRef(function(){return t})}],selector:"[kendoUploadLocalizedMessages]"}),r("design:paramtypes",[l.LocalizationService])],t)}(a.Messages);t.LocalizedMessagesDirective=p},function(e,t,n){"use strict";var i=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},r=n(2),s=function(){function e(){}return Object.defineProperty(e.prototype,"override",{get:function(){return!1},enumerable:!0,configurable:!0}),e.prototype.ngOnChanges=function(e){var t=this,n=Object.keys(e);n.forEach(function(e){return t.service.set(e,t[e],t.override)})},i([r.Input(),o("design:type",String)],e.prototype,"cancel",void 0),i([r.Input(),o("design:type",String)],e.prototype,"clearSelectedFiles",void 0),i([r.Input(),o("design:type",String)],e.prototype,"dropFilesHere",void 0),i([r.Input(),o("design:type",String)],e.prototype,"headerStatusUploaded",void 0),i([r.Input(),o("design:type",String)],e.prototype,"headerStatusUploading",void 0),i([r.Input(),o("design:type",String)],e.prototype,"invalidFileExtension",void 0),i([r.Input(),o("design:type",String)],e.prototype,"invalidFiles",void 0),i([r.Input(),o("design:type",String)],e.prototype,"invalidMaxFileSize",void 0),i([r.Input(),o("design:type",String)],e.prototype,"invalidMinFileSize",void 0),i([r.Input(),o("design:type",String)],e.prototype,"remove",void 0),i([r.Input(),o("design:type",String)],e.prototype,"retry",void 0),i([r.Input(),o("design:type",String)],e.prototype,"select",void 0),i([r.Input(),o("design:type",String)],e.prototype,"uploadSelectedFiles",void 0),e}();t.Messages=s},function(e,t,n){"use strict";var i=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},o=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=n(2),a=n(27),l=n(13),p=function(e){function t(t){e.call(this),this.service=t}return i(t,e),Object.defineProperty(t.prototype,"override",{get:function(){return!0},enumerable:!0,configurable:!0}),t=o([s.Component({providers:[{provide:a.Messages,useExisting:s.forwardRef(function(){return t})}],selector:"kendo-upload-messages",template:""}),r("design:paramtypes",[l.LocalizationService])],t)}(a.Messages);t.CustomMessagesComponent=p}])});

@@ -46,2 +46,5 @@ import { Directive, ElementRef, EventEmitter, HostBinding, HostListener, Input, Output } from '@angular/core';

FileSelectDirective.prototype.onInputChange = function (event) {
var ua = navigator.userAgent;
var chrome = /(chrome)[ \/]([\w.]+)/i;
var safari = /(webkit)[ \/]([\w.]+)/i;
var selectedFiles = util.inputFiles(event.target);

@@ -55,9 +58,11 @@ selectedFiles = util.assignGuidToFiles(selectedFiles, !this.async.batch);

/*
Browsers don't trigger change event when the same file
is selected consecutive times, so as a workaround
we clear the input value after handling the file.
Chrome and Internet Explorer don't trigger change event
when file with the same name is selected consecutive times.
As a workaround we clear the input value after handling the file.
*/
var native = this.element.nativeElement;
native.type = "";
native.type = "file";
if (!(!ua.match(chrome) && ua.match(safari))) {
native.type = "";
native.type = "file";
}
setTimeout(function () { native.focus(); });

@@ -64,0 +69,0 @@ };

@@ -47,2 +47,5 @@ "use strict";

FileSelectDirective.prototype.onInputChange = function (event) {
var ua = navigator.userAgent;
var chrome = /(chrome)[ \/]([\w.]+)/i;
var safari = /(webkit)[ \/]([\w.]+)/i;
var selectedFiles = util_1.default.inputFiles(event.target);

@@ -56,9 +59,11 @@ selectedFiles = util_1.default.assignGuidToFiles(selectedFiles, !this.async.batch);

/*
Browsers don't trigger change event when the same file
is selected consecutive times, so as a workaround
we clear the input value after handling the file.
Chrome and Internet Explorer don't trigger change event
when file with the same name is selected consecutive times.
As a workaround we clear the input value after handling the file.
*/
var native = this.element.nativeElement;
native.type = "";
native.type = "file";
if (!(!ua.match(chrome) && ua.match(safari))) {
native.type = "";
native.type = "file";
}
setTimeout(function () { native.focus(); });

@@ -65,0 +70,0 @@ };

{
"name": "@progress/kendo-angular-upload",
"description": "Kendo UI Angular 2 Upload Component",
"version": "0.15.0",
"version": "0.15.1",
"publishConfig": {

@@ -6,0 +6,0 @@ "registry": "https://registry.npm.telerik.com"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc