@corva/ui 3.77.0-1 → 3.77.0-11

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 (821) hide show
  1. package/README.md +2 -2
  2. package/cjs-bundle/clients/jsonApi/index.js +1 -1
  3. package/cjs-bundle/clients/jsonApi/index.js.map +1 -1
  4. package/cjs-bundle/components/AddComment/Popover.js +1 -1
  5. package/cjs-bundle/components/AddComment/Popover.js.map +1 -1
  6. package/cjs-bundle/components/AddComment/components/Content.js +1 -1
  7. package/cjs-bundle/components/AddComment/components/Content.js.map +1 -1
  8. package/cjs-bundle/components/Annotations/components/AnnotationsList/components/AddAnnotationForm/index.js +1 -1
  9. package/cjs-bundle/components/Annotations/components/AnnotationsList/components/AddAnnotationForm/index.js.map +1 -1
  10. package/cjs-bundle/components/Annotations/components/AnnotationsList/index.js +1 -1
  11. package/cjs-bundle/components/Annotations/components/AnnotationsList/index.js.map +1 -1
  12. package/cjs-bundle/components/AssetsMultipleSelector/AssetsMultipleSelector.js +1 -1
  13. package/cjs-bundle/components/AssetsMultipleSelector/AssetsMultipleSelector.js.map +1 -1
  14. package/cjs-bundle/components/AttachFileButton/AttachFileButton.js +1 -1
  15. package/cjs-bundle/components/AttachFileButton/AttachFileButton.js.map +1 -1
  16. package/cjs-bundle/components/Attachment/index.js +1 -1
  17. package/cjs-bundle/components/Attachment/index.js.map +1 -1
  18. package/cjs-bundle/components/BICOffsetPickerDialog/components/Map/Map.js +1 -1
  19. package/cjs-bundle/components/BICOffsetPickerDialog/components/Map/Map.js.map +1 -1
  20. package/cjs-bundle/components/BICOffsetPickerDialog/components/WellSection/index.js +1 -1
  21. package/cjs-bundle/components/BICOffsetPickerDialog/components/WellSection/index.js.map +1 -1
  22. package/cjs-bundle/components/BICOffsetPickerDialog/index.js +1 -1
  23. package/cjs-bundle/components/BICOffsetPickerDialog/index.js.map +1 -1
  24. package/cjs-bundle/components/Casing/CasingTableV2/components/CasingJoints/Editor.js +1 -1
  25. package/cjs-bundle/components/Casing/CasingTableV2/components/CasingJoints/Editor.js.map +1 -1
  26. package/cjs-bundle/components/Casing/CasingTableV2/components/Component.js +1 -1
  27. package/cjs-bundle/components/Casing/CasingTableV2/components/Component.js.map +1 -1
  28. package/cjs-bundle/components/Casing/CasingTableV2/components/DrillPipe/Editor.js +1 -1
  29. package/cjs-bundle/components/Casing/CasingTableV2/components/DrillPipe/Editor.js.map +1 -1
  30. package/cjs-bundle/components/CollapsableSidebar.js +1 -1
  31. package/cjs-bundle/components/CollapsableSidebar.js.map +1 -1
  32. package/cjs-bundle/components/CommentCard/CommentCard.js +1 -1
  33. package/cjs-bundle/components/CommentCard/CommentCard.js.map +1 -1
  34. package/cjs-bundle/components/CommentCard/CommentCard.scss.js +1 -1
  35. package/cjs-bundle/components/CommentComposer/CommentComposer.js +1 -1
  36. package/cjs-bundle/components/CommentComposer/CommentComposer.js.map +1 -1
  37. package/cjs-bundle/components/CommentComposer/useAttachmentUpload.js +1 -1
  38. package/cjs-bundle/components/CommentComposer/useAttachmentUpload.js.map +1 -1
  39. package/cjs-bundle/components/DevCenter/AppsDataProvider/effects/utils.js +1 -1
  40. package/cjs-bundle/components/DevCenter/AppsDataProvider/effects/utils.js.map +1 -1
  41. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js +1 -1
  42. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js.map +1 -1
  43. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js +1 -1
  44. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js.map +1 -1
  45. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.js +1 -1
  46. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.js.map +1 -1
  47. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/LegacyAppActions.js +1 -1
  48. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/LegacyAppActions.js.map +1 -1
  49. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus.js +1 -1
  50. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus.js.map +1 -1
  51. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/PriorityMenus.js +1 -1
  52. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/PriorityMenus.js.map +1 -1
  53. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/effects/useAppMaximized.js +1 -1
  54. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/effects/useAppMaximized.js.map +1 -1
  55. package/cjs-bundle/components/DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js +1 -1
  56. package/cjs-bundle/components/DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js.map +1 -1
  57. package/cjs-bundle/components/DevCenter/IsolatedDevCenterAppContainer/IsolatedPage.js +1 -1
  58. package/cjs-bundle/components/DevCenter/IsolatedDevCenterAppContainer/IsolatedPage.js.map +1 -1
  59. package/cjs-bundle/components/DevCenter/IsolatedDevCenterAppContainer/effects/useXProps.js.map +1 -1
  60. package/cjs-bundle/components/DocumentViewer/DocumentViewer.js +1 -1
  61. package/cjs-bundle/components/DocumentViewer/DocumentViewer.js.map +1 -1
  62. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js +1 -1
  63. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js.map +1 -1
  64. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js +1 -1
  65. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js.map +1 -1
  66. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Component.js +1 -1
  67. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Component.js.map +1 -1
  68. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js +1 -1
  69. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js.map +1 -1
  70. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js +1 -1
  71. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js.map +1 -1
  72. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js +1 -1
  73. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js.map +1 -1
  74. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js +1 -1
  75. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js.map +1 -1
  76. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js +1 -1
  77. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js.map +1 -1
  78. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js +1 -1
  79. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js.map +1 -1
  80. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js +1 -1
  81. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js.map +1 -1
  82. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js +1 -1
  83. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js.map +1 -1
  84. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js +1 -1
  85. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js.map +1 -1
  86. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js +1 -1
  87. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js.map +1 -1
  88. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js +1 -1
  89. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js.map +1 -1
  90. package/cjs-bundle/components/EmbeddedApp/EmbeddedApp.js +1 -1
  91. package/cjs-bundle/components/EmbeddedApp/EmbeddedApp.js.map +1 -1
  92. package/cjs-bundle/components/FeedItem/FeedItem.js +1 -1
  93. package/cjs-bundle/components/FeedItem/FeedItem.js.map +1 -1
  94. package/cjs-bundle/components/FeedItem/FeedItemEditProvider/FeedItemEditProvider.js +1 -1
  95. package/cjs-bundle/components/FeedItem/FeedItemEditProvider/FeedItemEditProvider.js.map +1 -1
  96. package/cjs-bundle/components/FeedItem/components/Content.js +1 -1
  97. package/cjs-bundle/components/FeedItem/components/Content.js.map +1 -1
  98. package/cjs-bundle/components/FeedItem/feedItemTypes/AppAnnotationFeedItem/index.js +1 -1
  99. package/cjs-bundle/components/FeedItem/feedItemTypes/AppAnnotationFeedItem/index.js.map +1 -1
  100. package/cjs-bundle/components/FeedItem/feedItemTypes/WellPlanFeedItem/index.js +1 -1
  101. package/cjs-bundle/components/FeedItem/feedItemTypes/WellPlanFeedItem/index.js.map +1 -1
  102. package/cjs-bundle/components/FilesLoaderV2/utils.js +1 -1
  103. package/cjs-bundle/components/FilesLoaderV2/utils.js.map +1 -1
  104. package/cjs-bundle/components/GradientManager/GradientManager.js +1 -1
  105. package/cjs-bundle/components/GradientManager/GradientManager.js.map +1 -1
  106. package/cjs-bundle/components/GradientManager/GradientSelect.js +1 -1
  107. package/cjs-bundle/components/GradientManager/GradientSelect.js.map +1 -1
  108. package/cjs-bundle/components/InfiniteList/index.js +1 -1
  109. package/cjs-bundle/components/InfiniteList/index.js.map +1 -1
  110. package/cjs-bundle/components/OffsetWellMap/OffsetWellMap.js +1 -1
  111. package/cjs-bundle/components/OffsetWellMap/OffsetWellMap.js.map +1 -1
  112. package/cjs-bundle/components/OffsetWellPickerV2/OffsetWellPickerDialog.js +1 -1
  113. package/cjs-bundle/components/OffsetWellPickerV2/OffsetWellPickerDialog.js.map +1 -1
  114. package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js +1 -1
  115. package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js.map +1 -1
  116. package/cjs-bundle/components/OffsetWellPickerV2/components/Map/Map.js +1 -1
  117. package/cjs-bundle/components/OffsetWellPickerV2/components/Map/Map.js.map +1 -1
  118. package/cjs-bundle/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js +1 -1
  119. package/cjs-bundle/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js.map +1 -1
  120. package/cjs-bundle/components/OffsetWellPickerV2/constants.js +1 -1
  121. package/cjs-bundle/components/OffsetWellPickerV2/constants.js.map +1 -1
  122. package/cjs-bundle/components/OffsetWellPickerV2/effects/index.js +1 -1
  123. package/cjs-bundle/components/OffsetWellPickerV2/effects/index.js.map +1 -1
  124. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Map/Map.js +1 -1
  125. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Map/Map.js.map +1 -1
  126. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js +1 -1
  127. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js.map +1 -1
  128. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/constants.js +1 -1
  129. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/constants.js.map +1 -1
  130. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/effects/index.js +1 -1
  131. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/effects/index.js.map +1 -1
  132. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/index.js +1 -1
  133. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/index.js.map +1 -1
  134. package/cjs-bundle/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js +1 -1
  135. package/cjs-bundle/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js.map +1 -1
  136. package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js +1 -1
  137. package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js.map +1 -1
  138. package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/index.js +1 -1
  139. package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/index.js.map +1 -1
  140. package/cjs-bundle/components/OffsetWellPickerV3/components/WellHubView/index.js +1 -1
  141. package/cjs-bundle/components/OffsetWellPickerV3/components/WellHubView/index.js.map +1 -1
  142. package/cjs-bundle/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js +1 -1
  143. package/cjs-bundle/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js.map +1 -1
  144. package/cjs-bundle/components/OffsetWellPickerV3/index.js +1 -1
  145. package/cjs-bundle/components/OffsetWellPickerV3/index.js.map +1 -1
  146. package/cjs-bundle/components/OffsetWellPickerV5/OffsetWellPickerV5.js +1 -1
  147. package/cjs-bundle/components/OffsetWellPickerV5/OffsetWellPickerV5.js.map +1 -1
  148. package/cjs-bundle/components/OffsetWellPickerV5/api/metrics/fetchMetricsAggregate.js +1 -1
  149. package/cjs-bundle/components/OffsetWellPickerV5/api/metrics/fetchMetricsAggregate.js.map +1 -1
  150. package/cjs-bundle/components/OffsetWellPickerV5/api/metrics/fetchMudAggregate.js +1 -1
  151. package/cjs-bundle/components/OffsetWellPickerV5/api/metrics/fetchMudAggregate.js.map +1 -1
  152. package/cjs-bundle/components/OffsetWellPickerV5/api/shared/fetchers/getAllAssets.js +1 -1
  153. package/cjs-bundle/components/OffsetWellPickerV5/api/shared/fetchers/getAllAssets.js.map +1 -1
  154. package/cjs-bundle/components/OffsetWellPickerV5/api/shared/fetchers/getAssetsByBounds.js +1 -1
  155. package/cjs-bundle/components/OffsetWellPickerV5/api/shared/fetchers/getAssetsByBounds.js.map +1 -1
  156. package/cjs-bundle/components/OffsetWellPickerV5/api/shared/fetchers/getAssetsByIds.js +1 -1
  157. package/cjs-bundle/components/OffsetWellPickerV5/api/shared/fetchers/getAssetsByIds.js.map +1 -1
  158. package/cjs-bundle/components/OffsetWellPickerV5/api/wells/fetchWellsByRigIds.js +1 -1
  159. package/cjs-bundle/components/OffsetWellPickerV5/api/wells/fetchWellsByRigIds.js.map +1 -1
  160. package/cjs-bundle/components/OffsetWellPickerV5/components/AppHeader/components/HeaderActions/HeaderActions.js +1 -1
  161. package/cjs-bundle/components/OffsetWellPickerV5/components/AppHeader/components/HeaderActions/HeaderActions.js.map +1 -1
  162. package/cjs-bundle/components/OffsetWellPickerV5/components/AppHeader/components/LoadAllWellsToggle/LoadAllWellsToggle.js +1 -1
  163. package/cjs-bundle/components/OffsetWellPickerV5/components/AppHeader/components/LoadAllWellsToggle/LoadAllWellsToggle.js.map +1 -1
  164. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/Filter.js +1 -1
  165. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/Filter.js.map +1 -1
  166. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js +1 -1
  167. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js.map +1 -1
  168. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/PeriodFilterSelect/PeriodFilterSelect.js +1 -1
  169. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/PeriodFilterSelect/PeriodFilterSelect.js.map +1 -1
  170. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/SingleFilterSelect/SingleFilterSelect.js +1 -1
  171. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/SingleFilterSelect/SingleFilterSelect.js.map +1 -1
  172. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/ClusterTooltip/ClusterTooltip.js +1 -1
  173. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/ClusterTooltip/ClusterTooltip.js.map +1 -1
  174. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/LayerSwitcher/LayerSwitcher.js +1 -1
  175. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/LayerSwitcher/LayerSwitcher.js.map +1 -1
  176. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapControls/MapControls.js +1 -1
  177. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapControls/MapControls.js.map +1 -1
  178. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapHints/MapHintsStash.js +1 -1
  179. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapHints/MapHintsStash.js.map +1 -1
  180. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/SubjectWellMarker/SubjectWellMarker.js +1 -1
  181. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/SubjectWellMarker/SubjectWellMarker.js.map +1 -1
  182. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useMapTooltipState.js +1 -1
  183. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useMapTooltipState.js.map +1 -1
  184. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useOffsetWellMapState.js +1 -1
  185. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useOffsetWellMapState.js.map +1 -1
  186. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useSelectionToolOrchestration.js +1 -1
  187. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useSelectionToolOrchestration.js.map +1 -1
  188. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/utils/well-markers-utils.js +1 -1
  189. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/utils/well-markers-utils.js.map +1 -1
  190. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js +1 -1
  191. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js.map +1 -1
  192. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/OffsetWellPickerV5WithStore.js +1 -1
  193. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/OffsetWellPickerV5WithStore.js.map +1 -1
  194. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/components/CompanySafeguardWrapper/CompanySafeguardWrapper.js +1 -1
  195. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/components/CompanySafeguardWrapper/CompanySafeguardWrapper.js.map +1 -1
  196. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/components/UserSettingsWrapper/UserSettingsWrapper.js +1 -1
  197. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/components/UserSettingsWrapper/UserSettingsWrapper.js.map +1 -1
  198. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AssetResultSection/AssetResultSection.js +1 -1
  199. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AssetResultSection/AssetResultSection.js.map +1 -1
  200. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AutoCompleteAssetSearch/AutoCompleteAssetSearch.js +1 -1
  201. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AutoCompleteAssetSearch/AutoCompleteAssetSearch.js.map +1 -1
  202. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/CompanyCell/CompanyCell.js +1 -1
  203. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/CompanyCell/CompanyCell.js.map +1 -1
  204. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/FormationCell/FormationCell.js +1 -1
  205. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/FormationCell/FormationCell.js.map +1 -1
  206. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/InterventionAssetCell/InterventionAssetCell.js +1 -1
  207. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/InterventionAssetCell/InterventionAssetCell.js.map +1 -1
  208. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/PadNameCell/PadNameCell.js +1 -1
  209. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/PadNameCell/PadNameCell.js.map +1 -1
  210. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/RigCell/RigCell.js +1 -1
  211. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/RigCell/RigCell.js.map +1 -1
  212. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/WellNameCell/WellNameCell.js +1 -1
  213. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/WellNameCell/WellNameCell.js.map +1 -1
  214. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/SettingsMenu.js +1 -1
  215. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/SettingsMenu.js.map +1 -1
  216. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/MetricsSettingsSection/MetricsSettingsSection.js +1 -1
  217. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/MetricsSettingsSection/MetricsSettingsSection.js.map +1 -1
  218. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/TableSettingsSection/TableSettingsSection.js +1 -1
  219. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/TableSettingsSection/TableSettingsSection.js.map +1 -1
  220. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/WellNameHeaderCell/WellNameHeaderCell.js +1 -1
  221. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/WellNameHeaderCell/WellNameHeaderCell.js.map +1 -1
  222. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/hooks/useAdvancedSearchHandler.js +1 -1
  223. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/hooks/useAdvancedSearchHandler.js.map +1 -1
  224. package/cjs-bundle/components/OffsetWellPickerV5/components/PickerModalActions/PickerModalActions.js +1 -1
  225. package/cjs-bundle/components/OffsetWellPickerV5/components/PickerModalActions/PickerModalActions.js.map +1 -1
  226. package/cjs-bundle/components/OffsetWellPickerV5/constants.js +1 -1
  227. package/cjs-bundle/components/OffsetWellPickerV5/constants.js.map +1 -1
  228. package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useCompanyMetricKey.js +1 -1
  229. package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useCompanyMetricKey.js.map +1 -1
  230. package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useWellDataPipeline.js +1 -1
  231. package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useWellDataPipeline.js.map +1 -1
  232. package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/wellTransformations.js +1 -1
  233. package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/wellTransformations.js.map +1 -1
  234. package/cjs-bundle/components/OffsetWellPickerV5/hooks/useAutoSyncOffsetWells.js +1 -1
  235. package/cjs-bundle/components/OffsetWellPickerV5/hooks/useAutoSyncOffsetWells.js.map +1 -1
  236. package/cjs-bundle/components/OffsetWellPickerV5/hooks/useIsAdmin.js +1 -1
  237. package/cjs-bundle/components/OffsetWellPickerV5/hooks/useIsAdmin.js.map +1 -1
  238. package/cjs-bundle/components/OffsetWellPickerV5/hooks/useLimitNotification.js +1 -1
  239. package/cjs-bundle/components/OffsetWellPickerV5/hooks/useLimitNotification.js.map +1 -1
  240. package/cjs-bundle/components/OffsetWellPickerV5/stores/idas-resync-store/createIdasResyncController.js +1 -1
  241. package/cjs-bundle/components/OffsetWellPickerV5/stores/idas-resync-store/createIdasResyncController.js.map +1 -1
  242. package/cjs-bundle/components/OffsetWellPickerV5/utils/getCoordinatedWells.js +1 -1
  243. package/cjs-bundle/components/OffsetWellPickerV5/utils/getCoordinatedWells.js.map +1 -1
  244. package/cjs-bundle/components/PadOffsetsPicker/StagesSelector.js +1 -1
  245. package/cjs-bundle/components/PadOffsetsPicker/StagesSelector.js.map +1 -1
  246. package/cjs-bundle/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js +1 -1
  247. package/cjs-bundle/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js.map +1 -1
  248. package/cjs-bundle/components/RealTimeValuesSidebar/SidebarFooter.js +1 -1
  249. package/cjs-bundle/components/RealTimeValuesSidebar/SidebarFooter.js.map +1 -1
  250. package/cjs-bundle/components/WellhubFilePicker/WellhubFilePicker.js +2 -0
  251. package/cjs-bundle/components/WellhubFilePicker/WellhubFilePicker.js.map +1 -0
  252. package/cjs-bundle/components/WellhubFilePicker/api/fetchWellhubRecords.js +2 -0
  253. package/cjs-bundle/components/WellhubFilePicker/api/fetchWellhubRecords.js.map +1 -0
  254. package/cjs-bundle/components/WellhubFilePicker/api/postWellhubRecords.js +2 -0
  255. package/cjs-bundle/components/WellhubFilePicker/api/postWellhubRecords.js.map +1 -0
  256. package/cjs-bundle/components/WellhubFilePicker/api/registerAttachmentsInWellhub.js +2 -0
  257. package/cjs-bundle/components/WellhubFilePicker/api/registerAttachmentsInWellhub.js.map +1 -0
  258. package/cjs-bundle/components/WellhubFilePicker/components/WellhubFileCard/WellhubFileCard.js +2 -0
  259. package/cjs-bundle/components/WellhubFilePicker/components/WellhubFileCard/WellhubFileCard.js.map +1 -0
  260. package/cjs-bundle/components/WellhubFilePicker/components/WellhubFileCard/WellhubFileCard.scss.js +2 -0
  261. package/cjs-bundle/components/WellhubFilePicker/components/WellhubFileCard/WellhubFileCard.scss.js.map +1 -0
  262. package/cjs-bundle/components/WellhubFilePicker/components/WellhubFilePickerView/WellhubFilePickerView.js +2 -0
  263. package/cjs-bundle/components/WellhubFilePicker/components/WellhubFilePickerView/WellhubFilePickerView.js.map +1 -0
  264. package/cjs-bundle/components/WellhubFilePicker/components/WellhubFilePickerView/WellhubFilePickerView.scss.js +2 -0
  265. package/cjs-bundle/components/WellhubFilePicker/components/WellhubFilePickerView/WellhubFilePickerView.scss.js.map +1 -0
  266. package/cjs-bundle/components/WellhubFilePicker/constants.js +2 -0
  267. package/cjs-bundle/components/WellhubFilePicker/constants.js.map +1 -0
  268. package/cjs-bundle/components/WellhubFilePicker/hooks/useWellhubFiles.js +2 -0
  269. package/cjs-bundle/components/WellhubFilePicker/hooks/useWellhubFiles.js.map +1 -0
  270. package/cjs-bundle/components/WellhubFilePicker/utils/wellhubRecords.js +2 -0
  271. package/cjs-bundle/components/WellhubFilePicker/utils/wellhubRecords.js.map +1 -0
  272. package/cjs-bundle/components/index.js +1 -1
  273. package/cjs-bundle/componentsV2/AppFooter/DqPopover/DqPopover.js +1 -1
  274. package/cjs-bundle/componentsV2/AppFooter/DqPopover/DqPopover.js.map +1 -1
  275. package/cjs-bundle/componentsV2/AppHeader/AppAssets/utils.js +1 -1
  276. package/cjs-bundle/componentsV2/AppHeader/AppAssets/utils.js.map +1 -1
  277. package/cjs-bundle/componentsV2/AppHeader/V3/Actions/Actions.js +1 -1
  278. package/cjs-bundle/componentsV2/AppHeader/V3/Actions/Actions.js.map +1 -1
  279. package/cjs-bundle/componentsV2/AppHeader/V3/AppTitle/AppTitle.js +1 -1
  280. package/cjs-bundle/componentsV2/AppHeader/V3/AppTitle/AppTitle.js.map +1 -1
  281. package/cjs-bundle/componentsV2/AppHeader/V3/AssetSelector/AssetSelector.js +1 -1
  282. package/cjs-bundle/componentsV2/AppHeader/V3/AssetSelector/AssetSelector.js.map +1 -1
  283. package/cjs-bundle/componentsV2/AppHeader/V3/VersionSelect/VersionSelect.js +1 -1
  284. package/cjs-bundle/componentsV2/AppHeader/V3/VersionSelect/VersionSelect.js.map +1 -1
  285. package/cjs-bundle/componentsV2/AppPanel/AppPanelDisplay.js +1 -1
  286. package/cjs-bundle/componentsV2/AppPanel/AppPanelDisplay.js.map +1 -1
  287. package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/Map/Map.js +1 -1
  288. package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/Map/Map.js.map +1 -1
  289. package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/PadsTable/PadsTable.js +1 -1
  290. package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/PadsTable/PadsTable.js.map +1 -1
  291. package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/PadsTable/PadsTable.scss.js +1 -1
  292. package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/PadsTable/helpers/columns.js +1 -1
  293. package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/PadsTable/helpers/columns.js.map +1 -1
  294. package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/hooks/useNonActivePads.js +1 -1
  295. package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/hooks/useNonActivePads.js.map +1 -1
  296. package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/hooks/usePadsByRadius.js +1 -1
  297. package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/hooks/usePadsByRadius.js.map +1 -1
  298. package/cjs-bundle/componentsV2/FilesDropzone/utils.js +1 -1
  299. package/cjs-bundle/componentsV2/FilesDropzone/utils.js.map +1 -1
  300. package/cjs-bundle/componentsV2/FilesLoader/utils.js +1 -1
  301. package/cjs-bundle/componentsV2/FilesLoader/utils.js.map +1 -1
  302. package/cjs-bundle/componentsV2/IndicatorLive/IndicatorLive.js.map +1 -1
  303. package/cjs-bundle/componentsV2/PadModeSelect/PadModeSelect.js +1 -1
  304. package/cjs-bundle/componentsV2/PadModeSelect/PadModeSelect.js.map +1 -1
  305. package/cjs-bundle/componentsV2/TemplatesControl/PublishModal/PublishModal.js +1 -1
  306. package/cjs-bundle/componentsV2/TemplatesControl/PublishModal/PublishModal.js.map +1 -1
  307. package/cjs-bundle/componentsV2/TemplatesControl/ShareModal/ShareModal.js +1 -1
  308. package/cjs-bundle/componentsV2/TemplatesControl/ShareModal/ShareModal.js.map +1 -1
  309. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useCopyTemplate.js +1 -1
  310. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useCopyTemplate.js.map +1 -1
  311. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useCreateTemplate.js +1 -1
  312. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useCreateTemplate.js.map +1 -1
  313. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useDeleteFolder.js +1 -1
  314. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useDeleteFolder.js.map +1 -1
  315. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useDeleteTemplate.js +1 -1
  316. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useDeleteTemplate.js.map +1 -1
  317. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useExportTemplate.js +1 -1
  318. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useExportTemplate.js.map +1 -1
  319. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useImportTemplate.js +1 -1
  320. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useImportTemplate.js.map +1 -1
  321. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useInitialize.js +1 -1
  322. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useInitialize.js.map +1 -1
  323. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useMoveToFolder.js +1 -1
  324. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useMoveToFolder.js.map +1 -1
  325. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/usePublishTemplate.js +1 -1
  326. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/usePublishTemplate.js.map +1 -1
  327. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useRevertToOriginal.js +1 -1
  328. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useRevertToOriginal.js.map +1 -1
  329. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useShareTemplate.js +1 -1
  330. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useShareTemplate.js.map +1 -1
  331. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useUnfollowTemplate.js +1 -1
  332. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useUnfollowTemplate.js.map +1 -1
  333. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useUpdateFolderName.js +1 -1
  334. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useUpdateFolderName.js.map +1 -1
  335. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useUpdateTemplateName.js +1 -1
  336. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useUpdateTemplateName.js.map +1 -1
  337. package/cjs-bundle/componentsV2/TemplatesControl/Toggle/Toggle.js +1 -1
  338. package/cjs-bundle/componentsV2/TemplatesControl/Toggle/Toggle.js.map +1 -1
  339. package/cjs-bundle/componentsV2/TextInputBase/TextInputBase.js +1 -1
  340. package/cjs-bundle/componentsV2/TextInputBase/TextInputBase.js.map +1 -1
  341. package/cjs-bundle/componentsV2/TextInputNext/TextInputNext.js +1 -1
  342. package/cjs-bundle/componentsV2/TextInputNext/TextInputNext.js.map +1 -1
  343. package/cjs-bundle/componentsV2/WellArchivedMessage/WellArchivedMessage.js +1 -1
  344. package/cjs-bundle/componentsV2/WellArchivedMessage/WellArchivedMessage.js.map +1 -1
  345. package/cjs-bundle/constants/notifications.js +1 -1
  346. package/cjs-bundle/constants/notifications.js.map +1 -1
  347. package/cjs-bundle/effects/useGlobalOffsetWellsSync.js +1 -1
  348. package/cjs-bundle/effects/useGlobalOffsetWellsSync.js.map +1 -1
  349. package/cjs-bundle/effects/useSharedDCStore.js +1 -1
  350. package/cjs-bundle/effects/useSharedDCStore.js.map +1 -1
  351. package/cjs-bundle/testing/AppTestWrapper/AppTestWrapper.js +1 -1
  352. package/cjs-bundle/testing/AppTestWrapper/AppTestWrapper.js.map +1 -1
  353. package/cjs-bundle/utils/DrillstringUtils.js +1 -1
  354. package/cjs-bundle/utils/DrillstringUtils.js.map +1 -1
  355. package/cjs-bundle/utils/apps.js +1 -1
  356. package/cjs-bundle/utils/apps.js.map +1 -1
  357. package/cjs-bundle/utils/convert.js +1 -1
  358. package/cjs-bundle/utils/convert.js.map +1 -1
  359. package/cjs-bundle/utils/devcenter.js +1 -1
  360. package/cjs-bundle/utils/devcenter.js.map +1 -1
  361. package/cjs-bundle/utils/fetchDataByChunks.js +2 -0
  362. package/cjs-bundle/utils/fetchDataByChunks.js.map +1 -0
  363. package/cjs-bundle/utils/index.js +1 -1
  364. package/cjs-bundle/utils/index.js.map +1 -1
  365. package/cjs-bundle/utils/lasParser.js +1 -1
  366. package/cjs-bundle/utils/lasParser.js.map +1 -1
  367. package/cjs-bundle/utils/time.js.map +1 -1
  368. package/clients/jsonApi/index.js +1 -1
  369. package/clients/jsonApi/index.js.map +1 -1
  370. package/components/AddComment/Popover.js +1 -1
  371. package/components/AddComment/Popover.js.map +1 -1
  372. package/components/AddComment/components/Content.js +1 -1
  373. package/components/AddComment/components/Content.js.map +1 -1
  374. package/components/Annotations/components/AnnotationsList/components/AddAnnotationForm/index.js +1 -1
  375. package/components/Annotations/components/AnnotationsList/components/AddAnnotationForm/index.js.map +1 -1
  376. package/components/Annotations/components/AnnotationsList/index.js +1 -1
  377. package/components/Annotations/components/AnnotationsList/index.js.map +1 -1
  378. package/components/AssetsMultipleSelector/AssetsMultipleSelector.js +1 -1
  379. package/components/AssetsMultipleSelector/AssetsMultipleSelector.js.map +1 -1
  380. package/components/AttachFileButton/AttachFileButton.d.ts +3 -1
  381. package/components/AttachFileButton/AttachFileButton.d.ts.map +1 -1
  382. package/components/AttachFileButton/AttachFileButton.js +1 -1
  383. package/components/AttachFileButton/AttachFileButton.js.map +1 -1
  384. package/components/AttachFileButton/__tests__/AttachFileButton.test.d.ts +2 -0
  385. package/components/AttachFileButton/__tests__/AttachFileButton.test.d.ts.map +1 -0
  386. package/components/Attachment/index.js +1 -1
  387. package/components/Attachment/index.js.map +1 -1
  388. package/components/BICOffsetPickerDialog/components/Map/Map.js +1 -1
  389. package/components/BICOffsetPickerDialog/components/Map/Map.js.map +1 -1
  390. package/components/BICOffsetPickerDialog/components/WellSection/index.js +1 -1
  391. package/components/BICOffsetPickerDialog/components/WellSection/index.js.map +1 -1
  392. package/components/BICOffsetPickerDialog/index.js +1 -1
  393. package/components/BICOffsetPickerDialog/index.js.map +1 -1
  394. package/components/Casing/CasingTableV2/components/CasingJoints/Editor.js +1 -1
  395. package/components/Casing/CasingTableV2/components/CasingJoints/Editor.js.map +1 -1
  396. package/components/Casing/CasingTableV2/components/Component.js +1 -1
  397. package/components/Casing/CasingTableV2/components/Component.js.map +1 -1
  398. package/components/Casing/CasingTableV2/components/DrillPipe/Editor.js +1 -1
  399. package/components/Casing/CasingTableV2/components/DrillPipe/Editor.js.map +1 -1
  400. package/components/CollapsableSidebar.js +1 -1
  401. package/components/CollapsableSidebar.js.map +1 -1
  402. package/components/CommentCard/CommentCard.d.ts.map +1 -1
  403. package/components/CommentCard/CommentCard.js +1 -1
  404. package/components/CommentCard/CommentCard.js.map +1 -1
  405. package/components/CommentCard/CommentCard.scss.js +1 -1
  406. package/components/CommentCard/CommentCard.types.d.ts +0 -1
  407. package/components/CommentCard/CommentCard.types.d.ts.map +1 -1
  408. package/components/CommentComposer/CommentComposer.d.ts +3 -1
  409. package/components/CommentComposer/CommentComposer.d.ts.map +1 -1
  410. package/components/CommentComposer/CommentComposer.js +1 -1
  411. package/components/CommentComposer/CommentComposer.js.map +1 -1
  412. package/components/CommentComposer/__tests__/useAttachmentUpload.stored.test.d.ts +2 -0
  413. package/components/CommentComposer/__tests__/useAttachmentUpload.stored.test.d.ts.map +1 -0
  414. package/components/CommentComposer/useAttachmentUpload.d.ts +4 -0
  415. package/components/CommentComposer/useAttachmentUpload.d.ts.map +1 -1
  416. package/components/CommentComposer/useAttachmentUpload.js +1 -1
  417. package/components/CommentComposer/useAttachmentUpload.js.map +1 -1
  418. package/components/DevCenter/AppsDataProvider/effects/utils.d.ts.map +1 -1
  419. package/components/DevCenter/AppsDataProvider/effects/utils.js +1 -1
  420. package/components/DevCenter/AppsDataProvider/effects/utils.js.map +1 -1
  421. package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js +1 -1
  422. package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js.map +1 -1
  423. package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js +1 -1
  424. package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js.map +1 -1
  425. package/components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.js +1 -1
  426. package/components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.js.map +1 -1
  427. package/components/DevCenter/DevCenterAppContainer/components/LegacyAppActions.js +1 -1
  428. package/components/DevCenter/DevCenterAppContainer/components/LegacyAppActions.js.map +1 -1
  429. package/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus.js +1 -1
  430. package/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus.js.map +1 -1
  431. package/components/DevCenter/DevCenterAppContainer/components/PriorityMenus.js +1 -1
  432. package/components/DevCenter/DevCenterAppContainer/components/PriorityMenus.js.map +1 -1
  433. package/components/DevCenter/DevCenterAppContainer/effects/useAppMaximized.js +1 -1
  434. package/components/DevCenter/DevCenterAppContainer/effects/useAppMaximized.js.map +1 -1
  435. package/components/DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.d.ts.map +1 -1
  436. package/components/DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js +1 -1
  437. package/components/DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js.map +1 -1
  438. package/components/DevCenter/IsolatedDevCenterAppContainer/IsolatedPage.d.ts.map +1 -1
  439. package/components/DevCenter/IsolatedDevCenterAppContainer/IsolatedPage.js +1 -1
  440. package/components/DevCenter/IsolatedDevCenterAppContainer/IsolatedPage.js.map +1 -1
  441. package/components/DevCenter/IsolatedDevCenterAppContainer/effects/useXProps.d.ts.map +1 -1
  442. package/components/DevCenter/IsolatedDevCenterAppContainer/effects/useXProps.js.map +1 -1
  443. package/components/DocumentViewer/DocumentViewer.js +1 -1
  444. package/components/DocumentViewer/DocumentViewer.js.map +1 -1
  445. package/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js +1 -1
  446. package/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js.map +1 -1
  447. package/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js +1 -1
  448. package/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js.map +1 -1
  449. package/components/Drillstring/BHAComponentsTable/components/Component.js +1 -1
  450. package/components/Drillstring/BHAComponentsTable/components/Component.js.map +1 -1
  451. package/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js +1 -1
  452. package/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js.map +1 -1
  453. package/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js +1 -1
  454. package/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js.map +1 -1
  455. package/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js +1 -1
  456. package/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js.map +1 -1
  457. package/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js +1 -1
  458. package/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js.map +1 -1
  459. package/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js +1 -1
  460. package/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js.map +1 -1
  461. package/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js +1 -1
  462. package/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js.map +1 -1
  463. package/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js +1 -1
  464. package/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js.map +1 -1
  465. package/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js +1 -1
  466. package/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js.map +1 -1
  467. package/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js +1 -1
  468. package/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js.map +1 -1
  469. package/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js +1 -1
  470. package/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js.map +1 -1
  471. package/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js +1 -1
  472. package/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js.map +1 -1
  473. package/components/EmbeddedApp/EmbeddedApp.d.ts.map +1 -1
  474. package/components/EmbeddedApp/EmbeddedApp.js +1 -1
  475. package/components/EmbeddedApp/EmbeddedApp.js.map +1 -1
  476. package/components/FeedItem/FeedItem.js +1 -1
  477. package/components/FeedItem/FeedItem.js.map +1 -1
  478. package/components/FeedItem/FeedItemEditProvider/FeedItemEditProvider.js +1 -1
  479. package/components/FeedItem/FeedItemEditProvider/FeedItemEditProvider.js.map +1 -1
  480. package/components/FeedItem/components/Content.d.ts.map +1 -1
  481. package/components/FeedItem/components/Content.js +1 -1
  482. package/components/FeedItem/components/Content.js.map +1 -1
  483. package/components/FeedItem/feedItemTypes/AppAnnotationFeedItem/index.d.ts.map +1 -1
  484. package/components/FeedItem/feedItemTypes/AppAnnotationFeedItem/index.js +1 -1
  485. package/components/FeedItem/feedItemTypes/AppAnnotationFeedItem/index.js.map +1 -1
  486. package/components/FeedItem/feedItemTypes/WellPlanFeedItem/index.d.ts.map +1 -1
  487. package/components/FeedItem/feedItemTypes/WellPlanFeedItem/index.js +1 -1
  488. package/components/FeedItem/feedItemTypes/WellPlanFeedItem/index.js.map +1 -1
  489. package/components/FilesLoaderV2/utils.js +1 -1
  490. package/components/FilesLoaderV2/utils.js.map +1 -1
  491. package/components/GradientManager/GradientManager.js +1 -1
  492. package/components/GradientManager/GradientManager.js.map +1 -1
  493. package/components/GradientManager/GradientSelect.js +1 -1
  494. package/components/GradientManager/GradientSelect.js.map +1 -1
  495. package/components/InfiniteList/index.d.ts.map +1 -1
  496. package/components/InfiniteList/index.js +1 -1
  497. package/components/InfiniteList/index.js.map +1 -1
  498. package/components/OffsetWellMap/OffsetWellMap.js +1 -1
  499. package/components/OffsetWellMap/OffsetWellMap.js.map +1 -1
  500. package/components/OffsetWellPickerV2/OffsetWellPickerDialog.js +1 -1
  501. package/components/OffsetWellPickerV2/OffsetWellPickerDialog.js.map +1 -1
  502. package/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js +1 -1
  503. package/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js.map +1 -1
  504. package/components/OffsetWellPickerV2/components/Map/Map.js +1 -1
  505. package/components/OffsetWellPickerV2/components/Map/Map.js.map +1 -1
  506. package/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js +1 -1
  507. package/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js.map +1 -1
  508. package/components/OffsetWellPickerV2/constants.js +1 -1
  509. package/components/OffsetWellPickerV2/constants.js.map +1 -1
  510. package/components/OffsetWellPickerV2/effects/index.js +1 -1
  511. package/components/OffsetWellPickerV2/effects/index.js.map +1 -1
  512. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Map/Map.js +1 -1
  513. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Map/Map.js.map +1 -1
  514. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js +1 -1
  515. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js.map +1 -1
  516. package/components/OffsetWellPickerV3/components/CustomSelectionView/constants.js +1 -1
  517. package/components/OffsetWellPickerV3/components/CustomSelectionView/constants.js.map +1 -1
  518. package/components/OffsetWellPickerV3/components/CustomSelectionView/effects/index.js +1 -1
  519. package/components/OffsetWellPickerV3/components/CustomSelectionView/effects/index.js.map +1 -1
  520. package/components/OffsetWellPickerV3/components/CustomSelectionView/index.js +1 -1
  521. package/components/OffsetWellPickerV3/components/CustomSelectionView/index.js.map +1 -1
  522. package/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js +1 -1
  523. package/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js.map +1 -1
  524. package/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js +1 -1
  525. package/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js.map +1 -1
  526. package/components/OffsetWellPickerV3/components/TabSelection/index.js +1 -1
  527. package/components/OffsetWellPickerV3/components/TabSelection/index.js.map +1 -1
  528. package/components/OffsetWellPickerV3/components/WellHubView/index.js +1 -1
  529. package/components/OffsetWellPickerV3/components/WellHubView/index.js.map +1 -1
  530. package/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js +1 -1
  531. package/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js.map +1 -1
  532. package/components/OffsetWellPickerV3/index.js +1 -1
  533. package/components/OffsetWellPickerV3/index.js.map +1 -1
  534. package/components/OffsetWellPickerV5/OffsetWellPickerV5.js +1 -1
  535. package/components/OffsetWellPickerV5/OffsetWellPickerV5.js.map +1 -1
  536. package/components/OffsetWellPickerV5/api/metrics/fetchMetricsAggregate.js +1 -1
  537. package/components/OffsetWellPickerV5/api/metrics/fetchMetricsAggregate.js.map +1 -1
  538. package/components/OffsetWellPickerV5/api/metrics/fetchMudAggregate.js +1 -1
  539. package/components/OffsetWellPickerV5/api/metrics/fetchMudAggregate.js.map +1 -1
  540. package/components/OffsetWellPickerV5/api/shared/fetchers/getAllAssets.js +1 -1
  541. package/components/OffsetWellPickerV5/api/shared/fetchers/getAllAssets.js.map +1 -1
  542. package/components/OffsetWellPickerV5/api/shared/fetchers/getAssetsByBounds.js +1 -1
  543. package/components/OffsetWellPickerV5/api/shared/fetchers/getAssetsByBounds.js.map +1 -1
  544. package/components/OffsetWellPickerV5/api/shared/fetchers/getAssetsByIds.js +1 -1
  545. package/components/OffsetWellPickerV5/api/shared/fetchers/getAssetsByIds.js.map +1 -1
  546. package/components/OffsetWellPickerV5/api/wells/fetchWellsByRigIds.js +1 -1
  547. package/components/OffsetWellPickerV5/api/wells/fetchWellsByRigIds.js.map +1 -1
  548. package/components/OffsetWellPickerV5/components/AppHeader/components/HeaderActions/HeaderActions.js +1 -1
  549. package/components/OffsetWellPickerV5/components/AppHeader/components/HeaderActions/HeaderActions.js.map +1 -1
  550. package/components/OffsetWellPickerV5/components/AppHeader/components/LoadAllWellsToggle/LoadAllWellsToggle.js +1 -1
  551. package/components/OffsetWellPickerV5/components/AppHeader/components/LoadAllWellsToggle/LoadAllWellsToggle.js.map +1 -1
  552. package/components/OffsetWellPickerV5/components/Filter/Filter.js +1 -1
  553. package/components/OffsetWellPickerV5/components/Filter/Filter.js.map +1 -1
  554. package/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js +1 -1
  555. package/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js.map +1 -1
  556. package/components/OffsetWellPickerV5/components/Filter/components/PeriodFilterSelect/PeriodFilterSelect.js +1 -1
  557. package/components/OffsetWellPickerV5/components/Filter/components/PeriodFilterSelect/PeriodFilterSelect.js.map +1 -1
  558. package/components/OffsetWellPickerV5/components/Filter/components/SingleFilterSelect/SingleFilterSelect.js +1 -1
  559. package/components/OffsetWellPickerV5/components/Filter/components/SingleFilterSelect/SingleFilterSelect.js.map +1 -1
  560. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/ClusterTooltip/ClusterTooltip.js +1 -1
  561. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/ClusterTooltip/ClusterTooltip.js.map +1 -1
  562. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/LayerSwitcher/LayerSwitcher.js +1 -1
  563. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/LayerSwitcher/LayerSwitcher.js.map +1 -1
  564. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapControls/MapControls.js +1 -1
  565. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapControls/MapControls.js.map +1 -1
  566. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapHints/MapHintsStash.js +1 -1
  567. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapHints/MapHintsStash.js.map +1 -1
  568. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/SubjectWellMarker/SubjectWellMarker.js +1 -1
  569. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/SubjectWellMarker/SubjectWellMarker.js.map +1 -1
  570. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useMapTooltipState.js +1 -1
  571. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useMapTooltipState.js.map +1 -1
  572. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useOffsetWellMapState.js +1 -1
  573. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useOffsetWellMapState.js.map +1 -1
  574. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useSelectionToolOrchestration.js +1 -1
  575. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useSelectionToolOrchestration.js.map +1 -1
  576. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/utils/well-markers-utils.js +1 -1
  577. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/utils/well-markers-utils.js.map +1 -1
  578. package/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js +1 -1
  579. package/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js.map +1 -1
  580. package/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/OffsetWellPickerV5WithStore.js +1 -1
  581. package/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/OffsetWellPickerV5WithStore.js.map +1 -1
  582. package/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/components/CompanySafeguardWrapper/CompanySafeguardWrapper.js +1 -1
  583. package/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/components/CompanySafeguardWrapper/CompanySafeguardWrapper.js.map +1 -1
  584. package/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/components/UserSettingsWrapper/UserSettingsWrapper.js +1 -1
  585. package/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/components/UserSettingsWrapper/UserSettingsWrapper.js.map +1 -1
  586. package/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AssetResultSection/AssetResultSection.js +1 -1
  587. package/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AssetResultSection/AssetResultSection.js.map +1 -1
  588. package/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AutoCompleteAssetSearch/AutoCompleteAssetSearch.js +1 -1
  589. package/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AutoCompleteAssetSearch/AutoCompleteAssetSearch.js.map +1 -1
  590. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/CompanyCell/CompanyCell.js +1 -1
  591. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/CompanyCell/CompanyCell.js.map +1 -1
  592. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/FormationCell/FormationCell.js +1 -1
  593. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/FormationCell/FormationCell.js.map +1 -1
  594. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/InterventionAssetCell/InterventionAssetCell.js +1 -1
  595. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/InterventionAssetCell/InterventionAssetCell.js.map +1 -1
  596. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/PadNameCell/PadNameCell.js +1 -1
  597. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/PadNameCell/PadNameCell.js.map +1 -1
  598. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/RigCell/RigCell.js +1 -1
  599. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/RigCell/RigCell.js.map +1 -1
  600. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/WellNameCell/WellNameCell.js +1 -1
  601. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/WellNameCell/WellNameCell.js.map +1 -1
  602. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/SettingsMenu.js +1 -1
  603. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/SettingsMenu.js.map +1 -1
  604. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/MetricsSettingsSection/MetricsSettingsSection.js +1 -1
  605. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/MetricsSettingsSection/MetricsSettingsSection.js.map +1 -1
  606. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/TableSettingsSection/TableSettingsSection.js +1 -1
  607. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/TableSettingsSection/TableSettingsSection.js.map +1 -1
  608. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/WellNameHeaderCell/WellNameHeaderCell.js +1 -1
  609. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/WellNameHeaderCell/WellNameHeaderCell.js.map +1 -1
  610. package/components/OffsetWellPickerV5/components/OffsetWellsTable/hooks/useAdvancedSearchHandler.js +1 -1
  611. package/components/OffsetWellPickerV5/components/OffsetWellsTable/hooks/useAdvancedSearchHandler.js.map +1 -1
  612. package/components/OffsetWellPickerV5/components/PickerModalActions/PickerModalActions.js +1 -1
  613. package/components/OffsetWellPickerV5/components/PickerModalActions/PickerModalActions.js.map +1 -1
  614. package/components/OffsetWellPickerV5/constants.js +1 -1
  615. package/components/OffsetWellPickerV5/constants.js.map +1 -1
  616. package/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useCompanyMetricKey.js +1 -1
  617. package/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useCompanyMetricKey.js.map +1 -1
  618. package/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useWellDataPipeline.js +1 -1
  619. package/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useWellDataPipeline.js.map +1 -1
  620. package/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/wellTransformations.js +1 -1
  621. package/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/wellTransformations.js.map +1 -1
  622. package/components/OffsetWellPickerV5/hooks/useAutoSyncOffsetWells.js +1 -1
  623. package/components/OffsetWellPickerV5/hooks/useAutoSyncOffsetWells.js.map +1 -1
  624. package/components/OffsetWellPickerV5/hooks/useIsAdmin.js +1 -1
  625. package/components/OffsetWellPickerV5/hooks/useIsAdmin.js.map +1 -1
  626. package/components/OffsetWellPickerV5/hooks/useLimitNotification.js +1 -1
  627. package/components/OffsetWellPickerV5/hooks/useLimitNotification.js.map +1 -1
  628. package/components/OffsetWellPickerV5/stores/idas-resync-store/createIdasResyncController.js +1 -1
  629. package/components/OffsetWellPickerV5/stores/idas-resync-store/createIdasResyncController.js.map +1 -1
  630. package/components/OffsetWellPickerV5/utils/getCoordinatedWells.d.ts.map +1 -1
  631. package/components/OffsetWellPickerV5/utils/getCoordinatedWells.js +1 -1
  632. package/components/OffsetWellPickerV5/utils/getCoordinatedWells.js.map +1 -1
  633. package/components/PadOffsetsPicker/StagesSelector.js +1 -1
  634. package/components/PadOffsetsPicker/StagesSelector.js.map +1 -1
  635. package/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js +1 -1
  636. package/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js.map +1 -1
  637. package/components/RealTimeValuesSidebar/SidebarFooter.js +1 -1
  638. package/components/RealTimeValuesSidebar/SidebarFooter.js.map +1 -1
  639. package/components/WellhubFilePicker/WellhubFilePicker.d.ts +10 -0
  640. package/components/WellhubFilePicker/WellhubFilePicker.d.ts.map +1 -0
  641. package/components/WellhubFilePicker/WellhubFilePicker.js +2 -0
  642. package/components/WellhubFilePicker/WellhubFilePicker.js.map +1 -0
  643. package/components/WellhubFilePicker/WellhubFilePicker.types.d.ts +34 -0
  644. package/components/WellhubFilePicker/WellhubFilePicker.types.d.ts.map +1 -0
  645. package/components/WellhubFilePicker/api/__tests__/registerAttachmentsInWellhub.test.d.ts +2 -0
  646. package/components/WellhubFilePicker/api/__tests__/registerAttachmentsInWellhub.test.d.ts.map +1 -0
  647. package/components/WellhubFilePicker/api/fetchWellhubRecords.d.ts +4 -0
  648. package/components/WellhubFilePicker/api/fetchWellhubRecords.d.ts.map +1 -0
  649. package/components/WellhubFilePicker/api/fetchWellhubRecords.js +2 -0
  650. package/components/WellhubFilePicker/api/fetchWellhubRecords.js.map +1 -0
  651. package/components/WellhubFilePicker/api/index.d.ts +4 -0
  652. package/components/WellhubFilePicker/api/index.d.ts.map +1 -0
  653. package/components/WellhubFilePicker/api/postWellhubRecords.d.ts +10 -0
  654. package/components/WellhubFilePicker/api/postWellhubRecords.d.ts.map +1 -0
  655. package/components/WellhubFilePicker/api/postWellhubRecords.js +2 -0
  656. package/components/WellhubFilePicker/api/postWellhubRecords.js.map +1 -0
  657. package/components/WellhubFilePicker/api/registerAttachmentsInWellhub.d.ts +22 -0
  658. package/components/WellhubFilePicker/api/registerAttachmentsInWellhub.d.ts.map +1 -0
  659. package/components/WellhubFilePicker/api/registerAttachmentsInWellhub.js +2 -0
  660. package/components/WellhubFilePicker/api/registerAttachmentsInWellhub.js.map +1 -0
  661. package/components/WellhubFilePicker/components/WellhubFileCard/WellhubFileCard.d.ts +15 -0
  662. package/components/WellhubFilePicker/components/WellhubFileCard/WellhubFileCard.d.ts.map +1 -0
  663. package/components/WellhubFilePicker/components/WellhubFileCard/WellhubFileCard.js +2 -0
  664. package/components/WellhubFilePicker/components/WellhubFileCard/WellhubFileCard.js.map +1 -0
  665. package/components/WellhubFilePicker/components/WellhubFileCard/WellhubFileCard.scss.js +2 -0
  666. package/components/WellhubFilePicker/components/WellhubFileCard/WellhubFileCard.scss.js.map +1 -0
  667. package/components/WellhubFilePicker/components/WellhubFileCard/index.d.ts +3 -0
  668. package/components/WellhubFilePicker/components/WellhubFileCard/index.d.ts.map +1 -0
  669. package/components/WellhubFilePicker/components/WellhubFilePickerView/WellhubFilePickerView.d.ts +17 -0
  670. package/components/WellhubFilePicker/components/WellhubFilePickerView/WellhubFilePickerView.d.ts.map +1 -0
  671. package/components/WellhubFilePicker/components/WellhubFilePickerView/WellhubFilePickerView.js +2 -0
  672. package/components/WellhubFilePicker/components/WellhubFilePickerView/WellhubFilePickerView.js.map +1 -0
  673. package/components/WellhubFilePicker/components/WellhubFilePickerView/WellhubFilePickerView.scss.js +2 -0
  674. package/components/WellhubFilePicker/components/WellhubFilePickerView/WellhubFilePickerView.scss.js.map +1 -0
  675. package/components/WellhubFilePicker/components/WellhubFilePickerView/__tests__/WellhubFilePickerView.test.d.ts +2 -0
  676. package/components/WellhubFilePicker/components/WellhubFilePickerView/__tests__/WellhubFilePickerView.test.d.ts.map +1 -0
  677. package/components/WellhubFilePicker/components/WellhubFilePickerView/index.d.ts +3 -0
  678. package/components/WellhubFilePicker/components/WellhubFilePickerView/index.d.ts.map +1 -0
  679. package/components/WellhubFilePicker/constants.d.ts +5 -0
  680. package/components/WellhubFilePicker/constants.d.ts.map +1 -0
  681. package/components/WellhubFilePicker/constants.js +2 -0
  682. package/components/WellhubFilePicker/constants.js.map +1 -0
  683. package/components/WellhubFilePicker/hooks/index.d.ts +2 -0
  684. package/components/WellhubFilePicker/hooks/index.d.ts.map +1 -0
  685. package/components/WellhubFilePicker/hooks/useWellhubFiles.d.ts +8 -0
  686. package/components/WellhubFilePicker/hooks/useWellhubFiles.d.ts.map +1 -0
  687. package/components/WellhubFilePicker/hooks/useWellhubFiles.js +2 -0
  688. package/components/WellhubFilePicker/hooks/useWellhubFiles.js.map +1 -0
  689. package/components/WellhubFilePicker/index.d.ts +6 -0
  690. package/components/WellhubFilePicker/index.d.ts.map +1 -0
  691. package/components/WellhubFilePicker/utils/index.d.ts +2 -0
  692. package/components/WellhubFilePicker/utils/index.d.ts.map +1 -0
  693. package/components/WellhubFilePicker/utils/wellhubRecords.d.ts +10 -0
  694. package/components/WellhubFilePicker/utils/wellhubRecords.d.ts.map +1 -0
  695. package/components/WellhubFilePicker/utils/wellhubRecords.js +2 -0
  696. package/components/WellhubFilePicker/utils/wellhubRecords.js.map +1 -0
  697. package/components/index.d.ts +3 -0
  698. package/components/index.d.ts.map +1 -1
  699. package/components/index.js +1 -1
  700. package/componentsV2/AppFooter/DqPopover/DqPopover.js +1 -1
  701. package/componentsV2/AppFooter/DqPopover/DqPopover.js.map +1 -1
  702. package/componentsV2/AppHeader/AppAssets/utils.js +1 -1
  703. package/componentsV2/AppHeader/AppAssets/utils.js.map +1 -1
  704. package/componentsV2/AppHeader/V3/Actions/Actions.js +1 -1
  705. package/componentsV2/AppHeader/V3/Actions/Actions.js.map +1 -1
  706. package/componentsV2/AppHeader/V3/AppTitle/AppTitle.js +1 -1
  707. package/componentsV2/AppHeader/V3/AppTitle/AppTitle.js.map +1 -1
  708. package/componentsV2/AppHeader/V3/AssetSelector/AssetSelector.js +1 -1
  709. package/componentsV2/AppHeader/V3/AssetSelector/AssetSelector.js.map +1 -1
  710. package/componentsV2/AppHeader/V3/VersionSelect/VersionSelect.js +1 -1
  711. package/componentsV2/AppHeader/V3/VersionSelect/VersionSelect.js.map +1 -1
  712. package/componentsV2/AppPanel/AppPanelDisplay.js +1 -1
  713. package/componentsV2/AppPanel/AppPanelDisplay.js.map +1 -1
  714. package/componentsV2/CompletionsOffsetWellPicker/Map/Map.js +1 -1
  715. package/componentsV2/CompletionsOffsetWellPicker/Map/Map.js.map +1 -1
  716. package/componentsV2/CompletionsOffsetWellPicker/PadsTable/PadsTable.js +1 -1
  717. package/componentsV2/CompletionsOffsetWellPicker/PadsTable/PadsTable.js.map +1 -1
  718. package/componentsV2/CompletionsOffsetWellPicker/PadsTable/PadsTable.scss.js +1 -1
  719. package/componentsV2/CompletionsOffsetWellPicker/PadsTable/helpers/columns.d.ts.map +1 -1
  720. package/componentsV2/CompletionsOffsetWellPicker/PadsTable/helpers/columns.js +1 -1
  721. package/componentsV2/CompletionsOffsetWellPicker/PadsTable/helpers/columns.js.map +1 -1
  722. package/componentsV2/CompletionsOffsetWellPicker/hooks/useNonActivePads.js +1 -1
  723. package/componentsV2/CompletionsOffsetWellPicker/hooks/useNonActivePads.js.map +1 -1
  724. package/componentsV2/CompletionsOffsetWellPicker/hooks/usePadsByRadius.js +1 -1
  725. package/componentsV2/CompletionsOffsetWellPicker/hooks/usePadsByRadius.js.map +1 -1
  726. package/componentsV2/FilesDropzone/utils.js +1 -1
  727. package/componentsV2/FilesDropzone/utils.js.map +1 -1
  728. package/componentsV2/FilesLoader/utils.js +1 -1
  729. package/componentsV2/FilesLoader/utils.js.map +1 -1
  730. package/componentsV2/IndicatorLive/IndicatorLive.d.ts.map +1 -1
  731. package/componentsV2/IndicatorLive/IndicatorLive.js.map +1 -1
  732. package/componentsV2/PadModeSelect/PadModeSelect.js +1 -1
  733. package/componentsV2/PadModeSelect/PadModeSelect.js.map +1 -1
  734. package/componentsV2/TemplatesControl/PublishModal/PublishModal.js +1 -1
  735. package/componentsV2/TemplatesControl/PublishModal/PublishModal.js.map +1 -1
  736. package/componentsV2/TemplatesControl/ShareModal/ShareModal.js +1 -1
  737. package/componentsV2/TemplatesControl/ShareModal/ShareModal.js.map +1 -1
  738. package/componentsV2/TemplatesControl/Store/hooks/useCopyTemplate.js +1 -1
  739. package/componentsV2/TemplatesControl/Store/hooks/useCopyTemplate.js.map +1 -1
  740. package/componentsV2/TemplatesControl/Store/hooks/useCreateTemplate.js +1 -1
  741. package/componentsV2/TemplatesControl/Store/hooks/useCreateTemplate.js.map +1 -1
  742. package/componentsV2/TemplatesControl/Store/hooks/useDeleteFolder.js +1 -1
  743. package/componentsV2/TemplatesControl/Store/hooks/useDeleteFolder.js.map +1 -1
  744. package/componentsV2/TemplatesControl/Store/hooks/useDeleteTemplate.js +1 -1
  745. package/componentsV2/TemplatesControl/Store/hooks/useDeleteTemplate.js.map +1 -1
  746. package/componentsV2/TemplatesControl/Store/hooks/useExportTemplate.js +1 -1
  747. package/componentsV2/TemplatesControl/Store/hooks/useExportTemplate.js.map +1 -1
  748. package/componentsV2/TemplatesControl/Store/hooks/useImportTemplate.js +1 -1
  749. package/componentsV2/TemplatesControl/Store/hooks/useImportTemplate.js.map +1 -1
  750. package/componentsV2/TemplatesControl/Store/hooks/useInitialize.js +1 -1
  751. package/componentsV2/TemplatesControl/Store/hooks/useInitialize.js.map +1 -1
  752. package/componentsV2/TemplatesControl/Store/hooks/useMoveToFolder.js +1 -1
  753. package/componentsV2/TemplatesControl/Store/hooks/useMoveToFolder.js.map +1 -1
  754. package/componentsV2/TemplatesControl/Store/hooks/usePublishTemplate.js +1 -1
  755. package/componentsV2/TemplatesControl/Store/hooks/usePublishTemplate.js.map +1 -1
  756. package/componentsV2/TemplatesControl/Store/hooks/useRevertToOriginal.js +1 -1
  757. package/componentsV2/TemplatesControl/Store/hooks/useRevertToOriginal.js.map +1 -1
  758. package/componentsV2/TemplatesControl/Store/hooks/useShareTemplate.js +1 -1
  759. package/componentsV2/TemplatesControl/Store/hooks/useShareTemplate.js.map +1 -1
  760. package/componentsV2/TemplatesControl/Store/hooks/useUnfollowTemplate.js +1 -1
  761. package/componentsV2/TemplatesControl/Store/hooks/useUnfollowTemplate.js.map +1 -1
  762. package/componentsV2/TemplatesControl/Store/hooks/useUpdateFolderName.js +1 -1
  763. package/componentsV2/TemplatesControl/Store/hooks/useUpdateFolderName.js.map +1 -1
  764. package/componentsV2/TemplatesControl/Store/hooks/useUpdateTemplateName.js +1 -1
  765. package/componentsV2/TemplatesControl/Store/hooks/useUpdateTemplateName.js.map +1 -1
  766. package/componentsV2/TemplatesControl/Toggle/Toggle.js +1 -1
  767. package/componentsV2/TemplatesControl/Toggle/Toggle.js.map +1 -1
  768. package/componentsV2/TextInputBase/TextInputBase.js +1 -1
  769. package/componentsV2/TextInputBase/TextInputBase.js.map +1 -1
  770. package/componentsV2/TextInputNext/TextInputNext.js +1 -1
  771. package/componentsV2/TextInputNext/TextInputNext.js.map +1 -1
  772. package/componentsV2/WellArchivedMessage/WellArchivedMessage.js +1 -1
  773. package/componentsV2/WellArchivedMessage/WellArchivedMessage.js.map +1 -1
  774. package/constants/assets.d.ts +40 -1
  775. package/constants/assets.d.ts.map +1 -1
  776. package/constants/bha.d.ts +4 -4
  777. package/constants/notifications.d.ts +5 -2
  778. package/constants/notifications.d.ts.map +1 -1
  779. package/constants/notifications.js +1 -1
  780. package/constants/notifications.js.map +1 -1
  781. package/effects/useGlobalOffsetWellsSync.js +1 -1
  782. package/effects/useGlobalOffsetWellsSync.js.map +1 -1
  783. package/effects/useSharedDCStore.js +1 -1
  784. package/effects/useSharedDCStore.js.map +1 -1
  785. package/mcp-server/server.mjs +168 -107
  786. package/package.json +1 -2
  787. package/testing/AppTestWrapper/AppTestWrapper.js +1 -1
  788. package/testing/AppTestWrapper/AppTestWrapper.js.map +1 -1
  789. package/tsconfig.tsbuildinfo +1 -1
  790. package/utils/DrillstringUtils.d.ts.map +1 -1
  791. package/utils/DrillstringUtils.js +1 -1
  792. package/utils/DrillstringUtils.js.map +1 -1
  793. package/utils/apps.js +1 -1
  794. package/utils/apps.js.map +1 -1
  795. package/utils/convert.d.ts +0 -19
  796. package/utils/convert.d.ts.map +1 -1
  797. package/utils/convert.js +1 -1
  798. package/utils/convert.js.map +1 -1
  799. package/utils/devcenter.d.ts.map +1 -1
  800. package/utils/devcenter.js +1 -1
  801. package/utils/devcenter.js.map +1 -1
  802. package/utils/fetchDataByChunks.d.ts.map +1 -0
  803. package/utils/fetchDataByChunks.js +2 -0
  804. package/utils/fetchDataByChunks.js.map +1 -0
  805. package/utils/index.d.ts +4 -4
  806. package/utils/index.d.ts.map +1 -1
  807. package/utils/index.js +1 -1
  808. package/utils/index.js.map +1 -1
  809. package/utils/lasParser.d.ts.map +1 -1
  810. package/utils/lasParser.js +1 -1
  811. package/utils/lasParser.js.map +1 -1
  812. package/utils/time.d.ts.map +1 -1
  813. package/utils/time.js.map +1 -1
  814. package/cjs-bundle/components/OffsetWellPickerV5/api/shared/fetchers/fetchDataByChunks.js +0 -2
  815. package/cjs-bundle/components/OffsetWellPickerV5/api/shared/fetchers/fetchDataByChunks.js.map +0 -1
  816. package/components/OffsetWellPickerV5/api/shared/fetchers/fetchDataByChunks.d.ts.map +0 -1
  817. package/components/OffsetWellPickerV5/api/shared/fetchers/fetchDataByChunks.js +0 -2
  818. package/components/OffsetWellPickerV5/api/shared/fetchers/fetchDataByChunks.js.map +0 -1
  819. package/utils/HeatmapUtils.d.ts +0 -1
  820. package/utils/HeatmapUtils.d.ts.map +0 -1
  821. /package/{components/OffsetWellPickerV5/api/shared/fetchers → utils}/fetchDataByChunks.d.ts +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../../../../src/components/Annotations/components/AnnotationsList/components/AddAnnotationForm/index.js"],"sourcesContent":["import { memo, useState, useRef } from 'react';\nimport { number, shape, string } from 'prop-types';\nimport classNames from 'classnames';\nimport { get, flowRight } from 'lodash';\nimport moment from 'moment';\nimport { withStyles } from '@material-ui/core/styles';\nimport { Paper, Fade, Typography } from '@material-ui/core';\n\nimport { useAnnotationsDispatch } from '../../../../AnnotationsContext';\nimport { ADD_ANNOTATION } from '../../../../constants';\nimport AnnotationInput from '../AnnotationInput';\n\nimport styles from './style.css';\n\nimport Avatar from '~components/Avatar';\nimport useOutsideClick from '~effects/useOutsideClick';\nimport { showSuccessNotification, showErrorNotification } from '~/utils';\nimport { postAnnotation } from '~/clients/jsonApi';\nimport { withUniversalLocationHOC } from '~/components/DevCenter/DevCenterRouterContext';\n\nconst PAGE_NAME = 'AppAnnotationsPo';\n\nconst ANNOTATION_PLACEHOLDER = 'Type annotation here';\n\nconst muiStyles = theme => ({\n inputLabel: {\n color: theme.palette.grey[700],\n fontWeight: 200,\n width: '100%',\n },\n});\n\nconst AddAnnotationForm = ({\n appId,\n assetId,\n assetCompanyId,\n appSettings,\n currentUser = DEFAULT_ADD_ANNOTATION_FORM_CURRENT_USER,\n classes,\n location,\n dashboardType = null,\n}) => {\n const dispatch = useAnnotationsDispatch();\n\n const [inputIsOpen, setInputIsOpen] = useState(false);\n\n const containerRef = useRef(null);\n useOutsideClick(containerRef, () => {\n setInputIsOpen(false);\n });\n\n const handlePost = async (body, period, attachment) => {\n try {\n const annotation = {\n app_id: appId,\n asset_id: assetId,\n body,\n active_until: period,\n attachment: {\n file_name: attachment && attachment.attachmentName,\n s3_link: attachment && attachment.attachmentUrl,\n },\n settings: appSettings,\n };\n const options = {};\n if (dashboardType) options.dashboard_type = dashboardType;\n\n const queryTime = get(location, 'query.time');\n if (queryTime) annotation.data_timestamp = moment(queryTime).format();\n\n const newAnnotation = await postAnnotation(annotation, options);\n dispatch({ type: ADD_ANNOTATION, annotation: newAnnotation });\n } catch (e) {\n showErrorNotification('Error during annotation creation');\n console.error(e);\n return;\n }\n\n showSuccessNotification('Annotation has been added');\n setInputIsOpen(false);\n };\n\n return (\n <div className={styles.cAddAnnotationFormInput}>\n <Avatar\n displayName={`${currentUser.first_name} ${currentUser.last_name}`}\n imgSrc={currentUser.profile_photo}\n size={36}\n />\n <div\n className={classNames(styles.cAddAnnotationFormInputPaper, {\n [styles.cAddAnnotationFormInputPaperOpened]: inputIsOpen,\n [styles.cAddAnnotationFormInputPaperClosed]: !inputIsOpen,\n })}\n >\n <Fade in={!inputIsOpen} timeout={500}>\n <Paper className={styles.cAddAnnotationFormInputPaperLabel}>\n <Typography\n variant=\"body2\"\n data-testid={`${PAGE_NAME}_collapsedInput`}\n className={classes.inputLabel}\n onClick={() => setInputIsOpen(true)}\n >\n {ANNOTATION_PLACEHOLDER}\n </Typography>\n </Paper>\n </Fade>\n <Fade in={inputIsOpen} timeout={100}>\n <div className={styles.cAddAnnotationFormInputPaperAddAnnotation}>\n {inputIsOpen && (\n <AnnotationInput\n onSend={handlePost}\n assetCompanyId={assetCompanyId}\n currentUser={currentUser}\n />\n )}\n </div>\n </Fade>\n </div>\n </div>\n );\n};\n\nAddAnnotationForm.propTypes = {\n appId: number.isRequired,\n assetId: number.isRequired,\n assetCompanyId: number.isRequired,\n appSettings: shape().isRequired,\n currentUser: shape({}),\n classes: shape().isRequired,\n location: shape().isRequired,\n dashboardType: string,\n};\n\nconst DEFAULT_ADD_ANNOTATION_FORM_CURRENT_USER = {};\n\nexport default flowRight([withStyles(muiStyles), withUniversalLocationHOC])(\n memo(AddAnnotationForm)\n);\n"],"names":["AddAnnotationForm","_ref","_classNames","appId","assetId","assetCompanyId","appSettings","_ref$currentUser","currentUser","DEFAULT_ADD_ANNOTATION_FORM_CURRENT_USER","classes","location","_ref$dashboardType","dashboardType","dispatch","useAnnotationsDispatch","useState","_useState2","_slicedToArray","_useState","inputIsOpen","setInputIsOpen","containerRef","useRef","useOutsideClick","_ref2","handlePost","_asyncToGenerator","_regeneratorRuntime","mark","body","period","attachment","annotation","options","queryTime","newAnnotation","wrap","_context","prev","next","app_id","asset_id","active_until","file_name","attachmentName","s3_link","attachmentUrl","settings","dashboard_type","get","data_timestamp","moment","format","postAnnotation","sent","type","ADD_ANNOTATION","t0","showErrorNotification","console","error","abrupt","showSuccessNotification","stop","_callee","_x","_x2","_x3","apply","this","arguments","_jsxs","className","styles","cAddAnnotationFormInput","children","_jsx","Avatar","displayName","concat","first_name","last_name","imgSrc","profile_photo","size","jsxs","classNames","cAddAnnotationFormInputPaper","cAddAnnotationFormInputPaperOpened","cAddAnnotationFormInputPaperClosed","Fade","in","timeout","Paper","cAddAnnotationFormInputPaperLabel","Typography","variant","inputLabel","onClick","jsx","cAddAnnotationFormInputPaperAddAnnotation","AnnotationInput","onSend","propTypes","number","isRequired","shape","string","AddAnnotationForm$1","flowRight","withStyles","theme","color","palette","grey","fontWeight","width","withUniversalLocationHOC","memo"],"mappings":"4sCAgCMA,EAAoB,SASpBC,GAAA,IAAAC,EARJC,IAAAA,MACAC,IAAAA,QACAC,IAAAA,eACAC,IAAAA,YAAWC,EAAAN,EACXO,YAAAA,aAAcC,EAAwCF,EACtDG,IAAAA,QACAC,IAAAA,SAAQC,EAAAX,EACRY,cAAAA,aAAgB,KAAID,EAEdE,EAAWC,EAAAA,yBAEqBC,EAAAA,EAAQA,UAAC,GAAMC,EAAAC,EAAAA,QAAAC,EAAA,GAA9CC,EAAWH,EAAA,GAAEI,EAAcJ,EAAA,GAE5BK,EAAeC,SAAO,MAC5BC,EAAgBF,GAAc,WAC5BD,GAAe,EACjB,IAEA,IAAgBI,EAAVC,GAAUD,EAAAE,EAAA,QAAAC,UAAAC,MAAG,SAAOC,EAAAA,EAAMC,EAAQC,GAAU,IAAAC,EAAAC,EAAAC,EAAAC,EAAA,OAAAR,UAAAS,MAAA,SAAAC,GAAA,OAAA,OAAAA,EAAAC,KAAAD,EAAAE,MAAA,KAAA,EAiBwB,OAjBxBF,EAAAC,KAAA,EAExCN,EAAa,CACjBQ,OAAQtC,EACRuC,SAA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B,SACzDC,MAACmB,aAAU,CACTC,QAAQ,QACR,cAAA,GAAAjB,OA/EI,mBA+EuC,mBAC3CP,UAAW/D,EAAQwF,WACnBC,QAAS,WAAA,OAAM9E,GAAe,EAAM,EAAAuD,SA/EnB,6BAqFvBC,MAACc,OAAI,CAACC,GAAIxE,EAAayE,QAAS,IAAIjB,SAClCC,EAAAuB,IAAA,MAAA,CAAK3B,UAAWC,EAAO2B,0CAA0CzB,SAC9DxD,GACCyD,EAAAuB,IAACE,EAAe,CACdC,OAAQ7E,EACRrB,eAAgBA,EAChBG,YAAaA,aAQ7B,EAEAR,EAAkBwG,UAAY,CAC5BrG,MAAOsG,EAAMA,OAACC,WACdtG,QAASqG,EAAMA,OAACC,WAChBrG,eAAgBoG,EAAMA,OAACC,WACvBpG,YAAaqG,EAAKA,QAAGD,WACrBlG,YAAamG,EAAKA,MAAC,IACnBjG,QAASiG,EAAKA,QAAGD,WACjB/F,SAAUgG,EAAKA,QAAGD,WAClB7F,cAAe+F,EAAAA,QAGjB,IAAMnG,EAA2C,CAAA,EAEjDoG,EAAeC,YAAU,CAACC,EAAUA,YAhHlB,SAAAC,GAAK,MAAK,CAC1Bd,WAAY,CACVe,MAAOD,EAAME,QAAQC,KAAK,KAC1BC,WAAY,IACZC,MAAO,QAEV,IA0GgDC,EAAwBA,0BAA1DR,CACbS,EAAAA,KAAKvH"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../../../../src/components/Annotations/components/AnnotationsList/components/AddAnnotationForm/index.js"],"sourcesContent":["import { memo, useState, useRef } from 'react';\nimport { number, shape, string } from 'prop-types';\nimport classNames from 'classnames';\nimport { get, flowRight } from 'lodash';\nimport moment from 'moment';\nimport { withStyles } from '@material-ui/core/styles';\nimport { Paper, Fade, Typography } from '@material-ui/core';\n\nimport { useAnnotationsDispatch } from '../../../../AnnotationsContext';\nimport { ADD_ANNOTATION } from '../../../../constants';\nimport AnnotationInput from '../AnnotationInput';\n\nimport styles from './style.css';\n\nimport Avatar from '~components/Avatar';\nimport useOutsideClick from '~effects/useOutsideClick';\nimport { showSuccessNotification, showErrorNotification } from '~/utils';\nimport { postAnnotation } from '~/clients/jsonApi';\nimport { withUniversalLocationHOC } from '~/components/DevCenter/DevCenterRouterContext';\n\nconst PAGE_NAME = 'AppAnnotationsPo';\n\nconst ANNOTATION_PLACEHOLDER = 'Type annotation here';\n\nconst muiStyles = theme => ({\n inputLabel: {\n color: theme.palette.grey[700],\n fontWeight: 200,\n width: '100%',\n },\n});\n\nconst AddAnnotationForm = ({\n appId,\n assetId,\n assetCompanyId,\n appSettings,\n currentUser = DEFAULT_ADD_ANNOTATION_FORM_CURRENT_USER,\n classes,\n location,\n dashboardType = null,\n}) => {\n const dispatch = useAnnotationsDispatch();\n\n const [inputIsOpen, setInputIsOpen] = useState(false);\n\n const containerRef = useRef(null);\n useOutsideClick(containerRef, () => {\n setInputIsOpen(false);\n });\n\n const handlePost = async (body, period, attachment) => {\n try {\n const annotation = {\n app_id: appId,\n asset_id: assetId,\n body,\n active_until: period,\n attachment: {\n file_name: attachment && attachment.attachmentName,\n s3_link: attachment && attachment.attachmentUrl,\n },\n settings: appSettings,\n };\n const options = {};\n if (dashboardType) options.dashboard_type = dashboardType;\n\n const queryTime = get(location, 'query.time');\n if (queryTime) annotation.data_timestamp = moment(queryTime).format();\n\n const newAnnotation = await postAnnotation(annotation, options);\n dispatch({ type: ADD_ANNOTATION, annotation: newAnnotation });\n } catch (e) {\n showErrorNotification('Error during annotation creation');\n console.error(e);\n return;\n }\n\n showSuccessNotification('Annotation has been added');\n setInputIsOpen(false);\n };\n\n return (\n <div className={styles.cAddAnnotationFormInput}>\n <Avatar\n displayName={`${currentUser.first_name} ${currentUser.last_name}`}\n imgSrc={currentUser.profile_photo}\n size={36}\n />\n <div\n className={classNames(styles.cAddAnnotationFormInputPaper, {\n [styles.cAddAnnotationFormInputPaperOpened]: inputIsOpen,\n [styles.cAddAnnotationFormInputPaperClosed]: !inputIsOpen,\n })}\n >\n <Fade in={!inputIsOpen} timeout={500}>\n <Paper className={styles.cAddAnnotationFormInputPaperLabel}>\n <Typography\n variant=\"body2\"\n data-testid={`${PAGE_NAME}_collapsedInput`}\n className={classes.inputLabel}\n onClick={() => setInputIsOpen(true)}\n >\n {ANNOTATION_PLACEHOLDER}\n </Typography>\n </Paper>\n </Fade>\n <Fade in={inputIsOpen} timeout={100}>\n <div className={styles.cAddAnnotationFormInputPaperAddAnnotation}>\n {inputIsOpen && (\n <AnnotationInput\n onSend={handlePost}\n assetCompanyId={assetCompanyId}\n currentUser={currentUser}\n />\n )}\n </div>\n </Fade>\n </div>\n </div>\n );\n};\n\nAddAnnotationForm.propTypes = {\n appId: number.isRequired,\n assetId: number.isRequired,\n assetCompanyId: number.isRequired,\n appSettings: shape().isRequired,\n currentUser: shape({}),\n classes: shape().isRequired,\n location: shape().isRequired,\n dashboardType: string,\n};\n\nconst DEFAULT_ADD_ANNOTATION_FORM_CURRENT_USER = {};\n\nexport default flowRight([withStyles(muiStyles), withUniversalLocationHOC])(\n memo(AddAnnotationForm)\n);\n"],"names":["AddAnnotationForm","_ref","_classNames","appId","assetId","assetCompanyId","appSettings","_ref$currentUser","currentUser","DEFAULT_ADD_ANNOTATION_FORM_CURRENT_USER","classes","location","_ref$dashboardType","dashboardType","dispatch","useAnnotationsDispatch","useState","_useState2","_slicedToArray","_useState","inputIsOpen","setInputIsOpen","containerRef","useRef","useOutsideClick","_ref2","handlePost","_asyncToGenerator","_regeneratorRuntime","mark","body","period","attachment","annotation","options","queryTime","newAnnotation","wrap","_context","prev","next","app_id","asset_id","active_until","file_name","attachmentName","s3_link","attachmentUrl","settings","dashboard_type","get","data_timestamp","moment","format","postAnnotation","sent","type","ADD_ANNOTATION","t0","showErrorNotification","console","error","abrupt","showSuccessNotification","stop","_callee","_x","_x2","_x3","apply","this","arguments","_jsxs","className","styles","cAddAnnotationFormInput","children","_jsx","Avatar","displayName","concat","first_name","last_name","imgSrc","profile_photo","size","jsxs","classNames","cAddAnnotationFormInputPaper","cAddAnnotationFormInputPaperOpened","cAddAnnotationFormInputPaperClosed","Fade","in","timeout","Paper","cAddAnnotationFormInputPaperLabel","Typography","variant","inputLabel","onClick","jsx","cAddAnnotationFormInputPaperAddAnnotation","AnnotationInput","onSend","propTypes","number","isRequired","shape","string","AddAnnotationForm$1","flowRight","withStyles","theme","color","palette","grey","fontWeight","width","withUniversalLocationHOC","memo"],"mappings":"4rGAgCMA,EAAoB,SASpBC,GAAA,IAAAC,EARJC,IAAAA,MACAC,IAAAA,QACAC,IAAAA,eACAC,IAAAA,YAAWC,EAAAN,EACXO,YAAAA,aAAcC,EAAwCF,EACtDG,IAAAA,QACAC,IAAAA,SAAQC,EAAAX,EACRY,cAAAA,aAAgB,KAAID,EAEdE,EAAWC,EAAAA,yBAEqBC,EAAAA,EAAQA,UAAC,GAAMC,EAAAC,EAAAA,QAAAC,EAAA,GAA9CC,EAAWH,EAAA,GAAEI,EAAcJ,EAAA,GAE5BK,EAAeC,SAAO,MAC5BC,EAAgBF,GAAc,WAC5BD,GAAe,EACjB,IAEA,IAAgBI,EAAVC,GAAUD,EAAAE,EAAA,QAAAC,UAAAC,MAAG,SAAOC,EAAAA,EAAMC,EAAQC,GAAU,IAAAC,EAAAC,EAAAC,EAAAC,EAAA,OAAAR,UAAAS,MAAA,SAAAC,GAAA,OAAA,OAAAA,EAAAC,KAAAD,EAAAE,MAAA,KAAA,EAiBwB,OAjBxBF,EAAAC,KAAA,EAExCN,EAAa,CACjBQ,OAAQtC,EACRuC,SAAUtC,EACV0B,KAAAA,EACAa,aAAcZ,EACdC,WAAY,CACVY,UAAWZ,GAAcA,EAAWa,eACpCC,QAASd,GAAcA,EAAWe,eAEpCC,SAAU1C,GAEN4B,EAAU,CAAA,EACZrB,IAAeqB,EAAQe,eAAiBpC,IAEtCsB,EAAYe,EAAGA,IAACvC,EAAU,iBACjBsB,EAAWkB,eAAiBC,EAAM,QAACjB,GAAWkB,UAASf,EAAAE,KAAA,EAE1Cc,EAA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yD,EAAAuB,IAACE,EAAe,CACdC,OAAQ7E,EACRrB,eAAgBA,EAChBG,YAAaA,aAQ7B,EAEAR,EAAkBwG,UAAY,CAC5BrG,MAAOsG,EAAMA,OAACC,WACdtG,QAASqG,EAAMA,OAACC,WAChBrG,eAAgBoG,EAAMA,OAACC,WACvBpG,YAAaqG,EAAKA,QAAGD,WACrBlG,YAAamG,EAAKA,MAAC,IACnBjG,QAASiG,EAAKA,QAAGD,WACjB/F,SAAUgG,EAAKA,QAAGD,WAClB7F,cAAe+F,EAAAA,QAGjB,IAAMnG,EAA2C,CAAA,EAEjDoG,EAAeC,YAAU,CAACC,EAAUA,YAhHlB,SAAAC,GAAK,MAAK,CAC1Bd,WAAY,CACVe,MAAOD,EAAME,QAAQC,KAAK,KAC1BC,WAAY,IACZC,MAAO,QAEV,IA0GgDC,EAAwBA,0BAA1DR,CACbS,EAAAA,KAAKvH"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),n=require("@babel/runtime/helpers/slicedToArray"),a=require("@babel/runtime/regenerator"),s=require("react"),r=require("prop-types"),i=require("classnames"),o=require("@material-ui/core/styles"),u=require("@material-ui/core"),c=require("@material-ui/icons/ChevronLeft"),d=require("../../../../clients/jsonApi/index.js"),l=require("../../AnnotationsContext.js"),p=require("../../constants.js"),h=require("./components/AddAnnotationForm/index.js"),m=require("./components/Annotation/index.js"),f=require("./style.css.js");require("../../../../utils/index.js");var y=require("../../../../utils/mobileDetect.js"),b=require("../../../InfiniteList/index.js"),q=require("../../../../effects/useOutsideClick.js"),x=require("react/jsx-runtime"),A=require("../../../../utils/notificationToasts.js");function g(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var j=g(e),T=g(t),v=g(n),N=g(a),I=g(i),C=g(c),S="AppAnnotationsPo",R=function(e){var t,n=e.appId,a=e.appTitle,r=e.assetId,i=e.assetCompanyId,o=e.appSettings,c=void 0===o?_:o,y=e.currentUser,g=e.onClose,R=e.isNative,k=void 0===R?L:R,w=e.classes,O=e.dashboardType,P=void 0===O?null:O,D=l.useAnnotationsState().annotations,E=l.useAnnotationsDispatch(),F=s.useRef(),H=s.useRef();q(F,g);var U=s.useState(!1),B=v.default(U,2),W=B[0],G=B[1],M=s.useState(!0),z=v.default(M,2),J=z[0],K=z[1],Q=s.useState(!0),V=v.default(Q,2),X=V[0],Y=V[1],Z=s.useState(1),$=v.default(Z,2),ee=$[0],te=$[1];function ne(){return(ne=T.default(N.default.mark((function e(){var t,a,s;return N.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n&&r){e.next=2;break}return e.abrupt("return");case 2:return K(!0),e.prev=3,a={page:ee,per_page:4,sort:"created_at",order:"desc"},P&&(a.dashboard_type=P),e.next=8,d.getAnnotations(n,r,a);case 8:t=e.sent,E({type:1===ee?p.SET_ANNOTATIONS:p.APPEND_ANNOTATIONS,annotations:t}),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(3),console.error(e.t0);case 15:s=t&&t.data.length<4,te(ee+1),Y(!s),K(!1);case 19:case"end":return e.stop()}}),e,null,[[3,12]])})))).apply(this,arguments)}return s.useEffect((function(){G(!0)}),[]),x.jsx(u.RootRef,{rootRef:F,children:x.jsxs(u.Paper,{className:I.default(f.cAnnotationsList,(t={},j.default(t,f.cAnnotationsListOpen,W),j.default(t,f.cAnnotationsListOpenNative,k),t)),children:[x.jsx(b,{infiniteClassName:f.cAnnotationsListContentContainer,headerComponent:x.jsxs(x.Fragment,{children:[x.jsx(u.Typography,{"data-testid":"".concat(S,"_appTitle"),variant:"body1",className:w.title,children:a}),x.jsx("div",{className:f.cAnnotationsListContentTop,children:x.jsxs(u.Typography,{"data-testid":"".concat(S,"_annotationsTitle"),variant:"caption",className:w.secondaryTitle,children:["Annotations (",D.data?D.data.length:0,")"]})}),x.jsx(h,{appId:n,assetId:r,assetCompanyId:i,appSettings:c,currentUser:y,dashboardType:P})]}),useWindow:k,items:D.data||[],showNoItemsFound:!(D.data&&0!==D.data.length||J),noItemsFoundLabel:x.jsx(u.Typography,{variant:"body2","data-testid":"".concat(S,"_noAnnotations"),className:w.noAnnotations,children:"No Annotations yet"}),threshold:50,infiniteContainerHeight:F.current&&H.current?F.current.clientHeight-H.current.clientHeight:null,moreItemsMayExist:X,pathToCreatedAt:["attributes","created_at"],renderItem:function(e){return x.jsx(m,{isNative:k,annotation:e,assetCompanyId:i,included:D.included,currentUser:y,showSuccessNotification:A.showSuccessNotification},e.id)},loadItems:function(){return ne.apply(this,arguments)}}),x.jsx("div",{className:f.cAnnotationsListActions,ref:H,children:x.jsx(u.Tooltip,{title:"Hide",placement:"bottom",children:x.jsx(u.IconButton,{"data-testid":"".concat(S,"_hideButton"),onClick:g,className:w.backIcon,children:x.jsx(C.default,{})})})})]})})};R.propTypes={appId:r.number.isRequired,appTitle:r.string.isRequired,assetId:r.number.isRequired,assetCompanyId:r.number.isRequired,appSettings:r.shape(),classes:r.shape().isRequired,onClose:r.func.isRequired,currentUser:r.shape({}).isRequired,isNative:r.bool,dashboardType:r.string};var _={},L=y.isNativeDetected,k=o.withStyles((function(e){return{title:{fontWeight:200,marginBottom:20},secondaryTitle:{fontWeight:200,textTransform:"uppercase",color:e.palette.grey[600]},annotateIcon:{padding:0,"&:hover":{backgroundColor:"transparent",boxShadow:"none"}},noAnnotations:{marginTop:16},backIcon:{cursor:"pointer",color:e.palette.grey[600],padding:5}}}))(s.memo(R));module.exports=k;
