@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,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),s=require("@babel/runtime/helpers/toConsumableArray"),o=require("react"),n=require("@material-ui/core"),i=require("classnames"),c=require("../FeedCard/FeedCard.js"),r=require("../AttachmentPreview/useStoredAttachments.js"),t=require("../FeedCard/useFeedActivity.js"),a=require("../AttachmentPreview/AttachmentPreview.js");require("../../componentsV2/FileIcon/FileIcon.js"),require("../../componentsV2/ButtonIcon/ButtonIcon.js");var u=require("../../componentsV2/Tooltip/Tooltip.js"),l=require("react/jsx-runtime"),m=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("@babel/runtime/helpers/slicedToArray"),require("../../componentsV2/Menu/Menu.js"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("../../clients/jsonApi/index.js"),require("../../utils/main.js"),require("../AttachmentPreview/AttachmentImage.js"),require("../AttachmentPreview/AttachmentPreview.scss.js"),require("file-extension"),require("image-extensions"),require("video-extensions");var d=require("../../componentsV2/Avatar/Avatar.js"),j=require("../LinkedText/LinkedText.js"),p=require("./CommentCardReactions.js"),q=require("./CommentCardReplies.js"),h=require("./CommentCard.scss.js");function I(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var v=I(e),x=I(s),C=I(i);function b(e,s){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);s&&(n=n.filter((function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable}))),o.push.apply(o,n)}return o}function f(e){for(var s=1;s<arguments.length;s++){var o=null!=arguments[s]?arguments[s]:{};s%2?b(Object(o),!0).forEach((function(s){v.default(e,s,o[s])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):b(Object(o)).forEach((function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(o,s))}))}return e}var y=function(e){var s=e.rows;return l.jsx("div",{className:h.metadataRows,children:s.map((function(e){var s=e.label,o=e.value,n=e.unit;return l.jsxs("div",{className:h.metadataRow,children:[l.jsx("span",{className:h.metadataLabel,children:s}),l.jsx("span",{className:h.metadataValue,children:o}),n&&l.jsx("span",{className:h.metadataUnit,children:n})]},s)}))})},O=o.forwardRef((function(e,s){var i=e.activity,I=e.variant,v=void 0===I?"expanded":I,b=e.author,O=e.timestamp,A=e.subtitle,F=e.body,N=e.contextRows,g=e.attachment,R=e.storedAttachments,w=e.isLiked,P=e.likesCount,M=e.commentsCount,k=e.replies,T=e.hasMoreReplies,S=e.moreRepliesCount,D=e.attachments,E=e.onAttachmentClick,L=e.onAttachmentShare,_=e.attachmentSlot,B=e.chip,G=e.chipColor,H=e.onLike,U=e.onReplyToggle,V=e.onForward,z=e.onShowMoreReplies,X=e.menuItems,W=e.isReplyOpen,K=e.replyInput,Z=e.editForm,J=e.width,Q=e.onMouseEnter,Y=e.onMouseLeave,$=e.className,ee=e.testId,se=t.useFeedActivity(i,"comment"),oe=se?[].concat(x.default(null!=X?X:[]),x.default(se.menuItems)):X,ne=se?se.replyInput:K,ie=se?se.isReplyOpen:W,ce=se?se.replies:k,re=!(null==N||!N.length),te=re&&!B,ae=!!(se||H||U||V||null!=oe&&oe.length||te),ue=te&&l.jsx(u.Tooltip,{placement:"top",className:h.metadataTooltip,title:l.jsx(y,{rows:N}),children:l.jsx("span",{className:h.infoButton,"data-testid":"comment-card-info",children:l.jsx(m.InfoIcon,{size:12,strokeWidth:2})})}),le=l.jsx(p.CommentCardReactions,{info:ue,commentsCount:se?se.commentsCount:M,likesCount:se?se.likesCount:P,isLiked:se?se.isLiked:w,menuItems:oe,onLike:se?se.onLike:H,onReplyToggle:se?se.onReplyToggle:U,onForward:V}),me=l.jsxs("div",{className:h.bodyRow,children:[l.jsx("div",{className:h.text,children:l.jsx(j.LinkedText,{children:F})}),B&&l.jsx(u.Tooltip,{placement:"top",className:h.metadataTooltip,title:re?l.jsx(y,{rows:N}):"",children:l.jsx("span",{className:C.default(h.chip,!!G&&h.chipAccented),style:G?{borderLeftColor:G}:void 0,children:B})})]}),de=o.useMemo((function(){return null!=R?R:[g].filter(Boolean)}),[R,g]),je=r.useStoredAttachments(de),pe=je.length?je:D,qe=null!=pe&&pe.length?l.jsx(a.AttachmentPreview,{items:pe,onItemClick:E,onShare:L}):null,he={ref:s,width:J,radius:12,onMouseEnter:Q,onMouseLeave:Y,testId:ee,className:$};if(null!=se&&se.isDeleted)return null;var Ie=function(e){return l.jsxs(l.Fragment,{children:[e,null==se?void 0:se.deleteDialog]})};if("preview"===v)return Ie(l.jsxs(c.FeedCard,f(f({},he),{},{maxHeight:c.FEED_CARD_MAX_HEIGHT_PX,children:[l.jsxs("div",{className:h.compactBody,children:[l.jsxs("div",{className:h.compactTop,children:[l.jsx(d.Avatar,{size:24,name:b.name,imageSrc:b.avatarUrl,className:h.avatar}),l.jsx("span",{className:h.name,children:b.name}),l.jsx("span",{className:h.compactTime,children:O})]}),l.jsx("div",{className:h.scrollBody,children:me})]}),ae&&l.jsx("div",{className:h.compactFooter,children:le})]})));var ve=!!Z,xe=l.jsxs("div",{className:h.header,children:[l.jsx(d.Avatar,{size:24,name:b.name,imageSrc:b.avatarUrl,className:h.avatar}),l.jsxs("div",{className:h.headerText,children:[l.jsxs("div",{className:h.nameRow,children:[l.jsx("span",{className:h.name,children:b.name}),O&&l.jsx("span",{className:h.timestamp,children:O})]}),A&&l.jsx("span",{className:h.subtitle,children:A})]})]});return Ie(ve?l.jsxs(c.FeedCard,f(f({},he),{},{children:[l.jsx("div",{className:h.editHeader,children:xe}),Z]})):l.jsxs(c.FeedCard,f(f({},he),{},{children:[l.jsxs("div",{className:h.capped,style:{maxHeight:c.FEED_CARD_MAX_HEIGHT_PX},children:[l.jsxs("div",{className:h.bodySurface,children:[xe,l.jsxs("div",{className:h.scrollBody,children:[me,(qe||_)&&l.jsxs("div",{className:h.attachment,children:[qe,_]})]})]}),ae&&l.jsx("div",{className:h.footer,children:le})]}),ae&&l.jsx(n.Collapse,{in:ie,timeout:250,unmountOnExit:!0,children:l.jsx("div",{className:h.repliesSection,children:l.jsx(q.CommentCardReplies,{replies:ce,hasMoreReplies:se?se.hasMoreReplies:T,moreRepliesCount:se?se.moreRepliesCount:S,isReplyOpen:ie,replyInput:ne,onShowMoreReplies:se?se.onShowMoreReplies:z})})})]})))}));exports.CommentCard=O;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),s=require("@babel/runtime/helpers/toConsumableArray"),o=require("react"),n=require("@material-ui/core"),i=require("classnames"),c=require("../FeedCard/FeedCard.js"),r=require("../AttachmentPreview/useStoredAttachments.js"),t=require("../FeedCard/useFeedActivity.js"),a=require("../AttachmentPreview/AttachmentPreview.js");require("../../componentsV2/FileIcon/FileIcon.js"),require("../../componentsV2/ButtonIcon/ButtonIcon.js");var u=require("../../componentsV2/Tooltip/Tooltip.js"),l=require("react/jsx-runtime"),m=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("@babel/runtime/helpers/slicedToArray"),require("../../componentsV2/Menu/Menu.js"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("../../clients/jsonApi/index.js"),require("../../utils/main.js"),require("../AttachmentPreview/AttachmentImage.js"),require("../AttachmentPreview/AttachmentPreview.scss.js"),require("file-extension"),require("image-extensions"),require("video-extensions");var d=require("../../componentsV2/Avatar/Avatar.js"),j=require("../LinkedText/LinkedText.js"),p=require("./CommentCardReactions.js"),q=require("./CommentCardReplies.js"),h=require("./CommentCard.scss.js");function I(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var v=I(e),x=I(s),C=I(i);function b(e,s){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);s&&(n=n.filter((function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable}))),o.push.apply(o,n)}return o}function f(e){for(var s=1;s<arguments.length;s++){var o=null!=arguments[s]?arguments[s]:{};s%2?b(Object(o),!0).forEach((function(s){v.default(e,s,o[s])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):b(Object(o)).forEach((function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(o,s))}))}return e}var y=function(e){var s=e.rows;return l.jsx("div",{className:h.metadataRows,children:s.map((function(e){var s=e.label,o=e.value,n=e.unit;return l.jsxs("div",{className:h.metadataRow,children:[l.jsx("span",{className:h.metadataLabel,children:s}),l.jsx("span",{className:h.metadataValue,children:o}),n&&l.jsx("span",{className:h.metadataUnit,children:n})]},s)}))})},O=o.forwardRef((function(e,s){var i=e.activity,I=e.variant,v=void 0===I?"expanded":I,b=e.author,O=e.timestamp,A=e.subtitle,F=e.body,N=e.contextRows,g=e.attachment,R=e.storedAttachments,P=e.isLiked,w=e.likesCount,M=e.commentsCount,k=e.replies,T=e.hasMoreReplies,S=e.moreRepliesCount,D=e.attachments,E=e.onAttachmentClick,L=e.onAttachmentShare,_=e.attachmentSlot,B=e.chip,G=e.chipColor,H=e.onLike,U=e.onReplyToggle,V=e.onForward,z=e.onShowMoreReplies,X=e.menuItems,W=e.isReplyOpen,K=e.replyInput,Z=e.editForm,J=e.width,Q=e.onMouseEnter,Y=e.onMouseLeave,$=e.className,ee=e.testId,se=t.useFeedActivity(i,"comment"),oe=se?[].concat(x.default(null!=X?X:[]),x.default(se.menuItems)):X,ne=se?se.replyInput:K,ie=se?se.isReplyOpen:W,ce=se?se.replies:k,re=!(null==N||!N.length),te=re&&!B,ae=!!(se||H||U||V||null!=oe&&oe.length||te),ue=te&&l.jsx(u.Tooltip,{placement:"top",className:h.metadataTooltip,title:l.jsx(y,{rows:N}),children:l.jsx("span",{className:h.infoButton,"data-testid":"comment-card-info",children:l.jsx(m.InfoIcon,{size:12,strokeWidth:2})})}),le=l.jsx(p.CommentCardReactions,{info:ue,commentsCount:se?se.commentsCount:M,likesCount:se?se.likesCount:w,isLiked:se?se.isLiked:P,menuItems:oe,onLike:se?se.onLike:H,onReplyToggle:se?se.onReplyToggle:U,onForward:V}),me=l.jsxs("div",{className:h.text,children:[B&&l.jsx(u.Tooltip,{placement:"top",className:h.metadataTooltip,title:re?l.jsx(y,{rows:N}):"",children:l.jsxs("span",{className:C.default(h.chip,!!G&&h.chipAccented),style:G?{"--chip-color":G}:void 0,children:[G&&l.jsx("span",{className:h.chipDot}),B]})}),l.jsx(j.LinkedText,{children:F})]}),de=o.useMemo((function(){return null!=R?R:[g].filter(Boolean)}),[R,g]),je=r.useStoredAttachments(de),pe=je.length?je:D,qe=null!=pe&&pe.length?l.jsx(a.AttachmentPreview,{items:pe,onItemClick:E,onShare:L}):null,he={ref:s,width:J,radius:12,onMouseEnter:Q,onMouseLeave:Y,testId:ee,className:$};if(null!=se&&se.isDeleted)return null;var Ie=function(e){return l.jsxs(l.Fragment,{children:[e,null==se?void 0:se.deleteDialog]})};if("preview"===v)return Ie(l.jsxs(c.FeedCard,f(f({},he),{},{maxHeight:c.FEED_CARD_MAX_HEIGHT_PX,children:[l.jsxs("div",{className:h.compactBody,children:[l.jsxs("div",{className:h.compactTop,children:[l.jsx(d.Avatar,{size:24,name:b.name,imageSrc:b.avatarUrl,className:h.avatar}),l.jsx("span",{className:h.name,children:b.name}),l.jsx("span",{className:h.compactTime,children:O})]}),l.jsx("div",{className:h.scrollBody,children:me})]}),ae&&l.jsx("div",{className:h.compactFooter,children:le})]})));var ve=!!Z,xe=l.jsxs("div",{className:h.header,children:[l.jsx(d.Avatar,{size:24,name:b.name,imageSrc:b.avatarUrl,className:h.avatar}),l.jsxs("div",{className:h.headerText,children:[l.jsxs("div",{className:h.nameRow,children:[l.jsx("span",{className:h.name,children:b.name}),O&&l.jsx("span",{className:h.timestamp,children:O})]}),A&&l.jsx("span",{className:h.subtitle,children:A})]})]});return Ie(ve?l.jsxs(c.FeedCard,f(f({},he),{},{children:[l.jsx("div",{className:h.editHeader,children:xe}),Z]})):l.jsxs(c.FeedCard,f(f({},he),{},{children:[l.jsxs("div",{className:h.capped,style:{maxHeight:c.FEED_CARD_MAX_HEIGHT_PX},children:[l.jsxs("div",{className:h.bodySurface,children:[xe,l.jsxs("div",{className:h.scrollBody,children:[me,(qe||_)&&l.jsxs("div",{className:h.attachment,children:[qe,_]})]})]}),ae&&l.jsx("div",{className:h.footer,children:le})]}),ae&&l.jsx(n.Collapse,{in:ie,timeout:250,unmountOnExit:!0,children:l.jsx("div",{className:h.repliesSection,children:l.jsx(q.CommentCardReplies,{replies:ce,hasMoreReplies:se?se.hasMoreReplies:T,moreRepliesCount:se?se.moreRepliesCount:S,isReplyOpen:ie,replyInput:ne,onShowMoreReplies:se?se.onShowMoreReplies:z})})})]})))}));exports.CommentCard=O;
2
2
  //# sourceMappingURL=CommentCard.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CommentCard.js","sources":["../../../../src/components/CommentCard/CommentCard.tsx"],"sourcesContent":["import { forwardRef, ReactElement, useMemo } from 'react';\nimport { Collapse } from '@material-ui/core';\nimport classNames from 'classnames';\n\nimport { FeedCard, FEED_CARD_MAX_HEIGHT_PX } from '../FeedCard';\nimport { StoredAttachment } from '../AttachmentPreview/useStoredAttachment';\nimport { useStoredAttachments } from '../AttachmentPreview/useStoredAttachments';\nimport { useFeedActivity } from '../FeedCard/useFeedActivity';\nimport { AttachmentPreview } from '../AttachmentPreview';\nimport { Avatar } from '../../componentsV2/Avatar';\nimport { Tooltip } from '../../componentsV2/Tooltip';\nimport { LinkedText } from '../LinkedText';\nimport { InfoIcon } from '../../icons';\n\nimport { CommentCardReactions } from './CommentCardReactions';\nimport { CommentCardReplies } from './CommentCardReplies';\nimport { CommentCardProps, CommentContextRow } from './CommentCard.types';\n\nimport styles from './CommentCard.scss';\n\nconst MetadataTooltip = ({ rows }: { rows: CommentContextRow[] }) => (\n <div className={styles.metadataRows}>\n {rows.map(({ label, value, unit }) => (\n <div key={label} className={styles.metadataRow}>\n <span className={styles.metadataLabel}>{label}</span>\n <span className={styles.metadataValue}>{value}</span>\n {unit && <span className={styles.metadataUnit}>{unit}</span>}\n </div>\n ))}\n </div>\n);\n\nexport const CommentCard = forwardRef<HTMLDivElement, CommentCardProps>((props, ref) => {\n const {\n activity,\n variant = 'expanded',\n author,\n timestamp,\n subtitle,\n body,\n contextRows,\n attachment,\n storedAttachments,\n isLiked,\n likesCount,\n commentsCount,\n replies,\n hasMoreReplies,\n moreRepliesCount,\n attachments,\n onAttachmentClick,\n onAttachmentShare,\n attachmentSlot,\n chip,\n chipColor,\n onLike,\n onReplyToggle,\n onForward,\n onShowMoreReplies,\n menuItems,\n isReplyOpen,\n replyInput,\n editForm,\n width,\n onMouseEnter,\n onMouseLeave,\n className,\n testId,\n } = props;\n\n const activityBinding = useFeedActivity(activity, 'comment');\n const cardMenuItems = activityBinding\n ? [...(menuItems ?? []), ...activityBinding.menuItems]\n : menuItems;\n const cardReplyInput = activityBinding ? activityBinding.replyInput : replyInput;\n const cardIsReplyOpen = activityBinding ? activityBinding.isReplyOpen : isReplyOpen;\n const cardReplies = activityBinding ? activityBinding.replies : replies;\n\n const hasMetadata = !!contextRows?.length;\n // The chip takes over the metadata tooltip when present, so the info icon is redundant.\n const showInfoIcon = hasMetadata && !chip;\n\n const hasFooter = !!(\n activityBinding ||\n onLike ||\n onReplyToggle ||\n onForward ||\n cardMenuItems?.length ||\n showInfoIcon\n );\n\n const info = showInfoIcon && (\n <Tooltip\n placement=\"top\"\n className={styles.metadataTooltip}\n title={<MetadataTooltip rows={contextRows} />}\n >\n <span className={styles.infoButton} data-testid=\"comment-card-info\">\n <InfoIcon size={12} strokeWidth={2} />\n </span>\n </Tooltip>\n );\n\n const reactions = (\n <CommentCardReactions\n info={info}\n commentsCount={activityBinding ? activityBinding.commentsCount : commentsCount}\n likesCount={activityBinding ? activityBinding.likesCount : likesCount}\n isLiked={activityBinding ? activityBinding.isLiked : isLiked}\n menuItems={cardMenuItems}\n onLike={activityBinding ? activityBinding.onLike : onLike}\n onReplyToggle={activityBinding ? activityBinding.onReplyToggle : onReplyToggle}\n onForward={onForward}\n />\n );\n\n const bodyRow = (\n <div className={styles.bodyRow}>\n <div className={styles.text}>\n <LinkedText>{body}</LinkedText>\n </div>\n {chip && (\n <Tooltip\n placement=\"top\"\n className={styles.metadataTooltip}\n title={hasMetadata ? <MetadataTooltip rows={contextRows} /> : ''}\n >\n <span\n className={classNames(styles.chip, !!chipColor && styles.chipAccented)}\n style={chipColor ? { borderLeftColor: chipColor } : undefined}\n >\n {chip}\n </span>\n </Tooltip>\n )}\n </div>\n );\n\n const storedList = useMemo(\n () => storedAttachments ?? ([attachment].filter(Boolean) as StoredAttachment[]),\n [storedAttachments, attachment]\n );\n const storedItems = useStoredAttachments(storedList);\n const items = storedItems.length ? storedItems : attachments;\n\n // Undefined is the norm, which lets AttachmentPreview run its own lightbox; a caller that\n // passes the prop is taking the click over.\n const attachmentPreview = items?.length ? (\n <AttachmentPreview items={items} onItemClick={onAttachmentClick} onShare={onAttachmentShare} />\n ) : null;\n\n const surfaceProps = {\n ref,\n width,\n radius: 12,\n onMouseEnter,\n onMouseLeave,\n testId,\n className,\n };\n\n if (activityBinding?.isDeleted) return null;\n const withOverlays = (card: ReactElement) => (\n <>\n {card}\n {activityBinding?.deleteDialog}\n </>\n );\n\n if (variant === 'preview') {\n return withOverlays(\n <FeedCard {...surfaceProps} maxHeight={FEED_CARD_MAX_HEIGHT_PX}>\n <div className={styles.compactBody}>\n <div className={styles.compactTop}>\n <Avatar\n size={24}\n name={author.name}\n imageSrc={author.avatarUrl}\n className={styles.avatar}\n />\n <span className={styles.name}>{author.name}</span>\n <span className={styles.compactTime}>{timestamp}</span>\n </div>\n <div className={styles.scrollBody}>{bodyRow}</div>\n </div>\n {hasFooter && <div className={styles.compactFooter}>{reactions}</div>}\n </FeedCard>\n );\n }\n\n const editing = !!editForm;\n\n const headerEl = (\n <div className={styles.header}>\n <Avatar size={24} name={author.name} imageSrc={author.avatarUrl} className={styles.avatar} />\n <div className={styles.headerText}>\n <div className={styles.nameRow}>\n <span className={styles.name}>{author.name}</span>\n {timestamp && <span className={styles.timestamp}>{timestamp}</span>}\n </div>\n {subtitle && <span className={styles.subtitle}>{subtitle}</span>}\n </div>\n </div>\n );\n\n if (editing) {\n return withOverlays(\n <FeedCard {...surfaceProps}>\n <div className={styles.editHeader}>{headerEl}</div>\n {editForm}\n </FeedCard>\n );\n }\n\n return withOverlays(\n <FeedCard {...surfaceProps}>\n <div className={styles.capped} style={{ maxHeight: FEED_CARD_MAX_HEIGHT_PX }}>\n <div className={styles.bodySurface}>\n {headerEl}\n\n <div className={styles.scrollBody}>\n {bodyRow}\n {(attachmentPreview || attachmentSlot) && (\n <div className={styles.attachment}>\n {attachmentPreview}\n {attachmentSlot}\n </div>\n )}\n </div>\n </div>\n\n {hasFooter && <div className={styles.footer}>{reactions}</div>}\n </div>\n\n {hasFooter && (\n <Collapse in={cardIsReplyOpen} timeout={250} unmountOnExit>\n <div className={styles.repliesSection}>\n <CommentCardReplies\n replies={cardReplies}\n hasMoreReplies={activityBinding ? activityBinding.hasMoreReplies : hasMoreReplies}\n moreRepliesCount={\n activityBinding ? activityBinding.moreRepliesCount : moreRepliesCount\n }\n isReplyOpen={cardIsReplyOpen}\n replyInput={cardReplyInput}\n onShowMoreReplies={\n activityBinding ? activityBinding.onShowMoreReplies : onShowMoreReplies\n }\n />\n </div>\n </Collapse>\n )}\n </FeedCard>\n );\n});\n"],"names":["MetadataTooltip","_ref","rows","_jsx","className","styles","metadataRows","children","map","_ref2","label","value","unit","_jsxs","metadataRow","jsx","metadataLabel","metadataValue","metadataUnit","CommentCard","forwardRef","props","ref","activity","_props$variant","variant","author","timestamp","subtitle","body","contextRows","attachment","storedAttachments","isLiked","likesCount","commentsCount","replies","hasMoreReplies","moreRepliesCount","attachments","onAttachmentClick","onAttachmentShare","attachmentSlot","chip","chipColor","onLike","onReplyToggle","onForward","onShowMoreReplies","menuItems","isReplyOpen","replyInput","editForm","width","onMouseEnter","onMouseLeave","testId","activityBinding","useFeedActivity","cardMenuItems","cardReplyInput","cardIsReplyOpen","cardReplies","hasMetadata","length","showInfoIcon","hasFooter","info","Tooltip","placement","metadataTooltip","title","infoButton","InfoIcon","size","strokeWidth","reactions","CommentCardReactions","bodyRow","jsxs","text","LinkedText","classNames","chipAccented","style","borderLeftColor","undefined","storedList","useMemo","filter","Boolean","storedItems","useStoredAttachments","items","attachmentPreview","AttachmentPreview","onItemClick","onShare","surfaceProps","radius","isDeleted","withOverlays","card","_Fragment","deleteDialog","FeedCard","maxHeight","FEED_CARD_MAX_HEIGHT_PX","compactBody","compactTop","Avatar","name","imageSrc","avatarUrl","avatar","compactTime","scrollBody","compactFooter","editing","headerEl","header","headerText","nameRow","editHeader","capped","bodySurface","footer","Collapse","in","timeout","unmountOnExit","repliesSection","CommentCardReplies"],"mappings":"29LAoBA,IAAMA,EAAkB,SAAHC,GAAA,IAAMC,IAAAA,KAAI,OAC7BC,EAAAA,IAAA,MAAA,CAAKC,UAAWC,EAAOC,aAAaC,SACjCL,EAAKM,KAAI,SAAAC,GAAA,IAAGC,IAAAA,MAAOC,IAAAA,MAAOC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CAAKX,UAAWC,EAAOyH,OAAOvH,SAAEqE,QAG/CV,IACC/D,EAAAY,IAACgH,WAAQ,CAACC,GAAInE,GAAiBoE,QAAS,IAAKC,eAAa,EAAA3H,SACxDJ,EAAAY,IAAA,MAAA,CAAKX,UAAWC,EAAO8H,eAAe5H,SACpCJ,MAACiI,qBAAkB,CACjBhG,QAAS0B,GACTzB,eAAgBoB,GAAkBA,GAAgBpB,eAAiBA,EACnEC,iBACEmB,GAAkBA,GAAgBnB,iBAAmBA,EAEvDY,YAAaW,GACbV,WAAYS,GACZZ,kBACES,GAAkBA,GAAgBT,kBAAoBA,YAQtE"}
