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

@muil/charts

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@muil/charts - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

2

lib/index.js

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

module.exports=function(e){var n={};function t(r){if(n[r])return n[r].exports;var a=n[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,t),a.l=!0,a.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var a in e)t.d(r,a,function(n){return e[n]}.bind(null,a));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=2)}([function(e,n){e.exports=require("react")},function(e,n){e.exports=require("styled-components")},function(e,n,t){"use strict";t.r(n);var r=t(0),a=t.n(r),u=t(1),c=t.n(u);function l(){var e=j(["\n max-width: 30%;\n > span {\n margin-right: 10px;\n }\n"]);return l=function(){return e},e}function o(){var e=j(["\n height: 10px;\n"]);return o=function(){return e},e}function i(){var e=j(["\n width: ","%;\n height: 100%;\n min-height: 25px;\n background: ",";\n display: inline-block;\n vertical-align: middle;\n"]);return i=function(){return e},e}function f(){var e=j(["\n width: 75%;\n white-space: nowrap;\n > span {\n margin-left: 5px;\n }\n"]);return f=function(){return e},e}function m(){var e=j(["\n vertical-align: bottom;\n text-align: center;\n"]);return m=function(){return e},e}function s(){var e=j(["\n width: 5%;\n"]);return s=function(){return e},e}function d(){var e=j(["\n display: inline-block;\n max-width: 50px;\n"]);return d=function(){return e},e}function p(){var e=j(["\n > td {\n padding: 6px;\n font-size: 14px;\n vertical-align: top;\n }\n"]);return p=function(){return e},e}function v(){var e=j(["\n font-size: 12px;\n color: #929292;\n"]);return v=function(){return e},e}function g(){var e=j(["\n height: ","%;\n background: ",";\n min-width: 18px;\n"]);return g=function(){return e},e}function h(){var e=j(["\n height: 100%;\n > td {\n border-bottom: 1px solid #d5d5d4;\n }\n"]);return h=function(){return e},e}function b(){var e=j(["\n display: inline-block;\n width: 12px;\n height: 12px;\n margin-right: 7px;\n background: ",";\n"]);return b=function(){return e},e}function y(){var e=j(["\n height: 6px;\n"]);return y=function(){return e},e}function E(){var e=j(["\n font-size: 12px;\n"]);return E=function(){return e},e}function x(){var e=j(["\n ",";\n width: 95%;\n max-width: ","px;\n"]);return x=function(){return e},e}function w(){var e=j(["\n ",";\n height: ","px;\n"]);return w=function(){return e},e}function N(){var e=j(["\n font-family: Arial;\n padding-top: 20px;\n"]);return N=function(){return e},e}function j(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var O=Object(u.css)(N()),k=c.a.table(w(),O,(function(e){return e.height||200})),S=c.a.table(x(),O,(function(e){return e.maxWidth||200})),z=c.a.td(E()),A=c.a.td(y()),M=c.a.div(b(),(function(e){return e.color})),P=c.a.tr(h()),F=c.a.div(g(),(function(e){return e.value}),(function(e){return e.color||"#17a2b8"})),D=c.a.span(v()),_=c.a.tr(p()),T=c.a.span(d()),B=c.a.td(s()),C=c.a.td(m()),W=c.a.td(f()),J=c.a.div(i(),(function(e){return e.value}),(function(e){return e.color||"#17a2b8"})),q=c.a.tr(o()),Y=c.a.td(l()),H=function(e){var n=e.categories;return a.a.createElement(a.a.Fragment,null,n.map((function(e,n){var t=e.label,r=e.color;return a.a.createElement(a.a.Fragment,{key:n},a.a.createElement("tr",null,a.a.createElement(z,{className:"category-row",colSpan:"100%"},a.a.createElement(M,{color:r}),a.a.createElement("span",null,t))),a.a.createElement("tr",null,a.a.createElement(A,{className:"category-space"})))})),a.a.createElement("tr",{style:{height:30}}))},I=function(e){var n=e.className,t=e.style,r=e.height,u=e.series,c=void 0===u?[]:u,l=e.categories,o=e.legend,i=void 0!==o&&o;return a.a.createElement(k,{className:n,style:t,cellSpacing:"0",cellPadding:"0",height:r},i&&a.a.createElement(H,{categories:l}),a.a.createElement(P,{className:"columns"},c.map((function(e,n){var t=e.data,r=e.value;return a.a.createElement(a.a.Fragment,{key:n},(t||[r]).map((function(e,n){return a.a.createElement(C,{key:n,className:"column"},a.a.createElement(D,{className:"column label"},e),a.a.createElement(F,{value:e,color:l[n].color,className:"column bar"}))})),n<c.length-1&&a.a.createElement(B,null))}))),a.a.createElement(_,{className:"labels"},c.map((function(e,n){var t=e.label;return a.a.createElement(a.a.Fragment,{key:n},a.a.createElement(C,{colSpan:l.length,className:"label"},a.a.createElement(T,null,t)),n<c.length-1&&a.a.createElement(B,null))}))))};function L(e){return function(e){if(Array.isArray(e)){for(var n=0,t=new Array(e.length);n<e.length;n++)t[n]=e[n];return t}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function G(){var e=U(["\n width: 20px;\n height: 20px;\n text-align: center;\n font-size: 11px;\n color: #868686;\n ","\n"]);return G=function(){return e},e}function K(){var e=U(["\n font-size: 13px;\n color: #868686;\n"]);return K=function(){return e},e}function Q(){var e=U(["\n font-size: 13px;\n padding: 10px 0;\n"]);return Q=function(){return e},e}function R(){var e=U(["\n border-spacing: 5px;\n display: inline-block;\n margin: 5px;\n"]);return R=function(){return e},e}function U(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var V=["January","February","March","April","May","June","July","August","September","October","November","December"],X=c.a.table(R()),Z=c.a.th(Q()),$=c.a.td(K()),ee=c.a.td(G(),(function(e){return!e.empty&&"background: #e4e4e4;"})),ne=function(e,n){var t=[],r=new Date(e,n).getDay(),a=1;return L(Array(6)).forEach((function(u,c){var l=[];L(Array(7)).forEach((function(t,u){0===c&&u<r?l.push({}):a<=32-new Date(e,n,32).getDate()&&(l.push({day:a,date:new Date(e,n,a)}),a++)})),t.push(l)})),t},te=function(e){var n=e.className,t=e.style,r=e.monthsBefore,u=void 0===r?0:r,c=e.monthsAfter,l=void 0===c?0:c,o=e.showNumbers,i=void 0!==o&&o,f=e.dayClassName,m=L(Array(u+l+1)).map((function(e,n){var t=function(e,n){var t=new Date(e);return t.setMonth(t.getMonth()-n),t}(new Date,u-n);return{month:t,calendar:ne(t.getFullYear(),t.getMonth())}}));return a.a.createElement("div",{className:n,style:t},m.map((function(e,n){var t=e.month,r=e.calendar;return a.a.createElement(X,{key:n},a.a.createElement("thead",null,a.a.createElement("tr",null,a.a.createElement(Z,{colSpan:"7"},function(e){var n=e.getMonth(),t=e.getFullYear();return"".concat(V[n]," ").concat(t)}(t)))),a.a.createElement("thead",null,a.a.createElement("tr",null,a.a.createElement($,null,"S"),a.a.createElement($,null,"M"),a.a.createElement($,null,"T"),a.a.createElement($,null,"W"),a.a.createElement($,null,"T"),a.a.createElement($,null,"F"),a.a.createElement($,null,"S"))),a.a.createElement("tbody",null,r.map((function(e,n){return a.a.createElement("tr",{key:n},e.map((function(e,n){var t=e.day,r=e.date;return a.a.createElement(ee,{key:n,empty:!t,className:null==f?void 0:f({day:t,date:r})},i?t:"")})))}))))})))},re=function(e){var n=e.className,t=e.style,r=e.maxWidth,u=e.series,c=void 0===u?[]:u,l=e.categories,o=e.legend,i=void 0!==o&&o;return a.a.createElement(S,{className:n,style:t,maxWidth:r,cellSpacing:"0",cellPadding:"0"},i&&a.a.createElement(H,{categories:l}),c.map((function(e,n){var t=e.label,r=e.value,u=e.data;return a.a.createElement(a.a.Fragment,{key:n},(u||[r]).map((function(e,n){return a.a.createElement("tr",{key:n},0===n&&a.a.createElement(Y,{rowSpan:l.length,className:"label"},a.a.createElement("span",null,t)),a.a.createElement(W,null,a.a.createElement(J,{value:e,color:l[n].color,className:"column bar"}),a.a.createElement(D,{className:"column label"},e)))})),a.a.createElement(q,null))})))};function ae(){var e=ce(["\n width: ","%;\n height: 24px;\n background-color: ",";\n"]);return ae=function(){return e},e}function ue(){var e=ce(["\n width: 100%;\n border-spacing: 0;\n"]);return ue=function(){return e},e}function ce(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var le=c.a.table(ue()),oe=c.a.td(ae(),(function(e){return e.value}),(function(e){return e.color})),ie=function(e){var n=e.className,t=e.style,r=e.percents,u=void 0===r?[]:r;return a.a.createElement(le,{className:n,style:t},a.a.createElement("tr",null,u.map((function(e,n){var t=e.value,r=e.color;return a.a.createElement(oe,{key:n,value:t,color:r})}))))};t.d(n,"BarChart",(function(){return I})),t.d(n,"Calendar",(function(){return te})),t.d(n,"HorizontalBarChart",(function(){return re})),t.d(n,"LineBar",(function(){return ie}))}]);
module.exports=function(e){var n={};function t(r){if(n[r])return n[r].exports;var a=n[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,t),a.l=!0,a.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var a in e)t.d(r,a,function(n){return e[n]}.bind(null,a));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=2)}([function(e,n){e.exports=require("react")},function(e,n){e.exports=require("styled-components")},function(e,n,t){"use strict";t.r(n);var r=t(0),a=t.n(r),l=t(1),u=t.n(l);function c(){var e=j(["\n width: 30%;\n > span {\n display: inline-block;\n margin-right: 10px;\n }\n"]);return c=function(){return e},e}function o(){var e=j(["\n height: 10px;\n"]);return o=function(){return e},e}function i(){var e=j(["\n width: ","%;\n height: 100%;\n min-height: 25px;\n background: ",";\n display: inline-block;\n vertical-align: middle;\n"]);return i=function(){return e},e}function f(){var e=j(["\n width: 70%;\n white-space: nowrap;\n > span {\n margin-left: 5px;\n }\n"]);return f=function(){return e},e}function m(){var e=j(["\n vertical-align: bottom;\n text-align: center;\n"]);return m=function(){return e},e}function s(){var e=j(["\n width: 5%;\n"]);return s=function(){return e},e}function d(){var e=j(["\n display: inline-block;\n max-width: 50px;\n"]);return d=function(){return e},e}function p(){var e=j(["\n > td {\n padding: 6px;\n font-size: 14px;\n vertical-align: top;\n }\n"]);return p=function(){return e},e}function v(){var e=j(["\n font-size: 12px;\n color: #929292;\n"]);return v=function(){return e},e}function g(){var e=j(["\n height: ","%;\n background: ",";\n min-width: 18px;\n"]);return g=function(){return e},e}function h(){var e=j(["\n height: 100%;\n > td {\n border-bottom: 1px solid #d5d5d4;\n }\n"]);return h=function(){return e},e}function b(){var e=j(["\n display: inline-block;\n width: 12px;\n height: 12px;\n margin-right: 7px;\n background: ",";\n"]);return b=function(){return e},e}function y(){var e=j(["\n height: 6px;\n"]);return y=function(){return e},e}function E(){var e=j(["\n font-size: 12px;\n"]);return E=function(){return e},e}function x(){var e=j(["\n ",";\n width: 95%;\n max-width: ","px;\n"]);return x=function(){return e},e}function w(){var e=j(["\n ",";\n height: ","px;\n"]);return w=function(){return e},e}function N(){var e=j(["\n font-family: Arial;\n padding-top: 20px;\n"]);return N=function(){return e},e}function j(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var O=Object(l.css)(N()),k=u.a.table(w(),O,(function(e){return e.height||200})),S=u.a.table(x(),O,(function(e){return e.maxWidth||200})),z=u.a.td(E()),A=u.a.td(y()),M=u.a.div(b(),(function(e){return e.color})),P=u.a.tr(h()),F=u.a.div(g(),(function(e){return e.value}),(function(e){return e.color||"#17a2b8"})),D=u.a.span(v()),_=u.a.tr(p()),T=u.a.span(d()),B=u.a.td(s()),C=u.a.td(m()),W=u.a.td(f()),J=u.a.div(i(),(function(e){return e.value}),(function(e){return e.color||"#17a2b8"})),q=u.a.tr(o()),Y=u.a.td(c()),H=function(e){var n=e.categories;return a.a.createElement(a.a.Fragment,null,n.map((function(e,n){var t=e.label,r=e.color;return a.a.createElement(a.a.Fragment,{key:n},a.a.createElement("tr",null,a.a.createElement(z,{className:"category-row",colSpan:"100%"},a.a.createElement(M,{color:r}),a.a.createElement("span",null,t))),a.a.createElement("tr",null,a.a.createElement(A,{className:"category-space"})))})),a.a.createElement("tr",{style:{height:30}}))},I=function(e){var n=e.className,t=e.style,r=e.height,l=e.series,u=void 0===l?[]:l,c=e.categories,o=e.legend,i=void 0!==o&&o;return a.a.createElement(k,{className:n,style:t,cellSpacing:"0",cellPadding:"0",height:r},i&&a.a.createElement(H,{categories:c}),a.a.createElement(P,{className:"columns"},u.map((function(e,n){var t=e.data,r=e.value;return a.a.createElement(a.a.Fragment,{key:n},(t||[r]).map((function(e,n){return a.a.createElement(C,{key:n,className:"column"},a.a.createElement(D,{className:"column label"},e),a.a.createElement(F,{value:e,color:c[n].color,className:"column bar"}))})),n<u.length-1&&a.a.createElement(B,null))}))),a.a.createElement(_,{className:"labels"},u.map((function(e,n){var t=e.label;return a.a.createElement(a.a.Fragment,{key:n},a.a.createElement(C,{colSpan:c.length,className:"label"},a.a.createElement(T,null,t)),n<u.length-1&&a.a.createElement(B,null))}))))};function L(e){return function(e){if(Array.isArray(e)){for(var n=0,t=new Array(e.length);n<e.length;n++)t[n]=e[n];return t}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function G(){var e=U(["\n width: 20px;\n height: 20px;\n text-align: center;\n font-size: 11px;\n color: #868686;\n ","\n"]);return G=function(){return e},e}function K(){var e=U(["\n font-size: 13px;\n color: #868686;\n"]);return K=function(){return e},e}function Q(){var e=U(["\n font-size: 13px;\n padding: 10px 0;\n"]);return Q=function(){return e},e}function R(){var e=U(["\n border-spacing: 5px;\n display: inline-block;\n margin: 5px;\n"]);return R=function(){return e},e}function U(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var V=["January","February","March","April","May","June","July","August","September","October","November","December"],X=u.a.table(R()),Z=u.a.th(Q()),$=u.a.td(K()),ee=u.a.td(G(),(function(e){return!e.empty&&"background: #e4e4e4;"})),ne=function(e,n){var t=[],r=new Date(e,n).getDay(),a=1;return L(Array(6)).forEach((function(l,u){var c=[];L(Array(7)).forEach((function(t,l){0===u&&l<r?c.push({}):a<=32-new Date(e,n,32).getDate()&&(c.push({day:a,date:new Date(e,n,a)}),a++)})),t.push(c)})),t},te=function(e){var n=e.className,t=e.style,r=e.monthsBefore,l=void 0===r?0:r,u=e.monthsAfter,c=void 0===u?0:u,o=e.showNumbers,i=void 0!==o&&o,f=e.dayClassName,m=L(Array(l+c+1)).map((function(e,n){var t=function(e,n){var t=new Date(e);return t.setMonth(t.getMonth()-n),t}(new Date,l-n);return{month:t,calendar:ne(t.getFullYear(),t.getMonth())}}));return a.a.createElement("div",{className:n,style:t},m.map((function(e,n){var t=e.month,r=e.calendar;return a.a.createElement(X,{key:n},a.a.createElement("thead",null,a.a.createElement("tr",null,a.a.createElement(Z,{colSpan:"7"},function(e){var n=e.getMonth(),t=e.getFullYear();return"".concat(V[n]," ").concat(t)}(t)))),a.a.createElement("thead",null,a.a.createElement("tr",null,a.a.createElement($,null,"S"),a.a.createElement($,null,"M"),a.a.createElement($,null,"T"),a.a.createElement($,null,"W"),a.a.createElement($,null,"T"),a.a.createElement($,null,"F"),a.a.createElement($,null,"S"))),a.a.createElement("tbody",null,r.map((function(e,n){return a.a.createElement("tr",{key:n},e.map((function(e,n){var t=e.day,r=e.date;return a.a.createElement(ee,{key:n,empty:!t,className:null==f?void 0:f({day:t,date:r})},i?t:"")})))}))))})))},re=function(e){var n=e.className,t=e.style,r=e.maxWidth,l=e.series,u=void 0===l?[]:l,c=e.categories,o=e.legend,i=void 0!==o&&o;return a.a.createElement(S,{className:n,style:t,maxWidth:r,cellSpacing:"0",cellPadding:"0"},i&&a.a.createElement(H,{categories:c}),u.map((function(e,n){var t=e.label,r=e.value,l=e.data;return a.a.createElement(a.a.Fragment,{key:n},a.a.createElement("tr",null,a.a.createElement(Y,{className:"label"},a.a.createElement("span",null,t)),a.a.createElement(W,null,(l||[r]).map((function(e,n){return a.a.createElement("div",null,a.a.createElement(J,{value:e,color:c[n].color,className:"column bar"}),a.a.createElement(D,{className:"column label"},e))})))),a.a.createElement(q,null))})))};function ae(){var e=ue(["\n width: ","%;\n height: 24px;\n background-color: ",";\n"]);return ae=function(){return e},e}function le(){var e=ue(["\n width: 100%;\n border-spacing: 0;\n"]);return le=function(){return e},e}function ue(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var ce=u.a.table(le()),oe=u.a.td(ae(),(function(e){return e.value}),(function(e){return e.color})),ie=function(e){var n=e.className,t=e.style,r=e.percents,l=void 0===r?[]:r;return a.a.createElement(ce,{className:n,style:t},a.a.createElement("tr",null,l.map((function(e,n){var t=e.value,r=e.color;return a.a.createElement(oe,{key:n,value:t,color:r})}))))};t.d(n,"BarChart",(function(){return I})),t.d(n,"Calendar",(function(){return te})),t.d(n,"HorizontalBarChart",(function(){return re})),t.d(n,"LineBar",(function(){return ie}))}]);
{
"name": "@muil/charts",
"version": "0.1.1",
"version": "0.1.2",
"license": "MIT",

@@ -21,3 +21,3 @@ "scripts": {

},
"gitHead": "247650d934ca57f8bed50e9c7b22992f83561286"
"gitHead": "3f4bf2cfda4e550867a2658059e400037b7306e3"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc