@corva/ui 3.74.0-1 → 3.74.0-10

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 (646) hide show
  1. package/cjs-bundle/components/AddComment/Popover.js +1 -1
  2. package/cjs-bundle/components/AddComment/Popover.js.map +1 -1
  3. package/cjs-bundle/components/AddComment/components/Content.js +1 -1
  4. package/cjs-bundle/components/AddComment/components/Content.js.map +1 -1
  5. package/cjs-bundle/components/AttachmentLightbox/AttachmentDocument.js +2 -0
  6. package/cjs-bundle/components/AttachmentLightbox/AttachmentDocument.js.map +1 -0
  7. package/cjs-bundle/components/AttachmentLightbox/AttachmentLightbox.js +1 -1
  8. package/cjs-bundle/components/AttachmentLightbox/AttachmentLightbox.js.map +1 -1
  9. package/cjs-bundle/components/AttachmentLightbox/AttachmentLightbox.scss.js +1 -1
  10. package/cjs-bundle/components/AttachmentLightbox/AttachmentPreviewPane.js +2 -0
  11. package/cjs-bundle/components/AttachmentLightbox/AttachmentPreviewPane.js.map +1 -0
  12. package/cjs-bundle/components/AttachmentLightbox/copyImageToClipboard.js +2 -0
  13. package/cjs-bundle/components/AttachmentLightbox/copyImageToClipboard.js.map +1 -0
  14. package/cjs-bundle/components/AttachmentLightbox/downloadAttachment.js +2 -0
  15. package/cjs-bundle/components/AttachmentLightbox/downloadAttachment.js.map +1 -0
  16. package/cjs-bundle/components/AttachmentLightbox/useAttachmentLightbox.js +1 -1
  17. package/cjs-bundle/components/AttachmentLightbox/useAttachmentLightbox.js.map +1 -1
  18. package/cjs-bundle/components/AttachmentLightbox/useZoomPan.js +2 -0
  19. package/cjs-bundle/components/AttachmentLightbox/useZoomPan.js.map +1 -0
  20. package/cjs-bundle/components/AttachmentPreview/AttachmentActionsMenu.js +2 -0
  21. package/cjs-bundle/components/AttachmentPreview/AttachmentActionsMenu.js.map +1 -0
  22. package/cjs-bundle/components/AttachmentPreview/AttachmentDownloadLink.js +2 -0
  23. package/cjs-bundle/components/AttachmentPreview/AttachmentDownloadLink.js.map +1 -0
  24. package/cjs-bundle/components/AttachmentPreview/AttachmentImage.js +2 -0
  25. package/cjs-bundle/components/AttachmentPreview/AttachmentImage.js.map +1 -0
  26. package/cjs-bundle/components/AttachmentPreview/AttachmentPreview.js +1 -1
  27. package/cjs-bundle/components/AttachmentPreview/AttachmentPreview.js.map +1 -1
  28. package/cjs-bundle/components/AttachmentPreview/AttachmentPreview.scss.js +1 -1
  29. package/cjs-bundle/components/AttachmentPreview/AttachmentRow.js +1 -1
  30. package/cjs-bundle/components/AttachmentPreview/AttachmentRow.js.map +1 -1
  31. package/cjs-bundle/components/AttachmentPreview/AttachmentTile.js +1 -1
  32. package/cjs-bundle/components/AttachmentPreview/AttachmentTile.js.map +1 -1
  33. package/cjs-bundle/components/AttachmentPreview/useStoredAttachment.js +2 -0
  34. package/cjs-bundle/components/AttachmentPreview/useStoredAttachment.js.map +1 -0
  35. package/cjs-bundle/components/AttachmentPreview/useStoredAttachments.js +1 -1
  36. package/cjs-bundle/components/AttachmentPreview/useStoredAttachments.js.map +1 -1
  37. package/cjs-bundle/components/BICOffsetPickerDialog/index.js +1 -1
  38. package/cjs-bundle/components/BICOffsetPickerDialog/index.js.map +1 -1
  39. package/cjs-bundle/components/Casing/CasingTableV2/components/CasingJoints/Editor.js +1 -1
  40. package/cjs-bundle/components/Casing/CasingTableV2/components/CasingJoints/Editor.js.map +1 -1
  41. package/cjs-bundle/components/Casing/CasingTableV2/components/Component.js +1 -1
  42. package/cjs-bundle/components/Casing/CasingTableV2/components/Component.js.map +1 -1
  43. package/cjs-bundle/components/Casing/CasingTableV2/components/DrillPipe/Editor.js +1 -1
  44. package/cjs-bundle/components/Casing/CasingTableV2/components/DrillPipe/Editor.js.map +1 -1
  45. package/cjs-bundle/components/CollapsableSidebar.js +1 -1
  46. package/cjs-bundle/components/CollapsableSidebar.js.map +1 -1
  47. package/cjs-bundle/components/CommentCard/CommentCard.js +1 -1
  48. package/cjs-bundle/components/CommentCard/CommentCard.js.map +1 -1
  49. package/cjs-bundle/components/CommentCard/CommentCardReactions.js +1 -1
  50. package/cjs-bundle/components/CommentCard/CommentCardReactions.js.map +1 -1
  51. package/cjs-bundle/components/CommentCard/CommentMenu.js +1 -1
  52. package/cjs-bundle/components/CommentCard/CommentMenu.js.map +1 -1
  53. package/cjs-bundle/components/CommentComposer/CommentComposer.js +1 -1
  54. package/cjs-bundle/components/CommentComposer/CommentComposer.js.map +1 -1
  55. package/cjs-bundle/components/CommentComposer/CommentReplyInput.js +1 -1
  56. package/cjs-bundle/components/CommentComposer/CommentReplyInput.js.map +1 -1
  57. package/cjs-bundle/components/CommentComposer/ShareToChatRow.js +1 -1
  58. package/cjs-bundle/components/CommentComposer/ShareToChatRow.js.map +1 -1
  59. package/cjs-bundle/components/CommentComposer/useAttachmentUpload.js +1 -1
  60. package/cjs-bundle/components/CommentComposer/useAttachmentUpload.js.map +1 -1
  61. package/cjs-bundle/components/CommentInputNext/CommentInputNext.js +1 -1
  62. package/cjs-bundle/components/CommentInputNext/CommentInputNext.js.map +1 -1
  63. package/cjs-bundle/components/CommentInputNext/useFilePaste.js +2 -0
  64. package/cjs-bundle/components/CommentInputNext/useFilePaste.js.map +1 -0
  65. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js +1 -1
  66. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js.map +1 -1
  67. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.js +1 -1
  68. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.js.map +1 -1
  69. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js +1 -1
  70. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js.map +1 -1
  71. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.js +1 -1
  72. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.js.map +1 -1
  73. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/effects/useAppMaximized.js +1 -1
  74. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/effects/useAppMaximized.js.map +1 -1
  75. package/cjs-bundle/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js +1 -1
  76. package/cjs-bundle/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js.map +1 -1
  77. package/cjs-bundle/components/DevCenter/IsolatedDevCenterAppContainer/useFullscreenModes.js +2 -0
  78. package/cjs-bundle/components/DevCenter/IsolatedDevCenterAppContainer/useFullscreenModes.js.map +1 -0
  79. package/cjs-bundle/components/DocumentViewer/DocumentViewer.js +1 -1
  80. package/cjs-bundle/components/DocumentViewer/DocumentViewer.js.map +1 -1
  81. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js +1 -1
  82. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js.map +1 -1
  83. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js +1 -1
  84. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js.map +1 -1
  85. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Component.js +1 -1
  86. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Component.js.map +1 -1
  87. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js +1 -1
  88. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js.map +1 -1
  89. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js +1 -1
  90. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js.map +1 -1
  91. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js +1 -1
  92. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js.map +1 -1
  93. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js +1 -1
  94. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js.map +1 -1
  95. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js +1 -1
  96. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js.map +1 -1
  97. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js +1 -1
  98. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js.map +1 -1
  99. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js +1 -1
  100. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js.map +1 -1
  101. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js +1 -1
  102. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js.map +1 -1
  103. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js +1 -1
  104. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js.map +1 -1
  105. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js +1 -1
  106. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js.map +1 -1
  107. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js +1 -1
  108. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js.map +1 -1
  109. package/cjs-bundle/components/FeedItem/FeedItem.js +1 -1
  110. package/cjs-bundle/components/FeedItem/FeedItem.js.map +1 -1
  111. package/cjs-bundle/components/FeedItem/components/FeedComments.js +1 -1
  112. package/cjs-bundle/components/FeedItem/components/FeedComments.js.map +1 -1
  113. package/cjs-bundle/components/LinkedText/LinkedText.js +2 -0
  114. package/cjs-bundle/components/LinkedText/LinkedText.js.map +1 -0
  115. package/cjs-bundle/components/LinkedText/LinkedText.scss.js +2 -0
  116. package/cjs-bundle/components/LinkedText/LinkedText.scss.js.map +1 -0
  117. package/cjs-bundle/components/NewDocumentViewer/utils.js +1 -1
  118. package/cjs-bundle/components/NewDocumentViewer/utils.js.map +1 -1
  119. package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js +1 -1
  120. package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js.map +1 -1
  121. package/cjs-bundle/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js +1 -1
  122. package/cjs-bundle/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js.map +1 -1
  123. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js +1 -1
  124. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js.map +1 -1
  125. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/index.js +1 -1
  126. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/index.js.map +1 -1
  127. package/cjs-bundle/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js +1 -1
  128. package/cjs-bundle/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js.map +1 -1
  129. package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js +1 -1
  130. package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js.map +1 -1
  131. package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/index.js +1 -1
  132. package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/index.js.map +1 -1
  133. package/cjs-bundle/components/OffsetWellPickerV3/components/WellHubView/index.js +1 -1
  134. package/cjs-bundle/components/OffsetWellPickerV3/components/WellHubView/index.js.map +1 -1
  135. package/cjs-bundle/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js +1 -1
  136. package/cjs-bundle/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js.map +1 -1
  137. package/cjs-bundle/components/OffsetWellPickerV5/components/AppHeader/components/HeaderActions/HeaderActions.js +1 -1
  138. package/cjs-bundle/components/OffsetWellPickerV5/components/AppHeader/components/HeaderActions/HeaderActions.js.map +1 -1
  139. package/cjs-bundle/components/OffsetWellPickerV5/components/AppHeader/components/LoadAllWellsToggle/LoadAllWellsToggle.js +1 -1
  140. package/cjs-bundle/components/OffsetWellPickerV5/components/AppHeader/components/LoadAllWellsToggle/LoadAllWellsToggle.js.map +1 -1
  141. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/Filter.js +1 -1
  142. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/Filter.js.map +1 -1
  143. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js +1 -1
  144. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js.map +1 -1
  145. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/PeriodFilterSelect/PeriodFilterSelect.js +1 -1
  146. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/PeriodFilterSelect/PeriodFilterSelect.js.map +1 -1
  147. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/SingleFilterSelect/SingleFilterSelect.js +1 -1
  148. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/SingleFilterSelect/SingleFilterSelect.js.map +1 -1
  149. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/ClusterTooltip/ClusterTooltip.js +1 -1
  150. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/ClusterTooltip/ClusterTooltip.js.map +1 -1
  151. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/LayerSwitcher/LayerSwitcher.js +1 -1
  152. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/LayerSwitcher/LayerSwitcher.js.map +1 -1
  153. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapControls/MapControls.js +1 -1
  154. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapControls/MapControls.js.map +1 -1
  155. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapHints/MapHintsStash.js +1 -1
  156. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapHints/MapHintsStash.js.map +1 -1
  157. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/SubjectWellMarker/SubjectWellMarker.js +1 -1
  158. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/SubjectWellMarker/SubjectWellMarker.js.map +1 -1
  159. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js +1 -1
  160. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js.map +1 -1
  161. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AssetResultSection/AssetResultSection.js +1 -1
  162. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AssetResultSection/AssetResultSection.js.map +1 -1
  163. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AutoCompleteAssetSearch/AutoCompleteAssetSearch.js +1 -1
  164. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AutoCompleteAssetSearch/AutoCompleteAssetSearch.js.map +1 -1
  165. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/CompanyCell/CompanyCell.js +1 -1
  166. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/CompanyCell/CompanyCell.js.map +1 -1
  167. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/FormationCell/FormationCell.js +1 -1
  168. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/FormationCell/FormationCell.js.map +1 -1
  169. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/InterventionAssetCell/InterventionAssetCell.js +1 -1
  170. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/InterventionAssetCell/InterventionAssetCell.js.map +1 -1
  171. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/PadNameCell/PadNameCell.js +1 -1
  172. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/PadNameCell/PadNameCell.js.map +1 -1
  173. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/RigCell/RigCell.js +1 -1
  174. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/RigCell/RigCell.js.map +1 -1
  175. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/WellNameCell/WellNameCell.js +1 -1
  176. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/WellNameCell/WellNameCell.js.map +1 -1
  177. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/SettingsMenu.js +1 -1
  178. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/SettingsMenu.js.map +1 -1
  179. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/MetricsSettingsSection/MetricsSettingsSection.js +1 -1
  180. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/MetricsSettingsSection/MetricsSettingsSection.js.map +1 -1
  181. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/TableSettingsSection/TableSettingsSection.js +1 -1
  182. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/TableSettingsSection/TableSettingsSection.js.map +1 -1
  183. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/WellNameHeaderCell/WellNameHeaderCell.js +1 -1
  184. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/WellNameHeaderCell/WellNameHeaderCell.js.map +1 -1
  185. package/cjs-bundle/components/OffsetWellPickerV5/components/PickerModalActions/PickerModalActions.js +1 -1
  186. package/cjs-bundle/components/OffsetWellPickerV5/components/PickerModalActions/PickerModalActions.js.map +1 -1
  187. package/cjs-bundle/components/PadOffsetsPicker/StagesSelector.js +1 -1
  188. package/cjs-bundle/components/PadOffsetsPicker/StagesSelector.js.map +1 -1
  189. package/cjs-bundle/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js +1 -1
  190. package/cjs-bundle/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js.map +1 -1
  191. package/cjs-bundle/components/Popover/Popover.js +1 -1
  192. package/cjs-bundle/components/Popover/Popover.js.map +1 -1
  193. package/cjs-bundle/components/Popper/Popper.js +1 -1
  194. package/cjs-bundle/components/Popper/Popper.js.map +1 -1
  195. package/cjs-bundle/components/RealTimeValuesSidebar/SidebarFooter.js +1 -1
  196. package/cjs-bundle/components/RealTimeValuesSidebar/SidebarFooter.js.map +1 -1
  197. package/cjs-bundle/components/UserMention/constants.js +1 -1
  198. package/cjs-bundle/components/UserMention/constants.js.map +1 -1
  199. package/cjs-bundle/components/UserMention/index.js +1 -1
  200. package/cjs-bundle/components/UserMention/index.js.map +1 -1
  201. package/cjs-bundle/components/index.js +1 -1
  202. package/cjs-bundle/componentsV2/AppCommonsProvider/AppCommonsContext.js.map +1 -1
  203. package/cjs-bundle/componentsV2/AppCommonsProvider/utils.js +1 -1
  204. package/cjs-bundle/componentsV2/AppCommonsProvider/utils.js.map +1 -1
  205. package/cjs-bundle/componentsV2/AppHeader/V3/Actions/Actions.constants.js +1 -1
  206. package/cjs-bundle/componentsV2/AppHeader/V3/Actions/Actions.constants.js.map +1 -1
  207. package/cjs-bundle/componentsV2/AppHeader/V3/Actions/Actions.js +1 -1
  208. package/cjs-bundle/componentsV2/AppHeader/V3/Actions/Actions.js.map +1 -1
  209. package/cjs-bundle/componentsV2/AppHeader/V3/AppHeaderV3.js +1 -1
  210. package/cjs-bundle/componentsV2/AppHeader/V3/AppHeaderV3.js.map +1 -1
  211. package/cjs-bundle/componentsV2/ButtonIcon/ButtonIcon.js +1 -1
  212. package/cjs-bundle/componentsV2/ButtonIcon/ButtonIcon.js.map +1 -1
  213. package/cjs-bundle/componentsV2/ButtonIcon/ButtonIcon.scss.js +1 -1
  214. package/cjs-bundle/componentsV2/Chip/Chip.js +1 -1
  215. package/cjs-bundle/componentsV2/Chip/Chip.js.map +1 -1
  216. package/cjs-bundle/componentsV2/ColorPicker/ColorPicker.js +1 -1
  217. package/cjs-bundle/componentsV2/ColorPicker/ColorPicker.js.map +1 -1
  218. package/cjs-bundle/componentsV2/ColorPicker/ColorPicker.scss.js +1 -1
  219. package/cjs-bundle/componentsV2/ColorPicker/OpacityDragtracker/OpacityDragtracker.js +1 -1
  220. package/cjs-bundle/componentsV2/ColorPicker/OpacityDragtracker/OpacityDragtracker.js.map +1 -1
  221. package/cjs-bundle/componentsV2/ColorPicker/Swatches/Swatches.scss.js +1 -1
  222. package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/Map/Map.js +1 -1
  223. package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/Map/Map.js.map +1 -1
  224. package/cjs-bundle/componentsV2/InterventionEventSelector/InterventionEventSelector.js +2 -0
  225. package/cjs-bundle/componentsV2/InterventionEventSelector/InterventionEventSelector.js.map +1 -0
  226. package/cjs-bundle/componentsV2/InterventionEventSelector/InterventionEventSelector.scss.js +2 -0
  227. package/cjs-bundle/componentsV2/InterventionEventSelector/InterventionEventSelector.scss.js.map +1 -0
  228. package/cjs-bundle/componentsV2/InterventionEventSelector/useInterventionUnitEvents.js +2 -0
  229. package/cjs-bundle/componentsV2/InterventionEventSelector/useInterventionUnitEvents.js.map +1 -0
  230. package/cjs-bundle/componentsV2/InterventionEventSelector/utils.js +2 -0
  231. package/cjs-bundle/componentsV2/InterventionEventSelector/utils.js.map +1 -0
  232. package/cjs-bundle/componentsV2/Modal/Modal.js +1 -1
  233. package/cjs-bundle/componentsV2/Modal/Modal.js.map +1 -1
  234. package/cjs-bundle/componentsV2/Modal/constants.js +2 -0
  235. package/cjs-bundle/componentsV2/Modal/constants.js.map +1 -0
  236. package/cjs-bundle/componentsV2/WellArchivedMessage/WellArchivedMessage.js +1 -1
  237. package/cjs-bundle/componentsV2/WellArchivedMessage/WellArchivedMessage.js.map +1 -1
  238. package/cjs-bundle/componentsV2/index.js +1 -1
  239. package/cjs-bundle/effects/useOutsideClick.js +1 -1
  240. package/cjs-bundle/effects/useOutsideClick.js.map +1 -1
  241. package/cjs-bundle/testing/AppTestWrapper/AppTestWrapper.js +1 -1
  242. package/cjs-bundle/testing/AppTestWrapper/AppTestWrapper.js.map +1 -1
  243. package/cjs-bundle/utils/devcenter.js +1 -1
  244. package/cjs-bundle/utils/devcenter.js.map +1 -1
  245. package/cjs-bundle/utils/fetchAttachment.js +2 -0
  246. package/cjs-bundle/utils/fetchAttachment.js.map +1 -0
  247. package/cjs-bundle/utils/fileExtension.js +1 -1
  248. package/cjs-bundle/utils/fileExtension.js.map +1 -1
  249. package/cjs-bundle/utils/links.js +2 -0
  250. package/cjs-bundle/utils/links.js.map +1 -0
  251. package/components/AddComment/Popover.js +1 -1
  252. package/components/AddComment/Popover.js.map +1 -1
  253. package/components/AddComment/components/Content.js +1 -1
  254. package/components/AddComment/components/Content.js.map +1 -1
  255. package/components/AttachmentLightbox/AttachmentDocument.d.ts +6 -0
  256. package/components/AttachmentLightbox/AttachmentDocument.d.ts.map +1 -0
  257. package/components/AttachmentLightbox/AttachmentDocument.js +2 -0
  258. package/components/AttachmentLightbox/AttachmentDocument.js.map +1 -0
  259. package/components/AttachmentLightbox/AttachmentLightbox.d.ts +9 -8
  260. package/components/AttachmentLightbox/AttachmentLightbox.d.ts.map +1 -1
  261. package/components/AttachmentLightbox/AttachmentLightbox.js +1 -1
  262. package/components/AttachmentLightbox/AttachmentLightbox.js.map +1 -1
  263. package/components/AttachmentLightbox/AttachmentLightbox.scss.js +1 -1
  264. package/components/AttachmentLightbox/AttachmentPreviewPane.d.ts +9 -0
  265. package/components/AttachmentLightbox/AttachmentPreviewPane.d.ts.map +1 -0
  266. package/components/AttachmentLightbox/AttachmentPreviewPane.js +2 -0
  267. package/components/AttachmentLightbox/AttachmentPreviewPane.js.map +1 -0
  268. package/components/AttachmentLightbox/__tests__/AttachmentDocument.test.d.ts +2 -0
  269. package/components/AttachmentLightbox/__tests__/AttachmentDocument.test.d.ts.map +1 -0
  270. package/components/AttachmentLightbox/__tests__/AttachmentLightbox.test.d.ts +2 -0
  271. package/components/AttachmentLightbox/__tests__/AttachmentLightbox.test.d.ts.map +1 -0
  272. package/components/AttachmentLightbox/__tests__/copyImageToClipboard.test.d.ts +2 -0
  273. package/components/AttachmentLightbox/__tests__/copyImageToClipboard.test.d.ts.map +1 -0
  274. package/components/AttachmentLightbox/__tests__/downloadAttachment.test.d.ts +2 -0
  275. package/components/AttachmentLightbox/__tests__/downloadAttachment.test.d.ts.map +1 -0
  276. package/components/AttachmentLightbox/__tests__/useZoomPan.test.d.ts +2 -0
  277. package/components/AttachmentLightbox/__tests__/useZoomPan.test.d.ts.map +1 -0
  278. package/components/AttachmentLightbox/copyImageToClipboard.d.ts +4 -0
  279. package/components/AttachmentLightbox/copyImageToClipboard.d.ts.map +1 -0
  280. package/components/AttachmentLightbox/copyImageToClipboard.js +2 -0
  281. package/components/AttachmentLightbox/copyImageToClipboard.js.map +1 -0
  282. package/components/AttachmentLightbox/downloadAttachment.d.ts +10 -0
  283. package/components/AttachmentLightbox/downloadAttachment.d.ts.map +1 -0
  284. package/components/AttachmentLightbox/downloadAttachment.js +2 -0
  285. package/components/AttachmentLightbox/downloadAttachment.js.map +1 -0
  286. package/components/AttachmentLightbox/useAttachmentLightbox.d.ts +6 -2
  287. package/components/AttachmentLightbox/useAttachmentLightbox.d.ts.map +1 -1
  288. package/components/AttachmentLightbox/useAttachmentLightbox.js +1 -1
  289. package/components/AttachmentLightbox/useAttachmentLightbox.js.map +1 -1
  290. package/components/AttachmentLightbox/useZoomPan.d.ts +29 -0
  291. package/components/AttachmentLightbox/useZoomPan.d.ts.map +1 -0
  292. package/components/AttachmentLightbox/useZoomPan.js +2 -0
  293. package/components/AttachmentLightbox/useZoomPan.js.map +1 -0
  294. package/components/AttachmentPreview/AttachmentActionsMenu.d.ts +16 -0
  295. package/components/AttachmentPreview/AttachmentActionsMenu.d.ts.map +1 -0
  296. package/components/AttachmentPreview/AttachmentActionsMenu.js +2 -0
  297. package/components/AttachmentPreview/AttachmentActionsMenu.js.map +1 -0
  298. package/components/AttachmentPreview/AttachmentDownloadLink.d.ts +11 -0
  299. package/components/AttachmentPreview/AttachmentDownloadLink.d.ts.map +1 -0
  300. package/components/AttachmentPreview/AttachmentDownloadLink.js +2 -0
  301. package/components/AttachmentPreview/AttachmentDownloadLink.js.map +1 -0
  302. package/components/AttachmentPreview/AttachmentImage.d.ts +12 -0
  303. package/components/AttachmentPreview/AttachmentImage.d.ts.map +1 -0
  304. package/components/AttachmentPreview/AttachmentImage.js +2 -0
  305. package/components/AttachmentPreview/AttachmentImage.js.map +1 -0
  306. package/components/AttachmentPreview/AttachmentPreview.d.ts.map +1 -1
  307. package/components/AttachmentPreview/AttachmentPreview.js +1 -1
  308. package/components/AttachmentPreview/AttachmentPreview.js.map +1 -1
  309. package/components/AttachmentPreview/AttachmentPreview.scss.js +1 -1
  310. package/components/AttachmentPreview/AttachmentPreview.types.d.ts +7 -0
  311. package/components/AttachmentPreview/AttachmentPreview.types.d.ts.map +1 -1
  312. package/components/AttachmentPreview/AttachmentRow.d.ts +7 -3
  313. package/components/AttachmentPreview/AttachmentRow.d.ts.map +1 -1
  314. package/components/AttachmentPreview/AttachmentRow.js +1 -1
  315. package/components/AttachmentPreview/AttachmentRow.js.map +1 -1
  316. package/components/AttachmentPreview/AttachmentTile.d.ts +5 -1
  317. package/components/AttachmentPreview/AttachmentTile.d.ts.map +1 -1
  318. package/components/AttachmentPreview/AttachmentTile.js +1 -1
  319. package/components/AttachmentPreview/AttachmentTile.js.map +1 -1
  320. package/components/AttachmentPreview/__tests__/AttachmentActionsMenu.test.d.ts +2 -0
  321. package/components/AttachmentPreview/__tests__/AttachmentActionsMenu.test.d.ts.map +1 -0
  322. package/components/AttachmentPreview/__tests__/AttachmentDownloadLink.test.d.ts +2 -0
  323. package/components/AttachmentPreview/__tests__/AttachmentDownloadLink.test.d.ts.map +1 -0
  324. package/components/AttachmentPreview/__tests__/AttachmentImage.test.d.ts +2 -0
  325. package/components/AttachmentPreview/__tests__/AttachmentImage.test.d.ts.map +1 -0
  326. package/components/AttachmentPreview/__tests__/AttachmentTile.test.d.ts +2 -0
  327. package/components/AttachmentPreview/__tests__/AttachmentTile.test.d.ts.map +1 -0
  328. package/components/AttachmentPreview/__tests__/useStoredAttachments.test.d.ts +2 -0
  329. package/components/AttachmentPreview/__tests__/useStoredAttachments.test.d.ts.map +1 -0
  330. package/components/AttachmentPreview/useStoredAttachment.d.ts +8 -0
  331. package/components/AttachmentPreview/useStoredAttachment.d.ts.map +1 -1
  332. package/components/AttachmentPreview/useStoredAttachment.js +2 -0
  333. package/components/AttachmentPreview/useStoredAttachment.js.map +1 -0
  334. package/components/AttachmentPreview/useStoredAttachments.d.ts +1 -1
  335. package/components/AttachmentPreview/useStoredAttachments.d.ts.map +1 -1
  336. package/components/AttachmentPreview/useStoredAttachments.js +1 -1
  337. package/components/AttachmentPreview/useStoredAttachments.js.map +1 -1
  338. package/components/BICOffsetPickerDialog/index.js +1 -1
  339. package/components/BICOffsetPickerDialog/index.js.map +1 -1
  340. package/components/Casing/CasingTableV2/components/CasingJoints/Editor.js +1 -1
  341. package/components/Casing/CasingTableV2/components/CasingJoints/Editor.js.map +1 -1
  342. package/components/Casing/CasingTableV2/components/Component.js +1 -1
  343. package/components/Casing/CasingTableV2/components/Component.js.map +1 -1
  344. package/components/Casing/CasingTableV2/components/DrillPipe/Editor.js +1 -1
  345. package/components/Casing/CasingTableV2/components/DrillPipe/Editor.js.map +1 -1
  346. package/components/CollapsableSidebar.js +1 -1
  347. package/components/CollapsableSidebar.js.map +1 -1
  348. package/components/CommentCard/CommentCard.d.ts.map +1 -1
  349. package/components/CommentCard/CommentCard.js +1 -1
  350. package/components/CommentCard/CommentCard.js.map +1 -1
  351. package/components/CommentCard/CommentCard.types.d.ts +2 -0
  352. package/components/CommentCard/CommentCard.types.d.ts.map +1 -1
  353. package/components/CommentCard/CommentCardReactions.js +1 -1
  354. package/components/CommentCard/CommentCardReactions.js.map +1 -1
  355. package/components/CommentCard/CommentMenu.d.ts.map +1 -1
  356. package/components/CommentCard/CommentMenu.js +1 -1
  357. package/components/CommentCard/CommentMenu.js.map +1 -1
  358. package/components/CommentComposer/CommentComposer.d.ts.map +1 -1
  359. package/components/CommentComposer/CommentComposer.js +1 -1
  360. package/components/CommentComposer/CommentComposer.js.map +1 -1
  361. package/components/CommentComposer/CommentReplyInput.d.ts.map +1 -1
  362. package/components/CommentComposer/CommentReplyInput.js +1 -1
  363. package/components/CommentComposer/CommentReplyInput.js.map +1 -1
  364. package/components/CommentComposer/ShareToChatRow.js +1 -1
  365. package/components/CommentComposer/ShareToChatRow.js.map +1 -1
  366. package/components/CommentComposer/__tests__/useAttachmentUpload.linked.test.d.ts +2 -0
  367. package/components/CommentComposer/__tests__/useAttachmentUpload.linked.test.d.ts.map +1 -0
  368. package/components/CommentComposer/useAttachmentUpload.d.ts +1 -0
  369. package/components/CommentComposer/useAttachmentUpload.d.ts.map +1 -1
  370. package/components/CommentComposer/useAttachmentUpload.js +1 -1
  371. package/components/CommentComposer/useAttachmentUpload.js.map +1 -1
  372. package/components/CommentInputNext/CommentInputNext.d.ts +2 -0
  373. package/components/CommentInputNext/CommentInputNext.d.ts.map +1 -1
  374. package/components/CommentInputNext/CommentInputNext.js +1 -1
  375. package/components/CommentInputNext/CommentInputNext.js.map +1 -1
  376. package/components/CommentInputNext/__tests__/useFilePaste.test.d.ts +2 -0
  377. package/components/CommentInputNext/__tests__/useFilePaste.test.d.ts.map +1 -0
  378. package/components/CommentInputNext/useFilePaste.d.ts +17 -0
  379. package/components/CommentInputNext/useFilePaste.d.ts.map +1 -0
  380. package/components/CommentInputNext/useFilePaste.js +2 -0
  381. package/components/CommentInputNext/useFilePaste.js.map +1 -0
  382. package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.d.ts +9 -1
  383. package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.d.ts.map +1 -1
  384. package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js +1 -1
  385. package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js.map +1 -1
  386. package/components/DevCenter/DevCenterAppContainer/__tests__/DevCenterAppContainer.registerAITools.test.d.ts +2 -0
  387. package/components/DevCenter/DevCenterAppContainer/__tests__/DevCenterAppContainer.registerAITools.test.d.ts.map +1 -0
  388. package/components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.js +1 -1
  389. package/components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.js.map +1 -1
  390. package/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js +1 -1
  391. package/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js.map +1 -1
  392. package/components/DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.js +1 -1
  393. package/components/DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.js.map +1 -1
  394. package/components/DevCenter/DevCenterAppContainer/effects/useAppMaximized.js +1 -1
  395. package/components/DevCenter/DevCenterAppContainer/effects/useAppMaximized.js.map +1 -1
  396. package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.d.ts.map +1 -1
  397. package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js +1 -1
  398. package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js.map +1 -1
  399. package/components/DevCenter/IsolatedDevCenterAppContainer/__tests__/useFullscreenModes.test.d.ts +2 -0
  400. package/components/DevCenter/IsolatedDevCenterAppContainer/__tests__/useFullscreenModes.test.d.ts.map +1 -0
  401. package/components/DevCenter/IsolatedDevCenterAppContainer/useFullscreenModes.d.ts +10 -0
  402. package/components/DevCenter/IsolatedDevCenterAppContainer/useFullscreenModes.d.ts.map +1 -0
  403. package/components/DevCenter/IsolatedDevCenterAppContainer/useFullscreenModes.js +2 -0
  404. package/components/DevCenter/IsolatedDevCenterAppContainer/useFullscreenModes.js.map +1 -0
  405. package/components/DocumentViewer/DocumentViewer.js +1 -1
  406. package/components/DocumentViewer/DocumentViewer.js.map +1 -1
  407. package/components/Drillstring/BHAComponentDetail/constants.d.ts +2 -2
  408. package/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js +1 -1
  409. package/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js.map +1 -1
  410. package/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js +1 -1
  411. package/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js.map +1 -1
  412. package/components/Drillstring/BHAComponentsTable/components/Component.js +1 -1
  413. package/components/Drillstring/BHAComponentsTable/components/Component.js.map +1 -1
  414. package/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js +1 -1
  415. package/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js.map +1 -1
  416. package/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js +1 -1
  417. package/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js.map +1 -1
  418. package/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js +1 -1
  419. package/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js.map +1 -1
  420. package/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js +1 -1
  421. package/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js.map +1 -1
  422. package/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js +1 -1
  423. package/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js.map +1 -1
  424. package/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js +1 -1
  425. package/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js.map +1 -1
  426. package/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js +1 -1
  427. package/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js.map +1 -1
  428. package/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js +1 -1
  429. package/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js.map +1 -1
  430. package/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js +1 -1
  431. package/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js.map +1 -1
  432. package/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js +1 -1
  433. package/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js.map +1 -1
  434. package/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js +1 -1
  435. package/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js.map +1 -1
  436. package/components/FeedItem/FeedItem.js +1 -1
  437. package/components/FeedItem/FeedItem.js.map +1 -1
  438. package/components/FeedItem/components/FeedComments.js +1 -1
  439. package/components/FeedItem/components/FeedComments.js.map +1 -1
  440. package/components/LinkedText/LinkedText.d.ts +17 -0
  441. package/components/LinkedText/LinkedText.d.ts.map +1 -0
  442. package/components/LinkedText/LinkedText.js +2 -0
  443. package/components/LinkedText/LinkedText.js.map +1 -0
  444. package/components/LinkedText/LinkedText.scss.js +2 -0
  445. package/components/LinkedText/LinkedText.scss.js.map +1 -0
  446. package/components/LinkedText/__tests__/LinkedText.test.d.ts +2 -0
  447. package/components/LinkedText/__tests__/LinkedText.test.d.ts.map +1 -0
  448. package/components/LinkedText/index.d.ts +2 -0
  449. package/components/LinkedText/index.d.ts.map +1 -0
  450. package/components/NewDocumentViewer/utils.d.ts.map +1 -1
  451. package/components/NewDocumentViewer/utils.js +1 -1
  452. package/components/NewDocumentViewer/utils.js.map +1 -1
  453. package/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js +1 -1
  454. package/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js.map +1 -1
  455. package/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js +1 -1
  456. package/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js.map +1 -1
  457. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js +1 -1
  458. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js.map +1 -1
  459. package/components/OffsetWellPickerV3/components/CustomSelectionView/index.js +1 -1
  460. package/components/OffsetWellPickerV3/components/CustomSelectionView/index.js.map +1 -1
  461. package/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js +1 -1
  462. package/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js.map +1 -1
  463. package/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js +1 -1
  464. package/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js.map +1 -1
  465. package/components/OffsetWellPickerV3/components/TabSelection/index.js +1 -1
  466. package/components/OffsetWellPickerV3/components/TabSelection/index.js.map +1 -1
  467. package/components/OffsetWellPickerV3/components/WellHubView/index.js +1 -1
  468. package/components/OffsetWellPickerV3/components/WellHubView/index.js.map +1 -1
  469. package/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js +1 -1
  470. package/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js.map +1 -1
  471. package/components/OffsetWellPickerV5/components/AppHeader/components/HeaderActions/HeaderActions.js +1 -1
  472. package/components/OffsetWellPickerV5/components/AppHeader/components/HeaderActions/HeaderActions.js.map +1 -1
  473. package/components/OffsetWellPickerV5/components/AppHeader/components/LoadAllWellsToggle/LoadAllWellsToggle.js +1 -1
  474. package/components/OffsetWellPickerV5/components/AppHeader/components/LoadAllWellsToggle/LoadAllWellsToggle.js.map +1 -1
  475. package/components/OffsetWellPickerV5/components/Filter/Filter.js +1 -1
  476. package/components/OffsetWellPickerV5/components/Filter/Filter.js.map +1 -1
  477. package/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js +1 -1
  478. package/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js.map +1 -1
  479. package/components/OffsetWellPickerV5/components/Filter/components/PeriodFilterSelect/PeriodFilterSelect.js +1 -1
  480. package/components/OffsetWellPickerV5/components/Filter/components/PeriodFilterSelect/PeriodFilterSelect.js.map +1 -1
  481. package/components/OffsetWellPickerV5/components/Filter/components/SingleFilterSelect/SingleFilterSelect.js +1 -1
  482. package/components/OffsetWellPickerV5/components/Filter/components/SingleFilterSelect/SingleFilterSelect.js.map +1 -1
  483. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/ClusterTooltip/ClusterTooltip.js +1 -1
  484. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/ClusterTooltip/ClusterTooltip.js.map +1 -1
  485. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/LayerSwitcher/LayerSwitcher.js +1 -1
  486. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/LayerSwitcher/LayerSwitcher.js.map +1 -1
  487. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapControls/MapControls.js +1 -1
  488. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapControls/MapControls.js.map +1 -1
  489. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapHints/MapHintsStash.js +1 -1
  490. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapHints/MapHintsStash.js.map +1 -1
  491. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/SubjectWellMarker/SubjectWellMarker.js +1 -1
  492. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/SubjectWellMarker/SubjectWellMarker.js.map +1 -1
  493. package/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js +1 -1
  494. package/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js.map +1 -1
  495. package/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AssetResultSection/AssetResultSection.js +1 -1
  496. package/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AssetResultSection/AssetResultSection.js.map +1 -1
  497. package/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AutoCompleteAssetSearch/AutoCompleteAssetSearch.js +1 -1
  498. package/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AutoCompleteAssetSearch/AutoCompleteAssetSearch.js.map +1 -1
  499. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/CompanyCell/CompanyCell.js +1 -1
  500. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/CompanyCell/CompanyCell.js.map +1 -1
  501. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/FormationCell/FormationCell.js +1 -1
  502. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/FormationCell/FormationCell.js.map +1 -1
  503. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/InterventionAssetCell/InterventionAssetCell.js +1 -1
  504. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/InterventionAssetCell/InterventionAssetCell.js.map +1 -1
  505. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/PadNameCell/PadNameCell.js +1 -1
  506. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/PadNameCell/PadNameCell.js.map +1 -1
  507. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/RigCell/RigCell.js +1 -1
  508. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/RigCell/RigCell.js.map +1 -1
  509. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/WellNameCell/WellNameCell.js +1 -1
  510. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/WellNameCell/WellNameCell.js.map +1 -1
  511. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/SettingsMenu.js +1 -1
  512. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/SettingsMenu.js.map +1 -1
  513. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/MetricsSettingsSection/MetricsSettingsSection.js +1 -1
  514. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/MetricsSettingsSection/MetricsSettingsSection.js.map +1 -1
  515. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/TableSettingsSection/TableSettingsSection.js +1 -1
  516. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/TableSettingsSection/TableSettingsSection.js.map +1 -1
  517. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/WellNameHeaderCell/WellNameHeaderCell.js +1 -1
  518. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/WellNameHeaderCell/WellNameHeaderCell.js.map +1 -1
  519. package/components/OffsetWellPickerV5/components/PickerModalActions/PickerModalActions.js +1 -1
  520. package/components/OffsetWellPickerV5/components/PickerModalActions/PickerModalActions.js.map +1 -1
  521. package/components/PadOffsetsPicker/StagesSelector.js +1 -1
  522. package/components/PadOffsetsPicker/StagesSelector.js.map +1 -1
  523. package/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js +1 -1
  524. package/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js.map +1 -1
  525. package/components/Popover/Popover.js +1 -1
  526. package/components/Popover/Popover.js.map +1 -1
  527. package/components/Popper/Popper.js +1 -1
  528. package/components/Popper/Popper.js.map +1 -1
  529. package/components/RealTimeValuesSidebar/SidebarFooter.js +1 -1
  530. package/components/RealTimeValuesSidebar/SidebarFooter.js.map +1 -1
  531. package/components/UserMention/__tests__/highlightLinks.test.d.ts +2 -0
  532. package/components/UserMention/__tests__/highlightLinks.test.d.ts.map +1 -0
  533. package/components/UserMention/constants.d.ts +1 -0
  534. package/components/UserMention/constants.d.ts.map +1 -1
  535. package/components/UserMention/constants.js +1 -1
  536. package/components/UserMention/constants.js.map +1 -1
  537. package/components/UserMention/index.js +1 -1
  538. package/components/UserMention/index.js.map +1 -1
  539. package/components/index.d.ts +2 -0
  540. package/components/index.d.ts.map +1 -1
  541. package/components/index.js +1 -1
  542. package/componentsV2/AppCommonsProvider/AppCommonsContext.d.ts +4 -2
  543. package/componentsV2/AppCommonsProvider/AppCommonsContext.d.ts.map +1 -1
  544. package/componentsV2/AppCommonsProvider/AppCommonsContext.js.map +1 -1
  545. package/componentsV2/AppCommonsProvider/utils.d.ts +1 -1
  546. package/componentsV2/AppCommonsProvider/utils.d.ts.map +1 -1
  547. package/componentsV2/AppCommonsProvider/utils.js +1 -1
  548. package/componentsV2/AppCommonsProvider/utils.js.map +1 -1
  549. package/componentsV2/AppHeader/V3/Actions/Actions.constants.d.ts +4 -1
  550. package/componentsV2/AppHeader/V3/Actions/Actions.constants.d.ts.map +1 -1
  551. package/componentsV2/AppHeader/V3/Actions/Actions.constants.js +1 -1
  552. package/componentsV2/AppHeader/V3/Actions/Actions.constants.js.map +1 -1
  553. package/componentsV2/AppHeader/V3/Actions/Actions.d.ts.map +1 -1
  554. package/componentsV2/AppHeader/V3/Actions/Actions.js +1 -1
  555. package/componentsV2/AppHeader/V3/Actions/Actions.js.map +1 -1
  556. package/componentsV2/AppHeader/V3/AppHeaderV3.d.ts.map +1 -1
  557. package/componentsV2/AppHeader/V3/AppHeaderV3.js +1 -1
  558. package/componentsV2/AppHeader/V3/AppHeaderV3.js.map +1 -1
  559. package/componentsV2/ButtonIcon/ButtonIcon.d.ts +2 -0
  560. package/componentsV2/ButtonIcon/ButtonIcon.d.ts.map +1 -1
  561. package/componentsV2/ButtonIcon/ButtonIcon.js +1 -1
  562. package/componentsV2/ButtonIcon/ButtonIcon.js.map +1 -1
  563. package/componentsV2/ButtonIcon/ButtonIcon.scss.js +1 -1
  564. package/componentsV2/ButtonIcon/ButtonIcon.stories.d.ts +1 -0
  565. package/componentsV2/ButtonIcon/ButtonIcon.stories.d.ts.map +1 -1
  566. package/componentsV2/Chip/Chip.d.ts +1 -0
  567. package/componentsV2/Chip/Chip.d.ts.map +1 -1
  568. package/componentsV2/Chip/Chip.js +1 -1
  569. package/componentsV2/Chip/Chip.js.map +1 -1
  570. package/componentsV2/Chip/Chip.stories.d.ts.map +1 -1
  571. package/componentsV2/ColorPicker/ColorPicker.d.ts +2 -1
  572. package/componentsV2/ColorPicker/ColorPicker.d.ts.map +1 -1
  573. package/componentsV2/ColorPicker/ColorPicker.js +1 -1
  574. package/componentsV2/ColorPicker/ColorPicker.js.map +1 -1
  575. package/componentsV2/ColorPicker/ColorPicker.scss.js +1 -1
  576. package/componentsV2/ColorPicker/ColorPicker.stories.d.ts.map +1 -1
  577. package/componentsV2/ColorPicker/OpacityDragtracker/OpacityDragtracker.d.ts.map +1 -1
  578. package/componentsV2/ColorPicker/OpacityDragtracker/OpacityDragtracker.js +1 -1
  579. package/componentsV2/ColorPicker/OpacityDragtracker/OpacityDragtracker.js.map +1 -1
  580. package/componentsV2/ColorPicker/Swatches/Swatches.scss.js +1 -1
  581. package/componentsV2/CompletionsOffsetWellPicker/Map/Map.js +1 -1
  582. package/componentsV2/CompletionsOffsetWellPicker/Map/Map.js.map +1 -1
  583. package/componentsV2/InterventionEventSelector/InterventionEventSelector.d.ts +3 -0
  584. package/componentsV2/InterventionEventSelector/InterventionEventSelector.d.ts.map +1 -0
  585. package/componentsV2/InterventionEventSelector/InterventionEventSelector.js +2 -0
  586. package/componentsV2/InterventionEventSelector/InterventionEventSelector.js.map +1 -0
  587. package/componentsV2/InterventionEventSelector/InterventionEventSelector.scss.js +2 -0
  588. package/componentsV2/InterventionEventSelector/InterventionEventSelector.scss.js.map +1 -0
  589. package/componentsV2/InterventionEventSelector/InterventionEventSelector.stories.d.ts +9 -0
  590. package/componentsV2/InterventionEventSelector/InterventionEventSelector.stories.d.ts.map +1 -0
  591. package/componentsV2/InterventionEventSelector/__tests__/InterventionEventSelector.test.d.ts +2 -0
  592. package/componentsV2/InterventionEventSelector/__tests__/InterventionEventSelector.test.d.ts.map +1 -0
  593. package/componentsV2/InterventionEventSelector/index.d.ts +5 -0
  594. package/componentsV2/InterventionEventSelector/index.d.ts.map +1 -0
  595. package/componentsV2/InterventionEventSelector/types.d.ts +22 -0
  596. package/componentsV2/InterventionEventSelector/types.d.ts.map +1 -0
  597. package/componentsV2/InterventionEventSelector/useInterventionUnitEvents.d.ts +8 -0
  598. package/componentsV2/InterventionEventSelector/useInterventionUnitEvents.d.ts.map +1 -0
  599. package/componentsV2/InterventionEventSelector/useInterventionUnitEvents.js +2 -0
  600. package/componentsV2/InterventionEventSelector/useInterventionUnitEvents.js.map +1 -0
  601. package/componentsV2/InterventionEventSelector/utils.d.ts +6 -0
  602. package/componentsV2/InterventionEventSelector/utils.d.ts.map +1 -0
  603. package/componentsV2/InterventionEventSelector/utils.js +2 -0
  604. package/componentsV2/InterventionEventSelector/utils.js.map +1 -0
  605. package/componentsV2/Modal/Modal.d.ts.map +1 -1
  606. package/componentsV2/Modal/Modal.js +1 -1
  607. package/componentsV2/Modal/Modal.js.map +1 -1
  608. package/componentsV2/Modal/constants.d.ts +3 -0
  609. package/componentsV2/Modal/constants.d.ts.map +1 -0
  610. package/componentsV2/Modal/constants.js +2 -0
  611. package/componentsV2/Modal/constants.js.map +1 -0
  612. package/componentsV2/WellArchivedMessage/WellArchivedMessage.js +1 -1
  613. package/componentsV2/WellArchivedMessage/WellArchivedMessage.js.map +1 -1
  614. package/componentsV2/index.d.ts +1 -0
  615. package/componentsV2/index.d.ts.map +1 -1
  616. package/componentsV2/index.js +1 -1
  617. package/effects/__tests__/useOutsideClick.test.d.ts.map +1 -1
  618. package/effects/useOutsideClick.d.ts.map +1 -1
  619. package/effects/useOutsideClick.js +1 -1
  620. package/effects/useOutsideClick.js.map +1 -1
  621. package/mcp-server/server.mjs +108 -24
  622. package/package.json +1 -1
  623. package/testing/AppTestWrapper/AppTestWrapper.js +1 -1
  624. package/testing/AppTestWrapper/AppTestWrapper.js.map +1 -1
  625. package/tsconfig.tsbuildinfo +1 -1
  626. package/types/shared/Common.d.ts +9 -0
  627. package/types/shared/Common.d.ts.map +1 -1
  628. package/utils/__tests__/fetchAttachment.test.d.ts +2 -0
  629. package/utils/__tests__/fetchAttachment.test.d.ts.map +1 -0
  630. package/utils/__tests__/links.test.d.ts +2 -0
  631. package/utils/__tests__/links.test.d.ts.map +1 -0
  632. package/utils/devcenter.d.ts +1 -0
  633. package/utils/devcenter.d.ts.map +1 -1
  634. package/utils/devcenter.js +1 -1
  635. package/utils/devcenter.js.map +1 -1
  636. package/utils/fetchAttachment.d.ts +3 -0
  637. package/utils/fetchAttachment.d.ts.map +1 -0
  638. package/utils/fetchAttachment.js +2 -0
  639. package/utils/fetchAttachment.js.map +1 -0
  640. package/utils/fileExtension.d.ts.map +1 -1
  641. package/utils/fileExtension.js +1 -1
  642. package/utils/fileExtension.js.map +1 -1
  643. package/utils/links.d.ts +14 -0
  644. package/utils/links.d.ts.map +1 -0
  645. package/utils/links.js +2 -0
  646. package/utils/links.js.map +1 -0
