@corva/ui 0.79.0-0 → 0.79.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.
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),O=require("./segment.js");function R(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t,L=R(e),A={DRILLING:"drilling",FRAC:"frac",WIRELINE:"wireline",DRILLOUT:"drillout",PUMPDOWN:"pumpdown"},M={FROM_WITSML:"FROM_WITSML",STREAM_CONNECTOR:"STREAM_CONNECTOR",FROM_HISTORICAL_UPLOAD:"FROM_HISTORICAL_UPLOAD",FROM_BLANK:"FROM_BLANK"};t={},L.default(t,O.SEGMENTS.DRILLING,[{type:A.DRILLING,title:"Drilling",canAddWith:[M.FROM_WITSML,M.STREAM_CONNECTOR,M.FROM_HISTORICAL_UPLOAD,M.FROM_BLANK]}]),L.default(t,O.SEGMENTS.COMPLETION,[{type:A.FRAC,title:"Frac",canAddWith:[M.FROM_HISTORICAL_UPLOAD,M.FROM_BLANK]},{type:A.WIRELINE,title:"Wireline",canAddWith:[M.FROM_BLANK]},{type:A.DRILLOUT,title:"Drillout",canAddWith:[M.FROM_WITSML,M.STREAM_CONNECTOR,M.FROM_HISTORICAL_UPLOAD,M.FROM_BLANK]}]),exports.STREAM_ADD_OPTIONS=M,exports.STREAM_SOURCE_TYPES=A,exports.STREAM_STATUS={ACTIVE:"active",IDLE:"idle",PAUSED:"paused"};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("lodash"),e=require("../constants/completion.js");exports.getAssetKey=function(t,e,r){return t?"pad--".concat(t.current_pad_id||r):e?"well--".concat(e.id):"common"},exports.getDefaultPadModeSetting=function(t,r){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.COMPLETION_APP_TYPES.fracMultiWellApp,n={};return t?n={mode:e.COMPLETION_APPTYPE_MODES_DICT[a][0]}:r&&(n={mode:"custom",selectedAssets:[r.id]}),n},exports.resolveActiveFracAsset=function(e){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e.reduce((function(e,a){var n=(a.app_streams||[]).find((function(t){return"frac"===t.source_type&&(r||"active"===t.status)}));return!n||e&&e.last_frac_at>n.last_active_at?e:t.set(a,"last_frac_at",n.last_active_at)}),null)},exports.resolveActivePumpdownAsset=function(e){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e.reduce((function(e,a){var n=(a.app_streams||[]).find((function(t){return"pumpdown"===t.source_type&&(r||"active"===t.status)}));return!n||e&&e.last_pumpdown_at>n.last_active_at?e:t.set(a,"last_pumpdown_at",n.last_active_at)}),null)},exports.resolveActiveWirelineAsset=function(e){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e.reduce((function(e,a){var n=(a.app_streams||[]).find((function(t){return"wireline"===t.source_type&&(r||"active"===t.status)}));return!n||e&&e.last_wireline_at>n.last_active_at?e:t.set(a,"last_wireline_at",n.last_active_at)}),null)};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("lodash"),e=require("../constants/completion.js"),r=require("../constants/streamSourceType.js");exports.getAssetKey=function(t,e,r){return t?"pad--".concat(t.current_pad_id||r):e?"well--".concat(e.id):"common"},exports.getDefaultPadModeSetting=function(t,r){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.COMPLETION_APP_TYPES.fracMultiWellApp,s={};return t?s={mode:e.COMPLETION_APPTYPE_MODES_DICT[a][0]}:r&&(s={mode:"custom",selectedAssets:[r.id]}),s},exports.resolveActiveFracAsset=function(e){var a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e.reduce((function(e,s){var n=(s.app_streams||[]).find((function(t){return t.source_type===r.STREAM_SOURCE_TYPES.FRAC&&(a||t.status===r.STREAM_STATUS.ACTIVE)}));return!n||!n.last_active_at||e&&e.last_frac_at>n.last_active_at?e:t.set(s,"last_frac_at",n.last_active_at)}),null)},exports.resolveActivePumpdownAsset=function(e){var a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e.reduce((function(e,s){var n=(s.app_streams||[]).find((function(t){return t.source_type===r.STREAM_SOURCE_TYPES.PUMPDOWN&&(a||t.status===r.STREAM_STATUS.ACTIVE)}));return!n||e&&e.last_pumpdown_at>n.last_active_at?e:t.set(s,"last_pumpdown_at",n.last_active_at)}),null)},exports.resolveActiveWirelineAsset=function(e){var a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e.reduce((function(e,s){var n=(s.app_streams||[]).find((function(t){return t.source_type===r.STREAM_SOURCE_TYPES.WIRELINE&&(a||t.status===r.STREAM_STATUS.ACTIVE)}));return!n||e&&e.last_wireline_at>n.last_active_at?e:t.set(s,"last_wireline_at",n.last_active_at)}),null)};
@@ -3,6 +3,12 @@ export namespace STREAM_SOURCE_TYPES {
3
3
  const FRAC: string;
4
4
  const WIRELINE: string;
5
5
  const DRILLOUT: string;
6
+ const PUMPDOWN: string;
7
+ }
8
+ export namespace STREAM_STATUS {
9
+ const ACTIVE: string;
10
+ const IDLE: string;
11
+ const PAUSED: string;
6
12
  }
7
13
  export namespace STREAM_ADD_OPTIONS {
8
14
  const FROM_WITSML: string;
@@ -1 +1 @@
1
- {"version":3,"file":"streamSourceType.d.ts","sourceRoot":"","sources":["../../src/constants/streamSourceType.js"],"names":[],"mappings":";;;;;;;;;;;;AAiBA;;;;;;EA0CE"}
1
+ {"version":3,"file":"streamSourceType.d.ts","sourceRoot":"","sources":["../../src/constants/streamSourceType.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAwBA;;;;;;EA0CE"}
@@ -0,0 +1 @@
1
+ import O from"@babel/runtime/helpers/defineProperty";import{SEGMENTS as R}from"./segment.js";var L,I={DRILLING:"drilling",FRAC:"frac",WIRELINE:"wireline",DRILLOUT:"drillout",PUMPDOWN:"pumpdown"},A={ACTIVE:"active",IDLE:"idle",PAUSED:"paused"},e={FROM_WITSML:"FROM_WITSML",STREAM_CONNECTOR:"STREAM_CONNECTOR",FROM_HISTORICAL_UPLOAD:"FROM_HISTORICAL_UPLOAD",FROM_BLANK:"FROM_BLANK"};O(L={},R.DRILLING,[{type:I.DRILLING,title:"Drilling",canAddWith:[e.FROM_WITSML,e.STREAM_CONNECTOR,e.FROM_HISTORICAL_UPLOAD,e.FROM_BLANK]}]),O(L,R.COMPLETION,[{type:I.FRAC,title:"Frac",canAddWith:[e.FROM_HISTORICAL_UPLOAD,e.FROM_BLANK]},{type:I.WIRELINE,title:"Wireline",canAddWith:[e.FROM_BLANK]},{type:I.DRILLOUT,title:"Drillout",canAddWith:[e.FROM_WITSML,e.STREAM_CONNECTOR,e.FROM_HISTORICAL_UPLOAD,e.FROM_BLANK]}]);export{e as STREAM_ADD_OPTIONS,I as STREAM_SOURCE_TYPES,A as STREAM_STATUS};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corva/ui",
3
- "version": "0.79.0-0",
3
+ "version": "0.79.0-1",
4
4
  "description": "Shared components/utils for Corva ui projects",
5
5
  "keywords": [
6
6
  "corva-ui"
@@ -1 +1 @@
1
- {"version":3,"file":"completion.d.ts","sourceRoot":"","sources":["../../src/utils/completion.js"],"names":[],"mappings":"AAIO,2EAMN;AAEM,0FAmBN;AAEM,iFAYN;AAEM,qFAYN;AAEM,qFAYN"}
1
+ {"version":3,"file":"completion.d.ts","sourceRoot":"","sources":["../../src/utils/completion.js"],"names":[],"mappings":"AAKO,2EAMN;AAEM,0FAmBN;AAEM,iFAkBN;AAEM,qFAcN;AAEM,qFAcN"}
@@ -1 +1 @@
1
- import{set as t}from"lodash";import{COMPLETION_APP_TYPES as a,COMPLETION_APPTYPE_MODES_DICT as e}from"../constants/completion.js";var n=function(t,a,e){return t?"pad--".concat(t.current_pad_id||e):a?"well--".concat(a.id):"common"},r=function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a.fracMultiWellApp,c={};return t?c={mode:e[r][0]}:n&&(c={mode:"custom",selectedAssets:[n.id]}),c},c=function(a){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return a.reduce((function(a,n){var r=(n.app_streams||[]).find((function(t){return"frac"===t.source_type&&(e||"active"===t.status)}));return!r||a&&a.last_frac_at>r.last_active_at?a:t(n,"last_frac_at",r.last_active_at)}),null)},i=function(a){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return a.reduce((function(a,n){var r=(n.app_streams||[]).find((function(t){return"wireline"===t.source_type&&(e||"active"===t.status)}));return!r||a&&a.last_wireline_at>r.last_active_at?a:t(n,"last_wireline_at",r.last_active_at)}),null)},u=function(a){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return a.reduce((function(a,n){var r=(n.app_streams||[]).find((function(t){return"pumpdown"===t.source_type&&(e||"active"===t.status)}));return!r||a&&a.last_pumpdown_at>r.last_active_at?a:t(n,"last_pumpdown_at",r.last_active_at)}),null)};export{n as getAssetKey,r as getDefaultPadModeSetting,c as resolveActiveFracAsset,u as resolveActivePumpdownAsset,i as resolveActiveWirelineAsset};
1
+ import{set as t}from"lodash";import{COMPLETION_APP_TYPES as a,COMPLETION_APPTYPE_MODES_DICT as n}from"../constants/completion.js";import{STREAM_SOURCE_TYPES as e,STREAM_STATUS as r}from"../constants/streamSourceType.js";var s=function(t,a,n){return t?"pad--".concat(t.current_pad_id||n):a?"well--".concat(a.id):"common"},o=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a.fracMultiWellApp,s={};return t?s={mode:n[r][0]}:e&&(s={mode:"custom",selectedAssets:[e.id]}),s},u=function(a){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return a.reduce((function(a,s){var o=(s.app_streams||[]).find((function(t){return t.source_type===e.FRAC&&(n||t.status===r.ACTIVE)}));return!o||!o.last_active_at||a&&a.last_frac_at>o.last_active_at?a:t(s,"last_frac_at",o.last_active_at)}),null)},c=function(a){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return a.reduce((function(a,s){var o=(s.app_streams||[]).find((function(t){return t.source_type===e.WIRELINE&&(n||t.status===r.ACTIVE)}));return!o||a&&a.last_wireline_at>o.last_active_at?a:t(s,"last_wireline_at",o.last_active_at)}),null)},i=function(a){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return a.reduce((function(a,s){var o=(s.app_streams||[]).find((function(t){return t.source_type===e.PUMPDOWN&&(n||t.status===r.ACTIVE)}));return!o||a&&a.last_pumpdown_at>o.last_active_at?a:t(s,"last_pumpdown_at",o.last_active_at)}),null)};export{s as getAssetKey,o as getDefaultPadModeSetting,u as resolveActiveFracAsset,i as resolveActivePumpdownAsset,c as resolveActiveWirelineAsset};