@corva/ui 3.79.0-1 → 3.79.0-2

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 (326) hide show
  1. package/cjs-bundle/components/AddComment/Popover.js +1 -1
  2. package/cjs-bundle/components/AddComment/Popover.js.map +1 -1
  3. package/cjs-bundle/components/AddComment/components/Content.js +1 -1
  4. package/cjs-bundle/components/AddComment/components/Content.js.map +1 -1
  5. package/cjs-bundle/components/AssetEditor/AssetEditorAutocomplete.js +1 -1
  6. package/cjs-bundle/components/AssetEditor/AssetEditorAutocomplete.js.map +1 -1
  7. package/cjs-bundle/components/AssetEditorV2/components/MultipleAssetsToggle.js +1 -1
  8. package/cjs-bundle/components/AssetEditorV2/components/MultipleAssetsToggle.js.map +1 -1
  9. package/cjs-bundle/components/AssetEditorV2/components/SelectItem.js +1 -1
  10. package/cjs-bundle/components/AssetEditorV2/components/SelectItem.js.map +1 -1
  11. package/cjs-bundle/components/BICOffsetPickerDialog/components/WellSection/AssetSearch.js +1 -1
  12. package/cjs-bundle/components/BICOffsetPickerDialog/components/WellSection/AssetSearch.js.map +1 -1
  13. package/cjs-bundle/components/BICOffsetPickerDialog/components/WellSection/SectionItem.js +1 -1
  14. package/cjs-bundle/components/BICOffsetPickerDialog/components/WellSection/SectionItem.js.map +1 -1
  15. package/cjs-bundle/components/BICOffsetPickerDialog/components/WellSection/index.js +1 -1
  16. package/cjs-bundle/components/BICOffsetPickerDialog/components/WellSection/index.js.map +1 -1
  17. package/cjs-bundle/components/BICOffsetPickerDialog/index.js +1 -1
  18. package/cjs-bundle/components/BICOffsetPickerDialog/index.js.map +1 -1
  19. package/cjs-bundle/components/Casing/CasingTable/CasingComponent.js +1 -1
  20. package/cjs-bundle/components/Casing/CasingTable/CasingComponent.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/Casing/CasingTableV2/components/EditComponentDialog.js +1 -1
  28. package/cjs-bundle/components/Casing/CasingTableV2/components/EditComponentDialog.js.map +1 -1
  29. package/cjs-bundle/components/CollapsableSidebar.js +1 -1
  30. package/cjs-bundle/components/CollapsableSidebar.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/AppSettingsDialog/components/SettingsAccordion.js +1 -1
  34. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/components/SettingsAccordion.js.map +1 -1
  35. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js +1 -1
  36. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js.map +1 -1
  37. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/LegacyAppActions.js +1 -1
  38. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/LegacyAppActions.js.map +1 -1
  39. package/cjs-bundle/components/DocumentViewer/DocumentViewer.js +1 -1
  40. package/cjs-bundle/components/DocumentViewer/DocumentViewer.js.map +1 -1
  41. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js +1 -1
  42. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js.map +1 -1
  43. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js +1 -1
  44. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js.map +1 -1
  45. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Component.js +1 -1
  46. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Component.js.map +1 -1
  47. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js +1 -1
  48. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js.map +1 -1
  49. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js +1 -1
  50. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js.map +1 -1
  51. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/EditComponentDialog.js +1 -1
  52. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/EditComponentDialog.js.map +1 -1
  53. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js +1 -1
  54. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js.map +1 -1
  55. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js +1 -1
  56. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js.map +1 -1
  57. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js +1 -1
  58. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js.map +1 -1
  59. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js +1 -1
  60. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js.map +1 -1
  61. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js +1 -1
  62. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js.map +1 -1
  63. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js +1 -1
  64. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js.map +1 -1
  65. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js +1 -1
  66. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js.map +1 -1
  67. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js +1 -1
  68. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js.map +1 -1
  69. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/CancelButton.js +1 -1
  70. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/CancelButton.js.map +1 -1
  71. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js +1 -1
  72. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js.map +1 -1
  73. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/ExpandCollapseButton.js +1 -1
  74. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/ExpandCollapseButton.js.map +1 -1
  75. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/MoreButton.js +1 -1
  76. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/MoreButton.js.map +1 -1
  77. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/SaveButton.js +1 -1
  78. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/SaveButton.js.map +1 -1
  79. package/cjs-bundle/components/Drillstring/BHATable/BHAComponent.js +1 -1
  80. package/cjs-bundle/components/Drillstring/BHATable/BHAComponent.js.map +1 -1
  81. package/cjs-bundle/components/FeedItem/FeedItem.js +1 -1
  82. package/cjs-bundle/components/FeedItem/FeedItem.js.map +1 -1
  83. package/cjs-bundle/components/IconMenu/index.js +1 -1
  84. package/cjs-bundle/components/IconMenu/index.js.map +1 -1
  85. package/cjs-bundle/components/OffsetWellChips/Chip.js +1 -1
  86. package/cjs-bundle/components/OffsetWellChips/Chip.js.map +1 -1
  87. package/cjs-bundle/components/OffsetWellMap/OffsetWellMap.js +1 -1
  88. package/cjs-bundle/components/OffsetWellMap/OffsetWellMap.js.map +1 -1
  89. package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/NonEngineeredWellsSwitch.js +1 -1
  90. package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/NonEngineeredWellsSwitch.js.map +1 -1
  91. package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/ToggleFiltersButton.js +1 -1
  92. package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/ToggleFiltersButton.js.map +1 -1
  93. package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js +1 -1
  94. package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js.map +1 -1
  95. package/cjs-bundle/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js +1 -1
  96. package/cjs-bundle/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js.map +1 -1
  97. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Filter/index.js +1 -1
  98. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Filter/index.js.map +1 -1
  99. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/AssetSearch.js +1 -1
  100. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/AssetSearch.js.map +1 -1
  101. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js +1 -1
  102. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js.map +1 -1
  103. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/index.js +1 -1
  104. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/index.js.map +1 -1
  105. package/cjs-bundle/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js +1 -1
  106. package/cjs-bundle/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js.map +1 -1
  107. package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js +1 -1
  108. package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js.map +1 -1
  109. package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/index.js +1 -1
  110. package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/index.js.map +1 -1
  111. package/cjs-bundle/components/OffsetWellPickerV3/components/WellHubView/index.js +1 -1
  112. package/cjs-bundle/components/OffsetWellPickerV3/components/WellHubView/index.js.map +1 -1
  113. package/cjs-bundle/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js +1 -1
  114. package/cjs-bundle/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js.map +1 -1
  115. package/cjs-bundle/components/OffsetWellPickerV3/components/shared/OffsetWellTableRows.js +1 -1
  116. package/cjs-bundle/components/OffsetWellPickerV3/components/shared/OffsetWellTableRows.js.map +1 -1
  117. package/cjs-bundle/components/OffsetWellPickerV3/index.js +1 -1
  118. package/cjs-bundle/components/OffsetWellPickerV3/index.js.map +1 -1
  119. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js +1 -1
  120. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js.map +1 -1
  121. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js +1 -1
  122. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js.map +1 -1
  123. package/cjs-bundle/components/PadOffsetsPicker/OffsetAssetChip.js +1 -1
  124. package/cjs-bundle/components/PadOffsetsPicker/OffsetAssetChip.js.map +1 -1
  125. package/cjs-bundle/components/PadOffsetsPicker/OffsetAssetsListExpander.js +1 -1
  126. package/cjs-bundle/components/PadOffsetsPicker/OffsetAssetsListExpander.js.map +1 -1
  127. package/cjs-bundle/components/PadOffsetsPicker/PadOffsetsPicker.js +1 -1
  128. package/cjs-bundle/components/PadOffsetsPicker/PadOffsetsPicker.js.map +1 -1
  129. package/cjs-bundle/components/PadOffsetsPicker/StagesSelector.js +1 -1
  130. package/cjs-bundle/components/PadOffsetsPicker/StagesSelector.js.map +1 -1
  131. package/cjs-bundle/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js +1 -1
  132. package/cjs-bundle/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js.map +1 -1
  133. package/cjs-bundle/components/Search/Search.js +1 -1
  134. package/cjs-bundle/components/Search/Search.js.map +1 -1
  135. package/cjs-bundle/components/StatusBadge/components/DQAccordionDetailsContent.js +1 -1
  136. package/cjs-bundle/components/StatusBadge/components/DQAccordionDetailsContent.js.map +1 -1
  137. package/cjs-bundle/components/Template/TemplatePopover/index.js +1 -1
  138. package/cjs-bundle/components/Template/TemplatePopover/index.js.map +1 -1
  139. package/cjs-bundle/components/VirtualizedTable/VirtualizedTable.js +1 -1
  140. package/cjs-bundle/components/VirtualizedTable/VirtualizedTable.js.map +1 -1
  141. package/cjs-bundle/hocs/withAssetEditorLockHOC.js +1 -1
  142. package/cjs-bundle/hocs/withAssetEditorLockHOC.js.map +1 -1
  143. package/components/AddComment/Popover.js +1 -1
  144. package/components/AddComment/Popover.js.map +1 -1
  145. package/components/AddComment/components/Content.js +1 -1
  146. package/components/AddComment/components/Content.js.map +1 -1
  147. package/components/AssetEditor/AssetEditorAutocomplete.js +1 -1
  148. package/components/AssetEditor/AssetEditorAutocomplete.js.map +1 -1
  149. package/components/AssetEditorV2/components/MultipleAssetsToggle.js +1 -1
  150. package/components/AssetEditorV2/components/MultipleAssetsToggle.js.map +1 -1
  151. package/components/AssetEditorV2/components/SelectItem.d.ts.map +1 -1
  152. package/components/AssetEditorV2/components/SelectItem.js +1 -1
  153. package/components/AssetEditorV2/components/SelectItem.js.map +1 -1
  154. package/components/BICOffsetPickerDialog/components/WellSection/AssetSearch.js +1 -1
  155. package/components/BICOffsetPickerDialog/components/WellSection/AssetSearch.js.map +1 -1
  156. package/components/BICOffsetPickerDialog/components/WellSection/SectionItem.js +1 -1
  157. package/components/BICOffsetPickerDialog/components/WellSection/SectionItem.js.map +1 -1
  158. package/components/BICOffsetPickerDialog/components/WellSection/index.js +1 -1
  159. package/components/BICOffsetPickerDialog/components/WellSection/index.js.map +1 -1
  160. package/components/BICOffsetPickerDialog/index.js +1 -1
  161. package/components/BICOffsetPickerDialog/index.js.map +1 -1
  162. package/components/Casing/CasingTable/CasingComponent.js +1 -1
  163. package/components/Casing/CasingTable/CasingComponent.js.map +1 -1
  164. package/components/Casing/CasingTableV2/components/CasingJoints/Editor.js +1 -1
  165. package/components/Casing/CasingTableV2/components/CasingJoints/Editor.js.map +1 -1
  166. package/components/Casing/CasingTableV2/components/Component.js +1 -1
  167. package/components/Casing/CasingTableV2/components/Component.js.map +1 -1
  168. package/components/Casing/CasingTableV2/components/DrillPipe/Editor.js +1 -1
  169. package/components/Casing/CasingTableV2/components/DrillPipe/Editor.js.map +1 -1
  170. package/components/Casing/CasingTableV2/components/EditComponentDialog.d.ts.map +1 -1
  171. package/components/Casing/CasingTableV2/components/EditComponentDialog.js +1 -1
  172. package/components/Casing/CasingTableV2/components/EditComponentDialog.js.map +1 -1
  173. package/components/CollapsableSidebar.js +1 -1
  174. package/components/CollapsableSidebar.js.map +1 -1
  175. package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js +1 -1
  176. package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js.map +1 -1
  177. package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/components/SettingsAccordion.js +1 -1
  178. package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/components/SettingsAccordion.js.map +1 -1
  179. package/components/DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js +1 -1
  180. package/components/DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js.map +1 -1
  181. package/components/DevCenter/DevCenterAppContainer/components/LegacyAppActions.js +1 -1
  182. package/components/DevCenter/DevCenterAppContainer/components/LegacyAppActions.js.map +1 -1
  183. package/components/DocumentViewer/DocumentViewer.js +1 -1
  184. package/components/DocumentViewer/DocumentViewer.js.map +1 -1
  185. package/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js +1 -1
  186. package/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js.map +1 -1
  187. package/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js +1 -1
  188. package/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js.map +1 -1
  189. package/components/Drillstring/BHAComponentsTable/components/Component.js +1 -1
  190. package/components/Drillstring/BHAComponentsTable/components/Component.js.map +1 -1
  191. package/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js +1 -1
  192. package/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js.map +1 -1
  193. package/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js +1 -1
  194. package/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js.map +1 -1
  195. package/components/Drillstring/BHAComponentsTable/components/EditComponentDialog.d.ts.map +1 -1
  196. package/components/Drillstring/BHAComponentsTable/components/EditComponentDialog.js +1 -1
  197. package/components/Drillstring/BHAComponentsTable/components/EditComponentDialog.js.map +1 -1
  198. package/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js +1 -1
  199. package/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js.map +1 -1
  200. package/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js +1 -1
  201. package/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js.map +1 -1
  202. package/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js +1 -1
  203. package/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js.map +1 -1
  204. package/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js +1 -1
  205. package/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js.map +1 -1
  206. package/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js +1 -1
  207. package/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js.map +1 -1
  208. package/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js +1 -1
  209. package/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js.map +1 -1
  210. package/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js +1 -1
  211. package/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js.map +1 -1
  212. package/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js +1 -1
  213. package/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js.map +1 -1
  214. package/components/Drillstring/BHAComponentsTable/components/shared/CancelButton.js +1 -1
  215. package/components/Drillstring/BHAComponentsTable/components/shared/CancelButton.js.map +1 -1
  216. package/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js +1 -1
  217. package/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js.map +1 -1
  218. package/components/Drillstring/BHAComponentsTable/components/shared/ExpandCollapseButton.d.ts.map +1 -1
  219. package/components/Drillstring/BHAComponentsTable/components/shared/ExpandCollapseButton.js +1 -1
  220. package/components/Drillstring/BHAComponentsTable/components/shared/ExpandCollapseButton.js.map +1 -1
  221. package/components/Drillstring/BHAComponentsTable/components/shared/MoreButton.js +1 -1
  222. package/components/Drillstring/BHAComponentsTable/components/shared/MoreButton.js.map +1 -1
  223. package/components/Drillstring/BHAComponentsTable/components/shared/SaveButton.js +1 -1
  224. package/components/Drillstring/BHAComponentsTable/components/shared/SaveButton.js.map +1 -1
  225. package/components/Drillstring/BHATable/BHAComponent.js +1 -1
  226. package/components/Drillstring/BHATable/BHAComponent.js.map +1 -1
  227. package/components/FeedItem/FeedItem.js +1 -1
  228. package/components/FeedItem/FeedItem.js.map +1 -1
  229. package/components/IconMenu/index.js +1 -1
  230. package/components/IconMenu/index.js.map +1 -1
  231. package/components/OffsetWellChips/Chip.js +1 -1
  232. package/components/OffsetWellChips/Chip.js.map +1 -1
  233. package/components/OffsetWellMap/OffsetWellMap.d.ts.map +1 -1
  234. package/components/OffsetWellMap/OffsetWellMap.js +1 -1
  235. package/components/OffsetWellMap/OffsetWellMap.js.map +1 -1
  236. package/components/OffsetWellPickerV2/components/Filter/NonEngineeredWellsSwitch.js +1 -1
  237. package/components/OffsetWellPickerV2/components/Filter/NonEngineeredWellsSwitch.js.map +1 -1
  238. package/components/OffsetWellPickerV2/components/Filter/ToggleFiltersButton.d.ts.map +1 -1
  239. package/components/OffsetWellPickerV2/components/Filter/ToggleFiltersButton.js +1 -1
  240. package/components/OffsetWellPickerV2/components/Filter/ToggleFiltersButton.js.map +1 -1
  241. package/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.d.ts.map +1 -1
  242. package/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js +1 -1
  243. package/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js.map +1 -1
  244. package/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js +1 -1
  245. package/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js.map +1 -1
  246. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Filter/index.js +1 -1
  247. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Filter/index.js.map +1 -1
  248. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/AssetSearch.d.ts.map +1 -1
  249. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/AssetSearch.js +1 -1
  250. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/AssetSearch.js.map +1 -1
  251. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js +1 -1
  252. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js.map +1 -1
  253. package/components/OffsetWellPickerV3/components/CustomSelectionView/index.js +1 -1
  254. package/components/OffsetWellPickerV3/components/CustomSelectionView/index.js.map +1 -1
  255. package/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js +1 -1
  256. package/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js.map +1 -1
  257. package/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.d.ts.map +1 -1
  258. package/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js +1 -1
  259. package/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js.map +1 -1
  260. package/components/OffsetWellPickerV3/components/TabSelection/index.js +1 -1
  261. package/components/OffsetWellPickerV3/components/TabSelection/index.js.map +1 -1
  262. package/components/OffsetWellPickerV3/components/WellHubView/index.js +1 -1
  263. package/components/OffsetWellPickerV3/components/WellHubView/index.js.map +1 -1
  264. package/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js +1 -1
  265. package/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js.map +1 -1
  266. package/components/OffsetWellPickerV3/components/shared/OffsetWellTableRows.js +1 -1
  267. package/components/OffsetWellPickerV3/components/shared/OffsetWellTableRows.js.map +1 -1
  268. package/components/OffsetWellPickerV3/index.js +1 -1
  269. package/components/OffsetWellPickerV3/index.js.map +1 -1
  270. package/components/OffsetWellPickerV4/OffsetWellPickerV4.d.ts.map +1 -1
  271. package/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js +1 -1
  272. package/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js.map +1 -1
  273. package/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js +1 -1
  274. package/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js.map +1 -1
  275. package/components/PadOffsetsPicker/OffsetAssetChip.js +1 -1
  276. package/components/PadOffsetsPicker/OffsetAssetChip.js.map +1 -1
  277. package/components/PadOffsetsPicker/OffsetAssetsListExpander.d.ts.map +1 -1
  278. package/components/PadOffsetsPicker/OffsetAssetsListExpander.js +1 -1
  279. package/components/PadOffsetsPicker/OffsetAssetsListExpander.js.map +1 -1
  280. package/components/PadOffsetsPicker/PadOffsetsPicker.js +1 -1
  281. package/components/PadOffsetsPicker/PadOffsetsPicker.js.map +1 -1
  282. package/components/PadOffsetsPicker/StagesSelector.js +1 -1
  283. package/components/PadOffsetsPicker/StagesSelector.js.map +1 -1
  284. package/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js +1 -1
  285. package/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js.map +1 -1
  286. package/components/Search/Search.js +1 -1
  287. package/components/Search/Search.js.map +1 -1
  288. package/components/StatusBadge/components/DQAccordionDetailsContent.d.ts.map +1 -1
  289. package/components/StatusBadge/components/DQAccordionDetailsContent.js +1 -1
  290. package/components/StatusBadge/components/DQAccordionDetailsContent.js.map +1 -1
  291. package/components/Template/TemplatePopover/index.d.ts.map +1 -1
  292. package/components/Template/TemplatePopover/index.js +1 -1
  293. package/components/Template/TemplatePopover/index.js.map +1 -1
  294. package/components/VirtualizedTable/VirtualizedTable.d.ts.map +1 -1
  295. package/components/VirtualizedTable/VirtualizedTable.js +1 -1
  296. package/components/VirtualizedTable/VirtualizedTable.js.map +1 -1
  297. package/hocs/withAssetEditorLockHOC.d.ts.map +1 -1
  298. package/hocs/withAssetEditorLockHOC.js +1 -1
  299. package/hocs/withAssetEditorLockHOC.js.map +1 -1
  300. package/mcp-server/server.mjs +1 -1
  301. package/package.json +1 -1
  302. package/tsconfig.tsbuildinfo +1 -1
  303. package/cjs-bundle/ext-esm/@material-ui/icons/esm/ExpandLess.js +0 -2
  304. package/cjs-bundle/ext-esm/@material-ui/icons/esm/ExpandLess.js.map +0 -1
  305. package/cjs-bundle/ext-esm/@material-ui/icons/esm/ExpandMore.js +0 -2
  306. package/cjs-bundle/ext-esm/@material-ui/icons/esm/ExpandMore.js.map +0 -1
  307. package/cjs-bundle/ext-esm/@material-ui/icons/esm/Map.js +0 -2
  308. package/cjs-bundle/ext-esm/@material-ui/icons/esm/Map.js.map +0 -1
  309. package/cjs-bundle/ext-esm/@material-ui/icons/esm/UnfoldLess.js +0 -2
  310. package/cjs-bundle/ext-esm/@material-ui/icons/esm/UnfoldLess.js.map +0 -1
  311. package/cjs-bundle/ext-esm/@material-ui/icons/esm/UnfoldMore.js +0 -2
  312. package/cjs-bundle/ext-esm/@material-ui/icons/esm/UnfoldMore.js.map +0 -1
  313. package/cjs-bundle/ext-esm/@material-ui/icons/esm/utils/createSvgIcon.js +0 -2
  314. package/cjs-bundle/ext-esm/@material-ui/icons/esm/utils/createSvgIcon.js.map +0 -1
  315. package/ext-esm/@material-ui/icons/esm/ExpandLess.js +0 -2
  316. package/ext-esm/@material-ui/icons/esm/ExpandLess.js.map +0 -1
  317. package/ext-esm/@material-ui/icons/esm/ExpandMore.js +0 -2
  318. package/ext-esm/@material-ui/icons/esm/ExpandMore.js.map +0 -1
  319. package/ext-esm/@material-ui/icons/esm/Map.js +0 -2
  320. package/ext-esm/@material-ui/icons/esm/Map.js.map +0 -1
  321. package/ext-esm/@material-ui/icons/esm/UnfoldLess.js +0 -2
  322. package/ext-esm/@material-ui/icons/esm/UnfoldLess.js.map +0 -1
  323. package/ext-esm/@material-ui/icons/esm/UnfoldMore.js +0 -2
  324. package/ext-esm/@material-ui/icons/esm/UnfoldMore.js.map +0 -1
  325. package/ext-esm/@material-ui/icons/esm/utils/createSvgIcon.js +0 -2
  326. package/ext-esm/@material-ui/icons/esm/utils/createSvgIcon.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"AssetEditorAutocomplete.js","sources":["../../../src/components/AssetEditor/AssetEditorAutocomplete.js"],"sourcesContent":["import { useMemo, useState, useEffect, forwardRef } from 'react';\nimport PropTypes from 'prop-types';\nimport { debounce, identity } from 'lodash';\nimport {\n FormControl,\n InputLabel,\n TextField,\n FormHelperText,\n withStyles,\n Typography,\n List,\n InputAdornment,\n Chip,\n Tooltip,\n} from '@material-ui/core';\nimport { Search as SearchIcon } from '@material-ui/icons';\nimport { Autocomplete } from '@material-ui/lab';\n\nimport TruncatedText from '../TruncatedText';\n\nimport { PER_PAGE, SCROLL_THRESHOLD } from './constants';\nimport { useAssetAutoCompleteSelectData } from './effects';\n\nconst PAGE_NAME = 'DC_SingleAssetEditorAutocomplete';\n\nconst muiStyles = theme => ({\n formControl: {},\n listbox: { maxHeight: 350 },\n root: { fontSize: 16 },\n inputRoot: {\n paddingTop: 16,\n padding: '8px 0',\n paddingBottom: 0,\n width: 350,\n fontSize: 16,\n },\n popupIndicator: { display: 'none' },\n option: {\n paddingLeft: '16px !important',\n height: 36,\n '&[aria-disabled=true]': {\n color: theme.palette.primary.text9,\n opacity: 1,\n backgroundColor: 'unset',\n },\n },\n noOptions: { padding: 0 },\n searchIcon: { fontSize: '20px !important' },\n});\n\nconst infoListItemStyles = {\n paddingLeft: '16px',\n height: 36,\n listStyleType: 'none',\n display: 'flex',\n alignItems: 'center',\n};\n\n/* eslint-disable react/prop-types */\nconst InfoListItem = ({ text = 'Loading...' }) => (\n <li key=\"loading\" style={infoListItemStyles}>\n <Typography variant=\"body2\" color=\"textSecondary\">\n {text}\n </Typography>\n </li>\n);\n\nconst ListboxComponent = forwardRef(({ children, loading, hasMore, ...otherProps }, ref) => (\n <List {...otherProps} ref={ref} role=\"listbox\">\n {children}\n {(hasMore || loading) && <InfoListItem />}\n </List>\n));\n/* eslint-enable react/prop-types */\n\nconst AssetEditorAutocomplete = ({\n 'data-testid': dataTestId,\n appKey,\n assetType,\n classes,\n companyId,\n currentValue,\n disabled,\n disableClearable,\n errorText,\n isMultiple,\n isNullable,\n label,\n onChange,\n parentAssetId,\n parentAssetType,\n queryParams,\n autocompleteProps = {},\n assetFields,\n}) => {\n // NOTE: Store currently selected option\n const [currentOption, setCurrentOption] = useState(isMultiple ? [] : null);\n\n const [searchText, setSearchText] = useState(''); // NOTE: For ui input\n const [searchValue, setSearchValue] = useState(''); // NOTE: Used for api filtering\n const [isSearchMode, setSearchMode] = useState(false);\n\n const [scrollPage, setScrollPage] = useState(1);\n const [hasMore, setHasMore] = useState(true);\n\n useEffect(() => {\n // NOTE: Asset type has been changed. Clear currently selected option\n setCurrentOption(isMultiple ? [] : null);\n setScrollPage(1);\n setSearchMode(false);\n }, [assetType]);\n\n const { assets, loading } = useAssetAutoCompleteSelectData({\n appKey,\n assetType,\n companyId,\n currentValue,\n isMultiple,\n parentAssetId,\n parentAssetType,\n scrollPage,\n searchText,\n setCurrentOption,\n queryParams,\n assetFields,\n });\n\n useEffect(() => {\n const hasMoreAssets = assets.length >= PER_PAGE * scrollPage;\n setHasMore(hasMoreAssets);\n }, [assets, scrollPage]);\n\n const onInputChange = useMemo(\n () =>\n debounce(value => {\n setScrollPage(1);\n setSearchText(value);\n }, 200),\n []\n );\n\n const handleInputChange = (event, value, reason) => {\n if (reason === 'input') {\n setSearchValue(value);\n setSearchMode(true);\n onInputChange(value); // NOTE: Trigger api call\n } else {\n // NOTE: Clean searchText for \"reset\" and \"clear\" reasons\n setSearchText('');\n }\n };\n\n const handleFetchNext = useMemo(\n () => debounce(() => setScrollPage(prevScrollPage => prevScrollPage + 1), 250),\n []\n );\n const onClose = () => {\n setSearchValue('');\n setSearchText('');\n setSearchMode(false);\n setScrollPage(1);\n };\n\n const onScrollListbox = event => {\n if (!hasMore || loading) return;\n const listboxNode = event.currentTarget;\n if (\n listboxNode.scrollTop + listboxNode.clientHeight >\n listboxNode.scrollHeight - SCROLL_THRESHOLD\n ) {\n handleFetchNext();\n }\n };\n\n const renderInput = params => (\n <TextField\n {...params}\n variant=\"standard\"\n placeholder=\"Search for asset...\"\n {...(!isMultiple && {\n InputProps: {\n ...params.InputProps,\n startAdornment: (\n <InputAdornment>\n <SearchIcon className={classes.searchIcon} />\n </InputAdornment>\n ),\n },\n })}\n />\n );\n\n const renderOption = ({ id, name }) => (\n <TruncatedText key={id} data-testid={`${PAGE_NAME}_option_${name}MenuItem`}>\n {isMultiple && currentValue.includes(id) ? `${name} (already selected)` : name}\n </TruncatedText>\n );\n\n const autocompleteClasses = {\n endAdornment: classes.endAdornment,\n inputRoot: classes.inputRoot,\n listbox: classes.listbox,\n noOptions: classes.noOptions,\n option: classes.option,\n popupIndicator: classes.popupIndicator,\n root: classes.root,\n };\n\n return (\n <FormControl disabled={disabled} error={!!errorText} className={classes.formControl}>\n {!isNullable && <InputLabel shrink>{label}</InputLabel>}\n <Tooltip title={currentOption?.name ?? ''}>\n <Autocomplete\n disabled={disabled}\n blurOnSelect\n classes={autocompleteClasses}\n clearOnBlur\n clearOnEscape\n data-testid={dataTestId}\n disableClearable={disableClearable}\n filterOptions={identity}\n getOptionLabel={option => option?.name}\n getOptionSelected={(option, value) => option && value && option.id === value.id}\n inputValue={isSearchMode ? searchValue : currentOption?.name || ''}\n ListboxComponent={ListboxComponent}\n ListboxProps={{ onScroll: onScrollListbox, loading, hasMore }}\n options={assets}\n onChange={(event, selected) => {\n setCurrentOption(selected);\n onChange(isMultiple ? selected.map(({ id }) => id) : selected?.id ?? null, selected);\n }}\n onClose={onClose}\n onInputChange={handleInputChange}\n noOptionsText={<InfoListItem text={loading ? 'Loading...' : 'No options'} />}\n renderInput={renderInput}\n renderOption={renderOption}\n value={currentOption}\n multiple={isMultiple}\n {...(isMultiple && {\n renderTags: (value, getTagProps) => {\n return value.map((option, index) => (\n <Chip key={option.id} label={option?.name} {...getTagProps({ index })} />\n ));\n },\n getOptionDisabled: option => currentValue.includes(option.id),\n })}\n {...autocompleteProps}\n />\n </Tooltip>\n <FormHelperText>{errorText}</FormHelperText>\n </FormControl>\n );\n};\n\nAssetEditorAutocomplete.defaultProps = {\n label: 'Choose An Asset',\n currentValue: undefined,\n disableClearable: true,\n isNullable: false,\n parentAssetId: undefined,\n parentAssetType: undefined,\n companyId: undefined,\n errorText: '',\n 'data-testid': `${PAGE_NAME}_autoComplete`,\n disabled: false,\n isMultiple: false,\n appKey: null,\n queryParams: {},\n};\n\nAssetEditorAutocomplete.propTypes = {\n label: PropTypes.string,\n currentValue: PropTypes.oneOfType([PropTypes.number, PropTypes.arrayOf(PropTypes.number)]),\n isNullable: PropTypes.bool,\n onChange: PropTypes.func.isRequired,\n classes: PropTypes.shape({}).isRequired,\n disableClearable: PropTypes.bool,\n parentAssetId: PropTypes.number,\n parentAssetType: PropTypes.string,\n companyId: PropTypes.number,\n assetType: PropTypes.string.isRequired,\n errorText: PropTypes.string,\n 'data-testid': PropTypes.string,\n disabled: PropTypes.bool,\n isMultiple: PropTypes.bool,\n appKey: PropTypes.string,\n queryParams: PropTypes.shape({}),\n};\n\nexport default withStyles(muiStyles)(AssetEditorAutocomplete);\n"],"names":["PAGE_NAME","infoListItemStyles","paddingLeft","height","listStyleType","display","alignItems","InfoListItem","_ref","_ref$text","text","_jsx","style","children","Typography","variant","color","ListboxComponent","forwardRef","ref","loading","hasMore","otherProps","_objectWithoutProperties","_ref2","_excluded","_jsxs","List","_objectSpread","role","AssetEditorAutocomplete","_ref3","_currentOption$name","dataTestId","appKey","assetType","classes","companyId","currentValue","disabled","disableClearable","errorText","isMultiple","isNullable","label","onChange","parentAssetId","parentAssetType","queryParams","_ref3$autocompletePro","autocompleteProps","assetFields","_useState","useState","_useState2","_slicedToArray","currentOption","setCurrentOption","_useState4","_useState3","searchText","setSearchText","_useState6","_useState5","searchValue","setSearchValue","_useState8","_useState7","isSearchMode","setSearchMode","_useState10","_useState9","scrollPage","setScrollPage","_useState12","_useState11","setHasMore","useEffect","_useAssetAutoComplete","useAssetAutoCompleteSelectData","assets","hasMoreAssets","length","PER_PAGE","onInputChange","useMemo","debounce","value","handleFetchNext","prevScrollPage","autocompleteClasses","endAdornment","inputRoot","listbox","noOptions","option","popupIndicator","root","FormControl","error","className","formControl","InputLabel","shrink","Tooltip","title","name","Autocomplete","blurOnSelect","clearOnBlur","clearOnEscape","filterOptions","identity","getOptionLabel","getOptionSelected","id","inputValue","ListboxProps","onScroll","event","listboxNode","currentTarget","scrollTop","clientHeight","scrollHeight","SCROLL_THRESHOLD","options","selected","_selected$id","map","_ref5","onClose","reason","noOptionsText","renderInput","params","TextField","placeholder","InputProps","startAdornment","InputAdornment","SearchIcon","searchIcon","renderOption","_ref4","TruncatedText","includes","multiple","renderTags","getTagProps","index","Chip","getOptionDisabled","FormHelperText","defaultProps","undefined","concat","propTypes","PropTypes","string","oneOfType","number","arrayOf","bool","func","isRequired","shape","AssetEditorAutocomplete$1","withStyles","theme","maxHeight","fontSize","paddingTop","padding","paddingBottom","width","palette","primary","text9","opacity","backgroundColor"],"mappings":"u5CAuBA,IAAMA,EAAY,mCA2BZC,EAAqB,CACzBC,YAAa,OACbC,OAAQ,GACRC,cAAe,OACfC,QAAS,OACTC,WAAY,UAIRC,EAAe,SAAHC,GAAA,IAAAC,EAAAD,EAAME,KAAmB,OACzCC,EAAA,KAAA,CAAkBC,MAAOX,EAAmBY,SAC1CF,EAACG,EAAU,CAACC,QAAQ,QAAQC,MAAM,gBAAeH,oBAFtB,aAAYJ,KACjC,UAIH,EAGDQ,EAAmBC,GAAW,WAAgDC,GAAG,IAAhDN,IAAAA,SAAUO,IAAAA,QAASC,IAAAA,QAAYC,EAAUC,EAAAC,EAAAC,GAAA,OAC9EC,EAACC,EAAIC,EAAAA,EAAA,GAAKN,GAAU,GAAA,CAAEH,IAAKA,EAAKU,KAAK,UAAShB,SAC3CA,CAAAA,GACCQ,GAAWD,IAAYT,EAACJ,EAAe,CAAA,MACpC,IAIHuB,EAA0B,SAmB1BC,GAAA,IAAAC,EAlBWC,IAAf,eACAC,IAAAA,OACAC,IAAAA,UACAC,IAAAA,QACAC,IAAAA,UACAC,IAAAA,aACAC,IAAAA,SACAC,IAAAA,iBACAC,IAAAA,UACAC,IAAAA,WACAC,IAAAA,WACAC,IAAAA,MACAC,IAAAA,SACAC,IAAAA,cACAC,IAAAA,gBACAC,IAAAA,YAAWC,EAAAlB,EACXmB,kBAAAA,OAAiB,IAAAD,EAAG,CAAE,EAAAA,EACtBE,IAAAA,YAGAC,EAA0CC,EAASX,EAAa,GAAK,MAAKY,EAAAC,EAAAH,EAAA,GAAnEI,EAAaF,EAAA,GAAEG,EAAgBH,EA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EAAwB+H,UAAY,CAClCjH,MAAOkH,EAAUC,OACjBzH,aAAcwH,EAAUE,UAAU,CAACF,EAAUG,OAAQH,EAAUI,QAAQJ,EAAUG,UACjFtH,WAAYmH,EAAUK,KACtBtH,SAAUiH,EAAUM,KAAKC,WACzBjI,QAAS0H,EAAUQ,MAAM,CAAA,GAAID,WAC7B7H,iBAAkBsH,EAAUK,KAC5BrH,cAAegH,EAAUG,OACzBlH,gBAAiB+G,EAAUC,OAC3B1H,UAAWyH,EAAUG,OACrB9H,UAAW2H,EAAUC,OAAOM,WAC5B5H,UAAWqH,EAAUC,OACrB,cAAeD,EAAUC,OACzBxH,SAAUuH,EAAUK,KACpBzH,WAAYoH,EAAUK,KACtBjI,OAAQ4H,EAAUC,OAClB/G,YAAa8G,EAAUQ,MAAM,KAG/B,IAAAC,EAAeC,GAxQG,SAAAC,GAAK,MAAK,CAC1BpE,YAAa,CAAE,EACfR,QAAS,CAAE6E,UAAW,KACtBzE,KAAM,CAAE0E,SAAU,IAClB/E,UAAW,CACTgF,WAAY,GACZC,QAAS,QACTC,cAAe,EACfC,MAAO,IACPJ,SAAU,IAEZ3E,eAAgB,CAAE3F,QAAS,QAC3B0F,OAAQ,CACN7F,YAAa,kBACbC,OAAQ,GACR,wBAAyB,CACvBa,MAAOyJ,EAAMO,QAAQC,QAAQC,MAC7BC,QAAS,EACTC,gBAAiB,UAGrBtF,UAAW,CAAE+E,QAAS,GACtB/B,WAAY,CAAE6B,SAAU,mBACzB,GAiPcH,CAAsB1I"}
