@corva/ui 3.35.0-7 → 3.35.0-8

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 (205) hide show
  1. package/cjs-bundle/components/AddComment/Popover.js +1 -1
  2. package/cjs-bundle/components/AddComment/Popover.js.map +1 -1
  3. package/cjs-bundle/components/AddComment/components/Content.js +1 -1
  4. package/cjs-bundle/components/AddComment/components/Content.js.map +1 -1
  5. package/cjs-bundle/components/BICOffsetPickerDialog/index.js +1 -1
  6. package/cjs-bundle/components/BICOffsetPickerDialog/index.js.map +1 -1
  7. package/cjs-bundle/components/Casing/CasingTableV2/components/CasingJoints/Editor.js +1 -1
  8. package/cjs-bundle/components/Casing/CasingTableV2/components/CasingJoints/Editor.js.map +1 -1
  9. package/cjs-bundle/components/Casing/CasingTableV2/components/Component.js +1 -1
  10. package/cjs-bundle/components/Casing/CasingTableV2/components/Component.js.map +1 -1
  11. package/cjs-bundle/components/Casing/CasingTableV2/components/DrillPipe/Editor.js +1 -1
  12. package/cjs-bundle/components/Casing/CasingTableV2/components/DrillPipe/Editor.js.map +1 -1
  13. package/cjs-bundle/components/DocumentViewer/DocumentViewer.js +1 -1
  14. package/cjs-bundle/components/DocumentViewer/DocumentViewer.js.map +1 -1
  15. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js +1 -1
  16. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js.map +1 -1
  17. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js +1 -1
  18. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js.map +1 -1
  19. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Component.js +1 -1
  20. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Component.js.map +1 -1
  21. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js +1 -1
  22. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js.map +1 -1
  23. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js +1 -1
  24. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js.map +1 -1
  25. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js +1 -1
  26. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js.map +1 -1
  27. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js +1 -1
  28. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js.map +1 -1
  29. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js +1 -1
  30. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js.map +1 -1
  31. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js +1 -1
  32. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js.map +1 -1
  33. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js +1 -1
  34. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js.map +1 -1
  35. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js +1 -1
  36. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js.map +1 -1
  37. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js +1 -1
  38. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js.map +1 -1
  39. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js +1 -1
  40. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js.map +1 -1
  41. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js +1 -1
  42. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js.map +1 -1
  43. package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js +1 -1
  44. package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js.map +1 -1
  45. package/cjs-bundle/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js +1 -1
  46. package/cjs-bundle/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js.map +1 -1
  47. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js +1 -1
  48. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js.map +1 -1
  49. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/index.js +1 -1
  50. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/index.js.map +1 -1
  51. package/cjs-bundle/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js +1 -1
  52. package/cjs-bundle/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js.map +1 -1
  53. package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js +1 -1
  54. package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js.map +1 -1
  55. package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/index.js +1 -1
  56. package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/index.js.map +1 -1
  57. package/cjs-bundle/components/OffsetWellPickerV3/components/WellHubView/index.js +1 -1
  58. package/cjs-bundle/components/OffsetWellPickerV3/components/WellHubView/index.js.map +1 -1
  59. package/cjs-bundle/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js +1 -1
  60. package/cjs-bundle/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js.map +1 -1
  61. package/cjs-bundle/components/OffsetWellPickerV4/OffsetWellPickerV4.js +1 -1
  62. package/cjs-bundle/components/OffsetWellPickerV4/OffsetWellPickerV4.js.map +1 -1
  63. package/cjs-bundle/components/OffsetWellPickerV4/components/Filter/Filter.js +1 -1
  64. package/cjs-bundle/components/OffsetWellPickerV4/components/Filter/Filter.js.map +1 -1
  65. package/cjs-bundle/components/OffsetWellPickerV4/components/Filter/MultiSelect.js +1 -1
  66. package/cjs-bundle/components/OffsetWellPickerV4/components/Filter/MultiSelect.js.map +1 -1
  67. package/cjs-bundle/components/OffsetWellPickerV4/components/OffsetWellsTable/AdvancedSearch/AutoCompleteAssetSearch.js +1 -1
  68. package/cjs-bundle/components/OffsetWellPickerV4/components/OffsetWellsTable/AdvancedSearch/AutoCompleteAssetSearch.js.map +1 -1
  69. package/cjs-bundle/components/OffsetWellPickerV4/components/OffsetWellsTable/MetricsSettingMenu.js +1 -1
  70. package/cjs-bundle/components/OffsetWellPickerV4/components/OffsetWellsTable/MetricsSettingMenu.js.map +1 -1
  71. package/cjs-bundle/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.js +1 -1
  72. package/cjs-bundle/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.js.map +1 -1
  73. package/cjs-bundle/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.module.css.js +1 -1
  74. package/cjs-bundle/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableHead.js +1 -1
  75. package/cjs-bundle/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableHead.js.map +1 -1
  76. package/cjs-bundle/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableHead.module.css.js +1 -1
  77. package/cjs-bundle/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableRow.js +1 -1
  78. package/cjs-bundle/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableRow.js.map +1 -1
  79. package/cjs-bundle/components/OffsetWellPickerV4/components/Toolbar/Toolbar.js +1 -1
  80. package/cjs-bundle/components/OffsetWellPickerV4/components/Toolbar/Toolbar.js.map +1 -1
  81. package/cjs-bundle/components/OffsetWellPickerV4/constants.js +1 -1
  82. package/cjs-bundle/components/OffsetWellPickerV4/constants.js.map +1 -1
  83. package/cjs-bundle/components/OffsetWellPickerV4/effects/useCompanies.js +2 -0
  84. package/cjs-bundle/components/OffsetWellPickerV4/effects/useCompanies.js.map +1 -0
  85. package/cjs-bundle/components/OffsetWellPickerV4/effects/useFetchWells.js +1 -1
  86. package/cjs-bundle/components/OffsetWellPickerV4/effects/useFilterOptions.js +1 -1
  87. package/cjs-bundle/components/OffsetWellPickerV4/effects/useFilterOptions.js.map +1 -1
  88. package/cjs-bundle/components/OffsetWellPickerV4/effects/useTableColumns.js +1 -1
  89. package/cjs-bundle/components/OffsetWellPickerV4/effects/useTableColumns.js.map +1 -1
  90. package/cjs-bundle/components/OffsetWellPickerV4/utils/apiCalls.js +1 -1
  91. package/cjs-bundle/components/PadOffsetsPicker/StagesSelector.js +1 -1
  92. package/cjs-bundle/components/PadOffsetsPicker/StagesSelector.js.map +1 -1
  93. package/cjs-bundle/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js +1 -1
  94. package/components/AddComment/Popover.js +1 -1
  95. package/components/AddComment/Popover.js.map +1 -1
  96. package/components/AddComment/components/Content.js +1 -1
  97. package/components/AddComment/components/Content.js.map +1 -1
  98. package/components/BICOffsetPickerDialog/index.js +1 -1
  99. package/components/BICOffsetPickerDialog/index.js.map +1 -1
  100. package/components/Casing/CasingTableV2/components/CasingJoints/Editor.js +1 -1
  101. package/components/Casing/CasingTableV2/components/CasingJoints/Editor.js.map +1 -1
  102. package/components/Casing/CasingTableV2/components/Component.js +1 -1
  103. package/components/Casing/CasingTableV2/components/Component.js.map +1 -1
  104. package/components/Casing/CasingTableV2/components/DrillPipe/Editor.js +1 -1
  105. package/components/Casing/CasingTableV2/components/DrillPipe/Editor.js.map +1 -1
  106. package/components/DocumentViewer/DocumentViewer.js +1 -1
  107. package/components/DocumentViewer/DocumentViewer.js.map +1 -1
  108. package/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js +1 -1
  109. package/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js.map +1 -1
  110. package/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js +1 -1
  111. package/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js.map +1 -1
  112. package/components/Drillstring/BHAComponentsTable/components/Component.js +1 -1
  113. package/components/Drillstring/BHAComponentsTable/components/Component.js.map +1 -1
  114. package/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js +1 -1
  115. package/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js.map +1 -1
  116. package/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js +1 -1
  117. package/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js.map +1 -1
  118. package/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js +1 -1
  119. package/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js.map +1 -1
  120. package/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js +1 -1
  121. package/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js.map +1 -1
  122. package/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js +1 -1
  123. package/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js.map +1 -1
  124. package/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js +1 -1
  125. package/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js.map +1 -1
  126. package/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js +1 -1
  127. package/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js.map +1 -1
  128. package/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js +1 -1
  129. package/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js.map +1 -1
  130. package/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js +1 -1
  131. package/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js.map +1 -1
  132. package/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js +1 -1
  133. package/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js.map +1 -1
  134. package/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js +1 -1
  135. package/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js.map +1 -1
  136. package/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js +1 -1
  137. package/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js.map +1 -1
  138. package/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js +1 -1
  139. package/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js.map +1 -1
  140. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js +1 -1
  141. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js.map +1 -1
  142. package/components/OffsetWellPickerV3/components/CustomSelectionView/index.js +1 -1
  143. package/components/OffsetWellPickerV3/components/CustomSelectionView/index.js.map +1 -1
  144. package/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js +1 -1
  145. package/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js.map +1 -1
  146. package/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js +1 -1
  147. package/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js.map +1 -1
  148. package/components/OffsetWellPickerV3/components/TabSelection/index.js +1 -1
  149. package/components/OffsetWellPickerV3/components/TabSelection/index.js.map +1 -1
  150. package/components/OffsetWellPickerV3/components/WellHubView/index.js +1 -1
  151. package/components/OffsetWellPickerV3/components/WellHubView/index.js.map +1 -1
  152. package/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js +1 -1
  153. package/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js.map +1 -1
  154. package/components/OffsetWellPickerV4/OffsetWellPickerV4.d.ts.map +1 -1
  155. package/components/OffsetWellPickerV4/OffsetWellPickerV4.js +1 -1
  156. package/components/OffsetWellPickerV4/OffsetWellPickerV4.js.map +1 -1
  157. package/components/OffsetWellPickerV4/components/Filter/Filter.d.ts +3 -1
  158. package/components/OffsetWellPickerV4/components/Filter/Filter.d.ts.map +1 -1
  159. package/components/OffsetWellPickerV4/components/Filter/Filter.js +1 -1
  160. package/components/OffsetWellPickerV4/components/Filter/Filter.js.map +1 -1
  161. package/components/OffsetWellPickerV4/components/Filter/MultiSelect.d.ts +5 -1
  162. package/components/OffsetWellPickerV4/components/Filter/MultiSelect.d.ts.map +1 -1
  163. package/components/OffsetWellPickerV4/components/Filter/MultiSelect.js +1 -1
  164. package/components/OffsetWellPickerV4/components/Filter/MultiSelect.js.map +1 -1
  165. package/components/OffsetWellPickerV4/components/OffsetWellsTable/AdvancedSearch/AutoCompleteAssetSearch.js +1 -1
  166. package/components/OffsetWellPickerV4/components/OffsetWellsTable/AdvancedSearch/AutoCompleteAssetSearch.js.map +1 -1
  167. package/components/OffsetWellPickerV4/components/OffsetWellsTable/MetricsSettingMenu.js +1 -1
  168. package/components/OffsetWellPickerV4/components/OffsetWellsTable/MetricsSettingMenu.js.map +1 -1
  169. package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.js +1 -1
  170. package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.js.map +1 -1
  171. package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.module.css.js +1 -1
  172. package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableHead.js +1 -1
  173. package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableHead.js.map +1 -1
  174. package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableHead.module.css.js +1 -1
  175. package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableRow.js +1 -1
  176. package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableRow.js.map +1 -1
  177. package/components/OffsetWellPickerV4/components/Toolbar/Toolbar.js +1 -1
  178. package/components/OffsetWellPickerV4/components/Toolbar/Toolbar.js.map +1 -1
  179. package/components/OffsetWellPickerV4/constants.d.ts +3 -0
  180. package/components/OffsetWellPickerV4/constants.d.ts.map +1 -1
  181. package/components/OffsetWellPickerV4/constants.js +1 -1
  182. package/components/OffsetWellPickerV4/constants.js.map +1 -1
  183. package/components/OffsetWellPickerV4/effects/index.d.ts +1 -0
  184. package/components/OffsetWellPickerV4/effects/useCompanies.d.ts +7 -0
  185. package/components/OffsetWellPickerV4/effects/useCompanies.d.ts.map +1 -0
  186. package/components/OffsetWellPickerV4/effects/useCompanies.js +2 -0
  187. package/components/OffsetWellPickerV4/effects/useCompanies.js.map +1 -0
  188. package/components/OffsetWellPickerV4/effects/useFetchWells.d.ts +1 -1
  189. package/components/OffsetWellPickerV4/effects/useFetchWells.d.ts.map +1 -1
  190. package/components/OffsetWellPickerV4/effects/useFetchWells.js +1 -1
  191. package/components/OffsetWellPickerV4/effects/useFilterOptions.d.ts +2 -2
  192. package/components/OffsetWellPickerV4/effects/useFilterOptions.d.ts.map +1 -1
  193. package/components/OffsetWellPickerV4/effects/useFilterOptions.js +1 -1
  194. package/components/OffsetWellPickerV4/effects/useFilterOptions.js.map +1 -1
  195. package/components/OffsetWellPickerV4/effects/useTableColumns.d.ts +1 -1
  196. package/components/OffsetWellPickerV4/effects/useTableColumns.d.ts.map +1 -1
  197. package/components/OffsetWellPickerV4/effects/useTableColumns.js +1 -1
  198. package/components/OffsetWellPickerV4/effects/useTableColumns.js.map +1 -1
  199. package/components/OffsetWellPickerV4/utils/apiCalls.d.ts +3 -1
  200. package/components/OffsetWellPickerV4/utils/apiCalls.d.ts.map +1 -1
  201. package/components/OffsetWellPickerV4/utils/apiCalls.js +1 -1
  202. package/components/PadOffsetsPicker/StagesSelector.js +1 -1
  203. package/components/PadOffsetsPicker/StagesSelector.js.map +1 -1
  204. package/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js +1 -1
  205. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import{memo as o,useState as s,useRef as i,useEffect as n,useMemo as r,useCallback as p}from"react";import m from"classnames";import c from"prop-types";import{uniqBy as a}from"lodash";import{Table as l,TableHead as d,TableBody as j,TableRow as u,TableCell as A}from"@material-ui/core";import{METRICS_LIST as C,EXPANDED_WELL_NAME_WIDTH as S,TableColumns as h,ViewType as V,SEARCH_CELL_EXPAND_WIDTH as f,SEARCH_CELL_DEFAULT_WIDTH as I,ColumnType as g}from"../../constants.js";import{getIsImperial as v}from"../../utils/unitSystem.js";import{AdvancedSearch as b}from"./AdvancedSearch/AdvancedSearch.js";import D from"./OffsetWellsTableHead.js";import T from"./OffsetWellsTableRow.js";import P from"./OffsetWellsTable.module.css.js";import{jsxs as x,jsx as y}from"react/jsx-runtime";import"../../../DevCenter/DevCenterAppContainer/components/IsInsideIsolatedDcAppProvider/IsInsideIsolatedDcAppProvider.js";import"../../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"@icon-park/react/es/all";import"../../../../icons/IconParkProvider.js";import"../../../../icons/customIcons/icons/AddMessage.js";import"../../../../icons/customIcons/icons/Attention.js";import"../../../../icons/customIcons/icons/Collapse.js";import"../../../../icons/customIcons/icons/Dashboard.js";import"../../../../icons/customIcons/icons/Expand.js";import"../../../../icons/customIcons/icons/FolderClosed.js";import"../../../../icons/customIcons/icons/FolderClosedFilled.js";import"../../../../icons/customIcons/icons/FolderOpened.js";import"../../../../icons/customIcons/icons/GreaterOrEqual.js";import"../../../../icons/customIcons/icons/LessOrEqual.js";import"../../../../icons/customIcons/icons/Search.js";import"../../../../icons/customIcons/icons/Wellhub.js";import"../../../../icons/customIcons/icons/MultiRuler.js";import"../../../../icons/customIcons/icons/Checkbox.js";import"../../../../icons/customIcons/icons/CheckboxChecked.js";import"../../../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../../../icons/customIcons/icons/Radio.js";import"../../../../icons/customIcons/icons/RadioChecked.js";import"../../../../icons/customIcons/icons/SimulFrac.js";import"../../../../icons/customIcons/icons/ZipperFrac.js";import"../../../../icons/customIcons/icons/CautionFilled.js";import"../../../../icons/customIcons/icons/MoreApp.js";import"../../../../icons/customIcons/icons/Pad.js";import"../../../../icons/customIcons/icons/DrilloutUnit.js";import"../../../../icons/customIcons/icons/FracFleet.js";import"../../../../icons/customIcons/icons/Global.js";import"../../../../icons/customIcons/icons/Program.js";import"../../../../icons/customIcons/icons/Rig.js";import"../../../../icons/customIcons/icons/Well.js";import"../../../../icons/customIcons/icons/Gap.js";import"../../../../icons/customIcons/icons/Pin.js";import"../../../../icons/customIcons/icons/CloseOneFilled.js";import"../../../../icons/customIcons/icons/AttentionFilled.js";import"../../../../icons/customIcons/icons/CheckOneFilled.js";import"../../../../icons/customIcons/icons/Archive.js";import"../../../../icons/customIcons/icons/ArchiveCancel.js";import"../../../../icons/customIcons/icons/Unarchive.js";import"../../../../icons/customIcons/icons/Archived.js";import"../../../../icons/customIcons/icons/InterventionUnit.js";import"../../../../utils/mobileDetect.js";import"../../../IconButton/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/appPackages.js";import"../../../../constants/notifications.js";import"../../../../constants/feed.js";import"../../../../constants/bha.js";import"../../../../constants/corvaCompanyId.js";import"../../../GradientManager/configuration/constants.js";import"../../../Modal/CorvaModal.css.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"@material-ui/icons";import"../../../DevCenter/AppContext.js";import"../../../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"@babel/runtime/helpers/objectWithoutProperties";import"react-router";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"../../../../utils/index.js";import"../../../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../../../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../../../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/components/RemoveAppButton.js";import"../../../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/components/SettingsAccordion.js";import"../../../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../../../../componentsV2/Text/Text.js";import"../../../../componentsV2/Grid/Grid.js";import"../../../../componentsV2/Grid/Cell.js";import"../../../../componentsV2/Header/Header.scss.js";import"../../../../componentsV2/Button/Button.js";import"../../../../componentsV2/ButtonIcon/ButtonIcon.js";import"../../../../componentsV2/Tooltip/Tooltip.scss.js";import"../../../../componentsV2/Popover/Popover.js";import"../../../../componentsV2/Radio/Radio.js";import"../../../../componentsV2/RadioAndCheckboxGroup/RadioAndCheckboxGroup.scss.js";import"../../../../componentsV2/Checkbox/Checkbox.js";import"../../../../componentsV2/TextInput/TextInput.js";import"../../../../componentsV2/Label/Label.js";import"../../../../componentsV2/TextEndTruncated/TextEndTruncated.scss.js";import"../../../../componentsV2/TextMiddleTruncated/TextMiddleTruncated.constants.js";import"../../../../componentsV2/TextMiddleTruncated/TextMiddleTruncated.scss.js";import"../../../../componentsV2/TextLink/TextLink.js";import"../../../../componentsV2/Chip/Chip.js";import"../../../../componentsV2/ChipAlert/ChipAlert.js";import"../../../../componentsV2/ChipIndicator/ChipIndicator.js";import"../../../../componentsV2/Avatar/Avatar.js";import"../../../../componentsV2/AvatarGroup/AvatarGroup.js";import"@material-ui/lab";import"../../../../componentsV2/ToggleButtons/ToggleButtons.scss.js";import"../../../../componentsV2/Paper/Paper.js";import"../../../../componentsV2/ModalWindow/ModalWindow.scss.js";import"../../../../componentsV2/Modal/Modal.scss.js";import"../../../../componentsV2/Menu/Menu.js";import"../../../../componentsV2/utils.js";import"../../../../componentsV2/Hint/Hint.scss.js";import"../../../../componentsV2/Counter/Counter.js";import"../../../../componentsV2/BadgeBase/BadgeBase.scss.js";import"../../../../componentsV2/BadgeDot/BadgeDot.scss.js";import"../../../../componentsV2/LoaderLinear/LoaderLinear.scss.js";import"../../../../componentsV2/LoaderLogo/LoaderLogo.constants.js";import"../../../../componentsV2/LoaderLogo/LoaderLogo.scss.js";import"../../../../componentsV2/Switch/Switch.js";import"../../../../componentsV2/Tabs/Tabs.js";import"../../../../componentsV2/EmptyState/EmptyState.scss.js";import"../../../../componentsV2/FileIcon/FileIcon.js";import"../../../../componentsV2/Tag/Tag.js";import"react-dropzone";import"../../../../componentsV2/FilesDropzone/FilesDropzone.scss.js";import"../../../../componentsV2/FilesLoader/FilesLoader.scss.js";import"../../../../componentsV2/FilesProcessor/FilesProcessor.scss.js";import"../../../../componentsV2/Skeleton/Skeleton.scss.js";import"../../../../utils/main.js";import"../../../../componentsV2/CopyToClipboard/CopyToClipboard.scss.js";import"../../../../componentsV2/Stepper/Step/Step.scss.js";import"../../../../componentsV2/Stepper/Stepper.scss.js";import"../../../../componentsV2/ButtonLive/ButtonLive.js";import"../../../../componentsV2/ButtonText/ButtonText.js";import"../../../../componentsV2/IndicatorLive/IndicatorLive.js";import"../../../../componentsV2/Accordion/Accordion.scss.js";import"../../../../componentsV2/Breadcrumbs/Breadcrumbs.scss.js";import"../../../../componentsV2/BadgeComment/BadgeComment.js";import"../../../../componentsV2/AppContainer/AppContainer.js";import"../../../../componentsV2/AppContainer/AppContainer.constants.js";import"../../../../componentsV2/AppFooter/AppFooter.js";import"../../../../componentsV2/AppCommonsProvider/AppCommonsContext.js";import"../../../../componentsV2/AppHeader/AppHeader.constants.js";import"../../../../componentsV2/AppHeader/AppBadge/AppBadge.scss.js";import"../../../../componentsV2/AppHeader/AppAssets/utils.js";import"../../../../componentsV2/AppHeader/AppAssets/AppAssets.scss.js";import"../../../PadModeSelect/PadModeSelect.js";import"../../../../componentsV2/AppHeader/PadMode/PadMode.scss.js";import"../../../../constants/streamSourceType.js";import"../../../../types/shared/Completions.js";import"../../../PadModeSelect/types.js";import"lodash/flatten";import"lodash/partition";import"../../../../componentsV2/PadModeSelect/FracModeLabel/FracModeLabel.js";import"../../../../componentsV2/PadModeSelect/FracModeLabel/FracModeLabel.constants.js";import"../../../../clients/jsonApi/index.js";import"@babel/runtime/helpers/toConsumableArray";import"lodash/set";import"lodash/get";import"lodash/unset";import"moment";import"../../../../clients/subscriptions/constants.js";import"../../../../clients/subscriptions.v1.js";import"../../../../clients/subscriptions/subscriptions-client.factory.js";import"../../../../clients/api/apiCore.js";import"../../../../clients/constants.js";import"../../../../clients/sso/auth0.js";import"../../../../clients/sso/oauth2.js";import"../../../../componentsV2/PadModeSelect/WellStreamActivityStatus/WellStreamActivityStatus.scss.js";import"../../../../componentsV2/PadModeSelect/PadModeSelect.constants.js";import"../../../../componentsV2/PadModeSelect/PadModeSelect.scss.js";import"querystring";import"uuid/v1";import"jsona";import"../../../../utils/env.js";import"../../../StatusBadge/constants.js";import"lodash/isEmpty";import"lodash/sortBy";import"../../../DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchContext.js";import"../../../../componentsV2/AppHeader/V3/VersionSelect/VersionSelect.js";import"../../../../componentsV2/UniversalLink/UniversalLink.scss.js";import"../../../../componentsV2/AppHeader/V3/AssetChips/AssetChips.scss.js";import"../../../../componentsV2/AppHeader/V3/DqStatusIcon/DqStatusIcon.js";import"../../../../componentsV2/AppHeader/V3/DqStatusIcon/DqStatusIcon.constants.js";import"../../../../componentsV2/AppFooter/DqPopover/DqStatusIcon/DqStatusIcon.js";import"../../../../componentsV2/AppDqPopover/DqAlertTooltip/DqAlertTooltip.scss.js";import"../../../../componentsV2/AppDqPopover/DqAlert/DqAlert.scss.js";import"../../../../componentsV2/AppDqPopover/DqAsset/DqAsset.scss.js";import"../../../../componentsV2/AppDqPopover/AppDqPopover.scss.js";import"../../../../utils/getSingleAsset.js";import"../../../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorChip/AssetSelectorChip.js";import"../../../../componentsV2/AppHeader/V3/AssetSelector/constants.js";import"../../../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorSelect/AssetSelectorSelect.scss.js";import"../../../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorSelect/loadAssets.js";import"../../../../componentsV2/AppHeader/V3/AssetSelector/AssetSelector.scss.js";import"../../../../componentsV2/AppHeader/V3/AppTitle/AppTitle.constants.js";import"../../../../componentsV2/AppContainer/headerCommon.scss.js";import"../../../../componentsV2/AppHeader/V3/AppTitle/AppTitle.scss.js";import"../../../../componentsV2/AppHeader/V3/constants.scss.js";import"@babel/runtime/helpers/typeof";import"../../../../componentsV2/AppSizeProvider/AppSizeProvider.js";import"../../../../componentsV2/AppSettings/AppSettings.js";import"../../../../componentsV2/AppSettings/AppSettings.constants.js";import"../../../../componentsV2/AppSettings/AppSettingsPinningContext.js";import"../../../../componentsV2/AppHeader/V3/SettingsPopover/SettingsPopover.constants.js";import"../../../../componentsV2/AppHeader/V3/SettingsPopover/SettingsPopover.scss.js";import"../../../../componentsV2/AppHeader/V3/Actions/Actions.constants.js";import"../../../../componentsV2/AppHeader/V3/Actions/Actions.scss.js";import"../../../../componentsV2/AppHeader/V3/AppHeaderV3.scss.js";import"../../../../componentsV2/AppHeader/AppHeader.scss.js";import"../../../../componentsV2/OffsetWellsButton/OffsetWellsButton.js";import"../../../../componentsV2/Autocomplete/Autocomplete.scss.js";import"../../../../componentsV2/Menu/MenuItem/MenuItem.js";import"../../../../componentsV2/Autocomplete/AutocompleteListBox.js";import"../../../../componentsV2/AppSettingsDivider/AppSettingsDivider.scss.js";import"../../../../componentsV2/WellArchivedMessage/WellArchivedMessage.js";import"../../../../componentsV2/DatePicker/DatePicker.js";import"../../../../componentsV2/DragHandle/DragHandle.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/RestoreAppSizeButton/index.js";import"rollbar";import"@rollbar/react";import"../../../DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.scss.js";import"../../../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../../../Icons/AnnotationIcon.js";import"../../../Annotations/components/AnnotationsList/index.js";import"../../../Annotations/components/LastAnnotation/index.js";import"../../../Annotations/AnnotationsContext.js";import"../../../Toaster/Toaster.js";import"../../../HelpCenter/HelpCenterIcon.js";import"../../../DevCenter/NavigationBar/NavigationBar.js";import"../../../DevCenter/SideBar/SideBar.js";import"../../../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../../../DevCenter/AppFilterPanelLayout/AppFilterPanelLayout.js";import"../../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../../../AssetEditor/index.js";import"../../../AssetEditorV2/index.js";import"../../../AppVersionsSelect/AppVersionsSelect.js";import F from"../../../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"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"react-color";import"../../../SettingEditors/ColorEditor/style.css.js";import"../../../SettingEditors/DropdownEditor/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"../../../MiddleTruncatedText/MiddleTruncatedText.js";import"../../../RangeSlider/constants.js";import"../../../RangeSlider/Input.css.js";import"../../../RangeSlider/RangeSlider.css.js";import"../../../AdvancedSlider/AdvancedSlider.js";import"../../../Breadcrumbs/index.js";import"../../../VirtualizedTable/index.js";import"../../../EmptyView/EmptyView.js";import"../../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../../Button/components/Button/index.js";import"moment-timezone";import"../../../Button/components/LiveButton/components/LiveButtonStateIndicator/index.js";import"../../../Button/components/LiveButton/styles.js";import"../../../ContextMenuItem/index.js";import"../../../FolderMenuItem/index.js";import"../../../EditableItem/EditableItem/index.js";import"../../../EditableItem/EditableItemWithBadge/index.js";import"../../../Checkbox/index.js";import"../../../FolderMenuItemWithLinks/index.js";import"../../../TextField/index.js";import"../../../Chip/index.js";import"../../../Counter/index.js";import"../../../AnchorsList/AnchorsList.js";import"../../../Select/index.js";import"../../../Select/SelectFilterBy.js";import"../../../CustomSelect/index.js";import"../../../Tabs/Tabs.js";import"../../../Tabs/Tab.js";import"../../../ResizableTable/ResizableTable.js";import"../../../GradientPicker/GradientPicker.js";import"../../../GradientManager/GradientList.js";import"@material-ui/icons/AddCircle";import"../../../GradientManager/GradientPreview/GradientPreview.js";import"../../../GradientManager/GradientSelect.styles.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"../../utils/apiCalls.js";import"../../effects/useAdvancedWells.js";import"react-virtualized";import"../../effects/useAssetsData.js";import"../AppHeader/AppHeader.js";import"../Toolbar/Toolbar.js";import"../Filter/Filter.js";import"../Map/WellsMap.js";import"./AdvancedSearch/constants.js";import"../../utils/index.js";import"../../OffsetWellPickerV4.module.css.js";import"@material-ui/core/Snackbar";import"../../../Notifications/Toast.js";import"../../../Notifications/Notifications.scss.js";import"../../../../styles/typography/index.js";import"../../../../styles/counter/counter.module.scss.js";import"../../../OffsetWellMap/OffsetWellMap.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"../../../MiddleTruncate/MiddleTruncate.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"../../../Table/TablePagination/TablePagination.js";import"../../../Table/TablePaginationActions/TablePaginationActions.js";import"../../../Tooltip/ScrollableTooltip.js";import"../../../PriceInput/PriceInput.js";import"../../../LabelsCounter/LabelsCounter.js";import"../../../Stepper/Stepper.js";import"../../../Stepper/Step/Step.js";import"../../../Stepper/StepsWrapper.js";import"../../../Comment/CommentIcon/index.js";import"../../../FilesLoader/FilesLoader.js";import"../../../../componentsV2/FileIcon/icons/ArchiveFileIcon.js";import"../../../../componentsV2/FileIcon/icons/CSVFileIcon.js";import"../../../../componentsV2/FileIcon/icons/DocFileIcon.js";import"../../../../componentsV2/FileIcon/icons/EDMFileIcon.js";import"../../../../componentsV2/FileIcon/icons/ExcelFileIcon.js";import"../../../../componentsV2/FileIcon/icons/ImageFileIcon.js";import"../../../../componentsV2/FileIcon/icons/JsonFileIcon.js";import"../../../../componentsV2/FileIcon/icons/LasFileIcon.js";import"../../../../componentsV2/FileIcon/icons/OtherFileIcon.js";import"../../../../componentsV2/FileIcon/icons/PdfFileIcon.js";import"../../../../componentsV2/FileIcon/icons/PowerPointFileIcon.js";import"../../../../componentsV2/FileIcon/icons/TxtFileIcon.js";import"../../../../componentsV2/FileIcon/icons/UnknownFileIcon.js";import"../../../../componentsV2/FileIcon/icons/VideoFileIcon.js";import"../../../../componentsV2/FileIcon/icons/XmlFileIcon.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/Groups.js";import"../../../Search/components/SelectAllListItem.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"../../../AssetEditorV2/components/PrimaryAssetSelectV2.js";import"../../../EChartsWrapper/EChartsWrapper.js";import"../../../AssetsMultipleSelector/AssetsMultipleSelector.js";import"@material-ui/icons/Close";import"@material-ui/icons/GetApp";import"../../../GoogleDocsViewer/index.js";import"../../../NewDocumentViewer/effects/useFileContent.js";import"../../../NewDocumentViewer/styles.js";import"../../../FilesLoaderV2/styles.js";import"../../../FilesDropzone/styles.js";import"../../../FilesProcessor/styles.js";import"../../../Hint/styles.js";import"@babel/runtime/helpers/taggedTemplateLiteral";import"fparser";import"../../../Formula/useFormulaStyles.js";import"../../../Formula/RootXIcon.js";import"../../../Formula/FormulaTextEditor.js";import"../../../Formula/CloseSuggestion.js";import"../../../Formula/SuggestionsMenu.js";var B=function(o){var c=o.open,B=o.isTableLoading,W=o.companyId,L=o.subjectWellId,M=o.sortBy,E=o.setSortBy,w=o.sortDirection,R=o.setSortDirection,H=o.columnsWithDict,k=o.wells,O=o.metricsKeys,q=o.setMetricsKeys,N=o.handleChangeOffsetWell,G=o.handleChangeAllOffsetWells,U=o.handleAddRemoveAssets,z=o.isWellNameExpand,K=o.setIsWellNameExpand,Z=o.isHScrollMoved,X=o.onHideAdvancedSearch,J=o.isViewOnly,Q=o.isLastWell,Y=o.contentRef,$=o.offsetWellsContainerRef,_=o.isLimitedOffsetWells,ee=o.maxOffsetWellNumber,te=o.wellSections,oe=o.setActiveWellId,se=o.viewType,ie=o.isWDUser,ne=o.taScores,re=s([]),pe=t(re,2),me=pe[0],ce=pe[1],ae=i(),le=i();n((function(){var e=a(k,"id");ce(e)}),[k,k.length]);var de=r((function(){return a(me,"id")}),[me]),je=r((function(){var e=de.filter((function(e){return e.checked}));return[e,de.length!==e.length&&e.length&&!_,e.length===de.length||_]}),[de,_]),ue=t(je,3),Ae=ue[0],Ce=ue[1],Se=ue[2],he=r((function(){return v()}),[]),Ve=r((function(){return(O||[]).reduce((function(e,t){return e.concat(C.filter((function(e){return e.key===t})))}),[])}),[O]),fe=r((function(){return z?S-58:h[0].width[O.length]-58}),[z,null==O?void 0:O.length]),Ie=r((function(){var e=z?f:I;return ne.length&&(e+=function(e,t){var o=e.find((function(e){return e.key===t}));return(null==o?void 0:o.width)||0}(H,g.taScore)),"".concat(e,"px")}),[z,ne]);n((function(){if(se!==V.mobile&&ae.current&&le.current){var e=ae.current.querySelector(".".concat(P.wellNameFixed));Z?e.classList.remove(P.noShadow):e.classList.add(P.noShadow);var t=le.current.querySelectorAll(".".concat(P.wellNameFixed));Z?t.forEach((function(e){return e.classList.remove(P.noShadow)})):t.forEach((function(e){return e.classList.add(P.noShadow)}))}}),[Z,le.current,ae.current,me]);var ge=p((function(e,t){E(e),R(t)}),[]),ve=p((function(e){q(e)}),[]),be=p((function(e,t){q((function(o){return o.map((function(o){return o===e?t:o}))}))}),[]);return H&&de?x("div",{className:P.offsetWellsTable,children:[y("div",{className:P.stickyTable,children:y(l,{"aria-label":"ows table head",innerRef:ae,children:y(d,{children:y(D,{open:c,columnsWithDict:H,metricsKeys:O,sortBy:M,sortDirection:w,indeterminate:Ce,isAllWellsSelected:Se,onChangeSort:ge,onChangeMetricsKeys:ve,onUpdateMetricsKey:be,isWellNameExpand:z,setIsWellNameExpand:K,handleChangeAllOffsetWells:G,wellNameStyle:P.wellNameFixed,isViewOnly:J,isImperial:he,contentRef:Y,viewType:se,isTaColumnVisible:!!ne.length})})})}),!J&&x("div",{className:m(P.searchCellWrapper,e({},P.searchCellWrapperExpanded,z)),style:{"--dynamic-search-wrapper-width":Ie},children:[y("div",{className:P.searchCell,children:y(b,{companyId:W,subjectWellId:L,onChange:U,selectedWellIds:Ae.map((function(e){return e.id})),onHideAdvancedSearch:X})}),!!z&&y("div",{className:P.searchCellEmpty})]}),y(l,{"aria-label":"ows table body",innerRef:le,className:P.bodyTable,children:x(j,{children:[y(u,{children:y(A,{className:m(P.topShadow,e({},P.viewOnlyShadow,J))})}),de.map((function(e){return y(T,{columnsWithDict:H,subjectWellId:L,data:e,metricsKeys:O,metricsColumns:Ve,handleChangeOffsetWell:N,isWellNameExpand:z,wellNameStyle:P.wellNameFixed,wellNameWidth:fe,isViewOnly:J,isImperial:he,isLimitedOffsetWells:_,maxOffsetWellNumber:ee,wellSections:te,setActiveWellId:oe,viewType:se,isWDUser:ie,taScores:ne,offsetWellsContainerRef:$},e.id)})),!Q&&y(u,{children:y(A,{className:P.loadingCell,children:y("span",{children:"Loading..."})})}),y(u,{children:y(A,{className:P.bottomShadow})})]})}),B&&y("div",{className:P.loadingContainer,children:y(F,{fullscreen:!1,className:P.loadingIndicator})})]}):null};B.propTypes={open:c.bool.isRequired,isTableLoading:c.bool.isRequired,companyId:c.number.isRequired,subjectWellId:c.number.isRequired,sortBy:c.string.isRequired,setSortBy:c.func.isRequired,sortDirection:c.string.isRequired,setSortDirection:c.func.isRequired,columnsWithDict:c.arrayOf(c.shape({})).isRequired,wells:c.arrayOf(c.shape({})).isRequired,metricsKeys:c.arrayOf(c.string).isRequired,setMetricsKeys:c.func.isRequired,handleChangeOffsetWell:c.func.isRequired,handleChangeAllOffsetWells:c.func.isRequired,handleAddRemoveAssets:c.func.isRequired,setIsWellNameExpand:c.func.isRequired,isWellNameExpand:c.bool.isRequired,isHScrollMoved:c.bool.isRequired,onHideAdvancedSearch:c.func.isRequired,isViewOnly:c.bool.isRequired,isLastWell:c.bool.isRequired,isLimitedOffsetWells:c.bool.isRequired,maxOffsetWellNumber:c.number.isRequired,contentRef:c.shape({}).isRequired,offsetWellsContainerRef:c.shape({}).isRequired,wellSections:c.arrayOf(c.shape({})).isRequired,setActiveWellId:c.func.isRequired,viewType:c.string.isRequired,isWDUser:c.bool.isRequired,taScores:c.arrayOf(c.shape({})).isRequired};var W=o(B);export{W as default};