@@ -1,2 +1,2 @@
1
- import{Dialog as t}from"@material-ui/core";import a from"./AttachmentLightbox.scss.js";import{jsxs as e,jsx as o}from"react/jsx-runtime";var r=function(r){var s,i=r.attachment,n=r.onClose,m=r.testId;return e(t,{open:!!i,onClose:n,maxWidth:!1,classes:{paper:a.paper},"data-testid":m,children:[!i&&o("span",{}),"video"===(null==i?void 0:i.kind)&&o("video",{src:i.src,className:a.media,controls:!0,autoPlay:!0,playsInline:!0}),!!i&&"video"!==i.kind&&o("img",{src:i.src,alt:null!==(s=i.name)&&void 0!==s?s:"Attachment",className:a.media})]})};export{r as AttachmentLightbox};
1
+ import{useCallback as o,useEffect as s}from"react";import{Modal as c}from"../../componentsV2/Modal/Modal.js";import{ButtonIcon as i}from"../../componentsV2/ButtonIcon/ButtonIcon.js";import{AttachmentRow as n}from"../AttachmentPreview/AttachmentRow.js";import{AttachmentPreviewPane as t}from"./AttachmentPreviewPane.js";import m from"./AttachmentLightbox.scss.js";import{LeftIcon as r,RightIcon as e}from"../../icons/iconParkIcons.js";import"../../icons/customIcons/icons/AddMessage.js";import"../../icons/customIcons/icons/DragOne.js";import"../../icons/customIcons/icons/Attention.js";import"../../icons/customIcons/icons/Collapse.js";import"../../icons/customIcons/icons/Dashboard.js";import"../../icons/customIcons/icons/Expand.js";import"../../icons/customIcons/icons/FolderClosed.js";import"../../icons/customIcons/icons/FolderClosedFilled.js";import"../../icons/customIcons/icons/FolderOpened.js";import"../../icons/customIcons/icons/GreaterOrEqual.js";import"../../icons/customIcons/icons/LessOrEqual.js";import"../../icons/customIcons/icons/Search.js";import"../../icons/customIcons/icons/SearchOne.js";import"../../icons/customIcons/icons/Wellhub.js";import"../../icons/customIcons/icons/MultiRuler.js";import"../../icons/customIcons/icons/Checkbox.js";import"../../icons/customIcons/icons/CheckboxChecked.js";import"../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../icons/customIcons/icons/Radio.js";import"../../icons/customIcons/icons/RadioChecked.js";import"../../icons/customIcons/icons/SimulFrac.js";import"../../icons/customIcons/icons/ZipperFrac.js";import"../../icons/customIcons/icons/CautionFilled.js";import"../../icons/customIcons/icons/MoreApp.js";import"../../icons/customIcons/icons/Pad.js";import"../../icons/customIcons/icons/DrilloutUnit.js";import"../../icons/customIcons/icons/FracFleet.js";import"../../icons/customIcons/icons/Global.js";import"../../icons/customIcons/icons/Program.js";import"../../icons/customIcons/icons/Rig.js";import"../../icons/customIcons/icons/Well.js";import"../../icons/customIcons/icons/Gap.js";import"../../icons/customIcons/icons/Pin.js";import"../../icons/customIcons/icons/CloseOneFilled.js";import"../../icons/customIcons/icons/AttentionFilled.js";import"../../icons/customIcons/icons/CheckOneFilled.js";import"../../icons/customIcons/icons/Archive.js";import"../../icons/customIcons/icons/ArchiveCancel.js";import"../../icons/customIcons/icons/Unarchive.js";import"../../icons/customIcons/icons/Archived.js";import"../../icons/customIcons/icons/InterventionUnit.js";import"../../icons/customIcons/icons/CloudDelete.js";import"../../icons/customIcons/icons/Lasso.js";import"../../icons/customIcons/icons/Radius.js";import"../../icons/customIcons/icons/ErrorOps.js";import"../../icons/customIcons/icons/DataTypeOps.js";import"../../icons/customIcons/icons/FalsePositiveOps.js";import"../../icons/customIcons/icons/CalibrationOps.js";import"../../icons/customIcons/icons/CriticalOps.js";import"../../icons/customIcons/icons/Company.js";import"../../icons/customIcons/icons/ArchiveOne.js";import"../../icons/customIcons/icons/ParseBotFusion.js";import"../../icons/customIcons/icons/Connect.js";import"../../icons/customIcons/icons/PuzzleOne.js";import"../../icons/customIcons/icons/Feed.js";import"../../icons/customIcons/icons/Prompt.js";import"../../icons/customIcons/icons/Companies.js";import"../../icons/customIcons/icons/ClipboardAi.js";import"../../icons/customIcons/icons/Key.js";import"../../icons/customIcons/icons/AtSignCrossed.js";import"../../icons/customIcons/icons/MappingManual.js";import"../../icons/customIcons/icons/Mapping.js";import"../../icons/customIcons/icons/Metrics.js";import"../../icons/customIcons/icons/Drops.js";import"../../icons/customIcons/icons/ClipboardSearch.js";import"../../icons/customIcons/icons/Template.js";import"../../icons/customIcons/icons/ClipboardMetrics.js";import"../../icons/customIcons/icons/ClipboardBuilder.js";import"../../icons/customIcons/icons/UnitConversion.js";import"../../icons/customIcons/icons/NPT.js";import"../../icons/customIcons/icons/GuidedFrac.js";import{jsxs as p,jsx as u}from"react/jsx-runtime";var a=function(a){var I=a.items,l=a.activeId,j=a.onActiveIdChange,d=a.onClose,h=a.onShare,v=a.title,C=void 0===v?"Files":v,f=a.testId,b=I.findIndex((function(o){return o.id===l})),g=-1===b?void 0:I[b],A=o((function(o){var s=I[b+o];s&&j(s.id)}),[I,b,j]);s((function(){if(g){var o=function(o){if(!o.defaultPrevented){var s=o.target;"function"==typeof(null==s?void 0:s.closest)&&s.closest('video, audio, input, textarea, [role="menu"]')||("ArrowLeft"===o.key&&A(-1),"ArrowRight"===o.key&&A(1))}};return document.addEventListener("keydown",o),function(){return document.removeEventListener("keydown",o)}}}),[g,A]);var F=I.length>1?p("div",{className:m.strip,children:[u(i,{size:"large",ariaLabel:"Previous attachment",disabled:b<=0,onClick:function(){return A(-1)},testId:"attachment-lightbox-prev",children:u(r,{})}),u(n,{items:I,selectedId:null!=l?l:void 0,hideActions:!0,onItemClick:function(o){return j(o.id)},className:m.stripRow,testId:"attachment-lightbox-strip"}),u(i,{size:"large",ariaLabel:"Next attachment",disabled:-1===b||b>=I.length-1,onClick:function(){return A(1)},testId:"attachment-lightbox-next",children:u(e,{})})]}):void 0;return u(c,{open:!!g,size:"fullscreen",title:C,onClose:d,actions:F,testId:f,children:!!g&&u(t,{item:g,onShare:h})})};export{a as AttachmentLightbox};
2
2
  //# sourceMappingURL=AttachmentLightbox.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AttachmentLightbox.js","sources":["../../../src/components/AttachmentLightbox/AttachmentLightbox.tsx"],"sourcesContent":["import { Dialog } from '@material-ui/core';\n\nimport type { AttachmentKind } from '../AttachmentPreview/AttachmentPreview.types';\n\nimport styles from './AttachmentLightbox.scss';\n\nexport type LightboxAttachment = {\n src: string;\n name?: string;\n kind?: AttachmentKind;\n};\n\nexport type AttachmentLightboxProps = {\n /** `null` keeps the lightbox closed. */\n attachment: LightboxAttachment | null;\n onClose: () => void;\n testId?: string;\n};\n\nexport const AttachmentLightbox = ({ attachment, onClose, testId }: AttachmentLightboxProps) => (\n <Dialog\n open={!!attachment}\n onClose={onClose}\n maxWidth={false}\n classes={{ paper: styles.paper }}\n data-testid={testId}\n >\n {!attachment && <span />}\n\n {attachment?.kind === 'video' && (\n // eslint-disable-next-line jsx-a11y/media-has-caption\n <video src={attachment.src} className={styles.media} controls autoPlay playsInline />\n )}\n\n {!!attachment && attachment.kind !== 'video' && (\n <img src={attachment.src} alt={attachment.name ?? 'Attachment'} className={styles.media} />\n )}\n </Dialog>\n);\n"],"names":["AttachmentLightbox","_ref","_attachment$name","attachment","onClose","testId","_jsxs","Dialog","open","maxWidth","classes","paper","styles","children","_jsx","kind","src","className","media","controls","autoPlay","playsInline","alt","name"],"mappings":"yIAmBaA,IAAAA,EAAqB,SAAHC,GAAA,IAAAC,EAAMC,IAAAA,WAAYC,IAAAA,QAASC,IAAAA,OAAM,OAC9DC,EAACC,EAAM,CACLC,OAAQL,EACRC,QAASA,EACTK,UAAU,EACVC,QAAS,CAAEC,MAAOC,EAAOD,OACzB,cAAaN,EAAOQ,SAAA,EAElBV,GAAcW,EAAA,OAAA,CAAA,GAEM,WAArBX,aAAAA,EAAAA,EAAYY,OAEXD,EAAA,QAAA,CAAOE,IAAKb,EAAWa,IAAKC,UAAWL,EAAOM,MAAOC,UAAQ,EAACC,UAAQ,EAACC,aAAW,MAGjFlB,GAAkC,UAApBA,EAAWY,MAC1BD,EAAA,MAAA,CAAKE,IAAKb,EAAWa,IAAKM,YAAKnB,EAAAA,EAAWoB,oBAAQ,aAAcN,UAAWL,EAAOM,UAE7E"}
