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

@muil/charts

Package Overview
Dependencies
Maintainers
2
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.2.12 to 0.2.14

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),t.d(n,"BarChart",(function(){return H})),t.d(n,"Calendar",(function(){return re})),t.d(n,"HorizontalBarChart",(function(){return ae})),t.d(n,"LineBar",(function(){return fe}));var r=t(0),a=t.n(r),u=t(1),l=t.n(u);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(u.css)(N()),k=l.a.table(w(),O,(function(e){return e.height||200})),S=l.a.table(x(),O,(function(e){return e.maxWidth||200})),A=l.a.td(E()),z=l.a.td(y()),M=l.a.div(b(),(function(e){return e.color})),P=l.a.tr(h()),F=l.a.div(g(),(function(e){return e.value}),(function(e){return e.color||"#17a2b8"})),D=l.a.span(v()),_=l.a.tr(p()),C=l.a.span(d()),T=l.a.td(s()),B=l.a.td(m()),W=l.a.td(f()),I=l.a.div(i(),(function(e){return e.value}),(function(e){return e.color||"#17a2b8"})),J=l.a.tr(o()),q=l.a.td(c()),Y=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(A,{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(z,{className:"category-space"})))})),a.a.createElement("tr",{style:{height:30}}))},H=function(e){var n=e.className,t=e.style,r=e.height,u=e.series,l=void 0===u?[]:u,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(Y,{categories:c}),a.a.createElement(P,{className:"columns"},l.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(B,{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<l.length-1&&a.a.createElement(T,null))}))),a.a.createElement(_,{className:"labels"},l.map((function(e,n){var t=e.label;return a.a.createElement(a.a.Fragment,{key:n},a.a.createElement(B,{colSpan:c.length,className:"label"},a.a.createElement(C,null,t)),n<l.length-1&&a.a.createElement(T,null))}))))};function L(e){return function(e){if(Array.isArray(e))return U(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,n){if(!e)return;if("string"==typeof e)return U(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return U(e,n)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function U(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function $(){var e=R(["\n width: 20px;\n height: 20px;\n text-align: center;\n font-size: 11px;\n color: #868686;\n ","\n"]);return $=function(){return e},e}function G(){var e=R(["\n font-size: 13px;\n color: #868686;\n"]);return G=function(){return e},e}function K(){var e=R(["\n font-size: 13px;\n padding: 10px 0;\n"]);return K=function(){return e},e}function Q(){var e=R(["\n border-spacing: 5px;\n display: inline-block;\n margin: 5px;\n"]);return Q=function(){return e},e}function R(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=l.a.table(Q()),Z=l.a.th(K()),ee=l.a.td(G()),ne=l.a.td($(),(function(e){return!e.empty&&"background: #e4e4e4;"})),te=function(e,n){var t=[],r=new Date(e,n).getDay(),a=1;return L(Array(6)).forEach((function(u,l){var c=[];L(Array(7)).forEach((function(t,u){0===l&&u<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},re=function(e){var n=e.className,t=e.style,r=e.monthsBefore,u=void 0===r?0:r,l=e.monthsAfter,c=void 0===l?0:l,o=e.showNumbers,i=void 0!==o&&o,f=e.dayClassName,m=L(Array(u+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,u-n);return{month:t,calendar:te(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(ee,null,"S"),a.a.createElement(ee,null,"M"),a.a.createElement(ee,null,"T"),a.a.createElement(ee,null,"W"),a.a.createElement(ee,null,"T"),a.a.createElement(ee,null,"F"),a.a.createElement(ee,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(ne,{key:n,empty:!t,className:null==f?void 0:f({day:t,date:r})},i?t:"")})))}))))})))},ae=function(e){var n=e.className,t=e.style,r=e.maxWidth,u=e.series,l=void 0===u?[]:u,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(Y,{categories:c}),l.map((function(e,n){var t=e.label,r=e.value,u=e.data;return a.a.createElement(a.a.Fragment,{key:n},a.a.createElement("tr",null,a.a.createElement(q,{className:"label"},a.a.createElement("span",null,t)),a.a.createElement(W,null,(u||[r]).map((function(e,n){return a.a.createElement("div",null,a.a.createElement(I,{value:e,color:c[n].color,className:"column bar"}),a.a.createElement(D,{className:"column label"},e))})))),a.a.createElement(J,null))})))};function ue(){var e=ce(["\n width: ","%;\n height: 24px;\n background-color: ",";\n"]);return ue=function(){return e},e}function le(){var e=ce(["\n width: 100%;\n border-spacing: 0;\n"]);return le=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 oe=l.a.table(le()),ie=l.a.td(ue(),(function(e){return e.value}),(function(e){return e.color})),fe=function(e){var n=e.className,t=e.style,r=e.percents,u=void 0===r?[]:r;return a.a.createElement(oe,{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(ie,{key:n,value:t,color:r})}))))}}]);
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),t.d(n,"BarChart",(function(){return H})),t.d(n,"Calendar",(function(){return re})),t.d(n,"HorizontalBarChart",(function(){return ae})),t.d(n,"LineBar",(function(){return fe}));var r=t(0),a=t.n(r),u=t(1),l=t.n(u);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(u.css)(N()),k=l.a.table(w(),O,(function(e){return e.height||200})),S=l.a.table(x(),O,(function(e){return e.maxWidth||200})),A=l.a.td(E()),z=l.a.td(y()),M=l.a.div(b(),(function(e){return e.color})),P=l.a.tr(h()),F=l.a.div(g(),(function(e){return e.value}),(function(e){return e.color||"#17a2b8"})),D=l.a.span(v()),_=l.a.tr(p()),C=l.a.span(d()),T=l.a.td(s()),B=l.a.td(m()),W=l.a.td(f()),I=l.a.div(i(),(function(e){return e.value}),(function(e){return e.color||"#17a2b8"})),J=l.a.tr(o()),q=l.a.td(c()),Y=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(A,{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(z,{className:"category-space"})))})),a.a.createElement("tr",{style:{height:30}}))},H=function(e){var n=e.className,t=e.style,r=e.height,u=e.series,l=void 0===u?[]:u,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(Y,{categories:c}),a.a.createElement(P,{className:"columns"},l.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(B,{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<l.length-1&&a.a.createElement(T,null))}))),a.a.createElement(_,{className:"labels"},l.map((function(e,n){var t=e.label;return a.a.createElement(a.a.Fragment,{key:n},a.a.createElement(B,{colSpan:c.length,className:"label"},a.a.createElement(C,null,t)),n<l.length-1&&a.a.createElement(T,null))}))))};function L(e){return function(e){if(Array.isArray(e))return U(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,n){if(!e)return;if("string"==typeof e)return U(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return U(e,n)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function U(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function $(){var e=R(["\n width: 20px;\n height: 20px;\n text-align: center;\n font-size: 11px;\n color: #868686;\n ","\n"]);return $=function(){return e},e}function G(){var e=R(["\n font-size: 13px;\n color: #868686;\n"]);return G=function(){return e},e}function K(){var e=R(["\n font-size: 13px;\n padding: 10px 0;\n"]);return K=function(){return e},e}function Q(){var e=R(["\n border-spacing: 5px;\n display: inline-block;\n margin: 5px;\n"]);return Q=function(){return e},e}function R(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=l.a.table(Q()),Z=l.a.th(K()),ee=l.a.td(G()),ne=l.a.td($(),(function(e){return!e.empty&&"background: #e4e4e4;"})),te=function(e,n){var t=[],r=new Date(e,n).getDay(),a=1;return L(Array(6)).forEach((function(u,l){var c=[];L(Array(7)).forEach((function(t,u){0===l&&u<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},re=function(e){var n=e.className,t=e.style,r=e.monthsBefore,u=void 0===r?0:r,l=e.monthsAfter,c=void 0===l?0:l,o=e.showNumbers,i=void 0!==o&&o,f=e.dayClassName,m=L(Array(u+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,u-n);return{month:t,calendar:te(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(ee,null,"S"),a.a.createElement(ee,null,"M"),a.a.createElement(ee,null,"T"),a.a.createElement(ee,null,"W"),a.a.createElement(ee,null,"T"),a.a.createElement(ee,null,"F"),a.a.createElement(ee,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(ne,{key:n,empty:!t,className:null==f?void 0:f({day:t,date:r})},i?t:"")})))}))))})))},ae=function(e){var n=e.className,t=e.style,r=e.maxWidth,u=e.series,l=void 0===u?[]:u,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(Y,{categories:c}),l.map((function(e,n){var t=e.label,r=e.value,u=e.data;return a.a.createElement(a.a.Fragment,{key:n},a.a.createElement("tr",null,a.a.createElement(q,{className:"label"},a.a.createElement("span",null,t)),a.a.createElement(W,null,(u||[r]).map((function(e,n){return a.a.createElement("div",null,a.a.createElement(I,{value:e,color:c[n].color,className:"column bar"}),a.a.createElement(D,{className:"column label"},e))})))),a.a.createElement(J,null))})))};function ue(){var e=ce(["\n width: ","%;\n height: 24px;\n background-color: ",";\n"]);return ue=function(){return e},e}function le(){var e=ce(["\n width: 100%;\n border-spacing: 0;\n"]);return le=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 oe=l.a.table(le()),ie=l.a.td(ue(),(function(e){return e.value}),(function(e){return e.color})),fe=function(e){var n=e.className,t=e.style,r=e.percents,u=void 0===r?[]:r;return a.a.createElement(oe,{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(ie,{key:n,value:t,color:r})}))))}}]);
{
"name": "@muil/charts",
"version": "0.2.12",
"version": "0.2.14",
"license": "MIT",

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

},
"gitHead": "c6f97694a24cc617e5ec40c0f8611b616d7df329"
"gitHead": "a31639c5d2252f5bdf263901068612a7f55581e7"
}
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