@corva/ui 0.25.0-6 → 0.26.0-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLI/components/App/App.js +1 -1
- package/CLI/hocs/withAppDataProviderHOC.js +1 -1
- package/CLI/hocs/withGridLayoutHOC/withGridLayoutHOC.js +1 -1
- package/CLI/hocs/withPDFLayoutHOC.js +1 -1
- package/CLI/hocs/withReactRouterHOC.js +1 -1
- package/CLI/screens/OAuthCallbackScreen/index.js +1 -1
- package/clients/api/apiCore.js +1 -1
- package/clients/clientStorage/core.js +1 -1
- package/components/Annotations/AnnotationsContext.js +1 -1
- package/components/Annotations/components/AnnotationsList/components/AddAnnotationForm/index.js +1 -1
- package/components/Annotations/components/AnnotationsList/components/AnnotationComments/index.js +1 -1
- package/components/AssetEditor/effects/index.js +1 -1
- package/components/Attachment/index.js +1 -1
- package/components/BICOffsetPickerDialog/components/WellSection/AutoCompleteAssetSearch/AutoCompleteAssetSearch.js +1 -1
- package/components/BICOffsetPickerDialog/components/WellSection/AutoCompleteAssetSearch/utils/apiCalls.js +1 -1
- package/components/BICOffsetPickerDialog/components/WellSection/index.js +1 -1
- package/components/BICOffsetPickerDialog/index.js +1 -1
- package/components/Breadcrumbs/index.js +1 -1
- package/components/CollapsableSidebar.js +1 -1
- package/components/Comment/index.js +1 -1
- package/components/CommentInput/index.js +1 -1
- package/components/DevCenter/AppHeader/AppHeader.js +1 -1
- package/components/DevCenter/AppHeader/PadMode.js +1 -1
- package/components/DevCenter/AppSideBar/AppSideBar.js +1 -1
- package/components/DevCenter/AppsDataProvider/effects/dataResolvers.js +1 -1
- package/components/DevCenter/AppsDataProvider/effects/useAppsData.js +1 -1
- package/components/DevCenter/AppsDataProvider/effects/utils.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/RemoveAppButton.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/effects/useAnnotationsData.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/effects/useAppMaximized.js +1 -1
- package/components/FileUploadIconButton.js +1 -1
- package/components/FilesLoader/FilesLoader.js +1 -1
- package/components/HeaderLayout/HeaderLayout.js +1 -1
- package/components/HeaderLayout/utils.js +1 -1
- package/components/InfiniteList/index.js +1 -1
- package/components/Notifications/NotificationsContainer.js +1 -1
- package/components/OffsetWellPickerV2/components/Table/index.js +1 -1
- package/components/OffsetWellPickerV2/constants.js +1 -1
- package/components/OffsetWellPickerV2/effects/index.js +1 -1
- package/components/OffsetWellPickerV2/utils/apiCalls.js +1 -1
- package/components/PadModeSelect/PadModeSelect.js +1 -1
- package/components/PadOffsetsPicker/OffsetAssetChip.js +1 -0
- package/components/PadOffsetsPicker/OffsetAssetsListExpander.js +1 -0
- package/components/PadOffsetsPicker/PadOffsetsPicker.js +1 -0
- package/components/PadOffsetsPicker/StagesSelector.js +1 -0
- package/components/PadOffsetsPicker/index.js +1 -0
- package/components/ParameterCharts/AddEditTrack.js +1 -1
- package/components/ParameterCharts/components/Track.js +1 -1
- package/components/ParameterCharts/components/TrackSettings.js +1 -1
- package/components/PostPreviewDialog/index.js +1 -1
- package/components/SlateFormattedText/SlateFormattedText.js +1 -1
- package/components/Template/TemplateSharingDialog/ChipSelector.js +1 -1
- package/components/VirtualizedTable/VirtualizedTable.js +1 -1
- package/components/WellSummary/WellSummaryItemValue.js +1 -1
- package/components/WellSummary/effects/useWellSummaryData.js +1 -1
- package/components/index.js +1 -1
- package/constants/index.js +1 -1
- package/package.json +2 -1
- package/utils/DrillstringUtils.js +1 -1
- package/utils/FluidCheckUtils.js +1 -1
- package/utils/casing/conversion.js +1 -1
- package/utils/casing/validation.js +1 -1
- package/utils/completion.js +1 -1
- package/utils/dashboardReports.js +1 -1
- package/utils/devcenter.js +1 -1
- package/utils/index.js +1 -1
- package/utils/lasParser.js +1 -1
- package/utils/main.js +1 -1
- package/utils/torqueAndHookloadUtils.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/toConsumableArray";import{isEmpty as t}from"lodash";import{showSuccessNotification as r}from"../../../../utils/notificationToasts.js";import"../../../../utils/index.js";import{jsxs as o,jsx as i,Fragment as l}from"react/jsx-runtime";import{makeStyles as a,Typography as c,Tooltip as s,List as p}from"@material-ui/core";import{memo as d,Fragment as m}from"react";import{string as f,arrayOf as u,shape as g,func as h}from"prop-types";import w from"./AssetSearch.js";import x from"./SectionItem.js";import b from"./WellListItem.js";function y(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function v(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?y(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}var j=a({content:{marginTop:"10px"},sectionItem:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",padding:"6px 5px 6px 0px",fontSize:"12px",fontWeight:"normal",color:"#BDBDBD",borderTop:"1px solid grey"},disabledSectionItem:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",padding:"6px 5px 6px 0px",fontSize:"12px",fontWeight:"normal",color:"grey",borderTop:"1px solid grey"},splitLine:{paddingLeft:"5px",height:1,background:"grey"},itemLabelNumber:{marginLeft:"8px"},wellList:{width:"100%",margin:0,padding:0},tooltip:{background:"#201f1f",padding:"8px 12px"},arrow:{color:"#201f1f"},searchContainer:{display:"flex",justifyContent:"space-between",alignItems:"center"},advancedSearch:{fontSize:"14px",fontWeight:500,color:"#03BCD4",cursor:"pointer","&:hover":{textDecoration:"underline"}}});function S(e){var a=e.company,d=e.wellSections,f=e.getWellName,u=e.onChangeWellSections,g=e.onExploreMode,h=j(),y=function(e,n){var t=d.find((function(n){return n.name===e.name})).wells.map((function(e){return e.id})),r=d.map((function(e){var r=e.wells.map((function(e){return t.includes(e.id)?v(v({},e),{},{checked:n}):v({},e)}));return v(v({},e),{},{wells:r})}));u(r)},S=function(e){var n=d.map((function(n){return n.name===e.name?v(v({},n),{},{expanded:!n.expanded}):n}));u(n)},O=function(e){var n=d.map((function(n){var t=n.wells.map((function(n){return n.id===e.id?v(v({},n),{},{checked:!n.checked}):n}));return v(v({},n),{},{wells:t})}));u(n)},C=function(e){y(e,!0)},N=function(e){y(e,!1)};return o("div",{className:h.content,children:[o("div",{className:h.searchContainer,children:[i(w,{company:+a,onClickAsset:function(e,t){var o=d.map((function(r){if("Search Results"===r.name){var o=n(r.wells);return r.wells.find((function(n){return n.id===e}))||o.push({id:e,checked:!0,name:t,kind:"manual"}),v(v({},r),{},{wells:o})}return v(v({},r),{},{wells:r.wells.map((function(n){return n.id===e?v(v({},n),{},{checked:!0}):n}))})}));u(o),r("Offset well successfully added!")},onExploreMode:g}),i(c,{className:h.advancedSearch,onClick:function(){g()},children:"ADVANCED SEARCH"})]}),!t(d)&&o(l,{children:[d.map((function(e){return o(m,{children:[0===e.wells.length?i(s,{classes:{tooltip:h.tooltip,arrow:h.arrow},title:"No Best Wells in ".concat(e.name," Section"),placement:"top-start",arrow:!0,children:i("div",{className:h.disabledSectionItem,children:i(x,{section:e,disabled:!0},"empty-".concat(e.name))})}):i("div",{className:h.sectionItem,children:i(x,{section:e,onExpandCollapse:S,onSelectAll:C,onClearAll:N},"section-".concat(e.name))}),i(p,{dense:!0,className:h.wellList,children:e.expanded&&e.wells.map((function(n,t){return i(b,{noMarginTop:0!==t,well:n,wellName:f(e.wells,n.id),rigName:n.rigName,onToggleWell:O},"well-".concat(e.name,"-").concat(n.id))}))})]},"fragment-".concat(e.name))})),i("div",{className:h.splitLine})]})]})}S.propTypes={company:f.isRequired,wellSections:u(g({})),getWellName:h.isRequired,onChangeWellSections:h.isRequired,onExploreMode:h.isRequired},S.defaultProps={wellSections:[]};var O=d(S);export default O;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import{get as t,uniq as n,includes as r,isEqual as i}from"lodash";import o from"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/asyncToGenerator";import s from"@babel/runtime/helpers/toConsumableArray";import"../../constants/goals.js";import"../../constants/apps.js";import"../../constants/completion.js";import"../../constants/segment.js";import"../../constants/alerts.js";import"../../constants/drillstring.js";import"../../utils/mobileDetect.js";import l from"@babel/runtime/helpers/typeof";import"../../utils/index.js";import{jsxs as a,Fragment as p,jsx as m}from"react/jsx-runtime";import{makeStyles as c,Dialog as d,DialogTitle as u,Typography as f,Tooltip as j,IconButton as C,DialogContent as b,DialogActions as v,Button as g}from"@material-ui/core";import{useRef as x,useState as h,useMemo as S,useEffect as y,useCallback as A}from"react";import"querystring";import"uuid/v1";import"../../clients/jsonApi/index.js";import"../../clients/subscriptions.js";import"uuid";import"@babel/runtime/helpers/objectWithoutProperties";import I from"prop-types";import W from"classnames";import{Close as D}from"@material-ui/icons";import"../Modal/index.js";import"../IconMenu/index.js";import"../StyledMenuItem/index.js";import E from"../LoadingIndicator/LoadingIndicator.js";import"../Tooltip.js";import"../Avatar/index.js";import"../Annotations/AnnotationsContext.js";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"react-router";import"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"../ConfirmationDialog.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"../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../ErrorBoundary/InternalErrorView/InternalErrorView.js";import"../ErrorBoundary/ErrorBoundary.js";import"../Typography.js";import"../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";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/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"../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/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/index.js";import"../EmptyView/EmptyAppView/index.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"../IconButton/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{useWells as B,useFetchBicWellsData as P}from"./effects/index.js";import T from"./components/Map/index.js";import w from"./components/WellSection/index.js";import{DEFAULT_WELL_SECTIONS as k}from"./constants.js";import L from"../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"../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";function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?O(Object(r),!0).forEach((function(n){e(t,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var N=c({paper:{width:"541px"},dialogTitles:{display:"flex",flexDirection:"column"},titleContent:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},title:{fontSize:"20px"},description:{fontSize:"12px",lineHeight:"16px",fontWeight:"normal",color:"rgba(255, 255, 255, 0.54)"},closeIconButton:{fontSize:"20px",padding:4,"&:hover $closeIcon":{color:"#fff"}},closeIcon:{color:"#BDBDBD"},dialogActions:{display:"flex",justifyContent:"flex-end",boxShadow:"0px -4px 10px rgba(0, 0, 0, 0.25)",paddingTop:8,paddingBottom:8},dialogActionsSmallScreen:{paddingRight:"100px"},dialogContent:{display:"flex",marginTop:"2px",marginBottom:"24px",flexDirection:"column"}});function F(e,n){var r=e.find((function(e){return e.id===n}));return t(r,"name")||"-"}function R(e,n){var r=e.find((function(e){return e.id===n}));return t(r,"rigName")||"-"}function V(e,t){return"well"===e.value?"Best Wells":"area"===e.value?"Area Offsets":"Best ".concat(e.value,"section"===t?" Wells":' " Wells')}function H(e){return e.map((function(e){return M(M({},e),{},{wells:e.wells.sort((function(e,t){return e.name<t.name?-1:e.name>t.name?1:0}))})}))}function U(e){var r=t(e,"bicWellIds")||[],i=t(e,"manualWellIds")||[],o=t(e,"selectedWellIds")||[];return n(r.concat(i).concat(o))}function z(e){var c=e.defaultSubjectWell,I=e.offsetSetting,O=e.currentUser,z=e.isOpen,_=e.onClose,q=e.onSave,G=e.addWellsUsabilityInfo,K=e.unusableWellAlarm,Q=N(),$=x(!0),J=h(t(c,"companyId")||t(I,"companyId")||+t(O,"company_id")),X=o(J,2),Y=X[0],Z=X[1],ee=h(t(c,"asset_id")||t(I,"subjectWellId")||null),te=o(ee,2),ne=te[0],re=te[1],ie=B(Y,z),oe=P(ne,z),se=h([]),le=o(se,2),ae=le[0],pe=le[1],me=h(!1),ce=o(me,2),de=ce[0],ue=ce[1],fe=h(I),je=o(fe,2),Ce=je[0],be=je[1],ve=h(!1),ge=o(ve,2),xe=ge[0],he=ge[1],Se=S((function(){if(ie){var e=U(Ce);return ie.filter((function(n){return e.find((function(e){return e===t(n,"id")}))}))}return[]}),[ie,Ce]);y((function(){z&&(Z(t(c,"companyId")||t(I,"companyId")||+t(O,"company_id")),re(t(c,"asset_id")||t(I,"subjectWellId")||null),be(I),he(!1),$.current=!0)}),[I,z]),y((function(){if(z&&ie&&$.current){var e,i=t(Ce,"selectedWellIds")||[],o=t(Ce,"manualWellIds")||[],a=t(Ce,"bicWellIds")||[],p=i.concat(o),m=p.filter((function(e){return ie.find((function(t){return t.id===e}))})).map((function(e){return{id:e,checked:!0,name:F(ie,e),rigName:R(ie,e),kind:i.includes(e)?"advanced":"manual"}}));if(oe&&oe.filters&&oe.result){var c,d=[],u=[{name:"Wells within Area",value:"area"}].concat(s(t(oe,["filters","filterTabs"]))),f=(null===(c=oe.filters)||void 0===c?void 0:c.filterMode)||"holeSize",j=n(u);e=[{name:"Search Results",wells:m,expanded:xe}].concat(s(j.map((function(e){var t;return{name:V(e,f),wells:(null===(t=oe.result[e.value])||void 0===t?void 0:t.filter((function(e){return ie.find((function(t){return t.id===e}))})).map((function(e){var t="object"===l(e)?e.id:e;return d.push(t),{id:t,checked:!1,name:F(ie,t),rigName:R(ie,t),kind:"best"}})))||[],expanded:!1}}))))}else e=[{name:"Search Results",wells:m,expanded:xe}].concat(s(k));var C=e.map((function(e){var t=e.wells.map((function(e){return r(a,e.id)||r(p,e.id)?M(M({},e),{},{checked:!0}):M({},e)}));return M(M({},e),{},{wells:t})}));pe(H(C))}}),[z,ie,oe,Ce]);var ye=A((function(){return U(Ce).length}),[Ce]),Ae=A((function(){return(t(Ce,"bicWellIds")||[]).length})),Ie=!ie;return a(p,{children:[a(d,{onBackdropClick:_,onEscapeKeyDown:_,open:z,classes:{paper:Q.paper},children:[m(u,{children:a("div",{className:Q.dialogTitles,children:[a("div",{className:Q.titleContent,children:[m(f,{className:Q.title,children:"Select Offset Wells"}),m(j,{title:"Close",children:m(C,{"data-not-migrated-muiiconbutton":!0,"aria-label":"close",className:Q.closeIconButton,onClick:_,children:m(D,{className:Q.closeIcon})})})]}),m("div",{className:Q.description,children:"Quickly add all of the Best-In-Class Wells per section selected from the Offsets Well Selection Application."})]})}),m(b,{className:Q.dialogContent,children:Ie?m(E,{fullscreen:!1}):a(p,{children:[m(T,{wells:Se,offsetWells:Se}),m(w,{company:Y,wellSections:ae,getWellName:F,onChangeWellSections:function(e){var t=H(e);pe(t),he(t[0].expanded);var r=[],i=[],o=[];t.forEach((function(e){e.wells.forEach((function(e){e.checked&&"advanced"===e.kind&&r.push(e.id),e.checked&&"manual"===e.kind&&i.push(e.id),e.checked&&"best"===e.kind&&o.push(e.id)}))}));var s=r.concat(i).concat(o),l=M(M({},Ce),{},{selectedWellIds:n(r),manualWellIds:n(i),bicWellIds:n(o),resultWellIds:n(s)});be(l),$.current=!1},onExploreMode:function(){ue(!0)}})]})}),m(v,{className:W(Q.dialogActions),children:a("div",{children:[m(g,{onClick:_,color:"primary",children:"Cancel"}),a(g,{variant:"contained",color:"primary",onClick:function(){var e=U(Ce),t=ie.filter((function(t){return r(e,t.id)})),n=M(M({},Ce),{},{companyId:+Y,resultWellIds:e});ue(!1),q(n,t)},children:["Add (",ye(),")"]})]})})]}),de&&m(L,{defaultSubjectWellId:t(c,"asset_id"),companyId:+Y,offsetSetting:Ce,currentUser:O,addWellsUsabilityInfo:G,unusableWellAlarm:K,isAdvancedSearch:!0,bestCount:Ae(),isOpen:de,onClose:function(){ue(!1)},onSave:function(e){var n=e;c||(i(ne,t(n,"subjectWellId"))&&i(Y,t(n,"companyId"))||(n=M(M({},n),{},{bicWellIds:[],manualWellIds:[],resultWellIds:[]})),re(t(n,"subjectWellId")),Z(t(n,"companyId")));var r=t(n,"manualWellIds")||[],o=t(n,"selectedWellIds")||[];r=r.filter((function(e){return!o.includes(e)})),n=M(M({},n),{},{manualWellIds:r}),be(n),$.current=!0,he(!0),ue(!1)}})]})}z.propTypes={defaultSubjectWell:I.shape({}),offsetSetting:I.shape({subjectWellId:I.number,companyId:I.number}),currentUser:I.shape({}),isOpen:I.bool.isRequired,onClose:I.func.isRequired,onSave:I.func.isRequired,addWellsUsabilityInfo:I.func,unusableWellAlarm:I.string},z.defaultProps={defaultSubjectWell:null,addWellsUsabilityInfo:null,unusableWellAlarm:"Unable to add",offsetSetting:{},currentUser:{}};export default z;
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/toConsumableArray";import"../../constants/completion.js";import"../../constants/alerts.js";import{get as n,uniq as r,includes as i,isEqual as o}from"lodash";import s from"@babel/runtime/helpers/slicedToArray";import"../../constants/goals.js";import"../../constants/segment.js";import"../../constants/apps.js";import"../../constants/drillstring.js";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/asyncToGenerator";import"../../utils/mobileDetect.js";import l from"@babel/runtime/helpers/typeof";import"../../utils/index.js";import{jsxs as a,Fragment as p,jsx as m}from"react/jsx-runtime";import{makeStyles as c,Dialog as d,DialogTitle as u,Typography as f,Tooltip as j,IconButton as C,DialogContent as b,DialogActions as v,Button as g}from"@material-ui/core";import{useRef as x,useState as h,useMemo as S,useEffect as A,useCallback as y}from"react";import"querystring";import"uuid/v1";import"../../clients/jsonApi/index.js";import"../../clients/subscriptions.js";import"uuid";import"@babel/runtime/helpers/objectWithoutProperties";import I from"prop-types";import W from"classnames";import{Close as D}from"@material-ui/icons";import"../Modal/index.js";import"../IconMenu/index.js";import"../StyledMenuItem/index.js";import P from"../LoadingIndicator/LoadingIndicator.js";import"../Tooltip.js";import"../Avatar/index.js";import"../Annotations/AnnotationsContext.js";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"react-router";import"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"../ConfirmationDialog.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"../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../ErrorBoundary/InternalErrorView/InternalErrorView.js";import"../ErrorBoundary/ErrorBoundary.js";import"../Typography.js";import"../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";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/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"../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/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/index.js";import"../EmptyView/EmptyAppView/index.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"../IconButton/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{useWells as E,useFetchBicWellsData as k}from"./effects/index.js";import B from"./components/Map/index.js";import T from"./components/WellSection/index.js";import{DEFAULT_WELL_SECTIONS as w}from"./constants.js";import O from"../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";function L(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?L(Object(r),!0).forEach((function(n){e(t,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):L(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var N=c({paper:{width:"541px"},dialogTitles:{display:"flex",flexDirection:"column"},titleContent:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},title:{fontSize:"20px"},description:{fontSize:"12px",lineHeight:"16px",fontWeight:"normal",color:"rgba(255, 255, 255, 0.54)"},closeIconButton:{fontSize:"20px",padding:4,"&:hover $closeIcon":{color:"#fff"}},closeIcon:{color:"#BDBDBD"},dialogActions:{display:"flex",justifyContent:"flex-end",boxShadow:"0px -4px 10px rgba(0, 0, 0, 0.25)",paddingTop:8,paddingBottom:8},dialogActionsSmallScreen:{paddingRight:"100px"},dialogContent:{display:"flex",marginTop:"2px",marginBottom:"24px",flexDirection:"column"}});function F(e,t){var r=e.find((function(e){return e.id===t}));return n(r,"name")||"-"}function R(e,t){var r=e.find((function(e){return e.id===t}));return n(r,"rigName")||"-"}function V(e,t){return"well"===e.value?"Best Wells":"area"===e.value?"Area Offsets":"Best ".concat(e.value,"section"===t?" Wells":' " Wells')}function H(e){return e.map((function(e){return M(M({},e),{},{wells:e.wells.sort((function(e,t){return e.name<t.name?-1:e.name>t.name?1:0}))})}))}function U(e){var t=n(e,"bicWellIds")||[],i=n(e,"manualWellIds")||[],o=n(e,"selectedWellIds")||[];return r(t.concat(i).concat(o))}function z(e){var c=e.defaultSubjectWell,I=e.offsetSetting,L=e.currentUser,z=e.isOpen,_=e.onClose,q=e.onSave,G=e.addWellsUsabilityInfo,K=e.unusableWellAlarm,Q=N(),$=x(!0),J=h(n(c,"companyId")||n(I,"companyId")||+n(L,"company_id")),X=s(J,2),Y=X[0],Z=X[1],ee=h(n(c,"asset_id")||n(I,"subjectWellId")||null),te=s(ee,2),ne=te[0],re=te[1],ie=E(Y,z),oe=k(ne,z),se=h([]),le=s(se,2),ae=le[0],pe=le[1],me=h(!1),ce=s(me,2),de=ce[0],ue=ce[1],fe=h(I),je=s(fe,2),Ce=je[0],be=je[1],ve=h(!1),ge=s(ve,2),xe=ge[0],he=ge[1],Se=S((function(){if(ie){var e=U(Ce);return ie.filter((function(t){return e.find((function(e){return e===n(t,"id")}))}))}return[]}),[ie,Ce]);A((function(){z&&(Z(n(c,"companyId")||n(I,"companyId")||+n(L,"company_id")),re(n(c,"asset_id")||n(I,"subjectWellId")||null),be(I),he(!1),$.current=!0)}),[I,z]),A((function(){if(z&&ie&&$.current){var e,o=n(Ce,"selectedWellIds")||[],s=n(Ce,"manualWellIds")||[],a=n(Ce,"bicWellIds")||[],p=o.concat(s),m=p.filter((function(e){return ie.find((function(t){return t.id===e}))})).map((function(e){return{id:e,checked:!0,name:F(ie,e),rigName:R(ie,e),kind:o.includes(e)?"advanced":"manual"}}));if(oe&&oe.filters&&oe.result){var c,d=[],u=[{name:"Wells within Area",value:"area"}].concat(t(n(oe,["filters","filterTabs"]))),f=(null===(c=oe.filters)||void 0===c?void 0:c.filterMode)||"holeSize",j=r(u);e=[{name:"Search Results",wells:m,expanded:xe}].concat(t(j.map((function(e){var t;return{name:V(e,f),wells:(null===(t=oe.result[e.value])||void 0===t?void 0:t.filter((function(e){return ie.find((function(t){return t.id===e}))})).map((function(e){var t="object"===l(e)?e.id:e;return d.push(t),{id:t,checked:!1,name:F(ie,t),rigName:R(ie,t),kind:"best"}})))||[],expanded:!1}}))))}else e=[{name:"Search Results",wells:m,expanded:xe}].concat(t(w));var C=e.map((function(e){var t=e.wells.map((function(e){return i(a,e.id)||i(p,e.id)?M(M({},e),{},{checked:!0}):M({},e)}));return M(M({},e),{},{wells:t})}));pe(H(C))}}),[z,ie,oe,Ce]);var Ae=y((function(){return U(Ce).length}),[Ce]),ye=y((function(){return(n(Ce,"bicWellIds")||[]).length})),Ie=!ie;return a(p,{children:[a(d,{onBackdropClick:_,onEscapeKeyDown:_,open:z,classes:{paper:Q.paper},children:[m(u,{children:a("div",{className:Q.dialogTitles,children:[a("div",{className:Q.titleContent,children:[m(f,{className:Q.title,children:"Select Offset Wells"}),m(j,{title:"Close",children:m(C,{"data-not-migrated-muiiconbutton":!0,"aria-label":"close",className:Q.closeIconButton,onClick:_,children:m(D,{className:Q.closeIcon})})})]}),m("div",{className:Q.description,children:"Quickly add all of the Best-In-Class Wells per section selected from the Offsets Well Selection Application."})]})}),m(b,{className:Q.dialogContent,children:Ie?m(P,{fullscreen:!1}):a(p,{children:[m(B,{wells:Se,offsetWells:Se}),m(T,{company:Y,wellSections:ae,getWellName:F,onChangeWellSections:function(e){var t=H(e);pe(t),he(t[0].expanded);var n=[],i=[],o=[];t.forEach((function(e){e.wells.forEach((function(e){e.checked&&"advanced"===e.kind&&n.push(e.id),e.checked&&"manual"===e.kind&&i.push(e.id),e.checked&&"best"===e.kind&&o.push(e.id)}))}));var s=n.concat(i).concat(o),l=M(M({},Ce),{},{selectedWellIds:r(n),manualWellIds:r(i),bicWellIds:r(o),resultWellIds:r(s)});be(l),$.current=!1},onExploreMode:function(){ue(!0)}})]})}),m(v,{className:W(Q.dialogActions),children:a("div",{children:[m(g,{onClick:_,color:"primary",children:"Cancel"}),a(g,{variant:"contained",color:"primary",onClick:function(){var e=U(Ce),t=ie.filter((function(t){return i(e,t.id)})),n=M(M({},Ce),{},{companyId:+Y,resultWellIds:e});ue(!1),q(n,t)},children:["Add (",Ae(),")"]})]})})]}),de&&m(O,{defaultSubjectWellId:n(c,"asset_id"),companyId:+Y,offsetSetting:Ce,currentUser:L,addWellsUsabilityInfo:G,unusableWellAlarm:K,isAdvancedSearch:!0,bestCount:ye(),isOpen:de,onClose:function(){ue(!1)},onSave:function(e){var t=e;c||(o(ne,n(t,"subjectWellId"))&&o(Y,n(t,"companyId"))||(t=M(M({},t),{},{bicWellIds:[],manualWellIds:[],resultWellIds:[]})),re(n(t,"subjectWellId")),Z(n(t,"companyId")));var r=n(t,"manualWellIds")||[],i=n(t,"selectedWellIds")||[];r=r.filter((function(e){return!i.includes(e)})),t=M(M({},t),{},{manualWellIds:r}),be(t),$.current=!0,he(!0),ue(!1)}})]})}z.propTypes={defaultSubjectWell:I.shape({}),offsetSetting:I.shape({subjectWellId:I.number,companyId:I.number}),currentUser:I.shape({}),isOpen:I.bool.isRequired,onClose:I.func.isRequired,onSave:I.func.isRequired,addWellsUsabilityInfo:I.func,unusableWellAlarm:I.string},z.defaultProps={defaultSubjectWell:null,addWellsUsabilityInfo:null,unusableWellAlarm:"Unable to add",offsetSetting:{},currentUser:{}};export default z;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"@babel/runtime/helpers/defineProperty";import"
|
|
1
|
+
import t 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"@babel/runtime/regenerator";import"@babel/runtime/helpers/asyncToGenerator";import"../../utils/mobileDetect.js";import"@babel/runtime/helpers/typeof";import"../../utils/index.js";import{jsx as e}from"react/jsx-runtime";import{makeStyles as r,Breadcrumbs as o}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 i from"prop-types";import n from"classnames";import"../Modal/index.js";import"../IconMenu/index.js";import"../StyledMenuItem/index.js";import"../LoadingIndicator/LoadingIndicator.js";import"../Tooltip.js";import"../Avatar/index.js";import"../Annotations/AnnotationsContext.js";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"react-router";import{UniversalLink as s}from"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"../ConfirmationDialog.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"../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../ErrorBoundary/InternalErrorView/InternalErrorView.js";import"../ErrorBoundary/ErrorBoundary.js";import"../Typography.js";import"../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";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/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"../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/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"../VirtualizedTable/index.js";import"../EmptyView/index.js";import"../EmptyView/EmptyAppView/index.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"../IconButton/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";var p=r((function(t){return{container:{fontSize:"0.8125rem"},pathPart:{color:t.palette.grey[400],"&:hover":{color:"white"}},lastPathPart:{color:"white"}}})),m=function(r){var i=r.pathItems,m=p();return e(o,{className:m.container,children:i.map((function(r,o,i){return e(s,{className:n(m.pathPart,t({},m.lastPathPart,o===i.length-1)),href:r.href,children:r.text},r.text)}))})};m.propTypes={pathItems:i.arrayOf(i.shape({text:i.string,href:i.string})).isRequired};export default m;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/toConsumableArray";import"../constants/completion.js";import"../constants/alerts.js";import{noop as t}from"lodash";import o from"@babel/runtime/helpers/slicedToArray";import"../constants/goals.js";import"../constants/segment.js";import"../constants/apps.js";import"../constants/drillstring.js";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/asyncToGenerator";import"../utils/mobileDetect.js";import"@babel/runtime/helpers/typeof";import"../utils/index.js";import{jsxs as r,jsx as i}from"react/jsx-runtime";import{withStyles as n,Box as s,IconButton as p}from"@material-ui/core";import{useState as a}from"react";import"querystring";import"uuid/v1";import"../clients/jsonApi/index.js";import"../clients/subscriptions.js";import"uuid";import"@babel/runtime/helpers/objectWithoutProperties";import m from"prop-types";import l from"classnames";import"./Modal/index.js";import"./IconMenu/index.js";import"./StyledMenuItem/index.js";import"./LoadingIndicator/LoadingIndicator.js";import"./Tooltip.js";import"./Avatar/index.js";import"./Annotations/AnnotationsContext.js";import"./DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"react-router";import"./DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"./ConfirmationDialog.js";import"./Annotations/components/AnnotationsList/index.js";import"./Annotations/components/LastAnnotation/index.js";import"./PadModeSelect/PadModeSelect.js";import"./DevCenter/AppHeader/AppHeader.js";import d from"@material-ui/icons/ChevronLeftRounded";import c from"@material-ui/icons/ChevronRightRounded";import"./DevCenter/AppSideBar/AppSideBar.js";import"./DevCenter/AppContext.js";import"./DevCenter/AppsDataProvider/AppsDataProvider.js";import"./DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"./ErrorBoundary/InternalErrorView/InternalErrorView.js";import"./ErrorBoundary/ErrorBoundary.js";import"./Typography.js";import"./ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";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/DevCenterAppContainer.css.js";import"./DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"./DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"./DevCenter/NavigationBar/NavigationBar.js";import j from"./DevCenter/SideBar/SideBar.js";import"./TruncatedText/index.js";import"./AssetEditor/SingleAssetEditor.js";import"./AssetEditor/AssetEditorAutocomplete.js";import"./AssetEditor/index.js";import"./AppVersionsSelect/AppVersionsSelect.js";import"./DateTimePicker/index.js";import"./DatePicker/index.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/index.js";import"./EmptyView/EmptyAppView/index.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"./IconButton/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";var C=function(t){var n,m=t.classes,C=t.children,u=t.onStateChange,g=t.initialState,f=t.drawerPaperClassName,x=t.isToolbarGutterShown,h=t.openedDrawerWidth,A=t.anchor,b=a(g),S=o(b,2),D=S[0],v=S[1],T=function(){v(!D),u(!D)},P="left"===A?d:c;return r(j,{isToolbarGutterShown:x,drawerWidth:h,drawerClassName:l(m.drawer,!D&&m.drawerClosed),drawerPaperClassName:l(m.drawer,m.drawerPaper,f,!D&&m.drawerClosed),anchor:A,listClassName:m.list,onClick:function(){D||T()},children:[C,i(s,{className:l(m.openToggleContainer,(n={},e(n,m.openToggleContainerCollapsed,!D),e(n,m.openToggleContainerOpened,D),n)),children:i(p,{"aria-label":"toggle sidebar",className:m.openToggleIconButton,onClick:T,children:i(P,{className:l(m.openToggleIcon,e({},m.openToggleIconClosed,!D))})})})]})};C.propTypes={children:m.node.isRequired,onStateChange:m.func,initialState:m.bool,drawerPaperClassName:m.string,isToolbarGutterShown:m.bool,openedDrawerWidth:m.oneOfType([m.string,m.number]),anchor:m.oneOf(["left","right"]),closedWidth:m.oneOfType([m.string,m.number])},C.defaultProps={onStateChange:t,initialState:!0,closedWidth:48,drawerPaperClassName:null,isToolbarGutterShown:void 0,openedDrawerWidth:void 0,anchor:void 0};var u=n((function(e){return{drawer:{display:"flex",flexDirection:"column",height:"100%"},drawerPaper:{"&$drawerClosed":{cursor:"pointer","&:hover::before":{content:'""',position:"absolute",top:0,right:0,bottom:0,left:0,background:e.palette.background.b7}}},drawerClosed:{width:function(e){return e.closedWidth}},openToggleIcon:{fontSize:"1.25rem",color:e.palette.primary.text7},openToggleIconClosed:{transform:"rotate(180deg)"},openToggleIconButton:{padding:6},openToggleContainer:{display:"flex",position:"absolute",bottom:0,width:"100%",flex:"0 0",padding:e.spacing(2,1,1.5)},openToggleContainerCollapsed:{paddingRight:e.spacing(1),paddingLeft:e.spacing(1),justifyContent:"center"},openToggleContainerOpened:{justifyContent:function(e){return"left"===e.anchor?"flex-end":"flex-start"}},list:{display:"flex",flexDirection:"column",flexGrow:1,overflow:"hidden",paddingBottom:60}}}))(C);export default u;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import t from"
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import t from"moment";import{noop as r,get as n}from"lodash";import o from"@babel/runtime/helpers/classCallCheck";import i from"@babel/runtime/regenerator";import a from"@babel/runtime/helpers/asyncToGenerator";import s from"@material-ui/core/colors/grey";import c from"../../utils/main.js";import{isNativeDetected as m}from"../../utils/mobileDetect.js";import l from"@babel/runtime/helpers/createClass";import{jsxs as p,jsx as u}from"react/jsx-runtime";import{createRef as d,PureComponent as h}from"react";import{deleteFeedItemComment as f}from"../../clients/jsonApi/index.js";import g from"prop-types";import y from"classnames";import{withStyles as v}from"@material-ui/core/styles";import b from"@babel/runtime/helpers/assertThisInitialized";import C from"@babel/runtime/helpers/inherits";import D from"@babel/runtime/helpers/possibleConstructorReturn";import M from"@babel/runtime/helpers/getPrototypeOf";import E from"../Avatar/index.js";import w from"@material-ui/core/Typography";import I from"../UserCardPopover.js";import{formatMentionText as O}from"../UserMention/utils/index.js";import{isUserAdmin as j,isUserCorvaAdmin as k}from"../../utils/user.js";import x from"@material-ui/core/IconButton";import A from"@material-ui/icons/MoreVert";import N from"../ConfirmationDialog.js";import S from"../Attachment/index.js";import _ from"../CommentInput/index.js";import R from"../CommentWrapper.js";import P from"../CommentLoader.js";import T from"@material-ui/core/Menu";import U from"@material-ui/core/MenuItem";import z from"./styles.css.js";function L(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function W(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=M(e);if(t){var o=M(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return D(this,r)}}var B={chatAvatarWrapper:{paddingTop:2,position:"absolute",top:6,left:-18},commentInfoContainer:{display:"inline-flex",alignItems:"center",width:"100%",paddingTop:5},userNameWrapper:{overflow:"hidden"},infoContainer:{display:"inline-block",verticalAlign:"top",width:"100%",paddingLeft:10}},q={commentWrapper:{width:"calc(100% - 10px)"},timeRoot:{color:s[700],float:"right",marginRight:5,marginLeft:10,fontSize:"10px"},textRoot:{marginTop:5,color:"#CCC",fontWeight:"normal",fontSize:"14px"},iconButtonRoot:{float:"right",height:40,width:40,padding:0,visibility:"hidden"},userName:{fontSize:"12px"}},F=function(m){C(v,h);var g=W(v);function v(t){var r,n;return o(this,v),r=g.call(this,t),e(b(r),"deleteComment",(n=a(i.mark((function e(t,r){var n;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,f(t,r);case 3:n=e.sent,e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),console.error(e.t0);case 9:return e.abrupt("return",n);case 10:case"end":return e.stop()}}),e,null,[[0,6]])}))),function(e,t){return n.apply(this,arguments)})),e(b(r),"showIntoView",(function(){r.props.handleShowOnMount(),r.commentEl.current.scrollIntoView({block:"end"})})),e(b(r),"handleToggleActionsMenu",(function(e){var t=e.currentTarget;r.setState((function(e){return{actionsMenuAnchorEl:e.actionsMenuAnchorEl?null:t}}))})),e(b(r),"handleKeyDown",(function(e){27===e.keyCode&&r.setState({isEditing:!1}),document.removeEventListener("keydown",r.handleKeyDown,!1)})),e(b(r),"handleEditMenuItem",(function(){document.addEventListener("keydown",r.handleKeyDown,!1),r.setState({isEditing:!0},(function(){r.inputEl.current&&r.inputEl.current.focus()}))})),e(b(r),"getEditCommentProps",(function(){var e=r.props.comment,t=e.id,n=e.body,o=e.attachment;return{editFeedItemId:e.feed_activity_id,editCommentId:t,editComment:n,editAttachment:o}})),e(b(r),"onEditFinish",(function(){r.setState({isEditing:!1,isLoading:!1})})),e(b(r),"handleDeleteMenuItem",(function(){r.setState({openDeleteDialog:!0})})),e(b(r),"handleDelete",a(i.mark((function e(){var t,n,o;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.props.comment.id,n=r.props.comment.feed_activity_id,r.setState({isLoading:!0}),e.next=5,r.deleteComment(n,t);case 5:o=e.sent,r.setState({isLoading:!1,openDeleteDialog:!1}),o&&r.props.handleDeleteCallback(t);case 8:case"end":return e.stop()}}),e)})))),r.state={actionsMenuAnchorEl:null,isLoading:!1,isEditing:!1,openDeleteDialog:!1},r.inputEl=d(),r.commentEl=d(),r}return l(v,[{key:"componentDidMount",value:function(){this.props.showOnMount&&this.showIntoView()}},{key:"renderMenuIcon",value:function(){var e=this.isCurrentUserCommentCreator,t=this.isCurrentUserCommentCreator||j(this.props.user)||k(this.props.user);return t||e?p("div",{className:z.cCommentMenu,children:[u(x,{"data-testid":"".concat("comment","_menuButton"),"aria-label":"Actions","aria-owns":this.state.actionsMenuAnchorEl?"c-comment__actions-menu":void 0,"aria-haspopup":"true",classes:{root:this.props.classes.iconButtonRoot},onClick:this.handleToggleActionsMenu,children:u(A,{htmlColor:s[400]})}),p(T,{id:"c-comment__actions-menu",anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},anchorEl:this.state.actionsMenuAnchorEl,open:!!this.state.actionsMenuAnchorEl,onClick:this.handleToggleActionsMenu,children:[e&&u(U,{"data-testid":"".concat("comment","_editMenuItem"),onClick:this.handleEditMenuItem,children:"Edit"}),t&&u(U,{"data-testid":"".concat("comment","_deleteMenuItem"),onClick:this.handleDeleteMenuItem,children:"Delete"})]})]}):null}},{key:"render",value:function(){var o=this,i=this.state,a=i.isLoading,s=i.isEditing;if(a){var m=this.props.spaceAround;return u(P,{spaceAround:m})}var l=this.props,d=l.comment,h=l.classes,f=l.spaceAround,g=l.isNative,v=l.patchCommentCallback,b=l.companyId;if(s)return u(_,function(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?L(Object(n),!0).forEach((function(r){e(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):L(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({inputRef:this.inputEl,postComment:r,exitEditMode:this.onEditFinish,setIsEditting:function(){return o.setState({isLoading:!0})},patchCommentCallback:v,companyId:b},this.getEditCommentProps()));var C=c.getUserFullName(d.user),D=g?"MM/DD HH:mm":"MM/DD/YY HH:mm",M=t(d.created_at).format(D),j=n(d,["attachment","url"]),k=n(d,["attachment","size"]);return p("div",{"data-testid":"".concat("comment","_commentItem_").concat(d.body),className:y(z.cComment,e({},z.cCommentNative,g)),ref:this.commentEl,children:[p(R,{spaceAround:f,className:this.props.classes.commentWrapper,children:[u("div",{style:B.chatAvatarWrapper,children:g?u(E,{size:26,displayName:C,imgSrc:n(d,["user","profile_photo"]),className:this.props.classes.avatar}):u(I,{user:d.user,currentUser:this.props.currentUser,children:u(E,{size:26,displayName:C,imgSrc:n(d,["user","profile_photo"]),className:this.props.classes.avatar})})}),p("div",{style:B.infoContainer,children:[u("div",{children:p("div",{style:B.commentInfoContainer,children:[u("div",{style:B.userNameWrapper,children:u(w,{"data-testid":"".concat("comment","_userName"),variant:"subtitle2",noWrap:!0,className:h.userName,children:C})}),u("div",{style:B.timeWrapper,children:u(w,{"data-testid":"".concat("comment","_addTime"),variant:"caption",classes:{root:h.timeRoot},children:M})})]})}),p("div",{className:z.cCommentBody,children:[this.renderMenuIcon(),u(w,{"data-testid":"".concat("comment","_commentMessage"),variant:"body1",classes:{root:h.textRoot},children:O(d.body,d.mentioned_users,g,"#00bcd4",this.props.currentUser)}),j&&u(S,{attachmentUrl:j,attachmentSize:k,size:"small"})]})]})]}),this.state.openDeleteDialog&&u(N,{open:this.state.openDeleteDialog,text:"Do you really want to delete comment?",handleClose:function(){return o.setState({openDeleteDialog:!1})},handleOk:this.handleDelete,okText:"Delete"})]})}},{key:"isCurrentUserCommentCreator",get:function(){return Number(n(this.props.comment,["user","id"]))===Number(this.props.currentUser.id)}}]),v}();F.propTypes={comment:g.shape({}).isRequired,showOnMount:g.bool,spaceAround:g.bool,handleShowOnMount:g.func,handleEdit:g.func,handleDeleteCallback:g.func.isRequired,patchCommentCallback:g.func.isRequired,companyId:g.number,currentUser:g.shape(),classes:g.shape({}).isRequired,isNative:g.bool},F.defaultProps={showOnMount:!1,spaceAround:!1,handleShowOnMount:r,handleEdit:r,companyId:null,isNative:m,currentUser:{}};var H=v(q)(F);export default H;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import{get as o}from"lodash";import i from"@babel/runtime/regenerator";import r from"@babel/runtime/helpers/asyncToGenerator";import a from"@material-ui/core/colors/grey";import s from"../../utils/main.js";import{notifyCommentEdit as l,notifyCommentPost as c}from"../../utils/nativeMessages.js";import{isNativeDetected as p}from"../../utils/mobileDetect.js";import{jsxs as m,jsx as d}from"react/jsx-runtime";import{Paper as u,TextField as h,InputAdornment as f,Tooltip as C,Typography as g,IconButton as b}from"@material-ui/core";import{PureComponent as v}from"react";import{patchFeedItemComment as x}from"../../clients/jsonApi/index.js";import I from"lodash/noop";import y from"prop-types";import E from"classnames";import{withStyles as F}from"@material-ui/core/styles";import S from"@babel/runtime/helpers/assertThisInitialized";import U from"@babel/runtime/helpers/inherits";import k from"@babel/runtime/helpers/possibleConstructorReturn";import N from"@babel/runtime/helpers/getPrototypeOf";import A from"../Avatar/index.js";import{isSuggestionsListOpened as M}from"../UserMention/utils/index.js";import R from"../UserMention/index.js";import j from"../EmojiIconButton.js";import w from"../FailedFileUploading.js";import L from"../FileUploadIconButton.js";import T from"../FilePreview/index.js";import P from"../Icons/SendIcon.js";import D from"./styles.css.js";function B(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,o=N(t);if(e){var i=N(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return k(this,n)}}var z={chatAvatarWrapper:{display:"inline-block",verticalAlign:"top",position:"absolute",left:-18},commentTextFieldContainer:{position:"relative",margin:"0"},commentTextFieldContainerSpaceAround:{position:"relative",margin:"20px 10px"}},_=function(p){U(y,v);var I=B(y);function y(n){var o,a,s;return e(this,y),o=I.call(this,n),t(S(o),"handleSelectEmoji",(function(t){return o.setState((function(e){var n=e.comment;return{comment:"".concat(n).concat(t.native)}}))})),t(S(o),"postComment",(a=r(i.mark((function t(e){var n;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,o.props.postComment(e);case 3:n=t.sent,t.next=9;break;case 6:t.prev=6,t.t0=t.catch(0),console.error(t.t0.message);case 9:return t.abrupt("return",n);case 10:case"end":return t.stop()}}),t,null,[[0,6]])}))),function(t){return a.apply(this,arguments)})),t(S(o),"patchComment",(s=r(i.mark((function t(e){var n,r,a,s;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=o.props,r=n.editFeedItemId,a=n.editCommentId,t.prev=1,t.next=4,x(r,a,e);case 4:s=t.sent,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(1),console.error(t.t0.message);case 10:return t.abrupt("return",s);case 11:case"end":return t.stop()}}),t,null,[[1,7]])}))),function(t){return s.apply(this,arguments)})),t(S(o),"clearCommentField",(function(t){o.setState({comment:"",attachmentUrl:null,attachmentName:null,attachmentSize:null},(function(){o.focusOnRef(),t&&"function"==typeof t&&t()}))})),t(S(o),"handleKeyDown",(function(t){var e=t.key;"Escape"===e&&o.props.exitEditMode(),"Enter"===e&&(M()||(t.preventDefault(),o.handleSendComment()))})),t(S(o),"handleAttachmentLoadingError",(function(t){o.setState({attachmentUrl:null,attachmentName:null,attachmentSize:null,attachmentLoadingError:t})})),t(S(o),"handleFileUpload",(function(t,e,n){o.setState({attachmentUrl:t,attachmentName:e,attachmentSize:n,attachmentLoadingError:null})})),t(S(o),"handleNativeFileUpload",(function(){var t=o.state.comment;o.isEditMode?(l(t),o.clearCommentField(o.props.exitEditMode)):(c(t),o.clearCommentField())})),t(S(o),"handleFileDelete",(function(){return o.setState({attachmentUrl:null,attachmentName:null,attachmentSize:null})})),t(S(o),"handleSendComment",r(i.mark((function t(){var e,n,r;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((e=o.state.comment?o.state.comment.trim():null)||o.state.attachmentUrl){t.next=3;break}return t.abrupt("return");case 3:if(n={comment:{body:e,attachment:{url:o.state.attachmentUrl,size:o.state.attachmentSize}}},!o.isEditMode){t.next=16;break}return o.props.setIsEditting(!0),t.next=8,o.patchComment(n);case 8:return r=t.sent,t.next=11,o.props.patchCommentCallback(r);case 11:o.props.setIsEditting(!1),o.clearCommentField(),o.props.exitEditMode(),t.next=24;break;case 16:return o.props.setIsPosting(!0),t.next=19,o.postComment(n);case 19:return r=t.sent,t.next=22,o.props.postCommentCallback(r);case 22:o.props.setIsPosting(!1),o.clearCommentField();case 24:case"end":return t.stop()}}),t)})))),t(S(o),"handleCloseEditClick",(function(){o.setState({comment:""}),o.props.exitEditMode()})),o.state={comment:"",attachmentUrl:null,attachmentName:null,attachmentSize:null,attachmentLoadingError:null},o}return n(y,[{key:"componentDidMount",value:function(){this.isEditMode&&this.setInitialCommentValue()}},{key:"componentDidUpdate",value:function(t){(this.isEditMode&&!t.editFeedItemId||this.props.editCommentId&&this.props.editCommentId!==t.editCommentId)&&this.setInitialCommentValue()}},{key:"setInitialCommentValue",value:function(){var t=this.props.editAttachment?this.props.editAttachment.url:null;this.setState({comment:this.props.editComment,attachmentUrl:t,attachmentName:t?s.getFileNameWithExtensionFromPath(t):null,attachmentSize:this.props.editAttachment?this.props.editAttachment.url:null})}},{key:"focusOnRef",value:function(){this.props.inputRef&&this.props.inputRef.current.focus()}},{key:"render",value:function(){var t=this,e=this.props,n=e.classes,i=e.currentUser,r="".concat(o(i,["attributes","first_name"])," ").concat(o(i,["attributes","last_name"]));return m("div",{style:this.props.spaceAround?z.commentTextFieldContainerSpaceAround:z.commentTextFieldContainer,children:[d("div",{style:z.chatAvatarWrapper,children:d(A,{displayName:r,imgSrc:this.props.currentUser&&this.props.currentUser.profile_photo})}),d(u,{className:this.props.classes.paperRoot,children:d(h,{"data-testid":"".concat("commentInput","_input"),placeholder:"Add Comment...",FormHelperTextProps:{component:"div",margin:"dense"},InputProps:{inputComponent:R,inputProps:{onChange:function(e){return t.setState({comment:e})},singleLine:!0,value:this.state.comment||"",inputRef:this.props.inputRef,withLightTheme:!1,onMount:this.props.onMount,companyId:this.props.companyId,autoFocus:this.props.autoFocus,disabled:this.props.disabled},endAdornment:!this.props.isNative&&m(f,{position:"end",className:this.props.classes.iconsContainer,children:[!this.state.attachmentUrl&&d(C,{title:"Attach File",placement:"bottom",classes:{tooltip:n.iconTooltip},children:d("div",{className:E(D.cCommentInputIconContainer,D.cCommentInputIconUpload),children:d(L,{openPreviewDialogOnUpload:!1,disableRipple:!0,onFinish:this.handleFileUpload,onError:this.handleAttachmentLoadingError,fileUploadIconClassName:this.props.classes.additionalActionButton,htmlColor:a[400],inputId:"comment-attachment-".concat(this.props.editCommentId)})})}),d(C,{title:"Add Emoji",placement:"bottom",classes:{tooltip:n.iconTooltip},children:d("div",{className:D.cCommentInputIconContainer,children:d(j,{"data-testid":"".concat("commentInput","_emojiButton"),handleSelectEmoji:this.handleSelectEmoji,emojiIconClassName:this.props.classes.additionalActionButton,htmlColor:a[400],disableRipple:!0})})})]}),disableUnderline:!0,classes:{root:this.props.classes.inputRoot,input:this.props.classes.inputEl}},className:this.props.classes.input,onKeyDown:this.handleKeyDown})}),this.state.attachmentLoadingError&&d(w,{errorMessage:this.state.attachmentLoadingError,className:this.props.classes.fileUploadingError}),this.state.attachmentUrl&&d(T,{fileName:this.state.attachmentName,fileUrl:this.state.attachmentUrl,handleFileDelete:this.handleFileDelete,classes:this.props.classes}),m("div",{className:D.cCommentInputSendContainer,children:[d("div",{className:D.cCommentInputSendContainerCancel,children:this.isEditMode&&d(g,{variant:"caption",className:E(this.props.classes.inputMain,this.props.classes.cancelText,this.props.classes.highlightedLabel),component:"div",gutterBottom:!0,onClick:this.props.exitEditMode,children:"Cancel"})}),m("div",{className:D.cCommentInputSendContainerSend,children:[m(g,{variant:"caption",className:E(this.props.classes.inputMain,this.props.classes.inputHelper),component:"div",gutterBottom:!0,children:["Press ",d(g,{variant:"caption",color:"primary",className:E(this.props.classes.inputMain,this.props.classes.highlightedLabel),children:"Enter"})," to send"]}),d(b,{"data-testid":"".concat("commentInput","_sendButton"),onClick:this.handleSendComment,children:d(P,{})})]})]})]})}},{key:"isEditMode",get:function(){return!!this.props.editFeedItemId}}]),y}();_.propTypes={inputRef:y.shape({}),editFeedItemId:y.number,editCommentId:y.number,editComment:y.string,editAttachment:y.shape({}),spaceAround:y.bool,postComment:y.func.isRequired,postCommentCallback:y.func,patchCommentCallback:y.func,exitEditMode:y.func,setIsPosting:y.func,setIsEditting:y.func,onMount:y.func,autoFocus:y.bool,disabled:y.bool,classes:y.shape({}).isRequired,currentUser:y.shape(),isNative:y.bool,companyId:y.number},_.defaultProps={inputRef:null,editFeedItemId:null,editCommentId:null,editComment:null,editAttachment:{},spaceAround:!1,setIsPosting:I,setIsEditting:I,onMount:I,autoFocus:void 0,disabled:!1,patchCommentCallback:I,postCommentCallback:I,exitEditMode:I,companyId:null,currentUser:{},isNative:p};var H=F((function(t){return{paperRoot:{width:"calc(100% - 28px)",marginLeft:25,display:"inline-block",height:35,border:"0","&:focus-within":{boxShadow:"inset 0 0 0 2px ".concat(t.palette.primary.main)},boxShadow:"none"},input:{paddingLeft:5,width:"100%"},inputRoot:{height:35,paddingRight:"10px",lineHeight:"29px",paddingLeft:"10px"},inputEl:{padding:"0 0 0 6px",height:"100%"},additionalActionButton:{padding:"5px","&:hover":{backgroundColor:"transparent"}},nativeActionButton:{margin:"5px 10px",cursor:"pointer"},fileUploadingError:{marginTop:10,marginLeft:24},inputMain:{marginBottom:0,fontSize:".7rem",color:t.palette.grey[700]},inputHelper:{display:"flex",paddingRight:5},cancelText:{cursor:"pointer"},highlightedLabel:{color:t.palette.primary.main},iconsContainer:{marginRight:"8px"},iconTooltip:{marginTop:"3px"}}}))(_);export default H;
|
|
1
|
+
import t from"@babel/runtime/helpers/defineProperty";import{get as e}from"lodash";import n from"@babel/runtime/helpers/classCallCheck";import o from"@babel/runtime/regenerator";import i from"@babel/runtime/helpers/asyncToGenerator";import r from"@material-ui/core/colors/grey";import a from"../../utils/main.js";import{isNativeDetected as s}from"../../utils/mobileDetect.js";import{notifyCommentEdit as l,notifyCommentPost as c}from"../../utils/nativeMessages.js";import p from"@babel/runtime/helpers/createClass";import{jsxs as m,jsx as d}from"react/jsx-runtime";import{Paper as u,TextField as h,InputAdornment as f,Tooltip as C,Typography as g,IconButton as b}from"@material-ui/core";import{PureComponent as v}from"react";import{patchFeedItemComment as x}from"../../clients/jsonApi/index.js";import I from"lodash/noop";import y from"prop-types";import E from"classnames";import{withStyles as F}from"@material-ui/core/styles";import S from"@babel/runtime/helpers/assertThisInitialized";import U from"@babel/runtime/helpers/inherits";import k from"@babel/runtime/helpers/possibleConstructorReturn";import N from"@babel/runtime/helpers/getPrototypeOf";import A from"../Avatar/index.js";import{isSuggestionsListOpened as M}from"../UserMention/utils/index.js";import R from"../UserMention/index.js";import j from"../EmojiIconButton.js";import w from"../FailedFileUploading.js";import L from"../FileUploadIconButton.js";import T from"../FilePreview/index.js";import P from"../Icons/SendIcon.js";import D from"./styles.css.js";function B(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,o=N(t);if(e){var i=N(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return k(this,n)}}var z={chatAvatarWrapper:{display:"inline-block",verticalAlign:"top",position:"absolute",left:-18},commentTextFieldContainer:{position:"relative",margin:"0"},commentTextFieldContainerSpaceAround:{position:"relative",margin:"20px 10px"}},_=function(s){U(y,v);var I=B(y);function y(e){var r,a,s;return n(this,y),r=I.call(this,e),t(S(r),"handleSelectEmoji",(function(t){return r.setState((function(e){var n=e.comment;return{comment:"".concat(n).concat(t.native)}}))})),t(S(r),"postComment",(a=i(o.mark((function t(e){var n;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,r.props.postComment(e);case 3:n=t.sent,t.next=9;break;case 6:t.prev=6,t.t0=t.catch(0),console.error(t.t0.message);case 9:return t.abrupt("return",n);case 10:case"end":return t.stop()}}),t,null,[[0,6]])}))),function(t){return a.apply(this,arguments)})),t(S(r),"patchComment",(s=i(o.mark((function t(e){var n,i,a,s;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.props,i=n.editFeedItemId,a=n.editCommentId,t.prev=1,t.next=4,x(i,a,e);case 4:s=t.sent,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(1),console.error(t.t0.message);case 10:return t.abrupt("return",s);case 11:case"end":return t.stop()}}),t,null,[[1,7]])}))),function(t){return s.apply(this,arguments)})),t(S(r),"clearCommentField",(function(t){r.setState({comment:"",attachmentUrl:null,attachmentName:null,attachmentSize:null},(function(){r.focusOnRef(),t&&"function"==typeof t&&t()}))})),t(S(r),"handleKeyDown",(function(t){var e=t.key;"Escape"===e&&r.props.exitEditMode(),"Enter"===e&&(M()||(t.preventDefault(),r.handleSendComment()))})),t(S(r),"handleAttachmentLoadingError",(function(t){r.setState({attachmentUrl:null,attachmentName:null,attachmentSize:null,attachmentLoadingError:t})})),t(S(r),"handleFileUpload",(function(t,e,n){r.setState({attachmentUrl:t,attachmentName:e,attachmentSize:n,attachmentLoadingError:null})})),t(S(r),"handleNativeFileUpload",(function(){var t=r.state.comment;r.isEditMode?(l(t),r.clearCommentField(r.props.exitEditMode)):(c(t),r.clearCommentField())})),t(S(r),"handleFileDelete",(function(){return r.setState({attachmentUrl:null,attachmentName:null,attachmentSize:null})})),t(S(r),"handleSendComment",i(o.mark((function t(){var e,n,i;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((e=r.state.comment?r.state.comment.trim():null)||r.state.attachmentUrl){t.next=3;break}return t.abrupt("return");case 3:if(n={comment:{body:e,attachment:{url:r.state.attachmentUrl,size:r.state.attachmentSize}}},!r.isEditMode){t.next=16;break}return r.props.setIsEditting(!0),t.next=8,r.patchComment(n);case 8:return i=t.sent,t.next=11,r.props.patchCommentCallback(i);case 11:r.props.setIsEditting(!1),r.clearCommentField(),r.props.exitEditMode(),t.next=24;break;case 16:return r.props.setIsPosting(!0),t.next=19,r.postComment(n);case 19:return i=t.sent,t.next=22,r.props.postCommentCallback(i);case 22:r.props.setIsPosting(!1),r.clearCommentField();case 24:case"end":return t.stop()}}),t)})))),t(S(r),"handleCloseEditClick",(function(){r.setState({comment:""}),r.props.exitEditMode()})),r.state={comment:"",attachmentUrl:null,attachmentName:null,attachmentSize:null,attachmentLoadingError:null},r}return p(y,[{key:"componentDidMount",value:function(){this.isEditMode&&this.setInitialCommentValue()}},{key:"componentDidUpdate",value:function(t){(this.isEditMode&&!t.editFeedItemId||this.props.editCommentId&&this.props.editCommentId!==t.editCommentId)&&this.setInitialCommentValue()}},{key:"setInitialCommentValue",value:function(){var t=this.props.editAttachment?this.props.editAttachment.url:null;this.setState({comment:this.props.editComment,attachmentUrl:t,attachmentName:t?a.getFileNameWithExtensionFromPath(t):null,attachmentSize:this.props.editAttachment?this.props.editAttachment.url:null})}},{key:"focusOnRef",value:function(){this.props.inputRef&&this.props.inputRef.current.focus()}},{key:"render",value:function(){var t=this,n=this.props,o=n.classes,i=n.currentUser,a="".concat(e(i,["attributes","first_name"])," ").concat(e(i,["attributes","last_name"]));return m("div",{style:this.props.spaceAround?z.commentTextFieldContainerSpaceAround:z.commentTextFieldContainer,children:[d("div",{style:z.chatAvatarWrapper,children:d(A,{displayName:a,imgSrc:this.props.currentUser&&this.props.currentUser.profile_photo})}),d(u,{className:this.props.classes.paperRoot,children:d(h,{"data-testid":"".concat("commentInput","_input"),placeholder:"Add Comment...",FormHelperTextProps:{component:"div",margin:"dense"},InputProps:{inputComponent:R,inputProps:{onChange:function(e){return t.setState({comment:e})},singleLine:!0,value:this.state.comment||"",inputRef:this.props.inputRef,withLightTheme:!1,onMount:this.props.onMount,companyId:this.props.companyId,autoFocus:this.props.autoFocus,disabled:this.props.disabled},endAdornment:!this.props.isNative&&m(f,{position:"end",className:this.props.classes.iconsContainer,children:[!this.state.attachmentUrl&&d(C,{title:"Attach File",placement:"bottom",classes:{tooltip:o.iconTooltip},children:d("div",{className:E(D.cCommentInputIconContainer,D.cCommentInputIconUpload),children:d(L,{openPreviewDialogOnUpload:!1,disableRipple:!0,onFinish:this.handleFileUpload,onError:this.handleAttachmentLoadingError,fileUploadIconClassName:this.props.classes.additionalActionButton,htmlColor:r[400],inputId:"comment-attachment-".concat(this.props.editCommentId)})})}),d(C,{title:"Add Emoji",placement:"bottom",classes:{tooltip:o.iconTooltip},children:d("div",{className:D.cCommentInputIconContainer,children:d(j,{"data-testid":"".concat("commentInput","_emojiButton"),handleSelectEmoji:this.handleSelectEmoji,emojiIconClassName:this.props.classes.additionalActionButton,htmlColor:r[400],disableRipple:!0})})})]}),disableUnderline:!0,classes:{root:this.props.classes.inputRoot,input:this.props.classes.inputEl}},className:this.props.classes.input,onKeyDown:this.handleKeyDown})}),this.state.attachmentLoadingError&&d(w,{errorMessage:this.state.attachmentLoadingError,className:this.props.classes.fileUploadingError}),this.state.attachmentUrl&&d(T,{fileName:this.state.attachmentName,fileUrl:this.state.attachmentUrl,handleFileDelete:this.handleFileDelete,classes:this.props.classes}),m("div",{className:D.cCommentInputSendContainer,children:[d("div",{className:D.cCommentInputSendContainerCancel,children:this.isEditMode&&d(g,{variant:"caption",className:E(this.props.classes.inputMain,this.props.classes.cancelText,this.props.classes.highlightedLabel),component:"div",gutterBottom:!0,onClick:this.props.exitEditMode,children:"Cancel"})}),m("div",{className:D.cCommentInputSendContainerSend,children:[m(g,{variant:"caption",className:E(this.props.classes.inputMain,this.props.classes.inputHelper),component:"div",gutterBottom:!0,children:["Press ",d(g,{variant:"caption",color:"primary",className:E(this.props.classes.inputMain,this.props.classes.highlightedLabel),children:"Enter"})," to send"]}),d(b,{"data-testid":"".concat("commentInput","_sendButton"),onClick:this.handleSendComment,children:d(P,{})})]})]})]})}},{key:"isEditMode",get:function(){return!!this.props.editFeedItemId}}]),y}();_.propTypes={inputRef:y.shape({}),editFeedItemId:y.number,editCommentId:y.number,editComment:y.string,editAttachment:y.shape({}),spaceAround:y.bool,postComment:y.func.isRequired,postCommentCallback:y.func,patchCommentCallback:y.func,exitEditMode:y.func,setIsPosting:y.func,setIsEditting:y.func,onMount:y.func,autoFocus:y.bool,disabled:y.bool,classes:y.shape({}).isRequired,currentUser:y.shape(),isNative:y.bool,companyId:y.number},_.defaultProps={inputRef:null,editFeedItemId:null,editCommentId:null,editComment:null,editAttachment:{},spaceAround:!1,setIsPosting:I,setIsEditting:I,onMount:I,autoFocus:void 0,disabled:!1,patchCommentCallback:I,postCommentCallback:I,exitEditMode:I,companyId:null,currentUser:{},isNative:s};var H=F((function(t){return{paperRoot:{width:"calc(100% - 28px)",marginLeft:25,display:"inline-block",height:35,border:"0","&:focus-within":{boxShadow:"inset 0 0 0 2px ".concat(t.palette.primary.main)},boxShadow:"none"},input:{paddingLeft:5,width:"100%"},inputRoot:{height:35,paddingRight:"10px",lineHeight:"29px",paddingLeft:"10px"},inputEl:{padding:"0 0 0 6px",height:"100%"},additionalActionButton:{padding:"5px","&:hover":{backgroundColor:"transparent"}},nativeActionButton:{margin:"5px 10px",cursor:"pointer"},fileUploadingError:{marginTop:10,marginLeft:24},inputMain:{marginBottom:0,fontSize:".7rem",color:t.palette.grey[700]},inputHelper:{display:"flex",paddingRight:5},cancelText:{cursor:"pointer"},highlightedLabel:{color:t.palette.primary.main},iconsContainer:{marginRight:"8px"},iconTooltip:{marginTop:"3px"}}}))(_);export default H;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
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{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 l from"./PadMode.js";import d from"../../AssetNameLabel/index.js";import m from"./AppHeader.css.js";function c(o){var c,u,h,g,A,v,f,L,b=o.app,j=o.appLastAnnotation,x=o.appSettings,w=o.badge,C=o.classes,N=o.coordinates,_=o.currentUser,I=o.fracFleet,y=o.isMaximized,D=o.onSettingChange,S=o.openAnnotationsList,H=o.rig,M=o.showLastAnnotation,W=o.updateCurrentDashboardAppLastAnnotation,F=o.well,P=o.wells,z=a(b),R=null==b||null===(c=b.package)||void 0===c||null===(u=c.manifest)||void 0===u||null===(h=u.application)||void 0===h?void 0:h.subtitle,T=null!==(g=null==b||null===(A=b.package)||void 0===A||null===(v=A.manifest)||void 0===v||null===(f=v.application)||void 0===f||null===(L=f.segments)||void 0===L?void 0:L[0])&&void 0!==g?g:e.DRILLING,U=T===e.DRILLING,k=(null==b?void 0:b.settings)||{},O=k.wellId,q=k.rigId,G=k.fracFleetId,V=U?null==H?void 0:H.name:null==I?void 0:I.name,B=O&&(null==F?void 0:F.name),E=!!(O||q||G),J=U?V&&"assets/".concat(null==F?void 0:F.asset_id):"assets/types/pad/".concat(null==I?void 0:I.current_pad_id),K=b&&b.id===n;return s("div",{className:C.appHeader,children:[s("div",{className:C.appHeaderTitleWrapper,children:[s("div",{children:[s("div",{className:m.titleWrapper,children:[i("h6",{"data-testid":"".concat("DevCenter_AppHeader","_name"),className:m.title,children:z}),i(p,{app:b}),T===e.COMPLETION&&i(l,{fracFleet:I,wells:P,well:F,onSettingChange:D,appSettings:x})]}),w]}),b&&N&&i(d,{isPrimaryNameVisible:E,primaryAssetName:V,secondaryAssetName:B,coordinatesPixelWidth:N.pixelWidth,primaryAssetLink:!K&&J,isMaximized:y})]}),R&&i("h6",{"data-testid":"".concat("DevCenter_AppHeader","_subtitle"),className:m.subtitle,children:R}),M&&j&&i(r,{dashboardAppId:b.id,appId:t(b,["app","id"]),annotation:j,openAnnotationsList:S,updateCurrentDashboardAppLastAnnotation:W,currentUser:_})]})}c.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}),wells:o.arrayOf(o.shape({})),coordinates:o.shape({pixelWidth:o.number.isRequired}),isMaximized:o.bool,appSettings:o.shape({}),onSettingChange:o.func},c.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 c;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import{
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import{COMPLETION_APP_TYPES as t}from"../../../constants/completion.js";import{noop as r,get as o,isEmpty as n}from"lodash";import{getAssetKey as p,getDefaultPadModeSetting as i}from"../../../utils/completion.js";import{jsx as s}from"react/jsx-runtime";import l from"prop-types";import c from"../../PadModeSelect/PadModeSelect.js";function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function f(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 m=function(r){var l=r.fracFleet,a=r.wells,m=r.well,u=r.onSettingChange,g=r.appSettings,y=r.completionAppType;if(m||!a&&!l)return null;var O=y||t.fracMultiWellApp,b=p(l,m),d=o(g,["settingsByAsset",b]),j=n(d)?i(l,m,O):d;return s(c,{assets:a,completionAppType:O,padModeSetting:j,onChange:function(t){return u("settingsByAsset",f(f({},o(g,"settingsByAsset",{})),{},e({},b,t)))}})};m.propTypes={appSettings:l.shape({}),completionAppType:l.string,fracFleet:l.shape({}),onSettingChange:l.func,well:l.shape({}),wells:l.arrayOf(l.shape())},m.defaultProps={appSettings:{},completionAppType:void 0,fracFleet:void 0,onSettingChange:r,well:void 0,wells:void 0};export default m;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import{noop as t}from"lodash";import o from"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/helpers/toConsumableArray";import"../../../constants/goals.js";import"../../../constants/apps.js";import"../../../constants/completion.js";import"../../../constants/segment.js";import"../../../constants/alerts.js";import"../../../constants/drillstring.js";import"../../../utils/mobileDetect.js";import"@babel/runtime/helpers/typeof";import"../../../utils/index.js";import{jsxs as r,Fragment as i,jsx as n}from"react/jsx-runtime";import{makeStyles as s,Drawer as p,Box as a}from"@material-ui/core";import m from"@material-ui/icons/Close";import{useState as l,useRef as d,useEffect as c}from"react";import"querystring";import"uuid/v1";import"../../../clients/jsonApi/index.js";import"../../../clients/subscriptions.js";import"uuid";import"@babel/runtime/helpers/objectWithoutProperties";import u from"prop-types";import j from"classnames";import"../../Modal/index.js";import"../../IconMenu/index.js";import"../../StyledMenuItem/index.js";import"../../LoadingIndicator/LoadingIndicator.js";import"../../Tooltip.js";import"../../Avatar/index.js";import"../../Annotations/AnnotationsContext.js";import"../DevCenterRouterContext/DevCenterRouterContext.js";import"react-router";import"../DevCenterRouterContext/UniversalLink/UniversalLink.js";import"../../ConfirmationDialog.js";import"../../Annotations/components/AnnotationsList/index.js";import"../../Annotations/components/LastAnnotation/index.js";import"../../PadModeSelect/PadModeSelect.js";import"../AppHeader/AppHeader.js";import h from"@material-ui/icons/ChevronLeftRounded";import g from"@material-ui/icons/ChevronRightRounded";import x from"@material-ui/icons/Sort";import C from"@material-ui/icons/Check";import"../AppContext.js";import"../AppsDataProvider/AppsDataProvider.js";import"../DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../../ErrorBoundary/InternalErrorView/InternalErrorView.js";import"../../ErrorBoundary/ErrorBoundary.js";import"../../Typography.js";import"../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../SlateFormattedText/RenderElements.js";import"../../SlateFormattedText/SlateFormattedText.js";import"../DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../DevCenterAppContainer/DevCenterAppContainer.css.js";import"../DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../NavigationBar/NavigationBar.js";import"../SideBar/SideBar.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/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/index.js";import"../../EmptyView/EmptyAppView/index.js";import b from"../../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 f from"../../IconButton/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"../../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";var A=s((function(t){var o,r;return{drawer:function(o){var r=o.openedDrawerWidth;return e({height:"100%",position:"relative",width:r,borderTop:"1px solid",borderTopColor:t.palette.background.b7,boxShadow:"4px 0px 8px rgba(0, 0, 0, 0.15)"},"&.".concat("closed"),{width:"48px"})},drawerPaper:(o={position:"relative",width:"100%",backgroundColor:t.palette.background.b5},e(o,"&.".concat("closed"),{cursor:"pointer","&:hover":{backgroundColor:t.palette.background.b7,"& > $header":{backgroundColor:t.palette.background.b7}}}),e(o,"&.MuiDrawer-paperAnchorDockedLeft",{borderRight:"none"}),e(o,"&.MuiDrawer-paperAnchorDockedRight",{borderLeft:"none"}),o),header:(r={height:48,borderBottom:"1px solid",borderBottomColor:t.palette.background.b7,display:"flex",justifyContent:"center",alignItems:"center",position:"absolute",top:0,left:0,right:0,letterSpacing:"1px",textTransform:"uppercase",fontSize:"14px",fontWeight:500,lineHeight:"20px",backgroundColor:t.palette.background.b5},e(r,"&.".concat("open"),{padding:t.spacing(1.5),justifyContent:"flex-start"}),e(r,"&.".concat("withShadow"),{zIndex:1,boxShadow:"-18px 12px 12px #272727"}),r),openToggleIconOpen:{transform:"rotate(180deg)"},openToggleContainer:function(t){var o,r=t.anchor;return e(o={alignItems:"center",bottom:0,display:"flex",flex:"0 0",height:48,justifyContent:"center",padding:6,position:"absolute",width:"100%"},"&.".concat("withShadow"),{zIndex:1,boxShadow:"-18px -12px 12px #272727"}),e(o,"&.".concat("open"),{justifyContent:"left"===r?"flex-end":"flex-start",paddingRight:6}),o},contentWrapper:{marginTop:48,height:"calc(100% - 96px)",overflowY:"auto"},content:{padding:"16px 12px",display:"flex",flexDirection:"column"},selectAllButton:{textTransform:"none",fontSize:"10px",lineHeight:"14px",letterSpacing:"0.4px",marginLeft:16,"& .MuiButton-startIcon":{marginRight:4}},headerIcon:{cursor:"pointer"},headerIconText:{cursor:"pointer"}}})),S=function(t){var s,u=t.anchor,S=t.children,I=t.drawerPaperClassName,v=t.header,T=t.headerIcon,w=t.headerTitleIcon,y=t.isOpen,D=t.openedDrawerWidth,L=t.setIsOpen,k=t.size,P=t.allOptionsButtonShown,B=t.isAllOptionsSelected,E=t.onAllOptionsClick,O=l(!1),W=o(O,2),M=W[0],N=W[1],F=d(),R=A({anchor:u,openedDrawerWidth:D||{small:235,medium:354,large:473}[k]});c((function(){var e=F.current,t=e.scrollHeight,o=e.clientHeight;N(t>o)}));var H="left"===u?g:h;return r(p,{onClick:function(){y||L(!0)},className:j(R.drawer,!y&&"closed"),variant:"permanent",classes:{paper:j(R.drawerPaper,I,!y&&"closed")},anchor:u,children:[r("div",{className:j(R.header,y&&"open",M&&"withShadow"),onClick:function(){y&&L(!1)},children:[y&&r(i,{children:[w||n(x,{className:R.headerIcon}),n("div",{className:R.headerIconText,children:v}),P&&n(b,{className:R.selectAllButton,onClick:function(e){e.stopPropagation(),E(e)},startIcon:n(B?m:C,{}),children:B?"Clear All":"Select All"})]}),!y&&T]}),n("div",{className:R.contentWrapper,ref:F,children:n("div",{className:R.content,children:y&&S})}),n(a,{className:j(R.openToggleContainer,(s={},e(s,"open",y),e(s,"withShadow",M),s)),children:n(f,{"aria-label":"toggle sidebar",onClick:function(){L(!y)},children:n(H,{className:j(y&&R.openToggleIconOpen)})})})]})};S.propTypes={anchor:u.oneOf(["left","right"]),children:u.node.isRequired,drawerPaperClassName:u.string,header:u.node,headerIcon:u.node,headerTitleIcon:u.node,isOpen:u.bool,openedDrawerWidth:u.oneOfType([u.string,u.number]),setIsOpen:u.func,size:u.oneOf(["small","medium","large"]),allOptionsButtonShown:u.bool,isAllOptionsSelected:u.bool,onAllOptionsClick:u.func},S.defaultProps={anchor:"left",drawerPaperClassName:"",header:null,headerIcon:null,headerTitleIcon:null,isOpen:!1,openedDrawerWidth:0,setIsOpen:t,size:"medium",allOptionsButtonShown:!1,isAllOptionsSelected:!1,onAllOptionsClick:t};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{noop as t}from"lodash";import o from"@babel/runtime/helpers/slicedToArray";import"../../../constants/goals.js";import"../../../constants/segment.js";import"../../../constants/apps.js";import"../../../constants/drillstring.js";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/asyncToGenerator";import"../../../utils/mobileDetect.js";import"@babel/runtime/helpers/typeof";import"../../../utils/index.js";import{jsxs as r,Fragment as i,jsx as n}from"react/jsx-runtime";import{makeStyles as s,Drawer as p,Box as a}from"@material-ui/core";import m from"@material-ui/icons/Close";import{useState as l,useRef as d,useEffect as c}from"react";import"querystring";import"uuid/v1";import"../../../clients/jsonApi/index.js";import"../../../clients/subscriptions.js";import"uuid";import"@babel/runtime/helpers/objectWithoutProperties";import u from"prop-types";import j from"classnames";import"../../Modal/index.js";import"../../IconMenu/index.js";import"../../StyledMenuItem/index.js";import"../../LoadingIndicator/LoadingIndicator.js";import"../../Tooltip.js";import"../../Avatar/index.js";import"../../Annotations/AnnotationsContext.js";import"../DevCenterRouterContext/DevCenterRouterContext.js";import"react-router";import"../DevCenterRouterContext/UniversalLink/UniversalLink.js";import"../../ConfirmationDialog.js";import"../../Annotations/components/AnnotationsList/index.js";import"../../Annotations/components/LastAnnotation/index.js";import"../../PadModeSelect/PadModeSelect.js";import"../AppHeader/AppHeader.js";import h from"@material-ui/icons/ChevronLeftRounded";import g from"@material-ui/icons/ChevronRightRounded";import x from"@material-ui/icons/Sort";import C from"@material-ui/icons/Check";import"../AppContext.js";import"../AppsDataProvider/AppsDataProvider.js";import"../DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../../ErrorBoundary/InternalErrorView/InternalErrorView.js";import"../../ErrorBoundary/ErrorBoundary.js";import"../../Typography.js";import"../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../SlateFormattedText/RenderElements.js";import"../../SlateFormattedText/SlateFormattedText.js";import"../DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../DevCenterAppContainer/DevCenterAppContainer.css.js";import"../DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../NavigationBar/NavigationBar.js";import"../SideBar/SideBar.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/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/index.js";import"../../EmptyView/EmptyAppView/index.js";import f from"../../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 b from"../../IconButton/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";var A=s((function(t){var o,r;return{drawer:function(o){var r=o.openedDrawerWidth;return e({height:"100%",position:"relative",width:r,borderTop:"1px solid",borderTopColor:t.palette.background.b7,boxShadow:"4px 0px 8px rgba(0, 0, 0, 0.15)"},"&.".concat("closed"),{width:"48px"})},drawerPaper:(o={position:"relative",width:"100%",backgroundColor:t.palette.background.b5},e(o,"&.".concat("closed"),{cursor:"pointer","&:hover":{backgroundColor:t.palette.background.b7,"& > $header":{backgroundColor:t.palette.background.b7}}}),e(o,"&.MuiDrawer-paperAnchorDockedLeft",{borderRight:"none"}),e(o,"&.MuiDrawer-paperAnchorDockedRight",{borderLeft:"none"}),o),header:(r={height:48,borderBottom:"1px solid",borderBottomColor:t.palette.background.b7,display:"flex",justifyContent:"center",alignItems:"center",position:"absolute",top:0,left:0,right:0,letterSpacing:"1px",textTransform:"uppercase",fontSize:"14px",fontWeight:500,lineHeight:"20px",backgroundColor:t.palette.background.b5},e(r,"&.".concat("open"),{padding:t.spacing(1.5),justifyContent:"flex-start"}),e(r,"&.".concat("withShadow"),{zIndex:1,boxShadow:"-18px 12px 12px #272727"}),r),openToggleIconOpen:{transform:"rotate(180deg)"},openToggleContainer:function(t){var o,r=t.anchor;return e(o={alignItems:"center",bottom:0,display:"flex",flex:"0 0",height:48,justifyContent:"center",padding:6,position:"absolute",width:"100%"},"&.".concat("withShadow"),{zIndex:1,boxShadow:"-18px -12px 12px #272727"}),e(o,"&.".concat("open"),{justifyContent:"left"===r?"flex-end":"flex-start",paddingRight:6}),o},contentWrapper:{marginTop:48,height:"calc(100% - 96px)",overflowY:"auto"},content:{padding:"16px 12px",display:"flex",flexDirection:"column"},selectAllButton:{textTransform:"none",fontSize:"10px",lineHeight:"14px",letterSpacing:"0.4px",marginLeft:16,"& .MuiButton-startIcon":{marginRight:4}},headerIcon:{cursor:"pointer"},headerIconText:{cursor:"pointer"}}})),S=function(t){var s,u=t.anchor,S=t.children,I=t.drawerPaperClassName,v=t.header,T=t.headerIcon,w=t.headerTitleIcon,P=t.isOpen,y=t.openedDrawerWidth,D=t.setIsOpen,k=t.size,L=t.allOptionsButtonShown,E=t.isAllOptionsSelected,O=t.onAllOptionsClick,B=l(!1),W=o(B,2),M=W[0],N=W[1],F=d(),R=A({anchor:u,openedDrawerWidth:y||{small:235,medium:354,large:473}[k]});c((function(){var e=F.current,t=e.scrollHeight,o=e.clientHeight;N(t>o)}));var H="left"===u?g:h;return r(p,{onClick:function(){P||D(!0)},className:j(R.drawer,!P&&"closed"),variant:"permanent",classes:{paper:j(R.drawerPaper,I,!P&&"closed")},anchor:u,children:[r("div",{className:j(R.header,P&&"open",M&&"withShadow"),onClick:function(){P&&D(!1)},children:[P&&r(i,{children:[w||n(x,{className:R.headerIcon}),n("div",{className:R.headerIconText,children:v}),L&&n(f,{className:R.selectAllButton,onClick:function(e){e.stopPropagation(),O(e)},startIcon:n(E?m:C,{}),children:E?"Clear All":"Select All"})]}),!P&&T]}),n("div",{className:R.contentWrapper,ref:F,children:n("div",{className:R.content,children:P&&S})}),n(a,{className:j(R.openToggleContainer,(s={},e(s,"open",P),e(s,"withShadow",M),s)),children:n(b,{"aria-label":"toggle sidebar",onClick:function(){D(!P)},children:n(H,{className:j(P&&R.openToggleIconOpen)})})})]})};S.propTypes={anchor:u.oneOf(["left","right"]),children:u.node.isRequired,drawerPaperClassName:u.string,header:u.node,headerIcon:u.node,headerTitleIcon:u.node,isOpen:u.bool,openedDrawerWidth:u.oneOfType([u.string,u.number]),setIsOpen:u.func,size:u.oneOf(["small","medium","large"]),allOptionsButtonShown:u.bool,isAllOptionsSelected:u.bool,onAllOptionsClick:u.func},S.defaultProps={anchor:"left",drawerPaperClassName:"",header:null,headerIcon:null,headerTitleIcon:null,isOpen:!1,openedDrawerWidth:0,setIsOpen:t,size:"medium",allOptionsButtonShown:!1,isAllOptionsSelected:!1,onAllOptionsClick:t};export default S;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{get as
|
|
1
|
+
import t from"@babel/runtime/helpers/toConsumableArray";import{get as r,keyBy as n,values as e,merge as a,flatten as u,uniq as i}from"lodash";import c from"@babel/runtime/helpers/slicedToArray";import{ASSET_TYPES as o}from"../../../../constants/assetTypes.js";import s from"@babel/runtime/regenerator";import p from"@babel/runtime/helpers/asyncToGenerator";import{getAppsDataByRigs as d,fetchRigs as f,getAppsDataByWells as l,fetchWells as m,fetchAssetEntitiesByAssetIds as b,getAppsDataByFFs as y,getUniqAssetIds as x,fetchFracFleets as h,fetchFracFleetWells as v}from"./utils.js";function k(t,r){return w.apply(this,arguments)}function w(){return(w=p(s.mark((function t(a,u){var i,c,p,y,x,h,v,k,w,g;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,b([a]);case 2:if(i=t.sent,c=r(e(i),"[0][0].data")){t.next=6;break}return t.abrupt("return",{});case 6:if(c.type!==o.well.type){t.next=16;break}return t.next=9,m([c.id]);case 9:if(p=t.sent){t.next=12;break}return t.abrupt("return",{});case 12:return y=r(p,"data"),x=y&&n(y.concat(p.included),"id"),h=l(u,x,(function(t){return t[r(p,"data[0].id")]})),t.abrupt("return",h);case 16:if(c.type!==o.rig.type){t.next=24;break}if(v=f([c.id])){t.next=20;break}return t.abrupt("return",{});case 20:return k=r(v,"data"),w=k&&n(k.concat(v.included),"id"),g=d(u,w,(function(t){return t[r(v,"data[0].id")]})),t.abrupt("return",g);case 24:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function g(t,r,n,e){return T.apply(this,arguments)}function T(){return(T=p(s.mark((function r(e,u,i,o){var p,b,k,w,g,T,j,A,P,C,G,S,_,q,z,B;return s.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return p=x(e),b=x(u),k=x(i),w=t(new Set(i)),r.next=6,Promise.all([m(p),f(b),h(k),v(w,o)]);case 6:if(g=r.sent,T=c(g,4),j=T[0],A=T[1],P=T[2],C=T[3],j||A||P||C){r.next=14;break}return r.abrupt("return",{});case 14:return G=(null==j?void 0:j.data)&&n(j.data.concat(j.included),"id"),S=(null==A?void 0:A.data)&&n(A.data.concat(A.included),"id"),_=n(P,"id"),q=l(e,G,(function(t,r){return t[r]})),z=d(u,S,(function(t,r){return t[r]})),B=y(i,_,C),r.abrupt("return",a(q,z,B));case 21:case"end":return r.stop()}}),r)})))).apply(this,arguments)}function j(t,r,n){return A.apply(this,arguments)}function A(){return(A=p(s.mark((function t(p,y,h){var v,k,w,g,T,j,A,P,C,G,S,_,q,z,B,D;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return v=x(p),t.next=3,b(v);case 3:return k=t.sent,w=u(e(k)),g=i(w.filter((function(t){return r(t,"data.type")===o.well.type})).map((function(t){return+r(t,"data.id")})).concat(y.map((function(t){var r=c(t,2);r[0];return r[1]})))),T=i(w.filter((function(t){return r(t,"data.type")===o.rig.type})).map((function(t){return+r(t,"data.id")})).concat(h.map((function(t){var r=c(t,2);r[0];return r[1]})))),t.next=9,Promise.all([m(g),f(T)]);case 9:if(j=t.sent,A=c(j,2),P=A[0],C=A[1],P||C){t.next=15;break}return t.abrupt("return",{});case 15:return G=r(P,"data"),S=r(C,"data"),_=G&&n(G.concat(P.included),"id"),q=S&&n(S.concat(C.included),"id"),z=p.map((function(t){var n=c(t,2),e=n[0],a=n[1];return[e,G.concat(S).find((function(t){return r(t,"attributes.asset_id")===a})).id]})).concat(y,h),B=l(z,_,(function(t,r){return t[r]})),D=d(z,q,(function(t,r){return t[r]})),t.abrupt("return",a(B,D));case 23:case"end":return t.stop()}}),t)})))).apply(this,arguments)}export{k as resolveAppsDataForAssetDashboard,j as resolveAppsDataForFeedPage,g as resolveAppsDataForGeneralDashboard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import r from"@babel/runtime/helpers/defineProperty";import{get as e,mapValues as t,merge as n}from"lodash";import i from"@babel/runtime/helpers/slicedToArray";import
|
|
1
|
+
import r from"@babel/runtime/helpers/defineProperty";import{get as e,mapValues as t,merge as n}from"lodash";import i from"@babel/runtime/helpers/slicedToArray";import{ASSET_TYPES as o}from"../../../../constants/assetTypes.js";import{isDevCenterApp as s}from"../../../../utils/devcenter.js";import a from"@babel/runtime/regenerator";import u from"@babel/runtime/helpers/asyncToGenerator";import{useState as c,useEffect as p}from"react";import{getAppAssetSpecificTypeId as f}from"./utils.js";import{resolveAppsDataForAssetDashboard as l,resolveAppsDataForGeneralDashboard as d,resolveAppsDataForFeedPage as m}from"./dataResolvers.js";function b(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,n)}return t}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}var h=function(r){return[f(r,o.well.id),f(r,o.rig.id),f(r,o.frac_fleet.id),f(r,"deprecatedAssetId")].join("-")},O={id:null,rig:null,well:null,fracFleet:null,wells:null,isLoading:!1,appHash:null};function j(b){var j=b.apps,y=b.dashboardAssetId,v=j.filter(s),w=c((function(){return function(e){return e.reduce((function(e,t){return g(g({},e),{},r({},t.id,g(g({},O),{},{id:t.id,isLoading:!0,appHash:h(t)})))}),{})}(v)})),P=i(w,2),x=P[0],S=P[1],k=[],A=[],D=[],H=[],L=[],_=[];v.forEach((function(r){if(!e(r,["app","ui_settings","multi_rig"])){var t=f(r,o.well.id),n=f(r,o.rig.id),i=f(r,o.frac_fleet.id),s=f(r,"deprecatedAssetId"),a=r.id;H.push([a]),t?k.push([a,t]):n?A.push([a,n]):s?L.push([a,s]):i?D.push([a,i]):y&&_.push([a])}}));var E=!!y,I=!y&&L.length,T=function(e){return v.reduce((function(t,n){var i=n.id,o=e[i],s=h(n);return o&&s===o.appHash?g(g({},t),{},r({},i,o)):g(g({},t),{},r({},i,g(g({},O),{},{id:i,isLoading:!0,appHash:s})))}),{})};return p(u(a.mark((function r(){var e;return a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e={},S(T),!I){r.next=8;break}return r.next=5,m(L,k,A);case 5:e=r.sent,r.next=18;break;case 8:return r.next=10,d(k,A,D,v);case 10:if(e=r.sent,!E){r.next=18;break}return r.t0=n,r.t1=e,r.next=16,l(y,_);case 16:r.t2=r.sent,e=(0,r.t0)(r.t1,r.t2);case 18:S((function(r){return t(r,(function(r){var t=e[r.id]||{};return g(g(g({},r),t),{},{isLoading:!1})}))}));case 19:case"end":return r.stop()}}),r)}))),[String(k),String(A),String(D),String(H),String(_),y]),x}export default j;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import r from"@babel/runtime/helpers/defineProperty";import{get as e,uniq as t,keyBy as n}from"lodash";import a from"@babel/runtime/helpers/slicedToArray";import i
|
|
1
|
+
import r from"@babel/runtime/helpers/defineProperty";import"../../../../constants/completion.js";import"../../../../constants/alerts.js";import{get as e,uniq as t,keyBy as n}from"lodash";import a from"@babel/runtime/helpers/slicedToArray";import{DEV_CENTER_CLI_APP_ID as i}from"../../../../constants/devcenter.js";import"../../../../constants/goals.js";import"../../../../constants/segment.js";import"../../../../constants/apps.js";import"../../../../constants/drillstring.js";import s from"@babel/runtime/regenerator";import u from"@babel/runtime/helpers/asyncToGenerator";import{getWells as c,getRigs as o,getResolvedAssets as l,getFracFleets as p,getFracFleetWells as f}from"../../../../clients/jsonApi/index.js";import d from"jsona";function m(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,n)}return t}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}var h=new d,v=function(r,t){return+e(r,["settings",t])},w=function(r){return t(r.map((function(r){var e=a(r,2);e[0];return e[1]})).filter(Number.isFinite))};function y(r){return g.apply(this,arguments)}function g(){return(g=u(s.mark((function r(e){return s.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e.length){r.next=2;break}return r.abrupt("return",null);case 2:return r.prev=2,r.next=5,c({ids:e,fields:["well.name","well.settings","well.company","well.asset_id","well.last_active_at","well.id","well.rig","rig.name","rig.asset_id","company.id"]});case 5:return r.abrupt("return",r.sent);case 8:return r.prev=8,r.t0=r.catch(2),console.error(r.t0),r.abrupt("return",null);case 12:case"end":return r.stop()}}),r,null,[[2,8]])})))).apply(this,arguments)}function _(r){return j.apply(this,arguments)}function j(){return(j=u(s.mark((function r(e){return s.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e.length){r.next=2;break}return r.abrupt("return",null);case 2:return r.prev=2,r.next=5,o({ids:e,fields:["rig.name","rig.settings","rig.asset_id","rig.active_well","well.name","well.settings","well.company","well.asset_id","well.last_active_at","well.id","well.company.id"]});case 5:return r.abrupt("return",r.sent);case 8:return r.prev=8,r.t0=r.catch(2),console.error(r.t0),r.abrupt("return",null);case 12:case"end":return r.stop()}}),r,null,[[2,8]])})))).apply(this,arguments)}function x(r){return O.apply(this,arguments)}function O(){return(O=u(s.mark((function r(e){return s.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e.length){r.next=2;break}return r.abrupt("return",null);case 2:return r.prev=2,r.next=5,l({assets:e});case 5:return r.abrupt("return",r.sent);case 8:return r.prev=8,r.t0=r.catch(2),console.error(r.t0),r.abrupt("return",null);case 12:case"end":return r.stop()}}),r,null,[[2,8]])})))).apply(this,arguments)}var k=function(r,t){return{well:r&&b(b({},r.attributes),{},{id:r.id,companyId:e(r,"relationships.company.data.id")}),rig:{name:e(t,"attributes.name"),id:e(t,"id"),asset_id:e(t,"attributes.asset_id")}}},P=function(r,t,n){return t?r.reduce((function(r,i){var s=a(i,2),u=s[0],c=s[1],o=n(t,c),l=t[e(o,"relationships.rig.data.id")];return r[u]=k(o,l),r}),{}):{}},D=function(r,t,n){return t?r.reduce((function(r,i){var s=a(i,2),u=s[0],c=s[1],o=n(t,c),l=t[e(o,"relationships.active_well.data.id")];return r[u]=k(l,o),r}),{}):{}},z=function(r,e,t){return e||t?r.reduce((function(r,n){var i=a(n,2),s=i[0],u=i[1],c=null==e?void 0:e[u],o=null==t?void 0:t[s];return r[s]={fracFleet:c,wells:o},r}),{}):{}};function A(r){return E.apply(this,arguments)}function E(){return(E=u(s.mark((function r(e){var t;return s.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e.length){r.next=2;break}return r.abrupt("return",null);case 2:return r.prev=2,r.next=5,p({ids:e,fields:["frac_fleet.name","frac_fleet.pads","frac_fleet.current_pad_id","frac_fleet.pad_frac_fleets"]});case 5:return t=r.sent,r.abrupt("return",h.deserialize(t));case 9:return r.prev=9,r.t0=r.catch(2),console.error(r.t0),r.abrupt("return",{});case 13:case"end":return r.stop()}}),r,null,[[2,9]])})))).apply(this,arguments)}function F(r,e){return S.apply(this,arguments)}function S(){return(S=u(s.mark((function r(t,c){var o,l,p;return s.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=n(c,"id"),l=t.map(function(){var r=u(s.mark((function r(t){var n,u,c,l,p,d;return s.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=a(t,2),u=n[0],c=n[1],l={fields:"all",frac_fleet_id:c},p=o[u],u===i?l.app_key=e(p,["app","app_key"]):l.app_id=e(p,["app","id"]),r.prev=4,r.next=7,f(l);case 7:return d=r.sent,r.abrupt("return",h.deserialize(d));case 11:return r.prev=11,r.t0=r.catch(4),console.error(r.t0),r.abrupt("return",[]);case 15:case"end":return r.stop()}}),r,null,[[4,11]])})));return function(e){return r.apply(this,arguments)}}()),r.next=4,Promise.all(l);case 4:return p=r.sent,r.abrupt("return",p.reduce((function(r,e,n){return r[t[n][0]]=e,r}),{}));case 6:case"end":return r.stop()}}),r)})))).apply(this,arguments)}export{x as fetchAssetEntitiesByAssetIds,F as fetchFracFleetWells,A as fetchFracFleets,_ as fetchRigs,y as fetchWells,v as getAppAssetSpecificTypeId,z as getAppsDataByFFs,D as getAppsDataByRigs,P as getAppsDataByWells,w as getUniqAssetIds};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"@babel/runtime/helpers/defineProperty";import{pickBy as e,pick as n,noop as o}from"lodash";import i from"@babel/runtime/helpers/slicedToArray";import"
|
|
1
|
+
import t from"@babel/runtime/helpers/defineProperty";import"../../../constants/completion.js";import"../../../constants/alerts.js";import{pickBy as e,pick as n,noop as o}from"lodash";import i from"@babel/runtime/helpers/slicedToArray";import{DEV_CENTER_CLI_APP_ID as s}from"../../../constants/devcenter.js";import"../../../constants/goals.js";import{SEGMENTS as r}from"../../../constants/segment.js";import"../../../constants/apps.js";import"../../../constants/drillstring.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 c}from"../../../utils/notificationToasts.js";import"../../../utils/index.js";import{jsx as u,jsxs as d,Fragment as g}from"react/jsx-runtime";import{useContext as A,useState as f}from"react";import"querystring";import"uuid/v1";import"../../../clients/jsonApi/index.js";import"../../../clients/subscriptions.js";import v from"../../../effects/useDevCenterApp.js";import"@babel/runtime/helpers/objectWithoutProperties";import j from"classnames";import{AnnotationsProvider as C}from"../../Annotations/AnnotationsContext.js";import{DevCenterRouterContext as b}from"../DevCenterRouterContext/DevCenterRouterContext.js";import"react-router";import"../DevCenterRouterContext/UniversalLink/UniversalLink.js";import y from"../../Annotations/components/AnnotationsList/index.js";import"../../Annotations/components/LastAnnotation/index.js";import h from"../AppContext.js";import I from"./effects/useAppSettings.js";import D from"./effects/useAnnotationsList.js";import M from"./effects/useAnnotationsData.js";import S from"./effects/useAppMaximized.js";import L from"./components/AppActions/AppActions.js";import x from"./components/AppSettingsDialog/AppSettingsDialog.js";import O from"./components/AnnotationsButton/AnnotationsButton.js";import P from"./components/NonPriorityMenus/NonPriorityMenus.js";import R from"./components/FullscreenButton/FullscreenButton.js";import"./components/AppInfoMessage/AppInfoMessage.js";import w from"./components/DevCenterAppView/DevCenterAppView.js";import z from"./DevCenterAppContainer.css.js";import N from"./components/RestoreAppSizeButton/index.js";import{getAppVersion as E}from"./utils.js";import F from"./components/PriorityMenus/PriorityMenus.js";function U(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function k(e){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?U(Object(o),!0).forEach((function(n){t(e,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):U(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var B=m||l;function q(t){var l,U,q,T,_,G,V,H=t.CLIAppComponent,K=t.CLIAppSettings,W=t.app,J=t.appId,Q=t.coordinates,X=t.currentDashboardAppsLastAnnotations,Y=t.currentUser,Z=t.devCenterRouter,$=t.isActionsDisabled,tt=t.isAppNotSubscribed,et=t.layoutEnvironment,nt=t.onAppRemove,ot=t.onIsMaximizedChange,it=t.onSettingChange,st=t.onSettingsChange,rt=t.setIsFullscreenModalMode,pt=void 0===rt?o:rt,at=t.updateCurrentDashboardAppLastAnnotation,mt=A(h),lt=f([]),ct=i(lt,2),ut=ct[0],dt=ct[1],gt=f([]),At=i(gt,2),ft=At[0],vt=At[1],jt=null!==(l=null==mt?void 0:mt[J||W.id])&&void 0!==l?l:{isLoading:!0},Ct=null===(U=W.package)||void 0===U||null===(q=U.manifest)||void 0===q?void 0:q.application,bt=(null==Ct||null===(T=Ct.segments)||void 0===T?void 0:T[0])||r.DRILLING,yt=!(null==Ct||null===(_=Ct.ui)||void 0===_||!_.multi_rig),ht=p(W),It=S({onIsMaximizedChange:ot,devCenterRouter:Z,appId:J}),Dt=It.isMaximized,Mt=It.setIsMaximized,St=a(null===(G=Z.location.query)||void 0===G?void 0:G.query),Lt=W.id===s&&B?k(k({},Q),{},{w:12}):Q,xt=v({CLIAppComponent:H,CLIAppSettings:K,url:null==W||null===(V=W.package)||void 0===V?void 0:V.url,appKey:W.app.app_key,version:E(W)}),Ot=xt.isLoading,Pt=xt.AppSettings,Rt=xt.AppComponent,wt=I({setIsFullscreenModalMode:pt}),zt=wt.isAppSettingsDialogOpened,Nt=wt.toggleAppSettingsDialog,Et=D(),Ft=Et.isAnnotationsListOpened,Ut=Et.toggleAnnotationsList,kt=Ot||!Y||!yt&&jt.isLoading,Bt=Z.location,qt=Bt.pathname,Tt=Bt.query,_t=M({app:W,appData:jt,currentDashboardAppsLastAnnotations:X}),Gt=_t.appLastAnnotation,Vt=_t.assetCompanyId,Ht=_t.assetIdForAnnotation,Kt=_t.isAppSupportsAnnotations,Wt=e(n(jt,["well","rig","fracFleet","wells"]),Boolean);return u(b.Provider,{value:Z,children:d("div",{className:j("dc-app-container",z.container),"data-testid":"".concat("DevCenter_AppContainer","_").concat(W.app.name),children:[u("div",{className:z.containerContent,children:u(w,{AppComponent:Rt,app:W,appData:Wt,isAppLoading:Ot,isAppNotSubscribed:tt,isLoading:kt,isMultiRig:yt,segment:bt,layoutEnvironment:et,appProps:{coordinates:Lt,currentUser:Y,devCenterRouter:Z,onSettingChange:it,onSettingsChange:st,setIsFullscreenModalMode:pt,setIsMaximized:Mt,setMainMenuItems:dt,setSecondaryMenuItems:vt,appHeaderProps:k({app:W,appLastAnnotation:Gt,appSettings:W.settings,coordinates:Lt,currentUser:Y,isMaximized:Dt,layoutEnvironment:et,onSettingChange:it,toggleAnnotationsList:Ut,updateCurrentDashboardAppLastAnnotation:at},Wt),isNative:m,layoutEnvironment:et,timestamp:St}})}),zt&&u(x,{AppSettingsComponent:Pt,app:W,appData:jt,appName:ht,currentUser:Y,isMultiRig:yt,layoutEnvironment:et,onAppRemove:nt,onSettingChange:it,onSettingsChange:st,segment:bt,timestamp:St,toggleAppSettingsDialog:Nt}),Ft&&u(C,{children:u(y,{appId:W.app.id,appSettings:W.settings,appTitle:W.name,assetCompanyId:Vt,assetId:Ht,currentUser:Y,onClose:Ut,showSuccessNotification:c})}),!$&&Dt&&u(N,{setIsMaximized:Mt}),d(L,{children:[Kt&&u(O,{toggleAnnotationsList:Ut}),B&&!Dt?u(R,{setIsMaximized:Mt}):d(g,{children:[u(F,{menuItems:ut,devCenterRouter:Z}),u(P,{appId:W.id,devCenterRouter:Z,isMaximized:Dt,menuItems:ft,pathname:qt,query:Tt,setIsMaximized:Mt,toggleAppSettingsDialog:Nt})]})]})]})})}export default q;
|