@corva/ui 0.45.0-1 → 0.45.0-10
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/CommentInput/index.js +1 -1
- package/components/DevCenter/AppSettingsPopover/AppSettingsPopover.js +1 -1
- package/components/ImageViewer/index.js +1 -1
- package/components/OffsetWellPickerV4/OffsetWellPickerV4.js +1 -1
- package/components/OffsetWellPickerV4/components/Filter/Filter.js +1 -1
- package/components/OffsetWellPickerV4/components/Filter/WellSection.js +1 -1
- package/components/OffsetWellPickerV4/components/Map/MapView.js +1 -1
- package/components/OffsetWellPickerV4/components/Map/WellsMap.js +1 -1
- package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.js +1 -1
- package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableHead.js +1 -1
- package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableRow.js +1 -1
- package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableRow.module.css.js +1 -1
- package/components/OffsetWellPickerV4/components/OffsetWellsTable/ViewWellSectionsName.js +1 -0
- package/components/OffsetWellPickerV4/constants.js +1 -1
- package/components/OffsetWellPickerV4/effects/useBicWells.js +1 -1
- package/components/RangeSlider/Input.css.js +1 -1
- package/components/RangeSlider/RangeSlider.css.js +1 -1
- package/components/RangeSlider/RangeSlider.js +1 -1
- package/config/theme/tableOverrides.js +1 -1
- package/constants/alerts.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"@babel/runtime/helpers/asyncToGenerator";import e from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/assertThisInitialized";import i from"@babel/runtime/helpers/inherits";import a from"@babel/runtime/helpers/possibleConstructorReturn";import r from"@babel/runtime/helpers/getPrototypeOf";import s from"@babel/runtime/helpers/defineProperty";import l from"@babel/runtime/regenerator";import{PureComponent as c}from"react";import p from"prop-types";import m from"lodash/noop";import{withStyles as u}from"@material-ui/core/styles";import d from"classnames";import{get as h}from"lodash";import{Paper as f,TextField as g,InputAdornment as C,Tooltip as b,Typography as I}from"@material-ui/core";import v from"@material-ui/core/colors/grey";import x from"../Avatar/index.js";import y from"../FileUploadIconButton.js";import F from"../EmojiIconButton.js";import S from"../FailedFileUploading.js";import E from"../UserMention/index.js";import U from"../FilePreview/index.js";import N from"../IconButton/index.js";import k from"../Icons/SendIcon.js";import{isSuggestionsListOpened as A}from"../UserMention/utils/index.js";import M from"../../utils/main.js";import{isNativeDetected as R}from"../../utils/mobileDetect.js";import{notifyCommentEdit as j,notifyCommentPost as B}from"../../utils/nativeMessages.js";import{patchFeedItemComment as w}from"../../clients/jsonApi/index.js";import T from"./styles.css.js";import{jsxs as L,jsx as P}from"react/jsx-runtime";function z(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,o=r(t);if(e){var i=r(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return a(this,n)}}var D={chatAvatarWrapper:{display:"flex",alignItems:"center",position:"absolute",left:0,height:32},commentTextFieldContainer:{position:"relative",margin:"0"},commentTextFieldContainerSpaceAround:{position:"relative",margin:"20px 10px"}},_=function(a){i(p,c);var r=z(p);function p(n){var i,a,c;return e(this,p),i=r.call(this,n),s(o(i),"handleSelectEmoji",(function(t){return i.setState((function(e){var n=e.comment;return{comment:"".concat(n).concat(t.native)}}))})),s(o(i),"postComment",(a=t(l.mark((function t(e){var n;return l.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,i.props.postComment(e);case 3:n=t.sent,t.next=9;break;case 6:t.prev=6,t.t0=t.catch(0),console.error(t.t0.message);case 9:return t.abrupt("return",n);case 10:case"end":return t.stop()}}),t,null,[[0,6]])}))),function(t){return a.apply(this,arguments)})),s(o(i),"patchComment",(c=t(l.mark((function t(e){var n,o,a,r;return l.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=i.props,o=n.editFeedItemId,a=n.editCommentId,t.prev=1,t.next=4,w(o,a,e);case 4:r=t.sent,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(1),console.error(t.t0.message);case 10:return t.abrupt("return",r);case 11:case"end":return t.stop()}}),t,null,[[1,7]])}))),function(t){return c.apply(this,arguments)})),s(o(i),"clearCommentField",(function(t){i.setState({comment:"",attachmentUrl:null,attachmentName:null,attachmentSize:null},(function(){i.focusOnRef(),t&&"function"==typeof t&&t()}))})),s(o(i),"handleKeyDown",(function(t){var e=t.key;"Escape"===e&&i.props.exitEditMode(),"Enter"===e&&(A()||(t.preventDefault(),i.handleSendComment()))})),s(o(i),"handleAttachmentLoadingError",(function(t){i.setState({attachmentUrl:null,attachmentName:null,attachmentSize:null,attachmentLoadingError:t})})),s(o(i),"handleFileUpload",(function(t,e,n){i.setState({attachmentUrl:t,attachmentName:e,attachmentSize:n,attachmentLoadingError:null})})),s(o(i),"handleNativeFileUpload",(function(){var t=i.state.comment;i.isEditMode?(j(t),i.clearCommentField(i.props.exitEditMode)):(B(t),i.clearCommentField())})),s(o(i),"handleFileDelete",(function(){return i.setState({attachmentUrl:null,attachmentName:null,attachmentSize:null})})),s(o(i),"handleSendComment",t(l.mark((function t(){var e,n,o;return l.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((e=i.state.comment?i.state.comment.trim():null)||i.state.attachmentUrl){t.next=3;break}return t.abrupt("return");case 3:if(n={comment:{body:e,attachment:{url:i.state.attachmentUrl,size:i.state.attachmentSize,file_name:i.state.attachmentName}}},!i.isEditMode){t.next=16;break}return i.props.setIsEditting(!0),t.next=8,i.patchComment(n);case 8:return o=t.sent,t.next=11,i.props.patchCommentCallback(o);case 11:i.props.setIsEditting(!1),i.clearCommentField(),i.props.exitEditMode(),t.next=24;break;case 16:return i.props.setIsPosting(!0),t.next=19,i.postComment(n);case 19:return o=t.sent,t.next=22,i.props.postCommentCallback(o);case 22:i.props.setIsPosting(!1),i.clearCommentField();case 24:case"end":return t.stop()}}),t)})))),s(o(i),"handleCancelClick",(function(){i.setState({comment:"",attachmentUrl:null,attachmentName:null,attachmentSize:null},i.props.exitEditMode())})),i.state={comment:"",attachmentUrl:null,attachmentName:null,attachmentSize:null,attachmentLoadingError:null,isInputFocused:!1},i}return n(p,[{key:"componentDidMount",value:function(){this.isEditMode&&this.setInitialCommentValue()}},{key:"componentDidUpdate",value:function(t){(this.isEditMode&&!t.editFeedItemId||this.props.editCommentId&&this.props.editCommentId!==t.editCommentId)&&this.setInitialCommentValue()}},{key:"isEditMode",get:function(){return!!this.props.editFeedItemId}},{key:"setInitialCommentValue",value:function(){var t=this.props.editAttachment?this.props.editAttachment.url:null;this.setState({comment:this.props.editComment,attachmentUrl:t,attachmentName:t?this.props.editAttachment.file_name||M.getFileNameWithExtensionFromPath(t):null,attachmentSize:this.props.editAttachment?this.props.editAttachment.size:null})}},{key:"focusOnRef",value:function(){this.props.inputRef&&this.props.inputRef.current.focus()}},{key:"render",value:function(){var t=this,e=this.props,n=e.classes,o=e.currentUser,i="".concat(h(o,["attributes","first_name"])," ").concat(h(o,["attributes","last_name"]));return L("div",{style:this.props.spaceAround?D.commentTextFieldContainerSpaceAround:D.commentTextFieldContainer,children:[P("div",{style:D.chatAvatarWrapper,children:P(x,{displayName:i,size:32,imgSrc:this.props.currentUser&&this.props.currentUser.profile_photo})}),P(f,{className:this.props.classes.paperRoot,children:P(g,{"data-testid":"".concat("commentInput","_input"),placeholder:"Type here",FormHelperTextProps:{component:"div",margin:"dense"},InputProps:{inputComponent:E,inputProps:{onChange:function(e){return t.setState({comment:e})},singleLine:!0,value:this.state.comment||"",inputRef:this.props.inputRef,withLightTheme:!1,onMount:this.props.onMount,companyId:this.props.companyId,autoFocus:this.props.autoFocus,disabled:this.props.disabled,onFocus:function(){return t.setState({isInputFocused:!0})},onBlur:function(){return t.setState({isInputFocused:!1})},allowSuggestionsAboveCursor:!0},endAdornment:!this.props.isNative&&L(C,{position:"end",className:this.props.classes.inputAdornment,children:[!this.state.attachmentUrl&&P(b,{title:"Attach File",placement:"bottom",classes:{tooltip:n.iconTooltip},children:P("div",{className:d(T.cCommentInputIconContainer,T.cCommentInputIconUpload),children:P(y,{openPreviewDialogOnUpload:!1,disableRipple:!0,onFinish:this.handleFileUpload,onError:this.handleAttachmentLoadingError,fileUploadIconClassName:this.props.classes.additionalActionButton,htmlColor:v[400],inputId:"comment-attachment-".concat(this.props.editCommentId||this.props.parentId)})})}),P(b,{title:"Add Emoji",placement:"bottom",classes:{tooltip:n.iconTooltip},children:P("div",{className:T.cCommentInputIconContainer,children:P(F,{"data-testid":"".concat("commentInput","_emojiButton"),handleSelectEmoji:this.handleSelectEmoji,emojiIconClassName:this.props.classes.additionalActionButton,htmlColor:v[400],disableRipple:!0})})})]}),disableUnderline:!0,classes:{root:this.props.classes.inputRoot,input:this.props.classes.inputEl}},className:this.props.classes.input,onKeyDown:this.handleKeyDown})}),this.state.attachmentLoadingError&&P(S,{errorMessage:this.state.attachmentLoadingError,className:this.props.classes.fileUploadingError}),this.state.attachmentUrl&&P(U,{fileName:this.state.attachmentName,fileUrl:this.state.attachmentUrl,handleFileDelete:this.handleFileDelete,classes:this.props.classes}),(this.state.isInputFocused||this.state.attachmentUrl||this.state.comment)&&L("div",{className:T.cCommentInputSendContainer,children:[P("div",{className:T.cCommentInputSendContainerCancel,children:P(I,{variant:"caption",className:d(this.props.classes.inputMain,this.props.classes.cancelText,this.props.classes.highlightedLabel),component:"div",gutterBottom:!0,onClick:this.handleCancelClick,children:"Cancel"})}),L("div",{className:T.cCommentInputSendContainerSend,children:[L(I,{variant:"caption",className:d(this.props.classes.inputMain,this.props.classes.inputHelper),component:"div",gutterBottom:!0,children:["Press ",P(I,{variant:"caption",color:"primary",className:d(this.props.classes.inputMain,this.props.classes.highlightedLabel),children:"Enter"})," to send"]}),P(N,{size:"large",tooltipProps:{title:"Send"},"data-testid":"".concat("commentInput","_sendButton"),onClick:this.handleSendComment,classes:{root:this.props.classes.sendButton},children:P(k,{})})]})]})]})}}]),p}();_.propTypes={inputRef:p.shape({current:p.shape({focus:p.shape({})})}),editFeedItemId:p.number,editCommentId:p.number,editComment:p.string,editAttachment:p.shape({url:p.string,size:p.number,file_name:p.string}),spaceAround:p.bool,postComment:p.func.isRequired,postCommentCallback:p.func,patchCommentCallback:p.func,exitEditMode:p.func,setIsPosting:p.func,setIsEditting:p.func,onMount:p.func,autoFocus:p.bool,disabled:p.bool,classes:p.shape({}).isRequired,currentUser:p.shape(),isNative:p.bool,companyId:p.number,parentId:p.string},_.defaultProps={inputRef:null,editFeedItemId:null,editCommentId:null,parentId:null,editComment:null,editAttachment:{},spaceAround:!1,setIsPosting:m,setIsEditting:m,onMount:m,autoFocus:void 0,disabled:!1,patchCommentCallback:m,postCommentCallback:m,exitEditMode:m,companyId:null,currentUser:{},isNative:R};var O=u((function(t){return{paperRoot:{width:"calc(100% - 48px)",marginLeft:48,display:"inline-block",height:32,border:"0","&:focus-within":{boxShadow:"inset 0 0 0 2px ".concat(t.palette.primary.main)},boxShadow:"none",background:"#4D4D4D"},input:{paddingLeft:5,width:"100%"},inputRoot:{height:32,paddingRight:"8px",lineHeight:"29px",paddingLeft:"8px"},inputEl:{padding:"0 0 0 6px",height:"100%"},additionalActionButton:{padding:"6px"},nativeActionButton:{margin:"5px 10px",cursor:"pointer"},fileUploadingError:{marginTop:10,marginLeft:24},inputMain:{marginBottom:0,fontSize:"11px",color:t.palette.primary.text8},inputHelper:{display:"flex",paddingRight:5},cancelText:{cursor:"pointer"},highlightedLabel:{color:t.palette.primary.main},iconTooltip:{marginTop:"3px"},sendButton:{"&:hover":{backgroundColor:"rgba(3,188,212, 0.1)"},"&.MuiButtonBase-root":{padding:7}},inputAdornment:{marginBottom:"0!important",height:"100%"}}}))(_);export{O as default};
|
|
1
|
+
import t from"@babel/runtime/helpers/asyncToGenerator";import e from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/assertThisInitialized";import i from"@babel/runtime/helpers/inherits";import a from"@babel/runtime/helpers/possibleConstructorReturn";import r from"@babel/runtime/helpers/getPrototypeOf";import s from"@babel/runtime/helpers/defineProperty";import l from"@babel/runtime/regenerator";import{PureComponent as c}from"react";import p from"prop-types";import m from"lodash/noop";import{withStyles as u}from"@material-ui/core/styles";import d from"classnames";import{get as h}from"lodash";import{Paper as f,TextField as g,InputAdornment as C,Tooltip as b,Typography as v}from"@material-ui/core";import I from"@material-ui/core/colors/grey";import x from"../Avatar/index.js";import y from"../FileUploadIconButton.js";import F from"../EmojiIconButton.js";import S from"../FailedFileUploading.js";import E from"../UserMention/index.js";import U from"../FilePreview/index.js";import N from"../IconButton/index.js";import k from"../Icons/SendIcon.js";import{isSuggestionsListOpened as A}from"../UserMention/utils/index.js";import M from"../../utils/main.js";import{isNativeDetected as R}from"../../utils/mobileDetect.js";import{notifyCommentEdit as j,notifyCommentPost as B}from"../../utils/nativeMessages.js";import{patchFeedItemComment as w}from"../../clients/jsonApi/index.js";import T from"./styles.css.js";import{jsxs as L,jsx as P}from"react/jsx-runtime";function z(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,o=r(t);if(e){var i=r(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return a(this,n)}}var D={chatAvatarWrapper:{display:"flex",alignItems:"center",position:"absolute",left:0,height:32},commentTextFieldContainer:{position:"relative",margin:"0"},commentTextFieldContainerSpaceAround:{position:"relative",margin:"20px 10px"}},_=function(a){i(p,c);var r=z(p);function p(n){var i,a,c;return e(this,p),i=r.call(this,n),s(o(i),"handleSelectEmoji",(function(t){return i.setState((function(e){var n=e.comment;return{comment:"".concat(n).concat(t.native)}}))})),s(o(i),"postComment",(a=t(l.mark((function t(e){var n;return l.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,i.props.postComment(e);case 3:n=t.sent,t.next=9;break;case 6:t.prev=6,t.t0=t.catch(0),console.error(t.t0.message);case 9:return t.abrupt("return",n);case 10:case"end":return t.stop()}}),t,null,[[0,6]])}))),function(t){return a.apply(this,arguments)})),s(o(i),"patchComment",(c=t(l.mark((function t(e){var n,o,a,r;return l.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=i.props,o=n.editFeedItemId,a=n.editCommentId,t.prev=1,t.next=4,w(o,a,e);case 4:r=t.sent,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(1),console.error(t.t0.message);case 10:return t.abrupt("return",r);case 11:case"end":return t.stop()}}),t,null,[[1,7]])}))),function(t){return c.apply(this,arguments)})),s(o(i),"clearCommentField",(function(t){i.setState({comment:"",attachmentUrl:null,attachmentName:null,attachmentSize:null},(function(){i.focusOnRef(),t&&"function"==typeof t&&t()}))})),s(o(i),"handleKeyDown",(function(t){var e=t.key;"Escape"===e&&i.props.exitEditMode(),"Enter"===e&&(A()||(t.preventDefault(),i.handleSendComment()))})),s(o(i),"handleAttachmentLoadingError",(function(t){i.setState({attachmentUrl:null,attachmentName:null,attachmentSize:null,attachmentLoadingError:t})})),s(o(i),"handleFileUpload",(function(t,e,n){i.setState({attachmentUrl:t,attachmentName:e,attachmentSize:n,attachmentLoadingError:null})})),s(o(i),"handleNativeFileUpload",(function(){var t=i.state.comment;i.isEditMode?(j(t),i.clearCommentField(i.props.exitEditMode)):(B(t),i.clearCommentField())})),s(o(i),"handleFileDelete",(function(){return i.setState({attachmentUrl:null,attachmentName:null,attachmentSize:null})})),s(o(i),"handleSendComment",t(l.mark((function t(){var e,n,o;return l.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((e=i.state.comment?i.state.comment.trim():null)||i.state.attachmentUrl){t.next=3;break}return t.abrupt("return");case 3:if(n={comment:{body:e,attachment:{url:i.state.attachmentUrl,size:i.state.attachmentSize,file_name:i.state.attachmentName}}},!i.isEditMode){t.next=16;break}return i.props.setIsEditting(!0),t.next=8,i.patchComment(n);case 8:return o=t.sent,t.next=11,i.props.patchCommentCallback(o);case 11:i.props.setIsEditting(!1),i.clearCommentField(),i.props.exitEditMode(),t.next=24;break;case 16:return i.props.setIsPosting(!0),t.next=19,i.postComment(n);case 19:return o=t.sent,t.next=22,i.props.postCommentCallback(o);case 22:i.props.setIsPosting(!1),i.clearCommentField();case 24:case"end":return t.stop()}}),t)})))),s(o(i),"handleCancelClick",(function(){i.setState({comment:"",attachmentUrl:null,attachmentName:null,attachmentSize:null},i.props.exitEditMode())})),i.state={comment:"",attachmentUrl:null,attachmentName:null,attachmentSize:null,attachmentLoadingError:null,isInputFocused:!1},i}return n(p,[{key:"componentDidMount",value:function(){this.isEditMode&&this.setInitialCommentValue()}},{key:"componentDidUpdate",value:function(t){(this.isEditMode&&!t.editFeedItemId||this.props.editCommentId&&this.props.editCommentId!==t.editCommentId)&&this.setInitialCommentValue()}},{key:"isEditMode",get:function(){return!!this.props.editFeedItemId}},{key:"setInitialCommentValue",value:function(){var t=this.props.editAttachment?this.props.editAttachment.url:null;this.setState({comment:this.props.editComment,attachmentUrl:t,attachmentName:t?this.props.editAttachment.file_name||M.getFileNameWithExtensionFromPath(t):null,attachmentSize:this.props.editAttachment?this.props.editAttachment.size:null})}},{key:"focusOnRef",value:function(){this.props.inputRef&&this.props.inputRef.current.focus()}},{key:"render",value:function(){var t,e=this,n=this.props,o=n.classes,i=n.currentUser,a="".concat(h(i,["attributes","first_name"])," ").concat(h(i,["attributes","last_name"]));return L("div",{style:this.props.spaceAround?D.commentTextFieldContainerSpaceAround:D.commentTextFieldContainer,children:[P("div",{style:D.chatAvatarWrapper,children:P(x,{displayName:a,size:32,imgSrc:this.props.currentUser&&this.props.currentUser.profile_photo})}),P(f,{className:this.props.classes.paperRoot,children:P(g,{"data-testid":"".concat("commentInput","_input"),placeholder:"Type here",FormHelperTextProps:{component:"div",margin:"dense"},InputProps:{inputComponent:E,inputProps:{onChange:function(t){return e.setState({comment:t})},singleLine:!0,value:this.state.comment||"",inputRef:this.props.inputRef,withLightTheme:!1,onMount:this.props.onMount,companyId:this.props.companyId,autoFocus:this.props.autoFocus,disabled:this.props.disabled,onFocus:function(){return e.setState({isInputFocused:!0})},onBlur:function(){return e.setState({isInputFocused:!1})},allowSuggestionsAboveCursor:!0},endAdornment:!this.props.isNative&&L(C,{position:"end",className:this.props.classes.inputAdornment,children:[!this.state.attachmentUrl&&P(b,{title:"Attach File",placement:"bottom",classes:{tooltip:o.iconTooltip},children:P("div",{className:d(T.cCommentInputIconContainer,T.cCommentInputIconUpload),children:P(y,{openPreviewDialogOnUpload:!1,disableRipple:!0,onFinish:this.handleFileUpload,onError:this.handleAttachmentLoadingError,fileUploadIconClassName:this.props.classes.additionalActionButton,htmlColor:I[400],inputId:"comment-attachment-".concat(this.props.editCommentId||this.props.parentId)})})}),P(b,{title:"Add Emoji",placement:"bottom",classes:{tooltip:o.iconTooltip},children:P("div",{className:T.cCommentInputIconContainer,children:P(F,{"data-testid":"".concat("commentInput","_emojiButton"),handleSelectEmoji:this.handleSelectEmoji,emojiIconClassName:this.props.classes.additionalActionButton,htmlColor:I[400],disableRipple:!0})})})]}),disableUnderline:!0,classes:{root:this.props.classes.inputRoot,input:this.props.classes.inputEl}},className:this.props.classes.input,onKeyDown:this.handleKeyDown})}),this.state.attachmentLoadingError&&P(S,{errorMessage:this.state.attachmentLoadingError,className:this.props.classes.fileUploadingError}),this.state.attachmentUrl&&P(U,{fileName:this.state.attachmentName,fileUrl:this.state.attachmentUrl,handleFileDelete:this.handleFileDelete,classes:this.props.classes}),(this.state.isInputFocused||this.state.attachmentUrl||this.state.comment||this.props.editComment||(null===(t=this.props.editAttachment)||void 0===t?void 0:t.url))&&L("div",{className:T.cCommentInputSendContainer,children:[P("div",{className:T.cCommentInputSendContainerCancel,children:P(v,{variant:"caption",className:d(this.props.classes.inputMain,this.props.classes.cancelText,this.props.classes.highlightedLabel),component:"div",gutterBottom:!0,onClick:this.handleCancelClick,children:"Cancel"})}),L("div",{className:T.cCommentInputSendContainerSend,children:[L(v,{variant:"caption",className:d(this.props.classes.inputMain,this.props.classes.inputHelper),component:"div",gutterBottom:!0,children:["Press ",P(v,{variant:"caption",color:"primary",className:d(this.props.classes.inputMain,this.props.classes.highlightedLabel),children:"Enter"})," to send"]}),P(N,{size:"large",tooltipProps:{title:"Send"},"data-testid":"".concat("commentInput","_sendButton"),onClick:this.handleSendComment,classes:{root:this.props.classes.sendButton},children:P(k,{})})]})]})]})}}]),p}();_.propTypes={inputRef:p.shape({current:p.shape({focus:p.shape({})})}),editFeedItemId:p.number,editCommentId:p.number,editComment:p.string,editAttachment:p.shape({url:p.string,size:p.number,file_name:p.string}),spaceAround:p.bool,postComment:p.func.isRequired,postCommentCallback:p.func,patchCommentCallback:p.func,exitEditMode:p.func,setIsPosting:p.func,setIsEditting:p.func,onMount:p.func,autoFocus:p.bool,disabled:p.bool,classes:p.shape({}).isRequired,currentUser:p.shape(),isNative:p.bool,companyId:p.number,parentId:p.string},_.defaultProps={inputRef:null,editFeedItemId:null,editCommentId:null,parentId:null,editComment:null,editAttachment:{},spaceAround:!1,setIsPosting:m,setIsEditting:m,onMount:m,autoFocus:void 0,disabled:!1,patchCommentCallback:m,postCommentCallback:m,exitEditMode:m,companyId:null,currentUser:{},isNative:R};var O=u((function(t){return{paperRoot:{width:"calc(100% - 48px)",marginLeft:48,display:"inline-block",height:32,border:"0","&:focus-within":{boxShadow:"inset 0 0 0 2px ".concat(t.palette.primary.main)},boxShadow:"none",background:"#4D4D4D"},input:{paddingLeft:5,width:"100%"},inputRoot:{height:32,paddingRight:"8px",lineHeight:"29px",paddingLeft:"8px"},inputEl:{padding:"0 0 0 6px",height:"100%"},additionalActionButton:{padding:"6px"},nativeActionButton:{margin:"5px 10px",cursor:"pointer"},fileUploadingError:{marginTop:10,marginLeft:24},inputMain:{marginBottom:0,fontSize:"11px",color:t.palette.primary.text8},inputHelper:{display:"flex",paddingRight:5},cancelText:{cursor:"pointer"},highlightedLabel:{color:t.palette.primary.main},iconTooltip:{marginTop:"3px"},sendButton:{"&:hover":{backgroundColor:"rgba(3,188,212, 0.1)"},"&.MuiButtonBase-root":{padding:7}},inputAdornment:{marginBottom:"0!important",height:"100%"}}}))(_);export{O as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/slicedToArray";import
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/objectWithoutProperties";import{useState as o}from"react";import n from"prop-types";import i from"classnames";import{makeStyles as l,Popover as a}from"@material-ui/core";import{Settings as c,Close as p}from"@material-ui/icons";import s from"../../IconButton/index.js";import{jsxs as d,Fragment as h,jsx as u}from"react/jsx-runtime";var m=["children","iconSettingsProps","defaultScrollable","maxHeight"];function b(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function g(r){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?b(Object(o),!0).forEach((function(t){e(r,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):b(Object(o)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}))}return r}var f=l((function(e){return{popoverPaper:{minWidth:286,width:286,overflowY:"hidden",backgroundColor:e.palette.background.b9,maxHeight:function(e){var r=e.maxHeight;return r?r-24:"calc(100% - 24px)"},"&.scrollable":{height:function(e){return e.maxHeight||"100%"}}},popoverHeader:{display:"flex",justifyContent:"space-between",alignItems:"center",height:76,padding:"24px 16px 16px 16px",position:"absolute",left:0,right:0,zIndex:1,"&.scrollable":{background:"linear-gradient(to bottom, ".concat(e.palette.background.b9,", ").concat(e.palette.background.b9," 79%, rgba(65, 65, 65, 0) 100%)")}},headerTitle:{fontSize:20},popoverContentContainer:{marginTop:60,paddingTop:16,overflowX:"hidden",overflowY:"auto","&.scrollable":{height:"calc(100% - 60px)"}},popoverContent:{width:"100%"},shadow:{position:"absolute",bottom:0,width:"100%",height:16,background:"linear-gradient(180deg, rgba(65, 65, 65, 0) 0%, ".concat(e.palette.background.b9," 100%)")}}}));function v(e){var n,l=e.children,b=e.iconSettingsProps,v=e.defaultScrollable,x=e.maxHeight,O=t(e,m),P=f({maxHeight:x}),y=o(null),j=r(y,2),w=j[0],S=j[1],C=o(!0),H=r(C,2),k=H[0],T=H[1],z=function(){S(null)},N=Boolean(w);return d(h,{children:[u(s,g(g({onClick:function(e){return S(e.currentTarget)}},b),{},{children:u(c,{})})),d(a,g(g({open:N,anchorEl:w,onClose:z,anchorOrigin:{vertical:k?"top":"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},marginThreshold:12},O),{},{classes:g(g({},null==O?void 0:O.classes),{},{paper:i(P.popoverPaper,k&&"scrollable",null==O||null===(n=O.classes)||void 0===n?void 0:n.paper)}),children:[d("div",{className:i(P.popoverHeader,k&&"scrollable"),children:[u("div",{className:P.headerTitle,children:"Settings"}),u(s,{tooltipProps:{title:"Close"},onClick:z,children:u(p,{})})]}),u("div",{className:i(P.popoverContentContainer,k&&"scrollable"),ref:function(e){e&&e.scrollHeight<=e.clientHeight&&!v&&T(!1)},children:u("div",{className:P.popoverContent,children:l})}),u("div",{className:P.shadow})]}))]})}v.propTypes={children:n.node.isRequired,iconSettingsProps:n.shape({iconSize:n.string}),defaultScrollable:n.bool,maxHeight:n.number},v.defaultProps={iconSettingsProps:{iconSize:"small"},defaultScrollable:!1,maxHeight:null};export{v as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import t from"prop-types";import r from"react-image-lightbox";import o from"@material-ui/icons/SaveAlt";import i from"@material-ui/icons/ArrowBack";import"../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import{jsx as n,jsxs as s}from"react/jsx-runtime";import"../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../ErrorBoundary/ErrorBoundary.js";import"../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../LoadingIndicator/LoadingIndicator.js";import"../../constants/segment.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../Modal/CorvaModal.js";import"@babel/runtime/helpers/objectWithoutProperties";import"@babel/runtime/helpers/slicedToArray";import"react";import"../IconMenu/index.js";import"../StyledMenuItem/index.js";import"../DevCenter/AppHeader/AppHeader.js";import"../DevCenter/AppSideBar/AppSideBar.js";import"../DevCenter/AppsDataProvider/AppsDataProvider.js";import"classnames";import"lodash";import"@material-ui/core";import"../Icons/AnnotationIcon.js";import"../Annotations/components/AnnotationsList/index.js";import"../Annotations/components/LastAnnotation/index.js";import"../Annotations/AnnotationsContext.js";import"../../utils/mobileDetect.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"../../clients/jsonApi/index.js";import"../../clients/subscriptions.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"../../utils/index.js";import"../HelpCenter/HelpCenterIcon.js";import"../DevCenter/AppContext.js";import"../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"react-router";import"../DevCenter/NavigationBar/NavigationBar.js";import"../DevCenter/SideBar/SideBar.js";import"../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../AssetEditor/index.js";import"../AppVersionsSelect/AppVersionsSelect.js";import"../Typography.js";import"../CollapsableSidebar.js";import"../DateTimePicker/index.js";import"../DatePicker/index.js";import"../SlateFormattedText/SlateFormattedText.js";import"../SlateFormattedText/RenderElements.js";import"@babel/runtime/helpers/typeof";import"slate";import"../ParameterCharts/ParameterCharts.js";import"../ParameterCharts/AddEditTrack.js";import"../ChartActionsList/ChartActionsList.js";import"../CopyToClipboard/CopyToClipboard.js";import"../AssetEditor/AssetEditorAutocomplete.js";import"../AssetEditor/SingleAssetEditor.js";import"../SettingEditors/ColorEditor/index.js";import"../SettingEditors/DropdownEditor/index.js";import"../SettingEditors/RadioEditor/index.js";import"../SwitchControl/index.js";import"../ColorPicker/ColorPicker.js";import"../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../TruncatedText/index.js";import"../RangeSlider/RangeSlider.js";import"../Breadcrumbs/index.js";import"../VirtualizedTable/index.js";import"../EmptyView/EmptyView.js";import"../EmptyView/EmptyAppView/EmptyAppView.js";import"../Button/index.js";import"../ContextMenuItem/index.js";import"../FolderMenuItem/index.js";import"../EditableItem/EditableItem/index.js";import"../EditableItem/EditableItemWithBadge/index.js";import"../Checkbox/index.js";import"../FolderMenuItemWithLinks/index.js";import"../IconButton/index.js";import"../TextField/index.js";import"../Chip/index.js";import"../Counter/index.js";import"../AnchorsList/AnchorsList.js";import"../Select/index.js";import"../CustomSelect/index.js";import"../Tabs/Tabs.js";import"../Tabs/Tab.js";import"../ResizableTable/ResizableTable.js";import"../Drillstring/BHASchematic.js";import"../Drillstring/BHATable/index.js";import"../Drillstring/BHAComponentIcon.js";import"../Drillstring/BHAComponentDetail/index.js";import"../Drillstring/BHATileIcon.js";import"../Drillstring/BHATile/BHATile.js";import"../Drillstring/BHAList/BHAList.js";import"../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../Casing/CasingTable/index.js";import"../Casing/CasingComponentIcon.js";import"../Casing/CasingTileIcon.js";import"../Casing/CasingTableV2/CasingTableV2.js";import"../Casing/CasingTile/CasingTile.js";import"../DisabledSettingsMessage/DisabledSettingsMessage.js";import"../WellSummary/WellSummaryItemLabel.js";import"../WellSummary/WellSummaryItemTitle.js";import"../WellSummary/WellSummaryItemValue.js";import"../WellSummary/ActivitySummaryChart.js";import"../WellSummary/FracWirelineTimeChart.js";import"../BICOffsetPickerDialog/index.js";import"../OffsetWellButton/OffsetWellButton.js";import"../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../OffsetWellPickerV3/index.js";import"../OffsetWellChips/Chip.js";import"../OffsetWellChips/ChipsContainer.js";import"../OffsetWellPickerV4/OffsetWellPickerV4.js";import"../Notifications/Notifications.js";import"@babel/runtime/helpers/toConsumableArray";import"uuid";import"../ConfirmationDialog.js";import"../TextLink/index.js";import"../Avatar/index.js";import"../Template/TemplatePopover/index.js";import"../MenuItem/index.js";import"../PadModeSelect/PadModeSelect.js";import"../PinnableFilters/PinnableFilters.js";import"../HeaderLayout/HeaderLayout.js";import"../PadOffsetsPicker/PadOffsetsPicker.js";import"../PadOffsetsPicker/OffsetAssetChip.js";import"../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../PadOffsetsPicker/StagesSelector.js";import"../Table/TableToolbar/TableToolbar.js";import{useIsInsideDcApp as p}from"../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../Tooltip/MuiTooltipDcWrapper.js";import"../PriceInput/PriceInput.js";import"../LabelsCounter/LabelsCounter.js";import"../Stepper/Step.js";import"../Stepper/StepsWrapper.js";import"../Stepper/Stepper.js";import"../Comment/CommentIcon/index.js";import"../FilesLoader/FilesLoader.js";import"../FilesLoader/Icons/FileIcon.js";import"../SearchInput/index.js";import"../FeedItem/FeedItem.js";import"../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../PostInput/PostInput.js";import"../KeyboardDateTimePicker.js";import"../AddComment/Popover.js";import"../AddComment/Popup.js";import"../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../StageDesignVActual/ComparisonHeader.js";import"../StageDesignVActual/ComparisonRow.js";import"../EmbeddedApp/DevCenterEmbeddedApp.js";import"../EmbeddedApp/EmbeddedApp.js";import"../Autocomplete/Autocomplete.js";import"../DocumentViewer/DocumentViewer.js";import"../ColorPickerPalette/ColorPickerPalette.js";import"../Search/Search.js";import"../Search/components/Listbox.js";import"../Search/components/Paper.js";import"../Search/components/RecentSearches.js";import"../Search/components/InputAdornmentLeft.js";import"../Search/components/Groups.js";import"../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import m from"./styles.css.js";function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function l(t){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?a(Object(o),!0).forEach((function(r){e(t,r,o[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):a(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var c=function(e){return n("div",{className:m.cImageViewerToolbar,children:n("button",{type:"button","aria-label":"Close",className:m.cImageViewerToolbarButton,onClick:e.onCloseRequest,children:n(i,{className:m.cImageViewerToolbarIcon,htmlColor:"#fff"})})})},d=function(e){var t=p();return n("div",{className:m.cImageViewer,children:n(r,{mainSrc:e.mainSrc,imagePadding:e.imagePadding,toolbarButtons:[n("button",{type:"button","aria-label":"Download",className:m.cImageViewerToolbarButton,children:n("a",{href:e.mainSrc,download:"image",target:"_blank",rel:"noopener noreferrer",children:n(o,{className:m.cImageViewerToolbarIcon,htmlColor:"#fff"})})})],onAfterOpen:e.onAfterOpen,onCloseRequest:e.onCloseRequest,reactModalStyle:{overlay:{zIndex:1500}},reactModalProps:{parentSelector:function(){return t?parent.document.body:document.body},overlayElement:function(e,t){return s("div",l(l({},e),{},{children:[n(c,{onCloseRequest:e.onCloseRequest}),t]}))}},wrapperClassName:m.cImageViewerWrapper})})};d.propTypes={mainSrc:t.string.isRequired,imagePadding:t.number,onAfterOpen:t.func,onCloseRequest:t.func},c.propTypes={onCloseRequest:t.func.isRequired},d.defaultProps={imagePadding:50,onAfterOpen:void 0,onCloseRequest:void 0};export{d as default};
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import t from"prop-types";import r from"react-image-lightbox";import o from"@material-ui/icons/SaveAlt";import i from"@material-ui/icons/ArrowBack";import"../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import{jsx as n,jsxs as s}from"react/jsx-runtime";import"../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../ErrorBoundary/ErrorBoundary.js";import"../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../LoadingIndicator/LoadingIndicator.js";import"../../constants/segment.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../Modal/CorvaModal.js";import"@babel/runtime/helpers/objectWithoutProperties";import"@babel/runtime/helpers/slicedToArray";import"react";import"../IconMenu/index.js";import"../StyledMenuItem/index.js";import"../DevCenter/AppHeader/AppHeader.js";import"../DevCenter/AppSideBar/AppSideBar.js";import"../DevCenter/AppsDataProvider/AppsDataProvider.js";import"classnames";import"lodash";import"@material-ui/core";import"../Icons/AnnotationIcon.js";import"../Annotations/components/AnnotationsList/index.js";import"../Annotations/components/LastAnnotation/index.js";import"../Annotations/AnnotationsContext.js";import"../../utils/mobileDetect.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"../../clients/jsonApi/index.js";import"../../clients/subscriptions.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"../../utils/index.js";import"../HelpCenter/HelpCenterIcon.js";import"../DevCenter/AppContext.js";import"../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"react-router";import"../DevCenter/NavigationBar/NavigationBar.js";import"../DevCenter/SideBar/SideBar.js";import"../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../AssetEditor/index.js";import"../AppVersionsSelect/AppVersionsSelect.js";import"../Typography.js";import"../CollapsableSidebar.js";import"../DateTimePicker/index.js";import"../DatePicker/index.js";import"../SlateFormattedText/SlateFormattedText.js";import"../SlateFormattedText/RenderElements.js";import"@babel/runtime/helpers/typeof";import"slate";import"../ParameterCharts/ParameterCharts.js";import"../ParameterCharts/AddEditTrack.js";import"../ChartActionsList/ChartActionsList.js";import"../CopyToClipboard/CopyToClipboard.js";import"../AssetEditor/AssetEditorAutocomplete.js";import"../AssetEditor/SingleAssetEditor.js";import"../SettingEditors/ColorEditor/index.js";import"../SettingEditors/DropdownEditor/index.js";import"../SettingEditors/RadioEditor/index.js";import"../SwitchControl/index.js";import"../ColorPicker/ColorPicker.js";import"../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../TruncatedText/index.js";import"../RangeSlider/RangeSlider.js";import"../Breadcrumbs/index.js";import"../VirtualizedTable/index.js";import"../EmptyView/EmptyView.js";import"../EmptyView/EmptyAppView/EmptyAppView.js";import"../Button/index.js";import"../ContextMenuItem/index.js";import"../FolderMenuItem/index.js";import"../EditableItem/EditableItem/index.js";import"../EditableItem/EditableItemWithBadge/index.js";import"../Checkbox/index.js";import"../FolderMenuItemWithLinks/index.js";import"../IconButton/index.js";import"../TextField/index.js";import"../Chip/index.js";import"../Counter/index.js";import"../AnchorsList/AnchorsList.js";import"../Select/index.js";import"../CustomSelect/index.js";import"../Tabs/Tabs.js";import"../Tabs/Tab.js";import"../ResizableTable/ResizableTable.js";import"../Drillstring/BHASchematic.js";import"../Drillstring/BHATable/index.js";import"../Drillstring/BHAComponentIcon.js";import"../Drillstring/BHAComponentDetail/index.js";import"../Drillstring/BHATileIcon.js";import"../Drillstring/BHATile/BHATile.js";import"../Drillstring/BHAList/BHAList.js";import"../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../Casing/CasingTable/index.js";import"../Casing/CasingComponentIcon.js";import"../Casing/CasingTileIcon.js";import"../Casing/CasingTableV2/CasingTableV2.js";import"../Casing/CasingTile/CasingTile.js";import"../DisabledSettingsMessage/DisabledSettingsMessage.js";import"../WellSummary/WellSummaryItemLabel.js";import"../WellSummary/WellSummaryItemTitle.js";import"../WellSummary/WellSummaryItemValue.js";import"../WellSummary/ActivitySummaryChart.js";import"../WellSummary/FracWirelineTimeChart.js";import"../BICOffsetPickerDialog/index.js";import"../OffsetWellButton/OffsetWellButton.js";import"../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../OffsetWellPickerV3/index.js";import"../OffsetWellChips/Chip.js";import"../OffsetWellChips/ChipsContainer.js";import"../OffsetWellPickerV4/OffsetWellPickerV4.js";import"../Notifications/Notifications.js";import"@babel/runtime/helpers/toConsumableArray";import"uuid";import"../ConfirmationDialog.js";import"../TextLink/index.js";import"../Avatar/index.js";import"../Template/TemplatePopover/index.js";import"../MenuItem/index.js";import"../PadModeSelect/PadModeSelect.js";import"../PinnableFilters/PinnableFilters.js";import"../HeaderLayout/HeaderLayout.js";import"../PadOffsetsPicker/PadOffsetsPicker.js";import"../PadOffsetsPicker/OffsetAssetChip.js";import"../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../PadOffsetsPicker/StagesSelector.js";import"../Table/TableToolbar/TableToolbar.js";import{useIsInsideDcApp as p}from"../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../Tooltip/MuiTooltipDcWrapper.js";import"../PriceInput/PriceInput.js";import"../LabelsCounter/LabelsCounter.js";import"../Stepper/Step.js";import"../Stepper/StepsWrapper.js";import"../Stepper/Stepper.js";import"../Comment/CommentIcon/index.js";import"../FilesLoader/FilesLoader.js";import"../FilesLoader/Icons/FileIcon.js";import"../SearchInput/index.js";import"../FeedItem/FeedItem.js";import"../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../PostInput/PostInput.js";import"../KeyboardDateTimePicker.js";import"../AddComment/Popover.js";import"../AddComment/Popup.js";import"../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../StageDesignVActual/ComparisonHeader.js";import"../StageDesignVActual/ComparisonRow.js";import"../EmbeddedApp/DevCenterEmbeddedApp.js";import"../EmbeddedApp/EmbeddedApp.js";import"../Autocomplete/Autocomplete.js";import"../DocumentViewer/DocumentViewer.js";import"../ColorPickerPalette/ColorPickerPalette.js";import"../Search/Search.js";import"../Search/components/Listbox.js";import"../Search/components/Paper.js";import"../Search/components/RecentSearches.js";import"../Search/components/InputAdornmentLeft.js";import"../Search/components/Groups.js";import"../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import m from"./styles.css.js";function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function l(t){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?a(Object(o),!0).forEach((function(r){e(t,r,o[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):a(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var c=function(e){return n("div",{className:m.cImageViewerToolbar,children:n("button",{type:"button","aria-label":"Close",className:m.cImageViewerToolbarButton,onClick:e.onCloseRequest,children:n(i,{className:m.cImageViewerToolbarIcon,htmlColor:"#fff"})})})},d=function(e){var t=p();return n("div",{className:m.cImageViewer,children:n(r,{mainSrc:e.mainSrc,imagePadding:e.imagePadding,toolbarButtons:[n("button",{"data-testid":"".concat("ImageViewer","_download"),type:"button","aria-label":"Download",className:m.cImageViewerToolbarButton,children:n("a",{href:e.mainSrc,download:"image",target:"_blank",rel:"noopener noreferrer",children:n(o,{className:m.cImageViewerToolbarIcon,htmlColor:"#fff"})})})],onAfterOpen:e.onAfterOpen,onCloseRequest:e.onCloseRequest,reactModalStyle:{overlay:{zIndex:1500}},reactModalProps:{parentSelector:function(){return t?parent.document.body:document.body},overlayElement:function(e,t){return s("div",l(l({},e),{},{children:[n(c,{onCloseRequest:e.onCloseRequest}),t]}))}},wrapperClassName:m.cImageViewerWrapper})})};d.propTypes={mainSrc:t.string.isRequired,imagePadding:t.number,onAfterOpen:t.func,onCloseRequest:t.func},c.propTypes={onCloseRequest:t.func.isRequired},d.defaultProps={imagePadding:50,onAfterOpen:void 0,onCloseRequest:void 0};export{d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/slicedToArray";import{useMemo as i,useState as n,useRef as o,useEffect as s,useCallback as l}from"react";import a from"prop-types";import{uniqBy as p,isEmpty as m,sortBy as c,isEqual as d}from"lodash";import{Typography as u}from"@material-ui/core";import{Replay as f,Sort as j,FilterList as C,Close as v}from"@material-ui/icons";import b from"../Modal/Modal.js";import"../IconMenu/index.js";import"../StyledMenuItem/index.js";import"../DevCenter/AppHeader/AppHeader.js";import"../DevCenter/AppSideBar/AppSideBar.js";import"../DevCenter/AppsDataProvider/AppsDataProvider.js";import"classnames";import"../Icons/AnnotationIcon.js";import"../Annotations/components/AnnotationsList/index.js";import"../Annotations/components/LastAnnotation/index.js";import"../Annotations/AnnotationsContext.js";import"../../utils/mobileDetect.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"../../clients/jsonApi/index.js";import"../../clients/subscriptions.js";import"../../constants/goals.js";import"../../constants/segment.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"../../utils/index.js";import"../HelpCenter/HelpCenterIcon.js";import"../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import{jsx as g,jsxs as h}from"react/jsx-runtime";import"../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../ErrorBoundary/ErrorBoundary.js";import"../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import A from"../LoadingIndicator/LoadingIndicator.js";import"../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../DevCenter/AppContext.js";import"../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"@babel/runtime/helpers/objectWithoutProperties";import"react-router";import"../DevCenter/NavigationBar/NavigationBar.js";import"../DevCenter/SideBar/SideBar.js";import"../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../AssetEditor/index.js";import"../AppVersionsSelect/AppVersionsSelect.js";import{Regular12 as D}from"../Typography.js";import"../CollapsableSidebar.js";import"../DateTimePicker/index.js";import"../DatePicker/index.js";import"../SlateFormattedText/SlateFormattedText.js";import"../SlateFormattedText/RenderElements.js";import"@babel/runtime/helpers/typeof";import"slate";import"../ParameterCharts/ParameterCharts.js";import"../ParameterCharts/AddEditTrack.js";import"../ChartActionsList/ChartActionsList.js";import"../CopyToClipboard/CopyToClipboard.js";import"../AssetEditor/AssetEditorAutocomplete.js";import"../AssetEditor/SingleAssetEditor.js";import"../SettingEditors/ColorEditor/index.js";import"../SettingEditors/DropdownEditor/index.js";import"../SettingEditors/RadioEditor/index.js";import S from"../SwitchControl/index.js";import"../ColorPicker/ColorPicker.js";import"../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../TruncatedText/index.js";import"../RangeSlider/RangeSlider.js";import"../Breadcrumbs/index.js";import"../VirtualizedTable/index.js";import"../EmptyView/EmptyView.js";import"../EmptyView/EmptyAppView/EmptyAppView.js";import y from"../Button/index.js";import"../ContextMenuItem/index.js";import"../FolderMenuItem/index.js";import"../EditableItem/EditableItem/index.js";import"../EditableItem/EditableItemWithBadge/index.js";import"../Checkbox/index.js";import"../FolderMenuItemWithLinks/index.js";import"../IconButton/index.js";import"../TextField/index.js";import"../Chip/index.js";import"../Counter/index.js";import"../AnchorsList/AnchorsList.js";import"../Select/index.js";import"../CustomSelect/index.js";import"../Tabs/Tabs.js";import"../Tabs/Tab.js";import"../ResizableTable/ResizableTable.js";import"../Drillstring/BHASchematic.js";import"../Drillstring/BHATable/index.js";import"../Drillstring/BHAComponentIcon.js";import"../Drillstring/BHAComponentDetail/index.js";import"../Drillstring/BHATileIcon.js";import"../Drillstring/BHATile/BHATile.js";import"../Drillstring/BHAList/BHAList.js";import"../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../Casing/CasingTable/index.js";import"../Casing/CasingComponentIcon.js";import"../Casing/CasingTileIcon.js";import"../Casing/CasingTableV2/CasingTableV2.js";import"../Casing/CasingTile/CasingTile.js";import"../DisabledSettingsMessage/DisabledSettingsMessage.js";import"../WellSummary/WellSummaryItemLabel.js";import"../WellSummary/WellSummaryItemTitle.js";import"../WellSummary/WellSummaryItemValue.js";import"../WellSummary/ActivitySummaryChart.js";import"../WellSummary/FracWirelineTimeChart.js";import"../BICOffsetPickerDialog/index.js";import"../OffsetWellButton/OffsetWellButton.js";import"../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../OffsetWellPickerV3/index.js";import"../OffsetWellChips/Chip.js";import"../OffsetWellChips/ChipsContainer.js";import"../Notifications/Notifications.js";import"uuid";import"../ConfirmationDialog.js";import"../TextLink/index.js";import"../Avatar/index.js";import"../Template/TemplatePopover/index.js";import"../MenuItem/index.js";import"../PadModeSelect/PadModeSelect.js";import"../PinnableFilters/PinnableFilters.js";import"../HeaderLayout/HeaderLayout.js";import"../PadOffsetsPicker/PadOffsetsPicker.js";import"../PadOffsetsPicker/OffsetAssetChip.js";import"../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../PadOffsetsPicker/StagesSelector.js";import"../Table/TableToolbar/TableToolbar.js";import{Tooltip as I}from"../Tooltip/Tooltip.js";import"../PriceInput/PriceInput.js";import"../LabelsCounter/LabelsCounter.js";import"../Stepper/Step.js";import"../Stepper/StepsWrapper.js";import"../Stepper/Stepper.js";import"../Comment/CommentIcon/index.js";import"../FilesLoader/FilesLoader.js";import"../FilesLoader/Icons/FileIcon.js";import"../SearchInput/index.js";import"../FeedItem/FeedItem.js";import"../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../PostInput/PostInput.js";import"../KeyboardDateTimePicker.js";import"../AddComment/Popover.js";import"../AddComment/Popup.js";import"../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../StageDesignVActual/ComparisonHeader.js";import"../StageDesignVActual/ComparisonRow.js";import"../EmbeddedApp/DevCenterEmbeddedApp.js";import"../EmbeddedApp/EmbeddedApp.js";import"../Autocomplete/Autocomplete.js";import"../DocumentViewer/DocumentViewer.js";import"../ColorPickerPalette/ColorPickerPalette.js";import"../Search/Search.js";import"../Search/components/Listbox.js";import"../Search/components/Paper.js";import"../Search/components/RecentSearches.js";import"../Search/components/InputAdornmentLeft.js";import"../Search/components/Groups.js";import{useFetchWells as P}from"./effects/useFetchWells.js";import{useAdvancedWells as W}from"./effects/useAdvancedWells.js";import{useBicWells as x}from"./effects/useBicWells.js";import{useCompanyMetricKey as T}from"./effects/useCompanyMetricKey.js";import{useFilterOptions as O}from"./effects/useFilterOptions.js";import{useFilteredWells as E}from"./effects/useFilteredWells.js";import{useSortedWells as w}from"./effects/useSortedWells.js";import{useRadiusWells as B}from"./effects/useRadiusWells.js";import"./effects/useAssetsData.js";import{useTableColumns as L}from"./effects/useTableColumns.js";import{Filter as k}from"./components/Filter/Filter.js";import{WellsMap as H}from"./components/Map/WellsMap.js";import V from"./components/OffsetWellsTable/OffsetWellsTable.js";import F from"./OffsetWellPickerV4.module.css.js";import{ALL_SECTION_KEY as N,ColumnType as M,FilterType as R,ROWS_PER_PAGE as U}from"./constants.js";import{SEARCH_CATEGORIES as z}from"./components/OffsetWellsTable/AdvancedSearch/constants.js";function K(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function q(e){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?K(Object(i),!0).forEach((function(r){t(e,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):K(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var G=function(a){var K=a.open,G=a.isWDUser,_=a.defaultSubjectWell,J=a.currentUser,Q=a.offsetSettings,X=a.addWellsUsabilityInfo,Y=a.isViewOnly,Z=a.onClose,$=a.onSave,ee=a.maxOffsetSize,te=i((function(){return ee+1}),[ee]),re=n(null==Q?void 0:Q.filterExpanded),ie=r(re,2),ne=ie[0],oe=ie[1],se=n(null==Q?void 0:Q.mapHidden),le=r(se,2),ae=le[0],pe=le[1],me=+(null==_?void 0:_.companyId)||+(null==J?void 0:J.company_id),ce=null==_?void 0:_.asset_id,de=n((null==Q?void 0:Q.filters)||{}),ue=r(de,2),fe=ue[0],je=ue[1],Ce=n((null==Q?void 0:Q.wellSection)||N),ve=r(Ce,2),be=ve[0],ge=ve[1],he=o(!0),Ae=n([]),De=r(Ae,2),Se=De[0],ye=De[1],Ie=n(null),Pe=r(Ie,2),We=Pe[0],xe=Pe[1],Te=n(!0),Oe=r(Te,2),Ee=Oe[0],we=Oe[1],Be=n(!1),Le=r(Be,2),ke=Le[0],He=Le[1],Ve=n(!1),Fe=r(Ve,2),Ne=Fe[0],Me=Fe[1],Re=n(!1),Ue=r(Re,2),ze=Ue[0],Ke=Ue[1],qe=o(),Ge=n(!0),_e=r(Ge,2),Je=_e[0],Qe=_e[1],Xe=i((function(){return!ae&&ne?448:ae?ne?232:0:216}),[ae,ne]);s((function(){he.current=!0}),[ce,null==Q?void 0:Q.selectedWellIds]),s((function(){oe(!Y&&(null==Q?void 0:Q.filterExpanded)),pe(!Y&&(null==Q?void 0:Q.mapHidden)),je((null==Q?void 0:Q.filters)||{}),ge((null==Q?void 0:Q.wellSection)||N)}),[Q,Y]);var Ye=P(me,X),Ze=x(G,ce),$e=r(Ze,2),et=$e[0],tt=$e[1],rt=T(me,null==Q?void 0:Q.metricsKeys),it=r(rt,2),nt=it[0],ot=it[1],st=W(me,Ye,et,tt,ce,nt),lt=O(st);s((function(){if(st&&et){var e=st.find((function(e){return e.id===ce}));if(e){var r=et.filter((function(e){return e.value!==N})).map((function(e){return e.label})),i=q(q({},e),r.length>0&&t({},M.wellSection,r));xe(i)}else xe(null)}}),[et,st]);var at=L(nt),pt=E(st,fe);s((function(){if(pt)if(he.current){var e=p(st.filter((function(e){return((null==Q?void 0:Q.selectedWellIds)||[]).includes(e.id)})).concat(We),"id");ye(e),he.current=!1}else ye((function(e){var t=(pt||[]).filter((function(t){return!!e.find((function(e){var r=e.id;return t.id===r}))})).concat(We);return p(t,"id")}))}),[st,pt,null==Q?void 0:Q.selectedWellIds]);var mt=w(We,pt,Se,we,he.current),ct=r(mt,5),dt=ct[0],ut=ct[1],ft=ct[2],jt=ct[3],Ct=ct[4];B(fe[R.radius],pt,ye,te);var vt=l((function(e,t,r){var i;i=r===z.well.name?t:t.reduce((function(e,t){var r,i=null===(r=st.find((function(e){return e.id===t})))||void 0===r?void 0:r.rigName,n=st.filter((function(e){return e.rigName===i})).map((function(e){return e.id}));return e.concat(n)}),[]);var n=st.filter((function(e){var t=e.id;return i.includes(t)}));ye(e?function(e){return p(e.concat(n),"id")}:function(e){return p(e.filter((function(e){var t=e.id;return!n.find((function(e){return e.id===t}))})))})}),[st]),bt=l((function(){Me(!0)}),[]),gt=l((function(e){ot(e)}),[]),ht=l((function(t,r){ye(r?function(r){return[].concat(e(r),[t])}:function(e){return e.filter((function(e){return e.id!==t.id}))})}),[]),At=l((function(e){if(e){var t=We?pt.concat(We):pt,r=p(t,"id");ye(r)}else ye(We?[We]:[])}),[pt,We]),Dt=function(e){if(m(tt))ye(We?[We]:[]);else{var t=st.filter((function(t){return tt[e].includes(t.id)}));ye(t)}},St=l((function(e){ge(e),Dt(e)}),[Dt]),yt=i((function(){return Se.find((function(e){return e.id===ce}))?Se.length-1:Se.length}),[Se,ce]),It=i((function(){if(!tt)return!1;var e=Se.map((function(e){return e.id})),t=tt[be]||[];return(te&&t.length>te?te:t.length)===e.length&&e.every((function(e){return t.includes(e)}))}),[tt,_,Se,be]),Pt=function(){var e=(st||[]).filter((function(e){return((null==Q?void 0:Q.selectedWellIds)||[]).includes(e.id)})).concat(We);ye(p(e,"id")),d(fe,Q.filters)||(he.current=!0);var t=q(q({},Q),{},{mapHidden:ae,filterExpanded:ne});$(t),je((null==Q?void 0:Q.filters)||{}),ge((null==Q?void 0:Q.wellSection)||N),Z()},Wt=i((function(){return!It||(!(m(fe)||!fe[R.sideTracks])||be!==N)}),[It,fe,be]);s((function(){if(!te||te>Se.length)Ke(!1);else if(te<Se.length){var e=c(Se,"distance");ye(e.slice(0,te))}else te===Se.length&&Ke(!0)}),[Se,te]);var xt=!st||!et||!Ct,Tt=n(!1),Ot=r(Tt,2),Et=Ot[0],wt=Ot[1],Bt=n(!1),Lt=r(Bt,2),kt=Lt[0],Ht=Lt[1],Vt=n(U),Ft=r(Vt,2),Nt=Ft[0],Mt=Ft[1],Rt=n([]),Ut=r(Rt,2),zt=Ut[0],Kt=Ut[1];s((function(){if(Ct){var e=Ct.slice(0,Nt);Kt(e)}}),[Ct,Nt,We]);return g(b,{open:K,onClose:Pt,title:"Select Offset Wells",contentContainerClassName:F.offsetWellDialog,contentClassName:F.contentContainer,actionsClassName:F.modalActions,actions:!Y&&h("div",{className:F.actionsWrapper,children:[!xt&&Wt?g(I,{placement:"bottom-start",title:G?"To Synced Offsets in Offset App":"To Synced Offsets in Wellhub",children:g("div",{children:g(y,{onClick:function(){je({}),ge(N),Dt(N)},color:"primary",startIcon:g(f,{}),children:"Reset"})})}):g("div",{}),h("div",{className:F.buttonGap,children:[g(y,{onClick:Pt,color:"primary",children:"Cancel"}),h(y,{variant:"contained",color:"primary",onClick:function(){Z();var e=q(q({},Q),{},{companyId:me,subjectWellId:ce,selectedWellIds:Se.map((function(e){return e.id})),filters:fe,metricsKeys:nt,wellSection:be,isSynced:It,mapHidden:ae,filterExpanded:ne});$(e,Se)},children:["Select (",yt,")"]})]})]}),children:xt?g(A,{fullscreen:!1}):h("div",{className:F.contentWrapper,ref:qe,children:[h("div",{className:F.countContainer,children:[g(D,{className:F.totalLabel,children:"Total:"}),g(D,{className:F.countValue,children:st.length}),g(D,{className:F.selectedLabel,children:"Selected:"}),g(D,{className:F.countValue,children:yt})]}),te&&te<=Se.length&&g(u,{className:F.viewOnlyTitleLabel,children:"This application can work with no more than (".concat(ee,") offset wells at a time.")}),Y&&g(u,{className:F.viewOnlyTitleLabel,children:"This is the view only mode. To edit offset wells, use the Offset Well Selection app."}),h("div",{className:F.controlGroup,children:[h(y,{startIcon:g(ne?j:C,{}),classes:{root:F.filterButton},onClick:function(){return oe((function(e){return!e}))},disabled:Y,children:["Filters",!m(fe)&&h("div",{className:F.clearWrapper,onClick:function(e){e.stopPropagation(),je({})},children:[g(v,{className:F.clearIcon}),g("span",{className:F.clearLabel,children:"Clear"})]})]}),g(S,{rightLabel:"Map",color:"primary",checked:!ae,onChange:function(e){return pe(!e.target.checked)}})]}),h("div",{className:F.content,onScroll:function(e){e.target&&(Ne&&(e.target.scrollLeft=0,Me(!1)),e.target.scrollLeft<=5&&Et&&wt(!1),e.target.scrollLeft>5&&!Et&&wt(!0),e.target.scrollTop<12&&kt&&Ht(!1),e.target.scrollTop>=12&&!kt&&Ht(!0),e.target.scrollHeight!==e.target.offsetHeight&&Math.round(e.target.scrollTop+e.target.offsetHeight)>=e.target.scrollHeight&&Nt<Ct.length&&Mt((function(e){return e+U})))},children:[kt&&g("div",{className:F.topGradient}),!ae&&K&&g(H,{isViewOnly:Y,mapHidden:ae,companyId:me,subjectWell:We,offsetWellIds:Se.map((function(e){return e.id})),wells:st,radius:fe[R.radius],handleChanageOffsetWell:ht}),g(k,{isHidden:!ne,isWDUser:G,filterOptions:lt,filters:fe,wellSections:et,selectedWellSection:be,subjectWell:We,onChangeFilters:je,onChangeBicWells:St}),g(V,{open:K,isTableLoading:Ee,companyId:me,subjectWellId:ce,sortBy:dt,setSortBy:ut,sortDirection:ft,setSortDirection:jt,columnsWithDict:at,wells:zt,metricsKeys:nt,setMetricsKeys:gt,handleChanageOffsetWell:ht,handleChangeAllOffsetWells:At,handleAddRemoveAssets:vt,isWellNameExpand:ke,setIsWellNameExpand:He,isHscrollMoved:Et,onHideAdvancedSearch:bt,isViewOnly:Y,isLastWell:Ct.length<=Nt,contentRef:qe,isHintPopperOpen:Je,setIsHintPopperOpen:Qe,isLimitedOffsetwells:ze,tableTop:Xe})]})]})})};G.propTypes={isWDUser:a.bool,defaultSubjectWell:a.shape({asset_id:a.number,companyId:a.number}),offsetSettings:a.shape({selectedWellIds:a.arrayOf(a.number),manualWellIds:a.arrayOf(a.number),filters:a.shape({}),metricsKeys:a.arrayOf(a.string),wellSection:a.string,companyId:a.number,subjectWellId:a.number,mapHidden:a.bool,filterExpanded:a.bool}),currentUser:a.shape({company_id:a.number}).isRequired,open:a.bool.isRequired,addWellsUsabilityInfo:a.func,isViewOnly:a.bool,onSave:a.func.isRequired,onClose:a.func.isRequired,maxOffsetSize:a.number},G.defaultProps={isWDUser:!1,defaultSubjectWell:null,offsetSettings:{},addWellsUsabilityInfo:void 0,isViewOnly:!1,maxOffsetSize:50};export{G as default};
|
|
1
|
+
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/slicedToArray";import{useState as i,useMemo as o,useRef as n,useEffect as s,useCallback as l}from"react";import a from"prop-types";import{uniqBy as p,isEmpty as m,sortBy as c,isEqual as d}from"lodash";import{Typography as u}from"@material-ui/core";import{Replay as f,Sort as j,FilterList as C,Close as v}from"@material-ui/icons";import b from"../Modal/Modal.js";import"../IconMenu/index.js";import"../StyledMenuItem/index.js";import"../DevCenter/AppHeader/AppHeader.js";import"../DevCenter/AppSideBar/AppSideBar.js";import"../DevCenter/AppsDataProvider/AppsDataProvider.js";import"classnames";import"../Icons/AnnotationIcon.js";import"../Annotations/components/AnnotationsList/index.js";import"../Annotations/components/LastAnnotation/index.js";import"../Annotations/AnnotationsContext.js";import"../../utils/mobileDetect.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"../../clients/jsonApi/index.js";import"../../clients/subscriptions.js";import"../../constants/goals.js";import"../../constants/segment.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"../../utils/index.js";import"../HelpCenter/HelpCenterIcon.js";import"../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import{jsx as g,jsxs as h}from"react/jsx-runtime";import"../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../ErrorBoundary/ErrorBoundary.js";import"../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import A from"../LoadingIndicator/LoadingIndicator.js";import"../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../DevCenter/AppContext.js";import"../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"@babel/runtime/helpers/objectWithoutProperties";import"react-router";import"../DevCenter/NavigationBar/NavigationBar.js";import"../DevCenter/SideBar/SideBar.js";import"../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../AssetEditor/index.js";import"../AppVersionsSelect/AppVersionsSelect.js";import{Regular12 as D}from"../Typography.js";import"../CollapsableSidebar.js";import"../DateTimePicker/index.js";import"../DatePicker/index.js";import"../SlateFormattedText/SlateFormattedText.js";import"../SlateFormattedText/RenderElements.js";import"@babel/runtime/helpers/typeof";import"slate";import"../ParameterCharts/ParameterCharts.js";import"../ParameterCharts/AddEditTrack.js";import"../ChartActionsList/ChartActionsList.js";import"../CopyToClipboard/CopyToClipboard.js";import"../AssetEditor/AssetEditorAutocomplete.js";import"../AssetEditor/SingleAssetEditor.js";import"../SettingEditors/ColorEditor/index.js";import"../SettingEditors/DropdownEditor/index.js";import"../SettingEditors/RadioEditor/index.js";import S from"../SwitchControl/index.js";import"../ColorPicker/ColorPicker.js";import"../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../TruncatedText/index.js";import"../RangeSlider/RangeSlider.js";import"../Breadcrumbs/index.js";import"../VirtualizedTable/index.js";import"../EmptyView/EmptyView.js";import"../EmptyView/EmptyAppView/EmptyAppView.js";import y from"../Button/index.js";import"../ContextMenuItem/index.js";import"../FolderMenuItem/index.js";import"../EditableItem/EditableItem/index.js";import"../EditableItem/EditableItemWithBadge/index.js";import"../Checkbox/index.js";import"../FolderMenuItemWithLinks/index.js";import"../IconButton/index.js";import"../TextField/index.js";import"../Chip/index.js";import"../Counter/index.js";import"../AnchorsList/AnchorsList.js";import"../Select/index.js";import"../CustomSelect/index.js";import"../Tabs/Tabs.js";import"../Tabs/Tab.js";import"../ResizableTable/ResizableTable.js";import"../Drillstring/BHASchematic.js";import"../Drillstring/BHATable/index.js";import"../Drillstring/BHAComponentIcon.js";import"../Drillstring/BHAComponentDetail/index.js";import"../Drillstring/BHATileIcon.js";import"../Drillstring/BHATile/BHATile.js";import"../Drillstring/BHAList/BHAList.js";import"../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../Casing/CasingTable/index.js";import"../Casing/CasingComponentIcon.js";import"../Casing/CasingTileIcon.js";import"../Casing/CasingTableV2/CasingTableV2.js";import"../Casing/CasingTile/CasingTile.js";import"../DisabledSettingsMessage/DisabledSettingsMessage.js";import"../WellSummary/WellSummaryItemLabel.js";import"../WellSummary/WellSummaryItemTitle.js";import"../WellSummary/WellSummaryItemValue.js";import"../WellSummary/ActivitySummaryChart.js";import"../WellSummary/FracWirelineTimeChart.js";import"../BICOffsetPickerDialog/index.js";import"../OffsetWellButton/OffsetWellButton.js";import"../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../OffsetWellPickerV3/index.js";import"../OffsetWellChips/Chip.js";import"../OffsetWellChips/ChipsContainer.js";import"../Notifications/Notifications.js";import"uuid";import"../ConfirmationDialog.js";import"../TextLink/index.js";import"../Avatar/index.js";import"../Template/TemplatePopover/index.js";import"../MenuItem/index.js";import"../PadModeSelect/PadModeSelect.js";import"../PinnableFilters/PinnableFilters.js";import"../HeaderLayout/HeaderLayout.js";import"../PadOffsetsPicker/PadOffsetsPicker.js";import"../PadOffsetsPicker/OffsetAssetChip.js";import"../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../PadOffsetsPicker/StagesSelector.js";import"../Table/TableToolbar/TableToolbar.js";import{Tooltip as I}from"../Tooltip/Tooltip.js";import"../PriceInput/PriceInput.js";import"../LabelsCounter/LabelsCounter.js";import"../Stepper/Step.js";import"../Stepper/StepsWrapper.js";import"../Stepper/Stepper.js";import"../Comment/CommentIcon/index.js";import"../FilesLoader/FilesLoader.js";import"../FilesLoader/Icons/FileIcon.js";import"../SearchInput/index.js";import"../FeedItem/FeedItem.js";import"../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../PostInput/PostInput.js";import"../KeyboardDateTimePicker.js";import"../AddComment/Popover.js";import"../AddComment/Popup.js";import"../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../StageDesignVActual/ComparisonHeader.js";import"../StageDesignVActual/ComparisonRow.js";import"../EmbeddedApp/DevCenterEmbeddedApp.js";import"../EmbeddedApp/EmbeddedApp.js";import"../Autocomplete/Autocomplete.js";import"../DocumentViewer/DocumentViewer.js";import"../ColorPickerPalette/ColorPickerPalette.js";import"../Search/Search.js";import"../Search/components/Listbox.js";import"../Search/components/Paper.js";import"../Search/components/RecentSearches.js";import"../Search/components/InputAdornmentLeft.js";import"../Search/components/Groups.js";import{useFetchWells as P}from"./effects/useFetchWells.js";import{useAdvancedWells as W}from"./effects/useAdvancedWells.js";import{useBicWells as x}from"./effects/useBicWells.js";import{useCompanyMetricKey as T}from"./effects/useCompanyMetricKey.js";import{useFilterOptions as O}from"./effects/useFilterOptions.js";import{useFilteredWells as E}from"./effects/useFilteredWells.js";import{useSortedWells as w}from"./effects/useSortedWells.js";import{useRadiusWells as B}from"./effects/useRadiusWells.js";import"./effects/useAssetsData.js";import{useTableColumns as L}from"./effects/useTableColumns.js";import{Filter as k}from"./components/Filter/Filter.js";import{WellsMap as V}from"./components/Map/WellsMap.js";import F from"./components/OffsetWellsTable/OffsetWellsTable.js";import H from"./OffsetWellPickerV4.module.css.js";import{ALL_SECTION_KEY as N,ColumnType as M,FilterType as R,ROWS_PER_PAGE as U}from"./constants.js";import{SEARCH_CATEGORIES as z}from"./components/OffsetWellsTable/AdvancedSearch/constants.js";function K(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function q(e){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?K(Object(i),!0).forEach((function(r){t(e,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):K(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var G=function(a){var K=a.open,G=a.isWDUser,_=a.defaultSubjectWell,J=a.currentUser,Q=a.offsetSettings,X=a.addWellsUsabilityInfo,Y=a.isViewOnly,Z=a.onClose,$=a.onSave,ee=a.maxOffsetSize,te=i(null),re=r(te,2),ie=re[0],oe=re[1],ne=o((function(){return ee+1}),[ee]),se=i(null==Q?void 0:Q.filterExpanded),le=r(se,2),ae=le[0],pe=le[1],me=i(null==Q?void 0:Q.mapHidden),ce=r(me,2),de=ce[0],ue=ce[1],fe=+(null==_?void 0:_.companyId)||+(null==J?void 0:J.company_id),je=null==_?void 0:_.asset_id,Ce=i((null==Q?void 0:Q.filters)||{}),ve=r(Ce,2),be=ve[0],ge=ve[1],he=i((null==Q?void 0:Q.wellSection)||N),Ae=r(he,2),De=Ae[0],Se=Ae[1],ye=n(!0),Ie=i([]),Pe=r(Ie,2),We=Pe[0],xe=Pe[1],Te=i(null),Oe=r(Te,2),Ee=Oe[0],we=Oe[1],Be=i(!0),Le=r(Be,2),ke=Le[0],Ve=Le[1],Fe=i(!1),He=r(Fe,2),Ne=He[0],Me=He[1],Re=i(!1),Ue=r(Re,2),ze=Ue[0],Ke=Ue[1],qe=i(!1),Ge=r(qe,2),_e=Ge[0],Je=Ge[1],Qe=n(),Xe=o((function(){return!de&&ae?448:de?ae?232:0:216}),[de,ae]);s((function(){ye.current=!0}),[je,null==Q?void 0:Q.selectedWellIds]),s((function(){pe(!Y&&(null==Q?void 0:Q.filterExpanded)),ue(!Y&&(null==Q?void 0:Q.mapHidden)),ge((null==Q?void 0:Q.filters)||{}),Se((null==Q?void 0:Q.wellSection)||N)}),[Q,Y]);var Ye=P(fe,X),Ze=x(G,je),$e=r(Ze,2),et=$e[0],tt=$e[1],rt=T(fe,null==Q?void 0:Q.metricsKeys),it=r(rt,2),ot=it[0],nt=it[1],st=W(fe,Ye,et,tt,je,ot),lt=O(st);s((function(){if(st&&et){var e=st.find((function(e){return e.id===je}));if(e){var r=et.filter((function(e){return e.value!==N})).map((function(e){return e.label})),i=q(q({},e),r.length>0&&t({},M.wellSection,r));we(i)}else we(null)}}),[et,st]);var at=L(ot),pt=E(st,be);s((function(){if(pt)if(ye.current){var e=st.filter((function(e){return((null==Q?void 0:Q.selectedWellIds)||[]).includes(e.id)}));Ee&&(e=e.concat(Ee)),xe(p(e,"id")),ye.current=!1}else xe((function(e){var t=(pt||[]).filter((function(t){return!!e.find((function(e){var r=e.id;return t.id===r}))}));return Ee&&(t=t.concat(Ee)),p(t,"id")}))}),[st,pt,null==Q?void 0:Q.selectedWellIds]);var mt=w(Ee,pt,We,Ve,ye.current),ct=r(mt,5),dt=ct[0],ut=ct[1],ft=ct[2],jt=ct[3],Ct=ct[4];B(be[R.radius],pt,xe,ne);var vt=l((function(e,t,r){var i;i=r===z.well.name?t:t.reduce((function(e,t){var r,i=null===(r=st.find((function(e){return e.id===t})))||void 0===r?void 0:r.rigName,o=st.filter((function(e){return e.rigName===i})).map((function(e){return e.id}));return e.concat(o)}),[]);var o=st.filter((function(e){var t=e.id;return i.includes(t)}));xe(e?function(e){return p(e.concat(o),"id")}:function(e){return p(e.filter((function(e){var t=e.id;return!o.find((function(e){return e.id===t}))})))})}),[st]),bt=l((function(){Ke(!0)}),[]),gt=l((function(e){nt(e)}),[]),ht=l((function(t,r){xe(r?function(r){return[].concat(e(r),[t])}:function(e){return e.filter((function(e){return e.id!==t.id}))})}),[]),At=l((function(e){if(e){var t=Ee?pt.concat(Ee):pt,r=p(t,"id");xe(r)}else xe(Ee?[Ee]:[])}),[pt,Ee]),Dt=function(e){if(m(tt))xe(Ee?[Ee]:[]);else{var t=st.filter((function(t){return tt[e].includes(t.id)}));xe(t)}},St=l((function(e){Se(e),Dt(e)}),[Dt]),yt=o((function(){return We.find((function(e){return e.id===je}))?We.length-1:We.length}),[We,je]),It=o((function(){if(!tt)return!1;var e=We.map((function(e){return e.id})),t=tt[De]||[];return(ne&&t.length>ne?ne:t.length)===e.length&&e.every((function(e){return t.includes(e)}))}),[tt,_,We,De]),Pt=function(){var e=(st||[]).filter((function(e){return((null==Q?void 0:Q.selectedWellIds)||[]).includes(e.id)}));Ee&&(e=e.concat(Ee)),xe(p(e,"id")),d(be,Q.filters)||(ye.current=!0);var t=q(q({},Q),{},{mapHidden:de,filterExpanded:ae});$(t),ge((null==Q?void 0:Q.filters)||{}),Se((null==Q?void 0:Q.wellSection)||N),Z()},Wt=o((function(){return!It||(!(m(be)||!be[R.sideTracks])||De!==N)}),[It,be,De]);s((function(){if(!ne||ne>We.length)Je(!1);else if(ne<We.length){var e=c(We,"distance");xe(e.slice(0,ne))}else ne===We.length&&Je(!0)}),[We,ne]);var xt=!st||!et||!Ct,Tt=i(!1),Ot=r(Tt,2),Et=Ot[0],wt=Ot[1],Bt=i(!1),Lt=r(Bt,2),kt=Lt[0],Vt=Lt[1],Ft=i(U),Ht=r(Ft,2),Nt=Ht[0],Mt=Ht[1],Rt=i([]),Ut=r(Rt,2),zt=Ut[0],Kt=Ut[1];s((function(){if(Ct){var e=Ct.slice(0,Nt);Kt(e)}}),[Ct,Nt,Ee]);return g(b,{open:K,onClose:Pt,title:"Select Offset Wells",contentContainerClassName:H.offsetWellDialog,contentClassName:H.contentContainer,actionsClassName:H.modalActions,actions:!Y&&h("div",{className:H.actionsWrapper,children:[!xt&&Wt?g(I,{placement:"bottom-start",title:G?"To Synced Offsets in Offset App":"To Synced Offsets in Wellhub",children:g("div",{children:g(y,{onClick:function(){ge({}),Se(N),Dt(N)},color:"primary",startIcon:g(f,{}),children:"Reset"})})}):g("div",{}),h("div",{className:H.buttonGap,children:[g(y,{onClick:Pt,color:"primary",children:"Cancel"}),h(y,{variant:"contained",color:"primary",onClick:function(){Z();var e=q(q({},Q),{},{companyId:fe,subjectWellId:je,selectedWellIds:We.map((function(e){return e.id})),filters:be,metricsKeys:ot,wellSection:De,isSynced:It,mapHidden:de,filterExpanded:ae});$(e,We)},children:["Select (",yt,")"]})]})]}),children:xt?g(A,{fullscreen:!1}):h("div",{className:H.contentWrapper,ref:Qe,children:[h("div",{className:H.countContainer,children:[g(D,{className:H.totalLabel,children:"Total:"}),g(D,{className:H.countValue,children:st.length}),g(D,{className:H.selectedLabel,children:"Selected:"}),g(D,{className:H.countValue,children:yt})]}),ne&&ne<=We.length&&g(u,{className:H.viewOnlyTitleLabel,children:"This app supports no more than (".concat(ee,") offset wells at a time.")}),Y&&g(u,{className:H.viewOnlyTitleLabel,children:"This is the view only mode. To edit offset wells, use the Offset Well Selection app."}),h("div",{className:H.controlGroup,children:[h(y,{startIcon:g(ae?j:C,{}),classes:{root:H.filterButton},onClick:function(){return pe((function(e){return!e}))},disabled:Y,children:["Filters",!m(be)&&h("div",{className:H.clearWrapper,onClick:function(e){e.stopPropagation(),ge({})},children:[g(v,{className:H.clearIcon}),g("span",{className:H.clearLabel,children:"Clear"})]})]}),g(S,{rightLabel:"Map",color:"primary",checked:!de,onChange:function(e){return ue(!e.target.checked)}})]}),h("div",{className:H.content,onScroll:function(e){e.target&&(ze&&(e.target.scrollLeft=0,Ke(!1)),e.target.scrollLeft<=5&&Et&&wt(!1),e.target.scrollLeft>5&&!Et&&wt(!0),e.target.scrollTop<12&&kt&&Vt(!1),e.target.scrollTop>=12&&!kt&&Vt(!0),e.target.scrollHeight!==e.target.offsetHeight&&Math.round(e.target.scrollTop+e.target.offsetHeight)>=e.target.scrollHeight&&Nt<Ct.length&&Mt((function(e){return e+U})))},children:[kt&&g("div",{className:H.topGradient}),!de&&K&&g(V,{isViewOnly:Y,mapHidden:de,companyId:fe,subjectWell:Ee,offsetWellIds:We.map((function(e){return e.id})),wells:st,radius:be[R.radius],handleChanageOffsetWell:ht,activeWellId:ie}),g(k,{isHidden:!ae,isWDUser:G,filterOptions:lt,filters:be,wellSections:et,selectedWellSection:De,subjectWell:Ee,onChangeFilters:ge,onChangeBicWells:St}),g(F,{open:K,isTableLoading:ke,companyId:fe,subjectWellId:je,sortBy:dt,setSortBy:ut,sortDirection:ft,setSortDirection:jt,columnsWithDict:at,wells:zt,metricsKeys:ot,setMetricsKeys:gt,handleChanageOffsetWell:ht,handleChangeAllOffsetWells:At,handleAddRemoveAssets:vt,isWellNameExpand:Ne,setIsWellNameExpand:Me,isHscrollMoved:Et,onHideAdvancedSearch:bt,isViewOnly:Y,isLastWell:Ct.length<=Nt,contentRef:Qe,isLimitedOffsetwells:_e,tableTop:Xe,wellSections:et,setActiveWellId:oe})]})]})})};G.propTypes={isWDUser:a.bool,defaultSubjectWell:a.shape({asset_id:a.number,companyId:a.number}),offsetSettings:a.shape({selectedWellIds:a.arrayOf(a.number),manualWellIds:a.arrayOf(a.number),filters:a.shape({}),metricsKeys:a.arrayOf(a.string),wellSection:a.string,companyId:a.number,subjectWellId:a.number,mapHidden:a.bool,filterExpanded:a.bool,hintPopupClosed:a.bool}),currentUser:a.shape({company_id:a.number}).isRequired,open:a.bool.isRequired,addWellsUsabilityInfo:a.func,isViewOnly:a.bool,onSave:a.func.isRequired,onClose:a.func.isRequired,maxOffsetSize:a.number},G.defaultProps={isWDUser:!1,defaultSubjectWell:null,offsetSettings:{},addWellsUsabilityInfo:void 0,isViewOnly:!1,maxOffsetSize:50};export{G as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import{useState as r}from"react";import i from"prop-types";import{startCase as o,isEmpty as n,omit as s}from"lodash";import p from"moment";import m from"classnames";import{Divider as a,Grid as l,ListItemText as c,FormControlLabel as d,Switch as u}from"@material-ui/core";import"../../../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import{jsxs as j,jsx as C,Fragment as v}from"react/jsx-runtime";import"../../../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../../../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../../../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../../../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../../../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../../../ErrorBoundary/ErrorBoundary.js";import"../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../../LoadingIndicator/LoadingIndicator.js";import"../../../../constants/segment.js";import"../../../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../../../DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../../../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../../Modal/CorvaModal.js";import"@babel/runtime/helpers/objectWithoutProperties";import"../../../IconMenu/index.js";import"../../../StyledMenuItem/index.js";import"../../../DevCenter/AppHeader/AppHeader.js";import"../../../DevCenter/AppSideBar/AppSideBar.js";import"../../../DevCenter/AppsDataProvider/AppsDataProvider.js";import"../../../Icons/AnnotationIcon.js";import"../../../Annotations/components/AnnotationsList/index.js";import"../../../Annotations/components/LastAnnotation/index.js";import"../../../Annotations/AnnotationsContext.js";import"../../../../utils/mobileDetect.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"../../../../clients/jsonApi/index.js";import"../../../../clients/subscriptions.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"../../../../utils/index.js";import"../../../HelpCenter/HelpCenterIcon.js";import"../../../DevCenter/AppContext.js";import"../../../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../../../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../../../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../../../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"react-router";import"../../../DevCenter/NavigationBar/NavigationBar.js";import"../../../DevCenter/SideBar/SideBar.js";import"../../../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../../../AssetEditor/index.js";import"../../../AppVersionsSelect/AppVersionsSelect.js";import"../../../Typography.js";import"../../../CollapsableSidebar.js";import g from"../../../DateTimePicker/index.js";import"../../../DatePicker/index.js";import"../../../SlateFormattedText/SlateFormattedText.js";import"../../../SlateFormattedText/RenderElements.js";import"@babel/runtime/helpers/typeof";import"slate";import"../../../ParameterCharts/ParameterCharts.js";import"../../../ParameterCharts/AddEditTrack.js";import"../../../ChartActionsList/ChartActionsList.js";import"../../../CopyToClipboard/CopyToClipboard.js";import"../../../AssetEditor/AssetEditorAutocomplete.js";import"../../../AssetEditor/SingleAssetEditor.js";import"../../../SettingEditors/ColorEditor/index.js";import"../../../SettingEditors/DropdownEditor/index.js";import"../../../SettingEditors/RadioEditor/index.js";import"../../../SwitchControl/index.js";import"../../../ColorPicker/ColorPicker.js";import"../../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../../TruncatedText/index.js";import"../../../RangeSlider/RangeSlider.js";import"../../../Breadcrumbs/index.js";import"../../../VirtualizedTable/index.js";import"../../../EmptyView/EmptyView.js";import"../../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../../Button/index.js";import"../../../ContextMenuItem/index.js";import"../../../FolderMenuItem/index.js";import"../../../EditableItem/EditableItem/index.js";import"../../../EditableItem/EditableItemWithBadge/index.js";import"../../../Checkbox/index.js";import"../../../FolderMenuItemWithLinks/index.js";import"../../../IconButton/index.js";import"../../../TextField/index.js";import"../../../Chip/index.js";import"../../../Counter/index.js";import"../../../AnchorsList/AnchorsList.js";import"../../../Select/index.js";import"../../../CustomSelect/index.js";import"../../../Tabs/Tabs.js";import"../../../Tabs/Tab.js";import"../../../ResizableTable/ResizableTable.js";import"../../../Drillstring/BHASchematic.js";import"../../../Drillstring/BHATable/index.js";import"../../../Drillstring/BHAComponentIcon.js";import"../../../Drillstring/BHAComponentDetail/index.js";import"../../../Drillstring/BHATileIcon.js";import"../../../Drillstring/BHATile/BHATile.js";import"../../../Drillstring/BHAList/BHAList.js";import"../../../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../../../Casing/CasingTable/index.js";import"../../../Casing/CasingComponentIcon.js";import"../../../Casing/CasingTileIcon.js";import"../../../Casing/CasingTableV2/CasingTableV2.js";import"../../../Casing/CasingTile/CasingTile.js";import"../../../DisabledSettingsMessage/DisabledSettingsMessage.js";import"../../../WellSummary/WellSummaryItemLabel.js";import"../../../WellSummary/WellSummaryItemTitle.js";import"../../../WellSummary/WellSummaryItemValue.js";import"../../../WellSummary/ActivitySummaryChart.js";import"../../../WellSummary/FracWirelineTimeChart.js";import"../../../BICOffsetPickerDialog/index.js";import"../../../OffsetWellButton/OffsetWellButton.js";import"../../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../../OffsetWellPickerV3/index.js";import"../../../OffsetWellChips/Chip.js";import"../../../OffsetWellChips/ChipsContainer.js";import"../../OffsetWellPickerV4.js";import"../../../Notifications/Notifications.js";import"@babel/runtime/helpers/toConsumableArray";import"uuid";import"../../../ConfirmationDialog.js";import"../../../TextLink/index.js";import"../../../Avatar/index.js";import"../../../Template/TemplatePopover/index.js";import"../../../MenuItem/index.js";import"../../../PadModeSelect/PadModeSelect.js";import"../../../PinnableFilters/PinnableFilters.js";import"../../../HeaderLayout/HeaderLayout.js";import"../../../PadOffsetsPicker/PadOffsetsPicker.js";import"../../../PadOffsetsPicker/OffsetAssetChip.js";import"../../../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../../../PadOffsetsPicker/StagesSelector.js";import"../../../Table/TableToolbar/TableToolbar.js";import"../../../Tooltip/MuiTooltipDcWrapper.js";import"../../../PriceInput/PriceInput.js";import"../../../LabelsCounter/LabelsCounter.js";import"../../../Stepper/Step.js";import"../../../Stepper/StepsWrapper.js";import"../../../Stepper/Stepper.js";import"../../../Comment/CommentIcon/index.js";import"../../../FilesLoader/FilesLoader.js";import"../../../FilesLoader/Icons/FileIcon.js";import"../../../SearchInput/index.js";import"../../../FeedItem/FeedItem.js";import"../../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../../../PostInput/PostInput.js";import"../../../KeyboardDateTimePicker.js";import"../../../AddComment/Popover.js";import"../../../AddComment/Popup.js";import"../../../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../../../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../../../StageDesignVActual/ComparisonHeader.js";import"../../../StageDesignVActual/ComparisonRow.js";import"../../../EmbeddedApp/DevCenterEmbeddedApp.js";import"../../../EmbeddedApp/EmbeddedApp.js";import"../../../Autocomplete/Autocomplete.js";import"../../../DocumentViewer/DocumentViewer.js";import"../../../ColorPickerPalette/ColorPickerPalette.js";import"../../../Search/Search.js";import"../../../Search/components/Listbox.js";import"../../../Search/components/Paper.js";import"../../../Search/components/RecentSearches.js";import"../../../Search/components/InputAdornmentLeft.js";import"../../../Search/components/Groups.js";import{RadiusInput as f}from"./RadiusInput.js";import{MultiSelect as A}from"./MultiSelect.js";import{WellSection as D}from"./WellSection.js";import{PeriodSelect as b}from"./PeriodSelect.js";import{StatusOptions as h,FilterType as S,OBJECTIVE_PERIOD_LIST as P}from"../../constants.js";import x from"./Filter.module.css.js";function I(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function y(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?I(Object(i),!0).forEach((function(r){e(t,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):I(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var T=function(i){var I=i.isHidden,T=i.isWDUser,E=i.filterOptions,k=i.wellSections,B=i.filters,O=i.selectedWellSection,F=i.subjectWell,R=i.onChangeFilters,W=i.onChangeBicWells,V=r({}),L=t(V,2),M=L[0],w=L[1],H=function(t,r){t===S.sideTracks?R(y(y({},B),{},e({},S.sideTracks,r))):R(r?y(y({},B),{},e({},t,r)):s(y({},B),[t]))},N=function(t){return function(r){var i=p(r);if(i.isValid()){var o=i.unix(),n=!1;"timeRangeFrom"===t?n=o>=B[S.timeRangeTo]:"timeRangeTo"===t&&(n=o<=B[S.timeRangeFrom]),w(n?e({},t,!0):{}),R(y(y({},B),{},e({},t,o)))}}};return j("div",{className:m(x.filterContainer,e({},x.hidden,I)),children:[C(a,{className:x.divideLine}),j(l,{container:!0,spacing:3,children:[C(l,{item:!0,xs:2,className:x.gridItem,children:C(A,{label:"Status",options:h.map((function(e){return e.value})),currentValues:B[S.status],ValueComponent:function(e){var t,r=e.value;return j("div",{className:x.statusItem,children:[C("div",{className:x.statusIcon,style:{background:null===(t=h.find((function(e){return e.value===r})))||void 0===t?void 0:t.color}}),o(r)]})},ListMenuItem:function(e){var t,r=e.value;return j("div",{className:x.statusItem,children:[C("div",{className:x.statusIcon,style:{background:null===(t=h.find((function(e){return e.value===r})))||void 0===t?void 0:t.color}}),C(c,{primary:o(r)})]})},onChange:function(e){return H(S.status,e)}})}),E.map((function(e){var t=e.value,r=e.label,i=e.options;return C(l,{item:!0,xs:2,className:x.gridItem,children:C(A,{label:r,options:i,currentValues:B[t],ListMenuItem:function(e){var t=e.value;return C(c,{primary:t})},onChange:function(e){return H(t,e)}})},t)})),C(l,{item:!0,xs:2,className:x.gridItem,children:C(f,{radius:B[S.radius],editable:!!F,onChange:function(e){return H(S.radius,e)}})}),C(l,{item:!0,xs:2,className:x.gridItem,children:C(b,{label:"Last Active",currentValue:B[S.period]||"all",options:P,className:x.companySelect,onChange:function(e){return H(S.period,e)}})}),"custom"===B[S.period]&&j(v,{children:[C(l,{item:!0,xs:2,className:m(x.gridItem),children:C("div",{className:x.filterItem,children:C(g,{variant:"inline",label:"Date From",format:"MM/DD/YY HH:mm",value:1e3*B[S.timeRangeFrom]||null,onChange:N("timeRangeFrom"),error:M.timeRangeFrom})})}),C(l,{item:!0,xs:2,className:m(x.gridItem),children:C("div",{className:x.filterItem,children:C(g,{variant:"inline",label:"Date To",format:"MM/DD/YY HH:mm",value:1e3*B[S.timeRangeTo]||null,onChange:N("timeRangeTo"),error:M.timeRangeTo})})})]}),C(l,{item:!0,xs:2,className:x.gridItem,children:C(d,{control:C(u,{size:"small",color:"primary",checked:B[S.sideTracks]||!1,onChange:function(e){return H(S.sideTracks,e.target.checked)}}),label:"Exclude Sidetracks",classes:{label:x.sidetrack}})}),T&&!n(k)&&C(l,{item:!0,xs:3,className:x.gridItem,children:C(D,{selectedValue:O,wellSections:k,onChange:W})})]})]})};T.propTypes={isHidden:i.bool.isRequired,isWDUser:i.bool.isRequired,filterOptions:i.arrayOf(i.shape({})).isRequired,wellSections:i.arrayOf(i.shape({})).isRequired,filters:i.shape({}).isRequired,selectedWellSection:i.string.isRequired,subjectWell:i.shape({}).isRequired,onChangeFilters:i.func.isRequired,onChangeBicWells:i.func.isRequired};export{T as Filter};
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import{useState as r}from"react";import i from"prop-types";import{startCase as o,isEmpty as n,omit as s}from"lodash";import p from"moment";import m from"classnames";import{Divider as a,Grid as l,ListItemText as c,FormControlLabel as d,Switch as u}from"@material-ui/core";import"../../../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import{jsxs as j,jsx as C,Fragment as v}from"react/jsx-runtime";import"../../../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../../../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../../../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../../../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../../../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../../../ErrorBoundary/ErrorBoundary.js";import"../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../../LoadingIndicator/LoadingIndicator.js";import"../../../../constants/segment.js";import"../../../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../../../DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../../../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../../Modal/CorvaModal.js";import"@babel/runtime/helpers/objectWithoutProperties";import"../../../IconMenu/index.js";import"../../../StyledMenuItem/index.js";import"../../../DevCenter/AppHeader/AppHeader.js";import"../../../DevCenter/AppSideBar/AppSideBar.js";import"../../../DevCenter/AppsDataProvider/AppsDataProvider.js";import"../../../Icons/AnnotationIcon.js";import"../../../Annotations/components/AnnotationsList/index.js";import"../../../Annotations/components/LastAnnotation/index.js";import"../../../Annotations/AnnotationsContext.js";import"../../../../utils/mobileDetect.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"../../../../clients/jsonApi/index.js";import"../../../../clients/subscriptions.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"../../../../utils/index.js";import"../../../HelpCenter/HelpCenterIcon.js";import"../../../DevCenter/AppContext.js";import"../../../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../../../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../../../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../../../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"react-router";import"../../../DevCenter/NavigationBar/NavigationBar.js";import"../../../DevCenter/SideBar/SideBar.js";import"../../../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../../../AssetEditor/index.js";import"../../../AppVersionsSelect/AppVersionsSelect.js";import"../../../Typography.js";import"../../../CollapsableSidebar.js";import g from"../../../DateTimePicker/index.js";import"../../../DatePicker/index.js";import"../../../SlateFormattedText/SlateFormattedText.js";import"../../../SlateFormattedText/RenderElements.js";import"@babel/runtime/helpers/typeof";import"slate";import"../../../ParameterCharts/ParameterCharts.js";import"../../../ParameterCharts/AddEditTrack.js";import"../../../ChartActionsList/ChartActionsList.js";import"../../../CopyToClipboard/CopyToClipboard.js";import"../../../AssetEditor/AssetEditorAutocomplete.js";import"../../../AssetEditor/SingleAssetEditor.js";import"../../../SettingEditors/ColorEditor/index.js";import"../../../SettingEditors/DropdownEditor/index.js";import"../../../SettingEditors/RadioEditor/index.js";import"../../../SwitchControl/index.js";import"../../../ColorPicker/ColorPicker.js";import"../../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../../TruncatedText/index.js";import"../../../RangeSlider/RangeSlider.js";import"../../../Breadcrumbs/index.js";import"../../../VirtualizedTable/index.js";import"../../../EmptyView/EmptyView.js";import"../../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../../Button/index.js";import"../../../ContextMenuItem/index.js";import"../../../FolderMenuItem/index.js";import"../../../EditableItem/EditableItem/index.js";import"../../../EditableItem/EditableItemWithBadge/index.js";import"../../../Checkbox/index.js";import"../../../FolderMenuItemWithLinks/index.js";import"../../../IconButton/index.js";import"../../../TextField/index.js";import"../../../Chip/index.js";import"../../../Counter/index.js";import"../../../AnchorsList/AnchorsList.js";import"../../../Select/index.js";import"../../../CustomSelect/index.js";import"../../../Tabs/Tabs.js";import"../../../Tabs/Tab.js";import"../../../ResizableTable/ResizableTable.js";import"../../../Drillstring/BHASchematic.js";import"../../../Drillstring/BHATable/index.js";import"../../../Drillstring/BHAComponentIcon.js";import"../../../Drillstring/BHAComponentDetail/index.js";import"../../../Drillstring/BHATileIcon.js";import"../../../Drillstring/BHATile/BHATile.js";import"../../../Drillstring/BHAList/BHAList.js";import"../../../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../../../Casing/CasingTable/index.js";import"../../../Casing/CasingComponentIcon.js";import"../../../Casing/CasingTileIcon.js";import"../../../Casing/CasingTableV2/CasingTableV2.js";import"../../../Casing/CasingTile/CasingTile.js";import"../../../DisabledSettingsMessage/DisabledSettingsMessage.js";import"../../../WellSummary/WellSummaryItemLabel.js";import"../../../WellSummary/WellSummaryItemTitle.js";import"../../../WellSummary/WellSummaryItemValue.js";import"../../../WellSummary/ActivitySummaryChart.js";import"../../../WellSummary/FracWirelineTimeChart.js";import"../../../BICOffsetPickerDialog/index.js";import"../../../OffsetWellButton/OffsetWellButton.js";import"../../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../../OffsetWellPickerV3/index.js";import"../../../OffsetWellChips/Chip.js";import"../../../OffsetWellChips/ChipsContainer.js";import"../../OffsetWellPickerV4.js";import"../../../Notifications/Notifications.js";import"@babel/runtime/helpers/toConsumableArray";import"uuid";import"../../../ConfirmationDialog.js";import"../../../TextLink/index.js";import"../../../Avatar/index.js";import"../../../Template/TemplatePopover/index.js";import"../../../MenuItem/index.js";import"../../../PadModeSelect/PadModeSelect.js";import"../../../PinnableFilters/PinnableFilters.js";import"../../../HeaderLayout/HeaderLayout.js";import"../../../PadOffsetsPicker/PadOffsetsPicker.js";import"../../../PadOffsetsPicker/OffsetAssetChip.js";import"../../../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../../../PadOffsetsPicker/StagesSelector.js";import"../../../Table/TableToolbar/TableToolbar.js";import"../../../Tooltip/MuiTooltipDcWrapper.js";import"../../../PriceInput/PriceInput.js";import"../../../LabelsCounter/LabelsCounter.js";import"../../../Stepper/Step.js";import"../../../Stepper/StepsWrapper.js";import"../../../Stepper/Stepper.js";import"../../../Comment/CommentIcon/index.js";import"../../../FilesLoader/FilesLoader.js";import"../../../FilesLoader/Icons/FileIcon.js";import"../../../SearchInput/index.js";import"../../../FeedItem/FeedItem.js";import"../../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../../../PostInput/PostInput.js";import"../../../KeyboardDateTimePicker.js";import"../../../AddComment/Popover.js";import"../../../AddComment/Popup.js";import"../../../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../../../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../../../StageDesignVActual/ComparisonHeader.js";import"../../../StageDesignVActual/ComparisonRow.js";import"../../../EmbeddedApp/DevCenterEmbeddedApp.js";import"../../../EmbeddedApp/EmbeddedApp.js";import"../../../Autocomplete/Autocomplete.js";import"../../../DocumentViewer/DocumentViewer.js";import"../../../ColorPickerPalette/ColorPickerPalette.js";import"../../../Search/Search.js";import"../../../Search/components/Listbox.js";import"../../../Search/components/Paper.js";import"../../../Search/components/RecentSearches.js";import"../../../Search/components/InputAdornmentLeft.js";import"../../../Search/components/Groups.js";import{RadiusInput as f}from"./RadiusInput.js";import{MultiSelect as A}from"./MultiSelect.js";import{WellSection as D}from"./WellSection.js";import{PeriodSelect as b}from"./PeriodSelect.js";import{StatusOptions as h,FilterType as S,OBJECTIVE_PERIOD_LIST as P}from"../../constants.js";import x from"./Filter.module.css.js";function I(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function y(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?I(Object(i),!0).forEach((function(r){e(t,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):I(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var T=function(i){var I=i.isHidden,T=i.isWDUser,E=i.filterOptions,k=i.wellSections,B=i.filters,O=i.selectedWellSection,F=i.subjectWell,R=i.onChangeFilters,W=i.onChangeBicWells,V=r({}),L=t(V,2),M=L[0],w=L[1],H=function(t,r){t===S.sideTracks?R(y(y({},B),{},e({},S.sideTracks,r))):R(r?y(y({},B),{},e({},t,r)):s(y({},B),[t]))},N=function(t){return function(r){var i=p(r);if(i.isValid()){var o=i.unix(),n=!1;"timeRangeFrom"===t?n=o>=B[S.timeRangeTo]:"timeRangeTo"===t&&(n=o<=B[S.timeRangeFrom]),w(n?e({},t,!0):{}),R(y(y({},B),{},e({},t,o)))}}};return j("div",{className:m(x.filterContainer,e({},x.hidden,I)),children:[C(a,{className:x.divideLine}),j(l,{container:!0,spacing:3,children:[C(l,{item:!0,xs:2,className:x.gridItem,children:C(A,{label:"Status",options:h.map((function(e){return e.value})),currentValues:B[S.status],ValueComponent:function(e){var t,r=e.value;return j("div",{className:x.statusItem,children:[C("div",{className:x.statusIcon,style:{background:null===(t=h.find((function(e){return e.value===r})))||void 0===t?void 0:t.color}}),o(r)]})},ListMenuItem:function(e){var t,r=e.value;return j("div",{className:x.statusItem,children:[C("div",{className:x.statusIcon,style:{background:null===(t=h.find((function(e){return e.value===r})))||void 0===t?void 0:t.color}}),C(c,{primary:o(r)})]})},onChange:function(e){return H(S.status,e)}})}),E.map((function(e){var t=e.value,r=e.label,i=e.options;return C(l,{item:!0,xs:2,className:x.gridItem,children:C(A,{label:r,options:i,currentValues:B[t],ListMenuItem:function(e){var t=e.value;return C(c,{primary:t})},onChange:function(e){return H(t,e)}})},t)})),C(l,{item:!0,xs:2,className:x.gridItem,children:C(f,{radius:B[S.radius],editable:!!F,onChange:function(e){return H(S.radius,e)}})}),C(l,{item:!0,xs:2,className:x.gridItem,children:C(b,{label:"Last Active",currentValue:B[S.period]||"all",options:P,className:x.companySelect,onChange:function(e){return H(S.period,e)}})}),"custom"===B[S.period]&&j(v,{children:[C(l,{item:!0,xs:2,className:m(x.gridItem),children:C("div",{className:x.filterItem,children:C(g,{variant:"inline",label:"Date From",format:"MM/DD/YY HH:mm",value:1e3*B[S.timeRangeFrom]||null,onChange:N("timeRangeFrom"),error:M.timeRangeFrom})})}),C(l,{item:!0,xs:2,className:m(x.gridItem),children:C("div",{className:x.filterItem,children:C(g,{variant:"inline",label:"Date To",format:"MM/DD/YY HH:mm",value:1e3*B[S.timeRangeTo]||null,onChange:N("timeRangeTo"),error:M.timeRangeTo})})})]}),C(l,{item:!0,xs:2,className:x.gridItem,children:C(d,{control:C(u,{size:"small",color:"primary",checked:B[S.sideTracks]||!1,onChange:function(e){return H(S.sideTracks,e.target.checked)}}),label:"Exclude Sidetracks",classes:{label:x.sidetrack}})}),T&&!n(k)&&C(l,{item:!0,xs:2,className:x.gridItem,children:C(D,{selectedValue:O,wellSections:k,onChange:W})})]})]})};T.propTypes={isHidden:i.bool.isRequired,isWDUser:i.bool.isRequired,filterOptions:i.arrayOf(i.shape({})).isRequired,wellSections:i.arrayOf(i.shape({})).isRequired,filters:i.shape({}).isRequired,selectedWellSection:i.string.isRequired,subjectWell:i.shape({}).isRequired,onChangeFilters:i.func.isRequired,onChangeBicWells:i.func.isRequired};export{T as Filter};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"
|
|
1
|
+
import e from"prop-types";import{makeStyles as r}from"@material-ui/core";import{SingleSelect as t}from"./SingleSelect.js";import{jsx as i}from"react/jsx-runtime";var o=r({wellSection:{width:"100%"}}),n=function(e){var r=e.selectedValue,n=e.wellSections,l=e.onChange,a=o();return i(t,{label:"Well Section",currentValue:r,options:n,className:a.wellSection,onChange:function(e){return l(e.target.value)}})};n.propTypes={selectedValue:e.string.isRequired,wellSections:e.arrayOf(e.shape({})).isRequired,onChange:e.func.isRequired};export{n as WellSection};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import r from"@babel/runtime/helpers/slicedToArray";import{useRef as e,useState as t,useEffect as n,createElement as o}from"react";import i from"react-dom";import{get as c}from"lodash";import u from"prop-types";import s from"mapbox.js";import{mapbox as l}from"../../../../utils/index.js";import a from"./MapView.module.css.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"../../utils/apiCalls.js";import"../../effects/useAdvancedWells.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/defineProperty";import"../../constants.js";import"../../../../constants/goals.js";import"../../../../constants/segment.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"@babel/runtime/helpers/typeof";import"moment";import"react-virtualized";import"../../effects/useAssetsData.js";import{usePreviousWells as m}from"../../effects/usePreviousWells.js";import{jsx as d,Fragment as
|
|
1
|
+
import r from"@babel/runtime/helpers/slicedToArray";import{useRef as e,useState as t,useEffect as n,createElement as o}from"react";import i from"react-dom";import{get as c}from"lodash";import u from"prop-types";import s from"mapbox.js";import{mapbox as l}from"../../../../utils/index.js";import a from"./MapView.module.css.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"../../utils/apiCalls.js";import"../../effects/useAdvancedWells.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/defineProperty";import"../../constants.js";import"../../../../constants/goals.js";import"../../../../constants/segment.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"@babel/runtime/helpers/typeof";import"moment";import"react-virtualized";import"../../effects/useAssetsData.js";import{usePreviousWells as m}from"../../effects/usePreviousWells.js";import{jsx as d,Fragment as f}from"react/jsx-runtime";var p=l.isValidCoordinates,v=[29.749907,-95.358421],b=function(u){var l,b=u.isViewOnly,h=u.subjectWell,y=u.wells,j=u.offsetWellIds,C=u.radius,g=u.popUpFormatter,B=u.formationColors,T=u.handleChanageOffsetWell,W=u.activeWellId,F=null==h||null===(l=h.topHole)||void 0===l?void 0:l.coordinates,O=e(),k=e(null),D=e(),E=e(),L=e(),w=e(null),q=t(!1),x=r(q,2),R=x[0],N=x[1],V=e(),P=e(),A=h.id===W,G=m(y);n((function(){O.current||(O.current=s.mapbox.map(k.current,null,{attributionControl:!1,scrollWheelZoom:!1,zoomControl:!1}).setView(v,1),s.control.zoom({position:"bottomright"}).addTo(O.current),s.mapbox.styleLayer("mapbox://styles/mapbox/dark-v9").addTo(O.current))}),[]),n((function(){if(O.current){if(D.current&&(O.current.removeLayer(D.current),D.current=null),E.current&&O.current.removeLayer(E.current),!F)return D.current=null,void(E.current=null);C&&(D.current=s.circle(F,1609.34*C,{stroke:!1,fill:!0,fillOpacity:.2,fillColor:"#03BCD4",className:"circle_500"}),D.current.addTo(O.current))}}),[C,F]);var M=function(r,e,t,n,o,i){o&&r.setStyle({fillColor:"#63EFFF"}),i&&N(!0),w.current=s.circleMarker(e,{radius:i?5:12,stroke:!1,fill:!0,fillOpacity:.24,fillColor:o?"#63EFFF":t,className:"circle_highlight"}),w.current.addEventListener("mouseout",(function(){L.current.removeFrom(O.current),L.current=s.featureGroup(V.current),L.current.addTo(O.current),O.current.closePopup(),o&&r.setStyle({fillColor:"#03BCD4"}),i&&N(!1)})),w.current.addEventListener("click",(function(){b||T(n,!(o&&!i))}));var c=V.current.concat(w.current);L.current.removeFrom(O.current),L.current=s.featureGroup(c),L.current.addTo(O.current)},S=function(r,e,t,n){var u=document.createElement("div"),l=o(g,{isViewOnly:b,well:r,color:c(B,r.formation,"#BDBDBD"),isOffsetWell:e,isSubjectWell:t});i.render(d(f,{children:l}),u),s.popup({offset:[0,t?-15:0]}).setLatLng(n).setContent(u).openOn(O.current)};return n((function(){if(O.current&&y&&j){O.current.closePopup(),L.current&&L.current.removeFrom(O.current);var r=[],e=[],t=[];y.forEach((function(r){r.id!==(null==h?void 0:h.id)&&(j.includes(r.id)?e.push(r):t.push(r))})),[].concat(t,e,[h]).forEach((function(e){var t,n=null==e||null===(t=e.topHole)||void 0===t?void 0:t.coordinates;if(n&&p(n)){var o=(null==h?void 0:h.id)===e.id,i=j.includes(e.id)||o,u=i?"#03BCD4":c(B,e.formation,"#BDBDBD"),l=i?1:.3,a=s.circleMarker(n,{radius:5,stroke:!1,fill:!0,fillOpacity:l,fillColor:u,className:"circle_500"});if(a.addEventListener("mouseover",(function(){S(e,i,o,n),M(a,n,u,e,i,o)})),o&&(P.current=a),r.push(a),e.id===W&&!A){var m=s.circleMarker(n,{radius:12,stroke:!1,fill:!0,fillOpacity:.24,fillColor:u,className:"circle_1200"});r.push(m)}}})),r.length&&(L.current=s.featureGroup(r),L.current.addTo(O.current)),V.current=r,setTimeout((function(){D.current&&D.current.bringToBack(),O.current&&D.current&&y!==G&&O.current.fitBounds(D.current.getBounds(),{padding:[5,5]})}),500)}}),[h,y,j]),n((function(){if(O.current&&F){E.current&&E.current.removeFrom(O.current);var r=s.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"});E.current=s.marker(F,{icon:r}),E.current.addTo(O.current),P.current&&(E.current.addEventListener("mouseover",(function(){S(h,!0,!0,F),M(P.current,F,"#03BCD4",h,!0,!0)})),E.current.addEventListener("mouseout",(function(){L.current.removeFrom(O.current),L.current=s.featureGroup(V.current),L.current.addTo(O.current),O.current.closePopup(),P.current.setStyle({fillColor:"#03BCD4"}),N(!1)})))}}),[R,F,C,h,A]),n((function(){setTimeout((function(){D.current&&D.current.bringToBack(),h?O.current&&D.current&&C&&O.current.fitBounds(D.current.getBounds(),{padding:[5,5]}):O.current&&L.current&&O.current.fitBounds(L.current.getBounds())}),500)}),[C,h]),d("div",{className:a.mapView,children:d("div",{className:a.mapMain,ref:k})})};b.propTypes={isViewOnly:u.bool.isRequired,subjectWell:u.shape({id:u.number,formation:u.string}),wells:u.arrayOf(u.shape({})).isRequired,offsetWellIds:u.arrayOf(u.number).isRequired,radius:u.number.isRequired,formationColors:u.shape({}).isRequired,popUpFormatter:u.func.isRequired,handleChanageOffsetWell:u.func.isRequired,activeWellId:u.number.isRequired},b.defaultProps={subjectWell:null};export{b as MapView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useMemo as e}from"react";import l from"prop-types";import{MapView as r}from"./MapView.js";import{WellTooltip as
|
|
1
|
+
import{useMemo as e}from"react";import l from"prop-types";import{MapView as r}from"./MapView.js";import{WellTooltip as i}from"./WellTooltip.js";import{getAllFormations as s}from"./utils.js";import a from"./WellsMap.module.css.js";import{jsx as o}from"react/jsx-runtime";var t=function(l){var t=l.isViewOnly,n=l.subjectWell,d=l.wells,u=l.offsetWellIds,p=l.radius,f=l.mapHidden,m=l.handleChanageOffsetWell,c=l.activeWellId,W=e((function(){return s(d)}),[d]);return o("div",{className:f?a.mapContainerHidden:a.mapContainer,children:o(r,{isViewOnly:t,subjectWell:n,wells:d,offsetWellIds:u,radius:p,popUpFormatter:i(),formationColors:W,handleChanageOffsetWell:m,activeWellId:c})})};t.propTypes={isViewOnly:l.bool.isRequired,subjectWell:l.shape({}),wells:l.arrayOf(l.shape({})).isRequired,offsetWellIds:l.arrayOf(l.number).isRequired,radius:l.number,mapHidden:l.bool.isRequired,handleChanageOffsetWell:l.func.isRequired,activeWellId:l.number.isRequired},t.defaultProps={subjectWell:null,radius:null};export{t as WellsMap};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import{memo as r,useRef as i,useMemo as o,useEffect as s,useCallback as n}from"react";import p from"classnames";import a from"prop-types";import{Table as l,TableHead as m,TableBody as d,TableRow as c,TableCell as u}from"@material-ui/core";import"../../../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import{jsx as j,jsxs as C,Fragment as f}from"react/jsx-runtime";import"../../../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../../../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../../../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../../../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../../../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../../../ErrorBoundary/ErrorBoundary.js";import"../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import A from"../../../LoadingIndicator/LoadingIndicator.js";import"../../../../constants/segment.js";import"../../../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../../../DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../../../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../../Modal/CorvaModal.js";import"@babel/runtime/helpers/objectWithoutProperties";import"../../../IconMenu/index.js";import"../../../StyledMenuItem/index.js";import"../../../DevCenter/AppHeader/AppHeader.js";import"../../../DevCenter/AppSideBar/AppSideBar.js";import"../../../DevCenter/AppsDataProvider/AppsDataProvider.js";import"lodash";import"../../../Icons/AnnotationIcon.js";import"../../../Annotations/components/AnnotationsList/index.js";import"../../../Annotations/components/LastAnnotation/index.js";import"../../../Annotations/AnnotationsContext.js";import"../../../../utils/mobileDetect.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"../../../../clients/jsonApi/index.js";import"../../../../clients/subscriptions.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"../../../../utils/index.js";import"../../../HelpCenter/HelpCenterIcon.js";import"../../../DevCenter/AppContext.js";import"../../../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../../../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../../../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../../../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"react-router";import"../../../DevCenter/NavigationBar/NavigationBar.js";import"../../../DevCenter/SideBar/SideBar.js";import"../../../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../../../AssetEditor/index.js";import"../../../AppVersionsSelect/AppVersionsSelect.js";import"../../../Typography.js";import"../../../CollapsableSidebar.js";import"../../../DateTimePicker/index.js";import"../../../DatePicker/index.js";import"../../../SlateFormattedText/SlateFormattedText.js";import"../../../SlateFormattedText/RenderElements.js";import"@babel/runtime/helpers/typeof";import"slate";import"../../../ParameterCharts/ParameterCharts.js";import"../../../ParameterCharts/AddEditTrack.js";import"../../../ChartActionsList/ChartActionsList.js";import"../../../CopyToClipboard/CopyToClipboard.js";import"../../../AssetEditor/AssetEditorAutocomplete.js";import"../../../AssetEditor/SingleAssetEditor.js";import"../../../SettingEditors/ColorEditor/index.js";import"../../../SettingEditors/DropdownEditor/index.js";import"../../../SettingEditors/RadioEditor/index.js";import"../../../SwitchControl/index.js";import"../../../ColorPicker/ColorPicker.js";import"../../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../../TruncatedText/index.js";import"../../../RangeSlider/RangeSlider.js";import"../../../Breadcrumbs/index.js";import"../../../VirtualizedTable/index.js";import"../../../EmptyView/EmptyView.js";import"../../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../../Button/index.js";import"../../../ContextMenuItem/index.js";import"../../../FolderMenuItem/index.js";import"../../../EditableItem/EditableItem/index.js";import"../../../EditableItem/EditableItemWithBadge/index.js";import"../../../Checkbox/index.js";import"../../../FolderMenuItemWithLinks/index.js";import"../../../IconButton/index.js";import"../../../TextField/index.js";import"../../../Chip/index.js";import"../../../Counter/index.js";import"../../../AnchorsList/AnchorsList.js";import"../../../Select/index.js";import"../../../CustomSelect/index.js";import"../../../Tabs/Tabs.js";import"../../../Tabs/Tab.js";import"../../../ResizableTable/ResizableTable.js";import"../../../Drillstring/BHASchematic.js";import"../../../Drillstring/BHATable/index.js";import"../../../Drillstring/BHAComponentIcon.js";import"../../../Drillstring/BHAComponentDetail/index.js";import"../../../Drillstring/BHATileIcon.js";import"../../../Drillstring/BHATile/BHATile.js";import"../../../Drillstring/BHAList/BHAList.js";import"../../../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../../../Casing/CasingTable/index.js";import"../../../Casing/CasingComponentIcon.js";import"../../../Casing/CasingTileIcon.js";import"../../../Casing/CasingTableV2/CasingTableV2.js";import"../../../Casing/CasingTile/CasingTile.js";import"../../../DisabledSettingsMessage/DisabledSettingsMessage.js";import"../../../WellSummary/WellSummaryItemLabel.js";import"../../../WellSummary/WellSummaryItemTitle.js";import"../../../WellSummary/WellSummaryItemValue.js";import"../../../WellSummary/ActivitySummaryChart.js";import"../../../WellSummary/FracWirelineTimeChart.js";import"../../../BICOffsetPickerDialog/index.js";import"../../../OffsetWellButton/OffsetWellButton.js";import"../../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../../OffsetWellPickerV3/index.js";import"../../../OffsetWellChips/Chip.js";import"../../../OffsetWellChips/ChipsContainer.js";import"../../OffsetWellPickerV4.js";import"../../../Notifications/Notifications.js";import"@babel/runtime/helpers/toConsumableArray";import"uuid";import"../../../ConfirmationDialog.js";import"../../../TextLink/index.js";import"../../../Avatar/index.js";import"../../../Template/TemplatePopover/index.js";import"../../../MenuItem/index.js";import"../../../PadModeSelect/PadModeSelect.js";import"../../../PinnableFilters/PinnableFilters.js";import"../../../HeaderLayout/HeaderLayout.js";import"../../../PadOffsetsPicker/PadOffsetsPicker.js";import"../../../PadOffsetsPicker/OffsetAssetChip.js";import"../../../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../../../PadOffsetsPicker/StagesSelector.js";import"../../../Table/TableToolbar/TableToolbar.js";import"../../../Tooltip/MuiTooltipDcWrapper.js";import"../../../PriceInput/PriceInput.js";import"../../../LabelsCounter/LabelsCounter.js";import"../../../Stepper/Step.js";import"../../../Stepper/StepsWrapper.js";import"../../../Stepper/Stepper.js";import"../../../Comment/CommentIcon/index.js";import"../../../FilesLoader/FilesLoader.js";import"../../../FilesLoader/Icons/FileIcon.js";import"../../../SearchInput/index.js";import"../../../FeedItem/FeedItem.js";import"../../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../../../PostInput/PostInput.js";import"../../../KeyboardDateTimePicker.js";import"../../../AddComment/Popover.js";import"../../../AddComment/Popup.js";import"../../../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../../../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../../../StageDesignVActual/ComparisonHeader.js";import"../../../StageDesignVActual/ComparisonRow.js";import"../../../EmbeddedApp/DevCenterEmbeddedApp.js";import"../../../EmbeddedApp/EmbeddedApp.js";import"../../../Autocomplete/Autocomplete.js";import"../../../DocumentViewer/DocumentViewer.js";import"../../../ColorPickerPalette/ColorPickerPalette.js";import"../../../Search/Search.js";import"../../../Search/components/Listbox.js";import"../../../Search/components/Paper.js";import"../../../Search/components/RecentSearches.js";import"../../../Search/components/InputAdornmentLeft.js";import"../../../Search/components/Groups.js";import{AdvancedSearch as h}from"./AdvancedSearch/AdvancedSearch.js";import b from"./OffsetWellsTableHead.js";import D from"./OffsetWellsTableRow.js";import{METRICS_LIST as v,EXPANED_WELLNAME_WIDTH as g,TableColumns as S,ROW_HEIGHT as y}from"../../constants.js";import x from"./OffsetWellsTable.module.css.js";import{getIsImperial as P}from"../../utils/unitSystem.js";var I=function(r){var a=r.open,I=r.isTableLoading,T=r.companyId,E=r.subjectWellId,W=r.sortBy,R=r.setSortBy,w=r.sortDirection,O=r.setSortDirection,B=r.columnsWithDict,L=r.wells,k=r.metricsKeys,H=r.setMetricsKeys,q=r.handleChanageOffsetWell,V=r.handleChangeAllOffsetWells,F=r.handleAddRemoveAssets,N=r.isWellNameExpand,M=r.setIsWellNameExpand,K=r.isHscrollMoved,z=r.onHideAdvancedSearch,U=r.isViewOnly,G=r.isLastWell,J=r.contentRef,Q=r.isHintPopperOpen,X=r.setIsHintPopperOpen,Y=r.isLimitedOffsetwells,Z=r.tableTop,$=i(),_=i(),ee=o((function(){var e=L.filter((function(e){return e.checked}));return[e,L.length!==e.length&&e.length&&!Y,e.length===L.length||Y]}),[L,Y]),te=t(ee,3),re=te[0],ie=te[1],oe=te[2],se=o((function(){return P()}),[]),ne=o((function(){return(k||[]).reduce((function(e,t){return e.concat(v.filter((function(e){return e.key===t})))}),[])}),[k]),pe=o((function(){return N?g-58:S[0].width[k.length]-58}),[N,null==k?void 0:k.length]),ae=o((function(){return re.length*y}),[re]);s((function(){var e=$.current.querySelector(".".concat(x.wellNameFixed));K?e.classList.remove(x.noShadow):e.classList.add(x.noShadow);var t=_.current.querySelectorAll(".".concat(x.wellNameFixed));K?t.forEach((function(e){return e.classList.remove(x.noShadow)})):t.forEach((function(e){return e.classList.add(x.noShadow)}))}),[K,_.current,$.current,L]);var le=n((function(e,t){R(e),O(t)}),[]),me=n((function(e){H(e)}),[]),de=n((function(e,t){H((function(r){return r.map((function(r){return r===e?t:r}))}))}),[]);return I?j(A,{fullscreen:!1}):B&&L?C(f,{children:[j("div",{className:x.stickyTable,children:C(l,{"aria-label":"ows table head",innerRef:$,children:[j(m,{children:j(b,{open:a,columnsWithDict:B,metricsKeys:k,sortBy:W,sortDirection:w,indeterminate:ie,isAllWellsSelected:oe,onChangeSort:le,onChangeMetricsKeys:me,onUpdateMetricsKey:de,isWellNameExpand:N,setIsWellNameExpand:M,handleChangeAllOffsetWells:V,wellNameStyle:x.wellNameFixed,isViewOnly:U,isImperial:se,contentRef:J,isHintPopperOpen:Q,setIsHintPopperOpen:X})}),!U&&j(d,{children:j(c,{children:j(u,{className:x.searchCell,children:j(h,{companyId:T,wells:L,onChange:F,selectedWellIds:re.map((function(e){return e.id})),onHideAdvancedSearch:z})})})})]})}),j(l,{"aria-label":"ows table body",innerRef:_,className:x.bodyTable,children:C(d,{children:[j(c,{children:j(u,{className:p(x.topShadow,e({},x.viewOnlyShadow,U))})}),L.map((function(e){return j(D,{columnsWithDict:B,subjectWellId:E,data:e,metricsKeys:k,metricsColumns:ne,handleChanageOffsetWell:q,isWellNameExpand:N,wellNameStyle:x.wellNameFixed,wellNameWidth:pe,isViewOnly:U,isImperial:se,isLimitedOffsetwells:Y,flyTo:ae,tableTop:Z},e.id)})),!G&&j(c,{children:j(u,{className:x.loadingCell,children:j("span",{children:"Loading..."})})}),j(c,{children:j(u,{className:x.bottomShadow})})]})})]}):null};I.propTypes={open:a.bool.isRequired,isTableLoading:a.bool.isRequired,companyId:a.number.isRequired,subjectWellId:a.number.isRequired,sortBy:a.string.isRequired,setSortBy:a.func.isRequired,sortDirection:a.string.isRequired,setSortDirection:a.func.isRequired,columnsWithDict:a.arrayOf(a.shape({})).isRequired,wells:a.arrayOf(a.shape({})).isRequired,metricsKeys:a.arrayOf(a.string).isRequired,setMetricsKeys:a.func.isRequired,handleChanageOffsetWell:a.func.isRequired,handleChangeAllOffsetWells:a.func.isRequired,handleAddRemoveAssets:a.func.isRequired,setIsWellNameExpand:a.func.isRequired,isWellNameExpand:a.bool.isRequired,isHscrollMoved:a.bool.isRequired,onHideAdvancedSearch:a.func.isRequired,isViewOnly:a.bool.isRequired,isLastWell:a.bool.isRequired,isHintPopperOpen:a.bool.isRequired,setIsHintPopperOpen:a.func.isRequired,isLimitedOffsetwells:a.bool.isRequired,contentRef:a.shape().isRequired,tableTop:a.number.isRequired};var T=r(I);export{T as default};
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import{memo as r,useRef as i,useMemo as o,useEffect as s,useCallback as n}from"react";import p from"classnames";import a from"prop-types";import{Table as l,TableHead as m,TableBody as d,TableRow as c,TableCell as u}from"@material-ui/core";import"../../../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import{jsx as j,jsxs as C,Fragment as f}from"react/jsx-runtime";import"../../../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../../../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../../../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../../../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../../../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../../../ErrorBoundary/ErrorBoundary.js";import"../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import A from"../../../LoadingIndicator/LoadingIndicator.js";import"../../../../constants/segment.js";import"../../../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../../../DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../../../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../../Modal/CorvaModal.js";import"@babel/runtime/helpers/objectWithoutProperties";import"../../../IconMenu/index.js";import"../../../StyledMenuItem/index.js";import"../../../DevCenter/AppHeader/AppHeader.js";import"../../../DevCenter/AppSideBar/AppSideBar.js";import"../../../DevCenter/AppsDataProvider/AppsDataProvider.js";import"lodash";import"../../../Icons/AnnotationIcon.js";import"../../../Annotations/components/AnnotationsList/index.js";import"../../../Annotations/components/LastAnnotation/index.js";import"../../../Annotations/AnnotationsContext.js";import"../../../../utils/mobileDetect.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"../../../../clients/jsonApi/index.js";import"../../../../clients/subscriptions.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"../../../../utils/index.js";import"../../../HelpCenter/HelpCenterIcon.js";import"../../../DevCenter/AppContext.js";import"../../../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../../../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../../../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../../../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"react-router";import"../../../DevCenter/NavigationBar/NavigationBar.js";import"../../../DevCenter/SideBar/SideBar.js";import"../../../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../../../AssetEditor/index.js";import"../../../AppVersionsSelect/AppVersionsSelect.js";import"../../../Typography.js";import"../../../CollapsableSidebar.js";import"../../../DateTimePicker/index.js";import"../../../DatePicker/index.js";import"../../../SlateFormattedText/SlateFormattedText.js";import"../../../SlateFormattedText/RenderElements.js";import"@babel/runtime/helpers/typeof";import"slate";import"../../../ParameterCharts/ParameterCharts.js";import"../../../ParameterCharts/AddEditTrack.js";import"../../../ChartActionsList/ChartActionsList.js";import"../../../CopyToClipboard/CopyToClipboard.js";import"../../../AssetEditor/AssetEditorAutocomplete.js";import"../../../AssetEditor/SingleAssetEditor.js";import"../../../SettingEditors/ColorEditor/index.js";import"../../../SettingEditors/DropdownEditor/index.js";import"../../../SettingEditors/RadioEditor/index.js";import"../../../SwitchControl/index.js";import"../../../ColorPicker/ColorPicker.js";import"../../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../../TruncatedText/index.js";import"../../../RangeSlider/RangeSlider.js";import"../../../Breadcrumbs/index.js";import"../../../VirtualizedTable/index.js";import"../../../EmptyView/EmptyView.js";import"../../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../../Button/index.js";import"../../../ContextMenuItem/index.js";import"../../../FolderMenuItem/index.js";import"../../../EditableItem/EditableItem/index.js";import"../../../EditableItem/EditableItemWithBadge/index.js";import"../../../Checkbox/index.js";import"../../../FolderMenuItemWithLinks/index.js";import"../../../IconButton/index.js";import"../../../TextField/index.js";import"../../../Chip/index.js";import"../../../Counter/index.js";import"../../../AnchorsList/AnchorsList.js";import"../../../Select/index.js";import"../../../CustomSelect/index.js";import"../../../Tabs/Tabs.js";import"../../../Tabs/Tab.js";import"../../../ResizableTable/ResizableTable.js";import"../../../Drillstring/BHASchematic.js";import"../../../Drillstring/BHATable/index.js";import"../../../Drillstring/BHAComponentIcon.js";import"../../../Drillstring/BHAComponentDetail/index.js";import"../../../Drillstring/BHATileIcon.js";import"../../../Drillstring/BHATile/BHATile.js";import"../../../Drillstring/BHAList/BHAList.js";import"../../../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../../../Casing/CasingTable/index.js";import"../../../Casing/CasingComponentIcon.js";import"../../../Casing/CasingTileIcon.js";import"../../../Casing/CasingTableV2/CasingTableV2.js";import"../../../Casing/CasingTile/CasingTile.js";import"../../../DisabledSettingsMessage/DisabledSettingsMessage.js";import"../../../WellSummary/WellSummaryItemLabel.js";import"../../../WellSummary/WellSummaryItemTitle.js";import"../../../WellSummary/WellSummaryItemValue.js";import"../../../WellSummary/ActivitySummaryChart.js";import"../../../WellSummary/FracWirelineTimeChart.js";import"../../../BICOffsetPickerDialog/index.js";import"../../../OffsetWellButton/OffsetWellButton.js";import"../../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../../OffsetWellPickerV3/index.js";import"../../../OffsetWellChips/Chip.js";import"../../../OffsetWellChips/ChipsContainer.js";import"../../OffsetWellPickerV4.js";import"../../../Notifications/Notifications.js";import"@babel/runtime/helpers/toConsumableArray";import"uuid";import"../../../ConfirmationDialog.js";import"../../../TextLink/index.js";import"../../../Avatar/index.js";import"../../../Template/TemplatePopover/index.js";import"../../../MenuItem/index.js";import"../../../PadModeSelect/PadModeSelect.js";import"../../../PinnableFilters/PinnableFilters.js";import"../../../HeaderLayout/HeaderLayout.js";import"../../../PadOffsetsPicker/PadOffsetsPicker.js";import"../../../PadOffsetsPicker/OffsetAssetChip.js";import"../../../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../../../PadOffsetsPicker/StagesSelector.js";import"../../../Table/TableToolbar/TableToolbar.js";import"../../../Tooltip/MuiTooltipDcWrapper.js";import"../../../PriceInput/PriceInput.js";import"../../../LabelsCounter/LabelsCounter.js";import"../../../Stepper/Step.js";import"../../../Stepper/StepsWrapper.js";import"../../../Stepper/Stepper.js";import"../../../Comment/CommentIcon/index.js";import"../../../FilesLoader/FilesLoader.js";import"../../../FilesLoader/Icons/FileIcon.js";import"../../../SearchInput/index.js";import"../../../FeedItem/FeedItem.js";import"../../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../../../PostInput/PostInput.js";import"../../../KeyboardDateTimePicker.js";import"../../../AddComment/Popover.js";import"../../../AddComment/Popup.js";import"../../../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../../../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../../../StageDesignVActual/ComparisonHeader.js";import"../../../StageDesignVActual/ComparisonRow.js";import"../../../EmbeddedApp/DevCenterEmbeddedApp.js";import"../../../EmbeddedApp/EmbeddedApp.js";import"../../../Autocomplete/Autocomplete.js";import"../../../DocumentViewer/DocumentViewer.js";import"../../../ColorPickerPalette/ColorPickerPalette.js";import"../../../Search/Search.js";import"../../../Search/components/Listbox.js";import"../../../Search/components/Paper.js";import"../../../Search/components/RecentSearches.js";import"../../../Search/components/InputAdornmentLeft.js";import"../../../Search/components/Groups.js";import{AdvancedSearch as h}from"./AdvancedSearch/AdvancedSearch.js";import v from"./OffsetWellsTableHead.js";import D from"./OffsetWellsTableRow.js";import{METRICS_LIST as b,EXPANED_WELLNAME_WIDTH as S,TableColumns as g,ROW_HEIGHT as y}from"../../constants.js";import x from"./OffsetWellsTable.module.css.js";import{getIsImperial as I}from"../../utils/unitSystem.js";var P=function(r){var a=r.open,P=r.isTableLoading,T=r.companyId,W=r.subjectWellId,E=r.sortBy,w=r.setSortBy,R=r.sortDirection,B=r.setSortDirection,L=r.columnsWithDict,O=r.wells,k=r.metricsKeys,q=r.setMetricsKeys,V=r.handleChanageOffsetWell,F=r.handleChangeAllOffsetWells,N=r.handleAddRemoveAssets,M=r.isWellNameExpand,H=r.setIsWellNameExpand,K=r.isHscrollMoved,z=r.onHideAdvancedSearch,U=r.isViewOnly,G=r.isLastWell,J=r.contentRef,Q=r.isLimitedOffsetwells,X=r.tableTop,Y=r.wellSections,Z=r.setActiveWellId,$=i(),_=i(),ee=o((function(){var e=O.filter((function(e){return e.checked}));return[e,O.length!==e.length&&e.length&&!Q,e.length===O.length||Q]}),[O,Q]),te=t(ee,3),re=te[0],ie=te[1],oe=te[2],se=o((function(){return I()}),[]),ne=o((function(){return(k||[]).reduce((function(e,t){return e.concat(b.filter((function(e){return e.key===t})))}),[])}),[k]),pe=o((function(){return M?S-58:g[0].width[k.length]-58}),[M,null==k?void 0:k.length]),ae=o((function(){return re.length*y}),[re]);s((function(){var e=$.current.querySelector(".".concat(x.wellNameFixed));K?e.classList.remove(x.noShadow):e.classList.add(x.noShadow);var t=_.current.querySelectorAll(".".concat(x.wellNameFixed));K?t.forEach((function(e){return e.classList.remove(x.noShadow)})):t.forEach((function(e){return e.classList.add(x.noShadow)}))}),[K,_.current,$.current,O]);var le=n((function(e,t){w(e),B(t)}),[]),me=n((function(e){q(e)}),[]),de=n((function(e,t){q((function(r){return r.map((function(r){return r===e?t:r}))}))}),[]);return P?j(A,{fullscreen:!1}):L&&O?C(f,{children:[j("div",{className:x.stickyTable,children:C(l,{"aria-label":"ows table head",innerRef:$,children:[j(m,{children:j(v,{open:a,columnsWithDict:L,metricsKeys:k,sortBy:E,sortDirection:R,indeterminate:ie,isAllWellsSelected:oe,onChangeSort:le,onChangeMetricsKeys:me,onUpdateMetricsKey:de,isWellNameExpand:M,setIsWellNameExpand:H,handleChangeAllOffsetWells:F,wellNameStyle:x.wellNameFixed,isViewOnly:U,isImperial:se,contentRef:J})}),!U&&j(d,{children:j(c,{children:j(u,{className:x.searchCell,children:j(h,{companyId:T,wells:O,onChange:N,selectedWellIds:re.map((function(e){return e.id})),onHideAdvancedSearch:z})})})})]})}),j(l,{"aria-label":"ows table body",innerRef:_,className:x.bodyTable,children:C(d,{children:[j(c,{children:j(u,{className:p(x.topShadow,e({},x.viewOnlyShadow,U))})}),O.map((function(e){return j(D,{columnsWithDict:L,subjectWellId:W,data:e,metricsKeys:k,metricsColumns:ne,handleChanageOffsetWell:V,isWellNameExpand:M,wellNameStyle:x.wellNameFixed,wellNameWidth:pe,isViewOnly:U,isImperial:se,isLimitedOffsetwells:Q,flyTo:ae,tableTop:X,wellSections:Y,setActiveWellId:Z},e.id)})),!G&&j(c,{children:j(u,{className:x.loadingCell,children:j("span",{children:"Loading..."})})}),j(c,{children:j(u,{className:x.bottomShadow})})]})})]}):null};P.propTypes={open:a.bool.isRequired,isTableLoading:a.bool.isRequired,companyId:a.number.isRequired,subjectWellId:a.number.isRequired,sortBy:a.string.isRequired,setSortBy:a.func.isRequired,sortDirection:a.string.isRequired,setSortDirection:a.func.isRequired,columnsWithDict:a.arrayOf(a.shape({})).isRequired,wells:a.arrayOf(a.shape({})).isRequired,metricsKeys:a.arrayOf(a.string).isRequired,setMetricsKeys:a.func.isRequired,handleChanageOffsetWell:a.func.isRequired,handleChangeAllOffsetWells:a.func.isRequired,handleAddRemoveAssets:a.func.isRequired,setIsWellNameExpand:a.func.isRequired,isWellNameExpand:a.bool.isRequired,isHscrollMoved:a.bool.isRequired,onHideAdvancedSearch:a.func.isRequired,isViewOnly:a.bool.isRequired,isLastWell:a.bool.isRequired,isLimitedOffsetwells:a.bool.isRequired,contentRef:a.shape().isRequired,tableTop:a.number.isRequired,wellSections:a.arrayOf(a.shape({})).isRequired,setActiveWellId:a.func.isRequired};var T=r(P);export{T as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/objectWithoutProperties";import{memo as i,useState as n}from"react";import l from"classnames";import s from"prop-types";import{SortDirection as a}from"react-virtualized";import{
|
|
1
|
+
import e from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/objectWithoutProperties";import{memo as i,useState as n}from"react";import l from"classnames";import s from"prop-types";import{SortDirection as a}from"react-virtualized";import{TableRow as c,TableCell as o,Checkbox as d,Tooltip as m,TableSortLabel as u}from"@material-ui/core";import{ArrowForwardIos as p}from"@material-ui/icons";import{MetricsSettingMenu as h}from"./MetricsSettingMenu.js";import{MetricsSelect as f}from"./MetricsSelect.js";import{EXPANED_WELLNAME_WIDTH as y,ColumnType as b}from"../../constants.js";import C from"./OffsetWellsTableHead.module.css.js";import{jsxs as g,jsx as v}from"react/jsx-runtime";var O=["title"];function S(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function w(e){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?S(Object(i),!0).forEach((function(r){t(e,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):S(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var N=function(e){var t=e.title,i=r(e,O);return v(m,{placement:"top-end",title:t,children:v(u,w({},i))})};function R(e,t){var r=e.find((function(e){return e.key===t}));return(null==r?void 0:r.width)||0}var q=function(r){var i=r.open,s=r.columnsWithDict,u=r.metricsKeys,O=r.sortBy,S=r.sortDirection,w=r.indeterminate,q=r.isAllWellsSelected,W=r.onChangeSort,j=r.onChangeMetricsKeys,D=r.onUpdateMetricsKey,E=r.isWellNameExpand,k=r.setIsWellNameExpand,A=r.handleChangeAllOffsetWells,P=r.wellNameStyle,x=r.isViewOnly,L=r.isImperial,M=r.contentRef,K=n(!1),I=e(K,2),T=I[0],V=I[1],z=function(e){W(e,e===O&&S===a.ASC?a.DESC:a.ASC)};return g(c,{className:C.tableRow,children:[v(o,{className:l(C.headCell,C.wellNameCell,P),style:{width:E?y:R(s,b.name)},children:g("div",{className:C.nameWrapper,children:[!x&&i&&v(d,{size:"medium",onChange:function(e){return A(e.target.checked)},checked:q,indeterminate:w}),v(N,{title:"Sort",active:O===b.name,direction:O===b.name&&S===a.DESC?"desc":"asc",classes:{root:l(C.headerLabel,t({},C.cellDataViewOnly,x))},onClick:function(){return z(b.name)},children:"Well Name"})]})}),v(o,{className:C.headCell,style:{width:R(s,b.status)},children:v(m,{title:E?"Collapse":"Expand",children:v(p,{className:l(C.wellNameExpandIcon,t({},C.wellNameCollapsed,!E)),onClick:function(){return k(!E)}})})}),v(o,{className:C.headCell,style:{width:R(s,b.rig)},children:v("div",{className:C.nameWrapper,children:v(N,{title:"Sort",active:O===b.rig,direction:O===b.rig&&S===a.DESC?"desc":"asc",classes:{root:C.headerLabel},onClick:function(){return z(b.rig)},children:"Rig"})})}),v(o,{className:C.headCell,style:{width:R(s,b.distance)},children:v("div",{className:C.nameWrapper,children:v(N,{title:"Sort",active:O===b.distance,direction:O===b.distance&&S===a.DESC?"desc":"asc",classes:{root:C.headerLabel},onClick:function(){return z(b.distance)},children:"Distance (".concat(L?"miles":"km",")")})})}),v(o,{className:C.headCell,style:{width:R(s,b.lastActive)},children:v("div",{className:C.nameWrapper,children:v(N,{title:"Sort",active:O===b.lastActive,direction:O===b.lastActive&&S===a.DESC?"desc":"asc",classes:{root:C.headerLabel},onClick:function(){return z(b.lastActive)},children:"Last Active"})})}),u.map((function(e){return v(o,{className:C.headCell,style:{width:R(s,e)},children:v(N,{title:T?"":"Sort",active:O===e,direction:O===e&&S===a.DESC?"desc":"asc",classes:{root:C.headerLabel},onClick:function(){return z(e)},children:v(f,{isTooltipVisible:u.length>1,currentValue:e,onChange:function(t){return D(e,t)},setIsMenuOpen:V})})},e)})),v(o,{className:C.headCell,style:{width:R(s,b.wellSection)},children:g("div",{className:C.settingsHeader,children:[v("span",{className:C.headerLabel,children:"Well Section"}),v(h,{metricsKeys:u,onChange:j,contentRef:M})]})})]})};q.propTypes={open:s.bool.isRequired,columnsWithDict:s.arrayOf(s.shape({key:s.string,label:s.string,type:s.string,width:s.number})).isRequired,metricsKeys:s.arrayOf(s.string).isRequired,sortBy:s.string.isRequired,sortDirection:s.string.isRequired,indeterminate:s.bool.isRequired,isAllWellsSelected:s.bool.isRequired,style:s.shape({}).isRequired,onChangeSort:s.func.isRequired,onChangeMetricsKeys:s.func.isRequired,onUpdateMetricsKey:s.func.isRequired,isWellNameExpand:s.bool.isRequired,setIsWellNameExpand:s.func.isRequired,handleChangeAllOffsetWells:s.func.isRequired,wellNameStyle:s.string.isRequired,isViewOnly:s.bool.isRequired,isImperial:s.bool.isRequired,contentRef:s.shape({current:s.instanceOf(Element)}).isRequired};var W=i(q);export{W as default};
|
|
@@ -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,useRef as i,useState as r,useCallback as n,useEffect as s,useMemo as a}from"react";import o from"prop-types";import{startCase as c,get as u}from"lodash";import d from"classnames";import m from"moment";import{TableRow as f,TableCell as h,Checkbox as y,Tooltip as p,Typography as b}from"@material-ui/core";import{convertValue as v}from"../../../../utils/index.js";import{ColumnType as N,EXPANED_WELLNAME_WIDTH as w,StatusOptions as g,ROW_HEIGHT as R}from"../../constants.js";import{SubjectWellMark as W}from"./SubjectWellMark.js";import C from"./OffsetWellsTableRow.module.css.js";import q from"./ViewWellSectionsName.js";import{jsxs as T,jsx as k}from"react/jsx-runtime";function O(e,t,l){var i=t.find((function(e){return e.key===l})),r=u(e,i.key);return"undefined"===r?"loading...":Number.isFinite(r)||r?i.unitType?v(r,i.unitType,i.from,i.to):r:"—"}function j(e,t){var l=u(e,N.distance);return Number.isFinite(l)?t?l:v(l,"length","mi","km"):"—"}function x(e,t){var l=e.find((function(e){return e.key===t}));return(null==l?void 0:l.width)||0}var S=function(l){var o,u,v=l.columnsWithDict,S=l.data,D=l.subjectWellId,M=l.metricsKeys,I=l.metricsColumns,A=l.handleChanageOffsetWell,L=l.isWellNameExpand,Y=l.wellNameStyle,z=l.wellNameWidth,E=l.isViewOnly,V=l.isImperial,F=l.isLimitedOffsetwells,K=l.flyTo,P=l.tableTop,H=l.wellSections,B=l.setActiveWellId,G=D===S.id,J=t({},C.subjectWellRow,G),Q=i(),U=i(),X=r(!1),Z=e(X,2),$=Z[0],_=Z[1],ee=i(),te=!1,le=S[N.name]||"—",ie=le;if(!L&&2*z<8*le.length){var re=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.innerHTML=e;var l=Math.ceil(t.clientWidth);return document.body.removeChild(t),l}(le);if(re>2*z){var ne=2*z/(re/le.length);ie="".concat(le.substring(0,ne/2-2),"\n... ").concat(le.substring(le.length-ne/2+6)),te=!0}}var se=n((function(e,t){var l=t-e+16;Q.current.style.position="absolute",Q.current.style.top="".concat(e,"px"),Q.current.style.zIndex=3,Q.current.style.transition="transform ".concat(800,"ms ease"),Q.current.style.transform="translateY(".concat(l,"px)")}),[]),ae=n((function(){Q.current.style.position="unset",Q.current.style.zIndex=1,Q.current.style.transition="none",Q.current.style.transform="none"}),[]);s((function(){ae(),_(!1),U.current&&(clearTimeout(U.current),U.current=null),ee.current=K}),[K]);var oe,ce,ue=n((function(e){if(!U.current){var t=Q.current.offsetTop,l=K;e?Math.abs(l-t)>=7*R&&(l=t-7*R):l=t+7*R,_(!0),se(t,l),U.current=setTimeout((function(){return A(S,e)}),800)}}),[S,K,P]),de=a((function(){return S[N.wellSection]}),[S]);return T(f,{className:C.bodyRow,innerRef:Q,onMouseEnter:function(){B(S.id)},onMouseLeave:function(){B(null)},children:[T(h,{className:d(C.bodyCell,C.wellNameCell,Y,J),style:{width:L?w:x(v,N.name)},children:[G&&k(W,{className:C.subjectWellMark}),!G&&k(y,{size:"medium",checked:$&&ee.current===K?!S.checked:S.checked,disabled:E||F&&!S.checked,onChange:function(e){return ue(e.target.checked)}}),k(p,{title:te?le:"",children:k(b,{variant:"body2",className:d(C.wellNameCursor,(o={},t(o,C.cellDataViewOnly,G),t(o,C.wellNamePreWrap,te),o)),children:te?ie:le})})]}),k(h,{className:d(C.bodyCell,J),style:{width:x(v,N.status)},children:!G&&k(p,{title:c(S[N.status]),children:k("div",{className:C.status,style:{background:null===(u=g.find((function(e){return e.value===S[N.status]})))||void 0===u?void 0:u.color}})})}),k(h,{className:d(C.bodyCell,J),style:{width:x(v,N.rig)},children:k(b,{variant:"body2",className:C.cellData,children:S[N.rig]&&"Null"!==S[N.rig]?S[N.rig]:"—"})}),k(h,{className:d(C.bodyCell,J),style:{width:x(v,N.distance)},children:k(b,{variant:"body2",className:C.cellData,children:j(S,V)})}),k(h,{className:d(C.bodyCell,J),style:{width:x(v,N.lastActive)},children:k(b,{variant:"body2",className:C.cellData,children:S[N.lastActive]&&Number.isFinite(S[N.lastActive])?m.unix(S[N.lastActive]).format("MM/DD/YYYY"):"—"})}),M.map((function(e){return k(h,{className:d(C.bodyCell,J),style:{width:x(v,e)},children:k(b,{variant:"body2",className:C.cellData,children:O(S,I,e)})},e)})),k(h,{className:d(C.bodyCell,C.lastCell,J),style:{width:x(v,N.wellSection)},children:de&&de.length>1?k(p,{classes:{tooltip:C.customTooltip},title:k(q,{wellSectionNames:de}),children:k("div",{className:C.sectionLength,children:de.length})}):k(p,{title:de||"",children:k(b,{variant:"body2",className:C.cellData,style:{color:de&&1===de.length&&(oe=de,ce=e(oe,1)[0],H.find((function(e){return e.label===ce})).color)},children:de})})})]})};S.propTypes={columnsWithDict:o.arrayOf(o.shape({})).isRequired,data:o.shape({id:o.number,checked:o.bool,name:o.string,status:o.string}).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,flyTo:o.number.isRequired,tableTop:o.number.isRequired,wellSections:o.arrayOf(o.shape({})).isRequired,setActiveWellId:o.func.isRequired};var D=l(S);export{D 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",subjectWellRow:"OffsetWellsTableRow-module_subjectWellRow__x60wK",subjectWellMark:"OffsetWellsTableRow-module_subjectWellMark__S-nvA",bodyCell:"OffsetWellsTableRow-module_bodyCell__B-yWv",cellData:"OffsetWellsTableRow-module_cellData__SNLYB",cellDataViewOnly:"OffsetWellsTableRow-module_cellDataViewOnly__2Fd-1",hoverCell:"OffsetWellsTableRow-module_hoverCell__4wFuk",wellNameCell:"OffsetWellsTableRow-module_wellNameCell__BBEf-",lastCell:"OffsetWellsTableRow-module_lastCell__VEQCi",subjectWellImage:"OffsetWellsTableRow-module_subjectWellImage__IkmRP",status:"OffsetWellsTableRow-module_status__qWj9c",customTooltip:"OffsetWellsTableRow-module_customTooltip__aeWUJ",wellNameCursor:"OffsetWellsTableRow-module_wellNameCursor__BlXVa",wellNamePreWrap:"OffsetWellsTableRow-module_wellNamePreWrap__oXXEB"};e(".OffsetWellsTableRow-module_bodyRow__UqDEw{display:flex!important;flex-direction:row!important;margin-bottom:4px!important}.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_bodyCell__B-yWv{align-items:center!important;
|
|
1
|
+
import e from'./../../../../ext-esm/style-inject/dist/style-inject.es.js';var l={bodyRow:"OffsetWellsTableRow-module_bodyRow__UqDEw",subjectWellRow:"OffsetWellsTableRow-module_subjectWellRow__x60wK",subjectWellMark:"OffsetWellsTableRow-module_subjectWellMark__S-nvA",bodyCell:"OffsetWellsTableRow-module_bodyCell__B-yWv",cellData:"OffsetWellsTableRow-module_cellData__SNLYB",cellDataViewOnly:"OffsetWellsTableRow-module_cellDataViewOnly__2Fd-1",hoverCell:"OffsetWellsTableRow-module_hoverCell__4wFuk",wellNameCell:"OffsetWellsTableRow-module_wellNameCell__BBEf-",lastCell:"OffsetWellsTableRow-module_lastCell__VEQCi",subjectWellImage:"OffsetWellsTableRow-module_subjectWellImage__IkmRP",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"};e(".OffsetWellsTableRow-module_bodyRow__UqDEw{background:var(--palette-background-b-8);display:flex!important;flex-direction:row!important;margin-bottom:4px!important}.OffsetWellsTableRow-module_bodyRow__UqDEw:hover{background:rgba(51,51,51,.6)}.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_bodyCell__B-yWv{align-items:center!important;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_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_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;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}");export{l as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"prop-types";import{isEmpty as i}from"lodash";import{makeStyles as n,Typography as a}from"@material-ui/core";import{jsxs as t,jsx as r}from"react/jsx-runtime";var o=n({mainContainer:{padding:"8px"},title:{fontSize:"12px",lineHeight:"16px",marginBottom:"8px"},sectionNameContainer:{display:"flex",flexDirection:"column",gap:"4px"},sectionName:{display:"flex",gap:"8px",alignItems:"center"}}),l=function(e){var n=e.wellSectionNames,l=o();return i(n)?null:t("div",{className:l.mainContainer,children:[r("div",{className:l.title,children:"Best in Well Sections: "}),r("div",{className:l.sectionNameContainer,children:n.map((function(e){return r("div",{className:l.sectionName,children:r(a,{variant:"body2",children:e})})}))})]})};l.propTypes={wellSectionNames:e.arrayOf(e.string).isRequired};export{l as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import{sortBy as t}from"lodash";import"../../utils/index.js";import*as a from"../../utils/metrics/metricsConfig.js";var l="all",i="All",r=
|
|
1
|
+
import e from"@babel/runtime/helpers/toConsumableArray";import{sortBy as t}from"lodash";import"../../utils/index.js";import*as a from"../../utils/metrics/metricsConfig.js";var l="all",i="All",r=450,o=50,s=60,n=a,p={status:"status",rig:"rigName",program:"programName",basin:"basin",county:"county",area:"area",formation:"formation",stringDesign:"stringDesign",radius:"radius",period:"period",sideTracks:"sideTracks",timeRangeFrom:"timeRangeFrom",timeRangeTo:"timeRangeTo"},_=[{value:p.rig,label:"Rig"},{value:p.program,label:"Program"},{value:p.basin,label:"Basin"},{value:p.county,label:"County"},{value:p.area,label:"Area"},{value:p.formation,label:"Target Formation"},{value:p.stringDesign,label:"String Design"}],c={unknown:"unknown",idle:"idle",active:"active",paused:"paused",complete:"complete"},d=[{value:c.unknown,color:"#9E9E9E"},{value:c.idle,color:"#BDBDBD"},{value:c.active,color:"#95F126"},{value:c.paused,color:"#FFF350"},{value:c.complete,color:"#2196F3"}],u={name:"name",status:"status",rig:"rigName",distance:"distance",lastActive:"lastActive",metrics:"metrics",wellSection:"wellSection"},m=[{type:u.name,label:"Well Name",key:u.name,width:[280,197,197,186]},{type:u.status,label:"",key:u.status,width:[40,40,40,30]},{type:u.rig,label:"Rig",key:u.rig,width:[220,140,140,93]},{type:u.distance,label:"Distance",key:u.distance,width:[160,160,122,93]},{type:u.lastActive,label:"Last Active",key:u.lastActive,width:[140,140,108,98]},{type:u.metrics,label:"",key:"",width:[0,212,141,141]},{type:u.wellSection,label:"Well Section",key:u.wellSection,width:[180,131,131,97]}],g=[{value:"all",label:"All"},{value:"last12h",label:"Last 12 hrs"},{value:"last24h",label:"Last 24 hrs"},{value:"last7d",label:"Last 7 days"},{value:"lastMonth",label:"Last Month"},{value:"custom",label:"Сustom"}],v=3,b=t([n.weight_to_weight_average,n.bottom_to_slips_average,n.drilling_connection_average,n.slips_to_bottom_average,n.hole_depth,n.hole_depth_change,n.drilled_feet_rotary,n.drilled_feet_slide,n.rop_gross,n.rop,n.rop_rotary,n.rop_slide,n.drilled_feet_rotary_percentage,n.drilled_feet_slide_percentage,n.on_bottom_percentage,n.on_bottom_time,n.cost_per_ft,n.cost_per_lat_ft,n.feet_per_day,n.tripping_in_speed_cased,n.tripping_in_speed_open,n.tripping_in_speed,n.tripping_out_speed_cased,n.tripping_out_speed_open,n.tripping_out_speed].concat(e("production"!==process.env.REACT_APP_ENVIRONMENT?[n.npt,n.circulating_time,n.spud_to_rig_release_time,n.spud_to_total_depth_time]:[])),"label"),y=b.map((function(e){return e.key})),h=["#6EACFF","#69B919","#E95DAF","#A77DFF","#77FFC1","#018EFE","#FF5D7E","#B9E310","#FFD111","#24BB8E","#C426F3"];export{l as ALL_SECTION_KEY,i as ALL_SECTION_LABEL,u as ColumnType,r as EXPANED_WELLNAME_WIDTH,_ as FilterOptions,p as FilterType,v as MAX_METRICS_COUNT,y as METRICS_KEYS,b as METRICS_LIST,g as OBJECTIVE_PERIOD_LIST,o as ROWS_PER_PAGE,s as ROW_HEIGHT,d as StatusOptions,m as TableColumns,h as WellSectionColors,c as WellStatus};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import r from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/asyncToGenerator";import n from"@babel/runtime/helpers/slicedToArray";import a from"@babel/runtime/regenerator";import{useState as o,useEffect as c}from"react";import{isEmpty as l,uniq as s,get as u}from"lodash";import{fetchOffsetWellSelections as i,fetchWellhubWells as p}from"../utils/apiCalls.js";import{
|
|
1
|
+
import e from"@babel/runtime/helpers/toConsumableArray";import r from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/asyncToGenerator";import n from"@babel/runtime/helpers/slicedToArray";import a from"@babel/runtime/regenerator";import{useState as o,useEffect as c}from"react";import{isEmpty as l,uniq as s,get as u}from"lodash";import{fetchOffsetWellSelections as i,fetchWellhubWells as p}from"../utils/apiCalls.js";import{WellSectionColors as f,ALL_SECTION_KEY as b,ALL_SECTION_LABEL as m}from"../constants.js";function v(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 O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}var h=function(v,h){var y=o(null),d=n(y,2),j=d[0],w=d[1],x=o(null),P=n(x,2),g=P[0],k=P[1];return c((function(){var n,o,c=(n=t(a.mark((function t(){var n,o,c,u,p,v;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!h){t.next=7;break}return t.next=4,i(h);case 4:t.t0=t.sent,t.next=8;break;case 7:t.t0=[];case 8:n=t.t0,o=!l(n)&&JSON.parse(n[0].data.filters),c=!l(n)&&n[0].data.result&&JSON.parse(n[0].data.result),o&&c?(u=o.filterTabs.map((function(e,r){return{value:e.value,label:e.name,color:f[r]}})),p=[],v=u.reduce((function(e,t){var n=t.value,a=s(c[n].concat(h));return p=p.concat(a),O(O({},e),{},r({},n,a))}),{}),v=O(O({},v),{},r({},b,s(p))),w([{value:b,label:m}].concat(e(u))),k(v)):(w([{value:b,label:m}]),k(r({},b,[h]))),t.next=19;break;case 14:t.prev=14,t.t1=t.catch(0),console.error("offetwell selection fetch error: ",t.t1),w([]),k([]);case 19:case"end":return t.stop()}}),t,null,[[0,14]])}))),function(){return n.apply(this,arguments)}),y=(o=t(a.mark((function e(){var t,n,o;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,p(h);case 3:t=e.sent,n=u(t[0],"data.offset_wells")||[],o=r({},b,s(n.map((function(e){return e.id})).concat(h))),w([{value:b,label:m}]),k(o),e.next=15;break;case 10:e.prev=10,e.t0=e.catch(0),console.error("wellhub fetch error: ",e.t0),w([]),k([]);case 15:case"end":return e.stop()}}),e,null,[[0,10]])}))),function(){return o.apply(this,arguments)});h?v?c():y():(w([]),k([]))}),[v,h]),[j,g]};export{h as useBicWells};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from'./../../ext-esm/style-inject/dist/style-inject.es.js';var e={rangeSliderInput:"Input_rangeSliderInput__uoNkK",rotated:"Input_rotated__GBHlR"};t(".Input_rangeSliderInput__uoNkK{background:var(--palette-background-b-6);border:none;border:1px solid var(--palette-primary-text-6);border-radius:4px;color:var(--palette-primary-text-6);cursor:default;display:block;font-size:14px;font-weight:500;height:24px;line-height:24px;margin:0 0 0 auto;min-width:40px;outline:none;padding:2px 4px;text-align:center}.Input_rangeSliderInput__uoNkK:focus{background-color:var(--palette-background-b-7)}.Input_rangeSliderInput__uoNkK:focus,.Input_rangeSliderInput__uoNkK:hover{border:1px solid var(--palette-primary-main);color:var(--palette-primary-contrast-text)}.Input_rotated__GBHlR{transform:rotate(180deg)}");export{e as default};
|
|
1
|
+
import t from'./../../ext-esm/style-inject/dist/style-inject.es.js';var e={rangeSliderInput:"Input_rangeSliderInput__uoNkK",rotated:"Input_rotated__GBHlR"};t(".Input_rangeSliderInput__uoNkK{background:var(--palette-background-b-6);border:none;border:1px solid var(--palette-primary-text-6);border-radius:4px;color:var(--palette-primary-text-6);cursor:default;display:block;font-size:14px;font-weight:500;height:24px;line-height:24px;margin:0 0 0 auto;max-width:fit-content;min-width:40px;outline:none;padding:2px 4px;text-align:center}.Input_rangeSliderInput__uoNkK:focus{background-color:var(--palette-background-b-7)}.Input_rangeSliderInput__uoNkK:focus,.Input_rangeSliderInput__uoNkK:hover{border:1px solid var(--palette-primary-main);color:var(--palette-primary-contrast-text)}.Input_rotated__GBHlR{transform:rotate(180deg)}");export{e as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from'./../../ext-esm/style-inject/dist/style-inject.es.js';var r={rangeSliderHorizontal:"RangeSlider_rangeSliderHorizontal__SAdDE",rangeSliderVertical:"RangeSlider_rangeSliderVertical__k8ac-",rangeSliderRail:"RangeSlider_rangeSliderRail__ufDMI",rangeSliderRailHorizontal:"RangeSlider_rangeSliderRailHorizontal__rLPtT",rotatedVerticalRange:"RangeSlider_rotatedVerticalRange__-oEIw",rangeSliderRailVertical:"RangeSlider_rangeSliderRailVertical__4zKzk",rangeSliderBar:"RangeSlider_rangeSliderBar__Kj3LC",rangeSliderBarHorizontal:"RangeSlider_rangeSliderBarHorizontal__is0F7",rangeSliderBarVertical:"RangeSlider_rangeSliderBarVertical__2DexQ",rangeSliderBarView:"RangeSlider_rangeSliderBarView__6dNQB",rangeSliderBarViewHorizontal:"RangeSlider_rangeSliderBarViewHorizontal__6pRPw",rangeSliderBarViewVertical:"RangeSlider_rangeSliderBarViewVertical__W2QnY",rangeSliderThumb:"RangeSlider_rangeSliderThumb__KMaq0",rangeSliderLabel:"RangeSlider_rangeSliderLabel__3-qO8",rangeSliderInputDivider:"RangeSlider_rangeSliderInputDivider__PcwIK",rangeSliderCompactInputs:"RangeSlider_rangeSliderCompactInputs__ukFLL",disabled:"RangeSlider_disabled__8eBEv"};e('.RangeSlider_rangeSliderHorizontal__SAdDE{align-items:center;display:flex;padding:30px 0 12px;position:relative}.RangeSlider_rangeSliderVertical__k8ac-{align-items:center;display:flex;flex-direction:column;height:100%;justify-content:center;padding:0 30px}.RangeSlider_rangeSliderRail__ufDMI{background-color:rgba(99,239,255,.24);border-radius:1px;height:3px;position:relative}.RangeSlider_rangeSliderRail__ufDMI:after,.RangeSlider_rangeSliderRail__ufDMI:before{background:#63efff;border-radius:1px;content:"";height:3px;position:absolute;width:2px}.RangeSlider_rangeSliderRail__ufDMI:before{left:0;top:0}.RangeSlider_rangeSliderRail__ufDMI:after{right:0;top:0}.RangeSlider_rangeSliderRailHorizontal__rLPtT{margin:0 6px;width:100%}.RangeSlider_rotatedVerticalRange__-oEIw{transform:rotate(180deg)}.RangeSlider_rangeSliderVertical__k8ac- .RangeSlider_rangeSliderRail__ufDMI{width:3px}.RangeSlider_rangeSliderVertical__k8ac- .RangeSlider_rangeSliderRail__ufDMI:after,.RangeSlider_rangeSliderVertical__k8ac- .RangeSlider_rangeSliderRail__ufDMI:before{height:2px;width:3px}.RangeSlider_rangeSliderVertical__k8ac- .RangeSlider_rangeSliderRail__ufDMI:after{bottom:0!important;top:unset}.RangeSlider_rangeSliderRailVertical__4zKzk{height:100%;margin:6px 0;width:2px}.RangeSlider_rangeSliderBar__Kj3LC{position:absolute;z-index:1}.RangeSlider_rangeSliderBarHorizontal__is0F7{height:12px;margin:1px 0 0;transform:translateY(-50%)}.RangeSlider_rangeSliderBarVertical__2DexQ{height:100%;margin:1px 0 0;width:12px}.RangeSlider_rangeSliderBarView__6dNQB{background:var(--palette-primary-main);border-radius:1px}.RangeSlider_rangeSliderBarViewHorizontal__6pRPw{height:3px;margin:5px 0 0}.RangeSlider_rangeSliderBarViewVertical__W2QnY{height:100%;width:3px}.RangeSlider_rangeSliderBar__Kj3LC:hover>.
|
|
1
|
+
import e from'./../../ext-esm/style-inject/dist/style-inject.es.js';var r={rangeSliderHorizontal:"RangeSlider_rangeSliderHorizontal__SAdDE",rangeSliderVertical:"RangeSlider_rangeSliderVertical__k8ac-",rangeSliderRail:"RangeSlider_rangeSliderRail__ufDMI",rangeSliderRailHorizontal:"RangeSlider_rangeSliderRailHorizontal__rLPtT",rotatedVerticalRange:"RangeSlider_rotatedVerticalRange__-oEIw",rangeSliderRailVertical:"RangeSlider_rangeSliderRailVertical__4zKzk",rangeSliderBar:"RangeSlider_rangeSliderBar__Kj3LC",rangeSliderBarHorizontal:"RangeSlider_rangeSliderBarHorizontal__is0F7",rangeSliderBarVertical:"RangeSlider_rangeSliderBarVertical__2DexQ",rangeSliderBarView:"RangeSlider_rangeSliderBarView__6dNQB",rangeSliderBarViewHorizontal:"RangeSlider_rangeSliderBarViewHorizontal__6pRPw",rangeSliderBarViewVertical:"RangeSlider_rangeSliderBarViewVertical__W2QnY",rangeSliderThumb:"RangeSlider_rangeSliderThumb__KMaq0",mobileRangeSliderThumb:"RangeSlider_mobileRangeSliderThumb__TEj2q",rangeSliderLabel:"RangeSlider_rangeSliderLabel__3-qO8",rangeSliderInputDivider:"RangeSlider_rangeSliderInputDivider__PcwIK",rangeSliderCompactInputs:"RangeSlider_rangeSliderCompactInputs__ukFLL",disabled:"RangeSlider_disabled__8eBEv"};e('.RangeSlider_rangeSliderHorizontal__SAdDE{align-items:center;display:flex;padding:30px 0 12px;position:relative}.RangeSlider_rangeSliderVertical__k8ac-{align-items:center;display:flex;flex-direction:column;height:100%;justify-content:center;padding:0 30px}.RangeSlider_rangeSliderRail__ufDMI{background-color:rgba(99,239,255,.24);border-radius:1px;height:3px;position:relative}.RangeSlider_rangeSliderRail__ufDMI:after,.RangeSlider_rangeSliderRail__ufDMI:before{background:#63efff;border-radius:1px;content:"";height:3px;opacity:.24;position:absolute;width:2px}.RangeSlider_rangeSliderRail__ufDMI:before{left:0;top:0}.RangeSlider_rangeSliderRail__ufDMI:after{right:0;top:0}.RangeSlider_rangeSliderRailHorizontal__rLPtT{margin:0 6px;width:100%}.RangeSlider_rotatedVerticalRange__-oEIw{transform:rotate(180deg)}.RangeSlider_rangeSliderVertical__k8ac- .RangeSlider_rangeSliderRail__ufDMI{width:3px}.RangeSlider_rangeSliderVertical__k8ac- .RangeSlider_rangeSliderRail__ufDMI:after,.RangeSlider_rangeSliderVertical__k8ac- .RangeSlider_rangeSliderRail__ufDMI:before{height:2px;width:3px}.RangeSlider_rangeSliderVertical__k8ac- .RangeSlider_rangeSliderRail__ufDMI:after{bottom:0!important;top:unset}.RangeSlider_rangeSliderRailVertical__4zKzk{height:100%;margin:6px 0;width:2px}.RangeSlider_rangeSliderBar__Kj3LC{position:absolute;z-index:1}.RangeSlider_rangeSliderBarHorizontal__is0F7{height:12px;margin:1px 0 0;transform:translateY(-50%)}.RangeSlider_rangeSliderBarVertical__2DexQ{height:100%;margin:1px 0 0;width:12px}.RangeSlider_rangeSliderBarView__6dNQB{background:var(--palette-primary-main);border-radius:1px}.RangeSlider_rangeSliderBarViewHorizontal__6pRPw{height:3px;margin:5px 0 0;position:relative}.RangeSlider_rangeSliderBarViewVertical__W2QnY{height:100%;width:3px}.RangeSlider_rangeSliderBar__Kj3LC:hover>.RangeSlider_rangeSliderBarViewHorizontal__6pRPw:before,.RangeSlider_rangeSliderBar__Kj3LC:hover>.RangeSlider_rangeSliderBarViewVertical__W2QnY:before{background:#03bcd4;border-radius:1px;content:"";opacity:.4;position:absolute}.RangeSlider_rangeSliderBar__Kj3LC:hover>.RangeSlider_rangeSliderBarViewHorizontal__6pRPw:before{bottom:-2px;height:7px;width:100%}.RangeSlider_rangeSliderBar__Kj3LC:hover>.RangeSlider_rangeSliderBarViewVertical__W2QnY:before{height:100%;left:-2px;width:7px}.RangeSlider_rangeSliderThumb__KMaq0{align-items:center;display:flex;height:25px;justify-content:center;position:absolute;transform:translate(-50%,-50%);width:25px;z-index:1}.RangeSlider_mobileRangeSliderThumb__TEj2q.RangeSlider_rangeSliderThumb__KMaq0:hover>.RangeSlider_rangeSliderLabel__3-qO8{box-shadow:none!important}.RangeSlider_mobileRangeSliderThumb__TEj2q:hover.RangeSlider_rangeSliderThumb__KMaq0:before{background:#d9d9d9;border-radius:20px;content:"";height:39px;left:50%;opacity:.1;position:absolute;top:50%;transform:translate(-50%,-50%);width:39px}.RangeSlider_rangeSliderLabel__3-qO8{background:var(--palette-primary-main);border-radius:9px;height:9px;position:relative;transition:box-shadow .3s;width:9px}.RangeSlider_rangeSliderThumb__KMaq0:hover>.RangeSlider_rangeSliderLabel__3-qO8{box-shadow:0 0 0 8px rgba(3,188,212,.2)}.RangeSlider_rangeSliderInputDivider__PcwIK{background:var(--palette-background-b-9);color:#fff;font-size:10px;font-weight:500}.RangeSlider_rangeSliderCompactInputs__ukFLL{align-items:center;background:var(--palette-background-b-9);border-radius:4px;display:flex;justify-content:center;position:absolute;transform:translate(-50%,-50%)}.RangeSlider_disabled__8eBEv{opacity:.4}');export{r as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/slicedToArray";import{useState as t,useRef as r,useEffect as
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/slicedToArray";import{useState as t,useRef as r,useEffect as i}from"react";import o from"classnames";import{round as a,throttle as l}from"lodash";import u from"prop-types";import{isMobileDetected as s}from"../../utils/mobileDetect.js";import{horizontalStrategy as m}from"./strategies/horizontal.js";import{verticalStrategy as c}from"./strategies/vertical.js";import{calculatePercentForValue as f,updateFromValue as d,updateToValue as g,calculateValueFromPercent as p}from"./utils.js";import R from"./inputs/FromInput.js";import O from"./inputs/ToInput.js";import{RangeSliderControl as b,RangeSliderOrientation as v}from"./constants.js";import S from"./RangeSlider.css.js";import{jsxs as h,jsx as T}from"react/jsx-runtime";function y(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function B(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?y(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}var I=function(u){var y,I,M,j,C=u.min,N=u.max,w=u.from,A=u.to,P=u.minRange,F=u.disabled,V=u.onChange,L=u.orientation,x=u.precision,E=u.isSingleRange,D=u.isWithoutInput,z=t(null),H=n(z,2),U=H[0],_=H[1],W=t(null),q=n(W,2),X=q[0],Y=q[1],Z=t(null),k=n(Z,2),G=k[0],J=k[1],K=t(b.FROM),Q=n(K,2),$=Q[0],ee=Q[1],ne=t(null),te=n(ne,2),re=te[0],ie=te[1],oe=t({}),ae=n(oe,2),le=ae[0],ue=ae[1],se=t({from:!1,bar:!1,to:!1}),me=n(se,2),ce=me[0],fe=me[1],de=r(null),ge=r(null),pe=r(null),Re=r(null),Oe=r(null),be=L===v.HORIZONTAL,ve=L===v.VERTICAL,Se=E&&D;i((function(){L===v.HORIZONTAL&&J(m),L===v.VERTICAL&&J(c)}),[L]),i((function(){E&&V({from:0,to:A})}),[E]),i((function(){if(G){var n,t=a(w,x),r=a(A,x),i=a(C,x),o=a(N,x),l=f(t,i,o),u=f(r,i,o);ue((e(n={},b.FROM,G.getThumbStyles(l,$===b.FROM)),e(n,b.TO,G.getThumbStyles(u,$===b.TO)),e(n,b.BAR,G.getBarStyles(l,u)),e(n,b.FROM_INPUT,G.getInputStyles(re===b.FROM||re===b.BAR||ce.from)),e(n,b.TO_INPUT,G.getInputStyles(re===b.TO||re===b.BAR||ce.to)),n)),_(t.toString()),Y(r.toString())}}),[G,C,N,w,A,re,ce]);var he=function(e){var n=G.getCoordinates(e,de.current.getBoundingClientRect()),t=f(n.new,n.min,n.max),r=a(p(t,C,N),x);if(r!==w){var i=d(r,w,A,C,P);V(i)}},Te=function(e){var n=ve&&E?G.getRotatedCoordinates(e,de.current.getBoundingClientRect()):G.getCoordinates(e,de.current.getBoundingClientRect()),t=f(n.new,n.min,n.max),r=a(p(t,C,N),x);if(r!==A){var i=g(r,w,A,N,P);V(i)}},ye=function(e,n){var t=G.getBarCoordinates(e,n,de.current.getBoundingClientRect()),r=f(t.new,t.min,t.max),i=a(p(r,C,N),x),o=a(A+(i-w),x);if(i<C){var l=C-i;i=C,o=a(o+l,x)}if(o>N){var u=o-N;o=N,i=a(i-u,x)}i!==w&&o!==A&&i>=C&&o<=N&&V({from:i,to:o})},Be=function(n){n!==b.BAR?fe(B(B({},ce),{},e({},n,!0))):fe({from:!0,bar:!0,to:!0})},Ie=function(n){n!==b.BAR?fe(B(B({},ce),{},e({},n,!1))):fe({from:!1,bar:!1,to:!1})},Me=function(e,n){if(!(E&&e===b.BAR||F)){n.stopPropagation(),ee(e),ie(e);var t=n.clientX,r=n.clientY,i=n.target.getBoundingClientRect(),o=i.x,a=i.y,u=l((function(n){!function(e){return e===b.FROM?he:e===b.TO?Te:ye}(e)(n,{clientX:t,clientY:r,x:o,y:a})}),4);document.addEventListener("mousemove",u),document.addEventListener("mouseup",(function e(){ie(null),document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",e)}))}},je=function(e,n){var t=n.target.value;Number.isNaN(t)||function(e){return e===b.FROM?_:Y}(e)(t)},Ce=function(e,n){var t=n.target.value,r=a(t,x);if(e===b.FROM){var i=d(r,w,A,C,P);V(i)}if(e===b.TO){var o=g(r,w,A,N,P);V(o)}};return h("div",{className:o((y={},e(y,S.disabled,F),e(y,S.rangeSliderHorizontal,be),e(y,S.rangeSliderVertical,ve),e(y,S.rotatedVerticalRange,ve&&E),y)),children:[!E&&T(R,{compStyles:le[b.FROM_INPUT],isVerticalOrientation:ve,max:N,disabled:F,precision:x,fromInputRef:Re,from:w,fromInputValue:U,onInputChange:je,validateInputChange:Ce}),h("div",{className:o(S.rangeSliderRail,(I={},e(I,S.rangeSliderRailHorizontal,be),e(I,S.rangeSliderRailVertical,ve),I)),ref:de,children:[!E&&T("div",{ref:ge,className:o(S.rangeSliderThumb,s&&S.mobileRangeSliderThumb),style:le[b.FROM],onMouseDown:function(e){return Me(b.FROM,e)},onMouseEnter:function(){Be(b.FROM)},onMouseLeave:function(){Ie(b.FROM)},children:T("div",{className:S.rangeSliderLabel})}),T("div",{className:o(S.rangeSliderBar,(M={},e(M,S.rangeSliderBarHorizontal,be),e(M,S.rangeSliderBarVertical,ve),M)),style:le[b.BAR],onMouseDown:function(e){return Me(b.BAR,e)},onMouseEnter:function(){Be(b.BAR)},onMouseLeave:function(){Ie(b.BAR)},children:T("div",{className:o(S.rangeSliderBarView,(j={},e(j,S.rangeSliderBarViewHorizontal,be),e(j,S.rangeSliderBarViewVertical,ve),j))})}),T("div",{ref:pe,className:o(S.rangeSliderThumb,s&&S.mobileRangeSliderThumb),style:le[b.TO],onMouseDown:function(e){return Me(b.TO,e)},onMouseEnter:function(){Be(b.TO)},onMouseLeave:function(){Ie(b.TO)},children:T("div",{className:S.rangeSliderLabel})})]}),!Se&&T(O,{compStyles:le[b.TO_INPUT],disabled:F,isVerticalOrientation:ve,rotated:ve&&E,max:N,precision:x,toInputRef:Oe,to:A,toInputValue:X,onInputChange:je,validateInputChange:Ce})]})};I.propTypes={min:u.number,max:u.number,from:u.number.isRequired,to:u.number.isRequired,orientation:u.oneOf(["horizontal","vertical"]),precision:u.number,minRange:u.number,onChange:u.func,isSingleRange:u.bool,isWithoutInput:u.bool},I.defaultProps={min:0,max:100,orientation:"horizontal",precision:0,minRange:0,onChange:function(){},isSingleRange:!1,isWithoutInput:!1};export{I as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"./palette.mjs.js";var e=o.primary,t=o.background,i={MuiTableCell:{root:{borderBottomColor:e.text9,height:56,letterSpacing:"0.4px",lineHeight:"20px",paddingLeft:8,paddingRight:8,"&.dense":{fontSize:14,lineHeight:"14px",height:28}},stickyHeader:{backgroundColor:t.b6},head:{color:e.text7,fontSize:14,lineHeight:"14px","&.MuiTableCell-sizeSmall":{fontSize:12,height:48,lineHeight:"14px"},"&.dense":{fontSize:12,lineHeight:"12px",height:28}},body:{fontSize:16},sizeSmall:{fontSize:14,height:48,lineHeight:"20px",paddingRight:16}},MuiTableRow:{root:{"&.MuiTableRow-hover:hover":{backgroundColor:"rgba(255, 255, 255, 0.1)"},"&.Mui-selected, .MuiTableRow-root.Mui-selected:hover":{backgroundColor:"rgba(3, 188, 212, 0.2)"}},head:{borderTop:"1px solid ".concat(e.text9)}},MuiTableSortLabel:{root:{flexDirection:"row",justifyContent:"flex-end","&:hover":{color:o.primary.contrastText,"& .MuiTableSortLabel-icon":{opacity:1,color:o.primary.contrastText},"&.MuiTableSortLabel-active":{color:o.primary.contrastText,"&.MuiTableSortLabel-root.MuiTableSortLabel-active .MuiSvgIcon-root.MuiTableSortLabel-icon":{color:o.primary.contrastText}}},"&.MuiTableSortLabel-active":{color:o.primary.text7,"&.MuiTableSortLabel-root.MuiTableSortLabel-active .MuiSvgIcon-root.MuiTableSortLabel-icon":{color:o.primary.text7}}},icon:{marginRight:0,color:o.primary.text7,fontSize:16}},MuiTablePagination:{toolbar:{paddingTop:10},caption:{fontSize:12},selectRoot:{marginRight:31,marginLeft:3,"& .MuiTablePagination-select":{paddingRight:31,paddingLeft:2}},input:{fontSize:12,position:"relative",top:1},selectIcon:{"&.MuiSvgIcon-root.MuiSelect-icon":{fontSize:16,top:5}},actions:{marginLeft:23,"& .MuiIconButton-root":{color:e.text6,fontSize:16,padding:7,"&:hover":{color:e.contrastText},"&.Mui-disabled":{color:e.text8}}},root:{"& .MuiSvgIcon-root":{color:"inherit",fontSize:"inherit"}}}};export{i as default};
|
|
1
|
+
import o from"./palette.mjs.js";var e=o.primary,t=o.background,i={MuiTable:{root:{width:"100%"},stickyHeader:{"&:before":{content:"no-open-quote",position:"absolute",width:"inherit",height:"16px",background:"linear-gradient(360deg, rgba(44, 44, 44, 0) 0%, ".concat(o.background.b6," 100%)")}}},MuiTableCell:{root:{borderBottomColor:e.text9,height:56,letterSpacing:"0.4px",lineHeight:"20px",whiteSpace:"nowrap",paddingLeft:8,paddingRight:8,"&.dense":{fontSize:14,lineHeight:"14px",height:28}},stickyHeader:{backgroundColor:t.b6},head:{color:e.text7,fontSize:14,lineHeight:"14px","&.MuiTableCell-sizeSmall":{fontSize:12,height:48,lineHeight:"14px"},"&.dense":{fontSize:12,lineHeight:"12px",height:28}},body:{fontSize:16},sizeSmall:{fontSize:14,height:48,lineHeight:"20px",paddingRight:16}},MuiTableRow:{root:{"&.MuiTableRow-hover:hover":{backgroundColor:"rgba(255, 255, 255, 0.1)"},"&.Mui-selected, .MuiTableRow-root.Mui-selected:hover":{backgroundColor:"rgba(3, 188, 212, 0.2)"}},head:{borderTop:"1px solid ".concat(e.text9)}},MuiTableSortLabel:{root:{flexDirection:"row",justifyContent:"flex-end","&:hover":{color:o.primary.contrastText,"& .MuiTableSortLabel-icon":{opacity:1,color:o.primary.contrastText},"&.MuiTableSortLabel-active":{color:o.primary.contrastText,"&.MuiTableSortLabel-root.MuiTableSortLabel-active .MuiSvgIcon-root.MuiTableSortLabel-icon":{color:o.primary.contrastText}}},"&.MuiTableSortLabel-active":{color:o.primary.text7,"&.MuiTableSortLabel-root.MuiTableSortLabel-active .MuiSvgIcon-root.MuiTableSortLabel-icon":{color:o.primary.text7}}},icon:{marginRight:0,color:o.primary.text7,fontSize:16}},MuiTablePagination:{toolbar:{paddingTop:10},caption:{fontSize:12},selectRoot:{marginRight:31,marginLeft:3,"& .MuiTablePagination-select":{paddingRight:31,paddingLeft:2}},input:{fontSize:12,position:"relative",top:1},selectIcon:{"&.MuiSvgIcon-root.MuiSelect-icon":{fontSize:16,top:5}},actions:{marginLeft:23,"& .MuiIconButton-root":{color:e.text6,fontSize:16,padding:7,"&:hover":{color:e.contrastText},"&.Mui-disabled":{color:e.text8}}},root:{"& .MuiSvgIcon-root":{color:"inherit",fontSize:"inherit"}}}};export{i as default};
|
package/constants/alerts.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import a from"@babel/runtime/helpers/toConsumableArray";function l(e,a){var l=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);a&&(t=t.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),l.push.apply(l,t)}return l}function t(a){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(l){e(a,l,r[l])})):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(e){Object.defineProperty(a,e,Object.getOwnPropertyDescriptor(r,e))}))}return a}var r="alerts",o="ADD_NEW_ALERTS",u="DELETE_NEW_ALERT",i="CLEAR_NEW_ALERTS",s={company:{value:"company",label:"Company"},personal:{value:"personal",label:"Personal"}},n={advanced:"advanced",simple:"simple"},d="desktop",c="banner",b={email:{label:"Email",userPreferencesKey:"emails_enabled"},mobile:{label:"Mobile App notifications",userPreferencesKey:"push_notifications_enabled"},sms:{label:"SMS/Text Message",userPreferencesKey:"sms_enabled"}},p=[{value:"INFO",label:"Info"},{value:"WARNING",label:"Warning"},{value:"CRITICAL",label:"Critical"}],v={INFO:"rgb(119, 195, 241)",WARNING:"rgb(242, 192, 70)",CRITICAL:"rgb(237, 70, 48)"},m={SUBSCRIPTIONS:[{collection:"alerts"}]},_=[{label:"Annulus Pressure Loss",value:"hydraulics.pressure-loss.data.predicted_annulus_pressure_loss"},{label:"Bit HSI",value:"hydraulics.pressure-loss.data.bit_hsi"},{label:"Bit Jet Impact Force",value:"hydraulics.pressure-loss.data.bit_jet_impact_force"},{label:"ECD at Bit",value:"hydraulics.pressure-loss.data.predicted_ecd_at_bit"},{label:"ECD at Casing",value:"hydraulics.pressure-loss.data.predicted_ecd_at_casing"},{label:"Minimum Recommended Flowrate",value:"hydraulics.overview.data.recommended_minimum_flowrate"},{label:"Predicted Standpipe Pressure",value:"hydraulics.pressure-loss.data.predicted_standpipe_pressure"},{label:"Standpipe Pressure",value:"hydraulics.pressure-loss.data.standpipe_pressure"}],y=[{label:"Bit RPM",value:"pdm.operating-condition.data.total_bit_rpm"},{label:"Bit Torque",value:"pdm.operating-condition.data.total_bit_torque"},{label:"Diff Press",value:"pdm.operating-condition.data.differential_pressure"},{label:"PDM RPM",value:"pdm.operating-condition.data.rpm"},{label:"PDM Torque",value:"pdm.operating-condition.data.torque"}],
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import a from"@babel/runtime/helpers/toConsumableArray";function l(e,a){var l=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);a&&(t=t.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),l.push.apply(l,t)}return l}function t(a){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(l){e(a,l,r[l])})):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(e){Object.defineProperty(a,e,Object.getOwnPropertyDescriptor(r,e))}))}return a}var r="alerts",o="ADD_NEW_ALERTS",u="DELETE_NEW_ALERT",i="CLEAR_NEW_ALERTS",s={company:{value:"company",label:"Company"},personal:{value:"personal",label:"Personal"}},n={advanced:"advanced",simple:"simple"},d="desktop",c="banner",b={email:{label:"Email",userPreferencesKey:"emails_enabled"},mobile:{label:"Mobile App notifications",userPreferencesKey:"push_notifications_enabled"},sms:{label:"SMS/Text Message",userPreferencesKey:"sms_enabled"}},p=[{value:"INFO",label:"Info"},{value:"WARNING",label:"Warning"},{value:"CRITICAL",label:"Critical"}],v={INFO:"rgb(119, 195, 241)",WARNING:"rgb(242, 192, 70)",CRITICAL:"rgb(237, 70, 48)"},m={SUBSCRIPTIONS:[{collection:"alerts"}]},_=[{label:"Annulus Pressure Loss",value:"hydraulics.pressure-loss.data.predicted_annulus_pressure_loss"},{label:"Bit HSI",value:"hydraulics.pressure-loss.data.bit_hsi"},{label:"Bit Jet Impact Force",value:"hydraulics.pressure-loss.data.bit_jet_impact_force"},{label:"ECD at Bit",value:"hydraulics.pressure-loss.data.predicted_ecd_at_bit"},{label:"ECD at Casing",value:"hydraulics.pressure-loss.data.predicted_ecd_at_casing"},{label:"Minimum Recommended Flowrate",value:"hydraulics.overview.data.recommended_minimum_flowrate"},{label:"Predicted Standpipe Pressure",value:"hydraulics.pressure-loss.data.predicted_standpipe_pressure"},{label:"Standpipe Pressure",value:"hydraulics.pressure-loss.data.standpipe_pressure"}],y=[{label:"Bit RPM",value:"pdm.operating-condition.data.total_bit_rpm"},{label:"Bit Torque",value:"pdm.operating-condition.data.total_bit_torque"},{label:"Diff Press",value:"pdm.operating-condition.data.differential_pressure"},{label:"PDM RPM",value:"pdm.operating-condition.data.rpm"},{label:"PDM Torque",value:"pdm.operating-condition.data.torque"}],h=[{label:"Bit Aggressivity",value:"torque-and-drag.downhole-transfer.data.downhole.bit_aggressivity"},{label:"Drag Severity",value:"torque-and-drag.overview.data.drag.severity"},{label:"Predicted Surface Torque",value:"torque-and-drag.predictions.data.predicted_surface_torque"},{label:"Predicted Downhole Torque",value:"torque-and-drag.predictions.data.downhole_torque"}],g=[{label:"BH",value:"wits.data.block_height"},{label:"Bit Depth",value:"wits.data.bit_depth"},{label:"Diff Press",value:"wits.data.diff_press"},{label:"Flow In",value:"wits.data.mud_flow_in"},{label:"Flow Out",value:"wits.data.mud_flow_out"},{label:"Flow Out %",value:"wits.data.mud_flow_out_percent"},{label:"Hole Depth",value:"wits.data.hole_depth"},{label:"Hookload",value:"wits.data.hook_load"},{label:"MV",value:"wits.data.mud_volume"},{label:"ROP",value:"wits.data.rop"},{label:"Rotary Torque",value:"wits.data.rotary_torque"},{label:"RPM",value:"wits.data.rotary_rpm"},{label:"SPM",value:"wits.data.pump_spm_total"},{label:"Standpipe Pressure",value:"wits.data.standpipe_pressure"},{label:"Weight on Bit",value:"wits.data.weight_on_bit"}],f=[{label:"Directional:"}].concat(a([{label:"Distance to plan",value:"directional.accuracy.data.accuracy.distance_to_plan"},{label:"Dogleg Severity",value:"directional.trend.data.last_dls.dls"},{label:"High/Low divergence from plan",value:"directional.accuracy.data.recommendation.high"},{label:"Right/Left divergence from plan",value:"directional.accuracy.data.recommendation.right"}]),[{label:"Hydraulics:"}],a(_),[{label:"PDM:"}],a(y),[{label:"Torque and Drag:"}],a(h),[{label:"WITS:"}],a(g)),w=f.map((function(e){var a=e.label,l=e.value;return{label:"".concat(a).concat(l?" (".concat(l,")"):""),value:l}})),D=a(f),P={s:"s",min:"min",h:"h",d:"d"},O=[{value:"continuous",label:"Continuous"},{value:"once-per-asset",label:"Once Per Asset"},{value:"once",label:"Once"}],A=[{value:"AND",label:"AND"},{value:"OR",label:"OR"}],R=[{value:"=",label:"="},{value:"!=",label:"!="},{value:">",label:">"},{value:">=",label:">="},{value:"<",label:"<"},{value:"<=",label:"<="},{value:"~",label:"~"},{value:"!~",label:"!~"}],E=[{value:"average",label:"Average"},{value:"median",label:"Median"},{value:"count",label:"Count"},{value:"percentage",label:"% Change"},{value:"minimum",label:"Minimum"},{value:"maximum",label:"Maximum"},{value:"value",label:"Any Match"}],C=[{label:"All",value:"all"},{label:"Last 12 hours",value:"last12hours"},{label:"Last 24 hours",value:"last24hours"},{label:"Last 7 days",value:"last7days"},{label:"Last month",value:"lastMonth"},{label:"Custom",value:"custom"}],N=C.reduce((function(a,l){return t(t({},a),{},e({},l.value,l))}),{}),S="ADD_ALERT_BANNERS",M="REMOVE_ALERT_BANNER",T="ADD_ALERT_BANNER_SOUND",L="REMOVE_ALERT_BANNER_SOUND",I=function(e){return e&&["Corva","Corva Default Company Do Not Use","Chevron","Default Company","Sai Company","Shell","Completion Company"].includes(e.getIn(["company","name"]))};export{S as ADD_ALERT_BANNERS,T as ADD_ALERT_BANNER_SOUND,o as ADD_NEW_ALERTS,w as ADVANCED_MODE_VALUE_PATHS,m as ALERTS,n as ALERT_DEFINITION_MODES,s as ALERT_DEFINITION_TYPES,p as ALERT_LEVELS,v as ALERT_LEVEL_COLOR,b as ALERT_NOTIFICATION_TYPE_USER_PREFERENCES,c as BANNER_ALERT_NOTIFICATION_TYPE,i as CLEAR_NEW_ALERTS,A as COMBINE_LOGICS,C as DATE_RANGE_FILTERS,N as DATE_RANGE_FILTERS_BY_KEYS,u as DELETE_NEW_ALERT,d as DESKTOP_ALERT_NOTIFICATION_TYPE,r as NAME,R as OPERATORS,O as RECURRENCES,M as REMOVE_ALERT_BANNER,L as REMOVE_ALERT_BANNER_SOUND,E as SAMPLING_FUNCTIONS,D as SIMPLE_MODE_VALUE_PATHS,P as TIME_UNITS,I as isAlertBannerEnabled};
|