1
+ {"version":3,"file":"AssetEditorAutocomplete.js","sources":["../../../src/components/AssetEditor/AssetEditorAutocomplete.js"],"sourcesContent":["import { useMemo, useState, useEffect, forwardRef } from 'react';\nimport PropTypes from 'prop-types';\nimport { debounce, identity } from 'lodash';\nimport {\n FormControl,\n InputLabel,\n TextField,\n FormHelperText,\n withStyles,\n Typography,\n List,\n InputAdornment,\n Chip,\n Tooltip,\n} from '@material-ui/core';\nimport SearchIcon from '@material-ui/icons/Search';\nimport { Autocomplete } from '@material-ui/lab';\n\nimport TruncatedText from '../TruncatedText';\n\nimport { PER_PAGE, SCROLL_THRESHOLD } from './constants';\nimport { useAssetAutoCompleteSelectData } from './effects';\n\nconst PAGE_NAME = 'DC_SingleAssetEditorAutocomplete';\n\nconst muiStyles = theme => ({\n formControl: {},\n listbox: { maxHeight: 350 },\n root: { fontSize: 16 },\n inputRoot: {\n paddingTop: 16,\n padding: '8px 0',\n paddingBottom: 0,\n width: 350,\n fontSize: 16,\n },\n popupIndicator: { display: 'none' },\n option: {\n paddingLeft: '16px !important',\n height: 36,\n '&[aria-disabled=true]': {\n color: theme.palette.primary.text9,\n opacity: 1,\n backgroundColor: 'unset',\n },\n },\n noOptions: { padding: 0 },\n searchIcon: { fontSize: '20px !important' },\n});\n\nconst infoListItemStyles = {\n paddingLeft: '16px',\n height: 36,\n listStyleType: 'none',\n display: 'flex',\n alignItems: 'center',\n};\n\n/* eslint-disable react/prop-types */\nconst InfoListItem = ({ text = 'Loading...' }) => (\n <li key=\"loading\" style={infoListItemStyles}>\n <Typography variant=\"body2\" color=\"textSecondary\">\n {text}\n </Typography>\n </li>\n);\n\nconst ListboxComponent = forwardRef(({ children, loading, hasMore, ...otherProps }, ref) => (\n <List {...otherProps} ref={ref} role=\"listbox\">\n {children}\n {(hasMore || loading) && <InfoListItem />}\n </List>\n));\n/* eslint-enable react/prop-types */\n\nconst AssetEditorAutocomplete = ({\n 'data-testid': dataTestId,\n appKey,\n assetType,\n classes,\n companyId,\n currentValue,\n disabled,\n disableClearable,\n errorText,\n isMultiple,\n isNullable,\n label,\n onChange,\n parentAssetId,\n parentAssetType,\n queryParams,\n autocompleteProps = {},\n assetFields,\n}) => {\n // NOTE: Store currently selected option\n const [currentOption, setCurrentOption] = useState(isMultiple ? [] : null);\n\n const [searchText, setSearchText] = useState(''); // NOTE: For ui input\n const [searchValue, setSearchValue] = useState(''); // NOTE: Used for api filtering\n const [isSearchMode, setSearchMode] = useState(false);\n\n const [scrollPage, setScrollPage] = useState(1);\n const [hasMore, setHasMore] = useState(true);\n\n useEffect(() => {\n // NOTE: Asset type has been changed. Clear currently selected option\n setCurrentOption(isMultiple ? [] : null);\n setScrollPage(1);\n setSearchMode(false);\n }, [assetType]);\n\n const { assets, loading } = useAssetAutoCompleteSelectData({\n appKey,\n assetType,\n companyId,\n currentValue,\n isMultiple,\n parentAssetId,\n parentAssetType,\n scrollPage,\n searchText,\n setCurrentOption,\n queryParams,\n assetFields,\n });\n\n useEffect(() => {\n const hasMoreAssets = assets.length >= PER_PAGE * scrollPage;\n setHasMore(hasMoreAssets);\n }, [assets, scrollPage]);\n\n const onInputChange = useMemo(\n () =>\n debounce(value => {\n setScrollPage(1);\n setSearchText(value);\n }, 200),\n []\n );\n\n const handleInputChange = (event, value, reason) => {\n if (reason === 'input') {\n setSearchValue(value);\n setSearchMode(true);\n onInputChange(value); // NOTE: Trigger api call\n } else {\n // NOTE: Clean searchText for \"reset\" and \"clear\" reasons\n setSearchText('');\n }\n };\n\n const handleFetchNext = useMemo(\n () => debounce(() => setScrollPage(prevScrollPage => prevScrollPage + 1), 250),\n []\n );\n const onClose = () => {\n setSearchValue('');\n setSearchText('');\n setSearchMode(false);\n setScrollPage(1);\n };\n\n const onScrollListbox = event => {\n if (!hasMore || loading) return;\n const listboxNode = event.currentTarget;\n if (\n listboxNode.scrollTop + listboxNode.clientHeight >\n listboxNode.scrollHeight - SCROLL_THRESHOLD\n ) {\n handleFetchNext();\n }\n };\n\n const renderInput = params => (\n <TextField\n {...params}\n variant=\"standard\"\n placeholder=\"Search for asset...\"\n {...(!isMultiple && {\n InputProps: {\n ...params.InputProps,\n startAdornment: (\n <InputAdornment>\n <SearchIcon className={classes.searchIcon} />\n </InputAdornment>\n ),\n },\n })}\n />\n );\n\n const renderOption = ({ id, name }) => (\n <TruncatedText key={id} data-testid={`${PAGE_NAME}_option_${name}MenuItem`}>\n {isMultiple && currentValue.includes(id) ? `${name} (already selected)` : name}\n </TruncatedText>\n );\n\n const autocompleteClasses = {\n endAdornment: classes.endAdornment,\n inputRoot: classes.inputRoot,\n listbox: classes.listbox,\n noOptions: classes.noOptions,\n option: classes.option,\n popupIndicator: classes.popupIndicator,\n root: classes.root,\n };\n\n return (\n <FormControl disabled={disabled} error={!!errorText} className={classes.formControl}>\n {!isNullable && <InputLabel shrink>{label}</InputLabel>}\n <Tooltip title={currentOption?.name ?? ''}>\n <Autocomplete\n disabled={disabled}\n blurOnSelect\n classes={autocompleteClasses}\n clearOnBlur\n clearOnEscape\n data-testid={dataTestId}\n disableClearable={disableClearable}\n filterOptions={identity}\n getOptionLabel={option => option?.name}\n getOptionSelected={(option, value) => option && value && option.id === value.id}\n inputValue={isSearchMode ? searchValue : currentOption?.name || ''}\n ListboxComponent={ListboxComponent}\n ListboxProps={{ onScroll: onScrollListbox, loading, hasMore }}\n options={assets}\n onChange={(event, selected) => {\n setCurrentOption(selected);\n onChange(isMultiple ? selected.map(({ id }) => id) : selected?.id ?? null, selected);\n }}\n onClose={onClose}\n onInputChange={handleInputChange}\n noOptionsText={<InfoListItem text={loading ? 'Loading...' : 'No options'} />}\n renderInput={renderInput}\n renderOption={renderOption}\n value={currentOption}\n multiple={isMultiple}\n {...(isMultiple && {\n renderTags: (value, getTagProps) => {\n return value.map((option, index) => (\n <Chip key={option.id} label={option?.name} {...getTagProps({ index })} />\n ));\n },\n getOptionDisabled: option => currentValue.includes(option.id),\n })}\n {...autocompleteProps}\n />\n </Tooltip>\n <FormHelperText>{errorText}</FormHelperText>\n </FormControl>\n );\n};\n\nAssetEditorAutocomplete.defaultProps = {\n label: 'Choose An Asset',\n currentValue: undefined,\n disableClearable: true,\n isNullable: false,\n parentAssetId: undefined,\n parentAssetType: undefined,\n companyId: undefined,\n errorText: '',\n 'data-testid': `${PAGE_NAME}_autoComplete`,\n disabled: false,\n isMultiple: false,\n appKey: null,\n queryParams: {},\n};\n\nAssetEditorAutocomplete.propTypes = {\n label: PropTypes.string,\n currentValue: PropTypes.oneOfType([PropTypes.number, PropTypes.arrayOf(PropTypes.number)]),\n isNullable: PropTypes.bool,\n onChange: PropTypes.func.isRequired,\n classes: PropTypes.shape({}).isRequired,\n disableClearable: PropTypes.bool,\n parentAssetId: PropTypes.number,\n parentAssetType: PropTypes.string,\n companyId: PropTypes.number,\n assetType: PropTypes.string.isRequired,\n errorText: PropTypes.string,\n 'data-testid': PropTypes.string,\n disabled: PropTypes.bool,\n isMultiple: PropTypes.bool,\n appKey: PropTypes.string,\n queryParams: PropTypes.shape({}),\n};\n\nexport default withStyles(muiStyles)(AssetEditorAutocomplete);\n"],"names":["PAGE_NAME","infoListItemStyles","paddingLeft","height","listStyleType","display","alignItems","InfoListItem","_ref","_ref$text","text","_jsx","style","children","Typography","variant","color","ListboxComponent","forwardRef","ref","loading","hasMore","otherProps","_objectWithoutProperties","_ref2","_excluded","_jsxs","List","_objectSpread","role","AssetEditorAutocomplete","_ref3","_currentOption$name","dataTestId","appKey","assetType","classes","companyId","currentValue","disabled","disableClearable","errorText","isMultiple","isNullable","label","onChange","parentAssetId","parentAssetType","queryParams","_ref3$autocompletePro","autocompleteProps","assetFields","_useState","useState","_useState2","_slicedToArray","currentOption","setCurrentOption","_useState4","_useState3","searchText","setSearchText","_useState6","_useState5","searchValue","setSearchValue","_useState8","_useState7","isSearchMode","setSearchMode","_useState10","_useState9","scrollPage","setScrollPage","_useState12","_useState11","setHasMore","useEffect","_useAssetAutoComplete","useAssetAutoCompleteSelectData","assets","hasMoreAssets","length","PER_PAGE","onInputChange","useMemo","debounce","value","handleFetchNext","prevScrollPage","autocompleteClasses","endAdornment","inputRoot","listbox","noOptions","option","popupIndicator","root","FormControl","error","className","formControl","InputLabel","shrink","Tooltip","title","name","Autocomplete","blurOnSelect","clearOnBlur","clearOnEscape","filterOptions","identity","getOptionLabel","getOptionSelected","id","inputValue","ListboxProps","onScroll","event","listboxNode","currentTarget","scrollTop","clientHeight","scrollHeight","SCROLL_THRESHOLD","options","selected","_selected$id","map","_ref5","onClose","reason","noOptionsText","renderInput","params","TextField","placeholder","InputProps","startAdornment","InputAdornment","SearchIcon","searchIcon","renderOption","_ref4","TruncatedText","includes","multiple","renderTags","getTagProps","index","Chip","getOptionDisabled","FormHelperText","defaultProps","undefined","concat","propTypes","PropTypes","string","oneOfType","number","arrayOf","bool","func","isRequired","shape","AssetEditorAutocomplete$1","withStyles","theme","maxHeight","fontSize","paddingTop","padding","paddingBottom","width","palette","primary","text9","opacity","backgroundColor"],"mappings":"o5CAuBA,IAAMA,EAAY,mCA2BZC,EAAqB,CACzBC,YAAa,OACbC,OAAQ,GACRC,cAAe,OACfC,QAAS,OACTC,WAAY,UAIRC,EAAe,SAAHC,GAAA,IAAAC,EAAAD,EAAME,KAAmB,OACzCC,EAAA,KAAA,CAAkBC,MAAOX,EAAmBY,SAC1CF,EAACG,EAAU,CAACC,QAAQ,QAAQC,MAAM,gBAAeH,oBAFtB,aAAYJ,KACjC,UAIH,EAGDQ,EAAmBC,GAAW,WAAgDC,GAAG,IAAhDN,IAAAA,SAAUO,IAAAA,QAASC,IAAAA,QAAYC,EAAUC,EAAAC,EAAAC,GAAA,OAC9EC,EAACC,EAAIC,EAAAA,EAAA,GAAKN,GAAU,GAAA,CAAEH,IAAKA,EAAKU,KAAK,UAAShB,SAC3CA,CAAAA,GACCQ,GAAWD,IAAYT,EAACJ,EAAe,CAAA,MACpC,IAIHuB,EAA0B,SAmB1BC,GAAA,IAAAC,EAlBWC,IAAf,eACAC,IAAAA,OACAC,IAAAA,UACAC,IAAAA,QACAC,IAAAA,UACAC,IAAAA,aACAC,IAAAA,SACAC,IAAAA,iBACAC,IAAAA,UACAC,IAAAA,WACAC,IAAAA,WACAC,IAAAA,MACAC,IAAAA,SACAC,IAAAA,cACAC,IAAAA,gBACAC,IAAAA,YAAWC,EAAAlB,EACXmB,kBAAAA,OAAiB,IAAAD,EAAG,CAAE,EAAAA,EACtBE,IAAAA,YAGAC,EAA0CC,EAASX,EAAa,GAAK,MAAKY,EAAA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U,EACVG,YAAY,EACZR,OAAQ,KACRc,YAAa,CAAC,GAGhBlB,EAAwB+H,UAAY,CAClCjH,MAAOkH,EAAUC,OACjBzH,aAAcwH,EAAUE,UAAU,CAACF,EAAUG,OAAQH,EAAUI,QAAQJ,EAAUG,UACjFtH,WAAYmH,EAAUK,KACtBtH,SAAUiH,EAAUM,KAAKC,WACzBjI,QAAS0H,EAAUQ,MAAM,CAAA,GAAID,WAC7B7H,iBAAkBsH,EAAUK,KAC5BrH,cAAegH,EAAUG,OACzBlH,gBAAiB+G,EAAUC,OAC3B1H,UAAWyH,EAAUG,OACrB9H,UAAW2H,EAAUC,OAAOM,WAC5B5H,UAAWqH,EAAUC,OACrB,cAAeD,EAAUC,OACzBxH,SAAUuH,EAAUK,KACpBzH,WAAYoH,EAAUK,KACtBjI,OAAQ4H,EAAUC,OAClB/G,YAAa8G,EAAUQ,MAAM,KAG/B,IAAAC,EAAeC,GAxQG,SAAAC,GAAK,MAAK,CAC1BpE,YAAa,CAAE,EACfR,QAAS,CAAE6E,UAAW,KACtBzE,KAAM,CAAE0E,SAAU,IAClB/E,UAAW,CACTgF,WAAY,GACZC,QAAS,QACTC,cAAe,EACfC,MAAO,IACPJ,SAAU,IAEZ3E,eAAgB,CAAE3F,QAAS,QAC3B0F,OAAQ,CACN7F,YAAa,kBACbC,OAAQ,GACR,wBAAyB,CACvBa,MAAOyJ,EAAMO,QAAQC,QAAQC,MAC7BC,QAAS,EACTC,gBAAiB,UAGrBtF,UAAW,CAAE+E,QAAS,GACtB/B,WAAY,CAAE6B,SAAU,mBACzB,GAiPcH,CAAsB1I"}
@@ -1,2 +1,2 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/objectWithoutProperties";import r from"classnames";import{makeStyles as o,Tooltip as i}from"@material-ui/core";import{InfoOutlined as n}from"@material-ui/icons";import{Switch as a}from"../../../componentsV2/Switch/Switch.js";import{jsx as c,jsxs as s}from"react/jsx-runtime";var l=["isChecked","title","className"];function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}var m=o((function(e){var t=e.palette;return{root:{marginBottom:(0,e.spacing)(.75),width:"fit-content"},title:{display:"flex",alignItems:"center"},infoIcon:{marginLeft:4,color:t.primary.text6,"&:hover":{color:t.primary.contrastText}}}})),f=function(o){var f=o.isChecked,b=o.title,u=void 0===b?"Multiple Assets":b,h=o.className,O=t(o,l),d=m();return c(a,function(t){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?p(Object(o),!0).forEach((function(r){e(t,r,o[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):p(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}({className:r(d.root,h),size:"small",onLabel:s("span",{className:d.title,children:[u,c(i,{title:"A separate app will be placed on the dashboard for each asset chosen",placement:"bottom-start",children:c(n,{fontSize:"small",className:d.infoIcon})})]}),checked:f},O))};export{f as default};
1
+ import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/objectWithoutProperties";import r from"classnames";import{makeStyles as o,Tooltip as i}from"@material-ui/core";import n from"@material-ui/icons/InfoOutlined";import{Switch as a}from"../../../componentsV2/Switch/Switch.js";import{jsx as c,jsxs as s}from"react/jsx-runtime";var l=["isChecked","title","className"];function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}var m=o((function(e){var t=e.palette;return{root:{marginBottom:(0,e.spacing)(.75),width:"fit-content"},title:{display:"flex",alignItems:"center"},infoIcon:{marginLeft:4,color:t.primary.text6,"&:hover":{color:t.primary.contrastText}}}})),f=function(o){var f=o.isChecked,u=o.title,b=void 0===u?"Multiple Assets":u,h=o.className,O=t(o,l),d=m();return c(a,function(t){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?p(Object(o),!0).forEach((function(r){e(t,r,o[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):p(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}({className:r(d.root,h),size:"small",onLabel:s("span",{className:d.title,children:[b,c(i,{title:"A separate app will be placed on the dashboard for each asset chosen",placement:"bottom-start",children:c(n,{fontSize:"small",className:d.infoIcon})})]}),checked:f},O))};export{f as default};
2
2
  //# sourceMappingURL=MultipleAssetsToggle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MultipleAssetsToggle.js","sources":["../../../../src/components/AssetEditorV2/components/MultipleAssetsToggle.tsx"],"sourcesContent":["import { FC, ReactNode } from 'react';\nimport classNames from 'classnames';\nimport { makeStyles, Tooltip } from '@material-ui/core';\nimport { InfoOutlined as InfoIcon } from '@material-ui/icons';\n\nimport { Switch, SwitchProps } from '../../../componentsV2/Switch';\n\nconst useStyles = makeStyles(({ palette, spacing }) => ({\n root: { marginBottom: spacing(0.75), width: 'fit-content' },\n title: { display: 'flex', alignItems: 'center' },\n infoIcon: {\n marginLeft: 4,\n color: palette.primary.text6,\n\n '&:hover': {\n color: palette.primary.contrastText,\n },\n },\n}));\n\ntype MultipleAssetsToggleProps = {\n onLabel?: SwitchProps['onLabel'];\n offLabel?: SwitchProps['offLabel'];\n checked?: SwitchProps['checked'];\n disabled?: SwitchProps['disabled'];\n onChange?: SwitchProps['onChange'];\n size?: SwitchProps['size'];\n disableOffState?: SwitchProps['disableOffState'];\n inputRef?: SwitchProps['inputRef'];\n className?: SwitchProps['className'];\n testId?: SwitchProps['testId'];\n isChecked?: boolean;\n title?: ReactNode;\n};\n\nconst MultipleAssetsToggle: FC<MultipleAssetsToggleProps> = ({\n isChecked,\n title = 'Multiple Assets',\n className,\n ...props\n}) => {\n const styles = useStyles();\n\n return (\n <Switch\n className={classNames(styles.root, className)}\n size=\"small\"\n onLabel={\n <span className={styles.title}>\n {title}\n <Tooltip\n title=\"A separate app will be placed on the dashboard for each asset chosen\"\n placement=\"bottom-start\"\n >\n <InfoIcon fontSize=\"small\" className={styles.infoIcon} />\n </Tooltip>\n </span>\n }\n checked={isChecked}\n {...props}\n />\n );\n};\n\nexport default MultipleAssetsToggle;\n"],"names":["useStyles","makeStyles","_ref","palette","root","marginBottom","spacing","width","title","display","alignItems","infoIcon","marginLeft","color","primary","text6","contrastText","MultipleAssetsToggle","_ref2","isChecked","_ref2$title","className","props","_objectWithoutProperties","_excluded","styles","_jsx","Switch","_objectSpread","classNames","size","onLabel","_jsxs","children","Tooltip","placement","InfoIcon","fontSize","checked"],"mappings":"mnBAOA,IAAMA,EAAYC,GAAW,SAAAC,GAAA,IAAGC,IAAAA,QAAgB,MAAQ,CACtDC,KAAM,CAAEC,cAAcC,IADiBA,SACT,KAAOC,MAAO,eAC5CC,MAAO,CAAEC,QAAS,OAAQC,WAAY,UACtCC,SAAU,CACRC,WAAY,EACZC,MAAOV,EAAQW,QAAQC,MAEvB,UAAW,CACTF,MAAOV,EAAQW,QAAQE,eAG5B,IAiBKC,EAAsD,SAKtDC,GAAA,IAJJC,IAAAA,UAASC,EAAAF,EACTV,MAAAA,aAAQ,kBAAiBY,EACzBC,IAAAA,UACGC,EAAKC,EAAAL,EAAAM,GAEFC,EAASzB,IAEf,OACE0B,EAACC,iWAAMC,CAAA,CACLP,UAAWQ,EAAWJ,EAAOrB,KAAMiB,GACnCS,KAAK,QACLC,QACEC,EAAA,OAAA,CAAMX,UAAWI,EAAOjB,MAAMyB,SAC3BzB,CAAAA,EACDkB,EAACQ,EAAO,CACN1B,MAAM,uEACN2B,UAAU,eAAcF,SAExBP,EAACU,EAAQ,CAACC,SAAS,QAAQhB,UAAWI,EAAOd,gBAInD2B,QAASnB,GACLG,GAGV"}
