@corva/ui 0.80.0-8 → 0.80.0-9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("@babel/runtime/helpers/defineProperty"),e=require("@material-ui/core"),t=require("lodash"),o=require("react"),s=require("../formations.js");function a(r){return r&&"object"==typeof r&&"default"in r?r:{default:r}}var i=a(r);function n(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,o)}return t}function c(r){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?n(Object(t),!0).forEach((function(e){i.default(r,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):n(Object(t)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))}))}return r}var u=e.makeStyles({axisGrab:{cursor:"grab"},axisCrosshair:{cursor:"crosshair"}});exports.useChartModifier=function(r){var e=r.chart,a=r.chartOptions,i=r.isZoomEnabled,n=r.isMinHeightChart,l=r.handleChartSelection,f=r.onZoomChangeCallback,p=r.isAxesCoordinatesShown,h=u();o.useEffect((function(){if(!t.isEmpty(e)){var r={zIndex:1,color:"#ffffff",dashStyle:"dash"};e.plotBackground.element.style.cursor=n||!i?"grab":"crosshair",e.series.forEach((function(r){var e;return null==r||null===(e=r.group)||void 0===e?void 0:e.css({cursor:n||!i?"grab":"crosshair"})})),e.update({chart:c(c({},a),{},{plotBackgroundColor:"transparent",zoomType:n||!i?"none":a.zoomType}),xAxis:{crosshair:p?r:null,className:i?h.axisCrosshair:h.axisGrab,events:{afterSetExtremes:function(r){var t;"zoom"!==r.trigger&&"navigator"!==r.trigger||l(),null!==(t=e.xAxis[0].userOptions.plotLines)&&void 0!==
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("@babel/runtime/helpers/defineProperty"),e=require("@material-ui/core"),t=require("lodash"),o=require("react"),s=require("../formations.js");function a(r){return r&&"object"==typeof r&&"default"in r?r:{default:r}}var i=a(r);function n(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,o)}return t}function c(r){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?n(Object(t),!0).forEach((function(e){i.default(r,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):n(Object(t)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))}))}return r}var u=e.makeStyles({axisGrab:{cursor:"grab"},axisCrosshair:{cursor:"crosshair"}});exports.useChartModifier=function(r){var e=r.chart,a=r.chartOptions,i=r.isZoomEnabled,n=r.isMinHeightChart,l=r.handleChartSelection,f=r.onZoomChangeCallback,p=r.isAxesCoordinatesShown,h=u();o.useEffect((function(){if(!t.isEmpty(e)){var r={zIndex:1,color:"#ffffff",dashStyle:"dash"};e.plotBackground.element.style.cursor=n||!i?"grab":"crosshair",e.series.forEach((function(r){var e;return null==r||null===(e=r.group)||void 0===e?void 0:e.css({cursor:n||!i?"grab":"crosshair"})})),e.update({chart:c(c({},a),{},{plotBackgroundColor:"transparent",zoomType:n||!i?"none":a.zoomType}),xAxis:{crosshair:p?r:null,className:i?h.axisCrosshair:h.axisGrab,events:{afterSetExtremes:function(r){var t,o;"zoom"!==r.trigger&&"navigator"!==r.trigger||l(),null!==(t=e.xAxis)&&void 0!==t&&null!==(o=t[0].userOptions.plotLines)&&void 0!==o&&o.length&&s.updateAxisStyles({chart:e}),f(r)}}},yAxis:{crosshair:p?r:null,className:i?h.axisCrosshair:h.axisGrab,events:{afterSetExtremes:function(r){"zoom"!==r.trigger&&"navigator"!==r.trigger||l(),f(r)}}},plotOptions:{series:{cursor:n||!i?"grab":"crosshair"}}})}}),[i,l,p])};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import r from"@babel/runtime/helpers/defineProperty";import{makeStyles as e}from"@material-ui/core";import{isEmpty as o}from"lodash";import{useEffect as t}from"react";import{updateAxisStyles as s}from"../formations.js";function a(r,e){var o=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.push.apply(o,t)}return o}function i(e){for(var o=1;o<arguments.length;o++){var t=null!=arguments[o]?arguments[o]:{};o%2?a(Object(t),!0).forEach((function(o){r(e,o,t[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var n=e({axisGrab:{cursor:"grab"},axisCrosshair:{cursor:"crosshair"}}),c=function(r){var e=r.chart,a=r.chartOptions,c=r.isZoomEnabled,l=r.isMinHeightChart,p=r.handleChartSelection,
|
|
1
|
+
import r from"@babel/runtime/helpers/defineProperty";import{makeStyles as e}from"@material-ui/core";import{isEmpty as o}from"lodash";import{useEffect as t}from"react";import{updateAxisStyles as s}from"../formations.js";function a(r,e){var o=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.push.apply(o,t)}return o}function i(e){for(var o=1;o<arguments.length;o++){var t=null!=arguments[o]?arguments[o]:{};o%2?a(Object(t),!0).forEach((function(o){r(e,o,t[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var n=e({axisGrab:{cursor:"grab"},axisCrosshair:{cursor:"crosshair"}}),c=function(r){var e=r.chart,a=r.chartOptions,c=r.isZoomEnabled,l=r.isMinHeightChart,p=r.handleChartSelection,u=r.onZoomChangeCallback,f=r.isAxesCoordinatesShown,h=n();t((function(){if(!o(e)){var r={zIndex:1,color:"#ffffff",dashStyle:"dash"};e.plotBackground.element.style.cursor=l||!c?"grab":"crosshair",e.series.forEach((function(r){var e;return null==r||null===(e=r.group)||void 0===e?void 0:e.css({cursor:l||!c?"grab":"crosshair"})})),e.update({chart:i(i({},a),{},{plotBackgroundColor:"transparent",zoomType:l||!c?"none":a.zoomType}),xAxis:{crosshair:f?r:null,className:c?h.axisCrosshair:h.axisGrab,events:{afterSetExtremes:function(r){var o,t;"zoom"!==r.trigger&&"navigator"!==r.trigger||p(),null!==(o=e.xAxis)&&void 0!==o&&null!==(t=o[0].userOptions.plotLines)&&void 0!==t&&t.length&&s({chart:e}),u(r)}}},yAxis:{crosshair:f?r:null,className:c?h.axisCrosshair:h.axisGrab,events:{afterSetExtremes:function(r){"zoom"!==r.trigger&&"navigator"!==r.trigger||p(),u(r)}}},plotOptions:{series:{cursor:l||!c?"grab":"crosshair"}}})}}),[c,p,f])};export{c as useChartModifier};
|