@corva/ui 0.59.0-5 → 0.59.0-7

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.
Files changed (180) hide show
  1. package/README.md +5 -1
  2. package/cjs-bundle/components/AddComment/Popover.js +1 -1
  3. package/cjs-bundle/components/AddComment/components/Content.js +1 -1
  4. package/cjs-bundle/components/Annotations/components/AnnotationsList/components/AddAnnotationForm/index.js +1 -1
  5. package/cjs-bundle/components/AppVersionsSelect/AppVersionsSelect.js +1 -1
  6. package/cjs-bundle/components/Attachment/index.js +1 -1
  7. package/cjs-bundle/components/BICOffsetPickerDialog/index.js +1 -1
  8. package/cjs-bundle/components/Casing/CasingTableV2/components/CasingJoints/Editor.js +1 -1
  9. package/cjs-bundle/components/Casing/CasingTableV2/components/Component.js +1 -1
  10. package/cjs-bundle/components/Casing/CasingTableV2/components/DrillPipe/Editor.js +1 -1
  11. package/cjs-bundle/components/CollapsableSidebar.js +1 -1
  12. package/cjs-bundle/components/DevCenter/AppHeader/AppHeader.js +1 -1
  13. package/cjs-bundle/components/DevCenter/AppsDataProvider/effects/utils.js +1 -1
  14. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js +1 -1
  15. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js +1 -1
  16. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js +1 -1
  17. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/RemoveAppButton.js +1 -1
  18. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js +1 -1
  19. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/effects/useAnnotationsData.js +1 -1
  20. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/effects/useAppMaximized.js +1 -1
  21. package/cjs-bundle/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterAppZoidComponent.js +1 -1
  22. package/cjs-bundle/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js +1 -1
  23. package/cjs-bundle/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js +1 -1
  24. package/cjs-bundle/components/DocumentViewer/DocumentViewer.js +1 -1
  25. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js +1 -1
  26. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js +1 -1
  27. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Component.js +1 -1
  28. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js +1 -1
  29. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js +1 -1
  30. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js +1 -1
  31. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js +1 -1
  32. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js +1 -1
  33. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js +1 -1
  34. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js +1 -1
  35. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js +1 -1
  36. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js +1 -1
  37. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js +1 -1
  38. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js +1 -1
  39. package/cjs-bundle/components/EmptyState/EmptyState.js +1 -1
  40. package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/SidetrackSwitch.js +1 -1
  41. package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js +1 -1
  42. package/cjs-bundle/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js +1 -1
  43. package/cjs-bundle/components/OffsetWellPickerV2/effects/index.js +1 -1
  44. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Filter/SidetrackSwitch.js +1 -1
  45. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js +1 -1
  46. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/effects/index.js +1 -1
  47. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/index.js +1 -1
  48. package/cjs-bundle/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js +1 -1
  49. package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js +1 -1
  50. package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/index.js +1 -1
  51. package/cjs-bundle/components/OffsetWellPickerV3/components/WellHubView/index.js +1 -1
  52. package/cjs-bundle/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js +1 -1
  53. package/cjs-bundle/components/OffsetWellPickerV4/OffsetWellPickerV4.js +1 -1
  54. package/cjs-bundle/components/OffsetWellPickerV4/components/Filter/Filter.js +1 -1
  55. package/cjs-bundle/components/OffsetWellPickerV4/components/OffsetWellsTable/AdvancedSearch/AutoCompleteAssetSearch.js +1 -1
  56. package/cjs-bundle/components/OffsetWellPickerV4/components/OffsetWellsTable/MetricsSettingMenu.js +1 -1
  57. package/cjs-bundle/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.js +1 -1
  58. package/cjs-bundle/components/OffsetWellPickerV4/components/Toolbar/Toolbar.js +1 -1
  59. package/cjs-bundle/components/OffsetWellPickerV4/effects/useCompanyMetricKey.js +1 -1
  60. package/cjs-bundle/components/RealTimeValuesSidebar/RealTimeValuesBox/RealTimeBoxList.js +1 -1
  61. package/cjs-bundle/components/StatusBadge/api.js +1 -0
  62. package/cjs-bundle/components/StatusBadge/constants.js +1 -1
  63. package/cjs-bundle/components/StatusBadge/utils.js +1 -1
  64. package/cjs-bundle/components/TextLink/index.js +1 -1
  65. package/cjs-bundle/components/WellSummary/ActivitySummaryChart.js +1 -1
  66. package/cjs-bundle/components/WellSummary/WellSummaryItemValue.js +1 -1
  67. package/cjs-bundle/components/WellSummary/effects/useWellSummaryData.js +1 -1
  68. package/cjs-bundle/constants/corvaCompanyId.js +1 -0
  69. package/cjs-bundle/constants/index.js +1 -1
  70. package/cjs-bundle/effects/index.js +1 -1
  71. package/cjs-bundle/effects/useWellnessAlerts.js +1 -0
  72. package/cjs-bundle/permissions/constants/index.js +1 -1
  73. package/cjs-bundle/utils/devcenter.js +1 -1
  74. package/cjs-bundle/utils/env.js +1 -1
  75. package/cjs-bundle/utils/index.js +1 -1
  76. package/components/AddComment/Popover.js +1 -1
  77. package/components/AddComment/components/Content.js +1 -1
  78. package/components/Annotations/components/AnnotationsList/components/AddAnnotationForm/index.js +1 -1
  79. package/components/Annotations/components/AnnotationsList/index.d.ts +2 -2
  80. package/components/AppVersionsSelect/AppVersionsSelect.js +1 -1
  81. package/components/Attachment/index.js +1 -1
  82. package/components/BICOffsetPickerDialog/index.js +1 -1
  83. package/components/Casing/CasingTableV2/components/CasingJoints/Editor.js +1 -1
  84. package/components/Casing/CasingTableV2/components/Component.js +1 -1
  85. package/components/Casing/CasingTableV2/components/DrillPipe/Editor.js +1 -1
  86. package/components/CollapsableSidebar.js +1 -1
  87. package/components/DevCenter/AppHeader/AppHeader.js +1 -1
  88. package/components/DevCenter/AppsDataProvider/effects/utils.js +1 -1
  89. package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js +1 -1
  90. package/components/DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js +1 -1
  91. package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js +1 -1
  92. package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/RemoveAppButton.js +1 -1
  93. package/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js +1 -1
  94. package/components/DevCenter/DevCenterAppContainer/effects/useAnnotationsData.js +1 -1
  95. package/components/DevCenter/DevCenterAppContainer/effects/useAppMaximized.js +1 -1
  96. package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterAppZoidComponent.js +1 -1
  97. package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js +1 -1
  98. package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js +1 -1
  99. package/components/DocumentViewer/DocumentViewer.js +1 -1
  100. package/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js +1 -1
  101. package/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js +1 -1
  102. package/components/Drillstring/BHAComponentsTable/components/Component.js +1 -1
  103. package/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js +1 -1
  104. package/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js +1 -1
  105. package/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js +1 -1
  106. package/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js +1 -1
  107. package/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js +1 -1
  108. package/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js +1 -1
  109. package/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js +1 -1
  110. package/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js +1 -1
  111. package/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js +1 -1
  112. package/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js +1 -1
  113. package/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js +1 -1
  114. package/components/EmptyState/EmptyState.js +1 -1
  115. package/components/OffsetWellPickerV2/components/Filter/SidetrackSwitch.js +1 -1
  116. package/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js +1 -1
  117. package/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js +1 -1
  118. package/components/OffsetWellPickerV2/effects/index.js +1 -1
  119. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Filter/SidetrackSwitch.js +1 -1
  120. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js +1 -1
  121. package/components/OffsetWellPickerV3/components/CustomSelectionView/effects/index.js +1 -1
  122. package/components/OffsetWellPickerV3/components/CustomSelectionView/index.js +1 -1
  123. package/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js +1 -1
  124. package/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js +1 -1
  125. package/components/OffsetWellPickerV3/components/TabSelection/index.js +1 -1
  126. package/components/OffsetWellPickerV3/components/WellHubView/index.js +1 -1
  127. package/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js +1 -1
  128. package/components/OffsetWellPickerV4/OffsetWellPickerV4.js +1 -1
  129. package/components/OffsetWellPickerV4/components/Filter/Filter.js +1 -1
  130. package/components/OffsetWellPickerV4/components/OffsetWellsTable/AdvancedSearch/AutoCompleteAssetSearch.js +1 -1
  131. package/components/OffsetWellPickerV4/components/OffsetWellsTable/MetricsSettingMenu.js +1 -1
  132. package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.js +1 -1
  133. package/components/OffsetWellPickerV4/components/Toolbar/Toolbar.js +1 -1
  134. package/components/OffsetWellPickerV4/effects/useCompanyMetricKey.js +1 -1
  135. package/components/PadModeSelect/__tests__/PadModeSelect.test.d.ts +2 -0
  136. package/components/PadModeSelect/__tests__/PadModeSelect.test.d.ts.map +1 -0
  137. package/components/RealTimeValuesSidebar/RealTimeValuesBox/RealTimeBoxList.js +1 -1
  138. package/components/StatusBadge/api.d.ts +1 -1
  139. package/components/StatusBadge/api.d.ts.map +1 -1
  140. package/components/StatusBadge/api.js +1 -0
  141. package/components/StatusBadge/constants.js +1 -1
  142. package/components/StatusBadge/utils.js +1 -1
  143. package/components/SwitchControl/__tests__/SwitchControl.test.d.ts +2 -0
  144. package/components/SwitchControl/__tests__/SwitchControl.test.d.ts.map +1 -0
  145. package/components/TextLink/index.js +1 -1
  146. package/components/WellSummary/ActivitySummaryChart.d.ts +5 -1
  147. package/components/WellSummary/ActivitySummaryChart.d.ts.map +1 -1
  148. package/components/WellSummary/ActivitySummaryChart.js +1 -1
  149. package/components/WellSummary/WellSummaryItemValue.js +1 -1
  150. package/components/WellSummary/effects/useWellSummaryData.js +1 -1
  151. package/constants/corvaCompanyId.d.ts +2 -0
  152. package/constants/corvaCompanyId.d.ts.map +1 -0
  153. package/constants/corvaCompanyId.js +1 -0
  154. package/constants/index.d.ts +2 -1
  155. package/constants/index.js +1 -1
  156. package/effects/index.d.ts +2 -1
  157. package/effects/index.js +1 -1
  158. package/effects/useWellnessAlerts.d.ts.map +1 -0
  159. package/effects/useWellnessAlerts.js +1 -0
  160. package/package.json +1 -1
  161. package/permissions/constants/index.d.ts +1 -0
  162. package/permissions/constants/index.d.ts.map +1 -1
  163. package/permissions/constants/index.js +1 -1
  164. package/utils/__tests__/completion.test.d.ts +2 -0
  165. package/utils/__tests__/completion.test.d.ts.map +1 -0
  166. package/utils/devcenter.js +1 -1
  167. package/utils/env.d.ts +2 -0
  168. package/utils/env.d.ts.map +1 -1
  169. package/utils/env.js +1 -1
  170. package/utils/index.d.ts +1 -1
  171. package/utils/index.d.ts.map +1 -1
  172. package/utils/index.js +1 -1
  173. package/cjs-bundle/utils/sqlParser.js +0 -1
  174. package/components/StatusBadge/useWellnessAlerts.d.ts.map +0 -1
  175. package/utils/sqlParser.d.ts +0 -1
  176. package/utils/sqlParser.d.ts.map +0 -1
  177. package/utils/sqlParser.js +0 -1
  178. package/utils/withPageLogger.d.ts +0 -1
  179. package/utils/withPageLogger.d.ts.map +0 -1
  180. /package/{components/StatusBadge → effects}/useWellnessAlerts.d.ts +0 -0
