ngx-slick-carousel
Advanced tools
Comparing version 0.2.1 to 0.2.2
@@ -16,2 +16,3 @@ (function (global, factory) { | ||
this.destroy = new core.EventEmitter(); | ||
this.init = new core.EventEmitter(); | ||
this.slides = []; | ||
@@ -31,3 +32,9 @@ this.initialized = false; | ||
this.zone.runOutsideAngular(function () { | ||
_this.$instance = $(_this.el.nativeElement).slick(_this.config); | ||
_this.$instance = jQuery(_this.el.nativeElement); | ||
_this.$instance.on('init', function (event, slick) { | ||
_this.zone.run(function () { | ||
_this.init.emit({ event: event, slick: slick }); | ||
}); | ||
}); | ||
jQuery(_this.el.nativeElement).slick(_this.config); | ||
_this.initialized = true; | ||
@@ -137,2 +144,3 @@ _this.$instance.on('afterChange', function (event, slick, currentSlide) { | ||
"destroy": [{ type: core.Output },], | ||
"init": [{ type: core.Output },], | ||
}; | ||
@@ -139,0 +147,0 @@ return SlickComponent; |
@@ -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,i,e,n){"use strict";var o=function(){function t(t,e,n){this.el=t,this.zone=e,this.platformId=n,this.afterChange=new i.EventEmitter,this.beforeChange=new i.EventEmitter,this.breakpoint=new i.EventEmitter,this.destroy=new i.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=$(o.el.nativeElement).slick(o.config),o.initialized=!0,o.$instance.on("afterChange",function(t,e,n){o.zone.run(function(){o.afterChange.emit({event:t,slick:e,currentSlide: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.decorators=[{type:i.Component,args:[{selector:"ngx-slick-carousel",exportAs:"slick-modal",providers:[{provide:e.NG_VALUE_ACCESSOR,useExisting:i.forwardRef(function(){return t}),multi:!0}],template:"<ng-content></ng-content>"}]}],t.ctorParameters=function(){return[{type:i.ElementRef},{type:i.NgZone},{type:undefined,decorators:[{type:i.Inject,args:[i.PLATFORM_ID]}]}]},t.propDecorators={config:[{type:i.Input}],afterChange:[{type:i.Output}],beforeChange:[{type:i.Output}],breakpoint:[{type:i.Output}],destroy:[{type:i.Output}]},t}(),r=function(){function t(t,e){this.el=t,this.carousel=e}return t.prototype.ngAfterViewInit=function(){this.carousel.addSlide(this)},t.prototype.ngOnDestroy=function(){this.carousel.removeSlide(this)},t.decorators=[{type:i.Directive,args:[{selector:"[ngxSlickItem]"}]}],t.ctorParameters=function(){return[{type:i.ElementRef},{type:o,decorators:[{type:i.Host}]}]},t}(),s=function(){function t(){}return t.forRoot=function(){return{ngModule:t}},t.decorators=[{type:i.NgModule,args:[{imports:[n.CommonModule],declarations:[o,r],exports:[o,r]}]}],t}();t.SlickModule=s,t.SlickComponent=o,t.SlickItemDirective=r,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
!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,i,e,n){"use strict";var o=function(){function t(t,e,n){this.el=t,this.zone=e,this.platformId=n,this.afterChange=new i.EventEmitter,this.beforeChange=new i.EventEmitter,this.breakpoint=new i.EventEmitter,this.destroy=new i.EventEmitter,this.init=new i.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})})}),jQuery(o.el.nativeElement).slick(o.config),o.initialized=!0,o.$instance.on("afterChange",function(t,e,n){o.zone.run(function(){o.afterChange.emit({event:t,slick:e,currentSlide: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.decorators=[{type:i.Component,args:[{selector:"ngx-slick-carousel",exportAs:"slick-modal",providers:[{provide:e.NG_VALUE_ACCESSOR,useExisting:i.forwardRef(function(){return t}),multi:!0}],template:"<ng-content></ng-content>"}]}],t.ctorParameters=function(){return[{type:i.ElementRef},{type:i.NgZone},{type:undefined,decorators:[{type:i.Inject,args:[i.PLATFORM_ID]}]}]},t.propDecorators={config:[{type:i.Input}],afterChange:[{type:i.Output}],beforeChange:[{type:i.Output}],breakpoint:[{type:i.Output}],destroy:[{type:i.Output}],init:[{type:i.Output}]},t}(),r=function(){function t(t,e){this.el=t,this.carousel=e}return t.prototype.ngAfterViewInit=function(){this.carousel.addSlide(this)},t.prototype.ngOnDestroy=function(){this.carousel.removeSlide(this)},t.decorators=[{type:i.Directive,args:[{selector:"[ngxSlickItem]"}]}],t.ctorParameters=function(){return[{type:i.ElementRef},{type:o,decorators:[{type:i.Host}]}]},t}(),s=function(){function t(){}return t.forRoot=function(){return{ngModule:t}},t.decorators=[{type:i.NgModule,args:[{imports:[n.CommonModule],declarations:[o,r],exports:[o,r]}]}],t}();t.SlickModule=s,t.SlickComponent=o,t.SlickItemDirective=r,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=ngx-slick-carousel.umd.min.js.map |
@@ -24,2 +24,3 @@ import { Component, Input, Output, EventEmitter, NgZone, forwardRef, Directive, ElementRef, Host, Inject, PLATFORM_ID, NgModule } from '@angular/core'; | ||
this.destroy = new EventEmitter(); | ||
this.init = new EventEmitter(); | ||
this.slides = []; | ||
@@ -69,3 +70,9 @@ this.initialized = false; | ||
this.zone.runOutsideAngular(function () { | ||
_this.$instance = $(_this.el.nativeElement).slick(_this.config); | ||
_this.$instance = jQuery(_this.el.nativeElement); | ||
_this.$instance.on('init', function (event, slick) { | ||
_this.zone.run(function () { | ||
_this.init.emit({ event: event, slick: slick }); | ||
}); | ||
}); | ||
jQuery(_this.el.nativeElement).slick(_this.config); | ||
_this.initialized = true; | ||
@@ -222,2 +229,3 @@ _this.$instance.on('afterChange', function (event, slick, currentSlide) { | ||
"destroy": [{ type: Output },], | ||
"init": [{ type: Output },], | ||
}; | ||
@@ -224,0 +232,0 @@ return SlickComponent; |
@@ -14,2 +14,3 @@ import { Component, Input, Output, EventEmitter, NgZone, forwardRef, Directive, ElementRef, Host, Inject, PLATFORM_ID, NgModule } from '@angular/core'; | ||
this.destroy = new EventEmitter(); | ||
this.init = new EventEmitter(); | ||
this.slides = []; | ||
@@ -29,3 +30,9 @@ this.initialized = false; | ||
this.zone.runOutsideAngular(function () { | ||
_this.$instance = $(_this.el.nativeElement).slick(_this.config); | ||
_this.$instance = jQuery(_this.el.nativeElement); | ||
_this.$instance.on('init', function (event, slick) { | ||
_this.zone.run(function () { | ||
_this.init.emit({ event: event, slick: slick }); | ||
}); | ||
}); | ||
jQuery(_this.el.nativeElement).slick(_this.config); | ||
_this.initialized = true; | ||
@@ -135,2 +142,3 @@ _this.$instance.on('afterChange', function (event, slick, currentSlide) { | ||
"destroy": [{ type: Output },], | ||
"init": [{ type: Output },], | ||
}; | ||
@@ -137,0 +145,0 @@ return SlickComponent; |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":4,"metadata":{"SlickModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":6,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":8,"character":4}],"declarations":[{"__symbolic":"reference","name":"SlickComponent"},{"__symbolic":"reference","name":"SlickItemDirective"}],"exports":[{"__symbolic":"reference","name":"SlickComponent"},{"__symbolic":"reference","name":"SlickItemDirective"}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":[],"value":{"ngModule":{"__symbolic":"reference","name":"SlickModule"}}}}},"SlickComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":22,"character":1},"arguments":[{"selector":"ngx-slick-carousel","exportAs":"slick-modal","providers":[{"provide":{"__symbolic":"reference","module":"@angular/forms","name":"NG_VALUE_ACCESSOR","line":26,"character":13},"useExisting":{"__symbolic":"reference","name":"SlickComponent"},"multi":true}],"template":"<ng-content></ng-content>"}]}],"members":{"config":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":34,"character":3}}]}],"afterChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":35,"character":3}}]}],"beforeChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":36,"character":3}}]}],"breakpoint":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":37,"character":3}}]}],"destroy":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":38,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":49,"character":15},"arguments":[{"__symbolic":"reference","module":"@angular/core","name":"PLATFORM_ID","line":49,"character":22}]}]],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":47,"character":26},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":48,"character":28},{"__symbolic":"reference","name":"string"}]}],"ngOnDestroy":[{"__symbolic":"method"}],"ngAfterViewInit":[{"__symbolic":"method"}],"initSlick":[{"__symbolic":"method"}],"addSlide":[{"__symbolic":"method"}],"removeSlide":[{"__symbolic":"method"}],"slickGoTo":[{"__symbolic":"method"}],"slickNext":[{"__symbolic":"method"}],"slickPrev":[{"__symbolic":"method"}],"slickPause":[{"__symbolic":"method"}],"slickPlay":[{"__symbolic":"method"}],"unslick":[{"__symbolic":"method"}]}},"SlickItemDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":157,"character":1},"arguments":[{"selector":"[ngxSlickItem]"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Host","line":161,"character":38}}]],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":47,"character":26},{"__symbolic":"reference","name":"SlickComponent"}]}],"ngAfterViewInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]}}},"origins":{"SlickModule":"./index","SlickComponent":"./slick.component","SlickItemDirective":"./slick.component"},"importAs":"ngx-slick-carousel"} | ||
{"__symbolic":"module","version":4,"metadata":{"SlickModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":6,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":8,"character":4}],"declarations":[{"__symbolic":"reference","name":"SlickComponent"},{"__symbolic":"reference","name":"SlickItemDirective"}],"exports":[{"__symbolic":"reference","name":"SlickComponent"},{"__symbolic":"reference","name":"SlickItemDirective"}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":[],"value":{"ngModule":{"__symbolic":"reference","name":"SlickModule"}}}}},"SlickComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":22,"character":1},"arguments":[{"selector":"ngx-slick-carousel","exportAs":"slick-modal","providers":[{"provide":{"__symbolic":"reference","module":"@angular/forms","name":"NG_VALUE_ACCESSOR","line":26,"character":13},"useExisting":{"__symbolic":"reference","name":"SlickComponent"},"multi":true}],"template":"<ng-content></ng-content>"}]}],"members":{"config":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":34,"character":3}}]}],"afterChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":35,"character":3}}]}],"beforeChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":36,"character":3}}]}],"breakpoint":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":37,"character":3}}]}],"destroy":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":38,"character":3}}]}],"init":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":39,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":50,"character":15},"arguments":[{"__symbolic":"reference","module":"@angular/core","name":"PLATFORM_ID","line":50,"character":22}]}]],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":48,"character":26},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":49,"character":28},{"__symbolic":"reference","name":"string"}]}],"ngOnDestroy":[{"__symbolic":"method"}],"ngAfterViewInit":[{"__symbolic":"method"}],"initSlick":[{"__symbolic":"method"}],"addSlide":[{"__symbolic":"method"}],"removeSlide":[{"__symbolic":"method"}],"slickGoTo":[{"__symbolic":"method"}],"slickNext":[{"__symbolic":"method"}],"slickPrev":[{"__symbolic":"method"}],"slickPause":[{"__symbolic":"method"}],"slickPlay":[{"__symbolic":"method"}],"unslick":[{"__symbolic":"method"}]}},"SlickItemDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":167,"character":1},"arguments":[{"selector":"[ngxSlickItem]"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Host","line":171,"character":38}}]],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":48,"character":26},{"__symbolic":"reference","name":"SlickComponent"}]}],"ngAfterViewInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]}}},"origins":{"SlickModule":"./index","SlickComponent":"./slick.component","SlickItemDirective":"./slick.component"},"importAs":"ngx-slick-carousel"} |
{ | ||
"name": "ngx-slick-carousel", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"repository": { | ||
@@ -5,0 +5,0 @@ "type": "git", |
@@ -14,2 +14,3 @@ import { EventEmitter, NgZone, AfterViewInit, OnDestroy, ElementRef } from '@angular/core'; | ||
destroy: EventEmitter<any>; | ||
init: EventEmitter<any>; | ||
slides: any; | ||
@@ -16,0 +17,0 @@ $instance: any; |
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
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
104454
14
783
0
111