@corva/ui 3.67.0-rc.1 → 3.67.0-rc.3
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/VirtualizedTable/VirtualizedTable.js +1 -1
- package/cjs-bundle/effects/usePadSelectorSelectedWells.js +1 -1
- package/components/VirtualizedTable/VirtualizedTable.d.ts.map +1 -1
- package/components/VirtualizedTable/VirtualizedTable.js +1 -1
- package/effects/__tests__/usePadSelectorSelectedWells.test.d.ts +2 -0
- package/effects/__tests__/usePadSelectorSelectedWells.test.d.ts.map +1 -0
- package/effects/usePadSelectorSelectedWells.d.ts +1 -1
- package/effects/usePadSelectorSelectedWells.d.ts.map +1 -1
- package/effects/usePadSelectorSelectedWells.js +1 -1
- package/mcp-server/server.mjs +1 -1
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/defineProperty"),r=require("react/jsx-runtime"),n=require("react"),o=require("classnames"),i=require("react-window"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/defineProperty"),r=require("react/jsx-runtime"),n=require("react"),o=require("classnames"),i=require("react-window"),a=require("@material-ui/core"),l=require("@material-ui/icons"),u=require("../../utils/convert.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=s(e),d=s(t),f=s(o);function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?m(Object(r),!0).forEach((function(t){d.default(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var p="ASC",y=p,b=a.makeStyles((function(e){var t={borderBottom:e.isLightTheme?"1px solid rgba(224, 224, 224, 1)":"1px solid rgba(81, 81, 81, 1)",display:"flex",flexFlow:"row nowrap",alignItems:"center"},r={minWidth:1,marginRight:10,"&:first-child":{marginLeft:10}};return{root:{display:"flex",overflow:"auto",flexFlow:"column nowrap"},row:t,cell:r,header:t,headerCell:r,sortable:{cursor:"pointer"},oddRow:{backgroundColor:e.isLightTheme?"rgba(189, 189, 189, 0.1)":"#303030"},headerLabel:{lineHeight:"14px",fontSize:"12px",fontStyle:"normal",letterSpacing:"-0.25px",display:"flex",alignItems:"center",flexWrap:"wrap"},cellData:{lineHeight:"14px",fontSize:"12px",fontWeight:"normal",fontStyle:"normal",letterSpacing:"0.15px"},unitLabel:{fontSize:"10px",opacity:.5},settingIcon:{padding:"3px",fontSize:"20px"},sortIcon:{fontSize:"16px"}}}));function x(e,t){var r=e.find((function(e){return e.key===t}))||{},n=r.unitType,o=r.customUnit;return o?"(".concat(o,")"):n?"(".concat(u.getUnitDisplay(n),")"):""}function w(e,t){return(e.find((function(e){return e.key===t}))||{}).headerLabelClassName||""}function g(e,t){return(e.find((function(e){return e.key===t}))||{}).headerLabelUnitClassName||""}var v=function(e){var t=e.columns,o=e.data,u=e.useColumnSetting,s=e.useFixedColumnWidth,m=e.onOpenSettingDlg,v=e.width,j=e.height,S=e.headerHeight,_=e.rowHeight,C=e.showTopSettingIcon,k=e.customMuiStyles,z=e.isTopSettingIconShownAlways,O=e.CustomCellRenderer,N=e.CustomHeaderCellRenderer,D=e.customRowStyle,T=e.sort,R=e.sortBy,I=e.sortDirection,M=e.onScroll,P=void 0===M?function(){}:M,L=b(),q=n.useMemo((function(){return h(h({},L),k)}),[L,k]),V=n.useMemo((function(){return{label:"",key:"setting",width:u?25:0}}),[u]),A=n.useMemo((function(){return t.filter((function(e){return e.show}))}),[t]),H=n.useMemo((function(){return u?[].concat(c.default(A),[V]):A}),[A,u,V]),E=n.useMemo((function(){if(v<=0)return{};var e=d.default({},V.key,V.width),t=[];return A.filter((function(e){return Number.isFinite(e.width)})).forEach((function(r){e[r.key]=r.width-1,t.push(r.width-1)})),A.filter((function(e){return!Number.isFinite(e.width)})).forEach((function(r){var n=t.reduce((function(e,t){return e+t}),0),o=Math.floor((v-n-V.width)/(A.length-t.length)),i=r.minWidth||65,a=o<i?i:o;e[r.key]=a-1,t.push(a-1)})),e}),[v,A,V]),B=n.useMemo((function(){return Object.values(E).reduce((function(e,t){return e+t}),0)}),[E]),F=z||B-12.5>=v;n.useEffect((function(){C(F)}),[F]);var W=n.useCallback((function(e){var t=e.index;return f.default(d.default({},q.oddRow,t%2==1))}),[q]),K=function(e){var n=e.label,o=e.dataKey,i=R||I||T;return N?r.jsx(N,{columnKey:o,columns:t,sortBy:R,sortDirection:I}):o===V.key?F?null:r.jsx(a.IconButton,{size:"small","aria-label":"customize columns",className:q.settingIcon,onClick:m,children:r.jsx(l.Settings,{fontSize:"inherit"})}):r.jsxs(a.Typography,{variant:"body2",className:f.default(q.headerLabel,w(t,o)),children:[n," ",r.jsx("span",{className:f.default(q.unitLabel,g(t,o)),children:x(t,o)}),i&&o!==R&&r.jsx(a.Tooltip,{title:"Sort A-Z",children:r.jsx(l.Sort,{fontSize:"small",className:L.sortIcon})}),i&&o===R&&(I===p?r.jsx(l.ArrowUpward,{fontSize:"small",className:L.sortIcon}):r.jsx(l.ArrowDownward,{fontSize:"small",className:L.sortIcon}))]})},U=n.useCallback((function(e){var n=e.ariaAttributes,o=e.style,i=e.data,l=e.tableColumns,u=e.index;return r.jsx("div",h(h({style:h(h({},o),null==D?void 0:D({index:u})),className:f.default(W({index:u}),L.row,"ReactVirtualized__Table__row")},n),{},{children:l.map((function(e){var n=e.key,o=i[u],l=O?r.jsx(O,{columnKey:n,value:o[n],rowData:o,columns:t}):r.jsx(a.Typography,{variant:"body2",className:q.cellData,children:o[n]});return r.jsx("div",{className:f.default(L.cell,"ReactVirtualized__Table__rowColumn"),style:{flex:"0 1 ".concat(E[n],"px"),overflow:"hidden"},children:l},n)}))}))}),[O,W,E,D,L,q.cellData,t]),G=n.useMemo((function(){return{width:s?B:v,height:j}}),[s,B,v,j]),Z=n.useMemo((function(){return{data:o,tableColumns:H}}),[o,H]),J=n.useCallback((function(e){return function(t){null==T||T({defaultSortDirection:y,event:t,sortBy:e,sortDirection:e!==R||I&&I!==y?y:"DESC"})}}),[T,R,I]),Q=R||I||T;return r.jsxs("div",{style:G,className:f.default(q.root,q.table,"ReactVirtualized__Table"),children:[r.jsx("div",{className:f.default(q.header,"ReactVirtualized__Table__headerRow"),style:{flex:"0 0 ".concat(S,"px")},children:H.map((function(e){return r.jsx("div",{className:f.default(q.headerCell,"setting"!==e.key&&T&&q.sortable,"ReactVirtualized__Table__headerColumn",Q&&"ReactVirtualized__Table__sortableHeaderColumn"),style:{flex:"0 1 ".concat(E[e.key],"px"),height:S},onClick:"setting"!==e.key?J(e.key):void 0,children:K({label:e.label,dataKey:e.key})},e.key)}))}),r.jsx(i.List,{rowProps:Z,rowCount:o.length,rowHeight:_,rowComponent:U,onScroll:P,className:"ReactVirtualized__Grid ReactVirtualized__Table__Grid"})]})};exports.VirtualizedTableComponent=v,exports.default=v;
|
|
2
2
|
//# sourceMappingURL=VirtualizedTable.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/slicedToArray"),t=require("react"),l=require("lodash/get"),r=require("lodash/isEmpty"),n=require("lodash/sortBy"),i=require("../utils/completion.js"),u=require("../constants/completion.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=d(e),
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/slicedToArray"),t=require("react"),l=require("lodash/get"),r=require("lodash/isEmpty"),n=require("lodash/sortBy"),i=require("../utils/completion.js"),u=require("../constants/completion.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=d(e),o=d(l),s=d(r),f=d(n);module.exports=function(e){var l=e.padId,r=e.well,n=e.wells,d=e.fracFleet,c=e.settingsByAsset,v=function(e,t,l,r){var n=i.getAssetKey(l,t,e);return s.default(o.default(r,[n]))?i.getDefaultPadModeSetting(l,t,u.COMPLETION_APP_TYPES.fracMultiWellApp):o.default(r,[n])}(l,r,d,c);return t.useMemo((function(){var e,t;if(r)return[r];var i=(null==d||null===(e=d.pad_frac_fleets)||void 0===e?void 0:e.find((function(e){return e.pad.id.toString()===(null==l?void 0:l.toString())||e.current})))||(null===(t=f.default(null==d?void 0:d.pad_frac_fleets,"last_current_at"))||void 0===t?void 0:t[0]),u=(null==i?void 0:i.frac_fleet_lines)||[];if(!u.length)return null!=n&&n.length?n:[];var o=v.selectedLine;if("custom"===v.mode){var s,c=null!==(s=v.selectedAssets)&&void 0!==s?s:[],_=a.default(c,1)[0],p=u.find((function(e){var t=e.frac_fleet_line_wells;return(void 0===t?[]:t).find((function(e){return+e.id===_}))}));o=null==p?void 0:p.id}var g=u.find((function(e){return e.id===o}))||u[0];return(null==g?void 0:g.frac_fleet_line_wells)||[]}),[v.mode,v.selectedLine,v.selectedAssets,null==d?void 0:d.pad_frac_fleets,l,r,n])};
|
|
2
2
|
//# sourceMappingURL=usePadSelectorSelectedWells.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VirtualizedTable.d.ts","sourceRoot":"","sources":["../../../src/components/VirtualizedTable/VirtualizedTable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,iBAAiB,EAA8C,MAAM,OAAO,CAAC;AAa1F,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AA4GhD,KAAK,8BAA8B,GAAG,IAAI,CACxC,qBAAqB,EACrB,cAAc,GAAG,iBAAiB,CACnC,GAAG;IACF,OAAO,EAAE,WAAW,CAAC,qBAAqB,CAAC,SAAS,CAAC,CAAC,CAAC;IACvD,IAAI,EAAE,WAAW,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC,CAAC;IACjD,YAAY,EAAE,WAAW,CAAC,qBAAqB,CAAC,cAAc,CAAC,CAAC,CAAC;IACjE,SAAS,EAAE,WAAW,CAAC,qBAAqB,CAAC,WAAW,CAAC,CAAC,CAAC;IAC3D,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,gBAAgB,EAAE,iBAAiB,CAAC;IACpC,kBAAkB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CAC7C,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,EAAE,CAAC,8BAA8B,
|
|
1
|
+
{"version":3,"file":"VirtualizedTable.d.ts","sourceRoot":"","sources":["../../../src/components/VirtualizedTable/VirtualizedTable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,iBAAiB,EAA8C,MAAM,OAAO,CAAC;AAa1F,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AA4GhD,KAAK,8BAA8B,GAAG,IAAI,CACxC,qBAAqB,EACrB,cAAc,GAAG,iBAAiB,CACnC,GAAG;IACF,OAAO,EAAE,WAAW,CAAC,qBAAqB,CAAC,SAAS,CAAC,CAAC,CAAC;IACvD,IAAI,EAAE,WAAW,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC,CAAC;IACjD,YAAY,EAAE,WAAW,CAAC,qBAAqB,CAAC,cAAc,CAAC,CAAC,CAAC;IACjE,SAAS,EAAE,WAAW,CAAC,qBAAqB,CAAC,WAAW,CAAC,CAAC,CAAC;IAC3D,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,gBAAgB,EAAE,iBAAiB,CAAC;IACpC,kBAAkB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CAC7C,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,EAAE,CAAC,8BAA8B,CAgTxE,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/defineProperty";import{jsx as
|
|
1
|
+
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/defineProperty";import{jsx as r,jsxs as n}from"react/jsx-runtime";import{useMemo as o,useEffect as i,useCallback as a}from"react";import l from"classnames";import{List as c}from"react-window";import{makeStyles as u,Typography as s,IconButton as d,Tooltip as f}from"@material-ui/core";import{Settings as m,Sort as h,ArrowUpward as p,ArrowDownward as b}from"@material-ui/icons";import{getUnitDisplay as y}from"../../utils/convert.js";function g(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function w(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?g(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var v="ASC",x=v,_=u((function(e){var t={borderBottom:e.isLightTheme?"1px solid rgba(224, 224, 224, 1)":"1px solid rgba(81, 81, 81, 1)",display:"flex",flexFlow:"row nowrap",alignItems:"center"},r={minWidth:1,marginRight:10,"&:first-child":{marginLeft:10}};return{root:{display:"flex",overflow:"auto",flexFlow:"column nowrap"},row:t,cell:r,header:t,headerCell:r,sortable:{cursor:"pointer"},oddRow:{backgroundColor:e.isLightTheme?"rgba(189, 189, 189, 0.1)":"#303030"},headerLabel:{lineHeight:"14px",fontSize:"12px",fontStyle:"normal",letterSpacing:"-0.25px",display:"flex",alignItems:"center",flexWrap:"wrap"},cellData:{lineHeight:"14px",fontSize:"12px",fontWeight:"normal",fontStyle:"normal",letterSpacing:"0.15px"},unitLabel:{fontSize:"10px",opacity:.5},settingIcon:{padding:"3px",fontSize:"20px"},sortIcon:{fontSize:"16px"}}}));function S(e,t){var r=e.find((function(e){return e.key===t}))||{},n=r.unitType,o=r.customUnit;return o?"(".concat(o,")"):n?"(".concat(y(n),")"):""}function C(e,t){return(e.find((function(e){return e.key===t}))||{}).headerLabelClassName||""}function k(e,t){return(e.find((function(e){return e.key===t}))||{}).headerLabelUnitClassName||""}var O=function(u){var y=u.columns,g=u.data,O=u.useColumnSetting,z=u.useFixedColumnWidth,N=u.onOpenSettingDlg,R=u.width,j=u.height,D=u.headerHeight,T=u.rowHeight,P=u.showTopSettingIcon,I=u.customMuiStyles,L=u.isTopSettingIconShownAlways,V=u.CustomCellRenderer,H=u.CustomHeaderCellRenderer,A=u.customRowStyle,E=u.sort,F=u.sortBy,W=u.sortDirection,B=u.onScroll,K=void 0===B?function(){}:B,G=_(),M=o((function(){return w(w({},G),I)}),[G,I]),U=o((function(){return{label:"",key:"setting",width:O?25:0}}),[O]),Z=o((function(){return y.filter((function(e){return e.show}))}),[y]),q=o((function(){return O?[].concat(e(Z),[U]):Z}),[Z,O,U]),J=o((function(){if(R<=0)return{};var e=t({},U.key,U.width),r=[];return Z.filter((function(e){return Number.isFinite(e.width)})).forEach((function(t){e[t.key]=t.width-1,r.push(t.width-1)})),Z.filter((function(e){return!Number.isFinite(e.width)})).forEach((function(t){var n=r.reduce((function(e,t){return e+t}),0),o=Math.floor((R-n-U.width)/(Z.length-r.length)),i=t.minWidth||65,a=o<i?i:o;e[t.key]=a-1,r.push(a-1)})),e}),[R,Z,U]),Q=o((function(){return Object.values(J).reduce((function(e,t){return e+t}),0)}),[J]),X=L||Q-12.5>=R;i((function(){P(X)}),[X]);var Y=a((function(e){var r=e.index;return l(t({},M.oddRow,r%2==1))}),[M]),$=function(e){var t=e.label,o=e.dataKey,i=F||W||E;return H?r(H,{columnKey:o,columns:y,sortBy:F,sortDirection:W}):o===U.key?X?null:r(d,{size:"small","aria-label":"customize columns",className:M.settingIcon,onClick:N,children:r(m,{fontSize:"inherit"})}):n(s,{variant:"body2",className:l(M.headerLabel,C(y,o)),children:[t," ",r("span",{className:l(M.unitLabel,k(y,o)),children:S(y,o)}),i&&o!==F&&r(f,{title:"Sort A-Z",children:r(h,{fontSize:"small",className:G.sortIcon})}),i&&o===F&&r(W===v?p:b,{fontSize:"small",className:G.sortIcon})]})},ee=a((function(e){var t=e.ariaAttributes,n=e.style,o=e.data,i=e.tableColumns,a=e.index;return r("div",w(w({style:w(w({},n),null==A?void 0:A({index:a})),className:l(Y({index:a}),G.row,"ReactVirtualized__Table__row")},t),{},{children:i.map((function(e){var t=e.key,n=o[a],i=V?r(V,{columnKey:t,value:n[t],rowData:n,columns:y}):r(s,{variant:"body2",className:M.cellData,children:n[t]});return r("div",{className:l(G.cell,"ReactVirtualized__Table__rowColumn"),style:{flex:"0 1 ".concat(J[t],"px"),overflow:"hidden"},children:i},t)}))}))}),[V,Y,J,A,G,M.cellData,y]),te=o((function(){return{width:z?Q:R,height:j}}),[z,Q,R,j]),re=o((function(){return{data:g,tableColumns:q}}),[g,q]),ne=a((function(e){return function(t){null==E||E({defaultSortDirection:x,event:t,sortBy:e,sortDirection:e!==F||W&&W!==x?x:"DESC"})}}),[E,F,W]),oe=F||W||E;return n("div",{style:te,className:l(M.root,M.table,"ReactVirtualized__Table"),children:[r("div",{className:l(M.header,"ReactVirtualized__Table__headerRow"),style:{flex:"0 0 ".concat(D,"px")},children:q.map((function(e){return r("div",{className:l(M.headerCell,"setting"!==e.key&&E&&M.sortable,"ReactVirtualized__Table__headerColumn",oe&&"ReactVirtualized__Table__sortableHeaderColumn"),style:{flex:"0 1 ".concat(J[e.key],"px"),height:D},onClick:"setting"!==e.key?ne(e.key):void 0,children:$({label:e.label,dataKey:e.key})},e.key)}))}),r(c,{rowProps:re,rowCount:g.length,rowHeight:T,rowComponent:ee,onScroll:K,className:"ReactVirtualized__Grid ReactVirtualized__Table__Grid"})]})};export{O as VirtualizedTableComponent,O as default};
|
|
2
2
|
//# sourceMappingURL=VirtualizedTable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePadSelectorSelectedWells.test.d.ts","sourceRoot":"","sources":["../../../src/effects/__tests__/usePadSelectorSelectedWells.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePadSelectorSelectedWells.d.ts","sourceRoot":"","sources":["../../src/effects/usePadSelectorSelectedWells.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAkB,IAAI,EAAE,MAAM,SAAS,CAAC;AAI1D,KAAK,cAAc,GAAG;IACpB,KAAK,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"usePadSelectorSelectedWells.d.ts","sourceRoot":"","sources":["../../src/effects/usePadSelectorSelectedWells.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAkB,IAAI,EAAE,MAAM,SAAS,CAAC;AAI1D,KAAK,cAAc,GAAG;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;IACf,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC;IAC5B,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACtC,CAAC;AAmBF,iBAAS,2BAA2B,CAAC,EACnC,KAAK,EACL,IAAI,EACJ,KAAK,EACL,SAAS,EACT,eAAe,GAChB,EAAE,cAAc,GAAG,IAAI,EAAE,CA4CzB;AAED,eAAe,2BAA2B,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/slicedToArray";import{useMemo as t}from"react";import r from"lodash/get";import l from"lodash/isEmpty";import n from"lodash/sortBy";import{getAssetKey as i,getDefaultPadModeSetting as o}from"../utils/completion.js";import{COMPLETION_APP_TYPES as d}from"../constants/completion.js";function f(f){var s=f.padId,u=f.well,a=f.wells,c=f.fracFleet,m=f.settingsByAsset,
|
|
1
|
+
import e from"@babel/runtime/helpers/slicedToArray";import{useMemo as t}from"react";import r from"lodash/get";import l from"lodash/isEmpty";import n from"lodash/sortBy";import{getAssetKey as i,getDefaultPadModeSetting as o}from"../utils/completion.js";import{COMPLETION_APP_TYPES as d}from"../constants/completion.js";function f(f){var s=f.padId,u=f.well,a=f.wells,c=f.fracFleet,m=f.settingsByAsset,v=function(e,t,n,f){var s=i(n,t,e);return l(r(f,[s]))?o(n,t,d.fracMultiWellApp):r(f,[s])}(s,u,c,m);return t((function(){var t,r;if(u)return[u];var l=(null==c||null===(t=c.pad_frac_fleets)||void 0===t?void 0:t.find((function(e){return e.pad.id.toString()===(null==s?void 0:s.toString())||e.current})))||(null===(r=n(null==c?void 0:c.pad_frac_fleets,"last_current_at"))||void 0===r?void 0:r[0]),i=(null==l?void 0:l.frac_fleet_lines)||[];if(!i.length)return null!=a&&a.length?a:[];var o=v.selectedLine;if("custom"===v.mode){var d,f=null!==(d=v.selectedAssets)&&void 0!==d?d:[],m=e(f,1)[0],p=i.find((function(e){var t=e.frac_fleet_line_wells;return(void 0===t?[]:t).find((function(e){return+e.id===m}))}));o=null==p?void 0:p.id}var _=i.find((function(e){return e.id===o}))||i[0];return(null==_?void 0:_.frac_fleet_line_wells)||[]}),[v.mode,v.selectedLine,v.selectedAssets,null==c?void 0:c.pad_frac_fleets,s,u,a])}export{f as default};
|
|
2
2
|
//# sourceMappingURL=usePadSelectorSelectedWells.js.map
|
package/mcp-server/server.mjs
CHANGED