@corva/ui 0.32.0-3 → 0.32.0-6

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.
@@ -1 +1 @@
1
- import t from"@babel/runtime/helpers/defineProperty";import e from"moment";import{flowRight as n}from"lodash";import i from"@babel/runtime/helpers/slicedToArray";import r from"@babel/runtime/regenerator";import a from"@babel/runtime/helpers/asyncToGenerator";import o from"@material-ui/core/colors/grey";import{jsx as s,jsxs as c,Fragment as d}from"react/jsx-runtime";import{IconButton as m,Menu as l,MenuItem as u,Paper as p,Typography as h,Divider as f}from"@material-ui/core";import{useState as v}from"react";import{deleteAnnotation as C,patchAnnotation as _}from"../../../../../../clients/jsonApi/index.js";import{shape as b,number as A,string as y,bool as R,oneOf as g,node as N,func as q,arrayOf as x}from"prop-types";import k from"classnames";import{withStyles as M}from"@material-ui/core/styles";import I from"../../../../../ConfirmationDialog.js";import T from"../../../../../Avatar/index.js";import{DELETE_ANNOTATION as j,EDIT_ANNOTATION as w}from"../../../../constants.js";import{useAnnotationsDispatch as D}from"../../../../AnnotationsContext.js";import U from"../../../../../UserCardPopover.js";import{formatMentionText as E}from"../../../../../UserMention/utils/index.js";import S from"../AnnotationInput/index.js";import O,{isWidthUp as z}from"@material-ui/core/withWidth";import B from"@material-ui/icons/MoreVert";import P from"../../../../../CommentsInfo/index.js";import L from"../../../../../Attachment/index.js";import W from"../AnnotationComments/index.js";import Y from"./style.css.js";var G="AppAnnotationItemPo",H=function(t){var e=t.user,n=t.currentUser,i=t.isNative,r=t.classes;return s("div",{className:Y.cAnnotationUserAvatar,children:i?s(T,{displayName:"".concat(e.first_name," ").concat(e.last_name),imgSrc:e.profile_photo,size:38,className:r.avatar}):s(U,{user:e,currentUser:n,children:s(T,{displayName:"".concat(e.first_name," ").concat(e.last_name),imgSrc:e.profile_photo,size:38,className:r.avatar})})})},V=function(t){var e=t.actionsMenuAnchorEl,n=t.handleToggleActionsMenu,i=t.classes,r=t.handleEdit,a=t.handleDelete;return c(d,{children:[s(m,{"data-testid":"".concat(G,"_menuButton"),"aria-label":"Actions","aria-owns":e?Y.cAnnotationContainerActionsMenu:void 0,"aria-haspopup":"true",className:i.iconButtonRoot,onClick:n,children:s(B,{htmlColor:o[400]})}),c(l,{id:"cAnnotationContainerActionsMenu",anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},anchorEl:e,open:!!e,onClick:n,children:[s(u,{"data-testid":"".concat(G,"_editMenuItem"),onClick:r,children:"Edit"}),s(u,{"data-testid":"".concat(G,"_deleteMenuItem"),onClick:a,children:"Delete"})]})]})},F=function(n){var o,m,l=n.included,u=n.annotation,b=n.assetCompanyId,A=n.classes,y=n.isNative,R=n.showSuccessNotification,g=n.width,N=v(!1),q=i(N,2),x=q[0],M=q[1],T=v(null),U=i(T,2),O=U[0],B=U[1],F=v(!1),J=i(F,2),K=J[0],Q=J[1],X=v(!1),Z=i(X,2),$=Z[0],tt=Z[1],et=!z("sm",g),nt=u.attributes.comments_count||0,it=v(nt),rt=i(it,2),at=rt[0],ot=rt[1],st=D(),ct=u.relationships.comment_users.data.reduce((function(t,e){var n=e.id,i=l.find((function(t){return t.id===n}));return i&&t.push(i.attributes),t}),[]),dt=ct.map((function(t){var e=t.last_name,n=t.first_name;return"".concat(n," ").concat(e)})),mt=(o=a(r.mark((function t(){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,C(u.id);case 3:t.sent&&st({type:j,id:u.id}),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.error(t.t0);case 10:case"end":return t.stop()}}),t,null,[[0,7]])}))),function(){return o.apply(this,arguments)}),lt=(m=a(r.mark((function t(e,n,i){var a,o;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,a={body:e,active_until:n,attachment:{file_name:i&&i.attachmentName,s3_link:i&&i.attachmentUrl}},t.next=4,_(u.id,a);case 4:o=t.sent,st({type:w,annotation:o,id:u.id}),t.next=12;break;case 8:return t.prev=8,t.t0=t.catch(0),console.error(t.t0),t.abrupt("return");case 12:R("Annotation has been changed"),Q(!1);case 14:case"end":return t.stop()}}),t,null,[[0,8]])}))),function(t,e,n){return m.apply(this,arguments)}),ut=u.relationships.user.data.id,pt=l.find((function(t){var e=t.type,n=t.id;return"user"===e&&n===ut})),ht=pt.attributes,ft=u.attributes.attachment;return c(p,{className:A.container,elevation:0,children:[c("div",{"data-testid":"".concat(G,"_annotation_").concat(u.attributes.body),className:Y.cAnnotationContainer,children:[s(H,{user:ht,classes:A,isNative:y,currentUser:pt}),c("div",{className:Y.cAnnotationContainerTop,children:[c("div",{className:Y.cAnnotationContainerTopMainInfo,children:[s(h,{variant:"body2","data-testid":"".concat(G,"_userName"),children:"".concat(ht.first_name," ").concat(ht.last_name)}),s(h,{"data-testid":"".concat(G,"_addDate"),variant:"caption",className:A.createdAt,children:e(u.attributes.created_at).format("MM/DD/YY H:mm")})]}),s("div",{className:k(Y.cAnnotationContainerTopMenu,t({},Y.cAnnotationContainerTopMenuSmall,et)),children:s(V,{actionsMenuAnchorEl:O,handleToggleActionsMenu:function(t){var e=t.currentTarget;B(O?null:e)},handleEdit:function(){return Q(!0)},handleDelete:function(){return tt(!0)},classes:A})})]}),s(f,{className:A.headerDividerRoot}),s("div",{"data-testid":"".concat(G,"_message"),className:Y.cAnnotationContainerContent,children:K?s(S,{initialText:u.attributes.body,assetCompanyId:b,initialPeriod:u.attributes.created_at,initialAttachment:ft,onSend:lt,onClose:function(){return Q(!1)},closeOnEsc:!0}):c(d,{children:[E(u.attributes.body,u.relationships.mentioned_users.data,y,null,pt),ft&&ft.s3_link&&s(L,{attachmentUrl:ft.s3_link,size:"small"})]})})]}),c("div",{"data-testid":"".concat(G,"_comments_").concat(u.attributes.body),className:Y.cAnnotationComments,children:[c("div",{className:Y.cAnnotationCommentsInfo,children:[s(h,{"data-testid":"".concat(G,"_commentButton"),variant:"caption",color:"primary",className:A.link,onClick:function(){return M(!0)},children:"Comment"}),s(P,{commentsCount:at,usersWhoCommented:dt,activeUsersList:ct,currentUser:pt,small:!0})]}),s(W,{annotationId:u.id,commentInputIsOpen:x,setCommentInputIsOpen:M,commentsCount:at,initialCommentsCount:nt,assetCompanyId:b,setCommentsCount:ot,currentUser:pt})]}),$&&s(I,{open:$,text:"Do you really want to delete annotation?",handleClose:function(){return tt(!1)},handleOk:mt,okText:"Delete"})]})};H.propTypes={user:b({id:A.isRequired,first_name:y.isRequired,last_name:y.isRequired,profile_photo:y.isRequired}).isRequired,currentUser:b({}).isRequired,classes:b({}).isRequired,isNative:R.isRequired},V.propTypes={actionsMenuAnchorEl:g([N,null]).isRequired,handleToggleActionsMenu:q.isRequired,classes:b({}).isRequired,handleDelete:q.isRequired,handleEdit:q.isRequired},F.propTypes={included:x(b({})).isRequired,annotation:b({relationships:b({user:b({data:b({id:y.isRequired}).isRequired}).isRequired,mentioned_users:b({data:x(b({})).isRequired}).isRequired}).isRequired,attributes:b({body:y.isRequired,created_at:y.isRequired})}).isRequired,classes:b({}).isRequired,isNative:R,showSuccessNotification:q,width:y.isRequired,assetCompanyId:A.isRequired},F.defaultProps={showSuccessNotification:function(){}};var J=n([M((function(t){return{container:{backgroundColor:"#3b3b3be6",marginBottom:16,marginLeft:26},headerDividerRoot:{margin:"10px 0"},createdAt:{color:t.palette.grey[700],marginLeft:5},link:{cursor:"pointer"},iconButtonRoot:{height:24,width:24,padding:0,margin:"0 -10px 0 5px"}}})),O()])(F);export default J;
1
+ import t from"@babel/runtime/helpers/defineProperty";import e from"moment";import{flowRight as n}from"lodash";import i from"@babel/runtime/helpers/slicedToArray";import r from"@babel/runtime/regenerator";import a from"@babel/runtime/helpers/asyncToGenerator";import o from"@material-ui/core/colors/grey";import{isNativeDetected as s}from"../../../../../../utils/mobileDetect.js";import{jsx as c,jsxs as m,Fragment as d}from"react/jsx-runtime";import{IconButton as l,Menu as u,MenuItem as p,Paper as h,Typography as f,Divider as v}from"@material-ui/core";import{useState as C}from"react";import{deleteAnnotation as b,patchAnnotation as _}from"../../../../../../clients/jsonApi/index.js";import{shape as A,number as y,string as g,oneOf as R,node as q,func as N,arrayOf as x}from"prop-types";import M from"classnames";import{withStyles as I}from"@material-ui/core/styles";import j from"../../../../../ConfirmationDialog.js";import k from"../../../../../Avatar/index.js";import{DELETE_ANNOTATION as T,EDIT_ANNOTATION as w}from"../../../../constants.js";import{useAnnotationsDispatch as D}from"../../../../AnnotationsContext.js";import U from"../../../../../UserCardPopover.js";import{formatMentionText as E}from"../../../../../UserMention/utils/index.js";import S from"../AnnotationInput/index.js";import O,{isWidthUp as z}from"@material-ui/core/withWidth";import B from"@material-ui/icons/MoreVert";import P from"../../../../../CommentsInfo/index.js";import L from"../../../../../Attachment/index.js";import W from"../AnnotationComments/index.js";import Y from"./style.css.js";var G="AppAnnotationItemPo",H=function(t){var e=t.user,n=t.currentUser,i=t.classes;return c("div",{className:Y.cAnnotationUserAvatar,children:s?c(k,{displayName:"".concat(e.first_name," ").concat(e.last_name),imgSrc:e.profile_photo,size:38,className:i.avatar}):c(U,{user:e,currentUser:n,children:c(k,{displayName:"".concat(e.first_name," ").concat(e.last_name),imgSrc:e.profile_photo,size:38,className:i.avatar})})})},V=function(t){var e=t.actionsMenuAnchorEl,n=t.handleToggleActionsMenu,i=t.classes,r=t.handleEdit,a=t.handleDelete;return m(d,{children:[c(l,{"data-testid":"".concat(G,"_menuButton"),"aria-label":"Actions","aria-owns":e?Y.cAnnotationContainerActionsMenu:void 0,"aria-haspopup":"true",className:i.iconButtonRoot,onClick:n,children:c(B,{htmlColor:o[400]})}),m(u,{id:"cAnnotationContainerActionsMenu",anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},anchorEl:e,open:!!e,onClick:n,children:[c(p,{"data-testid":"".concat(G,"_editMenuItem"),onClick:r,children:"Edit"}),c(p,{"data-testid":"".concat(G,"_deleteMenuItem"),onClick:a,children:"Delete"})]})]})},F=function(n){var o,l,u=n.included,p=n.annotation,A=n.assetCompanyId,y=n.classes,g=n.showSuccessNotification,R=n.width,q=C(!1),N=i(q,2),x=N[0],I=N[1],k=C(null),U=i(k,2),O=U[0],B=U[1],F=C(!1),J=i(F,2),K=J[0],Q=J[1],X=C(!1),Z=i(X,2),$=Z[0],tt=Z[1],et=!z("sm",R),nt=p.attributes.comments_count||0,it=C(nt),rt=i(it,2),at=rt[0],ot=rt[1],st=D(),ct=p.relationships.comment_users.data.reduce((function(t,e){var n=e.id,i=u.find((function(t){return t.id===n}));return i&&t.push(i.attributes),t}),[]),mt=ct.map((function(t){var e=t.last_name,n=t.first_name;return"".concat(n," ").concat(e)})),dt=(o=a(r.mark((function t(){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,b(p.id);case 3:t.sent&&st({type:T,id:p.id}),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.error(t.t0);case 10:case"end":return t.stop()}}),t,null,[[0,7]])}))),function(){return o.apply(this,arguments)}),lt=(l=a(r.mark((function t(e,n,i){var a,o;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,a={body:e,active_until:n,attachment:{file_name:i&&i.attachmentName,s3_link:i&&i.attachmentUrl}},t.next=4,_(p.id,a);case 4:o=t.sent,st({type:w,annotation:o,id:p.id}),t.next=12;break;case 8:return t.prev=8,t.t0=t.catch(0),console.error(t.t0),t.abrupt("return");case 12:g("Annotation has been changed"),Q(!1);case 14:case"end":return t.stop()}}),t,null,[[0,8]])}))),function(t,e,n){return l.apply(this,arguments)}),ut=p.relationships.user.data.id,pt=u.find((function(t){var e=t.type,n=t.id;return"user"===e&&n===ut})),ht=pt.attributes,ft=p.attributes.attachment;return m(h,{className:y.container,elevation:0,children:[m("div",{"data-testid":"".concat(G,"_annotation_").concat(p.attributes.body),className:Y.cAnnotationContainer,children:[c(H,{user:ht,classes:y,isNative:s,currentUser:pt}),m("div",{className:Y.cAnnotationContainerTop,children:[m("div",{className:Y.cAnnotationContainerTopMainInfo,children:[c(f,{variant:"body2","data-testid":"".concat(G,"_userName"),children:"".concat(ht.first_name," ").concat(ht.last_name)}),c(f,{"data-testid":"".concat(G,"_addDate"),variant:"caption",className:y.createdAt,children:e(p.attributes.created_at).format("MM/DD/YY H:mm")})]}),c("div",{className:M(Y.cAnnotationContainerTopMenu,t({},Y.cAnnotationContainerTopMenuSmall,et)),children:c(V,{actionsMenuAnchorEl:O,handleToggleActionsMenu:function(t){var e=t.currentTarget;B(O?null:e)},handleEdit:function(){return Q(!0)},handleDelete:function(){return tt(!0)},classes:y})})]}),c(v,{className:y.headerDividerRoot}),c("div",{"data-testid":"".concat(G,"_message"),className:Y.cAnnotationContainerContent,children:K?c(S,{initialText:p.attributes.body,assetCompanyId:A,initialPeriod:p.attributes.created_at,initialAttachment:ft,onSend:lt,onClose:function(){return Q(!1)},closeOnEsc:!0}):m(d,{children:[E(p.attributes.body,p.relationships.mentioned_users.data,s,null,pt),ft&&ft.signed_url&&c(L,{attachmentUrl:ft.signed_url,size:"small"})]})})]}),m("div",{"data-testid":"".concat(G,"_comments_").concat(p.attributes.body),className:Y.cAnnotationComments,children:[m("div",{className:Y.cAnnotationCommentsInfo,children:[c(f,{"data-testid":"".concat(G,"_commentButton"),variant:"caption",color:"primary",className:y.link,onClick:function(){return I(!0)},children:"Comment"}),c(P,{commentsCount:at,usersWhoCommented:mt,activeUsersList:ct,currentUser:pt,small:!0})]}),c(W,{annotationId:p.id,commentInputIsOpen:x,setCommentInputIsOpen:I,commentsCount:at,initialCommentsCount:nt,assetCompanyId:A,setCommentsCount:ot,currentUser:pt})]}),$&&c(j,{open:$,text:"Do you really want to delete annotation?",handleClose:function(){return tt(!1)},handleOk:dt,okText:"Delete"})]})};H.propTypes={user:A({id:y.isRequired,first_name:g.isRequired,last_name:g.isRequired,profile_photo:g.isRequired}).isRequired,currentUser:A({}).isRequired,classes:A({}).isRequired},V.propTypes={actionsMenuAnchorEl:R([q,null]).isRequired,handleToggleActionsMenu:N.isRequired,classes:A({}).isRequired,handleDelete:N.isRequired,handleEdit:N.isRequired},F.propTypes={included:x(A({})).isRequired,annotation:A({relationships:A({user:A({data:A({id:g.isRequired}).isRequired}).isRequired,mentioned_users:A({data:x(A({})).isRequired}).isRequired}).isRequired,attributes:A({body:g.isRequired,created_at:g.isRequired})}).isRequired,classes:A({}).isRequired,showSuccessNotification:N,width:g.isRequired,assetCompanyId:y.isRequired},F.defaultProps={showSuccessNotification:function(){}};var J=n([I((function(t){return{container:{backgroundColor:"#3b3b3be6",marginBottom:16,marginLeft:26},headerDividerRoot:{margin:"10px 0"},createdAt:{color:t.palette.grey[700],marginLeft:5},link:{cursor:"pointer"},iconButtonRoot:{height:24,width:24,padding:0,margin:"0 -10px 0 5px"}}})),O()])(F);export default J;
@@ -1 +1 @@
1
- import"@babel/runtime/helpers/defineProperty";import{formatAssetName as e}from"../../utils/formatting.js";import{jsxs as r,jsx as i}from"react/jsx-runtime";import{Tooltip as s}from"@material-ui/core";import{memo as t}from"react";import"@babel/runtime/helpers/objectWithoutProperties";import a from"prop-types";import o from"classnames";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"react-router";import{UniversalLink as m}from"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import n from"./styles.css.js";var d=function(t){var a=t.primaryAssetName,d=t.secondaryAssetName,c=t.isPrimaryNameVisible,l=t.coordinatesPixelWidth,p=t.primaryAssetLink,y=t.secondaryAssetLink,u=t.isMaximized;return r("div",{className:o(n.assetNameLabelContainer,u&&n.appMaximized),children:[d&&i(s,{title:d,children:i("div",{className:n.seccondaryAssetWrapper,children:i(m,{href:y,className:n.seccondaryAssetLink,children:i("div",{"data-testid":"".concat("AssetNameLabel","_secondaryAsset"),className:o(n.item,n.secondaryAsset),children:e(d,l)})})})}),c&&i(m,{"data-testid":"".concat("AssetNameLabel","_primaryAsset"),href:p||"/feed",children:i("div",{className:n.item,children:e(a,l)})})]})};d.propTypes={isPrimaryNameVisible:a.bool.isRequired,primaryAssetName:a.string.isRequired,secondaryAssetName:a.string,primaryAssetLink:a.any.isRequired,secondaryAssetLink:a.any.isRequired,coordinatesPixelWidth:a.number,isMaximized:a.bool},d.defaultProps={secondaryAssetName:"",coordinatesPixelWidth:void 0,isMaximized:!1};var c=t(d);export default c;
1
+ import"@babel/runtime/helpers/defineProperty";import{formatAssetName as e}from"../../utils/formatting.js";import{jsxs as r,jsx as i}from"react/jsx-runtime";import{Tooltip as s}from"@material-ui/core";import{memo as t}from"react";import"@babel/runtime/helpers/objectWithoutProperties";import a from"prop-types";import o from"classnames";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"react-router";import{UniversalLink as m}from"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import{withSize as n}from"react-sizeme";import d from"./styles.css.js";var c=function(t){var a=t.primaryAssetName,n=t.secondaryAssetName,c=t.isPrimaryNameVisible,l=t.coordinatesPixelWidth,p=t.primaryAssetLink,y=t.secondaryAssetLink,u=t.isMaximized;return r("div",{className:o(d.assetNameLabelContainer,u&&d.appMaximized),children:[n&&i(s,{title:n,children:i("div",{className:d.seccondaryAssetWrapper,children:i(m,{href:y,className:d.seccondaryAssetLink,children:i("div",{"data-testid":"".concat("AssetNameLabel","_secondaryAsset"),className:o(d.item,d.secondaryAsset),children:e(n,l)})})})}),c&&i(m,{"data-testid":"".concat("AssetNameLabel","_primaryAsset"),href:p||"/feed",children:i("div",{className:d.item,children:e(a,l)})})]})};c.propTypes={isPrimaryNameVisible:a.bool.isRequired,primaryAssetName:a.string.isRequired,secondaryAssetName:a.string,primaryAssetLink:a.any.isRequired,secondaryAssetLink:a.any.isRequired,coordinatesPixelWidth:a.number,isMaximized:a.bool},c.defaultProps={secondaryAssetName:"",coordinatesPixelWidth:void 0,isMaximized:!1};var l=t(n()(c));export default l;
@@ -1 +1 @@
1
- import e from'../../ext-esm/style-inject/dist/style-inject.es.js';e(".styles_assetNameLabelContainer__2H_ZY{position:absolute;right:15px;left:15px;z-index:100;display:flex;justify-content:flex-end;margin-top:4px;top:10px}.styles_appMaximized__G2njQ{margin-right:28px}.styles_item__2NqI2{line-height:20px;padding:0 12px;border-radius:10px;background-color:#434343;font-size:.85rem;color:var(--palette-primary-text-1)}.dc-app-container__light-theme .styles_item__2NqI2{background-color:#bdbdbd}.styles_item__2NqI2.styles_secondaryAsset__1wjow{background-color:#d860d8;margin-right:4px;min-width:60px;text-overflow:ellipsis;height:21px;overflow:hidden;white-space:nowrap}.styles_seccondaryAssetWrapper__3jGPp{max-width:20%}.styles_seccondaryAssetLink__1fygu{width:100%;padding:0}");export default{assetNameLabelContainer:"styles_assetNameLabelContainer__2H_ZY",appMaximized:"styles_appMaximized__G2njQ",item:"styles_item__2NqI2",secondaryAsset:"styles_secondaryAsset__1wjow",seccondaryAssetWrapper:"styles_seccondaryAssetWrapper__3jGPp",seccondaryAssetLink:"styles_seccondaryAssetLink__1fygu"};
1
+ import e from'../../ext-esm/style-inject/dist/style-inject.es.js';e(".styles_assetNameLabelContainer__2H_ZY{position:absolute;right:15px;z-index:100;display:flex;justify-content:flex-end;margin-top:4px;top:10px;width:fit-content}.styles_appMaximized__G2njQ{margin-right:28px}.styles_item__2NqI2{line-height:20px;padding:0 12px;border-radius:10px;background-color:#434343;font-size:.85rem;color:var(--palette-primary-text-1)}.dc-app-container__light-theme .styles_item__2NqI2{background-color:#bdbdbd}.styles_item__2NqI2.styles_secondaryAsset__1wjow{background-color:#d860d8;margin-right:4px;min-width:60px;text-overflow:ellipsis;height:21px;overflow:hidden;white-space:nowrap}.styles_seccondaryAssetWrapper__3jGPp{max-width:20%}.styles_seccondaryAssetLink__1fygu{width:100%;padding:0}");export default{assetNameLabelContainer:"styles_assetNameLabelContainer__2H_ZY",appMaximized:"styles_appMaximized__G2njQ",item:"styles_item__2NqI2",secondaryAsset:"styles_secondaryAsset__1wjow",seccondaryAssetWrapper:"styles_seccondaryAssetWrapper__3jGPp",seccondaryAssetLink:"styles_seccondaryAssetLink__1fygu"};
@@ -1 +1 @@
1
- import"@babel/runtime/helpers/defineProperty";import"../../constants/completion.js";import"../../constants/alerts.js";import"lodash";import e from"@babel/runtime/helpers/slicedToArray";import"../../constants/goals.js";import"../../constants/segment.js";import"../../constants/apps.js";import"../../constants/drillstring.js";import"../../constants/notifications.js";import"../../constants/feed.js";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/asyncToGenerator";import t from"@material-ui/core/colors/grey";import a from"../../utils/main.js";import{isNativeDetected as i}from"../../utils/mobileDetect.js";import{getIsImage as o,getIsVideo as r}from"../../utils/fileExtension.js";import{jsx as l,jsxs as n,Fragment as s}from"react/jsx-runtime";import{Dialog as m}from"@material-ui/core";import{useState as c,useCallback as d}from"react";import"querystring";import"uuid/v1";import"../../clients/jsonApi/index.js";import"../../clients/subscriptions.js";import p from"../../effects/useSignedURL.js";import h from"prop-types";import{withStyles as u}from"@material-ui/core/styles";import f from"@material-ui/core/Typography";import g from"../FileTypeIcon.js";import v from"react-player";import b from"@material-ui/core/IconButton";import N from"@material-ui/icons/Image";import w from"@material-ui/icons/SaveAlt";import y from"@material-ui/icons/Fullscreen";import x from"../ImageViewer/index.js";import I from"../GoogleDocsViewer/index.js";import A from"./styles.css.js";var j=t[200],P=t[400],L=t[600],z={label:"small",value:135},F={label:"medium",value:300},U={fileImage:function(e,t){return{maxWidth:"100%",borderRadius:4,overflow:"hidden",maxHeight:t===z.label?z.value:F.value,display:e?"initial":"none",cursor:"pointer"}},fileDownloadWrapper:{marginTop:10,padding:"10px 10px 10px 5px",border:"1px solid ".concat(L),borderRadius:3,maxWidth:500,width:"75%"},imagePlaceholder:{position:"relative",backgroundColor:j,borderRadius:3,marginTop:10,height:135,width:135}},W=function(e){return n(s,{children:[n("div",{onClick:e.openLightbox,className:A.cAttachmentImg,children:[l("img",{"data-testid":"".concat("Attachment","_image"),src:e.attachmentUrl,style:U.fileImage(e.imageIsLoaded,e.size),alt:"Attachment",onLoad:e.setImageIsLoaded}),l("div",{"data-testid":"".concat("Attachment","_button"),className:A.cAttachmentImgPreviwBtn,children:l(y,{})})]}),!e.imageIsLoaded&&l("div",{style:U.imagePlaceholder,children:l(N,{"data-testid":"".concat("Attachment","_placeholder"),className:e.classes.imageIconRoot,htmlColor:P,fontSize:"large"})}),e.lightboxIsOpen&&l(x,{mainSrc:e.attachmentUrl,imagePadding:50,onAfterOpen:e.handleLightboxOpen,onCloseRequest:e.handleLightboxClose})]})},R=function(e){return n("div",{className:A.cAttachmentFileWrapper,children:[n("div",{className:A.cAttachmentFileDownloadWrapper,style:U.fileDownloadWrapper,onClick:e.openPreview,children:[l(g,{fileName:e.displayName||e.attachmentUrl,className:A.cAttachmentFileDownloadWrapperFileIcon,size:e.small?25:50}),l("div",{"data-testid":"".concat("Attachment","_name"),className:A.cAttachmentFileDownloadWrapperFileName,children:l(f,{variant:"subtitle2",noWrap:!0,className:e.classes.fileName,children:a.getFileNameWithExtensionFromPath(e.displayName||e.attachmentUrl)})}),l(m,{open:e.previewIsOpen,onClose:e.closePreview,classes:{root:e.classes.dialogRoot,paper:i?e.classes.nativeDialog:e.classes.dialog},children:l(I,{fileUrl:e.attachmentUrl,fileName:a.getFileNameWithExtensionFromPath(e.displayName||e.attachmentUrl),fileSize:e.attachmentSize,onClose:e.closePreview,width:"100%",height:"100%"})})]}),l("a",{download:e.displayName,href:e.attachmentUrl,className:A.cAttachmentFileDownloadWrapperForm,children:l(b,{"data-testid":"".concat("Attachment","_downloadButton"),type:"submit",children:l(w,{className:e.classes.downloadIcon})})})]})};function D(t){var a=c(!1),n=e(a,2),s=n[0],m=n[1],h=c(!1),u=e(h,2),f=u[0],g=u[1],b=c(!1),N=e(b,2),w=N[0],y=N[1],x=t.displayName||t.attachmentUrl,I=o(x),j=r(x),P=p(t.fileName),L=t.attachmentUrl||P,U=d((function(e){return e.preventDefault()}),[]);return I?l("div",{className:A.cAttachment,children:l(W,{size:t.size,openLightbox:function(){return g(!0)},attachmentUrl:L,setImageIsLoaded:function(){return m(!0)},imageIsLoaded:s,lightboxIsOpen:f,handleLightboxOpen:function(){i&&document.documentElement.addEventListener("touchmove",U,{passive:!1})},handleLightboxClose:function(){i&&document.documentElement.removeEventListener("touchmove",U),g(!1)},classes:t.classes})}):j&&v.canPlay(L)?l("div",{className:A.cAttachment,children:l(v,{"data-testid":"".concat("Attachment","_player"),className:A.cAttachmentReactPlayer,url:L,config:{file:{attributes:{preload:"metadata"}}},controls:!0,height:t.size===z.label?z.value:F.value,width:null})}):l("div",{className:A.cAttachment,children:l(R,{attachmentUrl:L,attachmentSize:t.attachmentSize,displayName:t.displayName,openPreview:function(){return y(!0)},closePreview:function(e){e.stopPropagation(),y(!1)},previewIsOpen:w,classes:t.classes,small:t.small})})}D.propTypes={attachmentUrl:h.string.isRequired,attachmentSize:h.number,displayName:h.string,fileName:h.string,size:h.oneOf([z.label,F.label]),classes:h.shape({}).isRequired,small:h.bool},D.defaultProps={displayName:null,fileName:null,attachmentSize:void 0,size:F.label,small:!1};var S=u((function(e){return{imageIconRoot:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},dialog:{width:"95%",height:"95%",maxWidth:"100%",position:"relative"},nativeDialog:{width:"100%",height:"100%",maxWidth:"100%",maxHeight:"100%",margin:0},dialogRoot:{backgroundColor:"rgba(0, 0, 0, 0.85)"},fileName:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},downloadIcon:{color:L,"&:hover":{color:e.palette.common.white}}}}))(D);export default S;
1
+ import"@babel/runtime/helpers/defineProperty";import"../../constants/completion.js";import"../../constants/alerts.js";import"lodash";import e from"@babel/runtime/helpers/slicedToArray";import"../../constants/goals.js";import"../../constants/segment.js";import"../../constants/apps.js";import"../../constants/drillstring.js";import"../../constants/notifications.js";import"../../constants/feed.js";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/asyncToGenerator";import t from"@material-ui/core/colors/grey";import a from"../../utils/main.js";import{isNativeDetected as i}from"../../utils/mobileDetect.js";import{getIsImage as o,getIsVideo as r}from"../../utils/fileExtension.js";import{jsx as l,jsxs as n,Fragment as s}from"react/jsx-runtime";import{Dialog as m}from"@material-ui/core";import{useState as c,useCallback as d}from"react";import"querystring";import"uuid/v1";import"../../clients/jsonApi/index.js";import"../../clients/subscriptions.js";import p from"../../effects/useSignedURL.js";import h from"prop-types";import{withStyles as u}from"@material-ui/core/styles";import f from"@material-ui/core/Typography";import g from"../FileTypeIcon.js";import v from"react-player";import b from"@material-ui/core/IconButton";import N from"@material-ui/icons/Image";import w from"@material-ui/icons/SaveAlt";import y from"@material-ui/icons/Fullscreen";import x from"../ImageViewer/index.js";import I from"../GoogleDocsViewer/index.js";import A from"./styles.css.js";var j=t[200],P=t[400],L=t[600],U={label:"small",value:135},z={label:"medium",value:300},F={fileImage:function(e,t){return{maxWidth:"100%",borderRadius:4,overflow:"hidden",maxHeight:t===U.label?U.value:z.value,display:e?"initial":"none",cursor:"pointer"}},fileDownloadWrapper:{marginTop:10,padding:"10px 10px 10px 5px",border:"1px solid ".concat(L),borderRadius:3,maxWidth:500,width:"75%"},imagePlaceholder:{position:"relative",backgroundColor:j,borderRadius:3,marginTop:10,height:135,width:135}},W=function(e){return n(s,{children:[n("div",{onClick:e.openLightbox,className:A.cAttachmentImg,children:[l("img",{"data-testid":"".concat("Attachment","_image"),src:e.attachmentUrl,style:F.fileImage(e.imageIsLoaded,e.size),alt:"Attachment",onLoad:e.setImageIsLoaded}),l("div",{"data-testid":"".concat("Attachment","_button"),className:A.cAttachmentImgPreviwBtn,children:l(y,{})})]}),!e.imageIsLoaded&&l("div",{style:F.imagePlaceholder,children:l(N,{"data-testid":"".concat("Attachment","_placeholder"),className:e.classes.imageIconRoot,htmlColor:P,fontSize:"large"})}),e.lightboxIsOpen&&l(x,{mainSrc:e.attachmentUrl,imagePadding:50,onAfterOpen:e.handleLightboxOpen,onCloseRequest:e.handleLightboxClose})]})},R=function(e){return n("div",{className:A.cAttachmentFileWrapper,children:[n("div",{className:A.cAttachmentFileDownloadWrapper,style:F.fileDownloadWrapper,onClick:e.openPreview,children:[l(g,{fileName:e.displayName||e.attachmentUrl,className:A.cAttachmentFileDownloadWrapperFileIcon,size:e.small?25:50}),l("div",{"data-testid":"".concat("Attachment","_name"),className:A.cAttachmentFileDownloadWrapperFileName,children:l(f,{variant:"subtitle2",noWrap:!0,className:e.classes.fileName,children:a.getFileNameWithExtensionFromPath(e.displayName||e.attachmentUrl)})}),l(m,{open:e.previewIsOpen,onClose:e.closePreview,classes:{root:e.classes.dialogRoot,paper:i?e.classes.nativeDialog:e.classes.dialog},children:l(I,{fileUrl:e.attachmentUrl,fileName:a.getFileNameWithExtensionFromPath(e.displayName||e.attachmentUrl),fileSize:e.attachmentSize,onClose:e.closePreview,width:"100%",height:"100%"})})]}),l("a",{download:e.displayName,href:e.attachmentUrl,className:A.cAttachmentFileDownloadWrapperForm,children:l(b,{"data-testid":"".concat("Attachment","_downloadButton"),type:"submit",children:l(w,{className:e.classes.downloadIcon})})})]})};function D(t){var a=c(!1),n=e(a,2),s=n[0],m=n[1],h=c(!1),u=e(h,2),f=u[0],g=u[1],b=c(!1),N=e(b,2),w=N[0],y=N[1],x=t.displayName||t.attachmentUrl,I=o(x),j=r(x),P=p(!t.attachmentUrl&&t.fileName),L=t.attachmentUrl||P,F=d((function(e){return e.preventDefault()}),[]);return I?l("div",{className:A.cAttachment,children:l(W,{size:t.size,openLightbox:function(){return g(!0)},attachmentUrl:L,setImageIsLoaded:function(){return m(!0)},imageIsLoaded:s,lightboxIsOpen:f,handleLightboxOpen:function(){i&&document.documentElement.addEventListener("touchmove",F,{passive:!1})},handleLightboxClose:function(){i&&document.documentElement.removeEventListener("touchmove",F),g(!1)},classes:t.classes})}):j&&v.canPlay(L)?l("div",{className:A.cAttachment,children:l(v,{"data-testid":"".concat("Attachment","_player"),className:A.cAttachmentReactPlayer,url:L,config:{file:{attributes:{preload:"metadata"}}},controls:!0,height:t.size===U.label?U.value:z.value,width:null})}):l("div",{className:A.cAttachment,children:l(R,{attachmentUrl:L,attachmentSize:t.attachmentSize,displayName:t.displayName,openPreview:function(){return y(!0)},closePreview:function(e){e.stopPropagation(),y(!1)},previewIsOpen:w,classes:t.classes,small:t.small})})}D.propTypes={attachmentUrl:h.string.isRequired,attachmentSize:h.number,displayName:h.string,fileName:h.string,size:h.oneOf([U.label,z.label]),classes:h.shape({}).isRequired,small:h.bool},D.defaultProps={displayName:null,fileName:null,attachmentSize:void 0,size:z.label,small:!1};var S=u((function(e){return{imageIconRoot:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},dialog:{width:"95%",height:"95%",maxWidth:"100%",position:"relative"},nativeDialog:{width:"100%",height:"100%",maxWidth:"100%",maxHeight:"100%",margin:0},dialogRoot:{backgroundColor:"rgba(0, 0, 0, 0.85)"},fileName:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},downloadIcon:{color:L,"&:hover":{color:e.palette.common.white}}}}))(D);export default S;
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/toConsumableArray";import{showSuccessNotification as t}from"../../../../utils/notificationToasts.js";import"../../../../utils/index.js";import{jsxs as r,jsx as o}from"react/jsx-runtime";import{makeStyles as i,Typography as l,Accordion as c,AccordionSummary as a,AccordionDetails as s,List as m}from"@material-ui/core";import{memo as p}from"react";import{string as d,arrayOf as u,shape as f,func as h}from"prop-types";import w from"classnames";import{ExpandMore as y}from"@material-ui/icons";import x from"./AssetSearch.js";import b from"./SectionItem.js";import g from"./WellListItem.js";function v(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 j(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?v(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}var O=i((function(e){return{content:{marginTop:"24px"},sectionItem:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",padding:"8px",fontSize:"12px",fontWeight:"normal",color:e.palette.primary.text6,borderTop:"1px solid ".concat(e.palette.primary.text8),"&:last-child":{borderBottom:"1px solid ".concat(e.palette.primary.text8)}},disabledSectionItem:{color:e.palette.primary.text8},wellList:{width:"100%",margin:0,padding:0},searchContainer:{display:"flex",justifyContent:"space-between",marginBottom:"24px",alignItems:"center"},advancedSearch:{fontSize:"14px",fontWeight:500,color:"#03BCD4",cursor:"pointer","&:hover":{textDecoration:"underline"}}}}));function S(e){var i=e.company,p=e.wellSections,d=e.getWellName,u=e.onChangeWellSections,f=e.onExploreMode,h=O(),v=function(e,n){var t=p.find((function(n){return n.name===e.name})).wells.map((function(e){return e.id})),r=p.map((function(e){var r=e.wells.map((function(e){return t.includes(e.id)?j(j({},e),{},{checked:n}):j({},e)}));return j(j({},e),{},{wells:r})}));u(r)},S=function(e){var n=p.map((function(n){return n.name===e.name?j(j({},n),{},{expanded:!n.expanded}):n}));u(n)},C=function(e){var n=p.map((function(n){var t=n.wells.map((function(n){return n.id===e.id?j(j({},n),{},{checked:!n.checked}):n}));return j(j({},n),{},{wells:t})}));u(n)},N=function(e){v(e,!0)},I=function(e){v(e,!1)};return r("div",{className:h.content,children:[r("div",{className:h.searchContainer,children:[o(x,{company:+i,onClickAsset:function(e,r){var o=p.map((function(t){if("Search Results"===t.name){var o=n(t.wells);return t.wells.find((function(n){return n.id===e}))||o.push({id:e,checked:!0,name:r,kind:"manual"}),j(j({},t),{},{wells:o})}return j(j({},t),{},{wells:t.wells.map((function(n){return n.id===e?j(j({},n),{},{checked:!0}):n}))})}));u(o),t("Offset well successfully added!")},onExploreMode:f}),o(l,{className:h.advancedSearch,onClick:function(){f()},children:"Advanced Search"})]}),(p||[]).map((function(e){return 0===e.wells.length?o("div",{className:w(h.sectionItem,h.disabledSectionItem),children:o(b,{section:e,disabled:!0})},"empty-".concat(e.name)):o("div",{className:h.sectionItem,children:r(c,{expand:e.expanded,onChange:function(){return S(e)},children:[o(a,{expandIcon:o(y,{}),style:{width:"100%"},children:o(b,{section:e,onExpandCollapse:S,onSelectAll:N,onClearAll:I})}),o(s,{children:o(m,{dense:!0,className:h.wellList,children:e.wells.map((function(n){return o(g,{well:n,wellName:d(e.wells,n.id),rigName:n.rigName,onToggleWell:C},"well-".concat(e.name,"-").concat(n.id))}))})})]})},"section-".concat(e.name))}))]})}S.propTypes={company:d.isRequired,wellSections:u(f({})),getWellName:h.isRequired,onChangeWellSections:h.isRequired,onExploreMode:h.isRequired},S.defaultProps={wellSections:[]};var C=p(S);export default C;
1
+ import e from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/toConsumableArray";import{showSuccessNotification as t}from"../../../../utils/notificationToasts.js";import"../../../../utils/index.js";import{jsxs as r,jsx as o}from"react/jsx-runtime";import{makeStyles as i,Typography as l,Accordion as c,AccordionSummary as a,AccordionDetails as s,List as m}from"@material-ui/core";import{memo as p}from"react";import{string as d,arrayOf as u,shape as f,func as h}from"prop-types";import w from"classnames";import{ExpandMore as y}from"@material-ui/icons";import x from"./AssetSearch.js";import b from"./SectionItem.js";import g from"./WellListItem.js";function v(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 j(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?v(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}var O=i((function(e){return{content:{marginTop:"24px"},sectionItem:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",padding:"8px",fontSize:"12px",fontWeight:"normal",color:e.palette.primary.text6,borderTop:"1px solid ".concat(e.palette.primary.text8),"&:last-child":{borderBottom:"1px solid ".concat(e.palette.primary.text8)}},disabledSectionItem:{color:e.palette.primary.text8},wellList:{width:"100%",margin:0,padding:0},searchContainer:{display:"flex",justifyContent:"space-between",marginBottom:"24px",alignItems:"center"},advancedSearch:{fontSize:"14px",fontWeight:500,color:"#03BCD4",cursor:"pointer","&:hover":{textDecoration:"underline"}}}}));function S(e){var i=e.company,p=e.wellSections,d=e.getWellName,u=e.onChangeWellSections,f=e.onExploreMode,h=O(),v=function(e,n){var t=p.find((function(n){return n.name===e.name})).wells.map((function(e){return e.id})),r=p.map((function(e){var r=e.wells.map((function(e){return t.includes(e.id)?j(j({},e),{},{checked:n}):j({},e)}));return j(j({},e),{},{wells:r})}));u(r)},S=function(e){var n=p.map((function(n){return n.name===e.name?j(j({},n),{},{expanded:!n.expanded}):n}));u(n)},C=function(e){var n=p.map((function(n){var t=n.wells.map((function(n){return n.id===e.id?j(j({},n),{},{checked:!n.checked}):n}));return j(j({},n),{},{wells:t})}));u(n)},N=function(e){v(e,!0)},I=function(e){v(e,!1)};return r("div",{className:h.content,children:[r("div",{className:h.searchContainer,children:[o(x,{company:+i,onClickAsset:function(e,r){var o=p.map((function(t){if("Search Results"===t.name){var o=n(t.wells);return t.wells.find((function(n){return n.id===e}))||o.push({id:e,checked:!0,name:r,kind:"manual"}),j(j({},t),{},{wells:o})}return j(j({},t),{},{wells:t.wells.map((function(n){return n.id===e?j(j({},n),{},{checked:!0}):n}))})}));u(o),t("Offset well successfully added!")},onExploreMode:f}),o(l,{className:h.advancedSearch,onClick:function(){f()},children:"Advanced Search"})]}),(p||[]).map((function(e){return 0===e.wells.length?o("div",{className:w(h.sectionItem,h.disabledSectionItem),children:o(b,{section:e,disabled:!0})},"empty-".concat(e.name)):o("div",{className:h.sectionItem,children:r(c,{expanded:e.expanded,onChange:function(){return S(e)},children:[o(a,{expandIcon:o(y,{}),style:{width:"100%"},children:o(b,{section:e,onExpandCollapse:S,onSelectAll:N,onClearAll:I})}),o(s,{children:o(m,{dense:!0,className:h.wellList,children:e.wells.map((function(n){return o(g,{well:n,wellName:d(e.wells,n.id),rigName:n.rigName,onToggleWell:C},"well-".concat(e.name,"-").concat(n.id))}))})})]})},"section-".concat(e.name))}))]})}S.propTypes={company:d.isRequired,wellSections:u(f({})),getWellName:h.isRequired,onChangeWellSections:h.isRequired,onExploreMode:h.isRequired},S.defaultProps={wellSections:[]};var C=p(S);export default C;
@@ -1 +1 @@
1
- import"../../../constants/completion.js";import"../../../constants/alerts.js";import{get as t}from"lodash";import{DEV_CENTER_CLI_APP_ID as n}from"../../../constants/devcenter.js";import"../../../constants/goals.js";import{SEGMENTS as e}from"../../../constants/segment.js";import"../../../constants/apps.js";import"../../../constants/drillstring.js";import"../../../constants/notifications.js";import"../../../constants/feed.js";import{getAppName as a}from"../../../utils/devcenter.js";import{jsxs as s,jsx as i}from"react/jsx-runtime";import o from"prop-types";import"../../Annotations/AnnotationsContext.js";import"../../Annotations/components/AnnotationsList/index.js";import r from"../../Annotations/components/LastAnnotation/index.js";import p from"./VersionBadge.js";import d from"./PadMode.js";import l from"../../AssetNameLabel/index.js";import c from"./AppHeader.css.js";function m(o){var m,u,f,h,v,A,g,L,b,j=o.app,_=o.appLastAnnotation,x=o.appSettings,w=o.badge,C=o.classes,N=o.coordinates,y=o.currentUser,I=o.fracFleet,D=o.isMaximized,S=o.onSettingChange,H=o.openAnnotationsList,R=o.rig,M=o.showLastAnnotation,W=o.updateCurrentDashboardAppLastAnnotation,q=o.well,F=o.wells,P=a(j),k=null==j||null===(m=j.package)||void 0===m||null===(u=m.manifest)||void 0===u||null===(f=u.application)||void 0===f?void 0:f.subtitle,z=null!==(h=null==j||null===(v=j.package)||void 0===v||null===(A=v.manifest)||void 0===A||null===(g=A.application)||void 0===g||null===(L=g.segments)||void 0===L?void 0:L[0])&&void 0!==h?h:e.DRILLING,O=z===e.DRILLING,T=(null==j?void 0:j.settings)||{},U=T.wellId,G=T.rigId,V=T.fracFleetId,B=T.padId,E=B&&(null==I||null===(b=I.pad_frac_fleets.find((function(t){return t.pad.id===B})))||void 0===b?void 0:b.pad),J=O?null==R?void 0:R.name:null==I?void 0:I.name,K=O?U&&(null==q?void 0:q.name):B&&(null==E?void 0:E.name),Q=!!(U||G||V),X=null!=I&&I.current_pad_id?"assets/types/pad/".concat(null==I?void 0:I.current_pad_id):null,Y=O?J&&"assets/".concat(null==q?void 0:q.asset_id):X,Z=B&&"assets/types/pad/".concat(B),$=j&&j.id===n;return s("div",{className:C.appHeader,children:[s("div",{className:C.appHeaderTitleWrapper,children:[s("div",{children:[s("div",{className:c.titleWrapper,children:[i("h6",{"data-testid":"".concat("DevCenter_AppHeader","_name"),className:c.title,children:P}),i(p,{app:j}),z===e.COMPLETION&&i(d,{fracFleet:I,wells:F,well:q,onSettingChange:S,appSettings:x})]}),w]}),j&&N&&i(l,{isPrimaryNameVisible:Q,primaryAssetName:J,secondaryAssetName:K,coordinatesPixelWidth:N.pixelWidth,primaryAssetLink:!$&&Y,secondaryAssetLink:!$&&Z,isMaximized:D})]}),k&&i("h6",{"data-testid":"".concat("DevCenter_AppHeader","_subtitle"),className:c.subtitle,children:k}),M&&_&&i(r,{dashboardAppId:j.id,appId:t(j,["app","id"]),annotation:_,openAnnotationsList:H,updateCurrentDashboardAppLastAnnotation:W,currentUser:y})]})}m.propTypes={app:o.object.isRequired,badge:o.node,classes:o.shape({appHeader:o.string,appHeaderTitleWrapper:o.string}),showLastAnnotation:o.bool,currentUser:o.shape({}),appLastAnnotation:o.shape({}),updateCurrentDashboardAppLastAnnotation:o.func,openAnnotationsList:o.func,rig:o.shape({name:o.string,asset_id:o.number}),well:o.shape({name:o.string,asset_id:o.number}),fracFleet:o.shape({name:o.string,current_pad_id:o.number,pad_frac_fleets:o.arrayOf(o.shape({pad:o.shape({id:o.number.isRequired}).isRequired})).isRequired}),wells:o.arrayOf(o.shape({})),coordinates:o.shape({pixelWidth:o.number.isRequired}),isMaximized:o.bool,appSettings:o.shape({}),onSettingChange:o.func},m.defaultProps={appLastAnnotation:null,appSettings:void 0,badge:null,classes:{},coordinates:void 0,currentUser:void 0,fracFleet:null,isMaximized:!1,onSettingChange:void 0,openAnnotationsList:void 0,rig:null,showLastAnnotation:!0,updateCurrentDashboardAppLastAnnotation:function(){},well:null,wells:null};export default m;
1
+ import"../../../constants/completion.js";import"../../../constants/alerts.js";import{get as n}from"lodash";import{DEV_CENTER_CLI_APP_ID as t}from"../../../constants/devcenter.js";import"../../../constants/goals.js";import{SEGMENTS as e}from"../../../constants/segment.js";import"../../../constants/apps.js";import"../../../constants/drillstring.js";import"../../../constants/notifications.js";import"../../../constants/feed.js";import{getAppName as a}from"../../../utils/devcenter.js";import{isDevOrQAEnv as s}from"../../../utils/env.js";import"../../../utils/index.js";import{jsx as i,jsxs as o}from"react/jsx-runtime";import r from"prop-types";import"../../Annotations/AnnotationsContext.js";import"../../Annotations/components/AnnotationsList/index.js";import p from"../../Annotations/components/LastAnnotation/index.js";import l from"./VersionBadge.js";import d from"./PadMode.js";import c from"../../AssetNameLabel/index.js";import m from"./AppHeaderNew.js";import u from"./AppHeader.css.js";function h(r){var h,f,A,g,v,L,b,j,_,w=r.app,x=r.appLastAnnotation,C=r.appSettings,N=r.badge,y=r.classes,I=r.coordinates,S=r.currentUser,D=r.fracFleet,H=r.isMaximized,M=r.onSettingChange,R=r.openAnnotationsList,F=r.rig,W=r.showLastAnnotation,q=r.updateCurrentDashboardAppLastAnnotation,z=r.well,O=r.wells,P=r.children;if(s)return i(m,{app:w,appLastAnnotation:x,appSettings:C,badge:N,classes:y,coordinates:I,currentUser:S,fracFleet:D,isMaximized:H,onSettingChange:M,openAnnotationsList:R,rig:F,showLastAnnotation:W,updateCurrentDashboardAppLastAnnotation:q,well:z,wells:O,children:P});var U=a(w),k=null==w||null===(h=w.package)||void 0===h||null===(f=h.manifest)||void 0===f||null===(A=f.application)||void 0===A?void 0:A.subtitle,T=null!==(g=null==w||null===(v=w.package)||void 0===v||null===(L=v.manifest)||void 0===L||null===(b=L.application)||void 0===b||null===(j=b.segments)||void 0===j?void 0:j[0])&&void 0!==g?g:e.DRILLING,G=T===e.DRILLING,V=(null==w?void 0:w.settings)||{},B=V.wellId,E=V.rigId,J=V.fracFleetId,K=V.padId,Q=K&&(null==D||null===(_=D.pad_frac_fleets.find((function(n){return n.pad.id===K})))||void 0===_?void 0:_.pad),X=G?null==F?void 0:F.name:null==D?void 0:D.name,Y=G?B&&(null==z?void 0:z.name):K&&(null==Q?void 0:Q.name),Z=!!(B||E||J),$=null!=D&&D.current_pad_id?"assets/types/pad/".concat(null==D?void 0:D.current_pad_id):null,nn=G?X&&"assets/".concat(null==z?void 0:z.asset_id):$,tn=K&&"assets/types/pad/".concat(K),en=w&&w.id===t;return o("div",{className:y.appHeader,children:[o("div",{className:y.appHeaderTitleWrapper,children:[o("div",{children:[o("div",{className:u.titleWrapper,children:[i("h6",{"data-testid":"".concat("DevCenter_AppHeader","_name"),className:u.title,children:U}),i(l,{app:w}),T===e.COMPLETION&&i(d,{fracFleet:D,wells:O,well:z,onSettingChange:M,appSettings:C})]}),N]}),w&&I&&i(c,{isPrimaryNameVisible:Z,primaryAssetName:X,secondaryAssetName:Y,coordinatesPixelWidth:I.pixelWidth,primaryAssetLink:!en&&nn,secondaryAssetLink:!en&&tn,isMaximized:H})]}),k&&i("h6",{"data-testid":"".concat("DevCenter_AppHeader","_subtitle"),className:u.subtitle,children:k}),W&&x&&i(p,{dashboardAppId:w.id,appId:n(w,["app","id"]),annotation:x,openAnnotationsList:R,updateCurrentDashboardAppLastAnnotation:q,currentUser:S})]})}h.propTypes={app:r.object.isRequired,badge:r.node,classes:r.shape({appHeader:r.string,appHeaderTitleWrapper:r.string}),showLastAnnotation:r.bool,currentUser:r.shape({}),appLastAnnotation:r.shape({}),updateCurrentDashboardAppLastAnnotation:r.func,openAnnotationsList:r.func,rig:r.shape({name:r.string,asset_id:r.number}),well:r.shape({name:r.string,asset_id:r.number}),fracFleet:r.shape({name:r.string,current_pad_id:r.number,pad_frac_fleets:r.arrayOf(r.shape({pad:r.shape({id:r.number.isRequired}).isRequired})).isRequired}),wells:r.arrayOf(r.shape({})),coordinates:r.shape({pixelWidth:r.number.isRequired}),isMaximized:r.bool,appSettings:r.shape({}),onSettingChange:r.func,children:r.arrayOf(r.node)},h.defaultProps={appLastAnnotation:null,appSettings:void 0,badge:null,classes:{},coordinates:void 0,currentUser:void 0,fracFleet:null,isMaximized:!1,onSettingChange:void 0,openAnnotationsList:void 0,rig:null,showLastAnnotation:!0,updateCurrentDashboardAppLastAnnotation:function(){},well:null,wells:null,children:null};export default h;
@@ -0,0 +1 @@
1
+ import e from'../../../ext-esm/style-inject/dist/style-inject.es.js';e(".AppHeaderNew_appHeaderContainer__1Jw7S{display:flex}.AppHeaderNew_titleBlock__2Hcti{display:inline;width:auto;padding-right:8px}.AppHeaderNew_headerComponents__3IHT4,.AppHeaderNew_titleBlock__2Hcti{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.AppHeaderNew_headerComponents__3IHT4{display:flex;width:100%;justify-content:flex-end}.AppHeaderNew_padModeSelect__2TzNO{height:24px}.AppHeaderNew_padModeSelect__2TzNO>div:first-child{padding-top:0!important}.AppHeaderNew_smallPadModeSelect__3_IUP{height:24px}.AppHeaderNew_smallPadModeSelect__3_IUP>div:first-child{padding-left:0;padding-top:8px;padding-bottom:0}.AppHeaderNew_titleWrapper__1COp-{display:flex;align-items:center}.AppHeaderNew_title__3HPRS{margin:0 8px 0 1px;font-size:18px;font-weight:500;line-height:24px}.AppHeaderNew_subtitle__2SNhn,.AppHeaderNew_title__3HPRS{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.AppHeaderNew_subtitle__2SNhn{color:#888;margin:0 0 0 1px;font-size:12px;font-weight:400;line-height:16px}.AppHeaderNew_mediumSizeContent__1YMaM{margin-top:8px;justify-content:flex-start}.AppHeaderNew_mediumSizeContent__1YMaM .AppHeaderNew_headerChildren__1oNXF{padding:0}.AppHeaderNew_headerChildren__1oNXF{display:flex;padding:5px 16px 12px}.AppHeaderNew_headerChildren__1oNXF,.AppHeaderNew_headerChildren__1oNXF>*{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}");export default{appHeaderContainer:"AppHeaderNew_appHeaderContainer__1Jw7S",titleBlock:"AppHeaderNew_titleBlock__2Hcti",headerComponents:"AppHeaderNew_headerComponents__3IHT4",padModeSelect:"AppHeaderNew_padModeSelect__2TzNO",smallPadModeSelect:"AppHeaderNew_smallPadModeSelect__3_IUP",titleWrapper:"AppHeaderNew_titleWrapper__1COp-",title:"AppHeaderNew_title__3HPRS",subtitle:"AppHeaderNew_subtitle__2SNhn",mediumSizeContent:"AppHeaderNew_mediumSizeContent__1YMaM",headerChildren:"AppHeaderNew_headerChildren__1oNXF"};
@@ -0,0 +1 @@
1
+ import"../../../constants/completion.js";import"../../../constants/alerts.js";import{get as e}from"lodash";import n from"@babel/runtime/helpers/slicedToArray";import{DEV_CENTER_CLI_APP_ID as t}from"../../../constants/devcenter.js";import"../../../constants/goals.js";import{SEGMENTS as a}from"../../../constants/segment.js";import"../../../constants/apps.js";import"../../../constants/drillstring.js";import"../../../constants/notifications.js";import"../../../constants/feed.js";import{getAppName as i,getAppSegment as s}from"../../../utils/devcenter.js";import{jsxs as o,Fragment as r,jsx as l}from"react/jsx-runtime";import{useRef as d,useState as p,useEffect as c}from"react";import m from"prop-types";import u from"classnames";import"../../Annotations/AnnotationsContext.js";import"../../Annotations/components/AnnotationsList/index.js";import h from"../../Annotations/components/LastAnnotation/index.js";import f from"./VersionBadge.js";import v from"./PadMode.js";import A from"../../AssetNameLabel/index.js";import g from"./AppHeaderNew.css.js";import{getAppDimension as L}from"./utils.js";var b="EXTRA_LARGE",j="SMALL";function w(m){var w,C,N,_,S=m.app,x=m.appLastAnnotation,y=m.appSettings,M=m.badge,I=m.classes,H=m.coordinates,R=m.currentUser,W=m.fracFleet,D=m.isMaximized,z=m.onSettingChange,F=m.openAnnotationsList,P=m.rig,T=m.showLastAnnotation,q=m.updateCurrentDashboardAppLastAnnotation,O=m.well,k=m.wells,U=m.children,E=null==H?void 0:H.pixelWidth,B=L(E),G=i(S),V=null==S||null===(w=S.package)||void 0===w||null===(C=w.manifest)||void 0===C||null===(N=C.application)||void 0===N?void 0:N.subtitle,X=s(S),J=X===a.DRILLING,K=(null==S?void 0:S.settings)||{},Q=K.wellId,Y=K.rigId,Z=K.fracFleetId,$=K.padId,ee=$&&(null==W||null===(_=W.pad_frac_fleets.find((function(e){return e.pad.id===$})))||void 0===_?void 0:_.pad),ne=J?null==P?void 0:P.name:null==W?void 0:W.name,te=J?Q&&(null==O?void 0:O.name):$&&(null==ee?void 0:ee.name),ae=!!(Q||Y||Z),ie=null!=W&&W.current_pad_id?"assets/types/pad/".concat(null==W?void 0:W.current_pad_id):null,se=J?ne&&"assets/".concat(null==O?void 0:O.asset_id):ie,oe=$&&"assets/types/pad/".concat($),re=S&&S.id===t,le=d(null),de=p({width:0}),pe=n(de,2),ce=pe[0],me=pe[1],ue=p(0),he=n(ue,2),fe=he[0],ve=he[1];return c((function(){var e;ve(E-(null==ce?void 0:ce.width)-34-(null==le||null===(e=le.current)||void 0===e?void 0:e.offsetWidth))}),[null==ce?void 0:ce.width,E]),o(r,{children:[o("div",{className:u(g.appHeaderContainer,I.appHeader),children:[o("div",{className:g.titleBlock,children:[o("div",{className:I.appHeaderTitleWrapper,ref:le,children:[o("div",{className:g.titleWrapper,children:[l("h6",{"data-testid":"".concat("DevCenter_AppHeader","_name"),className:g.title,children:G}),l(f,{app:S})]}),M]}),V&&l("h6",{"data-testid":"".concat("DevCenter_AppHeader","_subtitle"),className:g.subtitle,children:V})]}),o("div",{className:g.headerComponents,style:{width:"".concat(fe,"px")},children:[B===b&&l("div",{className:g.headerChildren,children:U}),X===a.COMPLETION&&B!==j&&l("div",{className:g.padModeSelect,children:l(v,{fracFleet:W,wells:k,well:O,onSettingChange:z,appSettings:y})})]}),S&&H&&l(A,{isPrimaryNameVisible:ae,primaryAssetName:ne,secondaryAssetName:te,coordinatesPixelWidth:H.pixelWidth,primaryAssetLink:!re&&se,secondaryAssetLink:!re&&oe,isMaximized:D,onSize:function(e){return me(e)}}),T&&x&&l(h,{dashboardAppId:S.id,appId:e(S,["app","id"]),annotation:x,openAnnotationsList:F,updateCurrentDashboardAppLastAnnotation:q,currentUser:R})]}),B===j&&l("div",{className:u(g.padModeSelect,g.smallPadModeSelect),children:l(v,{fracFleet:W,wells:k,well:O,onSettingChange:z,appSettings:y})}),B!==b&&l("div",{className:u(g.mediumSizeContent,g.headerComponents),children:l("div",{className:g.headerChildren,children:U})})]})}w.propTypes={app:m.object.isRequired,badge:m.node,classes:m.shape({appHeader:m.string,appHeaderTitleWrapper:m.string}),showLastAnnotation:m.bool,currentUser:m.shape({}),appLastAnnotation:m.shape({}),updateCurrentDashboardAppLastAnnotation:m.func,openAnnotationsList:m.func,rig:m.shape({name:m.string,asset_id:m.number}),well:m.shape({name:m.string,asset_id:m.number}),fracFleet:m.shape({name:m.string,current_pad_id:m.number,pad_frac_fleets:m.arrayOf(m.shape({pad:m.shape({id:m.number.isRequired}).isRequired})).isRequired}),wells:m.arrayOf(m.shape({})),coordinates:m.shape({pixelWidth:m.number.isRequired}),isMaximized:m.bool,appSettings:m.shape({}),onSettingChange:m.func,children:m.arrayOf(m.node)},w.defaultProps={appLastAnnotation:null,appSettings:null,badge:null,classes:{},coordinates:void 0,currentUser:void 0,fracFleet:null,isMaximized:!1,onSettingChange:void 0,openAnnotationsList:void 0,rig:null,showLastAnnotation:!0,updateCurrentDashboardAppLastAnnotation:function(){},well:null,wells:null,children:null};export default w;
@@ -0,0 +1 @@
1
+ var r="EXTRA_LARGE",A="LARGE",E="MEDIUM",L="SMALL",n=960,t=600,M=428,R=function(R){return R<=M?L:R<=t?E:R<=n?A:r};export{R as getAppDimension};
@@ -1 +1 @@
1
- import t from"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/toConsumableArray";import"../../../constants/completion.js";import"../../../constants/alerts.js";import{pickBy as e,pick as o,noop as i}from"lodash";import r from"@babel/runtime/helpers/slicedToArray";import{DEV_CENTER_CLI_APP_ID as n}from"../../../constants/devcenter.js";import"../../../constants/goals.js";import{SEGMENTS as s}from"../../../constants/segment.js";import"../../../constants/apps.js";import"../../../constants/drillstring.js";import"../../../constants/notifications.js";import"../../../constants/feed.js";import{getAppName as p,getTimestampFromQuery as a}from"../../../utils/devcenter.js";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/asyncToGenerator";import{isNativeDetected as m,isMobileDetected as l}from"../../../utils/mobileDetect.js";import{showSuccessNotification as d}from"../../../utils/notificationToasts.js";import"@babel/runtime/helpers/typeof";import{isDevOrQAEnv as c}from"../../../utils/env.js";import"../../../utils/index.js";import{jsx as j,jsxs as u,Fragment as g}from"react/jsx-runtime";import{useTheme as A}from"@material-ui/core";import{useContext as C,useState as f}from"react";import"querystring";import"uuid/v1";import"../../../clients/jsonApi/index.js";import"../../../clients/subscriptions.js";import S from"../../../effects/useDevCenterApp.js";import"uuid";import"@babel/runtime/helpers/objectWithoutProperties";import v from"classnames";import"../../Modal/index.js";import"../../IconMenu/index.js";import"../../StyledMenuItem/index.js";import"../../LoadingIndicator/LoadingIndicator.js";import b from"./components/AppActions/AppActions.js";import"../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../ErrorBoundary/ErrorBoundary.js";import"../../Typography.js";import"../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../ConfirmationDialog.js";import"./components/DisabledSettingsMessage/DisabledSettingsMessage.js";import"slate";import"../../SlateFormattedText/RenderElements.js";import"../../SlateFormattedText/SlateFormattedText.js";import I from"./components/AppSettingsDialog/AppSettingsDialog.js";import x from"./components/AnnotationsButton/AnnotationsButton.js";import P from"./components/NonPriorityMenus/NonPriorityMenus.js";import h from"./components/FullscreenButton/FullscreenButton.js";import"./components/AppInfoMessage/AppInfoMessage.js";import D from"./components/DevCenterAppView/DevCenterAppView.js";import y from"./components/HelpCenterDialog/HelpCenterDialog.js";import{DcTooltipsCoordinatorProvider as L}from"./components/DcTooltipsCoordinatorProvider/DcTooltipsCoordinatorProvider.js";import{IsInsideDcAppProvider as M}from"./components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../Tooltip/MuiTooltipDcWrapper.js";import"../../Avatar/index.js";import{AnnotationsProvider as E}from"../../Annotations/AnnotationsContext.js";import{DevCenterRouterContext as T}from"../DevCenterRouterContext/DevCenterRouterContext.js";import"react-router";import"../DevCenterRouterContext/UniversalLink/UniversalLink.js";import F from"../../IconButton/index.js";import O from"../../Annotations/components/AnnotationsList/index.js";import"../../Annotations/components/LastAnnotation/index.js";import"../../PadModeSelect/PadModeSelect.js";import"../AppHeader/AppHeader.js";import"../AppSideBar/AppSideBar.js";import k from"../AppContext.js";import"../AppsDataProvider/AppsDataProvider.js";import B from"@material-ui/icons/Help";import w from"./effects/useAppSettings.js";import H from"./effects/useAnnotationsList.js";import R from"./effects/useAnnotationsData.js";import W from"./effects/useAppMaximized.js";import z from"./effects/useHelpCenter.js";import N from"./DevCenterAppContainer.css.js";import V from"./components/RestoreAppSizeButton/index.js";import{getAppVersion as _}from"./utils.js";import U from"./components/PriorityMenus/PriorityMenus.js";import"../NavigationBar/NavigationBar.js";import"../SideBar/SideBar.js";import"../AppSettingsPopover/AppSettingsPopover.js";import"../../TruncatedText/index.js";import"../../AssetEditor/SingleAssetEditor.js";import"../../AssetEditor/AssetEditorAutocomplete.js";import"../../AssetEditor/index.js";import"../../AppVersionsSelect/AppVersionsSelect.js";import"../../CollapsableSidebar.js";import"../../DateTimePicker/index.js";import"../../DatePicker/index.js";import"../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../ColorPicker/ColorPicker.js";import"../../ParameterCharts/AddEditTrack.js";import"../../ParameterCharts/ParameterCharts.js";import"../../ChartActionsList/ChartActionsList.js";import"../../SettingEditors/ColorEditor/index.js";import"../../SettingEditors/DropdownEditor/index.js";import"../../SettingEditors/RadioEditor/index.js";import"../../SwitchControl/index.js";import"../../RangeSlider/RangeSlider.js";import"../../Login/components/Login.js";import"../../Login/components/PasswordField.js";import"../../Login/components/Chip.js";import"../../Login/components/StepFooter.js";import"../../Login/components/StepContent.js";import"../../Login/components/StepHeader.js";import"../../Login/components/Step.js";import"../../Login/components/OrDivider.js";import"../../Login/components/HiddenEmailField.js";import"../../Login/components/EmailField.js";import"../../Breadcrumbs/index.js";import"../../VirtualizedTable/index.js";import"../../EmptyView/EmptyView.js";import"../../Button/index.js";import"../../MenuItem/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"../../TextField/index.js";import"../../Chip/index.js";import"../../Counter/index.js";import"../../AnchorsList/AnchorsList.js";import"../../Select/index.js";import"../../Tabs/Tabs.js";import"../../Tabs/Tab.js";import"../../Drillstring/BHASchematic.js";import"../../Drillstring/BHAComponentIcon.js";import"../../Drillstring/BHATable/index.js";import"../../Drillstring/BHAComponentDetail/index.js";import"../../Casing/CasingComponentIcon.js";import"../../Casing/CasingTable/index.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"../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../Notifications/Notifications.js";import"../../TextLink/index.js";import"../../Template/TemplatePopover/index.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"../../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"../../SearchInput/index.js";import"../../FeedItem/FeedItem.js";import"../../KeyboardDateTimePicker.js";import"../../PostInput/PostInput.js";import"../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../../AddComment/Popover.js";import"../../AddComment/Popup.js";function q(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,i)}return o}function G(e){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?q(Object(i),!0).forEach((function(o){t(e,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):q(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var K=m||l;function J(t){var l,q,J,Q,X,Y,Z,$=t.CLIAppComponent,tt=t.CLIAppSettings,et=t.app,ot=t.appId,it=t.className,rt=t.coordinates,nt=t.currentDashboardAppsLastAnnotations,st=t.currentUser,pt=t.devCenterRouter,at=t.isActionsDisabled,mt=t.isAppSubscribed,lt=void 0===mt||mt,dt=t.isAssetSubscriptionFeatureActive,ct=t.isSettingsDialogHidden,jt=t.layoutEnvironment,ut=t.onAppContainerClick,gt=void 0===ut?i:ut,At=t.onAppRemove,Ct=t.onCloneDashboard,ft=t.onIsMaximizedChange,St=t.onSettingChange,vt=t.onSettingsChange,bt=t.setIsFullscreenModalMode,It=void 0===bt?i:bt,xt=t.updateCurrentDashboardAppLastAnnotation,Pt=t.openIntercom,ht=void 0===Pt?i:Pt,Dt=C(k),yt=A(),Lt=f([]),Mt=r(Lt,2),Et=Mt[0],Tt=Mt[1],Ft=f([]),Ot=r(Ft,2),kt=Ot[0],Bt=Ot[1],wt=null!==(l=null==Dt?void 0:Dt[ot||et.id])&&void 0!==l?l:{isLoading:!0},Ht=null===(q=et.package)||void 0===q||null===(J=q.manifest)||void 0===J?void 0:J.application,Rt=(null==Ht||null===(Q=Ht.segments)||void 0===Q?void 0:Q[0])||s.DRILLING,Wt=!(null==Ht||null===(X=Ht.ui)||void 0===X||!X.multi_rig),zt=p(et),Nt=W({onIsMaximizedChange:ft,devCenterRouter:pt,appId:ot}),Vt=Nt.isMaximized,_t=Nt.setIsMaximized,Ut=a(null===(Y=pt.location.query)||void 0===Y?void 0:Y.query),qt=et.id===n,Gt=qt&&K?G(G({},rt),{},{w:12}):rt,Kt=S({CLIAppComponent:$,CLIAppSettings:tt,url:null==et||null===(Z=et.package)||void 0===Z?void 0:Z.url,appKey:et.app.app_key,version:_(et)}),Jt=Kt.isLoading,Qt=Kt.AppSettings,Xt=Kt.AppComponent,Yt=w({setIsFullscreenModalMode:It}),Zt=Yt.isAppSettingsDialogOpened,$t=Yt.toggleAppSettingsDialog,te=z({setIsFullscreenModalMode:It}),ee=te.isHelpCenterOpened,oe=te.toggleHelpCenter,ie=H(),re=ie.isAnnotationsListOpened,ne=ie.toggleAnnotationsList,se=Jt||!st||!Wt&&wt.isLoading,pe=pt.location,ae=pe.pathname,me=pe.query,le=R({app:et,appData:wt,currentDashboardAppsLastAnnotations:nt}),de=le.appLastAnnotation,ce=le.assetCompanyId,je=le.assetIdForAnnotation,ue=le.isAppSupportsAnnotations,ge=e(o(wt,["well","rig","fracFleet","wells"]),Boolean);return j(T.Provider,{value:pt,children:j(L,{setIsFullscreenModalMode:It,children:j(M,{value:!0,children:u("div",{className:v("dc-app-container",it,Vt&&"dc-app-container__maximized",yt.isLightTheme&&"dc-app-container__light-theme",N.container),"data-testid":"".concat("DevCenter_AppContainer","_").concat(et.app.name),onClick:function(){return gt()},children:[j("div",{className:N.containerContent,children:j(D,{AppComponent:Xt,app:et,appData:ge,isAppLoading:Jt,isAppSubscribed:lt,isCLIApp:qt,isLoading:se,isMultiRig:Wt,layoutEnvironment:jt,openIntercom:ht,segment:Rt,toggleAppSettingsDialog:$t,appProps:{coordinates:Gt,currentUser:st,devCenterRouter:pt,onSettingChange:St,onSettingsChange:vt,setIsFullscreenModalMode:It,setIsMaximized:_t,setMainMenuItems:Tt,setSecondaryMenuItems:Bt,appHeaderProps:G({app:et,appLastAnnotation:de,appSettings:et.settings,coordinates:Gt,currentUser:st,isMaximized:Vt,layoutEnvironment:jt,onSettingChange:St,toggleAnnotationsList:ne,updateCurrentDashboardAppLastAnnotation:xt},ge),isNative:m,layoutEnvironment:jt,timestamp:Ut}})}),Zt&&j(I,{AppSettingsComponent:Qt,app:et,appData:wt,appName:zt,currentUser:st,isAssetSubscriptionFeatureActive:dt,isMultiRig:Wt,isSettingsDialogHidden:ct,layoutEnvironment:jt,onAppRemove:At,onCloneDashboard:Ct,onSettingChange:St,onSettingsChange:vt,segment:Rt,timestamp:Ut,toggleAppSettingsDialog:$t}),re&&j(E,{children:j(O,{appId:et.app.id,appSettings:et.settings,appTitle:et.name,assetCompanyId:ce,assetId:je,currentUser:st,onClose:ne,showSuccessNotification:d})}),ee&&j(y,{appName:et.name,onClose:oe}),!at&&Vt&&j(V,{setIsMaximized:_t}),u(b,{children:[ue&&j(x,{toggleAnnotationsList:ne}),c&&j(F,{onClick:oe,children:j(B,{})}),K&&!Vt?j(h,{setIsMaximized:_t}):u(g,{children:[j(U,{menuItems:Et,devCenterRouter:pt}),j(P,{appId:et.id,devCenterRouter:pt,isMaximized:Vt,menuItems:kt,pathname:ae,query:me,setIsMaximized:_t,toggleAppSettingsDialog:$t})]})]})]})})})})}export default J;
1
+ import t from"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/toConsumableArray";import"../../../constants/completion.js";import"../../../constants/alerts.js";import{pickBy as e,pick as o,noop as i}from"lodash";import r from"@babel/runtime/helpers/slicedToArray";import{DEV_CENTER_CLI_APP_ID as n}from"../../../constants/devcenter.js";import"../../../constants/goals.js";import"../../../constants/segment.js";import"../../../constants/apps.js";import"../../../constants/drillstring.js";import"../../../constants/notifications.js";import"../../../constants/feed.js";import{getAppSegment as s,getAppName as p,getTimestampFromQuery as a}from"../../../utils/devcenter.js";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/asyncToGenerator";import{isNativeDetected as m,isMobileDetected as l}from"../../../utils/mobileDetect.js";import{showSuccessNotification as d}from"../../../utils/notificationToasts.js";import"@babel/runtime/helpers/typeof";import{isDevOrQAEnv as c}from"../../../utils/env.js";import"../../../utils/index.js";import{jsx as j,jsxs as u,Fragment as g}from"react/jsx-runtime";import{useTheme as A}from"@material-ui/core";import{useContext as C,useState as f}from"react";import"querystring";import"uuid/v1";import"../../../clients/jsonApi/index.js";import"../../../clients/subscriptions.js";import S from"../../../effects/useDevCenterApp.js";import"uuid";import"@babel/runtime/helpers/objectWithoutProperties";import v from"classnames";import"../../Modal/index.js";import"../../IconMenu/index.js";import"../../StyledMenuItem/index.js";import"../../LoadingIndicator/LoadingIndicator.js";import b from"./components/AppActions/AppActions.js";import"../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../ErrorBoundary/ErrorBoundary.js";import"../../Typography.js";import"../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../ConfirmationDialog.js";import"./components/DisabledSettingsMessage/DisabledSettingsMessage.js";import"slate";import"../../SlateFormattedText/RenderElements.js";import"../../SlateFormattedText/SlateFormattedText.js";import x from"./components/AppSettingsDialog/AppSettingsDialog.js";import I from"./components/AnnotationsButton/AnnotationsButton.js";import P from"./components/NonPriorityMenus/NonPriorityMenus.js";import h from"./components/FullscreenButton/FullscreenButton.js";import"./components/AppInfoMessage/AppInfoMessage.js";import y from"./components/DevCenterAppView/DevCenterAppView.js";import D from"./components/HelpCenterDialog/HelpCenterDialog.js";import{DcTooltipsCoordinatorProvider as L}from"./components/DcTooltipsCoordinatorProvider/DcTooltipsCoordinatorProvider.js";import{IsInsideDcAppProvider as M}from"./components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../Tooltip/MuiTooltipDcWrapper.js";import"../../Avatar/index.js";import{AnnotationsProvider as E}from"../../Annotations/AnnotationsContext.js";import{DevCenterRouterContext as T}from"../DevCenterRouterContext/DevCenterRouterContext.js";import"react-router";import"../DevCenterRouterContext/UniversalLink/UniversalLink.js";import F from"../../IconButton/index.js";import O from"../../Annotations/components/AnnotationsList/index.js";import"../../Annotations/components/LastAnnotation/index.js";import"../../PadModeSelect/PadModeSelect.js";import"../AppHeader/AppHeader.js";import"../AppSideBar/AppSideBar.js";import k from"../AppContext.js";import"../AppsDataProvider/AppsDataProvider.js";import B from"@material-ui/icons/Help";import w from"./effects/useAppSettings.js";import H from"./effects/useAnnotationsList.js";import R from"./effects/useAnnotationsData.js";import W from"./effects/useAppMaximized.js";import z from"./effects/useHelpCenter.js";import V from"./DevCenterAppContainer.css.js";import N from"./components/RestoreAppSizeButton/index.js";import{getAppVersion as _}from"./utils.js";import U from"./components/PriorityMenus/PriorityMenus.js";import"../NavigationBar/NavigationBar.js";import"../SideBar/SideBar.js";import"../AppSettingsPopover/AppSettingsPopover.js";import"../../TruncatedText/index.js";import"../../AssetEditor/SingleAssetEditor.js";import"../../AssetEditor/AssetEditorAutocomplete.js";import"../../AssetEditor/index.js";import"../../AppVersionsSelect/AppVersionsSelect.js";import"../../CollapsableSidebar.js";import"../../DateTimePicker/index.js";import"../../DatePicker/index.js";import"../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../ColorPicker/ColorPicker.js";import"../../ParameterCharts/AddEditTrack.js";import"../../ParameterCharts/ParameterCharts.js";import"../../ChartActionsList/ChartActionsList.js";import"../../SettingEditors/ColorEditor/index.js";import"../../SettingEditors/DropdownEditor/index.js";import"../../SettingEditors/RadioEditor/index.js";import"../../SwitchControl/index.js";import"../../RangeSlider/RangeSlider.js";import"../../Login/components/Login.js";import"../../Login/components/PasswordField.js";import"../../Login/components/Chip.js";import"../../Login/components/StepFooter.js";import"../../Login/components/StepContent.js";import"../../Login/components/StepHeader.js";import"../../Login/components/Step.js";import"../../Login/components/OrDivider.js";import"../../Login/components/HiddenEmailField.js";import"../../Login/components/EmailField.js";import"../../Breadcrumbs/index.js";import"../../VirtualizedTable/index.js";import"../../EmptyView/EmptyView.js";import"../../Button/index.js";import"../../MenuItem/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"../../TextField/index.js";import"../../Chip/index.js";import"../../Counter/index.js";import"../../AnchorsList/AnchorsList.js";import"../../Select/index.js";import"../../Tabs/Tabs.js";import"../../Tabs/Tab.js";import"../../Drillstring/BHASchematic.js";import"../../Drillstring/BHAComponentIcon.js";import"../../Drillstring/BHATable/index.js";import"../../Drillstring/BHAComponentDetail/index.js";import"../../Casing/CasingComponentIcon.js";import"../../Casing/CasingTable/index.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"../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../Notifications/Notifications.js";import"../../TextLink/index.js";import"../../Template/TemplatePopover/index.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"../../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"../../SearchInput/index.js";import"../../FeedItem/FeedItem.js";import"../../KeyboardDateTimePicker.js";import"../../PostInput/PostInput.js";import"../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../../AddComment/Popover.js";import"../../AddComment/Popup.js";function q(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,i)}return o}function K(e){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?q(Object(i),!0).forEach((function(o){t(e,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):q(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var G=m||l;function J(t){var l,q,J,Q,X,Y,Z=t.CLIAppComponent,$=t.CLIAppSettings,tt=t.app,et=t.appId,ot=t.className,it=t.coordinates,rt=t.currentDashboardAppsLastAnnotations,nt=t.currentUser,st=t.devCenterRouter,pt=t.isActionsDisabled,at=t.isAppSubscribed,mt=void 0===at||at,lt=t.isAssetSubscriptionFeatureActive,dt=t.isSettingsDialogHidden,ct=t.layoutEnvironment,jt=t.onAppContainerClick,ut=void 0===jt?i:jt,gt=t.onAppRemove,At=t.onCloneDashboard,Ct=t.onIsMaximizedChange,ft=t.onSettingChange,St=t.onSettingsChange,vt=t.setIsFullscreenModalMode,bt=void 0===vt?i:vt,xt=t.updateCurrentDashboardAppLastAnnotation,It=t.openIntercom,Pt=void 0===It?i:It,ht=C(k),yt=A(),Dt=f([]),Lt=r(Dt,2),Mt=Lt[0],Et=Lt[1],Tt=f([]),Ft=r(Tt,2),Ot=Ft[0],kt=Ft[1],Bt=null!==(l=null==ht?void 0:ht[et||tt.id])&&void 0!==l?l:{isLoading:!0},wt=null===(q=tt.package)||void 0===q||null===(J=q.manifest)||void 0===J?void 0:J.application,Ht=s(tt),Rt=!(null==wt||null===(Q=wt.ui)||void 0===Q||!Q.multi_rig),Wt=p(tt),zt=W({onIsMaximizedChange:Ct,devCenterRouter:st,appId:et}),Vt=zt.isMaximized,Nt=zt.setIsMaximized,_t=a(null===(X=st.location.query)||void 0===X?void 0:X.query),Ut=tt.id===n,qt=Ut&&G?K(K({},it),{},{w:12}):it,Kt=S({CLIAppComponent:Z,CLIAppSettings:$,url:null==tt||null===(Y=tt.package)||void 0===Y?void 0:Y.url,appKey:tt.app.app_key,version:_(tt)}),Gt=Kt.isLoading,Jt=Kt.AppSettings,Qt=Kt.AppComponent,Xt=w({setIsFullscreenModalMode:bt}),Yt=Xt.isAppSettingsDialogOpened,Zt=Xt.toggleAppSettingsDialog,$t=z({setIsFullscreenModalMode:bt}),te=$t.isHelpCenterOpened,ee=$t.toggleHelpCenter,oe=H(),ie=oe.isAnnotationsListOpened,re=oe.toggleAnnotationsList,ne=Gt||!nt||!Rt&&Bt.isLoading,se=st.location,pe=se.pathname,ae=se.query,me=R({app:tt,appData:Bt,currentDashboardAppsLastAnnotations:rt}),le=me.appLastAnnotation,de=me.assetCompanyId,ce=me.assetIdForAnnotation,je=me.isAppSupportsAnnotations,ue=e(o(Bt,["well","rig","fracFleet","wells"]),Boolean);return j(T.Provider,{value:st,children:j(L,{setIsFullscreenModalMode:bt,children:j(M,{value:!0,children:u("div",{className:v("dc-app-container",ot,Vt&&"dc-app-container__maximized",yt.isLightTheme&&"dc-app-container__light-theme",V.container),"data-testid":"".concat("DevCenter_AppContainer","_").concat(tt.app.name),onClick:function(){return ut()},children:[j("div",{className:V.containerContent,children:j(y,{AppComponent:Qt,app:tt,appData:ue,isAppLoading:Gt,isAppSubscribed:mt,isCLIApp:Ut,isLoading:ne,isMultiRig:Rt,layoutEnvironment:ct,openIntercom:Pt,segment:Ht,toggleAppSettingsDialog:Zt,appProps:{coordinates:qt,currentUser:nt,devCenterRouter:st,onSettingChange:ft,onSettingsChange:St,setIsFullscreenModalMode:bt,setIsMaximized:Nt,setMainMenuItems:Et,setSecondaryMenuItems:kt,appHeaderProps:K({app:tt,appLastAnnotation:le,appSettings:tt.settings,coordinates:qt,currentUser:nt,isMaximized:Vt,layoutEnvironment:ct,onSettingChange:ft,toggleAnnotationsList:re,updateCurrentDashboardAppLastAnnotation:xt},ue),isNative:m,layoutEnvironment:ct,timestamp:_t}})}),Yt&&j(x,{AppSettingsComponent:Jt,app:tt,appData:Bt,appName:Wt,currentUser:nt,isAssetSubscriptionFeatureActive:lt,isMultiRig:Rt,isSettingsDialogHidden:dt,layoutEnvironment:ct,onAppRemove:gt,onCloneDashboard:At,onSettingChange:ft,onSettingsChange:St,segment:Ht,timestamp:_t,toggleAppSettingsDialog:Zt}),ie&&j(E,{children:j(O,{appId:tt.app.id,appSettings:tt.settings,appTitle:tt.name,assetCompanyId:de,assetId:ce,currentUser:nt,onClose:re,showSuccessNotification:d})}),te&&j(D,{appName:tt.name,onClose:ee}),!pt&&Vt&&j(N,{setIsMaximized:Nt}),u(b,{children:[je&&j(I,{toggleAnnotationsList:re}),c&&j(F,{onClick:ee,children:j(B,{})}),G&&!Vt?j(h,{setIsMaximized:Nt}):u(g,{children:[j(U,{menuItems:Mt,devCenterRouter:st}),j(P,{appId:tt.id,devCenterRouter:st,isMaximized:Vt,menuItems:Ot,pathname:pe,query:ae,setIsMaximized:Nt,toggleAppSettingsDialog:Zt})]})]})]})})})})}export default J;
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/toConsumableArray";import"../../../constants/completion.js";import"../../../constants/alerts.js";import"lodash";import"@babel/runtime/helpers/slicedToArray";import"../../../constants/goals.js";import"../../../constants/segment.js";import"../../../constants/apps.js";import"../../../constants/drillstring.js";import{NOTIFICATION_VARIANTS as t}from"../../../constants/notifications.js";import"../../../constants/feed.js";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/asyncToGenerator";import"../../../utils/mobileDetect.js";import"@babel/runtime/helpers/typeof";import"../../../utils/index.js";import{jsx as r,jsxs as o}from"react/jsx-runtime";import{Grow as i,SnackbarContent as n,Typography as s}from"@material-ui/core";import{useEffect as p,cloneElement as a}from"react";import"querystring";import"uuid/v1";import"../../../clients/jsonApi/index.js";import"../../../clients/subscriptions.js";import"uuid";import m from"@babel/runtime/helpers/objectWithoutProperties";import l from"prop-types";import c from"classnames";import{CheckCircleOutline as d,ReportProblemOutlined as j,ReportOutlined as C,InfoOutlined as u,Close as v}from"@material-ui/icons";import"../../Modal/index.js";import"../../IconMenu/index.js";import"../../StyledMenuItem/index.js";import"../../LoadingIndicator/LoadingIndicator.js";import"../../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../ErrorBoundary/ErrorBoundary.js";import"../../Typography.js";import"../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../ConfirmationDialog.js";import"../../DevCenter/DevCenterAppContainer/components/DisabledSettingsMessage/DisabledSettingsMessage.js";import"slate";import"../../SlateFormattedText/RenderElements.js";import"../../SlateFormattedText/SlateFormattedText.js";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"../../DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.js";import"../../DevCenter/DevCenterAppContainer/components/HelpCenterDialog/HelpCenterDialog.js";import"../../DevCenter/DevCenterAppContainer/components/DcTooltipsCoordinatorProvider/DcTooltipsCoordinatorProvider.js";import"../../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../Tooltip/MuiTooltipDcWrapper.js";import"../../Avatar/index.js";import"../../Annotations/AnnotationsContext.js";import"../../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"react-router";import"../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import D from"../../IconButton/index.js";import"../../Annotations/components/AnnotationsList/index.js";import"../../Annotations/components/LastAnnotation/index.js";import"../../PadModeSelect/PadModeSelect.js";import"../../DevCenter/AppHeader/AppHeader.js";import"../../DevCenter/AppSideBar/AppSideBar.js";import"../../DevCenter/AppContext.js";import"../../DevCenter/AppsDataProvider/AppsDataProvider.js";import"@material-ui/icons/Help";import"../../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../../DevCenter/NavigationBar/NavigationBar.js";import"../../DevCenter/SideBar/SideBar.js";import"../../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../../TruncatedText/index.js";import"../../AssetEditor/SingleAssetEditor.js";import"../../AssetEditor/AssetEditorAutocomplete.js";import"../../AssetEditor/index.js";import"../../AppVersionsSelect/AppVersionsSelect.js";import"../../CollapsableSidebar.js";import"../../DateTimePicker/index.js";import"../../DatePicker/index.js";import"../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../ColorPicker/ColorPicker.js";import"../../ParameterCharts/AddEditTrack.js";import"../../ParameterCharts/ParameterCharts.js";import"../../ChartActionsList/ChartActionsList.js";import"../../SettingEditors/ColorEditor/index.js";import"../../SettingEditors/DropdownEditor/index.js";import"../../SettingEditors/RadioEditor/index.js";import"../../SwitchControl/index.js";import"../../RangeSlider/RangeSlider.js";import"../../Login/components/Login.js";import"../../Login/components/PasswordField.js";import"../../Login/components/Chip.js";import"../../Login/components/StepFooter.js";import"../../Login/components/StepContent.js";import"../../Login/components/StepHeader.js";import"../../Login/components/Step.js";import"../../Login/components/OrDivider.js";import"../../Login/components/HiddenEmailField.js";import"../../Login/components/EmailField.js";import"../../Breadcrumbs/index.js";import"../../VirtualizedTable/index.js";import"../../EmptyView/EmptyView.js";import"../../Button/index.js";import"../../MenuItem/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"../../TextField/index.js";import"../../Chip/index.js";import"../../Counter/index.js";import"../../AnchorsList/AnchorsList.js";import"../../Select/index.js";import"../../Tabs/Tabs.js";import"../../Tabs/Tab.js";import"../../Drillstring/BHASchematic.js";import"../../Drillstring/BHAComponentIcon.js";import"../../Drillstring/BHATable/index.js";import"../../Drillstring/BHAComponentDetail/index.js";import"../../Casing/CasingComponentIcon.js";import"../../Casing/CasingTable/index.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"../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import{useStyles as f}from"./styles.js";import"../Notifications.js";import"../../TextLink/index.js";import"../../Template/TemplatePopover/index.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"../../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"../../SearchInput/index.js";import"../../FeedItem/FeedItem.js";import"../../KeyboardDateTimePicker.js";import"../../PostInput/PostInput.js";import"../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../../AddComment/Popover.js";import"../../AddComment/Popup.js";var g;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 b(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 P="NotificationPopup",x=(e(g={},t.success,d),e(g,t.warning,j),e(g,t.error,C),e(g,t.info,u),g),S=function(e){e.classes;var t=e.onDismissClick,l=e.toast,d=m(e,["classes","onDismissClick","toast"]),j=l.alertLevel,C=l.autoHideDuration,u=void 0===C?3e3:C,g=l.content,A=l.hideIcon,S=l.icon,y=l.id,h=l.onClick,I=void 0===h?function(){}:h,T=l.timestamp,E=l.title,L=l.variant,k=void 0===L?"info":L;p((function(){var e=setTimeout((function(){return t(y)}),u);return function(){return clearTimeout(e)}}),[]);var O=f(),B=x[k];return r(i,{appear:!0,in:!0,children:r(n,b({classes:{root:c(O.main,!j&&O[k],j&&O["alertLevels-".concat(j)]),action:O.actionContainer,message:O.messageContainer},"aria-describedby":"client-snackbar",message:o("div",{id:"client-snackbar",className:O.messageWrapper,onClick:I,"data-testid":"".concat(P,"_status_").concat({success:"success",info:"info",warning:"warning",error:"error"}[k]),children:[!A&&r("div",{className:O.iconWrapper,children:S?a(S,{className:O.icon,nativeColor:"#fff"}):r(B,{htmlColor:"#fff",className:O.icon})}),o("div",{className:O.message,children:[o("div",{className:O.messageTop,children:[E&&r(s,{"data-testid":"".concat(P,"_title"),variant:"subtitle2",className:O.title,children:E}),T&&r(s,{className:c(O.timestamp,!j&&O[k]),children:T})]}),r("div",{className:c(O.messageContent,!j&&O[k]),children:r(s,{"data-testid":"".concat(P,"_content"),className:c(!j&&O.content),children:g})})]})]}),action:[r(D,{"data-testid":"".concat(P,"_closeButton"),"aria-label":"Close",color:"inherit",onClick:function(){return t(y)},size:"small",tooltipProps:{title:"Close",classes:{tooltip:O.tooltip}},className:O.closeIconButton,children:r(v,{className:O.closeIcon,htmlColor:j?"#000":"#fff"})},"close")]},d))})};S.propTypes={onDismissClick:l.func.isRequired,toast:l.shape({alertLevel:l.oneOf(["info","warning","critical"]),autoHideDuration:l.number,content:l.node.isRequired,hideIcon:l.bool,icon:l.node,id:l.oneOfType([l.number,l.string]).isRequired,onClick:l.func,timestamp:l.string,title:l.string,variant:l.oneOf(["success","warning","error","info"])}).isRequired};export default S;
1
+ import e from"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/toConsumableArray";import"../../../constants/completion.js";import"../../../constants/alerts.js";import"lodash";import"@babel/runtime/helpers/slicedToArray";import"../../../constants/goals.js";import"../../../constants/segment.js";import"../../../constants/apps.js";import"../../../constants/drillstring.js";import{NOTIFICATION_VARIANTS as t}from"../../../constants/notifications.js";import"../../../constants/feed.js";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/asyncToGenerator";import"../../../utils/mobileDetect.js";import"@babel/runtime/helpers/typeof";import"../../../utils/index.js";import{jsx as o,jsxs as r}from"react/jsx-runtime";import{Grow as i,SnackbarContent as n,Tooltip as s,Typography as p}from"@material-ui/core";import{useEffect as a,cloneElement as m}from"react";import"querystring";import"uuid/v1";import"../../../clients/jsonApi/index.js";import"../../../clients/subscriptions.js";import"uuid";import l from"@babel/runtime/helpers/objectWithoutProperties";import c from"prop-types";import d from"classnames";import{CheckCircleOutline as j,ReportProblemOutlined as C,ReportOutlined as u,InfoOutlined as v,Close as D}from"@material-ui/icons";import"../../Modal/index.js";import"../../IconMenu/index.js";import"../../StyledMenuItem/index.js";import"../../LoadingIndicator/LoadingIndicator.js";import"../../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../ErrorBoundary/ErrorBoundary.js";import"../../Typography.js";import"../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../ConfirmationDialog.js";import"../../DevCenter/DevCenterAppContainer/components/DisabledSettingsMessage/DisabledSettingsMessage.js";import"slate";import"../../SlateFormattedText/RenderElements.js";import"../../SlateFormattedText/SlateFormattedText.js";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"../../DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.js";import"../../DevCenter/DevCenterAppContainer/components/HelpCenterDialog/HelpCenterDialog.js";import"../../DevCenter/DevCenterAppContainer/components/DcTooltipsCoordinatorProvider/DcTooltipsCoordinatorProvider.js";import"../../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../Tooltip/MuiTooltipDcWrapper.js";import"../../Avatar/index.js";import"../../Annotations/AnnotationsContext.js";import"../../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"react-router";import"../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import f from"../../IconButton/index.js";import"../../Annotations/components/AnnotationsList/index.js";import"../../Annotations/components/LastAnnotation/index.js";import"../../PadModeSelect/PadModeSelect.js";import"../../DevCenter/AppHeader/AppHeader.js";import"../../DevCenter/AppSideBar/AppSideBar.js";import"../../DevCenter/AppContext.js";import"../../DevCenter/AppsDataProvider/AppsDataProvider.js";import"@material-ui/icons/Help";import"../../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../../DevCenter/NavigationBar/NavigationBar.js";import"../../DevCenter/SideBar/SideBar.js";import"../../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../../TruncatedText/index.js";import"../../AssetEditor/SingleAssetEditor.js";import"../../AssetEditor/AssetEditorAutocomplete.js";import"../../AssetEditor/index.js";import"../../AppVersionsSelect/AppVersionsSelect.js";import"../../CollapsableSidebar.js";import"../../DateTimePicker/index.js";import"../../DatePicker/index.js";import"../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../ColorPicker/ColorPicker.js";import"../../ParameterCharts/AddEditTrack.js";import"../../ParameterCharts/ParameterCharts.js";import"../../ChartActionsList/ChartActionsList.js";import"../../SettingEditors/ColorEditor/index.js";import"../../SettingEditors/DropdownEditor/index.js";import"../../SettingEditors/RadioEditor/index.js";import"../../SwitchControl/index.js";import"../../RangeSlider/RangeSlider.js";import"../../Login/components/Login.js";import"../../Login/components/PasswordField.js";import"../../Login/components/Chip.js";import"../../Login/components/StepFooter.js";import"../../Login/components/StepContent.js";import"../../Login/components/StepHeader.js";import"../../Login/components/Step.js";import"../../Login/components/OrDivider.js";import"../../Login/components/HiddenEmailField.js";import"../../Login/components/EmailField.js";import"../../Breadcrumbs/index.js";import"../../VirtualizedTable/index.js";import"../../EmptyView/EmptyView.js";import"../../Button/index.js";import"../../MenuItem/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"../../TextField/index.js";import"../../Chip/index.js";import"../../Counter/index.js";import"../../AnchorsList/AnchorsList.js";import"../../Select/index.js";import"../../Tabs/Tabs.js";import"../../Tabs/Tab.js";import"../../Drillstring/BHASchematic.js";import"../../Drillstring/BHAComponentIcon.js";import"../../Drillstring/BHATable/index.js";import"../../Drillstring/BHAComponentDetail/index.js";import"../../Casing/CasingComponentIcon.js";import"../../Casing/CasingTable/index.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"../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import{useStyles as g}from"./styles.js";import"../Notifications.js";import"../../TextLink/index.js";import"../../Template/TemplatePopover/index.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"../../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"../../SearchInput/index.js";import"../../FeedItem/FeedItem.js";import"../../KeyboardDateTimePicker.js";import"../../PostInput/PostInput.js";import"../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../../AddComment/Popover.js";import"../../AddComment/Popup.js";var A;function b(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,r)}return o}function P(t){for(var o=1;o<arguments.length;o++){var r=null!=arguments[o]?arguments[o]:{};o%2?b(Object(r),!0).forEach((function(o){e(t,o,r[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):b(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var x="NotificationPopup",S=(e(A={},t.success,j),e(A,t.warning,C),e(A,t.error,u),e(A,t.info,v),A),h=function(e){e.classes;var t=e.onDismissClick,c=e.toast,j=l(e,["classes","onDismissClick","toast"]),C=c.alertLevel,u=c.autoHideDuration,v=void 0===u?3e3:u,A=c.content,b=c.hideIcon,h=c.icon,y=c.id,I=c.onClick,T=void 0===I?function(){}:I,E=c.timestamp,L=c.title,k=c.variant,O=void 0===k?"info":k;a((function(){var e=setTimeout((function(){return t(y)}),v);return function(){return clearTimeout(e)}}),[]);var B=g(),w=S[O];return o(i,{appear:!0,in:!0,children:o(n,P({classes:{root:d(B.main,!C&&B[O],C&&B["alertLevels-".concat(C)]),action:B.actionContainer,message:B.messageContainer},"aria-describedby":"client-snackbar",message:o(s,{title:A,classes:{tooltip:B.tooltip},placement:"bottom",children:r("div",{id:"client-snackbar",className:B.messageWrapper,onClick:T,"data-testid":"".concat(x,"_status_").concat({success:"success",info:"info",warning:"warning",error:"error"}[O]),children:[!b&&o("div",{className:B.iconWrapper,children:h?m(h,{className:B.icon,nativeColor:"#fff"}):o(w,{htmlColor:"#fff",className:B.icon})}),r("div",{className:B.message,children:[r("div",{className:B.messageTop,children:[L&&o(p,{"data-testid":"".concat(x,"_title"),variant:"subtitle2",className:B.title,children:L}),E&&o(p,{className:d(B.timestamp,!C&&B[O]),children:E})]}),o("div",{className:d(B.messageContent,!C&&B[O]),children:o(p,{"data-testid":"".concat(x,"_content"),className:d(!C&&B.content),children:A})})]})]})}),action:[o(f,{"data-testid":"".concat(x,"_closeButton"),"aria-label":"Close",color:"inherit",onClick:function(){return t(y)},size:"small",tooltipProps:{title:"Close",classes:{tooltip:B.tooltip}},className:B.closeIconButton,children:o(D,{className:B.closeIcon,htmlColor:C?"#000":"#fff"})},"close")]},j))})};h.propTypes={onDismissClick:c.func.isRequired,toast:c.shape({alertLevel:c.oneOf(["info","warning","critical"]),autoHideDuration:c.number,content:c.node.isRequired,hideIcon:c.bool,icon:c.node,id:c.oneOfType([c.number,c.string]).isRequired,onClick:c.func,timestamp:c.string,title:c.string,variant:c.oneOf(["success","warning","error","info"])}).isRequired};export default h;
@@ -1 +1 @@
1
- import{makeStyles as e}from"@material-ui/core";var o=e((function(e){return{main:{width:443,height:48,maxWidth:"85vw",display:"flex",flexWrap:"nowrap",alignItems:"center",padding:0,marginBottom:e.spacing(2)},success:{backgroundColor:e.palette.success.main},error:{backgroundColor:e.palette.error.main},warning:{backgroundColor:e.palette.warning.main,"& .MuiSvgIcon-root":{color:e.palette.background.b7},"& p":{color:e.palette.background.b7}},info:{backgroundColor:e.palette.info.main},title:{color:e.palette.grey[600],fontWeight:"400"},content:{fontSize:"14px",lineHeight:"16px",padding:"8px 0",color:"#fff",fontWeight:500},iconWrapper:{display:"flex",alignSelf:"center",alignItems:"center",height:35,padding:"0px 10px 0 18px"},icon:{width:20,height:20,transform:"scale(1.2)"},closeIconButton:{"&.MuiButtonBase-root":{color:"#fff",padding:11,"&:hover":{backgroundColor:"rgba(255, 255, 255, 0.2)"},"&:active":{backgroundColor:"rgba(255, 255, 255, 0.4)"}}},closeIcon:{width:14,height:14,"&.MuiSvgIcon-root":{fontSize:14,transform:"scale(1.715)"}},messageContainer:{overflowX:"hidden",flex:1},messageWrapper:{display:"flex"},message:{display:"flex",flex:1,alignItems:"center",minHeight:35,height:"100%",overflowY:"hidden",justifyContent:"center",flexDirection:"column"},messageTop:{display:"flex",justifyContent:"space-between",overflowX:"hidden",textOverflow:"ellipsis",width:"100%"},messageContent:{overflowX:"hidden",textOverflow:"ellipsis",width:"100%"},timestamp:{marginLeft:10,alignSelf:"flex-end"},actionContainer:{paddingLeft:"8px",marginRight:"16px"},"alertLevels-info":{borderLeft:"15px solid rgb(119, 195, 241)",backgroundColor:"#fff"},"alertLevels-warning":{borderLeft:"15px solid rgb(242, 192, 70)",backgroundColor:"#fff"},"alertLevels-critical":{borderLeft:"15px solid rgb(237, 70, 48)",backgroundColor:"#fff"},tooltip:{marginTop:8}}}));export{o as useStyles};
1
+ import{makeStyles as e}from"@material-ui/core";var o=e((function(e){return{main:{width:443,height:48,maxWidth:"85vw",display:"flex",flexWrap:"nowrap",alignItems:"center",padding:0,marginBottom:e.spacing(2)},success:{backgroundColor:e.palette.success.main},error:{backgroundColor:e.palette.error.main},warning:{backgroundColor:e.palette.warning.main,"& .MuiSvgIcon-root":{color:e.palette.background.b7},"& p":{color:e.palette.background.b7}},info:{backgroundColor:e.palette.info.main},title:{color:e.palette.grey[600],fontWeight:"400"},content:{fontSize:"14px",lineHeight:"16px",color:"#fff",fontWeight:500,whiteSpace:"normal",overflow:"hidden",textOverflow:"ellipsis","-webkit-box-orient":"vertical","-webkit-line-clamp":2,height:"fit-content",display:"-webkit-box",flexDirection:"column",justifyContent:"center"},iconWrapper:{display:"flex",alignSelf:"center",alignItems:"center",height:35,padding:"0px 10px 0 18px"},icon:{width:20,height:20,transform:"scale(1.2)"},closeIconButton:{"&.MuiButtonBase-root":{color:"#fff",padding:11,"&:hover":{backgroundColor:"rgba(255, 255, 255, 0.2)"},"&:active":{backgroundColor:"rgba(255, 255, 255, 0.4)"}}},closeIcon:{width:14,height:14,"&.MuiSvgIcon-root":{fontSize:14,transform:"scale(1.715)"}},messageContainer:{overflowX:"hidden",flex:1},messageWrapper:{display:"flex"},message:{display:"flex",flex:1,alignItems:"center",minHeight:35,height:"100%",overflowY:"hidden",justifyContent:"center",flexDirection:"column"},messageTop:{display:"flex",justifyContent:"space-between",overflowX:"hidden",textOverflow:"ellipsis",width:"100%"},messageContent:{overflowX:"hidden",textOverflow:"ellipsis",width:"100%"},timestamp:{marginLeft:10,alignSelf:"flex-end"},actionContainer:{paddingLeft:"8px",marginRight:"16px"},"alertLevels-info":{borderLeft:"15px solid rgb(119, 195, 241)",backgroundColor:"#fff"},"alertLevels-warning":{borderLeft:"15px solid rgb(242, 192, 70)",backgroundColor:"#fff"},"alertLevels-critical":{borderLeft:"15px solid rgb(237, 70, 48)",backgroundColor:"#fff"},tooltip:{marginTop:8}}}));export{o as useStyles};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import{get as n,orderBy as t,uniq as l}from"lodash";import o from"@babel/runtime/helpers/slicedToArray";import{jsxs as i,jsx as r,Fragment as c}from"react/jsx-runtime";import{makeStyles as s,Dialog as a,DialogTitle as d,Typography as u,Tooltip as f,IconButton as m,DialogContent as p,DialogActions as b,Button as g}from"@material-ui/core";import h from"@material-ui/icons/Close";import{memo as y,useState as S,useEffect as v,useMemo as W,useCallback as j}from"react";import I from"prop-types";import C from"classnames";import{useTheme as O}from"@material-ui/core/styles";import A from"../LoadingIndicator/LoadingIndicator.js";import N from"@material-ui/core/useMediaQuery";import{DEFAULT_SETTINGS as D}from"./constants.js";import x from"./components/Filter/index.js";import w from"./effects/biDirectionalFiltering.js";import{useCompanies as k,useWells as T,useCompanyMetricKey as B,useFilteredWells as P,useWellsWithCoords as R,useRadiusWells as z,useOffsetWells as L,useMetricsData as U}from"./effects/index.js";import q from"./components/Map/index.js";import E from"./components/Table/index.js";function M(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);n&&(l=l.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,l)}return t}function F(n){for(var t=1;t<arguments.length;t++){var l=null!=arguments[t]?arguments[t]:{};t%2?M(Object(l),!0).forEach((function(t){e(n,t,l[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(l)):M(Object(l)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(l,e))}))}return n}var _=s((function(e){return{dialogTitles:{display:"flex",justifyContent:"space-between",alignItems:"center"},title:{fontSize:20},subTitle:{fontSize:14,color:"#03BCD4","&:hover":{cursor:"pointer",textDecoration:"underline"}},subTitleSpace:{fontSize:14,color:"#03BCD4"},titleArea:{display:"flex",alignItems:"center"},closeIconButton:{fontSize:20,padding:4,"&:hover $closeIcon":{color:"#fff"}},closeIcon:{color:"#BDBDBD"},dialogActions:{justifyContent:"space-between",paddingTop:8,paddingBottom:8},bottomShadow:{width:"100%",height:"16px",backgroundImage:"linear-gradient(180deg, rgba(65, 65, 65, 0) 0%, ".concat(e.palette.background.b9,")"),position:"absolute",bottom:"52px",zIndex:2},dialogActionsSmallScreen:{paddingRight:"100px"},dialogContent:{display:"flex",flexDirection:"column"},tabs:{background:"#414141"},selectedWells:{display:"flex",alignItems:"center"},selected:{fontSize:16},selectedLabel:{fontSize:12,marginLeft:14,color:"rgba(255, 255, 255, 0.54)"},selectedNumber:{fontSize:12,margin:4,color:"rgba(255, 255, 255, 0.8)"}}})),K=function(s){var y=s.isOpen,I=s.defaultSubjectWellId,M=s.companyId,K=s.offsetSetting,H=s.currentUser,Q=s.addWellsUsabilityInfo,$=s.unusableWellAlarm,G=s.isAdvancedSearch,J=s.bestCount,V=s.onClose,X=s.onSave,Y=_(),Z=O(),ee=N(Z.breakpoints.down("sm")),ne=("admin"===n(H,"role")||"developeradmin"===n(H,"role"))&&"corva"===n(H,["company","provider"]),te=S(M||n(K,"companyId")||+n(H,"company_id")),le=o(te,2),oe=le[0],ie=le[1],re=S(n(K,"subjectWellId")||I),ce=o(re,2),se=ce[0],ae=ce[1],de=S(n(K,"filters")||D.filters),ue=o(de,2),fe=ue[0],me=ue[1],pe=S(n(K,"radius")||D.radius),be=o(pe,2),ge=be[0],he=be[1],ye=S([]),Se=o(ye,2),ve=Se[0],We=Se[1],je=S(D.sortInfo),Ie=o(je,2),Ce=Ie[0],Oe=Ie[1],Ae=S(!1),Ne=o(Ae,2),De=Ne[0],xe=Ne[1],we=S([]),ke=o(we,2),Te=ke[0],Be=ke[1];v((function(){y&&(Be(n(K,"selectedWellIds")||[]),ie(M||n(K,"companyId")||+n(H,"company_id")),ae(n(K,"subjectWellId")||I))}),[y,K]);var Pe=W((function(){return!!se}),[se]),Re=k(ne,G&&I,oe),ze=T(oe,Q),Le=B(oe);v((function(){We((function(e){return Le?[Le]:e}))}),[Le]);var Ue=w(fe,ze),qe=P(fe,ze),Ee=W((function(){return qe&&se?qe.find((function(e){return e.id===se})):null}),[qe,se]),Me=R(qe,Ee);z(ge,Me,Be);var Fe=L(ge,ze,Te),_e=U(oe,Me),Ke=o(_e,2),He=Ke[0],Qe=Ke[1],$e=W((function(){return Qe?t(Qe,Ce.key,1===Ce.direction?"asc":"desc"):Qe}),[Ce,Qe]),Ge=j((function(e){ie(e),ae(null),Be([]),me(D.filters)}),[]),Je=j((function(e){var n=qe.find((function(n){return n.id===e}));n&&n.is_usable&&Be(l(Te.concat(e)))}),[Te,qe]),Ve=j((function(e){Be(l(Te.filter((function(n){return n!==e}))))}),[Te]),Xe=j((function(){Be(qe.filter((function(e){return e.is_usable})).map((function(e){return e.id})))}),[qe]),Ye=j((function(){Be([])}),[qe]),Ze=j((function(e){Be([]),ae(e)}),[ze]),en=j((function(){Be([]),ae(null)}),[]),nn=j((function(e){he(e)}),[]),tn=j((function(n,t){me((function(l){return F(F({},l),{},e({},n,t))})),Be([])}),[]),ln=j((function(){me(F({},D.filters)),Be([])}),[]),on=j((function(){xe((function(e){return!e}))}),[]),rn=j((function(e){We(e)}),[]),cn=j((function(e){Oe((function(n){return n.key===e?F(F({},n),{},{direction:-1*n.direction}):{key:e,direction:1}}))}),[]),sn=function(){V()},an=!(ze&&qe&&Me&&Qe&&Fe&&$e);return i(a,{onBackdropClick:V,onEscapeKeyDown:V,maxWidth:"lg",fullWidth:!0,fullScreen:ee,open:y,children:[r(d,{children:i("div",{className:Y.dialogTitles,children:[G?i("div",{className:Y.titleArea,children:[r(u,{className:Y.subTitle,onClick:sn,children:"Select Offset Wells"}),r(u,{className:Y.subTitleSpace,children:" / "}),r(u,{className:Y.title,children:"Advanced Search"})]}):r(u,{className:Y.title,children:"Select Offset Wells"}),r(f,{title:"Close",children:r(m,{"data-not-migrated-muiiconbutton":!0,"aria-label":"close",className:Y.closeIconButton,onClick:V,children:r(h,{className:Y.closeIcon})})})]})}),r(p,{className:Y.dialogContent,children:an?r(A,{fullscreen:!1}):i(c,{children:[r(x,{companyId:oe,companies:Re,isCurrentUserCorvaAdmin:ne,radius:ge,wells:qe,subjectWell:Ee,filters:fe,filtersOptions:Ue,mapHidden:De,isRadiusEditable:Pe,onChangeCompany:Ge,onSetSubjectWell:Ze,onChangeRadius:nn,onChangeFilters:tn,onClearFilters:ln,onToggleMap:on}),r(q,{subjectWell:Ee,wells:qe,offsetWells:Fe,radius:ge,mapHidden:De,onSetSubjectWell:Ze,onRemoveSubjectWell:en,onAddOffsetWell:Je,onDeleteOffsetWell:Ve}),r(E,{subjectWell:Ee,wells:$e,offsetWells:Fe,metricsKeys:ve,sortInfo:Ce,isMetricsLoading:He,unusableWellAlarm:$,onChangeMetricsKeys:rn,onSorting:cn,onAddOffsetWell:Je,onDeleteOffsetWell:Ve,onAddAllOffsetWells:Xe,onDeleteAllOffsetWells:Ye})]})}),r("div",{className:Y.bottomShadow}),i(b,{className:C(Y.dialogActions,e({},Y.dialogActionsSmallScreen,ee)),children:[G?i("div",{className:Y.selectedWells,children:[r(u,{className:Y.selected,children:"Selected:"}),r(u,{className:Y.selectedLabel,children:"Best:"}),r(u,{className:Y.selectedNumber,children:J}),r(u,{className:Y.selectedLabel,children:"Advanced Search:"}),r(u,{className:Y.selectedNumber,children:(null==Fe?void 0:Fe.length)||0})]}):r("div",{}),i("div",{children:[r(g,{onClick:sn,color:"primary",style:{marginRight:16},children:"CANCEL"}),i(g,{variant:"contained",color:"primary",onClick:function(){var e=F(F({},K),{},{companyId:oe,subjectWellId:se,radius:ge,filters:fe,selectedWellIds:l(Fe.map((function(e){return e.id})))});X(e,Fe)},children:["ADD (",(null==Fe?void 0:Fe.length)||0,")"]})]})]})]})};K.propTypes={isOpen:I.bool.isRequired,defaultSubjectWellId:I.number,companyId:I.number,offsetSetting:I.shape({}).isRequired,currentUser:I.shape({}).isRequired,addWellsUsabilityInfo:I.func,unusableWellAlarm:I.string,isAdvancedSearch:I.bool,bestCount:I.number,onSave:I.func.isRequired,onClose:I.func.isRequired},K.defaultProps={defaultSubjectWellId:null,companyId:null,addWellsUsabilityInfo:null,unusableWellAlarm:"Unable to add",isAdvancedSearch:!1,bestCount:0};var H=y(K);export default H;
1
+ import e from"@babel/runtime/helpers/defineProperty";import{get as n,orderBy as t,uniq as l}from"lodash";import i from"@babel/runtime/helpers/slicedToArray";import{jsxs as o,jsx as r,Fragment as c}from"react/jsx-runtime";import{makeStyles as s,Dialog as a,DialogTitle as d,Typography as u,Tooltip as f,IconButton as m,DialogContent as p,DialogActions as b,Button as g}from"@material-ui/core";import h from"@material-ui/icons/Close";import{memo as y,useState as S,useEffect as v,useMemo as W,useCallback as j}from"react";import I from"prop-types";import C from"classnames";import{useTheme as O}from"@material-ui/core/styles";import A from"../LoadingIndicator/LoadingIndicator.js";import N from"@material-ui/core/useMediaQuery";import{DEFAULT_SETTINGS as x}from"./constants.js";import k from"./components/Filter/index.js";import D from"./effects/biDirectionalFiltering.js";import{useCompanies as w,useWells as T,useCompanyMetricKey as B,useFilteredWells as P,useWellsWithCoords as R,useRadiusWells as z,useOffsetWells as L,useMetricsData as U}from"./effects/index.js";import q from"./components/Map/index.js";import E from"./components/Table/index.js";function M(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);n&&(l=l.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,l)}return t}function F(n){for(var t=1;t<arguments.length;t++){var l=null!=arguments[t]?arguments[t]:{};t%2?M(Object(l),!0).forEach((function(t){e(n,t,l[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(l)):M(Object(l)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(l,e))}))}return n}var _=s((function(e){return{dialogTitles:{display:"flex",justifyContent:"space-between",alignItems:"center"},title:{fontSize:20},subTitle:{fontSize:14,color:"#03BCD4","&:hover":{cursor:"pointer",textDecoration:"underline"}},subTitleSpace:{fontSize:14,color:"#03BCD4"},titleArea:{display:"flex",alignItems:"center"},closeIconButton:{fontSize:20,padding:4,"&:hover $closeIcon":{color:"#fff"}},closeIcon:{color:"#BDBDBD"},dialogActions:{justifyContent:"space-between",paddingTop:8,paddingBottom:8},bottomShadow:{width:"100%",height:"16px",backgroundImage:"linear-gradient(180deg, rgba(65, 65, 65, 0) 0%, ".concat(e.palette.background.b9,")"),position:"absolute",bottom:"52px",zIndex:2},dialogActionsSmallScreen:{paddingRight:"100px"},dialogContent:{display:"flex",flexDirection:"column"},tabs:{background:"#414141"},selectedWells:{display:"flex",alignItems:"center"},selected:{fontSize:16},selectedLabel:{fontSize:12,marginLeft:14,color:"rgba(255, 255, 255, 0.54)"},selectedNumber:{fontSize:12,margin:4,color:"rgba(255, 255, 255, 0.8)"}}})),K=function(s){var y=s.isOpen,I=s.defaultSubjectWellId,M=s.companyId,K=s.offsetSetting,H=s.currentUser,Q=s.addWellsUsabilityInfo,$=s.unusableWellAlarm,G=s.isAdvancedSearch,J=s.bestCount,V=s.onClose,X=s.onSave,Y=_(),Z=O(),ee=N(Z.breakpoints.down("sm")),ne=("admin"===n(H,"role")||"developeradmin"===n(H,"role"))&&"corva"===n(H,["company","provider"]),te=S(M||n(K,"companyId")||+n(H,"company_id")),le=i(te,2),ie=le[0],oe=le[1],re=S(n(K,"subjectWellId")||I),ce=i(re,2),se=ce[0],ae=ce[1],de=S(n(K,"filters")||x.filters),ue=i(de,2),fe=ue[0],me=ue[1],pe=S(n(K,"radius")||x.radius),be=i(pe,2),ge=be[0],he=be[1],ye=S(n(K,"excludeSideTrack")),Se=i(ye,2),ve=Se[0],We=Se[1],je=S([]),Ie=i(je,2),Ce=Ie[0],Oe=Ie[1],Ae=S(x.sortInfo),Ne=i(Ae,2),xe=Ne[0],ke=Ne[1],De=S(!1),we=i(De,2),Te=we[0],Be=we[1],Pe=S([]),Re=i(Pe,2),ze=Re[0],Le=Re[1];v((function(){y&&(Le(n(K,"selectedWellIds")||[]),oe(M||n(K,"companyId")||+n(H,"company_id")),ae(n(K,"subjectWellId")||I))}),[y,K]);var Ue=W((function(){return!!se}),[se]),qe=w(ne,G&&I,ie),Ee=T(ie,Q),Me=B(ie);v((function(){Oe((function(e){return Me?[Me]:e}))}),[Me]);var Fe=D(fe,Ee),_e=P(fe,ve,Ee),Ke=W((function(){return _e&&se?_e.find((function(e){return e.id===se})):null}),[_e,se]),He=R(_e,Ke);z(ge,He,Le);var Qe=L(ge,Ee,ze),$e=U(ie,He),Ge=i($e,2),Je=Ge[0],Ve=Ge[1],Xe=W((function(){return Ve?t(Ve,xe.key,1===xe.direction?"asc":"desc"):Ve}),[xe,Ve]),Ye=j((function(e){oe(e),ae(null),Le([]),me(x.filters)}),[]),Ze=j((function(e){var n=_e.find((function(n){return n.id===e}));n&&n.is_usable&&Le(l(ze.concat(e)))}),[ze,_e]),en=j((function(e){Le(l(ze.filter((function(n){return n!==e}))))}),[ze]),nn=j((function(){Le(_e.filter((function(e){return e.is_usable})).map((function(e){return e.id})))}),[_e]),tn=j((function(){Le([])}),[_e]),ln=j((function(e){Le([]),ae(e)}),[Ee]),on=j((function(){Le([]),ae(null)}),[]),rn=j((function(e){he(e)}),[]),cn=j((function(e){We(e)}),[]),sn=j((function(n,t){me((function(l){return F(F({},l),{},e({},n,t))})),Le([])}),[]),an=j((function(){me(F({},x.filters)),Le([])}),[]),dn=j((function(){Be((function(e){return!e}))}),[]),un=j((function(e){Oe(e)}),[]),fn=j((function(e){ke((function(n){return n.key===e?F(F({},n),{},{direction:-1*n.direction}):{key:e,direction:1}}))}),[]),mn=function(){V()},pn=!(Ee&&_e&&He&&Ve&&Qe&&Xe);return o(a,{onBackdropClick:V,onEscapeKeyDown:V,maxWidth:"lg",fullWidth:!0,fullScreen:ee,open:y,children:[r(d,{children:o("div",{className:Y.dialogTitles,children:[G?o("div",{className:Y.titleArea,children:[r(u,{className:Y.subTitle,onClick:mn,children:"Select Offset Wells"}),r(u,{className:Y.subTitleSpace,children:" / "}),r(u,{className:Y.title,children:"Advanced Search"})]}):r(u,{className:Y.title,children:"Select Offset Wells"}),r(f,{title:"Close",children:r(m,{"data-not-migrated-muiiconbutton":!0,"aria-label":"close",className:Y.closeIconButton,onClick:V,children:r(h,{className:Y.closeIcon})})})]})}),r(p,{className:Y.dialogContent,children:pn?r(A,{fullscreen:!1}):o(c,{children:[r(k,{companyId:ie,companies:qe,isCurrentUserCorvaAdmin:ne,radius:ge,excludeSideTrack:ve||!1,wells:_e,subjectWell:Ke,filters:fe,filtersOptions:Fe,mapHidden:Te,isRadiusEditable:Ue,onChangeCompany:Ye,onSetSubjectWell:ln,onChangeRadius:rn,onChangeSidetrack:cn,onChangeFilters:sn,onClearFilters:an,onToggleMap:dn}),r(q,{subjectWell:Ke,wells:_e,offsetWells:Qe,radius:ge,mapHidden:Te,onSetSubjectWell:ln,onRemoveSubjectWell:on,onAddOffsetWell:Ze,onDeleteOffsetWell:en}),r(E,{subjectWell:Ke,wells:Xe,offsetWells:Qe,metricsKeys:Ce,sortInfo:xe,isMetricsLoading:Je,unusableWellAlarm:$,onChangeMetricsKeys:un,onSorting:fn,onAddOffsetWell:Ze,onDeleteOffsetWell:en,onAddAllOffsetWells:nn,onDeleteAllOffsetWells:tn})]})}),r("div",{className:Y.bottomShadow}),o(b,{className:C(Y.dialogActions,e({},Y.dialogActionsSmallScreen,ee)),children:[G?o("div",{className:Y.selectedWells,children:[r(u,{className:Y.selected,children:"Selected:"}),r(u,{className:Y.selectedLabel,children:"Best:"}),r(u,{className:Y.selectedNumber,children:J}),r(u,{className:Y.selectedLabel,children:"Advanced Search:"}),r(u,{className:Y.selectedNumber,children:(null==Qe?void 0:Qe.length)||0})]}):r("div",{}),o("div",{children:[r(g,{onClick:mn,color:"primary",style:{marginRight:16},children:"CANCEL"}),o(g,{variant:"contained",color:"primary",onClick:function(){var e=F(F({},K),{},{companyId:ie,subjectWellId:se,radius:ge,excludeSideTrack:ve,filters:fe,selectedWellIds:l(Qe.map((function(e){return e.id})))});X(e,Qe)},children:["ADD (",(null==Qe?void 0:Qe.length)||0,")"]})]})]})]})};K.propTypes={isOpen:I.bool.isRequired,defaultSubjectWellId:I.number,companyId:I.number,offsetSetting:I.shape({}).isRequired,currentUser:I.shape({}).isRequired,addWellsUsabilityInfo:I.func,unusableWellAlarm:I.string,isAdvancedSearch:I.bool,bestCount:I.number,onSave:I.func.isRequired,onClose:I.func.isRequired},K.defaultProps={defaultSubjectWellId:null,companyId:null,addWellsUsabilityInfo:null,unusableWellAlarm:"Unable to add",isAdvancedSearch:!1,bestCount:0};var H=y(K);export default H;
@@ -1 +1 @@
1
- import{jsxs as r,jsx as e}from"react/jsx-runtime";import{Typography as t}from"@material-ui/core";import a from"prop-types";import{makeStyles as i}from"@material-ui/core/styles";import o from"@material-ui/icons/Clear";var l=i((function(r){return{wrapper:{display:"flex",alignItems:"flex-end",height:"56px",cursor:"pointer","&:hover $clearText":{color:r.palette.primary.text1},"&:hover $clearIcon":{color:r.palette.primary.text1}},clearText:{color:r.palette.primary.text6},clearIcon:{color:r.palette.primary.text6,marginLeft:"16px",marginRight:"5px"}}}));function c(a){var i=a.onClick,c=l();return r("div",{className:c.wrapper,onClick:i,children:[e(o,{className:c.clearIcon}),e(t,{className:c.clearText,children:"Clear"})]})}c.propTypes={onClick:a.func.isRequired,classes:a.shape({}).isRequired};export default c;
1
+ import{jsxs as r,jsx as e}from"react/jsx-runtime";import{Typography as t}from"@material-ui/core";import a from"prop-types";import{makeStyles as o}from"@material-ui/core/styles";import i from"@material-ui/icons/Clear";var l=o((function(r){return{wrapper:{display:"flex",alignItems:"flex-end",height:"56px",marginBottom:"12px",cursor:"pointer","&:hover $clearText":{color:r.palette.primary.text1},"&:hover $clearIcon":{color:r.palette.primary.text1}},clearText:{color:r.palette.primary.text6},clearIcon:{color:r.palette.primary.text6,marginLeft:"16px",marginRight:"5px"}}}));function p(a){var o=a.onClick,p=l();return r("div",{className:p.wrapper,onClick:o,children:[e(i,{className:p.clearIcon}),e(t,{className:p.clearText,children:"Clear"})]})}p.propTypes={onClick:a.func.isRequired,classes:a.shape({}).isRequired};export default p;
@@ -0,0 +1 @@
1
+ import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/toConsumableArray";import"../../../../constants/completion.js";import"../../../../constants/alerts.js";import{debounce as e}from"lodash";import"@babel/runtime/helpers/slicedToArray";import"../../../../constants/goals.js";import"../../../../constants/segment.js";import"../../../../constants/apps.js";import"../../../../constants/drillstring.js";import"../../../../constants/notifications.js";import"../../../../constants/feed.js";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/asyncToGenerator";import"../../../../utils/mobileDetect.js";import"@babel/runtime/helpers/typeof";import"../../../../utils/index.js";import{jsx as t}from"react/jsx-runtime";import{withStyles as r}from"@material-ui/core";import"react";import"querystring";import"uuid/v1";import"../../../../clients/jsonApi/index.js";import"../../../../clients/subscriptions.js";import"uuid";import"@babel/runtime/helpers/objectWithoutProperties";import o from"prop-types";import"classnames";import"../../../Modal/index.js";import"../../../IconMenu/index.js";import"../../../StyledMenuItem/index.js";import"../../../LoadingIndicator/LoadingIndicator.js";import"../../../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../../ErrorBoundary/ErrorBoundary.js";import"../../../Typography.js";import"../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../../ConfirmationDialog.js";import"../../../DevCenter/DevCenterAppContainer/components/DisabledSettingsMessage/DisabledSettingsMessage.js";import"slate";import"../../../SlateFormattedText/RenderElements.js";import"../../../SlateFormattedText/SlateFormattedText.js";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"../../../DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.js";import"../../../DevCenter/DevCenterAppContainer/components/HelpCenterDialog/HelpCenterDialog.js";import"../../../DevCenter/DevCenterAppContainer/components/DcTooltipsCoordinatorProvider/DcTooltipsCoordinatorProvider.js";import"../../../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../../Tooltip/MuiTooltipDcWrapper.js";import"../../../Avatar/index.js";import"../../../Annotations/AnnotationsContext.js";import"../../../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"react-router";import"../../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"../../../IconButton/index.js";import"../../../Annotations/components/AnnotationsList/index.js";import"../../../Annotations/components/LastAnnotation/index.js";import"../../../PadModeSelect/PadModeSelect.js";import"../../../DevCenter/AppHeader/AppHeader.js";import"../../../DevCenter/AppSideBar/AppSideBar.js";import"../../../DevCenter/AppContext.js";import"../../../DevCenter/AppsDataProvider/AppsDataProvider.js";import"@material-ui/icons/Help";import"../../../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../../../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../../../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../../../DevCenter/NavigationBar/NavigationBar.js";import"../../../DevCenter/SideBar/SideBar.js";import"../../../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../../../TruncatedText/index.js";import"../../../AssetEditor/SingleAssetEditor.js";import"../../../AssetEditor/AssetEditorAutocomplete.js";import"../../../AssetEditor/index.js";import"../../../AppVersionsSelect/AppVersionsSelect.js";import"../../../CollapsableSidebar.js";import"../../../DateTimePicker/index.js";import"../../../DatePicker/index.js";import"../../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../../ColorPicker/ColorPicker.js";import"../../../ParameterCharts/AddEditTrack.js";import"../../../ParameterCharts/ParameterCharts.js";import"../../../ChartActionsList/ChartActionsList.js";import"../../../SettingEditors/ColorEditor/index.js";import"../../../SettingEditors/DropdownEditor/index.js";import"../../../SettingEditors/RadioEditor/index.js";import i from"../../../SwitchControl/index.js";import"../../../RangeSlider/RangeSlider.js";import"../../../Login/components/Login.js";import"../../../Login/components/PasswordField.js";import"../../../Login/components/Chip.js";import"../../../Login/components/StepFooter.js";import"../../../Login/components/StepContent.js";import"../../../Login/components/StepHeader.js";import"../../../Login/components/Step.js";import"../../../Login/components/OrDivider.js";import"../../../Login/components/HiddenEmailField.js";import"../../../Login/components/EmailField.js";import"../../../Breadcrumbs/index.js";import"../../../VirtualizedTable/index.js";import"../../../EmptyView/EmptyView.js";import"../../../Button/index.js";import"../../../MenuItem/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"../../../TextField/index.js";import"../../../Chip/index.js";import"../../../Counter/index.js";import"../../../AnchorsList/AnchorsList.js";import"../../../Select/index.js";import"../../../Tabs/Tabs.js";import"../../../Tabs/Tab.js";import"../../../Drillstring/BHASchematic.js";import"../../../Drillstring/BHAComponentIcon.js";import"../../../Drillstring/BHATable/index.js";import"../../../Drillstring/BHAComponentDetail/index.js";import"../../../Casing/CasingComponentIcon.js";import"../../../Casing/CasingTable/index.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"../../OffsetWellPickerDialog.js";import"../../../Notifications/Notifications.js";import"../../../TextLink/index.js";import"../../../Template/TemplatePopover/index.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"../../../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"../../../SearchInput/index.js";import"../../../FeedItem/FeedItem.js";import"../../../KeyboardDateTimePicker.js";import"../../../PostInput/PostInput.js";import"../../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../../../AddComment/Popover.js";import"../../../AddComment/Popup.js";var n=e((function(e){e()}),500);function s(e){var r=e.checked,o=e.onChange,s=e.classes;return t(i,{rightLabel:"Exclude Sidetracks",color:"primary",checked:r,onChange:function(e){n((function(){o(!e.target.checked)}))},size:"small",className:s.formControl})}s.propTypes={checked:o.bool.isRequired,onChange:o.func.isRequired,classes:o.shape({}).isRequired};var p=r({formControl:{display:"flex",alignItems:"flex-end",height:"56px"}})(s);export default p;
@@ -1 +1 @@
1
- import{get as e}from"lodash";import r from"@babel/runtime/helpers/slicedToArray";import{isNativeDetected as i,isMobileDetected as l}from"../../../../utils/mobileDetect.js";import{jsxs as t,jsx as n}from"react/jsx-runtime";import{makeStyles as s}from"@material-ui/core";import{memo as o,useState as a}from"react";import u from"prop-types";import p from"./SubjectWellSearch.js";import d from"./RadiusInput.js";import m from"./ToggleFiltersButton.js";import c from"./ToggleMapButton.js";import f from"./SingleSelect.js";import g from"./MultiSelect.js";import h from"./ClearFiltersButton.js";import{FILTERS_LIST as b}from"../../constants.js";var C=s({container:{display:"flex"},filters:{display:"flex",flexWrap:"wrap"},fileterSection:{display:"flex",width:"100%",alignItems:"center",flexWrap:"wrap"},subjectWellWrapper:{display:"flex",alignItems:"center",flexWrap:"wrap"}}),R=i||l;function j(i){var l=i.companyId,s=i.companies,o=i.isCurrentUserCorvaAdmin,u=i.wells,j=i.subjectWell,y=i.radius,q=i.filters,W=i.filtersOptions,v=i.mapHidden,S=i.isRadiusEditable,x=i.onChangeCompany,T=i.onSetSubjectWell,w=i.onChangeFilters,F=i.onChangeRadius,M=i.onClearFilters,I=i.onToggleMap,H=a(R),N=r(H,2),O=N[0],V=N[1],A=C({isMobile:R});return t("div",{children:[R&&n(m,{filtersHidden:O,onToggleFilters:function(){V((function(e){return!e}))}}),!O&&t("div",{className:A.container,children:[n(c,{mapHidden:v,onToggleMap:I}),n("div",{className:A.filters,children:t("div",{className:A.fileterSection,children:[n(f,{label:"Company",visible:o,items:s,currentValue:l,onChange:function(e){return x(e.target.value)}},"company"),b.map((function(r){var i=r.key,l=r.title,t=r.size,s=r.renderValue;return n(g,{title:l,size:t,options:e(W,i,[]),currentValues:e(q,i,[]),renderValue:s,onChange:function(e){return w(i,e)}},i)})),t("div",{className:A.subjectWellWrapper,children:[n(p,{wells:u,subjectWell:j,onChange:T}),n(d,{radius:y,editable:S,onChange:F}),n(h,{onClick:M})]})]})})]})]})}j.propTypes={isCurrentUserCorvaAdmin:u.bool.isRequired,companies:u.arrayOf(u.shape({})).isRequired,wells:u.arrayOf(u.shape({})).isRequired,subjectWell:u.shape({}),companyId:u.number.isRequired,radius:u.number.isRequired,isRadiusEditable:u.bool.isRequired,filters:u.shape({}).isRequired,filtersOptions:u.shape({}).isRequired,mapHidden:u.bool.isRequired,onChangeCompany:u.func.isRequired,onSetSubjectWell:u.func.isRequired,onChangeFilters:u.func.isRequired,onChangeRadius:u.func.isRequired,onClearFilters:u.func.isRequired,onToggleMap:u.func.isRequired},j.defaultProps={subjectWell:null};var y=o(j);export default y;
1
+ import{get as e}from"lodash";import r from"@babel/runtime/helpers/slicedToArray";import{isNativeDetected as i,isMobileDetected as n}from"../../../../utils/mobileDetect.js";import{jsxs as t,jsx as l}from"react/jsx-runtime";import{makeStyles as a}from"@material-ui/core";import{memo as o,useState as s}from"react";import u from"prop-types";import d from"./SubjectWellSearch.js";import c from"./RadiusInput.js";import p from"./SidetrackSwitch.js";import m from"./ToggleFiltersButton.js";import f from"./ToggleMapButton.js";import g from"./SingleSelect.js";import h from"./MultiSelect.js";import b from"./ClearFiltersButton.js";import{FILTERS_LIST as C}from"../../constants.js";var R=a({container:{display:"flex"},filters:{display:"flex",flexWrap:"wrap"},fileterSection:{display:"flex",width:"100%",alignItems:"center",flexWrap:"wrap"},subjectWellWrapper:{display:"flex",alignItems:"center",flexWrap:"wrap"}}),j=i||n;function q(i){var n=i.companyId,a=i.companies,o=i.isCurrentUserCorvaAdmin,u=i.wells,q=i.subjectWell,S=i.radius,y=i.excludeSideTrack,W=i.filters,v=i.filtersOptions,x=i.mapHidden,T=i.isRadiusEditable,k=i.onChangeCompany,w=i.onSetSubjectWell,F=i.onChangeFilters,M=i.onChangeRadius,I=i.onChangeSidetrack,H=i.onClearFilters,N=i.onToggleMap,O=s(j),V=r(O,2),A=V[0],B=V[1],z=R({isMobile:j});return t("div",{children:[j&&l(m,{filtersHidden:A,onToggleFilters:function(){B((function(e){return!e}))}}),!A&&t("div",{className:z.container,children:[l(f,{mapHidden:x,onToggleMap:N}),l("div",{className:z.filters,children:t("div",{className:z.fileterSection,children:[l(g,{label:"Company",visible:o,items:a,currentValue:n,onChange:function(e){return k(e.target.value)}},"company"),C.map((function(r){var i=r.key,n=r.title,t=r.size,a=r.renderValue;return l(h,{title:n,size:t,options:e(v,i,[]),currentValues:e(W,i,[]),renderValue:a,onChange:function(e){return F(i,e)}},i)})),t("div",{className:z.subjectWellWrapper,children:[l(d,{wells:u,subjectWell:q,onChange:w}),l(c,{radius:S,editable:T,onChange:M}),l(p,{checked:y,onChange:I}),l(b,{onClick:H})]})]})})]})]})}q.propTypes={isCurrentUserCorvaAdmin:u.bool.isRequired,companies:u.arrayOf(u.shape({})).isRequired,wells:u.arrayOf(u.shape({})).isRequired,subjectWell:u.shape({}),companyId:u.number.isRequired,radius:u.number.isRequired,isRadiusEditable:u.bool.isRequired,excludeSideTrack:u.bool.isRequired,filters:u.shape({}).isRequired,filtersOptions:u.shape({}).isRequired,mapHidden:u.bool.isRequired,onChangeCompany:u.func.isRequired,onSetSubjectWell:u.func.isRequired,onChangeFilters:u.func.isRequired,onChangeRadius:u.func.isRequired,onChangeSidetrack:u.func.isRequired,onClearFilters:u.func.isRequired,onToggleMap:u.func.isRequired},q.defaultProps={subjectWell:null};var S=o(q);export default S;
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/toConsumableArray";import t from"moment";import{isEqual as n,clone as i,get as l}from"lodash";import{getUnitDisplay as o,convertValue as a}from"../../../../utils/index.js";import{jsx as s,Fragment as c,jsxs as u}from"react/jsx-runtime";import{withStyles as d,Checkbox as f,Typography as m,IconButton as p}from"@material-ui/core";import{memo as h,useMemo as b}from"react";import g from"prop-types";import y from"classnames";import v from"@material-ui/icons/Sort";import{AutoSizer as w,Table as x,Column as C}from"react-virtualized";import{METRICS_LIST as k,TABLE_COLUMNS as O,SETTINGS_COLUMN as W,METRICS_KEYS as N}from"../../constants.js";import R from"@material-ui/icons/NotInterested";import{SizeMe as j}from"react-sizeme";import _ from"./SubjectIndicator.js";import D from"./MetricsAddMenu.js";import I from"./MetricsSelect.js";function S(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 T(r){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){e(r,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}))}return r}var q=48,z=44;function A(e,r){var n,i=l(e,r);switch(r){case"distance":n=Number.isFinite(i)?parseFloat(i).toFixed(2):"N/A";break;case"rigReleaseDate":n=Number.isFinite(i)?t.unix(i).format("MM/DD/YYYY"):"N/A";break;default:n=i||""}return n}function M(t){var d=t.subjectWell,h=t.wells,g=t.offsetWells,j=t.metricsKeys,S=t.isMetricsLoading,q=t.sortInfo,z=t.unusableWellAlarm,M=t.dialogWidth,B=t.classes,L=t.onChangeMetricsKeys,P=t.onAddOffsetWell,K=t.onDeleteOffsetWell,F=t.onAddAllOffsetWells,Y=t.onDeleteAllOffsetWells,E=t.onSorting,H=b((function(){return h.filter((function(e){return e.is_usable}))}),[h]),V=b((function(){var e=H.map((function(e){return e.id})).sort(),r=g.map((function(e){return e.id})).sort();return e.length&&n(e,r)}),[H,g]),G=b((function(){return j.reduce((function(e,r){return e.concat(k.filter((function(e){return e.key===r})))}),[])}),[j]),X=b((function(){return[].concat(r(O),r(G.map((function(e){return T(T({},e),{},{width:240})}))),[W])}),[G]),$=b((function(){if(!M||M<=0)return{};var e={},r=[];return X.filter((function(e){return Number.isFinite(e.width)})).forEach((function(t){e[t.key]=t.width-1,r.push(t.width-1)})),X.filter((function(e){return!Number.isFinite(e.width)})).forEach((function(t){var n=r.reduce((function(e,r){return e+r}),0),i=Math.floor((M-n)/(X.length-r.length)),l=t.minWidth||200,o=i<l?l:i;e[t.key]=o-1,r.push(o-1)})),e}),[M,X]),J=b((function(){return Object.values($).reduce((function(e,r){return e+r}),0)}),[$]),Q=function(e){L(e)},U=function(e){e.target.checked?F():Y()},Z=function(r){return s(p,{"data-not-migrated-muiiconbutton":!0,className:B.sortIconButton,onClick:function(){return function(e){E(e)}(r)},children:r!==q.key?s(R,{className:B.sortIcon}):s(v,{className:y(B.sortIcon,e({},B.ascendingSortIcon,1===q.direction))})})},ee=function(e){var r,t=e.label,n=e.dataKey;if("name"===n)return u("div",{className:B.nameWrapper,children:[s(f,{classes:{checked:B.nameCheckBox,indeterminate:B.nameCheckBox},onClick:U,checked:V,indeterminate:g.length>0&&!V,size:"small"}),s(m,{className:y(B.cell,B.nameCell),children:t}),Z(n)]});if(j.includes(n)){var l=G.find((function(e){return e.key===n})),a=G.findIndex((function(e){return e.key===n}));return u("div",{className:B.metricsColumn,children:[s(I,{items:k,currentValue:n,onChange:(r=a,function(e){var t=i(j);t[r]=e,L(t)})}),s(m,{className:y(B.cell,B.unitCell),children:l.unitType?"(".concat(o(l.unitType,l.to),")"):""}),Z(n)]})}return n===W.key?s("div",{className:B.settingsCell,children:s(D,{metricsKeys:j,onChange:Q})}):u("div",{className:B.nameWrapper,children:[s(m,{className:B.cell,children:t}),Z(n)]})},re=function(r){var t=r.rowData,n=r.dataKey;if("name"===n)return u("div",{className:B.nameWrapper,children:[s(f,{color:"primary",checked:g.findIndex((function(e){return e.id===t.id}))>-1,onChange:function(e){return r=t.id,void(e.target.checked?P(r):K(r));var r},size:"small",disabled:!t.is_usable}),s(m,{className:y(B.tableCellLabel,e({},B.tableCellLabelDisabled,!t.is_usable)),children:A(t,n)}),d&&t.id===d.id&&s(_,{})]});if(n===W.key)return s("div",{className:B.settingsCell,children:!t.is_usable&&s(m,{className:B.errorMsg,children:z})});var i=null;if(j.includes(n)){var o=G.find((function(e){return e.key===n}));i=function(e,r,t){var n=l(e,r.key);if(N.includes(r.key)){if(Number.isFinite(n)||n)return r.unitType?a(n,r.unitType,r.from,r.to):n;if(t)return"loading..."}return""}(t,o,S)}else i=A(t,n);return s(m,{className:y(B.cell,B.tableCellLabel,e({},B.tableCellLabelDisabled,!t.is_usable)),children:i})};return s(c,{children:s("div",{className:B.tableWrapper,children:s(w,{children:function(e){var r=e.height;return s(x,{width:J,height:r,headerHeight:44,rowHeight:48,rowCount:h.length,rowGetter:function(e){var r=e.index;return h[r]},className:B.table,children:X.map((function(e){return s(C,{width:$[e.key]||200,dataKey:e.key,label:e.label,headerRenderer:ee,cellRenderer:re},e.key)}))})}})})})}M.propTypes={subjectWell:g.shape({id:g.number}),wells:g.arrayOf(g.shape({})).isRequired,offsetWells:g.arrayOf(g.shape({})).isRequired,metricsKeys:g.arrayOf(g.string).isRequired,isMetricsLoading:g.bool.isRequired,sortInfo:g.shape({key:g.string.isRequired,direction:g.number.isRequired}).isRequired,classes:g.shape({}).isRequired,onChangeMetricsKeys:g.func.isRequired,onAddOffsetWell:g.func.isRequired,onDeleteOffsetWell:g.func.isRequired,onAddAllOffsetWells:g.func.isRequired,onDeleteAllOffsetWells:g.func.isRequired,onSorting:g.func.isRequired,unusableWellAlarm:g.string.isRequired,dialogWidth:g.number},M.defaultProps={subjectWell:null,dialogWidth:0};var B=d((function(e){return{title:{display:"flex",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap",marginBottom:"15px",marginTop:"16px"},tableWrapper:{marginTop:"24px",overflowX:"auto",overflowY:"hidden",position:"relative",height:2e3,minHeight:150,borderTop:"1px solid rgba(81, 81, 81, 1)"},table:{"& .ReactVirtualized__Table__headerRow":{textTransform:"none",borderBottom:e.isLightTheme?"1px solid rgba(224, 224, 224, 1)":"1px solid rgba(81, 81, 81, 1)"},"& .ReactVirtualized__Table__row":{borderBottom:e.isLightTheme?"1px solid rgba(224, 224, 224, 1)":"1px solid rgba(81, 81, 81, 1)","&:hover":{backgroundColor:"rgba(255, 255, 255, 0.03)"}},"& .ReactVirtualized__Table__Grid":{outline:"none"},"& .ReactVirtualized__Table__headerColumn":{outline:"none"}},cell:{color:"rgba(255, 255, 255, 0.54)",padding:"5px 10px",fontSize:"12px",whiteSpace:"nowrap"},nameWrapper:{display:"flex",alignItems:"center"},nameCell:{padding:0},unitCell:{padding:0},tableRowHoverEnabled:{"&:hover":{backgroundColor:"rgba(255, 255, 255, 0.1)"}},settingsCell:{textAlign:"right"},rigReleaseCell:{whiteSpace:"nowrap"},nameCheckBox:{color:e.palette.primary.main},bodyCell:{fontSize:"0.90rem",padding:"5px 10px"},metricsCellWrapper:{display:"flex",flexDirection:"row",alignContent:"center"},tableTitle:{fontSize:"16px",lineHeight:"140.6%",marginTop:10},tableTitleItems:{display:"flex",flexDirection:"row",alignItems:"center"},addWellInput:{width:300,marginTop:10},sortIconButton:{padding:"8px","&:hover $sortIcon":{color:"#fff"}},ascendingSortIcon:{transform:"scaleY(-1)"},sortIcon:{fontSize:"14px",color:"#BDBDBD"},metricsColumn:{display:"flex",alignItems:"center"},tableCellLabel:{fontSize:"0.90rem",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",color:"#fff"},tableCellLabelDisabled:{color:"#C4C4C4"},errorMsg:{color:"#C4C4C4",fontStyle:"italic",fontSize:"14px",padding:"0 16px",whiteSpace:"nowrap"}}}))(h((function(e){return s(j,{monitorWidth:!0,children:function(r){var t=r.size;return s(M,T({dialogWidth:t.width},e))}})})));export default B;export{z as HEADER_HEIGHT,q as ROW_HEIGHT};
1
+ import e from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/toConsumableArray";import t from"moment";import{isEqual as n,clone as i,get as l}from"lodash";import{getUnitDisplay as o,convertValue as a}from"../../../../utils/index.js";import{jsx as s,Fragment as c,jsxs as u}from"react/jsx-runtime";import{withStyles as d,Checkbox as f,Typography as m,IconButton as p}from"@material-ui/core";import{memo as h,useMemo as b}from"react";import g from"prop-types";import y from"classnames";import{SizeMe as v}from"react-sizeme";import w from"@material-ui/icons/Sort";import{AutoSizer as x,Table as C,Column as k}from"react-virtualized";import{METRICS_LIST as O,TABLE_COLUMNS as W,SETTINGS_COLUMN as N,METRICS_KEYS as R}from"../../constants.js";import j from"@material-ui/icons/NotInterested";import _ from"./SubjectIndicator.js";import D from"./MetricsAddMenu.js";import I from"./MetricsSelect.js";function S(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 T(r){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){e(r,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}))}return r}var q=48,z=44;function A(e,r){var n,i=l(e,r);switch(r){case"distance":n=Number.isFinite(i)?parseFloat(i).toFixed(2):"N/A";break;case"rigReleaseDate":n=Number.isFinite(i)?t.unix(i).format("MM/DD/YYYY"):"N/A";break;default:n=i||""}return n}function M(t){var d=t.subjectWell,h=t.wells,g=t.offsetWells,v=t.metricsKeys,S=t.isMetricsLoading,q=t.sortInfo,z=t.unusableWellAlarm,M=t.dialogWidth,B=t.classes,L=t.onChangeMetricsKeys,P=t.onAddOffsetWell,K=t.onDeleteOffsetWell,F=t.onAddAllOffsetWells,Y=t.onDeleteAllOffsetWells,E=t.onSorting,H=b((function(){return h.filter((function(e){return e.is_usable}))}),[h]),V=b((function(){var e=H.map((function(e){return e.id})).sort(),r=g.map((function(e){return e.id})).sort();return e.length&&n(e,r)}),[H,g]),G=b((function(){return v.reduce((function(e,r){return e.concat(O.filter((function(e){return e.key===r})))}),[])}),[v]),X=b((function(){return[].concat(r(W),r(G.map((function(e){return T(T({},e),{},{width:240})}))),[N])}),[G]),$=b((function(){if(!M||M<=0)return{};var e={},r=[];return X.filter((function(e){return Number.isFinite(e.width)})).forEach((function(t){e[t.key]=t.width-1,r.push(t.width-1)})),X.filter((function(e){return!Number.isFinite(e.width)})).forEach((function(t){var n=r.reduce((function(e,r){return e+r}),0),i=Math.floor((M-n)/(X.length-r.length)),l=t.minWidth||200,o=i<l?l:i;e[t.key]=o-1,r.push(o-1)})),e}),[M,X]),J=b((function(){return Object.values($).reduce((function(e,r){return e+r}),0)}),[$]),Q=function(e){L(e)},U=function(e){e.target.checked?F():Y()},Z=function(r){return s(p,{"data-not-migrated-muiiconbutton":!0,className:B.sortIconButton,onClick:function(){return function(e){E(e)}(r)},children:r!==q.key?s(j,{className:B.sortIcon}):s(w,{className:y(B.sortIcon,e({},B.ascendingSortIcon,1===q.direction))})})},ee=function(e){var r,t=e.label,n=e.dataKey;if("name"===n)return u("div",{className:B.nameWrapper,children:[s(f,{classes:{checked:B.nameCheckBox,indeterminate:B.nameCheckBox},onClick:U,checked:V,indeterminate:g.length>0&&!V,size:"small"}),s(m,{className:y(B.cell,B.nameCell),children:t}),Z(n)]});if(v.includes(n)){var l=G.find((function(e){return e.key===n})),a=G.findIndex((function(e){return e.key===n}));return u("div",{className:B.metricsColumn,children:[s(I,{items:O,currentValue:n,onChange:(r=a,function(e){var t=i(v);t[r]=e,L(t)})}),s(m,{className:y(B.cell,B.unitCell),children:l.unitType?"(".concat(o(l.unitType,l.to),")"):""}),Z(n)]})}return n===N.key?s("div",{className:B.settingsCell,children:s(D,{metricsKeys:v,onChange:Q})}):u("div",{className:B.nameWrapper,children:[s(m,{className:B.cell,children:t}),Z(n)]})},re=function(r){var t=r.rowData,n=r.dataKey;if("name"===n)return u("div",{className:B.nameWrapper,children:[s(f,{color:"primary",checked:g.findIndex((function(e){return e.id===t.id}))>-1,onChange:function(e){return r=t.id,void(e.target.checked?P(r):K(r));var r},size:"small",disabled:!t.is_usable}),s(m,{className:y(B.tableCellLabel,e({},B.tableCellLabelDisabled,!t.is_usable)),children:A(t,n)}),d&&t.id===d.id&&s(_,{})]});if(n===N.key)return s("div",{className:B.settingsCell,children:!t.is_usable&&s(m,{className:B.errorMsg,children:z})});var i=null;if(v.includes(n)){var o=G.find((function(e){return e.key===n}));i=function(e,r,t){var n=l(e,r.key);if(R.includes(r.key)){if(Number.isFinite(n)||n)return r.unitType?a(n,r.unitType,r.from,r.to):n;if(t)return"loading..."}return""}(t,o,S)}else i=A(t,n);return s(m,{className:y(B.cell,B.tableCellLabel,e({},B.tableCellLabelDisabled,!t.is_usable)),children:i})};return s(c,{children:s("div",{className:B.tableWrapper,children:s(x,{children:function(e){var r=e.height;return s(C,{width:J,height:r,headerHeight:44,rowHeight:48,rowCount:h.length,rowGetter:function(e){var r=e.index;return h[r]},className:B.table,children:X.map((function(e){return s(k,{width:$[e.key]||200,dataKey:e.key,label:e.label,headerRenderer:ee,cellRenderer:re},e.key)}))})}})})})}M.propTypes={subjectWell:g.shape({id:g.number}),wells:g.arrayOf(g.shape({})).isRequired,offsetWells:g.arrayOf(g.shape({})).isRequired,metricsKeys:g.arrayOf(g.string).isRequired,isMetricsLoading:g.bool.isRequired,sortInfo:g.shape({key:g.string.isRequired,direction:g.number.isRequired}).isRequired,classes:g.shape({}).isRequired,onChangeMetricsKeys:g.func.isRequired,onAddOffsetWell:g.func.isRequired,onDeleteOffsetWell:g.func.isRequired,onAddAllOffsetWells:g.func.isRequired,onDeleteAllOffsetWells:g.func.isRequired,onSorting:g.func.isRequired,unusableWellAlarm:g.string.isRequired,dialogWidth:g.number},M.defaultProps={subjectWell:null,dialogWidth:0};var B=d((function(e){return{title:{display:"flex",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap",marginBottom:"15px",marginTop:"16px"},tableWrapper:{marginTop:"24px",overflowX:"auto",overflowY:"hidden",position:"relative",height:2e3,minHeight:150,borderTop:"1px solid rgba(81, 81, 81, 1)"},table:{"& .ReactVirtualized__Table__headerRow":{textTransform:"none",borderBottom:e.isLightTheme?"1px solid rgba(224, 224, 224, 1)":"1px solid rgba(81, 81, 81, 1)"},"& .ReactVirtualized__Table__row":{borderBottom:e.isLightTheme?"1px solid rgba(224, 224, 224, 1)":"1px solid rgba(81, 81, 81, 1)","&:hover":{backgroundColor:"rgba(255, 255, 255, 0.03)"}},"& .ReactVirtualized__Table__Grid":{outline:"none"},"& .ReactVirtualized__Table__headerColumn":{outline:"none"}},cell:{color:"rgba(255, 255, 255, 0.54)",padding:"5px 10px",fontSize:"12px",whiteSpace:"nowrap"},nameWrapper:{display:"flex",alignItems:"center"},nameCell:{padding:0},unitCell:{padding:0},tableRowHoverEnabled:{"&:hover":{backgroundColor:"rgba(255, 255, 255, 0.1)"}},settingsCell:{textAlign:"right"},rigReleaseCell:{whiteSpace:"nowrap"},nameCheckBox:{color:e.palette.primary.main},bodyCell:{fontSize:"0.90rem",padding:"5px 10px"},metricsCellWrapper:{display:"flex",flexDirection:"row",alignContent:"center"},tableTitle:{fontSize:"16px",lineHeight:"140.6%",marginTop:10},tableTitleItems:{display:"flex",flexDirection:"row",alignItems:"center"},addWellInput:{width:300,marginTop:10},sortIconButton:{padding:"8px","&:hover $sortIcon":{color:"#fff"}},ascendingSortIcon:{transform:"scaleY(-1)"},sortIcon:{fontSize:"14px",color:"#BDBDBD"},metricsColumn:{display:"flex",alignItems:"center"},tableCellLabel:{fontSize:"0.90rem",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",color:"#fff"},tableCellLabelDisabled:{color:"#C4C4C4"},errorMsg:{color:"#C4C4C4",fontStyle:"italic",fontSize:"14px",padding:"0 16px",whiteSpace:"nowrap"}}}))(h((function(e){return s(v,{monitorWidth:!0,children:function(r){var t=r.size;return s(M,T({dialogWidth:t.width},e))}})})));export default B;export{z as HEADER_HEIGHT,q as ROW_HEIGHT};
@@ -1 +1 @@
1
- import t from"@babel/runtime/helpers/defineProperty";import"../../../constants/completion.js";import"../../../constants/alerts.js";import{get as n}from"lodash";import r from"@babel/runtime/helpers/slicedToArray";import{BENCHMARK_METRIC_GOAL as e}from"../../../constants/goals.js";import"../../../constants/segment.js";import"../../../constants/apps.js";import"../../../constants/drillstring.js";import"../../../constants/notifications.js";import"../../../constants/feed.js";import{getCompanyGoalSetting as i}from"../../../utils/goals.js";import o from"@babel/runtime/regenerator";import u from"@babel/runtime/helpers/asyncToGenerator";import{mapbox as c}from"../../../utils/index.js";import{useState as s,useEffect as a,useRef as f}from"react";import{FILTERS as l,METRICS_KEYS as p}from"../constants.js";import{fetchCompanies as m,fetchCompanyGoals as h,fetchWells as v,fetchMetricsData as d}from"../utils/apiCalls.js";export{default as useBidirectionalFiltering}from"./biDirectionalFiltering.js";function b(t,n){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);n&&(e=e.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),r.push.apply(r,e)}return r}function j(n){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?b(Object(e),!0).forEach((function(r){t(n,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):b(Object(e)).forEach((function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))}))}return n}var y=c.getAssetV2Coordinates,g=c.getDistanceByCoordinates;function O(t){var n=f();return a((function(){n.current=t})),n.current}function x(t,n,e){var i=s([]),c=r(i,2),f=c[0],l=c[1];return a((function(){function r(){return(r=u(o.mark((function r(){var i;return o.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(t){r.next=3;break}return l([]),r.abrupt("return");case 3:return r.next=5,m();case 5:i=r.sent,n&&(i=i.filter((function(t){return t.id===e}))),l(i);case 8:case"end":return r.stop()}}),r)})))).apply(this,arguments)}!function(){r.apply(this,arguments)}()}),[]),f}function w(t){var n=s(null),c=r(n,2),f=c[0],l=c[1];return a((function(){function n(){return(n=u(o.mark((function n(){var r,u;return o.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,h(t);case 2:r=n.sent,u=i(r,e),l(u);case 5:case"end":return n.stop()}}),n)})))).apply(this,arguments)}l(null),function(){n.apply(this,arguments)}()}),[t]),f}function k(t,n){var e=s(null),i=r(e,2),c=i[0],f=i[1];return a((function(){function r(){return(r=u(o.mark((function r(){var e;return o.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!t){r.next=6;break}return r.next=3,v(t,n);case 3:r.t0=r.sent,r.next=7;break;case 6:r.t0=null;case 7:e=r.t0,f(e);case 9:case"end":return r.stop()}}),r)})))).apply(this,arguments)}f(null),function(){r.apply(this,arguments)}()}),[t]),c}function E(t,n){var e=s(null),i=r(e,2),o=i[0],u=i[1];return a((function(){u(n?Object.values(l).reduce((function(n,r){return n.filter((function(n){return!t[r]||0===t[r].length||t[r].includes(n[r])}))}),n):null)}),[n,t]),o}function P(t,n){var e=s(null),i=r(e,2),o=i[0],u=i[1];return a((function(){if(t){var r=n&&y(n,"topHole");if(r){var e=[];t.forEach((function(t){var n=y(t,"topHole");if(n){var i=parseFloat(g(r,n));e.push(j(j({},t),{},{distance:i}))}else e.push(t)})),u(e)}else u(t)}else u(t)}),[t,n]),o}function D(t,n,e){var i=s(null),o=r(i,2),u=o[0],c=o[1];return a((function(){if(n){var t=[];n.forEach((function(n){e.includes(n.id)&&n.is_usable&&t.push(n)})),c(t)}else c(null)}),[t,n,e]),u}function F(t,e){var i=f({}),c=s(!0),l=r(c,2),m=l[0],h=l[1],v=s(null),b=r(v,2),y=b[0],g=b[1];return a((function(){function r(){return(r=u(o.mark((function r(u){var c,s,a;return o.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,d(t,u);case 2:c=r.sent,s={},u.forEach((function(t){var r={},e=c.filter((function(r){return n(r,"asset_id")===t}));p.forEach((function(t){var i=e.find((function(r){return n(r,"data.key")===t})),o=n(i,"data.value");r[t]=Number.isFinite(o)?parseFloat(o).toFixed(2):null})),s[t]=r})),i.current=j(j({},i.current),s),a=[],e.forEach((function(t){a.push(j(j({},t),i.current[t.id]))})),h(!1),g(a);case 10:case"end":return r.stop()}}),r)})))).apply(this,arguments)}if(e)if(0!==e.length){var c=[];e.forEach((function(t){i.current[t.id]||c.push(t.id)})),h(!0),function(t){r.apply(this,arguments)}(c)}else g([]);else g(null)}),[e]),[m,y]}function C(t,n,r){var e=f(!1);a((function(){if(n){if(e.current){var i=[];n.forEach((function(n){n.distance<=t&&i.push(n.id)})),r(i)}e.current=!0}}),[t,n])}export{x as useCompanies,w as useCompanyMetricKey,E as useFilteredWells,F as useMetricsData,D as useOffsetWells,O as usePrevious,C as useRadiusWells,k as useWells,P as useWellsWithCoords};
1
+ import t from"@babel/runtime/helpers/defineProperty";import"../../../constants/completion.js";import"../../../constants/alerts.js";import{get as n}from"lodash";import r from"@babel/runtime/helpers/slicedToArray";import{BENCHMARK_METRIC_GOAL as e}from"../../../constants/goals.js";import"../../../constants/segment.js";import"../../../constants/apps.js";import"../../../constants/drillstring.js";import"../../../constants/notifications.js";import"../../../constants/feed.js";import{getCompanyGoalSetting as i}from"../../../utils/goals.js";import o from"@babel/runtime/regenerator";import u from"@babel/runtime/helpers/asyncToGenerator";import{mapbox as c}from"../../../utils/index.js";import{useState as s,useEffect as a,useRef as f}from"react";import{FILTERS as l,METRICS_KEYS as p}from"../constants.js";import{fetchCompanies as m,fetchCompanyGoals as h,fetchWells as v,fetchMetricsData as d}from"../utils/apiCalls.js";export{default as useBidirectionalFiltering}from"./biDirectionalFiltering.js";function b(t,n){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);n&&(e=e.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),r.push.apply(r,e)}return r}function j(n){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?b(Object(e),!0).forEach((function(r){t(n,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):b(Object(e)).forEach((function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))}))}return n}var y=c.getAssetV2Coordinates,g=c.getDistanceByCoordinates;function O(t){var n=f();return a((function(){n.current=t})),n.current}function x(t,n,e){var i=s([]),c=r(i,2),f=c[0],l=c[1];return a((function(){function r(){return(r=u(o.mark((function r(){var i;return o.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(t){r.next=3;break}return l([]),r.abrupt("return");case 3:return r.next=5,m();case 5:i=r.sent,n&&(i=i.filter((function(t){return t.id===e}))),l(i);case 8:case"end":return r.stop()}}),r)})))).apply(this,arguments)}!function(){r.apply(this,arguments)}()}),[]),f}function w(t){var n=s(null),c=r(n,2),f=c[0],l=c[1];return a((function(){function n(){return(n=u(o.mark((function n(){var r,u;return o.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,h(t);case 2:r=n.sent,u=i(r,e),l(u);case 5:case"end":return n.stop()}}),n)})))).apply(this,arguments)}l(null),function(){n.apply(this,arguments)}()}),[t]),f}function k(t,n){var e=s(null),i=r(e,2),c=i[0],f=i[1];return a((function(){function r(){return(r=u(o.mark((function r(){var e;return o.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!t){r.next=6;break}return r.next=3,v(t,n);case 3:r.t0=r.sent,r.next=7;break;case 6:r.t0=null;case 7:e=r.t0,f(e);case 9:case"end":return r.stop()}}),r)})))).apply(this,arguments)}f(null),function(){r.apply(this,arguments)}()}),[t]),c}function E(t,n,e){var i=s(null),o=r(i,2),u=o[0],c=o[1],f=/\sST0/g;return a((function(){if(e){var r=Object.values(l).reduce((function(n,r){return n.filter((function(n){return e=n[r],!(i=t[r])||0===i.length||i.includes(e);var e,i}))}),e).filter((function(t){return n&&!t.name.match(f)||!n}));c(r)}else c(null)}),[e,t,n]),u}function P(t,n){var e=s(null),i=r(e,2),o=i[0],u=i[1];return a((function(){if(t){var r=n&&y(n,"topHole");if(r){var e=[];t.forEach((function(t){var n=y(t,"topHole");if(n){var i=parseFloat(g(r,n));e.push(j(j({},t),{},{distance:i}))}else e.push(t)})),u(e)}else u(t)}else u(t)}),[t,n]),o}function D(t,n,e){var i=s(null),o=r(i,2),u=o[0],c=o[1];return a((function(){if(n){var t=[];n.forEach((function(n){e.includes(n.id)&&n.is_usable&&t.push(n)})),c(t)}else c(null)}),[t,n,e]),u}function F(t,e){var i=f({}),c=s(!0),l=r(c,2),m=l[0],h=l[1],v=s(null),b=r(v,2),y=b[0],g=b[1];return a((function(){function r(){return(r=u(o.mark((function r(u){var c,s,a;return o.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,d(t,u);case 2:c=r.sent,s={},u.forEach((function(t){var r={},e=c.filter((function(r){return n(r,"asset_id")===t}));p.forEach((function(t){var i=e.find((function(r){return n(r,"data.key")===t})),o=n(i,"data.value");r[t]=Number.isFinite(o)?parseFloat(o).toFixed(2):null})),s[t]=r})),i.current=j(j({},i.current),s),a=[],e.forEach((function(t){a.push(j(j({},t),i.current[t.id]))})),h(!1),g(a);case 10:case"end":return r.stop()}}),r)})))).apply(this,arguments)}if(e)if(0!==e.length){var c=[];e.forEach((function(t){i.current[t.id]||c.push(t.id)})),h(!0),function(t){r.apply(this,arguments)}(c)}else g([]);else g(null)}),[e]),[m,y]}function C(t,n,r){var e=f(!1);a((function(){if(n){if(e.current){var i=[];n.forEach((function(n){n.distance<=t&&i.push(n.id)})),r(i)}e.current=!0}}),[t,n])}export{x as useCompanies,w as useCompanyMetricKey,E as useFilteredWells,F as useMetricsData,D as useOffsetWells,O as usePrevious,C as useRadiusWells,k as useWells,P as useWellsWithCoords};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corva/ui",
3
- "version": "0.32.0-3",
3
+ "version": "0.32.0-6",
4
4
  "description": "Shared components/utils for Corva ui projects",
