@corva/ui 3.74.0-0 → 3.74.0-2

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 (412) 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/AssetEditor/AssetEditorAutocomplete.js +1 -1
  6. package/cjs-bundle/components/AssetEditor/AssetEditorAutocomplete.js.map +1 -1
  7. package/cjs-bundle/components/AssetEditorV2/index.js +1 -1
  8. package/cjs-bundle/components/AssetEditorV2/index.js.map +1 -1
  9. package/cjs-bundle/components/AttachmentLightbox/AttachmentDocument.js +2 -0
  10. package/cjs-bundle/components/AttachmentLightbox/AttachmentDocument.js.map +1 -0
  11. package/cjs-bundle/components/AttachmentLightbox/AttachmentLightbox.js +1 -1
  12. package/cjs-bundle/components/AttachmentLightbox/AttachmentLightbox.js.map +1 -1
  13. package/cjs-bundle/components/AttachmentLightbox/AttachmentLightbox.scss.js +1 -1
  14. package/cjs-bundle/components/AttachmentLightbox/AttachmentPreviewPane.js +2 -0
  15. package/cjs-bundle/components/AttachmentLightbox/AttachmentPreviewPane.js.map +1 -0
  16. package/cjs-bundle/components/AttachmentLightbox/copyImageToClipboard.js +2 -0
  17. package/cjs-bundle/components/AttachmentLightbox/copyImageToClipboard.js.map +1 -0
  18. package/cjs-bundle/components/AttachmentLightbox/downloadAttachment.js +2 -0
  19. package/cjs-bundle/components/AttachmentLightbox/downloadAttachment.js.map +1 -0
  20. package/cjs-bundle/components/AttachmentLightbox/useAttachmentLightbox.js +1 -1
  21. package/cjs-bundle/components/AttachmentLightbox/useAttachmentLightbox.js.map +1 -1
  22. package/cjs-bundle/components/AttachmentLightbox/useZoomPan.js +2 -0
  23. package/cjs-bundle/components/AttachmentLightbox/useZoomPan.js.map +1 -0
  24. package/cjs-bundle/components/AttachmentPreview/AttachmentActionsMenu.js +2 -0
  25. package/cjs-bundle/components/AttachmentPreview/AttachmentActionsMenu.js.map +1 -0
  26. package/cjs-bundle/components/AttachmentPreview/AttachmentDownloadLink.js +2 -0
  27. package/cjs-bundle/components/AttachmentPreview/AttachmentDownloadLink.js.map +1 -0
  28. package/cjs-bundle/components/AttachmentPreview/AttachmentImage.js +2 -0
  29. package/cjs-bundle/components/AttachmentPreview/AttachmentImage.js.map +1 -0
  30. package/cjs-bundle/components/AttachmentPreview/AttachmentPreview.js +1 -1
  31. package/cjs-bundle/components/AttachmentPreview/AttachmentPreview.js.map +1 -1
  32. package/cjs-bundle/components/AttachmentPreview/AttachmentPreview.scss.js +1 -1
  33. package/cjs-bundle/components/AttachmentPreview/AttachmentRow.js +1 -1
  34. package/cjs-bundle/components/AttachmentPreview/AttachmentRow.js.map +1 -1
  35. package/cjs-bundle/components/AttachmentPreview/AttachmentTile.js +1 -1
  36. package/cjs-bundle/components/AttachmentPreview/AttachmentTile.js.map +1 -1
  37. package/cjs-bundle/components/AttachmentPreview/useStoredAttachment.js +2 -0
  38. package/cjs-bundle/components/AttachmentPreview/useStoredAttachment.js.map +1 -0
  39. package/cjs-bundle/components/AttachmentPreview/useStoredAttachments.js +1 -1
  40. package/cjs-bundle/components/AttachmentPreview/useStoredAttachments.js.map +1 -1
  41. package/cjs-bundle/components/BICOffsetPickerDialog/index.js +1 -1
  42. package/cjs-bundle/components/BICOffsetPickerDialog/index.js.map +1 -1
  43. package/cjs-bundle/components/Casing/CasingTableV2/components/CasingJoints/Editor.js +1 -1
  44. package/cjs-bundle/components/Casing/CasingTableV2/components/CasingJoints/Editor.js.map +1 -1
  45. package/cjs-bundle/components/Casing/CasingTableV2/components/Component.js +1 -1
  46. package/cjs-bundle/components/Casing/CasingTableV2/components/Component.js.map +1 -1
  47. package/cjs-bundle/components/Casing/CasingTableV2/components/DrillPipe/Editor.js +1 -1
  48. package/cjs-bundle/components/Casing/CasingTableV2/components/DrillPipe/Editor.js.map +1 -1
  49. package/cjs-bundle/components/CommentCard/CommentCard.js +1 -1
  50. package/cjs-bundle/components/CommentCard/CommentCard.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/useAttachmentUpload.js +1 -1
  58. package/cjs-bundle/components/CommentComposer/useAttachmentUpload.js.map +1 -1
  59. package/cjs-bundle/components/CommentInputNext/CommentInputNext.js +1 -1
  60. package/cjs-bundle/components/CommentInputNext/CommentInputNext.js.map +1 -1
  61. package/cjs-bundle/components/CommentInputNext/useFilePaste.js +2 -0
  62. package/cjs-bundle/components/CommentInputNext/useFilePaste.js.map +1 -0
  63. package/cjs-bundle/components/DevCenter/AppsDataProvider/AppsDataProvider.js +1 -1
  64. package/cjs-bundle/components/DevCenter/AppsDataProvider/AppsDataProvider.js.map +1 -1
  65. package/cjs-bundle/components/DocumentViewer/DocumentViewer.js +1 -1
  66. package/cjs-bundle/components/DocumentViewer/DocumentViewer.js.map +1 -1
  67. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js +1 -1
  68. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js.map +1 -1
  69. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js +1 -1
  70. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js.map +1 -1
  71. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Component.js +1 -1
  72. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Component.js.map +1 -1
  73. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js +1 -1
  74. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js.map +1 -1
  75. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js +1 -1
  76. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js.map +1 -1
  77. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js +1 -1
  78. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js.map +1 -1
  79. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js +1 -1
  80. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js.map +1 -1
  81. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js +1 -1
  82. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js.map +1 -1
  83. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js +1 -1
  84. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js.map +1 -1
  85. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js +1 -1
  86. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js.map +1 -1
  87. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js +1 -1
  88. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js.map +1 -1
  89. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js +1 -1
  90. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js.map +1 -1
  91. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js +1 -1
  92. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js.map +1 -1
  93. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js +1 -1
  94. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js.map +1 -1
  95. package/cjs-bundle/components/IconMenu/index.js +1 -1
  96. package/cjs-bundle/components/IconMenu/index.js.map +1 -1
  97. package/cjs-bundle/components/KeyboardDateTimePicker.js +1 -1
  98. package/cjs-bundle/components/KeyboardDateTimePicker.js.map +1 -1
  99. package/cjs-bundle/components/LinkedText/LinkedText.js +2 -0
  100. package/cjs-bundle/components/LinkedText/LinkedText.js.map +1 -0
  101. package/cjs-bundle/components/LinkedText/LinkedText.scss.js +2 -0
  102. package/cjs-bundle/components/LinkedText/LinkedText.scss.js.map +1 -0
  103. package/cjs-bundle/components/NewDocumentViewer/utils.js +1 -1
  104. package/cjs-bundle/components/NewDocumentViewer/utils.js.map +1 -1
  105. package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js +1 -1
  106. package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js.map +1 -1
  107. package/cjs-bundle/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js +1 -1
  108. package/cjs-bundle/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js.map +1 -1
  109. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js +1 -1
  110. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js.map +1 -1
  111. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/index.js +1 -1
  112. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/index.js.map +1 -1
  113. package/cjs-bundle/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js +1 -1
  114. package/cjs-bundle/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js.map +1 -1
  115. package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js +1 -1
  116. package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js.map +1 -1
  117. package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/index.js +1 -1
  118. package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/index.js.map +1 -1
  119. package/cjs-bundle/components/OffsetWellPickerV3/components/WellHubView/index.js +1 -1
  120. package/cjs-bundle/components/OffsetWellPickerV3/components/WellHubView/index.js.map +1 -1
  121. package/cjs-bundle/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js +1 -1
  122. package/cjs-bundle/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js.map +1 -1
  123. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js +1 -1
  124. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js.map +1 -1
  125. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js +1 -1
  126. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js.map +1 -1
  127. package/cjs-bundle/components/PadOffsetsPicker/StagesSelector.js +1 -1
  128. package/cjs-bundle/components/PadOffsetsPicker/StagesSelector.js.map +1 -1
  129. package/cjs-bundle/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js +1 -1
  130. package/cjs-bundle/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js.map +1 -1
  131. package/cjs-bundle/components/PostInput/PostInput.js +1 -1
  132. package/cjs-bundle/components/PostInput/PostInput.js.map +1 -1
  133. package/cjs-bundle/components/UserMention/constants.js +1 -1
  134. package/cjs-bundle/components/UserMention/constants.js.map +1 -1
  135. package/cjs-bundle/components/UserMention/index.js +1 -1
  136. package/cjs-bundle/components/UserMention/index.js.map +1 -1
  137. package/cjs-bundle/components/index.js +1 -1
  138. package/cjs-bundle/componentsV2/ButtonIcon/ButtonIcon.js +1 -1
  139. package/cjs-bundle/componentsV2/ButtonIcon/ButtonIcon.js.map +1 -1
  140. package/cjs-bundle/componentsV2/ButtonIcon/ButtonIcon.scss.js +1 -1
  141. package/cjs-bundle/componentsV2/Modal/Modal.js +1 -1
  142. package/cjs-bundle/componentsV2/Modal/Modal.js.map +1 -1
  143. package/cjs-bundle/componentsV2/Modal/constants.js +2 -0
  144. package/cjs-bundle/componentsV2/Modal/constants.js.map +1 -0
  145. package/cjs-bundle/effects/useOutsideClick.js +1 -1
  146. package/cjs-bundle/effects/useOutsideClick.js.map +1 -1
  147. package/cjs-bundle/utils/fetchAttachment.js +2 -0
  148. package/cjs-bundle/utils/fetchAttachment.js.map +1 -0
  149. package/cjs-bundle/utils/links.js +2 -0
  150. package/cjs-bundle/utils/links.js.map +1 -0
  151. package/components/AddComment/Popover.js +1 -1
  152. package/components/AddComment/Popover.js.map +1 -1
  153. package/components/AddComment/components/Content.js +1 -1
  154. package/components/AddComment/components/Content.js.map +1 -1
  155. package/components/AssetEditor/AssetEditorAutocomplete.d.ts +96 -13
  156. package/components/AssetEditor/AssetEditorAutocomplete.d.ts.map +1 -1
  157. package/components/AssetEditor/AssetEditorAutocomplete.js +1 -1
  158. package/components/AssetEditor/AssetEditorAutocomplete.js.map +1 -1
  159. package/components/AssetEditorV2/index.d.ts +28 -12
  160. package/components/AssetEditorV2/index.d.ts.map +1 -1
  161. package/components/AssetEditorV2/index.js +1 -1
  162. package/components/AssetEditorV2/index.js.map +1 -1
  163. package/components/AttachmentLightbox/AttachmentDocument.d.ts +6 -0
  164. package/components/AttachmentLightbox/AttachmentDocument.d.ts.map +1 -0
  165. package/components/AttachmentLightbox/AttachmentDocument.js +2 -0
  166. package/components/AttachmentLightbox/AttachmentDocument.js.map +1 -0
  167. package/components/AttachmentLightbox/AttachmentLightbox.d.ts +9 -8
  168. package/components/AttachmentLightbox/AttachmentLightbox.d.ts.map +1 -1
  169. package/components/AttachmentLightbox/AttachmentLightbox.js +1 -1
  170. package/components/AttachmentLightbox/AttachmentLightbox.js.map +1 -1
  171. package/components/AttachmentLightbox/AttachmentLightbox.scss.js +1 -1
  172. package/components/AttachmentLightbox/AttachmentPreviewPane.d.ts +9 -0
  173. package/components/AttachmentLightbox/AttachmentPreviewPane.d.ts.map +1 -0
  174. package/components/AttachmentLightbox/AttachmentPreviewPane.js +2 -0
  175. package/components/AttachmentLightbox/AttachmentPreviewPane.js.map +1 -0
  176. package/components/AttachmentLightbox/__tests__/AttachmentDocument.test.d.ts +2 -0
  177. package/components/AttachmentLightbox/__tests__/AttachmentDocument.test.d.ts.map +1 -0
  178. package/components/AttachmentLightbox/__tests__/AttachmentLightbox.test.d.ts +2 -0
  179. package/components/AttachmentLightbox/__tests__/AttachmentLightbox.test.d.ts.map +1 -0
  180. package/components/AttachmentLightbox/__tests__/copyImageToClipboard.test.d.ts +2 -0
  181. package/components/AttachmentLightbox/__tests__/copyImageToClipboard.test.d.ts.map +1 -0
  182. package/components/AttachmentLightbox/__tests__/downloadAttachment.test.d.ts +2 -0
  183. package/components/AttachmentLightbox/__tests__/downloadAttachment.test.d.ts.map +1 -0
  184. package/components/AttachmentLightbox/__tests__/useZoomPan.test.d.ts +2 -0
  185. package/components/AttachmentLightbox/__tests__/useZoomPan.test.d.ts.map +1 -0
  186. package/components/AttachmentLightbox/copyImageToClipboard.d.ts +4 -0
  187. package/components/AttachmentLightbox/copyImageToClipboard.d.ts.map +1 -0
  188. package/components/AttachmentLightbox/copyImageToClipboard.js +2 -0
  189. package/components/AttachmentLightbox/copyImageToClipboard.js.map +1 -0
  190. package/components/AttachmentLightbox/downloadAttachment.d.ts +10 -0
  191. package/components/AttachmentLightbox/downloadAttachment.d.ts.map +1 -0
  192. package/components/AttachmentLightbox/downloadAttachment.js +2 -0
  193. package/components/AttachmentLightbox/downloadAttachment.js.map +1 -0
  194. package/components/AttachmentLightbox/useAttachmentLightbox.d.ts +6 -2
  195. package/components/AttachmentLightbox/useAttachmentLightbox.d.ts.map +1 -1
  196. package/components/AttachmentLightbox/useAttachmentLightbox.js +1 -1
  197. package/components/AttachmentLightbox/useAttachmentLightbox.js.map +1 -1
  198. package/components/AttachmentLightbox/useZoomPan.d.ts +29 -0
  199. package/components/AttachmentLightbox/useZoomPan.d.ts.map +1 -0
  200. package/components/AttachmentLightbox/useZoomPan.js +2 -0
  201. package/components/AttachmentLightbox/useZoomPan.js.map +1 -0
  202. package/components/AttachmentPreview/AttachmentActionsMenu.d.ts +16 -0
  203. package/components/AttachmentPreview/AttachmentActionsMenu.d.ts.map +1 -0
  204. package/components/AttachmentPreview/AttachmentActionsMenu.js +2 -0
  205. package/components/AttachmentPreview/AttachmentActionsMenu.js.map +1 -0
  206. package/components/AttachmentPreview/AttachmentDownloadLink.d.ts +11 -0
  207. package/components/AttachmentPreview/AttachmentDownloadLink.d.ts.map +1 -0
  208. package/components/AttachmentPreview/AttachmentDownloadLink.js +2 -0
  209. package/components/AttachmentPreview/AttachmentDownloadLink.js.map +1 -0
  210. package/components/AttachmentPreview/AttachmentImage.d.ts +12 -0
  211. package/components/AttachmentPreview/AttachmentImage.d.ts.map +1 -0
  212. package/components/AttachmentPreview/AttachmentImage.js +2 -0
  213. package/components/AttachmentPreview/AttachmentImage.js.map +1 -0
  214. package/components/AttachmentPreview/AttachmentPreview.d.ts.map +1 -1
  215. package/components/AttachmentPreview/AttachmentPreview.js +1 -1
  216. package/components/AttachmentPreview/AttachmentPreview.js.map +1 -1
  217. package/components/AttachmentPreview/AttachmentPreview.scss.js +1 -1
  218. package/components/AttachmentPreview/AttachmentPreview.types.d.ts +7 -0
  219. package/components/AttachmentPreview/AttachmentPreview.types.d.ts.map +1 -1
  220. package/components/AttachmentPreview/AttachmentRow.d.ts +7 -3
  221. package/components/AttachmentPreview/AttachmentRow.d.ts.map +1 -1
  222. package/components/AttachmentPreview/AttachmentRow.js +1 -1
  223. package/components/AttachmentPreview/AttachmentRow.js.map +1 -1
  224. package/components/AttachmentPreview/AttachmentTile.d.ts +5 -1
  225. package/components/AttachmentPreview/AttachmentTile.d.ts.map +1 -1
  226. package/components/AttachmentPreview/AttachmentTile.js +1 -1
  227. package/components/AttachmentPreview/AttachmentTile.js.map +1 -1
  228. package/components/AttachmentPreview/__tests__/AttachmentActionsMenu.test.d.ts +2 -0
  229. package/components/AttachmentPreview/__tests__/AttachmentActionsMenu.test.d.ts.map +1 -0
  230. package/components/AttachmentPreview/__tests__/AttachmentDownloadLink.test.d.ts +2 -0
  231. package/components/AttachmentPreview/__tests__/AttachmentDownloadLink.test.d.ts.map +1 -0
  232. package/components/AttachmentPreview/__tests__/AttachmentImage.test.d.ts +2 -0
  233. package/components/AttachmentPreview/__tests__/AttachmentImage.test.d.ts.map +1 -0
  234. package/components/AttachmentPreview/__tests__/AttachmentTile.test.d.ts +2 -0
  235. package/components/AttachmentPreview/__tests__/AttachmentTile.test.d.ts.map +1 -0
  236. package/components/AttachmentPreview/__tests__/useStoredAttachments.test.d.ts +2 -0
  237. package/components/AttachmentPreview/__tests__/useStoredAttachments.test.d.ts.map +1 -0
  238. package/components/AttachmentPreview/useStoredAttachment.d.ts +8 -0
  239. package/components/AttachmentPreview/useStoredAttachment.d.ts.map +1 -1
  240. package/components/AttachmentPreview/useStoredAttachment.js +2 -0
  241. package/components/AttachmentPreview/useStoredAttachment.js.map +1 -0
  242. package/components/AttachmentPreview/useStoredAttachments.d.ts +1 -1
  243. package/components/AttachmentPreview/useStoredAttachments.d.ts.map +1 -1
  244. package/components/AttachmentPreview/useStoredAttachments.js +1 -1
  245. package/components/AttachmentPreview/useStoredAttachments.js.map +1 -1
  246. package/components/BICOffsetPickerDialog/index.js +1 -1
  247. package/components/BICOffsetPickerDialog/index.js.map +1 -1
  248. package/components/Casing/CasingTableV2/components/CasingJoints/Editor.js +1 -1
  249. package/components/Casing/CasingTableV2/components/CasingJoints/Editor.js.map +1 -1
  250. package/components/Casing/CasingTableV2/components/Component.js +1 -1
  251. package/components/Casing/CasingTableV2/components/Component.js.map +1 -1
  252. package/components/Casing/CasingTableV2/components/DrillPipe/Editor.js +1 -1
  253. package/components/Casing/CasingTableV2/components/DrillPipe/Editor.js.map +1 -1
  254. package/components/CommentCard/CommentCard.d.ts.map +1 -1
  255. package/components/CommentCard/CommentCard.js +1 -1
  256. package/components/CommentCard/CommentCard.js.map +1 -1
  257. package/components/CommentCard/CommentCard.types.d.ts +2 -0
  258. package/components/CommentCard/CommentCard.types.d.ts.map +1 -1
  259. package/components/CommentCard/CommentMenu.d.ts.map +1 -1
  260. package/components/CommentCard/CommentMenu.js +1 -1
  261. package/components/CommentCard/CommentMenu.js.map +1 -1
  262. package/components/CommentComposer/CommentComposer.d.ts.map +1 -1
  263. package/components/CommentComposer/CommentComposer.js +1 -1
  264. package/components/CommentComposer/CommentComposer.js.map +1 -1
  265. package/components/CommentComposer/CommentReplyInput.d.ts.map +1 -1
  266. package/components/CommentComposer/CommentReplyInput.js +1 -1
  267. package/components/CommentComposer/CommentReplyInput.js.map +1 -1
  268. package/components/CommentComposer/__tests__/useAttachmentUpload.linked.test.d.ts +2 -0
  269. package/components/CommentComposer/__tests__/useAttachmentUpload.linked.test.d.ts.map +1 -0
  270. package/components/CommentComposer/useAttachmentUpload.d.ts +1 -0
  271. package/components/CommentComposer/useAttachmentUpload.d.ts.map +1 -1
  272. package/components/CommentComposer/useAttachmentUpload.js +1 -1
  273. package/components/CommentComposer/useAttachmentUpload.js.map +1 -1
  274. package/components/CommentInputNext/CommentInputNext.d.ts +2 -0
  275. package/components/CommentInputNext/CommentInputNext.d.ts.map +1 -1
  276. package/components/CommentInputNext/CommentInputNext.js +1 -1
  277. package/components/CommentInputNext/CommentInputNext.js.map +1 -1
  278. package/components/CommentInputNext/__tests__/useFilePaste.test.d.ts +2 -0
  279. package/components/CommentInputNext/__tests__/useFilePaste.test.d.ts.map +1 -0
  280. package/components/CommentInputNext/useFilePaste.d.ts +17 -0
  281. package/components/CommentInputNext/useFilePaste.d.ts.map +1 -0
  282. package/components/CommentInputNext/useFilePaste.js +2 -0
  283. package/components/CommentInputNext/useFilePaste.js.map +1 -0
  284. package/components/DevCenter/AppsDataProvider/AppsDataProvider.d.ts +5 -1
  285. package/components/DevCenter/AppsDataProvider/AppsDataProvider.d.ts.map +1 -1
  286. package/components/DevCenter/AppsDataProvider/AppsDataProvider.js +1 -1
  287. package/components/DevCenter/AppsDataProvider/AppsDataProvider.js.map +1 -1
  288. package/components/DocumentViewer/DocumentViewer.js +1 -1
  289. package/components/DocumentViewer/DocumentViewer.js.map +1 -1
  290. package/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js +1 -1
  291. package/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js.map +1 -1
  292. package/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js +1 -1
  293. package/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js.map +1 -1
  294. package/components/Drillstring/BHAComponentsTable/components/Component.js +1 -1
  295. package/components/Drillstring/BHAComponentsTable/components/Component.js.map +1 -1
  296. package/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js +1 -1
  297. package/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js.map +1 -1
  298. package/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js +1 -1
  299. package/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js.map +1 -1
  300. package/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js +1 -1
  301. package/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js.map +1 -1
  302. package/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js +1 -1
  303. package/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js.map +1 -1
  304. package/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js +1 -1
  305. package/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js.map +1 -1
  306. package/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js +1 -1
  307. package/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js.map +1 -1
  308. package/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js +1 -1
  309. package/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js.map +1 -1
  310. package/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js +1 -1
  311. package/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js.map +1 -1
  312. package/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js +1 -1
  313. package/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js.map +1 -1
  314. package/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js +1 -1
  315. package/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js.map +1 -1
  316. package/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js +1 -1
  317. package/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js.map +1 -1
  318. package/components/IconMenu/index.d.ts +67 -21
  319. package/components/IconMenu/index.d.ts.map +1 -1
  320. package/components/IconMenu/index.js +1 -1
  321. package/components/IconMenu/index.js.map +1 -1
  322. package/components/KeyboardDateTimePicker.d.ts +6 -7
  323. package/components/KeyboardDateTimePicker.d.ts.map +1 -1
  324. package/components/KeyboardDateTimePicker.js +1 -1
  325. package/components/KeyboardDateTimePicker.js.map +1 -1
  326. package/components/LinkedText/LinkedText.d.ts +17 -0
  327. package/components/LinkedText/LinkedText.d.ts.map +1 -0
  328. package/components/LinkedText/LinkedText.js +2 -0
  329. package/components/LinkedText/LinkedText.js.map +1 -0
  330. package/components/LinkedText/LinkedText.scss.js +2 -0
  331. package/components/LinkedText/LinkedText.scss.js.map +1 -0
  332. package/components/LinkedText/__tests__/LinkedText.test.d.ts +2 -0
  333. package/components/LinkedText/__tests__/LinkedText.test.d.ts.map +1 -0
  334. package/components/LinkedText/index.d.ts +2 -0
  335. package/components/LinkedText/index.d.ts.map +1 -0
  336. package/components/NewDocumentViewer/utils.d.ts.map +1 -1
  337. package/components/NewDocumentViewer/utils.js +1 -1
  338. package/components/NewDocumentViewer/utils.js.map +1 -1
  339. package/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js +1 -1
  340. package/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js.map +1 -1
  341. package/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js +1 -1
  342. package/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js.map +1 -1
  343. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js +1 -1
  344. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js.map +1 -1
  345. package/components/OffsetWellPickerV3/components/CustomSelectionView/index.js +1 -1
  346. package/components/OffsetWellPickerV3/components/CustomSelectionView/index.js.map +1 -1
  347. package/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js +1 -1
  348. package/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js.map +1 -1
  349. package/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js +1 -1
  350. package/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js.map +1 -1
  351. package/components/OffsetWellPickerV3/components/TabSelection/index.js +1 -1
  352. package/components/OffsetWellPickerV3/components/TabSelection/index.js.map +1 -1
  353. package/components/OffsetWellPickerV3/components/WellHubView/index.js +1 -1
  354. package/components/OffsetWellPickerV3/components/WellHubView/index.js.map +1 -1
  355. package/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js +1 -1
  356. package/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js.map +1 -1
  357. package/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js +1 -1
  358. package/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js.map +1 -1
  359. package/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js +1 -1
  360. package/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js.map +1 -1
  361. package/components/PadOffsetsPicker/StagesSelector.js +1 -1
  362. package/components/PadOffsetsPicker/StagesSelector.js.map +1 -1
  363. package/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js +1 -1
  364. package/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js.map +1 -1
  365. package/components/PostInput/PostInput.d.ts +20 -10
  366. package/components/PostInput/PostInput.d.ts.map +1 -1
  367. package/components/PostInput/PostInput.js +1 -1
  368. package/components/PostInput/PostInput.js.map +1 -1
  369. package/components/UserMention/__tests__/highlightLinks.test.d.ts +2 -0
  370. package/components/UserMention/__tests__/highlightLinks.test.d.ts.map +1 -0
  371. package/components/UserMention/constants.d.ts +1 -0
  372. package/components/UserMention/constants.d.ts.map +1 -1
  373. package/components/UserMention/constants.js +1 -1
  374. package/components/UserMention/constants.js.map +1 -1
  375. package/components/UserMention/index.js +1 -1
  376. package/components/UserMention/index.js.map +1 -1
  377. package/components/index.d.ts +2 -0
  378. package/components/index.d.ts.map +1 -1
  379. package/components/index.js +1 -1
  380. package/componentsV2/ButtonIcon/ButtonIcon.d.ts +2 -0
  381. package/componentsV2/ButtonIcon/ButtonIcon.d.ts.map +1 -1
  382. package/componentsV2/ButtonIcon/ButtonIcon.js +1 -1
  383. package/componentsV2/ButtonIcon/ButtonIcon.js.map +1 -1
  384. package/componentsV2/ButtonIcon/ButtonIcon.scss.js +1 -1
  385. package/componentsV2/ButtonIcon/ButtonIcon.stories.d.ts +1 -0
  386. package/componentsV2/ButtonIcon/ButtonIcon.stories.d.ts.map +1 -1
  387. package/componentsV2/Modal/Modal.d.ts.map +1 -1
  388. package/componentsV2/Modal/Modal.js +1 -1
  389. package/componentsV2/Modal/Modal.js.map +1 -1
  390. package/componentsV2/Modal/constants.d.ts +3 -0
  391. package/componentsV2/Modal/constants.d.ts.map +1 -0
  392. package/componentsV2/Modal/constants.js +2 -0
  393. package/componentsV2/Modal/constants.js.map +1 -0
  394. package/effects/__tests__/useOutsideClick.test.d.ts.map +1 -1
  395. package/effects/useOutsideClick.d.ts.map +1 -1
  396. package/effects/useOutsideClick.js +1 -1
  397. package/effects/useOutsideClick.js.map +1 -1
  398. package/mcp-server/server.mjs +35 -9
  399. package/package.json +1 -1
  400. package/tsconfig.tsbuildinfo +1 -1
  401. package/utils/__tests__/fetchAttachment.test.d.ts +2 -0
  402. package/utils/__tests__/fetchAttachment.test.d.ts.map +1 -0
  403. package/utils/__tests__/links.test.d.ts +2 -0
  404. package/utils/__tests__/links.test.d.ts.map +1 -0
  405. package/utils/fetchAttachment.d.ts +3 -0
  406. package/utils/fetchAttachment.d.ts.map +1 -0
  407. package/utils/fetchAttachment.js +2 -0
  408. package/utils/fetchAttachment.js.map +1 -0
  409. package/utils/links.d.ts +14 -0
  410. package/utils/links.d.ts.map +1 -0
  411. package/utils/links.js +2 -0
  412. package/utils/links.js.map +1 -0
