Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ngx-masonry

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-masonry - npm Package Compare versions

Comparing version 9.0.0 to 9.0.1

13

bundles/ngx-masonry.umd.js

@@ -285,12 +285,7 @@ (function (global, factory) {

NgxMasonryComponent.prototype.add = function (element) {
var isFirstItem = false;
// Check if first item
if (this._msnry.items.length === 0) {
isFirstItem = true;
}
// Tell Masonry that a child element has been added
this._msnry.appended(element);
// layout if first item
if (isFirstItem) {
this.layout();
// Check if first item
if (this._msnry.items.length === 1) {
this._msnry.layout();
}

@@ -372,3 +367,3 @@ };

NgxMasonryDirective.prototype.ngOnDestroy = function () {
if (this.images.size === 0) {
if (this.images.size === 0 && this.element.nativeElement.parentNode) {
this.parent.remove(this.element.nativeElement);

@@ -375,0 +370,0 @@ }

@@ -1,2 +0,2 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("masonry-layout"),require("@angular/core"),require("@angular/common")):"function"==typeof define&&define.amd?define("ngx-masonry",["exports","masonry-layout","@angular/core","@angular/common"],e):e((t=t||self)["ngx-masonry"]={},t.masonryLayout,t.ng.core,t.ng.common)}(this,(function(t,e,n,o){"use strict";e=e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e;var r;function i(t,e,n,o){var r,i=arguments.length,s=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(i<3?r(s):i>3?r(e,n,s):r(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s}function s(t,e){return function(n,o){e(n,o,t)}}function a(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],o=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&o>=t.length&&(t=void 0),{value:t&&t[o++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}var u=function(){function t(t,e){this.platformId=t,this._element=e,this.updateLayout=!1,this.layoutComplete=new n.EventEmitter,this.removeComplete=new n.EventEmitter}return t.prototype.ngOnInit=function(){var t=this;o.isPlatformBrowser(this.platformId)&&void 0===r&&(r=e),this.options||(this.options={}),this.options.itemSelector||(this.options.itemSelector="[ngxMasonryItem], ngxMasonryItem"),o.isPlatformBrowser(this.platformId)&&(this._msnry=new r(this._element.nativeElement,this.options),this._msnry.on("layoutComplete",(function(e){t.layoutComplete.emit(e)})),this._msnry.on("removeComplete",(function(e){t.removeComplete.emit(e)})))},t.prototype.ngOnChanges=function(t){t.updateLayout&&(t.updateLayout.firstChange||this.layout())},t.prototype.ngOnDestroy=function(){this._msnry&&this._msnry.destroy()},t.prototype.layout=function(){var t=this;setTimeout((function(){t._msnry.layout()}))},t.prototype.reloadItems=function(){var t=this;setTimeout((function(){t._msnry.reloadItems()}))},t.prototype.add=function(t){var e=!1;0===this._msnry.items.length&&(e=!0),this._msnry.appended(t),e&&this.layout()},t.prototype.remove=function(t){this._msnry.remove(t),this.layout()},t.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[n.PLATFORM_ID]}]},{type:n.ElementRef}]},i([n.Input()],t.prototype,"options",void 0),i([n.Input()],t.prototype,"updateLayout",void 0),i([n.Output()],t.prototype,"layoutComplete",void 0),i([n.Output()],t.prototype,"removeComplete",void 0),t=i([n.Component({selector:"[ngx-masonry], ngx-masonry",template:"<ng-content></ng-content>",styles:["\n\t\t:host {\n\t\t\tdisplay: block;\n\t\t}\n\t"]}),s(0,n.Inject(n.PLATFORM_ID))],t)}(),l=function(){function t(t,e,n){this.element=t,this.parent=e,this.renderer=n}return t.prototype.ngAfterViewInit=function(){var t,e,n=this,o=this.element.nativeElement.getElementsByTagName("img");if(0===o.length)this.parent.add(this.element.nativeElement);else{var r=function(t){i.renderer.listen(t,"load",(function(e){n.imageLoaded(t)})),i.renderer.listen(t,"error",(function(e){n.imageLoaded(t)}))},i=this;try{for(var s=a(o),u=s.next();!u.done;u=s.next()){r(u.value)}}catch(e){t={error:e}}finally{try{u&&!u.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}}this.images=new Set(o),this.watchForHtmlChanges()},t.prototype.ngOnDestroy=function(){0===this.images.size&&this.parent.remove(this.element.nativeElement)},t.prototype.imageLoaded=function(t){this.images.delete(t),0===this.images.size&&this.parent.add(this.element.nativeElement)},t.prototype.watchForHtmlChanges=function(){if(MutationObserver=window.MutationObserver||window.WebKitMutationObserver,MutationObserver){var t=this;new MutationObserver((function(e,n){t.parent.layout()})).observe(this.element.nativeElement,{subtree:!0,childList:!0})}},t.ctorParameters=function(){return[{type:n.ElementRef},{type:u,decorators:[{type:n.Inject,args:[n.forwardRef((function(){return u}))]}]},{type:n.Renderer2}]},t=i([n.Directive({selector:"[ngxMasonryItem], ngxMasonryItem"}),s(1,n.Inject(n.forwardRef((function(){return u}))))],t)}(),m=function(){function t(){}return t=i([n.NgModule({imports:[],declarations:[u,l],exports:[u,l]})],t)}();t.NgxMasonryComponent=u,t.NgxMasonryDirective=l,t.NgxMasonryModule=m,Object.defineProperty(t,"__esModule",{value:!0})}));
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("masonry-layout"),require("@angular/core"),require("@angular/common")):"function"==typeof define&&define.amd?define("ngx-masonry",["exports","masonry-layout","@angular/core","@angular/common"],e):e((t=t||self)["ngx-masonry"]={},t.masonryLayout,t.ng.core,t.ng.common)}(this,(function(t,e,n,o){"use strict";e=e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e;var r;function i(t,e,n,o){var r,i=arguments.length,s=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(i<3?r(s):i>3?r(e,n,s):r(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s}function s(t,e){return function(n,o){e(n,o,t)}}function a(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],o=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&o>=t.length&&(t=void 0),{value:t&&t[o++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}var u=function(){function t(t,e){this.platformId=t,this._element=e,this.updateLayout=!1,this.layoutComplete=new n.EventEmitter,this.removeComplete=new n.EventEmitter}return t.prototype.ngOnInit=function(){var t=this;o.isPlatformBrowser(this.platformId)&&void 0===r&&(r=e),this.options||(this.options={}),this.options.itemSelector||(this.options.itemSelector="[ngxMasonryItem], ngxMasonryItem"),o.isPlatformBrowser(this.platformId)&&(this._msnry=new r(this._element.nativeElement,this.options),this._msnry.on("layoutComplete",(function(e){t.layoutComplete.emit(e)})),this._msnry.on("removeComplete",(function(e){t.removeComplete.emit(e)})))},t.prototype.ngOnChanges=function(t){t.updateLayout&&(t.updateLayout.firstChange||this.layout())},t.prototype.ngOnDestroy=function(){this._msnry&&this._msnry.destroy()},t.prototype.layout=function(){var t=this;setTimeout((function(){t._msnry.layout()}))},t.prototype.reloadItems=function(){var t=this;setTimeout((function(){t._msnry.reloadItems()}))},t.prototype.add=function(t){this._msnry.appended(t),1===this._msnry.items.length&&this._msnry.layout()},t.prototype.remove=function(t){this._msnry.remove(t),this.layout()},t.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[n.PLATFORM_ID]}]},{type:n.ElementRef}]},i([n.Input()],t.prototype,"options",void 0),i([n.Input()],t.prototype,"updateLayout",void 0),i([n.Output()],t.prototype,"layoutComplete",void 0),i([n.Output()],t.prototype,"removeComplete",void 0),t=i([n.Component({selector:"[ngx-masonry], ngx-masonry",template:"<ng-content></ng-content>",styles:["\n\t\t:host {\n\t\t\tdisplay: block;\n\t\t}\n\t"]}),s(0,n.Inject(n.PLATFORM_ID))],t)}(),l=function(){function t(t,e,n){this.element=t,this.parent=e,this.renderer=n}return t.prototype.ngAfterViewInit=function(){var t,e,n=this,o=this.element.nativeElement.getElementsByTagName("img");if(0===o.length)this.parent.add(this.element.nativeElement);else{var r=function(t){i.renderer.listen(t,"load",(function(e){n.imageLoaded(t)})),i.renderer.listen(t,"error",(function(e){n.imageLoaded(t)}))},i=this;try{for(var s=a(o),u=s.next();!u.done;u=s.next()){r(u.value)}}catch(e){t={error:e}}finally{try{u&&!u.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}}this.images=new Set(o),this.watchForHtmlChanges()},t.prototype.ngOnDestroy=function(){0===this.images.size&&this.element.nativeElement.parentNode&&this.parent.remove(this.element.nativeElement)},t.prototype.imageLoaded=function(t){this.images.delete(t),0===this.images.size&&this.parent.add(this.element.nativeElement)},t.prototype.watchForHtmlChanges=function(){if(MutationObserver=window.MutationObserver||window.WebKitMutationObserver,MutationObserver){var t=this;new MutationObserver((function(e,n){t.parent.layout()})).observe(this.element.nativeElement,{subtree:!0,childList:!0})}},t.ctorParameters=function(){return[{type:n.ElementRef},{type:u,decorators:[{type:n.Inject,args:[n.forwardRef((function(){return u}))]}]},{type:n.Renderer2}]},t=i([n.Directive({selector:"[ngxMasonryItem], ngxMasonryItem"}),s(1,n.Inject(n.forwardRef((function(){return u}))))],t)}(),m=function(){function t(){}return t=i([n.NgModule({imports:[],declarations:[u,l],exports:[u,l]})],t)}();t.NgxMasonryComponent=u,t.NgxMasonryDirective=l,t.NgxMasonryModule=m,Object.defineProperty(t,"__esModule",{value:!0})}));
//# sourceMappingURL=ngx-masonry.umd.min.js.map

