@corva/ui 3.77.0-5 → 3.77.0-6

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 (649) hide show
  1. package/cjs-bundle/clients/jsonApi/index.js +1 -1
  2. package/cjs-bundle/clients/jsonApi/index.js.map +1 -1
  3. package/cjs-bundle/components/AddComment/Popover.js +1 -1
  4. package/cjs-bundle/components/AddComment/Popover.js.map +1 -1
  5. package/cjs-bundle/components/AddComment/components/Content.js +1 -1
  6. package/cjs-bundle/components/AddComment/components/Content.js.map +1 -1
  7. package/cjs-bundle/components/Annotations/components/AnnotationsList/components/AddAnnotationForm/index.js +1 -1
  8. package/cjs-bundle/components/Annotations/components/AnnotationsList/components/AddAnnotationForm/index.js.map +1 -1
  9. package/cjs-bundle/components/Annotations/components/AnnotationsList/index.js +1 -1
  10. package/cjs-bundle/components/Annotations/components/AnnotationsList/index.js.map +1 -1
  11. package/cjs-bundle/components/AssetsMultipleSelector/AssetsMultipleSelector.js +1 -1
  12. package/cjs-bundle/components/AssetsMultipleSelector/AssetsMultipleSelector.js.map +1 -1
  13. package/cjs-bundle/components/Attachment/index.js +1 -1
  14. package/cjs-bundle/components/Attachment/index.js.map +1 -1
  15. package/cjs-bundle/components/BICOffsetPickerDialog/components/Map/Map.js +1 -1
  16. package/cjs-bundle/components/BICOffsetPickerDialog/components/Map/Map.js.map +1 -1
  17. package/cjs-bundle/components/BICOffsetPickerDialog/components/WellSection/index.js +1 -1
  18. package/cjs-bundle/components/BICOffsetPickerDialog/components/WellSection/index.js.map +1 -1
  19. package/cjs-bundle/components/BICOffsetPickerDialog/index.js +1 -1
  20. package/cjs-bundle/components/BICOffsetPickerDialog/index.js.map +1 -1
  21. package/cjs-bundle/components/Casing/CasingTableV2/components/CasingJoints/Editor.js +1 -1
  22. package/cjs-bundle/components/Casing/CasingTableV2/components/CasingJoints/Editor.js.map +1 -1
  23. package/cjs-bundle/components/Casing/CasingTableV2/components/Component.js +1 -1
  24. package/cjs-bundle/components/Casing/CasingTableV2/components/Component.js.map +1 -1
  25. package/cjs-bundle/components/Casing/CasingTableV2/components/DrillPipe/Editor.js +1 -1
  26. package/cjs-bundle/components/Casing/CasingTableV2/components/DrillPipe/Editor.js.map +1 -1
  27. package/cjs-bundle/components/CollapsableSidebar.js +1 -1
  28. package/cjs-bundle/components/CollapsableSidebar.js.map +1 -1
  29. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js +1 -1
  30. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js.map +1 -1
  31. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js +1 -1
  32. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js.map +1 -1
  33. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.js +1 -1
  34. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.js.map +1 -1
  35. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/LegacyAppActions.js +1 -1
  36. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/LegacyAppActions.js.map +1 -1
  37. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus.js +1 -1
  38. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus.js.map +1 -1
  39. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/PriorityMenus.js +1 -1
  40. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/PriorityMenus.js.map +1 -1
  41. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/effects/useAppMaximized.js +1 -1
  42. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/effects/useAppMaximized.js.map +1 -1
  43. package/cjs-bundle/components/DevCenter/IsolatedDevCenterAppContainer/IsolatedPage.js +1 -1
  44. package/cjs-bundle/components/DevCenter/IsolatedDevCenterAppContainer/IsolatedPage.js.map +1 -1
  45. package/cjs-bundle/components/DevCenter/IsolatedDevCenterAppContainer/effects/useXProps.js.map +1 -1
  46. package/cjs-bundle/components/DocumentViewer/DocumentViewer.js +1 -1
  47. package/cjs-bundle/components/DocumentViewer/DocumentViewer.js.map +1 -1
  48. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js +1 -1
  49. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js.map +1 -1
  50. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js +1 -1
  51. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js.map +1 -1
  52. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Component.js +1 -1
  53. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Component.js.map +1 -1
  54. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js +1 -1
  55. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js.map +1 -1
  56. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js +1 -1
  57. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js.map +1 -1
  58. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js +1 -1
  59. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js.map +1 -1
  60. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js +1 -1
  61. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js.map +1 -1
  62. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js +1 -1
  63. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js.map +1 -1
  64. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js +1 -1
  65. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js.map +1 -1
  66. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js +1 -1
  67. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js.map +1 -1
  68. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js +1 -1
  69. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js.map +1 -1
  70. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js +1 -1
  71. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js.map +1 -1
  72. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js +1 -1
  73. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js.map +1 -1
  74. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js +1 -1
  75. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js.map +1 -1
  76. package/cjs-bundle/components/EmbeddedApp/EmbeddedApp.js +1 -1
  77. package/cjs-bundle/components/EmbeddedApp/EmbeddedApp.js.map +1 -1
  78. package/cjs-bundle/components/FeedItem/FeedItem.js +1 -1
  79. package/cjs-bundle/components/FeedItem/FeedItem.js.map +1 -1
  80. package/cjs-bundle/components/FeedItem/FeedItemEditProvider/FeedItemEditProvider.js +1 -1
  81. package/cjs-bundle/components/FeedItem/FeedItemEditProvider/FeedItemEditProvider.js.map +1 -1
  82. package/cjs-bundle/components/FeedItem/components/Content.js +1 -1
  83. package/cjs-bundle/components/FeedItem/components/Content.js.map +1 -1
  84. package/cjs-bundle/components/FeedItem/feedItemTypes/AppAnnotationFeedItem/index.js +1 -1
  85. package/cjs-bundle/components/FeedItem/feedItemTypes/AppAnnotationFeedItem/index.js.map +1 -1
  86. package/cjs-bundle/components/FeedItem/feedItemTypes/WellPlanFeedItem/index.js +1 -1
  87. package/cjs-bundle/components/FeedItem/feedItemTypes/WellPlanFeedItem/index.js.map +1 -1
  88. package/cjs-bundle/components/FilesLoaderV2/utils.js +1 -1
  89. package/cjs-bundle/components/FilesLoaderV2/utils.js.map +1 -1
  90. package/cjs-bundle/components/GradientManager/GradientManager.js +1 -1
  91. package/cjs-bundle/components/GradientManager/GradientManager.js.map +1 -1
  92. package/cjs-bundle/components/GradientManager/GradientSelect.js +1 -1
  93. package/cjs-bundle/components/GradientManager/GradientSelect.js.map +1 -1
  94. package/cjs-bundle/components/InfiniteList/index.js +1 -1
  95. package/cjs-bundle/components/InfiniteList/index.js.map +1 -1
  96. package/cjs-bundle/components/OffsetWellMap/OffsetWellMap.js +1 -1
  97. package/cjs-bundle/components/OffsetWellMap/OffsetWellMap.js.map +1 -1
  98. package/cjs-bundle/components/OffsetWellPickerV2/OffsetWellPickerDialog.js +1 -1
  99. package/cjs-bundle/components/OffsetWellPickerV2/OffsetWellPickerDialog.js.map +1 -1
  100. package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js +1 -1
  101. package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js.map +1 -1
  102. package/cjs-bundle/components/OffsetWellPickerV2/components/Map/Map.js +1 -1
  103. package/cjs-bundle/components/OffsetWellPickerV2/components/Map/Map.js.map +1 -1
  104. package/cjs-bundle/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js +1 -1
  105. package/cjs-bundle/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js.map +1 -1
  106. package/cjs-bundle/components/OffsetWellPickerV2/constants.js +1 -1
  107. package/cjs-bundle/components/OffsetWellPickerV2/constants.js.map +1 -1
  108. package/cjs-bundle/components/OffsetWellPickerV2/effects/index.js +1 -1
  109. package/cjs-bundle/components/OffsetWellPickerV2/effects/index.js.map +1 -1
  110. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Map/Map.js +1 -1
  111. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Map/Map.js.map +1 -1
  112. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js +1 -1
  113. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js.map +1 -1
  114. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/constants.js +1 -1
  115. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/constants.js.map +1 -1
  116. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/effects/index.js +1 -1
  117. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/effects/index.js.map +1 -1
  118. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/index.js +1 -1
  119. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/index.js.map +1 -1
  120. package/cjs-bundle/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js +1 -1
  121. package/cjs-bundle/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js.map +1 -1
  122. package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js +1 -1
  123. package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js.map +1 -1
  124. package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/index.js +1 -1
  125. package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/index.js.map +1 -1
  126. package/cjs-bundle/components/OffsetWellPickerV3/components/WellHubView/index.js +1 -1
  127. package/cjs-bundle/components/OffsetWellPickerV3/components/WellHubView/index.js.map +1 -1
  128. package/cjs-bundle/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js +1 -1
  129. package/cjs-bundle/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js.map +1 -1
  130. package/cjs-bundle/components/OffsetWellPickerV3/index.js +1 -1
  131. package/cjs-bundle/components/OffsetWellPickerV3/index.js.map +1 -1
  132. package/cjs-bundle/components/OffsetWellPickerV5/OffsetWellPickerV5.js +1 -1
  133. package/cjs-bundle/components/OffsetWellPickerV5/OffsetWellPickerV5.js.map +1 -1
  134. package/cjs-bundle/components/OffsetWellPickerV5/components/AppHeader/components/HeaderActions/HeaderActions.js +1 -1
  135. package/cjs-bundle/components/OffsetWellPickerV5/components/AppHeader/components/HeaderActions/HeaderActions.js.map +1 -1
  136. package/cjs-bundle/components/OffsetWellPickerV5/components/AppHeader/components/LoadAllWellsToggle/LoadAllWellsToggle.js +1 -1
  137. package/cjs-bundle/components/OffsetWellPickerV5/components/AppHeader/components/LoadAllWellsToggle/LoadAllWellsToggle.js.map +1 -1
  138. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/Filter.js +1 -1
  139. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/Filter.js.map +1 -1
  140. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js +1 -1
  141. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js.map +1 -1
  142. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/PeriodFilterSelect/PeriodFilterSelect.js +1 -1
  143. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/PeriodFilterSelect/PeriodFilterSelect.js.map +1 -1
  144. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/SingleFilterSelect/SingleFilterSelect.js +1 -1
  145. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/SingleFilterSelect/SingleFilterSelect.js.map +1 -1
  146. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/ClusterTooltip/ClusterTooltip.js +1 -1
  147. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/ClusterTooltip/ClusterTooltip.js.map +1 -1
  148. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/LayerSwitcher/LayerSwitcher.js +1 -1
  149. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/LayerSwitcher/LayerSwitcher.js.map +1 -1
  150. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapControls/MapControls.js +1 -1
  151. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapControls/MapControls.js.map +1 -1
  152. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapHints/MapHintsStash.js +1 -1
  153. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapHints/MapHintsStash.js.map +1 -1
  154. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/SubjectWellMarker/SubjectWellMarker.js +1 -1
  155. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/SubjectWellMarker/SubjectWellMarker.js.map +1 -1
  156. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useMapTooltipState.js +1 -1
  157. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useMapTooltipState.js.map +1 -1
  158. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useOffsetWellMapState.js +1 -1
  159. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useOffsetWellMapState.js.map +1 -1
  160. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useSelectionToolOrchestration.js +1 -1
  161. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useSelectionToolOrchestration.js.map +1 -1
  162. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/utils/well-markers-utils.js +1 -1
  163. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/utils/well-markers-utils.js.map +1 -1
  164. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js +1 -1
  165. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js.map +1 -1
  166. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/OffsetWellPickerV5WithStore.js +1 -1
  167. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/OffsetWellPickerV5WithStore.js.map +1 -1
  168. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/components/CompanySafeguardWrapper/CompanySafeguardWrapper.js +1 -1
  169. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/components/CompanySafeguardWrapper/CompanySafeguardWrapper.js.map +1 -1
  170. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/components/UserSettingsWrapper/UserSettingsWrapper.js +1 -1
  171. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/components/UserSettingsWrapper/UserSettingsWrapper.js.map +1 -1
  172. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AssetResultSection/AssetResultSection.js +1 -1
  173. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AssetResultSection/AssetResultSection.js.map +1 -1
  174. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AutoCompleteAssetSearch/AutoCompleteAssetSearch.js +1 -1
  175. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AutoCompleteAssetSearch/AutoCompleteAssetSearch.js.map +1 -1
  176. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/CompanyCell/CompanyCell.js +1 -1
  177. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/CompanyCell/CompanyCell.js.map +1 -1
  178. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/FormationCell/FormationCell.js +1 -1
  179. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/FormationCell/FormationCell.js.map +1 -1
  180. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/InterventionAssetCell/InterventionAssetCell.js +1 -1
  181. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/InterventionAssetCell/InterventionAssetCell.js.map +1 -1
  182. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/PadNameCell/PadNameCell.js +1 -1
  183. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/PadNameCell/PadNameCell.js.map +1 -1
  184. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/RigCell/RigCell.js +1 -1
  185. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/RigCell/RigCell.js.map +1 -1
  186. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/WellNameCell/WellNameCell.js +1 -1
  187. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/WellNameCell/WellNameCell.js.map +1 -1
  188. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/SettingsMenu.js +1 -1
  189. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/SettingsMenu.js.map +1 -1
  190. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/MetricsSettingsSection/MetricsSettingsSection.js +1 -1
  191. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/MetricsSettingsSection/MetricsSettingsSection.js.map +1 -1
  192. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/TableSettingsSection/TableSettingsSection.js +1 -1
  193. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/TableSettingsSection/TableSettingsSection.js.map +1 -1
  194. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/WellNameHeaderCell/WellNameHeaderCell.js +1 -1
  195. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/WellNameHeaderCell/WellNameHeaderCell.js.map +1 -1
  196. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/hooks/useAdvancedSearchHandler.js +1 -1
  197. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/hooks/useAdvancedSearchHandler.js.map +1 -1
  198. package/cjs-bundle/components/OffsetWellPickerV5/components/PickerModalActions/PickerModalActions.js +1 -1
  199. package/cjs-bundle/components/OffsetWellPickerV5/components/PickerModalActions/PickerModalActions.js.map +1 -1
  200. package/cjs-bundle/components/OffsetWellPickerV5/constants.js +1 -1
  201. package/cjs-bundle/components/OffsetWellPickerV5/constants.js.map +1 -1
  202. package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useCompanyMetricKey.js +1 -1
  203. package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useCompanyMetricKey.js.map +1 -1
  204. package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useWellDataPipeline.js +1 -1
  205. package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useWellDataPipeline.js.map +1 -1
  206. package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/wellTransformations.js +1 -1
  207. package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/wellTransformations.js.map +1 -1
  208. package/cjs-bundle/components/OffsetWellPickerV5/hooks/useAutoSyncOffsetWells.js +1 -1
  209. package/cjs-bundle/components/OffsetWellPickerV5/hooks/useAutoSyncOffsetWells.js.map +1 -1
  210. package/cjs-bundle/components/OffsetWellPickerV5/hooks/useIsAdmin.js +1 -1
  211. package/cjs-bundle/components/OffsetWellPickerV5/hooks/useIsAdmin.js.map +1 -1
  212. package/cjs-bundle/components/OffsetWellPickerV5/hooks/useLimitNotification.js +1 -1
  213. package/cjs-bundle/components/OffsetWellPickerV5/hooks/useLimitNotification.js.map +1 -1
  214. package/cjs-bundle/components/OffsetWellPickerV5/stores/idas-resync-store/createIdasResyncController.js +1 -1
  215. package/cjs-bundle/components/OffsetWellPickerV5/stores/idas-resync-store/createIdasResyncController.js.map +1 -1
  216. package/cjs-bundle/components/OffsetWellPickerV5/utils/getCoordinatedWells.js +1 -1
  217. package/cjs-bundle/components/OffsetWellPickerV5/utils/getCoordinatedWells.js.map +1 -1
  218. package/cjs-bundle/components/PadOffsetsPicker/StagesSelector.js +1 -1
  219. package/cjs-bundle/components/PadOffsetsPicker/StagesSelector.js.map +1 -1
  220. package/cjs-bundle/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js +1 -1
  221. package/cjs-bundle/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js.map +1 -1
  222. package/cjs-bundle/components/RealTimeValuesSidebar/SidebarFooter.js +1 -1
  223. package/cjs-bundle/components/RealTimeValuesSidebar/SidebarFooter.js.map +1 -1
  224. package/cjs-bundle/componentsV2/AppFooter/DqPopover/DqPopover.js +1 -1
  225. package/cjs-bundle/componentsV2/AppFooter/DqPopover/DqPopover.js.map +1 -1
  226. package/cjs-bundle/componentsV2/AppHeader/AppAssets/utils.js +1 -1
  227. package/cjs-bundle/componentsV2/AppHeader/AppAssets/utils.js.map +1 -1
  228. package/cjs-bundle/componentsV2/AppHeader/V3/Actions/Actions.js +1 -1
  229. package/cjs-bundle/componentsV2/AppHeader/V3/Actions/Actions.js.map +1 -1
  230. package/cjs-bundle/componentsV2/AppHeader/V3/AppTitle/AppTitle.js +1 -1
  231. package/cjs-bundle/componentsV2/AppHeader/V3/AppTitle/AppTitle.js.map +1 -1
  232. package/cjs-bundle/componentsV2/AppHeader/V3/AssetSelector/AssetSelector.js +1 -1
  233. package/cjs-bundle/componentsV2/AppHeader/V3/AssetSelector/AssetSelector.js.map +1 -1
  234. package/cjs-bundle/componentsV2/AppHeader/V3/VersionSelect/VersionSelect.js +1 -1
  235. package/cjs-bundle/componentsV2/AppHeader/V3/VersionSelect/VersionSelect.js.map +1 -1
  236. package/cjs-bundle/componentsV2/AppPanel/AppPanelDisplay.js +1 -1
  237. package/cjs-bundle/componentsV2/AppPanel/AppPanelDisplay.js.map +1 -1
  238. package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/Map/Map.js +1 -1
  239. package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/Map/Map.js.map +1 -1
  240. package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/hooks/useNonActivePads.js +1 -1
  241. package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/hooks/useNonActivePads.js.map +1 -1
  242. package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/hooks/usePadsByRadius.js +1 -1
  243. package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/hooks/usePadsByRadius.js.map +1 -1
  244. package/cjs-bundle/componentsV2/FilesDropzone/utils.js +1 -1
  245. package/cjs-bundle/componentsV2/FilesDropzone/utils.js.map +1 -1
  246. package/cjs-bundle/componentsV2/FilesLoader/utils.js +1 -1
  247. package/cjs-bundle/componentsV2/FilesLoader/utils.js.map +1 -1
  248. package/cjs-bundle/componentsV2/IndicatorLive/IndicatorLive.js.map +1 -1
  249. package/cjs-bundle/componentsV2/PadModeSelect/PadModeSelect.js +1 -1
  250. package/cjs-bundle/componentsV2/PadModeSelect/PadModeSelect.js.map +1 -1
  251. package/cjs-bundle/componentsV2/TemplatesControl/PublishModal/PublishModal.js +1 -1
  252. package/cjs-bundle/componentsV2/TemplatesControl/PublishModal/PublishModal.js.map +1 -1
  253. package/cjs-bundle/componentsV2/TemplatesControl/ShareModal/ShareModal.js +1 -1
  254. package/cjs-bundle/componentsV2/TemplatesControl/ShareModal/ShareModal.js.map +1 -1
  255. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useCopyTemplate.js +1 -1
  256. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useCopyTemplate.js.map +1 -1
  257. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useCreateTemplate.js +1 -1
  258. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useCreateTemplate.js.map +1 -1
  259. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useDeleteFolder.js +1 -1
  260. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useDeleteFolder.js.map +1 -1
  261. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useDeleteTemplate.js +1 -1
  262. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useDeleteTemplate.js.map +1 -1
  263. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useExportTemplate.js +1 -1
  264. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useExportTemplate.js.map +1 -1
  265. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useImportTemplate.js +1 -1
  266. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useImportTemplate.js.map +1 -1
  267. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useInitialize.js +1 -1
  268. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useInitialize.js.map +1 -1
  269. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useMoveToFolder.js +1 -1
  270. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useMoveToFolder.js.map +1 -1
  271. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/usePublishTemplate.js +1 -1
  272. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/usePublishTemplate.js.map +1 -1
  273. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useRevertToOriginal.js +1 -1
  274. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useRevertToOriginal.js.map +1 -1
  275. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useShareTemplate.js +1 -1
  276. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useShareTemplate.js.map +1 -1
  277. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useUnfollowTemplate.js +1 -1
  278. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useUnfollowTemplate.js.map +1 -1
  279. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useUpdateFolderName.js +1 -1
  280. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useUpdateFolderName.js.map +1 -1
  281. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useUpdateTemplateName.js +1 -1
  282. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useUpdateTemplateName.js.map +1 -1
  283. package/cjs-bundle/componentsV2/TemplatesControl/Toggle/Toggle.js +1 -1
  284. package/cjs-bundle/componentsV2/TemplatesControl/Toggle/Toggle.js.map +1 -1
  285. package/cjs-bundle/componentsV2/TextInputBase/TextInputBase.js +1 -1
  286. package/cjs-bundle/componentsV2/TextInputBase/TextInputBase.js.map +1 -1
  287. package/cjs-bundle/componentsV2/TextInputNext/TextInputNext.js +1 -1
  288. package/cjs-bundle/componentsV2/TextInputNext/TextInputNext.js.map +1 -1
  289. package/cjs-bundle/componentsV2/WellArchivedMessage/WellArchivedMessage.js +1 -1
  290. package/cjs-bundle/componentsV2/WellArchivedMessage/WellArchivedMessage.js.map +1 -1
  291. package/cjs-bundle/constants/notifications.js +1 -1
  292. package/cjs-bundle/constants/notifications.js.map +1 -1
  293. package/cjs-bundle/effects/useGlobalOffsetWellsSync.js +1 -1
  294. package/cjs-bundle/effects/useGlobalOffsetWellsSync.js.map +1 -1
  295. package/cjs-bundle/effects/useSharedDCStore.js +1 -1
  296. package/cjs-bundle/effects/useSharedDCStore.js.map +1 -1
  297. package/cjs-bundle/testing/AppTestWrapper/AppTestWrapper.js +1 -1
  298. package/cjs-bundle/testing/AppTestWrapper/AppTestWrapper.js.map +1 -1
  299. package/cjs-bundle/utils/DrillstringUtils.js +1 -1
  300. package/cjs-bundle/utils/DrillstringUtils.js.map +1 -1
  301. package/cjs-bundle/utils/apps.js +1 -1
  302. package/cjs-bundle/utils/apps.js.map +1 -1
  303. package/cjs-bundle/utils/convert.js +1 -1
  304. package/cjs-bundle/utils/convert.js.map +1 -1
  305. package/cjs-bundle/utils/devcenter.js +1 -1
  306. package/cjs-bundle/utils/devcenter.js.map +1 -1
  307. package/cjs-bundle/utils/index.js +1 -1
  308. package/cjs-bundle/utils/index.js.map +1 -1
  309. package/cjs-bundle/utils/lasParser.js +1 -1
  310. package/cjs-bundle/utils/lasParser.js.map +1 -1
  311. package/cjs-bundle/utils/time.js.map +1 -1
  312. package/clients/jsonApi/index.js +1 -1
  313. package/clients/jsonApi/index.js.map +1 -1
  314. package/components/AddComment/Popover.js +1 -1
  315. package/components/AddComment/Popover.js.map +1 -1
  316. package/components/AddComment/components/Content.js +1 -1
  317. package/components/AddComment/components/Content.js.map +1 -1
  318. package/components/Annotations/components/AnnotationsList/components/AddAnnotationForm/index.js +1 -1
  319. package/components/Annotations/components/AnnotationsList/components/AddAnnotationForm/index.js.map +1 -1
  320. package/components/Annotations/components/AnnotationsList/index.js +1 -1
  321. package/components/Annotations/components/AnnotationsList/index.js.map +1 -1
  322. package/components/AssetsMultipleSelector/AssetsMultipleSelector.js +1 -1
  323. package/components/AssetsMultipleSelector/AssetsMultipleSelector.js.map +1 -1
  324. package/components/Attachment/index.js +1 -1
  325. package/components/Attachment/index.js.map +1 -1
  326. package/components/BICOffsetPickerDialog/components/Map/Map.js +1 -1
  327. package/components/BICOffsetPickerDialog/components/Map/Map.js.map +1 -1
  328. package/components/BICOffsetPickerDialog/components/WellSection/index.js +1 -1
  329. package/components/BICOffsetPickerDialog/components/WellSection/index.js.map +1 -1
  330. package/components/BICOffsetPickerDialog/index.js +1 -1
  331. package/components/BICOffsetPickerDialog/index.js.map +1 -1
  332. package/components/Casing/CasingTableV2/components/CasingJoints/Editor.js +1 -1
  333. package/components/Casing/CasingTableV2/components/CasingJoints/Editor.js.map +1 -1
  334. package/components/Casing/CasingTableV2/components/Component.js +1 -1
  335. package/components/Casing/CasingTableV2/components/Component.js.map +1 -1
  336. package/components/Casing/CasingTableV2/components/DrillPipe/Editor.js +1 -1
  337. package/components/Casing/CasingTableV2/components/DrillPipe/Editor.js.map +1 -1
  338. package/components/CollapsableSidebar.js +1 -1
  339. package/components/CollapsableSidebar.js.map +1 -1
  340. package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js +1 -1
  341. package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js.map +1 -1
  342. package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js +1 -1
  343. package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js.map +1 -1
  344. package/components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.js +1 -1
  345. package/components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.js.map +1 -1
  346. package/components/DevCenter/DevCenterAppContainer/components/LegacyAppActions.js +1 -1
  347. package/components/DevCenter/DevCenterAppContainer/components/LegacyAppActions.js.map +1 -1
  348. package/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus.js +1 -1
  349. package/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus.js.map +1 -1
  350. package/components/DevCenter/DevCenterAppContainer/components/PriorityMenus.js +1 -1
  351. package/components/DevCenter/DevCenterAppContainer/components/PriorityMenus.js.map +1 -1
  352. package/components/DevCenter/DevCenterAppContainer/effects/useAppMaximized.js +1 -1
  353. package/components/DevCenter/DevCenterAppContainer/effects/useAppMaximized.js.map +1 -1
  354. package/components/DevCenter/IsolatedDevCenterAppContainer/IsolatedPage.d.ts.map +1 -1
  355. package/components/DevCenter/IsolatedDevCenterAppContainer/IsolatedPage.js +1 -1
  356. package/components/DevCenter/IsolatedDevCenterAppContainer/IsolatedPage.js.map +1 -1
  357. package/components/DevCenter/IsolatedDevCenterAppContainer/effects/useXProps.d.ts.map +1 -1
  358. package/components/DevCenter/IsolatedDevCenterAppContainer/effects/useXProps.js.map +1 -1
  359. package/components/DocumentViewer/DocumentViewer.js +1 -1
  360. package/components/DocumentViewer/DocumentViewer.js.map +1 -1
  361. package/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js +1 -1
  362. package/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js.map +1 -1
  363. package/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js +1 -1
  364. package/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js.map +1 -1
  365. package/components/Drillstring/BHAComponentsTable/components/Component.js +1 -1
  366. package/components/Drillstring/BHAComponentsTable/components/Component.js.map +1 -1
  367. package/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js +1 -1
  368. package/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js.map +1 -1
  369. package/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js +1 -1
  370. package/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js.map +1 -1
  371. package/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js +1 -1
  372. package/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js.map +1 -1
  373. package/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js +1 -1
  374. package/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js.map +1 -1
  375. package/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js +1 -1
  376. package/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js.map +1 -1
  377. package/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js +1 -1
  378. package/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js.map +1 -1
  379. package/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js +1 -1
  380. package/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js.map +1 -1
  381. package/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js +1 -1
  382. package/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js.map +1 -1
  383. package/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js +1 -1
  384. package/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js.map +1 -1
  385. package/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js +1 -1
  386. package/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js.map +1 -1
  387. package/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js +1 -1
  388. package/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js.map +1 -1
  389. package/components/EmbeddedApp/EmbeddedApp.d.ts.map +1 -1
  390. package/components/EmbeddedApp/EmbeddedApp.js +1 -1
  391. package/components/EmbeddedApp/EmbeddedApp.js.map +1 -1
  392. package/components/FeedItem/FeedItem.js +1 -1
  393. package/components/FeedItem/FeedItem.js.map +1 -1
  394. package/components/FeedItem/FeedItemEditProvider/FeedItemEditProvider.js +1 -1
  395. package/components/FeedItem/FeedItemEditProvider/FeedItemEditProvider.js.map +1 -1
  396. package/components/FeedItem/components/Content.d.ts.map +1 -1
  397. package/components/FeedItem/components/Content.js +1 -1
  398. package/components/FeedItem/components/Content.js.map +1 -1
  399. package/components/FeedItem/feedItemTypes/AppAnnotationFeedItem/index.d.ts.map +1 -1
  400. package/components/FeedItem/feedItemTypes/AppAnnotationFeedItem/index.js +1 -1
  401. package/components/FeedItem/feedItemTypes/AppAnnotationFeedItem/index.js.map +1 -1
  402. package/components/FeedItem/feedItemTypes/WellPlanFeedItem/index.d.ts.map +1 -1
  403. package/components/FeedItem/feedItemTypes/WellPlanFeedItem/index.js +1 -1
  404. package/components/FeedItem/feedItemTypes/WellPlanFeedItem/index.js.map +1 -1
  405. package/components/FilesLoaderV2/utils.js +1 -1
  406. package/components/FilesLoaderV2/utils.js.map +1 -1
  407. package/components/GradientManager/GradientManager.js +1 -1
  408. package/components/GradientManager/GradientManager.js.map +1 -1
  409. package/components/GradientManager/GradientSelect.js +1 -1
  410. package/components/GradientManager/GradientSelect.js.map +1 -1
  411. package/components/InfiniteList/index.d.ts.map +1 -1
  412. package/components/InfiniteList/index.js +1 -1
  413. package/components/InfiniteList/index.js.map +1 -1
  414. package/components/OffsetWellMap/OffsetWellMap.js +1 -1
  415. package/components/OffsetWellMap/OffsetWellMap.js.map +1 -1
  416. package/components/OffsetWellPickerV2/OffsetWellPickerDialog.js +1 -1
  417. package/components/OffsetWellPickerV2/OffsetWellPickerDialog.js.map +1 -1
  418. package/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js +1 -1
  419. package/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js.map +1 -1
  420. package/components/OffsetWellPickerV2/components/Map/Map.js +1 -1
  421. package/components/OffsetWellPickerV2/components/Map/Map.js.map +1 -1
  422. package/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js +1 -1
  423. package/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js.map +1 -1
  424. package/components/OffsetWellPickerV2/constants.js +1 -1
  425. package/components/OffsetWellPickerV2/constants.js.map +1 -1
  426. package/components/OffsetWellPickerV2/effects/index.js +1 -1
  427. package/components/OffsetWellPickerV2/effects/index.js.map +1 -1
  428. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Map/Map.js +1 -1
  429. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Map/Map.js.map +1 -1
  430. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js +1 -1
  431. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js.map +1 -1
  432. package/components/OffsetWellPickerV3/components/CustomSelectionView/constants.js +1 -1
  433. package/components/OffsetWellPickerV3/components/CustomSelectionView/constants.js.map +1 -1
  434. package/components/OffsetWellPickerV3/components/CustomSelectionView/effects/index.js +1 -1
  435. package/components/OffsetWellPickerV3/components/CustomSelectionView/effects/index.js.map +1 -1
  436. package/components/OffsetWellPickerV3/components/CustomSelectionView/index.js +1 -1
  437. package/components/OffsetWellPickerV3/components/CustomSelectionView/index.js.map +1 -1
  438. package/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js +1 -1
  439. package/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js.map +1 -1
  440. package/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js +1 -1
  441. package/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js.map +1 -1
  442. package/components/OffsetWellPickerV3/components/TabSelection/index.js +1 -1
  443. package/components/OffsetWellPickerV3/components/TabSelection/index.js.map +1 -1
  444. package/components/OffsetWellPickerV3/components/WellHubView/index.js +1 -1
  445. package/components/OffsetWellPickerV3/components/WellHubView/index.js.map +1 -1
  446. package/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js +1 -1
  447. package/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js.map +1 -1
  448. package/components/OffsetWellPickerV3/index.js +1 -1
  449. package/components/OffsetWellPickerV3/index.js.map +1 -1
  450. package/components/OffsetWellPickerV5/OffsetWellPickerV5.js +1 -1
  451. package/components/OffsetWellPickerV5/OffsetWellPickerV5.js.map +1 -1
  452. package/components/OffsetWellPickerV5/components/AppHeader/components/HeaderActions/HeaderActions.js +1 -1
  453. package/components/OffsetWellPickerV5/components/AppHeader/components/HeaderActions/HeaderActions.js.map +1 -1
  454. package/components/OffsetWellPickerV5/components/AppHeader/components/LoadAllWellsToggle/LoadAllWellsToggle.js +1 -1
  455. package/components/OffsetWellPickerV5/components/AppHeader/components/LoadAllWellsToggle/LoadAllWellsToggle.js.map +1 -1
  456. package/components/OffsetWellPickerV5/components/Filter/Filter.js +1 -1
  457. package/components/OffsetWellPickerV5/components/Filter/Filter.js.map +1 -1
  458. package/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js +1 -1
  459. package/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js.map +1 -1
  460. package/components/OffsetWellPickerV5/components/Filter/components/PeriodFilterSelect/PeriodFilterSelect.js +1 -1
  461. package/components/OffsetWellPickerV5/components/Filter/components/PeriodFilterSelect/PeriodFilterSelect.js.map +1 -1
  462. package/components/OffsetWellPickerV5/components/Filter/components/SingleFilterSelect/SingleFilterSelect.js +1 -1
  463. package/components/OffsetWellPickerV5/components/Filter/components/SingleFilterSelect/SingleFilterSelect.js.map +1 -1
  464. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/ClusterTooltip/ClusterTooltip.js +1 -1
  465. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/ClusterTooltip/ClusterTooltip.js.map +1 -1
  466. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/LayerSwitcher/LayerSwitcher.js +1 -1
  467. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/LayerSwitcher/LayerSwitcher.js.map +1 -1
  468. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapControls/MapControls.js +1 -1
  469. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapControls/MapControls.js.map +1 -1
  470. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapHints/MapHintsStash.js +1 -1
  471. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapHints/MapHintsStash.js.map +1 -1
  472. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/SubjectWellMarker/SubjectWellMarker.js +1 -1
  473. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/SubjectWellMarker/SubjectWellMarker.js.map +1 -1
  474. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useMapTooltipState.js +1 -1
  475. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useMapTooltipState.js.map +1 -1
  476. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useOffsetWellMapState.js +1 -1
  477. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useOffsetWellMapState.js.map +1 -1
  478. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useSelectionToolOrchestration.js +1 -1
  479. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useSelectionToolOrchestration.js.map +1 -1
  480. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/utils/well-markers-utils.js +1 -1
  481. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/utils/well-markers-utils.js.map +1 -1
  482. package/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js +1 -1
  483. package/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js.map +1 -1
  484. package/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/OffsetWellPickerV5WithStore.js +1 -1
  485. package/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/OffsetWellPickerV5WithStore.js.map +1 -1
  486. package/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/components/CompanySafeguardWrapper/CompanySafeguardWrapper.js +1 -1
  487. package/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/components/CompanySafeguardWrapper/CompanySafeguardWrapper.js.map +1 -1
  488. package/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/components/UserSettingsWrapper/UserSettingsWrapper.js +1 -1
  489. package/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/components/UserSettingsWrapper/UserSettingsWrapper.js.map +1 -1
  490. package/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AssetResultSection/AssetResultSection.js +1 -1
  491. package/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AssetResultSection/AssetResultSection.js.map +1 -1
  492. package/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AutoCompleteAssetSearch/AutoCompleteAssetSearch.js +1 -1
  493. package/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AutoCompleteAssetSearch/AutoCompleteAssetSearch.js.map +1 -1
  494. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/CompanyCell/CompanyCell.js +1 -1
  495. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/CompanyCell/CompanyCell.js.map +1 -1
  496. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/FormationCell/FormationCell.js +1 -1
  497. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/FormationCell/FormationCell.js.map +1 -1
  498. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/InterventionAssetCell/InterventionAssetCell.js +1 -1
  499. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/InterventionAssetCell/InterventionAssetCell.js.map +1 -1
  500. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/PadNameCell/PadNameCell.js +1 -1
  501. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/PadNameCell/PadNameCell.js.map +1 -1
  502. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/RigCell/RigCell.js +1 -1
  503. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/RigCell/RigCell.js.map +1 -1
  504. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/WellNameCell/WellNameCell.js +1 -1
  505. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/WellNameCell/WellNameCell.js.map +1 -1
  506. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/SettingsMenu.js +1 -1
  507. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/SettingsMenu.js.map +1 -1
  508. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/MetricsSettingsSection/MetricsSettingsSection.js +1 -1
  509. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/MetricsSettingsSection/MetricsSettingsSection.js.map +1 -1
  510. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/TableSettingsSection/TableSettingsSection.js +1 -1
  511. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/TableSettingsSection/TableSettingsSection.js.map +1 -1
  512. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/WellNameHeaderCell/WellNameHeaderCell.js +1 -1
  513. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/WellNameHeaderCell/WellNameHeaderCell.js.map +1 -1
  514. package/components/OffsetWellPickerV5/components/OffsetWellsTable/hooks/useAdvancedSearchHandler.js +1 -1
  515. package/components/OffsetWellPickerV5/components/OffsetWellsTable/hooks/useAdvancedSearchHandler.js.map +1 -1
  516. package/components/OffsetWellPickerV5/components/PickerModalActions/PickerModalActions.js +1 -1
  517. package/components/OffsetWellPickerV5/components/PickerModalActions/PickerModalActions.js.map +1 -1
  518. package/components/OffsetWellPickerV5/constants.js +1 -1
  519. package/components/OffsetWellPickerV5/constants.js.map +1 -1
  520. package/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useCompanyMetricKey.js +1 -1
  521. package/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useCompanyMetricKey.js.map +1 -1
  522. package/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useWellDataPipeline.js +1 -1
  523. package/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useWellDataPipeline.js.map +1 -1
  524. package/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/wellTransformations.js +1 -1
  525. package/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/wellTransformations.js.map +1 -1
  526. package/components/OffsetWellPickerV5/hooks/useAutoSyncOffsetWells.js +1 -1
  527. package/components/OffsetWellPickerV5/hooks/useAutoSyncOffsetWells.js.map +1 -1
  528. package/components/OffsetWellPickerV5/hooks/useIsAdmin.js +1 -1
  529. package/components/OffsetWellPickerV5/hooks/useIsAdmin.js.map +1 -1
  530. package/components/OffsetWellPickerV5/hooks/useLimitNotification.js +1 -1
  531. package/components/OffsetWellPickerV5/hooks/useLimitNotification.js.map +1 -1
  532. package/components/OffsetWellPickerV5/stores/idas-resync-store/createIdasResyncController.js +1 -1
  533. package/components/OffsetWellPickerV5/stores/idas-resync-store/createIdasResyncController.js.map +1 -1
  534. package/components/OffsetWellPickerV5/utils/getCoordinatedWells.d.ts.map +1 -1
  535. package/components/OffsetWellPickerV5/utils/getCoordinatedWells.js +1 -1
  536. package/components/OffsetWellPickerV5/utils/getCoordinatedWells.js.map +1 -1
  537. package/components/PadOffsetsPicker/StagesSelector.js +1 -1
  538. package/components/PadOffsetsPicker/StagesSelector.js.map +1 -1
  539. package/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js +1 -1
  540. package/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js.map +1 -1
  541. package/components/RealTimeValuesSidebar/SidebarFooter.js +1 -1
  542. package/components/RealTimeValuesSidebar/SidebarFooter.js.map +1 -1
  543. package/componentsV2/AppFooter/DqPopover/DqPopover.js +1 -1
  544. package/componentsV2/AppFooter/DqPopover/DqPopover.js.map +1 -1
  545. package/componentsV2/AppHeader/AppAssets/utils.js +1 -1
  546. package/componentsV2/AppHeader/AppAssets/utils.js.map +1 -1
  547. package/componentsV2/AppHeader/V3/Actions/Actions.js +1 -1
  548. package/componentsV2/AppHeader/V3/Actions/Actions.js.map +1 -1
  549. package/componentsV2/AppHeader/V3/AppTitle/AppTitle.js +1 -1
  550. package/componentsV2/AppHeader/V3/AppTitle/AppTitle.js.map +1 -1
  551. package/componentsV2/AppHeader/V3/AssetSelector/AssetSelector.js +1 -1
  552. package/componentsV2/AppHeader/V3/AssetSelector/AssetSelector.js.map +1 -1
  553. package/componentsV2/AppHeader/V3/VersionSelect/VersionSelect.js +1 -1
  554. package/componentsV2/AppHeader/V3/VersionSelect/VersionSelect.js.map +1 -1
  555. package/componentsV2/AppPanel/AppPanelDisplay.js +1 -1
  556. package/componentsV2/AppPanel/AppPanelDisplay.js.map +1 -1
  557. package/componentsV2/CompletionsOffsetWellPicker/Map/Map.js +1 -1
  558. package/componentsV2/CompletionsOffsetWellPicker/Map/Map.js.map +1 -1
  559. package/componentsV2/CompletionsOffsetWellPicker/hooks/useNonActivePads.js +1 -1
  560. package/componentsV2/CompletionsOffsetWellPicker/hooks/useNonActivePads.js.map +1 -1
  561. package/componentsV2/CompletionsOffsetWellPicker/hooks/usePadsByRadius.js +1 -1
  562. package/componentsV2/CompletionsOffsetWellPicker/hooks/usePadsByRadius.js.map +1 -1
  563. package/componentsV2/FilesDropzone/utils.js +1 -1
  564. package/componentsV2/FilesDropzone/utils.js.map +1 -1
  565. package/componentsV2/FilesLoader/utils.js +1 -1
  566. package/componentsV2/FilesLoader/utils.js.map +1 -1
  567. package/componentsV2/IndicatorLive/IndicatorLive.d.ts.map +1 -1
  568. package/componentsV2/IndicatorLive/IndicatorLive.js.map +1 -1
  569. package/componentsV2/PadModeSelect/PadModeSelect.js +1 -1
  570. package/componentsV2/PadModeSelect/PadModeSelect.js.map +1 -1
  571. package/componentsV2/TemplatesControl/PublishModal/PublishModal.js +1 -1
  572. package/componentsV2/TemplatesControl/PublishModal/PublishModal.js.map +1 -1
  573. package/componentsV2/TemplatesControl/ShareModal/ShareModal.js +1 -1
  574. package/componentsV2/TemplatesControl/ShareModal/ShareModal.js.map +1 -1
  575. package/componentsV2/TemplatesControl/Store/hooks/useCopyTemplate.js +1 -1
  576. package/componentsV2/TemplatesControl/Store/hooks/useCopyTemplate.js.map +1 -1
  577. package/componentsV2/TemplatesControl/Store/hooks/useCreateTemplate.js +1 -1
  578. package/componentsV2/TemplatesControl/Store/hooks/useCreateTemplate.js.map +1 -1
  579. package/componentsV2/TemplatesControl/Store/hooks/useDeleteFolder.js +1 -1
  580. package/componentsV2/TemplatesControl/Store/hooks/useDeleteFolder.js.map +1 -1
  581. package/componentsV2/TemplatesControl/Store/hooks/useDeleteTemplate.js +1 -1
  582. package/componentsV2/TemplatesControl/Store/hooks/useDeleteTemplate.js.map +1 -1
  583. package/componentsV2/TemplatesControl/Store/hooks/useExportTemplate.js +1 -1
  584. package/componentsV2/TemplatesControl/Store/hooks/useExportTemplate.js.map +1 -1
  585. package/componentsV2/TemplatesControl/Store/hooks/useImportTemplate.js +1 -1
  586. package/componentsV2/TemplatesControl/Store/hooks/useImportTemplate.js.map +1 -1
  587. package/componentsV2/TemplatesControl/Store/hooks/useInitialize.js +1 -1
  588. package/componentsV2/TemplatesControl/Store/hooks/useInitialize.js.map +1 -1
  589. package/componentsV2/TemplatesControl/Store/hooks/useMoveToFolder.js +1 -1
  590. package/componentsV2/TemplatesControl/Store/hooks/useMoveToFolder.js.map +1 -1
  591. package/componentsV2/TemplatesControl/Store/hooks/usePublishTemplate.js +1 -1
  592. package/componentsV2/TemplatesControl/Store/hooks/usePublishTemplate.js.map +1 -1
  593. package/componentsV2/TemplatesControl/Store/hooks/useRevertToOriginal.js +1 -1
  594. package/componentsV2/TemplatesControl/Store/hooks/useRevertToOriginal.js.map +1 -1
  595. package/componentsV2/TemplatesControl/Store/hooks/useShareTemplate.js +1 -1
  596. package/componentsV2/TemplatesControl/Store/hooks/useShareTemplate.js.map +1 -1
  597. package/componentsV2/TemplatesControl/Store/hooks/useUnfollowTemplate.js +1 -1
  598. package/componentsV2/TemplatesControl/Store/hooks/useUnfollowTemplate.js.map +1 -1
  599. package/componentsV2/TemplatesControl/Store/hooks/useUpdateFolderName.js +1 -1
  600. package/componentsV2/TemplatesControl/Store/hooks/useUpdateFolderName.js.map +1 -1
  601. package/componentsV2/TemplatesControl/Store/hooks/useUpdateTemplateName.js +1 -1
  602. package/componentsV2/TemplatesControl/Store/hooks/useUpdateTemplateName.js.map +1 -1
  603. package/componentsV2/TemplatesControl/Toggle/Toggle.js +1 -1
  604. package/componentsV2/TemplatesControl/Toggle/Toggle.js.map +1 -1
  605. package/componentsV2/TextInputBase/TextInputBase.js +1 -1
  606. package/componentsV2/TextInputBase/TextInputBase.js.map +1 -1
  607. package/componentsV2/TextInputNext/TextInputNext.js +1 -1
  608. package/componentsV2/TextInputNext/TextInputNext.js.map +1 -1
  609. package/componentsV2/WellArchivedMessage/WellArchivedMessage.js +1 -1
  610. package/componentsV2/WellArchivedMessage/WellArchivedMessage.js.map +1 -1
  611. package/constants/assets.d.ts +40 -1
  612. package/constants/assets.d.ts.map +1 -1
  613. package/constants/bha.d.ts +4 -4
  614. package/constants/notifications.d.ts +5 -2
  615. package/constants/notifications.d.ts.map +1 -1
  616. package/constants/notifications.js +1 -1
  617. package/constants/notifications.js.map +1 -1
  618. package/effects/useGlobalOffsetWellsSync.js +1 -1
  619. package/effects/useGlobalOffsetWellsSync.js.map +1 -1
  620. package/effects/useSharedDCStore.js +1 -1
  621. package/effects/useSharedDCStore.js.map +1 -1
  622. package/mcp-server/server.mjs +49 -91
  623. package/package.json +1 -2
  624. package/testing/AppTestWrapper/AppTestWrapper.js +1 -1
  625. package/testing/AppTestWrapper/AppTestWrapper.js.map +1 -1
  626. package/tsconfig.tsbuildinfo +1 -1
  627. package/utils/DrillstringUtils.d.ts.map +1 -1
  628. package/utils/DrillstringUtils.js +1 -1
  629. package/utils/DrillstringUtils.js.map +1 -1
  630. package/utils/apps.js +1 -1
  631. package/utils/apps.js.map +1 -1
  632. package/utils/convert.d.ts +0 -19
  633. package/utils/convert.d.ts.map +1 -1
  634. package/utils/convert.js +1 -1
  635. package/utils/convert.js.map +1 -1
  636. package/utils/devcenter.d.ts.map +1 -1
  637. package/utils/devcenter.js +1 -1
  638. package/utils/devcenter.js.map +1 -1
  639. package/utils/index.d.ts +4 -4
  640. package/utils/index.d.ts.map +1 -1
  641. package/utils/index.js +1 -1
  642. package/utils/index.js.map +1 -1
  643. package/utils/lasParser.d.ts.map +1 -1
  644. package/utils/lasParser.js +1 -1
  645. package/utils/lasParser.js.map +1 -1
  646. package/utils/time.d.ts.map +1 -1
  647. package/utils/time.js.map +1 -1
  648. package/utils/HeatmapUtils.d.ts +0 -1
  649. package/utils/HeatmapUtils.d.ts.map +0 -1
