@corva/ui 0.33.0-2 → 0.33.0-22

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 (102) hide show
  1. package/CLI/components/App/App.js +1 -1
  2. package/CLI/hocs/withAppDataProviderHOC.js +1 -1
  3. package/CLI/hocs/withGridLayoutHOC/withGridLayoutHOC.js +1 -1
  4. package/CLI/hocs/withReactRouterHOC.js +1 -1
  5. package/CLI/screens/OAuthCallbackScreen/index.js +1 -1
  6. package/clients/api/apiCore.js +1 -1
  7. package/clients/jsonApi/index.js +1 -1
  8. package/clients/utils.js +1 -1
  9. package/components/AddComment/Popover.js +1 -1
  10. package/components/AddComment/components/Content.js +1 -1
  11. package/components/Annotations/components/AnnotationsList/components/AddAnnotationForm/index.js +1 -1
  12. package/components/AppVersionsSelect/AppVersionsSelect.js +1 -1
  13. package/components/AssetNameLabel/PrimaryAssetNameLabel.js +1 -0
  14. package/components/AssetNameLabel/SecondaryAssetNameLabel.js +1 -0
  15. package/components/BICOffsetPickerDialog/components/WellSection/AutoCompleteAssetSearch/utils/apiCalls.js +1 -1
  16. package/components/BICOffsetPickerDialog/index.js +1 -1
  17. package/components/Breadcrumbs/index.js +1 -1
  18. package/components/CollapsableSidebar.js +1 -1
  19. package/components/Comment/index.js +1 -1
  20. package/components/CommentInput/index.js +1 -1
  21. package/components/CommentLoader.js +1 -1
  22. package/components/ConfirmationDialog.js +1 -1
  23. package/components/CustomSelect/index.js +1 -0
  24. package/components/DevCenter/AppHeader/AppHeaderNew.css.js +1 -1
  25. package/components/DevCenter/AppHeader/AppHeaderNew.js +1 -1
  26. package/components/DevCenter/AppSettingsPopover/AppSettingsPopover.js +1 -1
  27. package/components/DevCenter/AppSideBar/AppSideBar.js +1 -1
  28. package/components/DevCenter/AppsDataProvider/effects/utils.js +1 -1
  29. package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js +1 -1
  30. package/components/DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js +1 -1
  31. package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js +1 -1
  32. package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/RemoveAppButton.js +1 -1
  33. package/components/DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.js +1 -1
  34. package/components/DevCenter/DevCenterAppContainer/components/HelpCenterDialog/HelpCenterDialog.js +1 -1
  35. package/components/DevCenter/DevCenterAppContainer/components/HelpCenterDialog/components/ArticleIcon.js +1 -0
  36. package/components/DevCenter/DevCenterAppContainer/components/HelpCenterDialog/components/ArticleItemContent.js +1 -0
  37. package/components/DevCenter/DevCenterAppContainer/components/HelpCenterDialog/components/HelpContentCaption.js +1 -0
  38. package/components/DevCenter/DevCenterAppContainer/components/HelpCenterDialog/components/HelpContentItem.js +1 -0
  39. package/components/DevCenter/DevCenterAppContainer/components/HelpCenterDialog/components/HelpContentList.js +1 -0
  40. package/components/DevCenter/DevCenterAppContainer/components/HelpCenterDialog/components/HelpContentTimestamp.js +1 -0
  41. package/components/DevCenter/DevCenterAppContainer/components/HelpCenterDialog/components/ItemContent.js +1 -0
  42. package/components/DevCenter/DevCenterAppContainer/components/HelpCenterDialog/components/SearchInput.js +1 -0
  43. package/components/DevCenter/DevCenterAppContainer/components/HelpCenterDialog/components/VideoItemContent.js +1 -0
  44. package/components/DevCenter/DevCenterAppContainer/components/HelpCenterDialog/effects/useHelpContents.js +1 -0
  45. package/components/DevCenter/DevCenterAppContainer/components/HelpCenterDialog/shapes/index.js +1 -0
  46. package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterAppZoidComponent.js +1 -1
  47. package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js +1 -1
  48. package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js +1 -1
  49. package/components/EmbeddedApp/DevCenterEmbeddedApp.js +1 -0
  50. package/components/EmbeddedApp/EmbeddedApp.js +1 -0
  51. package/components/EmbeddedApp/components/AppInfo.js +1 -0
  52. package/components/EmbeddedApp/styles.css.js +1 -0
  53. package/components/EmojiIconButton.js +1 -1
  54. package/components/ErrorBoundary/ErrorBoundary.js +1 -1
  55. package/components/FeedItem/FeedItem.js +1 -1
  56. package/components/FeedItem/components/Actions.js +1 -1
  57. package/components/FeedItem/components/Comments.js +1 -1
  58. package/components/FeedItem/components/Content.js +1 -1
  59. package/components/FeedItem/components/FeedComments.js +1 -1
  60. package/components/FeedItem/feedItemTypes/SurveyStationFeedItem/api.js +1 -0
  61. package/components/FeedItem/feedItemTypes/SurveyStationFeedItem/components/AccuracyPlan.js +1 -0
  62. package/components/FeedItem/feedItemTypes/SurveyStationFeedItem/components/ActualPointInfo.js +1 -0
  63. package/components/FeedItem/feedItemTypes/SurveyStationFeedItem/components/Warning.js +1 -0
  64. package/components/FeedItem/feedItemTypes/SurveyStationFeedItem/index.js +1 -0
  65. package/components/FilePreview/index.js +1 -1
  66. package/components/FileUploadIconButton.js +1 -1
  67. package/components/GoogleDocsViewer/index.js +1 -1
  68. package/components/InfiniteList/index.js +1 -1
  69. package/components/Modal/Modal.css.js +1 -1
  70. package/components/Notifications/NotificationsContainer.js +1 -1
  71. package/components/Notifications/components/Toast.js +1 -1
  72. package/components/Notifications/components/styles.js +1 -1
  73. package/components/OffsetWellPickerV2/OffsetWellPickerDialog.js +1 -1
  74. package/components/OffsetWellPickerV2/components/Filter/SidetrackSwitch.js +1 -1
  75. package/components/OffsetWellPickerV2/components/Filter/SingleSelect.js +1 -1
  76. package/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js +1 -1
  77. package/components/OffsetWellPickerV2/components/Filter/index.js +1 -1
  78. package/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js +1 -1
  79. package/components/OffsetWellPickerV2/effects/index.js +1 -1
  80. package/components/PadModeSelect/PadModeSelect.js +1 -1
  81. package/components/PadOffsetsPicker/PadOffsetsPicker.js +1 -1
  82. package/components/PostPreviewDialog/index.js +1 -1
  83. package/components/ResizableTable/ResizableTable.js +1 -1
  84. package/components/ResizableTable/ResizableTableCell.js +1 -1
  85. package/components/ResizableTable/ResizableTableHeaderCell.js +1 -1
  86. package/components/Template/TemplateSharingDialog/ChipSelector.js +1 -1
  87. package/components/index.js +1 -1
  88. package/constants/bha.js +1 -0
  89. package/constants/helpCenter.js +1 -0
  90. package/constants/index.js +1 -1
  91. package/constants/sizes.js +1 -0
  92. package/constants/subscriptions.js +1 -0
  93. package/constants/video.js +1 -0
  94. package/effects/useSubscriptions.js +1 -1
  95. package/package.json +1 -1
  96. package/permissions/withPermissionsHOC.js +1 -1
  97. package/utils/accuracy.js +1 -0
  98. package/utils/index.js +1 -1
  99. package/utils/jsonaDataFormatter.js +1 -0
  100. package/utils/user.js +1 -1
  101. package/utils/video.js +1 -0
  102. package/utils/AccuracyUtils.js +0 -1
