@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 t from'./../../ext-esm/style-inject/dist/style-inject.es.js';var e={spacing:"8",scroller:"AttachmentPreview_scroller__ZqYC8",slot:"AttachmentPreview_slot__ewKLo",slotDragging:"AttachmentPreview_slotDragging__hrfJX",slotContent:"AttachmentPreview_slotContent__GNuSu",insertion:"AttachmentPreview_insertion__iFqlp",insertionBefore:"AttachmentPreview_insertionBefore__jyWQM",insertionEdge:"AttachmentPreview_insertionEdge__Bjk1t",insertionAfter:"AttachmentPreview_insertionAfter__4NvhP",dragGhost:"AttachmentPreview_dragGhost__4aSzE",dragGhostHandle:"AttachmentPreview_dragGhostHandle__Gu2CP",thumbnail:"AttachmentPreview_thumbnail__ytI2L",clickable:"AttachmentPreview_clickable__BEXzK",thumbnailInner:"AttachmentPreview_thumbnailInner__9Ex4-",thumbnailImage:"AttachmentPreview_thumbnailImage__RQ4fL",videoOverlay:"AttachmentPreview_videoOverlay__5Lgi1",playIcon:"AttachmentPreview_playIcon__OOnql",fileCard:"AttachmentPreview_fileCard__oxDbD",fileCardLink:"AttachmentPreview_fileCardLink__TDpvh",fileCardContent:"AttachmentPreview_fileCardContent__c-99Q",fileInfo:"AttachmentPreview_fileInfo__eqJ-B",fileName:"AttachmentPreview_fileName__1Ccg0",fileType:"AttachmentPreview_fileType__0v6E4",downloadButton:"AttachmentPreview_downloadButton__9oBz-",removeButton:"AttachmentPreview_removeButton__aX-qu",removeButtonVisible:"AttachmentPreview_removeButtonVisible__BVjYB",thumbnailError:"AttachmentPreview_thumbnailError__yyH08",uploadingOverlay:"AttachmentPreview_uploadingOverlay__leV1D",uploadingSpinner:"AttachmentPreview_uploadingSpinner__u-t7d",loader:"AttachmentPreview_loader__HK5bZ",errorOverlay:"AttachmentPreview_errorOverlay__8sM1d",retryButton:"AttachmentPreview_retryButton__tKVV0"};t('.AttachmentPreview_scroller__ZqYC8{-ms-overflow-style:none;align-items:flex-start;display:flex;gap:12px;margin-left:-8px;overflow-x:auto;overflow-y:visible;padding-left:8px;padding-right:8px;padding-top:6px;scroll-behavior:smooth;scrollbar-width:none}.AttachmentPreview_scroller__ZqYC8::-webkit-scrollbar{display:none}.AttachmentPreview_slot__ewKLo{border-radius:8px;cursor:grab;flex-shrink:0;position:relative;touch-action:none}.AttachmentPreview_slot__ewKLo:focus-visible{outline:none}.AttachmentPreview_slot__ewKLo:focus-visible:before{border:2px solid var(--palette-primary-main);border-radius:8px;content:"";inset:0;pointer-events:none;position:absolute;z-index:5}.AttachmentPreview_slotDragging__hrfJX{cursor:grabbing}.AttachmentPreview_slotDragging__hrfJX .AttachmentPreview_slotContent__GNuSu{visibility:hidden}.AttachmentPreview_slotDragging__hrfJX:focus-visible:before{display:none}.AttachmentPreview_slotDragging__hrfJX:after{background:rgb(from var(--palette-primary-text-1) r g b/.04);border:1px dashed var(--palette-primary-text-6);border-radius:8px;content:"";inset:0;position:absolute}.AttachmentPreview_insertion__iFqlp{background:var(--palette-primary-main);border-radius:2px;bottom:0;box-shadow:0 0 6px rgb(from var(--palette-primary-main) r g b/.6);position:absolute;top:0;width:2px;z-index:4}.AttachmentPreview_insertionBefore__jyWQM,.AttachmentPreview_insertionEdge__Bjk1t{left:-7px}.AttachmentPreview_insertionAfter__4NvhP{right:-7px}.AttachmentPreview_dragGhost__4aSzE{background:var(--palette-background-b-6);border-radius:8px;box-shadow:0 10px 20px rgb(from var(--palette-background-b-1) r g b/.45);cursor:grabbing;opacity:.9;position:relative;transform:rotate(4deg)}.AttachmentPreview_dragGhostHandle__Gu2CP{align-items:center;display:flex;inset:0;justify-content:center;pointer-events:none;position:absolute;z-index:2}.AttachmentPreview_dragGhostHandle__Gu2CP button{backdrop-filter:blur(4px);background-color:rgb(from var(--palette-primary-text-1) r g b/.16)!important;color:var(--palette-primary-text-1)!important}.AttachmentPreview_dragGhostHandle__Gu2CP svg{color:var(--palette-primary-text-1)}.AttachmentPreview_thumbnail__ytI2L{border-radius:8px;flex-shrink:0;height:64px;overflow:visible;position:relative;width:64px}.AttachmentPreview_clickable__BEXzK{cursor:pointer}.AttachmentPreview_clickable__BEXzK:hover{opacity:.9}.AttachmentPreview_thumbnailInner__9Ex4-{border-radius:8px;inset:0;overflow:hidden;pointer-events:none;position:absolute}.AttachmentPreview_thumbnailImage__RQ4fL{height:100%;left:50%;max-width:none;min-width:100%;object-fit:cover;pointer-events:none;position:absolute;top:0;transform:translateX(-50%);width:auto}.AttachmentPreview_videoOverlay__5Lgi1{align-items:center;background:rgb(from var(--palette-background-b-1) r g b/.5);border-radius:8px;display:flex;inset:0;justify-content:center;pointer-events:none;position:absolute}.AttachmentPreview_playIcon__OOnql{color:var(--palette-primary-text-1);font-size:32px}.AttachmentPreview_fileCard__oxDbD{align-items:flex-start;border:1px solid rgb(from var(--palette-primary-text-1) r g b/.08);border-radius:8px;display:flex;flex-direction:column;flex-shrink:0;height:64px;justify-content:center;padding:8px 16px;position:relative;width:142px}.AttachmentPreview_fileCardLink__TDpvh{color:inherit;cursor:pointer;text-decoration:none}.AttachmentPreview_fileCardLink__TDpvh:hover{border-color:rgb(from var(--palette-primary-text-1) r g b/.16)}.AttachmentPreview_fileCardContent__c-99Q{align-items:center;display:flex;gap:8px;width:100%}.AttachmentPreview_fileInfo__eqJ-B{align-items:flex-start;display:flex;flex:1 0 0;flex-direction:column;justify-content:center;min-width:0}.AttachmentPreview_fileName__1Ccg0{color:var(--palette-primary-text-1)}.AttachmentPreview_fileName__1Ccg0,.AttachmentPreview_fileType__0v6E4{font-size:14px;line-height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.AttachmentPreview_fileType__0v6E4{color:var(--palette-primary-text-6);text-transform:uppercase}.AttachmentPreview_downloadButton__9oBz-{opacity:0;position:absolute;right:-6px;top:-6px;transition:opacity .2s;z-index:3}.AttachmentPreview_downloadButton__9oBz- button{backdrop-filter:blur(4px);background-color:rgb(from var(--palette-primary-text-1) r g b/.08)!important}.AttachmentPreview_downloadButton__9oBz- button:hover{background-color:rgb(from var(--palette-primary-text-1) r g b/.15)!important}.AttachmentPreview_fileCard__oxDbD:hover .AttachmentPreview_downloadButton__9oBz-{opacity:1}.AttachmentPreview_removeButton__aX-qu{opacity:0;position:absolute;right:-6px;top:-6px;transition:opacity .2s;z-index:3}.AttachmentPreview_removeButton__aX-qu button{backdrop-filter:blur(4px);background-color:rgb(from var(--palette-primary-text-1) r g b/.08)!important}.AttachmentPreview_removeButton__aX-qu button:hover{background-color:rgb(from var(--palette-primary-text-1) r g b/.15)!important}.AttachmentPreview_fileCard__oxDbD:hover .AttachmentPreview_removeButton__aX-qu,.AttachmentPreview_removeButtonVisible__BVjYB,.AttachmentPreview_thumbnail__ytI2L:hover .AttachmentPreview_removeButton__aX-qu{opacity:1}.AttachmentPreview_thumbnailError__yyH08{border:1px solid rgb(from var(--palette-error-main) r g b/.4)}.AttachmentPreview_uploadingOverlay__leV1D{background:rgb(from var(--palette-background-b-1) r g b/.5);border-radius:8px;inset:0;pointer-events:none;position:absolute}.AttachmentPreview_uploadingSpinner__u-t7d{align-items:center;backdrop-filter:blur(4px);background-color:rgb(from var(--palette-primary-text-1) r g b/.08);border-radius:6px;display:flex;height:24px;justify-content:center;position:absolute;right:-6px;top:-6px;width:24px;z-index:2}.AttachmentPreview_loader__HK5bZ{color:var(--palette-primary-text-6)!important;height:14px!important;width:14px!important}.AttachmentPreview_errorOverlay__8sM1d{background:rgb(from var(--palette-error-main) r g b/.08);border-radius:8px;inset:0;pointer-events:none;position:absolute}.AttachmentPreview_retryButton__tKVV0{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:2}.AttachmentPreview_retryButton__tKVV0 button{backdrop-filter:blur(4px);background-color:rgb(from var(--palette-primary-text-1) r g b/.08)!important}.AttachmentPreview_retryButton__tKVV0 button:hover{background-color:rgb(from var(--palette-primary-text-1) r g b/.15)!important}');export{e as default};
1
+ import t from'./../../ext-esm/style-inject/dist/style-inject.es.js';var e={spacing:"8",scroller:"AttachmentPreview_scroller__ZqYC8",slot:"AttachmentPreview_slot__ewKLo",slotDragging:"AttachmentPreview_slotDragging__hrfJX",slotContent:"AttachmentPreview_slotContent__GNuSu",insertion:"AttachmentPreview_insertion__iFqlp",insertionBefore:"AttachmentPreview_insertionBefore__jyWQM",insertionEdge:"AttachmentPreview_insertionEdge__Bjk1t",insertionAfter:"AttachmentPreview_insertionAfter__4NvhP",dragGhost:"AttachmentPreview_dragGhost__4aSzE",dragGhostHandle:"AttachmentPreview_dragGhostHandle__Gu2CP",thumbnail:"AttachmentPreview_thumbnail__ytI2L",clickable:"AttachmentPreview_clickable__BEXzK",selected:"AttachmentPreview_selected__JRuMO",thumbnailInner:"AttachmentPreview_thumbnailInner__9Ex4-",thumbnailImage:"AttachmentPreview_thumbnailImage__RQ4fL",videoOverlay:"AttachmentPreview_videoOverlay__5Lgi1",playIcon:"AttachmentPreview_playIcon__OOnql",fileCard:"AttachmentPreview_fileCard__oxDbD",fileCardLink:"AttachmentPreview_fileCardLink__TDpvh",fileCardContent:"AttachmentPreview_fileCardContent__c-99Q",fileInfo:"AttachmentPreview_fileInfo__eqJ-B",fileName:"AttachmentPreview_fileName__1Ccg0",fileType:"AttachmentPreview_fileType__0v6E4",tileActions:"AttachmentPreview_tileActions__2nLlw",tileActionLink:"AttachmentPreview_tileActionLink__aMyS4",removeButton:"AttachmentPreview_removeButton__aX-qu",removeButtonVisible:"AttachmentPreview_removeButtonVisible__BVjYB",thumbnailError:"AttachmentPreview_thumbnailError__yyH08",uploadingOverlay:"AttachmentPreview_uploadingOverlay__leV1D",uploadingSpinner:"AttachmentPreview_uploadingSpinner__u-t7d",loader:"AttachmentPreview_loader__HK5bZ",errorOverlay:"AttachmentPreview_errorOverlay__8sM1d",retryButton:"AttachmentPreview_retryButton__tKVV0"};t('.AttachmentPreview_scroller__ZqYC8{-ms-overflow-style:none;align-items:flex-start;display:flex;gap:12px;margin-left:-8px;overflow-x:auto;overflow-y:visible;padding-left:8px;padding-right:8px;padding-top:6px;scroll-behavior:smooth;scrollbar-width:none}.AttachmentPreview_scroller__ZqYC8::-webkit-scrollbar{display:none}.AttachmentPreview_slot__ewKLo{border-radius:8px;cursor:grab;flex-shrink:0;position:relative;touch-action:none}.AttachmentPreview_slot__ewKLo:focus-visible{outline:none}.AttachmentPreview_slot__ewKLo:focus-visible:before{border:2px solid var(--palette-primary-main);border-radius:8px;content:"";inset:0;pointer-events:none;position:absolute;z-index:5}.AttachmentPreview_slotDragging__hrfJX{cursor:grabbing}.AttachmentPreview_slotDragging__hrfJX .AttachmentPreview_slotContent__GNuSu{visibility:hidden}.AttachmentPreview_slotDragging__hrfJX:focus-visible:before{display:none}.AttachmentPreview_slotDragging__hrfJX:after{background:rgb(from var(--palette-primary-text-1) r g b/.04);border:1px dashed var(--palette-primary-text-6);border-radius:8px;content:"";inset:0;position:absolute}.AttachmentPreview_insertion__iFqlp{background:var(--palette-primary-main);border-radius:2px;bottom:0;box-shadow:0 0 6px rgb(from var(--palette-primary-main) r g b/.6);position:absolute;top:0;width:2px;z-index:4}.AttachmentPreview_insertionBefore__jyWQM,.AttachmentPreview_insertionEdge__Bjk1t{left:-7px}.AttachmentPreview_insertionAfter__4NvhP{right:-7px}.AttachmentPreview_dragGhost__4aSzE{background:var(--palette-background-b-6);border-radius:8px;box-shadow:0 10px 20px rgb(from var(--palette-background-b-1) r g b/.45);cursor:grabbing;opacity:.9;position:relative;transform:rotate(4deg)}.AttachmentPreview_dragGhostHandle__Gu2CP{align-items:center;display:flex;inset:0;justify-content:center;pointer-events:none;position:absolute;z-index:2}.AttachmentPreview_dragGhostHandle__Gu2CP button{backdrop-filter:blur(4px);background-color:rgb(from var(--palette-primary-text-1) r g b/.16)!important;color:var(--palette-primary-text-1)!important}.AttachmentPreview_dragGhostHandle__Gu2CP svg{color:var(--palette-primary-text-1)}.AttachmentPreview_thumbnail__ytI2L{border-radius:8px;flex-shrink:0;height:64px;overflow:visible;position:relative;width:64px}.AttachmentPreview_clickable__BEXzK{cursor:pointer}.AttachmentPreview_clickable__BEXzK:hover{opacity:.9}.AttachmentPreview_selected__JRuMO:after{border:1px solid var(--palette-primary-main);border-radius:8px;content:"";inset:0;pointer-events:none;position:absolute;z-index:4}.AttachmentPreview_thumbnailInner__9Ex4-{border-radius:8px;inset:0;overflow:hidden;pointer-events:none;position:absolute}.AttachmentPreview_thumbnailImage__RQ4fL{height:100%;left:50%;max-width:none;min-width:100%;object-fit:cover;pointer-events:none;position:absolute;top:0;transform:translateX(-50%);width:auto}.AttachmentPreview_videoOverlay__5Lgi1{align-items:center;background:rgb(from var(--palette-background-b-1) r g b/.5);border-radius:8px;display:flex;inset:0;justify-content:center;pointer-events:none;position:absolute}.AttachmentPreview_playIcon__OOnql{color:var(--palette-primary-text-1);font-size:32px}.AttachmentPreview_fileCard__oxDbD{align-items:flex-start;border:1px solid rgb(from var(--palette-primary-text-1) r g b/.08);border-radius:8px;display:flex;flex-direction:column;flex-shrink:0;height:64px;justify-content:center;padding:8px 16px;position:relative;width:142px}.AttachmentPreview_fileCardLink__TDpvh{color:inherit;cursor:pointer;text-decoration:none}.AttachmentPreview_fileCardLink__TDpvh:hover{border-color:rgb(from var(--palette-primary-text-1) r g b/.16)}.AttachmentPreview_fileCardContent__c-99Q{align-items:center;display:flex;gap:8px;width:100%}.AttachmentPreview_fileInfo__eqJ-B{align-items:flex-start;display:flex;flex:1 0 0;flex-direction:column;justify-content:center;min-width:0}.AttachmentPreview_fileName__1Ccg0{color:var(--palette-primary-text-1)}.AttachmentPreview_fileName__1Ccg0,.AttachmentPreview_fileType__0v6E4{font-size:14px;line-height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.AttachmentPreview_fileType__0v6E4{color:var(--palette-primary-text-6);text-transform:uppercase}.AttachmentPreview_tileActions__2nLlw{display:flex;gap:4px;opacity:0;position:absolute;right:-6px;top:-6px;transition:opacity .2s;z-index:3}.AttachmentPreview_tileActions__2nLlw button{backdrop-filter:blur(4px);background-color:rgb(from var(--palette-primary-text-1) r g b/.08)!important}.AttachmentPreview_tileActions__2nLlw button:hover{background-color:rgb(from var(--palette-primary-text-1) r g b/.15)!important}.AttachmentPreview_fileCard__oxDbD .AttachmentPreview_tileActions__2nLlw:focus-within,.AttachmentPreview_fileCard__oxDbD:hover .AttachmentPreview_tileActions__2nLlw,.AttachmentPreview_thumbnail__ytI2L .AttachmentPreview_tileActions__2nLlw:focus-within,.AttachmentPreview_thumbnail__ytI2L:hover .AttachmentPreview_tileActions__2nLlw{opacity:1}.AttachmentPreview_tileActionLink__aMyS4{display:inline-flex}.AttachmentPreview_removeButton__aX-qu{opacity:0;position:absolute;right:-6px;top:-6px;transition:opacity .2s;z-index:3}.AttachmentPreview_removeButton__aX-qu button{backdrop-filter:blur(4px);background-color:rgb(from var(--palette-primary-text-1) r g b/.08)!important}.AttachmentPreview_removeButton__aX-qu button:hover{background-color:rgb(from var(--palette-primary-text-1) r g b/.15)!important}.AttachmentPreview_fileCard__oxDbD:hover .AttachmentPreview_removeButton__aX-qu,.AttachmentPreview_removeButtonVisible__BVjYB,.AttachmentPreview_thumbnail__ytI2L:hover .AttachmentPreview_removeButton__aX-qu{opacity:1}.AttachmentPreview_thumbnailError__yyH08{border:1px solid rgb(from var(--palette-error-main) r g b/.4)}.AttachmentPreview_uploadingOverlay__leV1D{background:rgb(from var(--palette-background-b-1) r g b/.5);border-radius:8px;inset:0;pointer-events:none;position:absolute}.AttachmentPreview_uploadingSpinner__u-t7d{align-items:center;backdrop-filter:blur(4px);background-color:rgb(from var(--palette-primary-text-1) r g b/.08);border-radius:6px;display:flex;height:24px;justify-content:center;position:absolute;right:-6px;top:-6px;width:24px;z-index:2}.AttachmentPreview_loader__HK5bZ{color:var(--palette-primary-text-6)!important;height:14px!important;width:14px!important}.AttachmentPreview_errorOverlay__8sM1d{background:rgb(from var(--palette-error-main) r g b/.08);border-radius:8px;inset:0;pointer-events:none;position:absolute}.AttachmentPreview_retryButton__tKVV0{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:2}.AttachmentPreview_retryButton__tKVV0 button{backdrop-filter:blur(4px);background-color:rgb(from var(--palette-primary-text-1) r g b/.08)!important}.AttachmentPreview_retryButton__tKVV0 button:hover{background-color:rgb(from var(--palette-primary-text-1) r g b/.15)!important}');export{e as default};
2
2
  //# sourceMappingURL=AttachmentPreview.scss.js.map
