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

vue-tippy

Package Overview
Dependencies
Maintainers
1
Versions
175
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-tippy - npm Package Compare versions

Comparing version 0.2.6 to 0.2.7

2

package.json
{
"name": "vue-tippy",
"version": "0.2.6",
"version": "0.2.7",
"description": "",

@@ -5,0 +5,0 @@ "main": "vue-tippy.js",

@@ -34,2 +34,7 @@ # vue-tippy

#### Bind settings
```html
<button title="Hello" v-tippy="{ position : 'top', arrow: true }"> My Button! </button>
```
#### Popper HTML

@@ -36,0 +41,0 @@ ```html

@@ -31,3 +31,3 @@ const Tippy = require('tippy.js');

if (index > -1)
Vue.$tippyInstances.splice(index, 1);
Vue.$tippyInstances.splice(index, 1);

@@ -50,11 +50,13 @@ },

instance.tippy.store.forEach(function (s) {
if (instance.tippy && instance.tippy && instance.tippy.store) {
instance.tippy.store.forEach(function (s) {
if (s.settings.html) {
Vue.nextTick(function () {
s.tippyInstance.update(s.popper);
});
}
if (s && s && s.settings && s.settings.html) {
Vue.nextTick(function () {
s.tippyInstance.update(s.popper);
});
}
});
});
}

@@ -68,13 +70,60 @@ });

inserted: function (el, binding, vnode, oldVnode) {
const handlers = (vnode.data && vnode.data.on) ||
(vnode.componentOptions && vnode.componentOptions.listeners);
el.tippy = new Tippy(el, {
onShow: function () {
var opts = binding.value || {};
opts.onShow = function () {
if (handlers && handlers["show"]) {
handlers["show"].fns();
}
};
opts.onShown = function () {
if (handlers && handlers["shown"]) {
handlers["shown"].fns();
}
};
opts.onHidden = function () {
if (handlers && handlers["hidden"]) {
handlers["hidden"].fns();
}
};
opts.onHide = function () {
if (handlers && handlers["hide"]) {
handlers["hide"].fns();
}
};
el.tippy = new Tippy(el, opts);
Vue.$tippyInstances.push({
el: el,
tippy: el.tippy,
})
},
unbind: function (el, binding, vnode) {
vnode.context.$tippy.destroyTippy(el);
},
componentUpdated: function (el, binding,vnode) {
var opts = binding.value || {};
var oldValue = binding.oldValue || {};
if (el.tippy && ( JSON.stringify(opts) !== JSON.stringify(oldValue) )) {
const handlers = (vnode.data && vnode.data.on) || (vnode.componentOptions && vnode.componentOptions.listeners);
vnode.context.$tippy.destroyTippy(el);
opts.onShow = function () {
if (handlers && handlers["show"]) {
handlers["show"].fns();
}
},
onShown: function () {
};
opts.onShown = function () {

@@ -84,28 +133,23 @@ if (handlers && handlers["shown"]) {

}
},
onHidden: function () {
};
opts.onHidden = function () {
if (handlers && handlers["hidden"]) {
handlers["hidden"].fns();
}
},
onHide: function () {
};
opts.onHide = function () {
if (handlers && handlers["hide"]) {
handlers["hide"].fns();
}
},
});
Vue.$tippyInstances.push({
el: el,
tippy: el.tippy,
};
})
el.tippy = new Tippy(el, opts);
Vue.$tippyInstances.push({
el: el,
tippy: el.tippy,
},
unbind: function (el, binding, vnode) {
vnode.context.$tippy.destroyTippy(el);
},
componentUpdated: function (el) {
})
}
else if (el.tippy && (el.getAttribute('title') || el.getAttribute('data-html'))) {
if (el.tippy && (el.getAttribute('title') || el.getAttribute('data-html'))) {
el.tippy.store.forEach(function (s) {

@@ -112,0 +156,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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