@corva/ui 0.52.0-13 → 0.52.0-15
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/DevCenter/AppHeader/AppHeader.d.ts.map +1 -1
- package/components/DevCenter/AppHeader/AppHeader.js +1 -1
- package/components/FilesLoader/FilesLoader.d.ts +7 -1
- package/components/FilesLoader/FilesLoader.d.ts.map +1 -1
- package/components/FilesLoader/FilesLoader.js +1 -1
- package/components/OffsetWellPickerV4/components/AppHeader/AppHeader.js +1 -1
- package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableRow.js +1 -1
- package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableRow.module.css.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/DevCenter/AppHeader/AppHeader.js"],"names":[],"mappings":";AAiCA;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"AppHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/DevCenter/AppHeader/AppHeader.js"],"names":[],"mappings":";AAiCA;;;;;;;;;;;;;;;;;;;gBAqJC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAwD0C,kEAAQ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import{useRef as n,useState as a,useEffect as r}from"react";import{get as i}from"lodash";import o from"prop-types";import s from"classnames";import{Tooltip as l}from"@material-ui/core";import"../../Annotations/components/AnnotationsList/index.js";import p from"../../Annotations/components/LastAnnotation/index.js";import"../../Annotations/AnnotationsContext.js";import{SEGMENTS as d}from"../../../constants/segment.js";import{DEV_CENTER_CLI_APP_ID as c}from"../../../constants/devcenter.js";import"../../../constants/goals.js";import"../../../constants/alerts.js";import"../../../constants/apps.js";import"../../../constants/drillstring.js";import"../../../constants/completion.js";import"../../../constants/notifications.js";import"../../../constants/feed.js";import"../../../constants/bha.js";import{getAppName as m,getAppSegment as u}from"../../../utils/devcenter.js";import f from"./VersionBadge.js";import h from"./PadMode.js";import{getAppDimension as g}from"./utils.js";import b from"../../AssetNameLabel/SecondaryAssetNameLabel.js";import v from"../../AssetNameLabel/PrimaryAssetNameLabel.js";import A from"./AppHeader.css.js";import{useStyles as j}from"./AppHeaderStyles.js";import{jsxs as L,Fragment as y,jsx as O}from"react/jsx-runtime";function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function N(t){for(var n=1;n<arguments.length;n++){var a=null!=arguments[n]?arguments[n]:{};n%2?w(Object(a),!0).forEach((function(n){e(t,n,a[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):w(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}var S="DevCenter_AppHeader",P="SMALL",
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import{useRef as n,useState as a,useEffect as r}from"react";import{get as i}from"lodash";import o from"prop-types";import s from"classnames";import{Tooltip as l}from"@material-ui/core";import"../../Annotations/components/AnnotationsList/index.js";import p from"../../Annotations/components/LastAnnotation/index.js";import"../../Annotations/AnnotationsContext.js";import{SEGMENTS as d}from"../../../constants/segment.js";import{DEV_CENTER_CLI_APP_ID as c}from"../../../constants/devcenter.js";import"../../../constants/goals.js";import"../../../constants/alerts.js";import"../../../constants/apps.js";import"../../../constants/drillstring.js";import"../../../constants/completion.js";import"../../../constants/notifications.js";import"../../../constants/feed.js";import"../../../constants/bha.js";import{getAppName as m,getAppSegment as u}from"../../../utils/devcenter.js";import f from"./VersionBadge.js";import h from"./PadMode.js";import{getAppDimension as g}from"./utils.js";import b from"../../AssetNameLabel/SecondaryAssetNameLabel.js";import v from"../../AssetNameLabel/PrimaryAssetNameLabel.js";import A from"./AppHeader.css.js";import{useStyles as j}from"./AppHeaderStyles.js";import{jsxs as L,Fragment as y,jsx as O}from"react/jsx-runtime";function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function N(t){for(var n=1;n<arguments.length;n++){var a=null!=arguments[n]?arguments[n]:{};n%2?w(Object(a),!0).forEach((function(n){e(t,n,a[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):w(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}var S="DevCenter_AppHeader",P="SMALL",C=function(e){return"/assets/".concat(null==e?void 0:e.asset_id)};function _(e){var o,w,_,x,M=e.app,I=e.appLastAnnotation,W=e.appSettings,D=e.badge,H=e.classes,T=e.coordinates,z=e.currentUser,R=e.fracFleet,k=e.isMaximized,q=e.onSettingChange,E=e.openAnnotationsList,F=e.rig,U=e.showLastAnnotation,B=e.updateCurrentDashboardAppLastAnnotation,G=e.well,V=e.wells,J=e.children,K=e.logoSrc,Q=j(),X=null==T?void 0:T.pixelWidth,Y=g(X),Z=m(M),$=null==M||null===(o=M.package)||void 0===o||null===(w=o.manifest)||void 0===w||null===(_=w.application)||void 0===_?void 0:_.subtitle,ee=u(M),te=ee===d.DRILLING,ne=ee===d.COMPLETION,ae=(null==M?void 0:M.settings)||{},re=ae.wellId,ie=ae.rigId,oe=ae.fracFleetId,se=ae.padId,le=se&&(null==R||null===(x=R.pad_frac_fleets.find((function(e){return e.pad.id===se})))||void 0===x?void 0:x.pad),pe=te?re&&(null==G?void 0:G.name):se&&(null==le?void 0:le.name),de=null!=R&&R.current_pad_id?"/assets/types/pad/".concat(null==R?void 0:R.current_pad_id):null,ce=te?null==F?void 0:F.name:null==R?void 0:R.name,me=!!(re||ie||oe),ue=te?ce&&C(G):de;ne&&!me&&null!=G&&G.id&&null!=G&&G.name&&(me=!0,ce=G.name,ue=C(G));var fe=te?C(G):se&&"/assets/types/pad/".concat(se),he=M&&M.id===c,ge={fracFleet:R,wells:V,well:G,onSettingChange:q,appSettings:W},be=n(null),ve=a({width:0}),Ae=t(ve,2),je=Ae[0],Le=Ae[1],ye=a({width:0}),Oe=t(ye,2),we=Oe[0],Ne=Oe[1],Se=a(!1),Pe=t(Se,2),Ce=Pe[0],_e=Pe[1];return r((function(){var e,t;_e(Math.abs((null===(e=be.current)||void 0===e?void 0:e.offsetWidth)-(null===(t=be.current)||void 0===t?void 0:t.scrollWidth))>1)}),[null==je?void 0:je.width,null==we?void 0:we.width,X]),L(y,{children:[L("div",{className:s(Q.appHeaderContainer,H.appHeader),children:[L("div",{className:Q.titleBlock,children:[L("div",{className:H.appHeaderTitleWrapper,ref:be,children:[L("div",{className:Q.titleWrapper,children:[K&&L(y,{children:[O("img",{className:Q.logo,src:K,alt:"company logo"}),O("div",{className:Q.separateLine})]}),O(l,{title:Ce?Z:"",placement:"bottom",children:O("h6",{"data-testid":"".concat(S,"_name"),className:Q.title,children:Z})}),O(f,{app:M})]}),D]}),$&&O("h6",{"data-testid":"".concat(S,"_subtitle"),className:Q.subtitle,children:$})]}),M&&T&&L("div",{className:s(A.controlsContainer,k&&A.appMaximized),children:[ee===d.COMPLETION&&Y!==P&&O(h,N({},ge)),J,pe&&O(b,{secondaryAssetName:pe,coordinatesPixelWidth:T.pixelWidth,secondaryAssetLink:!he&&fe,pageName:S,onSize:function(e){return Ne(e)}}),me&&O(v,{primaryAssetName:ce,pageName:S,coordinatesPixelWidth:T.pixelWidth,primaryAssetLink:!he&&(ue||"/feed"),onSize:function(e){return Le(e)}})]}),U&&I&&O(p,{dashboardAppId:M.id,appId:i(M,["app","id"]),annotation:I,openAnnotationsList:E,updateCurrentDashboardAppLastAnnotation:B,currentUser:z})]}),ee===d.COMPLETION&&Y===P&&O("div",{className:s(A.padModeSelect,A.smallPadModeSelect),children:O(h,N({},ge))})]})}_.propTypes={app:o.object.isRequired,badge:o.node,classes:o.shape({appHeader:o.string,appHeaderTitleWrapper:o.string,appHeaderChildren:o.string}),showLastAnnotation:o.bool,currentUser:o.shape({}),appLastAnnotation:o.shape({}),updateCurrentDashboardAppLastAnnotation:o.func,openAnnotationsList:o.func,rig:o.shape({name:o.string,asset_id:o.number}),well:o.shape({name:o.string,asset_id:o.number}),fracFleet:o.shape({name:o.string,current_pad_id:o.number,pad_frac_fleets:o.arrayOf(o.shape({pad:o.shape({id:o.number.isRequired}).isRequired})).isRequired}),wells:o.arrayOf(o.shape({})),coordinates:o.shape({pixelWidth:o.number.isRequired}),isMaximized:o.bool,appSettings:o.shape({}),onSettingChange:o.func,children:o.arrayOf(o.node),logoSrc:o.string},_.defaultProps={appLastAnnotation:null,appSettings:null,badge:null,classes:{},coordinates:void 0,currentUser:void 0,fracFleet:null,isMaximized:!1,onSettingChange:void 0,openAnnotationsList:void 0,rig:null,showLastAnnotation:!0,updateCurrentDashboardAppLastAnnotation:function(){},well:null,wells:null,children:null,logoSrc:null};export{_ as default};
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
interface FilesLoaderProps extends PropTypes.InferProps<typeof filesLoaderPropTypes> {
|
|
4
4
|
}
|
|
5
|
-
declare function FilesLoader({ size, unit, name, sizeBytes, handleCancel, onReload, onDelete, loadedBytes, error, errorText, formatError, importButtonType, isLoadingAnimation, }: FilesLoaderProps): JSX.Element;
|
|
5
|
+
declare function FilesLoader({ size, unit, name, customUnitName, sizeBytes, handleCancel, onReload, onDelete, loadedBytes, error, errorText, formatError, importButtonType, isLoadingAnimation, showActions, }: FilesLoaderProps): JSX.Element;
|
|
6
6
|
declare namespace FilesLoader {
|
|
7
7
|
var propTypes: {
|
|
8
8
|
size: PropTypes.Requireable<string>;
|
|
9
9
|
unit: PropTypes.Requireable<string>;
|
|
10
|
+
customUnitName: PropTypes.Requireable<string>;
|
|
10
11
|
onDelete: PropTypes.Requireable<(...args: any[]) => any>;
|
|
11
12
|
onReload: PropTypes.Requireable<(...args: any[]) => any>;
|
|
12
13
|
handleCancel: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -18,6 +19,7 @@ declare namespace FilesLoader {
|
|
|
18
19
|
importButtonType: PropTypes.Requireable<string>;
|
|
19
20
|
loadedBytes: PropTypes.Validator<number>;
|
|
20
21
|
isLoadingAnimation: PropTypes.Requireable<boolean>;
|
|
22
|
+
showActions: PropTypes.Requireable<boolean>;
|
|
21
23
|
};
|
|
22
24
|
var defaultProps: {
|
|
23
25
|
size: string;
|
|
@@ -25,6 +27,7 @@ declare namespace FilesLoader {
|
|
|
25
27
|
onDelete: any;
|
|
26
28
|
onReload: any;
|
|
27
29
|
name: string;
|
|
30
|
+
customUnitName: string;
|
|
28
31
|
sizeBytes: number;
|
|
29
32
|
error: any;
|
|
30
33
|
errorText: string;
|
|
@@ -32,11 +35,13 @@ declare namespace FilesLoader {
|
|
|
32
35
|
importButtonType: string;
|
|
33
36
|
handleCancel: any;
|
|
34
37
|
isLoadingAnimation: boolean;
|
|
38
|
+
showActions: boolean;
|
|
35
39
|
};
|
|
36
40
|
}
|
|
37
41
|
declare const filesLoaderPropTypes: {
|
|
38
42
|
size: PropTypes.Requireable<string>;
|
|
39
43
|
unit: PropTypes.Requireable<string>;
|
|
44
|
+
customUnitName: PropTypes.Requireable<string>;
|
|
40
45
|
onDelete: PropTypes.Requireable<(...args: any[]) => any>;
|
|
41
46
|
onReload: PropTypes.Requireable<(...args: any[]) => any>;
|
|
42
47
|
handleCancel: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -48,6 +53,7 @@ declare const filesLoaderPropTypes: {
|
|
|
48
53
|
importButtonType: PropTypes.Requireable<string>;
|
|
49
54
|
loadedBytes: PropTypes.Validator<number>;
|
|
50
55
|
isLoadingAnimation: PropTypes.Requireable<boolean>;
|
|
56
|
+
showActions: PropTypes.Requireable<boolean>;
|
|
51
57
|
};
|
|
52
58
|
export default FilesLoader;
|
|
53
59
|
//# sourceMappingURL=FilesLoader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilesLoader.d.ts","sourceRoot":"","sources":["../../../src/components/FilesLoader/FilesLoader.tsx"],"names":[],"mappings":";AACA,OAAO,SAAS,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"FilesLoader.d.ts","sourceRoot":"","sources":["../../../src/components/FilesLoader/FilesLoader.tsx"],"names":[],"mappings":";AACA,OAAO,SAAS,MAAM,YAAY,CAAC;AAqDnC,UAAU,gBAAiB,SAAQ,SAAS,CAAC,UAAU,CAAC,OAAO,oBAAoB,CAAC;CAAG;AAOvF,iBAAS,WAAW,CAAC,EACnB,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,cAAc,EACd,SAAS,EACT,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,KAAK,EACL,SAAS,EACT,WAAW,EACX,gBAAgB,EAChB,kBAAkB,EAClB,WAAW,GACZ,EAAE,gBAAgB,GAAG,GAAG,CAAC,OAAO,CAuMhC;kBAvNQ,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyNpB,QAAA,MAAM,oBAAoB;;;;;;;;;;;;;;;;CAgBzB,CAAC;AAoBF,eAAe,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as e}from'./../../ext-esm/tslib/tslib.es6.js';import{jsxs as o,jsx as r,Fragment as n}from"react/jsx-runtime";import{useState as t,useEffect as i,useMemo as a}from"react";import l from"prop-types";import s from"classnames";import{Typography as c,LinearProgress as d}from"@material-ui/core";import{Close as m,Delete as
|
|
1
|
+
import{__assign as e}from'./../../ext-esm/tslib/tslib.es6.js';import{jsxs as o,jsx as r,Fragment as n}from"react/jsx-runtime";import{useState as t,useEffect as i,useMemo as a}from"react";import l from"prop-types";import s from"classnames";import{Typography as c,LinearProgress as d}from"@material-ui/core";import{Close as m,Delete as u}from"@material-ui/icons";import f from"../IconButton/index.js";import p from"../Button/index.js";import h from"./Icons/IconWarning.js";import g from"./Icons/IconSuccess.js";import v from"./Icons/IconRefresh.js";import z from"./Icons/FileIcon.js";import N from"./Icons/UploadIcon.js";import{useStyles as B}from"./useStyles.js";function I(l){var I,S,y,w,C,b,L,j=l.size,M=l.unit,P=l.name,T=l.customUnitName,x=l.sizeBytes,k=l.handleCancel,A=l.onReload,E=l.onDelete,U=l.loadedBytes,R=l.error,D=l.errorText,O=l.formatError,W=l.importButtonType,F=l.isLoadingAnimation,q=l.showActions,K=B(),_=t({}),G=_[0],H=_[1],J=t(0),Q=J[0],V=J[1],X=t(!0),Y=X[0],Z=X[1],$="large"===j;i((function(){H(function(e,o,r){return"time"===o?{downloaded:0,unit:"min",convertedSize:e}:"custom"===o?{downloaded:0,unit:r,convertedSize:e}:e>=Math.pow(10,6)?{downloaded:0,unit:"MB",convertedSize:Math.floor(e/Math.pow(10,5))/10}:e>=Math.pow(10,3)?{downloaded:0,unit:"KB",convertedSize:Math.floor(e/Math.pow(10,2))/10}:{downloaded:0,unit:"B",convertedSize:Math.floor(10*e)/10}}(x,M,T))}),[x,M]),i((function(){if(U&&x){var o=Math.round(U/x*100);H((function(r){return e(e({},r),{downloaded:Math.floor(r.convertedSize*o/10)/10})})),V(o)}}),[U,x]),i((function(){var e;return E&&Q>=100&&(Z(!0),e=setTimeout((function(){Z(!1)}),5e3)),function(){return e&&clearTimeout(e)}}),[Q]),i((function(){R&&(V(0),H((function(o){return e(e({},o),{downloaded:0})})))}),[R]);var ee=a((function(){var e,o;return[s(K.iconButton,((e={})[K.iconButtonLarge]=$,e)),s(K.actionIcon,((o={})[K.actionIconLarge]=$,o))]}),[$]),oe=ee[0],re=ee[1];return o("div",e({className:K.fileStateWrapper},{children:[r("div",e({className:K.fileIconContainer},{children:r(z,{name:P,style:{fontSize:$?48:32}})})),o("div",e({className:K.fileState},{children:[o("div",e({className:K.fileStateProgress},{children:[r("div",e({className:K.fileNameWrapper},{children:r(c,e({className:s(K.fileName,(I={},I[K.fileNameLarge]=$,I))},{children:P.length>7?o(n,{children:[r("span",e({className:K.firstPart},{children:P.slice(0,P.length-7)})),r("span",{children:P.slice(-7)})]}):P}))})),!F&&r(d,{className:K.progressBar,variant:"determinate",value:Q,classes:{colorPrimary:s(K.progressBackground,(S={},S[K.progressBarError]=R,S)),barColorPrimary:s(K.progressBarColor,(y={},y[K.progressBarError]=R,y))}}),o("div",e({className:K.loaderProgressContainer},{children:[!F&&r(c,e({className:s(K.fileSize,(w={},w[K.fileSizeLarge]=$,w)),component:"span"},{children:"".concat(G.downloaded," of ").concat(G.convertedSize," ").concat(G.unit)})),o("div",e({className:s(K.progressStatus,(C={},C[K.fileSizeLarge]=$,C))},{children:[R&&o(c,e({component:"div",className:K.errorContainer},{children:[r(h,{size:j}),r(c,e({component:"span",className:s(K.errorText,(b={},b[K.fileSizeLarge]=$,b))},{children:O?"Upload Error. Unacceptable file format.":"Upload Error".concat(D&&". ".concat(D))}))]})),!R&&!F&&"".concat(Q," %")]}))]}))]})),q&&o("div",e({className:K.fileActions},{children:[Q<100&&!R&&r(n,{children:F?r("div",{className:s(K.loadingIcon,(L={},L[K.loadingLargeIcon]=$,L)),style:{backgroundImage:"url(".concat("/static/media/c7e056a4353978b8b0393473f0d750ae.svg",")")}}):r(f,e({tooltipProps:{title:"Cancel"},className:oe,onClick:function(){k(P),V(0),H((function(o){return e(e({},o),{downloaded:0})}))}},{children:r(m,{classes:{root:re}})}))}),100===Q&&!R&&(!Y&&E?r(f,e({variant:"contained",tooltipProps:{title:"Delete"},className:oe,onClick:E},{children:r(u,{classes:{root:re}})})):r(g,{size:j,style:{marginLeft:12}})),A&&R&&r(n,{children:O?r(n,{children:"default"===W?r(p,e({size:$?"medium":"small",variation:"primary",startIcon:r(N,{}),onClick:A},{children:"Import"})):r(f,e({tooltipProps:{title:"Import File"},className:oe,onClick:A},{children:r(N,{style:{fontSize:$?24:16}})}))}):r(f,e({tooltipProps:{title:"Reload"},className:oe,onClick:A},{children:r(v,{style:{fontSize:$?24:16}})}))})]}))]}))]}))}var S={size:l.oneOf(["small","large"]),unit:l.oneOf(["size","time","custom"]),customUnitName:l.string,onDelete:l.func,onReload:l.func,handleCancel:l.func,name:l.string,sizeBytes:l.number,error:l.bool,errorText:l.string,formatError:l.bool,importButtonType:l.oneOf(["default","icon"]),loadedBytes:l.number.isRequired,isLoadingAnimation:l.bool,showActions:l.bool};I.propTypes=S,I.defaultProps={size:"small",unit:"size",onDelete:null,onReload:null,name:"",customUnitName:"",sizeBytes:1,error:null,errorText:"",formatError:!1,importButtonType:"default",handleCancel:null,isLoadingAnimation:!1,showActions:!0};export{I as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"prop-types";import{Divider as t,Tooltip as a}from"@material-ui/core";import{Regular20 as r,Regular14 as l,Regular12 as s}from"../../../Typography.js";import{ViewType as i}from"../../constants.js";import c from"./AppHeader.module.css.js";import{jsx as o,jsxs as n}from"react/jsx-runtime";var d=function(e){var d=e.viewType,m=e.totalCount,p=e.selectedCount,u=e.maxOffsetwellNumber;return d===i.mobile?o("div",{className:c.headerContainer,children:o(r,{children:"Select Offset Wells"})}):n("div",{className:c.headerContainer,children:[o(r,{children:"Select Offset Wells"}),o(t,{className:c.divideLine}),o(l,{className:c.totalLabel,children:"Total:"}),o(l,{"data-testid":"".concat("AppHeader","_totalWells"),className:c.countValue,children:m}),o(l,{className:c.selectedLabel,children:"Selected:"}),o(l,{"data-testid":"".concat("AppHeader","_selected"),className:c.countValue,children:p}),o(a,{title:"App can
|
|
1
|
+
import e from"prop-types";import{Divider as t,Tooltip as a}from"@material-ui/core";import{Regular20 as r,Regular14 as l,Regular12 as s}from"../../../Typography.js";import{ViewType as i}from"../../constants.js";import c from"./AppHeader.module.css.js";import{jsx as o,jsxs as n}from"react/jsx-runtime";var d=function(e){var d=e.viewType,m=e.totalCount,p=e.selectedCount,u=e.maxOffsetwellNumber;return d===i.mobile?o("div",{className:c.headerContainer,children:o(r,{children:"Select Offset Wells"})}):n("div",{className:c.headerContainer,children:[o(r,{children:"Select Offset Wells"}),o(t,{className:c.divideLine}),o(l,{className:c.totalLabel,children:"Total:"}),o(l,{"data-testid":"".concat("AppHeader","_totalWells"),className:c.countValue,children:m}),o(l,{className:c.selectedLabel,children:"Selected:"}),o(l,{"data-testid":"".concat("AppHeader","_selected"),className:c.countValue,children:p}),o(a,{title:"App can’t process more than (".concat(u-1,") Offset Wells."),placement:"right",children:n(s,{"data-testid":"".concat("AppHeader","_maxOffsetSize"),className:c.maxOffsetSize,children:["/",u-1]})})]})};d.propTypes={viewType:e.string.isRequired,totalCount:e.number.isRequired,selectedCount:e.number.isRequired,maxOffsetwellNumber:e.number.isRequired};export{d as AppHeader};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/defineProperty";import{memo as
|
|
1
|
+
import e from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/defineProperty";import{memo as l,useState as i,useRef as a,useCallback as n,useEffect as s,useMemo as r}from"react";import o from"prop-types";import{omit as c,startCase as d,get as m}from"lodash";import u from"classnames";import h from"moment";import{TableRow as f,TableCell as b,Tooltip as y,Checkbox as p,Typography as v}from"@material-ui/core";import{convertValue as w}from"../../../../utils/index.js";import{ColumnType as N,ROW_HEIGHT as g,ViewType as R,EXPANED_WELLNAME_WIDTH as W,LEAVE_TOUCH_DELAY as k,StatusOptions as C}from"../../constants.js";import{SubjectWellMark as T}from"./SubjectWellMark.js";import q from"./OffsetWellsTableRow.module.css.js";import x from"./ViewWellSectionsName.js";import{jsxs as O,jsx as D}from"react/jsx-runtime";var S="OffsetWellsTableRow";function j(e,t,l){var i=t.find((function(e){return e.key===l})),a=m(e,i.key);return"undefined"===a?"loading...":Number.isFinite(a)||a?i.unitType?w(a,i.unitType,i.from,i.to):a:"—"}function I(e,t){var l=m(e,N.distance);return Number.isFinite(l)?t?l:w(l,"length","mi","km"):"—"}function M(e,t){var l=e.find((function(e){return e.key===t}));return(null==l?void 0:l.width)||0}var _=function(l){var o,m,w,_=l.columnsWithDict,A=l.data,L=l.subjectWellId,Y=l.metricsKeys,z=l.metricsColumns,E=l.handleChanageOffsetWell,V=l.isWellNameExpand,F=l.wellNameStyle,P=l.wellNameWidth,K=l.isViewOnly,B=l.isImperial,H=l.isLimitedOffsetwells,G=l.maxOffsetwellNumber,J=l.wellSections,Q=l.setActiveWellId,U=l.viewType,X=l.newCheckedWellId,Z=l.setNewCheckedWellId,$=l.index,ee=l.flyDuration,te=L===A.id,le=t({},q.subjectWellRow,te),ie=i(A.checked),ae=e(ie,2),ne=ae[0],se=ae[1],re=a(),oe=!1,ce=A[N.name]||"—",de=ce;if(!V&&2*P<8*ce.length){var me=function(e){var t=document.createElement("span");document.body.appendChild(t),t.style.font="Roboto",t.style.fontSize="14px",t.style.letterSpacing="0.01071em",t.style.height="auto",t.style.width="auto",t.style.position="absolute",t.style.whiteSpace="nowrap",t.innerHTML=e;var l=Math.ceil(t.clientWidth);return document.body.removeChild(t),l}(ce);if(me>2*P){var ue=2*P/(me/ce.length);de="".concat(ce.substring(0,ue/2-2),"\n... ").concat(ce.substring(ce.length-ue/2+6)),oe=!0}}var he=n((function(e,t,l,i,a){var n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,s=t-e;re.current.style.position="absolute",re.current.style.top="".concat(e,"px"),re.current.style.zIndex=l===i?4:3,re.current.style.transition="transform ".concat(a,"ms ease ").concat(50*n,"ms"),re.current.style.transform="translateY(".concat(s,"px)")}),[]),fe=n((function(){re.current.style.position="unset",re.current.style.zIndex=1,re.current.style.transition="none",re.current.style.transform="none"}),[]),be=n((function(e){Z(A.id);var t=c(A,"moveTo");E(t,e),se(e)}),[A,Z,E]);s((function(){if(X){var e=$*g+16;if(A.moveTo){var t=e+g*A.moveTo;he(e,t,X,A.id,ee,A.delayTime)}}else fe()}),[A.moveTo,X]),s((function(){se(A.checked)}),[A.checked]);var ye,pe,ve=r((function(){return A[N.wellSection]}),[A]);return O(f,{"data-testid":"".concat(S,"_row_").concat(ce),className:u(q.bodyRow,t({},q.moveRow,1===Math.abs(A.moveTo)&&X!==A.id)),innerRef:re,onMouseEnter:function(){Q(A.id)},onMouseLeave:function(){Q(null)},children:[O(b,{"data-testid":"".concat(S,"_well"),className:u(q.bodyCell,q.wellNameCell,le,(o={},t(o,F,U!==R.mobile),t(o,q.wellNameCellMobile,U===R.mobile),o)),style:{width:V?W:M(_,N.name)},children:[te&&D(T,{className:u(q.subjectWellMark,t({},q.subjectWellMarkMobile,U===R.mobile))}),!te&&D(y,{title:H&&!A.checked?"App can’t process more than (".concat(G-1,") Offset Wells."):"",placement:"bottom-start",classes:{tooltipPlacementBottom:q.checkboxTooltip},children:D("div",{children:D(p,{"data-testid":"".concat(S,"_checkbox"),size:"medium",checked:ne,classes:{disabled:q.checkboxDisabled},disabled:K||H&&!A.checked,onChange:function(e){return be(e.target.checked)}})})}),D(y,{title:oe?ce:"",children:D(v,{variant:"body2",className:u(q.wellNameCursor,(m={},t(m,q.cellDataViewOnly,te),t(m,q.wellNamePreWrap,oe),m)),children:oe?de:ce})})]}),D(b,{"data-testid":"".concat(S,"_dot"),className:u(q.bodyCell,le),style:{width:M(_,N.status)},children:!te&&D(y,{title:d(A[N.status]),enterTouchDelay:U===R.mobile&&0,leaveTouchDelay:U===R.mobile&&k,children:D("div",{className:q.statusContainer,children:D("div",{"data-testid":"".concat(S,"_color"),className:q.status,style:{background:null===(w=C.find((function(e){return e.value===A[N.status]})))||void 0===w?void 0:w.color}})})})}),D(b,{"data-testid":"".concat(S,"_rig"),className:u(q.bodyCell,le),style:{width:M(_,N.rig)},children:D(v,{variant:"body2",className:q.cellData,children:A[N.rig]&&"Null"!==A[N.rig]?A[N.rig]:"—"})}),D(b,{"data-testid":"".concat(S,"_distance"),className:u(q.bodyCell,le),style:{width:M(_,N.distance)},children:D(v,{variant:"body2",className:q.cellData,children:I(A,B)})}),D(b,{"data-testid":"".concat(S,"_lastActive"),className:u(q.bodyCell,le),style:{width:M(_,N.lastActive)},children:D(v,{variant:"body2",className:q.cellData,children:A[N.lastActive]&&Number.isFinite(A[N.lastActive])?h.unix(A[N.lastActive]).format("MM/DD/YYYY"):"—"})}),Y.map((function(e){return D(b,{"data-testid":"".concat(S,"_").concat(e),className:u(q.bodyCell,le),style:{width:M(_,e)},children:D(v,{variant:"body2",className:q.cellData,children:j(A,z,e)})},e)})),D(b,{"data-testid":"".concat(S,"_wellSection"),className:u(q.bodyCell,q.lastCell,le),style:{width:M(_,N.wellSection)},children:ve&&ve.length>1?D(y,{classes:{tooltip:q.customTooltip},title:D(x,{wellSectionNames:ve}),children:D("div",{className:q.sectionLength,children:ve.length})}):D(y,{title:ve||"",children:D(v,{variant:"body2",className:q.cellData,style:{color:ve&&1===ve.length&&(ye=ve,pe=e(ye,1)[0],J.find((function(e){return e.label===pe})).color)},children:ve})})})]})};_.propTypes={columnsWithDict:o.arrayOf(o.shape({})).isRequired,data:o.shape({id:o.number,checked:o.bool,name:o.string,status:o.string,moveTo:o.number,delayTime:o.number}).isRequired,subjectWellId:o.number.isRequired,metricsKeys:o.arrayOf(o.string).isRequired,metricsColumns:o.arrayOf(o.shape({})).isRequired,handleChanageOffsetWell:o.func.isRequired,isWellNameExpand:o.bool.isRequired,wellNameStyle:o.string.isRequired,wellNameWidth:o.number.isRequired,isViewOnly:o.bool.isRequired,isImperial:o.bool.isRequired,isLimitedOffsetwells:o.bool.isRequired,maxOffsetwellNumber:o.number.isRequired,wellSections:o.arrayOf(o.shape({})).isRequired,setActiveWellId:o.func.isRequired,viewType:o.string.isRequired,newCheckedWellId:o.number.isRequired,setNewCheckedWellId:o.func.isRequired,index:o.number.isRequired,flyDuration:o.number.isRequired};var A=l(_);export{A as default};
|
package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableRow.module.css.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from'./../../../../ext-esm/style-inject/dist/style-inject.es.js';var l={bodyRow:"OffsetWellsTableRow-module_bodyRow__UqDEw",bodyCell:"OffsetWellsTableRow-module_bodyCell__B-yWv",subjectWellRow:"OffsetWellsTableRow-module_subjectWellRow__x60wK",subjectWellMark:"OffsetWellsTableRow-module_subjectWellMark__S-nvA",subjectWellMarkMobile:"OffsetWellsTableRow-module_subjectWellMarkMobile__ghfJp",cellData:"OffsetWellsTableRow-module_cellData__SNLYB",cellDataViewOnly:"OffsetWellsTableRow-module_cellDataViewOnly__2Fd-1",hoverCell:"OffsetWellsTableRow-module_hoverCell__4wFuk",wellNameCell:"OffsetWellsTableRow-module_wellNameCell__BBEf-",wellNameCellMobile:"OffsetWellsTableRow-module_wellNameCellMobile__AJ0Rm",lastCell:"OffsetWellsTableRow-module_lastCell__VEQCi",subjectWellImage:"OffsetWellsTableRow-module_subjectWellImage__IkmRP",statusContainer:"OffsetWellsTableRow-module_statusContainer__IUVWC",status:"OffsetWellsTableRow-module_status__qWj9c",customTooltip:"OffsetWellsTableRow-module_customTooltip__aeWUJ",wellNameCursor:"OffsetWellsTableRow-module_wellNameCursor__BlXVa",wellNamePreWrap:"OffsetWellsTableRow-module_wellNamePreWrap__oXXEB",sectionLength:"OffsetWellsTableRow-module_sectionLength__vxefy",moveRow:"OffsetWellsTableRow-module_moveRow__dV8Gw",checkboxTooltip:"OffsetWellsTableRow-module_checkboxTooltip__4e4Sp"};e(".OffsetWellsTableRow-module_bodyRow__UqDEw{display:flex!important;flex-direction:row!important;margin-bottom:4px!important}.OffsetWellsTableRow-module_bodyRow__UqDEw:hover .OffsetWellsTableRow-module_bodyCell__B-yWv{background:#393939}.OffsetWellsTableRow-module_subjectWellRow__x60wK{border-color:var(--palette-primary-main)!important}.OffsetWellsTableRow-module_subjectWellMark__S-nvA{left:-1px;position:absolute;top:-1px;z-index:98}.OffsetWellsTableRow-module_subjectWellMarkMobile__ghfJp{top:16px}.OffsetWellsTableRow-module_bodyCell__B-yWv{align-items:center!important;background:var(--palette-background-b-8);border-top:1px solid var(--palette-primary-text-9);display:flex!important;height:56px!important;padding:0 12px 0 0!important}.OffsetWellsTableRow-module_cellData__SNLYB{-webkit-line-clamp:2;-webkit-box-orient:vertical;color:var(--palette-primary-text-1);display:-webkit-box;font-size:14px;font-weight:400;line-height:20px;overflow:hidden;overflow-wrap:break-word;white-space:normal}.OffsetWellsTableRow-module_cellDataViewOnly__2Fd-1{padding-left:12px}.OffsetWellsTableRow-module_hoverCell__4wFuk{background:var(--palette-background-b-7)!important}.OffsetWellsTableRow-module_wellNameCell__BBEf-{border-bottom-left-radius:4px;border-left:1px solid var(--palette-primary-text-9);border-top-left-radius:4px;left:0;position:sticky;z-index:2}.OffsetWellsTableRow-module_wellNameCellMobile__AJ0Rm{position:static}.OffsetWellsTableRow-module_lastCell__VEQCi{border-bottom-right-radius:4px;border-right:1px solid var(--palette-primary-text-9);border-top-right-radius:4px}.OffsetWellsTableRow-module_subjectWellImage__IkmRP{height:16px;width:16px}.OffsetWellsTableRow-module_statusContainer__IUVWC{align-items:center;display:flex;height:32px;justify-content:center;width:32px}.OffsetWellsTableRow-module_status__qWj9c{border-radius:50%;cursor:default;height:8px;width:8px}.OffsetWellsTableRow-module_customTooltip__aeWUJ{opacity:.9!important}.OffsetWellsTableRow-module_wellNameCursor__BlXVa{color:var(--palette-primary-text-1);cursor:default;white-space:normal;word-break:break-all}.OffsetWellsTableRow-module_wellNamePreWrap__oXXEB{white-space:pre}.OffsetWellsTableRow-module_sectionLength__vxefy{background:var(--palette-primary-text-9);border-radius:20px;cursor:default;padding:2px 8px}.OffsetWellsTableRow-module_moveRow__dV8Gw{opacity:.38!important}.OffsetWellsTableRow-module_checkboxTooltip__4e4Sp{margin-top:-1px}");export{l as default};
|
|
1
|
+
import e from'./../../../../ext-esm/style-inject/dist/style-inject.es.js';var l={bodyRow:"OffsetWellsTableRow-module_bodyRow__UqDEw",bodyCell:"OffsetWellsTableRow-module_bodyCell__B-yWv",subjectWellRow:"OffsetWellsTableRow-module_subjectWellRow__x60wK",subjectWellMark:"OffsetWellsTableRow-module_subjectWellMark__S-nvA",subjectWellMarkMobile:"OffsetWellsTableRow-module_subjectWellMarkMobile__ghfJp",cellData:"OffsetWellsTableRow-module_cellData__SNLYB",cellDataViewOnly:"OffsetWellsTableRow-module_cellDataViewOnly__2Fd-1",hoverCell:"OffsetWellsTableRow-module_hoverCell__4wFuk",wellNameCell:"OffsetWellsTableRow-module_wellNameCell__BBEf-",wellNameCellMobile:"OffsetWellsTableRow-module_wellNameCellMobile__AJ0Rm",lastCell:"OffsetWellsTableRow-module_lastCell__VEQCi",subjectWellImage:"OffsetWellsTableRow-module_subjectWellImage__IkmRP",statusContainer:"OffsetWellsTableRow-module_statusContainer__IUVWC",status:"OffsetWellsTableRow-module_status__qWj9c",customTooltip:"OffsetWellsTableRow-module_customTooltip__aeWUJ",wellNameCursor:"OffsetWellsTableRow-module_wellNameCursor__BlXVa",wellNamePreWrap:"OffsetWellsTableRow-module_wellNamePreWrap__oXXEB",sectionLength:"OffsetWellsTableRow-module_sectionLength__vxefy",moveRow:"OffsetWellsTableRow-module_moveRow__dV8Gw",checkboxTooltip:"OffsetWellsTableRow-module_checkboxTooltip__4e4Sp",checkboxDisabled:"OffsetWellsTableRow-module_checkboxDisabled__-lVnx"};e(".OffsetWellsTableRow-module_bodyRow__UqDEw{display:flex!important;flex-direction:row!important;margin-bottom:4px!important}.OffsetWellsTableRow-module_bodyRow__UqDEw:hover .OffsetWellsTableRow-module_bodyCell__B-yWv{background:#393939}.OffsetWellsTableRow-module_subjectWellRow__x60wK{border-color:var(--palette-primary-main)!important}.OffsetWellsTableRow-module_subjectWellMark__S-nvA{left:-1px;position:absolute;top:-1px;z-index:98}.OffsetWellsTableRow-module_subjectWellMarkMobile__ghfJp{top:16px}.OffsetWellsTableRow-module_bodyCell__B-yWv{align-items:center!important;background:var(--palette-background-b-8);border-top:1px solid var(--palette-primary-text-9);display:flex!important;height:56px!important;padding:0 12px 0 0!important}.OffsetWellsTableRow-module_cellData__SNLYB{-webkit-line-clamp:2;-webkit-box-orient:vertical;color:var(--palette-primary-text-1);display:-webkit-box;font-size:14px;font-weight:400;line-height:20px;overflow:hidden;overflow-wrap:break-word;white-space:normal}.OffsetWellsTableRow-module_cellDataViewOnly__2Fd-1{padding-left:12px}.OffsetWellsTableRow-module_hoverCell__4wFuk{background:var(--palette-background-b-7)!important}.OffsetWellsTableRow-module_wellNameCell__BBEf-{border-bottom-left-radius:4px;border-left:1px solid var(--palette-primary-text-9);border-top-left-radius:4px;left:0;position:sticky;z-index:2}.OffsetWellsTableRow-module_wellNameCellMobile__AJ0Rm{position:static}.OffsetWellsTableRow-module_lastCell__VEQCi{border-bottom-right-radius:4px;border-right:1px solid var(--palette-primary-text-9);border-top-right-radius:4px}.OffsetWellsTableRow-module_subjectWellImage__IkmRP{height:16px;width:16px}.OffsetWellsTableRow-module_statusContainer__IUVWC{align-items:center;display:flex;height:32px;justify-content:center;width:32px}.OffsetWellsTableRow-module_status__qWj9c{border-radius:50%;cursor:default;height:8px;width:8px}.OffsetWellsTableRow-module_customTooltip__aeWUJ{opacity:.9!important}.OffsetWellsTableRow-module_wellNameCursor__BlXVa{color:var(--palette-primary-text-1);cursor:default;white-space:normal;word-break:break-all}.OffsetWellsTableRow-module_wellNamePreWrap__oXXEB{white-space:pre}.OffsetWellsTableRow-module_sectionLength__vxefy{background:var(--palette-primary-text-9);border-radius:20px;cursor:default;padding:2px 8px}.OffsetWellsTableRow-module_moveRow__dV8Gw{opacity:.38!important}.OffsetWellsTableRow-module_checkboxTooltip__4e4Sp{margin-left:11px!important;margin-top:-1px!important}.OffsetWellsTableRow-module_checkboxDisabled__-lVnx{opacity:.16!important}");export{l as default};
|