From 61dde10727bc4ad550c8e235bfd5ac95ce98c0b3 Mon Sep 17 00:00:00 2001 From: Gordon Woodhull Date: Thu, 20 Aug 2020 11:49:49 -0400 Subject: [PATCH] 1.5.3 Release Prep --- crossfilter.js | 11 ++++++----- crossfilter.min.js | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/crossfilter.js b/crossfilter.js index 7670402..cdc3088 100644 --- a/crossfilter.js +++ b/crossfilter.js @@ -1,4 +1,4 @@ -// https://crossfilter.github.io/crossfilter/ v1.5.2 Copyright 2020 Mike Bostock +// https://crossfilter.github.io/crossfilter/ v1.5.3 Copyright 2020 Mike Bostock (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : @@ -982,7 +982,7 @@ function filterFunction(f) { filterValue = f; filterValuePresent = true; - + refilterFunction = f; refilter = xfilterFilter.filterAll; @@ -1087,11 +1087,11 @@ filterListeners.forEach(function(l) { l(one, offset, added, removed); }); triggerOnChange('filtered'); } - + function currentFilter() { return filterValue; } - + function hasCurrentFilter() { return filterValuePresent; } @@ -1425,6 +1425,7 @@ ++j; } } + groupIndex = groupIndex.slice(0, j); } // Reassemble groups including only those groups that were referred @@ -1902,7 +1903,7 @@ : 0x100000000; } - var version = "1.5.2"; + var version = "1.5.3"; // Note(cg): exporting current version for umd build. crossfilter.version = version; diff --git a/crossfilter.min.js b/crossfilter.min.js index 57e9540..f3e2c12 100644 --- a/crossfilter.min.js +++ b/crossfilter.min.js @@ -1,2 +1,2 @@ -// https://crossfilter.github.io/crossfilter/ v1.5.2 Copyright 2020 Mike Bostock -!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(r=r||self).crossfilter=e()}(this,(function(){"use strict";let r=o,e=o,n=o,t=f,u=i;function o(r){for(var e=new Array(r),n=-1;++n32)throw new Error("invalid array width!");return r}function a(e){this.length=e,this.subarrays=1,this.width=8,this.masks={0:0},this[0]=r(e)}"undefined"!=typeof Uint8Array&&(r=function(r){return new Uint8Array(r)},e=function(r){return new Uint16Array(r)},n=function(r){return new Uint32Array(r)},t=function(r,e){if(r.length>=e)return r;var n=new r.constructor(e);return n.set(r),n},u=function(r,t){var u;switch(t){case 16:u=e(r.length);break;case 32:u=n(r.length);break;default:throw new Error("invalid array width!")}return u.set(r),u}),a.prototype.lengthen=function(r){var e,n;for(e=0,n=this.subarrays;e>>0,!((n=this.width-32*o)>=32)||t)return n<32&&t&1<=r;t--)this[e][t]=0;this.length=r},a.prototype.zero=function(r){var e,n;for(e=0,n=this.subarrays;e(function(n){var t=n.length;return[r.left(n,e,0,t),r.right(n,e,0,t)]}),filterRange:(r,e)=>{var n=e[0],t=e[1];return function(e){var u=e.length;return[r.left(e,n,0,u),r.left(e,t,0,u)]}},filterAll:r=>[0,r.length]},c=r=>r,h=()=>null,v=()=>0;function p(r){function e(r,e,t){for(var u=t-e,o=1+(u>>>1);--o>0;)n(r,o,u,e);return r}function n(e,n,t,u){for(var o,f=e[--u+n],i=r(f);(o=n<<1)<=t&&(or(e[u+o+1])&&o++,!(i<=r(e[u+o])));)e[u+n]=e[u+o],n=o;e[u+n]=f}return e.sort=function(r,e,t){for(var u,o=t-e;--o>0;)u=r[e],r[e]=r[e+o],r[e+o]=u,n(r,1,o,e);return r},e}const d=p(c);function g(r){var e=d.by(r);return function(n,t,u,o){var f,i,a,l=new Array(o=Math.min(u-t,o));for(i=0;if&&(l[0]=a,f=r(e(l,0,o)[0]))}while(++t>>1;n>>1;r(e[o]){for(var t=0,u=e.length,o=n?JSON.parse(JSON.stringify(r)):new Array(u);tr+1,reduceDecrement:r=>r-1,reduceAdd:r=>(function(e,n){return e+ +r(n)}),reduceSubtract:r=>(function(e,n){return e-r(n)})};const w=(r,e)=>{const n=r[e];return"function"==typeof n?n.call(r):n},A=/\[([\w\d]+)\]/g;var z=(r,e)=>(function(r,e,n,t,u){for(u in t=(n=n.split(".")).splice(-1,1),n)e=e[n[u]]=e[n[u]]||{};return r(e,t)})(w,r,e.replace(A,".$1")),k=-1;function O(){var r,e={add:a,remove:function(e){for(var o=new Array(t),i=[],a="function"==typeof e,l=0,s=0;l0&&(a=t);for(;--f>=K&&e>0;)r.zero(u=F[f])&&(a>0?--a:(o.push(n[u]),--e));if(i)for(f=0;f<$.length&&e>0;f++)r.zero(u=$[f])&&(a>0?--a:(o.push(n[u]),--e));return o},bottom:function(e,t){var u,o,f=[],a=0;t&&t>0&&(a=t);if(i)for(u=0;u<$.length&&e>0;u++)r.zero(o=$[u])&&(a>0?--a:(f.push(n[o]),--e));u=K;for(;u0;)r.zero(o=F[u])&&(a>0?--a:(f.push(n[o]),--e)),u++;return f},group:ur,groupAll:function(){var r=ur(h),e=r.all;return delete r.all,delete r.top,delete r.order,delete r.orderNatural,delete r.size,r.value=function(){return e()[0].value},r},dispose:or,remove:or,accessor:e,id:function(){return A}},$=[],q=function(r){return S(r).sort((function(r,e){var n=N[r],t=N[e];return nt?1:r-e}))},B=s.filterAll,G=[],H=[],K=0,P=0,Q=0;o.unshift(V),o.push(X),f.push(Y);var T=r.add();function V(n,u,o){var f,a;if(i){Q=0,G=0,J=[];for(var s=0;sK)for(o=K,f=Math.min(n,P);oP)for(o=Math.max(n,P),f=t;o1?l.arrayLengthen(s,t):M(t,R),H&&(g=(d=k[0]).key);Q=y);)++Q;for(;Q=v));)y=e(o[Q]);V()}for(;PP)if(i)for(P=0;P1||i?(D=$,I=B):(!U&&W&&(U=1,a=[{key:null,value:G()}]),1===U?(D=q,I=K):(D=h,I=h),s=null),u[p]=D}function j(r){if(U>1||i){var e,n,o,f=U,l=a,c=M(f,f);if(i){for(e=0,o=0;e1||i)if(i)for(e=0;e1||i?(I=B,D=$):1===U?(I=K,D=q):I=D=h}else if(1===U){if(W)return;for(var v=0;v=0&&u.splice(r,1),(r=G.indexOf(J))>=0&&G.splice(r,1),(r=f.indexOf(j))>=0&&f.splice(r,1),(r=H.indexOf(o))>=0&&H.splice(r,1),o}return arguments.length<1&&(e=c),u.push(D),G.push(J),f.push(j),J(O,F,0,t),T().orderNatural()}function or(){H.forEach((function(r){r.dispose()}));var e=o.indexOf(V);return e>=0&&o.splice(e,1),(e=o.indexOf(X))>=0&&o.splice(e,1),(e=f.indexOf(Y))>=0&&f.splice(e,1),r.masks[w]&=x,er()}return w=T.offset,p=T.one,x=~p,A=w<<7|Math.log(p)/Math.log(2),V(n,0,t),X(n,0,t),j},groupAll:function(){var e,f,i,a,l={reduce:p,reduceCount:d,reduceSum:function(r){return p(E.reduceAdd(r),E.reduceSubtract(r),v)},value:function(){s&&(function(){var u;for(e=a(),u=0;u=0&&u.splice(r,1),(r=o.indexOf(c))>=0&&o.splice(r,1),l}return(u.push(h),o.push(c),c(n,0),d())},size:function(){return t},all:function(){return n},allFiltered:function(e){var u=[],o=0,f=p(e||[]);for(o=0;o>7]&=~(1<<(63&o));return f}function g(r){for(var e=0;e32)throw new Error("invalid array width!");return r}function a(e){this.length=e,this.subarrays=1,this.width=8,this.masks={0:0},this[0]=r(e)}"undefined"!=typeof Uint8Array&&(r=function(r){return new Uint8Array(r)},e=function(r){return new Uint16Array(r)},n=function(r){return new Uint32Array(r)},t=function(r,e){if(r.length>=e)return r;var n=new r.constructor(e);return n.set(r),n},u=function(r,t){var u;switch(t){case 16:u=e(r.length);break;case 32:u=n(r.length);break;default:throw new Error("invalid array width!")}return u.set(r),u}),a.prototype.lengthen=function(r){var e,n;for(e=0,n=this.subarrays;e>>0,!((n=this.width-32*o)>=32)||t)return n<32&&t&1<=r;t--)this[e][t]=0;this.length=r},a.prototype.zero=function(r){var e,n;for(e=0,n=this.subarrays;e(function(n){var t=n.length;return[r.left(n,e,0,t),r.right(n,e,0,t)]}),filterRange:(r,e)=>{var n=e[0],t=e[1];return function(e){var u=e.length;return[r.left(e,n,0,u),r.left(e,t,0,u)]}},filterAll:r=>[0,r.length]},c=r=>r,h=()=>null,v=()=>0;function p(r){function e(r,e,t){for(var u=t-e,o=1+(u>>>1);--o>0;)n(r,o,u,e);return r}function n(e,n,t,u){for(var o,f=e[--u+n],i=r(f);(o=n<<1)<=t&&(or(e[u+o+1])&&o++,!(i<=r(e[u+o])));)e[u+n]=e[u+o],n=o;e[u+n]=f}return e.sort=function(r,e,t){for(var u,o=t-e;--o>0;)u=r[e],r[e]=r[e+o],r[e+o]=u,n(r,1,o,e);return r},e}const d=p(c);function g(r){var e=d.by(r);return function(n,t,u,o){var f,i,a,l=new Array(o=Math.min(u-t,o));for(i=0;if&&(l[0]=a,f=r(e(l,0,o)[0]))}while(++t>>1;n>>1;r(e[o]){for(var t=0,u=e.length,o=n?JSON.parse(JSON.stringify(r)):new Array(u);tr+1,reduceDecrement:r=>r-1,reduceAdd:r=>(function(e,n){return e+ +r(n)}),reduceSubtract:r=>(function(e,n){return e-r(n)})};const w=(r,e)=>{const n=r[e];return"function"==typeof n?n.call(r):n},A=/\[([\w\d]+)\]/g;var z=(r,e)=>(function(r,e,n,t,u){for(u in t=(n=n.split(".")).splice(-1,1),n)e=e[n[u]]=e[n[u]]||{};return r(e,t)})(w,r,e.replace(A,".$1")),k=-1;function O(){var r,e={add:a,remove:function(e){for(var o=new Array(t),i=[],a="function"==typeof e,l=0,s=0;l0&&(a=t);for(;--f>=K&&e>0;)r.zero(u=F[f])&&(a>0?--a:(o.push(n[u]),--e));if(i)for(f=0;f<$.length&&e>0;f++)r.zero(u=$[f])&&(a>0?--a:(o.push(n[u]),--e));return o},bottom:function(e,t){var u,o,f=[],a=0;t&&t>0&&(a=t);if(i)for(u=0;u<$.length&&e>0;u++)r.zero(o=$[u])&&(a>0?--a:(f.push(n[o]),--e));u=K;for(;u0;)r.zero(o=F[u])&&(a>0?--a:(f.push(n[o]),--e)),u++;return f},group:ur,groupAll:function(){var r=ur(h),e=r.all;return delete r.all,delete r.top,delete r.order,delete r.orderNatural,delete r.size,r.value=function(){return e()[0].value},r},dispose:or,remove:or,accessor:e,id:function(){return A}},$=[],q=function(r){return S(r).sort((function(r,e){var n=N[r],t=N[e];return nt?1:r-e}))},B=s.filterAll,G=[],H=[],K=0,P=0,Q=0;o.unshift(V),o.push(X),f.push(Y);var T=r.add();function V(n,u,o){var f,a;if(i){Q=0,G=0,J=[];for(var s=0;sK)for(o=K,f=Math.min(n,P);oP)for(o=Math.max(n,P),f=t;o1?l.arrayLengthen(s,t):M(t,R),H&&(g=(d=k[0]).key);Q=y);)++Q;for(;Q=v));)y=e(o[Q]);V()}for(;PP)if(i)for(P=0;P1||i?(D=$,I=B):(!U&&W&&(U=1,a=[{key:null,value:G()}]),1===U?(D=q,I=K):(D=h,I=h),s=null),u[p]=D}function j(r){if(U>1||i){var e,n,o,f=U,l=a,c=M(f,f);if(i){for(e=0,o=0;e1||i)if(i)for(e=0;e1||i?(I=B,D=$):1===U?(I=K,D=q):I=D=h}else if(1===U){if(W)return;for(var v=0;v=0&&u.splice(r,1),(r=G.indexOf(J))>=0&&G.splice(r,1),(r=f.indexOf(j))>=0&&f.splice(r,1),(r=H.indexOf(o))>=0&&H.splice(r,1),o}return arguments.length<1&&(e=c),u.push(D),G.push(J),f.push(j),J(O,F,0,t),T().orderNatural()}function or(){H.forEach((function(r){r.dispose()}));var e=o.indexOf(V);return e>=0&&o.splice(e,1),(e=o.indexOf(X))>=0&&o.splice(e,1),(e=f.indexOf(Y))>=0&&f.splice(e,1),r.masks[w]&=x,er()}return w=T.offset,p=T.one,x=~p,A=w<<7|Math.log(p)/Math.log(2),V(n,0,t),X(n,0,t),j},groupAll:function(){var e,f,i,a,l={reduce:p,reduceCount:d,reduceSum:function(r){return p(E.reduceAdd(r),E.reduceSubtract(r),v)},value:function(){s&&(function(){var u;for(e=a(),u=0;u=0&&u.splice(r,1),(r=o.indexOf(c))>=0&&o.splice(r,1),l}return(u.push(h),o.push(c),c(n,0),d())},size:function(){return t},all:function(){return n},allFiltered:function(e){var u=[],o=0,f=p(e||[]);for(o=0;o>7]&=~(1<<(63&o));return f}function g(r){for(var e=0;e