@@ -1 +1 @@
1
- {"version":3,"file":"ConfirmationPopup.js","sources":["../../../../../../src/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js"],"sourcesContent":["import PropTypes from 'prop-types';\nimport { Button, withStyles, makeStyles } from '@material-ui/core';\n\nimport { isMobileDetected } from '~/utils/mobileDetect';\nimport { Modal, Typography } from '~/components';\n\nconst StyledButton = withStyles({ root: { height: '36px' } })(Button);\nconst ClearAllButton = withStyles({ root: { margin: '0 16px 0 auto' } })(StyledButton);\nconst StyledText = withStyles({ root: { color: '#bdbdbd' } })(Typography.Regular16);\n\nexport const useStyles = makeStyles(theme => ({\n paper: {\n minWidth: ({ isMobile }) => (isMobile ? 0 : '416px'),\n minHeight: ({ isMobile }) => isMobile && '240px !important',\n maxWidth: ({ isMobile }) => isMobile && 'calc(100% - 24px)',\n },\n content: {\n width: ({ isMobile }) => (isMobile ? 'auto' : '300px'),\n color: theme.palette.primary.text6,\n },\n}));\n\nexport const ConfirmationPopup = ({ title, text, okText, handleClose, handleOk }) => {\n const styles = useStyles({ isMobile: isMobileDetected });\n\n return (\n <Modal\n open\n onClose={handleClose}\n title={title}\n isMobile={false}\n actions={\n <>\n <ClearAllButton color=\"primary\" onClick={handleClose}>\n Cancel\n </ClearAllButton>\n\n <StyledButton variant=\"contained\" color=\"primary\" onClick={handleOk}>\n {okText || 'OK'}\n </StyledButton>\n </>\n }\n contentContainerClassName={styles.paper}\n >\n <div className={styles.content}>\n <StyledText>{text}</StyledText>\n </div>\n </Modal>\n );\n};\n\nConfirmationPopup.propTypes = {\n title: PropTypes.string.isRequired,\n okText: PropTypes.string.isRequired,\n text: PropTypes.string.isRequired,\n handleClose: PropTypes.func.isRequired,\n handleOk: PropTypes.func.isRequired,\n};\n"],"names":["StyledButton","withStyles","root","height","Button","ClearAllButton","margin","StyledText","color","Typography","useStyles","makeStyles","theme","paper","minWidth","_ref","isMobile","minHeight","_ref2","maxWidth","_ref3","content","width","_ref4","palette","primary","text6","ConfirmationPopup","_ref5","title","text","okText","handleClose","handleOk","styles","isMobileDetected","_jsx","Modal","open","onClose","actions","_jsxs","_Fragment","children","onClick","variant","contentContainerClassName","className","propTypes","PropTypes","string","isRequired","func"],"mappings":"+q9BAMA,IAAMA,EAAeC,EAAW,CAAEC,KAAM,CAAEC,OAAQ,SAA7BF,CAAyCG,GACxDC,EAAiBJ,EAAW,CAAEC,KAAM,CAAEI,OAAQ,kBAA7BL,CAAkDD,GACnEO,EAAaN,EAAW,CAAEC,KAAM,CAAEM,MAAO,YAA5BP,CAA2CQ,GAEjDC,EAAYC,GAAW,SAAAC,GAAK,MAAK,CAC5CC,MAAO,CACLC,SAAU,SAAAC,GAAW,SAARC,SAA2B,EAAI,OAAQ,EACpDC,UAAW,SAAAC,GAAW,SAARF,UAA2B,kBAAkB,EAC3DG,SAAU,SAAAC,GAAW,SAARJ,UAA2B,mBAAmB,GAE7DK,QAAS,CACPC,MAAO,SAAAC,GAAW,SAARP,SAA2B,OAAS,OAAQ,EACtDR,MAAOI,EAAMY,QAAQC,QAAQC,OAEhC,IAEYC,EAAoB,SAAoDC,GAAA,IAAjDC,IAAAA,MAAOC,IAAAA,KAAMC,IAAAA,OAAQC,IAAAA,YAAaC,IAAAA,SAC9DC,EAASxB,EAAU,CAAEM,SAAUmB,IAErC,OACEC,EAACC,EAAK,CACJC,MAAI,EACJC,QAASP,EACTH,MAAOA,EACPb,UAAU,EACVwB,QACEC,EAAAC,EAAA,CAAAC,SAAA,CACEP,EAAC/B,EAAc,CAACG,MAAM,UAAUoC,QAASZ,EAAYW,SAAA,WAIrDP,EAACpC,EAAY,CAAC6C,QAAQ,YAAYrC,MAAM,UAAUoC,QAASX,EAASU,SACjEZ,GAAU,UAIjBe,0BAA2BZ,EAAOrB,MAAM8B,SAExCP,EAAA,MAAA,CAAKW,UAAWb,EAAOb,QAAQsB,SAC7BP,EAAC7B,EAAU,CAAAoC,SAAEb,OAIrB,EAEAH,EAAkBqB,UAAY,CAC5BnB,MAAOoB,EAAUC,OAAOC,WACxBpB,OAAQkB,EAAUC,OAAOC,WACzBrB,KAAMmB,EAAUC,OAAOC,WACvBnB,YAAaiB,EAAUG,KAAKD,WAC5BlB,SAAUgB,EAAUG,KAAKD"}
1
+ {"version":3,"file":"ConfirmationPopup.js","sources":["../../../../../../src/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js"],"sourcesContent":["import PropTypes from 'prop-types';\nimport { Button, withStyles, makeStyles } from '@material-ui/core';\n\nimport { isMobileDetected } from '~/utils/mobileDetect';\nimport { Modal, Typography } from '~/components';\n\nconst StyledButton = withStyles({ root: { height: '36px' } })(Button);\nconst ClearAllButton = withStyles({ root: { margin: '0 16px 0 auto' } })(StyledButton);\nconst StyledText = withStyles({ root: { color: '#bdbdbd' } })(Typography.Regular16);\n\nexport const useStyles = makeStyles(theme => ({\n paper: {\n minWidth: ({ isMobile }) => (isMobile ? 0 : '416px'),\n minHeight: ({ isMobile }) => isMobile && '240px !important',\n maxWidth: ({ isMobile }) => isMobile && 'calc(100% - 24px)',\n },\n content: {\n width: ({ isMobile }) => (isMobile ? 'auto' : '300px'),\n color: theme.palette.primary.text6,\n },\n}));\n\nexport const ConfirmationPopup = ({ title, text, okText, handleClose, handleOk }) => {\n const styles = useStyles({ isMobile: isMobileDetected });\n\n return (\n <Modal\n open\n onClose={handleClose}\n title={title}\n isMobile={false}\n actions={\n <>\n <ClearAllButton color=\"primary\" onClick={handleClose}>\n Cancel\n </ClearAllButton>\n\n <StyledButton variant=\"contained\" color=\"primary\" onClick={handleOk}>\n {okText || 'OK'}\n </StyledButton>\n </>\n }\n contentContainerClassName={styles.paper}\n >\n <div className={styles.content}>\n <StyledText>{text}</StyledText>\n </div>\n </Modal>\n );\n};\n\nConfirmationPopup.propTypes = {\n title: PropTypes.string.isRequired,\n okText: PropTypes.string.isRequired,\n text: PropTypes.string.isRequired,\n handleClose: PropTypes.func.isRequired,\n handleOk: PropTypes.func.isRequired,\n};\n"],"names":["StyledButton","withStyles","root","height","Button","ClearAllButton","margin","StyledText","color","Typography","useStyles","makeStyles","theme","paper","minWidth","_ref","isMobile","minHeight","_ref2","maxWidth","_ref3","content","width","_ref4","palette","primary","text6","ConfirmationPopup","_ref5","title","text","okText","handleClose","handleOk","styles","isMobileDetected","_jsx","Modal","open","onClose","actions","_jsxs","_Fragment","children","onClick","variant","contentContainerClassName","className","propTypes","PropTypes","string","isRequired","func"],"mappings":"qx9BAMA,IAAMA,EAAeC,EAAW,CAAEC,KAAM,CAAEC,OAAQ,SAA7BF,CAAyCG,GACxDC,EAAiBJ,EAAW,CAAEC,KAAM,CAAEI,OAAQ,kBAA7BL,CAAkDD,GACnEO,EAAaN,EAAW,CAAEC,KAAM,CAAEM,MAAO,YAA5BP,CAA2CQ,GAEjDC,EAAYC,GAAW,SAAAC,GAAK,MAAK,CAC5CC,MAAO,CACLC,SAAU,SAAAC,GAAW,SAARC,SAA2B,EAAI,OAAQ,EACpDC,UAAW,SAAAC,GAAW,SAARF,UAA2B,kBAAkB,EAC3DG,SAAU,SAAAC,GAAW,SAARJ,UAA2B,mBAAmB,GAE7DK,QAAS,CACPC,MAAO,SAAAC,GAAW,SAARP,SAA2B,OAAS,OAAQ,EACtDR,MAAOI,EAAMY,QAAQC,QAAQC,OAEhC,IAEYC,EAAoB,SAAoDC,GAAA,IAAjDC,IAAAA,MAAOC,IAAAA,KAAMC,IAAAA,OAAQC,IAAAA,YAAaC,IAAAA,SAC9DC,EAASxB,EAAU,CAAEM,SAAUmB,IAErC,OACEC,EAACC,EAAK,CACJC,MAAI,EACJC,QAASP,EACTH,MAAOA,EACPb,UAAU,EACVwB,QACEC,EAAAC,EAAA,CAAAC,SAAA,CACEP,EAAC/B,EAAc,CAACG,MAAM,UAAUoC,QAASZ,EAAYW,SAAA,WAIrDP,EAACpC,EAAY,CAAC6C,QAAQ,YAAYrC,MAAM,UAAUoC,QAASX,EAASU,SACjEZ,GAAU,UAIjBe,0BAA2BZ,EAAOrB,MAAM8B,SAExCP,EAAA,MAAA,CAAKW,UAAWb,EAAOb,QAAQsB,SAC7BP,EAAC7B,EAAU,CAAAoC,SAAEb,OAIrB,EAEAH,EAAkBqB,UAAY,CAC5BnB,MAAOoB,EAAUC,OAAOC,WACxBpB,OAAQkB,EAAUC,OAAOC,WACzBrB,KAAMmB,EAAUC,OAAOC,WACvBnB,YAAaiB,EAAUG,KAAKD,WAC5BlB,SAAUgB,EAAUG,KAAKD"}
@@ -1,30 +1,76 @@
1
- import IconButton from '../IconButton';
2
- declare const _default: import("react").ComponentType<Pick<import("@material-ui/types").ConsistentWith<{
3
- IconButtonComponent?: typeof IconButton | undefined;
4
- IconElement?: import("react").JSX.Element | undefined;
5
- anchorOrigin?: {
6
- horizontal: string;
7
- vertical: string;
8
- } | undefined;
1
+ import PropTypes from 'prop-types';
2
+ declare const _default: import("react").ComponentType<Pick<Pick<Pick<{
3
+ IconButtonComponent: any;
4
+ IconElement: any;
5
+ anchorOrigin: any;
9
6
  children: any;
10
7
  className: any;
11
- classes?: {} | undefined;
8
+ classes: any;
12
9
  color: any;
13
10
  "data-testid": any;
14
- disableRipple?: boolean | undefined;
15
- disabled?: boolean | undefined;
16
- iconButtonProps?: {} | undefined;
11
+ disableRipple: any;
12
+ disabled: any;
13
+ iconButtonProps: any;
17
14
  iconButtonStyle: any;
18
15
  marginThreshold: any;
19
- menuProps?: {} | undefined;
20
- paperClassName?: string | undefined;
16
+ menuProps: any;
17
+ paperClassName: any;
21
18
  tooltipProps: any;
22
- transformOrigin?: {
23
- horizontal: string;
24
- vertical: string;
25
- } | undefined;
26
- }, {
27
- classes: import("@material-ui/styles").ClassNameMap<"iconButton" | "paper">;
28
- }>, "IconButtonComponent" | "IconElement" | "anchorOrigin" | "children" | "className" | "color" | "data-testid" | "disableRipple" | "disabled" | "iconButtonProps" | "iconButtonStyle" | "marginThreshold" | "menuProps" | "paperClassName" | "tooltipProps" | "transformOrigin"> & import("@material-ui/styles").StyledComponentProps<"iconButton" | "paper">>;
19
+ transformOrigin: any;
20
+ }, never> & Pick<PropTypes.InferProps<{
21
+ children: PropTypes.Requireable<NonNullable<any[] | PropTypes.ReactNodeLike>>;
22
+ classes: PropTypes.Requireable<PropTypes.InferProps<{
23
+ iconButton: PropTypes.Requireable<string>;
24
+ paper: PropTypes.Requireable<string>;
25
+ }>>;
26
+ className: PropTypes.Requireable<string>;
27
+ color: PropTypes.Requireable<string>;
28
+ IconElement: PropTypes.Requireable<PropTypes.ReactElementLike>;
29
+ IconButtonComponent: PropTypes.Requireable<any>;
30
+ iconButtonStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
31
+ anchorOrigin: PropTypes.Requireable<PropTypes.InferProps<{
32
+ horizontal: PropTypes.Requireable<string>;
33
+ vertical: PropTypes.Requireable<string>;
34
+ }>>;
35
+ transformOrigin: PropTypes.Requireable<PropTypes.InferProps<{
36
+ horizontal: PropTypes.Requireable<string>;
37
+ vertical: PropTypes.Requireable<string>;
38
+ }>>;
39
+ disableRipple: PropTypes.Requireable<boolean>;
40
+ 'data-testid': PropTypes.Requireable<string>;
41
+ marginThreshold: PropTypes.Requireable<number>;
42
+ disabled: PropTypes.Requireable<boolean>;
43
+ tooltipProps: PropTypes.Requireable<PropTypes.InferProps<{}>>;
44
+ menuProps: PropTypes.Requireable<PropTypes.InferProps<{}>>;
45
+ iconButtonProps: PropTypes.Requireable<PropTypes.InferProps<{}>>;
46
+ paperClassName: PropTypes.Requireable<string>;
47
+ }>, "IconButtonComponent" | "IconElement" | "anchorOrigin" | "children" | "className" | "classes" | "color" | "data-testid" | "disableRipple" | "disabled" | "iconButtonProps" | "iconButtonStyle" | "marginThreshold" | "menuProps" | "paperClassName" | "tooltipProps" | "transformOrigin">, never> & {
48
+ children?: NonNullable<any[] | PropTypes.ReactNodeLike> | null | undefined;
49
+ classes?: PropTypes.InferProps<{
50
+ iconButton: PropTypes.Requireable<string>;
51
+ paper: PropTypes.Requireable<string>;
52
+ }> | null | undefined;
53
+ className?: string | null | undefined;
54
+ color?: string | null | undefined;
55
+ IconElement?: PropTypes.ReactElementLike | null | undefined;
56
+ IconButtonComponent?: any;
57
+ iconButtonStyle?: PropTypes.InferProps<{}> | null | undefined;
58
+ anchorOrigin?: PropTypes.InferProps<{
59
+ horizontal: PropTypes.Requireable<string>;
60
+ vertical: PropTypes.Requireable<string>;
61
+ }> | null | undefined;
62
+ transformOrigin?: PropTypes.InferProps<{
63
+ horizontal: PropTypes.Requireable<string>;
64
+ vertical: PropTypes.Requireable<string>;
65
+ }> | null | undefined;
66
+ disableRipple?: boolean | null | undefined;
67
+ 'data-testid'?: string | null | undefined;
68
+ marginThreshold?: number | null | undefined;
69
+ disabled?: boolean | null | undefined;
70
+ tooltipProps?: PropTypes.InferProps<{}> | null | undefined;
71
+ menuProps?: PropTypes.InferProps<{}> | null | undefined;
72
+ iconButtonProps?: PropTypes.InferProps<{}> | null | undefined;
73
+ paperClassName?: string | null | undefined;
74
+ } & {}, "IconButtonComponent" | "IconElement" | "anchorOrigin" | "children" | "className" | "color" | "data-testid" | "disableRipple" | "disabled" | "iconButtonProps" | "iconButtonStyle" | "marginThreshold" | "menuProps" | "paperClassName" | "tooltipProps" | "transformOrigin"> & import("@material-ui/styles").StyledComponentProps<"iconButton" | "paper">>;
29
75
  export default _default;