1
+ import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import{memo as o,useState as s,useRef as i,useEffect as n,useMemo as r,useCallback as p}from"react";import m from"classnames";import c from"prop-types";import{uniqBy as a}from"lodash";import{Table as l,TableHead as d,TableBody as j,TableRow as u,TableCell as A}from"@material-ui/core";import{METRICS_LIST as C,EXPANDED_WELL_NAME_WIDTH as S,TableColumns as h,ColumnType as V,ViewType as f,SEARCH_CELL_EXPAND_WIDTH as I,SEARCH_CELL_DEFAULT_WIDTH as v}from"../../constants.js";import{getIsImperial as g}from"../../utils/unitSystem.js";import{AdvancedSearch as b}from"./AdvancedSearch/AdvancedSearch.js";import D from"./OffsetWellsTableHead.js";import T from"./OffsetWellsTableRow.js";import P from"./OffsetWellsTable.module.css.js";import{jsxs as x,jsx as y}from"react/jsx-runtime";import"../../../DevCenter/DevCenterAppContainer/components/IsInsideIsolatedDcAppProvider/IsInsideIsolatedDcAppProvider.js";import"../../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"@icon-park/react/es/all";import"../../../../icons/IconParkProvider.js";import"../../../../icons/customIcons/icons/AddMessage.js";import"../../../../icons/customIcons/icons/Attention.js";import"../../../../icons/customIcons/icons/Collapse.js";import"../../../../icons/customIcons/icons/Dashboard.js";import"../../../../icons/customIcons/icons/Expand.js";import"../../../../icons/customIcons/icons/FolderClosed.js";import"../../../../icons/customIcons/icons/FolderClosedFilled.js";import"../../../../icons/customIcons/icons/FolderOpened.js";import"../../../../icons/customIcons/icons/GreaterOrEqual.js";import"../../../../icons/customIcons/icons/LessOrEqual.js";import"../../../../icons/customIcons/icons/Search.js";import"../../../../icons/customIcons/icons/Wellhub.js";import"../../../../icons/customIcons/icons/MultiRuler.js";import"../../../../icons/customIcons/icons/Checkbox.js";import"../../../../icons/customIcons/icons/CheckboxChecked.js";import"../../../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../../../icons/customIcons/icons/Radio.js";import"../../../../icons/customIcons/icons/RadioChecked.js";import"../../../../icons/customIcons/icons/SimulFrac.js";import"../../../../icons/customIcons/icons/ZipperFrac.js";import"../../../../icons/customIcons/icons/CautionFilled.js";import"../../../../icons/customIcons/icons/MoreApp.js";import"../../../../icons/customIcons/icons/Pad.js";import"../../../../icons/customIcons/icons/DrilloutUnit.js";import"../../../../icons/customIcons/icons/FracFleet.js";import"../../../../icons/customIcons/icons/Global.js";import"../../../../icons/customIcons/icons/Program.js";import"../../../../icons/customIcons/icons/Rig.js";import"../../../../icons/customIcons/icons/Well.js";import"../../../../icons/customIcons/icons/Gap.js";import"../../../../icons/customIcons/icons/Pin.js";import"../../../../icons/customIcons/icons/CloseOneFilled.js";import"../../../../icons/customIcons/icons/AttentionFilled.js";import"../../../../icons/customIcons/icons/CheckOneFilled.js";import"../../../../icons/customIcons/icons/Archive.js";import"../../../../icons/customIcons/icons/ArchiveCancel.js";import"../../../../icons/customIcons/icons/Unarchive.js";import"../../../../icons/customIcons/icons/Archived.js";import"../../../../icons/customIcons/icons/InterventionUnit.js";import"../../../../utils/mobileDetect.js";import"../../../IconButton/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/appPackages.js";import"../../../../constants/notifications.js";import"../../../../constants/feed.js";import"../../../../constants/bha.js";import"../../../../constants/corvaCompanyId.js";import"../../../GradientManager/configuration/constants.js";import"../../../Modal/CorvaModal.css.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"@material-ui/icons";import"../../../DevCenter/AppContext.js";import"../../../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"@babel/runtime/helpers/objectWithoutProperties";import"react-router";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"../../../../utils/index.js";import"../../../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../../../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../../../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/components/RemoveAppButton.js";import"../../../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/components/SettingsAccordion.js";import"../../../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../../../../componentsV2/Text/Text.js";import"../../../../componentsV2/Grid/Grid.js";import"../../../../componentsV2/Grid/Cell.js";import"../../../../componentsV2/Header/Header.scss.js";import"../../../../componentsV2/Button/Button.js";import"../../../../componentsV2/ButtonIcon/ButtonIcon.js";import"../../../../componentsV2/Tooltip/Tooltip.scss.js";import"../../../../componentsV2/Popover/Popover.js";import"../../../../componentsV2/Radio/Radio.js";import"../../../../componentsV2/RadioAndCheckboxGroup/RadioAndCheckboxGroup.scss.js";import"../../../../componentsV2/Checkbox/Checkbox.js";import"../../../../componentsV2/TextInput/TextInput.js";import"../../../../componentsV2/Label/Label.js";import"../../../../componentsV2/TextEndTruncated/TextEndTruncated.scss.js";import"../../../../componentsV2/TextMiddleTruncated/TextMiddleTruncated.constants.js";import"../../../../componentsV2/TextMiddleTruncated/TextMiddleTruncated.scss.js";import"../../../../componentsV2/TextLink/TextLink.js";import"../../../../componentsV2/Chip/Chip.js";import"../../../../componentsV2/ChipAlert/ChipAlert.js";import"../../../../componentsV2/ChipIndicator/ChipIndicator.js";import"../../../../componentsV2/Avatar/Avatar.js";import"../../../../componentsV2/AvatarGroup/AvatarGroup.js";import"@material-ui/lab";import"../../../../componentsV2/ToggleButtons/ToggleButtons.scss.js";import"../../../../componentsV2/Paper/Paper.js";import"../../../../componentsV2/ModalWindow/ModalWindow.scss.js";import"../../../../componentsV2/Modal/Modal.scss.js";import"../../../../componentsV2/Menu/Menu.js";import"../../../../componentsV2/utils.js";import"../../../../componentsV2/Hint/Hint.scss.js";import"../../../../componentsV2/Counter/Counter.js";import"../../../../componentsV2/BadgeBase/BadgeBase.scss.js";import"../../../../componentsV2/BadgeDot/BadgeDot.scss.js";import"../../../../componentsV2/LoaderLinear/LoaderLinear.scss.js";import"../../../../componentsV2/LoaderLogo/LoaderLogo.constants.js";import"../../../../componentsV2/LoaderLogo/LoaderLogo.scss.js";import"../../../../componentsV2/Switch/Switch.js";import"../../../../componentsV2/Tabs/Tabs.js";import"../../../../componentsV2/EmptyState/EmptyState.scss.js";import"../../../../componentsV2/FileIcon/FileIcon.js";import"../../../../componentsV2/Tag/Tag.js";import"react-dropzone";import"../../../../componentsV2/FilesDropzone/FilesDropzone.scss.js";import"../../../../componentsV2/FilesLoader/FilesLoader.scss.js";import"../../../../componentsV2/FilesProcessor/FilesProcessor.scss.js";import"../../../../componentsV2/Skeleton/Skeleton.scss.js";import"../../../../utils/main.js";import"../../../../componentsV2/CopyToClipboard/CopyToClipboard.scss.js";import"../../../../componentsV2/Stepper/Step/Step.scss.js";import"../../../../componentsV2/Stepper/Stepper.scss.js";import"../../../../componentsV2/ButtonLive/ButtonLive.js";import"../../../../componentsV2/ButtonText/ButtonText.js";import"../../../../componentsV2/IndicatorLive/IndicatorLive.js";import"../../../../componentsV2/Accordion/Accordion.scss.js";import"../../../../componentsV2/Breadcrumbs/Breadcrumbs.scss.js";import"../../../../componentsV2/BadgeComment/BadgeComment.js";import"../../../../componentsV2/AppContainer/AppContainer.js";import"../../../../componentsV2/AppContainer/AppContainer.constants.js";import"../../../../componentsV2/AppFooter/AppFooter.js";import"../../../../componentsV2/AppCommonsProvider/AppCommonsContext.js";import"../../../../componentsV2/AppHeader/AppHeader.constants.js";import"../../../../componentsV2/AppHeader/AppBadge/AppBadge.scss.js";import"../../../../componentsV2/AppHeader/AppAssets/utils.js";import"../../../../componentsV2/AppHeader/AppAssets/AppAssets.scss.js";import"../../../PadModeSelect/PadModeSelect.js";import"../../../../componentsV2/AppHeader/PadMode/PadMode.scss.js";import"../../../../constants/streamSourceType.js";import"../../../../types/shared/Completions.js";import"../../../PadModeSelect/types.js";import"lodash/flatten";import"lodash/partition";import"../../../../componentsV2/PadModeSelect/FracModeLabel/FracModeLabel.js";import"../../../../componentsV2/PadModeSelect/FracModeLabel/FracModeLabel.constants.js";import"../../../../clients/jsonApi/index.js";import"@babel/runtime/helpers/toConsumableArray";import"lodash/set";import"lodash/get";import"lodash/unset";import"moment";import"../../../../clients/subscriptions/constants.js";import"../../../../clients/subscriptions.v1.js";import"../../../../clients/subscriptions/subscriptions-client.factory.js";import"../../../../clients/api/apiCore.js";import"../../../../clients/constants.js";import"../../../../clients/sso/auth0.js";import"../../../../clients/sso/oauth2.js";import"../../../../componentsV2/PadModeSelect/WellStreamActivityStatus/WellStreamActivityStatus.scss.js";import"../../../../componentsV2/PadModeSelect/PadModeSelect.constants.js";import"../../../../componentsV2/PadModeSelect/PadModeSelect.scss.js";import"querystring";import"uuid/v1";import"jsona";import"../../../../utils/env.js";import"../../../StatusBadge/constants.js";import"lodash/isEmpty";import"lodash/sortBy";import"../../../DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchContext.js";import"../../../../componentsV2/AppHeader/V3/VersionSelect/VersionSelect.js";import"../../../../componentsV2/UniversalLink/UniversalLink.scss.js";import"../../../../componentsV2/AppHeader/V3/AssetChips/AssetChips.scss.js";import"../../../../componentsV2/AppHeader/V3/DqStatusIcon/DqStatusIcon.js";import"../../../../componentsV2/AppHeader/V3/DqStatusIcon/DqStatusIcon.constants.js";import"../../../../componentsV2/AppFooter/DqPopover/DqStatusIcon/DqStatusIcon.js";import"../../../../componentsV2/AppDqPopover/DqAlertTooltip/DqAlertTooltip.scss.js";import"../../../../componentsV2/AppDqPopover/DqAlert/DqAlert.scss.js";import"../../../../componentsV2/AppDqPopover/DqAsset/DqAsset.scss.js";import"../../../../componentsV2/AppDqPopover/AppDqPopover.scss.js";import"../../../../utils/getSingleAsset.js";import"../../../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorChip/AssetSelectorChip.js";import"../../../../componentsV2/AppHeader/V3/AssetSelector/constants.js";import"../../../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorSelect/AssetSelectorSelect.scss.js";import"../../../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorSelect/loadAssets.js";import"../../../../componentsV2/AppHeader/V3/AssetSelector/AssetSelector.scss.js";import"../../../../componentsV2/AppHeader/V3/AppTitle/AppTitle.constants.js";import"../../../../componentsV2/AppContainer/headerCommon.scss.js";import"../../../../componentsV2/AppHeader/V3/AppTitle/AppTitle.scss.js";import"../../../../componentsV2/AppHeader/V3/constants.scss.js";import"@babel/runtime/helpers/typeof";import"../../../../componentsV2/AppSizeProvider/AppSizeProvider.js";import"../../../../componentsV2/AppSettings/AppSettings.js";import"../../../../componentsV2/AppSettings/AppSettings.constants.js";import"../../../../componentsV2/AppSettings/AppSettingsPinningContext.js";import"../../../../componentsV2/AppHeader/V3/SettingsPopover/SettingsPopover.constants.js";import"../../../../componentsV2/AppHeader/V3/SettingsPopover/SettingsPopover.scss.js";import"../../../../componentsV2/AppHeader/V3/Actions/Actions.constants.js";import"../../../../componentsV2/AppHeader/V3/Actions/Actions.scss.js";import"../../../../componentsV2/AppHeader/V3/AppHeaderV3.scss.js";import"../../../../componentsV2/AppHeader/AppHeader.scss.js";import"../../../../componentsV2/OffsetWellsButton/OffsetWellsButton.js";import"../../../../componentsV2/Autocomplete/Autocomplete.scss.js";import"../../../../componentsV2/Menu/MenuItem/MenuItem.js";import"../../../../componentsV2/Autocomplete/AutocompleteListBox.js";import"../../../../componentsV2/AppSettingsDivider/AppSettingsDivider.scss.js";import"../../../../componentsV2/WellArchivedMessage/WellArchivedMessage.js";import"../../../../componentsV2/DatePicker/DatePicker.js";import"../../../../componentsV2/DragHandle/DragHandle.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/RestoreAppSizeButton/index.js";import"rollbar";import"@rollbar/react";import"../../../DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.scss.js";import"../../../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../../../Icons/AnnotationIcon.js";import"../../../Annotations/components/AnnotationsList/index.js";import"../../../Annotations/components/LastAnnotation/index.js";import"../../../Annotations/AnnotationsContext.js";import"../../../Toaster/Toaster.js";import"../../../HelpCenter/HelpCenterIcon.js";import"../../../DevCenter/NavigationBar/NavigationBar.js";import"../../../DevCenter/SideBar/SideBar.js";import"../../../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../../../DevCenter/AppFilterPanelLayout/AppFilterPanelLayout.js";import"../../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../../../AssetEditor/index.js";import"../../../AssetEditorV2/index.js";import"../../../AppVersionsSelect/AppVersionsSelect.js";import F from"../../../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"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"react-color";import"../../../SettingEditors/ColorEditor/style.css.js";import"../../../SettingEditors/DropdownEditor/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"../../../MiddleTruncatedText/MiddleTruncatedText.js";import"../../../RangeSlider/constants.js";import"../../../RangeSlider/Input.css.js";import"../../../RangeSlider/RangeSlider.css.js";import"../../../AdvancedSlider/AdvancedSlider.js";import"../../../Breadcrumbs/index.js";import"../../../VirtualizedTable/index.js";import"../../../EmptyView/EmptyView.js";import"../../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../../Button/components/Button/index.js";import"moment-timezone";import"../../../Button/components/LiveButton/components/LiveButtonStateIndicator/index.js";import"../../../Button/components/LiveButton/styles.js";import"../../../ContextMenuItem/index.js";import"../../../FolderMenuItem/index.js";import"../../../EditableItem/EditableItem/index.js";import"../../../EditableItem/EditableItemWithBadge/index.js";import"../../../Checkbox/index.js";import"../../../FolderMenuItemWithLinks/index.js";import"../../../TextField/index.js";import"../../../Chip/index.js";import"../../../Counter/index.js";import"../../../AnchorsList/AnchorsList.js";import"../../../Select/index.js";import"../../../Select/SelectFilterBy.js";import"../../../CustomSelect/index.js";import"../../../Tabs/Tabs.js";import"../../../Tabs/Tab.js";import"../../../ResizableTable/ResizableTable.js";import"../../../GradientPicker/GradientPicker.js";import"../../../GradientManager/GradientList.js";import"@material-ui/icons/AddCircle";import"../../../GradientManager/GradientPreview/GradientPreview.js";import"../../../GradientManager/GradientSelect.styles.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"../../utils/apiCalls.js";import"../../effects/useAdvancedWells.js";import"react-virtualized";import"../../effects/useAssetsData.js";import"../../../../permissions/PermissionsContext.js";import"../../../../permissions/constants/index.js";import"../../../../permissions/withPermissionsHOC.js";import"../../../../permissions/ProvidePermissions.js";import"../AppHeader/AppHeader.js";import"../Toolbar/Toolbar.js";import"../Filter/Filter.js";import"../Map/WellsMap.js";import"./AdvancedSearch/constants.js";import"../../utils/index.js";import"../../OffsetWellPickerV4.module.css.js";import"@material-ui/core/Snackbar";import"../../../Notifications/Toast.js";import"../../../Notifications/Notifications.scss.js";import"../../../../styles/typography/index.js";import"../../../../styles/counter/counter.module.scss.js";import"../../../OffsetWellMap/OffsetWellMap.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"../../../MiddleTruncate/MiddleTruncate.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"../../../Table/TablePagination/TablePagination.js";import"../../../Table/TablePaginationActions/TablePaginationActions.js";import"../../../Tooltip/ScrollableTooltip.js";import"../../../PriceInput/PriceInput.js";import"../../../LabelsCounter/LabelsCounter.js";import"../../../Stepper/Stepper.js";import"../../../Stepper/Step/Step.js";import"../../../Stepper/StepsWrapper.js";import"../../../Comment/CommentIcon/index.js";import"../../../FilesLoader/FilesLoader.js";import"../../../../componentsV2/FileIcon/icons/ArchiveFileIcon.js";import"../../../../componentsV2/FileIcon/icons/CSVFileIcon.js";import"../../../../componentsV2/FileIcon/icons/DocFileIcon.js";import"../../../../componentsV2/FileIcon/icons/EDMFileIcon.js";import"../../../../componentsV2/FileIcon/icons/ExcelFileIcon.js";import"../../../../componentsV2/FileIcon/icons/ImageFileIcon.js";import"../../../../componentsV2/FileIcon/icons/JsonFileIcon.js";import"../../../../componentsV2/FileIcon/icons/LasFileIcon.js";import"../../../../componentsV2/FileIcon/icons/OtherFileIcon.js";import"../../../../componentsV2/FileIcon/icons/PdfFileIcon.js";import"../../../../componentsV2/FileIcon/icons/PowerPointFileIcon.js";import"../../../../componentsV2/FileIcon/icons/TxtFileIcon.js";import"../../../../componentsV2/FileIcon/icons/UnknownFileIcon.js";import"../../../../componentsV2/FileIcon/icons/VideoFileIcon.js";import"../../../../componentsV2/FileIcon/icons/XmlFileIcon.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/Groups.js";import"../../../Search/components/SelectAllListItem.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"../../../AssetEditorV2/components/PrimaryAssetSelectV2.js";import"../../../EChartsWrapper/EChartsWrapper.js";import"../../../AssetsMultipleSelector/AssetsMultipleSelector.js";import"@material-ui/icons/Close";import"@material-ui/icons/GetApp";import"../../../GoogleDocsViewer/index.js";import"../../../NewDocumentViewer/effects/useFileContent.js";import"../../../NewDocumentViewer/styles.js";import"../../../FilesLoaderV2/styles.js";import"../../../FilesDropzone/styles.js";import"../../../FilesProcessor/styles.js";import"../../../Hint/styles.js";import"@babel/runtime/helpers/taggedTemplateLiteral";import"fparser";import"../../../Formula/useFormulaStyles.js";import"../../../Formula/RootXIcon.js";import"../../../Formula/FormulaTextEditor.js";import"../../../Formula/CloseSuggestion.js";import"../../../Formula/SuggestionsMenu.js";function B(e,t){var o=e.find((function(e){return e.key===t}));return(null==o?void 0:o.width)||0}var W=function(o){var c=o.open,W=o.isTableLoading,L=o.companyId,M=o.subjectWellId,E=o.sortBy,w=o.setSortBy,R=o.sortDirection,H=o.setSortDirection,k=o.columnsWithDict,O=o.wells,q=o.metricsKeys,N=o.setMetricsKeys,G=o.handleChangeOffsetWell,U=o.handleChangeAllOffsetWells,z=o.handleAddRemoveAssets,K=o.isWellNameExpand,Z=o.setIsWellNameExpand,X=o.isHScrollMoved,J=o.onHideAdvancedSearch,Q=o.isViewOnly,Y=o.isLastWell,$=o.contentRef,_=o.offsetWellsContainerRef,ee=o.isLimitedOffsetWells,te=o.maxOffsetWellNumber,oe=o.wellSections,se=o.setActiveWellId,ie=o.viewType,ne=o.isWDUser,re=o.taScores,pe=s([]),me=t(pe,2),ce=me[0],ae=me[1],le=i(),de=i();n((function(){var e=a(O,"id");ae(e)}),[O,O.length]);var je=r((function(){return a(ce,"id")}),[ce]),ue=r((function(){var e=je.filter((function(e){return e.checked}));return[e,je.length!==e.length&&e.length&&!ee,e.length===je.length||ee]}),[je,ee]),Ae=t(ue,3),Ce=Ae[0],Se=Ae[1],he=Ae[2],Ve=r((function(){return g()}),[]),fe=r((function(){return(q||[]).reduce((function(e,t){return e.concat(C.filter((function(e){return e.key===t})))}),[])}),[q]),Ie=r((function(){return K?S-58:h[0].width[q.length]-58}),[K,null==q?void 0:q.length]),ve=r((function(){var e=K?I:v;return re.length&&(e+=B(k,V.taScore)),null!=k&&k.some((function(e){return e.key===V.company}))&&(e+=B(k,V.company)),"".concat(e,"px")}),[K,re,k]);n((function(){if(ie!==f.mobile&&le.current&&de.current){var e=le.current.querySelector(".".concat(P.wellNameFixed));X?e.classList.remove(P.noShadow):e.classList.add(P.noShadow);var t=de.current.querySelectorAll(".".concat(P.wellNameFixed));X?t.forEach((function(e){return e.classList.remove(P.noShadow)})):t.forEach((function(e){return e.classList.add(P.noShadow)}))}}),[X,de.current,le.current,ce]);var ge=p((function(e,t){w(e),H(t)}),[]),be=p((function(e){N(e)}),[]),De=p((function(e,t){N((function(o){return o.map((function(o){return o===e?t:o}))}))}),[]);return k&&je?x("div",{className:P.offsetWellsTable,children:[y("div",{className:P.stickyTable,children:y(l,{"aria-label":"ows table head",innerRef:le,children:y(d,{children:y(D,{open:c,columnsWithDict:k,metricsKeys:q,sortBy:E,sortDirection:R,indeterminate:Se,isAllWellsSelected:he,onChangeSort:ge,onChangeMetricsKeys:be,onUpdateMetricsKey:De,isWellNameExpand:K,setIsWellNameExpand:Z,handleChangeAllOffsetWells:U,wellNameStyle:P.wellNameFixed,isViewOnly:Q,isImperial:Ve,contentRef:$,viewType:ie,isTaColumnVisible:!!re.length})})})}),!Q&&x("div",{className:m(P.searchCellWrapper,e({},P.searchCellWrapperExpanded,K)),style:{"--dynamic-search-wrapper-width":ve},children:[y("div",{className:P.searchCell,children:y(b,{companyId:L,subjectWellId:M,onChange:z,selectedWellIds:Ce.map((function(e){return e.id})),onHideAdvancedSearch:J})}),!!K&&y("div",{className:P.searchCellEmpty})]}),y(l,{"aria-label":"ows table body",innerRef:de,className:P.bodyTable,children:x(j,{children:[y(u,{children:y(A,{className:m(P.topShadow,e({},P.viewOnlyShadow,Q))})}),je.map((function(e){return y(T,{columnsWithDict:k,subjectWellId:M,data:e,metricsKeys:q,metricsColumns:fe,handleChangeOffsetWell:G,isWellNameExpand:K,wellNameStyle:P.wellNameFixed,wellNameWidth:Ie,isViewOnly:Q,isImperial:Ve,isLimitedOffsetWells:ee,maxOffsetWellNumber:te,wellSections:oe,setActiveWellId:se,viewType:ie,isWDUser:ne,taScores:re,offsetWellsContainerRef:_},e.id)})),!Y&&y(u,{children:y(A,{className:P.loadingCell,children:y("span",{children:"Loading..."})})}),y(u,{children:y(A,{className:P.bottomShadow})})]})}),W&&y("div",{className:P.loadingContainer,children:y(F,{fullscreen:!1,className:P.loadingIndicator})})]}):null};W.propTypes={open:c.bool.isRequired,isTableLoading:c.bool.isRequired,companyId:c.number.isRequired,subjectWellId:c.number.isRequired,sortBy:c.string.isRequired,setSortBy:c.func.isRequired,sortDirection:c.string.isRequired,setSortDirection:c.func.isRequired,columnsWithDict:c.arrayOf(c.shape({})).isRequired,wells:c.arrayOf(c.shape({})).isRequired,metricsKeys:c.arrayOf(c.string).isRequired,setMetricsKeys:c.func.isRequired,handleChangeOffsetWell:c.func.isRequired,handleChangeAllOffsetWells:c.func.isRequired,handleAddRemoveAssets:c.func.isRequired,setIsWellNameExpand:c.func.isRequired,isWellNameExpand:c.bool.isRequired,isHScrollMoved:c.bool.isRequired,onHideAdvancedSearch:c.func.isRequired,isViewOnly:c.bool.isRequired,isLastWell:c.bool.isRequired,isLimitedOffsetWells:c.bool.isRequired,maxOffsetWellNumber:c.number.isRequired,contentRef:c.shape({}).isRequired,offsetWellsContainerRef:c.shape({}).isRequired,wellSections:c.arrayOf(c.shape({})).isRequired,setActiveWellId:c.func.isRequired,viewType:c.string.isRequired,isWDUser:c.bool.isRequired,taScores:c.arrayOf(c.shape({})).isRequired};var L=o(W);export{L as default};
2
2
  //# sourceMappingURL=OffsetWellsTable.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"OffsetWellsTable.js","sources":["../../../../../src/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.js"],"sourcesContent":["import { useState, memo, useCallback, useEffect, useMemo, useRef } from 'react';\nimport classNames from 'classnames';\nimport PropTypes from 'prop-types';\nimport { uniqBy } from 'lodash';\nimport { Table, TableBody, TableCell, TableHead, TableRow } from '@material-ui/core';\n\nimport {\n ColumnType,\n EXPANDED_WELL_NAME_WIDTH,\n SEARCH_CELL_DEFAULT_WIDTH,\n SEARCH_CELL_EXPAND_WIDTH,\n METRICS_LIST,\n TableColumns,\n ViewType,\n} from '../../constants';\nimport { getIsImperial } from '../../utils/unitSystem';\n\nimport { AdvancedSearch } from './AdvancedSearch';\nimport OffsetWellsTableHead from './OffsetWellsTableHead';\nimport OffsetWellsTableRow from './OffsetWellsTableRow';\n\nimport styles from './OffsetWellsTable.module.css';\n\nimport { LoadingIndicator } from '~/components';\n\nconst DIFF_WELL_NAME_WIDTH = 58;\n\nfunction getCellWidth(columnsWithDict, key) {\n const cell = columnsWithDict.find(item => item.key === key);\n return cell?.width || 0;\n}\n\nconst OffsetWellsTable = ({\n open,\n isTableLoading,\n companyId,\n subjectWellId,\n sortBy,\n setSortBy,\n sortDirection,\n setSortDirection,\n columnsWithDict,\n wells: updatedWells,\n metricsKeys,\n setMetricsKeys,\n handleChangeOffsetWell,\n handleChangeAllOffsetWells,\n handleAddRemoveAssets,\n isWellNameExpand,\n setIsWellNameExpand,\n isHScrollMoved,\n onHideAdvancedSearch,\n isViewOnly,\n isLastWell,\n contentRef,\n offsetWellsContainerRef,\n isLimitedOffsetWells,\n maxOffsetWellNumber,\n wellSections,\n setActiveWellId,\n viewType,\n isWDUser,\n taScores,\n}) => {\n const [wells, setWells] = useState([]);\n /** @type {ReturnType<typeof useRef<HTMLElement>>} */\n const headTableRef = useRef();\n /** @type {ReturnType<typeof useRef<HTMLElement>>} */\n const bodyTableRef = useRef();\n\n useEffect(() => {\n const uniqUpdatedWells = uniqBy(updatedWells, 'id');\n setWells(uniqUpdatedWells);\n }, [updatedWells, updatedWells.length]);\n\n const uniqWells = useMemo(() => uniqBy(wells, 'id'), [wells]);\n\n const [selectedWells, indeterminate, isAllWellsSelected] = useMemo(() => {\n const selectedWells = uniqWells.filter(well => well.checked);\n const indeterminate =\n uniqWells.length !== selectedWells.length && selectedWells.length && !isLimitedOffsetWells;\n const isAllWellsSelected = selectedWells.length === uniqWells.length || isLimitedOffsetWells;\n\n return [selectedWells, indeterminate, isAllWellsSelected];\n }, [uniqWells, isLimitedOffsetWells]);\n\n const isImperial = useMemo(() => getIsImperial(), []);\n\n const metricsColumns = useMemo(() => {\n // NOTE: Pay attention to the order of metrics and duplication\n return (metricsKeys || []).reduce(\n (result, key) => result.concat(METRICS_LIST.filter(item => item.key === key)),\n []\n );\n }, [metricsKeys]);\n\n const wellNameWidth = useMemo(() => {\n if (isWellNameExpand) return EXPANDED_WELL_NAME_WIDTH - DIFF_WELL_NAME_WIDTH;\n return TableColumns[0].width[metricsKeys.length] - DIFF_WELL_NAME_WIDTH;\n }, [isWellNameExpand, metricsKeys?.length]);\n\n const searchWrapperWidth = useMemo(() => {\n let initialWidth = isWellNameExpand ? SEARCH_CELL_EXPAND_WIDTH : SEARCH_CELL_DEFAULT_WIDTH;\n if (taScores.length) {\n initialWidth += getCellWidth(columnsWithDict, ColumnType.taScore);\n }\n return `${initialWidth}px`;\n }, [isWellNameExpand, taScores]);\n\n // NOTE: Remove shadow from column\n useEffect(() => {\n if (viewType === ViewType.mobile || !headTableRef.current || !bodyTableRef.current) return;\n // Head table\n const headColumn = headTableRef.current.querySelector(`.${styles.wellNameFixed}`);\n if (!isHScrollMoved) {\n headColumn.classList.add(styles.noShadow);\n } else {\n headColumn.classList.remove(styles.noShadow);\n }\n\n // Body table\n const bodyColumns = bodyTableRef.current.querySelectorAll(`.${styles.wellNameFixed}`);\n if (!isHScrollMoved) {\n bodyColumns.forEach(th => th.classList.add(styles.noShadow));\n } else {\n bodyColumns.forEach(th => th.classList.remove(styles.noShadow));\n }\n }, [isHScrollMoved, bodyTableRef.current, headTableRef.current, wells]);\n\n const handleChangeSortBy = useCallback((sortKey, sortDirection) => {\n setSortBy(sortKey);\n setSortDirection(sortDirection);\n }, []);\n\n const handleChangeMetricsKeys = useCallback(newMetricsKeys => {\n setMetricsKeys(newMetricsKeys);\n }, []);\n\n const handleUpdateMetricsKey = useCallback((key, newValue) => {\n setMetricsKeys(prevKeys => prevKeys.map(item => (item === key ? newValue : item)));\n }, []);\n\n if (!columnsWithDict || !uniqWells) return null;\n\n return (\n <div className={styles.offsetWellsTable}>\n <div className={styles.stickyTable}>\n <Table aria-label=\"ows table head\" innerRef={headTableRef}>\n <TableHead>\n <OffsetWellsTableHead\n open={open}\n columnsWithDict={columnsWithDict}\n metricsKeys={metricsKeys}\n sortBy={sortBy}\n sortDirection={sortDirection}\n indeterminate={indeterminate}\n isAllWellsSelected={isAllWellsSelected}\n onChangeSort={handleChangeSortBy}\n onChangeMetricsKeys={handleChangeMetricsKeys}\n onUpdateMetricsKey={handleUpdateMetricsKey}\n isWellNameExpand={isWellNameExpand}\n setIsWellNameExpand={setIsWellNameExpand}\n handleChangeAllOffsetWells={handleChangeAllOffsetWells}\n wellNameStyle={styles.wellNameFixed}\n isViewOnly={isViewOnly}\n isImperial={isImperial}\n contentRef={contentRef}\n viewType={viewType}\n isTaColumnVisible={!!taScores.length}\n />\n </TableHead>\n </Table>\n </div>\n\n {!isViewOnly && (\n <div\n className={classNames(styles.searchCellWrapper, {\n [styles.searchCellWrapperExpanded]: isWellNameExpand,\n })}\n style={{ '--dynamic-search-wrapper-width': searchWrapperWidth }}\n >\n <div className={styles.searchCell}>\n <AdvancedSearch\n companyId={companyId}\n subjectWellId={subjectWellId}\n onChange={handleAddRemoveAssets}\n selectedWellIds={selectedWells.map(({ id }) => id)}\n onHideAdvancedSearch={onHideAdvancedSearch}\n />\n </div>\n {!!isWellNameExpand && <div className={styles.searchCellEmpty} />}\n </div>\n )}\n\n <Table aria-label=\"ows table body\" innerRef={bodyTableRef} className={styles.bodyTable}>\n <TableBody>\n <TableRow>\n <TableCell\n className={classNames(styles.topShadow, { [styles.viewOnlyShadow]: isViewOnly })}\n />\n </TableRow>\n {uniqWells.map(well => (\n <OffsetWellsTableRow\n key={well.id}\n columnsWithDict={columnsWithDict}\n subjectWellId={subjectWellId}\n data={well}\n metricsKeys={metricsKeys}\n metricsColumns={metricsColumns}\n handleChangeOffsetWell={handleChangeOffsetWell}\n isWellNameExpand={isWellNameExpand}\n wellNameStyle={styles.wellNameFixed}\n wellNameWidth={wellNameWidth}\n isViewOnly={isViewOnly}\n isImperial={isImperial}\n isLimitedOffsetWells={isLimitedOffsetWells}\n maxOffsetWellNumber={maxOffsetWellNumber}\n wellSections={wellSections}\n setActiveWellId={setActiveWellId}\n viewType={viewType}\n isWDUser={isWDUser}\n taScores={taScores}\n offsetWellsContainerRef={offsetWellsContainerRef}\n />\n ))}\n {!isLastWell && (\n <TableRow>\n <TableCell className={styles.loadingCell}>\n <span>Loading...</span>\n </TableCell>\n </TableRow>\n )}\n <TableRow>\n <TableCell className={styles.bottomShadow} />\n </TableRow>\n </TableBody>\n </Table>\n\n {isTableLoading && (\n <div className={styles.loadingContainer}>\n <LoadingIndicator fullscreen={false} className={styles.loadingIndicator} />\n </div>\n )}\n </div>\n );\n};\n\nOffsetWellsTable.propTypes = {\n open: PropTypes.bool.isRequired,\n isTableLoading: PropTypes.bool.isRequired,\n companyId: PropTypes.number.isRequired,\n subjectWellId: PropTypes.number.isRequired,\n sortBy: PropTypes.string.isRequired,\n setSortBy: PropTypes.func.isRequired,\n sortDirection: PropTypes.string.isRequired,\n setSortDirection: PropTypes.func.isRequired,\n columnsWithDict: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n wells: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n metricsKeys: PropTypes.arrayOf(PropTypes.string).isRequired,\n setMetricsKeys: PropTypes.func.isRequired,\n handleChangeOffsetWell: PropTypes.func.isRequired,\n handleChangeAllOffsetWells: PropTypes.func.isRequired,\n handleAddRemoveAssets: PropTypes.func.isRequired,\n setIsWellNameExpand: PropTypes.func.isRequired,\n isWellNameExpand: PropTypes.bool.isRequired,\n isHScrollMoved: PropTypes.bool.isRequired,\n onHideAdvancedSearch: PropTypes.func.isRequired,\n isViewOnly: PropTypes.bool.isRequired,\n isLastWell: PropTypes.bool.isRequired,\n isLimitedOffsetWells: PropTypes.bool.isRequired,\n maxOffsetWellNumber: PropTypes.number.isRequired,\n contentRef: PropTypes.shape({}).isRequired,\n offsetWellsContainerRef: PropTypes.shape({}).isRequired,\n wellSections: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n setActiveWellId: PropTypes.func.isRequired,\n viewType: PropTypes.string.isRequired,\n isWDUser: PropTypes.bool.isRequired,\n taScores: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n};\n\nexport default memo(OffsetWellsTable);\n"],"names":["OffsetWellsTable","_ref","open","isTableLoading","companyId","subjectWellId","sortBy","setSortBy","sortDirection","setSortDirection","columnsWithDict","updatedWells","wells","metricsKeys","setMetricsKeys","handleChangeOffsetWell","handleChangeAllOffsetWells","handleAddRemoveAssets","isWellNameExpand","setIsWellNameExpand","isHScrollMoved","onHideAdvancedSearch","isViewOnly","isLastWell","contentRef","offsetWellsContainerRef","isLimitedOffsetWells","maxOffsetWellNumber","wellSections","setActiveWellId","viewType","isWDUser","taScores","useState","_useState2","_slicedToArray","_useState","setWells","headTableRef","useRef","bodyTableRef","useEffect","uniqUpdatedWells","uniqBy","length","uniqWells","useMemo","selectedWells","filter","well","checked","_useMemo2","_useMemo","indeterminate","isAllWellsSelected","isImperial","getIsImperial","metricsColumns","reduce","result","key","concat","METRICS_LIST","item","wellNameWidth","EXPANDED_WELL_NAME_WIDTH","TableColumns","width","searchWrapperWidth","initialWidth","SEARCH_CELL_EXPAND_WIDTH","SEARCH_CELL_DEFAULT_WIDTH","cell","find","getCellWidth","ColumnType","taScore","ViewType","mobile","current","headColumn","querySelector","styles","wellNameFixed","classList","remove","noShadow","add","bodyColumns","querySelectorAll","forEach","th","handleChangeSortBy","useCallback","sortKey","handleChangeMetricsKeys","newMetricsKeys","handleUpdateMetricsKey","newValue","prevKeys","map","_jsxs","className","offsetWellsTable","children","_jsx","stickyTable","Table","innerRef","TableHead","OffsetWellsTableHead","onChangeSort","onChangeMetricsKeys","onUpdateMetricsKey","wellNameStyle","isTaColumnVisible","classNames","searchCellWrapper","searchCellWrapperExpanded","style","searchCell","AdvancedSearch","onChange","selectedWellIds","_ref2","id","searchCellEmpty","bodyTable","TableBody","TableRow","TableCell","topShadow","_defineProperty","viewOnlyShadow","OffsetWellsTableRow","data","loadingCell","bottomShadow","loadingContainer","LoadingIndicator","fullscreen","loadingIndicator","propTypes","PropTypes","bool","isRequired","number","string","func","arrayOf","shape","memo"],"mappings":"yrxBAgCA,IAAMA,EAAmB,S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M,QAAQN,EAAUI,QAAQF,WACjDnI,eAAgBiI,EAAUK,KAAKH,WAC/BlI,uBAAwBgI,EAAUK,KAAKH,WACvCjI,2BAA4B+H,EAAUK,KAAKH,WAC3ChI,sBAAuB8H,EAAUK,KAAKH,WACtC9H,oBAAqB4H,EAAUK,KAAKH,WACpC/H,iBAAkB6H,EAAUC,KAAKC,WACjC7H,eAAgB2H,EAAUC,KAAKC,WAC/B5H,qBAAsB0H,EAAUK,KAAKH,WACrC3H,WAAYyH,EAAUC,KAAKC,WAC3B1H,WAAYwH,EAAUC,KAAKC,WAC3BvH,qBAAsBqH,EAAUC,KAAKC,WACrCtH,oBAAqBoH,EAAUG,OAAOD,WACtCzH,WAAYuH,EAAUO,MAAM,CAAA,GAAIL,WAChCxH,wBAAyBsH,EAAUO,MAAM,CAAA,GAAIL,WAC7CrH,aAAcmH,EAAUM,QAAQN,EAAUO,MAAM,CAAA,IAAKL,WACrDpH,gBAAiBkH,EAAUK,KAAKH,WAChCnH,SAAUiH,EAAUI,OAAOF,WAC3BlH,SAAUgH,EAAUC,KAAKC,WACzBjH,SAAU+G,EAAUM,QAAQN,EAAUO,MAAM,CAAA,IAAKL,YAGnD,IAAeM,EAAAA,EAAKvJ"}