@@ -1,2 +1,2 @@
1
- import o from"@babel/runtime/helpers/slicedToArray";import s from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/objectWithoutProperties";import{useState as i,useCallback as e}from"react";import n from"prop-types";import c from"react-player";import r from"classnames";import{withStyles as a}from"@material-ui/core/styles";import{Typography as m}from"@material-ui/core";import l from"@material-ui/icons/Image";import p from"@material-ui/icons/Fullscreen";import u from"@material-ui/core/colors/grey";import d from"../NewDocumentViewer/NewDocumentViewer.js";import{UnavailableFileIcon as h}from"../NewDocumentViewer/icons/UnavailableFileIcon.js";import{ImageViewer as j}from"../../componentsV2/ImageViewer/ImageViewer.js";import I from"./styles.css.js";import f from"../FileTypeIcon.js";import g from"../IconButton/index.js";import{isNativeDetected as v}from"../../utils/mobileDetect.js";import{getIsImage as b,getIsVideo as w}from"../../utils/fileExtension.js";import{getIsPreviewUnavailable as y}from"../../utils/filePreview.js";import{DownloadIcon as N}from"../../icons/iconParkIcons.js";import"../../icons/customIcons/icons/AddMessage.js";import"../../icons/customIcons/icons/DragOne.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/SearchOne.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/InfoRounded.js";import"../../icons/customIcons/icons/FlameFilled.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/PinOne.js";import"../../icons/customIcons/icons/PinOneCrossed.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"../../icons/customIcons/icons/CloudDelete.js";import"../../icons/customIcons/icons/Lasso.js";import"../../icons/customIcons/icons/Radius.js";import"../../icons/customIcons/icons/ErrorOps.js";import"../../icons/customIcons/icons/DataTypeOps.js";import"../../icons/customIcons/icons/FalsePositiveOps.js";import"../../icons/customIcons/icons/CalibrationOps.js";import"../../icons/customIcons/icons/CriticalOps.js";import"../../icons/customIcons/icons/Company.js";import"../../icons/customIcons/icons/ArchiveOne.js";import"../../icons/customIcons/icons/ParseBotFusion.js";import"../../icons/customIcons/icons/Connect.js";import"../../icons/customIcons/icons/PuzzleOne.js";import"../../icons/customIcons/icons/Feed.js";import"../../icons/customIcons/icons/Prompt.js";import"../../icons/customIcons/icons/Companies.js";import"../../icons/customIcons/icons/ClipboardAi.js";import"../../icons/customIcons/icons/Key.js";import"../../icons/customIcons/icons/AtSignCrossed.js";import"../../icons/customIcons/icons/MappingManual.js";import"../../icons/customIcons/icons/Mapping.js";import"../../icons/customIcons/icons/Metrics.js";import"../../icons/customIcons/icons/Drops.js";import"../../icons/customIcons/icons/ClipboardSearch.js";import"../../icons/customIcons/icons/Template.js";import"../../icons/customIcons/icons/ClipboardMetrics.js";import"../../icons/customIcons/icons/ClipboardBuilder.js";import"../../icons/customIcons/icons/UnitConversion.js";import"../../icons/customIcons/icons/NPT.js";import"../../icons/customIcons/icons/GuidedFrac.js";import"../../clients/subscriptions/constants.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"lodash";import"../../clients/subscriptions.v1.js";import"../../clients/jsonApi/index.js";import"../../clients/subscriptions/subscriptions-client.factory.js";import"immutable";import"query-string";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 C from"../../effects/useSignedURL.js";import"../../utils/index.js";import"uuid";import"jsona";import"../../utils/env.js";import"../StatusBadge/constants.js";import"@babel/runtime/helpers/toConsumableArray";import"lodash/set";import"lodash/get";import"lodash/unset";import"moment";import"../../clients/api/apiCore.js";import"../../clients/constants.js";import"../../clients/sso/auth0.js";import"../../clients/sso/oauth2.js";import"../../clients/api/rateLimiter.js";import"lodash/isEmpty";import"lodash/sortBy";import"../../constants/streamSourceType.js";import"../DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchContext.js";import"../../componentsV2/AppCommonsProvider/AppCommonsProvider.js";import"../../componentsV2/AppCommonsProvider/AppCommonsContext.js";import"../../componentsV2/AppPanel/AppPanelsContext.js";import O from"../../utils/main.js";import{jsx as P,jsxs as F,Fragment as x}from"react/jsx-runtime";var A=["displayName","fileName","attachmentSize","size","small"];function D(o,s){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(o);s&&(i=i.filter((function(s){return Object.getOwnPropertyDescriptor(o,s).enumerable}))),t.push.apply(t,i)}return t}function S(o){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?D(Object(i),!0).forEach((function(t){s(o,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(i)):D(Object(i)).forEach((function(s){Object.defineProperty(o,s,Object.getOwnPropertyDescriptor(i,s))}))}return o}var z=u[200],W=u[400],R={label:"small",value:135},U={label:"medium",value:300},L={fileImage:function(o,s){return{maxWidth:"100%",borderRadius:4,overflow:"hidden",maxHeight:s===R.label?R.value:U.value,display:o?"initial":"none",cursor:"pointer"}},fileDownloadWrapper:{padding:"10px 10px 10px 5px",border:"1px solid #616161",borderRadius:3,maxWidth:500,width:"75%"},imagePlaceholder:{position:"relative",backgroundColor:z,borderRadius:3,marginTop:10,height:135,width:135}},k=function(o){var s,t,i=C(o.attachmentFileName)||o.attachmentUrl;return F(x,{children:[F("div",{onClick:o.openLightbox,className:I.cAttachmentImg,children:[P("img",{"data-testid":"".concat("Attachment","_image"),src:i,style:L.fileImage(!!o.imageDimensions,o.size),alt:"Attachment",onLoad:o.onImageLoaded}),P("div",{"data-testid":"".concat("Attachment","_button"),className:I.cAttachmentImgPreviwBtn,children:P(p,{})})]}),!o.imageDimensions&&P("div",{style:L.imagePlaceholder,children:P(l,{"data-testid":"".concat("Attachment","_placeholder"),className:o.classes.imageIconRoot,htmlColor:W,fontSize:"large"})}),o.lightboxIsOpen&&P(j,{src:i,onClose:o.handleLightboxClose,onOpen:o.handleLightboxOpen,width:null===(s=o.imageDimensions)||void 0===s?void 0:s.width,height:null===(t=o.imageDimensions)||void 0===t?void 0:t.height})]})},E=function(o){var s=O.getFileNameWithExtensionFromPath(o.displayName||o.attachmentUrl),t=C(o.attachmentFileName,"inline"),i=C(o.attachmentFileName,"attachment"),e=y(s);return F("div",{className:I.cAttachmentFileWrapper,children:[F("div",{className:r(I.cAttachmentFileDownloadWrapper,e&&o.classes.disabledPreview),style:L.fileDownloadWrapper,onClick:function(){e||o.openPreview()},children:[e?P(h,{className:o.classes.unavailableFileIcon}):P(f,{fileName:o.displayName||o.attachmentUrl,className:I.cAttachmentFileDownloadWrapperFileIcon,size:o.small?25:50}),F("div",{className:o.classes.titleContainer,children:[e&&P("div",{className:o.classes.caption,children:"Preview unavailable"}),P("div",{"data-testid":"".concat("Attachment","_name"),className:r(I.cAttachmentFileDownloadWrapperFileName,e&&o.classes.fileName),children:P(m,{variant:"subtitle2",noWrap:!0,className:o.classes.unavailableFileName,children:s})})]}),P(d,{fileUrl:t,classes:{root:o.classes.dialogRoot,paper:v?o.classes.nativeDialog:o.classes.dialog},fileName:s,fileSize:o.attachmentSize,onClose:o.closePreview,open:o.previewIsOpen})]}),P("a",{download:o.displayName,href:i,className:I.cAttachmentFileDownloadWrapperForm,children:P(g,{"data-testid":"".concat("Attachment","_downloadButton"),className:o.classes.downloadIcon,type:"submit",children:P(N,{size:24,className:o.classes.downloadIcon})})})]})};function T(s){var n=s.displayName,r=void 0===n?null:n,a=s.fileName,m=void 0===a?null:a,l=s.attachmentSize,p=void 0===l?void 0:l,u=s.size,d=void 0===u?U.label:u,h=s.small,j=void 0!==h&&h,f=S(S({},t(s,A)),{},{displayName:r,fileName:m,attachmentSize:p,size:d,small:j}),g=i(void 0),y=o(g,2),N=y[0],O=y[1],F=i(!1),x=o(F,2),D=x[0],z=x[1],W=i(!1),L=o(W,2),T=L[0],M=L[1],V=f.displayName||f.attachmentUrl||f.fileName,B=b(V),q=w(V),G=C(!f.attachmentUrl&&f.fileName),_=f.attachmentUrl||G,H=e((function(o){return o.preventDefault()}),[]),K=e((function(){v&&document.documentElement.addEventListener("touchmove",H,{passive:!1})}),[H]),Z=e((function(){v&&document.documentElement.removeEventListener("touchmove",H),z(!1)}),[H]),J=e((function(){return z(!0)}),[]),Q=e((function(o){var s=o.currentTarget,t=s.naturalWidth,i=s.naturalHeight;O({width:t,height:i})}),[]),X=e((function(){return M(!0)}),[]),Y=e((function(o){o.stopPropagation(),M(!1)}),[]);return B?P("div",{className:I.cAttachment,children:P(k,{size:f.size,openLightbox:J,attachmentFileName:f.fileName,attachmentUrl:f.attachmentUrl,onImageLoaded:Q,imageDimensions:N,lightboxIsOpen:D,handleLightboxOpen:K,handleLightboxClose:Z,classes:f.classes})}):q&&c.canPlay(_)?P("div",{className:I.cAttachment,children:P(c,{"data-testid":"".concat("Attachment","_player"),className:I.cAttachmentReactPlayer,url:_,config:{file:{attributes:{preload:"metadata"}}},controls:!0,height:f.size===R.label?R.value:U.value,width:null})}):P("div",{className:I.cAttachment,children:P(E,{attachmentUrl:_,attachmentFileName:f.fileName,attachmentSize:f.attachmentSize,displayName:f.displayName,openPreview:X,closePreview:Y,previewIsOpen:T,classes:f.classes,small:f.small})})}T.propTypes={attachmentUrl:n.string.isRequired,attachmentSize:n.number,displayName:n.string,fileName:n.string,size:n.oneOf([R.label,U.label]),classes:n.shape({}).isRequired,small:n.bool};var M=a((function(o){return{imageIconRoot:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},dialog:{width:"95%",height:"95%",maxWidth:"100%",position:"relative"},nativeDialog:{width:"100%",height:"100%",maxWidth:"100%",maxHeight:"100%",margin:0},dialogRoot:{backgroundColor:"rgba(0, 0, 0, 0.85)"},fileName:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",fontWeight:400},downloadIcon:{color:o.palette.primary.text3},disabledPreview:{backgroundColor:o.palette.primary.text9},unavailableFileIcon:{marginRight:12,minWidth:32},titleContainer:{display:"flex",flexDirection:"column",width:"100%"},caption:{fontSize:12,fontWeight:400,width:"fit-content"},unavailableFileName:{fontSize:12,fontWeight:400}}}))(T);export{M as default};
1
+ import o from"@babel/runtime/helpers/slicedToArray";import s from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/objectWithoutProperties";import{useState as i,useCallback as e}from"react";import n from"prop-types";import c from"react-player";import r from"classnames";import{withStyles as a}from"@material-ui/core/styles";import{Typography as m}from"@material-ui/core";import l from"@material-ui/icons/Image";import p from"@material-ui/icons/Fullscreen";import u from"@material-ui/core/colors/grey";import d from"../NewDocumentViewer/NewDocumentViewer.js";import{UnavailableFileIcon as h}from"../NewDocumentViewer/icons/UnavailableFileIcon.js";import{ImageViewer as j}from"../../componentsV2/ImageViewer/ImageViewer.js";import f from"./styles.css.js";import I from"../FileTypeIcon.js";import g from"../IconButton/index.js";import{isNativeDetected as v}from"../../utils/mobileDetect.js";import{getIsImage as b,getIsVideo as y}from"../../utils/fileExtension.js";import{getIsPreviewUnavailable as C}from"../../utils/filePreview.js";import{DownloadIcon as N}from"../../icons/iconParkIcons.js";import"../../icons/customIcons/icons/AddMessage.js";import"../../icons/customIcons/icons/DragOne.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/SearchOne.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/InfoRounded.js";import"../../icons/customIcons/icons/FlameFilled.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/PinOne.js";import"../../icons/customIcons/icons/PinOneCrossed.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"../../icons/customIcons/icons/CloudDelete.js";import"../../icons/customIcons/icons/Lasso.js";import"../../icons/customIcons/icons/Radius.js";import"../../icons/customIcons/icons/ErrorOps.js";import"../../icons/customIcons/icons/DataTypeOps.js";import"../../icons/customIcons/icons/FalsePositiveOps.js";import"../../icons/customIcons/icons/CalibrationOps.js";import"../../icons/customIcons/icons/CriticalOps.js";import"../../icons/customIcons/icons/Company.js";import"../../icons/customIcons/icons/ArchiveOne.js";import"../../icons/customIcons/icons/ParseBotFusion.js";import"../../icons/customIcons/icons/Connect.js";import"../../icons/customIcons/icons/PuzzleOne.js";import"../../icons/customIcons/icons/Feed.js";import"../../icons/customIcons/icons/Prompt.js";import"../../icons/customIcons/icons/Companies.js";import"../../icons/customIcons/icons/ClipboardAi.js";import"../../icons/customIcons/icons/Key.js";import"../../icons/customIcons/icons/AtSignCrossed.js";import"../../icons/customIcons/icons/MappingManual.js";import"../../icons/customIcons/icons/Mapping.js";import"../../icons/customIcons/icons/Metrics.js";import"../../icons/customIcons/icons/Drops.js";import"../../icons/customIcons/icons/ClipboardSearch.js";import"../../icons/customIcons/icons/Template.js";import"../../icons/customIcons/icons/ClipboardMetrics.js";import"../../icons/customIcons/icons/ClipboardBuilder.js";import"../../icons/customIcons/icons/UnitConversion.js";import"../../icons/customIcons/icons/NPT.js";import"../../icons/customIcons/icons/GuidedFrac.js";import"../../clients/subscriptions/constants.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"lodash";import"../../clients/subscriptions.v1.js";import"../../clients/jsonApi/index.js";import"../../clients/subscriptions/subscriptions-client.factory.js";import"query-string";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 w from"../../effects/useSignedURL.js";import"../UserMention/utils/index.js";import"../../utils/convert.js";import"moment";import"../../utils/casing/validation.js";import"lodash/mean";import"../../constants/streamSourceType.js";import"lodash/get";import"file-saver";import"../../utils/drillstring/conversion.js";import"lodash/set";import"lodash/cloneDeep";import"@babel/runtime/helpers/toConsumableArray";import"lodash/isNumber";import"lodash/has";import"../../utils/ga.js";import"../../utils/goalsConfig/goalsConfig.js";import"../../utils/lasParser.js";import P from"../../utils/main.js";import"../../utils/metrics/metricsConfig.js";import"../../utils/feed.js";import"../../utils/reports.js";import"moment-timezone";import"@babel/runtime/helpers/typeof";import"../../utils/dashboardReports.js";import"../../utils/env.js";import"../../utils/jsonaDataFormatter.js";import"../../utils/bha.js";import"jsona";import"../../utils/charts/Styles.scss.js";import"../../utils/getSingleAsset.js";import"uuid";import"../StatusBadge/constants.js";import"lodash/unset";import"../../clients/api/apiCore.js";import"../../clients/constants.js";import"../../clients/sso/auth0.js";import"../../clients/sso/oauth2.js";import"../../clients/api/rateLimiter.js";import"lodash/isEmpty";import"lodash/sortBy";import"../DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchContext.js";import"../../componentsV2/AppCommonsProvider/AppCommonsProvider.js";import"../../componentsV2/AppCommonsProvider/AppCommonsContext.js";import"../../componentsV2/AppPanel/AppPanelsContext.js";import{jsx as O,jsxs as F,Fragment as A}from"react/jsx-runtime";var x=["displayName","fileName","attachmentSize","size","small"];function D(o,s){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(o);s&&(i=i.filter((function(s){return Object.getOwnPropertyDescriptor(o,s).enumerable}))),t.push.apply(t,i)}return t}function S(o){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?D(Object(i),!0).forEach((function(t){s(o,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(i)):D(Object(i)).forEach((function(s){Object.defineProperty(o,s,Object.getOwnPropertyDescriptor(i,s))}))}return o}var z=u[200],W=u[400],R={label:"small",value:135},U={label:"medium",value:300},L={fileImage:function(o,s){return{maxWidth:"100%",borderRadius:4,overflow:"hidden",maxHeight:s===R.label?R.value:U.value,display:o?"initial":"none",cursor:"pointer"}},fileDownloadWrapper:{padding:"10px 10px 10px 5px",border:"1px solid #616161",borderRadius:3,maxWidth:500,width:"75%"},imagePlaceholder:{position:"relative",backgroundColor:z,borderRadius:3,marginTop:10,height:135,width:135}},k=function(o){var s,t,i=w(o.attachmentFileName)||o.attachmentUrl;return F(A,{children:[F("div",{onClick:o.openLightbox,className:f.cAttachmentImg,children:[O("img",{"data-testid":"".concat("Attachment","_image"),src:i,style:L.fileImage(!!o.imageDimensions,o.size),alt:"Attachment",onLoad:o.onImageLoaded}),O("div",{"data-testid":"".concat("Attachment","_button"),className:f.cAttachmentImgPreviwBtn,children:O(p,{})})]}),!o.imageDimensions&&O("div",{style:L.imagePlaceholder,children:O(l,{"data-testid":"".concat("Attachment","_placeholder"),className:o.classes.imageIconRoot,htmlColor:W,fontSize:"large"})}),o.lightboxIsOpen&&O(j,{src:i,onClose:o.handleLightboxClose,onOpen:o.handleLightboxOpen,width:null===(s=o.imageDimensions)||void 0===s?void 0:s.width,height:null===(t=o.imageDimensions)||void 0===t?void 0:t.height})]})},E=function(o){var s=P.getFileNameWithExtensionFromPath(o.displayName||o.attachmentUrl),t=w(o.attachmentFileName,"inline"),i=w(o.attachmentFileName,"attachment"),e=C(s);return F("div",{className:f.cAttachmentFileWrapper,children:[F("div",{className:r(f.cAttachmentFileDownloadWrapper,e&&o.classes.disabledPreview),style:L.fileDownloadWrapper,onClick:function(){e||o.openPreview()},children:[e?O(h,{className:o.classes.unavailableFileIcon}):O(I,{fileName:o.displayName||o.attachmentUrl,className:f.cAttachmentFileDownloadWrapperFileIcon,size:o.small?25:50}),F("div",{className:o.classes.titleContainer,children:[e&&O("div",{className:o.classes.caption,children:"Preview unavailable"}),O("div",{"data-testid":"".concat("Attachment","_name"),className:r(f.cAttachmentFileDownloadWrapperFileName,e&&o.classes.fileName),children:O(m,{variant:"subtitle2",noWrap:!0,className:o.classes.unavailableFileName,children:s})})]}),O(d,{fileUrl:t,classes:{root:o.classes.dialogRoot,paper:v?o.classes.nativeDialog:o.classes.dialog},fileName:s,fileSize:o.attachmentSize,onClose:o.closePreview,open:o.previewIsOpen})]}),O("a",{download:o.displayName,href:i,className:f.cAttachmentFileDownloadWrapperForm,children:O(g,{"data-testid":"".concat("Attachment","_downloadButton"),className:o.classes.downloadIcon,type:"submit",children:O(N,{size:24,className:o.classes.downloadIcon})})})]})};function M(s){var n=s.displayName,r=void 0===n?null:n,a=s.fileName,m=void 0===a?null:a,l=s.attachmentSize,p=void 0===l?void 0:l,u=s.size,d=void 0===u?U.label:u,h=s.small,j=void 0!==h&&h,I=S(S({},t(s,x)),{},{displayName:r,fileName:m,attachmentSize:p,size:d,small:j}),g=i(void 0),C=o(g,2),N=C[0],P=C[1],F=i(!1),A=o(F,2),D=A[0],z=A[1],W=i(!1),L=o(W,2),M=L[0],T=L[1],V=I.displayName||I.attachmentUrl||I.fileName,B=b(V),q=y(V),G=w(!I.attachmentUrl&&I.fileName),_=I.attachmentUrl||G,H=e((function(o){return o.preventDefault()}),[]),K=e((function(){v&&document.documentElement.addEventListener("touchmove",H,{passive:!1})}),[H]),Z=e((function(){v&&document.documentElement.removeEventListener("touchmove",H),z(!1)}),[H]),J=e((function(){return z(!0)}),[]),Q=e((function(o){var s=o.currentTarget,t=s.naturalWidth,i=s.naturalHeight;P({width:t,height:i})}),[]),X=e((function(){return T(!0)}),[]),Y=e((function(o){o.stopPropagation(),T(!1)}),[]);return B?O("div",{className:f.cAttachment,children:O(k,{size:I.size,openLightbox:J,attachmentFileName:I.fileName,attachmentUrl:I.attachmentUrl,onImageLoaded:Q,imageDimensions:N,lightboxIsOpen:D,handleLightboxOpen:K,handleLightboxClose:Z,classes:I.classes})}):q&&c.canPlay(_)?O("div",{className:f.cAttachment,children:O(c,{"data-testid":"".concat("Attachment","_player"),className:f.cAttachmentReactPlayer,url:_,config:{file:{attributes:{preload:"metadata"}}},controls:!0,height:I.size===R.label?R.value:U.value,width:null})}):O("div",{className:f.cAttachment,children:O(E,{attachmentUrl:_,attachmentFileName:I.fileName,attachmentSize:I.attachmentSize,displayName:I.displayName,openPreview:X,closePreview:Y,previewIsOpen:M,classes:I.classes,small:I.small})})}M.propTypes={attachmentUrl:n.string.isRequired,attachmentSize:n.number,displayName:n.string,fileName:n.string,size:n.oneOf([R.label,U.label]),classes:n.shape({}).isRequired,small:n.bool};var T=a((function(o){return{imageIconRoot:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},dialog:{width:"95%",height:"95%",maxWidth:"100%",position:"relative"},nativeDialog:{width:"100%",height:"100%",maxWidth:"100%",maxHeight:"100%",margin:0},dialogRoot:{backgroundColor:"rgba(0, 0, 0, 0.85)"},fileName:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",fontWeight:400},downloadIcon:{color:o.palette.primary.text3},disabledPreview:{backgroundColor:o.palette.primary.text9},unavailableFileIcon:{marginRight:12,minWidth:32},titleContainer:{display:"flex",flexDirection:"column",width:"100%"},caption:{fontSize:12,fontWeight:400,width:"fit-content"},unavailableFileName:{fontSize:12,fontWeight:400}}}))(M);export{T as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/Attachment/index.js"],"sourcesContent":["import { useCallback, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport ReactPlayer from 'react-player';\nimport classNames from 'classnames';\nimport { withStyles } from '@material-ui/core/styles';\nimport { Typography } from '@material-ui/core';\nimport ImageIcon from '@material-ui/icons/Image';\nimport FullSizeIcon from '@material-ui/icons/Fullscreen';\nimport grey from '@material-ui/core/colors/grey';\n\nimport { NewDocumentViewer } from '../NewDocumentViewer';\nimport { UnavailableFileIcon } from '../NewDocumentViewer/icons/UnavailableFileIcon';\nimport { ImageViewer } from '../../componentsV2/ImageViewer';\n\nimport styles from './styles.css';\n\nimport FileTypeIcon from '~components/FileTypeIcon';\nimport IconButton from '~components/IconButton';\nimport { isNativeDetected } from '~/utils/mobileDetect';\nimport { getIsImage, getIsVideo } from '~/utils/fileExtension';\nimport { getIsPreviewUnavailable } from '~/utils/filePreview';\nimport { DownloadIcon } from '~/icons';\nimport { useSignedURL } from '~/effects';\nimport utils from '~utils/main';\n\nconst PAGE_NAME = 'Attachment';\n\nconst grey200 = grey[200];\nconst grey400 = grey[400];\n\nconst SIZES = {\n small: { label: 'small', value: 135 },\n medium: { label: 'medium', value: 300 },\n};\n\nconst style = {\n fileImage: (imageIsLoaded, size) => ({\n maxWidth: '100%',\n borderRadius: 4,\n overflow: 'hidden',\n // NOTE: Makes one-line comment with image fits into comments container. Equals to\n // imagePlaceholder height\n maxHeight: size === SIZES.small.label ? SIZES.small.value : SIZES.medium.value,\n display: imageIsLoaded ? 'initial' : 'none',\n cursor: 'pointer',\n }),\n fileDownloadWrapper: {\n padding: '10px 10px 10px 5px',\n border: `1px solid #616161`,\n borderRadius: 3,\n maxWidth: 500, // NOTE: Corresponds to react-player max width\n width: '75%',\n },\n imagePlaceholder: {\n position: 'relative',\n backgroundColor: grey200,\n borderRadius: 3,\n marginTop: 10,\n height: 135,\n width: 135,\n },\n};\n\nconst muiStyles = theme => ({\n imageIconRoot: {\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n },\n dialog: {\n width: '95%',\n height: '95%',\n maxWidth: '100%',\n position: 'relative',\n },\n nativeDialog: {\n width: '100%',\n height: '100%',\n maxWidth: '100%',\n maxHeight: '100%',\n margin: 0,\n },\n dialogRoot: {\n // NOTE: Make background color similar to lightbox\n backgroundColor: 'rgba(0, 0, 0, 0.85)',\n },\n fileName: {\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n fontWeight: 400,\n },\n downloadIcon: {\n color: theme.palette.primary.text3,\n },\n disabledPreview: {\n backgroundColor: theme.palette.primary.text9,\n },\n unavailableFileIcon: {\n marginRight: 12,\n minWidth: 32,\n },\n titleContainer: {\n display: 'flex',\n flexDirection: 'column',\n width: '100%',\n },\n caption: {\n fontSize: 12,\n fontWeight: 400,\n width: 'fit-content',\n },\n unavailableFileName: {\n fontSize: 12,\n fontWeight: 400,\n },\n});\n\n/* eslint-disable react/prop-types */\nconst ImageAttachment = props => {\n const downloadLink = useSignedURL(props.attachmentFileName) || props.attachmentUrl;\n\n return (\n <>\n <div onClick={props.openLightbox} className={styles.cAttachmentImg}>\n <img\n data-testid={`${PAGE_NAME}_image`}\n src={downloadLink}\n style={style.fileImage(!!props.imageDimensions, props.size)}\n alt=\"Attachment\"\n onLoad={props.onImageLoaded}\n />\n <div data-testid={`${PAGE_NAME}_button`} className={styles.cAttachmentImgPreviwBtn}>\n <FullSizeIcon />\n </div>\n </div>\n\n {!props.imageDimensions && (\n <div style={style.imagePlaceholder}>\n <ImageIcon\n data-testid={`${PAGE_NAME}_placeholder`}\n className={props.classes.imageIconRoot}\n htmlColor={grey400}\n fontSize=\"large\"\n />\n </div>\n )}\n\n {props.lightboxIsOpen && (\n <ImageViewer\n src={downloadLink}\n onClose={props.handleLightboxClose}\n onOpen={props.handleLightboxOpen}\n width={props.imageDimensions?.width}\n height={props.imageDimensions?.height}\n />\n )}\n </>\n );\n};\n\nconst FileAttachment = props => {\n const fileName = utils.getFileNameWithExtensionFromPath(props.displayName || props.attachmentUrl);\n\n const previewUrl = useSignedURL(props.attachmentFileName, 'inline');\n const downloadUrl = useSignedURL(props.attachmentFileName, 'attachment');\n\n const isPreviewUnavailable = getIsPreviewUnavailable(fileName);\n\n const handleFilePreviewOpen = () => {\n if (isPreviewUnavailable) return;\n props.openPreview();\n };\n\n return (\n <div className={styles.cAttachmentFileWrapper}>\n <div\n className={classNames(\n styles.cAttachmentFileDownloadWrapper,\n isPreviewUnavailable && props.classes.disabledPreview\n )}\n style={style.fileDownloadWrapper}\n onClick={handleFilePreviewOpen}\n >\n {isPreviewUnavailable ? (\n <UnavailableFileIcon className={props.classes.unavailableFileIcon} />\n ) : (\n <FileTypeIcon\n fileName={props.displayName || props.attachmentUrl}\n className={styles.cAttachmentFileDownloadWrapperFileIcon}\n size={props.small ? 25 : 50}\n />\n )}\n <div className={props.classes.titleContainer}>\n {isPreviewUnavailable && <div className={props.classes.caption}>Preview unavailable</div>}\n <div\n data-testid={`${PAGE_NAME}_name`}\n className={classNames(\n styles.cAttachmentFileDownloadWrapperFileName,\n isPreviewUnavailable && props.classes.fileName\n )}\n >\n <Typography variant=\"subtitle2\" noWrap className={props.classes.unavailableFileName}>\n {fileName}\n </Typography>\n </div>\n </div>\n <NewDocumentViewer\n fileUrl={previewUrl}\n classes={{\n root: props.classes.dialogRoot,\n paper: isNativeDetected ? props.classes.nativeDialog : props.classes.dialog,\n }}\n fileName={fileName}\n fileSize={props.attachmentSize}\n onClose={props.closePreview}\n open={props.previewIsOpen}\n />\n </div>\n <a\n download={props.displayName}\n href={downloadUrl}\n className={styles.cAttachmentFileDownloadWrapperForm}\n >\n <IconButton\n data-testid={`${PAGE_NAME}_downloadButton`}\n className={props.classes.downloadIcon}\n type=\"submit\"\n >\n <DownloadIcon size={24} className={props.classes.downloadIcon} />\n </IconButton>\n </a>\n </div>\n );\n};\n\n/* eslint-enable react/prop-types */\n\nfunction Attachment(rawProps) {\n const {\n displayName = null,\n fileName: attachmentFileName = null,\n attachmentSize = undefined,\n size = SIZES.medium.label,\n small = false,\n ...otherProps\n } = rawProps;\n const props = {\n ...otherProps,\n displayName,\n fileName: attachmentFileName,\n attachmentSize,\n size,\n small,\n };\n\n const [imageDimensions, setImageDimensions] = useState(undefined);\n const [isLightboxOpen, setIsLightboxOpen] = useState(false);\n const [isPreviewOpen, setIsPreviewOpen] = useState(false);\n\n const fileName = props.displayName || props.attachmentUrl || props.fileName;\n const isImage = getIsImage(fileName);\n const isVideo = getIsVideo(fileName);\n\n // Don't fetch download link if attachmentUrl is provided\n const downloadLink = useSignedURL(!props.attachmentUrl && props.fileName);\n const attachmentUrl = props.attachmentUrl || downloadLink;\n const preventIOSScroll = useCallback(e => e.preventDefault(), []);\n\n // NOTE: iOS WebView has a bug when background content of React Modal is scrollable\n // Source: https://github.com/reactjs/react-modal/issues/369\n const handleLightboxOpen = useCallback(() => {\n if (isNativeDetected) {\n // document.documentElement.style.overflowY = 'hidden';\n document.documentElement.addEventListener('touchmove', preventIOSScroll, {\n passive: false,\n });\n }\n }, [preventIOSScroll]);\n\n const handleLightboxClose = useCallback(() => {\n if (isNativeDetected) {\n // document.documentElement.style.overflowY = 'visible';\n document.documentElement.removeEventListener('touchmove', preventIOSScroll);\n }\n setIsLightboxOpen(false);\n }, [preventIOSScroll]);\n\n const openLightbox = useCallback(() => setIsLightboxOpen(true), []);\n const onImageLoaded = useCallback(e => {\n const { naturalWidth, naturalHeight } = e.currentTarget;\n setImageDimensions({ width: naturalWidth, height: naturalHeight });\n }, []);\n const openPreview = useCallback(() => setIsPreviewOpen(true), []);\n const closePreview = useCallback(e => {\n e.stopPropagation();\n setIsPreviewOpen(false);\n }, []);\n\n if (isImage)\n return (\n <div className={styles.cAttachment}>\n <ImageAttachment\n size={props.size}\n openLightbox={openLightbox}\n attachmentFileName={props.fileName}\n attachmentUrl={props.attachmentUrl}\n onImageLoaded={onImageLoaded}\n imageDimensions={imageDimensions}\n lightboxIsOpen={isLightboxOpen}\n handleLightboxOpen={handleLightboxOpen}\n handleLightboxClose={handleLightboxClose}\n classes={props.classes}\n />\n </div>\n );\n\n if (isVideo && ReactPlayer.canPlay(attachmentUrl))\n return (\n <div className={styles.cAttachment}>\n <ReactPlayer\n data-testid={`${PAGE_NAME}_player`}\n className={styles.cAttachmentReactPlayer}\n url={attachmentUrl}\n config={{ file: { attributes: { preload: 'metadata' } } }}\n controls\n height={props.size === SIZES.small.label ? SIZES.small.value : SIZES.medium.value}\n width={null}\n />\n </div>\n );\n\n return (\n <div className={styles.cAttachment}>\n <FileAttachment\n attachmentUrl={attachmentUrl}\n attachmentFileName={props.fileName}\n attachmentSize={props.attachmentSize}\n displayName={props.displayName}\n openPreview={openPreview}\n closePreview={closePreview}\n previewIsOpen={isPreviewOpen}\n classes={props.classes}\n small={props.small}\n />\n </div>\n );\n}\n\nAttachment.propTypes = {\n attachmentUrl: PropTypes.string.isRequired,\n attachmentSize: PropTypes.number,\n displayName: PropTypes.string,\n fileName: PropTypes.string,\n size: PropTypes.oneOf([SIZES.small.label, SIZES.medium.label]),\n classes: PropTypes.shape({}).isRequired,\n small: PropTypes.bool,\n};\n\nexport default withStyles(muiStyles)(Attachment);\n"],"names":["grey200","grey","grey400","SIZES","label","value","style","fileImage","imageIsLoaded","size","maxWidth","borderRadius","overflow","maxHeight","display","cursor","fileDownloadWrapper","padding","border","width","imagePlaceholder","position","backgroundColor","marginTop","height","ImageAttachment","props","_props$imageDimension","_props$imageDimension2","downloadLink","useSignedURL","attachmentFileName","attachmentUrl","_jsxs","_Fragment","children","onClick","openLightbox","className","styles","cAttachmentImg","_jsx","concat","src","imageDimensions","alt","onLoad","onImageLoaded","cAttachmentImgPreviwBtn","FullSizeIcon","ImageIcon","classes","imageIconRoot","htmlColor","fontSize","lightboxIsOpen","ImageViewer","onClose","handleLightboxClose","onOpen","handleLightboxOpen","FileAttachment","fileName","utils","getFileNameWithExtensionFromPath","displayName","previewUrl","downloadUrl","isPreviewUnavailable","getIsPreviewUnavailable","cAttachmentFileWrapper","classNames","cAttachmentFileDownloadWrapper","disabledPreview","openPreview","UnavailableFileIcon","unavailableFileIcon","FileTypeIcon","cAttachmentFileDownloadWrapperFileIcon","small","titleContainer","caption","cAttachmentFileDownloadWrapperFileName","Typography","variant","noWrap","unavailableFileName","NewDocumentViewer","fileUrl","root","dialogRoot","paper","isNativeDetected","nativeDialog","dialog","fileSize","attachmentSize","closePreview","open","previewIsOpen","download","href","cAttachmentFileDownloadWrapperForm","IconButton","downloadIcon","type","DownloadIcon","Attachment","rawProps","_rawProps$displayName","_rawProps$fileName","_rawProps$attachmentS","undefined","_rawProps$size","_rawProps$small","_excluded","useState","_useState2","_slicedToArray","_useState","setImageDimensions","_useState4","_useState3","isLightboxOpen","setIsLightboxOpen","_useState6","_useState5","isPreviewOpen","setIsPreviewOpen","isImage","getIsImage","isVideo","getIsVideo","preventIOSScroll","useCallback","e","preventDefault","document","documentElement","addEventListener","passive","removeEventListener","currentTarget","naturalWidth","naturalHeight","stopPropagation","cAttachment","ReactPlayer","canPlay","cAttachmentReactPlayer","url","config","file","attributes","preload","controls","propTypes","PropTypes","string","isRequired","number","oneOf","shape","bool","Attachment$1","withStyles","theme","top","left","transform","margin","whiteSpace","textOverflow","fontWeight","color","palette","primary","text3","text9","marginRight","minWidth","flexDirection"],"mappings":"quOAyBA,IAEMA,EAAUC,EAAK,KACfC,EAAUD,EAAK,KAEfE,EACG,CAAEC,MAAO,QAASC,MAAO,KAD5BF,EAEI,CAAEC,MAAO,SAAUC,MAAO,KAG9BC,EAAQ,CACZC,UAAW,SAACC,EAAeC,GAAI,MAAM,CACnCC,SAAU,OACVC,aAAc,EACdC,SAAU,SAGVC,UAAWJ,IAASN,EAAYC,MAAQD,EAAYE,MAAQF,EAAaE,MACzES,QAASN,EAAgB,UAAY,OACrCO,OAAQ,UACR,EACFC,oBAAqB,CACnBC,QAAS,qBACTC,OAA2B,oBAC3BP,aAAc,EACdD,SAAU,IACVS,MAAO,OAETC,iBAAkB,CAChBC,SAAU,WACVC,gBAAiBtB,EACjBW,aAAc,EACdY,UAAW,GACXC,OAAQ,IACRL,MAAO,MA6DLM,EAAk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,MAAM,CAAA,GAAIH,WAC7BhF,MAAO8E,EAAUM,MAGnB,IAAAC,EAAeC,GAzSG,SAAAC,GAAK,MAAK,CAC1BlH,cAAe,CACb/B,SAAU,WACVkJ,IAAK,MACLC,KAAM,MACNC,UAAW,yBAEb3E,OAAQ,CACN3E,MAAO,MACPK,OAAQ,MACRd,SAAU,OACVW,SAAU,YAEZwE,aAAc,CACZ1E,MAAO,OACPK,OAAQ,OACRd,SAAU,OACVG,UAAW,OACX6J,OAAQ,GAEVhF,WAAY,CAEVpE,gBAAiB,uBAEnBwC,SAAU,CACRlD,SAAU,SACV+J,WAAY,SACZC,aAAc,WACdC,WAAY,KAEdrE,aAAc,CACZsE,MAAOR,EAAMS,QAAQC,QAAQC,OAE/BxG,gBAAiB,CACfnD,gBAAiBgJ,EAAMS,QAAQC,QAAQE,OAEzCtG,oBAAqB,CACnBuG,YAAa,GACbC,SAAU,IAEZpG,eAAgB,CACdlE,QAAS,OACTuK,cAAe,SACflK,MAAO,QAET8D,QAAS,CACP3B,SAAU,GACVuH,WAAY,IACZ1J,MAAO,eAETmE,oBAAqB,CACnBhC,SAAU,GACVuH,WAAY,KAEf,GAmPcR,CAAsB1D"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/Attachment/index.js"],"sourcesContent":["import { useCallback, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport ReactPlayer from 'react-player';\nimport classNames from 'classnames';\nimport { withStyles } from '@material-ui/core/styles';\nimport { Typography } from '@material-ui/core';\nimport ImageIcon from '@material-ui/icons/Image';\nimport FullSizeIcon from '@material-ui/icons/Fullscreen';\nimport grey from '@material-ui/core/colors/grey';\n\nimport { NewDocumentViewer } from '../NewDocumentViewer';\nimport { UnavailableFileIcon } from '../NewDocumentViewer/icons/UnavailableFileIcon';\nimport { ImageViewer } from '../../componentsV2/ImageViewer';\n\nimport styles from './styles.css';\n\nimport FileTypeIcon from '~components/FileTypeIcon';\nimport IconButton from '~components/IconButton';\nimport { isNativeDetected } from '~/utils/mobileDetect';\nimport { getIsImage, getIsVideo } from '~/utils/fileExtension';\nimport { getIsPreviewUnavailable } from '~/utils/filePreview';\nimport { DownloadIcon } from '~/icons';\nimport { useSignedURL } from '~/effects';\nimport utils from '~utils/main';\n\nconst PAGE_NAME = 'Attachment';\n\nconst grey200 = grey[200];\nconst grey400 = grey[400];\n\nconst SIZES = {\n small: { label: 'small', value: 135 },\n medium: { label: 'medium', value: 300 },\n};\n\nconst style = {\n fileImage: (imageIsLoaded, size) => ({\n maxWidth: '100%',\n borderRadius: 4,\n overflow: 'hidden',\n // NOTE: Makes one-line comment with image fits into comments container. Equals to\n // imagePlaceholder height\n maxHeight: size === SIZES.small.label ? SIZES.small.value : SIZES.medium.value,\n display: imageIsLoaded ? 'initial' : 'none',\n cursor: 'pointer',\n }),\n fileDownloadWrapper: {\n padding: '10px 10px 10px 5px',\n border: `1px solid #616161`,\n borderRadius: 3,\n maxWidth: 500, // NOTE: Corresponds to react-player max width\n width: '75%',\n },\n imagePlaceholder: {\n position: 'relative',\n backgroundColor: grey200,\n borderRadius: 3,\n marginTop: 10,\n height: 135,\n width: 135,\n },\n};\n\nconst muiStyles = theme => ({\n imageIconRoot: {\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n },\n dialog: {\n width: '95%',\n height: '95%',\n maxWidth: '100%',\n position: 'relative',\n },\n nativeDialog: {\n width: '100%',\n height: '100%',\n maxWidth: '100%',\n maxHeight: '100%',\n margin: 0,\n },\n dialogRoot: {\n // NOTE: Make background color similar to lightbox\n backgroundColor: 'rgba(0, 0, 0, 0.85)',\n },\n fileName: {\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n fontWeight: 400,\n },\n downloadIcon: {\n color: theme.palette.primary.text3,\n },\n disabledPreview: {\n backgroundColor: theme.palette.primary.text9,\n },\n unavailableFileIcon: {\n marginRight: 12,\n minWidth: 32,\n },\n titleContainer: {\n display: 'flex',\n flexDirection: 'column',\n width: '100%',\n },\n caption: {\n fontSize: 12,\n fontWeight: 400,\n width: 'fit-content',\n },\n unavailableFileName: {\n fontSize: 12,\n fontWeight: 400,\n },\n});\n\n/* eslint-disable react/prop-types */\nconst ImageAttachment = props => {\n const downloadLink = useSignedURL(props.attachmentFileName) || props.attachmentUrl;\n\n return (\n <>\n <div onClick={props.openLightbox} className={styles.cAttachmentImg}>\n <img\n data-testid={`${PAGE_NAME}_image`}\n src={downloadLink}\n style={style.fileImage(!!props.imageDimensions, props.size)}\n alt=\"Attachment\"\n onLoad={props.onImageLoaded}\n />\n <div data-testid={`${PAGE_NAME}_button`} className={styles.cAttachmentImgPreviwBtn}>\n <FullSizeIcon />\n </div>\n </div>\n\n {!props.imageDimensions && (\n <div style={style.imagePlaceholder}>\n <ImageIcon\n data-testid={`${PAGE_NAME}_placeholder`}\n className={props.classes.imageIconRoot}\n htmlColor={grey400}\n fontSize=\"large\"\n />\n </div>\n )}\n\n {props.lightboxIsOpen && (\n <ImageViewer\n src={downloadLink}\n onClose={props.handleLightboxClose}\n onOpen={props.handleLightboxOpen}\n width={props.imageDimensions?.width}\n height={props.imageDimensions?.height}\n />\n )}\n </>\n );\n};\n\nconst FileAttachment = props => {\n const fileName = utils.getFileNameWithExtensionFromPath(props.displayName || props.attachmentUrl);\n\n const previewUrl = useSignedURL(props.attachmentFileName, 'inline');\n const downloadUrl = useSignedURL(props.attachmentFileName, 'attachment');\n\n const isPreviewUnavailable = getIsPreviewUnavailable(fileName);\n\n const handleFilePreviewOpen = () => {\n if (isPreviewUnavailable) return;\n props.openPreview();\n };\n\n return (\n <div className={styles.cAttachmentFileWrapper}>\n <div\n className={classNames(\n styles.cAttachmentFileDownloadWrapper,\n isPreviewUnavailable && props.classes.disabledPreview\n )}\n style={style.fileDownloadWrapper}\n onClick={handleFilePreviewOpen}\n >\n {isPreviewUnavailable ? (\n <UnavailableFileIcon className={props.classes.unavailableFileIcon} />\n ) : (\n <FileTypeIcon\n fileName={props.displayName || props.attachmentUrl}\n className={styles.cAttachmentFileDownloadWrapperFileIcon}\n size={props.small ? 25 : 50}\n />\n )}\n <div className={props.classes.titleContainer}>\n {isPreviewUnavailable && <div className={props.classes.caption}>Preview unavailable</div>}\n <div\n data-testid={`${PAGE_NAME}_name`}\n className={classNames(\n styles.cAttachmentFileDownloadWrapperFileName,\n isPreviewUnavailable && props.classes.fileName\n )}\n >\n <Typography variant=\"subtitle2\" noWrap className={props.classes.unavailableFileName}>\n {fileName}\n </Typography>\n </div>\n </div>\n <NewDocumentViewer\n fileUrl={previewUrl}\n classes={{\n root: props.classes.dialogRoot,\n paper: isNativeDetected ? props.classes.nativeDialog : props.classes.dialog,\n }}\n fileName={fileName}\n fileSize={props.attachmentSize}\n onClose={props.closePreview}\n open={props.previewIsOpen}\n />\n </div>\n <a\n download={props.displayName}\n href={downloadUrl}\n className={styles.cAttachmentFileDownloadWrapperForm}\n >\n <IconButton\n data-testid={`${PAGE_NAME}_downloadButton`}\n className={props.classes.downloadIcon}\n type=\"submit\"\n >\n <DownloadIcon size={24} className={props.classes.downloadIcon} />\n </IconButton>\n </a>\n </div>\n );\n};\n\n/* eslint-enable react/prop-types */\n\nfunction Attachment(rawProps) {\n const {\n displayName = null,\n fileName: attachmentFileName = null,\n attachmentSize = undefined,\n size = SIZES.medium.label,\n small = false,\n ...otherProps\n } = rawProps;\n const props = {\n ...otherProps,\n displayName,\n fileName: attachmentFileName,\n attachmentSize,\n size,\n small,\n };\n\n const [imageDimensions, setImageDimensions] = useState(undefined);\n const [isLightboxOpen, setIsLightboxOpen] = useState(false);\n const [isPreviewOpen, setIsPreviewOpen] = useState(false);\n\n const fileName = props.displayName || props.attachmentUrl || props.fileName;\n const isImage = getIsImage(fileName);\n const isVideo = getIsVideo(fileName);\n\n // Don't fetch download link if attachmentUrl is provided\n const downloadLink = useSignedURL(!props.attachmentUrl && props.fileName);\n const attachmentUrl = props.attachmentUrl || downloadLink;\n const preventIOSScroll = useCallback(e => e.preventDefault(), []);\n\n // NOTE: iOS WebView has a bug when background content of React Modal is scrollable\n // Source: https://github.com/reactjs/react-modal/issues/369\n const handleLightboxOpen = useCallback(() => {\n if (isNativeDetected) {\n // document.documentElement.style.overflowY = 'hidden';\n document.documentElement.addEventListener('touchmove', preventIOSScroll, {\n passive: false,\n });\n }\n }, [preventIOSScroll]);\n\n const handleLightboxClose = useCallback(() => {\n if (isNativeDetected) {\n // document.documentElement.style.overflowY = 'visible';\n document.documentElement.removeEventListener('touchmove', preventIOSScroll);\n }\n setIsLightboxOpen(false);\n }, [preventIOSScroll]);\n\n const openLightbox = useCallback(() => setIsLightboxOpen(true), []);\n const onImageLoaded = useCallback(e => {\n const { naturalWidth, naturalHeight } = e.currentTarget;\n setImageDimensions({ width: naturalWidth, height: naturalHeight });\n }, []);\n const openPreview = useCallback(() => setIsPreviewOpen(true), []);\n const closePreview = useCallback(e => {\n e.stopPropagation();\n setIsPreviewOpen(false);\n }, []);\n\n if (isImage)\n return (\n <div className={styles.cAttachment}>\n <ImageAttachment\n size={props.size}\n openLightbox={openLightbox}\n attachmentFileName={props.fileName}\n attachmentUrl={props.attachmentUrl}\n onImageLoaded={onImageLoaded}\n imageDimensions={imageDimensions}\n lightboxIsOpen={isLightboxOpen}\n handleLightboxOpen={handleLightboxOpen}\n handleLightboxClose={handleLightboxClose}\n classes={props.classes}\n />\n </div>\n );\n\n if (isVideo && ReactPlayer.canPlay(attachmentUrl))\n return (\n <div className={styles.cAttachment}>\n <ReactPlayer\n data-testid={`${PAGE_NAME}_player`}\n className={styles.cAttachmentReactPlayer}\n url={attachmentUrl}\n config={{ file: { attributes: { preload: 'metadata' } } }}\n controls\n height={props.size === SIZES.small.label ? SIZES.small.value : SIZES.medium.value}\n width={null}\n />\n </div>\n );\n\n return (\n <div className={styles.cAttachment}>\n <FileAttachment\n attachmentUrl={attachmentUrl}\n attachmentFileName={props.fileName}\n attachmentSize={props.attachmentSize}\n displayName={props.displayName}\n openPreview={openPreview}\n closePreview={closePreview}\n previewIsOpen={isPreviewOpen}\n classes={props.classes}\n small={props.small}\n />\n </div>\n );\n}\n\nAttachment.propTypes = {\n attachmentUrl: PropTypes.string.isRequired,\n attachmentSize: PropTypes.number,\n displayName: PropTypes.string,\n fileName: PropTypes.string,\n size: PropTypes.oneOf([SIZES.small.label, SIZES.medium.label]),\n classes: PropTypes.shape({}).isRequired,\n small: PropTypes.bool,\n};\n\nexport default withStyles(muiStyles)(Attachment);\n"],"names":["grey200","grey","grey400","SIZES","label","value","style","fileImage","imageIsLoaded","size","maxWidth","borderRadius","overflow","maxHeight","display","cursor","fileDownloadWrapper","padding","border","width","imagePlaceholder","position","backgroundColor","marginTop","height","ImageAttachment","props","_props$imageDimension","_props$imageDimension2","downloadLink","useSignedURL","attachmentFileName","attachmentUrl","_jsxs","_Fragment","children","onClick","openLightbox","className","styles","cAttachmentImg","_jsx","concat","src","imageDimensions","alt","onLoad","onImageLoaded","cAttachmentImgPreviwBtn","FullSizeIcon","ImageIcon","classes","imageIconRoot","htmlColor","fontSize","lightboxIsOpen","ImageViewer","onClose","handleLightboxClose","onOpen","handleLightboxOpen","FileAttachment","fileName","utils","getFileNameWithExtensionFromPath","displayName","previewUrl","downloadUrl","isPreviewUnavailable","getIsPreviewUnavailable","cAttachmentFileWrapper","classNames","cAttachmentFileDownloadWrapper","disabledPreview","openPreview","UnavailableFileIcon","unavailableFileIcon","FileTypeIcon","cAttachmentFileDownloadWrapperFileIcon","small","titleContainer","caption","cAttachmentFileDownloadWrapperFileName","Typography","variant","noWrap","unavailableFileName","NewDocumentViewer","fileUrl","root","dialogRoot","paper","isNativeDetected","nativeDialog","dialog","fileSize","attachmentSize","closePreview","open","previewIsOpen","download","href","cAttachmentFileDownloadWrapperForm","IconButton","downloadIcon","type","DownloadIcon","Attachment","rawProps","_rawProps$displayName","_rawProps$fileName","_rawProps$attachmentS","undefined","_rawProps$size","_rawProps$small","_excluded","useState","_useState2","_slicedToArray","_useState","setImageDimensions","_useState4","_useState3","isLightboxOpen","setIsLightboxOpen","_useState6","_useState5","isPreviewOpen","setIsPreviewOpen","isImage","getIsImage","isVideo","getIsVideo","preventIOSScroll","useCallback","e","preventDefault","document","documentElement","addEventListener","passive","removeEventListener","currentTarget","naturalWidth","naturalHeight","stopPropagation","cAttachment","ReactPlayer","canPlay","cAttachmentReactPlayer","url","config","file","attributes","preload","controls","propTypes","PropTypes","string","isRequired","number","oneOf","shape","bool","Attachment$1","withStyles","theme","top","left","transform","margin","whiteSpace","textOverflow","fontWeight","color","palette","primary","text3","text9","marginRight","minWidth","flexDirection"],"mappings":"04PAyBA,IAEMA,EAAUC,EAAK,KACfC,EAAUD,EAAK,KAEfE,EACG,CAAEC,MAAO,QAASC,MAAO,KAD5BF,EAEI,CAAEC,MAAO,SAAUC,MAAO,KAG9BC,EAAQ,CACZC,UAAW,SAACC,EAAeC,GAAI,MAAM,CACnCC,SAAU,OACVC,aAAc,EACdC,SAAU,SAGVC,UAAWJ,IAASN,EAAYC,MAAQD,EAAYE,MAAQF,EAAaE,MACzES,QAASN,EAAgB,UAAY,OACrCO,OAAQ,UACR,EACFC,oBAAqB,CACnBC,QAAS,qBACTC,OAA2B,oBAC3BP,aAAc,EACdD,SAAU,IACVS,MAAO,OAETC,iBAAkB,CAChBC,SAAU,WACVC,gBAAiBtB,EACjBW,aAAc,EACdY,UAAW,GACXC,OAAQ,IACRL,MAAO,MA6DLM,EAAkB,SAAAC,GAAS,IAAAC,EAAAC,EACzBC,EAAeC,EAAaJ,EAAMK,qBAAuBL,EAAMM,cAErE,OACEC,EAAAC,EAAA,CAAAC,SACE,CAAAF,EAAA,MAAA,CAAKG,QAASV,EAAMW,aAAcC,UAAWC,EAAOC,eAAeL,SACjE,CAAAM,EAAA,MAAA,CACE,cAAA,GAAAC,OAtGQ,aAsG0B,UAClCC,IAAKd,EACLvB,MAAOA,EAAMC,YAAYmB,EAAMkB,gBAAiBlB,EAAMjB,MACtDoC,IAAI,aACJC,OAAQpB,EAAMqB,gBAEhBN,EAAA,MA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SACV+J,WAAY,SACZC,aAAc,WACdC,WAAY,KAEdrE,aAAc,CACZsE,MAAOR,EAAMS,QAAQC,QAAQC,OAE/BxG,gBAAiB,CACfnD,gBAAiBgJ,EAAMS,QAAQC,QAAQE,OAEzCtG,oBAAqB,CACnBuG,YAAa,GACbC,SAAU,IAEZpG,eAAgB,CACdlE,QAAS,OACTuK,cAAe,SACflK,MAAO,QAET8D,QAAS,CACP3B,SAAU,GACVuH,WAAY,IACZ1J,MAAO,eAETmE,oBAAqB,CACnBhC,SAAU,GACVuH,WAAY,KAEf,GAmPcR,CAAsB1D"}
@@ -1,2 +1,2 @@
1
- import e from"@babel/runtime/helpers/slicedToArray";import{memo as r,useRef as t,useState as o,useMemo as n,useEffect as i,createElement as u}from"react";import a from"prop-types";import{get as l}from"lodash";import c from"./Map.css.js";import{mapbox as s}from"../../../../utils/index.js";import{createAdaptiveRoot as d}from"../../../../utils/createAdaptiveRoot.js";import"../../../../config/mapboxGl/index.js";import{IS_MAPBOX_ENABLED as p}from"../../../../config/mapbox/index.js";import"mapbox-gl/dist/mapbox-gl.css";import{jsx as f}from"react/jsx-runtime";import m from"mapbox-gl";var v=[29.749907,-95.358421],y="wells-highlight",g={type:"FeatureCollection",features:[]},h=function(r){var t=e(r,2),o=t[0];return[t[1],o]};function w(r){var a=r.subjectWell,w=void 0===a?null:a,S=r.wells,j=r.offsetWells,C=void 0===j?null:j,M=r.radius,D=r.subjectWellMarkerSize,F=void 0===D?b:D,P=r.wellMarkerSize,L=void 0===P?x:P,W=r.coordsDataPath,k=void 0===W?"settings.top_hole.coordinates":W,z=t(null),B=t(null),I=t(null),R=t(null),T=t(null),q=t(null),N=t(),O=o(!1),A=e(O,2),E=A[0],G=A[1],H=n((function(){return w&&l(w,k)}),[w,k]);i((function(){if(p){B.current=new m.Map({container:z.current,style:"mapbox://styles/mapbox/dark-v9",center:h(v),zoom:1,attributionControl:!1,scrollZoom:!1}),B.current.addControl(new m.NavigationControl({showCompass:!1}),"bottom-right"),B.current.on("load",(function(){B.current.addSource("radius-circle",{type:"geojson",data:g}),B.current.addLayer({id:"radius-circle",type:"fill",source:"radius-circle",paint:{"fill-color":"#03BCD4","fill-opacity":.2}}),B.current.addSource("wells",{type:"geojson",data:g}),B.current.addLayer({id:"wells",type:"circle",source:"wells",paint:{"circle-radius":["get","radius"],"circle-color":"#FFC107","circle-opacity":["get","opacity"]}}),B.current.addSource(y,{type:"geojson",data:g}),B.current.addLayer({id:y,type:"circle",source:y,paint:{"circle-radius":["get","radius"],"circle-color":"#FFC107","circle-opacity":.2}}),G(!0)}));var e=B.current;return function(){var r;null===(r=T.current)||void 0===r||r.unmount(),T.current=null,q.current=null,e.remove(),B.current=null,I.current=null}}}),[]),i((function(){if(B.current&&E)if(H){var r=function(r,t){for(var o=e(r,2),n=o[0],i=o[1],u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:64,a=[],l=t/(111320*Math.cos(n*Math.PI/180)),c=t/110574,s=0;s<=u;s+=1){var d=s/u*(2*Math.PI);a.push([i+l*Math.cos(d),n+c*Math.sin(d)])}return a}(H,1609.34*M);B.current.getSource("radius-circle").setData({type:"Feature",geometry:{type:"Polygon",coordinates:[r]}})}else B.current.getSource("radius-circle").setData(g)}),[M,H,E]);return i((function(){var e;if(B.current&&E){var r=N.current;N.current=S,null===(e=R.current)||void 0===e||e.remove(),B.current.getSource(y).setData(g);var t=C.map((function(e){return e.id})),o=[],n={},i=new m.LngLatBounds;S.forEach((function(e){var r=l(e,k);if(r&&s.isValidCoordinates(r)){var u=w&&w.id===e.id,a=t.includes(e.id),c=u?F:L,d=u||a?1:.3;n[e.id]=e,i.extend(h(r)),o.push({type:"Feature",geometry:{type:"Point",coordinates:h(r)},properties:{wellId:e.id,radius:c,opacity:d}})}})),B.current.getSource("wells").setData({type:"FeatureCollection",features:o}),I.current=o.length?i:null;var a=B.current,c=null,p=function(e){a.getCanvas().style.cursor="pointer";var r=n[e.features[0].properties.wellId];if(r&&r.id!==c){c=r.id;var t=l(r,k);q.current||(q.current=document.createElement("div"),T.current=d(q.current)),T.current.render(u((function(e){var r=e.well;return f("div",{style:{color:"#fff",background:"##414141"},children:f("span",{style:{fontSize:"11px",lineHeight:"16px"},children:l(r,"name")})})}),{well:r})),R.current||(R.current=new m.Popup({closeButton:!1,maxWidth:"none"})),R.current.setLngLat(h(t)).setDOMContent(q.current).addTo(a),function(e,r){B.current.getSource(y).setData({type:"Feature",geometry:{type:"Point",coordinates:h(e)},properties:{radius:3*r}})}(t,e.features[0].properties.radius)}},v=function(){var e;c=null,a.getCanvas().style.cursor="",a.getSource(y).setData(g),null===(e=R.current)||void 0===e||e.remove()},b=function(e){null!=e&&e.point&&a.queryRenderedFeatures(e.point,{layers:[y]}).length||v()};return a.on("mousemove","wells",p),a.on("mouseleave","wells",b),a.on("mouseleave",y,v),setTimeout((function(){B.current&&I.current&&S!==r&&B.current.fitBounds(I.current)}),500),function(){a.off("mousemove","wells",p),a.off("mouseleave","wells",b),a.off("mouseleave",y,v)}}}),[w,S,C,E]),f("div",{className:c.map,children:f("div",{className:c.mapMain,ref:z})})}w.propTypes={subjectWell:a.shape({id:a.number,formation:a.string}),wells:a.arrayOf(a.shape({})).isRequired,offsetWells:a.arrayOf(a.shape({})),radius:a.number.isRequired,subjectWellMarkerSize:a.number,wellMarkerSize:a.number,coordsDataPath:a.string};var b=8,x=5,S=r(w);export{S as default};
1
+ import e from"@babel/runtime/helpers/slicedToArray";import{memo as r,useRef as t,useState as o,useMemo as i,useEffect as n,createElement as s}from"react";import a from"prop-types";import{get as l}from"lodash";import u from"./Map.css.js";import"../../../UserMention/utils/index.js";import"@babel/runtime/helpers/defineProperty";import"../../../../utils/convert.js";import"../../../../constants/completion.js";import"moment";import"../../../../constants/alerts.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"../../../../utils/casing/validation.js";import"lodash/mean";import"../../../../constants/streamSourceType.js";import"lodash/get";import"file-saver";import"query-string";import"../../../../constants/goals.js";import"../../../../constants/segment.js";import"../../../../constants/apps.js";import"../../../../constants/drillstring.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"../../../../utils/drillstring/conversion.js";import"lodash/set";import"lodash/cloneDeep";import"@babel/runtime/helpers/toConsumableArray";import"lodash/isNumber";import"lodash/has";import"../../../../utils/ga.js";import"../../../../utils/goalsConfig/goalsConfig.js";import"../../../../utils/lasParser.js";import"../../../../utils/main.js";import{isValidCoordinates as c}from"../../../../utils/mapbox.js";import"../../../../utils/metrics/metricsConfig.js";import"../../../../utils/mobileDetect.js";import"../../../../utils/feed.js";import"../../../../utils/reports.js";import"moment-timezone";import"@babel/runtime/helpers/typeof";import"../../../../utils/dashboardReports.js";import"../../../../utils/env.js";import"file-extension";import"image-extensions";import"video-extensions";import"../../../../utils/jsonaDataFormatter.js";import"../../../../utils/bha.js";import"jsona";import"../../../../clients/jsonApi/index.js";import"@babel/runtime/helpers/objectWithoutProperties";import"classnames";import"../../../../utils/charts/Styles.scss.js";import"../../../../utils/getSingleAsset.js";import{createAdaptiveRoot as p}from"../../../../utils/createAdaptiveRoot.js";import"../../../../config/mapboxGl/index.js";import{IS_MAPBOX_ENABLED as m}from"../../../../config/mapbox/index.js";import"mapbox-gl/dist/mapbox-gl.css";import{jsx as d}from"react/jsx-runtime";import f from"mapbox-gl";var g=[29.749907,-95.358421],v="wells-highlight",j={type:"FeatureCollection",features:[]},y=function(r){var t=e(r,2),o=t[0];return[t[1],o]};function h(r){var a=r.subjectWell,h=void 0===a?null:a,x=r.wells,C=r.offsetWells,S=void 0===C?null:C,M=r.radius,D=r.subjectWellMarkerSize,P=void 0===D?b:D,F=r.wellMarkerSize,W=void 0===F?w:F,k=r.coordsDataPath,z=void 0===k?"settings.top_hole.coordinates":k,L=t(null),T=t(null),A=t(null),I=t(null),R=t(null),q=t(null),B=t(),N=o(!1),G=e(N,2),O=G[0],E=G[1],H=i((function(){return h&&l(h,z)}),[h,z]);n((function(){if(m){T.current=new f.Map({container:L.current,style:"mapbox://styles/mapbox/dark-v9",center:y(g),zoom:1,attributionControl:!1,scrollZoom:!1}),T.current.addControl(new f.NavigationControl({showCompass:!1}),"bottom-right"),T.current.on("load",(function(){T.current.addSource("radius-circle",{type:"geojson",data:j}),T.current.addLayer({id:"radius-circle",type:"fill",source:"radius-circle",paint:{"fill-color":"#03BCD4","fill-opacity":.2}}),T.current.addSource("wells",{type:"geojson",data:j}),T.current.addLayer({id:"wells",type:"circle",source:"wells",paint:{"circle-radius":["get","radius"],"circle-color":"#FFC107","circle-opacity":["get","opacity"]}}),T.current.addSource(v,{type:"geojson",data:j}),T.current.addLayer({id:v,type:"circle",source:v,paint:{"circle-radius":["get","radius"],"circle-color":"#FFC107","circle-opacity":.2}}),E(!0)}));var e=T.current;return function(){var r;null===(r=R.current)||void 0===r||r.unmount(),R.current=null,q.current=null,e.remove(),T.current=null,A.current=null}}}),[]),n((function(){if(T.current&&O)if(H){var r=function(r,t){for(var o=e(r,2),i=o[0],n=o[1],s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:64,a=[],l=t/(111320*Math.cos(i*Math.PI/180)),u=t/110574,c=0;c<=s;c+=1){var p=c/s*(2*Math.PI);a.push([n+l*Math.cos(p),i+u*Math.sin(p)])}return a}(H,1609.34*M);T.current.getSource("radius-circle").setData({type:"Feature",geometry:{type:"Polygon",coordinates:[r]}})}else T.current.getSource("radius-circle").setData(j)}),[M,H,O]);return n((function(){var e;if(T.current&&O){var r=B.current;B.current=x,null===(e=I.current)||void 0===e||e.remove(),T.current.getSource(v).setData(j);var t=S.map((function(e){return e.id})),o=[],i={},n=new f.LngLatBounds;x.forEach((function(e){var r=l(e,z);if(r&&c(r)){var s=h&&h.id===e.id,a=t.includes(e.id),u=s?P:W,p=s||a?1:.3;i[e.id]=e,n.extend(y(r)),o.push({type:"Feature",geometry:{type:"Point",coordinates:y(r)},properties:{wellId:e.id,radius:u,opacity:p}})}})),T.current.getSource("wells").setData({type:"FeatureCollection",features:o}),A.current=o.length?n:null;var a=T.current,u=null,m=function(e){a.getCanvas().style.cursor="pointer";var r=i[e.features[0].properties.wellId];if(r&&r.id!==u){u=r.id;var t=l(r,z);q.current||(q.current=document.createElement("div"),R.current=p(q.current)),R.current.render(s((function(e){var r=e.well;return d("div",{style:{color:"#fff",background:"##414141"},children:d("span",{style:{fontSize:"11px",lineHeight:"16px"},children:l(r,"name")})})}),{well:r})),I.current||(I.current=new f.Popup({closeButton:!1,maxWidth:"none"})),I.current.setLngLat(y(t)).setDOMContent(q.current).addTo(a),function(e,r){T.current.getSource(v).setData({type:"Feature",geometry:{type:"Point",coordinates:y(e)},properties:{radius:3*r}})}(t,e.features[0].properties.radius)}},g=function(){var e;u=null,a.getCanvas().style.cursor="",a.getSource(v).setData(j),null===(e=I.current)||void 0===e||e.remove()},b=function(e){null!=e&&e.point&&a.queryRenderedFeatures(e.point,{layers:[v]}).length||g()};return a.on("mousemove","wells",m),a.on("mouseleave","wells",b),a.on("mouseleave",v,g),setTimeout((function(){T.current&&A.current&&x!==r&&T.current.fitBounds(A.current)}),500),function(){a.off("mousemove","wells",m),a.off("mouseleave","wells",b),a.off("mouseleave",v,g)}}}),[h,x,S,O]),d("div",{className:u.map,children:d("div",{className:u.mapMain,ref:L})})}h.propTypes={subjectWell:a.shape({id:a.number,formation:a.string}),wells:a.arrayOf(a.shape({})).isRequired,offsetWells:a.arrayOf(a.shape({})),radius:a.number.isRequired,subjectWellMarkerSize:a.number,wellMarkerSize:a.number,coordsDataPath:a.string};var b=8,w=5,x=r(h);export{x as default};
2
2
  //# sourceMappingURL=Map.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Map.js","sources":["../../../../../src/components/BICOffsetPickerDialog/components/Map/Map.js"],"sourcesContent":["import { createElement, memo, useRef, useEffect, useMemo, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { get } from 'lodash';\n\nimport styles from './Map.css';\n\nimport { mapbox } from '~/utils';\nimport { createAdaptiveRoot } from '~/utils/createAdaptiveRoot';\nimport mapboxgl from '~/config/mapboxGl';\nimport { IS_MAPBOX_ENABLED } from '~/config/mapbox';\nimport 'mapbox-gl/dist/mapbox-gl.css';\n\nconst RADIUS_CIRCLE_COLOR = '#03BCD4';\nconst METERS_IN_MILE = 1609.34;\nconst DEFAULT_SUBJECT_WELL_MARKER_SIZE = 8;\nconst DEFAULT_WELL_MARKER_SIZE = 5;\nconst OFFSET_WELL_COLOR = '#FFC107';\n\nconst DEFAULT_COORDS = [29.749907, -95.358421]; // TX coordinates\n\nconst RADIUS_CIRCLE_ID = 'radius-circle';\nconst WELLS_ID = 'wells';\nconst HIGHLIGHT_ID = 'wells-highlight';\nconst EMPTY_FEATURE_COLLECTION = { type: 'FeatureCollection', features: [] };\n\nconst toLngLat = ([lat, lng]) => [lng, lat];\n\n// NOTE: mapbox-gl has no geographic-radius circle primitive, so approximate it with a polygon\nconst makeCirclePolygon = ([lat, lng], radiusMeters, points = 64) => {\n const ring = [];\n const distanceX = radiusMeters / (111320 * Math.cos((lat * Math.PI) / 180));\n const distanceY = radiusMeters / 110574;\n for (let i = 0; i <= points; i += 1) {\n const theta = (i / points) * (2 * Math.PI);\n ring.push([lng + distanceX * Math.cos(theta), lat + distanceY * Math.sin(theta)]);\n }\n return ring;\n};\n\nconst toolTip =\n () =>\n // eslint-disable-next-line react/prop-types\n ({ well }) => {\n return (\n <div style={{ color: '#fff', background: '##414141' }}>\n <span style={{ fontSize: '11px', lineHeight: '16px' }}>{get(well, 'name')}</span>\n </div>\n );\n };\n\n// eslint-disable-next-line no-unused-vars\nfunction WellsMap({\n subjectWell = null,\n wells,\n offsetWells = null,\n radius,\n subjectWellMarkerSize = DEFAULT_WELLS_MAP_SUBJECT_WELL_MARKER_SIZE,\n wellMarkerSize = DEFAULT_WELLS_MAP_WELL_MARKER_SIZE,\n coordsDataPath = 'settings.top_hole.coordinates',\n}) {\n const mapContainerRef = useRef(null);\n const mapRef = useRef(null);\n const markersBoundsRef = useRef(null);\n const popupRef = useRef(null);\n const tooltipRootRef = useRef(null);\n const tooltipContainerRef = useRef(null);\n const prevWellsRef = useRef();\n const [isMapReady, setIsMapReady] = useState(false);\n\n const subjectWellCoords = useMemo(() => {\n return subjectWell && get(subjectWell, coordsDataPath);\n }, [subjectWell, coordsDataPath]);\n\n // NOTE: Initialize map\n useEffect(() => {\n if (!IS_MAPBOX_ENABLED) return undefined;\n\n mapRef.current = new mapboxgl.Map({\n container: mapContainerRef.current,\n style: 'mapbox://styles/mapbox/dark-v9',\n center: toLngLat(DEFAULT_COORDS),\n zoom: 1,\n attributionControl: false,\n scrollZoom: false,\n });\n\n mapRef.current.addControl(\n new mapboxgl.NavigationControl({ showCompass: false }),\n 'bottom-right'\n );\n\n // NOTE: Sources/layers can only be added once the style has loaded.\n // The radius circle layer is added first so well markers render above it (was bringToBack),\n // and the hover highlight layer last so it renders on top of the markers\n mapRef.current.on('load', () => {\n mapRef.current.addSource(RADIUS_CIRCLE_ID, {\n type: 'geojson',\n data: EMPTY_FEATURE_COLLECTION,\n });\n mapRef.current.addLayer({\n id: RADIUS_CIRCLE_ID,\n type: 'fill',\n source: RADIUS_CIRCLE_ID,\n paint: {\n 'fill-color': RADIUS_CIRCLE_COLOR,\n 'fill-opacity': 0.2,\n },\n });\n\n mapRef.current.addSource(WELLS_ID, { type: 'geojson', data: EMPTY_FEATURE_COLLECTION });\n mapRef.current.addLayer({\n id: WELLS_ID,\n type: 'circle',\n source: WELLS_ID,\n paint: {\n 'circle-radius': ['get', 'radius'],\n 'circle-color': OFFSET_WELL_COLOR,\n 'circle-opacity': ['get', 'opacity'],\n },\n });\n\n mapRef.current.addSource(HIGHLIGHT_ID, { type: 'geojson', data: EMPTY_FEATURE_COLLECTION });\n mapRef.current.addLayer({\n id: HIGHLIGHT_ID,\n type: 'circle',\n source: HIGHLIGHT_ID,\n paint: {\n 'circle-radius': ['get', 'radius'],\n 'circle-color': OFFSET_WELL_COLOR,\n 'circle-opacity': 0.2,\n },\n });\n\n setIsMapReady(true);\n });\n\n const map = mapRef.current;\n return () => {\n tooltipRootRef.current?.unmount();\n tooltipRootRef.current = null;\n tooltipContainerRef.current = null;\n\n map.remove();\n mapRef.current = null;\n markersBoundsRef.current = null;\n };\n }, []);\n\n // NOTE: Radius circle\n useEffect(() => {\n if (!mapRef.current || !isMapReady) {\n return;\n }\n\n if (!subjectWellCoords) {\n mapRef.current.getSource(RADIUS_CIRCLE_ID).setData(EMPTY_FEATURE_COLLECTION);\n return;\n }\n\n const ring = makeCirclePolygon(subjectWellCoords, radius * METERS_IN_MILE);\n mapRef.current.getSource(RADIUS_CIRCLE_ID).setData({\n type: 'Feature',\n geometry: { type: 'Polygon', coordinates: [ring] },\n });\n }, [radius, subjectWellCoords, isMapReady]);\n\n const handleMouseOver = (coords, r) => {\n // Highlight the hovered well with a bigger translucent circle\n mapRef.current.getSource(HIGHLIGHT_ID).setData({\n type: 'Feature',\n geometry: { type: 'Point', coordinates: toLngLat(coords) },\n properties: { radius: r * 3 },\n });\n };\n\n // NOTE: Well markers\n useEffect(() => {\n if (!mapRef.current || !isMapReady) {\n return undefined;\n }\n\n const prevWells = prevWellsRef.current;\n prevWellsRef.current = wells;\n\n popupRef.current?.remove();\n mapRef.current.getSource(HIGHLIGHT_ID).setData(EMPTY_FEATURE_COLLECTION);\n\n const offsetWellIds = offsetWells.map(well => well.id);\n\n const features = [];\n const wellsById = {};\n const bounds = new mapboxgl.LngLatBounds();\n wells.forEach(well => {\n const coords = get(well, coordsDataPath);\n\n if (coords && mapbox.isValidCoordinates(coords)) {\n const isWellSubject = subjectWell && subjectWell.id === well.id;\n const isWellOffset = offsetWellIds.includes(well.id);\n const r = isWellSubject ? subjectWellMarkerSize : wellMarkerSize;\n const opacity = isWellSubject || isWellOffset ? 1 : 0.3;\n\n wellsById[well.id] = well;\n bounds.extend(toLngLat(coords));\n features.push({\n type: 'Feature',\n geometry: { type: 'Point', coordinates: toLngLat(coords) },\n properties: { wellId: well.id, radius: r, opacity },\n });\n }\n });\n\n mapRef.current.getSource(WELLS_ID).setData({ type: 'FeatureCollection', features });\n markersBoundsRef.current = features.length ? bounds : null;\n\n const map = mapRef.current;\n let hoveredWellId = null;\n\n const handleMouseMove = e => {\n map.getCanvas().style.cursor = 'pointer';\n\n const well = wellsById[e.features[0].properties.wellId];\n if (!well || well.id === hoveredWellId) {\n return;\n }\n hoveredWellId = well.id;\n\n const coords = get(well, coordsDataPath);\n\n // Tooltip\n if (!tooltipContainerRef.current) {\n tooltipContainerRef.current = document.createElement('div');\n tooltipRootRef.current = createAdaptiveRoot(tooltipContainerRef.current);\n }\n tooltipRootRef.current.render(createElement(toolTip(), { well }));\n\n if (!popupRef.current) {\n popupRef.current = new mapboxgl.Popup({ closeButton: false, maxWidth: 'none' });\n }\n popupRef.current\n .setLngLat(toLngLat(coords))\n .setDOMContent(tooltipContainerRef.current)\n .addTo(map);\n\n // Highlight\n handleMouseOver(coords, e.features[0].properties.radius);\n };\n\n // NOTE: was the mouseout handler of the Leaflet highlight marker\n const handleHighlightMouseLeave = () => {\n hoveredWellId = null;\n map.getCanvas().style.cursor = '';\n map.getSource(HIGHLIGHT_ID).setData(EMPTY_FEATURE_COLLECTION);\n popupRef.current?.remove();\n };\n\n // NOTE: If the pointer exits before the highlight renders under it, the highlight\n // layer never emits mouseleave — clear here unless the cursor is inside the highlight\n const handleWellsMouseLeave = e => {\n if (e?.point && map.queryRenderedFeatures(e.point, { layers: [HIGHLIGHT_ID] }).length) {\n return;\n }\n handleHighlightMouseLeave();\n };\n\n map.on('mousemove', WELLS_ID, handleMouseMove);\n map.on('mouseleave', WELLS_ID, handleWellsMouseLeave);\n map.on('mouseleave', HIGHLIGHT_ID, handleHighlightMouseLeave);\n\n setTimeout(() => {\n if (mapRef.current && markersBoundsRef.current && wells !== prevWells) {\n mapRef.current.fitBounds(markersBoundsRef.current);\n }\n }, 500);\n\n return () => {\n map.off('mousemove', WELLS_ID, handleMouseMove);\n map.off('mouseleave', WELLS_ID, handleWellsMouseLeave);\n map.off('mouseleave', HIGHLIGHT_ID, handleHighlightMouseLeave);\n };\n }, [subjectWell, wells, offsetWells, isMapReady]);\n\n return (\n <div className={styles.map}>\n <div className={styles.mapMain} ref={mapContainerRef} />\n </div>\n );\n}\n\nWellsMap.propTypes = {\n subjectWell: PropTypes.shape({\n id: PropTypes.number,\n formation: PropTypes.string,\n }),\n wells: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n offsetWells: PropTypes.arrayOf(PropTypes.shape({})),\n radius: PropTypes.number.isRequired,\n subjectWellMarkerSize: PropTypes.number,\n wellMarkerSize: PropTypes.number,\n coordsDataPath: PropTypes.string,\n};\n\nconst DEFAULT_WELLS_MAP_SUBJECT_WELL_MARKER_SIZE = DEFAULT_SUBJECT_WELL_MARKER_SIZE;\nconst DEFAULT_WELLS_MAP_WELL_MARKER_SIZE = DEFAULT_WELL_MARKER_SIZE;\n\nexport default memo(WellsMap);\n"],"names":["DEFAULT_COORDS","HIGHLIGHT_ID","EMPTY_FEATURE_COLLECTION","type","features","toLngLat","_ref","_ref2","_slicedToArray","lat","WellsMap","_ref6","_ref6$subjectWell","subjectWell","wells","_ref6$offsetWells","offsetWells","radius","_ref6$subjectWellMark","subjectWellMarkerSize","DEFAULT_WELLS_MAP_SUBJECT_WELL_MARKER_SIZE","_ref6$wellMarkerSize","wellMarkerSize","DEFAULT_WELLS_MAP_WELL_MARKER_SIZE","_ref6$coordsDataPath","coordsDataPath","mapContainerRef","useRef","mapRef","markersBoundsRef","popupRef","tooltipRootRef","tooltipContainerRef","prevWellsRef","useState","_useState2","_useState","isMapReady","setIsMapReady","subjectWellCoords","useMemo","get","useEffect","IS_MAPBOX_ENABLED","current","mapboxgl","Map","container","style","center","zoom","attributionControl","scrollZoom","addControl","NavigationControl","showCompass","on","addSource","data","addLayer","id","source","paint","map","_tooltipRootRef$curre","unmount","remove","ring","_ref3","radiusMeters","_ref4","lng","points","distanceX","Math","cos","PI","distanceY","i","theta","push","sin","makeCirclePolygon","getSource","setData","geometry","coordinates","_popupRef$current","prevWells","offsetWellIds","well","wellsById","bounds","LngLatBounds","forEach","coords","mapbox","isValidCoordinates","isWellSubject","isWellOffset","includes","r","opacity","extend","properties","wellId","length","hoveredWellId","handleMouseMove","e","getCanvas","cursor","document","createElement","createAdaptiveRoot","render","_ref5","_jsx","color","background","children","fontSize","lineHeight","Popup","closeButton","maxWidth","setLngLat","setDOMContent","addTo","handleMouseOver","handleHighlightMouseLeave","_popupRef$current2","handleWellsMouseLeave","point","queryRenderedFeatures","layers","setTimeout","fitBounds","off","className","styles","mapMain","ref","propTypes","PropTypes","shape","number","formation","string","arrayOf","isRequired","memo"],"mappings":"wkBAYA,IAMMA,EAAiB,CAAC,WAAY,WAI9BC,EAAe,kBACfC,EAA2B,CAAEC,KAAM,oBAAqBC,SAAU,IAElEC,EAAW,SAAHC,GAAA,IAAAC,EAAAC,EAAAF,EAAA,GAAKG,EAAGF,EAAA,GAAK,MAAM,CAANA,EAAA,GAAYE,EAAI,EA0B3C,SAASC,EAQNC,GAAA,IAAAC,EAAAD,EAPDE,YAAAA,aAAc,KAAID,EAClBE,IAAAA,MAAKC,EAAAJ,EACLK,YAAAA,aAAc,KAAID,EAClBE,IAAAA,OAAMC,EAAAP,EACNQ,sBAAAA,aAAwBC,EAA0CF,EAAAG,EAAAV,EAClEW,eAAAA,aAAiBC,EAAkCF,EAAAG,EAAAb,EACnDc,eAAAA,aAAiB,gCAA+BD,EAE1CE,EAAkBC,EAAO,MACzBC,EAASD,EAAO,MAChBE,EAAmBF,EAAO,MAC1BG,EAAWH,EAAO,MAClBI,EAAiBJ,EAAO,MACxBK,EAAsBL,EAAO,MAC7BM,EAAeN,IACeO,EAAAA,GAAS,GAAMC,EAAA3B,EAAA4B,EAAA,GAA5CC,EAAUF,EAAA,GAAEG,EAAaH,EAAA,GAE1BI,EAAoBC,GAAQ,WAChC,OAAO3B,GAAe4B,EA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MAAM,CAC3BrF,GAAIoF,EAAUE,OACdC,UAAWH,EAAUI,SAEvBtI,MAAOkI,EAAUK,QAAQL,EAAUC,MAAM,CAAA,IAAKK,WAC9CtI,YAAagI,EAAUK,QAAQL,EAAUC,MAAM,CAAE,IACjDhI,OAAQ+H,EAAUE,OAAOI,WACzBnI,sBAAuB6H,EAAUE,OACjC5H,eAAgB0H,EAAUE,OAC1BzH,eAAgBuH,EAAUI,QAG5B,IAAMhI,EA/RmC,EAgSnCG,EA/R2B,EAiSlBgI,EAAAA,EAAK7I"}