30
76
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/IconMenu/index.js"],"names":[],"mappings":"AAKA,OAAO,UAAU,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/IconMenu/index.js"],"names":[],"mappings":"AACA,OAAO,SAAS,MAAM,YAAY,CAAC"}
@@ -1,2 +1,2 @@
1
- import o from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/slicedToArray";import{useState as r,useEffect as t}from"react";import n from"prop-types";import{withStyles as i,Tooltip as a,Menu as s}from"@material-ui/core";import{MoreVert as p}from"@material-ui/icons";import c from"../IconButton/index.js";import{jsx as l,jsxs as u,Fragment as d}from"react/jsx-runtime";function m(o,e){var r=Object.keys(o);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(o);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable}))),r.push.apply(r,t)}return r}function h(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?m(Object(t),!0).forEach((function(r){o(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):m(Object(t)).forEach((function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(t,o))}))}return e}function f(o){var n=o.classes,i=void 0===n?b:n,p=o["data-testid"],c=o.iconButtonStyle,m=o.color,f=o.disableRipple,B=void 0!==f&&f,T=o.className,w=o.IconElement,C=void 0===w?g:w,x=o.IconButtonComponent,D=void 0===x?O:x,I=o.disabled,N=void 0!==I&&I,R=o.iconButtonProps,E=void 0===R?j:R,k=o.children,z=o.anchorOrigin,S=void 0===z?v:z,M=o.transformOrigin,A=void 0===M?y:M,F=o.marginThreshold,L=o.menuProps,q=void 0===L?P:L,G=o.tooltipProps,H=o.paperClassName,J=void 0===H?"":H,K=r(null),Q=e(K,2),U=Q[0],V=Q[1],W=!!U,X=r(!1),Y=e(X,2),Z=Y[0],$=Y[1];t((function(){var o;return W&&setTimeout((function(){o=$(W)}),500),function(){o&&clearTimeout(o)}}),[W]);var _=function(o){o.stopPropagation(),V(null),$(!1)},oo=l(D,h(h({"aria-label":"IconMenu","aria-owns":W?"icon-menu":void 0,"aria-haspopup":"true","data-testid":p,onClick:function(o){o.stopPropagation(),o.preventDefault(),V(o.currentTarget)},classes:{root:i.iconButton},className:T,style:c,color:m,disableRipple:B,disabled:N},E),{},{children:C}));return u(d,{children:[G?l(a,h(h({},G),{},{children:oo})):oo,l(s,h(h({id:"icon-menu",anchorEl:U,open:W,MenuListProps:{"data-testid":"".concat(p,"Dropdown")},disableAutoFocus:!Z,autoFocus:Z,onClose:_,onClick:_,anchorOrigin:S,transformOrigin:A,classes:{paper:i.paper},elevation:0,marginThreshold:F,PaperProps:{className:i[J]}},q),{},{children:k}))]})}f.propTypes={children:n.oneOfType([n.string,n.node,n.array]),classes:n.shape({iconButton:n.string,paper:n.string}),className:n.string,color:n.string,IconElement:n.element,IconButtonComponent:n.any,iconButtonStyle:n.shape({}),anchorOrigin:n.shape({horizontal:n.oneOf(["left","center","right"]),vertical:n.oneOf(["top","center","bottom"])}),transformOrigin:n.shape({horizontal:n.oneOf(["left","center","right"]),vertical:n.oneOf(["top","center","bottom"])}),disableRipple:n.bool,"data-testid":n.string,marginThreshold:n.number,disabled:n.bool,tooltipProps:n.shape({}),menuProps:n.shape({}),iconButtonProps:n.shape({}),paperClassName:n.string};var b={},g=l(p,{}),O=c,v={horizontal:"right",vertical:"top"},y={horizontal:"right",vertical:"bottom"},P={},j={},B=i((function(o){return{iconButton:{borderRadius:8,padding:"10px",color:o.palette.primary.text6,"&:hover":{color:o.palette.primary.text1,backgroundColor:"rgba(255, 255, 255, 0.16)"},"& .MuiTouchRipple-child":{borderRadius:8}},paper:{}}}))(f);export{B as default};
1
+ import o from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/slicedToArray";import{useState as r,useEffect as t}from"react";import n from"prop-types";import{withStyles as i,Tooltip as a,Menu as s}from"@material-ui/core";import{MoreVert as p}from"@material-ui/icons";import l from"../IconButton/index.js";import{jsx as c,jsxs as u,Fragment as d}from"react/jsx-runtime";function m(o,e){var r=Object.keys(o);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(o);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable}))),r.push.apply(r,t)}return r}function h(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?m(Object(t),!0).forEach((function(r){o(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):m(Object(t)).forEach((function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(t,o))}))}return e}function f(o){var n=o.classes,i=o["data-testid"],p=o.iconButtonStyle,l=o.color,m=o.disableRipple,f=o.className,b=o.IconElement,g=o.IconButtonComponent,O=o.disabled,y=o.iconButtonProps,P=o.children,v=o.anchorOrigin,j=o.transformOrigin,B=o.marginThreshold,T=o.menuProps,C=o.tooltipProps,w=o.paperClassName,I=r(null),N=e(I,2),R=N[0],x=N[1],D=!!R,E=r(!1),S=e(E,2),k=S[0],z=S[1];t((function(){var o;return D&&setTimeout((function(){o=z(D)}),500),function(){o&&clearTimeout(o)}}),[D]);var M=function(o){o.stopPropagation(),x(null),z(!1)},A=c(g,h(h({"aria-label":"IconMenu","aria-owns":D?"icon-menu":void 0,"aria-haspopup":"true","data-testid":i,onClick:function(o){o.stopPropagation(),o.preventDefault(),x(o.currentTarget)},classes:{root:n.iconButton},className:f,style:p,color:l,disableRipple:m,disabled:O},y),{},{children:b}));return u(d,{children:[C?c(a,h(h({},C),{},{children:A})):A,c(s,h(h({id:"icon-menu",anchorEl:R,open:D,MenuListProps:{"data-testid":"".concat(i,"Dropdown")},disableAutoFocus:!k,autoFocus:k,onClose:M,onClick:M,anchorOrigin:v,transformOrigin:j,classes:{paper:n.paper},elevation:0,marginThreshold:B,PaperProps:{className:n[w]}},T),{},{children:P}))]})}f.propTypes={children:n.oneOfType([n.string,n.node,n.array]),classes:n.shape({iconButton:n.string,paper:n.string}),className:n.string,color:n.string,IconElement:n.element,IconButtonComponent:n.any,iconButtonStyle:n.shape({}),anchorOrigin:n.shape({horizontal:n.oneOf(["left","center","right"]),vertical:n.oneOf(["top","center","bottom"])}),transformOrigin:n.shape({horizontal:n.oneOf(["left","center","right"]),vertical:n.oneOf(["top","center","bottom"])}),disableRipple:n.bool,"data-testid":n.string,marginThreshold:n.number,disabled:n.bool,tooltipProps:n.shape({}),menuProps:n.shape({}),iconButtonProps:n.shape({}),paperClassName:n.string},f.defaultProps={children:void 0,classes:{},className:void 0,color:void 0,"data-testid":void 0,IconElement:c(p,{}),iconButtonStyle:void 0,IconButtonComponent:l,disableRipple:!1,anchorOrigin:{horizontal:"right",vertical:"top"},transformOrigin:{horizontal:"right",vertical:"bottom"},marginThreshold:void 0,disabled:!1,tooltipProps:void 0,menuProps:{},iconButtonProps:{},paperClassName:""};var b=i((function(o){return{iconButton:{borderRadius:8,padding:"10px",color:o.palette.primary.text6,"&:hover":{color:o.palette.primary.text1,backgroundColor:"rgba(255, 255, 255, 0.16)"},"& .MuiTouchRipple-child":{borderRadius:8}},paper:{}}}))(f);export{b as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/IconMenu/index.js"],"sourcesContent":["import { useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport { Menu, withStyles, Tooltip } from '@material-ui/core';\nimport { MoreVert } from '@material-ui/icons';\n\nimport IconButton from '../IconButton';\n\nconst muiStyles = theme => ({\n iconButton: {\n borderRadius: 8,\n padding: '10px',\n color: theme.palette.primary.text6,\n '&:hover': {\n color: theme.palette.primary.text1,\n backgroundColor: 'rgba(255, 255, 255, 0.16)',\n },\n '& .MuiTouchRipple-child': {\n borderRadius: 8,\n },\n },\n paper: {},\n});\n\nfunction IconMenu({\n classes = DEFAULT_ICON_MENU_CLASSES,\n // IconButtonComponentProps\n 'data-testid': testId,\n iconButtonStyle,\n color,\n disableRipple = false,\n className,\n IconElement = DEFAULT_ICON_MENU_ICON_ELEMENT,\n IconButtonComponent = DEFAULT_ICON_MENU_ICON_BUTTON_COMPONENT,\n disabled = false,\n iconButtonProps = DEFAULT_ICON_MENU_ICON_BUTTON_PROPS,\n // MenuProps\n children,\n anchorOrigin = DEFAULT_ICON_MENU_ANCHOR_ORIGIN,\n transformOrigin = DEFAULT_ICON_MENU_TRANSFORM_ORIGIN,\n marginThreshold,\n menuProps = DEFAULT_ICON_MENU_MENU_PROPS,\n // Tooltip\n tooltipProps,\n paperClassName = '',\n}) {\n const [anchorEl, setAnchorEl] = useState(null);\n const isOpen = !!anchorEl;\n\n /*\n A fix of the issue: https://corvaqa.atlassian.net/browse/DC-3713\n\n When Material Menu is rendered, at first it's displayed at the top of the container\n and only then moves to the anchor element. When the focus is enabled, and the element is\n inside of an iframe but outside the view - browsers scroll the page to it. Because of this, we set focus in async\n manner, to wait for correct position - and then set focus.\n\n https://github.dev/mui/material-ui/blob/v4.x/packages/material-ui/src/Popover/Popover.js#L323-L331\n */\n const [isMenuAutofocus, setIsMenuAutofocus] = useState(false);\n useEffect(() => {\n let timerId;\n\n if (isOpen) {\n setTimeout(() => {\n timerId = setIsMenuAutofocus(isOpen);\n // Why 500? The lower delay doesn't actually work, so this is the lowest value I could get to make it work\n }, 500);\n }\n\n return () => {\n if (timerId) {\n clearTimeout(timerId);\n }\n };\n }, [isOpen]);\n\n const handleClose = event => {\n event.stopPropagation();\n setAnchorEl(null);\n setIsMenuAutofocus(false);\n };\n const handleOpen = event => {\n event.stopPropagation();\n event.preventDefault();\n setAnchorEl(event.currentTarget);\n };\n\n const iconButtonElement = (\n <IconButtonComponent\n aria-label=\"IconMenu\"\n aria-owns={isOpen ? 'icon-menu' : undefined}\n aria-haspopup=\"true\"\n data-testid={testId}\n onClick={handleOpen}\n classes={{ root: classes.iconButton }}\n className={className}\n style={iconButtonStyle}\n color={color}\n disableRipple={disableRipple}\n disabled={disabled}\n {...iconButtonProps}\n >\n {IconElement}\n </IconButtonComponent>\n );\n\n return (\n <>\n {tooltipProps ? <Tooltip {...tooltipProps}>{iconButtonElement}</Tooltip> : iconButtonElement}\n <Menu\n id=\"icon-menu\"\n anchorEl={anchorEl}\n open={isOpen}\n MenuListProps={{ 'data-testid': `${testId}Dropdown` }}\n disableAutoFocus={!isMenuAutofocus}\n autoFocus={isMenuAutofocus}\n onClose={handleClose}\n onClick={handleClose}\n anchorOrigin={anchorOrigin}\n transformOrigin={transformOrigin}\n classes={{ paper: classes.paper }}\n elevation={0}\n marginThreshold={marginThreshold}\n PaperProps={{\n className: classes[paperClassName],\n }}\n {...menuProps}\n >\n {children}\n </Menu>\n </>\n );\n}\n\nIconMenu.propTypes = {\n children: PropTypes.oneOfType([PropTypes.string, PropTypes.node, PropTypes.array]),\n classes: PropTypes.shape({\n iconButton: PropTypes.string,\n paper: PropTypes.string,\n }),\n className: PropTypes.string,\n color: PropTypes.string,\n IconElement: PropTypes.element,\n // eslint-disable-next-line react/forbid-prop-types\n IconButtonComponent: PropTypes.any,\n iconButtonStyle: PropTypes.shape({}),\n anchorOrigin: PropTypes.shape({\n horizontal: PropTypes.oneOf(['left', 'center', 'right']),\n vertical: PropTypes.oneOf(['top', 'center', 'bottom']),\n }),\n transformOrigin: PropTypes.shape({\n horizontal: PropTypes.oneOf(['left', 'center', 'right']),\n vertical: PropTypes.oneOf(['top', 'center', 'bottom']),\n }),\n disableRipple: PropTypes.bool,\n 'data-testid': PropTypes.string,\n marginThreshold: PropTypes.number,\n disabled: PropTypes.bool,\n tooltipProps: PropTypes.shape({}),\n menuProps: PropTypes.shape({}),\n iconButtonProps: PropTypes.shape({}),\n paperClassName: PropTypes.string,\n};\n\nconst DEFAULT_ICON_MENU_CLASSES = {};\nconst DEFAULT_ICON_MENU_ICON_ELEMENT = <MoreVert />;\nconst DEFAULT_ICON_MENU_ICON_BUTTON_COMPONENT = IconButton;\nconst DEFAULT_ICON_MENU_ANCHOR_ORIGIN = { horizontal: 'right', vertical: 'top' };\nconst DEFAULT_ICON_MENU_TRANSFORM_ORIGIN = { horizontal: 'right', vertical: 'bottom' };\nconst DEFAULT_ICON_MENU_MENU_PROPS = {};\nconst DEFAULT_ICON_MENU_ICON_BUTTON_PROPS = {};\n\nexport default withStyles(muiStyles)(IconMenu);\n"],"names":["IconMenu","_ref","_ref$classes","classes","DEFAULT_ICON_MENU_CLASSES","testId","iconButtonStyle","color","_ref$disableRipple","disableRipple","className","_ref$IconElement","IconElement","DEFAULT_ICON_MENU_ICON_ELEMENT","_ref$IconButtonCompon","IconButtonComponent","DEFAULT_ICON_MENU_ICON_BUTTON_COMPONENT","_ref$disabled","disabled","_ref$iconButtonProps","iconButtonProps","DEFAULT_ICON_MENU_ICON_BUTTON_PROPS","children","_ref$anchorOrigin","anchorOrigin","DEFAULT_ICON_MENU_ANCHOR_ORIGIN","_ref$transformOrigin","transformOrigin","DEFAULT_ICON_MENU_TRANSFORM_ORIGIN","marginThreshold","_ref$menuProps","menuProps","DEFAULT_ICON_MENU_MENU_PROPS","tooltipProps","_ref$paperClassName","paperClassName","useState","_useState2","_slicedToArray","_useState","anchorEl","setAnchorEl","isOpen","_useState4","_useState3","isMenuAutofocus","setIsMenuAutofocus","useEffect","timerId","setTimeout","clearTimeout","handleClose","event","stopPropagation","iconButtonElement","_jsx","_objectSpread","undefined","onClick","preventDefault","currentTarget","root","iconButton","style","_jsxs","_Fragment","Tooltip","Menu","id","open","MenuListProps","disableAutoFocus","autoFocus","onClose","paper","elevation","PaperProps","propTypes","PropTypes","oneOfType","string","node","array","shape","element","any","horizontal","oneOf","vertical","bool","number","MoreVert","IconButton","index","withStyles","theme","borderRadius","padding","palette","primary","text6","text1","backgroundColor"],"mappings":"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"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/IconMenu/index.js"],"sourcesContent":["import { useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport { Menu, withStyles, Tooltip } from '@material-ui/core';\nimport { MoreVert } from '@material-ui/icons';\n\nimport IconButton from '../IconButton';\n\nconst muiStyles = theme => ({\n iconButton: {\n borderRadius: 8,\n padding: '10px',\n color: theme.palette.primary.text6,\n '&:hover': {\n color: theme.palette.primary.text1,\n backgroundColor: 'rgba(255, 255, 255, 0.16)',\n },\n '& .MuiTouchRipple-child': {\n borderRadius: 8,\n },\n },\n paper: {},\n});\n\nfunction IconMenu({\n classes,\n // IconButtonComponentProps\n 'data-testid': testId,\n iconButtonStyle,\n color,\n disableRipple,\n className,\n IconElement,\n IconButtonComponent,\n disabled,\n iconButtonProps,\n // MenuProps\n children,\n anchorOrigin,\n transformOrigin,\n marginThreshold,\n menuProps,\n // Tooltip\n tooltipProps,\n paperClassName,\n}) {\n const [anchorEl, setAnchorEl] = useState(null);\n const isOpen = !!anchorEl;\n\n /*\n A fix of the issue: https://corvaqa.atlassian.net/browse/DC-3713\n\n When Material Menu is rendered, at first it's displayed at the top of the container\n and only then moves to the anchor element. When the focus is enabled, and the element is\n inside of an iframe but outside the view - browsers scroll the page to it. Because of this, we set focus in async\n manner, to wait for correct position - and then set focus.\n\n https://github.dev/mui/material-ui/blob/v4.x/packages/material-ui/src/Popover/Popover.js#L323-L331\n */\n const [isMenuAutofocus, setIsMenuAutofocus] = useState(false);\n useEffect(() => {\n let timerId;\n\n if (isOpen) {\n setTimeout(() => {\n timerId = setIsMenuAutofocus(isOpen);\n // Why 500? The lower delay doesn't actually work, so this is the lowest value I could get to make it work\n }, 500);\n }\n\n return () => {\n if (timerId) {\n clearTimeout(timerId);\n }\n };\n }, [isOpen]);\n\n const handleClose = event => {\n event.stopPropagation();\n setAnchorEl(null);\n setIsMenuAutofocus(false);\n };\n const handleOpen = event => {\n event.stopPropagation();\n event.preventDefault();\n setAnchorEl(event.currentTarget);\n };\n\n const iconButtonElement = (\n <IconButtonComponent\n aria-label=\"IconMenu\"\n aria-owns={isOpen ? 'icon-menu' : undefined}\n aria-haspopup=\"true\"\n data-testid={testId}\n onClick={handleOpen}\n classes={{ root: classes.iconButton }}\n className={className}\n style={iconButtonStyle}\n color={color}\n disableRipple={disableRipple}\n disabled={disabled}\n {...iconButtonProps}\n >\n {IconElement}\n </IconButtonComponent>\n );\n\n return (\n <>\n {tooltipProps ? <Tooltip {...tooltipProps}>{iconButtonElement}</Tooltip> : iconButtonElement}\n <Menu\n id=\"icon-menu\"\n anchorEl={anchorEl}\n open={isOpen}\n MenuListProps={{ 'data-testid': `${testId}Dropdown` }}\n disableAutoFocus={!isMenuAutofocus}\n autoFocus={isMenuAutofocus}\n onClose={handleClose}\n onClick={handleClose}\n anchorOrigin={anchorOrigin}\n transformOrigin={transformOrigin}\n classes={{ paper: classes.paper }}\n elevation={0}\n marginThreshold={marginThreshold}\n PaperProps={{\n className: classes[paperClassName],\n }}\n {...menuProps}\n >\n {children}\n </Menu>\n </>\n );\n}\n\nIconMenu.propTypes = {\n children: PropTypes.oneOfType([PropTypes.string, PropTypes.node, PropTypes.array]),\n classes: PropTypes.shape({\n iconButton: PropTypes.string,\n paper: PropTypes.string,\n }),\n className: PropTypes.string,\n color: PropTypes.string,\n IconElement: PropTypes.element,\n // eslint-disable-next-line react/forbid-prop-types\n IconButtonComponent: PropTypes.any,\n iconButtonStyle: PropTypes.shape({}),\n anchorOrigin: PropTypes.shape({\n horizontal: PropTypes.oneOf(['left', 'center', 'right']),\n vertical: PropTypes.oneOf(['top', 'center', 'bottom']),\n }),\n transformOrigin: PropTypes.shape({\n horizontal: PropTypes.oneOf(['left', 'center', 'right']),\n vertical: PropTypes.oneOf(['top', 'center', 'bottom']),\n }),\n disableRipple: PropTypes.bool,\n 'data-testid': PropTypes.string,\n marginThreshold: PropTypes.number,\n disabled: PropTypes.bool,\n tooltipProps: PropTypes.shape({}),\n menuProps: PropTypes.shape({}),\n iconButtonProps: PropTypes.shape({}),\n paperClassName: PropTypes.string,\n};\n\nIconMenu.defaultProps = {\n children: undefined,\n classes: {},\n className: undefined,\n color: undefined,\n 'data-testid': undefined,\n IconElement: <MoreVert />,\n iconButtonStyle: undefined,\n IconButtonComponent: IconButton,\n disableRipple: false,\n anchorOrigin: { horizontal: 'right', vertical: 'top' },\n transformOrigin: { horizontal: 'right', vertical: 'bottom' },\n marginThreshold: undefined,\n disabled: false,\n tooltipProps: undefined,\n menuProps: {},\n iconButtonProps: {},\n paperClassName: '',\n};\n\nexport default withStyles(muiStyles)(IconMenu);\n"],"names":["IconMenu","_ref","classes","testId","iconButtonStyle","color","disableRipple","className","IconElement","IconButtonComponent","disabled","iconButtonProps","children","anchorOrigin","transformOrigin","marginThreshold","menuProps","tooltipProps","paperClassName","useState","_useState2","_slicedToArray","_useState","anchorEl","setAnchorEl","isOpen","_useState4","_useState3","isMenuAutofocus","setIsMenuAutofocus","useEffect","timerId","setTimeout","clearTimeout","handleClose","event","stopPropagation","iconButtonElement","_jsx","_objectSpread","undefined","onClick","preventDefault","currentTarget","root","iconButton","style","_jsxs","_Fragment","Tooltip","Menu","id","open","MenuListProps","disableAutoFocus","autoFocus","onClose","paper","elevation","PaperProps","propTypes","PropTypes","oneOfType","string","node","array","shape","element","any","horizontal","oneOf","vertical","bool","number","defaultProps","MoreVert","IconButton","index","withStyles","theme","borderRadius","padding","palette","primary","text6","text1","backgroundColor"],"mappings":"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"}
@@ -1,11 +1,5 @@
1
1
  import PropTypes from 'prop-types';
2
- declare function KeyboardDateTimePicker({ format, onChange, label, 'data-testid': PAGE_NAME, ...props }: {
3
- [x: string]: any;
4
- "data-testid"?: string | undefined;
5
- format?: string | undefined;
6
- label?: string | undefined;
7
- onChange: any;
8
- }): import("react").JSX.Element;
2
+ declare function KeyboardDateTimePicker(props: any): import("react").JSX.Element;
9
3
  declare namespace KeyboardDateTimePicker {
10
4
  var propTypes: {
11
5
  onChange: PropTypes.Validator<(...args: any[]) => any>;
@@ -13,6 +7,11 @@ declare namespace KeyboardDateTimePicker {
13
7
  label: PropTypes.Requireable<string>;
14
8
  'data-testid': PropTypes.Requireable<string>;
15
9
  };
10
+ var defaultProps: {
11
+ format: string;
12
+ label: string;
13
+ 'data-testid': string;
14
+ };
16
15
  }
17
16
  export default KeyboardDateTimePicker;
18
17
  //# sourceMappingURL=KeyboardDateTimePicker.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"KeyboardDateTimePicker.d.ts","sourceRoot":"","sources":["../../src/components/KeyboardDateTimePicker.js"],"names":[],"mappings":"AACA,OAAO,SAAS,MAAM,YAAY,CAAC;wCAiBH,EAC9B,MAAiC,EACjC,QAAQ,EACR,KAAc,EACd,aAAa,EAAE,SAAoC,EACnD,GAAG,KAAK,EACT;;;;;;CAAA;;;;;;;;;eAsCc,sBAAsB"}
1
+ {"version":3,"file":"KeyboardDateTimePicker.d.ts","sourceRoot":"","sources":["../../src/components/KeyboardDateTimePicker.js"],"names":[],"mappings":"AACA,OAAO,SAAS,MAAM,YAAY,CAAC;wCAiBJ,KAAK,KAAA;;;;;;;;;;;;;;eA6CrB,sBAAsB"}
@@ -1,2 +1,2 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/objectWithoutProperties";import{useState as o}from"react";import n from"prop-types";import a from"moment";import{KeyboardDateTimePicker as i}from"@material-ui/pickers";import{jsx as m}from"react/jsx-runtime";var c=["format","onChange","label","data-testid"];function p(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function f(r){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?p(Object(o),!0).forEach((function(t){e(r,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):p(Object(o)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}))}return r}var s=["MM/DD/YYYY HH:mm","M/D/YYYY HH:mm","MM/DD/YYYY, HH:mm","M/D/YYYY, HH:mm","MMM DD, YYYY HH:mm","MMM D, YYYY HH:mm","MM/DD/YY HH:mm","M/D/YY HH:mm"],Y=new RegExp("[^\\.\\ \\,\\[a-zA-Z0-9_]*$]+","gi"),u=function(e){var n=e.format,p=void 0===n?"MM/DD/YYYY HH:mm":n,u=e.onChange,l=e.label,b=void 0===l?"Date":l,D=e["data-testid"],d=void 0===D?"KeyboardDateTimePicker":D,H=t(e,c),y=o(p),M=r(y,2),O=M[0],g=M[1],j=o(null),h=r(j,2),P=h[0],v=h[1];return m(i,f(f({rifmFormatter:function(e){return e},refuse:Y,inputValue:P},H),{},{label:b,"data-testid":"".concat(d,"_").concat(b),format:O,onChange:function(e,r){var t=a(r,[].concat(s,[p]),!0),o=t.isValid();g((function(e){return o?t.creationData().format:e})),v(r),u(o?t:e,r)}}))};u.propTypes={onChange:n.func.isRequired,format:n.string,label:n.string,"data-testid":n.string};export{u as default};
1
+ import e from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/slicedToArray";import{useState as t}from"react";import o from"prop-types";import n from"moment";import{KeyboardDateTimePicker as a}from"@material-ui/pickers";import{jsx as i}from"react/jsx-runtime";function m(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function c(r){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?m(Object(o),!0).forEach((function(t){e(r,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):m(Object(o)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}))}return r}var p=["MM/DD/YYYY HH:mm","M/D/YYYY HH:mm","MM/DD/YYYY, HH:mm","M/D/YYYY, HH:mm","MMM DD, YYYY HH:mm","MMM D, YYYY HH:mm","MM/DD/YY HH:mm","M/D/YY HH:mm"],f=new RegExp("[^\\.\\ \\,\\[a-zA-Z0-9_]*$]+","gi"),Y=function(e){var o=e.format,m=e.onChange,Y=e.label,s=e["data-testid"],u=t(o),l=r(u,2),b=l[0],D=l[1],d=t(null),H=r(d,2),y=H[0],M=H[1];return i(a,c(c({rifmFormatter:function(e){return e},refuse:f,inputValue:y},e),{},{"data-testid":"".concat(s,"_").concat(Y),format:b,onChange:function(e,r){var t=n(r,[].concat(p,[o]),!0),a=t.isValid();D((function(e){return a?t.creationData().format:e})),M(r),m(a?t:e,r)}}))};Y.propTypes={onChange:o.func.isRequired,format:o.string,label:o.string,"data-testid":o.string},Y.defaultProps={format:"MM/DD/YYYY HH:mm",label:"Date","data-testid":"KeyboardDateTimePicker"};export{Y as default};
2
2
  //# sourceMappingURL=KeyboardDateTimePicker.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"KeyboardDateTimePicker.js","sources":["../../src/components/KeyboardDateTimePicker.js"],"sourcesContent":["import { useState } from 'react';\nimport PropTypes from 'prop-types';\nimport moment from 'moment';\nimport { KeyboardDateTimePicker as MuiKeyboardDateTimePicker } from '@material-ui/pickers';\n\nconst DEFAULT_DATE_TIME_FORMAT = 'MM/DD/YYYY HH:mm';\nconst SUPPORTED_FORMATS = [\n 'MM/DD/YYYY HH:mm',\n 'M/D/YYYY HH:mm',\n 'MM/DD/YYYY, HH:mm',\n 'M/D/YYYY, HH:mm',\n 'MMM DD, YYYY HH:mm',\n 'MMM D, YYYY HH:mm',\n 'MM/DD/YY HH:mm',\n 'M/D/YY HH:mm',\n];\nconst REFUSE_REGEXP = new RegExp('[^\\\\.\\\\ \\\\,\\\\[a-zA-Z0-9_]*$]+', 'gi');\n\nconst KeyboardDateTimePicker = ({\n format = DEFAULT_DATE_TIME_FORMAT,\n onChange,\n label = 'Date',\n 'data-testid': PAGE_NAME = 'KeyboardDateTimePicker',\n ...props\n}) => {\n const [dynamicFormat, setDynamicFormat] = useState(format);\n const [inputValue, setInputValue] = useState(null);\n\n const dateFormatter = str => {\n return str;\n };\n\n const handleDateChange = (date, newInputValue) => {\n const momentObj = moment(newInputValue, [...SUPPORTED_FORMATS, format], true);\n const isValidDate = momentObj.isValid();\n\n setDynamicFormat(prev => (isValidDate ? momentObj.creationData().format : prev));\n setInputValue(newInputValue);\n onChange(isValidDate ? momentObj : date, newInputValue);\n };\n\n return (\n <MuiKeyboardDateTimePicker\n rifmFormatter={dateFormatter}\n refuse={REFUSE_REGEXP}\n inputValue={inputValue}\n {...props}\n label={label}\n data-testid={`${PAGE_NAME}_${label}`}\n format={dynamicFormat}\n onChange={handleDateChange}\n />\n );\n};\n\nKeyboardDateTimePicker.propTypes = {\n onChange: PropTypes.func.isRequired,\n format: PropTypes.string,\n label: PropTypes.string,\n 'data-testid': PropTypes.string,\n};\n\nexport default KeyboardDateTimePicker;\n"],"names":["SUPPORTED_FORMATS","REFUSE_REGEXP","RegExp","KeyboardDateTimePicker","_ref","_ref$format","format","onChange","_ref$label","label","_ref$dataTestid","PAGE_NAME","props","_objectWithoutProperties","_excluded","useState","_useState2","_slicedToArray","_useState","dynamicFormat","setDynamicFormat","_useState4","_useState3","inputValue","setInputValue","_jsx","MuiKeyboardDateTimePicker","_objectSpread","rifmFormatter","str","refuse","date","newInputValue","momentObj","moment","isValidDate","isValid","prev","creationData","propTypes","PropTypes","func","isRequired","string"],"mappings":"+8BAKA,IACMA,EAAoB,CACxB,mBACA,iBACA,oBACA,kBACA,qBACA,oBACA,iBACA,gBAEIC,EAAgB,IAAIC,OAAO,gCAAiC,MAE5DC,EAAyB,SAMzBC,GAAA,IAAAC,EAAAD,EALJE,OAAAA,aAd+B,mBAcED,EACjCE,IAAAA,SAAQC,EAAAJ,EACRK,MAAAA,aAAQ,OAAMD,EAAAE,EAAAN,EACd,eAAeO,aAAY,yBAAwBD,EAChDE,EAAKC,EAAAT,EAAAU,GAEkCC,EAAAA,EAAST,GAAOU,EAAAC,EAAAC,EAAA,GAAnDC,EAAaH,EAAA,GAAEI,EAAgBJ,EAAA,GACFD,EAAAA,EAAS,MAAKM,EAAAJ,EAAAK,EAAA,GAA3CC,EAAUF,EAAA,GAAEG,EAAaH,EAAA,GAehC,OACEI,EAACC,EAAyBC,EAAAA,EAAA,CACxBC,cAfkB,SAAAC,GACpB,OAAOA,GAeLC,OAAQ7B,EACRsB,WAAYA,GACRX,GAAK,GAAA,CACTH,MAAOA,EACP,cAAgBE,GAAAA,OAAAA,EAAaF,KAAAA,OAAAA,GAC7BH,OAAQa,EACRZ,SAlBqB,SAACwB,EAAMC,GAC9B,IAAMC,EAAYC,EAAOF,EAAmBhC,GAAAA,OAAAA,EAAmBM,CAAAA,KAAS,GAClE6B,EAAcF,EAAUG,UAE9BhB,GAAiB,SAAAiB,GAAI,OAAKF,EAAcF,EAAUK,eAAehC,OAAS+B,CAAI,IAC9Eb,EAAcQ,GACdzB,EAAS4B,EAAcF,EAAYF,EAAMC,MAe7C,EAEA7B,EAAuBoC,UAAY,CACjChC,SAAUiC,EAAUC,KAAKC,WACzBpC,OAAQkC,EAAUG,OAClBlC,MAAO+B,EAAUG,OACjB,cAAeH,EAAUG"}
1
+ {"version":3,"file":"KeyboardDateTimePicker.js","sources":["../../src/components/KeyboardDateTimePicker.js"],"sourcesContent":["import { useState } from 'react';\nimport PropTypes from 'prop-types';\nimport moment from 'moment';\nimport { KeyboardDateTimePicker as MuiKeyboardDateTimePicker } from '@material-ui/pickers';\n\nconst DEFAULT_DATE_TIME_FORMAT = 'MM/DD/YYYY HH:mm';\nconst SUPPORTED_FORMATS = [\n 'MM/DD/YYYY HH:mm',\n 'M/D/YYYY HH:mm',\n 'MM/DD/YYYY, HH:mm',\n 'M/D/YYYY, HH:mm',\n 'MMM DD, YYYY HH:mm',\n 'MMM D, YYYY HH:mm',\n 'MM/DD/YY HH:mm',\n 'M/D/YY HH:mm',\n];\nconst REFUSE_REGEXP = new RegExp('[^\\\\.\\\\ \\\\,\\\\[a-zA-Z0-9_]*$]+', 'gi');\n\nconst KeyboardDateTimePicker = props => {\n const { format, onChange, label, 'data-testid': PAGE_NAME } = props;\n\n const [dynamicFormat, setDynamicFormat] = useState(format);\n const [inputValue, setInputValue] = useState(null);\n\n const dateFormatter = str => {\n return str;\n };\n\n const handleDateChange = (date, newInputValue) => {\n const momentObj = moment(newInputValue, [...SUPPORTED_FORMATS, format], true);\n const isValidDate = momentObj.isValid();\n\n setDynamicFormat(prev => (isValidDate ? momentObj.creationData().format : prev));\n setInputValue(newInputValue);\n onChange(isValidDate ? momentObj : date, newInputValue);\n };\n\n return (\n <MuiKeyboardDateTimePicker\n rifmFormatter={dateFormatter}\n refuse={REFUSE_REGEXP}\n inputValue={inputValue}\n {...props}\n data-testid={`${PAGE_NAME}_${label}`}\n format={dynamicFormat}\n onChange={handleDateChange}\n />\n );\n};\n\nKeyboardDateTimePicker.propTypes = {\n onChange: PropTypes.func.isRequired,\n format: PropTypes.string,\n label: PropTypes.string,\n 'data-testid': PropTypes.string,\n};\n\nKeyboardDateTimePicker.defaultProps = {\n format: DEFAULT_DATE_TIME_FORMAT,\n label: 'Date',\n 'data-testid': 'KeyboardDateTimePicker',\n};\n\nexport default KeyboardDateTimePicker;\n"],"names":["SUPPORTED_FORMATS","REFUSE_REGEXP","RegExp","KeyboardDateTimePicker","props","format","onChange","label","PAGE_NAME","useState","_useState2","_slicedToArray","_useState","dynamicFormat","setDynamicFormat","_useState4","_useState3","inputValue","setInputValue","_jsx","MuiKeyboardDateTimePicker","_objectSpread","rifmFormatter","str","refuse","date","newInputValue","momentObj","moment","isValidDate","isValid","prev","creationData","propTypes","PropTypes","func","isRequired","string","defaultProps"],"mappings":"+1BAKA,IACMA,EAAoB,CACxB,mBACA,iBACA,oBACA,kBACA,qBACA,oBACA,iBACA,gBAEIC,EAAgB,IAAIC,OAAO,gCAAiC,MAE5DC,EAAyB,SAAAC,GAC7B,IAAQC,EAAsDD,EAAtDC,OAAQC,EAA8CF,EAA9CE,SAAUC,EAAoCH,EAApCG,MAAsBC,EAAcJ,EAA7B,eAESK,EAAAA,EAASJ,GAAOK,EAAAC,EAAAC,EAAA,GAAnDC,EAAaH,EAAA,GAAEI,EAAgBJ,EAAA,GACFD,EAAAA,EAAS,MAAKM,EAAAJ,EAAAK,EAAA,GAA3CC,EAAUF,EAAA,GAAEG,EAAaH,EAAA,GAehC,OACEI,EAACC,EAAyBC,EAAAA,EAAA,CACxBC,cAfkB,SAAAC,GACpB,OAAOA,GAeLC,OAAQvB,EACRgB,WAAYA,GACRb,GAAK,GAAA,CACT,cAAgBI,GAAAA,OAAAA,EAAaD,KAAAA,OAAAA,GAC7BF,OAAQQ,EACRP,SAjBqB,SAACmB,EAAMC,GAC9B,IAAMC,EAAYC,EAAOF,EAAmB1B,GAAAA,OAAAA,EAAmBK,CAAAA,KAAS,GAClEwB,EAAcF,EAAUG,UAE9BhB,GAAiB,SAAAiB,GAAI,OAAKF,EAAcF,EAAUK,eAAe3B,OAAS0B,CAAI,IAC9Eb,EAAcQ,GACdpB,EAASuB,EAAcF,EAAYF,EAAMC,MAc7C,EAEAvB,EAAuB8B,UAAY,CACjC3B,SAAU4B,EAAUC,KAAKC,WACzB/B,OAAQ6B,EAAUG,OAClB9B,MAAO2B,EAAUG,OACjB,cAAeH,EAAUG,QAG3BlC,EAAuBmC,aAAe,CACpCjC,OArD+B,mBAsD/BE,MAAO,OACP,cAAe"}
@@ -0,0 +1,17 @@
1
+ import { ReactNode } from 'react';
2
+ export type LinkedTextProps = {
3
+ children?: ReactNode;
4
+ className?: string;
5
+ /**
6
+ * Paints the links without making them clickable, for a copy sitting behind a textarea: the
7
+ * field on top takes the clicks, and a screen reader reads it rather than this.
8
+ */
9
+ mirror?: boolean;
10
+ testId?: string;
11
+ };
12
+ /**
13
+ * Turns the urls in some text into links, either to read or to sit behind a textarea being typed
14
+ * into. Anything already rendered — a mention — passes through: only plain runs can hold a url.
15
+ */
16
+ export declare const LinkedText: import("react").ForwardRefExoticComponent<LinkedTextProps & import("react").RefAttributes<HTMLElement>>;
17
+ //# sourceMappingURL=LinkedText.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LinkedText.d.ts","sourceRoot":"","sources":["../../../src/components/LinkedText/LinkedText.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAkC,SAAS,EAAE,MAAM,OAAO,CAAC;AAOlE,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AA4BF;;;GAGG;AACH,eAAO,MAAM,UAAU,yGA+BtB,CAAC"}
@@ -0,0 +1,2 @@
1
+ import{forwardRef as r,Children as t,Fragment as e}from"react";import n from"classnames";import{splitOnLinks as i}from"../../utils/links.js";import a from"./LinkedText.scss.js";import{jsx as o,jsxs as s}from"react/jsx-runtime";var c=r((function(r,c){var l=r.children,m=r.className,d=r.mirror,f=void 0!==d&&d,p=r.testId,u=t.map(l,(function(r){return"string"==typeof r?function(r,t){return i(r).map((function(r,n){return r.url?t?o("span",{className:a.link,children:r.text},n):o("a",{href:r.url,target:"_blank",rel:"noopener noreferrer",className:a.link,onClick:function(r){return r.stopPropagation()},children:r.text},n):o(e,{children:r.text},n)}))}(r,f):r}));return f?s("div",{"aria-hidden":!0,ref:c,className:n(a.mirror,m),"data-testid":p,children:[u,"\n"]}):o("span",{ref:c,className:n(a.root,m),"data-testid":p,children:u})}));export{c as LinkedText};
2
+ //# sourceMappingURL=LinkedText.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LinkedText.js","sources":["../../../src/components/LinkedText/LinkedText.tsx"],"sourcesContent":["import { Children, forwardRef, Fragment, ReactNode } from 'react';\nimport classNames from 'classnames';\n\nimport { splitOnLinks } from '~/utils/links';\n\nimport styles from './LinkedText.scss';\n\nexport type LinkedTextProps = {\n children?: ReactNode;\n className?: string;\n /**\n * Paints the links without making them clickable, for a copy sitting behind a textarea: the\n * field on top takes the clicks, and a screen reader reads it rather than this.\n */\n mirror?: boolean;\n testId?: string;\n};\n\nconst toSegments = (text: string, mirror: boolean) =>\n splitOnLinks(text).map((segment, index) => {\n // eslint-disable-next-line react/no-array-index-key\n if (!segment.url) return <Fragment key={index}>{segment.text}</Fragment>;\n\n return mirror ? (\n // eslint-disable-next-line react/no-array-index-key\n <span key={index} className={styles.link}>\n {segment.text}\n </span>\n ) : (\n <a\n // eslint-disable-next-line react/no-array-index-key\n key={index}\n href={segment.url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className={styles.link}\n // The row around it may open something of its own.\n onClick={event => event.stopPropagation()}\n >\n {segment.text}\n </a>\n );\n });\n\n/**\n * Turns the urls in some text into links, either to read or to sit behind a textarea being typed\n * into. Anything already rendered — a mention — passes through: only plain runs can hold a url.\n */\nexport const LinkedText = forwardRef<HTMLElement, LinkedTextProps>(\n ({ children, className, mirror = false, testId }, ref) => {\n const content = Children.map(children, child =>\n typeof child === 'string' ? toSegments(child, mirror) : child\n );\n\n if (!mirror) {\n return (\n <span\n ref={ref as React.Ref<HTMLSpanElement>}\n className={classNames(styles.root, className)}\n data-testid={testId}\n >\n {content}\n </span>\n );\n }\n\n return (\n <div\n aria-hidden\n ref={ref as React.Ref<HTMLDivElement>}\n className={classNames(styles.mirror, className)}\n data-testid={testId}\n >\n {content}\n {/* `pre-wrap` swallows a trailing newline, which would leave the mirror a line short. */}\n {'\\n'}\n </div>\n );\n }\n);\n"],"names":["LinkedText","forwardRef","_ref","ref","children","className","_ref$mirror","mirror","testId","content","Children","map","child","text","splitOnLinks","segment","index","url","_jsx","styles","link","href","target","rel","onClick","event","stopPropagation","Fragment","toSegments","_jsxs","classNames","root"],"mappings":"mOAkBA,IA8BaA,EAAaC,GACxB,SAAAC,EAAkDC,GAAQ,IAAvDC,IAAAA,SAAUC,IAAAA,UAASC,EAAAJ,EAAEK,OAAAA,cAAcD,EAAEE,IAAAA,OAChCC,EAAUC,EAASC,IAAIP,GAAU,SAAAQ,GAAK,MACzB,iBAAVA,EAjCM,SAACC,EAAcN,GAAe,OAC/CO,EAAaD,GAAMF,KAAI,SAACI,EAASC,GAE/B,OAAKD,EAAQE,IAENV,EAELW,EAAA,OAAA,CAAkBb,UAAWc,EAAOC,KAAKhB,SACtCW,EAAQF,MADAG,GAIXE,EAAA,IAAA,CAGEG,KAAMN,EAAQE,IACdK,OAAO,SACPC,IAAI,sBACJlB,UAAWc,EAAOC,KAElBI,QAAS,SAAAC,GAAK,OAAIA,EAAMC,iBAAkB,EAAAtB,SAEzCW,EAAQF,MARJG,GAVgBE,EAACS,EAAQ,CAAAvB,SAAcW,EAAQF,MAAhBG,EAqB1C,GAAE,CAS8BY,CAAWhB,EAAOL,GAAUK,KAG1D,OAAKL,EAaHsB,EAAA,MAAA,CACE,eAAW,EACX1B,IAAKA,EACLE,UAAWyB,EAAWX,EAAOZ,OAAQF,GACrC,cAAaG,EAAOJ,SAEnBK,CAAAA,EAEA,QAnBDS,EAAA,OAAA,CACEf,IAAKA,EACLE,UAAWyB,EAAWX,EAAOY,KAAM1B,GACnC,cAAaG,EAAOJ,SAEnBK,GAiBT"}
@@ -0,0 +1,2 @@
1
+ import e from'./../../ext-esm/style-inject/dist/style-inject.es.js';var r={spacing:"8",root:"LinkedText_root__F0WLk",link:"LinkedText_link__KMB-F",mirror:"LinkedText_mirror__fmNFq"};e(".LinkedText_root__F0WLk{overflow-wrap:anywhere}.LinkedText_root__F0WLk .LinkedText_link__KMB-F{text-decoration:none}.LinkedText_root__F0WLk .LinkedText_link__KMB-F:hover{text-decoration:underline}.LinkedText_mirror__fmNFq{inset:0;overflow:hidden;overflow-wrap:break-word;pointer-events:none;position:absolute;white-space:pre-wrap;word-break:break-word}.LinkedText_mirror__fmNFq .LinkedText_link__KMB-F{background-color:rgb(from var(--palette-primary-text-1) r g b/.04);border-radius:4px;outline:1px solid rgb(from var(--palette-primary-text-1) r g b/.16)}.LinkedText_link__KMB-F{color:var(--palette-info-light)}");export{r as default};
2
+ //# sourceMappingURL=LinkedText.scss.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,aAAa,sDAAyD;"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=LinkedText.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LinkedText.test.d.ts","sourceRoot":"","sources":["../../../../src/components/LinkedText/__tests__/LinkedText.test.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export * from './LinkedText';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/LinkedText/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/NewDocumentViewer/utils.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,UAAU,YAAmB,MAAM,KAAG,OAAO,CAAC,MAAM,EAAE,CAKlE,CAAC;AAEF,eAAO,MAAM,WAAW,YAAmB,MAAM,KAAG,OAAO,CAAC,MAAM,CAIjE,CAAC;AAEF,eAAO,MAAM,WAAW,YAAmB,MAAM,wBAKhD,CAAC"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/NewDocumentViewer/utils.ts"],"names":[],"mappings":"AAyBA,eAAO,MAAM,UAAU,YAAmB,MAAM,KAAG,OAAO,CAAC,MAAM,EAAE,CAKlE,CAAC;AAEF,eAAO,MAAM,WAAW,YAAmB,MAAM,KAAG,OAAO,CAAC,MAAM,CAIjE,CAAC;AAEF,eAAO,MAAM,WAAW,YAAmB,MAAM,wBAKhD,CAAC"}
@@ -1,2 +1,2 @@
1
- import r from"@babel/runtime/helpers/asyncToGenerator";import e from"@babel/runtime/regenerator";import{parse as t}from"papaparse";import n from"read-excel-file";var a=function(){var n=r(e.mark((function r(n){var a,u;return e.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,fetch(n);case 2:return a=r.sent,r.next=5,a.text();case 5:return u=r.sent,r.abrupt("return",t(u,{header:!0,dynamicTyping:!0,skipEmptyLines:!0}).data);case 7:case"end":return r.stop()}}),r)})));return function(r){return n.apply(this,arguments)}}(),u=function(){var t=r(e.mark((function r(t){var n,a;return e.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,fetch(t);case 2:return n=r.sent,r.next=5,n.text();case 5:return a=r.sent,r.abrupt("return",a);case 7:case"end":return r.stop()}}),r)})));return function(r){return t.apply(this,arguments)}}(),c=function(){var t=r(e.mark((function r(t){var a,u,c;return e.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,fetch(t);case 2:return a=r.sent,r.next=5,a.arrayBuffer();case 5:return u=r.sent,r.next=8,n(u);case 8:return c=r.sent,r.abrupt("return",null==c?void 0:c.map((function(r){return null==r?void 0:r.map((function(r){return String(r||"")}))})));case 10:case"end":return r.stop()}}),r)})));return function(r){return t.apply(this,arguments)}}();export{a as getCsvData,u as getTextData,c as getXlsxData};
1
+ import r from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/regenerator";import{fetchAttachment as e}from"../../utils/fetchAttachment.js";import{parse as n}from"papaparse";import a from"read-excel-file";var u=function(){var n=r(t.mark((function r(n){var a;return t.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,e(n);case 2:if((a=r.sent).ok){r.next=5;break}throw new Error("Could not read the file (".concat(a.status," ").concat(a.statusText,")"));case 5:return r.abrupt("return",a);case 6:case"end":return r.stop()}}),r)})));return function(r){return n.apply(this,arguments)}}(),c=function(){var e=r(t.mark((function r(e){var a,c;return t.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,u(e);case 2:return a=r.sent,r.next=5,a.text();case 5:return c=r.sent,r.abrupt("return",n(c,{header:!0,dynamicTyping:!0,skipEmptyLines:!0}).data);case 7:case"end":return r.stop()}}),r)})));return function(r){return e.apply(this,arguments)}}(),s=function(){var e=r(t.mark((function r(e){var n,a;return t.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,u(e);case 2:return n=r.sent,r.next=5,n.text();case 5:return a=r.sent,r.abrupt("return",a);case 7:case"end":return r.stop()}}),r)})));return function(r){return e.apply(this,arguments)}}(),o=function(){var e=r(t.mark((function r(e){var n,c,s;return t.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,u(e);case 2:return n=r.sent,r.next=5,n.arrayBuffer();case 5:return c=r.sent,r.next=8,a(c);case 8:return s=r.sent,r.abrupt("return",null==s?void 0:s.map((function(r){return null==r?void 0:r.map((function(r){return String(r||"")}))})));case 10:case"end":return r.stop()}}),r)})));return function(r){return e.apply(this,arguments)}}();export{c as getCsvData,s as getTextData,o as getXlsxData};
2
2
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sources":["../../../src/components/NewDocumentViewer/utils.ts"],"sourcesContent":["import { parse, ParseResult } from 'papaparse';\nimport readXlsxFile from 'read-excel-file';\n\nconst parseCSV = (csvText: string): object[] => {\n const parsed: ParseResult<object> = parse(csvText, {\n header: true,\n dynamicTyping: true,\n skipEmptyLines: true,\n });\n return parsed.data;\n};\n\nexport const getCsvData = async (fileUrl: string): Promise<object[]> => {\n const response = await fetch(fileUrl);\n const text = await response.text();\n\n return parseCSV(text);\n};\n\nexport const getTextData = async (fileUrl: string): Promise<string> => {\n const response = await fetch(fileUrl);\n const data: string = await response.text();\n return data;\n};\n\nexport const getXlsxData = async (fileUrl: string) => {\n const response = await fetch(fileUrl);\n const arrayBuffer = await response.arrayBuffer();\n const xlsxData = await readXlsxFile(arrayBuffer);\n return xlsxData?.map(row => row?.map(cell => String(cell || '')));\n};\n"],"names":["getCsvData","_ref","_asyncToGenerator","_regeneratorRuntime","mark","fileUrl","response","text","wrap","_context","prev","next","fetch","sent","parseCSV","parse","header","dynamicTyping","skipEmptyLines","data","stop","_callee","_x","apply","this","arguments","getTextData","_ref2","_context2","abrupt","_callee2","_x2","getXlsxData","_ref3","arrayBuffer","xlsxData","_context3","readXlsxFile","map","row","cell","String","_callee3","_x3"],"mappings":"kKAGA,IASaA,EAAU,WAAA,IAAAC,EAAAC,EAAAC,EAAAC,MAAG,WAAOC,GAAe,IAAAC,EAAAC,EAAA,OAAAJ,EAAAK,MAAA,SAAAC,GAAA,OAAA,OAAAA,EAAAC,KAAAD,EAAAE,MAAA,KAAA,EAAA,OAAAF,EAAAE,KAAA,EACvBC,MAAMP,GAAQ,KAAA,EAAvB,OAARC,EAAQG,EAAAI,KAAAJ,EAAAE,KAAA,EACKL,EAASC,OAAM,KAAA,EAAxB,OAAJA,EAAIE,EAAAI,KAEHC,EAAAA,OAAAA,SAZ6BC,EAYpBR,EAZmC,CACjDS,QAAQ,EACRC,eAAe,EACfC,gBAAgB,IAEJC,MAOO,KAAA,EAAA,IAAA,MAAA,OAAAV,EAAAW,OAAA,GAAAC,EACtB,KAAA,OAAA,SALsBC,GAAA,OAAArB,EAAAsB,MAAAC,KAAAC,UAAA,CAAA,CAAA,GAOVC,EAAW,WAAA,IAAAC,EAAAzB,EAAAC,EAAAC,MAAG,WAAOC,GAAe,IAAAC,EAAAa,EAAA,OAAAhB,EAAAK,MAAA,SAAAoB,GAAA,OAAA,OAAAA,EAAAlB,KAAAkB,EAAAjB,MAAA,KAAA,EAAA,OAAAiB,EAAAjB,KAAA,EACxBC,MAAMP,GAAQ,KAAA,EAAvB,OAARC,EAAQsB,EAAAf,KAAAe,EAAAjB,KAAA,EACaL,EAASC,OAAM,KAAA,EAAxB,OAAZY,EAAYS,EAAAf,KAAAe,EAAAC,OAAA,SACXV,GAAI,KAAA,EAAA,IAAA,MAAA,OAAAS,EAAAR,OAAA,GAAAU,EACZ,KAAA,OAAA,SAJuBC,GAAA,OAAAJ,EAAAJ,MAAAC,KAAAC,UAAA,CAAA,CAAA,GAMXO,EAAW,WAAA,IAAAC,EAAA/B,EAAAC,EAAAC,MAAG,WAAOC,GAAe,IAAAC,EAAA4B,EAAAC,EAAA,OAAAhC,EAAAK,MAAA,SAAA4B,GAAA,OAAA,OAAAA,EAAA1B,KAAA0B,EAAAzB,MAAA,KAAA,EAAA,OAAAyB,EAAAzB,KAAA,EACxBC,MAAMP,GAAQ,KAAA,EAAvB,OAARC,EAAQ8B,EAAAvB,KAAAuB,EAAAzB,KAAA,EACYL,EAAS4B,cAAa,KAAA,EAA/B,OAAXA,EAAWE,EAAAvB,KAAAuB,EAAAzB,KAAA,EACM0B,EAAaH,GAAY,KAAA,EAAlC,OAARC,EAAQC,EAAAvB,KACPsB,EAAAA,OAAAA,SAAAA,aAAQ,EAARA,EAAUG,KAAI,SAAAC,GAAG,OAAIA,aAAG,EAAHA,EAAKD,KAAI,SAAAE,GAAI,OAAIC,OAAOD,GAAQ,MAAK,KAAA,KAAA,GAAA,IAAA,MAAA,OAAAJ,EAAAhB,OAAA,GAAAsB,EAClE,KAAA,OAAA,SALuBC,GAAA,OAAAV,EAAAV,MAAAC,KAAAC,UAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"utils.js","sources":["../../../src/components/NewDocumentViewer/utils.ts"],"sourcesContent":["import { fetchAttachment } from '~/utils/fetchAttachment';\n\nimport { parse, ParseResult } from 'papaparse';\nimport readXlsxFile from 'read-excel-file';\n\nconst parseCSV = (csvText: string): object[] => {\n const parsed: ParseResult<object> = parse(csvText, {\n header: true,\n dynamicTyping: true,\n skipEmptyLines: true,\n });\n return parsed.data;\n};\n\n/** Without this an expired signed url renders S3's `AccessDenied` XML as the document. */\nconst fetchFile = async (fileUrl: string): Promise<Response> => {\n const response = await fetchAttachment(fileUrl);\n\n if (!response.ok) {\n throw new Error(`Could not read the file (${response.status} ${response.statusText})`);\n }\n\n return response;\n};\n\nexport const getCsvData = async (fileUrl: string): Promise<object[]> => {\n const response = await fetchFile(fileUrl);\n const text = await response.text();\n\n return parseCSV(text);\n};\n\nexport const getTextData = async (fileUrl: string): Promise<string> => {\n const response = await fetchFile(fileUrl);\n const data: string = await response.text();\n return data;\n};\n\nexport const getXlsxData = async (fileUrl: string) => {\n const response = await fetchFile(fileUrl);\n const arrayBuffer = await response.arrayBuffer();\n const xlsxData = await readXlsxFile(arrayBuffer);\n return xlsxData?.map(row => row?.map(cell => String(cell || '')));\n};\n"],"names":["fetchFile","_ref","_asyncToGenerator","_regeneratorRuntime","mark","fileUrl","response","wrap","_context","prev","next","fetchAttachment","sent","ok","Error","concat","status","statusText","abrupt","stop","_callee","_x","apply","this","arguments","getCsvData","_ref2","text","_context2","parseCSV","parse","header","dynamicTyping","skipEmptyLines","data","_callee2","_x2","getTextData","_ref3","_context3","_callee3","_x3","getXlsxData","_ref4","arrayBuffer","xlsxData","_context4","readXlsxFile","map","row","cell","String","_callee4","_x4"],"mappings":"mOAKA,IAUMA,EAAS,WAAA,IAAAC,EAAAC,EAAAC,EAAAC,MAAG,WAAOC,GAAe,IAAAC,EAAA,OAAAH,EAAAI,MAAA,SAAAC,GAAA,OAAA,OAAAA,EAAAC,KAAAD,EAAAE,MAAA,KAAA,EAAA,OAAAF,EAAAE,KAAA,EACfC,EAAgBN,GAAQ,KAAA,EAAjC,IAARC,EAAQE,EAAAI,MAEAC,GAAE,CAAAL,EAAAE,KAAA,EAAA,KAAA,CAAA,MACR,IAAII,MAAK,4BAAAC,OAA6BT,EAASU,OAAUV,KAAAA,OAAAA,EAASW,WAAc,MAAA,KAAA,EAAA,OAAAT,EAAAU,OAAA,SAGjFZ,GAAQ,KAAA,EAAA,IAAA,MAAA,OAAAE,EAAAW,OAAA,GAAAC,EAChB,KAAA,OAAA,SARcC,GAAA,OAAApB,EAAAqB,MAAAC,KAAAC,UAAA,CAAA,CAAA,GAUFC,EAAU,WAAA,IAAAC,EAAAxB,EAAAC,EAAAC,MAAG,WAAOC,GAAe,IAAAC,EAAAqB,EAAA,OAAAxB,EAAAI,MAAA,SAAAqB,GAAA,OAAA,OAAAA,EAAAnB,KAAAmB,EAAAlB,MAAA,KAAA,EAAA,OAAAkB,EAAAlB,KAAA,EACvBV,EAAUK,GAAQ,KAAA,EAA3B,OAARC,EAAQsB,EAAAhB,KAAAgB,EAAAlB,KAAA,EACKJ,EAASqB,OAAM,KAAA,EAAxB,OAAJA,EAAIC,EAAAhB,KAEHiB,EAAAA,OAAAA,SAvB6BC,EAuBpBH,EAvBmC,CACjDI,QAAQ,EACRC,eAAe,EACfC,gBAAgB,IAEJC,MAkBO,KAAA,EAAA,IAAA,MAAA,OAAAN,EAAAT,OAAA,GAAAgB,EACtB,KAAA,OAAA,SALsBC,GAAA,OAAAV,EAAAJ,MAAAC,KAAAC,UAAA,CAAA,CAAA,GAOVa,EAAW,WAAA,IAAAC,EAAApC,EAAAC,EAAAC,MAAG,WAAOC,GAAe,IAAAC,EAAA4B,EAAA,OAAA/B,EAAAI,MAAA,SAAAgC,GAAA,OAAA,OAAAA,EAAA9B,KAAA8B,EAAA7B,MAAA,KAAA,EAAA,OAAA6B,EAAA7B,KAAA,EACxBV,EAAUK,GAAQ,KAAA,EAA3B,OAARC,EAAQiC,EAAA3B,KAAA2B,EAAA7B,KAAA,EACaJ,EAASqB,OAAM,KAAA,EAAxB,OAAZO,EAAYK,EAAA3B,KAAA2B,EAAArB,OAAA,SACXgB,GAAI,KAAA,EAAA,IAAA,MAAA,OAAAK,EAAApB,OAAA,GAAAqB,EACZ,KAAA,OAAA,SAJuBC,GAAA,OAAAH,EAAAhB,MAAAC,KAAAC,UAAA,CAAA,CAAA,GAMXkB,EAAW,WAAA,IAAAC,EAAAzC,EAAAC,EAAAC,MAAG,WAAOC,GAAe,IAAAC,EAAAsC,EAAAC,EAAA,OAAA1C,EAAAI,MAAA,SAAAuC,GAAA,OAAA,OAAAA,EAAArC,KAAAqC,EAAApC,MAAA,KAAA,EAAA,OAAAoC,EAAApC,KAAA,EACxBV,EAAUK,GAAQ,KAAA,EAA3B,OAARC,EAAQwC,EAAAlC,KAAAkC,EAAApC,KAAA,EACYJ,EAASsC,cAAa,KAAA,EAA/B,OAAXA,EAAWE,EAAAlC,KAAAkC,EAAApC,KAAA,EACMqC,EAAaH,GAAY,KAAA,EAAlC,OAARC,EAAQC,EAAAlC,KACPiC,EAAAA,OAAAA,SAAAA,aAAQ,EAARA,EAAUG,KAAI,SAAAC,GAAG,OAAIA,aAAG,EAAHA,EAAKD,KAAI,SAAAE,GAAI,OAAIC,OAAOD,GAAQ,MAAK,KAAA,KAAA,GAAA,IAAA,MAAA,OAAAJ,EAAA3B,OAAA,GAAAiC,EAClE,KAAA,OAAA,SALuBC,GAAA,OAAAV,EAAArB,MAAAC,KAAAC,UAAA,CAAA,CAAA"}