@corva/ui 0.64.0-0 → 0.64.0-10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. package/cjs-bundle/components/AddComment/Popover.js +1 -1
  2. package/cjs-bundle/components/AddComment/components/Content.js +1 -1
  3. package/cjs-bundle/components/Annotations/components/AnnotationsList/components/AddAnnotationForm/index.js +1 -1
  4. package/cjs-bundle/components/AssetEditorV2/components/PrimaryAssetSelect.js +1 -1
  5. package/cjs-bundle/components/AssetEditorV2/effects/index.js +1 -1
  6. package/cjs-bundle/components/AssetEditorV2/index.js +1 -1
  7. package/cjs-bundle/components/AssetEditorV2/utils/index.js +1 -1
  8. package/cjs-bundle/components/BICOffsetPickerDialog/index.js +1 -1
  9. package/cjs-bundle/components/Casing/CasingTableV2/components/CasingJoints/Editor.js +1 -1
  10. package/cjs-bundle/components/Casing/CasingTableV2/components/Component.js +1 -1
  11. package/cjs-bundle/components/Casing/CasingTableV2/components/DrillPipe/Editor.js +1 -1
  12. package/cjs-bundle/components/CollapsableSidebar.js +1 -1
  13. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js +1 -1
  14. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js +1 -1
  15. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js +1 -1
  16. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js +1 -1
  17. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/RemoveAppButton.js +1 -1
  18. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js +1 -1
  19. package/cjs-bundle/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterAppZoidComponent.js +1 -1
  20. package/cjs-bundle/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js +1 -1
  21. package/cjs-bundle/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js +1 -1
  22. package/cjs-bundle/components/DocumentViewer/DocumentViewer.js +1 -1
  23. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js +1 -1
  24. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js +1 -1
  25. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Component.js +1 -1
  26. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js +1 -1
  27. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js +1 -1
  28. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js +1 -1
  29. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js +1 -1
  30. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js +1 -1
  31. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js +1 -1
  32. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js +1 -1
  33. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js +1 -1
  34. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js +1 -1
  35. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js +1 -1
  36. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js +1 -1
  37. package/cjs-bundle/components/EmptyState/styles.js +1 -1
  38. package/cjs-bundle/components/EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js +1 -1
  39. package/cjs-bundle/components/Modal/CorvaModal.js +1 -1
  40. package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/SidetrackSwitch.js +1 -1
  41. package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js +1 -1
  42. package/cjs-bundle/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js +1 -1
  43. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Filter/SidetrackSwitch.js +1 -1
  44. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js +1 -1
  45. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/index.js +1 -1
  46. package/cjs-bundle/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js +1 -1
  47. package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js +1 -1
  48. package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/index.js +1 -1
  49. package/cjs-bundle/components/OffsetWellPickerV3/components/WellHubView/index.js +1 -1
  50. package/cjs-bundle/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js +1 -1
  51. package/cjs-bundle/components/OffsetWellPickerV4/OffsetWellPickerV4.js +1 -1
  52. package/cjs-bundle/components/OffsetWellPickerV4/components/Filter/Filter.js +1 -1
  53. package/cjs-bundle/components/OffsetWellPickerV4/components/OffsetWellsTable/MetricsSettingMenu.js +1 -1
  54. package/cjs-bundle/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.js +1 -1
  55. package/cjs-bundle/components/OffsetWellPickerV4/components/Toolbar/Toolbar.js +1 -1
  56. package/cjs-bundle/components/PadOffsetsPicker/StagesSelector.js +1 -1
  57. package/cjs-bundle/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js +1 -0
  58. package/cjs-bundle/components/PadOffsetsPickerV2/useDialogState.js +1 -0
  59. package/cjs-bundle/components/RealTimeValuesSidebar/RealTimeValuesBox/RealTimeBoxList.js +1 -1
  60. package/cjs-bundle/components/StatusBadge/api.js +1 -1
  61. package/cjs-bundle/components/StatusBadge/components/DQAlertsTooltip.js +1 -1
  62. package/cjs-bundle/components/StatusBadge/components/ReportIssueModal.js +1 -1
  63. package/cjs-bundle/components/StatusBadge/constants.js +1 -1
  64. package/cjs-bundle/components/StatusBadge/index.js +1 -1
  65. package/cjs-bundle/components/StatusBadge/utils.js +1 -1
  66. package/cjs-bundle/components/TextLink/index.js +1 -1
  67. package/cjs-bundle/components/index.js +1 -1
  68. package/cjs-bundle/constants/segment.js +1 -1
  69. package/cjs-bundle/effects/useWellnessAlerts.js +1 -1
  70. package/components/AddComment/Popover.js +1 -1
  71. package/components/AddComment/components/Content.js +1 -1
  72. package/components/Annotations/components/AnnotationsList/components/AddAnnotationForm/index.js +1 -1
  73. package/components/AssetEditorV2/components/PrimaryAssetSelect.js +1 -1
  74. package/components/AssetEditorV2/effects/index.d.ts.map +1 -1
  75. package/components/AssetEditorV2/effects/index.js +1 -1
  76. package/components/AssetEditorV2/index.d.ts.map +1 -1
  77. package/components/AssetEditorV2/index.js +1 -1
  78. package/components/AssetEditorV2/utils/index.d.ts.map +1 -1
  79. package/components/AssetEditorV2/utils/index.js +1 -1
  80. package/components/BICOffsetPickerDialog/index.js +1 -1
  81. package/components/Casing/CasingTableV2/components/CasingJoints/Editor.js +1 -1
  82. package/components/Casing/CasingTableV2/components/Component.js +1 -1
  83. package/components/Casing/CasingTableV2/components/DrillPipe/Editor.js +1 -1
  84. package/components/CollapsableSidebar.js +1 -1
  85. package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js +1 -1
  86. package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js +1 -1
  87. package/components/DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js +1 -1
  88. package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js +1 -1
  89. package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/RemoveAppButton.js +1 -1
  90. package/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js +1 -1
  91. package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterAppZoidComponent.js +1 -1
  92. package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js +1 -1
  93. package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js +1 -1
  94. package/components/DocumentViewer/DocumentViewer.js +1 -1
  95. package/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js +1 -1
  96. package/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js +1 -1
  97. package/components/Drillstring/BHAComponentsTable/components/Component.js +1 -1
  98. package/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js +1 -1
  99. package/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js +1 -1
  100. package/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js +1 -1
  101. package/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js +1 -1
  102. package/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js +1 -1
  103. package/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js +1 -1
  104. package/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js +1 -1
  105. package/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js +1 -1
  106. package/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js +1 -1
  107. package/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js +1 -1
  108. package/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js +1 -1
  109. package/components/EmptyState/styles.d.ts.map +1 -1
  110. package/components/EmptyState/styles.js +1 -1
  111. package/components/EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.d.ts.map +1 -1
  112. package/components/EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js +1 -1
  113. package/components/Modal/CorvaModal.d.ts +1 -1
  114. package/components/Modal/CorvaModal.d.ts.map +1 -1
  115. package/components/Modal/CorvaModal.js +1 -1
  116. package/components/Modal/types.d.ts +1 -0
  117. package/components/Modal/types.d.ts.map +1 -1
  118. package/components/OffsetWellPickerV2/components/Filter/SidetrackSwitch.js +1 -1
  119. package/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js +1 -1
  120. package/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js +1 -1
  121. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Filter/SidetrackSwitch.js +1 -1
  122. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js +1 -1
  123. package/components/OffsetWellPickerV3/components/CustomSelectionView/index.js +1 -1
  124. package/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js +1 -1
  125. package/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js +1 -1
  126. package/components/OffsetWellPickerV3/components/TabSelection/index.js +1 -1
  127. package/components/OffsetWellPickerV3/components/WellHubView/index.js +1 -1
  128. package/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js +1 -1
  129. package/components/OffsetWellPickerV4/OffsetWellPickerV4.js +1 -1
  130. package/components/OffsetWellPickerV4/components/Filter/Filter.js +1 -1
  131. package/components/OffsetWellPickerV4/components/OffsetWellsTable/MetricsSettingMenu.js +1 -1
  132. package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.js +1 -1
  133. package/components/OffsetWellPickerV4/components/Toolbar/Toolbar.js +1 -1
  134. package/components/PadOffsetsPicker/StagesSelector.d.ts.map +1 -1
  135. package/components/PadOffsetsPicker/StagesSelector.js +1 -1
  136. package/components/PadOffsetsPickerV2/PadOffsetsPickerV2.d.ts +21 -0
  137. package/components/PadOffsetsPickerV2/PadOffsetsPickerV2.d.ts.map +1 -0
  138. package/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js +1 -0
  139. package/components/PadOffsetsPickerV2/index.d.ts +2 -0
  140. package/components/PadOffsetsPickerV2/index.d.ts.map +1 -0
  141. package/components/PadOffsetsPickerV2/useDialogState.d.ts +19 -0
  142. package/components/PadOffsetsPickerV2/useDialogState.d.ts.map +1 -0
  143. package/components/PadOffsetsPickerV2/useDialogState.js +1 -0
  144. package/components/RealTimeValuesSidebar/RealTimeValuesBox/RealTimeBoxList.js +1 -1
  145. package/components/StatusBadge/api.d.ts +1 -0
  146. package/components/StatusBadge/api.d.ts.map +1 -1
  147. package/components/StatusBadge/api.js +1 -1
  148. package/components/StatusBadge/components/DQAlertsTooltip.js +1 -1
  149. package/components/StatusBadge/components/ReportIssueModal.d.ts +1 -2
  150. package/components/StatusBadge/components/ReportIssueModal.d.ts.map +1 -1
  151. package/components/StatusBadge/components/ReportIssueModal.js +1 -1
  152. package/components/StatusBadge/constants.d.ts +3 -0
  153. package/components/StatusBadge/constants.d.ts.map +1 -1
  154. package/components/StatusBadge/constants.js +1 -1
  155. package/components/StatusBadge/index.d.ts +6 -4
  156. package/components/StatusBadge/index.d.ts.map +1 -1
  157. package/components/StatusBadge/index.js +1 -1
  158. package/components/StatusBadge/utils.d.ts +1 -1
  159. package/components/StatusBadge/utils.d.ts.map +1 -1
  160. package/components/StatusBadge/utils.js +1 -1
  161. package/components/TextLink/index.js +1 -1
  162. package/components/index.d.ts +2 -1
  163. package/components/index.js +1 -1
  164. package/constants/segment.d.ts +21 -0
  165. package/constants/segment.d.ts.map +1 -1
  166. package/constants/segment.js +1 -1
  167. package/effects/useWellnessAlerts.d.ts +3 -2
  168. package/effects/useWellnessAlerts.d.ts.map +1 -1
  169. package/effects/useWellnessAlerts.js +1 -1
  170. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"StagesSelector.d.ts","sourceRoot":"","sources":["../../../src/components/PadOffsetsPicker/StagesSelector.js"],"names":[],"mappings":";AA6JA;;;;gBAmIC"}
