@cloudinary/angular-5.x
Advanced tools
Comparing version 1.5.3 to 1.5.4
@@ -627,3 +627,3 @@ (function (global, factory) { | ||
/** @type {?} */ | ||
var APP_VERSION = '1.5.3'; | ||
var APP_VERSION = '1.5.4'; | ||
@@ -630,0 +630,0 @@ /** |
@@ -15,3 +15,3 @@ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common")):"function"==typeof define&&define.amd?define("@cloudinary/angular-5.x",["exports","@angular/core","@angular/common"],e):e(((t=t||self).cloudinary=t.cloudinary||{},t.cloudinary["angular-5"]=t.cloudinary["angular-5"]||{},t.cloudinary["angular-5"].x={}),t.ng.core,t.ng.common)}(this,(function(t,e,n){"use strict"; | ||
and limitations under the License. | ||
***************************************************************************** */var i=function(){return(i=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function r(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)s.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return s}function o(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(r(arguments[e]));return t}var s=function(t){return t&&"string"==typeof t&&null!==t.trim().match(/^{[\s\S]*?}$/)},a=function(t){return t&&"string"==typeof t&&null!==t.trim().match(/^\[[\s\S]*?]$/)},c=function(t){return t&&("NamedNodeMap"===t.constructor.name||t instanceof NamedNodeMap)},l=function(t){var e={};return Object.keys(t).forEach((function(n){var i=t[n].name,r=t[n].value;e[i]=r})),e},u=function(t){var e=t;return s(t)||a(t)?(a(t)&&(t=t.replace(/'/g,'"')),e=JSON.parse(t)):c(t)&&(e=l(t)),Array.isArray(e)?e=e.map((function(t){return u(t)})):"object"==typeof e&&Object.keys(e).forEach((function(t){var n=t.replace(/-/g,"_").toLocaleLowerCase().replace(/^cld(-|_)?/,""),i=u(e[t]);delete e[t],e[n]=i})),e},p=function(){function t(t,e){t.CloudinaryJQuery?this._cloudinaryInstance=new t.CloudinaryJQuery(e):this._cloudinaryInstance=new t.Cloudinary(e)}return Object.defineProperty(t.prototype,"cloudinaryInstance",{get:function(){return this._cloudinaryInstance},enumerable:!0,configurable:!0}),t.prototype.config=function(){return this._cloudinaryInstance.config()},t.prototype.updateConfig=function(t){this._cloudinaryInstance.config(t)},t.prototype.url=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=this._cloudinaryInstance).url.apply(t,o(e))},t.prototype.imageTag=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=this._cloudinaryInstance).imageTag.apply(t,o(e))},t.prototype.videoTag=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=this._cloudinaryInstance).videoTag.apply(t,o(e))},t.prototype.responsive=function(t,e){this._cloudinaryInstance.cloudinary_update(t,e),this._cloudinaryInstance.responsive(e,!1)},t.prototype.toCloudinaryAttributes=function(t,e){var n=this,i=u(t);return e&&e.length>0&&(i.transformation=[],e.forEach((function(t){i.transformation.push(n.toCloudinaryAttributes(t.getAttributes()))}))),""!==i.responsive&&"true"!==i.responsive&&!0!==i.responsive||(i.responsive=!0),i},t}();var d=function(){return"undefined"!=typeof window},h=function(){function t(t){this.el=t}return t.prototype.getAttributes=function(){return this.el.nativeElement.attributes},t.decorators=[{type:e.Directive,args:[{selector:"cl-transformation"}]}],t.ctorParameters=function(){return[{type:e.ElementRef}]},t}();var y=function(){function t(t,e,n){this.cloudinary=t,this.renderer=e,this.el=n,this.options={}}return t.prototype.setWidth=function(t){this.itemWidth=t},t.prototype.setHeight=function(t){this.itemHeight=t},t.prototype.setPublicId=function(t){this.publicId=t},t.prototype.ngAfterContentChecked=function(){var t=this.cloudinary.imageTag(this.publicId,this.options);this.setElementAttributes(this.el.nativeElement.children[0],t.attributes()),this.placeholderImg=this.getPlaceholderImage()},t.prototype.getPlaceholderImage=function(){return"predominant-color"===this.type&&this.itemHeight&&this.itemWidth?this.cloudinary.url(this.publicId,i({placeholder:"predominant-color-pixel"},this.options)):this.cloudinary.url(this.publicId,i({placeholder:this.type||!0},this.options))},t.prototype.setElementAttributes=function(t,e){var n=this;Object.keys(e).forEach((function(i){"src"!==i&&"style"!==i&&n.renderer.setAttribute(t,i,e[i])}))},t.decorators=[{type:e.Component,args:[{selector:"cl-placeholder",template:'<img [src]="this.placeholderImg">'}]}],t.ctorParameters=function(){return[{type:p},{type:e.Renderer2},{type:e.ElementRef}]},t.propDecorators={type:[{type:e.Input,args:["type"]}],itemWidth:[{type:e.HostBinding,args:["style.width"]}],itemHeight:[{type:e.HostBinding,args:["style.height"]}],publicId:[{type:e.HostBinding,args:["attr.public-id"]}]},t}();var f={sdkSemver:"1.5.3",techVersion:e.VERSION.full,sdkCode:"K"},m=function(){function t(t,n,i){this.el=t,this.cloudinary=n,this.renderer=i,this.onLoad=new e.EventEmitter,this.onError=new e.EventEmitter,this.shouldShowPlaceHolder=!0,this.options={}}return t.prototype.ngOnInit=function(){var t=this;if(d()){this.observer=new MutationObserver((function(){t.loadImage()}));this.observer.observe(this.el.nativeElement,{attributes:!0,childList:!0})}},t.prototype.ngOnChanges=function(t){t.publicId&&!t.publicId.isFirstChange()&&this.loadImage()},t.prototype.ngOnDestroy=function(){this.observer&&this.observer.disconnect&&this.observer.disconnect()},t.prototype.ngAfterViewInit=function(){this.loadImage()},t.prototype.ngAfterContentChecked=function(){this.width&&this.placeholderComponent&&this.placeholderComponent.setWidth(this.width),this.height&&this.placeholderComponent&&this.placeholderComponent.setHeight(this.height),this.placeholderComponent&&this.placeholderComponent.setPublicId(this.publicId)},t.prototype.setPlaceHolderStyle=function(){this.shouldShowPlaceHolder?(this.renderer.setStyle(this.el.nativeElement.children[0],"opacity","0"),this.renderer.setStyle(this.el.nativeElement.children[0],"position","absolute")):this.renderer.removeAttribute(this.el.nativeElement.children[0],"style")},t.prototype.hasLoaded=function(){this.shouldShowPlaceHolder=!1},t.prototype.loadImage=function(){var t=this;if(d()){if(!this.publicId)throw new Error("You must set the public id of the image to load, e.g. <cl-image public-id={{photo.public_id}}...></cl-image>");var e=this.el.nativeElement,n=e.children[0];n.onload=function(e){t.onLoad.emit(e)},n.onerror=function(e){t.onError.emit(e)},this.options=this.cloudinary.toCloudinaryAttributes(e.attributes,this.transformations),(this.clientHints||void 0===this.clientHints&&this.cloudinary.config().client_hints)&&(delete this.options.class,delete this.options["data-src"],delete this.options.responsive),this.cloudinary.config().urlAnalytics&&(this.options=i({},f,this.options)),this.placeholderComponent&&this.placeholderHandler(this.options,n),this.accessibility&&(this.options.src=this.accessibilityModeHandler());var r=this.cloudinary.imageTag(this.publicId,this.options);this.setElementAttributes(n,r.attributes()),this.options.responsive&&this.cloudinary.responsive(n,this.options)}},t.prototype.setElementAttributes=function(t,e){var n=this;Object.keys(e).forEach((function(i){var r="src"===i&&"lazy"===n.loading?"data-src":i;n.renderer.setAttribute(t,r,e[i])})),this.placeholderComponent&&this.setPlaceHolderStyle()},t.prototype.placeholderHandler=function(t,e){var n=i({},t);n.width&&"auto"===n.width&&(n.width=e.getAttribute("data-width")),this.placeholderComponent.options=n},t.prototype.accessibilityModeHandler=function(){return this.cloudinary.url(this.publicId,i({accessibility:this.accessibility},this.options))},t.decorators=[{type:e.Component,args:[{selector:"cl-image",template:'<img (load)="hasLoaded()">\n <div *ngIf="placeholderComponent && shouldShowPlaceHolder" [style.display]="shouldShowPlaceHolder ? \'inline\' : \'none\'">\n <ng-content></ng-content>\n </div>\n '}]}],t.ctorParameters=function(){return[{type:e.ElementRef},{type:p},{type:e.Renderer2}]},t.propDecorators={publicId:[{type:e.Input,args:["public-id"]}],clientHints:[{type:e.Input,args:["client-hints"]}],loading:[{type:e.Input,args:["loading"]}],width:[{type:e.Input,args:["width"]}],height:[{type:e.Input,args:["height"]}],accessibility:[{type:e.Input,args:["accessibility"]}],transformations:[{type:e.ContentChildren,args:[h]}],placeholderComponent:[{type:e.ContentChild,args:[y]}],onLoad:[{type:e.Output}],onError:[{type:e.Output}]},t}();var g=function(){function t(t,n,i){this.el=t,this.cloudinary=n,this.platformId=i,this.play=new e.EventEmitter,this.loadstart=new e.EventEmitter,this.playing=new e.EventEmitter,this.error=new e.EventEmitter,this.ended=new e.EventEmitter}return t.prototype.ngOnInit=function(){var t=this;if("undefined"!=typeof MutationObserver){this.observer=new MutationObserver((function(){t.loadVideo(t.publicId)}));this.observer.observe(this.el.nativeElement,{attributes:!0,childList:!0})}},t.prototype.ngOnChanges=function(t){t.publicId&&!t.publicId.isFirstChange()&&this.loadVideo(t.publicId.currentValue)},t.prototype.ngOnDestroy=function(){this.observer&&this.observer.disconnect&&this.observer.disconnect()},t.prototype.ngAfterViewInit=function(){if(!this.publicId)throw new Error("You must set the public id of the video to load, e.g. <cl-video public-id={{video.public_id}}...></cl-video>");this.loadVideo(this.publicId)},t.prototype.loadVideo=function(t){if(n.isPlatformBrowser(this.platformId)){var e=this.el.nativeElement,i=e.children[0],r=this.cloudinary.toCloudinaryAttributes(e.attributes,this.transformations),o=this.cloudinary.videoTag(t,r);this.appendSourceElements(i,o.content()),this.setElementAttributes(i,o.attributes())}},t.prototype.setElementAttributes=function(t,e){Object.keys(e).forEach((function(n){t.setAttribute(n,e[n])}))},t.prototype.appendSourceElements=function(t,e){var n=document.createDocumentFragment();for(t.innerHTML=e;t.childNodes[0];)n.appendChild(t.childNodes[0]);t.appendChild(n)},t.prototype.emitPlayEvent=function(){this.play.emit()},t.prototype.emitLoadstartEvent=function(){this.loadstart.emit()},t.prototype.emitPlayingEvent=function(){this.playing.emit()},t.prototype.emitErrorEvent=function(){this.error.emit()},t.prototype.emitEndedEvent=function(){this.ended.emit()},t.decorators=[{type:e.Component,args:[{selector:"cl-video",template:'<video (play)="emitPlayEvent()" (loadstart)="emitLoadstartEvent()" (playing)="emitPlayingEvent()" (error)="emitErrorEvent" (ended)="emitEndedEvent"></video>'}]}],t.ctorParameters=function(){return[{type:e.ElementRef},{type:p},{type:Object,decorators:[{type:e.Inject,args:[e.PLATFORM_ID]}]}]},t.propDecorators={publicId:[{type:e.Input,args:["public-id"]}],play:[{type:e.Output}],loadstart:[{type:e.Output}],playing:[{type:e.Output}],error:[{type:e.Output}],ended:[{type:e.Output}],transformations:[{type:e.ContentChildren,args:[h]}]},t}();var v=function(){function t(t,e){this.el=t,this.cloudinary=e}return t.prototype.ngAfterViewInit=function(){if(d()){var t=void 0,e=void 0;this.clHref?(t="href",e=this.clHref):this.clSrc?(t="src",e=this.clSrc):this.clSrcset&&(t="srcset",e=this.clSrcset);var n=!1;if(this.clHref&&toString.call("[object SVGAnimatedString]"===this.el.nativeElement.href)&&(this.el.nativeElement.setAttribute("xlinkHref","xlink:href"),n=!0),!t||!e)throw new Error("Directive value is missing for clHref/clSrc/clSrcset");var i=this.el.nativeElement,r=this.cloudinary.toCloudinaryAttributes(i.attributes,this.transformations),o=this.cloudinary.url(e,r);this.el.nativeElement.setAttribute(t,o),this.el.nativeElement.ownerDocument.documentMode&&!n&&(this.el.nativeElement[t]=o)}},t.decorators=[{type:e.Directive,args:[{selector:"[clHref], [clSrc], [clSrcset]"}]}],t.ctorParameters=function(){return[{type:e.ElementRef},{type:p}]},t.propDecorators={clHref:[{type:e.Input}],clSrc:[{type:e.Input}],clSrcset:[{type:e.Input}],transformations:[{type:e.ContentChildren,args:[h]}]},t}();var b=function(){function t(t,e,n){this.renderer=t,this.el=e,this.cloudinary=n,this.position="center"}return t.prototype.isBrowser=function(){return"undefined"!=typeof window},t.prototype.ngAfterViewInit=function(){if(this.isBrowser()){var t=this.el.nativeElement,e=this.cloudinary.toCloudinaryAttributes(t.attributes,this.transformations),n=this.cloudinary.url(this.clBackgroundImage,e);this.renderer.setStyle(t,"background-image","url('"+n+"')"),this.renderer.setStyle(t,"background-repeat","no-repeat"),this.renderer.setStyle(t,"background-position",this.position)}},t.decorators=[{type:e.Directive,args:[{selector:"[clBackgroundImage]"}]}],t.ctorParameters=function(){return[{type:e.Renderer2},{type:e.ElementRef},{type:p}]},t.propDecorators={clBackgroundImage:[{type:e.Input}],position:[{type:e.Input}],transformations:[{type:e.ContentChildren,args:[h]}]},t}();var I=function(){function t(t){this.el=t}return t.prototype.ngAfterViewInit=function(){d()&&(!this.isNativeLazyLoadSupported()&&this.isLazyLoadSupported()?this.lazyLoad():this.loadImage())},t.prototype.loadImage=function(){var t=this.el.nativeElement.children[0];t.setAttribute("src",t.dataset.src)},t.prototype.isLazyLoadSupported=function(){return window&&"IntersectionObserver"in window},t.prototype.isNativeLazyLoadSupported=function(){return"loading"in HTMLImageElement.prototype},t.prototype.lazyLoad=function(){var t=this,e={rootMargin:"0px 0px -50% 0px"},n=new IntersectionObserver((function(i){i.forEach((function(e){e.isIntersecting&&(t.loadImage(),n.unobserve(e.target))}),e)}));n.observe(this.el.nativeElement)},t.decorators=[{type:e.Directive,args:[{selector:"cl-image[loading=lazy]"}]}],t.ctorParameters=function(){return[{type:e.ElementRef}]},t}();var E=new e.InjectionToken("CLOUDINARY_LIB"),C=new e.InjectionToken("CLOUDINARY_CONFIGURATION");function w(t,e){return new p(t,e)}var O=function(){function t(){}return t.forRoot=function(e,n){return{ngModule:t,providers:[{provide:E,useValue:e},{provide:C,useValue:n},{provide:p,useFactory:w,deps:[E,C]}]}},t.decorators=[{type:e.NgModule,args:[{imports:[n.CommonModule],declarations:[v,b,m,g,h,I,y],exports:[v,b,m,g,h,I,y]}]}],t}();t.CLOUDINARY_CONFIGURATION=C,t.CLOUDINARY_LIB=E,t.Cloudinary=p,t.CloudinaryBackgroundImageDirective=b,t.CloudinaryImage=m,t.CloudinaryImageSourceDirective=v,t.CloudinaryModule=O,t.CloudinaryPlaceHolder=y,t.CloudinaryTransformationDirective=h,t.CloudinaryVideo=g,t.LazyLoadDirective=I,t.createCloudinary=w,t.isBrowser=d,t.isJsonLikeString=s,t.isNamedNodeMap=c,t.namedNodeMapToObject=l,t.provideCloudinary=function(t,e){return{provide:p,useFactory:function(){return new p(t,e)}}},t.transformKeyNames=u,Object.defineProperty(t,"__esModule",{value:!0})})); | ||
***************************************************************************** */var i=function(){return(i=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function r(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)s.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return s}function o(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(r(arguments[e]));return t}var s=function(t){return t&&"string"==typeof t&&null!==t.trim().match(/^{[\s\S]*?}$/)},a=function(t){return t&&"string"==typeof t&&null!==t.trim().match(/^\[[\s\S]*?]$/)},c=function(t){return t&&("NamedNodeMap"===t.constructor.name||t instanceof NamedNodeMap)},l=function(t){var e={};return Object.keys(t).forEach((function(n){var i=t[n].name,r=t[n].value;e[i]=r})),e},u=function(t){var e=t;return s(t)||a(t)?(a(t)&&(t=t.replace(/'/g,'"')),e=JSON.parse(t)):c(t)&&(e=l(t)),Array.isArray(e)?e=e.map((function(t){return u(t)})):"object"==typeof e&&Object.keys(e).forEach((function(t){var n=t.replace(/-/g,"_").toLocaleLowerCase().replace(/^cld(-|_)?/,""),i=u(e[t]);delete e[t],e[n]=i})),e},p=function(){function t(t,e){t.CloudinaryJQuery?this._cloudinaryInstance=new t.CloudinaryJQuery(e):this._cloudinaryInstance=new t.Cloudinary(e)}return Object.defineProperty(t.prototype,"cloudinaryInstance",{get:function(){return this._cloudinaryInstance},enumerable:!0,configurable:!0}),t.prototype.config=function(){return this._cloudinaryInstance.config()},t.prototype.updateConfig=function(t){this._cloudinaryInstance.config(t)},t.prototype.url=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=this._cloudinaryInstance).url.apply(t,o(e))},t.prototype.imageTag=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=this._cloudinaryInstance).imageTag.apply(t,o(e))},t.prototype.videoTag=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=this._cloudinaryInstance).videoTag.apply(t,o(e))},t.prototype.responsive=function(t,e){this._cloudinaryInstance.cloudinary_update(t,e),this._cloudinaryInstance.responsive(e,!1)},t.prototype.toCloudinaryAttributes=function(t,e){var n=this,i=u(t);return e&&e.length>0&&(i.transformation=[],e.forEach((function(t){i.transformation.push(n.toCloudinaryAttributes(t.getAttributes()))}))),""!==i.responsive&&"true"!==i.responsive&&!0!==i.responsive||(i.responsive=!0),i},t}();var d=function(){return"undefined"!=typeof window},h=function(){function t(t){this.el=t}return t.prototype.getAttributes=function(){return this.el.nativeElement.attributes},t.decorators=[{type:e.Directive,args:[{selector:"cl-transformation"}]}],t.ctorParameters=function(){return[{type:e.ElementRef}]},t}();var y=function(){function t(t,e,n){this.cloudinary=t,this.renderer=e,this.el=n,this.options={}}return t.prototype.setWidth=function(t){this.itemWidth=t},t.prototype.setHeight=function(t){this.itemHeight=t},t.prototype.setPublicId=function(t){this.publicId=t},t.prototype.ngAfterContentChecked=function(){var t=this.cloudinary.imageTag(this.publicId,this.options);this.setElementAttributes(this.el.nativeElement.children[0],t.attributes()),this.placeholderImg=this.getPlaceholderImage()},t.prototype.getPlaceholderImage=function(){return"predominant-color"===this.type&&this.itemHeight&&this.itemWidth?this.cloudinary.url(this.publicId,i({placeholder:"predominant-color-pixel"},this.options)):this.cloudinary.url(this.publicId,i({placeholder:this.type||!0},this.options))},t.prototype.setElementAttributes=function(t,e){var n=this;Object.keys(e).forEach((function(i){"src"!==i&&"style"!==i&&n.renderer.setAttribute(t,i,e[i])}))},t.decorators=[{type:e.Component,args:[{selector:"cl-placeholder",template:'<img [src]="this.placeholderImg">'}]}],t.ctorParameters=function(){return[{type:p},{type:e.Renderer2},{type:e.ElementRef}]},t.propDecorators={type:[{type:e.Input,args:["type"]}],itemWidth:[{type:e.HostBinding,args:["style.width"]}],itemHeight:[{type:e.HostBinding,args:["style.height"]}],publicId:[{type:e.HostBinding,args:["attr.public-id"]}]},t}();var f={sdkSemver:"1.5.4",techVersion:e.VERSION.full,sdkCode:"K"},m=function(){function t(t,n,i){this.el=t,this.cloudinary=n,this.renderer=i,this.onLoad=new e.EventEmitter,this.onError=new e.EventEmitter,this.shouldShowPlaceHolder=!0,this.options={}}return t.prototype.ngOnInit=function(){var t=this;if(d()){this.observer=new MutationObserver((function(){t.loadImage()}));this.observer.observe(this.el.nativeElement,{attributes:!0,childList:!0})}},t.prototype.ngOnChanges=function(t){t.publicId&&!t.publicId.isFirstChange()&&this.loadImage()},t.prototype.ngOnDestroy=function(){this.observer&&this.observer.disconnect&&this.observer.disconnect()},t.prototype.ngAfterViewInit=function(){this.loadImage()},t.prototype.ngAfterContentChecked=function(){this.width&&this.placeholderComponent&&this.placeholderComponent.setWidth(this.width),this.height&&this.placeholderComponent&&this.placeholderComponent.setHeight(this.height),this.placeholderComponent&&this.placeholderComponent.setPublicId(this.publicId)},t.prototype.setPlaceHolderStyle=function(){this.shouldShowPlaceHolder?(this.renderer.setStyle(this.el.nativeElement.children[0],"opacity","0"),this.renderer.setStyle(this.el.nativeElement.children[0],"position","absolute")):this.renderer.removeAttribute(this.el.nativeElement.children[0],"style")},t.prototype.hasLoaded=function(){this.shouldShowPlaceHolder=!1},t.prototype.loadImage=function(){var t=this;if(d()){if(!this.publicId)throw new Error("You must set the public id of the image to load, e.g. <cl-image public-id={{photo.public_id}}...></cl-image>");var e=this.el.nativeElement,n=e.children[0];n.onload=function(e){t.onLoad.emit(e)},n.onerror=function(e){t.onError.emit(e)},this.options=this.cloudinary.toCloudinaryAttributes(e.attributes,this.transformations),(this.clientHints||void 0===this.clientHints&&this.cloudinary.config().client_hints)&&(delete this.options.class,delete this.options["data-src"],delete this.options.responsive),this.cloudinary.config().urlAnalytics&&(this.options=i({},f,this.options)),this.placeholderComponent&&this.placeholderHandler(this.options,n),this.accessibility&&(this.options.src=this.accessibilityModeHandler());var r=this.cloudinary.imageTag(this.publicId,this.options);this.setElementAttributes(n,r.attributes()),this.options.responsive&&this.cloudinary.responsive(n,this.options)}},t.prototype.setElementAttributes=function(t,e){var n=this;Object.keys(e).forEach((function(i){var r="src"===i&&"lazy"===n.loading?"data-src":i;n.renderer.setAttribute(t,r,e[i])})),this.placeholderComponent&&this.setPlaceHolderStyle()},t.prototype.placeholderHandler=function(t,e){var n=i({},t);n.width&&"auto"===n.width&&(n.width=e.getAttribute("data-width")),this.placeholderComponent.options=n},t.prototype.accessibilityModeHandler=function(){return this.cloudinary.url(this.publicId,i({accessibility:this.accessibility},this.options))},t.decorators=[{type:e.Component,args:[{selector:"cl-image",template:'<img (load)="hasLoaded()">\n <div *ngIf="placeholderComponent && shouldShowPlaceHolder" [style.display]="shouldShowPlaceHolder ? \'inline\' : \'none\'">\n <ng-content></ng-content>\n </div>\n '}]}],t.ctorParameters=function(){return[{type:e.ElementRef},{type:p},{type:e.Renderer2}]},t.propDecorators={publicId:[{type:e.Input,args:["public-id"]}],clientHints:[{type:e.Input,args:["client-hints"]}],loading:[{type:e.Input,args:["loading"]}],width:[{type:e.Input,args:["width"]}],height:[{type:e.Input,args:["height"]}],accessibility:[{type:e.Input,args:["accessibility"]}],transformations:[{type:e.ContentChildren,args:[h]}],placeholderComponent:[{type:e.ContentChild,args:[y]}],onLoad:[{type:e.Output}],onError:[{type:e.Output}]},t}();var g=function(){function t(t,n,i){this.el=t,this.cloudinary=n,this.platformId=i,this.play=new e.EventEmitter,this.loadstart=new e.EventEmitter,this.playing=new e.EventEmitter,this.error=new e.EventEmitter,this.ended=new e.EventEmitter}return t.prototype.ngOnInit=function(){var t=this;if("undefined"!=typeof MutationObserver){this.observer=new MutationObserver((function(){t.loadVideo(t.publicId)}));this.observer.observe(this.el.nativeElement,{attributes:!0,childList:!0})}},t.prototype.ngOnChanges=function(t){t.publicId&&!t.publicId.isFirstChange()&&this.loadVideo(t.publicId.currentValue)},t.prototype.ngOnDestroy=function(){this.observer&&this.observer.disconnect&&this.observer.disconnect()},t.prototype.ngAfterViewInit=function(){if(!this.publicId)throw new Error("You must set the public id of the video to load, e.g. <cl-video public-id={{video.public_id}}...></cl-video>");this.loadVideo(this.publicId)},t.prototype.loadVideo=function(t){if(n.isPlatformBrowser(this.platformId)){var e=this.el.nativeElement,i=e.children[0],r=this.cloudinary.toCloudinaryAttributes(e.attributes,this.transformations),o=this.cloudinary.videoTag(t,r);this.appendSourceElements(i,o.content()),this.setElementAttributes(i,o.attributes())}},t.prototype.setElementAttributes=function(t,e){Object.keys(e).forEach((function(n){t.setAttribute(n,e[n])}))},t.prototype.appendSourceElements=function(t,e){var n=document.createDocumentFragment();for(t.innerHTML=e;t.childNodes[0];)n.appendChild(t.childNodes[0]);t.appendChild(n)},t.prototype.emitPlayEvent=function(){this.play.emit()},t.prototype.emitLoadstartEvent=function(){this.loadstart.emit()},t.prototype.emitPlayingEvent=function(){this.playing.emit()},t.prototype.emitErrorEvent=function(){this.error.emit()},t.prototype.emitEndedEvent=function(){this.ended.emit()},t.decorators=[{type:e.Component,args:[{selector:"cl-video",template:'<video (play)="emitPlayEvent()" (loadstart)="emitLoadstartEvent()" (playing)="emitPlayingEvent()" (error)="emitErrorEvent" (ended)="emitEndedEvent"></video>'}]}],t.ctorParameters=function(){return[{type:e.ElementRef},{type:p},{type:Object,decorators:[{type:e.Inject,args:[e.PLATFORM_ID]}]}]},t.propDecorators={publicId:[{type:e.Input,args:["public-id"]}],play:[{type:e.Output}],loadstart:[{type:e.Output}],playing:[{type:e.Output}],error:[{type:e.Output}],ended:[{type:e.Output}],transformations:[{type:e.ContentChildren,args:[h]}]},t}();var v=function(){function t(t,e){this.el=t,this.cloudinary=e}return t.prototype.ngAfterViewInit=function(){if(d()){var t=void 0,e=void 0;this.clHref?(t="href",e=this.clHref):this.clSrc?(t="src",e=this.clSrc):this.clSrcset&&(t="srcset",e=this.clSrcset);var n=!1;if(this.clHref&&toString.call("[object SVGAnimatedString]"===this.el.nativeElement.href)&&(this.el.nativeElement.setAttribute("xlinkHref","xlink:href"),n=!0),!t||!e)throw new Error("Directive value is missing for clHref/clSrc/clSrcset");var i=this.el.nativeElement,r=this.cloudinary.toCloudinaryAttributes(i.attributes,this.transformations),o=this.cloudinary.url(e,r);this.el.nativeElement.setAttribute(t,o),this.el.nativeElement.ownerDocument.documentMode&&!n&&(this.el.nativeElement[t]=o)}},t.decorators=[{type:e.Directive,args:[{selector:"[clHref], [clSrc], [clSrcset]"}]}],t.ctorParameters=function(){return[{type:e.ElementRef},{type:p}]},t.propDecorators={clHref:[{type:e.Input}],clSrc:[{type:e.Input}],clSrcset:[{type:e.Input}],transformations:[{type:e.ContentChildren,args:[h]}]},t}();var b=function(){function t(t,e,n){this.renderer=t,this.el=e,this.cloudinary=n,this.position="center"}return t.prototype.isBrowser=function(){return"undefined"!=typeof window},t.prototype.ngAfterViewInit=function(){if(this.isBrowser()){var t=this.el.nativeElement,e=this.cloudinary.toCloudinaryAttributes(t.attributes,this.transformations),n=this.cloudinary.url(this.clBackgroundImage,e);this.renderer.setStyle(t,"background-image","url('"+n+"')"),this.renderer.setStyle(t,"background-repeat","no-repeat"),this.renderer.setStyle(t,"background-position",this.position)}},t.decorators=[{type:e.Directive,args:[{selector:"[clBackgroundImage]"}]}],t.ctorParameters=function(){return[{type:e.Renderer2},{type:e.ElementRef},{type:p}]},t.propDecorators={clBackgroundImage:[{type:e.Input}],position:[{type:e.Input}],transformations:[{type:e.ContentChildren,args:[h]}]},t}();var I=function(){function t(t){this.el=t}return t.prototype.ngAfterViewInit=function(){d()&&(!this.isNativeLazyLoadSupported()&&this.isLazyLoadSupported()?this.lazyLoad():this.loadImage())},t.prototype.loadImage=function(){var t=this.el.nativeElement.children[0];t.setAttribute("src",t.dataset.src)},t.prototype.isLazyLoadSupported=function(){return window&&"IntersectionObserver"in window},t.prototype.isNativeLazyLoadSupported=function(){return"loading"in HTMLImageElement.prototype},t.prototype.lazyLoad=function(){var t=this,e={rootMargin:"0px 0px -50% 0px"},n=new IntersectionObserver((function(i){i.forEach((function(e){e.isIntersecting&&(t.loadImage(),n.unobserve(e.target))}),e)}));n.observe(this.el.nativeElement)},t.decorators=[{type:e.Directive,args:[{selector:"cl-image[loading=lazy]"}]}],t.ctorParameters=function(){return[{type:e.ElementRef}]},t}();var E=new e.InjectionToken("CLOUDINARY_LIB"),C=new e.InjectionToken("CLOUDINARY_CONFIGURATION");function w(t,e){return new p(t,e)}var O=function(){function t(){}return t.forRoot=function(e,n){return{ngModule:t,providers:[{provide:E,useValue:e},{provide:C,useValue:n},{provide:p,useFactory:w,deps:[E,C]}]}},t.decorators=[{type:e.NgModule,args:[{imports:[n.CommonModule],declarations:[v,b,m,g,h,I,y],exports:[v,b,m,g,h,I,y]}]}],t}();t.CLOUDINARY_CONFIGURATION=C,t.CLOUDINARY_LIB=E,t.Cloudinary=p,t.CloudinaryBackgroundImageDirective=b,t.CloudinaryImage=m,t.CloudinaryImageSourceDirective=v,t.CloudinaryModule=O,t.CloudinaryPlaceHolder=y,t.CloudinaryTransformationDirective=h,t.CloudinaryVideo=g,t.LazyLoadDirective=I,t.createCloudinary=w,t.isBrowser=d,t.isJsonLikeString=s,t.isNamedNodeMap=c,t.namedNodeMapToObject=l,t.provideCloudinary=function(t,e){return{provide:p,useFactory:function(){return new p(t,e)}}},t.transformKeyNames=u,Object.defineProperty(t,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=cloudinary-angular-5.x.umd.min.js.map |
@@ -0,2 +1,8 @@ | ||
1.5.4 | ||
1.5.4 / 2024-06-24 | ||
================== | ||
* Upgrade photo_album_with_jquery packages | ||
1.5.3 / 2022-06-12 | ||
@@ -3,0 +9,0 @@ ============= |
@@ -6,3 +6,3 @@ /** | ||
/** @type {?} */ | ||
export let APP_VERSION = '1.5.3'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVyc2lvbi5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BjbG91ZGluYXJ5L2FuZ3VsYXItNS54LyIsInNvdXJjZXMiOlsibGliL3ZlcnNpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxNQUFNLEtBQUssV0FBVyxHQUFHLE9BQU8iLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgbGV0IEFQUF9WRVJTSU9OID0gJzEuNS4zJztcbiJdfQ== | ||
export let APP_VERSION = '1.5.4'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVyc2lvbi5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BjbG91ZGluYXJ5L2FuZ3VsYXItNS54LyIsInNvdXJjZXMiOlsibGliL3ZlcnNpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxNQUFNLEtBQUssV0FBVyxHQUFHLE9BQU8iLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgbGV0IEFQUF9WRVJTSU9OID0gJzEuNS40JztcbiJdfQ== |
@@ -6,3 +6,3 @@ /** | ||
/** @type {?} */ | ||
export var APP_VERSION = '1.5.3'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVyc2lvbi5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BjbG91ZGluYXJ5L2FuZ3VsYXItNS54LyIsInNvdXJjZXMiOlsibGliL3ZlcnNpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxNQUFNLEtBQUssV0FBVyxHQUFHLE9BQU8iLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgbGV0IEFQUF9WRVJTSU9OID0gJzEuNS4zJztcbiJdfQ== | ||
export var APP_VERSION = '1.5.4'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVyc2lvbi5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BjbG91ZGluYXJ5L2FuZ3VsYXItNS54LyIsInNvdXJjZXMiOlsibGliL3ZlcnNpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxNQUFNLEtBQUssV0FBVyxHQUFHLE9BQU8iLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgbGV0IEFQUF9WRVJTSU9OID0gJzEuNS40JztcbiJdfQ== |
@@ -352,3 +352,3 @@ import { Directive, ElementRef, Component, Renderer2, Input, HostBinding, VERSION, EventEmitter, ContentChildren, ContentChild, Output, Inject, PLATFORM_ID, InjectionToken, NgModule } from '@angular/core'; | ||
/** @type {?} */ | ||
let APP_VERSION = '1.5.3'; | ||
let APP_VERSION = '1.5.4'; | ||
@@ -355,0 +355,0 @@ /** |
@@ -428,3 +428,3 @@ import { __spread, __assign } from 'tslib'; | ||
/** @type {?} */ | ||
var APP_VERSION = '1.5.3'; | ||
var APP_VERSION = '1.5.4'; | ||
@@ -431,0 +431,0 @@ /** |
{ | ||
"name": "@cloudinary/angular-5.x", | ||
"version": "1.5.3", | ||
"version": "1.5.4", | ||
"description": "This is a legacy package, please find latest at https://www.npmjs.com/package/@cloudinary/ng", | ||
@@ -5,0 +5,0 @@ "peerDependencies": { |
Cloudinary Angular SDK | ||
========================= | ||
## About | ||
**NOTE-IMPORTANT**: This is a legacy package, please find latest at https://github.com/cloudinary/frontend-frameworks/tree/master/packages/angular | ||
The Cloudinary Angular SDK allows you to quickly and easily integrate your application with Cloudinary. | ||
@@ -5,0 +7,0 @@ Effortlessly optimize, transform, and manage your cloud's assets. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
633987
105