1
+ {"version":3,"file":"CommentCard.js","sources":["../../../../src/components/CommentCard/CommentCard.tsx"],"sourcesContent":["import { CSSProperties, forwardRef, ReactElement, useMemo } from 'react';\nimport { Collapse } from '@material-ui/core';\nimport classNames from 'classnames';\n\nimport { FeedCard, FEED_CARD_MAX_HEIGHT_PX } from '../FeedCard';\nimport { StoredAttachment } from '../AttachmentPreview/useStoredAttachment';\nimport { useStoredAttachments } from '../AttachmentPreview/useStoredAttachments';\nimport { useFeedActivity } from '../FeedCard/useFeedActivity';\nimport { AttachmentPreview } from '../AttachmentPreview';\nimport { Avatar } from '../../componentsV2/Avatar';\nimport { Tooltip } from '../../componentsV2/Tooltip';\nimport { LinkedText } from '../LinkedText';\nimport { InfoIcon } from '../../icons';\n\nimport { CommentCardReactions } from './CommentCardReactions';\nimport { CommentCardReplies } from './CommentCardReplies';\nimport { CommentCardProps, CommentContextRow } from './CommentCard.types';\n\nimport styles from './CommentCard.scss';\n\nconst MetadataTooltip = ({ rows }: { rows: CommentContextRow[] }) => (\n <div className={styles.metadataRows}>\n {rows.map(({ label, value, unit }) => (\n <div key={label} className={styles.metadataRow}>\n <span className={styles.metadataLabel}>{label}</span>\n <span className={styles.metadataValue}>{value}</span>\n {unit && <span className={styles.metadataUnit}>{unit}</span>}\n </div>\n ))}\n </div>\n);\n\nexport const CommentCard = forwardRef<HTMLDivElement, CommentCardProps>((props, ref) => {\n const {\n activity,\n variant = 'expanded',\n author,\n timestamp,\n subtitle,\n body,\n contextRows,\n attachment,\n storedAttachments,\n isLiked,\n likesCount,\n commentsCount,\n replies,\n hasMoreReplies,\n moreRepliesCount,\n attachments,\n onAttachmentClick,\n onAttachmentShare,\n attachmentSlot,\n chip,\n chipColor,\n onLike,\n onReplyToggle,\n onForward,\n onShowMoreReplies,\n menuItems,\n isReplyOpen,\n replyInput,\n editForm,\n width,\n onMouseEnter,\n onMouseLeave,\n className,\n testId,\n } = props;\n\n const activityBinding = useFeedActivity(activity, 'comment');\n const cardMenuItems = activityBinding\n ? [...(menuItems ?? []), ...activityBinding.menuItems]\n : menuItems;\n const cardReplyInput = activityBinding ? activityBinding.replyInput : replyInput;\n const cardIsReplyOpen = activityBinding ? activityBinding.isReplyOpen : isReplyOpen;\n const cardReplies = activityBinding ? activityBinding.replies : replies;\n\n const hasMetadata = !!contextRows?.length;\n // The chip takes over the metadata tooltip when present, so the info icon is redundant.\n const showInfoIcon = hasMetadata && !chip;\n\n const hasFooter = !!(\n activityBinding ||\n onLike ||\n onReplyToggle ||\n onForward ||\n cardMenuItems?.length ||\n showInfoIcon\n );\n\n const info = showInfoIcon && (\n <Tooltip\n placement=\"top\"\n className={styles.metadataTooltip}\n title={<MetadataTooltip rows={contextRows} />}\n >\n <span className={styles.infoButton} data-testid=\"comment-card-info\">\n <InfoIcon size={12} strokeWidth={2} />\n </span>\n </Tooltip>\n );\n\n const reactions = (\n <CommentCardReactions\n info={info}\n commentsCount={activityBinding ? activityBinding.commentsCount : commentsCount}\n likesCount={activityBinding ? activityBinding.likesCount : likesCount}\n isLiked={activityBinding ? activityBinding.isLiked : isLiked}\n menuItems={cardMenuItems}\n onLike={activityBinding ? activityBinding.onLike : onLike}\n onReplyToggle={activityBinding ? activityBinding.onReplyToggle : onReplyToggle}\n onForward={onForward}\n />\n );\n\n const bodyRow = (\n <div className={styles.text}>\n {chip && (\n <Tooltip\n placement=\"top\"\n className={styles.metadataTooltip}\n title={hasMetadata ? <MetadataTooltip rows={contextRows} /> : ''}\n >\n <span\n className={classNames(styles.chip, !!chipColor && styles.chipAccented)}\n style={chipColor ? ({ '--chip-color': chipColor } as CSSProperties) : undefined}\n >\n {chipColor && <span className={styles.chipDot} />}\n {chip}\n </span>\n </Tooltip>\n )}\n <LinkedText>{body}</LinkedText>\n </div>\n );\n\n const storedList = useMemo(\n () => storedAttachments ?? ([attachment].filter(Boolean) as StoredAttachment[]),\n [storedAttachments, attachment]\n );\n const storedItems = useStoredAttachments(storedList);\n const items = storedItems.length ? storedItems : attachments;\n\n // Undefined is the norm, which lets AttachmentPreview run its own lightbox; a caller that\n // passes the prop is taking the click over.\n const attachmentPreview = items?.length ? (\n <AttachmentPreview items={items} onItemClick={onAttachmentClick} onShare={onAttachmentShare} />\n ) : null;\n\n const surfaceProps = {\n ref,\n width,\n radius: 12,\n onMouseEnter,\n onMouseLeave,\n testId,\n className,\n };\n\n if (activityBinding?.isDeleted) return null;\n const withOverlays = (card: ReactElement) => (\n <>\n {card}\n {activityBinding?.deleteDialog}\n </>\n );\n\n if (variant === 'preview') {\n return withOverlays(\n <FeedCard {...surfaceProps} maxHeight={FEED_CARD_MAX_HEIGHT_PX}>\n <div className={styles.compactBody}>\n <div className={styles.compactTop}>\n <Avatar\n size={24}\n name={author.name}\n imageSrc={author.avatarUrl}\n className={styles.avatar}\n />\n <span className={styles.name}>{author.name}</span>\n <span className={styles.compactTime}>{timestamp}</span>\n </div>\n <div className={styles.scrollBody}>{bodyRow}</div>\n </div>\n {hasFooter && <div className={styles.compactFooter}>{reactions}</div>}\n </FeedCard>\n );\n }\n\n const editing = !!editForm;\n\n const headerEl = (\n <div className={styles.header}>\n <Avatar size={24} name={author.name} imageSrc={author.avatarUrl} className={styles.avatar} />\n <div className={styles.headerText}>\n <div className={styles.nameRow}>\n <span className={styles.name}>{author.name}</span>\n {timestamp && <span className={styles.timestamp}>{timestamp}</span>}\n </div>\n {subtitle && <span className={styles.subtitle}>{subtitle}</span>}\n </div>\n </div>\n );\n\n if (editing) {\n return withOverlays(\n <FeedCard {...surfaceProps}>\n <div className={styles.editHeader}>{headerEl}</div>\n {editForm}\n </FeedCard>\n );\n }\n\n return withOverlays(\n <FeedCard {...surfaceProps}>\n <div className={styles.capped} style={{ maxHeight: FEED_CARD_MAX_HEIGHT_PX }}>\n <div className={styles.bodySurface}>\n {headerEl}\n\n <div className={styles.scrollBody}>\n {bodyRow}\n {(attachmentPreview || attachmentSlot) && (\n <div className={styles.attachment}>\n {attachmentPreview}\n {attachmentSlot}\n </div>\n )}\n </div>\n </div>\n\n {hasFooter && <div className={styles.footer}>{reactions}</div>}\n </div>\n\n {hasFooter && (\n <Collapse in={cardIsReplyOpen} timeout={250} unmountOnExit>\n <div className={styles.repliesSection}>\n <CommentCardReplies\n replies={cardReplies}\n hasMoreReplies={activityBinding ? activityBinding.hasMoreReplies : hasMoreReplies}\n moreRepliesCount={\n activityBinding ? activityBinding.moreRepliesCount : moreRepliesCount\n }\n isReplyOpen={cardIsReplyOpen}\n replyInput={cardReplyInput}\n onShowMoreReplies={\n activityBinding ? activityBinding.onShowMoreReplies : onShowMoreReplies\n }\n />\n </div>\n </Collapse>\n )}\n </FeedCard>\n );\n});\n"],"names":["MetadataTooltip","_ref","rows","_jsx","className","styles","metadataRows","children","map","_ref2","label","value","unit","_jsxs","metadataRow","jsx","metadataLabel","metadataValue","metadataUnit","CommentCard","forwardRef","props","ref","activity","_props$variant","variant","author","timestamp","subtitle","body","contextRows","attachment","storedAttachments","isLiked","likesCount","commentsCount","replies","hasMoreReplies","moreRepliesCount","attachments","onAttachmentClick","onAttachmentShare","attachmentSlot","chip","chipColor","onLike","onReplyToggle","onForward","onShowMoreReplies","menuItems","isReplyOpen","replyInput","editForm","width","onMouseEnter","onMouseLeave","testId","activityBinding","useFeedActivity","cardMenuItems","cardReplyInput","cardIsReplyOpen","cardReplies","hasMetadata","length","showInfoIcon","hasFooter","info","Tooltip","placement","metadataTooltip","title","infoButton","InfoIcon","size","strokeWidth","reactions","CommentCardReactions","bodyRow","jsxs","text","classNames","chipAccented","style","undefined","chipDot","LinkedText","storedList","useMemo","filter","Boolean","storedItems","useStoredAttachments","items","attachmentPreview","AttachmentPreview","onItemClick","onShare","surfaceProps","radius","isDeleted","withOverlays","card","_Fragment","deleteDialog","FeedCard","maxHeight","FEED_CARD_MAX_HEIGHT_PX","compactBody","compactTop","Avatar","name","imageSrc","avatarUrl","avatar","compactTime","scrollBody","compactFooter","editing","headerEl","header","headerText","nameRow","editHeader","capped","bodySurface","footer","Collapse","in","timeout","unmountOnExit","repliesSection","CommentCardReplies"],"mappings":"29LAoBA,IAAMA,EAAkB,SAAHC,GAAA,IAAMC,IAAAA,KAAI,OAC7BC,EAAAA,IAAA,MAAA,CAAKC,UAAWC,EAAOC,aAAaC,SACjCL,EAAKM,KAAI,SAAAC,GAAA,IAAGC,IAAAA,MAAOC,IAAAA,MAAOC,IAAAA,KAAI,OAC7BC,EAAAA,KAAA,MAAA,CAAiBT,UAAWC,EAAOS,YAAYP,SAC7C,CAAAJ,EAAAY,IAAA,OAAA,CAAMX,UAAWC,EAAOW,cAAcT,SAAEG,IACxCP,EAAAY,IAAA,OAAA,CAAMX,UAAWC,EAAOY,cAAcV,SAAEI,IACvCC,GAAQT,EAAAY,IAAA,OAAA,CAAMX,UAAWC,EAAOa,aAAaX,SAAEK,MAHxCF,OAMR,EAGKS,EAAcC,EAAUA,YAAmC,SAACC,EAAOC,GAC9E,IACEC,EAkCEF,EAlCFE,SAAQC,EAkCNH,EAjCFI,QAAAA,aAAU,WAAUD,EACpBE,EAgCEL,EAhCFK,OACAC,EA+BEN,EA/BFM,UACAC,EA8BEP,EA9BFO,SACAC,EA6BER,EA7BFQ,KACAC,EA4BET,EA5BFS,YACAC,EA2BEV,EA3BFU,WACAC,EA0BEX,EA1BFW,kBACAC,EAyBEZ,EAzBFY,QACAC,EAwBEb,EAxBFa,WACAC,EAuBEd,E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OACSyE,GADLiB,GAEAzG,EAACkE,KAAA0B,kBAAaP,IAAY,GAAA,CAAA3F,SACxB,CAAAJ,EAAAY,IAAA,MAAA,CAAKX,UAAWC,EAAOsH,WAAWpH,SAAEgH,KACnCnE,MAMLvC,EAACkE,KAAA0B,kBAAaP,IAAY,GAAA,CAAA3F,SACxB,CAAAM,EAAAkE,KAAA,MAAA,CAAK3E,UAAWC,EAAOuH,OAAQzC,MAAO,CAAEuB,UAAWC,EAAAA,yBAA0BpG,SAC3E,CAAAM,EAAAkE,KAAA,MAAA,CAAK3E,UAAWC,EAAOwH,YAAYtH,SAAA,CAChCgH,GAED1G,EAAAkE,KAAA,MAAA,CAAK3E,UAAWC,EAAO+G,WAAW7G,SAAA,CAC/BuE,IACCgB,IAAqBpD,IACrB7B,EAAAkE,KAAA,MAAA,CAAK3E,UAAWC,EAAO0B,WAAWxB,SAC/BuF,CAAAA,GACApD,WAMRwB,IAAa/D,EAAAY,IAAA,MAAA,CAAKX,UAAWC,EAAOyH,OAAOvH,SAAEqE,QAG/CV,IACC/D,EAAAY,IAACgH,WAAQ,CAACC,GAAInE,GAAiBoE,QAAS,IAAKC,eAAa,EAAA3H,SACxDJ,EAAAY,IAAA,MAAA,CAAKX,UAAWC,EAAO8H,eAAe5H,SACpCJ,MAACiI,qBAAkB,CACjBhG,QAAS0B,GACTzB,eAAgBoB,GAAkBA,GAAgBpB,eAAiBA,EACnEC,iBACEmB,GAAkBA,GAAgBnB,iBAAmBA,EAEvDY,YAAaW,GACbV,WAAYS,GACZZ,kBACES,GAAkBA,GAAgBT,kBAAoBA,YAQtE"}
@@ -1,2 +1,2 @@
1
- "use strict";require('./../../ext-esm/style-inject/dist/style-inject.es.js')(".CommentCard_capped__izWBZ{flex-direction:column}.CommentCard_bodySurface__scobR,.CommentCard_capped__izWBZ{overflow-clip-margin:12px;display:flex;overflow:hidden;overflow:clip}.CommentCard_bodySurface__scobR{flex:1 1 auto;flex-direction:column;gap:8px;min-height:0;padding:8px 12px}.CommentCard_editHeader__8aUBt{padding:8px 12px 0}.CommentCard_scrollBody__CIun9{display:flex;flex:1 1 auto;flex-direction:column;gap:8px;margin:0 -24px;min-height:0;overflow-x:hidden;overflow-y:auto;padding:0 24px}.CommentCard_footer__z3-CY{border-top:1px solid var(--palette-background-b-4);display:flex;flex-direction:column;flex-shrink:0;padding:4px 12px 8px}.CommentCard_repliesSection__iE7QO{padding:8px 12px 12px}.CommentCard_compactBody__zM10O{display:flex;flex:1 1 auto;flex-direction:column;gap:8px;min-height:0;overflow:hidden;padding:8px 12px}.CommentCard_compactTop__LpiQi{align-items:center;display:flex;flex-shrink:0;gap:8px}.CommentCard_compactTime__JzVQR{color:var(--palette-primary-text-7);font-size:12px;line-height:16px;margin-left:auto;white-space:nowrap}.CommentCard_compactFooter__rgB4D{border-top:1px solid var(--palette-background-b-4);flex-shrink:0;padding:4px 12px 8px}.CommentCard_header__T1SH8{align-items:center;display:flex;flex-shrink:0;gap:8px}.CommentCard_headerText__DRsQG{display:flex;flex:1 0 0;flex-direction:column;min-width:0;word-break:break-word}.CommentCard_nameRow__Or1c0{align-items:center;display:flex;gap:8px;width:100%}.CommentCard_nameRow__Or1c0 .CommentCard_timestamp__EbJCO{margin-left:auto}.CommentCard_subtitle__d-XRe{color:var(--palette-primary-main);font-size:12px;line-height:16px}.CommentCard_avatar__NA2ZA{flex-shrink:0}.CommentCard_name__9-e7A{color:var(--palette-primary-text-1);flex:0 1 auto;font-size:14px;line-height:20px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.CommentCard_timestamp__EbJCO{color:var(--palette-primary-text-7)}.CommentCard_chip__4NUrf,.CommentCard_timestamp__EbJCO{flex-shrink:0;font-size:12px;line-height:16px;white-space:nowrap}.CommentCard_chip__4NUrf{align-items:center;background:rgb(from var(--palette-primary-text-1) r g b/.04);border-radius:8px;color:var(--palette-primary-text-6);display:flex;height:24px;padding:6px 8px}.CommentCard_chipAccented__Xl8ek{border-left:2px solid transparent}.CommentCard_bodyRow__ZUufY{align-items:center;display:flex;gap:8px}.CommentCard_text__eAIZM{color:var(--palette-primary-text-1);flex:1 1 auto;font-size:12px;line-height:16px;min-width:0;white-space:pre-wrap;word-break:break-word}.CommentCard_text__eAIZM a,.CommentCard_text__eAIZM button{font:inherit;padding:0;vertical-align:baseline}.CommentCard_attachment__KktIn{--attachment-arrow-outset:12px;display:flex;flex-direction:column;gap:8px}.CommentCard_infoButton__gqcvK{align-items:center;color:var(--palette-primary-text-6);cursor:default;display:inline-flex}.CommentCard_infoButton__gqcvK:hover{color:var(--palette-primary-text-1)}.CommentCard_metadataTooltip__AL0xt .MuiTooltip-tooltip{max-width:none!important}.CommentCard_metadataRows__c-kqf{display:flex;flex-direction:column;gap:4px;padding:4px 0}.CommentCard_metadataRow__BqcII{align-items:baseline;display:flex;font-size:14px;gap:4px;line-height:20px;white-space:nowrap}.CommentCard_metadataLabel__WRWl7{color:var(--palette-primary-text-6)}.CommentCard_metadataValue__Xwf7S{color:var(--palette-primary-text-1)}.CommentCard_metadataUnit__Bxeps{color:var(--palette-primary-text-6);font-size:12px}.CommentCard_contextLine__Jyoui{align-items:center;color:var(--palette-primary-text-7);column-gap:16px;display:flex;flex-wrap:wrap;font-size:12px;line-height:16px;row-gap:4px}.CommentCard_contextItem__2Xmql{white-space:nowrap}.CommentCard_actionsRow__1Ftxn{align-items:center;display:flex;justify-content:space-between;width:100%}.CommentCard_actions__mUmsV{align-items:center;display:flex;gap:8px}.CommentCard_trailingActions__uGt-3{align-items:center;display:flex;gap:4px}.CommentCard_action__ZfyBP{align-items:center;display:flex;gap:2px}.CommentCard_count__stfpY{color:var(--palette-primary-text-6);font-size:12px;line-height:16px}.CommentCard_liked__zsBqe svg{color:var(--palette-primary-main)}.CommentCard_replies__nRRYo{display:flex;flex-direction:column;gap:8px}.CommentCard_reply__7-U7Q{display:flex;flex-direction:column;gap:4px}.CommentCard_replyHeader__sWnLA{align-items:center;display:flex;gap:8px}.CommentCard_replyNameRow__bs7h2{align-items:center;display:flex;flex:1 0 0;gap:12px;min-width:0}.CommentCard_replyName__C8tst{color:var(--palette-primary-text-1);font-size:14px;line-height:20px;white-space:nowrap}.CommentCard_replyTimestamp__YzuW1{color:var(--palette-primary-text-7);flex:1 0 0;font-size:12px;line-height:16px;min-width:0}.CommentCard_replyText__8JPKK{color:var(--palette-primary-text-1);font-size:12px;line-height:16px;padding-left:40px;white-space:pre-wrap;word-break:break-word}.CommentCard_replyText__8JPKK a,.CommentCard_replyText__8JPKK button{font:inherit;padding:0;vertical-align:baseline}"),module.exports={spacing:"8",capped:"CommentCard_capped__izWBZ",bodySurface:"CommentCard_bodySurface__scobR",editHeader:"CommentCard_editHeader__8aUBt",scrollBody:"CommentCard_scrollBody__CIun9",footer:"CommentCard_footer__z3-CY",repliesSection:"CommentCard_repliesSection__iE7QO",compactBody:"CommentCard_compactBody__zM10O",compactTop:"CommentCard_compactTop__LpiQi",compactTime:"CommentCard_compactTime__JzVQR",compactFooter:"CommentCard_compactFooter__rgB4D",header:"CommentCard_header__T1SH8",headerText:"CommentCard_headerText__DRsQG",nameRow:"CommentCard_nameRow__Or1c0",timestamp:"CommentCard_timestamp__EbJCO",subtitle:"CommentCard_subtitle__d-XRe",avatar:"CommentCard_avatar__NA2ZA",name:"CommentCard_name__9-e7A",chip:"CommentCard_chip__4NUrf",chipAccented:"CommentCard_chipAccented__Xl8ek",bodyRow:"CommentCard_bodyRow__ZUufY",text:"CommentCard_text__eAIZM",attachment:"CommentCard_attachment__KktIn",infoButton:"CommentCard_infoButton__gqcvK",metadataTooltip:"CommentCard_metadataTooltip__AL0xt",metadataRows:"CommentCard_metadataRows__c-kqf",metadataRow:"CommentCard_metadataRow__BqcII",metadataLabel:"CommentCard_metadataLabel__WRWl7",metadataValue:"CommentCard_metadataValue__Xwf7S",metadataUnit:"CommentCard_metadataUnit__Bxeps",contextLine:"CommentCard_contextLine__Jyoui",contextItem:"CommentCard_contextItem__2Xmql",actionsRow:"CommentCard_actionsRow__1Ftxn",actions:"CommentCard_actions__mUmsV",trailingActions:"CommentCard_trailingActions__uGt-3",action:"CommentCard_action__ZfyBP",count:"CommentCard_count__stfpY",liked:"CommentCard_liked__zsBqe",replies:"CommentCard_replies__nRRYo",reply:"CommentCard_reply__7-U7Q",replyHeader:"CommentCard_replyHeader__sWnLA",replyNameRow:"CommentCard_replyNameRow__bs7h2",replyName:"CommentCard_replyName__C8tst",replyTimestamp:"CommentCard_replyTimestamp__YzuW1",replyText:"CommentCard_replyText__8JPKK"};
1
+ "use strict";require('./../../ext-esm/style-inject/dist/style-inject.es.js')(".CommentCard_capped__izWBZ{flex-direction:column}.CommentCard_bodySurface__scobR,.CommentCard_capped__izWBZ{overflow-clip-margin:12px;display:flex;overflow:hidden;overflow:clip}.CommentCard_bodySurface__scobR{flex:1 1 auto;flex-direction:column;gap:8px;min-height:0;padding:8px 12px}.CommentCard_editHeader__8aUBt{padding:8px 12px 0}.CommentCard_scrollBody__CIun9{display:flex;flex:1 1 auto;flex-direction:column;gap:8px;margin:0 -24px;min-height:0;overflow-x:hidden;overflow-y:auto;padding:0 24px}.CommentCard_footer__z3-CY{border-top:1px solid var(--palette-background-b-4);display:flex;flex-direction:column;flex-shrink:0;padding:4px 12px 8px}.CommentCard_repliesSection__iE7QO{padding:8px 12px 12px}.CommentCard_compactBody__zM10O{display:flex;flex:1 1 auto;flex-direction:column;gap:8px;min-height:0;overflow:hidden;padding:8px 12px}.CommentCard_compactTop__LpiQi{align-items:center;display:flex;flex-shrink:0;gap:8px}.CommentCard_compactTime__JzVQR{color:var(--palette-primary-text-7);font-size:12px;line-height:16px;margin-left:auto;white-space:nowrap}.CommentCard_compactFooter__rgB4D{border-top:1px solid var(--palette-background-b-4);flex-shrink:0;padding:4px 12px 8px}.CommentCard_header__T1SH8{align-items:center;display:flex;flex-shrink:0;gap:8px}.CommentCard_headerText__DRsQG{display:flex;flex:1 0 0;flex-direction:column;min-width:0;word-break:break-word}.CommentCard_nameRow__Or1c0{align-items:center;display:flex;gap:8px;width:100%}.CommentCard_nameRow__Or1c0 .CommentCard_timestamp__EbJCO{margin-left:auto}.CommentCard_subtitle__d-XRe{color:var(--palette-primary-main);font-size:12px;line-height:16px}.CommentCard_avatar__NA2ZA{flex-shrink:0}.CommentCard_name__9-e7A{color:var(--palette-primary-text-1);flex:0 1 auto;font-size:14px;line-height:20px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.CommentCard_timestamp__EbJCO{color:var(--palette-primary-text-7);flex-shrink:0;font-size:12px;line-height:16px;white-space:nowrap}.CommentCard_chip__4NUrf{align-items:center;background:rgb(from var(--palette-primary-text-1) r g b/.04);border-radius:8px;box-sizing:border-box;color:var(--palette-primary-text-1);cursor:pointer;display:flex;float:right;font-size:12px;gap:4px;height:24px;line-height:16px;margin:4px 0 0 8px;padding:6px;white-space:nowrap}.CommentCard_chipAccented__Xl8ek{background:linear-gradient(94deg,rgb(from var(--chip-color) r g b/.16) 1%,transparent 35%),rgb(from var(--palette-primary-text-1) r g b/.04);border:.5px solid rgb(from var(--chip-color) r g b/.5)}.CommentCard_chipDot__P-usA{background:var(--chip-color);border-radius:50%;flex-shrink:0;height:6px;width:6px}.CommentCard_text__eAIZM{color:var(--palette-primary-text-1);font-size:12px;line-height:16px;white-space:pre-wrap;word-break:break-word}.CommentCard_text__eAIZM a,.CommentCard_text__eAIZM button{font:inherit;padding:0;vertical-align:baseline}.CommentCard_attachment__KktIn{--attachment-arrow-outset:12px;display:flex;flex-direction:column;gap:8px}.CommentCard_infoButton__gqcvK{align-items:center;color:var(--palette-primary-text-6);cursor:default;display:inline-flex}.CommentCard_infoButton__gqcvK:hover{color:var(--palette-primary-text-1)}.CommentCard_metadataTooltip__AL0xt .MuiTooltip-tooltip{max-width:none!important}.CommentCard_metadataRows__c-kqf{display:flex;flex-direction:column;gap:4px;padding:4px 0}.CommentCard_metadataRow__BqcII{align-items:baseline;display:flex;font-size:14px;gap:4px;line-height:20px;white-space:nowrap}.CommentCard_metadataLabel__WRWl7{color:var(--palette-primary-text-6)}.CommentCard_metadataValue__Xwf7S{color:var(--palette-primary-text-1)}.CommentCard_metadataUnit__Bxeps{color:var(--palette-primary-text-6);font-size:12px}.CommentCard_contextLine__Jyoui{align-items:center;color:var(--palette-primary-text-7);column-gap:16px;display:flex;flex-wrap:wrap;font-size:12px;line-height:16px;row-gap:4px}.CommentCard_contextItem__2Xmql{white-space:nowrap}.CommentCard_actionsRow__1Ftxn{align-items:center;display:flex;justify-content:space-between;width:100%}.CommentCard_actions__mUmsV{align-items:center;display:flex;gap:8px}.CommentCard_trailingActions__uGt-3{align-items:center;display:flex;gap:4px}.CommentCard_action__ZfyBP{align-items:center;display:flex;gap:2px}.CommentCard_count__stfpY{color:var(--palette-primary-text-6);font-size:12px;line-height:16px}.CommentCard_liked__zsBqe svg{color:var(--palette-primary-main)}.CommentCard_replies__nRRYo{display:flex;flex-direction:column;gap:8px}.CommentCard_reply__7-U7Q{display:flex;flex-direction:column;gap:4px}.CommentCard_replyHeader__sWnLA{align-items:center;display:flex;gap:8px}.CommentCard_replyNameRow__bs7h2{align-items:center;display:flex;flex:1 0 0;gap:12px;min-width:0}.CommentCard_replyName__C8tst{color:var(--palette-primary-text-1);font-size:14px;line-height:20px;white-space:nowrap}.CommentCard_replyTimestamp__YzuW1{color:var(--palette-primary-text-7);flex:1 0 0;font-size:12px;line-height:16px;min-width:0}.CommentCard_replyText__8JPKK{color:var(--palette-primary-text-1);font-size:12px;line-height:16px;padding-left:40px;white-space:pre-wrap;word-break:break-word}.CommentCard_replyText__8JPKK a,.CommentCard_replyText__8JPKK button{font:inherit;padding:0;vertical-align:baseline}"),module.exports={spacing:"8",capped:"CommentCard_capped__izWBZ",bodySurface:"CommentCard_bodySurface__scobR",editHeader:"CommentCard_editHeader__8aUBt",scrollBody:"CommentCard_scrollBody__CIun9",footer:"CommentCard_footer__z3-CY",repliesSection:"CommentCard_repliesSection__iE7QO",compactBody:"CommentCard_compactBody__zM10O",compactTop:"CommentCard_compactTop__LpiQi",compactTime:"CommentCard_compactTime__JzVQR",compactFooter:"CommentCard_compactFooter__rgB4D",header:"CommentCard_header__T1SH8",headerText:"CommentCard_headerText__DRsQG",nameRow:"CommentCard_nameRow__Or1c0",timestamp:"CommentCard_timestamp__EbJCO",subtitle:"CommentCard_subtitle__d-XRe",avatar:"CommentCard_avatar__NA2ZA",name:"CommentCard_name__9-e7A",chip:"CommentCard_chip__4NUrf",chipAccented:"CommentCard_chipAccented__Xl8ek",chipDot:"CommentCard_chipDot__P-usA",text:"CommentCard_text__eAIZM",attachment:"CommentCard_attachment__KktIn",infoButton:"CommentCard_infoButton__gqcvK",metadataTooltip:"CommentCard_metadataTooltip__AL0xt",metadataRows:"CommentCard_metadataRows__c-kqf",metadataRow:"CommentCard_metadataRow__BqcII",metadataLabel:"CommentCard_metadataLabel__WRWl7",metadataValue:"CommentCard_metadataValue__Xwf7S",metadataUnit:"CommentCard_metadataUnit__Bxeps",contextLine:"CommentCard_contextLine__Jyoui",contextItem:"CommentCard_contextItem__2Xmql",actionsRow:"CommentCard_actionsRow__1Ftxn",actions:"CommentCard_actions__mUmsV",trailingActions:"CommentCard_trailingActions__uGt-3",action:"CommentCard_action__ZfyBP",count:"CommentCard_count__stfpY",liked:"CommentCard_liked__zsBqe",replies:"CommentCard_replies__nRRYo",reply:"CommentCard_reply__7-U7Q",replyHeader:"CommentCard_replyHeader__sWnLA",replyNameRow:"CommentCard_replyNameRow__bs7h2",replyName:"CommentCard_replyName__C8tst",replyTimestamp:"CommentCard_replyTimestamp__YzuW1",replyText:"CommentCard_replyText__8JPKK"};
2
2
  //# sourceMappingURL=CommentCard.scss.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),s=require("react"),o=require("@material-ui/core"),n=require("@material-ui/icons/AlternateEmail"),i=require("../../componentsV2/ButtonIcon/ButtonIcon.js"),c=require("../../componentsV2/Tooltip/Tooltip.js"),r=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 t=require("../Avatar/index.js"),u=require("../AttachFileButton/AttachFileButton.js"),a=require("../CommentInputNext/CommentInputNext.js"),l=require("../EmojiIconButton.js"),m=require("../FailedFileUploading.js"),j=require("../UserMention/index.js"),d=require("../UserMention/utils/index.js"),p=require("./useAttachmentUpload.js"),q=require("./CommentMetaLine.js"),I=require("./ShareToChatRow.js"),h=require("./CommentComposer.scss.js"),b=require("react/jsx-runtime");function g(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=g(e),C=g(n);function v(e,s){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);s&&(n=n.filter((function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable}))),o.push.apply(o,n)}return o}function y(e){for(var s=1;s<arguments.length;s++){var o=null!=arguments[s]?arguments[s]:{};s%2?v(Object(o),!0).forEach((function(s){f.default(e,s,o[s])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):v(Object(o)).forEach((function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(o,s))}))}return e}var F={fontSize:14,lineHeight:"20px",suggestions:{backgroundColor:"var(--palette-background-b-9)",list:{backgroundColor:"var(--palette-background-b-9)"},item:{color:"var(--palette-primary-text-1)","&focused":{backgroundColor:"rgb(from var(--palette-primary-text-1) r g b / 0.08)"}}}},x=function(e){return b.jsxs("div",{className:h.suggestion,children:[b.jsx(t.AvatarComponent,{size:26,alt:e.display,imgSrc:e.photo,displayName:e.display}),b.jsx("span",{children:e.display})]})};exports.CommentComposer=function(e){var n=e.body,t=e.onBodyChange,g=e.onSubmit,f=e.canSubmit,v=e.currentUser,O=e.attachments,A=e.onAttachmentsChange,S=e.maxAttachments,P=void 0===S?p.DEFAULT_MAX_ATTACHMENTS:S,k=e.attachment,E=e.onAttachmentChange,M=e.attachmentError,D=e.onAttachmentError,R=e.maxAttachmentSizeBytes,w=e.disabled,U=e.autoFocus,T=e.placeholder,B=void 0===T?"Add a comment...":T,L=e.metaRows,N=e.isMetaSingleLine,z=e.shareToChat,G=e.trailing,_=e.embedded,H=e.className,K=e.testId,W=!!A,V=s.useMemo((function(){return W?null!=O?O:[]:[k].filter(Boolean)}),[W,O,k]),Q=s.useCallback((function(e){var s;A?A(e):null==E||E(null!==(s=e[0])&&void 0!==s?s:null)}),[A,E]),X=p.useAttachmentUpload({value:V,onChange:Q,onError:D,maxSizeBytes:R,maxFiles:W?P:1}),Z=f&&!X.isUploading,$=s.useRef(null);return b.jsx(a.CommentInput,{value:n,canSubmit:Z,disabled:w,onSubmit:g,trailing:G,embedded:_,className:H,testId:K,field:b.jsx(o.Input,{inputComponent:j,inputProps:{onChange:t,currentUser:v,allowEmptyQuery:!0,suggestionsPortalHost:document.querySelector("body"),withLightTheme:!1,mentionProps:{renderSuggestion:x},highlightLinks:!0,style:F},value:n,placeholder:B,inputRef:$,className:h.mentionField,onKeyDown:function(e){"Enter"!==e.key||e.shiftKey||Z&&!w&&(d.isSuggestionsListOpened()||(e.preventDefault(),g()))},disableUnderline:!0,rows:1,fullWidth:!0,multiline:!0,autoFocus:U}),attachments:X.items,onAttachmentRemove:X.removeAttachment,onAttachmentRetry:X.handleRetry,onAttachmentReorder:W?X.reorderAttachments:void 0,onFilesDrop:X.addFiles,onImageLinkPaste:X.addLinkedImage,dropLabel:1===X.maxFiles?"Drop a file here":"Drop files here",attachmentSlot:M?b.jsx(m,{errorMessage:M}):void 0,toolbar:b.jsxs(b.Fragment,{children:[b.jsx(u.AttachFileButton,{inputRef:X.fileInputRef,onClick:X.openFileDialog,onFileSelect:X.handleFileSelect,multiple:W,disabled:X.isFull,tooltip:X.isFull?"Up to ".concat(X.maxFiles," ").concat(1===X.maxFiles?"file":"files"," can be attached"):"Attach file"}),b.jsx(c.Tooltip,{title:"Mention someone",children:b.jsx(i.ButtonIcon,{size:"xs",type:"tertiary",onClick:function(){var e,s=$.current;if(s){s.focus();var o=!!s.value&&!/\s$/.test(s.value),n="".concat(s.value).concat(o?" @":"@"),i=null===(e=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(s),"value"))||void 0===e?void 0:e.set;null==i||i.call(s,n),s.setSelectionRange(n.length,n.length),s.dispatchEvent(new Event("input",{bubbles:!0})),s.dispatchEvent(new Event("keyup",{bubbles:!0}))}},children:b.jsx(C.default,{fontSize:"inherit"})})}),b.jsx("span",{className:h.iconSlot,children:b.jsx(l,{icon:b.jsx(r.SmilingFaceIcon,{size:16}),handleSelectEmoji:function(e){return t("".concat(n).concat(e.native))}})})]}),footer:(!(null==L||!L.length)||!!z)&&b.jsxs(b.Fragment,{children:[b.jsx(q.CommentMetaLine,{rows:null!=L?L:[],singleLine:N}),z&&b.jsx(I.ShareToChatRow,y({},z))]})})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),s=require("@babel/runtime/helpers/slicedToArray"),o=require("react"),n=require("@material-ui/core"),i=require("@material-ui/icons/AlternateEmail"),r=require("../../componentsV2/ButtonIcon/ButtonIcon.js"),c=require("../../componentsV2/Tooltip/Tooltip.js"),t=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 u=require("../Avatar/index.js"),a=require("../AttachFileButton/AttachFileButton.js"),l=require("../CommentInputNext/CommentInputNext.js"),m=require("../EmojiIconButton.js"),d=require("../FailedFileUploading.js"),j=require("../UserMention/index.js"),p=require("../UserMention/utils/index.js"),q=require("../WellhubFilePicker/WellhubFilePicker.js");require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("uuid"),require("lodash"),require("lodash/set"),require("lodash/get"),require("lodash/unset"),require("moment"),require("../../clients/jsonApi/index.js"),require("../../clients/subscriptions/constants.js"),require("../../clients/subscriptions.v1.js"),require("../../clients/subscriptions/subscriptions-client.factory.js"),require("../../clients/api/apiCore.js"),require("../../clients/constants.js"),require("../../clients/sso/auth0.js"),require("../../clients/sso/oauth2.js"),require("../../clients/api/rateLimiter.js");var h=require("./useAttachmentUpload.js"),I=require("./CommentMetaLine.js"),b=require("./ShareToChatRow.js"),g=require("./CommentComposer.scss.js"),f=require("react/jsx-runtime");function C(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var v=C(e),F=C(s),x=C(i);function y(e,s){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);s&&(n=n.filter((function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable}))),o.push.apply(o,n)}return o}function O(e){for(var s=1;s<arguments.length;s++){var o=null!=arguments[s]?arguments[s]:{};s%2?y(Object(o),!0).forEach((function(s){v.default(e,s,o[s])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):y(Object(o)).forEach((function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(o,s))}))}return e}var A={fontSize:14,lineHeight:"20px",suggestions:{backgroundColor:"var(--palette-background-b-9)",list:{backgroundColor:"var(--palette-background-b-9)"},item:{color:"var(--palette-primary-text-1)","&focused":{backgroundColor:"rgb(from var(--palette-primary-text-1) r g b / 0.08)"}}}},S=function(e){return f.jsxs("div",{className:g.suggestion,children:[f.jsx(u.AvatarComponent,{size:26,alt:e.display,imgSrc:e.photo,displayName:e.display}),f.jsx("span",{children:e.display})]})};exports.CommentComposer=function(e){var s=e.body,i=e.onBodyChange,u=e.onSubmit,C=e.canSubmit,v=e.currentUser,y=e.attachments,P=e.onAttachmentsChange,k=e.maxAttachments,E=void 0===k?h.DEFAULT_MAX_ATTACHMENTS:k,M=e.attachment,w=e.onAttachmentChange,D=e.attachmentError,R=e.onAttachmentError,T=e.maxAttachmentSizeBytes,U=e.wellhubContext,L=e.disabled,B=e.autoFocus,N=e.placeholder,z=void 0===N?"Add a comment...":N,W=e.metaRows,G=e.isMetaSingleLine,_=e.shareToChat,H=e.trailing,K=e.embedded,V=e.className,Q=e.testId,X=!!P,Z=o.useMemo((function(){return X?null!=y?y:[]:[M].filter(Boolean)}),[X,y,M]),$=o.useCallback((function(e){var s;P?P(e):null==w||w(null!==(s=e[0])&&void 0!==s?s:null)}),[P,w]),J=h.useAttachmentUpload({value:Z,onChange:$,onError:R,maxSizeBytes:T,maxFiles:X?E:1}),Y=C&&!J.isUploading,ee=o.useState(!1),se=F.default(ee,2),oe=se[0],ne=se[1],ie=o.useMemo((function(){return Z.map((function(e){return e.name}))}),[Z]),re=o.useRef(null);return f.jsxs(f.Fragment,{children:[f.jsx(l.CommentInput,{value:s,canSubmit:Y,disabled:L,onSubmit:u,trailing:H,embedded:K,className:V,testId:Q,field:f.jsx(n.Input,{inputComponent:j,inputProps:{onChange:i,currentUser:v,allowEmptyQuery:!0,suggestionsPortalHost:document.querySelector("body"),withLightTheme:!1,mentionProps:{renderSuggestion:S},highlightLinks:!0,style:A},value:s,placeholder:z,inputRef:re,className:g.mentionField,onKeyDown:function(e){"Enter"!==e.key||e.shiftKey||Y&&!L&&(p.isSuggestionsListOpened()||(e.preventDefault(),u()))},disableUnderline:!0,rows:1,fullWidth:!0,multiline:!0,autoFocus:B}),attachments:J.items,onAttachmentRemove:J.removeAttachment,onAttachmentRetry:J.handleRetry,onAttachmentReorder:X?J.reorderAttachments:void 0,onFilesDrop:J.addFiles,onImageLinkPaste:J.addLinkedImage,dropLabel:1===J.maxFiles?"Drop a file here":"Drop files here",attachmentSlot:D?f.jsx(d,{errorMessage:D}):void 0,toolbar:f.jsxs(f.Fragment,{children:[f.jsx(a.AttachFileButton,{inputRef:J.fileInputRef,onClick:J.openFileDialog,onFileSelect:J.handleFileSelect,onWellhubSelect:U?function(){return ne(!0)}:void 0,multiple:X,disabled:J.isFull,tooltip:J.isFull?"Up to ".concat(J.maxFiles," ").concat(1===J.maxFiles?"file":"files"," can be attached"):"Attach ".concat(X?"files":"file")}),f.jsx(c.Tooltip,{title:"Mention someone",children:f.jsx(r.ButtonIcon,{size:"xs",type:"tertiary",onClick:function(){var e,s=re.current;if(s){s.focus();var o=!!s.value&&!/\s$/.test(s.value),n="".concat(s.value).concat(o?" @":"@"),i=null===(e=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(s),"value"))||void 0===e?void 0:e.set;null==i||i.call(s,n),s.setSelectionRange(n.length,n.length),s.dispatchEvent(new Event("input",{bubbles:!0})),s.dispatchEvent(new Event("keyup",{bubbles:!0}))}},children:f.jsx(x.default,{fontSize:"inherit"})})}),f.jsx("span",{className:g.iconSlot,children:f.jsx(m,{icon:f.jsx(t.SmilingFaceIcon,{size:16}),handleSelectEmoji:function(e){return i("".concat(s).concat(e.native))}})})]}),footer:(!(null==W||!W.length)||!!_)&&f.jsxs(f.Fragment,{children:[f.jsx(I.CommentMetaLine,{rows:null!=W?W:[],singleLine:G}),_&&f.jsx(b.ShareToChatRow,O({},_))]})}),U&&f.jsx(q.WellhubFilePicker,O(O({},U),{},{open:oe,maxSelectable:J.maxFiles-J.count,attachedFileNames:ie,onAdd:function(e){ne(!1),J.addStoredFiles(e.map((function(e){return{fileName:e.fileName}})))},onClose:function(){return ne(!1)}}))]})};
