@corva/ui 3.74.0-1 → 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.
- package/cjs-bundle/components/AddComment/Popover.js +1 -1
- package/cjs-bundle/components/AddComment/Popover.js.map +1 -1
- package/cjs-bundle/components/AddComment/components/Content.js +1 -1
- package/cjs-bundle/components/AddComment/components/Content.js.map +1 -1
- package/cjs-bundle/components/AttachmentLightbox/AttachmentDocument.js +2 -0
- package/cjs-bundle/components/AttachmentLightbox/AttachmentDocument.js.map +1 -0
- package/cjs-bundle/components/AttachmentLightbox/AttachmentLightbox.js +1 -1
- package/cjs-bundle/components/AttachmentLightbox/AttachmentLightbox.js.map +1 -1
- package/cjs-bundle/components/AttachmentLightbox/AttachmentLightbox.scss.js +1 -1
- package/cjs-bundle/components/AttachmentLightbox/AttachmentPreviewPane.js +2 -0
- package/cjs-bundle/components/AttachmentLightbox/AttachmentPreviewPane.js.map +1 -0
- package/cjs-bundle/components/AttachmentLightbox/copyImageToClipboard.js +2 -0
- package/cjs-bundle/components/AttachmentLightbox/copyImageToClipboard.js.map +1 -0
- package/cjs-bundle/components/AttachmentLightbox/downloadAttachment.js +2 -0
- package/cjs-bundle/components/AttachmentLightbox/downloadAttachment.js.map +1 -0
- package/cjs-bundle/components/AttachmentLightbox/useAttachmentLightbox.js +1 -1
- package/cjs-bundle/components/AttachmentLightbox/useAttachmentLightbox.js.map +1 -1
- package/cjs-bundle/components/AttachmentLightbox/useZoomPan.js +2 -0
- package/cjs-bundle/components/AttachmentLightbox/useZoomPan.js.map +1 -0
- package/cjs-bundle/components/AttachmentPreview/AttachmentActionsMenu.js +2 -0
- package/cjs-bundle/components/AttachmentPreview/AttachmentActionsMenu.js.map +1 -0
- package/cjs-bundle/components/AttachmentPreview/AttachmentDownloadLink.js +2 -0
- package/cjs-bundle/components/AttachmentPreview/AttachmentDownloadLink.js.map +1 -0
- package/cjs-bundle/components/AttachmentPreview/AttachmentImage.js +2 -0
- package/cjs-bundle/components/AttachmentPreview/AttachmentImage.js.map +1 -0
- package/cjs-bundle/components/AttachmentPreview/AttachmentPreview.js +1 -1
- package/cjs-bundle/components/AttachmentPreview/AttachmentPreview.js.map +1 -1
- package/cjs-bundle/components/AttachmentPreview/AttachmentPreview.scss.js +1 -1
- package/cjs-bundle/components/AttachmentPreview/AttachmentRow.js +1 -1
- package/cjs-bundle/components/AttachmentPreview/AttachmentRow.js.map +1 -1
- package/cjs-bundle/components/AttachmentPreview/AttachmentTile.js +1 -1
- package/cjs-bundle/components/AttachmentPreview/AttachmentTile.js.map +1 -1
- package/cjs-bundle/components/AttachmentPreview/useStoredAttachment.js +2 -0
- package/cjs-bundle/components/AttachmentPreview/useStoredAttachment.js.map +1 -0
- package/cjs-bundle/components/AttachmentPreview/useStoredAttachments.js +1 -1
- package/cjs-bundle/components/AttachmentPreview/useStoredAttachments.js.map +1 -1
- package/cjs-bundle/components/BICOffsetPickerDialog/index.js +1 -1
- package/cjs-bundle/components/BICOffsetPickerDialog/index.js.map +1 -1
- package/cjs-bundle/components/Casing/CasingTableV2/components/CasingJoints/Editor.js +1 -1
- package/cjs-bundle/components/Casing/CasingTableV2/components/CasingJoints/Editor.js.map +1 -1
- package/cjs-bundle/components/Casing/CasingTableV2/components/Component.js +1 -1
- package/cjs-bundle/components/Casing/CasingTableV2/components/Component.js.map +1 -1
- package/cjs-bundle/components/Casing/CasingTableV2/components/DrillPipe/Editor.js +1 -1
- package/cjs-bundle/components/Casing/CasingTableV2/components/DrillPipe/Editor.js.map +1 -1
- package/cjs-bundle/components/CommentCard/CommentCard.js +1 -1
- package/cjs-bundle/components/CommentCard/CommentCard.js.map +1 -1
- package/cjs-bundle/components/CommentCard/CommentMenu.js +1 -1
- package/cjs-bundle/components/CommentCard/CommentMenu.js.map +1 -1
- package/cjs-bundle/components/CommentComposer/CommentComposer.js +1 -1
- package/cjs-bundle/components/CommentComposer/CommentComposer.js.map +1 -1
- package/cjs-bundle/components/CommentComposer/CommentReplyInput.js +1 -1
- package/cjs-bundle/components/CommentComposer/CommentReplyInput.js.map +1 -1
- package/cjs-bundle/components/CommentComposer/useAttachmentUpload.js +1 -1
- package/cjs-bundle/components/CommentComposer/useAttachmentUpload.js.map +1 -1
- package/cjs-bundle/components/CommentInputNext/CommentInputNext.js +1 -1
- package/cjs-bundle/components/CommentInputNext/CommentInputNext.js.map +1 -1
- package/cjs-bundle/components/CommentInputNext/useFilePaste.js +2 -0
- package/cjs-bundle/components/CommentInputNext/useFilePaste.js.map +1 -0
- package/cjs-bundle/components/DocumentViewer/DocumentViewer.js +1 -1
- package/cjs-bundle/components/DocumentViewer/DocumentViewer.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Component.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Component.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js.map +1 -1
- package/cjs-bundle/components/LinkedText/LinkedText.js +2 -0
- package/cjs-bundle/components/LinkedText/LinkedText.js.map +1 -0
- package/cjs-bundle/components/LinkedText/LinkedText.scss.js +2 -0
- package/cjs-bundle/components/LinkedText/LinkedText.scss.js.map +1 -0
- package/cjs-bundle/components/NewDocumentViewer/utils.js +1 -1
- package/cjs-bundle/components/NewDocumentViewer/utils.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/index.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/index.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/index.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/index.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/WellHubView/index.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/WellHubView/index.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js.map +1 -1
- package/cjs-bundle/components/PadOffsetsPicker/StagesSelector.js +1 -1
- package/cjs-bundle/components/PadOffsetsPicker/StagesSelector.js.map +1 -1
- package/cjs-bundle/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js +1 -1
- package/cjs-bundle/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js.map +1 -1
- package/cjs-bundle/components/UserMention/constants.js +1 -1
- package/cjs-bundle/components/UserMention/constants.js.map +1 -1
- package/cjs-bundle/components/UserMention/index.js +1 -1
- package/cjs-bundle/components/UserMention/index.js.map +1 -1
- package/cjs-bundle/components/index.js +1 -1
- package/cjs-bundle/componentsV2/ButtonIcon/ButtonIcon.js +1 -1
- package/cjs-bundle/componentsV2/ButtonIcon/ButtonIcon.js.map +1 -1
- package/cjs-bundle/componentsV2/ButtonIcon/ButtonIcon.scss.js +1 -1
- package/cjs-bundle/componentsV2/Modal/Modal.js +1 -1
- package/cjs-bundle/componentsV2/Modal/Modal.js.map +1 -1
- package/cjs-bundle/componentsV2/Modal/constants.js +2 -0
- package/cjs-bundle/componentsV2/Modal/constants.js.map +1 -0
- package/cjs-bundle/effects/useOutsideClick.js +1 -1
- package/cjs-bundle/effects/useOutsideClick.js.map +1 -1
- package/cjs-bundle/utils/fetchAttachment.js +2 -0
- package/cjs-bundle/utils/fetchAttachment.js.map +1 -0
- package/cjs-bundle/utils/links.js +2 -0
- package/cjs-bundle/utils/links.js.map +1 -0
- package/components/AddComment/Popover.js +1 -1
- package/components/AddComment/Popover.js.map +1 -1
- package/components/AddComment/components/Content.js +1 -1
- package/components/AddComment/components/Content.js.map +1 -1
- package/components/AttachmentLightbox/AttachmentDocument.d.ts +6 -0
- package/components/AttachmentLightbox/AttachmentDocument.d.ts.map +1 -0
- package/components/AttachmentLightbox/AttachmentDocument.js +2 -0
- package/components/AttachmentLightbox/AttachmentDocument.js.map +1 -0
- package/components/AttachmentLightbox/AttachmentLightbox.d.ts +9 -8
- package/components/AttachmentLightbox/AttachmentLightbox.d.ts.map +1 -1
- package/components/AttachmentLightbox/AttachmentLightbox.js +1 -1
- package/components/AttachmentLightbox/AttachmentLightbox.js.map +1 -1
- package/components/AttachmentLightbox/AttachmentLightbox.scss.js +1 -1
- package/components/AttachmentLightbox/AttachmentPreviewPane.d.ts +9 -0
- package/components/AttachmentLightbox/AttachmentPreviewPane.d.ts.map +1 -0
- package/components/AttachmentLightbox/AttachmentPreviewPane.js +2 -0
- package/components/AttachmentLightbox/AttachmentPreviewPane.js.map +1 -0
- package/components/AttachmentLightbox/__tests__/AttachmentDocument.test.d.ts +2 -0
- package/components/AttachmentLightbox/__tests__/AttachmentDocument.test.d.ts.map +1 -0
- package/components/AttachmentLightbox/__tests__/AttachmentLightbox.test.d.ts +2 -0
- package/components/AttachmentLightbox/__tests__/AttachmentLightbox.test.d.ts.map +1 -0
- package/components/AttachmentLightbox/__tests__/copyImageToClipboard.test.d.ts +2 -0
- package/components/AttachmentLightbox/__tests__/copyImageToClipboard.test.d.ts.map +1 -0
- package/components/AttachmentLightbox/__tests__/downloadAttachment.test.d.ts +2 -0
- package/components/AttachmentLightbox/__tests__/downloadAttachment.test.d.ts.map +1 -0
- package/components/AttachmentLightbox/__tests__/useZoomPan.test.d.ts +2 -0
- package/components/AttachmentLightbox/__tests__/useZoomPan.test.d.ts.map +1 -0
- package/components/AttachmentLightbox/copyImageToClipboard.d.ts +4 -0
- package/components/AttachmentLightbox/copyImageToClipboard.d.ts.map +1 -0
- package/components/AttachmentLightbox/copyImageToClipboard.js +2 -0
- package/components/AttachmentLightbox/copyImageToClipboard.js.map +1 -0
- package/components/AttachmentLightbox/downloadAttachment.d.ts +10 -0
- package/components/AttachmentLightbox/downloadAttachment.d.ts.map +1 -0
- package/components/AttachmentLightbox/downloadAttachment.js +2 -0
- package/components/AttachmentLightbox/downloadAttachment.js.map +1 -0
- package/components/AttachmentLightbox/useAttachmentLightbox.d.ts +6 -2
- package/components/AttachmentLightbox/useAttachmentLightbox.d.ts.map +1 -1
- package/components/AttachmentLightbox/useAttachmentLightbox.js +1 -1
- package/components/AttachmentLightbox/useAttachmentLightbox.js.map +1 -1
- package/components/AttachmentLightbox/useZoomPan.d.ts +29 -0
- package/components/AttachmentLightbox/useZoomPan.d.ts.map +1 -0
- package/components/AttachmentLightbox/useZoomPan.js +2 -0
- package/components/AttachmentLightbox/useZoomPan.js.map +1 -0
- package/components/AttachmentPreview/AttachmentActionsMenu.d.ts +16 -0
- package/components/AttachmentPreview/AttachmentActionsMenu.d.ts.map +1 -0
- package/components/AttachmentPreview/AttachmentActionsMenu.js +2 -0
- package/components/AttachmentPreview/AttachmentActionsMenu.js.map +1 -0
- package/components/AttachmentPreview/AttachmentDownloadLink.d.ts +11 -0
- package/components/AttachmentPreview/AttachmentDownloadLink.d.ts.map +1 -0
- package/components/AttachmentPreview/AttachmentDownloadLink.js +2 -0
- package/components/AttachmentPreview/AttachmentDownloadLink.js.map +1 -0
- package/components/AttachmentPreview/AttachmentImage.d.ts +12 -0
- package/components/AttachmentPreview/AttachmentImage.d.ts.map +1 -0
- package/components/AttachmentPreview/AttachmentImage.js +2 -0
- package/components/AttachmentPreview/AttachmentImage.js.map +1 -0
- package/components/AttachmentPreview/AttachmentPreview.d.ts.map +1 -1
- package/components/AttachmentPreview/AttachmentPreview.js +1 -1
- package/components/AttachmentPreview/AttachmentPreview.js.map +1 -1
- package/components/AttachmentPreview/AttachmentPreview.scss.js +1 -1
- package/components/AttachmentPreview/AttachmentPreview.types.d.ts +7 -0
- package/components/AttachmentPreview/AttachmentPreview.types.d.ts.map +1 -1
- package/components/AttachmentPreview/AttachmentRow.d.ts +7 -3
- package/components/AttachmentPreview/AttachmentRow.d.ts.map +1 -1
- package/components/AttachmentPreview/AttachmentRow.js +1 -1
- package/components/AttachmentPreview/AttachmentRow.js.map +1 -1
- package/components/AttachmentPreview/AttachmentTile.d.ts +5 -1
- package/components/AttachmentPreview/AttachmentTile.d.ts.map +1 -1
- package/components/AttachmentPreview/AttachmentTile.js +1 -1
- package/components/AttachmentPreview/AttachmentTile.js.map +1 -1
- package/components/AttachmentPreview/__tests__/AttachmentActionsMenu.test.d.ts +2 -0
- package/components/AttachmentPreview/__tests__/AttachmentActionsMenu.test.d.ts.map +1 -0
- package/components/AttachmentPreview/__tests__/AttachmentDownloadLink.test.d.ts +2 -0
- package/components/AttachmentPreview/__tests__/AttachmentDownloadLink.test.d.ts.map +1 -0
- package/components/AttachmentPreview/__tests__/AttachmentImage.test.d.ts +2 -0
- package/components/AttachmentPreview/__tests__/AttachmentImage.test.d.ts.map +1 -0
- package/components/AttachmentPreview/__tests__/AttachmentTile.test.d.ts +2 -0
- package/components/AttachmentPreview/__tests__/AttachmentTile.test.d.ts.map +1 -0
- package/components/AttachmentPreview/__tests__/useStoredAttachments.test.d.ts +2 -0
- package/components/AttachmentPreview/__tests__/useStoredAttachments.test.d.ts.map +1 -0
- package/components/AttachmentPreview/useStoredAttachment.d.ts +8 -0
- package/components/AttachmentPreview/useStoredAttachment.d.ts.map +1 -1
- package/components/AttachmentPreview/useStoredAttachment.js +2 -0
- package/components/AttachmentPreview/useStoredAttachment.js.map +1 -0
- package/components/AttachmentPreview/useStoredAttachments.d.ts +1 -1
- package/components/AttachmentPreview/useStoredAttachments.d.ts.map +1 -1
- package/components/AttachmentPreview/useStoredAttachments.js +1 -1
- package/components/AttachmentPreview/useStoredAttachments.js.map +1 -1
- package/components/BICOffsetPickerDialog/index.js +1 -1
- package/components/BICOffsetPickerDialog/index.js.map +1 -1
- package/components/Casing/CasingTableV2/components/CasingJoints/Editor.js +1 -1
- package/components/Casing/CasingTableV2/components/CasingJoints/Editor.js.map +1 -1
- package/components/Casing/CasingTableV2/components/Component.js +1 -1
- package/components/Casing/CasingTableV2/components/Component.js.map +1 -1
- package/components/Casing/CasingTableV2/components/DrillPipe/Editor.js +1 -1
- package/components/Casing/CasingTableV2/components/DrillPipe/Editor.js.map +1 -1
- package/components/CommentCard/CommentCard.d.ts.map +1 -1
- package/components/CommentCard/CommentCard.js +1 -1
- package/components/CommentCard/CommentCard.js.map +1 -1
- package/components/CommentCard/CommentCard.types.d.ts +2 -0
- package/components/CommentCard/CommentCard.types.d.ts.map +1 -1
- package/components/CommentCard/CommentMenu.d.ts.map +1 -1
- package/components/CommentCard/CommentMenu.js +1 -1
- package/components/CommentCard/CommentMenu.js.map +1 -1
- package/components/CommentComposer/CommentComposer.d.ts.map +1 -1
- package/components/CommentComposer/CommentComposer.js +1 -1
- package/components/CommentComposer/CommentComposer.js.map +1 -1
- package/components/CommentComposer/CommentReplyInput.d.ts.map +1 -1
- package/components/CommentComposer/CommentReplyInput.js +1 -1
- package/components/CommentComposer/CommentReplyInput.js.map +1 -1
- package/components/CommentComposer/__tests__/useAttachmentUpload.linked.test.d.ts +2 -0
- package/components/CommentComposer/__tests__/useAttachmentUpload.linked.test.d.ts.map +1 -0
- package/components/CommentComposer/useAttachmentUpload.d.ts +1 -0
- package/components/CommentComposer/useAttachmentUpload.d.ts.map +1 -1
- package/components/CommentComposer/useAttachmentUpload.js +1 -1
- package/components/CommentComposer/useAttachmentUpload.js.map +1 -1
- package/components/CommentInputNext/CommentInputNext.d.ts +2 -0
- package/components/CommentInputNext/CommentInputNext.d.ts.map +1 -1
- package/components/CommentInputNext/CommentInputNext.js +1 -1
- package/components/CommentInputNext/CommentInputNext.js.map +1 -1
- package/components/CommentInputNext/__tests__/useFilePaste.test.d.ts +2 -0
- package/components/CommentInputNext/__tests__/useFilePaste.test.d.ts.map +1 -0
- package/components/CommentInputNext/useFilePaste.d.ts +17 -0
- package/components/CommentInputNext/useFilePaste.d.ts.map +1 -0
- package/components/CommentInputNext/useFilePaste.js +2 -0
- package/components/CommentInputNext/useFilePaste.js.map +1 -0
- package/components/DocumentViewer/DocumentViewer.js +1 -1
- package/components/DocumentViewer/DocumentViewer.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Component.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Component.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js.map +1 -1
- package/components/LinkedText/LinkedText.d.ts +17 -0
- package/components/LinkedText/LinkedText.d.ts.map +1 -0
- package/components/LinkedText/LinkedText.js +2 -0
- package/components/LinkedText/LinkedText.js.map +1 -0
- package/components/LinkedText/LinkedText.scss.js +2 -0
- package/components/LinkedText/LinkedText.scss.js.map +1 -0
- package/components/LinkedText/__tests__/LinkedText.test.d.ts +2 -0
- package/components/LinkedText/__tests__/LinkedText.test.d.ts.map +1 -0
- package/components/LinkedText/index.d.ts +2 -0
- package/components/LinkedText/index.d.ts.map +1 -0
- package/components/NewDocumentViewer/utils.d.ts.map +1 -1
- package/components/NewDocumentViewer/utils.js +1 -1
- package/components/NewDocumentViewer/utils.js.map +1 -1
- package/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js +1 -1
- package/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js.map +1 -1
- package/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js +1 -1
- package/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js.map +1 -1
- package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js +1 -1
- package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js.map +1 -1
- package/components/OffsetWellPickerV3/components/CustomSelectionView/index.js +1 -1
- package/components/OffsetWellPickerV3/components/CustomSelectionView/index.js.map +1 -1
- package/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js +1 -1
- package/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js.map +1 -1
- package/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js +1 -1
- package/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js.map +1 -1
- package/components/OffsetWellPickerV3/components/TabSelection/index.js +1 -1
- package/components/OffsetWellPickerV3/components/TabSelection/index.js.map +1 -1
- package/components/OffsetWellPickerV3/components/WellHubView/index.js +1 -1
- package/components/OffsetWellPickerV3/components/WellHubView/index.js.map +1 -1
- package/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js +1 -1
- package/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js.map +1 -1
- package/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js +1 -1
- package/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js.map +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js.map +1 -1
- package/components/PadOffsetsPicker/StagesSelector.js +1 -1
- package/components/PadOffsetsPicker/StagesSelector.js.map +1 -1
- package/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js +1 -1
- package/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js.map +1 -1
- package/components/UserMention/__tests__/highlightLinks.test.d.ts +2 -0
- package/components/UserMention/__tests__/highlightLinks.test.d.ts.map +1 -0
- package/components/UserMention/constants.d.ts +1 -0
- package/components/UserMention/constants.d.ts.map +1 -1
- package/components/UserMention/constants.js +1 -1
- package/components/UserMention/constants.js.map +1 -1
- package/components/UserMention/index.js +1 -1
- package/components/UserMention/index.js.map +1 -1
- package/components/index.d.ts +2 -0
- package/components/index.d.ts.map +1 -1
- package/components/index.js +1 -1
- package/componentsV2/ButtonIcon/ButtonIcon.d.ts +2 -0
- package/componentsV2/ButtonIcon/ButtonIcon.d.ts.map +1 -1
- package/componentsV2/ButtonIcon/ButtonIcon.js +1 -1
- package/componentsV2/ButtonIcon/ButtonIcon.js.map +1 -1
- package/componentsV2/ButtonIcon/ButtonIcon.scss.js +1 -1
- package/componentsV2/ButtonIcon/ButtonIcon.stories.d.ts +1 -0
- package/componentsV2/ButtonIcon/ButtonIcon.stories.d.ts.map +1 -1
- package/componentsV2/Modal/Modal.d.ts.map +1 -1
- package/componentsV2/Modal/Modal.js +1 -1
- package/componentsV2/Modal/Modal.js.map +1 -1
- package/componentsV2/Modal/constants.d.ts +3 -0
- package/componentsV2/Modal/constants.d.ts.map +1 -0
- package/componentsV2/Modal/constants.js +2 -0
- package/componentsV2/Modal/constants.js.map +1 -0
- package/effects/__tests__/useOutsideClick.test.d.ts.map +1 -1
- package/effects/useOutsideClick.d.ts.map +1 -1
- package/effects/useOutsideClick.js +1 -1
- package/effects/useOutsideClick.js.map +1 -1
- package/mcp-server/server.mjs +35 -9
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/utils/__tests__/fetchAttachment.test.d.ts +2 -0
- package/utils/__tests__/fetchAttachment.test.d.ts.map +1 -0
- package/utils/__tests__/links.test.d.ts +2 -0
- package/utils/__tests__/links.test.d.ts.map +1 -0
- package/utils/fetchAttachment.d.ts +3 -0
- package/utils/fetchAttachment.d.ts.map +1 -0
- package/utils/fetchAttachment.js +2 -0
- package/utils/fetchAttachment.js.map +1 -0
- package/utils/links.d.ts +14 -0
- package/utils/links.d.ts.map +1 -0
- package/utils/links.js +2 -0
- package/utils/links.js.map +1 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useRef as e}from"react";import{node as o,number as t,func as s,bool as i,shape as n}from"prop-types";import{makeStyles as r}from"@material-ui/core";import"@babel/runtime/helpers/defineProperty";import"../../DevCenter/DevCenterAppContainer/components/IsInsideIsolatedDcAppProvider/IsInsideIsolatedDcAppProvider.js";import"../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"@babel/runtime/helpers/objectWithoutProperties";import"classnames";import"lodash";import"../../Modal/CorvaModal.scss.js";import"@icon-park/react/es/all";import{jsxs as p,jsx as m}from"react/jsx-runtime";import"../../../icons/IconParkProvider.js";import"../../../icons/customIcons/icons/AddMessage.js";import"../../../icons/customIcons/icons/DragOne.js";import"../../../icons/customIcons/icons/Attention.js";import"../../../icons/customIcons/icons/Collapse.js";import"../../../icons/customIcons/icons/Dashboard.js";import"../../../icons/customIcons/icons/Expand.js";import"../../../icons/customIcons/icons/FolderClosed.js";import"../../../icons/customIcons/icons/FolderClosedFilled.js";import"../../../icons/customIcons/icons/FolderOpened.js";import"../../../icons/customIcons/icons/GreaterOrEqual.js";import"../../../icons/customIcons/icons/LessOrEqual.js";import"../../../icons/customIcons/icons/Search.js";import"../../../icons/customIcons/icons/SearchOne.js";import"../../../icons/customIcons/icons/Wellhub.js";import"../../../icons/customIcons/icons/MultiRuler.js";import"../../../icons/customIcons/icons/Checkbox.js";import"../../../icons/customIcons/icons/CheckboxChecked.js";import"../../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../../icons/customIcons/icons/Radio.js";import"../../../icons/customIcons/icons/RadioChecked.js";import"../../../icons/customIcons/icons/SimulFrac.js";import"../../../icons/customIcons/icons/ZipperFrac.js";import"../../../icons/customIcons/icons/CautionFilled.js";import"../../../icons/customIcons/icons/MoreApp.js";import"../../../icons/customIcons/icons/Pad.js";import"../../../icons/customIcons/icons/DrilloutUnit.js";import"../../../icons/customIcons/icons/FracFleet.js";import"../../../icons/customIcons/icons/Global.js";import"../../../icons/customIcons/icons/Program.js";import"../../../icons/customIcons/icons/Rig.js";import"../../../icons/customIcons/icons/Well.js";import"../../../icons/customIcons/icons/Gap.js";import"../../../icons/customIcons/icons/Pin.js";import"../../../icons/customIcons/icons/CloseOneFilled.js";import"../../../icons/customIcons/icons/AttentionFilled.js";import"../../../icons/customIcons/icons/CheckOneFilled.js";import"../../../icons/customIcons/icons/Archive.js";import"../../../icons/customIcons/icons/ArchiveCancel.js";import"../../../icons/customIcons/icons/Unarchive.js";import"../../../icons/customIcons/icons/Archived.js";import"../../../icons/customIcons/icons/InterventionUnit.js";import"../../../icons/customIcons/icons/CloudDelete.js";import"../../../icons/customIcons/icons/Lasso.js";import"../../../icons/customIcons/icons/Radius.js";import"../../../icons/customIcons/icons/ErrorOps.js";import"../../../icons/customIcons/icons/DataTypeOps.js";import"../../../icons/customIcons/icons/FalsePositiveOps.js";import"../../../icons/customIcons/icons/CalibrationOps.js";import"../../../icons/customIcons/icons/CriticalOps.js";import"../../../icons/customIcons/icons/Company.js";import"../../../icons/customIcons/icons/ArchiveOne.js";import"../../../icons/customIcons/icons/ParseBotFusion.js";import"../../../icons/customIcons/icons/Connect.js";import"../../../icons/customIcons/icons/PuzzleOne.js";import"../../../icons/customIcons/icons/Feed.js";import"../../../icons/customIcons/icons/Prompt.js";import"../../../icons/customIcons/icons/Companies.js";import"../../../icons/customIcons/icons/ClipboardAi.js";import"../../../icons/customIcons/icons/Key.js";import"../../../icons/customIcons/icons/AtSignCrossed.js";import"../../../icons/customIcons/icons/MappingManual.js";import"../../../icons/customIcons/icons/Mapping.js";import"../../../icons/customIcons/icons/Metrics.js";import"../../../icons/customIcons/icons/Drops.js";import"../../../icons/customIcons/icons/ClipboardSearch.js";import"../../../icons/customIcons/icons/Template.js";import"../../../icons/customIcons/icons/ClipboardMetrics.js";import"../../../icons/customIcons/icons/ClipboardBuilder.js";import"../../../icons/customIcons/icons/UnitConversion.js";import"../../../icons/customIcons/icons/NPT.js";import"../../../icons/customIcons/icons/GuidedFrac.js";import"../../../utils/mobileDetect.js";import"../../IconButton/index.js";import"../../../constants/goals.js";import"../../../constants/segment.js";import"../../../constants/alerts.js";import"../../../constants/apps.js";import"../../../constants/drillstring.js";import"../../../constants/completion.js";import"../../../constants/appPackages.js";import"../../../constants/notifications.js";import"../../../constants/feed.js";import"../../../constants/bha.js";import"../../../constants/corvaCompanyId.js";import"../../GradientManager/configuration/constants.js";import"@babel/runtime/helpers/slicedToArray";import"uuid";import"../../IconMenu/index.js";import"../../StyledMenuItem/index.js";import"../../AppIcon/AppIcon.js";import"../../DevCenter/AppHeader/AppHeader.js";import"../../DevCenter/AppSideBar/AppSideBar.js";import"../../DevCenter/AppsDataProvider/AppsDataProvider.js";import"@material-ui/icons";import"../../DevCenter/AppContext.js";import"../../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"react-router-dom";import"query-string";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"../../../utils/index.js";import"../../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/components/RemoveAppButton.js";import"../../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/components/SettingsAccordion.js";import"../../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../../../componentsV2/Text/Text.js";import"../../../componentsV2/Grid/Grid.js";import"../../../componentsV2/Grid/Cell.js";import"../../../componentsV2/Header/Header.scss.js";import"../../../componentsV2/Button/Button.js";import"../../../componentsV2/ButtonIcon/ButtonIcon.js";import"../../../componentsV2/Tooltip/Tooltip.scss.js";import"../../../componentsV2/Popover/Popover.js";import"../../../componentsV2/PopoverPanel/PopoverPanel.js";import"../../../componentsV2/Radio/Radio.js";import"../../../componentsV2/RadioAndCheckboxGroup/RadioAndCheckboxGroup.scss.js";import"../../../componentsV2/Checkbox/Checkbox.js";import"@babel/runtime/helpers/toConsumableArray";import"../../../componentsV2/TextInput/TextInput.js";import"../../../componentsV2/TextInputNext/TextInputNext.js";import"../../../componentsV2/Label/Label.js";import"../../../componentsV2/TextEndTruncated/TextEndTruncated.scss.js";import"../../../componentsV2/TextMiddleTruncated/TextMiddleTruncated.constants.js";import"../../../componentsV2/TextMiddleTruncated/TextMiddleTruncated.scss.js";import"../../../componentsV2/TextLink/TextLink.js";import"../../../componentsV2/Chip/Chip.js";import"../../../componentsV2/ChipAlert/ChipAlert.js";import"../../../componentsV2/ChipIndicator/ChipIndicator.js";import"../../../componentsV2/Avatar/Avatar.js";import"../../../componentsV2/AvatarGroup/AvatarGroup.js";import"@material-ui/lab";import"../../../componentsV2/ToggleButtons/ToggleButtons.scss.js";import"../../../componentsV2/Paper/Paper.js";import"../../../componentsV2/ModalWindow/ModalWindow.js";import"../../../componentsV2/Modal/Modal.scss.js";import"../../../componentsV2/Menu/Menu.js";import"../../../componentsV2/utils.js";import"../../../componentsV2/Hint/Hint.scss.js";import"../../../componentsV2/Counter/Counter.js";import"../../../componentsV2/BadgeBase/BadgeBase.scss.js";import"../../../componentsV2/TemplatesControl/TemplatesControl.js";import"zustand";import"../../../componentsV2/TemplatesControl/utils.js";import"../../../componentsV2/TemplatesControl/icons/folder/index.js";import"../../../componentsV2/TemplatesControl/Store/utils.js";import"../../../componentsV2/TemplatesControl/types.js";import"../../../clients/jsonApi/index.js";import"../../../permissions/PermissionsContext.js";import"../../../permissions/constants/index.js";import"../../../permissions/withPermissionsHOC.js";import"../../../permissions/ProvidePermissions.js";import"../../../componentsV2/BadgeDot/BadgeDot.scss.js";import"../../../componentsV2/LoaderLinear/LoaderLinear.scss.js";import"../../../componentsV2/LoaderLogo/LoaderLogo.constants.js";import"../../../componentsV2/LoaderLogo/LoaderLogo.scss.js";import"../../../componentsV2/Switch/Switch.js";import"../../../componentsV2/Tabs/Tabs.js";import"../../../componentsV2/EmptyState/EmptyState.scss.js";import"../../../componentsV2/FileIcon/FileIcon.js";import"../../../componentsV2/Tag/Tag.js";import"react-dropzone";import"../../../componentsV2/FilesDropzone/FilesDropzone.scss.js";import"../../../componentsV2/FilesLoader/FilesLoader.scss.js";import"file-extension";import"image-extensions";import"video-extensions";import"../../../componentsV2/FilesProcessor/FilesProcessor.scss.js";import"../../../componentsV2/Skeleton/Skeleton.scss.js";import"../../../utils/main.js";import"../../../componentsV2/CopyToClipboard/CopyToClipboard.scss.js";import"../../../componentsV2/Stepper/Step/Step.scss.js";import"../../../componentsV2/Stepper/Stepper.scss.js";import"../../../componentsV2/ButtonLive/ButtonLive.js";import"../../../componentsV2/ButtonText/ButtonText.js";import"../../../componentsV2/IndicatorLive/IndicatorLive.js";import"../../../componentsV2/Accordion/Accordion.scss.js";import"../../../componentsV2/Breadcrumbs/Breadcrumbs.scss.js";import"../../../componentsV2/BadgeComment/BadgeComment.js";import"../../../componentsV2/AppContainer/AppContainer.js";import"../../../componentsV2/AppContainer/AppContainer.constants.js";import"../../../componentsV2/AppFooter/AppFooter.js";import"immutable";import"../../../componentsV2/AppCommonsProvider/AppCommonsContext.js";import"../../../componentsV2/AppHeader/AppHeader.constants.js";import"../../../componentsV2/AppHeader/AppBadge/AppBadge.scss.js";import"../../../componentsV2/AppHeader/AppAssets/utils.js";import"../../../componentsV2/AppHeader/AppAssets/AppAssets.scss.js";import"../../PadModeSelect/PadModeSelect.js";import"../../../componentsV2/AppHeader/PadMode/PadMode.scss.js";import"../../../constants/streamSourceType.js";import"../../../componentsV2/PadModeSelect/PadModeSelect.js";import"../../../componentsV2/PadModeSelect/PadModeSelect.constants.js";import"../../../componentsV2/AppCommonsProvider/AppCommonsProvider.js";import"../../../componentsV2/AppHeader/V3/VersionSelect/VersionSelect.js";import"../../../componentsV2/UniversalLink/UniversalLink.scss.js";import"../../../componentsV2/AppHeader/V3/AssetChips/AssetChips.scss.js";import"moment";import"../../../componentsV2/AppHeader/V3/DqStatusIcon/DqStatusIcon.js";import"../../../componentsV2/AppHeader/V3/DqStatusIcon/DqStatusIcon.constants.js";import"../../../componentsV2/AppFooter/DqPopover/DqStatusIcon/DqStatusIcon.js";import"../../../componentsV2/AppDqPopover/DqAlertTooltip/DqAlertTooltip.scss.js";import"../../../componentsV2/AppDqPopover/DqAlert/DqAlert.scss.js";import"../../../componentsV2/AppDqPopover/DqAsset/DqAsset.scss.js";import"../../../componentsV2/AppDqPopover/AppDqPopover.scss.js";import"../../../utils/getSingleAsset.js";import"../../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorChip/AssetSelectorChip.js";import"../../../componentsV2/AppHeader/V3/AssetSelector/constants.js";import"../../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorSelect/AssetSelectorSelect.scss.js";import"../../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorSelect/loadAssets.js";import"../../../componentsV2/AppHeader/V3/AssetSelector/AssetSelector.scss.js";import"../../../clients/subscriptions/constants.js";import"querystring";import"uuid/v1";import"../../../clients/subscriptions.v1.js";import"../../../clients/subscriptions/subscriptions-client.factory.js";import"jsona";import"../../../utils/env.js";import"../../StatusBadge/constants.js";import"lodash/set";import"lodash/get";import"lodash/unset";import"../../../clients/api/apiCore.js";import"../../../clients/constants.js";import"../../../clients/sso/auth0.js";import"../../../clients/sso/oauth2.js";import"../../../clients/api/rateLimiter.js";import"lodash/isEmpty";import"lodash/sortBy";import"../../DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchContext.js";import"../../../componentsV2/AppSettings/AppSettingsPinningContext.js";import"../../../componentsV2/AppHeader/V3/AppTitle/AppTitle.constants.js";import"../../../componentsV2/AppHeader/V3/AppTitle/AppTitle.scss.js";import"../../../componentsV2/AppHeader/V3/constants.scss.js";import"@babel/runtime/helpers/typeof";import"../../../componentsV2/AppHeader/V3/SettingsButton/SettingsButton.js";import"../../../componentsV2/AppHeader/V3/SettingsButton/SettingsButton.constants.js";import"../../../componentsV2/AppSettings/AppSettings.js";import"../../../componentsV2/AppSettings/AppSettings.constants.js";import"../../../componentsV2/AppSizeProvider/AppSizeProvider.js";import"../../../componentsV2/AppHeader/V3/Actions/Actions.constants.js";import"../../../componentsV2/AppHeader/V3/Actions/Actions.scss.js";import"../../../componentsV2/AppHeader/V3/AppHeaderV3.scss.js";import"../../../componentsV2/AppHeader/AppHeader.scss.js";import"../../../componentsV2/OffsetWellsButton/OffsetWellsButton.js";import"../../../componentsV2/ChartAxisExtreme/ChartAxisExtreme.scss.js";import"highcharts";import"../../../componentsV2/ChartAxisExtreme/ChartAxisExtremeDragTracker.js";import"../../../componentsV2/Autocomplete/Autocomplete.js";import"../../../componentsV2/Select/Select.js";import"../../../componentsV2/AppSettingsDivider/AppSettingsDivider.scss.js";import"../../../componentsV2/WellArchivedMessage/WellArchivedMessage.js";import"../../../componentsV2/DatePicker/DatePicker.js";import"../../../componentsV2/DragHandle/DragHandle.js";import"../../../componentsV2/CompletionsOffsetWellPicker/CompletionsOffsetWellPicker.js";import"../../../componentsV2/Slider/constants.js";import"../../../componentsV2/Slider/components/SliderThumb.js";import"../../../componentsV2/Slider/Slider.scss.js";import"../../../componentsV2/SliderAdvanced/SliderAdvanced.js";import"react-color";import"../../../componentsV2/ColorPicker/Swatches/Swatches.scss.js";import"../../../componentsV2/ColorPicker/OpacityDragtracker/OpacityDragTracker.scss.js";import"../../../componentsV2/ColorPicker/ColorPicker.scss.js";import"../../../componentsV2/ChartHelper/ChartHelper.scss.js";import"../../../componentsV2/Hotkey/Hotkey.js";import"../../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../../DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton.js";import"../../DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.scss.js";import"../../ErrorBoundary/ErrorBoundary.js";import"../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../../DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.scss.js";import"../../DevCenter/DevCenterAppContainer/DevCenterAppContainer.scss.js";import"../../Icons/AnnotationIcon.js";import"../../Annotations/components/AnnotationsList/index.js";import"../../Annotations/components/LastAnnotation/index.js";import"../../Annotations/AnnotationsContext.js";import"../../Toaster/Toaster.js";import"../../HelpCenter/HelpCenterIcon.js";import"../../DevCenter/NavigationBar/NavigationBar.js";import"../../DevCenter/SideBar/SideBar.js";import"../../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../../DevCenter/AppFilterPanelLayout/AppFilterPanelLayout.js";import"../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../../AssetEditor/index.js";import"../../AssetEditorV2/index.js";import"../../AppVersionsSelect/AppVersionsSelect.js";import"../../LoadingIndicator/LoadingIndicator.js";import"../../Typography.js";import"../../RealTimeValuesSidebar/RealTimeSidebar.js";import"../../CollapsableSidebar.js";import"../../DateTimePicker/index.js";import"../../DatePicker/index.js";import"../../SlateFormattedText/SlateFormattedText.js";import"../../SlateFormattedText/RenderElements.js";import"slate";import"../../EmptyState/EmptyState.js";import"../../ParameterCharts/ParameterCharts.js";import"../../ParameterCharts/AddEditTrack.js";import"../../ChartActionsList/ChartActionsList.js";import"../../CopyToClipboard/CopyToClipboard.js";import"../../AssetEditor/AssetEditorAutocomplete.js";import"../../AssetEditor/SingleAssetEditor.js";import"../../SettingEditors/ColorEditor/style.css.js";import"../../SettingEditors/DropdownEditor/index.js";import"../../SwitchControl/index.js";import"../../ColorPicker/ColorPicker.js";import"../../Chart/components/ChartButton.js";import"../../Chart/components/ChartButtons.js";import"../../Chart/components/ChartWrapper.js";import"../../Chart/components/AxisDropdown.js";import"../../Chart/components/ChartSelect.js";import"../../Chart/ChartWrapperContext.js";import"../../Chart/effects/useChartModifier.js";import"../../Chart/components/buttons/HideAxesButton.js";import"../../Chart/components/buttons/ChartTypeButton.js";import"../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../TruncatedText/index.js";import"../../MiddleTruncatedText/MiddleTruncatedText.js";import"../../RangeSlider/constants.js";import"../../RangeSlider/Input.css.js";import"../../RangeSlider/RangeSlider.css.js";import"../../AdvancedSlider/AdvancedSlider.js";import"../../Breadcrumbs/index.js";import"../../VirtualizedTable/index.js";import"../../EmptyView/EmptyView.js";import"../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../Button/components/Button/index.js";import"moment-timezone";import"../../Button/components/LiveButton/components/LiveButtonStateIndicator/index.js";import"../../Button/components/LiveButton/styles.js";import"../../ContextMenuItem/index.js";import"../../FolderMenuItem/index.js";import"../../EditableItem/EditableItem/index.js";import"../../EditableItem/EditableItemWithBadge/index.js";import"../../Checkbox/index.js";import"../../FolderMenuItemWithLinks/index.js";import"../../TextField/index.js";import"../../Chip/index.js";import"../../Counter/index.js";import"../../AnchorsList/AnchorsList.js";import"../../Select/index.js";import"../../Select/SelectFilterBy.js";import"../../CustomSelect/index.js";import"../../Tabs/Tabs.js";import"../../Tabs/Tab.js";import"../../ResizableTable/ResizableTable.js";import"../../GradientPicker/GradientPicker.js";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@material-ui/icons/AddCircle";import"../../GradientManager/GradientPreview/GradientPreview.js";import"../../GradientManager/GradientSelect.styles.js";import"../../GradientManager/GradientManager.styles.js";import"../../Drillstring/BHASchematic.js";import"../../Drillstring/BHATable/index.js";import"../../Drillstring/BHAComponentIcon.js";import"../../Drillstring/BHAComponentDetail/index.js";import"../../Drillstring/BHATileIcon.js";import"../../Drillstring/BHATile/BHATile.js";import"../../Drillstring/BHAList/BHAList.js";import"../../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../../Casing/CasingTable/index.js";import"../../Casing/CasingComponentIcon.js";import"../../Casing/CasingTileIcon.js";import"../../Casing/CasingTableV2/CasingTableV2.js";import"../../Casing/CasingTile/CasingTile.js";import"../../DisabledSettingsMessage/DisabledSettingsMessage.js";import"../../WellSummary/WellSummaryItemLabel.js";import"../../WellSummary/WellSummaryItemTitle.js";import"../../WellSummary/WellSummaryItemValue.js";import"../../WellSummary/ActivitySummaryChart.js";import"../../WellSummary/FracWirelineTimeChart.js";import"../../BICOffsetPickerDialog/index.js";import"../../OffsetWellButton/OffsetWellButton.js";import"../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../OffsetWellPickerV3/index.js";import"../../OffsetWellChips/Chip.js";import"../../OffsetWellChips/ChipsContainer.js";import"../../OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/OffsetWellPickerV5WithStore.js";import"../../OffsetWellMap/OffsetWellMap.js";import"@material-ui/core/Snackbar";import"../../Notifications/Toast.js";import"../../Notifications/Notifications.scss.js";import"../../ConfirmationDialog.js";import"../../TextLink/index.js";import"../../Avatar/index.js";import"../../Template/TemplatePopover/index.js";import"../../Template/TemplateSharingDialog/index.js";import"../../MenuItem/index.js";import"../../MiddleTruncate/MiddleTruncate.js";import"../../PinnableFilters/PinnableFilters.js";import"../../HeaderLayout/HeaderLayout.js";import"../../PadOffsetsPicker/PadOffsetsPicker.js";import"../../PadOffsetsPicker/OffsetAssetChip.js";import"../../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../../PadOffsetsPicker/StagesSelector.js";import"../../PadOffsetsPickerV2/PadOffsetsPickerV2.js";import"../../Table/TableToolbar/TableToolbar.js";import"../../Table/TableContainer/TableContainer.js";import"../../Table/TableCell/TableCell.js";import"../../Table/TablePagination/TablePagination.js";import"../../Table/TablePaginationActions/TablePaginationActions.js";import"../../Tooltip/ScrollableTooltip.js";import"../../PriceInput/PriceInput.js";import"../../LabelsCounter/LabelsCounter.js";import"../../Stepper/Stepper.js";import"../../Stepper/Step/Step.js";import"../../Stepper/StepsWrapper.js";import"../../Comment/CommentIcon/index.js";import"../../FilesLoader/FilesLoader.js";import"../../../componentsV2/FileIcon/icons/ArchiveFileIcon.js";import"../../../componentsV2/FileIcon/icons/CSVFileIcon.js";import"../../../componentsV2/FileIcon/icons/DocFileIcon.js";import"../../../componentsV2/FileIcon/icons/EDMFileIcon.js";import"../../../componentsV2/FileIcon/icons/ExcelFileIcon.js";import"../../../componentsV2/FileIcon/icons/ImageFileIcon.js";import"../../../componentsV2/FileIcon/icons/JsonFileIcon.js";import"../../../componentsV2/FileIcon/icons/LasFileIcon.js";import"../../../componentsV2/FileIcon/icons/OtherFileIcon.js";import"../../../componentsV2/FileIcon/icons/PdfFileIcon.js";import"../../../componentsV2/FileIcon/icons/PowerPointFileIcon.js";import"../../../componentsV2/FileIcon/icons/TxtFileIcon.js";import"../../../componentsV2/FileIcon/icons/UnknownFileIcon.js";import"../../../componentsV2/FileIcon/icons/VideoFileIcon.js";import"../../../componentsV2/FileIcon/icons/XmlFileIcon.js";import"../../SearchInput/index.js";import"../../FeedItem/FeedItem.js";import"../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import c from"../../PostInput/PostInput.js";import"../../KeyboardDateTimePicker.js";import"../Popover.js";import"../Popup.js";import"../../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../../StageDesignVActual/ComparisonHeader.js";import"../../StageDesignVActual/ComparisonRow.js";import"../../EmbeddedApp/DevCenterEmbeddedApp.js";import"../../EmbeddedApp/EmbeddedApp.js";import"../../Autocomplete/Autocomplete.js";import"../../DocumentViewer/DocumentViewer.js";import"../../ColorPickerPalette/ColorPickerPalette.js";import"../../Search/Search.js";import"../../Search/components/Listbox.js";import"../../Search/components/Paper.js";import"../../Search/components/RecentSearches.js";import"../../Search/components/Groups.js";import"../../Search/components/SelectAllListItem.js";import"../../StatusBadge/index.js";import"../../Attachment/index.js";import"../../EmojiIconButton.js";import"../../FileUploadIconButton.js";import"../../FilePreview/index.js";import"../../FailedFileUploading.js";import"../../UserMention/index.js";import"../../CommentsInfo/index.js";import"../../CommentInput/index.js";import"../../Comment/index.js";import"../../CommentLoader.js";import"../../AssetNameLabel/AssetStatusBadge.js";import"../../AssetEditorV2/components/PrimaryAssetSelect.js";import"../../AssetEditorV2/components/SecondaryAssetSelect.js";import"../../AssetEditorV2/components/SelectItem.js";import"../../AssetEditorV2/components/MultipleAssetsToggle.js";import"../../AssetEditorV2/components/PrimaryAssetSelectV2.js";import"../../EChartsWrapper/EChartsWrapper.js";import"../../AssetsMultipleSelector/AssetsMultipleSelector.js";import"@material-ui/icons/Close";import"@material-ui/icons/GetApp";import"../../GoogleDocsViewer/index.js";import"../../NewDocumentViewer/effects/useFileContent.js";import"../../NewDocumentViewer/styles.js";import"../../FilesLoaderV2/styles.js";import"../../FilesDropzone/styles.js";import"../../FilesProcessor/styles.js";import"../../Hint/styles.js";import"@babel/runtime/helpers/taggedTemplateLiteral";import"fparser";import"../../Formula/useFormulaStyles.js";import"../../Formula/RootXIcon.js";import"../../Formula/FormulaTextEditor.js";import"../../Formula/CloseSuggestion.js";import"../../Formula/SuggestionsMenu.js";import"../../CommentCard/CommentCard.js";import"@material-ui/icons/AlternateEmail";import"../../AttachFileButton/AttachFileButton.scss.js";import"../../CommentInputNext/CommentInputNext.js";import{isSuggestionsListOpened as a}from"../../UserMention/utils/index.js";import"react-s3-uploader/s3upload";import"../../CommentComposer/CommentMetaLine.scss.js";import"@material-ui/icons/ArrowDropDown";import"@material-ui/icons/Search";import"../../CommentComposer/ChatChannelSelector.scss.js";import"../../CommentComposer/ShareToChatRow.scss.js";import"../../CommentComposer/CommentComposer.scss.js";import"../../AttachmentPreview/AttachmentPreview.js";import"../../AttachmentPreview/AttachmentPreview.scss.js";import"../../CommentPin/CommentPin.js";import"../../FeedCard/FeedCard.js";import"../../FeedItemCard/FeedItemCard.js";import"../../NewCommentCursor/NewCommentCursor.js";import"../../FeedItem/feedItemTypes/AlertFeedItem.js";import"../../FeedItem/feedItemTypes/PostFeedItem.js";import"../../FeedItem/feedItemTypes/GeosteeringFeedItem.js";import"../../FeedItem/feedItemTypes/DrillingOperationalNoteFeedItem.js";import"../../FeedItem/feedItemTypes/DrillingOperationSummaryFeedItem.js";import"../../FeedItem/feedItemTypes/DrillingDailyCostFeedItem.js";import"../../FeedItem/feedItemTypes/DocumentFeedItem.js";import"../../FeedItem/feedItemTypes/DrillerMemoFeedItem.js";import"../../FeedItem/feedItemTypes/NptFeedItem.js";import"../../FeedItem/feedItemTypes/SurveyStationFeedItem/index.js";import"../../FeedItem/feedItemTypes/LessonsLearnedFeedItem/index.js";import"../../FeedItem/feedItemTypes/TracesMemoFeedItem.js";import"../../FeedItem/feedItemTypes/DepthCommentFeedItem.js";import"../../FeedItem/feedItemTypes/CompletionOperationalNoteFeedItem.js";import"../../FeedItem/feedItemTypes/CompletionOperationSummaryFeedItem.js";import"../../FeedItem/feedItemTypes/CompletionDailyCostFeedItem.js";import"../../FeedItem/feedItemTypes/CompletionDocumentFeedItem.js";import"../../FeedItem/feedItemTypes/CompletionNptFeedItem.js";import"../../FeedItem/feedItemTypes/StageOverviewFeedItem/index.js";import"../../FeedItem/feedItemTypes/AppAnnotationFeedItem/index.js";import"../../FeedItem/feedItemTypes/WellPlanFeedItem/index.js";import"../../FeedItem/feedItemTypes/FluidReportFeedItem.js";import"../../FeedItem/feedItemTypes/BhaFeedItem/BhaFeedItem.js";import"../../FeedItem/feedItemTypes/DvDCommentFeedItem.js";import"../../FeedItem/feedItemTypes/PCCommentFeedItem.js";import"../../FeedItem/feedItemTypes/HookloadCommentFeedItem.js";import"../../FeedItem/feedItemTypes/NptLessonsCommentFeedItem.js";import"../../FeedItem/feedItemTypes/GenericDataCommentFeedItem.js";var l=r({postInput:{paddingBottom:8},filePreviewWrapper:function(e){return{width:"100%",marginLeft:0,maxHeight:e.smallerView?127:251}}});function d(o){var t=o.userCompanyId,s=o.startAdornment,i=void 0===s?null:s,n=o.endAdornment,r=void 0===n?null:n,d=o.customContent,C=void 0===d?null:d,I=o.setComment,A=void 0===I?j:I,V=o.smallerView,S=void 0!==V&&V,F=o.onSave,v=void 0===F?u:F,g=o.comment,T=l({smallerView:S}),D=e();return p("div",{ref:D,children:[i,C||m(c,{userCompanyId:t,onChange:A,filePreviewWrapperClass:T.filePreviewWrapper,className:T.postInput,smallerView:S,onKeyDown:function(e){"Enter"!==e.key||e.shiftKey||a()||(e.preventDefault(),v(g))},suggestionsPortalHost:D.current,allowSuggestionsAboveCursor:!0}),r]})}d.propTypes={startAdornment:o,endAdornment:o,customContent:o,userCompanyId:t.isRequired,setComment:s,onSave:s,smallerView:i,comment:n()};var j=function(){},u=function(){};export{d as default};
|
|
1
|
+
import{useRef as e}from"react";import{node as o,number as t,func as s,bool as i,shape as n}from"prop-types";import{makeStyles as r}from"@material-ui/core";import"@babel/runtime/helpers/defineProperty";import"../../DevCenter/DevCenterAppContainer/components/IsInsideIsolatedDcAppProvider/IsInsideIsolatedDcAppProvider.js";import"../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"@babel/runtime/helpers/objectWithoutProperties";import"classnames";import"lodash";import"../../Modal/CorvaModal.scss.js";import"@icon-park/react/es/all";import{jsxs as p,jsx as m}from"react/jsx-runtime";import"../../../icons/IconParkProvider.js";import"../../../icons/customIcons/icons/AddMessage.js";import"../../../icons/customIcons/icons/DragOne.js";import"../../../icons/customIcons/icons/Attention.js";import"../../../icons/customIcons/icons/Collapse.js";import"../../../icons/customIcons/icons/Dashboard.js";import"../../../icons/customIcons/icons/Expand.js";import"../../../icons/customIcons/icons/FolderClosed.js";import"../../../icons/customIcons/icons/FolderClosedFilled.js";import"../../../icons/customIcons/icons/FolderOpened.js";import"../../../icons/customIcons/icons/GreaterOrEqual.js";import"../../../icons/customIcons/icons/LessOrEqual.js";import"../../../icons/customIcons/icons/Search.js";import"../../../icons/customIcons/icons/SearchOne.js";import"../../../icons/customIcons/icons/Wellhub.js";import"../../../icons/customIcons/icons/MultiRuler.js";import"../../../icons/customIcons/icons/Checkbox.js";import"../../../icons/customIcons/icons/CheckboxChecked.js";import"../../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../../icons/customIcons/icons/Radio.js";import"../../../icons/customIcons/icons/RadioChecked.js";import"../../../icons/customIcons/icons/SimulFrac.js";import"../../../icons/customIcons/icons/ZipperFrac.js";import"../../../icons/customIcons/icons/CautionFilled.js";import"../../../icons/customIcons/icons/MoreApp.js";import"../../../icons/customIcons/icons/Pad.js";import"../../../icons/customIcons/icons/DrilloutUnit.js";import"../../../icons/customIcons/icons/FracFleet.js";import"../../../icons/customIcons/icons/Global.js";import"../../../icons/customIcons/icons/Program.js";import"../../../icons/customIcons/icons/Rig.js";import"../../../icons/customIcons/icons/Well.js";import"../../../icons/customIcons/icons/Gap.js";import"../../../icons/customIcons/icons/Pin.js";import"../../../icons/customIcons/icons/CloseOneFilled.js";import"../../../icons/customIcons/icons/AttentionFilled.js";import"../../../icons/customIcons/icons/CheckOneFilled.js";import"../../../icons/customIcons/icons/Archive.js";import"../../../icons/customIcons/icons/ArchiveCancel.js";import"../../../icons/customIcons/icons/Unarchive.js";import"../../../icons/customIcons/icons/Archived.js";import"../../../icons/customIcons/icons/InterventionUnit.js";import"../../../icons/customIcons/icons/CloudDelete.js";import"../../../icons/customIcons/icons/Lasso.js";import"../../../icons/customIcons/icons/Radius.js";import"../../../icons/customIcons/icons/ErrorOps.js";import"../../../icons/customIcons/icons/DataTypeOps.js";import"../../../icons/customIcons/icons/FalsePositiveOps.js";import"../../../icons/customIcons/icons/CalibrationOps.js";import"../../../icons/customIcons/icons/CriticalOps.js";import"../../../icons/customIcons/icons/Company.js";import"../../../icons/customIcons/icons/ArchiveOne.js";import"../../../icons/customIcons/icons/ParseBotFusion.js";import"../../../icons/customIcons/icons/Connect.js";import"../../../icons/customIcons/icons/PuzzleOne.js";import"../../../icons/customIcons/icons/Feed.js";import"../../../icons/customIcons/icons/Prompt.js";import"../../../icons/customIcons/icons/Companies.js";import"../../../icons/customIcons/icons/ClipboardAi.js";import"../../../icons/customIcons/icons/Key.js";import"../../../icons/customIcons/icons/AtSignCrossed.js";import"../../../icons/customIcons/icons/MappingManual.js";import"../../../icons/customIcons/icons/Mapping.js";import"../../../icons/customIcons/icons/Metrics.js";import"../../../icons/customIcons/icons/Drops.js";import"../../../icons/customIcons/icons/ClipboardSearch.js";import"../../../icons/customIcons/icons/Template.js";import"../../../icons/customIcons/icons/ClipboardMetrics.js";import"../../../icons/customIcons/icons/ClipboardBuilder.js";import"../../../icons/customIcons/icons/UnitConversion.js";import"../../../icons/customIcons/icons/NPT.js";import"../../../icons/customIcons/icons/GuidedFrac.js";import"../../../utils/mobileDetect.js";import"../../IconButton/index.js";import"../../../constants/goals.js";import"../../../constants/segment.js";import"../../../constants/alerts.js";import"../../../constants/apps.js";import"../../../constants/drillstring.js";import"../../../constants/completion.js";import"../../../constants/appPackages.js";import"../../../constants/notifications.js";import"../../../constants/feed.js";import"../../../constants/bha.js";import"../../../constants/corvaCompanyId.js";import"../../GradientManager/configuration/constants.js";import"@babel/runtime/helpers/slicedToArray";import"uuid";import"../../IconMenu/index.js";import"../../StyledMenuItem/index.js";import"../../AppIcon/AppIcon.js";import"../../DevCenter/AppHeader/AppHeader.js";import"../../DevCenter/AppSideBar/AppSideBar.js";import"../../DevCenter/AppsDataProvider/AppsDataProvider.js";import"@material-ui/icons";import"../../DevCenter/AppContext.js";import"../../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"react-router-dom";import"query-string";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"../../../utils/index.js";import"../../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/components/RemoveAppButton.js";import"../../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/components/SettingsAccordion.js";import"../../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../../../componentsV2/Text/Text.js";import"../../../componentsV2/Grid/Grid.js";import"../../../componentsV2/Grid/Cell.js";import"../../../componentsV2/Header/Header.scss.js";import"../../../componentsV2/Button/Button.js";import"../../../componentsV2/ButtonIcon/ButtonIcon.js";import"../../../componentsV2/Tooltip/Tooltip.scss.js";import"../../../componentsV2/Popover/Popover.js";import"../../../componentsV2/PopoverPanel/PopoverPanel.js";import"../../../componentsV2/Radio/Radio.js";import"../../../componentsV2/RadioAndCheckboxGroup/RadioAndCheckboxGroup.scss.js";import"../../../componentsV2/Checkbox/Checkbox.js";import"@babel/runtime/helpers/toConsumableArray";import"../../../componentsV2/TextInput/TextInput.js";import"../../../componentsV2/TextInputNext/TextInputNext.js";import"../../../componentsV2/Label/Label.js";import"../../../componentsV2/TextEndTruncated/TextEndTruncated.scss.js";import"../../../componentsV2/TextMiddleTruncated/TextMiddleTruncated.constants.js";import"../../../componentsV2/TextMiddleTruncated/TextMiddleTruncated.scss.js";import"../../../componentsV2/TextLink/TextLink.js";import"../../../componentsV2/Chip/Chip.js";import"../../../componentsV2/ChipAlert/ChipAlert.js";import"../../../componentsV2/ChipIndicator/ChipIndicator.js";import"../../../componentsV2/Avatar/Avatar.js";import"../../../componentsV2/AvatarGroup/AvatarGroup.js";import"@material-ui/lab";import"../../../componentsV2/ToggleButtons/ToggleButtons.scss.js";import"../../../componentsV2/Paper/Paper.js";import"../../../componentsV2/ModalWindow/ModalWindow.js";import"../../../componentsV2/Modal/Modal.scss.js";import"../../../componentsV2/Menu/Menu.js";import"../../../componentsV2/utils.js";import"../../../componentsV2/Hint/Hint.scss.js";import"../../../componentsV2/Counter/Counter.js";import"../../../componentsV2/BadgeBase/BadgeBase.scss.js";import"../../../componentsV2/TemplatesControl/TemplatesControl.js";import"zustand";import"../../../componentsV2/TemplatesControl/utils.js";import"../../../componentsV2/TemplatesControl/icons/folder/index.js";import"../../../componentsV2/TemplatesControl/Store/utils.js";import"../../../componentsV2/TemplatesControl/types.js";import"../../../clients/jsonApi/index.js";import"../../../permissions/PermissionsContext.js";import"../../../permissions/constants/index.js";import"../../../permissions/withPermissionsHOC.js";import"../../../permissions/ProvidePermissions.js";import"../../../componentsV2/BadgeDot/BadgeDot.scss.js";import"../../../componentsV2/LoaderLinear/LoaderLinear.scss.js";import"../../../componentsV2/LoaderLogo/LoaderLogo.constants.js";import"../../../componentsV2/LoaderLogo/LoaderLogo.scss.js";import"../../../componentsV2/Switch/Switch.js";import"../../../componentsV2/Tabs/Tabs.js";import"../../../componentsV2/EmptyState/EmptyState.scss.js";import"../../../componentsV2/FileIcon/FileIcon.js";import"../../../componentsV2/Tag/Tag.js";import"react-dropzone";import"../../../componentsV2/FilesDropzone/FilesDropzone.scss.js";import"../../../componentsV2/FilesLoader/FilesLoader.scss.js";import"file-extension";import"image-extensions";import"video-extensions";import"../../../componentsV2/FilesProcessor/FilesProcessor.scss.js";import"../../../componentsV2/Skeleton/Skeleton.scss.js";import"../../../utils/main.js";import"../../../componentsV2/CopyToClipboard/CopyToClipboard.scss.js";import"../../../componentsV2/Stepper/Step/Step.scss.js";import"../../../componentsV2/Stepper/Stepper.scss.js";import"../../../componentsV2/ButtonLive/ButtonLive.js";import"../../../componentsV2/ButtonText/ButtonText.js";import"../../../componentsV2/IndicatorLive/IndicatorLive.js";import"../../../componentsV2/Accordion/Accordion.scss.js";import"../../../componentsV2/Breadcrumbs/Breadcrumbs.scss.js";import"../../../componentsV2/BadgeComment/BadgeComment.js";import"../../../componentsV2/AppContainer/AppContainer.js";import"../../../componentsV2/AppContainer/AppContainer.constants.js";import"../../../componentsV2/AppFooter/AppFooter.js";import"immutable";import"../../../componentsV2/AppCommonsProvider/AppCommonsContext.js";import"../../../componentsV2/AppHeader/AppHeader.constants.js";import"../../../componentsV2/AppHeader/AppBadge/AppBadge.scss.js";import"../../../componentsV2/AppHeader/AppAssets/utils.js";import"../../../componentsV2/AppHeader/AppAssets/AppAssets.scss.js";import"../../PadModeSelect/PadModeSelect.js";import"../../../componentsV2/AppHeader/PadMode/PadMode.scss.js";import"../../../constants/streamSourceType.js";import"../../../componentsV2/PadModeSelect/PadModeSelect.js";import"../../../componentsV2/PadModeSelect/PadModeSelect.constants.js";import"../../../componentsV2/AppCommonsProvider/AppCommonsProvider.js";import"../../../componentsV2/AppHeader/V3/VersionSelect/VersionSelect.js";import"../../../componentsV2/UniversalLink/UniversalLink.scss.js";import"../../../componentsV2/AppHeader/V3/AssetChips/AssetChips.scss.js";import"moment";import"../../../componentsV2/AppHeader/V3/DqStatusIcon/DqStatusIcon.js";import"../../../componentsV2/AppHeader/V3/DqStatusIcon/DqStatusIcon.constants.js";import"../../../componentsV2/AppFooter/DqPopover/DqStatusIcon/DqStatusIcon.js";import"../../../componentsV2/AppDqPopover/DqAlertTooltip/DqAlertTooltip.scss.js";import"../../../componentsV2/AppDqPopover/DqAlert/DqAlert.scss.js";import"../../../componentsV2/AppDqPopover/DqAsset/DqAsset.scss.js";import"../../../componentsV2/AppDqPopover/AppDqPopover.scss.js";import"../../../utils/getSingleAsset.js";import"../../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorChip/AssetSelectorChip.js";import"../../../componentsV2/AppHeader/V3/AssetSelector/constants.js";import"../../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorSelect/AssetSelectorSelect.scss.js";import"../../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorSelect/loadAssets.js";import"../../../componentsV2/AppHeader/V3/AssetSelector/AssetSelector.scss.js";import"../../../clients/subscriptions/constants.js";import"querystring";import"uuid/v1";import"../../../clients/subscriptions.v1.js";import"../../../clients/subscriptions/subscriptions-client.factory.js";import"jsona";import"../../../utils/env.js";import"../../StatusBadge/constants.js";import"lodash/set";import"lodash/get";import"lodash/unset";import"../../../clients/api/apiCore.js";import"../../../clients/constants.js";import"../../../clients/sso/auth0.js";import"../../../clients/sso/oauth2.js";import"../../../clients/api/rateLimiter.js";import"lodash/isEmpty";import"lodash/sortBy";import"../../DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchContext.js";import"../../../componentsV2/AppSettings/AppSettingsPinningContext.js";import"../../../componentsV2/AppHeader/V3/AppTitle/AppTitle.constants.js";import"../../../componentsV2/AppHeader/V3/AppTitle/AppTitle.scss.js";import"../../../componentsV2/AppHeader/V3/constants.scss.js";import"@babel/runtime/helpers/typeof";import"../../../componentsV2/AppHeader/V3/SettingsButton/SettingsButton.js";import"../../../componentsV2/AppHeader/V3/SettingsButton/SettingsButton.constants.js";import"../../../componentsV2/AppSettings/AppSettings.js";import"../../../componentsV2/AppSettings/AppSettings.constants.js";import"../../../componentsV2/AppSizeProvider/AppSizeProvider.js";import"../../../componentsV2/AppHeader/V3/Actions/Actions.constants.js";import"../../../componentsV2/AppHeader/V3/Actions/Actions.scss.js";import"../../../componentsV2/AppHeader/V3/AppHeaderV3.scss.js";import"../../../componentsV2/AppHeader/AppHeader.scss.js";import"../../../componentsV2/OffsetWellsButton/OffsetWellsButton.js";import"../../../componentsV2/ChartAxisExtreme/ChartAxisExtreme.scss.js";import"highcharts";import"../../../componentsV2/ChartAxisExtreme/ChartAxisExtremeDragTracker.js";import"../../../componentsV2/Autocomplete/Autocomplete.js";import"../../../componentsV2/Select/Select.js";import"../../../componentsV2/AppSettingsDivider/AppSettingsDivider.scss.js";import"../../../componentsV2/WellArchivedMessage/WellArchivedMessage.js";import"../../../componentsV2/DatePicker/DatePicker.js";import"../../../componentsV2/DragHandle/DragHandle.js";import"../../../componentsV2/CompletionsOffsetWellPicker/CompletionsOffsetWellPicker.js";import"../../../componentsV2/Slider/constants.js";import"../../../componentsV2/Slider/components/SliderThumb.js";import"../../../componentsV2/Slider/Slider.scss.js";import"../../../componentsV2/SliderAdvanced/SliderAdvanced.js";import"react-color";import"../../../componentsV2/ColorPicker/Swatches/Swatches.scss.js";import"../../../componentsV2/ColorPicker/OpacityDragtracker/OpacityDragTracker.scss.js";import"../../../componentsV2/ColorPicker/ColorPicker.scss.js";import"../../../componentsV2/ChartHelper/ChartHelper.scss.js";import"../../../componentsV2/Hotkey/Hotkey.js";import"../../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../../DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton.js";import"../../DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.scss.js";import"../../ErrorBoundary/ErrorBoundary.js";import"../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../../DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.scss.js";import"../../DevCenter/DevCenterAppContainer/DevCenterAppContainer.scss.js";import"../../Icons/AnnotationIcon.js";import"../../Annotations/components/AnnotationsList/index.js";import"../../Annotations/components/LastAnnotation/index.js";import"../../Annotations/AnnotationsContext.js";import"../../Toaster/Toaster.js";import"../../HelpCenter/HelpCenterIcon.js";import"../../DevCenter/NavigationBar/NavigationBar.js";import"../../DevCenter/SideBar/SideBar.js";import"../../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../../DevCenter/AppFilterPanelLayout/AppFilterPanelLayout.js";import"../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../../AssetEditor/index.js";import"../../AssetEditorV2/index.js";import"../../AppVersionsSelect/AppVersionsSelect.js";import"../../LoadingIndicator/LoadingIndicator.js";import"../../Typography.js";import"../../RealTimeValuesSidebar/RealTimeSidebar.js";import"../../CollapsableSidebar.js";import"../../DateTimePicker/index.js";import"../../DatePicker/index.js";import"../../SlateFormattedText/SlateFormattedText.js";import"../../SlateFormattedText/RenderElements.js";import"slate";import"../../EmptyState/EmptyState.js";import"../../ParameterCharts/ParameterCharts.js";import"../../ParameterCharts/AddEditTrack.js";import"../../ChartActionsList/ChartActionsList.js";import"../../CopyToClipboard/CopyToClipboard.js";import"../../AssetEditor/AssetEditorAutocomplete.js";import"../../AssetEditor/SingleAssetEditor.js";import"../../SettingEditors/ColorEditor/style.css.js";import"../../SettingEditors/DropdownEditor/index.js";import"../../SwitchControl/index.js";import"../../ColorPicker/ColorPicker.js";import"../../Chart/components/ChartButton.js";import"../../Chart/components/ChartButtons.js";import"../../Chart/components/ChartWrapper.js";import"../../Chart/components/AxisDropdown.js";import"../../Chart/components/ChartSelect.js";import"../../Chart/ChartWrapperContext.js";import"../../Chart/effects/useChartModifier.js";import"../../Chart/components/buttons/HideAxesButton.js";import"../../Chart/components/buttons/ChartTypeButton.js";import"../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../TruncatedText/index.js";import"../../MiddleTruncatedText/MiddleTruncatedText.js";import"../../RangeSlider/constants.js";import"../../RangeSlider/Input.css.js";import"../../RangeSlider/RangeSlider.css.js";import"../../AdvancedSlider/AdvancedSlider.js";import"../../Breadcrumbs/index.js";import"../../VirtualizedTable/index.js";import"../../EmptyView/EmptyView.js";import"../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../Button/components/Button/index.js";import"moment-timezone";import"../../Button/components/LiveButton/components/LiveButtonStateIndicator/index.js";import"../../Button/components/LiveButton/styles.js";import"../../ContextMenuItem/index.js";import"../../FolderMenuItem/index.js";import"../../EditableItem/EditableItem/index.js";import"../../EditableItem/EditableItemWithBadge/index.js";import"../../Checkbox/index.js";import"../../FolderMenuItemWithLinks/index.js";import"../../TextField/index.js";import"../../Chip/index.js";import"../../Counter/index.js";import"../../AnchorsList/AnchorsList.js";import"../../Select/index.js";import"../../Select/SelectFilterBy.js";import"../../CustomSelect/index.js";import"../../Tabs/Tabs.js";import"../../Tabs/Tab.js";import"../../ResizableTable/ResizableTable.js";import"../../GradientPicker/GradientPicker.js";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@material-ui/icons/AddCircle";import"../../GradientManager/GradientPreview/GradientPreview.js";import"../../GradientManager/GradientSelect.styles.js";import"../../GradientManager/GradientManager.styles.js";import"../../Drillstring/BHASchematic.js";import"../../Drillstring/BHATable/index.js";import"../../Drillstring/BHAComponentIcon.js";import"../../Drillstring/BHAComponentDetail/index.js";import"../../Drillstring/BHATileIcon.js";import"../../Drillstring/BHATile/BHATile.js";import"../../Drillstring/BHAList/BHAList.js";import"../../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../../Casing/CasingTable/index.js";import"../../Casing/CasingComponentIcon.js";import"../../Casing/CasingTileIcon.js";import"../../Casing/CasingTableV2/CasingTableV2.js";import"../../Casing/CasingTile/CasingTile.js";import"../../DisabledSettingsMessage/DisabledSettingsMessage.js";import"../../WellSummary/WellSummaryItemLabel.js";import"../../WellSummary/WellSummaryItemTitle.js";import"../../WellSummary/WellSummaryItemValue.js";import"../../WellSummary/ActivitySummaryChart.js";import"../../WellSummary/FracWirelineTimeChart.js";import"../../BICOffsetPickerDialog/index.js";import"../../OffsetWellButton/OffsetWellButton.js";import"../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../OffsetWellPickerV3/index.js";import"../../OffsetWellChips/Chip.js";import"../../OffsetWellChips/ChipsContainer.js";import"../../OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/OffsetWellPickerV5WithStore.js";import"../../OffsetWellMap/OffsetWellMap.js";import"@material-ui/core/Snackbar";import"../../Notifications/Toast.js";import"../../Notifications/Notifications.scss.js";import"../../ConfirmationDialog.js";import"../../TextLink/index.js";import"../../Avatar/index.js";import"../../Template/TemplatePopover/index.js";import"../../Template/TemplateSharingDialog/index.js";import"../../MenuItem/index.js";import"../../MiddleTruncate/MiddleTruncate.js";import"../../PinnableFilters/PinnableFilters.js";import"../../HeaderLayout/HeaderLayout.js";import"../../PadOffsetsPicker/PadOffsetsPicker.js";import"../../PadOffsetsPicker/OffsetAssetChip.js";import"../../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../../PadOffsetsPicker/StagesSelector.js";import"../../PadOffsetsPickerV2/PadOffsetsPickerV2.js";import"../../Table/TableToolbar/TableToolbar.js";import"../../Table/TableContainer/TableContainer.js";import"../../Table/TableCell/TableCell.js";import"../../Table/TablePagination/TablePagination.js";import"../../Table/TablePaginationActions/TablePaginationActions.js";import"../../Tooltip/ScrollableTooltip.js";import"../../PriceInput/PriceInput.js";import"../../LabelsCounter/LabelsCounter.js";import"../../Stepper/Stepper.js";import"../../Stepper/Step/Step.js";import"../../Stepper/StepsWrapper.js";import"../../Comment/CommentIcon/index.js";import"../../FilesLoader/FilesLoader.js";import"../../../componentsV2/FileIcon/icons/ArchiveFileIcon.js";import"../../../componentsV2/FileIcon/icons/CSVFileIcon.js";import"../../../componentsV2/FileIcon/icons/DocFileIcon.js";import"../../../componentsV2/FileIcon/icons/EDMFileIcon.js";import"../../../componentsV2/FileIcon/icons/ExcelFileIcon.js";import"../../../componentsV2/FileIcon/icons/ImageFileIcon.js";import"../../../componentsV2/FileIcon/icons/JsonFileIcon.js";import"../../../componentsV2/FileIcon/icons/LasFileIcon.js";import"../../../componentsV2/FileIcon/icons/OtherFileIcon.js";import"../../../componentsV2/FileIcon/icons/PdfFileIcon.js";import"../../../componentsV2/FileIcon/icons/PowerPointFileIcon.js";import"../../../componentsV2/FileIcon/icons/TxtFileIcon.js";import"../../../componentsV2/FileIcon/icons/UnknownFileIcon.js";import"../../../componentsV2/FileIcon/icons/VideoFileIcon.js";import"../../../componentsV2/FileIcon/icons/XmlFileIcon.js";import"../../SearchInput/index.js";import"../../FeedItem/FeedItem.js";import"../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import c from"../../PostInput/PostInput.js";import"../../KeyboardDateTimePicker.js";import"../Popover.js";import"../Popup.js";import"../../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../../StageDesignVActual/ComparisonHeader.js";import"../../StageDesignVActual/ComparisonRow.js";import"../../EmbeddedApp/DevCenterEmbeddedApp.js";import"../../EmbeddedApp/EmbeddedApp.js";import"../../Autocomplete/Autocomplete.js";import"../../DocumentViewer/DocumentViewer.js";import"../../ColorPickerPalette/ColorPickerPalette.js";import"../../Search/Search.js";import"../../Search/components/Listbox.js";import"../../Search/components/Paper.js";import"../../Search/components/RecentSearches.js";import"../../Search/components/Groups.js";import"../../Search/components/SelectAllListItem.js";import"../../StatusBadge/index.js";import"../../Attachment/index.js";import"../../EmojiIconButton.js";import"../../FileUploadIconButton.js";import"../../FilePreview/index.js";import"../../FailedFileUploading.js";import"../../UserMention/index.js";import"../../CommentsInfo/index.js";import"../../CommentInput/index.js";import"../../Comment/index.js";import"../../CommentLoader.js";import"../../AssetNameLabel/AssetStatusBadge.js";import"../../AssetEditorV2/components/PrimaryAssetSelect.js";import"../../AssetEditorV2/components/SecondaryAssetSelect.js";import"../../AssetEditorV2/components/SelectItem.js";import"../../AssetEditorV2/components/MultipleAssetsToggle.js";import"../../AssetEditorV2/components/PrimaryAssetSelectV2.js";import"../../EChartsWrapper/EChartsWrapper.js";import"../../AssetsMultipleSelector/AssetsMultipleSelector.js";import"@material-ui/icons/Close";import"@material-ui/icons/GetApp";import"../../GoogleDocsViewer/index.js";import"../../NewDocumentViewer/effects/useFileContent.js";import"../../NewDocumentViewer/styles.js";import"../../FilesLoaderV2/styles.js";import"../../FilesDropzone/styles.js";import"../../FilesProcessor/styles.js";import"../../Hint/styles.js";import"@babel/runtime/helpers/taggedTemplateLiteral";import"fparser";import"../../Formula/useFormulaStyles.js";import"../../Formula/RootXIcon.js";import"../../Formula/FormulaTextEditor.js";import"../../Formula/CloseSuggestion.js";import"../../Formula/SuggestionsMenu.js";import"../../CommentCard/CommentCard.js";import"@material-ui/icons/AlternateEmail";import"../../AttachFileButton/AttachFileButton.scss.js";import"../../CommentInputNext/CommentInputNext.js";import{isSuggestionsListOpened as a}from"../../UserMention/utils/index.js";import"react-s3-uploader/s3upload";import"../../CommentComposer/CommentMetaLine.scss.js";import"@material-ui/icons/ArrowDropDown";import"@material-ui/icons/Search";import"../../CommentComposer/ChatChannelSelector.scss.js";import"../../CommentComposer/ShareToChatRow.scss.js";import"../../CommentComposer/CommentComposer.scss.js";import"../../AttachmentPreview/AttachmentPreview.js";import"../../AttachmentPreview/AttachmentImage.js";import"../../AttachmentPreview/AttachmentPreview.scss.js";import"../../CommentPin/CommentPin.js";import"../../FeedCard/FeedCard.js";import"../../FeedItemCard/FeedItemCard.js";import"../../NewCommentCursor/NewCommentCursor.js";import"../../LinkedText/LinkedText.js";import"../../FeedItem/feedItemTypes/AlertFeedItem.js";import"../../FeedItem/feedItemTypes/PostFeedItem.js";import"../../FeedItem/feedItemTypes/GeosteeringFeedItem.js";import"../../FeedItem/feedItemTypes/DrillingOperationalNoteFeedItem.js";import"../../FeedItem/feedItemTypes/DrillingOperationSummaryFeedItem.js";import"../../FeedItem/feedItemTypes/DrillingDailyCostFeedItem.js";import"../../FeedItem/feedItemTypes/DocumentFeedItem.js";import"../../FeedItem/feedItemTypes/DrillerMemoFeedItem.js";import"../../FeedItem/feedItemTypes/NptFeedItem.js";import"../../FeedItem/feedItemTypes/SurveyStationFeedItem/index.js";import"../../FeedItem/feedItemTypes/LessonsLearnedFeedItem/index.js";import"../../FeedItem/feedItemTypes/TracesMemoFeedItem.js";import"../../FeedItem/feedItemTypes/DepthCommentFeedItem.js";import"../../FeedItem/feedItemTypes/CompletionOperationalNoteFeedItem.js";import"../../FeedItem/feedItemTypes/CompletionOperationSummaryFeedItem.js";import"../../FeedItem/feedItemTypes/CompletionDailyCostFeedItem.js";import"../../FeedItem/feedItemTypes/CompletionDocumentFeedItem.js";import"../../FeedItem/feedItemTypes/CompletionNptFeedItem.js";import"../../FeedItem/feedItemTypes/StageOverviewFeedItem/index.js";import"../../FeedItem/feedItemTypes/AppAnnotationFeedItem/index.js";import"../../FeedItem/feedItemTypes/WellPlanFeedItem/index.js";import"../../FeedItem/feedItemTypes/FluidReportFeedItem.js";import"../../FeedItem/feedItemTypes/BhaFeedItem/BhaFeedItem.js";import"../../FeedItem/feedItemTypes/DvDCommentFeedItem.js";import"../../FeedItem/feedItemTypes/PCCommentFeedItem.js";import"../../FeedItem/feedItemTypes/HookloadCommentFeedItem.js";import"../../FeedItem/feedItemTypes/NptLessonsCommentFeedItem.js";import"../../FeedItem/feedItemTypes/GenericDataCommentFeedItem.js";var l=r({postInput:{paddingBottom:8},filePreviewWrapper:function(e){return{width:"100%",marginLeft:0,maxHeight:e.smallerView?127:251}}});function d(o){var t=o.userCompanyId,s=o.startAdornment,i=void 0===s?null:s,n=o.endAdornment,r=void 0===n?null:n,d=o.customContent,C=void 0===d?null:d,I=o.setComment,A=void 0===I?j:I,V=o.smallerView,S=void 0!==V&&V,v=o.onSave,F=void 0===v?u:v,g=o.comment,T=l({smallerView:S}),D=e();return p("div",{ref:D,children:[i,C||m(c,{userCompanyId:t,onChange:A,filePreviewWrapperClass:T.filePreviewWrapper,className:T.postInput,smallerView:S,onKeyDown:function(e){"Enter"!==e.key||e.shiftKey||a()||(e.preventDefault(),F(g))},suggestionsPortalHost:D.current,allowSuggestionsAboveCursor:!0}),r]})}d.propTypes={startAdornment:o,endAdornment:o,customContent:o,userCompanyId:t.isRequired,setComment:s,onSave:s,smallerView:i,comment:n()};var j=function(){},u=function(){};export{d as default};
|
|
2
2
|
//# sourceMappingURL=Content.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Content.js","sources":["../../../../src/components/AddComment/components/Content.js"],"sourcesContent":["import { useRef } from 'react';\nimport { node, number, func, bool, shape } from 'prop-types';\nimport { makeStyles } from '@material-ui/core';\n\nimport { PostInput } from '~/components';\nimport { isSuggestionsListOpened } from '~/components/UserMention/utils';\n\nconst useStyles = makeStyles({\n postInput: { paddingBottom: 8 },\n filePreviewWrapper: ({ smallerView }) => ({\n width: '100%',\n marginLeft: 0,\n maxHeight: smallerView ? 127 : 251,\n }),\n});\nfunction Content({\n userCompanyId,\n startAdornment = null,\n endAdornment = null,\n customContent = null,\n setComment = DEFAULT_CONTENT_SET_COMMENT,\n smallerView = false,\n onSave = DEFAULT_CONTENT_ON_SAVE,\n comment,\n}) {\n const classes = useStyles({ smallerView });\n const wrapperRef = useRef();\n\n const onKeyDown = e => {\n if (e.key === 'Enter' && !e.shiftKey && !isSuggestionsListOpened()) {\n e.preventDefault();\n onSave(comment);\n }\n };\n\n return (\n <div ref={wrapperRef}>\n {startAdornment}\n\n {customContent || (\n <PostInput\n userCompanyId={userCompanyId}\n onChange={setComment}\n filePreviewWrapperClass={classes.filePreviewWrapper}\n className={classes.postInput}\n smallerView={smallerView}\n onKeyDown={onKeyDown}\n suggestionsPortalHost={wrapperRef.current}\n allowSuggestionsAboveCursor\n />\n )}\n\n {endAdornment}\n </div>\n );\n}\n\nContent.propTypes = {\n startAdornment: node,\n endAdornment: node,\n customContent: node,\n userCompanyId: number.isRequired,\n setComment: func,\n onSave: func,\n smallerView: bool,\n comment: shape(),\n};\n\nconst DEFAULT_CONTENT_SET_COMMENT = () => undefined;\nconst DEFAULT_CONTENT_ON_SAVE = () => undefined;\n\nexport default Content;\n"],"names":["useStyles","makeStyles","postInput","paddingBottom","filePreviewWrapper","_ref","width","marginLeft","maxHeight","smallerView","Content","_ref2","userCompanyId","_ref2$startAdornment","startAdornment","_ref2$endAdornment","endAdornment","_ref2$customContent","customContent","_ref2$setComment","setComment","DEFAULT_CONTENT_SET_COMMENT","_ref2$smallerView","_ref2$onSave","onSave","DEFAULT_CONTENT_ON_SAVE","comment","classes","wrapperRef","useRef","_jsxs","ref","children","_jsx","PostInput","onChange","filePreviewWrapperClass","className","onKeyDown","e","key","shiftKey","isSuggestionsListOpened","preventDefault","suggestionsPortalHost","current","allowSuggestionsAboveCursor","propTypes","node","number","isRequired","func","bool","shape"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Content.js","sources":["../../../../src/components/AddComment/components/Content.js"],"sourcesContent":["import { useRef } from 'react';\nimport { node, number, func, bool, shape } from 'prop-types';\nimport { makeStyles } from '@material-ui/core';\n\nimport { PostInput } from '~/components';\nimport { isSuggestionsListOpened } from '~/components/UserMention/utils';\n\nconst useStyles = makeStyles({\n postInput: { paddingBottom: 8 },\n filePreviewWrapper: ({ smallerView }) => ({\n width: '100%',\n marginLeft: 0,\n maxHeight: smallerView ? 127 : 251,\n }),\n});\nfunction Content({\n userCompanyId,\n startAdornment = null,\n endAdornment = null,\n customContent = null,\n setComment = DEFAULT_CONTENT_SET_COMMENT,\n smallerView = false,\n onSave = DEFAULT_CONTENT_ON_SAVE,\n comment,\n}) {\n const classes = useStyles({ smallerView });\n const wrapperRef = useRef();\n\n const onKeyDown = e => {\n if (e.key === 'Enter' && !e.shiftKey && !isSuggestionsListOpened()) {\n e.preventDefault();\n onSave(comment);\n }\n };\n\n return (\n <div ref={wrapperRef}>\n {startAdornment}\n\n {customContent || (\n <PostInput\n userCompanyId={userCompanyId}\n onChange={setComment}\n filePreviewWrapperClass={classes.filePreviewWrapper}\n className={classes.postInput}\n smallerView={smallerView}\n onKeyDown={onKeyDown}\n suggestionsPortalHost={wrapperRef.current}\n allowSuggestionsAboveCursor\n />\n )}\n\n {endAdornment}\n </div>\n );\n}\n\nContent.propTypes = {\n startAdornment: node,\n endAdornment: node,\n customContent: node,\n userCompanyId: number.isRequired,\n setComment: func,\n onSave: func,\n smallerView: bool,\n comment: shape(),\n};\n\nconst DEFAULT_CONTENT_SET_COMMENT = () => undefined;\nconst DEFAULT_CONTENT_ON_SAVE = () => undefined;\n\nexport default Content;\n"],"names":["useStyles","makeStyles","postInput","paddingBottom","filePreviewWrapper","_ref","width","marginLeft","maxHeight","smallerView","Content","_ref2","userCompanyId","_ref2$startAdornment","startAdornment","_ref2$endAdornment","endAdornment","_ref2$customContent","customContent","_ref2$setComment","setComment","DEFAULT_CONTENT_SET_COMMENT","_ref2$smallerView","_ref2$onSave","onSave","DEFAULT_CONTENT_ON_SAVE","comment","classes","wrapperRef","useRef","_jsxs","ref","children","_jsx","PostInput","onChange","filePreviewWrapperClass","className","onKeyDown","e","key","shiftKey","isSuggestionsListOpened","preventDefault","suggestionsPortalHost","current","allowSuggestionsAboveCursor","propTypes","node","number","isRequired","func","bool","shape"],"mappings":"k/3BAOA,IAAMA,EAAYC,EAAW,CAC3BC,UAAW,CAAEC,cAAe,GAC5BC,mBAAoB,SAAAC,GAAc,MAAQ,CACxCC,MAAO,OACPC,WAAY,EACZC,YAHqBC,YAGI,IAAM,IAChC,IAEH,SAASC,EASNC,GAAA,IARDC,IAAAA,cAAaC,EAAAF,EACbG,eAAAA,aAAiB,KAAID,EAAAE,EAAAJ,EACrBK,aAAAA,aAAe,KAAID,EAAAE,EAAAN,EACnBO,cAAAA,aAAgB,KAAID,EAAAE,EAAAR,EACpBS,WAAAA,aAAaC,EAA2BF,EAAAG,EAAAX,EACxCF,YAAAA,cAAmBa,EAAAC,EAAAZ,EACnBa,OAAAA,aAASC,EAAuBF,EAChCG,IAAAA,QAEMC,EAAU3B,EAAU,CAAES,YAAAA,IACtBmB,EAAaC,IASnB,OACEC,EAAA,MAAA,CAAKC,IAAKH,EAAWI,SAAA,CAClBlB,EAEAI,GACCe,EAACC,EAAS,CACRtB,cAAeA,EACfuB,SAAUf,EACVgB,wBAAyBT,EAAQvB,mBACjCiC,UAAWV,EAAQzB,UACnBO,YAAaA,EACb6B,UAlBU,SAAAC,GACF,UAAVA,EAAEC,KAAoBD,EAAEE,UAAaC,MACvCH,EAAEI,iBACFnB,EAAOE,KAgBHkB,sBAAuBhB,EAAWiB,QAClCC,6BAA2B,IAI9B9B,IAGP,CAEAN,EAAQqC,UAAY,CAClBjC,eAAgBkC,EAChBhC,aAAcgC,EACd9B,cAAe8B,EACfpC,cAAeqC,EAAOC,WACtB9B,WAAY+B,EACZ3B,OAAQ2B,EACR1C,YAAa2C,EACb1B,QAAS2B,KAGX,IAAMhC,EAA8B,WAAe,EAC7CI,EAA0B,WAAe"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { AttachmentPreviewItem } from '../AttachmentPreview/AttachmentPreview.types';
|
|
2
|
+
export type AttachmentDocumentProps = {
|
|
3
|
+
item: AttachmentPreviewItem;
|
|
4
|
+
};
|
|
5
|
+
export declare const AttachmentDocument: ({ item }: AttachmentDocumentProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=AttachmentDocument.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AttachmentDocument.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentLightbox/AttachmentDocument.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8CAA8C,CAAC;AA2G1F,MAAM,MAAM,uBAAuB,GAAG;IACpC,IAAI,EAAE,qBAAqB,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,kBAAkB,aAAc,uBAAuB,4CA2EnE,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import e from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/asyncToGenerator";import r from"@babel/runtime/helpers/toArray";import n from"@babel/runtime/regenerator";import{useState as a,useEffect as o}from"react";import{FileIcon as i}from"../../componentsV2/FileIcon/FileIcon.js";import{Button as c}from"../../componentsV2/Button/Button.js";import{LoaderCircular as s}from"../../componentsV2/LoaderCircular/LoaderCircular.js";import{TextViewer as l}from"../NewDocumentViewer/components/TextViewer.js";import{CsvViewer as m}from"../NewDocumentViewer/components/CsvViewer.js";import{PdfViewer as u}from"../NewDocumentViewer/components/PdfViewer.js";import{getTextData as d,getXlsxData as f,getCsvData as p}from"../NewDocumentViewer/utils.js";import{openAttachmentInNewTab as b,downloadAttachment as v}from"./downloadAttachment.js";import h from"./AttachmentLightbox.scss.js";import{fetchAttachment as w}from"../../utils/fetchAttachment.js";import{getFileExtension as x}from"../../utils/fileExtension.js";import j from"../../utils/main.js";import{jsx as k,jsxs as N}from"react/jsx-runtime";var L={pdf:"pdf",csv:"table",xlsx:"table",txt:"text",json:"text"},g=function(e){var t=r(e),n=t[0],a=void 0===n?[]:n,o=t.slice(1),i=function(e){var t=new Map;return e.map((function(e,r){var n,a=e||"Column ".concat(r+1),o=null!==(n=t.get(a))&&void 0!==n?n:0;return t.set(a,o+1),o?"".concat(a," (").concat(o+1,")"):a}))}(a);return o.map((function(e){return Object.fromEntries(i.map((function(t,r){var n;return[t,null!==(n=e[r])&&void 0!==n?n:""]})))}))},F=function(){var e=t(n.mark((function e(t,r){var a,o;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("pdf"!==r){e.next=7;break}return e.next=3,w(t);case 3:return e.next=5,e.sent.blob();case 5:return o=e.sent,e.abrupt("return",URL.createObjectURL(o.type?o:new Blob([o],{type:"application/pdf"})));case 7:if("csv"!==r){e.next=9;break}return e.abrupt("return",p(t));case 9:if("xlsx"!==r){e.next=24;break}return e.t0=g,e.next=13,f(t);case 13:if(e.t2=a=e.sent,e.t1=null!==e.t2,!e.t1){e.next=17;break}e.t1=void 0!==a;case 17:if(!e.t1){e.next=21;break}e.t3=a,e.next=22;break;case 21:e.t3=[];case 22:return e.t4=e.t3,e.abrupt("return",(0,e.t0)(e.t4));case 24:return e.abrupt("return",d(t));case 25:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),U=["pdf","text","table"],y=function(r){var d=r.item,f=j.getFileNameWithExtensionFromPath(d.name),p=x(f),w=d.src||d.downloadUrl||"",g=L[p],y=function(t,r,n){var i=a((function(){return{data:"",isLoading:!!t&&U.includes(n),hasFailed:!1}})),c=e(i,2),s=c[0],l=c[1];return o((function(){if(t&&U.includes(n)){var e=!0;l({data:"",isLoading:!0,hasFailed:!1});var a="";return F(t,r).then((function(t){"pdf"===n&&(a=t),e?l({data:t,isLoading:!1,hasFailed:!1}):a&&URL.revokeObjectURL(a)})).catch((function(r){console.error('Failed to read attachment "'.concat(t,'"'),r),e&&l({data:"",isLoading:!1,hasFailed:!0})})),function(){e=!1,a&&URL.revokeObjectURL(a)}}l({data:"",isLoading:!1,hasFailed:!1})}),[t,r,n]),s}(w,p,g),V=y.data,D=y.isLoading,R=y.hasFailed;if(D)return k("div",{className:h.documentState,"data-testid":"attachment-preview-loading",children:k(s,{size:"medium"})});var T=!!w&&!R;if(T&&"pdf"===g)return k("div",{className:h.documentFrame,children:k(u,{fileUrl:V,fileName:f})});if(T&&"table"===g)return k("div",{className:h.documentTable,children:k(m,{fileData:V})});if(T&&"text"===g)return k("div",{className:h.documentText,children:k(l,{fileData:V})});var A=R||!w&&!!g;return N("div",{className:h.documentState,"data-testid":"attachment-preview-fallback",children:[k(i,{name:f,size:48}),k("div",{className:h.fallbackName,children:f}),k("div",{className:h.fallbackHint,children:A?"This file could not be opened.":"No preview available for this file type."}),!(!d.downloadUrl&&!d.src)&&k("a",{href:d.downloadUrl||d.src,download:f,target:"_blank",rel:"noopener noreferrer",className:h.fallbackDownload,"data-testid":"attachment-preview-fallback-download",onClick:function(){var e=t(n.mark((function e(t){var r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=d.downloadUrl||d.src||"",t.preventDefault(),e.next=4,v(r,f);case 4:if(e.sent){e.next=6;break}b(r);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),children:k(c,{type:"secondary",size:"medium",children:"Download"})})]})};export{y as AttachmentDocument};
|
|
2
|
+
//# sourceMappingURL=AttachmentDocument.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AttachmentDocument.js","sources":["../../../src/components/AttachmentLightbox/AttachmentDocument.tsx"],"sourcesContent":["import { useEffect, useState } from 'react';\n\nimport { FileIcon } from '../../componentsV2/FileIcon';\nimport { Button } from '../../componentsV2/Button';\nimport { LoaderCircular } from '../../componentsV2/LoaderCircular';\nimport { CsvViewer, PdfViewer, TextViewer } from '../NewDocumentViewer/components';\nimport { getCsvData, getTextData, getXlsxData } from '../NewDocumentViewer/utils';\nimport type { AttachmentPreviewItem } from '../AttachmentPreview/AttachmentPreview.types';\n\nimport { downloadAttachment, openAttachmentInNewTab } from './downloadAttachment';\n\nimport styles from './AttachmentLightbox.scss';\n\nimport { fetchAttachment } from '~/utils/fetchAttachment';\nimport { getFileExtension } from '~/utils/fileExtension';\nimport utils from '~/utils/main';\n\nconst RENDERERS = {\n pdf: 'pdf',\n csv: 'table',\n xlsx: 'table',\n txt: 'text',\n json: 'text',\n} as const;\n\ntype Renderer = typeof RENDERERS[keyof typeof RENDERERS];\n\ntype TableRow = Record<string, unknown>;\n\n/** The table viewer keys cells off the first row, so every column needs its own name. */\nconst toColumnNames = (header: string[]): string[] => {\n const seen = new Map<string, number>();\n\n return header.map((column, index) => {\n const name = column || `Column ${index + 1}`;\n const taken = seen.get(name) ?? 0;\n\n seen.set(name, taken + 1);\n\n return taken ? `${name} (${taken + 1})` : name;\n });\n};\n\nconst toTableRows = (rows: string[][]): TableRow[] => {\n const [header = [], ...body] = rows;\n const columns = toColumnNames(header);\n\n return body.map(row =>\n Object.fromEntries(columns.map((column, index) => [column, row[index] ?? '']))\n );\n};\n\nconst fetchData = async (src: string, extension: string) => {\n if (extension === 'pdf') {\n // The host serves this as a download, which navigates a frame to `about:blank` and shows\n // nothing. Holding the bytes ourselves lets the viewer render them whatever it was sent as.\n const blob = await (await fetchAttachment(src)).blob();\n\n return URL.createObjectURL(blob.type ? blob : new Blob([blob], { type: 'application/pdf' }));\n }\n if (extension === 'csv') return getCsvData(src);\n if (extension === 'xlsx') return toTableRows((await getXlsxData(src)) ?? []);\n\n return getTextData(src);\n};\n\nconst NEEDS_DATA: Renderer[] = ['pdf', 'text', 'table'];\nconst useDocumentData = (src: string, extension: string, renderer?: Renderer) => {\n const [state, setState] = useState<{\n data: string | TableRow[];\n isLoading: boolean;\n hasFailed: boolean;\n }>(() => ({\n data: '',\n isLoading: !!src && NEEDS_DATA.includes(renderer as Renderer),\n hasFailed: false,\n }));\n\n useEffect(() => {\n if (!src || !NEEDS_DATA.includes(renderer as Renderer)) {\n setState({ data: '', isLoading: false, hasFailed: false });\n\n return undefined;\n }\n\n let isActive = true;\n setState({ data: '', isLoading: true, hasFailed: false });\n\n let objectUrl = '';\n\n fetchData(src, extension)\n .then(data => {\n if (renderer === 'pdf') objectUrl = data as string;\n\n if (isActive) {\n setState({ data: data as string | TableRow[], isLoading: false, hasFailed: false });\n } else if (objectUrl) {\n URL.revokeObjectURL(objectUrl);\n }\n })\n .catch(error => {\n console.error(`Failed to read attachment \"${src}\"`, error);\n if (isActive) setState({ data: '', isLoading: false, hasFailed: true });\n });\n\n return () => {\n isActive = false;\n if (objectUrl) URL.revokeObjectURL(objectUrl);\n };\n }, [src, extension, renderer]);\n\n return state;\n};\n\nexport type AttachmentDocumentProps = {\n item: AttachmentPreviewItem;\n};\n\nexport const AttachmentDocument = ({ item }: AttachmentDocumentProps) => {\n const fileName = utils.getFileNameWithExtensionFromPath(item.name);\n const extension = getFileExtension(fileName);\n const src = item.src || item.downloadUrl || '';\n const renderer: Renderer | undefined = RENDERERS[extension as keyof typeof RENDERERS];\n\n const { data, isLoading, hasFailed } = useDocumentData(src, extension, renderer);\n\n if (isLoading) {\n return (\n <div className={styles.documentState} data-testid=\"attachment-preview-loading\">\n <LoaderCircular size=\"medium\" />\n </div>\n );\n }\n\n const isRenderable = !!src && !hasFailed;\n\n if (isRenderable && renderer === 'pdf') {\n return (\n <div className={styles.documentFrame}>\n <PdfViewer fileUrl={data as string} fileName={fileName} />\n </div>\n );\n }\n\n if (isRenderable && renderer === 'table') {\n return (\n <div className={styles.documentTable}>\n <CsvViewer fileData={data as TableRow[]} />\n </div>\n );\n }\n\n if (isRenderable && renderer === 'text') {\n return (\n <div className={styles.documentText}>\n <TextViewer fileData={data as string} />\n </div>\n );\n }\n\n const isUnopenable = hasFailed || (!src && !!renderer);\n\n return (\n <div className={styles.documentState} data-testid=\"attachment-preview-fallback\">\n <FileIcon name={fileName} size={48} />\n <div className={styles.fallbackName}>{fileName}</div>\n <div className={styles.fallbackHint}>\n {isUnopenable\n ? 'This file could not be opened.'\n : 'No preview available for this file type.'}\n </div>\n {!!(item.downloadUrl || item.src) && (\n <a\n href={item.downloadUrl || item.src}\n download={fileName}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className={styles.fallbackDownload}\n data-testid=\"attachment-preview-fallback-download\"\n onClick={async event => {\n const url = item.downloadUrl || item.src || '';\n event.preventDefault();\n\n if (!(await downloadAttachment(url, fileName))) openAttachmentInNewTab(url);\n }}\n >\n <Button type=\"secondary\" size=\"medium\">\n Download\n </Button>\n </a>\n )}\n </div>\n );\n};\n"],"names":["RENDERERS","pdf","csv","xlsx","txt","json","toTableRows","rows","_rows","_toArray","_rows$","header","body","slice","columns","seen","Map","map","column","index","_seen$get","name","taken","get","set","concat","toColumnNames","row","Object","fromEntries","_row$index","fetchData","_ref","_asyncToGenerator","_regeneratorRuntime","mark","_callee","src","extension","_yield$getXlsxData","blob","wrap","_context","prev","next","fetchAttachment","sent","abrupt","URL","createObjectURL","type","Blob","getCsvData","t0","getXlsxData","t2","t1","t3","t4","getTextData","stop","_x","_x2","apply","this","arguments","NEEDS_DATA","AttachmentDocument","_ref2","item","fileName","utils","getFileNameWithExtensionFromPath","getFileExtension","downloadUrl","renderer","_useDocumentData","_useState","useState","data","isLoading","includes","hasFailed","_useState2","_slicedToArray","state","setState","useEffect","isActive","objectUrl","then","revokeObjectURL","catch","error","console","useDocumentData","_jsx","className","styles","documentState","children","LoaderCircular","size","isRenderable","documentFrame","PdfViewer","fileUrl","documentTable","CsvViewer","fileData","documentText","TextViewer","isUnopenable","_jsxs","FileIcon","fallbackName","fallbackHint","href","download","target","rel","fallbackDownload","onClick","_ref3","event","url","_context2","preventDefault","downloadAttachment","openAttachmentInNewTab","_callee2","_x3","Button"],"mappings":"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"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
src: string;
|
|
4
|
-
name?: string;
|
|
5
|
-
kind?: AttachmentKind;
|
|
6
|
-
};
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import type { AttachmentPreviewItem } from '../AttachmentPreview/AttachmentPreview.types';
|
|
7
3
|
export type AttachmentLightboxProps = {
|
|
4
|
+
items: AttachmentPreviewItem[];
|
|
8
5
|
/** `null` keeps the lightbox closed. */
|
|
9
|
-
|
|
6
|
+
activeId: AttachmentPreviewItem['id'] | null;
|
|
7
|
+
onActiveIdChange: (id: AttachmentPreviewItem['id']) => void;
|
|
10
8
|
onClose: () => void;
|
|
9
|
+
/** Adds "Share file" to the overflow menu. */
|
|
10
|
+
onShare?: (item: AttachmentPreviewItem) => void;
|
|
11
|
+
title?: ReactNode;
|
|
11
12
|
testId?: string;
|
|
12
13
|
};
|
|
13
|
-
export declare const AttachmentLightbox: ({
|
|
14
|
+
export declare const AttachmentLightbox: ({ items, activeId, onActiveIdChange, onClose, onShare, title, testId, }: AttachmentLightboxProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
15
|
//# sourceMappingURL=AttachmentLightbox.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttachmentLightbox.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentLightbox/AttachmentLightbox.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AttachmentLightbox.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentLightbox/AttachmentLightbox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA0B,MAAM,OAAO,CAAC;AAK1D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8CAA8C,CAAC;AAQ1F,MAAM,MAAM,uBAAuB,GAAG;IACpC,KAAK,EAAE,qBAAqB,EAAE,CAAC;IAC/B,wCAAwC;IACxC,QAAQ,EAAE,qBAAqB,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAC7C,gBAAgB,EAAE,CAAC,EAAE,EAAE,qBAAqB,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC;IAC5D,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,8CAA8C;IAC9C,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,qBAAqB,KAAK,IAAI,CAAC;IAChD,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,kBAAkB,4EAQ5B,uBAAuB,4CAqFzB,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{useCallback as o,useEffect as s}from"react";import{Modal as c}from"../../componentsV2/Modal/Modal.js";import{ButtonIcon as i}from"../../componentsV2/ButtonIcon/ButtonIcon.js";import{AttachmentRow as n}from"../AttachmentPreview/AttachmentRow.js";import{AttachmentPreviewPane as t}from"./AttachmentPreviewPane.js";import m from"./AttachmentLightbox.scss.js";import{LeftIcon as r,RightIcon as e}from"../../icons/iconParkIcons.js";import"../../icons/customIcons/icons/AddMessage.js";import"../../icons/customIcons/icons/DragOne.js";import"../../icons/customIcons/icons/Attention.js";import"../../icons/customIcons/icons/Collapse.js";import"../../icons/customIcons/icons/Dashboard.js";import"../../icons/customIcons/icons/Expand.js";import"../../icons/customIcons/icons/FolderClosed.js";import"../../icons/customIcons/icons/FolderClosedFilled.js";import"../../icons/customIcons/icons/FolderOpened.js";import"../../icons/customIcons/icons/GreaterOrEqual.js";import"../../icons/customIcons/icons/LessOrEqual.js";import"../../icons/customIcons/icons/Search.js";import"../../icons/customIcons/icons/SearchOne.js";import"../../icons/customIcons/icons/Wellhub.js";import"../../icons/customIcons/icons/MultiRuler.js";import"../../icons/customIcons/icons/Checkbox.js";import"../../icons/customIcons/icons/CheckboxChecked.js";import"../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../icons/customIcons/icons/Radio.js";import"../../icons/customIcons/icons/RadioChecked.js";import"../../icons/customIcons/icons/SimulFrac.js";import"../../icons/customIcons/icons/ZipperFrac.js";import"../../icons/customIcons/icons/CautionFilled.js";import"../../icons/customIcons/icons/MoreApp.js";import"../../icons/customIcons/icons/Pad.js";import"../../icons/customIcons/icons/DrilloutUnit.js";import"../../icons/customIcons/icons/FracFleet.js";import"../../icons/customIcons/icons/Global.js";import"../../icons/customIcons/icons/Program.js";import"../../icons/customIcons/icons/Rig.js";import"../../icons/customIcons/icons/Well.js";import"../../icons/customIcons/icons/Gap.js";import"../../icons/customIcons/icons/Pin.js";import"../../icons/customIcons/icons/CloseOneFilled.js";import"../../icons/customIcons/icons/AttentionFilled.js";import"../../icons/customIcons/icons/CheckOneFilled.js";import"../../icons/customIcons/icons/Archive.js";import"../../icons/customIcons/icons/ArchiveCancel.js";import"../../icons/customIcons/icons/Unarchive.js";import"../../icons/customIcons/icons/Archived.js";import"../../icons/customIcons/icons/InterventionUnit.js";import"../../icons/customIcons/icons/CloudDelete.js";import"../../icons/customIcons/icons/Lasso.js";import"../../icons/customIcons/icons/Radius.js";import"../../icons/customIcons/icons/ErrorOps.js";import"../../icons/customIcons/icons/DataTypeOps.js";import"../../icons/customIcons/icons/FalsePositiveOps.js";import"../../icons/customIcons/icons/CalibrationOps.js";import"../../icons/customIcons/icons/CriticalOps.js";import"../../icons/customIcons/icons/Company.js";import"../../icons/customIcons/icons/ArchiveOne.js";import"../../icons/customIcons/icons/ParseBotFusion.js";import"../../icons/customIcons/icons/Connect.js";import"../../icons/customIcons/icons/PuzzleOne.js";import"../../icons/customIcons/icons/Feed.js";import"../../icons/customIcons/icons/Prompt.js";import"../../icons/customIcons/icons/Companies.js";import"../../icons/customIcons/icons/ClipboardAi.js";import"../../icons/customIcons/icons/Key.js";import"../../icons/customIcons/icons/AtSignCrossed.js";import"../../icons/customIcons/icons/MappingManual.js";import"../../icons/customIcons/icons/Mapping.js";import"../../icons/customIcons/icons/Metrics.js";import"../../icons/customIcons/icons/Drops.js";import"../../icons/customIcons/icons/ClipboardSearch.js";import"../../icons/customIcons/icons/Template.js";import"../../icons/customIcons/icons/ClipboardMetrics.js";import"../../icons/customIcons/icons/ClipboardBuilder.js";import"../../icons/customIcons/icons/UnitConversion.js";import"../../icons/customIcons/icons/NPT.js";import"../../icons/customIcons/icons/GuidedFrac.js";import{jsxs as p,jsx as u}from"react/jsx-runtime";var a=function(a){var I=a.items,l=a.activeId,j=a.onActiveIdChange,d=a.onClose,h=a.onShare,v=a.title,C=void 0===v?"Files":v,f=a.testId,b=I.findIndex((function(o){return o.id===l})),g=-1===b?void 0:I[b],A=o((function(o){var s=I[b+o];s&&j(s.id)}),[I,b,j]);s((function(){if(g){var o=function(o){if(!o.defaultPrevented){var s=o.target;"function"==typeof(null==s?void 0:s.closest)&&s.closest('video, audio, input, textarea, [role="menu"]')||("ArrowLeft"===o.key&&A(-1),"ArrowRight"===o.key&&A(1))}};return document.addEventListener("keydown",o),function(){return document.removeEventListener("keydown",o)}}}),[g,A]);var F=I.length>1?p("div",{className:m.strip,children:[u(i,{size:"large",ariaLabel:"Previous attachment",disabled:b<=0,onClick:function(){return A(-1)},testId:"attachment-lightbox-prev",children:u(r,{})}),u(n,{items:I,selectedId:null!=l?l:void 0,hideActions:!0,onItemClick:function(o){return j(o.id)},className:m.stripRow,testId:"attachment-lightbox-strip"}),u(i,{size:"large",ariaLabel:"Next attachment",disabled:-1===b||b>=I.length-1,onClick:function(){return A(1)},testId:"attachment-lightbox-next",children:u(e,{})})]}):void 0;return u(c,{open:!!g,size:"fullscreen",title:C,onClose:d,actions:F,testId:f,children:!!g&&u(t,{item:g,onShare:h})})};export{a as AttachmentLightbox};
|
|
2
2
|
//# sourceMappingURL=AttachmentLightbox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttachmentLightbox.js","sources":["../../../src/components/AttachmentLightbox/AttachmentLightbox.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"AttachmentLightbox.js","sources":["../../../src/components/AttachmentLightbox/AttachmentLightbox.tsx"],"sourcesContent":["import { ReactNode, useCallback, useEffect } from 'react';\n\nimport { Modal } from '../../componentsV2/Modal';\nimport { ButtonIcon } from '../../componentsV2/ButtonIcon';\nimport { AttachmentRow } from '../AttachmentPreview/AttachmentRow';\nimport type { AttachmentPreviewItem } from '../AttachmentPreview/AttachmentPreview.types';\n\nimport { AttachmentPreviewPane } from './AttachmentPreviewPane';\n\nimport styles from './AttachmentLightbox.scss';\n\nimport { LeftIcon, RightIcon } from '~/icons';\n\nexport type AttachmentLightboxProps = {\n items: AttachmentPreviewItem[];\n /** `null` keeps the lightbox closed. */\n activeId: AttachmentPreviewItem['id'] | null;\n onActiveIdChange: (id: AttachmentPreviewItem['id']) => void;\n onClose: () => void;\n /** Adds \"Share file\" to the overflow menu. */\n onShare?: (item: AttachmentPreviewItem) => void;\n title?: ReactNode;\n testId?: string;\n};\n\nexport const AttachmentLightbox = ({\n items,\n activeId,\n onActiveIdChange,\n onClose,\n onShare,\n title = 'Files',\n testId,\n}: AttachmentLightboxProps) => {\n const activeIndex = items.findIndex(item => item.id === activeId);\n const active = activeIndex === -1 ? undefined : items[activeIndex];\n\n const step = useCallback(\n (delta: number) => {\n const next = items[activeIndex + delta];\n\n if (next) onActiveIdChange(next.id);\n },\n [items, activeIndex, onActiveIdChange]\n );\n\n useEffect(() => {\n if (!active) return undefined;\n\n const handleKeyDown = (event: KeyboardEvent) => {\n // A focused <video> seeks with the arrows; only steer when nothing nearer claims the key.\n if (event.defaultPrevented) return;\n\n // With nothing focused the target is the document, which has no `closest`.\n const target = event.target as Element | null;\n\n if (\n typeof target?.closest === 'function' &&\n target.closest('video, audio, input, textarea, [role=\"menu\"]')\n ) {\n return;\n }\n\n if (event.key === 'ArrowLeft') step(-1);\n if (event.key === 'ArrowRight') step(1);\n };\n\n document.addEventListener('keydown', handleKeyDown);\n\n return () => document.removeEventListener('keydown', handleKeyDown);\n }, [active, step]);\n\n const strip =\n items.length > 1 ? (\n <div className={styles.strip}>\n <ButtonIcon\n size=\"large\"\n ariaLabel=\"Previous attachment\"\n disabled={activeIndex <= 0}\n onClick={() => step(-1)}\n testId=\"attachment-lightbox-prev\"\n >\n <LeftIcon />\n </ButtonIcon>\n\n <AttachmentRow\n items={items}\n selectedId={activeId ?? undefined}\n hideActions\n onItemClick={item => onActiveIdChange(item.id)}\n className={styles.stripRow}\n testId=\"attachment-lightbox-strip\"\n />\n\n <ButtonIcon\n size=\"large\"\n ariaLabel=\"Next attachment\"\n disabled={activeIndex === -1 || activeIndex >= items.length - 1}\n onClick={() => step(1)}\n testId=\"attachment-lightbox-next\"\n >\n <RightIcon />\n </ButtonIcon>\n </div>\n ) : undefined;\n\n return (\n <Modal\n open={!!active}\n size=\"fullscreen\"\n title={title}\n onClose={onClose}\n actions={strip}\n testId={testId}\n >\n {!!active && <AttachmentPreviewPane item={active} onShare={onShare} />}\n </Modal>\n );\n};\n"],"names":["AttachmentLightbox","_ref","items","activeId","onActiveIdChange","onClose","onShare","_ref$title","title","testId","activeIndex","findIndex","item","id","active","undefined","step","useCallback","delta","next","useEffect","handleKeyDown","event","defaultPrevented","target","closest","key","document","addEventListener","removeEventListener","strip","length","_jsxs","className","styles","children","_jsx","ButtonIcon","size","ariaLabel","disabled","onClick","LeftIcon","AttachmentRow","selectedId","hideActions","onItemClick","stripRow","RightIcon","Modal","open","actions","AttachmentPreviewPane"],"mappings":"qjIAyBaA,IAAAA,EAAqB,SAQHC,GAAA,IAP7BC,IAAAA,MACAC,IAAAA,SACAC,IAAAA,iBACAC,IAAAA,QACAC,IAAAA,QAAOC,EAAAN,EACPO,MAAAA,aAAQ,QAAOD,EACfE,IAAAA,OAEMC,EAAcR,EAAMS,WAAU,SAAAC,GAAI,OAAIA,EAAKC,KAAOV,KAClDW,GAA0B,IAAjBJ,OAAqBK,EAAYb,EAAMQ,GAEhDM,EAAOC,GACX,SAACC,GACC,IAAMC,EAAOjB,EAAMQ,EAAcQ,GAE7BC,GAAMf,EAAiBe,EAAKN,GACjC,GACD,CAACX,EAAOQ,EAAaN,IAGvBgB,GAAU,WACR,GAAKN,EAAL,CAEA,IAAMO,EAAgB,SAACC,GAErB,IAAIA,EAAMC,iBAAV,CAGA,IAAMC,EAASF,EAAME,OAGQ,mBAApBA,aAAM,EAANA,EAAQC,UACfD,EAAOC,QAAQ,kDAKC,cAAdH,EAAMI,KAAqBV,GAAM,GACnB,eAAdM,EAAMI,KAAsBV,EAAK,GAbT,GAkB9B,OAFAW,SAASC,iBAAiB,UAAWP,GAE9B,WAAA,OAAMM,SAASE,oBAAoB,UAAWR,EAAc,CAtBtC,CAuB/B,GAAG,CAACP,EAAQE,IAEZ,IAAMc,EACJ5B,EAAM6B,OAAS,EACbC,EAAA,MAAA,CAAKC,UAAWC,EAAOJ,MAAMK,SAAA,CAC3BC,EAACC,EAAU,CACTC,KAAK,QACLC,UAAU,sBACVC,SAAU9B,GAAe,EACzB+B,QAAS,WAAA,OAAMzB,GAAM,EAAG,EACxBP,OAAO,2BAA0B0B,SAEjCC,EAACM,EAAQ,MAGXN,EAACO,EAAa,CACZzC,MAAOA,EACP0C,WAAYzC,QAAAA,OAAYY,EACxB8B,aAAW,EACXC,YAAa,SAAAlC,GAAI,OAAIR,EAAiBQ,EAAKC,GAAI,EAC/CoB,UAAWC,EAAOa,SAClBtC,OAAO,8BAGT2B,EAACC,EAAU,CACTC,KAAK,QACLC,UAAU,kBACVC,UAA2B,IAAjB9B,GAAsBA,GAAeR,EAAM6B,OAAS,EAC9DU,QAAS,WAAA,OAAMzB,EAAK,EAAG,EACvBP,OAAO,2BAA0B0B,SAEjCC,EAACY,EAAS,cAGZjC,EAEN,OACEqB,EAACa,EAAK,CACJC,OAAQpC,EACRwB,KAAK,aACL9B,MAAOA,EACPH,QAASA,EACT8C,QAASrB,EACTrB,OAAQA,EAAO0B,WAEZrB,GAAUsB,EAACgB,EAAqB,CAACxC,KAAME,EAAQR,QAASA,KAGjE"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import t from'./../../ext-esm/style-inject/dist/style-inject.es.js';var
|
|
1
|
+
import t from'./../../ext-esm/style-inject/dist/style-inject.es.js';var e={spacing:"8",strip:"AttachmentLightbox_strip__6Ahrc",stripRow:"AttachmentLightbox_stripRow__uue68",pane:"AttachmentLightbox_pane__KzcgJ",paneHeader:"AttachmentLightbox_paneHeader__Z6qqZ",paneName:"AttachmentLightbox_paneName__wHaha",paneFileName:"AttachmentLightbox_paneFileName__Ans-0",paneFileSize:"AttachmentLightbox_paneFileSize__kHpFZ",paneActions:"AttachmentLightbox_paneActions__HYZPg",paneActionLink:"AttachmentLightbox_paneActionLink__ij8qw",paneViewport:"AttachmentLightbox_paneViewport__eNxCs",paneViewportPannable:"AttachmentLightbox_paneViewportPannable__aioSN",paneViewportPanning:"AttachmentLightbox_paneViewportPanning__ZN5R3",paneZoomBox:"AttachmentLightbox_paneZoomBox__Z1Ccd",paneMedia:"AttachmentLightbox_paneMedia__nXjJ0",paneZoomControls:"AttachmentLightbox_paneZoomControls__y7ImM",paneZoomButton:"AttachmentLightbox_paneZoomButton__kndeG",documentFrame:"AttachmentLightbox_documentFrame__-AP36",documentTable:"AttachmentLightbox_documentTable__vMkX5",documentText:"AttachmentLightbox_documentText__Tn8b7",documentState:"AttachmentLightbox_documentState__h-iDd",fallbackName:"AttachmentLightbox_fallbackName__JO0HH",fallbackHint:"AttachmentLightbox_fallbackHint__tPWNV",fallbackDownload:"AttachmentLightbox_fallbackDownload__Noq5-"};t(".AttachmentLightbox_strip__6Ahrc{align-items:center;display:flex;flex:1;gap:8px;justify-content:center;min-width:0}.AttachmentLightbox_stripRow__uue68.AttachmentLightbox_stripRow__uue68{flex:0 1 auto;gap:8px;justify-content:flex-start}.AttachmentLightbox_pane__KzcgJ{background:rgb(from var(--palette-primary-text-1) r g b/.02);border-radius:8px;display:flex;flex-direction:column;height:100%;padding:8px 16px 16px;position:relative}.AttachmentLightbox_paneHeader__Z6qqZ{align-items:center;display:flex;gap:16px;justify-content:space-between;padding:4px 0}.AttachmentLightbox_paneName__wHaha{display:flex;flex-direction:column;justify-content:center;min-width:0}.AttachmentLightbox_paneFileName__Ans-0{color:var(--palette-primary-text-1);font-size:16px;font-weight:500;line-height:22px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.AttachmentLightbox_paneFileSize__kHpFZ{color:var(--palette-primary-text-6);font-size:12px;line-height:16px}.AttachmentLightbox_paneActions__HYZPg{align-items:center;display:flex;flex-shrink:0;gap:8px}.AttachmentLightbox_paneActionLink__ij8qw{color:inherit;display:inline-flex;text-decoration:none}.AttachmentLightbox_paneViewport__eNxCs{display:flex;flex:1;margin-top:8px;min-height:0;overflow:auto}.AttachmentLightbox_paneViewportPannable__aioSN{cursor:grab}.AttachmentLightbox_paneViewportPanning__ZN5R3{cursor:grabbing;user-select:none}.AttachmentLightbox_paneZoomBox__Z1Ccd{display:flex;flex:none;height:calc(100%*var(--attachment-zoom, 1));width:calc(100%*var(--attachment-zoom, 1))}.AttachmentLightbox_paneMedia__nXjJ0{-webkit-user-drag:none;border-radius:8px;height:100%;object-fit:contain;user-select:none;width:100%}.AttachmentLightbox_paneZoomControls__y7ImM{bottom:8px;display:flex;flex-direction:column;gap:8px;position:absolute;right:8px;z-index:2}.AttachmentLightbox_paneZoomButton__kndeG{display:inline-flex}.AttachmentLightbox_documentFrame__-AP36,.AttachmentLightbox_documentTable__vMkX5,.AttachmentLightbox_documentText__Tn8b7{border-radius:8px;height:100%;overflow:auto;position:relative;width:100%}.AttachmentLightbox_documentText__Tn8b7{color:var(--palette-primary-text-1);font-size:14px;line-height:20px;padding:16px}.AttachmentLightbox_documentText__Tn8b7 pre{font-family:inherit;margin:0;white-space:pre-wrap;word-break:break-word}.AttachmentLightbox_documentTable__vMkX5{color:var(--palette-primary-text-1)}.AttachmentLightbox_documentState__h-iDd{align-items:center;display:flex;flex-direction:column;gap:8px;justify-content:center;margin:auto;padding:24px;text-align:center}.AttachmentLightbox_fallbackName__JO0HH{color:var(--palette-primary-text-1);font-size:16px;line-height:22px;margin-top:8px;word-break:break-word}.AttachmentLightbox_fallbackHint__tPWNV{color:var(--palette-primary-text-6);font-size:14px;line-height:20px;margin-bottom:8px}.AttachmentLightbox_fallbackDownload__Noq5-{text-decoration:none}");export{e as default};
|
|
2
2
|
//# sourceMappingURL=AttachmentLightbox.scss.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { AttachmentPreviewItem } from '../AttachmentPreview/AttachmentPreview.types';
|
|
2
|
+
export type AttachmentPreviewPaneProps = {
|
|
3
|
+
item: AttachmentPreviewItem;
|
|
4
|
+
/** Adds "Share file" to the overflow menu. */
|
|
5
|
+
onShare?: (item: AttachmentPreviewItem) => void;
|
|
6
|
+
};
|
|
7
|
+
/** Zoom is media-only — document viewers scroll and zoom on their own. */
|
|
8
|
+
export declare const AttachmentPreviewPane: ({ item, onShare }: AttachmentPreviewPaneProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=AttachmentPreviewPane.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AttachmentPreviewPane.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentLightbox/AttachmentPreviewPane.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8CAA8C,CAAC;AAW1F,MAAM,MAAM,0BAA0B,GAAG;IACvC,IAAI,EAAE,qBAAqB,CAAC;IAC5B,8CAA8C;IAC9C,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,qBAAqB,KAAK,IAAI,CAAC;CACjD,CAAC;AAEF,0EAA0E;AAC1E,eAAO,MAAM,qBAAqB,sBAAuB,0BAA0B,4CAsHlF,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import o from"@babel/runtime/helpers/defineProperty";import{useRef as s}from"react";import c from"classnames";import{ButtonIcon as i}from"../../componentsV2/ButtonIcon/ButtonIcon.js";import{Tooltip as n}from"../../componentsV2/Tooltip/Tooltip.js";import{AttachmentActionsMenu as t}from"../AttachmentPreview/AttachmentActionsMenu.js";import{AttachmentImage as e}from"../AttachmentPreview/AttachmentImage.js";import{AttachmentDownloadLink as m}from"../AttachmentPreview/AttachmentDownloadLink.js";import{AttachmentDocument as r}from"./AttachmentDocument.js";import{useZoomPan as a}from"./useZoomPan.js";import p from"./AttachmentLightbox.scss.js";import{PlusIcon as l,MinusIcon as u}from"../../icons/iconParkIcons.js";import"../../icons/customIcons/icons/AddMessage.js";import"../../icons/customIcons/icons/DragOne.js";import"../../icons/customIcons/icons/Attention.js";import"../../icons/customIcons/icons/Collapse.js";import"../../icons/customIcons/icons/Dashboard.js";import"../../icons/customIcons/icons/Expand.js";import"../../icons/customIcons/icons/FolderClosed.js";import"../../icons/customIcons/icons/FolderClosedFilled.js";import"../../icons/customIcons/icons/FolderOpened.js";import"../../icons/customIcons/icons/GreaterOrEqual.js";import"../../icons/customIcons/icons/LessOrEqual.js";import"../../icons/customIcons/icons/Search.js";import"../../icons/customIcons/icons/SearchOne.js";import"../../icons/customIcons/icons/Wellhub.js";import"../../icons/customIcons/icons/MultiRuler.js";import"../../icons/customIcons/icons/Checkbox.js";import"../../icons/customIcons/icons/CheckboxChecked.js";import"../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../icons/customIcons/icons/Radio.js";import"../../icons/customIcons/icons/RadioChecked.js";import"../../icons/customIcons/icons/SimulFrac.js";import"../../icons/customIcons/icons/ZipperFrac.js";import"../../icons/customIcons/icons/CautionFilled.js";import"../../icons/customIcons/icons/MoreApp.js";import"../../icons/customIcons/icons/Pad.js";import"../../icons/customIcons/icons/DrilloutUnit.js";import"../../icons/customIcons/icons/FracFleet.js";import"../../icons/customIcons/icons/Global.js";import"../../icons/customIcons/icons/Program.js";import"../../icons/customIcons/icons/Rig.js";import"../../icons/customIcons/icons/Well.js";import"../../icons/customIcons/icons/Gap.js";import"../../icons/customIcons/icons/Pin.js";import"../../icons/customIcons/icons/CloseOneFilled.js";import"../../icons/customIcons/icons/AttentionFilled.js";import"../../icons/customIcons/icons/CheckOneFilled.js";import"../../icons/customIcons/icons/Archive.js";import"../../icons/customIcons/icons/ArchiveCancel.js";import"../../icons/customIcons/icons/Unarchive.js";import"../../icons/customIcons/icons/Archived.js";import"../../icons/customIcons/icons/InterventionUnit.js";import"../../icons/customIcons/icons/CloudDelete.js";import"../../icons/customIcons/icons/Lasso.js";import"../../icons/customIcons/icons/Radius.js";import"../../icons/customIcons/icons/ErrorOps.js";import"../../icons/customIcons/icons/DataTypeOps.js";import"../../icons/customIcons/icons/FalsePositiveOps.js";import"../../icons/customIcons/icons/CalibrationOps.js";import"../../icons/customIcons/icons/CriticalOps.js";import"../../icons/customIcons/icons/Company.js";import"../../icons/customIcons/icons/ArchiveOne.js";import"../../icons/customIcons/icons/ParseBotFusion.js";import"../../icons/customIcons/icons/Connect.js";import"../../icons/customIcons/icons/PuzzleOne.js";import"../../icons/customIcons/icons/Feed.js";import"../../icons/customIcons/icons/Prompt.js";import"../../icons/customIcons/icons/Companies.js";import"../../icons/customIcons/icons/ClipboardAi.js";import"../../icons/customIcons/icons/Key.js";import"../../icons/customIcons/icons/AtSignCrossed.js";import"../../icons/customIcons/icons/MappingManual.js";import"../../icons/customIcons/icons/Mapping.js";import"../../icons/customIcons/icons/Metrics.js";import"../../icons/customIcons/icons/Drops.js";import"../../icons/customIcons/icons/ClipboardSearch.js";import"../../icons/customIcons/icons/Template.js";import"../../icons/customIcons/icons/ClipboardMetrics.js";import"../../icons/customIcons/icons/ClipboardBuilder.js";import"../../icons/customIcons/icons/UnitConversion.js";import"../../icons/customIcons/icons/NPT.js";import"../../icons/customIcons/icons/GuidedFrac.js";import{formatFileSize as j}from"../../utils/formatFileSize.js";import d from"../../utils/main.js";import{jsxs as I,jsx as h}from"react/jsx-runtime";function f(o,s){var c=Object.keys(o);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(o);s&&(i=i.filter((function(s){return Object.getOwnPropertyDescriptor(o,s).enumerable}))),c.push.apply(c,i)}return c}function v(s){for(var c=1;c<arguments.length;c++){var i=null!=arguments[c]?arguments[c]:{};c%2?f(Object(i),!0).forEach((function(c){o(s,c,i[c])})):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(i)):f(Object(i)).forEach((function(o){Object.defineProperty(s,o,Object.getOwnPropertyDescriptor(i,o))}))}return s}var b=function(o){var f,b=o.item,O=o.onShare,P=s(null),g=null!==(f=b.kind)&&void 0!==f?f:"file",C="image"===g||"video"===g,y=a({canZoom:C,canPan:"image"===g,resetKey:b.id}),w=y.viewportRef,A=y.zoom,F=y.zoomIn,N=y.zoomOut,z=y.canZoomIn,k=y.canZoomOut,Z=y.isPannable,D=y.isPanning,M=y.panHandlers,S=d.getFileNameWithExtensionFromPath(b.name),x=b.downloadUrl||b.src;return I("div",{className:p.pane,"data-testid":"attachment-preview-pane",children:[I("div",{className:p.paneHeader,children:[I("div",{className:p.paneName,children:[h("div",{className:p.paneFileName,title:S,children:S}),void 0!==b.size&&h("div",{className:p.paneFileSize,children:j(b.size)})]}),I("div",{className:p.paneActions,children:[!!x&&h(m,{url:x,fileName:S,className:p.paneActionLink,testId:"attachment-preview-download"}),h(t,{item:b,onShare:O,imageRef:P})]})]}),h("div",v(v({className:c(p.paneViewport,Z&&p.paneViewportPannable,D&&p.paneViewportPanning),ref:w},M),{},{children:I("div",{className:p.paneZoomBox,style:{"--attachment-zoom":A},"data-testid":"attachment-preview-zoom-box",children:["image"===g&&h(e,{ref:P,src:b.src,alt:S,className:p.paneMedia,draggable:!1}),"video"===g&&h("video",{src:b.src,className:p.paneMedia,controls:!0,autoPlay:!0,playsInline:!0}),"file"===g&&h(r,{item:b},b.id)]})})),C&&I("div",{className:p.paneZoomControls,children:[h(n,{title:"Zoom in",placement:"left",children:h("span",{className:p.paneZoomButton,children:h(i,{size:"small",type:"tertiaryBg",ariaLabel:"Zoom in",disabled:!z,onClick:F,testId:"attachment-preview-zoom-in",children:h(l,{})})})}),h(n,{title:"Zoom out",placement:"left",children:h("span",{className:p.paneZoomButton,children:h(i,{size:"small",type:"tertiaryBg",ariaLabel:"Zoom out",disabled:!k,onClick:N,testId:"attachment-preview-zoom-out",children:h(u,{})})})})]})]})};export{b as AttachmentPreviewPane};
|
|
2
|
+
//# sourceMappingURL=AttachmentPreviewPane.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AttachmentPreviewPane.js","sources":["../../../src/components/AttachmentLightbox/AttachmentPreviewPane.tsx"],"sourcesContent":["import { CSSProperties, useRef } from 'react';\nimport classNames from 'classnames';\n\nimport { ButtonIcon } from '../../componentsV2/ButtonIcon';\nimport { Tooltip } from '../../componentsV2/Tooltip';\nimport { AttachmentActionsMenu } from '../AttachmentPreview/AttachmentActionsMenu';\nimport { AttachmentImage } from '../AttachmentPreview/AttachmentImage';\nimport { AttachmentDownloadLink } from '../AttachmentPreview/AttachmentDownloadLink';\nimport type { AttachmentPreviewItem } from '../AttachmentPreview/AttachmentPreview.types';\n\nimport { AttachmentDocument } from './AttachmentDocument';\nimport { useZoomPan } from './useZoomPan';\n\nimport styles from './AttachmentLightbox.scss';\n\nimport { MinusIcon, PlusIcon } from '~/icons';\nimport { formatFileSize } from '~/utils/formatFileSize';\nimport utils from '~/utils/main';\n\nexport type AttachmentPreviewPaneProps = {\n item: AttachmentPreviewItem;\n /** Adds \"Share file\" to the overflow menu. */\n onShare?: (item: AttachmentPreviewItem) => void;\n};\n\n/** Zoom is media-only — document viewers scroll and zoom on their own. */\nexport const AttachmentPreviewPane = ({ item, onShare }: AttachmentPreviewPaneProps) => {\n const imageRef = useRef<HTMLImageElement>(null);\n const kind = item.kind ?? 'file';\n const isMedia = kind === 'image' || kind === 'video';\n\n const {\n viewportRef,\n zoom,\n zoomIn,\n zoomOut,\n canZoomIn,\n canZoomOut,\n isPannable,\n isPanning,\n panHandlers,\n // Panning a zoomed <video> would swallow its own controls, so only images get the drag.\n } = useZoomPan({ canZoom: isMedia, canPan: kind === 'image', resetKey: item.id });\n\n const fileName = utils.getFileNameWithExtensionFromPath(item.name);\n const downloadUrl = item.downloadUrl || item.src;\n\n return (\n <div className={styles.pane} data-testid=\"attachment-preview-pane\">\n <div className={styles.paneHeader}>\n <div className={styles.paneName}>\n <div className={styles.paneFileName} title={fileName}>\n {fileName}\n </div>\n {item.size !== undefined && (\n <div className={styles.paneFileSize}>{formatFileSize(item.size)}</div>\n )}\n </div>\n\n <div className={styles.paneActions}>\n {!!downloadUrl && (\n <AttachmentDownloadLink\n url={downloadUrl}\n fileName={fileName}\n className={styles.paneActionLink}\n testId=\"attachment-preview-download\"\n />\n )}\n\n <AttachmentActionsMenu item={item} onShare={onShare} imageRef={imageRef} />\n </div>\n </div>\n\n <div\n className={classNames(\n styles.paneViewport,\n isPannable && styles.paneViewportPannable,\n isPanning && styles.paneViewportPanning\n )}\n ref={viewportRef}\n {...panHandlers}\n >\n <div\n className={styles.paneZoomBox}\n style={{ '--attachment-zoom': zoom } as CSSProperties}\n data-testid=\"attachment-preview-zoom-box\"\n >\n {kind === 'image' && (\n <AttachmentImage\n ref={imageRef}\n src={item.src}\n alt={fileName}\n className={styles.paneMedia}\n draggable={false}\n />\n )}\n\n {kind === 'video' && (\n // eslint-disable-next-line jsx-a11y/media-has-caption\n <video src={item.src} className={styles.paneMedia} controls autoPlay playsInline />\n )}\n\n {/* Keyed: a kept-alive instance would pair the previous file's data with the new\n renderer for one render. */}\n {kind === 'file' && <AttachmentDocument key={item.id} item={item} />}\n </div>\n </div>\n\n {isMedia && (\n <div className={styles.paneZoomControls}>\n {/* A disabled button fires no events, so the tooltip listens on a wrapper instead. */}\n <Tooltip title=\"Zoom in\" placement=\"left\">\n <span className={styles.paneZoomButton}>\n <ButtonIcon\n size=\"small\"\n type=\"tertiaryBg\"\n ariaLabel=\"Zoom in\"\n disabled={!canZoomIn}\n onClick={zoomIn}\n testId=\"attachment-preview-zoom-in\"\n >\n <PlusIcon />\n </ButtonIcon>\n </span>\n </Tooltip>\n\n <Tooltip title=\"Zoom out\" placement=\"left\">\n <span className={styles.paneZoomButton}>\n <ButtonIcon\n size=\"small\"\n type=\"tertiaryBg\"\n ariaLabel=\"Zoom out\"\n disabled={!canZoomOut}\n onClick={zoomOut}\n testId=\"attachment-preview-zoom-out\"\n >\n <MinusIcon />\n </ButtonIcon>\n </span>\n </Tooltip>\n </div>\n )}\n </div>\n );\n};\n"],"names":["AttachmentPreviewPane","_ref","_item$kind","item","onShare","imageRef","useRef","kind","isMedia","_useZoomPan","useZoomPan","canZoom","canPan","resetKey","id","viewportRef","zoom","zoomIn","zoomOut","canZoomIn","canZoomOut","isPannable","isPanning","panHandlers","fileName","utils","getFileNameWithExtensionFromPath","name","downloadUrl","src","_jsxs","className","styles","pane","children","paneHeader","paneName","_jsx","paneFileName","title","undefined","size","paneFileSize","formatFileSize","paneActions","AttachmentDownloadLink","url","paneActionLink","testId","AttachmentActionsMenu","_objectSpread","classNames","paneViewport","paneViewportPannable","paneViewportPanning","ref","paneZoomBox","style","AttachmentImage","alt","paneMedia","draggable","controls","autoPlay","playsInline","AttachmentDocument","paneZoomControls","Tooltip","placement","paneZoomButton","ButtonIcon","type","ariaLabel","disabled","onClick","PlusIcon","MinusIcon"],"mappings":"g/JA0BaA,IAAAA,EAAwB,SAAmDC,GAAA,IAAAC,EAAhDC,IAAAA,KAAMC,IAAAA,QACtCC,EAAWC,EAAyB,MACpCC,UAAOJ,EAAAA,EAAKI,oBAAQ,OACpBC,EAAmB,UAATD,GAA6B,UAATA,EAEpCE,EAWIC,EAAW,CAAEC,QAASH,EAASI,OAAiB,UAATL,EAAkBM,SAAUV,EAAKW,KAV1EC,IAAAA,YACAC,IAAAA,KACAC,IAAAA,OACAC,IAAAA,QACAC,IAAAA,UACAC,IAAAA,WACAC,IAAAA,WACAC,IAAAA,UACAC,IAAAA,YAIIC,EAAWC,EAAMC,iCAAiCvB,EAAKwB,MACvDC,EAAczB,EAAKyB,aAAezB,EAAK0B,IAE7C,OACEC,EAAA,MAAA,CAAKC,UAAWC,EAAOC,KAAM,cAAY,0BAAyBC,SAChE,CAAAJ,EAAA,MAAA,CAAKC,UAAWC,EAAOG,WAAWD,SAChC,CAAAJ,EAAA,MAAA,CAAKC,UAAWC,EAAOI,SAASF,SAC9B,CAAAG,EAAA,MAAA,CAAKN,UAAWC,EAAOM,aAAcC,MAAOf,EAASU,SAClDV,SAEYgB,IAAdrC,EAAKsC,MACJJ,EAAA,MAAA,CAAKN,UAAWC,EAAOU,aAAaR,SAAES,EAAexC,EAAKsC,WAI9DX,EAAA,MAAA,CAAKC,UAAWC,EAAOY,YAAYV,SAAA,GAC9BN,GACDS,EAACQ,EAAsB,CACrBC,IAAKlB,EACLJ,SAAUA,EACVO,UAAWC,EAAOe,eAClBC,OAAO,gCAIXX,EAACY,EAAqB,CAAC9C,KAAMA,EAAMC,QAASA,EAASC,SAAUA,UAInEgC,EAAA,MAAAa,EAAAA,EAAA,CACEnB,UAAWoB,EACTnB,EAAOoB,aACP/B,GAAcW,EAAOqB,qBACrB/B,GAAaU,EAAOsB,qBAEtBC,IAAKxC,GACDQ,GAAW,GAAA,CAAAW,SAEfJ,EAAA,MAAA,CACEC,UAAWC,EAAOwB,YAClBC,MAAO,CAAE,oBAAqBzC,GAC9B,cAAY,8BAA6BkB,SAAA,CAE/B,UAAT3B,GACC8B,EAACqB,EAAe,CACdH,IAAKlD,EACLwB,IAAK1B,EAAK0B,IACV8B,IAAKnC,EACLO,UAAWC,EAAO4B,UAClBC,WAAW,IAIL,UAATtD,GAEC8B,EAAA,QAAA,CAAOR,IAAK1B,EAAK0B,IAAKE,UAAWC,EAAO4B,UAAWE,UAAQ,EAACC,UAAQ,EAACC,aAAW,IAKxE,SAATzD,GAAmB8B,EAAC4B,EAAkB,CAAe9D,KAAMA,GAAfA,EAAKW,UAIrDN,GACCsB,EAAA,MAAA,CAAKC,UAAWC,EAAOkC,iBAAiBhC,SAAA,CAEtCG,EAAC8B,EAAO,CAAC5B,MAAM,UAAU6B,UAAU,OAAMlC,SACvCG,EAAA,OAAA,CAAMN,UAAWC,EAAOqC,eAAenC,SACrCG,EAACiC,EAAU,CACT7B,KAAK,QACL8B,KAAK,aACLC,UAAU,UACVC,UAAWtD,EACXuD,QAASzD,EACT+B,OAAO,6BAA4Bd,SAEnCG,EAACsC,EAAQ,UAKftC,EAAC8B,EAAO,CAAC5B,MAAM,WAAW6B,UAAU,OAAMlC,SACxCG,EAAA,OAAA,CAAMN,UAAWC,EAAOqC,eAAenC,SACrCG,EAACiC,EAAU,CACT7B,KAAK,QACL8B,KAAK,aACLC,UAAU,WACVC,UAAWrD,EACXsD,QAASxD,EACT8B,OAAO,8BAA6Bd,SAEpCG,EAACuC,EAAS,eAQ1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AttachmentDocument.test.d.ts","sourceRoot":"","sources":["../../../../src/components/AttachmentLightbox/__tests__/AttachmentDocument.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AttachmentLightbox.test.d.ts","sourceRoot":"","sources":["../../../../src/components/AttachmentLightbox/__tests__/AttachmentLightbox.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copyImageToClipboard.test.d.ts","sourceRoot":"","sources":["../../../../src/components/AttachmentLightbox/__tests__/copyImageToClipboard.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"downloadAttachment.test.d.ts","sourceRoot":"","sources":["../../../../src/components/AttachmentLightbox/__tests__/downloadAttachment.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useZoomPan.test.d.ts","sourceRoot":"","sources":["../../../../src/components/AttachmentLightbox/__tests__/useZoomPan.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const getCanCopyImages: () => boolean;
|
|
2
|
+
/** Copies the pixels already on screen when the page may read them, else fetches the bytes. */
|
|
3
|
+
export declare const copyImageToClipboard: (src: string, image?: HTMLImageElement | null) => Promise<boolean>;
|
|
4
|
+
//# sourceMappingURL=copyImageToClipboard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copyImageToClipboard.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentLightbox/copyImageToClipboard.ts"],"names":[],"mappings":"AA0CA,eAAO,MAAM,gBAAgB,eACyC,CAAC;AAQvE,+FAA+F;AAC/F,eAAO,MAAM,oBAAoB,QAC1B,MAAM,UACH,gBAAgB,GAAG,IAAI,KAC9B,OAAO,CAAC,OAAO,CAsBjB,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import r from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/regenerator";import{fetchAttachment as e}from"../../utils/fetchAttachment.js";var n=function(r,t,e){var n=document.createElement("canvas");n.width=t,n.height=e;var a=n.getContext("2d");if(!a)throw new Error("Could not get a 2d canvas context");return a.drawImage(r,0,0),new Promise((function(r,t){n.toBlob((function(e){return e?r(e):t(new Error("Could not encode the image"))}),"image/png")}))},a=function(){var e=r(t.mark((function r(e){var a;return t.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,createImageBitmap(e);case 2:return a=r.sent,r.abrupt("return",n(a,a.width,a.height));case 4:case"end":return r.stop()}}),r)})));return function(r){return e.apply(this,arguments)}}(),u=function(){var e=r(t.mark((function r(e){return t.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",n(e,e.naturalWidth,e.naturalHeight));case 1:case"end":return r.stop()}}),r)})));return function(r){return e.apply(this,arguments)}}(),o=function(){var n=r(t.mark((function r(n){var u,o;return t.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,e(n);case 2:if((u=r.sent).ok){r.next=5;break}throw new Error("Could not read the image (".concat(u.status,")"));case 5:return r.next=7,u.blob();case 7:return o=r.sent,r.abrupt("return","image/png"===o.type?o:a(o));case 9:case"end":return r.stop()}}),r)})));return function(r){return n.apply(this,arguments)}}(),c=function(){var r;return"undefined"!=typeof ClipboardItem&&!(null===(r=navigator.clipboard)||void 0===r||!r.write)},i=function(r){return navigator.clipboard.write([new ClipboardItem({"image/png":r})])},p=function(r){return!(null==r||!r.complete||!r.naturalWidth)},s=function(){var e=r(t.mark((function r(e,n){return t.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(c()){r.next=2;break}return r.abrupt("return",!1);case 2:if(!p(n)){r.next=11;break}return r.prev=3,r.next=6,i(u(n));case 6:return r.abrupt("return",!0);case 9:r.prev=9,r.t0=r.catch(3);case 11:if(e){r.next=13;break}return r.abrupt("return",!1);case 13:return r.prev=13,r.next=16,i(o(e));case 16:return r.abrupt("return",!0);case 19:return r.prev=19,r.t1=r.catch(13),console.error('Failed to copy attachment "'.concat(e,'" to the clipboard'),r.t1),r.abrupt("return",!1);case 23:case"end":return r.stop()}}),r,null,[[3,9],[13,19]])})));return function(r,t){return e.apply(this,arguments)}}();export{s as copyImageToClipboard,c as getCanCopyImages};
|
|
2
|
+
//# sourceMappingURL=copyImageToClipboard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copyImageToClipboard.js","sources":["../../../src/components/AttachmentLightbox/copyImageToClipboard.ts"],"sourcesContent":["import { fetchAttachment } from '~/utils/fetchAttachment';\n\nconst toPng = (source: CanvasImageSource, width: number, height: number): Promise<Blob> => {\n const canvas = document.createElement('canvas');\n canvas.width = width;\n canvas.height = height;\n\n const context = canvas.getContext('2d');\n\n if (!context) throw new Error('Could not get a 2d canvas context');\n\n context.drawImage(source, 0, 0);\n\n return new Promise((resolve, reject) => {\n // Throws for an image the page was not allowed to read, which is the tainted-canvas signal.\n canvas.toBlob(\n encoded => (encoded ? resolve(encoded) : reject(new Error('Could not encode the image'))),\n 'image/png'\n );\n });\n};\n\nconst encodeAsPng = async (blob: Blob): Promise<Blob> => {\n const bitmap = await createImageBitmap(blob);\n\n return toPng(bitmap, bitmap.width, bitmap.height);\n};\n\nconst pngFromElement = async (image: HTMLImageElement): Promise<Blob> =>\n toPng(image, image.naturalWidth, image.naturalHeight);\n\n// Chrome only accepts PNG on the clipboard, so anything else is re-encoded.\nconst fetchAsPng = async (src: string): Promise<Blob> => {\n const response = await fetchAttachment(src);\n\n if (!response.ok) throw new Error(`Could not read the image (${response.status})`);\n\n const blob = await response.blob();\n\n return blob.type === 'image/png' ? blob : encodeAsPng(blob);\n};\n\nexport const getCanCopyImages = () =>\n typeof ClipboardItem !== 'undefined' && !!navigator.clipboard?.write;\n\nconst write = (png: Promise<Blob>) =>\n // A promise, not an awaited blob: Safari requires the write inside the user gesture.\n navigator.clipboard.write([new ClipboardItem({ 'image/png': png })]);\n\nconst isReady = (image?: HTMLImageElement | null) => !!image?.complete && !!image.naturalWidth;\n\n/** Copies the pixels already on screen when the page may read them, else fetches the bytes. */\nexport const copyImageToClipboard = async (\n src: string,\n image?: HTMLImageElement | null\n): Promise<boolean> => {\n if (!getCanCopyImages()) return false;\n\n if (isReady(image)) {\n try {\n await write(pngFromElement(image as HTMLImageElement));\n\n return true;\n } catch {}\n }\n\n if (!src) return false;\n\n try {\n await write(fetchAsPng(src));\n\n return true;\n } catch (error) {\n console.error(`Failed to copy attachment \"${src}\" to the clipboard`, error);\n\n return false;\n }\n};\n"],"names":["toPng","source","width","height","canvas","document","createElement","context","getContext","Error","drawImage","Promise","resolve","reject","toBlob","encoded","encodeAsPng","_ref","_asyncToGenerator","_regeneratorRuntime","mark","blob","bitmap","wrap","_context","prev","next","createImageBitmap","sent","stop","_callee","_x","apply","this","arguments","pngFromElement","_ref2","image","_context2","naturalWidth","naturalHeight","_callee2","_x2","fetchAsPng","_ref3","src","response","_context3","fetchAttachment","ok","concat","status","type","_callee3","_x3","getCanCopyImages","_navigator$clipboard","ClipboardItem","navigator","clipboard","write","png","isReady","complete","copyImageToClipboard","_ref4","_callee4","_context4","abrupt","t0","t1","console","error","_x4","_x5"],"mappings":"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"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `download` is ignored cross-origin, where a plain link navigates the app away instead. Fetching
|
|
3
|
+
* the bytes and handing the browser a blob url saves under the right name wherever the file lives.
|
|
4
|
+
*/
|
|
5
|
+
export declare const downloadAttachment: (url: string, fileName: string) => Promise<boolean>;
|
|
6
|
+
/** Stored data, not a literal: an unchecked `javascript:` url would run on open. */
|
|
7
|
+
export declare const openAttachmentInNewTab: (url: string) => void;
|
|
8
|
+
/** Saves the file, falling back to a tab when the bytes cannot be read. */
|
|
9
|
+
export declare const saveAttachment: (url: string, fileName: string) => Promise<void>;
|
|
10
|
+
//# sourceMappingURL=downloadAttachment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"downloadAttachment.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentLightbox/downloadAttachment.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,eAAO,MAAM,kBAAkB,QAAe,MAAM,YAAY,MAAM,KAAG,OAAO,CAAC,OAAO,CAwBvF,CAAC;AAIF,oFAAoF;AACpF,eAAO,MAAM,sBAAsB,QAAS,MAAM,KAAG,IAapD,CAAC;AAEF,2EAA2E;AAC3E,eAAO,MAAM,cAAc,QAAe,MAAM,YAAY,MAAM,KAAG,OAAO,CAAC,IAAI,CAEhF,CAAC"}
|