1
+ {"version":3,"file":"OffsetWellsTable.js","sources":["../../../../../src/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.js"],"sourcesContent":["import { useState, memo, useCallback, useEffect, useMemo, useRef } from 'react';\nimport classNames from 'classnames';\nimport PropTypes from 'prop-types';\nimport { uniqBy } from 'lodash';\nimport { Table, TableBody, TableCell, TableHead, TableRow } from '@material-ui/core';\n\nimport {\n ColumnType,\n EXPANDED_WELL_NAME_WIDTH,\n SEARCH_CELL_DEFAULT_WIDTH,\n SEARCH_CELL_EXPAND_WIDTH,\n METRICS_LIST,\n TableColumns,\n ViewType,\n} from '../../constants';\nimport { getIsImperial } from '../../utils/unitSystem';\n\nimport { AdvancedSearch } from './AdvancedSearch';\nimport OffsetWellsTableHead from './OffsetWellsTableHead';\nimport OffsetWellsTableRow from './OffsetWellsTableRow';\n\nimport styles from './OffsetWellsTable.module.css';\n\nimport { LoadingIndicator } from '~/components';\n\nconst DIFF_WELL_NAME_WIDTH = 58;\n\nfunction getCellWidth(columnsWithDict, key) {\n const cell = columnsWithDict.find(item => item.key === key);\n return cell?.width || 0;\n}\n\nconst OffsetWellsTable = ({\n open,\n isTableLoading,\n companyId,\n subjectWellId,\n sortBy,\n setSortBy,\n sortDirection,\n setSortDirection,\n columnsWithDict,\n wells: updatedWells,\n metricsKeys,\n setMetricsKeys,\n handleChangeOffsetWell,\n handleChangeAllOffsetWells,\n handleAddRemoveAssets,\n isWellNameExpand,\n setIsWellNameExpand,\n isHScrollMoved,\n onHideAdvancedSearch,\n isViewOnly,\n isLastWell,\n contentRef,\n offsetWellsContainerRef,\n isLimitedOffsetWells,\n maxOffsetWellNumber,\n wellSections,\n setActiveWellId,\n viewType,\n isWDUser,\n taScores,\n}) => {\n const [wells, setWells] = useState([]);\n /** @type {ReturnType<typeof useRef<HTMLElement>>} */\n const headTableRef = useRef();\n /** @type {ReturnType<typeof useRef<HTMLElement>>} */\n const bodyTableRef = useRef();\n\n useEffect(() => {\n const uniqUpdatedWells = uniqBy(updatedWells, 'id');\n setWells(uniqUpdatedWells);\n }, [updatedWells, updatedWells.length]);\n\n const uniqWells = useMemo(() => uniqBy(wells, 'id'), [wells]);\n\n const [selectedWells, indeterminate, isAllWellsSelected] = useMemo(() => {\n const selectedWells = uniqWells.filter(well => well.checked);\n const indeterminate =\n uniqWells.length !== selectedWells.length && selectedWells.length && !isLimitedOffsetWells;\n const isAllWellsSelected = selectedWells.length === uniqWells.length || isLimitedOffsetWells;\n\n return [selectedWells, indeterminate, isAllWellsSelected];\n }, [uniqWells, isLimitedOffsetWells]);\n\n const isImperial = useMemo(() => getIsImperial(), []);\n\n const metricsColumns = useMemo(() => {\n // NOTE: Pay attention to the order of metrics and duplication\n return (metricsKeys || []).reduce(\n (result, key) => result.concat(METRICS_LIST.filter(item => item.key === key)),\n []\n );\n }, [metricsKeys]);\n\n const wellNameWidth = useMemo(() => {\n if (isWellNameExpand) return EXPANDED_WELL_NAME_WIDTH - DIFF_WELL_NAME_WIDTH;\n return TableColumns[0].width[metricsKeys.length] - DIFF_WELL_NAME_WIDTH;\n }, [isWellNameExpand, metricsKeys?.length]);\n\n const searchWrapperWidth = useMemo(() => {\n let initialWidth = isWellNameExpand ? SEARCH_CELL_EXPAND_WIDTH : SEARCH_CELL_DEFAULT_WIDTH;\n // Include TA column width if visible\n if (taScores.length) {\n initialWidth += getCellWidth(columnsWithDict, ColumnType.taScore);\n }\n // Include Company column width when present\n if (columnsWithDict?.some(col => col.key === ColumnType.company)) {\n initialWidth += getCellWidth(columnsWithDict, ColumnType.company);\n }\n return `${initialWidth}px`;\n }, [isWellNameExpand, taScores, columnsWithDict]);\n\n // NOTE: Remove shadow from column\n useEffect(() => {\n if (viewType === ViewType.mobile || !headTableRef.current || !bodyTableRef.current) return;\n // Head table\n const headColumn = headTableRef.current.querySelector(`.${styles.wellNameFixed}`);\n if (!isHScrollMoved) {\n headColumn.classList.add(styles.noShadow);\n } else {\n headColumn.classList.remove(styles.noShadow);\n }\n\n // Body table\n const bodyColumns = bodyTableRef.current.querySelectorAll(`.${styles.wellNameFixed}`);\n if (!isHScrollMoved) {\n bodyColumns.forEach(th => th.classList.add(styles.noShadow));\n } else {\n bodyColumns.forEach(th => th.classList.remove(styles.noShadow));\n }\n }, [isHScrollMoved, bodyTableRef.current, headTableRef.current, wells]);\n\n const handleChangeSortBy = useCallback((sortKey, sortDirection) => {\n setSortBy(sortKey);\n setSortDirection(sortDirection);\n }, []);\n\n const handleChangeMetricsKeys = useCallback(newMetricsKeys => {\n setMetricsKeys(newMetricsKeys);\n }, []);\n\n const handleUpdateMetricsKey = useCallback((key, newValue) => {\n setMetricsKeys(prevKeys => prevKeys.map(item => (item === key ? newValue : item)));\n }, []);\n\n if (!columnsWithDict || !uniqWells) return null;\n\n return (\n <div className={styles.offsetWellsTable}>\n <div className={styles.stickyTable}>\n <Table aria-label=\"ows table head\" innerRef={headTableRef}>\n <TableHead>\n <OffsetWellsTableHead\n open={open}\n columnsWithDict={columnsWithDict}\n metricsKeys={metricsKeys}\n sortBy={sortBy}\n sortDirection={sortDirection}\n indeterminate={indeterminate}\n isAllWellsSelected={isAllWellsSelected}\n onChangeSort={handleChangeSortBy}\n onChangeMetricsKeys={handleChangeMetricsKeys}\n onUpdateMetricsKey={handleUpdateMetricsKey}\n isWellNameExpand={isWellNameExpand}\n setIsWellNameExpand={setIsWellNameExpand}\n handleChangeAllOffsetWells={handleChangeAllOffsetWells}\n wellNameStyle={styles.wellNameFixed}\n isViewOnly={isViewOnly}\n isImperial={isImperial}\n contentRef={contentRef}\n viewType={viewType}\n isTaColumnVisible={!!taScores.length}\n />\n </TableHead>\n </Table>\n </div>\n\n {!isViewOnly && (\n <div\n className={classNames(styles.searchCellWrapper, {\n [styles.searchCellWrapperExpanded]: isWellNameExpand,\n })}\n style={{ '--dynamic-search-wrapper-width': searchWrapperWidth }}\n >\n <div className={styles.searchCell}>\n <AdvancedSearch\n companyId={companyId}\n subjectWellId={subjectWellId}\n onChange={handleAddRemoveAssets}\n selectedWellIds={selectedWells.map(({ id }) => id)}\n onHideAdvancedSearch={onHideAdvancedSearch}\n />\n </div>\n {!!isWellNameExpand && <div className={styles.searchCellEmpty} />}\n </div>\n )}\n\n <Table aria-label=\"ows table body\" innerRef={bodyTableRef} className={styles.bodyTable}>\n <TableBody>\n <TableRow>\n <TableCell\n className={classNames(styles.topShadow, { [styles.viewOnlyShadow]: isViewOnly })}\n />\n </TableRow>\n {uniqWells.map(well => (\n <OffsetWellsTableRow\n key={well.id}\n columnsWithDict={columnsWithDict}\n subjectWellId={subjectWellId}\n data={well}\n metricsKeys={metricsKeys}\n metricsColumns={metricsColumns}\n handleChangeOffsetWell={handleChangeOffsetWell}\n isWellNameExpand={isWellNameExpand}\n wellNameStyle={styles.wellNameFixed}\n wellNameWidth={wellNameWidth}\n isViewOnly={isViewOnly}\n isImperial={isImperial}\n isLimitedOffsetWells={isLimitedOffsetWells}\n maxOffsetWellNumber={maxOffsetWellNumber}\n wellSections={wellSections}\n setActiveWellId={setActiveWellId}\n viewType={viewType}\n isWDUser={isWDUser}\n taScores={taScores}\n offsetWellsContainerRef={offsetWellsContainerRef}\n />\n ))}\n {!isLastWell && (\n <TableRow>\n <TableCell className={styles.loadingCell}>\n <span>Loading...</span>\n </TableCell>\n </TableRow>\n )}\n <TableRow>\n <TableCell className={styles.bottomShadow} />\n </TableRow>\n </TableBody>\n </Table>\n\n {isTableLoading && (\n <div className={styles.loadingContainer}>\n <LoadingIndicator fullscreen={false} className={styles.loadingIndicator} />\n </div>\n )}\n </div>\n );\n};\n\nOffsetWellsTable.propTypes = {\n open: PropTypes.bool.isRequired,\n isTableLoading: PropTypes.bool.isRequired,\n companyId: PropTypes.number.isRequired,\n subjectWellId: PropTypes.number.isRequired,\n sortBy: PropTypes.string.isRequired,\n setSortBy: PropTypes.func.isRequired,\n sortDirection: PropTypes.string.isRequired,\n setSortDirection: PropTypes.func.isRequired,\n columnsWithDict: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n wells: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n metricsKeys: PropTypes.arrayOf(PropTypes.string).isRequired,\n setMetricsKeys: PropTypes.func.isRequired,\n handleChangeOffsetWell: PropTypes.func.isRequired,\n handleChangeAllOffsetWells: PropTypes.func.isRequired,\n handleAddRemoveAssets: PropTypes.func.isRequired,\n setIsWellNameExpand: PropTypes.func.isRequired,\n isWellNameExpand: PropTypes.bool.isRequired,\n isHScrollMoved: PropTypes.bool.isRequired,\n onHideAdvancedSearch: PropTypes.func.isRequired,\n isViewOnly: PropTypes.bool.isRequired,\n isLastWell: PropTypes.bool.isRequired,\n isLimitedOffsetWells: PropTypes.bool.isRequired,\n maxOffsetWellNumber: PropTypes.number.isRequired,\n contentRef: PropTypes.shape({}).isRequired,\n offsetWellsContainerRef: PropTypes.shape({}).isRequired,\n wellSections: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n setActiveWellId: PropTypes.func.isRequired,\n viewType: PropTypes.string.isRequired,\n isWDUser: PropTypes.bool.isRequired,\n taScores: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n};\n\nexport default memo(OffsetWellsTable);\n"],"names":["getCellWidth","columnsWithDict","key","cell","find","item","width","OffsetWellsTable","_ref","open","isTableLoading","companyId","subjectWellId","sortBy","setSortBy","sortDirection","setSortDirection","updatedWells","wells","metricsKeys","setMetricsKeys","handleChangeOffsetWell","handleChangeAllOffsetWells","handleAddRemoveAssets","isWellNameExpand","setIsWellNameExpand","isHScrollMoved","onHideAdvancedSearch","isViewOnly","isLastWell","contentRef","offsetWellsContainerRef","isLimitedOffsetWells","maxOffsetWellNumber","wellSections","setActiveWellId","viewType","isWDUser","taScores","useState","_useState2","_slicedToArray","_useState","setWells","headTableRef","useRef","bodyTableRef","useEffect","uniqUpdatedWells","uniqBy","length","uniqWells","useMemo","selectedWells","filter","well","checked","_useMemo2","_useMemo","indeterminate","isAllWellsSelected","isImperial","getIsImperial","metricsColumns","reduce","result","concat","METRICS_LIST","wellNameWidth","EXPANDED_WELL_NAME_WIDTH","TableColumns","searchWrapperWidth","initialWidth","SEARCH_CELL_EXPAND_WIDTH","SEARCH_CELL_DEFAULT_WIDTH","ColumnType","taScore","some","col","company","ViewType","mobile","current","headColumn","querySelector","styles","wellNameFixed","classList","remove","noShadow","add","bodyColumns","querySelectorAll","forEach","th","handleChangeSortBy","useCallback","sortKey","handleChangeMetricsKeys","newMetricsKeys","handleUpdateMetricsKey","newValue","prevKeys","map","_jsxs","className","offsetWellsTable","children","_jsx","stickyTable","Table","innerRef","TableHead","OffsetWellsTableHead","onChangeSort","onChangeMetricsKeys","onUpdateMetricsKey","wellNameStyle","isTaColumnVisible","classNames","searchCellWrapper","searchCellWrapperExpanded","style","searchCell","AdvancedSearch","onChange","selectedWellIds","_ref2","id","searchCellEmpty","bodyTable","TableBody","TableRow","TableCell","topShadow","_defineProperty","viewOnlyShadow","OffsetWellsTableRow","data","loadingCell","bottomShadow","loadingContainer","LoadingIndicator","fullscreen","loadingIndicator","propTypes","PropTypes","bool","isRequired","number","string","func","arrayOf","shape","memo"],"mappings":"84xBA2BA,SAASA,EAAaC,EAAiBC,GACrC,IAAMC,EAAOF,EAAgBG,MAAK,SAAAC,GAAI,OAAIA,EAAKH,MAAQA,KACvD,OAAOC,eAAAA,EAAMG,QAAS,CACxB,CAEA,IAAMC,EAAmB,SA+BnBC,GAAA,IA9BJC,IAAAA,KACAC,IAAAA,eACAC,IAAAA,UACAC,IAAAA,cACAC,IAAAA,OACAC,IAAAA,UACAC,IAAAA,cACAC,IAAAA,iBACAf,IAAAA,gBACOgB,IAAPC,MACAC,IAAAA,YACAC,IAAAA,eACAC,IAAAA,uBACAC,IAAAA,2BACAC,IAAAA,sBACAC,IAAAA,iBACAC,IAAAA,oBACAC,IAAAA,eACAC,IAAAA,qBACAC,IAAAA,WACAC,IAAAA,WACAC,IAAAA,WACAC,IAAAA,wBACAC,KAAAA,qBACAC,KAAAA,oBACAC,KAAAA,aACAC,KAAAA,gBACAC,KAAAA,SACAC,KAAAA,SACAC,KAAAA,SAE0BC,GAAAA,EAAS,IAAGC,GAAAC,EAAAC,GAAA,GAA/BxB,GAAKsB,GAAA,GAAEG,GAAQH,GAAA,GAEhBI,GAAeC,IAEfC,GAAeD,IAErBE,GAAU,WACR,IAAMC,EAAmBC,EAAOhC,EAAc,MAC9C0B,GAASK,EACV,GAAE,CAAC/B,EAAcA,EAAaiC,SAE/B,IAAMC,GAAYC,GAAQ,WAAA,OAAMH,EAAO/B,GAAO,QAAO,CAACA,KAEKkC,GAAAA,GAAQ,WACjE,IAAMC,EAAgBF,GAAUG,QAAO,SAAAC,GAAI,OAAIA,EAAKC,WAKpD,MAAO,CAACH,EAHNF,GAAUD,SAAWG,EAAcH,QAAUG,EAAcH,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sTable__pGL-8",loadingContainer:"OffsetWellsTable-module_loadingContainer__lA0IJ",loadingIndicator:"OffsetWellsTable-module_loadingIndicator__j5pye",stickyTable:"OffsetWellsTable-module_stickyTable__LZCzy",searchCellWrapper:"OffsetWellsTable-module_searchCellWrapper__n8cod",searchCellWrapperExpanded:"OffsetWellsTable-module_searchCellWrapperExpanded__pWrzU",searchCell:"OffsetWellsTable-module_searchCell__3IW23",searchCellEmpty:"OffsetWellsTable-module_searchCellEmpty__1sB-v",bodyTable:"OffsetWellsTable-module_bodyTable__djKsG",bodyGrid:"OffsetWellsTable-module_bodyGrid__Ss17M",loadingCell:"OffsetWellsTable-module_loadingCell__rBu7-",topShadow:"OffsetWellsTable-module_topShadow__MPc8N",viewOnlyShadow:"OffsetWellsTable-module_viewOnlyShadow__DOW-4",bottomShadow:"OffsetWellsTable-module_bottomShadow__jxM6E",wellNameFixed:"OffsetWellsTable-module_wellNameFixed__tKtuD",noShadow:"OffsetWellsTable-module_noShadow__Ssp7E"};e('.OffsetWellsTable-module_offsetWellsTable__pGL-8{display:flex;flex-direction:column;height:100%;position:relative}.OffsetWellsTable-module_loadingContainer__lA0IJ{align-items:center;backdrop-filter:blur(1px);bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;z-index:1500}.OffsetWellsTable-module_loadingIndicator__j5pye{position:absolute;top:0}.OffsetWellsTable-module_stickyTable__LZCzy{background-color:var(--palette-background-b-7);padding-right:16px;position:sticky;top:0;z-index:9}.OffsetWellsTable-module_searchCellWrapper__n8cod{background-color:var(--palette-background-b-7);display:inline-flex;left:0;position:sticky;top:49px;width:var(--dynamic-search-wrapper-width,1020px);z-index:9}.OffsetWellsTable-module_searchCellWrapperExpanded__pWrzU{width:var(--dynamic-search-wrapper-width,1270px)}.OffsetWellsTable-module_searchCell__3IW23{left:0;position:sticky;top:0;width:1020px;z-index:9}.OffsetWellsTable-module_searchCellEmpty__1sB-v{position:relative;width:250px}.OffsetWellsTable-module_bodyTable__djKsG{position:relative}.OffsetWellsTable-module_bodyGrid__Ss17M{margin-top:12px!important;overflow:hidden!important}.OffsetWellsTable-module_bodyGrid__Ss17M::-webkit-scrollbar-corner{background:transparent}.OffsetWellsTable-module_loadingCell__rBu7-{border-bottom:none!important;color:var(--palette-primary-text-8)!important;font-size:12px!important;height:16px!important;padding:0!important;position:absolute;text-align:center!important;width:100%;z-index:1000}.OffsetWellsTable-module_topShadow__MPc8N{background-image:linear-gradient(0deg,rgba(51,51,51,0),#333);border-bottom:none!important;height:16px!important;padding:0!important;position:sticky;top:93px;width:100%;z-index:999}.OffsetWellsTable-module_viewOnlyShadow__DOW-4{top:49px}.OffsetWellsTable-module_bottomShadow__jxM6E{border-bottom:none!important;bottom:0;height:16px!important;padding:0!important;position:sticky;width:100%;z-index:999}.OffsetWellsTable-module_bottomShadow__jxM6E:after{background-image:linear-gradient(180deg,rgba(51,51,51,0),#333);bottom:-1px;content:" ";height:16px!important;position:absolute;width:100%}.OffsetWellsTable-module_wellNameFixed__tKtuD{box-shadow:4px 0 6px -3px #191919!important}.OffsetWellsTable-module_noShadow__Ssp7E{box-shadow:none!important}');export{l as default};
1
+ import e from'./../../../../ext-esm/style-inject/dist/style-inject.es.js';var l={offsetWellsTable:"OffsetWellsTable-module_offsetWellsTable__pGL-8",loadingContainer:"OffsetWellsTable-module_loadingContainer__lA0IJ",loadingIndicator:"OffsetWellsTable-module_loadingIndicator__j5pye",stickyTable:"OffsetWellsTable-module_stickyTable__LZCzy",searchCellWrapper:"OffsetWellsTable-module_searchCellWrapper__n8cod",searchCellWrapperExpanded:"OffsetWellsTable-module_searchCellWrapperExpanded__pWrzU",searchCell:"OffsetWellsTable-module_searchCell__3IW23",searchCellEmpty:"OffsetWellsTable-module_searchCellEmpty__1sB-v",bodyTable:"OffsetWellsTable-module_bodyTable__djKsG",bodyGrid:"OffsetWellsTable-module_bodyGrid__Ss17M",loadingCell:"OffsetWellsTable-module_loadingCell__rBu7-",topShadow:"OffsetWellsTable-module_topShadow__MPc8N",viewOnlyShadow:"OffsetWellsTable-module_viewOnlyShadow__DOW-4",bottomShadow:"OffsetWellsTable-module_bottomShadow__jxM6E",wellNameFixed:"OffsetWellsTable-module_wellNameFixed__tKtuD",noShadow:"OffsetWellsTable-module_noShadow__Ssp7E"};e('.OffsetWellsTable-module_offsetWellsTable__pGL-8{display:flex;flex-direction:column;height:100%;position:relative}.OffsetWellsTable-module_loadingContainer__lA0IJ{align-items:center;backdrop-filter:blur(1px);bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;z-index:1500}.OffsetWellsTable-module_loadingIndicator__j5pye{position:absolute;top:0}.OffsetWellsTable-module_stickyTable__LZCzy{background-color:var(--palette-background-b-7);padding-right:16px;position:sticky;top:0;z-index:9}.OffsetWellsTable-module_searchCellWrapper__n8cod{background-color:var(--palette-background-b-7);display:inline-flex;left:0;position:sticky;top:49px;width:var(--dynamic-search-wrapper-width,1020px);z-index:9}.OffsetWellsTable-module_searchCellWrapperExpanded__pWrzU{width:var(--dynamic-search-wrapper-width,1270px)}.OffsetWellsTable-module_searchCell__3IW23{left:0;position:sticky;top:0;width:1020px;z-index:9}.OffsetWellsTable-module_searchCellEmpty__1sB-v{position:relative;width:250px}.OffsetWellsTable-module_bodyTable__djKsG{background-color:#333;position:relative}.OffsetWellsTable-module_bodyGrid__Ss17M{margin-top:12px!important;overflow:hidden!important}.OffsetWellsTable-module_bodyGrid__Ss17M::-webkit-scrollbar-corner{background:transparent}.OffsetWellsTable-module_loadingCell__rBu7-{border-bottom:none!important;color:var(--palette-primary-text-8)!important;font-size:12px!important;height:16px!important;padding:0!important;position:absolute;text-align:center!important;width:100%;z-index:1000}.OffsetWellsTable-module_topShadow__MPc8N{background-image:linear-gradient(0deg,rgba(51,51,51,0),#333);border-bottom:none!important;height:16px!important;padding:0!important;position:sticky;top:93px;width:100%;z-index:999}.OffsetWellsTable-module_viewOnlyShadow__DOW-4{top:49px}.OffsetWellsTable-module_bottomShadow__jxM6E{border-bottom:none!important;bottom:0;height:16px!important;padding:0!important;position:sticky;width:100%;z-index:999}.OffsetWellsTable-module_bottomShadow__jxM6E:after{background-image:linear-gradient(180deg,rgba(51,51,51,0),#333);bottom:-1px;content:" ";height:16px!important;position:absolute;width:100%}.OffsetWellsTable-module_wellNameFixed__tKtuD{box-shadow:4px 0 6px -3px #191919!important}.OffsetWellsTable-module_noShadow__Ssp7E{box-shadow:none!important}');export{l as default};
2
2
  //# sourceMappingURL=OffsetWellsTable.module.css.js.map