1
+ {"version":3,"file":"StagesSelector.d.ts","sourceRoot":"","sources":["../../../src/components/PadOffsetsPicker/StagesSelector.js"],"names":[],"mappings":";AA6JA;;;;gBAkIC"}
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import{useEffect as t}from"react";import{func as n,shape as r,number as a,string as i,oneOf as l}from"prop-types";import o from"use-tiny-state-machine";import{isNull as s,noop as c,range as d,get as u,isEmpty as g,last as p}from"lodash";import{makeStyles as f,Dialog as S,DialogTitle as h,DialogContent as m,Grid as E,FormControl as b,InputLabel as v,Select as C,MenuItem as D,Checkbox as O,ListItemText as T,Typography as L,FormLabel as y,RadioGroup as _,FormControlLabel as W,Radio as w,DialogActions as j,Button as N}from"@material-ui/core";import{getAppStorage as I}from"../../clients/jsonApi/index.js";import P from"./OffsetAssetChip.js";import{jsxs as x,Fragment as A,jsx as k}from"react/jsx-runtime";function G(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function q(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?G(Object(r),!0).forEach((function(n){e(t,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):G(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var F=f({dialogPaper:{width:"75%",maxWidth:420}});var H={id:"stages",initial:"idle",context:{lastStageNumber:null,error:null},states:{idle:{on:{FETCH_STAGES:{target:"pending",action:function(e,t){var n=e.dispatch;I("corva","completion.wits",t,{limit:1,sort:"{timestamp:-1}"}).then((function(e){return g(e)?null:u(p(e),"stage_number",null)})).then((function(e){return n("SUCCESS",e)})).catch((function(e){throw new Error(e.message)}))}}}},pending:{on:{SUCCESS:{target:"success",beforeStateChange:function(e,t){return(0,e.updateContext)((function(e){return q(q({},e),{},{lastStageNumber:t})}))}},FAILURE:{target:"failure",beforeStateChange:function(e,t){throw new Error(t.message)}}}}}},R=function(n){var r,a,i,l,g=n.onSave,p=n.onDelete,f=n.offset,I=F(),G=o(H),R=G.state,U=G.dispatch,Y=G.context,B=o((a=(r=f).stages,i=void 0===a?{}:a,{id:"dialog",initial:"closed",context:{selectedStages:void 0===(l=r.selectedStages)?[]:l,stagesData:i},states:{closed:{on:{OPEN_DIALOG:{target:"open"}}},open:{on:{CLOSE_DIALOG:{target:"closed"},SET_SELECTED_STAGES:{target:"open",beforeStateChange:function(t,n){return(0,t.updateContext)((function(t){return q(q({},t),{},{selectedStages:n,stagesData:n.reduce((function(t,n){return q(q({},t),{},e({},n,{lineStyle:"dotted",lineWidth:2}))}),{})})}))}},SET_SELECTED_LINE_STYLE:{target:"open",beforeStateChange:function(t,n){var r=t.updateContext,a=n.stage,i=n.selectedLineStyle;return r((function(t){return q(q({},t),{},{stagesData:q(q({},t.stagesData),{},e({},a,q(q({},t.stagesData[a]),{},{lineStyle:i})))})}))}},SET_SELECTED_LINE_WIDTH:{target:"open",beforeStateChange:function(t,n){var r=t.updateContext,a=n.stage,i=n.selectedLineWidth;return r((function(t){return q(q({},t),{},{stagesData:q(q({},t.stagesData),{},e({},a,q(q({},t.stagesData[a]),{},{lineWidth:Number(i)})))})}))}}}}}})),V=B.state,z=B.dispatch,J=B.context,K=function(e){return function(t){return z("SET_SELECTED_LINE_STYLE",{stage:e,selectedLineStyle:t.target.value})}},M=function(e){return function(t){return z("SET_SELECTED_LINE_WIDTH",{stage:e,selectedLineWidth:t.target.value})}},Q=function(){return z("CLOSE_DIALOG")},X=f.selectedWellId;t((function(){U("FETCH_STAGES",X)}),[]);var Z=s(Y.lastStageNumber);return x(A,{children:[k(P,{handleDelete:p,handleClick:Z?c:function(){return z("OPEN_DIALOG")},disabled:Z,tooltipText:"Edit stages for ".concat(f.selectedWellName),children:f.selectedWellName},f.selectedWellId),"success"===R&&x(S,{open:"open"===V,onBackdropClick:Q,classes:{paper:I.dialogPaper},children:[k(h,{children:"Offset Well Stages"}),k(m,{children:x(E,{container:!0,direction:"column",spacing:16,children:[k(E,{item:!0,children:x(b,{margin:"normal",fullWidth:!0,required:!0,children:[k(v,{htmlFor:"stages-multi-select",children:"Stages"}),k(C,{inputProps:{name:"stages",id:"stages-multi-select"},value:J.selectedStages,renderValue:function(e){return"".concat(e.length," stages selected")},onChange:function(e){return z("SET_SELECTED_STAGES",e.target.value)},multiple:!0,children:d(1,Y.lastStageNumber+1).map((function(e){return x(D,{value:e,children:[k(O,{checked:J.selectedStages.includes(e)}),k(T,{primary:e})]},e)}))})]})}),J.selectedStages.sort((function(e,t){return e-t})).map((function(e){return x(E,{item:!0,children:[x(L,{variant:"subtitle1",children:["Stage ",e]}),x(b,{component:"fieldset",children:[k(y,{component:"legend",required:!0,children:"Line Style"}),x(_,{name:"line-style",value:u(J,["stagesData",e,"lineStyle"],"dotted"),onChange:K(e),row:!0,children:[k(W,{value:"dotted",control:k(w,{}),label:"Dotted"}),k(W,{value:"dashed",control:k(w,{}),label:"Dashed"}),k(W,{value:"solid",control:k(w,{}),label:"Solid"})]})]}),x(b,{component:"fieldset",children:[k(y,{component:"legend",required:!0,children:"Line Width"}),x(_,{name:"line-width",value:String(u(J,["stagesData",e,"lineWidth"],"2")),onChange:M(e),row:!0,children:[k(W,{value:String(1),control:k(w,{}),label:"Thin"}),k(W,{value:String(2),control:k(w,{}),label:"Normal"}),k(W,{value:String(4),control:k(w,{}),label:"Thick"})]})]})]},e)}))]})}),x(j,{children:[k(N,{onClick:Q,children:"Cancel"}),k(N,{variant:"contained",color:"primary",onClick:function(){var e=q(q({},f),{},{stages:J.stagesData,selectedStages:J.selectedStages});Q(),g(e)},children:"Save"})]})]})]})};R.propTypes={onSave:n.isRequired,onDelete:n.isRequired,offset:r({selectedWellId:a,selectedWellName:i,selectedWellStatus:l(["active","idle","complete","paused","unknown"])}).isRequired};export{R as default};
1
+ import e from"@babel/runtime/helpers/defineProperty";import{useEffect as t}from"react";import{func as r,shape as o,number as i,string as n,oneOf as s}from"prop-types";import a from"use-tiny-state-machine";import{isNull as p,noop as m,range as l,get as c,isEmpty as d,last as u}from"lodash";import{makeStyles as j,Dialog as C,DialogTitle as g,DialogContent as S,Grid as A,FormControl as D,InputLabel as h,Select as v,MenuItem as b,Checkbox as f,ListItemText as E,Typography as T,FormLabel as P,RadioGroup as x,FormControlLabel as I,Radio as y,DialogActions as L,Button as B}from"@material-ui/core";import{getAppStorage as O}from"../../clients/jsonApi/index.js";import{jsxs as W,Fragment as k,jsx as w}from"react/jsx-runtime";import"../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../DevCenter/DevCenterAppContainer/components/AppSettingsDialogV2/AppSettingsDialog.js";import"../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../Modal/CorvaModal.js";import"uuid";import"../IconMenu/index.js";import"../StyledMenuItem/index.js";import"../AppIcon/AppIcon.js";import"../DevCenter/AppHeader/AppHeader.js";import"../DevCenter/AppSideBar/AppSideBar.js";import"../DevCenter/AppsDataProvider/AppsDataProvider.js";import"@babel/runtime/helpers/slicedToArray";import"classnames";import"@material-ui/icons";import"../Icons/AnnotationIcon.js";import"../Annotations/components/AnnotationsList/index.js";import"../Annotations/components/LastAnnotation/index.js";import"../Annotations/AnnotationsContext.js";import"../../utils/mobileDetect.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"../../clients/subscriptions.js";import"../../constants/goals.js";import"../../constants/segment.js";import"../../constants/alerts.js";import"../../constants/apps.js";import"../../constants/drillstring.js";import"../../constants/completion.js";import"../../constants/notifications.js";import"../../constants/feed.js";import"../../constants/bha.js";import"../../utils/env.js";import"../GradientManager/configuration/constants.js";import"../../utils/index.js";import"jsona";import"../StatusBadge/constants.js";import"@babel/runtime/helpers/toConsumableArray";import"lodash/set";import"lodash/get";import"lodash/unset";import"moment";import"../../clients/api/apiCore.js";import"../../clients/constants.js";import"../HelpCenter/HelpCenterIcon.js";import"../DevCenter/AppContext.js";import"../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"@babel/runtime/helpers/objectWithoutProperties";import"react-router";import"rollbar";import"@rollbar/react";import"../DevCenter/NavigationBar/NavigationBar.js";import"../DevCenter/SideBar/SideBar.js";import"../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../DevCenter/AppFilterPanelLayout/AppFilterPanelLayout.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../AssetEditor/index.js";import"../AssetEditorV2/index.js";import"../AppVersionsSelect/AppVersionsSelect.js";import"../LoadingIndicator/LoadingIndicator.js";import"../Typography.js";import"../RealTimeValuesSidebar/RealTimeSidebar.js";import"../CollapsableSidebar.js";import"../DateTimePicker/index.js";import"../DatePicker/index.js";import"../ErrorBoundary/ErrorBoundary.js";import"../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../SlateFormattedText/SlateFormattedText.js";import"../SlateFormattedText/RenderElements.js";import"@babel/runtime/helpers/typeof";import"slate";import"../EmptyState/EmptyState.js";import"../ParameterCharts/ParameterCharts.js";import"../ParameterCharts/AddEditTrack.js";import"../ChartActionsList/ChartActionsList.js";import"../CopyToClipboard/CopyToClipboard.js";import"../AssetEditor/AssetEditorAutocomplete.js";import"../AssetEditor/SingleAssetEditor.js";import"../SettingEditors/ColorEditor/index.js";import"../SettingEditors/DropdownEditor/index.js";import"../SettingEditors/RadioEditor/index.js";import"../SwitchControl/index.js";import"../ColorPicker/ColorPicker.js";import"../Chart/components/ChartButton.js";import"../Chart/components/ChartButtons.js";import"../Chart/components/ChartWrapper.js";import"../Chart/components/AxisDropdown.js";import"../Chart/components/ChartSelect.js";import"../Chart/components/buttons/DragToZoomButton.js";import"../Chart/components/buttons/ZoomInButton.js";import"../Chart/components/buttons/ZoomOutButton.js";import"../Chart/components/buttons/PanButton.js";import"../Chart/components/buttons/ResetZoomButton.js";import"../Chart/components/buttons/HideAxesButton.js";import"../Chart/components/buttons/ChartTypeButton.js";import"../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../TruncatedText/index.js";import"../RangeSlider/RangeSlider.js";import"../AdvancedSlider/AdvancedSlider.js";import"../Breadcrumbs/index.js";import"../VirtualizedTable/index.js";import"../EmptyView/EmptyView.js";import"../EmptyView/EmptyAppView/EmptyAppView.js";import"../Button/index.js";import"../ContextMenuItem/index.js";import"../FolderMenuItem/index.js";import"../EditableItem/EditableItem/index.js";import"../EditableItem/EditableItemWithBadge/index.js";import"../Checkbox/index.js";import"../FolderMenuItemWithLinks/index.js";import"../IconButton/index.js";import"../TextField/index.js";import"../Chip/index.js";import"../Counter/index.js";import"../AnchorsList/AnchorsList.js";import"../Select/index.js";import"../Select/SelectFilterBy.js";import"../CustomSelect/index.js";import"../Tabs/Tabs.js";import"../Tabs/Tab.js";import"../ResizableTable/ResizableTable.js";import"@material-ui/icons/Check";import"@material-ui/icons/Close";import"@material-ui/icons/Edit";import"@material-ui/icons/Delete";import"../GradientManager/GradientList.js";import"@material-ui/icons/AddCircle";import"../GradientManager/GradientPreview/GradientPreview.js";import"../GradientManager/GradientSelect.styles.js";import"../GradientPicker/GradientPicker.js";import"../GradientManager/GradientManager.styles.js";import"../Drillstring/BHASchematic.js";import"../Drillstring/BHATable/index.js";import"../Drillstring/BHAComponentIcon.js";import"../Drillstring/BHAComponentDetail/index.js";import"../Drillstring/BHATileIcon.js";import"../Drillstring/BHATile/BHATile.js";import"../Drillstring/BHAList/BHAList.js";import"../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../Casing/CasingTable/index.js";import"../Casing/CasingComponentIcon.js";import"../Casing/CasingTileIcon.js";import"../Casing/CasingTableV2/CasingTableV2.js";import"../Casing/CasingTile/CasingTile.js";import"../DisabledSettingsMessage/DisabledSettingsMessage.js";import"../WellSummary/WellSummaryItemLabel.js";import"../WellSummary/WellSummaryItemTitle.js";import"../WellSummary/WellSummaryItemValue.js";import"../WellSummary/ActivitySummaryChart.js";import"../WellSummary/FracWirelineTimeChart.js";import"../BICOffsetPickerDialog/index.js";import"../OffsetWellButton/OffsetWellButton.js";import"../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../OffsetWellPickerV3/index.js";import F from"../OffsetWellChips/Chip.js";import"../OffsetWellChips/ChipsContainer.js";import"../OffsetWellPickerV4/OffsetWellPickerV4.js";import"../OffsetWellMap/OffsetWellMap.js";import"@material-ui/core/Snackbar";import"../Notifications/Toast.js";import"../Toaster/Toaster.js";import"../ConfirmationDialog.js";import"../TextLink/index.js";import"../Avatar/index.js";import"../Template/TemplatePopover/index.js";import"../Template/TemplateSharingDialog/index.js";import"../MenuItem/index.js";import"../PadModeSelect/PadModeSelect.js";import"../PinnableFilters/PinnableFilters.js";import"../HeaderLayout/HeaderLayout.js";import"./PadOffsetsPicker.js";import"./OffsetAssetChip.js";import"./OffsetAssetsListExpander.js";import"../PadOffsetsPickerV2/PadOffsetsPickerV2.js";import"../Table/TableToolbar/TableToolbar.js";import"../Table/TableContainer/TableContainer.js";import"../Table/TableCell/TableCell.js";import"../Tooltip/ScrollableTooltip.js";import"../PriceInput/PriceInput.js";import"../LabelsCounter/LabelsCounter.js";import"../Stepper/Step.js";import"../Stepper/StepsWrapper.js";import"../Stepper/Stepper.js";import"../Comment/CommentIcon/index.js";import"../FilesLoader/FilesLoader.js";import"../FilesLoader/Icons/FileIcon.js";import"../SearchInput/index.js";import"../FeedItem/FeedItem.js";import"../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../PostInput/PostInput.js";import"../KeyboardDateTimePicker.js";import"../AddComment/Popover.js";import"../AddComment/Popup.js";import"../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../StageDesignVActual/ComparisonHeader.js";import"../StageDesignVActual/ComparisonRow.js";import"../EmbeddedApp/DevCenterEmbeddedApp.js";import"../EmbeddedApp/EmbeddedApp.js";import"../Autocomplete/Autocomplete.js";import"../DocumentViewer/DocumentViewer.js";import"../ColorPickerPalette/ColorPickerPalette.js";import"../Search/Search.js";import"../Search/components/Listbox.js";import"../Search/components/Paper.js";import"../Search/components/RecentSearches.js";import"../Search/components/InputAdornmentLeft.js";import"../Search/components/Groups.js";import"../StatusBadge/index.js";import"../Attachment/index.js";import"../EmojiIconButton.js";import"../FileUploadIconButton.js";import"../FilePreview/index.js";import"../FailedFileUploading.js";import"../UserMention/index.js";import"../CommentsInfo/index.js";import"../CommentInput/index.js";import"../Comment/index.js";import"../CommentLoader.js";import"../AssetNameLabel/AssetStatusBadge.js";import"../AssetEditorV2/components/PrimaryAssetSelect.js";import"../AssetEditorV2/components/SecondaryAssetSelect.js";import"../AssetEditorV2/components/SelectItem.js";import"../AssetEditorV2/components/MultipleAssetsToggle.js";function V(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function M(t){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?V(Object(o),!0).forEach((function(r){e(t,r,o[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):V(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var H=j({dialogPaper:{width:"75%",maxWidth:420}});var _={id:"stages",initial:"idle",context:{lastStageNumber:null,error:null},states:{idle:{on:{FETCH_STAGES:{target:"pending",action:function(e,t){var r=e.dispatch;O("corva","completion.wits",t,{limit:1,sort:"{timestamp:-1}"}).then((function(e){return d(e)?null:c(u(e),"stage_number",null)})).then((function(e){return r("SUCCESS",e)})).catch((function(e){throw new Error(e.message)}))}}}},pending:{on:{SUCCESS:{target:"success",beforeStateChange:function(e,t){return(0,e.updateContext)((function(e){return M(M({},e),{},{lastStageNumber:t})}))}},FAILURE:{target:"failure",beforeStateChange:function(e,t){throw new Error(t.message)}}}}}},G=function(r){var o,i,n,s,d=r.onSave,u=r.onDelete,j=r.offset,O=H(),V=a(_),G=V.state,N=V.dispatch,R=V.context,U=a((i=(o=j).stages,n=void 0===i?{}:i,{id:"dialog",initial:"closed",context:{selectedStages:void 0===(s=o.selectedStages)?[]:s,stagesData:n},states:{closed:{on:{OPEN_DIALOG:{target:"open"}}},open:{on:{CLOSE_DIALOG:{target:"closed"},SET_SELECTED_STAGES:{target:"open",beforeStateChange:function(t,r){return(0,t.updateContext)((function(t){return M(M({},t),{},{selectedStages:r,stagesData:r.reduce((function(t,r){return M(M({},t),{},e({},r,{lineStyle:"dotted",lineWidth:2}))}),{})})}))}},SET_SELECTED_LINE_STYLE:{target:"open",beforeStateChange:function(t,r){var o=t.updateContext,i=r.stage,n=r.selectedLineStyle;return o((function(t){return M(M({},t),{},{stagesData:M(M({},t.stagesData),{},e({},i,M(M({},t.stagesData[i]),{},{lineStyle:n})))})}))}},SET_SELECTED_LINE_WIDTH:{target:"open",beforeStateChange:function(t,r){var o=t.updateContext,i=r.stage,n=r.selectedLineWidth;return o((function(t){return M(M({},t),{},{stagesData:M(M({},t.stagesData),{},e({},i,M(M({},t.stagesData[i]),{},{lineWidth:Number(n)})))})}))}}}}}})),q=U.state,z=U.dispatch,Z=U.context,Y=function(e){return function(t){return z("SET_SELECTED_LINE_STYLE",{stage:e,selectedLineStyle:t.target.value})}},K=function(e){return function(t){return z("SET_SELECTED_LINE_WIDTH",{stage:e,selectedLineWidth:t.target.value})}},J=function(){return z("CLOSE_DIALOG")},Q=j.selectedWellId;t((function(){N("FETCH_STAGES",Q)}),[]);var X=p(R.lastStageNumber);return W(k,{children:[w(F,{title:j.selectedWellName,onClick:X?m:function(){return z("OPEN_DIALOG")},onRemoveOffsetWell:u,wellId:Q,rigName:""}),"success"===G&&W(C,{open:"open"===q,onBackdropClick:J,classes:{paper:O.dialogPaper},children:[w(g,{children:"Offset Well Stages"}),w(S,{children:W(A,{container:!0,direction:"column",spacing:16,children:[w(A,{item:!0,children:W(D,{margin:"normal",fullWidth:!0,required:!0,children:[w(h,{htmlFor:"stages-multi-select",children:"Stages"}),w(v,{inputProps:{name:"stages",id:"stages-multi-select"},value:Z.selectedStages,renderValue:function(e){return"".concat(e.length," stages selected")},onChange:function(e){return z("SET_SELECTED_STAGES",e.target.value)},multiple:!0,children:l(1,R.lastStageNumber+1).map((function(e){return W(b,{value:e,children:[w(f,{checked:Z.selectedStages.includes(e)}),w(E,{primary:e})]},e)}))})]})}),Z.selectedStages.sort((function(e,t){return e-t})).map((function(e){return W(A,{item:!0,children:[W(T,{variant:"subtitle1",children:["Stage ",e]}),W(D,{component:"fieldset",children:[w(P,{component:"legend",required:!0,children:"Line Style"}),W(x,{name:"line-style",value:c(Z,["stagesData",e,"lineStyle"],"dotted"),onChange:Y(e),row:!0,children:[w(I,{value:"dotted",control:w(y,{}),label:"Dotted"}),w(I,{value:"dashed",control:w(y,{}),label:"Dashed"}),w(I,{value:"solid",control:w(y,{}),label:"Solid"})]})]}),W(D,{component:"fieldset",children:[w(P,{component:"legend",required:!0,children:"Line Width"}),W(x,{name:"line-width",value:String(c(Z,["stagesData",e,"lineWidth"],"2")),onChange:K(e),row:!0,children:[w(I,{value:String(1),control:w(y,{}),label:"Thin"}),w(I,{value:String(2),control:w(y,{}),label:"Normal"}),w(I,{value:String(4),control:w(y,{}),label:"Thick"})]})]})]},e)}))]})}),W(L,{children:[w(B,{onClick:J,children:"Cancel"}),w(B,{variant:"contained",color:"primary",onClick:function(){var e=M(M({},j),{},{stages:Z.stagesData,selectedStages:Z.selectedStages});J(),d(e)},children:"Save"})]})]})]})};G.propTypes={onSave:r.isRequired,onDelete:r.isRequired,offset:o({selectedWellId:i,selectedWellName:n,selectedWellStatus:s(["active","idle","complete","paused","unknown"])}).isRequired};export{G as default};
@@ -0,0 +1,21 @@
1
+ export default PadOffsetsPickerV2;
2
+ declare function PadOffsetsPickerV2({ onSave, opened, currentOffsetSetting, assets, companyId, onClose, }: {
3
+ onSave: any;
4
+ opened: any;
5
+ currentOffsetSetting: any;
6
+ assets: any;
7
+ companyId: any;
8
+ onClose: any;
9
+ }): JSX.Element;
10
+ declare namespace PadOffsetsPickerV2 {
11
+ namespace propTypes {
12
+ const opened: PropTypes.Validator<boolean>;
13
+ const currentOffsetSetting: PropTypes.Validator<PropTypes.InferProps<{}>[]>;
14
+ const onSave: PropTypes.Validator<(...args: any[]) => any>;
15
+ const onClose: PropTypes.Validator<(...args: any[]) => any>;
16
+ const companyId: PropTypes.Validator<string>;
17
+ const assets: PropTypes.Validator<PropTypes.InferProps<{}>[]>;
18
+ }
19
+ }
20
+ import PropTypes from "prop-types";
21
+ //# sourceMappingURL=PadOffsetsPickerV2.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PadOffsetsPickerV2.d.ts","sourceRoot":"","sources":["../../../src/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js"],"names":[],"mappings":";AAyBA;;;;;;;gBAqIC"}
@@ -0,0 +1 @@
1
+ import e from"@babel/runtime/helpers/defineProperty";import t from"prop-types";import{isEmpty as r}from"lodash";import{makeStyles as o,Button as i,FormControl as s,InputLabel as n,Select as p,MenuItem as a,Checkbox as m,ListItemText as l}from"@material-ui/core";import d from"../Modal/Modal.js";import"../IconMenu/index.js";import"../StyledMenuItem/index.js";import"../AppIcon/AppIcon.js";import"../DevCenter/AppHeader/AppHeader.js";import"../DevCenter/AppSideBar/AppSideBar.js";import"../DevCenter/AppsDataProvider/AppsDataProvider.js";import"@babel/runtime/helpers/slicedToArray";import"react";import"classnames";import"@material-ui/icons";import"../Icons/AnnotationIcon.js";import"../Annotations/components/AnnotationsList/index.js";import"../Annotations/components/LastAnnotation/index.js";import"../Annotations/AnnotationsContext.js";import"../../utils/mobileDetect.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"../../clients/jsonApi/index.js";import"../../clients/subscriptions.js";import"../../constants/goals.js";import"../../constants/segment.js";import"../../constants/alerts.js";import"../../constants/apps.js";import"../../constants/drillstring.js";import"../../constants/completion.js";import"../../constants/notifications.js";import"../../constants/feed.js";import"../../constants/bha.js";import"../../utils/env.js";import"../GradientManager/configuration/constants.js";import"../../utils/index.js";import"uuid";import"jsona";import"../StatusBadge/constants.js";import"@babel/runtime/helpers/toConsumableArray";import"lodash/set";import"lodash/get";import"lodash/unset";import"moment";import"../../clients/api/apiCore.js";import"../../clients/constants.js";import"../HelpCenter/HelpCenterIcon.js";import"../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import{jsx as c,Fragment as j,jsxs as u}from"react/jsx-runtime";import"../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../DevCenter/DevCenterAppContainer/components/AppSettingsDialogV2/AppSettingsDialog.js";import"../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../DevCenter/AppContext.js";import"../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"@babel/runtime/helpers/objectWithoutProperties";import"react-router";import"rollbar";import"@rollbar/react";import"../DevCenter/NavigationBar/NavigationBar.js";import"../DevCenter/SideBar/SideBar.js";import"../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../DevCenter/AppFilterPanelLayout/AppFilterPanelLayout.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../AssetEditor/index.js";import"../AssetEditorV2/index.js";import"../AppVersionsSelect/AppVersionsSelect.js";import"../LoadingIndicator/LoadingIndicator.js";import"../Typography.js";import"../RealTimeValuesSidebar/RealTimeSidebar.js";import"../CollapsableSidebar.js";import"../DateTimePicker/index.js";import"../DatePicker/index.js";import"../ErrorBoundary/ErrorBoundary.js";import"../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../SlateFormattedText/SlateFormattedText.js";import"../SlateFormattedText/RenderElements.js";import"@babel/runtime/helpers/typeof";import"slate";import"../EmptyState/EmptyState.js";import"../ParameterCharts/ParameterCharts.js";import"../ParameterCharts/AddEditTrack.js";import"../ChartActionsList/ChartActionsList.js";import"../CopyToClipboard/CopyToClipboard.js";import"../AssetEditor/AssetEditorAutocomplete.js";import"../AssetEditor/SingleAssetEditor.js";import"../SettingEditors/ColorEditor/index.js";import"../SettingEditors/DropdownEditor/index.js";import"../SettingEditors/RadioEditor/index.js";import"../SwitchControl/index.js";import"../ColorPicker/ColorPicker.js";import"../Chart/components/ChartButton.js";import"../Chart/components/ChartButtons.js";import"../Chart/components/ChartWrapper.js";import"../Chart/components/AxisDropdown.js";import"../Chart/components/ChartSelect.js";import"../Chart/components/buttons/DragToZoomButton.js";import"../Chart/components/buttons/ZoomInButton.js";import"../Chart/components/buttons/ZoomOutButton.js";import"../Chart/components/buttons/PanButton.js";import"../Chart/components/buttons/ResetZoomButton.js";import"../Chart/components/buttons/HideAxesButton.js";import"../Chart/components/buttons/ChartTypeButton.js";import"../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../TruncatedText/index.js";import"../RangeSlider/RangeSlider.js";import"../AdvancedSlider/AdvancedSlider.js";import"../Breadcrumbs/index.js";import"../VirtualizedTable/index.js";import"../EmptyView/EmptyView.js";import"../EmptyView/EmptyAppView/EmptyAppView.js";import"../Button/index.js";import"../ContextMenuItem/index.js";import"../FolderMenuItem/index.js";import"../EditableItem/EditableItem/index.js";import"../EditableItem/EditableItemWithBadge/index.js";import"../Checkbox/index.js";import"../FolderMenuItemWithLinks/index.js";import"../IconButton/index.js";import"../TextField/index.js";import"../Chip/index.js";import"../Counter/index.js";import"../AnchorsList/AnchorsList.js";import"../Select/index.js";import"../Select/SelectFilterBy.js";import"../CustomSelect/index.js";import"../Tabs/Tabs.js";import"../Tabs/Tab.js";import"../ResizableTable/ResizableTable.js";import"@material-ui/icons/Check";import"@material-ui/icons/Close";import"@material-ui/icons/Edit";import"@material-ui/icons/Delete";import"../GradientManager/GradientList.js";import"@material-ui/icons/AddCircle";import"../GradientManager/GradientPreview/GradientPreview.js";import"../GradientManager/GradientSelect.styles.js";import"../GradientPicker/GradientPicker.js";import"../GradientManager/GradientManager.styles.js";import"../Drillstring/BHASchematic.js";import"../Drillstring/BHATable/index.js";import"../Drillstring/BHAComponentIcon.js";import"../Drillstring/BHAComponentDetail/index.js";import"../Drillstring/BHATileIcon.js";import"../Drillstring/BHATile/BHATile.js";import"../Drillstring/BHAList/BHAList.js";import"../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../Casing/CasingTable/index.js";import"../Casing/CasingComponentIcon.js";import"../Casing/CasingTileIcon.js";import"../Casing/CasingTableV2/CasingTableV2.js";import"../Casing/CasingTile/CasingTile.js";import"../DisabledSettingsMessage/DisabledSettingsMessage.js";import"../WellSummary/WellSummaryItemLabel.js";import"../WellSummary/WellSummaryItemTitle.js";import"../WellSummary/WellSummaryItemValue.js";import"../WellSummary/ActivitySummaryChart.js";import"../WellSummary/FracWirelineTimeChart.js";import"../BICOffsetPickerDialog/index.js";import"../OffsetWellButton/OffsetWellButton.js";import"../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../OffsetWellPickerV3/index.js";import"../OffsetWellChips/Chip.js";import"../OffsetWellChips/ChipsContainer.js";import"../OffsetWellPickerV4/OffsetWellPickerV4.js";import"../OffsetWellMap/OffsetWellMap.js";import"@material-ui/core/Snackbar";import"../Notifications/Toast.js";import"../Toaster/Toaster.js";import"../ConfirmationDialog.js";import"../TextLink/index.js";import"../Avatar/index.js";import"../Template/TemplatePopover/index.js";import"../Template/TemplateSharingDialog/index.js";import"../MenuItem/index.js";import"../PadModeSelect/PadModeSelect.js";import"../PinnableFilters/PinnableFilters.js";import"../HeaderLayout/HeaderLayout.js";import"../PadOffsetsPicker/PadOffsetsPicker.js";import"../PadOffsetsPicker/OffsetAssetChip.js";import"../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../PadOffsetsPicker/StagesSelector.js";import"../Table/TableToolbar/TableToolbar.js";import"../Table/TableContainer/TableContainer.js";import"../Table/TableCell/TableCell.js";import"../Tooltip/ScrollableTooltip.js";import"../PriceInput/PriceInput.js";import"../LabelsCounter/LabelsCounter.js";import"../Stepper/Step.js";import"../Stepper/StepsWrapper.js";import"../Stepper/Stepper.js";import"../Comment/CommentIcon/index.js";import"../FilesLoader/FilesLoader.js";import"../FilesLoader/Icons/FileIcon.js";import"../SearchInput/index.js";import"../FeedItem/FeedItem.js";import"../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../PostInput/PostInput.js";import"../KeyboardDateTimePicker.js";import"../AddComment/Popover.js";import"../AddComment/Popup.js";import"../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../StageDesignVActual/ComparisonHeader.js";import"../StageDesignVActual/ComparisonRow.js";import"../EmbeddedApp/DevCenterEmbeddedApp.js";import"../EmbeddedApp/EmbeddedApp.js";import"../Autocomplete/Autocomplete.js";import"../DocumentViewer/DocumentViewer.js";import"../ColorPickerPalette/ColorPickerPalette.js";import"../Search/Search.js";import"../Search/components/Listbox.js";import"../Search/components/Paper.js";import"../Search/components/RecentSearches.js";import"../Search/components/InputAdornmentLeft.js";import"../Search/components/Groups.js";import"../StatusBadge/index.js";import"../Attachment/index.js";import"../EmojiIconButton.js";import"../FileUploadIconButton.js";import"../FilePreview/index.js";import"../FailedFileUploading.js";import"../UserMention/index.js";import"../CommentsInfo/index.js";import"../CommentInput/index.js";import"../Comment/index.js";import"../CommentLoader.js";import"../AssetNameLabel/AssetStatusBadge.js";import"../AssetEditorV2/components/PrimaryAssetSelect.js";import"../AssetEditorV2/components/SecondaryAssetSelect.js";import"../AssetEditorV2/components/SelectItem.js";import"../AssetEditorV2/components/MultipleAssetsToggle.js";import{useDialogState as C}from"./useDialogState.js";function A(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function g(t){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?A(Object(o),!0).forEach((function(r){e(t,r,o[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):A(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var b=o({cancelButton:{marginLeft:"auto",marginRight:16}}),D=function(e){var t=e.onSave,o=e.opened,A=e.currentOffsetSetting,D=e.assets,f=e.companyId,v=e.onClose,h=b(),S=C({opened:o,companyId:f,currentOffsetSetting:A,assets:D}),P=S.requestState,I=S.dialogState,x=S.setDialogState,y=function(){x((function(e){return g(g({},e),{},{status:"closed"})})),v()},T=new Set(D.map((function(e){return Number(e.asset_id)})));return c(j,{children:"success"===P.status&&u(d,{open:"open"===I.status,onClose:y,title:"Offset Wells",size:"small",actions:u(j,{children:[c(i,{onClick:y,className:h.cancelButton,children:"Cancel"}),c(i,{variant:"contained",color:"primary",disabled:r(I.selectedWellIds),onClick:function(){var e=P.wellsData.filter((function(e){return I.selectedWellIds.includes(e.asset_id)})).map((function(e){var t=A.find((function(t){return t.selectedWellId===Number(e.asset_id)}));return t||{selectedWellId:Number(e.asset_id),selectedWellName:e.name,selectedWellStatus:e.status,selectedStages:[],stages:{}}}));y(),t(e)},children:"Save"})]}),children:[u(s,{margin:"normal",fullWidth:!0,required:!0,children:[c(n,{htmlFor:"pad-select",shrink:!r(I.selectedPadIds),children:"Pad"}),c(p,{multiple:!0,inputProps:{name:"pads",id:"pad-select"},value:I.selectedPadIds,onChange:function(e){x((function(t){return g(g({},t),{},{selectedPadIds:e.target.value})}))},renderValue:function(e){return"".concat(e.length," selected")},children:P.padsData.map((function(e){return u(a,{value:e.id,children:[c(m,{checked:I.selectedPadIds.includes(e.id)}),c(l,{primary:e.name})]},e.id)}))})]}),u(s,{margin:"normal",disabled:r(I.selectedPadIds),fullWidth:!0,required:!0,children:[c(n,{htmlFor:"wells",shrink:!r(I.selectedWellIds),children:"Well"}),c(p,{multiple:!0,inputProps:{name:"wells",id:"well-select"},value:I.selectedWellIds,onChange:function(e){x((function(t){return g(g({},t),{},{selectedWellIds:e.target.value})}))},renderValue:function(e){return"".concat(e.length," selected")},children:P.wellsData.map((function(e){var t=T.has(e.asset_id);return u(a,{value:e.asset_id,disabled:t,children:[c(m,{checked:I.selectedWellIds.includes(e.asset_id)}),c(l,{primary:e.name})]},e.id)}))})]})]})})};D.propTypes={opened:t.bool.isRequired,currentOffsetSetting:t.arrayOf(t.shape({})).isRequired,onSave:t.func.isRequired,onClose:t.func.isRequired,companyId:t.string.isRequired,assets:t.arrayOf(t.shape({})).isRequired};export{D as default};
@@ -0,0 +1,2 @@
1
+ export { default } from "./PadOffsetsPickerV2";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/PadOffsetsPickerV2/index.js"],"names":[],"mappings":""}
@@ -0,0 +1,19 @@
1
+ export function useDialogState({ opened, companyId, currentOffsetSetting, assets }: {
2
+ opened: any;
3
+ companyId: any;
4
+ currentOffsetSetting: any;
5
+ assets: any;
6
+ }): {
7
+ requestState: any;
8
+ dialogState: {
9
+ selectedPadIds: any[];
10
+ selectedWellIds: any[];
11
+ status: string;
12
+ };
13
+ setDialogState: import("react").Dispatch<import("react").SetStateAction<{
14
+ selectedPadIds: any[];
15
+ selectedWellIds: any[];
16
+ status: string;
17
+ }>>;
18
+ };
19
+ //# sourceMappingURL=useDialogState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDialogState.d.ts","sourceRoot":"","sources":["../../../src/components/PadOffsetsPickerV2/useDialogState.js"],"names":[],"mappings":"AAwDA;;;;;;;;;;;;;;;;;EA+DC"}
@@ -0,0 +1 @@
1
+ import e from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/defineProperty";import{useReducer as r,useState as a,useMemo as n,useEffect as s}from"react";import{isEmpty as c,get as o}from"lodash";import d from"jsona";import{getPads as i}from"../../clients/jsonApi/index.js";function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function l(e){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?u(Object(a),!0).forEach((function(r){t(e,r,a[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):u(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var p=new d,f={status:"idle",padsData:[],wellsData:[],lastStage:[],error:null,companyId:0,selectedPadsData:[]};function S(e,t){switch(t.type){case"FETCH_PADS":return l(l({},e),{},{status:"pending",target:"FETCH_PADS"});case"PADS_REQUEST_SUCCESS":return l(l({},e),{},{status:"success",target:"",padsData:t.filteredPads});case"GET_WELLS":return l(l({},e),{},{status:"success",target:"GET_WELLS"});case"WELLS_REQUEST_SUCCESS":return l(l({},e),{},{status:"success",target:"",wellsData:t.wellsData});case"FAILURE":return l(l({},e),{},{status:"failure",error:t.error});default:throw new Error("Unhandled action type: ".concat(t.type))}}function E(t){var d=t.opened,u=t.companyId,E=t.currentOffsetSetting,m=t.assets,y=r(S,f),P=e(y,2),D=P[0],h=P[1],g=a({selectedPadIds:[],selectedWellIds:[],status:"closed"}),_=e(g,2),b=_[0],w=_[1],O=n((function(){return c(E)&&!c(m)?m.map((function(e){return e.asset_id})):E.map((function(e){return e.selectedWellId}))}),[E,m]);return s((function(){D.companyId=u,h({type:"FETCH_PADS"})}),[]),s((function(){var e;"FETCH_PADS"===D.target?function(e){var t=e.dispatch,r=e.companyId;i({fields:["pad.name","pad.wells"],sort:"name",per_page:1e3,company:r}).then((function(e){return p.deserialize(e)})).then((function(e){return e.filter((function(e){return!c(o(e,"wells"))}))})).then((function(e){return t({type:"PADS_REQUEST_SUCCESS",filteredPads:e})})).catch((function(e){return t({type:"FAILURE",error:e})}))}({dispatch:h,companyId:D.companyId}):"GET_WELLS"===D.target&&(0,(e={dispatch:h,selectedPadsData:D.selectedPadsData}).dispatch)({type:"WELLS_REQUEST_SUCCESS",wellsData:e.selectedPadsData.reduce((function(e,t){return e.concat(t.wells)}),[])})}),[D.target]),s((function(){if(!c(b.selectedPadIds)){var e=D.padsData.filter((function(e){return b.selectedPadIds.includes(e.id)}));D.selectedPadsData=e,h({type:"GET_WELLS"})}}),[b.selectedPadIds]),s((function(){if(d){var e=[];c(O)||D.padsData.forEach((function(t){t.wells.forEach((function(r){O.includes(r.asset_id)&&!e.includes(t.id)&&e.push(t.id)}))})),w((function(t){return l(l({},t),{},{selectedPadIds:e,selectedWellIds:O,status:"open"})}))}}),[d]),{requestState:D,dialogState:b,setDialogState:w}}export{E as useDialogState};
@@ -1 +1 @@
1
- import{__assign as e}from'./../../../ext-esm/tslib/tslib.es6.js';import{jsx as t,Fragment as o,jsxs as r}from"react/jsx-runtime";import{memo as i,useContext as n}from"react";import s from"react-draggable-list";import{makeStyles as p}from"@material-ui/core";import{Add as m}from"@material-ui/icons";import"../../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../../DevCenter/DevCenterAppContainer/components/AppSettingsDialogV2/AppSettingsDialog.js";import"../../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../../DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.js";import"../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../Modal/CorvaModal.js";import"uuid";import"../../IconMenu/index.js";import"../../StyledMenuItem/index.js";import"../../AppIcon/AppIcon.js";import"../../DevCenter/AppHeader/AppHeader.js";import"../../DevCenter/AppSideBar/AppSideBar.js";import"../../DevCenter/AppsDataProvider/AppsDataProvider.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/slicedToArray";import"classnames";import"lodash";import"../../Icons/AnnotationIcon.js";import"../../Annotations/components/AnnotationsList/index.js";import"../../Annotations/components/LastAnnotation/index.js";import"../../Annotations/AnnotationsContext.js";import"../../../utils/mobileDetect.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"../../../clients/jsonApi/index.js";import"../../../clients/subscriptions.js";import"../../../constants/goals.js";import"../../../constants/segment.js";import"../../../constants/alerts.js";import"../../../constants/apps.js";import"../../../constants/drillstring.js";import"../../../constants/completion.js";import"../../../constants/notifications.js";import"../../../constants/feed.js";import"../../../constants/bha.js";import"../../../utils/env.js";import"../../GradientManager/configuration/constants.js";import"../../../utils/index.js";import"jsona";import"../../StatusBadge/constants.js";import"@babel/runtime/helpers/toConsumableArray";import"lodash/set";import"lodash/get";import"lodash/unset";import"moment";import"../../../clients/api/apiCore.js";import"../../../clients/constants.js";import"../../HelpCenter/HelpCenterIcon.js";import"../../DevCenter/AppContext.js";import"../../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"@babel/runtime/helpers/objectWithoutProperties";import"react-router";import"rollbar";import"@rollbar/react";import"../../DevCenter/NavigationBar/NavigationBar.js";import"../../DevCenter/SideBar/SideBar.js";import"../../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../../DevCenter/AppFilterPanelLayout/AppFilterPanelLayout.js";import"../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../../AssetEditor/index.js";import"../../AssetEditorV2/index.js";import"../../AppVersionsSelect/AppVersionsSelect.js";import"../../LoadingIndicator/LoadingIndicator.js";import"../../Typography.js";import"../RealTimeSidebar.js";import"../../CollapsableSidebar.js";import"../../DateTimePicker/index.js";import"../../DatePicker/index.js";import"../../ErrorBoundary/ErrorBoundary.js";import"../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../SlateFormattedText/SlateFormattedText.js";import"../../SlateFormattedText/RenderElements.js";import"@babel/runtime/helpers/typeof";import"slate";import"../../EmptyState/EmptyState.js";import"../../ParameterCharts/ParameterCharts.js";import"../../ParameterCharts/AddEditTrack.js";import"../../ChartActionsList/ChartActionsList.js";import"../../CopyToClipboard/CopyToClipboard.js";import"../../AssetEditor/AssetEditorAutocomplete.js";import"../../AssetEditor/SingleAssetEditor.js";import"../../SettingEditors/ColorEditor/index.js";import"../../SettingEditors/DropdownEditor/index.js";import"../../SettingEditors/RadioEditor/index.js";import"../../SwitchControl/index.js";import"../../ColorPicker/ColorPicker.js";import"../../Chart/components/ChartButton.js";import"../../Chart/components/ChartButtons.js";import"../../Chart/components/ChartWrapper.js";import"../../Chart/components/AxisDropdown.js";import"../../Chart/components/ChartSelect.js";import"../../Chart/components/buttons/DragToZoomButton.js";import"../../Chart/components/buttons/ZoomInButton.js";import"../../Chart/components/buttons/ZoomOutButton.js";import"../../Chart/components/buttons/PanButton.js";import"../../Chart/components/buttons/ResetZoomButton.js";import"../../Chart/components/buttons/HideAxesButton.js";import"../../Chart/components/buttons/ChartTypeButton.js";import"../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../TruncatedText/index.js";import"../../RangeSlider/RangeSlider.js";import"../../AdvancedSlider/AdvancedSlider.js";import"../../Breadcrumbs/index.js";import"../../VirtualizedTable/index.js";import"../../EmptyView/EmptyView.js";import"../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../Button/index.js";import"../../ContextMenuItem/index.js";import"../../FolderMenuItem/index.js";import"../../EditableItem/EditableItem/index.js";import"../../EditableItem/EditableItemWithBadge/index.js";import"../../Checkbox/index.js";import"../../FolderMenuItemWithLinks/index.js";import a from"../../IconButton/index.js";import"../../TextField/index.js";import"../../Chip/index.js";import"../../Counter/index.js";import"../../AnchorsList/AnchorsList.js";import"../../Select/index.js";import"../../Select/SelectFilterBy.js";import"../../CustomSelect/index.js";import"../../Tabs/Tabs.js";import"../../Tabs/Tab.js";import"../../ResizableTable/ResizableTable.js";import"@material-ui/icons/Check";import"@material-ui/icons/Close";import"@material-ui/icons/Edit";import"@material-ui/icons/Delete";import"../../GradientManager/GradientList.js";import"@material-ui/icons/AddCircle";import"../../GradientManager/GradientPreview/GradientPreview.js";import"../../GradientManager/GradientSelect.styles.js";import"../../GradientPicker/GradientPicker.js";import"../../GradientManager/GradientManager.styles.js";import"../../Drillstring/BHASchematic.js";import"../../Drillstring/BHATable/index.js";import"../../Drillstring/BHAComponentIcon.js";import"../../Drillstring/BHAComponentDetail/index.js";import"../../Drillstring/BHATileIcon.js";import"../../Drillstring/BHATile/BHATile.js";import"../../Drillstring/BHAList/BHAList.js";import"../../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../../Casing/CasingTable/index.js";import"../../Casing/CasingComponentIcon.js";import"../../Casing/CasingTileIcon.js";import"../../Casing/CasingTableV2/CasingTableV2.js";import"../../Casing/CasingTile/CasingTile.js";import"../../DisabledSettingsMessage/DisabledSettingsMessage.js";import"../../WellSummary/WellSummaryItemLabel.js";import"../../WellSummary/WellSummaryItemTitle.js";import"../../WellSummary/WellSummaryItemValue.js";import"../../WellSummary/ActivitySummaryChart.js";import"../../WellSummary/FracWirelineTimeChart.js";import"../../BICOffsetPickerDialog/index.js";import"../../OffsetWellButton/OffsetWellButton.js";import"../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../OffsetWellPickerV3/index.js";import"../../OffsetWellChips/Chip.js";import"../../OffsetWellChips/ChipsContainer.js";import"../../OffsetWellPickerV4/OffsetWellPickerV4.js";import"../../OffsetWellMap/OffsetWellMap.js";import"@material-ui/core/Snackbar";import"../../Notifications/Toast.js";import"../../Toaster/Toaster.js";import"../../ConfirmationDialog.js";import"../../TextLink/index.js";import"../../Avatar/index.js";import"../../Template/TemplatePopover/index.js";import"../../Template/TemplateSharingDialog/index.js";import"../../MenuItem/index.js";import"../../PadModeSelect/PadModeSelect.js";import"../../PinnableFilters/PinnableFilters.js";import"../../HeaderLayout/HeaderLayout.js";import"../../PadOffsetsPicker/PadOffsetsPicker.js";import"../../PadOffsetsPicker/OffsetAssetChip.js";import"../../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../../PadOffsetsPicker/StagesSelector.js";import"../../Table/TableToolbar/TableToolbar.js";import"../../Table/TableContainer/TableContainer.js";import"../../Table/TableCell/TableCell.js";import"../../Tooltip/ScrollableTooltip.js";import"../../PriceInput/PriceInput.js";import"../../LabelsCounter/LabelsCounter.js";import"../../Stepper/Step.js";import"../../Stepper/StepsWrapper.js";import"../../Stepper/Stepper.js";import"../../Comment/CommentIcon/index.js";import"../../FilesLoader/FilesLoader.js";import"../../FilesLoader/Icons/FileIcon.js";import"../../SearchInput/index.js";import"../../FeedItem/FeedItem.js";import"../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../../PostInput/PostInput.js";import"../../KeyboardDateTimePicker.js";import"../../AddComment/Popover.js";import"../../AddComment/Popup.js";import"../../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../../StageDesignVActual/ComparisonHeader.js";import"../../StageDesignVActual/ComparisonRow.js";import"../../EmbeddedApp/DevCenterEmbeddedApp.js";import"../../EmbeddedApp/EmbeddedApp.js";import"../../Autocomplete/Autocomplete.js";import"../../DocumentViewer/DocumentViewer.js";import"../../ColorPickerPalette/ColorPickerPalette.js";import"../../Search/Search.js";import"../../Search/components/Listbox.js";import"../../Search/components/Paper.js";import"../../Search/components/RecentSearches.js";import"../../Search/components/InputAdornmentLeft.js";import"../../Search/components/Groups.js";import"../../StatusBadge/index.js";import"../../Attachment/index.js";import"../../EmojiIconButton.js";import"../../FileUploadIconButton.js";import"../../FilePreview/index.js";import"../../FailedFileUploading.js";import"../../UserMention/index.js";import"../../CommentsInfo/index.js";import"../../CommentInput/index.js";import"../../Comment/index.js";import"../../CommentLoader.js";import"../../AssetNameLabel/AssetStatusBadge.js";import"../../AssetEditorV2/components/PrimaryAssetSelect.js";import"../../AssetEditorV2/components/SecondaryAssetSelect.js";import"../../AssetEditorV2/components/SelectItem.js";import"../../AssetEditorV2/components/MultipleAssetsToggle.js";import l from"./RealTimeBox.js";import d from"../RealTimeSidebarContext.js";import{ORIENTATIONS as j}from"../enums.js";var c=p((function(){return{boxListVertical:{padding:"10px 0 16px",overflowX:"hidden"},rtBoxListHorizontal:{display:"flex",flexWrap:"wrap"},cTpRtBoxAddButtonContainer:{marginTop:8,textAlign:"center"}}}));var C=i((function(i){var p=i.sourceArray,C=i.findSource,u=c(),A=n(d),g=A.onAppSettingChange,D=A.appSettings,v=A.assetKey,b=A.orientation,S=A.realTimeTypes,x=A.setting,P=A.handleOpenCloseDialog;return t(o,{children:b===j.vertical?r("div",e({className:u.boxListVertical},{children:[t(s,{list:p,itemKey:function(e){return e.key},template:l,padding:0,unsetZIndex:!0,container:function(){return document.body},onMoveEnd:function(t){var o,r=t.map((function(e){return e.key}));g("rtValuesSetting",e(e({},D.rtValuesSetting),((o={})[v]=r,o)))}}),t("div",e({className:u.cTpRtBoxAddButtonContainer},{children:t(a,e({color:"primary",tooltipProps:{title:"Add"},onClick:P},{children:t(m,{})}))}))]})):t("div",e({className:u.rtBoxListHorizontal},{children:x.map((function(e){return t(l,{isDraggable:!1,item:C(e,S)},"".concat(e))}))}))})}));export{C as default};
1
+ import{__assign as e}from'./../../../ext-esm/tslib/tslib.es6.js';import{jsx as t,Fragment as r,jsxs as o}from"react/jsx-runtime";import{memo as i,useContext as n}from"react";import s from"react-draggable-list";import{makeStyles as p}from"@material-ui/core";import{Add as m}from"@material-ui/icons";import"../../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../../DevCenter/DevCenterAppContainer/components/AppSettingsDialogV2/AppSettingsDialog.js";import"../../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../../DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.js";import"../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../Modal/CorvaModal.js";import"uuid";import"../../IconMenu/index.js";import"../../StyledMenuItem/index.js";import"../../AppIcon/AppIcon.js";import"../../DevCenter/AppHeader/AppHeader.js";import"../../DevCenter/AppSideBar/AppSideBar.js";import"../../DevCenter/AppsDataProvider/AppsDataProvider.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/slicedToArray";import"classnames";import"lodash";import"../../Icons/AnnotationIcon.js";import"../../Annotations/components/AnnotationsList/index.js";import"../../Annotations/components/LastAnnotation/index.js";import"../../Annotations/AnnotationsContext.js";import"../../../utils/mobileDetect.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"../../../clients/jsonApi/index.js";import"../../../clients/subscriptions.js";import"../../../constants/goals.js";import"../../../constants/segment.js";import"../../../constants/alerts.js";import"../../../constants/apps.js";import"../../../constants/drillstring.js";import"../../../constants/completion.js";import"../../../constants/notifications.js";import"../../../constants/feed.js";import"../../../constants/bha.js";import"../../../utils/env.js";import"../../GradientManager/configuration/constants.js";import"../../../utils/index.js";import"jsona";import"../../StatusBadge/constants.js";import"@babel/runtime/helpers/toConsumableArray";import"lodash/set";import"lodash/get";import"lodash/unset";import"moment";import"../../../clients/api/apiCore.js";import"../../../clients/constants.js";import"../../HelpCenter/HelpCenterIcon.js";import"../../DevCenter/AppContext.js";import"../../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"@babel/runtime/helpers/objectWithoutProperties";import"react-router";import"rollbar";import"@rollbar/react";import"../../DevCenter/NavigationBar/NavigationBar.js";import"../../DevCenter/SideBar/SideBar.js";import"../../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../../DevCenter/AppFilterPanelLayout/AppFilterPanelLayout.js";import"../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../../AssetEditor/index.js";import"../../AssetEditorV2/index.js";import"../../AppVersionsSelect/AppVersionsSelect.js";import"../../LoadingIndicator/LoadingIndicator.js";import"../../Typography.js";import"../RealTimeSidebar.js";import"../../CollapsableSidebar.js";import"../../DateTimePicker/index.js";import"../../DatePicker/index.js";import"../../ErrorBoundary/ErrorBoundary.js";import"../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../SlateFormattedText/SlateFormattedText.js";import"../../SlateFormattedText/RenderElements.js";import"@babel/runtime/helpers/typeof";import"slate";import"../../EmptyState/EmptyState.js";import"../../ParameterCharts/ParameterCharts.js";import"../../ParameterCharts/AddEditTrack.js";import"../../ChartActionsList/ChartActionsList.js";import"../../CopyToClipboard/CopyToClipboard.js";import"../../AssetEditor/AssetEditorAutocomplete.js";import"../../AssetEditor/SingleAssetEditor.js";import"../../SettingEditors/ColorEditor/index.js";import"../../SettingEditors/DropdownEditor/index.js";import"../../SettingEditors/RadioEditor/index.js";import"../../SwitchControl/index.js";import"../../ColorPicker/ColorPicker.js";import"../../Chart/components/ChartButton.js";import"../../Chart/components/ChartButtons.js";import"../../Chart/components/ChartWrapper.js";import"../../Chart/components/AxisDropdown.js";import"../../Chart/components/ChartSelect.js";import"../../Chart/components/buttons/DragToZoomButton.js";import"../../Chart/components/buttons/ZoomInButton.js";import"../../Chart/components/buttons/ZoomOutButton.js";import"../../Chart/components/buttons/PanButton.js";import"../../Chart/components/buttons/ResetZoomButton.js";import"../../Chart/components/buttons/HideAxesButton.js";import"../../Chart/components/buttons/ChartTypeButton.js";import"../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../TruncatedText/index.js";import"../../RangeSlider/RangeSlider.js";import"../../AdvancedSlider/AdvancedSlider.js";import"../../Breadcrumbs/index.js";import"../../VirtualizedTable/index.js";import"../../EmptyView/EmptyView.js";import"../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../Button/index.js";import"../../ContextMenuItem/index.js";import"../../FolderMenuItem/index.js";import"../../EditableItem/EditableItem/index.js";import"../../EditableItem/EditableItemWithBadge/index.js";import"../../Checkbox/index.js";import"../../FolderMenuItemWithLinks/index.js";import a from"../../IconButton/index.js";import"../../TextField/index.js";import"../../Chip/index.js";import"../../Counter/index.js";import"../../AnchorsList/AnchorsList.js";import"../../Select/index.js";import"../../Select/SelectFilterBy.js";import"../../CustomSelect/index.js";import"../../Tabs/Tabs.js";import"../../Tabs/Tab.js";import"../../ResizableTable/ResizableTable.js";import"@material-ui/icons/Check";import"@material-ui/icons/Close";import"@material-ui/icons/Edit";import"@material-ui/icons/Delete";import"../../GradientManager/GradientList.js";import"@material-ui/icons/AddCircle";import"../../GradientManager/GradientPreview/GradientPreview.js";import"../../GradientManager/GradientSelect.styles.js";import"../../GradientPicker/GradientPicker.js";import"../../GradientManager/GradientManager.styles.js";import"../../Drillstring/BHASchematic.js";import"../../Drillstring/BHATable/index.js";import"../../Drillstring/BHAComponentIcon.js";import"../../Drillstring/BHAComponentDetail/index.js";import"../../Drillstring/BHATileIcon.js";import"../../Drillstring/BHATile/BHATile.js";import"../../Drillstring/BHAList/BHAList.js";import"../../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../../Casing/CasingTable/index.js";import"../../Casing/CasingComponentIcon.js";import"../../Casing/CasingTileIcon.js";import"../../Casing/CasingTableV2/CasingTableV2.js";import"../../Casing/CasingTile/CasingTile.js";import"../../DisabledSettingsMessage/DisabledSettingsMessage.js";import"../../WellSummary/WellSummaryItemLabel.js";import"../../WellSummary/WellSummaryItemTitle.js";import"../../WellSummary/WellSummaryItemValue.js";import"../../WellSummary/ActivitySummaryChart.js";import"../../WellSummary/FracWirelineTimeChart.js";import"../../BICOffsetPickerDialog/index.js";import"../../OffsetWellButton/OffsetWellButton.js";import"../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../OffsetWellPickerV3/index.js";import"../../OffsetWellChips/Chip.js";import"../../OffsetWellChips/ChipsContainer.js";import"../../OffsetWellPickerV4/OffsetWellPickerV4.js";import"../../OffsetWellMap/OffsetWellMap.js";import"@material-ui/core/Snackbar";import"../../Notifications/Toast.js";import"../../Toaster/Toaster.js";import"../../ConfirmationDialog.js";import"../../TextLink/index.js";import"../../Avatar/index.js";import"../../Template/TemplatePopover/index.js";import"../../Template/TemplateSharingDialog/index.js";import"../../MenuItem/index.js";import"../../PadModeSelect/PadModeSelect.js";import"../../PinnableFilters/PinnableFilters.js";import"../../HeaderLayout/HeaderLayout.js";import"../../PadOffsetsPicker/PadOffsetsPicker.js";import"../../PadOffsetsPicker/OffsetAssetChip.js";import"../../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../../PadOffsetsPicker/StagesSelector.js";import"../../PadOffsetsPickerV2/PadOffsetsPickerV2.js";import"../../Table/TableToolbar/TableToolbar.js";import"../../Table/TableContainer/TableContainer.js";import"../../Table/TableCell/TableCell.js";import"../../Tooltip/ScrollableTooltip.js";import"../../PriceInput/PriceInput.js";import"../../LabelsCounter/LabelsCounter.js";import"../../Stepper/Step.js";import"../../Stepper/StepsWrapper.js";import"../../Stepper/Stepper.js";import"../../Comment/CommentIcon/index.js";import"../../FilesLoader/FilesLoader.js";import"../../FilesLoader/Icons/FileIcon.js";import"../../SearchInput/index.js";import"../../FeedItem/FeedItem.js";import"../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../../PostInput/PostInput.js";import"../../KeyboardDateTimePicker.js";import"../../AddComment/Popover.js";import"../../AddComment/Popup.js";import"../../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../../StageDesignVActual/ComparisonHeader.js";import"../../StageDesignVActual/ComparisonRow.js";import"../../EmbeddedApp/DevCenterEmbeddedApp.js";import"../../EmbeddedApp/EmbeddedApp.js";import"../../Autocomplete/Autocomplete.js";import"../../DocumentViewer/DocumentViewer.js";import"../../ColorPickerPalette/ColorPickerPalette.js";import"../../Search/Search.js";import"../../Search/components/Listbox.js";import"../../Search/components/Paper.js";import"../../Search/components/RecentSearches.js";import"../../Search/components/InputAdornmentLeft.js";import"../../Search/components/Groups.js";import"../../StatusBadge/index.js";import"../../Attachment/index.js";import"../../EmojiIconButton.js";import"../../FileUploadIconButton.js";import"../../FilePreview/index.js";import"../../FailedFileUploading.js";import"../../UserMention/index.js";import"../../CommentsInfo/index.js";import"../../CommentInput/index.js";import"../../Comment/index.js";import"../../CommentLoader.js";import"../../AssetNameLabel/AssetStatusBadge.js";import"../../AssetEditorV2/components/PrimaryAssetSelect.js";import"../../AssetEditorV2/components/SecondaryAssetSelect.js";import"../../AssetEditorV2/components/SelectItem.js";import"../../AssetEditorV2/components/MultipleAssetsToggle.js";import l from"./RealTimeBox.js";import d from"../RealTimeSidebarContext.js";import{ORIENTATIONS as j}from"../enums.js";var c=p((function(){return{boxListVertical:{padding:"10px 0 16px",overflowX:"hidden"},rtBoxListHorizontal:{display:"flex",flexWrap:"wrap"},cTpRtBoxAddButtonContainer:{marginTop:8,textAlign:"center"}}}));var C=i((function(i){var p=i.sourceArray,C=i.findSource,u=c(),A=n(d),g=A.onAppSettingChange,D=A.appSettings,v=A.assetKey,b=A.orientation,S=A.realTimeTypes,x=A.setting,P=A.handleOpenCloseDialog;return t(r,{children:b===j.vertical?o("div",e({className:u.boxListVertical},{children:[t(s,{list:p,itemKey:function(e){return e.key},template:l,padding:0,unsetZIndex:!0,container:function(){return document.body},onMoveEnd:function(t){var r,o=t.map((function(e){return e.key}));g("rtValuesSetting",e(e({},D.rtValuesSetting),((r={})[v]=o,r)))}}),t("div",e({className:u.cTpRtBoxAddButtonContainer},{children:t(a,e({color:"primary",tooltipProps:{title:"Add"},onClick:P},{children:t(m,{})}))}))]})):t("div",e({className:u.rtBoxListHorizontal},{children:x.map((function(e){return t(l,{isDraggable:!1,item:C(e,S)},"".concat(e))}))}))})}));export{C as default};
@@ -1,4 +1,5 @@
1
1
  export declare function getWCURuleMapping(appId: number): Promise<any>;
2
2
  export declare function getWellnessRuleSettings(ruleIds: string[]): Promise<any>;
3
3
  export declare function getWellnessAlerts(assetIds: number[], name: string): Promise<any>;
4
+ export declare function postReportError(assetId: string | number, description: string, currentUser: any, segment: any): Promise<void>;
4
5
  //# sourceMappingURL=api.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../src/components/StatusBadge/api.ts"],"names":[],"mappings":"AAKA,wBAAsB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAYnE;AAED,wBAAsB,uBAAuB,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,CAc7E;AAED,wBAAsB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAYtF"}
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../src/components/StatusBadge/api.ts"],"names":[],"mappings":"AASA,wBAAsB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAgBnE;AAED,wBAAsB,uBAAuB,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,CAc7E;AAED,wBAAsB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAYtF;AA6BD,wBAAsB,eAAe,CACnC,OAAO,EAAE,MAAM,GAAG,MAAM,EACxB,WAAW,EAAE,MAAM,EACnB,WAAW,KAAA,EACX,OAAO,KAAA,iBAmBR"}
@@ -1 +1 @@
1
- import{__awaiter as t,__generator as i}from'./../../ext-esm/tslib/tslib.es6.js';import{getDataAppStorageAggregate as n}from"../../clients/jsonApi/index.js";import"../../constants/goals.js";import"../../constants/segment.js";import"../../constants/alerts.js";import"../../constants/apps.js";import"../../constants/drillstring.js";import"../../constants/completion.js";import"../../constants/notifications.js";import"../../constants/feed.js";import"../../constants/bha.js";import{CORVA_COMPANY_ID as s}from"../../constants/corvaCompanyId.js";import"lodash";import"../GradientManager/configuration/constants.js";import{METADATA as o}from"./constants.js";function r(r){return t(this,void 0,void 0,(function(){var t;return i(this,(function(i){return t={match:JSON.stringify({company_id:s,"data.app_id":r}),limit:100,sort:JSON.stringify({timestamp:1}),project:JSON.stringify({app_id:"$data.app_id",rule_id:"$data.wcu_rules.rule_id",_id:0})},[2,n(o.recordProvider,o.recordCollections.wcuRuleMapping,t)]}))}))}function e(r){return t(this,void 0,void 0,(function(){var t;return i(this,(function(i){return t={sort:JSON.stringify({ts_desc:1}),match:JSON.stringify({company_id:s,_id:{$in:r}}),limit:1e3},[2,n(o.recordProvider,o.recordCollections.wellnessRuleSettings,t)]}))}))}function a(s,r){return t(this,void 0,void 0,(function(){var t;return i(this,(function(i){return t={sort:JSON.stringify({timestamp:-1}),match:JSON.stringify({asset_id:{$in:s},"data.name":r}),limit:100},[2,n(o.recordProvider,o.recordCollections.wellnessAlerts,t)]}))}))}export{r as getWCURuleMapping,a as getWellnessAlerts,e as getWellnessRuleSettings};
1
+ import{__awaiter as t,__generator as i}from'./../../ext-esm/tslib/tslib.es6.js';import{postTask as r,getDataAppStorageAggregate as s,getTask as e}from"../../clients/jsonApi/index.js";import"../../constants/goals.js";import"../../constants/segment.js";import"../../constants/alerts.js";import"../../constants/apps.js";import"../../constants/drillstring.js";import"../../constants/completion.js";import"../../constants/notifications.js";import"../../constants/feed.js";import"../../constants/bha.js";import{CORVA_COMPANY_ID as n}from"../../constants/corvaCompanyId.js";import"lodash";import"../GradientManager/configuration/constants.js";import{METADATA as o}from"./constants.js";import"../../utils/index.js";import{showErrorNotification as a,showSuccessNotification as c}from"../../utils/notificationToasts.js";import{delay as l}from"../../utils/delay.js";function u(r){return t(this,void 0,void 0,(function(){var t;return i(this,(function(i){return t={match:JSON.stringify({company_id:n,"data.app_id":r}),limit:100,sort:JSON.stringify({timestamp:1}),project:JSON.stringify({app_id:"$data.app_id",rule_id:"$data.wcu_rules.rule_id",_id:0})},[2,s(o.recordProvider,o.recordCollections.wcuRuleMapping,t)]}))}))}function d(r){return t(this,void 0,void 0,(function(){var t;return i(this,(function(i){return t={sort:JSON.stringify({ts_desc:1}),match:JSON.stringify({company_id:n,_id:{$in:r}}),limit:1e3},[2,s(o.recordProvider,o.recordCollections.wellnessRuleSettings,t)]}))}))}function m(r,e){return t(this,void 0,void 0,(function(){var t;return i(this,(function(i){return t={sort:JSON.stringify({timestamp:-1}),match:JSON.stringify({asset_id:{$in:r},"data.name":e}),limit:100},[2,s(o.recordProvider,o.recordCollections.wellnessAlerts,t)]}))}))}function p(r){return t(this,void 0,void 0,(function(){var t,s,n,o;return i(this,(function(i){switch(i.label){case 0:i.trys.push([0,7,,8]),t="initial",s=0,i.label=1;case 1:return"initial"===t?[3,3]:[4,l(1e3*(1+.2*s))];case 2:i.sent(),i.label=3;case 3:return[4,e(r)];case 4:n=i.sent(),t=null==n?void 0:n.state,s+=1,i.label=5;case 5:if("running"===t&&s<10)return[3,1];i.label=6;case 6:return"succeeded"===t?c("Data Quality Issue reported successfully!"):(console.error("Task execution exited"),a("Failed to report Data Quality Issue. Please try again later")),[3,8];case 7:return o=i.sent(),console.error("Failed to create a task; Error:",o),a("Failed to report Data Quality Issue. Please try again later"),[3,8];case 8:return[2]}}))}))}function f(s,e,o,a){var c;return t(this,void 0,void 0,(function(){var t,l;return i(this,(function(i){switch(i.label){case 0:return t={provider:"corva",app_key:"corva.wellness_helper",asset_id:s,properties:{type:"add_manual",internal:o.company_id===n,message:e,user_id:o.id,user_company_id:o.company_id,user_name:"".concat(o.first_name," ").concat(o.last_name),user_company_name:null===(c=o.company)||void 0===c?void 0:c.name,segment:a}},[4,r({task:t})];case 1:return[4,p(null==(l=i.sent())?void 0:l.id)];case 2:return i.sent(),[2]}}))}))}export{u as getWCURuleMapping,m as getWellnessAlerts,d as getWellnessRuleSettings,f as postReportError};
@@ -1 +1 @@
1
- import{__assign as e}from'./../../../ext-esm/tslib/tslib.es6.js';import{jsx as t,jsxs as r,Fragment as a}from"react/jsx-runtime";import i from"moment";import{template as o}from"lodash";import{makeStyles as n}from"@material-ui/core";import l from"@material-ui/icons/ArrowForward";import{Tooltip as s}from"../../Tooltip/Tooltip.js";import"../../Tooltip/ScrollableTooltip.js";import{getDeductsFromScoreClass as p,isResolved as c,getDeductsFromScoreValue as m}from"../utils.js";import{ALERT_STATES as d,BADGE_ICON_STATUSES as h}from"../constants.js";import{UniversalLink as g}from"../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import{useDQUnvalidatedContentStyles as f}from"../styles.js";var u=n((function(e){return{errorIcon:{width:20,height:18},title:{maxWidth:198,padding:"0 0 8px",fontSize:16,lineHeight:"22px",color:e.palette.primary.text1,display:"flex",alignItems:"center"},emptyMessage:{padding:"0",fontSize:16,lineHeight:"22px",color:e.palette.primary.contrastText},alertTime:{fontSize:14,color:e.palette.primary.text6,"& span":{color:e.palette.primary.text1}},alertMessage:{width:"100%",height:40,margin:0,overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box","-webkit-line-clamp":2,"-webkit-box-orient":"vertical",whiteSpace:"pre-wrap",fontSize:14,lineHeight:"20px",color:e.palette.primary.text1},alertMessageFull:{marginBottom:8,fontSize:14,lineHeight:"20px",color:e.palette.primary.text1,whiteSpace:"pre-wrap"},alertInfo:{display:"flex",alignItems:"center",flexWrap:"wrap",marginBottom:8,fontSize:14,textTransform:"capitalize","& span":{color:e.palette.primary.text6,marginRight:8},"& .error":{color:e.palette.error.main},"& .warning":{color:"#ffa500"}},resolvedInfo:{display:"flex",alignItems:"center",marginBottom:8,color:e.palette.primary.text6,fontSize:14},infoIcon:{color:e.palette.info.main,marginRight:8,fontSize:16},popover:{marginLeft:77,width:270,padding:12,display:"flex",flexDirection:"column",justifyContent:"space-between",backgroundColor:e.palette.background.b9,border:"1px solid ".concat(e.palette.primary.text9),boxShadow:"0px 3px 10px rgba(0, 0, 0, 0.4)",borderRadius:4,zIndex:1,"& .MuiTooltip-tooltip":{backgroundColor:e.palette.background.b9,fontWeight:400,lineHeight:"20px",margin:0,padding:0}},message:{whiteSpace:"pre-wrap"},note:{marginBottom:4},ok:{color:"#F99500 !important"},good:{color:"".concat(e.palette.warning.light," !important")}}})),x=function(e){return i.unix(e).format("DD MMM HH:mm (Z)")},y=function(r){var a=r.children,i=u(),n=o(a)({timestampFormatter:x}).split("**").map((function(e,r){return r%2==1?t("b",{children:e}):e}));return t("span",e({className:i.message},{children:n}))},v=function(o){var n,x,v,w=o.alert,b=o.alertIcon,N=o.children,S=o.linkToDQPage,I=u(),k=f({}),M=Math.max(w.statusUpdatedAt,w.lastCheckedAt),T=(void 0===v&&(v="MM/DD/YY hh:mm a"),(x=M)?i.unix(x).format(v):null);return t(s,{interactive:!0,children:N,PopperProps:{className:I.popover},placement:"right",title:w.emptyMessage?t("div",e({className:I.emptyMessage},{children:w.emptyMessage})):r(a,{children:[r("div",e({className:I.title},{children:[w.name,t(s,e({isFullScreen:!1,title:"Go to Data Quality page"},{children:t("div",{children:t(g,e({className:k.link,href:S},{children:t(l,{className:k.linkIcon})}))})}))]})),r("span",e({className:I.alertInfo},{children:[t("span",{children:"Category:"})," ",w.category]})),r("span",e({className:I.alertInfo},{children:[t("span",{children:"Status:"})," ",w.status]})),r("span",e({className:I.alertInfo},{children:[t("span",{children:"Error Type:"}),t("div",e({className:I.errorIcon},{children:b})),t("span",e({className:w.state===d.issue?h.warning:h.error},{children:w.state}))]})),r("span",e({className:I.alertInfo},{children:[t("span",{children:"Score Deduction:"}),t("span",e({className:p(I,w.deductsFromScore,c(w.status))},{children:m(w.deductsFromScore,c(w.status))}))]})),r("div",e({className:I.alertMessageFull},{children:[w.isThrottled&&t("b",{children:"[Throttled]: "}),t(y,{children:w.message})]})),r("span",e({className:I.alertInfo},{children:[t("span",e({className:I.note},{children:"Note:"}))," ",(null===(n=w.note)||void 0===n?void 0:n.length)?w.note:"—"]})),r("span",e({className:I.alertTime},{children:["Updated at: ",t("span",{children:T})]}))]})})};export{v as DQAlertsTooltip};
1
+ import{__assign as e}from'./../../../ext-esm/tslib/tslib.es6.js';import{jsx as t,jsxs as r,Fragment as a}from"react/jsx-runtime";import i from"moment";import{template as o}from"lodash";import{makeStyles as n}from"@material-ui/core";import l from"@material-ui/icons/ArrowForward";import{Tooltip as s}from"../../Tooltip/Tooltip.js";import"../../Tooltip/ScrollableTooltip.js";import{getDeductsFromScoreClass as p,isResolved as c,getDeductsFromScoreValue as m}from"../utils.js";import{ALERT_STATES as d,BADGE_ICON_STATUSES as h}from"../constants.js";import{UniversalLink as g}from"../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import{useDQUnvalidatedContentStyles as f}from"../styles.js";var u=n((function(e){return{errorIcon:{width:20,height:18},title:{maxWidth:198,padding:"0 0 8px",fontSize:16,lineHeight:"22px",color:e.palette.primary.text1,display:"flex",alignItems:"center"},emptyMessage:{padding:"0",fontSize:16,lineHeight:"22px",color:e.palette.primary.contrastText},alertTime:{fontSize:14,color:e.palette.primary.text6,"& span":{color:e.palette.primary.text1}},alertMessage:{width:"100%",height:40,margin:0,overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box","-webkit-line-clamp":2,"-webkit-box-orient":"vertical",whiteSpace:"pre-wrap",fontSize:14,lineHeight:"20px",color:e.palette.primary.text1},alertMessageFull:{marginBottom:8,fontSize:14,lineHeight:"20px",color:e.palette.primary.text1,whiteSpace:"pre-wrap"},alertInfo:{display:"flex",alignItems:"center",flexWrap:"wrap",marginBottom:8,fontSize:14,textTransform:"capitalize","& span":{color:e.palette.primary.text6,marginRight:8},"& .error":{color:e.palette.error.main},"& .warning":{color:"#ffa500"}},resolvedInfo:{display:"flex",alignItems:"center",marginBottom:8,color:e.palette.primary.text6,fontSize:14},infoIcon:{color:e.palette.info.main,marginRight:8,fontSize:16},popover:{marginLeft:77,width:270,padding:12,display:"flex",flexDirection:"column",justifyContent:"space-between",backgroundColor:e.palette.background.b9,border:"1px solid ".concat(e.palette.primary.text9),boxShadow:"0px 3px 10px rgba(0, 0, 0, 0.4)",borderRadius:4,zIndex:500,"& .MuiTooltip-tooltip":{backgroundColor:e.palette.background.b9,fontWeight:400,lineHeight:"20px",margin:0,padding:0}},message:{whiteSpace:"pre-wrap"},note:{marginBottom:4},ok:{color:"#F99500 !important"},good:{color:"".concat(e.palette.warning.light," !important")}}})),x=function(e){return i.unix(e).format("DD MMM HH:mm (Z)")},y=function(r){var a=r.children,i=u(),n=o(a)({timestampFormatter:x}).split("**").map((function(e,r){return r%2==1?t("b",{children:e}):e}));return t("span",e({className:i.message},{children:n}))},v=function(o){var n,x,v,w=o.alert,b=o.alertIcon,N=o.children,S=o.linkToDQPage,I=u(),k=f({}),M=Math.max(w.statusUpdatedAt,w.lastCheckedAt),T=(void 0===v&&(v="MM/DD/YY hh:mm a"),(x=M)?i.unix(x).format(v):null);return t(s,{interactive:!0,children:N,PopperProps:{className:I.popover},placement:"right",title:w.emptyMessage?t("div",e({className:I.emptyMessage},{children:w.emptyMessage})):r(a,{children:[r("div",e({className:I.title},{children:[w.name,t(s,e({isFullScreen:!1,title:"Go to Data Quality page"},{children:t("div",{children:t(g,e({className:k.link,href:S},{children:t(l,{className:k.linkIcon})}))})}))]})),r("span",e({className:I.alertInfo},{children:[t("span",{children:"Category:"})," ",w.category]})),r("span",e({className:I.alertInfo},{children:[t("span",{children:"Status:"})," ",w.status]})),r("span",e({className:I.alertInfo},{children:[t("span",{children:"Error Type:"}),t("div",e({className:I.errorIcon},{children:b})),t("span",e({className:w.state===d.issue?h.warning:h.error},{children:w.state}))]})),r("span",e({className:I.alertInfo},{children:[t("span",{children:"Score Deduction:"}),t("span",e({className:p(I,w.deductsFromScore,c(w.status))},{children:m(w.deductsFromScore,c(w.status))}))]})),r("div",e({className:I.alertMessageFull},{children:[w.isThrottled&&t("b",{children:"[Throttled]: "}),t(y,{children:w.message})]})),r("span",e({className:I.alertInfo},{children:[t("span",e({className:I.note},{children:"Note:"}))," ",(null===(n=w.note)||void 0===n?void 0:n.length)?w.note:"—"]})),r("span",e({className:I.alertTime},{children:["Updated at: ",t("span",{children:T})]}))]})})};export{v as DQAlertsTooltip};
@@ -4,11 +4,10 @@ declare type Asset = {
4
4
  id: number;
5
5
  };
6
6
  declare type ReportIssueModalProps = {
7
- open: boolean;
8
7
  onSave: (description: string, selectedAssetId: number) => void;
9
8
  onClose: () => void;
10
9
  assets?: Asset[];
11
10
  };
12
- export declare const ReportIssueModal: ({ assets, open, onSave, onClose }: ReportIssueModalProps) => JSX.Element;
11
+ export declare const ReportIssueModal: ({ assets, onSave, onClose, }: ReportIssueModalProps) => JSX.Element;
13
12
  export {};
14
13
  //# sourceMappingURL=ReportIssueModal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ReportIssueModal.d.ts","sourceRoot":"","sources":["../../../../src/components/StatusBadge/components/ReportIssueModal.tsx"],"names":[],"mappings":";AA0BA,aAAK,KAAK,GAAG;IACX,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,aAAK,qBAAqB,GAAG;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/D,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,gBAAgB,sCAAuC,qBAAqB,KAAG,WAuE3F,CAAC"}
1
+ {"version":3,"file":"ReportIssueModal.d.ts","sourceRoot":"","sources":["../../../../src/components/StatusBadge/components/ReportIssueModal.tsx"],"names":[],"mappings":";AA0BA,aAAK,KAAK,GAAG;IACX,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,aAAK,qBAAqB,GAAG;IAC3B,MAAM,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/D,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,gBAAgB,iCAI1B,qBAAqB,KAAG,WAwE1B,CAAC"}
@@ -1 +1 @@
1
- import{__assign as e}from'./../../../ext-esm/tslib/tslib.es6.js';import{jsx as r,jsxs as t,Fragment as o}from"react/jsx-runtime";import{useState as i}from"react";import{makeStyles as a,MenuItem as n,TextField as l}from"@material-ui/core";import s from"../../Modal/Modal.js";import m from"../../Button/index.js";import c from"../../Select/index.js";import{truncateString as u}from"../../Search/utils/truncate.js";var p=a((function(e){return{container:{width:472,color:e.palette.primary.text6,display:"flex",flexDirection:"column",gap:16},helpText:{fontSize:16,lineHeight:"22px"},clearAllButton:{margin:"0 16px 0 auto"},textField:{"& .MuiInput-formControl":{marginTop:8}},popover:{marginTop:8,maxHeight:500,width:"100%"}}})),d=function(a){var d=a.assets,h=a.open,f=a.onSave,v=a.onClose,x=p(),g=i(""),C=g[0],b=g[1],j=i(""),y=j[0],N=j[1],S=d.length>1;return r(s,e({open:h,onClose:v,title:"Report Data Quality Issue",actions:t(o,{children:[r(m,e({color:"primary",className:x.clearAllButton,onClick:v},{children:"Cancel"})),r(m,e({disabled:!C||S&&!y,onClick:function(){f(C,y),b(""),N(""),S||v()},variation:"primary"},{children:"report data issue"}))]})},{children:t("div",e({className:x.container},{children:[r("div",e({className:x.helpText},{children:"All issues are submitted to the Corva’s 24/7 Fusion data quality team for immediate review and remediation."})),S&&r(c,e({MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},PopoverClasses:{root:x.popover}},label:"Select Asset",onChange:function(e){return N(e.target.value)},value:y},{children:d.map((function(t){return r(n,e({value:t.id},{children:u(t.name,{maxChars:50,charsNumFromStart:26,charsNumFromEnd:24})}),t.id)}))})),r(l,{className:x.textField,multiline:!0,rows:1,rowsMax:4,label:"Error Description",onChange:function(e){return b(e.target.value)},value:C})]}))}))};export{d as ReportIssueModal};
1
+ import{__assign as e}from'./../../../ext-esm/tslib/tslib.es6.js';import{jsx as r,jsxs as t,Fragment as o}from"react/jsx-runtime";import{useState as i}from"react";import{makeStyles as a,MenuItem as n,TextField as l}from"@material-ui/core";import s from"../../Modal/Modal.js";import m from"../../Button/index.js";import c from"../../Select/index.js";import{truncateString as u}from"../../Search/utils/truncate.js";var d=a((function(e){return{container:{width:472,color:e.palette.primary.text6,display:"flex",flexDirection:"column",gap:16},helpText:{fontSize:16,lineHeight:"22px"},clearAllButton:{margin:"0 16px 0 auto"},textField:{"& .MuiInput-formControl":{marginTop:8}},popover:{marginTop:8,maxHeight:500,width:"100%"}}})),p=function(a){var p,h=a.assets,f=a.onSave,v=a.onClose,x=d(),g=i(""),C=g[0],b=g[1],j=i(null===(p=h[0])||void 0===p?void 0:p.id),y=j[0],N=j[1],S=h.length>1;return r(s,e({open:!0,onClose:v,title:"Report Data Quality Issue",actions:t(o,{children:[r(m,e({color:"primary",className:x.clearAllButton,onClick:v},{children:"Cancel"})),r(m,e({disabled:!C||S&&!y,onClick:function(){f(C,y),b(""),N(""),S||v()},variation:"primary"},{children:"report data issue"}))]})},{children:t("div",e({className:x.container},{children:[r("div",e({className:x.helpText},{children:"All issues are submitted to the Corva’s 24/7 Fusion data quality team for immediate review and remediation."})),S&&r(c,e({MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},PopoverClasses:{root:x.popover}},label:"Select Asset",onChange:function(e){return N(e.target.value)},value:y},{children:h.map((function(t){return r(n,e({value:t.id},{children:u(t.name,{maxChars:50,charsNumFromStart:26,charsNumFromEnd:24})}),t.id)}))})),r(l,{className:x.textField,multiline:!0,rows:1,rowsMax:4,label:"Error Description",onChange:function(e){return b(e.target.value)},value:C})]}))}))};export{p as ReportIssueModal};
@@ -68,5 +68,8 @@ export declare const METADATA: {
68
68
  wcuRulesCheckTime: string;
69
69
  };
