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

ion-gallery

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ion-gallery - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

2

dist/ion-gallery.js

@@ -18,3 +18,3 @@ (function () {

ionItemAction: '&?ionItemAction',
ionExcludeAction: '&?ionExcludeAction',
ionExcludeAction: '&?ionExcludeActionAAAAAAAAAAAAAAAa',
ionZoomEvents: '=?ionZoomEvents'

@@ -21,0 +21,0 @@ },

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

!function(){"use strict";function n(n,e,i){function o(n){var o=parseInt(n.ionGalleryRowSize),t=function(){n.ionGalleryRowSize=e.getRowSize(o||i.row_size,n.ionGalleryItems.length),n.actionLabel=i.action_label,n.items=e.buildGallery(n.ionGalleryItems,n.ionGalleryRowSize),n.responsiveGrid=parseInt(1/n.ionGalleryRowSize*100)};t(),n.$watchCollection("ionGalleryItems",function(n,e){n.length!=e.length&&t()})}function t(n,e,o){n.customItemAction=angular.isFunction(n.ionItemAction)&&o.hasOwnProperty("ionItemAction"),n.ionSliderToggle="false"!==o.ionGalleryToggle&&i.toggle}return o.$inject=["$scope"],{restrict:"AE",scope:{ionGalleryItems:"=ionGalleryItems",ionGalleryRowSize:"=?ionGalleryRow",ionItemAction:"&?ionItemAction",ionExcludeAction:"&?ionExcludeAction",ionZoomEvents:"=?ionZoomEvents"},controller:o,link:t,replace:!0,templateUrl:i.template_gallery}}angular.module("ion-gallery",["templates"]).directive("ionGallery",n),n.$inject=["$ionicPlatform","ionGalleryHelper","ionGalleryConfig"]}(),function(){"use strict";function n(){this.config={action_label:"Done",template_gallery:"gallery.html",template_slider:"slider.html",toggle:!0,row_size:3,fixed_row_size:!0,zoom_events:!0},this.$get=function(){return this.config},this.setGalleryConfig=function(n){angular.extend(this.config,this.config,n)}}angular.module("ion-gallery").provider("ionGalleryConfig",n),n.$inject=[]}(),function(){"use strict";function n(n){this.getRowSize=function(e,i){var o;return o=isNaN(e)===!0||e<=0?n.row_size:e>i&&!n.fixed_row_size?i:e},this.buildGallery=function(n,e){for(var i=[],o=-1,t=0,l=0;l<n.length;l++)l%e===0&&(o++,i[o]=[],t=0),n[l].position=l,i[o][t]=n[l],t++;return i}}angular.module("ion-gallery").service("ionGalleryHelper",n),n.$inject=["ionGalleryConfig"]}(),function(){"use strict";function n(){function n(n,e,i){var o=function(n,i){i>0&&(n.naturalHeight>=n.naturalWidth?e.attr("width","100%"):e.attr("height",e.parent()[0].offsetHeight+"px"))};e.bind("load",function(i){var t=this;e.parent()[0].offsetHeight>0&&o(this,e.parent()[0].offsetHeight),n.$watch(function(){return e.parent()[0].offsetHeight},function(n){o(t,n)})})}return{restrict:"A",link:n}}angular.module("ion-gallery").directive("ionImageScale",n),n.$inject=[]}(),function(){"use strict";function n(n){function e(n,e,i){n.$watch(function(){return n.ionGalleryRowSize},function(i,o){i>0&&e.css("height",e[0].offsetWidth*parseInt(n.responsiveGrid)/100+"px")})}return{restrict:"A",link:e}}angular.module("ion-gallery").directive("ionRowHeight",n),n.$inject=["ionGalleryConfig"]}(),function(){"use strict";function n(n,e){function i(i,o,t){var l=!1,r=function(){i.$emit("ZoomStarted")},s=function(n){l=!0,e(function(){l=!1,i.$emit("DoubleTapEvent",{x:n.gesture.touches[0].pageX,y:n.gesture.touches[0].pageY})},200)},a=function(n){l!==!0&&e(function(){l!==!0&&i.$emit("TapEvent")},200)},c=n.on("pinch",r,o),u=n.on("doubletap",function(n){s(n)},o),d=n.on("tap",a,o);i.$on("$destroy",function(){n.off(u,"doubletap",s),n.off(d,"tap",a),n.off(c,"pinch",r)})}return{restrict:"A",link:i}}angular.module("ion-gallery").directive("ionSlideAction",n),n.$inject=["$ionicGesture","$timeout"]}(),function(){"use strict";function n(n,e,i,o,t){function l(n){function t(){s=!1,a()}var l,r,s=(n.ionGalleryRowSize,!1);n.selectedSlide=1,n.hideAll=!1,n.ionZoomEvents=o.setZoomEvents(n.ionZoomEvents),n.openSlider=function(e){n.slides=[],r=e;var i=n.ionGalleryItems.length,o=e-1<0?i-1:e-1,t=e+1>=i?0:e+1;n.slides[0]=n.ionGalleryItems[o],n.slides[1]=n.ionGalleryItems[e],n.slides[2]=n.ionGalleryItems[t],l=1,n.openModal()},n.slideChanged=function(e){if(e!==l){var o,t=n.slides.length-l-e,s=n.ionGalleryItems.length,a=l+">"+e;"0>1"===a||"1>2"===a||"2>0"===a?(r++,r>=s&&(r=0),o=r+1,o>=s&&(o=0)):"0>2"!==a&&"1>0"!==a&&"2>1"!==a||(r--,r<0&&(r=s-1),o=r-1,o<0&&(o=s-1)),n.ionZoomEvents===!0&&i.$getByHandle("slide-"+t).zoomTo(1),n.slides[t]=n.ionGalleryItems[o],l=e}},n.$on("ZoomStarted",function(i){e(function(){s=!0,n.hideAll=!0})}),n.$on("TapEvent",function(n){e(function(){a()})}),n.$on("DoubleTapEvent",function(n,i){e(function(){c(i)})});var a=function(){return s===!0?(n.ionZoomEvents===!0&&i.$getByHandle("slide-"+l).zoomTo(1,!0),void e(function(){t()},300)):void(n.hasOwnProperty("ionSliderToggle")&&n.ionSliderToggle===!1&&n.hideAll===!1||s===!0||(n.hideAll=!n.hideAll))},c=function(e){s===!1?(n.ionZoomEvents===!0&&i.$getByHandle("slide-"+l).zoomTo(3,!0,e.x,e.y),s=!0,n.hideAll=!0):a()}}function r(e,i,o){var l;n.fromTemplateUrl(t.template_slider,{scope:e,animation:"fade-in"}).then(function(n){l=n}),e.openModal=function(){l.show()},e.closeModal=function(){l.hide()},e.$on("$destroy",function(){try{l.remove()}catch(n){}})}return l.$inject=["$scope"],{restrict:"A",controller:l,link:r}}angular.module("ion-gallery").directive("ionSlider",n),n.$inject=["$ionicModal","$timeout","$ionicScrollDelegate","ionSliderHelper","ionGalleryConfig"]}(),function(){"use strict";function n(n){this.setZoomEvents=function(e){return e===!1&&(n.zoom_events=!1),n.zoom_events}}angular.module("ion-gallery").service("ionSliderHelper",n),n.$inject=["ionGalleryConfig"]}(),angular.module("templates",[]).run(["$templateCache",function(n){n.put("gallery.html",'<div class="gallery-view">\n <div class="row" ng-repeat="item in items track by $index" ion-row-height>\n <div ng-repeat="photo in item track by $index"\n class="col col-{{responsiveGrid}} image-container">\n\n <img ion-image-scale\n ng-src="{{photo.thumb || photo.src}}"\n ng-click="customItemAction ? ionItemAction({item: photo}) : openSlider(photo.position)">\n\n </div>\n </div>\n <div ion-slider></div>\n</div>\n'),n.put("slider.html",'<ion-modal-view class="imageView">\n <ion-header-bar class="headerView" ng-show="!hideAll">\n <button class="button button-outline button-light close-btn" ng-click="closeModal()">{{::actionLabel}}</button>\n </ion-header-bar>\n\n <ion-content class="has-no-header" scroll="false">\n <ion-slide-box does-continue="true" active-slide="selectedSlide" show-pager="false" class="listContainer" on-slide-changed="slideChanged($index)">\n <ion-slide ng-repeat="single in slides track by $index">\n <ion-scroll direction="xy"\n locking="false"\n zooming="{{ionZoomEvents}}"\n min-zoom="1"\n scrollbar-x="false"\n scrollbar-y="false"\n ion-slide-action\n delegate-handle="slide-{{$index}}"\n overflow-scroll="false"\n >\n <div class="item item-image gallery-slide-view">\n <img ng-src="{{single.src}}">\n </div>\n <div ng-if="single.sub && single.sub.length > 0" class="image-subtitle" ng-show="!hideAll">\n <span ng-bind-html=\'single.sub\'></span>\n </div>\n </ion-scroll>\n </ion-slide>\n </ion-slide-box>\n </ion-content>\n</ion-modal-view>\n')}]);
!function(){"use strict";function n(n,e,i){function o(n){var o=parseInt(n.ionGalleryRowSize),t=function(){n.ionGalleryRowSize=e.getRowSize(o||i.row_size,n.ionGalleryItems.length),n.actionLabel=i.action_label,n.items=e.buildGallery(n.ionGalleryItems,n.ionGalleryRowSize),n.responsiveGrid=parseInt(1/n.ionGalleryRowSize*100)};t(),n.$watchCollection("ionGalleryItems",function(n,e){n.length!=e.length&&t()})}function t(n,e,o){n.customItemAction=angular.isFunction(n.ionItemAction)&&o.hasOwnProperty("ionItemAction"),n.ionSliderToggle="false"!==o.ionGalleryToggle&&i.toggle}return o.$inject=["$scope"],{restrict:"AE",scope:{ionGalleryItems:"=ionGalleryItems",ionGalleryRowSize:"=?ionGalleryRow",ionItemAction:"&?ionItemAction",ionExcludeAction:"&?ionExcludeActionAAAAAAAAAAAAAAAa",ionZoomEvents:"=?ionZoomEvents"},controller:o,link:t,replace:!0,templateUrl:i.template_gallery}}angular.module("ion-gallery",["templates"]).directive("ionGallery",n),n.$inject=["$ionicPlatform","ionGalleryHelper","ionGalleryConfig"]}(),function(){"use strict";function n(){this.config={action_label:"Done",template_gallery:"gallery.html",template_slider:"slider.html",toggle:!0,row_size:3,fixed_row_size:!0,zoom_events:!0},this.$get=function(){return this.config},this.setGalleryConfig=function(n){angular.extend(this.config,this.config,n)}}angular.module("ion-gallery").provider("ionGalleryConfig",n),n.$inject=[]}(),function(){"use strict";function n(n){this.getRowSize=function(e,i){var o;return o=isNaN(e)===!0||e<=0?n.row_size:e>i&&!n.fixed_row_size?i:e},this.buildGallery=function(n,e){for(var i=[],o=-1,t=0,l=0;l<n.length;l++)l%e===0&&(o++,i[o]=[],t=0),n[l].position=l,i[o][t]=n[l],t++;return i}}angular.module("ion-gallery").service("ionGalleryHelper",n),n.$inject=["ionGalleryConfig"]}(),function(){"use strict";function n(){function n(n,e,i){var o=function(n,i){i>0&&(n.naturalHeight>=n.naturalWidth?e.attr("width","100%"):e.attr("height",e.parent()[0].offsetHeight+"px"))};e.bind("load",function(i){var t=this;e.parent()[0].offsetHeight>0&&o(this,e.parent()[0].offsetHeight),n.$watch(function(){return e.parent()[0].offsetHeight},function(n){o(t,n)})})}return{restrict:"A",link:n}}angular.module("ion-gallery").directive("ionImageScale",n),n.$inject=[]}(),function(){"use strict";function n(n){function e(n,e,i){n.$watch(function(){return n.ionGalleryRowSize},function(i,o){i>0&&e.css("height",e[0].offsetWidth*parseInt(n.responsiveGrid)/100+"px")})}return{restrict:"A",link:e}}angular.module("ion-gallery").directive("ionRowHeight",n),n.$inject=["ionGalleryConfig"]}(),function(){"use strict";function n(n,e){function i(i,o,t){var l=!1,r=function(){i.$emit("ZoomStarted")},a=function(n){l=!0,e(function(){l=!1,i.$emit("DoubleTapEvent",{x:n.gesture.touches[0].pageX,y:n.gesture.touches[0].pageY})},200)},s=function(n){l!==!0&&e(function(){l!==!0&&i.$emit("TapEvent")},200)},c=n.on("pinch",r,o),u=n.on("doubletap",function(n){a(n)},o),d=n.on("tap",s,o);i.$on("$destroy",function(){n.off(u,"doubletap",a),n.off(d,"tap",s),n.off(c,"pinch",r)})}return{restrict:"A",link:i}}angular.module("ion-gallery").directive("ionSlideAction",n),n.$inject=["$ionicGesture","$timeout"]}(),function(){"use strict";function n(n,e,i,o,t){function l(n){function t(){a=!1,s()}var l,r,a=(n.ionGalleryRowSize,!1);n.selectedSlide=1,n.hideAll=!1,n.ionZoomEvents=o.setZoomEvents(n.ionZoomEvents),n.openSlider=function(e){n.slides=[],r=e;var i=n.ionGalleryItems.length,o=e-1<0?i-1:e-1,t=e+1>=i?0:e+1;n.slides[0]=n.ionGalleryItems[o],n.slides[1]=n.ionGalleryItems[e],n.slides[2]=n.ionGalleryItems[t],l=1,n.openModal()},n.slideChanged=function(e){if(e!==l){var o,t=n.slides.length-l-e,a=n.ionGalleryItems.length,s=l+">"+e;"0>1"===s||"1>2"===s||"2>0"===s?(r++,r>=a&&(r=0),o=r+1,o>=a&&(o=0)):"0>2"!==s&&"1>0"!==s&&"2>1"!==s||(r--,r<0&&(r=a-1),o=r-1,o<0&&(o=a-1)),n.ionZoomEvents===!0&&i.$getByHandle("slide-"+t).zoomTo(1),n.slides[t]=n.ionGalleryItems[o],l=e}},n.$on("ZoomStarted",function(i){e(function(){a=!0,n.hideAll=!0})}),n.$on("TapEvent",function(n){e(function(){s()})}),n.$on("DoubleTapEvent",function(n,i){e(function(){c(i)})});var s=function(){return a===!0?(n.ionZoomEvents===!0&&i.$getByHandle("slide-"+l).zoomTo(1,!0),void e(function(){t()},300)):void(n.hasOwnProperty("ionSliderToggle")&&n.ionSliderToggle===!1&&n.hideAll===!1||a===!0||(n.hideAll=!n.hideAll))},c=function(e){a===!1?(n.ionZoomEvents===!0&&i.$getByHandle("slide-"+l).zoomTo(3,!0,e.x,e.y),a=!0,n.hideAll=!0):s()}}function r(e,i,o){var l;n.fromTemplateUrl(t.template_slider,{scope:e,animation:"fade-in"}).then(function(n){l=n}),e.openModal=function(){l.show()},e.closeModal=function(){l.hide()},e.$on("$destroy",function(){try{l.remove()}catch(n){}})}return l.$inject=["$scope"],{restrict:"A",controller:l,link:r}}angular.module("ion-gallery").directive("ionSlider",n),n.$inject=["$ionicModal","$timeout","$ionicScrollDelegate","ionSliderHelper","ionGalleryConfig"]}(),function(){"use strict";function n(n){this.setZoomEvents=function(e){return e===!1&&(n.zoom_events=!1),n.zoom_events}}angular.module("ion-gallery").service("ionSliderHelper",n),n.$inject=["ionGalleryConfig"]}(),angular.module("templates",[]).run(["$templateCache",function(n){n.put("gallery.html",'<div class="gallery-view">\n <div class="row" ng-repeat="item in items track by $index" ion-row-height>\n <div ng-repeat="photo in item track by $index"\n class="col col-{{responsiveGrid}} image-container">\n\n <img ion-image-scale\n ng-src="{{photo.thumb || photo.src}}"\n ng-click="customItemAction ? ionItemAction({item: photo}) : openSlider(photo.position)">\n\n </div>\n </div>\n <div ion-slider></div>\n</div>\n'),n.put("slider.html",'<ion-modal-view class="imageView">\n <ion-header-bar class="headerView" ng-show="!hideAll">\n <button class="button button-outline button-light close-btn" ng-click="closeModal()">{{::actionLabel}}</button>\n </ion-header-bar>\n\n <ion-content class="has-no-header" scroll="false">\n <ion-slide-box does-continue="true" active-slide="selectedSlide" show-pager="false" class="listContainer" on-slide-changed="slideChanged($index)">\n <ion-slide ng-repeat="single in slides track by $index">\n <ion-scroll direction="xy"\n locking="false"\n zooming="{{ionZoomEvents}}"\n min-zoom="1"\n scrollbar-x="false"\n scrollbar-y="false"\n ion-slide-action\n delegate-handle="slide-{{$index}}"\n overflow-scroll="false"\n >\n <div class="item item-image gallery-slide-view">\n <img ng-src="{{single.src}}">\n </div>\n <div ng-if="single.sub && single.sub.length > 0" class="image-subtitle" ng-show="!hideAll">\n <span ng-bind-html=\'single.sub\'></span>\n </div>\n </ion-scroll>\n </ion-slide>\n </ion-slide-box>\n </ion-content>\n</ion-modal-view>\n')}]);
{
"name": "ion-gallery",
"version": "0.3.0",
"version": "0.3.1",
"description": "Ionic gallery directive",
"main": "gulpfile.js",
"main": "dist/ion-gallery",
"style": "dist/ion-gallery.css",
"dependencies": {},

@@ -24,4 +25,8 @@ "devDependencies": {

],
"repository" :
{ "type" : "git"
, "url" : "git@github.com:andr3medeiros/ion-gallery.git"
},
"author": "Pedro Abreu <pmig.abreu@gmail.com>",
"license": "MIT"
}

@@ -15,8 +15,4 @@ # ion-gallery

Load script and css on the html
With CommonJs or Webpack, just require('ion-gallery') and require('ion-gallery/dist/ion-gallery.css').
<link href="lib/ion-gallery/dist/ion-gallery.css" rel="stylesheet">
...
<script src="lib/ion-gallery/dist/ion-gallery.min.js"></script>
Add ion-gallery as dependency to your project

@@ -23,0 +19,0 @@

@@ -17,3 +17,3 @@ (function () {

ionItemAction: '&?ionItemAction',
ionExcludeAction: '&?ionExcludeAction',
ionExcludeAction: '&?ionExcludeActionAAAAAAAAAAAAAAAa',
ionZoomEvents: '=?ionZoomEvents'

@@ -20,0 +20,0 @@ },

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