@corva/ui 3.7.4 → 3.7.5
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/OffsetWellPickerV4/OffsetWellPickerV4.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV4/OffsetWellPickerV4.module.css.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV4/components/OffsetWellsTable/AdvancedSearch/AutoCompleteAssetSearch.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.module.css.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV4/effects/useAdvancedWells.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV4/effects/useFetchWells.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV4/effects/useFilterOptions.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV4/effects/useFilteredWells.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV4/effects/useSortedWells.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV4/effects/useTableColumns.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV4/utils/apiCalls.js +1 -1
- package/components/OffsetWellPickerV4/OffsetWellPickerV4.d.ts.map +1 -1
- package/components/OffsetWellPickerV4/OffsetWellPickerV4.js +1 -1
- package/components/OffsetWellPickerV4/OffsetWellPickerV4.module.css.js +1 -1
- package/components/OffsetWellPickerV4/components/OffsetWellsTable/AdvancedSearch/AutoCompleteAssetSearch.js +1 -1
- package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.js +1 -1
- package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.module.css.js +1 -1
- package/components/OffsetWellPickerV4/effects/useAdvancedWells.d.ts +1 -1
- package/components/OffsetWellPickerV4/effects/useAdvancedWells.d.ts.map +1 -1
- package/components/OffsetWellPickerV4/effects/useAdvancedWells.js +1 -1
- package/components/OffsetWellPickerV4/effects/useFetchWells.d.ts +1 -2
- package/components/OffsetWellPickerV4/effects/useFetchWells.d.ts.map +1 -1
- package/components/OffsetWellPickerV4/effects/useFetchWells.js +1 -1
- package/components/OffsetWellPickerV4/effects/useFilterOptions.d.ts +1 -5
- package/components/OffsetWellPickerV4/effects/useFilterOptions.d.ts.map +1 -1
- package/components/OffsetWellPickerV4/effects/useFilterOptions.js +1 -1
- package/components/OffsetWellPickerV4/effects/useFilteredWells.d.ts +1 -97
- package/components/OffsetWellPickerV4/effects/useFilteredWells.d.ts.map +1 -1
- package/components/OffsetWellPickerV4/effects/useFilteredWells.js +1 -1
- package/components/OffsetWellPickerV4/effects/useSortedWells.d.ts.map +1 -1
- package/components/OffsetWellPickerV4/effects/useSortedWells.js +1 -1
- package/components/OffsetWellPickerV4/effects/useTableColumns.d.ts +1 -1
- package/components/OffsetWellPickerV4/effects/useTableColumns.d.ts.map +1 -1
- package/components/OffsetWellPickerV4/effects/useTableColumns.js +1 -1
- package/components/OffsetWellPickerV4/utils/apiCalls.d.ts +8 -9
- package/components/OffsetWellPickerV4/utils/apiCalls.d.ts.map +1 -1
- package/components/OffsetWellPickerV4/utils/apiCalls.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFilterOptions.d.ts","sourceRoot":"","sources":["../../../../src/components/OffsetWellPickerV4/effects/useFilterOptions.js"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"useFilterOptions.d.ts","sourceRoot":"","sources":["../../../../src/components/OffsetWellPickerV4/effects/useFilterOptions.js"],"names":[],"mappings":"AAIA,oDAiBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import r from"@babel/runtime/helpers/toConsumableArray";import{
|
|
1
|
+
import r from"@babel/runtime/helpers/toConsumableArray";import e from"@babel/runtime/helpers/slicedToArray";import{useState as o,useEffect as t}from"react";import{FilterOptions as n}from"../constants.js";function a(a){var l=o([]),u=e(l,2),i=u[0],c=u[1];return t((function(){if(a){var e=n.map((function(e){var o=e.value,t=e.label,n=a.reduce((function(e,t){return"Null"===t[o]||e.includes(t[o])?e:[].concat(r(e),[t[o]])}),[]);return{value:o,label:t,options:[].concat(r(n.sort()),["Null"])}}));c(e)}}),[a]),i}export{a as useFilterOptions};
|
|
@@ -1,98 +1,2 @@
|
|
|
1
|
-
export function useFilteredWells(wells: any, filters: any):
|
|
2
|
-
toString: () => string;
|
|
3
|
-
charAt: (pos: number) => string;
|
|
4
|
-
charCodeAt: (index: number) => number;
|
|
5
|
-
concat: (...strings: string[]) => string;
|
|
6
|
-
indexOf: (searchString: string, position?: number) => number;
|
|
7
|
-
lastIndexOf: (searchString: string, position?: number) => number;
|
|
8
|
-
localeCompare: {
|
|
9
|
-
(that: string): number;
|
|
10
|
-
(that: string, locales?: string | string[], options?: Intl.CollatorOptions): number;
|
|
11
|
-
(that: string, locales?: Intl.LocalesArgument, options?: Intl.CollatorOptions): number;
|
|
12
|
-
};
|
|
13
|
-
match: {
|
|
14
|
-
(regexp: string | RegExp): RegExpMatchArray | null;
|
|
15
|
-
(matcher: {
|
|
16
|
-
[Symbol.match](string: string): RegExpMatchArray | null;
|
|
17
|
-
}): RegExpMatchArray | null;
|
|
18
|
-
};
|
|
19
|
-
replace: {
|
|
20
|
-
(searchValue: string | RegExp, replaceValue: string): string;
|
|
21
|
-
(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string;
|
|
22
|
-
(searchValue: {
|
|
23
|
-
[Symbol.replace](string: string, replaceValue: string): string;
|
|
24
|
-
}, replaceValue: string): string;
|
|
25
|
-
(searchValue: {
|
|
26
|
-
[Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string;
|
|
27
|
-
}, replacer: (substring: string, ...args: any[]) => string): string;
|
|
28
|
-
};
|
|
29
|
-
search: {
|
|
30
|
-
(regexp: string | RegExp): number;
|
|
31
|
-
(searcher: {
|
|
32
|
-
[Symbol.search](string: string): number;
|
|
33
|
-
}): number;
|
|
34
|
-
};
|
|
35
|
-
slice: (start?: number, end?: number) => string;
|
|
36
|
-
split: {
|
|
37
|
-
(separator: string | RegExp, limit?: number): string[];
|
|
38
|
-
(splitter: {
|
|
39
|
-
[Symbol.split](string: string, limit?: number): string[];
|
|
40
|
-
}, limit?: number): string[];
|
|
41
|
-
};
|
|
42
|
-
substring: (start: number, end?: number) => string;
|
|
43
|
-
toLowerCase: () => string;
|
|
44
|
-
toLocaleLowerCase: {
|
|
45
|
-
(locales?: string | string[]): string;
|
|
46
|
-
(locales?: Intl.LocalesArgument): string;
|
|
47
|
-
};
|
|
48
|
-
toUpperCase: () => string;
|
|
49
|
-
toLocaleUpperCase: {
|
|
50
|
-
(locales?: string | string[]): string;
|
|
51
|
-
(locales?: Intl.LocalesArgument): string;
|
|
52
|
-
};
|
|
53
|
-
trim: () => string;
|
|
54
|
-
readonly length: number;
|
|
55
|
-
substr: (from: number, length?: number) => string;
|
|
56
|
-
valueOf: () => string;
|
|
57
|
-
codePointAt: (pos: number) => number | undefined;
|
|
58
|
-
includes: (searchString: string, position?: number) => boolean;
|
|
59
|
-
endsWith: (searchString: string, endPosition?: number) => boolean;
|
|
60
|
-
normalize: {
|
|
61
|
-
(form: "NFC" | "NFD" | "NFKC" | "NFKD"): string;
|
|
62
|
-
(form?: string): string;
|
|
63
|
-
};
|
|
64
|
-
repeat: (count: number) => string;
|
|
65
|
-
startsWith: (searchString: string, position?: number) => boolean;
|
|
66
|
-
anchor: (name: string) => string;
|
|
67
|
-
big: () => string;
|
|
68
|
-
blink: () => string;
|
|
69
|
-
bold: () => string;
|
|
70
|
-
fixed: () => string;
|
|
71
|
-
fontcolor: (color: string) => string;
|
|
72
|
-
fontsize: {
|
|
73
|
-
(size: number): string;
|
|
74
|
-
(size: string): string;
|
|
75
|
-
};
|
|
76
|
-
italics: () => string;
|
|
77
|
-
link: (url: string) => string;
|
|
78
|
-
small: () => string;
|
|
79
|
-
strike: () => string;
|
|
80
|
-
sub: () => string;
|
|
81
|
-
sup: () => string;
|
|
82
|
-
padStart: (maxLength: number, fillString?: string) => string;
|
|
83
|
-
padEnd: (maxLength: number, fillString?: string) => string;
|
|
84
|
-
trimEnd: () => string;
|
|
85
|
-
trimStart: () => string;
|
|
86
|
-
trimLeft: () => string;
|
|
87
|
-
trimRight: () => string;
|
|
88
|
-
matchAll: (regexp: RegExp) => RegExpStringIterator<RegExpExecArray>;
|
|
89
|
-
replaceAll: {
|
|
90
|
-
(searchValue: string | RegExp, replaceValue: string): string;
|
|
91
|
-
(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string;
|
|
92
|
-
};
|
|
93
|
-
at: (index: number) => string | undefined;
|
|
94
|
-
isWellFormed: () => boolean;
|
|
95
|
-
toWellFormed: () => string;
|
|
96
|
-
[Symbol.iterator]: () => StringIterator<string>;
|
|
97
|
-
}[];
|
|
1
|
+
export function useFilteredWells(wells: any, filters: any): any;
|
|
98
2
|
//# sourceMappingURL=useFilteredWells.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFilteredWells.d.ts","sourceRoot":"","sources":["../../../../src/components/OffsetWellPickerV4/effects/useFilteredWells.js"],"names":[],"mappings":"AAMA
|
|
1
|
+
{"version":3,"file":"useFilteredWells.d.ts","sourceRoot":"","sources":["../../../../src/components/OffsetWellPickerV4/effects/useFilteredWells.js"],"names":[],"mappings":"AAMA,gEAiDC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import r from"@babel/runtime/helpers/
|
|
1
|
+
import r from"@babel/runtime/helpers/typeof";import e from"@babel/runtime/helpers/slicedToArray";import{uniqBy as t}from"lodash";import{useState as i,useEffect as n}from"react";import{FilterType as o}from"../constants.js";import{getTimestampByPeriod as m}from"../utils/timePeriod.js";function s(s,u){var a=i(null),c=e(a,2),f=c[0],l=c[1],d=/\sST0/g;return n((function(){if(s){var i=s.filter((function(e){return Object.keys(u).every((function(t){return"object"!==r(u[t])||!(u[t].length>0&&!u[t].includes(e[t]))}))})),n=i;void 0!==u[o.sideTracks]&&(n=i.filter((function(r){return!u[o.sideTracks]||!r.name.match(d)})));var a=u.period,c=u.timeRangeFrom,f=u.timeRangeTo,p=m(a,c,f),b=e(p,2),v=b[0],h=b[1],T=Number.isFinite(v)&&Number.isFinite(h)?n.filter((function(r){return r.lastActive>=v&&r.lastActive<=h})):n,g=u.radius,j=Number.isFinite(g)?T.filter((function(r){return r.distance<=g})):T;l(t(j,"id"))}}),[s,u]),f}export{s as useFilteredWells};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSortedWells.d.ts","sourceRoot":"","sources":["../../../../src/components/OffsetWellPickerV4/effects/useSortedWells.js"],"names":[],"mappings":"AAkBA,
|
|
1
|
+
{"version":3,"file":"useSortedWells.d.ts","sourceRoot":"","sources":["../../../../src/components/OffsetWellPickerV4/effects/useSortedWells.js"],"names":[],"mappings":"AAkBA,wIAyCC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import r from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import e from"@babel/runtime/helpers/toConsumableArray";import{useState as n,
|
|
1
|
+
import r from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import e from"@babel/runtime/helpers/toConsumableArray";import{useState as n,useEffect as o}from"react";import{isEmpty as i}from"lodash";import{SortDirection as c}from"react-virtualized";import{ColumnType as u}from"../constants.js";function f(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 a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?f(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))}))}return t}var p=function(r,t,n){var o=e(r),i=t===u.lastActive;return o.sort((function(r,e){return r[t]||0===r[t]&&!i?e[t]||0===e[t]&&!i?n===c.ASC?r[t]>=e[t]?1:-1:e[t]>=r[t]?1:-1:-1:1})),o};function l(r,e,f,l,s){var m=n(u.distance),b=t(m,2),d=b[0],O=b[1],y=n(c.ASC),j=t(y,2),v=j[0],h=j[1],P=n(null),g=t(P,2),w=g[0],A=g[1];return o((function(){if(e&&!s){var t=f.map((function(r){return r.id})),n=f.filter((function(t){return t.id!==(null==r?void 0:r.id)})),o=p(n,d,v),c=e.filter((function(r){return!t.includes(r.id)})),u=p(c,d,v),m=(i(r)?[]:[r]).concat(o).concat(u).map((function(r){return f.find((function(t){return t.id===r.id}))?a(a({},r),{},{checked:!0}):a(a({},r),{},{checked:!1})}));A(m),l(!1)}}),[e,d,v,r,f,s]),[d,O,v,h,w]}export{l as useSortedWells};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export function useTableColumns(metricsKeys: any): any
|
|
1
|
+
export function useTableColumns(metricsKeys: any): any;
|
|
2
2
|
//# sourceMappingURL=useTableColumns.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTableColumns.d.ts","sourceRoot":"","sources":["../../../../src/components/OffsetWellPickerV4/effects/useTableColumns.js"],"names":[],"mappings":"AAIA,
|
|
1
|
+
{"version":3,"file":"useTableColumns.d.ts","sourceRoot":"","sources":["../../../../src/components/OffsetWellPickerV4/effects/useTableColumns.js"],"names":[],"mappings":"AAIA,uDAoBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/slicedToArray";import{useState as n,useEffect as o}from"react";import{TableColumns as c,ColumnType as i}from"../constants.js";function p(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 u(r){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){e(r,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}))}return r}function f(e){var p=n(null),f=t(p,2),b=f[0],a=f[1];return o((function(){if(e){var t=e.length<3?e.length:3,n=c.reduce((function(n,o){return o.type===i.metrics?e.reduce((function(e,n){return[].concat(r(e),[u(u({},o),{},{key:n,width:o.width[t]})])}),n):n.concat(u(u({},o),{},{width:o.width[t]}))}),[]);a(n)}}),[e]),b}export{f as useTableColumns};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export declare function fetchAllAssets(searchKey: any, assetType: any, page: number, company: any): Promise<any>;
|
|
1
|
+
export function fetchCompanies(): Promise<any[]>;
|
|
2
|
+
export function resyncIdasWells(currentUser: any, assetId: any): Promise<import("~/clients/jsonApi").TaskResult>;
|
|
3
|
+
export function fetchWells(companyId: any, addWellsUsabilityInfo: any): Promise<any>;
|
|
4
|
+
export function fetchOffsetWellSelections(assetId: any): Promise<any>;
|
|
5
|
+
export function fetchWellhubWells(assetId: any): Promise<any>;
|
|
6
|
+
export function fetchCompanyGoals(companyId: any): Promise<any>;
|
|
7
|
+
export function fetchMetricsData(companyId: any, wellIds: any, metricsKeys: any): Promise<any[]>;
|
|
8
|
+
export function fetchAllAssets(searchKey: any, assetType: any, page: number, company: any): Promise<any>;
|
|
10
9
|
//# sourceMappingURL=apiCalls.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apiCalls.d.ts","sourceRoot":"","sources":["../../../../src/components/OffsetWellPickerV4/utils/apiCalls.
|
|
1
|
+
{"version":3,"file":"apiCalls.d.ts","sourceRoot":"","sources":["../../../../src/components/OffsetWellPickerV4/utils/apiCalls.js"],"names":[],"mappings":"AAiBA,iDASC;AAED,iHAqBC;AAED,qFAkEC;AAED,sEAKC;AAED,8DASC;AAED,gEASC;AAID,iGA2CC;AAiED,yGAgBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import t from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/toConsumableArray";import r from"@babel/runtime/helpers/asyncToGenerator";import n from"@babel/runtime/regenerator";import a from"jsona";import{range as s,sortBy as i,get as u,concat as c}from"lodash";import{ROWS_PER_PAGE as o}from"../constants.js";import{getAppStorage as p,getCompanies as l,getAssets as f,getCompanyGoals as m,getWells as b,getRigs as d}from"../../../clients/jsonApi/index.js";import{postTaskAndWaitResult as v}from"../../../clients/jsonApi/postTaskAndWaitResult.js";function h(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function y(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?h(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _=new a;function g(){return w.apply(this,arguments)}function w(){return(w=r(n.mark((function t(){var e;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,l();case 3:e=t.sent,t.next=9;break;case 6:t.prev=6,t.t0=t.catch(0),console.error(t.t0);case 9:return t.abrupt("return",e?i(e,["name"]):[]);case 10:case"end":return t.stop()}}),t,null,[[0,6]])})))).apply(this,arguments)}function x(t,e){return k.apply(this,arguments)}function k(){return(k=r(n.mark((function t(e,r){var a,s;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=null,s={provider:"xto",app_key:"xto.idas_offset_performance_distance_be_od",asset_id:r,app_version:16,properties:{asset_id:r,user_id:e.id,user_name:"".concat(e.first_name," ").concat(e.last_name)}},t.prev=2,t.next=5,v(s);case 5:a=t.sent,t.next=11;break;case 8:t.prev=8,t.t0=t.catch(2),console.error(t.t0);case 11:return t.abrupt("return",a);case 12:case"end":return t.stop()}}),t,null,[[2,8]])})))).apply(this,arguments)}function j(t,e){return O.apply(this,arguments)}function O(){return(O=r(n.mark((function t(e,r){var a,s,i;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=null,t.prev=1,t.next=4,f({types:["well"],company_id:e?+e:void 0,fields:["asset.name","asset.parent_asset_id","asset.parent_asset_name","asset.status","asset.stats","asset.target_formation","asset.string_design","asset.root_asset_name","asset.basin","asset.county","asset.area","asset.visibility","asset.top_hole","asset.settings","well.settings","asset.last_active_at"],per_page:1e4,sort:"name"});case 4:a=t.sent,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(1),console.error(t.t0);case 10:if(s=a?a.data.map((function(t){return{id:Number(t.id),name:u(t,"attributes.name"),status:u(t,"attributes.status"),rigId:u(t,"attributes.parent_asset_id")||"Null",rigName:u(t,"attributes.parent_asset_name")||"Null",formation:u(t,"attributes.target_formation")||"Null",stringDesign:u(t,"attributes.string_design")||"Null",programName:u(t,"attributes.root_asset_name")||"Null",basin:u(t,"attributes.basin")||"Null",county:u(t,"attributes.county")||"Null",area:u(t,"attributes.area")||"Null",visibility:u(t,"attributes.visibility"),topHole:u(t,"attributes.top_hole"),rigReleaseDate:u(t,"attributes.stats.well_end"),totalDepth:u(t,"attributes.stats.total_depth"),is_usable:!0,apiNumber:u(t,"attributes.settings.api_number","-"),lastActive:new Date(u(t,"attributes.last_active_at")).getTime()/1e3}})).filter((function(t){return t.visibility.includes("visible")})):[],"function"!=typeof r){t.next=16;break}return t.next=14,r(s);case 14:return i=t.sent,t.abrupt("return",i);case 16:return t.abrupt("return",s);case 17:case"end":return t.stop()}}),t,null,[[1,7]])})))).apply(this,arguments)}function N(t){return P.apply(this,arguments)}function P(){return(P=r(n.mark((function t(e){return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p("corva","data.offset-wells.bic",e,{limit:1,sort:"{timestamp: -1}"}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function D(t){return A.apply(this,arguments)}function A(){return(A=r(n.mark((function t(e){var r;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=null,t.prev=1,t.next=4,p("corva","data.offset_wells",e,{limit:1});case 4:r=t.sent,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(1),console.error(t.t0);case 10:return t.abrupt("return",r||[]);case 11:case"end":return t.stop()}}),t,null,[[1,7]])})))).apply(this,arguments)}function $(t){return E.apply(this,arguments)}function E(){return(E=r(n.mark((function t(e){var r;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,m(e);case 3:r=t.sent,t.next=9;break;case 6:t.prev=6,t.t0=t.catch(0),console.error(t.t0);case 9:return t.abrupt("return",r&&u(r,"company_goals")||{});case 10:case"end":return t.stop()}}),t,null,[[0,6]])})))).apply(this,arguments)}function I(t,e,r){return S.apply(this,arguments)}function S(){return S=r(n.mark((function t(a,i,u){var c,o,l;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(0!==i.length){t.next=2;break}return t.abrupt("return",[]);case 2:return c=Math.floor(i.length/200)+1,t.next=5,Promise.all(s(c).map(function(){var t=r(n.mark((function t(e,r){var s,c,o,l;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s={company_id:a,"data.asset_id":{$in:i.slice(200*r,200*(r+1))},"data.key":{$in:u},"data.type":"asset"},c={_id:0,"data.key":1,"data.value":1,asset_id:"$data.asset_id"},o={aggregate:JSON.stringify([{$match:s},{$project:c}])},l=null,t.prev=4,t.next=7,p("corva","metrics",null,o);case 7:l=t.sent,t.next=13;break;case 10:t.prev=10,t.t0=t.catch(4),console.error(t.t0);case 13:return t.abrupt("return",l||[]);case 14:case"end":return t.stop()}}),t,null,[[4,10]])})));return function(e,r){return t.apply(this,arguments)}}()));case 5:return o=t.sent,l=[],o.forEach((function(t){return l.push.apply(l,e(t))})),t.abrupt("return",l);case 9:case"end":return t.stop()}}),t)}))),S.apply(this,arguments)}function T(t,e,r){return z.apply(this,arguments)}function z(){return(z=r(n.mark((function t(e,r,a){var s,i,u;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s={company:a,search:e,per_page:o,page:r,fields:["well.name","well.asset_id","well.settings","well.status","well.rigName","well.visibility"],sort:"name"},t.prev=2,t.next=5,b(s);case 5:i=t.sent,t.next=12;break;case 8:t.prev=8,t.t0=t.catch(2),console.error(t.t0),i=[];case 12:return u=_.deserialize(i),t.abrupt("return",u.map((function(t){return{redirectAssetId:t.asset_id,apiNumber:t.settings.api_number,name:t.name,asset_id:t.asset_id,status:t.status,rigName:t.rigName,visibility:t.visibility,type:"well"}})));case 14:case"end":return t.stop()}}),t,null,[[2,8]])})))).apply(this,arguments)}function R(t,e,r){return C.apply(this,arguments)}function C(){return(C=r(n.mark((function t(e,r,a){var s,i,c;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s={company:a,search:e,per_page:o,page:r,fields:["rig.name","rig.active_well","rig.asset_id"],sort:"name"},t.prev=2,t.next=5,d(s);case 5:i=t.sent,t.next=12;break;case 8:t.prev=8,t.t0=t.catch(2),console.error(t.t0),i=[];case 12:return c=_.deserialize(i),t.abrupt("return",c.map((function(t){return y({redirectAssetId:u(t,["active_well","asset_id"])||null},t)})));case 14:case"end":return t.stop()}}),t,null,[[2,8]])})))).apply(this,arguments)}function G(t,e){return H.apply(this,arguments)}function H(){return H=r(n.mark((function t(r,a){var s,i,u,o,p,l=arguments;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(s=l.length>2&&void 0!==l[2]?l[2]:1,i=l.length>3?l[3]:void 0,"well"!==a){t.next=7;break}return t.next=5,T(r,s,i);case 5:return u=t.sent,t.abrupt("return",u);case 7:if("rig"!==a){t.next=12;break}return t.next=10,R(r,s,i);case 10:return o=t.sent,t.abrupt("return",o);case 12:return t.next=14,Promise.all([T(r,s,i),R(r,s,i)]);case 14:return p=t.sent,t.abrupt("return",c.apply(void 0,e(p)));case 16:case"end":return t.stop()}}),t)}))),H.apply(this,arguments)}export{G as fetchAllAssets,g as fetchCompanies,$ as fetchCompanyGoals,I as fetchMetricsData,N as fetchOffsetWellSelections,D as fetchWellhubWells,j as fetchWells,x as resyncIdasWells};
|