@@ -63,12 +63,7 @@ import { __decorate, __param } from "tslib";

add(element) {
let isFirstItem = false;
// Check if first item
if (this._msnry.items.length === 0) {
isFirstItem = true;
}
// Tell Masonry that a child element has been added
this._msnry.appended(element);
// layout if first item
if (isFirstItem) {
this.layout();
// Check if first item
if (this._msnry.items.length === 1) {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tslib";

ngOnDestroy() {
if (this.images.size === 0) {
if (this.images.size === 0 && this.element.nativeElement.parentNode) {
this.parent.remove(this.element.nativeElement);

@@ -46,3 +46,3 @@ }

const self = this;
const observer = new MutationObserver(function (mutations, observerFromElement) {
const observer = new MutationObserver((mutations, observerFromElement) => {
self.parent.layout();

@@ -71,2 +71,2 @@ });

export { NgxMasonryDirective };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LW1hc29ucnkuZGlyZWN0aXZlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vbmd4LW1hc29ucnkvIiwic291cmNlcyI6WyJsaWIvbmd4LW1hc29ucnkuZGlyZWN0aXZlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFNBQVMsRUFBRSxhQUFhLEVBQUUsU0FBUyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBRS9HLE9BQU8sRUFBRSxtQkFBbUIsRUFBRSxNQUFNLHlCQUF5QixDQUFDO0FBWTlELElBQWEsbUJBQW1CLEdBQWhDLE1BQWEsbUJBQW1CO0lBRzlCLFlBQ1UsT0FBbUIsRUFDNEIsTUFBMkIsRUFDMUUsUUFBbUI7UUFGbkIsWUFBTyxHQUFQLE9BQU8sQ0FBWTtRQUM0QixXQUFNLEdBQU4sTUFBTSxDQUFxQjtRQUMxRSxhQUFRLEdBQVIsUUFBUSxDQUFXO0lBQzFCLENBQUM7SUFFSixlQUFlO1FBQ1gsTUFBTSxNQUFNLEdBQUcsSUFBSSxDQUFDLE9BQU8sQ0FBQyxhQUFhLENBQUMsb0JBQW9CLENBQUMsS0FBSyxDQUFDLENBQUM7UUFDdEUsSUFBSSxNQUFNLENBQUMsTUFBTSxLQUFLLENBQUMsRUFBRTtZQUN2QixJQUFJLENBQUMsTUFBTSxDQUFDLEdBQUcsQ0F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ICAgIGNvbnN0IG9ic2VydmVyID0gbmV3IE11dGF0aW9uT2JzZXJ2ZXIoKG11dGF0aW9ucywgb2JzZXJ2ZXJGcm9tRWxlbWVudCkgPT4ge1xuICAgICAgICBzZWxmLnBhcmVudC5sYXlvdXQoKTtcbiAgICAgIH0pO1xuXG4gICAgICAvLyBkZWZpbmUgd2hhdCBlbGVtZW50IHNob3VsZCBiZSBvYnNlcnZlZCBieSB0aGUgb2JzZXJ2ZXJcbiAgICAgIC8vIGFuZCB3aGF0IHR5cGVzIG9mIG11dGF0aW9ucyB0cmlnZ2VyIHRoZSBjYWxsYmFja1xuICAgICAgb2JzZXJ2ZXIub2JzZXJ2ZSh0aGlzLmVsZW1lbnQubmF0aXZlRWxlbWVudCwge1xuICAgICAgICBzdWJ0cmVlOiB0cnVlLFxuICAgICAgICBjaGlsZExpc3Q6IHRydWVcbiAgICAgIH0pO1xuICAgIH1cbiAgfVxufVxuIl19

@@ -66,12 +66,7 @@ import { __decorate, __param } from "tslib";

NgxMasonryComponent.prototype.add = function (element) {
var isFirstItem = false;
// Check if first item
if (this._msnry.items.length === 0) {
isFirstItem = true;
}
// Tell Masonry that a child element has been added
this._msnry.appended(element);
// layout if first item
if (isFirstItem) {
this.layout();
// Check if first item
if (this._msnry.items.length === 1) {
this._msnry.layout();
}

@@ -112,2 +107,2 @@ };

export { NgxMasonryComponent };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LW1hc29ucnkuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6Im5nOi8vbmd4LW1hc29ucnkvIiwic291cmNlcyI6WyJsaWIvbmd4LW1hc29ucnkuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEVBQ0wsU0FBUyxFQUNULE1BQU0sRUFDTixTQUFTLEVBQ1QsYUFBYSxFQUNiLFNBQVMsRUFDVCxLQUFLLEVBQ0wsTUFBTSxFQUNOLF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aXMuX21zbnJ5LnJlbG9hZEl0ZW1zKCk7XG4gICAgfSk7XG4gIH1cblxuICAvLyBwdWJsaWMgYWRkKGVsZW1lbnQ6IEhUTUxFbGVtZW50LCBwcmVwZW5kOiBib29sZWFuID0gZmFsc2UpIHtcbiAgcHVibGljIGFkZChlbGVtZW50OiBIVE1MRWxlbWVudCkge1xuICAgIC8vIFRlbGwgTWFzb25yeSB0aGF0IGEgY2hpbGQgZWxlbWVudCBoYXMgYmVlbiBhZGRlZFxuICAgIHRoaXMuX21zbnJ5LmFwcGVuZGVkKGVsZW1lbnQpO1xuXG4gICAgLy8gQ2hlY2sgaWYgZmlyc3QgaXRlbVxuICAgIGlmICh0aGlzLl9tc25yeS5pdGVtcy5sZW5ndGggPT09IDEpIHtcbiAgICAgIHRoaXMuX21zbnJ5LmxheW91dCgpO1xuICAgIH1cbiAgfVxuXG4gIHB1YmxpYyByZW1vdmUoZWxlbWVudDogSFRNTEVsZW1lbnQpIHtcbiAgICAvLyBUZWxsIE1hc29ucnkgdGhhdCBhIGNoaWxkIGVsZW1lbnQgaGFzIGJlZW4gcmVtb3ZlZFxuICAgIHRoaXMuX21zbnJ5LnJlbW92ZShlbGVtZW50KTtcblxuICAgIC8vIExheW91dCBpdGVtc1xuICAgIHRoaXMubGF5b3V0KCk7XG4gIH1cbn1cbiJdfQ==

@@ -45,3 +45,3 @@ import { __decorate, __param, __values } from "tslib";

NgxMasonryDirective.prototype.ngOnDestroy = function () {
if (this.images.size === 0) {
if (this.images.size === 0 && this.element.nativeElement.parentNode) {
this.parent.remove(this.element.nativeElement);

@@ -87,2 +87,2 @@ }

export { NgxMasonryDirective };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LW1hc29ucnkuZGlyZWN0aXZlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vbmd4LW1hc29ucnkvIiwic291cmNlcyI6WyJsaWIvbmd4LW1hc29ucnkuZGlyZWN0aXZlLnRzIl0sI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gZWxlbWVudCBzaG91bGQgYmUgb2JzZXJ2ZWQgYnkgdGhlIG9ic2VydmVyXG4gICAgICAvLyBhbmQgd2hhdCB0eXBlcyBvZiBtdXRhdGlvbnMgdHJpZ2dlciB0aGUgY2FsbGJhY2tcbiAgICAgIG9ic2VydmVyLm9ic2VydmUodGhpcy5lbGVtZW50Lm5hdGl2ZUVsZW1lbnQsIHtcbiAgICAgICAgc3VidHJlZTogdHJ1ZSxcbiAgICAgICAgY2hpbGRMaXN0OiB0cnVlXG4gICAgICB9KTtcbiAgICB9XG4gIH1cbn1cbiJdfQ==

@@ -65,12 +65,7 @@ import masonryLayout from 'masonry-layout';

add(element) {
let isFirstItem = false;
// Check if first item
if (this._msnry.items.length === 0) {
isFirstItem = true;
}
// Tell Masonry that a child element has been added
this._msnry.appended(element);
// layout if first item
if (isFirstItem) {
this.layout();
// Check if first item
if (this._msnry.items.length === 1) {
this._msnry.layout();
}

@@ -139,3 +134,3 @@ }

ngOnDestroy() {
if (this.images.size === 0) {
if (this.images.size === 0 && this.element.nativeElement.parentNode) {
this.parent.remove(this.element.nativeElement);

@@ -156,3 +151,3 @@ }

const self = this;
const observer = new MutationObserver(function (mutations, observerFromElement) {
const observer = new MutationObserver((mutations, observerFromElement) => {
self.parent.layout();

@@ -159,0 +154,0 @@ });

@@ -68,12 +68,7 @@ import masonryLayout from 'masonry-layout';

NgxMasonryComponent.prototype.add = function (element) {
var isFirstItem = false;
// Check if first item
if (this._msnry.items.length === 0) {
isFirstItem = true;
}
// Tell Masonry that a child element has been added
this._msnry.appended(element);
// layout if first item
if (isFirstItem) {
this.layout();
// Check if first item
if (this._msnry.items.length === 1) {
this._msnry.layout();
}

@@ -155,3 +150,3 @@ };

NgxMasonryDirective.prototype.ngOnDestroy = function () {
if (this.images.size === 0) {
if (this.images.size === 0 && this.element.nativeElement.parentNode) {
this.parent.remove(this.element.nativeElement);

@@ -158,0 +153,0 @@ }

{
"name": "ngx-masonry",
"version": "9.0.0",
"version": "9.0.1",
"description": "Angular Module for displaying a feed of items in a masonry layout using https://github.com/desandro/masonry",

@@ -5,0 +5,0 @@ "keywords": [

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc