@corva/ui 0.75.0-8 → 0.75.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.
- package/cjs-bundle/components/HeaderLayout/effects/index.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV2/components/Map/Map.js +1 -1
- package/cjs-bundle/components/PinnableFilters/effects/index.js +1 -1
- package/cjs-bundle/config/highcharts/highcharts.js +1 -1
- package/components/HeaderLayout/effects/index.js +1 -1
- package/components/OffsetWellPickerV2/components/Map/Map.js +1 -1
- package/components/PinnableFilters/effects/index.js +1 -1
- package/config/highcharts/highcharts.d.ts.map +1 -1
- package/config/highcharts/highcharts.js +1 -1
- package/package.json +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),r=require("@babel/runtime/helpers/slicedToArray"),t=require("react"),i=require("react-dom"),u=require("lodash"),n=require("@material-ui/core/styles"),s=require("../../../config/theme/index.js");require("highcharts"),require("highcharts/highcharts-more"),require("highcharts-multicolor-series"),require("highcharts/modules/solid-gauge"),require("highcharts/modules/heatmap"),require("highcharts/modules/boost"),require("highcharts/modules/exporting"),require("highcharts/modules/xrange"),require("highcharts/modules/dumbbell"),require("highcharts/modules/pattern-fill"),require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),r=require("@babel/runtime/helpers/slicedToArray"),t=require("react"),i=require("react-dom"),u=require("lodash"),n=require("@material-ui/core/styles"),s=require("../../../config/theme/index.js");require("@babel/runtime/helpers/typeof"),require("highcharts"),require("highcharts/highcharts-more"),require("highcharts-multicolor-series"),require("highcharts/modules/solid-gauge"),require("highcharts/modules/heatmap"),require("highcharts/modules/boost"),require("highcharts/modules/exporting"),require("highcharts/modules/xrange"),require("highcharts/modules/dumbbell"),require("highcharts/modules/pattern-fill"),require("dompurify"),require("../../../config/mapbox/index.js");var o=require("../utils.js"),c=require("../constants.js"),a=require("react/jsx-runtime");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var h=l(e),f=l(r),d=l(i);function g(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,i)}return t}function p(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?g(Object(t),!0).forEach((function(r){h.default(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):g(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}exports.useComonentsWidth=function(e){var r=t.useRef({}),i=t.useState(null),c=f.default(i,2),l=c[0],g=c[1],y=t.useRef({});return t.useEffect((function(){var t=e.filter((function(e){return!!e}));if(!u.isEqual(t,y.current)){var i=o.getOffsetPicker(e),c=u.get(i,"key");r.current=c?h.default({},c,36):{},t.forEach((function(e){var i=document.createElement("div");i.style.position="absolute",i.style.visibility="hidden",document.body.appendChild(i),e&&e.key!==c&&d.default.render(a.jsx(n.MuiThemeProvider,{theme:s.darkTheme,children:e}),i,(function(){var n=i.getBoundingClientRect();i.remove(),r.current=p(p({},r.current),{},h.default({},e.key,n.width)),Object.values(r.current).length===t.length&&(u.isEqual(l,r.current)||g(r.current))}))})),y.current=t}})),l},exports.useFilterLayout=function(e,r,i){var n=t.useState(null),s=f.default(n,2),a=s[0],l=s[1];return t.useEffect((function(){if(i&&r){var t=o.getAppTitle(e),n=o.getExpander(e),s=o.getOffsetPicker(e),a=o.getSecondaryAsset(e),h=o.getModeSelect(e),f=o.getPrimaryAsset(e),d=r[u.get(t,"key")]||0,g=r[u.get(n,"key")]||0,p=r[u.get(s,"key")]||0,y=r[u.get(a,"key")]||0,m=r[u.get(h,"key")]||0,b=r[u.get(f,"key")]||0;l(d+(g+p+y+m+b)<=i?c.LARGE_SIZE_LAYOUT:d+b<=i?c.MEDIUM_SIZE_LAYOUT:c.SMALL_SIZE_LAYOUT)}}),[r,i]),a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),r=require("@babel/runtime/helpers/slicedToArray"),t=require("react"),u=require("react-dom"),o=require("prop-types"),n=require("mapbox.js"),a=require("lodash"),i=require("@material-ui/core/styles"),l=require("../../../../utils/index.js"),s=require("../../../../config/theme/index.js");require("highcharts"),require("highcharts/highcharts-more"),require("highcharts-multicolor-series"),require("highcharts/modules/solid-gauge"),require("highcharts/modules/heatmap"),require("highcharts/modules/boost"),require("highcharts/modules/exporting"),require("highcharts/modules/xrange"),require("highcharts/modules/dumbbell"),require("highcharts/modules/pattern-fill"),require("
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),r=require("@babel/runtime/helpers/slicedToArray"),t=require("react"),u=require("react-dom"),o=require("prop-types"),n=require("mapbox.js"),a=require("lodash"),i=require("@material-ui/core/styles"),l=require("../../../../utils/index.js"),s=require("../../../../config/theme/index.js");require("@babel/runtime/helpers/typeof"),require("highcharts"),require("highcharts/highcharts-more"),require("highcharts-multicolor-series"),require("highcharts/modules/solid-gauge"),require("highcharts/modules/heatmap"),require("highcharts/modules/boost"),require("highcharts/modules/exporting"),require("highcharts/modules/xrange"),require("highcharts/modules/dumbbell"),require("highcharts/modules/pattern-fill"),require("dompurify"),require("../../../../config/mapbox/index.js");var c=require("../../effects/index.js"),d=require("./Map.css.js"),f=require("react/jsx-runtime");function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=m(e),h=m(r),b=m(u),g=m(o),F=m(n);function j(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);r&&(u=u.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,u)}return t}function v(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?j(Object(t),!0).forEach((function(r){p.default(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):j(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var y=l.mapbox.isValidCoordinates,q=["#FF00FF","#F5BD80","#FF0000","#0080FF","#FF8000","#58ACFA","#FA58F4","#40FF00","#4B8A08","#40FF00","#D8F781"],x=[29.749907,-95.358421];function O(e){var r=e.subjectWell,u=e.wells,o=e.offsetWells,n=e.radius,l=e.subjectWellMarkerSize,m=e.wellMarkerSize,g=e.popUpFormatter,j=e.coordsDataPath,O=t.useRef(null),k=t.useRef(null),P=t.useRef(null),N=c.usePrevious(u),w=t.useMemo((function(){return u.filter((function(e){return!r||r.id!==e.id}))}),[r,u]),B=t.useMemo((function(){return r&&a.get(r,j)}),[r,j]),M=t.useMemo((function(){var e=[],t=!1;w.forEach((function(u){"Null"===u.formation?t=!0:r&&r.formation===u.formation||e.includes(u.formation)||e.push(u.formation)}));var u=r?[r.formation].concat(a.sortBy(e)):a.sortBy(e);t&&!u.includes("Null")&&u.push("Null");var o=u.reduce((function(e,r,t){return v(v({},e),{},p.default({},r,q[t%q.length]))}),{});return[u,o]}),[r,w]),T=h.default(M,2),E=T[0],S=T[1];return t.useEffect((function(){O.current=F.default.mapbox.map(O.current,null,{attributionControl:!1,scrollWheelZoom:!1,zoomControl:!1}).setView(x,1),F.default.control.zoom({position:"bottomright"}).addTo(O.current),F.default.mapbox.styleLayer("mapbox://styles/mapbox/dark-v9").addTo(O.current)}),[]),t.useEffect((function(){O.current&&(k.current&&O.current.removeLayer(k.current),B?(k.current=F.default.circle(B,1609.34*n,{stroke:!1,fill:!0,fillOpacity:.2,fillColor:"#03BCD4",className:"circle_500"}),k.current.addTo(O.current)):k.current=null)}),[n,B]),t.useEffect((function(){if(O.current){O.current.closePopup(),P.current&&P.current.removeFrom(O.current);var e=o.map((function(e){return e.id})),n=[];u.forEach((function(u){var o=a.get(u,j);if(o&&y(o)){var c=r&&r.id===u.id,d=e.includes(u.id),p=c?l:m,h=c||d?"#00FFFF":S[u.formation],v=c||d?1:.3,q=F.default.circleMarker(o,{radius:p,stroke:!1,fill:!0,fillOpacity:v,fillColor:h,className:"circle_500"});q.addEventListener("mouseover",(function(){if(g){var e=document.createElement("div"),r=t.createElement(g,{well:u,color:S[u.formation]});b.default.render(f.jsx(i.MuiThemeProvider,{theme:s.darkTheme,children:r}),e),F.default.popup().setLatLng(o).setContent(e).openOn(O.current)}})),n.push(q)}})),n.length&&(P.current=F.default.featureGroup(n),P.current.addTo(O.current)),setTimeout((function(){k.current&&k.current.bringToBack(),O.current&&k.current&&u!==N&&O.current.fitBounds(k.current.getBounds(),{padding:[5,5]})}),500)}}),[r,u,o,S]),t.useEffect((function(){setTimeout((function(){k.current&&k.current.bringToBack(),r?O.current&&k.current&&O.current.fitBounds(k.current.getBounds(),{padding:[5,5]}):O.current&&P.current&&O.current.fitBounds(P.current.getBounds())}),500)}),[n,r]),f.jsxs("div",{className:d.map,children:[f.jsx("div",{className:d.mapMain,ref:O}),f.jsxs("div",{className:d.mapFooter,children:[o&&f.jsxs("div",{className:d.mapFooterItem,children:[f.jsx("div",{className:d.mapFooterItemSquare,style:{backgroundColor:"#00FFFF"}}),f.jsx("div",{className:d.mapFooterItemLabel,children:"Selected Offset Wells"})]}),E.map((function(e){return f.jsxs("div",{className:d.mapFooterItem,children:[f.jsx("div",{className:d.mapFooterItemSquare,style:{backgroundColor:S[e]}}),f.jsx("div",{className:d.mapFooterItemLabel,children:e})]},e)}))]})]})}O.propTypes={subjectWell:g.default.shape({id:g.default.number,formation:g.default.string}),wells:g.default.arrayOf(g.default.shape({})).isRequired,offsetWells:g.default.arrayOf(g.default.shape({})),radius:g.default.number.isRequired,subjectWellMarkerSize:g.default.number,wellMarkerSize:g.default.number,popUpFormatter:g.default.func,coordsDataPath:g.default.string},O.defaultProps={subjectWell:null,subjectWellMarkerSize:10,wellMarkerSize:5,popUpFormatter:null,coordsDataPath:"settings.top_hole.coordinates",offsetWells:null};var k=t.memo(O);module.exports=k;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),r=require("@babel/runtime/helpers/slicedToArray"),t=require("react"),i=require("react-dom"),u=require("lodash"),n=require("@material-ui/core/styles"),o=require("@material-ui/pickers"),s=require("@date-io/moment"),l=require("moment"),a=require("../../../config/theme/index.js");require("highcharts"),require("highcharts/highcharts-more"),require("highcharts-multicolor-series"),require("highcharts/modules/solid-gauge"),require("highcharts/modules/heatmap"),require("highcharts/modules/boost"),require("highcharts/modules/exporting"),require("highcharts/modules/xrange"),require("highcharts/modules/dumbbell"),require("highcharts/modules/pattern-fill"),require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),r=require("@babel/runtime/helpers/slicedToArray"),t=require("react"),i=require("react-dom"),u=require("lodash"),n=require("@material-ui/core/styles"),o=require("@material-ui/pickers"),s=require("@date-io/moment"),l=require("moment"),a=require("../../../config/theme/index.js");require("@babel/runtime/helpers/typeof"),require("highcharts"),require("highcharts/highcharts-more"),require("highcharts-multicolor-series"),require("highcharts/modules/solid-gauge"),require("highcharts/modules/heatmap"),require("highcharts/modules/boost"),require("highcharts/modules/exporting"),require("highcharts/modules/xrange"),require("highcharts/modules/dumbbell"),require("highcharts/modules/pattern-fill"),require("dompurify"),require("../../../config/mapbox/index.js");var c=require("../components/FiltersToggler.js"),d=require("../utils.js"),f=require("../constants.js"),h=require("react/jsx-runtime");function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=m(e),g=m(r),v=m(i),y=m(s),b=m(l);function q(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,i)}return t}function O(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?q(Object(t),!0).forEach((function(r){p.default(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):q(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}exports.useAppFilterTogglerWidth=function(){var e=t.useState(null),r=g.default(e,2),i=r[0],u=r[1];return t.useEffect((function(){var e=document.createElement("div");e.style.position="absolute",e.style.visibility="hidden",document.body.appendChild(e),v.default.render(h.jsx(n.MuiThemeProvider,{theme:a.darkTheme,children:h.jsx(c,{})}),e,(function(){var r=e.getBoundingClientRect();e.remove(),u(r.width)}))}),[]),i},exports.useComonentsWidth=function(e){var r=t.useRef({}),i=t.useState(null),s=g.default(i,2),l=s[0],c=s[1],d=t.useRef({});return t.useEffect((function(){var t=e.filter((function(e){return!!e}));u.isEqual(t,d.current)||(r.current={},t.forEach((function(e){var i=document.createElement("div");i.style.position="absolute",i.style.visibility="hidden",document.body.appendChild(i),e&&v.default.render(h.jsx(n.MuiThemeProvider,{theme:a.darkTheme,children:h.jsx(o.MuiPickersUtilsProvider,{libInstance:b.default,utils:y.default,children:e})}),i,(function(){var n=i.getBoundingClientRect();i.remove(),r.current=O(O({},r.current),{},p.default({},e.key,n.width)),Object.values(r.current).length===t.length&&(u.isEqual(l,r.current)||c(r.current))}))})),d.current=t)})),l},exports.useFilterLayout=function(e,r,i,u){var n=t.useState(null),o=g.default(n,2),s=o[0],l=o[1];return t.useEffect((function(){if(u&&r){var t=d.getStartComponent(e),n=d.getMiddleComponent(e),o=d.getEndComponents(e),s=t&&n&&!o,a=t&&!n&&o,c=t&&n&&o;if(t&&!n&&!o){var h=r[t.key];if(h<=u)return void l(f.LARGE_SIZE_LAYOUT);if(h<=u/2)return void l(f.MEDIUM_SIZE_LAYOUT)}else if(s||a){var m=r[t.key],p=s?r[n.key]:r[o.key];if(m+p<=u)return void l(f.LARGE_SIZE_LAYOUT);if(i+p<=u)return void l(f.MEDIUM_SIZE_LAYOUT)}else if(c){var g=r[t.key],v=r[n.key],y=r[o.key];if(g+v+y<=u)return void l(f.LARGE_SIZE_LAYOUT);if(i+v+y<=u)return void l(f.MEDIUM_SIZE_LAYOUT);if(i+y<=u)return void l(f.SMALL_SIZE_LAYOUT)}l(f.SMALL_SIZE_LAYOUT)}}),[r,u]),s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/slicedToArray"),t=require("@babel/runtime/helpers/typeof"),r=require("highcharts"),u=require("highcharts/highcharts-more"),a=require("highcharts-multicolor-series"),i=require("highcharts/modules/solid-gauge"),l=require("highcharts/modules/heatmap"),f=require("highcharts/modules/boost"),o=require("highcharts/modules/exporting"),n=require("highcharts/modules/xrange"),h=require("highcharts/modules/dumbbell"),s=require("highcharts/modules/pattern-fill"),d=require("./highcharts-contour.js"),c=require("dompurify");function g(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function p(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var u=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,u.get?u:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var b=g(e),m=g(t),q=g(r),y=g(u),j=g(a),v=g(i),O=g(l),w=g(f),x=g(o),A=g(n),_=g(h),z=g(s),E=p(c),P=function e(t){return"string"==typeof t?E.sanitize(t):("object"===m.default(t)&&null!==t&&Object.entries(t).forEach((function(r){var u=b.default(r,2),a=u[0],i=u[1];"string"==typeof i?t[a]=E.sanitize(t[a]):Array.isArray(i)?i.forEach((function(r,u){t[a][u]=e(r)})):"object"===m.default(i)&&(t[a]=e(i))})),t)};exports.initHighcharts=function(){window.Highcharts=q.default,j.default(q.default),y.default(q.default),v.default(q.default),O.default(q.default),w.default(q.default),x.default(q.default),A.default(q.default),_.default(q.default),z.default(q.default),d(q.default);var e=q.default.chart;q.default.chart=function(t){for(var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=arguments.length,a=new Array(u>2?u-2:0),i=2;i<u;i++)a[i-2]=arguments[i];return e.apply(void 0,[t,P(r)].concat(a))},q.default.setOptions({plotOptions:{series:{states:{inactive:{enabled:!1}}}}})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import r from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/slicedToArray";import{useState as t,useEffect as o,useRef as i}from"react";import n from"react-dom";import{get as c,isEqual as m}from"lodash";import{MuiThemeProvider as s}from"@material-ui/core/styles";import{darkTheme as u}from"../../../config/theme/index.js";import"highcharts";import"highcharts/highcharts-more";import"highcharts-multicolor-series";import"highcharts/modules/solid-gauge";import"highcharts/modules/heatmap";import"highcharts/modules/boost";import"highcharts/modules/exporting";import"highcharts/modules/xrange";import"highcharts/modules/dumbbell";import"highcharts/modules/pattern-fill";import"
|
|
1
|
+
import r from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/slicedToArray";import{useState as t,useEffect as o,useRef as i}from"react";import n from"react-dom";import{get as c,isEqual as m}from"lodash";import{MuiThemeProvider as s}from"@material-ui/core/styles";import{darkTheme as u}from"../../../config/theme/index.js";import"@babel/runtime/helpers/typeof";import"highcharts";import"highcharts/highcharts-more";import"highcharts-multicolor-series";import"highcharts/modules/solid-gauge";import"highcharts/modules/heatmap";import"highcharts/modules/boost";import"highcharts/modules/exporting";import"highcharts/modules/xrange";import"highcharts/modules/dumbbell";import"highcharts/modules/pattern-fill";import"dompurify";import"../../../config/mapbox/index.js";import{getAppTitle as p,getExpander as h,getOffsetPicker as l,getSecondaryAsset as a,getModeSelect as f,getPrimaryAsset as d}from"../utils.js";import{LARGE_SIZE_LAYOUT as y,MEDIUM_SIZE_LAYOUT as b,SMALL_SIZE_LAYOUT as g}from"../constants.js";import{jsx as O}from"react/jsx-runtime";function j(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 v(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?j(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):j(Object(o)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r))}))}return e}function k(r,i,n){var m=t(null),s=e(m,2),u=s[0],O=s[1];return o((function(){if(n&&i){var e=p(r),t=h(r),o=l(r),m=a(r),s=f(r),u=d(r),j=i[c(e,"key")]||0,v=i[c(t,"key")]||0,k=i[c(o,"key")]||0,P=i[c(m,"key")]||0,w=i[c(s,"key")]||0,x=i[c(u,"key")]||0;O(j+(v+k+P+w+x)<=n?y:j+x<=n?b:g)}}),[i,n]),u}function P(p){var h=i({}),a=t(null),f=e(a,2),d=f[0],y=f[1],b=i({});return o((function(){var e=p.filter((function(r){return!!r}));if(!m(e,b.current)){var t=l(p),o=c(t,"key");h.current=o?r({},o,36):{},e.forEach((function(t){var i=document.createElement("div");i.style.position="absolute",i.style.visibility="hidden",document.body.appendChild(i),t&&t.key!==o&&n.render(O(s,{theme:u,children:t}),i,(function(){var o=i.getBoundingClientRect();i.remove(),h.current=v(v({},h.current),{},r({},t.key,o.width)),Object.values(h.current).length===e.length&&(m(d,h.current)||y(h.current))}))})),b.current=e}})),d}export{P as useComonentsWidth,k as useFilterLayout};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import r from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/slicedToArray";import{memo as t,useRef as o,useMemo as n,useEffect as i,createElement as a}from"react";import c from"react-dom";import l from"prop-types";import u from"mapbox.js";import{get as s,sortBy as m}from"lodash";import{MuiThemeProvider as p}from"@material-ui/core/styles";import{mapbox as f}from"../../../../utils/index.js";import{darkTheme as d}from"../../../../config/theme/index.js";import"highcharts";import"highcharts/highcharts-more";import"highcharts-multicolor-series";import"highcharts/modules/solid-gauge";import"highcharts/modules/heatmap";import"highcharts/modules/boost";import"highcharts/modules/exporting";import"highcharts/modules/xrange";import"highcharts/modules/dumbbell";import"highcharts/modules/pattern-fill";import"
|
|
1
|
+
import r from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/slicedToArray";import{memo as t,useRef as o,useMemo as n,useEffect as i,createElement as a}from"react";import c from"react-dom";import l from"prop-types";import u from"mapbox.js";import{get as s,sortBy as m}from"lodash";import{MuiThemeProvider as p}from"@material-ui/core/styles";import{mapbox as f}from"../../../../utils/index.js";import{darkTheme as d}from"../../../../config/theme/index.js";import"@babel/runtime/helpers/typeof";import"highcharts";import"highcharts/highcharts-more";import"highcharts-multicolor-series";import"highcharts/modules/solid-gauge";import"highcharts/modules/heatmap";import"highcharts/modules/boost";import"highcharts/modules/exporting";import"highcharts/modules/xrange";import"highcharts/modules/dumbbell";import"highcharts/modules/pattern-fill";import"dompurify";import"../../../../config/mapbox/index.js";import{usePrevious as h}from"../../effects/index.js";import b from"./Map.css.js";import{jsx as g,jsxs as F}from"react/jsx-runtime";function v(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 y(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?v(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):v(Object(o)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r))}))}return e}var j=f.isValidCoordinates,O=["#FF00FF","#F5BD80","#FF0000","#0080FF","#FF8000","#58ACFA","#FA58F4","#40FF00","#4B8A08","#40FF00","#D8F781"],k=[29.749907,-95.358421];function x(t){var l=t.subjectWell,f=t.wells,v=t.offsetWells,x=t.radius,N=t.subjectWellMarkerSize,P=t.wellMarkerSize,w=t.popUpFormatter,B=t.coordsDataPath,S=o(null),W=o(null),C=o(null),D=h(f),T=n((function(){return f.filter((function(r){return!l||l.id!==r.id}))}),[l,f]),M=n((function(){return l&&s(l,B)}),[l,B]),z=n((function(){var e=[],t=!1;T.forEach((function(r){"Null"===r.formation?t=!0:l&&l.formation===r.formation||e.includes(r.formation)||e.push(r.formation)}));var o=l?[l.formation].concat(m(e)):m(e);t&&!o.includes("Null")&&o.push("Null");var n=o.reduce((function(e,t,o){return y(y({},e),{},r({},t,O[o%O.length]))}),{});return[o,n]}),[l,T]),L=e(z,2),E=L[0],I=L[1];return i((function(){S.current=u.mapbox.map(S.current,null,{attributionControl:!1,scrollWheelZoom:!1,zoomControl:!1}).setView(k,1),u.control.zoom({position:"bottomright"}).addTo(S.current),u.mapbox.styleLayer("mapbox://styles/mapbox/dark-v9").addTo(S.current)}),[]),i((function(){S.current&&(W.current&&S.current.removeLayer(W.current),M?(W.current=u.circle(M,1609.34*x,{stroke:!1,fill:!0,fillOpacity:.2,fillColor:"#03BCD4",className:"circle_500"}),W.current.addTo(S.current)):W.current=null)}),[x,M]),i((function(){if(S.current){S.current.closePopup(),C.current&&C.current.removeFrom(S.current);var r=v.map((function(r){return r.id})),e=[];f.forEach((function(t){var o=s(t,B);if(o&&j(o)){var n=l&&l.id===t.id,i=r.includes(t.id),m=n?N:P,f=n||i?"#00FFFF":I[t.formation],h=n||i?1:.3,b=u.circleMarker(o,{radius:m,stroke:!1,fill:!0,fillOpacity:h,fillColor:f,className:"circle_500"});b.addEventListener("mouseover",(function(){if(w){var r=document.createElement("div"),e=a(w,{well:t,color:I[t.formation]});c.render(g(p,{theme:d,children:e}),r),u.popup().setLatLng(o).setContent(r).openOn(S.current)}})),e.push(b)}})),e.length&&(C.current=u.featureGroup(e),C.current.addTo(S.current)),setTimeout((function(){W.current&&W.current.bringToBack(),S.current&&W.current&&f!==D&&S.current.fitBounds(W.current.getBounds(),{padding:[5,5]})}),500)}}),[l,f,v,I]),i((function(){setTimeout((function(){W.current&&W.current.bringToBack(),l?S.current&&W.current&&S.current.fitBounds(W.current.getBounds(),{padding:[5,5]}):S.current&&C.current&&S.current.fitBounds(C.current.getBounds())}),500)}),[x,l]),F("div",{className:b.map,children:[g("div",{className:b.mapMain,ref:S}),F("div",{className:b.mapFooter,children:[v&&F("div",{className:b.mapFooterItem,children:[g("div",{className:b.mapFooterItemSquare,style:{backgroundColor:"#00FFFF"}}),g("div",{className:b.mapFooterItemLabel,children:"Selected Offset Wells"})]}),E.map((function(r){return F("div",{className:b.mapFooterItem,children:[g("div",{className:b.mapFooterItemSquare,style:{backgroundColor:I[r]}}),g("div",{className:b.mapFooterItemLabel,children:r})]},r)}))]})]})}x.propTypes={subjectWell:l.shape({id:l.number,formation:l.string}),wells:l.arrayOf(l.shape({})).isRequired,offsetWells:l.arrayOf(l.shape({})),radius:l.number.isRequired,subjectWellMarkerSize:l.number,wellMarkerSize:l.number,popUpFormatter:l.func,coordsDataPath:l.string},x.defaultProps={subjectWell:null,subjectWellMarkerSize:10,wellMarkerSize:5,popUpFormatter:null,coordsDataPath:"settings.top_hole.coordinates",offsetWells:null};var N=t(x);export{N as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import r from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/slicedToArray";import{useState as t,useEffect as i,useRef as o}from"react";import n from"react-dom";import{isEqual as m}from"lodash";import{MuiThemeProvider as c}from"@material-ui/core/styles";import{MuiPickersUtilsProvider as u}from"@material-ui/pickers";import l from"@date-io/moment";import s from"moment";import{darkTheme as
|
|
1
|
+
import r from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/slicedToArray";import{useState as t,useEffect as i,useRef as o}from"react";import n from"react-dom";import{isEqual as m}from"lodash";import{MuiThemeProvider as c}from"@material-ui/core/styles";import{MuiPickersUtilsProvider as u}from"@material-ui/pickers";import l from"@date-io/moment";import s from"moment";import{darkTheme as p}from"../../../config/theme/index.js";import"@babel/runtime/helpers/typeof";import"highcharts";import"highcharts/highcharts-more";import"highcharts-multicolor-series";import"highcharts/modules/solid-gauge";import"highcharts/modules/heatmap";import"highcharts/modules/boost";import"highcharts/modules/exporting";import"highcharts/modules/xrange";import"highcharts/modules/dumbbell";import"highcharts/modules/pattern-fill";import"dompurify";import"../../../config/mapbox/index.js";import a from"../components/FiltersToggler.js";import{getStartComponent as h,getMiddleComponent as f,getEndComponents as d}from"../utils.js";import{LARGE_SIZE_LAYOUT as b,MEDIUM_SIZE_LAYOUT as g,SMALL_SIZE_LAYOUT as y}from"../constants.js";import{jsx as v}from"react/jsx-runtime";function j(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,i)}return t}function O(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?j(Object(i),!0).forEach((function(t){r(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):j(Object(i)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(i,r))}))}return e}function k(r,o,n,m){var c=t(null),u=e(c,2),l=u[0],s=u[1];return i((function(){if(m&&o){var e=h(r),t=f(r),i=d(r),c=e&&t&&!i,u=e&&!t&&i,l=e&&t&&i;if(e&&!t&&!i){var p=o[e.key];if(p<=m)return void s(b);if(p<=m/2)return void s(g)}else if(c||u){var a=o[e.key],v=c?o[t.key]:o[i.key];if(a+v<=m)return void s(b);if(n+v<=m)return void s(g)}else if(l){var j=o[e.key],O=o[t.key],k=o[i.key];if(j+O+k<=m)return void s(b);if(n+O+k<=m)return void s(g);if(n+k<=m)return void s(y)}s(y)}}),[o,m]),l}function P(a){var h=o({}),f=t(null),d=e(f,2),b=d[0],g=d[1],y=o({});return i((function(){var e=a.filter((function(r){return!!r}));m(e,y.current)||(h.current={},e.forEach((function(t){var i=document.createElement("div");i.style.position="absolute",i.style.visibility="hidden",document.body.appendChild(i),t&&n.render(v(c,{theme:p,children:v(u,{libInstance:s,utils:l,children:t})}),i,(function(){var o=i.getBoundingClientRect();i.remove(),h.current=O(O({},h.current),{},r({},t.key,o.width)),Object.values(h.current).length===e.length&&(m(b,h.current)||g(h.current))}))})),y.current=e)})),b}function w(){var r=t(null),o=e(r,2),m=o[0],u=o[1];return i((function(){var r=document.createElement("div");r.style.position="absolute",r.style.visibility="hidden",document.body.appendChild(r),n.render(v(c,{theme:p,children:v(a,{})}),r,(function(){var e=r.getBoundingClientRect();r.remove(),u(e.width)}))}),[]),m}export{w as useAppFilterTogglerWidth,P as useComonentsWidth,k as useFilterLayout};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"highcharts.d.ts","sourceRoot":"","sources":["../../../src/config/highcharts/highcharts.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"highcharts.d.ts","sourceRoot":"","sources":["../../../src/config/highcharts/highcharts.js"],"names":[],"mappings":"AAgDA,uCAyCC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"highcharts";import
|
|
1
|
+
import r from"@babel/runtime/helpers/slicedToArray";import o from"@babel/runtime/helpers/typeof";import t from"highcharts";import i from"highcharts/highcharts-more";import e from"highcharts-multicolor-series";import h from"highcharts/modules/solid-gauge";import m from"highcharts/modules/heatmap";import s from"highcharts/modules/boost";import a from"highcharts/modules/exporting";import n from"highcharts/modules/xrange";import c from"highcharts/modules/dumbbell";import p from"highcharts/modules/pattern-fill";import f from"./highcharts-contour.js";import*as l from"dompurify";var u=function t(i){return"string"==typeof i?l.sanitize(i):("object"===o(i)&&null!==i&&Object.entries(i).forEach((function(e){var h=r(e,2),m=h[0],s=h[1];"string"==typeof s?i[m]=l.sanitize(i[m]):Array.isArray(s)?s.forEach((function(r,o){i[m][o]=t(r)})):"object"===o(s)&&(i[m]=t(s))})),i)};function g(){window.Highcharts=t,e(t),i(t),h(t),m(t),s(t),a(t),n(t),c(t),p(t),f(t);var r=t.chart;t.chart=function(o){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length,e=new Array(i>2?i-2:0),h=2;h<i;h++)e[h-2]=arguments[h];return r.apply(void 0,[o,u(t)].concat(e))},t.setOptions({plotOptions:{series:{states:{inactive:{enabled:!1}}}}})}export{g as initHighcharts};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@corva/ui",
|
|
3
|
-
"version": "0.75.0-
|
|
3
|
+
"version": "0.75.0-9",
|
|
4
4
|
"description": "Shared components/utils for Corva ui projects",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"corva-ui"
|
|
@@ -97,6 +97,7 @@
|
|
|
97
97
|
"chroma-js": "1.4.1",
|
|
98
98
|
"classnames": "2.2.6",
|
|
99
99
|
"corva-convert-units": "1.12.0",
|
|
100
|
+
"dompurify": "3.0.6",
|
|
100
101
|
"dotenv": "^10.0.0",
|
|
101
102
|
"echarts": "^5.4.3",
|
|
102
103
|
"echarts-for-react": "^3.0.2",
|