1
+ "use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),r=require("@babel/runtime/helpers/slicedToArray"),s=require("@babel/runtime/regenerator"),n=require("react"),i=require("prop-types"),a=require("classnames"),o=require("@material-ui/core/styles"),u=require("@material-ui/core"),c=require("@material-ui/icons/ChevronLeft"),l=require("../../../../clients/jsonApi/index.js"),d=require("../../AnnotationsContext.js"),p=require("../../constants.js"),q=require("./components/AddAnnotationForm/index.js"),m=require("./components/Annotation/index.js"),h=require("./style.css.js");require("../../../UserMention/utils/index.js"),require("../../../../utils/convert.js"),require("../../../../constants/completion.js"),require("moment"),require("../../../../constants/alerts.js"),require("../../../../utils/casing/validation.js"),require("lodash/mean"),require("lodash"),require("../../../../constants/streamSourceType.js"),require("lodash/get"),require("file-saver"),require("query-string"),require("../../../../constants/goals.js"),require("../../../../constants/segment.js"),require("../../../../constants/apps.js"),require("../../../../constants/drillstring.js"),require("../../../../constants/appPackages.js"),require("../../../../constants/notifications.js"),require("../../../../constants/feed.js"),require("../../../../constants/bha.js"),require("../../../../constants/corvaCompanyId.js"),require("../../../GradientManager/configuration/constants.js"),require("../../../../utils/drillstring/conversion.js"),require("lodash/set"),require("lodash/cloneDeep"),require("@babel/runtime/helpers/toConsumableArray"),require("lodash/isNumber"),require("lodash/has"),require("../../../../utils/ga.js"),require("../../../../utils/goalsConfig/goalsConfig.js"),require("../../../../utils/lasParser.js"),require("../../../../utils/main.js"),require("../../../../utils/metrics/metricsConfig.js");var j=require("../../../../utils/mobileDetect.js");require("../../../../utils/feed.js"),require("../../../../utils/reports.js"),require("moment-timezone");var f=require("../../../../utils/notificationToasts.js");require("@babel/runtime/helpers/typeof"),require("../../../../utils/dashboardReports.js"),require("../../../../utils/env.js"),require("file-extension"),require("image-extensions"),require("video-extensions"),require("../../../../utils/jsonaDataFormatter.js"),require("../../../../utils/bha.js"),require("jsona"),require("@babel/runtime/helpers/objectWithoutProperties"),require("../../../../utils/charts/Styles.scss.js"),require("../../../../utils/getSingleAsset.js");var g=require("../../../InfiniteList/index.js"),b=require("../../../../effects/useOutsideClick.js"),y=require("react/jsx-runtime");function v(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var x=v(e),A=v(t),T=v(r),N=v(s),C=v(a),I=v(c),S="AppAnnotationsPo",R=function(e){var t,r=e.appId,s=e.appTitle,i=e.assetId,a=e.assetCompanyId,o=e.appSettings,c=void 0===o?_:o,j=e.currentUser,v=e.onClose,R=e.isNative,L=void 0===R?k:R,w=e.classes,P=e.dashboardType,O=void 0===P?null:P,D=d.useAnnotationsState().annotations,F=d.useAnnotationsDispatch(),U=n.useRef(),E=n.useRef();b(U,v);var H=n.useState(!1),W=T.default(H,2),B=W[0],M=W[1],G=n.useState(!0),z=T.default(G,2),J=z[0],K=z[1],Q=n.useState(!0),V=T.default(Q,2),X=V[0],Y=V[1],Z=n.useState(1),$=T.default(Z,2),ee=$[0],te=$[1];function re(){return(re=A.default(N.default.mark((function e(){var t,s,n;return N.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r&&i){e.next=2;break}return e.abrupt("return");case 2:return K(!0),e.prev=3,s={page:ee,per_page:4,sort:"created_at",order:"desc"},O&&(s.dashboard_type=O),e.next=8,l.getAnnotations(r,i,s);case 8:t=e.sent,F({type:1===ee?p.SET_ANNOTATIONS:p.APPEND_ANNOTATIONS,annotations:t}),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(3),console.error(e.t0);case 15:n=t&&t.data.length<4,te(ee+1),Y(!n),K(!1);case 19:case"end":return e.stop()}}),e,null,[[3,12]])})))).apply(this,arguments)}return n.useEffect((function(){M(!0)}),[]),y.jsx(u.RootRef,{rootRef:U,children:y.jsxs(u.Paper,{className:C.default(h.cAnnotationsList,(t={},x.default(t,h.cAnnotationsListOpen,B),x.default(t,h.cAnnotationsListOpenNative,L),t)),children:[y.jsx(g,{infiniteClassName:h.cAnnotationsListContentContainer,headerComponent:y.jsxs(y.Fragment,{children:[y.jsx(u.Typography,{"data-testid":"".concat(S,"_appTitle"),variant:"body1",className:w.title,children:s}),y.jsx("div",{className:h.cAnnotationsListContentTop,children:y.jsxs(u.Typography,{"data-testid":"".concat(S,"_annotationsTitle"),variant:"caption",className:w.secondaryTitle,children:["Annotations (",D.data?D.data.length:0,")"]})}),y.jsx(q,{appId:r,assetId:i,assetCompanyId:a,appSettings:c,currentUser:j,dashboardType:O})]}),useWindow:L,items:D.data||[],showNoItemsFound:!(D.data&&0!==D.data.length||J),noItemsFoundLabel:y.jsx(u.Typography,{variant:"body2","data-testid":"".concat(S,"_noAnnotations"),className:w.noAnnotations,children:"No Annotations yet"}),threshold:50,infiniteContainerHeight:U.current&&E.current?U.current.clientHeight-E.current.clientHeight:null,moreItemsMayExist:X,pathToCreatedAt:["attributes","created_at"],renderItem:function(e){return y.jsx(m,{isNative:L,annotation:e,assetCompanyId:a,included:D.included,currentUser:j,showSuccessNotification:f.showSuccessNotification},e.id)},loadItems:function(){return re.apply(this,arguments)}}),y.jsx("div",{className:h.cAnnotationsListActions,ref:E,children:y.jsx(u.Tooltip,{title:"Hide",placement:"bottom",children:y.jsx(u.IconButton,{"data-testid":"".concat(S,"_hideButton"),onClick:v,className:w.backIcon,children:y.jsx(I.default,{})})})})]})})};R.propTypes={appId:i.number.isRequired,appTitle:i.string.isRequired,assetId:i.number.isRequired,assetCompanyId:i.number.isRequired,appSettings:i.shape(),classes:i.shape().isRequired,onClose:i.func.isRequired,currentUser:i.shape({}).isRequired,isNative:i.bool,dashboardType:i.string};var _={},k=j.isNativeDetected,L=o.withStyles((function(e){return{title:{fontWeight:200,marginBottom:20},secondaryTitle:{fontWeight:200,textTransform:"uppercase",color:e.palette.grey[600]},annotateIcon:{padding:0,"&:hover":{backgroundColor:"transparent",boxShadow:"none"}},noAnnotations:{marginTop:16},backIcon:{cursor:"pointer",color:e.palette.grey[600],padding:5}}}))(n.memo(R));module.exports=L;
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../../src/components/Annotations/components/AnnotationsList/index.js"],"sourcesContent":["import { memo, useState, useEffect, useRef } from 'react';\nimport { func, bool, shape, number, string } from 'prop-types';\nimport classNames from 'classnames';\nimport { withStyles } from '@material-ui/core/styles';\nimport { Paper, Typography, IconButton, Tooltip, RootRef } from '@material-ui/core';\nimport BackIcon from '@material-ui/icons/ChevronLeft';\n\nimport { getAnnotations } from '../../../../clients/jsonApi';\nimport { useAnnotationsState, useAnnotationsDispatch } from '../../AnnotationsContext';\nimport { SET_ANNOTATIONS, APPEND_ANNOTATIONS } from '../../constants';\n\nimport AddAnnotationForm from './components/AddAnnotationForm';\nimport Annotation from './components/Annotation';\n\nimport styles from './style.css';\n\nimport { showSuccessNotification } from '~/utils';\nimport { isNativeDetected } from '~/utils/mobileDetect';\nimport InfiniteList from '~components/InfiniteList';\nimport useOutsideClick from '~effects/useOutsideClick';\n\nconst PAGE_NAME = 'AppAnnotationsPo';\n\nconst muiStyles = theme => ({\n title: { fontWeight: 200, marginBottom: 20 },\n secondaryTitle: {\n fontWeight: 200,\n textTransform: 'uppercase',\n color: theme.palette.grey[600],\n },\n annotateIcon: {\n padding: 0,\n '&:hover': {\n backgroundColor: 'transparent',\n boxShadow: 'none',\n },\n },\n noAnnotations: { marginTop: 16 },\n backIcon: { cursor: 'pointer', color: theme.palette.grey[600], padding: 5 },\n});\n\nconst PER_PAGE = 4;\n\nconst AnnotationsList = ({\n appId,\n appTitle,\n assetId,\n assetCompanyId,\n appSettings = DEFAULT_ANNOTATIONS_LIST_APP_SETTINGS,\n currentUser,\n onClose,\n isNative = DEFAULT_ANNOTATIONS_LIST_IS_NATIVE,\n classes,\n dashboardType = null,\n}) => {\n const { annotations } = useAnnotationsState();\n const dispatch = useAnnotationsDispatch();\n\n const rootRef = useRef();\n const footerRef = useRef();\n\n const infiniteContainerHeight = () => {\n if (rootRef.current && footerRef.current)\n return rootRef.current.clientHeight - footerRef.current.clientHeight;\n return null;\n };\n\n useOutsideClick(rootRef, onClose);\n\n const [isOpen, setIsOpen] = useState(false);\n const [isInfiniteLoading, setIsInfiniteLoading] = useState(true);\n const [moreItemsMayExist, setMoreItemsMayExist] = useState(true);\n const [page, setPage] = useState(1);\n\n async function handleFetchAnnotations() {\n if (!(appId && assetId)) return;\n setIsInfiniteLoading(true);\n\n let response;\n try {\n const options = {\n page,\n per_page: PER_PAGE,\n sort: 'created_at',\n order: 'desc',\n };\n if (dashboardType) options.dashboard_type = dashboardType;\n\n response = await getAnnotations(appId, assetId, options);\n dispatch({\n type: page === 1 ? SET_ANNOTATIONS : APPEND_ANNOTATIONS,\n annotations: response,\n });\n } catch (e) {\n console.error(e);\n }\n\n const lessThanPerPage = response && response.data.length < PER_PAGE;\n\n setPage(page + 1);\n setMoreItemsMayExist(!lessThanPerPage);\n setIsInfiniteLoading(false);\n }\n\n useEffect(() => {\n setIsOpen(true); // NOTE: Opens here because of for the sliding effect on open\n }, []); // eslint-disable-line react-hooks/exhaustive-deps\n\n return (\n <RootRef rootRef={rootRef}>\n <Paper\n className={classNames(styles.cAnnotationsList, {\n [styles.cAnnotationsListOpen]: isOpen,\n [styles.cAnnotationsListOpenNative]: isNative,\n })}\n >\n <InfiniteList\n infiniteClassName={styles.cAnnotationsListContentContainer}\n headerComponent={\n <>\n <Typography\n data-testid={`${PAGE_NAME}_appTitle`}\n variant=\"body1\"\n className={classes.title}\n >\n {appTitle}\n </Typography>\n\n <div className={styles.cAnnotationsListContentTop}>\n <Typography\n data-testid={`${PAGE_NAME}_annotationsTitle`}\n variant=\"caption\"\n className={classes.secondaryTitle}\n >\n Annotations ({annotations.data ? annotations.data.length : 0})\n </Typography>\n </div>\n\n <AddAnnotationForm\n appId={appId}\n assetId={assetId}\n assetCompanyId={assetCompanyId}\n appSettings={appSettings}\n currentUser={currentUser}\n dashboardType={dashboardType}\n />\n </>\n }\n useWindow={isNative}\n items={annotations.data || []}\n showNoItemsFound={\n (!annotations.data || annotations.data.length === 0) && !isInfiniteLoading\n }\n noItemsFoundLabel={\n <Typography\n variant=\"body2\"\n data-testid={`${PAGE_NAME}_noAnnotations`}\n className={classes.noAnnotations}\n >\n No Annotations yet\n </Typography>\n }\n threshold={50}\n infiniteContainerHeight={infiniteContainerHeight()}\n moreItemsMayExist={moreItemsMayExist}\n pathToCreatedAt={['attributes', 'created_at']}\n renderItem={item => (\n <Annotation\n key={item.id}\n isNative={isNative}\n annotation={item}\n assetCompanyId={assetCompanyId}\n included={annotations.included}\n currentUser={currentUser}\n showSuccessNotification={showSuccessNotification}\n />\n )}\n loadItems={handleFetchAnnotations}\n />\n <div className={styles.cAnnotationsListActions} ref={footerRef}>\n <Tooltip title=\"Hide\" placement=\"bottom\">\n <IconButton\n data-testid={`${PAGE_NAME}_hideButton`}\n onClick={onClose}\n className={classes.backIcon}\n >\n <BackIcon />\n </IconButton>\n </Tooltip>\n </div>\n </Paper>\n </RootRef>\n );\n};\n\nAnnotationsList.propTypes = {\n appId: number.isRequired,\n appTitle: string.isRequired,\n assetId: number.isRequired,\n assetCompanyId: number.isRequired,\n appSettings: shape(),\n classes: shape().isRequired,\n onClose: func.isRequired,\n currentUser: shape({}).isRequired,\n isNative: bool,\n dashboardType: string,\n};\n\nconst DEFAULT_ANNOTATIONS_LIST_APP_SETTINGS = {};\nconst DEFAULT_ANNOTATIONS_LIST_IS_NATIVE = isNativeDetected;\n\nexport default withStyles(muiStyles)(memo(AnnotationsList));\n"],"names":["PAGE_NAME","AnnotationsList","_ref","_classNames","appId","appTitle","assetId","assetCompanyId","_ref$appSettings","appSettings","DEFAULT_ANNOTATIONS_LIST_APP_SETTINGS","currentUser","onClose","_ref$isNative","isNative","DEFAULT_ANNOTATIONS_LIST_IS_NATIVE","classes","_ref$dashboardType","dashboardType","annotations","useAnnotationsState","dispatch","useAnnotationsDispatch","rootRef","useRef","footerRef","useOutsideClick","useState","_useState2","_slicedToArray","_useState","isOpen","setIsOpen","_useState4","_useState3","isInfiniteLoading","setIsInfiniteLoading","_useState6","_useState5","moreItemsMayExist","setMoreItemsMayExist","_useState8","_useState7","page","setPage","_handleFetchAnnotations","_asyncToGenerator","_regeneratorRuntime","mark","_callee","response","options","lessThanPerPage","wrap","_context","prev","next","abrupt","per_page","sort","order","dashboard_type","getAnnotations","sent","type","SET_ANNOTATIONS","APPEND_ANNOTATIONS","t0","console","error","data","length","stop","apply","this","arguments","useEffect","_jsx","RootRef","children","_jsxs","Paper","className","classNames","styles","cAnnotationsList","cAnnotationsListOpen","cAnnotationsListOpenNative","InfiniteList","infiniteClassName","cAnnotationsListContentContainer","headerComponent","jsxs","_Fragment","Typography","concat","variant","title","jsx","cAnnotationsListContentTop","secondaryTitle","AddAnnotationForm","useWindow","items","showNoItemsFound","noItemsFoundLabel","noAnnotations","threshold","infiniteContainerHeight","current","clientHeight","pathToCreatedAt","renderItem","item","Annotation","annotation","included","showSuccessNotification","id","loadItems","cAnnotationsListActions","ref","Tooltip","placement","IconButton","onClick","backIcon","BackIcon","propTypes","number","isRequired","string","shape","func","bool","isNativeDetected","withStyles","theme","fontWeight","marginBottom","textTransform","color","palette","grey","annotateIcon","padding","backgroundColor","boxShadow","marginTop","cursor","memo"],"mappings":"ogCAqBMA,EAAY,mBAsBZC,EAAkB,SAWlBC,GAAA,IAAAC,EAVJC,IAAAA,MACAC,IAAAA,SACAC,IAAAA,QACAC,IAAAA,eAAcC,EAAAN,EACdO,YAAAA,aAAcC,EAAqCF,EACnDG,IAAAA,YACAC,IAAAA,QAAOC,EAAAX,EACPY,SAAAA,aAAWC,EAAkCF,EAC7CG,IAAAA,QAAOC,EAAAf,EACPgB,cAAAA,aAAgB,KAAID,EAEZE,EAAgBC,EAAAA,sBAAhBD,YACFE,EAAWC,EAAAA,yBAEXC,EAAUC,EAAAA,SACVC,EAAYD,EAAAA,SAQlBE,EAAgBH,EAASX,GAEzB,IAA4Be,EAAAA,EAAQA,UAAC,GAAMC,EAAAC,EAAAA,QAAAC,EAAA,GAApCC,EAAMH,EAAA,GAAEI,EAASJ,EAAA,GAC0BD,EAAAA,EAAQA,UAAC,GAAKM,EAAAJ,EAAAA,QAAAK,EAAA,GAAzDC,EAAiBF,EAAA,GAAEG,EAAoBH,EAAA,GACIN,EAAAA,EAAQA,UAAC,GAAKU,EAAAR,EAAAA,QAAAS,EAAA,GAAzDC,EAAiBF,EAAA,GAAEG,EAAoBH,EAAA,GACtBV,EAAAA,EAAQA,SAAC,GAAEc,EAAAZ,EAAAA,QAAAa,EAAA,GAA5BC,GAAIF,EAAA,GAAEG,GAA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KhB,UAAWE,EAAOoC,wBAAyBC,IAAKhG,EAAUsD,SAC7DF,MAAC6C,UAAO,CAACzB,MAAM,OAAO0B,UAAU,SAAQ5C,SACtCF,MAAC+C,aAAU,CACT,cAAA,GAAA7B,OAAgB/F,EAAuB,eACvC6H,QAASjH,EACTsE,UAAWlE,EAAQ8G,SAAS/C,SAE5BF,EAAAA,IAACkD,EAAQ,QAAA,cAOvB,EAEA9H,EAAgB+H,UAAY,CAC1B5H,MAAO6H,EAAMA,OAACC,WACd7H,SAAU8H,EAAMA,OAACD,WACjB5H,QAAS2H,EAAMA,OAACC,WAChB3H,eAAgB0H,EAAMA,OAACC,WACvBzH,YAAa2H,EAAAA,QACbpH,QAASoH,EAAKA,QAAGF,WACjBtH,QAASyH,EAAIA,KAACH,WACdvH,YAAayH,EAAAA,MAAM,CAAE,GAAEF,WACvBpH,SAAUwH,EAAIA,KACdpH,cAAeiH,EAAAA,QAGjB,IAAMzH,EAAwC,CAAA,EACxCK,EAAqCwH,EAAAA,iBAE5BC,EAAAA,EAAAA,YA5LG,SAAAC,GAAK,MAAK,CAC1BxC,MAAO,CAAEyC,WAAY,IAAKC,aAAc,IACxCvC,eAAgB,CACdsC,WAAY,IACZE,cAAe,YACfC,MAAOJ,EAAMK,QAAQC,KAAK,MAE5BC,aAAc,CACZC,QAAS,EACT,UAAW,CACTC,gBAAiB,cACjBC,UAAW,SAGfzC,cAAe,CAAE0C,UAAW,IAC5BtB,SAAU,CAAEuB,OAAQ,UAAWR,MAAOJ,EAAMK,QAAQC,KAAK,KAAME,QAAS,GACzE,GA4KcT,CAAsBc,EAAIA,KAACrJ"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../../src/components/Annotations/components/AnnotationsList/index.js"],"sourcesContent":["import { memo, useState, useEffect, useRef } from 'react';\nimport { func, bool, shape, number, string } from 'prop-types';\nimport classNames from 'classnames';\nimport { withStyles } from '@material-ui/core/styles';\nimport { Paper, Typography, IconButton, Tooltip, RootRef } from '@material-ui/core';\nimport BackIcon from '@material-ui/icons/ChevronLeft';\n\nimport { getAnnotations } from '../../../../clients/jsonApi';\nimport { useAnnotationsState, useAnnotationsDispatch } from '../../AnnotationsContext';\nimport { SET_ANNOTATIONS, APPEND_ANNOTATIONS } from '../../constants';\n\nimport AddAnnotationForm from './components/AddAnnotationForm';\nimport Annotation from './components/Annotation';\n\nimport styles from './style.css';\n\nimport { showSuccessNotification } from '~/utils';\nimport { isNativeDetected } from '~/utils/mobileDetect';\nimport InfiniteList from '~components/InfiniteList';\nimport useOutsideClick from '~effects/useOutsideClick';\n\nconst PAGE_NAME = 'AppAnnotationsPo';\n\nconst muiStyles = theme => ({\n title: { fontWeight: 200, marginBottom: 20 },\n secondaryTitle: {\n fontWeight: 200,\n textTransform: 'uppercase',\n color: theme.palette.grey[600],\n },\n annotateIcon: {\n padding: 0,\n '&:hover': {\n backgroundColor: 'transparent',\n boxShadow: 'none',\n },\n },\n noAnnotations: { marginTop: 16 },\n backIcon: { cursor: 'pointer', color: theme.palette.grey[600], padding: 5 },\n});\n\nconst PER_PAGE = 4;\n\nconst AnnotationsList = ({\n appId,\n appTitle,\n assetId,\n assetCompanyId,\n appSettings = DEFAULT_ANNOTATIONS_LIST_APP_SETTINGS,\n currentUser,\n onClose,\n isNative = DEFAULT_ANNOTATIONS_LIST_IS_NATIVE,\n classes,\n dashboardType = null,\n}) => {\n const { annotations } = useAnnotationsState();\n const dispatch = useAnnotationsDispatch();\n\n const rootRef = useRef();\n const footerRef = useRef();\n\n const infiniteContainerHeight = () => {\n if (rootRef.current && footerRef.current)\n return rootRef.current.clientHeight - footerRef.current.clientHeight;\n return null;\n };\n\n useOutsideClick(rootRef, onClose);\n\n const [isOpen, setIsOpen] = useState(false);\n const [isInfiniteLoading, setIsInfiniteLoading] = useState(true);\n const [moreItemsMayExist, setMoreItemsMayExist] = useState(true);\n const [page, setPage] = useState(1);\n\n async function handleFetchAnnotations() {\n if (!(appId && assetId)) return;\n setIsInfiniteLoading(true);\n\n let response;\n try {\n const options = {\n page,\n per_page: PER_PAGE,\n sort: 'created_at',\n order: 'desc',\n };\n if (dashboardType) options.dashboard_type = dashboardType;\n\n response = await getAnnotations(appId, assetId, options);\n dispatch({\n type: page === 1 ? SET_ANNOTATIONS : APPEND_ANNOTATIONS,\n annotations: response,\n });\n } catch (e) {\n console.error(e);\n }\n\n const lessThanPerPage = response && response.data.length < PER_PAGE;\n\n setPage(page + 1);\n setMoreItemsMayExist(!lessThanPerPage);\n setIsInfiniteLoading(false);\n }\n\n useEffect(() => {\n setIsOpen(true); // NOTE: Opens here because of for the sliding effect on open\n }, []); // eslint-disable-line react-hooks/exhaustive-deps\n\n return (\n <RootRef rootRef={rootRef}>\n <Paper\n className={classNames(styles.cAnnotationsList, {\n [styles.cAnnotationsListOpen]: isOpen,\n [styles.cAnnotationsListOpenNative]: isNative,\n })}\n >\n <InfiniteList\n infiniteClassName={styles.cAnnotationsListContentContainer}\n headerComponent={\n <>\n <Typography\n data-testid={`${PAGE_NAME}_appTitle`}\n variant=\"body1\"\n className={classes.title}\n >\n {appTitle}\n </Typography>\n\n <div className={styles.cAnnotationsListContentTop}>\n <Typography\n data-testid={`${PAGE_NAME}_annotationsTitle`}\n variant=\"caption\"\n className={classes.secondaryTitle}\n >\n Annotations ({annotations.data ? annotations.data.length : 0})\n </Typography>\n </div>\n\n <AddAnnotationForm\n appId={appId}\n assetId={assetId}\n assetCompanyId={assetCompanyId}\n appSettings={appSettings}\n currentUser={currentUser}\n dashboardType={dashboardType}\n />\n </>\n }\n useWindow={isNative}\n items={annotations.data || []}\n showNoItemsFound={\n (!annotations.data || annotations.data.length === 0) && !isInfiniteLoading\n }\n noItemsFoundLabel={\n <Typography\n variant=\"body2\"\n data-testid={`${PAGE_NAME}_noAnnotations`}\n className={classes.noAnnotations}\n >\n No Annotations yet\n </Typography>\n }\n threshold={50}\n infiniteContainerHeight={infiniteContainerHeight()}\n moreItemsMayExist={moreItemsMayExist}\n pathToCreatedAt={['attributes', 'created_at']}\n renderItem={item => (\n <Annotation\n key={item.id}\n isNative={isNative}\n annotation={item}\n assetCompanyId={assetCompanyId}\n included={annotations.included}\n currentUser={currentUser}\n showSuccessNotification={showSuccessNotification}\n />\n )}\n loadItems={handleFetchAnnotations}\n />\n <div className={styles.cAnnotationsListActions} ref={footerRef}>\n <Tooltip title=\"Hide\" placement=\"bottom\">\n <IconButton\n data-testid={`${PAGE_NAME}_hideButton`}\n onClick={onClose}\n className={classes.backIcon}\n >\n <BackIcon />\n </IconButton>\n </Tooltip>\n </div>\n </Paper>\n </RootRef>\n );\n};\n\nAnnotationsList.propTypes = {\n appId: number.isRequired,\n appTitle: string.isRequired,\n assetId: number.isRequired,\n assetCompanyId: number.isRequired,\n appSettings: shape(),\n classes: shape().isRequired,\n onClose: func.isRequired,\n currentUser: shape({}).isRequired,\n isNative: bool,\n dashboardType: string,\n};\n\nconst DEFAULT_ANNOTATIONS_LIST_APP_SETTINGS = {};\nconst DEFAULT_ANNOTATIONS_LIST_IS_NATIVE = isNativeDetected;\n\nexport default withStyles(muiStyles)(memo(AnnotationsList));\n"],"names":["PAGE_NAME","AnnotationsList","_ref","_classNames","appId","appTitle","assetId","assetCompanyId","_ref$appSettings","appSettings","DEFAULT_ANNOTATIONS_LIST_APP_SETTINGS","currentUser","onClose","_ref$isNative","isNative","DEFAULT_ANNOTATIONS_LIST_IS_NATIVE","classes","_ref$dashboardType","dashboardType","annotations","useAnnotationsState","dispatch","useAnnotationsDispatch","rootRef","useRef","footerRef","useOutsideClick","useState","_useState2","_slicedToArray","_useState","isOpen","setIsOpen","_useState4","_useState3","isInfiniteLoading","setIsInfiniteLoading","_useState6","_useState5","moreItemsMayExist","setMoreItemsMayExist","_useState8","_useState7","page","setPage","_handleFetchAnnotations","_asyncToGenerator","_regeneratorRuntime","mark","_callee","response","options","lessThanPerPage","wrap","_context","prev","next","abrupt","per_page","sort","order","dashboard_type","getAnnotations","sent","type","SET_ANNOTATIONS","APPEND_ANNOTATIONS","t0","console","error","data","length","stop","apply","this","arguments","useEffect","_jsx","RootRef","children","_jsxs","Paper","className","classNames","styles","cAnnotationsList","cAnnotationsListOpen","cAnnotationsListOpenNative","InfiniteList","infiniteClassName","cAnnotationsListContentContainer","headerComponent","jsxs","_Fragment","Typography","concat","variant","title","jsx","cAnnotationsListContentTop","secondaryTitle","AddAnnotationForm","useWindow","items","showNoItemsFound","noItemsFoundLabel","noAnnotations","threshold","infiniteContainerHeight","current","clientHeight","pathToCreatedAt","renderItem","item","Annotation","annotation","included","showSuccessNotification","id","loadItems","cAnnotationsListActions","ref","Tooltip","placement","IconButton","onClick","backIcon","BackIcon","propTypes","number","isRequired","string","shape","func","bool","isNativeDetected","withStyles","theme","fontWeight","marginBottom","textTransform","color","palette","grey","annotateIcon","padding","backgroundColor","boxShadow","marginTop","cursor","memo"],"mappings":"2zFAqBMA,EAAY,mBAsBZC,EAAkB,SAWlBC,GAAA,IAAAC,EAVJC,IAAAA,MACAC,IAAAA,SACAC,IAAAA,QACAC,IAAAA,eAAcC,EAAAN,EACdO,YAAAA,aAAcC,EAAqCF,EACnDG,IAAAA,YACAC,IAAAA,QAAOC,EAAAX,EACPY,SAAAA,aAAWC,EAAkCF,EAC7CG,IAAAA,QAAOC,EAAAf,EACPgB,cAAAA,aAAgB,KAAID,EAEZE,EAAgBC,EAAAA,sBAAhBD,YACFE,EAAWC,EAAAA,yBAEXC,EAAUC,EAAAA,SACVC,EAAYD,EAAAA,SAQlBE,EAAgBH,EAASX,GAEzB,IAA4Be,EAAAA,EAAQA,UAAC,GAAMC,EAAAC,EAAAA,QAAAC,EAAA,GAApCC,EAAMH,EAAA,GAAEI,EAASJ,EAAA,GAC0BD,EAAAA,EAAQA,UAAC,GAAKM,EAAAJ,EAAAA,QAAAK,EAAA,GAAzDC,EAAiBF,EAAA,GAAEG,EAAoBH,EAAA,GACIN,EAAAA,EAAQA,UAAC,GAAKU,EAAAR,EAAAA,QAAAS,EAAA,GAAzDC,EAAiBF,EAAA,GAAEG,EAA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,EAAKK,GAQZ,EACFC,UAzG4B,WAEC,OAAA1E,GAAA4B,MAAAC,KAAAC,UAAA,IAyG/BE,EAAAqB,IAAA,MAAA,CAAKhB,UAAWE,EAAOoC,wBAAyBC,IAAKhG,EAAUsD,SAC7DF,MAAC6C,UAAO,CAACzB,MAAM,OAAO0B,UAAU,SAAQ5C,SACtCF,MAAC+C,aAAU,CACT,cAAA,GAAA7B,OAAgB/F,EAAuB,eACvC6H,QAASjH,EACTsE,UAAWlE,EAAQ8G,SAAS/C,SAE5BF,EAAAA,IAACkD,EAAQ,QAAA,cAOvB,EAEA9H,EAAgB+H,UAAY,CAC1B5H,MAAO6H,EAAMA,OAACC,WACd7H,SAAU8H,EAAMA,OAACD,WACjB5H,QAAS2H,EAAMA,OAACC,WAChB3H,eAAgB0H,EAAMA,OAACC,WACvBzH,YAAa2H,EAAAA,QACbpH,QAASoH,EAAKA,QAAGF,WACjBtH,QAASyH,EAAIA,KAACH,WACdvH,YAAayH,EAAAA,MAAM,CAAE,GAAEF,WACvBpH,SAAUwH,EAAIA,KACdpH,cAAeiH,EAAAA,QAGjB,IAAMzH,EAAwC,CAAA,EACxCK,EAAqCwH,EAAAA,iBAE5BC,EAAAA,EAAAA,YA5LG,SAAAC,GAAK,MAAK,CAC1BxC,MAAO,CAAEyC,WAAY,IAAKC,aAAc,IACxCvC,eAAgB,CACdsC,WAAY,IACZE,cAAe,YACfC,MAAOJ,EAAMK,QAAQC,KAAK,MAE5BC,aAAc,CACZC,QAAS,EACT,UAAW,CACTC,gBAAiB,cACjBC,UAAW,SAGfzC,cAAe,CAAE0C,UAAW,IAC5BtB,SAAU,CAAEuB,OAAQ,UAAWR,MAAOJ,EAAMK,QAAQC,KAAK,KAAME,QAAS,GACzE,GA4KcT,CAAsBc,EAAIA,KAACrJ"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("@babel/runtime/helpers/objectWithoutProperties"),t=require("@babel/runtime/helpers/defineProperty"),r=require("@babel/runtime/helpers/slicedToArray"),a=require("react"),n=require("classnames"),i=require("@material-ui/core"),o=require("lodash"),l=require("../Search/Search.js"),s=require("../../clients/jsonApi/index.js");require("../../utils/index.js");var u=require("../../effects/useLoadedData.js"),c=require("react/jsx-runtime"),d=require("../../utils/jsonaDataFormatter.js");function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=p(e),m=p(t),b=p(r),h=p(n),j=["listbox","paper"];function v(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?v(Object(r),!0).forEach((function(t){m.default(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var O=i.makeStyles((function(e){return{listbox:{maxHeight:360},paper:{width:364},footer:{fontSize:12,color:e.palette.primary.text6,lineHeight:"16.872px",padding:"8px 16px"}}})),y=function(e){var t;return{data:d.jsonaDataFormatter.deserialize(e.data),total:Number(null===(t=e.headers)||void 0===t?void 0:t.get("total"))||0}},x=[],P={},q={data:[],total:0},S=a.memo((function(e){var t=e.selectedAssets,r=void 0===t?x:t,n=e.onChange,i=e.label,d=e.className,p=e.type,m=e.customRequestQueryParams,v=e.classes,S=void 0===v?{}:v,D=O(),w=u({loadFn:s.mapAssetGetRequest(p,!0),initialData:q,getDataFromResponseFn:y,isCacheEnabled:!0}),C=w.isLoading,F=w.setIsLoading,A=w.data,E=w.loadData,k=null!=A?A:q,I=k.data,N=k.total,R=a.useState(""),z=b.default(R,2),H=z[0],L=z[1];a.useEffect((function(){B("",m)}),[]);var M=a.useMemo((function(){return r.map((function(e){return g(g({},e),{},{id:e.id,label:e.name})}))}),[r]),T=a.useMemo((function(){var e={};return(M.length?I.concat(M):I).forEach((function(t){e[t.id]=g(g({},t),{},{id:t.id,label:t.name})})),Object.values(o.sortBy(e,"label"))}),[I,r,H]),B=a.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=g(g(g({},P),{},{per_page:50},t),{},{fields:["".concat(p,".name")].concat((null==t?void 0:t.fields)||[])});E(g({search:e},r))}),[]),G=function(){L(""),B("",m)},Q=a.useMemo((function(){var e,t=0===(e=N-(null==I?void 0:I.length))?null:e;return t&&!C&&H?c.jsxs("div",{className:D.footer,children:[t," additional items not displayed. Continue typing for more refined results."]}):null}),[I,C,!!H,N]),W=S.listbox,_=S.paper,J=f.default(S,j);return c.jsx(l.Search,{"data-testid":"offsetPadDropdown",value:M,onChange:function(e,t,r){if("reset"!==r){var a=t.map((function(e){return g(g({},e),{},{name:e.label})}));n(a)}},TextFieldProps:{label:i},className:d,classes:g({listbox:h.default(D.listbox,W),paper:h.default(D.paper,_)},J),loading:C,options:T,placeholder:"",multiple:!0,filterSelectedOptions:!1,AutocompleteProps:{forcePopupIcon:!0},isHiddenAllOption:!0,onInputChangeCallback:function(e,t){"reset"!==t&&""!==e?e.trimStart()!==H&&(L(e.trimStart()),F(!0),B(e.trimStart(),m)):G()},onInputReset:G,paperFooter:Q,getOptionSelected:function(e,t){return+e.id==+t.id},isPrioritizedSelectedOptions:!0})}));module.exports=S;
1
+ "use strict";var e=require("@babel/runtime/helpers/objectWithoutProperties"),r=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/slicedToArray"),i=require("react"),s=require("classnames"),a=require("@material-ui/core"),n=require("lodash"),o=require("../Search/Search.js"),u=require("../../clients/jsonApi/index.js");require("../UserMention/utils/index.js"),require("../../utils/convert.js"),require("../../constants/completion.js"),require("moment"),require("../../constants/alerts.js"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("../../utils/casing/validation.js"),require("lodash/mean"),require("../../constants/streamSourceType.js"),require("lodash/get"),require("file-saver"),require("query-string"),require("../../constants/goals.js"),require("../../constants/segment.js"),require("../../constants/apps.js"),require("../../constants/drillstring.js"),require("../../constants/appPackages.js"),require("../../constants/notifications.js"),require("../../constants/feed.js"),require("../../constants/bha.js"),require("../../constants/corvaCompanyId.js"),require("../GradientManager/configuration/constants.js"),require("../../utils/drillstring/conversion.js"),require("lodash/set"),require("lodash/cloneDeep"),require("@babel/runtime/helpers/toConsumableArray"),require("lodash/isNumber"),require("lodash/has"),require("../../utils/ga.js"),require("../../utils/goalsConfig/goalsConfig.js"),require("../../utils/lasParser.js"),require("../../utils/main.js"),require("../../utils/metrics/metricsConfig.js"),require("../../utils/mobileDetect.js"),require("../../utils/feed.js"),require("../../utils/reports.js"),require("moment-timezone"),require("@babel/runtime/helpers/typeof"),require("../../utils/dashboardReports.js"),require("../../utils/env.js"),require("file-extension"),require("image-extensions"),require("video-extensions");var l=require("../../utils/jsonaDataFormatter.js");require("../../utils/bha.js"),require("jsona"),require("../../utils/charts/Styles.scss.js"),require("../../utils/getSingleAsset.js");var c=require("../../effects/useLoadedData.js"),d=require("react/jsx-runtime");function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=p(e),q=p(r),m=p(t),j=p(s),b=["listbox","paper"];function g(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,i)}return t}function h(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?g(Object(t),!0).forEach((function(r){q.default(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):g(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var v=a.makeStyles((function(e){return{listbox:{maxHeight:360},paper:{width:364},footer:{fontSize:12,color:e.palette.primary.text6,lineHeight:"16.872px",padding:"8px 16px"}}})),y=function(e){var r;return{data:l.jsonaDataFormatter.deserialize(e.data),total:Number(null===(r=e.headers)||void 0===r?void 0:r.get("total"))||0}},O=[],x={},P={data:[],total:0},S=i.memo((function(e){var r=e.selectedAssets,t=void 0===r?O:r,s=e.onChange,a=e.label,l=e.className,p=e.type,q=e.customRequestQueryParams,g=e.classes,S=void 0===g?{}:g,D=v(),C=c({loadFn:u.mapAssetGetRequest(p,!0),initialData:P,getDataFromResponseFn:y,isCacheEnabled:!0}),w=C.isLoading,A=C.setIsLoading,F=C.data,k=C.loadData,E=null!=F?F:P,I=E.data,M=E.total,N=i.useState(""),R=m.default(N,2),z=R[0],T=R[1];i.useEffect((function(){L("",q)}),[]);var G=i.useMemo((function(){return t.map((function(e){return h(h({},e),{},{id:e.id,label:e.name})}))}),[t]),H=i.useMemo((function(){var e={};return(G.length?I.concat(G):I).forEach((function(r){e[r.id]=h(h({},r),{},{id:r.id,label:r.name})})),Object.values(n.sortBy(e,"label"))}),[I,t,z]),L=i.useCallback((function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=h(h(h({},x),{},{per_page:50},r),{},{fields:["".concat(p,".name")].concat((null==r?void 0:r.fields)||[])});k(h({search:e},t))}),[]),B=function(){T(""),L("",q)},Q=i.useMemo((function(){var e,r=0===(e=M-(null==I?void 0:I.length))?null:e;return r&&!w&&z?d.jsxs("div",{className:D.footer,children:[r," additional items not displayed. Continue typing for more refined results."]}):null}),[I,w,!!z,M]),U=S.listbox,W=S.paper,_=f.default(S,b);return d.jsx(o.Search,{"data-testid":"offsetPadDropdown",value:G,onChange:function(e,r,t){if("reset"!==t){var i=r.map((function(e){return h(h({},e),{},{name:e.label})}));s(i)}},TextFieldProps:{label:a},className:l,classes:h({listbox:j.default(D.listbox,U),paper:j.default(D.paper,W)},_),loading:w,options:H,placeholder:"",multiple:!0,filterSelectedOptions:!1,AutocompleteProps:{forcePopupIcon:!0},isHiddenAllOption:!0,onInputChangeCallback:function(e,r){"reset"!==r&&""!==e?e.trimStart()!==z&&(T(e.trimStart()),A(!0),L(e.trimStart(),q)):B()},onInputReset:B,paperFooter:Q,getOptionSelected:function(e,r){return+e.id==+r.id},isPrioritizedSelectedOptions:!0})}));module.exports=S;
2
2
  //# sourceMappingURL=AssetsMultipleSelector.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AssetsMultipleSelector.js","sources":["../../../../src/components/AssetsMultipleSelector/AssetsMultipleSelector.tsx"],"sourcesContent":["import { memo, useCallback, useEffect, useMemo, useState } from 'react';\nimport classnames from 'classnames';\nimport { makeStyles } from '@material-ui/core';\nimport { sortBy } from 'lodash';\n\nimport { Search } from '../Search';\n\nimport { mapAssetGetRequest } from '~/clients/jsonApi';\nimport { jsonaDataFormatter } from '~/utils';\nimport useLoadedData from '~/effects/useLoadedData';\n\nconst useStyles = makeStyles(theme => ({\n listbox: {\n maxHeight: 360,\n },\n paper: {\n width: 364,\n },\n footer: {\n fontSize: 12,\n color: theme.palette.primary.text6,\n lineHeight: '16.872px',\n padding: '8px 16px',\n },\n}));\n\nconst getDataFromResponseFn = (response: {\n data: unknown;\n headers?: { get(name: string): string | null };\n}) => {\n return {\n data: jsonaDataFormatter.deserialize(response.data as string) as Asset[],\n total: Number(response.headers?.get('total')) || 0,\n };\n};\nconst initialSelectedAssets: Asset[] = [];\nconst defaultQueryParams = {};\nconst DEFAULT_ASSETS_PER_PAGE = 50;\nconst initialData: { data: Asset[]; total: number } = { data: [], total: 0 };\n\ntype Asset = { id: string; name: string } & Record<string, unknown>;\nexport type AssetsMultipleSelectorProps = {\n /**\n array of asset objects with required id and name fields.\n */\n selectedAssets: [] | Asset[];\n /**\n callback fires on asset selection with array of all selected assets.\n */\n onChange: (assets: Asset[] | []) => void;\n /**\n label for autocomplete input.\n */\n label: string;\n /**\n type of asset.\n */\n type: 'program' | 'rig' | 'well' | 'frac_fleet' | 'drillout_unit' | 'pad' | 'assets';\n /**\n css for root component.\n */\n className?: string;\n /**\n custom query params for assets request like fields, per_page.\n */\n customRequestQueryParams?: Record<string, unknown> & {\n fields?: string[];\n per_page?: number | string;\n };\n /**\n material ui autocomplete classes.\n */\n classes?: any;\n};\n\nconst AssetsMultipleSelector = memo(\n ({\n selectedAssets = initialSelectedAssets,\n onChange,\n label,\n className,\n type,\n customRequestQueryParams,\n classes = {},\n }: AssetsMultipleSelectorProps) => {\n const styles = useStyles();\n\n const { isLoading, setIsLoading, data, loadData } = useLoadedData({\n loadFn: mapAssetGetRequest(type, true),\n initialData: initialData as any,\n getDataFromResponseFn,\n isCacheEnabled: true,\n });\n const { data: assetsData, total } = data ?? initialData;\n const [searchValue, setSearchValue] = useState('');\n\n useEffect(() => {\n loadAssets('', customRequestQueryParams);\n }, []);\n\n const selectedOptions: AssetsMultipleSelectorProps['selectedAssets'] & {} = useMemo(\n () =>\n selectedAssets.map(asset => ({\n ...asset,\n id: asset.id,\n label: asset.name,\n })),\n [selectedAssets]\n );\n\n const options: (Asset & { label: string })[] = useMemo(() => {\n const optionsMap: Record<string, Asset & { label: string }> = {};\n const allOptions = selectedOptions.length ? assetsData.concat(selectedOptions) : assetsData;\n allOptions.forEach((asset: Asset) => {\n optionsMap[asset.id] = {\n ...asset,\n id: asset.id,\n label: asset.name,\n };\n });\n\n return Object.values(sortBy(optionsMap, 'label'));\n }, [assetsData, selectedAssets, searchValue]);\n\n const loadAssets = useCallback(\n (\n search: string,\n customRequestQueryParams: AssetsMultipleSelectorProps['customRequestQueryParams'] = {}\n ) => {\n const params = {\n ...defaultQueryParams,\n per_page: DEFAULT_ASSETS_PER_PAGE,\n ...customRequestQueryParams,\n fields: [`${type}.name`].concat(customRequestQueryParams?.fields || []),\n };\n\n loadData({\n search,\n ...params,\n });\n },\n []\n );\n\n const handleChange = (_event: unknown, visibleSelectedOptions: Asset[], reason?: string) => {\n if (reason === 'reset') return;\n\n const newAssets = visibleSelectedOptions.map(option => {\n return {\n ...option,\n name: option.label as string,\n };\n });\n\n onChange(newAssets);\n };\n\n const onInputReset = () => {\n setSearchValue('');\n loadAssets('', customRequestQueryParams);\n };\n\n const handleInputChange = (value: string, reason: string) => {\n if (reason === 'reset' || value === '') {\n onInputReset();\n return;\n }\n\n if (value.trimStart() !== searchValue) {\n setSearchValue(value.trimStart());\n setIsLoading(true);\n loadAssets(value.trimStart(), customRequestQueryParams);\n }\n };\n\n const countNotShowedAssets = () => {\n const optionsCount = total - assetsData?.length;\n if (optionsCount === 0) return null;\n\n return optionsCount;\n };\n\n const paperFooter = useMemo(() => {\n const notShowedAssetsQuantity = countNotShowedAssets();\n return notShowedAssetsQuantity && !isLoading && searchValue ? (\n <div className={styles.footer}>\n {notShowedAssetsQuantity} additional items not displayed. Continue typing for more refined\n results.\n </div>\n ) : null;\n }, [assetsData, isLoading, !!searchValue, total]);\n\n const { listbox, paper, ...restClasses } = classes;\n\n return (\n <Search\n data-testid=\"offsetPadDropdown\"\n value={selectedOptions}\n onChange={handleChange}\n TextFieldProps={{ label }}\n // @ts-ignore\n className={className}\n classes={{\n listbox: classnames(styles.listbox, listbox),\n paper: classnames(styles.paper, paper),\n ...restClasses,\n }}\n loading={isLoading}\n options={options}\n placeholder=\"\"\n multiple\n filterSelectedOptions={false}\n AutocompleteProps={{ forcePopupIcon: true }}\n isHiddenAllOption\n onInputChangeCallback={handleInputChange}\n onInputReset={onInputReset}\n paperFooter={paperFooter}\n getOptionSelected={(option, value) => +option.id === +value.id}\n isPrioritizedSelectedOptions\n />\n );\n }\n);\n\nexport default AssetsMultipleSelector;\n"],"names":["useStyles","makeStyles","theme","listbox","maxHeight","paper","width","footer","fontSize","color","palette","primary","text6","lineHeight","padding","getDataFromResponseFn","response","_response$headers","data","jsonaDataFormatter","deserialize","total","Number","headers","get","initialSelectedAssets","defaultQueryParams","initialData","AssetsMultipleSelector","memo","_ref","_ref$selectedAssets","selectedAssets","onChange","label","className","type","customRequestQueryParams","_ref$classes","classes","styles","_useLoadedData","useLoadedData","loadFn","mapAssetGetRequest","isCacheEnabled","isLoading","setIsLoading","loadData","_ref2","assetsData","useState","_useState2","_slicedToArray","_useState","searchValue","setSearchValue","useEffect","loadAssets","selectedOptions","useMemo","map","asset","_objectSpread","id","name","options","optionsMap","length","concat","forEach","Object","values","sortBy","useCallback","search","arguments","undefined","params","per_page","fields","onInputReset","paperFooter","optionsCount","notShowedAssetsQuantity","_jsxs","children","restClasses","_excluded","_jsx","Search","value","_event","visibleSelectedOptions","reason","newAssets","option","TextFieldProps","classnames","loading","placeholder","multiple","filterSelectedOptions","AutocompleteProps","forcePopupIcon","isHiddenAllOption","onInputChangeCallback","trimStart","getOptionSelected","isPrioritizedSelectedOptions"],"mappings":"gsCAWA,IAAMA,EAAYC,EAAAA,YAAW,SAAAC,GAAK,MAAK,CACrCC,QAAS,CACPC,UAAW,KAEbC,MAAO,CACLC,MAAO,KAETC,OAAQ,CACNC,SAAU,GACVC,MAAOP,EAAMQ,QAAQC,QAAQC,MAC7BC,WAAY,WACZC,QAAS,YAEZ,IAEKC,EAAwB,SAACC,GAGzB,IAAAC,EACJ,MAAO,CACLC,KAAMC,EAAkBA,mBAACC,YAAYJ,EAASE,MAC9CG,MAAOC,OAAO,QAAAN,EAAAA,EAASO,eAAT,IAAAN,OAAA,EAAAA,EAAkBO,IAAI,WAAa,EAErD,EACMC,EAAiC,GACjCC,EAAqB,CAAA,EAErBC,EAAgD,CAAET,KAAM,GAAIG,MAAO,GAqCnEO,EAAyBC,EAAAA,MAC7B,SAQmCC,GAAA,IAAAC,EAAAD,EAPjCE,eAAAA,aAAiBP,EAAqBM,EACtCE,IAAAA,SACAC,IAAAA,MACAC,IAAAA,UACAC,IAAAA,KACAC,IAAAA,yBAAwBC,EAAAR,EACxBS,QAAAA,OAAO,IAAAD,EAAG,CAAA,EAAEA,EAENE,EAASxC,IAEfyC,EAAoDC,EAAc,CAChEC,OAAQC,EAAAA,mBAAmBR,GAAM,GACjCT,YAAaA,EACbZ,sBAAAA,EACA8B,gBAAgB,IAJVC,IAAAA,UAAWC,IAAAA,aAAc7B,IAAA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C,IAA4BtC,GAAaS,EAC9C8B,EAAAA,KAAA,MAAA,CAAKlD,UAAWK,EAAOjC,OAAO+E,SAAA,CAC3BF,EAAuB,gFAGxB,IACN,GAAG,CAAClC,EAAYJ,IAAaS,EAAalC,IAElClB,EAAmCoC,EAAnCpC,QAASE,EAA0BkC,EAA1BlC,MAAUkF,YAAgBhD,EAAOiD,GAElD,OACEC,EAAAA,IAACC,EAAAA,OAAM,CACL,cAAY,oBACZC,MAAOhC,EACP1B,SAtDiB,SAAC2D,EAAiBC,EAAiCC,GACtE,GAAe,UAAXA,EAAJ,CAEA,IAAMC,EAAYF,EAAuBhC,KAAI,SAAAmC,GAC3C,OAAAjC,EAAAA,EAAA,CAAA,EACKiC,GAAM,CAAA,EAAA,CACT/B,KAAM+B,EAAO9D,OAEjB,IAEAD,EAAS8D,EATe,GAsDtBE,eAAgB,CAAE/D,MAAAA,GAElBC,UAAWA,EACXI,QAAOwB,EAAA,CACL5D,QAAS+F,EAAU,QAAC1D,EAAOrC,QAASA,GACpCE,MAAO6F,EAAU,QAAC1D,EAAOnC,MAAOA,IAC7BkF,GAELY,QAASrD,EACToB,QAASA,EACTkC,YAAY,GACZC,UAAQ,EACRC,uBAAuB,EACvBC,kBAAmB,CAAEC,gBAAgB,GACrCC,mBAAiB,EACjBC,sBApDsB,SAACf,EAAeG,GACzB,UAAXA,GAAgC,KAAVH,EAKtBA,EAAMgB,cAAgBpD,IACxBC,EAAemC,EAAMgB,aACrB5D,GAAa,GACbW,EAAWiC,EAAMgB,YAAatE,IAP9B4C,KAmDAA,aAAcA,EACdC,YAAaA,EACb0B,kBAAmB,SAACZ,EAAQL,GAAK,OAAMK,EAAOhC,KAAQ2B,EAAM3B,EAAG,EAC/D6C,8BAA4B,GAGlC"}
1
+ {"version":3,"file":"AssetsMultipleSelector.js","sources":["../../../../src/components/AssetsMultipleSelector/AssetsMultipleSelector.tsx"],"sourcesContent":["import { memo, useCallback, useEffect, useMemo, useState } from 'react';\nimport classnames from 'classnames';\nimport { makeStyles } from '@material-ui/core';\nimport { sortBy } from 'lodash';\n\nimport { Search } from '../Search';\n\nimport { mapAssetGetRequest } from '~/clients/jsonApi';\nimport { jsonaDataFormatter } from '~/utils';\nimport useLoadedData from '~/effects/useLoadedData';\n\nconst useStyles = makeStyles(theme => ({\n listbox: {\n maxHeight: 360,\n },\n paper: {\n width: 364,\n },\n footer: {\n fontSize: 12,\n color: theme.palette.primary.text6,\n lineHeight: '16.872px',\n padding: '8px 16px',\n },\n}));\n\nconst getDataFromResponseFn = (response: {\n data: unknown;\n headers?: { get(name: string): string | null };\n}) => {\n return {\n data: jsonaDataFormatter.deserialize(response.data as string) as Asset[],\n total: Number(response.headers?.get('total')) || 0,\n };\n};\nconst initialSelectedAssets: Asset[] = [];\nconst defaultQueryParams = {};\nconst DEFAULT_ASSETS_PER_PAGE = 50;\nconst initialData: { data: Asset[]; total: number } = { data: [], total: 0 };\n\ntype Asset = { id: string; name: string } & Record<string, unknown>;\nexport type AssetsMultipleSelectorProps = {\n /**\n array of asset objects with required id and name fields.\n */\n selectedAssets: [] | Asset[];\n /**\n callback fires on asset selection with array of all selected assets.\n */\n onChange: (assets: Asset[] | []) => void;\n /**\n label for autocomplete input.\n */\n label: string;\n /**\n type of asset.\n */\n type: 'program' | 'rig' | 'well' | 'frac_fleet' | 'drillout_unit' | 'pad' | 'assets';\n /**\n css for root component.\n */\n className?: string;\n /**\n custom query params for assets request like fields, per_page.\n */\n customRequestQueryParams?: Record<string, unknown> & {\n fields?: string[];\n per_page?: number | string;\n };\n /**\n material ui autocomplete classes.\n */\n classes?: any;\n};\n\nconst AssetsMultipleSelector = memo(\n ({\n selectedAssets = initialSelectedAssets,\n onChange,\n label,\n className,\n type,\n customRequestQueryParams,\n classes = {},\n }: AssetsMultipleSelectorProps) => {\n const styles = useStyles();\n\n const { isLoading, setIsLoading, data, loadData } = useLoadedData({\n loadFn: mapAssetGetRequest(type, true),\n initialData: initialData as any,\n getDataFromResponseFn,\n isCacheEnabled: true,\n });\n const { data: assetsData, total } = data ?? initialData;\n const [searchValue, setSearchValue] = useState('');\n\n useEffect(() => {\n loadAssets('', customRequestQueryParams);\n }, []);\n\n const selectedOptions: AssetsMultipleSelectorProps['selectedAssets'] & {} = useMemo(\n () =>\n selectedAssets.map(asset => ({\n ...asset,\n id: asset.id,\n label: asset.name,\n })),\n [selectedAssets]\n );\n\n const options: (Asset & { label: string })[] = useMemo(() => {\n const optionsMap: Record<string, Asset & { label: string }> = {};\n const allOptions = selectedOptions.length ? assetsData.concat(selectedOptions) : assetsData;\n allOptions.forEach((asset: Asset) => {\n optionsMap[asset.id] = {\n ...asset,\n id: asset.id,\n label: asset.name,\n };\n });\n\n return Object.values(sortBy(optionsMap, 'label'));\n }, [assetsData, selectedAssets, searchValue]);\n\n const loadAssets = useCallback(\n (\n search: string,\n customRequestQueryParams: AssetsMultipleSelectorProps['customRequestQueryParams'] = {}\n ) => {\n const params = {\n ...defaultQueryParams,\n per_page: DEFAULT_ASSETS_PER_PAGE,\n ...customRequestQueryParams,\n fields: [`${type}.name`].concat(customRequestQueryParams?.fields || []),\n };\n\n loadData({\n search,\n ...params,\n });\n },\n []\n );\n\n const handleChange = (_event: unknown, visibleSelectedOptions: Asset[], reason?: string) => {\n if (reason === 'reset') return;\n\n const newAssets = visibleSelectedOptions.map(option => {\n return {\n ...option,\n name: option.label as string,\n };\n });\n\n onChange(newAssets);\n };\n\n const onInputReset = () => {\n setSearchValue('');\n loadAssets('', customRequestQueryParams);\n };\n\n const handleInputChange = (value: string, reason: string) => {\n if (reason === 'reset' || value === '') {\n onInputReset();\n return;\n }\n\n if (value.trimStart() !== searchValue) {\n setSearchValue(value.trimStart());\n setIsLoading(true);\n loadAssets(value.trimStart(), customRequestQueryParams);\n }\n };\n\n const countNotShowedAssets = () => {\n const optionsCount = total - assetsData?.length;\n if (optionsCount === 0) return null;\n\n return optionsCount;\n };\n\n const paperFooter = useMemo(() => {\n const notShowedAssetsQuantity = countNotShowedAssets();\n return notShowedAssetsQuantity && !isLoading && searchValue ? (\n <div className={styles.footer}>\n {notShowedAssetsQuantity} additional items not displayed. Continue typing for more refined\n results.\n </div>\n ) : null;\n }, [assetsData, isLoading, !!searchValue, total]);\n\n const { listbox, paper, ...restClasses } = classes;\n\n return (\n <Search\n data-testid=\"offsetPadDropdown\"\n value={selectedOptions}\n onChange={handleChange}\n TextFieldProps={{ label }}\n // @ts-ignore\n className={className}\n classes={{\n listbox: classnames(styles.listbox, listbox),\n paper: classnames(styles.paper, paper),\n ...restClasses,\n }}\n loading={isLoading}\n options={options}\n placeholder=\"\"\n multiple\n filterSelectedOptions={false}\n AutocompleteProps={{ forcePopupIcon: true }}\n isHiddenAllOption\n onInputChangeCallback={handleInputChange}\n onInputReset={onInputReset}\n paperFooter={paperFooter}\n getOptionSelected={(option, value) => +option.id === +value.id}\n isPrioritizedSelectedOptions\n />\n );\n }\n);\n\nexport default AssetsMultipleSelector;\n"],"names":["useStyles","makeStyles","theme","listbox","maxHeight","paper","width","footer","fontSize","color","palette","primary","text6","lineHeight","padding","getDataFromResponseFn","response","_response$headers","data","jsonaDataFormatter","deserialize","total","Number","headers","get","initialSelectedAssets","defaultQueryParams","initialData","AssetsMultipleSelector","memo","_ref","_ref$selectedAssets","selectedAssets","onChange","label","className","type","customRequestQueryParams","_ref$classes","classes","styles","_useLoadedData","useLoadedData","loadFn","mapAssetGetRequest","isCacheEnabled","isLoading","setIsLoading","loadData","_ref2","assetsData","useState","_useState2","_slicedToArray","_useState","searchValue","setSearchValue","useEffect","loadAssets","selectedOptions","useMemo","map","asset","_objectSpread","id","name","options","optionsMap","length","concat","forEach","Object","values","sortBy","useCallback","search","arguments","undefined","params","per_page","fields","onInputReset","paperFooter","optionsCount","notShowedAssetsQuantity","_jsxs","children","restClasses","_excluded","_jsx","Search","value","_event","visibleSelectedOptions","reason","newAssets","option","TextFieldProps","classnames","loading","placeholder","multiple","filterSelectedOptions","AutocompleteProps","forcePopupIcon","isHiddenAllOption","onInputCh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tE,GAAe,UAAXA,EAAJ,CAEA,IAAMC,EAAYF,EAAuBhC,KAAI,SAAAmC,GAC3C,OAAAjC,EAAAA,EAAA,CAAA,EACKiC,GAAM,CAAA,EAAA,CACT/B,KAAM+B,EAAO9D,OAEjB,IAEAD,EAAS8D,EATe,GAsDtBE,eAAgB,CAAE/D,MAAAA,GAElBC,UAAWA,EACXI,QAAOwB,EAAA,CACL5D,QAAS+F,EAAU,QAAC1D,EAAOrC,QAASA,GACpCE,MAAO6F,EAAU,QAAC1D,EAAOnC,MAAOA,IAC7BkF,GAELY,QAASrD,EACToB,QAASA,EACTkC,YAAY,GACZC,UAAQ,EACRC,uBAAuB,EACvBC,kBAAmB,CAAEC,gBAAgB,GACrCC,mBAAiB,EACjBC,sBApDsB,SAACf,EAAeG,GACzB,UAAXA,GAAgC,KAAVH,EAKtBA,EAAMgB,cAAgBpD,IACxBC,EAAemC,EAAMgB,aACrB5D,GAAa,GACbW,EAAWiC,EAAMgB,YAAatE,IAP9B4C,KAmDAA,aAAcA,EACdC,YAAaA,EACb0B,kBAAmB,SAACZ,EAAQL,GAAK,OAAMK,EAAOhC,KAAQ2B,EAAM3B,EAAG,EAC/D6C,8BAA4B,GAGlC"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var s=require("../../componentsV2/ButtonIcon/ButtonIcon.js"),o=require("../../componentsV2/Tooltip/Tooltip.js"),c=require("../../icons/iconParkIcons.js");require("../../icons/customIcons/icons/AddMessage.js"),require("../../icons/customIcons/icons/DragOne.js"),require("../../icons/customIcons/icons/Attention.js"),require("../../icons/customIcons/icons/Collapse.js"),require("../../icons/customIcons/icons/Dashboard.js"),require("../../icons/customIcons/icons/Expand.js"),require("../../icons/customIcons/icons/FolderClosed.js"),require("../../icons/customIcons/icons/FolderClosedFilled.js"),require("../../icons/customIcons/icons/FolderOpened.js"),require("../../icons/customIcons/icons/GreaterOrEqual.js"),require("../../icons/customIcons/icons/LessOrEqual.js"),require("../../icons/customIcons/icons/Search.js"),require("../../icons/customIcons/icons/SearchOne.js"),require("../../icons/customIcons/icons/Wellhub.js"),require("../../icons/customIcons/icons/MultiRuler.js"),require("../../icons/customIcons/icons/Checkbox.js"),require("../../icons/customIcons/icons/CheckboxChecked.js"),require("../../icons/customIcons/icons/CheckboxIndeterminate.js"),require("../../icons/customIcons/icons/Radio.js"),require("../../icons/customIcons/icons/RadioChecked.js"),require("../../icons/customIcons/icons/SimulFrac.js"),require("../../icons/customIcons/icons/ZipperFrac.js"),require("../../icons/customIcons/icons/CautionFilled.js"),require("../../icons/customIcons/icons/InfoRounded.js"),require("../../icons/customIcons/icons/FlameFilled.js"),require("../../icons/customIcons/icons/MoreApp.js"),require("../../icons/customIcons/icons/Pad.js"),require("../../icons/customIcons/icons/DrilloutUnit.js"),require("../../icons/customIcons/icons/FracFleet.js"),require("../../icons/customIcons/icons/Global.js"),require("../../icons/customIcons/icons/Program.js"),require("../../icons/customIcons/icons/Rig.js"),require("../../icons/customIcons/icons/Well.js"),require("../../icons/customIcons/icons/Gap.js"),require("../../icons/customIcons/icons/Pin.js"),require("../../icons/customIcons/icons/PinOne.js"),require("../../icons/customIcons/icons/PinOneCrossed.js"),require("../../icons/customIcons/icons/CloseOneFilled.js"),require("../../icons/customIcons/icons/AttentionFilled.js"),require("../../icons/customIcons/icons/CheckOneFilled.js"),require("../../icons/customIcons/icons/Archive.js"),require("../../icons/customIcons/icons/ArchiveCancel.js"),require("../../icons/customIcons/icons/Unarchive.js"),require("../../icons/customIcons/icons/Archived.js"),require("../../icons/customIcons/icons/InterventionUnit.js"),require("../../icons/customIcons/icons/CloudDelete.js"),require("../../icons/customIcons/icons/Lasso.js"),require("../../icons/customIcons/icons/Radius.js"),require("../../icons/customIcons/icons/ErrorOps.js"),require("../../icons/customIcons/icons/DataTypeOps.js"),require("../../icons/customIcons/icons/FalsePositiveOps.js"),require("../../icons/customIcons/icons/CalibrationOps.js"),require("../../icons/customIcons/icons/CriticalOps.js"),require("../../icons/customIcons/icons/Company.js"),require("../../icons/customIcons/icons/ArchiveOne.js"),require("../../icons/customIcons/icons/ParseBotFusion.js"),require("../../icons/customIcons/icons/Connect.js"),require("../../icons/customIcons/icons/PuzzleOne.js"),require("../../icons/customIcons/icons/Feed.js"),require("../../icons/customIcons/icons/Prompt.js"),require("../../icons/customIcons/icons/Companies.js"),require("../../icons/customIcons/icons/ClipboardAi.js"),require("../../icons/customIcons/icons/Key.js"),require("../../icons/customIcons/icons/AtSignCrossed.js"),require("../../icons/customIcons/icons/MappingManual.js"),require("../../icons/customIcons/icons/Mapping.js"),require("../../icons/customIcons/icons/Metrics.js"),require("../../icons/customIcons/icons/Drops.js"),require("../../icons/customIcons/icons/ClipboardSearch.js"),require("../../icons/customIcons/icons/Template.js"),require("../../icons/customIcons/icons/ClipboardMetrics.js"),require("../../icons/customIcons/icons/ClipboardBuilder.js"),require("../../icons/customIcons/icons/UnitConversion.js"),require("../../icons/customIcons/icons/NPT.js"),require("../../icons/customIcons/icons/GuidedFrac.js");var i=require("./AttachFileButton.scss.js"),n=require("react/jsx-runtime"),e="image/*,video/*,audio/*,.pdf,.doc,.docx,.xlsx,.xls,.ppt,.pptx,.txt,.csv,.zip,.rar";exports.ACCEPTED_ATTACHMENT_TYPES=e,exports.AttachFileButton=function(r){var u=r.inputRef,t=r.onClick,m=r.onFileSelect,j=r.disabled,I=r.tooltip,q=void 0===I?"Attach file":I,l=r.accept,a=void 0===l?e:l,d=r.multiple,p=r.testId,C=void 0===p?"attach-file-button":p;return n.jsxs(n.Fragment,{children:[n.jsx("input",{ref:u,type:"file",accept:a,multiple:d,className:i.input,onChange:m}),n.jsx(o.Tooltip,{title:q,children:n.jsx("span",{className:i.trigger,children:n.jsx(s.ButtonIcon,{size:"xs",type:"tertiary",disabled:j,onClick:t,testId:C,children:n.jsx(c.PaperclipIcon,{size:16})})})})]})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var s=require("@babel/runtime/helpers/slicedToArray"),o=require("react"),c=require("../../componentsV2/ButtonIcon/ButtonIcon.js"),e=require("../../componentsV2/Menu/Menu.js"),i=require("../../componentsV2/Tooltip/Tooltip.js"),n=require("../../icons/iconParkIcons.js");require("../../icons/customIcons/icons/AddMessage.js"),require("../../icons/customIcons/icons/DragOne.js"),require("../../icons/customIcons/icons/Attention.js"),require("../../icons/customIcons/icons/Collapse.js"),require("../../icons/customIcons/icons/Dashboard.js"),require("../../icons/customIcons/icons/Expand.js"),require("../../icons/customIcons/icons/FolderClosed.js"),require("../../icons/customIcons/icons/FolderClosedFilled.js"),require("../../icons/customIcons/icons/FolderOpened.js"),require("../../icons/customIcons/icons/GreaterOrEqual.js"),require("../../icons/customIcons/icons/LessOrEqual.js"),require("../../icons/customIcons/icons/Search.js"),require("../../icons/customIcons/icons/SearchOne.js");var r=require("../../icons/customIcons/icons/Wellhub.js");require("../../icons/customIcons/icons/MultiRuler.js"),require("../../icons/customIcons/icons/Checkbox.js"),require("../../icons/customIcons/icons/CheckboxChecked.js"),require("../../icons/customIcons/icons/CheckboxIndeterminate.js"),require("../../icons/customIcons/icons/Radio.js"),require("../../icons/customIcons/icons/RadioChecked.js"),require("../../icons/customIcons/icons/SimulFrac.js"),require("../../icons/customIcons/icons/ZipperFrac.js"),require("../../icons/customIcons/icons/CautionFilled.js"),require("../../icons/customIcons/icons/InfoRounded.js"),require("../../icons/customIcons/icons/FlameFilled.js"),require("../../icons/customIcons/icons/MoreApp.js"),require("../../icons/customIcons/icons/Pad.js"),require("../../icons/customIcons/icons/DrilloutUnit.js"),require("../../icons/customIcons/icons/FracFleet.js"),require("../../icons/customIcons/icons/Global.js"),require("../../icons/customIcons/icons/Program.js"),require("../../icons/customIcons/icons/Rig.js"),require("../../icons/customIcons/icons/Well.js"),require("../../icons/customIcons/icons/Gap.js"),require("../../icons/customIcons/icons/Pin.js"),require("../../icons/customIcons/icons/PinOne.js"),require("../../icons/customIcons/icons/PinOneCrossed.js"),require("../../icons/customIcons/icons/CloseOneFilled.js"),require("../../icons/customIcons/icons/AttentionFilled.js"),require("../../icons/customIcons/icons/CheckOneFilled.js"),require("../../icons/customIcons/icons/Archive.js"),require("../../icons/customIcons/icons/ArchiveCancel.js"),require("../../icons/customIcons/icons/Unarchive.js"),require("../../icons/customIcons/icons/Archived.js"),require("../../icons/customIcons/icons/InterventionUnit.js"),require("../../icons/customIcons/icons/CloudDelete.js"),require("../../icons/customIcons/icons/Lasso.js"),require("../../icons/customIcons/icons/Radius.js"),require("../../icons/customIcons/icons/ErrorOps.js"),require("../../icons/customIcons/icons/DataTypeOps.js"),require("../../icons/customIcons/icons/FalsePositiveOps.js"),require("../../icons/customIcons/icons/CalibrationOps.js"),require("../../icons/customIcons/icons/CriticalOps.js"),require("../../icons/customIcons/icons/Company.js"),require("../../icons/customIcons/icons/ArchiveOne.js"),require("../../icons/customIcons/icons/ParseBotFusion.js"),require("../../icons/customIcons/icons/Connect.js"),require("../../icons/customIcons/icons/PuzzleOne.js"),require("../../icons/customIcons/icons/Feed.js"),require("../../icons/customIcons/icons/Prompt.js"),require("../../icons/customIcons/icons/Companies.js"),require("../../icons/customIcons/icons/ClipboardAi.js"),require("../../icons/customIcons/icons/Key.js"),require("../../icons/customIcons/icons/AtSignCrossed.js"),require("../../icons/customIcons/icons/MappingManual.js"),require("../../icons/customIcons/icons/Mapping.js"),require("../../icons/customIcons/icons/Metrics.js"),require("../../icons/customIcons/icons/Drops.js"),require("../../icons/customIcons/icons/ClipboardSearch.js"),require("../../icons/customIcons/icons/Template.js"),require("../../icons/customIcons/icons/ClipboardMetrics.js"),require("../../icons/customIcons/icons/ClipboardBuilder.js"),require("../../icons/customIcons/icons/UnitConversion.js"),require("../../icons/customIcons/icons/NPT.js"),require("../../icons/customIcons/icons/GuidedFrac.js");var u=require("./AttachFileButton.scss.js"),t=require("react/jsx-runtime");function l(s){return s&&"object"==typeof s&&"default"in s?s:{default:s}}var m=l(s),j="image/*,video/*,audio/*,.pdf,.doc,.docx,.xlsx,.xls,.ppt,.pptx,.txt,.csv,.zip,.rar";exports.ACCEPTED_ATTACHMENT_TYPES=j,exports.AttachFileButton=function(s){var l=s.inputRef,a=s.onClick,I=s.onFileSelect,q=s.onWellhubSelect,d=s.wellhubDisabled,p=s.disabled,C=s.tooltip,h=void 0===C?"Attach files":C,x=s.accept,b=void 0===x?j:x,f=s.multiple,F=s.testId,v=void 0===F?"attach-file-button":F,A=o.useState(null),O=m.default(A,2),M=O[0],P=O[1],g=function(s){return function(){P(null),s()}};return t.jsxs(t.Fragment,{children:[t.jsx("input",{ref:l,type:"file",accept:b,multiple:f,className:u.input,onChange:I}),t.jsx(i.Tooltip,{title:h,children:t.jsx("span",{className:u.trigger,children:t.jsx(c.ButtonIcon,{size:"xs",type:"tertiary",disabled:p,isActive:!!M,onClick:q?function(s){return P(s.currentTarget)}:a,testId:v,children:t.jsx(n.PaperclipIcon,{size:16})})})}),!!q&&!!M&&t.jsxs(e.Menu,{open:!0,anchorEl:M,placement:"top-start",onClose:function(){return P(null)},children:[t.jsx(e.Menu.Item,{prefix:t.jsx(n.LaptopComputerIcon,{}),onClick:g(a),testId:"".concat(v,"-computer"),children:"Upload from my computer"}),t.jsx(e.Menu.Item,{prefix:t.jsx(r.WellhubCustomIcon,{}),disabled:d,onClick:g(q),testId:"".concat(v,"-wellhub"),children:"Wellhub files"})]})]})};
2
2
  //# sourceMappingURL=AttachFileButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AttachFileButton.js","sources":["../../../../src/components/AttachFileButton/AttachFileButton.tsx"],"sourcesContent":["import { ChangeEvent, RefObject } from 'react';\n\nimport { ButtonIcon } from '../../componentsV2/ButtonIcon';\nimport { Tooltip } from '../../componentsV2/Tooltip';\nimport { PaperclipIcon } from '../../icons';\n\nimport styles from './AttachFileButton.scss';\n\nexport const ACCEPTED_ATTACHMENT_TYPES =\n 'image/*,video/*,audio/*,.pdf,.doc,.docx,.xlsx,.xls,.ppt,.pptx,.txt,.csv,.zip,.rar';\n\nexport type AttachFileButtonProps = {\n inputRef: RefObject<HTMLInputElement>;\n onClick: () => void;\n onFileSelect: (event: ChangeEvent<HTMLInputElement>) => void;\n disabled?: boolean;\n tooltip?: string;\n accept?: string;\n multiple?: boolean;\n testId?: string;\n};\n\n// Unlike FileUploadIconButton, this one stays put while an upload runs.\nexport const AttachFileButton = ({\n inputRef,\n onClick,\n onFileSelect,\n disabled,\n tooltip = 'Attach file',\n accept = ACCEPTED_ATTACHMENT_TYPES,\n multiple,\n testId = 'attach-file-button',\n}: AttachFileButtonProps) => (\n <>\n <input\n ref={inputRef}\n type=\"file\"\n accept={accept}\n multiple={multiple}\n className={styles.input}\n onChange={onFileSelect}\n />\n <Tooltip title={tooltip}>\n <span className={styles.trigger}>\n <ButtonIcon size=\"xs\" type=\"tertiary\" disabled={disabled} onClick={onClick} testId={testId}>\n <PaperclipIcon size={16} />\n </ButtonIcon>\n </span>\n </Tooltip>\n </>\n);\n"],"names":["ACCEPTED_ATTACHMENT_TYPES","_ref","inputRef","onClick","onFileSelect","disabled","_ref$tooltip","tooltip","_ref$accept","accept","multiple","_ref$testId","testId","_jsxs","_Fragment","children","_jsx","jsx","ref","type","className","styles","input","onChange","Tooltip","title","trigger","ButtonIcon","size","PaperclipIcon"],"mappings":"4yIAQaA,EACX,iJAc8B,SAAHC,GAAA,IAC3BC,IAAAA,SACAC,IAAAA,QACAC,IAAAA,aACAC,IAAAA,SAAQC,EAAAL,EACRM,QAAAA,aAAU,cAAaD,EAAAE,EAAAP,EACvBQ,OAAAA,aAAST,EAAyBQ,EAClCE,IAAAA,SAAQC,EAAAV,EACRW,OAAAA,aAAS,qBAAoBD,EAAA,OAE7BE,EAAAA,KAAAC,EAAAA,SAAA,CAAAC,SACE,CAAAC,EAAAC,IAAA,QAAA,CACEC,IAAKhB,EACLiB,KAAK,OACLV,OAAQA,EACRC,SAAUA,EACVU,UAAWC,EAAOC,MAClBC,SAAUnB,IAEZY,MAACQ,UAAO,CAACC,MAAOlB,EAAQQ,SACtBC,EAAAC,IAAA,OAAA,CAAMG,UAAWC,EAAOK,QAAQX,SAC9BC,MAACW,aAAU,CAACC,KAAK,KAAKT,KAAK,WAAWd,SAAUA,EAAUF,QAASA,EAASS,OAAQA,EAAOG,SACzFC,MAACa,gBAAa,CAACD,KAAM,aAI1B"}
1
+ {"version":3,"file":"AttachFileButton.js","sources":["../../../../src/components/AttachFileButton/AttachFileButton.tsx"],"sourcesContent":["import { ChangeEvent, RefObject, useState } from 'react';\n\nimport { ButtonIcon } from '../../componentsV2/ButtonIcon';\nimport { Menu } from '../../componentsV2/Menu';\nimport { Tooltip } from '../../componentsV2/Tooltip';\nimport { LaptopComputerIcon, PaperclipIcon, WellhubCustomIcon } from '../../icons';\n\nimport styles from './AttachFileButton.scss';\n\nexport const ACCEPTED_ATTACHMENT_TYPES =\n 'image/*,video/*,audio/*,.pdf,.doc,.docx,.xlsx,.xls,.ppt,.pptx,.txt,.csv,.zip,.rar';\n\nexport type AttachFileButtonProps = {\n inputRef: RefObject<HTMLInputElement>;\n onClick: () => void;\n onFileSelect: (event: ChangeEvent<HTMLInputElement>) => void;\n onWellhubSelect?: () => void;\n wellhubDisabled?: boolean;\n disabled?: boolean;\n tooltip?: string;\n accept?: string;\n multiple?: boolean;\n testId?: string;\n};\n\n// Unlike FileUploadIconButton, this one stays put while an upload runs.\nexport const AttachFileButton = ({\n inputRef,\n onClick,\n onFileSelect,\n onWellhubSelect,\n wellhubDisabled,\n disabled,\n tooltip = 'Attach files',\n accept = ACCEPTED_ATTACHMENT_TYPES,\n multiple,\n testId = 'attach-file-button',\n}: AttachFileButtonProps) => {\n const [menuAnchor, setMenuAnchor] = useState<HTMLElement | null>(null);\n\n const closeAnd = (action: () => void) => () => {\n setMenuAnchor(null);\n action();\n };\n\n return (\n <>\n <input\n ref={inputRef}\n type=\"file\"\n accept={accept}\n multiple={multiple}\n className={styles.input}\n onChange={onFileSelect}\n />\n <Tooltip title={tooltip}>\n <span className={styles.trigger}>\n <ButtonIcon\n size=\"xs\"\n type=\"tertiary\"\n disabled={disabled}\n isActive={!!menuAnchor}\n onClick={onWellhubSelect ? event => setMenuAnchor(event.currentTarget) : onClick}\n testId={testId}\n >\n <PaperclipIcon size={16} />\n </ButtonIcon>\n </span>\n </Tooltip>\n\n {!!onWellhubSelect && !!menuAnchor && (\n <Menu open anchorEl={menuAnchor} placement=\"top-start\" onClose={() => setMenuAnchor(null)}>\n <Menu.Item\n prefix={<LaptopComputerIcon />}\n onClick={closeAnd(onClick)}\n testId={`${testId}-computer`}\n >\n Upload from my computer\n </Menu.Item>\n <Menu.Item\n prefix={<WellhubCustomIcon />}\n disabled={wellhubDisabled}\n onClick={closeAnd(onWellhubSelect)}\n testId={`${testId}-wellhub`}\n >\n Wellhub files\n </Menu.Item>\n </Menu>\n )}\n </>\n );\n};\n"],"names":["ACCEPTED_ATTACHMENT_TYPES","_ref","inputRef","onClick","onFileSelect","onWellhubSelect","wellhubDisabled","disabled","_ref$tooltip","tooltip","_ref$accept","accept","multiple","_ref$testId","testId","useState","_useState2","_slicedToArray","_useState","menuAnchor","setMenuAnchor","closeAnd","action","_jsxs","_Fragment","children","_jsx","jsx","ref","type","className","styles","input","onChange","Tooltip","title","trigger","ButtonIcon","size","isActive","event","currentTarget","PaperclipIcon","jsxs","Menu","open","anchorEl","placement","onClose","Item","prefix","LaptopComputerIcon","concat","WellhubCustomIcon"],"mappings":"u/IASaA,EACX,iJAgB8B,SAWHC,GAAA,IAV3BC,IAAAA,SACAC,IAAAA,QACAC,IAAAA,aACAC,IAAAA,gBACAC,IAAAA,gBACAC,IAAAA,SAAQC,EAAAP,EACRQ,QAAAA,aAAU,eAAcD,EAAAE,EAAAT,EACxBU,OAAAA,aAASX,EAAyBU,EAClCE,IAAAA,SAAQC,EAAAZ,EACRa,OAAAA,aAAS,qBAAoBD,EAEOE,EAAAA,EAAQA,SAAqB,MAAKC,EAAAC,EAAAA,QAAAC,EAAA,GAA/DC,EAAUH,EAAA,GAAEI,EAAaJ,EAAA,GAE1BK,EAAW,SAACC,GAAkB,OAAK,WACvCF,EAAc,MACdE,IACD,EAED,OACEC,EAAAA,KAAAC,EAAAA,SAAA,CAAAC,SACE,CAAAC,EAAAC,IAAA,QAAA,CACEC,IAAK1B,EACL2B,KAAK,OACLlB,OAAQA,EACRC,SAAUA,EACVkB,UAAWC,EAAOC,MAClBC,SAAU7B,IAEZsB,MAACQ,UAAO,CAACC,MAAO1B,EAAQgB,SACtBC,EAAAC,IAAA,OAAA,CAAMG,UAAWC,EAAOK,QAAQX,SAC9BC,MAACW,aAAU,CACTC,KAAK,KACLT,KAAK,WACLtB,SAAUA,EACVgC,WAAYpB,EACZhB,QAASE,EAAkB,SAAAmC,GAAK,OAAIpB,EAAcoB,EAAMC,cAAc,EAAGtC,EACzEW,OAAQA,EAAOW,SAEfC,MAACgB,gBAAa,CAACJ,KAAM,aAKxBjC,KAAqBc,GACtBI,EAAAoB,KAACC,OAAI,CAACC,MAAI,EAACC,SAAU3B,EAAY4B,UAAU,YAAYC,QAAS,WAAA,OAAM5B,EAAc,KAAM,EAAAK,SACxF,CAAAC,EAAAA,IAACkB,EAAIA,KAACK,KAAI,CACRC,OAAQxB,EAAAA,IAACyB,EAAkBA,mBAAI,IAC/BhD,QAASkB,EAASlB,GAClBW,OAAM,GAAAsC,OAAKtC,EAAkB,aAAAW,SAAA,4BAI/BC,EAAAA,IAACkB,EAAIA,KAACK,KAAI,CACRC,OAAQxB,EAAAA,IAAC2B,EAAiBA,kBAAI,IAC9B9C,SAAUD,EACVH,QAASkB,EAAShB,GAClBS,OAAM,GAAAsC,OAAKtC,EAAiB,YAAAW,SAAA,uBAQxC"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("@babel/runtime/helpers/slicedToArray"),s=require("@babel/runtime/helpers/defineProperty"),i=require("@babel/runtime/helpers/objectWithoutProperties"),o=require("react"),n=require("prop-types"),t=require("react-player"),r=require("classnames"),c=require("@material-ui/core/styles"),a=require("@material-ui/core"),l=require("@material-ui/icons/Image"),u=require("@material-ui/icons/Fullscreen"),m=require("@material-ui/core/colors/grey"),d=require("../NewDocumentViewer/NewDocumentViewer.js"),p=require("../NewDocumentViewer/icons/UnavailableFileIcon.js"),j=require("../../componentsV2/ImageViewer/ImageViewer.js"),h=require("./styles.css.js"),q=require("../FileTypeIcon.js"),I=require("../IconButton/index.js"),g=require("../../utils/mobileDetect.js"),f=require("../../utils/fileExtension.js"),v=require("../../utils/filePreview.js"),b=require("../../icons/iconParkIcons.js");require("../../icons/customIcons/icons/AddMessage.js"),require("../../icons/customIcons/icons/DragOne.js"),require("../../icons/customIcons/icons/Attention.js"),require("../../icons/customIcons/icons/Collapse.js"),require("../../icons/customIcons/icons/Dashboard.js"),require("../../icons/customIcons/icons/Expand.js"),require("../../icons/customIcons/icons/FolderClosed.js"),require("../../icons/customIcons/icons/FolderClosedFilled.js"),require("../../icons/customIcons/icons/FolderOpened.js"),require("../../icons/customIcons/icons/GreaterOrEqual.js"),require("../../icons/customIcons/icons/LessOrEqual.js"),require("../../icons/customIcons/icons/Search.js"),require("../../icons/customIcons/icons/SearchOne.js"),require("../../icons/customIcons/icons/Wellhub.js"),require("../../icons/customIcons/icons/MultiRuler.js"),require("../../icons/customIcons/icons/Checkbox.js"),require("../../icons/customIcons/icons/CheckboxChecked.js"),require("../../icons/customIcons/icons/CheckboxIndeterminate.js"),require("../../icons/customIcons/icons/Radio.js"),require("../../icons/customIcons/icons/RadioChecked.js"),require("../../icons/customIcons/icons/SimulFrac.js"),require("../../icons/customIcons/icons/ZipperFrac.js"),require("../../icons/customIcons/icons/CautionFilled.js"),require("../../icons/customIcons/icons/InfoRounded.js"),require("../../icons/customIcons/icons/FlameFilled.js"),require("../../icons/customIcons/icons/MoreApp.js"),require("../../icons/customIcons/icons/Pad.js"),require("../../icons/customIcons/icons/DrilloutUnit.js"),require("../../icons/customIcons/icons/FracFleet.js"),require("../../icons/customIcons/icons/Global.js"),require("../../icons/customIcons/icons/Program.js"),require("../../icons/customIcons/icons/Rig.js"),require("../../icons/customIcons/icons/Well.js"),require("../../icons/customIcons/icons/Gap.js"),require("../../icons/customIcons/icons/Pin.js"),require("../../icons/customIcons/icons/PinOne.js"),require("../../icons/customIcons/icons/PinOneCrossed.js"),require("../../icons/customIcons/icons/CloseOneFilled.js"),require("../../icons/customIcons/icons/AttentionFilled.js"),require("../../icons/customIcons/icons/CheckOneFilled.js"),require("../../icons/customIcons/icons/Archive.js"),require("../../icons/customIcons/icons/ArchiveCancel.js"),require("../../icons/customIcons/icons/Unarchive.js"),require("../../icons/customIcons/icons/Archived.js"),require("../../icons/customIcons/icons/InterventionUnit.js"),require("../../icons/customIcons/icons/CloudDelete.js"),require("../../icons/customIcons/icons/Lasso.js"),require("../../icons/customIcons/icons/Radius.js"),require("../../icons/customIcons/icons/ErrorOps.js"),require("../../icons/customIcons/icons/DataTypeOps.js"),require("../../icons/customIcons/icons/FalsePositiveOps.js"),require("../../icons/customIcons/icons/CalibrationOps.js"),require("../../icons/customIcons/icons/CriticalOps.js"),require("../../icons/customIcons/icons/Company.js"),require("../../icons/customIcons/icons/ArchiveOne.js"),require("../../icons/customIcons/icons/ParseBotFusion.js"),require("../../icons/customIcons/icons/Connect.js"),require("../../icons/customIcons/icons/PuzzleOne.js"),require("../../icons/customIcons/icons/Feed.js"),require("../../icons/customIcons/icons/Prompt.js"),require("../../icons/customIcons/icons/Companies.js"),require("../../icons/customIcons/icons/ClipboardAi.js"),require("../../icons/customIcons/icons/Key.js"),require("../../icons/customIcons/icons/AtSignCrossed.js"),require("../../icons/customIcons/icons/MappingManual.js"),require("../../icons/customIcons/icons/Mapping.js"),require("../../icons/customIcons/icons/Metrics.js"),require("../../icons/customIcons/icons/Drops.js"),require("../../icons/customIcons/icons/ClipboardSearch.js"),require("../../icons/customIcons/icons/Template.js"),require("../../icons/customIcons/icons/ClipboardMetrics.js"),require("../../icons/customIcons/icons/ClipboardBuilder.js"),require("../../icons/customIcons/icons/UnitConversion.js"),require("../../icons/customIcons/icons/NPT.js"),require("../../icons/customIcons/icons/GuidedFrac.js"),require("../../clients/subscriptions/constants.js"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("querystring"),require("uuid/v1"),require("lodash"),require("../../clients/subscriptions.v1.js"),require("../../clients/jsonApi/index.js"),require("../../clients/subscriptions/subscriptions-client.factory.js"),require("immutable"),require("query-string"),require("../../constants/goals.js"),require("../../constants/segment.js"),require("../../constants/alerts.js"),require("../../constants/apps.js"),require("../../constants/drillstring.js"),require("../../constants/completion.js"),require("../../constants/appPackages.js"),require("../../constants/notifications.js"),require("../../constants/feed.js"),require("../../constants/bha.js"),require("../../constants/corvaCompanyId.js"),require("../GradientManager/configuration/constants.js");var x=require("../../effects/useSignedURL.js");require("../../utils/index.js"),require("uuid"),require("jsona"),require("../../utils/env.js"),require("../StatusBadge/constants.js"),require("@babel/runtime/helpers/toConsumableArray"),require("lodash/set"),require("lodash/get"),require("lodash/unset"),require("moment"),require("../../clients/api/apiCore.js"),require("../../clients/constants.js"),require("../../clients/sso/auth0.js"),require("../../clients/sso/oauth2.js"),require("../../clients/api/rateLimiter.js"),require("lodash/isEmpty"),require("lodash/sortBy"),require("../../constants/streamSourceType.js"),require("../DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchContext.js"),require("../../componentsV2/AppCommonsProvider/AppCommonsProvider.js"),require("../../componentsV2/AppCommonsProvider/AppCommonsContext.js"),require("../../componentsV2/AppPanel/AppPanelsContext.js");var C=require("../../utils/main.js"),w=require("react/jsx-runtime");function y(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var N=y(e),P=y(s),F=y(i),O=y(n),A=y(t),D=y(r),S=y(l),z=y(u),k=y(m),W=["displayName","fileName","attachmentSize","size","small"];function U(e,s){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);s&&(o=o.filter((function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable}))),i.push.apply(i,o)}return i}function R(e){for(var s=1;s<arguments.length;s++){var i=null!=arguments[s]?arguments[s]:{};s%2?U(Object(i),!0).forEach((function(s){P.default(e,s,i[s])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):U(Object(i)).forEach((function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(i,s))}))}return e}var L=k.default[200],E=k.default[400],T={label:"small",value:135},V={label:"medium",value:300},M={fileImage:function(e,s){return{maxWidth:"100%",borderRadius:4,overflow:"hidden",maxHeight:s===T.label?T.value:V.value,display:e?"initial":"none",cursor:"pointer"}},fileDownloadWrapper:{padding:"10px 10px 10px 5px",border:"1px solid #616161",borderRadius:3,maxWidth:500,width:"75%"},imagePlaceholder:{position:"relative",backgroundColor:L,borderRadius:3,marginTop:10,height:135,width:135}},B=function(e){var s,i,o=x(e.attachmentFileName)||e.attachmentUrl;return w.jsxs(w.Fragment,{children:[w.jsxs("div",{onClick:e.openLightbox,className:h.cAttachmentImg,children:[w.jsx("img",{"data-testid":"".concat("Attachment","_image"),src:o,style:M.fileImage(!!e.imageDimensions,e.size),alt:"Attachment",onLoad:e.onImageLoaded}),w.jsx("div",{"data-testid":"".concat("Attachment","_button"),className:h.cAttachmentImgPreviwBtn,children:w.jsx(z.default,{})})]}),!e.imageDimensions&&w.jsx("div",{style:M.imagePlaceholder,children:w.jsx(S.default,{"data-testid":"".concat("Attachment","_placeholder"),className:e.classes.imageIconRoot,htmlColor:E,fontSize:"large"})}),e.lightboxIsOpen&&w.jsx(j.ImageViewer,{src:o,onClose:e.handleLightboxClose,onOpen:e.handleLightboxOpen,width:null===(s=e.imageDimensions)||void 0===s?void 0:s.width,height:null===(i=e.imageDimensions)||void 0===i?void 0:i.height})]})},G=function(e){var s=C.default.getFileNameWithExtensionFromPath(e.displayName||e.attachmentUrl),i=x(e.attachmentFileName,"inline"),o=x(e.attachmentFileName,"attachment"),n=v.getIsPreviewUnavailable(s);return w.jsxs("div",{className:h.cAttachmentFileWrapper,children:[w.jsxs("div",{className:D.default(h.cAttachmentFileDownloadWrapper,n&&e.classes.disabledPreview),style:M.fileDownloadWrapper,onClick:function(){n||e.openPreview()},children:[n?w.jsx(p.UnavailableFileIcon,{className:e.classes.unavailableFileIcon}):w.jsx(q,{fileName:e.displayName||e.attachmentUrl,className:h.cAttachmentFileDownloadWrapperFileIcon,size:e.small?25:50}),w.jsxs("div",{className:e.classes.titleContainer,children:[n&&w.jsx("div",{className:e.classes.caption,children:"Preview unavailable"}),w.jsx("div",{"data-testid":"".concat("Attachment","_name"),className:D.default(h.cAttachmentFileDownloadWrapperFileName,n&&e.classes.fileName),children:w.jsx(a.Typography,{variant:"subtitle2",noWrap:!0,className:e.classes.unavailableFileName,children:s})})]}),w.jsx(d,{fileUrl:i,classes:{root:e.classes.dialogRoot,paper:g.isNativeDetected?e.classes.nativeDialog:e.classes.dialog},fileName:s,fileSize:e.attachmentSize,onClose:e.closePreview,open:e.previewIsOpen})]}),w.jsx("a",{download:e.displayName,href:o,className:h.cAttachmentFileDownloadWrapperForm,children:w.jsx(I,{"data-testid":"".concat("Attachment","_downloadButton"),className:e.classes.downloadIcon,type:"submit",children:w.jsx(b.DownloadIcon,{size:24,className:e.classes.downloadIcon})})})]})};function _(e){var s=e.displayName,i=void 0===s?null:s,n=e.fileName,t=void 0===n?null:n,r=e.attachmentSize,c=void 0===r?void 0:r,a=e.size,l=void 0===a?V.label:a,u=e.small,m=void 0!==u&&u,d=R(R({},F.default(e,W)),{},{displayName:i,fileName:t,attachmentSize:c,size:l,small:m}),p=o.useState(void 0),j=N.default(p,2),q=j[0],I=j[1],v=o.useState(!1),b=N.default(v,2),C=b[0],y=b[1],P=o.useState(!1),O=N.default(P,2),D=O[0],S=O[1],z=d.displayName||d.attachmentUrl||d.fileName,k=f.getIsImage(z),U=f.getIsVideo(z),L=x(!d.attachmentUrl&&d.fileName),E=d.attachmentUrl||L,M=o.useCallback((function(e){return e.preventDefault()}),[]),_=o.useCallback((function(){g.isNativeDetected&&document.documentElement.addEventListener("touchmove",M,{passive:!1})}),[M]),H=o.useCallback((function(){g.isNativeDetected&&document.documentElement.removeEventListener("touchmove",M),y(!1)}),[M]),K=o.useCallback((function(){return y(!0)}),[]),Z=o.useCallback((function(e){var s=e.currentTarget,i=s.naturalWidth,o=s.naturalHeight;I({width:i,height:o})}),[]),J=o.useCallback((function(){return S(!0)}),[]),Q=o.useCallback((function(e){e.stopPropagation(),S(!1)}),[]);return k?w.jsx("div",{className:h.cAttachment,children:w.jsx(B,{size:d.size,openLightbox:K,attachmentFileName:d.fileName,attachmentUrl:d.attachmentUrl,onImageLoaded:Z,imageDimensions:q,lightboxIsOpen:C,handleLightboxOpen:_,handleLightboxClose:H,classes:d.classes})}):U&&A.default.canPlay(E)?w.jsx("div",{className:h.cAttachment,children:w.jsx(A.default,{"data-testid":"".concat("Attachment","_player"),className:h.cAttachmentReactPlayer,url:E,config:{file:{attributes:{preload:"metadata"}}},controls:!0,height:d.size===T.label?T.value:V.value,width:null})}):w.jsx("div",{className:h.cAttachment,children:w.jsx(G,{attachmentUrl:E,attachmentFileName:d.fileName,attachmentSize:d.attachmentSize,displayName:d.displayName,openPreview:J,closePreview:Q,previewIsOpen:D,classes:d.classes,small:d.small})})}_.propTypes={attachmentUrl:O.default.string.isRequired,attachmentSize:O.default.number,displayName:O.default.string,fileName:O.default.string,size:O.default.oneOf([T.label,V.label]),classes:O.default.shape({}).isRequired,small:O.default.bool};var H=c.withStyles((function(e){return{imageIconRoot:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},dialog:{width:"95%",height:"95%",maxWidth:"100%",position:"relative"},nativeDialog:{width:"100%",height:"100%",maxWidth:"100%",maxHeight:"100%",margin:0},dialogRoot:{backgroundColor:"rgba(0, 0, 0, 0.85)"},fileName:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",fontWeight:400},downloadIcon:{color:e.palette.primary.text3},disabledPreview:{backgroundColor:e.palette.primary.text9},unavailableFileIcon:{marginRight:12,minWidth:32},titleContainer:{display:"flex",flexDirection:"column",width:"100%"},caption:{fontSize:12,fontWeight:400,width:"fit-content"},unavailableFileName:{fontSize:12,fontWeight:400}}}))(_);module.exports=H;
1
+ "use strict";var e=require("@babel/runtime/helpers/slicedToArray"),s=require("@babel/runtime/helpers/defineProperty"),i=require("@babel/runtime/helpers/objectWithoutProperties"),o=require("react"),r=require("prop-types"),n=require("react-player"),t=require("classnames"),c=require("@material-ui/core/styles"),a=require("@material-ui/core"),l=require("@material-ui/icons/Image"),u=require("@material-ui/icons/Fullscreen"),m=require("@material-ui/core/colors/grey"),d=require("../NewDocumentViewer/NewDocumentViewer.js"),p=require("../NewDocumentViewer/icons/UnavailableFileIcon.js"),j=require("../../componentsV2/ImageViewer/ImageViewer.js"),q=require("./styles.css.js"),h=require("../FileTypeIcon.js"),I=require("../IconButton/index.js"),g=require("../../utils/mobileDetect.js"),f=require("../../utils/fileExtension.js"),v=require("../../utils/filePreview.js"),b=require("../../icons/iconParkIcons.js");require("../../icons/customIcons/icons/AddMessage.js"),require("../../icons/customIcons/icons/DragOne.js"),require("../../icons/customIcons/icons/Attention.js"),require("../../icons/customIcons/icons/Collapse.js"),require("../../icons/customIcons/icons/Dashboard.js"),require("../../icons/customIcons/icons/Expand.js"),require("../../icons/customIcons/icons/FolderClosed.js"),require("../../icons/customIcons/icons/FolderClosedFilled.js"),require("../../icons/customIcons/icons/FolderOpened.js"),require("../../icons/customIcons/icons/GreaterOrEqual.js"),require("../../icons/customIcons/icons/LessOrEqual.js"),require("../../icons/customIcons/icons/Search.js"),require("../../icons/customIcons/icons/SearchOne.js"),require("../../icons/customIcons/icons/Wellhub.js"),require("../../icons/customIcons/icons/MultiRuler.js"),require("../../icons/customIcons/icons/Checkbox.js"),require("../../icons/customIcons/icons/CheckboxChecked.js"),require("../../icons/customIcons/icons/CheckboxIndeterminate.js"),require("../../icons/customIcons/icons/Radio.js"),require("../../icons/customIcons/icons/RadioChecked.js"),require("../../icons/customIcons/icons/SimulFrac.js"),require("../../icons/customIcons/icons/ZipperFrac.js"),require("../../icons/customIcons/icons/CautionFilled.js"),require("../../icons/customIcons/icons/InfoRounded.js"),require("../../icons/customIcons/icons/FlameFilled.js"),require("../../icons/customIcons/icons/MoreApp.js"),require("../../icons/customIcons/icons/Pad.js"),require("../../icons/customIcons/icons/DrilloutUnit.js"),require("../../icons/customIcons/icons/FracFleet.js"),require("../../icons/customIcons/icons/Global.js"),require("../../icons/customIcons/icons/Program.js"),require("../../icons/customIcons/icons/Rig.js"),require("../../icons/customIcons/icons/Well.js"),require("../../icons/customIcons/icons/Gap.js"),require("../../icons/customIcons/icons/Pin.js"),require("../../icons/customIcons/icons/PinOne.js"),require("../../icons/customIcons/icons/PinOneCrossed.js"),require("../../icons/customIcons/icons/CloseOneFilled.js"),require("../../icons/customIcons/icons/AttentionFilled.js"),require("../../icons/customIcons/icons/CheckOneFilled.js"),require("../../icons/customIcons/icons/Archive.js"),require("../../icons/customIcons/icons/ArchiveCancel.js"),require("../../icons/customIcons/icons/Unarchive.js"),require("../../icons/customIcons/icons/Archived.js"),require("../../icons/customIcons/icons/InterventionUnit.js"),require("../../icons/customIcons/icons/CloudDelete.js"),require("../../icons/customIcons/icons/Lasso.js"),require("../../icons/customIcons/icons/Radius.js"),require("../../icons/customIcons/icons/ErrorOps.js"),require("../../icons/customIcons/icons/DataTypeOps.js"),require("../../icons/customIcons/icons/FalsePositiveOps.js"),require("../../icons/customIcons/icons/CalibrationOps.js"),require("../../icons/customIcons/icons/CriticalOps.js"),require("../../icons/customIcons/icons/Company.js"),require("../../icons/customIcons/icons/ArchiveOne.js"),require("../../icons/customIcons/icons/ParseBotFusion.js"),require("../../icons/customIcons/icons/Connect.js"),require("../../icons/customIcons/icons/PuzzleOne.js"),require("../../icons/customIcons/icons/Feed.js"),require("../../icons/customIcons/icons/Prompt.js"),require("../../icons/customIcons/icons/Companies.js"),require("../../icons/customIcons/icons/ClipboardAi.js"),require("../../icons/customIcons/icons/Key.js"),require("../../icons/customIcons/icons/AtSignCrossed.js"),require("../../icons/customIcons/icons/MappingManual.js"),require("../../icons/customIcons/icons/Mapping.js"),require("../../icons/customIcons/icons/Metrics.js"),require("../../icons/customIcons/icons/Drops.js"),require("../../icons/customIcons/icons/ClipboardSearch.js"),require("../../icons/customIcons/icons/Template.js"),require("../../icons/customIcons/icons/ClipboardMetrics.js"),require("../../icons/customIcons/icons/ClipboardBuilder.js"),require("../../icons/customIcons/icons/UnitConversion.js"),require("../../icons/customIcons/icons/NPT.js"),require("../../icons/customIcons/icons/GuidedFrac.js"),require("../../clients/subscriptions/constants.js"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("querystring"),require("uuid/v1"),require("lodash"),require("../../clients/subscriptions.v1.js"),require("../../clients/jsonApi/index.js"),require("../../clients/subscriptions/subscriptions-client.factory.js"),require("query-string"),require("../../constants/goals.js"),require("../../constants/segment.js"),require("../../constants/alerts.js"),require("../../constants/apps.js"),require("../../constants/drillstring.js"),require("../../constants/completion.js"),require("../../constants/appPackages.js"),require("../../constants/notifications.js"),require("../../constants/feed.js"),require("../../constants/bha.js"),require("../../constants/corvaCompanyId.js"),require("../GradientManager/configuration/constants.js");var x=require("../../effects/useSignedURL.js");require("../UserMention/utils/index.js"),require("../../utils/convert.js"),require("moment"),require("../../utils/casing/validation.js"),require("lodash/mean"),require("../../constants/streamSourceType.js"),require("lodash/get"),require("file-saver"),require("../../utils/drillstring/conversion.js"),require("lodash/set"),require("lodash/cloneDeep"),require("@babel/runtime/helpers/toConsumableArray"),require("lodash/isNumber"),require("lodash/has"),require("../../utils/ga.js"),require("../../utils/goalsConfig/goalsConfig.js"),require("../../utils/lasParser.js");var C=require("../../utils/main.js");require("../../utils/metrics/metricsConfig.js"),require("../../utils/feed.js"),require("../../utils/reports.js"),require("moment-timezone"),require("@babel/runtime/helpers/typeof"),require("../../utils/dashboardReports.js"),require("../../utils/env.js"),require("../../utils/jsonaDataFormatter.js"),require("../../utils/bha.js"),require("jsona"),require("../../utils/charts/Styles.scss.js"),require("../../utils/getSingleAsset.js"),require("uuid"),require("../StatusBadge/constants.js"),require("lodash/unset"),require("../../clients/api/apiCore.js"),require("../../clients/constants.js"),require("../../clients/sso/auth0.js"),require("../../clients/sso/oauth2.js"),require("../../clients/api/rateLimiter.js"),require("lodash/isEmpty"),require("lodash/sortBy"),require("../DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchContext.js"),require("../../componentsV2/AppCommonsProvider/AppCommonsProvider.js"),require("../../componentsV2/AppCommonsProvider/AppCommonsContext.js"),require("../../componentsV2/AppPanel/AppPanelsContext.js");var y=require("react/jsx-runtime");function w(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var N=w(e),P=w(s),F=w(i),O=w(r),A=w(n),D=w(t),S=w(l),z=w(u),k=w(m),W=["displayName","fileName","attachmentSize","size","small"];function U(e,s){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);s&&(o=o.filter((function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable}))),i.push.apply(i,o)}return i}function R(e){for(var s=1;s<arguments.length;s++){var i=null!=arguments[s]?arguments[s]:{};s%2?U(Object(i),!0).forEach((function(s){P.default(e,s,i[s])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):U(Object(i)).forEach((function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(i,s))}))}return e}var L=k.default[200],E=k.default[400],T={label:"small",value:135},V={label:"medium",value:300},M={fileImage:function(e,s){return{maxWidth:"100%",borderRadius:4,overflow:"hidden",maxHeight:s===T.label?T.value:V.value,display:e?"initial":"none",cursor:"pointer"}},fileDownloadWrapper:{padding:"10px 10px 10px 5px",border:"1px solid #616161",borderRadius:3,maxWidth:500,width:"75%"},imagePlaceholder:{position:"relative",backgroundColor:L,borderRadius:3,marginTop:10,height:135,width:135}},B=function(e){var s,i,o=x(e.attachmentFileName)||e.attachmentUrl;return y.jsxs(y.Fragment,{children:[y.jsxs("div",{onClick:e.openLightbox,className:q.cAttachmentImg,children:[y.jsx("img",{"data-testid":"".concat("Attachment","_image"),src:o,style:M.fileImage(!!e.imageDimensions,e.size),alt:"Attachment",onLoad:e.onImageLoaded}),y.jsx("div",{"data-testid":"".concat("Attachment","_button"),className:q.cAttachmentImgPreviwBtn,children:y.jsx(z.default,{})})]}),!e.imageDimensions&&y.jsx("div",{style:M.imagePlaceholder,children:y.jsx(S.default,{"data-testid":"".concat("Attachment","_placeholder"),className:e.classes.imageIconRoot,htmlColor:E,fontSize:"large"})}),e.lightboxIsOpen&&y.jsx(j.ImageViewer,{src:o,onClose:e.handleLightboxClose,onOpen:e.handleLightboxOpen,width:null===(s=e.imageDimensions)||void 0===s?void 0:s.width,height:null===(i=e.imageDimensions)||void 0===i?void 0:i.height})]})},G=function(e){var s=C.default.getFileNameWithExtensionFromPath(e.displayName||e.attachmentUrl),i=x(e.attachmentFileName,"inline"),o=x(e.attachmentFileName,"attachment"),r=v.getIsPreviewUnavailable(s);return y.jsxs("div",{className:q.cAttachmentFileWrapper,children:[y.jsxs("div",{className:D.default(q.cAttachmentFileDownloadWrapper,r&&e.classes.disabledPreview),style:M.fileDownloadWrapper,onClick:function(){r||e.openPreview()},children:[r?y.jsx(p.UnavailableFileIcon,{className:e.classes.unavailableFileIcon}):y.jsx(h,{fileName:e.displayName||e.attachmentUrl,className:q.cAttachmentFileDownloadWrapperFileIcon,size:e.small?25:50}),y.jsxs("div",{className:e.classes.titleContainer,children:[r&&y.jsx("div",{className:e.classes.caption,children:"Preview unavailable"}),y.jsx("div",{"data-testid":"".concat("Attachment","_name"),className:D.default(q.cAttachmentFileDownloadWrapperFileName,r&&e.classes.fileName),children:y.jsx(a.Typography,{variant:"subtitle2",noWrap:!0,className:e.classes.unavailableFileName,children:s})})]}),y.jsx(d,{fileUrl:i,classes:{root:e.classes.dialogRoot,paper:g.isNativeDetected?e.classes.nativeDialog:e.classes.dialog},fileName:s,fileSize:e.attachmentSize,onClose:e.closePreview,open:e.previewIsOpen})]}),y.jsx("a",{download:e.displayName,href:o,className:q.cAttachmentFileDownloadWrapperForm,children:y.jsx(I,{"data-testid":"".concat("Attachment","_downloadButton"),className:e.classes.downloadIcon,type:"submit",children:y.jsx(b.DownloadIcon,{size:24,className:e.classes.downloadIcon})})})]})};function _(e){var s=e.displayName,i=void 0===s?null:s,r=e.fileName,n=void 0===r?null:r,t=e.attachmentSize,c=void 0===t?void 0:t,a=e.size,l=void 0===a?V.label:a,u=e.small,m=void 0!==u&&u,d=R(R({},F.default(e,W)),{},{displayName:i,fileName:n,attachmentSize:c,size:l,small:m}),p=o.useState(void 0),j=N.default(p,2),h=j[0],I=j[1],v=o.useState(!1),b=N.default(v,2),C=b[0],w=b[1],P=o.useState(!1),O=N.default(P,2),D=O[0],S=O[1],z=d.displayName||d.attachmentUrl||d.fileName,k=f.getIsImage(z),U=f.getIsVideo(z),L=x(!d.attachmentUrl&&d.fileName),E=d.attachmentUrl||L,M=o.useCallback((function(e){return e.preventDefault()}),[]),_=o.useCallback((function(){g.isNativeDetected&&document.documentElement.addEventListener("touchmove",M,{passive:!1})}),[M]),H=o.useCallback((function(){g.isNativeDetected&&document.documentElement.removeEventListener("touchmove",M),w(!1)}),[M]),K=o.useCallback((function(){return w(!0)}),[]),Z=o.useCallback((function(e){var s=e.currentTarget,i=s.naturalWidth,o=s.naturalHeight;I({width:i,height:o})}),[]),J=o.useCallback((function(){return S(!0)}),[]),Q=o.useCallback((function(e){e.stopPropagation(),S(!1)}),[]);return k?y.jsx("div",{className:q.cAttachment,children:y.jsx(B,{size:d.size,openLightbox:K,attachmentFileName:d.fileName,attachmentUrl:d.attachmentUrl,onImageLoaded:Z,imageDimensions:h,lightboxIsOpen:C,handleLightboxOpen:_,handleLightboxClose:H,classes:d.classes})}):U&&A.default.canPlay(E)?y.jsx("div",{className:q.cAttachment,children:y.jsx(A.default,{"data-testid":"".concat("Attachment","_player"),className:q.cAttachmentReactPlayer,url:E,config:{file:{attributes:{preload:"metadata"}}},controls:!0,height:d.size===T.label?T.value:V.value,width:null})}):y.jsx("div",{className:q.cAttachment,children:y.jsx(G,{attachmentUrl:E,attachmentFileName:d.fileName,attachmentSize:d.attachmentSize,displayName:d.displayName,openPreview:J,closePreview:Q,previewIsOpen:D,classes:d.classes,small:d.small})})}_.propTypes={attachmentUrl:O.default.string.isRequired,attachmentSize:O.default.number,displayName:O.default.string,fileName:O.default.string,size:O.default.oneOf([T.label,V.label]),classes:O.default.shape({}).isRequired,small:O.default.bool};var H=c.withStyles((function(e){return{imageIconRoot:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},dialog:{width:"95%",height:"95%",maxWidth:"100%",position:"relative"},nativeDialog:{width:"100%",height:"100%",maxWidth:"100%",maxHeight:"100%",margin:0},dialogRoot:{backgroundColor:"rgba(0, 0, 0, 0.85)"},fileName:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",fontWeight:400},downloadIcon:{color:e.palette.primary.text3},disabledPreview:{backgroundColor:e.palette.primary.text9},unavailableFileIcon:{marginRight:12,minWidth:32},titleContainer:{display:"flex",flexDirection:"column",width:"100%"},caption:{fontSize:12,fontWeight:400,width:"fit-content"},unavailableFileName:{fontSize:12,fontWeight:400}}}))(_);module.exports=H;
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/Attachment/index.js"],"sourcesContent":["import { useCallback, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport ReactPlayer from 'react-player';\nimport classNames from 'classnames';\nimport { withStyles } from '@material-ui/core/styles';\nimport { Typography } from '@material-ui/core';\nimport ImageIcon from '@material-ui/icons/Image';\nimport FullSizeIcon from '@material-ui/icons/Fullscreen';\nimport grey from '@material-ui/core/colors/grey';\n\nimport { NewDocumentViewer } from '../NewDocumentViewer';\nimport { UnavailableFileIcon } from '../NewDocumentViewer/icons/UnavailableFileIcon';\nimport { ImageViewer } from '../../componentsV2/ImageViewer';\n\nimport styles from './styles.css';\n\nimport FileTypeIcon from '~components/FileTypeIcon';\nimport IconButton from '~components/IconButton';\nimport { isNativeDetected } from '~/utils/mobileDetect';\nimport { getIsImage, getIsVideo } from '~/utils/fileExtension';\nimport { getIsPreviewUnavailable } from '~/utils/filePreview';\nimport { DownloadIcon } from '~/icons';\nimport { useSignedURL } from '~/effects';\nimport utils from '~utils/main';\n\nconst PAGE_NAME = 'Attachment';\n\nconst grey200 = grey[200];\nconst grey400 = grey[400];\n\nconst SIZES = {\n small: { label: 'small', value: 135 },\n medium: { label: 'medium', value: 300 },\n};\n\nconst style = {\n fileImage: (imageIsLoaded, size) => ({\n maxWidth: '100%',\n borderRadius: 4,\n overflow: 'hidden',\n // NOTE: Makes one-line comment with image fits into comments container. Equals to\n // imagePlaceholder height\n maxHeight: size === SIZES.small.label ? SIZES.small.value : SIZES.medium.value,\n display: imageIsLoaded ? 'initial' : 'none',\n cursor: 'pointer',\n }),\n fileDownloadWrapper: {\n padding: '10px 10px 10px 5px',\n border: `1px solid #616161`,\n borderRadius: 3,\n maxWidth: 500, // NOTE: Corresponds to react-player max width\n width: '75%',\n },\n imagePlaceholder: {\n position: 'relative',\n backgroundColor: grey200,\n borderRadius: 3,\n marginTop: 10,\n height: 135,\n width: 135,\n },\n};\n\nconst muiStyles = theme => ({\n imageIconRoot: {\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n },\n dialog: {\n width: '95%',\n height: '95%',\n maxWidth: '100%',\n position: 'relative',\n },\n nativeDialog: {\n width: '100%',\n height: '100%',\n maxWidth: '100%',\n maxHeight: '100%',\n margin: 0,\n },\n dialogRoot: {\n // NOTE: Make background color similar to lightbox\n backgroundColor: 'rgba(0, 0, 0, 0.85)',\n },\n fileName: {\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n fontWeight: 400,\n },\n downloadIcon: {\n color: theme.palette.primary.text3,\n },\n disabledPreview: {\n backgroundColor: theme.palette.primary.text9,\n },\n unavailableFileIcon: {\n marginRight: 12,\n minWidth: 32,\n },\n titleContainer: {\n display: 'flex',\n flexDirection: 'column',\n width: '100%',\n },\n caption: {\n fontSize: 12,\n fontWeight: 400,\n width: 'fit-content',\n },\n unavailableFileName: {\n fontSize: 12,\n fontWeight: 400,\n },\n});\n\n/* eslint-disable react/prop-types */\nconst ImageAttachment = props => {\n const downloadLink = useSignedURL(props.attachmentFileName) || props.attachmentUrl;\n\n return (\n <>\n <div onClick={props.openLightbox} className={styles.cAttachmentImg}>\n <img\n data-testid={`${PAGE_NAME}_image`}\n src={downloadLink}\n style={style.fileImage(!!props.imageDimensions, props.size)}\n alt=\"Attachment\"\n onLoad={props.onImageLoaded}\n />\n <div data-testid={`${PAGE_NAME}_button`} className={styles.cAttachmentImgPreviwBtn}>\n <FullSizeIcon />\n </div>\n </div>\n\n {!props.imageDimensions && (\n <div style={style.imagePlaceholder}>\n <ImageIcon\n data-testid={`${PAGE_NAME}_placeholder`}\n className={props.classes.imageIconRoot}\n htmlColor={grey400}\n fontSize=\"large\"\n />\n </div>\n )}\n\n {props.lightboxIsOpen && (\n <ImageViewer\n src={downloadLink}\n onClose={props.handleLightboxClose}\n onOpen={props.handleLightboxOpen}\n width={props.imageDimensions?.width}\n height={props.imageDimensions?.height}\n />\n )}\n </>\n );\n};\n\nconst FileAttachment = props => {\n const fileName = utils.getFileNameWithExtensionFromPath(props.displayName || props.attachmentUrl);\n\n const previewUrl = useSignedURL(props.attachmentFileName, 'inline');\n const downloadUrl = useSignedURL(props.attachmentFileName, 'attachment');\n\n const isPreviewUnavailable = getIsPreviewUnavailable(fileName);\n\n const handleFilePreviewOpen = () => {\n if (isPreviewUnavailable) return;\n props.openPreview();\n };\n\n return (\n <div className={styles.cAttachmentFileWrapper}>\n <div\n className={classNames(\n styles.cAttachmentFileDownloadWrapper,\n isPreviewUnavailable && props.classes.disabledPreview\n )}\n style={style.fileDownloadWrapper}\n onClick={handleFilePreviewOpen}\n >\n {isPreviewUnavailable ? (\n <UnavailableFileIcon className={props.classes.unavailableFileIcon} />\n ) : (\n <FileTypeIcon\n fileName={props.displayName || props.attachmentUrl}\n className={styles.cAttachmentFileDownloadWrapperFileIcon}\n size={props.small ? 25 : 50}\n />\n )}\n <div className={props.classes.titleContainer}>\n {isPreviewUnavailable && <div className={props.classes.caption}>Preview unavailable</div>}\n <div\n data-testid={`${PAGE_NAME}_name`}\n className={classNames(\n styles.cAttachmentFileDownloadWrapperFileName,\n isPreviewUnavailable && props.classes.fileName\n )}\n >\n <Typography variant=\"subtitle2\" noWrap className={props.classes.unavailableFileName}>\n {fileName}\n </Typography>\n </div>\n </div>\n <NewDocumentViewer\n fileUrl={previewUrl}\n classes={{\n root: props.classes.dialogRoot,\n paper: isNativeDetected ? props.classes.nativeDialog : props.classes.dialog,\n }}\n fileName={fileName}\n fileSize={props.attachmentSize}\n onClose={props.closePreview}\n open={props.previewIsOpen}\n />\n </div>\n <a\n download={props.displayName}\n href={downloadUrl}\n className={styles.cAttachmentFileDownloadWrapperForm}\n >\n <IconButton\n data-testid={`${PAGE_NAME}_downloadButton`}\n className={props.classes.downloadIcon}\n type=\"submit\"\n >\n <DownloadIcon size={24} className={props.classes.downloadIcon} />\n </IconButton>\n </a>\n </div>\n );\n};\n\n/* eslint-enable react/prop-types */\n\nfunction Attachment(rawProps) {\n const {\n displayName = null,\n fileName: attachmentFileName = null,\n attachmentSize = undefined,\n size = SIZES.medium.label,\n small = false,\n ...otherProps\n } = rawProps;\n const props = {\n ...otherProps,\n displayName,\n fileName: attachmentFileName,\n attachmentSize,\n size,\n small,\n };\n\n const [imageDimensions, setImageDimensions] = useState(undefined);\n const [isLightboxOpen, setIsLightboxOpen] = useState(false);\n const [isPreviewOpen, setIsPreviewOpen] = useState(false);\n\n const fileName = props.displayName || props.attachmentUrl || props.fileName;\n const isImage = getIsImage(fileName);\n const isVideo = getIsVideo(fileName);\n\n // Don't fetch download link if attachmentUrl is provided\n const downloadLink = useSignedURL(!props.attachmentUrl && props.fileName);\n const attachmentUrl = props.attachmentUrl || downloadLink;\n const preventIOSScroll = useCallback(e => e.preventDefault(), []);\n\n // NOTE: iOS WebView has a bug when background content of React Modal is scrollable\n // Source: https://github.com/reactjs/react-modal/issues/369\n const handleLightboxOpen = useCallback(() => {\n if (isNativeDetected) {\n // document.documentElement.style.overflowY = 'hidden';\n document.documentElement.addEventListener('touchmove', preventIOSScroll, {\n passive: false,\n });\n }\n }, [preventIOSScroll]);\n\n const handleLightboxClose = useCallback(() => {\n if (isNativeDetected) {\n // document.documentElement.style.overflowY = 'visible';\n document.documentElement.removeEventListener('touchmove', preventIOSScroll);\n }\n setIsLightboxOpen(false);\n }, [preventIOSScroll]);\n\n const openLightbox = useCallback(() => setIsLightboxOpen(true), []);\n const onImageLoaded = useCallback(e => {\n const { naturalWidth, naturalHeight } = e.currentTarget;\n setImageDimensions({ width: naturalWidth, height: naturalHeight });\n }, []);\n const openPreview = useCallback(() => setIsPreviewOpen(true), []);\n const closePreview = useCallback(e => {\n e.stopPropagation();\n setIsPreviewOpen(false);\n }, []);\n\n if (isImage)\n return (\n <div className={styles.cAttachment}>\n <ImageAttachment\n size={props.size}\n openLightbox={openLightbox}\n attachmentFileName={props.fileName}\n attachmentUrl={props.attachmentUrl}\n onImageLoaded={onImageLoaded}\n imageDimensions={imageDimensions}\n lightboxIsOpen={isLightboxOpen}\n handleLightboxOpen={handleLightboxOpen}\n handleLightboxClose={handleLightboxClose}\n classes={props.classes}\n />\n </div>\n );\n\n if (isVideo && ReactPlayer.canPlay(attachmentUrl))\n return (\n <div className={styles.cAttachment}>\n <ReactPlayer\n data-testid={`${PAGE_NAME}_player`}\n className={styles.cAttachmentReactPlayer}\n url={attachmentUrl}\n config={{ file: { attributes: { preload: 'metadata' } } }}\n controls\n height={props.size === SIZES.small.label ? SIZES.small.value : SIZES.medium.value}\n width={null}\n />\n </div>\n );\n\n return (\n <div className={styles.cAttachment}>\n <FileAttachment\n attachmentUrl={attachmentUrl}\n attachmentFileName={props.fileName}\n attachmentSize={props.attachmentSize}\n displayName={props.displayName}\n openPreview={openPreview}\n closePreview={closePreview}\n previewIsOpen={isPreviewOpen}\n classes={props.classes}\n small={props.small}\n />\n </div>\n );\n}\n\nAttachment.propTypes = {\n attachmentUrl: PropTypes.string.isRequired,\n attachmentSize: PropTypes.number,\n displayName: PropTypes.string,\n fileName: PropTypes.string,\n size: PropTypes.oneOf([SIZES.small.label, SIZES.medium.label]),\n classes: PropTypes.shape({}).isRequired,\n small: PropTypes.bool,\n};\n\nexport default withStyles(muiStyles)(Attachment);\n"],"names":["grey200","grey","grey400","SIZES","label","value","style","fileImage","imageIsLoaded","size","maxWidth","borderRadius","overflow","maxHeight","display","cursor","fileDownloadWrapper","padding","border","width","imagePlaceholder","position","backgroundColor","marginTop","height","ImageAttachment","props","_props$imageDimension","_props$imageDimension2","downloadLink","useSignedURL","attachmentFileName","attachmentUrl","_jsxs","_Fragment","children","jsxs","onClick","openLightbox","className","styles","cAttachmentImg","_jsx","jsx","concat","src","imageDimensions","alt","onLoad","onImageLoaded","cAttachmentImgPreviwBtn","FullSizeIcon","ImageIcon","classes","imageIconRoot","htmlColor","fontSize","lightboxIsOpen","ImageViewer","onClose","handleLightboxClose","onOpen","handleLightboxOpen","FileAttachment","fileName","utils","getFileNameWithExtensionFromPath","displayName","previewUrl","downloadUrl","isPreviewUnavailable","getIsPreviewUnavailable","cAttachmentFileWrapper","classNames","cAttachmentFileDownloadWrapper","disabledPreview","openPreview","UnavailableFileIcon","unavailableFileIcon","FileTypeIcon","cAttachmentFileDownloadWrapperFileIcon","small","titleContainer","caption","cAttachmentFileDownloadWrapperFileName","Typography","variant","noWrap","unavailableFileName","NewDocumentViewer","fileUrl","root","dialogRoot","paper","isNativeDetected","nativeDialog","dialog","fileSize","attachmentSize","closePreview","open","previewIsOpen","download","href","cAttachmentFileDownloadWrapperForm","IconButton","downloadIcon","type","DownloadIcon","Attachment","rawProps","_rawProps$displayName","_rawProps$fileName","_rawProps$attachmentS","undefined","_rawProps$size","_rawProps$small","_excluded","useState","_useState2","_slicedToArray","_useState","setImageDimensions","_useState4","_useState3","isLightboxOpen","setIsLightboxOpen","_useState6","_useState5","isPreviewOpen","setIsPreviewOpen","isImage","getIsImage","isVideo","getIsVideo","preventIOSScroll","useCallback","e","preventDefault","document","documentElement","addEventListener","passive","removeEventListener","currentTarget","naturalWidth","naturalHeight","stopPropagation","cAttachment","ReactPlayer","canPlay","cAttachmentReactPlayer","url","config","file","attributes","preload","controls","propTypes","PropTypes","string","isRequired","number","oneOf","shape","bool","Attachment$1","withStyles","theme","top","left","transform","margin","whiteSpace","textOverflow","fontWeight","color","palette","primary","text3","text9","marginRight","minWidth","flexDirection"],"mappings":"w+OAyBA,IAEMA,EAAUC,EAAAA,QAAK,KACfC,EAAUD,EAAAA,QAAK,KAEfE,EACG,CAAEC,MAAO,QAASC,MAAO,KAD5BF,EAEI,CAAEC,MAAO,SAAUC,MAAO,KAG9BC,EAAQ,CACZC,UAAW,SAACC,EAAeC,GAAI,MAAM,CACnCC,SAAU,OACVC,aAAc,EACdC,SAAU,SAGVC,UAAWJ,IAASN,EAAYC,MAAQD,EAAYE,MAAQF,EAAaE,MACzES,QAASN,EAAgB,UAAY,OACrCO,OAAQ,UACR,EACFC,oBAAqB,CACnBC,QAAS,qBACTC,OAA2B,oBAC3BP,aAAc,EACdD,SAAU,IACVS,MAAO,OAETC,iBAAkB,CAChBC,SAAU,WACVC,gBAAiBtB,EACjBW,aAAc,EACdY,UAAW,GACXC,OAAQ,IACRL,MAAO,MA6DLM,EAAkB,SAAAC,GAAS,IAAAC,EAAAC,EACzBC,EAAeC,EAAaJ,EAAMK,qBAAuBL,EAAMM,cAErE,OACEC,EAAAA,KAAAC,EAAAA,SAAA,CAAAC,SACE,CAAAF,EAAAG,KAAA,MAAA,CAAKC,QAASX,EAAMY,aAAcC,UAAWC,EAAOC,eAAeN,SACjE,CAAAO,EAAAC,IAAA,MAAA,CACE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YC,MAAOD,EAAaC,QACvDiD,QAAS0G,EAAS,QAACK,MAAM,CAAA,GAAIH,WAC7BhF,MAAO8E,EAAS,QAACM,MAGnB,IAAAC,EAAeC,cAzSG,SAAAC,GAAK,MAAK,CAC1BlH,cAAe,CACbjC,SAAU,WACVoJ,IAAK,MACLC,KAAM,MACNC,UAAW,yBAEb3E,OAAQ,CACN7E,MAAO,MACPK,OAAQ,MACRd,SAAU,OACVW,SAAU,YAEZ0E,aAAc,CACZ5E,MAAO,OACPK,OAAQ,OACRd,SAAU,OACVG,UAAW,OACX+J,OAAQ,GAEVhF,WAAY,CAEVtE,gBAAiB,uBAEnB0C,SAAU,CACRpD,SAAU,SACViK,WAAY,SACZC,aAAc,WACdC,WAAY,KAEdrE,aAAc,CACZsE,MAAOR,EAAMS,QAAQC,QAAQC,OAE/BxG,gBAAiB,CACfrD,gBAAiBkJ,EAAMS,QAAQC,QAAQE,OAEzCtG,oBAAqB,CACnBuG,YAAa,GACbC,SAAU,IAEZpG,eAAgB,CACdpE,QAAS,OACTyK,cAAe,SACfpK,MAAO,QAETgE,QAAS,CACP3B,SAAU,GACVuH,WAAY,IACZ5J,MAAO,eAETqE,oBAAqB,CACnBhC,SAAU,GACVuH,WAAY,KAEf,GAmPcR,CAAsB1D"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/Attachment/index.js"],"sourcesContent":["import { useCallback, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport ReactPlayer from 'react-player';\nimport classNames from 'classnames';\nimport { withStyles } from '@material-ui/core/styles';\nimport { Typography } from '@material-ui/core';\nimport ImageIcon from '@material-ui/icons/Image';\nimport FullSizeIcon from '@material-ui/icons/Fullscreen';\nimport grey from '@material-ui/core/colors/grey';\n\nimport { NewDocumentViewer } from '../NewDocumentViewer';\nimport { UnavailableFileIcon } from '../NewDocumentViewer/icons/UnavailableFileIcon';\nimport { ImageViewer } from '../../componentsV2/ImageViewer';\n\nimport styles from './styles.css';\n\nimport FileTypeIcon from '~components/FileTypeIcon';\nimport IconButton from '~components/IconButton';\nimport { isNativeDetected } from '~/utils/mobileDetect';\nimport { getIsImage, getIsVideo } from '~/utils/fileExtension';\nimport { getIsPreviewUnavailable } from '~/utils/filePreview';\nimport { DownloadIcon } from '~/icons';\nimport { useSignedURL } from '~/effects';\nimport utils from '~utils/main';\n\nconst PAGE_NAME = 'Attachment';\n\nconst grey200 = grey[200];\nconst grey400 = grey[400];\n\nconst SIZES = {\n small: { label: 'small', value: 135 },\n medium: { label: 'medium', value: 300 },\n};\n\nconst style = {\n fileImage: (imageIsLoaded, size) => ({\n maxWidth: '100%',\n borderRadius: 4,\n overflow: 'hidden',\n // NOTE: Makes one-line comment with image fits into comments container. Equals to\n // imagePlaceholder height\n maxHeight: size === SIZES.small.label ? SIZES.small.value : SIZES.medium.value,\n display: imageIsLoaded ? 'initial' : 'none',\n cursor: 'pointer',\n }),\n fileDownloadWrapper: {\n padding: '10px 10px 10px 5px',\n border: `1px solid #616161`,\n borderRadius: 3,\n maxWidth: 500, // NOTE: Corresponds to react-player max width\n width: '75%',\n },\n imagePlaceholder: {\n position: 'relative',\n backgroundColor: grey200,\n borderRadius: 3,\n marginTop: 10,\n height: 135,\n width: 135,\n },\n};\n\nconst muiStyles = theme => ({\n imageIconRoot: {\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n },\n dialog: {\n width: '95%',\n height: '95%',\n maxWidth: '100%',\n position: 'relative',\n },\n nativeDialog: {\n width: '100%',\n height: '100%',\n maxWidth: '100%',\n maxHeight: '100%',\n margin: 0,\n },\n dialogRoot: {\n // NOTE: Make background color similar to lightbox\n backgroundColor: 'rgba(0, 0, 0, 0.85)',\n },\n fileName: {\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n fontWeight: 400,\n },\n downloadIcon: {\n color: theme.palette.primary.text3,\n },\n disabledPreview: {\n backgroundColor: theme.palette.primary.text9,\n },\n unavailableFileIcon: {\n marginRight: 12,\n minWidth: 32,\n },\n titleContainer: {\n display: 'flex',\n flexDirection: 'column',\n width: '100%',\n },\n caption: {\n fontSize: 12,\n fontWeight: 400,\n width: 'fit-content',\n },\n unavailableFileName: {\n fontSize: 12,\n fontWeight: 400,\n },\n});\n\n/* eslint-disable react/prop-types */\nconst ImageAttachment = props => {\n const downloadLink = useSignedURL(props.attachmentFileName) || props.attachmentUrl;\n\n return (\n <>\n <div onClick={props.openLightbox} className={styles.cAttachmentImg}>\n <img\n data-testid={`${PAGE_NAME}_image`}\n src={downloadLink}\n style={style.fileImage(!!props.imageDimensions, props.size)}\n alt=\"Attachment\"\n onLoad={props.onImageLoaded}\n />\n <div data-testid={`${PAGE_NAME}_button`} className={styles.cAttachmentImgPreviwBtn}>\n <FullSizeIcon />\n </div>\n </div>\n\n {!props.imageDimensions && (\n <div style={style.imagePlaceholder}>\n <ImageIcon\n data-testid={`${PAGE_NAME}_placeholder`}\n className={props.classes.imageIconRoot}\n htmlColor={grey400}\n fontSize=\"large\"\n />\n </div>\n )}\n\n {props.lightboxIsOpen && (\n <ImageViewer\n src={downloadLink}\n onClose={props.handleLightboxClose}\n onOpen={props.handleLightboxOpen}\n width={props.imageDimensions?.width}\n height={props.imageDimensions?.height}\n />\n )}\n </>\n );\n};\n\nconst FileAttachment = props => {\n const fileName = utils.getFileNameWithExtensionFromPath(props.displayName || props.attachmentUrl);\n\n const previewUrl = useSignedURL(props.attachmentFileName, 'inline');\n const downloadUrl = useSignedURL(props.attachmentFileName, 'attachment');\n\n const isPreviewUnavailable = getIsPreviewUnavailable(fileName);\n\n const handleFilePreviewOpen = () => {\n if (isPreviewUnavailable) return;\n props.openPreview();\n };\n\n return (\n <div className={styles.cAttachmentFileWrapper}>\n <div\n className={classNames(\n styles.cAttachmentFileDownloadWrapper,\n isPreviewUnavailable && props.classes.disabledPreview\n )}\n style={style.fileDownloadWrapper}\n onClick={handleFilePreviewOpen}\n >\n {isPreviewUnavailable ? (\n <UnavailableFileIcon className={props.classes.unavailableFileIcon} />\n ) : (\n <FileTypeIcon\n fileName={props.displayName || props.attachmentUrl}\n className={styles.cAttachmentFileDownloadWrapperFileIcon}\n size={props.small ? 25 : 50}\n />\n )}\n <div className={props.classes.titleContainer}>\n {isPreviewUnavailable && <div className={props.classes.caption}>Preview unavailable</div>}\n <div\n data-testid={`${PAGE_NAME}_name`}\n className={classNames(\n styles.cAttachmentFileDownloadWrapperFileName,\n isPreviewUnavailable && props.classes.fileName\n )}\n >\n <Typography variant=\"subtitle2\" noWrap className={props.classes.unavailableFileName}>\n {fileName}\n </Typography>\n </div>\n </div>\n <NewDocumentViewer\n fileUrl={previewUrl}\n classes={{\n root: props.classes.dialogRoot,\n paper: isNativeDetected ? props.classes.nativeDialog : props.classes.dialog,\n }}\n fileName={fileName}\n fileSize={props.attachmentSize}\n onClose={props.closePreview}\n open={props.previewIsOpen}\n />\n </div>\n <a\n download={props.displayName}\n href={downloadUrl}\n className={styles.cAttachmentFileDownloadWrapperForm}\n >\n <IconButton\n data-testid={`${PAGE_NAME}_downloadButton`}\n className={props.classes.downloadIcon}\n type=\"submit\"\n >\n <DownloadIcon size={24} className={props.classes.downloadIcon} />\n </IconButton>\n </a>\n </div>\n );\n};\n\n/* eslint-enable react/prop-types */\n\nfunction Attachment(rawProps) {\n const {\n displayName = null,\n fileName: attachmentFileName = null,\n attachmentSize = undefined,\n size = SIZES.medium.label,\n small = false,\n ...otherProps\n } = rawProps;\n const props = {\n ...otherProps,\n displayName,\n fileName: attachmentFileName,\n attachmentSize,\n size,\n small,\n };\n\n const [imageDimensions, setImageDimensions] = useState(undefined);\n const [isLightboxOpen, setIsLightboxOpen] = useState(false);\n const [isPreviewOpen, setIsPreviewOpen] = useState(false);\n\n const fileName = props.displayName || props.attachmentUrl || props.fileName;\n const isImage = getIsImage(fileName);\n const isVideo = getIsVideo(fileName);\n\n // Don't fetch download link if attachmentUrl is provided\n const downloadLink = useSignedURL(!props.attachmentUrl && props.fileName);\n const attachmentUrl = props.attachmentUrl || downloadLink;\n const preventIOSScroll = useCallback(e => e.preventDefault(), []);\n\n // NOTE: iOS WebView has a bug when background content of React Modal is scrollable\n // Source: https://github.com/reactjs/react-modal/issues/369\n const handleLightboxOpen = useCallback(() => {\n if (isNativeDetected) {\n // document.documentElement.style.overflowY = 'hidden';\n document.documentElement.addEventListener('touchmove', preventIOSScroll, {\n passive: false,\n });\n }\n }, [preventIOSScroll]);\n\n const handleLightboxClose = useCallback(() => {\n if (isNativeDetected) {\n // document.documentElement.style.overflowY = 'visible';\n document.documentElement.removeEventListener('touchmove', preventIOSScroll);\n }\n setIsLightboxOpen(false);\n }, [preventIOSScroll]);\n\n const openLightbox = useCallback(() => setIsLightboxOpen(true), []);\n const onImageLoaded = useCallback(e => {\n const { naturalWidth, naturalHeight } = e.currentTarget;\n setImageDimensions({ width: naturalWidth, height: naturalHeight });\n }, []);\n const openPreview = useCallback(() => setIsPreviewOpen(true), []);\n const closePreview = useCallback(e => {\n e.stopPropagation();\n setIsPreviewOpen(false);\n }, []);\n\n if (isImage)\n return (\n <div className={styles.cAttachment}>\n <ImageAttachment\n size={props.size}\n openLightbox={openLightbox}\n attachmentFileName={props.fileName}\n attachmentUrl={props.attachmentUrl}\n onImageLoaded={onImageLoaded}\n imageDimensions={imageDimensions}\n lightboxIsOpen={isLightboxOpen}\n handleLightboxOpen={handleLightboxOpen}\n handleLightboxClose={handleLightboxClose}\n classes={props.classes}\n />\n </div>\n );\n\n if (isVideo && ReactPlayer.canPlay(attachmentUrl))\n return (\n <div className={styles.cAttachment}>\n <ReactPlayer\n data-testid={`${PAGE_NAME}_player`}\n className={styles.cAttachmentReactPlayer}\n url={attachmentUrl}\n config={{ file: { attributes: { preload: 'metadata' } } }}\n controls\n height={props.size === SIZES.small.label ? SIZES.small.value : SIZES.medium.value}\n width={null}\n />\n </div>\n );\n\n return (\n <div className={styles.cAttachment}>\n <FileAttachment\n attachmentUrl={attachmentUrl}\n attachmentFileName={props.fileName}\n attachmentSize={props.attachmentSize}\n displayName={props.displayName}\n openPreview={openPreview}\n closePreview={closePreview}\n previewIsOpen={isPreviewOpen}\n classes={props.classes}\n small={props.small}\n />\n </div>\n );\n}\n\nAttachment.propTypes = {\n attachmentUrl: PropTypes.string.isRequired,\n attachmentSize: PropTypes.number,\n displayName: PropTypes.string,\n fileName: PropTypes.string,\n size: PropTypes.oneOf([SIZES.small.label, SIZES.medium.label]),\n classes: PropTypes.shape({}).isRequired,\n small: PropTypes.bool,\n};\n\nexport default withStyles(muiStyles)(Attachment);\n"],"names":["grey200","grey","grey400","SIZES","label","value","style","fileImage","imageIsLoaded","size","maxWidth","borderRadius","overflow","maxHeight","display","cursor","fileDownloadWrapper","padding","border","width","imagePlaceholder","position","backgroundColor","marginTop","height","ImageAttachment","props","_props$imageDimension","_props$imageDimension2","downloadLink","useSignedURL","attachmentFileName","attachmentUrl","_jsxs","_Fragment","children","jsxs","onClick","openLightbox","className","styles","cAttachmentImg","_jsx","jsx","concat","src","imageDimensions","alt","onLoad","onImageLoaded","cAttachmentImgPreviwBtn","FullSizeIcon","ImageIcon","classes","imageIconRoot","htmlColor","fontSize","lightboxIsOpen","ImageViewer","onClose","handleLightboxClose","onOpen","handleLightboxOpen","FileAttachment","fileName","utils","getFileNameWithExtensionFromPath","displayName","previewUrl","downloadUrl","isPreviewUnavailable","getIsPreviewUnavailable","cAttachmentFileWrapper","classNames","cAttachmentFileDownloadWrapper","disabledPreview","openPreview","UnavailableFileIcon","unavailableFileIcon","FileTypeIcon","cAttachmentFileDownloadWrapperFileIcon","small","titleContainer","caption","cAttachmentFileDownloadWrapperFileName","Typography","variant","noWrap","unavailableFileName","NewDocumentViewer","fileUrl","root","dialogRoot","paper","isNativeDetected","nativeDialog","dialog","fileSize","attachmentSize","closePreview","open","previewIsOpen","download","href","cAttachmentFileDownloadWrapperForm","IconButton","downloadIcon","type","DownloadIcon","Attachment","rawProps","_rawProps$displayName","_rawProps$fileName","_rawProps$attachmentS","undefined","_rawProps$size","_rawProps$small","_excluded","useState","_useState2","_slicedToArray","_useState","setImageDimensions","_useState4","_useState3","isLightboxOpen","setIsLightboxOpen","_useState6","_useState5","isPreviewOpen","setIsPreviewOpen","isImage","getIsImage","isVideo","getIsVideo","preventIOSScroll","useCallback","e","preventDefault","document","documentElement","addEventListener","passive","removeEventListener","currentTarget","naturalWidth","naturalHeight","stopPropagation","cAttachment","ReactPlayer","canPlay","cAttachmentReactPlayer","url","config","file","attributes","preload","controls","propTypes","PropTypes","string","isRequired","number","oneOf","shape","bool","Attachment$1","withStyles","theme","top","left","transform","margin","whiteSpace","textOverflow","fontWeight","color","palette","primary","text3","text9","marginRight","minWidth","flexDirection"],"mappings":"6sQAyBA,IAEMA,EAAUC,EAAAA,QAAK,KACfC,EAAUD,EAAAA,QAAK,KAEfE,EACG,CAAEC,MAAO,QAASC,MAAO,KAD5BF,EAEI,CAAEC,MAAO,SAAUC,MAAO,KAG9BC,EAAQ,CACZC,UAAW,SAACC,EAAeC,GAAI,MAAM,CACnCC,SAAU,OACVC,aAAc,EACdC,SAAU,SAGVC,UAAWJ,IAASN,EAAYC,MAAQD,EAAYE,MAAQF,EAAaE,MACzES,QAASN,EAAgB,UAAY,OACrCO,OAAQ,UACR,EACFC,oBAAqB,CACnBC,QAAS,qBACTC,OAA2B,oBAC3BP,aAAc,EACdD,SAAU,IACVS,MAAO,OAETC,iBAAkB,CAChBC,SAAU,WACVC,gBAAiBtB,EACjBW,aAAc,EACdY,UAAW,GACXC,OAAQ,IACRL,MAAO,MA6DLM,EAAkB,SAAAC,GAAS,IAAAC,EAAAC,EACzBC,EAAeC,EAAaJ,EAAMK,qBAAuBL,EAAMM,cAErE,OACEC,EAAAA,KAAAC,EAAAA,SAAA,CAAAC,SACE,CAAAF,EAAAG,KAAA,MAAA,CAAKC,QAASX,EAAMY,aAAcC,UAAWC,EAAOC,eAAeN,SACjE,CAAAO,EAAAC,IAAA,MAAA,CACE,cAAA,GAAAC,OAtGQ,aAsG0B,UAClCC,IAAKhB,EACL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