@@ -1,10 +1,13 @@
1
1
  export type AttachmentKind = 'image' | 'video' | 'file';
2
2
  export type AttachmentPreviewItem = {
3
3
  id: string | number;
4
+ /** For a stored attachment this is the S3 key, not a bare file name. */
4
5
  name: string;
5
6
  src?: string;
6
7
  downloadUrl?: string;
7
8
  kind?: AttachmentKind;
9
+ /** Bytes. */
10
+ size?: number;
8
11
  isUploading?: boolean;
9
12
  error?: string;
10
13
  };
@@ -13,6 +16,10 @@ export type AttachmentPreviewProps = {
13
16
  onRemove?: (id: AttachmentPreviewItem['id']) => void;
14
17
  onRetry?: (id: AttachmentPreviewItem['id']) => void;
15
18
  onItemClick?: (item: AttachmentPreviewItem) => void;
19
+ /** Adds "Share file" to the overflow menu. Ignored when `onItemClick` takes the click over. */
20
+ onShare?: (item: AttachmentPreviewItem) => void;
21
+ /** Drops the per-tile hover actions, where the surrounding UI already offers them. */
22
+ hideActions?: boolean;
16
23
  /** Enables drag-to-reorder; receives the full id list in its new order. */
17
24
  onReorder?: (orderedIds: AttachmentPreviewItem['id'][]) => void;
18
25
  className?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"AttachmentPreview.types.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentPreview/AttachmentPreview.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AAExD,MAAM,MAAM,qBAAqB,GAAG;IAClC,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,KAAK,EAAE,qBAAqB,EAAE,CAAC;IAC/B,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,qBAAqB,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC;IACrD,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,qBAAqB,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC;IACpD,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,qBAAqB,KAAK,IAAI,CAAC;IACpD,2EAA2E;IAC3E,SAAS,CAAC,EAAE,CAAC,UAAU,EAAE,qBAAqB,CAAC,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC;IAEhE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC"}