5
5
  "keywords": [
6
6
  "corva-ui"
@@ -1 +1 @@
1
- import"../constants/completion.js";import"../constants/alerts.js";import"lodash";import{DEV_CENTER_CLI_APP_ID as n}from"../constants/devcenter.js";import"../constants/goals.js";import"../constants/segment.js";import"../constants/apps.js";import"../constants/drillstring.js";import"../constants/notifications.js";import"../constants/feed.js";var t=function(n,t){return n?"".concat(n.replace(/\./g,"_"),"-").concat(t):""},o=function(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n;return o===+(null==t?void 0:t.maximizeDC)};function a(n){return{push:function(t){"string"==typeof t?n.push(t):n.push({pathname:t.pathname,query:t.query})},location:{pathname:n.location.pathname,query:n.location.query}}}var r=function(n){return n?+(n.split("#")[2]||"").replace("}",""):void 0},i=function(n){var t,o;return null!==(t=null==n||null===(o=n.package)||void 0===o?void 0:o.manifest.application.name)&&void 0!==t?t:n.name},s=function(n){var t;return"dev_center"===((null==n?void 0:n.platform)||(null==n||null===(t=n.app)||void 0===t?void 0:t.platform))};export{a as createDevCenterRouter,t as getAppIdentifier,i as getAppName,r as getTimestampFromQuery,o as isAppMaximized,s as isDevCenterApp};
1
+ import"../constants/completion.js";import"../constants/alerts.js";import"lodash";import{DEV_CENTER_CLI_APP_ID as n}from"../constants/devcenter.js";import"../constants/goals.js";import{SEGMENTS as t}from"../constants/segment.js";import"../constants/apps.js";import"../constants/drillstring.js";import"../constants/notifications.js";import"../constants/feed.js";var o=function(n,t){return n?"".concat(n.replace(/\./g,"_"),"-").concat(t):""},i=function(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n;return o===+(null==t?void 0:t.maximizeDC)};function a(n){return{push:function(t){"string"==typeof t?n.push(t):n.push({pathname:t.pathname,query:t.query})},location:{pathname:n.location.pathname,query:n.location.query}}}var r=function(n){return n?+(n.split("#")[2]||"").replace("}",""):void 0},e=function(n){var t,o;return null!==(t=null==n||null===(o=n.package)||void 0===o?void 0:o.manifest.application.name)&&void 0!==t?t:n.name},l=function(n){var t;return"dev_center"===((null==n?void 0:n.platform)||(null==n||null===(t=n.app)||void 0===t?void 0:t.platform))},s=function(n){var o,i,a,r,e;return null!==(o=null==n||null===(i=n.package)||void 0===i||null===(a=i.manifest)||void 0===a||null===(r=a.application)||void 0===r||null===(e=r.segments)||void 0===e?void 0:e[0])&&void 0!==o?o:t.DRILLING};export{a as createDevCenterRouter,o as getAppIdentifier,e as getAppName,s as getAppSegment,r as getTimestampFromQuery,i as isAppMaximized,l as isDevCenterApp};