1
+ {"version":3,"file":"AttachmentLightbox.js","sources":["../../../src/components/AttachmentLightbox/AttachmentLightbox.tsx"],"sourcesContent":["import { ReactNode, useCallback, useEffect } from 'react';\n\nimport { Modal } from '../../componentsV2/Modal';\nimport { ButtonIcon } from '../../componentsV2/ButtonIcon';\nimport { AttachmentRow } from '../AttachmentPreview/AttachmentRow';\nimport type { AttachmentPreviewItem } from '../AttachmentPreview/AttachmentPreview.types';\n\nimport { AttachmentPreviewPane } from './AttachmentPreviewPane';\n\nimport styles from './AttachmentLightbox.scss';\n\nimport { LeftIcon, RightIcon } from '~/icons';\n\nexport type AttachmentLightboxProps = {\n items: AttachmentPreviewItem[];\n /** `null` keeps the lightbox closed. */\n activeId: AttachmentPreviewItem['id'] | null;\n onActiveIdChange: (id: AttachmentPreviewItem['id']) => void;\n onClose: () => void;\n /** Adds \"Share file\" to the overflow menu. */\n onShare?: (item: AttachmentPreviewItem) => void;\n title?: ReactNode;\n testId?: string;\n};\n\nexport const AttachmentLightbox = ({\n items,\n activeId,\n onActiveIdChange,\n onClose,\n onShare,\n title = 'Files',\n testId,\n}: AttachmentLightboxProps) => {\n const activeIndex = items.findIndex(item => item.id === activeId);\n const active = activeIndex === -1 ? undefined : items[activeIndex];\n\n const step = useCallback(\n (delta: number) => {\n const next = items[activeIndex + delta];\n\n if (next) onActiveIdChange(next.id);\n },\n [items, activeIndex, onActiveIdChange]\n );\n\n useEffect(() => {\n if (!active) return undefined;\n\n const handleKeyDown = (event: KeyboardEvent) => {\n // A focused <video> seeks with the arrows; only steer when nothing nearer claims the key.\n if (event.defaultPrevented) return;\n\n // With nothing focused the target is the document, which has no `closest`.\n const target = event.target as Element | null;\n\n if (\n typeof target?.closest === 'function' &&\n target.closest('video, audio, input, textarea, [role=\"menu\"]')\n ) {\n return;\n }\n\n if (event.key === 'ArrowLeft') step(-1);\n if (event.key === 'ArrowRight') step(1);\n };\n\n document.addEventListener('keydown', handleKeyDown);\n\n return () => document.removeEventListener('keydown', handleKeyDown);\n }, [active, step]);\n\n const strip =\n items.length > 1 ? (\n <div className={styles.strip}>\n <ButtonIcon\n size=\"large\"\n ariaLabel=\"Previous attachment\"\n disabled={activeIndex <= 0}\n onClick={() => step(-1)}\n testId=\"attachment-lightbox-prev\"\n >\n <LeftIcon />\n </ButtonIcon>\n\n <AttachmentRow\n items={items}\n selectedId={activeId ?? undefined}\n hideActions\n onItemClick={item => onActiveIdChange(item.id)}\n className={styles.stripRow}\n testId=\"attachment-lightbox-strip\"\n />\n\n <ButtonIcon\n size=\"large\"\n ariaLabel=\"Next attachment\"\n disabled={activeIndex === -1 || activeIndex >= items.length - 1}\n onClick={() => step(1)}\n testId=\"attachment-lightbox-next\"\n >\n <RightIcon />\n </ButtonIcon>\n </div>\n ) : undefined;\n\n return (\n <Modal\n open={!!active}\n size=\"fullscreen\"\n title={title}\n onClose={onClose}\n actions={strip}\n testId={testId}\n >\n {!!active && <AttachmentPreviewPane item={active} onShare={onShare} />}\n </Modal>\n );\n};\n"],"names":["AttachmentLightbox","_ref","items","activeId","onActiveIdChange","onClose","onShare","_ref$title","title","testId","activeIndex","findIndex","item","id","active","undefined","step","useCallback","delta","next","useEffect","handleKeyDown","event","defaultPrevented","target","closest","key","document","addEventListener","removeEventListener","strip","length","_jsxs","className","styles","children","_jsx","ButtonIcon","size","ariaLabel","disabled","onClick","LeftIcon","AttachmentRow","selectedId","hideActions","onItemClick","stripRow","RightIcon","Modal","open","actions","AttachmentPreviewPane"],"mappings":"qjIAyBaA,IAAAA,EAAqB,SAQHC,GAAA,IAP7BC,IAAAA,MACAC,IAAAA,SACAC,IAAAA,iBACAC,IAAAA,QACAC,IAAAA,QAAOC,EAAAN,EACPO,MAAAA,aAAQ,QAAOD,EACfE,IAAAA,OAEMC,EAAcR,EAAMS,WAAU,SAAAC,GAAI,OAAIA,EAAKC,KAAOV,KAClDW,GAA0B,IAAjBJ,OAAqBK,EAAYb,EAAMQ,GAEhDM,EAAOC,GACX,SAACC,GACC,IAAMC,EAAOjB,EAAMQ,EAAcQ,GAE7BC,GAAMf,EAAiBe,EAAKN,GACjC,GACD,CAACX,EAAOQ,EAAaN,IAGvBgB,GAAU,WACR,GAAKN,EAAL,CAEA,IAAMO,EAAgB,SAACC,GAErB,IAAIA,EAAMC,iBAAV,CAGA,IAAMC,EAASF,EAAME,OAGQ,mBAApBA,aAAM,EAANA,EAAQC,UACfD,EAAOC,QAAQ,kDAKC,cAAdH,EAAMI,KAAqBV,GAAM,GACnB,eAAdM,EAAMI,KAAsBV,EAAK,GAbT,GAkB9B,OAFAW,SAASC,iBAAiB,UAAWP,GAE9B,WAAA,OAAMM,SAASE,oBAAoB,UAAWR,EAAc,CAtBtC,CAuB/B,GAAG,CAACP,EAAQE,IAEZ,IAAMc,EACJ5B,EAAM6B,OAAS,EACbC,EAAA,MAAA,CAAKC,UAAWC,EAAOJ,MAAMK,SAAA,CAC3BC,EAACC,EAAU,CACTC,KAAK,QACLC,UAAU,sBACVC,SAAU9B,GAAe,EACzB+B,QAAS,WAAA,OAAMzB,GAAM,EAAG,EACxBP,OAAO,2BAA0B0B,SAEjCC,EAACM,EAAQ,MAGXN,EAACO,EAAa,CACZzC,MAAOA,EACP0C,WAAYzC,QAAAA,OAAYY,EACxB8B,aAAW,EACXC,YAAa,SAAAlC,GAAI,OAAIR,EAAiBQ,EAAKC,GAAI,EAC/CoB,UAAWC,EAAOa,SAClBtC,OAAO,8BAGT2B,EAACC,EAAU,CACTC,KAAK,QACLC,UAAU,kBACVC,UAA2B,IAAjB9B,GAAsBA,GAAeR,EAAM6B,OAAS,EAC9DU,QAAS,WAAA,OAAMzB,EAAK,EAAG,EACvBP,OAAO,2BAA0B0B,SAEjCC,EAACY,EAAS,cAGZjC,EAEN,OACEqB,EAACa,EAAK,CACJC,OAAQpC,EACRwB,KAAK,aACL9B,MAAOA,EACPH,QAASA,EACT8C,QAASrB,EACTrB,OAAQA,EAAO0B,WAEZrB,GAAUsB,EAACgB,EAAqB,CAACxC,KAAME,EAAQR,QAASA,KAGjE"}
@@ -1,2 +1,2 @@
1
- import t from'./../../ext-esm/style-inject/dist/style-inject.es.js';var a={paper:"AttachmentLightbox_paper__sWaTp",media:"AttachmentLightbox_media__CElIX"};t(".AttachmentLightbox_paper__sWaTp{background:transparent;box-shadow:none;margin:0}.AttachmentLightbox_media__CElIX{display:block;max-height:90vh;max-width:90vw}");export{a as default};
1
+ import t from'./../../ext-esm/style-inject/dist/style-inject.es.js';var e={spacing:"8",strip:"AttachmentLightbox_strip__6Ahrc",stripRow:"AttachmentLightbox_stripRow__uue68",pane:"AttachmentLightbox_pane__KzcgJ",paneHeader:"AttachmentLightbox_paneHeader__Z6qqZ",paneName:"AttachmentLightbox_paneName__wHaha",paneFileName:"AttachmentLightbox_paneFileName__Ans-0",paneFileSize:"AttachmentLightbox_paneFileSize__kHpFZ",paneActions:"AttachmentLightbox_paneActions__HYZPg",paneActionLink:"AttachmentLightbox_paneActionLink__ij8qw",paneViewport:"AttachmentLightbox_paneViewport__eNxCs",paneViewportPannable:"AttachmentLightbox_paneViewportPannable__aioSN",paneViewportPanning:"AttachmentLightbox_paneViewportPanning__ZN5R3",paneZoomBox:"AttachmentLightbox_paneZoomBox__Z1Ccd",paneMedia:"AttachmentLightbox_paneMedia__nXjJ0",paneZoomControls:"AttachmentLightbox_paneZoomControls__y7ImM",paneZoomButton:"AttachmentLightbox_paneZoomButton__kndeG",documentFrame:"AttachmentLightbox_documentFrame__-AP36",documentTable:"AttachmentLightbox_documentTable__vMkX5",documentText:"AttachmentLightbox_documentText__Tn8b7",documentState:"AttachmentLightbox_documentState__h-iDd",fallbackName:"AttachmentLightbox_fallbackName__JO0HH",fallbackHint:"AttachmentLightbox_fallbackHint__tPWNV",fallbackDownload:"AttachmentLightbox_fallbackDownload__Noq5-"};t(".AttachmentLightbox_strip__6Ahrc{align-items:center;display:flex;flex:1;gap:8px;justify-content:center;min-width:0}.AttachmentLightbox_stripRow__uue68.AttachmentLightbox_stripRow__uue68{flex:0 1 auto;gap:8px;justify-content:flex-start}.AttachmentLightbox_pane__KzcgJ{background:rgb(from var(--palette-primary-text-1) r g b/.02);border-radius:8px;display:flex;flex-direction:column;height:100%;padding:8px 16px 16px;position:relative}.AttachmentLightbox_paneHeader__Z6qqZ{align-items:center;display:flex;gap:16px;justify-content:space-between;padding:4px 0}.AttachmentLightbox_paneName__wHaha{display:flex;flex-direction:column;justify-content:center;min-width:0}.AttachmentLightbox_paneFileName__Ans-0{color:var(--palette-primary-text-1);font-size:16px;font-weight:500;line-height:22px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.AttachmentLightbox_paneFileSize__kHpFZ{color:var(--palette-primary-text-6);font-size:12px;line-height:16px}.AttachmentLightbox_paneActions__HYZPg{align-items:center;display:flex;flex-shrink:0;gap:8px}.AttachmentLightbox_paneActionLink__ij8qw{color:inherit;display:inline-flex;text-decoration:none}.AttachmentLightbox_paneViewport__eNxCs{display:flex;flex:1;margin-top:8px;min-height:0;overflow:auto}.AttachmentLightbox_paneViewportPannable__aioSN{cursor:grab}.AttachmentLightbox_paneViewportPanning__ZN5R3{cursor:grabbing;user-select:none}.AttachmentLightbox_paneZoomBox__Z1Ccd{display:flex;flex:none;height:calc(100%*var(--attachment-zoom, 1));width:calc(100%*var(--attachment-zoom, 1))}.AttachmentLightbox_paneMedia__nXjJ0{-webkit-user-drag:none;border-radius:8px;height:100%;object-fit:contain;user-select:none;width:100%}.AttachmentLightbox_paneZoomControls__y7ImM{bottom:8px;display:flex;flex-direction:column;gap:8px;position:absolute;right:8px;z-index:2}.AttachmentLightbox_paneZoomButton__kndeG{display:inline-flex}.AttachmentLightbox_documentFrame__-AP36,.AttachmentLightbox_documentTable__vMkX5,.AttachmentLightbox_documentText__Tn8b7{border-radius:8px;height:100%;overflow:auto;position:relative;width:100%}.AttachmentLightbox_documentText__Tn8b7{color:var(--palette-primary-text-1);font-size:14px;line-height:20px;padding:16px}.AttachmentLightbox_documentText__Tn8b7 pre{font-family:inherit;margin:0;white-space:pre-wrap;word-break:break-word}.AttachmentLightbox_documentTable__vMkX5{color:var(--palette-primary-text-1)}.AttachmentLightbox_documentState__h-iDd{align-items:center;display:flex;flex-direction:column;gap:8px;justify-content:center;margin:auto;padding:24px;text-align:center}.AttachmentLightbox_fallbackName__JO0HH{color:var(--palette-primary-text-1);font-size:16px;line-height:22px;margin-top:8px;word-break:break-word}.AttachmentLightbox_fallbackHint__tPWNV{color:var(--palette-primary-text-6);font-size:14px;line-height:20px;margin-bottom:8px}.AttachmentLightbox_fallbackDownload__Noq5-{text-decoration:none}");export{e as default};
2
2
  //# sourceMappingURL=AttachmentLightbox.scss.js.map