70
70
  };
71
+ export declare const DATA_QUALITY_CHECK_PASSED = "Data quality check passed";
72
+ export declare const ENABLING_ON_QA_APP_IDS_LIST: number[];
73
+ export declare const ENABLING_ON_PROD_APP_IDS_LIST: number[];
71
74
  export {};
72
75
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/StatusBadge/constants.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAEpC,oBAAY,eAAe,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC;AAExE,eAAO,MAAM,cAAc;;;;;;;CAO1B,CAAC;AAEF,eAAO,MAAM,WAAW;;;;CAIvB,CAAC;AAEF,aAAK,KAAK,GAAG,OAAO,CAAC;AACrB,aAAK,OAAO,GAAG,SAAS,CAAC;AAEzB,oBAAY,UAAU,GAAG,KAAK,GAAG,OAAO,CAAC;AAEzC,eAAO,MAAM,YAAY,EAAE;IAAE,KAAK,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAG1D,CAAC;AAEF,oBAAY,KAAK,GAAG;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,UAAU,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,oBAAY,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AAEF,oBAAY,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;AAEpD,aAAK,iBAAiB,GAAG;IACvB,OAAO,EAAE,SAAS,CAAC;IACnB,OAAO,EAAE,SAAS,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,iBAKjC,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;CAKvB,CAAC;AAEF,eAAO,MAAM,OAAO,kEAAkE,CAAC;AAEvF,eAAO,MAAM,QAAQ;;;;;;;;CAQpB,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/StatusBadge/constants.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAEpC,oBAAY,eAAe,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC;AAExE,eAAO,MAAM,cAAc;;;;;;;CAO1B,CAAC;AAEF,eAAO,MAAM,WAAW;;;;CAIvB,CAAC;AAEF,aAAK,KAAK,GAAG,OAAO,CAAC;AACrB,aAAK,OAAO,GAAG,SAAS,CAAC;AAEzB,oBAAY,UAAU,GAAG,KAAK,GAAG,OAAO,CAAC;AAEzC,eAAO,MAAM,YAAY,EAAE;IAAE,KAAK,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAG1D,CAAC;AAEF,oBAAY,KAAK,GAAG;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,UAAU,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,oBAAY,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AAEF,oBAAY,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;AAEpD,aAAK,iBAAiB,GAAG;IACvB,OAAO,EAAE,SAAS,CAAC;IACnB,OAAO,EAAE,SAAS,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,iBAKjC,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;CAKvB,CAAC;AAEF,eAAO,MAAM,OAAO,kEAAkE,CAAC;AAEvF,eAAO,MAAM,QAAQ;;;;;;;;CAQpB,CAAC;AAEF,eAAO,MAAM,yBAAyB,8BAA8B,CAAC;AAoDrE,eAAO,MAAM,2BAA2B,UAkCvC,CAAC;AAqBF,eAAO,MAAM,6BAA6B,UAkCzC,CAAC"}
@@ -1 +1 @@
1
- import e from"@material-ui/icons/Warning";import s from"@material-ui/icons/Done";import r from"@material-ui/icons/Error";import i from"@material-ui/icons/CheckCircle";import{DangerousIcon as o}from"../Icons/DangerousIcon.js";var n,c=959,l={FLAGGED:"flagged",EXPIRED:"expired",RESOLVED:"resolved",OPEN:"open",INVESTIGATION:"investigation",ON_HOLD:"on hold"},a={Missing:o,Issue:r,Resolved:i},u={missing:"Missing",issue:"Issue"},t={success:"success",warning:"warning",issue:"issue",error:"error"},m=((n={})[t.success]=s,n[t.warning]=e,n[t.issue]=r,n[t.error]=o,n),g="Recommendations may be incorrect based on data quality errors",p={recordProvider:"corva",recordCollections:{wellnessAlerts:"wellness_alerts",wcuRuleMapping:"wcu_rule_mapping",wellnessRuleSettings:"wellness_rule_settings",wcuRulesCheckTime:"wcu-rule-check-time"}};export{a as ALERT_ICONS,u as ALERT_STATES,l as ALERT_STATUSES,m as BADGE_ICONS,t as BADGE_ICON_STATUSES,c as MAX_MOBILE_WIDTH,p as METADATA,g as WARNING};
1
+ import e from"@material-ui/icons/Warning";import s from"@material-ui/icons/Done";import r from"@material-ui/icons/Error";import i from"@material-ui/icons/CheckCircle";import{DangerousIcon as o}from"../Icons/DangerousIcon.js";var n,a=959,c={FLAGGED:"flagged",EXPIRED:"expired",RESOLVED:"resolved",OPEN:"open",INVESTIGATION:"investigation",ON_HOLD:"on hold"},l={Missing:o,Issue:r,Resolved:i},t={missing:"Missing",issue:"Issue"},u={success:"success",warning:"warning",issue:"issue",error:"error"},m=((n={})[u.success]=s,n[u.warning]=e,n[u.issue]=r,n[u.error]=o,n),g="Recommendations may be incorrect based on data quality errors",p={recordProvider:"corva",recordCollections:{wellnessAlerts:"wellness_alerts",wcuRuleMapping:"wcu_rule_mapping",wellnessRuleSettings:"wellness_rule_settings",wcuRulesCheckTime:"wcu-rule-check-time"}},d="Data quality check passed",w=[188,190,216,237,348,358,359,360,361,370,375,382,389,391,392,397,406,418,237,216,406,182,437,375,238,310,175,34599,188,207,329],E=[40,156,32,84,137,157,158,160,159,164,139,168,178,181,183,187,196,208,84,32,196,34,224,139,80,104,24,131,40,63,124];export{l as ALERT_ICONS,t as ALERT_STATES,c as ALERT_STATUSES,m as BADGE_ICONS,u as BADGE_ICON_STATUSES,d as DATA_QUALITY_CHECK_PASSED,E as ENABLING_ON_PROD_APP_IDS_LIST,w as ENABLING_ON_QA_APP_IDS_LIST,a as MAX_MOBILE_WIDTH,p as METADATA,g as WARNING};
@@ -5,12 +5,14 @@ declare type StatusBadgeProps = {
5
5
  appWidth: number;
6
6
  className?: string;
7
7
  DQIssueTooltipMaxHeight?: number;
8
- iconType?: 'error' | 'success' | 'issue';
9
- lastTimestamp: number;
10
- onReportErrorClick: (description: string, assetId: number) => void;
8
+ iconType?: 'error' | 'success' | 'issue' | '';
9
+ lastTimestamp?: number;
10
+ onReportErrorClick?: (description: string, assetId: number) => void;
11
11
  warningData?: Record<string, any>;
12
12
  hasSubscriptionsData?: boolean;
13
+ currentUser: Record<string, any>;
14
+ segment: 'drilling' | 'completion';
13
15
  };
