@corva/ui 3.71.0-9 → 3.72.0-0
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/AttachFileButton/AttachFileButton.js +1 -1
- package/cjs-bundle/components/AttachFileButton/AttachFileButton.js.map +1 -1
- 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 +2 -0
- package/cjs-bundle/components/AttachmentPreview/AttachmentRow.js.map +1 -0
- package/cjs-bundle/components/AttachmentPreview/AttachmentTile.js +2 -0
- package/cjs-bundle/components/AttachmentPreview/AttachmentTile.js.map +1 -0
- package/cjs-bundle/components/AttachmentPreview/SortableAttachments.js +2 -0
- package/cjs-bundle/components/AttachmentPreview/SortableAttachments.js.map +1 -0
- package/cjs-bundle/components/AttachmentPreview/StoredAttachmentPreview.js +1 -1
- package/cjs-bundle/components/AttachmentPreview/StoredAttachmentPreview.js.map +1 -1
- package/cjs-bundle/components/AttachmentPreview/useStoredAttachments.js +2 -0
- package/cjs-bundle/components/AttachmentPreview/useStoredAttachments.js.map +1 -0
- 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/CommentCardReplies.js +1 -1
- package/cjs-bundle/components/CommentCard/CommentCardReplies.js.map +1 -1
- package/cjs-bundle/components/CommentCard/buildCommentReply.js +1 -1
- package/cjs-bundle/components/CommentCard/buildCommentReply.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/CommentInputNext.scss.js +1 -1
- package/cjs-bundle/components/CommentInputNext/useFileDrop.js +2 -0
- package/cjs-bundle/components/CommentInputNext/useFileDrop.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/FeedCard/useActivityInteractions.js +1 -1
- package/cjs-bundle/components/FeedCard/useActivityInteractions.js.map +1 -1
- package/cjs-bundle/components/FeedCard/useFeedActivity.js +1 -1
- package/cjs-bundle/components/FeedCard/useFeedActivity.js.map +1 -1
- package/cjs-bundle/components/IconMenu/index.js +1 -1
- package/cjs-bundle/components/IconMenu/index.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/index.js +1 -1
- package/cjs-bundle/componentsV2/AppContainer/AppContainer.scss.js +1 -1
- package/cjs-bundle/componentsV2/AppHeader/V3/Actions/Actions.scss.js +1 -1
- package/cjs-bundle/componentsV2/AppHeader/V3/AppTitle/AppTitle.js +1 -1
- package/cjs-bundle/componentsV2/AppHeader/V3/AppTitle/AppTitle.js.map +1 -1
- package/cjs-bundle/componentsV2/AppHeader/V3/AppTitle/AppTitle.scss.js +1 -1
- package/cjs-bundle/componentsV2/Autocomplete/Autocomplete.js +1 -1
- package/cjs-bundle/componentsV2/Autocomplete/Autocomplete.js.map +1 -1
- package/cjs-bundle/componentsV2/Autocomplete/Autocomplete.scss.js +1 -1
- package/cjs-bundle/componentsV2/Autocomplete/AutocompleteMenuItem.js +1 -1
- package/cjs-bundle/componentsV2/Autocomplete/AutocompleteMenuItem.js.map +1 -1
- package/cjs-bundle/componentsV2/Checkbox/Checkbox.js +1 -1
- package/cjs-bundle/componentsV2/Checkbox/Checkbox.js.map +1 -1
- package/cjs-bundle/componentsV2/ColorPicker/ColorPicker.scss.js +1 -1
- package/cjs-bundle/componentsV2/Menu/Menu.scss.js +1 -1
- package/cjs-bundle/componentsV2/Menu/MenuDivider/MenuDivider.scss.js +1 -1
- package/cjs-bundle/componentsV2/Menu/MenuGroup/MenuGroup.js +1 -1
- package/cjs-bundle/componentsV2/Menu/MenuGroup/MenuGroup.js.map +1 -1
- package/cjs-bundle/componentsV2/Menu/MenuGroup/MenuGroup.scss.js +1 -1
- package/cjs-bundle/componentsV2/Menu/MenuItem/MenuItem.js +1 -1
- package/cjs-bundle/componentsV2/Menu/MenuItem/MenuItem.js.map +1 -1
- package/cjs-bundle/componentsV2/Menu/MenuItem/MenuItem.scss.js +1 -1
- package/cjs-bundle/componentsV2/PadModeSelect/PadModeSelect.scss.js +1 -1
- package/cjs-bundle/componentsV2/Paper/Paper.js +1 -1
- package/cjs-bundle/componentsV2/Paper/Paper.js.map +1 -1
- package/cjs-bundle/componentsV2/Paper/Paper.scss.js +1 -1
- package/cjs-bundle/componentsV2/Popover/Popover.js +1 -1
- package/cjs-bundle/componentsV2/Popover/Popover.js.map +1 -1
- package/cjs-bundle/componentsV2/Radio/Radio.js +1 -1
- package/cjs-bundle/componentsV2/Radio/Radio.js.map +1 -1
- package/cjs-bundle/componentsV2/RadioAndCheckboxIcons/CheckboxIcon.js +2 -0
- package/cjs-bundle/componentsV2/RadioAndCheckboxIcons/CheckboxIcon.js.map +1 -0
- package/cjs-bundle/componentsV2/RadioAndCheckboxIcons/CheckboxIcon.scss.js +2 -0
- package/cjs-bundle/componentsV2/RadioAndCheckboxIcons/CheckboxIcon.scss.js.map +1 -0
- package/cjs-bundle/componentsV2/RadioAndCheckboxIcons/RadioIcon.js +2 -0
- package/cjs-bundle/componentsV2/RadioAndCheckboxIcons/RadioIcon.js.map +1 -0
- package/cjs-bundle/componentsV2/RadioAndCheckboxIcons/RadioIcon.scss.js +2 -0
- package/cjs-bundle/componentsV2/RadioAndCheckboxIcons/RadioIcon.scss.js.map +1 -0
- package/cjs-bundle/componentsV2/RadioAndCheckboxLabel/RadioAndCheckboxLabel.scss.js +1 -1
- package/cjs-bundle/componentsV2/Tabs/Tabs.js +1 -1
- package/cjs-bundle/componentsV2/Tabs/Tabs.js.map +1 -1
- package/cjs-bundle/componentsV2/Tabs/Tabs.scss.js +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/ShareModal/ShareModal.js +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/ShareModal/ShareModal.js.map +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/ShareModal/ShareModal.scss.js +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/TemplatesTreeMenuHeader/TemplatesTreeMenuHeader.scss.js +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/Toggle/Toggle.scss.js +1 -1
- package/cjs-bundle/config/theme/checkboxOverrides.js +1 -1
- package/cjs-bundle/config/theme/checkboxOverrides.js.map +1 -1
- package/cjs-bundle/config/theme/index.js +1 -1
- package/cjs-bundle/config/theme/index.js.map +1 -1
- package/cjs-bundle/config/theme/radioOverrides.js +1 -1
- package/cjs-bundle/config/theme/radioOverrides.js.map +1 -1
- package/cjs-bundle/constants/attachments.js +2 -0
- package/cjs-bundle/constants/attachments.js.map +1 -0
- package/cjs-bundle/constants/index.js +1 -1
- 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/AttachFileButton/AttachFileButton.d.ts +2 -1
- package/components/AttachFileButton/AttachFileButton.d.ts.map +1 -1
- package/components/AttachFileButton/AttachFileButton.js +1 -1
- package/components/AttachFileButton/AttachFileButton.js.map +1 -1
- package/components/AttachmentPreview/AttachmentPreview.d.ts +4 -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 +2 -0
- package/components/AttachmentPreview/AttachmentPreview.types.d.ts.map +1 -1
- package/components/AttachmentPreview/AttachmentRow.d.ts +5 -0
- package/components/AttachmentPreview/AttachmentRow.d.ts.map +1 -0
- package/components/AttachmentPreview/AttachmentRow.js +2 -0
- package/components/AttachmentPreview/AttachmentRow.js.map +1 -0
- package/components/AttachmentPreview/AttachmentTile.d.ts +9 -0
- package/components/AttachmentPreview/AttachmentTile.d.ts.map +1 -0
- package/components/AttachmentPreview/AttachmentTile.js +2 -0
- package/components/AttachmentPreview/AttachmentTile.js.map +1 -0
- package/components/AttachmentPreview/SortableAttachments.d.ts +8 -0
- package/components/AttachmentPreview/SortableAttachments.d.ts.map +1 -0
- package/components/AttachmentPreview/SortableAttachments.js +2 -0
- package/components/AttachmentPreview/SortableAttachments.js.map +1 -0
- package/components/AttachmentPreview/StoredAttachmentPreview.d.ts +3 -3
- package/components/AttachmentPreview/StoredAttachmentPreview.d.ts.map +1 -1
- package/components/AttachmentPreview/StoredAttachmentPreview.js +1 -1
- package/components/AttachmentPreview/StoredAttachmentPreview.js.map +1 -1
- package/components/AttachmentPreview/index.d.ts +3 -0
- package/components/AttachmentPreview/index.d.ts.map +1 -1
- package/components/AttachmentPreview/useStoredAttachments.d.ts +8 -0
- package/components/AttachmentPreview/useStoredAttachments.d.ts.map +1 -0
- package/components/AttachmentPreview/useStoredAttachments.js +2 -0
- package/components/AttachmentPreview/useStoredAttachments.js.map +1 -0
- 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 +5 -1
- package/components/CommentCard/CommentCard.types.d.ts.map +1 -1
- package/components/CommentCard/CommentCardReplies.js +1 -1
- package/components/CommentCard/CommentCardReplies.js.map +1 -1
- package/components/CommentCard/__tests__/buildCommentReply.test.d.ts +2 -0
- package/components/CommentCard/__tests__/buildCommentReply.test.d.ts.map +1 -0
- package/components/CommentCard/buildCommentReply.d.ts +15 -7
- package/components/CommentCard/buildCommentReply.d.ts.map +1 -1
- package/components/CommentCard/buildCommentReply.js +1 -1
- package/components/CommentCard/buildCommentReply.js.map +1 -1
- package/components/CommentComposer/CommentComposer.d.ts +8 -3
- 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 +6 -2
- 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/useAttachmentUpload.d.ts +15 -6
- 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 +6 -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/CommentInputNext.scss.js +1 -1
- package/components/CommentInputNext/useFileDrop.d.ts +17 -0
- package/components/CommentInputNext/useFileDrop.d.ts.map +1 -0
- package/components/CommentInputNext/useFileDrop.js +2 -0
- package/components/CommentInputNext/useFileDrop.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/FeedCard/useActivityInteractions.d.ts +9 -2
- package/components/FeedCard/useActivityInteractions.d.ts.map +1 -1
- package/components/FeedCard/useActivityInteractions.js +1 -1
- package/components/FeedCard/useActivityInteractions.js.map +1 -1
- package/components/FeedCard/useFeedActivity.d.ts.map +1 -1
- package/components/FeedCard/useFeedActivity.js +1 -1
- package/components/FeedCard/useFeedActivity.js.map +1 -1
- package/components/IconMenu/index.d.ts +1 -1
- package/components/IconMenu/index.js +1 -1
- package/components/IconMenu/index.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/index.d.ts +2 -0
- package/components/index.d.ts.map +1 -1
- package/components/index.js +1 -1
- package/componentsV2/AppContainer/AppContainer.scss.js +1 -1
- package/componentsV2/AppHeader/V3/Actions/Actions.scss.js +1 -1
- package/componentsV2/AppHeader/V3/AppTitle/AppTitle.d.ts.map +1 -1
- package/componentsV2/AppHeader/V3/AppTitle/AppTitle.js +1 -1
- package/componentsV2/AppHeader/V3/AppTitle/AppTitle.js.map +1 -1
- package/componentsV2/AppHeader/V3/AppTitle/AppTitle.scss.js +1 -1
- package/componentsV2/Autocomplete/Autocomplete.d.ts +5 -1
- package/componentsV2/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/componentsV2/Autocomplete/Autocomplete.js +1 -1
- package/componentsV2/Autocomplete/Autocomplete.js.map +1 -1
- package/componentsV2/Autocomplete/Autocomplete.scss.js +1 -1
- package/componentsV2/Autocomplete/AutocompleteMenuItem.d.ts +7 -3
- package/componentsV2/Autocomplete/AutocompleteMenuItem.d.ts.map +1 -1
- package/componentsV2/Autocomplete/AutocompleteMenuItem.js +1 -1
- package/componentsV2/Autocomplete/AutocompleteMenuItem.js.map +1 -1
- package/componentsV2/Autocomplete/AutocompleteNext.stories.d.ts.map +1 -1
- package/componentsV2/Checkbox/Checkbox.d.ts.map +1 -1
- package/componentsV2/Checkbox/Checkbox.js +1 -1
- package/componentsV2/Checkbox/Checkbox.js.map +1 -1
- package/componentsV2/ColorPicker/ColorPicker.scss.js +1 -1
- package/componentsV2/Menu/Menu.scss.js +1 -1
- package/componentsV2/Menu/Menu.stories.d.ts +1 -0
- package/componentsV2/Menu/Menu.stories.d.ts.map +1 -1
- package/componentsV2/Menu/MenuDivider/MenuDivider.scss.js +1 -1
- package/componentsV2/Menu/MenuGroup/MenuGroup.js +1 -1
- package/componentsV2/Menu/MenuGroup/MenuGroup.js.map +1 -1
- package/componentsV2/Menu/MenuGroup/MenuGroup.scss.js +1 -1
- package/componentsV2/Menu/MenuItem/MenuItem.d.ts +2 -0
- package/componentsV2/Menu/MenuItem/MenuItem.d.ts.map +1 -1
- package/componentsV2/Menu/MenuItem/MenuItem.js +1 -1
- package/componentsV2/Menu/MenuItem/MenuItem.js.map +1 -1
- package/componentsV2/Menu/MenuItem/MenuItem.scss.js +1 -1
- package/componentsV2/PadModeSelect/PadModeSelect.scss.js +1 -1
- package/componentsV2/Paper/Paper.d.ts.map +1 -1
- package/componentsV2/Paper/Paper.js +1 -1
- package/componentsV2/Paper/Paper.js.map +1 -1
- package/componentsV2/Paper/Paper.scss.js +1 -1
- package/componentsV2/Popover/Popover.d.ts.map +1 -1
- package/componentsV2/Popover/Popover.js +1 -1
- package/componentsV2/Popover/Popover.js.map +1 -1
- package/componentsV2/Radio/Radio.d.ts.map +1 -1
- package/componentsV2/Radio/Radio.js +1 -1
- package/componentsV2/Radio/Radio.js.map +1 -1
- package/componentsV2/RadioAndCheckboxIcons/CheckboxIcon.d.ts +5 -0
- package/componentsV2/RadioAndCheckboxIcons/CheckboxIcon.d.ts.map +1 -0
- package/componentsV2/RadioAndCheckboxIcons/CheckboxIcon.js +2 -0
- package/componentsV2/RadioAndCheckboxIcons/CheckboxIcon.js.map +1 -0
- package/componentsV2/RadioAndCheckboxIcons/CheckboxIcon.scss.js +2 -0
- package/componentsV2/RadioAndCheckboxIcons/CheckboxIcon.scss.js.map +1 -0
- package/componentsV2/RadioAndCheckboxIcons/RadioIcon.d.ts +2 -0
- package/componentsV2/RadioAndCheckboxIcons/RadioIcon.d.ts.map +1 -0
- package/componentsV2/RadioAndCheckboxIcons/RadioIcon.js +2 -0
- package/componentsV2/RadioAndCheckboxIcons/RadioIcon.js.map +1 -0
- package/componentsV2/RadioAndCheckboxIcons/RadioIcon.scss.js +2 -0
- package/componentsV2/RadioAndCheckboxIcons/RadioIcon.scss.js.map +1 -0
- package/componentsV2/RadioAndCheckboxIcons/index.d.ts +3 -0
- package/componentsV2/RadioAndCheckboxIcons/index.d.ts.map +1 -0
- package/componentsV2/RadioAndCheckboxLabel/RadioAndCheckboxLabel.scss.js +1 -1
- package/componentsV2/Tabs/Tabs.d.ts +1 -0
- package/componentsV2/Tabs/Tabs.d.ts.map +1 -1
- package/componentsV2/Tabs/Tabs.js +1 -1
- package/componentsV2/Tabs/Tabs.js.map +1 -1
- package/componentsV2/Tabs/Tabs.scss.js +1 -1
- package/componentsV2/Tabs/Tabs.stories.d.ts +1 -1
- package/componentsV2/Tabs/Tabs.stories.d.ts.map +1 -1
- package/componentsV2/TemplatesControl/ShareModal/ShareModal.d.ts.map +1 -1
- package/componentsV2/TemplatesControl/ShareModal/ShareModal.js +1 -1
- package/componentsV2/TemplatesControl/ShareModal/ShareModal.js.map +1 -1
- package/componentsV2/TemplatesControl/ShareModal/ShareModal.scss.js +1 -1
- package/componentsV2/TemplatesControl/TemplatesTreeMenuHeader/TemplatesTreeMenuHeader.scss.js +1 -1
- package/componentsV2/TemplatesControl/Toggle/Toggle.scss.js +1 -1
- package/config/theme/checkboxOverrides.d.ts +0 -9
- package/config/theme/checkboxOverrides.d.ts.map +1 -1
- package/config/theme/checkboxOverrides.js +1 -1
- package/config/theme/checkboxOverrides.js.map +1 -1
- package/config/theme/index.d.ts.map +1 -1
- package/config/theme/index.js +1 -1
- package/config/theme/index.js.map +1 -1
- package/config/theme/radioOverrides.d.ts +3 -15
- package/config/theme/radioOverrides.d.ts.map +1 -1
- package/config/theme/radioOverrides.js +1 -1
- package/config/theme/radioOverrides.js.map +1 -1
- package/constants/attachments.d.ts +2 -0
- package/constants/attachments.d.ts.map +1 -0
- package/constants/attachments.js +2 -0
- package/constants/attachments.js.map +1 -0
- package/constants/index.d.ts +2 -1
- package/constants/index.d.ts.map +1 -1
- package/constants/index.js +1 -1
- package/mcp-server/server.mjs +79 -11
- package/package.json +5 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/cjs-bundle/components/AttachmentPreview/useStoredAttachment.js +0 -2
- package/cjs-bundle/components/AttachmentPreview/useStoredAttachment.js.map +0 -1
- package/components/AttachmentPreview/useStoredAttachment.js +0 -2
- package/components/AttachmentPreview/useStoredAttachment.js.map +0 -1
|
@@ -7,7 +7,8 @@ export type AttachFileButtonProps = {
|
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
tooltip?: string;
|
|
9
9
|
accept?: string;
|
|
10
|
+
multiple?: boolean;
|
|
10
11
|
testId?: string;
|
|
11
12
|
};
|
|
12
|
-
export declare const AttachFileButton: ({ inputRef, onClick, onFileSelect, disabled, tooltip, accept, testId, }: AttachFileButtonProps) => JSX.Element;
|
|
13
|
+
export declare const AttachFileButton: ({ inputRef, onClick, onFileSelect, disabled, tooltip, accept, multiple, testId, }: AttachFileButtonProps) => JSX.Element;
|
|
13
14
|
//# sourceMappingURL=AttachFileButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttachFileButton.d.ts","sourceRoot":"","sources":["../../../src/components/AttachFileButton/AttachFileButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAQ/C,eAAO,MAAM,yBAAyB,sFAC+C,CAAC;AAEtF,MAAM,MAAM,qBAAqB,GAAG;IAClC,QAAQ,EAAE,SAAS,CAAC,gBAAgB,CAAC,CAAC;IACtC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,YAAY,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAC7D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAGF,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"AttachFileButton.d.ts","sourceRoot":"","sources":["../../../src/components/AttachFileButton/AttachFileButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAQ/C,eAAO,MAAM,yBAAyB,sFAC+C,CAAC;AAEtF,MAAM,MAAM,qBAAqB,GAAG;IAClC,QAAQ,EAAE,SAAS,CAAC,gBAAgB,CAAC,CAAC;IACtC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,YAAY,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAC7D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAGF,eAAO,MAAM,gBAAgB,sFAS1B,qBAAqB,gBAkBvB,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{ButtonIcon as o}from"../../componentsV2/ButtonIcon/ButtonIcon.js";import{Tooltip as s}from"../../componentsV2/Tooltip/Tooltip.js";import{PaperclipIcon as c}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 i from"./AttachFileButton.scss.js";import{jsxs as n,Fragment as t,jsx as m}from"react/jsx-runtime";var r="image/*,video/*,audio/*,.pdf,.doc,.docx,.xlsx,.xls,.ppt,.pptx,.txt,.csv,.zip,.rar",p=function(p){var e=p.inputRef,u=p.onClick,I=p.onFileSelect,j=p.disabled,
|
|
1
|
+
import{ButtonIcon as o}from"../../componentsV2/ButtonIcon/ButtonIcon.js";import{Tooltip as s}from"../../componentsV2/Tooltip/Tooltip.js";import{PaperclipIcon as c}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 i from"./AttachFileButton.scss.js";import{jsxs as n,Fragment as t,jsx as m}from"react/jsx-runtime";var r="image/*,video/*,audio/*,.pdf,.doc,.docx,.xlsx,.xls,.ppt,.pptx,.txt,.csv,.zip,.rar",p=function(p){var e=p.inputRef,u=p.onClick,I=p.onFileSelect,j=p.disabled,l=p.tooltip,a=void 0===l?"Attach file":l,d=p.accept,C=void 0===d?r:d,h=p.multiple,F=p.testId,v=void 0===F?"attach-file-button":F;return n(t,{children:[m("input",{ref:e,type:"file",accept:C,multiple:h,className:i.input,onChange:I}),m(s,{title:a,children:m("span",{className:i.trigger,children:m(o,{size:"xs",type:"tertiary",disabled:j,onClick:u,testId:v,children:m(c,{size:16})})})})]})};export{r as ACCEPTED_ATTACHMENT_TYPES,p as AttachFileButton};
|
|
2
2
|
//# sourceMappingURL=AttachFileButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttachFileButton.js","sources":["../../../src/components/AttachFileButton/AttachFileButton.tsx"],"sourcesContent":["import { ChangeEvent, RefObject } from 'react';\n\nimport { ButtonIcon } from '../../componentsV2/ButtonIcon';\nimport { Tooltip } from '../../componentsV2/Tooltip';\nimport { PaperclipIcon } from '../../icons';\n\nimport styles from './AttachFileButton.scss';\n\nexport const ACCEPTED_ATTACHMENT_TYPES =\n 'image/*,video/*,audio/*,.pdf,.doc,.docx,.xlsx,.xls,.ppt,.pptx,.txt,.csv,.zip,.rar';\n\nexport type AttachFileButtonProps = {\n inputRef: RefObject<HTMLInputElement>;\n onClick: () => void;\n onFileSelect: (event: ChangeEvent<HTMLInputElement>) => void;\n disabled?: boolean;\n tooltip?: string;\n accept?: string;\n testId?: string;\n};\n\n// Unlike FileUploadIconButton, this one stays put while an upload runs.\nexport const AttachFileButton = ({\n inputRef,\n onClick,\n onFileSelect,\n disabled,\n tooltip = 'Attach file',\n accept = ACCEPTED_ATTACHMENT_TYPES,\n testId = 'attach-file-button',\n}: AttachFileButtonProps) => (\n <>\n <input\n ref={inputRef}\n type=\"file\"\n accept={accept}\n className={styles.input}\n onChange={onFileSelect}\n />\n <Tooltip title={tooltip}>\n <span className={styles.trigger}>\n <ButtonIcon size=\"xs\" type=\"tertiary\" disabled={disabled} onClick={onClick} testId={testId}>\n <PaperclipIcon size={16} />\n </ButtonIcon>\n </span>\n </Tooltip>\n </>\n);\n"],"names":["ACCEPTED_ATTACHMENT_TYPES","AttachFileButton","_ref","inputRef","onClick","onFileSelect","disabled","_ref$tooltip","tooltip","_ref$accept","accept","_ref$testId","testId","_jsxs","_Fragment","children","_jsx","ref","type","className","styles","input","onChange","Tooltip","title","trigger","ButtonIcon","size","PaperclipIcon"],"mappings":"i4HAQO,IAAMA,EACX,
|
|
1
|
+
{"version":3,"file":"AttachFileButton.js","sources":["../../../src/components/AttachFileButton/AttachFileButton.tsx"],"sourcesContent":["import { ChangeEvent, RefObject } from 'react';\n\nimport { ButtonIcon } from '../../componentsV2/ButtonIcon';\nimport { Tooltip } from '../../componentsV2/Tooltip';\nimport { PaperclipIcon } from '../../icons';\n\nimport styles from './AttachFileButton.scss';\n\nexport const ACCEPTED_ATTACHMENT_TYPES =\n 'image/*,video/*,audio/*,.pdf,.doc,.docx,.xlsx,.xls,.ppt,.pptx,.txt,.csv,.zip,.rar';\n\nexport type AttachFileButtonProps = {\n inputRef: RefObject<HTMLInputElement>;\n onClick: () => void;\n onFileSelect: (event: ChangeEvent<HTMLInputElement>) => void;\n disabled?: boolean;\n tooltip?: string;\n accept?: string;\n multiple?: boolean;\n testId?: string;\n};\n\n// Unlike FileUploadIconButton, this one stays put while an upload runs.\nexport const AttachFileButton = ({\n inputRef,\n onClick,\n onFileSelect,\n disabled,\n tooltip = 'Attach file',\n accept = ACCEPTED_ATTACHMENT_TYPES,\n multiple,\n testId = 'attach-file-button',\n}: AttachFileButtonProps) => (\n <>\n <input\n ref={inputRef}\n type=\"file\"\n accept={accept}\n multiple={multiple}\n className={styles.input}\n onChange={onFileSelect}\n />\n <Tooltip title={tooltip}>\n <span className={styles.trigger}>\n <ButtonIcon size=\"xs\" type=\"tertiary\" disabled={disabled} onClick={onClick} testId={testId}>\n <PaperclipIcon size={16} />\n </ButtonIcon>\n </span>\n </Tooltip>\n </>\n);\n"],"names":["ACCEPTED_ATTACHMENT_TYPES","AttachFileButton","_ref","inputRef","onClick","onFileSelect","disabled","_ref$tooltip","tooltip","_ref$accept","accept","multiple","_ref$testId","testId","_jsxs","_Fragment","children","_jsx","ref","type","className","styles","input","onChange","Tooltip","title","trigger","ButtonIcon","size","PaperclipIcon"],"mappings":"i4HAQO,IAAMA,EACX,oFAcWC,EAAmB,SAAHC,GAAA,IAC3BC,IAAAA,SACAC,IAAAA,QACAC,IAAAA,aACAC,IAAAA,SAAQC,EAAAL,EACRM,QAAAA,aAAU,cAAaD,EAAAE,EAAAP,EACvBQ,OAAAA,aAASV,EAAyBS,EAClCE,IAAAA,SAAQC,EAAAV,EACRW,OAAAA,aAAS,qBAAoBD,EAAA,OAE7BE,EAAAC,EAAA,CAAAC,SACE,CAAAC,EAAA,QAAA,CACEC,IAAKf,EACLgB,KAAK,OACLT,OAAQA,EACRC,SAAUA,EACVS,UAAWC,EAAOC,MAClBC,SAAUlB,IAEZY,EAACO,EAAO,CAACC,MAAOjB,EAAQQ,SACtBC,EAAA,OAAA,CAAMG,UAAWC,EAAOK,QAAQV,SAC9BC,EAACU,EAAU,CAACC,KAAK,KAAKT,KAAK,WAAWb,SAAUA,EAAUF,QAASA,EAASS,OAAQA,EAAOG,SACzFC,EAACY,EAAa,CAACD,KAAM,aAI1B"}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import { AttachmentPreviewProps } from './AttachmentPreview.types';
|
|
2
|
+
/**
|
|
3
|
+
* Picks the strip that fits — reorderable or plain — and gives it a lightbox. Rendering lives in
|
|
4
|
+
* `AttachmentRow`, drag-and-drop in `SortableAttachments`, the modal in `useAttachmentLightbox`.
|
|
5
|
+
*/
|
|
2
6
|
export declare const AttachmentPreview: import("react").ForwardRefExoticComponent<AttachmentPreviewProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
3
7
|
//# sourceMappingURL=AttachmentPreview.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttachmentPreview.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentPreview/AttachmentPreview.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AttachmentPreview.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentPreview/AttachmentPreview.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAEnE;;;GAGG;AACH,eAAO,MAAM,iBAAiB,mHA0B7B,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/objectWithoutProperties";import{forwardRef as r}from"react";import{useAttachmentLightbox as o}from"../AttachmentLightbox/useAttachmentLightbox.js";import{AttachmentRow as n}from"./AttachmentRow.js";import{SortableAttachments as i}from"./SortableAttachments.js";import{jsx as c,jsxs as m,Fragment as p}from"react/jsx-runtime";var l=["onReorder","onItemClick"];function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function b(t){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?f(Object(o),!0).forEach((function(r){e(t,r,o[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):f(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var a=r((function(e,r){var f=e.onReorder,a=e.onItemClick,s=t(e,l),u=o(),h=u.openAttachment,O=u.lightbox;if(!s.items.length)return null;var j=!!f&&s.items.length>1?c(i,b(b({},s),{},{ref:r,onReorder:f,onItemClick:null!=a?a:h})):c(n,b(b({},s),{},{ref:r,onItemClick:null!=a?a:h}));return m(p,{children:[j,!a&&O]})}));export{a as AttachmentPreview};
|
|
2
2
|
//# sourceMappingURL=AttachmentPreview.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttachmentPreview.js","sources":["../../../src/components/AttachmentPreview/AttachmentPreview.tsx"],"sourcesContent":["import { forwardRef, MouseEvent } from 'react';\nimport classNames from 'classnames';\n\nimport { FileIcon } from '../../componentsV2/FileIcon';\nimport { ButtonIcon } from '../../componentsV2/ButtonIcon';\nimport { Tooltip } from '../../componentsV2/Tooltip';\nimport { LoaderCircular } from '../../componentsV2/LoaderCircular';\nimport { PlayOneIcon, CloseSmallIcon, UndoIcon } from '../../icons';\n\nimport { AttachmentPreviewItem, AttachmentPreviewProps } from './AttachmentPreview.types';\n\nimport styles from './AttachmentPreview.scss';\n\nimport { DownloadIcon } from '~/icons';\nimport utils from '~/utils/main';\n\nconst getExtension = (name: string) => {\n const parts = name.split('.');\n return parts.length > 1 ? (parts.pop() ?? '').toUpperCase() : '';\n};\n\nconst dropExtension = (name: string) => name.replace(/\\.[^/.]+$/, '');\n\n// A bare <video> paints nothing until a frame is decoded; the media fragment forces one.\nconst withFirstFrame = (src?: string) => (src && !src.includes('#t=') ? `${src}#t=0.1` : src);\n\ntype TileProps = {\n item: AttachmentPreviewItem;\n onRemove?: AttachmentPreviewProps['onRemove'];\n onRetry?: AttachmentPreviewProps['onRetry'];\n onItemClick?: AttachmentPreviewProps['onItemClick'];\n};\n\nconst stopAndRun = (action: () => void) => (event: MouseEvent) => {\n event.stopPropagation();\n action();\n};\n\nconst TileOverlays = ({ item, onRemove, onRetry }: Omit<TileProps, 'onItemClick'>) => (\n <>\n {item.isUploading && (\n <>\n <div className={styles.uploadingOverlay} />\n <div className={styles.uploadingSpinner}>\n <LoaderCircular size=\"xs\" className={styles.loader} />\n </div>\n </>\n )}\n\n {!!item.error && (\n <>\n <div className={styles.errorOverlay} />\n {onRetry && (\n <Tooltip title=\"Retry upload\">\n <div className={styles.retryButton}>\n <ButtonIcon\n size=\"xs\"\n type=\"tertiaryBg\"\n onClick={stopAndRun(() => onRetry(item.id))}\n testId=\"attachment-retry\"\n >\n <UndoIcon size=\"small\" />\n </ButtonIcon>\n </div>\n </Tooltip>\n )}\n </>\n )}\n\n {onRemove && !item.isUploading && (\n <Tooltip title=\"Remove\">\n <div\n className={classNames(styles.removeButton, !!item.error && styles.removeButtonVisible)}\n >\n <ButtonIcon\n size=\"xs\"\n type=\"tertiaryBg\"\n onClick={stopAndRun(() => onRemove(item.id))}\n testId=\"attachment-remove\"\n >\n <CloseSmallIcon size=\"small\" />\n </ButtonIcon>\n </div>\n </Tooltip>\n )}\n </>\n);\n\nconst AttachmentTile = ({ item, onRemove, onRetry, onItemClick }: TileProps) => {\n const kind = item.kind ?? 'file';\n const overlays = <TileOverlays item={item} onRemove={onRemove} onRetry={onRetry} />;\n const fileName = utils.getFileNameWithExtensionFromPath(item.name);\n\n if (kind === 'image' || kind === 'video') {\n const clickable = !!onItemClick && !item.isUploading && !item.error;\n return (\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events\n <div\n className={classNames(\n styles.thumbnail,\n clickable && styles.clickable,\n !!item.error && styles.thumbnailError\n )}\n onClick={clickable ? () => onItemClick?.(item) : undefined}\n >\n <div className={styles.thumbnailInner}>\n {kind === 'image' ? (\n <img src={item.src} alt={fileName} className={styles.thumbnailImage} />\n ) : (\n <video\n src={withFirstFrame(item.src)}\n className={styles.thumbnailImage}\n preload=\"metadata\"\n playsInline\n muted\n />\n )}\n </div>\n {kind === 'video' && (\n <div className={styles.videoOverlay}>\n <PlayOneIcon theme=\"filled\" className={styles.playIcon} />\n </div>\n )}\n {overlays}\n </div>\n );\n }\n\n // Download and remove share the tile's top-right corner, so an editable tile keeps only Remove.\n const isDownloadable = !!item.downloadUrl && !onRemove && !item.isUploading && !item.error;\n\n const fileCardContent = (\n <>\n <div className={styles.fileCardContent}>\n <FileIcon name={fileName} />\n <div className={styles.fileInfo}>\n <Tooltip title={fileName}>\n <div className={styles.fileName}>{dropExtension(fileName)}</div>\n </Tooltip>\n <div className={styles.fileType}>{getExtension(fileName)}</div>\n </div>\n </div>\n {isDownloadable && (\n <Tooltip title=\"Download\">\n <div className={styles.downloadButton}>\n <ButtonIcon size=\"xs\" type=\"tertiaryBg\" testId=\"attachment-download-button\">\n <DownloadIcon size=\"small\" />\n </ButtonIcon>\n </div>\n </Tooltip>\n )}\n {overlays}\n </>\n );\n\n if (isDownloadable) {\n return (\n <a\n href={item.downloadUrl}\n download={fileName}\n className={classNames(styles.fileCard, styles.fileCardLink)}\n data-testid=\"attachment-download\"\n >\n {fileCardContent}\n </a>\n );\n }\n\n return (\n <div className={classNames(styles.fileCard, !!item.error && styles.thumbnailError)}>\n {fileCardContent}\n </div>\n );\n};\n\nexport const AttachmentPreview = forwardRef<HTMLDivElement, AttachmentPreviewProps>(\n ({ items, onRemove, onRetry, onItemClick, className, testId }, ref) => {\n if (!items.length) return null;\n\n return (\n <div ref={ref} data-testid={testId} className={classNames(styles.scroller, className)}>\n {items.map(item => (\n <AttachmentTile\n key={item.id}\n item={item}\n onRemove={onRemove}\n onRetry={onRetry}\n onItemClick={onItemClick}\n />\n ))}\n </div>\n );\n }\n);\n"],"names":["getExtension","name","_parts$pop","parts","split","length","pop","toUpperCase","stopAndRun","action","event","stopPropagation","TileOverlays","_ref","item","onRemove","onRetry","_jsxs","_Fragment","children","isUploading","_jsx","className","styles","uploadingOverlay","uploadingSpinner","LoaderCircular","size","loader","error","errorOverlay","Tooltip","title","retryButton","ButtonIcon","type","onClick","id","testId","UndoIcon","classNames","removeButton","removeButtonVisible","CloseSmallIcon","AttachmentTile","_ref2","_item$kind","src","onItemClick","kind","overlays","fileName","utils","getFileNameWithExtensionFromPath","clickable","thumbnail","thumbnailError","undefined","thumbnailInner","alt","thumbnailImage","includes","concat","preload","playsInline","muted","videoOverlay","PlayOneIcon","theme","playIcon","isDownloadable","downloadUrl","fileCardContent","FileIcon","fileInfo","replace","fileType","downloadButton","DownloadIcon","href","download","fileCard","fileCardLink","AttachmentPreview","forwardRef","_ref3","ref","items","scroller","map"],"mappings":"4qIAgBA,IAAMA,EAAe,SAACC,GAAiB,IAAAC,EAC/BC,EAAQF,EAAKG,MAAM,KACzB,OAAOD,EAAME,OAAS,GAAoB,QAAfF,EAAAA,EAAMG,aAAS,IAAAJ,EAAAA,EAAA,IAAIK,cAAgB,EAChE,EAcMC,EAAa,SAACC,GAAkB,OAAK,SAACC,GAC1CA,EAAMC,kBACNF,IACD,EAEKG,EAAe,SAAHC,GAAA,IAAMC,IAAAA,KAAMC,IAAAA,SAAUC,IAAAA,QAAO,OAC7CC,EAAAC,EAAA,CAAAC,SACGL,CAA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,CAACP,KAAK,KAAKQ,KAAK,aAAaG,OAAO,6BAA4BnB,SACzEE,EAACyD,EAAY,CAACnD,KAAK,gBAK1BuB,KAIL,OAAIoB,EAEAjD,EAAA,IAAA,CACE0D,KAAMjE,EAAKyD,YACXS,SAAU7B,EACV7B,UAAWkB,EAAWjB,EAAO0D,SAAU1D,EAAO2D,cAC9C,cAAY,sBAAqB/D,SAEhCqD,IAMLnD,EAAA,MAAA,CAAKC,UAAWkB,EAAWjB,EAAO0D,WAAYnE,EAAKe,OAASN,EAAOiC,gBAAgBrC,SAChFqD,GAGP,EAEaW,EAAoBC,GAC/B,SAAAC,EAA+DC,GAAQ,IAApEC,IAAAA,MAAOxE,IAAAA,SAAUC,IAAAA,QAASgC,IAAAA,YAAa1B,IAAAA,UAAWgB,IAAAA,OACnD,OAAKiD,EAAMlF,OAGTgB,EAAA,MAAA,CAAKiE,IAAKA,EAAK,cAAahD,EAAQhB,UAAWkB,EAAWjB,EAAOiE,SAAUlE,GAAWH,SACnFoE,EAAME,KAAI,SAAA3E,GAAI,OACbO,EAACuB,EAAc,CAEb9B,KAAMA,EACNC,SAAUA,EACVC,QAASA,EACTgC,YAAaA,GAJRlC,EAAKuB,SANQ,IAe5B"}
|
|
1
|
+
{"version":3,"file":"AttachmentPreview.js","sources":["../../../src/components/AttachmentPreview/AttachmentPreview.tsx"],"sourcesContent":["import { forwardRef } from 'react';\n\nimport { useAttachmentLightbox } from '../AttachmentLightbox/useAttachmentLightbox';\n\nimport { AttachmentRow } from './AttachmentRow';\nimport { SortableAttachments } from './SortableAttachments';\nimport { AttachmentPreviewProps } from './AttachmentPreview.types';\n\n/**\n * Picks the strip that fits — reorderable or plain — and gives it a lightbox. Rendering lives in\n * `AttachmentRow`, drag-and-drop in `SortableAttachments`, the modal in `useAttachmentLightbox`.\n */\nexport const AttachmentPreview = forwardRef<HTMLDivElement, AttachmentPreviewProps>(\n ({ onReorder, onItemClick, ...props }, ref) => {\n // Images and videos open in the lightbox by default; passing `onItemClick` takes that over.\n const { openAttachment, lightbox } = useAttachmentLightbox();\n\n if (!props.items.length) return null;\n\n const isSortable = !!onReorder && props.items.length > 1;\n const strip = isSortable ? (\n <SortableAttachments\n {...props}\n ref={ref}\n onReorder={onReorder}\n onItemClick={onItemClick ?? openAttachment}\n />\n ) : (\n <AttachmentRow {...props} ref={ref} onItemClick={onItemClick ?? openAttachment} />\n );\n\n return (\n <>\n {strip}\n {!onItemClick && lightbox}\n </>\n );\n }\n);\n"],"names":["AttachmentPreview","forwardRef","_ref","ref","onReorder","onItemClick","props","_objectWithoutProperties","_excluded","_useAttachmentLightbo","useAttachmentLightbox","openAttachment","lightbox","items","length","strip","_jsx","SortableAttachments","AttachmentRow","_objectSpread","_jsxs","_Fragment","children"],"mappings":"ogCAYaA,EAAoBC,GAC/B,SAAAC,EAAuCC,GAAQ,IAA5CC,IAAAA,UAAWC,IAAAA,YAAgBC,EAAKC,EAAAL,EAAAM,GAEjCC,EAAqCC,IAA7BC,IAAAA,eAAgBC,IAAAA,SAExB,IAAKN,EAAMO,MAAMC,OAAQ,OAAO,KAEhC,IACMC,IADeX,GAAaE,EAAMO,MAAMC,OAAS,EAErDE,EAACC,SACKX,GAAK,GAAA,CACTH,IAAKA,EACLC,UAAWA,EACXC,YAAaA,QAAAA,EAAeM,KAG9BK,EAACE,EAAaC,EAAAA,EAAA,CAAA,EAAKb,GAAK,GAAA,CAAEH,IAAKA,EAAKE,YAAaA,QAAAA,EAAeM,KAGlE,OACES,EAAAC,EAAA,CAAAC,SAAA,CACGP,GACCV,GAAeO,IAGvB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import t from'./../../ext-esm/style-inject/dist/style-inject.es.js';var e={spacing:"8",scroller:"AttachmentPreview_scroller__ZqYC8",thumbnail:"AttachmentPreview_thumbnail__ytI2L",clickable:"AttachmentPreview_clickable__BEXzK",thumbnailInner:"AttachmentPreview_thumbnailInner__9Ex4-",thumbnailImage:"AttachmentPreview_thumbnailImage__RQ4fL",videoOverlay:"AttachmentPreview_videoOverlay__5Lgi1",playIcon:"AttachmentPreview_playIcon__OOnql",fileCard:"AttachmentPreview_fileCard__oxDbD",fileCardLink:"AttachmentPreview_fileCardLink__TDpvh",fileCardContent:"AttachmentPreview_fileCardContent__c-99Q",fileInfo:"AttachmentPreview_fileInfo__eqJ-B",fileName:"AttachmentPreview_fileName__1Ccg0",fileType:"AttachmentPreview_fileType__0v6E4",downloadButton:"AttachmentPreview_downloadButton__9oBz-",removeButton:"AttachmentPreview_removeButton__aX-qu",removeButtonVisible:"AttachmentPreview_removeButtonVisible__BVjYB",thumbnailError:"AttachmentPreview_thumbnailError__yyH08",uploadingOverlay:"AttachmentPreview_uploadingOverlay__leV1D",uploadingSpinner:"AttachmentPreview_uploadingSpinner__u-t7d",loader:"AttachmentPreview_loader__HK5bZ",errorOverlay:"AttachmentPreview_errorOverlay__8sM1d",retryButton:"AttachmentPreview_retryButton__tKVV0"};t(
|
|
1
|
+
import t from'./../../ext-esm/style-inject/dist/style-inject.es.js';var e={spacing:"8",scroller:"AttachmentPreview_scroller__ZqYC8",slot:"AttachmentPreview_slot__ewKLo",slotDragging:"AttachmentPreview_slotDragging__hrfJX",slotContent:"AttachmentPreview_slotContent__GNuSu",insertion:"AttachmentPreview_insertion__iFqlp",insertionBefore:"AttachmentPreview_insertionBefore__jyWQM",insertionEdge:"AttachmentPreview_insertionEdge__Bjk1t",insertionAfter:"AttachmentPreview_insertionAfter__4NvhP",dragGhost:"AttachmentPreview_dragGhost__4aSzE",dragGhostHandle:"AttachmentPreview_dragGhostHandle__Gu2CP",thumbnail:"AttachmentPreview_thumbnail__ytI2L",clickable:"AttachmentPreview_clickable__BEXzK",thumbnailInner:"AttachmentPreview_thumbnailInner__9Ex4-",thumbnailImage:"AttachmentPreview_thumbnailImage__RQ4fL",videoOverlay:"AttachmentPreview_videoOverlay__5Lgi1",playIcon:"AttachmentPreview_playIcon__OOnql",fileCard:"AttachmentPreview_fileCard__oxDbD",fileCardLink:"AttachmentPreview_fileCardLink__TDpvh",fileCardContent:"AttachmentPreview_fileCardContent__c-99Q",fileInfo:"AttachmentPreview_fileInfo__eqJ-B",fileName:"AttachmentPreview_fileName__1Ccg0",fileType:"AttachmentPreview_fileType__0v6E4",downloadButton:"AttachmentPreview_downloadButton__9oBz-",removeButton:"AttachmentPreview_removeButton__aX-qu",removeButtonVisible:"AttachmentPreview_removeButtonVisible__BVjYB",thumbnailError:"AttachmentPreview_thumbnailError__yyH08",uploadingOverlay:"AttachmentPreview_uploadingOverlay__leV1D",uploadingSpinner:"AttachmentPreview_uploadingSpinner__u-t7d",loader:"AttachmentPreview_loader__HK5bZ",errorOverlay:"AttachmentPreview_errorOverlay__8sM1d",retryButton:"AttachmentPreview_retryButton__tKVV0"};t('.AttachmentPreview_scroller__ZqYC8{-ms-overflow-style:none;align-items:flex-start;display:flex;gap:12px;margin-left:-8px;overflow-x:auto;overflow-y:visible;padding-left:8px;padding-right:8px;padding-top:6px;scroll-behavior:smooth;scrollbar-width:none}.AttachmentPreview_scroller__ZqYC8::-webkit-scrollbar{display:none}.AttachmentPreview_slot__ewKLo{border-radius:8px;cursor:grab;flex-shrink:0;position:relative;touch-action:none}.AttachmentPreview_slot__ewKLo:focus-visible{outline:none}.AttachmentPreview_slot__ewKLo:focus-visible:before{border:2px solid var(--palette-primary-main);border-radius:8px;content:"";inset:0;pointer-events:none;position:absolute;z-index:5}.AttachmentPreview_slotDragging__hrfJX{cursor:grabbing}.AttachmentPreview_slotDragging__hrfJX .AttachmentPreview_slotContent__GNuSu{visibility:hidden}.AttachmentPreview_slotDragging__hrfJX:focus-visible:before{display:none}.AttachmentPreview_slotDragging__hrfJX:after{background:rgb(from var(--palette-primary-text-1) r g b/.04);border:1px dashed var(--palette-primary-text-6);border-radius:8px;content:"";inset:0;position:absolute}.AttachmentPreview_insertion__iFqlp{background:var(--palette-primary-main);border-radius:2px;bottom:0;box-shadow:0 0 6px rgb(from var(--palette-primary-main) r g b/.6);position:absolute;top:0;width:2px;z-index:4}.AttachmentPreview_insertionBefore__jyWQM,.AttachmentPreview_insertionEdge__Bjk1t{left:-7px}.AttachmentPreview_insertionAfter__4NvhP{right:-7px}.AttachmentPreview_dragGhost__4aSzE{background:var(--palette-background-b-6);border-radius:8px;box-shadow:0 10px 20px rgb(from var(--palette-background-b-1) r g b/.45);cursor:grabbing;opacity:.9;position:relative;transform:rotate(4deg)}.AttachmentPreview_dragGhostHandle__Gu2CP{align-items:center;display:flex;inset:0;justify-content:center;pointer-events:none;position:absolute;z-index:2}.AttachmentPreview_dragGhostHandle__Gu2CP button{backdrop-filter:blur(4px);background-color:rgb(from var(--palette-primary-text-1) r g b/.16)!important;color:var(--palette-primary-text-1)!important}.AttachmentPreview_dragGhostHandle__Gu2CP svg{color:var(--palette-primary-text-1)}.AttachmentPreview_thumbnail__ytI2L{border-radius:8px;flex-shrink:0;height:64px;overflow:visible;position:relative;width:64px}.AttachmentPreview_clickable__BEXzK{cursor:pointer}.AttachmentPreview_clickable__BEXzK:hover{opacity:.9}.AttachmentPreview_thumbnailInner__9Ex4-{border-radius:8px;inset:0;overflow:hidden;pointer-events:none;position:absolute}.AttachmentPreview_thumbnailImage__RQ4fL{height:100%;left:50%;max-width:none;min-width:100%;object-fit:cover;pointer-events:none;position:absolute;top:0;transform:translateX(-50%);width:auto}.AttachmentPreview_videoOverlay__5Lgi1{align-items:center;background:rgb(from var(--palette-background-b-1) r g b/.5);border-radius:8px;display:flex;inset:0;justify-content:center;pointer-events:none;position:absolute}.AttachmentPreview_playIcon__OOnql{color:var(--palette-primary-text-1);font-size:32px}.AttachmentPreview_fileCard__oxDbD{align-items:flex-start;border:1px solid rgb(from var(--palette-primary-text-1) r g b/.08);border-radius:8px;display:flex;flex-direction:column;flex-shrink:0;height:64px;justify-content:center;padding:8px 16px;position:relative;width:142px}.AttachmentPreview_fileCardLink__TDpvh{color:inherit;cursor:pointer;text-decoration:none}.AttachmentPreview_fileCardLink__TDpvh:hover{border-color:rgb(from var(--palette-primary-text-1) r g b/.16)}.AttachmentPreview_fileCardContent__c-99Q{align-items:center;display:flex;gap:8px;width:100%}.AttachmentPreview_fileInfo__eqJ-B{align-items:flex-start;display:flex;flex:1 0 0;flex-direction:column;justify-content:center;min-width:0}.AttachmentPreview_fileName__1Ccg0{color:var(--palette-primary-text-1)}.AttachmentPreview_fileName__1Ccg0,.AttachmentPreview_fileType__0v6E4{font-size:14px;line-height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.AttachmentPreview_fileType__0v6E4{color:var(--palette-primary-text-6);text-transform:uppercase}.AttachmentPreview_downloadButton__9oBz-{opacity:0;position:absolute;right:-6px;top:-6px;transition:opacity .2s;z-index:3}.AttachmentPreview_downloadButton__9oBz- button{backdrop-filter:blur(4px);background-color:rgb(from var(--palette-primary-text-1) r g b/.08)!important}.AttachmentPreview_downloadButton__9oBz- button:hover{background-color:rgb(from var(--palette-primary-text-1) r g b/.15)!important}.AttachmentPreview_fileCard__oxDbD:hover .AttachmentPreview_downloadButton__9oBz-{opacity:1}.AttachmentPreview_removeButton__aX-qu{opacity:0;position:absolute;right:-6px;top:-6px;transition:opacity .2s;z-index:3}.AttachmentPreview_removeButton__aX-qu button{backdrop-filter:blur(4px);background-color:rgb(from var(--palette-primary-text-1) r g b/.08)!important}.AttachmentPreview_removeButton__aX-qu button:hover{background-color:rgb(from var(--palette-primary-text-1) r g b/.15)!important}.AttachmentPreview_fileCard__oxDbD:hover .AttachmentPreview_removeButton__aX-qu,.AttachmentPreview_removeButtonVisible__BVjYB,.AttachmentPreview_thumbnail__ytI2L:hover .AttachmentPreview_removeButton__aX-qu{opacity:1}.AttachmentPreview_thumbnailError__yyH08{border:1px solid rgb(from var(--palette-error-main) r g b/.4)}.AttachmentPreview_uploadingOverlay__leV1D{background:rgb(from var(--palette-background-b-1) r g b/.5);border-radius:8px;inset:0;pointer-events:none;position:absolute}.AttachmentPreview_uploadingSpinner__u-t7d{align-items:center;backdrop-filter:blur(4px);background-color:rgb(from var(--palette-primary-text-1) r g b/.08);border-radius:6px;display:flex;height:24px;justify-content:center;position:absolute;right:-6px;top:-6px;width:24px;z-index:2}.AttachmentPreview_loader__HK5bZ{color:var(--palette-primary-text-6)!important;height:14px!important;width:14px!important}.AttachmentPreview_errorOverlay__8sM1d{background:rgb(from var(--palette-error-main) r g b/.08);border-radius:8px;inset:0;pointer-events:none;position:absolute}.AttachmentPreview_retryButton__tKVV0{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:2}.AttachmentPreview_retryButton__tKVV0 button{backdrop-filter:blur(4px);background-color:rgb(from var(--palette-primary-text-1) r g b/.08)!important}.AttachmentPreview_retryButton__tKVV0 button:hover{background-color:rgb(from var(--palette-primary-text-1) r g b/.15)!important}');export{e as default};
|
|
2
2
|
//# sourceMappingURL=AttachmentPreview.scss.js.map
|
|
@@ -13,6 +13,8 @@ export type AttachmentPreviewProps = {
|
|
|
13
13
|
onRemove?: (id: AttachmentPreviewItem['id']) => void;
|
|
14
14
|
onRetry?: (id: AttachmentPreviewItem['id']) => void;
|
|
15
15
|
onItemClick?: (item: AttachmentPreviewItem) => void;
|
|
16
|
+
/** Enables drag-to-reorder; receives the full id list in its new order. */
|
|
17
|
+
onReorder?: (orderedIds: AttachmentPreviewItem['id'][]) => void;
|
|
16
18
|
className?: string;
|
|
17
19
|
testId?: string;
|
|
18
20
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttachmentPreview.types.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentPreview/AttachmentPreview.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AAExD,MAAM,MAAM,qBAAqB,GAAG;IAClC,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,KAAK,EAAE,qBAAqB,EAAE,CAAC;IAC/B,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,qBAAqB,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC;IACrD,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,qBAAqB,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC;IACpD,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,qBAAqB,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"AttachmentPreview.types.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentPreview/AttachmentPreview.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AAExD,MAAM,MAAM,qBAAqB,GAAG;IAClC,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,KAAK,EAAE,qBAAqB,EAAE,CAAC;IAC/B,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,qBAAqB,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC;IACrD,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,qBAAqB,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC;IACpD,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,qBAAqB,KAAK,IAAI,CAAC;IACpD,2EAA2E;IAC3E,SAAS,CAAC,EAAE,CAAC,UAAU,EAAE,qBAAqB,CAAC,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC;IAEhE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { AttachmentPreviewProps } from './AttachmentPreview.types';
|
|
2
|
+
export type AttachmentRowProps = Omit<AttachmentPreviewProps, 'onReorder'>;
|
|
3
|
+
/** The plain, non-reorderable strip. `SortableAttachments` is its drag-and-drop counterpart. */
|
|
4
|
+
export declare const AttachmentRow: import("react").ForwardRefExoticComponent<AttachmentRowProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
|
+
//# sourceMappingURL=AttachmentRow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AttachmentRow.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentPreview/AttachmentRow.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAInE,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,sBAAsB,EAAE,WAAW,CAAC,CAAC;AAE3E,gGAAgG;AAChG,eAAO,MAAM,aAAa,+GAczB,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{forwardRef as t}from"react";import e from"classnames";import{AttachmentTile as r}from"./AttachmentTile.js";import m from"./AttachmentPreview.scss.js";import{jsx as o}from"react/jsx-runtime";var i=t((function(t,i){var n=t.items,s=t.onRemove,a=t.onRetry,c=t.onItemClick,l=t.className,f=t.testId;return o("div",{ref:i,"data-testid":f,className:e(m.scroller,l),children:n.map((function(t){return o(r,{item:t,onRemove:s,onRetry:a,onItemClick:c},t.id)}))})}));export{i as AttachmentRow};
|
|
2
|
+
//# sourceMappingURL=AttachmentRow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AttachmentRow.js","sources":["../../../src/components/AttachmentPreview/AttachmentRow.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport classNames from 'classnames';\n\nimport { AttachmentTile } from './AttachmentTile';\nimport { AttachmentPreviewProps } from './AttachmentPreview.types';\n\nimport styles from './AttachmentPreview.scss';\n\nexport type AttachmentRowProps = Omit<AttachmentPreviewProps, 'onReorder'>;\n\n/** The plain, non-reorderable strip. `SortableAttachments` is its drag-and-drop counterpart. */\nexport const AttachmentRow = forwardRef<HTMLDivElement, AttachmentRowProps>(\n ({ items, onRemove, onRetry, onItemClick, className, testId }, ref) => (\n <div ref={ref} data-testid={testId} className={classNames(styles.scroller, className)}>\n {items.map(item => (\n <AttachmentTile\n key={item.id}\n item={item}\n onRemove={onRemove}\n onRetry={onRetry}\n onItemClick={onItemClick}\n />\n ))}\n </div>\n )\n);\n"],"names":["AttachmentRow","forwardRef","ref","items","onRemove","onRetry","onItemClick","className","testId","_jsx","classNames","styles","scroller","children","map","item","AttachmentTile","id"],"mappings":"yMAWaA,EAAgBC,GAC3B,WAA+DC,GAAG,IAA/DC,IAAAA,MAAOC,IAAAA,SAAUC,IAAAA,QAASC,IAAAA,YAAaC,IAAAA,UAAWC,IAAAA,OAAM,OACzDC,EAAA,MAAA,CAAKP,IAAKA,EAAK,cAAaM,EAAQD,UAAWG,EAAWC,EAAOC,SAAUL,GAAWM,SACnFV,EAAMW,KAAI,SAAAC,GAAI,OACbN,EAACO,EAAc,CAEbD,KAAMA,EACNX,SAAUA,EACVC,QAASA,EACTC,YAAaA,GAJRS,EAAKE,QAOV"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AttachmentPreviewItem, AttachmentPreviewProps } from './AttachmentPreview.types';
|
|
2
|
+
export type AttachmentTileProps = {
|
|
3
|
+
item: AttachmentPreviewItem;
|
|
4
|
+
onRemove?: AttachmentPreviewProps['onRemove'];
|
|
5
|
+
onRetry?: AttachmentPreviewProps['onRetry'];
|
|
6
|
+
onItemClick?: AttachmentPreviewProps['onItemClick'];
|
|
7
|
+
};
|
|
8
|
+
export declare const AttachmentTile: ({ item, onRemove, onRetry, onItemClick }: AttachmentTileProps) => JSX.Element;
|
|
9
|
+
//# sourceMappingURL=AttachmentTile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AttachmentTile.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentPreview/AttachmentTile.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAiB1F,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,qBAAqB,CAAC;IAC5B,QAAQ,CAAC,EAAE,sBAAsB,CAAC,UAAU,CAAC,CAAC;IAC9C,OAAO,CAAC,EAAE,sBAAsB,CAAC,SAAS,CAAC,CAAC;IAC5C,WAAW,CAAC,EAAE,sBAAsB,CAAC,aAAa,CAAC,CAAC;CACrD,CAAC;AAyDF,eAAO,MAAM,cAAc,6CAA8C,mBAAmB,gBAqF3F,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import o from"classnames";import{FileIcon as s}from"../../componentsV2/FileIcon/FileIcon.js";import{ButtonIcon as i}from"../../componentsV2/ButtonIcon/ButtonIcon.js";import{Tooltip as c}from"../../componentsV2/Tooltip/Tooltip.js";import{LoaderCircular as n}from"../../componentsV2/LoaderCircular/LoaderCircular.js";import{PlayOneIcon as t,DownloadIcon as r,UndoIcon as e,CloseSmallIcon as m}from"../../icons/iconParkIcons.js";import"../../icons/customIcons/icons/AddMessage.js";import"../../icons/customIcons/icons/DragOne.js";import"../../icons/customIcons/icons/Attention.js";import"../../icons/customIcons/icons/Collapse.js";import"../../icons/customIcons/icons/Dashboard.js";import"../../icons/customIcons/icons/Expand.js";import"../../icons/customIcons/icons/FolderClosed.js";import"../../icons/customIcons/icons/FolderClosedFilled.js";import"../../icons/customIcons/icons/FolderOpened.js";import"../../icons/customIcons/icons/GreaterOrEqual.js";import"../../icons/customIcons/icons/LessOrEqual.js";import"../../icons/customIcons/icons/Search.js";import"../../icons/customIcons/icons/SearchOne.js";import"../../icons/customIcons/icons/Wellhub.js";import"../../icons/customIcons/icons/MultiRuler.js";import"../../icons/customIcons/icons/Checkbox.js";import"../../icons/customIcons/icons/CheckboxChecked.js";import"../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../icons/customIcons/icons/Radio.js";import"../../icons/customIcons/icons/RadioChecked.js";import"../../icons/customIcons/icons/SimulFrac.js";import"../../icons/customIcons/icons/ZipperFrac.js";import"../../icons/customIcons/icons/CautionFilled.js";import"../../icons/customIcons/icons/MoreApp.js";import"../../icons/customIcons/icons/Pad.js";import"../../icons/customIcons/icons/DrilloutUnit.js";import"../../icons/customIcons/icons/FracFleet.js";import"../../icons/customIcons/icons/Global.js";import"../../icons/customIcons/icons/Program.js";import"../../icons/customIcons/icons/Rig.js";import"../../icons/customIcons/icons/Well.js";import"../../icons/customIcons/icons/Gap.js";import"../../icons/customIcons/icons/Pin.js";import"../../icons/customIcons/icons/CloseOneFilled.js";import"../../icons/customIcons/icons/AttentionFilled.js";import"../../icons/customIcons/icons/CheckOneFilled.js";import"../../icons/customIcons/icons/Archive.js";import"../../icons/customIcons/icons/ArchiveCancel.js";import"../../icons/customIcons/icons/Unarchive.js";import"../../icons/customIcons/icons/Archived.js";import"../../icons/customIcons/icons/InterventionUnit.js";import"../../icons/customIcons/icons/CloudDelete.js";import"../../icons/customIcons/icons/Lasso.js";import"../../icons/customIcons/icons/Radius.js";import"../../icons/customIcons/icons/ErrorOps.js";import"../../icons/customIcons/icons/DataTypeOps.js";import"../../icons/customIcons/icons/FalsePositiveOps.js";import"../../icons/customIcons/icons/CalibrationOps.js";import"../../icons/customIcons/icons/CriticalOps.js";import"../../icons/customIcons/icons/Company.js";import"../../icons/customIcons/icons/ArchiveOne.js";import"../../icons/customIcons/icons/ParseBotFusion.js";import"../../icons/customIcons/icons/Connect.js";import"../../icons/customIcons/icons/PuzzleOne.js";import"../../icons/customIcons/icons/Feed.js";import"../../icons/customIcons/icons/Prompt.js";import"../../icons/customIcons/icons/Companies.js";import"../../icons/customIcons/icons/ClipboardAi.js";import"../../icons/customIcons/icons/Key.js";import"../../icons/customIcons/icons/AtSignCrossed.js";import"../../icons/customIcons/icons/MappingManual.js";import"../../icons/customIcons/icons/Mapping.js";import"../../icons/customIcons/icons/Metrics.js";import"../../icons/customIcons/icons/Drops.js";import"../../icons/customIcons/icons/ClipboardSearch.js";import"../../icons/customIcons/icons/Template.js";import"../../icons/customIcons/icons/ClipboardMetrics.js";import"../../icons/customIcons/icons/ClipboardBuilder.js";import"../../icons/customIcons/icons/UnitConversion.js";import"../../icons/customIcons/icons/NPT.js";import"../../icons/customIcons/icons/GuidedFrac.js";import a from"./AttachmentPreview.scss.js";import l from"../../utils/main.js";import{jsxs as p,jsx as u,Fragment as d}from"react/jsx-runtime";var I=function(o){var s,i=o.split(".");return i.length>1?(null!==(s=i.pop())&&void 0!==s?s:"").toUpperCase():""},j=function(o){return function(s){s.stopPropagation(),o()}},h=function(s){var t=s.item,r=s.onRemove,l=s.onRetry;return p(d,{children:[t.isUploading&&p(d,{children:[u("div",{className:a.uploadingOverlay}),u("div",{className:a.uploadingSpinner,children:u(n,{size:"xs",className:a.loader})})]}),!!t.error&&p(d,{children:[u("div",{className:a.errorOverlay}),l&&u(c,{title:"Retry upload",children:u("div",{className:a.retryButton,children:u(i,{size:"xs",type:"tertiaryBg",onClick:j((function(){return l(t.id)})),testId:"attachment-retry",children:u(e,{size:"small"})})})})]}),r&&!t.isUploading&&u(c,{title:"Remove",children:u("div",{className:o(a.removeButton,!!t.error&&a.removeButtonVisible),children:u(i,{size:"xs",type:"tertiaryBg",onClick:j((function(){return r(t.id)})),testId:"attachment-remove",children:u(m,{size:"small"})})})})]})},v=function(n){var e,m,j=n.item,v=n.onRemove,C=n.onRetry,f=n.onItemClick,g=null!==(e=j.kind)&&void 0!==e?e:"file",N=u(h,{item:j,onRemove:v,onRetry:C}),y=l.getFileNameWithExtensionFromPath(j.name);if("image"===g||"video"===g){var b=!!f&&!j.isUploading&&!j.error;return p("div",{className:o(a.thumbnail,b&&a.clickable,!!j.error&&a.thumbnailError),onClick:b?function(){return null==f?void 0:f(j)}:void 0,children:[u("div",{className:a.thumbnailInner,children:"image"===g?u("img",{src:j.src,alt:y,className:a.thumbnailImage}):u("video",{src:(m=j.src,m&&!m.includes("#t=")?"".concat(m,"#t=0.1"):m),className:a.thumbnailImage,preload:"metadata",playsInline:!0,muted:!0})}),"video"===g&&u("div",{className:a.videoOverlay,children:u(t,{theme:"filled",className:a.playIcon})}),N]})}var F,O=!(!j.downloadUrl||v||j.isUploading||j.error),k=p(d,{children:[p("div",{className:a.fileCardContent,children:[u(s,{name:y}),p("div",{className:a.fileInfo,children:[u(c,{title:y,children:u("div",{className:a.fileName,children:(F=y,F.replace(/\.[^/.]+$/,""))})}),u("div",{className:a.fileType,children:I(y)})]})]}),O&&u(c,{title:"Download",children:u("div",{className:a.downloadButton,children:u(i,{size:"xs",type:"tertiaryBg",testId:"attachment-download-button",children:u(r,{size:"small"})})})}),N]});return O?u("a",{href:j.downloadUrl,download:y,className:o(a.fileCard,a.fileCardLink),"data-testid":"attachment-download",children:k}):u("div",{className:o(a.fileCard,!!j.error&&a.thumbnailError),children:k})};export{v as AttachmentTile};
|
|
2
|
+
//# sourceMappingURL=AttachmentTile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AttachmentTile.js","sources":["../../../src/components/AttachmentPreview/AttachmentTile.tsx"],"sourcesContent":["import { MouseEvent } from 'react';\nimport classNames from 'classnames';\n\nimport { FileIcon } from '../../componentsV2/FileIcon';\nimport { ButtonIcon } from '../../componentsV2/ButtonIcon';\nimport { Tooltip } from '../../componentsV2/Tooltip';\nimport { LoaderCircular } from '../../componentsV2/LoaderCircular';\nimport { PlayOneIcon, CloseSmallIcon, UndoIcon } from '../../icons';\n\nimport { AttachmentPreviewItem, AttachmentPreviewProps } from './AttachmentPreview.types';\n\nimport styles from './AttachmentPreview.scss';\n\nimport { DownloadIcon } from '~/icons';\nimport utils from '~/utils/main';\n\nconst getExtension = (name: string) => {\n const parts = name.split('.');\n return parts.length > 1 ? (parts.pop() ?? '').toUpperCase() : '';\n};\n\nconst dropExtension = (name: string) => name.replace(/\\.[^/.]+$/, '');\n\n// A bare <video> paints nothing until a frame is decoded; the media fragment forces one.\nconst withFirstFrame = (src?: string) => (src && !src.includes('#t=') ? `${src}#t=0.1` : src);\n\nexport type AttachmentTileProps = {\n item: AttachmentPreviewItem;\n onRemove?: AttachmentPreviewProps['onRemove'];\n onRetry?: AttachmentPreviewProps['onRetry'];\n onItemClick?: AttachmentPreviewProps['onItemClick'];\n};\n\nconst stopAndRun = (action: () => void) => (event: MouseEvent) => {\n event.stopPropagation();\n action();\n};\n\nconst TileOverlays = ({ item, onRemove, onRetry }: Omit<AttachmentTileProps, 'onItemClick'>) => (\n <>\n {item.isUploading && (\n <>\n <div className={styles.uploadingOverlay} />\n <div className={styles.uploadingSpinner}>\n <LoaderCircular size=\"xs\" className={styles.loader} />\n </div>\n </>\n )}\n\n {!!item.error && (\n <>\n <div className={styles.errorOverlay} />\n {onRetry && (\n <Tooltip title=\"Retry upload\">\n <div className={styles.retryButton}>\n <ButtonIcon\n size=\"xs\"\n type=\"tertiaryBg\"\n onClick={stopAndRun(() => onRetry(item.id))}\n testId=\"attachment-retry\"\n >\n <UndoIcon size=\"small\" />\n </ButtonIcon>\n </div>\n </Tooltip>\n )}\n </>\n )}\n\n {onRemove && !item.isUploading && (\n <Tooltip title=\"Remove\">\n <div\n className={classNames(styles.removeButton, !!item.error && styles.removeButtonVisible)}\n >\n <ButtonIcon\n size=\"xs\"\n type=\"tertiaryBg\"\n onClick={stopAndRun(() => onRemove(item.id))}\n testId=\"attachment-remove\"\n >\n <CloseSmallIcon size=\"small\" />\n </ButtonIcon>\n </div>\n </Tooltip>\n )}\n </>\n);\n\nexport const AttachmentTile = ({ item, onRemove, onRetry, onItemClick }: AttachmentTileProps) => {\n const kind = item.kind ?? 'file';\n const overlays = <TileOverlays item={item} onRemove={onRemove} onRetry={onRetry} />;\n const fileName = utils.getFileNameWithExtensionFromPath(item.name);\n\n if (kind === 'image' || kind === 'video') {\n const clickable = !!onItemClick && !item.isUploading && !item.error;\n return (\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events\n <div\n className={classNames(\n styles.thumbnail,\n clickable && styles.clickable,\n !!item.error && styles.thumbnailError\n )}\n onClick={clickable ? () => onItemClick?.(item) : undefined}\n >\n <div className={styles.thumbnailInner}>\n {kind === 'image' ? (\n <img src={item.src} alt={fileName} className={styles.thumbnailImage} />\n ) : (\n <video\n src={withFirstFrame(item.src)}\n className={styles.thumbnailImage}\n preload=\"metadata\"\n playsInline\n muted\n />\n )}\n </div>\n {kind === 'video' && (\n <div className={styles.videoOverlay}>\n <PlayOneIcon theme=\"filled\" className={styles.playIcon} />\n </div>\n )}\n {overlays}\n </div>\n );\n }\n\n // Download and remove share the tile's top-right corner, so an editable tile keeps only Remove.\n const isDownloadable = !!item.downloadUrl && !onRemove && !item.isUploading && !item.error;\n\n const fileCardContent = (\n <>\n <div className={styles.fileCardContent}>\n <FileIcon name={fileName} />\n <div className={styles.fileInfo}>\n <Tooltip title={fileName}>\n <div className={styles.fileName}>{dropExtension(fileName)}</div>\n </Tooltip>\n <div className={styles.fileType}>{getExtension(fileName)}</div>\n </div>\n </div>\n {isDownloadable && (\n <Tooltip title=\"Download\">\n <div className={styles.downloadButton}>\n <ButtonIcon size=\"xs\" type=\"tertiaryBg\" testId=\"attachment-download-button\">\n <DownloadIcon size=\"small\" />\n </ButtonIcon>\n </div>\n </Tooltip>\n )}\n {overlays}\n </>\n );\n\n if (isDownloadable) {\n return (\n <a\n href={item.downloadUrl}\n download={fileName}\n className={classNames(styles.fileCard, styles.fileCardLink)}\n data-testid=\"attachment-download\"\n >\n {fileCardContent}\n </a>\n );\n }\n\n return (\n <div className={classNames(styles.fileCard, !!item.error && styles.thumbnailError)}>\n {fileCardContent}\n </div>\n );\n};\n"],"names":["getExtension","name","_parts$pop","parts","split","length","pop","toUpperCase","stopAndRun","action","event","stopPropagation","TileOverlays","_ref","item","onRemove","onRetry","_jsxs","_Fragment","children","isUploading","_jsx","className","styles","uploadingOverlay","uploadingSpinner","LoaderCircular","size","loader","error","errorOverlay","Tooltip","title","retryButton","ButtonIcon","type","onClick","id","testId","UndoIcon","classNames","removeButton","removeButtonVisible","CloseSmallIcon","AttachmentTile","_ref2","_item$kind","src","onItemClick","kind","overlays","fileName","utils","getFileNameWithExtensionFromPath","clickable","thumbnail","thumbnailError","undefined","thumbnailInner","alt","thumbnailImage","includes","concat","preload","playsInline","muted","videoOverlay","PlayOneIcon","theme","playIcon","isDownloadable","downloadUrl","fileCardContent","FileIcon","fileInfo","replace","fileType","downloadButton","DownloadIcon","href","download","fileCard","fileCardLink"],"mappings":"yoIAgBA,IAAMA,EAAe,SAACC,GAAiB,IAAAC,EAC/BC,EAAQF,EAAKG,MAAM,KACzB,OAAOD,EAAME,OAAS,GAAoB,QAAfF,EAAAA,EAAMG,aAAS,IAAAJ,EAAAA,EAAA,IAAIK,cAAgB,EAChE,EAcMC,EAAa,SAACC,GAAkB,OAAK,SAACC,GAC1CA,EAAMC,kBACNF,IACD,EAEKG,EAAe,SAAHC,GAAA,IAAMC,IAAAA,KAAMC,IAAAA,SAAUC,IAAAA,QAAO,OAC7CC,EAAAC,EAAA,CAAAC,SACGL,CAAAA,EAAKM,aACJH,EAAAC,EAAA,CAAAC,SACE,CAAAE,EAAA,MAAA,CAAKC,UAAWC,EAAOC,mBACvBH,EAAA,MAAA,CAAKC,UAAWC,EAAOE,iBAAiBN,SACtCE,EAACK,EAAc,CAACC,KAAK,KAAKL,UAAWC,EAAOK,gBAK/Cd,EAAKe,OACNZ,EAAAC,EAAA,CAAAC,SACE,CAAAE,EAAA,MAAA,CAAKC,UA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AAA,CAAKC,UAAWkB,EAAWjB,EAAO0D,WAAYnE,EAAKe,OAASN,EAAOiC,gBAAgBrC,SAChFqD,GAGP"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AttachmentPreviewProps } from './AttachmentPreview.types';
|
|
2
|
+
export type SortableAttachmentsProps = AttachmentPreviewProps & {
|
|
3
|
+
onReorder: NonNullable<AttachmentPreviewProps['onReorder']>;
|
|
4
|
+
};
|
|
5
|
+
export declare const SortableAttachments: import("react").ForwardRefExoticComponent<AttachmentPreviewProps & {
|
|
6
|
+
onReorder: NonNullable<AttachmentPreviewProps['onReorder']>;
|
|
7
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
8
|
+
//# sourceMappingURL=SortableAttachments.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SortableAttachments.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentPreview/SortableAttachments.tsx"],"names":[],"mappings":"AA2BA,OAAO,EAAyB,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AA2B1F,MAAM,MAAM,wBAAwB,GAAG,sBAAsB,GAAG;IAC9D,SAAS,EAAE,WAAW,CAAC,sBAAsB,CAAC,WAAW,CAAC,CAAC,CAAC;CAC7D,CAAC;AA+DF,eAAO,MAAM,mBAAmB;eAhEnB,WAAW,CAAC,sBAAsB,CAAC,WAAW,CAAC,CAAC;kDAwQ5D,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import o from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/slicedToArray";import s from"@babel/runtime/helpers/toConsumableArray";import{forwardRef as t,useState as c,useRef as i,useEffect as r}from"react";import{createPortal as e}from"react-dom";import m from"classnames";import{useSensors as a,useSensor as u,PointerSensor as p,KeyboardSensor as l,DndContext as d,pointerWithin as j,closestCenter as f,DragOverlay as I}from"@dnd-kit/core";import{sortableKeyboardCoordinates as g,SortableContext as v,horizontalListSortingStrategy as h,useSortable as b}from"@dnd-kit/sortable";import{ButtonIcon as y}from"../../componentsV2/ButtonIcon/ButtonIcon.js";import{DragIcon as C}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{AttachmentTile as O}from"./AttachmentTile.js";import D from"./AttachmentPreview.scss.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"lodash";import"../GradientManager/configuration/constants.js";import{DRAGGING_ATTRIBUTE as k}from"../../constants/attachments.js";import A from"../../utils/main.js";import{jsxs as P,jsx as F}from"react/jsx-runtime";function R(o,n){var s=Object.keys(o);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(o);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(o,n).enumerable}))),s.push.apply(s,t)}return s}function w(n){for(var s=1;s<arguments.length;s++){var t=null!=arguments[s]?arguments[s]:{};s%2?R(Object(t),!0).forEach((function(s){o(n,s,t[s])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):R(Object(t)).forEach((function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(t,o))}))}return n}var E=function(o){document.body.toggleAttribute(k,o)},N=function(){setTimeout((function(){return E(!1)}),0)},S=function(o){var n=o.item,s=o.onRemove,t=o.onRetry,c=o.onItemClick,i=o.insertBefore,r=o.insertAfter,e=o.isFirst,a=b({id:String(n.id)}),u=a.attributes,p=a.listeners,l=a.setNodeRef,d=a.isDragging;return P("div",w(w(w({ref:l,className:m(D.slot,d&&D.slotDragging)},u),p),{},{onKeyDown:function(o){var t;null==p||null===(t=p.onKeyDown)||void 0===t||t.call(p,o),"Delete"!==o.key&&"Backspace"!==o.key||s&&(o.preventDefault(),s(n.id))},children:[i&&F("div",{className:m(D.insertion,e?D.insertionEdge:D.insertionBefore)}),F("div",{className:D.slotContent,children:F(O,{item:n,onRemove:s,onRetry:t,onItemClick:c})}),r&&F("div",{className:m(D.insertion,D.insertionAfter)})]}))},x=t((function(t,b){var R=t.items,x=t.onRemove,M=t.onRetry,B=t.onItemClick,G=t.onReorder,L=t.className,T=t.testId,z=c(null),K=n(z,2),U=K[0],W=K[1],q=c(-1),H=n(q,2),V=H[0],X=H[1],Z=i(-1);Z.current=V;var J=i(!1),Q=i([]),Y=i(null),$=a(u(p,{activationConstraint:{distance:4}}),u(l,{coordinateGetter:g})),_=R.map((function(o){return String(o.id)})),oo=U?_.indexOf(U):-1,no=R.find((function(o){return String(o.id)===U})),so=function(o){var n,s;return A.getFileNameWithExtensionFromPath(null!==(n=null===(s=R[o])||void 0===s?void 0:s.name)&&void 0!==n?n:"file")},to=function(o){Z.current=o,X(o)};r((function(){return function(){return E(!1)}}),[]);var co=function(o){return(o>oo?o-1:o)+1},io={onDragStart:function(o){var n=o.active,s=_.indexOf(String(n.id));return"Grabbed ".concat(so(s),". Position ").concat(s+1," of ").concat(_.length,".")},onDragOver:function(){return Z.current<0?"".concat(so(oo)," is back at position ").concat(oo+1," of ").concat(_.length,"."):"".concat(so(oo)," will move to position ").concat(co(Z.current)," of ").concat(_.length,".")},onDragEnd:function(){return Z.current<0?"".concat(so(oo)," was dropped in place."):"".concat(so(oo)," was dropped at position ").concat(co(Z.current)," of ").concat(_.length,".")},onDragCancel:function(){return"Reordering cancelled. ".concat(so(oo)," returned to its position.")}};r((function(){if(!(oo<0)&&J.current){var o=oo,n=function(n){var s={ArrowRight:1,ArrowLeft:-1}[n.key];s&&(o=Math.min(R.length-1,Math.max(0,o+s)),to(function(o){return o===oo?-1:o+(o>oo?1:0)}(o)))};return document.addEventListener("keydown",n),function(){return document.removeEventListener("keydown",n)}}}),[oo,R.length]);var ro=function(o){return to(function(o){var n=o.delta,s=o.activatorEvent,t=null==s?void 0:s.clientX,c=Y.current;if(oo<0||!c||"number"!=typeof t||Number.isNaN(t))return Z.current;var i=t+n.x+c.scrollLeft,r=Q.current.filter((function(o){return i>=o})).length;return r===oo||r===oo+1?-1:r}(o))};return P(d,{sensors:$,accessibility:{announcements:io},collisionDetection:function(o){var n=j(o);return n.length?n:f(o)},onDragStart:function(o){var n=o.active,s=o.activatorEvent;J.current=s instanceof globalThis.KeyboardEvent;var t=Y.current;Q.current=t?Array.from(t.children).map((function(o){var n=o.getBoundingClientRect();return n.left+n.width/2+t.scrollLeft})):[],W(String(n.id)),to(-1),E(!0)},onDragMove:ro,onDragOver:ro,onDragEnd:function(){var o,t,c,i,r,e=Z.current;e>=0&&oo>=0&&G((o=oo,t=e,c=s(_),i=c.splice(o,1),r=n(i,1)[0],c.splice(t>o?t-1:t,0,r),c)),W(null),to(-1),Q.current=[],N()},onDragCancel:function(){W(null),to(-1),Q.current=[],N()},children:[F(v,{items:_,strategy:h,children:F("div",w(w({ref:function(o){if(Y.current=o,"function"==typeof b)b(o);else if(b){b.current=o}},"data-testid":T,className:m(D.scroller,L)},U?o({},k,"true"):{}),{},{children:R.map((function(o,n){return F(S,{item:o,onRemove:x,onRetry:M,onItemClick:B,isFirst:0===n,insertBefore:V===n,insertAfter:n===R.length-1&&V===R.length},o.id)}))}))}),e(F(I,{dropAnimation:null,zIndex:2100,children:no&&P("div",w(w({className:D.dragGhost},o({},k,"true")),{},{children:[F(O,{item:no}),F("div",{className:D.dragGhostHandle,children:F(y,{size:"xs",type:"tertiaryBg",testId:"attachment-drag-handle",children:F(C,{size:"small"})})})]}))}),document.body)]})}));export{x as SortableAttachments};
|
|
2
|
+
//# sourceMappingURL=SortableAttachments.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SortableAttachments.js","sources":["../../../src/components/AttachmentPreview/SortableAttachments.tsx"],"sourcesContent":["import { forwardRef, KeyboardEvent, MutableRefObject, useEffect, useRef, useState } from 'react';\nimport { createPortal } from 'react-dom';\nimport classNames from 'classnames';\nimport {\n Announcements,\n DndContext,\n DragMoveEvent,\n DragStartEvent,\n DragOverlay,\n KeyboardSensor,\n PointerSensor,\n closestCenter,\n pointerWithin,\n useSensor,\n useSensors,\n} from '@dnd-kit/core';\nimport {\n SortableContext,\n horizontalListSortingStrategy,\n sortableKeyboardCoordinates,\n useSortable,\n} from '@dnd-kit/sortable';\n\nimport { ButtonIcon } from '../../componentsV2/ButtonIcon';\nimport { DragIcon } from '../../icons';\n\nimport { AttachmentTile } from './AttachmentTile';\nimport { AttachmentPreviewItem, AttachmentPreviewProps } from './AttachmentPreview.types';\n\nimport styles from './AttachmentPreview.scss';\n\nimport { DRAGGING_ATTRIBUTE } from '~/constants';\nimport utils from '~/utils/main';\n\n// Above MUI's modal layer (1300) and the platform's panels.\nconst DRAG_GHOST_Z_INDEX = 2100;\n\nconst setDragActive = (isActive: boolean) => {\n document.body.toggleAttribute(DRAGGING_ATTRIBUTE, isActive);\n};\n\nconst clearDragActive = () => {\n setTimeout(() => setDragActive(false), 0);\n};\n\n/** Move `from` to boundary `insertAt` (0 = before everything, length = after everything). */\nconst moveToBoundary = <T,>(list: T[], from: number, insertAt: number): T[] => {\n const next = [...list];\n const [moved] = next.splice(from, 1);\n next.splice(insertAt > from ? insertAt - 1 : insertAt, 0, moved);\n\n return next;\n};\n\nexport type SortableAttachmentsProps = AttachmentPreviewProps & {\n onReorder: NonNullable<AttachmentPreviewProps['onReorder']>;\n};\n\ntype SortableSlotProps = {\n item: AttachmentPreviewItem;\n onRemove?: AttachmentPreviewProps['onRemove'];\n onRetry?: AttachmentPreviewProps['onRetry'];\n onItemClick?: AttachmentPreviewProps['onItemClick'];\n insertBefore: boolean;\n insertAfter: boolean;\n isFirst: boolean;\n};\n\nconst SortableSlot = ({\n item,\n onRemove,\n onRetry,\n onItemClick,\n insertBefore,\n insertAfter,\n isFirst,\n}: SortableSlotProps) => {\n const { attributes, listeners, setNodeRef, isDragging } = useSortable({ id: String(item.id) });\n\n // The sensor owns onKeyDown (space/arrows/escape), so chain onto it rather than replace it.\n const handleKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {\n listeners?.onKeyDown?.(event);\n\n if (event.key !== 'Delete' && event.key !== 'Backspace') return;\n if (!onRemove) return;\n\n event.preventDefault();\n onRemove(item.id);\n };\n\n return (\n <div\n ref={setNodeRef}\n className={classNames(styles.slot, isDragging && styles.slotDragging)}\n {...attributes}\n {...listeners}\n onKeyDown={handleKeyDown}\n >\n {insertBefore && (\n <div\n className={classNames(\n styles.insertion,\n isFirst ? styles.insertionEdge : styles.insertionBefore\n )}\n />\n )}\n <div className={styles.slotContent}>\n <AttachmentTile\n item={item}\n onRemove={onRemove}\n onRetry={onRetry}\n onItemClick={onItemClick}\n />\n </div>\n {insertAfter && <div className={classNames(styles.insertion, styles.insertionAfter)} />}\n </div>\n );\n};\n\nexport const SortableAttachments = forwardRef<HTMLDivElement, SortableAttachmentsProps>(\n ({ items, onRemove, onRetry, onItemClick, onReorder, className, testId }, ref) => {\n const [activeId, setActiveId] = useState<null | string>(null);\n const [insertionIndex, setInsertionIndex] = useState(-1);\n // Read in handlers that must not be re-created as the pointer moves.\n const insertionRef = useRef(-1);\n insertionRef.current = insertionIndex;\n const isKeyboardDragRef = useRef(false);\n const slotMidpointsRef = useRef<number[]>([]);\n\n // The host's ref drives its scroll arrows; this one measures the strip mid-drag.\n const scrollerRef = useRef<HTMLDivElement | null>(null);\n const setScrollerRef = (node: HTMLDivElement | null) => {\n scrollerRef.current = node;\n if (typeof ref === 'function') ref(node);\n else if (ref) {\n const forwardedRef = ref as MutableRefObject<HTMLDivElement | null>;\n forwardedRef.current = node;\n }\n };\n\n const sensors = useSensors(\n // A small threshold keeps Remove and the lightbox clickable on a plain press.\n useSensor(PointerSensor, { activationConstraint: { distance: 4 } }),\n useSensor(KeyboardSensor, { coordinateGetter: sortableKeyboardCoordinates })\n );\n\n const ids = items.map(item => String(item.id));\n const activeIndex = activeId ? ids.indexOf(activeId) : -1;\n const activeItem = items.find(item => String(item.id) === activeId);\n const nameOf = (index: number) =>\n utils.getFileNameWithExtensionFromPath(items[index]?.name ?? 'file');\n\n const setInsertion = (next: number) => {\n insertionRef.current = next;\n setInsertionIndex(next);\n };\n\n useEffect(() => () => setDragActive(false), []);\n\n /** A landing position (0…n-1) expressed as the boundary the insertion bar draws at. */\n const positionToBoundary = (position: number) =>\n position === activeIndex ? -1 : position + (position > activeIndex ? 1 : 0);\n\n // Compare against DOM midpoints captured at drag start: dnd-kit's rects follow its virtual\n // sorted order, which drifts from the screen once transforms are suppressed.\n const resolveInsertion = ({ delta, activatorEvent }: DragMoveEvent) => {\n const startX = (activatorEvent as PointerEvent)?.clientX;\n const scroller = scrollerRef.current;\n if (activeIndex < 0 || !scroller || typeof startX !== 'number' || Number.isNaN(startX)) {\n return insertionRef.current;\n }\n\n const pointerX = startX + delta.x + scroller.scrollLeft;\n const boundary = slotMidpointsRef.current.filter(midpoint => pointerX >= midpoint).length;\n\n // Dropping either side of where it already sits is a no-op.\n return boundary === activeIndex || boundary === activeIndex + 1 ? -1 : boundary;\n };\n\n const positionOf = (boundary: number) => (boundary > activeIndex ? boundary - 1 : boundary) + 1;\n\n const announcements: Announcements = {\n onDragStart: ({ active }) => {\n const index = ids.indexOf(String(active.id));\n\n return `Grabbed ${nameOf(index)}. Position ${index + 1} of ${ids.length}.`;\n },\n onDragOver: () =>\n insertionRef.current < 0\n ? `${nameOf(activeIndex)} is back at position ${activeIndex + 1} of ${ids.length}.`\n : `${nameOf(activeIndex)} will move to position ${positionOf(insertionRef.current)} of ${\n ids.length\n }.`,\n onDragEnd: () =>\n insertionRef.current < 0\n ? `${nameOf(activeIndex)} was dropped in place.`\n : `${nameOf(activeIndex)} was dropped at position ${positionOf(\n insertionRef.current\n )} of ${ids.length}.`,\n onDragCancel: () => `Reordering cancelled. ${nameOf(activeIndex)} returned to its position.`,\n };\n\n // Step by position instead of reading dnd-kit's `over`: its keyboard coordinates come from\n // rect geometry, so a wide tile can clear several narrow ones in one press and pin `over`\n // to the last of them.\n useEffect(() => {\n if (activeIndex < 0 || !isKeyboardDragRef.current) return undefined;\n\n let position = activeIndex;\n const onKeyDown = (event: globalThis.KeyboardEvent) => {\n const step = { ArrowRight: 1, ArrowLeft: -1 }[event.key];\n if (!step) return;\n\n position = Math.min(items.length - 1, Math.max(0, position + step));\n setInsertion(positionToBoundary(position));\n };\n\n document.addEventListener('keydown', onKeyDown);\n\n return () => document.removeEventListener('keydown', onKeyDown);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [activeIndex, items.length]);\n\n const handleDragStart = ({ active, activatorEvent }: DragStartEvent) => {\n isKeyboardDragRef.current = activatorEvent instanceof globalThis.KeyboardEvent;\n const scroller = scrollerRef.current;\n slotMidpointsRef.current = scroller\n ? Array.from(scroller.children).map(slot => {\n const rect = slot.getBoundingClientRect();\n\n return rect.left + rect.width / 2 + scroller.scrollLeft;\n })\n : [];\n setActiveId(String(active.id));\n setInsertion(-1);\n setDragActive(true);\n };\n\n const handleDragMove = (event: DragMoveEvent) => setInsertion(resolveInsertion(event));\n\n const handleDragEnd = () => {\n // The bar is the source of truth, not `over` — a keyboard drag can move the target\n // without `over` following, and dropping in a gap leaves `over` null.\n const boundary = insertionRef.current;\n if (boundary >= 0 && activeIndex >= 0) {\n onReorder(moveToBoundary(ids, activeIndex, boundary));\n }\n\n setActiveId(null);\n setInsertion(-1);\n slotMidpointsRef.current = [];\n clearDragActive();\n };\n\n const handleDragCancel = () => {\n setActiveId(null);\n setInsertion(-1);\n slotMidpointsRef.current = [];\n clearDragActive();\n };\n\n return (\n <DndContext\n sensors={sensors}\n accessibility={{ announcements }}\n // pointerWithin targets the tile under the cursor; closestCenter covers the gaps\n // between tiles and keyboard drags, where there is no pointer.\n collisionDetection={args => {\n const within = pointerWithin(args);\n\n return within.length ? within : closestCenter(args);\n }}\n onDragStart={handleDragStart}\n onDragMove={handleDragMove}\n onDragOver={handleDragMove}\n onDragEnd={handleDragEnd}\n onDragCancel={handleDragCancel}\n >\n <SortableContext items={ids} strategy={horizontalListSortingStrategy}>\n <div\n ref={setScrollerRef}\n data-testid={testId}\n className={classNames(styles.scroller, className)}\n {...(activeId ? { [DRAGGING_ATTRIBUTE]: 'true' } : {})}\n >\n {items.map((item, index) => (\n <SortableSlot\n key={item.id}\n item={item}\n onRemove={onRemove}\n onRetry={onRetry}\n onItemClick={onItemClick}\n isFirst={index === 0}\n insertBefore={insertionIndex === index}\n insertAfter={index === items.length - 1 && insertionIndex === items.length}\n />\n ))}\n </div>\n </SortableContext>\n\n {/* Portalled so no ancestor transform/backdrop-filter can clip the fixed overlay. */}\n {createPortal(\n <DragOverlay dropAnimation={null} zIndex={DRAG_GHOST_Z_INDEX}>\n {activeItem && (\n <div className={styles.dragGhost} {...{ [DRAGGING_ATTRIBUTE]: 'true' }}>\n <AttachmentTile item={activeItem} />\n <div className={styles.dragGhostHandle}>\n <ButtonIcon size=\"xs\" type=\"tertiaryBg\" testId=\"attachment-drag-handle\">\n <DragIcon size=\"small\" />\n </ButtonIcon>\n </div>\n </div>\n )}\n </DragOverlay>,\n document.body\n )}\n </DndContext>\n );\n }\n);\n"],"names":["setDragActive","isActive","document","body","toggleAttribute","DRAGGING_ATTRIBUTE","clearDragActive","setTimeout","SortableSlot","_ref","item","onRemove","onRetry","onItemClick","insertBefore","insertAfter","isFirst","_useSortable","useSortable","id","String","attributes","listeners","setNodeRef","isDragging","_jsxs","_objectSpread","ref","className","classNames","styles","slot","slotDragging","onKeyDown","event","_listeners$onKeyDown","key","preventDefault","children","_jsx","insertion","insertionEdge","insertionBefore","slotContent","AttachmentTile","insertionAfter","SortableAttachments","forwardRef","_ref2","items","onReorder","testId","useState","_useState2","_slicedToArray","_useState","activeId","setActiveId","_useState3","_useState4","insertionIndex","setInsertionIndex","insertionRef","useRef","current","isKeyboardDragRef","slotMidpointsRef","scrollerRef","sensors","useSensors","useSensor","PointerSensor","activationConstraint","distance","KeyboardSensor","coordinateGetter","sortableKeyboardCoordinates","ids","map","activeIndex","indexOf","activeItem","find","nameOf","index","_items$index$name","_items$index","utils","getFileNameWithExtensionFromPath","name","setInsertion","next","useEffect","positionOf","boundary","announcements","onDragStart","_ref4","active","concat","length","onDragOver","onDragEnd","onDragCancel","position","step","ArrowRight","ArrowLeft","Math","min","max","positionToBoundary","addEventListener","removeEventListener","handleDragMove","_ref3","delta","activatorEvent","startX","clientX","scroller","Number","isNaN","pointerX","x","scrollLeft","filter","midpoint","resolveInsertion","DndContext","accessibility","collisionDetection","args","within","pointerWithin","closestCenter","_ref5","globalThis","KeyboardEvent","Array","from","rect","getBoundingClientRect","left","width","onDragMove","insertAt","_next$splice","moved","list","splice","SortableContext","strategy","horizontalListSortingStrategy","node","createPortal","DragOverlay","dropAnimation","zIndex","dragGhost","dragGhostHandle","ButtonIcon","size","type","DragIcon"],"mappings":"4jLAmCA,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2E,SAAUC,EAA8BnH,SACnEC,EAAA,MAAAb,EAAAA,EAAA,CACEC,IArJe,SAAC+H,GAEtB,GADAvF,EAAYH,QAAU0F,EACH,mBAAR/H,EAAoBA,EAAI+H,QAC9B,GAAI/H,EAAK,CACSA,EACRqC,QAAU0F,CACzB,GAgJM,cAAavG,EACbvB,UAAWC,EAAWC,EAAO0F,SAAU5F,IAClC4B,EAAcnD,EAAAA,GAAAA,EAAqB,QAAW,CAAA,GAAE,GAAA,CAAAiC,SAEpDW,EAAM6B,KAAI,SAACpE,EAAM0E,GAAK,OACrB7C,EAAC/B,EAAY,CAEXE,KAAMA,EACNC,SAAUA,EACVC,QAASA,EACTC,YAAaA,EACbG,QAAmB,IAAVoE,EACTtE,aAAc8C,IAAmBwB,EACjCrE,YAAaqE,IAAUnC,EAAMmD,OAAS,GAAKxC,IAAmBX,EAAMmD,QAP/D1F,EAAKS,YAcjBwI,EACCpH,EAACqH,EAAW,CAACC,cAAe,KAAMC,OA3QjB,KA2Q4CxH,SAC1D2C,IACCxD,EAAA,MAAAC,EAAAA,EAAA,CAAKE,UAAWE,EAAOiI,WAAkB1J,EAAAA,CAAAA,EAAAA,EAAqB,SAAM,CAAA,EAAA,CAAAiC,SAAA,CAClEC,EAACK,EAAc,CAAClC,KAAMuE,KACtB1C,EAAA,MAAA,CAAKX,UAAWE,EAAOkI,gBAAgB1H,SACrCC,EAAC0H,EAAU,CAACC,KAAK,KAAKC,KAAK,aAAahH,OAAO,yBAAwBb,SACrEC,EAAC6H,EAAQ,CAACF,KAAK,oBAMzBhK,SAASC,QAIjB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StoredAttachment } from './useStoredAttachment';
|
|
2
2
|
export type StoredAttachmentPreviewProps = {
|
|
3
|
-
attachment
|
|
4
|
-
|
|
3
|
+
attachment?: StoredAttachment | null;
|
|
4
|
+
attachments?: StoredAttachment[];
|
|
5
5
|
};
|
|
6
|
-
export declare const StoredAttachmentPreview: ({ attachment,
|
|
6
|
+
export declare const StoredAttachmentPreview: ({ attachment, attachments, }: StoredAttachmentPreviewProps) => JSX.Element;
|
|
7
7
|
//# sourceMappingURL=StoredAttachmentPreview.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StoredAttachmentPreview.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentPreview/StoredAttachmentPreview.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"StoredAttachmentPreview.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentPreview/StoredAttachmentPreview.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAIzD,MAAM,MAAM,4BAA4B,GAAG;IACzC,UAAU,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACrC,WAAW,CAAC,EAAE,gBAAgB,EAAE,CAAC;CAClC,CAAC;AAEF,eAAO,MAAM,uBAAuB,iCAGjC,4BAA4B,gBAQ9B,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{useMemo as t}from"react";import{useStoredAttachments as r}from"./useStoredAttachments.js";import{AttachmentPreview as e}from"./AttachmentPreview.js";import{jsx as m}from"react/jsx-runtime";var o=function(o){var n=o.attachment,a=o.attachments,i=t((function(){return null!=a?a:[n].filter(Boolean)}),[a,n]),c=r(i);return m(e,{items:c})};export{o as StoredAttachmentPreview};
|
|
2
2
|
//# sourceMappingURL=StoredAttachmentPreview.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StoredAttachmentPreview.js","sources":["../../../src/components/AttachmentPreview/StoredAttachmentPreview.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"StoredAttachmentPreview.js","sources":["../../../src/components/AttachmentPreview/StoredAttachmentPreview.tsx"],"sourcesContent":["import { useMemo } from 'react';\n\nimport { StoredAttachment } from './useStoredAttachment';\nimport { useStoredAttachments } from './useStoredAttachments';\nimport { AttachmentPreview } from './AttachmentPreview';\n\nexport type StoredAttachmentPreviewProps = {\n attachment?: StoredAttachment | null;\n attachments?: StoredAttachment[];\n};\n\nexport const StoredAttachmentPreview = ({\n attachment,\n attachments,\n}: StoredAttachmentPreviewProps) => {\n const list = useMemo(\n () => attachments ?? ([attachment].filter(Boolean) as StoredAttachment[]),\n [attachments, attachment]\n );\n const items = useStoredAttachments(list);\n\n return <AttachmentPreview items={items} />;\n};\n"],"names":["StoredAttachmentPreview","_ref","attachment","attachments","list","useMemo","filter","Boolean","items","useStoredAttachments","_jsx","AttachmentPreview"],"mappings":"oMAWaA,IAAAA,EAA0B,SAGHC,GAAA,IAFlCC,IAAAA,WACAC,IAAAA,YAEMC,EAAOC,GACX,WAAA,OAAMF,QAAAA,EAAgB,CAACD,GAAYI,OAAOC,QAAQ,GAClD,CAACJ,EAAaD,IAEVM,EAAQC,EAAqBL,GAEnC,OAAOM,EAACC,EAAiB,CAACH,MAAOA,GACnC"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export * from './AttachmentPreview';
|
|
2
|
+
export * from './AttachmentTile';
|
|
2
3
|
export * from './AttachmentPreview.types';
|
|
3
4
|
export * from './getAttachmentKind';
|
|
5
|
+
export * from './useStoredAttachment';
|
|
6
|
+
export * from './useStoredAttachments';
|
|
4
7
|
export * from './StoredAttachmentPreview';
|
|
5
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentPreview/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentPreview/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AttachmentPreviewItem } from './AttachmentPreview.types';
|
|
2
|
+
import type { StoredAttachment } from './useStoredAttachment';
|
|
3
|
+
/**
|
|
4
|
+
* Signs a whole list of stored attachments — the hook-per-file `useStoredAttachment`
|
|
5
|
+
* can't cover a list whose length changes between renders.
|
|
6
|
+
*/
|
|
7
|
+
export declare const useStoredAttachments: (attachments?: StoredAttachment[] | null) => AttachmentPreviewItem[];
|
|
8
|
+
//# sourceMappingURL=useStoredAttachments.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useStoredAttachments.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentPreview/useStoredAttachments.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAEvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AA2B9D;;;GAGG;AACH,eAAO,MAAM,oBAAoB,iBACjB,gBAAgB,EAAE,GAAG,IAAI,KACtC,qBAAqB,EAuCvB,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import r from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/asyncToGenerator";import n from"@babel/runtime/regenerator";import{useState as o,useRef as c,useMemo as a,useEffect as u}from"react";import{getAttachmentKind as i}from"./getAttachmentKind.js";import{getS3DownloadLink as s}from"../../clients/jsonApi/index.js";function p(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,n)}return t}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}var l=function(){var r=t(n.mark((function r(e,t){var o,c;return n.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,s(e,t);case 3:return o=r.sent,c=o.url,r.abrupt("return",c);case 8:return r.prev=8,r.t0=r.catch(0),console.error('Failed to sign attachment "'.concat(e,'"'),r.t0),r.abrupt("return","");case 12:case"end":return r.stop()}}),r,null,[[0,8]])})));return function(e,t){return r.apply(this,arguments)}}(),m=function(){var r=t(n.mark((function r(e,t){var o,c;return n.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,l(e,"inline");case 2:if(o=r.sent,"file"!==t){r.next=9;break}return r.next=6,l(e,"attachment");case 6:r.t0=r.sent,r.next=10;break;case 9:r.t0="";case 10:return c=r.t0,r.abrupt("return",[e,{src:o,downloadUrl:c}]);case 12:case"end":return r.stop()}}),r)})));return function(e,t){return r.apply(this,arguments)}}(),b=function(r){var t=o({}),n=e(t,2),s=n[0],p=n[1],l=c(s);l.current=s;var b=a((function(){return null!=r?r:[]}),[r]),d=b.map((function(r){return r.name})).join("|");return u((function(){var r=b.filter((function(r){return!(r.name in l.current)}));if(r.length){var e=!0;return Promise.all(r.map((function(r){return m(r.name,i(r))}))).then((function(r){e&&p((function(e){return f(f({},e),Object.fromEntries(r))}))})),function(){e=!1}}}),[d]),b.reduce((function(r,e){var t=s[e.name];return null!=t&&t.src?(r.push({id:e.url,name:e.name,src:t.src,kind:i(e),downloadUrl:t.downloadUrl||void 0}),r):r}),[])};export{b as useStoredAttachments};
|
|
2
|
+
//# sourceMappingURL=useStoredAttachments.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useStoredAttachments.js","sources":["../../../src/components/AttachmentPreview/useStoredAttachments.ts"],"sourcesContent":["import { useEffect, useMemo, useRef, useState } from 'react';\n\nimport type { AttachmentPreviewItem } from './AttachmentPreview.types';\nimport { getAttachmentKind } from './getAttachmentKind';\nimport type { StoredAttachment } from './useStoredAttachment';\n\nimport { getS3DownloadLink } from '~/clients/jsonApi';\n\ntype SignedLinks = Record<string, { src: string; downloadUrl: string }>;\n\nconst getSignedLink = async (name: string, disposition: 'attachment' | 'inline') => {\n try {\n const { url } = await getS3DownloadLink(name, disposition);\n\n return url;\n } catch (error) {\n console.error(`Failed to sign attachment \"${name}\"`, error);\n\n return '';\n }\n};\n\nconst sign = async (name: string, kind: string) => {\n const src = await getSignedLink(name, 'inline');\n\n // Only documents get a download action; images and videos skip the extra round trip.\n const downloadUrl = kind === 'file' ? await getSignedLink(name, 'attachment') : '';\n\n return [name, { src, downloadUrl }] as const;\n};\n\n/**\n * Signs a whole list of stored attachments — the hook-per-file `useStoredAttachment`\n * can't cover a list whose length changes between renders.\n */\nexport const useStoredAttachments = (\n attachments?: StoredAttachment[] | null\n): AttachmentPreviewItem[] => {\n const [links, setLinks] = useState<SignedLinks>({});\n const linksRef = useRef(links);\n linksRef.current = links;\n\n const list = useMemo(() => attachments ?? [], [attachments]);\n const key = list.map(attachment => attachment.name).join('|');\n\n useEffect(() => {\n const pending = list.filter(attachment => !(attachment.name in linksRef.current));\n if (!pending.length) return undefined;\n\n let isActive = true;\n Promise.all(\n pending.map(attachment => sign(attachment.name, getAttachmentKind(attachment)))\n ).then(resolved => {\n if (isActive) setLinks(prev => ({ ...prev, ...Object.fromEntries(resolved) }));\n });\n\n return () => {\n isActive = false;\n };\n // `key` tracks the list contents; `list` itself is a fresh array on every render.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [key]);\n\n return list.reduce<AttachmentPreviewItem[]>((acc, attachment) => {\n const link = links[attachment.name];\n if (!link?.src) return acc;\n\n acc.push({\n id: attachment.url,\n name: attachment.name,\n src: link.src,\n kind: getAttachmentKind(attachment),\n downloadUrl: link.downloadUrl || undefined,\n });\n return acc;\n }, []);\n};\n"],"names":["getSignedLink","_ref","_asyncToGenerator","_regeneratorRuntime","mark","_callee","name","disposition","_yield$getS3DownloadL","url","wrap","_context","prev","next","getS3DownloadLink","sent","abrupt","t0","console","error","stop","_x","_x2","apply","this","arguments","sign","_ref2","_callee2","kind","src","downloadUrl","_context2","_x3","_x4","useStoredAttachments","attachments","_useState","useState","_useState2","_slicedToArray","links","setLinks","linksRef","useRef","current","list","useMemo","key","map","attachment","join","useEffect","pending","filter","length","isActive","Promise","all","getAttachmentKind","then","resolved","_objectSpread","Object","fromEntries","reduce","acc","link","push","id","undefined"],"mappings":"g9BAUA,IAAMA,EAAa,WAAA,IAAGC,EAAAC,EAAAC,EAAAC,MAAA,SAAAC,EAAOC,EAAcC,GAAoC,IAAAC,EAAAC,EAAA,OAAAN,EAAAO,MAAA,SAAAC,GAAA,OAAA,OAAAA,EAAAC,KAAAD,EAAAE,MAAA,KAAA,EAAA,OAAAF,EAAAC,KAAA,EAAAD,EAAAE,KAAA,EAErDC,EAAkBR,EAAMC,GAAY,KAAA,EAA/C,OAA+CC,EAAAG,EAAAI,KAAlDN,IAAAA,IAAGE,EAAAK,OAAA,SAEJP,GAAG,KAAA,EAEkD,OAFlDE,EAAAC,KAAA,EAAAD,EAAAM,GAAAN,EAAA,MAAA,GAEVO,QAAQC,MAAoCb,8BAAAA,OAAAA,EAAe,KAAAK,EAAAM,IAACN,EAAAK,OAAA,SAErD,IAAE,KAAA,GAAA,IAAA,MAAA,OAAAL,EAAAS,OAAA,GAAAf,EAAA,KAAA,CAAA,CAAA,EAAA,IAEZ,KAAA,OAAA,SAVkBgB,EAAAC,GAAA,OAAArB,EAAAsB,MAAAC,KAAAC,UAAA,CAAA,CAAA,GAYbC,EAAI,WAAA,IAAGC,EAAAzB,EAAAC,EAAAC,MAAA,SAAAwB,EAAOt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