From 1627204f4b770674224890bc386acb900ec343eb Mon Sep 17 00:00:00 2001 From: Arkadii Berezkin Date: Thu, 28 Sep 2017 13:11:48 +1000 Subject: [PATCH] chore(release): 1.0.0-rc.0 --- CHANGELOG.md | 37 +++++++++++++++++++++++++++++++++++++ docs/assets/readme.md | 4 ++++ docs/main.bundle.js | 2 +- package.json | 2 +- 4 files changed, 43 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 01d28c2..4d23a29 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,43 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +# [1.0.0-rc.0](https://github.com/aberezkin/ng2-image-upload/compare/v0.6.5...v1.0.0-rc.0) (2017-09-28) + + +### Bug Fixes + +* **css:** prefix all classes to prevent external style cascading ([#114](https://github.com/aberezkin/ng2-image-upload/issues/114)) ([277bcf7](https://github.com/aberezkin/ng2-image-upload/commit/277bcf7)) +* **dependencies:** add http module to imports ([24ee042](https://github.com/aberezkin/ng2-image-upload/commit/24ee042)), closes [#80](https://github.com/aberezkin/ng2-image-upload/issues/80) +* **input:** fixed extensions not working when not specified ([#83](https://github.com/aberezkin/ng2-image-upload/issues/83)) ([204ab16](https://github.com/aberezkin/ng2-image-upload/commit/204ab16)), closes [#82](https://github.com/aberezkin/ng2-image-upload/issues/82) +* **output:** emit onRemove when all files are cleared ([#85](https://github.com/aberezkin/ng2-image-upload/issues/85)) ([f4b4c05](https://github.com/aberezkin/ng2-image-upload/commit/f4b4c05)), closes [#84](https://github.com/aberezkin/ng2-image-upload/issues/84) + + +### Chores + +* **api:** made api conform to angular conventions ([#87](https://github.com/aberezkin/ng2-image-upload/issues/87)) ([29d288e](https://github.com/aberezkin/ng2-image-upload/commit/29d288e)) + + +### Features + +* **input:** added the ability to pass a beforeUpload function that can modify each file/url or abort entirely ([#101](https://github.com/aberezkin/ng2-image-upload/issues/101)) ([9a883b8](https://github.com/aberezkin/ng2-image-upload/commit/9a883b8)), closes [#59](https://github.com/aberezkin/ng2-image-upload/issues/59) +* **input:** allow clear button text to be customised ([#100](https://github.com/aberezkin/ng2-image-upload/issues/100)) ([df66c86](https://github.com/aberezkin/ng2-image-upload/commit/df66c86)), closes [#97](https://github.com/aberezkin/ng2-image-upload/issues/97) +* allow custom form data ([098febd](https://github.com/aberezkin/ng2-image-upload/commit/098febd)) +* allow custom styling - fixes [#93](https://github.com/aberezkin/ng2-image-upload/issues/93) ([#116](https://github.com/aberezkin/ng2-image-upload/issues/116)) ([a1aa8f4](https://github.com/aberezkin/ng2-image-upload/commit/a1aa8f4)) +* retrieve files on open ([#130](https://github.com/aberezkin/ng2-image-upload/issues/130)) ([45e4472](https://github.com/aberezkin/ng2-image-upload/commit/45e4472)) + + +### BREAKING CHANGES + +* **api:** `headers` now accepts a map instead of an array. + +Typescript signature: `[name: string]: any;` +* **api:** `onFileUploadFinish` renamed to `uploadFinished` +* **api:** `onRemove` renamed to `removed` +* **api:** `isPending` renamed to `uploadStateChanged` + + + ## [0.6.5](https://github.com/aberezkin/ng2-image-upload/compare/v0.6.4...v0.6.5) (2017-07-01) diff --git a/docs/assets/readme.md b/docs/assets/readme.md index 555b21b..8364a3c 100644 --- a/docs/assets/readme.md +++ b/docs/assets/readme.md @@ -43,6 +43,8 @@ Content-Type. The query has a single field called `image`. `[extensions]="['jpg','png','gif']"` - upload images with specific extensions. Default all extensions `image/*` is allowed. +`[uploadedFiles]="['http://example.com/path/to/my/file', {'fileName': 'fileName.jpg', url: 'http://example.com/path/to/my/file'}]"` - enters the uploaded files from the previous time. + #### Custom headers If you need to send some headers with your request (for example `Authorization` headers), @@ -149,6 +151,7 @@ In the final state it should look something like this: [buttonCaption]="'Select Images!'" [dropBoxMessage]="'Drop your images here!'" [extensions]="['jpg','png','gif']" + [uploadedFiles]="['http://example.com/path/to/my/file']" [class]="'customClass'" (removed)="onRemoved($event)" (uploadFinished)="onUploadFinished($event)" @@ -160,3 +163,4 @@ In the final state it should look something like this: @aberezkin @UncleDave +@sabrio diff --git a/docs/main.bundle.js b/docs/main.bundle.js index 17857f1..f6680f4 100644 --- a/docs/main.bundle.js +++ b/docs/main.bundle.js @@ -1 +1 @@ -webpackJsonp([1],{"+h1B":function(n,l,e){"use strict";var t=e("/oeL"),u=e("aR8+"),o=e("wQAS"),i=e("7KBz"),r=e("eZSU"),a=e("V4Zm"),d=e("q4dy"),s=e("qbdv"),p=e("fc+i"),c=e("CPp0"),g=e("ZYjr"),f=e("7fc5"),m=(e.n(f),e("b3v1")),h=e("BkNc"),v=e("gPcP"),b=(e.n(v),e("9tFb")),y=e("ia7S"),x=e("BKGc"),C=e("TbST"),F=e("XFJC");e.d(l,"a",function(){return A});var A=t["ɵcmf"](u.a,[o.a],function(n){return t["ɵmod"]([t["ɵmpd"](512,t.ComponentFactoryResolver,t["ɵCodegenComponentFactoryResolver"],[[8,[i.a,r.a,a.a,d.a]],[3,t.ComponentFactoryResolver],t.NgModuleRef]),t["ɵmpd"](5120,t.LOCALE_ID,t["ɵm"],[[3,t.LOCALE_ID]]),t["ɵmpd"](4608,s.NgLocalization,s.NgLocaleLocalization,[t.LOCALE_ID]),t["ɵmpd"](5120,t.APP_ID,t["ɵf"],[]),t["ɵmpd"](5120,t.IterableDiffers,t["ɵk"],[]),t["ɵmpd"](5120,t.KeyValueDiffers,t["ɵl"],[]),t["ɵmpd"](4608,p.b,p.c,[p.d]),t["ɵmpd"](6144,t.Sanitizer,null,[p.b]),t["ɵmpd"](4608,p.e,p.f,[]),t["ɵmpd"](5120,p.g,function(n,l,e,t){return[new p.h(n),new p.i(l),new p.j(e,t)]},[p.d,p.d,p.d,p.e]),t["ɵmpd"](4608,p.k,p.k,[p.g,t.NgZone]),t["ɵmpd"](135680,p.l,p.l,[p.d]),t["ɵmpd"](4608,p.m,p.m,[p.k,p.l]),t["ɵmpd"](6144,t.RendererFactory2,null,[p.m]),t["ɵmpd"](6144,p.n,null,[p.l]),t["ɵmpd"](4608,t.Testability,t.Testability,[t.NgZone]),t["ɵmpd"](4608,p.o,p.o,[p.d]),t["ɵmpd"](4608,p.p,p.p,[p.d]),t["ɵmpd"](4608,c.BrowserXhr,c.BrowserXhr,[]),t["ɵmpd"](4608,c.ResponseOptions,c.BaseResponseOptions,[]),t["ɵmpd"](5120,c.XSRFStrategy,c["ɵb"],[]),t["ɵmpd"](4608,c.XHRBackend,c.XHRBackend,[c.BrowserXhr,c.ResponseOptions,c.XSRFStrategy]),t["ɵmpd"](4608,c.RequestOptions,c.BaseRequestOptions,[]),t["ɵmpd"](5120,c.Http,c["ɵc"],[c.XHRBackend,c.RequestOptions]),t["ɵmpd"](4608,g.a,g.a,[c.Http]),t["ɵmpd"](4608,f.ImageService,f.ImageService,[c.Http]),t["ɵmpd"](4608,m.a,m.a,[]),t["ɵmpd"](5120,h.a,h.b,[h.c]),t["ɵmpd"](4608,h.d,h.d,[]),t["ɵmpd"](6144,h.e,null,[h.d]),t["ɵmpd"](135680,h.f,h.f,[h.c,t.NgModuleFactoryLoader,t.Compiler,t.Injector,h.e]),t["ɵmpd"](4608,h.g,h.g,[]),t["ɵmpd"](5120,h.h,h.i,[h.j]),t["ɵmpd"](5120,t.APP_BOOTSTRAP_LISTENER,function(n){return[n]},[h.h]),t["ɵmpd"](512,s.CommonModule,s.CommonModule,[]),t["ɵmpd"](1024,t.ErrorHandler,p.q,[]),t["ɵmpd"](1024,t.NgProbeToken,function(){return[h.k()]},[]),t["ɵmpd"](512,h.j,h.j,[t.Injector]),t["ɵmpd"](1024,t.APP_INITIALIZER,function(n,l,e){return[p.r(n,l),h.l(e)]},[[2,p.s],[2,t.NgProbeToken],h.j]),t["ɵmpd"](512,t.ApplicationInitStatus,t.ApplicationInitStatus,[[2,t.APP_INITIALIZER]]),t["ɵmpd"](131584,t["ɵe"],t["ɵe"],[t.NgZone,t["ɵConsole"],t.Injector,t.ErrorHandler,t.ComponentFactoryResolver,t.ApplicationInitStatus]),t["ɵmpd"](2048,t.ApplicationRef,null,[t["ɵe"]]),t["ɵmpd"](512,t.ApplicationModule,t.ApplicationModule,[t.ApplicationRef]),t["ɵmpd"](512,p.t,p.t,[[3,p.t]]),t["ɵmpd"](512,c.HttpModule,c.HttpModule,[]),t["ɵmpd"](512,v.ImageUploadModule,v.ImageUploadModule,[]),t["ɵmpd"](512,b.a,b.a,[]),t["ɵmpd"](512,y.a,y.a,[]),t["ɵmpd"](512,x.a,x.a,[]),t["ɵmpd"](1024,h.m,h.n,[[3,h.c]]),t["ɵmpd"](512,h.o,h.p,[]),t["ɵmpd"](512,h.q,h.q,[]),t["ɵmpd"](256,h.r,{useHash:!0},[]),t["ɵmpd"](1024,s.LocationStrategy,h.s,[s.PlatformLocation,[2,s.APP_BASE_HREF],h.r]),t["ɵmpd"](512,s.Location,s.Location,[s.LocationStrategy]),t["ɵmpd"](512,t.Compiler,t.Compiler,[]),t["ɵmpd"](512,t.NgModuleFactoryLoader,t.SystemJsNgModuleLoader,[t.Compiler,[2,t.SystemJsNgModuleLoaderConfig]]),t["ɵmpd"](1024,h.t,function(){return[[{path:"",redirectTo:"demo",pathMatch:"prefix"},{path:"demo",component:C.a},{path:"readme",component:F.a}]]},[]),t["ɵmpd"](1024,h.c,h.u,[t.ApplicationRef,h.o,h.q,s.Location,t.Injector,t.NgModuleFactoryLoader,t.Compiler,h.t,h.r,[2,h.v],[2,h.w]]),t["ɵmpd"](512,h.x,h.x,[[2,h.m],[2,h.c]]),t["ɵmpd"](512,u.a,u.a,[])])})},"0MSm":function(n,l,e){"use strict";e.d(l,"a",function(){return t});var t=function(){function n(){}return n}()},1:function(n,l,e){n.exports=e("cDNt")},"1tl3":function(n,l,e){"use strict";var t=this&&this.__awaiter||function(n,l,e,t){return new(e||(e=Promise))(function(u,o){function i(n){try{a(t.next(n))}catch(n){o(n)}}function r(n){try{a(t.throw(n))}catch(n){o(n)}}function a(n){n.done?u(n.value):new e(function(l){l(n.value)}).then(i,r)}a((t=t.apply(n,l||[])).next())})},u=this&&this.__generator||function(n,l){function e(n){return function(l){return t([n,l])}}function t(e){if(u)throw new TypeError("Generator is already executing.");for(;r;)try{if(u=1,o&&(i=o[2&e[0]?"return":e[0]?"throw":"next"])&&!(i=i.call(o,e[1])).done)return i;switch(o=0,i&&(e=[0,i.value]),e[0]){case 0:case 1:i=e;break;case 4:return r.label++,{value:e[1],done:!1};case 5:r.label++,o=e[1],e=[0];continue;case 7:e=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(6===e[0]||2===e[0])){r=0;continue}if(3===e[0]&&(!i||e[1]>i[0]&&e[1]l?l:n.length;this.url&&0!=e&&this.uploadStateChanged.emit(!0),this.fileCounter+=e,this.showFileTooLargeMessage=!1,this.uploadFiles(n,e)},n.prototype.onResponse=function(n,l){l.serverResponse=n,l.pending=!1,this.uploadFinished.emit(l),0==--this.pendingFilesCounter&&this.uploadStateChanged.emit(!1)},n.prototype.uploadFiles=function(n,l){return t(this,void 0,void 0,function(){var e,t,o,i=this;return u(this,function(a){switch(a.label){case 0:e=function(l){var e,o,a,d;return u(this,function(u){switch(u.label){case 0:return e=n[l],t.maxFileSize&&e.size>t.maxFileSize?(t.fileCounter--,t.inputElement.nativeElement.value="",t.showFileTooLargeMessage=!0,[2,"continue"]):[4,t.beforeUpload({file:e,url:t.url,abort:!1})];case 1:return o=u.sent(),o.abort?(t.fileCounter--,t.inputElement.nativeElement.value="",[2,"continue"]):(a=document.createElement("img"),a.src=window.URL.createObjectURL(o.file),d=new FileReader,d.addEventListener("load",function(n){var l=new r(n.target.result,o.file);i.uploadSingleFile(l,o.url,o.formData),i.files.push(l)},!1),d.readAsDataURL(o.file),[2])}})},t=this,o=0,a.label=1;case 1:return o\n
\n \n \n
\n
\n\n