1
+ {"version":3,"file":"Map.js","sources":["../../../../../src/components/BICOffsetPickerDialog/components/Map/Map.js"],"sourcesContent":["import { createElement, memo, useRef, useEffect, useMemo, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { get } from 'lodash';\n\nimport styles from './Map.css';\n\nimport { mapbox } from '~/utils';\nimport { createAdaptiveRoot } from '~/utils/createAdaptiveRoot';\nimport mapboxgl from '~/config/mapboxGl';\nimport { IS_MAPBOX_ENABLED } from '~/config/mapbox';\nimport 'mapbox-gl/dist/mapbox-gl.css';\n\nconst RADIUS_CIRCLE_COLOR = '#03BCD4';\nconst METERS_IN_MILE = 1609.34;\nconst DEFAULT_SUBJECT_WELL_MARKER_SIZE = 8;\nconst DEFAULT_WELL_MARKER_SIZE = 5;\nconst OFFSET_WELL_COLOR = '#FFC107';\n\nconst DEFAULT_COORDS = [29.749907, -95.358421]; // TX coordinates\n\nconst RADIUS_CIRCLE_ID = 'radius-circle';\nconst WELLS_ID = 'wells';\nconst HIGHLIGHT_ID = 'wells-highlight';\nconst EMPTY_FEATURE_COLLECTION = { type: 'FeatureCollection', features: [] };\n\nconst toLngLat = ([lat, lng]) => [lng, lat];\n\n// NOTE: mapbox-gl has no geographic-radius circle primitive, so approximate it with a polygon\nconst makeCirclePolygon = ([lat, lng], radiusMeters, points = 64) => {\n const ring = [];\n const distanceX = radiusMeters / (111320 * Math.cos((lat * Math.PI) / 180));\n const distanceY = radiusMeters / 110574;\n for (let i = 0; i <= points; i += 1) {\n const theta = (i / points) * (2 * Math.PI);\n ring.push([lng + distanceX * Math.cos(theta), lat + distanceY * Math.sin(theta)]);\n }\n return ring;\n};\n\nconst toolTip =\n () =>\n // eslint-disable-next-line react/prop-types\n ({ well }) => {\n return (\n <div style={{ color: '#fff', background: '##414141' }}>\n <span style={{ fontSize: '11px', lineHeight: '16px' }}>{get(well, 'name')}</span>\n </div>\n );\n };\n\n// eslint-disable-next-line no-unused-vars\nfunction WellsMap({\n subjectWell = null,\n wells,\n offsetWells = null,\n radius,\n subjectWellMarkerSize = DEFAULT_WELLS_MAP_SUBJECT_WELL_MARKER_SIZE,\n wellMarkerSize = DEFAULT_WELLS_MAP_WELL_MARKER_SIZE,\n coordsDataPath = 'settings.top_hole.coordinates',\n}) {\n const mapContainerRef = useRef(null);\n const mapRef = useRef(null);\n const markersBoundsRef = useRef(null);\n const popupRef = useRef(null);\n const tooltipRootRef = useRef(null);\n const tooltipContainerRef = useRef(null);\n const prevWellsRef = useRef();\n const [isMapReady, setIsMapReady] = useState(false);\n\n const subjectWellCoords = useMemo(() => {\n return subjectWell && get(subjectWell, coordsDataPath);\n }, [subjectWell, coordsDataPath]);\n\n // NOTE: Initialize map\n useEffect(() => {\n if (!IS_MAPBOX_ENABLED) return undefined;\n\n mapRef.current = new mapboxgl.Map({\n container: mapContainerRef.current,\n style: 'mapbox://styles/mapbox/dark-v9',\n center: toLngLat(DEFAULT_COORDS),\n zoom: 1,\n attributionControl: false,\n scrollZoom: false,\n });\n\n mapRef.current.addControl(\n new mapboxgl.NavigationControl({ showCompass: false }),\n 'bottom-right'\n );\n\n // NOTE: Sources/layers can only be added once the style has loaded.\n // The radius circle layer is added first so well markers render above it (was bringToBack),\n // and the hover highlight layer last so it renders on top of the markers\n mapRef.current.on('load', () => {\n mapRef.current.addSource(RADIUS_CIRCLE_ID, {\n type: 'geojson',\n data: EMPTY_FEATURE_COLLECTION,\n });\n mapRef.current.addLayer({\n id: RADIUS_CIRCLE_ID,\n type: 'fill',\n source: RADIUS_CIRCLE_ID,\n paint: {\n 'fill-color': RADIUS_CIRCLE_COLOR,\n 'fill-opacity': 0.2,\n },\n });\n\n mapRef.current.addSource(WELLS_ID, { type: 'geojson', data: EMPTY_FEATURE_COLLECTION });\n mapRef.current.addLayer({\n id: WELLS_ID,\n type: 'circle',\n source: WELLS_ID,\n paint: {\n 'circle-radius': ['get', 'radius'],\n 'circle-color': OFFSET_WELL_COLOR,\n 'circle-opacity': ['get', 'opacity'],\n },\n });\n\n mapRef.current.addSource(HIGHLIGHT_ID, { type: 'geojson', data: EMPTY_FEATURE_COLLECTION });\n mapRef.current.addLayer({\n id: HIGHLIGHT_ID,\n type: 'circle',\n source: HIGHLIGHT_ID,\n paint: {\n 'circle-radius': ['get', 'radius'],\n 'circle-color': OFFSET_WELL_COLOR,\n 'circle-opacity': 0.2,\n },\n });\n\n setIsMapReady(true);\n });\n\n const map = mapRef.current;\n return () => {\n tooltipRootRef.current?.unmount();\n tooltipRootRef.current = null;\n tooltipContainerRef.current = null;\n\n map.remove();\n mapRef.current = null;\n markersBoundsRef.current = null;\n };\n }, []);\n\n // NOTE: Radius circle\n useEffect(() => {\n if (!mapRef.current || !isMapReady) {\n return;\n }\n\n if (!subjectWellCoords) {\n mapRef.current.getSource(RADIUS_CIRCLE_ID).setData(EMPTY_FEATURE_COLLECTION);\n return;\n }\n\n const ring = makeCirclePolygon(subjectWellCoords, radius * METERS_IN_MILE);\n mapRef.current.getSource(RADIUS_CIRCLE_ID).setData({\n type: 'Feature',\n geometry: { type: 'Polygon', coordinates: [ring] },\n });\n }, [radius, subjectWellCoords, isMapReady]);\n\n const handleMouseOver = (coords, r) => {\n // Highlight the hovered well with a bigger translucent circle\n mapRef.current.getSource(HIGHLIGHT_ID).setData({\n type: 'Feature',\n geometry: { type: 'Point', coordinates: toLngLat(coords) },\n properties: { radius: r * 3 },\n });\n };\n\n // NOTE: Well markers\n useEffect(() => {\n if (!mapRef.current || !isMapReady) {\n return undefined;\n }\n\n const prevWells = prevWellsRef.current;\n prevWellsRef.current = wells;\n\n popupRef.current?.remove();\n mapRef.current.getSource(HIGHLIGHT_ID).setData(EMPTY_FEATURE_COLLECTION);\n\n const offsetWellIds = offsetWells.map(well => well.id);\n\n const features = [];\n const wellsById = {};\n const bounds = new mapboxgl.LngLatBounds();\n wells.forEach(well => {\n const coords = get(well, coordsDataPath);\n\n if (coords && mapbox.isValidCoordinates(coords)) {\n const isWellSubject = subjectWell && subjectWell.id === well.id;\n const isWellOffset = offsetWellIds.includes(well.id);\n const r = isWellSubject ? subjectWellMarkerSize : wellMarkerSize;\n const opacity = isWellSubject || isWellOffset ? 1 : 0.3;\n\n wellsById[well.id] = well;\n bounds.extend(toLngLat(coords));\n features.push({\n type: 'Feature',\n geometry: { type: 'Point', coordinates: toLngLat(coords) },\n properties: { wellId: well.id, radius: r, opacity },\n });\n }\n });\n\n mapRef.current.getSource(WELLS_ID).setData({ type: 'FeatureCollection', features });\n markersBoundsRef.current = features.length ? bounds : null;\n\n const map = mapRef.current;\n let hoveredWellId = null;\n\n const handleMouseMove = e => {\n map.getCanvas().style.cursor = 'pointer';\n\n const well = wellsById[e.features[0].properties.wellId];\n if (!well || well.id === hoveredWellId) {\n return;\n }\n hoveredWellId = well.id;\n\n const coords = get(well, coordsDataPath);\n\n // Tooltip\n if (!tooltipContainerRef.current) {\n tooltipContainerRef.current = document.createElement('div');\n tooltipRootRef.current = createAdaptiveRoot(tooltipContainerRef.current);\n }\n tooltipRootRef.current.render(createElement(toolTip(), { well }));\n\n if (!popupRef.current) {\n popupRef.current = new mapboxgl.Popup({ closeButton: false, maxWidth: 'none' });\n }\n popupRef.current\n .setLngLat(toLngLat(coords))\n .setDOMContent(tooltipContainerRef.current)\n .addTo(map);\n\n // Highlight\n handleMouseOver(coords, e.features[0].properties.radius);\n };\n\n // NOTE: was the mouseout handler of the Leaflet highlight marker\n const handleHighlightMouseLeave = () => {\n hoveredWellId = null;\n map.getCanvas().style.cursor = '';\n map.getSource(HIGHLIGHT_ID).setData(EMPTY_FEATURE_COLLECTION);\n popupRef.current?.remove();\n };\n\n // NOTE: If the pointer exits before the highlight renders under it, the highlight\n // layer never emits mouseleave — clear here unless the cursor is inside the highlight\n const handleWellsMouseLeave = e => {\n if (e?.point && map.queryRenderedFeatures(e.point, { layers: [HIGHLIGHT_ID] }).length) {\n return;\n }\n handleHighlightMouseLeave();\n };\n\n map.on('mousemove', WELLS_ID, handleMouseMove);\n map.on('mouseleave', WELLS_ID, handleWellsMouseLeave);\n map.on('mouseleave', HIGHLIGHT_ID, handleHighlightMouseLeave);\n\n setTimeout(() => {\n if (mapRef.current && markersBoundsRef.current && wells !== prevWells) {\n mapRef.current.fitBounds(markersBoundsRef.current);\n }\n }, 500);\n\n return () => {\n map.off('mousemove', WELLS_ID, handleMouseMove);\n map.off('mouseleave', WELLS_ID, handleWellsMouseLeave);\n map.off('mouseleave', HIGHLIGHT_ID, handleHighlightMouseLeave);\n };\n }, [subjectWell, wells, offsetWells, isMapReady]);\n\n return (\n <div className={styles.map}>\n <div className={styles.mapMain} ref={mapContainerRef} />\n </div>\n );\n}\n\nWellsMap.propTypes = {\n subjectWell: PropTypes.shape({\n id: PropTypes.number,\n formation: PropTypes.string,\n }),\n wells: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n offsetWells: PropTypes.arrayOf(PropTypes.shape({})),\n radius: PropTypes.number.isRequired,\n subjectWellMarkerSize: PropTypes.number,\n wellMarkerSize: PropTypes.number,\n coordsDataPath: PropTypes.string,\n};\n\nconst DEFAULT_WELLS_MAP_SUBJECT_WELL_MARKER_SIZE = DEFAULT_SUBJECT_WELL_MARKER_SIZE;\nconst DEFAULT_WELLS_MAP_WELL_MARKER_SIZE = DEFAULT_WELL_MARKER_SIZE;\n\nexport default memo(WellsMap);\n"],"names":["DEFAULT_COORDS","HIGHLIGHT_ID","EMPTY_FEATURE_COLLECTION","type","features","toLngLat","_ref","_ref2","_slicedToArray","lat","WellsMap","_ref6","_ref6$subjectWell","subjectWell","wells","_ref6$offsetWells","offsetWells","radius","_ref6$subjectWellMark","subjectWellMarkerSize","DEFAULT_WELLS_MAP_SUBJECT_WELL_MARKER_SIZE","_ref6$wellMarkerSize","wellMarkerSize","DEFAULT_WELLS_MAP_WELL_MARKER_SIZE","_ref6$coordsDataPath","coordsDataPath","mapContainerRef","useRef","mapRef","markersBoundsRef","popupRef","tooltipRootRef","tooltipContainerRef","prevWellsRef","useState","_useState2","_useState","isMapReady","setIsMapReady","subjectWellCoords","useMemo","get","useEffect","IS_MAPBOX_ENABLED","current","mapboxgl","Map","container","style","center","zoom","attributionControl","scrollZoom","addControl","NavigationControl","showCompass","on","addSource","data","addLayer","id","source","paint","map","_tooltipRootRef$curre","unmount","remove","ring","_ref3","radiusMeters","_ref4","lng","points","distanceX","Math","cos","PI","distanceY","i","theta","push","sin","makeCirclePolygon","getSource","setData","geometry","coordinates","_popupRef$current","prevWells","offsetWellIds","well","wellsById","bounds","LngLatBounds","forEach","coords","mapbox","isWellSubject","isWellOffset","includes","r","opacity","extend","properties","wellId","length","hoveredWellId","handleMouseMove","e","getCanvas","cursor","document","createElement","createAdaptiveRoot","render","_ref5","_jsx","color","background","children","fontSize","lineHeight","Popup","closeButton","maxWidth","setLngLat","setDOMContent","addTo","handleMouseOver","handleHighlightMouseLeave","_popupRef$current2","handleWellsMouseLeave","point","queryRenderedFeatures","layers","setTimeout","fitBounds","off","className","styles","mapMain","ref","propTypes","PropTypes","shape","number","formation","string","arrayOf","isRequired","memo"],"mappings":"s/EAYA,IAMMA,EAAiB,CAAC,WAAY,WAI9BC,EAAe,kBACfC,EAA2B,CAAEC,KAAM,oBAAqBC,SAAU,IAElEC,EAAW,SAAHC,GAAA,IAAAC,EAAAC,EAAAF,EAAA,GAAKG,EAAGF,EAAA,GAAK,MAAM,CAANA,EAAA,GAAYE,EAAI,EA0B3C,SAASC,EAQNC,GAAA,IAAAC,EAAAD,EAPDE,YAAAA,aAAc,K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pE,EAAIP,GAAG,aAAcvD,EAAcgI,GAEnCM,YAAW,WACL3G,EAAOgB,SAAWf,EAAiBe,SAAW9B,IAAU0E,GAC1D5D,EAAOgB,QAAQ4F,UAAU3G,EAAiBe,QAE7C,GAAE,KAEI,WACLmB,EAAI0E,IAAI,YA9PG,QA8PoB9B,GAC/B5C,EAAI0E,IAAI,aA/PG,QA+PqBN,GAChCpE,EAAI0E,IAAI,aAAcxI,EAAcgI,GAlGtC,CAoGD,GAAE,CAACpH,EAAaC,EAAOE,EAAaqB,IAGnC+E,EAAA,MAAA,CAAKsB,UAAWC,EAAO5E,IAAIwD,SACzBH,EAAA,MAAA,CAAKsB,UAAWC,EAAOC,QAASC,IAAKnH,KAG3C,CAEAhB,EAASoI,UAAY,CACnBjI,YAAakI,EAAUC,MAAM,CAC3BpF,GAAImF,EAAUE,OACdC,UAAWH,EAAUI,SAEvBrI,MAAOiI,EAAUK,QAAQL,EAAUC,MAAM,CAAA,IAAKK,WAC9CrI,YAAa+H,EAAUK,QAAQL,EAAUC,MAAM,CAAE,IACjD/H,OAAQ8H,EAAUE,OAAOI,WACzBlI,sBAAuB4H,EAAUE,OACjC3H,eAAgByH,EAAUE,OAC1BxH,eAAgBsH,EAAUI,QAG5B,IAAM/H,EA/RmC,EAgSnCG,EA/R2B,EAiSlB+H,EAAAA,EAAK5I"}
@@ -1,2 +1,2 @@
1
- import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/defineProperty";import{memo as n}from"react";import{string as r,arrayOf as o,shape as i,func as a}from"prop-types";import c from"classnames";import{makeStyles as l,Typography as s,Accordion as d,AccordionSummary as m,AccordionDetails as p,List as u}from"@material-ui/core";import{ExpandMore as f}from"@material-ui/icons";import h from"./AssetSearch.js";import w from"./SectionItem.js";import y from"./WellListItem.js";import"../../../../utils/index.js";import{jsxs as x,jsx as b}from"react/jsx-runtime";import{showSuccessNotification as g}from"../../../../utils/notificationToasts.js";function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function j(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?v(Object(r),!0).forEach((function(n){t(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var S=l((function(e){return{content:{width:"472px",marginTop:"24px"},sectionItem:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",padding:"8px",fontSize:"12px",fontWeight:"normal",color:e.palette.primary.text6,borderTop:"1px solid ".concat(e.palette.primary.text8),"&:last-child":{borderBottom:"1px solid ".concat(e.palette.primary.text8)}},disabledSectionItem:{color:e.palette.primary.text8},wellList:{width:"100%",margin:0,padding:0},searchContainer:{display:"flex",justifyContent:"space-between",marginBottom:"24px",alignItems:"center"},advancedSearch:{fontSize:"14px",fontWeight:500,color:"#03BCD4",cursor:"pointer","&:hover":{textDecoration:"underline"}}}}));function O(t){var n=t.company,r=t.wellSections,o=void 0===r?C:r,i=t.getWellName,a=t.onChangeWellSections,l=t.onExploreMode,v=S(),O=function(e,t){var n=o.find((function(t){return t.name===e.name})).wells.map((function(e){return e.id})),r=o.map((function(e){var r=e.wells.map((function(e){return n.includes(e.id)?j(j({},e),{},{checked:t}):j({},e)}));return j(j({},e),{},{wells:r})}));a(r)},N=function(e){var t=o.map((function(t){return t.name===e.name?j(j({},t),{},{expanded:!t.expanded}):t}));a(t)},I=function(e){var t=o.map((function(t){var n=t.wells.map((function(t){return t.id===e.id?j(j({},t),{},{checked:!t.checked}):t}));return j(j({},t),{},{wells:n})}));a(t)},k=function(e){O(e,!0)},P=function(e){O(e,!1)};return x("div",{className:v.content,children:[x("div",{className:v.searchContainer,children:[b(h,{company:+n,onClickAsset:function(t,n){var r=o.map((function(r){if("Search Results"===r.name){var o=e(r.wells);return r.wells.find((function(e){return e.id===t}))||o.push({id:t,checked:!0,name:n,kind:"manual"}),j(j({},r),{},{wells:o})}return j(j({},r),{},{wells:r.wells.map((function(e){return e.id===t?j(j({},e),{},{checked:!0}):e}))})}));a(r),g("Offset well successfully added!")},onExploreMode:l}),b(s,{"data-testid":"".concat("WellSection","_advancedSearch"),className:v.advancedSearch,onClick:function(){l()},children:"Advanced Search"})]}),(o||[]).map((function(e){return 0===e.wells.length?b("div",{className:c(v.sectionItem,v.disabledSectionItem),children:b(w,{section:e,disabled:!0})},"empty-".concat(e.name)):b("div",{className:v.sectionItem,children:x(d,{expanded:e.expanded,onChange:function(){return N(e)},children:[b(m,{expandIcon:b(f,{}),style:{width:"100%"},children:b(w,{section:e,onExpandCollapse:N,onSelectAll:k,onClearAll:P})}),b(p,{children:b(u,{dense:!0,className:v.wellList,children:e.wells.map((function(t){return b(y,{well:t,wellName:i(e.wells,t.id),rigName:t.rigName,onToggleWell:I},"well-".concat(e.name,"-").concat(t.id))}))})})]})},"section-".concat(e.name))}))]})}O.propTypes={company:r.isRequired,wellSections:o(i({})),getWellName:a.isRequired,onChangeWellSections:a.isRequired,onExploreMode:a.isRequired};var C=[],N=n(O);export{N as default};
1
+ import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/defineProperty";import{memo as r}from"react";import{string as n,arrayOf as o,shape as i,func as s}from"prop-types";import a from"classnames";import{makeStyles as l,Typography as c,Accordion as m,AccordionSummary as p,AccordionDetails as d,List as u}from"@material-ui/core";import{ExpandMore as f}from"@material-ui/icons";import h from"./AssetSearch.js";import j from"./SectionItem.js";import g from"./WellListItem.js";import"../../../UserMention/utils/index.js";import"../../../../utils/convert.js";import"../../../../constants/completion.js";import"moment";import"../../../../constants/alerts.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"../../../../utils/casing/validation.js";import"@babel/runtime/helpers/slicedToArray";import"lodash/mean";import"lodash";import"../../../../constants/streamSourceType.js";import"lodash/get";import"file-saver";import"query-string";import"../../../../constants/goals.js";import"../../../../constants/segment.js";import"../../../../constants/apps.js";import"../../../../constants/drillstring.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"../../../../utils/drillstring/conversion.js";import"lodash/set";import"lodash/cloneDeep";import"lodash/isNumber";import"lodash/has";import"../../../../utils/ga.js";import"../../../../utils/goalsConfig/goalsConfig.js";import"../../../../utils/lasParser.js";import"../../../../utils/main.js";import"../../../../utils/metrics/metricsConfig.js";import"../../../../utils/mobileDetect.js";import"../../../../utils/feed.js";import"../../../../utils/reports.js";import"moment-timezone";import{showSuccessNotification as b}from"../../../../utils/notificationToasts.js";import"@babel/runtime/helpers/typeof";import"../../../../utils/dashboardReports.js";import"../../../../utils/env.js";import"file-extension";import"image-extensions";import"video-extensions";import"../../../../utils/jsonaDataFormatter.js";import"../../../../utils/bha.js";import"jsona";import"../../../../clients/jsonApi/index.js";import"@babel/runtime/helpers/objectWithoutProperties";import"../../../../utils/charts/Styles.scss.js";import"../../../../utils/getSingleAsset.js";import{jsxs as y,jsx as w}from"react/jsx-runtime";function x(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function v(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?x(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var S=l((function(e){return{content:{width:"472px",marginTop:"24px"},sectionItem:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",padding:"8px",fontSize:"12px",fontWeight:"normal",color:e.palette.primary.text6,borderTop:"1px solid ".concat(e.palette.primary.text8),"&:last-child":{borderBottom:"1px solid ".concat(e.palette.primary.text8)}},disabledSectionItem:{color:e.palette.primary.text8},wellList:{width:"100%",margin:0,padding:0},searchContainer:{display:"flex",justifyContent:"space-between",marginBottom:"24px",alignItems:"center"},advancedSearch:{fontSize:"14px",fontWeight:500,color:"#03BCD4",cursor:"pointer","&:hover":{textDecoration:"underline"}}}}));function O(t){var r=t.company,n=t.wellSections,o=void 0===n?C:n,i=t.getWellName,s=t.onChangeWellSections,l=t.onExploreMode,x=S(),O=function(e,t){var r=o.find((function(t){return t.name===e.name})).wells.map((function(e){return e.id})),n=o.map((function(e){var n=e.wells.map((function(e){return r.includes(e.id)?v(v({},e),{},{checked:t}):v({},e)}));return v(v({},e),{},{wells:n})}));s(n)},N=function(e){var t=o.map((function(t){return t.name===e.name?v(v({},t),{},{expanded:!t.expanded}):t}));s(t)},P=function(e){var t=o.map((function(t){var r=t.wells.map((function(t){return t.id===e.id?v(v({},t),{},{checked:!t.checked}):t}));return v(v({},t),{},{wells:r})}));s(t)},I=function(e){O(e,!0)},k=function(e){O(e,!1)};return y("div",{className:x.content,children:[y("div",{className:x.searchContainer,children:[w(h,{company:+r,onClickAsset:function(t,r){var n=o.map((function(n){if("Search Results"===n.name){var o=e(n.wells);return n.wells.find((function(e){return e.id===t}))||o.push({id:t,checked:!0,name:r,kind:"manual"}),v(v({},n),{},{wells:o})}return v(v({},n),{},{wells:n.wells.map((function(e){return e.id===t?v(v({},e),{},{checked:!0}):e}))})}));s(n),b("Offset well successfully added!")},onExploreMode:l}),w(c,{"data-testid":"".concat("WellSection","_advancedSearch"),className:x.advancedSearch,onClick:function(){l()},children:"Advanced Search"})]}),(o||[]).map((function(e){return 0===e.wells.length?w("div",{className:a(x.sectionItem,x.disabledSectionItem),children:w(j,{section:e,disabled:!0})},"empty-".concat(e.name)):w("div",{className:x.sectionItem,children:y(m,{expanded:e.expanded,onChange:function(){return N(e)},children:[w(p,{expandIcon:w(f,{}),style:{width:"100%"},children:w(j,{section:e,onExpandCollapse:N,onSelectAll:I,onClearAll:k})}),w(d,{children:w(u,{dense:!0,className:x.wellList,children:e.wells.map((function(t){return w(g,{well:t,wellName:i(e.wells,t.id),rigName:t.rigName,onToggleWell:P},"well-".concat(e.name,"-").concat(t.id))}))})})]})},"section-".concat(e.name))}))]})}O.propTypes={company:n.isRequired,wellSections:o(i({})),getWellName:s.isRequired,onChangeWellSections:s.isRequired,onExploreMode:s.isRequired};var C=[],N=r(O);export{N as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../src/components/BICOffsetPickerDialog/components/WellSection/index.js"],"sourcesContent":["import { memo } from 'react';\nimport { string, shape, func, arrayOf } from 'prop-types';\nimport classNames from 'classnames';\nimport {\n makeStyles,\n List,\n Accordion,\n AccordionSummary,\n AccordionDetails,\n Typography,\n} from '@material-ui/core';\nimport { ExpandMore } from '@material-ui/icons';\n\nimport AssetSearch from './AssetSearch';\nimport SectionItem from './SectionItem';\nimport WellListItem from './WellListItem';\n\nimport { showSuccessNotification } from '~/utils';\n\nconst PAGE_NAME = 'WellSection';\n\nconst useStyles = makeStyles(theme => ({\n content: {\n width: '472px',\n marginTop: '24px',\n },\n sectionItem: {\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n padding: '8px',\n fontSize: '12px',\n fontWeight: 'normal',\n color: theme.palette.primary.text6,\n borderTop: `1px solid ${theme.palette.primary.text8}`,\n '&:last-child': {\n borderBottom: `1px solid ${theme.palette.primary.text8}`,\n },\n },\n disabledSectionItem: {\n color: theme.palette.primary.text8,\n },\n wellList: {\n width: '100%',\n margin: 0,\n padding: 0,\n },\n searchContainer: {\n display: 'flex',\n justifyContent: 'space-between',\n marginBottom: '24px',\n alignItems: 'center',\n },\n advancedSearch: {\n fontSize: '14px',\n fontWeight: 500,\n color: '#03BCD4',\n cursor: 'pointer',\n '&:hover': {\n textDecoration: 'underline',\n },\n },\n}));\n\nfunction WellSection({\n company,\n wellSections = DEFAULT_WELL_SECTION_WELL_SECTIONS,\n getWellName,\n onChangeWellSections,\n onExploreMode,\n}) {\n const classes = useStyles();\n\n const selectAllWells = (targetSection, f) => {\n const selectedWellIds = wellSections\n .find(section => section.name === targetSection.name)\n .wells.map(item => item.id);\n\n const data = wellSections.map(section => {\n const sectionData = section.wells.map(well => {\n if (selectedWellIds.includes(well.id)) {\n return { ...well, checked: f };\n } else {\n return { ...well };\n }\n });\n return {\n ...section,\n wells: sectionData,\n };\n });\n onChangeWellSections(data);\n };\n\n const handleExpandCollapseSection = targetSection => {\n const data = wellSections.map(section => {\n if (section.name === targetSection.name) {\n return { ...section, expanded: !section.expanded };\n }\n return section;\n });\n onChangeWellSections(data);\n };\n\n const handleToggleWell = targetWell => {\n const data = wellSections.map(section => {\n const sectionData = section.wells.map(well => {\n if (well.id === targetWell.id) {\n return { ...well, checked: !well.checked };\n }\n return well;\n });\n return {\n ...section,\n wells: sectionData,\n };\n });\n onChangeWellSections(data);\n };\n\n const handleSelectAll = targetSection => {\n selectAllWells(targetSection, true);\n };\n\n const handleClearAll = targetSection => {\n selectAllWells(targetSection, false);\n };\n\n const handleClickAsset = (redirectAssetId, name) => {\n const data = wellSections.map(section => {\n if (section.name === 'Search Results') {\n const wells = [...section.wells];\n if (!section.wells.find(item => item.id === redirectAssetId)) {\n wells.push({ id: redirectAssetId, checked: true, name, kind: 'manual' });\n }\n return { ...section, wells };\n }\n return {\n ...section,\n wells: section.wells.map(well =>\n well.id === redirectAssetId ? { ...well, checked: true } : well\n ),\n };\n });\n onChangeWellSections(data);\n showSuccessNotification('Offset well successfully added!');\n };\n\n const handleOffsetPickerDialog = () => {\n onExploreMode();\n };\n\n return (\n <div className={classes.content}>\n <div className={classes.searchContainer}>\n <AssetSearch\n company={+company}\n onClickAsset={handleClickAsset}\n onExploreMode={onExploreMode}\n />\n <Typography\n data-testid={`${PAGE_NAME}_advancedSearch`}\n className={classes.advancedSearch}\n onClick={handleOffsetPickerDialog}\n >\n Advanced Search\n </Typography>\n </div>\n\n {(wellSections || []).map(section =>\n section.wells.length === 0 ? (\n <div\n key={`empty-${section.name}`}\n className={classNames(classes.sectionItem, classes.disabledSectionItem)}\n >\n <SectionItem section={section} disabled />\n </div>\n ) : (\n <div key={`section-${section.name}`} className={classes.sectionItem}>\n <Accordion\n expanded={section.expanded}\n onChange={() => handleExpandCollapseSection(section)}\n >\n <AccordionSummary expandIcon={<ExpandMore />} style={{ width: '100%' }}>\n <SectionItem\n section={section}\n onExpandCollapse={handleExpandCollapseSection}\n onSelectAll={handleSelectAll}\n onClearAll={handleClearAll}\n />\n </AccordionSummary>\n <AccordionDetails>\n <List dense className={classes.wellList}>\n {section.wells.map(well => (\n <WellListItem\n key={`well-${section.name}-${well.id}`}\n well={well}\n wellName={getWellName(section.wells, well.id)}\n rigName={well.rigName}\n onToggleWell={handleToggleWell}\n />\n ))}\n </List>\n </AccordionDetails>\n </Accordion>\n </div>\n )\n )}\n </div>\n );\n}\n\nWellSection.propTypes = {\n company: string.isRequired,\n wellSections: arrayOf(shape({})),\n getWellName: func.isRequired,\n onChangeWellSections: func.isRequired,\n onExploreMode: func.isRequired,\n};\n\nconst DEFAULT_WELL_SECTION_WELL_SECTIONS = [];\n\n// Important: Do not change root component default export (WellSection.js). Use it as container\n// for your WellSection. It's required to make build and zip scripts work as expected;\nexport default memo(WellSection);\n"],"names":["useStyles","makeStyles","theme","content","width","marginTop","sectionItem","display","flexDirection","justifyContent","alignItems","padding","fontSize","fontWeight","color","palette","primary","text6","borderTop","concat","text8","borderBottom","disabledSectionItem","wellList","margin","searchContainer","marginBottom","advancedSearch","cursor","textDecoration","WellSection","_ref","company","_ref$wellSections","wellSections","DEFAULT_WELL_SECTION_WELL_SECTIONS","getWellName","onChangeWellSections","onExploreMode","classes","selectAllWells","targetSection","f","selectedWellIds","find","section","name","wells","map","item","id","data","sectionData","well","includes","_objectSpread","checked","handleExpandCollapseSection","expanded","handleToggleWell","targetWell","handleSelectAll","handleClearAll","_jsxs","className","children","_jsx","AssetSearch","onClickAsset","redirectAssetId","_toConsumableArray","push","kind","showSuccessNotification","Typography","onClick","length","classNames","SectionItem","disabled","Accordion","onChange","AccordionSummary","expandIcon","ExpandMore","style","onExpandCollapse","onSelectAll","onClearAll","AccordionDetails","List","dense","WellListItem","wellName","rigName","onToggleWell","propTypes","string","isRequired","arrayOf","shape","func","memo"],"mappings":"quCAmBA,IAEMA,EAAYC,GAAW,SAAAC,GAAK,MAAK,CACrCC,QAAS,CACPC,MAAO,QACPC,UAAW,QAEbC,YAAa,CACXC,QAAS,OACTC,cAAe,MACfC,eAAgB,gBAChBC,WAAY,SACZC,QAAS,MACTC,SAAU,OACVC,WAAY,SACZC,MAAOZ,EAAMa,QAAQC,QAAQC,MAC7BC,UAAS,aAAAC,OAAejB,EAAMa,QAAQC,QAAQI,OAC9C,eAAgB,CACdC,iCAA2BnB,EAAMa,QAAQC,QAAQI,SAGrDE,oBAAqB,CACnBR,MAAOZ,EAAMa,QAAQC,QAAQI,OAE/BG,SAAU,CACRnB,MAAO,OACPoB,OAAQ,EACRb,QAAS,GAEXc,gBAAiB,CACflB,QAAS,OACTE,eAAgB,gBAChBiB,aAAc,OACdhB,WAAY,UAEdiB,eAAgB,CACdf,SAAU,OACVC,WAAY,IACZC,MAAO,UACPc,OAAQ,UACR,UAAW,CACTC,eAAgB,cAGrB,IAED,SAASC,EAMNC,GAAA,IALDC,IAAAA,QAAOC,EAAAF,EACPG,aAAAA,aAAeC,EAAkCF,EACjDG,IAAAA,YACAC,IAAAA,qBACAC,IAAAA,cAEMC,EAAUvC,IAEVwC,EAAiB,SAACC,EAAeC,GACrC,IAAMC,EAAkBT,EACrBU,MAAK,SAAAC,GAAO,OAAIA,EAAQC,OAASL,EAAcK,IAAI,IACnDC,MAAMC,KAAI,SAAAC,GAAI,OAAIA,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SAAS0C,SACrCpB,EAAQE,MAAMC,KAAI,SAAAK,GAAI,OACrBa,EAAC0B,EAAY,CAEXvC,KAAMA,EACNwC,SAAUzD,EAAYS,EAAQE,MAAOM,EAAKH,IAC1C4C,QAASzC,EAAKyC,QACdC,aAAcpC,GAAiB,QAAAxC,OAJlB0B,EAAQC,iBAAQO,EAAKH,gBAjBzBL,WAAAA,OAAAA,EAAQC,YAgCvC,CAEAhB,EAAYkE,UAAY,CACtBhE,QAASiE,EAAOC,WAChBhE,aAAciE,EAAQC,EAAM,CAAA,IAC5BhE,YAAaiE,EAAKH,WAClB7D,qBAAsBgE,EAAKH,WAC3B5D,cAAe+D,EAAKH,YAGtB,IAAM/D,EAAqC,GAI5BmE,EAAAA,EAAKxE"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/components/BICOffsetPickerDialog/components/WellSection/index.js"],"sourcesContent":["import { memo } from 'react';\nimport { string, shape, func, arrayOf } from 'prop-types';\nimport classNames from 'classnames';\nimport {\n makeStyles,\n List,\n Accordion,\n AccordionSummary,\n AccordionDetails,\n Typography,\n} from '@material-ui/core';\nimport { ExpandMore } from '@material-ui/icons';\n\nimport AssetSearch from './AssetSearch';\nimport SectionItem from './SectionItem';\nimport WellListItem from './WellListItem';\n\nimport { showSuccessNotification } from '~/utils';\n\nconst PAGE_NAME = 'WellSection';\n\nconst useStyles = makeStyles(theme => ({\n content: {\n width: '472px',\n marginTop: '24px',\n },\n sectionItem: {\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n padding: '8px',\n fontSize: '12px',\n fontWeight: 'normal',\n color: theme.palette.primary.text6,\n borderTop: `1px solid ${theme.palette.primary.text8}`,\n '&:last-child': {\n borderBottom: `1px solid ${theme.palette.primary.text8}`,\n },\n },\n disabledSectionItem: {\n color: theme.palette.primary.text8,\n },\n wellList: {\n width: '100%',\n margin: 0,\n padding: 0,\n },\n searchContainer: {\n display: 'flex',\n justifyContent: 'space-between',\n marginBottom: '24px',\n alignItems: 'center',\n },\n advancedSearch: {\n fontSize: '14px',\n fontWeight: 500,\n color: '#03BCD4',\n cursor: 'pointer',\n '&:hover': {\n textDecoration: 'underline',\n },\n },\n}));\n\nfunction WellSection({\n company,\n wellSections = DEFAULT_WELL_SECTION_WELL_SECTIONS,\n getWellName,\n onChangeWellSections,\n onExploreMode,\n}) {\n const classes = useStyles();\n\n const selectAllWells = (targetSection, f) => {\n const selectedWellIds = wellSections\n .find(section => section.name === targetSection.name)\n .wells.map(item => item.id);\n\n const data = wellSections.map(section => {\n const sectionData = section.wells.map(well => {\n if (selectedWellIds.includes(well.id)) {\n return { ...well, checked: f };\n } else {\n return { ...well };\n }\n });\n return {\n ...section,\n wells: sectionData,\n };\n });\n onChangeWellSections(data);\n };\n\n const handleExpandCollapseSection = targetSection => {\n const data = wellSections.map(section => {\n if (section.name === targetSection.name) {\n return { ...section, expanded: !section.expanded };\n }\n return section;\n });\n onChangeWellSections(data);\n };\n\n const handleToggleWell = targetWell => {\n const data = wellSections.map(section => {\n const sectionData = section.wells.map(well => {\n if (well.id === targetWell.id) {\n return { ...well, checked: !well.checked };\n }\n return well;\n });\n return {\n ...section,\n wells: sectionData,\n };\n });\n onChangeWellSections(data);\n };\n\n const handleSelectAll = targetSection => {\n selectAllWells(targetSection, true);\n };\n\n const handleClearAll = targetSection => {\n selectAllWells(targetSection, false);\n };\n\n const handleClickAsset = (redirectAssetId, name) => {\n const data = wellSections.map(section => {\n if (section.name === 'Search Results') {\n const wells = [...section.wells];\n if (!section.wells.find(item => item.id === redirectAssetId)) {\n wells.push({ id: redirectAssetId, checked: true, name, kind: 'manual' });\n }\n return { ...section, wells };\n }\n return {\n ...section,\n wells: section.wells.map(well =>\n well.id === redirectAssetId ? { ...well, checked: true } : well\n ),\n };\n });\n onChangeWellSections(data);\n showSuccessNotification('Offset well successfully added!');\n };\n\n const handleOffsetPickerDialog = () => {\n onExploreMode();\n };\n\n return (\n <div className={classes.content}>\n <div className={classes.searchContainer}>\n <AssetSearch\n company={+company}\n onClickAsset={handleClickAsset}\n onExploreMode={onExploreMode}\n />\n <Typography\n data-testid={`${PAGE_NAME}_advancedSearch`}\n className={classes.advancedSearch}\n onClick={handleOffsetPickerDialog}\n >\n Advanced Search\n </Typography>\n </div>\n\n {(wellSections || []).map(section =>\n section.wells.length === 0 ? (\n <div\n key={`empty-${section.name}`}\n className={classNames(classes.sectionItem, classes.disabledSectionItem)}\n >\n <SectionItem section={section} disabled />\n </div>\n ) : (\n <div key={`section-${section.name}`} className={classes.sectionItem}>\n <Accordion\n expanded={section.expanded}\n onChange={() => handleExpandCollapseSection(section)}\n >\n <AccordionSummary expandIcon={<ExpandMore />} style={{ width: '100%' }}>\n <SectionItem\n section={section}\n onExpandCollapse={handleExpandCollapseSection}\n onSelectAll={handleSelectAll}\n onClearAll={handleClearAll}\n />\n </AccordionSummary>\n <AccordionDetails>\n <List dense className={classes.wellList}>\n {section.wells.map(well => (\n <WellListItem\n key={`well-${section.name}-${well.id}`}\n well={well}\n wellName={getWellName(section.wells, well.id)}\n rigName={well.rigName}\n onToggleWell={handleToggleWell}\n />\n ))}\n </List>\n </AccordionDetails>\n </Accordion>\n </div>\n )\n )}\n </div>\n );\n}\n\nWellSection.propTypes = {\n company: string.isRequired,\n wellSections: arrayOf(shape({})),\n getWellName: func.isRequired,\n onChangeWellSections: func.isRequired,\n onExploreMode: func.isRequired,\n};\n\nconst DEFAULT_WELL_SECTION_WELL_SECTIONS = [];\n\n// Important: Do not change root component default export (WellSection.js). Use it as container\n// for your WellSection. It's required to make build and zip scripts work as expected;\nexport default memo(WellSection);\n"],"names":["useStyles","makeStyles","theme","content","width","marginTop","sectionItem","display","flexDirection","justifyContent","alignItems","padding","fontSize","fontWeight","color","palette","primary","text6","borderTop","concat","text8","borderBottom","disabledSectionItem","wellList","margin","searchContainer","marginBottom","advancedSearch","cursor","textDecoration","WellSection","_ref","company","_ref$wellSections","wellSections","DEFAULT_WELL_SECTION_WELL_SECTIONS","getWellName","onChangeWellSections","onExploreMode","classes","selectAllWells","targetSection","f","selectedWellIds","find","section","name","wells","map","item","id","data","sectionData","well","includes","_objectSpread","checked","handleExpandCollapseSection","expanded","handleToggleWell","targetWell","handleSelectAll","handleClearAll","_jsxs","className","children","_jsx","AssetSearch","onClickAsset","redirectAssetId","_toConsumableArray","push","kind","showSuccessNotification","Typography","onClick","length","classNames","SectionItem","disabled","Accordion","onChange","AccordionSummary","expandIcon","ExpandMore","style","onExpandCollapse","onSelectAll","onClearAll","AccordionDetails","List","dense","WellListItem","wellName","rigName","onToggleWell","propTypes","string","isRequired","arrayOf","shape","func","memo"],"mappings":"6iGAmBA,IAEMA,EAAYC,GAAW,SAAAC,GAAK,MAAK,CACrCC,QAAS,CACPC,MAAO,QACPC,UAAW,QAEbC,YAAa,CACXC,QAAS,OACTC,cAAe,MACfC,eAAgB,gBAChBC,WAAY,SACZC,QAAS,MACTC,SAAU,OACVC,WAAY,SACZC,MAAOZ,EAAMa,QAAQC,QAAQC,MAC7BC,UAAS,aAAAC,OAAejB,EAAMa,QAAQC,QAAQI,OAC9C,eAAgB,CACdC,iCAA2BnB,EAAMa,QAAQC,QAAQI,SAGrDE,oBAAqB,CACnBR,MAAOZ,EAAMa,QAAQC,QAAQI,OAE/BG,SAAU,CACRnB,MAAO,OACPoB,OAAQ,EACRb,QAAS,GAEXc,gBAAiB,CACflB,QAAS,OACTE,eAAgB,gBAChBiB,aAAc,OACdhB,WAAY,UAEdiB,eAAgB,CACdf,SAAU,OACVC,WAAY,IACZC,MAAO,UACPc,OAAQ,UACR,UAAW,CACTC,eAAgB,cAGrB,IAED,SAASC,EAMNC,GAAA,IALDC,IAAAA,QAAOC,EAAAF,EACPG,aAAAA,aAAeC,EAAkCF,EACjDG,IAAAA,YACAC,IAAAA,qBACAC,IAAAA,cAEMC,EAAUvC,IAEVwC,EAAiB,SAACC,EAAeC,GACrC,IAAMC,EAAkBT,EACrBU,MAAK,SAAAC,GAAO,OAAIA,EAAQC,OAASL,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