@@ -1,2 +1,2 @@
1
- import e from"@babel/runtime/helpers/slicedToArray";import s from"@babel/runtime/helpers/defineProperty";import i from"@babel/runtime/helpers/objectWithoutProperties";import{memo as t,useState as o}from"react";import c from"classnames";import n from"prop-types";import{SortDirection as r}from"react-virtualized";import{TableRow as l,TableCell as a,Checkbox as m,Tooltip as d,TableSortLabel as u}from"@material-ui/core";import{ViewType as p,EXPANDED_WELL_NAME_WIDTH as h,ColumnType as f}from"../../constants.js";import{MetricsSettingMenu as j}from"./MetricsSettingMenu.js";import{MetricsSelect as b}from"./MetricsSelect.js";import C from"./OffsetWellsTableHead.module.css.js";import{RightIcon as I}from"../../../../icons/iconParkIcons.js";import"../../../../icons/customIcons/icons/AddMessage.js";import"../../../../icons/customIcons/icons/Attention.js";import"../../../../icons/customIcons/icons/Collapse.js";import"../../../../icons/customIcons/icons/Dashboard.js";import"../../../../icons/customIcons/icons/Expand.js";import"../../../../icons/customIcons/icons/FolderClosed.js";import"../../../../icons/customIcons/icons/FolderClosedFilled.js";import"../../../../icons/customIcons/icons/FolderOpened.js";import"../../../../icons/customIcons/icons/GreaterOrEqual.js";import"../../../../icons/customIcons/icons/LessOrEqual.js";import"../../../../icons/customIcons/icons/Search.js";import"../../../../icons/customIcons/icons/Wellhub.js";import"../../../../icons/customIcons/icons/MultiRuler.js";import"../../../../icons/customIcons/icons/Checkbox.js";import"../../../../icons/customIcons/icons/CheckboxChecked.js";import"../../../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../../../icons/customIcons/icons/Radio.js";import"../../../../icons/customIcons/icons/RadioChecked.js";import"../../../../icons/customIcons/icons/SimulFrac.js";import"../../../../icons/customIcons/icons/ZipperFrac.js";import"../../../../icons/customIcons/icons/CautionFilled.js";import"../../../../icons/customIcons/icons/MoreApp.js";import"../../../../icons/customIcons/icons/Pad.js";import"../../../../icons/customIcons/icons/DrilloutUnit.js";import"../../../../icons/customIcons/icons/FracFleet.js";import"../../../../icons/customIcons/icons/Global.js";import"../../../../icons/customIcons/icons/Program.js";import"../../../../icons/customIcons/icons/Rig.js";import"../../../../icons/customIcons/icons/Well.js";import"../../../../icons/customIcons/icons/Gap.js";import"../../../../icons/customIcons/icons/Pin.js";import"../../../../icons/customIcons/icons/CloseOneFilled.js";import"../../../../icons/customIcons/icons/AttentionFilled.js";import"../../../../icons/customIcons/icons/CheckOneFilled.js";import"../../../../icons/customIcons/icons/Archive.js";import"../../../../icons/customIcons/icons/ArchiveCancel.js";import"../../../../icons/customIcons/icons/Unarchive.js";import"../../../../icons/customIcons/icons/Archived.js";import"../../../../icons/customIcons/icons/InterventionUnit.js";import{jsxs as y,jsx as v}from"react/jsx-runtime";var g=["title"];function O(e,s){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);s&&(t=t.filter((function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable}))),i.push.apply(i,t)}return i}function w(e){for(var i=1;i<arguments.length;i++){var t=null!=arguments[i]?arguments[i]:{};i%2?O(Object(t),!0).forEach((function(i){s(e,i,t[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):O(Object(t)).forEach((function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(t,s))}))}return e}var S="OffsetWellsTableHead",N=function(e){var s=e.title,t=i(e,g);return v(d,{placement:"top-end",title:s,children:v(u,w({},t))})};function R(e,s){var i=e.find((function(e){return e.key===s}));return(null==i?void 0:i.width)||0}var W=function(i){var t,n=i.open,u=i.columnsWithDict,g=i.metricsKeys,O=i.sortBy,w=i.sortDirection,W=i.indeterminate,q=i.isAllWellsSelected,A=i.onChangeSort,k=i.onChangeMetricsKeys,E=i.onUpdateMetricsKey,D=i.isWellNameExpand,P=i.setIsWellNameExpand,x=i.handleChangeAllOffsetWells,F=i.wellNameStyle,M=i.isViewOnly,T=i.isImperial,L=i.contentRef,_=i.viewType,K=i.isTaColumnVisible,V=o(!1),U=e(V,2),z=U[0],G=U[1],H=function(e){A(e,e===O&&w===r.ASC?r.DESC:r.ASC)};return y(l,{className:C.tableRow,children:[y(a,{"data-testid":"".concat(S,"_wellName"),className:c(C.headCell,C.wellNameCell,(t={},s(t,F,_!==p.mobile),s(t,C.wellNameCellMobile,_===p.mobile),t)),style:{width:D?h:R(u,f.name)},children:[y("div",{className:C.nameWrapper,children:[!M&&n&&v(m,{"data-testid":"".concat(S,"_allWellsSelector"),size:"medium",onChange:function(e){return x(e.target.checked)},checked:q,indeterminate:W}),v(N,{title:"Sort",active:O===f.name,direction:O===f.name&&w===r.DESC?"desc":"asc",classes:{root:c(C.headerLabel,s({},C.cellDataViewOnly,M))},onClick:function(){return H(f.name)},children:"Well Name"})]}),v(d,{title:D?"Collapse":"Expand",children:v(I,{size:"small",className:c(C.wellNameExpandIcon,s({},C.wellNameCollapsed,!D)),onClick:function(){return P(!D)}})})]}),v(a,{"data-testid":"".concat(S,"_nameExpander_").concat(D),className:C.headCell,style:{width:R(u,f.status)}}),v(a,{"data-testid":"".concat(S,"_rig"),className:C.headCell,style:{width:R(u,f.rig)},children:v("div",{className:C.nameWrapper,children:v(N,{title:"Sort",active:O===f.rig,direction:O===f.rig&&w===r.DESC?"desc":"asc",classes:{root:C.headerLabel},onClick:function(){return H(f.rig)},children:"Rig"})})}),v(a,{"data-testid":"".concat(S,"_distance"),className:C.headCell,style:{width:R(u,f.distance)},children:v("div",{className:C.nameWrapper,children:v(N,{title:"Sort",active:O===f.distance,direction:O===f.distance&&w===r.DESC?"desc":"asc",classes:{root:C.headerLabel},onClick:function(){return H(f.distance)},children:"Distance (".concat(T?"miles":"km",")")})})}),K&&v(a,{"data-testid":"".concat(S,"_ta"),className:C.headCell,style:{width:R(u,f.taScore)},children:v("div",{className:C.nameWrapper,children:"TA %"})}),v(a,{"data-testid":"".concat(S,"_LastActive"),className:C.headCell,style:{width:R(u,f.lastActive)},children:v("div",{className:C.nameWrapper,children:v(N,{title:"Sort",active:O===f.lastActive,direction:O===f.lastActive&&w===r.DESC?"desc":"asc",classes:{root:C.headerLabel},onClick:function(){return H(f.lastActive)},children:"Last Active"})})}),g.map((function(e){return v(a,{"data-testid":"".concat(S,"_").concat(e),className:C.headCell,style:{width:R(u,e)},children:v(N,{title:z?"":"Sort",active:O===e,direction:O===e&&w===r.DESC?"desc":"asc",classes:{root:C.headerLabel},onClick:function(){return H(e)},children:v(b,{isTooltipVisible:g.length>1,currentValue:e,metricsKeys:g,onChange:function(s){return E(e,s)},setIsMenuOpen:G})})},e)})),v(a,{"data-testid":"".concat(S,"_WellSection"),className:C.headCell,style:{width:R(u,f.wellSection)},children:y("div",{className:C.settingsHeader,children:[v("span",{className:C.headerLabel,children:"Well Section"}),v(j,{viewType:_,metricsKeys:g,onChange:k,contentRef:L})]})})]})};W.propTypes={open:n.bool.isRequired,columnsWithDict:n.arrayOf(n.shape({key:n.string,label:n.string,type:n.string,width:n.number})).isRequired,metricsKeys:n.arrayOf(n.string).isRequired,sortBy:n.string.isRequired,sortDirection:n.string.isRequired,indeterminate:n.bool.isRequired,isAllWellsSelected:n.bool.isRequired,style:n.shape({}).isRequired,onChangeSort:n.func.isRequired,onChangeMetricsKeys:n.func.isRequired,onUpdateMetricsKey:n.func.isRequired,isWellNameExpand:n.bool.isRequired,setIsWellNameExpand:n.func.isRequired,handleChangeAllOffsetWells:n.func.isRequired,wellNameStyle:n.string.isRequired,isViewOnly:n.bool.isRequired,isImperial:n.bool.isRequired,contentRef:n.shape({current:n.instanceOf(Element)}).isRequired,viewType:n.string.isRequired,isTaColumnVisible:n.bool.isRequired};var q=t(W);export{q as default};
1
+ import e from"@babel/runtime/helpers/slicedToArray";import s from"@babel/runtime/helpers/defineProperty";import i from"@babel/runtime/helpers/objectWithoutProperties";import{memo as o,useState as t}from"react";import c from"classnames";import n from"prop-types";import{SortDirection as r}from"react-virtualized";import{TableRow as a,TableCell as l,Checkbox as m,Tooltip as d,TableSortLabel as u}from"@material-ui/core";import{ColumnType as p,ViewType as h,EXPANDED_WELL_NAME_WIDTH as f}from"../../constants.js";import{MetricsSettingMenu as j}from"./MetricsSettingMenu.js";import{MetricsSelect as y}from"./MetricsSelect.js";import b from"./OffsetWellsTableHead.module.css.js";import{RightIcon as C}from"../../../../icons/iconParkIcons.js";import"../../../../icons/customIcons/icons/AddMessage.js";import"../../../../icons/customIcons/icons/Attention.js";import"../../../../icons/customIcons/icons/Collapse.js";import"../../../../icons/customIcons/icons/Dashboard.js";import"../../../../icons/customIcons/icons/Expand.js";import"../../../../icons/customIcons/icons/FolderClosed.js";import"../../../../icons/customIcons/icons/FolderClosedFilled.js";import"../../../../icons/customIcons/icons/FolderOpened.js";import"../../../../icons/customIcons/icons/GreaterOrEqual.js";import"../../../../icons/customIcons/icons/LessOrEqual.js";import"../../../../icons/customIcons/icons/Search.js";import"../../../../icons/customIcons/icons/Wellhub.js";import"../../../../icons/customIcons/icons/MultiRuler.js";import"../../../../icons/customIcons/icons/Checkbox.js";import"../../../../icons/customIcons/icons/CheckboxChecked.js";import"../../../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../../../icons/customIcons/icons/Radio.js";import"../../../../icons/customIcons/icons/RadioChecked.js";import"../../../../icons/customIcons/icons/SimulFrac.js";import"../../../../icons/customIcons/icons/ZipperFrac.js";import"../../../../icons/customIcons/icons/CautionFilled.js";import"../../../../icons/customIcons/icons/MoreApp.js";import"../../../../icons/customIcons/icons/Pad.js";import"../../../../icons/customIcons/icons/DrilloutUnit.js";import"../../../../icons/customIcons/icons/FracFleet.js";import"../../../../icons/customIcons/icons/Global.js";import"../../../../icons/customIcons/icons/Program.js";import"../../../../icons/customIcons/icons/Rig.js";import"../../../../icons/customIcons/icons/Well.js";import"../../../../icons/customIcons/icons/Gap.js";import"../../../../icons/customIcons/icons/Pin.js";import"../../../../icons/customIcons/icons/CloseOneFilled.js";import"../../../../icons/customIcons/icons/AttentionFilled.js";import"../../../../icons/customIcons/icons/CheckOneFilled.js";import"../../../../icons/customIcons/icons/Archive.js";import"../../../../icons/customIcons/icons/ArchiveCancel.js";import"../../../../icons/customIcons/icons/Unarchive.js";import"../../../../icons/customIcons/icons/Archived.js";import"../../../../icons/customIcons/icons/InterventionUnit.js";import{jsxs as I,jsx as v}from"react/jsx-runtime";var g=["title"];function O(e,s){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);s&&(o=o.filter((function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable}))),i.push.apply(i,o)}return i}function S(e){for(var i=1;i<arguments.length;i++){var o=null!=arguments[i]?arguments[i]:{};i%2?O(Object(o),!0).forEach((function(i){s(e,i,o[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):O(Object(o)).forEach((function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(o,s))}))}return e}var w="OffsetWellsTableHead",N=function(e){var s=e.title,o=i(e,g);return v(d,{placement:"top-end",title:s,children:v(u,S({},o))})};function R(e,s){var i=e.find((function(e){return e.key===s}));return(null==i?void 0:i.width)||0}var W=function(i){var o,n=i.open,u=i.columnsWithDict,g=i.metricsKeys,O=i.sortBy,S=i.sortDirection,W=i.indeterminate,q=i.isAllWellsSelected,k=i.onChangeSort,A=i.onChangeMetricsKeys,E=i.onUpdateMetricsKey,D=i.isWellNameExpand,P=i.setIsWellNameExpand,x=i.handleChangeAllOffsetWells,F=i.wellNameStyle,M=i.isViewOnly,T=i.isImperial,L=i.contentRef,_=i.viewType,K=i.isTaColumnVisible,V=t(!1),U=e(V,2),z=U[0],G=U[1],H=null==u?void 0:u.some((function(e){return e.key===p.company})),B=function(e){k(e,e===O&&S===r.ASC?r.DESC:r.ASC)};return I(a,{className:b.tableRow,children:[I(l,{"data-testid":"".concat(w,"_wellName"),className:c(b.headCell,b.wellNameCell,(o={},s(o,F,_!==h.mobile),s(o,b.wellNameCellMobile,_===h.mobile),o)),style:{width:D?f:R(u,p.name)},children:[I("div",{className:b.nameWrapper,children:[!M&&n&&v(m,{"data-testid":"".concat(w,"_allWellsSelector"),size:"medium",onChange:function(e){return x(e.target.checked)},checked:q,indeterminate:W}),v(N,{title:"Sort",active:O===p.name,direction:O===p.name&&S===r.DESC?"desc":"asc",classes:{root:c(b.headerLabel,s({},b.cellDataViewOnly,M))},onClick:function(){return B(p.name)},children:"Well Name"})]}),v(d,{title:D?"Collapse":"Expand",children:v(C,{size:"small",className:c(b.wellNameExpandIcon,s({},b.wellNameCollapsed,!D)),onClick:function(){return P(!D)}})})]}),v(l,{"data-testid":"".concat(w,"_nameExpander_").concat(D),className:b.headCell,style:{width:R(u,p.status)}}),H&&v(l,{"data-testid":"".concat(w,"_company"),className:b.headCell,style:{width:R(u,p.company)},children:v("div",{className:b.nameWrapper,children:v(N,{title:"Sort",active:O===p.company,direction:O===p.company&&S===r.DESC?"desc":"asc",classes:{root:b.headerLabel},onClick:function(){return B(p.company)},children:"Company"})})}),v(l,{"data-testid":"".concat(w,"_rig"),className:b.headCell,style:{width:R(u,p.rig)},children:v("div",{className:b.nameWrapper,children:v(N,{title:"Sort",active:O===p.rig,direction:O===p.rig&&S===r.DESC?"desc":"asc",classes:{root:b.headerLabel},onClick:function(){return B(p.rig)},children:"Rig"})})}),v(l,{"data-testid":"".concat(w,"_distance"),className:b.headCell,style:{width:R(u,p.distance)},children:v("div",{className:b.nameWrapper,children:v(N,{title:"Sort",active:O===p.distance,direction:O===p.distance&&S===r.DESC?"desc":"asc",classes:{root:b.headerLabel},onClick:function(){return B(p.distance)},children:"Distance (".concat(T?"miles":"km",")")})})}),K&&v(l,{"data-testid":"".concat(w,"_ta"),className:b.headCell,style:{width:R(u,p.taScore)},children:v("div",{className:b.nameWrapper,children:"TA %"})}),v(l,{"data-testid":"".concat(w,"_LastActive"),className:b.headCell,style:{width:R(u,p.lastActive)},children:v("div",{className:b.nameWrapper,children:v(N,{title:"Sort",active:O===p.lastActive,direction:O===p.lastActive&&S===r.DESC?"desc":"asc",classes:{root:b.headerLabel},onClick:function(){return B(p.lastActive)},children:"Last Active"})})}),g.map((function(e){return v(l,{"data-testid":"".concat(w,"_").concat(e),className:b.headCell,style:{width:R(u,e)},children:v(N,{title:z?"":"Sort",active:O===e,direction:O===e&&S===r.DESC?"desc":"asc",classes:{root:b.headerLabel},onClick:function(){return B(e)},children:v(y,{isTooltipVisible:g.length>1,currentValue:e,metricsKeys:g,onChange:function(s){return E(e,s)},setIsMenuOpen:G})})},e)})),v(l,{"data-testid":"".concat(w,"_WellSection"),className:b.headCell,style:{width:R(u,p.wellSection)},children:I("div",{className:b.settingsHeader,children:[v("span",{className:b.headerLabel,children:"Well Section"}),v(j,{viewType:_,metricsKeys:g,onChange:A,contentRef:L})]})})]})};W.propTypes={open:n.bool.isRequired,columnsWithDict:n.arrayOf(n.shape({key:n.string,label:n.string,type:n.string,width:n.number})).isRequired,metricsKeys:n.arrayOf(n.string).isRequired,sortBy:n.string.isRequired,sortDirection:n.string.isRequired,indeterminate:n.bool.isRequired,isAllWellsSelected:n.bool.isRequired,style:n.shape({}).isRequired,onChangeSort:n.func.isRequired,onChangeMetricsKeys:n.func.isRequired,onUpdateMetricsKey:n.func.isRequired,isWellNameExpand:n.bool.isRequired,setIsWellNameExpand:n.func.isRequired,handleChangeAllOffsetWells:n.func.isRequired,wellNameStyle:n.string.isRequired,isViewOnly:n.bool.isRequired,isImperial:n.bool.isRequired,contentRef:n.shape({current:n.instanceOf(Element)}).isRequired,viewType:n.string.isRequired,isTaColumnVisible:n.bool.isRequired};var q=o(W);export{q as default};
2
2
  //# sourceMappingURL=OffsetWellsTableHead.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"OffsetWellsTableHead.js","sources":["../../../../../src/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableHead.js"],"sourcesContent":["import { memo, useState } from 'react';\nimport classNames from 'classnames';\nimport PropTypes from 'prop-types';\nimport { SortDirection } from 'react-virtualized';\nimport {\n Checkbox,\n Tooltip,\n TableSortLabel as MuiTableSortLabel,\n TableCell,\n TableRow,\n} from '@material-ui/core';\n\nimport { ColumnType, EXPANDED_WELL_NAME_WIDTH, ViewType } from '../../constants';\n\nimport { MetricsSettingMenu } from './MetricsSettingMenu';\nimport { MetricsSelect } from './MetricsSelect';\n\nimport styles from './OffsetWellsTableHead.module.css';\n\nimport { RightIcon } from '~/icons';\n\nconst PAGE_NAME = 'OffsetWellsTableHead';\n\nconst TableSortLabel = ({ title, ...props }) => (\n <Tooltip placement=\"top-end\" title={title}>\n <MuiTableSortLabel {...props} />\n </Tooltip>\n);\n\nfunction getCellWidth(columnsWithDict, key) {\n const cell = columnsWithDict.find(item => item.key === key);\n return cell?.width || 0;\n}\n\nconst OffsetWellsTableHead = ({\n open,\n columnsWithDict,\n metricsKeys,\n sortBy,\n sortDirection,\n indeterminate,\n isAllWellsSelected,\n onChangeSort,\n onChangeMetricsKeys,\n onUpdateMetricsKey,\n isWellNameExpand,\n setIsWellNameExpand,\n handleChangeAllOffsetWells,\n wellNameStyle,\n isViewOnly,\n isImperial,\n contentRef,\n viewType,\n isTaColumnVisible,\n}) => {\n const [isMetricsMenuOpen, setIsMetricsMenuOpen] = useState(false);\n\n const handleSort = key => {\n onChangeSort(\n key,\n key === sortBy && sortDirection === SortDirection.ASC ? SortDirection.DESC : SortDirection.ASC\n );\n };\n\n return (\n <TableRow className={styles.tableRow}>\n <TableCell\n data-testid={`${PAGE_NAME}_wellName`}\n className={classNames(styles.headCell, styles.wellNameCell, {\n [wellNameStyle]: viewType !== ViewType.mobile,\n [styles.wellNameCellMobile]: viewType === ViewType.mobile,\n })}\n style={{\n width: isWellNameExpand\n ? EXPANDED_WELL_NAME_WIDTH\n : getCellWidth(columnsWithDict, ColumnType.name),\n }}\n >\n <div className={styles.nameWrapper}>\n {!isViewOnly && open && (\n <Checkbox\n data-testid={`${PAGE_NAME}_allWellsSelector`}\n size=\"medium\"\n onChange={event => handleChangeAllOffsetWells(event.target.checked)}\n checked={isAllWellsSelected}\n indeterminate={indeterminate}\n />\n )}\n <TableSortLabel\n title=\"Sort\"\n active={sortBy === ColumnType.name}\n direction={\n sortBy === ColumnType.name && sortDirection === SortDirection.DESC ? 'desc' : 'asc'\n }\n classes={{\n root: classNames(styles.headerLabel, {\n [styles.cellDataViewOnly]: isViewOnly,\n }),\n }}\n onClick={() => handleSort(ColumnType.name)}\n >\n Well Name\n </TableSortLabel>\n </div>\n <Tooltip title={isWellNameExpand ? 'Collapse' : 'Expand'}>\n <RightIcon\n size=\"small\"\n className={classNames(styles.wellNameExpandIcon, {\n [styles.wellNameCollapsed]: !isWellNameExpand,\n })}\n onClick={() => setIsWellNameExpand(!isWellNameExpand)}\n />\n </Tooltip>\n </TableCell>\n\n <TableCell\n data-testid={`${PAGE_NAME}_nameExpander_${isWellNameExpand}`}\n className={styles.headCell}\n style={{ width: getCellWidth(columnsWithDict, ColumnType.status) }}\n />\n\n <TableCell\n data-testid={`${PAGE_NAME}_rig`}\n className={styles.headCell}\n style={{ width: getCellWidth(columnsWithDict, ColumnType.rig) }}\n >\n <div className={styles.nameWrapper}>\n <TableSortLabel\n title=\"Sort\"\n active={sortBy === ColumnType.rig}\n direction={\n sortBy === ColumnType.rig && sortDirection === SortDirection.DESC ? 'desc' : 'asc'\n }\n classes={{ root: styles.headerLabel }}\n onClick={() => handleSort(ColumnType.rig)}\n >\n Rig\n </TableSortLabel>\n </div>\n </TableCell>\n\n <TableCell\n data-testid={`${PAGE_NAME}_distance`}\n className={styles.headCell}\n style={{ width: getCellWidth(columnsWithDict, ColumnType.distance) }}\n >\n <div className={styles.nameWrapper}>\n <TableSortLabel\n title=\"Sort\"\n active={sortBy === ColumnType.distance}\n direction={\n sortBy === ColumnType.distance && sortDirection === SortDirection.DESC\n ? 'desc'\n : 'asc'\n }\n classes={{ root: styles.headerLabel }}\n onClick={() => handleSort(ColumnType.distance)}\n >\n {`Distance (${isImperial ? 'miles' : 'km'})`}\n </TableSortLabel>\n </div>\n </TableCell>\n {isTaColumnVisible && (\n <TableCell\n data-testid={`${PAGE_NAME}_ta`}\n className={styles.headCell}\n style={{ width: getCellWidth(columnsWithDict, ColumnType.taScore) }}\n >\n <div className={styles.nameWrapper}>TA %</div>\n </TableCell>\n )}\n\n <TableCell\n data-testid={`${PAGE_NAME}_LastActive`}\n className={styles.headCell}\n style={{ width: getCellWidth(columnsWithDict, ColumnType.lastActive) }}\n >\n <div className={styles.nameWrapper}>\n <TableSortLabel\n title=\"Sort\"\n active={sortBy === ColumnType.lastActive}\n direction={\n sortBy === ColumnType.lastActive && sortDirection === SortDirection.DESC\n ? 'desc'\n : 'asc'\n }\n classes={{ root: styles.headerLabel }}\n onClick={() => handleSort(ColumnType.lastActive)}\n >\n Last Active\n </TableSortLabel>\n </div>\n </TableCell>\n\n {metricsKeys.map(metricsKey => (\n <TableCell\n data-testid={`${PAGE_NAME}_${metricsKey}`}\n key={metricsKey}\n className={styles.headCell}\n style={{ width: getCellWidth(columnsWithDict, metricsKey) }}\n >\n <TableSortLabel\n title={isMetricsMenuOpen ? '' : 'Sort'}\n active={sortBy === metricsKey}\n direction={\n sortBy === metricsKey && sortDirection === SortDirection.DESC ? 'desc' : 'asc'\n }\n classes={{ root: styles.headerLabel }}\n onClick={() => handleSort(metricsKey)}\n >\n <MetricsSelect\n isTooltipVisible={metricsKeys.length > 1}\n currentValue={metricsKey}\n metricsKeys={metricsKeys}\n onChange={newValue => onUpdateMetricsKey(metricsKey, newValue)}\n setIsMenuOpen={setIsMetricsMenuOpen}\n />\n </TableSortLabel>\n </TableCell>\n ))}\n\n <TableCell\n data-testid={`${PAGE_NAME}_WellSection`}\n className={styles.headCell}\n style={{ width: getCellWidth(columnsWithDict, ColumnType.wellSection) }}\n >\n <div className={styles.settingsHeader}>\n <span className={styles.headerLabel}>Well Section</span>\n <MetricsSettingMenu\n viewType={viewType}\n metricsKeys={metricsKeys}\n onChange={onChangeMetricsKeys}\n contentRef={contentRef}\n />\n </div>\n </TableCell>\n </TableRow>\n );\n};\n\nOffsetWellsTableHead.propTypes = {\n open: PropTypes.bool.isRequired,\n columnsWithDict: PropTypes.arrayOf(\n PropTypes.shape({\n key: PropTypes.string,\n label: PropTypes.string,\n type: PropTypes.string,\n width: PropTypes.number,\n })\n ).isRequired,\n metricsKeys: PropTypes.arrayOf(PropTypes.string).isRequired,\n sortBy: PropTypes.string.isRequired,\n sortDirection: PropTypes.string.isRequired,\n indeterminate: PropTypes.bool.isRequired,\n isAllWellsSelected: PropTypes.bool.isRequired,\n style: PropTypes.shape({}).isRequired,\n onChangeSort: PropTypes.func.isRequired,\n onChangeMetricsKeys: PropTypes.func.isRequired,\n onUpdateMetricsKey: PropTypes.func.isRequired,\n isWellNameExpand: PropTypes.bool.isRequired,\n setIsWellNameExpand: PropTypes.func.isRequired,\n handleChangeAllOffsetWells: PropTypes.func.isRequired,\n wellNameStyle: PropTypes.string.isRequired,\n isViewOnly: PropTypes.bool.isRequired,\n isImperial: PropTypes.bool.isRequired,\n contentRef: PropTypes.shape({ current: PropTypes.instanceOf(Element) }).isRequired,\n viewType: PropTypes.string.isRequired,\n isTaColumnVisible: PropTypes.bool.isRequired,\n};\n\nexport default memo(OffsetWellsTableHead);\n"],"names":["PAGE_NAME","TableSortLabel","_ref","title","props","_objectWithoutProperties","_excluded","_jsx","Tooltip","placement","children","MuiTableSortLabel","_objectSpread","getCellWidth","columnsWithDict","key","cell","find","item","width","OffsetWellsTableHead","_ref2","_classNames","open","metricsKeys","sortBy","sortDirection","indeterminate","isAllWellsSelected","onChangeSort","onChangeMetricsKeys","onUpdateMetricsKey","isWellNameExpand","setIsWellNameExpand","handleChangeAllOffsetWells","wellNameStyle","isViewOnly","isImperial","contentRef","viewType","isTaColumnVisible","useState","_useState2","_slicedToArray","_useState","isMetricsMenuOpen","setIsMetricsMenuOpen","handleSort","SortDirection","ASC","DESC","_jsxs","TableRow","className","styles","tableRow","TableCell","concat","classNames","headCell","wellNameCell","ViewType","mobile","wellNameCellMobile","style","EXPANDED_WELL_NAME_WIDTH","ColumnType","name","nameWrapper","Checkbox","size","onChange","event","target","checked","active","direction","classes","root","headerLabel","_defineProperty","cellDataViewOnly","onClick","RightIcon","wellNameExpandIcon","wellNameCollapsed","status","rig","distance","taScore","lastActive","map","metricsKey","MetricsSelect","isTooltipVisible","length","currentValue","newValue","setIsMenuOpen","wellSection","settingsHeader","MetricsSettingMenu","propTypes","PropTypes","bool","isRequired","arrayOf","shape","string","label","type","number","func","current","instanceOf","Element","memo"],"mappings":"6iHAqBA,IAAMA,EAAY,uBAEZC,EAAiB,SAAHC,GAAA,IAAMC,IAAAA,MAAUC,EAAKC,EAAAH,EAAAI,GAAA,OACvCC,EAACC,EAAO,CAACC,UAAU,UAAUN,MAAOA,EAAMO,SACxCH,EAACI,EAAiBC,EAAA,CAAA,EAAKR,KACf,EAGZ,SAASS,EAAaC,EAAiBC,GACrC,IAAMC,EAAOF,EAAgBG,MAAK,SAAAC,GAAI,OAAIA,EAAKH,MAAQA,KACvD,OAAOC,eAAAA,EAAMG,QAAS,CACxB,CAEA,IAAMC,EAAuB,SAoBvBC,GAAA,IAAAC,EAnBJC,IAAAA,KACAT,IAAAA,gBACAU,IAAAA,YACAC,IAAAA,OACAC,IAAAA,cACAC,IAAAA,cACAC,IAAAA,mBACAC,IAAAA,aACAC,IAAAA,oBACAC,IAAAA,mBACAC,IAAAA,iBACAC,IAAAA,oBACAC,IAAAA,2BACAC,IAAAA,cACAC,IAAAA,WACAC,IAAAA,WACAC,IAAAA,WACAC,IAAAA,SACAC,IAAAA,kBAEkDC,EAAAA,GAAS,GAAMC,EAAAC,EAAA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AA,MAAA,CAAKE,UAAWC,EAAO8C,eAAe1F,SACpC,CAAAH,EAAA,OAAA,CAAM8C,UAAWC,EAAOyB,YAAYrE,SAAA,iBACpCH,EAAC8F,EAAkB,CACjB9D,SAAUA,EACVf,YAAaA,EACb+C,SAAUzC,EACVQ,WAAYA,WAMxB,EAEAlB,EAAqBkF,UAAY,CAC/B/E,KAAMgF,EAAUC,KAAKC,WACrB3F,gBAAiByF,EAAUG,QACzBH,EAAUI,MAAM,CACd5F,IAAKwF,EAAUK,OACfC,MAAON,EAAUK,OACjBE,KAAMP,EAAUK,OAChBzF,MAAOoF,EAAUQ,UAEnBN,WACFjF,YAAa+E,EAAUG,QAAQH,EAAUK,QAAQH,WACjDhF,OAAQ8E,EAAUK,OAAOH,WACzB/E,cAAe6E,EAAUK,OAAOH,WAChC9E,cAAe4E,EAAUC,KAAKC,WAC9B7E,mBAAoB2E,EAAUC,KAAKC,WACnCzC,MAAOuC,EAAUI,MAAM,CAAA,GAAIF,WAC3B5E,aAAc0E,EAAUS,KAAKP,WAC7B3E,oBAAqByE,EAAUS,KAAKP,WACpC1E,mBAAoBwE,EAAUS,KAAKP,WACnCzE,iBAAkBuE,EAAUC,KAAKC,WACjCxE,oBAAqBsE,EAAUS,KAAKP,WACpCvE,2BAA4BqE,EAAUS,KAAKP,WAC3CtE,cAAeoE,EAAUK,OAAOH,WAChCrE,WAAYmE,EAAUC,KAAKC,WAC3BpE,WAAYkE,EAAUC,KAAKC,WAC3BnE,WAAYiE,EAAUI,MAAM,CAAEM,QAASV,EAAUW,WAAWC,WAAYV,WACxElE,SAAUgE,EAAUK,OAAOH,WAC3BjE,kBAAmB+D,EAAUC,KAAKC,YAGpC,IAAeW,EAAAA,EAAKhG"}
1
+ {"version":3,"file":"OffsetWellsTableHead.js","sources":["../../../../../src/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTableHead.js"],"sourcesContent":["import { memo, useState } from 'react';\nimport classNames from 'classnames';\nimport PropTypes from 'prop-types';\nimport { SortDirection } from 'react-virtualized';\nimport {\n Checkbox,\n Tooltip,\n TableSortLabel as MuiTableSortLabel,\n TableCell,\n TableRow,\n} from '@material-ui/core';\n\nimport { ColumnType, EXPANDED_WELL_NAME_WIDTH, ViewType } from '../../constants';\n\nimport { MetricsSettingMenu } from './MetricsSettingMenu';\nimport { MetricsSelect } from './MetricsSelect';\n\nimport styles from './OffsetWellsTableHead.module.css';\n\nimport { RightIcon } from '~/icons';\n\nconst PAGE_NAME = 'OffsetWellsTableHead';\n\nconst TableSortLabel = ({ title, ...props }) => (\n <Tooltip placement=\"top-end\" title={title}>\n <MuiTableSortLabel {...props} />\n </Tooltip>\n);\n\nfunction getCellWidth(columnsWithDict, key) {\n const cell = columnsWithDict.find(item => item.key === key);\n return cell?.width || 0;\n}\n\nconst OffsetWellsTableHead = ({\n open,\n columnsWithDict,\n metricsKeys,\n sortBy,\n sortDirection,\n indeterminate,\n isAllWellsSelected,\n onChangeSort,\n onChangeMetricsKeys,\n onUpdateMetricsKey,\n isWellNameExpand,\n setIsWellNameExpand,\n handleChangeAllOffsetWells,\n wellNameStyle,\n isViewOnly,\n isImperial,\n contentRef,\n viewType,\n isTaColumnVisible,\n}) => {\n const [isMetricsMenuOpen, setIsMetricsMenuOpen] = useState(false);\n const hasCompanyColumn = columnsWithDict?.some(col => col.key === ColumnType.company);\n\n const handleSort = key => {\n onChangeSort(\n key,\n key === sortBy && sortDirection === SortDirection.ASC ? SortDirection.DESC : SortDirection.ASC\n );\n };\n\n return (\n <TableRow className={styles.tableRow}>\n <TableCell\n data-testid={`${PAGE_NAME}_wellName`}\n className={classNames(styles.headCell, styles.wellNameCell, {\n [wellNameStyle]: viewType !== ViewType.mobile,\n [styles.wellNameCellMobile]: viewType === ViewType.mobile,\n })}\n style={{\n width: isWellNameExpand\n ? EXPANDED_WELL_NAME_WIDTH\n : getCellWidth(columnsWithDict, ColumnType.name),\n }}\n >\n <div className={styles.nameWrapper}>\n {!isViewOnly && open && (\n <Checkbox\n data-testid={`${PAGE_NAME}_allWellsSelector`}\n size=\"medium\"\n onChange={event => handleChangeAllOffsetWells(event.target.checked)}\n checked={isAllWellsSelected}\n indeterminate={indeterminate}\n />\n )}\n <TableSortLabel\n title=\"Sort\"\n active={sortBy === ColumnType.name}\n direction={\n sortBy === ColumnType.name && sortDirection === SortDirection.DESC ? 'desc' : 'asc'\n }\n classes={{\n root: classNames(styles.headerLabel, {\n [styles.cellDataViewOnly]: isViewOnly,\n }),\n }}\n onClick={() => handleSort(ColumnType.name)}\n >\n Well Name\n </TableSortLabel>\n </div>\n <Tooltip title={isWellNameExpand ? 'Collapse' : 'Expand'}>\n <RightIcon\n size=\"small\"\n className={classNames(styles.wellNameExpandIcon, {\n [styles.wellNameCollapsed]: !isWellNameExpand,\n })}\n onClick={() => setIsWellNameExpand(!isWellNameExpand)}\n />\n </Tooltip>\n </TableCell>\n\n <TableCell\n data-testid={`${PAGE_NAME}_nameExpander_${isWellNameExpand}`}\n className={styles.headCell}\n style={{ width: getCellWidth(columnsWithDict, ColumnType.status) }}\n />\n\n {hasCompanyColumn && (\n <TableCell\n data-testid={`${PAGE_NAME}_company`}\n className={styles.headCell}\n style={{ width: getCellWidth(columnsWithDict, ColumnType.company) }}\n >\n <div className={styles.nameWrapper}>\n <TableSortLabel\n title=\"Sort\"\n active={sortBy === ColumnType.company}\n direction={\n sortBy === ColumnType.company && sortDirection === SortDirection.DESC\n ? 'desc'\n : 'asc'\n }\n classes={{ root: styles.headerLabel }}\n onClick={() => handleSort(ColumnType.company)}\n >\n Company\n </TableSortLabel>\n </div>\n </TableCell>\n )}\n\n <TableCell\n data-testid={`${PAGE_NAME}_rig`}\n className={styles.headCell}\n style={{ width: getCellWidth(columnsWithDict, ColumnType.rig) }}\n >\n <div className={styles.nameWrapper}>\n <TableSortLabel\n title=\"Sort\"\n active={sortBy === ColumnType.rig}\n direction={\n sortBy === ColumnType.rig && sortDirection === SortDirection.DESC ? 'desc' : 'asc'\n }\n classes={{ root: styles.headerLabel }}\n onClick={() => handleSort(ColumnType.rig)}\n >\n Rig\n </TableSortLabel>\n </div>\n </TableCell>\n\n <TableCell\n data-testid={`${PAGE_NAME}_distance`}\n className={styles.headCell}\n style={{ width: getCellWidth(columnsWithDict, ColumnType.distance) }}\n >\n <div className={styles.nameWrapper}>\n <TableSortLabel\n title=\"Sort\"\n active={sortBy === ColumnType.distance}\n direction={\n sortBy === ColumnType.distance && sortDirection === SortDirection.DESC\n ? 'desc'\n : 'asc'\n }\n classes={{ root: styles.headerLabel }}\n onClick={() => handleSort(ColumnType.distance)}\n >\n {`Distance (${isImperial ? 'miles' : 'km'})`}\n </TableSortLabel>\n </div>\n </TableCell>\n {isTaColumnVisible && (\n <TableCell\n data-testid={`${PAGE_NAME}_ta`}\n className={styles.headCell}\n style={{ width: getCellWidth(columnsWithDict, ColumnType.taScore) }}\n >\n <div className={styles.nameWrapper}>TA %</div>\n </TableCell>\n )}\n\n <TableCell\n data-testid={`${PAGE_NAME}_LastActive`}\n className={styles.headCell}\n style={{ width: getCellWidth(columnsWithDict, ColumnType.lastActive) }}\n >\n <div className={styles.nameWrapper}>\n <TableSortLabel\n title=\"Sort\"\n active={sortBy === ColumnType.lastActive}\n direction={\n sortBy === ColumnType.lastActive && sortDirection === SortDirection.DESC\n ? 'desc'\n : 'asc'\n }\n classes={{ root: styles.headerLabel }}\n onClick={() => handleSort(ColumnType.lastActive)}\n >\n Last Active\n </TableSortLabel>\n </div>\n </TableCell>\n\n {metricsKeys.map(metricsKey => (\n <TableCell\n data-testid={`${PAGE_NAME}_${metricsKey}`}\n key={metricsKey}\n className={styles.headCell}\n style={{ width: getCellWidth(columnsWithDict, metricsKey) }}\n >\n <TableSortLabel\n title={isMetricsMenuOpen ? '' : 'Sort'}\n active={sortBy === metricsKey}\n direction={\n sortBy === metricsKey && sortDirection === SortDirection.DESC ? 'desc' : 'asc'\n }\n classes={{ root: styles.headerLabel }}\n onClick={() => handleSort(metricsKey)}\n >\n <MetricsSelect\n isTooltipVisible={metricsKeys.length > 1}\n currentValue={metricsKey}\n metricsKeys={metricsKeys}\n onChange={newValue => onUpdateMetricsKey(metricsKey, newValue)}\n setIsMenuOpen={setIsMetricsMenuOpen}\n />\n </TableSortLabel>\n </TableCell>\n ))}\n\n <TableCell\n data-testid={`${PAGE_NAME}_WellSection`}\n className={styles.headCell}\n style={{ width: getCellWidth(columnsWithDict, ColumnType.wellSection) }}\n >\n <div className={styles.settingsHeader}>\n <span className={styles.headerLabel}>Well Section</span>\n <MetricsSettingMenu\n viewType={viewType}\n metricsKeys={metricsKeys}\n onChange={onChangeMetricsKeys}\n contentRef={contentRef}\n />\n </div>\n </TableCell>\n </TableRow>\n );\n};\n\nOffsetWellsTableHead.propTypes = {\n open: PropTypes.bool.isRequired,\n columnsWithDict: PropTypes.arrayOf(\n PropTypes.shape({\n key: PropTypes.string,\n label: PropTypes.string,\n type: PropTypes.string,\n width: PropTypes.number,\n })\n ).isRequired,\n metricsKeys: PropTypes.arrayOf(PropTypes.string).isRequired,\n sortBy: PropTypes.string.isRequired,\n sortDirection: PropTypes.string.isRequired,\n indeterminate: PropTypes.bool.isRequired,\n isAllWellsSelected: PropTypes.bool.isRequired,\n style: PropTypes.shape({}).isRequired,\n onChangeSort: PropTypes.func.isRequired,\n onChangeMetricsKeys: PropTypes.func.isRequired,\n onUpdateMetricsKey: PropTypes.func.isRequired,\n isWellNameExpand: PropTypes.bool.isRequired,\n setIsWellNameExpand: PropTypes.func.isRequired,\n handleChangeAllOffsetWells: PropTypes.func.isRequired,\n wellNameStyle: PropTypes.string.isRequired,\n isViewOnly: PropTypes.bool.isRequired,\n isImperial: PropTypes.bool.isRequired,\n contentRef: PropTypes.shape({ current: PropTypes.instanceOf(Element) }).isRequired,\n viewType: PropTypes.string.isRequired,\n isTaColumnVisible: PropTypes.bool.isRequired,\n};\n\nexport default memo(OffsetWellsTableHead);\n"],"names":["PAGE_NAME","TableSortLabel","_ref","title","props","_objectWithoutProperties","_excluded","_jsx","Tooltip","placement","children","MuiTableSortLabel","_objectSpread","getCellWidth","columnsWithDict","key","cell","find","item","width","OffsetWellsTableHead","_ref2","_classNames","open","metricsKeys","sortBy","sortDirection","indeterminate","isAllWellsSelected","onChangeSort","onChangeMetricsKeys","onUpdateMetricsKey","isWellNameExpand","setIsWellNameExpand","handleChangeAllOffsetWells","wellNameStyle","isViewOnly","isImperial","contentRef","viewType","isTaColumnVisible","useState","_useState2","_slicedToArray","_useState","isMetricsMenuOpen","setIsMetricsMenuOpen","hasCompanyColumn","some","col","ColumnType","company","handleSort","SortDirection","ASC","DESC","_jsxs","TableRow","className","styles","tableRow","TableCell","concat","classNames","headCell","wellNameCell","ViewType","mobile","wellNameCellMobile","style","EXPANDED_WELL_NAME_WIDTH","name","nameWrapper","Checkbox","size","onChange","event","target","checked","active","direction","classes","root","headerLabel","_defineProperty","cellDataViewOnly","onClick","RightIcon","wellNameExpandIcon","wellNameCollapsed","status","rig","distance","taScore","lastActive","map","metricsKey","MetricsSelect","isTooltipVisible","length","currentValue","newValue","setIsMenuOpen","wellSection","settingsHeader","MetricsSettingMenu","propTypes","PropTypes","bool","isRequired","arrayOf","shape","string","label","type","number","func","current","instanceOf","Element","memo"],"mappings":"6iHAqBA,IAAMA,EAAY,uBAEZC,EAAiB,SAAHC,GAAA,IAAMC,IAAAA,MAAUC,EAAKC,EAAAH,EAAAI,GAAA,OACvCC,EAACC,EAAO,CAACC,UAAU,UAAUN,MAAOA,EAAMO,SACxCH,EAACI,EAAiBC,EAAA,CAAA,EAAKR,KACf,EAGZ,SAASS,EAAaC,EAAiBC,GACrC,IAAMC,EAAOF,EAAgBG,MAAK,SAAAC,GAAI,OAAIA,EAAKH,MAAQA,KACvD,OAAOC,eAAAA,EAAMG,QAAS,CACxB,CAEA,IAAMC,EAAuB,SAoBvBC,GAAA,IAAAC,EAnBJC,IAAAA,KACAT,IAAAA,gBACAU,IAAAA,YACAC,IAAAA,OACAC,IAAAA,cACAC,IAAAA,cACAC,IAAAA,m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egF,EAAUC,KAAKC,WAC9BjF,mBAAoB+E,EAAUC,KAAKC,WACnCxC,MAAOsC,EAAUI,MAAM,CAAA,GAAIF,WAC3BhF,aAAc8E,EAAUS,KAAKP,WAC7B/E,oBAAqB6E,EAAUS,KAAKP,WACpC9E,mBAAoB4E,EAAUS,KAAKP,WACnC7E,iBAAkB2E,EAAUC,KAAKC,WACjC5E,oBAAqB0E,EAAUS,KAAKP,WACpC3E,2BAA4ByE,EAAUS,KAAKP,WAC3C1E,cAAewE,EAAUK,OAAOH,WAChCzE,WAAYuE,EAAUC,KAAKC,WAC3BxE,WAAYsE,EAAUC,KAAKC,WAC3BvE,WAAYqE,EAAUI,MAAM,CAAEM,QAASV,EAAUW,WAAWC,WAAYV,WACxEtE,SAAUoE,EAAUK,OAAOH,WAC3BrE,kBAAmBmE,EAAUC,KAAKC,YAGpC,IAAeW,EAAAA,EAAKpG"}
@@ -1,2 +1,2 @@
1
- import e from'./../../../../ext-esm/style-inject/dist/style-inject.es.js';var l={tableRow:"OffsetWellsTableHead-module_tableRow__Gvgyt",headCell:"OffsetWellsTableHead-module_headCell__hMcRS",wellNameCell:"OffsetWellsTableHead-module_wellNameCell__yllCT",wellNameCellMobile:"OffsetWellsTableHead-module_wellNameCellMobile__YJOV0",cellDataViewOnly:"OffsetWellsTableHead-module_cellDataViewOnly__dIoPu",nameWrapper:"OffsetWellsTableHead-module_nameWrapper__04GFY",headerLabel:"OffsetWellsTableHead-module_headerLabel__mOgMy",wellNameExpandIcon:"OffsetWellsTableHead-module_wellNameExpandIcon__-7Ioi",hiddenExpandIcon:"OffsetWellsTableHead-module_hiddenExpandIcon__W8MtT",wellNameCollapsed:"OffsetWellsTableHead-module_wellNameCollapsed__rVOqN",settingsHeader:"OffsetWellsTableHead-module_settingsHeader__2bsE7",popperContent:"OffsetWellsTableHead-module_popperContent__Y5aQg",popperButtonWrapper:"OffsetWellsTableHead-module_popperButtonWrapper__LO3RD",popperButton:"OffsetWellsTableHead-module_popperButton__pdIMG"};e(".OffsetWellsTableHead-module_tableRow__Gvgyt{display:flex!important;flex-direction:row!important}.OffsetWellsTableHead-module_headCell__hMcRS{align-items:center!important;display:flex!important;height:48px!important;padding:0 12px 0 0!important}.OffsetWellsTableHead-module_wellNameCell__yllCT{align-items:center;display:flex!important;justify-content:space-between;left:0;padding-right:2px!important;position:sticky;z-index:9}.OffsetWellsTableHead-module_wellNameCellMobile__YJOV0{position:static}.OffsetWellsTableHead-module_cellDataViewOnly__dIoPu{padding-left:12px!important}.OffsetWellsTableHead-module_nameWrapper__04GFY{align-items:center;display:flex}.OffsetWellsTableHead-module_headerLabel__mOgMy{color:var(--palette-primary-text-7)!important;display:flex!important;font-size:12px;font-weight:500;justify-content:flex-start!important;letter-spacing:.4px;line-height:14px;user-select:none;white-space:normal;width:100%}.OffsetWellsTableHead-module_headerLabel__mOgMy:hover{color:var(--palette-primary-text-1)!important}.OffsetWellsTableHead-module_wellNameExpandIcon__-7Ioi{color:var(--palette-primary-text-6)!important;cursor:pointer;font-size:10px!important;height:32px!important;padding:6px;transform:rotate(180deg);width:32px!important}.OffsetWellsTableHead-module_wellNameExpandIcon__-7Ioi:hover{color:var(--palette-primary-text-1)!important}.OffsetWellsTableHead-module_hiddenExpandIcon__W8MtT{display:none!important}.OffsetWellsTableHead-module_wellNameCollapsed__rVOqN{transform:rotate(0deg)}.OffsetWellsTableHead-module_settingsHeader__2bsE7{align-items:center;display:flex;flex:1;justify-content:space-between}.OffsetWellsTableHead-module_popperContent__Y5aQg{display:flex;flex-direction:column;font-size:18px!important;gap:8px;line-height:24px!important}.OffsetWellsTableHead-module_popperButtonWrapper__LO3RD{display:flex;justify-content:flex-end}.OffsetWellsTableHead-module_popperButton__pdIMG{background:hsla(0,0%,100%,.24)!important;color:#fff!important;padding:4px!important;width:71px!important}.OffsetWellsTableHead-module_popperButton__pdIMG:hover{background:hsla(0,0%,100%,.08)!important}");export{l as default};
1
+ import e from'./../../../../ext-esm/style-inject/dist/style-inject.es.js';var l={tableRow:"OffsetWellsTableHead-module_tableRow__Gvgyt",headCell:"OffsetWellsTableHead-module_headCell__hMcRS",wellNameCell:"OffsetWellsTableHead-module_wellNameCell__yllCT",wellNameCellMobile:"OffsetWellsTableHead-module_wellNameCellMobile__YJOV0",cellDataViewOnly:"OffsetWellsTableHead-module_cellDataViewOnly__dIoPu",nameWrapper:"OffsetWellsTableHead-module_nameWrapper__04GFY",headerLabel:"OffsetWellsTableHead-module_headerLabel__mOgMy",wellNameExpandIcon:"OffsetWellsTableHead-module_wellNameExpandIcon__-7Ioi",hiddenExpandIcon:"OffsetWellsTableHead-module_hiddenExpandIcon__W8MtT",wellNameCollapsed:"OffsetWellsTableHead-module_wellNameCollapsed__rVOqN",settingsHeader:"OffsetWellsTableHead-module_settingsHeader__2bsE7",popperContent:"OffsetWellsTableHead-module_popperContent__Y5aQg",popperButtonWrapper:"OffsetWellsTableHead-module_popperButtonWrapper__LO3RD",popperButton:"OffsetWellsTableHead-module_popperButton__pdIMG"};e(".OffsetWellsTableHead-module_tableRow__Gvgyt{display:flex!important;flex-direction:row!important}.OffsetWellsTableHead-module_headCell__hMcRS{align-items:center!important;background-color:#333;display:flex!important;height:48px!important;padding:0 12px 0 0!important}.OffsetWellsTableHead-module_wellNameCell__yllCT{align-items:center;display:flex!important;justify-content:space-between;left:0;padding-right:2px!important;position:sticky;z-index:9}.OffsetWellsTableHead-module_wellNameCellMobile__YJOV0{position:static}.OffsetWellsTableHead-module_cellDataViewOnly__dIoPu{padding-left:12px!important}.OffsetWellsTableHead-module_nameWrapper__04GFY{align-items:center;display:flex}.OffsetWellsTableHead-module_headerLabel__mOgMy{color:var(--palette-primary-text-7)!important;display:flex!important;font-size:12px;font-weight:500;justify-content:flex-start!important;letter-spacing:.4px;line-height:14px;user-select:none;white-space:normal;width:100%}.OffsetWellsTableHead-module_headerLabel__mOgMy:hover{color:var(--palette-primary-text-1)!important}.OffsetWellsTableHead-module_wellNameExpandIcon__-7Ioi{color:var(--palette-primary-text-6)!important;cursor:pointer;font-size:10px!important;height:32px!important;padding:6px;transform:rotate(180deg);width:32px!important}.OffsetWellsTableHead-module_wellNameExpandIcon__-7Ioi:hover{color:var(--palette-primary-text-1)!important}.OffsetWellsTableHead-module_hiddenExpandIcon__W8MtT{display:none!important}.OffsetWellsTableHead-module_wellNameCollapsed__rVOqN{transform:rotate(0deg)}.OffsetWellsTableHead-module_settingsHeader__2bsE7{align-items:center;display:flex;flex:1;justify-content:space-between}.OffsetWellsTableHead-module_popperContent__Y5aQg{display:flex;flex-direction:column;font-size:18px!important;gap:8px;line-height:24px!important}.OffsetWellsTableHead-module_popperButtonWrapper__LO3RD{display:flex;justify-content:flex-end}.OffsetWellsTableHead-module_popperButton__pdIMG{background:hsla(0,0%,100%,.24)!important;color:#fff!important;padding:4px!important;width:71px!important}.OffsetWellsTableHead-module_popperButton__pdIMG:hover{background:hsla(0,0%,100%,.08)!important}");export{l as default};
2
2
  //# sourceMappingURL=OffsetWellsTableHead.module.css.js.map
@@ -1,2 +1,2 @@
1
- import e from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/defineProperty";import{memo as l,useState as i,useCallback as a,useEffect as s,useMemo as n}from"react";import r from"prop-types";import{startCase as o,get as c}from"lodash";import d from"classnames";import u from"moment";import{TableRow as m,TableCell as f,Tooltip as h,Checkbox as b,Typography as y}from"@material-ui/core";import{ColumnType as p,ViewType as v,EXPANDED_WELL_NAME_WIDTH as w,LEAVE_TOUCH_DELAY as N,StatusOptions as W}from"../../constants.js";import{SubjectWellMark as g}from"./SubjectWellMark.js";import R from"./ViewWellSectionsName.js";import C from"./OffsetWellsTableRow.module.css.js";import{convertValue as k}from"../../../../utils/index.js";import{jsxs as q,jsx as O}from"react/jsx-runtime";var S="OffsetWellsTableRow";function D(e,t,l){var i=t.find((function(e){return e.key===l})),a=c(e,i.key);return"undefined"===a?"loading...":Number.isFinite(a)||a&&"Null"!==a?i.unitType?k(a,i.unitType,i.from,i.to):a:"—"}function T(e,t){var l=c(e,p.distance);return Number.isFinite(l)?t?l:k(l,"length","mi","km"):"—"}function j(e,t){var l,i=e.find((function(e){return e.wellId===t.id}));return null!==(l=null==i?void 0:i.taScore)&&void 0!==l?l:""}function x(e,t){var l=e.find((function(e){return e.key===t}));return(null==l?void 0:l.width)||0}var _=function(l){var r,c,k,_=l.columnsWithDict,A=l.data,M=l.subjectWellId,I=l.metricsKeys,L=l.metricsColumns,V=l.handleChangeOffsetWell,E=l.isWellNameExpand,F=l.wellNameStyle,Y=l.wellNameWidth,P=l.isViewOnly,z=l.isImperial,H=l.isLimitedOffsetWells,K=l.maxOffsetWellNumber,U=l.wellSections,B=l.setActiveWellId,G=l.viewType,J=l.isWDUser,Q=l.taScores,X=l.offsetWellsContainerRef,Z=M===A.id,$=t({},C.subjectWellRow,Z),ee=i(A.checked),te=e(ee,2),le=te[0],ie=te[1],ae=!1,se=A[p.name]||"—",ne=se;if(!E&&2*Y<8*se.length){var re=function(e){var t=document.createElement("span");document.body.appendChild(t),t.style.font="Roboto",t.style.fontSize="14px",t.style.letterSpacing="0.01071em",t.style.height="auto",t.style.width="auto",t.style.position="absolute",t.style.whiteSpace="nowrap",t.innerHTML=e;var l=Math.ceil(t.clientWidth);return document.body.removeChild(t),l}(se);if(re>2*Y){var oe=2*Y/(re/se.length);ne="".concat(se.substring(0,oe/2-2),"\n... ").concat(se.substring(se.length-oe/2+6)),ae=!0}}var ce=a((function(e){var t,l=(null===(t=X.current)||void 0===t?void 0:t.scrollTop)||0;V(A,e),ie(e),requestAnimationFrame((function(){X.current.scrollTop=l}))}),[A,V]);s((function(){ie(A.checked)}),[A.checked]);var de,ue,me=n((function(){return A[p.wellSection]}),[A]),fe=n((function(){return P?"View only mode. To edit offsets, use ".concat(J?"Offset Selection App":"WellHub","."):H&&!A.checked?"App can’t process more than (".concat(K-1,") Offset Wells."):""}),[P,H,A.checked]);return q(m,{"data-testid":"".concat(S,"_row_").concat(se),className:C.bodyRow,onMouseEnter:function(){B(A.id)},onMouseLeave:function(){B(null)},children:[q(f,{"data-testid":"".concat(S,"_well"),className:d(C.bodyCell,C.wellNameCell,$,(r={},t(r,F,G!==v.mobile),t(r,C.wellNameCellMobile,G===v.mobile),r)),style:{width:E?w:x(_,p.name)},children:[Z&&O(g,{className:d(C.subjectWellMark,t({},C.subjectWellMarkMobile,G===v.mobile))}),!Z&&O(h,{title:fe,placement:"bottom-start",classes:{tooltipPlacementBottom:C.checkboxTooltip},children:O("div",{children:O(b,{"data-testid":"".concat(S,"_checkbox"),size:"medium",checked:le,classes:{disabled:C.checkboxDisabled},disabled:P||H&&!A.checked,onChange:function(e){return ce(e.target.checked)}})})}),O(h,{title:ae?se:"",children:O(y,{variant:"body2",className:d(C.wellNameCursor,(c={},t(c,C.cellDataViewOnly,Z),t(c,C.wellNamePreWrap,ae),c)),children:ae?ne:se})})]}),O(f,{"data-testid":"".concat(S,"_dot"),className:d(C.bodyCell,$),style:{width:x(_,p.status)},children:!Z&&O(h,{title:o(A[p.status]),enterTouchDelay:G===v.mobile&&0,leaveTouchDelay:G===v.mobile&&N,children:O("div",{className:C.statusContainer,children:O("div",{"data-testid":"".concat(S,"_color"),className:C.status,style:{background:null===(k=W.find((function(e){return e.value===A[p.status]})))||void 0===k?void 0:k.color}})})})}),O(f,{"data-testid":"".concat(S,"_rig"),className:d(C.bodyCell,$),style:{width:x(_,p.rig)},children:O(y,{variant:"body2",className:C.cellData,children:A[p.rig]&&"Null"!==A[p.rig]?A[p.rig]:"—"})}),O(f,{"data-testid":"".concat(S,"_distance"),className:d(C.bodyCell,$),style:{width:x(_,p.distance)},children:O(y,{variant:"body2",className:C.cellData,children:T(A,z)})}),!!Q.length&&O(f,{"data-testid":"".concat(S,"_ta"),className:d(C.bodyCell,$),style:{width:x(_,p.taScore)},children:O(y,{variant:"body2",className:C.cellData,children:j(Q,A)})}),O(f,{"data-testid":"".concat(S,"_lastActive"),className:d(C.bodyCell,$),style:{width:x(_,p.lastActive)},children:O(y,{variant:"body2",className:C.cellData,children:A[p.lastActive]&&Number.isFinite(A[p.lastActive])?u.unix(A[p.lastActive]).format("MM/DD/YYYY"):"—"})}),I.map((function(e){return O(f,{"data-testid":"".concat(S,"_").concat(e),className:d(C.bodyCell,$),style:{width:x(_,e)},children:O(y,{variant:"body2",className:C.cellData,children:D(A,L,e)})},e)})),O(f,{"data-testid":"".concat(S,"_wellSection"),className:d(C.bodyCell,C.lastCell,$),style:{width:x(_,p.wellSection)},children:me&&me.length>1?O(h,{classes:{tooltip:C.customTooltip},title:O(R,{wellSectionNames:me}),children:O("div",{className:C.sectionLength,children:me.length})}):O(h,{title:me||"",children:O(y,{variant:"body2",className:C.cellData,style:{color:me&&1===me.length&&(de=me,ue=e(de,1)[0],U.find((function(e){return e.label===ue})).color)},children:me})})})]})};_.propTypes={columnsWithDict:r.arrayOf(r.shape({})).isRequired,data:r.shape({id:r.number,checked:r.bool,name:r.string,status:r.string}).isRequired,subjectWellId:r.number.isRequired,metricsKeys:r.arrayOf(r.string).isRequired,metricsColumns:r.arrayOf(r.shape({})).isRequired,handleChangeOffsetWell:r.func.isRequired,isWellNameExpand:r.bool.isRequired,wellNameStyle:r.string.isRequired,wellNameWidth:r.number.isRequired,isViewOnly:r.bool.isRequired,isImperial:r.bool.isRequired,isLimitedOffsetWells:r.bool.isRequired,maxOffsetWellNumber:r.number.isRequired,wellSections:r.arrayOf(r.shape({})).isRequired,setActiveWellId:r.func.isRequired,viewType:r.string.isRequired,isWDUser:r.bool.isRequired,taScores:r.arrayOf(r.shape({})).isRequired,offsetWellsContainerRef:r.shape({}).isRequired};var A=l(_);export{A as default};
1
+ import e from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/defineProperty";import{memo as l,useState as i,useCallback as a,useEffect as s,useMemo as n}from"react";import r from"prop-types";import{startCase as o,get as c}from"lodash";import d from"classnames";import m from"moment";import{TableRow as u,TableCell as h,Tooltip as f,Checkbox as y,Typography as b}from"@material-ui/core";import{ColumnType as p,ViewType as v,EXPANDED_WELL_NAME_WIDTH as N,LEAVE_TOUCH_DELAY as w,StatusOptions as W}from"../../constants.js";import{SubjectWellMark as g}from"./SubjectWellMark.js";import R from"./ViewWellSectionsName.js";import C from"./OffsetWellsTableRow.module.css.js";import{convertValue as k}from"../../../../utils/index.js";import{jsxs as q,jsx as O}from"react/jsx-runtime";var S="OffsetWellsTableRow";function D(e,t,l){var i=t.find((function(e){return e.key===l})),a=c(e,i.key);return"undefined"===a?"loading...":Number.isFinite(a)||a&&"Null"!==a?i.unitType?k(a,i.unitType,i.from,i.to):a:"—"}function T(e,t){var l=c(e,p.distance);return Number.isFinite(l)?t?l:k(l,"length","mi","km"):"—"}function _(e,t){var l,i=e.find((function(e){return e.wellId===t.id}));return null!==(l=null==i?void 0:i.taScore)&&void 0!==l?l:""}function j(e,t){var l=e.find((function(e){return e.key===t}));return(null==l?void 0:l.width)||0}var x=function(l){var r,c,k,x=l.columnsWithDict,A=l.data,M=l.subjectWellId,I=l.metricsKeys,L=l.metricsColumns,V=l.handleChangeOffsetWell,E=l.isWellNameExpand,F=l.wellNameStyle,Y=l.wellNameWidth,P=l.isViewOnly,z=l.isImperial,H=l.isLimitedOffsetWells,K=l.maxOffsetWellNumber,U=l.wellSections,B=l.setActiveWellId,G=l.viewType,J=l.isWDUser,Q=l.taScores,X=l.offsetWellsContainerRef,Z=M===A.id,$=t({},C.subjectWellRow,Z),ee=i(A.checked),te=e(ee,2),le=te[0],ie=te[1],ae=!1,se=A[p.name]||"—",ne=se;if(!E&&2*Y<8*se.length){var re=function(e){var t=document.createElement("span");document.body.appendChild(t),t.style.font="Roboto",t.style.fontSize="14px",t.style.letterSpacing="0.01071em",t.style.height="auto",t.style.width="auto",t.style.position="absolute",t.style.whiteSpace="nowrap",t.innerHTML=e;var l=Math.ceil(t.clientWidth);return document.body.removeChild(t),l}(se);if(re>2*Y){var oe=2*Y/(re/se.length);ne="".concat(se.substring(0,oe/2-2),"\n... ").concat(se.substring(se.length-oe/2+6)),ae=!0}}var ce=a((function(e){var t,l=(null===(t=X.current)||void 0===t?void 0:t.scrollTop)||0;V(A,e),ie(e),requestAnimationFrame((function(){X.current.scrollTop=l}))}),[A,V]);s((function(){ie(A.checked)}),[A.checked]);var de,me,ue=n((function(){return A[p.wellSection]}),[A]),he=n((function(){return P?"View only mode. To edit offsets, use ".concat(J?"Offset Selection App":"WellHub","."):H&&!A.checked?"App can’t process more than (".concat(K-1,") Offset Wells."):""}),[P,H,A.checked]);return q(u,{"data-testid":"".concat(S,"_row_").concat(se),className:C.bodyRow,onMouseEnter:function(){B(A.id)},onMouseLeave:function(){B(null)},children:[q(h,{"data-testid":"".concat(S,"_well"),className:d(C.bodyCell,C.wellNameCell,$,(r={},t(r,F,G!==v.mobile),t(r,C.wellNameCellMobile,G===v.mobile),r)),style:{width:E?N:j(x,p.name)},children:[Z&&O(g,{className:d(C.subjectWellMark,t({},C.subjectWellMarkMobile,G===v.mobile))}),!Z&&O(f,{title:he,placement:"bottom-start",classes:{tooltipPlacementBottom:C.checkboxTooltip},children:O("div",{children:O(y,{"data-testid":"".concat(S,"_checkbox"),size:"medium",checked:le,classes:{disabled:C.checkboxDisabled},disabled:P||H&&!A.checked,onChange:function(e){return ce(e.target.checked)}})})}),O(f,{title:ae?se:"",children:O(b,{variant:"body2",className:d(C.wellNameCursor,(c={},t(c,C.cellDataViewOnly,Z),t(c,C.wellNamePreWrap,ae),c)),children:ae?ne:se})})]}),O(h,{"data-testid":"".concat(S,"_dot"),className:d(C.bodyCell,$),style:{width:j(x,p.status)},children:!Z&&O(f,{title:o(A[p.status]),enterTouchDelay:G===v.mobile&&0,leaveTouchDelay:G===v.mobile&&w,children:O("div",{className:C.statusContainer,children:O("div",{"data-testid":"".concat(S,"_color"),className:C.status,style:{background:null===(k=W.find((function(e){return e.value===A[p.status]})))||void 0===k?void 0:k.color}})})})}),O(h,{"data-testid":"".concat(S,"_company"),className:d(C.bodyCell,$),style:{width:j(x,p.company)},children:O(b,{variant:"body2",className:C.cellData,children:A[p.company]&&"Null"!==A[p.company]?A[p.company]:"—"})}),O(h,{"data-testid":"".concat(S,"_rig"),className:d(C.bodyCell,$),style:{width:j(x,p.rig)},children:O(b,{variant:"body2",className:C.cellData,children:A[p.rig]&&"Null"!==A[p.rig]?A[p.rig]:"—"})}),O(h,{"data-testid":"".concat(S,"_distance"),className:d(C.bodyCell,$),style:{width:j(x,p.distance)},children:O(b,{variant:"body2",className:C.cellData,children:T(A,z)})}),!!Q.length&&O(h,{"data-testid":"".concat(S,"_ta"),className:d(C.bodyCell,$),style:{width:j(x,p.taScore)},children:O(b,{variant:"body2",className:C.cellData,children:_(Q,A)})}),O(h,{"data-testid":"".concat(S,"_lastActive"),className:d(C.bodyCell,$),style:{width:j(x,p.lastActive)},children:O(b,{variant:"body2",className:C.cellData,children:A[p.lastActive]&&Number.isFinite(A[p.lastActive])?m.unix(A[p.lastActive]).format("MM/DD/YYYY"):"—"})}),I.map((function(e){return O(h,{"data-testid":"".concat(S,"_").concat(e),className:d(C.bodyCell,$),style:{width:j(x,e)},children:O(b,{variant:"body2",className:C.cellData,children:D(A,L,e)})},e)})),O(h,{"data-testid":"".concat(S,"_wellSection"),className:d(C.bodyCell,C.lastCell,$),style:{width:j(x,p.wellSection)},children:ue&&ue.length>1?O(f,{classes:{tooltip:C.customTooltip},title:O(R,{wellSectionNames:ue}),children:O("div",{className:C.sectionLength,children:ue.length})}):O(f,{title:ue||"",children:O(b,{variant:"body2",className:C.cellData,style:{color:ue&&1===ue.length&&(de=ue,me=e(de,1)[0],U.find((function(e){return e.label===me})).color)},children:ue})})})]})};x.propTypes={columnsWithDict:r.arrayOf(r.shape({})).isRequired,data:r.shape({id:r.number,checked:r.bool,name:r.string,status:r.string}).isRequired,subjectWellId:r.number.isRequired,metricsKeys:r.arrayOf(r.string).isRequired,metricsColumns:r.arrayOf(r.shape({})).isRequired,handleChangeOffsetWell:r.func.isRequired,isWellNameExpand:r.bool.isRequired,wellNameStyle:r.string.isRequired,wellNameWidth:r.number.isRequired,isViewOnly:r.bool.isRequired,isImperial:r.bool.isRequired,isLimitedOffsetWells:r.bool.isRequired,maxOffsetWellNumber:r.number.isRequired,wellSections:r.arrayOf(r.shape({})).isRequired,setActiveWellId:r.func.isRequired,viewType:r.string.isRequired,isWDUser:r.bool.isRequired,taScores:r.arrayOf(r.shape({})).isRequired,offsetWellsContainerRef:r.shape({}).isRequired};var A=l(x);export{A as default};
2
2
  //# sourceMappingURL=OffsetWellsTableRow.js.map