@corva/ui 3.74.0-1 → 3.74.0-11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (731) 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/TextArea/Resizer.js +2 -0
  237. package/cjs-bundle/componentsV2/TextArea/Resizer.js.map +1 -0
  238. package/cjs-bundle/componentsV2/TextArea/TextArea.constants.js +2 -0
  239. package/cjs-bundle/componentsV2/TextArea/TextArea.constants.js.map +1 -0
  240. package/cjs-bundle/componentsV2/TextArea/TextArea.js +2 -0
  241. package/cjs-bundle/componentsV2/TextArea/TextArea.js.map +1 -0
  242. package/cjs-bundle/componentsV2/TextArea/TextArea.scss.js +2 -0
  243. package/cjs-bundle/componentsV2/TextArea/TextArea.scss.js.map +1 -0
  244. package/cjs-bundle/componentsV2/TextInputBase/TextInputBase.js +2 -0
  245. package/cjs-bundle/componentsV2/TextInputBase/TextInputBase.js.map +1 -0
  246. package/cjs-bundle/componentsV2/TextInputBase/TextInputBase.scss.js +2 -0
  247. package/cjs-bundle/componentsV2/TextInputBase/TextInputBase.scss.js.map +1 -0
  248. package/cjs-bundle/componentsV2/{TextInputNext → TextInputBase}/components/InfoIcon.js.map +1 -1
  249. package/cjs-bundle/componentsV2/{TextInputNext → TextInputBase}/components/Label.js.map +1 -1
  250. package/cjs-bundle/componentsV2/{TextInputNext → TextInputBase}/components/MessageWithIcon.js.map +1 -1
  251. package/cjs-bundle/componentsV2/{TextInputNext → TextInputBase}/components/RequiredIndicator.js.map +1 -1
  252. package/cjs-bundle/componentsV2/TextInputBase/components/Styles.scss.js +2 -0
  253. package/cjs-bundle/componentsV2/{TextInputNext → TextInputBase}/components/Unit.js.map +1 -1
  254. package/cjs-bundle/componentsV2/TextInputNext/TextInputNext.js +1 -1
  255. package/cjs-bundle/componentsV2/TextInputNext/TextInputNext.js.map +1 -1
  256. package/cjs-bundle/componentsV2/TextInputNext/TextInputNext.scss.js +1 -1
  257. package/cjs-bundle/componentsV2/WellArchivedMessage/WellArchivedMessage.js +1 -1
  258. package/cjs-bundle/componentsV2/WellArchivedMessage/WellArchivedMessage.js.map +1 -1
  259. package/cjs-bundle/componentsV2/index.js +1 -1
  260. package/cjs-bundle/effects/useOutsideClick.js +1 -1
  261. package/cjs-bundle/effects/useOutsideClick.js.map +1 -1
  262. package/cjs-bundle/testing/AppTestWrapper/AppTestWrapper.js +1 -1
  263. package/cjs-bundle/testing/AppTestWrapper/AppTestWrapper.js.map +1 -1
  264. package/cjs-bundle/utils/devcenter.js +1 -1
  265. package/cjs-bundle/utils/devcenter.js.map +1 -1
  266. package/cjs-bundle/utils/fetchAttachment.js +2 -0
  267. package/cjs-bundle/utils/fetchAttachment.js.map +1 -0
  268. package/cjs-bundle/utils/fileExtension.js +1 -1
  269. package/cjs-bundle/utils/fileExtension.js.map +1 -1
  270. package/cjs-bundle/utils/links.js +2 -0
  271. package/cjs-bundle/utils/links.js.map +1 -0
  272. package/components/AddComment/Popover.js +1 -1
  273. package/components/AddComment/Popover.js.map +1 -1
  274. package/components/AddComment/components/Content.js +1 -1
  275. package/components/AddComment/components/Content.js.map +1 -1
  276. package/components/AttachmentLightbox/AttachmentDocument.d.ts +6 -0
  277. package/components/AttachmentLightbox/AttachmentDocument.d.ts.map +1 -0
  278. package/components/AttachmentLightbox/AttachmentDocument.js +2 -0
  279. package/components/AttachmentLightbox/AttachmentDocument.js.map +1 -0
  280. package/components/AttachmentLightbox/AttachmentLightbox.d.ts +9 -8
  281. package/components/AttachmentLightbox/AttachmentLightbox.d.ts.map +1 -1
  282. package/components/AttachmentLightbox/AttachmentLightbox.js +1 -1
  283. package/components/AttachmentLightbox/AttachmentLightbox.js.map +1 -1
  284. package/components/AttachmentLightbox/AttachmentLightbox.scss.js +1 -1
  285. package/components/AttachmentLightbox/AttachmentPreviewPane.d.ts +9 -0
  286. package/components/AttachmentLightbox/AttachmentPreviewPane.d.ts.map +1 -0
  287. package/components/AttachmentLightbox/AttachmentPreviewPane.js +2 -0
  288. package/components/AttachmentLightbox/AttachmentPreviewPane.js.map +1 -0
  289. package/components/AttachmentLightbox/__tests__/AttachmentDocument.test.d.ts +2 -0
  290. package/components/AttachmentLightbox/__tests__/AttachmentDocument.test.d.ts.map +1 -0
  291. package/components/AttachmentLightbox/__tests__/AttachmentLightbox.test.d.ts +2 -0
  292. package/components/AttachmentLightbox/__tests__/AttachmentLightbox.test.d.ts.map +1 -0
  293. package/components/AttachmentLightbox/__tests__/copyImageToClipboard.test.d.ts +2 -0
  294. package/components/AttachmentLightbox/__tests__/copyImageToClipboard.test.d.ts.map +1 -0
  295. package/components/AttachmentLightbox/__tests__/downloadAttachment.test.d.ts +2 -0
  296. package/components/AttachmentLightbox/__tests__/downloadAttachment.test.d.ts.map +1 -0
  297. package/components/AttachmentLightbox/__tests__/useZoomPan.test.d.ts +2 -0
  298. package/components/AttachmentLightbox/__tests__/useZoomPan.test.d.ts.map +1 -0
  299. package/components/AttachmentLightbox/copyImageToClipboard.d.ts +4 -0
  300. package/components/AttachmentLightbox/copyImageToClipboard.d.ts.map +1 -0
  301. package/components/AttachmentLightbox/copyImageToClipboard.js +2 -0
  302. package/components/AttachmentLightbox/copyImageToClipboard.js.map +1 -0
  303. package/components/AttachmentLightbox/downloadAttachment.d.ts +10 -0
  304. package/components/AttachmentLightbox/downloadAttachment.d.ts.map +1 -0
  305. package/components/AttachmentLightbox/downloadAttachment.js +2 -0
  306. package/components/AttachmentLightbox/downloadAttachment.js.map +1 -0
  307. package/components/AttachmentLightbox/useAttachmentLightbox.d.ts +6 -2
  308. package/components/AttachmentLightbox/useAttachmentLightbox.d.ts.map +1 -1
  309. package/components/AttachmentLightbox/useAttachmentLightbox.js +1 -1
  310. package/components/AttachmentLightbox/useAttachmentLightbox.js.map +1 -1
  311. package/components/AttachmentLightbox/useZoomPan.d.ts +29 -0
  312. package/components/AttachmentLightbox/useZoomPan.d.ts.map +1 -0
  313. package/components/AttachmentLightbox/useZoomPan.js +2 -0
  314. package/components/AttachmentLightbox/useZoomPan.js.map +1 -0
  315. package/components/AttachmentPreview/AttachmentActionsMenu.d.ts +16 -0
  316. package/components/AttachmentPreview/AttachmentActionsMenu.d.ts.map +1 -0
  317. package/components/AttachmentPreview/AttachmentActionsMenu.js +2 -0
  318. package/components/AttachmentPreview/AttachmentActionsMenu.js.map +1 -0
  319. package/components/AttachmentPreview/AttachmentDownloadLink.d.ts +11 -0
  320. package/components/AttachmentPreview/AttachmentDownloadLink.d.ts.map +1 -0
  321. package/components/AttachmentPreview/AttachmentDownloadLink.js +2 -0
  322. package/components/AttachmentPreview/AttachmentDownloadLink.js.map +1 -0
  323. package/components/AttachmentPreview/AttachmentImage.d.ts +12 -0
  324. package/components/AttachmentPreview/AttachmentImage.d.ts.map +1 -0
  325. package/components/AttachmentPreview/AttachmentImage.js +2 -0
  326. package/components/AttachmentPreview/AttachmentImage.js.map +1 -0
  327. package/components/AttachmentPreview/AttachmentPreview.d.ts.map +1 -1
  328. package/components/AttachmentPreview/AttachmentPreview.js +1 -1
  329. package/components/AttachmentPreview/AttachmentPreview.js.map +1 -1
  330. package/components/AttachmentPreview/AttachmentPreview.scss.js +1 -1
  331. package/components/AttachmentPreview/AttachmentPreview.types.d.ts +7 -0
  332. package/components/AttachmentPreview/AttachmentPreview.types.d.ts.map +1 -1
  333. package/components/AttachmentPreview/AttachmentRow.d.ts +7 -3
  334. package/components/AttachmentPreview/AttachmentRow.d.ts.map +1 -1
  335. package/components/AttachmentPreview/AttachmentRow.js +1 -1
  336. package/components/AttachmentPreview/AttachmentRow.js.map +1 -1
  337. package/components/AttachmentPreview/AttachmentTile.d.ts +5 -1
  338. package/components/AttachmentPreview/AttachmentTile.d.ts.map +1 -1
  339. package/components/AttachmentPreview/AttachmentTile.js +1 -1
  340. package/components/AttachmentPreview/AttachmentTile.js.map +1 -1
  341. package/components/AttachmentPreview/__tests__/AttachmentActionsMenu.test.d.ts +2 -0
  342. package/components/AttachmentPreview/__tests__/AttachmentActionsMenu.test.d.ts.map +1 -0
  343. package/components/AttachmentPreview/__tests__/AttachmentDownloadLink.test.d.ts +2 -0
  344. package/components/AttachmentPreview/__tests__/AttachmentDownloadLink.test.d.ts.map +1 -0
  345. package/components/AttachmentPreview/__tests__/AttachmentImage.test.d.ts +2 -0
  346. package/components/AttachmentPreview/__tests__/AttachmentImage.test.d.ts.map +1 -0
  347. package/components/AttachmentPreview/__tests__/AttachmentTile.test.d.ts +2 -0
  348. package/components/AttachmentPreview/__tests__/AttachmentTile.test.d.ts.map +1 -0
  349. package/components/AttachmentPreview/__tests__/useStoredAttachments.test.d.ts +2 -0
  350. package/components/AttachmentPreview/__tests__/useStoredAttachments.test.d.ts.map +1 -0
  351. package/components/AttachmentPreview/useStoredAttachment.d.ts +8 -0
  352. package/components/AttachmentPreview/useStoredAttachment.d.ts.map +1 -1
  353. package/components/AttachmentPreview/useStoredAttachment.js +2 -0
  354. package/components/AttachmentPreview/useStoredAttachment.js.map +1 -0
  355. package/components/AttachmentPreview/useStoredAttachments.d.ts +1 -1
  356. package/components/AttachmentPreview/useStoredAttachments.d.ts.map +1 -1
  357. package/components/AttachmentPreview/useStoredAttachments.js +1 -1
  358. package/components/AttachmentPreview/useStoredAttachments.js.map +1 -1
  359. package/components/BICOffsetPickerDialog/index.js +1 -1
  360. package/components/BICOffsetPickerDialog/index.js.map +1 -1
  361. package/components/Casing/CasingTableV2/components/CasingJoints/Editor.js +1 -1
  362. package/components/Casing/CasingTableV2/components/CasingJoints/Editor.js.map +1 -1
  363. package/components/Casing/CasingTableV2/components/Component.js +1 -1
  364. package/components/Casing/CasingTableV2/components/Component.js.map +1 -1
  365. package/components/Casing/CasingTableV2/components/DrillPipe/Editor.js +1 -1
  366. package/components/Casing/CasingTableV2/components/DrillPipe/Editor.js.map +1 -1
  367. package/components/CollapsableSidebar.js +1 -1
  368. package/components/CollapsableSidebar.js.map +1 -1
  369. package/components/CommentCard/CommentCard.d.ts.map +1 -1
  370. package/components/CommentCard/CommentCard.js +1 -1
  371. package/components/CommentCard/CommentCard.js.map +1 -1
  372. package/components/CommentCard/CommentCard.types.d.ts +2 -0
  373. package/components/CommentCard/CommentCard.types.d.ts.map +1 -1
  374. package/components/CommentCard/CommentCardReactions.js +1 -1
  375. package/components/CommentCard/CommentCardReactions.js.map +1 -1
  376. package/components/CommentCard/CommentMenu.d.ts.map +1 -1
  377. package/components/CommentCard/CommentMenu.js +1 -1
  378. package/components/CommentCard/CommentMenu.js.map +1 -1
  379. package/components/CommentComposer/CommentComposer.d.ts.map +1 -1
  380. package/components/CommentComposer/CommentComposer.js +1 -1
  381. package/components/CommentComposer/CommentComposer.js.map +1 -1
  382. package/components/CommentComposer/CommentReplyInput.d.ts.map +1 -1
  383. package/components/CommentComposer/CommentReplyInput.js +1 -1
  384. package/components/CommentComposer/CommentReplyInput.js.map +1 -1
  385. package/components/CommentComposer/ShareToChatRow.js +1 -1
  386. package/components/CommentComposer/ShareToChatRow.js.map +1 -1
  387. package/components/CommentComposer/__tests__/useAttachmentUpload.linked.test.d.ts +2 -0
  388. package/components/CommentComposer/__tests__/useAttachmentUpload.linked.test.d.ts.map +1 -0
  389. package/components/CommentComposer/useAttachmentUpload.d.ts +1 -0
  390. package/components/CommentComposer/useAttachmentUpload.d.ts.map +1 -1
  391. package/components/CommentComposer/useAttachmentUpload.js +1 -1
  392. package/components/CommentComposer/useAttachmentUpload.js.map +1 -1
  393. package/components/CommentInputNext/CommentInputNext.d.ts +2 -0
  394. package/components/CommentInputNext/CommentInputNext.d.ts.map +1 -1
  395. package/components/CommentInputNext/CommentInputNext.js +1 -1
  396. package/components/CommentInputNext/CommentInputNext.js.map +1 -1
  397. package/components/CommentInputNext/__tests__/useFilePaste.test.d.ts +2 -0
  398. package/components/CommentInputNext/__tests__/useFilePaste.test.d.ts.map +1 -0
  399. package/components/CommentInputNext/useFilePaste.d.ts +17 -0
  400. package/components/CommentInputNext/useFilePaste.d.ts.map +1 -0
  401. package/components/CommentInputNext/useFilePaste.js +2 -0
  402. package/components/CommentInputNext/useFilePaste.js.map +1 -0
  403. package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.d.ts +9 -1
  404. package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.d.ts.map +1 -1
  405. package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js +1 -1
  406. package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js.map +1 -1
  407. package/components/DevCenter/DevCenterAppContainer/__tests__/DevCenterAppContainer.registerAITools.test.d.ts +2 -0
  408. package/components/DevCenter/DevCenterAppContainer/__tests__/DevCenterAppContainer.registerAITools.test.d.ts.map +1 -0
  409. package/components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.js +1 -1
  410. package/components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.js.map +1 -1
  411. package/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js +1 -1
  412. package/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js.map +1 -1
  413. package/components/DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.js +1 -1
  414. package/components/DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.js.map +1 -1
  415. package/components/DevCenter/DevCenterAppContainer/effects/useAppMaximized.js +1 -1
  416. package/components/DevCenter/DevCenterAppContainer/effects/useAppMaximized.js.map +1 -1
  417. package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.d.ts.map +1 -1
  418. package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js +1 -1
  419. package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js.map +1 -1
  420. package/components/DevCenter/IsolatedDevCenterAppContainer/__tests__/useFullscreenModes.test.d.ts +2 -0
  421. package/components/DevCenter/IsolatedDevCenterAppContainer/__tests__/useFullscreenModes.test.d.ts.map +1 -0
  422. package/components/DevCenter/IsolatedDevCenterAppContainer/useFullscreenModes.d.ts +10 -0
  423. package/components/DevCenter/IsolatedDevCenterAppContainer/useFullscreenModes.d.ts.map +1 -0
  424. package/components/DevCenter/IsolatedDevCenterAppContainer/useFullscreenModes.js +2 -0
  425. package/components/DevCenter/IsolatedDevCenterAppContainer/useFullscreenModes.js.map +1 -0
  426. package/components/DocumentViewer/DocumentViewer.js +1 -1
  427. package/components/DocumentViewer/DocumentViewer.js.map +1 -1
  428. package/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js +1 -1
  429. package/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js.map +1 -1
  430. package/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js +1 -1
  431. package/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js.map +1 -1
  432. package/components/Drillstring/BHAComponentsTable/components/Component.js +1 -1
  433. package/components/Drillstring/BHAComponentsTable/components/Component.js.map +1 -1
  434. package/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js +1 -1
  435. package/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js.map +1 -1
  436. package/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js +1 -1
  437. package/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js.map +1 -1
  438. package/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js +1 -1
  439. package/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js.map +1 -1
  440. package/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js +1 -1
  441. package/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js.map +1 -1
  442. package/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js +1 -1
  443. package/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js.map +1 -1
  444. package/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js +1 -1
  445. package/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js.map +1 -1
  446. package/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js +1 -1
  447. package/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js.map +1 -1
  448. package/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js +1 -1
  449. package/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js.map +1 -1
  450. package/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js +1 -1
  451. package/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js.map +1 -1
  452. package/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js +1 -1
  453. package/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js.map +1 -1
  454. package/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js +1 -1
  455. package/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js.map +1 -1
  456. package/components/FeedItem/FeedItem.js +1 -1
  457. package/components/FeedItem/FeedItem.js.map +1 -1
  458. package/components/FeedItem/components/FeedComments.js +1 -1
  459. package/components/FeedItem/components/FeedComments.js.map +1 -1
  460. package/components/LinkedText/LinkedText.d.ts +17 -0
  461. package/components/LinkedText/LinkedText.d.ts.map +1 -0
  462. package/components/LinkedText/LinkedText.js +2 -0
  463. package/components/LinkedText/LinkedText.js.map +1 -0
  464. package/components/LinkedText/LinkedText.scss.js +2 -0
  465. package/components/LinkedText/LinkedText.scss.js.map +1 -0
  466. package/components/LinkedText/__tests__/LinkedText.test.d.ts +2 -0
  467. package/components/LinkedText/__tests__/LinkedText.test.d.ts.map +1 -0
  468. package/components/LinkedText/index.d.ts +2 -0
  469. package/components/LinkedText/index.d.ts.map +1 -0
  470. package/components/NewDocumentViewer/utils.d.ts.map +1 -1
  471. package/components/NewDocumentViewer/utils.js +1 -1
  472. package/components/NewDocumentViewer/utils.js.map +1 -1
  473. package/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js +1 -1
  474. package/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js.map +1 -1
  475. package/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js +1 -1
  476. package/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js.map +1 -1
  477. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js +1 -1
  478. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js.map +1 -1
  479. package/components/OffsetWellPickerV3/components/CustomSelectionView/index.js +1 -1
  480. package/components/OffsetWellPickerV3/components/CustomSelectionView/index.js.map +1 -1
  481. package/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js +1 -1
  482. package/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js.map +1 -1
  483. package/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js +1 -1
  484. package/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js.map +1 -1
  485. package/components/OffsetWellPickerV3/components/TabSelection/index.js +1 -1
  486. package/components/OffsetWellPickerV3/components/TabSelection/index.js.map +1 -1
  487. package/components/OffsetWellPickerV3/components/WellHubView/index.js +1 -1
  488. package/components/OffsetWellPickerV3/components/WellHubView/index.js.map +1 -1
  489. package/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js +1 -1
  490. package/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js.map +1 -1
  491. package/components/OffsetWellPickerV5/components/AppHeader/components/HeaderActions/HeaderActions.js +1 -1
  492. package/components/OffsetWellPickerV5/components/AppHeader/components/HeaderActions/HeaderActions.js.map +1 -1
  493. package/components/OffsetWellPickerV5/components/AppHeader/components/LoadAllWellsToggle/LoadAllWellsToggle.js +1 -1
  494. package/components/OffsetWellPickerV5/components/AppHeader/components/LoadAllWellsToggle/LoadAllWellsToggle.js.map +1 -1
  495. package/components/OffsetWellPickerV5/components/Filter/Filter.js +1 -1
  496. package/components/OffsetWellPickerV5/components/Filter/Filter.js.map +1 -1
  497. package/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js +1 -1
  498. package/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js.map +1 -1
  499. package/components/OffsetWellPickerV5/components/Filter/components/PeriodFilterSelect/PeriodFilterSelect.js +1 -1
  500. package/components/OffsetWellPickerV5/components/Filter/components/PeriodFilterSelect/PeriodFilterSelect.js.map +1 -1
  501. package/components/OffsetWellPickerV5/components/Filter/components/SingleFilterSelect/SingleFilterSelect.js +1 -1
  502. package/components/OffsetWellPickerV5/components/Filter/components/SingleFilterSelect/SingleFilterSelect.js.map +1 -1
  503. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/ClusterTooltip/ClusterTooltip.js +1 -1
  504. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/ClusterTooltip/ClusterTooltip.js.map +1 -1
  505. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/LayerSwitcher/LayerSwitcher.js +1 -1
  506. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/LayerSwitcher/LayerSwitcher.js.map +1 -1
  507. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapControls/MapControls.js +1 -1
  508. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapControls/MapControls.js.map +1 -1
  509. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapHints/MapHintsStash.js +1 -1
  510. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapHints/MapHintsStash.js.map +1 -1
  511. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/SubjectWellMarker/SubjectWellMarker.js +1 -1
  512. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/SubjectWellMarker/SubjectWellMarker.js.map +1 -1
  513. package/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js +1 -1
  514. package/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js.map +1 -1
  515. package/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AssetResultSection/AssetResultSection.js +1 -1
  516. package/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AssetResultSection/AssetResultSection.js.map +1 -1
  517. package/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AutoCompleteAssetSearch/AutoCompleteAssetSearch.js +1 -1
  518. package/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AutoCompleteAssetSearch/AutoCompleteAssetSearch.js.map +1 -1
  519. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/CompanyCell/CompanyCell.js +1 -1
  520. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/CompanyCell/CompanyCell.js.map +1 -1
  521. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/FormationCell/FormationCell.js +1 -1
  522. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/FormationCell/FormationCell.js.map +1 -1
  523. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/InterventionAssetCell/InterventionAssetCell.js +1 -1
  524. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/InterventionAssetCell/InterventionAssetCell.js.map +1 -1
  525. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/PadNameCell/PadNameCell.js +1 -1
  526. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/PadNameCell/PadNameCell.js.map +1 -1
  527. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/RigCell/RigCell.js +1 -1
  528. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/RigCell/RigCell.js.map +1 -1
  529. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/WellNameCell/WellNameCell.js +1 -1
  530. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/WellNameCell/WellNameCell.js.map +1 -1
  531. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/SettingsMenu.js +1 -1
  532. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/SettingsMenu.js.map +1 -1
  533. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/MetricsSettingsSection/MetricsSettingsSection.js +1 -1
  534. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/MetricsSettingsSection/MetricsSettingsSection.js.map +1 -1
  535. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/TableSettingsSection/TableSettingsSection.js +1 -1
  536. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/TableSettingsSection/TableSettingsSection.js.map +1 -1
  537. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/WellNameHeaderCell/WellNameHeaderCell.js +1 -1
  538. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/WellNameHeaderCell/WellNameHeaderCell.js.map +1 -1
  539. package/components/OffsetWellPickerV5/components/PickerModalActions/PickerModalActions.js +1 -1
  540. package/components/OffsetWellPickerV5/components/PickerModalActions/PickerModalActions.js.map +1 -1
  541. package/components/PadOffsetsPicker/StagesSelector.js +1 -1
  542. package/components/PadOffsetsPicker/StagesSelector.js.map +1 -1
  543. package/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js +1 -1
  544. package/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js.map +1 -1
  545. package/components/Popover/Popover.js +1 -1
  546. package/components/Popover/Popover.js.map +1 -1
  547. package/components/Popper/Popper.js +1 -1
  548. package/components/Popper/Popper.js.map +1 -1
  549. package/components/RealTimeValuesSidebar/SidebarFooter.js +1 -1
  550. package/components/RealTimeValuesSidebar/SidebarFooter.js.map +1 -1
  551. package/components/UserMention/__tests__/highlightLinks.test.d.ts +2 -0
  552. package/components/UserMention/__tests__/highlightLinks.test.d.ts.map +1 -0
  553. package/components/UserMention/constants.d.ts +1 -0
  554. package/components/UserMention/constants.d.ts.map +1 -1
  555. package/components/UserMention/constants.js +1 -1
  556. package/components/UserMention/constants.js.map +1 -1
  557. package/components/UserMention/index.js +1 -1
  558. package/components/UserMention/index.js.map +1 -1
  559. package/components/index.d.ts +2 -0
  560. package/components/index.d.ts.map +1 -1
  561. package/components/index.js +1 -1
  562. package/componentsV2/AppCommonsProvider/AppCommonsContext.d.ts +4 -2
  563. package/componentsV2/AppCommonsProvider/AppCommonsContext.d.ts.map +1 -1
  564. package/componentsV2/AppCommonsProvider/AppCommonsContext.js.map +1 -1
  565. package/componentsV2/AppCommonsProvider/utils.d.ts +1 -1
  566. package/componentsV2/AppCommonsProvider/utils.d.ts.map +1 -1
  567. package/componentsV2/AppCommonsProvider/utils.js +1 -1
  568. package/componentsV2/AppCommonsProvider/utils.js.map +1 -1
  569. package/componentsV2/AppHeader/V3/Actions/Actions.constants.d.ts +4 -1
  570. package/componentsV2/AppHeader/V3/Actions/Actions.constants.d.ts.map +1 -1
  571. package/componentsV2/AppHeader/V3/Actions/Actions.constants.js +1 -1
  572. package/componentsV2/AppHeader/V3/Actions/Actions.constants.js.map +1 -1
  573. package/componentsV2/AppHeader/V3/Actions/Actions.d.ts.map +1 -1
  574. package/componentsV2/AppHeader/V3/Actions/Actions.js +1 -1
  575. package/componentsV2/AppHeader/V3/Actions/Actions.js.map +1 -1
  576. package/componentsV2/AppHeader/V3/AppHeaderV3.d.ts.map +1 -1
  577. package/componentsV2/AppHeader/V3/AppHeaderV3.js +1 -1
  578. package/componentsV2/AppHeader/V3/AppHeaderV3.js.map +1 -1
  579. package/componentsV2/ButtonIcon/ButtonIcon.d.ts +2 -0
  580. package/componentsV2/ButtonIcon/ButtonIcon.d.ts.map +1 -1
  581. package/componentsV2/ButtonIcon/ButtonIcon.js +1 -1
  582. package/componentsV2/ButtonIcon/ButtonIcon.js.map +1 -1
  583. package/componentsV2/ButtonIcon/ButtonIcon.scss.js +1 -1
  584. package/componentsV2/ButtonIcon/ButtonIcon.stories.d.ts +1 -0
  585. package/componentsV2/ButtonIcon/ButtonIcon.stories.d.ts.map +1 -1
  586. package/componentsV2/Chip/Chip.d.ts +1 -0
  587. package/componentsV2/Chip/Chip.d.ts.map +1 -1
  588. package/componentsV2/Chip/Chip.js +1 -1
  589. package/componentsV2/Chip/Chip.js.map +1 -1
  590. package/componentsV2/Chip/Chip.stories.d.ts.map +1 -1
  591. package/componentsV2/ColorPicker/ColorPicker.d.ts +2 -1
  592. package/componentsV2/ColorPicker/ColorPicker.d.ts.map +1 -1
  593. package/componentsV2/ColorPicker/ColorPicker.js +1 -1
  594. package/componentsV2/ColorPicker/ColorPicker.js.map +1 -1
  595. package/componentsV2/ColorPicker/ColorPicker.scss.js +1 -1
  596. package/componentsV2/ColorPicker/ColorPicker.stories.d.ts.map +1 -1
  597. package/componentsV2/ColorPicker/OpacityDragtracker/OpacityDragtracker.d.ts.map +1 -1
  598. package/componentsV2/ColorPicker/OpacityDragtracker/OpacityDragtracker.js +1 -1
  599. package/componentsV2/ColorPicker/OpacityDragtracker/OpacityDragtracker.js.map +1 -1
  600. package/componentsV2/ColorPicker/Swatches/Swatches.scss.js +1 -1
  601. package/componentsV2/CompletionsOffsetWellPicker/Map/Map.js +1 -1
  602. package/componentsV2/CompletionsOffsetWellPicker/Map/Map.js.map +1 -1
  603. package/componentsV2/InterventionEventSelector/InterventionEventSelector.d.ts +3 -0
  604. package/componentsV2/InterventionEventSelector/InterventionEventSelector.d.ts.map +1 -0
  605. package/componentsV2/InterventionEventSelector/InterventionEventSelector.js +2 -0
  606. package/componentsV2/InterventionEventSelector/InterventionEventSelector.js.map +1 -0
  607. package/componentsV2/InterventionEventSelector/InterventionEventSelector.scss.js +2 -0
  608. package/componentsV2/InterventionEventSelector/InterventionEventSelector.scss.js.map +1 -0
  609. package/componentsV2/InterventionEventSelector/InterventionEventSelector.stories.d.ts +9 -0
  610. package/componentsV2/InterventionEventSelector/InterventionEventSelector.stories.d.ts.map +1 -0
  611. package/componentsV2/InterventionEventSelector/__tests__/InterventionEventSelector.test.d.ts +2 -0
  612. package/componentsV2/InterventionEventSelector/__tests__/InterventionEventSelector.test.d.ts.map +1 -0
  613. package/componentsV2/InterventionEventSelector/index.d.ts +5 -0
  614. package/componentsV2/InterventionEventSelector/index.d.ts.map +1 -0
  615. package/componentsV2/InterventionEventSelector/types.d.ts +22 -0
  616. package/componentsV2/InterventionEventSelector/types.d.ts.map +1 -0
  617. package/componentsV2/InterventionEventSelector/useInterventionUnitEvents.d.ts +8 -0
  618. package/componentsV2/InterventionEventSelector/useInterventionUnitEvents.d.ts.map +1 -0
  619. package/componentsV2/InterventionEventSelector/useInterventionUnitEvents.js +2 -0
  620. package/componentsV2/InterventionEventSelector/useInterventionUnitEvents.js.map +1 -0
  621. package/componentsV2/InterventionEventSelector/utils.d.ts +6 -0
  622. package/componentsV2/InterventionEventSelector/utils.d.ts.map +1 -0
  623. package/componentsV2/InterventionEventSelector/utils.js +2 -0
  624. package/componentsV2/InterventionEventSelector/utils.js.map +1 -0
  625. package/componentsV2/Modal/Modal.d.ts.map +1 -1
  626. package/componentsV2/Modal/Modal.js +1 -1
  627. package/componentsV2/Modal/Modal.js.map +1 -1
  628. package/componentsV2/Modal/constants.d.ts +3 -0
  629. package/componentsV2/Modal/constants.d.ts.map +1 -0
  630. package/componentsV2/Modal/constants.js +2 -0
  631. package/componentsV2/Modal/constants.js.map +1 -0
  632. package/componentsV2/TextArea/Resizer.d.ts +4 -0
  633. package/componentsV2/TextArea/Resizer.d.ts.map +1 -0
  634. package/componentsV2/TextArea/Resizer.js +2 -0
  635. package/componentsV2/TextArea/Resizer.js.map +1 -0
  636. package/componentsV2/TextArea/TextArea.constants.d.ts +9 -0
  637. package/componentsV2/TextArea/TextArea.constants.d.ts.map +1 -0
  638. package/componentsV2/TextArea/TextArea.constants.js +2 -0
  639. package/componentsV2/TextArea/TextArea.constants.js.map +1 -0
  640. package/componentsV2/TextArea/TextArea.d.ts +32 -0
  641. package/componentsV2/TextArea/TextArea.d.ts.map +1 -0
  642. package/componentsV2/TextArea/TextArea.js +2 -0
  643. package/componentsV2/TextArea/TextArea.js.map +1 -0
  644. package/componentsV2/TextArea/TextArea.scss.js +2 -0
  645. package/componentsV2/TextArea/TextArea.scss.js.map +1 -0
  646. package/componentsV2/TextArea/TextArea.stories.d.ts +12 -0
  647. package/componentsV2/TextArea/TextArea.stories.d.ts.map +1 -0
  648. package/componentsV2/TextArea/index.d.ts +2 -0
  649. package/componentsV2/TextArea/index.d.ts.map +1 -0
  650. package/componentsV2/TextInputBase/TextInputBase.d.ts +94 -0
  651. package/componentsV2/TextInputBase/TextInputBase.d.ts.map +1 -0
  652. package/componentsV2/TextInputBase/TextInputBase.js +2 -0
  653. package/componentsV2/TextInputBase/TextInputBase.js.map +1 -0
  654. package/componentsV2/TextInputBase/TextInputBase.scss.js +2 -0
  655. package/componentsV2/TextInputBase/TextInputBase.scss.js.map +1 -0
  656. package/componentsV2/{TextInputNext → TextInputBase}/components/InfoIcon.d.ts.map +1 -1
  657. package/componentsV2/{TextInputNext → TextInputBase}/components/InfoIcon.js.map +1 -1
  658. package/componentsV2/{TextInputNext → TextInputBase}/components/Label.d.ts.map +1 -1
  659. package/componentsV2/{TextInputNext → TextInputBase}/components/Label.js.map +1 -1
  660. package/componentsV2/{TextInputNext → TextInputBase}/components/MessageWithIcon.d.ts.map +1 -1
  661. package/componentsV2/{TextInputNext → TextInputBase}/components/MessageWithIcon.js.map +1 -1
  662. package/componentsV2/{TextInputNext → TextInputBase}/components/RequiredIndicator.d.ts.map +1 -1
  663. package/componentsV2/{TextInputNext → TextInputBase}/components/RequiredIndicator.js.map +1 -1
  664. package/componentsV2/TextInputBase/components/Styles.scss.js +2 -0
  665. package/componentsV2/{TextInputNext → TextInputBase}/components/Unit.d.ts.map +1 -1
  666. package/componentsV2/{TextInputNext → TextInputBase}/components/Unit.js.map +1 -1
  667. package/componentsV2/{TextInputNext → TextInputBase}/components/index.d.ts.map +1 -1
  668. package/componentsV2/TextInputBase/index.d.ts +2 -0
  669. package/componentsV2/TextInputBase/index.d.ts.map +1 -0
  670. package/componentsV2/TextInputNext/TextInputNext.d.ts +37 -54
  671. package/componentsV2/TextInputNext/TextInputNext.d.ts.map +1 -1
  672. package/componentsV2/TextInputNext/TextInputNext.js +1 -1
  673. package/componentsV2/TextInputNext/TextInputNext.js.map +1 -1
  674. package/componentsV2/TextInputNext/TextInputNext.scss.js +1 -1
  675. package/componentsV2/TextInputNext/index.d.ts +1 -1
  676. package/componentsV2/TextInputNext/index.d.ts.map +1 -1
  677. package/componentsV2/WellArchivedMessage/WellArchivedMessage.js +1 -1
  678. package/componentsV2/WellArchivedMessage/WellArchivedMessage.js.map +1 -1
  679. package/componentsV2/index.d.ts +2 -0
  680. package/componentsV2/index.d.ts.map +1 -1
  681. package/componentsV2/index.js +1 -1
  682. package/effects/__tests__/useOutsideClick.test.d.ts.map +1 -1
  683. package/effects/useOutsideClick.d.ts.map +1 -1
  684. package/effects/useOutsideClick.js +1 -1
  685. package/effects/useOutsideClick.js.map +1 -1
  686. package/mcp-server/server.mjs +321 -75
  687. package/package.json +1 -1
  688. package/testing/AppTestWrapper/AppTestWrapper.js +1 -1
  689. package/testing/AppTestWrapper/AppTestWrapper.js.map +1 -1
  690. package/tsconfig.tsbuildinfo +1 -1
  691. package/types/shared/Common.d.ts +9 -0
  692. package/types/shared/Common.d.ts.map +1 -1
  693. package/utils/__tests__/fetchAttachment.test.d.ts +2 -0
  694. package/utils/__tests__/fetchAttachment.test.d.ts.map +1 -0
  695. package/utils/__tests__/links.test.d.ts +2 -0
  696. package/utils/__tests__/links.test.d.ts.map +1 -0
  697. package/utils/devcenter.d.ts +1 -0
  698. package/utils/devcenter.d.ts.map +1 -1
  699. package/utils/devcenter.js +1 -1
  700. package/utils/devcenter.js.map +1 -1
  701. package/utils/fetchAttachment.d.ts +3 -0
  702. package/utils/fetchAttachment.d.ts.map +1 -0
  703. package/utils/fetchAttachment.js +2 -0
  704. package/utils/fetchAttachment.js.map +1 -0
  705. package/utils/fileExtension.d.ts.map +1 -1
  706. package/utils/fileExtension.js +1 -1
  707. package/utils/fileExtension.js.map +1 -1
  708. package/utils/links.d.ts +14 -0
  709. package/utils/links.d.ts.map +1 -0
  710. package/utils/links.js +2 -0
  711. package/utils/links.js.map +1 -0
  712. package/cjs-bundle/componentsV2/TextInputNext/components/Styles.scss.js +0 -2
  713. package/componentsV2/TextInputNext/components/Styles.scss.js +0 -2
  714. /package/cjs-bundle/componentsV2/{TextInputNext → TextInputBase}/components/InfoIcon.js +0 -0
  715. /package/cjs-bundle/componentsV2/{TextInputNext → TextInputBase}/components/Label.js +0 -0
  716. /package/cjs-bundle/componentsV2/{TextInputNext → TextInputBase}/components/MessageWithIcon.js +0 -0
  717. /package/cjs-bundle/componentsV2/{TextInputNext → TextInputBase}/components/RequiredIndicator.js +0 -0
  718. /package/cjs-bundle/componentsV2/{TextInputNext → TextInputBase}/components/Styles.scss.js.map +0 -0
  719. /package/cjs-bundle/componentsV2/{TextInputNext → TextInputBase}/components/Unit.js +0 -0
  720. /package/componentsV2/{TextInputNext → TextInputBase}/components/InfoIcon.d.ts +0 -0
  721. /package/componentsV2/{TextInputNext → TextInputBase}/components/InfoIcon.js +0 -0
  722. /package/componentsV2/{TextInputNext → TextInputBase}/components/Label.d.ts +0 -0
  723. /package/componentsV2/{TextInputNext → TextInputBase}/components/Label.js +0 -0
  724. /package/componentsV2/{TextInputNext → TextInputBase}/components/MessageWithIcon.d.ts +0 -0
  725. /package/componentsV2/{TextInputNext → TextInputBase}/components/MessageWithIcon.js +0 -0
  726. /package/componentsV2/{TextInputNext → TextInputBase}/components/RequiredIndicator.d.ts +0 -0
  727. /package/componentsV2/{TextInputNext → TextInputBase}/components/RequiredIndicator.js +0 -0
  728. /package/componentsV2/{TextInputNext → TextInputBase}/components/Styles.scss.js.map +0 -0
  729. /package/componentsV2/{TextInputNext → TextInputBase}/components/Unit.d.ts +0 -0
  730. /package/componentsV2/{TextInputNext → TextInputBase}/components/Unit.js +0 -0
  731. /package/componentsV2/{TextInputNext → TextInputBase}/components/index.d.ts +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"CommentCard.js","sources":["../../../../src/components/CommentCard/CommentCard.tsx"],"sourcesContent":["import { forwardRef, ReactElement, useMemo } from 'react';\nimport { Collapse } from '@material-ui/core';\nimport classNames from 'classnames';\n\nimport { FeedCard, FEED_CARD_MAX_HEIGHT_PX } from '../FeedCard';\nimport { StoredAttachment } from '../AttachmentPreview/useStoredAttachment';\nimport { useStoredAttachments } from '../AttachmentPreview/useStoredAttachments';\nimport { useFeedActivity } from '../FeedCard/useFeedActivity';\nimport { AttachmentPreview } from '../AttachmentPreview';\nimport { Avatar } from '../../componentsV2/Avatar';\nimport { Tooltip } from '../../componentsV2/Tooltip';\nimport { InfoIcon } from '../../icons';\n\nimport { CommentCardReactions } from './CommentCardReactions';\nimport { CommentCardReplies } from './CommentCardReplies';\nimport { CommentCardProps, CommentContextRow } from './CommentCard.types';\n\nimport styles from './CommentCard.scss';\n\nconst MetadataTooltip = ({ rows }: { rows: CommentContextRow[] }) => (\n <div className={styles.metadataRows}>\n {rows.map(({ label, value, unit }) => (\n <div key={label} className={styles.metadataRow}>\n <span className={styles.metadataLabel}>{label}</span>\n <span className={styles.metadataValue}>{value}</span>\n {unit && <span className={styles.metadataUnit}>{unit}</span>}\n </div>\n ))}\n </div>\n);\n\nexport const CommentCard = forwardRef<HTMLDivElement, CommentCardProps>((props, ref) => {\n const {\n activity,\n variant = 'expanded',\n author,\n timestamp,\n subtitle,\n body,\n contextRows,\n attachment,\n storedAttachments,\n isLiked,\n likesCount,\n commentsCount,\n replies,\n hasMoreReplies,\n moreRepliesCount,\n attachments,\n onAttachmentClick,\n attachmentSlot,\n chip,\n chipColor,\n onLike,\n onReplyToggle,\n onForward,\n onShowMoreReplies,\n menuItems,\n isReplyOpen,\n replyInput,\n editForm,\n width,\n onMouseEnter,\n onMouseLeave,\n className,\n testId,\n } = props;\n\n const activityBinding = useFeedActivity(activity, 'comment');\n const cardMenuItems = activityBinding\n ? [...(menuItems ?? []), ...activityBinding.menuItems]\n : menuItems;\n const cardReplyInput = activityBinding ? activityBinding.replyInput : replyInput;\n const cardIsReplyOpen = activityBinding ? activityBinding.isReplyOpen : isReplyOpen;\n const cardReplies = activityBinding ? activityBinding.replies : replies;\n\n const hasFooter = !!(\n activityBinding ||\n onLike ||\n onReplyToggle ||\n onForward ||\n cardMenuItems?.length ||\n contextRows?.length\n );\n\n const info = !!contextRows?.length && (\n <Tooltip\n placement=\"top\"\n className={styles.metadataTooltip}\n title={<MetadataTooltip rows={contextRows} />}\n >\n <span className={styles.infoButton} data-testid=\"comment-card-info\">\n <InfoIcon size={12} strokeWidth={2} />\n </span>\n </Tooltip>\n );\n\n const reactions = (\n <CommentCardReactions\n info={info}\n commentsCount={activityBinding ? activityBinding.commentsCount : commentsCount}\n likesCount={activityBinding ? activityBinding.likesCount : likesCount}\n isLiked={activityBinding ? activityBinding.isLiked : isLiked}\n menuItems={cardMenuItems}\n onLike={activityBinding ? activityBinding.onLike : onLike}\n onReplyToggle={activityBinding ? activityBinding.onReplyToggle : onReplyToggle}\n onForward={onForward}\n />\n );\n\n const bodyRow = (\n <div className={styles.bodyRow}>\n <div className={styles.text}>{body}</div>\n {chip && (\n <span\n className={classNames(styles.chip, !!chipColor && styles.chipAccented)}\n style={chipColor ? { borderLeftColor: chipColor } : undefined}\n >\n {chip}\n </span>\n )}\n </div>\n );\n\n const storedList = useMemo(\n () => storedAttachments ?? ([attachment].filter(Boolean) as StoredAttachment[]),\n [storedAttachments, attachment]\n );\n const storedItems = useStoredAttachments(storedList);\n const items = storedItems.length ? storedItems : attachments;\n\n // Undefined is the norm, which lets AttachmentPreview run its own lightbox; a caller that\n // passes the prop is taking the click over.\n const attachmentPreview = items?.length ? (\n <AttachmentPreview items={items} onItemClick={onAttachmentClick} />\n ) : null;\n\n const surfaceProps = {\n ref,\n width,\n radius: 12,\n onMouseEnter,\n onMouseLeave,\n testId,\n className,\n };\n\n if (activityBinding?.isDeleted) return null;\n const withOverlays = (card: ReactElement) => (\n <>\n {card}\n {activityBinding?.deleteDialog}\n </>\n );\n\n if (variant === 'preview') {\n return withOverlays(\n <FeedCard {...surfaceProps} maxHeight={FEED_CARD_MAX_HEIGHT_PX}>\n <div className={styles.compactBody}>\n <div className={styles.compactTop}>\n <Avatar\n size={24}\n name={author.name}\n imageSrc={author.avatarUrl}\n className={styles.avatar}\n />\n <span className={styles.name}>{author.name}</span>\n <span className={styles.compactTime}>{timestamp}</span>\n </div>\n <div className={styles.scrollBody}>{bodyRow}</div>\n </div>\n {hasFooter && <div className={styles.compactFooter}>{reactions}</div>}\n </FeedCard>\n );\n }\n\n const editing = !!editForm;\n\n const headerEl = (\n <div className={styles.header}>\n <Avatar size={24} name={author.name} imageSrc={author.avatarUrl} className={styles.avatar} />\n <div className={styles.headerText}>\n <div className={styles.nameRow}>\n <span className={styles.name}>{author.name}</span>\n {timestamp && <span className={styles.timestamp}>{timestamp}</span>}\n </div>\n {subtitle && <span className={styles.subtitle}>{subtitle}</span>}\n </div>\n </div>\n );\n\n if (editing) {\n return withOverlays(\n <FeedCard {...surfaceProps}>\n <div className={styles.editHeader}>{headerEl}</div>\n {editForm}\n </FeedCard>\n );\n }\n\n return withOverlays(\n <FeedCard {...surfaceProps}>\n <div className={styles.capped} style={{ maxHeight: FEED_CARD_MAX_HEIGHT_PX }}>\n <div className={styles.bodySurface}>\n {headerEl}\n\n <div className={styles.scrollBody}>\n {bodyRow}\n {(attachmentPreview || attachmentSlot) && (\n <div className={styles.attachment}>\n {attachmentPreview}\n {attachmentSlot}\n </div>\n )}\n </div>\n </div>\n\n {hasFooter && <div className={styles.footer}>{reactions}</div>}\n </div>\n\n {hasFooter && (\n <Collapse in={cardIsReplyOpen} timeout={250} unmountOnExit>\n <div className={styles.repliesSection}>\n <CommentCardReplies\n replies={cardReplies}\n hasMoreReplies={activityBinding ? activityBinding.hasMoreReplies : hasMoreReplies}\n moreRepliesCount={\n activityBinding ? activityBinding.moreRepliesCount : moreRepliesCount\n }\n isReplyOpen={cardIsReplyOpen}\n replyInput={cardReplyInput}\n onShowMoreReplies={\n activityBinding ? activityBinding.onShowMoreReplies : onShowMoreReplies\n }\n />\n </div>\n </Collapse>\n )}\n </FeedCard>\n );\n});\n"],"names":["MetadataTooltip","_ref","rows","_jsx","className","styles","metadataRows","children","map","_ref2","label","value","unit","_jsxs","metadataRow","jsx","metadataLabel","metadataValue","metadataUnit","CommentCard","forwardRef","props","ref","activity","_props$variant","variant","author","timestamp","subtitle","body","contextRows","attachment","storedAttachments","isLiked","likesCount","commentsCount","replies","hasMoreReplies","moreRepliesCount","attachments","onAttachmentClick","attachmentSlot","chip","chipColor","onLike","onReplyToggle","onForward","onShowMoreReplies","menuItems","isReplyOpen","replyInput","editForm","width","onMouseEnter","onMouseLeave","testId","activityBinding","useFeedActivity","cardMenuItems","cardReplyInput","cardIsReplyOpen","cardReplies","hasFooter","length","info","Tooltip","placement","metadataTooltip","title","infoButton","InfoIcon","size","strokeWidth","reactions","CommentCardReactions","bodyRow","jsxs","text","classNames","chipAccented","style","borderLeftColor","undefined","storedList","useMemo","filter","Boolean","storedItems","useStoredAttachments","items","attachmentPreview","AttachmentPreview","onItemClick","surfaceProps","radius","isDeleted","withOverlays","card","_Fragment","deleteDialog","FeedCard","maxHeight","FEED_CARD_MAX_HEIGHT_PX","compactBody","compactTop","Avatar","name","imageSrc","avatarUrl","avatar","compactTime","scrollBody","compactFooter","editing","headerEl","header","headerText","nameRow","editHeader","capped","bodySurface","footer","Collapse","in","timeout","unmountOnExit","repliesSection","CommentCardReplies"],"mappings":"8hLAmBA,IAAMA,EAAkB,SAAHC,GAAA,IAAMC,IAAAA,KAAI,OAC7BC,EAAAA,IAAA,MAAA,CAAKC,UAAWC,EAAOC,aAAaC,SACjCL,EAAKM,KAAI,SAAAC,GAAA,IAAGC,IAAAA,MAAOC,IAAAA,MAAOC,IAAAA,KAAI,OAC7BC,EAAAA,KAAA,MAAA,CAAiBT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A,EACnEC,iBACEkB,EAAkBA,EAAgBlB,iBAAmBA,EAEvDW,YAAaW,GACbV,WAAYS,GACZZ,kBACES,EAAkBA,EAAgBT,kBAAoBA,YAQtE"}
