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

ngx-slick-carousel

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-slick-carousel - npm Package Compare versions

Comparing version 0.2.9 to 0.3.0

README.MD

32

bundles/ngx-slick-carousel.umd.js
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/forms'), require('@angular/common')) :
typeof define === 'function' && define.amd ? define('ngx-slick-carousel', ['exports', '@angular/core', '@angular/forms', '@angular/common'], factory) :
(factory((global['ngx-slick-carousel'] = {}),global.ng.core,global.ng.forms,global.ng.common));
}(this, (function (exports,core,forms,common) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/forms')) :
typeof define === 'function' && define.amd ? define('ngx-slick-carousel', ['exports', '@angular/common', '@angular/core', '@angular/forms'], factory) :
(factory((global['ngx-slick-carousel'] = {}),global.ng.common,global.ng.core,global.ng.forms));
}(this, (function (exports,common,core,forms) { 'use strict';

@@ -66,2 +66,3 @@ var SlickCarouselComponent = (function () {

function (slickItem) {
var _this = this;
if (!this.initialized) {

@@ -71,9 +72,14 @@ this.initSlick();

this.slides.push(slickItem);
this.$instance.slick('slickAdd', slickItem.el.nativeElement);
this.zone.runOutsideAngular(function () {
_this.$instance.slick('slickAdd', slickItem.el.nativeElement);
});
};
SlickCarouselComponent.prototype.removeSlide =
function (slickItem) {
var _this = this;
var idx = this.slides.indexOf(slickItem);
this.$instance.slick('slickRemove', idx);
this.slides = this.slides.filter(function (s) { return s !== slickItem; });
this.zone.runOutsideAngular(function () {
_this.$instance.slick('slickRemove', idx);
});
};

@@ -83,3 +89,3 @@ SlickCarouselComponent.prototype.slickGoTo =

var _this = this;
this.zone.run(function () {
this.zone.runOutsideAngular(function () {
_this.$instance.slick('slickGoTo', index);

@@ -91,3 +97,3 @@ });

var _this = this;
this.zone.run(function () {
this.zone.runOutsideAngular(function () {
_this.$instance.slick('slickNext');

@@ -99,3 +105,3 @@ });

var _this = this;
this.zone.run(function () {
this.zone.runOutsideAngular(function () {
_this.$instance.slick('slickPrev');

@@ -107,3 +113,3 @@ });

var _this = this;
this.zone.run(function () {
this.zone.runOutsideAngular(function () {
_this.$instance.slick('slickPause');

@@ -115,3 +121,3 @@ });

var _this = this;
this.zone.run(function () {
this.zone.runOutsideAngular(function () {
_this.$instance.slick('slickPlay');

@@ -123,6 +129,6 @@ });

var _this = this;
this.zone.run(function () {
this.zone.runOutsideAngular(function () {
_this.$instance.slick('unslick');
_this.initialized = false;
});
this.initialized = false;
};

@@ -129,0 +135,0 @@ SlickCarouselComponent.decorators = [

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

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/forms"),require("@angular/common")):"function"==typeof define&&define.amd?define("ngx-slick-carousel",["exports","@angular/core","@angular/forms","@angular/common"],e):e(t["ngx-slick-carousel"]={},t.ng.core,t.ng.forms,t.ng.common)}(this,function(t,n,e,i){"use strict";var o=function(){function t(t,e){this.el=t,this.zone=e,this.afterChange=new n.EventEmitter,this.beforeChange=new n.EventEmitter,this.breakpoint=new n.EventEmitter,this.destroy=new n.EventEmitter,this.init=new n.EventEmitter,this.slides=[],this.initialized=!1}return t.prototype.ngOnDestroy=function(){this.unslick()},t.prototype.ngAfterViewInit=function(){},t.prototype.initSlick=function(){var o=this;this.zone.runOutsideAngular(function(){o.$instance=jQuery(o.el.nativeElement),o.$instance.on("init",function(t,e){o.zone.run(function(){o.init.emit({event:t,slick:e})})}),o.$instance.slick(o.config),o.zone.run(function(){o.initialized=!0,o.currentIndex=o.config&&o.config.initialSlide?o.config.initialSlide:0}),o.$instance.on("afterChange",function(t,e,n){o.zone.run(function(){o.afterChange.emit({event:t,slick:e,currentSlide:n}),o.currentIndex=n})}),o.$instance.on("beforeChange",function(t,e,n,i){o.zone.run(function(){o.beforeChange.emit({event:t,slick:e,currentSlide:n,nextSlide:i})})}),o.$instance.on("breakpoint",function(t,e,n){o.zone.run(function(){o.breakpoint.emit({event:t,slick:e,breakpoint:n})})}),o.$instance.on("destroy",function(t,e){o.zone.run(function(){o.destroy.emit({event:t,slick:e})})})})},t.prototype.addSlide=function(t){this.initialized||this.initSlick(),this.slides.push(t),this.$instance.slick("slickAdd",t.el.nativeElement)},t.prototype.removeSlide=function(e){var t=this.slides.indexOf(e);this.$instance.slick("slickRemove",t),this.slides=this.slides.filter(function(t){return t!==e})},t.prototype.slickGoTo=function(t){var e=this;this.zone.run(function(){e.$instance.slick("slickGoTo",t)})},t.prototype.slickNext=function(){var t=this;this.zone.run(function(){t.$instance.slick("slickNext")})},t.prototype.slickPrev=function(){var t=this;this.zone.run(function(){t.$instance.slick("slickPrev")})},t.prototype.slickPause=function(){var t=this;this.zone.run(function(){t.$instance.slick("slickPause")})},t.prototype.slickPlay=function(){var t=this;this.zone.run(function(){t.$instance.slick("slickPlay")})},t.prototype.unslick=function(){var t=this;this.zone.run(function(){t.$instance.slick("unslick"),t.initialized=!1})},t.decorators=[{type:n.Component,args:[{selector:"ngx-slick-carousel",exportAs:"slick-carousel",providers:[{provide:e.NG_VALUE_ACCESSOR,useExisting:n.forwardRef(function(){return t}),multi:!0}],template:"<ng-content></ng-content>"}]}],t.ctorParameters=function(){return[{type:n.ElementRef},{type:n.NgZone}]},t.propDecorators={config:[{type:n.Input}],afterChange:[{type:n.Output}],beforeChange:[{type:n.Output}],breakpoint:[{type:n.Output}],destroy:[{type:n.Output}],init:[{type:n.Output}]},t}(),r=function(){function t(t,e,n){this.el=t,this.platformId=e,this.carousel=n}return t.prototype.ngAfterViewInit=function(){i.isPlatformBrowser(this.platformId)&&this.carousel.addSlide(this)},t.prototype.ngOnDestroy=function(){i.isPlatformBrowser(this.platformId)&&this.carousel.removeSlide(this)},t.decorators=[{type:n.Directive,args:[{selector:"[ngxSlickItem]"}]}],t.ctorParameters=function(){return[{type:n.ElementRef},{type:undefined,decorators:[{type:n.Inject,args:[n.PLATFORM_ID]}]},{type:o,decorators:[{type:n.Host}]}]},t}(),s=function(){function t(){}return t.forRoot=function(){return{ngModule:t}},t.decorators=[{type:n.NgModule,args:[{imports:[i.CommonModule],declarations:[o,r],exports:[o,r]}]}],t}();t.SlickCarouselModule=s,t.SlickCarouselComponent=o,t.SlickItemDirective=r,Object.defineProperty(t,"__esModule",{value:!0})});
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@angular/common"),require("@angular/core"),require("@angular/forms")):"function"==typeof define&&define.amd?define("ngx-slick-carousel",["exports","@angular/common","@angular/core","@angular/forms"],n):n(t["ngx-slick-carousel"]={},t.ng.common,t.ng.core,t.ng.forms)}(this,function(t,n,e,i){"use strict";var o=function(){function t(t,n){this.el=t,this.zone=n,this.afterChange=new e.EventEmitter,this.beforeChange=new e.EventEmitter,this.breakpoint=new e.EventEmitter,this.destroy=new e.EventEmitter,this.init=new e.EventEmitter,this.slides=[],this.initialized=!1}return t.prototype.ngOnDestroy=function(){this.unslick()},t.prototype.ngAfterViewInit=function(){},t.prototype.initSlick=function(){var o=this;this.zone.runOutsideAngular(function(){o.$instance=jQuery(o.el.nativeElement),o.$instance.on("init",function(t,n){o.zone.run(function(){o.init.emit({event:t,slick:n})})}),o.$instance.slick(o.config),o.zone.run(function(){o.initialized=!0,o.currentIndex=o.config&&o.config.initialSlide?o.config.initialSlide:0}),o.$instance.on("afterChange",function(t,n,e){o.zone.run(function(){o.afterChange.emit({event:t,slick:n,currentSlide:e}),o.currentIndex=e})}),o.$instance.on("beforeChange",function(t,n,e,i){o.zone.run(function(){o.beforeChange.emit({event:t,slick:n,currentSlide:e,nextSlide:i})})}),o.$instance.on("breakpoint",function(t,n,e){o.zone.run(function(){o.breakpoint.emit({event:t,slick:n,breakpoint:e})})}),o.$instance.on("destroy",function(t,n){o.zone.run(function(){o.destroy.emit({event:t,slick:n})})})})},t.prototype.addSlide=function(t){var n=this;this.initialized||this.initSlick(),this.slides.push(t),this.zone.runOutsideAngular(function(){n.$instance.slick("slickAdd",t.el.nativeElement)})},t.prototype.removeSlide=function(n){var t=this,e=this.slides.indexOf(n);this.slides=this.slides.filter(function(t){return t!==n}),this.zone.runOutsideAngular(function(){t.$instance.slick("slickRemove",e)})},t.prototype.slickGoTo=function(t){var n=this;this.zone.runOutsideAngular(function(){n.$instance.slick("slickGoTo",t)})},t.prototype.slickNext=function(){var t=this;this.zone.runOutsideAngular(function(){t.$instance.slick("slickNext")})},t.prototype.slickPrev=function(){var t=this;this.zone.runOutsideAngular(function(){t.$instance.slick("slickPrev")})},t.prototype.slickPause=function(){var t=this;this.zone.runOutsideAngular(function(){t.$instance.slick("slickPause")})},t.prototype.slickPlay=function(){var t=this;this.zone.runOutsideAngular(function(){t.$instance.slick("slickPlay")})},t.prototype.unslick=function(){var t=this;this.zone.runOutsideAngular(function(){t.$instance.slick("unslick")}),this.initialized=!1},t.decorators=[{type:e.Component,args:[{selector:"ngx-slick-carousel",exportAs:"slick-carousel",providers:[{provide:i.NG_VALUE_ACCESSOR,useExisting:e.forwardRef(function(){return t}),multi:!0}],template:"<ng-content></ng-content>"}]}],t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.NgZone}]},t.propDecorators={config:[{type:e.Input}],afterChange:[{type:e.Output}],beforeChange:[{type:e.Output}],breakpoint:[{type:e.Output}],destroy:[{type:e.Output}],init:[{type:e.Output}]},t}(),r=function(){function t(t,n,e){this.el=t,this.platformId=n,this.carousel=e}return t.prototype.ngAfterViewInit=function(){n.isPlatformBrowser(this.platformId)&&this.carousel.addSlide(this)},t.prototype.ngOnDestroy=function(){n.isPlatformBrowser(this.platformId)&&this.carousel.removeSlide(this)},t.decorators=[{type:e.Directive,args:[{selector:"[ngxSlickItem]"}]}],t.ctorParameters=function(){return[{type:e.ElementRef},{type:undefined,decorators:[{type:e.Inject,args:[e.PLATFORM_ID]}]},{type:o,decorators:[{type:e.Host}]}]},t}(),s=function(){function t(){}return t.forRoot=function(){return{ngModule:t}},t.decorators=[{type:e.NgModule,args:[{imports:[n.CommonModule],declarations:[o,r],exports:[o,r]}]}],t}();t.SlickCarouselModule=s,t.SlickCarouselComponent=o,t.SlickItemDirective=r,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=ngx-slick-carousel.umd.min.js.map

@@ -0,4 +1,4 @@

import { isPlatformBrowser, CommonModule } from '@angular/common';
import { Component, Input, Output, EventEmitter, NgZone, forwardRef, Directive, ElementRef, Host, Inject, PLATFORM_ID, NgModule } from '@angular/core';
import { NG_VALUE_ACCESSOR } from '@angular/forms';
import { isPlatformBrowser, CommonModule } from '@angular/common';

@@ -111,2 +111,3 @@ /**

function (slickItem) {
var _this = this;
if (!this.initialized) {

@@ -116,3 +117,5 @@ this.initSlick();

this.slides.push(slickItem);
this.$instance.slick('slickAdd', slickItem.el.nativeElement);
this.zone.runOutsideAngular(function () {
_this.$instance.slick('slickAdd', slickItem.el.nativeElement);
});
};

@@ -128,5 +131,8 @@ /**

function (slickItem) {
var _this = this;
var /** @type {?} */ idx = this.slides.indexOf(slickItem);
this.$instance.slick('slickRemove', idx);
this.slides = this.slides.filter(function (s) { return s !== slickItem; });
this.zone.runOutsideAngular(function () {
_this.$instance.slick('slickRemove', idx);
});
};

@@ -145,3 +151,3 @@ /**

var _this = this;
this.zone.run(function () {
this.zone.runOutsideAngular(function () {
_this.$instance.slick('slickGoTo', index);

@@ -158,3 +164,3 @@ });

var _this = this;
this.zone.run(function () {
this.zone.runOutsideAngular(function () {
_this.$instance.slick('slickNext');

@@ -171,3 +177,3 @@ });

var _this = this;
this.zone.run(function () {
this.zone.runOutsideAngular(function () {
_this.$instance.slick('slickPrev');

@@ -184,3 +190,3 @@ });

var _this = this;
this.zone.run(function () {
this.zone.runOutsideAngular(function () {
_this.$instance.slick('slickPause');

@@ -197,3 +203,3 @@ });

var _this = this;
this.zone.run(function () {
this.zone.runOutsideAngular(function () {
_this.$instance.slick('slickPlay');

@@ -210,6 +216,6 @@ });

var _this = this;
this.zone.run(function () {
this.zone.runOutsideAngular(function () {
_this.$instance.slick('unslick');
_this.initialized = false;
});
this.initialized = false;
};

@@ -216,0 +222,0 @@ SlickCarouselComponent.decorators = [

@@ -0,4 +1,4 @@

import { isPlatformBrowser, CommonModule } from '@angular/common';
import { Component, Input, Output, EventEmitter, NgZone, forwardRef, Directive, ElementRef, Host, Inject, PLATFORM_ID, NgModule } from '@angular/core';
import { NG_VALUE_ACCESSOR } from '@angular/forms';
import { isPlatformBrowser, CommonModule } from '@angular/common';

@@ -64,2 +64,3 @@ var SlickCarouselComponent = (function () {

function (slickItem) {
var _this = this;
if (!this.initialized) {

@@ -69,9 +70,14 @@ this.initSlick();

this.slides.push(slickItem);
this.$instance.slick('slickAdd', slickItem.el.nativeElement);
this.zone.runOutsideAngular(function () {
_this.$instance.slick('slickAdd', slickItem.el.nativeElement);
});
};
SlickCarouselComponent.prototype.removeSlide =
function (slickItem) {
var _this = this;
var idx = this.slides.indexOf(slickItem);
this.$instance.slick('slickRemove', idx);
this.slides = this.slides.filter(function (s) { return s !== slickItem; });
this.zone.runOutsideAngular(function () {
_this.$instance.slick('slickRemove', idx);
});
};

@@ -81,3 +87,3 @@ SlickCarouselComponent.prototype.slickGoTo =

var _this = this;
this.zone.run(function () {
this.zone.runOutsideAngular(function () {
_this.$instance.slick('slickGoTo', index);

@@ -89,3 +95,3 @@ });

var _this = this;
this.zone.run(function () {
this.zone.runOutsideAngular(function () {
_this.$instance.slick('slickNext');

@@ -97,3 +103,3 @@ });

var _this = this;
this.zone.run(function () {
this.zone.runOutsideAngular(function () {
_this.$instance.slick('slickPrev');

@@ -105,3 +111,3 @@ });

var _this = this;
this.zone.run(function () {
this.zone.runOutsideAngular(function () {
_this.$instance.slick('slickPause');

@@ -113,3 +119,3 @@ });

var _this = this;
this.zone.run(function () {
this.zone.runOutsideAngular(function () {
_this.$instance.slick('slickPlay');

@@ -121,6 +127,6 @@ });

var _this = this;
this.zone.run(function () {
this.zone.runOutsideAngular(function () {
_this.$instance.slick('unslick');
_this.initialized = false;
});
this.initialized = false;
};

@@ -127,0 +133,0 @@ SlickCarouselComponent.decorators = [

{
"name": "ngx-slick-carousel",
"version": "0.2.9",
"version": "0.3.0",
"repository": {

@@ -5,0 +5,0 @@ "type": "git",

@@ -16,4 +16,4 @@ import { EventEmitter, NgZone, AfterViewInit, OnDestroy, ElementRef } from '@angular/core';

$instance: any;
currentIndex: number;
private initialized;
currentIndex: number;
/**

@@ -20,0 +20,0 @@ * Constructor

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