@corva/ui 3.74.0-0 → 3.74.0-10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/AssetEditor/AssetEditorAutocomplete.js +1 -1
- package/cjs-bundle/components/AssetEditor/AssetEditorAutocomplete.js.map +1 -1
- package/cjs-bundle/components/AssetEditorV2/index.js +1 -1
- package/cjs-bundle/components/AssetEditorV2/index.js.map +1 -1
- package/cjs-bundle/components/AttachmentLightbox/AttachmentDocument.js +2 -0
- package/cjs-bundle/components/AttachmentLightbox/AttachmentDocument.js.map +1 -0
- package/cjs-bundle/components/AttachmentLightbox/AttachmentLightbox.js +1 -1
- package/cjs-bundle/components/AttachmentLightbox/AttachmentLightbox.js.map +1 -1
- package/cjs-bundle/components/AttachmentLightbox/AttachmentLightbox.scss.js +1 -1
- package/cjs-bundle/components/AttachmentLightbox/AttachmentPreviewPane.js +2 -0
- package/cjs-bundle/components/AttachmentLightbox/AttachmentPreviewPane.js.map +1 -0
- package/cjs-bundle/components/AttachmentLightbox/copyImageToClipboard.js +2 -0
- package/cjs-bundle/components/AttachmentLightbox/copyImageToClipboard.js.map +1 -0
- package/cjs-bundle/components/AttachmentLightbox/downloadAttachment.js +2 -0
- package/cjs-bundle/components/AttachmentLightbox/downloadAttachment.js.map +1 -0
- package/cjs-bundle/components/AttachmentLightbox/useAttachmentLightbox.js +1 -1
- package/cjs-bundle/components/AttachmentLightbox/useAttachmentLightbox.js.map +1 -1
- package/cjs-bundle/components/AttachmentLightbox/useZoomPan.js +2 -0
- package/cjs-bundle/components/AttachmentLightbox/useZoomPan.js.map +1 -0
- package/cjs-bundle/components/AttachmentPreview/AttachmentActionsMenu.js +2 -0
- package/cjs-bundle/components/AttachmentPreview/AttachmentActionsMenu.js.map +1 -0
- package/cjs-bundle/components/AttachmentPreview/AttachmentDownloadLink.js +2 -0
- package/cjs-bundle/components/AttachmentPreview/AttachmentDownloadLink.js.map +1 -0
- package/cjs-bundle/components/AttachmentPreview/AttachmentImage.js +2 -0
- package/cjs-bundle/components/AttachmentPreview/AttachmentImage.js.map +1 -0
- package/cjs-bundle/components/AttachmentPreview/AttachmentPreview.js +1 -1
- package/cjs-bundle/components/AttachmentPreview/AttachmentPreview.js.map +1 -1
- package/cjs-bundle/components/AttachmentPreview/AttachmentPreview.scss.js +1 -1
- package/cjs-bundle/components/AttachmentPreview/AttachmentRow.js +1 -1
- package/cjs-bundle/components/AttachmentPreview/AttachmentRow.js.map +1 -1
- package/cjs-bundle/components/AttachmentPreview/AttachmentTile.js +1 -1
- package/cjs-bundle/components/AttachmentPreview/AttachmentTile.js.map +1 -1
- package/cjs-bundle/components/AttachmentPreview/useStoredAttachment.js +2 -0
- package/cjs-bundle/components/AttachmentPreview/useStoredAttachment.js.map +1 -0
- package/cjs-bundle/components/AttachmentPreview/useStoredAttachments.js +1 -1
- package/cjs-bundle/components/AttachmentPreview/useStoredAttachments.js.map +1 -1
- package/cjs-bundle/components/BICOffsetPickerDialog/index.js +1 -1
- package/cjs-bundle/components/BICOffsetPickerDialog/index.js.map +1 -1
- package/cjs-bundle/components/Casing/CasingTableV2/components/CasingJoints/Editor.js +1 -1
- package/cjs-bundle/components/Casing/CasingTableV2/components/CasingJoints/Editor.js.map +1 -1
- package/cjs-bundle/components/Casing/CasingTableV2/components/Component.js +1 -1
- package/cjs-bundle/components/Casing/CasingTableV2/components/Component.js.map +1 -1
- package/cjs-bundle/components/Casing/CasingTableV2/components/DrillPipe/Editor.js +1 -1
- package/cjs-bundle/components/Casing/CasingTableV2/components/DrillPipe/Editor.js.map +1 -1
- package/cjs-bundle/components/CollapsableSidebar.js +1 -1
- package/cjs-bundle/components/CollapsableSidebar.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/CommentCardReactions.js +1 -1
- package/cjs-bundle/components/CommentCard/CommentCardReactions.js.map +1 -1
- package/cjs-bundle/components/CommentCard/CommentMenu.js +1 -1
- package/cjs-bundle/components/CommentCard/CommentMenu.js.map +1 -1
- package/cjs-bundle/components/CommentComposer/CommentComposer.js +1 -1
- package/cjs-bundle/components/CommentComposer/CommentComposer.js.map +1 -1
- package/cjs-bundle/components/CommentComposer/CommentReplyInput.js +1 -1
- package/cjs-bundle/components/CommentComposer/CommentReplyInput.js.map +1 -1
- package/cjs-bundle/components/CommentComposer/ShareToChatRow.js +1 -1
- package/cjs-bundle/components/CommentComposer/ShareToChatRow.js.map +1 -1
- package/cjs-bundle/components/CommentComposer/useAttachmentUpload.js +1 -1
- package/cjs-bundle/components/CommentComposer/useAttachmentUpload.js.map +1 -1
- package/cjs-bundle/components/CommentInputNext/CommentInputNext.js +1 -1
- package/cjs-bundle/components/CommentInputNext/CommentInputNext.js.map +1 -1
- package/cjs-bundle/components/CommentInputNext/useFilePaste.js +2 -0
- package/cjs-bundle/components/CommentInputNext/useFilePaste.js.map +1 -0
- package/cjs-bundle/components/DevCenter/AppsDataProvider/AppsDataProvider.js +1 -1
- package/cjs-bundle/components/DevCenter/AppsDataProvider/AppsDataProvider.js.map +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js.map +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.js +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.js.map +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js.map +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.js +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.js.map +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/effects/useAppMaximized.js +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/effects/useAppMaximized.js.map +1 -1
- package/cjs-bundle/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js +1 -1
- package/cjs-bundle/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js.map +1 -1
- package/cjs-bundle/components/DevCenter/IsolatedDevCenterAppContainer/useFullscreenModes.js +2 -0
- package/cjs-bundle/components/DevCenter/IsolatedDevCenterAppContainer/useFullscreenModes.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/FeedItem/FeedItem.js +1 -1
- package/cjs-bundle/components/FeedItem/FeedItem.js.map +1 -1
- package/cjs-bundle/components/FeedItem/components/FeedComments.js +1 -1
- package/cjs-bundle/components/FeedItem/components/FeedComments.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/KeyboardDateTimePicker.js +1 -1
- package/cjs-bundle/components/KeyboardDateTimePicker.js.map +1 -1
- package/cjs-bundle/components/LinkedText/LinkedText.js +2 -0
- package/cjs-bundle/components/LinkedText/LinkedText.js.map +1 -0
- package/cjs-bundle/components/LinkedText/LinkedText.scss.js +2 -0
- package/cjs-bundle/components/LinkedText/LinkedText.scss.js.map +1 -0
- package/cjs-bundle/components/NewDocumentViewer/utils.js +1 -1
- package/cjs-bundle/components/NewDocumentViewer/utils.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/index.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/index.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/index.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/index.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/WellHubView/index.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/WellHubView/index.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/AppHeader/components/HeaderActions/HeaderActions.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/AppHeader/components/HeaderActions/HeaderActions.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/AppHeader/components/LoadAllWellsToggle/LoadAllWellsToggle.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/AppHeader/components/LoadAllWellsToggle/LoadAllWellsToggle.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/Filter.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/Filter.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/Filter/components/PeriodFilterSelect/PeriodFilterSelect.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/PeriodFilterSelect/PeriodFilterSelect.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/SingleFilterSelect/SingleFilterSelect.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/SingleFilterSelect/SingleFilterSelect.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/ClusterTooltip/ClusterTooltip.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/ClusterTooltip/ClusterTooltip.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/LayerSwitcher/LayerSwitcher.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/LayerSwitcher/LayerSwitcher.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapControls/MapControls.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapControls/MapControls.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapHints/MapHintsStash.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapHints/MapHintsStash.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/SubjectWellMarker/SubjectWellMarker.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/SubjectWellMarker/SubjectWellMarker.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/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AssetResultSection/AssetResultSection.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AssetResultSection/AssetResultSection.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AutoCompleteAssetSearch/AutoCompleteAssetSearch.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AutoCompleteAssetSearch/AutoCompleteAssetSearch.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/CompanyCell/CompanyCell.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/CompanyCell/CompanyCell.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/FormationCell/FormationCell.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/FormationCell/FormationCell.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/InterventionAssetCell/InterventionAssetCell.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/InterventionAssetCell/InterventionAssetCell.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/PadNameCell/PadNameCell.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/PadNameCell/PadNameCell.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/RigCell/RigCell.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/RigCell/RigCell.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/WellNameCell/WellNameCell.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/WellNameCell/WellNameCell.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/SettingsMenu.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/SettingsMenu.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/MetricsSettingsSection/MetricsSettingsSection.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/MetricsSettingsSection/MetricsSettingsSection.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/TableSettingsSection/TableSettingsSection.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/TableSettingsSection/TableSettingsSection.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/WellNameHeaderCell/WellNameHeaderCell.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/WellNameHeaderCell/WellNameHeaderCell.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/PickerModalActions/PickerModalActions.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/PickerModalActions/PickerModalActions.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/Popover/Popover.js +1 -1
- package/cjs-bundle/components/Popover/Popover.js.map +1 -1
- package/cjs-bundle/components/Popper/Popper.js +1 -1
- package/cjs-bundle/components/Popper/Popper.js.map +1 -1
- package/cjs-bundle/components/PostInput/PostInput.js +1 -1
- package/cjs-bundle/components/PostInput/PostInput.js.map +1 -1
- package/cjs-bundle/components/RealTimeValuesSidebar/SidebarFooter.js +1 -1
- package/cjs-bundle/components/RealTimeValuesSidebar/SidebarFooter.js.map +1 -1
- package/cjs-bundle/components/UserMention/constants.js +1 -1
- package/cjs-bundle/components/UserMention/constants.js.map +1 -1
- package/cjs-bundle/components/UserMention/index.js +1 -1
- package/cjs-bundle/components/UserMention/index.js.map +1 -1
- package/cjs-bundle/components/index.js +1 -1
- package/cjs-bundle/componentsV2/AppCommonsProvider/AppCommonsContext.js.map +1 -1
- package/cjs-bundle/componentsV2/AppCommonsProvider/utils.js +1 -1
- package/cjs-bundle/componentsV2/AppCommonsProvider/utils.js.map +1 -1
- package/cjs-bundle/componentsV2/AppHeader/V3/Actions/Actions.constants.js +1 -1
- package/cjs-bundle/componentsV2/AppHeader/V3/Actions/Actions.constants.js.map +1 -1
- package/cjs-bundle/componentsV2/AppHeader/V3/Actions/Actions.js +1 -1
- package/cjs-bundle/componentsV2/AppHeader/V3/Actions/Actions.js.map +1 -1
- package/cjs-bundle/componentsV2/AppHeader/V3/AppHeaderV3.js +1 -1
- package/cjs-bundle/componentsV2/AppHeader/V3/AppHeaderV3.js.map +1 -1
- package/cjs-bundle/componentsV2/ButtonIcon/ButtonIcon.js +1 -1
- package/cjs-bundle/componentsV2/ButtonIcon/ButtonIcon.js.map +1 -1
- package/cjs-bundle/componentsV2/ButtonIcon/ButtonIcon.scss.js +1 -1
- package/cjs-bundle/componentsV2/Chip/Chip.js +1 -1
- package/cjs-bundle/componentsV2/Chip/Chip.js.map +1 -1
- package/cjs-bundle/componentsV2/ColorPicker/ColorPicker.js +1 -1
- package/cjs-bundle/componentsV2/ColorPicker/ColorPicker.js.map +1 -1
- package/cjs-bundle/componentsV2/ColorPicker/ColorPicker.scss.js +1 -1
- package/cjs-bundle/componentsV2/ColorPicker/OpacityDragtracker/OpacityDragtracker.js +1 -1
- package/cjs-bundle/componentsV2/ColorPicker/OpacityDragtracker/OpacityDragtracker.js.map +1 -1
- package/cjs-bundle/componentsV2/ColorPicker/Swatches/Swatches.scss.js +1 -1
- package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/Map/Map.js +1 -1
- package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/Map/Map.js.map +1 -1
- package/cjs-bundle/componentsV2/InterventionEventSelector/InterventionEventSelector.js +2 -0
- package/cjs-bundle/componentsV2/InterventionEventSelector/InterventionEventSelector.js.map +1 -0
- package/cjs-bundle/componentsV2/InterventionEventSelector/InterventionEventSelector.scss.js +2 -0
- package/cjs-bundle/componentsV2/InterventionEventSelector/InterventionEventSelector.scss.js.map +1 -0
- package/cjs-bundle/componentsV2/InterventionEventSelector/useInterventionUnitEvents.js +2 -0
- package/cjs-bundle/componentsV2/InterventionEventSelector/useInterventionUnitEvents.js.map +1 -0
- package/cjs-bundle/componentsV2/InterventionEventSelector/utils.js +2 -0
- package/cjs-bundle/componentsV2/InterventionEventSelector/utils.js.map +1 -0
- package/cjs-bundle/componentsV2/Modal/Modal.js +1 -1
- package/cjs-bundle/componentsV2/Modal/Modal.js.map +1 -1
- package/cjs-bundle/componentsV2/Modal/constants.js +2 -0
- package/cjs-bundle/componentsV2/Modal/constants.js.map +1 -0
- package/cjs-bundle/componentsV2/WellArchivedMessage/WellArchivedMessage.js +1 -1
- package/cjs-bundle/componentsV2/WellArchivedMessage/WellArchivedMessage.js.map +1 -1
- package/cjs-bundle/componentsV2/index.js +1 -1
- package/cjs-bundle/effects/useOutsideClick.js +1 -1
- package/cjs-bundle/effects/useOutsideClick.js.map +1 -1
- package/cjs-bundle/testing/AppTestWrapper/AppTestWrapper.js +1 -1
- package/cjs-bundle/testing/AppTestWrapper/AppTestWrapper.js.map +1 -1
- package/cjs-bundle/utils/devcenter.js +1 -1
- package/cjs-bundle/utils/devcenter.js.map +1 -1
- package/cjs-bundle/utils/fetchAttachment.js +2 -0
- package/cjs-bundle/utils/fetchAttachment.js.map +1 -0
- package/cjs-bundle/utils/fileExtension.js +1 -1
- package/cjs-bundle/utils/fileExtension.js.map +1 -1
- package/cjs-bundle/utils/links.js +2 -0
- package/cjs-bundle/utils/links.js.map +1 -0
- package/components/AddComment/Popover.js +1 -1
- package/components/AddComment/Popover.js.map +1 -1
- package/components/AddComment/components/Content.js +1 -1
- package/components/AddComment/components/Content.js.map +1 -1
- package/components/AssetEditor/AssetEditorAutocomplete.d.ts +96 -13
- package/components/AssetEditor/AssetEditorAutocomplete.d.ts.map +1 -1
- package/components/AssetEditor/AssetEditorAutocomplete.js +1 -1
- package/components/AssetEditor/AssetEditorAutocomplete.js.map +1 -1
- package/components/AssetEditorV2/index.d.ts +28 -12
- package/components/AssetEditorV2/index.d.ts.map +1 -1
- package/components/AssetEditorV2/index.js +1 -1
- package/components/AssetEditorV2/index.js.map +1 -1
- package/components/AttachmentLightbox/AttachmentDocument.d.ts +6 -0
- package/components/AttachmentLightbox/AttachmentDocument.d.ts.map +1 -0
- package/components/AttachmentLightbox/AttachmentDocument.js +2 -0
- package/components/AttachmentLightbox/AttachmentDocument.js.map +1 -0
- package/components/AttachmentLightbox/AttachmentLightbox.d.ts +9 -8
- package/components/AttachmentLightbox/AttachmentLightbox.d.ts.map +1 -1
- package/components/AttachmentLightbox/AttachmentLightbox.js +1 -1
- package/components/AttachmentLightbox/AttachmentLightbox.js.map +1 -1
- package/components/AttachmentLightbox/AttachmentLightbox.scss.js +1 -1
- package/components/AttachmentLightbox/AttachmentPreviewPane.d.ts +9 -0
- package/components/AttachmentLightbox/AttachmentPreviewPane.d.ts.map +1 -0
- package/components/AttachmentLightbox/AttachmentPreviewPane.js +2 -0
- package/components/AttachmentLightbox/AttachmentPreviewPane.js.map +1 -0
- package/components/AttachmentLightbox/__tests__/AttachmentDocument.test.d.ts +2 -0
- package/components/AttachmentLightbox/__tests__/AttachmentDocument.test.d.ts.map +1 -0
- package/components/AttachmentLightbox/__tests__/AttachmentLightbox.test.d.ts +2 -0
- package/components/AttachmentLightbox/__tests__/AttachmentLightbox.test.d.ts.map +1 -0
- package/components/AttachmentLightbox/__tests__/copyImageToClipboard.test.d.ts +2 -0
- package/components/AttachmentLightbox/__tests__/copyImageToClipboard.test.d.ts.map +1 -0
- package/components/AttachmentLightbox/__tests__/downloadAttachment.test.d.ts +2 -0
- package/components/AttachmentLightbox/__tests__/downloadAttachment.test.d.ts.map +1 -0
- package/components/AttachmentLightbox/__tests__/useZoomPan.test.d.ts +2 -0
- package/components/AttachmentLightbox/__tests__/useZoomPan.test.d.ts.map +1 -0
- package/components/AttachmentLightbox/copyImageToClipboard.d.ts +4 -0
- package/components/AttachmentLightbox/copyImageToClipboard.d.ts.map +1 -0
- package/components/AttachmentLightbox/copyImageToClipboard.js +2 -0
- package/components/AttachmentLightbox/copyImageToClipboard.js.map +1 -0
- package/components/AttachmentLightbox/downloadAttachment.d.ts +10 -0
- package/components/AttachmentLightbox/downloadAttachment.d.ts.map +1 -0
- package/components/AttachmentLightbox/downloadAttachment.js +2 -0
- package/components/AttachmentLightbox/downloadAttachment.js.map +1 -0
- package/components/AttachmentLightbox/useAttachmentLightbox.d.ts +6 -2
- package/components/AttachmentLightbox/useAttachmentLightbox.d.ts.map +1 -1
- package/components/AttachmentLightbox/useAttachmentLightbox.js +1 -1
- package/components/AttachmentLightbox/useAttachmentLightbox.js.map +1 -1
- package/components/AttachmentLightbox/useZoomPan.d.ts +29 -0
- package/components/AttachmentLightbox/useZoomPan.d.ts.map +1 -0
- package/components/AttachmentLightbox/useZoomPan.js +2 -0
- package/components/AttachmentLightbox/useZoomPan.js.map +1 -0
- package/components/AttachmentPreview/AttachmentActionsMenu.d.ts +16 -0
- package/components/AttachmentPreview/AttachmentActionsMenu.d.ts.map +1 -0
- package/components/AttachmentPreview/AttachmentActionsMenu.js +2 -0
- package/components/AttachmentPreview/AttachmentActionsMenu.js.map +1 -0
- package/components/AttachmentPreview/AttachmentDownloadLink.d.ts +11 -0
- package/components/AttachmentPreview/AttachmentDownloadLink.d.ts.map +1 -0
- package/components/AttachmentPreview/AttachmentDownloadLink.js +2 -0
- package/components/AttachmentPreview/AttachmentDownloadLink.js.map +1 -0
- package/components/AttachmentPreview/AttachmentImage.d.ts +12 -0
- package/components/AttachmentPreview/AttachmentImage.d.ts.map +1 -0
- package/components/AttachmentPreview/AttachmentImage.js +2 -0
- package/components/AttachmentPreview/AttachmentImage.js.map +1 -0
- package/components/AttachmentPreview/AttachmentPreview.d.ts.map +1 -1
- package/components/AttachmentPreview/AttachmentPreview.js +1 -1
- package/components/AttachmentPreview/AttachmentPreview.js.map +1 -1
- package/components/AttachmentPreview/AttachmentPreview.scss.js +1 -1
- package/components/AttachmentPreview/AttachmentPreview.types.d.ts +7 -0
- package/components/AttachmentPreview/AttachmentPreview.types.d.ts.map +1 -1
- package/components/AttachmentPreview/AttachmentRow.d.ts +7 -3
- package/components/AttachmentPreview/AttachmentRow.d.ts.map +1 -1
- package/components/AttachmentPreview/AttachmentRow.js +1 -1
- package/components/AttachmentPreview/AttachmentRow.js.map +1 -1
- package/components/AttachmentPreview/AttachmentTile.d.ts +5 -1
- package/components/AttachmentPreview/AttachmentTile.d.ts.map +1 -1
- package/components/AttachmentPreview/AttachmentTile.js +1 -1
- package/components/AttachmentPreview/AttachmentTile.js.map +1 -1
- package/components/AttachmentPreview/__tests__/AttachmentActionsMenu.test.d.ts +2 -0
- package/components/AttachmentPreview/__tests__/AttachmentActionsMenu.test.d.ts.map +1 -0
- package/components/AttachmentPreview/__tests__/AttachmentDownloadLink.test.d.ts +2 -0
- package/components/AttachmentPreview/__tests__/AttachmentDownloadLink.test.d.ts.map +1 -0
- package/components/AttachmentPreview/__tests__/AttachmentImage.test.d.ts +2 -0
- package/components/AttachmentPreview/__tests__/AttachmentImage.test.d.ts.map +1 -0
- package/components/AttachmentPreview/__tests__/AttachmentTile.test.d.ts +2 -0
- package/components/AttachmentPreview/__tests__/AttachmentTile.test.d.ts.map +1 -0
- package/components/AttachmentPreview/__tests__/useStoredAttachments.test.d.ts +2 -0
- package/components/AttachmentPreview/__tests__/useStoredAttachments.test.d.ts.map +1 -0
- package/components/AttachmentPreview/useStoredAttachment.d.ts +8 -0
- package/components/AttachmentPreview/useStoredAttachment.d.ts.map +1 -1
- package/components/AttachmentPreview/useStoredAttachment.js +2 -0
- package/components/AttachmentPreview/useStoredAttachment.js.map +1 -0
- package/components/AttachmentPreview/useStoredAttachments.d.ts +1 -1
- package/components/AttachmentPreview/useStoredAttachments.d.ts.map +1 -1
- package/components/AttachmentPreview/useStoredAttachments.js +1 -1
- package/components/AttachmentPreview/useStoredAttachments.js.map +1 -1
- package/components/BICOffsetPickerDialog/index.js +1 -1
- package/components/BICOffsetPickerDialog/index.js.map +1 -1
- package/components/Casing/CasingTableV2/components/CasingJoints/Editor.js +1 -1
- package/components/Casing/CasingTableV2/components/CasingJoints/Editor.js.map +1 -1
- package/components/Casing/CasingTableV2/components/Component.js +1 -1
- package/components/Casing/CasingTableV2/components/Component.js.map +1 -1
- package/components/Casing/CasingTableV2/components/DrillPipe/Editor.js +1 -1
- package/components/Casing/CasingTableV2/components/DrillPipe/Editor.js.map +1 -1
- package/components/CollapsableSidebar.js +1 -1
- package/components/CollapsableSidebar.js.map +1 -1
- package/components/CommentCard/CommentCard.d.ts.map +1 -1
- package/components/CommentCard/CommentCard.js +1 -1
- package/components/CommentCard/CommentCard.js.map +1 -1
- package/components/CommentCard/CommentCard.types.d.ts +2 -0
- package/components/CommentCard/CommentCard.types.d.ts.map +1 -1
- package/components/CommentCard/CommentCardReactions.js +1 -1
- package/components/CommentCard/CommentCardReactions.js.map +1 -1
- package/components/CommentCard/CommentMenu.d.ts.map +1 -1
- package/components/CommentCard/CommentMenu.js +1 -1
- package/components/CommentCard/CommentMenu.js.map +1 -1
- package/components/CommentComposer/CommentComposer.d.ts.map +1 -1
- package/components/CommentComposer/CommentComposer.js +1 -1
- package/components/CommentComposer/CommentComposer.js.map +1 -1
- package/components/CommentComposer/CommentReplyInput.d.ts.map +1 -1
- package/components/CommentComposer/CommentReplyInput.js +1 -1
- package/components/CommentComposer/CommentReplyInput.js.map +1 -1
- package/components/CommentComposer/ShareToChatRow.js +1 -1
- package/components/CommentComposer/ShareToChatRow.js.map +1 -1
- package/components/CommentComposer/__tests__/useAttachmentUpload.linked.test.d.ts +2 -0
- package/components/CommentComposer/__tests__/useAttachmentUpload.linked.test.d.ts.map +1 -0
- package/components/CommentComposer/useAttachmentUpload.d.ts +1 -0
- package/components/CommentComposer/useAttachmentUpload.d.ts.map +1 -1
- package/components/CommentComposer/useAttachmentUpload.js +1 -1
- package/components/CommentComposer/useAttachmentUpload.js.map +1 -1
- package/components/CommentInputNext/CommentInputNext.d.ts +2 -0
- package/components/CommentInputNext/CommentInputNext.d.ts.map +1 -1
- package/components/CommentInputNext/CommentInputNext.js +1 -1
- package/components/CommentInputNext/CommentInputNext.js.map +1 -1
- package/components/CommentInputNext/__tests__/useFilePaste.test.d.ts +2 -0
- package/components/CommentInputNext/__tests__/useFilePaste.test.d.ts.map +1 -0
- package/components/CommentInputNext/useFilePaste.d.ts +17 -0
- package/components/CommentInputNext/useFilePaste.d.ts.map +1 -0
- package/components/CommentInputNext/useFilePaste.js +2 -0
- package/components/CommentInputNext/useFilePaste.js.map +1 -0
- package/components/DevCenter/AppsDataProvider/AppsDataProvider.d.ts +5 -1
- package/components/DevCenter/AppsDataProvider/AppsDataProvider.d.ts.map +1 -1
- package/components/DevCenter/AppsDataProvider/AppsDataProvider.js +1 -1
- package/components/DevCenter/AppsDataProvider/AppsDataProvider.js.map +1 -1
- package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.d.ts +9 -1
- package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.d.ts.map +1 -1
- package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js.map +1 -1
- package/components/DevCenter/DevCenterAppContainer/__tests__/DevCenterAppContainer.registerAITools.test.d.ts +2 -0
- package/components/DevCenter/DevCenterAppContainer/__tests__/DevCenterAppContainer.registerAITools.test.d.ts.map +1 -0
- package/components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.js.map +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js.map +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.js.map +1 -1
- package/components/DevCenter/DevCenterAppContainer/effects/useAppMaximized.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/effects/useAppMaximized.js.map +1 -1
- package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.d.ts.map +1 -1
- package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js +1 -1
- package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js.map +1 -1
- package/components/DevCenter/IsolatedDevCenterAppContainer/__tests__/useFullscreenModes.test.d.ts +2 -0
- package/components/DevCenter/IsolatedDevCenterAppContainer/__tests__/useFullscreenModes.test.d.ts.map +1 -0
- package/components/DevCenter/IsolatedDevCenterAppContainer/useFullscreenModes.d.ts +10 -0
- package/components/DevCenter/IsolatedDevCenterAppContainer/useFullscreenModes.d.ts.map +1 -0
- package/components/DevCenter/IsolatedDevCenterAppContainer/useFullscreenModes.js +2 -0
- package/components/DevCenter/IsolatedDevCenterAppContainer/useFullscreenModes.js.map +1 -0
- package/components/DocumentViewer/DocumentViewer.js +1 -1
- package/components/DocumentViewer/DocumentViewer.js.map +1 -1
- package/components/Drillstring/BHAComponentDetail/constants.d.ts +2 -2
- 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/FeedItem/FeedItem.js +1 -1
- package/components/FeedItem/FeedItem.js.map +1 -1
- package/components/FeedItem/components/FeedComments.js +1 -1
- package/components/FeedItem/components/FeedComments.js.map +1 -1
- package/components/IconMenu/index.d.ts +67 -21
- package/components/IconMenu/index.d.ts.map +1 -1
- package/components/IconMenu/index.js +1 -1
- package/components/IconMenu/index.js.map +1 -1
- package/components/KeyboardDateTimePicker.d.ts +6 -7
- package/components/KeyboardDateTimePicker.d.ts.map +1 -1
- package/components/KeyboardDateTimePicker.js +1 -1
- package/components/KeyboardDateTimePicker.js.map +1 -1
- package/components/LinkedText/LinkedText.d.ts +17 -0
- package/components/LinkedText/LinkedText.d.ts.map +1 -0
- package/components/LinkedText/LinkedText.js +2 -0
- package/components/LinkedText/LinkedText.js.map +1 -0
- package/components/LinkedText/LinkedText.scss.js +2 -0
- package/components/LinkedText/LinkedText.scss.js.map +1 -0
- package/components/LinkedText/__tests__/LinkedText.test.d.ts +2 -0
- package/components/LinkedText/__tests__/LinkedText.test.d.ts.map +1 -0
- package/components/LinkedText/index.d.ts +2 -0
- package/components/LinkedText/index.d.ts.map +1 -0
- package/components/NewDocumentViewer/utils.d.ts.map +1 -1
- package/components/NewDocumentViewer/utils.js +1 -1
- package/components/NewDocumentViewer/utils.js.map +1 -1
- package/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js +1 -1
- package/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js.map +1 -1
- package/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js +1 -1
- package/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js.map +1 -1
- package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js +1 -1
- package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js.map +1 -1
- package/components/OffsetWellPickerV3/components/CustomSelectionView/index.js +1 -1
- package/components/OffsetWellPickerV3/components/CustomSelectionView/index.js.map +1 -1
- package/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js +1 -1
- package/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js.map +1 -1
- package/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js +1 -1
- package/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js.map +1 -1
- package/components/OffsetWellPickerV3/components/TabSelection/index.js +1 -1
- package/components/OffsetWellPickerV3/components/TabSelection/index.js.map +1 -1
- package/components/OffsetWellPickerV3/components/WellHubView/index.js +1 -1
- package/components/OffsetWellPickerV3/components/WellHubView/index.js.map +1 -1
- package/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js +1 -1
- package/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js.map +1 -1
- package/components/OffsetWellPickerV5/components/AppHeader/components/HeaderActions/HeaderActions.js +1 -1
- package/components/OffsetWellPickerV5/components/AppHeader/components/HeaderActions/HeaderActions.js.map +1 -1
- package/components/OffsetWellPickerV5/components/AppHeader/components/LoadAllWellsToggle/LoadAllWellsToggle.js +1 -1
- package/components/OffsetWellPickerV5/components/AppHeader/components/LoadAllWellsToggle/LoadAllWellsToggle.js.map +1 -1
- package/components/OffsetWellPickerV5/components/Filter/Filter.js +1 -1
- package/components/OffsetWellPickerV5/components/Filter/Filter.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/Filter/components/PeriodFilterSelect/PeriodFilterSelect.js +1 -1
- package/components/OffsetWellPickerV5/components/Filter/components/PeriodFilterSelect/PeriodFilterSelect.js.map +1 -1
- package/components/OffsetWellPickerV5/components/Filter/components/SingleFilterSelect/SingleFilterSelect.js +1 -1
- package/components/OffsetWellPickerV5/components/Filter/components/SingleFilterSelect/SingleFilterSelect.js.map +1 -1
- package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/ClusterTooltip/ClusterTooltip.js +1 -1
- package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/ClusterTooltip/ClusterTooltip.js.map +1 -1
- package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/LayerSwitcher/LayerSwitcher.js +1 -1
- package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/LayerSwitcher/LayerSwitcher.js.map +1 -1
- package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapControls/MapControls.js +1 -1
- package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapControls/MapControls.js.map +1 -1
- package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapHints/MapHintsStash.js +1 -1
- package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapHints/MapHintsStash.js.map +1 -1
- package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/SubjectWellMarker/SubjectWellMarker.js +1 -1
- package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/SubjectWellMarker/SubjectWellMarker.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/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AssetResultSection/AssetResultSection.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AssetResultSection/AssetResultSection.js.map +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AutoCompleteAssetSearch/AutoCompleteAssetSearch.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AutoCompleteAssetSearch/AutoCompleteAssetSearch.js.map +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/CompanyCell/CompanyCell.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/CompanyCell/CompanyCell.js.map +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/FormationCell/FormationCell.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/FormationCell/FormationCell.js.map +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/InterventionAssetCell/InterventionAssetCell.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/InterventionAssetCell/InterventionAssetCell.js.map +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/PadNameCell/PadNameCell.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/PadNameCell/PadNameCell.js.map +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/RigCell/RigCell.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/RigCell/RigCell.js.map +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/WellNameCell/WellNameCell.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/WellNameCell/WellNameCell.js.map +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/SettingsMenu.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/SettingsMenu.js.map +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/MetricsSettingsSection/MetricsSettingsSection.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/MetricsSettingsSection/MetricsSettingsSection.js.map +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/TableSettingsSection/TableSettingsSection.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/TableSettingsSection/TableSettingsSection.js.map +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/WellNameHeaderCell/WellNameHeaderCell.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/WellNameHeaderCell/WellNameHeaderCell.js.map +1 -1
- package/components/OffsetWellPickerV5/components/PickerModalActions/PickerModalActions.js +1 -1
- package/components/OffsetWellPickerV5/components/PickerModalActions/PickerModalActions.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/Popover/Popover.js +1 -1
- package/components/Popover/Popover.js.map +1 -1
- package/components/Popper/Popper.js +1 -1
- package/components/Popper/Popper.js.map +1 -1
- package/components/PostInput/PostInput.d.ts +20 -10
- package/components/PostInput/PostInput.d.ts.map +1 -1
- package/components/PostInput/PostInput.js +1 -1
- package/components/PostInput/PostInput.js.map +1 -1
- package/components/RealTimeValuesSidebar/SidebarFooter.js +1 -1
- package/components/RealTimeValuesSidebar/SidebarFooter.js.map +1 -1
- package/components/UserMention/__tests__/highlightLinks.test.d.ts +2 -0
- package/components/UserMention/__tests__/highlightLinks.test.d.ts.map +1 -0
- package/components/UserMention/constants.d.ts +1 -0
- package/components/UserMention/constants.d.ts.map +1 -1
- package/components/UserMention/constants.js +1 -1
- package/components/UserMention/constants.js.map +1 -1
- package/components/UserMention/index.js +1 -1
- package/components/UserMention/index.js.map +1 -1
- package/components/index.d.ts +2 -0
- package/components/index.d.ts.map +1 -1
- package/components/index.js +1 -1
- package/componentsV2/AppCommonsProvider/AppCommonsContext.d.ts +4 -2
- package/componentsV2/AppCommonsProvider/AppCommonsContext.d.ts.map +1 -1
- package/componentsV2/AppCommonsProvider/AppCommonsContext.js.map +1 -1
- package/componentsV2/AppCommonsProvider/utils.d.ts +1 -1
- package/componentsV2/AppCommonsProvider/utils.d.ts.map +1 -1
- package/componentsV2/AppCommonsProvider/utils.js +1 -1
- package/componentsV2/AppCommonsProvider/utils.js.map +1 -1
- package/componentsV2/AppHeader/V3/Actions/Actions.constants.d.ts +4 -1
- package/componentsV2/AppHeader/V3/Actions/Actions.constants.d.ts.map +1 -1
- package/componentsV2/AppHeader/V3/Actions/Actions.constants.js +1 -1
- package/componentsV2/AppHeader/V3/Actions/Actions.constants.js.map +1 -1
- package/componentsV2/AppHeader/V3/Actions/Actions.d.ts.map +1 -1
- package/componentsV2/AppHeader/V3/Actions/Actions.js +1 -1
- package/componentsV2/AppHeader/V3/Actions/Actions.js.map +1 -1
- package/componentsV2/AppHeader/V3/AppHeaderV3.d.ts.map +1 -1
- package/componentsV2/AppHeader/V3/AppHeaderV3.js +1 -1
- package/componentsV2/AppHeader/V3/AppHeaderV3.js.map +1 -1
- package/componentsV2/ButtonIcon/ButtonIcon.d.ts +2 -0
- package/componentsV2/ButtonIcon/ButtonIcon.d.ts.map +1 -1
- package/componentsV2/ButtonIcon/ButtonIcon.js +1 -1
- package/componentsV2/ButtonIcon/ButtonIcon.js.map +1 -1
- package/componentsV2/ButtonIcon/ButtonIcon.scss.js +1 -1
- package/componentsV2/ButtonIcon/ButtonIcon.stories.d.ts +1 -0
- package/componentsV2/ButtonIcon/ButtonIcon.stories.d.ts.map +1 -1
- package/componentsV2/Chip/Chip.d.ts +1 -0
- package/componentsV2/Chip/Chip.d.ts.map +1 -1
- package/componentsV2/Chip/Chip.js +1 -1
- package/componentsV2/Chip/Chip.js.map +1 -1
- package/componentsV2/Chip/Chip.stories.d.ts.map +1 -1
- package/componentsV2/ColorPicker/ColorPicker.d.ts +2 -1
- package/componentsV2/ColorPicker/ColorPicker.d.ts.map +1 -1
- package/componentsV2/ColorPicker/ColorPicker.js +1 -1
- package/componentsV2/ColorPicker/ColorPicker.js.map +1 -1
- package/componentsV2/ColorPicker/ColorPicker.scss.js +1 -1
- package/componentsV2/ColorPicker/ColorPicker.stories.d.ts.map +1 -1
- package/componentsV2/ColorPicker/OpacityDragtracker/OpacityDragtracker.d.ts.map +1 -1
- package/componentsV2/ColorPicker/OpacityDragtracker/OpacityDragtracker.js +1 -1
- package/componentsV2/ColorPicker/OpacityDragtracker/OpacityDragtracker.js.map +1 -1
- package/componentsV2/ColorPicker/Swatches/Swatches.scss.js +1 -1
- package/componentsV2/CompletionsOffsetWellPicker/Map/Map.js +1 -1
- package/componentsV2/CompletionsOffsetWellPicker/Map/Map.js.map +1 -1
- package/componentsV2/InterventionEventSelector/InterventionEventSelector.d.ts +3 -0
- package/componentsV2/InterventionEventSelector/InterventionEventSelector.d.ts.map +1 -0
- package/componentsV2/InterventionEventSelector/InterventionEventSelector.js +2 -0
- package/componentsV2/InterventionEventSelector/InterventionEventSelector.js.map +1 -0
- package/componentsV2/InterventionEventSelector/InterventionEventSelector.scss.js +2 -0
- package/componentsV2/InterventionEventSelector/InterventionEventSelector.scss.js.map +1 -0
- package/componentsV2/InterventionEventSelector/InterventionEventSelector.stories.d.ts +9 -0
- package/componentsV2/InterventionEventSelector/InterventionEventSelector.stories.d.ts.map +1 -0
- package/componentsV2/InterventionEventSelector/__tests__/InterventionEventSelector.test.d.ts +2 -0
- package/componentsV2/InterventionEventSelector/__tests__/InterventionEventSelector.test.d.ts.map +1 -0
- package/componentsV2/InterventionEventSelector/index.d.ts +5 -0
- package/componentsV2/InterventionEventSelector/index.d.ts.map +1 -0
- package/componentsV2/InterventionEventSelector/types.d.ts +22 -0
- package/componentsV2/InterventionEventSelector/types.d.ts.map +1 -0
- package/componentsV2/InterventionEventSelector/useInterventionUnitEvents.d.ts +8 -0
- package/componentsV2/InterventionEventSelector/useInterventionUnitEvents.d.ts.map +1 -0
- package/componentsV2/InterventionEventSelector/useInterventionUnitEvents.js +2 -0
- package/componentsV2/InterventionEventSelector/useInterventionUnitEvents.js.map +1 -0
- package/componentsV2/InterventionEventSelector/utils.d.ts +6 -0
- package/componentsV2/InterventionEventSelector/utils.d.ts.map +1 -0
- package/componentsV2/InterventionEventSelector/utils.js +2 -0
- package/componentsV2/InterventionEventSelector/utils.js.map +1 -0
- package/componentsV2/Modal/Modal.d.ts.map +1 -1
- package/componentsV2/Modal/Modal.js +1 -1
- package/componentsV2/Modal/Modal.js.map +1 -1
- package/componentsV2/Modal/constants.d.ts +3 -0
- package/componentsV2/Modal/constants.d.ts.map +1 -0
- package/componentsV2/Modal/constants.js +2 -0
- package/componentsV2/Modal/constants.js.map +1 -0
- package/componentsV2/WellArchivedMessage/WellArchivedMessage.js +1 -1
- package/componentsV2/WellArchivedMessage/WellArchivedMessage.js.map +1 -1
- package/componentsV2/index.d.ts +1 -0
- package/componentsV2/index.d.ts.map +1 -1
- package/componentsV2/index.js +1 -1
- package/effects/__tests__/useOutsideClick.test.d.ts.map +1 -1
- package/effects/useOutsideClick.d.ts.map +1 -1
- package/effects/useOutsideClick.js +1 -1
- package/effects/useOutsideClick.js.map +1 -1
- package/mcp-server/server.mjs +108 -24
- package/package.json +1 -1
- package/testing/AppTestWrapper/AppTestWrapper.js +1 -1
- package/testing/AppTestWrapper/AppTestWrapper.js.map +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/types/shared/Common.d.ts +9 -0
- package/types/shared/Common.d.ts.map +1 -1
- package/utils/__tests__/fetchAttachment.test.d.ts +2 -0
- package/utils/__tests__/fetchAttachment.test.d.ts.map +1 -0
- package/utils/__tests__/links.test.d.ts +2 -0
- package/utils/__tests__/links.test.d.ts.map +1 -0
- package/utils/devcenter.d.ts +1 -0
- package/utils/devcenter.d.ts.map +1 -1
- package/utils/devcenter.js +1 -1
- package/utils/devcenter.js.map +1 -1
- package/utils/fetchAttachment.d.ts +3 -0
- package/utils/fetchAttachment.d.ts.map +1 -0
- package/utils/fetchAttachment.js +2 -0
- package/utils/fetchAttachment.js.map +1 -0
- package/utils/fileExtension.d.ts.map +1 -1
- package/utils/fileExtension.js +1 -1
- package/utils/fileExtension.js.map +1 -1
- package/utils/links.d.ts +14 -0
- package/utils/links.d.ts.map +1 -0
- package/utils/links.js +2 -0
- package/utils/links.js.map +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAttachmentUpload.js","sources":["../../../../src/components/CommentComposer/useAttachmentUpload.ts"],"sourcesContent":["import { ChangeEvent, useCallback, useEffect, useRef, useState } from 'react';\nimport S3Upload from 'react-s3-uploader/s3upload';\n\nimport type {\n AttachmentKind,\n AttachmentPreviewItem,\n} from '../AttachmentPreview/AttachmentPreview.types';\nimport { getAttachmentKind } from '../AttachmentPreview/getAttachmentKind';\nimport { ACCEPTED_ATTACHMENT_TYPES } from '../AttachFileButton';\n\nimport { getS3SignedUrl, getS3DownloadLink } from '~/clients/jsonApi';\n\nexport type UploadedAttachment = {\n url: string;\n name: string;\n size?: number;\n};\n\ntype UseAttachmentUploadOptions = {\n value: UploadedAttachment[];\n onChange: (attachments: UploadedAttachment[]) => void;\n onError?: (message: string | null) => void;\n maxSizeBytes?: number;\n maxFiles?: number;\n /** Mirrors the file input's `accept`; also gates drag-and-drop. */\n accept?: string;\n};\n\n/** A picked or already-stored file, in the order the user arranged it. */\ntype Entry = {\n id: string;\n name: string;\n /** Set while the file is local; cleared entries come from `value`. */\n file: File | null;\n previewUrl: string;\n isUploading: boolean;\n error: string | null;\n uploaded: UploadedAttachment | null;\n};\n\nexport const DEFAULT_MAX_ATTACHMENTS = 10;\n\n/** Same rules the file input enforces via `accept`, so drag-and-drop can't smuggle a type past it. */\nconst isAcceptedType = (file: File, accept: string) =>\n accept\n .split(',')\n .map(rule => rule.trim().toLowerCase())\n .filter(Boolean)\n .some(rule => {\n if (rule.startsWith('.')) return file.name.toLowerCase().endsWith(rule);\n if (rule.endsWith('/*')) {\n const type = file.type.toLowerCase();\n if (type) return type.startsWith(rule.slice(0, -1));\n\n return getAttachmentKind({ name: file.name }) === rule.slice(0, -1);\n }\n\n return file.type.toLowerCase() === rule;\n });\n\nconst getFileKind = (file: File): AttachmentKind => {\n if (file.type.startsWith('image/')) return 'image';\n if (file.type.startsWith('video/')) return 'video';\n return 'file';\n};\n\nconst formatMb = (bytes: number) => (bytes / (1024 * 1024)).toFixed(1);\n\nconst getUploaded = (entries: Entry[]) =>\n entries.map(entry => entry.uploaded).filter(Boolean) as UploadedAttachment[];\n\nconst isSameList = (a: UploadedAttachment[], b: UploadedAttachment[]) =>\n a.length === b.length && a.every((item, index) => item.url === b[index].url);\n\nconst toStoredEntry = (attachment: UploadedAttachment): Entry => ({\n id: attachment.url,\n name: attachment.name,\n file: null,\n previewUrl: '',\n isUploading: false,\n error: null,\n uploaded: attachment,\n});\n\nlet entrySeq = 0;\nconst nextEntryId = () => {\n entrySeq += 1;\n return `attachment-${entrySeq}`;\n};\n\nexport const useAttachmentUpload = ({\n value,\n onChange,\n onError,\n maxSizeBytes,\n maxFiles = DEFAULT_MAX_ATTACHMENTS,\n accept = ACCEPTED_ATTACHMENT_TYPES,\n}: UseAttachmentUploadOptions) => {\n const [entries, setEntries] = useState<Entry[]>([]);\n\n const fileInputRef = useRef<HTMLInputElement>(null);\n const uploadersRef = useRef(new Map<string, S3Upload>());\n // Bumped per attempt so a superseded upload can't write state for a restarted entry.\n const sessionsRef = useRef(new Map<string, number>());\n // Mutations are driven from async upload callbacks, so the latest list lives in a ref.\n const entriesRef = useRef<Entry[]>([]);\n const onChangeRef = useRef(onChange);\n const onErrorRef = useRef(onError);\n\n onChangeRef.current = onChange;\n onErrorRef.current = onError;\n\n // What we last handed the parent. A `value` that still matches it is our own change echoing\n // back; anything else is a parent-driven reset we must adopt.\n const emittedRef = useRef<UploadedAttachment[]>([]);\n\n const commit = useCallback((updater: (prev: Entry[]) => Entry[]) => {\n const next = updater(entriesRef.current);\n entriesRef.current = next;\n setEntries(next);\n emittedRef.current = getUploaded(next);\n onChangeRef.current(emittedRef.current);\n }, []);\n\n const patchEntry = useCallback(\n (id: string, patch: Partial<Entry>) =>\n commit(prev => prev.map(entry => (entry.id === id ? { ...entry, ...patch } : entry))),\n [commit]\n );\n\n const abortUpload = useCallback((id: string) => {\n uploadersRef.current.get(id)?.abortUpload();\n uploadersRef.current.delete(id);\n // Bump, never delete: deleting would let the next attempt reuse session 1, so a callback\n // still in flight from the aborted attempt would pass `isCurrent` and clobber it.\n sessionsRef.current.set(id, (sessionsRef.current.get(id) ?? 0) + 1);\n }, []);\n\n const releasePreview = useCallback((entry?: Entry) => {\n if (entry?.previewUrl) URL.revokeObjectURL(entry.previewUrl);\n }, []);\n\n // The banner is shared by every tile, so recompute it rather than clear it — one file\n // succeeding must not hide a sibling that is still failing.\n const syncError = useCallback(() => {\n onErrorRef.current?.(entriesRef.current.find(entry => entry.error)?.error ?? null);\n }, []);\n\n useEffect(\n () => () => {\n uploadersRef.current.forEach(uploader => uploader.abortUpload());\n uploadersRef.current.clear();\n entriesRef.current.forEach(entry => {\n if (entry.previewUrl) URL.revokeObjectURL(entry.previewUrl);\n });\n },\n []\n );\n\n const startUpload = useCallback(\n (id: string, file: File) => {\n const session = (sessionsRef.current.get(id) ?? 0) + 1;\n sessionsRef.current.set(id, session);\n // A superseded upload must not write state for an entry that is gone or restarted.\n const isCurrent = () => sessionsRef.current.get(id) === session;\n\n const fail = (message: string) => {\n if (!isCurrent()) return;\n patchEntry(id, { isUploading: false, error: message });\n onErrorRef.current?.(message);\n };\n\n let storedKey = '';\n\n const uploader = new S3Upload({\n files: [file],\n preprocess: (target: File, next: (file: File) => void) => next(target),\n onProgress: () => {},\n getSignedUrl: async (\n target: File,\n callback: (data: { signedUrl: string; [key: string]: unknown }) => void\n ) => {\n try {\n const data = await getS3SignedUrl(target.name, target.type);\n storedKey = data.file_name;\n callback({ ...data, signedUrl: data.signed_url });\n } catch (e) {\n fail((e as Error)?.message || 'Failed to upload the file');\n }\n },\n onFinishS3Put: async () => {\n try {\n const { url } = await getS3DownloadLink(storedKey);\n if (!isCurrent()) return;\n\n uploadersRef.current.delete(id);\n patchEntry(id, {\n isUploading: false,\n error: null,\n uploaded: { url, name: storedKey, size: file.size },\n });\n syncError();\n } catch (e) {\n fail((e as Error)?.message || 'Failed to upload the file');\n }\n },\n onError: (message: string) => fail(message || 'Failed to upload the file'),\n });\n\n uploadersRef.current.set(id, uploader);\n },\n [patchEntry, syncError]\n );\n\n const addFiles = useCallback(\n (files: File[]) => {\n const supported = files.filter(file => isAcceptedType(file, accept));\n const skipped = supported.length < files.length;\n // One banner, one message: report the most actionable reason once, at the end. Reporting\n // as we go would let a later call overwrite an earlier warning on a mixed drop.\n const unsupported = skipped\n ? (files.length === 1 && 'That file type is not supported.') ||\n 'Some files were skipped — unsupported file type.'\n : null;\n const tooMany = `You can attach up to ${maxFiles} files.`;\n\n const room = maxFiles - entriesRef.current.length;\n if (!supported.length || room <= 0) {\n onErrorRef.current?.(supported.length ? tooMany : unsupported);\n return;\n }\n\n const accepted = supported.slice(0, room);\n const added: Entry[] = accepted.map(file => {\n const kind = getFileKind(file);\n const isTooLarge = !!maxSizeBytes && file.size > maxSizeBytes;\n\n return {\n id: nextEntryId(),\n name: file.name,\n file,\n previewUrl: kind === 'file' ? '' : URL.createObjectURL(file),\n isUploading: !isTooLarge,\n error: isTooLarge\n ? `File is too large (${formatMb(file.size)} MB). Maximum size is ${formatMb(\n maxSizeBytes as number\n )} MB.`\n : null,\n uploaded: null,\n };\n });\n\n commit(prev => [...prev, ...added]);\n\n const overflow = supported.length > accepted.length ? tooMany : null;\n onErrorRef.current?.(\n entriesRef.current.find(entry => entry.error)?.error ?? unsupported ?? overflow\n );\n\n added\n .filter(entry => !entry.error)\n .forEach(entry => startUpload(entry.id, entry.file as File));\n },\n [commit, maxFiles, maxSizeBytes, startUpload, accept]\n );\n\n const handleFileSelect = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n const files = Array.from(event.target.files ?? []);\n // Reset the input so re-picking the same file still fires a change event.\n if (fileInputRef.current) fileInputRef.current.value = '';\n if (files.length) addFiles(files);\n },\n [addFiles]\n );\n\n const openFileDialog = useCallback(() => fileInputRef.current?.click(), []);\n\n const removeAttachment = useCallback(\n (id: AttachmentPreviewItem['id']) => {\n const key = String(id);\n abortUpload(key);\n releasePreview(entriesRef.current.find(entry => entry.id === key));\n commit(prev => prev.filter(entry => entry.id !== key));\n syncError();\n },\n [abortUpload, releasePreview, commit, syncError]\n );\n\n const handleRetry = useCallback(\n (id: AttachmentPreviewItem['id']) => {\n const key = String(id);\n const entry = entriesRef.current.find(item => item.id === key);\n if (!entry?.file) return;\n\n abortUpload(key);\n patchEntry(key, { isUploading: true, error: null });\n syncError();\n startUpload(key, entry.file);\n },\n [abortUpload, patchEntry, startUpload, syncError]\n );\n\n const reorderAttachments = useCallback(\n (orderedIds: AttachmentPreviewItem['id'][]) =>\n commit(prev => {\n const byId = new Map(prev.map(entry => [entry.id, entry]));\n const reordered = orderedIds.map(id => byId.get(String(id))).filter(Boolean) as Entry[];\n // Unlisted ids (a race with a removal) keep their place at the end.\n const missing = prev.filter(entry => !orderedIds.some(id => String(id) === entry.id));\n return [...reordered, ...missing];\n }),\n [commit]\n );\n\n const clearAttachments = useCallback(() => {\n entriesRef.current.forEach(entry => {\n abortUpload(entry.id);\n releasePreview(entry);\n });\n commit(() => []);\n onErrorRef.current?.(null);\n }, [abortUpload, commit, releasePreview]);\n\n // Adopt a value we didn't produce — an edit form's initial attachments, or a parent-side reset.\n // Compared against what we emitted, not against the current entries: a failed-only or\n // mid-upload list emits `[]` too, and treating that as \"in sync\" would strand those tiles\n // on screen and let a late upload write itself back into freshly reset parent state.\n useEffect(() => {\n if (isSameList(emittedRef.current, value)) return;\n\n entriesRef.current.forEach(entry => {\n abortUpload(entry.id);\n if (entry.previewUrl) URL.revokeObjectURL(entry.previewUrl);\n });\n entriesRef.current = value.map(toStoredEntry);\n emittedRef.current = value;\n setEntries(entriesRef.current);\n onErrorRef.current?.(null);\n }, [value, abortUpload]);\n\n // A stored url has expired by now, so re-sign it for the preview.\n const [storedSrcs, setStoredSrcs] = useState<Record<string, string>>({});\n const storedSrcsRef = useRef(storedSrcs);\n storedSrcsRef.current = storedSrcs;\n\n const storedNames = entries\n .filter(entry => !entry.file && entry.uploaded)\n .map(entry => (entry.uploaded as UploadedAttachment).name)\n .join('|');\n\n useEffect(() => {\n const pending = storedNames.split('|').filter(name => name && !(name in storedSrcsRef.current));\n if (!pending.length) return undefined;\n\n let isActive = true;\n Promise.all(\n pending.map(name =>\n getS3DownloadLink(name, 'inline')\n .then(({ url }: { url: string }) => [name, url] as const)\n .catch(error => {\n console.error(`Failed to sign stored attachment \"${name}\"`, error);\n\n return [name, ''] as const;\n })\n )\n ).then(resolved => {\n if (isActive) setStoredSrcs(prev => ({ ...prev, ...Object.fromEntries(resolved) }));\n });\n\n return () => {\n isActive = false;\n };\n }, [storedNames]);\n\n const items = entries.reduce<AttachmentPreviewItem[]>((acc, entry) => {\n if (entry.file) {\n acc.push({\n id: entry.id,\n name: entry.name,\n src: entry.previewUrl,\n kind: getFileKind(entry.file),\n isUploading: entry.isUploading,\n error: entry.error ?? undefined,\n });\n return acc;\n }\n\n const stored = entry.uploaded as UploadedAttachment;\n const kind = getAttachmentKind(stored);\n const src = storedSrcs[stored.name];\n // A thumbnail without its signed url would paint as a broken image, so hold it back.\n if (kind !== 'file' && !src) return acc;\n\n acc.push({ id: entry.id, name: stored.name, src, kind });\n return acc;\n }, []);\n\n return {\n items,\n fileInputRef,\n openFileDialog,\n handleFileSelect,\n addFiles,\n removeAttachment,\n handleRetry,\n reorderAttachments,\n clearAttachments,\n isUploading: entries.some(entry => entry.isUploading),\n error: entries.find(entry => entry.error)?.error ?? null,\n count: entries.length,\n isFull: entries.length >= maxFiles,\n maxFiles,\n };\n};\n"],"names":["getFileKind","file","type","startsWith","formatMb","bytes","toFixed","toStoredEntry","attachment","id","url","name","previewUrl","isUploading","error","uploaded","entrySeq","_ref","_entries$find$error","_entries$find","value","onChange","onError","maxSizeBytes","_ref$maxFiles","maxFiles","_ref$accept","accept","ACCEPTED_ATTACHMENT_TYPES","useState","_useState2","_slicedToArray","_useState","entries","setEntries","fileInputRef","useRef","uploadersRef","Map","sessionsRef","entriesRef","onChangeRef","onErrorRef","current","emittedRef","commit","useCallback","updater","next","map","entry","filter","Boolean","getUploaded","patchEntry","patch","prev","abortUpload","_uploadersRef$current","_sessionsRef$current$","get","delete","set","releasePreview","URL","revokeObjectURL","syncError","_onErrorRef$current","_entriesRef$current$f","_entriesRef$current$f2","find","useEffect","forEach","uploader","clear","startUpload","_sessionsRef$current$2","session","_onFinishS3Put","_getSignedUrl","isCurrent","fail","message","_onErrorRef$current2","storedKey","S3Upload","files","preprocess","target","onProgress","getSignedUrl","_asyncToGenerator","_regeneratorRuntime","mark","_callee","callback","_data","wrap","_context","getS3SignedUrl","data","sent","file_name","signedUrl","signed_url","t0","stop","_x","_x2","apply","this","arguments","onFinishS3Put","_callee2","_yield$getS3DownloadL","_context2","getS3DownloadLink","abrupt","size","addFiles","_onErrorRef$current4","_ref2","_entriesRef$current$f3","_entriesRef$current$f4","supported","split","rule","trim","toLowerCase","some","endsWith","slice","getAttachmentKind","isAcceptedType","unsupported","length","tooMany","room","_onErrorRef$current3","accepted","added","kind","isTooLarge","concat","createObjectURL","overflow","handleFileSelect","event","_event$target$files","Array","from","openFileDialog","_fileInputRef$current","click","removeAttachment","key","String","handleRetry","item","reorderAttachments","orderedIds","byId","reordered","missing","clearAttachments","_onErrorRef$current5","_onErrorRef$current6","a","b","every","index","_useState3","_useState4","storedSrcs","setStoredSrcs","storedSrcsRef","storedNames","join","pending","isActive","Promise","all","then","_ref3","catch","console","resolved","_objectSpread","Object","fromEntries","items","reduce","acc","_entry$error","push","src","undefined","stored","count","isFull"],"mappings":"gtCAwCO,IAoBDA,EAAc,SAACC,GACnB,OAAIA,EAAKC,KAAKC,WAAW,UAAkB,QACvCF,EAAKC,KAAKC,WAAW,UAAkB,QACpC,MACT,EAEMC,EAAW,SAACC,GAAa,OAAMA,EAAK,SAAkBC,QAAQ,EAAE,EAQhEC,EAAgB,SAACC,GAA8B,MAAa,CAChEC,GAAID,EAAWE,IACfC,KAAMH,EAAWG,KACjBV,KAAM,KACNW,WAAY,GACZC,aAAa,EACbC,MAAO,KACPC,SAAUP,EACX,EAEGQ,EAAW,kCA5CwB,+BAkDJ,SAODC,GAAA,IAAAC,EAAAC,EANhCC,IAAAA,MACAC,IAAAA,SACAC,IAAAA,QACAC,IAAAA,aAAYC,EAAAP,EACZQ,SAAAA,aAvDqC,GAuDHD,EAAAE,EAAAT,EAClCU,OAAAA,aAASC,EAAAA,0BAAyBF,EAEJG,EAAAA,EAAQA,SAAU,IAAGC,EAAAC,EAAAA,QAAAC,EAAA,GAA5CC,EAAOH,EAAA,GAAEI,EAAUJ,EAAA,GAEpBK,EAAeC,SAAyB,MACxCC,EAAeD,EAAAA,OAAO,IAAIE,KAE1BC,EAAcH,EAAAA,OAAO,IAAIE,KAEzBE,EAAaJ,SAAgB,IAC7BK,EAAcL,SAAOf,GACrBqB,EAAaN,SAAOd,GAE1BmB,EAAYE,QAAUtB,EACtBqB,EAAWC,QAAUrB,EAIrB,IAAMsB,EAAaR,SAA6B,IAE1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AAS,GACjF,IAEO,WACLP,GAAW,EAlBwB,CAoBvC,GAAG,CAACH,KAyBG,CACLc,MAxBY7J,EAAQ8J,QAAgC,SAACC,EAAK9I,GAC1C,IAAA+I,EAAhB,GAAI/I,EAAMjD,KASR,OARA+L,EAAIE,KAAK,CACPzL,GAAIyC,EAAMzC,GACVE,KAAMuC,EAAMvC,KACZwL,IAAKjJ,EAAMtC,WACXiI,KAAM7I,EAAYkD,EAAMjD,MACxBY,YAAaqC,EAAMrC,YACnBC,MAAsBsL,QAAflJ,EAAAA,EAAMpC,aAASsL,IAAAA,EAAAA,OAAAA,IAEjBJ,EAGT,IAAMK,EAASnJ,EAAMnC,SACf8H,EAAOT,oBAAkBiE,GACzBF,EAAMtB,EAAWwB,EAAO1L,MAE9B,MAAa,SAATkI,GAAoBsD,GAExBH,EAAIE,KAAK,CAAEzL,GAAIyC,EAAMzC,GAAIE,KAAM0L,EAAO1L,KAAMwL,IAAAA,EAAKtD,KAAAA,IAC1CmD,GAH6BA,CAIrC,GAAE,IAID7J,aAAAA,EACAoH,eAAAA,EACAL,iBAAAA,EACA3B,SAAAA,EACAmC,iBAAAA,EACAG,YAAAA,EACAE,mBAAAA,EACAK,iBAAAA,EACAvJ,YAAaoB,EAAQgG,MAAK,SAAA/E,GAAK,OAAIA,EAAMrC,eACzCC,MAAgD,UAAzC,UAAAmB,EAAQqC,MAAK,SAAApB,GAAK,OAAIA,EAAMpC,KAAK,WAAjC,IAAAK,OAAA,EAAAA,EAAoCL,aAAK,IAAAI,EAAAA,EAAI,KACpDoL,MAAOrK,EAAQsG,OACfgE,OAAQtK,EAAQsG,QAAU9G,EAC1BA,SAAAA,EAEJ"}
|
|
1
|
+
{"version":3,"file":"useAttachmentUpload.js","sources":["../../../../src/components/CommentComposer/useAttachmentUpload.ts"],"sourcesContent":["import { ChangeEvent, useCallback, useEffect, useRef, useState } from 'react';\nimport S3Upload from 'react-s3-uploader/s3upload';\n\nimport type {\n AttachmentKind,\n AttachmentPreviewItem,\n} from '../AttachmentPreview/AttachmentPreview.types';\nimport { getAttachmentKind } from '../AttachmentPreview/getAttachmentKind';\nimport { ACCEPTED_ATTACHMENT_TYPES } from '../AttachFileButton';\n\nimport { getS3SignedUrl, getS3DownloadLink } from '~/clients/jsonApi';\nimport { getUrlFileName } from '~/utils/links';\n\nexport type UploadedAttachment = {\n url: string;\n name: string;\n size?: number;\n};\n\ntype UseAttachmentUploadOptions = {\n value: UploadedAttachment[];\n onChange: (attachments: UploadedAttachment[]) => void;\n onError?: (message: string | null) => void;\n maxSizeBytes?: number;\n maxFiles?: number;\n /** Mirrors the file input's `accept`; also gates drag-and-drop. */\n accept?: string;\n};\n\n/** A picked or already-stored file, in the order the user arranged it. */\ntype Entry = {\n id: string;\n name: string;\n /** Set while the file is local; cleared entries come from `value`. */\n file: File | null;\n previewUrl: string;\n isUploading: boolean;\n error: string | null;\n uploaded: UploadedAttachment | null;\n};\n\nexport const DEFAULT_MAX_ATTACHMENTS = 10;\n\n/** Same rules the file input enforces via `accept`, so drag-and-drop can't smuggle a type past it. */\nconst isAcceptedType = (file: File, accept: string) =>\n accept\n .split(',')\n .map(rule => rule.trim().toLowerCase())\n .filter(Boolean)\n .some(rule => {\n if (rule.startsWith('.')) return file.name.toLowerCase().endsWith(rule);\n if (rule.endsWith('/*')) {\n const type = file.type.toLowerCase();\n if (type) return type.startsWith(rule.slice(0, -1));\n\n return getAttachmentKind({ name: file.name }) === rule.slice(0, -1);\n }\n\n return file.type.toLowerCase() === rule;\n });\n\nconst getFileKind = (file: File): AttachmentKind => {\n if (file.type.startsWith('image/')) return 'image';\n if (file.type.startsWith('video/')) return 'video';\n return 'file';\n};\n\nconst formatMb = (bytes: number) => (bytes / (1024 * 1024)).toFixed(1);\n\nconst getUploaded = (entries: Entry[]) =>\n entries.map(entry => entry.uploaded).filter(Boolean) as UploadedAttachment[];\n\nconst isSameList = (a: UploadedAttachment[], b: UploadedAttachment[]) =>\n a.length === b.length && a.every((item, index) => item.url === b[index].url);\n\nconst toStoredEntry = (attachment: UploadedAttachment): Entry => ({\n id: attachment.url,\n name: attachment.name,\n file: null,\n previewUrl: '',\n isUploading: false,\n error: null,\n uploaded: attachment,\n});\n\nlet entrySeq = 0;\nconst nextEntryId = () => {\n entrySeq += 1;\n return `attachment-${entrySeq}`;\n};\n\nexport const useAttachmentUpload = ({\n value,\n onChange,\n onError,\n maxSizeBytes,\n maxFiles = DEFAULT_MAX_ATTACHMENTS,\n accept = ACCEPTED_ATTACHMENT_TYPES,\n}: UseAttachmentUploadOptions) => {\n const [entries, setEntries] = useState<Entry[]>([]);\n\n const fileInputRef = useRef<HTMLInputElement>(null);\n const uploadersRef = useRef(new Map<string, S3Upload>());\n // Bumped per attempt so a superseded upload can't write state for a restarted entry.\n const sessionsRef = useRef(new Map<string, number>());\n // Mutations are driven from async upload callbacks, so the latest list lives in a ref.\n const entriesRef = useRef<Entry[]>([]);\n const onChangeRef = useRef(onChange);\n const onErrorRef = useRef(onError);\n\n onChangeRef.current = onChange;\n onErrorRef.current = onError;\n\n // What we last handed the parent. A `value` that still matches it is our own change echoing\n // back; anything else is a parent-driven reset we must adopt.\n const emittedRef = useRef<UploadedAttachment[]>([]);\n\n const commit = useCallback((updater: (prev: Entry[]) => Entry[]) => {\n const next = updater(entriesRef.current);\n entriesRef.current = next;\n setEntries(next);\n emittedRef.current = getUploaded(next);\n onChangeRef.current(emittedRef.current);\n }, []);\n\n const patchEntry = useCallback(\n (id: string, patch: Partial<Entry>) =>\n commit(prev => prev.map(entry => (entry.id === id ? { ...entry, ...patch } : entry))),\n [commit]\n );\n\n const abortUpload = useCallback((id: string) => {\n uploadersRef.current.get(id)?.abortUpload();\n uploadersRef.current.delete(id);\n // Bump, never delete: deleting would let the next attempt reuse session 1, so a callback\n // still in flight from the aborted attempt would pass `isCurrent` and clobber it.\n sessionsRef.current.set(id, (sessionsRef.current.get(id) ?? 0) + 1);\n }, []);\n\n const releasePreview = useCallback((entry?: Entry) => {\n if (entry?.previewUrl) URL.revokeObjectURL(entry.previewUrl);\n }, []);\n\n // The banner is shared by every tile, so recompute it rather than clear it — one file\n // succeeding must not hide a sibling that is still failing.\n const syncError = useCallback(() => {\n onErrorRef.current?.(entriesRef.current.find(entry => entry.error)?.error ?? null);\n }, []);\n\n useEffect(\n () => () => {\n uploadersRef.current.forEach(uploader => uploader.abortUpload());\n uploadersRef.current.clear();\n entriesRef.current.forEach(entry => {\n if (entry.previewUrl) URL.revokeObjectURL(entry.previewUrl);\n });\n },\n []\n );\n\n const startUpload = useCallback(\n (id: string, file: File) => {\n const session = (sessionsRef.current.get(id) ?? 0) + 1;\n sessionsRef.current.set(id, session);\n // A superseded upload must not write state for an entry that is gone or restarted.\n const isCurrent = () => sessionsRef.current.get(id) === session;\n\n const fail = (message: string) => {\n if (!isCurrent()) return;\n patchEntry(id, { isUploading: false, error: message });\n onErrorRef.current?.(message);\n };\n\n let storedKey = '';\n\n const uploader = new S3Upload({\n files: [file],\n preprocess: (target: File, next: (file: File) => void) => next(target),\n onProgress: () => {},\n getSignedUrl: async (\n target: File,\n callback: (data: { signedUrl: string; [key: string]: unknown }) => void\n ) => {\n try {\n const data = await getS3SignedUrl(target.name, target.type);\n storedKey = data.file_name;\n callback({ ...data, signedUrl: data.signed_url });\n } catch (e) {\n fail((e as Error)?.message || 'Failed to upload the file');\n }\n },\n onFinishS3Put: async () => {\n try {\n const { url } = await getS3DownloadLink(storedKey);\n if (!isCurrent()) return;\n\n uploadersRef.current.delete(id);\n patchEntry(id, {\n isUploading: false,\n error: null,\n uploaded: { url, name: storedKey, size: file.size },\n });\n syncError();\n } catch (e) {\n fail((e as Error)?.message || 'Failed to upload the file');\n }\n },\n onError: (message: string) => fail(message || 'Failed to upload the file'),\n });\n\n uploadersRef.current.set(id, uploader);\n },\n [patchEntry, syncError]\n );\n\n /** Nothing is uploaded: a comment attachment is a url, so the link itself is the attachment. */\n const addLinkedImage = useCallback(\n (url: string) => {\n const name = getUrlFileName(url);\n\n if (!name) return;\n if (entriesRef.current.length >= maxFiles) {\n onErrorRef.current?.(`You can attach up to ${maxFiles} files.`);\n\n return;\n }\n\n if (entriesRef.current.some(entry => entry.uploaded?.url === url)) return;\n\n commit(prev => [\n ...prev,\n {\n id: nextEntryId(),\n name,\n file: null,\n previewUrl: url,\n isUploading: false,\n error: null,\n uploaded: { url, name },\n },\n ]);\n },\n [commit, maxFiles]\n );\n\n const addFiles = useCallback(\n (files: File[]) => {\n const supported = files.filter(file => isAcceptedType(file, accept));\n const skipped = supported.length < files.length;\n // One banner, one message: report the most actionable reason once, at the end. Reporting\n // as we go would let a later call overwrite an earlier warning on a mixed drop.\n const unsupported = skipped\n ? (files.length === 1 && 'That file type is not supported.') ||\n 'Some files were skipped — unsupported file type.'\n : null;\n const tooMany = `You can attach up to ${maxFiles} files.`;\n\n const room = maxFiles - entriesRef.current.length;\n if (!supported.length || room <= 0) {\n onErrorRef.current?.(supported.length ? tooMany : unsupported);\n return;\n }\n\n const accepted = supported.slice(0, room);\n const added: Entry[] = accepted.map(file => {\n const kind = getFileKind(file);\n const isTooLarge = !!maxSizeBytes && file.size > maxSizeBytes;\n\n return {\n id: nextEntryId(),\n name: file.name,\n file,\n previewUrl: kind === 'file' ? '' : URL.createObjectURL(file),\n isUploading: !isTooLarge,\n error: isTooLarge\n ? `File is too large (${formatMb(file.size)} MB). Maximum size is ${formatMb(\n maxSizeBytes as number\n )} MB.`\n : null,\n uploaded: null,\n };\n });\n\n commit(prev => [...prev, ...added]);\n\n const overflow = supported.length > accepted.length ? tooMany : null;\n onErrorRef.current?.(\n entriesRef.current.find(entry => entry.error)?.error ?? unsupported ?? overflow\n );\n\n added\n .filter(entry => !entry.error)\n .forEach(entry => startUpload(entry.id, entry.file as File));\n },\n [commit, maxFiles, maxSizeBytes, startUpload, accept]\n );\n\n const handleFileSelect = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n const files = Array.from(event.target.files ?? []);\n // Reset the input so re-picking the same file still fires a change event.\n if (fileInputRef.current) fileInputRef.current.value = '';\n if (files.length) addFiles(files);\n },\n [addFiles]\n );\n\n const openFileDialog = useCallback(() => fileInputRef.current?.click(), []);\n\n const removeAttachment = useCallback(\n (id: AttachmentPreviewItem['id']) => {\n const key = String(id);\n abortUpload(key);\n releasePreview(entriesRef.current.find(entry => entry.id === key));\n commit(prev => prev.filter(entry => entry.id !== key));\n syncError();\n },\n [abortUpload, releasePreview, commit, syncError]\n );\n\n const handleRetry = useCallback(\n (id: AttachmentPreviewItem['id']) => {\n const key = String(id);\n const entry = entriesRef.current.find(item => item.id === key);\n if (!entry?.file) return;\n\n abortUpload(key);\n patchEntry(key, { isUploading: true, error: null });\n syncError();\n startUpload(key, entry.file);\n },\n [abortUpload, patchEntry, startUpload, syncError]\n );\n\n const reorderAttachments = useCallback(\n (orderedIds: AttachmentPreviewItem['id'][]) =>\n commit(prev => {\n const byId = new Map(prev.map(entry => [entry.id, entry]));\n const reordered = orderedIds.map(id => byId.get(String(id))).filter(Boolean) as Entry[];\n // Unlisted ids (a race with a removal) keep their place at the end.\n const missing = prev.filter(entry => !orderedIds.some(id => String(id) === entry.id));\n return [...reordered, ...missing];\n }),\n [commit]\n );\n\n const clearAttachments = useCallback(() => {\n entriesRef.current.forEach(entry => {\n abortUpload(entry.id);\n releasePreview(entry);\n });\n commit(() => []);\n onErrorRef.current?.(null);\n }, [abortUpload, commit, releasePreview]);\n\n // Adopt a value we didn't produce — an edit form's initial attachments, or a parent-side reset.\n // Compared against what we emitted, not against the current entries: a failed-only or\n // mid-upload list emits `[]` too, and treating that as \"in sync\" would strand those tiles\n // on screen and let a late upload write itself back into freshly reset parent state.\n useEffect(() => {\n if (isSameList(emittedRef.current, value)) return;\n\n entriesRef.current.forEach(entry => {\n abortUpload(entry.id);\n if (entry.previewUrl) URL.revokeObjectURL(entry.previewUrl);\n });\n entriesRef.current = value.map(toStoredEntry);\n emittedRef.current = value;\n setEntries(entriesRef.current);\n onErrorRef.current?.(null);\n }, [value, abortUpload]);\n\n // A stored url has expired by now, so re-sign it for the preview.\n const [storedSrcs, setStoredSrcs] = useState<Record<string, string>>({});\n const storedSrcsRef = useRef(storedSrcs);\n storedSrcsRef.current = storedSrcs;\n\n const storedNames = entries\n // A linked image carries its own url, so there is no key of ours to sign.\n .filter(entry => !entry.file && !entry.previewUrl && entry.uploaded)\n .map(entry => (entry.uploaded as UploadedAttachment).name)\n .join('|');\n\n useEffect(() => {\n const pending = storedNames.split('|').filter(name => name && !(name in storedSrcsRef.current));\n if (!pending.length) return undefined;\n\n let isActive = true;\n Promise.all(\n pending.map(name =>\n getS3DownloadLink(name, 'inline')\n .then(({ url }: { url: string }) => [name, url] as const)\n .catch(error => {\n console.error(`Failed to sign stored attachment \"${name}\"`, error);\n\n return [name, ''] as const;\n })\n )\n ).then(resolved => {\n if (isActive) setStoredSrcs(prev => ({ ...prev, ...Object.fromEntries(resolved) }));\n });\n\n return () => {\n isActive = false;\n };\n }, [storedNames]);\n\n const items = entries.reduce<AttachmentPreviewItem[]>((acc, entry) => {\n if (entry.file) {\n acc.push({\n id: entry.id,\n name: entry.name,\n src: entry.previewUrl,\n kind: getFileKind(entry.file),\n size: entry.file.size,\n isUploading: entry.isUploading,\n error: entry.error ?? undefined,\n });\n return acc;\n }\n\n const stored = entry.uploaded as UploadedAttachment;\n const kind = getAttachmentKind(stored);\n // A linked image is already a url; only one of ours has an S3 key worth signing.\n const src = entry.previewUrl || storedSrcs[stored.name];\n // A thumbnail without its signed url would paint as a broken image, so hold it back.\n if (kind !== 'file' && !src) return acc;\n\n acc.push({ id: entry.id, name: stored.name, src, kind, size: stored.size });\n return acc;\n }, []);\n\n return {\n items,\n fileInputRef,\n openFileDialog,\n handleFileSelect,\n addFiles,\n addLinkedImage,\n removeAttachment,\n handleRetry,\n reorderAttachments,\n clearAttachments,\n isUploading: entries.some(entry => entry.isUploading),\n error: entries.find(entry => entry.error)?.error ?? null,\n count: entries.length,\n isFull: entries.length >= maxFiles,\n maxFiles,\n };\n};\n"],"names":["getFileKind","file","type","startsWith","formatMb","bytes","toFixed","toStoredEntry","attachment","id","url","name","previewUrl","isUploading","error","uploaded","entrySeq","nextEntryId","concat","_ref","_entries$find$error","_entries$find","value","onChange","onError","maxSizeBytes","_ref$maxFiles","maxFiles","_ref$accept","accept","ACCEPTED_ATTACHMENT_TYPES","useState","_useState2","_slicedToArray","_useState","entries","setEntries","fileInputRef","useRef","uploadersRef","Map","sessionsRef","entriesRef","onChangeRef","onErrorRef","current","emittedRef","commit","useCallback","updater","next","map","entry","filter","Boolean","getUploaded","patchEntry","patch","prev","abortUpload","_uploadersRef$current","_sessionsRef$current$","get","delete","set","releasePreview","URL","revokeObjectURL","syncError","_onErrorRef$current","_entriesRef$current$f","_entriesRef$current$f2","find","useEffect","forEach","uploader","clear","startUpload","_sessionsRef$current$2","session","_onFinishS3Put","_getSignedUrl","isCurrent","fail","message","_onErrorRef$current2","storedKey","S3Upload","files","preprocess","target","onProgress","getSignedUrl","_asyncToGenerator","_regeneratorRuntime","mark","_callee","callback","_data","wrap","_context","getS3SignedUrl","data","sent","file_name","signedUrl","signed_url","t0","stop","_x","_x2","apply","this","arguments","onFinishS3Put","_callee2","_yield$getS3DownloadL","_context2","getS3DownloadLink","abrupt","size","addLinkedImage","_onErrorRef$current3","getUrlFileName","length","some","_entry$uploaded","_toConsumableArray","addFiles","_onErrorRef$current5","_ref2","_entriesRef$current$f3","_entriesRef$current$f4","supported","split","rule","trim","toLowerCase","endsWith","slice","getAttachmentKind","isAcceptedType","unsupported","tooMany","room","_onErrorRef$current4","accepted","added","kind","isTooLarge","createObjectURL","overflow","handleFileSelect","event","_event$target$files","Array","from","openFileDialog","_fileInputRef$current","click","removeAttachment","key","String","handleRetry","item","reorderAttachments","orderedIds","byId","reordered","missing","clearAttachments","_onErrorRef$current6","_onErrorRef$current7","a","b","every","index","_useState3","_useState4","storedSrcs","setStoredSrcs","storedSrcsRef","storedNames","join","pending","isActive","Promise","all","then","_ref3","catch","console","resolved","_objectSpread","Object","fromEnt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QqC,MAAK,SAAApB,GAAK,OAAIA,EAAMtC,KAAK,WAAjC,IAAAO,OAAA,EAAAA,EAAoCP,aAAK,IAAAM,EAAAA,EAAI,KACpDwL,MAAOzK,EAAQyF,OACfiF,OAAQ1K,EAAQyF,QAAUjG,EAC1BA,SAAAA,EAEJ"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),s=require("@babel/runtime/helpers/slicedToArray"),o=require("react"),i=require("classnames"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),s=require("@babel/runtime/helpers/slicedToArray"),o=require("react"),i=require("classnames"),n=require("../../componentsV2/ButtonIcon/ButtonIcon.js"),c=require("../../componentsV2/Tooltip/Tooltip.js"),r=require("../../icons/iconParkIcons.js");require("../../icons/customIcons/icons/AddMessage.js"),require("../../icons/customIcons/icons/DragOne.js"),require("../../icons/customIcons/icons/Attention.js"),require("../../icons/customIcons/icons/Collapse.js"),require("../../icons/customIcons/icons/Dashboard.js"),require("../../icons/customIcons/icons/Expand.js"),require("../../icons/customIcons/icons/FolderClosed.js"),require("../../icons/customIcons/icons/FolderClosedFilled.js"),require("../../icons/customIcons/icons/FolderOpened.js"),require("../../icons/customIcons/icons/GreaterOrEqual.js"),require("../../icons/customIcons/icons/LessOrEqual.js"),require("../../icons/customIcons/icons/Search.js"),require("../../icons/customIcons/icons/SearchOne.js"),require("../../icons/customIcons/icons/Wellhub.js"),require("../../icons/customIcons/icons/MultiRuler.js"),require("../../icons/customIcons/icons/Checkbox.js"),require("../../icons/customIcons/icons/CheckboxChecked.js"),require("../../icons/customIcons/icons/CheckboxIndeterminate.js"),require("../../icons/customIcons/icons/Radio.js"),require("../../icons/customIcons/icons/RadioChecked.js"),require("../../icons/customIcons/icons/SimulFrac.js"),require("../../icons/customIcons/icons/ZipperFrac.js"),require("../../icons/customIcons/icons/CautionFilled.js"),require("../../icons/customIcons/icons/MoreApp.js"),require("../../icons/customIcons/icons/Pad.js"),require("../../icons/customIcons/icons/DrilloutUnit.js"),require("../../icons/customIcons/icons/FracFleet.js"),require("../../icons/customIcons/icons/Global.js"),require("../../icons/customIcons/icons/Program.js"),require("../../icons/customIcons/icons/Rig.js"),require("../../icons/customIcons/icons/Well.js"),require("../../icons/customIcons/icons/Gap.js"),require("../../icons/customIcons/icons/Pin.js"),require("../../icons/customIcons/icons/CloseOneFilled.js"),require("../../icons/customIcons/icons/AttentionFilled.js"),require("../../icons/customIcons/icons/CheckOneFilled.js"),require("../../icons/customIcons/icons/Archive.js"),require("../../icons/customIcons/icons/ArchiveCancel.js"),require("../../icons/customIcons/icons/Unarchive.js"),require("../../icons/customIcons/icons/Archived.js"),require("../../icons/customIcons/icons/InterventionUnit.js"),require("../../icons/customIcons/icons/CloudDelete.js"),require("../../icons/customIcons/icons/Lasso.js"),require("../../icons/customIcons/icons/Radius.js"),require("../../icons/customIcons/icons/ErrorOps.js"),require("../../icons/customIcons/icons/DataTypeOps.js"),require("../../icons/customIcons/icons/FalsePositiveOps.js"),require("../../icons/customIcons/icons/CalibrationOps.js"),require("../../icons/customIcons/icons/CriticalOps.js"),require("../../icons/customIcons/icons/Company.js"),require("../../icons/customIcons/icons/ArchiveOne.js"),require("../../icons/customIcons/icons/ParseBotFusion.js"),require("../../icons/customIcons/icons/Connect.js"),require("../../icons/customIcons/icons/PuzzleOne.js"),require("../../icons/customIcons/icons/Feed.js"),require("../../icons/customIcons/icons/Prompt.js"),require("../../icons/customIcons/icons/Companies.js"),require("../../icons/customIcons/icons/ClipboardAi.js"),require("../../icons/customIcons/icons/Key.js"),require("../../icons/customIcons/icons/AtSignCrossed.js"),require("../../icons/customIcons/icons/MappingManual.js"),require("../../icons/customIcons/icons/Mapping.js"),require("../../icons/customIcons/icons/Metrics.js"),require("../../icons/customIcons/icons/Drops.js"),require("../../icons/customIcons/icons/ClipboardSearch.js"),require("../../icons/customIcons/icons/Template.js"),require("../../icons/customIcons/icons/ClipboardMetrics.js"),require("../../icons/customIcons/icons/ClipboardBuilder.js"),require("../../icons/customIcons/icons/UnitConversion.js"),require("../../icons/customIcons/icons/NPT.js"),require("../../icons/customIcons/icons/GuidedFrac.js");var t=require("../AttachmentPreview/AttachmentPreview.js");require("../../componentsV2/FileIcon/FileIcon.js"),require("@material-ui/core");var u=require("react/jsx-runtime");require("../../componentsV2/Menu/Menu.js"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("../../clients/jsonApi/index.js"),require("../../utils/main.js"),require("../AttachmentPreview/AttachmentImage.js"),require("../AttachmentPreview/AttachmentPreview.scss.js"),require("file-extension"),require("image-extensions"),require("video-extensions");var a=require("./useFileDrop.js"),l=require("./useFilePaste.js"),m=require("./CommentInputNext.scss.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var j=d(e),q=d(s),I=d(i);function p(e,s){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);s&&(i=i.filter((function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable}))),o.push.apply(o,i)}return o}function h(e){for(var s=1;s<arguments.length;s++){var o=null!=arguments[s]?arguments[s]:{};s%2?p(Object(o),!0).forEach((function(s){j.default(e,s,o[s])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):p(Object(o)).forEach((function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(o,s))}))}return e}var v=o.forwardRef((function(e,s){var i=e.placeholder,d=void 0===i?"Add a comment":i,j=e.value,p=e.onChange,v=e.onSubmit,f=e.onCancel,b=e.disabled,x=e.autoFocus,g=e.minRows,O=void 0===g?1:g,y=e.maxRows,C=e.field,P=e.canSubmit,F=e.bare,A=e.leading,w=e.trailing,D=e.sendTooltip,N=void 0===D?"Send":D,R=e.attachments,k=e.onAttachmentRemove,M=e.onAttachmentRetry,S=e.onAttachmentReorder,E=e.onFilesDrop,T=e.onImageLinkPaste,B=e.dropLabel,L=void 0===B?"Drop files here":B,G=e.attachmentSlot,U=e.toolbar,H=e.footer,V=e.embedded,z=e.className,K=e.testId,W=a.useFileDrop(b?void 0:E),_=W.isDragging,Y=W.dropHandlers,Z=l.useFilePaste(b?{}:{onFiles:E,onImageLink:T}).pasteHandlers,J=_&&u.jsx("div",{className:m.dropOverlay,children:L}),Q=void 0!==j,X=o.useState(""),$=q.default(X,2),ee=$[0],se=$[1],oe=Q?j:ee,ie=null!=y?y:F?12:8,ne=o.useRef(null),ce=o.useCallback((function(e){if(ne.current=e,e){var s=e;s.style.height="auto";var o=20*ie;s.style.height="".concat(Math.min(s.scrollHeight,o),"px"),s.style.overflowY=s.scrollHeight>o?"auto":"hidden"}}),[ie]);o.useLayoutEffect((function(){C||ce(ne.current)}),[oe,C,ce]);var re=(null!=P?P:!!oe.trim())&&!b,te=function(){re&&(null==v||v(oe.trim()),Q||C||se(""))},ue=null!=C?C:u.jsx("textarea",{ref:ce,className:m.input,rows:O,placeholder:d,value:oe,disabled:b,autoFocus:x,onChange:function(e){var s;s=e.target.value,Q||se(s),null==p||p(s),ce(e.target)},onKeyDown:function(e){if("Escape"===e.key&&f)return e.preventDefault(),void f();"Enter"!==e.key||e.shiftKey||(e.preventDefault(),te())}}),ae=null!=w?w:u.jsx(c.Tooltip,{title:N,children:u.jsx("span",{className:m.send,children:u.jsx(n.ButtonIcon,{size:F?"xs":"small",type:"primary",disabled:!re,onClick:te,testId:"comment-input-send",children:u.jsx(r.ArrowUpIcon,{})})})}),le=((null==R?void 0:R.length)||G)&&u.jsxs("div",{className:m.attachment,children:[null!=R&&R.length?u.jsx(t.AttachmentPreview,{items:R,onRemove:k,onRetry:M,onReorder:S}):null,G]});return F?u.jsxs("div",h(h(h({ref:s,"data-testid":K,className:I.default(m.rootBare,z)},Y),Z),{},{children:[J,u.jsxs("div",{className:m.fieldRow,children:[A&&u.jsx("div",{className:m.leading,children:A}),u.jsxs("div",{className:I.default(m.field,!!le&&m.fieldExpanded,b&&m.fieldDisabled),children:[u.jsxs("div",{className:m.fieldMain,children:[ue,le]}),U&&u.jsx("div",{className:m.bareToolbar,children:U}),ae]})]})]})):u.jsxs("div",h(h(h({ref:s,"data-testid":K,className:I.default(m.root,V&&m.rootEmbedded,z)},Y),Z),{},{children:[J,u.jsxs("div",{className:m.inputPanel,children:[ue,le,u.jsxs("div",{className:m.toolbarRow,children:[u.jsx("div",{className:m.toolbar,children:U}),ae]})]}),H&&u.jsxs(u.Fragment,{children:[u.jsx("div",{className:m.divider}),u.jsx("div",{className:m.metaShare,children:H})]})]}))}));exports.CommentInput=v;
|
|
2
2
|
//# sourceMappingURL=CommentInputNext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommentInputNext.js","sources":["../../../../src/components/CommentInputNext/CommentInputNext.tsx"],"sourcesContent":["import {\n forwardRef,\n KeyboardEvent,\n ReactNode,\n useState,\n useCallback,\n useRef,\n useLayoutEffect,\n ChangeEvent,\n} from 'react';\nimport classNames from 'classnames';\n\nimport { ButtonIcon } from '../../componentsV2/ButtonIcon';\nimport { Tooltip } from '../../componentsV2/Tooltip';\nimport { ArrowUpIcon } from '../../icons';\nimport { AttachmentPreview } from '../AttachmentPreview';\nimport { AttachmentPreviewItem } from '../AttachmentPreview/AttachmentPreview.types';\n\nimport { useFileDrop } from './useFileDrop';\n\nimport styles from './CommentInputNext.scss';\n\nexport type CommentInputProps = {\n placeholder?: string;\n value?: string;\n onChange?: (value: string) => void;\n onSubmit?: (value: string) => void;\n onCancel?: () => void;\n disabled?: boolean;\n autoFocus?: boolean;\n minRows?: number;\n maxRows?: number;\n\n /** Editable control rendered in place of the built-in textarea. */\n field?: ReactNode;\n canSubmit?: boolean;\n /** Drop the outer surface so the field sits flush, for the in-card reply input. */\n bare?: boolean;\n\n leading?: ReactNode;\n /** Replaces the default send button. */\n trailing?: ReactNode;\n sendTooltip?: string;\n\n attachments?: AttachmentPreviewItem[];\n onAttachmentRemove?: (id: AttachmentPreviewItem['id']) => void;\n onAttachmentRetry?: (id: AttachmentPreviewItem['id']) => void;\n /** Enables drag-to-reorder on the attachment strip. */\n onAttachmentReorder?: (orderedIds: AttachmentPreviewItem['id'][]) => void;\n /** Enables dropping files from the desktop onto the composer. */\n onFilesDrop?: (files: File[]) => void;\n dropLabel?: string;\n /** Extra content in the attachment area, e.g. an upload-error banner. */\n attachmentSlot?: ReactNode;\n toolbar?: ReactNode;\n footer?: ReactNode;\n /** Render flush inside a host surface: no background, full-width divider. */\n embedded?: boolean;\n\n className?: string;\n testId?: string;\n};\n\nconst LINE_HEIGHT_PX = 20;\nconst DEFAULT_MAX_ROWS = 8;\nconst BARE_MAX_ROWS = 12;\n\nexport const CommentInput = forwardRef<HTMLDivElement, CommentInputProps>(\n (\n {\n placeholder = 'Add a comment',\n value,\n onChange,\n onSubmit,\n onCancel,\n disabled,\n autoFocus,\n minRows = 1,\n maxRows,\n field,\n canSubmit,\n bare,\n leading,\n trailing,\n sendTooltip = 'Send',\n attachments,\n onAttachmentRemove,\n onAttachmentRetry,\n onAttachmentReorder,\n onFilesDrop,\n dropLabel = 'Drop files here',\n attachmentSlot,\n toolbar,\n footer,\n embedded,\n className,\n testId,\n },\n ref\n ) => {\n const { isDragging, dropHandlers } = useFileDrop(disabled ? undefined : onFilesDrop);\n const dropOverlay = isDragging && <div className={styles.dropOverlay}>{dropLabel}</div>;\n\n const isControlled = value !== undefined;\n const [internalValue, setInternalValue] = useState('');\n const text = isControlled ? value : internalValue;\n\n // The bare reply field has no toolbar row, so text may fill the whole box.\n const rowsCap = maxRows ?? (bare ? BARE_MAX_ROWS : DEFAULT_MAX_ROWS);\n\n const textareaRef = useRef<HTMLTextAreaElement | null>(null);\n const resize = useCallback(\n (el: HTMLTextAreaElement | null) => {\n textareaRef.current = el;\n if (!el) return;\n const node = el;\n node.style.height = 'auto';\n const maxHeight = rowsCap * LINE_HEIGHT_PX;\n node.style.height = `${Math.min(node.scrollHeight, maxHeight)}px`;\n node.style.overflowY = node.scrollHeight > maxHeight ? 'auto' : 'hidden';\n },\n [rowsCap]\n );\n\n // The ref callback won't fire for a prop-driven value change.\n useLayoutEffect(() => {\n if (!field) resize(textareaRef.current);\n }, [text, field, resize]);\n\n const setText = (next: string) => {\n if (!isControlled) setInternalValue(next);\n onChange?.(next);\n };\n\n const handleChange = (event: ChangeEvent<HTMLTextAreaElement>) => {\n setText(event.target.value);\n resize(event.target);\n };\n\n const canSend = (canSubmit ?? !!text.trim()) && !disabled;\n\n const submit = () => {\n if (!canSend) return;\n onSubmit?.(text.trim());\n if (!isControlled && !field) setInternalValue('');\n };\n\n const handleKeyDown = (event: KeyboardEvent<HTMLTextAreaElement>) => {\n if (event.key === 'Escape' && onCancel) {\n event.preventDefault();\n onCancel();\n return;\n }\n\n if (event.key === 'Enter' && !event.shiftKey) {\n event.preventDefault();\n submit();\n }\n };\n\n const editor = field ?? (\n <textarea\n ref={resize}\n className={styles.input}\n rows={minRows}\n placeholder={placeholder}\n value={text}\n disabled={disabled}\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={autoFocus}\n onChange={handleChange}\n onKeyDown={handleKeyDown}\n />\n );\n\n const sendButton = trailing ?? (\n // A disabled button fires no events, so the tooltip needs its own target.\n <Tooltip title={sendTooltip}>\n <span className={styles.send}>\n <ButtonIcon\n size={bare ? 'xs' : 'small'}\n type=\"primary\"\n disabled={!canSend}\n onClick={submit}\n testId=\"comment-input-send\"\n >\n <ArrowUpIcon />\n </ButtonIcon>\n </span>\n </Tooltip>\n );\n\n const attachmentArea = (attachments?.length || attachmentSlot) && (\n <div className={styles.attachment}>\n {attachments?.length ? (\n <AttachmentPreview\n items={attachments}\n onRemove={onAttachmentRemove}\n onRetry={onAttachmentRetry}\n onReorder={onAttachmentReorder}\n />\n ) : null}\n {attachmentSlot}\n </div>\n );\n\n if (bare) {\n return (\n <div\n ref={ref}\n data-testid={testId}\n className={classNames(styles.rootBare, className)}\n {...dropHandlers}\n >\n {dropOverlay}\n <div className={styles.fieldRow}>\n {leading && <div className={styles.leading}>{leading}</div>}\n <div\n className={classNames(\n styles.field,\n !!attachmentArea && styles.fieldExpanded,\n disabled && styles.fieldDisabled\n )}\n >\n <div className={styles.fieldMain}>\n {editor}\n {attachmentArea}\n </div>\n {toolbar && <div className={styles.bareToolbar}>{toolbar}</div>}\n {sendButton}\n </div>\n </div>\n </div>\n );\n }\n\n return (\n <div\n ref={ref}\n data-testid={testId}\n className={classNames(styles.root, embedded && styles.rootEmbedded, className)}\n {...dropHandlers}\n >\n {dropOverlay}\n <div className={styles.inputPanel}>\n {editor}\n {attachmentArea}\n <div className={styles.toolbarRow}>\n <div className={styles.toolbar}>{toolbar}</div>\n {sendButton}\n </div>\n </div>\n\n {footer && (\n <>\n <div className={styles.divider} />\n <div className={styles.metaShare}>{footer}</div>\n </>\n )}\n </div>\n );\n }\n);\n"],"names":["CommentInput","forwardRef","_ref","ref","_ref$placeholder","placeholder","value","onChange","onSubmit","onCancel","disabled","autoFocus","_ref$minRows","minRows","maxRows","field","canSubmit","bare","leading","trailing","_ref$sendTooltip","sendTooltip","attachments","onAttachmentRemove","onAttachmentRetry","onAttachmentReorder","onFilesDrop","_ref$dropLabel","dropLabel","attachmentSlot","toolbar","footer","embedded","className","testId","_useFileDrop","useFileDrop","undefined","isDragging","dropHandlers","dropOverlay","_jsx","jsx","styles","children","isControlled","useState","_useState2","_slicedToArray","_useState","internalValue","setInternalValue","text","rowsCap","textareaRef","useRef","resize","useCallback","el","current","node","style","height","maxHeight","Math","min","scrollHeight","overflowY","useLayoutEffect","canSend","trim","submit","editor","input","rows","event","next","target","onKeyDown","key","preventDefault","shiftKey","sendButton","Tooltip","title","send","ButtonIcon","size","type","onClick","ArrowUpIcon","attachmentArea","length","_jsxs","attachment","AttachmentPreview","items","onRemove","onRetry","onReorder","_objectSpread","classNames","rootBare","jsxs","fieldRow","fieldExpanded","fieldDisabled","fieldMain","bareToolbar","root","rootEm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/CommentInputNext.tsx"],"sourcesContent":["import {\n forwardRef,\n KeyboardEvent,\n ReactNode,\n useState,\n useCallback,\n useRef,\n useLayoutEffect,\n ChangeEvent,\n} from 'react';\nimport classNames from 'classnames';\n\nimport { ButtonIcon } from '../../componentsV2/ButtonIcon';\nimport { Tooltip } from '../../componentsV2/Tooltip';\nimport { ArrowUpIcon } from '../../icons';\nimport { AttachmentPreview } from '../AttachmentPreview';\nimport { AttachmentPreviewItem } from '../AttachmentPreview/AttachmentPreview.types';\n\nimport { useFileDrop } from './useFileDrop';\nimport { useFilePaste } from './useFilePaste';\n\nimport styles from './CommentInputNext.scss';\n\nexport type CommentInputProps = {\n placeholder?: string;\n value?: string;\n onChange?: (value: string) => void;\n onSubmit?: (value: string) => void;\n onCancel?: () => void;\n disabled?: boolean;\n autoFocus?: boolean;\n minRows?: number;\n maxRows?: number;\n\n /** Editable control rendered in place of the built-in textarea. */\n field?: ReactNode;\n canSubmit?: boolean;\n /** Drop the outer surface so the field sits flush, for the in-card reply input. */\n bare?: boolean;\n\n leading?: ReactNode;\n /** Replaces the default send button. */\n trailing?: ReactNode;\n sendTooltip?: string;\n\n attachments?: AttachmentPreviewItem[];\n onAttachmentRemove?: (id: AttachmentPreviewItem['id']) => void;\n onAttachmentRetry?: (id: AttachmentPreviewItem['id']) => void;\n /** Enables drag-to-reorder on the attachment strip. */\n onAttachmentReorder?: (orderedIds: AttachmentPreviewItem['id'][]) => void;\n /** Enables dropping files from the desktop onto the composer. */\n onFilesDrop?: (files: File[]) => void;\n /** Given a pasted link that points at an image. */\n onImageLinkPaste?: (url: string) => void;\n dropLabel?: string;\n /** Extra content in the attachment area, e.g. an upload-error banner. */\n attachmentSlot?: ReactNode;\n toolbar?: ReactNode;\n footer?: ReactNode;\n /** Render flush inside a host surface: no background, full-width divider. */\n embedded?: boolean;\n\n className?: string;\n testId?: string;\n};\n\nconst LINE_HEIGHT_PX = 20;\nconst DEFAULT_MAX_ROWS = 8;\nconst BARE_MAX_ROWS = 12;\n\nexport const CommentInput = forwardRef<HTMLDivElement, CommentInputProps>(\n (\n {\n placeholder = 'Add a comment',\n value,\n onChange,\n onSubmit,\n onCancel,\n disabled,\n autoFocus,\n minRows = 1,\n maxRows,\n field,\n canSubmit,\n bare,\n leading,\n trailing,\n sendTooltip = 'Send',\n attachments,\n onAttachmentRemove,\n onAttachmentRetry,\n onAttachmentReorder,\n onFilesDrop,\n onImageLinkPaste,\n dropLabel = 'Drop files here',\n attachmentSlot,\n toolbar,\n footer,\n embedded,\n className,\n testId,\n },\n ref\n ) => {\n const { isDragging, dropHandlers } = useFileDrop(disabled ? undefined : onFilesDrop);\n const { pasteHandlers } = useFilePaste(\n disabled ? {} : { onFiles: onFilesDrop, onImageLink: onImageLinkPaste }\n );\n const dropOverlay = isDragging && <div className={styles.dropOverlay}>{dropLabel}</div>;\n\n const isControlled = value !== undefined;\n const [internalValue, setInternalValue] = useState('');\n const text = isControlled ? value : internalValue;\n\n // The bare reply field has no toolbar row, so text may fill the whole box.\n const rowsCap = maxRows ?? (bare ? BARE_MAX_ROWS : DEFAULT_MAX_ROWS);\n\n const textareaRef = useRef<HTMLTextAreaElement | null>(null);\n const resize = useCallback(\n (el: HTMLTextAreaElement | null) => {\n textareaRef.current = el;\n if (!el) return;\n const node = el;\n node.style.height = 'auto';\n const maxHeight = rowsCap * LINE_HEIGHT_PX;\n node.style.height = `${Math.min(node.scrollHeight, maxHeight)}px`;\n node.style.overflowY = node.scrollHeight > maxHeight ? 'auto' : 'hidden';\n },\n [rowsCap]\n );\n\n // The ref callback won't fire for a prop-driven value change.\n useLayoutEffect(() => {\n if (!field) resize(textareaRef.current);\n }, [text, field, resize]);\n\n const setText = (next: string) => {\n if (!isControlled) setInternalValue(next);\n onChange?.(next);\n };\n\n const handleChange = (event: ChangeEvent<HTMLTextAreaElement>) => {\n setText(event.target.value);\n resize(event.target);\n };\n\n const canSend = (canSubmit ?? !!text.trim()) && !disabled;\n\n const submit = () => {\n if (!canSend) return;\n onSubmit?.(text.trim());\n if (!isControlled && !field) setInternalValue('');\n };\n\n const handleKeyDown = (event: KeyboardEvent<HTMLTextAreaElement>) => {\n if (event.key === 'Escape' && onCancel) {\n event.preventDefault();\n onCancel();\n return;\n }\n\n if (event.key === 'Enter' && !event.shiftKey) {\n event.preventDefault();\n submit();\n }\n };\n\n const editor = field ?? (\n <textarea\n ref={resize}\n className={styles.input}\n rows={minRows}\n placeholder={placeholder}\n value={text}\n disabled={disabled}\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={autoFocus}\n onChange={handleChange}\n onKeyDown={handleKeyDown}\n />\n );\n\n const sendButton = trailing ?? (\n // A disabled button fires no events, so the tooltip needs its own target.\n <Tooltip title={sendTooltip}>\n <span className={styles.send}>\n <ButtonIcon\n size={bare ? 'xs' : 'small'}\n type=\"primary\"\n disabled={!canSend}\n onClick={submit}\n testId=\"comment-input-send\"\n >\n <ArrowUpIcon />\n </ButtonIcon>\n </span>\n </Tooltip>\n );\n\n const attachmentArea = (attachments?.length || attachmentSlot) && (\n <div className={styles.attachment}>\n {attachments?.length ? (\n <AttachmentPreview\n items={attachments}\n onRemove={onAttachmentRemove}\n onRetry={onAttachmentRetry}\n onReorder={onAttachmentReorder}\n />\n ) : null}\n {attachmentSlot}\n </div>\n );\n\n if (bare) {\n return (\n <div\n ref={ref}\n data-testid={testId}\n className={classNames(styles.rootBare, className)}\n {...dropHandlers}\n {...pasteHandlers}\n >\n {dropOverlay}\n <div className={styles.fieldRow}>\n {leading && <div className={styles.leading}>{leading}</div>}\n <div\n className={classNames(\n styles.field,\n !!attachmentArea && styles.fieldExpanded,\n disabled && styles.fieldDisabled\n )}\n >\n <div className={styles.fieldMain}>\n {editor}\n {attachmentArea}\n </div>\n {toolbar && <div className={styles.bareToolbar}>{toolbar}</div>}\n {sendButton}\n </div>\n </div>\n </div>\n );\n }\n\n return (\n <div\n ref={ref}\n data-testid={testId}\n className={classNames(styles.root, embedded && styles.rootEmbedded, className)}\n {...dropHandlers}\n {...pasteHandlers}\n >\n {dropOverlay}\n <div className={styles.inputPanel}>\n {editor}\n {attachmentArea}\n <div className={styles.toolbarRow}>\n <div className={styles.toolbar}>{toolbar}</div>\n {sendButton}\n </div>\n </div>\n\n {footer && (\n <>\n <div className={styles.divider} />\n <div className={styles.metaShare}>{footer}</div>\n </>\n )}\n </div>\n );\n }\n);\n"],"names":["CommentInput","forwardRef","_ref","ref","_ref$placeholder","placeholder","value","onChange","onSubmit","onCancel","disabled","autoFocus","_ref$minRows","minRows","maxRows","field","canSubmit","bare","leading","trailing","_ref$sendTooltip","sendTooltip","attachments","onAttachmentRemove","onAttachmentRetry","onAttachmentReorder","onFilesDrop","onImageLinkPaste","_ref$dropLabel","dropLabel","attachmentSlot","toolbar","footer","embedded","className","testId","_useFileDrop","useFileDrop","undefined","isDragging","dropHandlers","pasteHandlers","useFilePaste","onFiles","onImageLink","dropOverlay","_jsx","jsx","styles","children","isControlled","useState","_useState2","_slicedToArray","_useState","internalValue","setInternalValue","text","rowsCap","textareaRef","useRef","resize","useCallback","el","current","node","style","height","maxHeight","Math","min","scrollHeight","overflowY","useLayoutEffect","canSend","trim","submit","editor","input","rows","event","next","target","onKeyDown","key","preventDefault","shiftKey","sendButton","Tooltip","title","send","ButtonIcon","size","type","onClick","ArrowUpIcon","attachmentArea","length","_jsxs","attachment","AttachmentPreview","items","onRemove","onRetry","onReorder","jsxs","_objectSpread","classNames","rootBare","fieldRow","fieldExpanded","fieldDisabled","fieldMain","bareToolbar","root","rootEmbedded","inputPanel","toolbarRow","_Fragment","divider","metaShare"],"mappings":"+9KAkEA,IAIaA,EAAeC,EAAUA,YACpC,SAAAC,EA+BEC,GACG,IAAAC,EAAAF,EA9BDG,YAAAA,aAAc,gBAAeD,EAC7BE,IAAAA,MACAC,IAAAA,SACAC,IAAAA,SACAC,IAAAA,SACAC,IAAAA,SACAC,IAAAA,UAASC,EAAAV,EACTW,QAAAA,aAAU,EAACD,EACXE,IAAAA,QACAC,IAAAA,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qD,EAAAO,KAAA,MAAA,CAAKvE,UAAWc,EAAO6D,SAAS5D,SAAA,CAC7B/B,GAAW4B,EAAAC,IAAA,MAAA,CAAKb,UAAWc,EAAO9B,QAAQ+B,SAAE/B,IAC7CgF,EAAAO,KAAA,MAAA,CACEvE,UAAWyE,EAAU,QACnB3D,EAAOjC,QACLiF,IAAkBhD,EAAO8D,cAC3BpG,GAAYsC,EAAO+D,eACnB9D,SAEF,CAAAiD,EAAAO,KAAA,MAAA,CAAKvE,UAAWc,EAAOgE,UAAU/D,SAC9B4B,CAAAA,GACAmB,MAEFjE,GAAWe,EAAAC,IAAA,MAAA,CAAKb,UAAWc,EAAOiE,YAAYhE,SAAElB,IAChDwD,aAQTW,EAAAO,KAAA,MAAAC,EAAAA,EAAAA,EAAA,CACEvG,IAAKA,EACL,cAAagC,EACbD,UAAWyE,EAAU,QAAC3D,EAAOkE,KAAMjF,GAAYe,EAAOmE,aAAcjF,IAChEM,GACAC,GAAa,GAAA,CAAAQ,SAAA,CAEhBJ,EACDqD,EAAAO,KAAA,MAAA,CAAKvE,UAAWc,EAAOoE,WAAWnE,SAC/B4B,CAAAA,GACAmB,GACDE,EAAAA,KAAA,MAAA,CAAKhE,UAAWc,EAAOqE,WAAWpE,SAChC,CAAAH,EAAAC,IAAA,MAAA,CAAKb,UAAWc,EAAOjB,QAAQkB,SAAElB,IAChCwD,SAIJvD,GACCkE,EAAAO,KAAAa,WAAA,CAAArE,SACE,CAAAH,EAAAC,IAAA,MAAA,CAAKb,UAAWc,EAAOuE,UACvBzE,EAAAC,IAAA,MAAA,CAAKb,UAAWc,EAAOwE,UAAUvE,SAAEjB,UAK7C"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("../../utils/links.js"),r=function(e){var t;return Array.from(null!==(t=null==e?void 0:e.items)&&void 0!==t?t:[]).filter((function(e){return"file"===e.kind})).map((function(e){return e.getAsFile()})).filter((function(e){return!!e}))};exports.getPastedFiles=r,exports.useFilePaste=function(n){var i=n.onFiles,l=n.onImageLink,a=e.useCallback((function(e){var n,a,u=r(e.clipboardData);if(u.length)return e.preventDefault(),void(null==i||i(u));var o=t.readPastedLink(null!==(n=null===(a=e.clipboardData)||void 0===a?void 0:a.getData("text/plain"))&&void 0!==n?n:"");o&&t.getIsImageUrl(o)&&(null==l||l(o))}),[i,l]);return{pasteHandlers:e.useMemo((function(){return i||l?{onPaste:a}:void 0}),[i,l,a])}};
|
|
2
|
+
//# sourceMappingURL=useFilePaste.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFilePaste.js","sources":["../../../../src/components/CommentInputNext/useFilePaste.ts"],"sourcesContent":["import { ClipboardEvent, useCallback, useMemo } from 'react';\n\nimport { getIsImageUrl, readPastedLink } from '~/utils/links';\n\ntype PasteHandlers = {\n onPaste: (event: ClipboardEvent) => void;\n};\n\ntype UseFilePasteOptions = {\n onFiles?: (files: File[]) => void;\n /** Given a pasted link that points at an image. The link still lands in the text. */\n onImageLink?: (url: string) => void;\n};\n\n/** A pasted screenshot has no name of its own, so the kind comes off the clipboard item. */\nexport const getPastedFiles = (clipboardData: DataTransfer | null): File[] =>\n Array.from(clipboardData?.items ?? [])\n .filter(item => item.kind === 'file')\n .map(item => item.getAsFile())\n .filter((file): file is File => !!file);\n\n/** Returns no handler when there is nothing to hand a paste to, so it never intercepts one. */\nexport const useFilePaste = ({ onFiles, onImageLink }: UseFilePasteOptions) => {\n const onPaste = useCallback(\n (event: ClipboardEvent) => {\n const files = getPastedFiles(event.clipboardData);\n\n if (files.length) {\n // Text pasted alongside is the source app's markup for the file, not a message.\n event.preventDefault();\n onFiles?.(files);\n\n return;\n }\n\n const url = readPastedLink(event.clipboardData?.getData('text/plain') ?? '');\n\n if (url && getIsImageUrl(url)) onImageLink?.(url);\n },\n [onFiles, onImageLink]\n );\n\n const pasteHandlers: PasteHandlers | undefined = useMemo(\n () => (onFiles || onImageLink ? { onPaste } : undefined),\n [onFiles, onImageLink, onPaste]\n );\n\n return { pasteHandlers };\n};\n"],"names":["getPastedFiles","clipboardData","_clipboardData$items","Array","from","items","filter","item","kind","map","getAsFile","file","_ref","onFiles","onImageLink","onPaste","useCallback","event","_event$clipboardData$","_event$clipboardData","files","length","preventDefault","url","readPastedLink","getData","getIsImageUrl","pasteHandlers","useMemo","undefined"],"mappings":"6HAeaA,EAAiB,SAACC,GAAkC,IAAAC,EAAA,OAC/DC,MAAMC,eAAKH,aAAAA,EAAAA,EAAeI,qBAAS,IAChCC,QAAO,SAAAC,GAAI,MAAkB,SAAdA,EAAKC,IAAe,IACnCC,KAAI,SAAAF,GAAI,OAAIA,EAAKG,WAAW,IAC5BJ,QAAO,SAACK,GAAI,QAAqBA,IAAK,gDAGf,SAAmDC,GAAA,IAAhDC,IAAAA,QAASC,IAAAA,YAChCC,EAAUC,eACd,SAACC,GAA0B,IAAAC,EAAAC,EACnBC,EAAQpB,EAAeiB,EAAMhB,eAEnC,GAAImB,EAAMC,OAKR,OAHAJ,EAAMK,sBACNT,SAAAA,EAAUO,IAKZ,IAAMG,EAAMC,iBAAyD,QAA3CN,EAAC,QAADC,EAACF,EAAMhB,qBAAN,IAAAkB,OAAA,EAAAA,EAAqBM,QAAQ,qBAAa,IAAAP,EAAAA,EAAI,IAErEK,GAAOG,EAAaA,cAACH,KAAMT,SAAAA,EAAcS,GAC/C,GACA,CAACV,EAASC,IAQZ,MAAO,CAAEa,cALwCC,EAAAA,SAC/C,WAAA,OAAOf,GAAWC,EAAc,CAAEC,QAAAA,QAAYc,CAAU,GACxD,CAAChB,EAASC,EAAaC,IAI3B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("prop-types"),a=require("../AppContext.js"),r=require("./effects/useAppsData.js"),s=require("react/jsx-runtime");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=d(e);function u(e){var d=e.children,t=e.dashboardAssetId,u=
|
|
1
|
+
"use strict";var e=require("prop-types"),a=require("../AppContext.js"),r=require("./effects/useAppsData.js"),s=require("react/jsx-runtime");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=d(e);function u(e){var d=e.children,t=e.dashboardAssetId,u=e.apps,o=e.dashboardMeta,p=r({apps:u,dashboardAssetId:t,dashboardMeta:o});return s.jsx(a.Provider,{value:p,children:d})}u.propTypes={children:t.default.node.isRequired,dashboardAssetId:t.default.string,apps:t.default.arrayOf(t.default.shape({})).isRequired,dashboardMeta:t.default.shape({isChiplessDashboard:t.default.bool})},u.defaultProps={dashboardAssetId:null,dashboardMeta:void 0},module.exports=u;
|
|
2
2
|
//# sourceMappingURL=AppsDataProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppsDataProvider.js","sources":["../../../../../src/components/DevCenter/AppsDataProvider/AppsDataProvider.js"],"sourcesContent":["import PropTypes from 'prop-types';\n\nimport AppContext from '../AppContext';\n\nimport { useAppsData } from './effects';\n\nfunction AppsDataProvider({ children, dashboardAssetId
|
|
1
|
+
{"version":3,"file":"AppsDataProvider.js","sources":["../../../../../src/components/DevCenter/AppsDataProvider/AppsDataProvider.js"],"sourcesContent":["import PropTypes from 'prop-types';\n\nimport AppContext from '../AppContext';\n\nimport { useAppsData } from './effects';\n\nfunction AppsDataProvider({ children, dashboardAssetId, apps, dashboardMeta }) {\n const appsData = useAppsData({ apps, dashboardAssetId, dashboardMeta });\n\n return <AppContext.Provider value={appsData}>{children}</AppContext.Provider>;\n}\n\nAppsDataProvider.propTypes = {\n children: PropTypes.node.isRequired,\n dashboardAssetId: PropTypes.string,\n apps: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n dashboardMeta: PropTypes.shape({\n isChiplessDashboard: PropTypes.bool,\n }),\n};\n\nAppsDataProvider.defaultProps = {\n dashboardAssetId: null,\n dashboardMeta: undefined,\n};\n\nexport default AppsDataProvider;\n"],"names":["AppsDataProvider","_ref","children","dashboardAssetId","apps","dashboardMeta","appsData","useAppsData","_jsx","jsx","AppContext","Provider","value","propTypes","PropTypes","node","isRequired","string","arrayOf","shape","isChiplessDashboard","bool","defaultProps","undefined"],"mappings":"+NAMA,SAASA,EAAsEC,GAAA,IAAnDC,IAAAA,SAAUC,IAAAA,iBAAkBC,IAAAA,KAAMC,IAAAA,cACtDC,EAAWC,EAAY,CAAEH,KAAAA,EAAMD,iBAAAA,EAAkBE,cAAAA,IAEvD,OAAOG,EAAAC,IAACC,EAAWC,SAAQ,CAACC,MAAON,EAASJ,SAAEA,GAChD,CAEAF,EAAiBa,UAAY,CAC3BX,SAAUY,EAAAA,QAAUC,KAAKC,WACzBb,iBAAkBW,EAAS,QAACG,OAC5Bb,KAAMU,EAAS,QAACI,QAAQJ,EAAAA,QAAUK,MAAM,CAAA,IAAKH,WAC7CX,cAAeS,EAAS,QAACK,MAAM,CAC7BC,oBAAqBN,EAAS,QAACO,QAInCrB,EAAiBsB,aAAe,CAC9BnB,iBAAkB,KAClBE,mBAAekB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),s=require("@babel/runtime/helpers/slicedToArray"),o=require("react"),n=require("classnames"),r=require("lodash"),t=require("@material-ui/core"),i=require("@material-ui/icons"),c=require("../AppContext.js"),p=require("../DevCenterRouterContext/DevCenterRouterContext.js");require("../DevCenterRouterContext/UniversalLink/UniversalLink.js"),require("@babel/runtime/helpers/objectWithoutProperties"),require("react-router-dom"),require("query-string");var u=require("react/jsx-runtime"),a=require("./effects/useAppSettings.js"),l=require("./effects/useAnnotationsList.js"),d=require("./effects/useAnnotationsData.js"),m=require("./effects/useAppMaximized.js"),q=require("./components/AppActions/AppActions.js"),j=require("./components/AppSettingsDialog/AppSettingsDialog.js");require("./components/AppSettingsDialog/components/RemoveAppButton.js"),require("./components/AppSettingsDialog/components/SettingsAccordion.js"),require("./components/AnnotationsButton/AnnotationsButton.js");var A=require("./components/NonPriorityMenus/NonPriorityMenus.js"),g=require("./components/FullscreenButton/FullscreenButton.js");require("./components/AppInfoMessage/AppInfoMessage.js");var C=require("./components/DevCenterAppView/DevCenterAppView.js"),I=require("./components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js");require("./components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js"),require("./components/IsInsideIsolatedDcAppProvider/IsInsideIsolatedDcAppProvider.js");var v=require("./components/RestoreAppSizeButton/index.js"),V=require("./utils.js"),h=require("./components/PriorityMenus/PriorityMenus.js"),S=require("./components/CommentsSwitch/CommentsSwitchProvider.js"),b=require("./components/CommentsSwitch/CommentsSwitchButton.js"),x=require("./DevCenterAppContainer.scss.js"),D=require("../../../utils/mobileDetect.js"),P=require("../../Icons/AnnotationIcon.js"),M=require("../../Annotations/components/AnnotationsList/index.js");require("../../Annotations/components/LastAnnotation/index.js");var f=require("../../Annotations/AnnotationsContext.js");require("../../Toaster/Toaster.js");var T=require("../../Toaster/ToastContainer.js");require("../../../clients/subscriptions/constants.js"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("querystring"),require("uuid/v1"),require("../../../clients/subscriptions.v1.js"),require("../../../clients/jsonApi/index.js"),require("../../../clients/subscriptions/subscriptions-client.factory.js");var y=require("../../../effects/useDevCenterApp.js");require("../../../utils/index.js"),require("uuid"),require("jsona"),require("../../../constants/segment.js"),require("../../../utils/env.js");var L=require("../../../constants/devcenter.js");require("../../../constants/goals.js"),require("../../../constants/alerts.js"),require("../../../constants/apps.js"),require("../../../constants/drillstring.js"),require("../../../constants/completion.js"),require("../../../constants/appPackages.js"),require("../../../constants/notifications.js"),require("../../../constants/feed.js"),require("../../../constants/bha.js"),require("../../../constants/corvaCompanyId.js"),require("../../GradientManager/configuration/constants.js"),require("../../StatusBadge/constants.js"),require("@babel/runtime/helpers/toConsumableArray"),require("lodash/set"),require("lodash/get"),require("lodash/unset"),require("moment"),require("../../../clients/api/apiCore.js"),require("../../../clients/constants.js"),require("../../../clients/sso/auth0.js"),require("../../../clients/sso/oauth2.js"),require("../../../clients/api/rateLimiter.js"),require("lodash/isEmpty"),require("lodash/sortBy"),require("../../../constants/streamSourceType.js"),require("./components/CommentsSwitch/CommentsSwitchContext.js");var k=require("../../../componentsV2/AppCommonsProvider/AppCommonsProvider.js");require("../../../componentsV2/AppCommonsProvider/AppCommonsContext.js"),require("../../../componentsV2/AppSettings/AppSettingsPinningContext.js");var B=require("../../../utils/devcenter.js"),H=require("../../HelpCenter/HelpCenterIcon.js");require("../../../componentsV2/Text/Text.js"),require("../../../componentsV2/Grid/Grid.js"),require("../../../componentsV2/Grid/Cell.js"),require("../../../componentsV2/Header/Header.scss.js"),require("../../../componentsV2/Button/Button.js");var O=require("../../../componentsV2/ButtonIcon/ButtonIcon.js"),F=require("../../../componentsV2/Tooltip/Tooltip.js");require("../../../componentsV2/Popover/Popover.js"),require("../../../componentsV2/PopoverPanel/PopoverPanel.js"),require("../../../componentsV2/Radio/Radio.js"),require("../../../componentsV2/RadioAndCheckboxGroup/RadioAndCheckboxGroup.scss.js"),require("../../../componentsV2/Checkbox/Checkbox.js"),require("../../../componentsV2/TextInput/TextInput.js"),require("../../../componentsV2/TextInputNext/TextInputNext.js"),require("../../../componentsV2/Label/Label.js"),require("../../../componentsV2/TextEndTruncated/TextEndTruncated.scss.js"),require("../../../componentsV2/TextMiddleTruncated/TextMiddleTruncated.constants.js"),require("../../../componentsV2/TextMiddleTruncated/TextMiddleTruncated.scss.js"),require("../../../componentsV2/TextLink/TextLink.js"),require("../../../componentsV2/Chip/Chip.js"),require("../../../componentsV2/ChipAlert/ChipAlert.js"),require("../../../componentsV2/ChipIndicator/ChipIndicator.js"),require("../../../componentsV2/Avatar/Avatar.js"),require("../../../componentsV2/AvatarGroup/AvatarGroup.js"),require("@material-ui/lab"),require("../../../componentsV2/ToggleButtons/ToggleButtons.scss.js"),require("../../../componentsV2/Paper/Paper.js"),require("../../../componentsV2/ModalWindow/ModalWindow.js"),require("../../../componentsV2/Modal/Modal.scss.js"),require("../../../componentsV2/Menu/Menu.js"),require("@icon-park/react/es/all"),require("../../../icons/IconParkProvider.js"),require("../../../icons/customIcons/icons/AddMessage.js"),require("../../../icons/customIcons/icons/DragOne.js"),require("../../../icons/customIcons/icons/Attention.js"),require("../../../icons/customIcons/icons/Collapse.js"),require("../../../icons/customIcons/icons/Dashboard.js"),require("../../../icons/customIcons/icons/Expand.js"),require("../../../icons/customIcons/icons/FolderClosed.js"),require("../../../icons/customIcons/icons/FolderClosedFilled.js"),require("../../../icons/customIcons/icons/FolderOpened.js"),require("../../../icons/customIcons/icons/GreaterOrEqual.js"),require("../../../icons/customIcons/icons/LessOrEqual.js"),require("../../../icons/customIcons/icons/Search.js"),require("../../../icons/customIcons/icons/SearchOne.js"),require("../../../icons/customIcons/icons/Wellhub.js"),require("../../../icons/customIcons/icons/MultiRuler.js"),require("../../../icons/customIcons/icons/Checkbox.js"),require("../../../icons/customIcons/icons/CheckboxChecked.js"),require("../../../icons/customIcons/icons/CheckboxIndeterminate.js"),require("../../../icons/customIcons/icons/Radio.js"),require("../../../icons/customIcons/icons/RadioChecked.js"),require("../../../icons/customIcons/icons/SimulFrac.js"),require("../../../icons/customIcons/icons/ZipperFrac.js"),require("../../../icons/customIcons/icons/CautionFilled.js"),require("../../../icons/customIcons/icons/MoreApp.js"),require("../../../icons/customIcons/icons/Pad.js"),require("../../../icons/customIcons/icons/DrilloutUnit.js"),require("../../../icons/customIcons/icons/FracFleet.js"),require("../../../icons/customIcons/icons/Global.js"),require("../../../icons/customIcons/icons/Program.js"),require("../../../icons/customIcons/icons/Rig.js"),require("../../../icons/customIcons/icons/Well.js"),require("../../../icons/customIcons/icons/Gap.js"),require("../../../icons/customIcons/icons/Pin.js"),require("../../../icons/customIcons/icons/CloseOneFilled.js"),require("../../../icons/customIcons/icons/AttentionFilled.js"),require("../../../icons/customIcons/icons/CheckOneFilled.js"),require("../../../icons/customIcons/icons/Archive.js"),require("../../../icons/customIcons/icons/ArchiveCancel.js"),require("../../../icons/customIcons/icons/Unarchive.js"),require("../../../icons/customIcons/icons/Archived.js"),require("../../../icons/customIcons/icons/InterventionUnit.js"),require("../../../icons/customIcons/icons/CloudDelete.js"),require("../../../icons/customIcons/icons/Lasso.js"),require("../../../icons/customIcons/icons/Radius.js"),require("../../../icons/customIcons/icons/ErrorOps.js"),require("../../../icons/customIcons/icons/DataTypeOps.js"),require("../../../icons/customIcons/icons/FalsePositiveOps.js"),require("../../../icons/customIcons/icons/CalibrationOps.js"),require("../../../icons/customIcons/icons/CriticalOps.js"),require("../../../icons/customIcons/icons/Company.js"),require("../../../icons/customIcons/icons/ArchiveOne.js"),require("../../../icons/customIcons/icons/ParseBotFusion.js"),require("../../../icons/customIcons/icons/Connect.js"),require("../../../icons/customIcons/icons/PuzzleOne.js"),require("../../../icons/customIcons/icons/Feed.js"),require("../../../icons/customIcons/icons/Prompt.js"),require("../../../icons/customIcons/icons/Companies.js"),require("../../../icons/customIcons/icons/ClipboardAi.js"),require("../../../icons/customIcons/icons/Key.js"),require("../../../icons/customIcons/icons/AtSignCrossed.js"),require("../../../icons/customIcons/icons/MappingManual.js"),require("../../../icons/customIcons/icons/Mapping.js"),require("../../../icons/customIcons/icons/Metrics.js"),require("../../../icons/customIcons/icons/Drops.js"),require("../../../icons/customIcons/icons/ClipboardSearch.js"),require("../../../icons/customIcons/icons/Template.js"),require("../../../icons/customIcons/icons/ClipboardMetrics.js"),require("../../../icons/customIcons/icons/ClipboardBuilder.js"),require("../../../icons/customIcons/icons/UnitConversion.js"),require("../../../icons/customIcons/icons/NPT.js"),require("../../../icons/customIcons/icons/GuidedFrac.js"),require("../../../componentsV2/utils.js"),require("../../../componentsV2/Hint/Hint.scss.js"),require("../../../componentsV2/Counter/Counter.js"),require("../../../componentsV2/BadgeBase/BadgeBase.scss.js"),require("../../../componentsV2/TemplatesControl/TemplatesControl.js"),require("zustand"),require("../../../componentsV2/TemplatesControl/utils.js"),require("../../../componentsV2/TemplatesControl/icons/folder/index.js"),require("../../../componentsV2/TemplatesControl/Store/utils.js"),require("../../../componentsV2/TemplatesControl/types.js"),require("../../../permissions/PermissionsContext.js"),require("../../../permissions/constants/index.js"),require("../../../permissions/withPermissionsHOC.js"),require("../../../permissions/ProvidePermissions.js"),require("../../../componentsV2/BadgeDot/BadgeDot.scss.js"),require("../../../componentsV2/LoaderLinear/LoaderLinear.scss.js"),require("../../../componentsV2/LoaderLogo/LoaderLogo.constants.js"),require("../../../componentsV2/LoaderLogo/LoaderLogo.scss.js"),require("../../../componentsV2/Switch/Switch.js"),require("../../../componentsV2/Tabs/Tabs.js"),require("../../../componentsV2/EmptyState/EmptyState.scss.js"),require("../../../componentsV2/FileIcon/FileIcon.js"),require("../../../componentsV2/Tag/Tag.js"),require("react-dropzone"),require("../../../componentsV2/FilesDropzone/FilesDropzone.scss.js"),require("../../../componentsV2/FilesLoader/FilesLoader.scss.js"),require("file-extension"),require("image-extensions"),require("video-extensions"),require("../../../componentsV2/FilesProcessor/FilesProcessor.scss.js"),require("../../../componentsV2/Skeleton/Skeleton.scss.js"),require("../../../utils/main.js"),require("../../../componentsV2/CopyToClipboard/CopyToClipboard.scss.js"),require("../../../componentsV2/Stepper/Step/Step.scss.js"),require("../../../componentsV2/Stepper/Stepper.scss.js"),require("../../../componentsV2/ButtonLive/ButtonLive.js"),require("../../../componentsV2/ButtonText/ButtonText.js"),require("../../../componentsV2/IndicatorLive/IndicatorLive.js"),require("../../../componentsV2/Accordion/Accordion.scss.js"),require("../../../componentsV2/Breadcrumbs/Breadcrumbs.scss.js"),require("../../../componentsV2/BadgeComment/BadgeComment.js"),require("../../../componentsV2/AppContainer/AppContainer.js"),require("../../../componentsV2/AppContainer/AppContainer.constants.js"),require("../../../componentsV2/AppFooter/AppFooter.js"),require("../../../componentsV2/AppHeader/AppHeader.constants.js"),require("../../../componentsV2/AppHeader/AppBadge/AppBadge.scss.js"),require("../../../componentsV2/AppHeader/AppAssets/utils.js"),require("../../../componentsV2/AppHeader/AppAssets/AppAssets.scss.js"),require("../../PadModeSelect/PadModeSelect.js"),require("../../../componentsV2/AppHeader/PadMode/PadMode.scss.js"),require("../../../componentsV2/PadModeSelect/PadModeSelect.js"),require("../../../componentsV2/PadModeSelect/PadModeSelect.constants.js"),require("../../../componentsV2/AppHeader/V3/VersionSelect/VersionSelect.js"),require("../../../componentsV2/UniversalLink/UniversalLink.scss.js"),require("../../../componentsV2/AppHeader/V3/AssetChips/AssetChips.scss.js"),require("../../../componentsV2/AppHeader/V3/DqStatusIcon/DqStatusIcon.js"),require("../../../componentsV2/AppHeader/V3/DqStatusIcon/DqStatusIcon.constants.js"),require("../../../componentsV2/AppFooter/DqPopover/DqStatusIcon/DqStatusIcon.js"),require("../../../componentsV2/AppDqPopover/DqAlertTooltip/DqAlertTooltip.scss.js"),require("../../../componentsV2/AppDqPopover/DqAlert/DqAlert.scss.js"),require("../../../componentsV2/AppDqPopover/DqAsset/DqAsset.scss.js"),require("../../../componentsV2/AppDqPopover/AppDqPopover.scss.js"),require("../../AppIcon/AppIcon.js"),require("../../../utils/getSingleAsset.js"),require("../../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorChip/AssetSelectorChip.js"),require("../../../componentsV2/AppHeader/V3/AssetSelector/constants.js"),require("../../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorSelect/AssetSelectorSelect.scss.js"),require("../../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorSelect/loadAssets.js"),require("../../../componentsV2/AppHeader/V3/AssetSelector/AssetSelector.scss.js"),require("../../../componentsV2/AppHeader/V3/AppTitle/AppTitle.constants.js"),require("../../../componentsV2/AppHeader/V3/AppTitle/AppTitle.scss.js"),require("../../../componentsV2/AppHeader/V3/constants.scss.js"),require("@babel/runtime/helpers/typeof"),require("../../../componentsV2/AppHeader/V3/SettingsButton/SettingsButton.js"),require("../../../componentsV2/AppHeader/V3/SettingsButton/SettingsButton.constants.js"),require("../../../componentsV2/AppSettings/AppSettings.js"),require("../../../componentsV2/AppSettings/AppSettings.constants.js"),require("../../../componentsV2/AppSizeProvider/AppSizeProvider.js"),require("../../../componentsV2/AppHeader/V3/Actions/Actions.constants.js"),require("../../../componentsV2/AppHeader/V3/Actions/Actions.scss.js"),require("../../../componentsV2/AppHeader/V3/AppHeaderV3.scss.js"),require("../../../componentsV2/AppHeader/AppHeader.scss.js"),require("../../../componentsV2/OffsetWellsButton/OffsetWellsButton.js"),require("../../../componentsV2/ChartAxisExtreme/ChartAxisExtreme.scss.js"),require("highcharts"),require("../../../componentsV2/ChartAxisExtreme/ChartAxisExtremeDragTracker.js"),require("../../../componentsV2/Autocomplete/Autocomplete.js"),require("../../../componentsV2/Select/Select.js"),require("../../../componentsV2/AppSettingsDivider/AppSettingsDivider.scss.js"),require("../../../componentsV2/WellArchivedMessage/WellArchivedMessage.js"),require("../../../componentsV2/DatePicker/DatePicker.js"),require("../../../componentsV2/DragHandle/DragHandle.js"),require("../../../componentsV2/CompletionsOffsetWellPicker/CompletionsOffsetWellPicker.js"),require("../../../componentsV2/Slider/constants.js"),require("../../../componentsV2/Slider/components/SliderThumb.js"),require("../../../componentsV2/Slider/Slider.scss.js"),require("../../../componentsV2/SliderAdvanced/SliderAdvanced.js"),require("react-color"),require("../../../componentsV2/ColorPicker/Swatches/Swatches.scss.js"),require("../../../componentsV2/ColorPicker/OpacityDragtracker/OpacityDragTracker.scss.js"),require("../../../componentsV2/ColorPicker/ColorPicker.scss.js"),require("../../../componentsV2/ChartHelper/ChartHelper.scss.js"),require("../../../componentsV2/Hotkey/Hotkey.js");var w=require("../../../utils/notificationToasts.js");function R(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var E=R(e),z=R(s),N=R(n);function _(e,s){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);s&&(n=n.filter((function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable}))),o.push.apply(o,n)}return o}function W(e){for(var s=1;s<arguments.length;s++){var o=null!=arguments[s]?arguments[s]:{};s%2?_(Object(o),!0).forEach((function(s){E.default(e,s,o[s])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):_(Object(o)).forEach((function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(o,s))}))}return e}var U=D.isNativeDetected||D.isMobileDetected,G="DevCenter_AppContainer";module.exports=function(e){var s,n,R,E,_,K,Q,Z,J,X,Y,$,ee,se,oe,ne=e.CLIAppComponent,re=e.CLIAppSettings,te=e.app,ie=e.appId,ce=e.className,pe=e.coordinates,ue=e.currentDashboardAppsLastAnnotations,ae=e.currentUser,le=e.devCenterRouter,de=e.disableAppAssetSelection,me=e.isActionsDisabled,qe=e.isNonIsolatedApp,je=void 0!==qe&&qe,Ae=e.isSettingsDialogHidden,ge=e.layoutEnvironment,Ce=e.onAppContainerClick,Ie=void 0===Ce?r.noop:Ce,ve=e.onAppRemove,Ve=e.onReportBugClick,he=e.onCloneDashboard,Se=e.onHelpCenterClick,be=e.onIsMaximizedChange,xe=e.onSettingChange,De=e.onSettingsChange,Pe=e.openIntercom,Me=void 0===Pe?r.noop:Pe,fe=e.setIsFullscreenModalMode,Te=void 0===fe?r.noop:fe,ye=e.timestamp,Le=e.updateCurrentDashboardAppLastAnnotation,ke=e.dashboardMeta,Be=e.reloadApp,He=void 0===Be?void 0:Be,Oe=e.chatActions,Fe=o.useContext(c),we=t.useTheme(),Re=o.useState([]),Ee=z.default(Re,2),ze=Ee[0],Ne=Ee[1],_e=o.useState([]),We=z.default(_e,2),Ue=We[0],Ge=We[1],Ke=null!==(s=null==Fe?void 0:Fe[ie||te.id])&&void 0!==s?s:{isLoading:!0},Qe=null===(n=te.package)||void 0===n||null===(R=n.manifest)||void 0===R?void 0:R.application,Ze=B.getAppSegment(te),Je=!(null==ke||!ke.isChiplessDashboard),Xe=B.isDCAppMultiRig({uiSettings:null==Qe?void 0:Qe.ui,isChiplessDashboard:Je}),Ye=!(null==Qe||null===(E=Qe.ui)||void 0===E||!E.enable_comments),$e=B.getAppName(te),es=m({onIsMaximizedChange:be,devCenterRouter:le,appId:ie}),ss=es.isMaximized,os=es.setIsMaximized,ns=ye||B.getTimestampFromQuery(null===(_=le.location.query)||void 0===_?void 0:_.query),rs=te.id===L.DEV_CENTER_CLI_APP_ID,ts=rs&&U?W(W({},pe),{},{w:12}):pe,is=V.getAppVersion(te),cs=y({CLIAppComponent:ne,CLIAppSettings:re,app:te,version:is}),ps=cs.isLoading,us=cs.AppSettings,as=cs.AppComponent,ls=a({setIsFullscreenModalMode:Te}),ds=ls.isAppSettingsDialogOpened,ms=ls.toggleAppSettingsDialog,qs=l(),js=qs.isAnnotationsListOpened,As=qs.toggleAnnotationsList,gs=ps||!ae||!Xe&&Ke.isLoading,Cs=d({app:te,appData:Ke,currentDashboardAppsLastAnnotations:ue}),Is=Cs.appLastAnnotation,vs=Cs.assetCompanyId,Vs=Cs.assetIdForAnnotation,hs=Cs.isAppSupportsAnnotations,Ss=r.pickBy(r.pick(Ke,["well","rig","fracFleet","wells","interventionUnit"]),Boolean),bs=o.useMemo((function(){return null==Ue?void 0:Ue.map((function(e){return W(W({},e),{},{onClick:function(){var s;null===(s=e.onClick)||void 0===s||s.call(e),e.to&&le.push(e.to)}})}))}),[Ue,le]),xs=!(null==te||null===(K=te.package)||void 0===K||null===(Q=K.manifest)||void 0===Q||null===(Z=Q.application)||void 0===Z||null===(J=Z.ui)||void 0===J||!J.use_app_header_v3),Ds=!(null==(ee=le)||null===(se=ee.location)||void 0===se||null===(oe=se.pathname)||void 0===oe||!oe.startsWith("/home"));return u.jsx(p.DevCenterRouterContext.Provider,{value:le,children:u.jsx(I.DcFullscreenElemsCoordinatorProvider,{setIsFullscreenModalMode:Te,children:u.jsx(k.AppCommonsProvider,W(W({maximized:ss,setMaximized:os,appId:null==te||null===(X=te.app)||void 0===X?void 0:X.id,app:te,appSettings:te.settings,onSettingChange:xe,onSettingsChange:De,appHeadersV3Enabled:xs,isNonIsolatedApp:je,disableAppAssetSelection:de,isMultiRig:Xe,currentUser:ae,appData:Ke,layoutEnvironment:ge,appSettingsComponent:us,dashboardMeta:ke,toggleAnnotationsList:hs?As:void 0,onHelpCenterClick:Se,secondaryMenuItems:bs,onAppRemove:ve,isInsideNewMobileApp:D.isInsideNewMobileApp,globalOffsetWells:null==ke?void 0:ke.globalOffsetWells,globalOffsetWellsVersion:null==ke?void 0:ke.globalOffsetWellsVersion,globalOffsetWellsToken:null==ke?void 0:ke.globalOffsetWellsToken,reloadApp:He},Ss),{},{children:u.jsx(S.CommentsSwitchProvider,{children:u.jsxs("div",{className:N.default("dc-app-container",D.isInsideNewMobileApp&&"dc-app-container--inside-new-mobile-app",Ds&&"dc-app-container--inside-home-page",ce,ss&&"dc-app-container__maximized",we.isLightTheme&&"dc-app-container__light-theme",x.container),"data-testid":"".concat(G,"_").concat($e),onClick:function(){return Ie()},children:[u.jsx(T.ToastContainer,{}),u.jsx("div",{className:x.containerContent,children:u.jsx(C.default,{AppComponent:as,app:te,appData:Ss,isAppLoading:ps,availability:V.getAppAvailability(te.availability,ae.company.with_subscription),isCLIApp:rs,isLoading:gs,isMultiRig:Xe,layoutEnvironment:ge,openIntercom:Me,segment:Ze,toggleAppSettingsDialog:ms,appProps:{coordinates:ts,currentUser:ae,devCenterRouter:le,onSettingChange:xe,onSettingsChange:De,segment:Ze,setIsFullscreenModalMode:Te,setIsMaximized:os,setMainMenuItems:Ne,setSecondaryMenuItems:Ge,toggleAppSettingsDialog:ms,appHeaderProps:W({app:te,appLastAnnotation:Is,appSettings:te.settings,coordinates:ts,currentUser:ae,isMaximized:ss,layoutEnvironment:ge,onSettingChange:xe,toggleAnnotationsList:As,updateCurrentDashboardAppLastAnnotation:Le},Ss),isNative:D.isNativeDetected,layoutEnvironment:ge,timestamp:ns,chatActions:Oe}})}),ds&&u.jsx(j.default,{AppSettingsComponent:us,app:te,appData:Ke,appName:$e,currentUser:ae,disableAppAssetSelection:de,isMultiRig:Xe,isSettingsDialogHidden:Ae,layoutEnvironment:ge,onAppRemove:ve,onCloneDashboard:he,onSettingChange:xe,onSettingsChange:De,openIntercom:Me,rigId:null!==(Y=null===($=Ke.rig)||void 0===$?void 0:$.id)&&void 0!==Y?Y:null,timestamp:ns,toggleAppSettingsDialog:ms}),js&&u.jsx(f.AnnotationsProvider,{children:u.jsx(M,{appId:te.app.id,appSettings:te.settings,appTitle:$e,assetCompanyId:vs,assetId:Vs,currentUser:ae,onClose:As,showSuccessNotification:w.showSuccessNotification})}),ss&&!xs&&u.jsx(v,{setIsMaximized:os}),!me&&(!xs||gs)&&u.jsxs(q,{children:[Ye&&u.jsx(b.CommentsSwitchButton,{currentUser:ae}),hs&&u.jsx(F.Tooltip,{title:"Add Annotation",placement:"top",disabled:!!U,children:u.jsx(O.ButtonIcon,{size:"small",type:"tertiaryBg",onClick:As,testId:"".concat(G,"_addAnnotation"),children:u.jsx(P,{})})}),Ve&&!rs&&u.jsx(F.Tooltip,{title:"Report A Bug",placement:"top",disabled:!!U,children:u.jsx(O.ButtonIcon,{size:"small",type:"tertiaryBg",onClick:function(){return Ve()},children:u.jsx(i.BugReport,{})})}),u.jsx(F.Tooltip,{placement:"top",disabled:!!U||rs,title:"Help Center",children:u.jsx(O.ButtonIcon,{testId:"".concat(G,"_helpContent"),onClick:function(){return Se()},disabled:rs,size:"small",type:"tertiaryBg",children:u.jsx(H.HelpCenterIcon,{appId:te.app.id,helpContentUpdatedAt:te.help_content_updated_at})})}),!U||ss||D.isInsideNewMobileApp?u.jsxs(u.Fragment,{children:[u.jsx(h,{menuItems:ze,devCenterRouter:le,isMobileView:U}),u.jsx(A.NonPriorityMenus,{devCenterRouter:le,isMaximized:ss,isMobileView:U,menuItems:Ue,setIsFullscreenModalMode:Te,setIsMaximized:os,toggleAppSettingsDialog:ms})]}):u.jsx(g,{setIsMaximized:os})]})]})})}))})})};
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),s=require("@babel/runtime/helpers/slicedToArray"),o=require("react"),n=require("classnames"),r=require("lodash"),t=require("@material-ui/core"),i=require("@material-ui/icons"),c=require("../AppContext.js"),p=require("../DevCenterRouterContext/DevCenterRouterContext.js");require("../DevCenterRouterContext/UniversalLink/UniversalLink.js"),require("@babel/runtime/helpers/objectWithoutProperties"),require("react-router-dom"),require("query-string");var u=require("react/jsx-runtime"),a=require("./effects/useAppSettings.js"),l=require("./effects/useAnnotationsList.js"),d=require("./effects/useAnnotationsData.js"),m=require("./effects/useAppMaximized.js"),q=require("./components/AppActions/AppActions.js"),j=require("./components/AppSettingsDialog/AppSettingsDialog.js");require("./components/AppSettingsDialog/components/RemoveAppButton.js"),require("./components/AppSettingsDialog/components/SettingsAccordion.js"),require("./components/AnnotationsButton/AnnotationsButton.js");var A=require("./components/NonPriorityMenus/NonPriorityMenus.js"),g=require("./components/FullscreenButton/FullscreenButton.js");require("./components/AppInfoMessage/AppInfoMessage.js");var C=require("./components/DevCenterAppView/DevCenterAppView.js"),I=require("./components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js");require("./components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js"),require("./components/IsInsideIsolatedDcAppProvider/IsInsideIsolatedDcAppProvider.js");var v=require("./components/RestoreAppSizeButton/index.js"),V=require("./utils.js"),S=require("./components/PriorityMenus/PriorityMenus.js"),h=require("./components/CommentsSwitch/CommentsSwitchProvider.js"),b=require("./components/CommentsSwitch/CommentsSwitchButton.js"),x=require("./DevCenterAppContainer.scss.js"),D=require("../../../utils/mobileDetect.js"),P=require("../../Icons/AnnotationIcon.js"),M=require("../../Annotations/components/AnnotationsList/index.js");require("../../Annotations/components/LastAnnotation/index.js");var f=require("../../Annotations/AnnotationsContext.js");require("../../Toaster/Toaster.js");var T=require("../../Toaster/ToastContainer.js");require("../../../clients/subscriptions/constants.js"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("querystring"),require("uuid/v1"),require("../../../clients/subscriptions.v1.js"),require("../../../clients/jsonApi/index.js"),require("../../../clients/subscriptions/subscriptions-client.factory.js");var y=require("../../../effects/useDevCenterApp.js");require("../../../utils/index.js"),require("uuid"),require("jsona"),require("../../../constants/segment.js"),require("../../../utils/env.js");var B=require("../../../constants/devcenter.js");require("../../../constants/goals.js"),require("../../../constants/alerts.js"),require("../../../constants/apps.js"),require("../../../constants/drillstring.js"),require("../../../constants/completion.js"),require("../../../constants/appPackages.js"),require("../../../constants/notifications.js"),require("../../../constants/feed.js"),require("../../../constants/bha.js"),require("../../../constants/corvaCompanyId.js"),require("../../GradientManager/configuration/constants.js"),require("../../StatusBadge/constants.js"),require("@babel/runtime/helpers/toConsumableArray"),require("lodash/set"),require("lodash/get"),require("lodash/unset"),require("moment"),require("../../../clients/api/apiCore.js"),require("../../../clients/constants.js"),require("../../../clients/sso/auth0.js"),require("../../../clients/sso/oauth2.js"),require("../../../clients/api/rateLimiter.js"),require("lodash/isEmpty"),require("lodash/sortBy"),require("../../../constants/streamSourceType.js"),require("./components/CommentsSwitch/CommentsSwitchContext.js");var L=require("../../../componentsV2/AppCommonsProvider/AppCommonsProvider.js");require("../../../componentsV2/AppCommonsProvider/AppCommonsContext.js"),require("../../../componentsV2/AppSettings/AppSettingsPinningContext.js");var k=require("../../../utils/devcenter.js"),w=require("../../HelpCenter/HelpCenterIcon.js");require("../../../componentsV2/Text/Text.js"),require("../../../componentsV2/Grid/Grid.js"),require("../../../componentsV2/Grid/Cell.js"),require("../../../componentsV2/Header/Header.scss.js"),require("../../../componentsV2/Button/Button.js");var F=require("../../../componentsV2/ButtonIcon/ButtonIcon.js"),H=require("../../../componentsV2/Tooltip/Tooltip.js");require("../../../componentsV2/Popover/Popover.js"),require("../../../componentsV2/PopoverPanel/PopoverPanel.js"),require("../../../componentsV2/Radio/Radio.js"),require("../../../componentsV2/RadioAndCheckboxGroup/RadioAndCheckboxGroup.scss.js"),require("../../../componentsV2/Checkbox/Checkbox.js"),require("../../../componentsV2/TextInput/TextInput.js"),require("../../../componentsV2/TextInputNext/TextInputNext.js"),require("../../../componentsV2/Label/Label.js"),require("../../../componentsV2/TextEndTruncated/TextEndTruncated.scss.js"),require("../../../componentsV2/TextMiddleTruncated/TextMiddleTruncated.constants.js"),require("../../../componentsV2/TextMiddleTruncated/TextMiddleTruncated.scss.js"),require("../../../componentsV2/TextLink/TextLink.js"),require("../../../componentsV2/Chip/Chip.js"),require("../../../componentsV2/ChipAlert/ChipAlert.js"),require("../../../componentsV2/ChipIndicator/ChipIndicator.js"),require("../../../componentsV2/Avatar/Avatar.js"),require("../../../componentsV2/AvatarGroup/AvatarGroup.js"),require("@material-ui/lab"),require("../../../componentsV2/ToggleButtons/ToggleButtons.scss.js"),require("../../../componentsV2/Paper/Paper.js"),require("../../../componentsV2/ModalWindow/ModalWindow.js"),require("../../../componentsV2/Modal/Modal.scss.js"),require("../../../componentsV2/Menu/Menu.js"),require("@icon-park/react/es/all"),require("../../../icons/IconParkProvider.js"),require("../../../icons/customIcons/icons/AddMessage.js"),require("../../../icons/customIcons/icons/DragOne.js"),require("../../../icons/customIcons/icons/Attention.js"),require("../../../icons/customIcons/icons/Collapse.js"),require("../../../icons/customIcons/icons/Dashboard.js"),require("../../../icons/customIcons/icons/Expand.js"),require("../../../icons/customIcons/icons/FolderClosed.js"),require("../../../icons/customIcons/icons/FolderClosedFilled.js"),require("../../../icons/customIcons/icons/FolderOpened.js"),require("../../../icons/customIcons/icons/GreaterOrEqual.js"),require("../../../icons/customIcons/icons/LessOrEqual.js"),require("../../../icons/customIcons/icons/Search.js"),require("../../../icons/customIcons/icons/SearchOne.js"),require("../../../icons/customIcons/icons/Wellhub.js"),require("../../../icons/customIcons/icons/MultiRuler.js"),require("../../../icons/customIcons/icons/Checkbox.js"),require("../../../icons/customIcons/icons/CheckboxChecked.js"),require("../../../icons/customIcons/icons/CheckboxIndeterminate.js"),require("../../../icons/customIcons/icons/Radio.js"),require("../../../icons/customIcons/icons/RadioChecked.js"),require("../../../icons/customIcons/icons/SimulFrac.js"),require("../../../icons/customIcons/icons/ZipperFrac.js"),require("../../../icons/customIcons/icons/CautionFilled.js"),require("../../../icons/customIcons/icons/MoreApp.js"),require("../../../icons/customIcons/icons/Pad.js"),require("../../../icons/customIcons/icons/DrilloutUnit.js"),require("../../../icons/customIcons/icons/FracFleet.js"),require("../../../icons/customIcons/icons/Global.js"),require("../../../icons/customIcons/icons/Program.js"),require("../../../icons/customIcons/icons/Rig.js"),require("../../../icons/customIcons/icons/Well.js"),require("../../../icons/customIcons/icons/Gap.js"),require("../../../icons/customIcons/icons/Pin.js"),require("../../../icons/customIcons/icons/CloseOneFilled.js"),require("../../../icons/customIcons/icons/AttentionFilled.js"),require("../../../icons/customIcons/icons/CheckOneFilled.js"),require("../../../icons/customIcons/icons/Archive.js"),require("../../../icons/customIcons/icons/ArchiveCancel.js"),require("../../../icons/customIcons/icons/Unarchive.js"),require("../../../icons/customIcons/icons/Archived.js"),require("../../../icons/customIcons/icons/InterventionUnit.js"),require("../../../icons/customIcons/icons/CloudDelete.js"),require("../../../icons/customIcons/icons/Lasso.js"),require("../../../icons/customIcons/icons/Radius.js"),require("../../../icons/customIcons/icons/ErrorOps.js"),require("../../../icons/customIcons/icons/DataTypeOps.js"),require("../../../icons/customIcons/icons/FalsePositiveOps.js"),require("../../../icons/customIcons/icons/CalibrationOps.js"),require("../../../icons/customIcons/icons/CriticalOps.js"),require("../../../icons/customIcons/icons/Company.js"),require("../../../icons/customIcons/icons/ArchiveOne.js"),require("../../../icons/customIcons/icons/ParseBotFusion.js"),require("../../../icons/customIcons/icons/Connect.js"),require("../../../icons/customIcons/icons/PuzzleOne.js"),require("../../../icons/customIcons/icons/Feed.js"),require("../../../icons/customIcons/icons/Prompt.js"),require("../../../icons/customIcons/icons/Companies.js"),require("../../../icons/customIcons/icons/ClipboardAi.js"),require("../../../icons/customIcons/icons/Key.js"),require("../../../icons/customIcons/icons/AtSignCrossed.js"),require("../../../icons/customIcons/icons/MappingManual.js"),require("../../../icons/customIcons/icons/Mapping.js"),require("../../../icons/customIcons/icons/Metrics.js"),require("../../../icons/customIcons/icons/Drops.js"),require("../../../icons/customIcons/icons/ClipboardSearch.js"),require("../../../icons/customIcons/icons/Template.js"),require("../../../icons/customIcons/icons/ClipboardMetrics.js"),require("../../../icons/customIcons/icons/ClipboardBuilder.js"),require("../../../icons/customIcons/icons/UnitConversion.js"),require("../../../icons/customIcons/icons/NPT.js"),require("../../../icons/customIcons/icons/GuidedFrac.js"),require("../../../componentsV2/utils.js"),require("../../../componentsV2/Hint/Hint.scss.js"),require("../../../componentsV2/Counter/Counter.js"),require("../../../componentsV2/BadgeBase/BadgeBase.scss.js"),require("../../../componentsV2/TemplatesControl/TemplatesControl.js"),require("zustand"),require("../../../componentsV2/TemplatesControl/utils.js"),require("../../../componentsV2/TemplatesControl/icons/folder/index.js"),require("../../../componentsV2/TemplatesControl/Store/utils.js"),require("../../../componentsV2/TemplatesControl/types.js"),require("../../../permissions/PermissionsContext.js"),require("../../../permissions/constants/index.js"),require("../../../permissions/withPermissionsHOC.js"),require("../../../permissions/ProvidePermissions.js"),require("../../../componentsV2/BadgeDot/BadgeDot.scss.js"),require("../../../componentsV2/LoaderLinear/LoaderLinear.scss.js"),require("../../../componentsV2/LoaderLogo/LoaderLogo.constants.js"),require("../../../componentsV2/LoaderLogo/LoaderLogo.scss.js"),require("../../../componentsV2/Switch/Switch.js"),require("../../../componentsV2/Tabs/Tabs.js"),require("../../../componentsV2/EmptyState/EmptyState.scss.js"),require("../../../componentsV2/FileIcon/FileIcon.js"),require("../../../componentsV2/Tag/Tag.js"),require("react-dropzone"),require("../../../componentsV2/FilesDropzone/FilesDropzone.scss.js"),require("../../../componentsV2/FilesLoader/FilesLoader.scss.js"),require("file-extension"),require("image-extensions"),require("video-extensions"),require("../../../componentsV2/FilesProcessor/FilesProcessor.scss.js"),require("../../../componentsV2/Skeleton/Skeleton.scss.js"),require("../../../utils/main.js"),require("../../../componentsV2/CopyToClipboard/CopyToClipboard.scss.js"),require("../../../componentsV2/Stepper/Step/Step.scss.js"),require("../../../componentsV2/Stepper/Stepper.scss.js"),require("../../../componentsV2/ButtonLive/ButtonLive.js"),require("../../../componentsV2/ButtonText/ButtonText.js"),require("../../../componentsV2/IndicatorLive/IndicatorLive.js"),require("../../../componentsV2/Accordion/Accordion.scss.js"),require("../../../componentsV2/Breadcrumbs/Breadcrumbs.scss.js"),require("../../../componentsV2/BadgeComment/BadgeComment.js"),require("../../../componentsV2/AppContainer/AppContainer.js"),require("../../../componentsV2/AppContainer/AppContainer.constants.js"),require("../../../componentsV2/AppFooter/AppFooter.js"),require("../../../componentsV2/AppHeader/AppHeader.constants.js"),require("../../../componentsV2/AppHeader/AppBadge/AppBadge.scss.js"),require("../../../componentsV2/AppHeader/AppAssets/utils.js"),require("../../../componentsV2/AppHeader/AppAssets/AppAssets.scss.js"),require("../../PadModeSelect/PadModeSelect.js"),require("../../../componentsV2/AppHeader/PadMode/PadMode.scss.js"),require("../../../componentsV2/PadModeSelect/PadModeSelect.js"),require("../../../componentsV2/PadModeSelect/PadModeSelect.constants.js"),require("../../../componentsV2/AppHeader/V3/VersionSelect/VersionSelect.js"),require("../../../componentsV2/UniversalLink/UniversalLink.scss.js"),require("../../../componentsV2/AppHeader/V3/AssetChips/AssetChips.scss.js"),require("../../../componentsV2/AppHeader/V3/DqStatusIcon/DqStatusIcon.js"),require("../../../componentsV2/AppHeader/V3/DqStatusIcon/DqStatusIcon.constants.js"),require("../../../componentsV2/AppFooter/DqPopover/DqStatusIcon/DqStatusIcon.js"),require("../../../componentsV2/AppDqPopover/DqAlertTooltip/DqAlertTooltip.scss.js"),require("../../../componentsV2/AppDqPopover/DqAlert/DqAlert.scss.js"),require("../../../componentsV2/AppDqPopover/DqAsset/DqAsset.scss.js"),require("../../../componentsV2/AppDqPopover/AppDqPopover.scss.js"),require("../../AppIcon/AppIcon.js"),require("../../../utils/getSingleAsset.js"),require("../../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorChip/AssetSelectorChip.js"),require("../../../componentsV2/AppHeader/V3/AssetSelector/constants.js"),require("../../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorSelect/AssetSelectorSelect.scss.js"),require("../../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorSelect/loadAssets.js"),require("../../../componentsV2/AppHeader/V3/AssetSelector/AssetSelector.scss.js"),require("../../../componentsV2/AppHeader/V3/AppTitle/AppTitle.constants.js"),require("../../../componentsV2/AppHeader/V3/AppTitle/AppTitle.scss.js"),require("../../../componentsV2/AppHeader/V3/constants.scss.js"),require("@babel/runtime/helpers/typeof"),require("../../../componentsV2/AppHeader/V3/SettingsButton/SettingsButton.js"),require("../../../componentsV2/AppHeader/V3/SettingsButton/SettingsButton.constants.js"),require("../../../componentsV2/AppSettings/AppSettings.js"),require("../../../componentsV2/AppSettings/AppSettings.constants.js"),require("../../../componentsV2/AppSizeProvider/AppSizeProvider.js"),require("../../../componentsV2/AppHeader/V3/Actions/Actions.constants.js"),require("../../../componentsV2/AppHeader/V3/Actions/Actions.scss.js"),require("../../../componentsV2/AppHeader/V3/AppHeaderV3.scss.js"),require("../../../componentsV2/AppHeader/AppHeader.scss.js"),require("../../../componentsV2/OffsetWellsButton/OffsetWellsButton.js"),require("../../../componentsV2/ChartAxisExtreme/ChartAxisExtreme.scss.js"),require("highcharts"),require("../../../componentsV2/ChartAxisExtreme/ChartAxisExtremeDragTracker.js"),require("../../../componentsV2/Autocomplete/Autocomplete.js"),require("../../../componentsV2/Select/Select.js"),require("../../../componentsV2/AppSettingsDivider/AppSettingsDivider.scss.js"),require("../../../componentsV2/WellArchivedMessage/WellArchivedMessage.js"),require("../../../componentsV2/DatePicker/DatePicker.js"),require("../../../componentsV2/DragHandle/DragHandle.js"),require("../../../componentsV2/CompletionsOffsetWellPicker/CompletionsOffsetWellPicker.js"),require("../../../componentsV2/Slider/constants.js"),require("../../../componentsV2/Slider/components/SliderThumb.js"),require("../../../componentsV2/Slider/Slider.scss.js"),require("../../../componentsV2/SliderAdvanced/SliderAdvanced.js"),require("react-color"),require("../../../componentsV2/ColorPicker/Swatches/Swatches.scss.js"),require("../../../componentsV2/ColorPicker/OpacityDragtracker/OpacityDragTracker.scss.js"),require("../../../componentsV2/ColorPicker/ColorPicker.scss.js"),require("../../../componentsV2/ChartHelper/ChartHelper.scss.js"),require("../../../componentsV2/Hotkey/Hotkey.js"),require("@tanstack/react-query"),require("../../../componentsV2/InterventionEventSelector/useInterventionUnitEvents.js"),require("../../../componentsV2/InterventionEventSelector/InterventionEventSelector.scss.js");var O=require("../../../utils/notificationToasts.js");function E(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var R=E(e),z=E(s),W=E(n);function N(e,s){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);s&&(n=n.filter((function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable}))),o.push.apply(o,n)}return o}function _(e){for(var s=1;s<arguments.length;s++){var o=null!=arguments[s]?arguments[s]:{};s%2?N(Object(o),!0).forEach((function(s){R.default(e,s,o[s])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):N(Object(o)).forEach((function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(o,s))}))}return e}var U=D.isNativeDetected||D.isMobileDetected,G="DevCenter_AppContainer";module.exports=function(e){var s,n,E,R,N,K,Q,Z,J,X,Y,$,ee,se,oe,ne=e.CLIAppComponent,re=e.CLIAppSettings,te=e.app,ie=e.appId,ce=e.className,pe=e.coordinates,ue=e.currentDashboardAppsLastAnnotations,ae=e.currentUser,le=e.devCenterRouter,de=e.disableAppAssetSelection,me=e.isActionsDisabled,qe=e.isBrowserFullscreen,je=e.enterBrowserFullscreen,Ae=e.exitBrowserFullscreen,ge=e.isSeparateWindow,Ce=e.openSeparateWindow,Ie=e.closeSeparateWindow,ve=e.setSeparateWindowTitle,Ve=e.isNonIsolatedApp,Se=void 0!==Ve&&Ve,he=e.isSettingsDialogHidden,be=e.layoutEnvironment,xe=e.onAppContainerClick,De=void 0===xe?r.noop:xe,Pe=e.onAppRemove,Me=e.onReportBugClick,fe=e.onCloneDashboard,Te=e.onHelpCenterClick,ye=e.onIsMaximizedChange,Be=e.onSettingChange,Le=e.onSettingsChange,ke=e.openIntercom,we=void 0===ke?r.noop:ke,Fe=e.registerAITools,He=e.setIsFullscreenModalMode,Oe=void 0===He?r.noop:He,Ee=e.timestamp,Re=e.updateCurrentDashboardAppLastAnnotation,ze=e.dashboardMeta,We=e.reloadApp,Ne=void 0===We?void 0:We,_e=e.chatActions,Ue=o.useContext(c),Ge=t.useTheme(),Ke=o.useState([]),Qe=z.default(Ke,2),Ze=Qe[0],Je=Qe[1],Xe=o.useState([]),Ye=z.default(Xe,2),$e=Ye[0],es=Ye[1],ss=null!==(s=null==Ue?void 0:Ue[ie||te.id])&&void 0!==s?s:{isLoading:!0},os=null===(n=te.package)||void 0===n||null===(E=n.manifest)||void 0===E?void 0:E.application,ns=k.getAppSegment(te),rs=!(null==ze||!ze.isChiplessDashboard),ts=k.isDCAppMultiRig({uiSettings:null==os?void 0:os.ui,isChiplessDashboard:rs}),is=!(null==os||null===(R=os.ui)||void 0===R||!R.enable_comments),cs=k.getAppName(te),ps=m({onIsMaximizedChange:ye,devCenterRouter:le,appId:ie}),us=ps.isMaximized,as=ps.setIsMaximized,ls=Ee||k.getTimestampFromQuery(null===(N=le.location.query)||void 0===N?void 0:N.query),ds=te.id===B.DEV_CENTER_CLI_APP_ID,ms=ds&&U?_(_({},pe),{},{w:12}):pe,qs=V.getAppVersion(te),js=y({CLIAppComponent:ne,CLIAppSettings:re,app:te,version:qs}),As=js.isLoading,gs=js.AppSettings,Cs=js.AppComponent,Is=a({setIsFullscreenModalMode:Oe}),vs=Is.isAppSettingsDialogOpened,Vs=Is.toggleAppSettingsDialog,Ss=l(),hs=Ss.isAnnotationsListOpened,bs=Ss.toggleAnnotationsList,xs=As||!ae||!ts&&ss.isLoading,Ds=d({app:te,appData:ss,currentDashboardAppsLastAnnotations:ue}),Ps=Ds.appLastAnnotation,Ms=Ds.assetCompanyId,fs=Ds.assetIdForAnnotation,Ts=Ds.isAppSupportsAnnotations,ys=r.pickBy(r.pick(ss,["well","rig","fracFleet","wells","interventionUnit"]),Boolean),Bs=o.useMemo((function(){return null==$e?void 0:$e.map((function(e){return _(_({},e),{},{onClick:function(){var s;null===(s=e.onClick)||void 0===s||s.call(e),e.to&&le.push(e.to)}})}))}),[$e,le]),Ls=!(null==te||null===(K=te.package)||void 0===K||null===(Q=K.manifest)||void 0===Q||null===(Z=Q.application)||void 0===Z||null===(J=Z.ui)||void 0===J||!J.use_app_header_v3),ks=!(null==(ee=le)||null===(se=ee.location)||void 0===se||null===(oe=se.pathname)||void 0===oe||!oe.startsWith("/home"));return u.jsx(p.DevCenterRouterContext.Provider,{value:le,children:u.jsx(I.DcFullscreenElemsCoordinatorProvider,{setIsFullscreenModalMode:Oe,children:u.jsx(L.AppCommonsProvider,_(_({maximized:us,setMaximized:as,appId:null==te||null===(X=te.app)||void 0===X?void 0:X.id,app:te,appSettings:te.settings,onSettingChange:Be,onSettingsChange:Le,appHeadersV3Enabled:Ls,isBrowserFullscreen:qe,enterBrowserFullscreen:je,exitBrowserFullscreen:Ae,isSeparateWindow:ge,openSeparateWindow:Ce,closeSeparateWindow:Ie,setSeparateWindowTitle:ve,isNonIsolatedApp:Se,disableAppAssetSelection:de,isMultiRig:ts,currentUser:ae,appData:ss,layoutEnvironment:be,appSettingsComponent:gs,dashboardMeta:ze,toggleAnnotationsList:Ts?bs:void 0,onHelpCenterClick:Te,secondaryMenuItems:Bs,onAppRemove:Pe,isInsideNewMobileApp:D.isInsideNewMobileApp,globalOffsetWells:null==ze?void 0:ze.globalOffsetWells,globalOffsetWellsVersion:null==ze?void 0:ze.globalOffsetWellsVersion,globalOffsetWellsToken:null==ze?void 0:ze.globalOffsetWellsToken,reloadApp:Ne},ys),{},{children:u.jsx(h.CommentsSwitchProvider,{children:u.jsxs("div",{className:W.default("dc-app-container",D.isInsideNewMobileApp&&"dc-app-container--inside-new-mobile-app",ks&&"dc-app-container--inside-home-page",ce,us&&"dc-app-container__maximized",Ge.isLightTheme&&"dc-app-container__light-theme",x.container),"data-testid":"".concat(G,"_").concat(cs),onClick:function(){return De()},children:[u.jsx(T.ToastContainer,{}),u.jsx("div",{className:x.containerContent,children:u.jsx(C.default,{AppComponent:Cs,app:te,appData:ys,isAppLoading:As,availability:V.getAppAvailability(te.availability,ae.company.with_subscription),isCLIApp:ds,isLoading:xs,isMultiRig:ts,layoutEnvironment:be,openIntercom:we,segment:ns,toggleAppSettingsDialog:Vs,appProps:{coordinates:ms,currentUser:ae,devCenterRouter:le,onSettingChange:Be,onSettingsChange:Le,registerAITools:Fe,segment:ns,setIsFullscreenModalMode:Oe,setIsMaximized:as,setMainMenuItems:Je,setSecondaryMenuItems:es,toggleAppSettingsDialog:Vs,appHeaderProps:_({app:te,appLastAnnotation:Ps,appSettings:te.settings,coordinates:ms,currentUser:ae,isMaximized:us,layoutEnvironment:be,onSettingChange:Be,toggleAnnotationsList:bs,updateCurrentDashboardAppLastAnnotation:Re},ys),isNative:D.isNativeDetected,layoutEnvironment:be,timestamp:ls,chatActions:_e}})}),vs&&u.jsx(j.default,{AppSettingsComponent:gs,app:te,appData:ss,appName:cs,currentUser:ae,disableAppAssetSelection:de,isMultiRig:ts,isSettingsDialogHidden:he,layoutEnvironment:be,onAppRemove:Pe,onCloneDashboard:fe,onSettingChange:Be,onSettingsChange:Le,openIntercom:we,rigId:null!==(Y=null===($=ss.rig)||void 0===$?void 0:$.id)&&void 0!==Y?Y:null,timestamp:ls,toggleAppSettingsDialog:Vs}),hs&&u.jsx(f.AnnotationsProvider,{children:u.jsx(M,{appId:te.app.id,appSettings:te.settings,appTitle:cs,assetCompanyId:Ms,assetId:fs,currentUser:ae,onClose:bs,showSuccessNotification:O.showSuccessNotification})}),us&&!Ls&&u.jsx(v,{setIsMaximized:as}),!me&&(!Ls||xs)&&u.jsxs(q,{children:[is&&u.jsx(b.CommentsSwitchButton,{currentUser:ae}),Ts&&u.jsx(H.Tooltip,{title:"Add Annotation",placement:"top",disabled:!!U,children:u.jsx(F.ButtonIcon,{size:"small",type:"tertiaryBg",onClick:bs,testId:"".concat(G,"_addAnnotation"),children:u.jsx(P,{})})}),Me&&!ds&&u.jsx(H.Tooltip,{title:"Report A Bug",placement:"top",disabled:!!U,children:u.jsx(F.ButtonIcon,{size:"small",type:"tertiaryBg",onClick:function(){return Me()},children:u.jsx(i.BugReport,{})})}),u.jsx(H.Tooltip,{placement:"top",disabled:!!U||ds,title:"Help Center",children:u.jsx(F.ButtonIcon,{testId:"".concat(G,"_helpContent"),onClick:function(){return Te()},disabled:ds,size:"small",type:"tertiaryBg",children:u.jsx(w.HelpCenterIcon,{appId:te.app.id,helpContentUpdatedAt:te.help_content_updated_at})})}),!U||us||D.isInsideNewMobileApp?u.jsxs(u.Fragment,{children:[u.jsx(S,{menuItems:Ze,devCenterRouter:le,isMobileView:U}),u.jsx(A.NonPriorityMenus,{devCenterRouter:le,isMaximized:us,isMobileView:U,menuItems:$e,setIsFullscreenModalMode:Oe,setIsMaximized:as,toggleAppSettingsDialog:Vs})]}):u.jsx(g,{setIsMaximized:as})]})]})})}))})})};
|
|
2
2
|
//# sourceMappingURL=DevCenterAppContainer.js.map
|