@@ -1 +1 @@
1
- "use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/slicedToArray"),i=require("prop-types"),r=require("react"),a=require("classnames"),n=require("@material-ui/core"),o=require("lodash"),s=require("../Typography.js"),c=require("./utils.js"),l=require("react/jsx-runtime");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=u(e),p=u(t),h=u(i),f=u(a),g=n.makeStyles((function(e){return{root:{width:"228px",height:"228px",borderRadius:"50%",padding:"6px",position:"relative",background:"url(".concat("/static/media/9bda514bfc837939d0b6f7d8dbe94d03.svg",")"),backgroundRepeat:"no-repeat"},backgroundRoot:{width:"100%",height:"100%",borderRadius:"50%",border:"2px solid #616161",padding:"2px",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",background:"url(".concat("/static/media/49092309a3fda5ecf77311bd794ac103.svg",")")},emptyStateBackground:{background:"radial-gradient(50% 50% at 50% 50%, rgba(100, 181, 246, 0) 54.4%, rgba(100, 181, 246, 0.01) 76.49%, rgba(100, 181, 246, 0.06) 100%)"},dropShadowRoot:{width:"100%",height:"100%",borderRadius:"50%",filter:"blur(36px)",border:"2px solid #64B5F6",display:"flex",alignItems:"center",justifyContent:"center"},content:function(e){return{position:"absolute",width:"100%",height:"100%",display:"flex",alignItems:"center",flexDirection:"column",left:0,top:e.activitiesLength?40:57}},lastActivityRoot:{width:"90px",height:"90px",background:"#3B3B3B",boxShadow:"0px 2px 2px rgba(0, 0, 0, 0.1), inset 0px 1px 1px rgba(255, 255, 255, 0.05)",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",margin:"8px 0"},activityDuration:{marginTop:"9px",color:e.palette.primary.text1,fontSize:"36px",lineHeight:"24px",fontWeight:300,letterSpacing:"0.4px"},durationUnit:{fontSize:"12px",lineHeight:"24px",fontWeight:500,letterSpacing:"0.4px"},activityTimeRange:{fontSize:"10px",textTransform:"uppercase",color:"#9E9E9E",lineHeight:"24px",fontWeight:500,letterSpacing:"1px"},activityName:{width:"106px",textAlign:"center",fontSize:"12px",lineHeight:"14px",fontWeight:500,letterSpacing:"0.4px",color:e.palette.primary.text1},noOperationsRoot:{width:90,height:90},noOperationsText:{marginTop:24,color:"#9E9E9E"},chart:{position:"absolute",left:2,top:2,width:"100%",height:"100%",padding:"12px"},canvas:{width:"100%",height:"100%"},activities:{position:"absolute",left:12,top:12}}}));function x(e){var t=e.currentActivityName,i=e.activities,a=e.showTooltip,u=g({activitiesLength:i.length}),h=r.useRef(null),x=r.useRef([]),m=r.useState(null),v=p.default(m,2),y=v[0],b=v[1],j=r.useMemo((function(){return i.filter((function(e){return e.duration}))}),[i]),w=r.useMemo((function(){return o.sumBy(i,"duration")}),[i]),R=r.useMemo((function(){return null===y?i.find((function(e){return e.name===t})):j[y]}),[i,t,j,y]),N=function(e){var t=!1;x.current.forEach((function(i,r){var a=i.current;if(a&&!t){var n=a.getContext("2d");(t=n.isPointInPath(e.offsetX,e.offsetY))&&b(r)}})),t||b(null)},S=function(){b(null)};return r.useEffect((function(){var e=h.current,i=e.getContext("2d");e.width=200,e.height=200,e.style.width="".concat(200,"px"),e.style.height="".concat(200,"px");var n=j.length;x.current.length!==n&&(x.current=Array(n).fill().map((function(e,t){return x.current[t]||r.createRef()})));var o=0;j.forEach((function(e,r){var n=o,s=n+e.duration/w*Math.PI*2;(null===y&&e.name===t||r===y)&&c.drawRadicalGradient(i,100,100,100,n,s);var l=x.current[r].current;if(l){l.width=200,l.height=200,l.style.width="".concat(200,"px"),l.style.height="".concat(200,"px"),a&&(l.onmousemove=N,l.onmouseleave=S);var u=l.getContext("2d");c.drawDonutSlice(u,100,100,100,n,s,e.color||"#000000",!0)}else c.drawDonutSlice(i,100,100,100,n,s,e.color||"#000000",!0);o=s}))})),l.jsxs("div",{className:u.root,children:[l.jsx("div",{className:f.default(u.backgroundRoot,d.default({},u.emptyStateBackground,!i.length)),children:l.jsx("div",{className:u.dropShadowRoot})}),l.jsxs("div",{className:u.content,children:[l.jsx(n.Typography,{className:u.activityTimeRange,children:"Last 24hrs"}),i.length?l.jsxs(l.Fragment,{children:[l.jsx("div",{className:u.lastActivityRoot,children:R&&R.duration?l.jsxs(n.Typography,{className:u.activityDuration,children:[(R.duration/3600).toFixed(1),l.jsx("span",{className:u.durationUnit,children:" h"})]}):null}),l.jsx(n.Typography,{className:u.activityName,children:o.upperFirst((null==R?void 0:R.name)||"")})]}):l.jsx("div",{className:u.noOperationsRoot,children:l.jsx(s.Regular14,{className:u.noOperationsText,children:"No operations"})})]}),l.jsx(n.Tooltip,{title:null!==y?"".concat(j[y].name,": ").concat((j[y].duration/3600).toFixed(3),"h"):"",placement:"bottom",children:l.jsxs("div",{className:u.chart,children:[l.jsx("canvas",{ref:h,className:u.canvas}),j.map((function(e,t){return l.jsx("canvas",{ref:x.current[t],className:u.activities})}))]})})]})}x.propTypes={activities:h.default.arrayOf(h.default.shape({name:h.default.string,day:h.default.number,night:h.default.number})).isRequired,currentActivityName:h.default.string.isRequired,showTooltip:h.default.bool},x.defaultProps={showTooltip:!1},module.exports=x;
1
+ "use strict";var t=require("@babel/runtime/helpers/defineProperty"),e=require("@babel/runtime/helpers/slicedToArray"),i=require("prop-types"),r=require("react"),a=require("classnames"),n=require("@material-ui/core"),o=require("lodash"),l=require("../Typography.js"),s=require("./utils.js"),c=require("react/jsx-runtime");function u(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var d=u(t),p=u(e),h=u(i),f=u(a),g=n.makeStyles((function(t){return{root:{width:"228px",height:"228px",borderRadius:"50%",padding:"6px",position:"relative",background:"url(".concat("/static/media/9bda514bfc837939d0b6f7d8dbe94d03.svg",")"),backgroundRepeat:"no-repeat"},backgroundRoot:{width:"100%",height:"100%",borderRadius:"50%",border:"2px solid #616161",padding:"2px",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",background:"url(".concat("/static/media/49092309a3fda5ecf77311bd794ac103.svg",")")},emptyStateBackground:{background:"radial-gradient(50% 50% at 50% 50%, rgba(100, 181, 246, 0) 54.4%, rgba(100, 181, 246, 0.01) 76.49%, rgba(100, 181, 246, 0.06) 100%)"},dropShadowRoot:{width:"100%",height:"100%",borderRadius:"50%",filter:"blur(36px)",border:"2px solid #64B5F6",display:"flex",alignItems:"center",justifyContent:"center"},content:function(t){return{position:"absolute",width:"100%",height:"100%",display:"flex",alignItems:"center",flexDirection:"column",left:0,top:t.activitiesLength?40:57}},lastActivityRoot:{width:"90px",height:"90px",background:"#3B3B3B",boxShadow:"0px 2px 2px rgba(0, 0, 0, 0.1), inset 0px 1px 1px rgba(255, 255, 255, 0.05)",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",margin:"8px 0"},activityDuration:{marginTop:"9px",color:t.palette.primary.text1,fontSize:"36px",lineHeight:"24px",fontWeight:300,letterSpacing:"0.4px"},durationUnit:{fontSize:"12px",lineHeight:"24px",fontWeight:500,letterSpacing:"0.4px"},activityTimeRange:{fontSize:"10px",textTransform:"uppercase",color:"#9E9E9E",lineHeight:"24px",fontWeight:500,letterSpacing:"1px"},activityName:{width:"106px",textAlign:"center",fontSize:"12px",lineHeight:"14px",fontWeight:500,letterSpacing:"0.4px",color:t.palette.primary.text1},noOperationsRoot:{width:90,height:90},noOperationsText:{marginTop:24,color:"#9E9E9E"},chart:{position:"absolute",left:2,top:2,width:"100%",height:"100%",padding:"12px"},canvas:{width:"100%",height:"100%"},activities:{position:"absolute",left:12,top:12}}}));function x(t){var e=t.title,i=t.currentActivityName,a=t.activities,u=t.showTooltip,h=g({activitiesLength:a.length}),x=r.useRef(null),m=r.useRef([]),v=r.useState(null),y=p.default(v,2),b=y[0],j=y[1],w=r.useMemo((function(){return a.filter((function(t){return t.duration}))}),[a]),R=r.useMemo((function(){return o.sumBy(a,"duration")}),[a]),N=r.useMemo((function(){return null===b?a.find((function(t){return t.name===i})):w[b]}),[a,i,w,b]),S=function(t){var e=!1;m.current.forEach((function(i,r){var a=i.current;if(a&&!e){var n=a.getContext("2d");(e=n.isPointInPath(t.offsetX,t.offsetY))&&j(r)}})),e||j(null)},T=function(){j(null)};return r.useEffect((function(){var t=x.current,e=t.getContext("2d");t.width=200,t.height=200,t.style.width="".concat(200,"px"),t.style.height="".concat(200,"px");var a=w.length;m.current.length!==a&&(m.current=Array(a).fill().map((function(t,e){return m.current[e]||r.createRef()})));var n=0;w.forEach((function(t,r){var a=n,o=a+t.duration/R*Math.PI*2;(null===b&&t.name===i||r===b)&&s.drawRadicalGradient(e,100,100,100,a,o);var l=m.current[r].current;if(l){l.width=200,l.height=200,l.style.width="".concat(200,"px"),l.style.height="".concat(200,"px"),u&&(l.onmousemove=S,l.onmouseleave=T);var c=l.getContext("2d");s.drawDonutSlice(c,100,100,100,a,o,t.color||"#000000",!0)}else s.drawDonutSlice(e,100,100,100,a,o,t.color||"#000000",!0);n=o}))})),c.jsxs("div",{className:h.root,children:[c.jsx("div",{className:f.default(h.backgroundRoot,d.default({},h.emptyStateBackground,!a.length)),children:c.jsx("div",{className:h.dropShadowRoot})}),c.jsxs("div",{className:h.content,children:[c.jsx(n.Typography,{className:h.activityTimeRange,children:e}),a.length?c.jsxs(c.Fragment,{children:[c.jsx("div",{className:h.lastActivityRoot,children:N&&N.duration?c.jsxs(n.Typography,{className:h.activityDuration,children:[(N.duration/3600).toFixed(1),c.jsx("span",{className:h.durationUnit,children:" h"})]}):null}),c.jsx(n.Typography,{className:h.activityName,children:o.upperFirst((null==N?void 0:N.name)||"")})]}):c.jsx("div",{className:h.noOperationsRoot,children:c.jsx(l.Regular14,{className:h.noOperationsText,children:"No operations"})})]}),c.jsx(n.Tooltip,{title:null!==b?"".concat(w[b].name,": ").concat((w[b].duration/3600).toFixed(3),"h"):"",placement:"bottom",children:c.jsxs("div",{className:h.chart,children:[c.jsx("canvas",{ref:x,className:h.canvas}),w.map((function(t,e){return c.jsx("canvas",{ref:m.current[e],className:h.activities})}))]})})]})}x.propTypes={title:h.default.string,activities:h.default.arrayOf(h.default.shape({name:h.default.string,day:h.default.number,night:h.default.number})).isRequired,currentActivityName:h.default.string.isRequired,showTooltip:h.default.bool},x.defaultProps={title:"Last 24hrs",showTooltip:!1},module.exports=x;
@@ -1 +1 @@
1
- "use strict";var e=require("@babel/runtime/helpers/defineProperty"),a=require("prop-types"),t=require("@material-ui/core"),r=require("lodash"),s=require("moment"),i=require("classnames");require("../../constants/goals.js"),require("../../constants/segment.js"),require("../../constants/alerts.js"),require("../../constants/apps.js"),require("../../constants/drillstring.js"),require("../../constants/completion.js"),require("../../constants/notifications.js"),require("../../constants/feed.js"),require("../../constants/bha.js");var n=require("../../constants/wellSummary.js");require("../GradientManager/configuration/constants.js");var l=require("../Drillstring/BHASchematic.js");require("../Drillstring/BHATable/index.js"),require("../Drillstring/BHAComponentIcon.js"),require("../Drillstring/BHAComponentDetail/index.js"),require("../Drillstring/BHATileIcon.js"),require("../Drillstring/BHATile/BHATile.js"),require("../Drillstring/BHAList/BHAList.js"),require("../Drillstring/BHAComponentsTable/BHAComponentsTable.js"),require("../../utils/drillstring/conversion.js");var c=require("../../utils/drillstring/schematic.js"),o=require("../../utils/convert.js"),d=require("../../utils/main.js"),u=require("../../utils/formatting.js"),p=require("react/jsx-runtime");function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var m=h(e),g=h(a),L=h(s),y=h(i),f="/static/media/6684df900ff63f28b07f9c505fb7a66e.svg",N=t.makeStyles({value:{fontSize:"14px",fontWeight:500},valueSuffix:{color:"#9E9E9E"},hasLeftMargin:{marginLeft:4},bhaRoot:{display:"flex",alignItems:"center"},bhaIdRoot:{backgroundColor:"#2196F3",borderRadius:"50%",marginRight:"8px",display:"flex",alignItems:"center",justifyContent:"center"},realBhaRoot:{width:"16px",height:"16px"},bhaIdLabel:{fontWeight:500,fontSize:"12px"},dummyBhaIdLabel:{paddingLeft:"4px",paddingRight:"4px"},bhaActiveIndicator:{fontSize:"12px",padding:"4px",fontWeight:500},nptRoot:{display:"flex",alignItems:"center"},rectIndicator:{width:"8px",height:"8px",backgroundColor:"#D32F2F",borderRadius:"2px",marginRight:"8px"},stageActual:{fontSize:"16px"},stagePercent:{color:"#9E9E9E",marginLeft:"4px"},fluidProppantType:{color:"#9E9E9E"},valueWrapper:{display:"flex",alignItems:"center"},rightImg:{marginRight:"4px"},centerImg:{marginLeft:"4px",marginRight:"4px"},rotate:{transform:"rotate(180deg)"},profileRoot:{display:"flex",alignItems:"flex-start"},profile:{width:"20px",height:"20px",borderRadius:"50%",fontSize:"10px",display:"flex",alignItems:"center",justifyContent:"center",marginRight:"8px",backgroundSize:"20px 20px",backgroundRepeat:"no-repeat",backgroundPosition:"center"},plugsIcon:{marginLeft:-8}});function x(e){var a=e.item,s=e.summaryData,i=N();if(!s)return null;if(a.key===n.DRILLING_WELL_SUMMARY.HOLE_DEPTH.key){var h=a.dataGetter(s).holeDepth;return Number.isFinite(h)?p.jsxs("div",{className:i.valueWrapper,children:[p.jsx("img",{src:f,alt:"hole_depth",className:i.centerImg}),p.jsxs("span",{className:y.default(i.value,i.hasLeftMargin),children:[Math.floor(h),"’"]})]}):"-"}if(a.key===n.DRILLING_WELL_SUMMARY.BIT_HOLE_DEPTH.key){var g=a.dataGetter(s),x=g.bitDepth,v=g.holeDepth;return[x,v].every(Number.isFinite)?p.jsxs("div",{className:i.valueWrapper,children:[p.jsx("img",{src:"/static/media/fa2667bad3591deb178e99b521571578.svg",alt:"bit_depth",className:i.rightImg}),p.jsxs("span",{className:i.value,children:[Math.floor(x),"’ / "]}),p.jsx("img",{src:f,alt:"hole_depth",className:i.centerImg}),p.jsxs("span",{className:i.value,children:[Math.floor(v),"’"]})]}):"-"}if(a.key===n.DRILLING_WELL_SUMMARY.DIVERGENCE.key){var I=a.dataGetter(s),M=I.distance,R=I.ahead,j=I.right;return[M,R,j].every(Number.isFinite)?p.jsxs("div",{className:i.valueWrapper,children:[p.jsx("span",{className:i.value,children:"".concat(o.convertValue(M,"length","ft")," ").concat(o.getUnitDisplay("length"))}),p.jsx("img",{src:"/static/media/53cecdbd86f03352bda956fca25b537d.svg",alt:"up_arrow",className:y.default(i.centerImg,m.default({},i.rotate,R<0))}),p.jsx("span",{className:i.value,children:"".concat(Math.abs(o.convertValue(R,"length","ft"))," ").concat(o.getUnitDisplay("length")," ").concat(R>0?"Ahead":"Behind")}),p.jsx("img",{src:"/static/media/d32edb0ff9a69145d2c7917855263251.svg",alt:"left_arrow",className:y.default(i.centerImg,m.default({},i.rotate,j>0))}),p.jsx("span",{className:i.value,children:"".concat(Math.abs(o.convertValue(j,"length","ft"))," ").concat(o.getUnitDisplay("length")," ").concat(j>0?"Right":"Left")})]}):"-"}if(a.key===n.DRILLING_WELL_SUMMARY.LAST_ACTIVE.key||a.key===n.COMPLETION_WELL_SUMMARY.LAST_ACTIVE.key){var _=a.dataGetter(s).timestamp;return p.jsx(t.Typography,{className:i.value,children:_?L.default.unix(_).format("MM/DD/YYYY HH:mm"):"-"})}if(a.key===n.DRILLING_WELL_SUMMARY.CURRENT_ACTIVITY.key||a.key===n.COMPLETION_WELL_SUMMARY.CURRENT_ACTIVITY.key){var E=a.dataGetter(s).activityName;return p.jsx(t.Typography,{className:i.value,children:u.orDash(r.upperFirst(E||"-"))})}if(a.key===n.DRILLING_WELL_SUMMARY.PHASE.key){var T=a.dataGetter(s).phaseName;return p.jsx(t.Typography,{className:i.value,children:u.orDash(T)})}if(a.key===n.DRILLING_WELL_SUMMARY.HOLE_SECTION.key){var A=a.dataGetter(s).sectionName;return p.jsx(t.Typography,{className:i.value,children:u.orDash(A)})}if([n.DRILLING_WELL_SUMMARY.MUD.key,n.DRILLOUT_WELL_SUMMARY.MUD.key].includes(a.key)){var k=a.dataGetter(s),S=k.mudType,D=k.mudDensity;return p.jsx(t.Typography,{className:i.value,children:S||D?p.jsxs(p.Fragment,{children:[S&&"".concat(S,", "),D&&"".concat(o.convertValue(D,"density","ppg")," ").concat(o.getUnitDisplay("density"))]}):"-"})}if(a.key===n.DRILLING_WELL_SUMMARY.NPT.key||a.key===n.COMPLETION_WELL_SUMMARY.NPT.key){var b=a.dataGetter(s),U=b.nptType,G=b.startTime,O=b.endTime;return U&&G&&O?p.jsxs("div",{className:i.nptRoot,children:[p.jsx("div",{className:i.rectIndicator}),p.jsxs(t.Typography,{className:i.value,children:[r.upperFirst(U),": ",((O-G)/3600).fixFloat(1)," hr"]})]}):"-"}if(a.key===n.DRILLING_WELL_SUMMARY.OPERATIONS_SUMMARY.key||a.key===n.COMPLETION_WELL_SUMMARY.OPERATIONS_SUMMARY.key){var Y=a.dataGetter(s),W=Y.dateTime,q=Y.summary;return p.jsxs(t.Typography,{className:i.value,children:[W?L.default.unix(W).format("MM/DD/YYYY HH:mm"):"-",p.jsx("br",{}),q]})}if(a.key===n.COMPLETION_WELL_SUMMARY.STAGE.key){var C=a.dataGetter(s),P=C.planned,H=C.actual;return H&&P?p.jsxs(t.Typography,{className:i.value,children:[p.jsx("span",{className:i.stageActual,children:H}),p.jsx("span",{children:"/"}),p.jsx("span",{children:P}),p.jsxs("span",{className:i.stagePercent,children:["Stg ",Math.floor(H/P*100)," %"]})]}):"-"}if(a.key===n.COMPLETION_WELL_SUMMARY.FLUIDS.key){var B=a.dataGetter(s).fluids;return p.jsx("div",{children:0===B.length?"-":B.map((function(e){var a=e.type,r=e.amount,s=e.unit;return p.jsxs(t.Typography,{className:i.value,children:[p.jsxs("span",{className:i.fluidProppantType,children:[a," - "]}),p.jsx("span",{children:"".concat(o.convertValue(r,"oil",s)," ").concat(o.getUnitDisplay("oil"))})]},"".concat(a,"_").concat(r))}))})}if(a.key===n.COMPLETION_WELL_SUMMARY.PROPPANTS.key){var F=a.dataGetter(s).proppants;return p.jsx("div",{children:0===F.length?"-":F.map((function(e){var a=e.type,r=e.amount,s=e.unit;return p.jsxs(t.Typography,{className:i.value,children:[p.jsxs("span",{className:i.fluidProppantType,children:[a," - "]}),p.jsx("span",{children:"".concat(o.convertValue(r,"mass",s)," ").concat(o.getUnitDisplay("mass"))})]},"".concat(a,"_").concat(r))}))})}if(a.key===n.DRILLING_WELL_SUMMARY.ALERT.key||a.key===n.COMPLETION_WELL_SUMMARY.ALERT.key){var V=a.dataGetter(s).decisionPath;return p.jsx(t.Typography,{className:i.value,children:u.orDash(V)})}if(a.key===n.DRILLING_WELL_SUMMARY.ANNOTATION.key||a.key===n.COMPLETION_WELL_SUMMARY.ANNOTATION.key){var w=a.dataGetter(s),z=w.firstName,J=w.lastName,K=w.profilePhoto,Q=w.content,X="".concat(z," ").concat(J),Z="".concat((z||"").charAt(0)).concat((J||"").charAt(0));return Q?p.jsxs("div",{className:i.profileRoot,children:[p.jsx("div",{className:i.profile,style:{backgroundColor:"#".concat(d.getColorFromString(X)),backgroundImage:"url(".concat(K,")")},children:K?null:Z}),p.jsx(t.Typography,{className:i.value,children:Q})]}):"-"}if([n.DRILLING_WELL_SUMMARY.BHA.key,n.DRILLOUT_WELL_SUMMARY.BHA.key].includes(a.key)){var $=n.DRILLOUT_WELL_SUMMARY.BHA.key===a.key,ee=a.dataGetter(s),ae=ee.bhaId,te=ee.components,re=ae&&String(ae)||"-",se=ae&&c.getBHASchematic(te||[],$)||[];return p.jsxs("div",{className:i.bhaRoot,children:[p.jsx("div",{className:y.default(i.bhaIdRoot,m.default({},i.realBhaRoot,!re.includes("."))),children:p.jsx(t.Typography,{className:y.default(i.bhaIdLabel,m.default({},i.dummyBhaIdLabel,re.includes("."))),children:re})}),p.jsx(l,{schematic:se,containerHeight:20,containerWidth:120})]})}if(a.key===n.DRILLING_WELL_SUMMARY.CASING.key){var ie=a.dataGetter(s).outerDiameter;return ie?p.jsx(t.Typography,{className:i.value,children:"".concat(o.convertValue(ie,"shortLength")," ").concat(o.getUnitDisplay("shortLength"))}):null}if(a.key===n.DRILLING_WELL_SUMMARY.BHA_COUNT.key){var ne=a.dataGetter(s).count;return p.jsx(t.Typography,{className:i.value,children:u.orDash(ne)})}if(a.key===n.COMPLETION_WELL_SUMMARY.STAGES_DESIGN.key){var le=a.dataGetter(s).totalNumberOfStages;return Number.isFinite(le)?p.jsxs(t.Typography,{className:i.value,children:["-/",le," ",p.jsx("span",{className:i.valueSuffix,children:"Stg"})]}):"-"}if(a.key===n.COMPLETION_WELL_SUMMARY.PLUGS_DRILLED_COUNT.key){var ce=a.dataGetter(s).plugsDrilledCount;return Number.isFinite(ce)?p.jsxs("div",{className:i.valueWrapper,children:[p.jsx("img",{src:"/static/media/b0c8b3ba66c35ef3128cc93c5c538060.svg",alt:"drillout",className:i.plugsIcon}),p.jsx("span",{className:y.default(i.value,i.hasLeftMargin),children:ce})]}):"-"}if("development"===process.env.NODE_ENV)throw new Error("".concat(a.key," wasn't handled in WellSummaryItemValue. Returning null"));return null}x.propTypes={item:g.default.shape({key:g.default.string,label:g.default.string,icon:g.default.node,dataGetter:g.default.func}).isRequired,summaryData:g.default.shape({}).isRequired},module.exports=x;
1
+ "use strict";var e=require("@babel/runtime/helpers/defineProperty"),a=require("prop-types"),t=require("@material-ui/core"),r=require("lodash"),s=require("moment"),i=require("classnames");require("../../constants/goals.js"),require("../../constants/segment.js"),require("../../constants/alerts.js"),require("../../constants/apps.js"),require("../../constants/drillstring.js"),require("../../constants/completion.js"),require("../../constants/notifications.js"),require("../../constants/feed.js"),require("../../constants/bha.js"),require("../../utils/env.js");var n=require("../../constants/wellSummary.js");require("../GradientManager/configuration/constants.js");var l=require("../Drillstring/BHASchematic.js");require("../Drillstring/BHATable/index.js"),require("../Drillstring/BHAComponentIcon.js"),require("../Drillstring/BHAComponentDetail/index.js"),require("../Drillstring/BHATileIcon.js"),require("../Drillstring/BHATile/BHATile.js"),require("../Drillstring/BHAList/BHAList.js"),require("../Drillstring/BHAComponentsTable/BHAComponentsTable.js"),require("../../utils/drillstring/conversion.js");var c=require("../../utils/drillstring/schematic.js"),o=require("../../utils/convert.js"),u=require("../../utils/main.js"),d=require("../../utils/formatting.js"),p=require("react/jsx-runtime");function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var m=h(e),g=h(a),L=h(s),y=h(i),f="/static/media/6684df900ff63f28b07f9c505fb7a66e.svg",N=t.makeStyles({value:{fontSize:"14px",fontWeight:500},valueSuffix:{color:"#9E9E9E"},hasLeftMargin:{marginLeft:4},bhaRoot:{display:"flex",alignItems:"center"},bhaIdRoot:{backgroundColor:"#2196F3",borderRadius:"50%",marginRight:"8px",display:"flex",alignItems:"center",justifyContent:"center"},realBhaRoot:{width:"16px",height:"16px"},bhaIdLabel:{fontWeight:500,fontSize:"12px"},dummyBhaIdLabel:{paddingLeft:"4px",paddingRight:"4px"},bhaActiveIndicator:{fontSize:"12px",padding:"4px",fontWeight:500},nptRoot:{display:"flex",alignItems:"center"},rectIndicator:{width:"8px",height:"8px",backgroundColor:"#D32F2F",borderRadius:"2px",marginRight:"8px"},stageActual:{fontSize:"16px"},stagePercent:{color:"#9E9E9E",marginLeft:"4px"},fluidProppantType:{color:"#9E9E9E"},valueWrapper:{display:"flex",alignItems:"center"},rightImg:{marginRight:"4px"},centerImg:{marginLeft:"4px",marginRight:"4px"},rotate:{transform:"rotate(180deg)"},profileRoot:{display:"flex",alignItems:"flex-start"},profile:{width:"20px",height:"20px",borderRadius:"50%",fontSize:"10px",display:"flex",alignItems:"center",justifyContent:"center",marginRight:"8px",backgroundSize:"20px 20px",backgroundRepeat:"no-repeat",backgroundPosition:"center"},plugsIcon:{marginLeft:-8}});function x(e){var a=e.item,s=e.summaryData,i=N();if(!s)return null;if(a.key===n.DRILLING_WELL_SUMMARY.HOLE_DEPTH.key){var h=a.dataGetter(s).holeDepth;return Number.isFinite(h)?p.jsxs("div",{className:i.valueWrapper,children:[p.jsx("img",{src:f,alt:"hole_depth",className:i.centerImg}),p.jsxs("span",{className:y.default(i.value,i.hasLeftMargin),children:[Math.floor(h),"’"]})]}):"-"}if(a.key===n.DRILLING_WELL_SUMMARY.BIT_HOLE_DEPTH.key){var g=a.dataGetter(s),x=g.bitDepth,v=g.holeDepth;return[x,v].every(Number.isFinite)?p.jsxs("div",{className:i.valueWrapper,children:[p.jsx("img",{src:"/static/media/fa2667bad3591deb178e99b521571578.svg",alt:"bit_depth",className:i.rightImg}),p.jsxs("span",{className:i.value,children:[Math.floor(x),"’ / "]}),p.jsx("img",{src:f,alt:"hole_depth",className:i.centerImg}),p.jsxs("span",{className:i.value,children:[Math.floor(v),"’"]})]}):"-"}if(a.key===n.DRILLING_WELL_SUMMARY.DIVERGENCE.key){var I=a.dataGetter(s),M=I.distance,R=I.ahead,j=I.right;return[M,R,j].every(Number.isFinite)?p.jsxs("div",{className:i.valueWrapper,children:[p.jsx("span",{className:i.value,children:"".concat(o.convertValue(M,"length","ft")," ").concat(o.getUnitDisplay("length"))}),p.jsx("img",{src:"/static/media/53cecdbd86f03352bda956fca25b537d.svg",alt:"up_arrow",className:y.default(i.centerImg,m.default({},i.rotate,R<0))}),p.jsx("span",{className:i.value,children:"".concat(Math.abs(o.convertValue(R,"length","ft"))," ").concat(o.getUnitDisplay("length")," ").concat(R>0?"Ahead":"Behind")}),p.jsx("img",{src:"/static/media/d32edb0ff9a69145d2c7917855263251.svg",alt:"left_arrow",className:y.default(i.centerImg,m.default({},i.rotate,j>0))}),p.jsx("span",{className:i.value,children:"".concat(Math.abs(o.convertValue(j,"length","ft"))," ").concat(o.getUnitDisplay("length")," ").concat(j>0?"Right":"Left")})]}):"-"}if(a.key===n.DRILLING_WELL_SUMMARY.LAST_ACTIVE.key||a.key===n.COMPLETION_WELL_SUMMARY.LAST_ACTIVE.key){var _=a.dataGetter(s).timestamp;return p.jsx(t.Typography,{className:i.value,children:_?L.default.unix(_).format("MM/DD/YYYY HH:mm"):"-"})}if(a.key===n.DRILLING_WELL_SUMMARY.CURRENT_ACTIVITY.key||a.key===n.COMPLETION_WELL_SUMMARY.CURRENT_ACTIVITY.key){var E=a.dataGetter(s).activityName;return p.jsx(t.Typography,{className:i.value,children:d.orDash(r.upperFirst(E||"-"))})}if(a.key===n.DRILLING_WELL_SUMMARY.PHASE.key){var T=a.dataGetter(s).phaseName;return p.jsx(t.Typography,{className:i.value,children:d.orDash(T)})}if(a.key===n.DRILLING_WELL_SUMMARY.HOLE_SECTION.key){var A=a.dataGetter(s).sectionName;return p.jsx(t.Typography,{className:i.value,children:d.orDash(A)})}if([n.DRILLING_WELL_SUMMARY.MUD.key,n.DRILLOUT_WELL_SUMMARY.MUD.key].includes(a.key)){var k=a.dataGetter(s),S=k.mudType,D=k.mudDensity;return p.jsx(t.Typography,{className:i.value,children:S||D?p.jsxs(p.Fragment,{children:[S&&"".concat(S,", "),D&&"".concat(o.convertValue(D,"density","ppg")," ").concat(o.getUnitDisplay("density"))]}):"-"})}if(a.key===n.DRILLING_WELL_SUMMARY.NPT.key||a.key===n.COMPLETION_WELL_SUMMARY.NPT.key){var b=a.dataGetter(s),U=b.nptType,G=b.startTime,O=b.endTime;return U&&G&&O?p.jsxs("div",{className:i.nptRoot,children:[p.jsx("div",{className:i.rectIndicator}),p.jsxs(t.Typography,{className:i.value,children:[r.upperFirst(U),": ",((O-G)/3600).fixFloat(1)," hr"]})]}):"-"}if(a.key===n.DRILLING_WELL_SUMMARY.OPERATIONS_SUMMARY.key||a.key===n.COMPLETION_WELL_SUMMARY.OPERATIONS_SUMMARY.key){var Y=a.dataGetter(s),W=Y.dateTime,q=Y.summary;return p.jsxs(t.Typography,{className:i.value,children:[W?L.default.unix(W).format("MM/DD/YYYY HH:mm"):"-",p.jsx("br",{}),q]})}if(a.key===n.COMPLETION_WELL_SUMMARY.STAGE.key){var C=a.dataGetter(s),P=C.planned,H=C.actual;return H&&P?p.jsxs(t.Typography,{className:i.value,children:[p.jsx("span",{className:i.stageActual,children:H}),p.jsx("span",{children:"/"}),p.jsx("span",{children:P}),p.jsxs("span",{className:i.stagePercent,children:["Stg ",Math.floor(H/P*100)," %"]})]}):"-"}if(a.key===n.COMPLETION_WELL_SUMMARY.FLUIDS.key){var B=a.dataGetter(s).fluids;return p.jsx("div",{children:0===B.length?"-":B.map((function(e){var a=e.type,r=e.amount,s=e.unit;return p.jsxs(t.Typography,{className:i.value,children:[p.jsxs("span",{className:i.fluidProppantType,children:[a," - "]}),p.jsx("span",{children:"".concat(o.convertValue(r,"oil",s)," ").concat(o.getUnitDisplay("oil"))})]},"".concat(a,"_").concat(r))}))})}if(a.key===n.COMPLETION_WELL_SUMMARY.PROPPANTS.key){var F=a.dataGetter(s).proppants;return p.jsx("div",{children:0===F.length?"-":F.map((function(e){var a=e.type,r=e.amount,s=e.unit;return p.jsxs(t.Typography,{className:i.value,children:[p.jsxs("span",{className:i.fluidProppantType,children:[a," - "]}),p.jsx("span",{children:"".concat(o.convertValue(r,"mass",s)," ").concat(o.getUnitDisplay("mass"))})]},"".concat(a,"_").concat(r))}))})}if(a.key===n.DRILLING_WELL_SUMMARY.ALERT.key||a.key===n.COMPLETION_WELL_SUMMARY.ALERT.key){var V=a.dataGetter(s).decisionPath;return p.jsx(t.Typography,{className:i.value,children:d.orDash(V)})}if(a.key===n.DRILLING_WELL_SUMMARY.ANNOTATION.key||a.key===n.COMPLETION_WELL_SUMMARY.ANNOTATION.key){var w=a.dataGetter(s),z=w.firstName,J=w.lastName,K=w.profilePhoto,Q=w.content,X="".concat(z," ").concat(J),Z="".concat((z||"").charAt(0)).concat((J||"").charAt(0));return Q?p.jsxs("div",{className:i.profileRoot,children:[p.jsx("div",{className:i.profile,style:{backgroundColor:"#".concat(u.getColorFromString(X)),backgroundImage:"url(".concat(K,")")},children:K?null:Z}),p.jsx(t.Typography,{className:i.value,children:Q})]}):"-"}if([n.DRILLING_WELL_SUMMARY.BHA.key,n.DRILLOUT_WELL_SUMMARY.BHA.key].includes(a.key)){var $=n.DRILLOUT_WELL_SUMMARY.BHA.key===a.key,ee=a.dataGetter(s),ae=ee.bhaId,te=ee.components,re=ae&&String(ae)||"-",se=ae&&c.getBHASchematic(te||[],$)||[];return p.jsxs("div",{className:i.bhaRoot,children:[p.jsx("div",{className:y.default(i.bhaIdRoot,m.default({},i.realBhaRoot,!re.includes("."))),children:p.jsx(t.Typography,{className:y.default(i.bhaIdLabel,m.default({},i.dummyBhaIdLabel,re.includes("."))),children:re})}),p.jsx(l,{schematic:se,containerHeight:20,containerWidth:120})]})}if(a.key===n.DRILLING_WELL_SUMMARY.CASING.key){var ie=a.dataGetter(s).outerDiameter;return ie?p.jsx(t.Typography,{className:i.value,children:"".concat(o.convertValue(ie,"shortLength")," ").concat(o.getUnitDisplay("shortLength"))}):null}if(a.key===n.DRILLING_WELL_SUMMARY.BHA_COUNT.key){var ne=a.dataGetter(s).count;return p.jsx(t.Typography,{className:i.value,children:d.orDash(ne)})}if(a.key===n.COMPLETION_WELL_SUMMARY.STAGES_DESIGN.key){var le=a.dataGetter(s).totalNumberOfStages;return Number.isFinite(le)?p.jsxs(t.Typography,{className:i.value,children:["-/",le," ",p.jsx("span",{className:i.valueSuffix,children:"Stg"})]}):"-"}if(a.key===n.COMPLETION_WELL_SUMMARY.PLUGS_DRILLED_COUNT.key){var ce=a.dataGetter(s).plugsDrilledCount;return Number.isFinite(ce)?p.jsxs("div",{className:i.valueWrapper,children:[p.jsx("img",{src:"/static/media/b0c8b3ba66c35ef3128cc93c5c538060.svg",alt:"drillout",className:i.plugsIcon}),p.jsx("span",{className:y.default(i.value,i.hasLeftMargin),children:ce})]}):"-"}if("development"===process.env.NODE_ENV)throw new Error("".concat(a.key," wasn't handled in WellSummaryItemValue. Returning null"));return null}x.propTypes={item:g.default.shape({key:g.default.string,label:g.default.string,icon:g.default.node,dataGetter:g.default.func}).isRequired,summaryData:g.default.shape({}).isRequired},module.exports=x;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@babel/runtime/helpers/defineProperty"),e=require("@babel/runtime/helpers/slicedToArray"),r=require("@babel/runtime/helpers/asyncToGenerator"),n=require("@babel/runtime/regenerator"),a=require("react"),s=require("lodash"),u=require("../../../clients/jsonApi/index.js");require("../../../constants/goals.js"),require("../../../constants/segment.js"),require("../../../constants/alerts.js"),require("../../../constants/apps.js"),require("../../../constants/drillstring.js"),require("../../../constants/completion.js"),require("../../../constants/notifications.js"),require("../../../constants/feed.js"),require("../../../constants/bha.js");var i=require("../../../constants/wellSummary.js"),c=require("../../../constants/rigActivity.js");function o(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}require("../../GradientManager/configuration/constants.js");var l=o(t),p=o(e),f=o(r),d=o(n);function m(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function v(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?m(Object(r),!0).forEach((function(e){l.default(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function h(t){return g.apply(this,arguments)}function g(){return g=f.default(d.default.mark((function t(e){var r,n;return d.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all(e.map(function(){var t=f.default(d.default.mark((function t(e){var r;return d.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,u.getAppStorage("corva","activities.summary-continuous",e,{fields:["data.activities","data.start_timestamp","data.end_timestamp"].join(","),limit:1,query:"{timestamp#lte#".concat(Math.floor(Date.now()/1e3),"}"),sort:"{timestamp:-1}"});case 3:return r=t.sent,t.abrupt("return",(s.get(r,"0.data.activities")||[]).map((function(t){return v(v({},t),{},{duration:(t.day||0)+(t.night||0),color:c.RIG_ACTIVITY_COLORS[t.name]})})));case 7:t.prev=7,t.t0=t.catch(0),console.error(t.t0);case 10:return t.abrupt("return",[]);case 11:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(e){return t.apply(this,arguments)}}()));case 2:return r=t.sent,n={},r.forEach((function(t,r){n[e[r]]=t})),t.abrupt("return",n);case 6:case"end":return t.stop()}}),t)}))),g.apply(this,arguments)}function b(t,e,r,n){return y.apply(this,arguments)}function y(){return(y=f.default(d.default.mark((function t(e,r,n,a){var i,c;return d.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,u.getAppStorage("corva",r,e,{aggregate:JSON.stringify([{$match:{asset_id:e,timestamp:{$lte:n,$gte:n-86400}}},{$project:{_id:-1,stage_number:1,data:1,timestamp:1}},{$group:{_id:"$stage_number",timestamp:{$first:"$timestamp"},stage_number:{$last:"$stage_number"},first_data:{$first:"$data"},last_data:{$last:"$data"}}}])});case 3:return i=t.sent,c=0,s.sortBy(i,"timestamp").forEach((function(t,e){if(0===e){var r=s.omit(s.get(t,"first_data"),a),n=s.omit(s.get(t,"last_data"),a);Object.keys(n).forEach((function(t){c+=n[t]-(r[t]||0)}))}else{var u=s.omit(s.get(t,"last_data"),a);Object.keys(u).forEach((function(t){c+=u[t]}))}})),t.abrupt("return",c);case 9:t.prev=9,t.t0=t.catch(0),console.error(t.t0);case 12:return t.abrupt("return",0);case 13:case"end":return t.stop()}}),t,null,[[0,9]])})))).apply(this,arguments)}function j(t){return w.apply(this,arguments)}function w(){return w=f.default(d.default.mark((function t(e){var r,n;return d.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all(e.map(function(){var t=f.default(d.default.mark((function t(e){var r,n,a,i,c,o,l,f,m,v,h;return d.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.t0=Promise,t.next=4,u.getAppStorage("corva","completion.wits",e,{limit:1,fields:"timestamp"});case 4:return t.t1=t.sent,t.next=7,u.getAppStorage("corva","wireline.wits",e,{limit:1,fields:"timestamp"});case 7:return t.t2=t.sent,t.t3=[t.t1,t.t2],t.next=11,t.t0.all.call(t.t0,t.t3);case 11:if(r=t.sent,n=p.default(r,2),a=n[0],i=n[1],c=s.get(a,"0.timestamp"),o=s.get(i,"0.timestamp"),l=null,c&&o?l=c>o?c:o:c?l=c:o&&(l=o),l){t.next=21;break}return t.abrupt("return",[]);case 21:return t.next=23,Promise.all([b(e,"completion.activity.summary-stage",l,["activities"]),b(e,"wireline.activity.summary-stage",l,["durations"])]);case 23:return f=t.sent,m=p.default(f,2),v=m[0],h=m[1],t.abrupt("return",[{name:"frac",duration:v,color:"#7177FF"},{name:"wireline",duration:h,color:"#FF9C00"}]);case 30:t.prev=30,t.t4=t.catch(0),console.error(t.t4);case 33:return t.abrupt("return",[]);case 34:case"end":return t.stop()}}),t,null,[[0,30]])})));return function(e){return t.apply(this,arguments)}}()));case 2:return r=t.sent,n={},r.forEach((function(t,r){n[e[r]]=t})),t.abrupt("return",n);case 6:case"end":return t.stop()}}),t)}))),w.apply(this,arguments)}exports.useWellSummaryData=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=a.useState(!0),s=p.default(n,2),c=s[0],o=s[1],l=a.useState({}),m=p.default(l,2),g=m[0],b=m[1],y=a.useState(!0),w=p.default(y,2),_=w[0],O=w[1],x=a.useState({}),S=p.default(x,2),q=S[0],$=S[1],E="drilling"===e;return a.useEffect((function(){function n(){return(n=f.default(d.default.mark((function e(){var n,a,s,c,l,p,f;return d.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(r||Object.values(E?i.DRILLING_WELL_SUMMARY:v(v({},i.COMPLETION_WELL_SUMMARY),i.DRILLOUT_WELL_SUMMARY))).filter((function(t){return t.dataSource&&t.dataSource.length})),a=[],n.forEach((function(t){t.dataSource.forEach((function(t){var e=t.provider,r=t.collection,n=t.fields;e&&r&&n&&n.length?n.forEach((function(t){return a.push("".concat(e,"#").concat(r,".").concat(t))})):r&&a.push(r)}))})),a.push("well_id"),e.prev=4,s={asset_id:{$in:t}},c=a.reduce((function(t,e){return t[e]=1,t}),{asset_id:1}),l={aggregate:JSON.stringify([{$match:s},{$project:c}])},e.next=10,u.getAppStorage("corva","well_cache",null,l);case 10:p=e.sent,f={},p.forEach((function(t){var e=t.asset_id;f[e]=t})),b(f),e.next=19;break;case 16:e.prev=16,e.t0=e.catch(4),console.error(e.t0);case 19:o(!1);case 20:case"end":return e.stop()}}),e,null,[[4,16]])})))).apply(this,arguments)}function a(){return(a=f.default(d.default.mark((function r(){var n;return d.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(r.prev=0,"drilling"!==e){r.next=7;break}return r.next=4,h(t);case 4:r.t0=r.sent,r.next=10;break;case 7:return r.next=9,j(t);case 9:r.t0=r.sent;case 10:n=r.t0,$(n),r.next=17;break;case 14:r.prev=14,r.t1=r.catch(0),console.error(r.t1);case 17:O(!1);case 18:case"end":return r.stop()}}),r,null,[[0,14]])})))).apply(this,arguments)}o(!0),O(!0),function(){n.apply(this,arguments)}(),function(){a.apply(this,arguments)}()}),[]),[c||_,g,q]};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@babel/runtime/helpers/defineProperty"),e=require("@babel/runtime/helpers/slicedToArray"),r=require("@babel/runtime/helpers/asyncToGenerator"),n=require("@babel/runtime/regenerator"),a=require("react"),s=require("lodash"),u=require("../../../clients/jsonApi/index.js");require("../../../constants/goals.js"),require("../../../constants/segment.js"),require("../../../constants/alerts.js"),require("../../../constants/apps.js"),require("../../../constants/drillstring.js"),require("../../../constants/completion.js"),require("../../../constants/notifications.js"),require("../../../constants/feed.js"),require("../../../constants/bha.js"),require("../../../utils/env.js");var i=require("../../../constants/wellSummary.js"),c=require("../../../constants/rigActivity.js");function o(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}require("../../GradientManager/configuration/constants.js");var l=o(t),p=o(e),f=o(r),d=o(n);function m(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function v(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?m(Object(r),!0).forEach((function(e){l.default(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function h(t){return g.apply(this,arguments)}function g(){return g=f.default(d.default.mark((function t(e){var r,n;return d.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all(e.map(function(){var t=f.default(d.default.mark((function t(e){var r;return d.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,u.getAppStorage("corva","activities.summary-continuous",e,{fields:["data.activities","data.start_timestamp","data.end_timestamp"].join(","),limit:1,query:"{timestamp#lte#".concat(Math.floor(Date.now()/1e3),"}"),sort:"{timestamp:-1}"});case 3:return r=t.sent,t.abrupt("return",(s.get(r,"0.data.activities")||[]).map((function(t){return v(v({},t),{},{duration:(t.day||0)+(t.night||0),color:c.RIG_ACTIVITY_COLORS[t.name]})})));case 7:t.prev=7,t.t0=t.catch(0),console.error(t.t0);case 10:return t.abrupt("return",[]);case 11:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(e){return t.apply(this,arguments)}}()));case 2:return r=t.sent,n={},r.forEach((function(t,r){n[e[r]]=t})),t.abrupt("return",n);case 6:case"end":return t.stop()}}),t)}))),g.apply(this,arguments)}function b(t,e,r,n){return y.apply(this,arguments)}function y(){return(y=f.default(d.default.mark((function t(e,r,n,a){var i,c;return d.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,u.getAppStorage("corva",r,e,{aggregate:JSON.stringify([{$match:{asset_id:e,timestamp:{$lte:n,$gte:n-86400}}},{$project:{_id:-1,stage_number:1,data:1,timestamp:1}},{$group:{_id:"$stage_number",timestamp:{$first:"$timestamp"},stage_number:{$last:"$stage_number"},first_data:{$first:"$data"},last_data:{$last:"$data"}}}])});case 3:return i=t.sent,c=0,s.sortBy(i,"timestamp").forEach((function(t,e){if(0===e){var r=s.omit(s.get(t,"first_data"),a),n=s.omit(s.get(t,"last_data"),a);Object.keys(n).forEach((function(t){c+=n[t]-(r[t]||0)}))}else{var u=s.omit(s.get(t,"last_data"),a);Object.keys(u).forEach((function(t){c+=u[t]}))}})),t.abrupt("return",c);case 9:t.prev=9,t.t0=t.catch(0),console.error(t.t0);case 12:return t.abrupt("return",0);case 13:case"end":return t.stop()}}),t,null,[[0,9]])})))).apply(this,arguments)}function j(t){return w.apply(this,arguments)}function w(){return w=f.default(d.default.mark((function t(e){var r,n;return d.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all(e.map(function(){var t=f.default(d.default.mark((function t(e){var r,n,a,i,c,o,l,f,m,v,h;return d.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.t0=Promise,t.next=4,u.getAppStorage("corva","completion.wits",e,{limit:1,fields:"timestamp"});case 4:return t.t1=t.sent,t.next=7,u.getAppStorage("corva","wireline.wits",e,{limit:1,fields:"timestamp"});case 7:return t.t2=t.sent,t.t3=[t.t1,t.t2],t.next=11,t.t0.all.call(t.t0,t.t3);case 11:if(r=t.sent,n=p.default(r,2),a=n[0],i=n[1],c=s.get(a,"0.timestamp"),o=s.get(i,"0.timestamp"),l=null,c&&o?l=c>o?c:o:c?l=c:o&&(l=o),l){t.next=21;break}return t.abrupt("return",[]);case 21:return t.next=23,Promise.all([b(e,"completion.activity.summary-stage",l,["activities"]),b(e,"wireline.activity.summary-stage",l,["durations"])]);case 23:return f=t.sent,m=p.default(f,2),v=m[0],h=m[1],t.abrupt("return",[{name:"frac",duration:v,color:"#7177FF"},{name:"wireline",duration:h,color:"#FF9C00"}]);case 30:t.prev=30,t.t4=t.catch(0),console.error(t.t4);case 33:return t.abrupt("return",[]);case 34:case"end":return t.stop()}}),t,null,[[0,30]])})));return function(e){return t.apply(this,arguments)}}()));case 2:return r=t.sent,n={},r.forEach((function(t,r){n[e[r]]=t})),t.abrupt("return",n);case 6:case"end":return t.stop()}}),t)}))),w.apply(this,arguments)}exports.useWellSummaryData=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=a.useState(!0),s=p.default(n,2),c=s[0],o=s[1],l=a.useState({}),m=p.default(l,2),g=m[0],b=m[1],y=a.useState(!0),w=p.default(y,2),_=w[0],O=w[1],x=a.useState({}),S=p.default(x,2),q=S[0],$=S[1],E="drilling"===e;return a.useEffect((function(){function n(){return(n=f.default(d.default.mark((function e(){var n,a,s,c,l,p,f;return d.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(r||Object.values(E?i.DRILLING_WELL_SUMMARY:v(v({},i.COMPLETION_WELL_SUMMARY),i.DRILLOUT_WELL_SUMMARY))).filter((function(t){return t.dataSource&&t.dataSource.length})),a=[],n.forEach((function(t){t.dataSource.forEach((function(t){var e=t.provider,r=t.collection,n=t.fields;e&&r&&n&&n.length?n.forEach((function(t){return a.push("".concat(e,"#").concat(r,".").concat(t))})):r&&a.push(r)}))})),a.push("well_id"),e.prev=4,s={asset_id:{$in:t}},c=a.reduce((function(t,e){return t[e]=1,t}),{asset_id:1}),l={aggregate:JSON.stringify([{$match:s},{$project:c}])},e.next=10,u.getAppStorage("corva","well_cache",null,l);case 10:p=e.sent,f={},p.forEach((function(t){var e=t.asset_id;f[e]=t})),b(f),e.next=19;break;case 16:e.prev=16,e.t0=e.catch(4),console.error(e.t0);case 19:o(!1);case 20:case"end":return e.stop()}}),e,null,[[4,16]])})))).apply(this,arguments)}function a(){return(a=f.default(d.default.mark((function r(){var n;return d.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(r.prev=0,"drilling"!==e){r.next=7;break}return r.next=4,h(t);case 4:r.t0=r.sent,r.next=10;break;case 7:return r.next=9,j(t);case 9:r.t0=r.sent;case 10:n=r.t0,$(n),r.next=17;break;case 14:r.prev=14,r.t1=r.catch(0),console.error(r.t1);case 17:O(!1);case 18:case"end":return r.stop()}}),r,null,[[0,14]])})))).apply(this,arguments)}o(!0),O(!0),function(){n.apply(this,arguments)}(),function(){a.apply(this,arguments)}()}),[]),[c||_,g,q]};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../utils/env.js"),r=e.isProdEnv||e.isBetaEnv?3:1;exports.CORVA_COMPANY_ID=r;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./devcenter.js"),r=require("./goals.js"),s=require("./segment.js"),t=require("./alerts.js"),o=require("./apps.js"),i=require("./casing.js"),p=require("./drillstring.js"),_=require("./completion.js"),a=require("./appPackages.js"),L=require("./notifications.js"),n=require("./feed.js"),u=require("./bha.js"),x=require("./assetTypes.js"),S=require("./wellSummary.js"),j=require("./rigActivity.js"),l=require("./componentsSettings.js"),E=require("./localStorageKeys.js");exports.DEV_CENTER_CLI_APP_ID=e.DEV_CENTER_CLI_APP_ID,exports.goals=r,exports.segment=s,exports.alerts=t,exports.apps=o,exports.casing=i,exports.drillstring=p,exports.completion=_,exports.appPackages=a,exports.notifications=L,exports.feed=n,exports.bha=u,exports.ASSET_TYPES=x.ASSET_TYPES,exports.COMPLETION_WELL_SUMMARY=S.COMPLETION_WELL_SUMMARY,exports.DRILLING_WELL_SUMMARY=S.DRILLING_WELL_SUMMARY,exports.DRILLOUT_WELL_SUMMARY=S.DRILLOUT_WELL_SUMMARY,exports.RIG_ACTIVITY_COLORS=j.RIG_ACTIVITY_COLORS,exports.componentsSettings=l.componentsSettings,exports.localStorageKeys=E;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./devcenter.js"),r=require("./goals.js"),s=require("./segment.js"),t=require("./alerts.js"),o=require("./apps.js"),i=require("./casing.js"),p=require("./drillstring.js"),_=require("./completion.js"),a=require("./appPackages.js"),L=require("./notifications.js"),n=require("./feed.js"),u=require("./bha.js"),x=require("./assetTypes.js"),I=require("./corvaCompanyId.js"),S=require("./wellSummary.js"),j=require("./rigActivity.js"),c=require("./componentsSettings.js"),l=require("./localStorageKeys.js");exports.DEV_CENTER_CLI_APP_ID=e.DEV_CENTER_CLI_APP_ID,exports.goals=r,exports.segment=s,exports.alerts=t,exports.apps=o,exports.casing=i,exports.drillstring=p,exports.completion=_,exports.appPackages=a,exports.notifications=L,exports.feed=n,exports.bha=u,exports.ASSET_TYPES=x.ASSET_TYPES,exports.CORVA_COMPANY_ID=I.CORVA_COMPANY_ID,exports.COMPLETION_WELL_SUMMARY=S.COMPLETION_WELL_SUMMARY,exports.DRILLING_WELL_SUMMARY=S.DRILLING_WELL_SUMMARY,exports.DRILLOUT_WELL_SUMMARY=S.DRILLOUT_WELL_SUMMARY,exports.RIG_ACTIVITY_COLORS=j.RIG_ACTIVITY_COLORS,exports.componentsSettings=c.componentsSettings,exports.localStorageKeys=l;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./useSubscriptions.js"),s=require("./useOutsideClick.js"),r=require("./useEscPress.js"),u=require("./useDevCenterApp.js"),i=require("./useSignedURL.js"),t=require("./useSharedDCStore.js"),p=require("./useResizeObserver.js");exports.useSubscriptions=e,exports.useOutsideClick=s,exports.useEscPress=r,exports.useDevCenterApp=u,exports.useSignedURL=i,exports.useSharedDCStore=t,exports.useResizeObserver=p;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./useSubscriptions.js"),s=require("./useOutsideClick.js"),r=require("./useEscPress.js"),u=require("./useDevCenterApp.js"),t=require("./useSignedURL.js"),i=require("./useSharedDCStore.js"),p=require("./useResizeObserver.js"),o=require("./useWellnessAlerts.js");exports.useSubscriptions=e,exports.useOutsideClick=s,exports.useEscPress=r,exports.useDevCenterApp=u,exports.useSignedURL=t,exports.useSharedDCStore=i,exports.useResizeObserver=p,exports.useWellnessAlerts=o.useWellnessAlerts;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require('./../ext-esm/tslib/tslib.es6.js'),t=require("react"),s=require("uuid"),n=require("../utils/resolveWellHubSlug.js"),r=require("../utils/env.js"),a=require("../components/StatusBadge/api.js"),u=require("../components/StatusBadge/utils.js"),i=require("../components/StatusBadge/constants.js");exports.useWellnessAlerts=function(l){var o=l.asset,d=l.multiRigAssets,c=void 0===d?[]:d,v=l.appId,g=l.dashboards,p=t.useState({}),m=p[0],f=p[1],S=t.useState(""),_=S[0],A=S[1];return t.useEffect((function(){var t,l;if(!r.isProdEnv){var d=[];r.isDevOrQAEnv&&d.push(174,190,23120),r.isBetaEnv&&d.push(42,1022);var p={id:null===(t=null==o?void 0:o.get)||void 0===t?void 0:t.call(o,"id"),name:null===(l=null==o?void 0:o.get)||void 0===l?void 0:l.call(o,"name")},m=p.id?[p]:c;try{m.length&&d.includes(v)?function(t){e.__awaiter(void 0,void 0,void 0,(function(){var r,l,o,d,c,p,m,S,_,h,E,T;return e.__generator(this,(function(q){switch(q.label){case 0:return[4,a.getWCURuleMapping(v)];case 1:return r=q.sent(),[4,a.getWellnessRuleSettings(null===(h=r[0])||void 0===h?void 0:h.rule_id)];case 2:return(l=q.sent()).length?[4,n(g)]:[2];case 3:return o=q.sent(),d=t.map((function(e){return e.id})),[4,Promise.all(l.map((function(e){var t=e.data.name;return a.getWellnessAlerts(d,t)}))).then((function(e){return e.map((function(e){return e.map((function(e){return u.parseWellnessAlertFromJson(e)}))}))}))];case 4:return c=q.sent(),p=u.getNewWellnessAlerts(t,c,o),m=t.reduce((function(e,t){if(!e[t.name]){var n=t.id;e[t.name]=l.map((function(e){return{alert:{assetId:n,status:i.ALERT_STATUSES.RESOLVED,emptyMessage:"Data quality check passed"},id:s.v4(),isResolved:!0,name:e.data.name,linkToDQPage:u.getLinkToDQPage({assetId:n,wellHubSlug:o})}}))}return e}),e.__assign({},p)),S=Object.keys(m),_=S.filter((function(e){return m[e].every((function(e){return e.isResolved}))})).length===S.length,A(_?i.BADGE_ICON_STATUSES.success:i.BADGE_ICON_STATUSES.error),f({alertsData:m,lastTimestamp:null===(T=null===(E=m[S[0]][0])||void 0===E?void 0:E.alert)||void 0===T?void 0:T.statusUpdatedAt}),[2]}}))}))}(m):(f({}),A(""))}catch(e){console.error(e)}}}),[o,c.length]),{wellnessAlerts:m,statusBadgeIconType:_}};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),i=require("../utils.js"),s=require("./abilities.js"),r=require("./settingsApps.js"),t=require("./appsPermissions.js");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=a(e);function c(e,i){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);i&&(r=r.filter((function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable}))),s.push.apply(s,r)}return s}function o(e){for(var i=1;i<arguments.length;i++){var s=null!=arguments[i]?arguments[i]:{};i%2?c(Object(s),!0).forEach((function(i){n.default(e,i,s[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):c(Object(s)).forEach((function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(s,i))}))}return e}var l=o(o({companySelectorView:i.stringifyPermission({resource_class:"company_selector",ability:s.ABILITIES.view}),userCreate:i.stringifyPermission({resource_class:"User",ability:s.ABILITIES.create}),getUserUpdate:function(e){return i.stringifyPermission({resource_class:"User",ability:s.ABILITIES.update,resource_id:e})},canViewCorvaAppVersion:i.stringifyPermission({resource_class:"corva_app_version",ability:s.ABILITIES.view}),documentationEdit:i.stringifyPermission({resource_class:"Document",ability:s.ABILITIES.edit}),documentationCreate:i.stringifyPermission({resource_class:"Document",ability:s.ABILITIES.create}),documentationDestroy:i.stringifyPermission({resource_class:"Document",ability:s.ABILITIES.destroy}),canUpdateWellQC:i.stringifyPermission({resource_class:"well_qc",ability:s.ABILITIES.update}),getFeedItemDestroy:function(e){return i.stringifyPermission({resource_class:"Activity",ability:s.ABILITIES.destroy,resource_id:e})},getCommentDestroy:function(e){return i.stringifyPermission({resource_class:"Comment",ability:s.ABILITIES.destroy,resource_id:e})},getAlertUpdate:function(e){return i.stringifyPermission({resource_class:"Alert",ability:s.ABILITIES.update,resource_id:e})},getAlertDestroy:function(e){return i.stringifyPermission({resource_class:"Alert",ability:s.ABILITIES.destroy,resource_id:e})},streamVisibilityEdit:i.stringifyPermission({resource_class:"stream",ability:s.ABILITIES.edit}),userImpersonate:i.stringifyPermission({resource_class:"user",ability:s.ABILITIES.impersonate}),getDashboardUpdate:function(e){return i.stringifyPermission({resource_class:"Dashboard",ability:s.ABILITIES.update,resource_id:e})},canCreateDashboard:i.stringifyPermission({resource_class:"Dashboard",ability:s.ABILITIES.create}),canCopyUsers:i.stringifyPermission({resource_class:"Group",ability:s.ABILITIES.copy_users}),canViewDocumentsInfo:i.stringifyPermission({resource_class:"documents_info",ability:s.ABILITIES.view}),canViewCostsInfo:i.stringifyPermission({resource_class:"costs_info",ability:s.ABILITIES.view}),canViewBillingCost:i.stringifyPermission({resource_class:"billing_visualization_cost",ability:s.ABILITIES.view}),canReadBillingInfo:i.stringifyPermission({resource_class:"Usage",ability:s.ABILITIES.read}),canUpdateTiers:i.stringifyPermission({resource_class:"Tier",ability:s.ABILITIES.update}),canReadTiers:i.stringifyPermission({resource_class:"Tier",ability:s.ABILITIES.read}),canCreateTiers:i.stringifyPermission({resource_class:"Tier",ability:s.ABILITIES.create}),canDestroyTiers:i.stringifyPermission({resource_class:"Tier",ability:s.ABILITIES.destroy}),canUpdateProductSubscriptions:i.stringifyPermission({resource_class:"ProductSubscription",ability:s.ABILITIES.update}),canReadProductSubscriptions:i.stringifyPermission({resource_class:"ProductSubscription",ability:s.ABILITIES.read}),canCreateProductSubscriptions:i.stringifyPermission({resource_class:"ProductSubscription",ability:s.ABILITIES.create}),canDestroyProductSubscriptions:i.stringifyPermission({resource_class:"ProductSubscription",ability:s.ABILITIES.destroy}),canViewPurchasesPage:i.stringifyPermission({resource_class:"company_purchase",ability:s.ABILITIES.access}),canReadPermissions:i.stringifyPermission({resource_class:"Permission",ability:s.ABILITIES.read}),canViewUserPermissions:i.stringifyPermission({resource_class:"mng_permissions_user_btn",ability:s.ABILITIES.view}),canViewGroupPermissions:i.stringifyPermission({resource_class:"mng_permissions_group_btn",ability:s.ABILITIES.view}),canShareGroup:i.stringifyPermission({resource_class:"Group",ability:s.ABILITIES.share}),getAppStreamUpdate:function(e){return i.stringifyPermission({resource_class:"AppStream",ability:s.ABILITIES.update,resource_id:e})},canViewAlertValidationFilters:i.stringifyPermission({resource_class:"alert_validation_filters",ability:s.ABILITIES.view}),canViewAlertSubscriptionFilters:i.stringifyPermission({resource_class:"alert_subscription_filters",ability:s.ABILITIES.view}),getCanDestroyAlertDefinition:function(e){return i.stringifyPermission({resource_class:"AlertDefinition",ability:s.ABILITIES.destroy,resource_id:e})},getCanUpdateAlertDefinition:function(e){return i.stringifyPermission({resource_class:"AlertDefinition",ability:s.ABILITIES.update,resource_id:e})},canCreateAlertDashboard:i.stringifyPermission({resource_class:"alert_dashboard",ability:s.ABILITIES.create}),canUpdateAlertDashboard:i.stringifyPermission({resource_class:"alert_dashboard",ability:s.ABILITIES.edit}),canViewAlertCompanyField:i.stringifyPermission({resource_class:"alert_company_field",ability:s.ABILITIES.view}),canViewDashboardSharingCompany:i.stringifyPermission({resource_class:"dashboard_sharing_company",ability:s.ABILITIES.view}),canViewDashboardSharingSharedWith:i.stringifyPermission({resource_class:"dashboard_sharing_shared_with",ability:s.ABILITIES.view}),canViewConfigPage:i.stringifyPermission({resource_class:"config_page",ability:s.ABILITIES.access}),canAccessRequestApp:i.stringifyPermission({resource_class:"request_app",ability:s.ABILITIES.access}),canAccessUserSettingsWidgets:i.stringifyPermission({resource_class:"user_settings_widgets",ability:s.ABILITIES.access}),canViewDevCenter:i.stringifyPermission({resource_class:"dev_center",ability:s.ABILITIES.access}),getCanReadAppPackages:function(e){return i.stringifyPermission({resource_class:"App",ability:"read_packages",resource_id:e})},canViewAppPackageSelector:i.stringifyPermission({resource_class:"app_package_selector",ability:s.ABILITIES.view}),canAccessProvisioning:i.stringifyPermission({resource_class:"provisioning",ability:s.ABILITIES.access}),getCanUpdateAsset:function(e){return i.stringifyPermission({resource_class:"Asset",ability:s.ABILITIES.update,resource_id:e})},getCanUpdateParentAssetAsset:function(e){return i.stringifyPermission({resource_class:"Asset",ability:"update_parent_asset",resource_id:e})},getCanCopyActivities:function(e){return i.stringifyPermission({resource_class:"Asset",ability:s.ABILITIES.copy_activities,resource_id:e})},rigCreate:i.stringifyPermission({ability:s.ABILITIES.create,resource_class:"Rig"}),wellCreate:i.stringifyPermission({ability:s.ABILITIES.create,resource_class:"Well"}),programCreate:i.stringifyPermission({ability:s.ABILITIES.create,resource_class:"Program"}),padCreate:i.stringifyPermission({ability:s.ABILITIES.create,resource_class:"Pad"}),padUpdate:i.stringifyPermission({ability:s.ABILITIES.update,resource_class:"Pad"}),canManagePadFracFleets:i.stringifyPermission({ability:"manage_frac_fleets",resource_class:"Pad"}),fracFleetCreate:i.stringifyPermission({ability:s.ABILITIES.create,resource_class:"FracFleet"}),drilloutUnitCreate:i.stringifyPermission({ability:s.ABILITIES.create,resource_class:"DrilloutUnit"}),canQCDrillstring:i.stringifyPermission({ability:s.ABILITIES.update,resource_class:"drillstring_qc"}),canCalibrateDrillstring:i.stringifyPermission({ability:s.ABILITIES.update,resource_class:"drillstring_calibration"}),canViewAppOwnersFilter:i.stringifyPermission({ability:s.ABILITIES.view,resource_class:"app_owners_filter"}),canViewSaveOffsetWells:i.stringifyPermission({ability:s.ABILITIES.view,resource_class:"save_offset_wells"}),canViewGenerateDRM:i.stringifyPermission({ability:s.ABILITIES.view,resource_class:"corva.driller_roadmap-generate_drm"})},r),t);exports.ABILITIES=s.ABILITIES,exports.PERMISSIONS=l;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),i=require("../utils.js"),s=require("./abilities.js"),r=require("./settingsApps.js"),t=require("./appsPermissions.js");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=a(e);function c(e,i){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);i&&(r=r.filter((function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable}))),s.push.apply(s,r)}return s}function o(e){for(var i=1;i<arguments.length;i++){var s=null!=arguments[i]?arguments[i]:{};i%2?c(Object(s),!0).forEach((function(i){n.default(e,i,s[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):c(Object(s)).forEach((function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(s,i))}))}return e}var l=o(o({companySelectorView:i.stringifyPermission({resource_class:"company_selector",ability:s.ABILITIES.view}),userCreate:i.stringifyPermission({resource_class:"User",ability:s.ABILITIES.create}),getUserUpdate:function(e){return i.stringifyPermission({resource_class:"User",ability:s.ABILITIES.update,resource_id:e})},canViewCorvaAppVersion:i.stringifyPermission({resource_class:"corva_app_version",ability:s.ABILITIES.view}),documentationEdit:i.stringifyPermission({resource_class:"Document",ability:s.ABILITIES.edit}),documentationCreate:i.stringifyPermission({resource_class:"Document",ability:s.ABILITIES.create}),documentationDestroy:i.stringifyPermission({resource_class:"Document",ability:s.ABILITIES.destroy}),canUpdateWellQC:i.stringifyPermission({resource_class:"well_qc",ability:s.ABILITIES.update}),getFeedItemDestroy:function(e){return i.stringifyPermission({resource_class:"Activity",ability:s.ABILITIES.destroy,resource_id:e})},getCommentDestroy:function(e){return i.stringifyPermission({resource_class:"Comment",ability:s.ABILITIES.destroy,resource_id:e})},getAlertUpdate:function(e){return i.stringifyPermission({resource_class:"Alert",ability:s.ABILITIES.update,resource_id:e})},getAlertDestroy:function(e){return i.stringifyPermission({resource_class:"Alert",ability:s.ABILITIES.destroy,resource_id:e})},streamVisibilityEdit:i.stringifyPermission({resource_class:"stream",ability:s.ABILITIES.edit}),userImpersonate:i.stringifyPermission({resource_class:"user",ability:s.ABILITIES.impersonate}),getDashboardUpdate:function(e){return i.stringifyPermission({resource_class:"Dashboard",ability:s.ABILITIES.update,resource_id:e})},canCreateDashboard:i.stringifyPermission({resource_class:"Dashboard",ability:s.ABILITIES.create}),canCopyUsers:i.stringifyPermission({resource_class:"Group",ability:s.ABILITIES.copy_users}),canViewDocumentsInfo:i.stringifyPermission({resource_class:"documents_info",ability:s.ABILITIES.view}),canViewCostsInfo:i.stringifyPermission({resource_class:"costs_info",ability:s.ABILITIES.view}),canViewBillingCost:i.stringifyPermission({resource_class:"billing_visualization_cost",ability:s.ABILITIES.view}),canReadBillingInfo:i.stringifyPermission({resource_class:"Usage",ability:s.ABILITIES.read}),canUpdateTiers:i.stringifyPermission({resource_class:"Tier",ability:s.ABILITIES.update}),canReadTiers:i.stringifyPermission({resource_class:"Tier",ability:s.ABILITIES.read}),canCreateTiers:i.stringifyPermission({resource_class:"Tier",ability:s.ABILITIES.create}),canDestroyTiers:i.stringifyPermission({resource_class:"Tier",ability:s.ABILITIES.destroy}),canUpdateProductSubscriptions:i.stringifyPermission({resource_class:"ProductSubscription",ability:s.ABILITIES.update}),canReadProductSubscriptions:i.stringifyPermission({resource_class:"ProductSubscription",ability:s.ABILITIES.read}),canCreateProductSubscriptions:i.stringifyPermission({resource_class:"ProductSubscription",ability:s.ABILITIES.create}),canDestroyProductSubscriptions:i.stringifyPermission({resource_class:"ProductSubscription",ability:s.ABILITIES.destroy}),canViewPurchasesPage:i.stringifyPermission({resource_class:"company_purchase",ability:s.ABILITIES.access}),canReadPermissions:i.stringifyPermission({resource_class:"Permission",ability:s.ABILITIES.read}),canViewUserPermissions:i.stringifyPermission({resource_class:"mng_permissions_user_btn",ability:s.ABILITIES.view}),canViewGroupPermissions:i.stringifyPermission({resource_class:"mng_permissions_group_btn",ability:s.ABILITIES.view}),canShareGroup:i.stringifyPermission({resource_class:"Group",ability:s.ABILITIES.share}),getAppStreamUpdate:function(e){return i.stringifyPermission({resource_class:"AppStream",ability:s.ABILITIES.update,resource_id:e})},canViewAlertValidationFilters:i.stringifyPermission({resource_class:"alert_validation_filters",ability:s.ABILITIES.view}),canViewAlertSubscriptionFilters:i.stringifyPermission({resource_class:"alert_subscription_filters",ability:s.ABILITIES.view}),getCanDestroyAlertDefinition:function(e){return i.stringifyPermission({resource_class:"AlertDefinition",ability:s.ABILITIES.destroy,resource_id:e})},getCanUpdateAlertDefinition:function(e){return i.stringifyPermission({resource_class:"AlertDefinition",ability:s.ABILITIES.update,resource_id:e})},canCreateAlertDashboard:i.stringifyPermission({resource_class:"alert_dashboard",ability:s.ABILITIES.create}),canUpdateAlertDashboard:i.stringifyPermission({resource_class:"alert_dashboard",ability:s.ABILITIES.edit}),canViewAlertCompanyField:i.stringifyPermission({resource_class:"alert_company_field",ability:s.ABILITIES.view}),canViewDashboardSharingCompany:i.stringifyPermission({resource_class:"dashboard_sharing_company",ability:s.ABILITIES.view}),canViewDashboardSharingSharedWith:i.stringifyPermission({resource_class:"dashboard_sharing_shared_with",ability:s.ABILITIES.view}),canViewConfigPage:i.stringifyPermission({resource_class:"config_page",ability:s.ABILITIES.access}),canAccessRequestApp:i.stringifyPermission({resource_class:"request_app",ability:s.ABILITIES.access}),canAccessUserSettingsWidgets:i.stringifyPermission({resource_class:"user_settings_widgets",ability:s.ABILITIES.access}),canViewDevCenter:i.stringifyPermission({resource_class:"dev_center",ability:s.ABILITIES.access}),getCanReadAppPackages:function(e){return i.stringifyPermission({resource_class:"App",ability:"read_packages",resource_id:e})},canViewAppPackageSelector:i.stringifyPermission({resource_class:"app_package_selector",ability:s.ABILITIES.view}),canAccessProvisioning:i.stringifyPermission({resource_class:"provisioning",ability:s.ABILITIES.access}),getCanUpdateAsset:function(e){return i.stringifyPermission({resource_class:"Asset",ability:s.ABILITIES.update,resource_id:e})},getCanUpdateParentAssetAsset:function(e){return i.stringifyPermission({resource_class:"Asset",ability:"update_parent_asset",resource_id:e})},getCanCopyActivities:function(e){return i.stringifyPermission({resource_class:"Asset",ability:s.ABILITIES.copy_activities,resource_id:e})},rigCreate:i.stringifyPermission({ability:s.ABILITIES.create,resource_class:"Rig"}),wellCreate:i.stringifyPermission({ability:s.ABILITIES.create,resource_class:"Well"}),programCreate:i.stringifyPermission({ability:s.ABILITIES.create,resource_class:"Program"}),padCreate:i.stringifyPermission({ability:s.ABILITIES.create,resource_class:"Pad"}),padUpdate:i.stringifyPermission({ability:s.ABILITIES.update,resource_class:"Pad"}),canManagePadFracFleets:i.stringifyPermission({ability:"manage_frac_fleets",resource_class:"Pad"}),fracFleetCreate:i.stringifyPermission({ability:s.ABILITIES.create,resource_class:"FracFleet"}),drilloutUnitCreate:i.stringifyPermission({ability:s.ABILITIES.create,resource_class:"DrilloutUnit"}),canQCDrillstring:i.stringifyPermission({ability:s.ABILITIES.update,resource_class:"drillstring_qc"}),canCalibrateDrillstring:i.stringifyPermission({ability:s.ABILITIES.update,resource_class:"drillstring_calibration"}),canViewAppOwnersFilter:i.stringifyPermission({ability:s.ABILITIES.view,resource_class:"app_owners_filter"}),canViewSaveOffsetWells:i.stringifyPermission({ability:s.ABILITIES.view,resource_class:"save_offset_wells"}),canViewGenerateDRM:i.stringifyPermission({ability:s.ABILITIES.view,resource_class:"corva.driller_roadmap-generate_drm"}),canUpdateWorkflow:i.stringifyPermission({ability:s.ABILITIES.update,resource_class:"Workflow"})},r),t);exports.ABILITIES=s.ABILITIES,exports.PERMISSIONS=l;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../constants/devcenter.js");require("../constants/goals.js");var n=require("../constants/segment.js");require("../constants/alerts.js"),require("../constants/apps.js"),require("../constants/drillstring.js"),require("../constants/completion.js"),require("../constants/notifications.js"),require("../constants/feed.js"),require("../constants/bha.js"),require("lodash"),require("../components/GradientManager/configuration/constants.js");exports.createDevCenterRouter=function(e){var n,t;return{push:function(n){"string"==typeof n?e.push(n):e.push({pathname:n.pathname,query:n.query})},location:{pathname:null==e||null===(n=e.location)||void 0===n?void 0:n.pathname,query:null==e||null===(t=e.location)||void 0===t?void 0:t.query}}},exports.getAppIdentifier=function(e){var n=e.appKey,t=e.version,r=e.isLocalDebugMode;if(!n)return"";var o=n.replace(/\./g,"_");return r?o:"".concat(o,"-").concat(t)},exports.getAppName=function(e){var n,t;return null!==(n=null==e||null===(t=e.package)||void 0===t?void 0:t.manifest.application.name)&&void 0!==n?n:e.name},exports.getAppSegment=function(e){var t,r,o,i,a;return null!==(t=null==e||null===(r=e.package)||void 0===r||null===(o=r.manifest)||void 0===o||null===(i=o.application)||void 0===i||null===(a=i.segments)||void 0===a?void 0:a[0])&&void 0!==t?t:n.SEGMENTS.DRILLING},exports.getTimestampFromQuery=function(e){return e?+(e.split("#")[2]||"").replace("}",""):void 0},exports.isAppMaximized=function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.DEV_CENTER_CLI_APP_ID;return t===+(null==n?void 0:n.maximizeDC)},exports.isDevCenterApp=function(e){var n;return"dev_center"===((null==e?void 0:e.platform)||(null==e||null===(n=e.app)||void 0===n?void 0:n.platform))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../constants/devcenter.js");require("../constants/goals.js");var n=require("../constants/segment.js");require("../constants/alerts.js"),require("../constants/apps.js"),require("../constants/drillstring.js"),require("../constants/completion.js"),require("../constants/notifications.js"),require("../constants/feed.js"),require("../constants/bha.js"),require("./env.js"),require("lodash"),require("../components/GradientManager/configuration/constants.js");exports.createDevCenterRouter=function(e){var n,t;return{push:function(n){"string"==typeof n?e.push(n):e.push({pathname:n.pathname,query:n.query})},location:{pathname:null==e||null===(n=e.location)||void 0===n?void 0:n.pathname,query:null==e||null===(t=e.location)||void 0===t?void 0:t.query}}},exports.getAppIdentifier=function(e){var n=e.appKey,t=e.version,r=e.isLocalDebugMode;if(!n)return"";var o=n.replace(/\./g,"_");return r?o:"".concat(o,"-").concat(t)},exports.getAppName=function(e){var n,t;return null!==(n=null==e||null===(t=e.package)||void 0===t?void 0:t.manifest.application.name)&&void 0!==n?n:e.name},exports.getAppSegment=function(e){var t,r,o,i,a;return null!==(t=null==e||null===(r=e.package)||void 0===r||null===(o=r.manifest)||void 0===o||null===(i=o.application)||void 0===i||null===(a=i.segments)||void 0===a?void 0:a[0])&&void 0!==t?t:n.SEGMENTS.DRILLING},exports.getTimestampFromQuery=function(e){return e?+(e.split("#")[2]||"").replace("}",""):void 0},exports.isAppMaximized=function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.DEV_CENTER_CLI_APP_ID;return t===+(null==n?void 0:n.maximizeDC)},exports.isDevCenterApp=function(e){var n;return"dev_center"===((null==e?void 0:e.platform)||(null==e||null===(n=e.app)||void 0===n?void 0:n.platform))};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="qa"===process.env.REACT_APP_ENVIRONMENT||"development"===process.env.REACT_APP_ENVIRONMENT;exports.isDevOrQAEnv=e;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="qa"===process.env.REACT_APP_ENVIRONMENT||"development"===process.env.REACT_APP_ENVIRONMENT,s="beta"===process.env.REACT_APP_ENVIRONMENT,r="production"===process.env.REACT_APP_ENVIRONMENT;exports.isBetaEnv=s,exports.isDevOrQAEnv=e,exports.isProdEnv=r;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),r=require("./StageDesignVActualUtils.js"),t=require("./alerts.js"),s=require("./audio.js"),o=require("./casing/index.js"),i=require("./chartSeries.js"),n=require("./completion.js"),a=require("./components.js"),p=require("./convert.js"),u=require("./csvExport.js"),l=require("./devcenter.js"),c=require("./drillstring/index.js"),x=require("./DrillstringUtils.js"),g=require("./FluidCheckUtils.js"),j=require("./formatting.js"),f=require("./ga.js"),q=require("./goals.js"),m=require("./lasParser.js"),U=require("./loadable.js"),d=require("./main.js"),y=require("./mapUnits.js"),b=require("./mapbox.js"),v=require("./metrics/index.js"),h=require("./mobileDetect.js"),S=require("./nativeMessages.js"),D=require("./notifications.js"),O=require("./feed.js"),w=require("./permissions.js"),P=require("./reports.js"),N=require("./rollbar.js"),T=require("./sqlParser.js"),C=require("./time.js"),I=require("./torqueAndHookloadUtils.js"),A=require("./accuracy.js"),B=require("./notificationToasts.js"),E=require("./devcenterToasts.js"),k=require("./convertKeys.js"),K=require("./dashboardReports.js"),F=require("./apps.js"),L=require("./themeVariables.js"),M=require("./env.js"),V=require("./fileExtension.js"),_=require("./jsonaDataFormatter.js"),H=require("./bha.js"),W=require("./localStorage.js"),J=require("./sharedDCStore.js"),R=require("../components/UserMention/utils/index.js"),z=require("./resolveWellHubSlug.js"),G=require("./delay.js");function Q(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function X(e){return Object.freeze({__proto__:null,default:e})}var Y=Q(e),Z=X(m),$=X(d),ee=X(y),re=X(w);function te(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);r&&(s=s.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,s)}return t}var se={get:function(e,r){var t=e[r];return"function"==typeof t?function(){for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return t.apply(e,s.map((function(e){return e.toJS?e.toJS():e})))}:t}};function oe(e){return new Proxy(function(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?te(Object(t),!0).forEach((function(r){Y.default(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):te(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}({},e),se)}var ie=p.convertArray,ne=p.convertValue,ae=p.getAllUnitTypes,pe=p.getDefaultImperialUnit,ue=p.getDefaultUnits,le=p.getUnitDescription,ce=p.getUnitDisplay,xe=p.getUnitPlural,ge=p.getUnitPreference,je=p.getUnitsByType,fe=p.getUnitSingular,qe=p.getUnitSystem,me=p.updateUserUnits,Ue=p.getUserUnits,de=p.subscribeForUserUnitsUpdates,ye=p.convertImmutables,be=p.convertImmutablesByBatch,ve=p.getUniqueUnitsByType,he=oe(b),Se=oe(a);exports.StageDesignVActualUtils=r,exports.alerts=t,exports.audio=s,exports.casing=o,exports.chartSeries=i,exports.completion=n,exports.convert=p,exports.csvExport=u,exports.devcenter=l,exports.drillstring=c,exports.drillstringUtils=x,exports.fluidCheckUtils=g,exports.formatting=j,exports.ga=f,exports.goals=q,exports.lasParser=Z,exports.loadable=U,exports.main=$,exports.mapUnits=ee,exports.metricsUtils=v,exports.mobileDetect=h,exports.nativeMessages=S,exports.notifications=D,exports.feed=O,exports.permissions=re,exports.reports=P,exports.rollbar=N,exports.sqlParser=T,exports.time=C,exports.torqueAndHookloadUtils=I,exports.accuracy=A,exports.createNotification=B.createNotification,exports.removeNotification=B.removeNotification,exports.showErrorNotification=B.showErrorNotification,exports.showInfoNotification=B.showInfoNotification,exports.showNeutralNotification=B.showNeutralNotification,exports.showSuccessNotification=B.showSuccessNotification,exports.showWarningNotification=B.showWarningNotification,exports.showToast=E.showToast,exports.convertKeysToCamelCase=k.convertKeysToCamelCase,exports.convertKeysToSnakeCase=k.convertKeysToSnakeCase,exports.getConvertKeys=k.getConvertKeys,exports.dashboardReports=K,exports.apps=F,exports.themeVariables=L,exports.env=M,exports.fileExtension=V,exports.jsonaDataFormatter=_.jsonaDataFormatter,exports.bha=H,exports.getLocalStorageItem=W.getLocalStorageItem,exports.updateLocalStorageItem=W.updateLocalStorageItem,exports.sharedDCStore=J.sharedDCStore,exports.formatMentionText=R.formatMentionText,exports.isSuggestionsListOpened=R.isSuggestionsListOpened,exports.resolveWellHubSlug=z,exports.delay=G.delay,exports.components=Se,exports.convertArray=ie,exports.convertImmutables=ye,exports.convertImmutablesByBatch=be,exports.convertValue=ne,exports.getAllUnitTypes=ae,exports.getDefaultImperialUnit=pe,exports.getDefaultUnits=ue,exports.getUniqueUnitsByType=ve,exports.getUnitDescription=le,exports.getUnitDisplay=ce,exports.getUnitPlural=xe,exports.getUnitPreference=ge,exports.getUnitSingular=fe,exports.getUnitSystem=qe,exports.getUnitsByType=je,exports.getUserUnits=Ue,exports.mapbox=he,exports.subscribeForUserUnitsUpdates=de,exports.updateUserUnits=me;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),t=require("./StageDesignVActualUtils.js"),r=require("./alerts.js"),s=require("./audio.js"),o=require("./casing/index.js"),i=require("./chartSeries.js"),n=require("./completion.js"),a=require("./components.js"),p=require("./convert.js"),u=require("./csvExport.js"),c=require("./devcenter.js"),l=require("./drillstring/index.js"),x=require("./DrillstringUtils.js"),g=require("./FluidCheckUtils.js"),j=require("./formatting.js"),f=require("./ga.js"),m=require("./goals.js"),q=require("./lasParser.js"),U=require("./loadable.js"),d=require("./main.js"),y=require("./mapUnits.js"),b=require("./mapbox.js"),v=require("./metrics/index.js"),h=require("./mobileDetect.js"),S=require("./nativeMessages.js"),D=require("./notifications.js"),O=require("./feed.js"),w=require("./permissions.js"),P=require("./reports.js"),N=require("./rollbar.js"),T=require("./time.js"),C=require("./torqueAndHookloadUtils.js"),I=require("./accuracy.js"),A=require("./notificationToasts.js"),B=require("./devcenterToasts.js"),E=require("./convertKeys.js"),k=require("./dashboardReports.js"),K=require("./apps.js"),F=require("./themeVariables.js"),L=require("./env.js"),M=require("./fileExtension.js"),V=require("./jsonaDataFormatter.js"),_=require("./bha.js"),H=require("./localStorage.js"),W=require("./sharedDCStore.js"),J=require("../components/UserMention/utils/index.js"),R=require("./resolveWellHubSlug.js"),z=require("./delay.js");function G(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function Q(e){return Object.freeze({__proto__:null,default:e})}var X=G(e),Y=Q(q),Z=Q(d),$=Q(y),ee=Q(w);function te(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,s)}return r}var re={get:function(e,t){var r=e[t];return"function"==typeof r?function(){for(var t=arguments.length,s=new Array(t),o=0;o<t;o++)s[o]=arguments[o];return r.apply(e,s.map((function(e){return e.toJS?e.toJS():e})))}:r}};function se(e){return new Proxy(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?te(Object(r),!0).forEach((function(t){X.default(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):te(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e),re)}var oe=p.convertArray,ie=p.convertValue,ne=p.getAllUnitTypes,ae=p.getDefaultImperialUnit,pe=p.getDefaultUnits,ue=p.getUnitDescription,ce=p.getUnitDisplay,le=p.getUnitPlural,xe=p.getUnitPreference,ge=p.getUnitsByType,je=p.getUnitSingular,fe=p.getUnitSystem,me=p.updateUserUnits,qe=p.getUserUnits,Ue=p.subscribeForUserUnitsUpdates,de=p.convertImmutables,ye=p.convertImmutablesByBatch,be=p.getUniqueUnitsByType,ve=se(b),he=se(a);exports.StageDesignVActualUtils=t,exports.alerts=r,exports.audio=s,exports.casing=o,exports.chartSeries=i,exports.completion=n,exports.convert=p,exports.csvExport=u,exports.devcenter=c,exports.drillstring=l,exports.drillstringUtils=x,exports.fluidCheckUtils=g,exports.formatting=j,exports.ga=f,exports.goals=m,exports.lasParser=Y,exports.loadable=U,exports.main=Z,exports.mapUnits=$,exports.metricsUtils=v,exports.mobileDetect=h,exports.nativeMessages=S,exports.notifications=D,exports.feed=O,exports.permissions=ee,exports.reports=P,exports.rollbar=N,exports.time=T,exports.torqueAndHookloadUtils=C,exports.accuracy=I,exports.createNotification=A.createNotification,exports.removeNotification=A.removeNotification,exports.showErrorNotification=A.showErrorNotification,exports.showInfoNotification=A.showInfoNotification,exports.showNeutralNotification=A.showNeutralNotification,exports.showSuccessNotification=A.showSuccessNotification,exports.showWarningNotification=A.showWarningNotification,exports.showToast=B.showToast,exports.convertKeysToCamelCase=E.convertKeysToCamelCase,exports.convertKeysToSnakeCase=E.convertKeysToSnakeCase,exports.getConvertKeys=E.getConvertKeys,exports.dashboardReports=k,exports.apps=K,exports.themeVariables=F,exports.env=L,exports.fileExtension=M,exports.jsonaDataFormatter=V.jsonaDataFormatter,exports.bha=_,exports.getLocalStorageItem=H.getLocalStorageItem,exports.updateLocalStorageItem=H.updateLocalStorageItem,exports.sharedDCStore=W.sharedDCStore,exports.formatMentionText=J.formatMentionText,exports.isSuggestionsListOpened=J.isSuggestionsListOpened,exports.resolveWellHubSlug=R,exports.delay=z.delay,exports.components=he,exports.convertArray=oe,exports.convertImmutables=de,exports.convertImmutablesByBatch=ye,exports.convertValue=ie,exports.getAllUnitTypes=ne,exports.getDefaultImperialUnit=ae,exports.getDefaultUnits=pe,exports.getUniqueUnitsByType=be,exports.getUnitDescription=ue,exports.getUnitDisplay=ce,exports.getUnitPlural=le,exports.getUnitPreference=xe,exports.getUnitSingular=je,exports.getUnitSystem=fe,exports.getUnitsByType=ge,exports.getUserUnits=qe,exports.mapbox=ve,exports.subscribeForUserUnitsUpdates=Ue,exports.updateUserUnits=me;
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import r from"@babel/runtime/helpers/objectWithoutProperties";import{useState as o}from"react";import{func as i,node as n,shape as s,number as p}from"prop-types";import{makeStyles as a,Popover as m,Grid as l,Typography as d}from"@material-ui/core";import c from"classnames";import{jsxs as j,jsx as C}from"react/jsx-runtime";import"../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../Modal/CorvaModal.js";import"uuid";import"../IconMenu/index.js";import"../StyledMenuItem/index.js";import"../DevCenter/AppHeader/AppHeader.js";import"../DevCenter/AppSideBar/AppSideBar.js";import"../DevCenter/AppsDataProvider/AppsDataProvider.js";import"lodash";import"../Icons/AnnotationIcon.js";import"../Annotations/components/AnnotationsList/index.js";import"../Annotations/components/LastAnnotation/index.js";import"../Annotations/AnnotationsContext.js";import"../../utils/mobileDetect.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"../../clients/jsonApi/index.js";import"../../clients/subscriptions.js";import"../../constants/goals.js";import"../../constants/segment.js";import"../../constants/alerts.js";import"../../constants/apps.js";import"../../constants/drillstring.js";import"../../constants/completion.js";import"../../constants/notifications.js";import"../../constants/feed.js";import"../../constants/bha.js";import"../GradientManager/configuration/constants.js";import"../../utils/index.js";import"../HelpCenter/HelpCenterIcon.js";import"../DevCenter/AppContext.js";import"../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"react-router";import"../DevCenter/NavigationBar/NavigationBar.js";import"../DevCenter/SideBar/SideBar.js";import"../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../DevCenter/AppFilterPanelLayout/AppFilterPanelLayout.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../AssetEditor/index.js";import"../AppVersionsSelect/AppVersionsSelect.js";import"../LoadingIndicator/LoadingIndicator.js";import"../Typography.js";import"../RealTimeValuesSidebar/RealTimeSidebar.js";import"../CollapsableSidebar.js";import"../DateTimePicker/index.js";import"../DatePicker/index.js";import"../ErrorBoundary/ErrorBoundary.js";import"../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../SlateFormattedText/SlateFormattedText.js";import"../SlateFormattedText/RenderElements.js";import"@babel/runtime/helpers/typeof";import"slate";import"../EmptyState/EmptyState.js";import"../ParameterCharts/ParameterCharts.js";import"../ParameterCharts/AddEditTrack.js";import"../ChartActionsList/ChartActionsList.js";import"../CopyToClipboard/CopyToClipboard.js";import"../AssetEditor/AssetEditorAutocomplete.js";import"../AssetEditor/SingleAssetEditor.js";import"../SettingEditors/ColorEditor/index.js";import"../SettingEditors/DropdownEditor/index.js";import"../SettingEditors/RadioEditor/index.js";import"../SwitchControl/index.js";import"../ColorPicker/ColorPicker.js";import"../Chart/components/ChartButton.js";import"../Chart/components/ChartButtons.js";import"../Chart/components/ChartWrapper.js";import"../Chart/components/AxisDropdown.js";import"../Chart/components/buttons/DragToZoomButton.js";import"../Chart/components/buttons/ZoomInButton.js";import"../Chart/components/buttons/ZoomOutButton.js";import"../Chart/components/buttons/PanButton.js";import"../Chart/components/buttons/ResetZoomButton.js";import"../Chart/components/buttons/HideAxesButton.js";import"../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../TruncatedText/index.js";import"../RangeSlider/RangeSlider.js";import"../AdvancedSlider/AdvancedSlider.js";import"../Breadcrumbs/index.js";import"../VirtualizedTable/index.js";import"../EmptyView/EmptyView.js";import"../EmptyView/EmptyAppView/EmptyAppView.js";import"../Button/index.js";import"../ContextMenuItem/index.js";import"../FolderMenuItem/index.js";import"../EditableItem/EditableItem/index.js";import"../EditableItem/EditableItemWithBadge/index.js";import"../Checkbox/index.js";import"../FolderMenuItemWithLinks/index.js";import u from"../IconButton/index.js";import"../TextField/index.js";import"../Chip/index.js";import"../Counter/index.js";import"../AnchorsList/AnchorsList.js";import"../Select/index.js";import"../CustomSelect/index.js";import"../Tabs/Tabs.js";import"../Tabs/Tab.js";import"../ResizableTable/ResizableTable.js";import"@material-ui/icons/Check";import"@material-ui/icons/Close";import"@material-ui/icons/Edit";import"@material-ui/icons/Delete";import"../GradientManager/GradientList.js";import"@material-ui/icons/AddCircle";import"../GradientManager/GradientPreview/GradientPreview.js";import"../GradientManager/GradientSelect.styles.js";import"../GradientPicker/GradientPicker.js";import"../GradientManager/GradientManager.styles.js";import"../Drillstring/BHASchematic.js";import"../Drillstring/BHATable/index.js";import"../Drillstring/BHAComponentIcon.js";import"../Drillstring/BHAComponentDetail/index.js";import"../Drillstring/BHATileIcon.js";import"../Drillstring/BHATile/BHATile.js";import"../Drillstring/BHAList/BHAList.js";import"../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../Casing/CasingTable/index.js";import"../Casing/CasingComponentIcon.js";import"../Casing/CasingTileIcon.js";import"../Casing/CasingTableV2/CasingTableV2.js";import"../Casing/CasingTile/CasingTile.js";import"../DisabledSettingsMessage/DisabledSettingsMessage.js";import"../WellSummary/WellSummaryItemLabel.js";import"../WellSummary/WellSummaryItemTitle.js";import"../WellSummary/WellSummaryItemValue.js";import"../WellSummary/ActivitySummaryChart.js";import"../WellSummary/FracWirelineTimeChart.js";import"../BICOffsetPickerDialog/index.js";import"../OffsetWellButton/OffsetWellButton.js";import"../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../OffsetWellPickerV3/index.js";import"../OffsetWellChips/Chip.js";import"../OffsetWellChips/ChipsContainer.js";import"../OffsetWellPickerV4/OffsetWellPickerV4.js";import"../OffsetWellMap/OffsetWellMap.js";import"@material-ui/core/Snackbar";import"../Notifications/Toast.js";import"../Toaster/Toaster.js";import"../ConfirmationDialog.js";import"../TextLink/index.js";import"../Avatar/index.js";import"../Template/TemplatePopover/index.js";import"../Template/TemplateSharingDialog/index.js";import"../MenuItem/index.js";import"../PadModeSelect/PadModeSelect.js";import"../PinnableFilters/PinnableFilters.js";import"../HeaderLayout/HeaderLayout.js";import"../PadOffsetsPicker/PadOffsetsPicker.js";import"../PadOffsetsPicker/OffsetAssetChip.js";import"../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../PadOffsetsPicker/StagesSelector.js";import"../Table/TableToolbar/TableToolbar.js";import"../Table/TableContainer/TableContainer.js";import"../Table/TableCell/TableCell.js";import"../Tooltip/ScrollableTooltip.js";import"../PriceInput/PriceInput.js";import"../LabelsCounter/LabelsCounter.js";import"../Stepper/Step.js";import"../Stepper/StepsWrapper.js";import"../Stepper/Stepper.js";import"../Comment/CommentIcon/index.js";import"../FilesLoader/FilesLoader.js";import"../FilesLoader/Icons/FileIcon.js";import"../SearchInput/index.js";import"../FeedItem/FeedItem.js";import"../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../PostInput/PostInput.js";import"../KeyboardDateTimePicker.js";import"./Popup.js";import"../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../StageDesignVActual/ComparisonHeader.js";import"../StageDesignVActual/ComparisonRow.js";import"../EmbeddedApp/DevCenterEmbeddedApp.js";import"../EmbeddedApp/EmbeddedApp.js";import"../Autocomplete/Autocomplete.js";import"../DocumentViewer/DocumentViewer.js";import"../ColorPickerPalette/ColorPickerPalette.js";import"../Search/Search.js";import"../Search/components/Listbox.js";import"../Search/components/Paper.js";import"../Search/components/RecentSearches.js";import"../Search/components/InputAdornmentLeft.js";import"../Search/components/Groups.js";import"../StatusBadge/index.js";import"../Attachment/index.js";import"../EmojiIconButton.js";import"../FileUploadIconButton.js";import"../FilePreview/index.js";import"../FailedFileUploading.js";import"../UserMention/index.js";import"../CommentsInfo/index.js";import"../CommentInput/index.js";import"../Comment/index.js";import"../CommentLoader.js";import"../AssetNameLabel/AssetStatusBadge.js";import A from"../Icons/SendIcon.js";import g from"./components/Content.js";var b=["anchorEl","anchorOrigin","onClose","onSave","startAdornment","endAdornment","customContent","userCompanyId"];function v(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 D(t){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?v(Object(o),!0).forEach((function(r){e(t,r,o[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):v(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var h=a((function(e){return{paper:{width:368,padding:16},inputMain:{marginBottom:0,fontSize:"11px",color:e.palette.primary.text8},inputHelper:{display:"flex",paddingRight:5},cancelText:{cursor:"pointer"},highlightedLabel:{color:e.palette.primary.main},actions:{height:36},sendRow:{display:"flex"},sendIcon:{"&.Mui-disabled":{cursor:"not-allowed!important"}}}}));function f(e){var i=e.anchorEl,n=e.anchorOrigin,s=e.onClose,p=e.onSave,a=e.startAdornment,v=e.endAdornment,f=e.customContent,P=e.userCompanyId,S=r(e,b),x=h(),y=o(),I=t(y,2),T=I[0],E=I[1];return j(m,D(D({open:!0,anchorEl:i,anchorOrigin:n,onClose:s,classes:{paper:x.paper}},S),{},{children:[C(g,{userCompanyId:P,startAdornment:a,endAdornment:v,customContent:f,setComment:E,onSave:function(){return p(T)},smallerView:!0,comment:T}),j(l,{container:!0,direction:"row",justify:"space-between",alignItems:"center",className:x.actions,children:[C(l,{item:!0,children:C(d,{"data-testid":"".concat("AddCommentPopover","_cancel"),variant:"caption",className:c(x.inputMain,x.cancelText,x.highlightedLabel),component:"div",gutterBottom:!0,onClick:s,children:"Cancel"})}),j(l,{item:!0,direction:"row",alignItems:"center",className:x.sendRow,children:[j(d,{variant:"caption",className:c(x.inputMain,x.inputHelper),component:"div",gutterBottom:!0,children:["Press ",C(d,{variant:"caption",color:"primary",className:c(x.inputMain,x.highlightedLabel),children:"Enter"})," to send"]}),C(u,{"data-testid":"".concat("AddCommentPopover","_send"),onClick:function(){return p(T)},className:x.sendIcon,disabled:!T||!T.body&&!T.attachment,children:C(A,{})})]})]})]}))}f.propTypes={onClose:i,onSave:i.isRequired,anchorEl:n.isRequired,anchorOrigin:s,startAdornment:n,endAdornment:n,customContent:n,userCompanyId:p.isRequired},f.defaultProps={anchorOrigin:{horizontal:"right",vertical:"bottom"},onClose:function(){},startAdornment:null,endAdornment:null,customContent:null};export{f as default};
1
+ import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import r from"@babel/runtime/helpers/objectWithoutProperties";import{useState as o}from"react";import{func as i,node as n,shape as s,number as p}from"prop-types";import{makeStyles as a,Popover as m,Grid as l,Typography as d}from"@material-ui/core";import c from"classnames";import{jsxs as j,jsx as C}from"react/jsx-runtime";import"../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../Modal/CorvaModal.js";import"uuid";import"../IconMenu/index.js";import"../StyledMenuItem/index.js";import"../DevCenter/AppHeader/AppHeader.js";import"../DevCenter/AppSideBar/AppSideBar.js";import"../DevCenter/AppsDataProvider/AppsDataProvider.js";import"lodash";import"../Icons/AnnotationIcon.js";import"../Annotations/components/AnnotationsList/index.js";import"../Annotations/components/LastAnnotation/index.js";import"../Annotations/AnnotationsContext.js";import"../../utils/mobileDetect.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"../../clients/jsonApi/index.js";import"../../clients/subscriptions.js";import"../../constants/goals.js";import"../../constants/segment.js";import"../../constants/alerts.js";import"../../constants/apps.js";import"../../constants/drillstring.js";import"../../constants/completion.js";import"../../constants/notifications.js";import"../../constants/feed.js";import"../../constants/bha.js";import"../../utils/env.js";import"../GradientManager/configuration/constants.js";import"../../utils/index.js";import"jsona";import"../StatusBadge/constants.js";import"../HelpCenter/HelpCenterIcon.js";import"../DevCenter/AppContext.js";import"../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"react-router";import"../DevCenter/NavigationBar/NavigationBar.js";import"../DevCenter/SideBar/SideBar.js";import"../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../DevCenter/AppFilterPanelLayout/AppFilterPanelLayout.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../AssetEditor/index.js";import"../AppVersionsSelect/AppVersionsSelect.js";import"../LoadingIndicator/LoadingIndicator.js";import"../Typography.js";import"../RealTimeValuesSidebar/RealTimeSidebar.js";import"../CollapsableSidebar.js";import"../DateTimePicker/index.js";import"../DatePicker/index.js";import"../ErrorBoundary/ErrorBoundary.js";import"../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../SlateFormattedText/SlateFormattedText.js";import"../SlateFormattedText/RenderElements.js";import"@babel/runtime/helpers/typeof";import"slate";import"../EmptyState/EmptyState.js";import"../ParameterCharts/ParameterCharts.js";import"../ParameterCharts/AddEditTrack.js";import"../ChartActionsList/ChartActionsList.js";import"../CopyToClipboard/CopyToClipboard.js";import"../AssetEditor/AssetEditorAutocomplete.js";import"../AssetEditor/SingleAssetEditor.js";import"../SettingEditors/ColorEditor/index.js";import"../SettingEditors/DropdownEditor/index.js";import"../SettingEditors/RadioEditor/index.js";import"../SwitchControl/index.js";import"../ColorPicker/ColorPicker.js";import"../Chart/components/ChartButton.js";import"../Chart/components/ChartButtons.js";import"../Chart/components/ChartWrapper.js";import"../Chart/components/AxisDropdown.js";import"../Chart/components/buttons/DragToZoomButton.js";import"../Chart/components/buttons/ZoomInButton.js";import"../Chart/components/buttons/ZoomOutButton.js";import"../Chart/components/buttons/PanButton.js";import"../Chart/components/buttons/ResetZoomButton.js";import"../Chart/components/buttons/HideAxesButton.js";import"../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../TruncatedText/index.js";import"../RangeSlider/RangeSlider.js";import"../AdvancedSlider/AdvancedSlider.js";import"../Breadcrumbs/index.js";import"../VirtualizedTable/index.js";import"../EmptyView/EmptyView.js";import"../EmptyView/EmptyAppView/EmptyAppView.js";import"../Button/index.js";import"../ContextMenuItem/index.js";import"../FolderMenuItem/index.js";import"../EditableItem/EditableItem/index.js";import"../EditableItem/EditableItemWithBadge/index.js";import"../Checkbox/index.js";import"../FolderMenuItemWithLinks/index.js";import u from"../IconButton/index.js";import"../TextField/index.js";import"../Chip/index.js";import"../Counter/index.js";import"../AnchorsList/AnchorsList.js";import"../Select/index.js";import"../CustomSelect/index.js";import"../Tabs/Tabs.js";import"../Tabs/Tab.js";import"../ResizableTable/ResizableTable.js";import"@material-ui/icons/Check";import"@material-ui/icons/Close";import"@material-ui/icons/Edit";import"@material-ui/icons/Delete";import"../GradientManager/GradientList.js";import"@material-ui/icons/AddCircle";import"../GradientManager/GradientPreview/GradientPreview.js";import"../GradientManager/GradientSelect.styles.js";import"../GradientPicker/GradientPicker.js";import"../GradientManager/GradientManager.styles.js";import"../Drillstring/BHASchematic.js";import"../Drillstring/BHATable/index.js";import"../Drillstring/BHAComponentIcon.js";import"../Drillstring/BHAComponentDetail/index.js";import"../Drillstring/BHATileIcon.js";import"../Drillstring/BHATile/BHATile.js";import"../Drillstring/BHAList/BHAList.js";import"../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../Casing/CasingTable/index.js";import"../Casing/CasingComponentIcon.js";import"../Casing/CasingTileIcon.js";import"../Casing/CasingTableV2/CasingTableV2.js";import"../Casing/CasingTile/CasingTile.js";import"../DisabledSettingsMessage/DisabledSettingsMessage.js";import"../WellSummary/WellSummaryItemLabel.js";import"../WellSummary/WellSummaryItemTitle.js";import"../WellSummary/WellSummaryItemValue.js";import"../WellSummary/ActivitySummaryChart.js";import"../WellSummary/FracWirelineTimeChart.js";import"../BICOffsetPickerDialog/index.js";import"../OffsetWellButton/OffsetWellButton.js";import"../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../OffsetWellPickerV3/index.js";import"../OffsetWellChips/Chip.js";import"../OffsetWellChips/ChipsContainer.js";import"../OffsetWellPickerV4/OffsetWellPickerV4.js";import"../OffsetWellMap/OffsetWellMap.js";import"@material-ui/core/Snackbar";import"../Notifications/Toast.js";import"../Toaster/Toaster.js";import"../ConfirmationDialog.js";import"../TextLink/index.js";import"../Avatar/index.js";import"../Template/TemplatePopover/index.js";import"../Template/TemplateSharingDialog/index.js";import"../MenuItem/index.js";import"../PadModeSelect/PadModeSelect.js";import"../PinnableFilters/PinnableFilters.js";import"../HeaderLayout/HeaderLayout.js";import"../PadOffsetsPicker/PadOffsetsPicker.js";import"../PadOffsetsPicker/OffsetAssetChip.js";import"../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../PadOffsetsPicker/StagesSelector.js";import"../Table/TableToolbar/TableToolbar.js";import"../Table/TableContainer/TableContainer.js";import"../Table/TableCell/TableCell.js";import"../Tooltip/ScrollableTooltip.js";import"../PriceInput/PriceInput.js";import"../LabelsCounter/LabelsCounter.js";import"../Stepper/Step.js";import"../Stepper/StepsWrapper.js";import"../Stepper/Stepper.js";import"../Comment/CommentIcon/index.js";import"../FilesLoader/FilesLoader.js";import"../FilesLoader/Icons/FileIcon.js";import"../SearchInput/index.js";import"../FeedItem/FeedItem.js";import"../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../PostInput/PostInput.js";import"../KeyboardDateTimePicker.js";import"./Popup.js";import"../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../StageDesignVActual/ComparisonHeader.js";import"../StageDesignVActual/ComparisonRow.js";import"../EmbeddedApp/DevCenterEmbeddedApp.js";import"../EmbeddedApp/EmbeddedApp.js";import"../Autocomplete/Autocomplete.js";import"../DocumentViewer/DocumentViewer.js";import"../ColorPickerPalette/ColorPickerPalette.js";import"../Search/Search.js";import"../Search/components/Listbox.js";import"../Search/components/Paper.js";import"../Search/components/RecentSearches.js";import"../Search/components/InputAdornmentLeft.js";import"../Search/components/Groups.js";import"../StatusBadge/index.js";import"../Attachment/index.js";import"../EmojiIconButton.js";import"../FileUploadIconButton.js";import"../FilePreview/index.js";import"../FailedFileUploading.js";import"../UserMention/index.js";import"../CommentsInfo/index.js";import"../CommentInput/index.js";import"../Comment/index.js";import"../CommentLoader.js";import"../AssetNameLabel/AssetStatusBadge.js";import A from"../Icons/SendIcon.js";import g from"./components/Content.js";var b=["anchorEl","anchorOrigin","onClose","onSave","startAdornment","endAdornment","customContent","userCompanyId"];function v(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 D(t){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?v(Object(o),!0).forEach((function(r){e(t,r,o[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):v(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var h=a((function(e){return{paper:{width:368,padding:16},inputMain:{marginBottom:0,fontSize:"11px",color:e.palette.primary.text8},inputHelper:{display:"flex",paddingRight:5},cancelText:{cursor:"pointer"},highlightedLabel:{color:e.palette.primary.main},actions:{height:36},sendRow:{display:"flex"},sendIcon:{"&.Mui-disabled":{cursor:"not-allowed!important"}}}}));function f(e){var i=e.anchorEl,n=e.anchorOrigin,s=e.onClose,p=e.onSave,a=e.startAdornment,v=e.endAdornment,f=e.customContent,P=e.userCompanyId,S=r(e,b),x=h(),y=o(),I=t(y,2),T=I[0],E=I[1];return j(m,D(D({open:!0,anchorEl:i,anchorOrigin:n,onClose:s,classes:{paper:x.paper}},S),{},{children:[C(g,{userCompanyId:P,startAdornment:a,endAdornment:v,customContent:f,setComment:E,onSave:function(){return p(T)},smallerView:!0,comment:T}),j(l,{container:!0,direction:"row",justify:"space-between",alignItems:"center",className:x.actions,children:[C(l,{item:!0,children:C(d,{"data-testid":"".concat("AddCommentPopover","_cancel"),variant:"caption",className:c(x.inputMain,x.cancelText,x.highlightedLabel),component:"div",gutterBottom:!0,onClick:s,children:"Cancel"})}),j(l,{item:!0,direction:"row",alignItems:"center",className:x.sendRow,children:[j(d,{variant:"caption",className:c(x.inputMain,x.inputHelper),component:"div",gutterBottom:!0,children:["Press ",C(d,{variant:"caption",color:"primary",className:c(x.inputMain,x.highlightedLabel),children:"Enter"})," to send"]}),C(u,{"data-testid":"".concat("AddCommentPopover","_send"),onClick:function(){return p(T)},className:x.sendIcon,disabled:!T||!T.body&&!T.attachment,children:C(A,{})})]})]})]}))}f.propTypes={onClose:i,onSave:i.isRequired,anchorEl:n.isRequired,anchorOrigin:s,startAdornment:n,endAdornment:n,customContent:n,userCompanyId:p.isRequired},f.defaultProps={anchorOrigin:{horizontal:"right",vertical:"bottom"},onClose:function(){},startAdornment:null,endAdornment:null,customContent:null};export{f as default};
@@ -1 +1 @@
1
- import{useRef as e}from"react";import{node as t,number as r,func as o,bool as i,shape as n}from"prop-types";import{makeStyles as s}from"@material-ui/core";import{jsxs as p,jsx as m}from"react/jsx-runtime";import"../../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../../DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.js";import"../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../Modal/CorvaModal.js";import"uuid";import"../../IconMenu/index.js";import"../../StyledMenuItem/index.js";import"../../DevCenter/AppHeader/AppHeader.js";import"../../DevCenter/AppSideBar/AppSideBar.js";import"../../DevCenter/AppsDataProvider/AppsDataProvider.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/slicedToArray";import"classnames";import"lodash";import"../../Icons/AnnotationIcon.js";import"../../Annotations/components/AnnotationsList/index.js";import"../../Annotations/components/LastAnnotation/index.js";import"../../Annotations/AnnotationsContext.js";import"../../../utils/mobileDetect.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"../../../clients/jsonApi/index.js";import"../../../clients/subscriptions.js";import"../../../constants/goals.js";import"../../../constants/segment.js";import"../../../constants/alerts.js";import"../../../constants/apps.js";import"../../../constants/drillstring.js";import"../../../constants/completion.js";import"../../../constants/notifications.js";import"../../../constants/feed.js";import"../../../constants/bha.js";import"../../GradientManager/configuration/constants.js";import"../../../utils/index.js";import"../../HelpCenter/HelpCenterIcon.js";import"../../DevCenter/AppContext.js";import"../../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"@babel/runtime/helpers/objectWithoutProperties";import"react-router";import"../../DevCenter/NavigationBar/NavigationBar.js";import"../../DevCenter/SideBar/SideBar.js";import"../../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../../DevCenter/AppFilterPanelLayout/AppFilterPanelLayout.js";import"../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../../AssetEditor/index.js";import"../../AppVersionsSelect/AppVersionsSelect.js";import"../../LoadingIndicator/LoadingIndicator.js";import"../../Typography.js";import"../../RealTimeValuesSidebar/RealTimeSidebar.js";import"../../CollapsableSidebar.js";import"../../DateTimePicker/index.js";import"../../DatePicker/index.js";import"../../ErrorBoundary/ErrorBoundary.js";import"../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../SlateFormattedText/SlateFormattedText.js";import"../../SlateFormattedText/RenderElements.js";import"@babel/runtime/helpers/typeof";import"slate";import"../../EmptyState/EmptyState.js";import"../../ParameterCharts/ParameterCharts.js";import"../../ParameterCharts/AddEditTrack.js";import"../../ChartActionsList/ChartActionsList.js";import"../../CopyToClipboard/CopyToClipboard.js";import"../../AssetEditor/AssetEditorAutocomplete.js";import"../../AssetEditor/SingleAssetEditor.js";import"../../SettingEditors/ColorEditor/index.js";import"../../SettingEditors/DropdownEditor/index.js";import"../../SettingEditors/RadioEditor/index.js";import"../../SwitchControl/index.js";import"../../ColorPicker/ColorPicker.js";import"../../Chart/components/ChartButton.js";import"../../Chart/components/ChartButtons.js";import"../../Chart/components/ChartWrapper.js";import"../../Chart/components/AxisDropdown.js";import"../../Chart/components/buttons/DragToZoomButton.js";import"../../Chart/components/buttons/ZoomInButton.js";import"../../Chart/components/buttons/ZoomOutButton.js";import"../../Chart/components/buttons/PanButton.js";import"../../Chart/components/buttons/ResetZoomButton.js";import"../../Chart/components/buttons/HideAxesButton.js";import"../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../TruncatedText/index.js";import"../../RangeSlider/RangeSlider.js";import"../../AdvancedSlider/AdvancedSlider.js";import"../../Breadcrumbs/index.js";import"../../VirtualizedTable/index.js";import"../../EmptyView/EmptyView.js";import"../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../Button/index.js";import"../../ContextMenuItem/index.js";import"../../FolderMenuItem/index.js";import"../../EditableItem/EditableItem/index.js";import"../../EditableItem/EditableItemWithBadge/index.js";import"../../Checkbox/index.js";import"../../FolderMenuItemWithLinks/index.js";import"../../IconButton/index.js";import"../../TextField/index.js";import"../../Chip/index.js";import"../../Counter/index.js";import"../../AnchorsList/AnchorsList.js";import"../../Select/index.js";import"../../CustomSelect/index.js";import"../../Tabs/Tabs.js";import"../../Tabs/Tab.js";import"../../ResizableTable/ResizableTable.js";import"@material-ui/icons/Check";import"@material-ui/icons/Close";import"@material-ui/icons/Edit";import"@material-ui/icons/Delete";import"../../GradientManager/GradientList.js";import"@material-ui/icons/AddCircle";import"../../GradientManager/GradientPreview/GradientPreview.js";import"../../GradientManager/GradientSelect.styles.js";import"../../GradientPicker/GradientPicker.js";import"../../GradientManager/GradientManager.styles.js";import"../../Drillstring/BHASchematic.js";import"../../Drillstring/BHATable/index.js";import"../../Drillstring/BHAComponentIcon.js";import"../../Drillstring/BHAComponentDetail/index.js";import"../../Drillstring/BHATileIcon.js";import"../../Drillstring/BHATile/BHATile.js";import"../../Drillstring/BHAList/BHAList.js";import"../../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../../Casing/CasingTable/index.js";import"../../Casing/CasingComponentIcon.js";import"../../Casing/CasingTileIcon.js";import"../../Casing/CasingTableV2/CasingTableV2.js";import"../../Casing/CasingTile/CasingTile.js";import"../../DisabledSettingsMessage/DisabledSettingsMessage.js";import"../../WellSummary/WellSummaryItemLabel.js";import"../../WellSummary/WellSummaryItemTitle.js";import"../../WellSummary/WellSummaryItemValue.js";import"../../WellSummary/ActivitySummaryChart.js";import"../../WellSummary/FracWirelineTimeChart.js";import"../../BICOffsetPickerDialog/index.js";import"../../OffsetWellButton/OffsetWellButton.js";import"../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../OffsetWellPickerV3/index.js";import"../../OffsetWellChips/Chip.js";import"../../OffsetWellChips/ChipsContainer.js";import"../../OffsetWellPickerV4/OffsetWellPickerV4.js";import"../../OffsetWellMap/OffsetWellMap.js";import"@material-ui/core/Snackbar";import"../../Notifications/Toast.js";import"../../Toaster/Toaster.js";import"../../ConfirmationDialog.js";import"../../TextLink/index.js";import"../../Avatar/index.js";import"../../Template/TemplatePopover/index.js";import"../../Template/TemplateSharingDialog/index.js";import"../../MenuItem/index.js";import"../../PadModeSelect/PadModeSelect.js";import"../../PinnableFilters/PinnableFilters.js";import"../../HeaderLayout/HeaderLayout.js";import"../../PadOffsetsPicker/PadOffsetsPicker.js";import"../../PadOffsetsPicker/OffsetAssetChip.js";import"../../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../../PadOffsetsPicker/StagesSelector.js";import"../../Table/TableToolbar/TableToolbar.js";import"../../Table/TableContainer/TableContainer.js";import"../../Table/TableCell/TableCell.js";import"../../Tooltip/ScrollableTooltip.js";import"../../PriceInput/PriceInput.js";import"../../LabelsCounter/LabelsCounter.js";import"../../Stepper/Step.js";import"../../Stepper/StepsWrapper.js";import"../../Stepper/Stepper.js";import"../../Comment/CommentIcon/index.js";import"../../FilesLoader/FilesLoader.js";import"../../FilesLoader/Icons/FileIcon.js";import"../../SearchInput/index.js";import"../../FeedItem/FeedItem.js";import"../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import a from"../../PostInput/PostInput.js";import"../../KeyboardDateTimePicker.js";import"../Popover.js";import"../Popup.js";import"../../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../../StageDesignVActual/ComparisonHeader.js";import"../../StageDesignVActual/ComparisonRow.js";import"../../EmbeddedApp/DevCenterEmbeddedApp.js";import"../../EmbeddedApp/EmbeddedApp.js";import"../../Autocomplete/Autocomplete.js";import"../../DocumentViewer/DocumentViewer.js";import"../../ColorPickerPalette/ColorPickerPalette.js";import"../../Search/Search.js";import"../../Search/components/Listbox.js";import"../../Search/components/Paper.js";import"../../Search/components/RecentSearches.js";import"../../Search/components/InputAdornmentLeft.js";import"../../Search/components/Groups.js";import"../../StatusBadge/index.js";import"../../Attachment/index.js";import"../../EmojiIconButton.js";import"../../FileUploadIconButton.js";import"../../FilePreview/index.js";import"../../FailedFileUploading.js";import"../../UserMention/index.js";import"../../CommentsInfo/index.js";import"../../CommentInput/index.js";import"../../Comment/index.js";import"../../CommentLoader.js";import"../../AssetNameLabel/AssetStatusBadge.js";import{isSuggestionsListOpened as l}from"../../UserMention/utils/index.js";var d=s({postInput:{paddingBottom:8},filePreviewWrapper:function(e){return{width:"100%",marginLeft:0,maxHeight:e.smallerView?127:251}}});function j(t){var r=t.userCompanyId,o=t.startAdornment,i=t.endAdornment,n=t.customContent,s=t.setComment,j=t.smallerView,c=t.onSave,C=t.comment,u=d({smallerView:j}),A=e();return p("div",{ref:A,children:[o,n||m(a,{userCompanyId:r,onChange:s,filePreviewWrapperClass:u.filePreviewWrapper,className:u.postInput,smallerView:j,onKeyDown:function(e){"Enter"!==e.key||e.shiftKey||l()||(e.preventDefault(),c(C))},suggestionsPortalHost:A.current,allowSuggestionsAboveCursor:!0}),i]})}j.propTypes={startAdornment:t,endAdornment:t,customContent:t,userCompanyId:r.isRequired,setComment:o,onSave:o,smallerView:i,comment:n()},j.defaultProps={startAdornment:null,endAdornment:null,customContent:null,setComment:function(){},onSave:function(){},smallerView:!1,comment:void 0};export{j as default};
1
+ import{useRef as e}from"react";import{node as t,number as r,func as o,bool as i,shape as n}from"prop-types";import{makeStyles as s}from"@material-ui/core";import{jsxs as p,jsx as m}from"react/jsx-runtime";import"../../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../../DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.js";import"../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../Modal/CorvaModal.js";import"uuid";import"../../IconMenu/index.js";import"../../StyledMenuItem/index.js";import"../../DevCenter/AppHeader/AppHeader.js";import"../../DevCenter/AppSideBar/AppSideBar.js";import"../../DevCenter/AppsDataProvider/AppsDataProvider.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/slicedToArray";import"classnames";import"lodash";import"../../Icons/AnnotationIcon.js";import"../../Annotations/components/AnnotationsList/index.js";import"../../Annotations/components/LastAnnotation/index.js";import"../../Annotations/AnnotationsContext.js";import"../../../utils/mobileDetect.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"../../../clients/jsonApi/index.js";import"../../../clients/subscriptions.js";import"../../../constants/goals.js";import"../../../constants/segment.js";import"../../../constants/alerts.js";import"../../../constants/apps.js";import"../../../constants/drillstring.js";import"../../../constants/completion.js";import"../../../constants/notifications.js";import"../../../constants/feed.js";import"../../../constants/bha.js";import"../../../utils/env.js";import"../../GradientManager/configuration/constants.js";import"../../../utils/index.js";import"jsona";import"../../StatusBadge/constants.js";import"../../HelpCenter/HelpCenterIcon.js";import"../../DevCenter/AppContext.js";import"../../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"@babel/runtime/helpers/objectWithoutProperties";import"react-router";import"../../DevCenter/NavigationBar/NavigationBar.js";import"../../DevCenter/SideBar/SideBar.js";import"../../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../../DevCenter/AppFilterPanelLayout/AppFilterPanelLayout.js";import"../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../../AssetEditor/index.js";import"../../AppVersionsSelect/AppVersionsSelect.js";import"../../LoadingIndicator/LoadingIndicator.js";import"../../Typography.js";import"../../RealTimeValuesSidebar/RealTimeSidebar.js";import"../../CollapsableSidebar.js";import"../../DateTimePicker/index.js";import"../../DatePicker/index.js";import"../../ErrorBoundary/ErrorBoundary.js";import"../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../SlateFormattedText/SlateFormattedText.js";import"../../SlateFormattedText/RenderElements.js";import"@babel/runtime/helpers/typeof";import"slate";import"../../EmptyState/EmptyState.js";import"../../ParameterCharts/ParameterCharts.js";import"../../ParameterCharts/AddEditTrack.js";import"../../ChartActionsList/ChartActionsList.js";import"../../CopyToClipboard/CopyToClipboard.js";import"../../AssetEditor/AssetEditorAutocomplete.js";import"../../AssetEditor/SingleAssetEditor.js";import"../../SettingEditors/ColorEditor/index.js";import"../../SettingEditors/DropdownEditor/index.js";import"../../SettingEditors/RadioEditor/index.js";import"../../SwitchControl/index.js";import"../../ColorPicker/ColorPicker.js";import"../../Chart/components/ChartButton.js";import"../../Chart/components/ChartButtons.js";import"../../Chart/components/ChartWrapper.js";import"../../Chart/components/AxisDropdown.js";import"../../Chart/components/buttons/DragToZoomButton.js";import"../../Chart/components/buttons/ZoomInButton.js";import"../../Chart/components/buttons/ZoomOutButton.js";import"../../Chart/components/buttons/PanButton.js";import"../../Chart/components/buttons/ResetZoomButton.js";import"../../Chart/components/buttons/HideAxesButton.js";import"../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../TruncatedText/index.js";import"../../RangeSlider/RangeSlider.js";import"../../AdvancedSlider/AdvancedSlider.js";import"../../Breadcrumbs/index.js";import"../../VirtualizedTable/index.js";import"../../EmptyView/EmptyView.js";import"../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../Button/index.js";import"../../ContextMenuItem/index.js";import"../../FolderMenuItem/index.js";import"../../EditableItem/EditableItem/index.js";import"../../EditableItem/EditableItemWithBadge/index.js";import"../../Checkbox/index.js";import"../../FolderMenuItemWithLinks/index.js";import"../../IconButton/index.js";import"../../TextField/index.js";import"../../Chip/index.js";import"../../Counter/index.js";import"../../AnchorsList/AnchorsList.js";import"../../Select/index.js";import"../../CustomSelect/index.js";import"../../Tabs/Tabs.js";import"../../Tabs/Tab.js";import"../../ResizableTable/ResizableTable.js";import"@material-ui/icons/Check";import"@material-ui/icons/Close";import"@material-ui/icons/Edit";import"@material-ui/icons/Delete";import"../../GradientManager/GradientList.js";import"@material-ui/icons/AddCircle";import"../../GradientManager/GradientPreview/GradientPreview.js";import"../../GradientManager/GradientSelect.styles.js";import"../../GradientPicker/GradientPicker.js";import"../../GradientManager/GradientManager.styles.js";import"../../Drillstring/BHASchematic.js";import"../../Drillstring/BHATable/index.js";import"../../Drillstring/BHAComponentIcon.js";import"../../Drillstring/BHAComponentDetail/index.js";import"../../Drillstring/BHATileIcon.js";import"../../Drillstring/BHATile/BHATile.js";import"../../Drillstring/BHAList/BHAList.js";import"../../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../../Casing/CasingTable/index.js";import"../../Casing/CasingComponentIcon.js";import"../../Casing/CasingTileIcon.js";import"../../Casing/CasingTableV2/CasingTableV2.js";import"../../Casing/CasingTile/CasingTile.js";import"../../DisabledSettingsMessage/DisabledSettingsMessage.js";import"../../WellSummary/WellSummaryItemLabel.js";import"../../WellSummary/WellSummaryItemTitle.js";import"../../WellSummary/WellSummaryItemValue.js";import"../../WellSummary/ActivitySummaryChart.js";import"../../WellSummary/FracWirelineTimeChart.js";import"../../BICOffsetPickerDialog/index.js";import"../../OffsetWellButton/OffsetWellButton.js";import"../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../OffsetWellPickerV3/index.js";import"../../OffsetWellChips/Chip.js";import"../../OffsetWellChips/ChipsContainer.js";import"../../OffsetWellPickerV4/OffsetWellPickerV4.js";import"../../OffsetWellMap/OffsetWellMap.js";import"@material-ui/core/Snackbar";import"../../Notifications/Toast.js";import"../../Toaster/Toaster.js";import"../../ConfirmationDialog.js";import"../../TextLink/index.js";import"../../Avatar/index.js";import"../../Template/TemplatePopover/index.js";import"../../Template/TemplateSharingDialog/index.js";import"../../MenuItem/index.js";import"../../PadModeSelect/PadModeSelect.js";import"../../PinnableFilters/PinnableFilters.js";import"../../HeaderLayout/HeaderLayout.js";import"../../PadOffsetsPicker/PadOffsetsPicker.js";import"../../PadOffsetsPicker/OffsetAssetChip.js";import"../../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../../PadOffsetsPicker/StagesSelector.js";import"../../Table/TableToolbar/TableToolbar.js";import"../../Table/TableContainer/TableContainer.js";import"../../Table/TableCell/TableCell.js";import"../../Tooltip/ScrollableTooltip.js";import"../../PriceInput/PriceInput.js";import"../../LabelsCounter/LabelsCounter.js";import"../../Stepper/Step.js";import"../../Stepper/StepsWrapper.js";import"../../Stepper/Stepper.js";import"../../Comment/CommentIcon/index.js";import"../../FilesLoader/FilesLoader.js";import"../../FilesLoader/Icons/FileIcon.js";import"../../SearchInput/index.js";import"../../FeedItem/FeedItem.js";import"../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import a from"../../PostInput/PostInput.js";import"../../KeyboardDateTimePicker.js";import"../Popover.js";import"../Popup.js";import"../../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../../StageDesignVActual/ComparisonHeader.js";import"../../StageDesignVActual/ComparisonRow.js";import"../../EmbeddedApp/DevCenterEmbeddedApp.js";import"../../EmbeddedApp/EmbeddedApp.js";import"../../Autocomplete/Autocomplete.js";import"../../DocumentViewer/DocumentViewer.js";import"../../ColorPickerPalette/ColorPickerPalette.js";import"../../Search/Search.js";import"../../Search/components/Listbox.js";import"../../Search/components/Paper.js";import"../../Search/components/RecentSearches.js";import"../../Search/components/InputAdornmentLeft.js";import"../../Search/components/Groups.js";import"../../StatusBadge/index.js";import"../../Attachment/index.js";import"../../EmojiIconButton.js";import"../../FileUploadIconButton.js";import"../../FilePreview/index.js";import"../../FailedFileUploading.js";import"../../UserMention/index.js";import"../../CommentsInfo/index.js";import"../../CommentInput/index.js";import"../../Comment/index.js";import"../../CommentLoader.js";import"../../AssetNameLabel/AssetStatusBadge.js";import{isSuggestionsListOpened as l}from"../../UserMention/utils/index.js";var d=s({postInput:{paddingBottom:8},filePreviewWrapper:function(e){return{width:"100%",marginLeft:0,maxHeight:e.smallerView?127:251}}});function j(t){var r=t.userCompanyId,o=t.startAdornment,i=t.endAdornment,n=t.customContent,s=t.setComment,j=t.smallerView,c=t.onSave,C=t.comment,u=d({smallerView:j}),A=e();return p("div",{ref:A,children:[o,n||m(a,{userCompanyId:r,onChange:s,filePreviewWrapperClass:u.filePreviewWrapper,className:u.postInput,smallerView:j,onKeyDown:function(e){"Enter"!==e.key||e.shiftKey||l()||(e.preventDefault(),c(C))},suggestionsPortalHost:A.current,allowSuggestionsAboveCursor:!0}),i]})}j.propTypes={startAdornment:t,endAdornment:t,customContent:t,userCompanyId:r.isRequired,setComment:o,onSave:o,smallerView:i,comment:n()},j.defaultProps={startAdornment:null,endAdornment:null,customContent:null,setComment:function(){},onSave:function(){},smallerView:!1,comment:void 0};export{j as default};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/asyncToGenerator";import r from"@babel/runtime/helpers/slicedToArray";import o from"@babel/runtime/regenerator";import{memo as i,useState as n,useRef as s}from"react";import{number as p,shape as a,string as m}from"prop-types";import l from"classnames";import{flowRight as d,get as c}from"lodash";import j from"moment";import{withStyles as C}from"@material-ui/core/styles";import{Fade as u,Paper as A,Typography as v}from"@material-ui/core";import D from"../../../../../Avatar/index.js";import b from"../../../../../../effects/useOutsideClick.js";import"../../../../../../utils/index.js";import{postAnnotation as f}from"../../../../../../clients/jsonApi/index.js";import{useAnnotationsDispatch as g}from"../../../../AnnotationsContext.js";import{ADD_ANNOTATION as h}from"../../../../constants.js";import P from"../AnnotationInput/index.js";import S from"./style.css.js";import"../../../../../DevCenter/AppHeader/AppHeader.js";import"../../../../../DevCenter/AppSideBar/AppSideBar.js";import"../../../../../DevCenter/AppsDataProvider/AppsDataProvider.js";import"../../../../../Icons/AnnotationIcon.js";import"../../index.js";import"../../../LastAnnotation/index.js";import{jsxs as x,jsx as I}from"react/jsx-runtime";import"../../../../../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../../../../../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../../../../../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../../../../../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../../../../../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../../../../../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../../../../../DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.js";import"../../../../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../../../../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../../../../../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../../../../Modal/CorvaModal.js";import"uuid";import"../../../../../IconMenu/index.js";import"../../../../../StyledMenuItem/index.js";import"../../../../../DevCenter/AppContext.js";import"../../../../../AssetEditor/index.js";import"../../../../../AppVersionsSelect/AppVersionsSelect.js";import"../../../../../LoadingIndicator/LoadingIndicator.js";import"../../../../../Typography.js";import"../../../../../RealTimeValuesSidebar/RealTimeSidebar.js";import"../../../../../CollapsableSidebar.js";import"../../../../../DateTimePicker/index.js";import"../../../../../DatePicker/index.js";import"../../../../../ErrorBoundary/ErrorBoundary.js";import"../../../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../../../../SlateFormattedText/SlateFormattedText.js";import"../../../../../SlateFormattedText/RenderElements.js";import"@babel/runtime/helpers/typeof";import"slate";import"../../../../../EmptyState/EmptyState.js";import"../../../../../ParameterCharts/ParameterCharts.js";import"../../../../../ParameterCharts/AddEditTrack.js";import"../../../../../ChartActionsList/ChartActionsList.js";import"../../../../../CopyToClipboard/CopyToClipboard.js";import"../../../../../AssetEditor/AssetEditorAutocomplete.js";import"../../../../../AssetEditor/SingleAssetEditor.js";import"../../../../../SettingEditors/ColorEditor/index.js";import"../../../../../SettingEditors/DropdownEditor/index.js";import"../../../../../SettingEditors/RadioEditor/index.js";import"../../../../../SwitchControl/index.js";import"../../../../../ColorPicker/ColorPicker.js";import"../../../../../Chart/components/ChartButton.js";import"../../../../../Chart/components/ChartButtons.js";import"../../../../../Chart/components/ChartWrapper.js";import"../../../../../Chart/components/AxisDropdown.js";import"../../../../../Chart/components/buttons/DragToZoomButton.js";import"../../../../../Chart/components/buttons/ZoomInButton.js";import"../../../../../Chart/components/buttons/ZoomOutButton.js";import"../../../../../Chart/components/buttons/PanButton.js";import"../../../../../Chart/components/buttons/ResetZoomButton.js";import"../../../../../Chart/components/buttons/HideAxesButton.js";import"../../../../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../../../../TruncatedText/index.js";import"../../../../../RangeSlider/RangeSlider.js";import"../../../../../AdvancedSlider/AdvancedSlider.js";import"../../../../../Breadcrumbs/index.js";import"../../../../../VirtualizedTable/index.js";import"../../../../../EmptyView/EmptyView.js";import"../../../../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../../../../Button/index.js";import"../../../../../ContextMenuItem/index.js";import"../../../../../FolderMenuItem/index.js";import"../../../../../EditableItem/EditableItem/index.js";import"../../../../../EditableItem/EditableItemWithBadge/index.js";import"../../../../../Checkbox/index.js";import"../../../../../FolderMenuItemWithLinks/index.js";import"../../../../../IconButton/index.js";import"../../../../../TextField/index.js";import"../../../../../Chip/index.js";import"../../../../../Counter/index.js";import"../../../../../AnchorsList/AnchorsList.js";import"../../../../../Select/index.js";import"../../../../../CustomSelect/index.js";import"../../../../../Tabs/Tabs.js";import"../../../../../Tabs/Tab.js";import"../../../../../ResizableTable/ResizableTable.js";import"@material-ui/icons/Check";import"@material-ui/icons/Close";import"@material-ui/icons/Edit";import"@material-ui/icons/Delete";import"../../../../../GradientManager/configuration/constants.js";import"../../../../../GradientManager/GradientList.js";import"@material-ui/icons/AddCircle";import"../../../../../GradientManager/GradientPreview/GradientPreview.js";import"../../../../../GradientManager/GradientSelect.styles.js";import"../../../../../GradientPicker/GradientPicker.js";import"../../../../../GradientManager/GradientManager.styles.js";import"../../../../../Drillstring/BHASchematic.js";import"../../../../../Drillstring/BHATable/index.js";import"../../../../../Drillstring/BHAComponentIcon.js";import"../../../../../Drillstring/BHAComponentDetail/index.js";import"../../../../../Drillstring/BHATileIcon.js";import"../../../../../Drillstring/BHATile/BHATile.js";import"../../../../../Drillstring/BHAList/BHAList.js";import"../../../../../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../../../../../Casing/CasingTable/index.js";import"../../../../../Casing/CasingComponentIcon.js";import"../../../../../Casing/CasingTileIcon.js";import"../../../../../Casing/CasingTableV2/CasingTableV2.js";import"../../../../../Casing/CasingTile/CasingTile.js";import"../../../../../DisabledSettingsMessage/DisabledSettingsMessage.js";import"../../../../../WellSummary/WellSummaryItemLabel.js";import"../../../../../WellSummary/WellSummaryItemTitle.js";import"../../../../../WellSummary/WellSummaryItemValue.js";import"../../../../../WellSummary/ActivitySummaryChart.js";import"../../../../../WellSummary/FracWirelineTimeChart.js";import"../../../../../../constants/goals.js";import"../../../../../../constants/segment.js";import"../../../../../../constants/alerts.js";import"../../../../../../constants/apps.js";import"../../../../../../constants/drillstring.js";import"../../../../../../constants/completion.js";import"../../../../../../constants/notifications.js";import"../../../../../../constants/feed.js";import"../../../../../../constants/bha.js";import"../../../../../BICOffsetPickerDialog/index.js";import"../../../../../OffsetWellButton/OffsetWellButton.js";import"../../../../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../../../../OffsetWellPickerV3/index.js";import"../../../../../OffsetWellChips/Chip.js";import"../../../../../OffsetWellChips/ChipsContainer.js";import"../../../../../OffsetWellPickerV4/OffsetWellPickerV4.js";import"../../../../../OffsetWellMap/OffsetWellMap.js";import"@material-ui/core/Snackbar";import"../../../../../Notifications/Toast.js";import"../../../../../Toaster/Toaster.js";import"../../../../../ConfirmationDialog.js";import"../../../../../TextLink/index.js";import"../../../../../Template/TemplatePopover/index.js";import"../../../../../Template/TemplateSharingDialog/index.js";import"../../../../../MenuItem/index.js";import"../../../../../PadModeSelect/PadModeSelect.js";import"../../../../../PinnableFilters/PinnableFilters.js";import"../../../../../HeaderLayout/HeaderLayout.js";import"../../../../../PadOffsetsPicker/PadOffsetsPicker.js";import"../../../../../PadOffsetsPicker/OffsetAssetChip.js";import"../../../../../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../../../../../PadOffsetsPicker/StagesSelector.js";import"../../../../../Table/TableToolbar/TableToolbar.js";import"../../../../../Table/TableContainer/TableContainer.js";import"../../../../../Table/TableCell/TableCell.js";import"../../../../../Tooltip/ScrollableTooltip.js";import"../../../../../PriceInput/PriceInput.js";import"../../../../../LabelsCounter/LabelsCounter.js";import"../../../../../Stepper/Step.js";import"../../../../../Stepper/StepsWrapper.js";import"../../../../../Stepper/Stepper.js";import"../../../../../Comment/CommentIcon/index.js";import"../../../../../FilesLoader/FilesLoader.js";import"../../../../../FilesLoader/Icons/FileIcon.js";import"../../../../../SearchInput/index.js";import"../../../../../FeedItem/FeedItem.js";import"../../../../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../../../../../PostInput/PostInput.js";import"../../../../../KeyboardDateTimePicker.js";import"../../../../../AddComment/Popover.js";import"../../../../../AddComment/Popup.js";import"../../../../../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../../../../../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../../../../../StageDesignVActual/ComparisonHeader.js";import"../../../../../StageDesignVActual/ComparisonRow.js";import"../../../../../EmbeddedApp/DevCenterEmbeddedApp.js";import"../../../../../EmbeddedApp/EmbeddedApp.js";import"../../../../../HelpCenter/HelpCenterIcon.js";import"../../../../../Autocomplete/Autocomplete.js";import"../../../../../DocumentViewer/DocumentViewer.js";import"@babel/runtime/helpers/objectWithoutProperties";import"../../../../../ColorPickerPalette/ColorPickerPalette.js";import"../../../../../Search/Search.js";import"../../../../../Search/components/Listbox.js";import"../../../../../Search/components/Paper.js";import"../../../../../Search/components/RecentSearches.js";import"../../../../../Search/components/InputAdornmentLeft.js";import"../../../../../Search/components/Groups.js";import"../../../../../StatusBadge/index.js";import"../../../../../Attachment/index.js";import"../../../../../EmojiIconButton.js";import"../../../../../FileUploadIconButton.js";import"../../../../../FilePreview/index.js";import"../../../../../FailedFileUploading.js";import"../../../../../UserMention/index.js";import"../../../../../CommentsInfo/index.js";import"../../../../../CommentInput/index.js";import"../../../../../Comment/index.js";import"../../../../../CommentLoader.js";import"../../../../../AssetNameLabel/AssetStatusBadge.js";import"../../../../../../utils/mobileDetect.js";import"querystring";import"uuid/v1";import"../../../../../../clients/subscriptions.js";import"../../../../../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../../../../../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../../../../../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../../../../../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../../../../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import{withUniversalLocationHOC as T}from"../../../../../DevCenter/DevCenterRouterContext/hocs/withUniversalLocationHOC.js";import"../../../../../DevCenter/NavigationBar/NavigationBar.js";import"../../../../../DevCenter/SideBar/SideBar.js";import"../../../../../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../../../../../DevCenter/AppFilterPanelLayout/AppFilterPanelLayout.js";import"../../../../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../../../../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import{showSuccessNotification as y,showErrorNotification as B}from"../../../../../../utils/notificationToasts.js";var E=function(i){var p,a=i.appId,m=i.assetId,d=i.assetCompanyId,C=i.appSettings,T=i.currentUser,E=i.classes,k=i.location,F=i.dashboardType,L=g(),M=n(!1),V=r(M,2),W=V[0],O=V[1],w=s(null);b(w,(function(){O(!1)}));var R,H=(R=t(o.mark((function e(t,r,i){var n,s,p,l;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n={app_id:a,asset_id:m,body:t,active_until:r,attachment:{file_name:i&&i.attachmentName,s3_link:i&&i.attachmentUrl},settings:C},s={},F&&(s.dashboard_type=F),(p=c(k,"query.time"))&&(n.data_timestamp=j(p).format()),e.next=8,f(n,s);case 8:l=e.sent,L({type:h,annotation:l}),e.next=17;break;case 12:return e.prev=12,e.t0=e.catch(0),B("Error during annotation creation"),console.error(e.t0),e.abrupt("return");case 17:y("Annotation has been added"),O(!1);case 19:case"end":return e.stop()}}),e,null,[[0,12]])}))),function(e,t,r){return R.apply(this,arguments)});return x("div",{className:S.cAddAnnotationFormInput,children:[I(D,{displayName:"".concat(T.first_name," ").concat(T.last_name),imgSrc:T.profile_photo,size:36}),x("div",{className:l(S.cAddAnnotationFormInputPaper,(p={},e(p,S.cAddAnnotationFormInputPaperOpened,W),e(p,S.cAddAnnotationFormInputPaperClosed,!W),p)),children:[I(u,{in:!W,timeout:500,children:I(A,{className:S.cAddAnnotationFormInputPaperLabel,children:I(v,{variant:"body2","data-testid":"".concat("AppAnnotationsPo","_collapsedInput"),className:E.inputLabel,onClick:function(){return O(!0)},children:"Type annotation here"})})}),I(u,{in:W,timeout:100,children:I("div",{className:S.cAddAnnotationFormInputPaperAddAnnotation,children:W&&I(P,{onSend:H,assetCompanyId:d,currentUser:T})})})]})]})};E.propTypes={appId:p.isRequired,assetId:p.isRequired,assetCompanyId:p.isRequired,appSettings:a().isRequired,currentUser:a({}),classes:a().isRequired,location:a().isRequired,dashboardType:m},E.defaultProps={currentUser:{},dashboardType:null};var k=d([C((function(e){return{inputLabel:{color:e.palette.grey[700],fontWeight:200,width:"100%"}}})),T])(i(E));export{k as default};
1
+ import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/asyncToGenerator";import r from"@babel/runtime/helpers/slicedToArray";import o from"@babel/runtime/regenerator";import{memo as i,useState as n,useRef as s}from"react";import{number as p,shape as a,string as m}from"prop-types";import l from"classnames";import{flowRight as d,get as c}from"lodash";import j from"moment";import{withStyles as C}from"@material-ui/core/styles";import{Fade as u,Paper as A,Typography as v}from"@material-ui/core";import D from"../../../../../Avatar/index.js";import b from"../../../../../../effects/useOutsideClick.js";import"../../../../../../utils/index.js";import{postAnnotation as f}from"../../../../../../clients/jsonApi/index.js";import{useAnnotationsDispatch as g}from"../../../../AnnotationsContext.js";import{ADD_ANNOTATION as h}from"../../../../constants.js";import P from"../AnnotationInput/index.js";import S from"./style.css.js";import"../../../../../DevCenter/AppHeader/AppHeader.js";import"../../../../../DevCenter/AppSideBar/AppSideBar.js";import"../../../../../DevCenter/AppsDataProvider/AppsDataProvider.js";import"../../../../../Icons/AnnotationIcon.js";import"../../index.js";import"../../../LastAnnotation/index.js";import{jsxs as x,jsx as I}from"react/jsx-runtime";import"../../../../../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../../../../../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../../../../../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../../../../../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../../../../../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../../../../../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../../../../../DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.js";import"../../../../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../../../../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../../../../../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../../../../Modal/CorvaModal.js";import"uuid";import"../../../../../IconMenu/index.js";import"../../../../../StyledMenuItem/index.js";import"../../../../../DevCenter/AppContext.js";import"../../../../../AssetEditor/index.js";import"../../../../../AppVersionsSelect/AppVersionsSelect.js";import"../../../../../LoadingIndicator/LoadingIndicator.js";import"../../../../../Typography.js";import"../../../../../RealTimeValuesSidebar/RealTimeSidebar.js";import"../../../../../CollapsableSidebar.js";import"../../../../../DateTimePicker/index.js";import"../../../../../DatePicker/index.js";import"../../../../../ErrorBoundary/ErrorBoundary.js";import"../../../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../../../../SlateFormattedText/SlateFormattedText.js";import"../../../../../SlateFormattedText/RenderElements.js";import"@babel/runtime/helpers/typeof";import"slate";import"../../../../../EmptyState/EmptyState.js";import"../../../../../ParameterCharts/ParameterCharts.js";import"../../../../../ParameterCharts/AddEditTrack.js";import"../../../../../ChartActionsList/ChartActionsList.js";import"../../../../../CopyToClipboard/CopyToClipboard.js";import"../../../../../AssetEditor/AssetEditorAutocomplete.js";import"../../../../../AssetEditor/SingleAssetEditor.js";import"../../../../../SettingEditors/ColorEditor/index.js";import"../../../../../SettingEditors/DropdownEditor/index.js";import"../../../../../SettingEditors/RadioEditor/index.js";import"../../../../../SwitchControl/index.js";import"../../../../../ColorPicker/ColorPicker.js";import"../../../../../Chart/components/ChartButton.js";import"../../../../../Chart/components/ChartButtons.js";import"../../../../../Chart/components/ChartWrapper.js";import"../../../../../Chart/components/AxisDropdown.js";import"../../../../../Chart/components/buttons/DragToZoomButton.js";import"../../../../../Chart/components/buttons/ZoomInButton.js";import"../../../../../Chart/components/buttons/ZoomOutButton.js";import"../../../../../Chart/components/buttons/PanButton.js";import"../../../../../Chart/components/buttons/ResetZoomButton.js";import"../../../../../Chart/components/buttons/HideAxesButton.js";import"../../../../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../../../../TruncatedText/index.js";import"../../../../../RangeSlider/RangeSlider.js";import"../../../../../AdvancedSlider/AdvancedSlider.js";import"../../../../../Breadcrumbs/index.js";import"../../../../../VirtualizedTable/index.js";import"../../../../../EmptyView/EmptyView.js";import"../../../../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../../../../Button/index.js";import"../../../../../ContextMenuItem/index.js";import"../../../../../FolderMenuItem/index.js";import"../../../../../EditableItem/EditableItem/index.js";import"../../../../../EditableItem/EditableItemWithBadge/index.js";import"../../../../../Checkbox/index.js";import"../../../../../FolderMenuItemWithLinks/index.js";import"../../../../../IconButton/index.js";import"../../../../../TextField/index.js";import"../../../../../Chip/index.js";import"../../../../../Counter/index.js";import"../../../../../AnchorsList/AnchorsList.js";import"../../../../../Select/index.js";import"../../../../../CustomSelect/index.js";import"../../../../../Tabs/Tabs.js";import"../../../../../Tabs/Tab.js";import"../../../../../ResizableTable/ResizableTable.js";import"@material-ui/icons/Check";import"@material-ui/icons/Close";import"@material-ui/icons/Edit";import"@material-ui/icons/Delete";import"../../../../../GradientManager/configuration/constants.js";import"../../../../../GradientManager/GradientList.js";import"@material-ui/icons/AddCircle";import"../../../../../GradientManager/GradientPreview/GradientPreview.js";import"../../../../../GradientManager/GradientSelect.styles.js";import"../../../../../GradientPicker/GradientPicker.js";import"../../../../../GradientManager/GradientManager.styles.js";import"../../../../../Drillstring/BHASchematic.js";import"../../../../../Drillstring/BHATable/index.js";import"../../../../../Drillstring/BHAComponentIcon.js";import"../../../../../Drillstring/BHAComponentDetail/index.js";import"../../../../../Drillstring/BHATileIcon.js";import"../../../../../Drillstring/BHATile/BHATile.js";import"../../../../../Drillstring/BHAList/BHAList.js";import"../../../../../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../../../../../Casing/CasingTable/index.js";import"../../../../../Casing/CasingComponentIcon.js";import"../../../../../Casing/CasingTileIcon.js";import"../../../../../Casing/CasingTableV2/CasingTableV2.js";import"../../../../../Casing/CasingTile/CasingTile.js";import"../../../../../DisabledSettingsMessage/DisabledSettingsMessage.js";import"../../../../../WellSummary/WellSummaryItemLabel.js";import"../../../../../WellSummary/WellSummaryItemTitle.js";import"../../../../../WellSummary/WellSummaryItemValue.js";import"../../../../../WellSummary/ActivitySummaryChart.js";import"../../../../../WellSummary/FracWirelineTimeChart.js";import"../../../../../../constants/goals.js";import"../../../../../../constants/segment.js";import"../../../../../../constants/alerts.js";import"../../../../../../constants/apps.js";import"../../../../../../constants/drillstring.js";import"../../../../../../constants/completion.js";import"../../../../../../constants/notifications.js";import"../../../../../../constants/feed.js";import"../../../../../../constants/bha.js";import"../../../../../../utils/env.js";import"../../../../../BICOffsetPickerDialog/index.js";import"../../../../../OffsetWellButton/OffsetWellButton.js";import"../../../../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../../../../OffsetWellPickerV3/index.js";import"../../../../../OffsetWellChips/Chip.js";import"../../../../../OffsetWellChips/ChipsContainer.js";import"../../../../../OffsetWellPickerV4/OffsetWellPickerV4.js";import"../../../../../OffsetWellMap/OffsetWellMap.js";import"@material-ui/core/Snackbar";import"../../../../../Notifications/Toast.js";import"../../../../../Toaster/Toaster.js";import"../../../../../ConfirmationDialog.js";import"../../../../../TextLink/index.js";import"../../../../../Template/TemplatePopover/index.js";import"../../../../../Template/TemplateSharingDialog/index.js";import"../../../../../MenuItem/index.js";import"../../../../../PadModeSelect/PadModeSelect.js";import"../../../../../PinnableFilters/PinnableFilters.js";import"../../../../../HeaderLayout/HeaderLayout.js";import"../../../../../PadOffsetsPicker/PadOffsetsPicker.js";import"../../../../../PadOffsetsPicker/OffsetAssetChip.js";import"../../../../../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../../../../../PadOffsetsPicker/StagesSelector.js";import"../../../../../Table/TableToolbar/TableToolbar.js";import"../../../../../Table/TableContainer/TableContainer.js";import"../../../../../Table/TableCell/TableCell.js";import"../../../../../Tooltip/ScrollableTooltip.js";import"../../../../../PriceInput/PriceInput.js";import"../../../../../LabelsCounter/LabelsCounter.js";import"../../../../../Stepper/Step.js";import"../../../../../Stepper/StepsWrapper.js";import"../../../../../Stepper/Stepper.js";import"../../../../../Comment/CommentIcon/index.js";import"../../../../../FilesLoader/FilesLoader.js";import"../../../../../FilesLoader/Icons/FileIcon.js";import"../../../../../SearchInput/index.js";import"../../../../../FeedItem/FeedItem.js";import"../../../../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../../../../../PostInput/PostInput.js";import"../../../../../KeyboardDateTimePicker.js";import"../../../../../AddComment/Popover.js";import"../../../../../AddComment/Popup.js";import"../../../../../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../../../../../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../../../../../StageDesignVActual/ComparisonHeader.js";import"../../../../../StageDesignVActual/ComparisonRow.js";import"../../../../../EmbeddedApp/DevCenterEmbeddedApp.js";import"../../../../../EmbeddedApp/EmbeddedApp.js";import"../../../../../HelpCenter/HelpCenterIcon.js";import"../../../../../Autocomplete/Autocomplete.js";import"../../../../../DocumentViewer/DocumentViewer.js";import"@babel/runtime/helpers/objectWithoutProperties";import"../../../../../ColorPickerPalette/ColorPickerPalette.js";import"../../../../../Search/Search.js";import"../../../../../Search/components/Listbox.js";import"../../../../../Search/components/Paper.js";import"../../../../../Search/components/RecentSearches.js";import"../../../../../Search/components/InputAdornmentLeft.js";import"../../../../../Search/components/Groups.js";import"../../../../../StatusBadge/index.js";import"../../../../../Attachment/index.js";import"../../../../../EmojiIconButton.js";import"../../../../../FileUploadIconButton.js";import"../../../../../FilePreview/index.js";import"../../../../../FailedFileUploading.js";import"../../../../../UserMention/index.js";import"../../../../../CommentsInfo/index.js";import"../../../../../CommentInput/index.js";import"../../../../../Comment/index.js";import"../../../../../CommentLoader.js";import"../../../../../AssetNameLabel/AssetStatusBadge.js";import"../../../../../../utils/mobileDetect.js";import"querystring";import"uuid/v1";import"../../../../../../clients/subscriptions.js";import"jsona";import"../../../../../StatusBadge/constants.js";import"../../../../../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../../../../../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../../../../../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../../../../../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../../../../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import{withUniversalLocationHOC as T}from"../../../../../DevCenter/DevCenterRouterContext/hocs/withUniversalLocationHOC.js";import"../../../../../DevCenter/NavigationBar/NavigationBar.js";import"../../../../../DevCenter/SideBar/SideBar.js";import"../../../../../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../../../../../DevCenter/AppFilterPanelLayout/AppFilterPanelLayout.js";import"../../../../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../../../../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import{showSuccessNotification as y,showErrorNotification as B}from"../../../../../../utils/notificationToasts.js";var E=function(i){var p,a=i.appId,m=i.assetId,d=i.assetCompanyId,C=i.appSettings,T=i.currentUser,E=i.classes,k=i.location,F=i.dashboardType,L=g(),M=n(!1),V=r(M,2),W=V[0],O=V[1],w=s(null);b(w,(function(){O(!1)}));var R,H=(R=t(o.mark((function e(t,r,i){var n,s,p,l;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n={app_id:a,asset_id:m,body:t,active_until:r,attachment:{file_name:i&&i.attachmentName,s3_link:i&&i.attachmentUrl},settings:C},s={},F&&(s.dashboard_type=F),(p=c(k,"query.time"))&&(n.data_timestamp=j(p).format()),e.next=8,f(n,s);case 8:l=e.sent,L({type:h,annotation:l}),e.next=17;break;case 12:return e.prev=12,e.t0=e.catch(0),B("Error during annotation creation"),console.error(e.t0),e.abrupt("return");case 17:y("Annotation has been added"),O(!1);case 19:case"end":return e.stop()}}),e,null,[[0,12]])}))),function(e,t,r){return R.apply(this,arguments)});return x("div",{className:S.cAddAnnotationFormInput,children:[I(D,{displayName:"".concat(T.first_name," ").concat(T.last_name),imgSrc:T.profile_photo,size:36}),x("div",{className:l(S.cAddAnnotationFormInputPaper,(p={},e(p,S.cAddAnnotationFormInputPaperOpened,W),e(p,S.cAddAnnotationFormInputPaperClosed,!W),p)),children:[I(u,{in:!W,timeout:500,children:I(A,{className:S.cAddAnnotationFormInputPaperLabel,children:I(v,{variant:"body2","data-testid":"".concat("AppAnnotationsPo","_collapsedInput"),className:E.inputLabel,onClick:function(){return O(!0)},children:"Type annotation here"})})}),I(u,{in:W,timeout:100,children:I("div",{className:S.cAddAnnotationFormInputPaperAddAnnotation,children:W&&I(P,{onSend:H,assetCompanyId:d,currentUser:T})})})]})]})};E.propTypes={appId:p.isRequired,assetId:p.isRequired,assetCompanyId:p.isRequired,appSettings:a().isRequired,currentUser:a({}),classes:a().isRequired,location:a().isRequired,dashboardType:m},E.defaultProps={currentUser:{},dashboardType:null};var k=d([C((function(e){return{inputLabel:{color:e.palette.grey[700],fontWeight:200,width:"100%"}}})),T])(i(E));export{k as default};
@@ -20,10 +20,10 @@ declare const _default: import("react").ComponentType<Pick<Pick<Pick<{
20
20
  currentUser: import("prop-types").Validator<NonNullable<import("prop-types").InferProps<{}>>>;
21
21
  isNative: import("prop-types").Requireable<boolean>;
22
22
  dashboardType: import("prop-types").Requireable<string>;
23
- }>, "assetId" | "currentUser" | "classes" | "onClose" | "assetCompanyId" | "appId" | "appSettings" | "dashboardType" | "isNative" | "appTitle">, "assetId" | "currentUser" | "classes" | "onClose" | "assetCompanyId" | "appId" | "appTitle"> & {
23
+ }>, "assetId" | "currentUser" | "classes" | "onClose" | "appId" | "assetCompanyId" | "appSettings" | "dashboardType" | "isNative" | "appTitle">, "assetId" | "currentUser" | "classes" | "onClose" | "appId" | "assetCompanyId" | "appTitle"> & {
24
24
  appSettings?: import("prop-types").InferProps<import("prop-types").ValidationMap<any>>;
25
25
  dashboardType?: string;
26
26
  isNative?: boolean;
27
- } & {}, "assetId" | "currentUser" | "onClose" | "assetCompanyId" | "appId" | "appSettings" | "dashboardType" | "isNative" | "appTitle"> & import("@material-ui/core").StyledComponentProps<"title" | "secondaryTitle" | "annotateIcon" | "noAnnotations" | "backIcon">>;
27
+ } & {}, "assetId" | "currentUser" | "onClose" | "appId" | "assetCompanyId" | "appSettings" | "dashboardType" | "isNative" | "appTitle"> & import("@material-ui/core").StyledComponentProps<"title" | "secondaryTitle" | "annotateIcon" | "noAnnotations" | "backIcon">>;
28
28
  export default _default;
29
29
  //# sourceMappingURL=index.d.ts.map