@corva/ui 0.51.0-6 → 0.51.0-7
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/clients/index.d.ts +8 -8
- package/clients/index.d.ts.map +1 -1
- package/clients/index.js +1 -1
- package/components/OffsetWellMap/OffsetWellMap.d.ts.map +1 -1
- package/components/OffsetWellMap/OffsetWellMap.js +1 -1
- package/components/OffsetWellMap/OffsetWellMap.module.css.js +1 -1
- package/package.json +1 -1
package/clients/index.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
export namespace corvaAPI {
|
|
2
|
-
function get(path: any, queryParams
|
|
3
|
-
function put(path: any, content: any, queryParams
|
|
4
|
-
function patch(path: any, content: any, queryParams
|
|
2
|
+
function get(path: any, queryParams?: {}): Promise<any>;
|
|
3
|
+
function put(path: any, content: any, queryParams?: {}): Promise<any>;
|
|
4
|
+
function patch(path: any, content: any, queryParams?: {}): Promise<any>;
|
|
5
5
|
function post(path: any, entity: any): Promise<any>;
|
|
6
|
-
function del(path: any, queryParams
|
|
6
|
+
function del(path: any, queryParams?: {}): Promise<any>;
|
|
7
7
|
}
|
|
8
8
|
export namespace corvaDataAPI {
|
|
9
|
-
export function get_1(path: any, queryParams
|
|
9
|
+
export function get_1(path: any, queryParams?: {}): Promise<any>;
|
|
10
10
|
export { get_1 as get };
|
|
11
|
-
export function put_1(path: any, content: any, queryParams
|
|
11
|
+
export function put_1(path: any, content: any, queryParams?: {}): Promise<any>;
|
|
12
12
|
export { put_1 as put };
|
|
13
|
-
export function patch_1(path: any, content: any, queryParams
|
|
13
|
+
export function patch_1(path: any, content: any, queryParams?: {}): Promise<any>;
|
|
14
14
|
export { patch_1 as patch };
|
|
15
15
|
export function post_1(path: any, entity: any): Promise<any>;
|
|
16
16
|
export { post_1 as post };
|
|
17
|
-
export function del_1(path: any, queryParams
|
|
17
|
+
export function del_1(path: any, queryParams?: {}): Promise<any>;
|
|
18
18
|
export { del_1 as del };
|
|
19
19
|
}
|
|
20
20
|
export namespace socketClient {
|
package/clients/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/clients/index.js"],"names":[],"mappings":";IAWO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/clients/index.js"],"names":[],"mappings":";IAWO,wDAAkD;IAClD,sEAAoE;IAClE,wEAAsE;IACvE,oDAAoC;IACrC,wDAAkD;;;IAIlD,iEAAuF;;IACvF,+EACiE;;IAC/D,iFACiE;;IAClE,6DAAyE;;IAC1E,iEAAuF;;;;IAMjF;;iCAwBV"}
|
package/clients/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import r from"@babel/runtime/helpers/defineProperty";import{v4 as t}from"uuid";import{noop as e}from"lodash";import*as n from"./clientStorage/index.js";export{n as clientStorage};import*as o from"./jsonApi/index.js";export{o as jsonApi};import*as i from"./subscriptions.js";export{i as subscriptions};import{get as c,put as
|
|
1
|
+
import r from"@babel/runtime/helpers/defineProperty";import{v4 as t}from"uuid";import{noop as e}from"lodash";import*as n from"./clientStorage/index.js";export{n as clientStorage};import*as o from"./jsonApi/index.js";export{o as jsonApi};import*as i from"./subscriptions.js";export{i as subscriptions};import{get as c,put as a,patch as p,post as u,del as s}from"./api/apiCore.js";import{CORVA_API_URLS as f}from"./constants.js";function l(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),e.push.apply(e,n)}return e}function v(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?l(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))}))}return t}var d={get:function(r){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return c(r,t)},put:function(r,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return a(r,t,e)},patch:function(r,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return p(r,t,e)},post:function(r,t){return u(r,t)},del:function(r){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s(r,t)}},b={get:function(r){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return c(r,t,{apiUrl:f.DATA_API})},put:function(r,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return a(r,t,e,{apiUrl:f.DATA_API})},patch:function(r,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return p(r,t,e,{apiUrl:f.DATA_API})},post:function(r,t){return u(r,t,{apiUrl:f.DATA_API})},del:function(r){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s(r,t,{apiUrl:f.DATA_API})}},m={subscribe:function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=n.onDataReceive,i=void 0===o?e:o,c=window[Symbol.for("socket")]||{},a=c.subscribe,p=c.unsubscribe,u=c.socket;if(!u)return console.error("Socket is not initialized!"),e;var s=t(),f=v(v({},r),{},{collection:r.collection||r.dataset,appInstanceId:s});return a(f),u.on("data",(function(r){return r.appInstanceId===s&&i(r)})),function(){return p(f)}}};export{d as corvaAPI,b as corvaDataAPI,m as socketClient};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OffsetWellMap.d.ts","sourceRoot":"","sources":["../../../src/components/OffsetWellMap/OffsetWellMap.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"OffsetWellMap.d.ts","sourceRoot":"","sources":["../../../src/components/OffsetWellMap/OffsetWellMap.js"],"names":[],"mappings":";AA+BA;;;;;;;;gBAkXC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import r from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/slicedToArray";import{useMemo as t,useRef as n,useState as o,useEffect as c,createElement as i}from"react";import u from"react-dom";import{get as l}from"lodash";import a from"prop-types";import s from"classnames";import{Tooltip as d}from"@material-ui/core";import f from"mapbox.js";import{mapbox as
|
|
1
|
+
import r from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/slicedToArray";import{useMemo as t,useRef as n,useState as o,useEffect as c,createElement as i}from"react";import u from"react-dom";import{get as l}from"lodash";import a from"prop-types";import s from"classnames";import{Tooltip as d}from"@material-ui/core";import{Add as m,Remove as f}from"@material-ui/icons";import p from"mapbox.js";import{mapbox as v}from"../../utils/index.js";import b from"./OffsetWellMap.module.css.js";import{usePreviousWells as h}from"./effects/usePreviousWells.js";import{WellTooltip as y}from"./WellTooltip.js";import{getAllFormations as C}from"./utils.js";import{jsx as B,jsxs as g,Fragment as k}from"react/jsx-runtime";var O=v.isValidCoordinates,W=[29.749907,-95.358421],T=["_renderer","_bounds","min"],D=function(a){var v=a.isViewOnly,D=a.subjectWell,x=a.wells,N=a.offsetWellIds,j=a.radius,F=a.handleChanageOffsetWell,z=a.activeWellId,E=t((function(){return D&&l(D,"topHole.coordinates")}),[D]),L=t((function(){return C(x)}),[x]),w=n(),I=n(),Z=n(),_=n(),q=n(null),M=o(!1),P=e(M,2),R=P[0],V=P[1],G=n(),S=n(),A=(null==D?void 0:D.id)===z,H=h(x),U=o(null),J=e(U,2),K=J[0],Q=J[1],X=o(3),Y=e(X,2),$=Y[0],rr=Y[1];c((function(){w.current=p.mapbox.map(w.current,null,{attributionControl:!1,scrollWheelZoom:!1,zoomControl:!1}).setView(W,3).on("zoomend",(function(){return rr(w.current.getZoom())})),w.current.doubleClickZoom.disable(),p.mapbox.styleLayer("mapbox://styles/mapbox/dark-v9").addTo(w.current)}),[]),c((function(){if(w.current){if(I.current&&(w.current.removeLayer(I.current),I.current=null),Z.current&&w.current.removeLayer(Z.current),!E)return I.current=null,void(Z.current=null);j&&(I.current=p.circle(E,1609.34*j,{stroke:!1,fill:!0,fillOpacity:.2,fillColor:"#03BCD4",className:"circle_500"}),I.current.addTo(w.current))}}),[j,E]);var er=function(r,e,t,n,o,c){c&&(r.setStyle({fillColor:"#63EFFF"}),V(!0)),q.current=p.circleMarker(e,{radius:c?5:12,stroke:!1,fill:!0,fillOpacity:.24,fillColor:c?"#63EFFF":t,className:"circle_highlight"}),q.current.addEventListener("mouseout",(function(){_.current.removeFrom(w.current),_.current=p.featureGroup(G.current),_.current.addTo(w.current),w.current.closePopup(),c&&(r.setStyle({fillColor:"#03BCD4"}),V(!1))})),q.current.addEventListener("click",(function(){v||F(n,!o)}));var i=G.current.concat(q.current);_.current.removeFrom(w.current),_.current=p.featureGroup(i),_.current.addTo(w.current)},tr=function(r,e,t,n,o){var c=document.createElement("div"),a=i(y(),{isViewOnly:v,well:r,color:l(L,r.formation,"#BDBDBD"),isOffsetWell:e,isSubjectWell:t,offset:o});u.render(B(k,{children:a}),c),p.popup().setLatLng(n).setContent(c).openOn(w.current)};c((function(){if(w.current&&x&&N){w.current.closePopup(),_.current&&_.current.removeFrom(w.current);var r=[],e=[],t=[];x.forEach((function(r){r.id!==(null==D?void 0:D.id)&&(N.includes(r.id)?e.push(r):t.push(r))})),[].concat(t,e,[D]).forEach((function(e){var t,n=null==e||null===(t=e.topHole)||void 0===t?void 0:t.coordinates;if(n&&O(n)){var o=(null==D?void 0:D.id)===e.id,c=N.includes(e.id)&&!o,i=o?"#03BCD4":l(L,e.formation,"#BDBDBD"),u=c?.7:.3;if(c){var a=p.circleMarker(n,{radius:12,stroke:!1,fill:!0,fillColor:i,calssname:"circle_500",fillOpacity:.08});r.push(a)}var s=p.circleMarker(n,{radius:5,stroke:!1,fill:!0,fillOpacity:o?1:u,fillColor:i,className:"circle_500"});if(s.addEventListener("mouseover",(function(r){var t=[0,0];K&&l(r.target,T)&&(t=[l(r.target,T).x-K.x,l(r.target,T).y-K.y]),tr(e,c,o,n,t),er(s,n,i,e,c,o)})),o&&(S.current=s),r.push(s),e.id===z&&!A){var d=p.circleMarker(n,{radius:12,stroke:!1,fill:!0,fillOpacity:.24,fillColor:i,className:"circle_1200"});r.push(d)}}})),r.length&&(_.current=p.featureGroup(r),_.current.addTo(w.current)),G.current=r,setTimeout((function(){I.current&&I.current.bringToBack(),w.current&&I.current&&x!==H&&w.current.fitBounds(I.current.getBounds(),{padding:[5,5]})}),500)}}),[D,x,N,K]),c((function(){if(R&&l(w.current,T)){var r=[l(w.current,T).x-K.x,l(w.current,T).y-K.y];tr(D,!1,!0,E,r)}}),[R,K,D,E]),c((function(){if(w.current&&E){Z.current&&Z.current.removeFrom(w.current);var r=p.icon({iconUrl:R||A?"/static/media/5e9c4959259cb12c11b2c5eaf27eb3ad.svg":"/static/media/9efe5882f31d2f22bd57af92069d0a3e.svg",iconSize:R||A?[70,20]:[62,12],iconAnchor:R||A?[35,29]:[31,25],className:"dot"});Z.current=p.marker(E,{icon:r}),Z.current.addTo(w.current),S.current&&(Z.current.addEventListener("mouseover",(function(){V(!0),er(S.current,E,"#03BCD4",D,!0,!0)})),Z.current.addEventListener("mouseout",(function(){_.current.removeFrom(w.current),_.current=p.featureGroup(G.current),_.current.addTo(w.current),w.current.closePopup(),S.current.setStyle({fillColor:"#03BCD4"}),V(!1)})))}}),[R,E,j,D,A,K]),c((function(){setTimeout((function(){I.current&&I.current.bringToBack(),D?w.current&&I.current&&j&&w.current.fitBounds(I.current.getBounds(),{padding:[5,5]}):w.current&&_.current&&w.current.fitBounds(_.current.getBounds()),l(w.current,T)&&Q(l(w.current,T))}),500)}),[j,D]);return B("div",{className:b.mapView,children:B("div",{className:b.mapMain,ref:w,children:g("div",{className:b.zoomGroup,children:[B(d,{title:$<18?"Zoom in":"",placement:"left",children:B("div",{className:s(b.zoomButton,r({},b.zoomDisabled,18===$)),onClick:function(){w.current.setZoom($+1)},children:B(m,{className:b.zoomInOutIcon})})}),B(d,{title:$>1?"Zoom out":"",placement:"left",children:B("div",{className:s(b.zoomButton,r({},b.zoomDisabled,1===$)),onClick:function(){$>1&&w.current.setZoom($-1)},children:B(f,{className:b.zoomInOutIcon})})})]})})})};D.propTypes={isViewOnly:a.bool.isRequired,subjectWell:a.shape({id:a.number,formation:a.string}),wells:a.arrayOf(a.shape({})).isRequired,offsetWellIds:a.arrayOf(a.number).isRequired,radius:a.number.isRequired,handleChanageOffsetWell:a.func.isRequired,activeWellId:a.number.isRequired},D.defaultProps={subjectWell:null};export{D as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from'./../../ext-esm/style-inject/dist/style-inject.es.js';var o={mapView:"OffsetWellMap-module_mapView__EwhHO",zoomGroup:"OffsetWellMap-module_zoomGroup__qCVgz",zoomButton:"OffsetWellMap-module_zoomButton__oZIkU",zoomDisabled:"OffsetWellMap-module_zoomDisabled__60g-G",mapMain:"OffsetWellMap-module_mapMain__IYEA1"};e(".OffsetWellMap-module_mapView__EwhHO{width:100%}.OffsetWellMap-module_zoomGroup__qCVgz{bottom:12px;display:flex;flex-direction:column;gap:4px;position:absolute;right:12px;z-index:9}.OffsetWellMap-module_zoomButton__oZIkU{align-items:center;background:var(--palette-background-b-6);border-radius:4px;color:var(--palette-primary-text-6);cursor:pointer;display:flex;font-size:22px;height:32px;justify-content:center;text-align:center;user-select:none;width:32px}.OffsetWellMap-module_zoomButton__oZIkU:hover{background:var(--palette-background-b-7);color:#fff}.OffsetWellMap-module_zoomDisabled__60g-G{cursor:not-allowed}.OffsetWellMap-module_zoomDisabled__60g-G:hover{background:var(--palette-background-b-6);color:var(--palette-primary-text-6)}.OffsetWellMap-module_mapMain__IYEA1{background-color:var(--palette-background-b-9);border:1px solid var(--palette-background-b-9);border-radius:4px;flex:100;height:200px;position:relative;width:100%}.OffsetWellMap-module_mapView__EwhHO .leaflet-popup{left:0!important;top:0!important;transform:none!important}.OffsetWellMap-module_mapView__EwhHO .leaflet-popup-content-wrapper{background-color:transparent;border-radius:4px;opacity:.9}.OffsetWellMap-module_mapView__EwhHO .leaflet-popup-content{padding:8px}.OffsetWellMap-module_mapView__EwhHO .leaflet-popup-close-button,.OffsetWellMap-module_mapView__EwhHO .leaflet-popup-tip{display:none}.OffsetWellMap-module_mapView__EwhHO .leaflet-control-zoom{background:none;border:none;box-shadow:none}.OffsetWellMap-module_mapView__EwhHO .leaflet-control-zoom a{align-items:center;background:var(--palette-background-b-6);border-radius:4px;color:var(--palette-primary-text-6);content:unset;display:flex;font-size:20px;height:30px;justify-content:center;margin-top:4px;opacity:1;text-align:center;text-indent:unset;width:30px}.OffsetWellMap-module_mapView__EwhHO .leaflet-control-zoom a:hover{background:var(--palette-background-b-7);border-radius:4px;color:var(--palette-primary-text-1)}.OffsetWellMap-module_mapView__EwhHO .leaflet-touch .leaflet-bar,.OffsetWellMap-module_mapView__EwhHO .leaflet-touch .leaflet-control-layers{background-clip:padding-box;border:0 solid transparent}");export{o as default};
|
|
1
|
+
import e from'./../../ext-esm/style-inject/dist/style-inject.es.js';var o={mapView:"OffsetWellMap-module_mapView__EwhHO",zoomGroup:"OffsetWellMap-module_zoomGroup__qCVgz",zoomButton:"OffsetWellMap-module_zoomButton__oZIkU",zoomDisabled:"OffsetWellMap-module_zoomDisabled__60g-G",zoomInOutIcon:"OffsetWellMap-module_zoomInOutIcon__tUzKY",mapMain:"OffsetWellMap-module_mapMain__IYEA1"};e(".OffsetWellMap-module_mapView__EwhHO{width:100%}.OffsetWellMap-module_zoomGroup__qCVgz{bottom:12px;display:flex;flex-direction:column;gap:4px;position:absolute;right:12px;z-index:9}.OffsetWellMap-module_zoomButton__oZIkU{align-items:center;background:var(--palette-background-b-6);border-radius:4px;color:var(--palette-primary-text-6);cursor:pointer;display:flex;font-size:22px;height:32px;justify-content:center;text-align:center;user-select:none;width:32px}.OffsetWellMap-module_zoomButton__oZIkU:hover{background:var(--palette-background-b-7);color:#fff}.OffsetWellMap-module_zoomDisabled__60g-G{cursor:not-allowed}.OffsetWellMap-module_zoomDisabled__60g-G:hover{background:var(--palette-background-b-6);color:var(--palette-primary-text-6)}.OffsetWellMap-module_zoomInOutIcon__tUzKY{font-size:1rem!important}.OffsetWellMap-module_mapMain__IYEA1{background-color:var(--palette-background-b-9);border:1px solid var(--palette-background-b-9);border-radius:4px;flex:100;height:200px;position:relative;width:100%}.OffsetWellMap-module_mapView__EwhHO .leaflet-popup{left:0!important;top:0!important;transform:none!important}.OffsetWellMap-module_mapView__EwhHO .leaflet-popup-content-wrapper{background-color:transparent;border-radius:4px;opacity:.9}.OffsetWellMap-module_mapView__EwhHO .leaflet-popup-content{padding:8px}.OffsetWellMap-module_mapView__EwhHO .leaflet-popup-close-button,.OffsetWellMap-module_mapView__EwhHO .leaflet-popup-tip{display:none}.OffsetWellMap-module_mapView__EwhHO .leaflet-control-zoom{background:none;border:none;box-shadow:none}.OffsetWellMap-module_mapView__EwhHO .leaflet-control-zoom a{align-items:center;background:var(--palette-background-b-6);border-radius:4px;color:var(--palette-primary-text-6);content:unset;display:flex;font-size:20px;height:30px;justify-content:center;margin-top:4px;opacity:1;text-align:center;text-indent:unset;width:30px}.OffsetWellMap-module_mapView__EwhHO .leaflet-control-zoom a:hover{background:var(--palette-background-b-7);border-radius:4px;color:var(--palette-primary-text-1)}.OffsetWellMap-module_mapView__EwhHO .leaflet-touch .leaflet-bar,.OffsetWellMap-module_mapView__EwhHO .leaflet-touch .leaflet-control-layers{background-clip:padding-box;border:0 solid transparent}");export{o as default};
|