1
+ {"version":3,"file":"MultipleAssetsToggle.js","sources":["../../../../src/components/AssetEditorV2/components/MultipleAssetsToggle.tsx"],"sourcesContent":["import { FC, ReactNode } from 'react';\nimport classNames from 'classnames';\nimport { makeStyles, Tooltip } from '@material-ui/core';\nimport InfoIcon from '@material-ui/icons/InfoOutlined';\n\nimport { Switch, SwitchProps } from '../../../componentsV2/Switch';\n\nconst useStyles = makeStyles(({ palette, spacing }) => ({\n root: { marginBottom: spacing(0.75), width: 'fit-content' },\n title: { display: 'flex', alignItems: 'center' },\n infoIcon: {\n marginLeft: 4,\n color: palette.primary.text6,\n\n '&:hover': {\n color: palette.primary.contrastText,\n },\n },\n}));\n\ntype MultipleAssetsToggleProps = {\n onLabel?: SwitchProps['onLabel'];\n offLabel?: SwitchProps['offLabel'];\n checked?: SwitchProps['checked'];\n disabled?: SwitchProps['disabled'];\n onChange?: SwitchProps['onChange'];\n size?: SwitchProps['size'];\n disableOffState?: SwitchProps['disableOffState'];\n inputRef?: SwitchProps['inputRef'];\n className?: SwitchProps['className'];\n testId?: SwitchProps['testId'];\n isChecked?: boolean;\n title?: ReactNode;\n};\n\nconst MultipleAssetsToggle: FC<MultipleAssetsToggleProps> = ({\n isChecked,\n title = 'Multiple Assets',\n className,\n ...props\n}) => {\n const styles = useStyles();\n\n return (\n <Switch\n className={classNames(styles.root, className)}\n size=\"small\"\n onLabel={\n <span className={styles.title}>\n {title}\n <Tooltip\n title=\"A separate app will be placed on the dashboard for each asset chosen\"\n placement=\"bottom-start\"\n >\n <InfoIcon fontSize=\"small\" className={styles.infoIcon} />\n </Tooltip>\n </span>\n }\n checked={isChecked}\n {...props}\n />\n );\n};\n\nexport default MultipleAssetsToggle;\n"],"names":["useStyles","makeStyles","_ref","palette","root","marginBottom","spacing","width","title","display","alignItems","infoIcon","marginLeft","color","primary","text6","contrastText","MultipleAssetsToggle","_ref2","isChecked","_ref2$title","className","props","_objectWithoutProperties","_excluded","styles","_jsx","Switch","_objectSpread","classNames","size","onLabel","_jsxs","children","Tooltip","placement","InfoIcon","fontSize","checked"],"mappings":"gnBAOA,IAAMA,EAAYC,GAAW,SAAAC,GAAA,IAAGC,IAAAA,QAAgB,MAAQ,CACtDC,KAAM,CAAEC,cAAcC,IADiBA,SACT,KAAOC,MAAO,eAC5CC,MAAO,CAAEC,QAAS,OAAQC,WAAY,UACtCC,SAAU,CACRC,WAAY,EACZC,MAAOV,EAAQW,QAAQC,MAEvB,UAAW,CACTF,MAAOV,EAAQW,QAAQE,eAG5B,IAiBKC,EAAsD,SAKtDC,GAAA,IAJJC,IAAAA,UAASC,EAAAF,EACTV,MAAAA,aAAQ,kBAAiBY,EACzBC,IAAAA,UACGC,EAAKC,EAAAL,EAAAM,GAEFC,EAASzB,IAEf,OACE0B,EAACC,iWAAMC,CAAA,CACLP,UAAWQ,EAAWJ,EAAOrB,KAAMiB,GACnCS,KAAK,QACLC,QACEC,EAAA,OAAA,CAAMX,UAAWI,EAAOjB,MAAMyB,SAC3BzB,CAAAA,EACDkB,EAACQ,EAAO,CACN1B,MAAM,uEACN2B,UAAU,eAAcF,SAExBP,EAACU,EAAQ,CAACC,SAAS,QAAQhB,UAAWI,EAAOd,gBAInD2B,QAASnB,GACLG,GAGV"}
@@ -1 +1 @@
1
- {"version":3,"file":"SelectItem.d.ts","sourceRoot":"","sources":["../../../../src/components/AssetEditorV2/components/SelectItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,cAAc,EAAY,MAAM,OAAO,CAAC;AAS7D,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AA8CnC,QAAA,MAAM,UAAU;oBARE,MAAM;gBACV,MAAM;eACP,OAAO;eACP,OAAO;aACT,MAAM,GAAG,IAAI;YACd,OAAO;kDA0DhB,CAAC;eAEa,UAAU"}
1
+ {"version":3,"file":"SelectItem.d.ts","sourceRoot":"","sources":["../../../../src/components/AssetEditorV2/components/SelectItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,cAAc,EAAY,MAAM,OAAO,CAAC;AAO7D,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AA8CnC,QAAA,MAAM,UAAU;oBARE,MAAM;gBACV,MAAM;eACP,OAAO;eACP,OAAO;aACT,MAAM,GAAG,IAAI;YACd,OAAO;kDA0DhB,CAAC;eAEa,UAAU"}
@@ -1,2 +1,2 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import r from"@babel/runtime/helpers/objectWithoutProperties";import{forwardRef as i,useState as n}from"react";import o from"classnames";import{makeStyles as a,Chip as c,Tooltip as s,Checkbox as l}from"@material-ui/core";import{CheckBoxOutlineBlank as m,CheckBox as p}from"@material-ui/icons";import{ACTIVE_STATUS as d}from"../constants.js";import u from"../../MiddleTruncate/MiddleTruncate.js";import{jsxs as f,jsx as b}from"react/jsx-runtime";var h=["data-testid","value","className","assetName","status","multiple","selected"];function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function g(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?y(Object(i),!0).forEach((function(r){e(t,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):y(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var j=a({menuItem:{display:"flex",justifyContent:"space-between",width:"100%",height:36,paddingBottom:0,paddingTop:0},option:{display:"flex",alignItems:"center",justifyContent:"space-between"},itemContent:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between"},activeChip:{fontWeight:500,backgroundColor:"#75DB29",color:"#212121",fontSize:10,cursor:"pointer",height:12,textTransform:"uppercase",marginRight:12,letterSpacing:1}}),v=i((function(e,i){var a=e["data-testid"],y=void 0===a?"MenuItem":a,v=e.value,O=e.className,w=e.assetName,P=void 0===w?"":w,x=e.status,C=e.multiple,N=e.selected,T=r(e,h),I=n(null),S=t(I,2),D=S[0],k=S[1],z=!!D,M=j(),W=f("div",{className:M.itemContent,children:[b(u,{onTruncate:k,truncatedText:D,maxWidth:380,children:P}),x===d&&b(c,{"data-not-migrated-muichip":!0,className:M.activeChip,label:"Active"})]});return b(s,{title:z?P:"",children:C?f("div",{className:o(M.option),ref:i,children:[b(l,{disableRipple:!0,icon:b(m,{style:{fontSize:20}}),checkedIcon:b(p,{style:{fontSize:20}}),checked:N}),W]}):b("div",g(g({"data-testid":y,className:o(M.menuItem,O),ref:i,value:v},T),{},{children:W}))})}));export{v as default};
1
+ import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import r from"@babel/runtime/helpers/objectWithoutProperties";import{forwardRef as i,useState as o}from"react";import n from"classnames";import{makeStyles as a,Chip as c,Tooltip as s,Checkbox as l}from"@material-ui/core";import m from"@material-ui/icons/CheckBox";import p from"@material-ui/icons/CheckBoxOutlineBlank";import{ACTIVE_STATUS as u}from"../constants.js";import d from"../../MiddleTruncate/MiddleTruncate.js";import{jsxs as f,jsx as h}from"react/jsx-runtime";var b=["data-testid","value","className","assetName","status","multiple","selected"];function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function g(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?y(Object(i),!0).forEach((function(r){e(t,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):y(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var j=a({menuItem:{display:"flex",justifyContent:"space-between",width:"100%",height:36,paddingBottom:0,paddingTop:0},option:{display:"flex",alignItems:"center",justifyContent:"space-between"},itemContent:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between"},activeChip:{fontWeight:500,backgroundColor:"#75DB29",color:"#212121",fontSize:10,cursor:"pointer",height:12,textTransform:"uppercase",marginRight:12,letterSpacing:1}}),v=i((function(e,i){var a=e["data-testid"],y=void 0===a?"MenuItem":a,v=e.value,O=e.className,w=e.assetName,x=void 0===w?"":w,C=e.status,P=e.multiple,N=e.selected,k=r(e,b),T=o(null),I=t(T,2),S=I[0],B=I[1],D=!!S,z=j(),M=f("div",{className:z.itemContent,children:[h(d,{onTruncate:B,truncatedText:S,maxWidth:380,children:x}),C===u&&h(c,{"data-not-migrated-muichip":!0,className:z.activeChip,label:"Active"})]});return h(s,{title:D?x:"",children:P?f("div",{className:n(z.option),ref:i,children:[h(l,{disableRipple:!0,icon:h(p,{style:{fontSize:20}}),checkedIcon:h(m,{style:{fontSize:20}}),checked:N}),M]}):h("div",g(g({"data-testid":y,className:n(z.menuItem,O),ref:i,value:v},k),{},{children:M}))})}));export{v as default};
2
2
  //# sourceMappingURL=SelectItem.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SelectItem.js","sources":["../../../../src/components/AssetEditorV2/components/SelectItem.tsx"],"sourcesContent":["import { forwardRef, HTMLAttributes, useState } from 'react';\nimport classNames from 'classnames';\nimport { makeStyles, Chip, Tooltip, Checkbox } from '@material-ui/core';\nimport {\n CheckBox as CheckBoxIcon,\n CheckBoxOutlineBlank as CheckBoxOutlineBlankIcon,\n} from '@material-ui/icons';\n\nimport { ACTIVE_STATUS } from '../constants';\nimport { AssetId } from '../types';\n\nimport MiddleTruncate from '~/components/MiddleTruncate';\n\nconst useStyles = makeStyles({\n menuItem: {\n display: 'flex',\n justifyContent: 'space-between',\n width: '100%',\n height: 36,\n paddingBottom: 0,\n paddingTop: 0,\n },\n option: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n },\n itemContent: {\n width: '100%',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n },\n activeChip: {\n fontWeight: 500,\n backgroundColor: '#75DB29',\n color: '#212121',\n fontSize: 10,\n cursor: 'pointer',\n height: 12,\n textTransform: 'uppercase',\n marginRight: 12,\n letterSpacing: 1,\n },\n});\n\ntype Props = Omit<HTMLAttributes<HTMLDivElement>, 'children'> & {\n 'data-testid'?: string;\n assetName?: string;\n multiple?: boolean;\n selected?: boolean;\n status?: string | null;\n value?: AssetId;\n};\n\nconst SelectItem = forwardRef<HTMLDivElement, Props>(\n (\n {\n 'data-testid': pageName = 'MenuItem',\n value,\n className,\n assetName = '',\n status,\n multiple,\n selected,\n ...restProps\n },\n ref\n ) => {\n const [truncatedText, setTruncatedText] = useState<string | null>(null);\n const isTruncated = !!truncatedText;\n const styles = useStyles();\n\n const itemContent = (\n <div className={styles.itemContent}>\n <MiddleTruncate onTruncate={setTruncatedText} truncatedText={truncatedText} maxWidth={380}>\n {assetName}\n </MiddleTruncate>\n {status === ACTIVE_STATUS && (\n <Chip data-not-migrated-muichip className={styles.activeChip} label=\"Active\" />\n )}\n </div>\n );\n\n return (\n <Tooltip title={isTruncated ? assetName : ''}>\n {multiple ? (\n <div className={classNames(styles.option)} ref={ref}>\n <Checkbox\n disableRipple\n icon={<CheckBoxOutlineBlankIcon style={{ fontSize: 20 }} />}\n checkedIcon={<CheckBoxIcon style={{ fontSize: 20 }} />}\n checked={selected}\n />\n {itemContent}\n </div>\n ) : (\n <div\n data-testid={pageName}\n className={classNames(styles.menuItem, className)}\n ref={ref}\n {...{ value }}\n {...restProps}\n >\n {itemContent}\n </div>\n )}\n </Tooltip>\n );\n }\n);\n\nexport default SelectItem;\n"],"names":["useStyles","makeStyles","menuItem","display","justifyContent","width","height","paddingBottom","paddingTop","option","alignItems","itemContent","activeChip","fontWeight","backgroundColor","color","fontSize","cursor","textTransform","marginRight","letterSpacing","SelectItem","forwardRef","_ref","ref","_ref$dataTestid","pageName","value","className","_ref$assetName","assetName","status","multiple","selected","restProps","_objectWithoutProperties","_excluded","useState","_useState2","_slicedToArray","_useState","truncatedText","setTruncatedText","isTruncated","styles","_jsxs","children","_jsx","MiddleTruncate","onTruncate","maxWidth","ACTIVE_STATUS","Chip","label","Tooltip","title","classNames","Checkbox","disableRipple","icon","CheckBoxOutlineBlankIcon","style","checkedIcon","CheckBoxIcon","checked","_objectSpread"],"mappings":"0rCAaA,IAAMA,EAAYC,EAAW,CAC3BC,SAAU,CACRC,QAAS,OACTC,eAAgB,gBAChBC,MAAO,OACPC,OAAQ,GACRC,cAAe,EACfC,WAAY,GAEdC,OAAQ,CACNN,QAAS,OACTO,WAAY,SACZN,eAAgB,iBAElBO,YAAa,CACXN,MAAO,OACPF,QAAS,OACTO,WAAY,SACZN,eAAgB,iBAElBQ,WAAY,CACVC,WAAY,IACZC,gBAAiB,UACjBC,MAAO,UACPC,SAAU,GACVC,OAAQ,UACRX,OAAQ,GACRY,cAAe,YACfC,YAAa,GACbC,cAAe,KAabC,EAAaC,GACjB,SAAAC,EAWEC,GACG,IAAAC,EAAAF,EAVD,eAAeG,aAAW,WAAUD,EACpCE,IAAAA,MACAC,IAAAA,UAASC,EAAAN,EACTO,UAAAA,aAAY,GAAED,EACdE,IAAAA,OACAC,IAAAA,SACAC,IAAAA,SACGC,EAASC,EAAAZ,EAAAa,GAI4BC,EAAAA,EAAwB,MAAKC,EAAAC,EAAAC,EAAA,GAAhEC,EAAaH,EAAA,GAAEI,EAAgBJ,EAAA,GAChCK,IAAgBF,EAChBG,EAAS5C,IAETW,EACJkC,EAAA,MAAA,CAAKjB,UAAWgB,EAAOjC,YAAYmC,SAAA,CACjCC,EAACC,EAAc,CAACC,WAAYP,EAAkBD,cAAeA,EAAeS,SAAU,IAAIJ,SACvFhB,IAEFC,IAAWoB,GACVJ,EAACK,EAAI,CAAC,6BAAyB,EAACxB,UAAWgB,EAAOhC,WAAYyC,MAAM,cAK1E,OACEN,EAACO,EAAO,CAACC,MAAOZ,EAAcb,EAAY,GAAGgB,SAC1Cd,EACCa,EAAA,MAAA,CAAKjB,UAAW4B,EAAWZ,EAAOnC,QAASe,IAAKA,EAAIsB,SAAA,CAClDC,EAACU,EAAQ,CACPC,eAAa,EACbC,KAAMZ,EAACa,EAAwB,CAACC,MAAO,CAAE7C,SAAU,MACnD8C,YAAaf,EAACgB,EAAY,CAACF,MAAO,CAAE7C,SAAU,MAC9CgD,QAAS/B,IAEVtB,KAGHoC,EAAA,MAAAkB,EAAAA,EAAA,CACE,cAAavC,EACbE,UAAW4B,EAAWZ,EAAO1C,SAAU0B,GACvCJ,IAAKA,EACCG,MAAAA,GACFO,GAAS,GAAA,CAAAY,SAEZnC,MAKX"}
1
+ {"version":3,"file":"SelectItem.js","sources":["../../../../src/components/AssetEditorV2/components/SelectItem.tsx"],"sourcesContent":["import { forwardRef, HTMLAttributes, useState } from 'react';\nimport classNames from 'classnames';\nimport { makeStyles, Chip, Tooltip, Checkbox } from '@material-ui/core';\nimport CheckBoxIcon from '@material-ui/icons/CheckBox';\nimport CheckBoxOutlineBlankIcon from '@material-ui/icons/CheckBoxOutlineBlank';\n\nimport { ACTIVE_STATUS } from '../constants';\nimport { AssetId } from '../types';\n\nimport MiddleTruncate from '~/components/MiddleTruncate';\n\nconst useStyles = makeStyles({\n menuItem: {\n display: 'flex',\n justifyContent: 'space-between',\n width: '100%',\n height: 36,\n paddingBottom: 0,\n paddingTop: 0,\n },\n option: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n },\n itemContent: {\n width: '100%',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n },\n activeChip: {\n fontWeight: 500,\n backgroundColor: '#75DB29',\n color: '#212121',\n fontSize: 10,\n cursor: 'pointer',\n height: 12,\n textTransform: 'uppercase',\n marginRight: 12,\n letterSpacing: 1,\n },\n});\n\ntype Props = Omit<HTMLAttributes<HTMLDivElement>, 'children'> & {\n 'data-testid'?: string;\n assetName?: string;\n multiple?: boolean;\n selected?: boolean;\n status?: string | null;\n value?: AssetId;\n};\n\nconst SelectItem = forwardRef<HTMLDivElement, Props>(\n (\n {\n 'data-testid': pageName = 'MenuItem',\n value,\n className,\n assetName = '',\n status,\n multiple,\n selected,\n ...restProps\n },\n ref\n ) => {\n const [truncatedText, setTruncatedText] = useState<string | null>(null);\n const isTruncated = !!truncatedText;\n const styles = useStyles();\n\n const itemContent = (\n <div className={styles.itemContent}>\n <MiddleTruncate onTruncate={setTruncatedText} truncatedText={truncatedText} maxWidth={380}>\n {assetName}\n </MiddleTruncate>\n {status === ACTIVE_STATUS && (\n <Chip data-not-migrated-muichip className={styles.activeChip} label=\"Active\" />\n )}\n </div>\n );\n\n return (\n <Tooltip title={isTruncated ? assetName : ''}>\n {multiple ? (\n <div className={classNames(styles.option)} ref={ref}>\n <Checkbox\n disableRipple\n icon={<CheckBoxOutlineBlankIcon style={{ fontSize: 20 }} />}\n checkedIcon={<CheckBoxIcon style={{ fontSize: 20 }} />}\n checked={selected}\n />\n {itemContent}\n </div>\n ) : (\n <div\n data-testid={pageName}\n className={classNames(styles.menuItem, className)}\n ref={ref}\n {...{ value }}\n {...restProps}\n >\n {itemContent}\n </div>\n )}\n </Tooltip>\n );\n }\n);\n\nexport default SelectItem;\n"],"names":["useStyles","makeStyles","menuItem","display","justifyContent","width","height","paddingBottom","paddingTop","option","alignItems","itemContent","activeChip","fontWeight","backgroundColor","color","fontSize","cursor","textTransform","marginRight","letterSpacing","SelectItem","forwardRef","_ref","ref","_ref$dataTestid","pageName","value","className","_ref$assetName","assetName","status","multiple","selected","restProps","_objectWithoutProperties","_excluded","useState","_useState2","_slicedToArray","_useState","truncatedText","setTruncatedText","isTruncated","styles","_jsxs","children","_jsx","MiddleTruncate","onTruncate","maxWidth","ACTIVE_STATUS","Chip","label","Tooltip","title","classNames","Checkbox","disableRipple","icon","CheckBoxOutlineBlankIcon","style","checkedIcon","CheckBoxIcon","checked","_objectSpread"],"mappings":"otCAWA,IAAMA,EAAYC,EAAW,CAC3BC,SAAU,CACRC,QAAS,OACTC,eAAgB,gBAChBC,MAAO,OACPC,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WZ,EAAO1C,SAAU0B,GACvCJ,IAAKA,EACCG,MAAAA,GACFO,GAAS,GAAA,CAAAY,SAEZnC,MAKX"}
@@ -1,2 +1,2 @@
1
- import t from"@babel/runtime/helpers/slicedToArray";import{memo as e,useState as r}from"react";import o from"prop-types";import{makeStyles as n,TextField as a,InputAdornment as i,Popover as c}from"@material-ui/core";import{Search as l}from"@material-ui/icons";import s from"./AutoCompleteAssetSearch/AutoCompleteAssetSearch.js";import{jsxs as p,Fragment as m,jsx as u}from"react/jsx-runtime";var f=n((function(t){return{searchInput:{fontSize:"16px",width:"270px","&:hover":{"&::before":{borderBottom:"2px solid ".concat(t.palette.primary.text1," !important")}},"&:hover $searchIcon":{fill:"".concat(t.palette.primary.text1," !important")}},searchIcon:{fill:"".concat(t.palette.primary.text6," !important"),fontSize:"24px !important"}}}));function h(e){var o=e.company,n=e.onClickAsset,h=f(),d=r(null),A=t(d,2),x=A[0],y=A[1],v=function(){y(null)};return p(m,{children:[u(a,{"data-testid":"".concat("AssetSearch","_search"),id:"well-section-search-textfield",placeholder:"Add to List by Well/Rig Search",InputProps:{startAdornment:u(i,{position:"start",children:u(l,{className:h.searchIcon})}),className:h.searchInput},onClick:function(t){y(t.currentTarget)}}),u(c,{open:Boolean(x),anchorEl:x,onClose:v,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},children:u(s,{company:o,onClickAsset:function(t){var e=t.name,r=t.redirectAssetId;r&&(n(r,e),v())},onClose:v})})]})}h.propTypes={company:o.number.isRequired,onClickAsset:o.func.isRequired};var d=e(h);export{d as default};
1
+ import t from"@babel/runtime/helpers/slicedToArray";import{memo as e,useState as r}from"react";import o from"prop-types";import{makeStyles as a,TextField as n,InputAdornment as i,Popover as c}from"@material-ui/core";import l from"@material-ui/icons/Search";import s from"./AutoCompleteAssetSearch/AutoCompleteAssetSearch.js";import{jsxs as p,Fragment as m,jsx as h}from"react/jsx-runtime";var u=a((function(t){return{searchInput:{fontSize:"16px",width:"270px","&:hover":{"&::before":{borderBottom:"2px solid ".concat(t.palette.primary.text1," !important")}},"&:hover $searchIcon":{fill:"".concat(t.palette.primary.text1," !important")}},searchIcon:{fill:"".concat(t.palette.primary.text6," !important"),fontSize:"24px !important"}}}));function f(e){var o=e.company,a=e.onClickAsset,f=u(),d=r(null),A=t(d,2),x=A[0],y=A[1],v=function(){y(null)};return p(m,{children:[h(n,{"data-testid":"".concat("AssetSearch","_search"),id:"well-section-search-textfield",placeholder:"Add to List by Well/Rig Search",InputProps:{startAdornment:h(i,{position:"start",children:h(l,{className:f.searchIcon})}),className:f.searchInput},onClick:function(t){y(t.currentTarget)}}),h(c,{open:Boolean(x),anchorEl:x,onClose:v,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},children:h(s,{company:o,onClickAsset:function(t){var e=t.name,r=t.redirectAssetId;r&&(a(r,e),v())},onClose:v})})]})}f.propTypes={company:o.number.isRequired,onClickAsset:o.func.isRequired};var d=e(f);export{d as default};
2
2
  //# sourceMappingURL=AssetSearch.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AssetSearch.js","sources":["../../../../../src/components/BICOffsetPickerDialog/components/WellSection/AssetSearch.js"],"sourcesContent":["import { memo, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { makeStyles, Popover, TextField, InputAdornment } from '@material-ui/core';\nimport { Search as SearchIcon } from '@material-ui/icons';\n\nimport AutoCompleteAssetSearch from './AutoCompleteAssetSearch';\n\nconst PAGE_NAME = 'AssetSearch';\n\nconst useStyles = makeStyles(theme => ({\n searchInput: {\n fontSize: '16px',\n width: '270px',\n '&:hover': {\n '&::before': { borderBottom: `2px solid ${theme.palette.primary.text1} !important` },\n },\n '&:hover $searchIcon': {\n fill: `${theme.palette.primary.text1} !important`,\n },\n },\n searchIcon: {\n fill: `${theme.palette.primary.text6} !important`,\n fontSize: '24px !important',\n },\n}));\n\nfunction AssetSearch({ company, onClickAsset }) {\n const classes = useStyles();\n const [anchorEl, setAnchorEl] = useState(null);\n\n const handlePopupOpen = event => {\n setAnchorEl(event.currentTarget);\n };\n\n const handlePopupClose = () => {\n setAnchorEl(null);\n };\n\n const handleClickAsset = asset => {\n const { name, redirectAssetId } = asset;\n if (redirectAssetId) {\n onClickAsset(redirectAssetId, name);\n handlePopupClose();\n }\n };\n\n return (\n <>\n <TextField\n data-testid={`${PAGE_NAME}_search`}\n id=\"well-section-search-textfield\"\n placeholder=\"Add to List by Well/Rig Search\"\n InputProps={{\n startAdornment: (\n <InputAdornment position=\"start\">\n <SearchIcon className={classes.searchIcon} />\n </InputAdornment>\n ),\n className: classes.searchInput,\n }}\n onClick={handlePopupOpen}\n />\n\n <Popover\n open={Boolean(anchorEl)}\n anchorEl={anchorEl}\n onClose={handlePopupClose}\n anchorOrigin={{\n vertical: 'top',\n horizontal: 'left',\n }}\n transformOrigin={{\n vertical: 'top',\n horizontal: 'left',\n }}\n >\n <AutoCompleteAssetSearch\n company={company}\n onClickAsset={handleClickAsset}\n onClose={handlePopupClose}\n />\n </Popover>\n </>\n );\n}\n\nAssetSearch.propTypes = {\n company: PropTypes.number.isRequired,\n onClickAsset: PropTypes.func.isRequired,\n};\n\n// Important: Do not change root component default export (AssetSearch.js). Use it as container\n// for your AssetSearch. It's required to make build and zip scripts work as expected;\nexport default memo(AssetSearch);\n"],"names":["useStyles","makeStyles","theme","searchInput","fontSize","width","borderBottom","palette","primary","text1","fill","searchIcon","concat","text6","AssetSearch","_ref","company","onClickAsset","classes","useState","_useState2","_slicedToArray","_useState","anchorEl","setAnchorEl","handlePopupClose","_jsxs","_Fragment","children","_jsx","TextField","id","placeholder","InputProps","startAdornment","InputAdornment","position","SearchIcon","className","onClick","event","currentTarget","Popover","open","Boolean","onClose","anchorOrigin","vertical","horizontal","transformOrigin","AutoCompleteAssetSearch","asset","name","redirectAssetId","propTypes","PropTypes","number","isRequired","func","memo"],"mappings":"wYAOA,IAEMA,EAAYC,GAAW,SAAAC,GAAK,MAAK,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ICOffsetPickerDialog/components/WellSection/AssetSearch.js"],"sourcesContent":["import { memo, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { makeStyles, Popover, TextField, InputAdornment } from '@material-ui/core';\nimport SearchIcon from '@material-ui/icons/Search';\n\nimport AutoCompleteAssetSearch from './AutoCompleteAssetSearch';\n\nconst PAGE_NAME = 'AssetSearch';\n\nconst useStyles = makeStyles(theme => ({\n searchInput: {\n fontSize: '16px',\n width: '270px',\n '&:hover': {\n '&::before': { borderBottom: `2px solid ${theme.palette.primary.text1} !important` },\n },\n '&:hover $searchIcon': {\n fill: `${theme.palette.primary.text1} !important`,\n },\n },\n searchIcon: {\n fill: `${theme.palette.primary.text6} !important`,\n fontSize: '24px !important',\n },\n}));\n\nfunction AssetSearch({ company, onClickAsset }) {\n const classes = useStyles();\n const [anchorEl, setAnchorEl] = useState(null);\n\n const handlePopupOpen = event => {\n setAnchorEl(event.currentTarget);\n };\n\n const handlePopupClose = () => {\n setAnchorEl(null);\n };\n\n const handleClickAsset = asset => {\n const { name, redirectAssetId } = asset;\n if (redirectAssetId) {\n onClickAsset(redirectAssetId, name);\n handlePopupClose();\n }\n };\n\n return (\n <>\n <TextField\n data-testid={`${PAGE_NAME}_search`}\n id=\"well-section-search-textfield\"\n placeholder=\"Add to List by Well/Rig Search\"\n InputProps={{\n startAdornment: (\n <InputAdornment position=\"start\">\n <SearchIcon className={classes.searchIcon} />\n </InputAdornment>\n ),\n className: classes.searchInput,\n }}\n onClick={handlePopupOpen}\n />\n\n <Popover\n open={Boolean(anchorEl)}\n anchorEl={anchorEl}\n onClose={handlePopupClose}\n anchorOrigin={{\n vertical: 'top',\n horizontal: 'left',\n }}\n transformOrigin={{\n vertical: 'top',\n horizontal: 'left',\n }}\n >\n <AutoCompleteAssetSearch\n company={company}\n onClickAsset={handleClickAsset}\n onClose={handlePopupClose}\n />\n </Popover>\n </>\n );\n}\n\nAssetSearch.propTypes = {\n company: PropTypes.number.isRequired,\n onClickAsset: PropTypes.func.isRequired,\n};\n\n// Important: Do not change root component default export (AssetSearch.js). Use it as container\n// for your AssetSearch. It's required to make build and zip scripts work as expected;\nexport default memo(AssetSearch);\n"],"names":["useStyles","makeStyles","theme","searchInput","fontSize","width","borderBottom","palette","primary","text1","fill","searchIcon","concat","text6","AssetSearch","_ref","company","onClickAsset","classes","useState","_useState2","_slicedToArray","_useState","anchorEl","setAnchorEl","handlePopupClose","_jsxs","_Fragment","children","_jsx","TextField","id","placeholder","InputProps","startAdornment","InputAdornment","position","SearchIcon","className","onClick","event","currentTarget","Popover","open","Boolean","onClose","anchorOrigin","vertical","horizontal","transformOrigin","AutoCompleteAssetSearch","asset","name","redirectAssetId","propTypes","PropTypes","number","isRequired","func","memo"],"mappings":"qYAOA,IAEMA,EAAYC,GAAW,SAAAC,GAAK,MAAK,CACrCC,YAAa,CACXC,SAAU,OACVC,MAAO,QACP,UAAW,CACT,YAAa,CAAEC,iCAA2BJ,EAAMK,QAAQC,QAAQC,MAAK,iBAEvE,sBAAuB,CACrBC,eAASR,EAAMK,QAAQC,QAAQC,MAAK,iBAGxCE,WAAY,CACVD,KAAI,GAAAE,OAAKV,EAAMK,QAAQC,QAAQK,MAAkB,eACjDT,SAAU,mBAEb,IAED,SAASU,EAAuCC,GAAA,IAAzBC,IAAAA,QAASC,IAAAA,aACxBC,EAAUlB,IACgBmB,EAAAA,EAAS,MAAKC,EAAAC,EAAAC,EAAA,GAAvCC,EAAQH,EAAA,GAAEI,EAAWJ,EAAA,GAMtBK,EAAmB,WACvBD,EAAY,OAWd,OACEE,EAAAC,EAAA,CAAAC,SAAA,CACEC,EAACC,EAAS,CACR,cAAA,GAAAlB,OA1CU,cA0CyB,WACnCmB,GAAG,gCACHC,YAAY,iCACZC,WAAY,CACVC,eACEL,EAACM,EAAc,CAACC,SAAS,QAAOR,SAC9BC,EAACQ,EAAU,CAACC,UAAWpB,EAAQP,eAGnC2B,UAAWpB,EAAQf,aAErBoC,QA9BkB,SAAAC,GACtBhB,EAAYgB,EAAMC,kBAgChBZ,EAACa,EAAO,CACNC,KAAMC,QAAQrB,GACdA,SAAUA,EACVsB,QAASpB,EACTqB,aAAc,CACZC,SAAU,MACVC,WAAY,QAEdC,gBAAiB,CACfF,SAAU,MACVC,WAAY,QACZpB,SAEFC,EAACqB,EAAuB,CACtBlC,QAASA,EACTC,aAxCiB,SAAAkC,GACvB,IAAQC,EAA0BD,EAA1BC,KAAMC,EAAoBF,EAApBE,gBACVA,IACFpC,EAAaoC,EAAiBD,GAC9B3B,MAqCIoB,QAASpB,QAKnB,CAEAX,EAAYwC,UAAY,CACtBtC,QAASuC,EAAUC,OAAOC,WAC1BxC,aAAcsC,EAAUG,KAAKD,YAK/B,IAAeE,EAAAA,EAAK7C"}
@@ -1,2 +1,2 @@
1
- import{memo as e}from"react";import{shape as t,bool as n,string as i,arrayOf as l,func as c}from"prop-types";import{makeStyles as o,useTheme as a,Tooltip as r,Checkbox as s}from"@material-ui/core";import{ExpandMore as d}from"@material-ui/icons";import m from"./NumberCircle.js";import{jsxs as p,jsx as h}from"react/jsx-runtime";var u=o({sectionContainer:{display:"flex",width:"100%",justifyContent:"space-between",marginRight:"4px",alignItems:"center"},itemLabel:{display:"flex",alignItems:"center","&:hover":{color:"#DADADA",cursor:"pointer"}},disabledItemLabel:{display:"flex",alignItems:"center","&:hover":{cursor:"pointer"}},itemLabelToggle:{},sectionName:{marginLeft:"6px",marginRight:"10px"},checkbox:{width:"11px",height:"11px"},sectionTitle:{display:"flex",alignItems:"center"},expandIcon:{fontSize:"14px",marginRight:"8px"}});function f(e){return(e.wells.filter((function(e){return e.checked}))||[]).length}function x(e){var t=f(e);return t===e.wells.length?"".concat(t):"".concat(t," of ").concat(e.wells.length," Selected")}function g(e){return e.wells.filter((function(e){return e.checked})).length>0}function b(e){return e.wells.filter((function(e){return e.checked})).length!==e.wells.length}function k(e){var t=e.section,n=e.disabled,i=void 0!==n&&n,l=e.onExpandCollapse,c=void 0===l?null:l,o=e.onSelectAll,k=void 0===o?null:o,v=e.onClearAll,C=void 0===v?null:v,w=u(),I=a(),N=function(e){e.stopPropagation(),!b(t)&&C&&C(t),b(t)&&k&&k(t)};return p("div",{"data-testid":"".concat("SectionItem","_section_").concat(t.name),className:w.sectionContainer,children:[p("div",{className:i?w.disabledItemLabel:w.itemLabel,onClick:function(){return c&&c(t)},children:[h(r,{title:"No Wells",placement:"right",children:p("div",{className:w.sectionTitle,children:[i&&h(d,{className:w.expandIcon}),p("span",{className:w.sectionName,children:[" ",t.name]})]})}),f(t)>0&&h(m,{"data-testid":"".concat("SectionItem","_wellsNumber"),bgColor:I.palette.primary.text9,textColor:"#fff",width:20+6*(x(t).length-2),children:x(t)})]}),g(t)?h(s,{"data-testid":"".concat("SectionItem","_checkbox"),className:w.checkbox,size:"small",checked:!0,indeterminate:b(t),color:"primary",onClick:N,disabled:i}):h(s,{"data-testid":"".concat("SectionItem","_checkbox"),className:w.checkbox,checked:!1,size:"small",color:"primary",onClick:N,indeterminate:!1,disabled:i})]})}k.propTypes={section:t({expanded:n,name:i,wells:l(t({}))}).isRequired,disabled:n,onExpandCollapse:c,onSelectAll:c,onClearAll:c};var v=e(k);export{v as default};
1
+ import{memo as e}from"react";import{shape as t,bool as n,string as i,arrayOf as l,func as o}from"prop-types";import{makeStyles as c,useTheme as a,Tooltip as r,Checkbox as s}from"@material-ui/core";import d from"@material-ui/icons/ExpandMore";import m from"./NumberCircle.js";import{jsxs as p,jsx as h}from"react/jsx-runtime";var u=c({sectionContainer:{display:"flex",width:"100%",justifyContent:"space-between",marginRight:"4px",alignItems:"center"},itemLabel:{display:"flex",alignItems:"center","&:hover":{color:"#DADADA",cursor:"pointer"}},disabledItemLabel:{display:"flex",alignItems:"center","&:hover":{cursor:"pointer"}},itemLabelToggle:{},sectionName:{marginLeft:"6px",marginRight:"10px"},checkbox:{width:"11px",height:"11px"},sectionTitle:{display:"flex",alignItems:"center"},expandIcon:{fontSize:"14px",marginRight:"8px"}});function f(e){return(e.wells.filter((function(e){return e.checked}))||[]).length}function x(e){var t=f(e);return t===e.wells.length?"".concat(t):"".concat(t," of ").concat(e.wells.length," Selected")}function g(e){return e.wells.filter((function(e){return e.checked})).length>0}function b(e){return e.wells.filter((function(e){return e.checked})).length!==e.wells.length}function k(e){var t=e.section,n=e.disabled,i=void 0!==n&&n,l=e.onExpandCollapse,o=void 0===l?null:l,c=e.onSelectAll,k=void 0===c?null:c,v=e.onClearAll,C=void 0===v?null:v,w=u(),I=a(),N=function(e){e.stopPropagation(),!b(t)&&C&&C(t),b(t)&&k&&k(t)};return p("div",{"data-testid":"".concat("SectionItem","_section_").concat(t.name),className:w.sectionContainer,children:[p("div",{className:i?w.disabledItemLabel:w.itemLabel,onClick:function(){return o&&o(t)},children:[h(r,{title:"No Wells",placement:"right",children:p("div",{className:w.sectionTitle,children:[i&&h(d,{className:w.expandIcon}),p("span",{className:w.sectionName,children:[" ",t.name]})]})}),f(t)>0&&h(m,{"data-testid":"".concat("SectionItem","_wellsNumber"),bgColor:I.palette.primary.text9,textColor:"#fff",width:20+6*(x(t).length-2),children:x(t)})]}),g(t)?h(s,{"data-testid":"".concat("SectionItem","_checkbox"),className:w.checkbox,size:"small",checked:!0,indeterminate:b(t),color:"primary",onClick:N,disabled:i}):h(s,{"data-testid":"".concat("SectionItem","_checkbox"),className:w.checkbox,checked:!1,size:"small",color:"primary",onClick:N,indeterminate:!1,disabled:i})]})}k.propTypes={section:t({expanded:n,name:i,wells:l(t({}))}).isRequired,disabled:n,onExpandCollapse:o,onSelectAll:o,onClearAll:o};var v=e(k);export{v as default};
2
2
  //# sourceMappingURL=SectionItem.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SectionItem.js","sources":["../../../../../src/components/BICOffsetPickerDialog/components/WellSection/SectionItem.js"],"sourcesContent":["import { memo } from 'react';\nimport { shape, arrayOf, func, bool, string } from 'prop-types';\nimport { makeStyles, Checkbox, Tooltip, useTheme } from '@material-ui/core';\nimport { ExpandMore } from '@material-ui/icons';\n\nimport NumberCircle from './NumberCircle';\n\nconst PAGE_NAME = 'SectionItem';\n\nconst useStyles = makeStyles({\n sectionContainer: {\n display: 'flex',\n width: '100%',\n justifyContent: 'space-between',\n marginRight: '4px',\n alignItems: 'center',\n },\n itemLabel: {\n display: 'flex',\n alignItems: 'center',\n '&:hover': {\n color: '#DADADA',\n cursor: 'pointer',\n },\n },\n disabledItemLabel: {\n display: 'flex',\n alignItems: 'center',\n '&:hover': {\n cursor: 'pointer',\n },\n },\n itemLabelToggle: {},\n sectionName: {\n marginLeft: '6px',\n marginRight: '10px',\n },\n checkbox: {\n width: '11px',\n height: '11px',\n },\n sectionTitle: {\n display: 'flex',\n alignItems: 'center',\n },\n expandIcon: {\n fontSize: '14px',\n marginRight: '8px',\n },\n});\n\nfunction getSelectedCount(section) {\n const data = section.wells.filter(item => item.checked) || [];\n return data.length;\n}\n\nfunction getSelectedNumber(section) {\n const selectedCount = getSelectedCount(section);\n return selectedCount === section.wells.length\n ? `${selectedCount}`\n : `${selectedCount} of ${section.wells.length} Selected`;\n}\n\nfunction isSelected(section) {\n return section.wells.filter(item => item.checked).length > 0;\n}\n\nfunction isAllSelected(section) {\n return section.wells.filter(item => item.checked).length !== section.wells.length;\n}\n\nfunction SectionItem({\n section,\n disabled = false,\n onExpandCollapse = null,\n onSelectAll = null,\n onClearAll = null,\n}) {\n const classes = useStyles();\n const theme = useTheme();\n const handleClick = e => {\n e.stopPropagation();\n if (!isAllSelected(section) && onClearAll) onClearAll(section);\n if (isAllSelected(section) && onSelectAll) onSelectAll(section);\n };\n return (\n <div data-testid={`${PAGE_NAME}_section_${section.name}`} className={classes.sectionContainer}>\n <div\n className={disabled ? classes.disabledItemLabel : classes.itemLabel}\n onClick={() => onExpandCollapse && onExpandCollapse(section)}\n >\n <Tooltip title=\"No Wells\" placement=\"right\">\n <div className={classes.sectionTitle}>\n {disabled && <ExpandMore className={classes.expandIcon} />}\n <span className={classes.sectionName}> {section.name}</span>\n </div>\n </Tooltip>\n {getSelectedCount(section) > 0 && (\n <NumberCircle\n data-testid={`${PAGE_NAME}_wellsNumber`}\n bgColor={theme.palette.primary.text9}\n textColor=\"#fff\"\n width={20 + (getSelectedNumber(section).length - 2) * 6}\n >\n {getSelectedNumber(section)}\n </NumberCircle>\n )}\n </div>\n\n {isSelected(section) ? (\n <Checkbox\n data-testid={`${PAGE_NAME}_checkbox`}\n className={classes.checkbox}\n size=\"small\"\n checked\n indeterminate={isAllSelected(section)}\n color=\"primary\"\n onClick={handleClick}\n disabled={disabled}\n />\n ) : (\n <Checkbox\n data-testid={`${PAGE_NAME}_checkbox`}\n className={classes.checkbox}\n checked={false}\n size=\"small\"\n color=\"primary\"\n onClick={handleClick}\n indeterminate={false}\n disabled={disabled}\n />\n )}\n </div>\n );\n}\n\nSectionItem.propTypes = {\n section: shape({\n expanded: bool,\n name: string,\n wells: arrayOf(shape({})),\n }).isRequired,\n disabled: bool,\n onExpandCollapse: func,\n onSelectAll: func,\n onClearAll: func,\n};\n\n// Important: Do not change root component default export (SectionItem.js). Use it as container\n// for your SectionItem. It's required to make build and zip scripts work as expected;\nexport default memo(SectionItem);\n"],"names":["useStyles","makeStyles","sectionContainer","display","width","justifyContent","marginRight","alignItems","itemLabel","color","cursor","disabledItemLabel","itemLabelToggle","sectionName","marginLeft","checkbox","height","sectionTitle","expandIcon","fontSize","getSelectedCount","section","wells","filter","item","checked","length","getSelectedNumber","selectedCount","concat","isSelected","isAllSelected","SectionItem","_ref","_ref$disabled","disabled","_ref$onExpandCollapse","onExpandCollapse","_ref$onSelectAll","onSelectAll","_ref$onClearAll","onClearAll","classes","theme","useTheme","handleClick","e","stopPropagation","_jsxs","name","className","children","onClick","_jsx","Tooltip","title","placement","ExpandMore","NumberCircle","bgColor","palette","primary","text9","textColor","Checkbox","size","indeterminate","propTypes","shape","expanded","bool","string","arrayOf","isRequired","func","memo"],"mappings":"wUAOA,IAEMA,EAAYC,EAAW,CAC3BC,iBAAkB,CAChBC,QAAS,OACTC,MAAO,OACPC,eA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AAeC,EAAAA,EAAK3C"}
1
+ {"version":3,"file":"SectionItem.js","sources":["../../../../../src/components/BICOffsetPickerDialog/components/WellSection/SectionItem.js"],"sourcesContent":["import { memo } from 'react';\nimport { shape, arrayOf, func, bool, string } from 'prop-types';\nimport { makeStyles, Checkbox, Tooltip, useTheme } from '@material-ui/core';\nimport ExpandMore from '@material-ui/icons/ExpandMore';\n\nimport NumberCircle from './NumberCircle';\n\nconst PAGE_NAME = 'SectionItem';\n\nconst useStyles = makeStyles({\n sectionContainer: {\n display: 'flex',\n width: '100%',\n justifyContent: 'space-between',\n marginRight: '4px',\n alignItems: 'center',\n },\n itemLabel: {\n display: 'flex',\n alignItems: 'center',\n '&:hover': {\n color: '#DADADA',\n cursor: 'pointer',\n },\n },\n disabledItemLabel: {\n display: 'flex',\n alignItems: 'center',\n '&:hover': {\n cursor: 'pointer',\n },\n },\n itemLabelToggle: {},\n sectionName: {\n marginLeft: '6px',\n marginRight: '10px',\n },\n checkbox: {\n width: '11px',\n height: '11px',\n },\n sectionTitle: {\n display: 'flex',\n alignItems: 'center',\n },\n expandIcon: {\n fontSize: '14px',\n marginRight: '8px',\n },\n});\n\nfunction getSelectedCount(section) {\n const data = section.wells.filter(item => item.checked) || [];\n return data.length;\n}\n\nfunction getSelectedNumber(section) {\n const selectedCount = getSelectedCount(section);\n return selectedCount === section.wells.length\n ? `${selectedCount}`\n : `${selectedCount} of ${section.wells.length} Selected`;\n}\n\nfunction isSelected(section) {\n return section.wells.filter(item => item.checked).length > 0;\n}\n\nfunction isAllSelected(section) {\n return section.wells.filter(item => item.checked).length !== section.wells.length;\n}\n\nfunction SectionItem({\n section,\n disabled = false,\n onExpandCollapse = null,\n onSelectAll = null,\n onClearAll = null,\n}) {\n const classes = useStyles();\n const theme = useTheme();\n const handleClick = e => {\n e.stopPropagation();\n if (!isAllSelected(section) && onClearAll) onClearAll(section);\n if (isAllSelected(section) && onSelectAll) onSelectAll(section);\n };\n return (\n <div data-testid={`${PAGE_NAME}_section_${section.name}`} className={classes.sectionContainer}>\n <div\n className={disabled ? classes.disabledItemLabel : classes.itemLabel}\n onClick={() => onExpandCollapse && onExpandCollapse(section)}\n >\n <Tooltip title=\"No Wells\" placement=\"right\">\n <div className={classes.sectionTitle}>\n {disabled && <ExpandMore className={classes.expandIcon} />}\n <span className={classes.sectionName}> {section.name}</span>\n </div>\n </Tooltip>\n {getSelectedCount(section) > 0 && (\n <NumberCircle\n data-testid={`${PAGE_NAME}_wellsNumber`}\n bgColor={theme.palette.primary.text9}\n textColor=\"#fff\"\n width={20 + (getSelectedNumber(section).length - 2) * 6}\n >\n {getSelectedNumber(section)}\n </NumberCircle>\n )}\n </div>\n\n {isSelected(section) ? (\n <Checkbox\n data-testid={`${PAGE_NAME}_checkbox`}\n className={classes.checkbox}\n size=\"small\"\n checked\n indeterminate={isAllSelected(section)}\n color=\"primary\"\n onClick={handleClick}\n disabled={disabled}\n />\n ) : (\n <Checkbox\n data-testid={`${PAGE_NAME}_checkbox`}\n className={classes.checkbox}\n checked={false}\n size=\"small\"\n color=\"primary\"\n onClick={handleClick}\n indeterminate={false}\n disabled={disabled}\n />\n )}\n </div>\n );\n}\n\nSectionItem.propTypes = {\n section: shape({\n expanded: bool,\n name: string,\n wells: arrayOf(shape({})),\n }).isRequired,\n disabled: bool,\n onExpandCollapse: func,\n onSelectAll: func,\n onClearAll: func,\n};\n\n// Important: Do not change root component default export (SectionItem.js). Use it as container\n// for your SectionItem. It's required to make build and zip scripts work as expected;\nexport default memo(SectionItem);\n"],"names":["useStyles","makeStyles","sectionContainer","display","width","justifyContent","marginRight","alignItems","itemLabel","color","cursor","disabledItemLabel","itemLabelToggle","sectionName","marginLeft","checkbox","height","sectionTitle","expandIcon","fontSize","getSelectedCount","section","wells","filter","item","checked","length","getSelectedNumber","selectedCount","concat","isSelected","isAllSelected","SectionItem","_ref","_ref$disabled","disabled","_ref$onExpandCollapse","onExpandCollapse","_ref$onSelectAll","onSelectAll","_ref$onClearAll","onClearAll","classes","theme","useTheme","handleClick","e","stopPropagation","_jsxs","name","className","children","onClick","_jsx","Tooltip","title","placement","ExpandMore","NumberCircle","bgColor","palette","primary","text9","textColor","Checkbox","size","indeterminate","propTypes","shape","expanded","bool","string","arrayOf","isRequired","func","memo"],"mappings":"qUAOA,IAEMA,EAAYC,EAAW,CAC3BC,iBAAkB,CAChBC,QAAS,OACTC,MAAO,OACPC,eAAgB,gBAChBC,YAAa,MACbC,WAAY,UAEdC,UAAW,CACTL,QAAS,OACTI,WAAY,SACZ,UAAW,CACTE,MAAO,UACPC,OAAQ,YAGZC,kBAAmB,CACjBR,QAAS,OACTI,WAAY,SACZ,UAAW,CACTG,OAAQ,YAGZE,gBAAiB,CAAE,EACnBC,YAAa,CACXC,WAAY,MACZR,YAAa,QAEfS,SAAU,CACRX,MAAO,OACPY,OAAQ,QAEVC,aAAc,CACZd,QAAS,OACTI,WAAY,UAEdW,WAAY,CACVC,SAAU,OACVb,YAAa,SAIjB,SAASc,EAAiBC,GAExB,OADaA,EAAQC,MAAMC,QAAO,SAAAC,GAAI,OAAIA,EAAKC,OAAO,KAAK,IAC/CC,MACd,CAEA,SAASC,EAAkBN,GACzB,IAAMO,EAAgBR,EAAiBC,GACvC,OAAOO,IAAkBP,EAAQC,MAAMI,OAAM,GAAAG,OACtCD,GAAa,GAAAC,OACbD,EAAoBP,QAAAA,OAAAA,EAAQC,MAAMI,OAAiB,YAC5D,CAEA,SAASI,EAAWT,GAClB,OAAOA,EAAQC,MAAMC,QAAO,SAAAC,GAAI,OAAIA,EAAKC,WAASC,OAAS,CAC7D,CAEA,SAASK,EAAcV,GACrB,OAAOA,EAAQC,MAAMC,QAAO,SAAAC,GAAI,OAAIA,EAAKC,OAAO,IAAEC,SAAWL,EAAQC,MAAMI,MAC7E,CAEA,SAASM,EAMNC,GAAA,IALDZ,IAAAA,QAAOa,EAAAD,EACPE,SAAAA,cAAgBD,EAAAE,EAAAH,EAChBI,iBAAAA,aAAmB,KAAID,EAAAE,EAAA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ACLxD,MAAM,UACN2C,QAASP,EACTqB,eAAe,EACf/B,SAAUA,MAKpB,CAEAH,EAAYmC,UAAY,CACtB9C,QAAS+C,EAAM,CACbC,SAAUC,EACVrB,KAAMsB,EACNjD,MAAOkD,EAAQJ,EAAM,CAAA,MACpBK,WACHtC,SAAUmC,EACVjC,iBAAkBqC,EAClBnC,YAAamC,EACbjC,WAAYiC,GAKd,IAAeC,EAAAA,EAAK3C"}
@@ -1,2 +1,2 @@
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};
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 f from"@material-ui/icons/ExpandMore";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":"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,O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AAUb,EAAQa,SAClBuB,SAAU,WAAA,OAAMxB,EAA4BZ,EAAS,EAAAoB,SAAA,CAErDC,EAACgB,EAAgB,CAACC,WAAYjB,EAACkB,EAAc,IAACC,MAAO,CAAEjF,MAAO,QAAS6D,SACrEC,EAACY,EAAW,CACVjC,QAASA,EACTyC,iBAAkB7B,EAClB8B,YAAa1B,EACb2B,WAAY1B,MAGhBI,EAACuB,EAAgB,CAAAxB,SACfC,EAACwB,EAAI,CAACC,OAAK,EAAC3B,UAAWzB,EAAQhB,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/ExpandMore';\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":"0iGAmBA,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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