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

v-viewer

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

v-viewer - npm Package Compare versions

Comparing version 1.5.0 to 1.5.1

1

dist/v-viewer.js

@@ -447,2 +447,3 @@ (function webpackUniversalModuleDefinition(root, factory) {

this.$viewer.update();
this.$emit('inited', this.$viewer);
} else {

@@ -449,0 +450,0 @@ this.createViewer();

2

dist/v-viewer.min.js

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

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("viewerjs")):"function"==typeof define&&define.amd?define(["viewerjs"],t):"object"==typeof exports?exports.VueViewer=t(require("viewerjs")):e.VueViewer=t(e.Viewer)}(this,function(e){return function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=4)}([function(t,n){t.exports=e},function(e,t,n){"use strict";(function(e){var i=n(0),r=n.n(i),o=n(5),u=function(t,i){function u(e,n){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t.nextTick(function(){i||!e["$"+p]?(s(e),e["$"+p]=new r.a(e,n),l("viewer created")):(e["$"+p].update(),l("viewer updated"))})}function c(t,n,i,r){f(t);var o=e.MutationObserver||e.WebKitMutationObserver||e.MozMutationObserver;if(!o)return void l("observer not supported");var u=new o(function(e){e.forEach(function(e){l("viewer mutation:"+e.type),i(t,n,r)})}),c={attributes:!0,childList:!0,characterData:!0,subtree:!0};u.observe(t,c),t.$viewerMutationObserver=u,l("observer created")}function a(e,t,n,i){var r=t.expression,o=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/;if(!r||!o.test(r))return void l("only simple dot-delimited paths can create watcher");e.$viewerUnwatch=n.context.$watch(r,function(t,n){l("change detected by watcher: ",r),i(e,t,!0)},{deep:!0}),l("watcher created, expression: ",r)}function s(e){e["$"+p]&&(e["$"+p].destroy(),delete e["$"+p],l("viewer destroyed"))}function f(e){e.$viewerMutationObserver&&(e.$viewerMutationObserver.disconnect(),delete e.$viewerMutationObserver,l("observer destroyed"))}function d(e){e.$viewerUnwatch&&(e.$viewerUnwatch(),delete e.$viewerUnwatch,l("watcher destroyed"))}function l(){var e;h&&(e=console).log.apply(e,arguments)}var v=i.name,p=void 0===v?"viewer":v,w=i.debug,h=void 0!==w&&w;t.directive("viewer",{bind:function(e,t,i){l("viewer bind");var r=n.i(o.a)(50,u);r(e,t.value),a(e,t,i,r),t.modifiers.static||c(e,t.value,r,t.modifiers.rebuild)},unbind:function(e,t){l("viewer unbind"),f(e),d(e),s(e)}})};t.a={install:u}}).call(t,n(7))},function(e,t,n){"use strict";function i(){var e={},t=!1,n=0,r=arguments.length;for("[object Boolean]"===Object.prototype.toString.call(arguments[0])&&(t=arguments[0],n++);n<r;n++){var o=arguments[n];!function(n){for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t&&"[object Object]"===Object.prototype.toString.call(n[r])?e[r]=i(!0,e[r],n[r]):e[r]=n[r])}(o)}return e}t.a=i},function(e,t,n){var i=n(8)(n(6),n(9),null,null);e.exports=i.exports},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n.n(r),u=n(1),c=n(0),a=n.n(c);t.default={install:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.name,c=void 0===r?"viewer":r,s=t.debug,f=void 0!==s&&s,d=t.defaultOptions;a.a.setDefaults(d),e.component(c,n.i(i.a)(o.a,{name:c})),e.use(u.a,{name:c,debug:f})},setDefaults:function(e){a.a.setDefaults(e)}}},function(e,t,n){"use strict";function i(e,t,n,i){function r(){c&&clearTimeout(c)}function o(){r(),a=!0}function u(){function o(){s=Date.now(),n.apply(f,l)}function u(){c=void 0}var f=this,d=Date.now()-s,l=arguments;a||(i&&!c&&o(),r(),void 0===i&&d>e?o():!0!==t&&(c=setTimeout(i?u:o,void 0===i?e-d:e)))}var c,a=!1,s=0;return"boolean"!=typeof t&&(i=n,n=t,t=void 0),u.cancel=o,u}function r(e,t,n){return void 0===n?i(e,t,!1):i(e,n,!1!==t)}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),r=n.n(i);t.default={props:{images:{type:Array},rebuild:{type:Boolean,default:!1},trigger:{},options:{type:Object}},data:function(){return{}},computed:{},methods:{onChange:function(){this.rebuild?this.rebuildViewer():this.updateViewer()},rebuildViewer:function(){this.destroyViewer(),this.createViewer()},updateViewer:function(){this.$viewer?this.$viewer.update():this.createViewer()},destroyViewer:function(){this.$viewer&&this.$viewer.destroy()},createViewer:function(){this.$viewer=new r.a(this.$el,this.options),this.$emit("inited",this.$viewer)}},watch:{images:function(){var e=this;this.$nextTick(function(){e.onChange()})},trigger:{handler:function(){var e=this;this.$nextTick(function(){e.onChange()})},deep:!0},options:{handler:function(){var e=this;this.$nextTick(function(){e.rebuildViewer()})},deep:!0}},mounted:function(){this.createViewer()},destroyed:function(){this.destroyViewer()}}},function(e,t){var n,i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"===("undefined"==typeof window?"undefined":i(window))&&(n=window)}e.exports=n},function(e,t){e.exports=function(e,t,n,i){var r,o=e=e||{},u=typeof e.default;"object"!==u&&"function"!==u||(r=e,o=e.default);var c="function"==typeof o?o.options:o;if(t&&(c.render=t.render,c.staticRenderFns=t.staticRenderFns),n&&(c._scopeId=n),i){var a=Object.create(c.computed||null);Object.keys(i).forEach(function(e){var t=i[e];a[e]=function(){return t}}),c.computed=a}return{esModule:r,exports:o,options:c}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement;return(e._self._c||t)("div",[e._t("default",null,{images:e.images,options:e.options})],2)},staticRenderFns:[]}}])});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("viewerjs")):"function"==typeof define&&define.amd?define(["viewerjs"],t):"object"==typeof exports?exports.VueViewer=t(require("viewerjs")):e.VueViewer=t(e.Viewer)}(this,function(e){return function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=4)}([function(t,n){t.exports=e},function(e,t,n){"use strict";(function(e){var i=n(0),r=n.n(i),o=n(5),u=function(t,i){function u(e,n){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t.nextTick(function(){i||!e["$"+p]?(s(e),e["$"+p]=new r.a(e,n),l("viewer created")):(e["$"+p].update(),l("viewer updated"))})}function c(t,n,i,r){f(t);var o=e.MutationObserver||e.WebKitMutationObserver||e.MozMutationObserver;if(!o)return void l("observer not supported");var u=new o(function(e){e.forEach(function(e){l("viewer mutation:"+e.type),i(t,n,r)})}),c={attributes:!0,childList:!0,characterData:!0,subtree:!0};u.observe(t,c),t.$viewerMutationObserver=u,l("observer created")}function a(e,t,n,i){var r=t.expression,o=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/;if(!r||!o.test(r))return void l("only simple dot-delimited paths can create watcher");e.$viewerUnwatch=n.context.$watch(r,function(t,n){l("change detected by watcher: ",r),i(e,t,!0)},{deep:!0}),l("watcher created, expression: ",r)}function s(e){e["$"+p]&&(e["$"+p].destroy(),delete e["$"+p],l("viewer destroyed"))}function f(e){e.$viewerMutationObserver&&(e.$viewerMutationObserver.disconnect(),delete e.$viewerMutationObserver,l("observer destroyed"))}function d(e){e.$viewerUnwatch&&(e.$viewerUnwatch(),delete e.$viewerUnwatch,l("watcher destroyed"))}function l(){var e;h&&(e=console).log.apply(e,arguments)}var v=i.name,p=void 0===v?"viewer":v,w=i.debug,h=void 0!==w&&w;t.directive("viewer",{bind:function(e,t,i){l("viewer bind");var r=n.i(o.a)(50,u);r(e,t.value),a(e,t,i,r),t.modifiers.static||c(e,t.value,r,t.modifiers.rebuild)},unbind:function(e,t){l("viewer unbind"),f(e),d(e),s(e)}})};t.a={install:u}}).call(t,n(7))},function(e,t,n){"use strict";function i(){var e={},t=!1,n=0,r=arguments.length;for("[object Boolean]"===Object.prototype.toString.call(arguments[0])&&(t=arguments[0],n++);n<r;n++){var o=arguments[n];!function(n){for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t&&"[object Object]"===Object.prototype.toString.call(n[r])?e[r]=i(!0,e[r],n[r]):e[r]=n[r])}(o)}return e}t.a=i},function(e,t,n){var i=n(8)(n(6),n(9),null,null);e.exports=i.exports},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),o=n.n(r),u=n(1),c=n(0),a=n.n(c);t.default={install:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.name,c=void 0===r?"viewer":r,s=t.debug,f=void 0!==s&&s,d=t.defaultOptions;a.a.setDefaults(d),e.component(c,n.i(i.a)(o.a,{name:c})),e.use(u.a,{name:c,debug:f})},setDefaults:function(e){a.a.setDefaults(e)}}},function(e,t,n){"use strict";function i(e,t,n,i){function r(){c&&clearTimeout(c)}function o(){r(),a=!0}function u(){function o(){s=Date.now(),n.apply(f,l)}function u(){c=void 0}var f=this,d=Date.now()-s,l=arguments;a||(i&&!c&&o(),r(),void 0===i&&d>e?o():!0!==t&&(c=setTimeout(i?u:o,void 0===i?e-d:e)))}var c,a=!1,s=0;return"boolean"!=typeof t&&(i=n,n=t,t=void 0),u.cancel=o,u}function r(e,t,n){return void 0===n?i(e,t,!1):i(e,n,!1!==t)}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),r=n.n(i);t.default={props:{images:{type:Array},rebuild:{type:Boolean,default:!1},trigger:{},options:{type:Object}},data:function(){return{}},computed:{},methods:{onChange:function(){this.rebuild?this.rebuildViewer():this.updateViewer()},rebuildViewer:function(){this.destroyViewer(),this.createViewer()},updateViewer:function(){this.$viewer?(this.$viewer.update(),this.$emit("inited",this.$viewer)):this.createViewer()},destroyViewer:function(){this.$viewer&&this.$viewer.destroy()},createViewer:function(){this.$viewer=new r.a(this.$el,this.options),this.$emit("inited",this.$viewer)}},watch:{images:function(){var e=this;this.$nextTick(function(){e.onChange()})},trigger:{handler:function(){var e=this;this.$nextTick(function(){e.onChange()})},deep:!0},options:{handler:function(){var e=this;this.$nextTick(function(){e.rebuildViewer()})},deep:!0}},mounted:function(){this.createViewer()},destroyed:function(){this.destroyViewer()}}},function(e,t){var n,i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"===("undefined"==typeof window?"undefined":i(window))&&(n=window)}e.exports=n},function(e,t){e.exports=function(e,t,n,i){var r,o=e=e||{},u=typeof e.default;"object"!==u&&"function"!==u||(r=e,o=e.default);var c="function"==typeof o?o.options:o;if(t&&(c.render=t.render,c.staticRenderFns=t.staticRenderFns),n&&(c._scopeId=n),i){var a=Object.create(c.computed||null);Object.keys(i).forEach(function(e){var t=i[e];a[e]=function(){return t}}),c.computed=a}return{esModule:r,exports:o,options:c}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement;return(e._self._c||t)("div",[e._t("default",null,{images:e.images,options:e.options})],2)},staticRenderFns:[]}}])});
{
"name": "v-viewer",
"version": "1.5.0",
"version": "1.5.1",
"description": "Image viewer component for vue, supports rotation, scale, zoom and so on, based on viewer.js",

@@ -5,0 +5,0 @@ "main": "dist/v-viewer.js",

@@ -9,5 +9,10 @@ # v-viewer

## Quick Example
- [CodePen](https://codepen.io/mirari/pen/PePrVq)
- [JSFiddle](https://jsfiddle.net/mirari/n1L0gxtv/)
## Examples
- [directive](https://codepen.io/mirari/pen/PePrVq)
- [component](https://codepen.io/mirari/pen/PowNyEY)
- [thumbnail & source](https://codepen.io/mirari/pen/LYENgMM)
- [viewer callback](https://codepen.io/mirari/pen/ZwpGBO)
- [hide img tags](https://codepen.io/mirari/pen/vjjXwj)
- [filtered images](https://codepen.io/mirari/pen/vvPoQb)
- [**click buttons to show different images**](https://codesandbox.io/s/v-viewer-zhezr)

@@ -14,0 +19,0 @@ ## [中文文档](https://mirari.cc/2017/08/27/Vue%E5%9B%BE%E7%89%87%E6%B5%8F%E8%A7%88%E7%BB%84%E4%BB%B6v-viewer%EF%BC%8C%E6%94%AF%E6%8C%81%E6%97%8B%E8%BD%AC%E3%80%81%E7%BC%A9%E6%94%BE%E3%80%81%E7%BF%BB%E8%BD%AC%E7%AD%89%E6%93%8D%E4%BD%9C/)

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