\n\n
\n \n
\n
\n
\n
\n \n
\n
\n \n \n ',styles:["\n .img-ul {\n --active-color: #3C9;\n --common-radius: 3px;\n background-color: #f8f8f8;\n border-radius: var(--common-radius);\n border: #d0d0d0 dashed 1px;\n font-family: sans-serif;\n position: relative;\n color: #9b9b9b;\n }\n\n .img-ul-file-is-over {\n border: var(--active-color) solid;\n }\n\n .img-ul-hr-inline-group:after {\n clear: both;\n content: \"\";\n display: table;\n }\n\n .img-ul-file-upload { \n padding: 16px;\n }\n\n .img-ul-drag-box-msg { \n display: inline-block;\n font-weight: 600;\n margin-left: 12px;\n padding-top: 14px;\n }\n\n label.img-ul-button input[type=file] {\n display: none;\n position: fixed;\n top: -99999px;\n }\n\n .img-ul-clear {\n background-color: #FF0000;\n }\n\n .img-ul-upload {\n background-color: var(--active-color);\n }\n\n .img-ul-button {\n -moz-box-shadow: 2px 2px 4px 0 rgba(148, 148, 148, 0.6);\n -webkit-box-shadow: 2px 2px 4px 0 rgba(148, 148, 148, 0.6);\n box-shadow: 2px 2px 4px 0 rgba(148, 148, 148, 0.6);\n color: #FFF;\n cursor: pointer;\n display: inline-block;\n float: left;\n font-size: 1.25em;\n font-weight: 500;\n padding: 10px;\n text-transform: uppercase;\n }\n\n .img-ul-button:active span {\n display: block;\n position: relative;\n top: 1px;\n }\n\n .img-ul-container {\n background-color: #fdfdfd;\n padding: 0 10px;\n }\n\n .img-ul-image { \n background: center center no-repeat;\n background-size: contain;\n display: inline-block;\n float: left;\n height: 86px;\n margin: 6px;\n position: relative;\n width: 86px;\n }\n\n .img-ul-x-mark {\n background-color: #000;\n border-radius: 2px;\n color: #FFF;\n cursor: pointer;\n float: right;\n height: 20px;\n margin: 2px;\n opacity: .7;\n text-align: center;\n width: 20px;\n }\n\n .img-ul-close {\n height: 20px;\n opacity: .7;\n padding-right: 3px;\n position: relative;\n width: 20px;\n }\n\n .img-ul-x-mark:hover .img-ul-close {\n opacity: 1;\n }\n\n .img-ul-close:before, .img-ul-close:after {\n background-color: #FFF;\n border-radius: 2px;\n content: '';\n height: 15px;\n position: absolute;\n top: 0;\n width: 2px;\n }\n\n .img-ul-close:before {\n transform: rotate(45deg);\n }\n\n .img-ul-close:after {\n transform: rotate(-45deg);\n }\n\n .img-ul-loading-overlay {\n background-color: #000;\n bottom: 0;\n left: 0;\n opacity: .7;\n position: absolute;\n right: 0;\n top: 0;\n }\n\n .img-ul-spinning-circle {\n height: 30px;\n width: 30px;\n margin: auto;\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n border-radius: 50%;\n border: 3px solid rgba(255, 255, 255, 0);\n border-top: 3px solid #FFF;\n border-right: 3px solid #FFF;\n -webkit-animation: spinner 2s infinite cubic-bezier(0.085, 0.625, 0.855, 0.360);\n animation: spinner 2s infinite cubic-bezier(0.085, 0.625, 0.855, 0.360);\n }\n\n .img-ul-file-too-large {\n color: red;\n padding: 0 15px;\n }\n\n @-webkit-keyframes spinner {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n }\n\n @keyframes spinner {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n }\n "]}]}],a.ctorParameters=function(){return[{type:i.ImageService}]},a.propDecorators={beforeUpload:[{type:o.Input}],buttonCaption:[{type:o.Input}],cssClass:[{type:o.Input,args:["class"]}],clearButtonCaption:[{type:o.Input}],dropBoxMessage:[{type:o.Input}],fileTooLargeMessage:[{type:o.Input}],headers:[{type:o.Input}],max:[{type:o.Input}],maxFileSize:[{type:o.Input}],preview:[{type:o.Input}],partName:[{type:o.Input}],style:[{type:o.Input}],supportedExtensions:[{type:o.Input,args:["extensions"]}],url:[{type:o.Input}],withCredentials:[{type:o.Input}],removed:[{type:o.Output}],uploadStateChanged:[{type:o.Output}],uploadFinished:[{type:o.Output}],inputElement:[{type:o.ViewChild,args:["input"]}]},l.ImageUploadComponent=a},"3cdd":function(n,l,e){"use strict";function t(n){return p["ɵvid"](0,[(n()(),p["ɵeld"](0,null,null,4,"label",[["class","img-ul-clear img-ul-button"]],null,[[null,"click"]],function(n,l,e){var t=!0,u=n.component;if("click"===l){t=!1!==u.deleteAll()&&t}return t},null,null)),p["ɵdid"](278528,null,0,c.NgStyle,[p.KeyValueDiffers,p.ElementRef,p.Renderer],{ngStyle:[0,"ngStyle"]},null),(n()(),p["ɵted"](null,["\n "])),(n()(),p["ɵeld"](0,null,null,0,"span",[],[[8,"innerText",0]],null,null,null,null)),(n()(),p["ɵted"](null,["\n "]))],function(n,l){var e=l.component;n(l,1,0,null==e.style?null:e.style.clearButton)},function(n,l){n(l,3,0,l.component.clearButtonCaption)})}function u(n){return p["ɵvid"](0,[(n()(),p["ɵeld"](0,null,null,0,"p",[["class","img-ul-file-too-large"]],[[8,"innerText",0]],null,null,null,null))],null,function(n,l){n(l,0,0,l.component.fileTooLargeMessage)})}function o(n){return p["ɵvid"](0,[(n()(),p["ɵeld"](0,null,null,3,"div",[["class","img-ul-loading-overlay"]],null,null,null,null,null)),(n()(),p["ɵted"](null,["\n "])),(n()(),p["ɵeld"](0,null,null,0,"div",[["class","img-ul-spinning-circle"]],null,null,null,null,null)),(n()(),p["ɵted"](null,["\n "]))],null,null)}function i(n){return p["ɵvid"](0,[(n()(),p["ɵeld"](0,null,null,3,"div",[["class","img-ul-x-mark"]],null,[[null,"click"]],function(n,l,e){var t=!0,u=n.component;if("click"===l){t=!1!==u.deleteFile(n.parent.context.$implicit)&&t}return t},null,null)),(n()(),p["ɵted"](null,["\n "])),(n()(),p["ɵeld"](0,null,null,0,"span",[["class","img-ul-close"]],null,null,null,null,null)),(n()(),p["ɵted"](null,["\n "]))],null,null)}function r(n){return p["ɵvid"](0,[(n()(),p["ɵeld"](0,null,null,9,"div",[["class","img-ul-image"]],null,null,null,null,null)),p["ɵdid"](278528,null,0,c.NgStyle,[p.KeyValueDiffers,p.ElementRef,p.Renderer],{ngStyle:[0,"ngStyle"]},null),p["ɵpod"](["background-image"]),(n()(),p["ɵted"](null,["\n "])),(n()(),p["ɵand"](16777216,null,null,1,null,o)),p["ɵdid"](16384,null,0,c.NgIf,[p.ViewContainerRef,p.TemplateRef],{ngIf:[0,"ngIf"]},null),(n()(),p["ɵted"](null,["\n "])),(n()(),p["ɵand"](16777216,null,null,1,null,i)),p["ɵdid"](16384,null,0,c.NgIf,[p.ViewContainerRef,p.TemplateRef],{ngIf:[0,"ngIf"]},null),(n()(),p["ɵted"](null,["\n "]))],function(n,l){n(l,1,0,n(l,2,0,"url("+l.context.$implicit.src+")")),n(l,5,0,l.context.$implicit.pending),n(l,8,0,!l.context.$implicit.pending)},null)}function a(n){return p["ɵvid"](0,[(n()(),p["ɵeld"](0,null,null,5,"div",[["class","img-ul-container img-ul-hr-inline-group"]],null,null,null,null,null)),p["ɵdid"](278528,null,0,c.NgStyle,[p.KeyValueDiffers,p.ElementRef,p.Renderer],{ngStyle:[0,"ngStyle"]},null),(n()(),p["ɵted"](null,["\n "])),(n()(),p["ɵand"](16777216,null,null,1,null,r)),p["ɵdid"](802816,null,0,c.NgForOf,[p.ViewContainerRef,p.TemplateRef,p.IterableDiffers],{ngForOf:[0,"ngForOf"]},null),(n()(),p["ɵted"](null,["\n "]))],function(n,l){var e=l.component;n(l,1,0,null==e.style?null:e.style.previewPanel),n(l,4,0,e.files)},null)}function d(n){return p["ɵvid"](0,[p["ɵqud"](402653184,1,{inputElement:0}),(n()(),p["ɵted"](null,["\n "])),(n()(),p["ɵeld"](0,null,null,26,"div",[["fileDrop",""]],null,[[null,"fileOver"],[null,"fileDrop"],[null,"drop"],[null,"dragleave"],[null,"dragover"]],function(n,l,e){var t=!0,u=n.component;if("drop"===l){t=!1!==p["ɵnov"](n,5).onDrop(e)&&t}if("dragleave"===l){t=!1!==p["ɵnov"](n,5).onDragLeave(e)&&t}if("dragover"===l){t=!1!==p["ɵnov"](n,5).onDragOver(e)&&t}if("fileOver"===l){t=!1!==u.onFileOver(e)&&t}if("fileDrop"===l){t=!1!==u.onFileChange(e)&&t}return t},null,null)),p["ɵdid"](278528,null,0,c.NgClass,[p.IterableDiffers,p.KeyValueDiffers,p.ElementRef,p.Renderer],{ngClass:[0,"ngClass"]},null),p["ɵdid"](278528,null,0,c.NgStyle,[p.KeyValueDiffers,p.ElementRef,p.Renderer],{ngStyle:[0,"ngStyle"]},null),p["ɵdid"](16384,null,0,f.FileDropDirective,[],{accept:[0,"accept"]},{fileOver:"fileOver",fileDrop:"fileDrop"}),(n()(),p["ɵted"](null,["\n "])),(n()(),p["ɵeld"](0,null,null,14,"div",[["class","img-ul-file-upload img-ul-hr-inline-group"]],null,null,null,null,null)),(n()(),p["ɵted"](null,[" \n "])),(n()(),p["ɵeld"](0,null,null,6,"label",[["class","img-ul-upload img-ul-button"]],null,null,null,null,null)),p["ɵdid"](278528,null,0,c.NgStyle,[p.KeyValueDiffers,p.ElementRef,p.Renderer],{ngStyle:[0,"ngStyle"]},null),(n()(),p["ɵted"](null,["\n "])),(n()(),p["ɵeld"](0,null,null,0,"span",[],[[8,"innerText",0]],null,null,null,null)),(n()(),p["ɵted"](null,["\n "])),(n()(),p["ɵeld"](0,[[1,0],["input",1]],null,0,"input",[["multiple",""],["type","file"]],[[8,"accept",0]],[[null,"change"]],function(n,l,e){var t=!0,u=n.component;if("change"===l){t=!1!==u.onFileChange(p["ɵnov"](n,14).files)&&t}return t},null,null)),(n()(),p["ɵted"](null,["\n "])),(n()(),p["ɵted"](null,["\n "])),(n()(),p["ɵand"](16777216,null,null,1,null,t)),p["ɵdid"](16384,null,0,c.NgIf,[p.ViewContainerRef,p.TemplateRef],{ngIf:[0,"ngIf"]},null),(n()(),p["ɵted"](null,["\n "])),(n()(),p["ɵeld"](0,null,null,0,"div",[["class","img-ul-drag-box-msg"]],[[8,"innerText",0]],null,null,null,null)),(n()(),p["ɵted"](null,["\n "])),(n()(),p["ɵted"](null,["\n\n "])),(n()(),p["ɵand"](16777216,null,null,1,null,u)),p["ɵdid"](16384,null,0,c.NgIf,[p.ViewContainerRef,p.TemplateRef],{ngIf:[0,"ngIf"]},null),(n()(),p["ɵted"](null,["\n\n "])),(n()(),p["ɵand"](16777216,null,null,1,null,a)),p["ɵdid"](16384,null,0,c.NgIf,[p.ViewContainerRef,p.TemplateRef],{ngIf:[0,"ngIf"]},null),(n()(),p["ɵted"](null,["\n "])),(n()(),p["ɵted"](null,["\n "]))],function(n,l){var e=l.component;n(l,3,0,e.cssClass),n(l,4,0,null==e.style?null:e.style.layout),n(l,5,0,e.supportedExtensions),n(l,10,0,null==e.style?null:e.style.selectButton),n(l,18,0,e.fileCounter>0),n(l,24,0,e.showFileTooLargeMessage),n(l,27,0,e.preview)},function(n,l){var e=l.component;n(l,12,0,e.buttonCaption),n(l,14,0,e.supportedExtensions),n(l,20,0,e.dropBoxMessage)})}function s(n){return p["ɵvid"](0,[(n()(),p["ɵeld"](0,null,null,1,"image-upload",[],null,null,null,d,v)),p["ɵdid"](114688,null,0,g.ImageUploadComponent,[m.ImageService],null,null)],function(n,l){n(l,1,0)},null)}var p=e("/oeL"),c=e("qbdv"),g=e("1tl3"),f=(e.n(g),e("EilG")),m=(e.n(f),e("7fc5"));e.n(m);e.d(l,"b",function(){return v}),l.a=d;var h=[".img-ul[_ngcontent-%COMP%] {\n --active-color: #3C9;\n --common-radius: 3px;\n background-color: #f8f8f8;\n border-radius: var(--common-radius);\n border: #d0d0d0 dashed 1px;\n font-family: sans-serif;\n position: relative;\n color: #9b9b9b;\n }\n\n .img-ul-file-is-over[_ngcontent-%COMP%] {\n border: var(--active-color) solid;\n }\n\n .img-ul-hr-inline-group[_ngcontent-%COMP%]:after {\n clear: both;\n content: \"\";\n display: table;\n }\n\n .img-ul-file-upload[_ngcontent-%COMP%] { \n padding: 16px;\n }\n\n .img-ul-drag-box-msg[_ngcontent-%COMP%] { \n display: inline-block;\n font-weight: 600;\n margin-left: 12px;\n padding-top: 14px;\n }\n\n label.img-ul-button[_ngcontent-%COMP%] input[type=file][_ngcontent-%COMP%] {\n display: none;\n position: fixed;\n top: -99999px;\n }\n\n .img-ul-clear[_ngcontent-%COMP%] {\n background-color: #FF0000;\n }\n\n .img-ul-upload[_ngcontent-%COMP%] {\n background-color: var(--active-color);\n }\n\n .img-ul-button[_ngcontent-%COMP%] {\n -moz-box-shadow: 2px 2px 4px 0 rgba(148, 148, 148, 0.6);\n -webkit-box-shadow: 2px 2px 4px 0 rgba(148, 148, 148, 0.6);\n box-shadow: 2px 2px 4px 0 rgba(148, 148, 148, 0.6);\n color: #FFF;\n cursor: pointer;\n display: inline-block;\n float: left;\n font-size: 1.25em;\n font-weight: 500;\n padding: 10px;\n text-transform: uppercase;\n }\n\n .img-ul-button[_ngcontent-%COMP%]:active span[_ngcontent-%COMP%] {\n display: block;\n position: relative;\n top: 1px;\n }\n\n .img-ul-container[_ngcontent-%COMP%] {\n background-color: #fdfdfd;\n padding: 0 10px;\n }\n\n .img-ul-image[_ngcontent-%COMP%] { \n background: center center no-repeat;\n background-size: contain;\n display: inline-block;\n float: left;\n height: 86px;\n margin: 6px;\n position: relative;\n width: 86px;\n }\n\n .img-ul-x-mark[_ngcontent-%COMP%] {\n background-color: #000;\n border-radius: 2px;\n color: #FFF;\n cursor: pointer;\n float: right;\n height: 20px;\n margin: 2px;\n opacity: .7;\n text-align: center;\n width: 20px;\n }\n\n .img-ul-close[_ngcontent-%COMP%] {\n height: 20px;\n opacity: .7;\n padding-right: 3px;\n position: relative;\n width: 20px;\n }\n\n .img-ul-x-mark[_ngcontent-%COMP%]:hover .img-ul-close[_ngcontent-%COMP%] {\n opacity: 1;\n }\n\n .img-ul-close[_ngcontent-%COMP%]:before, .img-ul-close[_ngcontent-%COMP%]:after {\n background-color: #FFF;\n border-radius: 2px;\n content: '';\n height: 15px;\n position: absolute;\n top: 0;\n width: 2px;\n }\n\n .img-ul-close[_ngcontent-%COMP%]:before {\n transform: rotate(45deg);\n }\n\n .img-ul-close[_ngcontent-%COMP%]:after {\n transform: rotate(-45deg);\n }\n\n .img-ul-loading-overlay[_ngcontent-%COMP%] {\n background-color: #000;\n bottom: 0;\n left: 0;\n opacity: .7;\n position: absolute;\n right: 0;\n top: 0;\n }\n\n .img-ul-spinning-circle[_ngcontent-%COMP%] {\n height: 30px;\n width: 30px;\n margin: auto;\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n border-radius: 50%;\n border: 3px solid rgba(255, 255, 255, 0);\n border-top: 3px solid #FFF;\n border-right: 3px solid #FFF;\n -webkit-animation: spinner 2s infinite cubic-bezier(0.085, 0.625, 0.855, 0.360);\n animation: spinner 2s infinite cubic-bezier(0.085, 0.625, 0.855, 0.360);\n }\n\n .img-ul-file-too-large[_ngcontent-%COMP%] {\n color: red;\n padding: 0 15px;\n }\n\n @-webkit-keyframes spinner {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n }\n\n @keyframes spinner {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n }"],v=p["ɵcrt"]({encapsulation:0,styles:h,data:{}});p["ɵccf"]("image-upload",g.ImageUploadComponent,s,{beforeUpload:"beforeUpload",buttonCaption:"buttonCaption",cssClass:"class",clearButtonCaption:"clearButtonCaption",dropBoxMessage:"dropBoxMessage",fileTooLargeMessage:"fileTooLargeMessage",headers:"headers",max:"max",maxFileSize:"maxFileSize",preview:"preview",partName:"partName",style:"style",supportedExtensions:"extensions",url:"url",withCredentials:"withCredentials"},{removed:"removed",uploadStateChanged:"uploadStateChanged",uploadFinished:"uploadFinished"},[])},"7fc5":function(n,l,e){"use strict";var t=e("/oeL"),u=e("CPp0"),o=function(){function n(n){this.http=n}return n.prototype.postImage=function(n,l,e,t,o,i){if(void 0===t&&(t="image"),!n||""===n)throw new Error("Url is not set! Please set it before doing queries");var r=new u.RequestOptions;i&&(r.withCredentials=i),e&&(r.headers=new u.Headers(e));var a=new FormData;for(var d in o)a.append(d,o[d]);return a.append(t,l),this.http.post(n,a,r)},n}();o.decorators=[{type:t.Injectable}],o.ctorParameters=function(){return[{type:u.Http}]},l.ImageService=o},"9tFb":function(n,l,e){"use strict";e.d(l,"a",function(){return t});var t=function(){function n(){}return n}()},BKGc:function(n,l,e){"use strict";e.d(l,"a",function(){return t});var t=function(){function n(){}return n}()},EilG:function(n,l,e){"use strict";var t=e("/oeL"),u=function(){function n(){this.fileOver=new t.EventEmitter,this.fileDrop=new t.EventEmitter}return n.prototype.onDrop=function(l){var e=n.getDataTransfer(l);if(n.hasFiles(e.types)){l.preventDefault();var t=this.filterFiles(e.files);l.preventDefault(),this.fileOver.emit(!1),this.fileDrop.emit(t)}},n.prototype.onDragLeave=function(n){this.fileOver.emit(!1)},n.prototype.onDragOver=function(l){var e=n.getDataTransfer(l);n.hasFiles(e.types)&&(e.dropEffect="copy",l.preventDefault(),this.fileOver.emit(!0))},n.prototype.filterFiles=function(l){if(!this.accept||0===this.accept.length)return l;for(var e=[],t=0;t\n'])),(n()(),o["ɵted"](null,["\n"]))],function(n,l){n(l,4,0,"PRESS ME AAAAAAAAAH","CLEAR ME AAAAAAAAAH","DROP ON ME AAAAAAAAAH","https://httpbin.org/status/200")},null)}function u(n){return o["ɵvid"](0,[(n()(),o["ɵeld"](0,null,null,1,"customise",[],null,null,null,t,p)),o["ɵdid"](49152,null,0,d.a,[],null,null)],null,null)}var o=e("/oeL"),i=e("3cdd"),r=e("1tl3"),a=(e.n(r),e("7fc5")),d=(e.n(a),e("0MSm"));e.d(l,"b",function(){return p}),l.a=t;var s=[],p=o["ɵcrt"]({encapsulation:2,styles:s,data:{}});o["ɵccf"]("customise",d.a,u,{},{},[])},HEjA:function(n,l,e){"use strict";function t(n){return o["ɵvid"](0,[(n()(),o["ɵeld"](0,null,null,1,"h4",[["class","mb-3 mt-5"]],null,null,null,null,null)),(n()(),o["ɵted"](null,["Styles"])),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,1,"h5",[["class","mb-3 mt-3"]],null,null,null,null,null)),(n()(),o["ɵted"](null,["Custom CSS Class"])),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,1,"image-upload",[["class","customClass"],["url","https://httpbin.org/status/200"]],null,null,null,i.a,i.b)),o["ɵdid"](114688,null,0,r.ImageUploadComponent,[a.ImageService],{cssClass:[0,"cssClass"],url:[1,"url"]},null),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,2,"pre",[],null,null,null,null,null)),(n()(),o["ɵeld"](0,null,null,1,"code",[["class","language-markup"]],null,null,null,null,null)),(n()(),o["ɵted"](null,[''])),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,2,"pre",[],null,null,null,null,null)),(n()(),o["ɵeld"](0,null,null,1,"code",[["class","language-css"]],null,null,null,null,null)),(n()(),o["ɵted"](null,[".customClass {\n background-color: #dd3;\n border-radius: 5px;\n margin:5px;\n width: 500px;\n}\n\n.customClass .img-ul-upload {\n background-color: #000 !important;\n}\n\n.customClass .img-ul-clear {\n background-color: #B819BB !important;\n}\n\n.customClass .img-ul-drag-box-msg {\n color: purple !important;\n}\n\n.customClass .img-ul-container {\n background-color: #FF6CAD !important;\n}\n"])),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,1,"h5",[["class","mb-3 mt-3"]],null,null,null,null,null)),(n()(),o["ɵted"](null,["Custom Style"])),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,1,"image-upload",[["url","https://httpbin.org/status/200"]],null,null,null,i.a,i.b)),o["ɵdid"](114688,null,0,r.ImageUploadComponent,[a.ImageService],{style:[0,"style"],url:[1,"url"]},null),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,2,"pre",[],null,null,null,null,null)),(n()(),o["ɵeld"](0,null,null,1,"code",[["class","language-markup"]],null,null,null,null,null)),(n()(),o["ɵted"](null,[''])),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,2,"pre",[],null,null,null,null,null)),(n()(),o["ɵeld"](0,null,null,1,"code",[["class","language-typescript"]],null,null,null,null,null)),(n()(),o["ɵted"](null,['customStyle = {\n selectButton: {\n "background-color": "yellow",\n "border-radius": "25px",\n "color": "#000"\n },\n clearButton: {\n "background-color": "#FFF",\n "border-radius": "25px",\n "color": "#000",\n "margin-left": "10px"\n },\n layout: {\n "background-color": "purple",\n "border-radius": "25px",\n "color": "#FFF",\n "font-size": "15px",\n "margin": "10px",\n "padding-top": "5px",\n "width": "500px"\n },\n previewPanel: {\n "background-color": "#894489",\n "border-radius": "0 0 25px 25px",\n }\n }\n'])),(n()(),o["ɵted"](null,["\n"]))],function(n,l){var e=l.component;n(l,7,0,"customClass","https://httpbin.org/status/200");n(l,21,0,e.customStyle,"https://httpbin.org/status/200")},null)}function u(n){return o["ɵvid"](0,[(n()(),o["ɵeld"](0,null,null,1,"styles",[],null,null,null,t,p)),o["ɵdid"](49152,null,0,d.a,[],null,null)],null,null)}var o=e("/oeL"),i=e("3cdd"),r=e("1tl3"),a=(e.n(r),e("7fc5")),d=(e.n(a),e("Mm9d"));e.d(l,"b",function(){return p}),l.a=t;var s=[],p=o["ɵcrt"]({encapsulation:2,styles:s,data:{}});o["ɵccf"]("styles",d.a,u,{},{},[])},IMW7:function(n,l,e){"use strict";function t(n){return o["ɵvid"](0,[(n()(),o["ɵeld"](0,null,null,1,"h4",[["class","mb-3 mt-5"]],null,null,null,null,null)),(n()(),o["ɵted"](null,["Events"])),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,2,"image-upload",[["url","https://httpbin.org/status/200"]],null,[[null,"removed"],[null,"uploadFinished"],[null,"uploadStateChanged"]],function(n,l,e){var t=!0,u=n.component;if("removed"===l){t=!1!==u.onRemoved(e)&&t}if("uploadFinished"===l){t=!1!==u.onUploadFinished(e)&&t}if("uploadStateChanged"===l){t=!1!==u.onUploadStateChanged(e)&&t}return t},r.a,r.b)),o["ɵdid"](114688,null,0,a.ImageUploadComponent,[d.ImageService],{url:[0,"url"]},{removed:"removed",uploadStateChanged:"uploadStateChanged",uploadFinished:"uploadFinished"}),(n()(),o["ɵted"](null,["\n"])),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,2,"pre",[],null,null,null,null,null)),(n()(),o["ɵeld"](0,null,null,1,"code",[["class","language-markup"]],null,null,null,null,null)),(n()(),o["ɵted"](null,['\n'])),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,3,"pre",[],null,null,null,null,null)),(n()(),o["ɵeld"](0,null,null,2,"code",[["class","language-typescript"]],null,null,null,null,null)),(n()(),o["ɵted"](null,["imageFinishedUploading(file: FileHolder) {\n console.log(JSON.stringify(file.serverResponse));\n}\n\nonRemoved(file: FileHolder) {\n // do some stuff with the removed file.\n}\n\nonUploadStateChanged(state: boolean) {\n console.log(JSON.stringify(state));\n}"])),(n()(),o["ɵted"](null,["\n"])),(n()(),o["ɵted"](null,["\n"]))],function(n,l){n(l,4,0,"https://httpbin.org/status/200")},null)}function u(n){return o["ɵvid"](0,[(n()(),o["ɵeld"](0,null,null,1,"events",[],null,null,null,t,p)),o["ɵdid"](49152,null,0,i.a,[],null,null)],null,null)}var o=e("/oeL"),i=e("bsiH"),r=e("3cdd"),a=e("1tl3"),d=(e.n(a),e("7fc5"));e.n(d);e.d(l,"b",function(){return p}),l.a=t;var s=[],p=o["ɵcrt"]({encapsulation:2,styles:s,data:{}});o["ɵccf"]("events",i.a,u,{},{},[])},Mm9d:function(n,l,e){"use strict";e.d(l,"a",function(){return t});var t=function(){function n(){this.customStyle={selectButton:{"background-color":"yellow","border-radius":"25px",color:"#000"},clearButton:{"background-color":"#FFF","border-radius":"25px",color:"#000","margin-left":"10px"},layout:{"background-color":"purple","border-radius":"25px",border:"none",color:"#FFF","font-size":"15px",margin:"10px","padding-top":"5px",width:"500px"},previewPanel:{"background-color":"#894489","border-radius":"0 0 25px 25px"}}}return n}()},TbST:function(n,l,e){"use strict";var t=e("waH/");e.n(t);e.d(l,"a",function(){return u});var u=function(){function n(){}return n.prototype.ngOnInit=function(){t.highlightAll(!1)},n}()},V4Zm:function(n,l,e){"use strict";function t(n){return o["ɵvid"](0,[(n()(),o["ɵeld"](0,null,null,4,"div",[["class","container"]],null,null,null,null,null)),(n()(),o["ɵted"](null,["\n "])),(n()(),o["ɵeld"](0,null,null,1,"markdown",[["path","assets/readme.md"]],null,null,null,i.b,i.c)),o["ɵdid"](4308992,null,0,r.a,[a.a,o.ElementRef,d.Http],{path:[0,"path"]},null),(n()(),o["ɵted"](null,["\n"])),(n()(),o["ɵted"](null,["\n"]))],function(n,l){n(l,3,0,"assets/readme.md")},null)}function u(n){return o["ɵvid"](0,[(n()(),o["ɵeld"](0,null,null,1,"ng-component",[],null,null,null,t,c)),o["ɵdid"](49152,null,0,s.a,[],null,null)],null,null)}var o=e("/oeL"),i=e("7KBz"),r=e("GnS5"),a=e("ZYjr"),d=e("CPp0"),s=e("XFJC");e.d(l,"a",function(){return g});var p=[],c=o["ɵcrt"]({encapsulation:2,styles:p,data:{}}),g=o["ɵccf"]("ng-component",s.a,u,{},{},[])},XFJC:function(n,l,e){"use strict";e.d(l,"a",function(){return t});var t=function(){function n(){}return n}()},"aR8+":function(n,l,e){"use strict";e.d(l,"a",function(){return t});var t=function(){function n(){}return n}()},bsiH:function(n,l,e){"use strict";e.d(l,"a",function(){return t});var t=function(){function n(){}return n.prototype.onUploadFinished=function(n){console.log(JSON.stringify(n.serverResponse))},n.prototype.onRemoved=function(n){},n.prototype.onUploadStateChanged=function(n){console.log(JSON.stringify(n))},n}()},cDNt:function(n,l,e){"use strict";Object.defineProperty(l,"__esModule",{value:!0});var t=e("/oeL"),u=e("waH/"),o=(e.n(u),e("tqEy")),i=(e.n(o),e("p5Ee")),r=e("+h1B"),a=e("fc+i");i.a.production&&e.i(t.enableProdMode)(),e.i(a.a)().bootstrapModuleFactory(r.a)},"eFT+":function(n,l,e){"use strict";function t(n){return o["ɵvid"](0,[(n()(),o["ɵeld"](0,null,null,1,"h4",[["class","mb-3 mt-3"]],null,null,null,null,null)),(n()(),o["ɵted"](null,["Basic Usage"])),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,1,"image-upload",[["url","https://httpbin.org/status/200"]],null,null,null,i.a,i.b)),o["ɵdid"](114688,null,0,r.ImageUploadComponent,[a.ImageService],{url:[0,"url"]},null),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,2,"pre",[],null,null,null,null,null)),(n()(),o["ɵeld"](0,null,null,1,"code",[["class","language-markup"]],null,null,null,null,null)),(n()(),o["ɵted"](null,[''])),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,1,"h5",[["class","mb-3 mt-3"]],null,null,null,null,null)),(n()(),o["ɵted"](null,["With headers"])),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,1,"image-upload",[["url","https://httpbin.org/status/200"]],null,null,null,i.a,i.b)),o["ɵdid"](114688,null,0,r.ImageUploadComponent,[a.ImageService],{headers:[0,"headers"],url:[1,"url"]},null),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,2,"pre",[],null,null,null,null,null)),(n()(),o["ɵeld"](0,null,null,1,"code",[["class","language-markup"]],null,null,null,null,null)),(n()(),o["ɵted"](null,[''])),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,3,"pre",[],null,null,null,null,null)),(n()(),o["ɵeld"](0,null,null,2,"code",[["class","language-typescript"]],null,null,null,null,null)),(n()(),o["ɵted"](null,["myHeaders: { [name: string]: any } = {\n 'Authorization': 'MyToken',\n 'Another Header': 'AnotherValue'\n};"])),(n()(),o["ɵted"](null,["\n"])),(n()(),o["ɵted"](null,["\n"]))],function(n,l){var e=l.component;n(l,4,0,"https://httpbin.org/status/200");n(l,14,0,e.myHeaders,"https://httpbin.org/status/200")},null)}function u(n){return o["ɵvid"](0,[(n()(),o["ɵeld"](0,null,null,1,"basic",[],null,null,null,t,p)),o["ɵdid"](49152,null,0,d.a,[],null,null)],null,null)}var o=e("/oeL"),i=e("3cdd"),r=e("1tl3"),a=(e.n(r),e("7fc5")),d=(e.n(a),e("Euw1"));e.d(l,"b",function(){return p}),l.a=t;var s=[],p=o["ɵcrt"]({encapsulation:2,styles:s,data:{}});o["ɵccf"]("basic",d.a,u,{},{},[])},eZSU:function(n,l,e){"use strict";function t(n){return o["ɵvid"](0,[(n()(),o["ɵeld"](0,null,null,16,"div",[["class","container mb-5"],["highlight-js-content",".highlight"]],null,null,null,null,null)),(n()(),o["ɵted"](null,["\n "])),(n()(),o["ɵeld"](0,null,null,1,"basic",[],null,null,null,i.a,i.b)),o["ɵdid"](49152,null,0,r.a,[],null,null),(n()(),o["ɵted"](null,["\n "])),(n()(),o["ɵeld"](0,null,null,1,"filter",[],null,null,null,a.a,a.b)),o["ɵdid"](49152,null,0,d.a,[],null,null),(n()(),o["ɵted"](null,["\n "])),(n()(),o["ɵeld"](0,null,null,1,"customise",[],null,null,null,s.a,s.b)),o["ɵdid"](49152,null,0,p.a,[],null,null),(n()(),o["ɵted"](null,["\n "])),(n()(),o["ɵeld"](0,null,null,1,"events",[],null,null,null,c.a,c.b)),o["ɵdid"](49152,null,0,g.a,[],null,null),(n()(),o["ɵted"](null,["\n "])),(n()(),o["ɵeld"](0,null,null,1,"styles",[],null,null,null,f.a,f.b)),o["ɵdid"](49152,null,0,m.a,[],null,null),(n()(),o["ɵted"](null,["\n"])),(n()(),o["ɵted"](null,["\n"]))],null,null)}function u(n){return o["ɵvid"](0,[(n()(),o["ɵeld"](0,null,null,1,"ng-component",[],null,null,null,t,b)),o["ɵdid"](114688,null,0,h.a,[],null,null)],function(n,l){n(l,1,0)},null)}var o=e("/oeL"),i=e("eFT+"),r=e("Euw1"),a=e("tHX5"),d=e("h5VB"),s=e("Go+w"),p=e("0MSm"),c=e("IMW7"),g=e("bsiH"),f=e("HEjA"),m=e("Mm9d"),h=e("TbST");e.d(l,"a",function(){return y});var v=[],b=o["ɵcrt"]({encapsulation:2,styles:v,data:{}}),y=o["ɵccf"]("ng-component",h.a,u,{},{},[])},gPcP:function(n,l,e){"use strict";var t=e("qbdv"),u=e("/oeL"),o=e("CPp0"),i=e("EilG"),r=e("1tl3"),a=e("7fc5"),d=function(){function n(){}return n.forRoot=function(){return{ngModule:n,providers:[a.ImageService]}},n}();d.decorators=[{type:u.NgModule,args:[{imports:[t.CommonModule,o.HttpModule],declarations:[r.ImageUploadComponent,i.FileDropDirective],exports:[r.ImageUploadComponent]}]}],d.ctorParameters=function(){return[]},l.ImageUploadModule=d},h5VB:function(n,l,e){"use strict";e.d(l,"a",function(){return t});var t=function(){function n(){var n=this;this.fileCounter=0,this.onBeforeUpload=function(l){return n.fileCounter%2==0?l.abort=!0:l.url="http://somewhereelse.com",n.fileCounter++,l}}return n}()},p5Ee:function(n,l,e){"use strict";e.d(l,"a",function(){return t});var t={production:!0}},q4dy:function(n,l,e){"use strict";function t(n){return o["ɵvid"](0,[(n()(),o["ɵeld"](0,null,null,4,"div",[["class","github-star-button"]],null,null,null,null,null)),(n()(),o["ɵted"](null,["\n "])),(n()(),o["ɵeld"](0,null,null,1,"a",[["aria-label","Star aberezkin/ng2-image-upload on GitHub"],["class","github-button"],["data-icon","octicon-star"],["data-show-count","true"],["data-size","large"],["href","https://github.com/aberezkin/ng2-image-upload"]],null,null,null,null,null)),(n()(),o["ɵted"](null,["Star"])),(n()(),o["ɵted"](null,["\n"])),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,7,"div",[["class","jumbotron jumbotron-fluid text-center"]],null,null,null,null,null)),(n()(),o["ɵted"](null,["\n "])),(n()(),o["ɵeld"](0,null,null,1,"h1",[["class","display-3"]],null,null,null,null,null)),(n()(),o["ɵted"](null,["\n Angular Image Upload\n "])),(n()(),o["ɵted"](null,["\n "])),(n()(),o["ɵeld"](0,null,null,1,"p",[["class","lead"]],null,null,null,null,null)),(n()(),o["ɵted"](null,["\n Angular component for image uploading\n "])),(n()(),o["ɵted"](null,["\n"])),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,24,"div",[["class","d-flex justify-content-center align-items-center mb-3"]],null,null,null,null,null)),(n()(),o["ɵted"](null,["\n "])),(n()(),o["ɵeld"](0,null,null,21,"ul",[["class","nav nav-pills"]],null,null,null,null,null)),(n()(),o["ɵted"](null,["\n "])),(n()(),o["ɵeld"](0,null,null,8,"li",[["class","nav-item"]],null,null,null,null,null)),(n()(),o["ɵted"](null,["\n "])),(n()(),o["ɵeld"](0,null,null,5,"a",[["class","nav-link"],["routerLink","demo"],["routerLinkActive","active"]],[[1,"target",0],[8,"href",4]],[[null,"click"]],function(n,l,e){var t=!0;if("click"===l){t=!1!==o["ɵnov"](n,22).onClick(e.button,e.ctrlKey,e.metaKey,e.shiftKey)&&t}return t},null,null)),o["ɵdid"](671744,[[2,4]],0,i.y,[i.c,i.a,r.LocationStrategy],{routerLink:[0,"routerLink"]},null),o["ɵdid"](1720320,null,2,i.z,[i.c,o.ElementRef,o.Renderer,o.ChangeDetectorRef],{routerLinkActive:[0,"routerLinkActive"]},null),o["ɵqud"](603979776,1,{links:1}),o["ɵqud"](603979776,2,{linksWithHrefs:1}),(n()(),o["ɵted"](null,["Demo"])),(n()(),o["ɵted"](null,["\n "])),(n()(),o["ɵted"](null,["\n "])),(n()(),o["ɵeld"](0,null,null,8,"li",[["class","nav-item"]],null,null,null,null,null)),(n()(),o["ɵted"](null,["\n "])),(n()(),o["ɵeld"](0,null,null,5,"a",[["class","nav-link"],["routerLink","readme"],["routerLinkActive","active"]],[[1,"target",0],[8,"href",4]],[[null,"click"]],function(n,l,e){var t=!0;if("click"===l){t=!1!==o["ɵnov"](n,32).onClick(e.button,e.ctrlKey,e.metaKey,e.shiftKey)&&t}return t},null,null)),o["ɵdid"](671744,[[4,4]],0,i.y,[i.c,i.a,r.LocationStrategy],{routerLink:[0,"routerLink"]},null),o["ɵdid"](1720320,null,2,i.z,[i.c,o.ElementRef,o.Renderer,o.ChangeDetectorRef],{routerLinkActive:[0,"routerLinkActive"]},null),o["ɵqud"](603979776,3,{links:1}),o["ɵqud"](603979776,4,{linksWithHrefs:1}),(n()(),o["ɵted"](null,["Readme"])),(n()(),o["ɵted"](null,["\n "])),(n()(),o["ɵted"](null,["\n "])),(n()(),o["ɵted"](null,["\n"])),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](16777216,null,null,1,"router-outlet",[],null,null,null,null,null)),o["ɵdid"](212992,null,0,i.A,[i.q,o.ViewContainerRef,o.ComponentFactoryResolver,[8,null],o.ChangeDetectorRef],null,null),(n()(),o["ɵted"](null,["\n"]))],function(n,l){n(l,22,0,"demo");n(l,23,0,"active");n(l,32,0,"readme");n(l,33,0,"active"),n(l,42,0)},function(n,l){n(l,21,0,o["ɵnov"](l,22).target,o["ɵnov"](l,22).href),n(l,31,0,o["ɵnov"](l,32).target,o["ɵnov"](l,32).href)})}function u(n){return o["ɵvid"](0,[(n()(),o["ɵeld"](0,null,null,1,"app-root",[],null,null,null,t,s)),o["ɵdid"](49152,null,0,a.a,[],null,null)],null,null)}var o=e("/oeL"),i=e("BkNc"),r=e("qbdv"),a=e("wQAS");e.d(l,"a",function(){return p});var d=[],s=o["ɵcrt"]({encapsulation:2,styles:d,data:{}}),p=o["ɵccf"]("app-root",a.a,u,{},{},[])},qtrl:function(n,l){function e(n){throw new Error("Cannot find module '"+n+"'.")}e.keys=function(){return[]},e.resolve=e,n.exports=e,e.id="qtrl"},tHX5:function(n,l,e){"use strict";function t(n){return o["ɵvid"](0,[(n()(),o["ɵeld"](0,null,null,1,"h4",[["class","mb-3 mt-5"]],null,null,null,null,null)),(n()(),o["ɵted"](null,["Limit and filter images"])),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,2,"image-upload",[["url","https://httpbin.org/status/200"]],null,null,null,i.a,i.b)),o["ɵdid"](114688,null,0,r.ImageUploadComponent,[a.ImageService],{max:[0,"max"],supportedExtensions:[1,"supportedExtensions"],url:[2,"url"]},null),o["ɵpad"](2),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,2,"pre",[],null,null,null,null,null)),(n()(),o["ɵeld"](0,null,null,1,"code",[["class","language-markup"]],null,null,null,null,null)),(n()(),o["ɵted"](null,[''])),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,1,"h5",[["class","mb-3 mt-3"]],null,null,null,null,null)),(n()(),o["ɵted"](null,["Manual filtering and editing"])),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,1,"image-upload",[["url","https://httpbin.org/status/200"]],null,null,null,i.a,i.b)),o["ɵdid"](114688,null,0,r.ImageUploadComponent,[a.ImageService],{beforeUpload:[0,"beforeUpload"],url:[1,"url"]},null),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,2,"pre",[],null,null,null,null,null)),(n()(),o["ɵeld"](0,null,null,1,"code",[["class","language-markup"]],null,null,null,null,null)),(n()(),o["ɵted"](null,[''])),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,2,"pre",[],null,null,null,null,null)),(n()(),o["ɵeld"](0,null,null,1,"code",[["class","language-typescript"]],null,null,null,null,null)),(n()(),o["ɵted"](null,["private fileCounter = 0;\n\nonBeforeUpload = (metadata: UploadMetadata) => {\n if (this.fileCounter % 2 === 0) {\n metadata.abort = true;\n } else {\n // mutate the file or replace it entirely - metadata.file\n metadata.url = 'http://somewhereelse.com'\n }\n\n this.fileCounter++;\n return metadata;\n};"])),(n()(),o["ɵted"](null,["\n"]))],function(n,l){var e=l.component;n(l,4,0,2,n(l,5,0,"jpeg","png"),"https://httpbin.org/status/200");n(l,15,0,e.onBeforeUpload,"https://httpbin.org/status/200")},null)}function u(n){return o["ɵvid"](0,[(n()(),o["ɵeld"](0,null,null,1,"filter",[],null,null,null,t,p)),o["ɵdid"](49152,null,0,d.a,[],null,null)],null,null)}var o=e("/oeL"),i=e("3cdd"),r=e("1tl3"),a=(e.n(r),e("7fc5")),d=(e.n(a),e("h5VB"));e.d(l,"b",function(){return p}),l.a=t;var s=[],p=o["ɵcrt"]({encapsulation:2,styles:s,data:{}});o["ɵccf"]("filter",d.a,u,{},{},[])},wQAS:function(n,l,e){"use strict";e.d(l,"a",function(){return t});var t=function(){function n(){}return n}()}},[1]); \ No newline at end of file +webpackJsonp([1],{"+h1B":function(n,l,e){"use strict";var t=e("/oeL"),u=e("aR8+"),o=e("wQAS"),i=e("7KBz"),r=e("eZSU"),a=e("V4Zm"),d=e("q4dy"),s=e("qbdv"),p=e("fc+i"),c=e("CPp0"),g=e("ZYjr"),m=e("7fc5"),f=(e.n(m),e("b3v1")),h=e("BkNc"),v=e("gPcP"),b=(e.n(v),e("9tFb")),y=e("ia7S"),x=e("BKGc"),C=e("TbST"),F=e("XFJC");e.d(l,"a",function(){return A});var A=t["ɵcmf"](u.a,[o.a],function(n){return t["ɵmod"]([t["ɵmpd"](512,t.ComponentFactoryResolver,t["ɵCodegenComponentFactoryResolver"],[[8,[i.a,r.a,a.a,d.a]],[3,t.ComponentFactoryResolver],t.NgModuleRef]),t["ɵmpd"](5120,t.LOCALE_ID,t["ɵm"],[[3,t.LOCALE_ID]]),t["ɵmpd"](4608,s.NgLocalization,s.NgLocaleLocalization,[t.LOCALE_ID]),t["ɵmpd"](5120,t.APP_ID,t["ɵf"],[]),t["ɵmpd"](5120,t.IterableDiffers,t["ɵk"],[]),t["ɵmpd"](5120,t.KeyValueDiffers,t["ɵl"],[]),t["ɵmpd"](4608,p.b,p.c,[p.d]),t["ɵmpd"](6144,t.Sanitizer,null,[p.b]),t["ɵmpd"](4608,p.e,p.f,[]),t["ɵmpd"](5120,p.g,function(n,l,e,t){return[new p.h(n),new p.i(l),new p.j(e,t)]},[p.d,p.d,p.d,p.e]),t["ɵmpd"](4608,p.k,p.k,[p.g,t.NgZone]),t["ɵmpd"](135680,p.l,p.l,[p.d]),t["ɵmpd"](4608,p.m,p.m,[p.k,p.l]),t["ɵmpd"](6144,t.RendererFactory2,null,[p.m]),t["ɵmpd"](6144,p.n,null,[p.l]),t["ɵmpd"](4608,t.Testability,t.Testability,[t.NgZone]),t["ɵmpd"](4608,p.o,p.o,[p.d]),t["ɵmpd"](4608,p.p,p.p,[p.d]),t["ɵmpd"](4608,c.BrowserXhr,c.BrowserXhr,[]),t["ɵmpd"](4608,c.ResponseOptions,c.BaseResponseOptions,[]),t["ɵmpd"](5120,c.XSRFStrategy,c["ɵb"],[]),t["ɵmpd"](4608,c.XHRBackend,c.XHRBackend,[c.BrowserXhr,c.ResponseOptions,c.XSRFStrategy]),t["ɵmpd"](4608,c.RequestOptions,c.BaseRequestOptions,[]),t["ɵmpd"](5120,c.Http,c["ɵc"],[c.XHRBackend,c.RequestOptions]),t["ɵmpd"](4608,g.a,g.a,[c.Http]),t["ɵmpd"](4608,m.ImageService,m.ImageService,[c.Http]),t["ɵmpd"](4608,f.a,f.a,[]),t["ɵmpd"](5120,h.a,h.b,[h.c]),t["ɵmpd"](4608,h.d,h.d,[]),t["ɵmpd"](6144,h.e,null,[h.d]),t["ɵmpd"](135680,h.f,h.f,[h.c,t.NgModuleFactoryLoader,t.Compiler,t.Injector,h.e]),t["ɵmpd"](4608,h.g,h.g,[]),t["ɵmpd"](5120,h.h,h.i,[h.j]),t["ɵmpd"](5120,t.APP_BOOTSTRAP_LISTENER,function(n){return[n]},[h.h]),t["ɵmpd"](512,s.CommonModule,s.CommonModule,[]),t["ɵmpd"](1024,t.ErrorHandler,p.q,[]),t["ɵmpd"](1024,t.NgProbeToken,function(){return[h.k()]},[]),t["ɵmpd"](512,h.j,h.j,[t.Injector]),t["ɵmpd"](1024,t.APP_INITIALIZER,function(n,l,e){return[p.r(n,l),h.l(e)]},[[2,p.s],[2,t.NgProbeToken],h.j]),t["ɵmpd"](512,t.ApplicationInitStatus,t.ApplicationInitStatus,[[2,t.APP_INITIALIZER]]),t["ɵmpd"](131584,t["ɵe"],t["ɵe"],[t.NgZone,t["ɵConsole"],t.Injector,t.ErrorHandler,t.ComponentFactoryResolver,t.ApplicationInitStatus]),t["ɵmpd"](2048,t.ApplicationRef,null,[t["ɵe"]]),t["ɵmpd"](512,t.ApplicationModule,t.ApplicationModule,[t.ApplicationRef]),t["ɵmpd"](512,p.t,p.t,[[3,p.t]]),t["ɵmpd"](512,c.HttpModule,c.HttpModule,[]),t["ɵmpd"](512,v.ImageUploadModule,v.ImageUploadModule,[]),t["ɵmpd"](512,b.a,b.a,[]),t["ɵmpd"](512,y.a,y.a,[]),t["ɵmpd"](512,x.a,x.a,[]),t["ɵmpd"](1024,h.m,h.n,[[3,h.c]]),t["ɵmpd"](512,h.o,h.p,[]),t["ɵmpd"](512,h.q,h.q,[]),t["ɵmpd"](256,h.r,{useHash:!0},[]),t["ɵmpd"](1024,s.LocationStrategy,h.s,[s.PlatformLocation,[2,s.APP_BASE_HREF],h.r]),t["ɵmpd"](512,s.Location,s.Location,[s.LocationStrategy]),t["ɵmpd"](512,t.Compiler,t.Compiler,[]),t["ɵmpd"](512,t.NgModuleFactoryLoader,t.SystemJsNgModuleLoader,[t.Compiler,[2,t.SystemJsNgModuleLoaderConfig]]),t["ɵmpd"](1024,h.t,function(){return[[{path:"",redirectTo:"demo",pathMatch:"prefix"},{path:"demo",component:C.a},{path:"readme",component:F.a}]]},[]),t["ɵmpd"](1024,h.c,h.u,[t.ApplicationRef,h.o,h.q,s.Location,t.Injector,t.NgModuleFactoryLoader,t.Compiler,h.t,h.r,[2,h.v],[2,h.w]]),t["ɵmpd"](512,h.x,h.x,[[2,h.m],[2,h.c]]),t["ɵmpd"](512,u.a,u.a,[])])})},"0MSm":function(n,l,e){"use strict";e.d(l,"a",function(){return t});var t=function(){function n(){}return n}()},1:function(n,l,e){n.exports=e("cDNt")},"1tl3":function(n,l,e){"use strict";var t=this&&this.__awaiter||function(n,l,e,t){return new(e||(e=Promise))(function(u,o){function i(n){try{a(t.next(n))}catch(n){o(n)}}function r(n){try{a(t.throw(n))}catch(n){o(n)}}function a(n){n.done?u(n.value):new e(function(l){l(n.value)}).then(i,r)}a((t=t.apply(n,l||[])).next())})},u=this&&this.__generator||function(n,l){function e(n){return function(l){return t([n,l])}}function t(e){if(u)throw new TypeError("Generator is already executing.");for(;r;)try{if(u=1,o&&(i=o[2&e[0]?"return":e[0]?"throw":"next"])&&!(i=i.call(o,e[1])).done)return i;switch(o=0,i&&(e=[0,i.value]),e[0]){case 0:case 1:i=e;break;case 4:return r.label++,{value:e[1],done:!1};case 5:r.label++,o=e[1],e=[0];continue;case 7:e=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(6===e[0]||2===e[0])){r=0;continue}if(3===e[0]&&(!i||e[1]>i[0]&&e[1]0&&this.processUploadedFiles()},n.prototype.onFileChange=function(n){var l=this.countRemainingSlots(),e=n.length>l?l:n.length;this.url&&0!=e&&this.uploadStateChanged.emit(!0),this.fileCounter+=e,this.showFileTooLargeMessage=!1,this.uploadFiles(n,e)},n.prototype.onResponse=function(n,l){l.serverResponse=n,l.pending=!1,this.uploadFinished.emit(l),0==--this.pendingFilesCounter&&this.uploadStateChanged.emit(!1)},n.prototype.processUploadedFiles=function(){for(var n=0;nt.maxFileSize?(t.fileCounter--,t.inputElement.nativeElement.value="",t.showFileTooLargeMessage=!0,[2,"continue"]):[4,t.beforeUpload({file:e,url:t.url,abort:!1})];case 1:return o=u.sent(),o.abort?(t.fileCounter--,t.inputElement.nativeElement.value="",[2,"continue"]):(a=document.createElement("img"),a.src=window.URL.createObjectURL(o.file),d=new FileReader,d.addEventListener("load",function(n){var l=new r(n.target.result,o.file);i.uploadSingleFile(l,o.url,o.formData),i.files.push(l)},!1),d.readAsDataURL(o.file),[2])}})},t=this,o=0,a.label=1;case 1:return o\n
\n \n \n
\n
\n\n

\n\n
\n \n
\n
\n
\n
\n \n
\n
\n \n \n ',styles:["\n .img-ul {\n --active-color: #3C9;\n --common-radius: 3px;\n background-color: #f8f8f8;\n border-radius: var(--common-radius);\n border: #d0d0d0 dashed 1px;\n font-family: sans-serif;\n position: relative;\n color: #9b9b9b;\n }\n\n .img-ul-file-is-over {\n border: var(--active-color) solid;\n }\n\n .img-ul-hr-inline-group:after {\n clear: both;\n content: \"\";\n display: table;\n }\n\n .img-ul-file-upload { \n padding: 16px;\n }\n\n .img-ul-drag-box-msg { \n display: inline-block;\n font-weight: 600;\n margin-left: 12px;\n padding-top: 14px;\n }\n\n label.img-ul-button input[type=file] {\n display: none;\n position: fixed;\n top: -99999px;\n }\n\n .img-ul-clear {\n background-color: #FF0000;\n }\n\n .img-ul-upload {\n background-color: var(--active-color);\n }\n\n .img-ul-button {\n -moz-box-shadow: 2px 2px 4px 0 rgba(148, 148, 148, 0.6);\n -webkit-box-shadow: 2px 2px 4px 0 rgba(148, 148, 148, 0.6);\n box-shadow: 2px 2px 4px 0 rgba(148, 148, 148, 0.6);\n color: #FFF;\n cursor: pointer;\n display: inline-block;\n float: left;\n font-size: 1.25em;\n font-weight: 500;\n padding: 10px;\n text-transform: uppercase;\n }\n\n .img-ul-button:active span {\n display: block;\n position: relative;\n top: 1px;\n }\n\n .img-ul-container {\n background-color: #fdfdfd;\n padding: 0 10px;\n }\n\n .img-ul-image { \n background: center center no-repeat;\n background-size: contain;\n display: inline-block;\n float: left;\n height: 86px;\n margin: 6px;\n position: relative;\n width: 86px;\n }\n\n .img-ul-x-mark {\n background-color: #000;\n border-radius: 2px;\n color: #FFF;\n cursor: pointer;\n float: right;\n height: 20px;\n margin: 2px;\n opacity: .7;\n text-align: center;\n width: 20px;\n }\n\n .img-ul-close {\n height: 20px;\n opacity: .7;\n padding-right: 3px;\n position: relative;\n width: 20px;\n }\n\n .img-ul-x-mark:hover .img-ul-close {\n opacity: 1;\n }\n\n .img-ul-close:before, .img-ul-close:after {\n background-color: #FFF;\n border-radius: 2px;\n content: '';\n height: 15px;\n position: absolute;\n top: 0;\n width: 2px;\n }\n\n .img-ul-close:before {\n transform: rotate(45deg);\n }\n\n .img-ul-close:after {\n transform: rotate(-45deg);\n }\n\n .img-ul-loading-overlay {\n background-color: #000;\n bottom: 0;\n left: 0;\n opacity: .7;\n position: absolute;\n right: 0;\n top: 0;\n }\n\n .img-ul-spinning-circle {\n height: 30px;\n width: 30px;\n margin: auto;\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n border-radius: 50%;\n border: 3px solid rgba(255, 255, 255, 0);\n border-top: 3px solid #FFF;\n border-right: 3px solid #FFF;\n -webkit-animation: spinner 2s infinite cubic-bezier(0.085, 0.625, 0.855, 0.360);\n animation: spinner 2s infinite cubic-bezier(0.085, 0.625, 0.855, 0.360);\n }\n\n .img-ul-file-too-large {\n color: red;\n padding: 0 15px;\n }\n\n @-webkit-keyframes spinner {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n }\n\n @keyframes spinner {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n }\n "]}]}],a.ctorParameters=function(){return[{type:i.ImageService}]},a.propDecorators={beforeUpload:[{type:o.Input}],buttonCaption:[{type:o.Input}],cssClass:[{type:o.Input,args:["class"]}],clearButtonCaption:[{type:o.Input}],dropBoxMessage:[{type:o.Input}],fileTooLargeMessage:[{type:o.Input}],headers:[{type:o.Input}],max:[{type:o.Input}],maxFileSize:[{type:o.Input}],preview:[{type:o.Input}],partName:[{type:o.Input}],style:[{type:o.Input}],supportedExtensions:[{type:o.Input,args:["extensions"]}],url:[{type:o.Input}],withCredentials:[{type:o.Input}],uploadedFiles:[{type:o.Input}],removed:[{type:o.Output}],uploadStateChanged:[{type:o.Output}],uploadFinished:[{type:o.Output}],inputElement:[{type:o.ViewChild,args:["input"]}]},l.ImageUploadComponent=a},"3cdd":function(n,l,e){"use strict";function t(n){return p["ɵvid"](0,[(n()(),p["ɵeld"](0,null,null,4,"label",[["class","img-ul-clear img-ul-button"]],null,[[null,"click"]],function(n,l,e){var t=!0,u=n.component;if("click"===l){t=!1!==u.deleteAll()&&t}return t},null,null)),p["ɵdid"](278528,null,0,c.NgStyle,[p.KeyValueDiffers,p.ElementRef,p.Renderer],{ngStyle:[0,"ngStyle"]},null),(n()(),p["ɵted"](null,["\n "])),(n()(),p["ɵeld"](0,null,null,0,"span",[],[[8,"innerText",0]],null,null,null,null)),(n()(),p["ɵted"](null,["\n "]))],function(n,l){var e=l.component;n(l,1,0,null==e.style?null:e.style.clearButton)},function(n,l){n(l,3,0,l.component.clearButtonCaption)})}function u(n){return p["ɵvid"](0,[(n()(),p["ɵeld"](0,null,null,0,"p",[["class","img-ul-file-too-large"]],[[8,"innerText",0]],null,null,null,null))],null,function(n,l){n(l,0,0,l.component.fileTooLargeMessage)})}function o(n){return p["ɵvid"](0,[(n()(),p["ɵeld"](0,null,null,3,"div",[["class","img-ul-loading-overlay"]],null,null,null,null,null)),(n()(),p["ɵted"](null,["\n "])),(n()(),p["ɵeld"](0,null,null,0,"div",[["class","img-ul-spinning-circle"]],null,null,null,null,null)),(n()(),p["ɵted"](null,["\n "]))],null,null)}function i(n){return p["ɵvid"](0,[(n()(),p["ɵeld"](0,null,null,3,"div",[["class","img-ul-x-mark"]],null,[[null,"click"]],function(n,l,e){var t=!0,u=n.component;if("click"===l){t=!1!==u.deleteFile(n.parent.context.$implicit)&&t}return t},null,null)),(n()(),p["ɵted"](null,["\n "])),(n()(),p["ɵeld"](0,null,null,0,"span",[["class","img-ul-close"]],null,null,null,null,null)),(n()(),p["ɵted"](null,["\n "]))],null,null)}function r(n){return p["ɵvid"](0,[(n()(),p["ɵeld"](0,null,null,9,"div",[["class","img-ul-image"]],null,null,null,null,null)),p["ɵdid"](278528,null,0,c.NgStyle,[p.KeyValueDiffers,p.ElementRef,p.Renderer],{ngStyle:[0,"ngStyle"]},null),p["ɵpod"](["background-image"]),(n()(),p["ɵted"](null,["\n "])),(n()(),p["ɵand"](16777216,null,null,1,null,o)),p["ɵdid"](16384,null,0,c.NgIf,[p.ViewContainerRef,p.TemplateRef],{ngIf:[0,"ngIf"]},null),(n()(),p["ɵted"](null,["\n "])),(n()(),p["ɵand"](16777216,null,null,1,null,i)),p["ɵdid"](16384,null,0,c.NgIf,[p.ViewContainerRef,p.TemplateRef],{ngIf:[0,"ngIf"]},null),(n()(),p["ɵted"](null,["\n "]))],function(n,l){n(l,1,0,n(l,2,0,"url("+l.context.$implicit.src+")")),n(l,5,0,l.context.$implicit.pending),n(l,8,0,!l.context.$implicit.pending)},null)}function a(n){return p["ɵvid"](0,[(n()(),p["ɵeld"](0,null,null,5,"div",[["class","img-ul-container img-ul-hr-inline-group"]],null,null,null,null,null)),p["ɵdid"](278528,null,0,c.NgStyle,[p.KeyValueDiffers,p.ElementRef,p.Renderer],{ngStyle:[0,"ngStyle"]},null),(n()(),p["ɵted"](null,["\n "])),(n()(),p["ɵand"](16777216,null,null,1,null,r)),p["ɵdid"](802816,null,0,c.NgForOf,[p.ViewContainerRef,p.TemplateRef,p.IterableDiffers],{ngForOf:[0,"ngForOf"]},null),(n()(),p["ɵted"](null,["\n "]))],function(n,l){var e=l.component;n(l,1,0,null==e.style?null:e.style.previewPanel),n(l,4,0,e.files)},null)}function d(n){return p["ɵvid"](0,[p["ɵqud"](402653184,1,{inputElement:0}),(n()(),p["ɵted"](null,["\n "])),(n()(),p["ɵeld"](0,null,null,26,"div",[["fileDrop",""]],null,[[null,"fileOver"],[null,"fileDrop"],[null,"drop"],[null,"dragleave"],[null,"dragover"]],function(n,l,e){var t=!0,u=n.component;if("drop"===l){t=!1!==p["ɵnov"](n,5).onDrop(e)&&t}if("dragleave"===l){t=!1!==p["ɵnov"](n,5).onDragLeave(e)&&t}if("dragover"===l){t=!1!==p["ɵnov"](n,5).onDragOver(e)&&t}if("fileOver"===l){t=!1!==u.onFileOver(e)&&t}if("fileDrop"===l){t=!1!==u.onFileChange(e)&&t}return t},null,null)),p["ɵdid"](278528,null,0,c.NgClass,[p.IterableDiffers,p.KeyValueDiffers,p.ElementRef,p.Renderer],{ngClass:[0,"ngClass"]},null),p["ɵdid"](278528,null,0,c.NgStyle,[p.KeyValueDiffers,p.ElementRef,p.Renderer],{ngStyle:[0,"ngStyle"]},null),p["ɵdid"](16384,null,0,m.FileDropDirective,[],{accept:[0,"accept"]},{fileOver:"fileOver",fileDrop:"fileDrop"}),(n()(),p["ɵted"](null,["\n "])),(n()(),p["ɵeld"](0,null,null,14,"div",[["class","img-ul-file-upload img-ul-hr-inline-group"]],null,null,null,null,null)),(n()(),p["ɵted"](null,[" \n "])),(n()(),p["ɵeld"](0,null,null,6,"label",[["class","img-ul-upload img-ul-button"]],null,null,null,null,null)),p["ɵdid"](278528,null,0,c.NgStyle,[p.KeyValueDiffers,p.ElementRef,p.Renderer],{ngStyle:[0,"ngStyle"]},null),(n()(),p["ɵted"](null,["\n "])),(n()(),p["ɵeld"](0,null,null,0,"span",[],[[8,"innerText",0]],null,null,null,null)),(n()(),p["ɵted"](null,["\n "])),(n()(),p["ɵeld"](0,[[1,0],["input",1]],null,0,"input",[["multiple",""],["type","file"]],[[8,"accept",0]],[[null,"change"]],function(n,l,e){var t=!0,u=n.component;if("change"===l){t=!1!==u.onFileChange(p["ɵnov"](n,14).files)&&t}return t},null,null)),(n()(),p["ɵted"](null,["\n "])),(n()(),p["ɵted"](null,["\n "])),(n()(),p["ɵand"](16777216,null,null,1,null,t)),p["ɵdid"](16384,null,0,c.NgIf,[p.ViewContainerRef,p.TemplateRef],{ngIf:[0,"ngIf"]},null),(n()(),p["ɵted"](null,["\n "])),(n()(),p["ɵeld"](0,null,null,0,"div",[["class","img-ul-drag-box-msg"]],[[8,"innerText",0]],null,null,null,null)),(n()(),p["ɵted"](null,["\n "])),(n()(),p["ɵted"](null,["\n\n "])),(n()(),p["ɵand"](16777216,null,null,1,null,u)),p["ɵdid"](16384,null,0,c.NgIf,[p.ViewContainerRef,p.TemplateRef],{ngIf:[0,"ngIf"]},null),(n()(),p["ɵted"](null,["\n\n "])),(n()(),p["ɵand"](16777216,null,null,1,null,a)),p["ɵdid"](16384,null,0,c.NgIf,[p.ViewContainerRef,p.TemplateRef],{ngIf:[0,"ngIf"]},null),(n()(),p["ɵted"](null,["\n "])),(n()(),p["ɵted"](null,["\n "]))],function(n,l){var e=l.component;n(l,3,0,e.cssClass),n(l,4,0,null==e.style?null:e.style.layout),n(l,5,0,e.supportedExtensions),n(l,10,0,null==e.style?null:e.style.selectButton),n(l,18,0,e.fileCounter>0),n(l,24,0,e.showFileTooLargeMessage),n(l,27,0,e.preview)},function(n,l){var e=l.component;n(l,12,0,e.buttonCaption),n(l,14,0,e.supportedExtensions),n(l,20,0,e.dropBoxMessage)})}function s(n){return p["ɵvid"](0,[(n()(),p["ɵeld"](0,null,null,1,"image-upload",[],null,null,null,d,v)),p["ɵdid"](638976,null,0,g.ImageUploadComponent,[f.ImageService],null,null)],function(n,l){n(l,1,0)},null)}var p=e("/oeL"),c=e("qbdv"),g=e("1tl3"),m=(e.n(g),e("EilG")),f=(e.n(m),e("7fc5"));e.n(f);e.d(l,"b",function(){return v}),l.a=d;var h=[".img-ul[_ngcontent-%COMP%] {\n --active-color: #3C9;\n --common-radius: 3px;\n background-color: #f8f8f8;\n border-radius: var(--common-radius);\n border: #d0d0d0 dashed 1px;\n font-family: sans-serif;\n position: relative;\n color: #9b9b9b;\n }\n\n .img-ul-file-is-over[_ngcontent-%COMP%] {\n border: var(--active-color) solid;\n }\n\n .img-ul-hr-inline-group[_ngcontent-%COMP%]:after {\n clear: both;\n content: \"\";\n display: table;\n }\n\n .img-ul-file-upload[_ngcontent-%COMP%] { \n padding: 16px;\n }\n\n .img-ul-drag-box-msg[_ngcontent-%COMP%] { \n display: inline-block;\n font-weight: 600;\n margin-left: 12px;\n padding-top: 14px;\n }\n\n label.img-ul-button[_ngcontent-%COMP%] input[type=file][_ngcontent-%COMP%] {\n display: none;\n position: fixed;\n top: -99999px;\n }\n\n .img-ul-clear[_ngcontent-%COMP%] {\n background-color: #FF0000;\n }\n\n .img-ul-upload[_ngcontent-%COMP%] {\n background-color: var(--active-color);\n }\n\n .img-ul-button[_ngcontent-%COMP%] {\n -moz-box-shadow: 2px 2px 4px 0 rgba(148, 148, 148, 0.6);\n -webkit-box-shadow: 2px 2px 4px 0 rgba(148, 148, 148, 0.6);\n box-shadow: 2px 2px 4px 0 rgba(148, 148, 148, 0.6);\n color: #FFF;\n cursor: pointer;\n display: inline-block;\n float: left;\n font-size: 1.25em;\n font-weight: 500;\n padding: 10px;\n text-transform: uppercase;\n }\n\n .img-ul-button[_ngcontent-%COMP%]:active span[_ngcontent-%COMP%] {\n display: block;\n position: relative;\n top: 1px;\n }\n\n .img-ul-container[_ngcontent-%COMP%] {\n background-color: #fdfdfd;\n padding: 0 10px;\n }\n\n .img-ul-image[_ngcontent-%COMP%] { \n background: center center no-repeat;\n background-size: contain;\n display: inline-block;\n float: left;\n height: 86px;\n margin: 6px;\n position: relative;\n width: 86px;\n }\n\n .img-ul-x-mark[_ngcontent-%COMP%] {\n background-color: #000;\n border-radius: 2px;\n color: #FFF;\n cursor: pointer;\n float: right;\n height: 20px;\n margin: 2px;\n opacity: .7;\n text-align: center;\n width: 20px;\n }\n\n .img-ul-close[_ngcontent-%COMP%] {\n height: 20px;\n opacity: .7;\n padding-right: 3px;\n position: relative;\n width: 20px;\n }\n\n .img-ul-x-mark[_ngcontent-%COMP%]:hover .img-ul-close[_ngcontent-%COMP%] {\n opacity: 1;\n }\n\n .img-ul-close[_ngcontent-%COMP%]:before, .img-ul-close[_ngcontent-%COMP%]:after {\n background-color: #FFF;\n border-radius: 2px;\n content: '';\n height: 15px;\n position: absolute;\n top: 0;\n width: 2px;\n }\n\n .img-ul-close[_ngcontent-%COMP%]:before {\n transform: rotate(45deg);\n }\n\n .img-ul-close[_ngcontent-%COMP%]:after {\n transform: rotate(-45deg);\n }\n\n .img-ul-loading-overlay[_ngcontent-%COMP%] {\n background-color: #000;\n bottom: 0;\n left: 0;\n opacity: .7;\n position: absolute;\n right: 0;\n top: 0;\n }\n\n .img-ul-spinning-circle[_ngcontent-%COMP%] {\n height: 30px;\n width: 30px;\n margin: auto;\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n border-radius: 50%;\n border: 3px solid rgba(255, 255, 255, 0);\n border-top: 3px solid #FFF;\n border-right: 3px solid #FFF;\n -webkit-animation: spinner 2s infinite cubic-bezier(0.085, 0.625, 0.855, 0.360);\n animation: spinner 2s infinite cubic-bezier(0.085, 0.625, 0.855, 0.360);\n }\n\n .img-ul-file-too-large[_ngcontent-%COMP%] {\n color: red;\n padding: 0 15px;\n }\n\n @-webkit-keyframes spinner {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n }\n\n @keyframes spinner {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n }"],v=p["ɵcrt"]({encapsulation:0,styles:h,data:{}});p["ɵccf"]("image-upload",g.ImageUploadComponent,s,{beforeUpload:"beforeUpload",buttonCaption:"buttonCaption",cssClass:"class",clearButtonCaption:"clearButtonCaption",dropBoxMessage:"dropBoxMessage",fileTooLargeMessage:"fileTooLargeMessage",headers:"headers",max:"max",maxFileSize:"maxFileSize",preview:"preview",partName:"partName",style:"style",supportedExtensions:"extensions",url:"url",withCredentials:"withCredentials",uploadedFiles:"uploadedFiles"},{removed:"removed",uploadStateChanged:"uploadStateChanged",uploadFinished:"uploadFinished"},[])},"7fc5":function(n,l,e){"use strict";var t=e("/oeL"),u=e("CPp0"),o=function(){function n(n){this.http=n}return n.prototype.postImage=function(n,l,e,t,o,i){if(void 0===t&&(t="image"),!n||""===n)throw new Error("Url is not set! Please set it before doing queries");var r=new u.RequestOptions;i&&(r.withCredentials=i),e&&(r.headers=new u.Headers(e));var a=new FormData;for(var d in o)a.append(d,o[d]);return a.append(t,l),this.http.post(n,a,r)},n}();o.decorators=[{type:t.Injectable}],o.ctorParameters=function(){return[{type:u.Http}]},l.ImageService=o},"9tFb":function(n,l,e){"use strict";e.d(l,"a",function(){return t});var t=function(){function n(){}return n}()},BKGc:function(n,l,e){"use strict";e.d(l,"a",function(){return t});var t=function(){function n(){}return n}()},EilG:function(n,l,e){"use strict";var t=e("/oeL"),u=function(){function n(){this.fileOver=new t.EventEmitter,this.fileDrop=new t.EventEmitter}return n.prototype.onDrop=function(l){var e=n.getDataTransfer(l);if(n.hasFiles(e.types)){l.preventDefault();var t=this.filterFiles(e.files);l.preventDefault(),this.fileOver.emit(!1),this.fileDrop.emit(t)}},n.prototype.onDragLeave=function(n){this.fileOver.emit(!1)},n.prototype.onDragOver=function(l){var e=n.getDataTransfer(l);n.hasFiles(e.types)&&(e.dropEffect="copy",l.preventDefault(),this.fileOver.emit(!0))},n.prototype.filterFiles=function(l){if(!this.accept||0===this.accept.length)return l;for(var e=[],t=0;t\n'])),(n()(),o["ɵted"](null,["\n"]))],function(n,l){n(l,4,0,"PRESS ME AAAAAAAAAH","CLEAR ME AAAAAAAAAH","DROP ON ME AAAAAAAAAH","https://httpbin.org/status/200")},null)}function u(n){return o["ɵvid"](0,[(n()(),o["ɵeld"](0,null,null,1,"customise",[],null,null,null,t,p)),o["ɵdid"](49152,null,0,d.a,[],null,null)],null,null)}var o=e("/oeL"),i=e("3cdd"),r=e("1tl3"),a=(e.n(r),e("7fc5")),d=(e.n(a),e("0MSm"));e.d(l,"b",function(){return p}),l.a=t;var s=[],p=o["ɵcrt"]({encapsulation:2,styles:s,data:{}});o["ɵccf"]("customise",d.a,u,{},{},[])},HEjA:function(n,l,e){"use strict";function t(n){return o["ɵvid"](0,[(n()(),o["ɵeld"](0,null,null,1,"h4",[["class","mb-3 mt-5"]],null,null,null,null,null)),(n()(),o["ɵted"](null,["Styles"])),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,1,"h5",[["class","mb-3 mt-3"]],null,null,null,null,null)),(n()(),o["ɵted"](null,["Custom CSS Class"])),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,1,"image-upload",[["class","customClass"],["url","https://httpbin.org/status/200"]],null,null,null,i.a,i.b)),o["ɵdid"](638976,null,0,r.ImageUploadComponent,[a.ImageService],{cssClass:[0,"cssClass"],url:[1,"url"]},null),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,2,"pre",[],null,null,null,null,null)),(n()(),o["ɵeld"](0,null,null,1,"code",[["class","language-markup"]],null,null,null,null,null)),(n()(),o["ɵted"](null,[''])),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,2,"pre",[],null,null,null,null,null)),(n()(),o["ɵeld"](0,null,null,1,"code",[["class","language-css"]],null,null,null,null,null)),(n()(),o["ɵted"](null,[".customClass {\n background-color: #dd3;\n border-radius: 5px;\n margin:5px;\n width: 500px;\n}\n\n.customClass .img-ul-upload {\n background-color: #000 !important;\n}\n\n.customClass .img-ul-clear {\n background-color: #B819BB !important;\n}\n\n.customClass .img-ul-drag-box-msg {\n color: purple !important;\n}\n\n.customClass .img-ul-container {\n background-color: #FF6CAD !important;\n}\n"])),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,1,"h5",[["class","mb-3 mt-3"]],null,null,null,null,null)),(n()(),o["ɵted"](null,["Custom Style"])),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,1,"image-upload",[["url","https://httpbin.org/status/200"]],null,null,null,i.a,i.b)),o["ɵdid"](638976,null,0,r.ImageUploadComponent,[a.ImageService],{style:[0,"style"],url:[1,"url"]},null),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,2,"pre",[],null,null,null,null,null)),(n()(),o["ɵeld"](0,null,null,1,"code",[["class","language-markup"]],null,null,null,null,null)),(n()(),o["ɵted"](null,[''])),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,2,"pre",[],null,null,null,null,null)),(n()(),o["ɵeld"](0,null,null,1,"code",[["class","language-typescript"]],null,null,null,null,null)),(n()(),o["ɵted"](null,['customStyle = {\n selectButton: {\n "background-color": "yellow",\n "border-radius": "25px",\n "color": "#000"\n },\n clearButton: {\n "background-color": "#FFF",\n "border-radius": "25px",\n "color": "#000",\n "margin-left": "10px"\n },\n layout: {\n "background-color": "purple",\n "border-radius": "25px",\n "color": "#FFF",\n "font-size": "15px",\n "margin": "10px",\n "padding-top": "5px",\n "width": "500px"\n },\n previewPanel: {\n "background-color": "#894489",\n "border-radius": "0 0 25px 25px",\n }\n }\n'])),(n()(),o["ɵted"](null,["\n"]))],function(n,l){var e=l.component;n(l,7,0,"customClass","https://httpbin.org/status/200");n(l,21,0,e.customStyle,"https://httpbin.org/status/200")},null)}function u(n){return o["ɵvid"](0,[(n()(),o["ɵeld"](0,null,null,1,"styles",[],null,null,null,t,p)),o["ɵdid"](49152,null,0,d.a,[],null,null)],null,null)}var o=e("/oeL"),i=e("3cdd"),r=e("1tl3"),a=(e.n(r),e("7fc5")),d=(e.n(a),e("Mm9d"));e.d(l,"b",function(){return p}),l.a=t;var s=[],p=o["ɵcrt"]({encapsulation:2,styles:s,data:{}});o["ɵccf"]("styles",d.a,u,{},{},[])},IMW7:function(n,l,e){"use strict";function t(n){return o["ɵvid"](0,[(n()(),o["ɵeld"](0,null,null,1,"h4",[["class","mb-3 mt-5"]],null,null,null,null,null)),(n()(),o["ɵted"](null,["Events"])),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,2,"image-upload",[["url","https://httpbin.org/status/200"]],null,[[null,"removed"],[null,"uploadFinished"],[null,"uploadStateChanged"]],function(n,l,e){var t=!0,u=n.component;if("removed"===l){t=!1!==u.onRemoved(e)&&t}if("uploadFinished"===l){t=!1!==u.onUploadFinished(e)&&t}if("uploadStateChanged"===l){t=!1!==u.onUploadStateChanged(e)&&t}return t},r.a,r.b)),o["ɵdid"](638976,null,0,a.ImageUploadComponent,[d.ImageService],{url:[0,"url"]},{removed:"removed",uploadStateChanged:"uploadStateChanged",uploadFinished:"uploadFinished"}),(n()(),o["ɵted"](null,["\n"])),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,2,"pre",[],null,null,null,null,null)),(n()(),o["ɵeld"](0,null,null,1,"code",[["class","language-markup"]],null,null,null,null,null)),(n()(),o["ɵted"](null,['\n'])),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,3,"pre",[],null,null,null,null,null)),(n()(),o["ɵeld"](0,null,null,2,"code",[["class","language-typescript"]],null,null,null,null,null)),(n()(),o["ɵted"](null,["imageFinishedUploading(file: FileHolder) {\n console.log(JSON.stringify(file.serverResponse));\n}\n\nonRemoved(file: FileHolder) {\n // do some stuff with the removed file.\n}\n\nonUploadStateChanged(state: boolean) {\n console.log(JSON.stringify(state));\n}"])),(n()(),o["ɵted"](null,["\n"])),(n()(),o["ɵted"](null,["\n"]))],function(n,l){n(l,4,0,"https://httpbin.org/status/200")},null)}function u(n){return o["ɵvid"](0,[(n()(),o["ɵeld"](0,null,null,1,"events",[],null,null,null,t,p)),o["ɵdid"](49152,null,0,i.a,[],null,null)],null,null)}var o=e("/oeL"),i=e("bsiH"),r=e("3cdd"),a=e("1tl3"),d=(e.n(a),e("7fc5"));e.n(d);e.d(l,"b",function(){return p}),l.a=t;var s=[],p=o["ɵcrt"]({encapsulation:2,styles:s,data:{}});o["ɵccf"]("events",i.a,u,{},{},[])},Mm9d:function(n,l,e){"use strict";e.d(l,"a",function(){return t});var t=function(){function n(){this.customStyle={selectButton:{"background-color":"yellow","border-radius":"25px",color:"#000"},clearButton:{"background-color":"#FFF","border-radius":"25px",color:"#000","margin-left":"10px"},layout:{"background-color":"purple","border-radius":"25px",border:"none",color:"#FFF","font-size":"15px",margin:"10px","padding-top":"5px",width:"500px"},previewPanel:{"background-color":"#894489","border-radius":"0 0 25px 25px"}}}return n}()},TbST:function(n,l,e){"use strict";var t=e("waH/");e.n(t);e.d(l,"a",function(){return u});var u=function(){function n(){}return n.prototype.ngOnInit=function(){t.highlightAll(!1)},n}()},V4Zm:function(n,l,e){"use strict";function t(n){return o["ɵvid"](0,[(n()(),o["ɵeld"](0,null,null,4,"div",[["class","container"]],null,null,null,null,null)),(n()(),o["ɵted"](null,["\n "])),(n()(),o["ɵeld"](0,null,null,1,"markdown",[["path","assets/readme.md"]],null,null,null,i.b,i.c)),o["ɵdid"](4308992,null,0,r.a,[a.a,o.ElementRef,d.Http],{path:[0,"path"]},null),(n()(),o["ɵted"](null,["\n"])),(n()(),o["ɵted"](null,["\n"]))],function(n,l){n(l,3,0,"assets/readme.md")},null)}function u(n){return o["ɵvid"](0,[(n()(),o["ɵeld"](0,null,null,1,"ng-component",[],null,null,null,t,c)),o["ɵdid"](49152,null,0,s.a,[],null,null)],null,null)}var o=e("/oeL"),i=e("7KBz"),r=e("GnS5"),a=e("ZYjr"),d=e("CPp0"),s=e("XFJC");e.d(l,"a",function(){return g});var p=[],c=o["ɵcrt"]({encapsulation:2,styles:p,data:{}}),g=o["ɵccf"]("ng-component",s.a,u,{},{},[])},XFJC:function(n,l,e){"use strict";e.d(l,"a",function(){return t});var t=function(){function n(){}return n}()},"a/ZF":function(n,l,e){"use strict";function t(n){return o["ɵvid"](0,[(n()(),o["ɵeld"](0,null,null,1,"h4",[["class","mb-3 mt-3"]],null,null,null,null,null)),(n()(),o["ɵted"](null,["Uploaded Usage"])),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,1,"image-upload",[["url","https://httpbin.org/status/200"]],null,[[null,"removed"]],function(n,l,e){var t=!0,u=n.component;if("removed"===l){t=!1!==u.onRemoved(e)&&t}return t},r.a,r.b)),o["ɵdid"](638976,null,0,a.ImageUploadComponent,[d.ImageService],{url:[0,"url"],uploadedFiles:[1,"uploadedFiles"]},{removed:"removed"}),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,2,"pre",[],null,null,null,null,null)),(n()(),o["ɵeld"](0,null,null,1,"code",[["class","language-markup"]],null,null,null,null,null)),(n()(),o["ɵted"](null,['']))],function(n,l){n(l,4,0,"https://httpbin.org/status/200",l.component.images)},null)}function u(n){return o["ɵvid"](0,[(n()(),o["ɵeld"](0,null,null,1,"uploaded",[],null,null,null,t,p)),o["ɵdid"](114688,null,0,i.a,[],null,null)],function(n,l){n(l,1,0)},null)}var o=e("/oeL"),i=e("cloq"),r=e("3cdd"),a=e("1tl3"),d=(e.n(a),e("7fc5"));e.n(d);e.d(l,"b",function(){return p}),l.a=t;var s=[],p=o["ɵcrt"]({encapsulation:2,styles:s,data:{}});o["ɵccf"]("uploaded",i.a,u,{},{},[])},"aR8+":function(n,l,e){"use strict";e.d(l,"a",function(){return t});var t=function(){function n(){}return n}()},bsiH:function(n,l,e){"use strict";e.d(l,"a",function(){return t});var t=function(){function n(){}return n.prototype.onUploadFinished=function(n){console.log(JSON.stringify(n.serverResponse))},n.prototype.onRemoved=function(n){},n.prototype.onUploadStateChanged=function(n){console.log(JSON.stringify(n))},n}()},cDNt:function(n,l,e){"use strict";Object.defineProperty(l,"__esModule",{value:!0});var t=e("/oeL"),u=e("waH/"),o=(e.n(u),e("tqEy")),i=(e.n(o),e("p5Ee")),r=e("+h1B"),a=e("fc+i");i.a.production&&e.i(t.enableProdMode)(),e.i(a.a)().bootstrapModuleFactory(r.a)},cloq:function(n,l,e){"use strict";e.d(l,"a",function(){return t});var t=function(){function n(){this.myHeaders={Authorization:"MyToken","Another Header":"AnotherValue"},this.images=[]}return n.prototype.onRemoved=function(n){console.log(n)},n.prototype.ngOnInit=function(){var n=this;setTimeout(function(){n.images=["https://static.independent.co.uk/s3fs-public/styles/story_medium/public/thumbnails/image/2016/10/11/14/beats-logo-1200-80.jpg","https://s-media-cache-ak0.pinimg.com/originals/68/fb/c7/68fbc7bc9eb8c530c6e804c4109ec647.jpg",{fileName:"google-image.jpg",url:"https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png"}]},1e3)},n}()},"eFT+":function(n,l,e){"use strict";function t(n){return o["ɵvid"](0,[(n()(),o["ɵeld"](0,null,null,1,"h4",[["class","mb-3 mt-3"]],null,null,null,null,null)),(n()(),o["ɵted"](null,["Basic Usage"])),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,1,"image-upload",[["url","https://httpbin.org/status/200"]],null,null,null,i.a,i.b)),o["ɵdid"](638976,null,0,r.ImageUploadComponent,[a.ImageService],{url:[0,"url"]},null),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,2,"pre",[],null,null,null,null,null)),(n()(),o["ɵeld"](0,null,null,1,"code",[["class","language-markup"]],null,null,null,null,null)),(n()(),o["ɵted"](null,[''])),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,1,"h5",[["class","mb-3 mt-3"]],null,null,null,null,null)),(n()(),o["ɵted"](null,["With headers"])),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,1,"image-upload",[["url","https://httpbin.org/status/200"]],null,null,null,i.a,i.b)),o["ɵdid"](638976,null,0,r.ImageUploadComponent,[a.ImageService],{headers:[0,"headers"],url:[1,"url"]},null),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,2,"pre",[],null,null,null,null,null)),(n()(),o["ɵeld"](0,null,null,1,"code",[["class","language-markup"]],null,null,null,null,null)),(n()(),o["ɵted"](null,[''])),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,3,"pre",[],null,null,null,null,null)),(n()(),o["ɵeld"](0,null,null,2,"code",[["class","language-typescript"]],null,null,null,null,null)),(n()(),o["ɵted"](null,["myHeaders: { [name: string]: any } = {\n 'Authorization': 'MyToken',\n 'Another Header': 'AnotherValue'\n};"])),(n()(),o["ɵted"](null,["\n"])),(n()(),o["ɵted"](null,["\n"]))],function(n,l){var e=l.component;n(l,4,0,"https://httpbin.org/status/200");n(l,14,0,e.myHeaders,"https://httpbin.org/status/200")},null)}function u(n){return o["ɵvid"](0,[(n()(),o["ɵeld"](0,null,null,1,"basic",[],null,null,null,t,p)),o["ɵdid"](49152,null,0,d.a,[],null,null)],null,null)}var o=e("/oeL"),i=e("3cdd"),r=e("1tl3"),a=(e.n(r),e("7fc5")),d=(e.n(a),e("Euw1"));e.d(l,"b",function(){return p}),l.a=t;var s=[],p=o["ɵcrt"]({encapsulation:2,styles:s,data:{}});o["ɵccf"]("basic",d.a,u,{},{},[])},eZSU:function(n,l,e){"use strict";function t(n){return o["ɵvid"](0,[(n()(),o["ɵeld"](0,null,null,19,"div",[["class","container mb-5"],["highlight-js-content",".highlight"]],null,null,null,null,null)),(n()(),o["ɵted"](null,["\n "])),(n()(),o["ɵeld"](0,null,null,1,"basic",[],null,null,null,i.a,i.b)),o["ɵdid"](49152,null,0,r.a,[],null,null),(n()(),o["ɵted"](null,["\n "])),(n()(),o["ɵeld"](0,null,null,1,"filter",[],null,null,null,a.a,a.b)),o["ɵdid"](49152,null,0,d.a,[],null,null),(n()(),o["ɵted"](null,["\n "])),(n()(),o["ɵeld"](0,null,null,1,"customise",[],null,null,null,s.a,s.b)),o["ɵdid"](49152,null,0,p.a,[],null,null),(n()(),o["ɵted"](null,["\n "])),(n()(),o["ɵeld"](0,null,null,1,"events",[],null,null,null,c.a,c.b)),o["ɵdid"](49152,null,0,g.a,[],null,null),(n()(),o["ɵted"](null,["\n "])),(n()(),o["ɵeld"](0,null,null,1,"styles",[],null,null,null,m.a,m.b)),o["ɵdid"](49152,null,0,f.a,[],null,null),(n()(),o["ɵted"](null,["\n "])),(n()(),o["ɵeld"](0,null,null,1,"uploaded",[],null,null,null,h.a,h.b)),o["ɵdid"](114688,null,0,v.a,[],null,null),(n()(),o["ɵted"](null,["\n"])),(n()(),o["ɵted"](null,["\n"]))],function(n,l){n(l,18,0)},null)}function u(n){return o["ɵvid"](0,[(n()(),o["ɵeld"](0,null,null,1,"ng-component",[],null,null,null,t,x)),o["ɵdid"](114688,null,0,b.a,[],null,null)],function(n,l){n(l,1,0)},null)}var o=e("/oeL"),i=e("eFT+"),r=e("Euw1"),a=e("tHX5"),d=e("h5VB"),s=e("Go+w"),p=e("0MSm"),c=e("IMW7"),g=e("bsiH"),m=e("HEjA"),f=e("Mm9d"),h=e("a/ZF"),v=e("cloq"),b=e("TbST");e.d(l,"a",function(){return C});var y=[],x=o["ɵcrt"]({encapsulation:2,styles:y,data:{}}),C=o["ɵccf"]("ng-component",b.a,u,{},{},[])},gPcP:function(n,l,e){"use strict";var t=e("qbdv"),u=e("/oeL"),o=e("CPp0"),i=e("EilG"),r=e("1tl3"),a=e("7fc5"),d=function(){function n(){}return n.forRoot=function(){return{ngModule:n,providers:[a.ImageService]}},n}();d.decorators=[{type:u.NgModule,args:[{imports:[t.CommonModule,o.HttpModule],declarations:[r.ImageUploadComponent,i.FileDropDirective],exports:[r.ImageUploadComponent]}]}],d.ctorParameters=function(){return[]},l.ImageUploadModule=d},h5VB:function(n,l,e){"use strict";e.d(l,"a",function(){return t});var t=function(){function n(){var n=this;this.fileCounter=0,this.onBeforeUpload=function(l){return n.fileCounter%2==0?l.abort=!0:l.url="http://somewhereelse.com",n.fileCounter++,l}}return n}()},p5Ee:function(n,l,e){"use strict";e.d(l,"a",function(){return t});var t={production:!0}},q4dy:function(n,l,e){"use strict";function t(n){return o["ɵvid"](0,[(n()(),o["ɵeld"](0,null,null,4,"div",[["class","github-star-button"]],null,null,null,null,null)),(n()(),o["ɵted"](null,["\n "])),(n()(),o["ɵeld"](0,null,null,1,"a",[["aria-label","Star aberezkin/ng2-image-upload on GitHub"],["class","github-button"],["data-icon","octicon-star"],["data-show-count","true"],["data-size","large"],["href","https://github.com/aberezkin/ng2-image-upload"]],null,null,null,null,null)),(n()(),o["ɵted"](null,["Star"])),(n()(),o["ɵted"](null,["\n"])),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,7,"div",[["class","jumbotron jumbotron-fluid text-center"]],null,null,null,null,null)),(n()(),o["ɵted"](null,["\n "])),(n()(),o["ɵeld"](0,null,null,1,"h1",[["class","display-3"]],null,null,null,null,null)),(n()(),o["ɵted"](null,["\n Angular Image Upload\n "])),(n()(),o["ɵted"](null,["\n "])),(n()(),o["ɵeld"](0,null,null,1,"p",[["class","lead"]],null,null,null,null,null)),(n()(),o["ɵted"](null,["\n Angular component for image uploading\n "])),(n()(),o["ɵted"](null,["\n"])),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,24,"div",[["class","d-flex justify-content-center align-items-center mb-3"]],null,null,null,null,null)),(n()(),o["ɵted"](null,["\n "])),(n()(),o["ɵeld"](0,null,null,21,"ul",[["class","nav nav-pills"]],null,null,null,null,null)),(n()(),o["ɵted"](null,["\n "])),(n()(),o["ɵeld"](0,null,null,8,"li",[["class","nav-item"]],null,null,null,null,null)),(n()(),o["ɵted"](null,["\n "])),(n()(),o["ɵeld"](0,null,null,5,"a",[["class","nav-link"],["routerLink","demo"],["routerLinkActive","active"]],[[1,"target",0],[8,"href",4]],[[null,"click"]],function(n,l,e){var t=!0;if("click"===l){t=!1!==o["ɵnov"](n,22).onClick(e.button,e.ctrlKey,e.metaKey,e.shiftKey)&&t}return t},null,null)),o["ɵdid"](671744,[[2,4]],0,i.y,[i.c,i.a,r.LocationStrategy],{routerLink:[0,"routerLink"]},null),o["ɵdid"](1720320,null,2,i.z,[i.c,o.ElementRef,o.Renderer,o.ChangeDetectorRef],{routerLinkActive:[0,"routerLinkActive"]},null),o["ɵqud"](603979776,1,{links:1}),o["ɵqud"](603979776,2,{linksWithHrefs:1}),(n()(),o["ɵted"](null,["Demo"])),(n()(),o["ɵted"](null,["\n "])),(n()(),o["ɵted"](null,["\n "])),(n()(),o["ɵeld"](0,null,null,8,"li",[["class","nav-item"]],null,null,null,null,null)),(n()(),o["ɵted"](null,["\n "])),(n()(),o["ɵeld"](0,null,null,5,"a",[["class","nav-link"],["routerLink","readme"],["routerLinkActive","active"]],[[1,"target",0],[8,"href",4]],[[null,"click"]],function(n,l,e){var t=!0;if("click"===l){t=!1!==o["ɵnov"](n,32).onClick(e.button,e.ctrlKey,e.metaKey,e.shiftKey)&&t}return t},null,null)),o["ɵdid"](671744,[[4,4]],0,i.y,[i.c,i.a,r.LocationStrategy],{routerLink:[0,"routerLink"]},null),o["ɵdid"](1720320,null,2,i.z,[i.c,o.ElementRef,o.Renderer,o.ChangeDetectorRef],{routerLinkActive:[0,"routerLinkActive"]},null),o["ɵqud"](603979776,3,{links:1}),o["ɵqud"](603979776,4,{linksWithHrefs:1}),(n()(),o["ɵted"](null,["Readme"])),(n()(),o["ɵted"](null,["\n "])),(n()(),o["ɵted"](null,["\n "])),(n()(),o["ɵted"](null,["\n"])),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](16777216,null,null,1,"router-outlet",[],null,null,null,null,null)),o["ɵdid"](212992,null,0,i.A,[i.q,o.ViewContainerRef,o.ComponentFactoryResolver,[8,null],o.ChangeDetectorRef],null,null),(n()(),o["ɵted"](null,["\n"]))],function(n,l){n(l,22,0,"demo");n(l,23,0,"active");n(l,32,0,"readme");n(l,33,0,"active"),n(l,42,0)},function(n,l){n(l,21,0,o["ɵnov"](l,22).target,o["ɵnov"](l,22).href),n(l,31,0,o["ɵnov"](l,32).target,o["ɵnov"](l,32).href)})}function u(n){return o["ɵvid"](0,[(n()(),o["ɵeld"](0,null,null,1,"app-root",[],null,null,null,t,s)),o["ɵdid"](49152,null,0,a.a,[],null,null)],null,null)}var o=e("/oeL"),i=e("BkNc"),r=e("qbdv"),a=e("wQAS");e.d(l,"a",function(){return p});var d=[],s=o["ɵcrt"]({encapsulation:2,styles:d,data:{}}),p=o["ɵccf"]("app-root",a.a,u,{},{},[])},qtrl:function(n,l){function e(n){throw new Error("Cannot find module '"+n+"'.")}e.keys=function(){return[]},e.resolve=e,n.exports=e,e.id="qtrl"},tHX5:function(n,l,e){"use strict";function t(n){return o["ɵvid"](0,[(n()(),o["ɵeld"](0,null,null,1,"h4",[["class","mb-3 mt-5"]],null,null,null,null,null)),(n()(),o["ɵted"](null,["Limit and filter images"])),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,2,"image-upload",[["url","https://httpbin.org/status/200"]],null,null,null,i.a,i.b)),o["ɵdid"](638976,null,0,r.ImageUploadComponent,[a.ImageService],{max:[0,"max"],supportedExtensions:[1,"supportedExtensions"],url:[2,"url"]},null),o["ɵpad"](2),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,2,"pre",[],null,null,null,null,null)),(n()(),o["ɵeld"](0,null,null,1,"code",[["class","language-markup"]],null,null,null,null,null)),(n()(),o["ɵted"](null,[''])),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,1,"h5",[["class","mb-3 mt-3"]],null,null,null,null,null)),(n()(),o["ɵted"](null,["Manual filtering and editing"])),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,1,"image-upload",[["url","https://httpbin.org/status/200"]],null,null,null,i.a,i.b)),o["ɵdid"](638976,null,0,r.ImageUploadComponent,[a.ImageService],{beforeUpload:[0,"beforeUpload"],url:[1,"url"]},null),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,2,"pre",[],null,null,null,null,null)),(n()(),o["ɵeld"](0,null,null,1,"code",[["class","language-markup"]],null,null,null,null,null)),(n()(),o["ɵted"](null,[''])),(n()(),o["ɵted"](null,["\n\n"])),(n()(),o["ɵeld"](0,null,null,2,"pre",[],null,null,null,null,null)),(n()(),o["ɵeld"](0,null,null,1,"code",[["class","language-typescript"]],null,null,null,null,null)),(n()(),o["ɵted"](null,["private fileCounter = 0;\n\nonBeforeUpload = (metadata: UploadMetadata) => {\n if (this.fileCounter % 2 === 0) {\n metadata.abort = true;\n } else {\n // mutate the file or replace it entirely - metadata.file\n metadata.url = 'http://somewhereelse.com'\n }\n\n this.fileCounter++;\n return metadata;\n};"])),(n()(),o["ɵted"](null,["\n"]))],function(n,l){var e=l.component;n(l,4,0,2,n(l,5,0,"jpeg","png"),"https://httpbin.org/status/200");n(l,15,0,e.onBeforeUpload,"https://httpbin.org/status/200")},null)}function u(n){return o["ɵvid"](0,[(n()(),o["ɵeld"](0,null,null,1,"filter",[],null,null,null,t,p)),o["ɵdid"](49152,null,0,d.a,[],null,null)],null,null)}var o=e("/oeL"),i=e("3cdd"),r=e("1tl3"),a=(e.n(r),e("7fc5")),d=(e.n(a),e("h5VB"));e.d(l,"b",function(){return p}),l.a=t;var s=[],p=o["ɵcrt"]({encapsulation:2,styles:s,data:{}});o["ɵccf"]("filter",d.a,u,{},{},[])},wQAS:function(n,l,e){"use strict";e.d(l,"a",function(){return t});var t=function(){function n(){}return n}()}},[1]); \ No newline at end of file diff --git a/package.json b/package.json index 9fd85e7..495123a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "angular2-image-upload", - "version": "0.6.5", + "version": "1.0.0-rc.0", "description": "An angular component that uploads images using native browser upload or drag-n-drop.", "main": "index.js", "scripts": {