@corva/ui 0.54.0-0 → 0.54.0-1
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/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/extendNative.d.ts +2 -0
- package/config/extendNative.d.ts.map +1 -0
- package/config/extendNative.js +1 -0
- package/config/index.d.ts +1 -2
- package/config/index.js +1 -1
- package/config/initGlobalDependencies.js +1 -1
- package/package.json +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/slicedToArray";import{useState as t,useEffect as n,useRef as o}from"react";import i from"react-dom";import{get as c,isEqual as u}from"lodash";import{MuiThemeProvider as f}from"@material-ui/core/styles";import{darkTheme as m}from"../../../config/theme/index.js";import"../../../config/mapbox/index.js";import{getAppTitle as p,getExpander as l,getOffsetPicker as a,getSecondaryAsset as s,getModeSelect as y,getPrimaryAsset as b}from"../utils.js";import{LARGE_SIZE_LAYOUT as d,MEDIUM_SIZE_LAYOUT as O,SMALL_SIZE_LAYOUT as j}from"../constants.js";import{jsx as h}from"react/jsx-runtime";function v(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function g(r){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){e(r,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}))}return r}function k(e,o,i){var u=t(null),f=r(u,2),m=f[0],h=f[1];return n((function(){if(i&&o){var r=p(e),t=l(e),n=a(e),u=s(e),f=y(e),m=b(e),v=o[c(r,"key")]||0,g=o[c(t,"key")]||0,k=o[c(n,"key")]||0,P=o[c(u,"key")]||0,w=o[c(f,"key")]||0,x=o[c(m,"key")]||0;h(v+(g+k+P+w+x)<=i?d:v+x<=i?O:j)}}),[o,i]),m}function P(p){var l=o({}),s=t(null),y=r(s,2),b=y[0],d=y[1],O=o({});return n((function(){var r=p.filter((function(e){return!!e}));if(!u(r,O.current)){var t=a(p),n=c(t,"key");l.current=n?e({},n,36):{},r.forEach((function(t){var o=document.createElement("div");o.style.position="absolute",o.style.visibility="hidden",document.body.appendChild(o),t&&t.key!==n&&i.render(h(f,{theme:m,children:t}),o,(function(){var n=o.getBoundingClientRect();o.remove(),l.current=g(g({},l.current),{},e({},t.key,n.width)),Object.values(l.current).length===r.length&&(u(b,l.current)||d(l.current))}))})),O.current=r}})),b}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 c}from"react";import a 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"../../../../config/mapbox/index.js";import{usePrevious as b}from"../../effects/index.js";import F from"./Map.css.js";import{jsx as h,jsxs as v}from"react/jsx-runtime";function y(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 g(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?y(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):y(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 N(t){var l=t.subjectWell,f=t.wells,y=t.offsetWells,N=t.radius,P=t.subjectWellMarkerSize,w=t.wellMarkerSize,x=t.popUpFormatter,B=t.coordsDataPath,S=o(null),W=o(null),C=o(null),D=b(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 g(g({},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*N,{stroke:!1,fill:!0,fillOpacity:.2,fillColor:"#03BCD4",className:"circle_500"}),W.current.addTo(S.current)):W.current=null)}),[N,M]),i((function(){if(S.current){S.current.closePopup(),C.current&&C.current.removeFrom(S.current);var r=y.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?P:w,f=n||i?"#00FFFF":I[t.formation],b=n||i?1:.3,F=u.circleMarker(o,{radius:m,stroke:!1,fill:!0,fillOpacity:b,fillColor:f,className:"circle_500"});F.addEventListener("mouseover",(function(){if(x){var r=document.createElement("div"),e=c(x,{well:t,color:I[t.formation]});a.render(h(p,{theme:d,children:e}),r),u.popup().setLatLng(o).setContent(r).openOn(S.current)}})),e.push(F)}})),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,y,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)}),[N,l]),v("div",{className:F.map,children:[h("div",{className:F.mapMain,ref:S}),v("div",{className:F.mapFooter,children:[y&&v("div",{className:F.mapFooterItem,children:[h("div",{className:F.mapFooterItemSquare,style:{backgroundColor:"#00FFFF"}}),h("div",{className:F.mapFooterItemLabel,children:"Selected Offset Wells"})]}),E.map((function(r){return v("div",{className:F.mapFooterItem,children:[h("div",{className:F.mapFooterItemSquare,style:{backgroundColor:I[r]}}),h("div",{className:F.mapFooterItemLabel,children:r})]},r)}))]})]})}N.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},N.defaultProps={subjectWell:null,subjectWellMarkerSize:10,wellMarkerSize:5,popUpFormatter:null,coordsDataPath:"settings.top_hole.coordinates",offsetWells:null};var P=t(N);export{P as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/slicedToArray";import{useState as t,useEffect as n,useRef as i}from"react";import o from"react-dom";import{isEqual as c}from"lodash";import{MuiThemeProvider as u}from"@material-ui/core/styles";import{MuiPickersUtilsProvider as m}from"@material-ui/pickers";import f from"@date-io/moment";import l from"moment";import{darkTheme as s}from"../../../config/theme/index.js";import"../../../config/mapbox/index.js";import a from"../components/FiltersToggler.js";import{getStartComponent as p,getMiddleComponent as d,getEndComponents as v}from"../utils.js";import{LARGE_SIZE_LAYOUT as y,MEDIUM_SIZE_LAYOUT as b,SMALL_SIZE_LAYOUT as h}from"../constants.js";import{jsx as j}from"react/jsx-runtime";function O(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function g(r){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach((function(t){e(r,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}))}return r}function k(e,i,o,c){var u=t(null),m=r(u,2),f=m[0],l=m[1];return n((function(){if(c&&i){var r=p(e),t=d(e),n=v(e),u=r&&t&&!n,m=r&&!t&&n,f=r&&t&&n;if(r&&!t&&!n){var s=i[r.key];if(s<=c)return void l(y);if(s<=c/2)return void l(b)}else if(u||m){var a=i[r.key],j=u?i[t.key]:i[n.key];if(a+j<=c)return void l(y);if(o+j<=c)return void l(b)}else if(f){var O=i[r.key],g=i[t.key],k=i[n.key];if(O+g+k<=c)return void l(y);if(o+g+k<=c)return void l(b);if(o+k<=c)return void l(h)}l(h)}}),[i,c]),f}function P(a){var p=i({}),d=t(null),v=r(d,2),y=v[0],b=v[1],h=i({});return n((function(){var r=a.filter((function(e){return!!e}));c(r,h.current)||(p.current={},r.forEach((function(t){var n=document.createElement("div");n.style.position="absolute",n.style.visibility="hidden",document.body.appendChild(n),t&&o.render(j(u,{theme:s,children:j(m,{libInstance:l,utils:f,children:t})}),n,(function(){var i=n.getBoundingClientRect();n.remove(),p.current=g(g({},p.current),{},e({},t.key,i.width)),Object.values(p.current).length===r.length&&(c(y,p.current)||b(p.current))}))})),h.current=r)})),y}function w(){var e=t(null),i=r(e,2),c=i[0],m=i[1];return n((function(){var e=document.createElement("div");e.style.position="absolute",e.style.visibility="hidden",document.body.appendChild(e),o.render(j(u,{theme:s,children:j(a,{})}),e,(function(){var r=e.getBoundingClientRect();e.remove(),m(r.width)}))}),[]),c}export{w as useAppFilterTogglerWidth,P as useComonentsWidth,k as useFilterLayout};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extendNative.d.ts","sourceRoot":"","sources":["../../src/config/extendNative.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t from"numeral";Number.prototype.fixFloat=function(t){return parseFloat(this.toFixed(t))},Number.prototype.formatNumeral=function(r){return t(this).format(r)};
|
package/config/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as theme from "./theme";
|
|
2
|
-
import { initHighcharts } from "./highcharts";
|
|
3
2
|
import { MAP_BOX_ACCESS_TOKEN } from "./mapbox";
|
|
4
|
-
export { theme,
|
|
3
|
+
export { theme, MAP_BOX_ACCESS_TOKEN };
|
|
5
4
|
//# sourceMappingURL=index.d.ts.map
|
package/config/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as e from"./theme/index.js";export{e as theme};export{MAP_BOX_ACCESS_TOKEN}from"./mapbox/index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{initHighcharts as
|
|
1
|
+
import{initHighcharts as i}from"./highcharts/highcharts.js";import{initializeSocketClient as s}from"../clients/subscriptions.js";import"./extendNative.js";i(),s();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@corva/ui",
|
|
3
|
-
"version": "0.54.0-
|
|
3
|
+
"version": "0.54.0-1",
|
|
4
4
|
"description": "Shared components/utils for Corva ui projects",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"corva-ui"
|
|
@@ -135,6 +135,7 @@
|
|
|
135
135
|
"moment-duration-format": "1.3.0",
|
|
136
136
|
"moment-timezone": "0.5.23",
|
|
137
137
|
"node-fetch": "^2.6.1",
|
|
138
|
+
"numeral": "2.0.6",
|
|
138
139
|
"optimize-css-assets-webpack-plugin": "5.0.3",
|
|
139
140
|
"path": "0.12.7",
|
|
140
141
|
"postcss": "8.4.11",
|