2
2
  //# sourceMappingURL=CommentComposer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CommentComposer.js","sources":["../../../../src/components/CommentComposer/CommentComposer.tsx"],"sourcesContent":["import {\n CSSProperties,\n FormEventHandler,\n KeyboardEvent,\n ReactNode,\n useCallback,\n useMemo,\n useRef,\n} from 'react';\nimport { Input } from '@material-ui/core';\nimport AlternateEmailIcon from '@material-ui/icons/AlternateEmail';\n\nimport { ButtonIcon } from '../../componentsV2/ButtonIcon';\nimport { Tooltip } from '../../componentsV2/Tooltip';\nimport { SmilingFaceIcon } from '../../icons';\nimport Avatar from '../Avatar';\nimport { AttachFileButton } from '../AttachFileButton';\nimport { CommentInput } from '../CommentInputNext/CommentInputNext';\nimport EmojiIconButton from '../EmojiIconButton';\nimport FailedFileUploading from '../FailedFileUploading';\nimport UserMention from '../UserMention';\nimport { isSuggestionsListOpened } from '../UserMention/utils';\n\nimport {\n useAttachmentUpload,\n UploadedAttachment,\n DEFAULT_MAX_ATTACHMENTS,\n} from './useAttachmentUpload';\nimport { CommentMetaLine, CommentMetaRow } from './CommentMetaLine';\nimport { ShareToChatRow, ShareToChatRowProps } from './ShareToChatRow';\n\nimport styles from './CommentComposer.scss';\n\n/* eslint-disable camelcase -- mirrors the platform's snake_case user payload. */\nexport type CommentComposerUser = {\n id?: number;\n company_id?: number;\n first_name?: string;\n last_name?: string;\n profile_photo?: string;\n [key: string]: unknown;\n};\n/* eslint-enable camelcase */\n\nexport type CommentComposerProps = {\n body: string;\n onBodyChange: (value: string) => void;\n onSubmit: () => void;\n canSubmit: boolean;\n currentUser: CommentComposerUser;\n\n attachments?: UploadedAttachment[];\n onAttachmentsChange?: (attachments: UploadedAttachment[]) => void;\n maxAttachments?: number;\n /** @deprecated Use `attachments` — kept so single-attachment callers keep working. */\n attachment?: UploadedAttachment | null;\n /** @deprecated Use `onAttachmentsChange`. */\n onAttachmentChange?: (attachment: UploadedAttachment | null) => void;\n attachmentError?: string | null;\n onAttachmentError?: (message: string | null) => void;\n maxAttachmentSizeBytes?: number;\n\n disabled?: boolean;\n autoFocus?: boolean;\n placeholder?: string;\n metaRows?: CommentMetaRow[];\n isMetaSingleLine?: boolean;\n shareToChat?: Omit<ShareToChatRowProps, 'testId'>;\n /** Replaces the default send button, e.g. the edit form's Cancel/Save. */\n trailing?: ReactNode;\n /** Render flush inside a host card instead of as its own surface. */\n embedded?: boolean;\n className?: string;\n testId?: string;\n};\n\nconst SUGGESTIONS_BACKGROUND = 'var(--palette-background-b-9)';\n\n// Module-level so react-mentions isn't re-rendered on every keystroke.\nconst MENTION_INPUT_STYLE = {\n fontSize: 14,\n lineHeight: '20px',\n suggestions: {\n backgroundColor: SUGGESTIONS_BACKGROUND,\n list: { backgroundColor: SUGGESTIONS_BACKGROUND },\n item: {\n color: 'var(--palette-primary-text-1)',\n '&focused': { backgroundColor: 'rgb(from var(--palette-primary-text-1) r g b / 0.08)' },\n },\n },\n} as unknown as CSSProperties;\n\nconst renderSuggestion = (entry: { display: string; photo?: string }) => (\n <div className={styles.suggestion}>\n <Avatar size={26} alt={entry.display} imgSrc={entry.photo} displayName={entry.display} />\n <span>{entry.display}</span>\n </div>\n);\n\nexport const CommentComposer = ({\n body,\n onBodyChange,\n onSubmit,\n canSubmit,\n currentUser,\n attachments,\n onAttachmentsChange,\n maxAttachments = DEFAULT_MAX_ATTACHMENTS,\n attachment,\n onAttachmentChange,\n attachmentError,\n onAttachmentError,\n maxAttachmentSizeBytes,\n disabled,\n autoFocus,\n placeholder = 'Add a comment...',\n metaRows,\n isMetaSingleLine,\n shareToChat,\n trailing,\n embedded,\n className,\n testId,\n}: CommentComposerProps) => {\n // Callers still on the singular props get the old one-file behaviour, unchanged.\n const isMulti = !!onAttachmentsChange;\n const value = useMemo(\n () => (isMulti ? attachments ?? [] : ([attachment].filter(Boolean) as UploadedAttachment[])),\n [isMulti, attachments, attachment]\n );\n\n const handleAttachmentsChange = useCallback(\n (next: UploadedAttachment[]) => {\n if (onAttachmentsChange) onAttachmentsChange(next);\n else onAttachmentChange?.(next[0] ?? null);\n },\n [onAttachmentsChange, onAttachmentChange]\n );\n\n const upload = useAttachmentUpload({\n value,\n onChange: handleAttachmentsChange,\n onError: onAttachmentError,\n maxSizeBytes: maxAttachmentSizeBytes,\n maxFiles: isMulti ? maxAttachments : 1,\n });\n\n // An attachment only lands once S3 confirms, so posting mid-upload would drop it.\n const canSend = canSubmit && !upload.isUploading;\n\n const fieldRef = useRef<HTMLTextAreaElement | null>(null);\n\n // react-mentions opens suggestions from textarea events, so type \"@\" instead of setting state.\n const mentionSomeone = () => {\n const field = fieldRef.current;\n if (!field) return;\n\n field.focus();\n\n const needsSpace = !!field.value && !/\\s$/.test(field.value);\n const nextValue = `${field.value}${needsSpace ? ' @' : '@'}`;\n const setValue = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(field), 'value')?.set;\n\n setValue?.call(field, nextValue);\n field.setSelectionRange(nextValue.length, nextValue.length);\n field.dispatchEvent(new Event('input', { bubbles: true }));\n field.dispatchEvent(new Event('keyup', { bubbles: true }));\n };\n\n const handleEnterKey = (event: KeyboardEvent) => {\n if (event.key !== 'Enter' || event.shiftKey) return;\n if (!canSend || disabled) return;\n if (isSuggestionsListOpened()) return;\n\n event.preventDefault();\n onSubmit();\n };\n\n return (\n <CommentInput\n value={body}\n canSubmit={canSend}\n disabled={disabled}\n onSubmit={onSubmit}\n trailing={trailing}\n embedded={embedded}\n className={className}\n testId={testId}\n field={\n <Input\n inputComponent={UserMention}\n inputProps={{\n // UserMention calls onChange with the text string, not a DOM event.\n onChange: onBodyChange as unknown as FormEventHandler<HTMLInputElement>,\n currentUser,\n allowEmptyQuery: true,\n suggestionsPortalHost: document.querySelector('body'),\n withLightTheme: false,\n mentionProps: { renderSuggestion },\n highlightLinks: true,\n style: MENTION_INPUT_STYLE,\n }}\n value={body}\n placeholder={placeholder}\n inputRef={fieldRef}\n className={styles.mentionField}\n onKeyDown={handleEnterKey}\n disableUnderline\n rows={1}\n fullWidth\n multiline\n autoFocus={autoFocus}\n />\n }\n attachments={upload.items}\n onAttachmentRemove={upload.removeAttachment}\n onAttachmentRetry={upload.handleRetry}\n onAttachmentReorder={isMulti ? upload.reorderAttachments : undefined}\n onFilesDrop={upload.addFiles}\n onImageLinkPaste={upload.addLinkedImage}\n dropLabel={upload.maxFiles === 1 ? 'Drop a file here' : 'Drop files here'}\n attachmentSlot={\n attachmentError ? <FailedFileUploading errorMessage={attachmentError} /> : undefined\n }\n toolbar={\n <>\n <AttachFileButton\n inputRef={upload.fileInputRef}\n onClick={upload.openFileDialog}\n onFileSelect={upload.handleFileSelect}\n multiple={isMulti}\n disabled={upload.isFull}\n tooltip={\n upload.isFull\n ? `Up to ${upload.maxFiles} ${\n upload.maxFiles === 1 ? 'file' : 'files'\n } can be attached`\n : 'Attach file'\n }\n />\n <Tooltip title=\"Mention someone\">\n <ButtonIcon size=\"xs\" type=\"tertiary\" onClick={mentionSomeone}>\n <AlternateEmailIcon fontSize=\"inherit\" />\n </ButtonIcon>\n </Tooltip>\n <span className={styles.iconSlot}>\n <EmojiIconButton\n icon={<SmilingFaceIcon size={16} />}\n handleSelectEmoji={(emoji: { native: string }) =>\n onBodyChange(`${body}${emoji.native}`)\n }\n />\n </span>\n </>\n }\n footer={\n (!!metaRows?.length || !!shareToChat) && (\n <>\n <CommentMetaLine rows={metaRows ?? []} singleLine={isMetaSingleLine} />\n {shareToChat && <ShareToChatRow {...shareToChat} />}\n </>\n )\n }\n />\n );\n};\n"],"names":["MENTION_INPUT_STYLE","fontSize","lineHeight","suggestions","backgroundColor","list","item","color","renderSuggestion","entry","_jsxs","className","styles","suggestion","children","_jsx","Avatar","size","alt","display","imgSrc","photo","displayName","jsx","_ref","body","onBodyChange","onSubmit","canSubmit","currentUser","attachments","onAttachmentsChange","_ref$maxAttachments","maxAttachments","DEFAULT_MAX_ATTACHMENTS","attachment","onAttachmentChange","attachmentError","onAttachmentError","maxAttachmentSizeBytes","disabled","autoFocus","_ref$placeholder","placeholder","metaRows","isMetaSingleLine","shareToChat","trailing","embedded","testId","isMulti","value","useMemo","filter","Boolean","handleAttachmentsChange","useCallback","next","_next$","upload","useAttachmentUpload","onChange","onError","maxSizeBytes","maxFiles","canSend","isUploading","fieldRef","useRef","CommentInput","field","Input","inputComponent","UserMention","inputProps","allowEmptyQuery","suggestionsPortalHost","document","querySelector","withLightTheme","mentionProps","highlightLinks","style","inputRef","mentionField","onKeyDown","event","key","shiftKey","isSuggestionsListOpened","preventDefault","disableUnderline","rows","fullWidth","multiline","items","onAttachmentRemove","removeAttachment","onAttachmentRetry","handleRetry","onAttachmentReorder","reorderAttachments","undefined","onFilesDrop","addFiles","onImageLinkPaste","addLinkedImage","dropLabel","attachmentSlot","FailedFileUploading","errorMessage","toolbar","jsxs","_Fragment","AttachFileButton","fileInputRef","onClick","openFileDialog","onFileSelect","handleFileSelect","multiple","isFull","tooltip","concat","Tooltip","title","ButtonIcon","type","_Object$getOwnPropert","current","focus","needsSpace","test","nextValue","setValue","Object","getOwnPropertyDescriptor","getPrototypeOf","set","call","setSelectionRange","length","dispatchEvent","Event","bubbles","AlternateEmailIcon","iconSlot","EmojiIconButton","icon","SmilingFaceIcon","handleSelectEmoji","emoji","native","footer","CommentMetaLine","singleLine","ShareToChatRow","_objectSpread"],"mappings":"6+KA4EA,IAGMA,EAAsB,CAC1BC,SAAU,GACVC,WAAY,OACZC,YAAa,CACXC,gBAP2B,gCAQ3BC,KAAM,CAAED,gBARmB,iCAS3BE,KAAM,CACJC,MAAO,gCACP,WAAY,CAAEH,gBAAiB,2DAK/BI,EAAmB,SAACC,GAA0C,OAClEC,EAAAA,KAAA,MAAA,CAAKC,UAAWC,EAAOC,WAAWC,SAAA,CAChCC,MAACC,kBAAM,CAACC,KAAM,GAAIC,IAAKT,EAAMU,QAASC,OAAQX,EA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AMnB,OAAQgF,OAAAA,EAAa,KAAO,KACjDG,EAAiF,QAAtEC,EAAAA,OAAOC,yBAAyBD,OAAOE,eAAenE,GAAQ,gBAAQ,IAAA0D,OAAA,EAAtEA,EAAwEU,IAEzFJ,SAAAA,EAAUK,KAAKrE,EAAO+D,GACtB/D,EAAMsE,kBAAkBP,EAAUQ,OAAQR,EAAUQ,QACpDvE,EAAMwE,cAAc,IAAIC,MAAM,QAAS,CAAEC,SAAS,KAClD1E,EAAMwE,cAAc,IAAIC,MAAM,QAAS,CAAEC,SAAS,IAXtC,GAsF0DlI,SAC5DC,MAACkI,UAAkB,CAAChJ,SAAS,gBAGjCc,EAAAQ,IAAA,OAAA,CAAMZ,UAAWC,EAAOsI,SAASpI,SAC/BC,MAACoI,EAAe,CACdC,KAAMrI,MAACsI,kBAAe,CAACpI,KAAM,KAC7BqI,kBAAmB,SAACC,GAAyB,OAC3C7H,EAAgBD,GAAAA,OAAAA,UAAO8H,EAAMC,QAAS,SAMhDC,UACK7G,UAAAA,EAAUiG,WAAY/F,IACvBpC,EAAAA,KAAAuG,EAAAA,SAAA,CAAAnG,SAAA,CACEC,MAAC2I,kBAAe,CAAC9D,KAAMhD,QAAAA,EAAY,GAAI+G,WAAY9G,IAClDC,GAAe/B,MAAC6I,EAAAA,eAAcC,EAAA,CAAA,EAAK/G,QAMhD"}