@@ -0,0 +1,9 @@
1
+ import type { AttachmentPreviewItem } from '../AttachmentPreview/AttachmentPreview.types';
2
+ export type AttachmentPreviewPaneProps = {
3
+ item: AttachmentPreviewItem;
4
+ /** Adds "Share file" to the overflow menu. */
5
+ onShare?: (item: AttachmentPreviewItem) => void;
6
+ };
7
+ /** Zoom is media-only — document viewers scroll and zoom on their own. */
8
+ export declare const AttachmentPreviewPane: ({ item, onShare }: AttachmentPreviewPaneProps) => import("react/jsx-runtime").JSX.Element;
9
+ //# sourceMappingURL=AttachmentPreviewPane.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AttachmentPreviewPane.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentLightbox/AttachmentPreviewPane.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8CAA8C,CAAC;AAW1F,MAAM,MAAM,0BAA0B,GAAG;IACvC,IAAI,EAAE,qBAAqB,CAAC;IAC5B,8CAA8C;IAC9C,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,qBAAqB,KAAK,IAAI,CAAC;CACjD,CAAC;AAEF,0EAA0E;AAC1E,eAAO,MAAM,qBAAqB,sBAAuB,0BAA0B,4CAsHlF,CAAC"}
@@ -0,0 +1,2 @@
1
+ import o from"@babel/runtime/helpers/defineProperty";import{useRef as s}from"react";import c from"classnames";import{ButtonIcon as i}from"../../componentsV2/ButtonIcon/ButtonIcon.js";import{Tooltip as n}from"../../componentsV2/Tooltip/Tooltip.js";import{AttachmentActionsMenu as t}from"../AttachmentPreview/AttachmentActionsMenu.js";import{AttachmentImage as e}from"../AttachmentPreview/AttachmentImage.js";import{AttachmentDownloadLink as m}from"../AttachmentPreview/AttachmentDownloadLink.js";import{AttachmentDocument as r}from"./AttachmentDocument.js";import{useZoomPan as a}from"./useZoomPan.js";import p from"./AttachmentLightbox.scss.js";import{PlusIcon as l,MinusIcon as u}from"../../icons/iconParkIcons.js";import"../../icons/customIcons/icons/AddMessage.js";import"../../icons/customIcons/icons/DragOne.js";import"../../icons/customIcons/icons/Attention.js";import"../../icons/customIcons/icons/Collapse.js";import"../../icons/customIcons/icons/Dashboard.js";import"../../icons/customIcons/icons/Expand.js";import"../../icons/customIcons/icons/FolderClosed.js";import"../../icons/customIcons/icons/FolderClosedFilled.js";import"../../icons/customIcons/icons/FolderOpened.js";import"../../icons/customIcons/icons/GreaterOrEqual.js";import"../../icons/customIcons/icons/LessOrEqual.js";import"../../icons/customIcons/icons/Search.js";import"../../icons/customIcons/icons/SearchOne.js";import"../../icons/customIcons/icons/Wellhub.js";import"../../icons/customIcons/icons/MultiRuler.js";import"../../icons/customIcons/icons/Checkbox.js";import"../../icons/customIcons/icons/CheckboxChecked.js";import"../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../icons/customIcons/icons/Radio.js";import"../../icons/customIcons/icons/RadioChecked.js";import"../../icons/customIcons/icons/SimulFrac.js";import"../../icons/customIcons/icons/ZipperFrac.js";import"../../icons/customIcons/icons/CautionFilled.js";import"../../icons/customIcons/icons/MoreApp.js";import"../../icons/customIcons/icons/Pad.js";import"../../icons/customIcons/icons/DrilloutUnit.js";import"../../icons/customIcons/icons/FracFleet.js";import"../../icons/customIcons/icons/Global.js";import"../../icons/customIcons/icons/Program.js";import"../../icons/customIcons/icons/Rig.js";import"../../icons/customIcons/icons/Well.js";import"../../icons/customIcons/icons/Gap.js";import"../../icons/customIcons/icons/Pin.js";import"../../icons/customIcons/icons/CloseOneFilled.js";import"../../icons/customIcons/icons/AttentionFilled.js";import"../../icons/customIcons/icons/CheckOneFilled.js";import"../../icons/customIcons/icons/Archive.js";import"../../icons/customIcons/icons/ArchiveCancel.js";import"../../icons/customIcons/icons/Unarchive.js";import"../../icons/customIcons/icons/Archived.js";import"../../icons/customIcons/icons/InterventionUnit.js";import"../../icons/customIcons/icons/CloudDelete.js";import"../../icons/customIcons/icons/Lasso.js";import"../../icons/customIcons/icons/Radius.js";import"../../icons/customIcons/icons/ErrorOps.js";import"../../icons/customIcons/icons/DataTypeOps.js";import"../../icons/customIcons/icons/FalsePositiveOps.js";import"../../icons/customIcons/icons/CalibrationOps.js";import"../../icons/customIcons/icons/CriticalOps.js";import"../../icons/customIcons/icons/Company.js";import"../../icons/customIcons/icons/ArchiveOne.js";import"../../icons/customIcons/icons/ParseBotFusion.js";import"../../icons/customIcons/icons/Connect.js";import"../../icons/customIcons/icons/PuzzleOne.js";import"../../icons/customIcons/icons/Feed.js";import"../../icons/customIcons/icons/Prompt.js";import"../../icons/customIcons/icons/Companies.js";import"../../icons/customIcons/icons/ClipboardAi.js";import"../../icons/customIcons/icons/Key.js";import"../../icons/customIcons/icons/AtSignCrossed.js";import"../../icons/customIcons/icons/MappingManual.js";import"../../icons/customIcons/icons/Mapping.js";import"../../icons/customIcons/icons/Metrics.js";import"../../icons/customIcons/icons/Drops.js";import"../../icons/customIcons/icons/ClipboardSearch.js";import"../../icons/customIcons/icons/Template.js";import"../../icons/customIcons/icons/ClipboardMetrics.js";import"../../icons/customIcons/icons/ClipboardBuilder.js";import"../../icons/customIcons/icons/UnitConversion.js";import"../../icons/customIcons/icons/NPT.js";import"../../icons/customIcons/icons/GuidedFrac.js";import{formatFileSize as j}from"../../utils/formatFileSize.js";import d from"../../utils/main.js";import{jsxs as I,jsx as h}from"react/jsx-runtime";function f(o,s){var c=Object.keys(o);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(o);s&&(i=i.filter((function(s){return Object.getOwnPropertyDescriptor(o,s).enumerable}))),c.push.apply(c,i)}return c}function v(s){for(var c=1;c<arguments.length;c++){var i=null!=arguments[c]?arguments[c]:{};c%2?f(Object(i),!0).forEach((function(c){o(s,c,i[c])})):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(i)):f(Object(i)).forEach((function(o){Object.defineProperty(s,o,Object.getOwnPropertyDescriptor(i,o))}))}return s}var b=function(o){var f,b=o.item,O=o.onShare,P=s(null),g=null!==(f=b.kind)&&void 0!==f?f:"file",C="image"===g||"video"===g,y=a({canZoom:C,canPan:"image"===g,resetKey:b.id}),w=y.viewportRef,A=y.zoom,F=y.zoomIn,N=y.zoomOut,z=y.canZoomIn,k=y.canZoomOut,Z=y.isPannable,D=y.isPanning,M=y.panHandlers,S=d.getFileNameWithExtensionFromPath(b.name),x=b.downloadUrl||b.src;return I("div",{className:p.pane,"data-testid":"attachment-preview-pane",children:[I("div",{className:p.paneHeader,children:[I("div",{className:p.paneName,children:[h("div",{className:p.paneFileName,title:S,children:S}),void 0!==b.size&&h("div",{className:p.paneFileSize,children:j(b.size)})]}),I("div",{className:p.paneActions,children:[!!x&&h(m,{url:x,fileName:S,className:p.paneActionLink,testId:"attachment-preview-download"}),h(t,{item:b,onShare:O,imageRef:P})]})]}),h("div",v(v({className:c(p.paneViewport,Z&&p.paneViewportPannable,D&&p.paneViewportPanning),ref:w},M),{},{children:I("div",{className:p.paneZoomBox,style:{"--attachment-zoom":A},"data-testid":"attachment-preview-zoom-box",children:["image"===g&&h(e,{ref:P,src:b.src,alt:S,className:p.paneMedia,draggable:!1}),"video"===g&&h("video",{src:b.src,className:p.paneMedia,controls:!0,autoPlay:!0,playsInline:!0}),"file"===g&&h(r,{item:b},b.id)]})})),C&&I("div",{className:p.paneZoomControls,children:[h(n,{title:"Zoom in",placement:"left",children:h("span",{className:p.paneZoomButton,children:h(i,{size:"small",type:"tertiaryBg",ariaLabel:"Zoom in",disabled:!z,onClick:F,testId:"attachment-preview-zoom-in",children:h(l,{})})})}),h(n,{title:"Zoom out",placement:"left",children:h("span",{className:p.paneZoomButton,children:h(i,{size:"small",type:"tertiaryBg",ariaLabel:"Zoom out",disabled:!k,onClick:N,testId:"attachment-preview-zoom-out",children:h(u,{})})})})]})]})};export{b as AttachmentPreviewPane};
2
+ //# sourceMappingURL=AttachmentPreviewPane.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AttachmentPreviewPane.js","sources":["../../../src/components/AttachmentLightbox/AttachmentPreviewPane.tsx"],"sourcesContent":["import { CSSProperties, useRef } from 'react';\nimport classNames from 'classnames';\n\nimport { ButtonIcon } from '../../componentsV2/ButtonIcon';\nimport { Tooltip } from '../../componentsV2/Tooltip';\nimport { AttachmentActionsMenu } from '../AttachmentPreview/AttachmentActionsMenu';\nimport { AttachmentImage } from '../AttachmentPreview/AttachmentImage';\nimport { AttachmentDownloadLink } from '../AttachmentPreview/AttachmentDownloadLink';\nimport type { AttachmentPreviewItem } from '../AttachmentPreview/AttachmentPreview.types';\n\nimport { AttachmentDocument } from './AttachmentDocument';\nimport { useZoomPan } from './useZoomPan';\n\nimport styles from './AttachmentLightbox.scss';\n\nimport { MinusIcon, PlusIcon } from '~/icons';\nimport { formatFileSize } from '~/utils/formatFileSize';\nimport utils from '~/utils/main';\n\nexport type AttachmentPreviewPaneProps = {\n item: AttachmentPreviewItem;\n /** Adds \"Share file\" to the overflow menu. */\n onShare?: (item: AttachmentPreviewItem) => void;\n};\n\n/** Zoom is media-only — document viewers scroll and zoom on their own. */\nexport const AttachmentPreviewPane = ({ item, onShare }: AttachmentPreviewPaneProps) => {\n const imageRef = useRef<HTMLImageElement>(null);\n const kind = item.kind ?? 'file';\n const isMedia = kind === 'image' || kind === 'video';\n\n const {\n viewportRef,\n zoom,\n zoomIn,\n zoomOut,\n canZoomIn,\n canZoomOut,\n isPannable,\n isPanning,\n panHandlers,\n // Panning a zoomed <video> would swallow its own controls, so only images get the drag.\n } = useZoomPan({ canZoom: isMedia, canPan: kind === 'image', resetKey: item.id });\n\n const fileName = utils.getFileNameWithExtensionFromPath(item.name);\n const downloadUrl = item.downloadUrl || item.src;\n\n return (\n <div className={styles.pane} data-testid=\"attachment-preview-pane\">\n <div className={styles.paneHeader}>\n <div className={styles.paneName}>\n <div className={styles.paneFileName} title={fileName}>\n {fileName}\n </div>\n {item.size !== undefined && (\n <div className={styles.paneFileSize}>{formatFileSize(item.size)}</div>\n )}\n </div>\n\n <div className={styles.paneActions}>\n {!!downloadUrl && (\n <AttachmentDownloadLink\n url={downloadUrl}\n fileName={fileName}\n className={styles.paneActionLink}\n testId=\"attachment-preview-download\"\n />\n )}\n\n <AttachmentActionsMenu item={item} onShare={onShare} imageRef={imageRef} />\n </div>\n </div>\n\n <div\n className={classNames(\n styles.paneViewport,\n isPannable && styles.paneViewportPannable,\n isPanning && styles.paneViewportPanning\n )}\n ref={viewportRef}\n {...panHandlers}\n >\n <div\n className={styles.paneZoomBox}\n style={{ '--attachment-zoom': zoom } as CSSProperties}\n data-testid=\"attachment-preview-zoom-box\"\n >\n {kind === 'image' && (\n <AttachmentImage\n ref={imageRef}\n src={item.src}\n alt={fileName}\n className={styles.paneMedia}\n draggable={false}\n />\n )}\n\n {kind === 'video' && (\n // eslint-disable-next-line jsx-a11y/media-has-caption\n <video src={item.src} className={styles.paneMedia} controls autoPlay playsInline />\n )}\n\n {/* Keyed: a kept-alive instance would pair the previous file's data with the new\n renderer for one render. */}\n {kind === 'file' && <AttachmentDocument key={item.id} item={item} />}\n </div>\n </div>\n\n {isMedia && (\n <div className={styles.paneZoomControls}>\n {/* A disabled button fires no events, so the tooltip listens on a wrapper instead. */}\n <Tooltip title=\"Zoom in\" placement=\"left\">\n <span className={styles.paneZoomButton}>\n <ButtonIcon\n size=\"small\"\n type=\"tertiaryBg\"\n ariaLabel=\"Zoom in\"\n disabled={!canZoomIn}\n onClick={zoomIn}\n testId=\"attachment-preview-zoom-in\"\n >\n <PlusIcon />\n </ButtonIcon>\n </span>\n </Tooltip>\n\n <Tooltip title=\"Zoom out\" placement=\"left\">\n <span className={styles.paneZoomButton}>\n <ButtonIcon\n size=\"small\"\n type=\"tertiaryBg\"\n ariaLabel=\"Zoom out\"\n disabled={!canZoomOut}\n onClick={zoomOut}\n testId=\"attachment-preview-zoom-out\"\n >\n <MinusIcon />\n </ButtonIcon>\n </span>\n </Tooltip>\n </div>\n )}\n </div>\n );\n};\n"],"names":["AttachmentPreviewPane","_ref","_item$kind","item","onShare","imageRef","useRef","kind","isMedia","_useZoomPan","useZoomPan","canZoom","canPan","resetKey","id","viewportRef","zoom","zoomIn","zoomOut","canZoomIn","canZoomOut","isPannable","isPanning","panHandlers","fileName","utils","getFileNameWithExtensionFromPath","name","downloadUrl","src","_jsxs","className","styles","pane","children","paneHeader","paneName","_jsx","paneFileName","title","undefined","size","paneFileSize","formatFileSize","paneActions","AttachmentDownloadLink","url","paneActionLink","testId","AttachmentActionsMenu","_objectSpread","classNames","paneViewport","paneViewportPannable","paneViewportPanning","ref","paneZoomBox","style","AttachmentImage","alt","paneMedia","draggable","controls","autoPlay","playsInline","AttachmentDocument","paneZoomControls","Tooltip","placement","paneZoomButton","ButtonIcon","type","ariaLabel","disabled","onClick","PlusIcon","MinusIcon"],"mappings":"g/JA0BaA,IAAAA,EAAwB,SAAmDC,GAAA,IAAAC,EAAhDC,IAAAA,KAAMC,IAAAA,QACtCC,EAAWC,EAAyB,MACpCC,UAAOJ,EAAAA,EAAKI,oBAAQ,OACpBC,EAAmB,UAATD,GAA6B,UAATA,EAEpCE,EAWIC,EAAW,CAAEC,QAASH,EAASI,OAAiB,UAATL,EAAkBM,SAAUV,EAAKW,KAV1EC,IAAAA,YACAC,IAAAA,KACAC,IAAAA,OACAC,IAAAA,QACAC,IAAAA,UACAC,IAAAA,WACAC,IAAAA,WACAC,IAAAA,UACAC,IAAAA,YAIIC,EAAWC,EAAMC,iCAAiCvB,EAAKwB,MACvDC,EAAczB,EAAKyB,aAAezB,EAAK0B,IAE7C,OACEC,EAAA,MAAA,CAAKC,UAAWC,EAAOC,KAAM,cAAY,0BAAyBC,SAChE,CAAAJ,EAAA,MAAA,CAAKC,UAAWC,EAAOG,WAAWD,SAChC,CAAAJ,EAAA,MAAA,CAAKC,UAAWC,EAAOI,SAASF,SAC9B,CAAAG,EAAA,MAAA,CAAKN,UAAWC,EAAOM,aAAcC,MAAOf,EAASU,SAClDV,SAEYgB,IAAdrC,EAAKsC,MACJJ,EAAA,MAAA,CAAKN,UAAWC,EAAOU,aAAaR,SAAES,EAAexC,EAAKsC,WAI9DX,EAAA,MAAA,CAAKC,UAAWC,EAAOY,YAAYV,SAAA,GAC9BN,GACDS,EAACQ,EAAsB,CACrBC,IAAKlB,EACLJ,SAAUA,EACVO,UAAWC,EAAOe,eAClBC,OAAO,gCAIXX,EAACY,EAAqB,CAAC9C,KAAMA,EAAMC,QAASA,EAASC,SAAUA,UAInEgC,EAAA,MAAAa,EAAAA,EAAA,CACEnB,UAAWoB,EACTnB,EAAOoB,aACP/B,GAAcW,EAAOqB,qBACrB/B,GAAaU,EAAOsB,qBAEtBC,IAAKxC,GACDQ,GAAW,GAAA,CAAAW,SAEfJ,EAAA,MAAA,CACEC,UAAWC,EAAOwB,YAClBC,MAAO,CAAE,oBAAqBzC,GAC9B,cAAY,8BAA6BkB,SAAA,CAE/B,UAAT3B,GACC8B,EAACqB,EAAe,CACdH,IAAKlD,EACLwB,IAAK1B,EAAK0B,IACV8B,IAAKnC,EACLO,UAAWC,EAAO4B,UAClBC,WAAW,IAIL,UAATtD,GAEC8B,EAAA,QAAA,CAAOR,IAAK1B,EAAK0B,IAAKE,UAAWC,EAAO4B,UAAWE,UAAQ,EAACC,UAAQ,EAACC,aAAW,IAKxE,SAATzD,GAAmB8B,EAAC4B,EAAkB,CAAe9D,KAAMA,GAAfA,EAAKW,UAIrDN,GACCsB,EAAA,MAAA,CAAKC,UAAWC,EAAOkC,iBAAiBhC,SAAA,CAEtCG,EAAC8B,EAAO,CAAC5B,MAAM,UAAU6B,UAAU,OAAMlC,SACvCG,EAAA,OAAA,CAAMN,UAAWC,EAAOqC,eAAenC,SACrCG,EAACiC,EAAU,CACT7B,KAAK,QACL8B,KAAK,aACLC,UAAU,UACVC,UAAWtD,EACXuD,QAASzD,EACT+B,OAAO,6BAA4Bd,SAEnCG,EAACsC,EAAQ,UAKftC,EAAC8B,EAAO,CAAC5B,MAAM,WAAW6B,UAAU,OAAMlC,SACxCG,EAAA,OAAA,CAAMN,UAAWC,EAAOqC,eAAenC,SACrCG,EAACiC,EAAU,CACT7B,KAAK,QACL8B,KAAK,aACLC,UAAU,WACVC,UAAWrD,EACXsD,QAASxD,EACT8B,OAAO,8BAA6Bd,SAEpCG,EAACuC,EAAS,eAQ1B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=AttachmentDocument.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AttachmentDocument.test.d.ts","sourceRoot":"","sources":["../../../../src/components/AttachmentLightbox/__tests__/AttachmentDocument.test.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=AttachmentLightbox.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AttachmentLightbox.test.d.ts","sourceRoot":"","sources":["../../../../src/components/AttachmentLightbox/__tests__/AttachmentLightbox.test.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=copyImageToClipboard.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"copyImageToClipboard.test.d.ts","sourceRoot":"","sources":["../../../../src/components/AttachmentLightbox/__tests__/copyImageToClipboard.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=downloadAttachment.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"downloadAttachment.test.d.ts","sourceRoot":"","sources":["../../../../src/components/AttachmentLightbox/__tests__/downloadAttachment.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=useZoomPan.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useZoomPan.test.d.ts","sourceRoot":"","sources":["../../../../src/components/AttachmentLightbox/__tests__/useZoomPan.test.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export declare const getCanCopyImages: () => boolean;
2
+ /** Copies the pixels already on screen when the page may read them, else fetches the bytes. */
3
+ export declare const copyImageToClipboard: (src: string, image?: HTMLImageElement | null) => Promise<boolean>;
4
+ //# sourceMappingURL=copyImageToClipboard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"copyImageToClipboard.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentLightbox/copyImageToClipboard.ts"],"names":[],"mappings":"AA0CA,eAAO,MAAM,gBAAgB,eACyC,CAAC;AAQvE,+FAA+F;AAC/F,eAAO,MAAM,oBAAoB,QAC1B,MAAM,UACH,gBAAgB,GAAG,IAAI,KAC9B,OAAO,CAAC,OAAO,CAsBjB,CAAC"}
@@ -0,0 +1,2 @@
1
+ import r from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/regenerator";import{fetchAttachment as e}from"../../utils/fetchAttachment.js";var n=function(r,t,e){var n=document.createElement("canvas");n.width=t,n.height=e;var a=n.getContext("2d");if(!a)throw new Error("Could not get a 2d canvas context");return a.drawImage(r,0,0),new Promise((function(r,t){n.toBlob((function(e){return e?r(e):t(new Error("Could not encode the image"))}),"image/png")}))},a=function(){var e=r(t.mark((function r(e){var a;return t.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,createImageBitmap(e);case 2:return a=r.sent,r.abrupt("return",n(a,a.width,a.height));case 4:case"end":return r.stop()}}),r)})));return function(r){return e.apply(this,arguments)}}(),u=function(){var e=r(t.mark((function r(e){return t.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",n(e,e.naturalWidth,e.naturalHeight));case 1:case"end":return r.stop()}}),r)})));return function(r){return e.apply(this,arguments)}}(),o=function(){var n=r(t.mark((function r(n){var u,o;return t.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,e(n);case 2:if((u=r.sent).ok){r.next=5;break}throw new Error("Could not read the image (".concat(u.status,")"));case 5:return r.next=7,u.blob();case 7:return o=r.sent,r.abrupt("return","image/png"===o.type?o:a(o));case 9:case"end":return r.stop()}}),r)})));return function(r){return n.apply(this,arguments)}}(),c=function(){var r;return"undefined"!=typeof ClipboardItem&&!(null===(r=navigator.clipboard)||void 0===r||!r.write)},i=function(r){return navigator.clipboard.write([new ClipboardItem({"image/png":r})])},p=function(r){return!(null==r||!r.complete||!r.naturalWidth)},s=function(){var e=r(t.mark((function r(e,n){return t.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(c()){r.next=2;break}return r.abrupt("return",!1);case 2:if(!p(n)){r.next=11;break}return r.prev=3,r.next=6,i(u(n));case 6:return r.abrupt("return",!0);case 9:r.prev=9,r.t0=r.catch(3);case 11:if(e){r.next=13;break}return r.abrupt("return",!1);case 13:return r.prev=13,r.next=16,i(o(e));case 16:return r.abrupt("return",!0);case 19:return r.prev=19,r.t1=r.catch(13),console.error('Failed to copy attachment "'.concat(e,'" to the clipboard'),r.t1),r.abrupt("return",!1);case 23:case"end":return r.stop()}}),r,null,[[3,9],[13,19]])})));return function(r,t){return e.apply(this,arguments)}}();export{s as copyImageToClipboard,c as getCanCopyImages};
2
+ //# sourceMappingURL=copyImageToClipboard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"copyImageToClipboard.js","sources":["../../../src/components/AttachmentLightbox/copyImageToClipboard.ts"],"sourcesContent":["import { fetchAttachment } from '~/utils/fetchAttachment';\n\nconst toPng = (source: CanvasImageSource, width: number, height: number): Promise<Blob> => {\n const canvas = document.createElement('canvas');\n canvas.width = width;\n canvas.height = height;\n\n const context = canvas.getContext('2d');\n\n if (!context) throw new Error('Could not get a 2d canvas context');\n\n context.drawImage(source, 0, 0);\n\n return new Promise((resolve, reject) => {\n // Throws for an image the page was not allowed to read, which is the tainted-canvas signal.\n canvas.toBlob(\n encoded => (encoded ? resolve(encoded) : reject(new Error('Could not encode the image'))),\n 'image/png'\n );\n });\n};\n\nconst encodeAsPng = async (blob: Blob): Promise<Blob> => {\n const bitmap = await createImageBitmap(blob);\n\n return toPng(bitmap, bitmap.width, bitmap.height);\n};\n\nconst pngFromElement = async (image: HTMLImageElement): Promise<Blob> =>\n toPng(image, image.naturalWidth, image.naturalHeight);\n\n// Chrome only accepts PNG on the clipboard, so anything else is re-encoded.\nconst fetchAsPng = async (src: string): Promise<Blob> => {\n const response = await fetchAttachment(src);\n\n if (!response.ok) throw new Error(`Could not read the image (${response.status})`);\n\n const blob = await response.blob();\n\n return blob.type === 'image/png' ? blob : encodeAsPng(blob);\n};\n\nexport const getCanCopyImages = () =>\n typeof ClipboardItem !== 'undefined' && !!navigator.clipboard?.write;\n\nconst write = (png: Promise<Blob>) =>\n // A promise, not an awaited blob: Safari requires the write inside the user gesture.\n navigator.clipboard.write([new ClipboardItem({ 'image/png': png })]);\n\nconst isReady = (image?: HTMLImageElement | null) => !!image?.complete && !!image.naturalWidth;\n\n/** Copies the pixels already on screen when the page may read them, else fetches the bytes. */\nexport const copyImageToClipboard = async (\n src: string,\n image?: HTMLImageElement | null\n): Promise<boolean> => {\n if (!getCanCopyImages()) return false;\n\n if (isReady(image)) {\n try {\n await write(pngFromElement(image as HTMLImageElement));\n\n return true;\n } catch {}\n }\n\n if (!src) return false;\n\n try {\n await write(fetchAsPng(src));\n\n return true;\n } catch (error) {\n console.error(`Failed to copy attachment \"${src}\" to the clipboard`, error);\n\n return false;\n }\n};\n"],"names":["toPng","source","width","height","canvas","document","createElement","context","getContext","Error","drawImage","Promise","resolve","reject","toBlob","encoded","encodeAsPng","_ref","_asyncToGenerator","_regeneratorRuntime","mark","blob","bitmap","wrap","_context","prev","next","createImageBitmap","sent","stop","_callee","_x","apply","this","arguments","pngFromElement","_ref2","image","_context2","naturalWidth","naturalHeight","_callee2","_x2","fetchAsPng","_ref3","src","response","_context3","fetchAttachment","ok","concat","status","type","_callee3","_x3","getCanCopyImages","_navigator$clipboard","ClipboardItem","navigator","clipboard","write","png","isReady","complete","copyImageToClipboard","_ref4","_callee4","_context4","abrupt","t0","t1","console","error","_x4","_x5"],"mappings":"kKAEA,IAAMA,EAAQ,SAACC,EAA2BC,EAAeC,GACvD,IAAMC,EAASC,SAASC,cAAc,UACtCF,EAAOF,MAAQA,EACfE,EAAOD,OAASA,EAEhB,IAAMI,EAAUH,EAAOI,WAAW,MAElC,IAAKD,EAAS,MAAM,IAAIE,MAAM,qCAI9B,OAFAF,EAAQG,UAAUT,EAAQ,EAAG,GAEtB,IAAIU,SAAQ,SAACC,EAASC,GAE3BT,EAAOU,QACL,SAAAC,GAAO,OAAKA,EAAUH,EAAQG,GAAWF,EAAO,IAAIJ,MAAM,8BAA+B,GACzF,YAEJ,GACF,EAEMO,EAAW,WAAA,IAAAC,EAAAC,EAAAC,EAAAC,MAAG,WAAOC,GAAU,IAAAC,EAAA,OAAAH,EAAAI,MAAA,SAAAC,GAAA,OAAA,OAAAA,EAAAC,KAAAD,EAAAE,MAAA,KAAA,EAAA,OAAAF,EAAAE,KAAA,EACdC,kBAAkBN,GAAK,KAAA,EAAhC,OAANC,EAAME,EAAAI,KAEL5B,EAAAA,OAAAA,SAAAA,EAAMsB,EAAQA,EAAOpB,MAAOoB,EAAOnB,SAAO,KAAA,EAAA,IAAA,MAAA,OAAAqB,EAAAK,OAAA,GAAAC,EAClD,KAAA,OAAA,SAJgBC,GAAA,OAAAd,EAAAe,MAAAC,KAAAC,UAAA,CAAA,CAAA,GAMXC,EAAc,WAAA,IAAAC,EAAAlB,EAAAC,EAAAC,MAAG,WAAOiB,GAAuB,OAAAlB,EAAAI,MAAA,SAAAe,GAAA,OAAA,OAAAA,EAAAb,KAAAa,EAAAZ,MAAA,KAAA,EAAA,OACnD1B,EAAAA,OAAAA,SAAAA,EAAMqC,EAAOA,EAAME,aAAcF,EAAMG,gBAAc,KAAA,EAAA,IAAA,MAAA,OAAAF,EAAAT,OAAA,GAAAY,EAAA,KAAA,OAAA,SADnCC,GAAA,OAAAN,EAAAJ,MAAAC,KAAAC,UAAA,CAAA,CAAA,GAIdS,EAAU,WAAA,IAAAC,EAAA1B,EAAAC,EAAAC,MAAG,WAAOyB,GAAW,IAAAC,EAAAzB,EAAA,OAAAF,EAAAI,MAAA,SAAAwB,GAAA,OAAA,OAAAA,EAAAtB,KAAAsB,EAAArB,MAAA,KAAA,EAAA,OAAAqB,EAAArB,KAAA,EACZsB,EAAgBH,GAAI,KAAA,EAA7B,IAARC,EAAQC,EAAAnB,MAEAqB,GAAE,CAAAF,EAAArB,KAAA,EAAA,KAAA,CAAA,MAAQ,IAAIjB,MAAK,6BAAAyC,OAA8BJ,EAASK,OAAU,MAAA,KAAA,EAAA,OAAAJ,EAAArB,KAAA,EAE/DoB,EAASzB,OAAM,KAAA,EAAxB,OAAJA,EAAI0B,EAAAnB,KAEHP,EAAAA,OAAAA,SAAc,cAAdA,EAAK+B,KAAuB/B,EAAOL,EAAYK,IAAK,KAAA,EAAA,IAAA,MAAA,OAAA0B,EAAAlB,OAAA,GAAAwB,EAC5D,KAAA,OAAA,SAReC,GAAA,OAAAV,EAAAZ,MAAAC,KAAAC,UAAA,CAAA,CAAA,GAUHqB,EAAmB,WAAH,IAAAC,EAAA,MACF,oBAAlBC,iBAAmC,QAAAC,EAAAA,UAAUC,iBAAV,IAAAH,IAAAA,EAAqBI,MAAK,EAEhEA,EAAQ,SAACC,GAAkB,OAE/BH,UAAUC,UAAUC,MAAM,CAAC,IAAIH,cAAc,CAAE,YAAaI,KAAQ,EAEhEC,EAAU,SAACzB,GAA+B,QAAOA,UAAAA,EAAO0B,WAAc1B,EAAME,aAAY,EAGjFyB,EAAoB,WAAA,IAAGC,EAAA/C,EAAAC,EAAAC,MAAA,SAAA8C,EAClCrB,EACAR,GAA+B,OAAAlB,EAAAI,MAAA,SAAA4C,GAAA,OAAA,OAAAA,EAAA1C,KAAA0C,EAAAzC,MAAA,KAAA,EAAA,GAE1B6B,IAAkB,CAAAY,EAAAzC,KAAA,EAAA,KAAA,CAAA,OAAAyC,EAAAC,OAAA,UAAS,GAAK,KAAA,EAAA,IAEjCN,EAAQzB,GAAM,CAAA8B,EAAAzC,KAAA,GAAA,KAAA,CAAA,OAAAyC,EAAA1C,KAAA,EAAA0C,EAAAzC,KAAA,EAERkC,EAAMzB,EAAeE,IAA2B,KAAA,EAAA,OAAA8B,EAAAC,OAAA,UAE/C,GAAI,KAAA,EAAAD,EAAA1C,KAAA,EAAA0C,EAAAE,GAAAF,EAAA,MAAA,GAAA,KAAA,GAAA,GAIVtB,EAAG,CAAAsB,EAAAzC,KAAA,GAAA,KAAA,CAAA,OAAAyC,EAAAC,OAAA,UAAS,GAAK,KAAA,GAAA,OAAAD,EAAA1C,KAAA,GAAA0C,EAAAzC,KAAA,GAGdkC,EAAMjB,EAAWE,IAAK,KAAA,GAAA,OAAAsB,EAAAC,OAAA,UAErB,GAAI,KAAA,GAEiE,OAFjED,EAAA1C,KAAA,GAAA0C,EAAAG,GAAAH,EAAA,MAAA,IAEXI,QAAQC,MAAoC3B,8BAAAA,OAAAA,EAA+B,sBAAAsB,EAAAG,IAACH,EAAAC,OAAA,UAErE,GAAK,KAAA,GAAA,IAAA,MAAA,OAAAD,EAAAtC,OAAA,GAAAqC,EAAA,KAAA,CAAA,CAAA,EAAA,GAAA,CAAA,GAAA,KAEf,KAAA,OAAA,SAzBgCO,EAAAC,GAAA,OAAAT,EAAAjC,MAAAC,KAAAC,UAAA,CAAA,CAAA"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * `download` is ignored cross-origin, where a plain link navigates the app away instead. Fetching
3
+ * the bytes and handing the browser a blob url saves under the right name wherever the file lives.
4
+ */
5
+ export declare const downloadAttachment: (url: string, fileName: string) => Promise<boolean>;
6
+ /** Stored data, not a literal: an unchecked `javascript:` url would run on open. */
7
+ export declare const openAttachmentInNewTab: (url: string) => void;
8
+ /** Saves the file, falling back to a tab when the bytes cannot be read. */
9
+ export declare const saveAttachment: (url: string, fileName: string) => Promise<void>;
10
+ //# sourceMappingURL=downloadAttachment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"downloadAttachment.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentLightbox/downloadAttachment.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,eAAO,MAAM,kBAAkB,QAAe,MAAM,YAAY,MAAM,KAAG,OAAO,CAAC,OAAO,CAwBvF,CAAC;AAIF,oFAAoF;AACpF,eAAO,MAAM,sBAAsB,QAAS,MAAM,KAAG,IAapD,CAAC;AAEF,2EAA2E;AAC3E,eAAO,MAAM,cAAc,QAAe,MAAM,YAAY,MAAM,KAAG,OAAO,CAAC,IAAI,CAEhF,CAAC"}
@@ -0,0 +1,2 @@
1
+ import e from"@babel/runtime/helpers/asyncToGenerator";import r from"@babel/runtime/regenerator";import{fetchAttachment as t}from"../../utils/fetchAttachment.js";var n=function(){var n=e(r.mark((function e(n,o){var a,c,u;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n){e.next=2;break}return e.abrupt("return",!1);case 2:return e.prev=2,e.next=5,t(n);case 5:if((a=e.sent).ok){e.next=8;break}throw new Error("Could not read the file (".concat(a.status,")"));case 8:return e.t0=URL,e.next=11,a.blob();case 11:return e.t1=e.sent,c=e.t0.createObjectURL.call(e.t0,e.t1),(u=document.createElement("a")).href=c,u.download=o,document.body.appendChild(u),u.click(),u.remove(),URL.revokeObjectURL(c),e.abrupt("return",!0);case 23:return e.prev=23,e.t2=e.catch(2),console.error('Failed to download "'.concat(n,'"'),e.t2),e.abrupt("return",!1);case 27:case"end":return e.stop()}}),e,null,[[2,23]])})));return function(e,r){return n.apply(this,arguments)}}(),o=["http:","https:","blob:"],a=function(e){if(e)try{var r=new URL(e,window.location.href).protocol;if(!o.includes(r))throw new Error("Refusing to open a ".concat(r," url"));window.open(e,"_blank","noopener")}catch(r){console.error('Failed to open "'.concat(e,'"'),r)}},c=function(){var t=e(r.mark((function e(t,o){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n(t,o);case 2:if(e.sent){e.next=4;break}a(t);case 4:case"end":return e.stop()}}),e)})));return function(e,r){return t.apply(this,arguments)}}();export{n as downloadAttachment,a as openAttachmentInNewTab,c as saveAttachment};
2
+ //# sourceMappingURL=downloadAttachment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"downloadAttachment.js","sources":["../../../src/components/AttachmentLightbox/downloadAttachment.ts"],"sourcesContent":["import { fetchAttachment } from '~/utils/fetchAttachment';\n\n/**\n * `download` is ignored cross-origin, where a plain link navigates the app away instead. Fetching\n * the bytes and handing the browser a blob url saves under the right name wherever the file lives.\n */\nexport const downloadAttachment = async (url: string, fileName: string): Promise<boolean> => {\n if (!url) return false;\n\n try {\n const response = await fetchAttachment(url);\n\n if (!response.ok) throw new Error(`Could not read the file (${response.status})`);\n\n const blobUrl = URL.createObjectURL(await response.blob());\n const link = document.createElement('a');\n\n link.href = blobUrl;\n link.download = fileName;\n document.body.appendChild(link);\n link.click();\n link.remove();\n URL.revokeObjectURL(blobUrl);\n\n return true;\n } catch (error) {\n console.error(`Failed to download \"${url}\"`, error);\n\n return false;\n }\n};\n\nconst SAFE_SCHEMES = ['http:', 'https:', 'blob:'];\n\n/** Stored data, not a literal: an unchecked `javascript:` url would run on open. */\nexport const openAttachmentInNewTab = (url: string): void => {\n // An empty one resolves to the page itself, passes the check below, and opens a blank tab.\n if (!url) return;\n\n try {\n const { protocol } = new URL(url, window.location.href);\n\n if (!SAFE_SCHEMES.includes(protocol)) throw new Error(`Refusing to open a ${protocol} url`);\n\n window.open(url, '_blank', 'noopener');\n } catch (error) {\n console.error(`Failed to open \"${url}\"`, error);\n }\n};\n\n/** Saves the file, falling back to a tab when the bytes cannot be read. */\nexport const saveAttachment = async (url: string, fileName: string): Promise<void> => {\n if (!(await downloadAttachment(url, fileName))) openAttachmentInNewTab(url);\n};\n"],"names":["downloadAttachment","_ref","_asyncToGenerator","_regeneratorRuntime","mark","_callee","url","fileName","response","blobUrl","link","wrap","_context","prev","next","abrupt","fetchAttachment","sent","ok","Error","concat","status","t0","URL","blob","t1","createObjectURL","call","document","createElement","href","download","body","appendChild","click","remove","revokeObjectURL","t2","console","error","stop","_x","_x2","apply","this","arguments","SAFE_SCHEMES","openAttachmentInNewTab","protocol","window","location","includes","open","saveAttachment","_ref2","_callee2","_context2","_x3","_x4"],"mappings":"sKAMaA,EAAkB,WAAA,IAAGC,EAAAC,EAAAC,EAAAC,MAAA,SAAAC,EAAOC,EAAaC,GAAgB,IAAAC,EAAAC,EAAAC,EAAA,OAAAP,EAAAQ,MAAA,SAAAC,GAAA,OAAA,OAAAA,EAAAC,KAAAD,EAAAE,MAAA,KAAA,EAAA,GAC/DR,EAAG,CAAAM,EAAAE,KAAA,EAAA,KAAA,CAAA,OAAAF,EAAAG,OAAA,UAAS,GAAK,KAAA,EAAA,OAAAH,EAAAC,KAAA,EAAAD,EAAAE,KAAA,EAGGE,EAAgBV,GAAI,KAAA,EAA7B,IAARE,EAAQI,EAAAK,MAEAC,GAAE,CAAAN,EAAAE,KAAA,EAAA,KAAA,CAAA,MAAQ,IAAIK,MAAK,4BAAAC,OAA6BZ,EAASa,OAAU,MAAA,KAAA,EAE9D,OAF8DT,EAAAU,GAEjEC,IAAGX,EAAAE,KAAA,GAAuBN,EAASgB,OAAM,KAAA,GAQ5B,OAR4BZ,EAAAa,GAAAb,EAAAK,KAAnDR,OAAciB,gBAAeC,KAAAf,EAAAU,GAAAV,EAAAa,KAC7Bf,EAAOkB,SAASC,cAAc,MAE/BC,KAAOrB,EACZC,EAAKqB,SAAWxB,EAChBqB,SAASI,KAAKC,YAAYvB,GAC1BA,EAAKwB,QACLxB,EAAKyB,SACLZ,IAAIa,gBAAgB3B,GAASG,EAAAG,OAAA,UAEtB,GAAI,KAAA,GAEyC,OAFzCH,EAAAC,KAAA,GAAAD,EAAAyB,GAAAzB,EAAA,MAAA,GAEX0B,QAAQC,MAA6BjC,uBAAAA,OAAAA,EAAc,KAAAM,EAAAyB,IAACzB,EAAAG,OAAA,UAE7C,GAAK,KAAA,GAAA,IAAA,MAAA,OAAAH,EAAA4B,OAAA,GAAAnC,EAAA,KAAA,CAAA,CAAA,EAAA,KAEf,KAAA,OAAA,SAxB8BoC,EAAAC,GAAA,OAAAzC,EAAA0C,MAAAC,KAAAC,UAAA,CAAA,CAAA,GA0BzBC,EAAe,CAAC,QAAS,SAAU,SAG5BC,EAAyB,SAACzC,GAErC,GAAKA,EAEL,IACE,IAAQ0C,EAAa,IAAIzB,IAAIjB,EAAK2C,OAAOC,SAASpB,MAA1CkB,SAER,IAAKF,EAAaK,SAASH,GAAW,MAAM,IAAI7B,MAAK,sBAAAC,OAAuB4B,EAAe,SAE3FC,OAAOG,KAAK9C,EAAK,SAAU,WAG7B,CAFE,MAAOiC,GACPD,QAAQC,MAAK,mBAAAnB,OAAoBd,EAAG,KAAKiC,EAC3C,CACF,EAGac,EAAc,WAAA,IAAGC,EAAApD,EAAAC,EAAAC,MAAA,SAAAmD,EAAOjD,EAAaC,GAAgB,OAAAJ,EAAAQ,MAAA,SAAA6C,GAAA,OAAA,OAAAA,EAAA3C,KAAA2C,EAAA1C,MAAA,KAAA,EAAA,OAAA0C,EAAA1C,KAAA,EACpDd,EAAmBM,EAAKC,GAAS,KAAA,EAAA,GAAAiD,EAAAvC,KAAA,CAAAuC,EAAA1C,KAAA,EAAA,KAAA,CAAGiC,EAAuBzC,GAAK,KAAA,EAAA,IAAA,MAAA,OAAAkD,EAAAhB,OAAA,GAAAe,EAC7E,KAAA,OAAA,SAF0BE,EAAAC,GAAA,OAAAJ,EAAAX,MAAAC,KAAAC,UAAA,CAAA,CAAA"}
@@ -1,6 +1,10 @@
1
1
  import type { AttachmentPreviewItem } from '../AttachmentPreview/AttachmentPreview.types';
