Socket
Socket
Sign inDemoInstall

d3-selection

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

d3-selection - npm Package Compare versions

Comparing version 0.6.7 to 0.6.8

src/window.js

2

build/bundle.js

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

var version = "0.6.7"; export * from "../index"; export {version};
var version = "0.6.8"; export * from "../index"; export {version};

@@ -164,6 +164,5 @@ (function (global, factory) {

function defaultView(node) {
return node
&& ((node.ownerDocument && node.ownerDocument.defaultView) // node is a Node
|| (node.document && node) // node is a Window
|| node.defaultView); // node is a Document
return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node
|| (node.document && node) // node is a Window
|| node.defaultView; // node is a Document
}

@@ -942,3 +941,3 @@

var version = "0.6.7";
var version = "0.6.8";

@@ -958,3 +957,4 @@ exports.version = version;

exports.touches = touches;
exports.window = defaultView;
}));

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

!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(t.d3_selection={})}(this,function(t){"use strict";function n(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),zt.hasOwnProperty(n)?{space:zt[n],local:t}:t}function e(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e&&e!==n.documentElement.namespaceURI?n.createElementNS(e,t):n.createElement(t)}}function r(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function i(t){var i=n(t);return(i.local?r:e)(i)}function u(t){return t.replace($t,"\\$&")}function o(){}function s(n,e,r){return function(i){var u=t.event;t.event=i;try{n.call(this,this.__data__,e,r)}finally{t.event=u}}}function a(t){return function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t(n)}}function c(t,n){return function(){var e=this[t];e&&(this.removeEventListener(n,e,e._capture),delete this[t])}}function l(t){var n=new RegExp("^__on([^.]+)"+u(t)+"$");return function(){for(var t in this){var e=t.match(n);if(e){var r=this[t];this.removeEventListener(e[1],r,r._capture),delete this[t]}}}}function h(t,n,e,r,i){return function(u,o,c){var l=this[n];l&&this.removeEventListener(e,l,l._capture),l=s(r,o,c),t&&(l=a(l)),l._listener=r,this.addEventListener(e,this[n]=l,l._capture=i)}}function f(t,n,e){var r,i,u=t+"",s="__on"+u;return arguments.length<2?(r=this.node()[s])&&r._listener:((r=u.indexOf("."))>0&&(u=u.slice(0,r)),(i=jt.hasOwnProperty(u))&&(u=jt[u]),this.each(n?r?h(i,s,u,n,null==e?!1:e):o:r?c(s,u):l(u)))}function p(){for(var n,e=t.event;n=e.sourceEvent;)e=n;return e}function _(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}function m(t){return function(){return this.querySelector(t)}}function d(t){"function"!=typeof t&&(t=m(t));for(var n=this._groups,e=this._update,r=n.length,i=new Array(r),u=0;r>u;++u)for(var o,s,a=n[u],c=a.length,l=i[u]=new Array(c),h=0;c>h;++h)(o=a[h])&&(s=t.call(o,o.__data__,h,a))&&("__data__"in o&&(s.__data__=o.__data__),e&&(e._groups[u][h]=s),l[h]=s);return new Pt(i,this._parents)}function g(t){return function(){return this.querySelectorAll(t)}}function v(t){"function"!=typeof t&&(t=g(t));for(var n=this._groups,e=n.length,r=[],i=[],u=0;e>u;++u)for(var o,s=n[u],a=s.length,c=0;a>c;++c)(o=s[c])&&(r.push(t.call(o,o.__data__,c,s)),i.push(o));return new Pt(r,i)}function y(t){"function"!=typeof t&&(t=Yt(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;e>i;++i)for(var u,o=n[i],s=o.length,a=r[i]=[],c=0;s>c;++c)(u=o[c])&&t.call(u,u.__data__,c,o)&&a.push(u);return new Pt(r,this._parents)}function w(t){for(var n=t._groups,e=0,r=n.length;r>e;++e)if(!Array.isArray(i=n[e]))for(var i,u=i.length,o=n[e]=new Array(u),s=0;u>s;++s)o[s]=i[s];return n}function x(t){return function(){return t}}function A(t,n,e,r,i){var u,o=0,s=n.length,a=i.length,c=Math.min(s,a);for(e.length=0,e.length=a,r.length=0,r.length=s;c>o;++o)(u=n[o])?u.__data__=i[o]:e[o]=new E(t,i[o]);for(;a>o;++o)e[o]=new E(t,i[o]);for(;s>o;++o)(u=n[o])&&(r[o]=n[o]);n.length=a}function S(t,n,e,r,i,u){var o,s,a,c=i.length,l=n.length,h={},f=new Array(l);for(e.length=0,e.length=c,r.length=0,r.length=l,o=0;l>o;++o)(s=n[o])&&(f[o]=a=Gt+u.call(s,s.__data__,o,n),h[a]?r[o]=s:h[a]=s);for(n.length=0,n.length=c,o=0;c>o;++o)a=Gt+u.call(t,i[o],o,i),(s=h[a])?s!==!0&&(n[o]=s,s.__data__=i[o]):e[o]=new E(t,i[o]),h[a]=!0;for(o=0;l>o;++o)(s=h[f[o]])!==!0&&(r[o]=s)}function b(t,n){if(!t){var e=new Array(this.size()),r=-1;return this.each(function(t){e[++r]=t}),e}var i=n?S:A,u=this._parents,o=w(this),s=(this._enter=this.enter())._groups,a=(this._exit=this.exit())._groups;"function"!=typeof t&&(t=x(t));for(var c=o.length,l=0;c>l;++l){var h=o[l],f=u[l];i(f,h,s[l],a[l],t.call(f,f&&f.__data__,l,u),n);for(var p,_,m=h.length,d=0,g=0;m>d;++d)if(p=s[l][d]){for(d>=g&&(g=d+1);!(_=h[g])&&++g<m;);p._next=_||null}}return this}function E(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}function C(t){return new Array(t.length)}function N(){var t=this._enter;return t?(this._enter=null,t):(t=new Pt(this._groups.map(C),this._parents),t._update=this,t)}function M(){var t=this._exit;return t?(this._exit=null,t):new Pt(this._groups.map(C),this._parents)}function T(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var r,i=t[n],u=i.length-1,o=i[u];--u>=0;)(r=i[u])&&(o&&o!==r.nextSibling&&o.parentNode.insertBefore(r,o),o=r);return this}function L(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=P);for(var e=w(this),r=0,i=e.length;i>r;++r)e[r].sort(n);return this.order()}function P(t,n){return n>t?-1:t>n?1:t>=n?0:NaN}function q(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function B(){var t=new Array(this.size()),n=-1;return this.each(function(){t[++n]=this}),t}function D(){for(var t=this._groups,n=0,e=t.length;e>n;++n)for(var r=t[n],i=0,u=r.length;u>i;++i){var o=r[i];if(o)return o}return null}function O(){var t=0;return this.each(function(){++t}),t}function R(){return!this.node()}function V(t){for(var n=this._groups,e=0,r=n.length;r>e;++e)for(var i,u=n[e],o=0,s=u.length;s>o;++o)(i=u[o])&&t.call(i,i.__data__,o,u);return this}function X(t){return function(){this.removeAttribute(t)}}function z(t){return function(){this.removeAttributeNS(t.space,t.local)}}function H(t,n){return function(){this.setAttribute(t,n)}}function I(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function U(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function Y(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function $(t,e){var r=n(t);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((null==e?r.local?z:X:"function"==typeof e?r.local?Y:U:r.local?I:H)(r,e))}function j(t){return function(){this.style.removeProperty(t)}}function k(t,n,e){return function(){this.style.setProperty(t,n,e)}}function G(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function K(t,n,e){var r;return arguments.length>1?this.each((null==n?j:"function"==typeof n?G:k)(t,n,null==e?"":e)):_(r=this.node()).getComputedStyle(r,null).getPropertyValue(t)}function W(t){return function(){delete this[t]}}function F(t,n){return function(){this[t]=n}}function J(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function Q(t,n){return arguments.length>1?this.each((null==n?W:"function"==typeof n?J:F)(t,n)):this.node()[t]}function Z(t){return t.trim().split(/^|\s+/)}function tt(t){return t.classList||new nt(t)}function nt(t){this._node=t,this._names=Z(t.getAttribute("class")||"")}function et(t,n){for(var e=tt(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function rt(t,n){for(var e=tt(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function it(t){return function(){et(this,t)}}function ut(t){return function(){rt(this,t)}}function ot(t,n){return function(){(n.apply(this,arguments)?et:rt)(this,t)}}function st(t,n){var e=Z(t+"");if(arguments.length<2){for(var r=tt(this.node()),i=-1,u=e.length;++i<u;)if(!r.contains(e[i]))return!1;return!0}return this.each(("function"==typeof n?ot:n?it:ut)(e,n))}function at(){this.textContent=""}function ct(t){return function(){this.textContent=t}}function lt(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function ht(t){return arguments.length?this.each(null==t?at:("function"==typeof t?lt:ct)(t)):this.node().textContent}function ft(){this.innerHTML=""}function pt(t){return function(){this.innerHTML=t}}function _t(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}function mt(t){return arguments.length?this.each(null==t?ft:("function"==typeof t?_t:pt)(t)):this.node().innerHTML}function dt(){this.parentNode.appendChild(this)}function gt(){return this.each(dt)}function vt(){this.parentNode.insertBefore(this,this.parentNode.firstChild)}function yt(){return this.each(vt)}function wt(t){return function(){return this.appendChild(t.apply(this,arguments))}}function xt(t,n){return function(){return this.insertBefore(t.apply(this,arguments),n.apply(this,arguments)||null)}}function At(){return null}function St(t,n){var e="function"==typeof t?t:i(t);return this.select(arguments.length<2?wt(e):xt(e,null==n?At:"function"==typeof n?n:m(n)))}function bt(){var t=this.parentNode;t&&t.removeChild(this)}function Et(){return this.each(bt)}function Ct(t){return arguments.length?this.property("__data__",t):this.node().__data__}function Nt(t,n,e){var r=_(t),i=r.CustomEvent;i?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}function Mt(t,n){return function(){return Nt(this,t,n)}}function Tt(t,n){return function(){return Nt(this,t,n.apply(this,arguments))}}function Lt(t,n){return this.each(("function"==typeof n?Tt:Mt)(t,n))}function Pt(t,n){this._groups=t,this._parents=n}function qt(){return new Pt([[document.documentElement]],Kt)}function Bt(t){return"string"==typeof t?new Pt([[document.querySelector(t)]],[document.documentElement]):new Pt([[t]],Kt)}function Dt(t,n){var e=t.ownerSVGElement||t;if(e.createSVGPoint){var r=e.createSVGPoint();if(0>Wt){var i=_(t);if(i.scrollX||i.scrollY){e=Bt(i.document.body).append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var u=e.node().getScreenCTM();Wt=!(u.f||u.e),e.remove()}}return Wt?(r.x=n.pageX,r.y=n.pageY):(r.x=n.clientX,r.y=n.clientY),r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}var o=t.getBoundingClientRect();return[n.clientX-o.left-t.clientLeft,n.clientY-o.top-t.clientTop]}function Ot(t,n){return null==n&&(n=p()),n.changedTouches&&(n=n.changedTouches[0]),Dt(t,n)}function Rt(t){return"string"==typeof t?new Pt([document.querySelectorAll(t)],[document.documentElement]):new Pt([t],Kt)}function Vt(t,n,e){arguments.length<3&&(e=n,n=p().changedTouches);for(var r,i=0,u=n?n.length:0;u>i;++i)if((r=n[i]).identifier===e)return Dt(t,r);return null}function Xt(t,n){null==n&&(n=p().touches);for(var e=0,r=n?n.length:0,i=new Array(r);r>e;++e)i[e]=Dt(t,n[e]);return i}var zt={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Ht=function(t){return function(){return this.matches(t)}};if("undefined"!=typeof document){var It=document.documentElement;if(!It.matches){var Ut=It.webkitMatchesSelector||It.msMatchesSelector||It.mozMatchesSelector||It.oMatchesSelector;Ht=function(t){return function(){return Ut.call(this,t)}}}}var Yt=Ht,$t=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,jt={};if(t.event=null,"undefined"!=typeof document){var kt=document.documentElement;"onmouseenter"in kt||(jt={mouseenter:"mouseover",mouseleave:"mouseout"})}var Gt="$";E.prototype={appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}},nt.prototype={add:function(t){var n=this._names.indexOf(t);0>n&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Kt=[null];Pt.prototype=qt.prototype={select:d,selectAll:v,filter:y,data:b,enter:N,exit:M,order:T,sort:L,call:q,nodes:B,node:D,size:O,empty:R,each:V,attr:$,style:K,property:Q,classed:st,text:ht,html:mt,raise:gt,lower:yt,append:St,remove:Et,datum:Ct,on:f,dispatch:Lt};var Wt="undefined"!=typeof navigator&&/WebKit/.test(navigator.userAgent)?-1:0,Ft="0.6.7";t.version=Ft,t.creator=i,t.matcher=Yt,t.mouse=Ot,t.namespace=n,t.namespaces=zt,t.select=Bt,t.selectAll=Rt,t.selection=qt,t.selector=m,t.selectorAll=g,t.touch=Vt,t.touches=Xt});
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(t.d3_selection={})}(this,function(t){"use strict";function n(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),zt.hasOwnProperty(n)?{space:zt[n],local:t}:t}function e(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e&&e!==n.documentElement.namespaceURI?n.createElementNS(e,t):n.createElement(t)}}function r(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function i(t){var i=n(t);return(i.local?r:e)(i)}function u(t){return t.replace($t,"\\$&")}function o(){}function s(n,e,r){return function(i){var u=t.event;t.event=i;try{n.call(this,this.__data__,e,r)}finally{t.event=u}}}function a(t){return function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t(n)}}function c(t,n){return function(){var e=this[t];e&&(this.removeEventListener(n,e,e._capture),delete this[t])}}function l(t){var n=new RegExp("^__on([^.]+)"+u(t)+"$");return function(){for(var t in this){var e=t.match(n);if(e){var r=this[t];this.removeEventListener(e[1],r,r._capture),delete this[t]}}}}function h(t,n,e,r,i){return function(u,o,c){var l=this[n];l&&this.removeEventListener(e,l,l._capture),l=s(r,o,c),t&&(l=a(l)),l._listener=r,this.addEventListener(e,this[n]=l,l._capture=i)}}function f(t,n,e){var r,i,u=t+"",s="__on"+u;return arguments.length<2?(r=this.node()[s])&&r._listener:((r=u.indexOf("."))>0&&(u=u.slice(0,r)),(i=jt.hasOwnProperty(u))&&(u=jt[u]),this.each(n?r?h(i,s,u,n,null==e?!1:e):o:r?c(s,u):l(u)))}function p(){for(var n,e=t.event;n=e.sourceEvent;)e=n;return e}function _(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function m(t){return function(){return this.querySelector(t)}}function d(t){"function"!=typeof t&&(t=m(t));for(var n=this._groups,e=this._update,r=n.length,i=new Array(r),u=0;r>u;++u)for(var o,s,a=n[u],c=a.length,l=i[u]=new Array(c),h=0;c>h;++h)(o=a[h])&&(s=t.call(o,o.__data__,h,a))&&("__data__"in o&&(s.__data__=o.__data__),e&&(e._groups[u][h]=s),l[h]=s);return new Pt(i,this._parents)}function g(t){return function(){return this.querySelectorAll(t)}}function v(t){"function"!=typeof t&&(t=g(t));for(var n=this._groups,e=n.length,r=[],i=[],u=0;e>u;++u)for(var o,s=n[u],a=s.length,c=0;a>c;++c)(o=s[c])&&(r.push(t.call(o,o.__data__,c,s)),i.push(o));return new Pt(r,i)}function y(t){"function"!=typeof t&&(t=Yt(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;e>i;++i)for(var u,o=n[i],s=o.length,a=r[i]=[],c=0;s>c;++c)(u=o[c])&&t.call(u,u.__data__,c,o)&&a.push(u);return new Pt(r,this._parents)}function w(t){for(var n=t._groups,e=0,r=n.length;r>e;++e)if(!Array.isArray(i=n[e]))for(var i,u=i.length,o=n[e]=new Array(u),s=0;u>s;++s)o[s]=i[s];return n}function x(t){return function(){return t}}function A(t,n,e,r,i){var u,o=0,s=n.length,a=i.length,c=Math.min(s,a);for(e.length=0,e.length=a,r.length=0,r.length=s;c>o;++o)(u=n[o])?u.__data__=i[o]:e[o]=new E(t,i[o]);for(;a>o;++o)e[o]=new E(t,i[o]);for(;s>o;++o)(u=n[o])&&(r[o]=n[o]);n.length=a}function S(t,n,e,r,i,u){var o,s,a,c=i.length,l=n.length,h={},f=new Array(l);for(e.length=0,e.length=c,r.length=0,r.length=l,o=0;l>o;++o)(s=n[o])&&(f[o]=a=Gt+u.call(s,s.__data__,o,n),h[a]?r[o]=s:h[a]=s);for(n.length=0,n.length=c,o=0;c>o;++o)a=Gt+u.call(t,i[o],o,i),(s=h[a])?s!==!0&&(n[o]=s,s.__data__=i[o]):e[o]=new E(t,i[o]),h[a]=!0;for(o=0;l>o;++o)(s=h[f[o]])!==!0&&(r[o]=s)}function b(t,n){if(!t){var e=new Array(this.size()),r=-1;return this.each(function(t){e[++r]=t}),e}var i=n?S:A,u=this._parents,o=w(this),s=(this._enter=this.enter())._groups,a=(this._exit=this.exit())._groups;"function"!=typeof t&&(t=x(t));for(var c=o.length,l=0;c>l;++l){var h=o[l],f=u[l];i(f,h,s[l],a[l],t.call(f,f&&f.__data__,l,u),n);for(var p,_,m=h.length,d=0,g=0;m>d;++d)if(p=s[l][d]){for(d>=g&&(g=d+1);!(_=h[g])&&++g<m;);p._next=_||null}}return this}function E(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}function C(t){return new Array(t.length)}function N(){var t=this._enter;return t?(this._enter=null,t):(t=new Pt(this._groups.map(C),this._parents),t._update=this,t)}function M(){var t=this._exit;return t?(this._exit=null,t):new Pt(this._groups.map(C),this._parents)}function T(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var r,i=t[n],u=i.length-1,o=i[u];--u>=0;)(r=i[u])&&(o&&o!==r.nextSibling&&o.parentNode.insertBefore(r,o),o=r);return this}function L(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=P);for(var e=w(this),r=0,i=e.length;i>r;++r)e[r].sort(n);return this.order()}function P(t,n){return n>t?-1:t>n?1:t>=n?0:NaN}function q(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function B(){var t=new Array(this.size()),n=-1;return this.each(function(){t[++n]=this}),t}function D(){for(var t=this._groups,n=0,e=t.length;e>n;++n)for(var r=t[n],i=0,u=r.length;u>i;++i){var o=r[i];if(o)return o}return null}function O(){var t=0;return this.each(function(){++t}),t}function R(){return!this.node()}function V(t){for(var n=this._groups,e=0,r=n.length;r>e;++e)for(var i,u=n[e],o=0,s=u.length;s>o;++o)(i=u[o])&&t.call(i,i.__data__,o,u);return this}function X(t){return function(){this.removeAttribute(t)}}function z(t){return function(){this.removeAttributeNS(t.space,t.local)}}function H(t,n){return function(){this.setAttribute(t,n)}}function I(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function U(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function Y(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function $(t,e){var r=n(t);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((null==e?r.local?z:X:"function"==typeof e?r.local?Y:U:r.local?I:H)(r,e))}function j(t){return function(){this.style.removeProperty(t)}}function k(t,n,e){return function(){this.style.setProperty(t,n,e)}}function G(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function K(t,n,e){var r;return arguments.length>1?this.each((null==n?j:"function"==typeof n?G:k)(t,n,null==e?"":e)):_(r=this.node()).getComputedStyle(r,null).getPropertyValue(t)}function W(t){return function(){delete this[t]}}function F(t,n){return function(){this[t]=n}}function J(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function Q(t,n){return arguments.length>1?this.each((null==n?W:"function"==typeof n?J:F)(t,n)):this.node()[t]}function Z(t){return t.trim().split(/^|\s+/)}function tt(t){return t.classList||new nt(t)}function nt(t){this._node=t,this._names=Z(t.getAttribute("class")||"")}function et(t,n){for(var e=tt(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function rt(t,n){for(var e=tt(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function it(t){return function(){et(this,t)}}function ut(t){return function(){rt(this,t)}}function ot(t,n){return function(){(n.apply(this,arguments)?et:rt)(this,t)}}function st(t,n){var e=Z(t+"");if(arguments.length<2){for(var r=tt(this.node()),i=-1,u=e.length;++i<u;)if(!r.contains(e[i]))return!1;return!0}return this.each(("function"==typeof n?ot:n?it:ut)(e,n))}function at(){this.textContent=""}function ct(t){return function(){this.textContent=t}}function lt(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function ht(t){return arguments.length?this.each(null==t?at:("function"==typeof t?lt:ct)(t)):this.node().textContent}function ft(){this.innerHTML=""}function pt(t){return function(){this.innerHTML=t}}function _t(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}function mt(t){return arguments.length?this.each(null==t?ft:("function"==typeof t?_t:pt)(t)):this.node().innerHTML}function dt(){this.parentNode.appendChild(this)}function gt(){return this.each(dt)}function vt(){this.parentNode.insertBefore(this,this.parentNode.firstChild)}function yt(){return this.each(vt)}function wt(t){return function(){return this.appendChild(t.apply(this,arguments))}}function xt(t,n){return function(){return this.insertBefore(t.apply(this,arguments),n.apply(this,arguments)||null)}}function At(){return null}function St(t,n){var e="function"==typeof t?t:i(t);return this.select(arguments.length<2?wt(e):xt(e,null==n?At:"function"==typeof n?n:m(n)))}function bt(){var t=this.parentNode;t&&t.removeChild(this)}function Et(){return this.each(bt)}function Ct(t){return arguments.length?this.property("__data__",t):this.node().__data__}function Nt(t,n,e){var r=_(t),i=r.CustomEvent;i?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}function Mt(t,n){return function(){return Nt(this,t,n)}}function Tt(t,n){return function(){return Nt(this,t,n.apply(this,arguments))}}function Lt(t,n){return this.each(("function"==typeof n?Tt:Mt)(t,n))}function Pt(t,n){this._groups=t,this._parents=n}function qt(){return new Pt([[document.documentElement]],Kt)}function Bt(t){return"string"==typeof t?new Pt([[document.querySelector(t)]],[document.documentElement]):new Pt([[t]],Kt)}function Dt(t,n){var e=t.ownerSVGElement||t;if(e.createSVGPoint){var r=e.createSVGPoint();if(0>Wt){var i=_(t);if(i.scrollX||i.scrollY){e=Bt(i.document.body).append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var u=e.node().getScreenCTM();Wt=!(u.f||u.e),e.remove()}}return Wt?(r.x=n.pageX,r.y=n.pageY):(r.x=n.clientX,r.y=n.clientY),r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}var o=t.getBoundingClientRect();return[n.clientX-o.left-t.clientLeft,n.clientY-o.top-t.clientTop]}function Ot(t,n){return null==n&&(n=p()),n.changedTouches&&(n=n.changedTouches[0]),Dt(t,n)}function Rt(t){return"string"==typeof t?new Pt([document.querySelectorAll(t)],[document.documentElement]):new Pt([t],Kt)}function Vt(t,n,e){arguments.length<3&&(e=n,n=p().changedTouches);for(var r,i=0,u=n?n.length:0;u>i;++i)if((r=n[i]).identifier===e)return Dt(t,r);return null}function Xt(t,n){null==n&&(n=p().touches);for(var e=0,r=n?n.length:0,i=new Array(r);r>e;++e)i[e]=Dt(t,n[e]);return i}var zt={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Ht=function(t){return function(){return this.matches(t)}};if("undefined"!=typeof document){var It=document.documentElement;if(!It.matches){var Ut=It.webkitMatchesSelector||It.msMatchesSelector||It.mozMatchesSelector||It.oMatchesSelector;Ht=function(t){return function(){return Ut.call(this,t)}}}}var Yt=Ht,$t=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,jt={};if(t.event=null,"undefined"!=typeof document){var kt=document.documentElement;"onmouseenter"in kt||(jt={mouseenter:"mouseover",mouseleave:"mouseout"})}var Gt="$";E.prototype={appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}},nt.prototype={add:function(t){var n=this._names.indexOf(t);0>n&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Kt=[null];Pt.prototype=qt.prototype={select:d,selectAll:v,filter:y,data:b,enter:N,exit:M,order:T,sort:L,call:q,nodes:B,node:D,size:O,empty:R,each:V,attr:$,style:K,property:Q,classed:st,text:ht,html:mt,raise:gt,lower:yt,append:St,remove:Et,datum:Ct,on:f,dispatch:Lt};var Wt="undefined"!=typeof navigator&&/WebKit/.test(navigator.userAgent)?-1:0,Ft="0.6.8";t.version=Ft,t.creator=i,t.matcher=Yt,t.mouse=Ot,t.namespace=n,t.namespaces=zt,t.select=Bt,t.selectAll=Rt,t.selection=qt,t.selector=m,t.selectorAll=g,t.touch=Vt,t.touches=Xt,t.window=_});

@@ -13,2 +13,3 @@ export {default as creator} from "./src/creator";

export {default as touches} from "./src/touches";
export {default as window} from "./src/window";
export {event} from "./src/selection/on";
{
"name": "d3-selection",
"version": "0.6.7",
"version": "0.6.8",
"description": "Data-driven DOM manipulation: select elements and join them to data.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -337,2 +337,6 @@ # d3-selection

<a name="window" href="#window">#</a> d3.<b>window</b>(<i>node</i>)
Returns the owner window for the specified *node*. If *node* is a node, returns the owner document’s default view; if *node* is a document, returns its default view; otherwise returns the *node*.
### Joining Data

@@ -548,3 +552,3 @@

<a name="selection_call" href="#selection_call">#</a> <i>selection</i>.<b>call</b>(<i>selection</i>[, <i>arguments…</i>])
<a name="selection_call" href="#selection_call">#</a> <i>selection</i>.<b>call</b>(<i>function</i>[, <i>arguments…</i>])

@@ -551,0 +555,0 @@ Invokes the specified *function* (exactly once), passing in the current selection along with any optional *arguments*. Returns the current selection. This is equivalent to invoking the function by hand but facilitates method chaining. For example, to set several attributes in a reusable function:

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

import defaultView from "./defaultView";
import defaultView from "./window";
import select from "./select";

@@ -3,0 +3,0 @@

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

import defaultView from "../defaultView";
import defaultView from "../window";

@@ -3,0 +3,0 @@ function dispatchEvent(node, type, params) {

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

import defaultView from "../defaultView";
import defaultView from "../window";

@@ -3,0 +3,0 @@ function styleRemove(name) {

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