1
+ {"version":3,"file":"AttachmentPreview.types.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentPreview/AttachmentPreview.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AAExD,MAAM,MAAM,qBAAqB,GAAG;IAClC,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,wEAAwE;IACxE,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,aAAa;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,KAAK,EAAE,qBAAqB,EAAE,CAAC;IAC/B,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,qBAAqB,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC;IACrD,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,qBAAqB,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC;IACpD,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,qBAAqB,KAAK,IAAI,CAAC;IACpD,+FAA+F;IAC/F,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,qBAAqB,KAAK,IAAI,CAAC;IAChD,sFAAsF;IACtF,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,2EAA2E;IAC3E,SAAS,CAAC,EAAE,CAAC,UAAU,EAAE,qBAAqB,CAAC,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC;IAEhE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC"}
@@ -1,5 +1,9 @@
1
- import { AttachmentPreviewProps } from './AttachmentPreview.types';
2
- export type AttachmentRowProps = Omit<AttachmentPreviewProps, 'onReorder'>;
1
+ import { AttachmentPreviewItem, AttachmentPreviewProps } from './AttachmentPreview.types';
2
+ export type AttachmentRowProps = Omit<AttachmentPreviewProps, 'onReorder'> & {
3
+ selectedId?: AttachmentPreviewItem['id'];
4
+ };
3
5
  /** The plain, non-reorderable strip. `SortableAttachments` is its drag-and-drop counterpart. */
4
- export declare const AttachmentRow: import("react").ForwardRefExoticComponent<AttachmentRowProps & import("react").RefAttributes<HTMLDivElement>>;
6
+ export declare const AttachmentRow: import("react").ForwardRefExoticComponent<Omit<AttachmentPreviewProps, "onReorder"> & {
7
+ selectedId?: AttachmentPreviewItem['id'];
8
+ } & import("react").RefAttributes<HTMLDivElement>>;
5
9
  //# sourceMappingURL=AttachmentRow.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AttachmentRow.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentPreview/AttachmentRow.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAInE,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,sBAAsB,EAAE,WAAW,CAAC,CAAC;AAE3E,gGAAgG;AAChG,eAAO,MAAM,aAAa,+GAczB,CAAC"}
1
+ {"version":3,"file":"AttachmentRow.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentPreview/AttachmentRow.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAI1F,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,sBAAsB,EAAE,WAAW,CAAC,GAAG;IAC3E,UAAU,CAAC,EAAE,qBAAqB,CAAC,IAAI,CAAC,CAAC;CAC1C,CAAC;AAEF,gGAAgG;AAChG,eAAO,MAAM,aAAa;iBAJX,qBAAqB,CAAC,IAAI,CAAC;kDAwBzC,CAAC"}
@@ -1,2 +1,2 @@
1
- import{forwardRef as t}from"react";import e from"classnames";import{AttachmentTile as r}from"./AttachmentTile.js";import m from"./AttachmentPreview.scss.js";import{jsx as o}from"react/jsx-runtime";var i=t((function(t,i){var n=t.items,s=t.onRemove,a=t.onRetry,c=t.onItemClick,l=t.className,f=t.testId;return o("div",{ref:i,"data-testid":f,className:e(m.scroller,l),children:n.map((function(t){return o(r,{item:t,onRemove:s,onRetry:a,onItemClick:c},t.id)}))})}));export{i as AttachmentRow};
1
+ import{forwardRef as e}from"react";import t from"classnames";import{AttachmentTile as r}from"./AttachmentTile.js";import o from"./AttachmentPreview.scss.js";import{jsx as i}from"react/jsx-runtime";var m=e((function(e,m){var n=e.items,s=e.onRemove,c=e.onRetry,a=e.onItemClick,d=e.onShare,l=e.selectedId,f=e.hideActions,h=e.className,p=e.testId;return i("div",{ref:m,"data-testid":p,className:t(o.scroller,h),children:n.map((function(e){return i(r,{item:e,onRemove:s,onRetry:c,onItemClick:a,onShare:d,isSelected:void 0!==l&&e.id===l,hideActions:f},e.id)}))})}));export{m as AttachmentRow};
2
2
  //# sourceMappingURL=AttachmentRow.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AttachmentRow.js","sources":["../../../src/components/AttachmentPreview/AttachmentRow.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport classNames from 'classnames';\n\nimport { AttachmentTile } from './AttachmentTile';\nimport { AttachmentPreviewProps } from './AttachmentPreview.types';\n\nimport styles from './AttachmentPreview.scss';\n\nexport type AttachmentRowProps = Omit<AttachmentPreviewProps, 'onReorder'>;\n\n/** The plain, non-reorderable strip. `SortableAttachments` is its drag-and-drop counterpart. */\nexport const AttachmentRow = forwardRef<HTMLDivElement, AttachmentRowProps>(\n ({ items, onRemove, onRetry, onItemClick, className, testId }, ref) => (\n <div ref={ref} data-testid={testId} className={classNames(styles.scroller, className)}>\n {items.map(item => (\n <AttachmentTile\n key={item.id}\n item={item}\n onRemove={onRemove}\n onRetry={onRetry}\n onItemClick={onItemClick}\n />\n ))}\n </div>\n )\n);\n"],"names":["AttachmentRow","forwardRef","ref","items","onRemove","onRetry","onItemClick","className","testId","_jsx","classNames","styles","scroller","children","map","item","AttachmentTile","id"],"mappings":"yMAWaA,EAAgBC,GAC3B,WAA+DC,GAAG,IAA/DC,IAAAA,MAAOC,IAAAA,SAAUC,IAAAA,QAASC,IAAAA,YAAaC,IAAAA,UAAWC,IAAAA,OAAM,OACzDC,EAAA,MAAA,CAAKP,IAAKA,EAAK,cAAaM,EAAQD,UAAWG,EAAWC,EAAOC,SAAUL,GAAWM,SACnFV,EAAMW,KAAI,SAAAC,GAAI,OACbN,EAACO,EAAc,CAEbD,KAAMA,EACNX,SAAUA,EACVC,QAASA,EACTC,YAAaA,GAJRS,EAAKE,QAOV"}
1
+ {"version":3,"file":"AttachmentRow.js","sources":["../../../src/components/AttachmentPreview/AttachmentRow.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport classNames from 'classnames';\n\nimport { AttachmentTile } from './AttachmentTile';\nimport { AttachmentPreviewItem, AttachmentPreviewProps } from './AttachmentPreview.types';\n\nimport styles from './AttachmentPreview.scss';\n\nexport type AttachmentRowProps = Omit<AttachmentPreviewProps, 'onReorder'> & {\n selectedId?: AttachmentPreviewItem['id'];\n};\n\n/** The plain, non-reorderable strip. `SortableAttachments` is its drag-and-drop counterpart. */\nexport const AttachmentRow = forwardRef<HTMLDivElement, AttachmentRowProps>(\n (\n { items, onRemove, onRetry, onItemClick, onShare, selectedId, hideActions, className, testId },\n ref\n ) => (\n <div ref={ref} data-testid={testId} className={classNames(styles.scroller, className)}>\n {items.map(item => (\n <AttachmentTile\n key={item.id}\n item={item}\n onRemove={onRemove}\n onRetry={onRetry}\n onItemClick={onItemClick}\n onShare={onShare}\n isSelected={selectedId !== undefined && item.id === selectedId}\n hideActions={hideActions}\n />\n ))}\n </div>\n )\n);\n"],"names":["AttachmentRow","forwardRef","ref","items","onRemove","onRetry","onItemClick","onShare","selectedId","hideActions","className","testId","_jsx","classNames","styles","scroller","children","map","item","AttachmentTile","isSelected","undefined","id"],"mappings":"yMAaaA,EAAgBC,GAC3B,WAEEC,GAAG,IADDC,IAAAA,MAAOC,IAAAA,SAAUC,IAAAA,QAASC,IAAAA,YAAaC,IAAAA,QAASC,IAAAA,WAAYC,IAAAA,YAAaC,IAAAA,UAAWC,IAAAA,OAAM,OAG5FC,EAAA,MAAA,CAAKV,IAAKA,EAAK,cAAaS,EAAQD,UAAWG,EAAWC,EAAOC,SAAUL,GAAWM,SACnFb,EAAMc,KAAI,SAAAC,GAAI,OACbN,EAACO,EAAc,CAEbD,KAAMA,EACNd,SAAUA,EACVC,QAASA,EACTC,YAAaA,EACbC,QAASA,EACTa,gBAA2BC,IAAfb,GAA4BU,EAAKI,KAAOd,EACpDC,YAAaA,GAPRS,EAAKI,QAUV"}
@@ -4,6 +4,10 @@ export type AttachmentTileProps = {
4
4
  onRemove?: AttachmentPreviewProps['onRemove'];
5
5
  onRetry?: AttachmentPreviewProps['onRetry'];
6
6
  onItemClick?: AttachmentPreviewProps['onItemClick'];
7
+ isSelected?: boolean;
8
+ hideActions?: boolean;
9
+ /** Adds "Share file" to the tile's hover menu. */
10
+ onShare?: (item: AttachmentPreviewItem) => void;
7
11
  };
8
- export declare const AttachmentTile: ({ item, onRemove, onRetry, onItemClick }: AttachmentTileProps) => import("react/jsx-runtime").JSX.Element;
12
+ export declare const AttachmentTile: ({ item, onRemove, onRetry, onItemClick, isSelected, hideActions, onShare, }: AttachmentTileProps) => import("react/jsx-runtime").JSX.Element;
9
13
  //# sourceMappingURL=AttachmentTile.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AttachmentTile.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentPreview/AttachmentTile.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAiB1F,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,qBAAqB,CAAC;IAC5B,QAAQ,CAAC,EAAE,sBAAsB,CAAC,UAAU,CAAC,CAAC;IAC9C,OAAO,CAAC,EAAE,sBAAsB,CAAC,SAAS,CAAC,CAAC;IAC5C,WAAW,CAAC,EAAE,sBAAsB,CAAC,aAAa,CAAC,CAAC;CACrD,CAAC;AAyDF,eAAO,MAAM,cAAc,6CAA8C,mBAAmB,4CAqF3F,CAAC"}
