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.5 to 0.6.6

2

build/bundle.js

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

var version = "0.6.5"; export * from "../index"; export {version};
var version = "0.6.6"; export * from "../index"; export {version};

@@ -119,7 +119,7 @@ (function (global, factory) {

for (var groups = this._nodes, update = this._update, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
for (var groups = this._groups, update = this._update, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {
if ("__data__" in node) subnode.__data__ = node.__data__;
if (update) update._nodes[j][i] = subnode;
if (update) update._groups[j][i] = subnode;
subgroup[i] = subnode;

@@ -142,3 +142,3 @@ }

for (var groups = this._nodes, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {

@@ -181,3 +181,3 @@ if (node = group[i]) {

for (var groups = this._nodes, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {

@@ -195,3 +195,3 @@ if ((node = group[i]) && match.call(node, node.__data__, i, group)) {

for (var groups = selection._nodes, j = 0, m = groups.length; j < m; ++j) {
for (var groups = selection._groups, j = 0, m = groups.length; j < m; ++j) {
if (!Array.isArray(group = groups[j])) {

@@ -326,4 +326,4 @@ for (var n = group.length, array = groups[j] = new Array(n), group, i = 0; i < n; ++i) {

update = arrayify(this),
enter = (this._enter = this.enter())._nodes,
exit = (this._exit = this.exit())._nodes;
enter = (this._enter = this.enter())._groups,
exit = (this._exit = this.exit())._groups;

@@ -375,3 +375,3 @@ if (typeof value !== "function") value = constant(value);

if (enter) return this._enter = null, enter;
enter = new Selection(this._nodes.map(sparse), this._parents);
enter = new Selection(this._groups.map(sparse), this._parents);
enter._update = this;

@@ -384,3 +384,3 @@ return enter;

if (exit) return this._exit = null, exit;
return new Selection(this._nodes.map(sparse), this._parents);
return new Selection(this._groups.map(sparse), this._parents);
}

@@ -390,3 +390,3 @@

for (var groups = this._nodes, j = -1, m = groups.length; ++j < m;) {
for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) {
for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) {

@@ -436,3 +436,3 @@ if (node = group[i]) {

for (var groups = this._nodes, j = 0, m = groups.length; j < m; ++j) {
for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {

@@ -459,3 +459,3 @@ var node = group[i];

for (var groups = this._nodes, j = 0, m = groups.length; j < m; ++j) {
for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {

@@ -843,4 +843,4 @@ if (node = group[i]) callback.call(node, node.__data__, i, group);

function Selection(nodes, parents) {
this._nodes = nodes;
function Selection(groups, parents) {
this._groups = groups;
this._parents = parents;

@@ -952,3 +952,3 @@ }

var version = "0.6.5";
var version = "0.6.6";

@@ -955,0 +955,0 @@ exports.version = version;

@@ -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){return t.replace(zt,"\\$&")}function e(){}function r(n,e,r){return function(i){var o=t.event;t.event=i;try{n.call(this,this.__data__,e,r)}finally{t.event=o}}}function i(t){return function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t(n)}}function o(t,n){return function(){var e=this[t];e&&(this.removeEventListener(n,e,e._capture),delete this[t])}}function u(t){var e=new RegExp("^__on([^.]+)"+n(t)+"$");return function(){for(var t in this){var n=t.match(e);if(n){var r=this[t];this.removeEventListener(n[1],r,r._capture),delete this[t]}}}}function s(t,n,e,o,u){return function(s,a,c){var l=this[n];l&&this.removeEventListener(e,l,l._capture),l=r(o,a,c),t&&(l=i(l)),l._listener=o,this.addEventListener(e,this[n]=l,l._capture=u)}}function a(t,n,r){var i,a,c=t+"",l="__on"+c;return arguments.length<2?(i=this.node()[l])&&i._listener:((i=c.indexOf("."))>0&&(c=c.slice(0,i)),(a=Ht.hasOwnProperty(c))&&(c=Ht[c]),this.each(n?i?s(a,l,c,n,null==r?!1:r):e:i?o(l,c):u(c)))}function c(){for(var n,e=t.event;n=e.sourceEvent;)e=n;return e}function l(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}function h(t){return function(){return this.querySelector(t)}}function f(t){"function"!=typeof t&&(t=h(t));for(var n=this._nodes,e=this._update,r=n.length,i=new Array(r),o=0;r>o;++o)for(var u,s,a=n[o],c=a.length,l=i[o]=new Array(c),f=0;c>f;++f)(u=a[f])&&(s=t.call(u,u.__data__,f,a))&&("__data__"in u&&(s.__data__=u.__data__),e&&(e._nodes[o][f]=s),l[f]=s);return new Pt(i,this._parents)}function p(t){return function(){return this.querySelectorAll(t)}}function d(t){"function"!=typeof t&&(t=p(t));for(var n=this._nodes,e=n.length,r=[],i=[],o=0;e>o;++o)for(var u,s=n[o],a=s.length,c=0;a>c;++c)(u=s[c])&&(r.push(t.call(u,u.__data__,c,s)),i.push(u));return new Pt(r,i)}function _(t){"function"!=typeof t&&(t=jt(t));for(var n=this._nodes,e=n.length,r=new Array(e),i=0;e>i;++i)for(var o,u=n[i],s=u.length,a=r[i]=[],c=0;s>c;++c)(o=u[c])&&t.call(o,o.__data__,c,u)&&a.push(o);return new Pt(r,this._parents)}function m(t){for(var n=t._nodes,e=0,r=n.length;r>e;++e)if(!Array.isArray(i=n[e]))for(var i,o=i.length,u=n[e]=new Array(o),s=0;o>s;++s)u[s]=i[s];return n}function v(t){return function(){return t}}function g(t,n,e,r,i){var o,u=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>u;++u)(o=n[u])?o.__data__=i[u]:e[u]=new x(t,i[u]);for(;a>u;++u)e[u]=new x(t,i[u]);for(;s>u;++u)(o=n[u])&&(r[u]=n[u]);n.length=a}function y(t,n,e,r,i,o){var u,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,u=0;l>u;++u)(s=n[u])&&(f[u]=a=kt+o.call(s,s.__data__,u,n),h[a]?r[u]=s:h[a]=s);for(n.length=0,n.length=c,u=0;c>u;++u)a=kt+o.call(t,i[u],u,i),(s=h[a])?s!==!0&&(n[u]=s,s.__data__=i[u]):e[u]=new x(t,i[u]),h[a]=!0;for(u=0;l>u;++u)(s=h[f[u]])!==!0&&(r[u]=s)}function w(t,n){if(!t){var e=new Array(this.size()),r=-1;return this.each(function(t){e[++r]=t}),e}var i=n?y:g,o=this._parents,u=m(this),s=(this._enter=this.enter())._nodes,a=(this._exit=this.exit())._nodes;"function"!=typeof t&&(t=v(t));for(var c=u.length,l=0;c>l;++l){var h=u[l],f=o[l];i(f,h,s[l],a[l],t.call(f,f&&f.__data__,l,o),n);for(var p,d,_=h.length,w=0,x=0;_>w;++w)if(p=s[l][w]){for(w>=x&&(x=w+1);!(d=h[x])&&++x<_;);p._next=d||null}}return this}function x(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}function A(t){return new Array(t.length)}function S(){var t=this._enter;return t?(this._enter=null,t):(t=new Pt(this._nodes.map(A),this._parents),t._update=this,t)}function b(){var t=this._exit;return t?(this._exit=null,t):new Pt(this._nodes.map(A),this._parents)}function E(){for(var t=this._nodes,n=-1,e=t.length;++n<e;)for(var r,i=t[n],o=i.length-1,u=i[o];--o>=0;)(r=i[o])&&(u&&u!==r.nextSibling&&u.parentNode.insertBefore(r,u),u=r);return this}function C(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=N);for(var e=m(this),r=0,i=e.length;i>r;++r)e[r].sort(n);return this.order()}function N(t,n){return n>t?-1:t>n?1:t>=n?0:NaN}function M(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function T(){var t=new Array(this.size()),n=-1;return this.each(function(){t[++n]=this}),t}function L(){for(var t=this._nodes,n=0,e=t.length;e>n;++n)for(var r=t[n],i=0,o=r.length;o>i;++i){var u=r[i];if(u)return u}return null}function P(){var t=0;return this.each(function(){++t}),t}function q(){return!this.node()}function B(t){for(var n=this._nodes,e=0,r=n.length;r>e;++e)for(var i,o=n[e],u=0,s=o.length;s>u;++u)(i=o[u])&&t.call(i,i.__data__,u,o);return this}function D(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),Gt.hasOwnProperty(n)?{space:Gt[n],local:t}:t}function O(t){return function(){this.removeAttribute(t)}}function R(t){return function(){this.removeAttributeNS(t.space,t.local)}}function V(t,n){return function(){this.setAttribute(t,n)}}function X(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function z(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function H(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 I(t,n){var e=D(t);if(arguments.length<2){var r=this.node();return e.local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}return this.each((null==n?e.local?R:O:"function"==typeof n?e.local?H:z:e.local?X:V)(e,n))}function U(t){return function(){this.style.removeProperty(t)}}function Y(t,n,e){return function(){this.style.setProperty(t,n,e)}}function $(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function j(t,n,e){var r;return arguments.length>1?this.each((null==n?U:"function"==typeof n?$:Y)(t,n,null==e?"":e)):l(r=this.node()).getComputedStyle(r,null).getPropertyValue(t)}function k(t){return function(){delete this[t]}}function G(t,n){return function(){this[t]=n}}function K(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function W(t,n){return arguments.length>1?this.each((null==n?k:"function"==typeof n?K:G)(t,n)):this.node()[t]}function F(t){return t.trim().split(/^|\s+/)}function J(t){return t.classList||new Q(t)}function Q(t){this._node=t,this._names=F(t.getAttribute("class")||"")}function Z(t,n){for(var e=J(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function tt(t,n){for(var e=J(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function nt(t){return function(){Z(this,t)}}function et(t){return function(){tt(this,t)}}function rt(t,n){return function(){(n.apply(this,arguments)?Z:tt)(this,t)}}function it(t,n){var e=F(t+"");if(arguments.length<2){for(var r=J(this.node()),i=-1,o=e.length;++i<o;)if(!r.contains(e[i]))return!1;return!0}return this.each(("function"==typeof n?rt:n?nt:et)(e,n))}function ot(){this.textContent=""}function ut(t){return function(){this.textContent=t}}function st(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function at(t){return arguments.length?this.each(null==t?ot:("function"==typeof t?st:ut)(t)):this.node().textContent}function ct(){this.innerHTML=""}function lt(t){return function(){this.innerHTML=t}}function ht(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}function ft(t){return arguments.length?this.each(null==t?ct:("function"==typeof t?ht:lt)(t)):this.node().innerHTML}function pt(){this.parentNode.appendChild(this)}function dt(){return this.each(pt)}function _t(){this.parentNode.insertBefore(this,this.parentNode.firstChild)}function mt(){return this.each(_t)}function vt(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e&&e!==n.documentElement.namespaceURI?n.createElementNS(e,t):n.createElement(t)}}function gt(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function yt(t){var n=D(t);return(n.local?gt:vt)(n)}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:yt(t);return this.select(arguments.length<2?wt(e):xt(e,null==n?At:"function"==typeof n?n:h(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=l(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._nodes=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=l(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 o=e.node().getScreenCTM();Wt=!(o.f||o.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 u=t.getBoundingClientRect();return[n.clientX-u.left-t.clientLeft,n.clientY-u.top-t.clientTop]}function Ot(t,n){return null==n&&(n=c()),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=c().changedTouches);for(var r,i=0,o=n?n.length:0;o>i;++i)if((r=n[i]).identifier===e)return Dt(t,r);return null}function Xt(t,n){null==n&&(n=c().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=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,Ht={};if(t.event=null,"undefined"!=typeof document){var It=document.documentElement;"onmouseenter"in It||(Ht={mouseenter:"mouseover",mouseleave:"mouseout"})}var Ut=function(t){return function(){return this.matches(t)}};if("undefined"!=typeof document){var Yt=document.documentElement;if(!Yt.matches){var $t=Yt.webkitMatchesSelector||Yt.msMatchesSelector||Yt.mozMatchesSelector||Yt.oMatchesSelector;Ut=function(t){return function(){return $t.call(this,t)}}}}var jt=Ut,kt="$";x.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)}};var Gt={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/"};Q.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:f,selectAll:d,filter:_,data:w,enter:S,exit:b,order:E,sort:C,call:M,nodes:T,node:L,size:P,empty:q,each:B,attr:I,style:j,property:W,classed:it,text:at,html:ft,raise:dt,lower:mt,append:St,remove:Et,datum:Ct,on:a,dispatch:Lt};var Wt="undefined"!=typeof navigator&&/WebKit/.test(navigator.userAgent)?-1:0,Ft="0.6.5";t.version=Ft,t.mouse=Ot,t.namespace=D,t.namespaces=Gt,t.select=Bt,t.selectAll=Rt,t.selection=qt,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){return t.replace(zt,"\\$&")}function e(){}function r(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 i(t){return function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t(n)}}function u(t,n){return function(){var e=this[t];e&&(this.removeEventListener(n,e,e._capture),delete this[t])}}function o(t){var e=new RegExp("^__on([^.]+)"+n(t)+"$");return function(){for(var t in this){var n=t.match(e);if(n){var r=this[t];this.removeEventListener(n[1],r,r._capture),delete this[t]}}}}function s(t,n,e,u,o){return function(s,a,c){var l=this[n];l&&this.removeEventListener(e,l,l._capture),l=r(u,a,c),t&&(l=i(l)),l._listener=u,this.addEventListener(e,this[n]=l,l._capture=o)}}function a(t,n,r){var i,a,c=t+"",l="__on"+c;return arguments.length<2?(i=this.node()[l])&&i._listener:((i=c.indexOf("."))>0&&(c=c.slice(0,i)),(a=Ht.hasOwnProperty(c))&&(c=Ht[c]),this.each(n?i?s(a,l,c,n,null==r?!1:r):e:i?u(l,c):o(c)))}function c(){for(var n,e=t.event;n=e.sourceEvent;)e=n;return e}function l(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}function h(t){return function(){return this.querySelector(t)}}function f(t){"function"!=typeof t&&(t=h(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),f=0;c>f;++f)(o=a[f])&&(s=t.call(o,o.__data__,f,a))&&("__data__"in o&&(s.__data__=o.__data__),e&&(e._groups[u][f]=s),l[f]=s);return new Pt(i,this._parents)}function p(t){return function(){return this.querySelectorAll(t)}}function _(t){"function"!=typeof t&&(t=p(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 m(t){"function"!=typeof t&&(t=jt(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 d(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 g(t){return function(){return t}}function v(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 x(t,i[o]);for(;a>o;++o)e[o]=new x(t,i[o]);for(;s>o;++o)(u=n[o])&&(r[o]=n[o]);n.length=a}function y(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=kt+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=kt+u.call(t,i[o],o,i),(s=h[a])?s!==!0&&(n[o]=s,s.__data__=i[o]):e[o]=new x(t,i[o]),h[a]=!0;for(o=0;l>o;++o)(s=h[f[o]])!==!0&&(r[o]=s)}function w(t,n){if(!t){var e=new Array(this.size()),r=-1;return this.each(function(t){e[++r]=t}),e}var i=n?y:v,u=this._parents,o=d(this),s=(this._enter=this.enter())._groups,a=(this._exit=this.exit())._groups;"function"!=typeof t&&(t=g(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,w=0,x=0;m>w;++w)if(p=s[l][w]){for(w>=x&&(x=w+1);!(_=h[x])&&++x<m;);p._next=_||null}}return this}function x(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}function A(t){return new Array(t.length)}function S(){var t=this._enter;return t?(this._enter=null,t):(t=new Pt(this._groups.map(A),this._parents),t._update=this,t)}function b(){var t=this._exit;return t?(this._exit=null,t):new Pt(this._groups.map(A),this._parents)}function E(){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 C(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=N);for(var e=d(this),r=0,i=e.length;i>r;++r)e[r].sort(n);return this.order()}function N(t,n){return n>t?-1:t>n?1:t>=n?0:NaN}function M(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function T(){var t=new Array(this.size()),n=-1;return this.each(function(){t[++n]=this}),t}function L(){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 P(){var t=0;return this.each(function(){++t}),t}function q(){return!this.node()}function B(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 D(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),Gt.hasOwnProperty(n)?{space:Gt[n],local:t}:t}function O(t){return function(){this.removeAttribute(t)}}function R(t){return function(){this.removeAttributeNS(t.space,t.local)}}function V(t,n){return function(){this.setAttribute(t,n)}}function X(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function z(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function H(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 I(t,n){var e=D(t);if(arguments.length<2){var r=this.node();return e.local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}return this.each((null==n?e.local?R:O:"function"==typeof n?e.local?H:z:e.local?X:V)(e,n))}function U(t){return function(){this.style.removeProperty(t)}}function Y(t,n,e){return function(){this.style.setProperty(t,n,e)}}function $(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function j(t,n,e){var r;return arguments.length>1?this.each((null==n?U:"function"==typeof n?$:Y)(t,n,null==e?"":e)):l(r=this.node()).getComputedStyle(r,null).getPropertyValue(t)}function k(t){return function(){delete this[t]}}function G(t,n){return function(){this[t]=n}}function K(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function W(t,n){return arguments.length>1?this.each((null==n?k:"function"==typeof n?K:G)(t,n)):this.node()[t]}function F(t){return t.trim().split(/^|\s+/)}function J(t){return t.classList||new Q(t)}function Q(t){this._node=t,this._names=F(t.getAttribute("class")||"")}function Z(t,n){for(var e=J(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function tt(t,n){for(var e=J(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function nt(t){return function(){Z(this,t)}}function et(t){return function(){tt(this,t)}}function rt(t,n){return function(){(n.apply(this,arguments)?Z:tt)(this,t)}}function it(t,n){var e=F(t+"");if(arguments.length<2){for(var r=J(this.node()),i=-1,u=e.length;++i<u;)if(!r.contains(e[i]))return!1;return!0}return this.each(("function"==typeof n?rt:n?nt:et)(e,n))}function ut(){this.textContent=""}function ot(t){return function(){this.textContent=t}}function st(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function at(t){return arguments.length?this.each(null==t?ut:("function"==typeof t?st:ot)(t)):this.node().textContent}function ct(){this.innerHTML=""}function lt(t){return function(){this.innerHTML=t}}function ht(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}function ft(t){return arguments.length?this.each(null==t?ct:("function"==typeof t?ht:lt)(t)):this.node().innerHTML}function pt(){this.parentNode.appendChild(this)}function _t(){return this.each(pt)}function mt(){this.parentNode.insertBefore(this,this.parentNode.firstChild)}function dt(){return this.each(mt)}function gt(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e&&e!==n.documentElement.namespaceURI?n.createElementNS(e,t):n.createElement(t)}}function vt(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function yt(t){var n=D(t);return(n.local?vt:gt)(n)}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:yt(t);return this.select(arguments.length<2?wt(e):xt(e,null==n?At:"function"==typeof n?n:h(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=l(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=l(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=c()),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=c().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=c().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=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,Ht={};if(t.event=null,"undefined"!=typeof document){var It=document.documentElement;"onmouseenter"in It||(Ht={mouseenter:"mouseover",mouseleave:"mouseout"})}var Ut=function(t){return function(){return this.matches(t)}};if("undefined"!=typeof document){var Yt=document.documentElement;if(!Yt.matches){var $t=Yt.webkitMatchesSelector||Yt.msMatchesSelector||Yt.mozMatchesSelector||Yt.oMatchesSelector;Ut=function(t){return function(){return $t.call(this,t)}}}}var jt=Ut,kt="$";x.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)}};var Gt={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/"};Q.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:f,selectAll:_,filter:m,data:w,enter:S,exit:b,order:E,sort:C,call:M,nodes:T,node:L,size:P,empty:q,each:B,attr:I,style:j,property:W,classed:it,text:at,html:ft,raise:_t,lower:dt,append:St,remove:Et,datum:Ct,on:a,dispatch:Lt};var Wt="undefined"!=typeof navigator&&/WebKit/.test(navigator.userAgent)?-1:0,Ft="0.6.6";t.version=Ft,t.mouse=Ot,t.namespace=D,t.namespaces=Gt,t.select=Bt,t.selectAll=Rt,t.selection=qt,t.touch=Vt,t.touches=Xt});
{
"name": "d3-selection",
"version": "0.6.5",
"version": "0.6.6",
"description": "Data-driven DOM manipulation: select elements and join them to data.",

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

export default function(selection) {
for (var groups = selection._nodes, j = 0, m = groups.length; j < m; ++j) {
for (var groups = selection._groups, j = 0, m = groups.length; j < m; ++j) {
if (!Array.isArray(group = groups[j])) {

@@ -5,0 +5,0 @@ for (var n = group.length, array = groups[j] = new Array(n), group, i = 0; i < n; ++i) {

@@ -117,4 +117,4 @@ import arrayify from "./arrayify";

update = arrayify(this),
enter = (this._enter = this.enter())._nodes,
exit = (this._exit = this.exit())._nodes;
enter = (this._enter = this.enter())._groups,
exit = (this._exit = this.exit())._groups;

@@ -121,0 +121,0 @@ if (typeof value !== "function") value = constant(value);

export default function(callback) {
for (var groups = this._nodes, j = 0, m = groups.length; j < m; ++j) {
for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {

@@ -5,0 +5,0 @@ if (node = group[i]) callback.call(node, node.__data__, i, group);

@@ -7,5 +7,5 @@ import sparse from "./sparse";

if (enter) return this._enter = null, enter;
enter = new Selection(this._nodes.map(sparse), this._parents);
enter = new Selection(this._groups.map(sparse), this._parents);
enter._update = this;
return enter;
}

@@ -7,3 +7,3 @@ import sparse from "./sparse";

if (exit) return this._exit = null, exit;
return new Selection(this._nodes.map(sparse), this._parents);
return new Selection(this._groups.map(sparse), this._parents);
}

@@ -7,3 +7,3 @@ import {Selection} from "./index";

for (var groups = this._nodes, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {

@@ -10,0 +10,0 @@ if ((node = group[i]) && match.call(node, node.__data__, i, group)) {

@@ -31,4 +31,4 @@ import selection_select from "./select";

export function Selection(nodes, parents) {
this._nodes = nodes;
export function Selection(groups, parents) {
this._groups = groups;
this._parents = parents;

@@ -35,0 +35,0 @@ }

export default function() {
for (var groups = this._nodes, j = 0, m = groups.length; j < m; ++j) {
for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {

@@ -5,0 +5,0 @@ var node = group[i];

export default function() {
for (var groups = this._nodes, j = -1, m = groups.length; ++j < m;) {
for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) {
for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) {

@@ -5,0 +5,0 @@ if (node = group[i]) {

@@ -7,7 +7,7 @@ import {Selection} from "./index";

for (var groups = this._nodes, update = this._update, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
for (var groups = this._groups, update = this._update, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {
if ("__data__" in node) subnode.__data__ = node.__data__;
if (update) update._nodes[j][i] = subnode;
if (update) update._groups[j][i] = subnode;
subgroup[i] = subnode;

@@ -14,0 +14,0 @@ }

@@ -7,3 +7,3 @@ import {Selection} from "./index";

for (var groups = this._nodes, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {

@@ -10,0 +10,0 @@ if (node = group[i]) {

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