1
+ {"version":3,"file":"CommentCard.js","sources":["../../../../src/components/CommentCard/CommentCard.tsx"],"sourcesContent":["import { forwardRef, ReactElement, useMemo } from 'react';\nimport { Collapse } from '@material-ui/core';\nimport classNames from 'classnames';\n\nimport { FeedCard, FEED_CARD_MAX_HEIGHT_PX } from '../FeedCard';\nimport { StoredAttachment } from '../AttachmentPreview/useStoredAttachment';\nimport { useStoredAttachments } from '../AttachmentPreview/useStoredAttachments';\nimport { useFeedActivity } from '../FeedCard/useFeedActivity';\nimport { AttachmentPreview } from '../AttachmentPreview';\nimport { Avatar } from '../../componentsV2/Avatar';\nimport { Tooltip } from '../../componentsV2/Tooltip';\nimport { LinkedText } from '../LinkedText';\nimport { InfoIcon } from '../../icons';\n\nimport { CommentCardReactions } from './CommentCardReactions';\nimport { CommentCardReplies } from './CommentCardReplies';\nimport { CommentCardProps, CommentContextRow } from './CommentCard.types';\n\nimport styles from './CommentCard.scss';\n\nconst MetadataTooltip = ({ rows }: { rows: CommentContextRow[] }) => (\n <div className={styles.metadataRows}>\n {rows.map(({ label, value, unit }) => (\n <div key={label} className={styles.metadataRow}>\n <span className={styles.metadataLabel}>{label}</span>\n <span className={styles.metadataValue}>{value}</span>\n {unit && <span className={styles.metadataUnit}>{unit}</span>}\n </div>\n ))}\n </div>\n);\n\nexport const CommentCard = forwardRef<HTMLDivElement, CommentCardProps>((props, ref) => {\n const {\n activity,\n variant = 'expanded',\n author,\n timestamp,\n subtitle,\n body,\n contextRows,\n attachment,\n storedAttachments,\n isLiked,\n likesCount,\n commentsCount,\n replies,\n hasMoreReplies,\n moreRepliesCount,\n attachments,\n onAttachmentClick,\n onAttachmentShare,\n attachmentSlot,\n chip,\n chipColor,\n onLike,\n onReplyToggle,\n onForward,\n onShowMoreReplies,\n menuItems,\n isReplyOpen,\n replyInput,\n editForm,\n width,\n onMouseEnter,\n onMouseLeave,\n className,\n testId,\n } = props;\n\n const activityBinding = useFeedActivity(activity, 'comment');\n const cardMenuItems = activityBinding\n ? [...(menuItems ?? []), ...activityBinding.menuItems]\n : menuItems;\n const cardReplyInput = activityBinding ? activityBinding.replyInput : replyInput;\n const cardIsReplyOpen = activityBinding ? activityBinding.isReplyOpen : isReplyOpen;\n const cardReplies = activityBinding ? activityBinding.replies : replies;\n\n const hasFooter = !!(\n activityBinding ||\n onLike ||\n onReplyToggle ||\n onForward ||\n cardMenuItems?.length ||\n contextRows?.length\n );\n\n const info = !!contextRows?.length && (\n <Tooltip\n placement=\"top\"\n className={styles.metadataTooltip}\n title={<MetadataTooltip rows={contextRows} />}\n >\n <span className={styles.infoButton} data-testid=\"comment-card-info\">\n <InfoIcon size={12} strokeWidth={2} />\n </span>\n </Tooltip>\n );\n\n const reactions = (\n <CommentCardReactions\n info={info}\n commentsCount={activityBinding ? activityBinding.commentsCount : commentsCount}\n likesCount={activityBinding ? activityBinding.likesCount : likesCount}\n isLiked={activityBinding ? activityBinding.isLiked : isLiked}\n menuItems={cardMenuItems}\n onLike={activityBinding ? activityBinding.onLike : onLike}\n onReplyToggle={activityBinding ? activityBinding.onReplyToggle : onReplyToggle}\n onForward={onForward}\n />\n );\n\n const bodyRow = (\n <div className={styles.bodyRow}>\n <div className={styles.text}>\n <LinkedText>{body}</LinkedText>\n </div>\n {chip && (\n <span\n className={classNames(styles.chip, !!chipColor && styles.chipAccented)}\n style={chipColor ? { borderLeftColor: chipColor } : undefined}\n >\n {chip}\n </span>\n )}\n </div>\n );\n\n const storedList = useMemo(\n () => storedAttachments ?? ([attachment].filter(Boolean) as StoredAttachment[]),\n [storedAttachments, attachment]\n );\n const storedItems = useStoredAttachments(storedList);\n const items = storedItems.length ? storedItems : attachments;\n\n // Undefined is the norm, which lets AttachmentPreview run its own lightbox; a caller that\n // passes the prop is taking the click over.\n const attachmentPreview = items?.length ? (\n <AttachmentPreview items={items} onItemClick={onAttachmentClick} onShare={onAttachmentShare} />\n ) : null;\n\n const surfaceProps = {\n ref,\n width,\n radius: 12,\n onMouseEnter,\n onMouseLeave,\n testId,\n className,\n };\n\n if (activityBinding?.isDeleted) return null;\n const withOverlays = (card: ReactElement) => (\n <>\n {card}\n {activityBinding?.deleteDialog}\n </>\n );\n\n if (variant === 'preview') {\n return withOverlays(\n <FeedCard {...surfaceProps} maxHeight={FEED_CARD_MAX_HEIGHT_PX}>\n <div className={styles.compactBody}>\n <div className={styles.compactTop}>\n <Avatar\n size={24}\n name={author.name}\n imageSrc={author.avatarUrl}\n className={styles.avatar}\n />\n <span className={styles.name}>{author.name}</span>\n <span className={styles.compactTime}>{timestamp}</span>\n </div>\n <div className={styles.scrollBody}>{bodyRow}</div>\n </div>\n {hasFooter && <div className={styles.compactFooter}>{reactions}</div>}\n </FeedCard>\n );\n }\n\n const editing = !!editForm;\n\n const headerEl = (\n <div className={styles.header}>\n <Avatar size={24} name={author.name} imageSrc={author.avatarUrl} className={styles.avatar} />\n <div className={styles.headerText}>\n <div className={styles.nameRow}>\n <span className={styles.name}>{author.name}</span>\n {timestamp && <span className={styles.timestamp}>{timestamp}</span>}\n </div>\n {subtitle && <span className={styles.subtitle}>{subtitle}</span>}\n </div>\n </div>\n );\n\n if (editing) {\n return withOverlays(\n <FeedCard {...surfaceProps}>\n <div className={styles.editHeader}>{headerEl}</div>\n {editForm}\n </FeedCard>\n );\n }\n\n return withOverlays(\n <FeedCard {...surfaceProps}>\n <div className={styles.capped} style={{ maxHeight: FEED_CARD_MAX_HEIGHT_PX }}>\n <div className={styles.bodySurface}>\n {headerEl}\n\n <div className={styles.scrollBody}>\n {bodyRow}\n {(attachmentPreview || attachmentSlot) && (\n <div className={styles.attachment}>\n {attachmentPreview}\n {attachmentSlot}\n </div>\n )}\n </div>\n </div>\n\n {hasFooter && <div className={styles.footer}>{reactions}</div>}\n </div>\n\n {hasFooter && (\n <Collapse in={cardIsReplyOpen} timeout={250} unmountOnExit>\n <div className={styles.repliesSection}>\n <CommentCardReplies\n replies={cardReplies}\n hasMoreReplies={activityBinding ? activityBinding.hasMoreReplies : hasMoreReplies}\n moreRepliesCount={\n activityBinding ? activityBinding.moreRepliesCount : moreRepliesCount\n }\n isReplyOpen={cardIsReplyOpen}\n replyInput={cardReplyInput}\n onShowMoreReplies={\n activityBinding ? activityBinding.onShowMoreReplies : onShowMoreReplies\n }\n />\n </div>\n </Collapse>\n )}\n </FeedCard>\n );\n});\n"],"names":["MetadataTooltip","_ref","rows","_jsx","className","styles","metadataRows","children","map","_ref2","label","value","unit","_jsxs","metadataRow","jsx","metadataLabel","metadataValue","metadataUnit","CommentCard","forwardRef","props","ref","activity","_props$variant","variant","author","timestamp","subtitle","body","contextRows","attachment","storedAttachments","isLiked","likesCount","commentsCount","replies","hasMoreReplies","moreRepliesCount","attachments","onAttachmentClick","onAttachmentShare","attachmentSlot","chip","chipColor","onLike","onReplyToggle","onForward","onShowMoreReplies","menuItems","isReplyOpen","replyInput","editForm","width","onMouseEnter","onMouseLeave","testId","activityBinding","useFeedActivity","cardMenuItems","cardReplyInput","cardIsReplyOpen","cardReplies","hasFooter","length","info","Tooltip","placement","metadataTooltip","title","infoButton","InfoIcon","size","strokeWidth","reactions","CommentCardReactions","bodyRow","jsxs","text","LinkedText","classNames","chipAccented","style","borderLeftColor","undefined","storedList","useMemo","filter","Boolean","storedItems","useStoredAttachments","items","attachmentPreview","AttachmentPreview","onItemClick","onShare","surfaceProps","radius","isDeleted","withOverlays","card","_Fragment","deleteDialog","FeedCard","maxHeight","FEED_CARD_MAX_HEIGHT_PX","compactBody","compactTop","Avatar","name","imageSrc","avatarUrl","avatar","compactTime","scrollBody","compactFooter","editing","headerEl","header","headerText","nameRow","editHeader","capped","bodySurface","footer","Collapse","in","timeout","unmountOnExit","repliesSection","CommentCardReplies"],"mappings":"8vLAoBA,IAAMA,EAAkB,SAAHC,GAAA,IAAMC,IAAAA,KAAI,OAC7BC,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,QAG/CX,IACC5D,EAAAY,IAAC8G,WAAQ,CAACC,GAAIjE,GAAiBkE,QAAS,IAAKC,eAAa,EAAAzH,SACxDJ,EAAAY,IAAA,MAAA,CAAKX,UAAWC,EAAO4H,eAAe1H,SACpCJ,MAAC+H,qBAAkB,CACjB9F,QAAS0B,GACTzB,eAAgBoB,GAAkBA,GAAgBpB,eAAiBA,EACnEC,iBACEmB,GAAkBA,GAAgBnB,iBAAmBA,EAEvDY,YAAaW,GACbV,WAAYS,GACZZ,kBACES,GAAkBA,GAAgBT,kBAAoBA,YAQtE"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var s=require("classnames"),o=require("../../componentsV2/ButtonIcon/ButtonIcon.js"),c=require("../../componentsV2/Tooltip/Tooltip.js"),i=require("../../icons/iconParkIcons.js");require("../../icons/customIcons/icons/AddMessage.js"),require("../../icons/customIcons/icons/DragOne.js"),require("../../icons/customIcons/icons/Attention.js"),require("../../icons/customIcons/icons/Collapse.js"),require("../../icons/customIcons/icons/Dashboard.js"),require("../../icons/customIcons/icons/Expand.js"),require("../../icons/customIcons/icons/FolderClosed.js"),require("../../icons/customIcons/icons/FolderClosedFilled.js"),require("../../icons/customIcons/icons/FolderOpened.js"),require("../../icons/customIcons/icons/GreaterOrEqual.js"),require("../../icons/customIcons/icons/LessOrEqual.js"),require("../../icons/customIcons/icons/Search.js"),require("../../icons/customIcons/icons/SearchOne.js"),require("../../icons/customIcons/icons/Wellhub.js"),require("../../icons/customIcons/icons/MultiRuler.js"),require("../../icons/customIcons/icons/Checkbox.js"),require("../../icons/customIcons/icons/CheckboxChecked.js"),require("../../icons/customIcons/icons/CheckboxIndeterminate.js"),require("../../icons/customIcons/icons/Radio.js"),require("../../icons/customIcons/icons/RadioChecked.js"),require("../../icons/customIcons/icons/SimulFrac.js"),require("../../icons/customIcons/icons/ZipperFrac.js"),require("../../icons/customIcons/icons/CautionFilled.js"),require("../../icons/customIcons/icons/MoreApp.js"),require("../../icons/customIcons/icons/Pad.js"),require("../../icons/customIcons/icons/DrilloutUnit.js"),require("../../icons/customIcons/icons/FracFleet.js"),require("../../icons/customIcons/icons/Global.js"),require("../../icons/customIcons/icons/Program.js"),require("../../icons/customIcons/icons/Rig.js"),require("../../icons/customIcons/icons/Well.js"),require("../../icons/customIcons/icons/Gap.js"),require("../../icons/customIcons/icons/Pin.js"),require("../../icons/customIcons/icons/CloseOneFilled.js"),require("../../icons/customIcons/icons/AttentionFilled.js"),require("../../icons/customIcons/icons/CheckOneFilled.js"),require("../../icons/customIcons/icons/Archive.js"),require("../../icons/customIcons/icons/ArchiveCancel.js"),require("../../icons/customIcons/icons/Unarchive.js"),require("../../icons/customIcons/icons/Archived.js"),require("../../icons/customIcons/icons/InterventionUnit.js"),require("../../icons/customIcons/icons/CloudDelete.js"),require("../../icons/customIcons/icons/Lasso.js"),require("../../icons/customIcons/icons/Radius.js"),require("../../icons/customIcons/icons/ErrorOps.js"),require("../../icons/customIcons/icons/DataTypeOps.js"),require("../../icons/customIcons/icons/FalsePositiveOps.js"),require("../../icons/customIcons/icons/CalibrationOps.js"),require("../../icons/customIcons/icons/CriticalOps.js"),require("../../icons/customIcons/icons/Company.js"),require("../../icons/customIcons/icons/ArchiveOne.js"),require("../../icons/customIcons/icons/ParseBotFusion.js"),require("../../icons/customIcons/icons/Connect.js"),require("../../icons/customIcons/icons/PuzzleOne.js"),require("../../icons/customIcons/icons/Feed.js"),require("../../icons/customIcons/icons/Prompt.js"),require("../../icons/customIcons/icons/Companies.js"),require("../../icons/customIcons/icons/ClipboardAi.js"),require("../../icons/customIcons/icons/Key.js"),require("../../icons/customIcons/icons/AtSignCrossed.js"),require("../../icons/customIcons/icons/MappingManual.js"),require("../../icons/customIcons/icons/Mapping.js"),require("../../icons/customIcons/icons/Metrics.js"),require("../../icons/customIcons/icons/Drops.js"),require("../../icons/customIcons/icons/ClipboardSearch.js"),require("../../icons/customIcons/icons/Template.js"),require("../../icons/customIcons/icons/ClipboardMetrics.js"),require("../../icons/customIcons/icons/ClipboardBuilder.js"),require("../../icons/customIcons/icons/UnitConversion.js"),require("../../icons/customIcons/icons/NPT.js"),require("../../icons/customIcons/icons/GuidedFrac.js");var n=require("./CommentMenu.js"),e=require("./CommentCard.scss.js"),r=require("react/jsx-runtime");function u(s){return s&&"object"==typeof s&&"default"in s?s:{default:s}}var t=u(s);exports.CommentCardReactions=function(s){var u=s.info,m=s.commentsCount,a=void 0===m?0:m,j=s.likesCount,I=void 0===j?0:j,l=s.isLiked,q=s.menuItems,d=s.onLike,p=s.onReplyToggle,C=s.onForward;return r.jsxs("div",{className:e.actionsRow,children:[r.jsxs("div",{className:e.actions,children:[p&&r.jsxs("div",{className:e.action,children:[r.jsx(o.ButtonIcon,{size:"xs",type:"tertiary",onClick:p,testId:"comment-card-reply",children:r.jsx(i.MessageIcon,{size:16})}),a>0&&r.jsx("span",{className:e.count,children:a})]}),d&&r.jsxs("div",{className:e.action,children:[r.jsx(o.ButtonIcon,{size:"xs",type:"tertiary",onClick:d,className:t.default(l&&e.liked),testId:"comment-card-like",children:r.jsx(i.ThumbsUpIcon,{size:16})}),I>0&&r.jsx("span",{className:e.count,children:I})]}),C&&r.jsx(c.Tooltip,{title:"Share to Chat",children:r.jsx("span",{children:r.jsx(o.ButtonIcon,{size:"xs",type:"tertiary",onClick:C,testId:"comment-card-forward",children:r.jsx(i.ShareTwoIcon,{size:16})})})})]}),r.jsxs("div",{className:e.trailingActions,children:[u,r.jsx(n.CommentMenu,{items:q,testId:"comment-card-menu"})]})]})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var s=require("classnames"),o=require("../../componentsV2/ButtonIcon/ButtonIcon.js"),c=require("../../componentsV2/Tooltip/Tooltip.js"),i=require("../../icons/iconParkIcons.js");require("../../icons/customIcons/icons/AddMessage.js"),require("../../icons/customIcons/icons/DragOne.js"),require("../../icons/customIcons/icons/Attention.js"),require("../../icons/customIcons/icons/Collapse.js"),require("../../icons/customIcons/icons/Dashboard.js"),require("../../icons/customIcons/icons/Expand.js"),require("../../icons/customIcons/icons/FolderClosed.js"),require("../../icons/customIcons/icons/FolderClosedFilled.js"),require("../../icons/customIcons/icons/FolderOpened.js"),require("../../icons/customIcons/icons/GreaterOrEqual.js"),require("../../icons/customIcons/icons/LessOrEqual.js"),require("../../icons/customIcons/icons/Search.js"),require("../../icons/customIcons/icons/SearchOne.js"),require("../../icons/customIcons/icons/Wellhub.js"),require("../../icons/customIcons/icons/MultiRuler.js"),require("../../icons/customIcons/icons/Checkbox.js"),require("../../icons/customIcons/icons/CheckboxChecked.js"),require("../../icons/customIcons/icons/CheckboxIndeterminate.js"),require("../../icons/customIcons/icons/Radio.js"),require("../../icons/customIcons/icons/RadioChecked.js"),require("../../icons/customIcons/icons/SimulFrac.js"),require("../../icons/customIcons/icons/ZipperFrac.js"),require("../../icons/customIcons/icons/CautionFilled.js"),require("../../icons/customIcons/icons/MoreApp.js"),require("../../icons/customIcons/icons/Pad.js"),require("../../icons/customIcons/icons/DrilloutUnit.js"),require("../../icons/customIcons/icons/FracFleet.js"),require("../../icons/customIcons/icons/Global.js"),require("../../icons/customIcons/icons/Program.js"),require("../../icons/customIcons/icons/Rig.js"),require("../../icons/customIcons/icons/Well.js"),require("../../icons/customIcons/icons/Gap.js"),require("../../icons/customIcons/icons/Pin.js"),require("../../icons/customIcons/icons/CloseOneFilled.js"),require("../../icons/customIcons/icons/AttentionFilled.js"),require("../../icons/customIcons/icons/CheckOneFilled.js"),require("../../icons/customIcons/icons/Archive.js"),require("../../icons/customIcons/icons/ArchiveCancel.js"),require("../../icons/customIcons/icons/Unarchive.js"),require("../../icons/customIcons/icons/Archived.js"),require("../../icons/customIcons/icons/InterventionUnit.js"),require("../../icons/customIcons/icons/CloudDelete.js"),require("../../icons/customIcons/icons/Lasso.js"),require("../../icons/customIcons/icons/Radius.js"),require("../../icons/customIcons/icons/ErrorOps.js"),require("../../icons/customIcons/icons/DataTypeOps.js"),require("../../icons/customIcons/icons/FalsePositiveOps.js"),require("../../icons/customIcons/icons/CalibrationOps.js"),require("../../icons/customIcons/icons/CriticalOps.js"),require("../../icons/customIcons/icons/Company.js"),require("../../icons/customIcons/icons/ArchiveOne.js"),require("../../icons/customIcons/icons/ParseBotFusion.js"),require("../../icons/customIcons/icons/Connect.js"),require("../../icons/customIcons/icons/PuzzleOne.js"),require("../../icons/customIcons/icons/Feed.js"),require("../../icons/customIcons/icons/Prompt.js"),require("../../icons/customIcons/icons/Companies.js"),require("../../icons/customIcons/icons/ClipboardAi.js"),require("../../icons/customIcons/icons/Key.js"),require("../../icons/customIcons/icons/AtSignCrossed.js"),require("../../icons/customIcons/icons/MappingManual.js"),require("../../icons/customIcons/icons/Mapping.js"),require("../../icons/customIcons/icons/Metrics.js"),require("../../icons/customIcons/icons/Drops.js"),require("../../icons/customIcons/icons/ClipboardSearch.js"),require("../../icons/customIcons/icons/Template.js"),require("../../icons/customIcons/icons/ClipboardMetrics.js"),require("../../icons/customIcons/icons/ClipboardBuilder.js"),require("../../icons/customIcons/icons/UnitConversion.js"),require("../../icons/customIcons/icons/NPT.js"),require("../../icons/customIcons/icons/GuidedFrac.js");var n=require("./CommentMenu.js"),e=require("./CommentCard.scss.js"),r=require("react/jsx-runtime");function u(s){return s&&"object"==typeof s&&"default"in s?s:{default:s}}var t=u(s);exports.CommentCardReactions=function(s){var u=s.info,m=s.commentsCount,a=void 0===m?0:m,j=s.likesCount,I=void 0===j?0:j,l=s.isLiked,q=s.menuItems,d=s.onLike,p=s.onReplyToggle,C=s.onForward;return r.jsxs("div",{className:e.actionsRow,children:[r.jsxs("div",{className:e.actions,children:[p&&r.jsxs("div",{className:e.action,children:[r.jsx(o.ButtonIcon,{size:"xs",type:"tertiary",onClick:p,testId:"comment-card-reply",children:r.jsx(i.MessageIcon,{size:16})}),a>0&&r.jsx("span",{className:e.count,children:a})]}),d&&r.jsxs("div",{className:e.action,children:[r.jsx(o.ButtonIcon,{size:"xs",type:"tertiary",onClick:d,className:t.default(l&&e.liked),testId:"comment-card-like",children:r.jsx(i.ThumbsUpIcon,{size:16})}),I>0&&r.jsx("span",{className:e.count,children:I})]}),C&&r.jsx(c.Tooltip,{title:"Share to Team Chat",children:r.jsx("span",{children:r.jsx(o.ButtonIcon,{size:"xs",type:"tertiary",onClick:C,testId:"comment-card-forward",children:r.jsx(i.ShareTwoIcon,{size:16})})})})]}),r.jsxs("div",{className:e.trailingActions,children:[u,r.jsx(n.CommentMenu,{items:q,testId:"comment-card-menu"})]})]})};
2
2
  //# sourceMappingURL=CommentCardReactions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CommentCardReactions.js","sources":["../../../../src/components/CommentCard/CommentCardReactions.tsx"],"sourcesContent":["import { FC, ReactNode } from 'react';\nimport classNames from 'classnames';\n\nimport { ButtonIcon } from '../../componentsV2/ButtonIcon';\nimport { Tooltip } from '../../componentsV2/Tooltip';\nimport { MessageIcon, ShareTwoIcon, ThumbsUpIcon } from '../../icons';\n\nimport { CommentMenuItem } from './CommentCard.types';\nimport { CommentMenu } from './CommentMenu';\n\nimport styles from './CommentCard.scss';\n\ntype CommentCardReactionsProps = {\n info?: ReactNode;\n commentsCount?: number;\n likesCount?: number;\n isLiked?: boolean;\n menuItems?: CommentMenuItem[];\n onLike?: () => void;\n onReplyToggle?: () => void;\n onForward?: () => void;\n};\n\nexport const CommentCardReactions: FC<CommentCardReactionsProps> = ({\n info,\n commentsCount = 0,\n likesCount = 0,\n isLiked,\n menuItems,\n onLike,\n onReplyToggle,\n onForward,\n}) => {\n return (\n <div className={styles.actionsRow}>\n <div className={styles.actions}>\n {onReplyToggle && (\n <div className={styles.action}>\n <ButtonIcon\n size=\"xs\"\n type=\"tertiary\"\n onClick={onReplyToggle}\n testId=\"comment-card-reply\"\n >\n <MessageIcon size={16} />\n </ButtonIcon>\n {commentsCount > 0 && <span className={styles.count}>{commentsCount}</span>}\n </div>\n )}\n\n {onLike && (\n <div className={styles.action}>\n <ButtonIcon\n size=\"xs\"\n type=\"tertiary\"\n onClick={onLike}\n className={classNames(isLiked && styles.liked)}\n testId=\"comment-card-like\"\n >\n <ThumbsUpIcon size={16} />\n </ButtonIcon>\n {likesCount > 0 && <span className={styles.count}>{likesCount}</span>}\n </div>\n )}\n\n {onForward && (\n <Tooltip title=\"Share to Chat\">\n <span>\n <ButtonIcon\n size=\"xs\"\n type=\"tertiary\"\n onClick={onForward}\n testId=\"comment-card-forward\"\n >\n <ShareTwoIcon size={16} />\n </ButtonIcon>\n </span>\n </Tooltip>\n )}\n </div>\n\n <div className={styles.trailingActions}>\n {info}\n <CommentMenu items={menuItems} testId=\"comment-card-menu\" />\n </div>\n </div>\n );\n};\n"],"names":["_ref","info","_ref$commentsCount","commentsCount","_ref$likesCount","likesCount","isLiked","menuItems","onLike","onReplyToggle","onForward","_jsxs","className","styles","actionsRow","children","jsxs","actions","action","_jsx","ButtonIcon","size","type","onClick","testId","MessageIcon","count","classNames","liked","ThumbsUpIcon","jsx","Tooltip","title","ShareTwoIcon","trailingActions","CommentMenu","items"],"mappings":"gvIAuBmE,SAS7DA,GAAA,IARJC,IAAAA,KAAIC,EAAAF,EACJG,cAAAA,aAAgB,EAACD,EAAAE,EAAAJ,EACjBK,WAAAA,aAAa,EAACD,EACdE,IAAAA,QACAC,IAAAA,UACAC,IAAAA,OACAC,IAAAA,cACAC,IAAAA,UAEA,OACEC,EAAAA,KAAA,MAAA,CAAKC,UAAWC,EAAOC,WAAWC,SAChC,CAAAJ,EAAAK,KAAA,MAAA,CAAKJ,UAAWC,EAAOI,QAAQF,SAAA,CAC5BN,GACCE,EAAAK,KAAA,MAAA,CAAKJ,UAAWC,EAAOK,OAAOH,SAAA,CAC5BI,MAACC,aAAU,CACTC,KAAK,KACLC,KAAK,WACLC,QAASd,EACTe,OAAO,qBAAoBT,SAE3BI,MAACM,cAAW,CAACJ,KAAM,OAEpBlB,EAAgB,GAAKgB,EAAAA,IAAA,OAAA,CAAMP,UAAWC,EAAOa,MAAMX,SAAEZ,OAIzDK,GACCG,EAAAK,KAAA,MAAA,CAAKJ,UAAWC,EAAOK,OAAOH,SAAA,CAC5BI,MAACC,aAAU,CACTC,KAAK,KACLC,KAAK,WACLC,QAASf,EACTI,UAAWe,EAAU,QAACrB,GAAWO,EAAOe,OACxCJ,OAAO,oBAAmBT,SAE1BI,MAACU,eAAY,CAACR,KAAM,OAErBhB,EAAa,GAAKc,EAAAA,IAAA,OAAA,CAAMP,UAAWC,EAAOa,MAAMX,SAAEV,OAItDK,GACCS,EAAAW,IAACC,UAAO,CAACC,MAAM,gBAAejB,SAC5BI,EAAAW,IAAA,OAAA,CAAAf,SACEI,MAACC,aAAU,CACTC,KAAK,KACLC,KAAK,WACLC,QAASb,EACTc,OAAO,uBAAsBT,SAE7BI,MAACc,eAAY,CAACZ,KAAM,cAO9BV,EAAAK,KAAA,MAAA,CAAKJ,UAAWC,EAAOqB,gBAAgBnB,SACpCd,CAAAA,EACDkB,EAAAW,IAACK,cAAW,CAACC,MAAO7B,EAAWiB,OAAO,2BAI9C"}
1
+ {"version":3,"file":"CommentCardReactions.js","sources":["../../../../src/components/CommentCard/CommentCardReactions.tsx"],"sourcesContent":["import { FC, ReactNode } from 'react';\nimport classNames from 'classnames';\n\nimport { ButtonIcon } from '../../componentsV2/ButtonIcon';\nimport { Tooltip } from '../../componentsV2/Tooltip';\nimport { MessageIcon, ShareTwoIcon, ThumbsUpIcon } from '../../icons';\n\nimport { CommentMenuItem } from './CommentCard.types';\nimport { CommentMenu } from './CommentMenu';\n\nimport styles from './CommentCard.scss';\n\ntype CommentCardReactionsProps = {\n info?: ReactNode;\n commentsCount?: number;\n likesCount?: number;\n isLiked?: boolean;\n menuItems?: CommentMenuItem[];\n onLike?: () => void;\n onReplyToggle?: () => void;\n onForward?: () => void;\n};\n\nexport const CommentCardReactions: FC<CommentCardReactionsProps> = ({\n info,\n commentsCount = 0,\n likesCount = 0,\n isLiked,\n menuItems,\n onLike,\n onReplyToggle,\n onForward,\n}) => {\n return (\n <div className={styles.actionsRow}>\n <div className={styles.actions}>\n {onReplyToggle && (\n <div className={styles.action}>\n <ButtonIcon\n size=\"xs\"\n type=\"tertiary\"\n onClick={onReplyToggle}\n testId=\"comment-card-reply\"\n >\n <MessageIcon size={16} />\n </ButtonIcon>\n {commentsCount > 0 && <span className={styles.count}>{commentsCount}</span>}\n </div>\n )}\n\n {onLike && (\n <div className={styles.action}>\n <ButtonIcon\n size=\"xs\"\n type=\"tertiary\"\n onClick={onLike}\n className={classNames(isLiked && styles.liked)}\n testId=\"comment-card-like\"\n >\n <ThumbsUpIcon size={16} />\n </ButtonIcon>\n {likesCount > 0 && <span className={styles.count}>{likesCount}</span>}\n </div>\n )}\n\n {onForward && (\n <Tooltip title=\"Share to Team Chat\">\n <span>\n <ButtonIcon\n size=\"xs\"\n type=\"tertiary\"\n onClick={onForward}\n testId=\"comment-card-forward\"\n >\n <ShareTwoIcon size={16} />\n </ButtonIcon>\n </span>\n </Tooltip>\n )}\n </div>\n\n <div className={styles.trailingActions}>\n {info}\n <CommentMenu items={menuItems} testId=\"comment-card-menu\" />\n </div>\n </div>\n );\n};\n"],"names":["_ref","info","_ref$commentsCount","commentsCount","_ref$likesCount","likesCount","isLiked","menuItems","onLike","onReplyToggle","onForward","_jsxs","className","styles","actionsRow","children","jsxs","actions","action","_jsx","ButtonIcon","size","type","onClick","testId","MessageIcon","count","classNames","liked","ThumbsUpIcon","jsx","Tooltip","title","ShareTwoIcon","trailingActions","CommentMenu","items"],"mappings":"gvIAuBmE,SAS7DA,GAAA,IARJC,IAAAA,KAAIC,EAAAF,EACJG,cAAAA,aAAgB,EAACD,EAAAE,EAAAJ,EACjBK,WAAAA,aAAa,EAACD,EACdE,IAAAA,QACAC,IAAAA,UACAC,IAAAA,OACAC,IAAAA,cACAC,IAAAA,UAEA,OACEC,EAAAA,KAAA,MAAA,CAAKC,UAAWC,EAAOC,WAAWC,SAChC,CAAAJ,EAAAK,KAAA,MAAA,CAAKJ,UAAWC,EAAOI,QAAQF,SAAA,CAC5BN,GACCE,EAAAK,KAAA,MAAA,CAAKJ,UAAWC,EAAOK,OAAOH,SAAA,CAC5BI,MAACC,aAAU,CACTC,KAAK,KACLC,KAAK,WACLC,QAASd,EACTe,OAAO,qBAAoBT,SAE3BI,MAACM,cAAW,CAACJ,KAAM,OAEpBlB,EAAgB,GAAKgB,EAAAA,IAAA,OAAA,CAAMP,UAAWC,EAAOa,MAAMX,SAAEZ,OAIzDK,GACCG,EAAAK,KAAA,MAAA,CAAKJ,UAAWC,EAAOK,OAAOH,SAAA,CAC5BI,MAACC,aAAU,CACTC,KAAK,KACLC,KAAK,WACLC,QAASf,EACTI,UAAWe,EAAU,QAACrB,GAAWO,EAAOe,OACxCJ,OAAO,oBAAmBT,SAE1BI,MAACU,eAAY,CAACR,KAAM,OAErBhB,EAAa,GAAKc,EAAAA,IAAA,OAAA,CAAMP,UAAWC,EAAOa,MAAMX,SAAEV,OAItDK,GACCS,EAAAW,IAACC,UAAO,CAACC,MAAM,qBAAoBjB,SACjCI,EAAAW,IAAA,OAAA,CAAAf,SACEI,MAACC,aAAU,CACTC,KAAK,KACLC,KAAK,WACLC,QAASb,EACTc,OAAO,uBAAsBT,SAE7BI,MAACc,eAAY,CAACZ,KAAM,cAO9BV,EAAAK,KAAA,MAAA,CAAKJ,UAAWC,EAAOqB,gBAAgBnB,SACpCd,CAAAA,EACDkB,EAAAW,IAACK,cAAW,CAACC,MAAO7B,EAAWiB,OAAO,2BAI9C"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/slicedToArray"),n=require("react"),t=require("@material-ui/icons/MoreVert"),r=require("../../componentsV2/ButtonIcon/ButtonIcon.js"),u=require("../../componentsV2/Menu/Menu.js"),i=require("react/jsx-runtime");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=o(e),c=o(t);exports.CommentMenu=function(e){var t=e.items,o=e.testId,s=n.useState(!1),a=l.default(s,2),d=a[0],f=a[1],m=n.useRef(null);return null!=t&&t.length?i.jsxs(i.Fragment,{children:[i.jsx(r.ButtonIcon,{size:"xs",type:"tertiary",ref:m,onClick:function(){return f((function(e){return!e}))},testId:o,children:i.jsx(c.default,{fontSize:"inherit"})}),i.jsx(u.Menu,{open:d,placement:"bottom-end",anchorEl:m.current,onClose:function(){return f(!1)},children:t.map((function(e){return i.jsx(u.Menu.Item,{prefix:e.icon,disabled:e.disabled,onClick:function(){f(!1),e.onClick()},children:e.label},e.label)}))})]}):null};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/slicedToArray"),n=require("react"),t=require("@material-ui/icons/MoreVert"),r=require("../../componentsV2/ButtonIcon/ButtonIcon.js"),u=require("../../componentsV2/Menu/Menu.js"),i=require("react/jsx-runtime");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=o(e),c=o(t);exports.CommentMenu=function(e){var t=e.items,o=e.testId,s=n.useState(!1),a=l.default(s,2),d=a[0],f=a[1],m=n.useRef(null);return null!=t&&t.length?i.jsxs(i.Fragment,{children:[i.jsx(r.ButtonIcon,{size:"xs",type:"tertiary",ref:m,isActive:d,onClick:function(){return f((function(e){return!e}))},testId:o,children:i.jsx(c.default,{fontSize:"inherit"})}),i.jsx(u.Menu,{open:d,placement:"bottom-end",anchorEl:m.current,onClose:function(){return f(!1)},children:t.map((function(e){return i.jsx(u.Menu.Item,{prefix:e.icon,disabled:e.disabled,onClick:function(){f(!1),e.onClick()},children:e.label},e.label)}))})]}):null};
2
2
  //# sourceMappingURL=CommentMenu.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CommentMenu.js","sources":["../../../../src/components/CommentCard/CommentMenu.tsx"],"sourcesContent":["import { FC, useRef, useState } from 'react';\nimport MoreVertIcon from '@material-ui/icons/MoreVert';\n\nimport { ButtonIcon } from '../../componentsV2/ButtonIcon';\nimport { Menu } from '../../componentsV2/Menu';\n\nimport { CommentMenuItem } from './CommentCard.types';\n\ntype CommentMenuProps = {\n items?: CommentMenuItem[];\n testId?: string;\n};\n\nexport const CommentMenu: FC<CommentMenuProps> = ({ items, testId }) => {\n const [isOpen, setIsOpen] = useState(false);\n const anchorRef = useRef<HTMLButtonElement>(null);\n\n if (!items?.length) return null;\n\n return (\n <>\n <ButtonIcon\n size=\"xs\"\n type=\"tertiary\"\n ref={anchorRef}\n onClick={() => setIsOpen(open => !open)}\n testId={testId}\n >\n <MoreVertIcon fontSize=\"inherit\" />\n </ButtonIcon>\n <Menu\n open={isOpen}\n placement=\"bottom-end\"\n anchorEl={anchorRef.current}\n onClose={() => setIsOpen(false)}\n >\n {items.map(item => (\n <Menu.Item\n key={item.label}\n prefix={item.icon}\n disabled={item.disabled}\n onClick={() => {\n setIsOpen(false);\n item.onClick();\n }}\n >\n {item.label}\n </Menu.Item>\n ))}\n </Menu>\n </>\n );\n};\n"],"names":["_ref","items","testId","useState","_useState2","_slicedToArray","_useState","isOpen","setIsOpen","anchorRef","useRef","length","_jsxs","_Fragment","children","_jsx","ButtonIcon","size","type","ref","onClick","open","MoreVertIcon","fontSize","Menu","placement","anchorEl","current","onClose","map","item","jsx","Item","prefix","icon","disabled","label"],"mappings":"yaAaiD,SAAuBA,GAAA,IAApBC,IAAAA,MAAOC,IAAAA,OAC7BC,EAAAA,EAAQA,UAAC,GAAMC,EAAAC,EAAAA,QAAAC,EAAA,GAApCC,EAAMH,EAAA,GAAEI,EAASJ,EAAA,GAClBK,EAAYC,SAA0B,MAE5C,OAAKT,SAAAA,EAAOU,OAGVC,EAAAA,KAAAC,EAAAA,SAAA,CAAAC,SAAA,CACEC,MAACC,aAAU,CACTC,KAAK,KACLC,KAAK,WACLC,IAAKV,EACLW,QAAS,WAAA,OAAMZ,GAAU,SAAAa,GAAI,OAAKA,IAAM,EACxCnB,OAAQA,EAAOY,SAEfC,MAACO,UAAY,CAACC,SAAS,cAEzBR,MAACS,OAAI,CACHH,KAAMd,EACNkB,UAAU,aACVC,SAAUjB,EAAUkB,QACpBC,QAAS,WAAA,OAAMpB,GAAU,EAAO,EAAAM,SAE/Bb,EAAM4B,KAAI,SAAAC,GAAI,OACbf,EAAAgB,IAACP,EAAIA,KAACQ,KAAI,CAERC,OAAQH,EAAKI,KACbC,SAAUL,EAAKK,SACff,QAAS,WACPZ,GAAU,GACVsB,EAAKV,SACL,EAAAN,SAEDgB,EAAKM,OARDN,EAAKM,eArBO,IAmC7B"}
1
+ {"version":3,"file":"CommentMenu.js","sources":["../../../../src/components/CommentCard/CommentMenu.tsx"],"sourcesContent":["import { FC, useRef, useState } from 'react';\nimport MoreVertIcon from '@material-ui/icons/MoreVert';\n\nimport { ButtonIcon } from '../../componentsV2/ButtonIcon';\nimport { Menu } from '../../componentsV2/Menu';\n\nimport { CommentMenuItem } from './CommentCard.types';\n\ntype CommentMenuProps = {\n items?: CommentMenuItem[];\n testId?: string;\n};\n\nexport const CommentMenu: FC<CommentMenuProps> = ({ items, testId }) => {\n const [isOpen, setIsOpen] = useState(false);\n const anchorRef = useRef<HTMLButtonElement>(null);\n\n if (!items?.length) return null;\n\n return (\n <>\n <ButtonIcon\n size=\"xs\"\n type=\"tertiary\"\n ref={anchorRef}\n isActive={isOpen}\n onClick={() => setIsOpen(open => !open)}\n testId={testId}\n >\n <MoreVertIcon fontSize=\"inherit\" />\n </ButtonIcon>\n <Menu\n open={isOpen}\n placement=\"bottom-end\"\n anchorEl={anchorRef.current}\n onClose={() => setIsOpen(false)}\n >\n {items.map(item => (\n <Menu.Item\n key={item.label}\n prefix={item.icon}\n disabled={item.disabled}\n onClick={() => {\n setIsOpen(false);\n item.onClick();\n }}\n >\n {item.label}\n </Menu.Item>\n ))}\n </Menu>\n </>\n );\n};\n"],"names":["_ref","items","testId","useState","_useState2","_slicedToArray","_useState","isOpen","setIsOpen","anchorRef","useRef","length","_jsxs","_Fragment","children","_jsx","ButtonIcon","size","type","ref","isActive","onClick","open","MoreVertIcon","fontSize","Menu","placement","anchorEl","current","onClose","map","item","jsx","Item","prefix","icon","disabled","label"],"mappings":"yaAaiD,SAAuBA,GAAA,IAApBC,IAAAA,MAAOC,IAAAA,OAC7BC,EAAAA,EAAQA,UAAC,GAAMC,EAAAC,EAAAA,QAAAC,EAAA,GAApCC,EAAMH,EAAA,GAAEI,EAASJ,EAAA,GAClBK,EAAYC,SAA0B,MAE5C,OAAKT,SAAAA,EAAOU,OAGVC,EAAAA,KAAAC,EAAAA,SAAA,CAAAC,SAAA,CACEC,MAACC,aAAU,CACTC,KAAK,KACLC,KAAK,WACLC,IAAKV,EACLW,SAAUb,EACVc,QAAS,WAAA,OAAMb,GAAU,SAAAc,GAAI,OAAKA,IAAM,EACxCpB,OAAQA,EAAOY,SAEfC,MAACQ,UAAY,CAACC,SAAS,cAEzBT,MAACU,OAAI,CACHH,KAAMf,EACNmB,UAAU,aACVC,SAAUlB,EAAUmB,QACpBC,QAAS,WAAA,OAAMrB,GAAU,EAAO,EAAAM,SAE/Bb,EAAM6B,KAAI,SAAAC,GAAI,OACbhB,EAAAiB,IAACP,EAAIA,KAACQ,KAAI,CAERC,OAAQH,EAAKI,KACbC,SAAUL,EAAKK,SACff,QAAS,WACPb,GAAU,GACVuB,EAAKV,SACL,EAAAP,SAEDiB,EAAKM,OARDN,EAAKM,eAtBO,IAoC7B"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),s=require("react"),o=require("@material-ui/core"),n=require("@material-ui/icons/AlternateEmail"),i=require("../../componentsV2/ButtonIcon/ButtonIcon.js"),c=require("../../componentsV2/Tooltip/Tooltip.js"),r=require("../../icons/iconParkIcons.js");require("../../icons/customIcons/icons/AddMessage.js"),require("../../icons/customIcons/icons/DragOne.js"),require("../../icons/customIcons/icons/Attention.js"),require("../../icons/customIcons/icons/Collapse.js"),require("../../icons/customIcons/icons/Dashboard.js"),require("../../icons/customIcons/icons/Expand.js"),require("../../icons/customIcons/icons/FolderClosed.js"),require("../../icons/customIcons/icons/FolderClosedFilled.js"),require("../../icons/customIcons/icons/FolderOpened.js"),require("../../icons/customIcons/icons/GreaterOrEqual.js"),require("../../icons/customIcons/icons/LessOrEqual.js"),require("../../icons/customIcons/icons/Search.js"),require("../../icons/customIcons/icons/SearchOne.js"),require("../../icons/customIcons/icons/Wellhub.js"),require("../../icons/customIcons/icons/MultiRuler.js"),require("../../icons/customIcons/icons/Checkbox.js"),require("../../icons/customIcons/icons/CheckboxChecked.js"),require("../../icons/customIcons/icons/CheckboxIndeterminate.js"),require("../../icons/customIcons/icons/Radio.js"),require("../../icons/customIcons/icons/RadioChecked.js"),require("../../icons/customIcons/icons/SimulFrac.js"),require("../../icons/customIcons/icons/ZipperFrac.js"),require("../../icons/customIcons/icons/CautionFilled.js"),require("../../icons/customIcons/icons/MoreApp.js"),require("../../icons/customIcons/icons/Pad.js"),require("../../icons/customIcons/icons/DrilloutUnit.js"),require("../../icons/customIcons/icons/FracFleet.js"),require("../../icons/customIcons/icons/Global.js"),require("../../icons/customIcons/icons/Program.js"),require("../../icons/customIcons/icons/Rig.js"),require("../../icons/customIcons/icons/Well.js"),require("../../icons/customIcons/icons/Gap.js"),require("../../icons/customIcons/icons/Pin.js"),require("../../icons/customIcons/icons/CloseOneFilled.js"),require("../../icons/customIcons/icons/AttentionFilled.js"),require("../../icons/customIcons/icons/CheckOneFilled.js"),require("../../icons/customIcons/icons/Archive.js"),require("../../icons/customIcons/icons/ArchiveCancel.js"),require("../../icons/customIcons/icons/Unarchive.js"),require("../../icons/customIcons/icons/Archived.js"),require("../../icons/customIcons/icons/InterventionUnit.js"),require("../../icons/customIcons/icons/CloudDelete.js"),require("../../icons/customIcons/icons/Lasso.js"),require("../../icons/customIcons/icons/Radius.js"),require("../../icons/customIcons/icons/ErrorOps.js"),require("../../icons/customIcons/icons/DataTypeOps.js"),require("../../icons/customIcons/icons/FalsePositiveOps.js"),require("../../icons/customIcons/icons/CalibrationOps.js"),require("../../icons/customIcons/icons/CriticalOps.js"),require("../../icons/customIcons/icons/Company.js"),require("../../icons/customIcons/icons/ArchiveOne.js"),require("../../icons/customIcons/icons/ParseBotFusion.js"),require("../../icons/customIcons/icons/Connect.js"),require("../../icons/customIcons/icons/PuzzleOne.js"),require("../../icons/customIcons/icons/Feed.js"),require("../../icons/customIcons/icons/Prompt.js"),require("../../icons/customIcons/icons/Companies.js"),require("../../icons/customIcons/icons/ClipboardAi.js"),require("../../icons/customIcons/icons/Key.js"),require("../../icons/customIcons/icons/AtSignCrossed.js"),require("../../icons/customIcons/icons/MappingManual.js"),require("../../icons/customIcons/icons/Mapping.js"),require("../../icons/customIcons/icons/Metrics.js"),require("../../icons/customIcons/icons/Drops.js"),require("../../icons/customIcons/icons/ClipboardSearch.js"),require("../../icons/customIcons/icons/Template.js"),require("../../icons/customIcons/icons/ClipboardMetrics.js"),require("../../icons/customIcons/icons/ClipboardBuilder.js"),require("../../icons/customIcons/icons/UnitConversion.js"),require("../../icons/customIcons/icons/NPT.js"),require("../../icons/customIcons/icons/GuidedFrac.js");var t=require("../Avatar/index.js"),u=require("../AttachFileButton/AttachFileButton.js"),a=require("../CommentInputNext/CommentInputNext.js"),l=require("../EmojiIconButton.js"),m=require("../FailedFileUploading.js"),j=require("../UserMention/index.js"),d=require("../UserMention/utils/index.js"),p=require("./useAttachmentUpload.js"),q=require("./CommentMetaLine.js"),I=require("./ShareToChatRow.js"),h=require("./CommentComposer.scss.js"),b=require("react/jsx-runtime");function g(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=g(e),v=g(n);function C(e,s){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);s&&(n=n.filter((function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable}))),o.push.apply(o,n)}return o}function y(e){for(var s=1;s<arguments.length;s++){var o=null!=arguments[s]?arguments[s]:{};s%2?C(Object(o),!0).forEach((function(s){f.default(e,s,o[s])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):C(Object(o)).forEach((function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(o,s))}))}return e}var x={fontSize:14,lineHeight:"20px",suggestions:{backgroundColor:"var(--palette-background-b-9)",list:{backgroundColor:"var(--palette-background-b-9)"},item:{color:"var(--palette-primary-text-1)","&focused":{backgroundColor:"rgb(from var(--palette-primary-text-1) r g b / 0.08)"}}}},F=function(e){return b.jsxs("div",{className:h.suggestion,children:[b.jsx(t.AvatarComponent,{size:26,alt:e.display,imgSrc:e.photo,displayName:e.display}),b.jsx("span",{children:e.display})]})};exports.CommentComposer=function(e){var n=e.body,t=e.onBodyChange,g=e.onSubmit,f=e.canSubmit,C=e.currentUser,O=e.attachments,A=e.onAttachmentsChange,S=e.maxAttachments,P=void 0===S?p.DEFAULT_MAX_ATTACHMENTS:S,E=e.attachment,M=e.onAttachmentChange,k=e.attachmentError,D=e.onAttachmentError,w=e.maxAttachmentSizeBytes,R=e.disabled,U=e.autoFocus,T=e.placeholder,B=void 0===T?"Add a comment...":T,L=e.metaRows,N=e.isMetaSingleLine,z=e.shareToChat,G=e.trailing,_=e.embedded,H=e.className,K=e.testId,W=!!A,V=s.useMemo((function(){return W?null!=O?O:[]:[E].filter(Boolean)}),[W,O,E]),Q=s.useCallback((function(e){var s;A?A(e):null==M||M(null!==(s=e[0])&&void 0!==s?s:null)}),[A,M]),X=p.useAttachmentUpload({value:V,onChange:Q,onError:D,maxSizeBytes:w,maxFiles:W?P:1}),Z=f&&!X.isUploading,$=s.useRef(null);return b.jsx(a.CommentInput,{value:n,canSubmit:Z,disabled:R,onSubmit:g,trailing:G,embedded:_,className:H,testId:K,field:b.jsx(o.Input,{inputComponent:j,inputProps:{onChange:t,currentUser:C,allowEmptyQuery:!0,suggestionsPortalHost:document.querySelector("body"),withLightTheme:!1,mentionProps:{renderSuggestion:F},style:x},value:n,placeholder:B,inputRef:$,className:h.mentionField,onKeyDown:function(e){"Enter"!==e.key||e.shiftKey||Z&&!R&&(d.isSuggestionsListOpened()||(e.preventDefault(),g()))},disableUnderline:!0,rows:1,fullWidth:!0,multiline:!0,autoFocus:U}),attachments:X.items,onAttachmentRemove:X.removeAttachment,onAttachmentRetry:X.handleRetry,onAttachmentReorder:W?X.reorderAttachments:void 0,onFilesDrop:X.addFiles,dropLabel:1===X.maxFiles?"Drop a file here":"Drop files here",attachmentSlot:k?b.jsx(m,{errorMessage:k}):void 0,toolbar:b.jsxs(b.Fragment,{children:[b.jsx(u.AttachFileButton,{inputRef:X.fileInputRef,onClick:X.openFileDialog,onFileSelect:X.handleFileSelect,multiple:W,disabled:X.isFull,tooltip:X.isFull?"Up to ".concat(X.maxFiles," ").concat(1===X.maxFiles?"file":"files"," can be attached"):"Attach file"}),b.jsx(c.Tooltip,{title:"Mention someone",children:b.jsx(i.ButtonIcon,{size:"xs",type:"tertiary",onClick:function(){var e,s=$.current;if(s){s.focus();var o=!!s.value&&!/\s$/.test(s.value),n="".concat(s.value).concat(o?" @":"@"),i=null===(e=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(s),"value"))||void 0===e?void 0:e.set;null==i||i.call(s,n),s.setSelectionRange(n.length,n.length),s.dispatchEvent(new Event("input",{bubbles:!0})),s.dispatchEvent(new Event("keyup",{bubbles:!0}))}},children:b.jsx(v.default,{fontSize:"inherit"})})}),b.jsx("span",{className:h.iconSlot,children:b.jsx(l,{icon:b.jsx(r.SmilingFaceIcon,{size:16}),handleSelectEmoji:function(e){return t("".concat(n).concat(e.native))}})})]}),footer:(!(null==L||!L.length)||!!z)&&b.jsxs(b.Fragment,{children:[b.jsx(q.CommentMetaLine,{rows:null!=L?L:[],singleLine:N}),z&&b.jsx(I.ShareToChatRow,y({},z))]})})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),s=require("react"),o=require("@material-ui/core"),n=require("@material-ui/icons/AlternateEmail"),i=require("../../componentsV2/ButtonIcon/ButtonIcon.js"),c=require("../../componentsV2/Tooltip/Tooltip.js"),r=require("../../icons/iconParkIcons.js");require("../../icons/customIcons/icons/AddMessage.js"),require("../../icons/customIcons/icons/DragOne.js"),require("../../icons/customIcons/icons/Attention.js"),require("../../icons/customIcons/icons/Collapse.js"),require("../../icons/customIcons/icons/Dashboard.js"),require("../../icons/customIcons/icons/Expand.js"),require("../../icons/customIcons/icons/FolderClosed.js"),require("../../icons/customIcons/icons/FolderClosedFilled.js"),require("../../icons/customIcons/icons/FolderOpened.js"),require("../../icons/customIcons/icons/GreaterOrEqual.js"),require("../../icons/customIcons/icons/LessOrEqual.js"),require("../../icons/customIcons/icons/Search.js"),require("../../icons/customIcons/icons/SearchOne.js"),require("../../icons/customIcons/icons/Wellhub.js"),require("../../icons/customIcons/icons/MultiRuler.js"),require("../../icons/customIcons/icons/Checkbox.js"),require("../../icons/customIcons/icons/CheckboxChecked.js"),require("../../icons/customIcons/icons/CheckboxIndeterminate.js"),require("../../icons/customIcons/icons/Radio.js"),require("../../icons/customIcons/icons/RadioChecked.js"),require("../../icons/customIcons/icons/SimulFrac.js"),require("../../icons/customIcons/icons/ZipperFrac.js"),require("../../icons/customIcons/icons/CautionFilled.js"),require("../../icons/customIcons/icons/MoreApp.js"),require("../../icons/customIcons/icons/Pad.js"),require("../../icons/customIcons/icons/DrilloutUnit.js"),require("../../icons/customIcons/icons/FracFleet.js"),require("../../icons/customIcons/icons/Global.js"),require("../../icons/customIcons/icons/Program.js"),require("../../icons/customIcons/icons/Rig.js"),require("../../icons/customIcons/icons/Well.js"),require("../../icons/customIcons/icons/Gap.js"),require("../../icons/customIcons/icons/Pin.js"),require("../../icons/customIcons/icons/CloseOneFilled.js"),require("../../icons/customIcons/icons/AttentionFilled.js"),require("../../icons/customIcons/icons/CheckOneFilled.js"),require("../../icons/customIcons/icons/Archive.js"),require("../../icons/customIcons/icons/ArchiveCancel.js"),require("../../icons/customIcons/icons/Unarchive.js"),require("../../icons/customIcons/icons/Archived.js"),require("../../icons/customIcons/icons/InterventionUnit.js"),require("../../icons/customIcons/icons/CloudDelete.js"),require("../../icons/customIcons/icons/Lasso.js"),require("../../icons/customIcons/icons/Radius.js"),require("../../icons/customIcons/icons/ErrorOps.js"),require("../../icons/customIcons/icons/DataTypeOps.js"),require("../../icons/customIcons/icons/FalsePositiveOps.js"),require("../../icons/customIcons/icons/CalibrationOps.js"),require("../../icons/customIcons/icons/CriticalOps.js"),require("../../icons/customIcons/icons/Company.js"),require("../../icons/customIcons/icons/ArchiveOne.js"),require("../../icons/customIcons/icons/ParseBotFusion.js"),require("../../icons/customIcons/icons/Connect.js"),require("../../icons/customIcons/icons/PuzzleOne.js"),require("../../icons/customIcons/icons/Feed.js"),require("../../icons/customIcons/icons/Prompt.js"),require("../../icons/customIcons/icons/Companies.js"),require("../../icons/customIcons/icons/ClipboardAi.js"),require("../../icons/customIcons/icons/Key.js"),require("../../icons/customIcons/icons/AtSignCrossed.js"),require("../../icons/customIcons/icons/MappingManual.js"),require("../../icons/customIcons/icons/Mapping.js"),require("../../icons/customIcons/icons/Metrics.js"),require("../../icons/customIcons/icons/Drops.js"),require("../../icons/customIcons/icons/ClipboardSearch.js"),require("../../icons/customIcons/icons/Template.js"),require("../../icons/customIcons/icons/ClipboardMetrics.js"),require("../../icons/customIcons/icons/ClipboardBuilder.js"),require("../../icons/customIcons/icons/UnitConversion.js"),require("../../icons/customIcons/icons/NPT.js"),require("../../icons/customIcons/icons/GuidedFrac.js");var t=require("../Avatar/index.js"),u=require("../AttachFileButton/AttachFileButton.js"),a=require("../CommentInputNext/CommentInputNext.js"),l=require("../EmojiIconButton.js"),m=require("../FailedFileUploading.js"),j=require("../UserMention/index.js"),d=require("../UserMention/utils/index.js"),p=require("./useAttachmentUpload.js"),q=require("./CommentMetaLine.js"),I=require("./ShareToChatRow.js"),h=require("./CommentComposer.scss.js"),b=require("react/jsx-runtime");function g(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=g(e),v=g(n);function C(e,s){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);s&&(n=n.filter((function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable}))),o.push.apply(o,n)}return o}function y(e){for(var s=1;s<arguments.length;s++){var o=null!=arguments[s]?arguments[s]:{};s%2?C(Object(o),!0).forEach((function(s){f.default(e,s,o[s])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):C(Object(o)).forEach((function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(o,s))}))}return e}var x={fontSize:14,lineHeight:"20px",suggestions:{backgroundColor:"var(--palette-background-b-9)",list:{backgroundColor:"var(--palette-background-b-9)"},item:{color:"var(--palette-primary-text-1)","&focused":{backgroundColor:"rgb(from var(--palette-primary-text-1) r g b / 0.08)"}}}},F=function(e){return b.jsxs("div",{className:h.suggestion,children:[b.jsx(t.AvatarComponent,{size:26,alt:e.display,imgSrc:e.photo,displayName:e.display}),b.jsx("span",{children:e.display})]})};exports.CommentComposer=function(e){var n=e.body,t=e.onBodyChange,g=e.onSubmit,f=e.canSubmit,C=e.currentUser,O=e.attachments,A=e.onAttachmentsChange,S=e.maxAttachments,P=void 0===S?p.DEFAULT_MAX_ATTACHMENTS:S,k=e.attachment,E=e.onAttachmentChange,M=e.attachmentError,D=e.onAttachmentError,w=e.maxAttachmentSizeBytes,R=e.disabled,U=e.autoFocus,T=e.placeholder,B=void 0===T?"Add a comment...":T,L=e.metaRows,N=e.isMetaSingleLine,z=e.shareToChat,G=e.trailing,_=e.embedded,H=e.className,K=e.testId,W=!!A,V=s.useMemo((function(){return W?null!=O?O:[]:[k].filter(Boolean)}),[W,O,k]),Q=s.useCallback((function(e){var s;A?A(e):null==E||E(null!==(s=e[0])&&void 0!==s?s:null)}),[A,E]),X=p.useAttachmentUpload({value:V,onChange:Q,onError:D,maxSizeBytes:w,maxFiles:W?P:1}),Z=f&&!X.isUploading,$=s.useRef(null);return b.jsx(a.CommentInput,{value:n,canSubmit:Z,disabled:R,onSubmit:g,trailing:G,embedded:_,className:H,testId:K,field:b.jsx(o.Input,{inputComponent:j,inputProps:{onChange:t,currentUser:C,allowEmptyQuery:!0,suggestionsPortalHost:document.querySelector("body"),withLightTheme:!1,mentionProps:{renderSuggestion:F},highlightLinks:!0,style:x},value:n,placeholder:B,inputRef:$,className:h.mentionField,onKeyDown:function(e){"Enter"!==e.key||e.shiftKey||Z&&!R&&(d.isSuggestionsListOpened()||(e.preventDefault(),g()))},disableUnderline:!0,rows:1,fullWidth:!0,multiline:!0,autoFocus:U}),attachments:X.items,onAttachmentRemove:X.removeAttachment,onAttachmentRetry:X.handleRetry,onAttachmentReorder:W?X.reorderAttachments:void 0,onFilesDrop:X.addFiles,onImageLinkPaste:X.addLinkedImage,dropLabel:1===X.maxFiles?"Drop a file here":"Drop files here",attachmentSlot:M?b.jsx(m,{errorMessage:M}):void 0,toolbar:b.jsxs(b.Fragment,{children:[b.jsx(u.AttachFileButton,{inputRef:X.fileInputRef,onClick:X.openFileDialog,onFileSelect:X.handleFileSelect,multiple:W,disabled:X.isFull,tooltip:X.isFull?"Up to ".concat(X.maxFiles," ").concat(1===X.maxFiles?"file":"files"," can be attached"):"Attach file"}),b.jsx(c.Tooltip,{title:"Mention someone",children:b.jsx(i.ButtonIcon,{size:"xs",type:"tertiary",onClick:function(){var e,s=$.current;if(s){s.focus();var o=!!s.value&&!/\s$/.test(s.value),n="".concat(s.value).concat(o?" @":"@"),i=null===(e=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(s),"value"))||void 0===e?void 0:e.set;null==i||i.call(s,n),s.setSelectionRange(n.length,n.length),s.dispatchEvent(new Event("input",{bubbles:!0})),s.dispatchEvent(new Event("keyup",{bubbles:!0}))}},children:b.jsx(v.default,{fontSize:"inherit"})})}),b.jsx("span",{className:h.iconSlot,children:b.jsx(l,{icon:b.jsx(r.SmilingFaceIcon,{size:16}),handleSelectEmoji:function(e){return t("".concat(n).concat(e.native))}})})]}),footer:(!(null==L||!L.length)||!!z)&&b.jsxs(b.Fragment,{children:[b.jsx(q.CommentMetaLine,{rows:null!=L?L:[],singleLine:N}),z&&b.jsx(I.ShareToChatRow,y({},z))]})})};
2
2
  //# sourceMappingURL=CommentComposer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CommentComposer.js","sources":["../../../../src/components/CommentComposer/CommentComposer.tsx"],"sourcesContent":["import {\n CSSProperties,\n FormEventHandler,\n KeyboardEvent,\n ReactNode,\n useCallback,\n useMemo,\n useRef,\n} from 'react';\nimport { Input } from '@material-ui/core';\nimport AlternateEmailIcon from '@material-ui/icons/AlternateEmail';\n\nimport { ButtonIcon } from '../../componentsV2/ButtonIcon';\nimport { Tooltip } from '../../componentsV2/Tooltip';\nimport { SmilingFaceIcon } from '../../icons';\nimport Avatar from '../Avatar';\nimport { AttachFileButton } from '../AttachFileButton';\nimport { CommentInput } from '../CommentInputNext/CommentInputNext';\nimport EmojiIconButton from '../EmojiIconButton';\nimport FailedFileUploading from '../FailedFileUploading';\nimport UserMention from '../UserMention';\nimport { isSuggestionsListOpened } from '../UserMention/utils';\n\nimport {\n useAttachmentUpload,\n UploadedAttachment,\n DEFAULT_MAX_ATTACHMENTS,\n} from './useAttachmentUpload';\nimport { CommentMetaLine, CommentMetaRow } from './CommentMetaLine';\nimport { ShareToChatRow, ShareToChatRowProps } from './ShareToChatRow';\n\nimport styles from './CommentComposer.scss';\n\n/* eslint-disable camelcase -- mirrors the platform's snake_case user payload. */\nexport type CommentComposerUser = {\n id?: number;\n company_id?: number;\n first_name?: string;\n last_name?: string;\n profile_photo?: string;\n [key: string]: unknown;\n};\n/* eslint-enable camelcase */\n\nexport type CommentComposerProps = {\n body: string;\n onBodyChange: (value: string) => void;\n onSubmit: () => void;\n canSubmit: boolean;\n currentUser: CommentComposerUser;\n\n attachments?: UploadedAttachment[];\n onAttachmentsChange?: (attachments: UploadedAttachment[]) => void;\n maxAttachments?: number;\n /** @deprecated Use `attachments` — kept so single-attachment callers keep working. */\n attachment?: UploadedAttachment | null;\n /** @deprecated Use `onAttachmentsChange`. */\n onAttachmentChange?: (attachment: UploadedAttachment | null) => void;\n attachmentError?: string | null;\n onAttachmentError?: (message: string | null) => void;\n maxAttachmentSizeBytes?: number;\n\n disabled?: boolean;\n autoFocus?: boolean;\n placeholder?: string;\n metaRows?: CommentMetaRow[];\n isMetaSingleLine?: boolean;\n shareToChat?: Omit<ShareToChatRowProps, 'testId'>;\n /** Replaces the default send button, e.g. the edit form's Cancel/Save. */\n trailing?: ReactNode;\n /** Render flush inside a host card instead of as its own surface. */\n embedded?: boolean;\n className?: string;\n testId?: string;\n};\n\nconst SUGGESTIONS_BACKGROUND = 'var(--palette-background-b-9)';\n\n// Module-level so react-mentions isn't re-rendered on every keystroke.\nconst MENTION_INPUT_STYLE = {\n fontSize: 14,\n lineHeight: '20px',\n suggestions: {\n backgroundColor: SUGGESTIONS_BACKGROUND,\n list: { backgroundColor: SUGGESTIONS_BACKGROUND },\n item: {\n color: 'var(--palette-primary-text-1)',\n '&focused': { backgroundColor: 'rgb(from var(--palette-primary-text-1) r g b / 0.08)' },\n },\n },\n} as unknown as CSSProperties;\n\nconst renderSuggestion = (entry: { display: string; photo?: string }) => (\n <div className={styles.suggestion}>\n <Avatar size={26} alt={entry.display} imgSrc={entry.photo} displayName={entry.display} />\n <span>{entry.display}</span>\n </div>\n);\n\nexport const CommentComposer = ({\n body,\n onBodyChange,\n onSubmit,\n canSubmit,\n currentUser,\n attachments,\n onAttachmentsChange,\n maxAttachments = DEFAULT_MAX_ATTACHMENTS,\n attachment,\n onAttachmentChange,\n attachmentError,\n onAttachmentError,\n maxAttachmentSizeBytes,\n disabled,\n autoFocus,\n placeholder = 'Add a comment...',\n metaRows,\n isMetaSingleLine,\n shareToChat,\n trailing,\n embedded,\n className,\n testId,\n}: CommentComposerProps) => {\n // Callers still on the singular props get the old one-file behaviour, unchanged.\n const isMulti = !!onAttachmentsChange;\n const value = useMemo(\n () => (isMulti ? attachments ?? [] : ([attachment].filter(Boolean) as UploadedAttachment[])),\n [isMulti, attachments, attachment]\n );\n\n const handleAttachmentsChange = useCallback(\n (next: UploadedAttachment[]) => {\n if (onAttachmentsChange) onAttachmentsChange(next);\n else onAttachmentChange?.(next[0] ?? null);\n },\n [onAttachmentsChange, onAttachmentChange]\n );\n\n const upload = useAttachmentUpload({\n value,\n onChange: handleAttachmentsChange,\n onError: onAttachmentError,\n maxSizeBytes: maxAttachmentSizeBytes,\n maxFiles: isMulti ? maxAttachments : 1,\n });\n\n // An attachment only lands once S3 confirms, so posting mid-upload would drop it.\n const canSend = canSubmit && !upload.isUploading;\n\n const fieldRef = useRef<HTMLTextAreaElement | null>(null);\n\n // react-mentions opens suggestions from textarea events, so type \"@\" instead of setting state.\n const mentionSomeone = () => {\n const field = fieldRef.current;\n if (!field) return;\n\n field.focus();\n\n const needsSpace = !!field.value && !/\\s$/.test(field.value);\n const nextValue = `${field.value}${needsSpace ? ' @' : '@'}`;\n const setValue = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(field), 'value')?.set;\n\n setValue?.call(field, nextValue);\n field.setSelectionRange(nextValue.length, nextValue.length);\n field.dispatchEvent(new Event('input', { bubbles: true }));\n field.dispatchEvent(new Event('keyup', { bubbles: true }));\n };\n\n const handleEnterKey = (event: KeyboardEvent) => {\n if (event.key !== 'Enter' || event.shiftKey) return;\n if (!canSend || disabled) return;\n if (isSuggestionsListOpened()) return;\n\n event.preventDefault();\n onSubmit();\n };\n\n return (\n <CommentInput\n value={body}\n canSubmit={canSend}\n disabled={disabled}\n onSubmit={onSubmit}\n trailing={trailing}\n embedded={embedded}\n className={className}\n testId={testId}\n field={\n <Input\n inputComponent={UserMention}\n inputProps={{\n // UserMention calls onChange with the text string, not a DOM event.\n onChange: onBodyChange as unknown as FormEventHandler<HTMLInputElement>,\n currentUser,\n allowEmptyQuery: true,\n suggestionsPortalHost: document.querySelector('body'),\n withLightTheme: false,\n mentionProps: { renderSuggestion },\n style: MENTION_INPUT_STYLE,\n }}\n value={body}\n placeholder={placeholder}\n inputRef={fieldRef}\n className={styles.mentionField}\n onKeyDown={handleEnterKey}\n disableUnderline\n rows={1}\n fullWidth\n multiline\n autoFocus={autoFocus}\n />\n }\n attachments={upload.items}\n onAttachmentRemove={upload.removeAttachment}\n onAttachmentRetry={upload.handleRetry}\n onAttachmentReorder={isMulti ? upload.reorderAttachments : undefined}\n onFilesDrop={upload.addFiles}\n dropLabel={upload.maxFiles === 1 ? 'Drop a file here' : 'Drop files here'}\n attachmentSlot={\n attachmentError ? <FailedFileUploading errorMessage={attachmentError} /> : undefined\n }\n toolbar={\n <>\n <AttachFileButton\n inputRef={upload.fileInputRef}\n onClick={upload.openFileDialog}\n onFileSelect={upload.handleFileSelect}\n multiple={isMulti}\n disabled={upload.isFull}\n tooltip={\n upload.isFull\n ? `Up to ${upload.maxFiles} ${\n upload.maxFiles === 1 ? 'file' : 'files'\n } can be attached`\n : 'Attach file'\n }\n />\n <Tooltip title=\"Mention someone\">\n <ButtonIcon size=\"xs\" type=\"tertiary\" onClick={mentionSomeone}>\n <AlternateEmailIcon fontSize=\"inherit\" />\n </ButtonIcon>\n </Tooltip>\n <span className={styles.iconSlot}>\n <EmojiIconButton\n icon={<SmilingFaceIcon size={16} />}\n handleSelectEmoji={(emoji: { native: string }) =>\n onBodyChange(`${body}${emoji.native}`)\n }\n />\n </span>\n </>\n }\n footer={\n (!!metaRows?.length || !!shareToChat) && (\n <>\n <CommentMetaLine rows={metaRows ?? []} singleLine={isMetaSingleLine} />\n {shareToChat && <ShareToChatRow {...shareToChat} />}\n </>\n )\n }\n />\n );\n};\n"],"names":["MENTION_INPUT_STYLE","fontSize","lineHeight","suggestions","backgroundColor","list","item","color","renderSuggestion","entry","_jsxs","className","styles","suggestion","children","_jsx","Avatar","size","alt","display","imgSrc","photo","displayName","jsx","_ref","body","onBodyChange","onSubmit","canSubmit","currentUser","attachments","onAttachmentsChange","_ref$maxAttachments","maxAttachments","DEFAULT_MAX_ATTACHMENTS","attachment","onAttachmentChange","attachmentError","onAttachmentError","maxAttachmentSizeBytes","disabled","autoFocus","_ref$placeholder","placeholder","metaRows","isMetaSingleLine","shareToChat","trailing","embedded","testId","isMulti","value","useMemo","filter","Boolean","handleAttachmentsChange","useCallback","next","_next$","upload","useAttachmentUpload","onChange","onError","maxSizeBytes","maxFiles","canSend","isUploading","fieldRef","useRef","CommentInput","field","Input","inputComponent","UserMention","inputProps","allowEmptyQuery","suggestionsPortalHost","document","querySelector","withLightTheme","mentionProps","style","inputRef","mentionField","onKeyDown","event","key","shiftKey","isSuggestionsListOpened","preventDefault","disableUnderline","rows","fullWidth","multiline","items","onAttachmentRemove","removeAttachment","onAttachmentRetry","handleRetry","onAttachmentReorder","reorderAttachments","undefined","onFilesDrop","addFiles","dropLabel","attachmentSlot","FailedFileUploading","errorMessage","toolbar","jsxs","_Fragment","AttachFileButton","fileInputRef","onClick","openFileDialog","onFileSelect","handleFileSelect","multiple","isFull","tooltip","concat","Tooltip","title","ButtonIcon","type","_Object$getOwnPropert","current","focus","needsSpace","test","nextValue","setValue","Object","getOwnPropertyDescriptor","getPrototypeOf","set","call","setSelectionRange","length","dispatchEvent","Event","bubbles","AlternateEmailIcon","iconSlot","EmojiIconButton","icon","SmilingFaceIcon","handleSelectEmoji","emoji","native","footer","CommentMetaLine","singleLine","ShareToChatRow","_objectSpread"],"mappings":"gxKA4EA,IAGMA,EAAsB,CAC1BC,SAAU,GACVC,WAAY,OACZC,YAAa,CACXC,gBAP2B,gCAQ3BC,KAAM,CAAED,gBARmB,iCAS3BE,KAAM,CACJC,MAAO,gCACP,WAAY,CAAEH,gBAAiB,2DAK/BI,EAAmB,SAACC,GAA0C,OAClEC,EAAAA,KAAA,MAAA,CAAKC,UAAWC,EAAOC,WAAWC,SAAA,CAChCC,MAACC,kBAAM,CAACC,KAAM,GAAIC,IAAKT,EAAMU,QAASC,OAAQX,EAAMY,MAAOC,YAAab,EAAMU,UAC9EJ,EAAAQ,IAAA,OAAA,CAAAT,SAAOL,EAAMU,YACT,0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AAtEA,EAAwEU,IAEzFJ,SAAAA,EAAUK,KAAKlE,EAAO4D,GACtB5D,EAAMmE,kBAAkBP,EAAUQ,OAAQR,EAAUQ,QACpDpE,EAAMqE,cAAc,IAAIC,MAAM,QAAS,CAAEC,SAAS,KAClDvE,EAAMqE,cAAc,IAAIC,MAAM,QAAS,CAAEC,SAAS,IAXtC,GAoF0D/H,SAC5DC,MAAC+H,UAAkB,CAAC7I,SAAS,gBAGjCc,EAAAQ,IAAA,OAAA,CAAMZ,UAAWC,EAAOmI,SAASjI,SAC/BC,MAACiI,EAAe,CACdC,KAAMlI,MAACmI,kBAAe,CAACjI,KAAM,KAC7BkI,kBAAmB,SAACC,GAAyB,OAC3C1H,EAAgBD,GAAAA,OAAAA,UAAO2H,EAAMC,QAAS,SAMhDC,UACK1G,UAAAA,EAAU8F,WAAY5F,IACvBpC,EAAAA,KAAAoG,EAAAA,SAAA,CAAAhG,SAAA,CACEC,MAACwI,kBAAe,CAAC5D,KAAM/C,QAAAA,EAAY,GAAI4G,WAAY3G,IAClDC,GAAe/B,MAAC0I,EAAAA,eAAcC,EAAA,CAAA,EAAK5G,QAMhD"}