1
+ {"version":3,"file":"AttachmentTile.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentPreview/AttachmentTile.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAgB1F,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,qBAAqB,CAAC;IAC5B,QAAQ,CAAC,EAAE,sBAAsB,CAAC,UAAU,CAAC,CAAC;IAC9C,OAAO,CAAC,EAAE,sBAAsB,CAAC,SAAS,CAAC,CAAC;IAC5C,WAAW,CAAC,EAAE,sBAAsB,CAAC,aAAa,CAAC,CAAC;IACpD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kDAAkD;IAClD,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,qBAAqB,KAAK,IAAI,CAAC;CACjD,CAAC;AA0FF,eAAO,MAAM,cAAc,gFAQxB,mBAAmB,4CAiGrB,CAAC"}
@@ -1,2 +1,2 @@
1
- import o from"classnames";import{FileIcon as s}from"../../componentsV2/FileIcon/FileIcon.js";import{ButtonIcon as i}from"../../componentsV2/ButtonIcon/ButtonIcon.js";import{Tooltip as c}from"../../componentsV2/Tooltip/Tooltip.js";import{LoaderCircular as n}from"../../componentsV2/LoaderCircular/LoaderCircular.js";import{PlayOneIcon as t,DownloadIcon as r,UndoIcon as e,CloseSmallIcon as m}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 a from"./AttachmentPreview.scss.js";import l from"../../utils/main.js";import{jsxs as p,jsx as u,Fragment as d}from"react/jsx-runtime";var I=function(o){var s,i=o.split(".");return i.length>1?(null!==(s=i.pop())&&void 0!==s?s:"").toUpperCase():""},j=function(o){return function(s){s.stopPropagation(),o()}},h=function(s){var t=s.item,r=s.onRemove,l=s.onRetry;return p(d,{children:[t.isUploading&&p(d,{children:[u("div",{className:a.uploadingOverlay}),u("div",{className:a.uploadingSpinner,children:u(n,{size:"xs",className:a.loader})})]}),!!t.error&&p(d,{children:[u("div",{className:a.errorOverlay}),l&&u(c,{title:"Retry upload",children:u("div",{className:a.retryButton,children:u(i,{size:"xs",type:"tertiaryBg",onClick:j((function(){return l(t.id)})),testId:"attachment-retry",children:u(e,{size:"small"})})})})]}),r&&!t.isUploading&&u(c,{title:"Remove",children:u("div",{className:o(a.removeButton,!!t.error&&a.removeButtonVisible),children:u(i,{size:"xs",type:"tertiaryBg",onClick:j((function(){return r(t.id)})),testId:"attachment-remove",children:u(m,{size:"small"})})})})]})},v=function(n){var e,m,j=n.item,v=n.onRemove,C=n.onRetry,f=n.onItemClick,g=null!==(e=j.kind)&&void 0!==e?e:"file",N=u(h,{item:j,onRemove:v,onRetry:C}),y=l.getFileNameWithExtensionFromPath(j.name);if("image"===g||"video"===g){var b=!!f&&!j.isUploading&&!j.error;return p("div",{className:o(a.thumbnail,b&&a.clickable,!!j.error&&a.thumbnailError),onClick:b?function(){return null==f?void 0:f(j)}:void 0,children:[u("div",{className:a.thumbnailInner,children:"image"===g?u("img",{src:j.src,alt:y,className:a.thumbnailImage}):u("video",{src:(m=j.src,m&&!m.includes("#t=")?"".concat(m,"#t=0.1"):m),className:a.thumbnailImage,preload:"metadata",playsInline:!0,muted:!0})}),"video"===g&&u("div",{className:a.videoOverlay,children:u(t,{theme:"filled",className:a.playIcon})}),N]})}var F,O=!(!j.downloadUrl||v||j.isUploading||j.error),k=p(d,{children:[p("div",{className:a.fileCardContent,children:[u(s,{name:y}),p("div",{className:a.fileInfo,children:[u(c,{title:y,children:u("div",{className:a.fileName,children:(F=y,F.replace(/\.[^/.]+$/,""))})}),u("div",{className:a.fileType,children:I(y)})]})]}),O&&u(c,{title:"Download",children:u("div",{className:a.downloadButton,children:u(i,{size:"xs",type:"tertiaryBg",testId:"attachment-download-button",children:u(r,{size:"small"})})})}),N]});return O?u("a",{href:j.downloadUrl,download:y,className:o(a.fileCard,a.fileCardLink),"data-testid":"attachment-download",children:k}):u("div",{className:o(a.fileCard,!!j.error&&a.thumbnailError),children:k})};export{v as AttachmentTile};
1
+ import o from"@babel/runtime/helpers/defineProperty";import{useRef as s}from"react";import i from"classnames";import{FileIcon as n}from"../../componentsV2/FileIcon/FileIcon.js";import{ButtonIcon as c}from"../../componentsV2/ButtonIcon/ButtonIcon.js";import{Tooltip as t}from"../../componentsV2/Tooltip/Tooltip.js";import{LoaderCircular as e}from"../../componentsV2/LoaderCircular/LoaderCircular.js";import{PlayOneIcon as r,UndoIcon as m,CloseSmallIcon as a}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{AttachmentActionsMenu as l}from"./AttachmentActionsMenu.js";import{AttachmentImage as p}from"./AttachmentImage.js";import{AttachmentDownloadLink as u}from"./AttachmentDownloadLink.js";import d from"./AttachmentPreview.scss.js";import j from"../../utils/main.js";import{jsxs as I,jsx as h,Fragment as f}from"react/jsx-runtime";function v(o,s){var i=Object.keys(o);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(o);s&&(n=n.filter((function(s){return Object.getOwnPropertyDescriptor(o,s).enumerable}))),i.push.apply(i,n)}return i}function b(s){for(var i=1;i<arguments.length;i++){var n=null!=arguments[i]?arguments[i]:{};i%2?v(Object(n),!0).forEach((function(i){o(s,i,n[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(o){Object.defineProperty(s,o,Object.getOwnPropertyDescriptor(n,o))}))}return s}var C=function(o){var s,i=o.split(".");return i.length>1?(null!==(s=i.pop())&&void 0!==s?s:"").toUpperCase():""},g=function(o){var s=o.item,i=o.onShare,n=o.imageRef,c=j.getFileNameWithExtensionFromPath(s.name),t=s.downloadUrl||s.src;return I("div",{className:d.tileActions,"data-testid":"attachment-tile-actions",children:[!!t&&h(u,{url:t,fileName:c,size:"xs",className:d.tileActionLink}),h(l,{item:s,onShare:i,size:"xs",testIdPrefix:"attachment-tile",tooltip:"More actions",imageRef:n})]})},y=function(o){return function(s){s.stopPropagation(),o()}},O=function(o){var s=o.item,n=o.onRemove,r=o.onRetry;return I(f,{children:[s.isUploading&&I(f,{children:[h("div",{className:d.uploadingOverlay}),h("div",{className:d.uploadingSpinner,children:h(e,{size:"xs",className:d.loader})})]}),!!s.error&&I(f,{children:[h("div",{className:d.errorOverlay}),r&&h(t,{title:"Retry upload",children:h("div",{className:d.retryButton,children:h(c,{size:"xs",type:"tertiaryBg",onClick:y((function(){return r(s.id)})),testId:"attachment-retry",children:h(m,{size:"small"})})})})]}),n&&!s.isUploading&&h(t,{title:"Remove",children:h("div",{className:i(d.removeButton,!!s.error&&d.removeButtonVisible),children:h(c,{size:"xs",type:"tertiaryBg",onClick:y((function(){return n(s.id)})),testId:"attachment-remove",children:h(a,{size:"small"})})})})]})},N=function(o){var c,e,m=o.item,a=o.onRemove,l=o.onRetry,u=o.onItemClick,v=o.isSelected,y=o.hideActions,N=o.onShare,P=s(null),F=null!==(c=m.kind)&&void 0!==c?c:"file",k=h(O,{item:m,onRemove:a,onRetry:l}),A=j.getFileNameWithExtensionFromPath(m.name),R=!m.isUploading&&!m.error,x=!!u&&R,S=!y&&!a&&R;if("image"===F||"video"===F)return I("div",{className:i(d.thumbnail,x&&d.clickable,v&&d.selected,!!m.error&&d.thumbnailError),onClick:x?function(){return null==u?void 0:u(m)}:void 0,children:[h("div",{className:d.thumbnailInner,children:"image"===F?h(p,{ref:P,src:m.src,alt:A,className:d.thumbnailImage}):h("video",{src:(e=m.src,e&&!e.includes("#t=")?"".concat(e,"#t=0.1"):e),className:d.thumbnailImage,preload:"metadata",playsInline:!0,muted:!0})}),"video"===F&&h("div",{className:d.videoOverlay,children:h(r,{theme:"filled",className:d.playIcon})}),S&&h(g,{item:m,onShare:N,imageRef:P}),k]});var D,E=I(f,{children:[I("div",{className:d.fileCardContent,children:[h(n,{name:A}),I("div",{className:d.fileInfo,children:[h(t,{title:A,children:h("div",{className:d.fileName,children:(D=A,D.replace(/\.[^/.]+$/,""))})}),h("div",{className:d.fileType,children:C(A)})]})]}),S&&h(g,{item:m,onShare:N}),k]}),w=x?{role:"button",tabIndex:0,onClick:function(){return null==u?void 0:u(m)},onKeyDown:function(o){o.target===o.currentTarget&&("Enter"!==o.key&&" "!==o.key||(o.preventDefault(),null==u||u(m)))}}:{};return h("div",b(b({className:i(d.fileCard,x&&d.fileCardLink,v&&d.selected,!!m.error&&d.thumbnailError)},w),{},{children:E}))};export{N as AttachmentTile};
2
2
  //# sourceMappingURL=AttachmentTile.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AttachmentTile.js","sources":["../../../src/components/AttachmentPreview/AttachmentTile.tsx"],"sourcesContent":["import { MouseEvent } from 'react';\nimport classNames from 'classnames';\n\nimport { FileIcon } from '../../componentsV2/FileIcon';\nimport { ButtonIcon } from '../../componentsV2/ButtonIcon';\nimport { Tooltip } from '../../componentsV2/Tooltip';\nimport { LoaderCircular } from '../../componentsV2/LoaderCircular';\nimport { PlayOneIcon, CloseSmallIcon, UndoIcon } from '../../icons';\n\nimport { AttachmentPreviewItem, AttachmentPreviewProps } from './AttachmentPreview.types';\n\nimport styles from './AttachmentPreview.scss';\n\nimport { DownloadIcon } from '~/icons';\nimport utils from '~/utils/main';\n\nconst getExtension = (name: string) => {\n const parts = name.split('.');\n return parts.length > 1 ? (parts.pop() ?? '').toUpperCase() : '';\n};\n\nconst dropExtension = (name: string) => name.replace(/\\.[^/.]+$/, '');\n\n// A bare <video> paints nothing until a frame is decoded; the media fragment forces one.\nconst withFirstFrame = (src?: string) => (src && !src.includes('#t=') ? `${src}#t=0.1` : src);\n\nexport type AttachmentTileProps = {\n item: AttachmentPreviewItem;\n onRemove?: AttachmentPreviewProps['onRemove'];\n onRetry?: AttachmentPreviewProps['onRetry'];\n onItemClick?: AttachmentPreviewProps['onItemClick'];\n};\n\nconst stopAndRun = (action: () => void) => (event: MouseEvent) => {\n event.stopPropagation();\n action();\n};\n\nconst TileOverlays = ({ item, onRemove, onRetry }: Omit<AttachmentTileProps, 'onItemClick'>) => (\n <>\n {item.isUploading && (\n <>\n <div className={styles.uploadingOverlay} />\n <div className={styles.uploadingSpinner}>\n <LoaderCircular size=\"xs\" className={styles.loader} />\n </div>\n </>\n )}\n\n {!!item.error && (\n <>\n <div className={styles.errorOverlay} />\n {onRetry && (\n <Tooltip title=\"Retry upload\">\n <div className={styles.retryButton}>\n <ButtonIcon\n size=\"xs\"\n type=\"tertiaryBg\"\n onClick={stopAndRun(() => onRetry(item.id))}\n testId=\"attachment-retry\"\n >\n <UndoIcon size=\"small\" />\n </ButtonIcon>\n </div>\n </Tooltip>\n )}\n </>\n )}\n\n {onRemove && !item.isUploading && (\n <Tooltip title=\"Remove\">\n <div\n className={classNames(styles.removeButton, !!item.error && styles.removeButtonVisible)}\n >\n <ButtonIcon\n size=\"xs\"\n type=\"tertiaryBg\"\n onClick={stopAndRun(() => onRemove(item.id))}\n testId=\"attachment-remove\"\n >\n <CloseSmallIcon size=\"small\" />\n </ButtonIcon>\n </div>\n </Tooltip>\n )}\n </>\n);\n\nexport const AttachmentTile = ({ item, onRemove, onRetry, onItemClick }: AttachmentTileProps) => {\n const kind = item.kind ?? 'file';\n const overlays = <TileOverlays item={item} onRemove={onRemove} onRetry={onRetry} />;\n const fileName = utils.getFileNameWithExtensionFromPath(item.name);\n\n if (kind === 'image' || kind === 'video') {\n const clickable = !!onItemClick && !item.isUploading && !item.error;\n return (\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events\n <div\n className={classNames(\n styles.thumbnail,\n clickable && styles.clickable,\n !!item.error && styles.thumbnailError\n )}\n onClick={clickable ? () => onItemClick?.(item) : undefined}\n >\n <div className={styles.thumbnailInner}>\n {kind === 'image' ? (\n <img src={item.src} alt={fileName} className={styles.thumbnailImage} />\n ) : (\n <video\n src={withFirstFrame(item.src)}\n className={styles.thumbnailImage}\n preload=\"metadata\"\n playsInline\n muted\n />\n )}\n </div>\n {kind === 'video' && (\n <div className={styles.videoOverlay}>\n <PlayOneIcon theme=\"filled\" className={styles.playIcon} />\n </div>\n )}\n {overlays}\n </div>\n );\n }\n\n // Download and remove share the tile's top-right corner, so an editable tile keeps only Remove.\n const isDownloadable = !!item.downloadUrl && !onRemove && !item.isUploading && !item.error;\n\n const fileCardContent = (\n <>\n <div className={styles.fileCardContent}>\n <FileIcon name={fileName} />\n <div className={styles.fileInfo}>\n <Tooltip title={fileName}>\n <div className={styles.fileName}>{dropExtension(fileName)}</div>\n </Tooltip>\n <div className={styles.fileType}>{getExtension(fileName)}</div>\n </div>\n </div>\n {isDownloadable && (\n <Tooltip title=\"Download\">\n <div className={styles.downloadButton}>\n <ButtonIcon size=\"xs\" type=\"tertiaryBg\" testId=\"attachment-download-button\">\n <DownloadIcon size=\"small\" />\n </ButtonIcon>\n </div>\n </Tooltip>\n )}\n {overlays}\n </>\n );\n\n if (isDownloadable) {\n return (\n <a\n href={item.downloadUrl}\n download={fileName}\n className={classNames(styles.fileCard, styles.fileCardLink)}\n data-testid=\"attachment-download\"\n >\n {fileCardContent}\n </a>\n );\n }\n\n return (\n <div className={classNames(styles.fileCard, !!item.error && styles.thumbnailError)}>\n {fileCardContent}\n </div>\n );\n};\n"],"names":["getExtension","name","_parts$pop","parts","split","length","pop","toUpperCase","stopAndRun","action","event","stopPropagation","TileOverlays","_ref","item","onRemove","onRetry","_jsxs","_Fragment","children","isUploading","_jsx","className","styles","uploadingOverlay","uploadingSpinner","LoaderCircular","size","loader","error","errorOverlay","Tooltip","title","retryButton","ButtonIcon","type","onClick","id","testId","UndoIcon","classNames","removeButton","removeButtonVisible","CloseSmallIcon","AttachmentTile","_ref2","_item$kind","src","onItemClick","kind","overlays","fileName","utils","getFileNameWithExtensionFromPath","clickable","thumbnail","thumbnailError","undefined","thumbnailInner","alt","thumbnailImage","includes","concat","preload","playsInline","muted","videoOverlay","PlayOneIcon","theme","playIcon","isDownloadable","downloadUrl","fileCardContent","FileIcon","fileInfo","replace","fileType","downloadButton","DownloadIcon","href","download","fileCard","fileCardLink"],"mappings":"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"}
1
+ {"version":3,"file":"AttachmentTile.js","sources":["../../../src/components/AttachmentPreview/AttachmentTile.tsx"],"sourcesContent":["import { KeyboardEvent, MouseEvent, RefObject, useRef } from 'react';\nimport classNames from 'classnames';\n\nimport { FileIcon } from '../../componentsV2/FileIcon';\nimport { ButtonIcon } from '../../componentsV2/ButtonIcon';\nimport { Tooltip } from '../../componentsV2/Tooltip';\nimport { LoaderCircular } from '../../componentsV2/LoaderCircular';\nimport { PlayOneIcon, CloseSmallIcon, UndoIcon } from '../../icons';\n\nimport { AttachmentActionsMenu } from './AttachmentActionsMenu';\nimport { AttachmentImage } from './AttachmentImage';\nimport { AttachmentDownloadLink } from './AttachmentDownloadLink';\nimport { AttachmentPreviewItem, AttachmentPreviewProps } from './AttachmentPreview.types';\n\nimport styles from './AttachmentPreview.scss';\n\nimport utils from '~/utils/main';\n\nconst getExtension = (name: string) => {\n const parts = name.split('.');\n return parts.length > 1 ? (parts.pop() ?? '').toUpperCase() : '';\n};\n\nconst dropExtension = (name: string) => name.replace(/\\.[^/.]+$/, '');\n\n// A bare <video> paints nothing until a frame is decoded; the media fragment forces one.\nconst withFirstFrame = (src?: string) => (src && !src.includes('#t=') ? `${src}#t=0.1` : src);\n\nexport type AttachmentTileProps = {\n item: AttachmentPreviewItem;\n onRemove?: AttachmentPreviewProps['onRemove'];\n onRetry?: AttachmentPreviewProps['onRetry'];\n onItemClick?: AttachmentPreviewProps['onItemClick'];\n isSelected?: boolean;\n hideActions?: boolean;\n /** Adds \"Share file\" to the tile's hover menu. */\n onShare?: (item: AttachmentPreviewItem) => void;\n};\n\nconst TileActions = ({\n item,\n onShare,\n imageRef,\n}: Pick<AttachmentTileProps, 'item' | 'onShare'> & {\n imageRef?: RefObject<HTMLImageElement>;\n}) => {\n const fileName = utils.getFileNameWithExtensionFromPath(item.name);\n const downloadUrl = item.downloadUrl || item.src;\n\n return (\n <div className={styles.tileActions} data-testid=\"attachment-tile-actions\">\n {!!downloadUrl && (\n <AttachmentDownloadLink\n url={downloadUrl}\n fileName={fileName}\n size=\"xs\"\n className={styles.tileActionLink}\n />\n )}\n\n <AttachmentActionsMenu\n item={item}\n onShare={onShare}\n size=\"xs\"\n testIdPrefix=\"attachment-tile\"\n tooltip=\"More actions\"\n imageRef={imageRef}\n />\n </div>\n );\n};\n\nconst stopAndRun = (action: () => void) => (event: MouseEvent) => {\n event.stopPropagation();\n action();\n};\n\nconst TileOverlays = ({ item, onRemove, onRetry }: Omit<AttachmentTileProps, 'onItemClick'>) => (\n <>\n {item.isUploading && (\n <>\n <div className={styles.uploadingOverlay} />\n <div className={styles.uploadingSpinner}>\n <LoaderCircular size=\"xs\" className={styles.loader} />\n </div>\n </>\n )}\n\n {!!item.error && (\n <>\n <div className={styles.errorOverlay} />\n {onRetry && (\n <Tooltip title=\"Retry upload\">\n <div className={styles.retryButton}>\n <ButtonIcon\n size=\"xs\"\n type=\"tertiaryBg\"\n onClick={stopAndRun(() => onRetry(item.id))}\n testId=\"attachment-retry\"\n >\n <UndoIcon size=\"small\" />\n </ButtonIcon>\n </div>\n </Tooltip>\n )}\n </>\n )}\n\n {onRemove && !item.isUploading && (\n <Tooltip title=\"Remove\">\n <div\n className={classNames(styles.removeButton, !!item.error && styles.removeButtonVisible)}\n >\n <ButtonIcon\n size=\"xs\"\n type=\"tertiaryBg\"\n onClick={stopAndRun(() => onRemove(item.id))}\n testId=\"attachment-remove\"\n >\n <CloseSmallIcon size=\"small\" />\n </ButtonIcon>\n </div>\n </Tooltip>\n )}\n </>\n);\n\nexport const AttachmentTile = ({\n item,\n onRemove,\n onRetry,\n onItemClick,\n isSelected,\n hideActions,\n onShare,\n}: AttachmentTileProps) => {\n const imageRef = useRef<HTMLImageElement>(null);\n const kind = item.kind ?? 'file';\n const overlays = <TileOverlays item={item} onRemove={onRemove} onRetry={onRetry} />;\n const fileName = utils.getFileNameWithExtensionFromPath(item.name);\n const isReady = !item.isUploading && !item.error;\n const clickable = !!onItemClick && isReady;\n // A tile being composed shows Remove in the same corner, and has nothing to link to.\n const showActions = !hideActions && !onRemove && isReady;\n\n if (kind === 'image' || kind === 'video') {\n return (\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events\n <div\n className={classNames(\n styles.thumbnail,\n clickable && styles.clickable,\n isSelected && styles.selected,\n !!item.error && styles.thumbnailError\n )}\n onClick={clickable ? () => onItemClick?.(item) : undefined}\n >\n <div className={styles.thumbnailInner}>\n {kind === 'image' ? (\n <AttachmentImage\n ref={imageRef}\n src={item.src}\n alt={fileName}\n className={styles.thumbnailImage}\n />\n ) : (\n <video\n src={withFirstFrame(item.src)}\n className={styles.thumbnailImage}\n preload=\"metadata\"\n playsInline\n muted\n />\n )}\n </div>\n {kind === 'video' && (\n <div className={styles.videoOverlay}>\n <PlayOneIcon theme=\"filled\" className={styles.playIcon} />\n </div>\n )}\n {showActions && <TileActions item={item} onShare={onShare} imageRef={imageRef} />}\n {overlays}\n </div>\n );\n }\n\n const fileCardContent = (\n <>\n <div className={styles.fileCardContent}>\n <FileIcon name={fileName} />\n <div className={styles.fileInfo}>\n <Tooltip title={fileName}>\n <div className={styles.fileName}>{dropExtension(fileName)}</div>\n </Tooltip>\n <div className={styles.fileType}>{getExtension(fileName)}</div>\n </div>\n </div>\n {showActions && <TileActions item={item} onShare={onShare} />}\n {overlays}\n </>\n );\n\n const cardInteraction = clickable\n ? {\n role: 'button',\n tabIndex: 0,\n onClick: () => onItemClick?.(item),\n onKeyDown: (event: KeyboardEvent) => {\n // Keys bubbling from the nested download link must reach it, not open the preview.\n if (event.target !== event.currentTarget) return;\n if (event.key !== 'Enter' && event.key !== ' ') return;\n\n // Space would otherwise scroll the surrounding feed.\n event.preventDefault();\n onItemClick?.(item);\n },\n }\n : {};\n\n return (\n <div\n className={classNames(\n styles.fileCard,\n clickable && styles.fileCardLink,\n isSelected && styles.selected,\n !!item.error && styles.thumbnailError\n )}\n {...cardInteraction}\n >\n {fileCardContent}\n </div>\n );\n};\n"],"names":["getExtension","name","_parts$pop","parts","split","length","pop","toUpperCase","TileActions","_ref","item","onShare","imageRef","fileName","utils","getFileNameWithExtensionFromPath","downloadUrl","src","_jsxs","className","styles","tileActions","children","_jsx","AttachmentDownloadLink","url","size","tileActionLink","AttachmentActionsMenu","testIdPrefix","tooltip","stopAndRun","action","event","stopPropagation","TileOverlays","_ref2","onRemove","onRetry","_Fragment","isUploading","uploadingOverlay","uploadingSpinner","LoaderCircular","loader","error","errorOverlay","Tooltip","title","retryButton","ButtonIcon","type","onClick","id","testId","UndoIcon","classNames","removeButton","removeButtonVisible","CloseSmallIcon","AttachmentTile","_ref3","_item$kind","onItemClick","isSelected","hideActions","useRef","kind","overlays","isReady","clickable","showActions","thumbnail","selected","thumbnailError","undefined","thumbnailInner","AttachmentImage","ref","alt","thumbnailImage","includes","concat","preload","playsInline","muted","videoOverlay","PlayOneIcon","theme","playIcon","fileCardContent","FileIcon","fileInfo","replace","fileType","cardInteraction","role","tabIndex","onKeyDown","target","currentTarget","key","preventDefault","_objectSpread","fileCard","fileCardLink"],"mappings":"y8JAkBA,IAAMA,EAAe,SAACC,GAAiB,IAAAC,EAC/BC,EAAQF,EAAKG,MAAM,KACzB,OAAOD,EAAME,OAAS,GAAoB,QAAfF,EAAAA,EAAMG,aAAS,IAAAJ,EAAAA,EAAA,IAAIK,cAAgB,EAChE,EAkBMC,EAAc,SAMdC,GAAA,IALJC,IAAAA,KACAC,IAAAA,QACAC,IAAAA,SAIMC,EAAWC,EAAMC,iCAAiCL,EAAKT,MACvDe,EAAcN,EAAKM,aAAeN,EAAKO,IAE7C,OACEC,EAAA,MAAA,CAAKC,UAAWC,EAAOC,YAAa,cAAY,0BAAyBC,SAAA,GACpEN,GACDO,EAACC,EAAsB,CACrBC,IAAKT,EACLH,SAAUA,EACVa,KAAK,KACLP,UAAWC,EAAOO,iBAItBJ,EAACK,EAAqB,CACpBlB,KAAMA,EACNC,QAASA,EACTe,KAAK,KACLG,aAAa,kBACbC,QAAQ,eACRlB,SAAUA,MAIlB,EAEMmB,EAAa,SAACC,GAAkB,OAAK,SAACC,GAC1CA,EAAMC,kBACNF,IACD,EAEKG,EAAe,SAAHC,GAAA,IAAM1B,IAAAA,KAAM2B,IAAAA,SAAUC,IAAAA,QAAO,OAC7CpB,EAAAqB,EAAA,CAAAjB,SACGZ,CAAAA,EAAK8B,aACJtB,EAAAqB,EAAA,CAAAjB,SACE,CAAAC,EAAA,MAAA,CAAKJ,UAAWC,EAAOqB,mBACvBlB,EAAA,MAAA,CAAKJ,UAAWC,EAAOsB,iBAAiBpB,SACtCC,EAACoB,EAAc,CAACjB,KAAK,KAAKP,UAAWC,EAAOwB,gBAK/ClC,EAAKmC,OACN3B,EAAAqB,EAAA,CAAAjB,SACE,CAAAC,EAAA,MAAA,CAAKJ,UAAWC,EAAO0B,eACtBR,GACCf,EAACwB,EAAO,CAACC,MAAM,eAAc1B,SAC3BC,EAAA,MAAA,CAAKJ,UAAWC,EAAO6B,YAAY3B,SACjCC,EAAC2B,EAAU,CACTxB,KAAK,KACLyB,KAAK,aACLC,QAASrB,GAAW,WAAA,OAAMO,EAAQ5B,EAAK2C,OACvCC,OAAO,mBAAkBhC,SAEzBC,EAACgC,EAAQ,CAAC7B,KAAK,mBAQ1BW,IAAa3B,EAAK8B,aACjBjB,EAACwB,EAAO,CAACC,MAAM,SAAQ1B,SACrBC,EAAA,MAAA,CACEJ,UAAWqC,EAAWpC,EAAOqC,eAAgB/C,EAAKmC,OAASzB,EAAOsC,qBAAqBpC,SAEvFC,EAAC2B,EAAU,CACTxB,KAAK,KACLyB,KAAK,aACLC,QAASrB,GAAW,WAAA,OAAMM,EAAS3B,EAAK2C,OACxCC,OAAO,oBAAmBhC,SAE1BC,EAACoC,EAAc,CAACjC,KAAK,kBAK5B,EAGQkC,EAAiB,SAQHC,GAAA,IAAAC,EA7GH7C,EAsGtBP,IAAAA,KACA2B,IAAAA,SACAC,IAAAA,QACAyB,IAAAA,YACAC,IAAAA,WACAC,IAAAA,YACAtD,IAAAA,QAEMC,EAAWsD,EAAyB,MACpCC,UAAOzD,EAAAA,EAAKyD,oBAAQ,OACpBC,EAAW7C,EAACY,EAAY,CAACzB,KAAMA,EAAM2B,SAAUA,EAAUC,QAASA,IAClEzB,EAAWC,EAAMC,iCAAiCL,EAAKT,MACvDoE,GAAW3D,EAAK8B,cAAgB9B,EAAKmC,MACrCyB,IAAcP,GAAeM,EAE7BE,GAAeN,IAAgB5B,GAAYgC,EAEjD,GAAa,UAATF,GAA6B,UAATA,EACtB,OAEEjD,EAAA,MAAA,CACEC,UAAWqC,EACTpC,EAAOoD,UACPF,GAAalD,EAAOkD,UACpBN,GAAc5C,EAAOqD,WACnB/D,EAAKmC,OAASzB,EAAOsD,gBAEzBtB,QAASkB,EAAY,WAAA,OAAMP,eAAAA,EAAcrD,EAAK,OAAGiE,EAAUrD,SAE3D,CAAAC,EAAA,MAAA,CAAKJ,UAAWC,EAAOwD,eAAetD,SAC1B,UAAT6C,EACC5C,EAACsD,EAAe,CACdC,IAAKlE,EACLK,IAAKP,EAAKO,IACV8D,IAAKlE,EACLM,UAAWC,EAAO4D,iBAGpBzD,EAAA,QAAA,CACEN,KA7IUA,EA6IUP,EAAKO,IA7IGA,IAAQA,EAAIgE,SAAS,OAAM,GAAAC,OAAMjE,EAAG,UAAWA,GA8I3EE,UAAWC,EAAO4D,eAClBG,QAAQ,WACRC,aAAW,EACXC,OAAK,MAID,UAATlB,GACC5C,EAAA,MAAA,CAAKJ,UAAWC,EAAOkE,aAAahE,SAClCC,EAACgE,EAAW,CAACC,MAAM,SAASrE,UAAWC,EAAOqE,aAGjDlB,GAAehD,EAACf,EAAW,CAACE,KAAMA,EAAMC,QAASA,EAASC,SAAUA,IACpEwD,KAKP,IAnKqBnE,EAmKfyF,EACJxE,EAAAqB,EAAA,CAAAjB,SACE,CAAAJ,EAAA,MAAA,CAAKC,UAAWC,EAAOsE,gBAAgBpE,SAAA,CACrCC,EAACoE,EAAQ,CAAC1F,KAAMY,IAChBK,EAAA,MAAA,CAAKC,UAAWC,EAAOwE,SAAStE,SAAA,CAC9BC,EAACwB,EAAO,CAACC,MAAOnC,EAASS,SACvBC,EAAA,MAAA,CAAKJ,UAAWC,EAAOP,SAASS,UAzKrBrB,EAyKqCY,EAzKpBZ,EAAK4F,QAAQ,YAAa,SA2KxDtE,EAAA,MAAA,CAAKJ,UAAWC,EAAO0E,SAASxE,SAAEtB,EAAaa,WAGlD0D,GAAehD,EAACf,EAAW,CAACE,KAAMA,EAAMC,QAASA,IACjDyD,KAIC2B,EAAkBzB,EACpB,CACE0B,KAAM,SACNC,SAAU,EACV7C,QAAS,WAAA,OAAMW,eAAAA,EAAcrD,EAAK,EAClCwF,UAAW,SAACjE,GAENA,EAAMkE,SAAWlE,EAAMmE,gBACT,UAAdnE,EAAMoE,KAAiC,MAAdpE,EAAMoE,MAGnCpE,EAAMqE,iBACNvC,SAAAA,EAAcrD,IAChB,GAEF,GAEJ,OACEa,EAAA,MAAAgF,EAAAA,EAAA,CACEpF,UAAWqC,EACTpC,EAAOoF,SACPlC,GAAalD,EAAOqF,aACpBzC,GAAc5C,EAAOqD,WACnB/D,EAAKmC,OAASzB,EAAOsD,iBAErBqB,GAAe,GAAA,CAAAzE,SAElBoE,IAGP"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=AttachmentActionsMenu.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AttachmentActionsMenu.test.d.ts","sourceRoot":"","sources":["../../../../src/components/AttachmentPreview/__tests__/AttachmentActionsMenu.test.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=AttachmentDownloadLink.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AttachmentDownloadLink.test.d.ts","sourceRoot":"","sources":["../../../../src/components/AttachmentPreview/__tests__/AttachmentDownloadLink.test.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=AttachmentImage.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AttachmentImage.test.d.ts","sourceRoot":"","sources":["../../../../src/components/AttachmentPreview/__tests__/AttachmentImage.test.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=AttachmentTile.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AttachmentTile.test.d.ts","sourceRoot":"","sources":["../../../../src/components/AttachmentPreview/__tests__/AttachmentTile.test.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=useStoredAttachments.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useStoredAttachments.test.d.ts","sourceRoot":"","sources":["../../../../src/components/AttachmentPreview/__tests__/useStoredAttachments.test.tsx"],"names":[],"mappings":""}
@@ -2,6 +2,14 @@ import type { AttachmentPreviewItem } from './AttachmentPreview.types';
2
2
  export type StoredAttachment = {
3
3
  name: string;
4
4
  url: string;
5
+ /** Bytes, as recorded at upload time. */
6
+ size?: number;
5
7
  };
8
+ /**
9
+ * One of ours is stored under an S3 key, which is a path. An attachment that was linked rather
10
+ * than uploaded keeps a bare file name and a url that already works, so signing it would only
11
+ * produce a link to an object that was never there.
12
+ */
13
+ export declare const getIsStoredKey: (name: string) => boolean;
6
14
  export declare const useStoredAttachment: (attachment?: StoredAttachment | null) => AttachmentPreviewItem | null;
7
15
  //# sourceMappingURL=useStoredAttachment.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useStoredAttachment.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentPreview/useStoredAttachment.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAGvE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,eAAO,MAAM,mBAAmB,gBACjB,gBAAgB,GAAG,IAAI,KACnC,qBAAqB,GAAG,IAe1B,CAAC"}
1
+ {"version":3,"file":"useStoredAttachment.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentPreview/useStoredAttachment.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAGvE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,yCAAyC;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,cAAc,SAAU,MAAM,KAAG,OAA6B,CAAC;AAE5E,eAAO,MAAM,mBAAmB,gBACjB,gBAAgB,GAAG,IAAI,KACnC,qBAAqB,GAAG,IAkB1B,CAAC"}
@@ -0,0 +1,2 @@
1
+ import"@babel/runtime/helpers/slicedToArray";import"react";import"../../clients/jsonApi/index.js";import"file-extension";import"image-extensions";import"video-extensions";var e=function(e){return e.includes("/")};export{e as getIsStoredKey};
2
+ //# sourceMappingURL=useStoredAttachment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useStoredAttachment.js","sources":["../../../src/components/AttachmentPreview/useStoredAttachment.ts"],"sourcesContent":["import useSignedURL from '../../effects/useSignedURL';\n\nimport type { AttachmentPreviewItem } from './AttachmentPreview.types';\nimport { getAttachmentKind } from './getAttachmentKind';\n\nexport type StoredAttachment = {\n name: string;\n url: string;\n /** Bytes, as recorded at upload time. */\n size?: number;\n};\n\n/**\n * One of ours is stored under an S3 key, which is a path. An attachment that was linked rather\n * than uploaded keeps a bare file name and a url that already works, so signing it would only\n * produce a link to an object that was never there.\n */\nexport const getIsStoredKey = (name: string): boolean => name.includes('/');\n\nexport const useStoredAttachment = (\n attachment?: StoredAttachment | null\n): AttachmentPreviewItem | null => {\n const kind = attachment ? getAttachmentKind(attachment) : undefined;\n const key = attachment && getIsStoredKey(attachment.name) ? attachment.name : '';\n const signed = useSignedURL(key, 'inline');\n // `download` is ignored cross-origin, so only an attachment-disposition link saves.\n const downloadUrl = useSignedURL(key, 'attachment');\n const src = key ? signed : attachment?.url;\n\n if (!attachment || !src) return null;\n\n return {\n id: attachment.url,\n name: attachment.name,\n src,\n kind,\n size: attachment.size,\n downloadUrl: downloadUrl || undefined,\n };\n};\n"],"names":["getIsStoredKey","name","includes"],"mappings":"+KAiBaA,EAAiB,SAACC,GAAY,OAAcA,EAAKC,SAAS,IAAI"}
@@ -1,5 +1,5 @@
1
1
  import type { AttachmentPreviewItem } from './AttachmentPreview.types';
2
- import type { StoredAttachment } from './useStoredAttachment';
2
+ import { type StoredAttachment } from './useStoredAttachment';
3
3
  /**
4
4
  * Signs a whole list of stored attachments — the hook-per-file `useStoredAttachment`
5
5
  * can't cover a list whose length changes between renders.
@@ -1 +1 @@
1
- {"version":3,"file":"useStoredAttachments.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentPreview/useStoredAttachments.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAEvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AA2B9D;;;GAGG;AACH,eAAO,MAAM,oBAAoB,iBACjB,gBAAgB,EAAE,GAAG,IAAI,KACtC,qBAAqB,EAuCvB,CAAC"}
1
+ {"version":3,"file":"useStoredAttachments.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentPreview/useStoredAttachments.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAEvE,OAAO,EAAkB,KAAK,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAkB9E;;;GAGG;AACH,eAAO,MAAM,oBAAoB,iBACjB,gBAAgB,EAAE,GAAG,IAAI,KACtC,qBAAqB,EA6DvB,CAAC"}
@@ -1,2 +1,2 @@
1
- import r from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/asyncToGenerator";import n from"@babel/runtime/regenerator";import{useState as o,useRef as c,useMemo as a,useEffect as u}from"react";import{getAttachmentKind as i}from"./getAttachmentKind.js";import{getS3DownloadLink as s}from"../../clients/jsonApi/index.js";function p(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,n)}return t}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}var l=function(){var r=t(n.mark((function r(e,t){var o,c;return n.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,s(e,t);case 3:return o=r.sent,c=o.url,r.abrupt("return",c);case 8:return r.prev=8,r.t0=r.catch(0),console.error('Failed to sign attachment "'.concat(e,'"'),r.t0),r.abrupt("return","");case 12:case"end":return r.stop()}}),r,null,[[0,8]])})));return function(e,t){return r.apply(this,arguments)}}(),m=function(){var r=t(n.mark((function r(e,t){var o,c;return n.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,l(e,"inline");case 2:if(o=r.sent,"file"!==t){r.next=9;break}return r.next=6,l(e,"attachment");case 6:r.t0=r.sent,r.next=10;break;case 9:r.t0="";case 10:return c=r.t0,r.abrupt("return",[e,{src:o,downloadUrl:c}]);case 12:case"end":return r.stop()}}),r)})));return function(e,t){return r.apply(this,arguments)}}(),b=function(r){var t=o({}),n=e(t,2),s=n[0],p=n[1],l=c(s);l.current=s;var b=a((function(){return null!=r?r:[]}),[r]),d=b.map((function(r){return r.name})).join("|");return u((function(){var r=b.filter((function(r){return!(r.name in l.current)}));if(r.length){var e=!0;return Promise.all(r.map((function(r){return m(r.name,i(r))}))).then((function(r){e&&p((function(e){return f(f({},e),Object.fromEntries(r))}))})),function(){e=!1}}}),[d]),b.reduce((function(r,e){var t=s[e.name];return null!=t&&t.src?(r.push({id:e.url,name:e.name,src:t.src,kind:i(e),downloadUrl:t.downloadUrl||void 0}),r):r}),[])};export{b as useStoredAttachments};
1
+ import r from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/slicedToArray";import n from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/regenerator";import{useState as o,useRef as c,useMemo as i,useEffect as u}from"react";import{getAttachmentKind as a}from"./getAttachmentKind.js";import{getIsStoredKey as f}from"./useStoredAttachment.js";import{getS3DownloadLink as s}from"../../clients/jsonApi/index.js";function p(r,e){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.push.apply(n,t)}return n}function m(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?p(Object(t),!0).forEach((function(n){r(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):p(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var l=function(){var r=n(t.mark((function r(e,n){var o,c;return t.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,s(e,n);case 3:return o=r.sent,c=o.url,r.abrupt("return",c);case 8:return r.prev=8,r.t0=r.catch(0),console.error('Failed to sign attachment "'.concat(e,'"'),r.t0),r.abrupt("return","");case 12:case"end":return r.stop()}}),r,null,[[0,8]])})));return function(e,n){return r.apply(this,arguments)}}(),b=function(n){var t=o({}),s=e(t,2),p=s[0],b=s[1],h=c(p);h.current=p;var v=i((function(){return null!=n?n:[]}),[n]),O=v.map((function(r){return r.name})).join("|");return u((function(){var e=v.filter((function(r){return!(r.name in h.current)}));if(e.length){var n=!0,t=function(e,n){return b((function(t){return m(m({},t),{},r({},e,m(m({},t[e]),n)))}))};return b((function(r){var n=m({},r);return e.forEach((function(r){var e;n[r.name]=null!==(e=n[r.name])&&void 0!==e?e:{}})),n})),e.forEach((function(r){f(r.name)?l(r.name,"inline").then((function(e){n&&e&&t(r.name,{src:e})})):t(r.name,{src:r.url})})),function(){n=!1}}}),[O]),v.reduce((function(r,e){var n=p[e.name];return null!=n&&n.src?(r.push({id:e.url,name:e.name,src:n.src,kind:a(e),size:e.size}),r):r}),[])};export{b as useStoredAttachments};
2
2
  //# sourceMappingURL=useStoredAttachments.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useStoredAttachments.js","sources":["../../../src/components/AttachmentPreview/useStoredAttachments.ts"],"sourcesContent":["import { useEffect, useMemo, useRef, useState } from 'react';\n\nimport type { AttachmentPreviewItem } from './AttachmentPreview.types';\nimport { getAttachmentKind } from './getAttachmentKind';\nimport type { StoredAttachment } from './useStoredAttachment';\n\nimport { getS3DownloadLink } from '~/clients/jsonApi';\n\ntype SignedLinks = Record<string, { src: string; downloadUrl: string }>;\n\nconst getSignedLink = async (name: string, disposition: 'attachment' | 'inline') => {\n try {\n const { url } = await getS3DownloadLink(name, disposition);\n\n return url;\n } catch (error) {\n console.error(`Failed to sign attachment \"${name}\"`, error);\n\n return '';\n }\n};\n\nconst sign = async (name: string, kind: string) => {\n const src = await getSignedLink(name, 'inline');\n\n // Only documents get a download action; images and videos skip the extra round trip.\n const downloadUrl = kind === 'file' ? await getSignedLink(name, 'attachment') : '';\n\n return [name, { src, downloadUrl }] as const;\n};\n\n/**\n * Signs a whole list of stored attachments — the hook-per-file `useStoredAttachment`\n * can't cover a list whose length changes between renders.\n */\nexport const useStoredAttachments = (\n attachments?: StoredAttachment[] | null\n): AttachmentPreviewItem[] => {\n const [links, setLinks] = useState<SignedLinks>({});\n const linksRef = useRef(links);\n linksRef.current = links;\n\n const list = useMemo(() => attachments ?? [], [attachments]);\n const key = list.map(attachment => attachment.name).join('|');\n\n useEffect(() => {\n const pending = list.filter(attachment => !(attachment.name in linksRef.current));\n if (!pending.length) return undefined;\n\n let isActive = true;\n Promise.all(\n pending.map(attachment => sign(attachment.name, getAttachmentKind(attachment)))\n ).then(resolved => {\n if (isActive) setLinks(prev => ({ ...prev, ...Object.fromEntries(resolved) }));\n });\n\n return () => {\n isActive = false;\n };\n // `key` tracks the list contents; `list` itself is a fresh array on every render.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [key]);\n\n return list.reduce<AttachmentPreviewItem[]>((acc, attachment) => {\n const link = links[attachment.name];\n if (!link?.src) return acc;\n\n acc.push({\n id: attachment.url,\n name: attachment.name,\n src: link.src,\n kind: getAttachmentKind(attachment),\n downloadUrl: link.downloadUrl || undefined,\n });\n return acc;\n }, []);\n};\n"],"names":["getSignedLink","_ref","_asyncToGenerator","_regeneratorRuntime","mark","_callee","name","disposition","_yield$getS3DownloadL","url","wrap","_context","prev","next","getS3DownloadLink","sent","abrupt","t0","console","error","stop","_x","_x2","apply","this","arguments","sign","_ref2","_callee2","kind","src","downloadUrl","_context2","_x3","_x4","useStoredAttachments","attachments","_useState","useState","_useState2","_slicedToArray","links","setLinks","linksRef","useRef","current","list","useMemo","key","map","attachment","join","useEffect","pending","filter","length","isActive","Promise","all","getAttachmentKind","then","resolved","_objectSpread","Object","fromEntries","reduce","acc","link","push","id","undefined"],"mappings":"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"}
1
+ {"version":3,"file":"useStoredAttachments.js","sources":["../../../src/components/AttachmentPreview/useStoredAttachments.ts"],"sourcesContent":["import { useEffect, useMemo, useRef, useState } from 'react';\n\nimport type { AttachmentPreviewItem } from './AttachmentPreview.types';\nimport { getAttachmentKind } from './getAttachmentKind';\nimport { getIsStoredKey, type StoredAttachment } from './useStoredAttachment';\n\nimport { getS3DownloadLink } from '~/clients/jsonApi';\n\ntype SignedLinks = Record<string, { src?: string }>;\n\nconst getSignedLink = async (name: string, disposition: 'attachment' | 'inline') => {\n try {\n const { url } = await getS3DownloadLink(name, disposition);\n\n return url;\n } catch (error) {\n console.error(`Failed to sign attachment \"${name}\"`, error);\n\n return '';\n }\n};\n\n/**\n * Signs a whole list of stored attachments — the hook-per-file `useStoredAttachment`\n * can't cover a list whose length changes between renders.\n */\nexport const useStoredAttachments = (\n attachments?: StoredAttachment[] | null\n): AttachmentPreviewItem[] => {\n const [links, setLinks] = useState<SignedLinks>({});\n const linksRef = useRef(links);\n linksRef.current = links;\n\n const list = useMemo(() => attachments ?? [], [attachments]);\n const key = list.map(attachment => attachment.name).join('|');\n\n useEffect(() => {\n const pending = list.filter(attachment => !(attachment.name in linksRef.current));\n if (!pending.length) return undefined;\n\n let isActive = true;\n\n const applyLink = (name: string, patch: SignedLinks[string]) =>\n setLinks(prev => ({ ...prev, [name]: { ...prev[name], ...patch } }));\n\n // Claim the names up front so a re-render mid-flight does not ask again.\n setLinks(prev => {\n const claimed = { ...prev };\n\n pending.forEach(attachment => {\n claimed[attachment.name] = claimed[attachment.name] ?? {};\n });\n\n return claimed;\n });\n\n pending.forEach(attachment => {\n // A linked attachment already carries a url that works; only a key of ours needs signing.\n if (!getIsStoredKey(attachment.name)) {\n applyLink(attachment.name, { src: attachment.url });\n\n return;\n }\n\n getSignedLink(attachment.name, 'inline').then(src => {\n if (isActive && src) applyLink(attachment.name, { src });\n });\n });\n\n return () => {\n isActive = false;\n };\n // `key` tracks the list contents; `list` itself is a fresh array on every render.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [key]);\n\n return list.reduce<AttachmentPreviewItem[]>((acc, attachment) => {\n const link = links[attachment.name];\n if (!link?.src) return acc;\n\n acc.push({\n id: attachment.url,\n name: attachment.name,\n src: link.src,\n kind: getAttachmentKind(attachment),\n size: attachment.size,\n });\n return acc;\n }, []);\n};\n"],"names":["getSignedLink","_ref","_asyncToGenerator","_regeneratorRuntime","mark","_callee","name","disposition","_yield$getS3DownloadL","url","wrap","_context","prev","next","getS3DownloadLink","sent","abrupt","t0","console","error","stop","_x","_x2","apply","this","arguments","useStoredAttachments","attachments","_useState","useState","_useState2","_slicedToArray","links","setLinks","linksRef","useRef","current","list","useMemo","key","map","attachment","join","useEffect","pending","filter","length","isActive","applyLink","patch","_objectSpread","claimed","forEach","_claimed$attachment$n","getIsStoredKey","then","src","reduce","acc","link","push","id","kind","getAttachmentKind","size"],"mappings":"0gCAUA,IAAMA,EAAa,WAAA,IAAGC,EAAAC,EAAAC,EAAAC,MAAA,SAAAC,EAAOC,EAAcC,GAAoC,IAAAC,EAAAC,EAAA,OAAAN,EAAAO,MAAA,SAAAC,GAAA,OAAA,OAAAA,EAAAC,KAAAD,EAAAE,MAAA,KAAA,EAAA,OAAAF,EAAAC,KAAA,EAAAD,EAAAE,KAAA,EAErDC,EAAkBR,EAAMC,GAAY,KAAA,EAA/C,OAA+CC,EAAAG,EAAAI,KAAlDN,IAAAA,IAAGE,EAAAK,OAAA,SAEJP,GAAG,KAAA,EAEkD,OAFlDE,EAAAC,KAAA,EAAAD,EAAAM,GAAAN,EAAA,MAAA,GAEVO,QAAQC,MAAoCb,8BAAAA,OAAAA,EAAe,KAAAK,EAAAM,IAACN,EAAAK,OAAA,SAErD,IAAE,KAAA,GAAA,IAAA,MAAA,OAAAL,EAAAS,OAAA,GAAAf,EAAA,KAAA,CAAA,CAAA,EAAA,IAEZ,KAAA,OAAA,SAVkBgB,EAAAC,GAAA,OAAArB,EAAAsB,MAAAC,KAAAC,UAAA,CAAA,CAAA,GAgBNC,EAAuB,SAClCC,GAEA,IAAAC,EAA0BC,EAAsB,IAAGC,EAAAC,EAAAH,EAAA,GAA5CI,EAAKF,EAAA,GAAEG,EAAQH,EAAA,GAChBI,EAAWC,EAAOH,GACxBE,EAASE,QAAUJ,EAEnB,IAAMK,EAAOC,GAAQ,WAAA,OAAMX,QAAAA,EAAe,KAAI,CAACA,IACzCY,EAAMF,EAAKG,KAAI,SAAAC,GAAU,OAAIA,EAAWnC,IAAI,IAAEoC,KAAK,KA0CzD,OAxCAC,GAAU,WACR,IAAMC,EAAUP,EAAKQ,QAAO,SAAAJ,GAAU,QAAMA,EAAWnC,QAAQ4B,EAASE,YACxE,GAAKQ,EAAQE,OAAb,CAEA,IAAIC,GAAW,EAETC,EAAY,SAAC1C,EAAc2C,GAA0B,OACzDhB,GAAS,SAAArB,GAAI,OAAUA,EAAAA,EAAAA,CAAAA,EAAAA,WAAON,EAAI4C,EAAAA,EAAA,CAAA,EAAQtC,EAAKN,IAAU2C,IAAK,GAAM,EA0BtE,OAvBAhB,GAAS,SAAArB,GACP,IAAMuC,EAAevC,EAAAA,CAAAA,EAAAA,GAMrB,OAJAgC,EAAQQ,SAAQ,SAAAX,GAAc,IAAAY,EAC5BF,EAAQV,EAAWnC,MAAgC,QAAxB6C,EAAAA,EAAQV,EAAWnC,aAAK,IAAA+C,EAAAA,EAAI,CAAA,CACzD,IAEOF,CACT,IAEAP,EAAQQ,SAAQ,SAAAX,GAETa,EAAeb,EAAWnC,MAM/BN,EAAcyC,EAAWnC,KAAM,UAAUiD,MAAK,SAAAC,GACxCT,GAAYS,GAAKR,EAAUP,EAAWnC,KAAM,CAAEkD,IAAAA,GACpD,IAPER,EAAUP,EAAWnC,KAAM,CAAEkD,IAAKf,EAAWhC,KAQjD,IAEO,WACLsC,GAAW,EAhCwB,CAoCvC,GAAG,CAACR,IAEGF,EAAKoB,QAAgC,SAACC,EAAKjB,GAChD,IAAMkB,EAAO3B,EAAMS,EAAWnC,MAC9B,OAAKqD,SAAAA,EAAMH,KAEXE,EAAIE,KAAK,CACPC,GAAIpB,EAAWhC,IACfH,KAAMmC,EAAWnC,KACjBkD,IAAKG,EAAKH,IACVM,KAAMC,EAAkBtB,GACxBuB,KAAMvB,EAAWuB,OAEZN,GATgBA,CAUxB,GAAE,GACL"}