@corva/ui 0.54.0-5 → 0.54.0-6
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
|
-
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"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"@babel/runtime/helpers/typeof";import"../../../config/mapbox/index.js";import{getAppTitle as h,getExpander as p,getOffsetPicker as l,getSecondaryAsset as a,getModeSelect as f,getPrimaryAsset 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 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=h(r),t=p(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?b:j+x<=n?g:y)}}),[i,n]),u}function P(h){var p=i({}),a=t(null),f=e(a,2),d=f[0],b=f[1],g=i({});return o((function(){var e=h.filter((function(r){return!!r}));if(!m(e,g.current)){var t=l(h),o=c(t,"key");p.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(),p.current=v(v({},p.current),{},r({},t.key,o.width)),Object.values(p.current).length===e.length&&(m(d,p.current)||b(p.current))}))})),g.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
|
|
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"@babel/runtime/helpers/typeof";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
|
|
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 a}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"@babel/runtime/helpers/typeof";import"../../../config/mapbox/index.js";import p 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 a=o[e.key];if(a<=m)return void s(b);if(a<=m/2)return void s(g)}else if(c||u){var p=o[e.key],v=c?o[t.key]:o[i.key];if(p+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(p){var h=o({}),f=t(null),d=e(f,2),b=d[0],g=d[1],y=o({});return i((function(){var e=p.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:a,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:a,children:v(p,{})}),r,(function(){var e=r.getBoundingClientRect();r.remove(),u(e.width)}))}),[]),m}export{w as useAppFilterTogglerWidth,P as useComonentsWidth,k as useFilterLayout};
|
package/config/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as theme from "./theme";
|
|
2
|
+
import { initHighcharts } from "./highcharts";
|
|
2
3
|
import { MAP_BOX_ACCESS_TOKEN } from "./mapbox";
|
|
3
|
-
export { theme, MAP_BOX_ACCESS_TOKEN };
|
|
4
|
+
export { theme, initHighcharts, MAP_BOX_ACCESS_TOKEN };
|
|
4
5
|
//# sourceMappingURL=index.d.ts.map
|
package/config/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as h from"./theme/index.js";export{h as theme};export{initHighcharts}from"./highcharts/highcharts.js";export{MAP_BOX_ACCESS_TOKEN}from"./mapbox/index.js";
|