14
- export declare const StatusBadge: ({ assetsData, appWidth, DQIssueTooltipMaxHeight, iconType, className, lastTimestamp, onReportErrorClick, warningData, hasSubscriptionsData, }: StatusBadgeProps) => JSX.Element;
16
+ export declare const StatusBadge: ({ assetsData, appWidth, DQIssueTooltipMaxHeight, iconType, className, lastTimestamp, onReportErrorClick: customOnReportErrorClick, warningData, hasSubscriptionsData, currentUser, segment, }: StatusBadgeProps) => JSX.Element;
15
17
  export {};
16
18
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/StatusBadge/index.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAkD,SAAS,EAAE,MAAM,aAAa,CAAC;AAkFxF,aAAK,gBAAgB,GAAG;IACtB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;IACzC,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACnE,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAClC,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC,CAAC;AAEF,eAAO,MAAM,WAAW,kJAUrB,gBAAgB,KAAG,WA4HrB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/StatusBadge/index.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAkD,SAAS,EAAE,MAAM,aAAa,CAAC;AAoFxF,aAAK,gBAAgB,GAAG;IACtB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,EAAE,CAAC;IAC9C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kBAAkB,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACpE,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAClC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC,OAAO,EAAE,UAAU,GAAG,YAAY,CAAC;CACpC,CAAC;AAEF,eAAO,MAAM,WAAW,kMAYrB,gBAAgB,KAAG,WA4HrB,CAAC"}
@@ -1 +1 @@
1
- import{__assign as t}from'./../../ext-esm/tslib/tslib.es6.js';import{jsxs as e,jsx as n,Fragment as o}from"react/jsx-runtime";import{useState as r,useRef as a,useEffect as i}from"react";import s from"moment";import c from"classnames";import{makeStyles as p,Typography as l}from"@material-ui/core";import{Tooltip as u}from"../Tooltip/Tooltip.js";import"../Tooltip/ScrollableTooltip.js";import{WARNING as m,BADGE_ICON_STATUSES as d,MAX_MOBILE_WIDTH as g}from"./constants.js";import{DQStatusIcon as f}from"./components/DQStatusIcon.js";import{DQUnvalidatedContent as x}from"./components/DQUnvalidatedContent.js";import{ReportIssueModal as h}from"./components/ReportIssueModal.js";var b=p((function(t){return{statusBadgeWrapper:{backgroundColor:t.palette.background.b4,display:"flex",height:30},statusBadgeContent:{display:"flex",padding:function(t){var e=t.isSuccessTypeIcon,n=t.isErrorTypeIcon,o=t.isIssueTypeIcon;return"12px 0 2px ".concat(e||n||o?6:2,"px")},whiteSpace:"nowrap",width:"calc(100% - 140px)"},text:{fontSize:"10px",lineHeight:"12px",alignSelf:"center"},timestamp:{color:t.palette.primary.text6,marginLeft:function(t){return t.isIconExist&&4}},warningMessage:{color:t.palette.primary.text1,marginLeft:4,textOverflow:"ellipsis",overflow:"hidden",fontSize:"12px"},badgeIconWarning:{marginLeft:8},popper:{zIndex:1,"& .MuiTooltip-tooltip":{position:"absolute",bottom:0,width:"max-content",transformOrigin:"center top",maxWidth:"none",padding:4,fontSize:12,boxShadow:"0px 0px 4px 2px rgb(0 0 0 / 12%)",fontWeight:400,lineHeight:"16px",letterSpacing:"0.4px",backgroundColor:t.palette.background.b9}},DQIconWrapper:{display:"flex",alignItems:"center",alignSelf:"center",justifyContent:"center",height:24,width:24,minWidth:24,borderRadius:12,"&:hover":{backgroundColor:function(t){var e=t.isErrorTypeIcon,n=t.isSuccessTypeIcon,o=t.isIssueTypeIcon;return e?"rgba(244, 67, 54, 0.1)":n?"rgba(117, 219, 41, 0.2)":o?"rgba(255, 193, 7, 0.16)":"transparent"}}}}})),v=function(p){var v=p.assetsData,I=void 0===v?{}:v,y=p.appWidth,T=p.DQIssueTooltipMaxHeight,S=p.iconType,w=p.className,D=p.lastTimestamp,_=p.onReportErrorClick,j=p.warningData,k=p.hasSubscriptionsData,C=r(!1),E=C[0],M=C[1],W=r(!1),L=W[0],N=W[1],Q=a(null),H=null==j?void 0:j.message,z=S===d.error,B=S===d.success,O=S===d.issue,R=y<g,Y=b({isIconExist:!!S,isSuccessTypeIcon:B,isErrorTypeIcon:z,isIssueTypeIcon:O}),P=a(null),U=function(t){Q.current&&!Q.current.contains(t.target)&&N(!1)};i((function(){return document.addEventListener("click",U),function(){document.removeEventListener("click",U),clearTimeout(P.current)}}),[]);var J=function(){clearTimeout(P.current),N(!0)},q=function(t,e){void 0===e&&(e=700),P.current=setTimeout((function(){return N(!1)}),e)};return i((function(){k&&(J(),q(0,1e4))}),[JSON.stringify(I)]),e("div",t({"data-testid":"Status_badge",className:c(Y.statusBadgeWrapper,"c-status-badge--".concat(S),w)},{children:[e("div",t({className:Y.statusBadgeContent,ref:Q},{children:[S&&n(u,t({disableHoverListener:!0,open:L,onMouseEnter:J,onMouseLeave:q,PopperProps:{className:Y.popper},placement:"top-start",title:n(x,{tooltipRef:Q,onMouseEnter:J,onMouseLeave:q,assetsData:I,maxHeight:T,onClick:function(){return M(!0)}})},{children:n("div",t({className:Y.DQIconWrapper,"data-testid":"".concat("Status_badge","__DQ_icon_").concat(S)},{children:n(f,{color:S,iconType:S})}))})),D&&e(l,t({className:c(Y.text,Y.timestamp),variant:"body1"},{children:["Last Update: ",s.unix(D).format("M/D/YYYY h:mm a")]})),j&&e(o,{children:[n(u,t({placement:"top",title:H?"".concat(m,". ").concat(H):m},{children:n("div",t({"data-testid":"".concat("Status_badge","__DQ_icon_warning")},{children:n(f,{className:Y.badgeIconWarning,color:d.warning,iconType:d.warning})}))})),!R&&n(l,t({className:c(Y.text,Y.warningMessage),variant:"body1"},{children:H?"".concat(m,". ").concat(H):m}))]})]})),n(h,{assets:Object.keys(I).map((function(t){return{name:t,id:I[t][0].alert.assetId}})),open:E,onSave:_,onClose:function(){return M(!1)}})]}))};export{v as StatusBadge};
1
+ import{__assign as t}from'./../../ext-esm/tslib/tslib.es6.js';import{jsxs as e,jsx as n,Fragment as o}from"react/jsx-runtime";import{useState as r,useRef as i,useEffect as a}from"react";import s from"moment";import c from"classnames";import{makeStyles as p,Typography as l}from"@material-ui/core";import{Tooltip as u}from"../Tooltip/Tooltip.js";import"../Tooltip/ScrollableTooltip.js";import{WARNING as m,BADGE_ICON_STATUSES as d,MAX_MOBILE_WIDTH as g}from"./constants.js";import{DQStatusIcon as f}from"./components/DQStatusIcon.js";import{DQUnvalidatedContent as x}from"./components/DQUnvalidatedContent.js";import{ReportIssueModal as h}from"./components/ReportIssueModal.js";import{postReportError as b}from"./api.js";var v=window.innerHeight-212,I=p((function(t){return{statusBadgeWrapper:{backgroundColor:t.palette.background.b4,display:"flex",height:30},statusBadgeContent:{display:"flex",padding:function(t){var e=t.isSuccessTypeIcon,n=t.isErrorTypeIcon,o=t.isIssueTypeIcon;return"12px 0 2px ".concat(e||n||o?6:2,"px")},whiteSpace:"nowrap",width:"calc(100% - 140px)"},text:{fontSize:"10px",lineHeight:"12px",alignSelf:"center"},timestamp:{color:t.palette.primary.text6,marginLeft:function(t){return t.isIconExist&&4}},warningMessage:{color:t.palette.primary.text1,marginLeft:4,textOverflow:"ellipsis",overflow:"hidden",fontSize:"12px"},badgeIconWarning:{marginLeft:8},popper:{zIndex:500,"& .MuiTooltip-tooltip":{position:"absolute",bottom:0,width:"max-content",transformOrigin:"center top",maxWidth:"none",padding:4,fontSize:12,boxShadow:"0px 0px 4px 2px rgb(0 0 0 / 12%)",fontWeight:400,lineHeight:"16px",letterSpacing:"0.4px",backgroundColor:t.palette.background.b9}},DQIconWrapper:{display:"flex",alignItems:"center",alignSelf:"center",justifyContent:"center",height:24,width:24,minWidth:24,borderRadius:12,"&:hover":{backgroundColor:function(t){var e=t.isErrorTypeIcon,n=t.isSuccessTypeIcon,o=t.isIssueTypeIcon;return e?"rgba(244, 67, 54, 0.1)":n?"rgba(117, 219, 41, 0.2)":o?"rgba(255, 193, 7, 0.16)":"transparent"}}}}})),y=function(p){var y=p.assetsData,T=void 0===y?{}:y,S=p.appWidth,w=p.DQIssueTooltipMaxHeight,D=void 0===w?v:w,_=p.iconType,j=p.className,k=p.lastTimestamp,C=p.onReportErrorClick,E=p.warningData,M=p.hasSubscriptionsData,W=p.currentUser,L=p.segment,N=r(!1),Q=N[0],H=N[1],z=r(!1),B=z[0],O=z[1],R=i(null),Y=null==E?void 0:E.message,U=_===d.error,P=_===d.success,J=_===d.issue,q=S<g,A=I({isIconExist:!!_,isSuccessTypeIcon:P,isErrorTypeIcon:U,isIssueTypeIcon:J}),F=i(null),G=function(t){R.current&&!R.current.contains(t.target)&&O(!1)};a((function(){return document.addEventListener("click",G),function(){document.removeEventListener("click",G),clearTimeout(F.current)}}),[]);var K=function(){clearTimeout(F.current),O(!0)},V=function(t,e){void 0===e&&(e=700),F.current=setTimeout((function(){return O(!1)}),e)};return a((function(){M&&(K(),V(0,1e4))}),[JSON.stringify(T)]),e("div",t({"data-testid":"Status_badge",className:c(A.statusBadgeWrapper,"c-status-badge--".concat(_),j)},{children:[e("div",t({className:A.statusBadgeContent,ref:R},{children:[_&&n(u,t({disableHoverListener:!0,open:B,onMouseEnter:K,onMouseLeave:V,PopperProps:{className:A.popper},placement:"top-start",title:n(x,{tooltipRef:R,onMouseEnter:K,onMouseLeave:V,assetsData:T,maxHeight:D,onClick:function(){return H(!0)}})},{children:n("div",t({className:A.DQIconWrapper,"data-testid":"".concat("Status_badge","__DQ_icon_").concat(_)},{children:n(f,{color:_,iconType:_})}))})),k&&e(l,t({className:c(A.text,A.timestamp),variant:"body1"},{children:["Last Update: ",s.unix(k).format("M/D/YYYY h:mm a")]})),E&&e(o,{children:[n(u,t({placement:"top",title:Y?"".concat(m,". ").concat(Y):m},{children:n("div",t({"data-testid":"".concat("Status_badge","__DQ_icon_warning")},{children:n(f,{className:A.badgeIconWarning,color:d.warning,iconType:d.warning})}))})),!q&&n(l,t({className:c(A.text,A.warningMessage),variant:"body1"},{children:Y?"".concat(m,". ").concat(Y):m}))]})]})),Q&&n(h,{assets:Object.keys(T).map((function(t){return{name:t,id:T[t][0].alert.assetId}})),onSave:C||function(t,e){b(e,t,W,L)},onClose:function(){return H(!1)}})]}))};export{y as StatusBadge};
@@ -3,7 +3,7 @@ export declare const isResolved: (status: string) => boolean;
3
3
  export declare const getDeductsFromScoreClass: GetDeductsFromScoreClass;