1
+ {"version":3,"file":"CommentComposer.js","sources":["../../../../src/components/CommentComposer/CommentComposer.tsx"],"sourcesContent":["import {\n CSSProperties,\n FormEventHandler,\n KeyboardEvent,\n ReactNode,\n useCallback,\n useMemo,\n useRef,\n} from 'react';\nimport { Input } from '@material-ui/core';\nimport AlternateEmailIcon from '@material-ui/icons/AlternateEmail';\n\nimport { ButtonIcon } from '../../componentsV2/ButtonIcon';\nimport { Tooltip } from '../../componentsV2/Tooltip';\nimport { SmilingFaceIcon } from '../../icons';\nimport Avatar from '../Avatar';\nimport { AttachFileButton } from '../AttachFileButton';\nimport { CommentInput } from '../CommentInputNext/CommentInputNext';\nimport EmojiIconButton from '../EmojiIconButton';\nimport FailedFileUploading from '../FailedFileUploading';\nimport UserMention from '../UserMention';\nimport { isSuggestionsListOpened } from '../UserMention/utils';\n\nimport {\n useAttachmentUpload,\n UploadedAttachment,\n DEFAULT_MAX_ATTACHMENTS,\n} from './useAttachmentUpload';\nimport { CommentMetaLine, CommentMetaRow } from './CommentMetaLine';\nimport { ShareToChatRow, ShareToChatRowProps } from './ShareToChatRow';\n\nimport styles from './CommentComposer.scss';\n\n/* eslint-disable camelcase -- mirrors the platform's snake_case user payload. */\nexport type CommentComposerUser = {\n id?: number;\n company_id?: number;\n first_name?: string;\n last_name?: string;\n profile_photo?: string;\n [key: string]: unknown;\n};\n/* eslint-enable camelcase */\n\nexport type CommentComposerProps = {\n body: string;\n onBodyChange: (value: string) => void;\n onSubmit: () => void;\n canSubmit: boolean;\n currentUser: CommentComposerUser;\n\n attachments?: UploadedAttachment[];\n onAttachmentsChange?: (attachments: UploadedAttachment[]) => void;\n maxAttachments?: number;\n /** @deprecated Use `attachments` — kept so single-attachment callers keep working. */\n attachment?: UploadedAttachment | null;\n /** @deprecated Use `onAttachmentsChange`. */\n onAttachmentChange?: (attachment: UploadedAttachment | null) => void;\n attachmentError?: string | null;\n onAttachmentError?: (message: string | null) => void;\n maxAttachmentSizeBytes?: number;\n\n disabled?: boolean;\n autoFocus?: boolean;\n placeholder?: string;\n metaRows?: CommentMetaRow[];\n isMetaSingleLine?: boolean;\n shareToChat?: Omit<ShareToChatRowProps, 'testId'>;\n /** Replaces the default send button, e.g. the edit form's Cancel/Save. */\n trailing?: ReactNode;\n /** Render flush inside a host card instead of as its own surface. */\n embedded?: boolean;\n className?: string;\n testId?: string;\n};\n\nconst SUGGESTIONS_BACKGROUND = 'var(--palette-background-b-9)';\n\n// Module-level so react-mentions isn't re-rendered on every keystroke.\nconst MENTION_INPUT_STYLE = {\n fontSize: 14,\n lineHeight: '20px',\n suggestions: {\n backgroundColor: SUGGESTIONS_BACKGROUND,\n list: { backgroundColor: SUGGESTIONS_BACKGROUND },\n item: {\n color: 'var(--palette-primary-text-1)',\n '&focused': { backgroundColor: 'rgb(from var(--palette-primary-text-1) r g b / 0.08)' },\n },\n },\n} as unknown as CSSProperties;\n\nconst renderSuggestion = (entry: { display: string; photo?: string }) => (\n <div className={styles.suggestion}>\n <Avatar size={26} alt={entry.display} imgSrc={entry.photo} displayName={entry.display} />\n <span>{entry.display}</span>\n </div>\n);\n\nexport const CommentComposer = ({\n body,\n onBodyChange,\n onSubmit,\n canSubmit,\n currentUser,\n attachments,\n onAttachmentsChange,\n maxAttachments = DEFAULT_MAX_ATTACHMENTS,\n attachment,\n onAttachmentChange,\n attachmentError,\n onAttachmentError,\n maxAttachmentSizeBytes,\n disabled,\n autoFocus,\n placeholder = 'Add a comment...',\n metaRows,\n isMetaSingleLine,\n shareToChat,\n trailing,\n embedded,\n className,\n testId,\n}: CommentComposerProps) => {\n // Callers still on the singular props get the old one-file behaviour, unchanged.\n const isMulti = !!onAttachmentsChange;\n const value = useMemo(\n () => (isMulti ? attachments ?? [] : ([attachment].filter(Boolean) as UploadedAttachment[])),\n [isMulti, attachments, attachment]\n );\n\n const handleAttachmentsChange = useCallback(\n (next: UploadedAttachment[]) => {\n if (onAttachmentsChange) onAttachmentsChange(next);\n else onAttachmentChange?.(next[0] ?? null);\n },\n [onAttachmentsChange, onAttachmentChange]\n );\n\n const upload = useAttachmentUpload({\n value,\n onChange: handleAttachmentsChange,\n onError: onAttachmentError,\n maxSizeBytes: maxAttachmentSizeBytes,\n maxFiles: isMulti ? maxAttachments : 1,\n });\n\n // An attachment only lands once S3 confirms, so posting mid-upload would drop it.\n const canSend = canSubmit && !upload.isUploading;\n\n const fieldRef = useRef<HTMLTextAreaElement | null>(null);\n\n // react-mentions opens suggestions from textarea events, so type \"@\" instead of setting state.\n const mentionSomeone = () => {\n const field = fieldRef.current;\n if (!field) return;\n\n field.focus();\n\n const needsSpace = !!field.value && !/\\s$/.test(field.value);\n const nextValue = `${field.value}${needsSpace ? ' @' : '@'}`;\n const setValue = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(field), 'value')?.set;\n\n setValue?.call(field, nextValue);\n field.setSelectionRange(nextValue.length, nextValue.length);\n field.dispatchEvent(new Event('input', { bubbles: true }));\n field.dispatchEvent(new Event('keyup', { bubbles: true }));\n };\n\n const handleEnterKey = (event: KeyboardEvent) => {\n if (event.key !== 'Enter' || event.shiftKey) return;\n if (!canSend || disabled) return;\n if (isSuggestionsListOpened()) return;\n\n event.preventDefault();\n onSubmit();\n };\n\n return (\n <CommentInput\n value={body}\n canSubmit={canSend}\n disabled={disabled}\n onSubmit={onSubmit}\n trailing={trailing}\n embedded={embedded}\n className={className}\n testId={testId}\n field={\n <Input\n inputComponent={UserMention}\n inputProps={{\n // UserMention calls onChange with the text string, not a DOM event.\n onChange: onBodyChange as unknown as FormEventHandler<HTMLInputElement>,\n currentUser,\n allowEmptyQuery: true,\n suggestionsPortalHost: document.querySelector('body'),\n withLightTheme: false,\n mentionProps: { renderSuggestion },\n highlightLinks: true,\n style: MENTION_INPUT_STYLE,\n }}\n value={body}\n placeholder={placeholder}\n inputRef={fieldRef}\n className={styles.mentionField}\n onKeyDown={handleEnterKey}\n disableUnderline\n rows={1}\n fullWidth\n multiline\n autoFocus={autoFocus}\n />\n }\n attachments={upload.items}\n onAttachmentRemove={upload.removeAttachment}\n onAttachmentRetry={upload.handleRetry}\n onAttachmentReorder={isMulti ? upload.reorderAttachments : undefined}\n onFilesDrop={upload.addFiles}\n onImageLinkPaste={upload.addLinkedImage}\n dropLabel={upload.maxFiles === 1 ? 'Drop a file here' : 'Drop files here'}\n attachmentSlot={\n attachmentError ? <FailedFileUploading errorMessage={attachmentError} /> : undefined\n }\n toolbar={\n <>\n <AttachFileButton\n inputRef={upload.fileInputRef}\n onClick={upload.openFileDialog}\n onFileSelect={upload.handleFileSelect}\n multiple={isMulti}\n disabled={upload.isFull}\n tooltip={\n upload.isFull\n ? `Up to ${upload.maxFiles} ${\n upload.maxFiles === 1 ? 'file' : 'files'\n } can be attached`\n : 'Attach file'\n }\n />\n <Tooltip title=\"Mention someone\">\n <ButtonIcon size=\"xs\" type=\"tertiary\" onClick={mentionSomeone}>\n <AlternateEmailIcon fontSize=\"inherit\" />\n </ButtonIcon>\n </Tooltip>\n <span className={styles.iconSlot}>\n <EmojiIconButton\n icon={<SmilingFaceIcon size={16} />}\n handleSelectEmoji={(emoji: { native: string }) =>\n onBodyChange(`${body}${emoji.native}`)\n }\n />\n </span>\n </>\n }\n footer={\n (!!metaRows?.length || !!shareToChat) && (\n <>\n <CommentMetaLine rows={metaRows ?? []} singleLine={isMetaSingleLine} />\n {shareToChat && <ShareToChatRow {...shareToChat} />}\n </>\n )\n }\n />\n );\n};\n"],"names":["MENTION_INPUT_STYLE","fontSize","lineHeight","suggestions","backgroundColor","list","item","color","renderSuggestion","entry","_jsxs","className","styles","suggestion","children","_jsx","Avatar","size","alt","display","imgSrc","photo","displayName","jsx","_ref","body","onBodyChange","onSubmit","canSubmit","currentUser","attachments","onAttachmentsChange","_ref$maxAttachments","maxAttachments","DEFAULT_MAX_ATTACHMENTS","attachment","onAttachmentChange","attachmentError","onAttachmentError","maxAttachmentSizeBytes","disabled","autoFocus","_ref$placeholder","placeholder","metaRows","isMetaSingleLine","shareToChat","trailing","embedded","testId","isMulti","value","useMemo","filter","Boolean","handleAttachmentsChange","useCallback","next","_next$","upload","useAttachmentUpload","onChange","onError","maxSizeBytes","maxFiles","canSend","isUploading","fieldRef","useRef","CommentInput","field","Input","inputComponent","UserMention","inputProps","allowEmptyQuery","suggestionsPortalHost","document","querySelector","withLightTheme","mentionProps","highlightLinks","style","inputRef","mentionField","onKeyDown","event","key","shiftKey","isSuggestionsListOpened","preventDefault","disableUnderline","rows","fullWidth","multiline","items","onAttachmentRemove","removeAttachment","onAttachmentRetry","handleRetry","onAttachmentReorder","reorderAttachments","undefined","onFilesDrop","addFiles","onImageLinkPaste","addLinkedImage","dropLabel","attachmentSlot","FailedFileUploading","errorMessage","toolbar","jsxs","_Fragment","AttachFileButton","fileInputRef","onClick","openFileDialog","onFileSelect","handleFileSelect","multiple","isFull","tooltip","concat","Tooltip","title","ButtonIcon","type","_Object$getOwnPropert","current","focus","needsSpace","test","nextValue","setValue","Object","getOwnPropertyDescriptor","getPrototypeOf","set","call","setSelectionRange","length","dispatchEvent","Event","bubbles","AlternateEmailIcon","iconSlot","EmojiIconButton","icon","SmilingFaceIcon","handleSelectEmoji","emoji","native","footer","CommentMetaLine","singleLine","ShareToChatRow","_objectSpread"],"mappings":"gxKA4EA,IAGMA,EAAsB,CAC1BC,SAAU,GACVC,WAAY,OACZC,YAAa,CACXC,gBAP2B,gCAQ3BC,KAAM,CAAED,gBARmB,iCAS3BE,KAAM,CACJC,MAAO,gCACP,WAAY,CAAEH,gBAAiB,2DAK/BI,EAAmB,SAACC,GAA0C,OAClEC,EAAAA,KAAA,MAAA,CAAKC,UAAWC,EAAOC,WAAWC,SAAA,CAChCC,MAACC,kBAAM,CAACC,KAAM,GAAIC,IAAKT,EAAMU,QAASC,OAAQX,EAAMY,MAAOC,YAAab,EAAMU,UAC9EJ,EAAAQ,IAAA,OAAA,CAAAT,SAAOL,EAAMU,YACT,0BAGuB,SAwBHK,GAAA,IAvB1BC,IAAAA,KACAC,IAAAA,aACAC,IAAAA,SACAC,IAAAA,UACAC,IAAAA,YACAC,IAAAA,YACAC,IAAAA,oBAAmBC,EAAAR,EACnBS,eAAAA,aAAiBC,EAAuBA,wBAAAF,EACxCG,IAAAA,WACAC,IAAAA,mBACAC,IAAAA,gBACAC,IAAAA,kBACAC,IAAAA,uBACAC,IAAAA,SACAC,IAAAA,UAASC,EAAAlB,EACTmB,YAAAA,aAAc,mBAAkBD,EAChCE,IAAAA,SACAC,IAAAA,iBACAC,IAAAA,YACAC,IAAAA,SACAC,IAAAA,SACArC,IAAAA,UACAsC,IAAAA,OAGMC,IAAYnB,EACZoB,EAAQC,EAAAA,SACZ,WAAA,OAAOF,EAAUpB,QAAAA,EAAe,GAAM,CAACK,GAAYkB,OAAOC,QAAkC,GAC5F,CAACJ,EAASpB,EAAaK,IAGnBoB,EAA0BC,eAC9B,SAACC,GAA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EAAAA,SAAA,CAAAnG,SAAA,CACEC,MAAC2I,kBAAe,CAAC9D,KAAMhD,QAAAA,EAAY,GAAI+G,WAAY9G,IAClDC,GAAe/B,MAAC6I,EAAAA,eAAcC,EAAA,CAAA,EAAK/G,QAMhD"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/helpers/slicedToArray"),a=require("@babel/runtime/regenerator"),n=require("react"),r=require("../../componentsV2/Avatar/Avatar.js"),i=require("../AttachFileButton/AttachFileButton.js"),l=require("../CommentInputNext/CommentInputNext.js"),o=require("../FailedFileUploading.js"),u=require("./useAttachmentUpload.js"),s=require("react/jsx-runtime");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=c(e),m=c(t),p=c(a),h=[];exports.CommentReplyInput=function(e){var t=e.onSubmit,a=e.author,c=e.disabled,f=e.placeholder,v=void 0===f?"Reply":f,b=e.autoFocus,A=void 0===b||b,F=e.maxAttachments,x=e.initialBody,j=void 0===x?"":x,g=e.initialAttachments,q=void 0===g?h:g,y=e.onCancel,S=e.testId,C=n.useState(j),R=m.default(C,2),I=R[0],U=R[1],B=n.useState(q),k=m.default(B,2),w=k[0],D=k[1],M=n.useState(null),N=m.default(M,2),T=N[0],_=N[1],z=u.useAttachmentUpload({value:w,onChange:D,onError:_,maxFiles:F}),E=function(){var e=d.default(p.default.mark((function e(a){return p.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t(a,w);case 2:if(e.t0=e.sent,!1!==e.t0){e.next=5;break}return e.abrupt("return");case 5:U(""),D([]),z.clearAttachments();case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return s.jsx(l.CommentInput,{bare:!0,autoFocus:A,placeholder:v,value:I,onChange:U,canSubmit:!(!I.trim()&&!w.length||z.isUploading),onSubmit:E,onCancel:y,disabled:c,attachments:z.items,onAttachmentRemove:z.removeAttachment,onAttachmentRetry:z.handleRetry,onAttachmentReorder:z.reorderAttachments,onFilesDrop:z.addFiles,testId:S,attachmentSlot:T?s.jsx(o,{errorMessage:T}):void 0,toolbar:s.jsx(i.AttachFileButton,{inputRef:z.fileInputRef,onClick:z.openFileDialog,onFileSelect:z.handleFileSelect,multiple:!0,disabled:z.isFull,tooltip:z.isFull?"Up to ".concat(z.maxFiles," files can be attached"):"Attach file"}),leading:s.jsx(r.Avatar,{size:32,name:null==a?void 0:a.name,imageSrc:null==a?void 0:a.avatarUrl})})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/helpers/slicedToArray"),a=require("@babel/runtime/regenerator"),n=require("react"),r=require("../../componentsV2/Avatar/Avatar.js"),i=require("../AttachFileButton/AttachFileButton.js"),l=require("../CommentInputNext/CommentInputNext.js"),o=require("../FailedFileUploading.js"),u=require("./useAttachmentUpload.js"),s=require("react/jsx-runtime");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=c(e),m=c(t),p=c(a),h=[];exports.CommentReplyInput=function(e){var t=e.onSubmit,a=e.author,c=e.disabled,f=e.placeholder,v=void 0===f?"Reply":f,b=e.autoFocus,A=void 0===b||b,F=e.maxAttachments,x=e.initialBody,g=void 0===x?"":x,j=e.initialAttachments,q=void 0===j?h:j,y=e.onCancel,S=e.testId,C=n.useState(g),I=m.default(C,2),R=I[0],U=I[1],k=n.useState(q),B=m.default(k,2),w=B[0],D=B[1],L=n.useState(null),M=m.default(L,2),N=M[0],P=M[1],T=u.useAttachmentUpload({value:w,onChange:D,onError:P,maxFiles:F}),_=function(){var e=d.default(p.default.mark((function e(a){return p.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t(a,w);case 2:if(e.t0=e.sent,!1!==e.t0){e.next=5;break}return e.abrupt("return");case 5:U(""),D([]),T.clearAttachments();case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return s.jsx(l.CommentInput,{bare:!0,autoFocus:A,placeholder:v,value:R,onChange:U,canSubmit:!(!R.trim()&&!w.length||T.isUploading),onSubmit:_,onCancel:y,disabled:c,attachments:T.items,onAttachmentRemove:T.removeAttachment,onAttachmentRetry:T.handleRetry,onAttachmentReorder:T.reorderAttachments,onFilesDrop:T.addFiles,onImageLinkPaste:T.addLinkedImage,testId:S,attachmentSlot:N?s.jsx(o,{errorMessage:N}):void 0,toolbar:s.jsx(i.AttachFileButton,{inputRef:T.fileInputRef,onClick:T.openFileDialog,onFileSelect:T.handleFileSelect,multiple:!0,disabled:T.isFull,tooltip:T.isFull?"Up to ".concat(T.maxFiles," files can be attached"):"Attach file"}),leading:s.jsx(r.Avatar,{size:32,name:null==a?void 0:a.name,imageSrc:null==a?void 0:a.avatarUrl})})};
2
2
  //# sourceMappingURL=CommentReplyInput.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CommentReplyInput.js","sources":["../../../../src/components/CommentComposer/CommentReplyInput.tsx"],"sourcesContent":["import { useState } from 'react';\n\nimport { Avatar } from '../../componentsV2/Avatar';\nimport { AttachFileButton } from '../AttachFileButton';\nimport { CommentInput } from '../CommentInputNext/CommentInputNext';\nimport FailedFileUploading from '../FailedFileUploading';\n\nimport { useAttachmentUpload, UploadedAttachment } from './useAttachmentUpload';\n\nconst EMPTY_ATTACHMENTS: UploadedAttachment[] = [];\n\nexport type CommentReplyInputProps = {\n /** Resolving to `false` keeps the draft, so a failed post can be retried. */\n onSubmit: (\n body: string,\n attachments: UploadedAttachment[]\n ) => void | boolean | Promise<void | boolean>;\n author?: { name?: string; avatarUrl?: string };\n disabled?: boolean;\n placeholder?: string;\n autoFocus?: boolean;\n maxAttachments?: number;\n initialBody?: string;\n initialAttachments?: UploadedAttachment[];\n onCancel?: () => void;\n testId?: string;\n};\n\nexport const CommentReplyInput = ({\n onSubmit,\n author,\n disabled,\n placeholder = 'Reply',\n autoFocus = true,\n maxAttachments,\n initialBody = '',\n initialAttachments = EMPTY_ATTACHMENTS,\n onCancel,\n testId,\n}: CommentReplyInputProps) => {\n const [body, setBody] = useState(initialBody);\n const [attachments, setAttachments] = useState<UploadedAttachment[]>(initialAttachments);\n const [attachmentError, setAttachmentError] = useState<string | null>(null);\n\n const upload = useAttachmentUpload({\n value: attachments,\n onChange: setAttachments,\n onError: setAttachmentError,\n maxFiles: maxAttachments,\n });\n\n const handleSubmit = async (value: string) => {\n if ((await onSubmit(value, attachments)) === false) return;\n\n setBody('');\n setAttachments([]);\n upload.clearAttachments();\n };\n\n return (\n <CommentInput\n bare\n autoFocus={autoFocus}\n placeholder={placeholder}\n value={body}\n onChange={setBody}\n // An attachment only lands once S3 confirms, so posting mid-upload would drop it.\n canSubmit={(!!body.trim() || !!attachments.length) && !upload.isUploading}\n onSubmit={handleSubmit}\n onCancel={onCancel}\n disabled={disabled}\n attachments={upload.items}\n onAttachmentRemove={upload.removeAttachment}\n onAttachmentRetry={upload.handleRetry}\n onAttachmentReorder={upload.reorderAttachments}\n onFilesDrop={upload.addFiles}\n testId={testId}\n attachmentSlot={\n attachmentError ? <FailedFileUploading errorMessage={attachmentError} /> : undefined\n }\n toolbar={\n <AttachFileButton\n inputRef={upload.fileInputRef}\n onClick={upload.openFileDialog}\n onFileSelect={upload.handleFileSelect}\n multiple\n disabled={upload.isFull}\n tooltip={upload.isFull ? `Up to ${upload.maxFiles} files can be attached` : 'Attach file'}\n />\n }\n leading={<Avatar size={32} name={author?.name} imageSrc={author?.avatarUrl} />}\n />\n );\n};\n"],"names":["EMPTY_ATTACHMENTS","_ref","onSubmit","author","disabled","_ref$placeholder","placeholder","_ref$autoFocus","autoFocus","maxAttachments","_ref$initialBody","initialBody","_ref$initialAttachmen","initialAttachments","onCancel","testId","useState","_useState2","_slicedToArray","_useState","body","setBody","_useState4","_useState3","attachments","setAttachments","_useState6","_useState5","attachmentError","setAttachmentError","upload","useAttachmentUpload","value","onChange","onError","maxFiles","handleSubmit","_ref2","_asyncToGenerator","_regeneratorRuntime","mark","wrap","_context","prev","next","t0","sent","abrupt","clearAttachments","stop","_callee","_x","apply","this","arguments","_jsx","CommentInput","bare","canSubmit","trim","length","isUploading","items","onAttachmentRemove","removeAttachment","onAttachmentRetry","handleRetry","onAttachmentReorder","reorderAttachments","onFilesDrop","addFiles","attachmentSlot","jsx","FailedFileUploading","errorMessage","undefined","toolbar","AttachFileButton","inputRef","fileInputRef","onClick","openFileDialog","onFileSelect","handleFileSelect","multiple","isFull","tooltip","leading","Avatar","size","name","imageSrc","avatarUrl"],"mappings":"klBASMA,EAA0C,6BAmBf,SAWHC,GAAA,IAV5BC,IAAAA,SACAC,IAAAA,OACAC,IAAAA,SAAQC,EAAAJ,EACRK,YAAAA,aAAc,QAAOD,EAAAE,EAAAN,EACrBO,UAAAA,cAAgBD,EAChBE,IAAAA,eAAcC,EAAAT,EACdU,YAAAA,aAAc,GAAED,EAAAE,EAAAX,EAChBY,mBAAAA,aAAqBb,EAAiBY,EACtCE,IAAAA,SACAC,IAAAA,OAEwBC,EAAAA,EAAQA,SAACL,GAAYM,EAAAC,EAAAA,QAAAC,EAAA,GAAtCC,EAAIH,EAAA,GAAEI,EAAOJ,EAAA,GACkBD,EAAAA,EAAQA,SAAuBH,GAAmBS,EAAAJ,EAAAA,QAAAK,EAAA,GAAjFC,EAAWF,EAAA,GAAEG,EAAcH,EAAA,GACYN,EAAAA,EAAQA,SAAgB,MAAKU,EAAAR,EAAAA,QAAAS,EAAA,GAApEC,EAAeF,EAAA,GAAEG,EAAkBH,EAAA,GAEpCI,EAASC,EAAAA,oBAAoB,CACjCC,MAAOR,EACPS,SAAUR,EACVS,QAASL,EACTM,SAAU1B,IAGN2B,EAAY,WAAA,IAAAC,EAAAC,EAAAA,QAAAC,EAAAA,QAAAC,MAAG,WAAOR,GAAa,OAAAO,UAAAE,MAAA,SAAAC,GAAA,OAAA,OAAAA,EAAAC,KAAAD,EAAAE,MAAA,KAAA,EAAA,OAAAF,EAAAE,KAAA,EAC5B1C,EAAS8B,EAAOR,GAAY,KAAA,EAAA,GAAAkB,EAAAG,GAAAH,EAAAI,MAAM,IAANJ,EAAAG,GAAW,CAAAH,EAAAE,KAAA,EAAA,KAAA,CAAA,OAAAF,EAAAK,OAAA,UAAA,KAAA,EAElD1B,EAAQ,IACRI,EAAe,IACfK,EAAOkB,mBAAmB,KAAA,EAAA,IAAA,MAAA,OAAAN,EAAAO,OAAA,GAAAC,EAC3B,KAAA,OAAA,SANiBC,GAAA,OAAAd,EAAAe,MAAAC,KAAAC,UAAA,EAAA,GAQlB,OACEC,EAAAA,IAACC,EAAAA,aAAY,CACXC,MAAI,EACJjD,UAAWA,EACXF,YAAaA,EACb0B,MAAOZ,EACPa,SAAUZ,EAEVqC,aAActC,EAAKuC,SAAYnC,EAAYoC,QAAY9B,EAAO+B,aAC9D3D,SAAUkC,EACVtB,SAAUA,EACVV,SAAUA,EACVoB,YAAaM,EAAOgC,MACpBC,mBAAoBjC,EAAOkC,iBAC3BC,kBAAmBnC,EAAOoC,YAC1BC,oBAAqBrC,EAAOsC,mBAC5BC,YAAavC,EAAOwC,SACpBvD,OAAQA,EACRwD,eACE3C,EAAkB2B,EAAAiB,IAACC,EAAmB,CAACC,aAAc9C,SAAsB+C,EAE7EC,QACErB,MAACsB,mBAAgB,CACfC,SAAUhD,EAAOiD,aACjBC,QAASlD,EAAOmD,eAChBC,aAAcpD,EAAOqD,iBACrBC,UAAQ,EACRhF,SAAU0B,EAAOuD,OACjBC,QAASxD,EAAOuD,uBAAkBvD,EAAOK,SAAmC,0BAAA,gBAGhFoD,QAAShC,MAACiC,SAAM,CAACC,KAAM,GAAIC,KAAMvF,aAAAA,EAAAA,EAAQuF,KAAMC,SAAUxF,aAAM,EAANA,EAAQyF,aAGvE"}
1
+ {"version":3,"file":"CommentReplyInput.js","sources":["../../../../src/components/CommentComposer/CommentReplyInput.tsx"],"sourcesContent":["import { useState } from 'react';\n\nimport { Avatar } from '../../componentsV2/Avatar';\nimport { AttachFileButton } from '../AttachFileButton';\nimport { CommentInput } from '../CommentInputNext/CommentInputNext';\nimport FailedFileUploading from '../FailedFileUploading';\n\nimport { useAttachmentUpload, UploadedAttachment } from './useAttachmentUpload';\n\nconst EMPTY_ATTACHMENTS: UploadedAttachment[] = [];\n\nexport type CommentReplyInputProps = {\n /** Resolving to `false` keeps the draft, so a failed post can be retried. */\n onSubmit: (\n body: string,\n attachments: UploadedAttachment[]\n ) => void | boolean | Promise<void | boolean>;\n author?: { name?: string; avatarUrl?: string };\n disabled?: boolean;\n placeholder?: string;\n autoFocus?: boolean;\n maxAttachments?: number;\n initialBody?: string;\n initialAttachments?: UploadedAttachment[];\n onCancel?: () => void;\n testId?: string;\n};\n\nexport const CommentReplyInput = ({\n onSubmit,\n author,\n disabled,\n placeholder = 'Reply',\n autoFocus = true,\n maxAttachments,\n initialBody = '',\n initialAttachments = EMPTY_ATTACHMENTS,\n onCancel,\n testId,\n}: CommentReplyInputProps) => {\n const [body, setBody] = useState(initialBody);\n const [attachments, setAttachments] = useState<UploadedAttachment[]>(initialAttachments);\n const [attachmentError, setAttachmentError] = useState<string | null>(null);\n\n const upload = useAttachmentUpload({\n value: attachments,\n onChange: setAttachments,\n onError: setAttachmentError,\n maxFiles: maxAttachments,\n });\n\n const handleSubmit = async (value: string) => {\n if ((await onSubmit(value, attachments)) === false) return;\n\n setBody('');\n setAttachments([]);\n upload.clearAttachments();\n };\n\n return (\n <CommentInput\n bare\n autoFocus={autoFocus}\n placeholder={placeholder}\n value={body}\n onChange={setBody}\n // An attachment only lands once S3 confirms, so posting mid-upload would drop it.\n canSubmit={(!!body.trim() || !!attachments.length) && !upload.isUploading}\n onSubmit={handleSubmit}\n onCancel={onCancel}\n disabled={disabled}\n attachments={upload.items}\n onAttachmentRemove={upload.removeAttachment}\n onAttachmentRetry={upload.handleRetry}\n onAttachmentReorder={upload.reorderAttachments}\n onFilesDrop={upload.addFiles}\n onImageLinkPaste={upload.addLinkedImage}\n testId={testId}\n attachmentSlot={\n attachmentError ? <FailedFileUploading errorMessage={attachmentError} /> : undefined\n }\n toolbar={\n <AttachFileButton\n inputRef={upload.fileInputRef}\n onClick={upload.openFileDialog}\n onFileSelect={upload.handleFileSelect}\n multiple\n disabled={upload.isFull}\n tooltip={upload.isFull ? `Up to ${upload.maxFiles} files can be attached` : 'Attach file'}\n />\n }\n leading={<Avatar size={32} name={author?.name} imageSrc={author?.avatarUrl} />}\n />\n );\n};\n"],"names":["EMPTY_ATTACHMENTS","_ref","onSubmit","author","disabled","_ref$placeholder","placeholder","_ref$autoFocus","autoFocus","maxAttachments","_ref$initialBody","initialBody","_ref$initialAttachmen","initialAttachments","onCancel","testId","useState","_useState2","_slicedToArray","_useState","body","setBody","_useState4","_useState3","attachments","setAttachments","_useState6","_useState5","attachmentError","setAttachmentError","upload","useAttachmentUpload","value","onChange","onError","maxFiles","handleSubmit","_ref2","_asyncToGenerator","_regeneratorRuntime","mark","wrap","_context","prev","next","t0","sent","abrupt","clearAttachments","stop","_callee","_x","apply","this","arguments","_jsx","CommentInput","bare","canSubmit","trim","length","isUploading","items","onAttachmentRemove","removeAttachment","onAttachmentRetry","handleRetry","onAttachmentReorder","reorderAttachments","onFilesDrop","addFiles","onImageLinkPaste","addLinkedImage","attachmentSlot","jsx","FailedFileUploading","errorMessage","undefined","toolbar","AttachFileButton","inputRef","fileInputRef","onClick","openFileDialog","onFileSelect","handleFileSelect","multiple","isFull","tooltip","leading","Avatar","size","name","imageSrc","avatarUrl"],"mappings":"klBASMA,EAA0C,6BAmBf,SAWHC,GAAA,IAV5BC,IAAAA,SACAC,IAAAA,OACAC,IAAAA,SAAQC,EAAAJ,EACRK,YAAAA,aAAc,QAAOD,EAAAE,EAAAN,EACrBO,UAAAA,cAAgBD,EAChBE,IAAAA,eAAcC,EAAAT,EACdU,YAAAA,aAAc,GAAED,EAAAE,EAAAX,EAChBY,mBAAAA,aAAqBb,EAAiBY,EACtCE,IAAAA,SACAC,IAAAA,OAEwBC,EAAAA,EAAQA,SAACL,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BAC5BC,YAAavC,EAAOwC,SACpBC,iBAAkBzC,EAAO0C,eACzBzD,OAAQA,EACR0D,eACE7C,EAAkB2B,EAAAmB,IAACC,EAAmB,CAACC,aAAchD,SAAsBiD,EAE7EC,QACEvB,MAACwB,mBAAgB,CACfC,SAAUlD,EAAOmD,aACjBC,QAASpD,EAAOqD,eAChBC,aAActD,EAAOuD,iBACrBC,UAAQ,EACRlF,SAAU0B,EAAOyD,OACjBC,QAAS1D,EAAOyD,uBAAkBzD,EAAOK,SAAmC,0BAAA,gBAGhFsD,QAASlC,MAACmC,SAAM,CAACC,KAAM,GAAIC,KAAMzF,aAAAA,EAAAA,EAAQyF,KAAMC,SAAU1F,aAAM,EAANA,EAAQ2F,aAGvE"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../componentsV2/Checkbox/Checkbox.js"),a=require("./ChatChannelSelector.js"),n=require("./ShareToChatRow.scss.js"),s=require("react/jsx-runtime");exports.ShareToChatRow=function(h){var r=h.checked,l=h.onChange,c=h.channels,t=h.selectedChannel,o=h.onChannelChange,i=h.isChannelSelectDisabled,C=h.label,d=void 0===C?"Share in Chat":C,u=h.testId;return s.jsxs("div",{className:n.row,"data-testid":u,children:[s.jsx("div",{className:n.checkbox,children:s.jsx(e.Checkbox,{size:"small",checked:r,onChange:l,label:d})}),r&&s.jsx(a.ChatChannelSelector,{channels:c,value:t,onChange:o,disabled:i})]})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../componentsV2/Checkbox/Checkbox.js"),a=require("./ChatChannelSelector.js"),n=require("./ShareToChatRow.scss.js"),s=require("react/jsx-runtime");exports.ShareToChatRow=function(h){var r=h.checked,l=h.onChange,c=h.channels,t=h.selectedChannel,o=h.onChannelChange,i=h.isChannelSelectDisabled,C=h.label,d=void 0===C?"Share in Team Chat":C,u=h.testId;return s.jsxs("div",{className:n.row,"data-testid":u,children:[s.jsx("div",{className:n.checkbox,children:s.jsx(e.Checkbox,{size:"small",checked:r,onChange:l,label:d})}),r&&s.jsx(a.ChatChannelSelector,{channels:c,value:t,onChange:o,disabled:i})]})};
2
2
  //# sourceMappingURL=ShareToChatRow.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ShareToChatRow.js","sources":["../../../../src/components/CommentComposer/ShareToChatRow.tsx"],"sourcesContent":["import { Checkbox } from '../../componentsV2/Checkbox';\n\nimport { ChatChannel, ChatChannelSelector } from './ChatChannelSelector';\n\nimport styles from './ShareToChatRow.scss';\n\nexport type ShareToChatRowProps = {\n checked: boolean;\n onChange: (checked: boolean) => void;\n channels: ChatChannel[];\n selectedChannel: ChatChannel | null;\n onChannelChange: (channel: ChatChannel) => void;\n isChannelSelectDisabled?: boolean;\n label?: string;\n testId?: string;\n};\n\nexport const ShareToChatRow = ({\n checked,\n onChange,\n channels,\n selectedChannel,\n onChannelChange,\n isChannelSelectDisabled,\n label = 'Share in Chat',\n testId,\n}: ShareToChatRowProps) => (\n <div className={styles.row} data-testid={testId}>\n <div className={styles.checkbox}>\n <Checkbox size=\"small\" checked={checked} onChange={onChange} label={label} />\n </div>\n {checked && (\n <ChatChannelSelector\n channels={channels}\n value={selectedChannel}\n onChange={onChannelChange}\n disabled={isChannelSelectDisabled}\n />\n )}\n </div>\n);\n"],"names":["_ref","checked","onChange","channels","selectedChannel","onChannelChange","isChannelSelectDisabled","_ref$label","label","testId","_jsxs","className","styles","row","children","_jsx","jsx","checkbox","Checkbox","size","ChatChannelSelector","value","disabled"],"mappings":"+PAiB8B,SAAHA,GAAA,IACzBC,IAAAA,QACAC,IAAAA,SACAC,IAAAA,SACAC,IAAAA,gBACAC,IAAAA,gBACAC,IAAAA,wBAAuBC,EAAAP,EACvBQ,MAAAA,aAAQ,gBAAeD,EACvBE,IAAAA,OAAM,OAENC,EAAAA,KAAA,MAAA,CAAKC,UAAWC,EAAOC,IAAK,cAAaJ,EAAOK,SAC9C,CAAAC,EAAAC,IAAA,MAAA,CAAKL,UAAWC,EAAOK,SAASH,SAC9BC,MAACG,WAAQ,CAACC,KAAK,QAAQlB,QAASA,EAASC,SAAUA,EAAUM,MAAOA,MAErEP,GACCc,EAAAC,IAACI,sBAAmB,CAClBjB,SAAUA,EACVkB,MAAOjB,EACPF,SAAUG,EACViB,SAAUhB,MAGV"}
1
+ {"version":3,"file":"ShareToChatRow.js","sources":["../../../../src/components/CommentComposer/ShareToChatRow.tsx"],"sourcesContent":["import { Checkbox } from '../../componentsV2/Checkbox';\n\nimport { ChatChannel, ChatChannelSelector } from './ChatChannelSelector';\n\nimport styles from './ShareToChatRow.scss';\n\nexport type ShareToChatRowProps = {\n checked: boolean;\n onChange: (checked: boolean) => void;\n channels: ChatChannel[];\n selectedChannel: ChatChannel | null;\n onChannelChange: (channel: ChatChannel) => void;\n isChannelSelectDisabled?: boolean;\n label?: string;\n testId?: string;\n};\n\nexport const ShareToChatRow = ({\n checked,\n onChange,\n channels,\n selectedChannel,\n onChannelChange,\n isChannelSelectDisabled,\n label = 'Share in Team Chat',\n testId,\n}: ShareToChatRowProps) => (\n <div className={styles.row} data-testid={testId}>\n <div className={styles.checkbox}>\n <Checkbox size=\"small\" checked={checked} onChange={onChange} label={label} />\n </div>\n {checked && (\n <ChatChannelSelector\n channels={channels}\n value={selectedChannel}\n onChange={onChannelChange}\n disabled={isChannelSelectDisabled}\n />\n )}\n </div>\n);\n"],"names":["_ref","checked","onChange","channels","selectedChannel","onChannelChange","isChannelSelectDisabled","_ref$label","label","testId","_jsxs","className","styles","row","children","_jsx","jsx","checkbox","Checkbox","size","ChatChannelSelector","value","disabled"],"mappings":"+PAiB8B,SAAHA,GAAA,IACzBC,IAAAA,QACAC,IAAAA,SACAC,IAAAA,SACAC,IAAAA,gBACAC,IAAAA,gBACAC,IAAAA,wBAAuBC,EAAAP,EACvBQ,MAAAA,aAAQ,qBAAoBD,EAC5BE,IAAAA,OAAM,OAENC,EAAAA,KAAA,MAAA,CAAKC,UAAWC,EAAOC,IAAK,cAAaJ,EAAOK,SAC9C,CAAAC,EAAAC,IAAA,MAAA,CAAKL,UAAWC,EAAOK,SAASH,SAC9BC,MAACG,WAAQ,CAACC,KAAK,QAAQlB,QAASA,EAASC,SAAUA,EAAUM,MAAOA,MAErEP,GACCc,EAAAC,IAACI,sBAAmB,CAClBjB,SAAUA,EACVkB,MAAOjB,EACPF,SAAUG,EACViB,SAAUhB,MAGV"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/toConsumableArray"),r=require("@babel/runtime/helpers/asyncToGenerator"),n=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/slicedToArray"),u=require("@babel/runtime/regenerator"),i=require("react"),l=require("react-s3-uploader/s3upload"),o=require("../AttachmentPreview/getAttachmentKind.js"),a=require("../AttachFileButton/AttachFileButton.js"),c=require("../../clients/jsonApi/index.js");function f(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=f(e),d=f(r),p=f(n),v=f(t),h=f(u),m=f(l);function g(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function b(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?g(Object(n),!0).forEach((function(r){p.default(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}var U=function(e){return e.type.startsWith("image/")?"image":e.type.startsWith("video/")?"video":"file"},w=function(e){return(e/1048576).toFixed(1)},y=function(e){return{id:e.url,name:e.name,file:null,previewUrl:"",isUploading:!1,error:null,uploaded:e}},k=0;exports.DEFAULT_MAX_ATTACHMENTS=10,exports.useAttachmentUpload=function(e){var r,n,t=e.value,u=e.onChange,l=e.onError,f=e.maxSizeBytes,p=e.maxFiles,g=void 0===p?10:p,j=e.accept,C=void 0===j?a.ACCEPTED_ATTACHMENT_TYPES:j,O=i.useState([]),A=v.default(O,2),E=A[0],S=A[1],R=i.useRef(null),x=i.useRef(new Map),F=i.useRef(new Map),P=i.useRef([]),L=i.useRef(u),T=i.useRef(l);L.current=u,T.current=l;var q=i.useRef([]),M=i.useCallback((function(e){var r=e(P.current);P.current=r,S(r),q.current=function(e){return e.map((function(e){return e.uploaded})).filter(Boolean)}(r),L.current(q.current)}),[]),D=i.useCallback((function(e,r){return M((function(n){return n.map((function(n){return n.id===e?b(b({},n),r):n}))}))}),[M]),B=i.useCallback((function(e){var r,n;null===(r=x.current.get(e))||void 0===r||r.abortUpload(),x.current.delete(e),F.current.set(e,(null!==(n=F.current.get(e))&&void 0!==n?n:0)+1)}),[]),_=i.useCallback((function(e){null!=e&&e.previewUrl&&URL.revokeObjectURL(e.previewUrl)}),[]),z=i.useCallback((function(){var e,r,n;null===(e=T.current)||void 0===e||e.call(T,null!==(r=null===(n=P.current.find((function(e){return e.error})))||void 0===n?void 0:n.error)&&void 0!==r?r:null)}),[]);i.useEffect((function(){return function(){x.current.forEach((function(e){return e.abortUpload()})),x.current.clear(),P.current.forEach((function(e){e.previewUrl&&URL.revokeObjectURL(e.previewUrl)}))}}),[]);var W=i.useCallback((function(e,r){var n,t=(null!==(n=F.current.get(e))&&void 0!==n?n:0)+1;F.current.set(e,t);var u,i,l=function(){return F.current.get(e)===t},o=function(r){var n;l()&&(D(e,{isUploading:!1,error:r}),null===(n=T.current)||void 0===n||n.call(T,r))},a="",f=new m.default({files:[r],preprocess:function(e,r){return r(e)},onProgress:function(){},getSignedUrl:(i=d.default(h.default.mark((function e(r,n){var t;return h.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.getS3SignedUrl(r.name,r.type);case 3:t=e.sent,a=t.file_name,n(b(b({},t),{},{signedUrl:t.signed_url})),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),o((null===e.t0||void 0===e.t0?void 0:e.t0.message)||"Failed to upload the file");case 11:case"end":return e.stop()}}),e,null,[[0,8]])}))),function(e,r){return i.apply(this,arguments)}),onFinishS3Put:(u=d.default(h.default.mark((function n(){var t,u;return h.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,c.getS3DownloadLink(a);case 3:if(t=n.sent,u=t.url,l()){n.next=7;break}return n.abrupt("return");case 7:x.current.delete(e),D(e,{isUploading:!1,error:null,uploaded:{url:u,name:a,size:r.size}}),z(),n.next=15;break;case 12:n.prev=12,n.t0=n.catch(0),o((null===n.t0||void 0===n.t0?void 0:n.t0.message)||"Failed to upload the file");case 15:case"end":return n.stop()}}),n,null,[[0,12]])}))),function(){return u.apply(this,arguments)}),onError:function(e){return o(e||"Failed to upload the file")}});x.current.set(e,f)}),[D,z]),K=i.useCallback((function(e){var r,n,t,u,i=e.filter((function(e){return function(e,r){return r.split(",").map((function(e){return e.trim().toLowerCase()})).filter(Boolean).some((function(r){if(r.startsWith("."))return e.name.toLowerCase().endsWith(r);if(r.endsWith("/*")){var n=e.type.toLowerCase();return n?n.startsWith(r.slice(0,-1)):o.getAttachmentKind({name:e.name})===r.slice(0,-1)}return e.type.toLowerCase()===r}))}(e,C)})),l=i.length<e.length?1===e.length?"That file type is not supported.":"Some files were skipped — unsupported file type.":null,a="You can attach up to ".concat(g," files."),c=g-P.current.length;if(!i.length||c<=0){var d;null===(d=T.current)||void 0===d||d.call(T,i.length?a:l)}else{var p=i.slice(0,c),v=p.map((function(e){var r=U(e),n=!!f&&e.size>f;return{id:"attachment-".concat(k+=1),name:e.name,file:e,previewUrl:"file"===r?"":URL.createObjectURL(e),isUploading:!n,error:n?"File is too large (".concat(w(e.size)," MB). Maximum size is ").concat(w(f)," MB."):null,uploaded:null}}));M((function(e){return[].concat(s.default(e),s.default(v))}));var h=i.length>p.length?a:null;null===(r=T.current)||void 0===r||r.call(T,null!==(n=null!==(t=null===(u=P.current.find((function(e){return e.error})))||void 0===u?void 0:u.error)&&void 0!==t?t:l)&&void 0!==n?n:h),v.filter((function(e){return!e.error})).forEach((function(e){return W(e.id,e.file)}))}}),[M,g,f,W,C]),H=i.useCallback((function(e){var r,n=Array.from(null!==(r=e.target.files)&&void 0!==r?r:[]);R.current&&(R.current.value=""),n.length&&K(n)}),[K]),N=i.useCallback((function(){var e;return null===(e=R.current)||void 0===e?void 0:e.click()}),[]),Y=i.useCallback((function(e){var r=String(e);B(r),_(P.current.find((function(e){return e.id===r}))),M((function(e){return e.filter((function(e){return e.id!==r}))})),z()}),[B,_,M,z]),G=i.useCallback((function(e){var r=String(e),n=P.current.find((function(e){return e.id===r}));null!=n&&n.file&&(B(r),D(r,{isUploading:!0,error:null}),z(),W(r,n.file))}),[B,D,W,z]),I=i.useCallback((function(e){return M((function(r){var n=new Map(r.map((function(e){return[e.id,e]}))),t=e.map((function(e){return n.get(String(e))})).filter(Boolean),u=r.filter((function(r){return!e.some((function(e){return String(e)===r.id}))}));return[].concat(s.default(t),s.default(u))}))}),[M]),X=i.useCallback((function(){var e;P.current.forEach((function(e){B(e.id),_(e)})),M((function(){return[]})),null===(e=T.current)||void 0===e||e.call(T,null)}),[B,M,_]);i.useEffect((function(){var e,r,n;(r=q.current,n=t,r.length===n.length&&r.every((function(e,r){return e.url===n[r].url})))||(P.current.forEach((function(e){B(e.id),e.previewUrl&&URL.revokeObjectURL(e.previewUrl)})),P.current=t.map(y),q.current=t,S(P.current),null===(e=T.current)||void 0===e||e.call(T,null))}),[t,B]);var J=i.useState({}),Q=v.default(J,2),V=Q[0],Z=Q[1],$=i.useRef(V);$.current=V;var ee=E.filter((function(e){return!e.file&&e.uploaded})).map((function(e){return e.uploaded.name})).join("|");return i.useEffect((function(){var e=ee.split("|").filter((function(e){return e&&!(e in $.current)}));if(e.length){var r=!0;return Promise.all(e.map((function(e){return c.getS3DownloadLink(e,"inline").then((function(r){var n=r.url;return[e,n]})).catch((function(r){return console.error('Failed to sign stored attachment "'.concat(e,'"'),r),[e,""]}))}))).then((function(e){r&&Z((function(r){return b(b({},r),Object.fromEntries(e))}))})),function(){r=!1}}}),[ee]),{items:E.reduce((function(e,r){var n;if(r.file)return e.push({id:r.id,name:r.name,src:r.previewUrl,kind:U(r.file),isUploading:r.isUploading,error:null!==(n=r.error)&&void 0!==n?n:void 0}),e;var t=r.uploaded,u=o.getAttachmentKind(t),i=V[t.name];return"file"===u||i?(e.push({id:r.id,name:t.name,src:i,kind:u}),e):e}),[]),fileInputRef:R,openFileDialog:N,handleFileSelect:H,addFiles:K,removeAttachment:Y,handleRetry:G,reorderAttachments:I,clearAttachments:X,isUploading:E.some((function(e){return e.isUploading})),error:null!==(r=null===(n=E.find((function(e){return e.error})))||void 0===n?void 0:n.error)&&void 0!==r?r:null,count:E.length,isFull:E.length>=g,maxFiles:g}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/toConsumableArray"),r=require("@babel/runtime/helpers/asyncToGenerator"),n=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/slicedToArray"),u=require("@babel/runtime/regenerator"),i=require("react"),l=require("react-s3-uploader/s3upload"),o=require("../AttachmentPreview/getAttachmentKind.js"),a=require("../AttachFileButton/AttachFileButton.js"),c=require("../../clients/jsonApi/index.js"),f=require("../../utils/links.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=s(e),p=s(r),v=s(n),m=s(t),h=s(u),g=s(l);function b(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function U(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?b(Object(n),!0).forEach((function(r){v.default(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}var w=function(e){return e.type.startsWith("image/")?"image":e.type.startsWith("video/")?"video":"file"},k=function(e){return(e/1048576).toFixed(1)},y=function(e){return{id:e.url,name:e.name,file:null,previewUrl:"",isUploading:!1,error:null,uploaded:e}},j=0,C=function(){return"attachment-".concat(j+=1)};exports.DEFAULT_MAX_ATTACHMENTS=10,exports.useAttachmentUpload=function(e){var r,n,t=e.value,u=e.onChange,l=e.onError,s=e.maxSizeBytes,v=e.maxFiles,b=void 0===v?10:v,j=e.accept,O=void 0===j?a.ACCEPTED_ATTACHMENT_TYPES:j,A=i.useState([]),E=m.default(A,2),S=E[0],R=E[1],F=i.useRef(null),x=i.useRef(new Map),L=i.useRef(new Map),P=i.useRef([]),T=i.useRef(u),q=i.useRef(l);T.current=u,q.current=l;var z=i.useRef([]),M=i.useCallback((function(e){var r=e(P.current);P.current=r,R(r),z.current=function(e){return e.map((function(e){return e.uploaded})).filter(Boolean)}(r),T.current(z.current)}),[]),D=i.useCallback((function(e,r){return M((function(n){return n.map((function(n){return n.id===e?U(U({},n),r):n}))}))}),[M]),B=i.useCallback((function(e){var r,n;null===(r=x.current.get(e))||void 0===r||r.abortUpload(),x.current.delete(e),L.current.set(e,(null!==(n=L.current.get(e))&&void 0!==n?n:0)+1)}),[]),_=i.useCallback((function(e){null!=e&&e.previewUrl&&URL.revokeObjectURL(e.previewUrl)}),[]),W=i.useCallback((function(){var e,r,n;null===(e=q.current)||void 0===e||e.call(q,null!==(r=null===(n=P.current.find((function(e){return e.error})))||void 0===n?void 0:n.error)&&void 0!==r?r:null)}),[]);i.useEffect((function(){return function(){x.current.forEach((function(e){return e.abortUpload()})),x.current.clear(),P.current.forEach((function(e){e.previewUrl&&URL.revokeObjectURL(e.previewUrl)}))}}),[]);var K=i.useCallback((function(e,r){var n,t=(null!==(n=L.current.get(e))&&void 0!==n?n:0)+1;L.current.set(e,t);var u,i,l=function(){return L.current.get(e)===t},o=function(r){var n;l()&&(D(e,{isUploading:!1,error:r}),null===(n=q.current)||void 0===n||n.call(q,r))},a="",f=new g.default({files:[r],preprocess:function(e,r){return r(e)},onProgress:function(){},getSignedUrl:(i=p.default(h.default.mark((function e(r,n){var t;return h.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.getS3SignedUrl(r.name,r.type);case 3:t=e.sent,a=t.file_name,n(U(U({},t),{},{signedUrl:t.signed_url})),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),o((null===e.t0||void 0===e.t0?void 0:e.t0.message)||"Failed to upload the file");case 11:case"end":return e.stop()}}),e,null,[[0,8]])}))),function(e,r){return i.apply(this,arguments)}),onFinishS3Put:(u=p.default(h.default.mark((function n(){var t,u;return h.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,c.getS3DownloadLink(a);case 3:if(t=n.sent,u=t.url,l()){n.next=7;break}return n.abrupt("return");case 7:x.current.delete(e),D(e,{isUploading:!1,error:null,uploaded:{url:u,name:a,size:r.size}}),W(),n.next=15;break;case 12:n.prev=12,n.t0=n.catch(0),o((null===n.t0||void 0===n.t0?void 0:n.t0.message)||"Failed to upload the file");case 15:case"end":return n.stop()}}),n,null,[[0,12]])}))),function(){return u.apply(this,arguments)}),onError:function(e){return o(e||"Failed to upload the file")}});x.current.set(e,f)}),[D,W]),N=i.useCallback((function(e){var r,n=f.getUrlFileName(e);n&&(P.current.length>=b?null===(r=q.current)||void 0===r||r.call(q,"You can attach up to ".concat(b," files.")):P.current.some((function(r){var n;return(null===(n=r.uploaded)||void 0===n?void 0:n.url)===e}))||M((function(r){return[].concat(d.default(r),[{id:C(),name:n,file:null,previewUrl:e,isUploading:!1,error:null,uploaded:{url:e,name:n}}])})))}),[M,b]),Y=i.useCallback((function(e){var r,n,t,u,i=e.filter((function(e){return function(e,r){return r.split(",").map((function(e){return e.trim().toLowerCase()})).filter(Boolean).some((function(r){if(r.startsWith("."))return e.name.toLowerCase().endsWith(r);if(r.endsWith("/*")){var n=e.type.toLowerCase();return n?n.startsWith(r.slice(0,-1)):o.getAttachmentKind({name:e.name})===r.slice(0,-1)}return e.type.toLowerCase()===r}))}(e,O)})),l=i.length<e.length?1===e.length?"That file type is not supported.":"Some files were skipped — unsupported file type.":null,a="You can attach up to ".concat(b," files."),c=b-P.current.length;if(!i.length||c<=0){var f;null===(f=q.current)||void 0===f||f.call(q,i.length?a:l)}else{var p=i.slice(0,c),v=p.map((function(e){var r=w(e),n=!!s&&e.size>s;return{id:C(),name:e.name,file:e,previewUrl:"file"===r?"":URL.createObjectURL(e),isUploading:!n,error:n?"File is too large (".concat(k(e.size)," MB). Maximum size is ").concat(k(s)," MB."):null,uploaded:null}}));M((function(e){return[].concat(d.default(e),d.default(v))}));var m=i.length>p.length?a:null;null===(r=q.current)||void 0===r||r.call(q,null!==(n=null!==(t=null===(u=P.current.find((function(e){return e.error})))||void 0===u?void 0:u.error)&&void 0!==t?t:l)&&void 0!==n?n:m),v.filter((function(e){return!e.error})).forEach((function(e){return K(e.id,e.file)}))}}),[M,b,s,K,O]),H=i.useCallback((function(e){var r,n=Array.from(null!==(r=e.target.files)&&void 0!==r?r:[]);F.current&&(F.current.value=""),n.length&&Y(n)}),[Y]),I=i.useCallback((function(){var e;return null===(e=F.current)||void 0===e?void 0:e.click()}),[]),G=i.useCallback((function(e){var r=String(e);B(r),_(P.current.find((function(e){return e.id===r}))),M((function(e){return e.filter((function(e){return e.id!==r}))})),W()}),[B,_,M,W]),X=i.useCallback((function(e){var r=String(e),n=P.current.find((function(e){return e.id===r}));null!=n&&n.file&&(B(r),D(r,{isUploading:!0,error:null}),W(),K(r,n.file))}),[B,D,K,W]),J=i.useCallback((function(e){return M((function(r){var n=new Map(r.map((function(e){return[e.id,e]}))),t=e.map((function(e){return n.get(String(e))})).filter(Boolean),u=r.filter((function(r){return!e.some((function(e){return String(e)===r.id}))}));return[].concat(d.default(t),d.default(u))}))}),[M]),Q=i.useCallback((function(){var e;P.current.forEach((function(e){B(e.id),_(e)})),M((function(){return[]})),null===(e=q.current)||void 0===e||e.call(q,null)}),[B,M,_]);i.useEffect((function(){var e,r,n;(r=z.current,n=t,r.length===n.length&&r.every((function(e,r){return e.url===n[r].url})))||(P.current.forEach((function(e){B(e.id),e.previewUrl&&URL.revokeObjectURL(e.previewUrl)})),P.current=t.map(y),z.current=t,R(P.current),null===(e=q.current)||void 0===e||e.call(q,null))}),[t,B]);var V=i.useState({}),Z=m.default(V,2),$=Z[0],ee=Z[1],re=i.useRef($);re.current=$;var ne=S.filter((function(e){return!e.file&&!e.previewUrl&&e.uploaded})).map((function(e){return e.uploaded.name})).join("|");return i.useEffect((function(){var e=ne.split("|").filter((function(e){return e&&!(e in re.current)}));if(e.length){var r=!0;return Promise.all(e.map((function(e){return c.getS3DownloadLink(e,"inline").then((function(r){var n=r.url;return[e,n]})).catch((function(r){return console.error('Failed to sign stored attachment "'.concat(e,'"'),r),[e,""]}))}))).then((function(e){r&&ee((function(r){return U(U({},r),Object.fromEntries(e))}))})),function(){r=!1}}}),[ne]),{items:S.reduce((function(e,r){var n;if(r.file)return e.push({id:r.id,name:r.name,src:r.previewUrl,kind:w(r.file),size:r.file.size,isUploading:r.isUploading,error:null!==(n=r.error)&&void 0!==n?n:void 0}),e;var t=r.uploaded,u=o.getAttachmentKind(t),i=r.previewUrl||$[t.name];return"file"===u||i?(e.push({id:r.id,name:t.name,src:i,kind:u,size:t.size}),e):e}),[]),fileInputRef:F,openFileDialog:I,handleFileSelect:H,addFiles:Y,addLinkedImage:N,removeAttachment:G,handleRetry:X,reorderAttachments:J,clearAttachments:Q,isUploading:S.some((function(e){return e.isUploading})),error:null!==(r=null===(n=S.find((function(e){return e.error})))||void 0===n?void 0:n.error)&&void 0!==r?r:null,count:S.length,isFull:S.length>=b,maxFiles:b}};
2
2
  //# sourceMappingURL=useAttachmentUpload.js.map