1
+ {"version":3,"file":"CommentComposer.js","sources":["../../../../src/components/CommentComposer/CommentComposer.tsx"],"sourcesContent":["import {\n CSSProperties,\n FormEventHandler,\n KeyboardEvent,\n ReactNode,\n useCallback,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { Input } from '@material-ui/core';\nimport AlternateEmailIcon from '@material-ui/icons/AlternateEmail';\n\nimport { ButtonIcon } from '../../componentsV2/ButtonIcon';\nimport { Tooltip } from '../../componentsV2/Tooltip';\nimport { SmilingFaceIcon } from '../../icons';\nimport Avatar from '../Avatar';\nimport { AttachFileButton } from '../AttachFileButton';\nimport { CommentInput } from '../CommentInputNext/CommentInputNext';\nimport EmojiIconButton from '../EmojiIconButton';\nimport FailedFileUploading from '../FailedFileUploading';\nimport UserMention from '../UserMention';\nimport { isSuggestionsListOpened } from '../UserMention/utils';\nimport { WellhubFilePicker } from '../WellhubFilePicker';\nimport type { WellhubContext, WellhubFile } from '../WellhubFilePicker';\n\nimport {\n useAttachmentUpload,\n UploadedAttachment,\n DEFAULT_MAX_ATTACHMENTS,\n} from './useAttachmentUpload';\nimport { CommentMetaLine, CommentMetaRow } from './CommentMetaLine';\nimport { ShareToChatRow, ShareToChatRowProps } from './ShareToChatRow';\n\nimport styles from './CommentComposer.scss';\n\n/* eslint-disable camelcase -- mirrors the platform's snake_case user payload. */\nexport type CommentComposerUser = {\n id?: number;\n company_id?: number;\n first_name?: string;\n last_name?: string;\n profile_photo?: string;\n [key: string]: unknown;\n};\n/* eslint-enable camelcase */\n\nexport type CommentComposerProps = {\n body: string;\n onBodyChange: (value: string) => void;\n onSubmit: () => void;\n canSubmit: boolean;\n currentUser: CommentComposerUser;\n\n attachments?: UploadedAttachment[];\n onAttachmentsChange?: (attachments: UploadedAttachment[]) => void;\n maxAttachments?: number;\n /** @deprecated Use `attachments` — kept so single-attachment callers keep working. */\n attachment?: UploadedAttachment | null;\n /** @deprecated Use `onAttachmentsChange`. */\n onAttachmentChange?: (attachment: UploadedAttachment | null) => void;\n attachmentError?: string | null;\n onAttachmentError?: (message: string | null) => void;\n maxAttachmentSizeBytes?: number;\n wellhubContext?: WellhubContext;\n\n disabled?: boolean;\n autoFocus?: boolean;\n placeholder?: string;\n metaRows?: CommentMetaRow[];\n isMetaSingleLine?: boolean;\n shareToChat?: Omit<ShareToChatRowProps, 'testId'>;\n /** Replaces the default send button, e.g. the edit form's Cancel/Save. */\n trailing?: ReactNode;\n /** Render flush inside a host card instead of as its own surface. */\n embedded?: boolean;\n className?: string;\n testId?: string;\n};\n\nconst SUGGESTIONS_BACKGROUND = 'var(--palette-background-b-9)';\n\n// Module-level so react-mentions isn't re-rendered on every keystroke.\nconst MENTION_INPUT_STYLE = {\n fontSize: 14,\n lineHeight: '20px',\n suggestions: {\n backgroundColor: SUGGESTIONS_BACKGROUND,\n list: { backgroundColor: SUGGESTIONS_BACKGROUND },\n item: {\n color: 'var(--palette-primary-text-1)',\n '&focused': { backgroundColor: 'rgb(from var(--palette-primary-text-1) r g b / 0.08)' },\n },\n },\n} as unknown as CSSProperties;\n\nconst renderSuggestion = (entry: { display: string; photo?: string }) => (\n <div className={styles.suggestion}>\n <Avatar size={26} alt={entry.display} imgSrc={entry.photo} displayName={entry.display} />\n <span>{entry.display}</span>\n </div>\n);\n\nexport const CommentComposer = ({\n body,\n onBodyChange,\n onSubmit,\n canSubmit,\n currentUser,\n attachments,\n onAttachmentsChange,\n maxAttachments = DEFAULT_MAX_ATTACHMENTS,\n attachment,\n onAttachmentChange,\n attachmentError,\n onAttachmentError,\n maxAttachmentSizeBytes,\n wellhubContext,\n disabled,\n autoFocus,\n placeholder = 'Add a comment...',\n metaRows,\n isMetaSingleLine,\n shareToChat,\n trailing,\n embedded,\n className,\n testId,\n}: CommentComposerProps) => {\n // Callers still on the singular props get the old one-file behaviour, unchanged.\n const isMulti = !!onAttachmentsChange;\n const value = useMemo(\n () => (isMulti ? attachments ?? [] : ([attachment].filter(Boolean) as UploadedAttachment[])),\n [isMulti, attachments, attachment]\n );\n\n const handleAttachmentsChange = useCallback(\n (next: UploadedAttachment[]) => {\n if (onAttachmentsChange) onAttachmentsChange(next);\n else onAttachmentChange?.(next[0] ?? null);\n },\n [onAttachmentsChange, onAttachmentChange]\n );\n\n const upload = useAttachmentUpload({\n value,\n onChange: handleAttachmentsChange,\n onError: onAttachmentError,\n maxSizeBytes: maxAttachmentSizeBytes,\n maxFiles: isMulti ? maxAttachments : 1,\n });\n\n // An attachment only lands once S3 confirms, so posting mid-upload would drop it.\n const canSend = canSubmit && !upload.isUploading;\n\n const [isWellhubOpen, setIsWellhubOpen] = useState(false);\n const attachedKeys = useMemo(() => value.map(item => item.name), [value]);\n\n const addWellhubFiles = (files: WellhubFile[]) => {\n setIsWellhubOpen(false);\n upload.addStoredFiles(files.map(file => ({ fileName: file.fileName })));\n };\n\n const fieldRef = useRef<HTMLTextAreaElement | null>(null);\n\n // react-mentions opens suggestions from textarea events, so type \"@\" instead of setting state.\n const mentionSomeone = () => {\n const field = fieldRef.current;\n if (!field) return;\n\n field.focus();\n\n const needsSpace = !!field.value && !/\\s$/.test(field.value);\n const nextValue = `${field.value}${needsSpace ? ' @' : '@'}`;\n const setValue = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(field), 'value')?.set;\n\n setValue?.call(field, nextValue);\n field.setSelectionRange(nextValue.length, nextValue.length);\n field.dispatchEvent(new Event('input', { bubbles: true }));\n field.dispatchEvent(new Event('keyup', { bubbles: true }));\n };\n\n const handleEnterKey = (event: KeyboardEvent) => {\n if (event.key !== 'Enter' || event.shiftKey) return;\n if (!canSend || disabled) return;\n if (isSuggestionsListOpened()) return;\n\n event.preventDefault();\n onSubmit();\n };\n\n return (\n <>\n <CommentInput\n value={body}\n canSubmit={canSend}\n disabled={disabled}\n onSubmit={onSubmit}\n trailing={trailing}\n embedded={embedded}\n className={className}\n testId={testId}\n field={\n <Input\n inputComponent={UserMention}\n inputProps={{\n // UserMention calls onChange with the text string, not a DOM event.\n onChange: onBodyChange as unknown as FormEventHandler<HTMLInputElement>,\n currentUser,\n allowEmptyQuery: true,\n suggestionsPortalHost: document.querySelector('body'),\n withLightTheme: false,\n mentionProps: { renderSuggestion },\n highlightLinks: true,\n style: MENTION_INPUT_STYLE,\n }}\n value={body}\n placeholder={placeholder}\n inputRef={fieldRef}\n className={styles.mentionField}\n onKeyDown={handleEnterKey}\n disableUnderline\n rows={1}\n fullWidth\n multiline\n autoFocus={autoFocus}\n />\n }\n attachments={upload.items}\n onAttachmentRemove={upload.removeAttachment}\n onAttachmentRetry={upload.handleRetry}\n onAttachmentReorder={isMulti ? upload.reorderAttachments : undefined}\n onFilesDrop={upload.addFiles}\n onImageLinkPaste={upload.addLinkedImage}\n dropLabel={upload.maxFiles === 1 ? 'Drop a file here' : 'Drop files here'}\n attachmentSlot={\n attachmentError ? <FailedFileUploading errorMessage={attachmentError} /> : undefined\n }\n toolbar={\n <>\n <AttachFileButton\n inputRef={upload.fileInputRef}\n onClick={upload.openFileDialog}\n onFileSelect={upload.handleFileSelect}\n onWellhubSelect={wellhubContext ? () => setIsWellhubOpen(true) : undefined}\n multiple={isMulti}\n disabled={upload.isFull}\n tooltip={\n upload.isFull\n ? `Up to ${upload.maxFiles} ${\n upload.maxFiles === 1 ? 'file' : 'files'\n } can be attached`\n : `Attach ${isMulti ? 'files' : 'file'}`\n }\n />\n <Tooltip title=\"Mention someone\">\n <ButtonIcon size=\"xs\" type=\"tertiary\" onClick={mentionSomeone}>\n <AlternateEmailIcon fontSize=\"inherit\" />\n </ButtonIcon>\n </Tooltip>\n <span className={styles.iconSlot}>\n <EmojiIconButton\n icon={<SmilingFaceIcon size={16} />}\n handleSelectEmoji={(emoji: { native: string }) =>\n onBodyChange(`${body}${emoji.native}`)\n }\n />\n </span>\n </>\n }\n footer={\n (!!metaRows?.length || !!shareToChat) && (\n <>\n <CommentMetaLine rows={metaRows ?? []} singleLine={isMetaSingleLine} />\n {shareToChat && <ShareToChatRow {...shareToChat} />}\n </>\n )\n }\n />\n\n {wellhubContext && (\n <WellhubFilePicker\n {...wellhubContext}\n open={isWellhubOpen}\n maxSelectable={upload.maxFiles - upload.count}\n attachedFileNames={attachedKeys}\n onAdd={addWellhubFiles}\n onClose={() => setIsWellhubOpen(false)}\n />\n )}\n </>\n );\n};\n"],"names":["MENTION_INPUT_STYLE","fontSize","lineHeight","suggestions","backgroundColor","list","item","color","renderSuggestion","entry","_jsxs","className","styles","suggestion","children","_jsx","Avatar","size","alt","display","imgSrc","photo","displayName","jsx","_ref","body","onBodyChange","onSubmit","canSubmit","currentUser","attachments","onAttachmentsChange","_ref$maxAttachments","maxAttachments","DEFAULT_MAX_ATTACHMENTS","attachment","onAttachmentChange","attachmentError","onAttachmentError","maxAttachmentSizeBytes","wellhubContext","disabled","autoFocus","_ref$placeholder","placeholder","metaRows","isMetaSingleLine","shareToChat","trailing","embedded","testId","isMulti","value","useMemo","filter","Boolean","handleAttachmentsChange","useCallback","next","_next$","upload","useAttachmentUpload","onChange","onError","maxSizeBytes","maxFiles","canSend","isUploading","useState","_useState2","_slicedToArray","_useState","isWellhubOpen","setIsWellhubOpen","attachedKeys","map","name","fieldRef","useRef","_Fragment","CommentInput","field","Input","inputComponent","UserMention","inputProps","allowEmptyQuery","suggestionsPortalHost","document","querySelector","withLightTheme","mentionProps","highlightLinks","style","inputRef","mentionField","onKeyDown","event","key","shiftKey","isSuggestionsListOpened","preventDefault","disableUnderline","rows","fullWidth","multiline","items","onAttachmentRemove","removeAttachment","onAttachmentRetry","handleRetry","onAttachmentReorder","reorderAttachments","undefined","onFilesDrop","addFiles","onImageLinkPaste","addLinkedImage","dropLabel","attachmentSlot","FailedFileUploading","errorMessage","toolbar","jsxs","AttachFileButton","fileInputRef","onClick","openFileDialog","onFileSelect","handleFileSelect","onWellhubSelect","multiple","isFull","tooltip","concat","Tooltip","title","ButtonIcon","type","_Object$getOwnPropert","current","focus","needsSpace","test","nextValue","setValue","Object","getOwnPropertyDescriptor","getPrototypeOf","set","call","setSelectionRange","length","dispatchEvent","Event","bubbles","AlternateEmailIcon","iconSlot","EmojiIconButton","icon","SmilingFaceIcon","handleSelectEmoji","emoji","native","footer","CommentMetaLine","singleLine","ShareToChatRow","_objectSpread","WellhubFilePicker","open","maxSelectable","count","attachedFileNames","onAdd","files","addStoredFiles","file","fileName","onClose"],"mappings":"+vMAgFA,IAGMA,EAAsB,CAC1BC,SAAU,GACVC,WAAY,OACZC,YAAa,CACXC,gBAP2B,gCAQ3BC,KAAM,CAAED,gBARmB,iCAS3BE,KAAM,CACJC,MAAO,gCACP,WAAY,CAAEH,gBAAiB,2DAK/BI,EAAmB,SAACC,GAA0C,OAClEC,EAAAA,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,MAACwJ,EAAAA,eAAcC,EAAA,CAAA,EAAKzH,SAM3CP,GACCzB,EAACQ,IAAAkJ,2BACKjI,GAAc,GAAA,CAClBkI,KAAMlG,GACNmG,cAAe/G,EAAOK,SAAWL,EAAOgH,MACxCC,kBAAmBnG,GACnBoG,MAhIgB,SAACC,GACvBtG,IAAiB,GACjBb,EAAOoH,eAAeD,EAAMpG,KAAI,SAAAsG,GAAI,MAAK,CAAEC,SAAUD,EAAKC,SAAW,MA+H/DC,QAAS,WAAA,OAAM1G,IAAiB,EAAM,OAKhD"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/toConsumableArray"),r=require("@babel/runtime/helpers/asyncToGenerator"),n=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/slicedToArray"),u=require("@babel/runtime/regenerator"),i=require("react"),l=require("react-s3-uploader/s3upload"),o=require("../AttachmentPreview/getAttachmentKind.js"),a=require("../AttachFileButton/AttachFileButton.js"),c=require("../../clients/jsonApi/index.js"),f=require("../../utils/links.js"),s=require("../../utils/signedLinkCache.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=d(e),v=d(r),m=d(n),h=d(t),g=d(u),b=d(l);function U(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function k(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?U(Object(n),!0).forEach((function(r){m.default(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}var w=function(e){return e.type.startsWith("image/")?"image":e.type.startsWith("video/")?"video":"file"},y=function(e){return(e/1048576).toFixed(1)},j=function(e){return{id:e.url,name:e.name,file:null,previewUrl:"",isUploading:!1,error:null,uploaded:e}},C=0,O=function(){return"attachment-".concat(C+=1)};exports.DEFAULT_MAX_ATTACHMENTS=10,exports.useAttachmentUpload=function(e){var r,n,t=e.value,u=e.onChange,l=e.onError,d=e.maxSizeBytes,m=e.maxFiles,U=void 0===m?10:m,C=e.accept,A=void 0===C?a.ACCEPTED_ATTACHMENT_TYPES:C,S=i.useState([]),E=h.default(S,2),L=E[0],R=E[1],F=i.useRef(null),x=i.useRef(new Map),P=i.useRef(new Map),q=i.useRef([]),T=i.useRef(u),z=i.useRef(l);T.current=u,z.current=l;var M=i.useRef([]),D=i.useCallback((function(e){var r=e(q.current);q.current=r,R(r),M.current=function(e){return e.map((function(e){return e.uploaded})).filter(Boolean)}(r),T.current(M.current)}),[]),B=i.useCallback((function(e,r){return D((function(n){return n.map((function(n){return n.id===e?k(k({},n),r):n}))}))}),[D]),_=i.useCallback((function(e){var r,n;null===(r=x.current.get(e))||void 0===r||r.abortUpload(),x.current.delete(e),P.current.set(e,(null!==(n=P.current.get(e))&&void 0!==n?n:0)+1)}),[]),W=i.useCallback((function(e){null!=e&&e.previewUrl&&URL.revokeObjectURL(e.previewUrl)}),[]),K=i.useCallback((function(){var e,r,n;null===(e=z.current)||void 0===e||e.call(z,null!==(r=null===(n=q.current.find((function(e){return e.error})))||void 0===n?void 0:n.error)&&void 0!==r?r:null)}),[]);i.useEffect((function(){return function(){x.current.forEach((function(e){return e.abortUpload()})),x.current.clear(),q.current.forEach((function(e){e.previewUrl&&URL.revokeObjectURL(e.previewUrl)}))}}),[]);var N=i.useCallback((function(e,r){var n,t=(null!==(n=P.current.get(e))&&void 0!==n?n:0)+1;P.current.set(e,t);var u,i,l=function(){return P.current.get(e)===t},o=function(r){var n;l()&&(B(e,{isUploading:!1,error:r}),null===(n=z.current)||void 0===n||n.call(z,r))},a="",f=new b.default({files:[r],preprocess:function(e,r){return r(e)},onProgress:function(){},getSignedUrl:(i=v.default(g.default.mark((function e(r,n){var t;return g.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.getS3SignedUrl(r.name,r.type);case 3:t=e.sent,a=t.file_name,n(k(k({},t),{},{signedUrl:t.signed_url})),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),o((null===e.t0||void 0===e.t0?void 0:e.t0.message)||"Failed to upload the file");case 11:case"end":return e.stop()}}),e,null,[[0,8]])}))),function(e,r){return i.apply(this,arguments)}),onFinishS3Put:(u=v.default(g.default.mark((function n(){var t;return g.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,s.getSignedLink(a);case 3:if(t=n.sent,l()){n.next=6;break}return n.abrupt("return");case 6:x.current.delete(e),B(e,{isUploading:!1,error:null,uploaded:{url:t,name:a,size:r.size}}),K(),n.next=14;break;case 11:n.prev=11,n.t0=n.catch(0),o((null===n.t0||void 0===n.t0?void 0:n.t0.message)||"Failed to upload the file");case 14:case"end":return n.stop()}}),n,null,[[0,11]])}))),function(){return u.apply(this,arguments)}),onError:function(e){return o(e||"Failed to upload the file")}});x.current.set(e,f)}),[B,K]),Y=i.useCallback((function(e){var r,n=f.getUrlFileName(e);n&&(q.current.length>=U?null===(r=z.current)||void 0===r||r.call(z,"You can attach up to ".concat(U," files.")):q.current.some((function(r){var n;return(null===(n=r.uploaded)||void 0===n?void 0:n.url)===e}))||D((function(r){return[].concat(p.default(r),[{id:O(),name:n,file:null,previewUrl:e,isUploading:!1,error:null,uploaded:{url:e,name:n}}])})))}),[D,U]),H=i.useCallback((function(e){var r,n,t,u,i=e.filter((function(e){return function(e,r){return r.split(",").map((function(e){return e.trim().toLowerCase()})).filter(Boolean).some((function(r){if(r.startsWith("."))return e.name.toLowerCase().endsWith(r);if(r.endsWith("/*")){var n=e.type.toLowerCase();return n?n.startsWith(r.slice(0,-1)):o.getAttachmentKind({name:e.name})===r.slice(0,-1)}return e.type.toLowerCase()===r}))}(e,A)})),l=i.length<e.length?1===e.length?"That file type is not supported.":"Some files were skipped — unsupported file type.":null,a="You can attach up to ".concat(U," files."),c=U-q.current.length;if(!i.length||c<=0){var f;null===(f=z.current)||void 0===f||f.call(z,i.length?a:l)}else{var s=i.slice(0,c),v=s.map((function(e){var r=w(e),n=!!d&&e.size>d;return{id:O(),name:e.name,file:e,previewUrl:"file"===r?"":URL.createObjectURL(e),isUploading:!n,error:n?"File is too large (".concat(y(e.size)," MB). Maximum size is ").concat(y(d)," MB."):null,uploaded:null}}));D((function(e){return[].concat(p.default(e),p.default(v))}));var m=i.length>s.length?a:null;null===(r=z.current)||void 0===r||r.call(z,null!==(n=null!==(t=null===(u=q.current.find((function(e){return e.error})))||void 0===u?void 0:u.error)&&void 0!==t?t:l)&&void 0!==n?n:m),v.filter((function(e){return!e.error})).forEach((function(e){return N(e.id,e.file)}))}}),[D,U,d,N,A]),I=i.useCallback((function(e){var r,n=Array.from(null!==(r=e.target.files)&&void 0!==r?r:[]);F.current&&(F.current.value=""),n.length&&H(n)}),[H]),G=i.useCallback((function(){var e;return null===(e=F.current)||void 0===e?void 0:e.click()}),[]),X=i.useCallback((function(e){var r=String(e);_(r),W(q.current.find((function(e){return e.id===r}))),D((function(e){return e.filter((function(e){return e.id!==r}))})),K()}),[_,W,D,K]),J=i.useCallback((function(e){var r=String(e),n=q.current.find((function(e){return e.id===r}));null!=n&&n.file&&(_(r),B(r,{isUploading:!0,error:null}),K(),N(r,n.file))}),[_,B,N,K]),Q=i.useCallback((function(e){return D((function(r){var n=new Map(r.map((function(e){return[e.id,e]}))),t=e.map((function(e){return n.get(String(e))})).filter(Boolean),u=r.filter((function(r){return!e.some((function(e){return String(e)===r.id}))}));return[].concat(p.default(t),p.default(u))}))}),[D]),V=i.useCallback((function(){var e;q.current.forEach((function(e){_(e.id),W(e)})),D((function(){return[]})),null===(e=z.current)||void 0===e||e.call(z,null)}),[_,D,W]);i.useEffect((function(){var e,r,n;(r=M.current,n=t,r.length===n.length&&r.every((function(e,r){return e.url===n[r].url})))||(q.current.forEach((function(e){_(e.id),e.previewUrl&&URL.revokeObjectURL(e.previewUrl)})),q.current=t.map(j),M.current=t,R(q.current),null===(e=z.current)||void 0===e||e.call(z,null))}),[t,_]);var Z=i.useState((function(){return t.reduce((function(e,r){var n=s.peekSignedLink(r.name,"inline");return n&&(e[r.name]=n),e}),{})})),$=h.default(Z,2),ee=$[0],re=$[1],ne=i.useRef(ee);ne.current=ee;var te=L.filter((function(e){return!e.file&&!e.previewUrl&&e.uploaded})).map((function(e){return e.uploaded.name})).join("|");return i.useEffect((function(){var e=te.split("|").filter((function(e){return e&&!(e in ne.current)}));if(e.length){var r=!0;return Promise.all(e.map((function(e){return s.getSignedLink(e,"inline").then((function(r){return[e,r]})).catch((function(r){return console.error('Failed to sign stored attachment "'.concat(e,'"'),r),[e,""]}))}))).then((function(e){r&&re((function(r){return k(k({},r),Object.fromEntries(e))}))})),function(){r=!1}}}),[te]),{items:L.reduce((function(e,r){var n;if(r.file)return e.push({id:r.id,name:r.name,src:r.previewUrl,kind:w(r.file),size:r.file.size,isUploading:r.isUploading,hideDownload:!0,error:null!==(n=r.error)&&void 0!==n?n:void 0}),e;var t=r.uploaded,u=o.getAttachmentKind(t),i=r.previewUrl||ee[t.name];return"file"===u||i?(e.push({id:r.id,name:t.name,src:i,kind:u,size:t.size,hideDownload:!0}),e):e}),[]),fileInputRef:F,openFileDialog:G,handleFileSelect:I,addFiles:H,addLinkedImage:Y,removeAttachment:X,handleRetry:J,reorderAttachments:Q,clearAttachments:V,isUploading:L.some((function(e){return e.isUploading})),error:null!==(r=null===(n=L.find((function(e){return e.error})))||void 0===n?void 0:n.error)&&void 0!==r?r:null,count:L.length,isFull:L.length>=U,maxFiles:U}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/toConsumableArray"),r=require("@babel/runtime/helpers/asyncToGenerator"),n=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/slicedToArray"),u=require("@babel/runtime/regenerator"),i=require("react"),l=require("react-s3-uploader/s3upload"),a=require("../AttachmentPreview/getAttachmentKind.js"),o=require("../AttachFileButton/AttachFileButton.js"),c=require("../../clients/jsonApi/index.js"),f=require("../../utils/links.js"),s=require("../../utils/signedLinkCache.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=d(e),v=d(r),h=d(n),m=d(t),g=d(u),b=d(l);function k(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function U(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?k(Object(n),!0).forEach((function(r){h.default(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}var w=function(e){return e.type.startsWith("image/")?"image":e.type.startsWith("video/")?"video":"file"},y=function(e){return(e/1048576).toFixed(1)},C=function(e){return{id:e.url,name:e.name,file:null,previewUrl:"",isUploading:!1,error:null,uploaded:e}},j=0,O=function(){return"attachment-".concat(j+=1)};exports.DEFAULT_MAX_ATTACHMENTS=10,exports.useAttachmentUpload=function(e){var r,n,t=e.value,u=e.onChange,l=e.onError,d=e.maxSizeBytes,h=e.maxFiles,k=void 0===h?10:h,j=e.accept,x=void 0===j?o.ACCEPTED_ATTACHMENT_TYPES:j,S=i.useState([]),A=m.default(S,2),E=A[0],L=A[1],F=i.useRef(null),R=i.useRef(new Map),P=i.useRef(new Map),q=i.useRef([]),z=i.useRef(u),T=i.useRef(l);z.current=u,T.current=l;var M=i.useRef([]),B=i.useCallback((function(e){var r=e(q.current);q.current=r,L(r),M.current=function(e){return e.map((function(e){return e.uploaded})).filter(Boolean)}(r),z.current(M.current)}),[]),D=i.useCallback((function(e,r){return B((function(n){return n.map((function(n){return n.id===e?U(U({},n),r):n}))}))}),[B]),N=i.useCallback((function(e){var r,n;null===(r=R.current.get(e))||void 0===r||r.abortUpload(),R.current.delete(e),P.current.set(e,(null!==(n=P.current.get(e))&&void 0!==n?n:0)+1)}),[]),_=i.useCallback((function(e){null!=e&&e.previewUrl&&URL.revokeObjectURL(e.previewUrl)}),[]),W=i.useCallback((function(){var e,r,n;null===(e=T.current)||void 0===e||e.call(T,null!==(r=null===(n=q.current.find((function(e){return e.error})))||void 0===n?void 0:n.error)&&void 0!==r?r:null)}),[]);i.useEffect((function(){return function(){R.current.forEach((function(e){return e.abortUpload()})),R.current.clear(),q.current.forEach((function(e){e.previewUrl&&URL.revokeObjectURL(e.previewUrl)}))}}),[]);var Y=i.useCallback((function(e,r){var n,t=(null!==(n=P.current.get(e))&&void 0!==n?n:0)+1;P.current.set(e,t);var u,i,l=function(){return P.current.get(e)===t},a=function(r){var n;l()&&(D(e,{isUploading:!1,error:r}),null===(n=T.current)||void 0===n||n.call(T,r))},o="",f=new b.default({files:[r],preprocess:function(e,r){return r(e)},onProgress:function(){},getSignedUrl:(i=v.default(g.default.mark((function e(r,n){var t;return g.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.getS3SignedUrl(r.name,r.type);case 3:t=e.sent,o=t.file_name,n(U(U({},t),{},{signedUrl:t.signed_url})),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),a((null===e.t0||void 0===e.t0?void 0:e.t0.message)||"Failed to upload the file");case 11:case"end":return e.stop()}}),e,null,[[0,8]])}))),function(e,r){return i.apply(this,arguments)}),onFinishS3Put:(u=v.default(g.default.mark((function n(){var t;return g.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,s.getSignedLink(o);case 3:if(t=n.sent,l()){n.next=6;break}return n.abrupt("return");case 6:R.current.delete(e),D(e,{isUploading:!1,error:null,uploaded:{url:t,name:o,size:r.size}}),W(),n.next=14;break;case 11:n.prev=11,n.t0=n.catch(0),a((null===n.t0||void 0===n.t0?void 0:n.t0.message)||"Failed to upload the file");case 14:case"end":return n.stop()}}),n,null,[[0,11]])}))),function(){return u.apply(this,arguments)}),onError:function(e){return a(e||"Failed to upload the file")}});R.current.set(e,f)}),[D,W]),I=i.useCallback((function(e){var r,n=f.getUrlFileName(e);n&&(q.current.length>=k?null===(r=T.current)||void 0===r||r.call(T,"You can attach up to ".concat(k," files.")):q.current.some((function(r){var n;return(null===(n=r.uploaded)||void 0===n?void 0:n.url)===e}))||B((function(r){return[].concat(p.default(r),[{id:O(),name:n,file:null,previewUrl:e,isUploading:!1,error:null,uploaded:{url:e,name:n}}])})))}),[B,k]),K=i.useCallback(function(){var e=v.default(g.default.mark((function e(r){var n,t,u,i,l,a,o,c,f,d,v;return g.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u=r.filter((function(e,r,n){return!q.current.some((function(r){var n;return(null===(n=r.uploaded)||void 0===n?void 0:n.name)===e.fileName}))&&n.findIndex((function(r){return r.fileName===e.fileName}))===r})),u.length){e.next=3;break}return e.abrupt("return");case 3:if(!((i=k-q.current.length)<=0)){e.next=7;break}return null===(l=T.current)||void 0===l||l.call(T,"You can attach up to ".concat(k," files.")),e.abrupt("return");case 7:return a=u.slice(0,i),e.next=10,Promise.all(a.map((function(e){return s.getSignedLink(e.fileName).then((function(r){return{url:r,name:e.fileName,size:e.size}})).catch((function(){return null}))})));case 10:o=e.sent,c=o.filter(Boolean),f=0,c.length&&B((function(e){var r=c.slice(0,Math.max(k-e.length,0));return f=r.length,[].concat(p.default(e),p.default(r.map((function(e){return U(U({},C(e)),{},{id:O()})}))))})),d=o.length-c.length,v=u.length>a.length||f<c.length,null===(n=T.current)||void 0===n||n.call(T,d&&"Could not attach ".concat(1===d?"a file":"".concat(d," files")," from Wellhub.")||v&&"You can attach up to ".concat(k," files.")||(null===(t=q.current.find((function(e){return e.error})))||void 0===t?void 0:t.error)||null);case 17:case"end":return e.stop()}}),e)})));return function(r){return e.apply(this,arguments)}}(),[B,k]),H=i.useCallback((function(e){var r,n,t,u,i=e.filter((function(e){return function(e,r){return r.split(",").map((function(e){return e.trim().toLowerCase()})).filter(Boolean).some((function(r){if(r.startsWith("."))return e.name.toLowerCase().endsWith(r);if(r.endsWith("/*")){var n=e.type.toLowerCase();return n?n.startsWith(r.slice(0,-1)):a.getAttachmentKind({name:e.name})===r.slice(0,-1)}return e.type.toLowerCase()===r}))}(e,x)})),l=i.length<e.length?1===e.length?"That file type is not supported.":"Some files were skipped — unsupported file type.":null,o="You can attach up to ".concat(k," files."),c=k-q.current.length;if(!i.length||c<=0){var f;null===(f=T.current)||void 0===f||f.call(T,i.length?o:l)}else{var s=i.slice(0,c),v=s.map((function(e){var r=w(e),n=!!d&&e.size>d;return{id:O(),name:e.name,file:e,previewUrl:"file"===r?"":URL.createObjectURL(e),isUploading:!n,error:n?"File is too large (".concat(y(e.size)," MB). Maximum size is ").concat(y(d)," MB."):null,uploaded:null}}));B((function(e){return[].concat(p.default(e),p.default(v))}));var h=i.length>s.length?o:null;null===(r=T.current)||void 0===r||r.call(T,null!==(n=null!==(t=null===(u=q.current.find((function(e){return e.error})))||void 0===u?void 0:u.error)&&void 0!==t?t:l)&&void 0!==n?n:h),v.filter((function(e){return!e.error})).forEach((function(e){return Y(e.id,e.file)}))}}),[B,k,d,Y,x]),G=i.useCallback((function(e){var r,n=Array.from(null!==(r=e.target.files)&&void 0!==r?r:[]);F.current&&(F.current.value=""),n.length&&H(n)}),[H]),X=i.useCallback((function(){var e;return null===(e=F.current)||void 0===e?void 0:e.click()}),[]),J=i.useCallback((function(e){var r=String(e);N(r),_(q.current.find((function(e){return e.id===r}))),B((function(e){return e.filter((function(e){return e.id!==r}))})),W()}),[N,_,B,W]),Q=i.useCallback((function(e){var r=String(e),n=q.current.find((function(e){return e.id===r}));null!=n&&n.file&&(N(r),D(r,{isUploading:!0,error:null}),W(),Y(r,n.file))}),[N,D,Y,W]),V=i.useCallback((function(e){return B((function(r){var n=new Map(r.map((function(e){return[e.id,e]}))),t=e.map((function(e){return n.get(String(e))})).filter(Boolean),u=r.filter((function(r){return!e.some((function(e){return String(e)===r.id}))}));return[].concat(p.default(t),p.default(u))}))}),[B]),Z=i.useCallback((function(){var e;q.current.forEach((function(e){N(e.id),_(e)})),B((function(){return[]})),null===(e=T.current)||void 0===e||e.call(T,null)}),[N,B,_]);i.useEffect((function(){var e,r,n;(r=M.current,n=t,r.length===n.length&&r.every((function(e,r){return e.url===n[r].url})))||(q.current.forEach((function(e){N(e.id),e.previewUrl&&URL.revokeObjectURL(e.previewUrl)})),q.current=t.map(C),M.current=t,L(q.current),null===(e=T.current)||void 0===e||e.call(T,null))}),[t,N]);var $=i.useState((function(){return t.reduce((function(e,r){var n=s.peekSignedLink(r.name,"inline");return n&&(e[r.name]=n),e}),{})})),ee=m.default($,2),re=ee[0],ne=ee[1],te=i.useRef(re);te.current=re;var ue=E.filter((function(e){return!e.file&&!e.previewUrl&&e.uploaded})).map((function(e){return e.uploaded.name})).join("|");return i.useEffect((function(){var e=ue.split("|").filter((function(e){return e&&!(e in te.current)}));if(e.length){var r=!0;return Promise.all(e.map((function(e){return s.getSignedLink(e,"inline").then((function(r){return[e,r]})).catch((function(r){return console.error('Failed to sign stored attachment "'.concat(e,'"'),r),[e,""]}))}))).then((function(e){r&&ne((function(r){return U(U({},r),Object.fromEntries(e))}))})),function(){r=!1}}}),[ue]),{items:E.reduce((function(e,r){var n;if(r.file)return e.push({id:r.id,name:r.name,src:r.previewUrl,kind:w(r.file),size:r.file.size,isUploading:r.isUploading,hideDownload:!0,error:null!==(n=r.error)&&void 0!==n?n:void 0}),e;var t=r.uploaded,u=a.getAttachmentKind(t),i=r.previewUrl||re[t.name];return"file"===u||i?(e.push({id:r.id,name:t.name,src:i,kind:u,size:t.size,hideDownload:!0}),e):e}),[]),fileInputRef:F,openFileDialog:X,handleFileSelect:G,addFiles:H,addLinkedImage:I,addStoredFiles:K,removeAttachment:J,handleRetry:Q,reorderAttachments:V,clearAttachments:Z,isUploading:E.some((function(e){return e.isUploading})),error:null!==(r=null===(n=E.find((function(e){return e.error})))||void 0===n?void 0:n.error)&&void 0!==r?r:null,count:E.length,isFull:E.length>=k,maxFiles:k}};
2
2
  //# sourceMappingURL=useAttachmentUpload.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useAttachmentUpload.js","sources":["../../../../src/components/CommentComposer/useAttachmentUpload.ts"],"sourcesContent":["import { ChangeEvent, useCallback, useEffect, useRef, useState } from 'react';\nimport S3Upload from 'react-s3-uploader/s3upload';\n\nimport type {\n AttachmentKind,\n AttachmentPreviewItem,\n} from '../AttachmentPreview/AttachmentPreview.types';\nimport { getAttachmentKind } from '../AttachmentPreview/getAttachmentKind';\nimport { ACCEPTED_ATTACHMENT_TYPES } from '../AttachFileButton';\n\nimport { getS3SignedUrl } from '~/clients/jsonApi';\nimport { getUrlFileName } from '~/utils/links';\nimport { getSignedLink, peekSignedLink } from '~/utils/signedLinkCache';\n\nexport type UploadedAttachment = {\n url: string;\n name: string;\n size?: number;\n};\n\ntype UseAttachmentUploadOptions = {\n value: UploadedAttachment[];\n onChange: (attachments: UploadedAttachment[]) => void;\n onError?: (message: string | null) => void;\n maxSizeBytes?: number;\n maxFiles?: number;\n /** Mirrors the file input's `accept`; also gates drag-and-drop. */\n accept?: string;\n};\n\n/** A picked or already-stored file, in the order the user arranged it. */\ntype Entry = {\n id: string;\n name: string;\n /** Set while the file is local; cleared entries come from `value`. */\n file: File | null;\n previewUrl: string;\n isUploading: boolean;\n error: string | null;\n uploaded: UploadedAttachment | null;\n};\n\nexport const DEFAULT_MAX_ATTACHMENTS = 10;\n\n/** Same rules the file input enforces via `accept`, so drag-and-drop can't smuggle a type past it. */\nconst isAcceptedType = (file: File, accept: string) =>\n accept\n .split(',')\n .map(rule => rule.trim().toLowerCase())\n .filter(Boolean)\n .some(rule => {\n if (rule.startsWith('.')) return file.name.toLowerCase().endsWith(rule);\n if (rule.endsWith('/*')) {\n const type = file.type.toLowerCase();\n if (type) return type.startsWith(rule.slice(0, -1));\n\n return getAttachmentKind({ name: file.name }) === rule.slice(0, -1);\n }\n\n return file.type.toLowerCase() === rule;\n });\n\nconst getFileKind = (file: File): AttachmentKind => {\n if (file.type.startsWith('image/')) return 'image';\n if (file.type.startsWith('video/')) return 'video';\n return 'file';\n};\n\nconst formatMb = (bytes: number) => (bytes / (1024 * 1024)).toFixed(1);\n\nconst getUploaded = (entries: Entry[]) =>\n entries.map(entry => entry.uploaded).filter(Boolean) as UploadedAttachment[];\n\nconst isSameList = (a: UploadedAttachment[], b: UploadedAttachment[]) =>\n a.length === b.length && a.every((item, index) => item.url === b[index].url);\n\nconst toStoredEntry = (attachment: UploadedAttachment): Entry => ({\n id: attachment.url,\n name: attachment.name,\n file: null,\n previewUrl: '',\n isUploading: false,\n error: null,\n uploaded: attachment,\n});\n\nlet entrySeq = 0;\nconst nextEntryId = () => {\n entrySeq += 1;\n return `attachment-${entrySeq}`;\n};\n\nexport const useAttachmentUpload = ({\n value,\n onChange,\n onError,\n maxSizeBytes,\n maxFiles = DEFAULT_MAX_ATTACHMENTS,\n accept = ACCEPTED_ATTACHMENT_TYPES,\n}: UseAttachmentUploadOptions) => {\n const [entries, setEntries] = useState<Entry[]>([]);\n\n const fileInputRef = useRef<HTMLInputElement>(null);\n const uploadersRef = useRef(new Map<string, S3Upload>());\n // Bumped per attempt so a superseded upload can't write state for a restarted entry.\n const sessionsRef = useRef(new Map<string, number>());\n // Mutations are driven from async upload callbacks, so the latest list lives in a ref.\n const entriesRef = useRef<Entry[]>([]);\n const onChangeRef = useRef(onChange);\n const onErrorRef = useRef(onError);\n\n onChangeRef.current = onChange;\n onErrorRef.current = onError;\n\n // What we last handed the parent. A `value` that still matches it is our own change echoing\n // back; anything else is a parent-driven reset we must adopt.\n const emittedRef = useRef<UploadedAttachment[]>([]);\n\n const commit = useCallback((updater: (prev: Entry[]) => Entry[]) => {\n const next = updater(entriesRef.current);\n entriesRef.current = next;\n setEntries(next);\n emittedRef.current = getUploaded(next);\n onChangeRef.current(emittedRef.current);\n }, []);\n\n const patchEntry = useCallback(\n (id: string, patch: Partial<Entry>) =>\n commit(prev => prev.map(entry => (entry.id === id ? { ...entry, ...patch } : entry))),\n [commit]\n );\n\n const abortUpload = useCallback((id: string) => {\n uploadersRef.current.get(id)?.abortUpload();\n uploadersRef.current.delete(id);\n // Bump, never delete: deleting would let the next attempt reuse session 1, so a callback\n // still in flight from the aborted attempt would pass `isCurrent` and clobber it.\n sessionsRef.current.set(id, (sessionsRef.current.get(id) ?? 0) + 1);\n }, []);\n\n const releasePreview = useCallback((entry?: Entry) => {\n if (entry?.previewUrl) URL.revokeObjectURL(entry.previewUrl);\n }, []);\n\n // The banner is shared by every tile, so recompute it rather than clear it — one file\n // succeeding must not hide a sibling that is still failing.\n const syncError = useCallback(() => {\n onErrorRef.current?.(entriesRef.current.find(entry => entry.error)?.error ?? null);\n }, []);\n\n useEffect(\n () => () => {\n uploadersRef.current.forEach(uploader => uploader.abortUpload());\n uploadersRef.current.clear();\n entriesRef.current.forEach(entry => {\n if (entry.previewUrl) URL.revokeObjectURL(entry.previewUrl);\n });\n },\n []\n );\n\n const startUpload = useCallback(\n (id: string, file: File) => {\n const session = (sessionsRef.current.get(id) ?? 0) + 1;\n sessionsRef.current.set(id, session);\n // A superseded upload must not write state for an entry that is gone or restarted.\n const isCurrent = () => sessionsRef.current.get(id) === session;\n\n const fail = (message: string) => {\n if (!isCurrent()) return;\n patchEntry(id, { isUploading: false, error: message });\n onErrorRef.current?.(message);\n };\n\n let storedKey = '';\n\n const uploader = new S3Upload({\n files: [file],\n preprocess: (target: File, next: (file: File) => void) => next(target),\n onProgress: () => {},\n getSignedUrl: async (\n target: File,\n callback: (data: { signedUrl: string; [key: string]: unknown }) => void\n ) => {\n try {\n const data = await getS3SignedUrl(target.name, target.type);\n storedKey = data.file_name;\n callback({ ...data, signedUrl: data.signed_url });\n } catch (e) {\n fail((e as Error)?.message || 'Failed to upload the file');\n }\n },\n onFinishS3Put: async () => {\n try {\n const url = await getSignedLink(storedKey);\n if (!isCurrent()) return;\n\n uploadersRef.current.delete(id);\n patchEntry(id, {\n isUploading: false,\n error: null,\n uploaded: { url, name: storedKey, size: file.size },\n });\n syncError();\n } catch (e) {\n fail((e as Error)?.message || 'Failed to upload the file');\n }\n },\n onError: (message: string) => fail(message || 'Failed to upload the file'),\n });\n\n uploadersRef.current.set(id, uploader);\n },\n [patchEntry, syncError]\n );\n\n /** Nothing is uploaded: a comment attachment is a url, so the link itself is the attachment. */\n const addLinkedImage = useCallback(\n (url: string) => {\n const name = getUrlFileName(url);\n\n if (!name) return;\n if (entriesRef.current.length >= maxFiles) {\n onErrorRef.current?.(`You can attach up to ${maxFiles} files.`);\n\n return;\n }\n\n if (entriesRef.current.some(entry => entry.uploaded?.url === url)) return;\n\n commit(prev => [\n ...prev,\n {\n id: nextEntryId(),\n name,\n file: null,\n previewUrl: url,\n isUploading: false,\n error: null,\n uploaded: { url, name },\n },\n ]);\n },\n [commit, maxFiles]\n );\n\n const addFiles = useCallback(\n (files: File[]) => {\n const supported = files.filter(file => isAcceptedType(file, accept));\n const skipped = supported.length < files.length;\n // One banner, one message: report the most actionable reason once, at the end. Reporting\n // as we go would let a later call overwrite an earlier warning on a mixed drop.\n const unsupported = skipped\n ? (files.length === 1 && 'That file type is not supported.') ||\n 'Some files were skipped — unsupported file type.'\n : null;\n const tooMany = `You can attach up to ${maxFiles} files.`;\n\n const room = maxFiles - entriesRef.current.length;\n if (!supported.length || room <= 0) {\n onErrorRef.current?.(supported.length ? tooMany : unsupported);\n return;\n }\n\n const accepted = supported.slice(0, room);\n const added: Entry[] = accepted.map(file => {\n const kind = getFileKind(file);\n const isTooLarge = !!maxSizeBytes && file.size > maxSizeBytes;\n\n return {\n id: nextEntryId(),\n name: file.name,\n file,\n previewUrl: kind === 'file' ? '' : URL.createObjectURL(file),\n isUploading: !isTooLarge,\n error: isTooLarge\n ? `File is too large (${formatMb(file.size)} MB). Maximum size is ${formatMb(\n maxSizeBytes as number\n )} MB.`\n : null,\n uploaded: null,\n };\n });\n\n commit(prev => [...prev, ...added]);\n\n const overflow = supported.length > accepted.length ? tooMany : null;\n onErrorRef.current?.(\n entriesRef.current.find(entry => entry.error)?.error ?? unsupported ?? overflow\n );\n\n added\n .filter(entry => !entry.error)\n .forEach(entry => startUpload(entry.id, entry.file as File));\n },\n [commit, maxFiles, maxSizeBytes, startUpload, accept]\n );\n\n const handleFileSelect = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n const files = Array.from(event.target.files ?? []);\n // Reset the input so re-picking the same file still fires a change event.\n if (fileInputRef.current) fileInputRef.current.value = '';\n if (files.length) addFiles(files);\n },\n [addFiles]\n );\n\n const openFileDialog = useCallback(() => fileInputRef.current?.click(), []);\n\n const removeAttachment = useCallback(\n (id: AttachmentPreviewItem['id']) => {\n const key = String(id);\n abortUpload(key);\n releasePreview(entriesRef.current.find(entry => entry.id === key));\n commit(prev => prev.filter(entry => entry.id !== key));\n syncError();\n },\n [abortUpload, releasePreview, commit, syncError]\n );\n\n const handleRetry = useCallback(\n (id: AttachmentPreviewItem['id']) => {\n const key = String(id);\n const entry = entriesRef.current.find(item => item.id === key);\n if (!entry?.file) return;\n\n abortUpload(key);\n patchEntry(key, { isUploading: true, error: null });\n syncError();\n startUpload(key, entry.file);\n },\n [abortUpload, patchEntry, startUpload, syncError]\n );\n\n const reorderAttachments = useCallback(\n (orderedIds: AttachmentPreviewItem['id'][]) =>\n commit(prev => {\n const byId = new Map(prev.map(entry => [entry.id, entry]));\n const reordered = orderedIds.map(id => byId.get(String(id))).filter(Boolean) as Entry[];\n // Unlisted ids (a race with a removal) keep their place at the end.\n const missing = prev.filter(entry => !orderedIds.some(id => String(id) === entry.id));\n return [...reordered, ...missing];\n }),\n [commit]\n );\n\n const clearAttachments = useCallback(() => {\n entriesRef.current.forEach(entry => {\n abortUpload(entry.id);\n releasePreview(entry);\n });\n commit(() => []);\n onErrorRef.current?.(null);\n }, [abortUpload, commit, releasePreview]);\n\n // Adopt a value we didn't produce — an edit form's initial attachments, or a parent-side reset.\n // Compared against what we emitted, not against the current entries: a failed-only or\n // mid-upload list emits `[]` too, and treating that as \"in sync\" would strand those tiles\n // on screen and let a late upload write itself back into freshly reset parent state.\n useEffect(() => {\n if (isSameList(emittedRef.current, value)) return;\n\n entriesRef.current.forEach(entry => {\n abortUpload(entry.id);\n if (entry.previewUrl) URL.revokeObjectURL(entry.previewUrl);\n });\n entriesRef.current = value.map(toStoredEntry);\n emittedRef.current = value;\n setEntries(entriesRef.current);\n onErrorRef.current?.(null);\n }, [value, abortUpload]);\n\n // A stored url has expired by now, so re-sign it for the preview.\n const [storedSrcs, setStoredSrcs] = useState<Record<string, string>>(() =>\n value.reduce<Record<string, string>>((acc, attachment) => {\n const src = peekSignedLink(attachment.name, 'inline');\n if (src) acc[attachment.name] = src;\n\n return acc;\n }, {})\n );\n const storedSrcsRef = useRef(storedSrcs);\n storedSrcsRef.current = storedSrcs;\n\n const storedNames = entries\n // A linked image carries its own url, so there is no key of ours to sign.\n .filter(entry => !entry.file && !entry.previewUrl && entry.uploaded)\n .map(entry => (entry.uploaded as UploadedAttachment).name)\n .join('|');\n\n useEffect(() => {\n const pending = storedNames.split('|').filter(name => name && !(name in storedSrcsRef.current));\n if (!pending.length) return undefined;\n\n let isActive = true;\n Promise.all(\n pending.map(name =>\n getSignedLink(name, 'inline')\n .then(url => [name, url] as const)\n .catch(error => {\n console.error(`Failed to sign stored attachment \"${name}\"`, error);\n\n return [name, ''] as const;\n })\n )\n ).then(resolved => {\n if (isActive) setStoredSrcs(prev => ({ ...prev, ...Object.fromEntries(resolved) }));\n });\n\n return () => {\n isActive = false;\n };\n }, [storedNames]);\n\n const items = entries.reduce<AttachmentPreviewItem[]>((acc, entry) => {\n if (entry.file) {\n acc.push({\n id: entry.id,\n name: entry.name,\n src: entry.previewUrl,\n kind: getFileKind(entry.file),\n size: entry.file.size,\n isUploading: entry.isUploading,\n hideDownload: true,\n error: entry.error ?? undefined,\n });\n return acc;\n }\n\n const stored = entry.uploaded as UploadedAttachment;\n const kind = getAttachmentKind(stored);\n // A linked image is already a url; only one of ours has an S3 key worth signing.\n const src = entry.previewUrl || storedSrcs[stored.name];\n // A thumbnail without its signed url would paint as a broken image, so hold it back.\n if (kind !== 'file' && !src) return acc;\n\n acc.push({ id: entry.id, name: stored.name, src, kind, size: stored.size, hideDownload: true });\n return acc;\n }, []);\n\n return {\n items,\n fileInputRef,\n openFileDialog,\n handleFileSelect,\n addFiles,\n addLinkedImage,\n removeAttachment,\n handleRetry,\n reorderAttachments,\n clearAttachments,\n isUploading: entries.some(entry => entry.isUploading),\n error: entries.find(entry => entry.error)?.error ?? null,\n count: entries.length,\n isFull: entries.length >= maxFiles,\n maxFiles,\n };\n};\n"],"names":["getFileKind","file","type","startsWith","formatMb","bytes","toFixed","toStoredEntry","attachment","id","url","name","previewUrl","isUploading","error","uploaded","entrySeq","nextEntryId","concat","_ref","_entries$find$error","_entries$find","value","onChange","onError","maxSizeBytes","_ref$maxFiles","maxFiles","_ref$accept","accept","ACCEPTED_ATTACHMENT_TYPES","useState","_useState2","_slicedToArray","_useState","entries","setEntries","fileInputRef","useRef","uploadersRef","Map","sessionsRef","entriesRef","onChangeRef","onErrorRef","current","emittedRef","commit","useCallback","updater","next","map","entry","filter","Boolean","getUploaded","patchEntry","patch","prev","abortUpload","_uploadersRef$current","_sessionsRef$current$","get","delete","set","releasePreview","URL","revokeObjectURL","syncError","_onErrorRef$current","_entriesRef$current$f","_entriesRef$current$f2","find","useEffect","forEach","uploader","clear","startUpload","_sessionsRef$current$2","session","_onFinishS3Put","_getSignedUrl","isCurrent","fail","message","_onErrorRef$current2","storedKey","S3Upload","files","preprocess","target","onProgress","getSignedUrl","_asyncToGenerator","_regeneratorRuntime","mark","_callee","callback","_data","wrap","_context","getS3SignedUrl","data","sent","file_name","signedUrl","signed_url","t0","stop","_x","_x2","apply","this","arguments","onFinishS3Put","_callee2","_context2","getSignedLink","abrupt","size","addLinkedImage","_onErrorRef$current3","getUrlFileName","length","some","_entry$uploaded","_toConsumableArray","addFiles","_onErrorRef$current5","_ref2","_entriesRef$current$f3","_entriesRef$current$f4","supported","split","rule","trim","toLowerCase","endsWith","slice","getAttachmentKind","isAcceptedType","unsupported","tooMany","room","_onErrorRef$current4","accepted","added","kind","isTooLarge","createObjectURL","overflow","handleFileSelect","event","_event$target$files","Array","from","openFileDialog","_fileInputRef$current","click","removeAttachment","key","String","handleRetry","item","reorderAttachments","orderedIds","byId","reordered","missing","clearAttachments","_onErrorRef$current6","_onErrorRef$current7","a","b","every","index","_useState3","reduce","acc","src","peekSignedLink","_useState4","storedSrcs","setStoredSrcs","storedSrcsRef","storedNames","join","pending","isActive","Promise","all","then","catch","console","resolved","_objectSpread","Object","fromEntries","items","_entry$error","push","hideDownload","undefined","stored","count","isFull"],"mappings":"8xCA0CO,IAoBDA,EAAc,SAACC,GACnB,OAAIA,EAAKC,KAAKC,WAAW,UAAkB,QACvCF,EAAKC,KAAKC,WAAW,UAAkB,QACpC,MACT,EAEMC,EAAW,SAACC,GAAa,OAAMA,EAAK,SAAkBC,QAAQ,EAAE,EAQhEC,EAAgB,SAACC,GAA8B,MAAa,CAChEC,GAAID,EAAWE,IACfC,KAAMH,EAAWG,KACjBV,KAAM,KACNW,WAAY,GACZC,aAAa,EACbC,MAAO,KACPC,SAAUP,EACX,EAEGQ,EAAW,EACTC,EAAc,WAElB,MAAA,cAAAC,OADAF,GAAY,EAEd,kCAhDuC,+BAkDJ,SAODG,GAAA,IAAAC,EAAAC,EANhCC,IAAAA,MACAC,IAAAA,SACAC,IAAAA,QACAC,IAAAA,aAAYC,EAAAP,EACZQ,SAAAA,aAvDqC,GAuDHD,EAAAE,EAAAT,EAClCU,OAAAA,aAASC,EAAAA,0BAAyBF,EAEJG,EAAAA,EAAQA,SAAU,IAAGC,EAAAC,EAAAA,QAAAC,EAAA,GAA5CC,EAAOH,EAAA,GAA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KACjB1G,YAAauC,EAAMvC,YACnB4L,cAAc,EACd3L,MAAsB4L,QAAftJ,EAAAA,EAAMtC,aAAS4L,IAAAA,EAAAA,OAAAA,IAEjBxB,EAGT,IAAMyB,EAASvJ,EAAMrC,SACfoI,EAAOR,oBAAkBgE,GAEzBxB,EAAM/H,EAAMxC,YAAc0K,GAAWqB,EAAOhM,MAElD,MAAa,SAATwI,GAAoBgC,GAExBD,EAAIsB,KAAK,CAAE/L,GAAI2C,EAAM3C,GAAIE,KAAMgM,EAAOhM,KAAMwK,IAAAA,EAAKhC,KAAAA,EAAM5B,KAAMoF,EAAOpF,KAAMkF,cAAc,IACjFvB,GAH6BA,CAIrC,GAAE,IAID7I,aAAAA,EACAuH,eAAAA,EACAL,iBAAAA,EACAxB,SAAAA,EACAP,eAAAA,EACAuC,iBAAAA,EACAG,YAAAA,EACAE,mBAAAA,EACAK,iBAAAA,EACA5J,YAAasB,EAAQyF,MAAK,SAAAxE,GAAK,OAAIA,EAAMvC,eACzCC,MAAgD,UAAzC,UAAAqB,EAAQqC,MAAK,SAAApB,GAAK,OAAIA,EAAMtC,KAAK,WAAjC,IAAAO,OAAA,EAAAA,EAAoCP,aAAK,IAAAM,EAAAA,EAAI,KACpDwL,MAAOzK,EAAQwF,OACfkF,OAAQ1K,EAAQwF,QAAUhG,EAC1BA,SAAAA,EAEJ"}
1
+ {"version":3,"file":"useAttachmentUpload.js","sources":["../../../../src/components/CommentComposer/useAttachmentUpload.ts"],"sourcesContent":["import { ChangeEvent, useCallback, useEffect, useRef, useState } from 'react';\nimport S3Upload from 'react-s3-uploader/s3upload';\n\nimport type {\n AttachmentKind,\n AttachmentPreviewItem,\n} from '../AttachmentPreview/AttachmentPreview.types';\nimport { getAttachmentKind } from '../AttachmentPreview/getAttachmentKind';\nimport { ACCEPTED_ATTACHMENT_TYPES } from '../AttachFileButton';\n\nimport { getS3SignedUrl } from '~/clients/jsonApi';\nimport { getUrlFileName } from '~/utils/links';\nimport { getSignedLink, peekSignedLink } from '~/utils/signedLinkCache';\n\nexport type UploadedAttachment = {\n url: string;\n name: string;\n size?: number;\n};\n\ntype UseAttachmentUploadOptions = {\n value: UploadedAttachment[];\n onChange: (attachments: UploadedAttachment[]) => void;\n onError?: (message: string | null) => void;\n maxSizeBytes?: number;\n maxFiles?: number;\n /** Mirrors the file input's `accept`; also gates drag-and-drop. */\n accept?: string;\n};\n\n/** A picked or already-stored file, in the order the user arranged it. */\ntype Entry = {\n id: string;\n name: string;\n /** Set while the file is local; cleared entries come from `value`. */\n file: File | null;\n previewUrl: string;\n isUploading: boolean;\n error: string | null;\n uploaded: UploadedAttachment | null;\n};\n\nexport const DEFAULT_MAX_ATTACHMENTS = 10;\n\n/** Same rules the file input enforces via `accept`, so drag-and-drop can't smuggle a type past it. */\nconst isAcceptedType = (file: File, accept: string) =>\n accept\n .split(',')\n .map(rule => rule.trim().toLowerCase())\n .filter(Boolean)\n .some(rule => {\n if (rule.startsWith('.')) return file.name.toLowerCase().endsWith(rule);\n if (rule.endsWith('/*')) {\n const type = file.type.toLowerCase();\n if (type) return type.startsWith(rule.slice(0, -1));\n\n return getAttachmentKind({ name: file.name }) === rule.slice(0, -1);\n }\n\n return file.type.toLowerCase() === rule;\n });\n\nconst getFileKind = (file: File): AttachmentKind => {\n if (file.type.startsWith('image/')) return 'image';\n if (file.type.startsWith('video/')) return 'video';\n return 'file';\n};\n\nconst formatMb = (bytes: number) => (bytes / (1024 * 1024)).toFixed(1);\n\nconst getUploaded = (entries: Entry[]) =>\n entries.map(entry => entry.uploaded).filter(Boolean) as UploadedAttachment[];\n\nconst isSameList = (a: UploadedAttachment[], b: UploadedAttachment[]) =>\n a.length === b.length && a.every((item, index) => item.url === b[index].url);\n\nconst toStoredEntry = (attachment: UploadedAttachment): Entry => ({\n id: attachment.url,\n name: attachment.name,\n file: null,\n previewUrl: '',\n isUploading: false,\n error: null,\n uploaded: attachment,\n});\n\nlet entrySeq = 0;\nconst nextEntryId = () => {\n entrySeq += 1;\n return `attachment-${entrySeq}`;\n};\n\nexport const useAttachmentUpload = ({\n value,\n onChange,\n onError,\n maxSizeBytes,\n maxFiles = DEFAULT_MAX_ATTACHMENTS,\n accept = ACCEPTED_ATTACHMENT_TYPES,\n}: UseAttachmentUploadOptions) => {\n const [entries, setEntries] = useState<Entry[]>([]);\n\n const fileInputRef = useRef<HTMLInputElement>(null);\n const uploadersRef = useRef(new Map<string, S3Upload>());\n // Bumped per attempt so a superseded upload can't write state for a restarted entry.\n const sessionsRef = useRef(new Map<string, number>());\n // Mutations are driven from async upload callbacks, so the latest list lives in a ref.\n const entriesRef = useRef<Entry[]>([]);\n const onChangeRef = useRef(onChange);\n const onErrorRef = useRef(onError);\n\n onChangeRef.current = onChange;\n onErrorRef.current = onError;\n\n // What we last handed the parent. A `value` that still matches it is our own change echoing\n // back; anything else is a parent-driven reset we must adopt.\n const emittedRef = useRef<UploadedAttachment[]>([]);\n\n const commit = useCallback((updater: (prev: Entry[]) => Entry[]) => {\n const next = updater(entriesRef.current);\n entriesRef.current = next;\n setEntries(next);\n emittedRef.current = getUploaded(next);\n onChangeRef.current(emittedRef.current);\n }, []);\n\n const patchEntry = useCallback(\n (id: string, patch: Partial<Entry>) =>\n commit(prev => prev.map(entry => (entry.id === id ? { ...entry, ...patch } : entry))),\n [commit]\n );\n\n const abortUpload = useCallback((id: string) => {\n uploadersRef.current.get(id)?.abortUpload();\n uploadersRef.current.delete(id);\n // Bump, never delete: deleting would let the next attempt reuse session 1, so a callback\n // still in flight from the aborted attempt would pass `isCurrent` and clobber it.\n sessionsRef.current.set(id, (sessionsRef.current.get(id) ?? 0) + 1);\n }, []);\n\n const releasePreview = useCallback((entry?: Entry) => {\n if (entry?.previewUrl) URL.revokeObjectURL(entry.previewUrl);\n }, []);\n\n // The banner is shared by every tile, so recompute it rather than clear it — one file\n // succeeding must not hide a sibling that is still failing.\n const syncError = useCallback(() => {\n onErrorRef.current?.(entriesRef.current.find(entry => entry.error)?.error ?? null);\n }, []);\n\n useEffect(\n () => () => {\n uploadersRef.current.forEach(uploader => uploader.abortUpload());\n uploadersRef.current.clear();\n entriesRef.current.forEach(entry => {\n if (entry.previewUrl) URL.revokeObjectURL(entry.previewUrl);\n });\n },\n []\n );\n\n const startUpload = useCallback(\n (id: string, file: File) => {\n const session = (sessionsRef.current.get(id) ?? 0) + 1;\n sessionsRef.current.set(id, session);\n // A superseded upload must not write state for an entry that is gone or restarted.\n const isCurrent = () => sessionsRef.current.get(id) === session;\n\n const fail = (message: string) => {\n if (!isCurrent()) return;\n patchEntry(id, { isUploading: false, error: message });\n onErrorRef.current?.(message);\n };\n\n let storedKey = '';\n\n const uploader = new S3Upload({\n files: [file],\n preprocess: (target: File, next: (file: File) => void) => next(target),\n onProgress: () => {},\n getSignedUrl: async (\n target: File,\n callback: (data: { signedUrl: string; [key: string]: unknown }) => void\n ) => {\n try {\n const data = await getS3SignedUrl(target.name, target.type);\n storedKey = data.file_name;\n callback({ ...data, signedUrl: data.signed_url });\n } catch (e) {\n fail((e as Error)?.message || 'Failed to upload the file');\n }\n },\n onFinishS3Put: async () => {\n try {\n const url = await getSignedLink(storedKey);\n if (!isCurrent()) return;\n\n uploadersRef.current.delete(id);\n patchEntry(id, {\n isUploading: false,\n error: null,\n uploaded: { url, name: storedKey, size: file.size },\n });\n syncError();\n } catch (e) {\n fail((e as Error)?.message || 'Failed to upload the file');\n }\n },\n onError: (message: string) => fail(message || 'Failed to upload the file'),\n });\n\n uploadersRef.current.set(id, uploader);\n },\n [patchEntry, syncError]\n );\n\n /** Nothing is uploaded: a comment attachment is a url, so the link itself is the attachment. */\n const addLinkedImage = useCallback(\n (url: string) => {\n const name = getUrlFileName(url);\n\n if (!name) return;\n if (entriesRef.current.length >= maxFiles) {\n onErrorRef.current?.(`You can attach up to ${maxFiles} files.`);\n\n return;\n }\n\n if (entriesRef.current.some(entry => entry.uploaded?.url === url)) return;\n\n commit(prev => [\n ...prev,\n {\n id: nextEntryId(),\n name,\n file: null,\n previewUrl: url,\n isUploading: false,\n error: null,\n uploaded: { url, name },\n },\n ]);\n },\n [commit, maxFiles]\n );\n\n /** Attaches files already in S3 (e.g. Wellhub picks): nothing to upload, the key is signed. */\n const addStoredFiles = useCallback(\n async (files: { fileName: string; size?: number }[]) => {\n const fresh = files.filter(\n (file, index, list) =>\n !entriesRef.current.some(entry => entry.uploaded?.name === file.fileName) &&\n list.findIndex(other => other.fileName === file.fileName) === index\n );\n if (!fresh.length) return;\n\n const room = maxFiles - entriesRef.current.length;\n if (room <= 0) {\n onErrorRef.current?.(`You can attach up to ${maxFiles} files.`);\n\n return;\n }\n\n const accepted = fresh.slice(0, room);\n const signed = await Promise.all(\n accepted.map(file =>\n getSignedLink(file.fileName)\n .then(url => ({ url, name: file.fileName, size: file.size }))\n .catch(() => null)\n )\n );\n const attachments = signed.filter(Boolean) as UploadedAttachment[];\n\n // Files may have been dropped in while the keys were signing, so re-check the room.\n let added = 0;\n if (attachments.length) {\n commit(prev => {\n const fitting = attachments.slice(0, Math.max(maxFiles - prev.length, 0));\n added = fitting.length;\n\n return [\n ...prev,\n ...fitting.map(attachment => ({ ...toStoredEntry(attachment), id: nextEntryId() })),\n ];\n });\n }\n\n const failed = signed.length - attachments.length;\n const overflow = fresh.length > accepted.length || added < attachments.length;\n onErrorRef.current?.(\n (failed &&\n `Could not attach ${failed === 1 ? 'a file' : `${failed} files`} from Wellhub.`) ||\n (overflow && `You can attach up to ${maxFiles} files.`) ||\n entriesRef.current.find(entry => entry.error)?.error ||\n null\n );\n },\n [commit, maxFiles]\n );\n\n const addFiles = useCallback(\n (files: File[]) => {\n const supported = files.filter(file => isAcceptedType(file, accept));\n const skipped = supported.length < files.length;\n // One banner, one message: report the most actionable reason once, at the end. Reporting\n // as we go would let a later call overwrite an earlier warning on a mixed drop.\n const unsupported = skipped\n ? (files.length === 1 && 'That file type is not supported.') ||\n 'Some files were skipped — unsupported file type.'\n : null;\n const tooMany = `You can attach up to ${maxFiles} files.`;\n\n const room = maxFiles - entriesRef.current.length;\n if (!supported.length || room <= 0) {\n onErrorRef.current?.(supported.length ? tooMany : unsupported);\n return;\n }\n\n const accepted = supported.slice(0, room);\n const added: Entry[] = accepted.map(file => {\n const kind = getFileKind(file);\n const isTooLarge = !!maxSizeBytes && file.size > maxSizeBytes;\n\n return {\n id: nextEntryId(),\n name: file.name,\n file,\n previewUrl: kind === 'file' ? '' : URL.createObjectURL(file),\n isUploading: !isTooLarge,\n error: isTooLarge\n ? `File is too large (${formatMb(file.size)} MB). Maximum size is ${formatMb(\n maxSizeBytes as number\n )} MB.`\n : null,\n uploaded: null,\n };\n });\n\n commit(prev => [...prev, ...added]);\n\n const overflow = supported.length > accepted.length ? tooMany : null;\n onErrorRef.current?.(\n entriesRef.current.find(entry => entry.error)?.error ?? unsupported ?? overflow\n );\n\n added\n .filter(entry => !entry.error)\n .forEach(entry => startUpload(entry.id, entry.file as File));\n },\n [commit, maxFiles, maxSizeBytes, startUpload, accept]\n );\n\n const handleFileSelect = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n const files = Array.from(event.target.files ?? []);\n // Reset the input so re-picking the same file still fires a change event.\n if (fileInputRef.current) fileInputRef.current.value = '';\n if (files.length) addFiles(files);\n },\n [addFiles]\n );\n\n const openFileDialog = useCallback(() => fileInputRef.current?.click(), []);\n\n const removeAttachment = useCallback(\n (id: AttachmentPreviewItem['id']) => {\n const key = String(id);\n abortUpload(key);\n releasePreview(entriesRef.current.find(entry => entry.id === key));\n commit(prev => prev.filter(entry => entry.id !== key));\n syncError();\n },\n [abortUpload, releasePreview, commit, syncError]\n );\n\n const handleRetry = useCallback(\n (id: AttachmentPreviewItem['id']) => {\n const key = String(id);\n const entry = entriesRef.current.find(item => item.id === key);\n if (!entry?.file) return;\n\n abortUpload(key);\n patchEntry(key, { isUploading: true, error: null });\n syncError();\n startUpload(key, entry.file);\n },\n [abortUpload, patchEntry, startUpload, syncError]\n );\n\n const reorderAttachments = useCallback(\n (orderedIds: AttachmentPreviewItem['id'][]) =>\n commit(prev => {\n const byId = new Map(prev.map(entry => [entry.id, entry]));\n const reordered = orderedIds.map(id => byId.get(String(id))).filter(Boolean) as Entry[];\n // Unlisted ids (a race with a removal) keep their place at the end.\n const missing = prev.filter(entry => !orderedIds.some(id => String(id) === entry.id));\n return [...reordered, ...missing];\n }),\n [commit]\n );\n\n const clearAttachments = useCallback(() => {\n entriesRef.current.forEach(entry => {\n abortUpload(entry.id);\n releasePreview(entry);\n });\n commit(() => []);\n onErrorRef.current?.(null);\n }, [abortUpload, commit, releasePreview]);\n\n // Adopt a value we didn't produce — an edit form's initial attachments, or a parent-side reset.\n // Compared against what we emitted, not against the current entries: a failed-only or\n // mid-upload list emits `[]` too, and treating that as \"in sync\" would strand those tiles\n // on screen and let a late upload write itself back into freshly reset parent state.\n useEffect(() => {\n if (isSameList(emittedRef.current, value)) return;\n\n entriesRef.current.forEach(entry => {\n abortUpload(entry.id);\n if (entry.previewUrl) URL.revokeObjectURL(entry.previewUrl);\n });\n entriesRef.current = value.map(toStoredEntry);\n emittedRef.current = value;\n setEntries(entriesRef.current);\n onErrorRef.current?.(null);\n }, [value, abortUpload]);\n\n // A stored url has expired by now, so re-sign it for the preview.\n const [storedSrcs, setStoredSrcs] = useState<Record<string, string>>(() =>\n value.reduce<Record<string, string>>((acc, attachment) => {\n const src = peekSignedLink(attachment.name, 'inline');\n if (src) acc[attachment.name] = src;\n\n return acc;\n }, {})\n );\n const storedSrcsRef = useRef(storedSrcs);\n storedSrcsRef.current = storedSrcs;\n\n const storedNames = entries\n // A linked image carries its own url, so there is no key of ours to sign.\n .filter(entry => !entry.file && !entry.previewUrl && entry.uploaded)\n .map(entry => (entry.uploaded as UploadedAttachment).name)\n .join('|');\n\n useEffect(() => {\n const pending = storedNames.split('|').filter(name => name && !(name in storedSrcsRef.current));\n if (!pending.length) return undefined;\n\n let isActive = true;\n Promise.all(\n pending.map(name =>\n getSignedLink(name, 'inline')\n .then(url => [name, url] as const)\n .catch(error => {\n console.error(`Failed to sign stored attachment \"${name}\"`, error);\n\n return [name, ''] as const;\n })\n )\n ).then(resolved => {\n if (isActive) setStoredSrcs(prev => ({ ...prev, ...Object.fromEntries(resolved) }));\n });\n\n return () => {\n isActive = false;\n };\n }, [storedNames]);\n\n const items = entries.reduce<AttachmentPreviewItem[]>((acc, entry) => {\n if (entry.file) {\n acc.push({\n id: entry.id,\n name: entry.name,\n src: entry.previewUrl,\n kind: getFileKind(entry.file),\n size: entry.file.size,\n isUploading: entry.isUploading,\n hideDownload: true,\n error: entry.error ?? undefined,\n });\n return acc;\n }\n\n const stored = entry.uploaded as UploadedAttachment;\n const kind = getAttachmentKind(stored);\n // A linked image is already a url; only one of ours has an S3 key worth signing.\n const src = entry.previewUrl || storedSrcs[stored.name];\n // A thumbnail without its signed url would paint as a broken image, so hold it back.\n if (kind !== 'file' && !src) return acc;\n\n acc.push({ id: entry.id, name: stored.name, src, kind, size: stored.size, hideDownload: true });\n return acc;\n }, []);\n\n return {\n items,\n fileInputRef,\n openFileDialog,\n handleFileSelect,\n addFiles,\n addLinkedImage,\n addStoredFiles,\n removeAttachment,\n handleRetry,\n reorderAttachments,\n clearAttachments,\n isUploading: entries.some(entry => entry.isUploading),\n error: entries.find(entry => entry.error)?.error ?? null,\n count: entries.length,\n isFull: entries.length >= maxFiles,\n maxFiles,\n };\n};\n"],"names":["getFileKind","file","type","startsWith","formatMb","bytes","toFixed","toStoredEntry","attachment","id","url","name","previewUrl","isUploading","error","uploaded","entrySeq","nextEntryId","concat","_ref","_entries$find$error","_entries$find","value","onChange","onError","maxSizeBytes","_ref$maxFiles","maxFiles","_ref$accept","accept","ACCEPTED_ATTACHMENT_TYPES","useState","_useState2","_slicedToArray","_useState","entries","setEntries","fileInputRef","useRef","uploadersRef","Map","sessionsRef","entriesRef","onChangeRef","onErrorRef","current","emittedRef","commit","useCallback","updater","next","map","entry","filter","Boolean","getUploaded","patchEntry","patch","prev","abortUpload","_uploadersRef$current","_sessionsRef$current$","get","delete","set","releasePreview","URL","revokeObjectURL","syncError","_onErrorRef$current","_entriesRef$current$f","_entriesRef$current$f2","find","useEffect","forEach","uploader","clear","startUpload","_sessionsRef$current$2","session","_onFinishS3Put","_getSignedUrl","isCurrent","fail","message","_onErrorRef$current2","storedKey","S3Upload","files","preprocess","target","onProgress","getSignedUrl","_asyncToGenerator","_regeneratorRuntime","mark","_callee","callback","_data","wrap","_context","getS3SignedUrl","data","sent","file_name","signedUrl","signed_url","t0","stop","_x","_x2","apply","this","arguments","onFinishS3Put","_callee2","_context2","getSignedLink","abrupt","size","addLinkedImage","_onErrorRef$current3","getUrlFileName","length","some","_entry$uploaded","_toConsumableArray","addStoredFiles","_ref2","_onErrorRef$current5","_entriesRef$current$f3","fresh","room","_onErrorRef$current4","accepted","signed","attachments","added","failed","overflow","_context3","index","list","_entry$uploaded2","fileName","findIndex","other","slice","Promise","all","then","catch","fitting","Math","max","_callee3","_x3","addFiles","_onErrorRef$current7","_ref3","_entriesRef$current$f4","_entriesRef$current$f5","supported","split","rule","trim","toLowerCase","endsWith","getAttachmentKind","isAcceptedType","unsupported","tooMany","_onErrorRef$current6","kind","isTooLarge","createObjectURL","handleFileSelect","event","_event$target$files","Array","from","openFileDialog","_fileInputRef$current","click","removeAttachment","key","String","handleRetry","item","reorderAttachments","orderedIds","byId","reordered","missing","clearAttachments","_onErrorRef$current8","_onErrorRef$current9","a","b","every","_useState3","reduce","acc","src","peekSignedLink","_useState4","storedSrcs","setStoredSrcs","storedSrcsRef","storedNames","join","pending","isActive","console","resolved","_objectSpread","Object","fromEntries","items","_entry$error","push","hideDownload","undefined","stored","count","isFull"],"mappings":"8xCA0CO,IAoBDA,EAAc,SAACC,GACnB,OAAIA,EAAKC,KAAKC,WAAW,UAAkB,QACvCF,EAAKC,KAAKC,WAAW,UAAkB,QACpC,MACT,EAEMC,EAAW,SAACC,GAAa,OAAMA,EAAK,SAAkBC,QAAQ,EAAE,EAQhEC,EAAgB,SAACC,GAA8B,MAAa,CAChEC,GAAID,EAA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