4
4
  export declare const getDeductsFromScoreValue: GetDeductsFromScoreValue;
5
5
  export declare const parseWellnessAlertFromJson: ParseWellnessAlertFromJson;
6
- export declare const getLinkToDQPage: ({ assetId, wellHubSlug }: {
6
+ export declare const getLinkToDQPage: ({ assetId, wellHubSlug, }: {
7
7
  assetId: number;
8
8
  wellHubSlug: string;
9
9
  }) => string;
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/StatusBadge/utils.ts"],"names":[],"mappings":"AACA,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,EACxB,wBAAwB,EACzB,MAAM,gCAAgC,CAAC;AAExC,eAAO,MAAM,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAA2E,CAAC;AAEzH,eAAO,MAAM,wBAAwB,EAAE,wBAatC,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,wBAEtC,CAAC;AA6BF,eAAO,MAAM,0BAA0B,EAAE,0BA8BxC,CAAC;AAEF,eAAO,MAAM,eAAe;aAAyC,MAAM;iBAAe,MAAM;MAAK,MACnD,CAAC;AAEnD,eAAO,MAAM,sBAAsB,uCAkB3B,CAAC;AAET,eAAO,MAAM,oBAAoB,uEAqChC,CAAC;AAEF,eAAO,MAAM,WAAW,0GAqBvB,CAAA"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/StatusBadge/utils.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,EACxB,wBAAwB,EACzB,MAAM,gCAAgC,CAAC;AAExC,eAAO,MAAM,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OACK,CAAC;AAEnD,eAAO,MAAM,wBAAwB,EAAE,wBAYtC,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,wBAKtC,CAAC;AA6BF,eAAO,MAAM,0BAA0B,EAAE,0BA8BxC,CAAC;AAEF,eAAO,MAAM,eAAe;aAIjB,MAAM;iBACF,MAAM;MACjB,MAA0D,CAAC;AAE/D,eAAO,MAAM,sBAAsB,uCAkB3B,CAAC;AAET,eAAO,MAAM,oBAAoB,uEAqChC,CAAC;AAEF,eAAO,MAAM,WAAW,0GAoBvB,CAAC"}
@@ -1 +1 @@
1
- import{BADGE_ICON_STATUSES as t,ALERT_STATUSES as e,ALERT_STATES as n}from"./constants.js";var s=function(t){return void 0===t&&(t=""),t.toLowerCase()===e.RESOLVED},a=function(t,e,n){return n||!e?"":e>40?t.error:e>10?t.warn:e>5?t.ok:t.good},r=function(t,e){return!e&&t>=0?"".concat(t,"%"):"—"};var u=function(t){var e,n,s,a;return"Issue"===t.data.state&&"Manual Alert"!==t.data.name&&"User Created"!==t.data.category?null:{id:t._id,assetId:t.asset_id,name:t.data.name,category:t.data.category,lastCheckedAt:t.data.last_checked_at,message:t.data.message,status:(a=t.data.status,"under investigation"===a?"investigation":["not available","resolved"].includes(a)?"resolved":a),statusReason:t.data.status_reason,statusUpdatedAt:t.data.status_updated_at,state:(s=t.data.state,["Fatal","Critical","Issue","Manual"].includes(s)?"Issue":["Missing Data"].includes(s)?"Missing":"Unknown"),createdAt:t.timestamp,note:t.data.note,isThrottled:t.data.is_throttled,segment:t.data.segment,metrics:{holeDepth:null===(e=t.data.metrics)||void 0===e?void 0:e.hole_depth,state:null===(n=t.data.metrics)||void 0===n?void 0:n.state},deductsFromScore:t.data.deducts_from_score}},i=function(t){var e=t.assetId,n=t.wellHubSlug;return"/assets/".concat(e,"/").concat(n,"/Data Quality")},o=function(t,n){return t.reduce((function(t,s){if(!s)return t;if([e.FLAGGED,e.INVESTIGATION,e.ON_HOLD].includes(s.status))return t;var a=n.find((function(t){return t.id===s.assetId})).name;return t[a]||(t[a]=[]),t[a].push(s),t}),{})},d=function(t,a,r){return a.reduce((function(a,u){if(!(null==u?void 0:u.length))return a;var d=o(u,t);return Object.keys(d).forEach((function(t){var u=d[t],o=u.find((function(t){return t.status===e.OPEN||t.status===e.EXPIRED})),c=u.every((function(t){return s(t.status)}));a[t]||(a[t]=[]),a[t].push({alert:c?u.sort((function(t,e){return e.statusUpdatedAt-t.statusUpdatedAt}))[0]:o,isResolved:c,id:u[0].id,issuesNum:u.filter((function(t){return t.state===n.issue&&!s(t.status)})).length,name:u[0].name,missingNum:u.filter((function(t){return t.state===n.missing&&!s(t.status)})).length,linkToDQPage:i({assetId:u[0].assetId,wellHubSlug:r})})})),a}),{})},c=function(e,n){return e.filter((function(t){return n[t].every((function(t){return t.isResolved}))})).length===e.length?t.success:e.filter((function(t){return n[t].some((function(t){return t.missingNum}))})).length?t.error:e.filter((function(t){return n[t].some((function(t){return t.issuesNum}))})).length?t.issue:""};export{a as getDeductsFromScoreClass,r as getDeductsFromScoreValue,c as getIconType,i as getLinkToDQPage,d as getNewWellnessAlerts,o as groupAlertsByAssetName,s as isResolved,u as parseWellnessAlertFromJson};
1
+ import{__assign as t}from'./../../ext-esm/tslib/tslib.es6.js';import{ALERT_STATUSES as e,BADGE_ICON_STATUSES as s,DATA_QUALITY_CHECK_PASSED as n,ALERT_STATES as a}from"./constants.js";var r=function(t){return void 0===t&&(t=""),t.toLowerCase()===e.RESOLVED},u=function(t,e,s){return s||!e?"":e>40?t.error:e>10?t.warn:e>5?t.ok:t.good},i=function(t,e){return!e&&t>=0?"".concat(t,"%"):"—"};var o=function(t){var e,s,n,a;return"Issue"===t.data.state&&"Manual Alert"!==t.data.name&&"User Created"!==t.data.category?null:{id:t._id,assetId:t.asset_id,name:t.data.name,category:t.data.category,lastCheckedAt:t.data.last_checked_at,message:t.data.message,status:(a=t.data.status,"under investigation"===a?"investigation":["not available","resolved"].includes(a)?"resolved":a),statusReason:t.data.status_reason,statusUpdatedAt:t.data.status_updated_at,state:(n=t.data.state,["Fatal","Critical","Issue","Manual"].includes(n)?"Issue":["Missing Data"].includes(n)?"Missing":"Unknown"),createdAt:t.timestamp,note:t.data.note,isThrottled:t.data.is_throttled,segment:t.data.segment,metrics:{holeDepth:null===(e=t.data.metrics)||void 0===e?void 0:e.hole_depth,state:null===(s=t.data.metrics)||void 0===s?void 0:s.state},deductsFromScore:t.data.deducts_from_score}},d=function(t){var e=t.assetId,s=t.wellHubSlug;return"/assets/".concat(e,"/").concat(s,"/Data Quality")},c=function(t,s){return t.reduce((function(t,n){if(!n)return t;if([e.FLAGGED,e.INVESTIGATION,e.ON_HOLD].includes(n.status))return t;var a=s.find((function(t){return t.id===n.assetId})).name;return t[a]||(t[a]=[]),t[a].push(n),t}),{})},l=function(s,u,i){return u.reduce((function(u,o){if(!(null==o?void 0:o.length))return u;var l=c(o,s);return Object.keys(l).forEach((function(s){var o=l[s],c=o.find((function(t){return t.status===e.OPEN||t.status===e.EXPIRED})),f=o.every((function(t){return r(t.status)}));u[s]||(u[s]=[]),u[s].push({alert:f?t(t({},o[0]),{emptyMessage:n}):c,isResolved:f,id:o[0].id,issuesNum:o.filter((function(t){return t.state===a.issue&&!r(t.status)})).length,name:o[0].name,missingNum:o.filter((function(t){return t.state===a.missing&&!r(t.status)})).length,linkToDQPage:d({assetId:o[0].assetId,wellHubSlug:i})})})),u}),{})},f=function(t,e){return t.filter((function(t){return e[t].every((function(t){return t.isResolved}))})).length===t.length?s.success:t.filter((function(t){return e[t].some((function(t){return t.missingNum}))})).length?s.error:t.filter((function(t){return e[t].some((function(t){return t.issuesNum}))})).length?s.issue:""};export{u as getDeductsFromScoreClass,i as getDeductsFromScoreValue,f as getIconType,d as getLinkToDQPage,l as getNewWellnessAlerts,c as groupAlertsByAssetName,r as isResolved,o as parseWellnessAlertFromJson};