From 98bd21c63d1e3657f373b5debcf6ae8d725a239a Mon Sep 17 00:00:00 2001 From: Susie Lu Date: Fri, 5 Jan 2018 14:27:53 -0800 Subject: [PATCH] upgrade marked out of security vulnerability --- docs/docs.js | 52 +++++++++++++---- docs/docs.min.js | 4 +- indexRollup.js | 122 ++++++++++++++++++++-------------------- indexRollup.js.map | 2 +- indexRollupNext.js | 123 +++++++++++++++++++++-------------------- indexRollupNext.js.map | 2 +- package.json | 16 ++---- 7 files changed, 176 insertions(+), 145 deletions(-) diff --git a/docs/docs.js b/docs/docs.js index 56d6085..1e76d4c 100644 --- a/docs/docs.js +++ b/docs/docs.js @@ -340,10 +340,6 @@ block.list = replace(block.list) ('def', '\\n+(?=' + block.def.source + ')') (); -block.blockquote = replace(block.blockquote) - ('def', block.def) - (); - block._tag = '(?!(?:' + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code' + '|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo' @@ -758,7 +754,7 @@ var inline = { nolink: /^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/, strong: /^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/, em: /^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/, - code: /^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/, + code: /^(`+)([\s\S]*?[^`])\1(?!`)/, br: /^ {2,}\n(?!\s*$)/, del: noop, text: /^[\s\S]+?(?=[\\/g,">").replace(/"/g,""").replace(/'/g,"'")}function h(a){return a.replace(/&([#\w]+);/g,function(a,b){return b=b.toLowerCase(),"colon"===b?":":"#"===b.charAt(0)?"x"===b.charAt(1)?String.fromCharCode(parseInt(b.substring(2),16)):String.fromCharCode(+b.substring(1)):""})}function i(a,b){return a=a.source,b=b||"",function c(d,e){return d?(e=e.source||e,e=e.replace(/(^|[^\[])\^/g,"$1"),a=a.replace(d,e),c):new RegExp(a,b)}}function j(){}function k(a){for(var b,c,d=1;dAn error occured:

"+g(m.message+"",!0)+"
";throw m}}var m={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:j,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:j,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:j,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};m.bullet=/(?:[*+-]|\d+\.)/,m.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,m.item=i(m.item,"gm")(/bull/g,m.bullet)(),m.list=i(m.list)(/bull/g,m.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+m.def.source+")")(),m.blockquote=i(m.blockquote)("def",m.def)(),m._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b",m.html=i(m.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,m._tag)(),m.paragraph=i(m.paragraph)("hr",m.hr)("heading",m.heading)("lheading",m.lheading)("blockquote",m.blockquote)("tag","<"+m._tag)("def",m.def)(),m.normal=k({},m),m.gfm=k({},m.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),m.gfm.paragraph=i(m.paragraph)("(?!","(?!"+m.gfm.fences.source.replace("\\1","\\2")+"|"+m.list.source.replace("\\1","\\3")+"|")(),m.tables=k({},m.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),a.rules=m,a.lex=function(b,c){var d=new a(c);return d.lex(b)},a.prototype.lex=function(a){return a=a.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(a,!0)},a.prototype.token=function(a,b,c){for(var d,e,f,g,h,i,j,k,l,a=a.replace(/^ +$/gm,"");a;)if((f=this.rules.newline.exec(a))&&(a=a.substring(f[0].length),f[0].length>1&&this.tokens.push({type:"space"})),f=this.rules.code.exec(a))a=a.substring(f[0].length),f=f[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?f:f.replace(/\n+$/,"")});else if(f=this.rules.fences.exec(a))a=a.substring(f[0].length),this.tokens.push({type:"code",lang:f[2],text:f[3]||""});else if(f=this.rules.heading.exec(a))a=a.substring(f[0].length),this.tokens.push({type:"heading",depth:f[1].length,text:f[2]});else if(b&&(f=this.rules.nptable.exec(a))){for(a=a.substring(f[0].length),i={type:"table",header:f[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:f[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:f[3].replace(/\n$/,"").split("\n")},k=0;k ?/gm,""),this.token(f,b,!0),this.tokens.push({type:"blockquote_end"});else if(f=this.rules.list.exec(a)){for(a=a.substring(f[0].length),g=f[2],this.tokens.push({type:"list_start",ordered:g.length>1}),f=f[0].match(this.rules.item),d=!1,l=f.length,k=0;k1&&h.length>1||(a=f.slice(k+1).join("\n")+a,k=l-1)),e=d||/\n\n(?!\s*$)/.test(i),k!==l-1&&(d="\n"===i.charAt(i.length-1),e||(e=d)),this.tokens.push({type:e?"loose_item_start":"list_item_start"}),this.token(i,!1,c),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(f=this.rules.html.exec(a))a=a.substring(f[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===f[1]||"script"===f[1]||"style"===f[1]),text:f[0]});else if(!c&&b&&(f=this.rules.def.exec(a)))a=a.substring(f[0].length),this.tokens.links[f[1].toLowerCase()]={href:f[2],title:f[3]};else if(b&&(f=this.rules.table.exec(a))){for(a=a.substring(f[0].length),i={type:"table",header:f[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:f[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:f[3].replace(/(?: *\| *)?\n$/,"").split("\n")},k=0;k])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:j,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:j,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/,n.link=i(n.link)("inside",n._inside)("href",n._href)(),n.reflink=i(n.reflink)("inside",n._inside)(),n.normal=k({},n),n.pedantic=k({},n.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),n.gfm=k({},n.normal,{escape:i(n.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:i(n.text)("]|","~]|")("|","|https?://|")()}),n.breaks=k({},n.gfm,{br:i(n.br)("{2,}","*")(),text:i(n.gfm.text)("{2,}","*")()}),d.rules=n,d.output=function(a,b,c){var e=new d(b,c);return e.output(a)},d.prototype.output=function(a){for(var b,c,d,e,f="";a;)if(e=this.rules.escape.exec(a))a=a.substring(e[0].length),f+=e[1];else if(e=this.rules.autolink.exec(a))a=a.substring(e[0].length),"@"===e[2]?(c=":"===e[1].charAt(6)?this.mangle(e[1].substring(7)):this.mangle(e[1]),d=this.mangle("mailto:")+c):(c=g(e[1]),d=c),f+=this.renderer.link(d,null,c);else if(this.inLink||!(e=this.rules.url.exec(a))){if(e=this.rules.tag.exec(a))!this.inLink&&/^/i.test(e[0])&&(this.inLink=!1),a=a.substring(e[0].length),f+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):g(e[0]):e[0];else if(e=this.rules.link.exec(a))a=a.substring(e[0].length),this.inLink=!0,f+=this.outputLink(e,{href:e[2],title:e[3]}),this.inLink=!1;else if((e=this.rules.reflink.exec(a))||(e=this.rules.nolink.exec(a))){if(a=a.substring(e[0].length),b=(e[2]||e[1]).replace(/\s+/g," "),b=this.links[b.toLowerCase()],!b||!b.href){f+=e[0].charAt(0),a=e[0].substring(1)+a; -continue}this.inLink=!0,f+=this.outputLink(e,b),this.inLink=!1}else if(e=this.rules.strong.exec(a))a=a.substring(e[0].length),f+=this.renderer.strong(this.output(e[2]||e[1]));else if(e=this.rules.em.exec(a))a=a.substring(e[0].length),f+=this.renderer.em(this.output(e[2]||e[1]));else if(e=this.rules.code.exec(a))a=a.substring(e[0].length),f+=this.renderer.codespan(g(e[2],!0));else if(e=this.rules.br.exec(a))a=a.substring(e[0].length),f+=this.renderer.br();else if(e=this.rules.del.exec(a))a=a.substring(e[0].length),f+=this.renderer.del(this.output(e[1]));else if(e=this.rules.text.exec(a))a=a.substring(e[0].length),f+=this.renderer.text(g(this.smartypants(e[0])));else if(a)throw new Error("Infinite loop on byte: "+a.charCodeAt(0))}else a=a.substring(e[0].length),c=g(e[1]),d=c,f+=this.renderer.link(d,null,c);return f},d.prototype.outputLink=function(a,b){var c=g(b.href),d=b.title?g(b.title):null;return"!"!==a[0].charAt(0)?this.renderer.link(c,d,this.output(a[1])):this.renderer.image(c,d,g(a[1]))},d.prototype.smartypants=function(a){return this.options.smartypants?a.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014\/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014\/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):a},d.prototype.mangle=function(a){if(!this.options.mangle)return a;for(var b,c="",d=a.length,e=0;e.5&&(b="x"+b.toString(16)),c+="&#"+b+";";return c},e.prototype.code=function(a,b,c){if(this.options.highlight){var d=this.options.highlight(a,b);null!=d&&d!==a&&(c=!0,a=d)}return b?'
'+(c?a:g(a,!0))+"\n
\n":"
"+(c?a:g(a,!0))+"\n
"},e.prototype.blockquote=function(a){return"
\n"+a+"
\n"},e.prototype.html=function(a){return a},e.prototype.heading=function(a,b,c){return"'+a+"\n"},e.prototype.hr=function(){return this.options.xhtml?"
\n":"
\n"},e.prototype.list=function(a,b){var c=b?"ol":"ul";return"<"+c+">\n"+a+"\n"},e.prototype.listitem=function(a){return"
  • "+a+"
  • \n"},e.prototype.paragraph=function(a){return"

    "+a+"

    \n"},e.prototype.table=function(a,b){return"\n\n"+a+"\n\n"+b+"\n
    \n"},e.prototype.tablerow=function(a){return"\n"+a+"\n"},e.prototype.tablecell=function(a,b){var c=b.header?"th":"td",d=b.align?"<"+c+' style="text-align:'+b.align+'">':"<"+c+">";return d+a+"\n"},e.prototype.strong=function(a){return""+a+""},e.prototype.em=function(a){return""+a+""},e.prototype.codespan=function(a){return""+a+""},e.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},e.prototype.del=function(a){return""+a+""},e.prototype.link=function(a,b,c){if(this.options.sanitize){try{var d=decodeURIComponent(h(a)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(0===d.indexOf("javascript:")||0===d.indexOf("vbscript:"))return""}var f='
    "},e.prototype.image=function(a,b,c){var d=''+c+'":">"},e.prototype.text=function(a){return a},f.parse=function(a,b,c){var d=new f(b,c);return d.parse(a)},f.prototype.parse=function(a){this.inline=new d(a.links,this.options,this.renderer),this.tokens=a.reverse();for(var b="";this.next();)b+=this.tok();return b},f.prototype.next=function(){return this.token=this.tokens.pop()},f.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},f.prototype.parseText=function(){for(var a=this.token.text;"text"===this.peek().type;)a+="\n"+this.next().text;return this.inline.output(a)},f.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var a,b,c,d,e,f="",g="";for(c="",a=0;a/g,">").replace(/"/g,""").replace(/'/g,"'")}function h(a){return a.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,function(a,b){return b=b.toLowerCase(),"colon"===b?":":"#"===b.charAt(0)?"x"===b.charAt(1)?String.fromCharCode(parseInt(b.substring(2),16)):String.fromCharCode(+b.substring(1)):""})}function i(a,b){return a=a.source,b=b||"",function c(d,e){return d?(e=e.source||e,e=e.replace(/(^|[^\[])\^/g,"$1"),a=a.replace(d,e),c):new RegExp(a,b)}}function j(a,b){return baseUrls[" "+a]||(/^[^:]+:\/*[^\/]*$/.test(a)?baseUrls[" "+a]=a+"/":baseUrls[" "+a]=a.replace(/[^\/]*$/,"")),a=baseUrls[" "+a],"//"===b.slice(0,2)?a.replace(/:[^]*/,":")+b:"/"===b.charAt(0)?a.replace(/(:\/*[^\/]*)[^]*/,"$1")+b:a+b}function k(){}function l(a){for(var b,c,d=1;dAn error occured:

    "+g(k.message+"",!0)+"
    ";throw k}}var n={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:k,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:k,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:k,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};n.bullet=/(?:[*+-]|\d+\.)/,n.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,n.item=i(n.item,"gm")(/bull/g,n.bullet)(),n.list=i(n.list)(/bull/g,n.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+n.def.source+")")(),n._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b",n.html=i(n.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,n._tag)(),n.paragraph=i(n.paragraph)("hr",n.hr)("heading",n.heading)("lheading",n.lheading)("blockquote",n.blockquote)("tag","<"+n._tag)("def",n.def)(),n.normal=l({},n),n.gfm=l({},n.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),n.gfm.paragraph=i(n.paragraph)("(?!","(?!"+n.gfm.fences.source.replace("\\1","\\2")+"|"+n.list.source.replace("\\1","\\3")+"|")(),n.tables=l({},n.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),a.rules=n,a.lex=function(b,c){var d=new a(c);return d.lex(b)},a.prototype.lex=function(a){return a=a.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(a,!0)},a.prototype.token=function(a,b,c){for(var d,e,f,g,h,i,j,k,l,a=a.replace(/^ +$/gm,"");a;)if((f=this.rules.newline.exec(a))&&(a=a.substring(f[0].length),f[0].length>1&&this.tokens.push({type:"space"})),f=this.rules.code.exec(a))a=a.substring(f[0].length),f=f[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?f:f.replace(/\n+$/,"")});else if(f=this.rules.fences.exec(a))a=a.substring(f[0].length),this.tokens.push({type:"code",lang:f[2],text:f[3]||""});else if(f=this.rules.heading.exec(a))a=a.substring(f[0].length),this.tokens.push({type:"heading",depth:f[1].length,text:f[2]});else if(b&&(f=this.rules.nptable.exec(a))){for(a=a.substring(f[0].length),i={type:"table",header:f[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:f[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:f[3].replace(/\n$/,"").split("\n")},k=0;k ?/gm,""),this.token(f,b,!0),this.tokens.push({type:"blockquote_end"});else if(f=this.rules.list.exec(a)){for(a=a.substring(f[0].length),g=f[2],this.tokens.push({type:"list_start",ordered:g.length>1}),f=f[0].match(this.rules.item),d=!1,l=f.length,k=0;k1&&h.length>1||(a=f.slice(k+1).join("\n")+a,k=l-1)),e=d||/\n\n(?!\s*$)/.test(i),k!==l-1&&(d="\n"===i.charAt(i.length-1),e||(e=d)),this.tokens.push({type:e?"loose_item_start":"list_item_start"}),this.token(i,!1,c),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(f=this.rules.html.exec(a))a=a.substring(f[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===f[1]||"script"===f[1]||"style"===f[1]),text:f[0]});else if(!c&&b&&(f=this.rules.def.exec(a)))a=a.substring(f[0].length),this.tokens.links[f[1].toLowerCase()]={href:f[2],title:f[3]};else if(b&&(f=this.rules.table.exec(a))){for(a=a.substring(f[0].length),i={type:"table",header:f[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:f[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:f[3].replace(/(?: *\| *)?\n$/,"").split("\n")},k=0;k])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:k,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)([\s\S]*?[^`])\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:k,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/,o.link=i(o.link)("inside",o._inside)("href",o._href)(),o.reflink=i(o.reflink)("inside",o._inside)(),o.normal=l({},o),o.pedantic=l({},o.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),o.gfm=l({},o.normal,{escape:i(o.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:i(o.text)("]|","~]|")("|","|https?://|")()}),o.breaks=l({},o.gfm,{br:i(o.br)("{2,}","*")(),text:i(o.gfm.text)("{2,}","*")()}),d.rules=o,d.output=function(a,b,c){var e=new d(b,c);return e.output(a)},d.prototype.output=function(a){for(var b,c,d,e,f="";a;)if(e=this.rules.escape.exec(a))a=a.substring(e[0].length),f+=e[1];else if(e=this.rules.autolink.exec(a))a=a.substring(e[0].length),"@"===e[2]?(c=g(":"===e[1].charAt(6)?this.mangle(e[1].substring(7)):this.mangle(e[1])),d=this.mangle("mailto:")+c):(c=g(e[1]),d=c),f+=this.renderer.link(d,null,c);else if(this.inLink||!(e=this.rules.url.exec(a))){if(e=this.rules.tag.exec(a))!this.inLink&&/^
    /i.test(e[0])&&(this.inLink=!1),a=a.substring(e[0].length),f+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):g(e[0]):e[0];else if(e=this.rules.link.exec(a))a=a.substring(e[0].length),this.inLink=!0,f+=this.outputLink(e,{href:e[2],title:e[3] +}),this.inLink=!1;else if((e=this.rules.reflink.exec(a))||(e=this.rules.nolink.exec(a))){if(a=a.substring(e[0].length),b=(e[2]||e[1]).replace(/\s+/g," "),b=this.links[b.toLowerCase()],!b||!b.href){f+=e[0].charAt(0),a=e[0].substring(1)+a;continue}this.inLink=!0,f+=this.outputLink(e,b),this.inLink=!1}else if(e=this.rules.strong.exec(a))a=a.substring(e[0].length),f+=this.renderer.strong(this.output(e[2]||e[1]));else if(e=this.rules.em.exec(a))a=a.substring(e[0].length),f+=this.renderer.em(this.output(e[2]||e[1]));else if(e=this.rules.code.exec(a))a=a.substring(e[0].length),f+=this.renderer.codespan(g(e[2].trim(),!0));else if(e=this.rules.br.exec(a))a=a.substring(e[0].length),f+=this.renderer.br();else if(e=this.rules.del.exec(a))a=a.substring(e[0].length),f+=this.renderer.del(this.output(e[1]));else if(e=this.rules.text.exec(a))a=a.substring(e[0].length),f+=this.renderer.text(g(this.smartypants(e[0])));else if(a)throw new Error("Infinite loop on byte: "+a.charCodeAt(0))}else a=a.substring(e[0].length),c=g(e[1]),d=c,f+=this.renderer.link(d,null,c);return f},d.prototype.outputLink=function(a,b){var c=g(b.href),d=b.title?g(b.title):null;return"!"!==a[0].charAt(0)?this.renderer.link(c,d,this.output(a[1])):this.renderer.image(c,d,g(a[1]))},d.prototype.smartypants=function(a){return this.options.smartypants?a.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014\/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014\/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):a},d.prototype.mangle=function(a){if(!this.options.mangle)return a;for(var b,c="",d=a.length,e=0;e.5&&(b="x"+b.toString(16)),c+="&#"+b+";";return c},e.prototype.code=function(a,b,c){if(this.options.highlight){var d=this.options.highlight(a,b);null!=d&&d!==a&&(c=!0,a=d)}return b?'
    '+(c?a:g(a,!0))+"\n
    \n":"
    "+(c?a:g(a,!0))+"\n
    "},e.prototype.blockquote=function(a){return"
    \n"+a+"
    \n"},e.prototype.html=function(a){return a},e.prototype.heading=function(a,b,c){return"'+a+"\n"},e.prototype.hr=function(){return this.options.xhtml?"
    \n":"
    \n"},e.prototype.list=function(a,b){var c=b?"ol":"ul";return"<"+c+">\n"+a+"\n"},e.prototype.listitem=function(a){return"
  • "+a+"
  • \n"},e.prototype.paragraph=function(a){return"

    "+a+"

    \n"},e.prototype.table=function(a,b){return"\n\n"+a+"\n\n"+b+"\n
    \n"},e.prototype.tablerow=function(a){return"\n"+a+"\n"},e.prototype.tablecell=function(a,b){var c=b.header?"th":"td",d=b.align?"<"+c+' style="text-align:'+b.align+'">':"<"+c+">";return d+a+"\n"},e.prototype.strong=function(a){return""+a+""},e.prototype.em=function(a){return""+a+""},e.prototype.codespan=function(a){return""+a+""},e.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},e.prototype.del=function(a){return""+a+""},e.prototype.link=function(a,b,c){if(this.options.sanitize){try{var d=decodeURIComponent(h(a)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(0===d.indexOf("javascript:")||0===d.indexOf("vbscript:")||0===d.indexOf("data:"))return""}this.options.baseUrl&&!originIndependentUrl.test(a)&&(a=j(this.options.baseUrl,a));var f='
    "},e.prototype.image=function(a,b,c){this.options.baseUrl&&!originIndependentUrl.test(a)&&(a=j(this.options.baseUrl,a));var d=''+c+'":">"},e.prototype.text=function(a){return a},f.parse=function(a,b,c){var d=new f(b,c);return d.parse(a)},f.prototype.parse=function(a){this.inline=new d(a.links,this.options,this.renderer),this.tokens=a.reverse();for(var b="";this.next();)b+=this.tok();return b},f.prototype.next=function(){return this.token=this.tokens.pop()},f.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},f.prototype.parseText=function(){for(var a=this.token.text;"text"===this.peek().type;)a+="\n"+this.next().text;return this.inline.output(a)},f.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var a,b,c,d,e,f="",g="";for(c="",a=0;a d\n\nconst d3_reverse = (arr) => {\n const mirror = [];\n for (let i = 0, l = arr.length; i < l; i++) {\n mirror[i] = arr[l-i-1];\n }\n return mirror;\n}\n\n//Text wrapping code adapted from Mike Bostock\nconst d3_textWrapping = (text, width) => {\n text.each(function() {\n var text = select(this),\n words = text.text().split(/\\s+/).reverse(),\n word,\n line = [],\n lineNumber = 0,\n lineHeight = 1.2, //ems\n y = text.attr(\"y\"),\n dy = parseFloat(text.attr(\"dy\")) || 0,\n tspan = text.text(null)\n .append(\"tspan\")\n .attr(\"x\", 0)\n .attr(\"dy\", dy + \"em\");\n\n while (word = words.pop()) {\n line.push(word);\n tspan.text(line.join(\" \"));\n if (tspan.node().getComputedTextLength() > width && line.length > 1) {\n line.pop();\n tspan.text(line.join(\" \"));\n line = [word];\n tspan = text.append(\"tspan\")\n .attr(\"x\", 0)\n .attr(\"dy\", lineHeight + dy + \"em\").text(word);\n }\n }\n });\n}\n\n\nconst d3_mergeLabels = (gen=[], labels, domain, range) => {\n\n if (typeof labels === \"object\"){\n if(labels.length === 0) return gen;\n\n let i = labels.length;\n for (; i < gen.length; i++) {\n labels.push(gen[i]);\n }\n return labels;\n } else if (typeof labels === \"function\") {\n const customLabels = []\n const genLength = gen.length\n for (let i=0; i < genLength; i++){\n customLabels.push(labels({\n i,\n genLength,\n generatedLabels : gen,\n domain,\n range }))\n }\n return customLabels\n }\n\n return gen;\n }\n\nconst d3_linearLegend = (scale, cells, labelFormat) => {\n let data = [];\n\n if (cells.length > 1){\n data = cells;\n\n } else {\n const domain = scale.domain(),\n increment = (domain[domain.length - 1] - domain[0])/(cells - 1)\n let i = 0;\n\n for (; i < cells; i++){\n data.push(domain[0] + i*increment);\n }\n }\n\n const labels = data.map(labelFormat);\n return {data: data,\n labels: labels,\n feature: d => scale(d)};\n}\n\nconst d3_quantLegend = (scale, labelFormat, labelDelimiter) => {\n const labels = scale.range().map( d => {\n const invert = scale.invertExtent(d);\n return labelFormat(invert[0]) + \" \" + labelDelimiter + \" \" + labelFormat(invert[1]);\n });\n\n return {data: scale.range(),\n labels: labels,\n feature: d3_identity\n };\n}\n\nconst d3_ordinalLegend= scale => ({data: scale.domain(),\n labels: scale.domain(),\n feature: d => scale(d) }\n)\n\nconst d3_cellOver = (cellDispatcher, d, obj) => {\n cellDispatcher.call(\"cellover\", obj, d);\n}\n\nconst d3_cellOut = (cellDispatcher, d, obj) => {\n cellDispatcher.call(\"cellout\", obj, d);\n}\n\nconst d3_cellClick = (cellDispatcher, d, obj) => {\n cellDispatcher.call(\"cellclick\", obj, d);\n}\n\n\nexport default {\n\n d3_drawShapes: (shape, shapes, shapeHeight, shapeWidth, shapeRadius, path) => {\n if (shape === \"rect\"){\n shapes.attr(\"height\", shapeHeight)\n .attr(\"width\", shapeWidth);\n\n } else if (shape === \"circle\") {\n shapes.attr(\"r\", shapeRadius)\n\n } else if (shape === \"line\") {\n shapes.attr(\"x1\", 0).attr(\"x2\", shapeWidth).attr(\"y1\", 0).attr(\"y2\", 0);\n\n } else if (shape === \"path\") {\n shapes.attr(\"d\", path);\n }\n },\n\n d3_addText: function (svg, enter, labels, classPrefix, labelWidth){\n enter.append(\"text\").attr(\"class\", classPrefix + \"label\");\n const text = svg.selectAll(`g.${classPrefix}cell text.${classPrefix}label`)\n .data(labels)\n .text(d3_identity);\n\n if (labelWidth){\n svg.selectAll(`g.${classPrefix}cell text.${classPrefix}label`)\n .call(d3_textWrapping, labelWidth)\n }\n\n return text\n },\n\n d3_calcType: function (scale, ascending, cells, labels, labelFormat, labelDelimiter){\n const type = scale.invertExtent ?\n d3_quantLegend(scale, labelFormat, labelDelimiter) : scale.ticks ?\n d3_linearLegend(scale, cells, labelFormat) : d3_ordinalLegend(scale);\n\n //for d3.scaleSequential that doesn't have a range function\n const range = scale.range && scale.range() || scale.domain()\n type.labels = d3_mergeLabels(type.labels, labels, scale.domain(), range);\n\n if (ascending) {\n type.labels = d3_reverse(type.labels);\n type.data = d3_reverse(type.data);\n }\n\n return type;\n },\n\n d3_filterCells: (type, cellFilter) => {\n let filterCells = type.data.map((d, i) => ({ data: d, label: type.labels[i] }))\n .filter(cellFilter)\n const dataValues = filterCells.map(d => d.data)\n const labelValues = filterCells.map(d => d.label)\n type.data = type.data.filter(d => dataValues.indexOf(d) !== -1)\n type.labels = type.labels.filter(d => labelValues.indexOf(d) !== -1)\n return type\n },\n\n d3_placement: (orient, cell, cellTrans, text, textTrans, labelAlign) => {\n cell.attr(\"transform\", cellTrans);\n text.attr(\"transform\", textTrans);\n if (orient === \"horizontal\"){\n text.style(\"text-anchor\", labelAlign);\n }\n },\n\n d3_addEvents: function(cells, dispatcher){\n cells.on(\"mouseover.legend\", function (d) { d3_cellOver(dispatcher, d, this); })\n .on(\"mouseout.legend\", function (d) { d3_cellOut(dispatcher, d, this); })\n .on(\"click.legend\", function (d) { d3_cellClick(dispatcher, d, this); });\n },\n\n d3_title: (svg, title, classPrefix, titleWidth) => {\n if (title !== \"\"){\n\n const titleText = svg.selectAll('text.' + classPrefix + 'legendTitle');\n\n titleText.data([title])\n .enter()\n .append('text')\n .attr('class', classPrefix + 'legendTitle');\n\n svg.selectAll('text.' + classPrefix + 'legendTitle')\n .text(title)\n\n if (titleWidth){\n svg.selectAll('text.' + classPrefix + 'legendTitle')\n .call(d3_textWrapping, titleWidth)\n }\n\n const cellsSvg = svg.select('.' + classPrefix + 'legendCells')\n const yOffset = svg.select('.' + classPrefix + 'legendTitle').nodes()\n .map(d => d.getBBox().height)[0],\n\n xOffset = -cellsSvg.nodes().map(function(d) { return d.getBBox().x})[0];\n cellsSvg.attr('transform', 'translate(' + xOffset + ',' + (yOffset) + ')');\n\n }\n },\n\n d3_defaultLocale: {\n format,\n formatPrefix\n },\n\n d3_defaultFormatSpecifier: '.01f',\n\n d3_defaultDelimiter: 'to'\n}\n","import helper from './legend';\nimport { dispatch } from 'd3-dispatch';\nimport { scaleLinear } from 'd3-scale';\nimport { formatLocale, formatSpecifier } from 'd3-format';\n\nimport { sum } from 'd3-array';\n\nexport default function color(){\n\n let scale = scaleLinear(),\n shape = \"rect\",\n shapeWidth = 15,\n shapeHeight = 15,\n shapeRadius = 10,\n shapePadding = 2,\n cells = [5],\n cellFilter,\n labels = [],\n classPrefix = \"\",\n useClass = false,\n title = \"\",\n locale = helper.d3_defaultLocale,\n specifier = helper.d3_defaultFormatSpecifier,\n labelOffset = 10,\n labelAlign = \"middle\",\n labelDelimiter = helper.d3_defaultDelimiter,\n labelWrap,\n orient = \"vertical\",\n ascending = false,\n path,\n titleWidth,\n legendDispatcher = dispatch(\"cellover\", \"cellout\", \"cellclick\");\n\n function legend(svg) {\n\n const type = helper.d3_calcType(scale, ascending, cells, labels, locale.format(specifier), labelDelimiter),\n legendG = svg.selectAll('g').data([scale]);\n\n legendG.enter().append('g').attr('class', classPrefix + 'legendCells');\n\n if (cellFilter){\n helper.d3_filterCells(type, cellFilter)\n }\n\n let cell = svg.select('.' + classPrefix + 'legendCells')\n .selectAll(\".\" + classPrefix + \"cell\").data(type.data)\n\n const cellEnter = cell.enter().append(\"g\")\n .attr(\"class\", classPrefix + \"cell\")\n cellEnter.append(shape).attr(\"class\", classPrefix + \"swatch\")\n\n let shapes = svg.selectAll(\"g.\" + classPrefix + \"cell \" + shape).data(type.data);\n\n //add event handlers\n helper.d3_addEvents(cellEnter, legendDispatcher);\n\n cell.exit().transition().style(\"opacity\", 0).remove();\n shapes.exit().transition().style(\"opacity\", 0).remove();\n\n shapes = shapes.merge(shapes);\n\n helper.d3_drawShapes(shape, shapes, shapeHeight, shapeWidth, shapeRadius, path);\n helper.d3_addText( svg, cellEnter, type.labels, classPrefix, labelWrap)\n\n // we need to merge the selection, otherwise changes in the legend (e.g. change of orientation) are applied only to the new cells and not the existing ones.\n cell = cellEnter.merge(cell);\n\n // sets placement\n const text = cell.select(\"text\"),\n textSize = text.nodes().map(d => d.getBBox()),\n shapeSize = shapes.nodes().map( d => d.getBBox());\n //sets scale\n //everything is fill except for line which is stroke,\n if (!useClass){\n if (shape == \"line\"){\n shapes.style(\"stroke\", type.feature);\n } else {\n shapes.style(\"fill\", type.feature);\n }\n } else {\n shapes.attr(\"class\", d => `${classPrefix}swatch ${type.feature(d)}`);\n }\n\n let cellTrans,\n textTrans,\n textAlign = (labelAlign == \"start\") ? 0 : (labelAlign == \"middle\") ? 0.5 : 1;\n\n //positions cells and text\n if (orient === \"vertical\"){\n const cellSize = textSize.map((d, i) => Math.max(d.height, shapeSize[i].height))\n\n cellTrans = (d, i) => {\n const height = sum(cellSize.slice(0, i));\n return `translate(0, ${height + i*shapePadding})`}\n\n textTrans = (d,i) => `translate( ${(shapeSize[i].width + shapeSize[i].x +\n labelOffset)}, ${(shapeSize[i].y + shapeSize[i].height/2 + 5)})`;\n\n } else if (orient === \"horizontal\"){\n cellTrans = (d,i) => `translate(${(i * (shapeSize[i].width + shapePadding))},0)`\n textTrans = (d,i) => `translate(${(shapeSize[i].width*textAlign + shapeSize[i].x)},\n ${(shapeSize[i].height + shapeSize[i].y + labelOffset + 8)})`;\n }\n\n helper.d3_placement(orient, cell, cellTrans, text, textTrans, labelAlign);\n helper.d3_title(svg, title, classPrefix, titleWidth);\n\n cell.transition().style(\"opacity\", 1);\n\n }\n\n legend.scale = function(_) {\n if (!arguments.length) return scale;\n scale = _;\n return legend;\n };\n\n legend.cells = function(_) {\n if (!arguments.length) return cells;\n if (_.length > 1 || _ >= 2 ){\n cells = _;\n }\n return legend;\n };\n\n legend.cellFilter = function(_) {\n if (!arguments.length) return cellFilter;\n cellFilter = _;\n return legend;\n };\n\n legend.shape = function(_, d) {\n if (!arguments.length) return shape;\n if (_ == \"rect\" || _ == \"circle\" || _ == \"line\" || (_ == \"path\" && (typeof d === 'string')) ){\n shape = _;\n path = d;\n }\n return legend;\n };\n\n legend.shapeWidth = function(_) {\n if (!arguments.length) return shapeWidth;\n shapeWidth = +_;\n return legend;\n };\n\n legend.shapeHeight = function(_) {\n if (!arguments.length) return shapeHeight;\n shapeHeight = +_;\n return legend;\n };\n\n legend.shapeRadius = function(_) {\n if (!arguments.length) return shapeRadius;\n shapeRadius = +_;\n return legend;\n };\n\n legend.shapePadding = function(_) {\n if (!arguments.length) return shapePadding;\n shapePadding = +_;\n return legend;\n };\n\n legend.labels = function(_) {\n if (!arguments.length) return labels;\n labels = _;\n return legend;\n };\n\n legend.labelAlign = function(_) {\n if (!arguments.length) return labelAlign;\n if (_ == \"start\" || _ == \"end\" || _ == \"middle\") {\n labelAlign = _;\n }\n return legend;\n };\n\n legend.locale = function(_) {\n if (!arguments.length) return locale;\n locale = formatLocale(_)\n return legend\n };\n\n legend.labelFormat = function(_) {\n if (!arguments.length) return legend.locale().format(specifier);\n specifier = formatSpecifier(_)\n return legend;\n };\n\n legend.labelOffset = function(_) {\n if (!arguments.length) return labelOffset;\n labelOffset = +_;\n return legend;\n };\n\n legend.labelDelimiter = function(_) {\n if (!arguments.length) return labelDelimiter;\n labelDelimiter = _;\n return legend;\n };\n\n legend.labelWrap = function(_) {\n if (!arguments.length) return labelWrap;\n labelWrap = _;\n return legend;\n };\n\n legend.useClass = function(_) {\n if (!arguments.length) return useClass;\n if (_ === true || _ === false){\n useClass = _;\n }\n return legend;\n };\n\n legend.orient = function(_){\n if (!arguments.length) return orient;\n _ = _.toLowerCase();\n if (_ == \"horizontal\" || _ == \"vertical\") {\n orient = _;\n }\n return legend;\n };\n\n legend.ascending = function(_) {\n if (!arguments.length) return ascending;\n ascending = !!_;\n return legend;\n };\n\n legend.classPrefix = function(_) {\n if (!arguments.length) return classPrefix;\n classPrefix = _;\n return legend;\n };\n\n legend.title = function(_) {\n if (!arguments.length) return title;\n title = _;\n return legend;\n };\n\n legend.titleWidth = function(_) {\n if (!arguments.length) return titleWidth;\n titleWidth = _;\n return legend;\n };\n\n legend.textWrap = function(_) {\n if (!arguments.length) return textWrap;\n textWrap = _;\n return legend;\n }\n\n legend.on = function(){\n const value = legendDispatcher.on.apply(legendDispatcher, arguments)\n return value === legendDispatcher ? legend : value;\n }\n\n return legend;\n\n};\n","import helper from \"./legend\"\nimport { dispatch } from \"d3-dispatch\"\nimport { scaleLinear } from \"d3-scale\"\nimport { formatLocale, formatSpecifier } from \"d3-format\"\nimport { sum, max } from \"d3-array\"\n\nexport default function size() {\n let scale = scaleLinear(),\n shape = \"rect\",\n shapeWidth = 15,\n shapePadding = 2,\n cells = [5],\n cellFilter,\n labels = [],\n classPrefix = \"\",\n title = \"\",\n locale = helper.d3_defaultLocale,\n specifier = helper.d3_defaultFormatSpecifier,\n labelOffset = 10,\n labelAlign = \"middle\",\n labelDelimiter = helper.d3_defaultDelimiter,\n labelWrap,\n orient = \"vertical\",\n ascending = false,\n path,\n titleWidth,\n legendDispatcher = dispatch(\"cellover\", \"cellout\", \"cellclick\")\n\n function legend(svg) {\n const type = helper.d3_calcType(\n scale,\n ascending,\n cells,\n labels,\n locale.format(specifier),\n labelDelimiter\n ),\n legendG = svg.selectAll(\"g\").data([scale])\n\n if (cellFilter) {\n helper.d3_filterCells(type, cellFilter)\n }\n\n legendG\n .enter()\n .append(\"g\")\n .attr(\"class\", classPrefix + \"legendCells\")\n\n let cell = svg\n .select(\".\" + classPrefix + \"legendCells\")\n .selectAll(\".\" + classPrefix + \"cell\")\n .data(type.data)\n const cellEnter = cell\n .enter()\n .append(\"g\")\n .attr(\"class\", classPrefix + \"cell\")\n cellEnter.append(shape).attr(\"class\", classPrefix + \"swatch\")\n\n let shapes = svg.selectAll(\"g.\" + classPrefix + \"cell \" + shape)\n\n //add event handlers\n helper.d3_addEvents(cellEnter, legendDispatcher)\n\n cell\n .exit()\n .transition()\n .style(\"opacity\", 0)\n .remove()\n\n shapes\n .exit()\n .transition()\n .style(\"opacity\", 0)\n .remove()\n shapes = shapes.merge(shapes)\n\n //creates shape\n if (shape === \"line\") {\n helper.d3_drawShapes(shape, shapes, 0, shapeWidth)\n shapes.attr(\"stroke-width\", type.feature)\n } else {\n helper.d3_drawShapes(\n shape,\n shapes,\n type.feature,\n type.feature,\n type.feature,\n path\n )\n }\n\n const text = helper.d3_addText(\n svg,\n cellEnter,\n type.labels,\n classPrefix,\n labelWrap\n )\n\n // we need to merge the selection, otherwise changes in the legend (e.g. change of orientation) are applied only to the new cells and not the existing ones.\n cell = cellEnter.merge(cell)\n\n //sets placement\n\n const textSize = text.nodes().map(d => d.getBBox()),\n shapeSize = shapes.nodes().map((d, i) => {\n const bbox = d.getBBox()\n const stroke = scale(type.data[i])\n\n if (shape === \"line\" && orient === \"horizontal\") {\n bbox.height = bbox.height + stroke\n } else if (shape === \"line\" && orient === \"vertical\") {\n bbox.width = bbox.width\n }\n return bbox\n })\n //console.log('SHAPESIZE')\n const maxH = max(shapeSize, d => d.height + d.y),\n maxW = max(shapeSize, d => d.width + d.x)\n\n let cellTrans,\n textTrans,\n textAlign = labelAlign == \"start\" ? 0 : labelAlign == \"middle\" ? 0.5 : 1\n\n //positions cells and text\n if (orient === \"vertical\") {\n const cellSize = textSize.map((d, i) =>\n Math.max(d.height, shapeSize[i].height)\n )\n const y =\n shape == \"circle\" || shape == \"line\" ? shapeSize[0].height / 2 : 0\n cellTrans = (d, i) => {\n const height = sum(cellSize.slice(0, i))\n\n return `translate(0, ${y + height + i * shapePadding})`\n }\n\n textTrans = (d, i) => `translate( ${maxW + labelOffset},\n ${shapeSize[i].y + shapeSize[i].height / 2 + 5})`\n } else if (orient === \"horizontal\") {\n cellTrans = (d, i) => {\n const width = sum(shapeSize.slice(0, i), d => d.width)\n const y = shape == \"circle\" || shape == \"line\" ? maxH / 2 : 0\n return `translate(${width + i * shapePadding}, ${y})`\n }\n\n const offset = shape == \"line\" ? maxH / 2 : maxH\n textTrans = (d, i) => {\n return `translate( ${shapeSize[i].width * textAlign + shapeSize[i].x},\n ${offset + labelOffset})`\n }\n }\n\n helper.d3_placement(orient, cell, cellTrans, text, textTrans, labelAlign)\n helper.d3_title(svg, title, classPrefix, titleWidth)\n\n cell.transition().style(\"opacity\", 1)\n }\n\n legend.scale = function(_) {\n if (!arguments.length) return scale\n scale = _\n return legend\n }\n\n legend.cells = function(_) {\n if (!arguments.length) return cells\n if (_.length > 1 || _ >= 2) {\n cells = _\n }\n return legend\n }\n\n legend.cellFilter = function(_) {\n if (!arguments.length) return cellFilter\n cellFilter = _\n return legend\n }\n\n legend.shape = function(_, d) {\n if (!arguments.length) return shape\n if (_ == \"rect\" || _ == \"circle\" || _ == \"line\") {\n shape = _\n path = d\n }\n return legend\n }\n\n legend.shapeWidth = function(_) {\n if (!arguments.length) return shapeWidth\n shapeWidth = +_\n return legend\n }\n\n legend.shapePadding = function(_) {\n if (!arguments.length) return shapePadding\n shapePadding = +_\n return legend\n }\n\n legend.labels = function(_) {\n if (!arguments.length) return labels\n labels = _\n return legend\n }\n\n legend.labelAlign = function(_) {\n if (!arguments.length) return labelAlign\n if (_ == \"start\" || _ == \"end\" || _ == \"middle\") {\n labelAlign = _\n }\n return legend\n }\n\n legend.locale = function(_) {\n if (!arguments.length) return locale\n locale = formatLocale(_)\n return legend\n }\n\n legend.labelFormat = function(_) {\n if (!arguments.length) return legend.locale().format(specifier)\n specifier = formatSpecifier(_)\n return legend\n }\n\n legend.labelOffset = function(_) {\n if (!arguments.length) return labelOffset\n labelOffset = +_\n return legend\n }\n\n legend.labelDelimiter = function(_) {\n if (!arguments.length) return labelDelimiter\n labelDelimiter = _\n return legend\n }\n\n legend.labelWrap = function(_) {\n if (!arguments.length) return labelWrap\n labelWrap = _\n return legend\n }\n\n legend.orient = function(_) {\n if (!arguments.length) return orient\n _ = _.toLowerCase()\n if (_ == \"horizontal\" || _ == \"vertical\") {\n orient = _\n }\n return legend\n }\n\n legend.ascending = function(_) {\n if (!arguments.length) return ascending\n ascending = !!_\n return legend\n }\n\n legend.classPrefix = function(_) {\n if (!arguments.length) return classPrefix\n classPrefix = _\n return legend\n }\n\n legend.title = function(_) {\n if (!arguments.length) return title\n title = _\n return legend\n }\n\n legend.titleWidth = function(_) {\n if (!arguments.length) return titleWidth\n titleWidth = _\n return legend\n }\n\n legend.on = function() {\n const value = legendDispatcher.on.apply(legendDispatcher, arguments)\n return value === legendDispatcher ? legend : value\n }\n\n return legend\n}\n","import helper from \"./legend\"\nimport { dispatch } from \"d3-dispatch\"\nimport { scaleLinear } from \"d3-scale\"\nimport { formatLocale, formatSpecifier } from \"d3-format\"\nimport { sum, max } from \"d3-array\"\n\nexport default function symbol() {\n let scale = scaleLinear(),\n shape = \"path\",\n shapeWidth = 15,\n shapeHeight = 15,\n shapeRadius = 10,\n shapePadding = 5,\n cells = [5],\n cellFilter,\n labels = [],\n classPrefix = \"\",\n title = \"\",\n locale = helper.d3_defaultLocale,\n specifier = helper.d3_defaultFormatSpecifier,\n labelAlign = \"middle\",\n labelOffset = 10,\n labelDelimiter = helper.d3_defaultDelimiter,\n labelWrap,\n orient = \"vertical\",\n ascending = false,\n titleWidth,\n legendDispatcher = dispatch(\"cellover\", \"cellout\", \"cellclick\")\n\n function legend(svg) {\n const type = helper.d3_calcType(\n scale,\n ascending,\n cells,\n labels,\n locale.format(specifier),\n labelDelimiter\n ),\n legendG = svg.selectAll(\"g\").data([scale])\n\n if (cellFilter) {\n helper.d3_filterCells(type, cellFilter)\n }\n\n legendG\n .enter()\n .append(\"g\")\n .attr(\"class\", classPrefix + \"legendCells\")\n\n let cell = svg\n .select(\".\" + classPrefix + \"legendCells\")\n .selectAll(\".\" + classPrefix + \"cell\")\n .data(type.data)\n const cellEnter = cell\n .enter()\n .append(\"g\")\n .attr(\"class\", classPrefix + \"cell\")\n cellEnter.append(shape).attr(\"class\", classPrefix + \"swatch\")\n\n let shapes = svg.selectAll(\"g.\" + classPrefix + \"cell \" + shape)\n\n //add event handlers\n helper.d3_addEvents(cellEnter, legendDispatcher)\n\n //remove old shapes\n cell\n .exit()\n .transition()\n .style(\"opacity\", 0)\n .remove()\n shapes\n .exit()\n .transition()\n .style(\"opacity\", 0)\n .remove()\n shapes = shapes.merge(shapes)\n\n helper.d3_drawShapes(\n shape,\n shapes,\n shapeHeight,\n shapeWidth,\n shapeRadius,\n type.feature\n )\n helper.d3_addText(svg, cellEnter, type.labels, classPrefix, labelWrap)\n\n // we need to merge the selection, otherwise changes in the legend (e.g. change of orientation) are applied only to the new cells and not the existing ones.\n cell = cellEnter.merge(cell)\n\n // sets placement\n const text = cell.select(\"text\"),\n textSize = text.nodes().map(d => d.getBBox()),\n shapeSize = shapes.nodes().map(d => d.getBBox())\n\n const maxH = max(shapeSize, d => d.height),\n maxW = max(shapeSize, d => d.width)\n\n let cellTrans,\n textTrans,\n textAlign = labelAlign == \"start\" ? 0 : labelAlign == \"middle\" ? 0.5 : 1\n\n //positions cells and text\n if (orient === \"vertical\") {\n const cellSize = textSize.map((d, i) => Math.max(maxH, d.height))\n\n cellTrans = (d, i) => {\n const height = sum(cellSize.slice(0, i))\n return `translate(0, ${height + i * shapePadding} )`\n }\n textTrans = (d, i) => `translate( ${maxW + labelOffset},\n ${shapeSize[i].y + shapeSize[i].height / 2 + 5})`\n } else if (orient === \"horizontal\") {\n cellTrans = (d, i) => `translate( ${i * (maxW + shapePadding)},0)`\n textTrans = (d, i) => `translate( ${shapeSize[i].width * textAlign +\n shapeSize[i].x},\n ${maxH + labelOffset})`\n }\n\n helper.d3_placement(orient, cell, cellTrans, text, textTrans, labelAlign)\n helper.d3_title(svg, title, classPrefix, titleWidth)\n cell.transition().style(\"opacity\", 1)\n }\n\n legend.scale = function(_) {\n if (!arguments.length) return scale\n scale = _\n return legend\n }\n\n legend.cells = function(_) {\n if (!arguments.length) return cells\n if (_.length > 1 || _ >= 2) {\n cells = _\n }\n return legend\n }\n\n legend.cellFilter = function(_) {\n if (!arguments.length) return cellFilter\n cellFilter = _\n return legend\n }\n\n legend.shapePadding = function(_) {\n if (!arguments.length) return shapePadding\n shapePadding = +_\n return legend\n }\n\n legend.labels = function(_) {\n if (!arguments.length) return labels\n labels = _\n return legend\n }\n\n legend.labelAlign = function(_) {\n if (!arguments.length) return labelAlign\n if (_ == \"start\" || _ == \"end\" || _ == \"middle\") {\n labelAlign = _\n }\n return legend\n }\n\n legend.locale = function(_) {\n if (!arguments.length) return locale\n locale = formatLocale(_)\n return legend\n }\n\n legend.labelFormat = function(_) {\n if (!arguments.length) return legend.locale().format(specifier)\n specifier = formatSpecifier(_)\n return legend\n }\n\n legend.labelOffset = function(_) {\n if (!arguments.length) return labelOffset\n labelOffset = +_\n return legend\n }\n\n legend.labelDelimiter = function(_) {\n if (!arguments.length) return labelDelimiter\n labelDelimiter = _\n return legend\n }\n\n legend.labelWrap = function(_) {\n if (!arguments.length) return labelWrap\n labelWrap = _\n return legend\n }\n\n legend.orient = function(_) {\n if (!arguments.length) return orient\n _ = _.toLowerCase()\n if (_ == \"horizontal\" || _ == \"vertical\") {\n orient = _\n }\n return legend\n }\n\n legend.ascending = function(_) {\n if (!arguments.length) return ascending\n ascending = !!_\n return legend\n }\n\n legend.classPrefix = function(_) {\n if (!arguments.length) return classPrefix\n classPrefix = _\n return legend\n }\n\n legend.title = function(_) {\n if (!arguments.length) return title\n title = _\n return legend\n }\n\n legend.titleWidth = function(_) {\n if (!arguments.length) return titleWidth\n titleWidth = _\n return legend\n }\n\n legend.on = function() {\n const value = legendDispatcher.on.apply(legendDispatcher, arguments)\n return value === legendDispatcher ? legend : value\n }\n\n return legend\n}\n","export const thresholdLabels = function({ i, genLength, generatedLabels }){\n\n if (i === 0 ){\n return generatedLabels[i].replace('NaN to', 'Less than')\n } else if (i === genLength - 1) {\n return `More than ${generatedLabels[genLength - 1].replace(' to NaN', '')}`\n }\n return generatedLabels[i]\n}\n\nexport default {\n thresholdLabels\n}\n","import legendColor from './src/color'\nimport legendSize from './src/size'\nimport legendSymbol from './src/symbol'\nimport legendHelpers from './src/helpers'\n\nexport { legendColor, legendSize, legendSymbol, legendHelpers }\n\nexport default {\n legendColor,\n legendSize,\n legendSymbol,\n legendHelpers\n};\n"],"names":["d3_identity","d","d3_reverse","arr","mirror","i","l","length","d3_textWrapping","text","width","each","select","words","split","reverse","word","line","lineNumber","lineHeight","attr","dy","parseFloat","tspan","append","pop","push","join","node","getComputedTextLength","d3_mergeLabels","gen","labels","domain","range","customLabels","genLength","d3_linearLegend","scale","cells","labelFormat","data","increment","map","d3_quantLegend","labelDelimiter","invert","invertExtent","d3_ordinalLegend","d3_cellOver","cellDispatcher","obj","call","d3_cellOut","d3_cellClick","shape","shapes","shapeHeight","shapeWidth","shapeRadius","path","svg","enter","classPrefix","labelWidth","selectAll","ascending","type","ticks","cellFilter","filterCells","label","filter","dataValues","labelValues","indexOf","orient","cell","cellTrans","textTrans","labelAlign","style","dispatcher","on","title","titleWidth","titleText","cellsSvg","yOffset","nodes","getBBox","height","xOffset","x","color","scaleLinear","shapePadding","useClass","locale","helper","d3_defaultLocale","specifier","d3_defaultFormatSpecifier","labelOffset","d3_defaultDelimiter","labelWrap","legendDispatcher","dispatch","legend","d3_calcType","format","legendG","d3_filterCells","cellEnter","d3_addEvents","exit","transition","remove","merge","d3_drawShapes","d3_addText","textSize","shapeSize","feature","textAlign","cellSize","Math","max","sum","slice","y","d3_placement","d3_title","_","arguments","formatLocale","formatSpecifier","toLowerCase","textWrap","value","apply","size","bbox","stroke","maxH","maxW","offset","symbol","thresholdLabels","generatedLabels","replace"],"mappings":";;;;;;;;;;;;AAGA,IAAMA,cAAe,SAAfA,WAAe,CAACC,CAAD;SAAOA,CAAP;CAArB;;AAEA,IAAMC,aAAa,SAAbA,UAAa,CAACC,GAAD,EAAS;MACpBC,SAAS,EAAf;OACK,IAAIC,IAAI,CAAR,EAAWC,IAAIH,IAAII,MAAxB,EAAgCF,IAAIC,CAApC,EAAuCD,GAAvC,EAA4C;WACnCA,CAAP,IAAYF,IAAIG,IAAED,CAAF,GAAI,CAAR,CAAZ;;SAEKD,MAAP;CALF;;;AASA,IAAMI,kBAAkB,SAAlBA,eAAkB,CAACC,IAAD,EAAOC,KAAP,EAAiB;OAClCC,IAAL,CAAU,YAAW;QACfF,OAAOG,mBAAO,IAAP,CAAX;QACIC,QAAQJ,KAAKA,IAAL,GAAYK,KAAZ,CAAkB,KAAlB,EAAyBC,OAAzB,EADZ;QAEIC,IAFJ;QAGIC,OAAO,EAHX;QAIIC,aAAa,CAJjB;QAKIC,aAAa,GALjB;;QAMQV,KAAKW,IAAL,CAAU,GAAV,CANR;QAOIC,KAAKC,WAAWb,KAAKW,IAAL,CAAU,IAAV,CAAX,KAA+B,CAPxC;QAQIG,QAAQd,KAAKA,IAAL,CAAU,IAAV,EACLe,MADK,CACE,OADF,EAELJ,IAFK,CAEA,GAFA,EAEK,CAFL,EAGLA,IAHK,CAGA,IAHA,EAGMC,KAAK,IAHX,CARZ;;WAaOL,O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GAAY,YAAW;QACfwD,QAAQjC,iBAAiBvB,EAAjB,CAAoByD,KAApB,CAA0BlC,gBAA1B,EAA4C4B,SAA5C,CAAd;WACOK,UAAUjC,gBAAV,GAA6BE,MAA7B,GAAsC+B,KAA7C;GAFF;;SAKO/B,MAAP;;;ACxOK,IAAMwC,kBAAkB,SAAlBA,eAAkB,OAA2C;MAAhC/I,CAAgC,QAAhCA,CAAgC;MAA7B+B,SAA6B,QAA7BA,SAA6B;MAAlBiH,eAAkB,QAAlBA,eAAkB;;;MAEpEhJ,MAAM,CAAV,EAAa;WACJgJ,gBAAgBhJ,CAAhB,EAAmBiJ,OAAnB,CAA2B,QAA3B,EAAqC,WAArC,CAAP;GADF,MAEO,IAAIjJ,MAAM+B,YAAY,CAAtB,EAAyB;0BACViH,gBAAgBjH,YAAY,CAA5B,EAA+BkH,OAA/B,CAAuC,SAAvC,EAAkD,EAAlD,CAApB;;SAEKD,gBAAgBhJ,CAAhB,CAAP;CAPK;;AAUP,oBAAe;;CAAf;;ACHA,YAAe;oBAAA;kBAAA;sBAAA;;CAAf;;;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"indexRollup.js","sources":["src/legend.js","src/color.js","src/size.js","src/symbol.js","src/helpers.js","index.js"],"sourcesContent":["import { select } from 'd3-selection'\nimport { format, formatPrefix } from 'd3-format'\n\nconst d3_identity = (d) => d\n\nconst d3_reverse = (arr) => {\n const mirror = [];\n for (let i = 0, l = arr.length; i < l; i++) {\n mirror[i] = arr[l-i-1];\n }\n return mirror;\n}\n\n//Text wrapping code adapted from Mike Bostock\nconst d3_textWrapping = (text, width) => {\n text.each(function() {\n var text = select(this),\n words = text.text().split(/\\s+/).reverse(),\n word,\n line = [],\n lineNumber = 0,\n lineHeight = 1.2, //ems\n y = text.attr(\"y\"),\n dy = parseFloat(text.attr(\"dy\")) || 0,\n tspan = text.text(null)\n .append(\"tspan\")\n .attr(\"x\", 0)\n .attr(\"dy\", dy + \"em\");\n\n while (word = words.pop()) {\n line.push(word);\n tspan.text(line.join(\" \"));\n if (tspan.node().getComputedTextLength() > width && line.length > 1) {\n line.pop();\n tspan.text(line.join(\" \"));\n line = [word];\n tspan = text.append(\"tspan\")\n .attr(\"x\", 0)\n .attr(\"dy\", lineHeight + dy + \"em\").text(word);\n }\n }\n });\n}\n\n\nconst d3_mergeLabels = (gen=[], labels, domain, range) => {\n\n if (typeof labels === \"object\"){\n if(labels.length === 0) return gen;\n\n let i = labels.length;\n for (; i < gen.length; i++) {\n labels.push(gen[i]);\n }\n return labels;\n } else if (typeof labels === \"function\") {\n const customLabels = []\n const genLength = gen.length\n for (let i=0; i < genLength; i++){\n customLabels.push(labels({\n i,\n genLength,\n generatedLabels : gen,\n domain,\n range }))\n }\n return customLabels\n }\n\n return gen;\n }\n\nconst d3_linearLegend = (scale, cells, labelFormat) => {\n let data = [];\n\n if (cells.length > 1){\n data = cells;\n\n } else {\n const domain = scale.domain(),\n increment = (domain[domain.length - 1] - domain[0])/(cells - 1)\n let i = 0;\n\n for (; i < cells; i++){\n data.push(domain[0] + i*increment);\n }\n }\n\n const labels = data.map(labelFormat);\n return {data: data,\n labels: labels,\n feature: d => scale(d)};\n}\n\nconst d3_quantLegend = (scale, labelFormat, labelDelimiter) => {\n const labels = scale.range().map( d => {\n const invert = scale.invertExtent(d);\n return labelFormat(invert[0]) + \" \" + labelDelimiter + \" \" + labelFormat(invert[1]);\n });\n\n return {data: scale.range(),\n labels: labels,\n feature: d3_identity\n };\n}\n\nconst d3_ordinalLegend= scale => ({data: scale.domain(),\n labels: scale.domain(),\n feature: d => scale(d) }\n)\n\nconst d3_cellOver = (cellDispatcher, d, obj) => {\n cellDispatcher.call(\"cellover\", obj, d);\n}\n\nconst d3_cellOut = (cellDispatcher, d, obj) => {\n cellDispatcher.call(\"cellout\", obj, d);\n}\n\nconst d3_cellClick = (cellDispatcher, d, obj) => {\n cellDispatcher.call(\"cellclick\", obj, d);\n}\n\n\nexport default {\n\n d3_drawShapes: (shape, shapes, shapeHeight, shapeWidth, shapeRadius, path) => {\n if (shape === \"rect\"){\n shapes.attr(\"height\", shapeHeight)\n .attr(\"width\", shapeWidth);\n\n } else if (shape === \"circle\") {\n shapes.attr(\"r\", shapeRadius)\n\n } else if (shape === \"line\") {\n shapes.attr(\"x1\", 0).attr(\"x2\", shapeWidth).attr(\"y1\", 0).attr(\"y2\", 0);\n\n } else if (shape === \"path\") {\n shapes.attr(\"d\", path);\n }\n },\n\n d3_addText: function (svg, enter, labels, classPrefix, labelWidth){\n enter.append(\"text\").attr(\"class\", classPrefix + \"label\");\n const text = svg.selectAll(`g.${classPrefix}cell text.${classPrefix}label`)\n .data(labels)\n .text(d3_identity);\n\n if (labelWidth){\n svg.selectAll(`g.${classPrefix}cell text.${classPrefix}label`)\n .call(d3_textWrapping, labelWidth)\n }\n\n return text\n },\n\n d3_calcType: function (scale, ascending, cells, labels, labelFormat, labelDelimiter){\n const type = scale.invertExtent ?\n d3_quantLegend(scale, labelFormat, labelDelimiter) : scale.ticks ?\n d3_linearLegend(scale, cells, labelFormat) : d3_ordinalLegend(scale);\n\n //for d3.scaleSequential that doesn't have a range function\n const range = scale.range && scale.range() || scale.domain()\n type.labels = d3_mergeLabels(type.labels, labels, scale.domain(), range);\n\n if (ascending) {\n type.labels = d3_reverse(type.labels);\n type.data = d3_reverse(type.data);\n }\n\n return type;\n },\n\n d3_filterCells: (type, cellFilter) => {\n let filterCells = type.data.map((d, i) => ({ data: d, label: type.labels[i] }))\n .filter(cellFilter)\n const dataValues = filterCells.map(d => d.data)\n const labelValues = filterCells.map(d => d.label)\n type.data = type.data.filter(d => dataValues.indexOf(d) !== -1)\n type.labels = type.labels.filter(d => labelValues.indexOf(d) !== -1)\n return type\n },\n\n d3_placement: (orient, cell, cellTrans, text, textTrans, labelAlign) => {\n cell.attr(\"transform\", cellTrans);\n text.attr(\"transform\", textTrans);\n if (orient === \"horizontal\"){\n text.style(\"text-anchor\", labelAlign);\n }\n },\n\n d3_addEvents: function(cells, dispatcher){\n cells.on(\"mouseover.legend\", function (d) { d3_cellOver(dispatcher, d, this); })\n .on(\"mouseout.legend\", function (d) { d3_cellOut(dispatcher, d, this); })\n .on(\"click.legend\", function (d) { d3_cellClick(dispatcher, d, this); });\n },\n\n d3_title: (svg, title, classPrefix, titleWidth) => {\n if (title !== \"\"){\n\n const titleText = svg.selectAll('text.' + classPrefix + 'legendTitle');\n\n titleText.data([title])\n .enter()\n .append('text')\n .attr('class', classPrefix + 'legendTitle');\n\n svg.selectAll('text.' + classPrefix + 'legendTitle')\n .text(title)\n\n if (titleWidth){\n svg.selectAll('text.' + classPrefix + 'legendTitle')\n .call(d3_textWrapping, titleWidth)\n }\n\n const cellsSvg = svg.select('.' + classPrefix + 'legendCells')\n const yOffset = svg.select('.' + classPrefix + 'legendTitle').nodes()\n .map(d => d.getBBox().height)[0],\n\n xOffset = -cellsSvg.nodes().map(function(d) { return d.getBBox().x})[0];\n cellsSvg.attr('transform', 'translate(' + xOffset + ',' + (yOffset) + ')');\n\n }\n },\n\n d3_defaultLocale: {\n format,\n formatPrefix\n },\n\n d3_defaultFormatSpecifier: '.01f',\n\n d3_defaultDelimiter: 'to'\n}\n","import helper from \"./legend\"\nimport { dispatch } from \"d3-dispatch\"\nimport { scaleLinear } from \"d3-scale\"\nimport { formatLocale, formatSpecifier } from \"d3-format\"\n\nimport { sum } from \"d3-array\"\n\nexport default function color() {\n let scale = scaleLinear(),\n shape = \"rect\",\n shapeWidth = 15,\n shapeHeight = 15,\n shapeRadius = 10,\n shapePadding = 2,\n cells = [5],\n cellFilter,\n labels = [],\n classPrefix = \"\",\n useClass = false,\n title = \"\",\n locale = helper.d3_defaultLocale,\n specifier = helper.d3_defaultFormatSpecifier,\n labelOffset = 10,\n labelAlign = \"middle\",\n labelDelimiter = helper.d3_defaultDelimiter,\n labelWrap,\n orient = \"vertical\",\n ascending = false,\n path,\n titleWidth,\n legendDispatcher = dispatch(\"cellover\", \"cellout\", \"cellclick\")\n\n function legend(svg) {\n const type = helper.d3_calcType(\n scale,\n ascending,\n cells,\n labels,\n locale.format(specifier),\n labelDelimiter\n ),\n legendG = svg.selectAll(\"g\").data([scale])\n\n legendG\n .enter()\n .append(\"g\")\n .attr(\"class\", classPrefix + \"legendCells\")\n\n if (cellFilter) {\n helper.d3_filterCells(type, cellFilter)\n }\n\n let cell = svg\n .select(\".\" + classPrefix + \"legendCells\")\n .selectAll(\".\" + classPrefix + \"cell\")\n .data(type.data)\n\n const cellEnter = cell\n .enter()\n .append(\"g\")\n .attr(\"class\", classPrefix + \"cell\")\n cellEnter.append(shape).attr(\"class\", classPrefix + \"swatch\")\n\n let shapes = svg\n .selectAll(\"g.\" + classPrefix + \"cell \" + shape)\n .data(type.data)\n\n //add event handlers\n helper.d3_addEvents(cellEnter, legendDispatcher)\n\n cell\n .exit()\n .transition()\n .style(\"opacity\", 0)\n .remove()\n shapes\n .exit()\n .transition()\n .style(\"opacity\", 0)\n .remove()\n\n shapes = shapes.merge(shapes)\n\n helper.d3_drawShapes(\n shape,\n shapes,\n shapeHeight,\n shapeWidth,\n shapeRadius,\n path\n )\n const text = helper.d3_addText(\n svg,\n cellEnter,\n type.labels,\n classPrefix,\n labelWrap\n )\n\n // we need to merge the selection, otherwise changes in the legend (e.g. change of orientation) are applied only to the new cells and not the existing ones.\n cell = cellEnter.merge(cell)\n\n // sets placement\n const textSize = text.nodes().map(d => d.getBBox()),\n shapeSize = shapes.nodes().map(d => d.getBBox())\n //sets scale\n //everything is fill except for line which is stroke,\n if (!useClass) {\n if (shape == \"line\") {\n shapes.style(\"stroke\", type.feature)\n } else {\n shapes.style(\"fill\", type.feature)\n }\n } else {\n shapes.attr(\"class\", d => `${classPrefix}swatch ${type.feature(d)}`)\n }\n\n let cellTrans,\n textTrans,\n textAlign = labelAlign == \"start\" ? 0 : labelAlign == \"middle\" ? 0.5 : 1\n\n //positions cells and text\n if (orient === \"vertical\") {\n const cellSize = textSize.map((d, i) =>\n Math.max(d.height, shapeSize[i].height)\n )\n\n cellTrans = (d, i) => {\n const height = sum(cellSize.slice(0, i))\n return `translate(0, ${height + i * shapePadding})`\n }\n\n textTrans = (d, i) =>\n `translate( ${shapeSize[i].width +\n shapeSize[i].x +\n labelOffset}, ${shapeSize[i].y + shapeSize[i].height / 2 + 5})`\n } else if (orient === \"horizontal\") {\n cellTrans = (d, i) =>\n `translate(${i * (shapeSize[i].width + shapePadding)},0)`\n textTrans = (d, i) => `translate(${shapeSize[i].width * textAlign +\n shapeSize[i].x},\n ${shapeSize[i].height + shapeSize[i].y + labelOffset + 8})`\n }\n\n helper.d3_placement(orient, cell, cellTrans, text, textTrans, labelAlign)\n helper.d3_title(svg, title, classPrefix, titleWidth)\n\n cell.transition().style(\"opacity\", 1)\n }\n\n legend.scale = function(_) {\n if (!arguments.length) return scale\n scale = _\n return legend\n }\n\n legend.cells = function(_) {\n if (!arguments.length) return cells\n if (_.length > 1 || _ >= 2) {\n cells = _\n }\n return legend\n }\n\n legend.cellFilter = function(_) {\n if (!arguments.length) return cellFilter\n cellFilter = _\n return legend\n }\n\n legend.shape = function(_, d) {\n if (!arguments.length) return shape\n if (\n _ == \"rect\" ||\n _ == \"circle\" ||\n _ == \"line\" ||\n (_ == \"path\" && typeof d === \"string\")\n ) {\n shape = _\n path = d\n }\n return legend\n }\n\n legend.shapeWidth = function(_) {\n if (!arguments.length) return shapeWidth\n shapeWidth = +_\n return legend\n }\n\n legend.shapeHeight = function(_) {\n if (!arguments.length) return shapeHeight\n shapeHeight = +_\n return legend\n }\n\n legend.shapeRadius = function(_) {\n if (!arguments.length) return shapeRadius\n shapeRadius = +_\n return legend\n }\n\n legend.shapePadding = function(_) {\n if (!arguments.length) return shapePadding\n shapePadding = +_\n return legend\n }\n\n legend.labels = function(_) {\n if (!arguments.length) return labels\n labels = _\n return legend\n }\n\n legend.labelAlign = function(_) {\n if (!arguments.length) return labelAlign\n if (_ == \"start\" || _ == \"end\" || _ == \"middle\") {\n labelAlign = _\n }\n return legend\n }\n\n legend.locale = function(_) {\n if (!arguments.length) return locale\n locale = formatLocale(_)\n return legend\n }\n\n legend.labelFormat = function(_) {\n if (!arguments.length) return legend.locale().format(specifier)\n specifier = formatSpecifier(_)\n return legend\n }\n\n legend.labelOffset = function(_) {\n if (!arguments.length) return labelOffset\n labelOffset = +_\n return legend\n }\n\n legend.labelDelimiter = function(_) {\n if (!arguments.length) return labelDelimiter\n labelDelimiter = _\n return legend\n }\n\n legend.labelWrap = function(_) {\n if (!arguments.length) return labelWrap\n labelWrap = _\n return legend\n }\n\n legend.useClass = function(_) {\n if (!arguments.length) return useClass\n if (_ === true || _ === false) {\n useClass = _\n }\n return legend\n }\n\n legend.orient = function(_) {\n if (!arguments.length) return orient\n _ = _.toLowerCase()\n if (_ == \"horizontal\" || _ == \"vertical\") {\n orient = _\n }\n return legend\n }\n\n legend.ascending = function(_) {\n if (!arguments.length) return ascending\n ascending = !!_\n return legend\n }\n\n legend.classPrefix = function(_) {\n if (!arguments.length) return classPrefix\n classPrefix = _\n return legend\n }\n\n legend.title = function(_) {\n if (!arguments.length) return title\n title = _\n return legend\n }\n\n legend.titleWidth = function(_) {\n if (!arguments.length) return titleWidth\n titleWidth = _\n return legend\n }\n\n legend.textWrap = function(_) {\n if (!arguments.length) return textWrap\n textWrap = _\n return legend\n }\n\n legend.on = function() {\n const value = legendDispatcher.on.apply(legendDispatcher, arguments)\n return value === legendDispatcher ? legend : value\n }\n\n return legend\n}\n","import helper from \"./legend\"\nimport { dispatch } from \"d3-dispatch\"\nimport { scaleLinear } from \"d3-scale\"\nimport { formatLocale, formatSpecifier } from \"d3-format\"\nimport { sum, max } from \"d3-array\"\n\nexport default function size() {\n let scale = scaleLinear(),\n shape = \"rect\",\n shapeWidth = 15,\n shapePadding = 2,\n cells = [5],\n cellFilter,\n labels = [],\n classPrefix = \"\",\n title = \"\",\n locale = helper.d3_defaultLocale,\n specifier = helper.d3_defaultFormatSpecifier,\n labelOffset = 10,\n labelAlign = \"middle\",\n labelDelimiter = helper.d3_defaultDelimiter,\n labelWrap,\n orient = \"vertical\",\n ascending = false,\n path,\n titleWidth,\n legendDispatcher = dispatch(\"cellover\", \"cellout\", \"cellclick\")\n\n function legend(svg) {\n const type = helper.d3_calcType(\n scale,\n ascending,\n cells,\n labels,\n locale.format(specifier),\n labelDelimiter\n ),\n legendG = svg.selectAll(\"g\").data([scale])\n\n if (cellFilter) {\n helper.d3_filterCells(type, cellFilter)\n }\n\n legendG\n .enter()\n .append(\"g\")\n .attr(\"class\", classPrefix + \"legendCells\")\n\n let cell = svg\n .select(\".\" + classPrefix + \"legendCells\")\n .selectAll(\".\" + classPrefix + \"cell\")\n .data(type.data)\n const cellEnter = cell\n .enter()\n .append(\"g\")\n .attr(\"class\", classPrefix + \"cell\")\n cellEnter.append(shape).attr(\"class\", classPrefix + \"swatch\")\n\n let shapes = svg.selectAll(\"g.\" + classPrefix + \"cell \" + shape)\n\n //add event handlers\n helper.d3_addEvents(cellEnter, legendDispatcher)\n\n cell\n .exit()\n .transition()\n .style(\"opacity\", 0)\n .remove()\n\n shapes\n .exit()\n .transition()\n .style(\"opacity\", 0)\n .remove()\n shapes = shapes.merge(shapes)\n\n //creates shape\n if (shape === \"line\") {\n helper.d3_drawShapes(shape, shapes, 0, shapeWidth)\n shapes.attr(\"stroke-width\", type.feature)\n } else {\n helper.d3_drawShapes(\n shape,\n shapes,\n type.feature,\n type.feature,\n type.feature,\n path\n )\n }\n\n const text = helper.d3_addText(\n svg,\n cellEnter,\n type.labels,\n classPrefix,\n labelWrap\n )\n\n // we need to merge the selection, otherwise changes in the legend (e.g. change of orientation) are applied only to the new cells and not the existing ones.\n cell = cellEnter.merge(cell)\n\n //sets placement\n\n const textSize = text.nodes().map(d => d.getBBox()),\n shapeSize = shapes.nodes().map((d, i) => {\n const bbox = d.getBBox()\n const stroke = scale(type.data[i])\n\n if (shape === \"line\" && orient === \"horizontal\") {\n bbox.height = bbox.height + stroke\n } else if (shape === \"line\" && orient === \"vertical\") {\n bbox.width = bbox.width\n }\n return bbox\n })\n //console.log('SHAPESIZE')\n const maxH = max(shapeSize, d => d.height + d.y),\n maxW = max(shapeSize, d => d.width + d.x)\n\n let cellTrans,\n textTrans,\n textAlign = labelAlign == \"start\" ? 0 : labelAlign == \"middle\" ? 0.5 : 1\n\n //positions cells and text\n if (orient === \"vertical\") {\n const cellSize = textSize.map((d, i) =>\n Math.max(d.height, shapeSize[i].height)\n )\n const y =\n shape == \"circle\" || shape == \"line\" ? shapeSize[0].height / 2 : 0\n cellTrans = (d, i) => {\n const height = sum(cellSize.slice(0, i))\n\n return `translate(0, ${y + height + i * shapePadding})`\n }\n\n textTrans = (d, i) => `translate( ${maxW + labelOffset},\n ${shapeSize[i].y + shapeSize[i].height / 2 + 5})`\n } else if (orient === \"horizontal\") {\n cellTrans = (d, i) => {\n const width = sum(shapeSize.slice(0, i), d => d.width)\n const y = shape == \"circle\" || shape == \"line\" ? maxH / 2 : 0\n return `translate(${width + i * shapePadding}, ${y})`\n }\n\n const offset = shape == \"line\" ? maxH / 2 : maxH\n textTrans = (d, i) => {\n return `translate( ${shapeSize[i].width * textAlign + shapeSize[i].x},\n ${offset + labelOffset})`\n }\n }\n\n helper.d3_placement(orient, cell, cellTrans, text, textTrans, labelAlign)\n helper.d3_title(svg, title, classPrefix, titleWidth)\n\n cell.transition().style(\"opacity\", 1)\n }\n\n legend.scale = function(_) {\n if (!arguments.length) return scale\n scale = _\n return legend\n }\n\n legend.cells = function(_) {\n if (!arguments.length) return cells\n if (_.length > 1 || _ >= 2) {\n cells = _\n }\n return legend\n }\n\n legend.cellFilter = function(_) {\n if (!arguments.length) return cellFilter\n cellFilter = _\n return legend\n }\n\n legend.shape = function(_, d) {\n if (!arguments.length) return shape\n if (_ == \"rect\" || _ == \"circle\" || _ == \"line\") {\n shape = _\n path = d\n }\n return legend\n }\n\n legend.shapeWidth = function(_) {\n if (!arguments.length) return shapeWidth\n shapeWidth = +_\n return legend\n }\n\n legend.shapePadding = function(_) {\n if (!arguments.length) return shapePadding\n shapePadding = +_\n return legend\n }\n\n legend.labels = function(_) {\n if (!arguments.length) return labels\n labels = _\n return legend\n }\n\n legend.labelAlign = function(_) {\n if (!arguments.length) return labelAlign\n if (_ == \"start\" || _ == \"end\" || _ == \"middle\") {\n labelAlign = _\n }\n return legend\n }\n\n legend.locale = function(_) {\n if (!arguments.length) return locale\n locale = formatLocale(_)\n return legend\n }\n\n legend.labelFormat = function(_) {\n if (!arguments.length) return legend.locale().format(specifier)\n specifier = formatSpecifier(_)\n return legend\n }\n\n legend.labelOffset = function(_) {\n if (!arguments.length) return labelOffset\n labelOffset = +_\n return legend\n }\n\n legend.labelDelimiter = function(_) {\n if (!arguments.length) return labelDelimiter\n labelDelimiter = _\n return legend\n }\n\n legend.labelWrap = function(_) {\n if (!arguments.length) return labelWrap\n labelWrap = _\n return legend\n }\n\n legend.orient = function(_) {\n if (!arguments.length) return orient\n _ = _.toLowerCase()\n if (_ == \"horizontal\" || _ == \"vertical\") {\n orient = _\n }\n return legend\n }\n\n legend.ascending = function(_) {\n if (!arguments.length) return ascending\n ascending = !!_\n return legend\n }\n\n legend.classPrefix = function(_) {\n if (!arguments.length) return classPrefix\n classPrefix = _\n return legend\n }\n\n legend.title = function(_) {\n if (!arguments.length) return title\n title = _\n return legend\n }\n\n legend.titleWidth = function(_) {\n if (!arguments.length) return titleWidth\n titleWidth = _\n return legend\n }\n\n legend.on = function() {\n const value = legendDispatcher.on.apply(legendDispatcher, arguments)\n return value === legendDispatcher ? legend : value\n }\n\n return legend\n}\n","import helper from \"./legend\"\nimport { dispatch } from \"d3-dispatch\"\nimport { scaleLinear } from \"d3-scale\"\nimport { formatLocale, formatSpecifier } from \"d3-format\"\nimport { sum, max } from \"d3-array\"\n\nexport default function symbol() {\n let scale = scaleLinear(),\n shape = \"path\",\n shapeWidth = 15,\n shapeHeight = 15,\n shapeRadius = 10,\n shapePadding = 5,\n cells = [5],\n cellFilter,\n labels = [],\n classPrefix = \"\",\n title = \"\",\n locale = helper.d3_defaultLocale,\n specifier = helper.d3_defaultFormatSpecifier,\n labelAlign = \"middle\",\n labelOffset = 10,\n labelDelimiter = helper.d3_defaultDelimiter,\n labelWrap,\n orient = \"vertical\",\n ascending = false,\n titleWidth,\n legendDispatcher = dispatch(\"cellover\", \"cellout\", \"cellclick\")\n\n function legend(svg) {\n const type = helper.d3_calcType(\n scale,\n ascending,\n cells,\n labels,\n locale.format(specifier),\n labelDelimiter\n ),\n legendG = svg.selectAll(\"g\").data([scale])\n\n if (cellFilter) {\n helper.d3_filterCells(type, cellFilter)\n }\n\n legendG\n .enter()\n .append(\"g\")\n .attr(\"class\", classPrefix + \"legendCells\")\n\n let cell = svg\n .select(\".\" + classPrefix + \"legendCells\")\n .selectAll(\".\" + classPrefix + \"cell\")\n .data(type.data)\n const cellEnter = cell\n .enter()\n .append(\"g\")\n .attr(\"class\", classPrefix + \"cell\")\n cellEnter.append(shape).attr(\"class\", classPrefix + \"swatch\")\n\n let shapes = svg.selectAll(\"g.\" + classPrefix + \"cell \" + shape)\n\n //add event handlers\n helper.d3_addEvents(cellEnter, legendDispatcher)\n\n //remove old shapes\n cell\n .exit()\n .transition()\n .style(\"opacity\", 0)\n .remove()\n shapes\n .exit()\n .transition()\n .style(\"opacity\", 0)\n .remove()\n shapes = shapes.merge(shapes)\n\n helper.d3_drawShapes(\n shape,\n shapes,\n shapeHeight,\n shapeWidth,\n shapeRadius,\n type.feature\n )\n const text = helper.d3_addText(\n svg,\n cellEnter,\n type.labels,\n classPrefix,\n labelWrap\n )\n\n // we need to merge the selection, otherwise changes in the legend (e.g. change of orientation) are applied only to the new cells and not the existing ones.\n cell = cellEnter.merge(cell)\n\n // sets placement\n const textSize = text.nodes().map(d => d.getBBox()),\n shapeSize = shapes.nodes().map(d => d.getBBox())\n\n const maxH = max(shapeSize, d => d.height),\n maxW = max(shapeSize, d => d.width)\n\n let cellTrans,\n textTrans,\n textAlign = labelAlign == \"start\" ? 0 : labelAlign == \"middle\" ? 0.5 : 1\n\n //positions cells and text\n if (orient === \"vertical\") {\n const cellSize = textSize.map((d, i) => Math.max(maxH, d.height))\n\n cellTrans = (d, i) => {\n const height = sum(cellSize.slice(0, i))\n return `translate(0, ${height + i * shapePadding} )`\n }\n textTrans = (d, i) => `translate( ${maxW + labelOffset},\n ${shapeSize[i].y + shapeSize[i].height / 2 + 5})`\n } else if (orient === \"horizontal\") {\n cellTrans = (d, i) => `translate( ${i * (maxW + shapePadding)},0)`\n textTrans = (d, i) => `translate( ${shapeSize[i].width * textAlign +\n shapeSize[i].x},\n ${maxH + labelOffset})`\n }\n\n helper.d3_placement(orient, cell, cellTrans, text, textTrans, labelAlign)\n helper.d3_title(svg, title, classPrefix, titleWidth)\n cell.transition().style(\"opacity\", 1)\n }\n\n legend.scale = function(_) {\n if (!arguments.length) return scale\n scale = _\n return legend\n }\n\n legend.cells = function(_) {\n if (!arguments.length) return cells\n if (_.length > 1 || _ >= 2) {\n cells = _\n }\n return legend\n }\n\n legend.cellFilter = function(_) {\n if (!arguments.length) return cellFilter\n cellFilter = _\n return legend\n }\n\n legend.shapePadding = function(_) {\n if (!arguments.length) return shapePadding\n shapePadding = +_\n return legend\n }\n\n legend.labels = function(_) {\n if (!arguments.length) return labels\n labels = _\n return legend\n }\n\n legend.labelAlign = function(_) {\n if (!arguments.length) return labelAlign\n if (_ == \"start\" || _ == \"end\" || _ == \"middle\") {\n labelAlign = _\n }\n return legend\n }\n\n legend.locale = function(_) {\n if (!arguments.length) return locale\n locale = formatLocale(_)\n return legend\n }\n\n legend.labelFormat = function(_) {\n if (!arguments.length) return legend.locale().format(specifier)\n specifier = formatSpecifier(_)\n return legend\n }\n\n legend.labelOffset = function(_) {\n if (!arguments.length) return labelOffset\n labelOffset = +_\n return legend\n }\n\n legend.labelDelimiter = function(_) {\n if (!arguments.length) return labelDelimiter\n labelDelimiter = _\n return legend\n }\n\n legend.labelWrap = function(_) {\n if (!arguments.length) return labelWrap\n labelWrap = _\n return legend\n }\n\n legend.orient = function(_) {\n if (!arguments.length) return orient\n _ = _.toLowerCase()\n if (_ == \"horizontal\" || _ == \"vertical\") {\n orient = _\n }\n return legend\n }\n\n legend.ascending = function(_) {\n if (!arguments.length) return ascending\n ascending = !!_\n return legend\n }\n\n legend.classPrefix = function(_) {\n if (!arguments.length) return classPrefix\n classPrefix = _\n return legend\n }\n\n legend.title = function(_) {\n if (!arguments.length) return title\n title = _\n return legend\n }\n\n legend.titleWidth = function(_) {\n if (!arguments.length) return titleWidth\n titleWidth = _\n return legend\n }\n\n legend.on = function() {\n const value = legendDispatcher.on.apply(legendDispatcher, arguments)\n return value === legendDispatcher ? legend : value\n }\n\n return legend\n}\n","export const thresholdLabels = function({ i, genLength, generatedLabels }){\n\n if (i === 0 ){\n return generatedLabels[i].replace('NaN to', 'Less than')\n } else if (i === genLength - 1) {\n return `More than ${generatedLabels[genLength - 1].replace(' to NaN', '')}`\n }\n return generatedLabels[i]\n}\n\nexport default {\n thresholdLabels\n}\n","import legendColor from './src/color'\nimport legendSize from './src/size'\nimport legendSymbol from './src/symbol'\nimport legendHelpers from './src/helpers'\n\nexport { legendColor, legendSize, legendSymbol, legendHelpers }\n\nexport default {\n legendColor,\n legendSize,\n legendSymbol,\n legendHelpers\n};\n"],"names":["d3_identity","d","d3_reverse","arr","mirror","i","l","length","d3_textWrapping","text","width","each","select","words","split","reverse","word","line","lineNumber","lineHeight","attr","dy","parseFloat","tspan","append","pop","push","join","node","getComputedTextLength","d3_mergeLabels","gen","labels","domain","range","customLabels","genLength","d3_linearLegend","scale","cells","labelFormat","data","increment","map","d3_quantLegend","labelDelimiter","invert","invertExtent","d3_ordinalLegend","d3_cellOver","cellDispatcher","obj","call","d3_cellOut","d3_cellClick","shape","shapes","shapeHeight","shapeWidth","shapeRadius","path","svg","enter","classPrefix","labelWidth","selectAll","ascending","type","ticks","cellFilter","filterCells","label","filter","dataValues","labelValues","indexOf","orient","cell","cellTrans","textTrans","labelAlign","style","dispatcher","on","title","titleWidth","titleText","cellsSvg","yOffset","nodes","getBBox","height","xOffset","x","color","scaleLinear","shapePadding","useClass","locale","helper","d3_defaultLocale","specifier","d3_defaultFormatSpecifier","labelOffset","d3_defaultDelimiter","labelWrap","legendDispatcher","dispatch","legend","d3_calcType","format","legendG","d3_filterCells","cellEnter","d3_addEvents","exit","transition","remove","merge","d3_drawShapes","d3_addText","textSize","shapeSize","feature","textAlign","cellSize","Math","max","sum","slice","y","d3_placement","d3_title","_","arguments","formatLocale","formatSpecifier","toLowerCase","textWrap","value","apply","size","bbox","stroke","maxH","maxW","offset","symbol","thresholdLabels","generatedLabels","replace"],"mappings":";;;;;;;;;;;;AAGA,IAAMA,cAAe,SAAfA,WAAe,CAACC,CAAD;SAAOA,CAAP;CAArB;;AAEA,IAAMC,aAAa,SAAbA,UAAa,CAACC,GAAD,EAAS;MACpBC,SAAS,EAAf;OACK,IAAIC,IAAI,CAAR,EAAWC,IAAIH,IAAII,MAAxB,EAAgCF,IAAIC,CAApC,EAAuCD,GAAvC,EAA4C;WACnCA,CAAP,IAAYF,IAAIG,IAAED,CAAF,GAAI,CAAR,CAAZ;;SAEKD,MAAP;CALF;;;AASA,IAAMI,kBAAkB,SAAlBA,eAAkB,CAACC,IAAD,EAAOC,KAAP,EAAiB;OAClCC,IAAL,CAAU,YAAW;QACfF,OAAOG,mBAAO,IAAP,CAAX;QACIC,QAAQJ,KAAKA,IAAL,GAAYK,KAAZ,CAAkB,KAAlB,EAAyBC,OAAzB,EADZ;QAEIC,IAFJ;QAGIC,OAAO,EAHX;QAIIC,aAAa,CAJjB;QAKIC,aAAa,GALjB;;QAMQV,KAAKW,IAAL,CAAU,GAAV,CANR;QAOIC,KAAKC,WAAWb,KAAKW,IAAL,CAAU,IAAV,CAAX,KAA+B,CAPxC;QAQIG,QAAQd,KAAKA,IAAL,CAAU,IAAV,EACLe,MADK,CACE,OADF,EAELJ,IAFK,CAEA,GAFA,EAEK,CAFL,EAGLA,IAHK,CAGA,IAHA,EAGMC,KAAK,IAHX,CARZ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GAAsC+B,KAA7C;GAFF;;SAKO/B,MAAP;;;AC7OK,IAAMwC,kBAAkB,SAAlBA,eAAkB,OAA2C;MAAhC/I,CAAgC,QAAhCA,CAAgC;MAA7B+B,SAA6B,QAA7BA,SAA6B;MAAlBiH,eAAkB,QAAlBA,eAAkB;;;MAEpEhJ,MAAM,CAAV,EAAa;WACJgJ,gBAAgBhJ,CAAhB,EAAmBiJ,OAAnB,CAA2B,QAA3B,EAAqC,WAArC,CAAP;GADF,MAEO,IAAIjJ,MAAM+B,YAAY,CAAtB,EAAyB;0BACViH,gBAAgBjH,YAAY,CAA5B,EAA+BkH,OAA/B,CAAuC,SAAvC,EAAkD,EAAlD,CAApB;;SAEKD,gBAAgBhJ,CAAhB,CAAP;CAPK;;AAUP,oBAAe;;CAAf;;ACHA,YAAe;oBAAA;kBAAA;sBAAA;;CAAf;;;;;;;;;;"} \ No newline at end of file diff --git a/indexRollupNext.js b/indexRollupNext.js index 644642d..03ab1db 100644 --- a/indexRollupNext.js +++ b/indexRollupNext.js @@ -248,7 +248,6 @@ var helper = { }; function color() { - var scale = scaleLinear(), shape = "rect", shapeWidth = 15, @@ -274,17 +273,16 @@ function color() { legendDispatcher = dispatch("cellover", "cellout", "cellclick"); function legend(svg) { - var type = helper.d3_calcType(scale, ascending, cells, labels, locale.format(specifier), labelDelimiter), - legendG = svg.selectAll('g').data([scale]); + legendG = svg.selectAll("g").data([scale]); - legendG.enter().append('g').attr('class', classPrefix + 'legendCells'); + legendG.enter().append("g").attr("class", classPrefix + "legendCells"); if (cellFilter) { helper.d3_filterCells(type, cellFilter); } - var cell = svg.select('.' + classPrefix + 'legendCells').selectAll("." + classPrefix + "cell").data(type.data); + var cell = svg.select("." + classPrefix + "legendCells").selectAll("." + classPrefix + "cell").data(type.data); var cellEnter = cell.enter().append("g").attr("class", classPrefix + "cell"); cellEnter.append(shape).attr("class", classPrefix + "swatch"); @@ -300,14 +298,13 @@ function color() { shapes = shapes.merge(shapes); helper.d3_drawShapes(shape, shapes, shapeHeight, shapeWidth, shapeRadius, path); - helper.d3_addText(svg, cellEnter, type.labels, classPrefix, labelWrap); + var text = helper.d3_addText(svg, cellEnter, type.labels, classPrefix, labelWrap); // we need to merge the selection, otherwise changes in the legend (e.g. change of orientation) are applied only to the new cells and not the existing ones. cell = cellEnter.merge(cell); // sets placement - var text = cell.select("text"), - textSize = text.nodes().map(function (d) { + var textSize = text.nodes().map(function (d) { return d.getBBox(); }), shapeSize = shapes.nodes().map(function (d) { @@ -323,7 +320,7 @@ function color() { } } else { shapes.attr("class", function (d) { - return classPrefix + 'swatch ' + type.feature(d); + return classPrefix + "swatch " + type.feature(d); }); } @@ -333,24 +330,26 @@ function color() { //positions cells and text if (orient === "vertical") { - var cellSize = textSize.map(function (d, i) { - return Math.max(d.height, shapeSize[i].height); - }); + (function () { + var cellSize = textSize.map(function (d, i) { + return Math.max(d.height, shapeSize[i].height); + }); - cellTrans = function cellTrans(d, i) { - var height = sum(cellSize.slice(0, i)); - return 'translate(0, ' + (height + i * shapePadding) + ')'; - }; + cellTrans = function cellTrans(d, i) { + var height = sum(cellSize.slice(0, i)); + return "translate(0, " + (height + i * shapePadding) + ")"; + }; - textTrans = function textTrans(d, i) { - return 'translate( ' + (shapeSize[i].width + shapeSize[i].x + labelOffset) + ', ' + (shapeSize[i].y + shapeSize[i].height / 2 + 5) + ')'; - }; + textTrans = function textTrans(d, i) { + return "translate( " + (shapeSize[i].width + shapeSize[i].x + labelOffset) + ", " + (shapeSize[i].y + shapeSize[i].height / 2 + 5) + ")"; + }; + })(); } else if (orient === "horizontal") { cellTrans = function cellTrans(d, i) { - return 'translate(' + i * (shapeSize[i].width + shapePadding) + ',0)'; + return "translate(" + i * (shapeSize[i].width + shapePadding) + ",0)"; }; textTrans = function textTrans(d, i) { - return 'translate(' + (shapeSize[i].width * textAlign + shapeSize[i].x) + ',\n ' + (shapeSize[i].height + shapeSize[i].y + labelOffset + 8) + ')'; + return "translate(" + (shapeSize[i].width * textAlign + shapeSize[i].x) + ",\n " + (shapeSize[i].height + shapeSize[i].y + labelOffset + 8) + ")"; }; } @@ -382,7 +381,7 @@ function color() { legend.shape = function (_, d) { if (!arguments.length) return shape; - if (_ == "rect" || _ == "circle" || _ == "line" || _ == "path" && typeof d === 'string') { + if (_ == "rect" || _ == "circle" || _ == "line" || _ == "path" && typeof d === "string") { shape = _; path = d; } @@ -601,32 +600,36 @@ function size() { //positions cells and text if (orient === "vertical") { - var cellSize = textSize.map(function (d, i) { - return Math.max(d.height, shapeSize[i].height); - }); - var y = shape == "circle" || shape == "line" ? shapeSize[0].height / 2 : 0; - cellTrans = function cellTrans(d, i) { - var height = sum(cellSize.slice(0, i)); + (function () { + var cellSize = textSize.map(function (d, i) { + return Math.max(d.height, shapeSize[i].height); + }); + var y = shape == "circle" || shape == "line" ? shapeSize[0].height / 2 : 0; + cellTrans = function cellTrans(d, i) { + var height = sum(cellSize.slice(0, i)); - return "translate(0, " + (y + height + i * shapePadding) + ")"; - }; + return "translate(0, " + (y + height + i * shapePadding) + ")"; + }; - textTrans = function textTrans(d, i) { - return "translate( " + (maxW + labelOffset) + ",\n " + (shapeSize[i].y + shapeSize[i].height / 2 + 5) + ")"; - }; + textTrans = function textTrans(d, i) { + return "translate( " + (maxW + labelOffset) + ",\n " + (shapeSize[i].y + shapeSize[i].height / 2 + 5) + ")"; + }; + })(); } else if (orient === "horizontal") { - cellTrans = function cellTrans(d, i) { - var width = sum(shapeSize.slice(0, i), function (d) { - return d.width; - }); - var y = shape == "circle" || shape == "line" ? maxH / 2 : 0; - return "translate(" + (width + i * shapePadding) + ", " + y + ")"; - }; - - var offset = shape == "line" ? maxH / 2 : maxH; - textTrans = function textTrans(d, i) { - return "translate( " + (shapeSize[i].width * textAlign + shapeSize[i].x) + ",\n " + (offset + labelOffset) + ")"; - }; + (function () { + cellTrans = function cellTrans(d, i) { + var width = sum(shapeSize.slice(0, i), function (d) { + return d.width; + }); + var y = shape == "circle" || shape == "line" ? maxH / 2 : 0; + return "translate(" + (width + i * shapePadding) + ", " + y + ")"; + }; + + var offset = shape == "line" ? maxH / 2 : maxH; + textTrans = function textTrans(d, i) { + return "translate( " + (shapeSize[i].width * textAlign + shapeSize[i].x) + ",\n " + (offset + labelOffset) + ")"; + }; + })(); } helper.d3_placement(orient, cell, cellTrans, text, textTrans, labelAlign); @@ -809,14 +812,13 @@ function symbol() { shapes = shapes.merge(shapes); helper.d3_drawShapes(shape, shapes, shapeHeight, shapeWidth, shapeRadius, type.feature); - helper.d3_addText(svg, cellEnter, type.labels, classPrefix, labelWrap); + var text = helper.d3_addText(svg, cellEnter, type.labels, classPrefix, labelWrap); // we need to merge the selection, otherwise changes in the legend (e.g. change of orientation) are applied only to the new cells and not the existing ones. cell = cellEnter.merge(cell); // sets placement - var text = cell.select("text"), - textSize = text.nodes().map(function (d) { + var textSize = text.nodes().map(function (d) { return d.getBBox(); }), shapeSize = shapes.nodes().map(function (d) { @@ -836,17 +838,19 @@ function symbol() { //positions cells and text if (orient === "vertical") { - var cellSize = textSize.map(function (d, i) { - return Math.max(maxH, d.height); - }); + (function () { + var cellSize = textSize.map(function (d, i) { + return Math.max(maxH, d.height); + }); - cellTrans = function cellTrans(d, i) { - var height = sum(cellSize.slice(0, i)); - return "translate(0, " + (height + i * shapePadding) + " )"; - }; - textTrans = function textTrans(d, i) { - return "translate( " + (maxW + labelOffset) + ",\n " + (shapeSize[i].y + shapeSize[i].height / 2 + 5) + ")"; - }; + cellTrans = function cellTrans(d, i) { + var height = sum(cellSize.slice(0, i)); + return "translate(0, " + (height + i * shapePadding) + " )"; + }; + textTrans = function textTrans(d, i) { + return "translate( " + (maxW + labelOffset) + ",\n " + (shapeSize[i].y + shapeSize[i].height / 2 + 5) + ")"; + }; + })(); } else if (orient === "horizontal") { cellTrans = function cellTrans(d, i) { return "translate( " + i * (maxW + shapePadding) + ",0)"; @@ -997,6 +1001,5 @@ var index = { legendHelpers: legendHelpers }; -export { color as legendColor, size as legendSize, symbol as legendSymbol, legendHelpers }; -export default index; +export { color as legendColor, size as legendSize, symbol as legendSymbol, legendHelpers };export default index; //# sourceMappingURL=indexRollupNext.js.map diff --git a/indexRollupNext.js.map b/indexRollupNext.js.map index eadc3eb..67c0d3b 100644 --- a/indexRollupNext.js.map +++ b/indexRollupNext.js.map @@ -1 +1 @@ -{"version":3,"file":"indexRollupNext.js","sources":["src/legend.js","src/color.js","src/size.js","src/symbol.js","src/helpers.js","index.js"],"sourcesContent":["import { select } from 'd3-selection'\nimport { format, formatPrefix } from 'd3-format'\n\nconst d3_identity = (d) => d\n\nconst d3_reverse = (arr) => {\n const mirror = [];\n for (let i = 0, l = arr.length; i < l; i++) {\n mirror[i] = arr[l-i-1];\n }\n return mirror;\n}\n\n//Text wrapping code adapted from Mike Bostock\nconst d3_textWrapping = (text, width) => {\n text.each(function() {\n var text = select(this),\n words = text.text().split(/\\s+/).reverse(),\n word,\n line = [],\n lineNumber = 0,\n lineHeight = 1.2, //ems\n y = text.attr(\"y\"),\n dy = parseFloat(text.attr(\"dy\")) || 0,\n tspan = text.text(null)\n .append(\"tspan\")\n .attr(\"x\", 0)\n .attr(\"dy\", dy + \"em\");\n\n while (word = words.pop()) {\n line.push(word);\n tspan.text(line.join(\" \"));\n if (tspan.node().getComputedTextLength() > width && line.length > 1) {\n line.pop();\n tspan.text(line.join(\" \"));\n line = [word];\n tspan = text.append(\"tspan\")\n .attr(\"x\", 0)\n .attr(\"dy\", lineHeight + dy + \"em\").text(word);\n }\n }\n });\n}\n\n\nconst d3_mergeLabels = (gen=[], labels, domain, range) => {\n\n if (typeof labels === \"object\"){\n if(labels.length === 0) return gen;\n\n let i = labels.length;\n for (; i < gen.length; i++) {\n labels.push(gen[i]);\n }\n return labels;\n } else if (typeof labels === \"function\") {\n const customLabels = []\n const genLength = gen.length\n for (let i=0; i < genLength; i++){\n customLabels.push(labels({\n i,\n genLength,\n generatedLabels : gen,\n domain,\n range }))\n }\n return customLabels\n }\n\n return gen;\n }\n\nconst d3_linearLegend = (scale, cells, labelFormat) => {\n let data = [];\n\n if (cells.length > 1){\n data = cells;\n\n } else {\n const domain = scale.domain(),\n increment = (domain[domain.length - 1] - domain[0])/(cells - 1)\n let i = 0;\n\n for (; i < cells; i++){\n data.push(domain[0] + i*increment);\n }\n }\n\n const labels = data.map(labelFormat);\n return {data: data,\n labels: labels,\n feature: d => scale(d)};\n}\n\nconst d3_quantLegend = (scale, labelFormat, labelDelimiter) => {\n const labels = scale.range().map( d => {\n const invert = scale.invertExtent(d);\n return labelFormat(invert[0]) + \" \" + labelDelimiter + \" \" + labelFormat(invert[1]);\n });\n\n return {data: scale.range(),\n labels: labels,\n feature: d3_identity\n };\n}\n\nconst d3_ordinalLegend= scale => ({data: scale.domain(),\n labels: scale.domain(),\n feature: d => scale(d) }\n)\n\nconst d3_cellOver = (cellDispatcher, d, obj) => {\n cellDispatcher.call(\"cellover\", obj, d);\n}\n\nconst d3_cellOut = (cellDispatcher, d, obj) => {\n cellDispatcher.call(\"cellout\", obj, d);\n}\n\nconst d3_cellClick = (cellDispatcher, d, obj) => {\n cellDispatcher.call(\"cellclick\", obj, d);\n}\n\n\nexport default {\n\n d3_drawShapes: (shape, shapes, shapeHeight, shapeWidth, shapeRadius, path) => {\n if (shape === \"rect\"){\n shapes.attr(\"height\", shapeHeight)\n .attr(\"width\", shapeWidth);\n\n } else if (shape === \"circle\") {\n shapes.attr(\"r\", shapeRadius)\n\n } else if (shape === \"line\") {\n shapes.attr(\"x1\", 0).attr(\"x2\", shapeWidth).attr(\"y1\", 0).attr(\"y2\", 0);\n\n } else if (shape === \"path\") {\n shapes.attr(\"d\", path);\n }\n },\n\n d3_addText: function (svg, enter, labels, classPrefix, labelWidth){\n enter.append(\"text\").attr(\"class\", classPrefix + \"label\");\n const text = svg.selectAll(`g.${classPrefix}cell text.${classPrefix}label`)\n .data(labels)\n .text(d3_identity);\n\n if (labelWidth){\n svg.selectAll(`g.${classPrefix}cell text.${classPrefix}label`)\n .call(d3_textWrapping, labelWidth)\n }\n\n return text\n },\n\n d3_calcType: function (scale, ascending, cells, labels, labelFormat, labelDelimiter){\n const type = scale.invertExtent ?\n d3_quantLegend(scale, labelFormat, labelDelimiter) : scale.ticks ?\n d3_linearLegend(scale, cells, labelFormat) : d3_ordinalLegend(scale);\n\n //for d3.scaleSequential that doesn't have a range function\n const range = scale.range && scale.range() || scale.domain()\n type.labels = d3_mergeLabels(type.labels, labels, scale.domain(), range);\n\n if (ascending) {\n type.labels = d3_reverse(type.labels);\n type.data = d3_reverse(type.data);\n }\n\n return type;\n },\n\n d3_filterCells: (type, cellFilter) => {\n let filterCells = type.data.map((d, i) => ({ data: d, label: type.labels[i] }))\n .filter(cellFilter)\n const dataValues = filterCells.map(d => d.data)\n const labelValues = filterCells.map(d => d.label)\n type.data = type.data.filter(d => dataValues.indexOf(d) !== -1)\n type.labels = type.labels.filter(d => labelValues.indexOf(d) !== -1)\n return type\n },\n\n d3_placement: (orient, cell, cellTrans, text, textTrans, labelAlign) => {\n cell.attr(\"transform\", cellTrans);\n text.attr(\"transform\", textTrans);\n if (orient === \"horizontal\"){\n text.style(\"text-anchor\", labelAlign);\n }\n },\n\n d3_addEvents: function(cells, dispatcher){\n cells.on(\"mouseover.legend\", function (d) { d3_cellOver(dispatcher, d, this); })\n .on(\"mouseout.legend\", function (d) { d3_cellOut(dispatcher, d, this); })\n .on(\"click.legend\", function (d) { d3_cellClick(dispatcher, d, this); });\n },\n\n d3_title: (svg, title, classPrefix, titleWidth) => {\n if (title !== \"\"){\n\n const titleText = svg.selectAll('text.' + classPrefix + 'legendTitle');\n\n titleText.data([title])\n .enter()\n .append('text')\n .attr('class', classPrefix + 'legendTitle');\n\n svg.selectAll('text.' + classPrefix + 'legendTitle')\n .text(title)\n\n if (titleWidth){\n svg.selectAll('text.' + classPrefix + 'legendTitle')\n .call(d3_textWrapping, titleWidth)\n }\n\n const cellsSvg = svg.select('.' + classPrefix + 'legendCells')\n const yOffset = svg.select('.' + classPrefix + 'legendTitle').nodes()\n .map(d => d.getBBox().height)[0],\n\n xOffset = -cellsSvg.nodes().map(function(d) { return d.getBBox().x})[0];\n cellsSvg.attr('transform', 'translate(' + xOffset + ',' + (yOffset) + ')');\n\n }\n },\n\n d3_defaultLocale: {\n format,\n formatPrefix\n },\n\n d3_defaultFormatSpecifier: '.01f',\n\n d3_defaultDelimiter: 'to'\n}\n","import helper from './legend';\nimport { dispatch } from 'd3-dispatch';\nimport { scaleLinear } from 'd3-scale';\nimport { formatLocale, formatSpecifier } from 'd3-format';\n\nimport { sum } from 'd3-array';\n\nexport default function color(){\n\n let scale = scaleLinear(),\n shape = \"rect\",\n shapeWidth = 15,\n shapeHeight = 15,\n shapeRadius = 10,\n shapePadding = 2,\n cells = [5],\n cellFilter,\n labels = [],\n classPrefix = \"\",\n useClass = false,\n title = \"\",\n locale = helper.d3_defaultLocale,\n specifier = helper.d3_defaultFormatSpecifier,\n labelOffset = 10,\n labelAlign = \"middle\",\n labelDelimiter = helper.d3_defaultDelimiter,\n labelWrap,\n orient = \"vertical\",\n ascending = false,\n path,\n titleWidth,\n legendDispatcher = dispatch(\"cellover\", \"cellout\", \"cellclick\");\n\n function legend(svg) {\n\n const type = helper.d3_calcType(scale, ascending, cells, labels, locale.format(specifier), labelDelimiter),\n legendG = svg.selectAll('g').data([scale]);\n\n legendG.enter().append('g').attr('class', classPrefix + 'legendCells');\n\n if (cellFilter){\n helper.d3_filterCells(type, cellFilter)\n }\n\n let cell = svg.select('.' + classPrefix + 'legendCells')\n .selectAll(\".\" + classPrefix + \"cell\").data(type.data)\n\n const cellEnter = cell.enter().append(\"g\")\n .attr(\"class\", classPrefix + \"cell\")\n cellEnter.append(shape).attr(\"class\", classPrefix + \"swatch\")\n\n let shapes = svg.selectAll(\"g.\" + classPrefix + \"cell \" + shape).data(type.data);\n\n //add event handlers\n helper.d3_addEvents(cellEnter, legendDispatcher);\n\n cell.exit().transition().style(\"opacity\", 0).remove();\n shapes.exit().transition().style(\"opacity\", 0).remove();\n\n shapes = shapes.merge(shapes);\n\n helper.d3_drawShapes(shape, shapes, shapeHeight, shapeWidth, shapeRadius, path);\n helper.d3_addText( svg, cellEnter, type.labels, classPrefix, labelWrap)\n\n // we need to merge the selection, otherwise changes in the legend (e.g. change of orientation) are applied only to the new cells and not the existing ones.\n cell = cellEnter.merge(cell);\n\n // sets placement\n const text = cell.select(\"text\"),\n textSize = text.nodes().map(d => d.getBBox()),\n shapeSize = shapes.nodes().map( d => d.getBBox());\n //sets scale\n //everything is fill except for line which is stroke,\n if (!useClass){\n if (shape == \"line\"){\n shapes.style(\"stroke\", type.feature);\n } else {\n shapes.style(\"fill\", type.feature);\n }\n } else {\n shapes.attr(\"class\", d => `${classPrefix}swatch ${type.feature(d)}`);\n }\n\n let cellTrans,\n textTrans,\n textAlign = (labelAlign == \"start\") ? 0 : (labelAlign == \"middle\") ? 0.5 : 1;\n\n //positions cells and text\n if (orient === \"vertical\"){\n const cellSize = textSize.map((d, i) => Math.max(d.height, shapeSize[i].height))\n\n cellTrans = (d, i) => {\n const height = sum(cellSize.slice(0, i));\n return `translate(0, ${height + i*shapePadding})`}\n\n textTrans = (d,i) => `translate( ${(shapeSize[i].width + shapeSize[i].x +\n labelOffset)}, ${(shapeSize[i].y + shapeSize[i].height/2 + 5)})`;\n\n } else if (orient === \"horizontal\"){\n cellTrans = (d,i) => `translate(${(i * (shapeSize[i].width + shapePadding))},0)`\n textTrans = (d,i) => `translate(${(shapeSize[i].width*textAlign + shapeSize[i].x)},\n ${(shapeSize[i].height + shapeSize[i].y + labelOffset + 8)})`;\n }\n\n helper.d3_placement(orient, cell, cellTrans, text, textTrans, labelAlign);\n helper.d3_title(svg, title, classPrefix, titleWidth);\n\n cell.transition().style(\"opacity\", 1);\n\n }\n\n legend.scale = function(_) {\n if (!arguments.length) return scale;\n scale = _;\n return legend;\n };\n\n legend.cells = function(_) {\n if (!arguments.length) return cells;\n if (_.length > 1 || _ >= 2 ){\n cells = _;\n }\n return legend;\n };\n\n legend.cellFilter = function(_) {\n if (!arguments.length) return cellFilter;\n cellFilter = _;\n return legend;\n };\n\n legend.shape = function(_, d) {\n if (!arguments.length) return shape;\n if (_ == \"rect\" || _ == \"circle\" || _ == \"line\" || (_ == \"path\" && (typeof d === 'string')) ){\n shape = _;\n path = d;\n }\n return legend;\n };\n\n legend.shapeWidth = function(_) {\n if (!arguments.length) return shapeWidth;\n shapeWidth = +_;\n return legend;\n };\n\n legend.shapeHeight = function(_) {\n if (!arguments.length) return shapeHeight;\n shapeHeight = +_;\n return legend;\n };\n\n legend.shapeRadius = function(_) {\n if (!arguments.length) return shapeRadius;\n shapeRadius = +_;\n return legend;\n };\n\n legend.shapePadding = function(_) {\n if (!arguments.length) return shapePadding;\n shapePadding = +_;\n return legend;\n };\n\n legend.labels = function(_) {\n if (!arguments.length) return labels;\n labels = _;\n return legend;\n };\n\n legend.labelAlign = function(_) {\n if (!arguments.length) return labelAlign;\n if (_ == \"start\" || _ == \"end\" || _ == \"middle\") {\n labelAlign = _;\n }\n return legend;\n };\n\n legend.locale = function(_) {\n if (!arguments.length) return locale;\n locale = formatLocale(_)\n return legend\n };\n\n legend.labelFormat = function(_) {\n if (!arguments.length) return legend.locale().format(specifier);\n specifier = formatSpecifier(_)\n return legend;\n };\n\n legend.labelOffset = function(_) {\n if (!arguments.length) return labelOffset;\n labelOffset = +_;\n return legend;\n };\n\n legend.labelDelimiter = function(_) {\n if (!arguments.length) return labelDelimiter;\n labelDelimiter = _;\n return legend;\n };\n\n legend.labelWrap = function(_) {\n if (!arguments.length) return labelWrap;\n labelWrap = _;\n return legend;\n };\n\n legend.useClass = function(_) {\n if (!arguments.length) return useClass;\n if (_ === true || _ === false){\n useClass = _;\n }\n return legend;\n };\n\n legend.orient = function(_){\n if (!arguments.length) return orient;\n _ = _.toLowerCase();\n if (_ == \"horizontal\" || _ == \"vertical\") {\n orient = _;\n }\n return legend;\n };\n\n legend.ascending = function(_) {\n if (!arguments.length) return ascending;\n ascending = !!_;\n return legend;\n };\n\n legend.classPrefix = function(_) {\n if (!arguments.length) return classPrefix;\n classPrefix = _;\n return legend;\n };\n\n legend.title = function(_) {\n if (!arguments.length) return title;\n title = _;\n return legend;\n };\n\n legend.titleWidth = function(_) {\n if (!arguments.length) return titleWidth;\n titleWidth = _;\n return legend;\n };\n\n legend.textWrap = function(_) {\n if (!arguments.length) return textWrap;\n textWrap = _;\n return legend;\n }\n\n legend.on = function(){\n const value = legendDispatcher.on.apply(legendDispatcher, arguments)\n return value === legendDispatcher ? legend : value;\n }\n\n return legend;\n\n};\n","import helper from \"./legend\"\nimport { dispatch } from \"d3-dispatch\"\nimport { scaleLinear } from \"d3-scale\"\nimport { formatLocale, formatSpecifier } from \"d3-format\"\nimport { sum, max } from \"d3-array\"\n\nexport default function size() {\n let scale = scaleLinear(),\n shape = \"rect\",\n shapeWidth = 15,\n shapePadding = 2,\n cells = [5],\n cellFilter,\n labels = [],\n classPrefix = \"\",\n title = \"\",\n locale = helper.d3_defaultLocale,\n specifier = helper.d3_defaultFormatSpecifier,\n labelOffset = 10,\n labelAlign = \"middle\",\n labelDelimiter = helper.d3_defaultDelimiter,\n labelWrap,\n orient = \"vertical\",\n ascending = false,\n path,\n titleWidth,\n legendDispatcher = dispatch(\"cellover\", \"cellout\", \"cellclick\")\n\n function legend(svg) {\n const type = helper.d3_calcType(\n scale,\n ascending,\n cells,\n labels,\n locale.format(specifier),\n labelDelimiter\n ),\n legendG = svg.selectAll(\"g\").data([scale])\n\n if (cellFilter) {\n helper.d3_filterCells(type, cellFilter)\n }\n\n legendG\n .enter()\n .append(\"g\")\n .attr(\"class\", classPrefix + \"legendCells\")\n\n let cell = svg\n .select(\".\" + classPrefix + \"legendCells\")\n .selectAll(\".\" + classPrefix + \"cell\")\n .data(type.data)\n const cellEnter = cell\n .enter()\n .append(\"g\")\n .attr(\"class\", classPrefix + \"cell\")\n cellEnter.append(shape).attr(\"class\", classPrefix + \"swatch\")\n\n let shapes = svg.selectAll(\"g.\" + classPrefix + \"cell \" + shape)\n\n //add event handlers\n helper.d3_addEvents(cellEnter, legendDispatcher)\n\n cell\n .exit()\n .transition()\n .style(\"opacity\", 0)\n .remove()\n\n shapes\n .exit()\n .transition()\n .style(\"opacity\", 0)\n .remove()\n shapes = shapes.merge(shapes)\n\n //creates shape\n if (shape === \"line\") {\n helper.d3_drawShapes(shape, shapes, 0, shapeWidth)\n shapes.attr(\"stroke-width\", type.feature)\n } else {\n helper.d3_drawShapes(\n shape,\n shapes,\n type.feature,\n type.feature,\n type.feature,\n path\n )\n }\n\n const text = helper.d3_addText(\n svg,\n cellEnter,\n type.labels,\n classPrefix,\n labelWrap\n )\n\n // we need to merge the selection, otherwise changes in the legend (e.g. change of orientation) are applied only to the new cells and not the existing ones.\n cell = cellEnter.merge(cell)\n\n //sets placement\n\n const textSize = text.nodes().map(d => d.getBBox()),\n shapeSize = shapes.nodes().map((d, i) => {\n const bbox = d.getBBox()\n const stroke = scale(type.data[i])\n\n if (shape === \"line\" && orient === \"horizontal\") {\n bbox.height = bbox.height + stroke\n } else if (shape === \"line\" && orient === \"vertical\") {\n bbox.width = bbox.width\n }\n return bbox\n })\n //console.log('SHAPESIZE')\n const maxH = max(shapeSize, d => d.height + d.y),\n maxW = max(shapeSize, d => d.width + d.x)\n\n let cellTrans,\n textTrans,\n textAlign = labelAlign == \"start\" ? 0 : labelAlign == \"middle\" ? 0.5 : 1\n\n //positions cells and text\n if (orient === \"vertical\") {\n const cellSize = textSize.map((d, i) =>\n Math.max(d.height, shapeSize[i].height)\n )\n const y =\n shape == \"circle\" || shape == \"line\" ? shapeSize[0].height / 2 : 0\n cellTrans = (d, i) => {\n const height = sum(cellSize.slice(0, i))\n\n return `translate(0, ${y + height + i * shapePadding})`\n }\n\n textTrans = (d, i) => `translate( ${maxW + labelOffset},\n ${shapeSize[i].y + shapeSize[i].height / 2 + 5})`\n } else if (orient === \"horizontal\") {\n cellTrans = (d, i) => {\n const width = sum(shapeSize.slice(0, i), d => d.width)\n const y = shape == \"circle\" || shape == \"line\" ? maxH / 2 : 0\n return `translate(${width + i * shapePadding}, ${y})`\n }\n\n const offset = shape == \"line\" ? maxH / 2 : maxH\n textTrans = (d, i) => {\n return `translate( ${shapeSize[i].width * textAlign + shapeSize[i].x},\n ${offset + labelOffset})`\n }\n }\n\n helper.d3_placement(orient, cell, cellTrans, text, textTrans, labelAlign)\n helper.d3_title(svg, title, classPrefix, titleWidth)\n\n cell.transition().style(\"opacity\", 1)\n }\n\n legend.scale = function(_) {\n if (!arguments.length) return scale\n scale = _\n return legend\n }\n\n legend.cells = function(_) {\n if (!arguments.length) return cells\n if (_.length > 1 || _ >= 2) {\n cells = _\n }\n return legend\n }\n\n legend.cellFilter = function(_) {\n if (!arguments.length) return cellFilter\n cellFilter = _\n return legend\n }\n\n legend.shape = function(_, d) {\n if (!arguments.length) return shape\n if (_ == \"rect\" || _ == \"circle\" || _ == \"line\") {\n shape = _\n path = d\n }\n return legend\n }\n\n legend.shapeWidth = function(_) {\n if (!arguments.length) return shapeWidth\n shapeWidth = +_\n return legend\n }\n\n legend.shapePadding = function(_) {\n if (!arguments.length) return shapePadding\n shapePadding = +_\n return legend\n }\n\n legend.labels = function(_) {\n if (!arguments.length) return labels\n labels = _\n return legend\n }\n\n legend.labelAlign = function(_) {\n if (!arguments.length) return labelAlign\n if (_ == \"start\" || _ == \"end\" || _ == \"middle\") {\n labelAlign = _\n }\n return legend\n }\n\n legend.locale = function(_) {\n if (!arguments.length) return locale\n locale = formatLocale(_)\n return legend\n }\n\n legend.labelFormat = function(_) {\n if (!arguments.length) return legend.locale().format(specifier)\n specifier = formatSpecifier(_)\n return legend\n }\n\n legend.labelOffset = function(_) {\n if (!arguments.length) return labelOffset\n labelOffset = +_\n return legend\n }\n\n legend.labelDelimiter = function(_) {\n if (!arguments.length) return labelDelimiter\n labelDelimiter = _\n return legend\n }\n\n legend.labelWrap = function(_) {\n if (!arguments.length) return labelWrap\n labelWrap = _\n return legend\n }\n\n legend.orient = function(_) {\n if (!arguments.length) return orient\n _ = _.toLowerCase()\n if (_ == \"horizontal\" || _ == \"vertical\") {\n orient = _\n }\n return legend\n }\n\n legend.ascending = function(_) {\n if (!arguments.length) return ascending\n ascending = !!_\n return legend\n }\n\n legend.classPrefix = function(_) {\n if (!arguments.length) return classPrefix\n classPrefix = _\n return legend\n }\n\n legend.title = function(_) {\n if (!arguments.length) return title\n title = _\n return legend\n }\n\n legend.titleWidth = function(_) {\n if (!arguments.length) return titleWidth\n titleWidth = _\n return legend\n }\n\n legend.on = function() {\n const value = legendDispatcher.on.apply(legendDispatcher, arguments)\n return value === legendDispatcher ? legend : value\n }\n\n return legend\n}\n","import helper from \"./legend\"\nimport { dispatch } from \"d3-dispatch\"\nimport { scaleLinear } from \"d3-scale\"\nimport { formatLocale, formatSpecifier } from \"d3-format\"\nimport { sum, max } from \"d3-array\"\n\nexport default function symbol() {\n let scale = scaleLinear(),\n shape = \"path\",\n shapeWidth = 15,\n shapeHeight = 15,\n shapeRadius = 10,\n shapePadding = 5,\n cells = [5],\n cellFilter,\n labels = [],\n classPrefix = \"\",\n title = \"\",\n locale = helper.d3_defaultLocale,\n specifier = helper.d3_defaultFormatSpecifier,\n labelAlign = \"middle\",\n labelOffset = 10,\n labelDelimiter = helper.d3_defaultDelimiter,\n labelWrap,\n orient = \"vertical\",\n ascending = false,\n titleWidth,\n legendDispatcher = dispatch(\"cellover\", \"cellout\", \"cellclick\")\n\n function legend(svg) {\n const type = helper.d3_calcType(\n scale,\n ascending,\n cells,\n labels,\n locale.format(specifier),\n labelDelimiter\n ),\n legendG = svg.selectAll(\"g\").data([scale])\n\n if (cellFilter) {\n helper.d3_filterCells(type, cellFilter)\n }\n\n legendG\n .enter()\n .append(\"g\")\n .attr(\"class\", classPrefix + \"legendCells\")\n\n let cell = svg\n .select(\".\" + classPrefix + \"legendCells\")\n .selectAll(\".\" + classPrefix + \"cell\")\n .data(type.data)\n const cellEnter = cell\n .enter()\n .append(\"g\")\n .attr(\"class\", classPrefix + \"cell\")\n cellEnter.append(shape).attr(\"class\", classPrefix + \"swatch\")\n\n let shapes = svg.selectAll(\"g.\" + classPrefix + \"cell \" + shape)\n\n //add event handlers\n helper.d3_addEvents(cellEnter, legendDispatcher)\n\n //remove old shapes\n cell\n .exit()\n .transition()\n .style(\"opacity\", 0)\n .remove()\n shapes\n .exit()\n .transition()\n .style(\"opacity\", 0)\n .remove()\n shapes = shapes.merge(shapes)\n\n helper.d3_drawShapes(\n shape,\n shapes,\n shapeHeight,\n shapeWidth,\n shapeRadius,\n type.feature\n )\n helper.d3_addText(svg, cellEnter, type.labels, classPrefix, labelWrap)\n\n // we need to merge the selection, otherwise changes in the legend (e.g. change of orientation) are applied only to the new cells and not the existing ones.\n cell = cellEnter.merge(cell)\n\n // sets placement\n const text = cell.select(\"text\"),\n textSize = text.nodes().map(d => d.getBBox()),\n shapeSize = shapes.nodes().map(d => d.getBBox())\n\n const maxH = max(shapeSize, d => d.height),\n maxW = max(shapeSize, d => d.width)\n\n let cellTrans,\n textTrans,\n textAlign = labelAlign == \"start\" ? 0 : labelAlign == \"middle\" ? 0.5 : 1\n\n //positions cells and text\n if (orient === \"vertical\") {\n const cellSize = textSize.map((d, i) => Math.max(maxH, d.height))\n\n cellTrans = (d, i) => {\n const height = sum(cellSize.slice(0, i))\n return `translate(0, ${height + i * shapePadding} )`\n }\n textTrans = (d, i) => `translate( ${maxW + labelOffset},\n ${shapeSize[i].y + shapeSize[i].height / 2 + 5})`\n } else if (orient === \"horizontal\") {\n cellTrans = (d, i) => `translate( ${i * (maxW + shapePadding)},0)`\n textTrans = (d, i) => `translate( ${shapeSize[i].width * textAlign +\n shapeSize[i].x},\n ${maxH + labelOffset})`\n }\n\n helper.d3_placement(orient, cell, cellTrans, text, textTrans, labelAlign)\n helper.d3_title(svg, title, classPrefix, titleWidth)\n cell.transition().style(\"opacity\", 1)\n }\n\n legend.scale = function(_) {\n if (!arguments.length) return scale\n scale = _\n return legend\n }\n\n legend.cells = function(_) {\n if (!arguments.length) return cells\n if (_.length > 1 || _ >= 2) {\n cells = _\n }\n return legend\n }\n\n legend.cellFilter = function(_) {\n if (!arguments.length) return cellFilter\n cellFilter = _\n return legend\n }\n\n legend.shapePadding = function(_) {\n if (!arguments.length) return shapePadding\n shapePadding = +_\n return legend\n }\n\n legend.labels = function(_) {\n if (!arguments.length) return labels\n labels = _\n return legend\n }\n\n legend.labelAlign = function(_) {\n if (!arguments.length) return labelAlign\n if (_ == \"start\" || _ == \"end\" || _ == \"middle\") {\n labelAlign = _\n }\n return legend\n }\n\n legend.locale = function(_) {\n if (!arguments.length) return locale\n locale = formatLocale(_)\n return legend\n }\n\n legend.labelFormat = function(_) {\n if (!arguments.length) return legend.locale().format(specifier)\n specifier = formatSpecifier(_)\n return legend\n }\n\n legend.labelOffset = function(_) {\n if (!arguments.length) return labelOffset\n labelOffset = +_\n return legend\n }\n\n legend.labelDelimiter = function(_) {\n if (!arguments.length) return labelDelimiter\n labelDelimiter = _\n return legend\n }\n\n legend.labelWrap = function(_) {\n if (!arguments.length) return labelWrap\n labelWrap = _\n return legend\n }\n\n legend.orient = function(_) {\n if (!arguments.length) return orient\n _ = _.toLowerCase()\n if (_ == \"horizontal\" || _ == \"vertical\") {\n orient = _\n }\n return legend\n }\n\n legend.ascending = function(_) {\n if (!arguments.length) return ascending\n ascending = !!_\n return legend\n }\n\n legend.classPrefix = function(_) {\n if (!arguments.length) return classPrefix\n classPrefix = _\n return legend\n }\n\n legend.title = function(_) {\n if (!arguments.length) return title\n title = _\n return legend\n }\n\n legend.titleWidth = function(_) {\n if (!arguments.length) return titleWidth\n titleWidth = _\n return legend\n }\n\n legend.on = function() {\n const value = legendDispatcher.on.apply(legendDispatcher, arguments)\n return value === legendDispatcher ? legend : value\n }\n\n return legend\n}\n","export const thresholdLabels = function({ i, genLength, generatedLabels }){\n\n if (i === 0 ){\n return generatedLabels[i].replace('NaN to', 'Less than')\n } else if (i === genLength - 1) {\n return `More than ${generatedLabels[genLength - 1].replace(' to NaN', '')}`\n }\n return generatedLabels[i]\n}\n\nexport default {\n thresholdLabels\n}\n","import legendColor from './src/color'\nimport legendSize from './src/size'\nimport legendSymbol from './src/symbol'\nimport legendHelpers from './src/helpers'\n\nexport { legendColor, legendSize, legendSymbol, legendHelpers }\n\nexport default {\n legendColor,\n legendSize,\n legendSymbol,\n legendHelpers\n};\n"],"names":["d3_identity","d","d3_reverse","arr","mirror","i","l","length","d3_textWrapping","text","width","each","select","words","split","reverse","word","line","lineNumber","lineHeight","attr","dy","parseFloat","tspan","append","pop","push","join","node","getComputedTextLength","d3_mergeLabels","gen","labels","domain","range","customLabels","genLength","d3_linearLegend","scale","cells","labelFormat","data","increment","map","d3_quantLegend","labelDelimiter","invert","invertExtent","d3_ordinalLegend","d3_cellOver","cellDispatcher","obj","call","d3_cellOut","d3_cellClick","shape","shapes","shapeHeight","shapeWidth","shapeRadius","path","svg","enter","classPrefix","labelWidth","selectAll","ascending","type","ticks","cellFilter","filterCells","label","filter","dataValues","labelValues","indexOf","orient","cell","cellTrans","textTrans","labelAlign","style","dispatcher","on","title","titleWidth","titleText","cellsSvg","yOffset","nodes","getBBox","height","xOffset","x","color","scaleLinear","shapePadding","useClass","locale","helper","d3_defaultLocale","specifier","d3_defaultFormatSpecifier","labelOffset","d3_defaultDelimiter","labelWrap","legendDispatcher","dispatch","legend","d3_calcType","format","legendG","d3_filterCells","cellEnter","d3_addEvents","exit","transition","remove","merge","d3_drawShapes","d3_addText","textSize","shapeSize","feature","textAlign","cellSize","Math","max","sum","slice","y","d3_placement","d3_title","_","arguments","formatLocale","formatSpecifier","toLowerCase","textWrap","value","apply","size","bbox","stroke","maxH","maxW","offset","symbol","thresholdLabels","generatedLabels","replace"],"mappings":";;;;;;;;;;;;AAGA,IAAMA,cAAe,SAAfA,WAAe,CAACC,CAAD;SAAOA,CAAP;CAArB;;AAEA,IAAMC,aAAa,SAAbA,UAAa,CAACC,GAAD,EAAS;MACpBC,SAAS,EAAf;OACK,IAAIC,IAAI,CAAR,EA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,EAAlD,CAApB;;SAEKD,gBAAgBhJ,CAAhB,CAAP;CAPK;;AAUP,oBAAe;;CAAf;;ACHA,YAAe;oBAAA;kBAAA;sBAAA;;CAAf;;;;;"} \ No newline at end of file +{"version":3,"file":"indexRollupNext.js","sources":["src/legend.js","src/color.js","src/size.js","src/symbol.js","src/helpers.js","index.js"],"sourcesContent":["import { select } from 'd3-selection'\nimport { format, formatPrefix } from 'd3-format'\n\nconst d3_identity = (d) => d\n\nconst d3_reverse = (arr) => {\n const mirror = [];\n for (let i = 0, l = arr.length; i < l; i++) {\n mirror[i] = arr[l-i-1];\n }\n return mirror;\n}\n\n//Text wrapping code adapted from Mike Bostock\nconst d3_textWrapping = (text, width) => {\n text.each(function() {\n var text = select(this),\n words = text.text().split(/\\s+/).reverse(),\n word,\n line = [],\n lineNumber = 0,\n lineHeight = 1.2, //ems\n y = text.attr(\"y\"),\n dy = parseFloat(text.attr(\"dy\")) || 0,\n tspan = text.text(null)\n .append(\"tspan\")\n .attr(\"x\", 0)\n .attr(\"dy\", dy + \"em\");\n\n while (word = words.pop()) {\n line.push(word);\n tspan.text(line.join(\" \"));\n if (tspan.node().getComputedTextLength() > width && line.length > 1) {\n line.pop();\n tspan.text(line.join(\" \"));\n line = [word];\n tspan = text.append(\"tspan\")\n .attr(\"x\", 0)\n .attr(\"dy\", lineHeight + dy + \"em\").text(word);\n }\n }\n });\n}\n\n\nconst d3_mergeLabels = (gen=[], labels, domain, range) => {\n\n if (typeof labels === \"object\"){\n if(labels.length === 0) return gen;\n\n let i = labels.length;\n for (; i < gen.length; i++) {\n labels.push(gen[i]);\n }\n return labels;\n } else if (typeof labels === \"function\") {\n const customLabels = []\n const genLength = gen.length\n for (let i=0; i < genLength; i++){\n customLabels.push(labels({\n i,\n genLength,\n generatedLabels : gen,\n domain,\n range }))\n }\n return customLabels\n }\n\n return gen;\n }\n\nconst d3_linearLegend = (scale, cells, labelFormat) => {\n let data = [];\n\n if (cells.length > 1){\n data = cells;\n\n } else {\n const domain = scale.domain(),\n increment = (domain[domain.length - 1] - domain[0])/(cells - 1)\n let i = 0;\n\n for (; i < cells; i++){\n data.push(domain[0] + i*increment);\n }\n }\n\n const labels = data.map(labelFormat);\n return {data: data,\n labels: labels,\n feature: d => scale(d)};\n}\n\nconst d3_quantLegend = (scale, labelFormat, labelDelimiter) => {\n const labels = scale.range().map( d => {\n const invert = scale.invertExtent(d);\n return labelFormat(invert[0]) + \" \" + labelDelimiter + \" \" + labelFormat(invert[1]);\n });\n\n return {data: scale.range(),\n labels: labels,\n feature: d3_identity\n };\n}\n\nconst d3_ordinalLegend= scale => ({data: scale.domain(),\n labels: scale.domain(),\n feature: d => scale(d) }\n)\n\nconst d3_cellOver = (cellDispatcher, d, obj) => {\n cellDispatcher.call(\"cellover\", obj, d);\n}\n\nconst d3_cellOut = (cellDispatcher, d, obj) => {\n cellDispatcher.call(\"cellout\", obj, d);\n}\n\nconst d3_cellClick = (cellDispatcher, d, obj) => {\n cellDispatcher.call(\"cellclick\", obj, d);\n}\n\n\nexport default {\n\n d3_drawShapes: (shape, shapes, shapeHeight, shapeWidth, shapeRadius, path) => {\n if (shape === \"rect\"){\n shapes.attr(\"height\", shapeHeight)\n .attr(\"width\", shapeWidth);\n\n } else if (shape === \"circle\") {\n shapes.attr(\"r\", shapeRadius)\n\n } else if (shape === \"line\") {\n shapes.attr(\"x1\", 0).attr(\"x2\", shapeWidth).attr(\"y1\", 0).attr(\"y2\", 0);\n\n } else if (shape === \"path\") {\n shapes.attr(\"d\", path);\n }\n },\n\n d3_addText: function (svg, enter, labels, classPrefix, labelWidth){\n enter.append(\"text\").attr(\"class\", classPrefix + \"label\");\n const text = svg.selectAll(`g.${classPrefix}cell text.${classPrefix}label`)\n .data(labels)\n .text(d3_identity);\n\n if (labelWidth){\n svg.selectAll(`g.${classPrefix}cell text.${classPrefix}label`)\n .call(d3_textWrapping, labelWidth)\n }\n\n return text\n },\n\n d3_calcType: function (scale, ascending, cells, labels, labelFormat, labelDelimiter){\n const type = scale.invertExtent ?\n d3_quantLegend(scale, labelFormat, labelDelimiter) : scale.ticks ?\n d3_linearLegend(scale, cells, labelFormat) : d3_ordinalLegend(scale);\n\n //for d3.scaleSequential that doesn't have a range function\n const range = scale.range && scale.range() || scale.domain()\n type.labels = d3_mergeLabels(type.labels, labels, scale.domain(), range);\n\n if (ascending) {\n type.labels = d3_reverse(type.labels);\n type.data = d3_reverse(type.data);\n }\n\n return type;\n },\n\n d3_filterCells: (type, cellFilter) => {\n let filterCells = type.data.map((d, i) => ({ data: d, label: type.labels[i] }))\n .filter(cellFilter)\n const dataValues = filterCells.map(d => d.data)\n const labelValues = filterCells.map(d => d.label)\n type.data = type.data.filter(d => dataValues.indexOf(d) !== -1)\n type.labels = type.labels.filter(d => labelValues.indexOf(d) !== -1)\n return type\n },\n\n d3_placement: (orient, cell, cellTrans, text, textTrans, labelAlign) => {\n cell.attr(\"transform\", cellTrans);\n text.attr(\"transform\", textTrans);\n if (orient === \"horizontal\"){\n text.style(\"text-anchor\", labelAlign);\n }\n },\n\n d3_addEvents: function(cells, dispatcher){\n cells.on(\"mouseover.legend\", function (d) { d3_cellOver(dispatcher, d, this); })\n .on(\"mouseout.legend\", function (d) { d3_cellOut(dispatcher, d, this); })\n .on(\"click.legend\", function (d) { d3_cellClick(dispatcher, d, this); });\n },\n\n d3_title: (svg, title, classPrefix, titleWidth) => {\n if (title !== \"\"){\n\n const titleText = svg.selectAll('text.' + classPrefix + 'legendTitle');\n\n titleText.data([title])\n .enter()\n .append('text')\n .attr('class', classPrefix + 'legendTitle');\n\n svg.selectAll('text.' + classPrefix + 'legendTitle')\n .text(title)\n\n if (titleWidth){\n svg.selectAll('text.' + classPrefix + 'legendTitle')\n .call(d3_textWrapping, titleWidth)\n }\n\n const cellsSvg = svg.select('.' + classPrefix + 'legendCells')\n const yOffset = svg.select('.' + classPrefix + 'legendTitle').nodes()\n .map(d => d.getBBox().height)[0],\n\n xOffset = -cellsSvg.nodes().map(function(d) { return d.getBBox().x})[0];\n cellsSvg.attr('transform', 'translate(' + xOffset + ',' + (yOffset) + ')');\n\n }\n },\n\n d3_defaultLocale: {\n format,\n formatPrefix\n },\n\n d3_defaultFormatSpecifier: '.01f',\n\n d3_defaultDelimiter: 'to'\n}\n","import helper from \"./legend\"\nimport { dispatch } from \"d3-dispatch\"\nimport { scaleLinear } from \"d3-scale\"\nimport { formatLocale, formatSpecifier } from \"d3-format\"\n\nimport { sum } from \"d3-array\"\n\nexport default function color() {\n let scale = scaleLinear(),\n shape = \"rect\",\n shapeWidth = 15,\n shapeHeight = 15,\n shapeRadius = 10,\n shapePadding = 2,\n cells = [5],\n cellFilter,\n labels = [],\n classPrefix = \"\",\n useClass = false,\n title = \"\",\n locale = helper.d3_defaultLocale,\n specifier = helper.d3_defaultFormatSpecifier,\n labelOffset = 10,\n labelAlign = \"middle\",\n labelDelimiter = helper.d3_defaultDelimiter,\n labelWrap,\n orient = \"vertical\",\n ascending = false,\n path,\n titleWidth,\n legendDispatcher = dispatch(\"cellover\", \"cellout\", \"cellclick\")\n\n function legend(svg) {\n const type = helper.d3_calcType(\n scale,\n ascending,\n cells,\n labels,\n locale.format(specifier),\n labelDelimiter\n ),\n legendG = svg.selectAll(\"g\").data([scale])\n\n legendG\n .enter()\n .append(\"g\")\n .attr(\"class\", classPrefix + \"legendCells\")\n\n if (cellFilter) {\n helper.d3_filterCells(type, cellFilter)\n }\n\n let cell = svg\n .select(\".\" + classPrefix + \"legendCells\")\n .selectAll(\".\" + classPrefix + \"cell\")\n .data(type.data)\n\n const cellEnter = cell\n .enter()\n .append(\"g\")\n .attr(\"class\", classPrefix + \"cell\")\n cellEnter.append(shape).attr(\"class\", classPrefix + \"swatch\")\n\n let shapes = svg\n .selectAll(\"g.\" + classPrefix + \"cell \" + shape)\n .data(type.data)\n\n //add event handlers\n helper.d3_addEvents(cellEnter, legendDispatcher)\n\n cell\n .exit()\n .transition()\n .style(\"opacity\", 0)\n .remove()\n shapes\n .exit()\n .transition()\n .style(\"opacity\", 0)\n .remove()\n\n shapes = shapes.merge(shapes)\n\n helper.d3_drawShapes(\n shape,\n shapes,\n shapeHeight,\n shapeWidth,\n shapeRadius,\n path\n )\n const text = helper.d3_addText(\n svg,\n cellEnter,\n type.labels,\n classPrefix,\n labelWrap\n )\n\n // we need to merge the selection, otherwise changes in the legend (e.g. change of orientation) are applied only to the new cells and not the existing ones.\n cell = cellEnter.merge(cell)\n\n // sets placement\n const textSize = text.nodes().map(d => d.getBBox()),\n shapeSize = shapes.nodes().map(d => d.getBBox())\n //sets scale\n //everything is fill except for line which is stroke,\n if (!useClass) {\n if (shape == \"line\") {\n shapes.style(\"stroke\", type.feature)\n } else {\n shapes.style(\"fill\", type.feature)\n }\n } else {\n shapes.attr(\"class\", d => `${classPrefix}swatch ${type.feature(d)}`)\n }\n\n let cellTrans,\n textTrans,\n textAlign = labelAlign == \"start\" ? 0 : labelAlign == \"middle\" ? 0.5 : 1\n\n //positions cells and text\n if (orient === \"vertical\") {\n const cellSize = textSize.map((d, i) =>\n Math.max(d.height, shapeSize[i].height)\n )\n\n cellTrans = (d, i) => {\n const height = sum(cellSize.slice(0, i))\n return `translate(0, ${height + i * shapePadding})`\n }\n\n textTrans = (d, i) =>\n `translate( ${shapeSize[i].width +\n shapeSize[i].x +\n labelOffset}, ${shapeSize[i].y + shapeSize[i].height / 2 + 5})`\n } else if (orient === \"horizontal\") {\n cellTrans = (d, i) =>\n `translate(${i * (shapeSize[i].width + shapePadding)},0)`\n textTrans = (d, i) => `translate(${shapeSize[i].width * textAlign +\n shapeSize[i].x},\n ${shapeSize[i].height + shapeSize[i].y + labelOffset + 8})`\n }\n\n helper.d3_placement(orient, cell, cellTrans, text, textTrans, labelAlign)\n helper.d3_title(svg, title, classPrefix, titleWidth)\n\n cell.transition().style(\"opacity\", 1)\n }\n\n legend.scale = function(_) {\n if (!arguments.length) return scale\n scale = _\n return legend\n }\n\n legend.cells = function(_) {\n if (!arguments.length) return cells\n if (_.length > 1 || _ >= 2) {\n cells = _\n }\n return legend\n }\n\n legend.cellFilter = function(_) {\n if (!arguments.length) return cellFilter\n cellFilter = _\n return legend\n }\n\n legend.shape = function(_, d) {\n if (!arguments.length) return shape\n if (\n _ == \"rect\" ||\n _ == \"circle\" ||\n _ == \"line\" ||\n (_ == \"path\" && typeof d === \"string\")\n ) {\n shape = _\n path = d\n }\n return legend\n }\n\n legend.shapeWidth = function(_) {\n if (!arguments.length) return shapeWidth\n shapeWidth = +_\n return legend\n }\n\n legend.shapeHeight = function(_) {\n if (!arguments.length) return shapeHeight\n shapeHeight = +_\n return legend\n }\n\n legend.shapeRadius = function(_) {\n if (!arguments.length) return shapeRadius\n shapeRadius = +_\n return legend\n }\n\n legend.shapePadding = function(_) {\n if (!arguments.length) return shapePadding\n shapePadding = +_\n return legend\n }\n\n legend.labels = function(_) {\n if (!arguments.length) return labels\n labels = _\n return legend\n }\n\n legend.labelAlign = function(_) {\n if (!arguments.length) return labelAlign\n if (_ == \"start\" || _ == \"end\" || _ == \"middle\") {\n labelAlign = _\n }\n return legend\n }\n\n legend.locale = function(_) {\n if (!arguments.length) return locale\n locale = formatLocale(_)\n return legend\n }\n\n legend.labelFormat = function(_) {\n if (!arguments.length) return legend.locale().format(specifier)\n specifier = formatSpecifier(_)\n return legend\n }\n\n legend.labelOffset = function(_) {\n if (!arguments.length) return labelOffset\n labelOffset = +_\n return legend\n }\n\n legend.labelDelimiter = function(_) {\n if (!arguments.length) return labelDelimiter\n labelDelimiter = _\n return legend\n }\n\n legend.labelWrap = function(_) {\n if (!arguments.length) return labelWrap\n labelWrap = _\n return legend\n }\n\n legend.useClass = function(_) {\n if (!arguments.length) return useClass\n if (_ === true || _ === false) {\n useClass = _\n }\n return legend\n }\n\n legend.orient = function(_) {\n if (!arguments.length) return orient\n _ = _.toLowerCase()\n if (_ == \"horizontal\" || _ == \"vertical\") {\n orient = _\n }\n return legend\n }\n\n legend.ascending = function(_) {\n if (!arguments.length) return ascending\n ascending = !!_\n return legend\n }\n\n legend.classPrefix = function(_) {\n if (!arguments.length) return classPrefix\n classPrefix = _\n return legend\n }\n\n legend.title = function(_) {\n if (!arguments.length) return title\n title = _\n return legend\n }\n\n legend.titleWidth = function(_) {\n if (!arguments.length) return titleWidth\n titleWidth = _\n return legend\n }\n\n legend.textWrap = function(_) {\n if (!arguments.length) return textWrap\n textWrap = _\n return legend\n }\n\n legend.on = function() {\n const value = legendDispatcher.on.apply(legendDispatcher, arguments)\n return value === legendDispatcher ? legend : value\n }\n\n return legend\n}\n","import helper from \"./legend\"\nimport { dispatch } from \"d3-dispatch\"\nimport { scaleLinear } from \"d3-scale\"\nimport { formatLocale, formatSpecifier } from \"d3-format\"\nimport { sum, max } from \"d3-array\"\n\nexport default function size() {\n let scale = scaleLinear(),\n shape = \"rect\",\n shapeWidth = 15,\n shapePadding = 2,\n cells = [5],\n cellFilter,\n labels = [],\n classPrefix = \"\",\n title = \"\",\n locale = helper.d3_defaultLocale,\n specifier = helper.d3_defaultFormatSpecifier,\n labelOffset = 10,\n labelAlign = \"middle\",\n labelDelimiter = helper.d3_defaultDelimiter,\n labelWrap,\n orient = \"vertical\",\n ascending = false,\n path,\n titleWidth,\n legendDispatcher = dispatch(\"cellover\", \"cellout\", \"cellclick\")\n\n function legend(svg) {\n const type = helper.d3_calcType(\n scale,\n ascending,\n cells,\n labels,\n locale.format(specifier),\n labelDelimiter\n ),\n legendG = svg.selectAll(\"g\").data([scale])\n\n if (cellFilter) {\n helper.d3_filterCells(type, cellFilter)\n }\n\n legendG\n .enter()\n .append(\"g\")\n .attr(\"class\", classPrefix + \"legendCells\")\n\n let cell = svg\n .select(\".\" + classPrefix + \"legendCells\")\n .selectAll(\".\" + classPrefix + \"cell\")\n .data(type.data)\n const cellEnter = cell\n .enter()\n .append(\"g\")\n .attr(\"class\", classPrefix + \"cell\")\n cellEnter.append(shape).attr(\"class\", classPrefix + \"swatch\")\n\n let shapes = svg.selectAll(\"g.\" + classPrefix + \"cell \" + shape)\n\n //add event handlers\n helper.d3_addEvents(cellEnter, legendDispatcher)\n\n cell\n .exit()\n .transition()\n .style(\"opacity\", 0)\n .remove()\n\n shapes\n .exit()\n .transition()\n .style(\"opacity\", 0)\n .remove()\n shapes = shapes.merge(shapes)\n\n //creates shape\n if (shape === \"line\") {\n helper.d3_drawShapes(shape, shapes, 0, shapeWidth)\n shapes.attr(\"stroke-width\", type.feature)\n } else {\n helper.d3_drawShapes(\n shape,\n shapes,\n type.feature,\n type.feature,\n type.feature,\n path\n )\n }\n\n const text = helper.d3_addText(\n svg,\n cellEnter,\n type.labels,\n classPrefix,\n labelWrap\n )\n\n // we need to merge the selection, otherwise changes in the legend (e.g. change of orientation) are applied only to the new cells and not the existing ones.\n cell = cellEnter.merge(cell)\n\n //sets placement\n\n const textSize = text.nodes().map(d => d.getBBox()),\n shapeSize = shapes.nodes().map((d, i) => {\n const bbox = d.getBBox()\n const stroke = scale(type.data[i])\n\n if (shape === \"line\" && orient === \"horizontal\") {\n bbox.height = bbox.height + stroke\n } else if (shape === \"line\" && orient === \"vertical\") {\n bbox.width = bbox.width\n }\n return bbox\n })\n //console.log('SHAPESIZE')\n const maxH = max(shapeSize, d => d.height + d.y),\n maxW = max(shapeSize, d => d.width + d.x)\n\n let cellTrans,\n textTrans,\n textAlign = labelAlign == \"start\" ? 0 : labelAlign == \"middle\" ? 0.5 : 1\n\n //positions cells and text\n if (orient === \"vertical\") {\n const cellSize = textSize.map((d, i) =>\n Math.max(d.height, shapeSize[i].height)\n )\n const y =\n shape == \"circle\" || shape == \"line\" ? shapeSize[0].height / 2 : 0\n cellTrans = (d, i) => {\n const height = sum(cellSize.slice(0, i))\n\n return `translate(0, ${y + height + i * shapePadding})`\n }\n\n textTrans = (d, i) => `translate( ${maxW + labelOffset},\n ${shapeSize[i].y + shapeSize[i].height / 2 + 5})`\n } else if (orient === \"horizontal\") {\n cellTrans = (d, i) => {\n const width = sum(shapeSize.slice(0, i), d => d.width)\n const y = shape == \"circle\" || shape == \"line\" ? maxH / 2 : 0\n return `translate(${width + i * shapePadding}, ${y})`\n }\n\n const offset = shape == \"line\" ? maxH / 2 : maxH\n textTrans = (d, i) => {\n return `translate( ${shapeSize[i].width * textAlign + shapeSize[i].x},\n ${offset + labelOffset})`\n }\n }\n\n helper.d3_placement(orient, cell, cellTrans, text, textTrans, labelAlign)\n helper.d3_title(svg, title, classPrefix, titleWidth)\n\n cell.transition().style(\"opacity\", 1)\n }\n\n legend.scale = function(_) {\n if (!arguments.length) return scale\n scale = _\n return legend\n }\n\n legend.cells = function(_) {\n if (!arguments.length) return cells\n if (_.length > 1 || _ >= 2) {\n cells = _\n }\n return legend\n }\n\n legend.cellFilter = function(_) {\n if (!arguments.length) return cellFilter\n cellFilter = _\n return legend\n }\n\n legend.shape = function(_, d) {\n if (!arguments.length) return shape\n if (_ == \"rect\" || _ == \"circle\" || _ == \"line\") {\n shape = _\n path = d\n }\n return legend\n }\n\n legend.shapeWidth = function(_) {\n if (!arguments.length) return shapeWidth\n shapeWidth = +_\n return legend\n }\n\n legend.shapePadding = function(_) {\n if (!arguments.length) return shapePadding\n shapePadding = +_\n return legend\n }\n\n legend.labels = function(_) {\n if (!arguments.length) return labels\n labels = _\n return legend\n }\n\n legend.labelAlign = function(_) {\n if (!arguments.length) return labelAlign\n if (_ == \"start\" || _ == \"end\" || _ == \"middle\") {\n labelAlign = _\n }\n return legend\n }\n\n legend.locale = function(_) {\n if (!arguments.length) return locale\n locale = formatLocale(_)\n return legend\n }\n\n legend.labelFormat = function(_) {\n if (!arguments.length) return legend.locale().format(specifier)\n specifier = formatSpecifier(_)\n return legend\n }\n\n legend.labelOffset = function(_) {\n if (!arguments.length) return labelOffset\n labelOffset = +_\n return legend\n }\n\n legend.labelDelimiter = function(_) {\n if (!arguments.length) return labelDelimiter\n labelDelimiter = _\n return legend\n }\n\n legend.labelWrap = function(_) {\n if (!arguments.length) return labelWrap\n labelWrap = _\n return legend\n }\n\n legend.orient = function(_) {\n if (!arguments.length) return orient\n _ = _.toLowerCase()\n if (_ == \"horizontal\" || _ == \"vertical\") {\n orient = _\n }\n return legend\n }\n\n legend.ascending = function(_) {\n if (!arguments.length) return ascending\n ascending = !!_\n return legend\n }\n\n legend.classPrefix = function(_) {\n if (!arguments.length) return classPrefix\n classPrefix = _\n return legend\n }\n\n legend.title = function(_) {\n if (!arguments.length) return title\n title = _\n return legend\n }\n\n legend.titleWidth = function(_) {\n if (!arguments.length) return titleWidth\n titleWidth = _\n return legend\n }\n\n legend.on = function() {\n const value = legendDispatcher.on.apply(legendDispatcher, arguments)\n return value === legendDispatcher ? legend : value\n }\n\n return legend\n}\n","import helper from \"./legend\"\nimport { dispatch } from \"d3-dispatch\"\nimport { scaleLinear } from \"d3-scale\"\nimport { formatLocale, formatSpecifier } from \"d3-format\"\nimport { sum, max } from \"d3-array\"\n\nexport default function symbol() {\n let scale = scaleLinear(),\n shape = \"path\",\n shapeWidth = 15,\n shapeHeight = 15,\n shapeRadius = 10,\n shapePadding = 5,\n cells = [5],\n cellFilter,\n labels = [],\n classPrefix = \"\",\n title = \"\",\n locale = helper.d3_defaultLocale,\n specifier = helper.d3_defaultFormatSpecifier,\n labelAlign = \"middle\",\n labelOffset = 10,\n labelDelimiter = helper.d3_defaultDelimiter,\n labelWrap,\n orient = \"vertical\",\n ascending = false,\n titleWidth,\n legendDispatcher = dispatch(\"cellover\", \"cellout\", \"cellclick\")\n\n function legend(svg) {\n const type = helper.d3_calcType(\n scale,\n ascending,\n cells,\n labels,\n locale.format(specifier),\n labelDelimiter\n ),\n legendG = svg.selectAll(\"g\").data([scale])\n\n if (cellFilter) {\n helper.d3_filterCells(type, cellFilter)\n }\n\n legendG\n .enter()\n .append(\"g\")\n .attr(\"class\", classPrefix + \"legendCells\")\n\n let cell = svg\n .select(\".\" + classPrefix + \"legendCells\")\n .selectAll(\".\" + classPrefix + \"cell\")\n .data(type.data)\n const cellEnter = cell\n .enter()\n .append(\"g\")\n .attr(\"class\", classPrefix + \"cell\")\n cellEnter.append(shape).attr(\"class\", classPrefix + \"swatch\")\n\n let shapes = svg.selectAll(\"g.\" + classPrefix + \"cell \" + shape)\n\n //add event handlers\n helper.d3_addEvents(cellEnter, legendDispatcher)\n\n //remove old shapes\n cell\n .exit()\n .transition()\n .style(\"opacity\", 0)\n .remove()\n shapes\n .exit()\n .transition()\n .style(\"opacity\", 0)\n .remove()\n shapes = shapes.merge(shapes)\n\n helper.d3_drawShapes(\n shape,\n shapes,\n shapeHeight,\n shapeWidth,\n shapeRadius,\n type.feature\n )\n const text = helper.d3_addText(\n svg,\n cellEnter,\n type.labels,\n classPrefix,\n labelWrap\n )\n\n // we need to merge the selection, otherwise changes in the legend (e.g. change of orientation) are applied only to the new cells and not the existing ones.\n cell = cellEnter.merge(cell)\n\n // sets placement\n const textSize = text.nodes().map(d => d.getBBox()),\n shapeSize = shapes.nodes().map(d => d.getBBox())\n\n const maxH = max(shapeSize, d => d.height),\n maxW = max(shapeSize, d => d.width)\n\n let cellTrans,\n textTrans,\n textAlign = labelAlign == \"start\" ? 0 : labelAlign == \"middle\" ? 0.5 : 1\n\n //positions cells and text\n if (orient === \"vertical\") {\n const cellSize = textSize.map((d, i) => Math.max(maxH, d.height))\n\n cellTrans = (d, i) => {\n const height = sum(cellSize.slice(0, i))\n return `translate(0, ${height + i * shapePadding} )`\n }\n textTrans = (d, i) => `translate( ${maxW + labelOffset},\n ${shapeSize[i].y + shapeSize[i].height / 2 + 5})`\n } else if (orient === \"horizontal\") {\n cellTrans = (d, i) => `translate( ${i * (maxW + shapePadding)},0)`\n textTrans = (d, i) => `translate( ${shapeSize[i].width * textAlign +\n shapeSize[i].x},\n ${maxH + labelOffset})`\n }\n\n helper.d3_placement(orient, cell, cellTrans, text, textTrans, labelAlign)\n helper.d3_title(svg, title, classPrefix, titleWidth)\n cell.transition().style(\"opacity\", 1)\n }\n\n legend.scale = function(_) {\n if (!arguments.length) return scale\n scale = _\n return legend\n }\n\n legend.cells = function(_) {\n if (!arguments.length) return cells\n if (_.length > 1 || _ >= 2) {\n cells = _\n }\n return legend\n }\n\n legend.cellFilter = function(_) {\n if (!arguments.length) return cellFilter\n cellFilter = _\n return legend\n }\n\n legend.shapePadding = function(_) {\n if (!arguments.length) return shapePadding\n shapePadding = +_\n return legend\n }\n\n legend.labels = function(_) {\n if (!arguments.length) return labels\n labels = _\n return legend\n }\n\n legend.labelAlign = function(_) {\n if (!arguments.length) return labelAlign\n if (_ == \"start\" || _ == \"end\" || _ == \"middle\") {\n labelAlign = _\n }\n return legend\n }\n\n legend.locale = function(_) {\n if (!arguments.length) return locale\n locale = formatLocale(_)\n return legend\n }\n\n legend.labelFormat = function(_) {\n if (!arguments.length) return legend.locale().format(specifier)\n specifier = formatSpecifier(_)\n return legend\n }\n\n legend.labelOffset = function(_) {\n if (!arguments.length) return labelOffset\n labelOffset = +_\n return legend\n }\n\n legend.labelDelimiter = function(_) {\n if (!arguments.length) return labelDelimiter\n labelDelimiter = _\n return legend\n }\n\n legend.labelWrap = function(_) {\n if (!arguments.length) return labelWrap\n labelWrap = _\n return legend\n }\n\n legend.orient = function(_) {\n if (!arguments.length) return orient\n _ = _.toLowerCase()\n if (_ == \"horizontal\" || _ == \"vertical\") {\n orient = _\n }\n return legend\n }\n\n legend.ascending = function(_) {\n if (!arguments.length) return ascending\n ascending = !!_\n return legend\n }\n\n legend.classPrefix = function(_) {\n if (!arguments.length) return classPrefix\n classPrefix = _\n return legend\n }\n\n legend.title = function(_) {\n if (!arguments.length) return title\n title = _\n return legend\n }\n\n legend.titleWidth = function(_) {\n if (!arguments.length) return titleWidth\n titleWidth = _\n return legend\n }\n\n legend.on = function() {\n const value = legendDispatcher.on.apply(legendDispatcher, arguments)\n return value === legendDispatcher ? legend : value\n }\n\n return legend\n}\n","export const thresholdLabels = function({ i, genLength, generatedLabels }){\n\n if (i === 0 ){\n return generatedLabels[i].replace('NaN to', 'Less than')\n } else if (i === genLength - 1) {\n return `More than ${generatedLabels[genLength - 1].replace(' to NaN', '')}`\n }\n return generatedLabels[i]\n}\n\nexport default {\n thresholdLabels\n}\n","import legendColor from './src/color'\nimport legendSize from './src/size'\nimport legendSymbol from './src/symbol'\nimport legendHelpers from './src/helpers'\n\nexport { legendColor, legendSize, legendSymbol, legendHelpers }\n\nexport default {\n legendColor,\n legendSize,\n legendSymbol,\n legendHelpers\n};\n"],"names":["d3_identity","d","d3_reverse","arr","mirror","i","l","length","d3_textWrapping","text","width","each","select","words","split","reverse","word","line","lineNumber","lineHeight","attr","dy","parseFloat","tspan","append","pop","push","join","node","getComputedTextLength","d3_mergeLabels","gen","labels","domain","range","customLabels","genLength","d3_linearLegend","scale","cells","labelFormat","data","increment","map","d3_quantLegend","labelDelimiter","invert","invertExtent","d3_ordinalLegend","d3_cellOver","cellDispatcher","obj","call","d3_cellOut","d3_cellClick","shape","shapes","shapeHeight","shapeWidth","shapeRadius","path","svg","enter","classPrefix","labelWidth","selectAll","ascending","type","ticks","cellFilter","filterCells","label","filter","dataValues","labelValues","indexOf","orient","cell","cellTrans","textTrans","labelAlign","style","dispatcher","on","title","titleWidth","titleText","cellsSvg","yOffset","nodes","getBBox","height","xOffset","x","color","scaleLinear","shapePadding","useClass","locale","helper","d3_defaultLocale","specifier","d3_defaultFormatSpecifier","labelOffset","d3_defaultDelimiter","labelWrap","legendDispatcher","dispatch","legend","d3_calcType","format","legendG","d3_filterCells","cellEnter","d3_addEvents","exit","transition","remove","merge","d3_drawShapes","d3_addText","textSize","shapeSize","feature","textAlign","cellSize","Math","max","sum","slice","y","d3_placement","d3_title","_","arguments","formatLocale","formatSpecifier","toLowerCase","textWrap","value","apply","size","bbox","stroke","maxH","maxW","offset","symbol","thresholdLabels","generatedLabels","replace"],"mappings":";;;;;;;;;;;;AAGA,IAAMA,cAAe,SAAfA,WAAe,CAACC,CAAD;SAAOA,CAAP;CAArB;;AAEA,IAAMC,aAAa,SAAbA,UAAa,CAACC,GAAD,EAAS;MACpBC,SAAS,EAAf;OACK,IAAIC,IAAI,CAAR,EAAWC,IAAIH,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42a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,8 @@ { "name": "d3-svg-legend", "version": "2.25.3", - "description": "A legend component for d3. Given a d3.scale it can create either a color legend, size legend, or symbol legend.", + "description": + "A legend component for d3. Given a d3.scale it can create either a color legend, size legend, or symbol legend.", "main": "indexRollup.js", "jsnext:main": "indexRollupNext.js", "module": "indexRollupNext.js", @@ -16,11 +17,7 @@ "d3-legend.*", "types/*" ], - "keywords": [ - "d3", - "d3-module", - "legend" - ], + "keywords": ["d3", "d3-module", "legend"], "directories": { "example": "examples", "test": "test" @@ -34,7 +31,7 @@ "grunt": "0.4.5", "grunt-browserify": "3.8.0", "grunt-contrib-uglify": "0.9.1", - "marked": "0.3.5", + "marked": "0.3.9", "mocha": "2.2.5", "npm-watch": "0.1.7", "reify": "0.3.8", @@ -52,10 +49,7 @@ "test": "mocha" }, "watch": { - "grunt": [ - "src/*.js ", - "docs/legends.js" - ] + "grunt": ["src/*.js ", "docs/legends.js"] }, "repository": { "type": "git",