@@ -1 +1 @@
1
- import t from"@babel/runtime/helpers/defineProperty";import{range as n,flattenDepth as r}from"lodash";import e from"@babel/runtime/regenerator";import a from"@babel/runtime/helpers/asyncToGenerator";import{stringify as c}from"query-string";import{baseUrl as u,get as p,post as s,del as o,put as i,sendFormData as f,patch as l}from"../api/apiCore.js";import{CORVA_API_URLS as h}from"../constants.js";function v(t,n){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);n&&(e=e.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),r.push.apply(r,e)}return r}function d(n){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?v(Object(e),!0).forEach((function(r){t(n,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):v(Object(e)).forEach((function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))}))}return n}function m(){return y.apply(this,arguments)}function y(){return(y=a(e.mark((function t(){var n;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,fetch("".concat(u,"/v1/users/current"),{credentials:"include"});case 3:if(null!=(n=t.sent)&&n.ok){t.next=6;break}return t.abrupt("return",null);case 6:return t.next=8,n.json();case 8:return t.abrupt("return",t.sent);case 11:return t.prev=11,t.t0=t.catch(0),console.error(t.t0),t.abrupt("return",null);case 15:case"end":return t.stop()}}),t,null,[[0,11]])})))).apply(this,arguments)}function w(t){return _.apply(this,arguments)}function _(){return(_=a(e.mark((function t(n){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p("/v2/wells",n));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function b(t){return g.apply(this,arguments)}function g(){return(g=a(e.mark((function t(n){var r,a=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.length>1&&void 0!==a[1]?a[1]:{},t.abrupt("return",p("/v2/wells/".concat(n),r));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function k(t){return x.apply(this,arguments)}function x(){return(x=a(e.mark((function t(n){var r,a=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.length>1&&void 0!==a[1]?a[1]:{},t.abrupt("return",p("/v2/rigs/".concat(n),r));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function O(){return j.apply(this,arguments)}function j(){return(j=a(e.mark((function t(){var n,r=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.length>0&&void 0!==r[0]?r[0]:{},t.abrupt("return",p("/v2/rigs",n));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function P(){return $.apply(this,arguments)}function $(){return($=a(e.mark((function t(){var n,r=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.length>0&&void 0!==r[0]?r[0]:{},t.abrupt("return",p("/v2/programs",n));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function A(t){return I.apply(this,arguments)}function I(){return(I=a(e.mark((function t(n){var r,a=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.length>1&&void 0!==a[1]?a[1]:{},t.abrupt("return",p("/v2/assets/".concat(n),r));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function D(){return T.apply(this,arguments)}function T(){return(T=a(e.mark((function t(){var n,r=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.length>0&&void 0!==r[0]?r[0]:{},t.abrupt("return",p("/v2/assets",n));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function U(){return q.apply(this,arguments)}function q(){return(q=a(e.mark((function t(){var n,r=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.length>0&&void 0!==r[0]?r[0]:{},t.abrupt("return",s("/v2/assets/resolve",n));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function C(){return N.apply(this,arguments)}function N(){return(N=a(e.mark((function t(){var n,r=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.length>0&&void 0!==r[0]?r[0]:{},t.abrupt("return",p("/v2/pads",n));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function S(){return E.apply(this,arguments)}function E(){return(E=a(e.mark((function t(){var n,r=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.length>0&&void 0!==r[0]?r[0]:{},t.abrupt("return",p("/v2/frac_fleets",n));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function J(t){return K.apply(this,arguments)}function K(){return(K=a(e.mark((function t(n){var r,a=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.length>1&&void 0!==a[1]?a[1]:{},t.abrupt("return",p("/v2/drillout_units/".concat(n),r));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function R(){return F.apply(this,arguments)}function F(){return(F=a(e.mark((function t(){var n,r=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.length>0&&void 0!==r[0]?r[0]:{},t.abrupt("return",p("/v2/drillout_units",n));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function G(t,n,r){return M.apply(this,arguments)}function M(){return(M=a(e.mark((function t(n,r,a){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o("/v1/data/".concat(n,"/").concat(r),a));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function z(t,n,r){return B.apply(this,arguments)}function B(){return(B=a(e.mark((function t(n,r,a){var c,u=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c=u.length>3&&void 0!==u[3]?u[3]:{},t.abrupt("return",p("/v1/data/".concat(n,"/").concat(r),d(d({},c),{},{asset_id:a}),{appKey:c.appKey}));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function H(t,n){return L.apply(this,arguments)}function L(){return(L=a(e.mark((function t(n,r){var a,c=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=c.length>2&&void 0!==c[2]?c[2]:{},t.abrupt("return",p("/api/v1/data/".concat(n,"/").concat(r,"/"),a,{apiUrl:h.DATA_API}));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Q(t,n){return V.apply(this,arguments)}function V(){return(V=a(e.mark((function t(n,r){var a,c=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=c.length>2&&void 0!==c[2]?c[2]:{},t.abrupt("return",p("/api/v1/data/".concat(n,"/").concat(r,"/aggregate/"),a,{apiUrl:h.DATA_API}));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function W(t,n,r,e){return X.apply(this,arguments)}function X(){return(X=a(e.mark((function t(n,r,a,c){var u,p=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return u=p.length>4&&void 0!==p[4]?p[4]:{},t.abrupt("return",i("/v1/data/".concat(n,"/").concat(r,"/").concat(a),c,u));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Y(t,n,r,e,a){return Z.apply(this,arguments)}function Z(){return(Z=a(e.mark((function t(n,r,a,c,u){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i("/api/v1/data/".concat(n,"/").concat(r,"/").concat(a),c,u,{apiUrl:h.DATA_API}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function tt(t,n,r){return nt.apply(this,arguments)}function nt(){return(nt=a(e.mark((function t(n,r,a){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v1/data/".concat(n,"/").concat(r),a));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function rt(t,n,r){return et.apply(this,arguments)}function et(){return(et=a(e.mark((function t(n,r,a){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/api/v1/data/".concat(n,"/").concat(r),a,{apiUrl:h.DATA_API}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function at(t){return ct.apply(this,arguments)}function ct(){return(ct=a(e.mark((function t(n){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p("/v1/competitor_analysis",n));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ut(){return pt.apply(this,arguments)}function pt(){return(pt=a(e.mark((function t(){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p("/v1/companies"));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function st(t){return ot.apply(this,arguments)}function ot(){return(ot=a(e.mark((function t(n){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p("/v2/picklists/".concat(n)));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function it(){return ft.apply(this,arguments)}function ft(){return(ft=a(e.mark((function t(){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p("/v2/favorites"));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function lt(t){return ht.apply(this,arguments)}function ht(){return(ht=a(e.mark((function t(n){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p("/v1/companies/".concat(n,"/settings/company_goals")));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var vt,dt,mt,yt,wt=(vt=a(e.mark((function t(n){var r,a,c,u;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r={asset_id:+n},a={_id:"$file",name:{$first:"$file"},timestamp:{$first:"$timestamp"}},c={timestamp:-1},u={aggregate:JSON.stringify([{$match:r},{$group:a},{$sort:c}])},t.prev=4,t.next=7,z("corva","formation-evaluation.metadata",n,u);case 7:return t.abrupt("return",t.sent);case 10:return t.prev=10,t.t0=t.catch(4),console.error(t.t0),t.abrupt("return",[]);case 14:case"end":return t.stop()}}),t,null,[[4,10]])}))),function(t){return vt.apply(this,arguments)}),_t=(dt=a(e.mark((function t(n,r){var a;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a="{asset_id#eq#".concat(n,"}AND{file#eq#'").concat(r,"'}"),t.prev=1,t.next=4,z("corva","formation-evaluation.metadata",n,{query:a});case 4:return t.abrupt("return",t.sent);case 7:return t.prev=7,t.t0=t.catch(1),console.error(t.t0),t.abrupt("return",[]);case 11:case"end":return t.stop()}}),t,null,[[1,7]])}))),function(t,n){return dt.apply(this,arguments)}),bt=(mt=a(e.mark((function t(n,r,a){var c,u,p,s,o,i;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c={asset_id:+n,"metadata.file":r},u=1e4*a,p={"data.md":1},s={data:"$data"},o={aggregate:JSON.stringify([{$match:c},{$sort:p},{$skip:u},{$limit:1e4},{$project:s}])},t.prev=6,t.next=9,z("corva","formation-evaluation.data",n,o);case 9:return i=t.sent,t.abrupt("return",i);case 13:return t.prev=13,t.t0=t.catch(6),console.error(t.t0),t.abrupt("return",[]);case 17:case"end":return t.stop()}}),t,null,[[6,13]])}))),function(t,n,r){return mt.apply(this,arguments)}),gt=(yt=a(e.mark((function t(a){var c,u,p,s,o;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c=a.assetId,u=a.fileName,p=a.recordsCount,s=Math.ceil(p/1e4),o=n(s).map((function(t){return bt(c,u,t)})),t.abrupt("return",Promise.all(o).then((function(t){return r(t)})));case 4:case"end":return t.stop()}}),t)}))),function(t){return yt.apply(this,arguments)}),kt=function(t){var n=t.assetId,r=t.segment,e=void 0===r?"drilling":r;return p("/v1/app_streams?asset_id=".concat(n,"&segment=").concat(e))};function xt(t){switch(t){case"program":return P;case"rig":return O;case"well":return w;case"frac_fleet":return S;case"drillout_unit":return R;case"pad":return C;default:return D}}function Ot(t){switch(t){case"rig":return k;case"well":return b;default:return A}}var jt=function(t,n){return p("/v2/apps/".concat(t,"/app_media"),n)},Pt=function(t,n){return o("/v2/apps/".concat(t,"/app_media/").concat(n),null)},$t=function(t,n){var r=n.file,e=n.mediaType;return f("/v2/apps/".concat(t,"/app_media"),{"app_media[media_type]":e,"app_media[file]":r})},At=function(t,n,r){return l("/v2/apps/".concat(t,"/app_media/").concat(n),{app_media:r})},It=function(t,n){return p("/v2/apps/".concat(t,"/app_help_contents"),n)},Dt=function(t,n){return o("/v2/apps/".concat(t,"/app_help_contents/").concat(n),null)},Tt=function(t,n){var r=n.title,e=n.description,a=n.url;return f("/v2/apps/".concat(t,"/app_help_contents"),{"app_help_content[title]":r,"app_help_content[description]":e,"app_help_content[url]":a})},Ut=function(t,n,r){var e=r.title,a=r.description,c=r.url,u=r.position;return l("/v2/apps/".concat(t,"/app_help_contents/").concat(n),{app_help_content:{title:e,description:a,url:c,position:u}})};function qt(t){return Ct.apply(this,arguments)}function Ct(){return(Ct=a(e.mark((function t(n){var r,a=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.length>1&&void 0!==a[1]?a[1]:{},t.abrupt("return",s("/v2/dashboard_app_annotations",d({app_annotation:n},r)));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Nt(t,n){return St.apply(this,arguments)}function St(){return(St=a(e.mark((function t(n,r){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",l("/v2/dashboard_app_annotations/".concat(n),{app_annotation:r}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Et(t){return Jt.apply(this,arguments)}function Jt(){return(Jt=a(e.mark((function t(n){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o("/v2/dashboard_app_annotations/".concat(n)));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Kt(t,n){return Rt.apply(this,arguments)}function Rt(){return(Rt=a(e.mark((function t(n,r){var a,c=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=c.length>2&&void 0!==c[2]?c[2]:{},t.abrupt("return",p("/v2/dashboard_app_annotations",d({app_id:n,asset_id:r},a)));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Ft(t,n,r){return Gt.apply(this,arguments)}function Gt(){return(Gt=a(e.mark((function t(n,r,a){var c;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c={dashboard_id:n},r&&(c.asset_id=r),a&&(c.parent_asset_id=a),t.abrupt("return",p("/v2/dashboard_app_annotations/last_annotations",c));case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Mt(t){return zt.apply(this,arguments)}function zt(){return(zt=a(e.mark((function t(n){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",l("/v2/dashboard_app_annotations/".concat(n,"/close")));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Bt(t,n){return Ht.apply(this,arguments)}function Ht(){return(Ht=a(e.mark((function t(n,r){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v2/dashboard_app_annotations/".concat(n,"/comments/"),r));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Lt(t){return Qt.apply(this,arguments)}function Qt(){return(Qt=a(e.mark((function t(n){var r,a=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.length>1&&void 0!==a[1]?a[1]:{},t.abrupt("return",p("/v2/dashboard_app_annotations/".concat(n,"/comments/"),r));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Vt(t){return"".concat(u,"/v1/file/download?file_name=").concat(t)}function Wt(t,n,r){return Xt.apply(this,arguments)}function Xt(){return(Xt=a(e.mark((function t(n,r,a){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",l("/v1/activities/".concat(n,"/comments/").concat(r),a));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Yt(t,n){return Zt.apply(this,arguments)}function Zt(){return(Zt=a(e.mark((function t(n,r){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v1/activities/".concat(n,"/comments"),r));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function tn(t,n){return nn.apply(this,arguments)}function nn(){return(nn=a(e.mark((function t(n,r){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o("/v1/activities/".concat(n,"/comments/").concat(r)));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function rn(t){return en.apply(this,arguments)}function en(){return(en=a(e.mark((function t(n){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v1/activities/".concat(n,"/likes/toggle")));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function an(t,n){return cn.apply(this,arguments)}function cn(){return(cn=a(e.mark((function t(n,r){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",l("/v1/activities/".concat(n),r));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function un(t){return pn.apply(this,arguments)}function pn(){return(pn=a(e.mark((function t(n){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o("/v1/activities/".concat(n)));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function sn(t,n,r){return on.apply(this,arguments)}function on(){return(on=a(e.mark((function t(n,r,a){var c;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c={type:n},r&&(c.search=r),a&&(c.company_id=a),t.abrupt("return",p("/v1/users/autocomplete",c));case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function fn(t,n){return ln.apply(this,arguments)}function ln(){return(ln=a(e.mark((function t(n,r){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p("/v1/file/sign?file_name=".concat(encodeURIComponent(n),"&contentType=").concat(r)));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function hn(t){return vn.apply(this,arguments)}function vn(){return(vn=a(e.mark((function t(n){var r,a=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.length>1&&void 0!==a[1]?a[1]:"attachment",t.abrupt("return",p("/v1/file/download_link?file_name=".concat(encodeURIComponent(n),"&response_content_disposition=").concat(r),{}));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var dn=function(t,n){return p("/v2/apps/".concat(t,"/packages"),n)};function mn(t){return yn.apply(this,arguments)}function yn(){return(yn=a(e.mark((function t(n){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p("/v1/sessions/schemas",{email:n,with_provider:!0}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function wn(t){return _n.apply(this,arguments)}function _n(){return(_n=a(e.mark((function t(n){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p("/v2/frac_fleets/wells",n));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function bn(t,n){return gn.apply(this,arguments)}function gn(){return(gn=a(e.mark((function t(n,r){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p("/v2/pads/".concat(n,"/app_wells"),r));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function kn(t){return xn.apply(this,arguments)}function xn(){return(xn=a(e.mark((function t(n){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p("/v2/tasks/".concat(n),{}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function On(){return jn.apply(this,arguments)}function jn(){return(jn=a(e.mark((function t(){var n,r=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.length>0&&void 0!==r[0]?r[0]:{},t.abrupt("return",s("/v2/tasks",n));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Pn=function(t){return p("/v2/apps/".concat(t,"/app_settings_templates"),{})},$n=function(t,n){return p("/v2/apps/".concat(t,"/app_settings_templates/").concat(n),{})},An=function(t,n,r){var e=r.name,a=r.settings;return l("/v2/apps/".concat(t,"/app_settings_templates/").concat(n),{app_settings_template:{name:e,settings:a}},{})},In=function(t,n){var r=n.name,e=n.settings;return s("/v2/apps/".concat(t,"/app_settings_templates"),{app_settings_template:{name:r,settings:e}})},Dn=function(t,n){return o("/v2/apps/".concat(t,"/app_settings_templates/").concat(n),{})},Tn=function(t,n,r){var e=c({user_id:r},{arrayFormat:"bracket"});return s("/v2/apps/".concat(t,"/app_settings_templates/").concat(n,"/share?").concat(e),{})},Un=function(t){var n=t.page,r=t.perPage,e=void 0===r?1e3:r,a=t.sort,c=t.order,u=t.search,s=t.companyId,o=t.ids;return p("/v1/users",{page:n,per_page:e,sort:a,order:c,ids:o,search:""!==u?u:void 0,company_id:null!==s?s:void 0})};function qn(t,n){return Cn.apply(this,arguments)}function Cn(){return(Cn=a(e.mark((function t(n,r){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v1/users/".concat(n,"/settings"),r));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Nn(t,n){return Sn.apply(this,arguments)}function Sn(){return(Sn=a(e.mark((function t(n,r){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p("/v1/users/".concat(n,"/settings/").concat(r)));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function En(){return Jn.apply(this,arguments)}function Jn(){return(Jn=a(e.mark((function t(){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v1/logout"));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Kn(){return Rn.apply(this,arguments)}function Rn(){return(Rn=a(e.mark((function t(){var n,r=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.length>0&&void 0!==r[0]?r[0]:{},t.abrupt("return",p("/v2/ability_check/check_permission",n,{isImmutable:!1}));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}export{Mt as closeLastAnnotation,Et as deleteAnnotation,Dt as deleteAppHelpContent,Pt as deleteAppMedia,Dn as deleteAppSettingsTemplate,G as deleteAppStorageRecords,un as deleteFeedItem,tn as deleteFeedItemComment,gt as getAllLASFileData,Lt as getAnnotationComments,Kt as getAnnotations,It as getAppHelpContent,jt as getAppMedia,dn as getAppPackages,$n as getAppSettingsTemplate,Pn as getAppSettingsTemplates,z as getAppStorage,A as getAsset,D as getAssets,ut as getCompanies,lt as getCompanyGoals,at as getCompetitorAnalysisData,m as getCurrentUser,Ft as getDashboardLastAnnotations,H as getDataAppStorage,Q as getDataAppStorageAggregate,J as getDrilloutUnit,R as getDrilloutUnits,it as getFavorites,Vt as getFileDownloadLink,wn as getFracFleetWells,S as getFracFleets,bt as getLASFileDataByPage,wt as getLASFileList,_t as getLASMetadata,bn as getPadWells,C as getPads,Kn as getPermissionCheck,st as getPicklist,P as getPrograms,U as getResolvedAssets,k as getRig,O as getRigs,hn as getS3DownloadLink,fn as getS3SignedUrl,kt as getStreams,kn as getTask,mn as getUserAuthSchemas,sn as getUserAutocomplete,Nn as getUserSetting,Un as getUsers,b as getWell,w as getWells,En as logout,Ot as mapAssetByIdGetRequest,xt as mapAssetGetRequest,Nt as patchAnnotation,An as patchAppSettingsTemplate,an as patchFeedItem,Wt as patchFeedItemComment,qt as postAnnotation,Bt as postAnnotationComment,In as postAppSettingsTemplate,tt as postAppStorage,rt as postDataAppStorage,Yt as postFeedItemComment,On as postTask,W as putAppStorage,Y as putDataAppStorage,qn as setCurrentUserSettings,Tn as shareAppSettingsTemplate,rn as toggleFeedItemLike,Ut as updateAppHelpContent,At as updateAppMedia,Tt as uploadAppHelpContent,$t as uploadAppMedia};
1
+ import t from"@babel/runtime/helpers/defineProperty";import{range as n,flattenDepth as r}from"lodash";import e from"@babel/runtime/regenerator";import a from"@babel/runtime/helpers/asyncToGenerator";import{stringify as c}from"query-string";import{baseUrl as u,get as p,post as s,del as o,put as i,sendFormData as f,patch as l}from"../api/apiCore.js";import{CORVA_API_URLS as h}from"../constants.js";function v(t,n){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);n&&(e=e.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),r.push.apply(r,e)}return r}function d(n){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?v(Object(e),!0).forEach((function(r){t(n,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):v(Object(e)).forEach((function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))}))}return n}function m(){return y.apply(this,arguments)}function y(){return(y=a(e.mark((function t(){var n;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,fetch("".concat(u,"/v1/users/current"),{credentials:"include"});case 3:if(null!=(n=t.sent)&&n.ok){t.next=6;break}return t.abrupt("return",null);case 6:return t.next=8,n.json();case 8:return t.abrupt("return",t.sent);case 11:return t.prev=11,t.t0=t.catch(0),console.error(t.t0),t.abrupt("return",null);case 15:case"end":return t.stop()}}),t,null,[[0,11]])})))).apply(this,arguments)}function w(){return _.apply(this,arguments)}function _(){return(_=a(e.mark((function t(){var n,r=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.length>0&&void 0!==r[0]?r[0]:{},t.abrupt("return",p("/v2/integration/wellview/bha",n));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function b(t){return g.apply(this,arguments)}function g(){return(g=a(e.mark((function t(n){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p("/v2/wells",n));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function k(t){return x.apply(this,arguments)}function x(){return(x=a(e.mark((function t(n){var r,a=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.length>1&&void 0!==a[1]?a[1]:{},t.abrupt("return",p("/v2/wells/".concat(n),r));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function O(t){return j.apply(this,arguments)}function j(){return(j=a(e.mark((function t(n){var r,a=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.length>1&&void 0!==a[1]?a[1]:{},t.abrupt("return",p("/v2/rigs/".concat(n),r));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function P(){return $.apply(this,arguments)}function $(){return($=a(e.mark((function t(){var n,r=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.length>0&&void 0!==r[0]?r[0]:{},t.abrupt("return",p("/v2/rigs",n));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function A(){return I.apply(this,arguments)}function I(){return(I=a(e.mark((function t(){var n,r=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.length>0&&void 0!==r[0]?r[0]:{},t.abrupt("return",p("/v2/programs",n));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function D(t){return T.apply(this,arguments)}function T(){return(T=a(e.mark((function t(n){var r,a=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.length>1&&void 0!==a[1]?a[1]:{},t.abrupt("return",p("/v2/assets/".concat(n),r));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function U(){return q.apply(this,arguments)}function q(){return(q=a(e.mark((function t(){var n,r=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.length>0&&void 0!==r[0]?r[0]:{},t.abrupt("return",p("/v2/assets",n));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function C(){return N.apply(this,arguments)}function N(){return(N=a(e.mark((function t(){var n,r=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.length>0&&void 0!==r[0]?r[0]:{},t.abrupt("return",s("/v2/assets/resolve",n));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function S(){return E.apply(this,arguments)}function E(){return(E=a(e.mark((function t(){var n,r=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.length>0&&void 0!==r[0]?r[0]:{},t.abrupt("return",p("/v2/pads",n));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function J(){return K.apply(this,arguments)}function K(){return(K=a(e.mark((function t(){var n,r=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.length>0&&void 0!==r[0]?r[0]:{},t.abrupt("return",p("/v2/frac_fleets",n));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function R(t){return F.apply(this,arguments)}function F(){return(F=a(e.mark((function t(n){var r,a=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.length>1&&void 0!==a[1]?a[1]:{},t.abrupt("return",p("/v2/drillout_units/".concat(n),r));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function G(){return M.apply(this,arguments)}function M(){return(M=a(e.mark((function t(){var n,r=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.length>0&&void 0!==r[0]?r[0]:{},t.abrupt("return",p("/v2/drillout_units",n));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function z(t,n,r){return B.apply(this,arguments)}function B(){return(B=a(e.mark((function t(n,r,a){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o("/v1/data/".concat(n,"/").concat(r),a));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function H(t,n,r){return L.apply(this,arguments)}function L(){return(L=a(e.mark((function t(n,r,a){var c,u=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c=u.length>3&&void 0!==u[3]?u[3]:{},t.abrupt("return",p("/v1/data/".concat(n,"/").concat(r),d(d({},c),{},{asset_id:a}),{appKey:c.appKey}));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Q(t,n){return V.apply(this,arguments)}function V(){return(V=a(e.mark((function t(n,r){var a,c=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=c.length>2&&void 0!==c[2]?c[2]:{},t.abrupt("return",p("/api/v1/data/".concat(n,"/").concat(r,"/"),a,{apiUrl:h.DATA_API}));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function W(t,n){return X.apply(this,arguments)}function X(){return(X=a(e.mark((function t(n,r){var a,c=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=c.length>2&&void 0!==c[2]?c[2]:{},t.abrupt("return",p("/api/v1/data/".concat(n,"/").concat(r,"/aggregate/"),a,{apiUrl:h.DATA_API}));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Y(t,n,r,e){return Z.apply(this,arguments)}function Z(){return(Z=a(e.mark((function t(n,r,a,c){var u,p=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return u=p.length>4&&void 0!==p[4]?p[4]:{},t.abrupt("return",i("/v1/data/".concat(n,"/").concat(r,"/").concat(a),c,u));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function tt(t,n,r,e,a){return nt.apply(this,arguments)}function nt(){return(nt=a(e.mark((function t(n,r,a,c,u){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i("/api/v1/data/".concat(n,"/").concat(r,"/").concat(a),c,u,{apiUrl:h.DATA_API}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function rt(t,n,r){return et.apply(this,arguments)}function et(){return(et=a(e.mark((function t(n,r,a){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v1/data/".concat(n,"/").concat(r),a));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function at(t,n,r){return ct.apply(this,arguments)}function ct(){return(ct=a(e.mark((function t(n,r,a){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/api/v1/data/".concat(n,"/").concat(r),a,{apiUrl:h.DATA_API}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ut(t){return pt.apply(this,arguments)}function pt(){return(pt=a(e.mark((function t(n){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p("/v1/competitor_analysis",n));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function st(){return ot.apply(this,arguments)}function ot(){return(ot=a(e.mark((function t(){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p("/v1/companies"));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function it(t){return ft.apply(this,arguments)}function ft(){return(ft=a(e.mark((function t(n){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p("/v2/picklists/".concat(n)));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function lt(){return ht.apply(this,arguments)}function ht(){return(ht=a(e.mark((function t(){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p("/v2/favorites"));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function vt(t){return dt.apply(this,arguments)}function dt(){return(dt=a(e.mark((function t(n){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p("/v1/companies/".concat(n,"/settings/company_goals")));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var mt,yt,wt,_t,bt=(mt=a(e.mark((function t(n){var r,a,c,u;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r={asset_id:+n},a={_id:"$file",name:{$first:"$file"},timestamp:{$first:"$timestamp"}},c={timestamp:-1},u={aggregate:JSON.stringify([{$match:r},{$group:a},{$sort:c}])},t.prev=4,t.next=7,H("corva","formation-evaluation.metadata",n,u);case 7:return t.abrupt("return",t.sent);case 10:return t.prev=10,t.t0=t.catch(4),console.error(t.t0),t.abrupt("return",[]);case 14:case"end":return t.stop()}}),t,null,[[4,10]])}))),function(t){return mt.apply(this,arguments)}),gt=(yt=a(e.mark((function t(n,r){var a;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a="{asset_id#eq#".concat(n,"}AND{file#eq#'").concat(r,"'}"),t.prev=1,t.next=4,H("corva","formation-evaluation.metadata",n,{query:a});case 4:return t.abrupt("return",t.sent);case 7:return t.prev=7,t.t0=t.catch(1),console.error(t.t0),t.abrupt("return",[]);case 11:case"end":return t.stop()}}),t,null,[[1,7]])}))),function(t,n){return yt.apply(this,arguments)}),kt=(wt=a(e.mark((function t(n,r,a){var c,u,p,s,o,i;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c={asset_id:+n,"metadata.file":r},u=1e4*a,p={"data.md":1},s={data:"$data"},o={aggregate:JSON.stringify([{$match:c},{$sort:p},{$skip:u},{$limit:1e4},{$project:s}])},t.prev=6,t.next=9,H("corva","formation-evaluation.data",n,o);case 9:return i=t.sent,t.abrupt("return",i);case 13:return t.prev=13,t.t0=t.catch(6),console.error(t.t0),t.abrupt("return",[]);case 17:case"end":return t.stop()}}),t,null,[[6,13]])}))),function(t,n,r){return wt.apply(this,arguments)}),xt=(_t=a(e.mark((function t(a){var c,u,p,s,o;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c=a.assetId,u=a.fileName,p=a.recordsCount,s=Math.ceil(p/1e4),o=n(s).map((function(t){return kt(c,u,t)})),t.abrupt("return",Promise.all(o).then((function(t){return r(t)})));case 4:case"end":return t.stop()}}),t)}))),function(t){return _t.apply(this,arguments)}),Ot=function(t){var n=t.assetId,r=t.segment,e=void 0===r?"drilling":r;return p("/v1/app_streams?asset_id=".concat(n,"&segment=").concat(e))};function jt(t){switch(t){case"program":return A;case"rig":return P;case"well":return b;case"frac_fleet":return J;case"drillout_unit":return G;case"pad":return S;default:return U}}function Pt(t){switch(t){case"rig":return O;case"well":return k;default:return D}}var $t=function(t,n){return p("/v2/apps/".concat(t,"/app_media"),n)},At=function(t,n){return o("/v2/apps/".concat(t,"/app_media/").concat(n),null)},It=function(t,n){var r=n.file,e=n.mediaType;return f("/v2/apps/".concat(t,"/app_media"),{"app_media[media_type]":e,"app_media[file]":r})},Dt=function(t,n,r){return l("/v2/apps/".concat(t,"/app_media/").concat(n),{app_media:r})},Tt=function(t,n){return p("/v2/apps/".concat(t,"/app_help_contents"),n)},Ut=function(t,n){return o("/v2/apps/".concat(t,"/app_help_contents/").concat(n),null)},qt=function(t,n){var r=n.title,e=n.description,a=n.url;return f("/v2/apps/".concat(t,"/app_help_contents"),{"app_help_content[title]":r,"app_help_content[description]":e,"app_help_content[url]":a})},Ct=function(t,n,r){var e=r.title,a=r.description,c=r.url,u=r.position;return l("/v2/apps/".concat(t,"/app_help_contents/").concat(n),{app_help_content:{title:e,description:a,url:c,position:u}})};function Nt(t){return St.apply(this,arguments)}function St(){return(St=a(e.mark((function t(n){var r,a=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.length>1&&void 0!==a[1]?a[1]:{},t.abrupt("return",s("/v2/dashboard_app_annotations",d({app_annotation:n},r)));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Et(t,n){return Jt.apply(this,arguments)}function Jt(){return(Jt=a(e.mark((function t(n,r){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",l("/v2/dashboard_app_annotations/".concat(n),{app_annotation:r}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Kt(t){return Rt.apply(this,arguments)}function Rt(){return(Rt=a(e.mark((function t(n){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o("/v2/dashboard_app_annotations/".concat(n)));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Ft(t,n){return Gt.apply(this,arguments)}function Gt(){return(Gt=a(e.mark((function t(n,r){var a,c=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=c.length>2&&void 0!==c[2]?c[2]:{},t.abrupt("return",p("/v2/dashboard_app_annotations",d({app_id:n,asset_id:r},a)));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Mt(t,n,r){return zt.apply(this,arguments)}function zt(){return(zt=a(e.mark((function t(n,r,a){var c;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c={dashboard_id:n},r&&(c.asset_id=r),a&&(c.parent_asset_id=a),t.abrupt("return",p("/v2/dashboard_app_annotations/last_annotations",c));case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Bt(t){return Ht.apply(this,arguments)}function Ht(){return(Ht=a(e.mark((function t(n){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",l("/v2/dashboard_app_annotations/".concat(n,"/close")));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Lt(t,n){return Qt.apply(this,arguments)}function Qt(){return(Qt=a(e.mark((function t(n,r){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v2/dashboard_app_annotations/".concat(n,"/comments/"),r));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Vt(t){return Wt.apply(this,arguments)}function Wt(){return(Wt=a(e.mark((function t(n){var r,a=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.length>1&&void 0!==a[1]?a[1]:{},t.abrupt("return",p("/v2/dashboard_app_annotations/".concat(n,"/comments/"),r));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Xt(t){return"".concat(u,"/v1/file/download?file_name=").concat(t)}function Yt(t,n,r){return Zt.apply(this,arguments)}function Zt(){return(Zt=a(e.mark((function t(n,r,a){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",l("/v1/activities/".concat(n,"/comments/").concat(r),a));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function tn(t,n){return nn.apply(this,arguments)}function nn(){return(nn=a(e.mark((function t(n,r){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v1/activities/".concat(n,"/comments"),r));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function rn(t,n){return en.apply(this,arguments)}function en(){return(en=a(e.mark((function t(n,r){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o("/v1/activities/".concat(n,"/comments/").concat(r)));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function an(t){return cn.apply(this,arguments)}function cn(){return(cn=a(e.mark((function t(n){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v1/activities/".concat(n,"/likes/toggle")));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function un(t,n){return pn.apply(this,arguments)}function pn(){return(pn=a(e.mark((function t(n,r){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",l("/v1/activities/".concat(n),r));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function sn(t){return on.apply(this,arguments)}function on(){return(on=a(e.mark((function t(n){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o("/v1/activities/".concat(n)));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function fn(t,n,r){return ln.apply(this,arguments)}function ln(){return(ln=a(e.mark((function t(n,r,a){var c;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c={type:n},r&&(c.search=r),a&&(c.company_id=a),t.abrupt("return",p("/v1/users/autocomplete",c));case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function hn(t,n){return vn.apply(this,arguments)}function vn(){return(vn=a(e.mark((function t(n,r){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p("/v1/file/sign?file_name=".concat(encodeURIComponent(n),"&contentType=").concat(r)));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function dn(t){return mn.apply(this,arguments)}function mn(){return(mn=a(e.mark((function t(n){var r,a=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.length>1&&void 0!==a[1]?a[1]:"attachment",t.abrupt("return",p("/v1/file/download_link?file_name=".concat(encodeURIComponent(n),"&response_content_disposition=").concat(r),{}));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var yn=function(t,n){return p("/v2/apps/".concat(t,"/packages"),n)};function wn(t){return _n.apply(this,arguments)}function _n(){return(_n=a(e.mark((function t(n){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p("/v1/sessions/schemas",{email:n,with_provider:!0}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function bn(t){return gn.apply(this,arguments)}function gn(){return(gn=a(e.mark((function t(n){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p("/v2/frac_fleets/wells",n));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function kn(t,n){return xn.apply(this,arguments)}function xn(){return(xn=a(e.mark((function t(n,r){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p("/v2/pads/".concat(n,"/app_wells"),r));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function On(t){return jn.apply(this,arguments)}function jn(){return(jn=a(e.mark((function t(n){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p("/v2/tasks/".concat(n),{}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Pn(){return $n.apply(this,arguments)}function $n(){return($n=a(e.mark((function t(){var n,r=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.length>0&&void 0!==r[0]?r[0]:{},t.abrupt("return",s("/v2/tasks",n));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var An=function(t){return p("/v2/apps/".concat(t,"/app_settings_templates"),{})},In=function(t,n){return p("/v2/apps/".concat(t,"/app_settings_templates/").concat(n),{})},Dn=function(t,n,r){var e=r.name,a=r.settings;return l("/v2/apps/".concat(t,"/app_settings_templates/").concat(n),{app_settings_template:{name:e,settings:a}},{})},Tn=function(t,n){var r=n.name,e=n.settings;return s("/v2/apps/".concat(t,"/app_settings_templates"),{app_settings_template:{name:r,settings:e}})},Un=function(t,n){return o("/v2/apps/".concat(t,"/app_settings_templates/").concat(n),{})},qn=function(t,n,r){var e=c({user_id:r},{arrayFormat:"bracket"});return s("/v2/apps/".concat(t,"/app_settings_templates/").concat(n,"/share?").concat(e),{})},Cn=function(t){var n=t.page,r=t.perPage,e=void 0===r?1e3:r,a=t.sort,c=t.order,u=t.search,s=t.companyId,o=t.ids;return p("/v1/users",{page:n,per_page:e,sort:a,order:c,ids:o,search:""!==u?u:void 0,company_id:null!==s?s:void 0})};function Nn(t,n){return Sn.apply(this,arguments)}function Sn(){return(Sn=a(e.mark((function t(n,r){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v1/users/".concat(n,"/settings"),r));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function En(t,n){return Jn.apply(this,arguments)}function Jn(){return(Jn=a(e.mark((function t(n,r){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p("/v1/users/".concat(n,"/settings/").concat(r)));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Kn(){return Rn.apply(this,arguments)}function Rn(){return(Rn=a(e.mark((function t(){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s("/v1/logout"));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Fn(){return Gn.apply(this,arguments)}function Gn(){return(Gn=a(e.mark((function t(){var n,r=arguments;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.length>0&&void 0!==r[0]?r[0]:{},t.abrupt("return",p("/v2/ability_check/check_permission",n,{isImmutable:!1}));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}export{Bt as closeLastAnnotation,Kt as deleteAnnotation,Ut as deleteAppHelpContent,At as deleteAppMedia,Un as deleteAppSettingsTemplate,z as deleteAppStorageRecords,sn as deleteFeedItem,rn as deleteFeedItemComment,xt as getAllLASFileData,Vt as getAnnotationComments,Ft as getAnnotations,Tt as getAppHelpContent,$t as getAppMedia,yn as getAppPackages,In as getAppSettingsTemplate,An as getAppSettingsTemplates,H as getAppStorage,D as getAsset,U as getAssets,st as getCompanies,vt as getCompanyGoals,ut as getCompetitorAnalysisData,m as getCurrentUser,Mt as getDashboardLastAnnotations,Q as getDataAppStorage,W as getDataAppStorageAggregate,R as getDrilloutUnit,G as getDrilloutUnits,lt as getFavorites,Xt as getFileDownloadLink,bn as getFracFleetWells,J as getFracFleets,kt as getLASFileDataByPage,bt as getLASFileList,gt as getLASMetadata,kn as getPadWells,S as getPads,Fn as getPermissionCheck,it as getPicklist,A as getPrograms,C as getResolvedAssets,O as getRig,P as getRigs,dn as getS3DownloadLink,hn as getS3SignedUrl,Ot as getStreams,On as getTask,wn as getUserAuthSchemas,fn as getUserAutocomplete,En as getUserSetting,Cn as getUsers,k as getWell,w as getWellViewBha,b as getWells,Kn as logout,Pt as mapAssetByIdGetRequest,jt as mapAssetGetRequest,Et as patchAnnotation,Dn as patchAppSettingsTemplate,un as patchFeedItem,Yt as patchFeedItemComment,Nt as postAnnotation,Lt as postAnnotationComment,Tn as postAppSettingsTemplate,rt as postAppStorage,at as postDataAppStorage,tn as postFeedItemComment,Pn as postTask,Y as putAppStorage,tt as putDataAppStorage,Nn as setCurrentUserSettings,qn as shareAppSettingsTemplate,an as toggleFeedItemLike,Ct as updateAppHelpContent,Dt as updateAppMedia,qt as uploadAppHelpContent,It as uploadAppMedia};
package/clients/utils.js CHANGED
@@ -1 +1 @@
1
- var r=/corva\.ai\/(.+?)\/packages/;function a(){var a=Error.stackTraceLimit;Error.stackTraceLimit=30;var c=(new Error).stack.match(r);return Error.stackTraceLimit=a,c?c[1].replace("/app/","."):null}export{a as getDCAppKey};
1
+ import r from"@babel/runtime/helpers/defineProperty";function e(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(r);e&&(c=c.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,c)}return t}function t(t){for(var c=1;c<arguments.length;c++){var n=null!=arguments[c]?arguments[c]:{};c%2?e(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):e(Object(n)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))}))}return t}var c=/corva\.ai\/(.+?)\/packages/,n=/app\/(.+?)\.chunk\.js/;function a(){var r=Error.stackTraceLimit;Error.stackTraceLimit=300;var e=new Error,t=e.stack.match(c)||e.stack.match(n);return Error.stackTraceLimit=r,t?t[1].replace("/app/","."):null}function o(r){var e=r.config,c=r.appKey,n=t({},e.headers||{});return c&&(n["x-corva-app"]=c),t(t({},e),{},{headers:n})}export{o as attachHTTPHeaders,a as getAppKeyFromStackTrace};
@@ -1 +1 @@
1
- import"@babel/runtime/helpers/defineProperty";import"lodash";import"@babel/runtime/helpers/toConsumableArray";import"../../constants/completion.js";import"../../constants/alerts.js";import e from"@babel/runtime/helpers/slicedToArray";import"../../constants/goals.js";import"../../constants/segment.js";import"../../constants/apps.js";import"../../constants/drillstring.js";import"../../constants/notifications.js";import"../../constants/feed.js";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/asyncToGenerator";import"../../utils/mobileDetect.js";import"@babel/runtime/helpers/typeof";import"../../utils/index.js";import{jsxs as t,jsx as o}from"react/jsx-runtime";import{makeStyles as r,Popover as i,Grid as n,Typography as s}from"@material-ui/core";import{useState as p}from"react";import"querystring";import"uuid/v1";import"../../clients/jsonApi/index.js";import"../../clients/subscriptions.js";import"uuid";import"@babel/runtime/helpers/objectWithoutProperties";import{func as m,node as a,shape as l,bool as d,number as c}from"prop-types";import j from"classnames";import"../Modal/index.js";import"../IconMenu/index.js";import"../StyledMenuItem/index.js";import"../LoadingIndicator/LoadingIndicator.js";import"../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../DevCenter/DevCenterAppContainer/components/DcTooltipsCoordinatorProvider/DcTooltipsCoordinatorProvider.js";import"../Tooltip/MuiTooltipDcWrapper.js";import"../Avatar/index.js";import"../Annotations/AnnotationsContext.js";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"react-router";import"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import C from"../IconButton/index.js";import"../ConfirmationDialog.js";import u from"../Icons/SendIcon.js";import"../Annotations/components/AnnotationsList/index.js";import"../Annotations/components/LastAnnotation/index.js";import"../PadModeSelect/PadModeSelect.js";import"../DevCenter/AppHeader/AppHeaderNew.js";import"../DevCenter/AppHeader/AppHeader.js";import"../DevCenter/AppSideBar/AppSideBar.js";import"../DevCenter/AppContext.js";import"../DevCenter/AppsDataProvider/AppsDataProvider.js";import"@material-ui/icons/Help";import"../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../EmptyView/EmptyAppView/EmptyAppView.js";import"../ErrorBoundary/ErrorBoundary.js";import"../Typography.js";import"../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../DevCenter/DevCenterAppContainer/components/DisabledSettingsMessage/DisabledSettingsMessage.js";import"slate";import"../SlateFormattedText/RenderElements.js";import"../SlateFormattedText/SlateFormattedText.js";import"../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../DevCenter/DevCenterAppContainer/components/HelpCenterDialog/HelpCenterDialog.js";import"../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../DevCenter/NavigationBar/NavigationBar.js";import"../DevCenter/SideBar/SideBar.js";import"../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../DevCenter/IsolatedDevCenterAppContainer/AppsGridDragHandle.js";import"../TruncatedText/index.js";import"../AssetEditor/SingleAssetEditor.js";import"../AssetEditor/AssetEditorAutocomplete.js";import"../AssetEditor/index.js";import"../AppVersionsSelect/AppVersionsSelect.js";import"../CollapsableSidebar.js";import"../DateTimePicker/index.js";import"../DatePicker/index.js";import"../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../ColorPicker/ColorPicker.js";import"../ParameterCharts/AddEditTrack.js";import"../ParameterCharts/ParameterCharts.js";import"../ChartActionsList/ChartActionsList.js";import"../SettingEditors/ColorEditor/index.js";import"../SettingEditors/DropdownEditor/index.js";import"../SettingEditors/RadioEditor/index.js";import"../SwitchControl/index.js";import"../RangeSlider/RangeSlider.js";import"../Login/components/Login.js";import"../Login/components/PasswordField.js";import"../Login/components/Chip.js";import"../Login/components/StepFooter.js";import"../Login/components/StepContent.js";import"../Login/components/StepHeader.js";import"../Login/components/Step.js";import"../Login/components/OrDivider.js";import"../Login/components/HiddenEmailField.js";import"../Login/components/EmailField.js";import"../Breadcrumbs/index.js";import"../VirtualizedTable/index.js";import"../EmptyView/EmptyView.js";import"../Button/index.js";import"../MenuItem/index.js";import"../ContextMenuItem/index.js";import"../FolderMenuItem/index.js";import"../EditableItem/EditableItem/index.js";import"../EditableItem/EditableItemWithBadge/index.js";import"../Checkbox/index.js";import"../FolderMenuItemWithLinks/index.js";import"../TextField/index.js";import"../Chip/index.js";import"../Counter/index.js";import"../AnchorsList/AnchorsList.js";import"../Select/index.js";import"../Tabs/Tabs.js";import"../Tabs/Tab.js";import"../ResizableTable/ResizableTable.js";import"../Drillstring/BHASchematic.js";import"../Drillstring/BHAComponentIcon.js";import"../Drillstring/BHATable/index.js";import"../Drillstring/BHAComponentDetail/index.js";import"../Casing/CasingComponentIcon.js";import"../Casing/CasingTable/index.js";import"../WellSummary/WellSummaryItemLabel.js";import"../WellSummary/WellSummaryItemTitle.js";import"../WellSummary/WellSummaryItemValue.js";import"../WellSummary/ActivitySummaryChart.js";import"../WellSummary/FracWirelineTimeChart.js";import"../BICOffsetPickerDialog/index.js";import"../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../Notifications/Notifications.js";import"../TextLink/index.js";import"../Template/TemplatePopover/index.js";import"../PinnableFilters/PinnableFilters.js";import"../HeaderLayout/HeaderLayout.js";import"../PadOffsetsPicker/PadOffsetsPicker.js";import"../PadOffsetsPicker/OffsetAssetChip.js";import"../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../PadOffsetsPicker/StagesSelector.js";import"../Table/TableToolbar/TableToolbar.js";import"../PriceInput/PriceInput.js";import"../LabelsCounter/LabelsCounter.js";import"../Stepper/Step.js";import"../Stepper/StepsWrapper.js";import"../Stepper/Stepper.js";import"../Comment/CommentIcon/index.js";import"../FilesLoader/FilesLoader.js";import"../SearchInput/index.js";import"../StageDesignVActual/ComparisonHeader.js";import"../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../StageDesignVActual/ComparisonRow.js";import"../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../FeedItem/FeedItem.js";import"../KeyboardDateTimePicker.js";import"../PostInput/PostInput.js";import"../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import A from"./components/Content.js";import"./Popup.js";var D=r((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"}}}));function v(r){var m=r.anchorEl,a=r.anchorOrigin,l=r.onClose,d=r.isSaveDisabled,c=r.onSave,v=r.startAdornment,g=r.endAdornment,x=r.customContent,S=r.userCompanyId,h=D(),b=p(),P=e(b,2),I=P[0],f=P[1];return t(i,{open:!0,anchorEl:m,anchorOrigin:a,onClose:l,classes:{paper:h.paper},children:[o(A,{userCompanyId:S,startAdornment:v,endAdornment:g,customContent:x,setComment:f,smallerView:!0}),t(n,{container:!0,direction:"row",justify:"space-between",alignItems:"center",className:h.actions,children:[o(n,{item:!0,children:o(s,{variant:"caption",className:j(h.inputMain,h.cancelText,h.highlightedLabel),component:"div",gutterBottom:!0,onClick:l,children:"Cancel"})}),t(n,{item:!0,direction:"row",alignItems:"center",className:h.sendRow,children:[t(s,{variant:"caption",className:j(h.inputMain,h.inputHelper),component:"div",gutterBottom:!0,children:["Press ",o(s,{variant:"caption",color:"primary",className:j(h.inputMain,h.highlightedLabel),children:"Enter"})," to send"]}),o(C,{onClick:function(){return c(I)},disabled:d,children:o(u,{})})]})]})]})}v.propTypes={onClose:m,onSave:m.isRequired,anchorEl:a.isRequired,anchorOrigin:l,isSaveDisabled:d,startAdornment:a,endAdornment:a,customContent:a,userCompanyId:c.isRequired},v.defaultProps={anchorOrigin:{horizontal:"right",vertical:"bottom"},onClose:function(){},isSaveDisabled:!1,startAdornment:null,endAdornment:null,customContent:null};export default v;
1
+ import"@babel/runtime/helpers/defineProperty";import"lodash";import"@babel/runtime/helpers/toConsumableArray";import"../../constants/completion.js";import"../../constants/alerts.js";import e from"@babel/runtime/helpers/slicedToArray";import"../../constants/goals.js";import"../../constants/segment.js";import"../../constants/apps.js";import"../../constants/drillstring.js";import"../../constants/notifications.js";import"../../constants/feed.js";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/asyncToGenerator";import"../../utils/mobileDetect.js";import"@babel/runtime/helpers/typeof";import"../../utils/index.js";import{jsxs as t,jsx as o}from"react/jsx-runtime";import{makeStyles as r,Popover as i,Grid as n,Typography as s}from"@material-ui/core";import{useState as p}from"react";import"querystring";import"uuid/v1";import"../../clients/jsonApi/index.js";import"../../clients/subscriptions.js";import"uuid";import"@babel/runtime/helpers/objectWithoutProperties";import{func as m,node as a,shape as l,bool as d,number as c}from"prop-types";import j from"classnames";import"../Modal/index.js";import"../IconMenu/index.js";import"../StyledMenuItem/index.js";import"../LoadingIndicator/LoadingIndicator.js";import"../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../DevCenter/DevCenterAppContainer/components/DcTooltipsCoordinatorProvider/DcTooltipsCoordinatorProvider.js";import"../Tooltip/MuiTooltipDcWrapper.js";import"../Avatar/index.js";import"../Annotations/AnnotationsContext.js";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"react-router";import"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import C from"../IconButton/index.js";import"../ConfirmationDialog.js";import u from"../Icons/SendIcon.js";import"../Annotations/components/AnnotationsList/index.js";import"../Annotations/components/LastAnnotation/index.js";import"../PadModeSelect/PadModeSelect.js";import"../DevCenter/AppHeader/AppHeaderNew.js";import"../DevCenter/AppHeader/AppHeader.js";import"../DevCenter/AppSideBar/AppSideBar.js";import"../DevCenter/AppContext.js";import"../DevCenter/AppsDataProvider/AppsDataProvider.js";import"@material-ui/icons/Help";import"../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../EmptyView/EmptyAppView/EmptyAppView.js";import"../ErrorBoundary/ErrorBoundary.js";import"../Typography.js";import"../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../DevCenter/DevCenterAppContainer/components/DisabledSettingsMessage/DisabledSettingsMessage.js";import"slate";import"../SlateFormattedText/RenderElements.js";import"../SlateFormattedText/SlateFormattedText.js";import"../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../DevCenter/DevCenterAppContainer/components/HelpCenterDialog/HelpCenterDialog.js";import"../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../DevCenter/NavigationBar/NavigationBar.js";import"../DevCenter/SideBar/SideBar.js";import"../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../DevCenter/IsolatedDevCenterAppContainer/AppsGridDragHandle.js";import"../TruncatedText/index.js";import"../AssetEditor/SingleAssetEditor.js";import"../AssetEditor/AssetEditorAutocomplete.js";import"../AssetEditor/index.js";import"../AppVersionsSelect/AppVersionsSelect.js";import"../CollapsableSidebar.js";import"../DateTimePicker/index.js";import"../DatePicker/index.js";import"../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../ColorPicker/ColorPicker.js";import"../ParameterCharts/AddEditTrack.js";import"../ParameterCharts/ParameterCharts.js";import"../ChartActionsList/ChartActionsList.js";import"../SettingEditors/ColorEditor/index.js";import"../SettingEditors/DropdownEditor/index.js";import"../SettingEditors/RadioEditor/index.js";import"../SwitchControl/index.js";import"../RangeSlider/RangeSlider.js";import"../Login/components/Login.js";import"../Login/components/PasswordField.js";import"../Login/components/Chip.js";import"../Login/components/StepFooter.js";import"../Login/components/StepContent.js";import"../Login/components/StepHeader.js";import"../Login/components/Step.js";import"../Login/components/OrDivider.js";import"../Login/components/HiddenEmailField.js";import"../Login/components/EmailField.js";import"../Breadcrumbs/index.js";import"../VirtualizedTable/index.js";import"../EmptyView/EmptyView.js";import"../Button/index.js";import"../MenuItem/index.js";import"../ContextMenuItem/index.js";import"../FolderMenuItem/index.js";import"../EditableItem/EditableItem/index.js";import"../EditableItem/EditableItemWithBadge/index.js";import"../Checkbox/index.js";import"../FolderMenuItemWithLinks/index.js";import"../TextField/index.js";import"../Chip/index.js";import"../Counter/index.js";import"../AnchorsList/AnchorsList.js";import"../Select/index.js";import"../CustomSelect/index.js";import"../Tabs/Tabs.js";import"../Tabs/Tab.js";import"../ResizableTable/ResizableTable.js";import"../Drillstring/BHASchematic.js";import"../Drillstring/BHAComponentIcon.js";import"../Drillstring/BHATable/index.js";import"../Drillstring/BHAComponentDetail/index.js";import"../Casing/CasingComponentIcon.js";import"../Casing/CasingTable/index.js";import"../WellSummary/WellSummaryItemLabel.js";import"../WellSummary/WellSummaryItemTitle.js";import"../WellSummary/WellSummaryItemValue.js";import"../WellSummary/ActivitySummaryChart.js";import"../WellSummary/FracWirelineTimeChart.js";import"../BICOffsetPickerDialog/index.js";import"../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../Notifications/Notifications.js";import"../TextLink/index.js";import"../Template/TemplatePopover/index.js";import"../PinnableFilters/PinnableFilters.js";import"../HeaderLayout/HeaderLayout.js";import"../PadOffsetsPicker/PadOffsetsPicker.js";import"../PadOffsetsPicker/OffsetAssetChip.js";import"../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../PadOffsetsPicker/StagesSelector.js";import"../Table/TableToolbar/TableToolbar.js";import"../PriceInput/PriceInput.js";import"../LabelsCounter/LabelsCounter.js";import"../Stepper/Step.js";import"../Stepper/StepsWrapper.js";import"../Stepper/Stepper.js";import"../Comment/CommentIcon/index.js";import"../FilesLoader/FilesLoader.js";import"../SearchInput/index.js";import"../StageDesignVActual/ComparisonHeader.js";import"../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../StageDesignVActual/ComparisonRow.js";import"../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../FeedItem/FeedItem.js";import"../KeyboardDateTimePicker.js";import"../PostInput/PostInput.js";import"../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import A from"./components/Content.js";import"./Popup.js";import"../EmbeddedApp/DevCenterEmbeddedApp.js";import"../EmbeddedApp/EmbeddedApp.js";var D=r((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"}}}));function v(r){var m=r.anchorEl,a=r.anchorOrigin,l=r.onClose,d=r.isSaveDisabled,c=r.onSave,v=r.startAdornment,g=r.endAdornment,b=r.customContent,x=r.userCompanyId,S=D(),h=p(),P=e(h,2),I=P[0],f=P[1];return t(i,{open:!0,anchorEl:m,anchorOrigin:a,onClose:l,classes:{paper:S.paper},children:[o(A,{userCompanyId:x,startAdornment:v,endAdornment:g,customContent:b,setComment:f,smallerView:!0}),t(n,{container:!0,direction:"row",justify:"space-between",alignItems:"center",className:S.actions,children:[o(n,{item:!0,children:o(s,{variant:"caption",className:j(S.inputMain,S.cancelText,S.highlightedLabel),component:"div",gutterBottom:!0,onClick:l,children:"Cancel"})}),t(n,{item:!0,direction:"row",alignItems:"center",className:S.sendRow,children:[t(s,{variant:"caption",className:j(S.inputMain,S.inputHelper),component:"div",gutterBottom:!0,children:["Press ",o(s,{variant:"caption",color:"primary",className:j(S.inputMain,S.highlightedLabel),children:"Enter"})," to send"]}),o(C,{onClick:function(){return c(I)},disabled:d,children:o(u,{})})]})]})]})}v.propTypes={onClose:m,onSave:m.isRequired,anchorEl:a.isRequired,anchorOrigin:l,isSaveDisabled:d,startAdornment:a,endAdornment:a,customContent:a,userCompanyId:c.isRequired},v.defaultProps={anchorOrigin:{horizontal:"right",vertical:"bottom"},onClose:function(){},isSaveDisabled:!1,startAdornment:null,endAdornment:null,customContent:null};export default v;
@@ -1 +1 @@
1
- import"@babel/runtime/helpers/defineProperty";import{debounce as e}from"lodash";import"@babel/runtime/helpers/toConsumableArray";import"../../../constants/completion.js";import"../../../constants/alerts.js";import"@babel/runtime/helpers/slicedToArray";import"../../../constants/goals.js";import"../../../constants/segment.js";import"../../../constants/apps.js";import"../../../constants/drillstring.js";import"../../../constants/notifications.js";import"../../../constants/feed.js";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/asyncToGenerator";import"../../../utils/mobileDetect.js";import"@babel/runtime/helpers/typeof";import"../../../utils/index.js";import{jsxs as t,Fragment as r,jsx as o}from"react/jsx-runtime";import{makeStyles as i}from"@material-ui/core";import"react";import"querystring";import"uuid/v1";import"../../../clients/jsonApi/index.js";import"../../../clients/subscriptions.js";import"uuid";import"@babel/runtime/helpers/objectWithoutProperties";import{node as n,number as s,func as p,bool as m}from"prop-types";import"classnames";import"../../Modal/index.js";import"../../IconMenu/index.js";import"../../StyledMenuItem/index.js";import"../../LoadingIndicator/LoadingIndicator.js";import"../../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../DevCenter/DevCenterAppContainer/components/DcTooltipsCoordinatorProvider/DcTooltipsCoordinatorProvider.js";import"../../Tooltip/MuiTooltipDcWrapper.js";import"../../Avatar/index.js";import"../../Annotations/AnnotationsContext.js";import"../../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"react-router";import"../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"../../IconButton/index.js";import"../../ConfirmationDialog.js";import"../../Annotations/components/AnnotationsList/index.js";import"../../Annotations/components/LastAnnotation/index.js";import"../../PadModeSelect/PadModeSelect.js";import"../../DevCenter/AppHeader/AppHeaderNew.js";import"../../DevCenter/AppHeader/AppHeader.js";import"../../DevCenter/AppSideBar/AppSideBar.js";import"../../DevCenter/AppContext.js";import"../../DevCenter/AppsDataProvider/AppsDataProvider.js";import"@material-ui/icons/Help";import"../../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../ErrorBoundary/ErrorBoundary.js";import"../../Typography.js";import"../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../DevCenter/DevCenterAppContainer/components/DisabledSettingsMessage/DisabledSettingsMessage.js";import"slate";import"../../SlateFormattedText/RenderElements.js";import"../../SlateFormattedText/SlateFormattedText.js";import"../../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../../DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../../DevCenter/DevCenterAppContainer/components/HelpCenterDialog/HelpCenterDialog.js";import"../../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../../DevCenter/NavigationBar/NavigationBar.js";import"../../DevCenter/SideBar/SideBar.js";import"../../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../../DevCenter/IsolatedDevCenterAppContainer/AppsGridDragHandle.js";import"../../TruncatedText/index.js";import"../../AssetEditor/SingleAssetEditor.js";import"../../AssetEditor/AssetEditorAutocomplete.js";import"../../AssetEditor/index.js";import"../../AppVersionsSelect/AppVersionsSelect.js";import"../../CollapsableSidebar.js";import"../../DateTimePicker/index.js";import"../../DatePicker/index.js";import"../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../ColorPicker/ColorPicker.js";import"../../ParameterCharts/AddEditTrack.js";import"../../ParameterCharts/ParameterCharts.js";import"../../ChartActionsList/ChartActionsList.js";import"../../SettingEditors/ColorEditor/index.js";import"../../SettingEditors/DropdownEditor/index.js";import"../../SettingEditors/RadioEditor/index.js";import"../../SwitchControl/index.js";import"../../RangeSlider/RangeSlider.js";import"../../Login/components/Login.js";import"../../Login/components/PasswordField.js";import"../../Login/components/Chip.js";import"../../Login/components/StepFooter.js";import"../../Login/components/StepContent.js";import"../../Login/components/StepHeader.js";import"../../Login/components/Step.js";import"../../Login/components/OrDivider.js";import"../../Login/components/HiddenEmailField.js";import"../../Login/components/EmailField.js";import"../../Breadcrumbs/index.js";import"../../VirtualizedTable/index.js";import"../../EmptyView/EmptyView.js";import"../../Button/index.js";import"../../MenuItem/index.js";import"../../ContextMenuItem/index.js";import"../../FolderMenuItem/index.js";import"../../EditableItem/EditableItem/index.js";import"../../EditableItem/EditableItemWithBadge/index.js";import"../../Checkbox/index.js";import"../../FolderMenuItemWithLinks/index.js";import"../../TextField/index.js";import"../../Chip/index.js";import"../../Counter/index.js";import"../../AnchorsList/AnchorsList.js";import"../../Select/index.js";import"../../Tabs/Tabs.js";import"../../Tabs/Tab.js";import"../../ResizableTable/ResizableTable.js";import"../../Drillstring/BHASchematic.js";import"../../Drillstring/BHAComponentIcon.js";import"../../Drillstring/BHATable/index.js";import"../../Drillstring/BHAComponentDetail/index.js";import"../../Casing/CasingComponentIcon.js";import"../../Casing/CasingTable/index.js";import"../../WellSummary/WellSummaryItemLabel.js";import"../../WellSummary/WellSummaryItemTitle.js";import"../../WellSummary/WellSummaryItemValue.js";import"../../WellSummary/ActivitySummaryChart.js";import"../../WellSummary/FracWirelineTimeChart.js";import"../../BICOffsetPickerDialog/index.js";import"../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../Notifications/Notifications.js";import"../../TextLink/index.js";import"../../Template/TemplatePopover/index.js";import"../../PinnableFilters/PinnableFilters.js";import"../../HeaderLayout/HeaderLayout.js";import"../../PadOffsetsPicker/PadOffsetsPicker.js";import"../../PadOffsetsPicker/OffsetAssetChip.js";import"../../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../../PadOffsetsPicker/StagesSelector.js";import"../../Table/TableToolbar/TableToolbar.js";import"../../PriceInput/PriceInput.js";import"../../LabelsCounter/LabelsCounter.js";import"../../Stepper/Step.js";import"../../Stepper/StepsWrapper.js";import"../../Stepper/Stepper.js";import"../../Comment/CommentIcon/index.js";import"../../FilesLoader/FilesLoader.js";import"../../SearchInput/index.js";import"../../StageDesignVActual/ComparisonHeader.js";import"../../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../../StageDesignVActual/ComparisonRow.js";import"../../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../../FeedItem/FeedItem.js";import"../../KeyboardDateTimePicker.js";import a from"../../PostInput/PostInput.js";import"../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../Popover.js";import"../Popup.js";var l=i({postInput:{paddingBottom:8},filePreviewWrapper:function(e){return{width:"100%",marginLeft:0,maxHeight:e.smallerView?127:251}}});function d(i){var n=i.userCompanyId,s=i.startAdornment,p=i.endAdornment,m=i.customContent,d=i.setComment,j=i.smallerView,C=l({smallerView:j}),c=e(d,1500);return t(r,{children:[s,m||o(a,{userCompanyId:n,onChange:c,filePreviewWrapperClass:C.filePreviewWrapper,className:C.postInput,smallerView:j}),p]})}d.propTypes={startAdornment:n,endAdornment:n,customContent:n,userCompanyId:s.isRequired,setComment:p,smallerView:m},d.defaultProps={startAdornment:null,endAdornment:null,customContent:null,setComment:function(){},smallerView:!1};export default d;
1
+ import"@babel/runtime/helpers/defineProperty";import{debounce as e}from"lodash";import"@babel/runtime/helpers/toConsumableArray";import"../../../constants/completion.js";import"../../../constants/alerts.js";import"@babel/runtime/helpers/slicedToArray";import"../../../constants/goals.js";import"../../../constants/segment.js";import"../../../constants/apps.js";import"../../../constants/drillstring.js";import"../../../constants/notifications.js";import"../../../constants/feed.js";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/asyncToGenerator";import"../../../utils/mobileDetect.js";import"@babel/runtime/helpers/typeof";import"../../../utils/index.js";import{jsxs as t,Fragment as r,jsx as o}from"react/jsx-runtime";import{makeStyles as i}from"@material-ui/core";import"react";import"querystring";import"uuid/v1";import"../../../clients/jsonApi/index.js";import"../../../clients/subscriptions.js";import"uuid";import"@babel/runtime/helpers/objectWithoutProperties";import{node as n,number as s,func as p,bool as m}from"prop-types";import"classnames";import"../../Modal/index.js";import"../../IconMenu/index.js";import"../../StyledMenuItem/index.js";import"../../LoadingIndicator/LoadingIndicator.js";import"../../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../DevCenter/DevCenterAppContainer/components/DcTooltipsCoordinatorProvider/DcTooltipsCoordinatorProvider.js";import"../../Tooltip/MuiTooltipDcWrapper.js";import"../../Avatar/index.js";import"../../Annotations/AnnotationsContext.js";import"../../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"react-router";import"../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"../../IconButton/index.js";import"../../ConfirmationDialog.js";import"../../Annotations/components/AnnotationsList/index.js";import"../../Annotations/components/LastAnnotation/index.js";import"../../PadModeSelect/PadModeSelect.js";import"../../DevCenter/AppHeader/AppHeaderNew.js";import"../../DevCenter/AppHeader/AppHeader.js";import"../../DevCenter/AppSideBar/AppSideBar.js";import"../../DevCenter/AppContext.js";import"../../DevCenter/AppsDataProvider/AppsDataProvider.js";import"@material-ui/icons/Help";import"../../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../ErrorBoundary/ErrorBoundary.js";import"../../Typography.js";import"../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../DevCenter/DevCenterAppContainer/components/DisabledSettingsMessage/DisabledSettingsMessage.js";import"slate";import"../../SlateFormattedText/RenderElements.js";import"../../SlateFormattedText/SlateFormattedText.js";import"../../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../../DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../../DevCenter/DevCenterAppContainer/components/HelpCenterDialog/HelpCenterDialog.js";import"../../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../../DevCenter/NavigationBar/NavigationBar.js";import"../../DevCenter/SideBar/SideBar.js";import"../../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../../DevCenter/IsolatedDevCenterAppContainer/AppsGridDragHandle.js";import"../../TruncatedText/index.js";import"../../AssetEditor/SingleAssetEditor.js";import"../../AssetEditor/AssetEditorAutocomplete.js";import"../../AssetEditor/index.js";import"../../AppVersionsSelect/AppVersionsSelect.js";import"../../CollapsableSidebar.js";import"../../DateTimePicker/index.js";import"../../DatePicker/index.js";import"../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../ColorPicker/ColorPicker.js";import"../../ParameterCharts/AddEditTrack.js";import"../../ParameterCharts/ParameterCharts.js";import"../../ChartActionsList/ChartActionsList.js";import"../../SettingEditors/ColorEditor/index.js";import"../../SettingEditors/DropdownEditor/index.js";import"../../SettingEditors/RadioEditor/index.js";import"../../SwitchControl/index.js";import"../../RangeSlider/RangeSlider.js";import"../../Login/components/Login.js";import"../../Login/components/PasswordField.js";import"../../Login/components/Chip.js";import"../../Login/components/StepFooter.js";import"../../Login/components/StepContent.js";import"../../Login/components/StepHeader.js";import"../../Login/components/Step.js";import"../../Login/components/OrDivider.js";import"../../Login/components/HiddenEmailField.js";import"../../Login/components/EmailField.js";import"../../Breadcrumbs/index.js";import"../../VirtualizedTable/index.js";import"../../EmptyView/EmptyView.js";import"../../Button/index.js";import"../../MenuItem/index.js";import"../../ContextMenuItem/index.js";import"../../FolderMenuItem/index.js";import"../../EditableItem/EditableItem/index.js";import"../../EditableItem/EditableItemWithBadge/index.js";import"../../Checkbox/index.js";import"../../FolderMenuItemWithLinks/index.js";import"../../TextField/index.js";import"../../Chip/index.js";import"../../Counter/index.js";import"../../AnchorsList/AnchorsList.js";import"../../Select/index.js";import"../../CustomSelect/index.js";import"../../Tabs/Tabs.js";import"../../Tabs/Tab.js";import"../../ResizableTable/ResizableTable.js";import"../../Drillstring/BHASchematic.js";import"../../Drillstring/BHAComponentIcon.js";import"../../Drillstring/BHATable/index.js";import"../../Drillstring/BHAComponentDetail/index.js";import"../../Casing/CasingComponentIcon.js";import"../../Casing/CasingTable/index.js";import"../../WellSummary/WellSummaryItemLabel.js";import"../../WellSummary/WellSummaryItemTitle.js";import"../../WellSummary/WellSummaryItemValue.js";import"../../WellSummary/ActivitySummaryChart.js";import"../../WellSummary/FracWirelineTimeChart.js";import"../../BICOffsetPickerDialog/index.js";import"../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../Notifications/Notifications.js";import"../../TextLink/index.js";import"../../Template/TemplatePopover/index.js";import"../../PinnableFilters/PinnableFilters.js";import"../../HeaderLayout/HeaderLayout.js";import"../../PadOffsetsPicker/PadOffsetsPicker.js";import"../../PadOffsetsPicker/OffsetAssetChip.js";import"../../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../../PadOffsetsPicker/StagesSelector.js";import"../../Table/TableToolbar/TableToolbar.js";import"../../PriceInput/PriceInput.js";import"../../LabelsCounter/LabelsCounter.js";import"../../Stepper/Step.js";import"../../Stepper/StepsWrapper.js";import"../../Stepper/Stepper.js";import"../../Comment/CommentIcon/index.js";import"../../FilesLoader/FilesLoader.js";import"../../SearchInput/index.js";import"../../StageDesignVActual/ComparisonHeader.js";import"../../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../../StageDesignVActual/ComparisonRow.js";import"../../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../../FeedItem/FeedItem.js";import"../../KeyboardDateTimePicker.js";import a from"../../PostInput/PostInput.js";import"../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../Popover.js";import"../Popup.js";import"../../EmbeddedApp/DevCenterEmbeddedApp.js";import"../../EmbeddedApp/EmbeddedApp.js";var l=i({postInput:{paddingBottom:8},filePreviewWrapper:function(e){return{width:"100%",marginLeft:0,maxHeight:e.smallerView?127:251}}});function d(i){var n=i.userCompanyId,s=i.startAdornment,p=i.endAdornment,m=i.customContent,d=i.setComment,j=i.smallerView,C=l({smallerView:j}),c=e(d,1500);return t(r,{children:[s,m||o(a,{userCompanyId:n,onChange:c,filePreviewWrapperClass:C.filePreviewWrapper,className:C.postInput,smallerView:j}),p]})}d.propTypes={startAdornment:n,endAdornment:n,customContent:n,userCompanyId:s.isRequired,setComment:p,smallerView:m},d.defaultProps={startAdornment:null,endAdornment:null,customContent:null,setComment:function(){},smallerView:!1};export default d;
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import{flowRight as t,get as r}from"lodash";import"@babel/runtime/helpers/toConsumableArray";import"../../../../../../constants/completion.js";import o from"moment";import"../../../../../../constants/alerts.js";import i from"@babel/runtime/helpers/slicedToArray";import"../../../../../../constants/goals.js";import"../../../../../../constants/segment.js";import"../../../../../../constants/apps.js";import"../../../../../../constants/drillstring.js";import"../../../../../../constants/notifications.js";import"../../../../../../constants/feed.js";import n from"@babel/runtime/regenerator";import s from"@babel/runtime/helpers/asyncToGenerator";import"../../../../../../utils/mobileDetect.js";import{showSuccessNotification as p,showErrorNotification as a}from"../../../../../../utils/notificationToasts.js";import"@babel/runtime/helpers/typeof";import"../../../../../../utils/index.js";import{jsxs as m,jsx as d}from"react/jsx-runtime";import{Fade as l,Paper as c,Typography as j}from"@material-ui/core";import{memo as C,useState as u,useRef as A}from"react";import"querystring";import"uuid/v1";import{postAnnotation as v}from"../../../../../../clients/jsonApi/index.js";import"../../../../../../clients/subscriptions.js";import D from"../../../../../../effects/useOutsideClick.js";import"uuid";import{number as g,shape as f,string as x}from"prop-types";import P from"classnames";import"../../../../../Modal/index.js";import"../../../../../IconMenu/index.js";import"../../../../../StyledMenuItem/index.js";import{withStyles as b}from"@material-ui/core/styles";import"../../../../../LoadingIndicator/LoadingIndicator.js";import"../../../../../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../../../../DevCenter/DevCenterAppContainer/components/DcTooltipsCoordinatorProvider/DcTooltipsCoordinatorProvider.js";import"../../../../../Tooltip/MuiTooltipDcWrapper.js";import S from"../../../../../Avatar/index.js";import{ADD_ANNOTATION as I}from"../../../../constants.js";import{useAnnotationsDispatch as y}from"../../../../AnnotationsContext.js";import"../../../../../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../../../../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import{withUniversalLocationHOC as h}from"../../../../../DevCenter/DevCenterRouterContext/hocs/withUniversalLocationHOC.js";import"../../../../../IconButton/index.js";import T from"../AnnotationInput/index.js";import E from"./style.css.js";import"../../../../../ConfirmationDialog.js";import"../../index.js";import"../../../LastAnnotation/index.js";import"../../../../../PadModeSelect/PadModeSelect.js";import"../../../../../DevCenter/AppHeader/AppHeaderNew.js";import"../../../../../DevCenter/AppHeader/AppHeader.js";import"../../../../../DevCenter/AppSideBar/AppSideBar.js";import"../../../../../DevCenter/AppContext.js";import"../../../../../DevCenter/AppsDataProvider/AppsDataProvider.js";import"@material-ui/icons/Help";import"../../../../../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../../../../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../../../../ErrorBoundary/ErrorBoundary.js";import"../../../../../Typography.js";import"../../../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../../../../DevCenter/DevCenterAppContainer/components/DisabledSettingsMessage/DisabledSettingsMessage.js";import"slate";import"../../../../../SlateFormattedText/RenderElements.js";import"../../../../../SlateFormattedText/SlateFormattedText.js";import"../../../../../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../../../../../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../../../../../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../../../../../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../../../../../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../../../../../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../../../../../DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../../../../../DevCenter/DevCenterAppContainer/components/HelpCenterDialog/HelpCenterDialog.js";import"../../../../../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../../../../../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../../../../../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../../../../../DevCenter/NavigationBar/NavigationBar.js";import"../../../../../DevCenter/SideBar/SideBar.js";import"../../../../../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../../../../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../../../../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../../../../../DevCenter/IsolatedDevCenterAppContainer/AppsGridDragHandle.js";import"../../../../../TruncatedText/index.js";import"../../../../../AssetEditor/SingleAssetEditor.js";import"../../../../../AssetEditor/AssetEditorAutocomplete.js";import"../../../../../AssetEditor/index.js";import"../../../../../AppVersionsSelect/AppVersionsSelect.js";import"../../../../../CollapsableSidebar.js";import"../../../../../DateTimePicker/index.js";import"../../../../../DatePicker/index.js";import"../../../../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../../../../ColorPicker/ColorPicker.js";import"../../../../../ParameterCharts/AddEditTrack.js";import"../../../../../ParameterCharts/ParameterCharts.js";import"../../../../../ChartActionsList/ChartActionsList.js";import"../../../../../SettingEditors/ColorEditor/index.js";import"../../../../../SettingEditors/DropdownEditor/index.js";import"../../../../../SettingEditors/RadioEditor/index.js";import"../../../../../SwitchControl/index.js";import"../../../../../RangeSlider/RangeSlider.js";import"../../../../../Login/components/Login.js";import"../../../../../Login/components/PasswordField.js";import"../../../../../Login/components/Chip.js";import"../../../../../Login/components/StepFooter.js";import"../../../../../Login/components/StepContent.js";import"../../../../../Login/components/StepHeader.js";import"../../../../../Login/components/Step.js";import"../../../../../Login/components/OrDivider.js";import"../../../../../Login/components/HiddenEmailField.js";import"../../../../../Login/components/EmailField.js";import"../../../../../Breadcrumbs/index.js";import"../../../../../VirtualizedTable/index.js";import"../../../../../EmptyView/EmptyView.js";import"../../../../../Button/index.js";import"../../../../../MenuItem/index.js";import"../../../../../ContextMenuItem/index.js";import"../../../../../FolderMenuItem/index.js";import"../../../../../EditableItem/EditableItem/index.js";import"../../../../../EditableItem/EditableItemWithBadge/index.js";import"../../../../../Checkbox/index.js";import"../../../../../FolderMenuItemWithLinks/index.js";import"../../../../../TextField/index.js";import"../../../../../Chip/index.js";import"../../../../../Counter/index.js";import"../../../../../AnchorsList/AnchorsList.js";import"../../../../../Select/index.js";import"../../../../../Tabs/Tabs.js";import"../../../../../Tabs/Tab.js";import"../../../../../ResizableTable/ResizableTable.js";import"../../../../../Drillstring/BHASchematic.js";import"../../../../../Drillstring/BHAComponentIcon.js";import"../../../../../Drillstring/BHATable/index.js";import"../../../../../Drillstring/BHAComponentDetail/index.js";import"../../../../../Casing/CasingComponentIcon.js";import"../../../../../Casing/CasingTable/index.js";import"../../../../../WellSummary/WellSummaryItemLabel.js";import"../../../../../WellSummary/WellSummaryItemTitle.js";import"../../../../../WellSummary/WellSummaryItemValue.js";import"../../../../../WellSummary/ActivitySummaryChart.js";import"../../../../../WellSummary/FracWirelineTimeChart.js";import"../../../../../BICOffsetPickerDialog/index.js";import"../../../../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../../../../Notifications/Notifications.js";import"../../../../../TextLink/index.js";import"../../../../../Template/TemplatePopover/index.js";import"../../../../../PinnableFilters/PinnableFilters.js";import"../../../../../HeaderLayout/HeaderLayout.js";import"../../../../../PadOffsetsPicker/PadOffsetsPicker.js";import"../../../../../PadOffsetsPicker/OffsetAssetChip.js";import"../../../../../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../../../../../PadOffsetsPicker/StagesSelector.js";import"../../../../../Table/TableToolbar/TableToolbar.js";import"../../../../../PriceInput/PriceInput.js";import"../../../../../LabelsCounter/LabelsCounter.js";import"../../../../../Stepper/Step.js";import"../../../../../Stepper/StepsWrapper.js";import"../../../../../Stepper/Stepper.js";import"../../../../../Comment/CommentIcon/index.js";import"../../../../../FilesLoader/FilesLoader.js";import"../../../../../SearchInput/index.js";import"../../../../../StageDesignVActual/ComparisonHeader.js";import"../../../../../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../../../../../StageDesignVActual/ComparisonRow.js";import"../../../../../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../../../../../FeedItem/FeedItem.js";import"../../../../../KeyboardDateTimePicker.js";import"../../../../../PostInput/PostInput.js";import"../../../../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../../../../../AddComment/Popover.js";import"../../../../../AddComment/Popup.js";var L=function(t){var C,g=t.appId,f=t.assetId,x=t.assetCompanyId,b=t.appSettings,h=t.currentUser,L=t.classes,k=t.location,F=t.dashboardType,B=y(),w=u(!1),V=i(w,2),H=V[0],M=V[1],R=A(null);D(R,(function(){M(!1)}));var W,N=(W=s(n.mark((function e(t,i,s){var m,d,l,c;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,m={app_id:g,asset_id:f,body:t,active_until:i,attachment:{file_name:s&&s.attachmentName,s3_link:s&&s.attachmentUrl},settings:b},d={},F&&(d.dashboard_type=F),(l=r(k,"query.time"))&&(m.data_timestamp=o(l).format()),e.next=8,v(m,d);case 8:c=e.sent,B({type:I,annotation:c}),e.next=17;break;case 12:return e.prev=12,e.t0=e.catch(0),a("Error during annotation creation"),console.error(e.t0),e.abrupt("return");case 17:p("Annotation has been added"),M(!1);case 19:case"end":return e.stop()}}),e,null,[[0,12]])}))),function(e,t,r){return W.apply(this,arguments)});return m("div",{className:E.cAddAnnotationFormInput,children:[d(S,{displayName:"".concat(h.first_name," ").concat(h.last_name),imgSrc:h.profile_photo,size:36}),m("div",{className:P(E.cAddAnnotationFormInputPaper,(C={},e(C,E.cAddAnnotationFormInputPaperOpened,H),e(C,E.cAddAnnotationFormInputPaperClosed,!H),C)),children:[d(l,{in:!H,timeout:500,children:d(c,{className:E.cAddAnnotationFormInputPaperLabel,children:d(j,{variant:"body2","data-testid":"".concat("AppAnnotationsPo","_collapsedInput"),className:L.inputLabel,onClick:function(){return M(!0)},children:"Type annotation here"})})}),d(l,{in:H,timeout:100,children:d("div",{className:E.cAddAnnotationFormInputPaperAddAnnotation,children:H&&d(T,{onSend:N,assetCompanyId:x,currentUser:h})})})]})]})};L.propTypes={appId:g.isRequired,assetId:g.isRequired,assetCompanyId:g.isRequired,appSettings:f().isRequired,currentUser:f({}),classes:f().isRequired,location:f().isRequired,dashboardType:x},L.defaultProps={currentUser:{},dashboardType:null};var k=t([b((function(e){return{inputLabel:{color:e.palette.grey[700],fontWeight:200,width:"100%"}}})),h])(C(L));export default k;
1
+ import e from"@babel/runtime/helpers/defineProperty";import{flowRight as t,get as r}from"lodash";import"@babel/runtime/helpers/toConsumableArray";import"../../../../../../constants/completion.js";import o from"moment";import"../../../../../../constants/alerts.js";import i from"@babel/runtime/helpers/slicedToArray";import"../../../../../../constants/goals.js";import"../../../../../../constants/segment.js";import"../../../../../../constants/apps.js";import"../../../../../../constants/drillstring.js";import"../../../../../../constants/notifications.js";import"../../../../../../constants/feed.js";import n from"@babel/runtime/regenerator";import s from"@babel/runtime/helpers/asyncToGenerator";import"../../../../../../utils/mobileDetect.js";import{showSuccessNotification as p,showErrorNotification as m}from"../../../../../../utils/notificationToasts.js";import"@babel/runtime/helpers/typeof";import"../../../../../../utils/index.js";import{jsxs as a,jsx as d}from"react/jsx-runtime";import{Fade as l,Paper as c,Typography as j}from"@material-ui/core";import{memo as C,useState as u,useRef as A}from"react";import"querystring";import"uuid/v1";import{postAnnotation as v}from"../../../../../../clients/jsonApi/index.js";import"../../../../../../clients/subscriptions.js";import D from"../../../../../../effects/useOutsideClick.js";import"uuid";import{number as g,shape as f,string as b}from"prop-types";import x from"classnames";import"../../../../../Modal/index.js";import"../../../../../IconMenu/index.js";import"../../../../../StyledMenuItem/index.js";import{withStyles as P}from"@material-ui/core/styles";import"../../../../../LoadingIndicator/LoadingIndicator.js";import"../../../../../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../../../../DevCenter/DevCenterAppContainer/components/DcTooltipsCoordinatorProvider/DcTooltipsCoordinatorProvider.js";import"../../../../../Tooltip/MuiTooltipDcWrapper.js";import S from"../../../../../Avatar/index.js";import{ADD_ANNOTATION as I}from"../../../../constants.js";import{useAnnotationsDispatch as y}from"../../../../AnnotationsContext.js";import"../../../../../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../../../../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import{withUniversalLocationHOC as h}from"../../../../../DevCenter/DevCenterRouterContext/hocs/withUniversalLocationHOC.js";import"../../../../../IconButton/index.js";import E from"../AnnotationInput/index.js";import T from"./style.css.js";import"../../../../../ConfirmationDialog.js";import"../../index.js";import"../../../LastAnnotation/index.js";import"../../../../../PadModeSelect/PadModeSelect.js";import"../../../../../DevCenter/AppHeader/AppHeaderNew.js";import"../../../../../DevCenter/AppHeader/AppHeader.js";import"../../../../../DevCenter/AppSideBar/AppSideBar.js";import"../../../../../DevCenter/AppContext.js";import"../../../../../DevCenter/AppsDataProvider/AppsDataProvider.js";import"@material-ui/icons/Help";import"../../../../../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../../../../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../../../../ErrorBoundary/ErrorBoundary.js";import"../../../../../Typography.js";import"../../../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../../../../DevCenter/DevCenterAppContainer/components/DisabledSettingsMessage/DisabledSettingsMessage.js";import"slate";import"../../../../../SlateFormattedText/RenderElements.js";import"../../../../../SlateFormattedText/SlateFormattedText.js";import"../../../../../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../../../../../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../../../../../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../../../../../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../../../../../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../../../../../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../../../../../DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../../../../../DevCenter/DevCenterAppContainer/components/HelpCenterDialog/HelpCenterDialog.js";import"../../../../../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../../../../../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../../../../../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../../../../../DevCenter/NavigationBar/NavigationBar.js";import"../../../../../DevCenter/SideBar/SideBar.js";import"../../../../../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../../../../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../../../../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../../../../../DevCenter/IsolatedDevCenterAppContainer/AppsGridDragHandle.js";import"../../../../../TruncatedText/index.js";import"../../../../../AssetEditor/SingleAssetEditor.js";import"../../../../../AssetEditor/AssetEditorAutocomplete.js";import"../../../../../AssetEditor/index.js";import"../../../../../AppVersionsSelect/AppVersionsSelect.js";import"../../../../../CollapsableSidebar.js";import"../../../../../DateTimePicker/index.js";import"../../../../../DatePicker/index.js";import"../../../../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../../../../ColorPicker/ColorPicker.js";import"../../../../../ParameterCharts/AddEditTrack.js";import"../../../../../ParameterCharts/ParameterCharts.js";import"../../../../../ChartActionsList/ChartActionsList.js";import"../../../../../SettingEditors/ColorEditor/index.js";import"../../../../../SettingEditors/DropdownEditor/index.js";import"../../../../../SettingEditors/RadioEditor/index.js";import"../../../../../SwitchControl/index.js";import"../../../../../RangeSlider/RangeSlider.js";import"../../../../../Login/components/Login.js";import"../../../../../Login/components/PasswordField.js";import"../../../../../Login/components/Chip.js";import"../../../../../Login/components/StepFooter.js";import"../../../../../Login/components/StepContent.js";import"../../../../../Login/components/StepHeader.js";import"../../../../../Login/components/Step.js";import"../../../../../Login/components/OrDivider.js";import"../../../../../Login/components/HiddenEmailField.js";import"../../../../../Login/components/EmailField.js";import"../../../../../Breadcrumbs/index.js";import"../../../../../VirtualizedTable/index.js";import"../../../../../EmptyView/EmptyView.js";import"../../../../../Button/index.js";import"../../../../../MenuItem/index.js";import"../../../../../ContextMenuItem/index.js";import"../../../../../FolderMenuItem/index.js";import"../../../../../EditableItem/EditableItem/index.js";import"../../../../../EditableItem/EditableItemWithBadge/index.js";import"../../../../../Checkbox/index.js";import"../../../../../FolderMenuItemWithLinks/index.js";import"../../../../../TextField/index.js";import"../../../../../Chip/index.js";import"../../../../../Counter/index.js";import"../../../../../AnchorsList/AnchorsList.js";import"../../../../../Select/index.js";import"../../../../../CustomSelect/index.js";import"../../../../../Tabs/Tabs.js";import"../../../../../Tabs/Tab.js";import"../../../../../ResizableTable/ResizableTable.js";import"../../../../../Drillstring/BHASchematic.js";import"../../../../../Drillstring/BHAComponentIcon.js";import"../../../../../Drillstring/BHATable/index.js";import"../../../../../Drillstring/BHAComponentDetail/index.js";import"../../../../../Casing/CasingComponentIcon.js";import"../../../../../Casing/CasingTable/index.js";import"../../../../../WellSummary/WellSummaryItemLabel.js";import"../../../../../WellSummary/WellSummaryItemTitle.js";import"../../../../../WellSummary/WellSummaryItemValue.js";import"../../../../../WellSummary/ActivitySummaryChart.js";import"../../../../../WellSummary/FracWirelineTimeChart.js";import"../../../../../BICOffsetPickerDialog/index.js";import"../../../../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../../../../Notifications/Notifications.js";import"../../../../../TextLink/index.js";import"../../../../../Template/TemplatePopover/index.js";import"../../../../../PinnableFilters/PinnableFilters.js";import"../../../../../HeaderLayout/HeaderLayout.js";import"../../../../../PadOffsetsPicker/PadOffsetsPicker.js";import"../../../../../PadOffsetsPicker/OffsetAssetChip.js";import"../../../../../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../../../../../PadOffsetsPicker/StagesSelector.js";import"../../../../../Table/TableToolbar/TableToolbar.js";import"../../../../../PriceInput/PriceInput.js";import"../../../../../LabelsCounter/LabelsCounter.js";import"../../../../../Stepper/Step.js";import"../../../../../Stepper/StepsWrapper.js";import"../../../../../Stepper/Stepper.js";import"../../../../../Comment/CommentIcon/index.js";import"../../../../../FilesLoader/FilesLoader.js";import"../../../../../SearchInput/index.js";import"../../../../../StageDesignVActual/ComparisonHeader.js";import"../../../../../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../../../../../StageDesignVActual/ComparisonRow.js";import"../../../../../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../../../../../FeedItem/FeedItem.js";import"../../../../../KeyboardDateTimePicker.js";import"../../../../../PostInput/PostInput.js";import"../../../../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../../../../../AddComment/Popover.js";import"../../../../../AddComment/Popup.js";import"../../../../../EmbeddedApp/DevCenterEmbeddedApp.js";import"../../../../../EmbeddedApp/EmbeddedApp.js";var L=function(t){var C,g=t.appId,f=t.assetId,b=t.assetCompanyId,P=t.appSettings,h=t.currentUser,L=t.classes,k=t.location,F=t.dashboardType,B=y(),w=u(!1),V=i(w,2),H=V[0],M=V[1],R=A(null);D(R,(function(){M(!1)}));var W,N=(W=s(n.mark((function e(t,i,s){var a,d,l,c;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,a={app_id:g,asset_id:f,body:t,active_until:i,attachment:{file_name:s&&s.attachmentName,s3_link:s&&s.attachmentUrl},settings:P},d={},F&&(d.dashboard_type=F),(l=r(k,"query.time"))&&(a.data_timestamp=o(l).format()),e.next=8,v(a,d);case 8:c=e.sent,B({type:I,annotation:c}),e.next=17;break;case 12:return e.prev=12,e.t0=e.catch(0),m("Error during annotation creation"),console.error(e.t0),e.abrupt("return");case 17:p("Annotation has been added"),M(!1);case 19:case"end":return e.stop()}}),e,null,[[0,12]])}))),function(e,t,r){return W.apply(this,arguments)});return a("div",{className:T.cAddAnnotationFormInput,children:[d(S,{displayName:"".concat(h.first_name," ").concat(h.last_name),imgSrc:h.profile_photo,size:36}),a("div",{className:x(T.cAddAnnotationFormInputPaper,(C={},e(C,T.cAddAnnotationFormInputPaperOpened,H),e(C,T.cAddAnnotationFormInputPaperClosed,!H),C)),children:[d(l,{in:!H,timeout:500,children:d(c,{className:T.cAddAnnotationFormInputPaperLabel,children:d(j,{variant:"body2","data-testid":"".concat("AppAnnotationsPo","_collapsedInput"),className:L.inputLabel,onClick:function(){return M(!0)},children:"Type annotation here"})})}),d(l,{in:H,timeout:100,children:d("div",{className:T.cAddAnnotationFormInputPaperAddAnnotation,children:H&&d(E,{onSend:N,assetCompanyId:b,currentUser:h})})})]})]})};L.propTypes={appId:g.isRequired,assetId:g.isRequired,assetCompanyId:g.isRequired,appSettings:f().isRequired,currentUser:f({}),classes:f().isRequired,location:f().isRequired,dashboardType:b},L.defaultProps={currentUser:{},dashboardType:null};var k=t([P((function(e){return{inputLabel:{color:e.palette.grey[700],fontWeight:200,width:"100%"}}})),h])(C(L));export default k;
@@ -1 +1 @@
1
- import"@babel/runtime/helpers/defineProperty";import{maxBy as e}from"lodash";import"@babel/runtime/helpers/toConsumableArray";import"../../constants/completion.js";import"../../constants/alerts.js";import t from"@babel/runtime/helpers/slicedToArray";import"../../constants/goals.js";import"../../constants/segment.js";import"../../constants/apps.js";import"../../constants/drillstring.js";import{PACKAGE_STATUSES as r}from"../../constants/appPackages.js";import"../../constants/notifications.js";import"../../constants/feed.js";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/asyncToGenerator";import"../../utils/mobileDetect.js";import"@babel/runtime/helpers/typeof";import"../../utils/index.js";import{jsx as o,jsxs as i}from"react/jsx-runtime";import{makeStyles as n,Grid as s,FormControl as p,InputLabel as a,Select as m,ListSubheader as l,MenuItem as d}from"@material-ui/core";import{useState as c,useMemo as j,useEffect as u}from"react";import"querystring";import"uuid/v1";import"../../clients/jsonApi/index.js";import"../../clients/subscriptions.js";import"uuid";import"@babel/runtime/helpers/objectWithoutProperties";import{string as C,func as v,shape as A}from"prop-types";import"classnames";import"../Modal/index.js";import"../IconMenu/index.js";import"../StyledMenuItem/index.js";import"../LoadingIndicator/LoadingIndicator.js";import"../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../DevCenter/DevCenterAppContainer/components/DcTooltipsCoordinatorProvider/DcTooltipsCoordinatorProvider.js";import"../Tooltip/MuiTooltipDcWrapper.js";import"../Avatar/index.js";import"../Annotations/AnnotationsContext.js";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"react-router";import"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import{isUserDeveloperAdmin as D}from"../../utils/user.js";import"../IconButton/index.js";import"../ConfirmationDialog.js";import"../Annotations/components/AnnotationsList/index.js";import"../Annotations/components/LastAnnotation/index.js";import"../PadModeSelect/PadModeSelect.js";import"../DevCenter/AppHeader/AppHeaderNew.js";import"../DevCenter/AppHeader/AppHeader.js";import"../DevCenter/AppSideBar/AppSideBar.js";import"../DevCenter/AppContext.js";import"../DevCenter/AppsDataProvider/AppsDataProvider.js";import"@material-ui/icons/Help";import"../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../EmptyView/EmptyAppView/EmptyAppView.js";import"../ErrorBoundary/ErrorBoundary.js";import"../Typography.js";import"../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../DevCenter/DevCenterAppContainer/components/DisabledSettingsMessage/DisabledSettingsMessage.js";import"slate";import"../SlateFormattedText/RenderElements.js";import"../SlateFormattedText/SlateFormattedText.js";import"../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../DevCenter/DevCenterAppContainer/components/HelpCenterDialog/HelpCenterDialog.js";import"../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../DevCenter/NavigationBar/NavigationBar.js";import"../DevCenter/SideBar/SideBar.js";import"../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../DevCenter/IsolatedDevCenterAppContainer/AppsGridDragHandle.js";import b from"../TruncatedText/index.js";import"../AssetEditor/SingleAssetEditor.js";import"../AssetEditor/AssetEditorAutocomplete.js";import"../AssetEditor/index.js";import g from"./effects/index.js";import"../CollapsableSidebar.js";import"../DateTimePicker/index.js";import"../DatePicker/index.js";import"../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../ColorPicker/ColorPicker.js";import"../ParameterCharts/AddEditTrack.js";import"../ParameterCharts/ParameterCharts.js";import"../ChartActionsList/ChartActionsList.js";import"../SettingEditors/ColorEditor/index.js";import"../SettingEditors/DropdownEditor/index.js";import"../SettingEditors/RadioEditor/index.js";import"../SwitchControl/index.js";import"../RangeSlider/RangeSlider.js";import"../Login/components/Login.js";import"../Login/components/PasswordField.js";import"../Login/components/Chip.js";import"../Login/components/StepFooter.js";import"../Login/components/StepContent.js";import"../Login/components/StepHeader.js";import"../Login/components/Step.js";import"../Login/components/OrDivider.js";import"../Login/components/HiddenEmailField.js";import"../Login/components/EmailField.js";import"../Breadcrumbs/index.js";import"../VirtualizedTable/index.js";import"../EmptyView/EmptyView.js";import"../Button/index.js";import"../MenuItem/index.js";import"../ContextMenuItem/index.js";import"../FolderMenuItem/index.js";import"../EditableItem/EditableItem/index.js";import"../EditableItem/EditableItemWithBadge/index.js";import"../Checkbox/index.js";import"../FolderMenuItemWithLinks/index.js";import"../TextField/index.js";import"../Chip/index.js";import"../Counter/index.js";import"../AnchorsList/AnchorsList.js";import"../Select/index.js";import"../Tabs/Tabs.js";import"../Tabs/Tab.js";import"../ResizableTable/ResizableTable.js";import"../Drillstring/BHASchematic.js";import"../Drillstring/BHAComponentIcon.js";import"../Drillstring/BHATable/index.js";import"../Drillstring/BHAComponentDetail/index.js";import"../Casing/CasingComponentIcon.js";import"../Casing/CasingTable/index.js";import"../WellSummary/WellSummaryItemLabel.js";import"../WellSummary/WellSummaryItemTitle.js";import"../WellSummary/WellSummaryItemValue.js";import"../WellSummary/ActivitySummaryChart.js";import"../WellSummary/FracWirelineTimeChart.js";import"../BICOffsetPickerDialog/index.js";import"../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../Notifications/Notifications.js";import"../TextLink/index.js";import"../Template/TemplatePopover/index.js";import"../PinnableFilters/PinnableFilters.js";import"../HeaderLayout/HeaderLayout.js";import"../PadOffsetsPicker/PadOffsetsPicker.js";import"../PadOffsetsPicker/OffsetAssetChip.js";import"../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../PadOffsetsPicker/StagesSelector.js";import"../Table/TableToolbar/TableToolbar.js";import"../PriceInput/PriceInput.js";import"../LabelsCounter/LabelsCounter.js";import"../Stepper/Step.js";import"../Stepper/StepsWrapper.js";import"../Stepper/Stepper.js";import"../Comment/CommentIcon/index.js";import"../FilesLoader/FilesLoader.js";import"../SearchInput/index.js";import"../StageDesignVActual/ComparisonHeader.js";import"../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../StageDesignVActual/ComparisonRow.js";import"../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../FeedItem/FeedItem.js";import"../KeyboardDateTimePicker.js";import"../PostInput/PostInput.js";import"../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../AddComment/Popover.js";import"../AddComment/Popup.js";var S=r,P=n({select:{width:250,margin:"8px 0"},menuListRoot:{maxWidth:580},group:{fontStyle:"italic",fontWeight:"bold",fontSize:"12px",color:"#999"}}),f=function(r){var n=r.value,C=r.onChange,v=r.appId,A=r.currentUser,f=P(),x=g(v,{status:[S.DRAFT,S.PUBLISHED]}),h=x.isLoading,I=x.packages,y=D(A),E=c(n),T=t(E,2),L=T[0],B=T[1],k=j((function(){var e={},t=[{label:"Stable Release - no stable version",value:"PROD",disabled:!0},{label:"Beta - no beta version",value:"BETA",disabled:!0}],r=[];return I.filter((function(e){return e.attributes.status!==S.FAILURE})).forEach((function(o){var i=o.attributes,n=i.version,s=i.package_code_version,p=i.notes,a=i.label,m=i.status,l="v".concat(s||n);if(a){var d="PROD"===a?t[0]:t[1];d.label="".concat("PROD"===a?"Stable Release":"Beta"," ").concat(l," ").concat(p?"- ".concat(p):""),d.disabled=!1,e[d.value]=o}else y&&(e[n]=o,r.push({label:"".concat(l," ").concat(p?"- ".concat(p):""),value:n,status:m}))})),{labeled:t,unlabeled:r,packageByValue:e}}),[I,y]),V=k.labeled,F=k.unlabeled,R=k.packageByValue,w=function(e){return C(e,R[e])};return u((function(){if(y&&!n){var t=V.find((function(e){return!e.disabled}))||e(F.filter((function(e){return"published"===e.status})),"value");B(null==t?void 0:t.value),w(null==t?void 0:t.value)}}),[V,F]),o(s,{children:i(p,{className:f.select,children:[o(a,{shrink:!(!n&&!L),htmlFor:"appVersion",children:"App Version"}),i(m,{"data-testid":"".concat("DC_versionSelect","_dropdown"),value:n||L,onChange:function(e){return w(e.target.value)},disabled:h,label:"App Version",inputProps:{name:"appVersion",id:"appVersion"},MenuProps:{MenuListProps:{classes:{root:f.menuListRoot}}},children:[y&&o(l,{className:f.group,children:"Labelled Versions (When selected always shows current Beta or Stable Release Versions)"}),V.map((function(e){var t=e.label,r=e.value,i=e.disabled;return o(d,{"data-testid":"".concat("DC_versionSelect","_option_").concat(t,"MenuItem"),value:r,disabled:i,children:t})})),y&&o(l,{className:f.group,children:"Other versions (App will always show selected version until version is deleted)"}),F.map((function(e){var t=e.label,r=e.value;return o(d,{"data-testid":"".concat("DC_versionSelect","_option_").concat(t,"MenuItem"),value:r,children:o(b,{children:t})})}))]})]})})};f.propTypes={value:C,onChange:v.isRequired,appId:C.isRequired,currentUser:A({}).isRequired},f.defaultProps={value:null};export default f;
1
+ import"@babel/runtime/helpers/defineProperty";import{maxBy as e}from"lodash";import"@babel/runtime/helpers/toConsumableArray";import"../../constants/completion.js";import"../../constants/alerts.js";import t from"@babel/runtime/helpers/slicedToArray";import"../../constants/goals.js";import"../../constants/segment.js";import"../../constants/apps.js";import"../../constants/drillstring.js";import{PACKAGE_STATUSES as r}from"../../constants/appPackages.js";import"../../constants/notifications.js";import"../../constants/feed.js";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/asyncToGenerator";import"../../utils/mobileDetect.js";import"@babel/runtime/helpers/typeof";import"../../utils/index.js";import{jsx as o,jsxs as i}from"react/jsx-runtime";import{makeStyles as n,Grid as s,FormControl as p,InputLabel as a,Select as m,ListSubheader as l,MenuItem as d}from"@material-ui/core";import{useState as c,useMemo as j,useEffect as u}from"react";import"querystring";import"uuid/v1";import"../../clients/jsonApi/index.js";import"../../clients/subscriptions.js";import"uuid";import"@babel/runtime/helpers/objectWithoutProperties";import{string as C,func as v,shape as A}from"prop-types";import"classnames";import"../Modal/index.js";import"../IconMenu/index.js";import"../StyledMenuItem/index.js";import"../LoadingIndicator/LoadingIndicator.js";import"../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../DevCenter/DevCenterAppContainer/components/DcTooltipsCoordinatorProvider/DcTooltipsCoordinatorProvider.js";import"../Tooltip/MuiTooltipDcWrapper.js";import"../Avatar/index.js";import"../Annotations/AnnotationsContext.js";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"react-router";import"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import{isUserDeveloperAdmin as D}from"../../utils/user.js";import"../IconButton/index.js";import"../ConfirmationDialog.js";import"../Annotations/components/AnnotationsList/index.js";import"../Annotations/components/LastAnnotation/index.js";import"../PadModeSelect/PadModeSelect.js";import"../DevCenter/AppHeader/AppHeaderNew.js";import"../DevCenter/AppHeader/AppHeader.js";import"../DevCenter/AppSideBar/AppSideBar.js";import"../DevCenter/AppContext.js";import"../DevCenter/AppsDataProvider/AppsDataProvider.js";import"@material-ui/icons/Help";import"../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../EmptyView/EmptyAppView/EmptyAppView.js";import"../ErrorBoundary/ErrorBoundary.js";import"../Typography.js";import"../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../DevCenter/DevCenterAppContainer/components/DisabledSettingsMessage/DisabledSettingsMessage.js";import"slate";import"../SlateFormattedText/RenderElements.js";import"../SlateFormattedText/SlateFormattedText.js";import"../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../DevCenter/DevCenterAppContainer/components/HelpCenterDialog/HelpCenterDialog.js";import"../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../DevCenter/NavigationBar/NavigationBar.js";import"../DevCenter/SideBar/SideBar.js";import"../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../DevCenter/IsolatedDevCenterAppContainer/AppsGridDragHandle.js";import b from"../TruncatedText/index.js";import"../AssetEditor/SingleAssetEditor.js";import"../AssetEditor/AssetEditorAutocomplete.js";import"../AssetEditor/index.js";import g from"./effects/index.js";import"../CollapsableSidebar.js";import"../DateTimePicker/index.js";import"../DatePicker/index.js";import"../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../ColorPicker/ColorPicker.js";import"../ParameterCharts/AddEditTrack.js";import"../ParameterCharts/ParameterCharts.js";import"../ChartActionsList/ChartActionsList.js";import"../SettingEditors/ColorEditor/index.js";import"../SettingEditors/DropdownEditor/index.js";import"../SettingEditors/RadioEditor/index.js";import"../SwitchControl/index.js";import"../RangeSlider/RangeSlider.js";import"../Login/components/Login.js";import"../Login/components/PasswordField.js";import"../Login/components/Chip.js";import"../Login/components/StepFooter.js";import"../Login/components/StepContent.js";import"../Login/components/StepHeader.js";import"../Login/components/Step.js";import"../Login/components/OrDivider.js";import"../Login/components/HiddenEmailField.js";import"../Login/components/EmailField.js";import"../Breadcrumbs/index.js";import"../VirtualizedTable/index.js";import"../EmptyView/EmptyView.js";import"../Button/index.js";import"../MenuItem/index.js";import"../ContextMenuItem/index.js";import"../FolderMenuItem/index.js";import"../EditableItem/EditableItem/index.js";import"../EditableItem/EditableItemWithBadge/index.js";import"../Checkbox/index.js";import"../FolderMenuItemWithLinks/index.js";import"../TextField/index.js";import"../Chip/index.js";import"../Counter/index.js";import"../AnchorsList/AnchorsList.js";import"../Select/index.js";import"../CustomSelect/index.js";import"../Tabs/Tabs.js";import"../Tabs/Tab.js";import"../ResizableTable/ResizableTable.js";import"../Drillstring/BHASchematic.js";import"../Drillstring/BHAComponentIcon.js";import"../Drillstring/BHATable/index.js";import"../Drillstring/BHAComponentDetail/index.js";import"../Casing/CasingComponentIcon.js";import"../Casing/CasingTable/index.js";import"../WellSummary/WellSummaryItemLabel.js";import"../WellSummary/WellSummaryItemTitle.js";import"../WellSummary/WellSummaryItemValue.js";import"../WellSummary/ActivitySummaryChart.js";import"../WellSummary/FracWirelineTimeChart.js";import"../BICOffsetPickerDialog/index.js";import"../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../Notifications/Notifications.js";import"../TextLink/index.js";import"../Template/TemplatePopover/index.js";import"../PinnableFilters/PinnableFilters.js";import"../HeaderLayout/HeaderLayout.js";import"../PadOffsetsPicker/PadOffsetsPicker.js";import"../PadOffsetsPicker/OffsetAssetChip.js";import"../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../PadOffsetsPicker/StagesSelector.js";import"../Table/TableToolbar/TableToolbar.js";import"../PriceInput/PriceInput.js";import"../LabelsCounter/LabelsCounter.js";import"../Stepper/Step.js";import"../Stepper/StepsWrapper.js";import"../Stepper/Stepper.js";import"../Comment/CommentIcon/index.js";import"../FilesLoader/FilesLoader.js";import"../SearchInput/index.js";import"../StageDesignVActual/ComparisonHeader.js";import"../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../StageDesignVActual/ComparisonRow.js";import"../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../FeedItem/FeedItem.js";import"../KeyboardDateTimePicker.js";import"../PostInput/PostInput.js";import"../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../AddComment/Popover.js";import"../AddComment/Popup.js";import"../EmbeddedApp/DevCenterEmbeddedApp.js";import"../EmbeddedApp/EmbeddedApp.js";var S=r,P=n({select:{width:250,margin:"8px 0"},menuListRoot:{maxWidth:580},group:{fontStyle:"italic",fontWeight:"bold",fontSize:"12px",color:"#999"}}),f=function(r){var n=r.value,C=r.onChange,v=r.appId,A=r.currentUser,f=P(),x=g(v,{status:[S.DRAFT,S.PUBLISHED]}),h=x.isLoading,I=x.packages,E=D(A),y=c(n),T=t(y,2),L=T[0],B=T[1],k=j((function(){var e={},t=[{label:"Stable Release - no stable version",value:"PROD",disabled:!0},{label:"Beta - no beta version",value:"BETA",disabled:!0}],r=[];return I.filter((function(e){return e.attributes.status!==S.FAILURE})).forEach((function(o){var i=o.attributes,n=i.version,s=i.package_code_version,p=i.notes,a=i.label,m=i.status,l="v".concat(s||n);if(a){var d="PROD"===a?t[0]:t[1];d.label="".concat("PROD"===a?"Stable Release":"Beta"," ").concat(l," ").concat(p?"- ".concat(p):""),d.disabled=!1,e[d.value]=o}else E&&(e[n]=o,r.push({label:"".concat(l," ").concat(p?"- ".concat(p):""),value:n,status:m}))})),{labeled:t,unlabeled:r,packageByValue:e}}),[I,E]),V=k.labeled,F=k.unlabeled,R=k.packageByValue,w=function(e){return C(e,R[e])};return u((function(){if(E&&!n){var t=V.find((function(e){return!e.disabled}))||e(F.filter((function(e){return"published"===e.status})),"value");B(null==t?void 0:t.value),w(null==t?void 0:t.value)}}),[V,F]),o(s,{children:i(p,{className:f.select,children:[o(a,{shrink:!(!n&&!L),htmlFor:"appVersion",children:"App Version"}),i(m,{"data-testid":"".concat("DC_versionSelect","_dropdown"),value:n||L,onChange:function(e){return w(e.target.value)},disabled:h,label:"App Version",inputProps:{name:"appVersion",id:"appVersion"},MenuProps:{MenuListProps:{classes:{root:f.menuListRoot}}},children:[E&&o(l,{className:f.group,children:"Labelled Versions (When selected always shows current Beta or Stable Release Versions)"}),V.map((function(e){var t=e.label,r=e.value,i=e.disabled;return o(d,{"data-testid":"".concat("DC_versionSelect","_option_").concat(t,"MenuItem"),value:r,disabled:i,children:t})})),E&&o(l,{className:f.group,children:"Other versions (App will always show selected version until version is deleted)"}),F.map((function(e){var t=e.label,r=e.value;return o(d,{"data-testid":"".concat("DC_versionSelect","_option_").concat(t,"MenuItem"),value:r,children:o(b,{children:t})})}))]})]})})};f.propTypes={value:C,onChange:v.isRequired,appId:C.isRequired,currentUser:A({}).isRequired},f.defaultProps={value:null};export default f;
@@ -0,0 +1 @@
1
+ import"@babel/runtime/helpers/defineProperty";import{formatAssetName as e}from"../../utils/formatting.js";import{jsx as r}from"react/jsx-runtime";import{memo as t}from"react";import"@babel/runtime/helpers/objectWithoutProperties";import i from"prop-types";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"react-router";import{UniversalLink as o}from"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import{withSize as s}from"react-sizeme";import m from"./styles.css.js";var a=function(t){var i=t.primaryAssetName,s=t.pageName,a=t.coordinatesPixelWidth,n=t.primaryAssetLink;return r(o,{"data-testid":"".concat(s,"_primaryAsset"),href:n||"/feed",children:r("div",{className:m.item,children:e(i,a)})})};a.propTypes={primaryAssetName:i.string.isRequired,pageName:i.string.isRequired,primaryAssetLink:i.any.isRequired,coordinatesPixelWidth:i.number},a.defaultProps={coordinatesPixelWidth:void 0};var n=t(s()(a));export default n;
@@ -0,0 +1 @@
1
+ import"@babel/runtime/helpers/defineProperty";import{formatAssetName as e}from"../../utils/formatting.js";import{jsx as r}from"react/jsx-runtime";import{Tooltip as t}from"@material-ui/core";import{memo as s}from"react";import"@babel/runtime/helpers/objectWithoutProperties";import i from"prop-types";import o from"classnames";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"react-router";import{UniversalLink as a}from"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import{withSize as n}from"react-sizeme";import m from"./styles.css.js";var c=function(s){var i=s.secondaryAssetName,n=s.coordinatesPixelWidth,c=s.secondaryAssetLink,d=s.pageName;return r(t,{title:i,children:r("div",{className:m.seccondaryAssetWrapper,children:r(a,{href:c,className:m.seccondaryAssetLink,children:r("div",{id:"assetLabel","data-testid":"".concat(d,"_secondaryAsset"),className:o(m.item,m.secondaryAsset),children:e(i,n)})})})})};c.propTypes={pageName:i.string.isRequired,secondaryAssetName:i.string,secondaryAssetLink:i.any.isRequired,coordinatesPixelWidth:i.number},c.defaultProps={secondaryAssetName:"",coordinatesPixelWidth:void 0};var d=s(n()(c));export default d;
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/toConsumableArray";import r from"lodash/get";import n from"@babel/runtime/regenerator";import a from"@babel/runtime/helpers/asyncToGenerator";import{getAssets as s,getRigs as i,getFracFleets as u,getDrilloutUnits as o}from"../../../../../../clients/jsonApi/index.js";import c from"jsona";import l from"lodash/concat";function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function f(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?p(Object(n),!0).forEach((function(r){e(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var b=new c;function m(){return d.apply(this,arguments)}function d(){return(d=a(n.mark((function e(){var t,a,i,u,o=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=o.length>0&&void 0!==o[0]?o[0]:"well",a=o.length>1?o[1]:void 0,i=null,e.prev=3,e.next=6,s({types:["well"],company_id:a?+a:void 0,fields:["asset.name","asset.parent_asset_id","asset.parent_asset_name","asset.stats","asset.target_formation","asset.string_design","asset.root_asset_name","asset.basin","asset.county","asset.area","asset.visibility","asset.top_hole","asset.settings","well.settings"],per_page:1e4,sort:"name"});case 6:i=e.sent,e.next=12;break;case 9:e.prev=9,e.t0=e.catch(3),console.error(e.t0);case 12:return u=i?i.data.map((function(e){return{id:Number(e.id),name:r(e,"attributes.name"),rigId:r(e,"attributes.parent_asset_id")||"Null",rigName:r(e,"attributes.parent_asset_name")||"Null",formation:r(e,"attributes.target_formation")||"Null",stringDesign:r(e,"attributes.string_design")||"Null",programName:r(e,"attributes.root_asset_name")||"Null",basin:r(e,"attributes.basin")||"Null",county:r(e,"attributes.county")||"Null",area:r(e,"attributes.area")||"Null",visibility:r(e,"attributes.visibility"),topHole:r(e,"attributes.top_hole"),rigReleaseDate:r(e,"attributes.stats.well_end"),totalDepth:r(e,"attributes.stats.total_depth"),is_usable:!0,apiNumber:r(e,"attributes.settings.api_number","-")}})).filter((function(e){return"visible"===e.visibility})):[],e.abrupt("return",u.map((function(e){return{redirectAssetId:e.id,apiNumber:e.api_number,name:e.name,asset_id:e.id,type:t}})));case 14:case"end":return e.stop()}}),e,null,[[3,9]])})))).apply(this,arguments)}function _(e,t){return g.apply(this,arguments)}function g(){return(g=a(n.mark((function e(t,a){var s,u,o;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s={per_page:1e3,page:t,fields:["rig.name","rig.active_well","rig.asset_id"],sort:"name",company:a},e.prev=2,e.next=5,i(s);case 5:u=e.sent,e.next=12;break;case 8:e.prev=8,e.t0=e.catch(2),console.error(e.t0),u=[];case 12:return o=b.deserialize(u),e.abrupt("return",o.map((function(e){return f({redirectAssetId:r(e,["active_well","asset_id"])||null},e)})));case 14:case"end":return e.stop()}}),e,null,[[2,8]])})))).apply(this,arguments)}function y(e,t){return h.apply(this,arguments)}function h(){return(h=a(n.mark((function e(t,a){var s,i,o;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s={per_page:1e3,page:t,fields:["frac_fleet.name","frac_fleet.current_pad_id","frac_fleet.pad_frac_fleets"],sort:"name",company:a},e.prev=2,e.next=5,u(s);case 5:i=e.sent,e.next=12;break;case 8:e.prev=8,e.t0=e.catch(2),console.error(e.t0),i=[];case 12:return o=b.deserialize(i),e.abrupt("return",o.map((function(e){return f({redirectAssetId:r(e,["current_pad_id"])||null},e)})));case 14:case"end":return e.stop()}}),e,null,[[2,8]])})))).apply(this,arguments)}function v(e,t){return w.apply(this,arguments)}function w(){return(w=a(n.mark((function e(t,a){var s,i,u;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s={per_page:1e3,page:t,fields:["drillout_unit.name","drillout_unit.well"],sort:"name",company:a},e.prev=2,e.next=5,o(s);case 5:i=e.sent,e.next=12;break;case 8:e.prev=8,e.t0=e.catch(2),console.error(e.t0),i=[];case 12:return u=b.deserialize(i),e.abrupt("return",u.map((function(e){return f({redirectAssetId:r(e,["well","asset_id"])||null},e)})));case 14:case"end":return e.stop()}}),e,null,[[2,8]])})))).apply(this,arguments)}function x(e){return O.apply(this,arguments)}function O(){return(O=a(n.mark((function e(r){var a,s,i,u,o,c,p,f=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=f.length>1&&void 0!==f[1]?f[1]:1,s=f.length>2?f[2]:void 0,"well"!==r&&"api_number"!==r){e.next=7;break}return e.next=5,m(r,s);case 5:return i=e.sent,e.abrupt("return",i);case 7:if("rig"!==r){e.next=12;break}return e.next=10,_(a,s);case 10:return u=e.sent,e.abrupt("return",u);case 12:if("frac_fleet"!==r){e.next=17;break}return e.next=15,y(a,s);case 15:return o=e.sent,e.abrupt("return",o);case 17:if("drillout_unit"!==r){e.next=22;break}return e.next=20,v(a,s);case 20:return c=e.sent,e.abrupt("return",c);case 22:return e.next=24,Promise.all([m("well",s),_(a,s),y(a,s),v(a,s)]);case 24:return p=e.sent,e.abrupt("return",l.apply(void 0,t(p)));case 26:case"end":return e.stop()}}),e)})))).apply(this,arguments)}export{x as fetchAllAssets,m as fetchWells};
1
+ import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/toConsumableArray";import r from"lodash/get";import n from"@babel/runtime/regenerator";import a from"@babel/runtime/helpers/asyncToGenerator";import s from"jsona";import{getAssets as i,getRigs as u,getFracFleets as o,getDrilloutUnits as c}from"../../../../../../clients/jsonApi/index.js";import l from"lodash/concat";function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function f(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?p(Object(n),!0).forEach((function(r){e(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var b=new s;function m(){return d.apply(this,arguments)}function d(){return(d=a(n.mark((function e(){var t,a,s,u,o=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=o.length>0&&void 0!==o[0]?o[0]:"well",a=o.length>1?o[1]:void 0,s=null,e.prev=3,e.next=6,i({types:["well"],company_id:a?+a:void 0,fields:["asset.name","asset.parent_asset_id","asset.parent_asset_name","asset.stats","asset.target_formation","asset.string_design","asset.root_asset_name","asset.basin","asset.county","asset.area","asset.visibility","asset.top_hole","asset.settings","well.settings"],per_page:1e4,sort:"name"});case 6:s=e.sent,e.next=12;break;case 9:e.prev=9,e.t0=e.catch(3),console.error(e.t0);case 12:return u=s?s.data.map((function(e){return{id:Number(e.id),name:r(e,"attributes.name"),rigId:r(e,"attributes.parent_asset_id")||"Null",rigName:r(e,"attributes.parent_asset_name")||"Null",formation:r(e,"attributes.target_formation")||"Null",stringDesign:r(e,"attributes.string_design")||"Null",programName:r(e,"attributes.root_asset_name")||"Null",basin:r(e,"attributes.basin")||"Null",county:r(e,"attributes.county")||"Null",area:r(e,"attributes.area")||"Null",visibility:r(e,"attributes.visibility"),topHole:r(e,"attributes.top_hole"),rigReleaseDate:r(e,"attributes.stats.well_end"),totalDepth:r(e,"attributes.stats.total_depth"),is_usable:!0,apiNumber:r(e,"attributes.settings.api_number","-")}})).filter((function(e){return"visible"===e.visibility})):[],e.abrupt("return",u.map((function(e){return{redirectAssetId:e.id,apiNumber:e.api_number,name:e.name,asset_id:e.id,type:t}})));case 14:case"end":return e.stop()}}),e,null,[[3,9]])})))).apply(this,arguments)}function _(e,t){return g.apply(this,arguments)}function g(){return(g=a(n.mark((function e(t,a){var s,i,o;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s={per_page:1e3,page:t,fields:["rig.name","rig.active_well","rig.asset_id"],sort:"name",company:a},e.prev=2,e.next=5,u(s);case 5:i=e.sent,e.next=12;break;case 8:e.prev=8,e.t0=e.catch(2),console.error(e.t0),i=[];case 12:return o=b.deserialize(i),e.abrupt("return",o.map((function(e){return f({redirectAssetId:r(e,["active_well","asset_id"])||null},e)})));case 14:case"end":return e.stop()}}),e,null,[[2,8]])})))).apply(this,arguments)}function y(e,t){return h.apply(this,arguments)}function h(){return(h=a(n.mark((function e(t,a){var s,i,u;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s={per_page:1e3,page:t,fields:["frac_fleet.name","frac_fleet.current_pad_id","frac_fleet.pad_frac_fleets"],sort:"name",company:a},e.prev=2,e.next=5,o(s);case 5:i=e.sent,e.next=12;break;case 8:e.prev=8,e.t0=e.catch(2),console.error(e.t0),i=[];case 12:return u=b.deserialize(i),e.abrupt("return",u.map((function(e){return f({redirectAssetId:r(e,["current_pad_id"])||null},e)})));case 14:case"end":return e.stop()}}),e,null,[[2,8]])})))).apply(this,arguments)}function v(e,t){return w.apply(this,arguments)}function w(){return(w=a(n.mark((function e(t,a){var s,i,u;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s={per_page:1e3,page:t,fields:["drillout_unit.name","drillout_unit.well"],sort:"name",company:a},e.prev=2,e.next=5,c(s);case 5:i=e.sent,e.next=12;break;case 8:e.prev=8,e.t0=e.catch(2),console.error(e.t0),i=[];case 12:return u=b.deserialize(i),e.abrupt("return",u.map((function(e){return f({redirectAssetId:r(e,["well","asset_id"])||null},e)})));case 14:case"end":return e.stop()}}),e,null,[[2,8]])})))).apply(this,arguments)}function x(e){return O.apply(this,arguments)}function O(){return(O=a(n.mark((function e(r){var a,s,i,u,o,c,p,f=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=f.length>1&&void 0!==f[1]?f[1]:1,s=f.length>2?f[2]:void 0,"well"!==r&&"api_number"!==r){e.next=7;break}return e.next=5,m(r,s);case 5:return i=e.sent,e.abrupt("return",i);case 7:if("rig"!==r){e.next=12;break}return e.next=10,_(a,s);case 10:return u=e.sent,e.abrupt("return",u);case 12:if("frac_fleet"!==r){e.next=17;break}return e.next=15,y(a,s);case 15:return o=e.sent,e.abrupt("return",o);case 17:if("drillout_unit"!==r){e.next=22;break}return e.next=20,v(a,s);case 20:return c=e.sent,e.abrupt("return",c);case 22:return e.next=24,Promise.all([m("well",s),_(a,s),y(a,s),v(a,s)]);case 24:return p=e.sent,e.abrupt("return",l.apply(void 0,t(p)));case 26:case"end":return e.stop()}}),e)})))).apply(this,arguments)}export{x as fetchAllAssets,m as fetchWells};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import{get as t,uniq as r,includes as n,isEqual as o}from"lodash";import i from"@babel/runtime/helpers/toConsumableArray";import"../../constants/completion.js";import"../../constants/alerts.js";import s from"@babel/runtime/helpers/slicedToArray";import"../../constants/goals.js";import"../../constants/segment.js";import"../../constants/apps.js";import"../../constants/drillstring.js";import"../../constants/notifications.js";import"../../constants/feed.js";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/asyncToGenerator";import"../../utils/mobileDetect.js";import a from"@babel/runtime/helpers/typeof";import"../../utils/index.js";import{jsxs as p,Fragment as l,jsx as m}from"react/jsx-runtime";import{makeStyles as c,Dialog as d,DialogTitle as u,Typography as j,Tooltip as f,IconButton as C,DialogContent as v,DialogActions as b,Button as g}from"@material-ui/core";import{useState as A,useRef as D,useMemo as h,useEffect as I,useCallback as x}from"react";import"querystring";import"uuid/v1";import"../../clients/jsonApi/index.js";import"../../clients/subscriptions.js";import"uuid";import"@babel/runtime/helpers/objectWithoutProperties";import S from"prop-types";import y from"classnames";import{Close as W}from"@material-ui/icons";import"../Modal/index.js";import"../IconMenu/index.js";import"../StyledMenuItem/index.js";import P from"../LoadingIndicator/LoadingIndicator.js";import"../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../DevCenter/DevCenterAppContainer/components/DcTooltipsCoordinatorProvider/DcTooltipsCoordinatorProvider.js";import"../Tooltip/MuiTooltipDcWrapper.js";import"../Avatar/index.js";import"../Annotations/AnnotationsContext.js";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"react-router";import"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"../IconButton/index.js";import"../ConfirmationDialog.js";import"../Annotations/components/AnnotationsList/index.js";import"../Annotations/components/LastAnnotation/index.js";import"../PadModeSelect/PadModeSelect.js";import"../DevCenter/AppHeader/AppHeaderNew.js";import"../DevCenter/AppHeader/AppHeader.js";import"../DevCenter/AppSideBar/AppSideBar.js";import"../DevCenter/AppContext.js";import"../DevCenter/AppsDataProvider/AppsDataProvider.js";import"@material-ui/icons/Help";import"../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../EmptyView/EmptyAppView/EmptyAppView.js";import"../ErrorBoundary/ErrorBoundary.js";import"../Typography.js";import"../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../DevCenter/DevCenterAppContainer/components/DisabledSettingsMessage/DisabledSettingsMessage.js";import"slate";import"../SlateFormattedText/RenderElements.js";import"../SlateFormattedText/SlateFormattedText.js";import"../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../DevCenter/DevCenterAppContainer/components/HelpCenterDialog/HelpCenterDialog.js";import"../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../DevCenter/NavigationBar/NavigationBar.js";import"../DevCenter/SideBar/SideBar.js";import"../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../DevCenter/IsolatedDevCenterAppContainer/AppsGridDragHandle.js";import"../TruncatedText/index.js";import"../AssetEditor/SingleAssetEditor.js";import"../AssetEditor/AssetEditorAutocomplete.js";import"../AssetEditor/index.js";import"../AppVersionsSelect/AppVersionsSelect.js";import"../CollapsableSidebar.js";import"../DateTimePicker/index.js";import"../DatePicker/index.js";import"../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../ColorPicker/ColorPicker.js";import"../ParameterCharts/AddEditTrack.js";import"../ParameterCharts/ParameterCharts.js";import"../ChartActionsList/ChartActionsList.js";import"../SettingEditors/ColorEditor/index.js";import"../SettingEditors/DropdownEditor/index.js";import"../SettingEditors/RadioEditor/index.js";import"../SwitchControl/index.js";import"../RangeSlider/RangeSlider.js";import"../Login/components/Login.js";import"../Login/components/PasswordField.js";import"../Login/components/Chip.js";import"../Login/components/StepFooter.js";import"../Login/components/StepContent.js";import"../Login/components/StepHeader.js";import"../Login/components/Step.js";import"../Login/components/OrDivider.js";import"../Login/components/HiddenEmailField.js";import"../Login/components/EmailField.js";import"../Breadcrumbs/index.js";import"../VirtualizedTable/index.js";import"../EmptyView/EmptyView.js";import"../Button/index.js";import"../MenuItem/index.js";import"../ContextMenuItem/index.js";import"../FolderMenuItem/index.js";import"../EditableItem/EditableItem/index.js";import"../EditableItem/EditableItemWithBadge/index.js";import"../Checkbox/index.js";import"../FolderMenuItemWithLinks/index.js";import"../TextField/index.js";import"../Chip/index.js";import"../Counter/index.js";import"../AnchorsList/AnchorsList.js";import"../Select/index.js";import"../Tabs/Tabs.js";import"../Tabs/Tab.js";import"../ResizableTable/ResizableTable.js";import"../Drillstring/BHASchematic.js";import"../Drillstring/BHAComponentIcon.js";import"../Drillstring/BHATable/index.js";import"../Drillstring/BHAComponentDetail/index.js";import"../Casing/CasingComponentIcon.js";import"../Casing/CasingTable/index.js";import"../WellSummary/WellSummaryItemLabel.js";import"../WellSummary/WellSummaryItemTitle.js";import"../WellSummary/WellSummaryItemValue.js";import"../WellSummary/ActivitySummaryChart.js";import"../WellSummary/FracWirelineTimeChart.js";import{useWells as k,useFetchBicWellsData as w}from"./effects/index.js";import E from"./components/Map/index.js";import T from"./components/WellSection/index.js";import{DEFAULT_WELL_SECTIONS as O}from"./constants.js";import B from"../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../Notifications/Notifications.js";import"../TextLink/index.js";import"../Template/TemplatePopover/index.js";import"../PinnableFilters/PinnableFilters.js";import"../HeaderLayout/HeaderLayout.js";import"../PadOffsetsPicker/PadOffsetsPicker.js";import"../PadOffsetsPicker/OffsetAssetChip.js";import"../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../PadOffsetsPicker/StagesSelector.js";import"../Table/TableToolbar/TableToolbar.js";import"../PriceInput/PriceInput.js";import"../LabelsCounter/LabelsCounter.js";import"../Stepper/Step.js";import"../Stepper/StepsWrapper.js";import"../Stepper/Stepper.js";import"../Comment/CommentIcon/index.js";import"../FilesLoader/FilesLoader.js";import"../SearchInput/index.js";import"../StageDesignVActual/ComparisonHeader.js";import"../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../StageDesignVActual/ComparisonRow.js";import"../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../FeedItem/FeedItem.js";import"../KeyboardDateTimePicker.js";import"../PostInput/PostInput.js";import"../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../AddComment/Popover.js";import"../AddComment/Popup.js";function L(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function F(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?L(Object(n),!0).forEach((function(r){e(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):L(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var N=c((function(e){return{paper:{width:"552px"},dialogTitles:{display:"flex",flexDirection:"column"},titleContent:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},title:{fontSize:"20px",color:e.palette.primary.text1},description:{fontSize:"16px",fontWeight:"normal",color:e.palette.primary.text6,marginTop:16},closeIconButton:{fontSize:"20px",padding:4,"&:hover $closeIcon":{color:"#fff"}},closeIcon:{color:e.palette.primary.text6},topShadow:{width:"100%",height:"16px",backgroundImage:"linear-gradient(0deg, rgba(65, 65, 65, 0) 0%, ".concat(e.palette.background.b9,")"),position:"absolute",top:"155px",zIndex:2},bottomShadow:{width:"100%",height:"16px",backgroundImage:"linear-gradient(180deg, rgba(65, 65, 65, 0) 0%, ".concat(e.palette.background.b9,")"),position:"absolute",bottom:"52px",zIndex:2},dialogActions:{display:"flex",justifyContent:"flex-end",paddingTop:8,paddingBottom:8},dialogActionsSmallScreen:{paddingRight:"100px"},dialogContent:{display:"flex",flexDirection:"column",overflowX:"hidden"},buttonContainer:{display:"flex",gap:"16px"}}}));function M(e,r){var n=e.find((function(e){return e.id===r}));return t(n,"name")||"-"}function V(e,r){var n=e.find((function(e){return e.id===r}));return t(n,"rigName")||"-"}function H(e,t){return"well"===e.value?"Best Wells":"area"===e.value?"Area Offsets":"Best ".concat(e.value,"section"===t?" Wells":' " Wells')}function R(e){return e.map((function(e){return F(F({},e),{},{wells:e.wells.sort((function(e,t){return e.name<t.name?-1:e.name>t.name?1:0}))})}))}function U(e){var n=t(e,"bicWellIds")||[],o=t(e,"manualWellIds")||[],i=t(e,"selectedWellIds")||[];return r(n.concat(o).concat(i))}function z(e){var c=e.defaultSubjectWell,S=e.offsetSetting,L=e.currentUser,z=e.isOpen,_=e.onClose,q=e.onSave,G=e.addWellsUsabilityInfo,K=e.unusableWellAlarm,Q=A(!1),X=s(Q,2),$=X[0],J=X[1],Y=N({scrolling:$}),Z=D(null),ee=D(!0),te=A(t(c,"companyId")||t(S,"companyId")||+t(L,"company_id")),re=s(te,2),ne=re[0],oe=re[1],ie=A(t(c,"asset_id")||t(S,"subjectWellId")||null),se=s(ie,2),ae=se[0],pe=se[1],le=k(ne,z),me=w(ae,z),ce=A([]),de=s(ce,2),ue=de[0],je=de[1],fe=A(!1),Ce=s(fe,2),ve=Ce[0],be=Ce[1],ge=A(S),Ae=s(ge,2),De=Ae[0],he=Ae[1],Ie=A(!1),xe=s(Ie,2),Se=xe[0],ye=xe[1],We=h((function(){if(le){var e=U(De);return le.filter((function(r){return e.find((function(e){return e===t(r,"id")}))}))}return[]}),[le,De]);I((function(){z&&(oe(t(c,"companyId")||t(S,"companyId")||+t(L,"company_id")),pe(t(c,"asset_id")||t(S,"subjectWellId")||null),he(S),ye(!1),ee.current=!0)}),[S,z]),I((function(){if(z&&le&&ee.current){var e,o=t(De,"selectedWellIds")||[],s=t(De,"manualWellIds")||[],p=t(De,"bicWellIds")||[],l=o.concat(s),m=l.filter((function(e){return le.find((function(t){return t.id===e}))})).map((function(e){return{id:e,checked:!0,name:M(le,e),rigName:V(le,e),kind:o.includes(e)?"advanced":"manual"}}));if(me&&me.filters&&me.result){var c,d=[],u=[{name:"Wells within Area",value:"area"}].concat(i(t(me,["filters","filterTabs"]))),j=(null===(c=me.filters)||void 0===c?void 0:c.filterMode)||"holeSize",f=r(u);e=[{name:"Search Results",wells:m,expanded:Se}].concat(i(f.map((function(e){var t;return{name:H(e,j),wells:(null===(t=me.result[e.value])||void 0===t?void 0:t.filter((function(e){return le.find((function(t){return t.id===e}))})).map((function(e){var t="object"===a(e)?e.id:e;return d.push(t),{id:t,checked:!1,name:M(le,t),rigName:V(le,t),kind:"best"}})))||[],expanded:!1}}))))}else e=[{name:"Search Results",wells:m,expanded:Se}].concat(i(O));var C=e.map((function(e){var t=e.wells.map((function(e){return n(p,e.id)||n(l,e.id)?F(F({},e),{},{checked:!0}):F({},e)}));return F(F({},e),{},{wells:t})}));je(R(C))}}),[z,le,me,De]);var Pe=x((function(){return U(De).length}),[De]),ke=x((function(){return(t(De,"bicWellIds")||[]).length})),we=D(null),Ee=!le;return p(l,{children:[p(d,{onBackdropClick:_,onEscapeKeyDown:_,open:z,classes:{paper:Y.paper},children:[m(u,{children:p("div",{className:Y.dialogTitles,children:[p("div",{className:Y.titleContent,children:[m(j,{className:Y.title,children:"Select Offset Wells"}),m(f,{title:"Close",children:m(C,{"data-not-migrated-muiiconbutton":!0,"aria-label":"close",className:Y.closeIconButton,onClick:_,children:m(W,{className:Y.closeIcon})})})]}),m("div",{className:Y.description,children:"Quickly add all of the Best-In-Class Wells per section selected from the Offsets Well Selection Application."})]})}),$&&m("div",{className:Y.topShadow}),m(v,{className:Y.dialogContent,ref:Z,onScroll:function(){J(!0),clearTimeout(we.current),we.current=setTimeout((function(){J(!1)}),1e3)},children:Ee?m(P,{fullscreen:!1}):p(l,{children:[m(E,{wells:We,offsetWells:We}),m(T,{company:ne,wellSections:ue,getWellName:M,onChangeWellSections:function(e){var t=R(e);je(t),ye(t[0].expanded);var n=[],o=[],i=[];t.forEach((function(e){e.wells.forEach((function(e){e.checked&&"advanced"===e.kind&&n.push(e.id),e.checked&&"manual"===e.kind&&o.push(e.id),e.checked&&"best"===e.kind&&i.push(e.id)}))}));var s=n.concat(o).concat(i),a=F(F({},De),{},{selectedWellIds:r(n),manualWellIds:r(o),bicWellIds:r(i),resultWellIds:r(s)});he(a),ee.current=!1},onExploreMode:function(){be(!0)}})]})}),m("div",{className:Y.bottomShadow}),m(b,{className:y(Y.dialogActions),children:p("div",{className:Y.buttonContainer,children:[m(g,{onClick:_,color:"primary",children:"Cancel"}),p(g,{variant:"contained",color:"primary",onClick:function(){var e=U(De),t=le.filter((function(t){return n(e,t.id)})),r=F(F({},De),{},{companyId:+ne,resultWellIds:e});be(!1),q(r,t)},children:["Add (",Pe(),")"]})]})})]}),ve&&m(B,{defaultSubjectWellId:t(c,"asset_id"),companyId:+ne,offsetSetting:De,currentUser:L,addWellsUsabilityInfo:G,unusableWellAlarm:K,isAdvancedSearch:!0,bestCount:ke(),isOpen:ve,onClose:function(){be(!1)},onSave:function(e){var r=e;c||(o(ae,t(r,"subjectWellId"))&&o(ne,t(r,"companyId"))||(r=F(F({},r),{},{bicWellIds:[],manualWellIds:[],resultWellIds:[]})),pe(t(r,"subjectWellId")),oe(t(r,"companyId")));var n=t(r,"manualWellIds")||[],i=t(r,"selectedWellIds")||[];n=n.filter((function(e){return!i.includes(e)})),r=F(F({},r),{},{manualWellIds:n}),he(r),ee.current=!0,ye(!0),be(!1)}})]})}z.propTypes={defaultSubjectWell:S.shape({}),offsetSetting:S.shape({subjectWellId:S.number,companyId:S.number}),currentUser:S.shape({}),isOpen:S.bool.isRequired,onClose:S.func.isRequired,onSave:S.func.isRequired,addWellsUsabilityInfo:S.func,unusableWellAlarm:S.string},z.defaultProps={defaultSubjectWell:null,addWellsUsabilityInfo:null,unusableWellAlarm:"Unable to add",offsetSetting:{},currentUser:{}};export default z;
1
+ import e from"@babel/runtime/helpers/defineProperty";import{get as t,uniq as r,includes as n,isEqual as o}from"lodash";import i from"@babel/runtime/helpers/toConsumableArray";import"../../constants/completion.js";import"../../constants/alerts.js";import s from"@babel/runtime/helpers/slicedToArray";import"../../constants/goals.js";import"../../constants/segment.js";import"../../constants/apps.js";import"../../constants/drillstring.js";import"../../constants/notifications.js";import"../../constants/feed.js";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/asyncToGenerator";import"../../utils/mobileDetect.js";import p from"@babel/runtime/helpers/typeof";import"../../utils/index.js";import{jsxs as a,Fragment as l,jsx as m}from"react/jsx-runtime";import{makeStyles as d,Dialog as c,DialogTitle as u,Typography as j,Tooltip as f,IconButton as C,DialogContent as v,DialogActions as b,Button as g}from"@material-ui/core";import{useState as A,useRef as D,useMemo as h,useEffect as x,useCallback as I}from"react";import"querystring";import"uuid/v1";import"../../clients/jsonApi/index.js";import"../../clients/subscriptions.js";import"uuid";import"@babel/runtime/helpers/objectWithoutProperties";import S from"prop-types";import y from"classnames";import{Close as W}from"@material-ui/icons";import"../Modal/index.js";import"../IconMenu/index.js";import"../StyledMenuItem/index.js";import P from"../LoadingIndicator/LoadingIndicator.js";import"../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../DevCenter/DevCenterAppContainer/components/DcTooltipsCoordinatorProvider/DcTooltipsCoordinatorProvider.js";import"../Tooltip/MuiTooltipDcWrapper.js";import"../Avatar/index.js";import"../Annotations/AnnotationsContext.js";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"react-router";import"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"../IconButton/index.js";import"../ConfirmationDialog.js";import"../Annotations/components/AnnotationsList/index.js";import"../Annotations/components/LastAnnotation/index.js";import"../PadModeSelect/PadModeSelect.js";import"../DevCenter/AppHeader/AppHeaderNew.js";import"../DevCenter/AppHeader/AppHeader.js";import"../DevCenter/AppSideBar/AppSideBar.js";import"../DevCenter/AppContext.js";import"../DevCenter/AppsDataProvider/AppsDataProvider.js";import"@material-ui/icons/Help";import"../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../EmptyView/EmptyAppView/EmptyAppView.js";import"../ErrorBoundary/ErrorBoundary.js";import"../Typography.js";import"../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../DevCenter/DevCenterAppContainer/components/DisabledSettingsMessage/DisabledSettingsMessage.js";import"slate";import"../SlateFormattedText/RenderElements.js";import"../SlateFormattedText/SlateFormattedText.js";import"../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../DevCenter/DevCenterAppContainer/components/HelpCenterDialog/HelpCenterDialog.js";import"../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../DevCenter/NavigationBar/NavigationBar.js";import"../DevCenter/SideBar/SideBar.js";import"../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../DevCenter/IsolatedDevCenterAppContainer/AppsGridDragHandle.js";import"../TruncatedText/index.js";import"../AssetEditor/SingleAssetEditor.js";import"../AssetEditor/AssetEditorAutocomplete.js";import"../AssetEditor/index.js";import"../AppVersionsSelect/AppVersionsSelect.js";import"../CollapsableSidebar.js";import"../DateTimePicker/index.js";import"../DatePicker/index.js";import"../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../ColorPicker/ColorPicker.js";import"../ParameterCharts/AddEditTrack.js";import"../ParameterCharts/ParameterCharts.js";import"../ChartActionsList/ChartActionsList.js";import"../SettingEditors/ColorEditor/index.js";import"../SettingEditors/DropdownEditor/index.js";import"../SettingEditors/RadioEditor/index.js";import"../SwitchControl/index.js";import"../RangeSlider/RangeSlider.js";import"../Login/components/Login.js";import"../Login/components/PasswordField.js";import"../Login/components/Chip.js";import"../Login/components/StepFooter.js";import"../Login/components/StepContent.js";import"../Login/components/StepHeader.js";import"../Login/components/Step.js";import"../Login/components/OrDivider.js";import"../Login/components/HiddenEmailField.js";import"../Login/components/EmailField.js";import"../Breadcrumbs/index.js";import"../VirtualizedTable/index.js";import"../EmptyView/EmptyView.js";import"../Button/index.js";import"../MenuItem/index.js";import"../ContextMenuItem/index.js";import"../FolderMenuItem/index.js";import"../EditableItem/EditableItem/index.js";import"../EditableItem/EditableItemWithBadge/index.js";import"../Checkbox/index.js";import"../FolderMenuItemWithLinks/index.js";import"../TextField/index.js";import"../Chip/index.js";import"../Counter/index.js";import"../AnchorsList/AnchorsList.js";import"../Select/index.js";import"../CustomSelect/index.js";import"../Tabs/Tabs.js";import"../Tabs/Tab.js";import"../ResizableTable/ResizableTable.js";import"../Drillstring/BHASchematic.js";import"../Drillstring/BHAComponentIcon.js";import"../Drillstring/BHATable/index.js";import"../Drillstring/BHAComponentDetail/index.js";import"../Casing/CasingComponentIcon.js";import"../Casing/CasingTable/index.js";import"../WellSummary/WellSummaryItemLabel.js";import"../WellSummary/WellSummaryItemTitle.js";import"../WellSummary/WellSummaryItemValue.js";import"../WellSummary/ActivitySummaryChart.js";import"../WellSummary/FracWirelineTimeChart.js";import{useWells as E,useFetchBicWellsData as k}from"./effects/index.js";import w from"./components/Map/index.js";import T from"./components/WellSection/index.js";import{DEFAULT_WELL_SECTIONS as O}from"./constants.js";import B from"../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../Notifications/Notifications.js";import"../TextLink/index.js";import"../Template/TemplatePopover/index.js";import"../PinnableFilters/PinnableFilters.js";import"../HeaderLayout/HeaderLayout.js";import"../PadOffsetsPicker/PadOffsetsPicker.js";import"../PadOffsetsPicker/OffsetAssetChip.js";import"../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../PadOffsetsPicker/StagesSelector.js";import"../Table/TableToolbar/TableToolbar.js";import"../PriceInput/PriceInput.js";import"../LabelsCounter/LabelsCounter.js";import"../Stepper/Step.js";import"../Stepper/StepsWrapper.js";import"../Stepper/Stepper.js";import"../Comment/CommentIcon/index.js";import"../FilesLoader/FilesLoader.js";import"../SearchInput/index.js";import"../StageDesignVActual/ComparisonHeader.js";import"../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../StageDesignVActual/ComparisonRow.js";import"../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../FeedItem/FeedItem.js";import"../KeyboardDateTimePicker.js";import"../PostInput/PostInput.js";import"../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../AddComment/Popover.js";import"../AddComment/Popup.js";import"../EmbeddedApp/DevCenterEmbeddedApp.js";import"../EmbeddedApp/EmbeddedApp.js";function L(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function F(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?L(Object(n),!0).forEach((function(r){e(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):L(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var N=d((function(e){return{paper:{width:"552px"},dialogTitles:{display:"flex",flexDirection:"column"},titleContent:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},title:{fontSize:"20px",color:e.palette.primary.text1},description:{fontSize:"16px",fontWeight:"normal",color:e.palette.primary.text6,marginTop:16},closeIconButton:{fontSize:"20px",padding:4,"&:hover $closeIcon":{color:"#fff"}},closeIcon:{color:e.palette.primary.text6},topShadow:{width:"100%",height:"16px",backgroundImage:"linear-gradient(0deg, rgba(65, 65, 65, 0) 0%, ".concat(e.palette.background.b9,")"),position:"absolute",top:"155px",zIndex:2},bottomShadow:{width:"100%",height:"16px",backgroundImage:"linear-gradient(180deg, rgba(65, 65, 65, 0) 0%, ".concat(e.palette.background.b9,")"),position:"absolute",bottom:"52px",zIndex:2},dialogActions:{display:"flex",justifyContent:"flex-end",paddingTop:8,paddingBottom:8},dialogActionsSmallScreen:{paddingRight:"100px"},dialogContent:{display:"flex",flexDirection:"column",overflowX:"hidden"},buttonContainer:{display:"flex",gap:"16px"}}}));function M(e,r){var n=e.find((function(e){return e.id===r}));return t(n,"name")||"-"}function V(e,r){var n=e.find((function(e){return e.id===r}));return t(n,"rigName")||"-"}function H(e,t){return"well"===e.value?"Best Wells":"area"===e.value?"Area Offsets":"Best ".concat(e.value,"section"===t?" Wells":' " Wells')}function R(e){return e.map((function(e){return F(F({},e),{},{wells:e.wells.sort((function(e,t){return e.name<t.name?-1:e.name>t.name?1:0}))})}))}function U(e){var n=t(e,"bicWellIds")||[],o=t(e,"manualWellIds")||[],i=t(e,"selectedWellIds")||[];return r(n.concat(o).concat(i))}function z(e){var d=e.defaultSubjectWell,S=e.offsetSetting,L=e.currentUser,z=e.isOpen,_=e.onClose,q=e.onSave,G=e.addWellsUsabilityInfo,K=e.unusableWellAlarm,Q=A(!1),X=s(Q,2),$=X[0],J=X[1],Y=N({scrolling:$}),Z=D(null),ee=D(!0),te=A(t(d,"companyId")||t(S,"companyId")||+t(L,"company_id")),re=s(te,2),ne=re[0],oe=re[1],ie=A(t(d,"asset_id")||t(S,"subjectWellId")||null),se=s(ie,2),pe=se[0],ae=se[1],le=E(ne,z),me=k(pe,z),de=A([]),ce=s(de,2),ue=ce[0],je=ce[1],fe=A(!1),Ce=s(fe,2),ve=Ce[0],be=Ce[1],ge=A(S),Ae=s(ge,2),De=Ae[0],he=Ae[1],xe=A(!1),Ie=s(xe,2),Se=Ie[0],ye=Ie[1],We=h((function(){if(le){var e=U(De);return le.filter((function(r){return e.find((function(e){return e===t(r,"id")}))}))}return[]}),[le,De]);x((function(){z&&(oe(t(d,"companyId")||t(S,"companyId")||+t(L,"company_id")),ae(t(d,"asset_id")||t(S,"subjectWellId")||null),he(S),ye(!1),ee.current=!0)}),[S,z]),x((function(){if(z&&le&&ee.current){var e,o=t(De,"selectedWellIds")||[],s=t(De,"manualWellIds")||[],a=t(De,"bicWellIds")||[],l=o.concat(s),m=l.filter((function(e){return le.find((function(t){return t.id===e}))})).map((function(e){return{id:e,checked:!0,name:M(le,e),rigName:V(le,e),kind:o.includes(e)?"advanced":"manual"}}));if(me&&me.filters&&me.result){var d,c=[],u=[{name:"Wells within Area",value:"area"}].concat(i(t(me,["filters","filterTabs"]))),j=(null===(d=me.filters)||void 0===d?void 0:d.filterMode)||"holeSize",f=r(u);e=[{name:"Search Results",wells:m,expanded:Se}].concat(i(f.map((function(e){var t;return{name:H(e,j),wells:(null===(t=me.result[e.value])||void 0===t?void 0:t.filter((function(e){return le.find((function(t){return t.id===e}))})).map((function(e){var t="object"===p(e)?e.id:e;return c.push(t),{id:t,checked:!1,name:M(le,t),rigName:V(le,t),kind:"best"}})))||[],expanded:!1}}))))}else e=[{name:"Search Results",wells:m,expanded:Se}].concat(i(O));var C=e.map((function(e){var t=e.wells.map((function(e){return n(a,e.id)||n(l,e.id)?F(F({},e),{},{checked:!0}):F({},e)}));return F(F({},e),{},{wells:t})}));je(R(C))}}),[z,le,me,De]);var Pe=I((function(){return U(De).length}),[De]),Ee=I((function(){return(t(De,"bicWellIds")||[]).length})),ke=D(null),we=!le;return a(l,{children:[a(c,{onBackdropClick:_,onEscapeKeyDown:_,open:z,classes:{paper:Y.paper},children:[m(u,{children:a("div",{className:Y.dialogTitles,children:[a("div",{className:Y.titleContent,children:[m(j,{className:Y.title,children:"Select Offset Wells"}),m(f,{title:"Close",children:m(C,{"data-not-migrated-muiiconbutton":!0,"aria-label":"close",className:Y.closeIconButton,onClick:_,children:m(W,{className:Y.closeIcon})})})]}),m("div",{className:Y.description,children:"Quickly add all of the Best-In-Class Wells per section selected from the Offsets Well Selection Application."})]})}),$&&m("div",{className:Y.topShadow}),m(v,{className:Y.dialogContent,ref:Z,onScroll:function(){J(!0),clearTimeout(ke.current),ke.current=setTimeout((function(){J(!1)}),1e3)},children:we?m(P,{fullscreen:!1}):a(l,{children:[m(w,{wells:We,offsetWells:We}),m(T,{company:ne,wellSections:ue,getWellName:M,onChangeWellSections:function(e){var t=R(e);je(t),ye(t[0].expanded);var n=[],o=[],i=[];t.forEach((function(e){e.wells.forEach((function(e){e.checked&&"advanced"===e.kind&&n.push(e.id),e.checked&&"manual"===e.kind&&o.push(e.id),e.checked&&"best"===e.kind&&i.push(e.id)}))}));var s=n.concat(o).concat(i),p=F(F({},De),{},{selectedWellIds:r(n),manualWellIds:r(o),bicWellIds:r(i),resultWellIds:r(s)});he(p),ee.current=!1},onExploreMode:function(){be(!0)}})]})}),m("div",{className:Y.bottomShadow}),m(b,{className:y(Y.dialogActions),children:a("div",{className:Y.buttonContainer,children:[m(g,{onClick:_,color:"primary",children:"Cancel"}),a(g,{variant:"contained",color:"primary",onClick:function(){var e=U(De),t=le.filter((function(t){return n(e,t.id)})),r=F(F({},De),{},{companyId:+ne,resultWellIds:e});be(!1),q(r,t)},children:["Add (",Pe(),")"]})]})})]}),ve&&m(B,{defaultSubjectWellId:t(d,"asset_id"),companyId:+ne,offsetSetting:De,currentUser:L,addWellsUsabilityInfo:G,unusableWellAlarm:K,isAdvancedSearch:!0,bestCount:Ee(),isOpen:ve,onClose:function(){be(!1)},onSave:function(e){var r=e;d||(o(pe,t(r,"subjectWellId"))&&o(ne,t(r,"companyId"))||(r=F(F({},r),{},{bicWellIds:[],manualWellIds:[],resultWellIds:[]})),ae(t(r,"subjectWellId")),oe(t(r,"companyId")));var n=t(r,"manualWellIds")||[],i=t(r,"selectedWellIds")||[];n=n.filter((function(e){return!i.includes(e)})),r=F(F({},r),{},{manualWellIds:n}),he(r),ee.current=!0,ye(!0),be(!1)}})]})}z.propTypes={defaultSubjectWell:S.shape({}),offsetSetting:S.shape({subjectWellId:S.number,companyId:S.number}),currentUser:S.shape({}),isOpen:S.bool.isRequired,onClose:S.func.isRequired,onSave:S.func.isRequired,addWellsUsabilityInfo:S.func,unusableWellAlarm:S.string},z.defaultProps={defaultSubjectWell:null,addWellsUsabilityInfo:null,unusableWellAlarm:"Unable to add",offsetSetting:{},currentUser:{}};export default z;