2
- /** Images and videos open in the lightbox; documents are left to their download link. */
3
- export declare const useAttachmentLightbox: () => {
2
+ export type UseAttachmentLightboxOptions = {
3
+ /** Adds "Share file" to the overflow menu. */
4
+ onShare?: (item: AttachmentPreviewItem) => void;
5
+ };
6
+ /** Wires attachments to the preview modal; a kind with no renderer shows a download card. */
7
+ export declare const useAttachmentLightbox: (items: AttachmentPreviewItem[], { onShare }?: UseAttachmentLightboxOptions) => {
4
8
  openAttachment: (item: AttachmentPreviewItem) => void;
5
9
  lightbox: import("react/jsx-runtime").JSX.Element;
6
10
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useAttachmentLightbox.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentLightbox/useAttachmentLightbox.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8CAA8C,CAAC;AAI1F,yFAAyF;AACzF,eAAO,MAAM,qBAAqB;2BAGF,qBAAqB;;CAYpD,CAAC"}
1
+ {"version":3,"file":"useAttachmentLightbox.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentLightbox/useAttachmentLightbox.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8CAA8C,CAAC;AAI1F,MAAM,MAAM,4BAA4B,GAAG;IACzC,8CAA8C;IAC9C,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,qBAAqB,KAAK,IAAI,CAAC;CACjD,CAAC;AAEF,6FAA6F;AAC7F,eAAO,MAAM,qBAAqB,UACzB,qBAAqB,EAAE,gBACjB,4BAA4B;2BAIX,qBAAqB;;CAgBpD,CAAC"}
@@ -1,2 +1,2 @@
1
- import r from"@babel/runtime/helpers/slicedToArray";import{useState as t}from"react";import{AttachmentLightbox as n}from"./AttachmentLightbox.js";import{jsx as e}from"react/jsx-runtime";var o=function(){var o=t(null),i=r(o,2),m=i[0],a=i[1];return{openAttachment:function(r){("image"===r.kind||"video"===r.kind)&&r.src&&a({src:r.src,name:r.name,kind:r.kind})},lightbox:e(n,{attachment:m,onClose:function(){return a(null)}})}};export{o as useAttachmentLightbox};
1
+ import r from"@babel/runtime/helpers/slicedToArray";import{useState as t}from"react";import{AttachmentLightbox as o}from"./AttachmentLightbox.js";import{jsx as e}from"react/jsx-runtime";var n=function(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=i.onShare,m=t(null),l=r(m,2),c=l[0],h=l[1],u=function(r){r.isUploading||r.error||h(r.id)};return{openAttachment:u,lightbox:e(o,{items:n,activeId:c,onActiveIdChange:h,onClose:function(){return h(null)},onShare:a})}};export{n as useAttachmentLightbox};
2
2
  //# sourceMappingURL=useAttachmentLightbox.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useAttachmentLightbox.js","sources":["../../../src/components/AttachmentLightbox/useAttachmentLightbox.tsx"],"sourcesContent":["import { useState } from 'react';\n\nimport type { AttachmentPreviewItem } from '../AttachmentPreview/AttachmentPreview.types';\n\nimport { AttachmentLightbox, LightboxAttachment } from './AttachmentLightbox';\n\n/** Images and videos open in the lightbox; documents are left to their download link. */\nexport const useAttachmentLightbox = () => {\n const [attachment, setAttachment] = useState<LightboxAttachment | null>(null);\n\n const openAttachment = (item: AttachmentPreviewItem) => {\n const isPlayable = item.kind === 'image' || item.kind === 'video';\n\n if (isPlayable && item.src) {\n setAttachment({ src: item.src, name: item.name, kind: item.kind });\n }\n };\n\n return {\n openAttachment,\n lightbox: <AttachmentLightbox attachment={attachment} onClose={() => setAttachment(null)} />,\n };\n};\n"],"names":["useAttachmentLightbox","useState","_useState2","_slicedToArray","_useState","attachment","setAttachment","openAttachment","item","kind","src","name","lightbox","_jsx","AttachmentLightbox","onClose"],"mappings":"0LAOaA,IAAAA,EAAwB,WACnC,IAAoCC,EAAAA,EAAoC,MAAKC,EAAAC,EAAAC,EAAA,GAAtEC,EAAUH,EAAA,GAAEI,EAAaJ,EAAA,GAUhC,MAAO,CACLK,eATqB,SAACC,IACW,UAAdA,EAAKC,MAAkC,UAAdD,EAAKC,OAE/BD,EAAKE,KACrBJ,EAAc,CAAEI,IAAKF,EAAKE,IAAKC,KAAMH,EAAKG,KAAMF,KAAMD,EAAKC,QAM7DG,SAAUC,EAACC,EAAkB,CAACT,WAAYA,EAAYU,QAAS,WAAA,OAAMT,EAAc,KAAK,IAE5F"}
1
+ {"version":3,"file":"useAttachmentLightbox.js","sources":["../../../src/components/AttachmentLightbox/useAttachmentLightbox.tsx"],"sourcesContent":["import { useState } from 'react';\n\nimport type { AttachmentPreviewItem } from '../AttachmentPreview/AttachmentPreview.types';\n\nimport { AttachmentLightbox } from './AttachmentLightbox';\n\nexport type UseAttachmentLightboxOptions = {\n /** Adds \"Share file\" to the overflow menu. */\n onShare?: (item: AttachmentPreviewItem) => void;\n};\n\n/** Wires attachments to the preview modal; a kind with no renderer shows a download card. */\nexport const useAttachmentLightbox = (\n items: AttachmentPreviewItem[],\n { onShare }: UseAttachmentLightboxOptions = {}\n) => {\n const [activeId, setActiveId] = useState<AttachmentPreviewItem['id'] | null>(null);\n\n const openAttachment = (item: AttachmentPreviewItem) => {\n if (!item.isUploading && !item.error) setActiveId(item.id);\n };\n\n return {\n openAttachment,\n lightbox: (\n <AttachmentLightbox\n items={items}\n activeId={activeId}\n onActiveIdChange={setActiveId}\n onClose={() => setActiveId(null)}\n onShare={onShare}\n />\n ),\n };\n};\n"],"names":["useAttachmentLightbox","items","_ref","arguments","length","undefined","onShare","useState","_useState2","_slicedToArray","_useState","activeId","setActiveId","openAttachment","item","isUploading","error","id","lightbox","_jsx","AttachmentLightbox","onActiveIdChange","onClose"],"mappings":"8LAYaA,EAAwB,SACnCC,GAEG,IAAAC,EAAAC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GADyC,CAAE,EAA5CG,IAAAA,QAE8BC,EAAAA,EAA6C,MAAKC,EAAAC,EAAAC,EAAA,GAA3EC,EAAQH,EAAA,GAAEI,EAAWJ,EAAA,GAEtBK,EAAiB,SAACC,GACjBA,EAAKC,aAAgBD,EAAKE,OAAOJ,EAAYE,EAAKG,KAGzD,MAAO,CACLJ,eAAAA,EACAK,SACEC,EAACC,EAAkB,CACjBnB,MAAOA,EACPU,SAAUA,EACVU,iBAAkBT,EAClBU,QAAS,WAAA,OAAMV,EAAY,KAAM,EACjCN,QAASA,IAIjB"}
@@ -0,0 +1,29 @@
1
+ import { PointerEvent as ReactPointerEvent } from 'react';
2
+ export declare const MIN_ZOOM = 1;
3
+ export declare const MAX_ZOOM = 3;
4
+ export declare const ZOOM_STEP = 0.5;
5
+ /**
6
+ * The scroll box does the panning, so a zoom only resizes the content and puts the scroll offset
7
+ * back where the viewer was looking.
8
+ */
9
+ export declare const useZoomPan: ({ canZoom, canPan, resetKey, }: {
10
+ canZoom: boolean;
11
+ canPan: boolean;
12
+ resetKey: unknown;
13
+ }) => {
14
+ viewportRef: import("react").RefObject<HTMLDivElement>;
15
+ zoom: number;
16
+ zoomIn: () => void;
17
+ zoomOut: () => void;
18
+ canZoomIn: boolean;
19
+ canZoomOut: boolean;
20
+ isPannable: boolean;
21
+ isPanning: boolean;
22
+ panHandlers: {
23
+ onPointerDown: (event: ReactPointerEvent<HTMLDivElement>) => void;
24
+ onPointerMove: (event: ReactPointerEvent<HTMLDivElement>) => void;
25
+ onPointerUp: (event: ReactPointerEvent<HTMLDivElement>) => void;
26
+ onPointerCancel: (event: ReactPointerEvent<HTMLDivElement>) => void;
27
+ };
28
+ };
29
+ //# sourceMappingURL=useZoomPan.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useZoomPan.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentLightbox/useZoomPan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,IAAI,iBAAiB,EAA4C,MAAM,OAAO,CAAC;AAEpG,eAAO,MAAM,QAAQ,IAAI,CAAC;AAC1B,eAAO,MAAM,QAAQ,IAAI,CAAC;AAC1B,eAAO,MAAM,SAAS,MAAM,CAAC;AAY7B;;;GAGG;AACH,eAAO,MAAM,UAAU,mCAIpB;IACD,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;CACnB;;;;;;;;;;+BAoFW,iBAAiB,CAAC,cAAc,CAAC;+BAkBD,iBAAiB,CAAC,cAAc,CAAC;6BAUnC,iBAAiB,CAAC,cAAc,CAAC;;;CAmB1E,CAAC"}
@@ -0,0 +1,2 @@
1
+ import r from"@babel/runtime/helpers/slicedToArray";import{useRef as n,useState as t,useEffect as e,useCallback as o}from"react";var l=1,c=3,i=.5,u=function(r){return Math.min(Math.max(r,1),3)},a=function(l){var c=l.canZoom,i=l.canPan,a=l.resetKey,s=n(null),f=t(1),p=r(f,2),v=p[0],d=p[1],h=t(!1),m=r(h,2),Y=m[0],L=m[1],P=n(v),X=n(null),g=n(null);e((function(){P.current=v}),[v]),e((function(){d(1),X.current=null}),[a]),e((function(){var r=s.current;if(r){var n=X.current;X.current=null,n?(r.scrollLeft=n.ratioX*r.scrollWidth-n.offsetX,r.scrollTop=n.ratioY*r.scrollHeight-n.offsetY):(r.scrollLeft=(r.scrollWidth-r.clientWidth)/2,r.scrollTop=(r.scrollHeight-r.clientHeight)/2)}}),[v,a]);var T=o((function(r,n){var t=u(P.current+r);t!==P.current&&(n&&(X.current=n),d(t))}),[]),H=o((function(){return T(.5)}),[T]),W=o((function(){return T(-.5)}),[T]);e((function(){var r=s.current;if(r&&c){var n=function(n){var t=.004*-n.deltaY;if(u(P.current+t)!==P.current){n.preventDefault();var e=r.getBoundingClientRect(),o=n.clientX-e.left,l=n.clientY-e.top;T(t,{ratioX:r.scrollWidth?(r.scrollLeft+o)/r.scrollWidth:.5,ratioY:r.scrollHeight?(r.scrollTop+l)/r.scrollHeight:.5,offsetX:o,offsetY:l})}};return r.addEventListener("wheel",n,{passive:!1}),function(){return r.removeEventListener("wheel",n)}}}),[c,T]);var b=i&&v>1,w=o((function(r){var n,t=s.current;!b||r.button>0||!t||(g.current={pointerX:r.clientX,pointerY:r.clientY,scrollLeft:t.scrollLeft,scrollTop:t.scrollTop},null===(n=t.setPointerCapture)||void 0===n||n.call(t,r.pointerId),L(!0))}),[b]),C=o((function(r){var n=g.current,t=s.current;n&&t&&(t.scrollLeft=n.scrollLeft-(r.clientX-n.pointerX),t.scrollTop=n.scrollTop-(r.clientY-n.pointerY))}),[]),I=o((function(r){var n,t;g.current&&(g.current=null,null===(n=s.current)||void 0===n||null===(t=n.releasePointerCapture)||void 0===t||t.call(n,r.pointerId),L(!1))}),[]);return{viewportRef:s,zoom:v,zoomIn:H,zoomOut:W,canZoomIn:v<3,canZoomOut:v>1,isPannable:b,isPanning:Y,panHandlers:{onPointerDown:w,onPointerMove:C,onPointerUp:I,onPointerCancel:I}}};export{c as MAX_ZOOM,l as MIN_ZOOM,i as ZOOM_STEP,a as useZoomPan};
2
+ //# sourceMappingURL=useZoomPan.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useZoomPan.js","sources":["../../../src/components/AttachmentLightbox/useZoomPan.ts"],"sourcesContent":["import { PointerEvent as ReactPointerEvent, useCallback, useEffect, useRef, useState } from 'react';\n\nexport const MIN_ZOOM = 1;\nexport const MAX_ZOOM = 3;\nexport const ZOOM_STEP = 0.5;\n\n// A trackpad pinch arrives as a wheel event; this turns its delta into a comfortable travel.\nconst WHEEL_SENSITIVITY = 0.004;\n\nconst clampZoom = (zoom: number) => Math.min(Math.max(zoom, MIN_ZOOM), MAX_ZOOM);\n\n/** Where the pointer sat in the content, so the same point stays put across a zoom. */\ntype Anchor = { ratioX: number; ratioY: number; offsetX: number; offsetY: number };\n\ntype Drag = { pointerX: number; pointerY: number; scrollLeft: number; scrollTop: number };\n\n/**\n * The scroll box does the panning, so a zoom only resizes the content and puts the scroll offset\n * back where the viewer was looking.\n */\nexport const useZoomPan = ({\n canZoom,\n canPan,\n resetKey,\n}: {\n canZoom: boolean;\n canPan: boolean;\n resetKey: unknown;\n}) => {\n const viewportRef = useRef<HTMLDivElement>(null);\n const [zoom, setZoom] = useState(MIN_ZOOM);\n const [isPanning, setIsPanning] = useState(false);\n\n const zoomRef = useRef(zoom);\n const anchorRef = useRef<Anchor | null>(null);\n const dragRef = useRef<Drag | null>(null);\n\n useEffect(() => {\n zoomRef.current = zoom;\n }, [zoom]);\n\n useEffect(() => {\n setZoom(MIN_ZOOM);\n anchorRef.current = null;\n }, [resetKey]);\n\n // Runs after the box has resized, so scrollWidth/Height are the new ones.\n useEffect(() => {\n const viewport = viewportRef.current;\n\n if (!viewport) return;\n\n const anchor = anchorRef.current;\n anchorRef.current = null;\n\n if (anchor) {\n viewport.scrollLeft = anchor.ratioX * viewport.scrollWidth - anchor.offsetX;\n viewport.scrollTop = anchor.ratioY * viewport.scrollHeight - anchor.offsetY;\n } else {\n viewport.scrollLeft = (viewport.scrollWidth - viewport.clientWidth) / 2;\n viewport.scrollTop = (viewport.scrollHeight - viewport.clientHeight) / 2;\n }\n }, [zoom, resetKey]);\n\n const zoomBy = useCallback((delta: number, anchor?: Anchor) => {\n const next = clampZoom(zoomRef.current + delta);\n\n if (next === zoomRef.current) return;\n if (anchor) anchorRef.current = anchor;\n\n setZoom(next);\n }, []);\n\n const zoomIn = useCallback(() => zoomBy(ZOOM_STEP), [zoomBy]);\n const zoomOut = useCallback(() => zoomBy(-ZOOM_STEP), [zoomBy]);\n\n // Native listener: React's onWheel is passive, so it could not block the page from scrolling.\n useEffect(() => {\n const viewport = viewportRef.current;\n\n if (!viewport || !canZoom) return undefined;\n\n const handleWheel = (event: WheelEvent) => {\n const delta = -event.deltaY * WHEEL_SENSITIVITY;\n\n // Already as big or small as it goes: let the wheel scroll whatever is behind the preview.\n if (clampZoom(zoomRef.current + delta) === zoomRef.current) return;\n\n event.preventDefault();\n\n const rect = viewport.getBoundingClientRect();\n const offsetX = event.clientX - rect.left;\n const offsetY = event.clientY - rect.top;\n\n zoomBy(delta, {\n ratioX: viewport.scrollWidth ? (viewport.scrollLeft + offsetX) / viewport.scrollWidth : 0.5,\n ratioY: viewport.scrollHeight\n ? (viewport.scrollTop + offsetY) / viewport.scrollHeight\n : 0.5,\n offsetX,\n offsetY,\n });\n };\n\n viewport.addEventListener('wheel', handleWheel, { passive: false });\n\n return () => viewport.removeEventListener('wheel', handleWheel);\n }, [canZoom, zoomBy]);\n\n const isPannable = canPan && zoom > MIN_ZOOM;\n\n const onPointerDown = useCallback(\n (event: ReactPointerEvent<HTMLDivElement>) => {\n const viewport = viewportRef.current;\n\n // `> 0` rather than `!== 0`: only a reported secondary/middle button should bail.\n if (!isPannable || event.button > 0 || !viewport) return;\n\n dragRef.current = {\n pointerX: event.clientX,\n pointerY: event.clientY,\n scrollLeft: viewport.scrollLeft,\n scrollTop: viewport.scrollTop,\n };\n viewport.setPointerCapture?.(event.pointerId);\n setIsPanning(true);\n },\n [isPannable]\n );\n\n const onPointerMove = useCallback((event: ReactPointerEvent<HTMLDivElement>) => {\n const drag = dragRef.current;\n const viewport = viewportRef.current;\n\n if (!drag || !viewport) return;\n\n viewport.scrollLeft = drag.scrollLeft - (event.clientX - drag.pointerX);\n viewport.scrollTop = drag.scrollTop - (event.clientY - drag.pointerY);\n }, []);\n\n const onPointerUp = useCallback((event: ReactPointerEvent<HTMLDivElement>) => {\n if (!dragRef.current) return;\n\n dragRef.current = null;\n viewportRef.current?.releasePointerCapture?.(event.pointerId);\n setIsPanning(false);\n }, []);\n\n return {\n viewportRef,\n zoom,\n zoomIn,\n zoomOut,\n canZoomIn: zoom < MAX_ZOOM,\n canZoomOut: zoom > MIN_ZOOM,\n isPannable,\n isPanning,\n panHandlers: { onPointerDown, onPointerMove, onPointerUp, onPointerCancel: onPointerUp },\n };\n};\n"],"names":["MIN_ZOOM","MAX_ZOOM","ZOOM_STEP","clampZoom","zoom","Math","min","max","useZoomPan","_ref","canZoom","canPan","resetKey","viewportRef","useRef","useState","_useState2","_slicedToArray","_useState","setZoom","_useState4","_useState3","isPanning","setIsPanning","zoomRef","anchorRef","dragRef","useEffect","current","viewport","anchor","scrollLeft","ratioX","scrollWidth","offsetX","scrollTop","ratioY","scrollHeight","offsetY","clientWidth","clientHeight","zoomBy","useCallback","delta","next","zoomIn","zoomOut","handleWheel","event","deltaY","preventDefault","rect","getBoundingClientRect","clientX","left","clientY","top","addEventListener","passive","removeEventListener","isPannable","onPointerDown","_viewport$setPointerC","button","pointerX","pointerY","setPointerCapture","call","pointerId","onPointerMove","drag","onPointerUp","_viewportRef$current","_viewportRef$current$","releasePointerCapture","canZoomIn","canZoomOut","panHandlers","onPointerCancel"],"mappings":"iIAEO,IAAMA,EAAW,EACXC,EAAW,EACXC,EAAY,GAKnBC,EAAY,SAACC,GAAY,OAAKC,KAAKC,IAAID,KAAKE,IAAIH,EAP9B,GACA,EAMwD,EAWnEI,EAAa,SAQpBC,GAAA,IAPJC,IAAAA,QACAC,IAAAA,OACAC,IAAAA,SAMMC,EAAcC,EAAuB,MACnBC,EAAAA,EA5BF,GA4BoBC,EAAAC,EAAAC,EAAA,GAAnCd,EAAIY,EAAA,GAAEG,EAAOH,EAAA,GACcD,EAAAA,GAAS,GAAMK,EAAAH,EAAAI,EAAA,GAA1CC,EAASF,EAAA,GAAEG,EAAYH,EAAA,GAExBI,EAAUV,EAAOV,GACjBqB,EAAYX,EAAsB,MAClCY,EAAUZ,EAAoB,MAEpCa,GAAU,WACRH,EAAQI,QAAUxB,CACpB,GAAG,CAACA,IAEJuB,GAAU,WACRR,EAxCoB,GAyCpBM,EAAUG,QAAU,IACtB,GAAG,CAAChB,IAGJe,GAAU,WACR,IAAME,EAAWhB,EAAYe,QAE7B,GAAKC,EAAL,CAEA,IAAMC,EAASL,EAAUG,QACzBH,EAAUG,QAAU,KAEhBE,GACFD,EAASE,WAAaD,EAAOE,OAASH,EAASI,YAAcH,EAAOI,QACpEL,EAASM,UAAYL,EAAOM,OAASP,EAASQ,aAAeP,EAAOQ,UAEpET,EAASE,YAAcF,EAASI,YAAcJ,EAASU,aAAe,EACtEV,EAASM,WAAaN,EAASQ,aAAeR,EAASW,cAAgB,EAV1D,CAYjB,GAAG,CAACpC,EAAMQ,IAEV,IAAM6B,EAASC,GAAY,SAACC,EAAeb,GACzC,IAAMc,EAAOzC,EAAUqB,EAAQI,QAAUe,GAErCC,IAASpB,EAAQI,UACjBE,IAAQL,EAAUG,QAAUE,GAEhCX,EAAQyB,GACT,GAAE,IAEGC,EAASH,GAAY,WAAA,OAAMD,EArEV,MAqE6B,CAACA,IAC/CK,EAAUJ,GAAY,WAAA,OAAMD,GAtEX,MAsE+B,CAACA,IAGvDd,GAAU,WACR,IAAME,EAAWhB,EAAYe,QAE7B,GAAKC,GAAanB,EAAlB,CAEA,IAAMqC,EAAc,SAACC,GACnB,IAAML,EA5Ec,MA4ELK,EAAMC,OAGrB,GAAI9C,EAAUqB,EAAQI,QAAUe,KAAWnB,EAAQI,QAAnD,CAEAoB,EAAME,iBAEN,IAAMC,EAAOtB,EAASuB,wBAChBlB,EAAUc,EAAMK,QAAUF,EAAKG,KAC/BhB,EAAUU,EAAMO,QAAUJ,EAAKK,IAErCf,EAAOE,EAAO,CACZX,OAAQH,EAASI,aAAeJ,EAASE,WAAaG,GAAWL,EAASI,YAAc,GACxFG,OAAQP,EAASQ,cACZR,EAASM,UAAYG,GAAWT,EAASQ,aAC1C,GACJH,QAAAA,EACAI,QAAAA,GAd0D,GAoB9D,OAFAT,EAAS4B,iBAAiB,QAASV,EAAa,CAAEW,SAAS,IAEpD,WAAA,OAAM7B,EAAS8B,oBAAoB,QAASZ,EAAY,CA1BpB,CA2B7C,GAAG,CAACrC,EAAS+B,IAEb,IAAMmB,EAAajD,GAAUP,EA3GP,EA6GhByD,EAAgBnB,GACpB,SAACM,GAA6C,IAAAc,EACtCjC,EAAWhB,EAAYe,SAGxBgC,GAAcZ,EAAMe,OAAS,IAAMlC,IAExCH,EAAQE,QAAU,CAChBoC,SAAUhB,EAAMK,QAChBY,SAAUjB,EAAMO,QAChBxB,WAAYF,EAASE,WACrBI,UAAWN,EAASM,WAEtB,QAAAN,EAAAA,EAASqC,yBAAT,IAAAJ,GAAAA,EAAAK,KAAAtC,EAA6BmB,EAAMoB,WACnC7C,GAAa,GACf,GACA,CAACqC,IAGGS,EAAgB3B,GAAY,SAACM,GACjC,IAAMsB,EAAO5C,EAAQE,QACfC,EAAWhB,EAAYe,QAExB0C,GAASzC,IAEdA,EAASE,WAAauC,EAAKvC,YAAciB,EAAMK,QAAUiB,EAAKN,UAC9DnC,EAASM,UAAYmC,EAAKnC,WAAaa,EAAMO,QAAUe,EAAKL,UAC7D,GAAE,IAEGM,EAAc7B,GAAY,SAACM,GAA6C,IAAAwB,EAAAC,EACvE/C,EAAQE,UAEbF,EAAQE,QAAU,KAClB,QAAAf,EAAAA,EAAYe,eAAZ,IAAA4C,GAA0C,QAA1CC,EAAAD,EAAqBE,6BAAqB,IAAAD,GAA1CA,EAA6CzB,KAAAA,EAAAA,EAAMoB,WACnD7C,GAAa,GACd,GAAE,IAEH,MAAO,CACLV,YAAAA,EACAT,KAAAA,EACAyC,OAAAA,EACAC,QAAAA,EACA6B,UAAWvE,EAtJS,EAuJpBwE,WAAYxE,EAxJQ,EAyJpBwD,WAAAA,EACAtC,UAAAA,EACAuD,YAAa,CAAEhB,cAAAA,EAAeQ,cAAAA,EAAeE,YAAAA,EAAaO,gBAAiBP,GAE/E"}
@@ -0,0 +1,16 @@
1
+ import { RefObject } from 'react';
2
+ import { AttachmentPreviewItem } from './AttachmentPreview.types';
3
+ export type AttachmentActionsMenuProps = {
4
+ item: AttachmentPreviewItem;
5
+ /** Adds "Share file" to the menu. */
6
+ onShare?: (item: AttachmentPreviewItem) => void;
7
+ /** `xs` sits on a tile, `small` in the preview modal's header. */
8
+ size?: 'xs' | 'small';
9
+ /** Test ids read `<prefix>-more`, `<prefix>-share`, and so on. */
10
+ testIdPrefix?: string;
11
+ tooltip?: string;
12
+ imageRef?: RefObject<HTMLImageElement>;
13
+ className?: string;
14
+ };
15
+ export declare const AttachmentActionsMenu: ({ item, onShare, size, testIdPrefix, tooltip, imageRef, className, }: AttachmentActionsMenuProps) => import("react/jsx-runtime").JSX.Element;
16
+ //# sourceMappingURL=AttachmentActionsMenu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AttachmentActionsMenu.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentPreview/AttachmentActionsMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,SAAS,EAAuB,MAAM,OAAO,CAAC;AAOnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAMlE,MAAM,MAAM,0BAA0B,GAAG;IACvC,IAAI,EAAE,qBAAqB,CAAC;IAC5B,qCAAqC;IACrC,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,qBAAqB,KAAK,IAAI,CAAC;IAChD,kEAAkE;IAClE,IAAI,CAAC,EAAE,IAAI,GAAG,OAAO,CAAC;IACtB,kEAAkE;IAClE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,SAAS,CAAC,gBAAgB,CAAC,CAAC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,qBAAqB,yEAQ/B,0BAA0B,4CAmF5B,CAAC"}
@@ -0,0 +1,2 @@
1
+ import o from"@babel/runtime/helpers/slicedToArray";import{useState as s,useEffect as c}from"react";import{ButtonIcon as i}from"../../componentsV2/ButtonIcon/ButtonIcon.js";import{Tooltip as n}from"../../componentsV2/Tooltip/Tooltip.js";import{Menu as t}from"../../componentsV2/Menu/Menu.js";import{getCanCopyImages as m,copyImageToClipboard as r}from"../AttachmentLightbox/copyImageToClipboard.js";import{MoreOneIcon as e,ShareTwoIcon as p,LinkOneIcon as u,PictureIcon as l}from"../../icons/iconParkIcons.js";import"../../icons/customIcons/icons/AddMessage.js";import"../../icons/customIcons/icons/DragOne.js";import"../../icons/customIcons/icons/Attention.js";import"../../icons/customIcons/icons/Collapse.js";import"../../icons/customIcons/icons/Dashboard.js";import"../../icons/customIcons/icons/Expand.js";import"../../icons/customIcons/icons/FolderClosed.js";import"../../icons/customIcons/icons/FolderClosedFilled.js";import"../../icons/customIcons/icons/FolderOpened.js";import"../../icons/customIcons/icons/GreaterOrEqual.js";import"../../icons/customIcons/icons/LessOrEqual.js";import"../../icons/customIcons/icons/Search.js";import"../../icons/customIcons/icons/SearchOne.js";import"../../icons/customIcons/icons/Wellhub.js";import"../../icons/customIcons/icons/MultiRuler.js";import"../../icons/customIcons/icons/Checkbox.js";import"../../icons/customIcons/icons/CheckboxChecked.js";import"../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../icons/customIcons/icons/Radio.js";import"../../icons/customIcons/icons/RadioChecked.js";import"../../icons/customIcons/icons/SimulFrac.js";import"../../icons/customIcons/icons/ZipperFrac.js";import"../../icons/customIcons/icons/CautionFilled.js";import"../../icons/customIcons/icons/MoreApp.js";import"../../icons/customIcons/icons/Pad.js";import"../../icons/customIcons/icons/DrilloutUnit.js";import"../../icons/customIcons/icons/FracFleet.js";import"../../icons/customIcons/icons/Global.js";import"../../icons/customIcons/icons/Program.js";import"../../icons/customIcons/icons/Rig.js";import"../../icons/customIcons/icons/Well.js";import"../../icons/customIcons/icons/Gap.js";import"../../icons/customIcons/icons/Pin.js";import"../../icons/customIcons/icons/CloseOneFilled.js";import"../../icons/customIcons/icons/AttentionFilled.js";import"../../icons/customIcons/icons/CheckOneFilled.js";import"../../icons/customIcons/icons/Archive.js";import"../../icons/customIcons/icons/ArchiveCancel.js";import"../../icons/customIcons/icons/Unarchive.js";import"../../icons/customIcons/icons/Archived.js";import"../../icons/customIcons/icons/InterventionUnit.js";import"../../icons/customIcons/icons/CloudDelete.js";import"../../icons/customIcons/icons/Lasso.js";import"../../icons/customIcons/icons/Radius.js";import"../../icons/customIcons/icons/ErrorOps.js";import"../../icons/customIcons/icons/DataTypeOps.js";import"../../icons/customIcons/icons/FalsePositiveOps.js";import"../../icons/customIcons/icons/CalibrationOps.js";import"../../icons/customIcons/icons/CriticalOps.js";import"../../icons/customIcons/icons/Company.js";import"../../icons/customIcons/icons/ArchiveOne.js";import"../../icons/customIcons/icons/ParseBotFusion.js";import"../../icons/customIcons/icons/Connect.js";import"../../icons/customIcons/icons/PuzzleOne.js";import"../../icons/customIcons/icons/Feed.js";import"../../icons/customIcons/icons/Prompt.js";import"../../icons/customIcons/icons/Companies.js";import"../../icons/customIcons/icons/ClipboardAi.js";import"../../icons/customIcons/icons/Key.js";import"../../icons/customIcons/icons/AtSignCrossed.js";import"../../icons/customIcons/icons/MappingManual.js";import"../../icons/customIcons/icons/Mapping.js";import"../../icons/customIcons/icons/Metrics.js";import"../../icons/customIcons/icons/Drops.js";import"../../icons/customIcons/icons/ClipboardSearch.js";import"../../icons/customIcons/icons/Template.js";import"../../icons/customIcons/icons/ClipboardMetrics.js";import"../../icons/customIcons/icons/ClipboardBuilder.js";import"../../icons/customIcons/icons/UnitConversion.js";import"../../icons/customIcons/icons/NPT.js";import"../../icons/customIcons/icons/GuidedFrac.js";import{showSuccessNotification as a,showErrorNotification as I}from"../../utils/notificationToasts.js";import j from"../../utils/main.js";import{jsxs as d,Fragment as C,jsx as h}from"react/jsx-runtime";var f=function(f){var b,g=f.item,v=f.onShare,F=f.size,k=void 0===F?"small":F,O=f.testIdPrefix,y=void 0===O?"attachment-preview":O,A=f.tooltip,M=void 0===A?"More":A,P=f.imageRef,x=f.className,T=s(null),S=o(T,2),D=S[0],R=S[1];c((function(){R(null)}),[g.id]);var B=g.src||g.downloadUrl,E="image"===(null!==(b=g.kind)&&void 0!==b?b:"file")&&!!g.src&&m(),L=function(o){return function(s){s.stopPropagation(),o(),R(null)}};return d(C,{children:[h(n,{title:M,children:h(i,{size:k,type:"tertiaryBg",ariaLabel:"More actions",isActive:!!D,className:x,onClick:function(o){o.stopPropagation(),R(o.currentTarget)},testId:"".concat(y,"-more"),children:h(e,{})})}),!!D&&d(t,{open:!0,anchorEl:D,placement:"bottom-end",onClose:function(){return R(null)},children:[!!v&&h(t.Item,{prefix:h(p,{}),onClick:L((function(){return v(g)})),testId:"".concat(y,"-share"),children:"Share file"}),h(t.Item,{prefix:h(u,{}),disabled:!B,onClick:L((function(){B&&(j.copyToClipboard(B),a("Link copied to clipboard"))})),testId:"".concat(y,"-copy-link"),children:"Copy link"}),E&&h(t.Item,{prefix:h(l,{}),onClick:L((function(){r(g.src,null==P?void 0:P.current).then((function(o){o?a("Image copied to clipboard"):I("Could not copy the image")}))})),testId:"".concat(y,"-copy-image"),children:"Copy image"})]})]})};export{f as AttachmentActionsMenu};
2
+ //# sourceMappingURL=AttachmentActionsMenu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AttachmentActionsMenu.js","sources":["../../../src/components/AttachmentPreview/AttachmentActionsMenu.tsx"],"sourcesContent":["import { MouseEvent, RefObject, useEffect, useState } from 'react';\n\nimport { ButtonIcon } from '../../componentsV2/ButtonIcon';\nimport { Tooltip } from '../../componentsV2/Tooltip';\nimport { Menu } from '../../componentsV2/Menu';\nimport { copyImageToClipboard, getCanCopyImages } from '../AttachmentLightbox/copyImageToClipboard';\n\nimport { AttachmentPreviewItem } from './AttachmentPreview.types';\n\nimport { LinkOneIcon, MoreOneIcon, PictureIcon, ShareTwoIcon } from '~/icons';\nimport { showErrorNotification, showSuccessNotification } from '~/utils/notificationToasts';\nimport utils from '~/utils/main';\n\nexport type AttachmentActionsMenuProps = {\n item: AttachmentPreviewItem;\n /** Adds \"Share file\" to the menu. */\n onShare?: (item: AttachmentPreviewItem) => void;\n /** `xs` sits on a tile, `small` in the preview modal's header. */\n size?: 'xs' | 'small';\n /** Test ids read `<prefix>-more`, `<prefix>-share`, and so on. */\n testIdPrefix?: string;\n tooltip?: string;\n imageRef?: RefObject<HTMLImageElement>;\n className?: string;\n};\n\nexport const AttachmentActionsMenu = ({\n item,\n onShare,\n size = 'small',\n testIdPrefix = 'attachment-preview',\n tooltip = 'More',\n imageRef,\n className,\n}: AttachmentActionsMenuProps) => {\n const [menuAnchor, setMenuAnchor] = useState<HTMLElement | null>(null);\n\n useEffect(() => {\n setMenuAnchor(null);\n }, [item.id]);\n\n const shareableUrl = item.src || item.downloadUrl;\n const canCopyImage = (item.kind ?? 'file') === 'image' && !!item.src && getCanCopyImages();\n\n const copyImage = () => {\n copyImageToClipboard(item.src as string, imageRef?.current).then(copied => {\n if (copied) showSuccessNotification('Image copied to clipboard');\n else showErrorNotification('Could not copy the image');\n });\n };\n\n // A portalled menu still bubbles its clicks up the React tree, where the tile would take\n // them as its own and open the preview over whatever the action just started.\n const runAndClose = (action: () => void) => (event: MouseEvent) => {\n event.stopPropagation();\n action();\n setMenuAnchor(null);\n };\n\n return (\n <>\n <Tooltip title={tooltip}>\n <ButtonIcon\n size={size}\n type=\"tertiaryBg\"\n ariaLabel=\"More actions\"\n isActive={!!menuAnchor}\n className={className}\n onClick={event => {\n event.stopPropagation();\n setMenuAnchor(event.currentTarget);\n }}\n testId={`${testIdPrefix}-more`}\n >\n <MoreOneIcon />\n </ButtonIcon>\n </Tooltip>\n\n {!!menuAnchor && (\n <Menu open anchorEl={menuAnchor} placement=\"bottom-end\" onClose={() => setMenuAnchor(null)}>\n {!!onShare && (\n <Menu.Item\n prefix={<ShareTwoIcon />}\n onClick={runAndClose(() => onShare(item))}\n testId={`${testIdPrefix}-share`}\n >\n Share file\n </Menu.Item>\n )}\n\n <Menu.Item\n prefix={<LinkOneIcon />}\n disabled={!shareableUrl}\n onClick={runAndClose(() => {\n if (!shareableUrl) return;\n utils.copyToClipboard(shareableUrl);\n showSuccessNotification('Link copied to clipboard');\n })}\n testId={`${testIdPrefix}-copy-link`}\n >\n Copy link\n </Menu.Item>\n\n {/* Only images: no browser lets a page put a video or a document on the clipboard. */}\n {canCopyImage && (\n <Menu.Item\n prefix={<PictureIcon />}\n onClick={runAndClose(copyImage)}\n testId={`${testIdPrefix}-copy-image`}\n >\n Copy image\n </Menu.Item>\n )}\n </Menu>\n )}\n </>\n );\n};\n"],"names":["AttachmentActionsMenu","_ref","_item$kind","item","onShare","_ref$size","size","_ref$testIdPrefix","testIdPrefix","_ref$tooltip","tooltip","imageRef","className","useState","_useState2","_slicedToArray","_useState","menuAnchor","setMenuAnchor","useEffect","id","shareableUrl","src","downloadUrl","canCopyImage","kind","getCanCopyImages","runAndClose","action","event","stopPropagation","_jsxs","_Fragment","children","_jsx","Tooltip","title","ButtonIcon","type","ariaLabel","isActive","onClick","currentTarget","testId","concat","MoreOneIcon","Menu","open","anchorEl","placement","onClose","Item","prefix","ShareTwoIcon","LinkOneIcon","disabled","utils","copyToClipboard","showSuccessNotification","PictureIcon","copyImageToClipboard","current","then","copied","showErrorNotification"],"mappings":"yxIA0BaA,IAAAA,EAAwB,SAQHC,GAAA,IAAAC,EAPhCC,IAAAA,KACAC,IAAAA,QAAOC,EAAAJ,EACPK,KAAAA,aAAO,QAAOD,EAAAE,EAAAN,EACdO,aAAAA,aAAe,qBAAoBD,EAAAE,EAAAR,EACnCS,QAAAA,aAAU,OAAMD,EAChBE,IAAAA,SACAC,IAAAA,UAEoCC,EAAAA,EAA6B,MAAKC,EAAAC,EAAAC,EAAA,GAA/DC,EAAUH,EAAA,GAAEI,EAAaJ,EAAA,GAEhCK,GAAU,WACRD,EAAc,KAChB,GAAG,CAACf,EAAKiB,KAET,IAAMC,EAAelB,EAAKmB,KAAOnB,EAAKoB,YAChCC,EAAyC,mBAA1BtB,EAACC,EAAKsB,oBAAQ,WAAyBtB,EAAKmB,KAAOI,IAWlEC,EAAc,SAACC,GAAkB,OAAK,SAACC,GAC3CA,EAAMC,kBACNF,IACAV,EAAc,MACf,EAED,OACEa,EAAAC,EAAA,CAAAC,SAAA,CACEC,EAACC,EAAO,CAACC,MAAO1B,EAAQuB,SACtBC,EAACG,EAAU,CACT/B,KAAMA,EACNgC,KAAK,aACLC,UAAU,eACVC,WAAYvB,EACZL,UAAWA,EACX6B,QAAS,SAAAZ,GACPA,EAAMC,kBACNZ,EAAcW,EAAMa,cACpB,EACFC,OAAM,GAAAC,OAAKpC,EAAoB,SAAAyB,SAE/BC,EAACW,EAAW,UAIb5B,GACDc,EAACe,EAAI,CAACC,MAAI,EAACC,SAAU/B,EAAYgC,UAAU,aAAaC,QAAS,WAAA,OAAMhC,EAAc,KAAM,EAAAe,SAAA,GACtF7B,GACD8B,EAACY,EAAKK,KAAI,CACRC,OAAQlB,EAACmB,EAAgB,IACzBZ,QAASd,GAAY,WAAA,OAAMvB,EAAQD,MACnCwC,OAAM,GAAAC,OAAKpC,EAAqB,UAAAyB,SAAA,eAMpCC,EAACY,EAAKK,KAAI,CACRC,OAAQlB,EAACoB,EAAe,IACxBC,UAAWlC,EACXoB,QAASd,GAAY,WACdN,IACLmC,EAAMC,gBAAgBpC,GACtBqC,EAAwB,4BAC1B,IACAf,OAAM,GAAAC,OAAKpC,EAAyB,cAAAyB,SAAA,cAMrCT,GACCU,EAACY,EAAKK,KAAI,CACRC,OAAQlB,EAACyB,EAAe,IACxBlB,QAASd,GA/DH,WAChBiC,EAAqBzD,EAAKmB,IAAeX,aAAQ,EAARA,EAAUkD,SAASC,MAAK,SAAAC,GAC3DA,EAAQL,EAAwB,6BAC/BM,EAAsB,2BAC7B,OA4DUrB,OAAM,GAAAC,OAAKpC,EAA0B,eAAAyB,SAAA,oBASnD"}
@@ -0,0 +1,11 @@
1
+ export type AttachmentDownloadLinkProps = {
2
+ url: string;
3
+ fileName: string;
4
+ /** `xs` sits on a tile, `small` in the preview modal's header. */
5
+ size?: 'xs' | 'small';
6
+ className?: string;
7
+ testId?: string;
8
+ };
9
+ /** Keeps the link semantics but fetches the bytes, since `download` is ignored cross-origin. */
10
+ export declare const AttachmentDownloadLink: ({ url, fileName, size, className, testId, }: AttachmentDownloadLinkProps) => import("react/jsx-runtime").JSX.Element;
11
+ //# sourceMappingURL=AttachmentDownloadLink.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AttachmentDownloadLink.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentPreview/AttachmentDownloadLink.tsx"],"names":[],"mappings":"AAQA,MAAM,MAAM,2BAA2B,GAAG;IACxC,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,kEAAkE;IAClE,IAAI,CAAC,EAAE,IAAI,GAAG,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,gGAAgG;AAChG,eAAO,MAAM,sBAAsB,gDAMhC,2BAA2B,4CAwB7B,CAAC"}
@@ -0,0 +1,2 @@
1
+ import{ButtonIcon as o}from"../../componentsV2/ButtonIcon/ButtonIcon.js";import{Tooltip as s}from"../../componentsV2/Tooltip/Tooltip.js";import{saveAttachment as c}from"../AttachmentLightbox/downloadAttachment.js";import{DownloadIcon as i}from"../../icons/iconParkIcons.js";import"../../icons/customIcons/icons/AddMessage.js";import"../../icons/customIcons/icons/DragOne.js";import"../../icons/customIcons/icons/Attention.js";import"../../icons/customIcons/icons/Collapse.js";import"../../icons/customIcons/icons/Dashboard.js";import"../../icons/customIcons/icons/Expand.js";import"../../icons/customIcons/icons/FolderClosed.js";import"../../icons/customIcons/icons/FolderClosedFilled.js";import"../../icons/customIcons/icons/FolderOpened.js";import"../../icons/customIcons/icons/GreaterOrEqual.js";import"../../icons/customIcons/icons/LessOrEqual.js";import"../../icons/customIcons/icons/Search.js";import"../../icons/customIcons/icons/SearchOne.js";import"../../icons/customIcons/icons/Wellhub.js";import"../../icons/customIcons/icons/MultiRuler.js";import"../../icons/customIcons/icons/Checkbox.js";import"../../icons/customIcons/icons/CheckboxChecked.js";import"../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../icons/customIcons/icons/Radio.js";import"../../icons/customIcons/icons/RadioChecked.js";import"../../icons/customIcons/icons/SimulFrac.js";import"../../icons/customIcons/icons/ZipperFrac.js";import"../../icons/customIcons/icons/CautionFilled.js";import"../../icons/customIcons/icons/MoreApp.js";import"../../icons/customIcons/icons/Pad.js";import"../../icons/customIcons/icons/DrilloutUnit.js";import"../../icons/customIcons/icons/FracFleet.js";import"../../icons/customIcons/icons/Global.js";import"../../icons/customIcons/icons/Program.js";import"../../icons/customIcons/icons/Rig.js";import"../../icons/customIcons/icons/Well.js";import"../../icons/customIcons/icons/Gap.js";import"../../icons/customIcons/icons/Pin.js";import"../../icons/customIcons/icons/CloseOneFilled.js";import"../../icons/customIcons/icons/AttentionFilled.js";import"../../icons/customIcons/icons/CheckOneFilled.js";import"../../icons/customIcons/icons/Archive.js";import"../../icons/customIcons/icons/ArchiveCancel.js";import"../../icons/customIcons/icons/Unarchive.js";import"../../icons/customIcons/icons/Archived.js";import"../../icons/customIcons/icons/InterventionUnit.js";import"../../icons/customIcons/icons/CloudDelete.js";import"../../icons/customIcons/icons/Lasso.js";import"../../icons/customIcons/icons/Radius.js";import"../../icons/customIcons/icons/ErrorOps.js";import"../../icons/customIcons/icons/DataTypeOps.js";import"../../icons/customIcons/icons/FalsePositiveOps.js";import"../../icons/customIcons/icons/CalibrationOps.js";import"../../icons/customIcons/icons/CriticalOps.js";import"../../icons/customIcons/icons/Company.js";import"../../icons/customIcons/icons/ArchiveOne.js";import"../../icons/customIcons/icons/ParseBotFusion.js";import"../../icons/customIcons/icons/Connect.js";import"../../icons/customIcons/icons/PuzzleOne.js";import"../../icons/customIcons/icons/Feed.js";import"../../icons/customIcons/icons/Prompt.js";import"../../icons/customIcons/icons/Companies.js";import"../../icons/customIcons/icons/ClipboardAi.js";import"../../icons/customIcons/icons/Key.js";import"../../icons/customIcons/icons/AtSignCrossed.js";import"../../icons/customIcons/icons/MappingManual.js";import"../../icons/customIcons/icons/Mapping.js";import"../../icons/customIcons/icons/Metrics.js";import"../../icons/customIcons/icons/Drops.js";import"../../icons/customIcons/icons/ClipboardSearch.js";import"../../icons/customIcons/icons/Template.js";import"../../icons/customIcons/icons/ClipboardMetrics.js";import"../../icons/customIcons/icons/ClipboardBuilder.js";import"../../icons/customIcons/icons/UnitConversion.js";import"../../icons/customIcons/icons/NPT.js";import"../../icons/customIcons/icons/GuidedFrac.js";import{jsx as n}from"react/jsx-runtime";var t=function(t){var m=t.url,r=t.fileName,e=t.size,p=void 0===e?"small":e,u=t.className,a=t.testId;return n(s,{title:"Download",children:n("a",{href:m,download:r,target:"_blank",rel:"noopener noreferrer",className:u,"data-testid":void 0===a?"attachment-download":a,onClick:function(o){o.preventDefault(),o.stopPropagation(),c(m,r)},children:n(o,{size:p,type:"tertiaryBg",ariaLabel:"Download",children:n(i,{size:"xs"===p?"small":void 0})})})})};export{t as AttachmentDownloadLink};
2
+ //# sourceMappingURL=AttachmentDownloadLink.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AttachmentDownloadLink.js","sources":["../../../src/components/AttachmentPreview/AttachmentDownloadLink.tsx"],"sourcesContent":["import { MouseEvent } from 'react';\n\nimport { ButtonIcon } from '../../componentsV2/ButtonIcon';\nimport { Tooltip } from '../../componentsV2/Tooltip';\nimport { saveAttachment } from '../AttachmentLightbox/downloadAttachment';\n\nimport { DownloadIcon } from '~/icons';\n\nexport type AttachmentDownloadLinkProps = {\n url: string;\n fileName: string;\n /** `xs` sits on a tile, `small` in the preview modal's header. */\n size?: 'xs' | 'small';\n className?: string;\n testId?: string;\n};\n\n/** Keeps the link semantics but fetches the bytes, since `download` is ignored cross-origin. */\nexport const AttachmentDownloadLink = ({\n url,\n fileName,\n size = 'small',\n className,\n testId = 'attachment-download',\n}: AttachmentDownloadLinkProps) => {\n const handleClick = (event: MouseEvent) => {\n event.preventDefault();\n event.stopPropagation();\n saveAttachment(url, fileName);\n };\n\n return (\n <Tooltip title=\"Download\">\n <a\n href={url}\n download={fileName}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className={className}\n data-testid={testId}\n onClick={handleClick}\n >\n <ButtonIcon size={size} type=\"tertiaryBg\" ariaLabel=\"Download\">\n <DownloadIcon size={size === 'xs' ? 'small' : undefined} />\n </ButtonIcon>\n </a>\n </Tooltip>\n );\n};\n"],"names":["AttachmentDownloadLink","_ref","url","fileName","_ref$size","size","className","_ref$testId","testId","_jsx","Tooltip","title","children","href","download","target","rel","onClick","event","preventDefault","stopPropagation","saveAttachment","ButtonIcon","type","ariaLabel","DownloadIcon","undefined"],"mappings":"24HAkBaA,IAAAA,EAAyB,SAMHC,GAAA,IALjCC,IAAAA,IACAC,IAAAA,SAAQC,EAAAH,EACRI,KAAAA,aAAO,QAAOD,EACdE,IAAAA,UAASC,EAAAN,EACTO,OAQA,OACEC,EAACC,EAAO,CAACC,MAAM,WAAUC,SACvBH,EAAA,IAAA,CACEI,KAAMX,EACNY,SAAUX,EACVY,OAAO,SACPC,IAAI,sBACJV,UAAWA,EACX,yBAhBG,sBAAqBC,EAiBxBU,QAfc,SAACC,GACnBA,EAAMC,iBACND,EAAME,kBACNC,EAAenB,EAAKC,IAYKS,SAErBH,EAACa,EAAU,CAACjB,KAAMA,EAAMkB,KAAK,aAAaC,UAAU,WAAUZ,SAC5DH,EAACgB,EAAY,CAACpB,KAAe,OAATA,EAAgB,aAAUqB,SAKxD"}
@@ -0,0 +1,12 @@
1
+ export type AttachmentImageProps = {
2
+ src?: string;
3
+ alt: string;
4
+ className?: string;
5
+ draggable?: boolean;
6
+ };
7
+ /**
8
+ * Asks with CORS so the page may read the pixels, which is what lets Copy image work off the
9
+ * screen. A host that answers without the header refuses outright, so a failed load retries plain.
10
+ */
11
+ export declare const AttachmentImage: import("react").ForwardRefExoticComponent<AttachmentImageProps & import("react").RefAttributes<HTMLImageElement>>;
12
+ //# sourceMappingURL=AttachmentImage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AttachmentImage.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentPreview/AttachmentImage.tsx"],"names":[],"mappings":"AAEA,MAAM,MAAM,oBAAoB,GAAG;IACjC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,mHAkB3B,CAAC"}
@@ -0,0 +1,2 @@
1
+ import r from"@babel/runtime/helpers/slicedToArray";import{forwardRef as a,useState as o}from"react";import{jsx as e}from"react/jsx-runtime";var t=a((function(a,t){var i=a.src,n=a.alt,s=a.className,m=a.draggable,c=o(!0),l=r(c,2),u=l[0],f=l[1];return e("img",{ref:t,src:i,alt:n,className:s,draggable:m,crossOrigin:u?"anonymous":void 0,onError:function(){return f(!1)}},u?"cors":"plain")}));export{t as AttachmentImage};
2
+ //# sourceMappingURL=AttachmentImage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AttachmentImage.js","sources":["../../../src/components/AttachmentPreview/AttachmentImage.tsx"],"sourcesContent":["import { forwardRef, useState } from 'react';\n\nexport type AttachmentImageProps = {\n src?: string;\n alt: string;\n className?: string;\n draggable?: boolean;\n};\n\n/**\n * Asks with CORS so the page may read the pixels, which is what lets Copy image work off the\n * screen. A host that answers without the header refuses outright, so a failed load retries plain.\n */\nexport const AttachmentImage = forwardRef<HTMLImageElement, AttachmentImageProps>(\n ({ src, alt, className, draggable }, ref) => {\n const [readable, setReadable] = useState(true);\n\n return (\n <img\n // Keyed so the browser re-requests rather than reusing the refused response.\n key={readable ? 'cors' : 'plain'}\n ref={ref}\n src={src}\n alt={alt}\n className={className}\n draggable={draggable}\n crossOrigin={readable ? 'anonymous' : undefined}\n onError={() => setReadable(false)}\n />\n );\n }\n);\n"],"names":["AttachmentImage","forwardRef","_ref","ref","src","alt","className","draggable","useState","_useState2","_slicedToArray","_useState","readable","setReadable","_jsx","crossOrigin","undefined","onError"],"mappings":"iJAaaA,EAAkBC,GAC7B,SAAAC,EAAqCC,GAAQ,IAA1CC,IAAAA,IAAKC,IAAAA,IAAKC,IAAAA,UAAWC,IAAAA,UACUC,EAAAA,GAAS,GAAKC,EAAAC,EAAAC,EAAA,GAAvCC,EAAQH,EAAA,GAAEI,EAAWJ,EAAA,GAE5B,OACEK,EAAA,MAAA,CAGEX,IAAKA,EACLC,IAAKA,EACLC,IAAKA,EACLC,UAAWA,EACXC,UAAWA,EACXQ,YAAaH,EAAW,iBAAcI,EACtCC,QAAS,WAAA,OAAMJ,GAAY,EAAM,GAP5BD,EAAW,OAAS,QAU/B"}
@@ -1 +1 @@
1
- {"version":3,"file":"AttachmentPreview.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentPreview/AttachmentPreview.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAEnE;;;GAGG;AACH,eAAO,MAAM,iBAAiB,mHA0B7B,CAAC"}
1
+ {"version":3,"file":"AttachmentPreview.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentPreview/AttachmentPreview.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAEnE;;;GAGG;AACH,eAAO,MAAM,iBAAiB,mHA8B7B,CAAC"}
@@ -1,2 +1,2 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/objectWithoutProperties";import{forwardRef as r}from"react";import{useAttachmentLightbox as o}from"../AttachmentLightbox/useAttachmentLightbox.js";import{AttachmentRow as n}from"./AttachmentRow.js";import{SortableAttachments as i}from"./SortableAttachments.js";import{jsx as c,jsxs as m,Fragment as p}from"react/jsx-runtime";var l=["onReorder","onItemClick"];function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function b(t){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?f(Object(o),!0).forEach((function(r){e(t,r,o[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):f(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var a=r((function(e,r){var f=e.onReorder,a=e.onItemClick,s=t(e,l),u=o(),h=u.openAttachment,O=u.lightbox;if(!s.items.length)return null;var j=!!f&&s.items.length>1?c(i,b(b({},s),{},{ref:r,onReorder:f,onItemClick:null!=a?a:h})):c(n,b(b({},s),{},{ref:r,onItemClick:null!=a?a:h}));return m(p,{children:[j,!a&&O]})}));export{a as AttachmentPreview};
1
+ import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/objectWithoutProperties";import{forwardRef as r}from"react";import{useAttachmentLightbox as o}from"../AttachmentLightbox/useAttachmentLightbox.js";import{AttachmentRow as n}from"./AttachmentRow.js";import{SortableAttachments as i}from"./SortableAttachments.js";import{jsx as c,jsxs as m,Fragment as p}from"react/jsx-runtime";var l=["onReorder","onItemClick","onShare"];function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function f(t){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?a(Object(o),!0).forEach((function(r){e(t,r,o[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):a(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var b=r((function(e,r){var a=e.onReorder,b=e.onItemClick,s=e.onShare,h=t(e,l),u=o(h.items,{onShare:s}),O=u.openAttachment,j=u.lightbox;if(!h.items.length)return null;var g=!!a&&h.items.length>1?c(i,f(f({},h),{},{ref:r,onReorder:a,onItemClick:null!=b?b:O})):c(n,f(f({},h),{},{ref:r,onShare:s,onItemClick:null!=b?b:O}));return m(p,{children:[g,!b&&j]})}));export{b as AttachmentPreview};
2
2
  //# sourceMappingURL=AttachmentPreview.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AttachmentPreview.js","sources":["../../../src/components/AttachmentPreview/AttachmentPreview.tsx"],"sourcesContent":["import { forwardRef } from 'react';\n\nimport { useAttachmentLightbox } from '../AttachmentLightbox/useAttachmentLightbox';\n\nimport { AttachmentRow } from './AttachmentRow';\nimport { SortableAttachments } from './SortableAttachments';\nimport { AttachmentPreviewProps } from './AttachmentPreview.types';\n\n/**\n * Picks the strip that fits — reorderable or plain — and gives it a lightbox. Rendering lives in\n * `AttachmentRow`, drag-and-drop in `SortableAttachments`, the modal in `useAttachmentLightbox`.\n */\nexport const AttachmentPreview = forwardRef<HTMLDivElement, AttachmentPreviewProps>(\n ({ onReorder, onItemClick, ...props }, ref) => {\n // Images and videos open in the lightbox by default; passing `onItemClick` takes that over.\n const { openAttachment, lightbox } = useAttachmentLightbox();\n\n if (!props.items.length) return null;\n\n const isSortable = !!onReorder && props.items.length > 1;\n const strip = isSortable ? (\n <SortableAttachments\n {...props}\n ref={ref}\n onReorder={onReorder}\n onItemClick={onItemClick ?? openAttachment}\n />\n ) : (\n <AttachmentRow {...props} ref={ref} onItemClick={onItemClick ?? openAttachment} />\n );\n\n return (\n <>\n {strip}\n {!onItemClick && lightbox}\n </>\n );\n }\n);\n"],"names":["AttachmentPreview","forwardRef","_ref","ref","onReorder","onItemClick","props","_objectWithoutProperties","_excluded","_useAttachmentLightbo","useAttachmentLightbox","openAttachment","lightbox","items","length","strip","_jsx","SortableAttachments","AttachmentRow","_objectSpread","_jsxs","_Fragment","children"],"mappings":"ogCAYaA,EAAoBC,GAC/B,SAAAC,EAAuCC,GAAQ,IAA5CC,IAAAA,UAAWC,IAAAA,YAAgBC,EAAKC,EAAAL,EAAAM,GAEjCC,EAAqCC,IAA7BC,IAAAA,eAAgBC,IAAAA,SAExB,IAAKN,EAAMO,MAAMC,OAAQ,OAAO,KAEhC,IACMC,IADeX,GAAaE,EAAMO,MAAMC,OAAS,EAErDE,EAACC,SACKX,GAAK,GAAA,CACTH,IAAKA,EACLC,UAAWA,EACXC,YAAaA,QAAAA,EAAeM,KAG9BK,EAACE,EAAaC,EAAAA,EAAA,CAAA,EAAKb,GAAK,GAAA,CAAEH,IAAKA,EAAKE,YAAaA,QAAAA,EAAeM,KAGlE,OACES,EAAAC,EAAA,CAAAC,SAAA,CACGP,GACCV,GAAeO,IAGvB"}
1
+ {"version":3,"file":"AttachmentPreview.js","sources":["../../../src/components/AttachmentPreview/AttachmentPreview.tsx"],"sourcesContent":["import { forwardRef } from 'react';\n\nimport { useAttachmentLightbox } from '../AttachmentLightbox/useAttachmentLightbox';\n\nimport { AttachmentRow } from './AttachmentRow';\nimport { SortableAttachments } from './SortableAttachments';\nimport { AttachmentPreviewProps } from './AttachmentPreview.types';\n\n/**\n * Picks the strip that fits — reorderable or plain — and gives it a lightbox. Rendering lives in\n * `AttachmentRow`, drag-and-drop in `SortableAttachments`, the modal in `useAttachmentLightbox`.\n */\nexport const AttachmentPreview = forwardRef<HTMLDivElement, AttachmentPreviewProps>(\n ({ onReorder, onItemClick, onShare, ...props }, ref) => {\n const { openAttachment, lightbox } = useAttachmentLightbox(props.items, { onShare });\n\n if (!props.items.length) return null;\n\n const isSortable = !!onReorder && props.items.length > 1;\n const strip = isSortable ? (\n <SortableAttachments\n {...props}\n ref={ref}\n onReorder={onReorder}\n onItemClick={onItemClick ?? openAttachment}\n />\n ) : (\n <AttachmentRow\n {...props}\n ref={ref}\n onShare={onShare}\n onItemClick={onItemClick ?? openAttachment}\n />\n );\n\n return (\n <>\n {strip}\n {!onItemClick && lightbox}\n </>\n );\n }\n);\n"],"names":["AttachmentPreview","forwardRef","_ref","ref","onReorder","onItemClick","onShare","props","_objectWithoutProperties","_excluded","_useAttachmentLightbo","useAttachmentLightbox","items","openAttachment","lightbox","length","strip","_jsx","SortableAttachments","AttachmentRow","_objectSpread","_jsxs","_Fragment","children"],"mappings":"8gCAYaA,EAAoBC,GAC/B,SAAAC,EAAgDC,GAAQ,IAArDC,IAAAA,UAAWC,IAAAA,YAAaC,IAAAA,QAAYC,EAAKC,EAAAN,EAAAO,GAC1CC,EAAqCC,EAAsBJ,EAAMK,MAAO,CAAEN,QAAAA,IAAlEO,IAAAA,eAAgBC,IAAAA,SAExB,IAAKP,EAAMK,MAAMG,OAAQ,OAAO,KAEhC,IACMC,IADeZ,GAAaG,EAAMK,MAAMG,OAAS,EAErDE,EAACC,SACKX,GAAK,GAAA,CACTJ,IAAKA,EACLC,UAAWA,EACXC,YAAaA,QAAAA,EAAeQ,KAG9BI,EAACE,EAAaC,EAAAA,EAAA,CAAA,EACRb,GAAK,GAAA,CACTJ,IAAKA,EACLG,QAASA,EACTD,YAAaA,QAAAA,EAAeQ,KAIhC,OACEQ,EAAAC,EAAA,CAAAC,SAAA,CACGP,GACCX,GAAeS,IAGvB"}