@corva/ui 0.33.0-20 → 0.33.0-23
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/CLI/assets/DevCenterLogo.js.map +1 -0
- package/CLI/components/App/App.css.js.map +1 -0
- package/CLI/components/App/App.js +1 -1
- package/CLI/components/App/App.js.map +1 -0
- package/CLI/components/App/components/AppBar/AppBar.js.map +1 -0
- package/CLI/constants/index.js.map +1 -0
- package/CLI/context/auth.js.map +1 -0
- package/CLI/hocs/constants.js.map +1 -0
- package/CLI/hocs/effects/useProvideAuth.js.map +1 -0
- package/CLI/hocs/utils.js.map +1 -0
- package/CLI/hocs/withAppDataProviderHOC.js +1 -1
- package/CLI/hocs/withAppDataProviderHOC.js.map +1 -0
- package/CLI/hocs/withCLIAppSettingsHOC.js.map +1 -0
- package/CLI/hocs/withCorvaMagicHOC.js.map +1 -0
- package/CLI/hocs/withDevCenterRouterHOC.js.map +1 -0
- package/CLI/hocs/withGridLayoutHOC/withGridLayoutHOC.css.js.map +1 -0
- package/CLI/hocs/withGridLayoutHOC/withGridLayoutHOC.global.css.js.map +1 -0
- package/CLI/hocs/withGridLayoutHOC/withGridLayoutHOC.js +1 -1
- package/CLI/hocs/withGridLayoutHOC/withGridLayoutHOC.js.map +1 -0
- package/CLI/hocs/withPDFLayoutHOC.js +1 -1
- package/CLI/hocs/withPDFLayoutHOC.js.map +1 -0
- package/CLI/hocs/withReactRouterHOC.js +1 -1
- package/CLI/hocs/withReactRouterHOC.js.map +1 -0
- package/CLI/index.js.map +1 -0
- package/CLI/screens/LoginScreen/LoginScreen.css.js.map +1 -0
- package/CLI/screens/LoginScreen/LoginScreen.js.map +1 -0
- package/CLI/screens/LoginScreen/components/Auth.js.map +1 -0
- package/CLI/screens/LoginScreen/components/AuthStep.js.map +1 -0
- package/CLI/screens/LoginScreen/components/EmailStep.js.map +1 -0
- package/CLI/screens/LoginScreen/components/IconLogo.js.map +1 -0
- package/CLI/screens/LoginScreen/components/SSOButton.js.map +1 -0
- package/CLI/screens/OAuthCallbackScreen/index.js +1 -1
- package/CLI/screens/OAuthCallbackScreen/index.js.map +1 -0
- package/cjs/devcenter/webpack/DevServerEntryPoint.js.map +1 -0
- package/cjs/devcenter/webpack/DevServerIsolatedAppEntryPoint.js.map +1 -0
- package/clients/api/apiCore.js.map +1 -0
- package/clients/api/httpMessages.js.map +1 -0
- package/clients/auth0/index.js.map +1 -0
- package/clients/clientStorage/core.js.map +1 -0
- package/clients/clientStorage/index.js.map +1 -0
- package/clients/constants.js.map +1 -0
- package/clients/index.js.map +1 -0
- package/clients/jsonApi/index.js.map +1 -0
- package/clients/subscriptions.js.map +1 -0
- package/clients/utils.js.map +1 -0
- package/components/AddComment/Popover.js +1 -1
- package/components/AddComment/Popover.js.map +1 -0
- package/components/AddComment/Popup.js.map +1 -0
- package/components/AddComment/components/Content.js +1 -1
- package/components/AddComment/components/Content.js.map +1 -0
- package/components/AnchorsList/AnchorsList.js.map +1 -0
- package/components/Annotations/AnnotationsContext.js.map +1 -0
- package/components/Annotations/components/AnnotationsList/components/AddAnnotationForm/index.js +1 -1
- package/components/Annotations/components/AnnotationsList/components/AddAnnotationForm/index.js.map +1 -0
- package/components/Annotations/components/AnnotationsList/components/AddAnnotationForm/style.css.js.map +1 -0
- package/components/Annotations/components/AnnotationsList/components/Annotation/index.js.map +1 -0
- package/components/Annotations/components/AnnotationsList/components/Annotation/style.css.js.map +1 -0
- package/components/Annotations/components/AnnotationsList/components/AnnotationComments/index.js.map +1 -0
- package/components/Annotations/components/AnnotationsList/components/AnnotationComments/style.css.js.map +1 -0
- package/components/Annotations/components/AnnotationsList/components/AnnotationInput/StyledSelect.js.map +1 -0
- package/components/Annotations/components/AnnotationsList/components/AnnotationInput/index.js.map +1 -0
- package/components/Annotations/components/AnnotationsList/components/AnnotationInput/style.css.js.map +1 -0
- package/components/Annotations/components/AnnotationsList/index.js.map +1 -0
- package/components/Annotations/components/AnnotationsList/style.css.js.map +1 -0
- package/components/Annotations/components/LastAnnotation/index.js.map +1 -0
- package/components/Annotations/components/LastAnnotation/style.css.js.map +1 -0
- package/components/Annotations/constants.js.map +1 -0
- package/components/AppVersionsSelect/AppVersionsSelect.js +1 -1
- package/components/AppVersionsSelect/AppVersionsSelect.js.map +1 -0
- package/components/AppVersionsSelect/effects/index.js.map +1 -0
- package/components/AssetEditor/AssetEditorAutocomplete.js.map +1 -0
- package/components/AssetEditor/AssetEditors.css.js.map +1 -0
- package/components/AssetEditor/SingleAssetEditor.js.map +1 -0
- package/components/AssetEditor/constants.js.map +1 -0
- package/components/AssetEditor/effects/index.js.map +1 -0
- package/components/AssetEditor/index.js.map +1 -0
- package/components/AssetNameLabel/PrimaryAssetNameLabel.js.map +1 -0
- package/components/AssetNameLabel/SecondaryAssetNameLabel.js.map +1 -0
- package/components/AssetNameLabel/index.js.map +1 -0
- package/components/AssetNameLabel/styles.css.js.map +1 -0
- package/components/Attachment/index.js.map +1 -0
- package/components/Attachment/styles.css.js.map +1 -0
- package/components/Avatar/index.js.map +1 -0
- package/components/BICOffsetPickerDialog/components/Map/Map.css.js.map +1 -0
- package/components/BICOffsetPickerDialog/components/Map/Map.js.map +1 -0
- package/components/BICOffsetPickerDialog/components/Map/index.css.js.map +1 -0
- package/components/BICOffsetPickerDialog/components/Map/index.js.map +1 -0
- package/components/BICOffsetPickerDialog/components/WellSection/AssetSearch.js.map +1 -0
- package/components/BICOffsetPickerDialog/components/WellSection/AutoCompleteAssetSearch/AssetResultSection.js.map +1 -0
- package/components/BICOffsetPickerDialog/components/WellSection/AutoCompleteAssetSearch/AssetTypesSection.js.map +1 -0
- package/components/BICOffsetPickerDialog/components/WellSection/AutoCompleteAssetSearch/AutoCompleteAssetSearch.js.map +1 -0
- package/components/BICOffsetPickerDialog/components/WellSection/AutoCompleteAssetSearch/constants.js.map +1 -0
- package/components/BICOffsetPickerDialog/components/WellSection/AutoCompleteAssetSearch/effects/useAssetsData.js.map +1 -0
- package/components/BICOffsetPickerDialog/components/WellSection/AutoCompleteAssetSearch/utils/apiCalls.js.map +1 -0
- package/components/BICOffsetPickerDialog/components/WellSection/NumberCircle.js.map +1 -0
- package/components/BICOffsetPickerDialog/components/WellSection/SectionItem.js.map +1 -0
- package/components/BICOffsetPickerDialog/components/WellSection/WellListItem.js.map +1 -0
- package/components/BICOffsetPickerDialog/components/WellSection/index.js.map +1 -0
- package/components/BICOffsetPickerDialog/constants.js.map +1 -0
- package/components/BICOffsetPickerDialog/effects/index.js.map +1 -0
- package/components/BICOffsetPickerDialog/index.js +1 -1
- package/components/BICOffsetPickerDialog/index.js.map +1 -0
- package/components/BICOffsetPickerDialog/utils/apiCalls.js.map +1 -0
- package/components/Breadcrumbs/index.js +1 -1
- package/components/Breadcrumbs/index.js.map +1 -0
- package/components/Button/index.js.map +1 -0
- package/components/Casing/CasingComponentIcon.js.map +1 -0
- package/components/Casing/CasingTable/CasingComponent.js.map +1 -0
- package/components/Casing/CasingTable/index.js.map +1 -0
- package/components/ChartActionsList/ChartActionsList.css.js.map +1 -0
- package/components/ChartActionsList/ChartActionsList.js.map +1 -0
- package/components/ChartActionsList/icons/GoLive.js.map +1 -0
- package/components/ChartActionsList/icons/LeftArrow.js.map +1 -0
- package/components/ChartActionsList/icons/RightArrow.js.map +1 -0
- package/components/ChartActionsList/icons/TimeRange.js.map +1 -0
- package/components/ChartActionsList/icons/ZoomIn.js.map +1 -0
- package/components/ChartActionsList/icons/ZoomOut.js.map +1 -0
- package/components/Checkbox/index.js.map +1 -0
- package/components/Chip/index.js.map +1 -0
- package/components/CollapsableSidebar.js +1 -1
- package/components/CollapsableSidebar.js.map +1 -0
- package/components/CollapsibleContent.js.map +1 -0
- package/components/ColorPicker/ColorPicker.js.map +1 -0
- package/components/ColorPicker/PaletteChromePicker/ColorSquare/ColorSquare.js.map +1 -0
- package/components/ColorPicker/PaletteChromePicker/Palette/Palette.css.js.map +1 -0
- package/components/ColorPicker/PaletteChromePicker/Palette/Palette.js.map +1 -0
- package/components/ColorPicker/PaletteChromePicker/Palette/PaletteConstants.js.map +1 -0
- package/components/ColorPicker/PaletteChromePicker/PaletteChromePicker.js.map +1 -0
- package/components/Comment/CommentIcon/BadgeIcon.js.map +1 -0
- package/components/Comment/CommentIcon/index.js.map +1 -0
- package/components/Comment/index.js.map +1 -0
- package/components/Comment/styles.css.js.map +1 -0
- package/components/CommentInput/index.js.map +1 -0
- package/components/CommentInput/styles.css.js.map +1 -0
- package/components/CommentLoader.js.map +1 -0
- package/components/CommentWrapper.js.map +1 -0
- package/components/CommentsInfo/index.js.map +1 -0
- package/components/CommentsInfo/styles.css.js.map +1 -0
- package/components/ConfirmationDialog.js.map +1 -0
- package/components/ContextMenuItem/index.js.map +1 -0
- package/components/Counter/index.js.map +1 -0
- package/components/CustomSelect/index.js.map +1 -0
- package/components/DatePicker/index.js.map +1 -0
- package/components/DateTimePicker/index.js.map +1 -0
- package/components/DevCenter/AppContext.js.map +1 -0
- package/components/DevCenter/AppHeader/AppHeader.css.js.map +1 -0
- package/components/DevCenter/AppHeader/AppHeader.js.map +1 -0
- package/components/DevCenter/AppHeader/AppHeaderNew.css.js.map +1 -0
- package/components/DevCenter/AppHeader/AppHeaderNew.js.map +1 -0
- package/components/DevCenter/AppHeader/PadMode.js.map +1 -0
- package/components/DevCenter/AppHeader/VersionBadge.css.js.map +1 -0
- package/components/DevCenter/AppHeader/VersionBadge.js.map +1 -0
- package/components/DevCenter/AppHeader/utils.js.map +1 -0
- package/components/DevCenter/AppSettingsPopover/AppSettingsPopover.js +1 -1
- package/components/DevCenter/AppSettingsPopover/AppSettingsPopover.js.map +1 -0
- package/components/DevCenter/AppSideBar/AppSideBar.js +1 -1
- package/components/DevCenter/AppSideBar/AppSideBar.js.map +1 -0
- package/components/DevCenter/AppsDataProvider/AppsDataProvider.js.map +1 -0
- package/components/DevCenter/AppsDataProvider/effects/dataResolvers.js.map +1 -0
- package/components/DevCenter/AppsDataProvider/effects/useAppsData.js.map +1 -0
- package/components/DevCenter/AppsDataProvider/effects/utils.js.map +1 -0
- package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js.map +1 -0
- package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js.map +1 -0
- package/components/DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js.map +1 -0
- package/components/DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js.map +1 -0
- package/components/DevCenter/DevCenterAppContainer/components/AppActions/AppActions.js.map +1 -0
- package/components/DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.css.js.map +1 -0
- package/components/DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js.map +1 -0
- package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppDetails.js.map +1 -0
- package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js.map +1 -0
- package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.module.css.js.map +1 -0
- package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/RemoveAppButton.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/RemoveAppButton.js.map +1 -0
- package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/style.css.js.map +1 -0
- package/components/DevCenter/DevCenterAppContainer/components/DcTooltipsCoordinatorProvider/DcTooltipsCoordinatorProvider.js.map +1 -0
- package/components/DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.js.map +1 -0
- package/components/DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js.map +1 -0
- package/components/DevCenter/DevCenterAppContainer/components/DisabledSettingsMessage/DisabledSettingsMessage.js.map +1 -0
- package/components/DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.css.js.map +1 -0
- package/components/DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js.map +1 -0
- package/components/DevCenter/DevCenterAppContainer/components/HelpCenterDialog/HelpCenterDialog.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/HelpCenterDialog/HelpCenterDialog.js.map +1 -0
- package/components/DevCenter/DevCenterAppContainer/components/HelpCenterDialog/components/ArticleIcon.js.map +1 -0
- package/components/DevCenter/DevCenterAppContainer/components/HelpCenterDialog/components/ArticleItemContent.js.map +1 -0
- package/components/DevCenter/DevCenterAppContainer/components/HelpCenterDialog/components/HelpContentCaption.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/HelpCenterDialog/components/HelpContentCaption.js.map +1 -0
- package/components/DevCenter/DevCenterAppContainer/components/HelpCenterDialog/components/HelpContentItem.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/HelpCenterDialog/components/HelpContentItem.js.map +1 -0
- package/components/DevCenter/DevCenterAppContainer/components/HelpCenterDialog/components/HelpContentList.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/HelpCenterDialog/components/HelpContentList.js.map +1 -0
- package/components/DevCenter/DevCenterAppContainer/components/HelpCenterDialog/components/HelpContentTimestamp.js.map +1 -0
- package/components/DevCenter/DevCenterAppContainer/components/HelpCenterDialog/components/ItemContent.js.map +1 -0
- package/components/DevCenter/DevCenterAppContainer/components/HelpCenterDialog/components/SearchInput.js.map +1 -0
- package/components/DevCenter/DevCenterAppContainer/components/HelpCenterDialog/components/VideoItemContent.js.map +1 -0
- package/components/DevCenter/DevCenterAppContainer/components/HelpCenterDialog/effects/useHelpContents.js.map +1 -0
- package/components/DevCenter/DevCenterAppContainer/components/HelpCenterDialog/shapes/index.js.map +1 -0
- package/components/DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js.map +1 -0
- package/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.css.js.map +1 -0
- package/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js.map +1 -0
- package/components/DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js.map +1 -0
- package/components/DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.js.map +1 -0
- package/components/DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/RestoreAppSizeButton.css.js.map +1 -0
- package/components/DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js.map +1 -0
- package/components/DevCenter/DevCenterAppContainer/effects/useAnnotationsData.js.map +1 -0
- package/components/DevCenter/DevCenterAppContainer/effects/useAnnotationsList.js.map +1 -0
- package/components/DevCenter/DevCenterAppContainer/effects/useAppMaximized.js.map +1 -0
- package/components/DevCenter/DevCenterAppContainer/effects/useAppSettings.js.map +1 -0
- package/components/DevCenter/DevCenterAppContainer/effects/useHelpCenter.js.map +1 -0
- package/components/DevCenter/DevCenterAppContainer/utils.js.map +1 -0
- package/components/DevCenter/DevCenterRouterContext/DevCenterRouterContext.js.map +1 -0
- package/components/DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.css.js.map +1 -0
- package/components/DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js.map +1 -0
- package/components/DevCenter/DevCenterRouterContext/effects/useDevCenterRouter.js.map +1 -0
- package/components/DevCenter/DevCenterRouterContext/hocs/withUniversalLocationHOC.js.map +1 -0
- package/components/DevCenter/IsolatedDevCenterAppContainer/AppsGridDragHandle.js.map +1 -0
- package/components/DevCenter/IsolatedDevCenterAppContainer/AppsGridDragHandle.scss.js.map +1 -0
- package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterAppZoidComponent.js +1 -1
- package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterAppZoidComponent.js.map +1 -0
- package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js +1 -1
- package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js.map +1 -0
- package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.module.css.js.map +1 -0
- package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js +1 -1
- package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js.map +1 -0
- package/components/DevCenter/IsolatedDevCenterAppContainer/constants.js.map +1 -0
- package/components/DevCenter/IsolatedDevCenterAppContainer/effects/useXProps.js.map +1 -0
- package/components/DevCenter/IsolatedDevCenterAppContainer/utils/replaceUndefinedValuesWithNull.js.map +1 -0
- package/components/DevCenter/NavigationBar/NavigationBar.js.map +1 -0
- package/components/DevCenter/SideBar/SideBar.js.map +1 -0
- package/components/Drillstring/BHAComponentDetail/constants.js.map +1 -0
- package/components/Drillstring/BHAComponentDetail/index.js.map +1 -0
- package/components/Drillstring/BHAComponentIcon.js.map +1 -0
- package/components/Drillstring/BHASchematic.js.map +1 -0
- package/components/Drillstring/BHATable/BHAComponent.js.map +1 -0
- package/components/Drillstring/BHATable/index.js.map +1 -0
- package/components/EditableItem/EditableItem/index.js.map +1 -0
- package/components/EditableItem/EditableItemWithBadge/index.js.map +1 -0
- package/components/EmbeddedApp/DevCenterEmbeddedApp.js +1 -0
- package/components/EmbeddedApp/DevCenterEmbeddedApp.js.map +1 -0
- package/components/EmbeddedApp/EmbeddedApp.js +1 -0
- package/components/EmbeddedApp/EmbeddedApp.js.map +1 -0
- package/components/EmbeddedApp/components/AppInfo.js +1 -0
- package/components/EmbeddedApp/components/AppInfo.js.map +1 -0
- package/components/EmbeddedApp/styles.css.js +1 -0
- package/components/EmbeddedApp/styles.css.js.map +1 -0
- package/components/EmojiIconButton.js.map +1 -0
- package/components/EmptyView/EmptyAppView/EmptyAppView.js.map +1 -0
- package/components/EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js.map +1 -0
- package/components/EmptyView/EmptyView.js.map +1 -0
- package/components/ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.css.js.map +1 -0
- package/components/ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js.map +1 -0
- package/components/ErrorBoundary/ErrorBoundary.js.map +1 -0
- package/components/FailedFileUploading.js.map +1 -0
- package/components/FeedItem/FeedItem.css.js.map +1 -0
- package/components/FeedItem/FeedItem.js.map +1 -0
- package/components/FeedItem/FeedItemEditProvider/FeedItemEditModal.js.map +1 -0
- package/components/FeedItem/FeedItemEditProvider/FeedItemEditProvider.js.map +1 -0
- package/components/FeedItem/components/Actions.js.map +1 -0
- package/components/FeedItem/components/AvatarIcon.js.map +1 -0
- package/components/FeedItem/components/Comments.js.map +1 -0
- package/components/FeedItem/components/Content.js.map +1 -0
- package/components/FeedItem/components/CreatedAt.js.map +1 -0
- package/components/FeedItem/components/FeedComments.js.map +1 -0
- package/components/FeedItem/components/Icon.js.map +1 -0
- package/components/FeedItem/components/Reactions.js.map +1 -0
- package/components/FeedItem/components/RigAndWell.js.map +1 -0
- package/components/FeedItem/components/TypeAndAssetTitle.js.map +1 -0
- package/components/FeedItem/feedItemTypes/AlertFeedItem.js.map +1 -0
- package/components/FeedItem/feedItemTypes/CompletionDailyCostFeedItem.js.map +1 -0
- package/components/FeedItem/feedItemTypes/CompletionDocumentFeedItem.js.map +1 -0
- package/components/FeedItem/feedItemTypes/CompletionNptFeedItem.js.map +1 -0
- package/components/FeedItem/feedItemTypes/CompletionOperationSummaryFeedItem.js.map +1 -0
- package/components/FeedItem/feedItemTypes/CompletionOperationalNoteFeedItem.js.map +1 -0
- package/components/FeedItem/feedItemTypes/DocumentFeedItem.js.map +1 -0
- package/components/FeedItem/feedItemTypes/DrillerMemoFeedItem.js.map +1 -0
- package/components/FeedItem/feedItemTypes/DrillingDailyCostFeedItem.js.map +1 -0
- package/components/FeedItem/feedItemTypes/DrillingOperationSummaryFeedItem.js.map +1 -0
- package/components/FeedItem/feedItemTypes/DrillingOperationalNoteFeedItem.js.map +1 -0
- package/components/FeedItem/feedItemTypes/LessonsLearnedFeedItem/icons/Critical.js.map +1 -0
- package/components/FeedItem/feedItemTypes/LessonsLearnedFeedItem/icons/Major.js.map +1 -0
- package/components/FeedItem/feedItemTypes/LessonsLearnedFeedItem/icons/Minor.js.map +1 -0
- package/components/FeedItem/feedItemTypes/LessonsLearnedFeedItem/index.js.map +1 -0
- package/components/FeedItem/feedItemTypes/NptFeedItem.js.map +1 -0
- package/components/FeedItem/feedItemTypes/PostFeedItem.js.map +1 -0
- package/components/FeedItem/feedItemTypes/StageOverviewFeedItem/api.js.map +1 -0
- package/components/FeedItem/feedItemTypes/StageOverviewFeedItem/components/NoData.js.map +1 -0
- package/components/FeedItem/feedItemTypes/StageOverviewFeedItem/components/Predictions.js.map +1 -0
- package/components/FeedItem/feedItemTypes/StageOverviewFeedItem/components/PredictionsItem.js.map +1 -0
- package/components/FeedItem/feedItemTypes/StageOverviewFeedItem/components/Stages/Stages.js.map +1 -0
- package/components/FeedItem/feedItemTypes/StageOverviewFeedItem/components/Stages/utils.js.map +1 -0
- package/components/FeedItem/feedItemTypes/StageOverviewFeedItem/index.js.map +1 -0
- package/components/FeedItem/feedItemTypes/SurveyStationFeedItem/api.js.map +1 -0
- package/components/FeedItem/feedItemTypes/SurveyStationFeedItem/components/AccuracyPlan.js.map +1 -0
- package/components/FeedItem/feedItemTypes/SurveyStationFeedItem/components/ActualPointInfo.js.map +1 -0
- package/components/FeedItem/feedItemTypes/SurveyStationFeedItem/components/Warning.js.map +1 -0
- package/components/FeedItem/feedItemTypes/SurveyStationFeedItem/index.js.map +1 -0
- package/components/FeedItem/feedItemTypes/TracesMemoFeedItem.js.map +1 -0
- package/components/FilePreview/index.js.map +1 -0
- package/components/FilePreview/styles.css.js.map +1 -0
- package/components/FileTypeIcon.js.map +1 -0
- package/components/FileUploadIconButton.js.map +1 -0
- package/components/FilesLoader/FilesLoader.js.map +1 -0
- package/components/FilesLoader/Icons/CSVFileIcon.js.map +1 -0
- package/components/FilesLoader/Icons/DocFileIcon.js.map +1 -0
- package/components/FilesLoader/Icons/ExelFileIcon.js.map +1 -0
- package/components/FilesLoader/Icons/FileIcon.js.map +1 -0
- package/components/FilesLoader/Icons/IconCancel.js.map +1 -0
- package/components/FilesLoader/Icons/IconSuccess.js.map +1 -0
- package/components/FilesLoader/Icons/IconWarning.js.map +1 -0
- package/components/FilesLoader/Icons/ImageFileIcon.js.map +1 -0
- package/components/FilesLoader/Icons/PdfFileIcon.js.map +1 -0
- package/components/FilesLoader/Icons/UnknownFileIcon.js.map +1 -0
- package/components/FilesLoader/useStyles.js.map +1 -0
- package/components/FolderMenuItem/components/ClosedFolderIcon.js.map +1 -0
- package/components/FolderMenuItem/components/FolderIcon.js.map +1 -0
- package/components/FolderMenuItem/components/OpenFolderIcon.js.map +1 -0
- package/components/FolderMenuItem/index.js.map +1 -0
- package/components/FolderMenuItemWithLinks/index.js.map +1 -0
- package/components/GoogleDocsViewer/index.js.map +1 -0
- package/components/GoogleDocsViewer/styles.css.js.map +1 -0
- package/components/HeaderLayout/HeaderLayout.css.js.map +1 -0
- package/components/HeaderLayout/HeaderLayout.js.map +1 -0
- package/components/HeaderLayout/constants.js.map +1 -0
- package/components/HeaderLayout/effects/index.js.map +1 -0
- package/components/HeaderLayout/utils.js.map +1 -0
- package/components/IconButton/index.js.map +1 -0
- package/components/IconMenu/index.js.map +1 -0
- package/components/Icons/AttachIcon.js.map +1 -0
- package/components/Icons/EmojiIcon.js.map +1 -0
- package/components/Icons/SendIcon.js.map +1 -0
- package/components/ImageViewer/index.js.map +1 -0
- package/components/ImageViewer/styles.css.js.map +1 -0
- package/components/InfiniteList/index.js.map +1 -0
- package/components/InfiniteList/styles.css.js.map +1 -0
- package/components/KeyboardDateTimePicker.js.map +1 -0
- package/components/LabelsCounter/LabelsCounter.js.map +1 -0
- package/components/LoadingIndicator/FullScreenLoadingIndicator.js.map +1 -0
- package/components/LoadingIndicator/InlineLoadingIndicator.js.map +1 -0
- package/components/LoadingIndicator/Loader.js.map +1 -0
- package/components/LoadingIndicator/LoadingIndicator.css.js.map +1 -0
- package/components/LoadingIndicator/LoadingIndicator.js.map +1 -0
- package/components/Login/components/Chip.js.map +1 -0
- package/components/Login/components/EmailField.js.map +1 -0
- package/components/Login/components/HiddenEmailField.js.map +1 -0
- package/components/Login/components/Login.global.css.js.map +1 -0
- package/components/Login/components/Login.js.map +1 -0
- package/components/Login/components/LogoIcon.js.map +1 -0
- package/components/Login/components/OrDivider.js.map +1 -0
- package/components/Login/components/PasswordField.js.map +1 -0
- package/components/Login/components/Step.js.map +1 -0
- package/components/Login/components/StepContent.js.map +1 -0
- package/components/Login/components/StepFooter.js.map +1 -0
- package/components/Login/components/StepHeader.js.map +1 -0
- package/components/Login/index.js.map +1 -0
- package/components/MenuItem/index.js.map +1 -0
- package/components/Modal/Modal.css.js.map +1 -0
- package/components/Modal/index.js.map +1 -0
- package/components/Notifications/Notifications.js.map +1 -0
- package/components/Notifications/NotificationsContainer.js +1 -1
- package/components/Notifications/NotificationsContainer.js.map +1 -0
- package/components/Notifications/components/Toast.js +1 -1
- package/components/Notifications/components/Toast.js.map +1 -0
- package/components/Notifications/components/styles.js +1 -1
- package/components/Notifications/components/styles.js.map +1 -0
- package/components/OffsetWellPickerV2/OffsetWellPickerDialog.js.map +1 -0
- package/components/OffsetWellPickerV2/components/Filter/ClearFiltersButton.js.map +1 -0
- package/components/OffsetWellPickerV2/components/Filter/MultiSelect.js.map +1 -0
- package/components/OffsetWellPickerV2/components/Filter/RadiusInput.js.map +1 -0
- package/components/OffsetWellPickerV2/components/Filter/SidetrackSwitch.js +1 -1
- package/components/OffsetWellPickerV2/components/Filter/SidetrackSwitch.js.map +1 -0
- package/components/OffsetWellPickerV2/components/Filter/SingleSelect.js.map +1 -0
- package/components/OffsetWellPickerV2/components/Filter/SubjectWellSearch.js.map +1 -0
- package/components/OffsetWellPickerV2/components/Filter/ToggleFiltersButton.js.map +1 -0
- package/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js +1 -1
- package/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js.map +1 -0
- package/components/OffsetWellPickerV2/components/Filter/index.js.map +1 -0
- package/components/OffsetWellPickerV2/components/Map/Map.css.js.map +1 -0
- package/components/OffsetWellPickerV2/components/Map/Map.js.map +1 -0
- package/components/OffsetWellPickerV2/components/Map/index.css.js.map +1 -0
- package/components/OffsetWellPickerV2/components/Map/index.js.map +1 -0
- package/components/OffsetWellPickerV2/components/Map/popup.css.js.map +1 -0
- package/components/OffsetWellPickerV2/components/Map/popupGenerator.js.map +1 -0
- package/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js +1 -1
- package/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js.map +1 -0
- package/components/OffsetWellPickerV2/components/Table/MetricsSelect.js.map +1 -0
- package/components/OffsetWellPickerV2/components/Table/SubjectIndicator.css.js.map +1 -0
- package/components/OffsetWellPickerV2/components/Table/SubjectIndicator.js.map +1 -0
- package/components/OffsetWellPickerV2/components/Table/index.js.map +1 -0
- package/components/OffsetWellPickerV2/constants.js.map +1 -0
- package/components/OffsetWellPickerV2/effects/biDirectionalFiltering.js.map +1 -0
- package/components/OffsetWellPickerV2/effects/index.js.map +1 -0
- package/components/OffsetWellPickerV2/utils/apiCalls.js.map +1 -0
- package/components/PadModeSelect/PadModeSelect.js.map +1 -0
- package/components/PadModeSelect/utils.js.map +1 -0
- package/components/PadOffsetsPicker/OffsetAssetChip.js.map +1 -0
- package/components/PadOffsetsPicker/OffsetAssetsListExpander.js.map +1 -0
- package/components/PadOffsetsPicker/PadOffsetsPicker.js.map +1 -0
- package/components/PadOffsetsPicker/StagesSelector.js.map +1 -0
- package/components/PadOffsetsPicker/index.js.map +1 -0
- package/components/ParameterCharts/AddEditTrack.css.js.map +1 -0
- package/components/ParameterCharts/AddEditTrack.js.map +1 -0
- package/components/ParameterCharts/ChartsContext.js.map +1 -0
- package/components/ParameterCharts/DataContext.js.map +1 -0
- package/components/ParameterCharts/ParameterCharts.css.js.map +1 -0
- package/components/ParameterCharts/ParameterCharts.js.map +1 -0
- package/components/ParameterCharts/SettingsContext.js.map +1 -0
- package/components/ParameterCharts/components/ChartContainer.css.js.map +1 -0
- package/components/ParameterCharts/components/ChartContainer.js.map +1 -0
- package/components/ParameterCharts/components/Charts/EmptyChart.css.js.map +1 -0
- package/components/ParameterCharts/components/Charts/EmptyChart.js.map +1 -0
- package/components/ParameterCharts/components/Charts/LineChart.css.js.map +1 -0
- package/components/ParameterCharts/components/Charts/LineChart.js.map +1 -0
- package/components/ParameterCharts/components/Charts/options.js.map +1 -0
- package/components/ParameterCharts/components/DataLoadingIndicator.js.map +1 -0
- package/components/ParameterCharts/components/SingleChannelTrackSettings.js.map +1 -0
- package/components/ParameterCharts/components/Tooltip/CursorPositioner.css.js.map +1 -0
- package/components/ParameterCharts/components/Tooltip/CursorPositioner.js.map +1 -0
- package/components/ParameterCharts/components/Tooltip/Tooltip.css.js.map +1 -0
- package/components/ParameterCharts/components/Tooltip/Tooltip.js.map +1 -0
- package/components/ParameterCharts/components/TraceHeader.css.js.map +1 -0
- package/components/ParameterCharts/components/TraceHeader.js.map +1 -0
- package/components/ParameterCharts/components/TraceSelect.js.map +1 -0
- package/components/ParameterCharts/components/TraceSettings.css.js.map +1 -0
- package/components/ParameterCharts/components/TraceSettings.js.map +1 -0
- package/components/ParameterCharts/components/Track.css.js.map +1 -0
- package/components/ParameterCharts/components/Track.js.map +1 -0
- package/components/ParameterCharts/components/TrackSettings.css.js.map +1 -0
- package/components/ParameterCharts/components/TrackSettings.js.map +1 -0
- package/components/ParameterCharts/constants.js.map +1 -0
- package/components/ParameterCharts/utils/dataParser.js.map +1 -0
- package/components/PinnableFilters/PinnableFilters.css.js.map +1 -0
- package/components/PinnableFilters/PinnableFilters.js.map +1 -0
- package/components/PinnableFilters/components/FiltersToggler.js.map +1 -0
- package/components/PinnableFilters/components/PinAppSwitch.js.map +1 -0
- package/components/PinnableFilters/constants.js.map +1 -0
- package/components/PinnableFilters/effects/index.js.map +1 -0
- package/components/PinnableFilters/utils.js.map +1 -0
- package/components/PostInput/PostInput.css.js.map +1 -0
- package/components/PostInput/PostInput.js.map +1 -0
- package/components/PostPreviewDialog/index.js.map +1 -0
- package/components/PostPreviewDialog/styles.css.js.map +1 -0
- package/components/PriceInput/FormattedNumber.js.map +1 -0
- package/components/PriceInput/PriceInput.js.map +1 -0
- package/components/RangeSlider/Input.css.js.map +1 -0
- package/components/RangeSlider/RangeSlider.css.js.map +1 -0
- package/components/RangeSlider/RangeSlider.js.map +1 -0
- package/components/RangeSlider/constants.js.map +1 -0
- package/components/RangeSlider/inputs/FromInput.js.map +1 -0
- package/components/RangeSlider/inputs/ToInput.js.map +1 -0
- package/components/RangeSlider/strategies/horizontal.js.map +1 -0
- package/components/RangeSlider/strategies/vertical.js.map +1 -0
- package/components/RangeSlider/utils.js.map +1 -0
- package/components/ResizableTable/ResizableTable.js.map +1 -0
- package/components/ResizableTable/ResizableTableCell.js.map +1 -0
- package/components/ResizableTable/ResizableTableHeaderCell.js.map +1 -0
- package/components/SearchInput/index.js.map +1 -0
- package/components/Select/index.js.map +1 -0
- package/components/SettingEditors/ColorEditor/index.js.map +1 -0
- package/components/SettingEditors/ColorEditor/style.css.js.map +1 -0
- package/components/SettingEditors/DropdownEditor/index.js.map +1 -0
- package/components/SettingEditors/RadioEditor/index.js.map +1 -0
- package/components/SlateFormattedText/Constants.js.map +1 -0
- package/components/SlateFormattedText/Elements/ImageElement/ImageElement.css.js.map +1 -0
- package/components/SlateFormattedText/Elements/ImageElement/ImageElement.js.map +1 -0
- package/components/SlateFormattedText/Elements/VideoElement/VideoElement.js.map +1 -0
- package/components/SlateFormattedText/Elements/VideoElement/style.css.js.map +1 -0
- package/components/SlateFormattedText/RenderElements.js.map +1 -0
- package/components/SlateFormattedText/SlateFormattedText.js.map +1 -0
- package/components/SlateFormattedText/style.css.js.map +1 -0
- package/components/SlateFormattedText/utils.js.map +1 -0
- package/components/StageDesignVActual/ComparisonBar/ComparisonBar.js.map +1 -0
- package/components/StageDesignVActual/ComparisonBar/utils.js.map +1 -0
- package/components/StageDesignVActual/ComparisonHeader.js.map +1 -0
- package/components/StageDesignVActual/ComparisonRow.js.map +1 -0
- package/components/StageDesignVActual/ComparisonTable.css.js.map +1 -0
- package/components/StageDesignVActual/ElementsComparison/ElementsComparison.js.map +1 -0
- package/components/StageDesignVActual/ElementsComparison/utils.js.map +1 -0
- package/components/Stepper/Step.css.js.map +1 -0
- package/components/Stepper/Step.js.map +1 -0
- package/components/Stepper/Stepper.js.map +1 -0
- package/components/Stepper/StepsWrapper.css.js.map +1 -0
- package/components/Stepper/StepsWrapper.js.map +1 -0
- package/components/StyledMenuItem/index.js.map +1 -0
- package/components/SwitchControl/index.js.map +1 -0
- package/components/SwitchControl/style.css.js.map +1 -0
- package/components/Table/TableSortLabel/TableSortLabel.js.map +1 -0
- package/components/Table/TableToolbar/TableToolbar.js.map +1 -0
- package/components/Tabs/Tab.js.map +1 -0
- package/components/Tabs/Tabs.js.map +1 -0
- package/components/Template/TemplatePopover/Styles.js.map +1 -0
- package/components/Template/TemplatePopover/index.js.map +1 -0
- package/components/Template/TemplateSharingDialog/ChipSelector.css.js.map +1 -0
- package/components/Template/TemplateSharingDialog/ChipSelector.js.map +1 -0
- package/components/Template/TemplateSharingDialog/UsersChipSelector.js.map +1 -0
- package/components/Template/TemplateSharingDialog/index.js.map +1 -0
- package/components/TextField/effects/index.js.map +1 -0
- package/components/TextField/index.js.map +1 -0
- package/components/TextLink/index.js.map +1 -0
- package/components/Tooltip/MuiTooltipDcWrapper.js.map +1 -0
- package/components/Tooltip/Tooltip.js.map +1 -0
- package/components/TracesEditModal/TracesEditModal.css.js.map +1 -0
- package/components/TracesEditModal/TracesEditModal.js.map +1 -0
- package/components/TracesEditModal/TracesEditModalContainer.js.map +1 -0
- package/components/TruncatedText/index.js.map +1 -0
- package/components/Typography.js.map +1 -0
- package/components/UserCard/index.js.map +1 -0
- package/components/UserCard/style.css.js.map +1 -0
- package/components/UserCardPopover.js.map +1 -0
- package/components/UserMention/constants.js.map +1 -0
- package/components/UserMention/index.js.map +1 -0
- package/components/UserMention/style.css.js.map +1 -0
- package/components/UserMention/utils/index.js.map +1 -0
- package/components/VirtualizedTable/CustomizeColumnsDialog.js.map +1 -0
- package/components/VirtualizedTable/DraggableList.js.map +1 -0
- package/components/VirtualizedTable/VirtualizedTable.js.map +1 -0
- package/components/VirtualizedTable/index.js.map +1 -0
- package/components/WellSummary/ActivitySummaryChart.js.map +1 -0
- package/components/WellSummary/FracWirelineTimeChart.js.map +1 -0
- package/components/WellSummary/WellSummaryItemLabel.js.map +1 -0
- package/components/WellSummary/WellSummaryItemTitle.js.map +1 -0
- package/components/WellSummary/WellSummaryItemValue.js.map +1 -0
- package/components/WellSummary/effects/useWellSummaryData.js.map +1 -0
- package/components/WellSummary/index.js.map +1 -0
- package/components/WellSummary/utils.js.map +1 -0
- package/components/index.js +1 -1
- package/components/index.js.map +1 -0
- package/config/highcharts/highcharts-contour.js.map +1 -0
- package/config/highcharts/highcharts.js.map +1 -0
- package/config/index.js.map +1 -0
- package/config/initGlobalDependencies.js.map +1 -0
- package/config/mapbox/index.js.map +1 -0
- package/config/theme/accordionOverrides.js.map +1 -0
- package/config/theme/buttonOverrides.js.map +1 -0
- package/config/theme/checkboxOverrides.js.map +1 -0
- package/config/theme/chipOverrides.js.map +1 -0
- package/config/theme/dateTimePickerThemeOverrides.js.map +1 -0
- package/config/theme/fabOverrides.js.map +1 -0
- package/config/theme/formControlLabelOverrides.js.map +1 -0
- package/config/theme/formGroupOverrides.js.map +1 -0
- package/config/theme/index.js.map +1 -0
- package/config/theme/lightThemePalette.mjs.js.map +1 -0
- package/config/theme/palette.mjs.js.map +1 -0
- package/config/theme/radioOverrides.js.map +1 -0
- package/config/theme/tableOverrides.js.map +1 -0
- package/config/theme/textFieldOverrides.js.map +1 -0
- package/config/theme/themeVariables.mjs.js.map +1 -0
- package/config/theme/toggleButtonsGroupOverrides.js.map +1 -0
- package/config/theme/tooltipOverrides.js.map +1 -0
- package/constants/accuracy.js.map +1 -0
- package/constants/alerts.js.map +1 -0
- package/constants/appPackages.js.map +1 -0
- package/constants/apps.js.map +1 -0
- package/constants/assetTypes.js.map +1 -0
- package/constants/bha.js +1 -0
- package/constants/bha.js.map +1 -0
- package/constants/casing.js.map +1 -0
- package/constants/completion.js.map +1 -0
- package/constants/dateTimeFormat.js.map +1 -0
- package/constants/devcenter.js.map +1 -0
- package/constants/drillstring.js.map +1 -0
- package/constants/feed.js.map +1 -0
- package/constants/goals.js.map +1 -0
- package/constants/helpCenter.js.map +1 -0
- package/constants/index.js.map +1 -0
- package/constants/notifications.js.map +1 -0
- package/constants/rigActivity.js.map +1 -0
- package/constants/segment.js.map +1 -0
- package/constants/sizes.js +1 -0
- package/constants/sizes.js.map +1 -0
- package/constants/subscriptions.js +1 -0
- package/constants/subscriptions.js.map +1 -0
- package/constants/theme.js.map +1 -0
- package/constants/video.js.map +1 -0
- package/constants/wellSummary.js.map +1 -0
- package/effects/index.js.map +1 -0
- package/effects/useDevCenterApp.js.map +1 -0
- package/effects/useEscPress.js.map +1 -0
- package/effects/useOutsideClick.js.map +1 -0
- package/effects/useSignedURL.js.map +1 -0
- package/effects/useSubscriptions.js.map +1 -0
- package/ext-esm/@material-ui/icons/esm/ExpandLess.js.map +1 -0
- package/ext-esm/@material-ui/icons/esm/ExpandMore.js.map +1 -0
- package/ext-esm/@material-ui/icons/esm/Map.js.map +1 -0
- package/ext-esm/@material-ui/icons/esm/UnfoldLess.js.map +1 -0
- package/ext-esm/@material-ui/icons/esm/UnfoldMore.js.map +1 -0
- package/ext-esm/@material-ui/icons/esm/utils/createSvgIcon.js.map +1 -0
- package/ext-esm/style-inject/dist/style-inject.es.js.map +1 -0
- package/hocs/index.js.map +1 -0
- package/hocs/withMUIProvidersHOC.js.map +1 -0
- package/index.js.map +1 -0
- package/package.json +1 -1
- package/permissions/PermissionsContext.js.map +1 -0
- package/permissions/ProvidePermissions.js.map +1 -0
- package/permissions/constants/abilities.js.map +1 -0
- package/permissions/constants/appsPermissions.js.map +1 -0
- package/permissions/constants/index.js.map +1 -0
- package/permissions/constants/settingsApps.js.map +1 -0
- package/permissions/index.js.map +1 -0
- package/permissions/usePermissions.js.map +1 -0
- package/permissions/useProvidePermissions.js.map +1 -0
- package/permissions/utils.js.map +1 -0
- package/permissions/withPermissionsHOC.js +1 -1
- package/permissions/withPermissionsHOC.js.map +1 -0
- package/styles/counter/counter.module.scss.js.map +1 -0
- package/styles/counter/index.js.map +1 -0
- package/styles/customScrollbars.global.css.js.map +1 -0
- package/styles/emojiMart.global.css.js.map +1 -0
- package/styles/generatedThemesVariables.global.css.js.map +1 -0
- package/styles/globalStyles.js.map +1 -0
- package/styles/index.global.css.js.map +1 -0
- package/styles/index.js.map +1 -0
- package/styles/mapbox.global.css.js.map +1 -0
- package/styles/reactVirtualized.global.css.js.map +1 -0
- package/styles/typography/colors.module.scss.js.map +1 -0
- package/styles/typography/index.js.map +1 -0
- package/styles/typography/typography.module.scss.js.map +1 -0
- package/utils/DrillstringUtils.js.map +1 -0
- package/utils/FluidCheckUtils.js.map +1 -0
- package/utils/StageDesignVActualUtils.js.map +1 -0
- package/utils/accuracy.js.map +1 -0
- package/utils/alerts.js.map +1 -0
- package/utils/apps.js.map +1 -0
- package/utils/audio.js.map +1 -0
- package/utils/casing/conversion.js.map +1 -0
- package/utils/casing/index.js.map +1 -0
- package/utils/casing/validation.js.map +1 -0
- package/utils/chartSeries.js.map +1 -0
- package/utils/completion.js.map +1 -0
- package/utils/components.js.map +1 -0
- package/utils/constants/units.js.map +1 -0
- package/utils/convert.js.map +1 -0
- package/utils/convertKeys.js.map +1 -0
- package/utils/csvExport.js.map +1 -0
- package/utils/dashboardReports.js +1 -1
- package/utils/dashboardReports.js.map +1 -0
- package/utils/devcenter.js.map +1 -0
- package/utils/drillstring/conversion.js.map +1 -0
- package/utils/drillstring/index.js.map +1 -0
- package/utils/drillstring/schematic.js.map +1 -0
- package/utils/drillstring/validation.js.map +1 -0
- package/utils/env.js.map +1 -0
- package/utils/feed.js.map +1 -0
- package/utils/fileExtension.js.map +1 -0
- package/utils/formatting.js.map +1 -0
- package/utils/ga.js.map +1 -0
- package/utils/goals.js.map +1 -0
- package/utils/index.js.map +1 -0
- package/utils/jsonaDataFormatter.js.map +1 -0
- package/utils/lasParser.js.map +1 -0
- package/utils/loadable.js.map +1 -0
- package/utils/main.js.map +1 -0
- package/utils/mapUnits.js.map +1 -0
- package/utils/mapbox.js.map +1 -0
- package/utils/metrics/index.js.map +1 -0
- package/utils/metrics/metricsConfig.js.map +1 -0
- package/utils/metrics/utils.js.map +1 -0
- package/utils/mobileDetect.js.map +1 -0
- package/utils/nativeMessages.js.map +1 -0
- package/utils/notificationToasts.js.map +1 -0
- package/utils/notifications.js.map +1 -0
- package/utils/permissions.js.map +1 -0
- package/utils/reports.js.map +1 -0
- package/utils/rollbar.js.map +1 -0
- package/utils/sqlParser.js.map +1 -0
- package/utils/themeVariables.js.map +1 -0
- package/utils/time.js.map +1 -0
- package/utils/torqueAndHookloadUtils.js.map +1 -0
- package/utils/user.js.map +1 -0
- package/utils/video.js.map +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import"@babel/runtime/helpers/defineProperty";import{debounce as e}from"lodash";import"@babel/runtime/helpers/toConsumableArray";import"../../../constants/completion.js";import"../../../constants/alerts.js";import"@babel/runtime/helpers/slicedToArray";import"../../../constants/goals.js";import"../../../constants/segment.js";import"../../../constants/apps.js";import"../../../constants/drillstring.js";import"../../../constants/notifications.js";import"../../../constants/feed.js";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/asyncToGenerator";import"../../../utils/mobileDetect.js";import"@babel/runtime/helpers/typeof";import"../../../utils/index.js";import{jsxs as t,Fragment as r,jsx as o}from"react/jsx-runtime";import{makeStyles as i}from"@material-ui/core";import"react";import"querystring";import"uuid/v1";import"../../../clients/jsonApi/index.js";import"../../../clients/subscriptions.js";import"uuid";import"@babel/runtime/helpers/objectWithoutProperties";import{node as n,number as s,func as p,bool as m}from"prop-types";import"classnames";import"../../Modal/index.js";import"../../IconMenu/index.js";import"../../StyledMenuItem/index.js";import"../../LoadingIndicator/LoadingIndicator.js";import"../../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../DevCenter/DevCenterAppContainer/components/DcTooltipsCoordinatorProvider/DcTooltipsCoordinatorProvider.js";import"../../Tooltip/MuiTooltipDcWrapper.js";import"../../Avatar/index.js";import"../../Annotations/AnnotationsContext.js";import"../../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"react-router";import"../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"../../IconButton/index.js";import"../../ConfirmationDialog.js";import"../../Annotations/components/AnnotationsList/index.js";import"../../Annotations/components/LastAnnotation/index.js";import"../../PadModeSelect/PadModeSelect.js";import"../../DevCenter/AppHeader/AppHeaderNew.js";import"../../DevCenter/AppHeader/AppHeader.js";import"../../DevCenter/AppSideBar/AppSideBar.js";import"../../DevCenter/AppContext.js";import"../../DevCenter/AppsDataProvider/AppsDataProvider.js";import"@material-ui/icons/Help";import"../../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../ErrorBoundary/ErrorBoundary.js";import"../../Typography.js";import"../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../DevCenter/DevCenterAppContainer/components/DisabledSettingsMessage/DisabledSettingsMessage.js";import"slate";import"../../SlateFormattedText/RenderElements.js";import"../../SlateFormattedText/SlateFormattedText.js";import"../../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../../DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../../DevCenter/DevCenterAppContainer/components/HelpCenterDialog/HelpCenterDialog.js";import"../../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../../DevCenter/NavigationBar/NavigationBar.js";import"../../DevCenter/SideBar/SideBar.js";import"../../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../../DevCenter/IsolatedDevCenterAppContainer/AppsGridDragHandle.js";import"../../TruncatedText/index.js";import"../../AssetEditor/SingleAssetEditor.js";import"../../AssetEditor/AssetEditorAutocomplete.js";import"../../AssetEditor/index.js";import"../../AppVersionsSelect/AppVersionsSelect.js";import"../../CollapsableSidebar.js";import"../../DateTimePicker/index.js";import"../../DatePicker/index.js";import"../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../ColorPicker/ColorPicker.js";import"../../ParameterCharts/AddEditTrack.js";import"../../ParameterCharts/ParameterCharts.js";import"../../ChartActionsList/ChartActionsList.js";import"../../SettingEditors/ColorEditor/index.js";import"../../SettingEditors/DropdownEditor/index.js";import"../../SettingEditors/RadioEditor/index.js";import"../../SwitchControl/index.js";import"../../RangeSlider/RangeSlider.js";import"../../Login/components/Login.js";import"../../Login/components/PasswordField.js";import"../../Login/components/Chip.js";import"../../Login/components/StepFooter.js";import"../../Login/components/StepContent.js";import"../../Login/components/StepHeader.js";import"../../Login/components/Step.js";import"../../Login/components/OrDivider.js";import"../../Login/components/HiddenEmailField.js";import"../../Login/components/EmailField.js";import"../../Breadcrumbs/index.js";import"../../VirtualizedTable/index.js";import"../../EmptyView/EmptyView.js";import"../../Button/index.js";import"../../MenuItem/index.js";import"../../ContextMenuItem/index.js";import"../../FolderMenuItem/index.js";import"../../EditableItem/EditableItem/index.js";import"../../EditableItem/EditableItemWithBadge/index.js";import"../../Checkbox/index.js";import"../../FolderMenuItemWithLinks/index.js";import"../../TextField/index.js";import"../../Chip/index.js";import"../../Counter/index.js";import"../../AnchorsList/AnchorsList.js";import"../../Select/index.js";import"../../CustomSelect/index.js";import"../../Tabs/Tabs.js";import"../../Tabs/Tab.js";import"../../ResizableTable/ResizableTable.js";import"../../Drillstring/BHASchematic.js";import"../../Drillstring/BHAComponentIcon.js";import"../../Drillstring/BHATable/index.js";import"../../Drillstring/BHAComponentDetail/index.js";import"../../Casing/CasingComponentIcon.js";import"../../Casing/CasingTable/index.js";import"../../WellSummary/WellSummaryItemLabel.js";import"../../WellSummary/WellSummaryItemTitle.js";import"../../WellSummary/WellSummaryItemValue.js";import"../../WellSummary/ActivitySummaryChart.js";import"../../WellSummary/FracWirelineTimeChart.js";import"../../BICOffsetPickerDialog/index.js";import"../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../Notifications/Notifications.js";import"../../TextLink/index.js";import"../../Template/TemplatePopover/index.js";import"../../PinnableFilters/PinnableFilters.js";import"../../HeaderLayout/HeaderLayout.js";import"../../PadOffsetsPicker/PadOffsetsPicker.js";import"../../PadOffsetsPicker/OffsetAssetChip.js";import"../../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../../PadOffsetsPicker/StagesSelector.js";import"../../Table/TableToolbar/TableToolbar.js";import"../../PriceInput/PriceInput.js";import"../../LabelsCounter/LabelsCounter.js";import"../../Stepper/Step.js";import"../../Stepper/StepsWrapper.js";import"../../Stepper/Stepper.js";import"../../Comment/CommentIcon/index.js";import"../../FilesLoader/FilesLoader.js";import"../../SearchInput/index.js";import"../../StageDesignVActual/ComparisonHeader.js";import"../../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../../StageDesignVActual/ComparisonRow.js";import"../../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../../FeedItem/FeedItem.js";import"../../KeyboardDateTimePicker.js";import a from"../../PostInput/PostInput.js";import"../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../Popover.js";import"../Popup.js";var l=i({postInput:{paddingBottom:8},filePreviewWrapper:function(e){return{width:"100%",marginLeft:0,maxHeight:e.smallerView?127:251}}});function d(i){var n=i.userCompanyId,s=i.startAdornment,p=i.endAdornment,m=i.customContent,d=i.setComment,j=i.smallerView,C=l({smallerView:j}),c=e(d,1500);return t(r,{children:[s,m||o(a,{userCompanyId:n,onChange:c,filePreviewWrapperClass:C.filePreviewWrapper,className:C.postInput,smallerView:j}),p]})}d.propTypes={startAdornment:n,endAdornment:n,customContent:n,userCompanyId:s.isRequired,setComment:p,smallerView:m},d.defaultProps={startAdornment:null,endAdornment:null,customContent:null,setComment:function(){},smallerView:!1};export default d;
|
|
1
|
+
import"@babel/runtime/helpers/defineProperty";import{debounce as e}from"lodash";import"@babel/runtime/helpers/toConsumableArray";import"../../../constants/completion.js";import"../../../constants/alerts.js";import"@babel/runtime/helpers/slicedToArray";import"../../../constants/goals.js";import"../../../constants/segment.js";import"../../../constants/apps.js";import"../../../constants/drillstring.js";import"../../../constants/notifications.js";import"../../../constants/feed.js";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/asyncToGenerator";import"../../../utils/mobileDetect.js";import"@babel/runtime/helpers/typeof";import"../../../utils/index.js";import{jsxs as t,Fragment as r,jsx as o}from"react/jsx-runtime";import{makeStyles as i}from"@material-ui/core";import"react";import"querystring";import"uuid/v1";import"../../../clients/jsonApi/index.js";import"../../../clients/subscriptions.js";import"uuid";import"@babel/runtime/helpers/objectWithoutProperties";import{node as n,number as s,func as p,bool as m}from"prop-types";import"classnames";import"../../Modal/index.js";import"../../IconMenu/index.js";import"../../StyledMenuItem/index.js";import"../../LoadingIndicator/LoadingIndicator.js";import"../../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../DevCenter/DevCenterAppContainer/components/DcTooltipsCoordinatorProvider/DcTooltipsCoordinatorProvider.js";import"../../Tooltip/MuiTooltipDcWrapper.js";import"../../Avatar/index.js";import"../../Annotations/AnnotationsContext.js";import"../../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"react-router";import"../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"../../IconButton/index.js";import"../../ConfirmationDialog.js";import"../../Annotations/components/AnnotationsList/index.js";import"../../Annotations/components/LastAnnotation/index.js";import"../../PadModeSelect/PadModeSelect.js";import"../../DevCenter/AppHeader/AppHeaderNew.js";import"../../DevCenter/AppHeader/AppHeader.js";import"../../DevCenter/AppSideBar/AppSideBar.js";import"../../DevCenter/AppContext.js";import"../../DevCenter/AppsDataProvider/AppsDataProvider.js";import"@material-ui/icons/Help";import"../../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../ErrorBoundary/ErrorBoundary.js";import"../../Typography.js";import"../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../DevCenter/DevCenterAppContainer/components/DisabledSettingsMessage/DisabledSettingsMessage.js";import"slate";import"../../SlateFormattedText/RenderElements.js";import"../../SlateFormattedText/SlateFormattedText.js";import"../../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../../DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../../DevCenter/DevCenterAppContainer/components/HelpCenterDialog/HelpCenterDialog.js";import"../../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../../DevCenter/NavigationBar/NavigationBar.js";import"../../DevCenter/SideBar/SideBar.js";import"../../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../../DevCenter/IsolatedDevCenterAppContainer/AppsGridDragHandle.js";import"../../TruncatedText/index.js";import"../../AssetEditor/SingleAssetEditor.js";import"../../AssetEditor/AssetEditorAutocomplete.js";import"../../AssetEditor/index.js";import"../../AppVersionsSelect/AppVersionsSelect.js";import"../../CollapsableSidebar.js";import"../../DateTimePicker/index.js";import"../../DatePicker/index.js";import"../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../ColorPicker/ColorPicker.js";import"../../ParameterCharts/AddEditTrack.js";import"../../ParameterCharts/ParameterCharts.js";import"../../ChartActionsList/ChartActionsList.js";import"../../SettingEditors/ColorEditor/index.js";import"../../SettingEditors/DropdownEditor/index.js";import"../../SettingEditors/RadioEditor/index.js";import"../../SwitchControl/index.js";import"../../RangeSlider/RangeSlider.js";import"../../Login/components/Login.js";import"../../Login/components/PasswordField.js";import"../../Login/components/Chip.js";import"../../Login/components/StepFooter.js";import"../../Login/components/StepContent.js";import"../../Login/components/StepHeader.js";import"../../Login/components/Step.js";import"../../Login/components/OrDivider.js";import"../../Login/components/HiddenEmailField.js";import"../../Login/components/EmailField.js";import"../../Breadcrumbs/index.js";import"../../VirtualizedTable/index.js";import"../../EmptyView/EmptyView.js";import"../../Button/index.js";import"../../MenuItem/index.js";import"../../ContextMenuItem/index.js";import"../../FolderMenuItem/index.js";import"../../EditableItem/EditableItem/index.js";import"../../EditableItem/EditableItemWithBadge/index.js";import"../../Checkbox/index.js";import"../../FolderMenuItemWithLinks/index.js";import"../../TextField/index.js";import"../../Chip/index.js";import"../../Counter/index.js";import"../../AnchorsList/AnchorsList.js";import"../../Select/index.js";import"../../CustomSelect/index.js";import"../../Tabs/Tabs.js";import"../../Tabs/Tab.js";import"../../ResizableTable/ResizableTable.js";import"../../Drillstring/BHASchematic.js";import"../../Drillstring/BHAComponentIcon.js";import"../../Drillstring/BHATable/index.js";import"../../Drillstring/BHAComponentDetail/index.js";import"../../Casing/CasingComponentIcon.js";import"../../Casing/CasingTable/index.js";import"../../WellSummary/WellSummaryItemLabel.js";import"../../WellSummary/WellSummaryItemTitle.js";import"../../WellSummary/WellSummaryItemValue.js";import"../../WellSummary/ActivitySummaryChart.js";import"../../WellSummary/FracWirelineTimeChart.js";import"../../BICOffsetPickerDialog/index.js";import"../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../Notifications/Notifications.js";import"../../TextLink/index.js";import"../../Template/TemplatePopover/index.js";import"../../PinnableFilters/PinnableFilters.js";import"../../HeaderLayout/HeaderLayout.js";import"../../PadOffsetsPicker/PadOffsetsPicker.js";import"../../PadOffsetsPicker/OffsetAssetChip.js";import"../../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../../PadOffsetsPicker/StagesSelector.js";import"../../Table/TableToolbar/TableToolbar.js";import"../../PriceInput/PriceInput.js";import"../../LabelsCounter/LabelsCounter.js";import"../../Stepper/Step.js";import"../../Stepper/StepsWrapper.js";import"../../Stepper/Stepper.js";import"../../Comment/CommentIcon/index.js";import"../../FilesLoader/FilesLoader.js";import"../../SearchInput/index.js";import"../../StageDesignVActual/ComparisonHeader.js";import"../../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../../StageDesignVActual/ComparisonRow.js";import"../../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../../FeedItem/FeedItem.js";import"../../KeyboardDateTimePicker.js";import a from"../../PostInput/PostInput.js";import"../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../Popover.js";import"../Popup.js";import"../../EmbeddedApp/DevCenterEmbeddedApp.js";import"../../EmbeddedApp/EmbeddedApp.js";var l=i({postInput:{paddingBottom:8},filePreviewWrapper:function(e){return{width:"100%",marginLeft:0,maxHeight:e.smallerView?127:251}}});function d(i){var n=i.userCompanyId,s=i.startAdornment,p=i.endAdornment,m=i.customContent,d=i.setComment,j=i.smallerView,C=l({smallerView:j}),c=e(d,1500);return t(r,{children:[s,m||o(a,{userCompanyId:n,onChange:c,filePreviewWrapperClass:C.filePreviewWrapper,className:C.postInput,smallerView:j}),p]})}d.propTypes={startAdornment:n,endAdornment:n,customContent:n,userCompanyId:s.isRequired,setComment:p,smallerView:m},d.defaultProps={startAdornment:null,endAdornment:null,customContent:null,setComment:function(){},smallerView:!1};export default d;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Content.js","sources":["../../../../src/components/AddComment/components/Content.js"],"sourcesContent":["import { node, number, func, bool } from 'prop-types';\nimport { debounce } from 'lodash';\nimport { makeStyles } from '@material-ui/core';\n\nimport { PostInput } from '~/components';\n\nconst INPUT_DEBOUNCE_DELAY = 1500;\n\nconst useStyles = makeStyles({\n postInput: { paddingBottom: 8 },\n filePreviewWrapper: ({ smallerView }) => ({\n width: '100%',\n marginLeft: 0,\n maxHeight: smallerView ? 127 : 251,\n }),\n});\n\nfunction Content({\n userCompanyId,\n startAdornment,\n endAdornment,\n customContent,\n setComment,\n smallerView,\n}) {\n const classes = useStyles({ smallerView });\n\n const setCommentDebounced = debounce(setComment, INPUT_DEBOUNCE_DELAY);\n\n return (\n <>\n {startAdornment}\n\n {customContent || (\n <PostInput\n userCompanyId={userCompanyId}\n onChange={setCommentDebounced}\n filePreviewWrapperClass={classes.filePreviewWrapper}\n className={classes.postInput}\n smallerView={smallerView}\n />\n )}\n\n {endAdornment}\n </>\n );\n}\n\nContent.propTypes = {\n startAdornment: node,\n endAdornment: node,\n customContent: node,\n userCompanyId: number.isRequired,\n setComment: func,\n smallerView: bool,\n};\n\nContent.defaultProps = {\n startAdornment: null,\n endAdornment: null,\n customContent: null,\n setComment: () => undefined,\n smallerView: false,\n};\n\nexport default Content;\n"],"names":["INPUT_DEBOUNCE_DELAY","useStyles","makeStyles","postInput","paddingBottom","filePreviewWrapper","smallerView","width","marginLeft","maxHeight","Content","userCompanyId","startAdornment","endAdornment","customContent","setComment","classes","setCommentDebounced","debounce","_jsxs","_jsx","propTypes","node","number","isRequired","func","bool","defaultProps","undefined"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,IAAMA,oBAAoB,GAAG,IAA7B;AAEA,IAAMC,SAAS,GAAGC,UAAU,CAAC;AAC3BC,EAAAA,SAAS,EAAE;AAAEC,IAAAA,aAAa,EAAE;AAAjB,GADgB;AAE3BC,EAAAA,kBAAkB,EAAE;AAAA,QAAGC,WAAH,QAAGA,WAAH;AAAA,WAAsB;AACxCC,MAAAA,KAAK,EAAE,MADiC;AAExCC,MAAAA,UAAU,EAAE,CAF4B;AAGxCC,MAAAA,SAAS,EAAEH,WAAW,GAAG,GAAH,GAAS;AAHS,KAAtB;AAAA;AAFO,CAAD,CAA5B;;AASA,SAASI,OAAT,QAOG;AAAA,MANDC,aAMC,SANDA,aAMC;AAAA,MALDC,cAKC,SALDA,cAKC;AAAA,MAJDC,YAIC,SAJDA,YAIC;AAAA,MAHDC,aAGC,SAHDA,aAGC;AAAA,MAFDC,UAEC,SAFDA,UAEC;AAAA,MADDT,WACC,SADDA,WACC;AACD,MAAMU,OAAO,GAAGf,SAAS,CAAC;AAAEK,IAAAA,WAAW,EAAXA;AAAF,GAAD,CAAzB;AAEA,MAAMW,mBAAmB,GAAGC,QAAQ,CAACH,UAAD,EAAaf,oBAAb,CAApC;AAEA,sBACEmB;AAAA,eACGP,cADH,EAGGE,aAAa,iBACZM,IAAC,SAAD;AACE,MAAA,aAAa,EAAET,aADjB;AAEE,MAAA,QAAQ,EAAEM,mBAFZ;AAGE,MAAA,uBAAuB,EAAED,OAAO,CAACX,kBAHnC;AAIE,MAAA,SAAS,EAAEW,OAAO,CAACb,SAJrB;AAKE,MAAA,WAAW,EAAEG;AALf,MAJJ,EAaGO,YAbH;AAAA,IADF;AAiBD;;AAEDH,OAAO,CAACW,SAAR,GAAoB;AAClBT,EAAAA,cAAc,EAAEU,IADE;AAElBT,EAAAA,YAAY,EAAES,IAFI;AAGlBR,EAAAA,aAAa,EAAEQ,IAHG;AAIlBX,EAAAA,aAAa,EAAEY,MAAM,CAACC,UAJJ;AAKlBT,EAAAA,UAAU,EAAEU,IALM;AAMlBnB,EAAAA,WAAW,EAAEoB;AANK,CAApB;AASAhB,OAAO,CAACiB,YAAR,GAAuB;AACrBf,EAAAA,cAAc,EAAE,IADK;AAErBC,EAAAA,YAAY,EAAE,IAFO;AAGrBC,EAAAA,aAAa,EAAE,IAHM;AAIrBC,EAAAA,UAAU,EAAE;AAAA,WAAMa,SAAN;AAAA,GAJS;AAKrBtB,EAAAA,WAAW,EAAE;AALQ,CAAvB;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AnchorsList.js","sources":["../../../src/components/AnchorsList/AnchorsList.js"],"sourcesContent":["// This component has been copy-pasted from MUI documentation\n// https://github.com/mui-org/material-ui/blob/master/docs/src/modules/components/AppTableOfContents.js\n\nimport { useMemo, useCallback, useRef, useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport { throttle, noop } from 'lodash';\nimport classNames from 'classnames';\nimport { makeStyles, Typography, Link } from '@material-ui/core';\n\nconst useStyles = makeStyles(theme => ({\n root: {\n top: 70,\n width: 175,\n flexShrink: 0,\n position: 'sticky',\n height: 'calc(100vh - 70px)',\n overflowY: 'auto',\n padding: theme.spacing(2, 0),\n display: 'none',\n [theme.breakpoints.up('sm')]: {\n display: 'block',\n },\n },\n title: {\n color: theme.palette.primary.text8,\n margin: '0 0 8px 16px',\n lineHeight: '24px',\n fontSize: 10,\n fontWeight: 500,\n letterSpacing: 1,\n },\n contents: {\n marginTop: theme.spacing(2),\n paddingLeft: theme.spacing(1),\n },\n ul: {\n padding: 0,\n margin: 0,\n listStyle: 'none',\n borderLeft: `1px solid ${theme.palette.background.b9}`,\n },\n li: { display: 'flex', '&:not(:first-of-type)': { marginTop: 8 } },\n item: {\n color: theme.palette.primary.text6,\n display: 'inline-block',\n margin: '7px 16px',\n fontSize: 12,\n fontWeight: 400,\n letter: '0.4px',\n lineHeight: '16px',\n },\n active: { color: theme.palette.text.primary, fontWeight: 500 },\n activeItemBorder: {\n height: 30,\n width: '2px',\n backgroundColor: '#03BCD4',\n borderRadius: '0 2px 2px 0',\n position: 'absolute',\n },\n}));\n\n// TODO: these nodes are mutable sources. Use createMutableSource once it's stable\nfunction getItemsClient(headings) {\n return headings.map(item => ({ ...item, node: document.getElementById(item.hash) }));\n}\n\nfunction useThrottledOnScroll(callback, delay) {\n const throttledCallback = useMemo(() => (callback ? throttle(callback, delay) : noop), [\n callback,\n delay,\n ]);\n\n useEffect(() => {\n if (throttledCallback === noop) return undefined;\n window.addEventListener('scroll', throttledCallback);\n\n return () => {\n window.removeEventListener('scroll', throttledCallback);\n throttledCallback.cancel();\n };\n }, [throttledCallback]);\n}\n\nfunction AnchorsList(props) {\n const { title, items } = props;\n const classes = useStyles();\n\n const itemsWithNodeRef = useRef([]);\n useEffect(() => {\n itemsWithNodeRef.current = getItemsClient(items);\n }, [items]);\n\n const [activeState, setActiveState] = useState(null);\n const clickedRef = useRef(false);\n const unsetClickedRef = useRef(null);\n const findActiveIndex = useCallback(() => {\n // Don't set the active index based on scroll if a link was just clicked\n if (clickedRef.current) return;\n\n let active;\n for (let i = itemsWithNodeRef.current.length - 1; i >= 0; i -= 1) {\n // No hash if we're near the top of the page\n if (document.documentElement.scrollTop < 100) {\n active = { hash: null };\n break;\n }\n\n const item = itemsWithNodeRef.current[i];\n\n if (\n item.node &&\n item.node.offsetTop <\n document.documentElement.scrollTop + document.documentElement.clientHeight / 8\n ) {\n active = item;\n break;\n }\n }\n if (active && activeState !== active.hash) setActiveState(active.hash);\n }, [activeState]);\n\n // Corresponds to 10 frames at 60 Hz\n useThrottledOnScroll(items.length > 0 ? findActiveIndex : null, 166);\n\n const handleClick = hash => event => {\n // Ignore click for new tab/new window behavior\n if (\n event.defaultPrevented ||\n event.button !== 0 || // ignore everything but left-click\n event.metaKey ||\n event.ctrlKey ||\n event.altKey ||\n event.shiftKey\n ) {\n return;\n }\n\n // Used to disable findActiveIndex if the page scrolls due to a click\n clickedRef.current = true;\n unsetClickedRef.current = setTimeout(() => {\n clickedRef.current = false;\n }, 1000);\n\n if (activeState !== hash) {\n setActiveState(hash);\n }\n };\n\n useEffect(\n () => () => {\n clearTimeout(unsetClickedRef.current);\n },\n []\n );\n\n useEffect(() => {\n // Fires after component has been mounted. We need this to scroll to anchor on initial load\n const { hash } = window.location;\n if (!hash) return;\n const element = document.getElementById(hash.substr(1));\n if (element) {\n setTimeout(() => {\n element.scrollIntoView({ block: 'start', inline: 'nearest', behavior: 'smooth' });\n }, 50);\n }\n }, []);\n\n return (\n <nav className={classes.root}>\n {items.length > 0 && (\n <>\n <div className={classes.title}>{title}</div>\n <Typography component=\"ul\" className={classes.ul}>\n {items.map(item => {\n const isActive = activeState === item.hash;\n return (\n <li key={item.text} className={classes.li}>\n {isActive && <div className={classes.activeItemBorder} />}\n <Link\n display=\"block\"\n href={`#${item.hash}`}\n underline=\"none\"\n onClick={handleClick(item.hash)}\n className={classNames(classes.item, isActive && classes.active)}\n >\n <span>{item.text}</span>\n </Link>\n </li>\n );\n })}\n </Typography>\n </>\n )}\n </nav>\n );\n}\n\nAnchorsList.defaultProps = {\n title: 'ON THIS PAGE',\n items: [],\n};\n\nAnchorsList.propTypes = {\n title: PropTypes.string,\n items: PropTypes.arrayOf(PropTypes.shape({ hash: PropTypes.string, text: PropTypes.string })),\n};\n\nexport default AnchorsList;\n"],"names":["useStyles","makeStyles","theme","root","top","width","flexShrink","position","height","overflowY","padding","spacing","display","breakpoints","up","title","color","palette","primary","text8","margin","lineHeight","fontSize","fontWeight","letterSpacing","contents","marginTop","paddingLeft","ul","listStyle","borderLeft","background","b9","li","item","text6","letter","active","text","activeItemBorder","backgroundColor","borderRadius","getItemsClient","headings","map","node","document","getElementById","hash","useThrottledOnScroll","callback","delay","throttledCallback","useMemo","throttle","noop","useEffect","undefined","window","addEventListener","removeEventListener","cancel","AnchorsList","props","items","classes","itemsWithNodeRef","useRef","current","useState","activeState","setActiveState","clickedRef","unsetClickedRef","findActiveIndex","useCallback","i","length","documentElement","scrollTop","offsetTop","clientHeight","handleClick","event","defaultPrevented","button","metaKey","ctrlKey","altKey","shiftKey","setTimeout","clearTimeout","location","element","substr","scrollIntoView","block","inline","behavior","_jsx","_jsxs","isActive","classNames","defaultProps","propTypes","PropTypes","string","arrayOf","shape"],"mappings":";;;;;;;;;;;;AASA,IAAMA,SAAS,GAAGC,UAAU,CAAC,UAAAC,KAAK;AAAA,SAAK;AACrCC,IAAAA,IAAI;AACFC,MAAAA,GAAG,EAAE,EADH;AAEFC,MAAAA,KAAK,EAAE,GAFL;AAGFC,MAAAA,UAAU,EAAE,CAHV;AAIFC,MAAAA,QAAQ,EAAE,QAJR;AAKFC,MAAAA,MAAM,EAAE,oBALN;AAMFC,MAAAA,SAAS,EAAE,MANT;AAOFC,MAAAA,OAAO,EAAER,KAAK,CAACS,OAAN,CAAc,CAAd,EAAiB,CAAjB,CAPP;AAQFC,MAAAA,OAAO,EAAE;AARP,OASDV,KAAK,CAACW,WAAN,CAAkBC,EAAlB,CAAqB,IAArB,CAT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A2B;AACzBxF,EAAAA,KAAK,EAAE,cADkB;AAEzBiD,EAAAA,KAAK,EAAE;AAFkB,CAA3B;AAKAF,WAAW,CAAC0C,SAAZ,GAAwB;AACtBzF,EAAAA,KAAK,EAAE0F,SAAS,CAACC,MADK;AAEtB1C,EAAAA,KAAK,EAAEyC,SAAS,CAACE,OAAV,CAAkBF,SAAS,CAACG,KAAV,CAAgB;AAAE5D,IAAAA,IAAI,EAAEyD,SAAS,CAACC,MAAlB;AAA0BpE,IAAAA,IAAI,EAAEmE,SAAS,CAACC;AAA1C,GAAhB,CAAlB;AAFe,CAAxB;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AnnotationsContext.js","sources":["../../../src/components/Annotations/AnnotationsContext.js"],"sourcesContent":["import { createContext, useReducer, useContext } from 'react';\nimport { node } from 'prop-types';\n\nimport {\n SET_ANNOTATIONS,\n APPEND_ANNOTATIONS,\n ADD_ANNOTATION,\n DELETE_ANNOTATION,\n EDIT_ANNOTATION,\n} from './constants';\n\nconst AnnotationsStateContext = createContext();\nconst AnnotationsDispatchContext = createContext();\n\nfunction annotationsReducer(state, action) {\n switch (action.type) {\n case SET_ANNOTATIONS: {\n return { annotations: action.annotations };\n }\n case APPEND_ANNOTATIONS: {\n return {\n ...state,\n annotations: {\n data: [...state.annotations.data, ...action.annotations.data],\n included: action.annotations.included.reduce(\n (acc, item) =>\n acc.find(({ id, type }) => id === item.id && type === item.type)\n ? acc\n : acc.concat([item]),\n state.annotations.included\n ),\n },\n };\n }\n case ADD_ANNOTATION: {\n return {\n ...state,\n annotations: state.annotations.data\n ? {\n data: [action.annotation.data, ...state.annotations.data],\n included: action.annotation.included.reduce(\n (acc, item) =>\n acc.find(({ id, type }) => id === item.id && type === item.type)\n ? acc\n : acc.concat([item]),\n state.annotations.included\n ),\n }\n : {\n data: [action.annotation.data],\n included: action.annotation.included,\n },\n };\n }\n case DELETE_ANNOTATION: {\n const { data } = state.annotations;\n\n return {\n ...state,\n annotations: { ...state.annotations, data: data.filter(({ id }) => id !== action.id) },\n };\n }\n case EDIT_ANNOTATION: {\n return {\n ...state,\n annotations: {\n ...state.annotations,\n data: state.annotations.data.map(item =>\n item.id === action.id ? action.annotation.data : item\n ),\n included: action.annotation.included.reduce(\n (acc, item) =>\n acc.find(({ id, type }) => id === item.id && type === item.type)\n ? acc\n : acc.concat([item]),\n state.annotations.included\n ),\n },\n };\n }\n default: {\n throw new Error(`Unhandled action type: ${action.type}`);\n }\n }\n}\n\nfunction AnnotationsProvider({ children }) {\n const [state, dispatch] = useReducer(annotationsReducer, {\n annotations: [],\n });\n\n return (\n <AnnotationsStateContext.Provider value={state}>\n <AnnotationsDispatchContext.Provider value={dispatch}>\n {children}\n </AnnotationsDispatchContext.Provider>\n </AnnotationsStateContext.Provider>\n );\n}\nAnnotationsProvider.propTypes = { children: node.isRequired };\n\nfunction useAnnotationsState() {\n const context = useContext(AnnotationsStateContext);\n if (context === undefined) {\n throw new Error('useAnnotationsState must be used within a AnnotationsProvider');\n }\n return context;\n}\n\nfunction useAnnotationsDispatch() {\n const context = useContext(AnnotationsDispatchContext);\n if (context === undefined) {\n throw new Error('useAnnotationsDispatch must be used within a AnnotationsProvider');\n }\n return context;\n}\n\nexport { AnnotationsProvider, useAnnotationsState, useAnnotationsDispatch };\n"],"names":["AnnotationsStateContext","createContext","AnnotationsDispatchContext","annotationsReducer","state","action","type","SET_ANNOTATIONS","annotations","APPEND_ANNOTATIONS","data","included","reduce","acc","item","find","id","concat","ADD_ANNOTATION","annotation","DELETE_ANNOTATION","filter","EDIT_ANNOTATION","map","Error","AnnotationsProvider","children","useReducer","dispatch","_jsx","propTypes","node","isRequired","useAnnotationsState","context","useContext","undefined","useAnnotationsDispatch"],"mappings":";;;;;;;;;;;AAWA,IAAMA,uBAAuB,GAAGC,aAAa,EAA7C;AACA,IAAMC,0BAA0B,GAAGD,aAAa,EAAhD;;AAEA,SAASE,kBAAT,CAA4BC,KAA5B,EAAmCC,MAA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@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import{flowRight as t,get as r}from"lodash";import"@babel/runtime/helpers/toConsumableArray";import"../../../../../../constants/completion.js";import o from"moment";import"../../../../../../constants/alerts.js";import i from"@babel/runtime/helpers/slicedToArray";import"../../../../../../constants/goals.js";import"../../../../../../constants/segment.js";import"../../../../../../constants/apps.js";import"../../../../../../constants/drillstring.js";import"../../../../../../constants/notifications.js";import"../../../../../../constants/feed.js";import n from"@babel/runtime/regenerator";import s from"@babel/runtime/helpers/asyncToGenerator";import"../../../../../../utils/mobileDetect.js";import{showSuccessNotification as p,showErrorNotification as a}from"../../../../../../utils/notificationToasts.js";import"@babel/runtime/helpers/typeof";import"../../../../../../utils/index.js";import{jsxs as m,jsx as d}from"react/jsx-runtime";import{Fade as l,Paper as c,Typography as j}from"@material-ui/core";import{memo as C,useState as u,useRef as A}from"react";import"querystring";import"uuid/v1";import{postAnnotation as v}from"../../../../../../clients/jsonApi/index.js";import"../../../../../../clients/subscriptions.js";import D from"../../../../../../effects/useOutsideClick.js";import"uuid";import{number as g,shape as f,string as x}from"prop-types";import P from"classnames";import"../../../../../Modal/index.js";import"../../../../../IconMenu/index.js";import"../../../../../StyledMenuItem/index.js";import{withStyles as S}from"@material-ui/core/styles";import"../../../../../LoadingIndicator/LoadingIndicator.js";import"../../../../../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../../../../DevCenter/DevCenterAppContainer/components/DcTooltipsCoordinatorProvider/DcTooltipsCoordinatorProvider.js";import"../../../../../Tooltip/MuiTooltipDcWrapper.js";import b from"../../../../../Avatar/index.js";import{ADD_ANNOTATION as I}from"../../../../constants.js";import{useAnnotationsDispatch as y}from"../../../../AnnotationsContext.js";import"../../../../../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../../../../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import{withUniversalLocationHOC as h}from"../../../../../DevCenter/DevCenterRouterContext/hocs/withUniversalLocationHOC.js";import"../../../../../IconButton/index.js";import T from"../AnnotationInput/index.js";import E from"./style.css.js";import"../../../../../ConfirmationDialog.js";import"../../index.js";import"../../../LastAnnotation/index.js";import"../../../../../PadModeSelect/PadModeSelect.js";import"../../../../../DevCenter/AppHeader/AppHeaderNew.js";import"../../../../../DevCenter/AppHeader/AppHeader.js";import"../../../../../DevCenter/AppSideBar/AppSideBar.js";import"../../../../../DevCenter/AppContext.js";import"../../../../../DevCenter/AppsDataProvider/AppsDataProvider.js";import"@material-ui/icons/Help";import"../../../../../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../../../../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../../../../ErrorBoundary/ErrorBoundary.js";import"../../../../../Typography.js";import"../../../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../../../../DevCenter/DevCenterAppContainer/components/DisabledSettingsMessage/DisabledSettingsMessage.js";import"slate";import"../../../../../SlateFormattedText/RenderElements.js";import"../../../../../SlateFormattedText/SlateFormattedText.js";import"../../../../../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../../../../../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../../../../../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../../../../../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../../../../../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../../../../../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../../../../../DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../../../../../DevCenter/DevCenterAppContainer/components/HelpCenterDialog/HelpCenterDialog.js";import"../../../../../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../../../../../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../../../../../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../../../../../DevCenter/NavigationBar/NavigationBar.js";import"../../../../../DevCenter/SideBar/SideBar.js";import"../../../../../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../../../../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../../../../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../../../../../DevCenter/IsolatedDevCenterAppContainer/AppsGridDragHandle.js";import"../../../../../TruncatedText/index.js";import"../../../../../AssetEditor/SingleAssetEditor.js";import"../../../../../AssetEditor/AssetEditorAutocomplete.js";import"../../../../../AssetEditor/index.js";import"../../../../../AppVersionsSelect/AppVersionsSelect.js";import"../../../../../CollapsableSidebar.js";import"../../../../../DateTimePicker/index.js";import"../../../../../DatePicker/index.js";import"../../../../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../../../../ColorPicker/ColorPicker.js";import"../../../../../ParameterCharts/AddEditTrack.js";import"../../../../../ParameterCharts/ParameterCharts.js";import"../../../../../ChartActionsList/ChartActionsList.js";import"../../../../../SettingEditors/ColorEditor/index.js";import"../../../../../SettingEditors/DropdownEditor/index.js";import"../../../../../SettingEditors/RadioEditor/index.js";import"../../../../../SwitchControl/index.js";import"../../../../../RangeSlider/RangeSlider.js";import"../../../../../Login/components/Login.js";import"../../../../../Login/components/PasswordField.js";import"../../../../../Login/components/Chip.js";import"../../../../../Login/components/StepFooter.js";import"../../../../../Login/components/StepContent.js";import"../../../../../Login/components/StepHeader.js";import"../../../../../Login/components/Step.js";import"../../../../../Login/components/OrDivider.js";import"../../../../../Login/components/HiddenEmailField.js";import"../../../../../Login/components/EmailField.js";import"../../../../../Breadcrumbs/index.js";import"../../../../../VirtualizedTable/index.js";import"../../../../../EmptyView/EmptyView.js";import"../../../../../Button/index.js";import"../../../../../MenuItem/index.js";import"../../../../../ContextMenuItem/index.js";import"../../../../../FolderMenuItem/index.js";import"../../../../../EditableItem/EditableItem/index.js";import"../../../../../EditableItem/EditableItemWithBadge/index.js";import"../../../../../Checkbox/index.js";import"../../../../../FolderMenuItemWithLinks/index.js";import"../../../../../TextField/index.js";import"../../../../../Chip/index.js";import"../../../../../Counter/index.js";import"../../../../../AnchorsList/AnchorsList.js";import"../../../../../Select/index.js";import"../../../../../CustomSelect/index.js";import"../../../../../Tabs/Tabs.js";import"../../../../../Tabs/Tab.js";import"../../../../../ResizableTable/ResizableTable.js";import"../../../../../Drillstring/BHASchematic.js";import"../../../../../Drillstring/BHAComponentIcon.js";import"../../../../../Drillstring/BHATable/index.js";import"../../../../../Drillstring/BHAComponentDetail/index.js";import"../../../../../Casing/CasingComponentIcon.js";import"../../../../../Casing/CasingTable/index.js";import"../../../../../WellSummary/WellSummaryItemLabel.js";import"../../../../../WellSummary/WellSummaryItemTitle.js";import"../../../../../WellSummary/WellSummaryItemValue.js";import"../../../../../WellSummary/ActivitySummaryChart.js";import"../../../../../WellSummary/FracWirelineTimeChart.js";import"../../../../../BICOffsetPickerDialog/index.js";import"../../../../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../../../../Notifications/Notifications.js";import"../../../../../TextLink/index.js";import"../../../../../Template/TemplatePopover/index.js";import"../../../../../PinnableFilters/PinnableFilters.js";import"../../../../../HeaderLayout/HeaderLayout.js";import"../../../../../PadOffsetsPicker/PadOffsetsPicker.js";import"../../../../../PadOffsetsPicker/OffsetAssetChip.js";import"../../../../../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../../../../../PadOffsetsPicker/StagesSelector.js";import"../../../../../Table/TableToolbar/TableToolbar.js";import"../../../../../PriceInput/PriceInput.js";import"../../../../../LabelsCounter/LabelsCounter.js";import"../../../../../Stepper/Step.js";import"../../../../../Stepper/StepsWrapper.js";import"../../../../../Stepper/Stepper.js";import"../../../../../Comment/CommentIcon/index.js";import"../../../../../FilesLoader/FilesLoader.js";import"../../../../../SearchInput/index.js";import"../../../../../StageDesignVActual/ComparisonHeader.js";import"../../../../../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../../../../../StageDesignVActual/ComparisonRow.js";import"../../../../../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../../../../../FeedItem/FeedItem.js";import"../../../../../KeyboardDateTimePicker.js";import"../../../../../PostInput/PostInput.js";import"../../../../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../../../../../AddComment/Popover.js";import"../../../../../AddComment/Popup.js";var L=function(t){var C,g=t.appId,f=t.assetId,x=t.assetCompanyId,S=t.appSettings,h=t.currentUser,L=t.classes,k=t.location,F=t.dashboardType,B=y(),w=u(!1),V=i(w,2),H=V[0],M=V[1],R=A(null);D(R,(function(){M(!1)}));var W,N=(W=s(n.mark((function e(t,i,s){var m,d,l,c;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,m={app_id:g,asset_id:f,body:t,active_until:i,attachment:{file_name:s&&s.attachmentName,s3_link:s&&s.attachmentUrl},settings:S},d={},F&&(d.dashboard_type=F),(l=r(k,"query.time"))&&(m.data_timestamp=o(l).format()),e.next=8,v(m,d);case 8:c=e.sent,B({type:I,annotation:c}),e.next=17;break;case 12:return e.prev=12,e.t0=e.catch(0),a("Error during annotation creation"),console.error(e.t0),e.abrupt("return");case 17:p("Annotation has been added"),M(!1);case 19:case"end":return e.stop()}}),e,null,[[0,12]])}))),function(e,t,r){return W.apply(this,arguments)});return m("div",{className:E.cAddAnnotationFormInput,children:[d(b,{displayName:"".concat(h.first_name," ").concat(h.last_name),imgSrc:h.profile_photo,size:36}),m("div",{className:P(E.cAddAnnotationFormInputPaper,(C={},e(C,E.cAddAnnotationFormInputPaperOpened,H),e(C,E.cAddAnnotationFormInputPaperClosed,!H),C)),children:[d(l,{in:!H,timeout:500,children:d(c,{className:E.cAddAnnotationFormInputPaperLabel,children:d(j,{variant:"body2","data-testid":"".concat("AppAnnotationsPo","_collapsedInput"),className:L.inputLabel,onClick:function(){return M(!0)},children:"Type annotation here"})})}),d(l,{in:H,timeout:100,children:d("div",{className:E.cAddAnnotationFormInputPaperAddAnnotation,children:H&&d(T,{onSend:N,assetCompanyId:x,currentUser:h})})})]})]})};L.propTypes={appId:g.isRequired,assetId:g.isRequired,assetCompanyId:g.isRequired,appSettings:f().isRequired,currentUser:f({}),classes:f().isRequired,location:f().isRequired,dashboardType:x},L.defaultProps={currentUser:{},dashboardType:null};var k=t([S((function(e){return{inputLabel:{color:e.palette.grey[700],fontWeight:200,width:"100%"}}})),h])(C(L));export default k;
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import{flowRight as t,get as r}from"lodash";import"@babel/runtime/helpers/toConsumableArray";import"../../../../../../constants/completion.js";import o from"moment";import"../../../../../../constants/alerts.js";import i from"@babel/runtime/helpers/slicedToArray";import"../../../../../../constants/goals.js";import"../../../../../../constants/segment.js";import"../../../../../../constants/apps.js";import"../../../../../../constants/drillstring.js";import"../../../../../../constants/notifications.js";import"../../../../../../constants/feed.js";import n from"@babel/runtime/regenerator";import s from"@babel/runtime/helpers/asyncToGenerator";import"../../../../../../utils/mobileDetect.js";import{showSuccessNotification as p,showErrorNotification as m}from"../../../../../../utils/notificationToasts.js";import"@babel/runtime/helpers/typeof";import"../../../../../../utils/index.js";import{jsxs as a,jsx as d}from"react/jsx-runtime";import{Fade as l,Paper as c,Typography as j}from"@material-ui/core";import{memo as C,useState as u,useRef as A}from"react";import"querystring";import"uuid/v1";import{postAnnotation as v}from"../../../../../../clients/jsonApi/index.js";import"../../../../../../clients/subscriptions.js";import D from"../../../../../../effects/useOutsideClick.js";import"uuid";import{number as g,shape as f,string as b}from"prop-types";import x from"classnames";import"../../../../../Modal/index.js";import"../../../../../IconMenu/index.js";import"../../../../../StyledMenuItem/index.js";import{withStyles as P}from"@material-ui/core/styles";import"../../../../../LoadingIndicator/LoadingIndicator.js";import"../../../../../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../../../../DevCenter/DevCenterAppContainer/components/DcTooltipsCoordinatorProvider/DcTooltipsCoordinatorProvider.js";import"../../../../../Tooltip/MuiTooltipDcWrapper.js";import S from"../../../../../Avatar/index.js";import{ADD_ANNOTATION as I}from"../../../../constants.js";import{useAnnotationsDispatch as y}from"../../../../AnnotationsContext.js";import"../../../../../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../../../../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import{withUniversalLocationHOC as h}from"../../../../../DevCenter/DevCenterRouterContext/hocs/withUniversalLocationHOC.js";import"../../../../../IconButton/index.js";import E from"../AnnotationInput/index.js";import T from"./style.css.js";import"../../../../../ConfirmationDialog.js";import"../../index.js";import"../../../LastAnnotation/index.js";import"../../../../../PadModeSelect/PadModeSelect.js";import"../../../../../DevCenter/AppHeader/AppHeaderNew.js";import"../../../../../DevCenter/AppHeader/AppHeader.js";import"../../../../../DevCenter/AppSideBar/AppSideBar.js";import"../../../../../DevCenter/AppContext.js";import"../../../../../DevCenter/AppsDataProvider/AppsDataProvider.js";import"@material-ui/icons/Help";import"../../../../../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../../../../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../../../../ErrorBoundary/ErrorBoundary.js";import"../../../../../Typography.js";import"../../../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../../../../DevCenter/DevCenterAppContainer/components/DisabledSettingsMessage/DisabledSettingsMessage.js";import"slate";import"../../../../../SlateFormattedText/RenderElements.js";import"../../../../../SlateFormattedText/SlateFormattedText.js";import"../../../../../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../../../../../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../../../../../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../../../../../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../../../../../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../../../../../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../../../../../DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../../../../../DevCenter/DevCenterAppContainer/components/HelpCenterDialog/HelpCenterDialog.js";import"../../../../../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../../../../../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../../../../../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../../../../../DevCenter/NavigationBar/NavigationBar.js";import"../../../../../DevCenter/SideBar/SideBar.js";import"../../../../../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../../../../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../../../../../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../../../../../DevCenter/IsolatedDevCenterAppContainer/AppsGridDragHandle.js";import"../../../../../TruncatedText/index.js";import"../../../../../AssetEditor/SingleAssetEditor.js";import"../../../../../AssetEditor/AssetEditorAutocomplete.js";import"../../../../../AssetEditor/index.js";import"../../../../../AppVersionsSelect/AppVersionsSelect.js";import"../../../../../CollapsableSidebar.js";import"../../../../../DateTimePicker/index.js";import"../../../../../DatePicker/index.js";import"../../../../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../../../../ColorPicker/ColorPicker.js";import"../../../../../ParameterCharts/AddEditTrack.js";import"../../../../../ParameterCharts/ParameterCharts.js";import"../../../../../ChartActionsList/ChartActionsList.js";import"../../../../../SettingEditors/ColorEditor/index.js";import"../../../../../SettingEditors/DropdownEditor/index.js";import"../../../../../SettingEditors/RadioEditor/index.js";import"../../../../../SwitchControl/index.js";import"../../../../../RangeSlider/RangeSlider.js";import"../../../../../Login/components/Login.js";import"../../../../../Login/components/PasswordField.js";import"../../../../../Login/components/Chip.js";import"../../../../../Login/components/StepFooter.js";import"../../../../../Login/components/StepContent.js";import"../../../../../Login/components/StepHeader.js";import"../../../../../Login/components/Step.js";import"../../../../../Login/components/OrDivider.js";import"../../../../../Login/components/HiddenEmailField.js";import"../../../../../Login/components/EmailField.js";import"../../../../../Breadcrumbs/index.js";import"../../../../../VirtualizedTable/index.js";import"../../../../../EmptyView/EmptyView.js";import"../../../../../Button/index.js";import"../../../../../MenuItem/index.js";import"../../../../../ContextMenuItem/index.js";import"../../../../../FolderMenuItem/index.js";import"../../../../../EditableItem/EditableItem/index.js";import"../../../../../EditableItem/EditableItemWithBadge/index.js";import"../../../../../Checkbox/index.js";import"../../../../../FolderMenuItemWithLinks/index.js";import"../../../../../TextField/index.js";import"../../../../../Chip/index.js";import"../../../../../Counter/index.js";import"../../../../../AnchorsList/AnchorsList.js";import"../../../../../Select/index.js";import"../../../../../CustomSelect/index.js";import"../../../../../Tabs/Tabs.js";import"../../../../../Tabs/Tab.js";import"../../../../../ResizableTable/ResizableTable.js";import"../../../../../Drillstring/BHASchematic.js";import"../../../../../Drillstring/BHAComponentIcon.js";import"../../../../../Drillstring/BHATable/index.js";import"../../../../../Drillstring/BHAComponentDetail/index.js";import"../../../../../Casing/CasingComponentIcon.js";import"../../../../../Casing/CasingTable/index.js";import"../../../../../WellSummary/WellSummaryItemLabel.js";import"../../../../../WellSummary/WellSummaryItemTitle.js";import"../../../../../WellSummary/WellSummaryItemValue.js";import"../../../../../WellSummary/ActivitySummaryChart.js";import"../../../../../WellSummary/FracWirelineTimeChart.js";import"../../../../../BICOffsetPickerDialog/index.js";import"../../../../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../../../../Notifications/Notifications.js";import"../../../../../TextLink/index.js";import"../../../../../Template/TemplatePopover/index.js";import"../../../../../PinnableFilters/PinnableFilters.js";import"../../../../../HeaderLayout/HeaderLayout.js";import"../../../../../PadOffsetsPicker/PadOffsetsPicker.js";import"../../../../../PadOffsetsPicker/OffsetAssetChip.js";import"../../../../../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../../../../../PadOffsetsPicker/StagesSelector.js";import"../../../../../Table/TableToolbar/TableToolbar.js";import"../../../../../PriceInput/PriceInput.js";import"../../../../../LabelsCounter/LabelsCounter.js";import"../../../../../Stepper/Step.js";import"../../../../../Stepper/StepsWrapper.js";import"../../../../../Stepper/Stepper.js";import"../../../../../Comment/CommentIcon/index.js";import"../../../../../FilesLoader/FilesLoader.js";import"../../../../../SearchInput/index.js";import"../../../../../StageDesignVActual/ComparisonHeader.js";import"../../../../../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../../../../../StageDesignVActual/ComparisonRow.js";import"../../../../../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../../../../../FeedItem/FeedItem.js";import"../../../../../KeyboardDateTimePicker.js";import"../../../../../PostInput/PostInput.js";import"../../../../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../../../../../AddComment/Popover.js";import"../../../../../AddComment/Popup.js";import"../../../../../EmbeddedApp/DevCenterEmbeddedApp.js";import"../../../../../EmbeddedApp/EmbeddedApp.js";var L=function(t){var C,g=t.appId,f=t.assetId,b=t.assetCompanyId,P=t.appSettings,h=t.currentUser,L=t.classes,k=t.location,F=t.dashboardType,B=y(),w=u(!1),V=i(w,2),H=V[0],M=V[1],R=A(null);D(R,(function(){M(!1)}));var W,N=(W=s(n.mark((function e(t,i,s){var a,d,l,c;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,a={app_id:g,asset_id:f,body:t,active_until:i,attachment:{file_name:s&&s.attachmentName,s3_link:s&&s.attachmentUrl},settings:P},d={},F&&(d.dashboard_type=F),(l=r(k,"query.time"))&&(a.data_timestamp=o(l).format()),e.next=8,v(a,d);case 8:c=e.sent,B({type:I,annotation:c}),e.next=17;break;case 12:return e.prev=12,e.t0=e.catch(0),m("Error during annotation creation"),console.error(e.t0),e.abrupt("return");case 17:p("Annotation has been added"),M(!1);case 19:case"end":return e.stop()}}),e,null,[[0,12]])}))),function(e,t,r){return W.apply(this,arguments)});return a("div",{className:T.cAddAnnotationFormInput,children:[d(S,{displayName:"".concat(h.first_name," ").concat(h.last_name),imgSrc:h.profile_photo,size:36}),a("div",{className:x(T.cAddAnnotationFormInputPaper,(C={},e(C,T.cAddAnnotationFormInputPaperOpened,H),e(C,T.cAddAnnotationFormInputPaperClosed,!H),C)),children:[d(l,{in:!H,timeout:500,children:d(c,{className:T.cAddAnnotationFormInputPaperLabel,children:d(j,{variant:"body2","data-testid":"".concat("AppAnnotationsPo","_collapsedInput"),className:L.inputLabel,onClick:function(){return M(!0)},children:"Type annotation here"})})}),d(l,{in:H,timeout:100,children:d("div",{className:T.cAddAnnotationFormInputPaperAddAnnotation,children:H&&d(E,{onSend:N,assetCompanyId:b,currentUser:h})})})]})]})};L.propTypes={appId:g.isRequired,assetId:g.isRequired,assetCompanyId:g.isRequired,appSettings:f().isRequired,currentUser:f({}),classes:f().isRequired,location:f().isRequired,dashboardType:b},L.defaultProps={currentUser:{},dashboardType:null};var k=t([P((function(e){return{inputLabel:{color:e.palette.grey[700],fontWeight:200,width:"100%"}}})),h])(C(L));export default k;
|
package/components/Annotations/components/AnnotationsList/components/AddAnnotationForm/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../src/components/Annotations/components/AnnotationsList/components/AddAnnotationForm/index.js"],"sourcesContent":["import { memo, useState, useRef } from 'react';\nimport { number, shape, string } from 'prop-types';\nimport classNames from 'classnames';\nimport { get, flowRight } from 'lodash';\nimport moment from 'moment';\n\nimport { withStyles } from '@material-ui/core/styles';\nimport { Paper, Fade, Typography } from '@material-ui/core';\n\nimport Avatar from '~components/Avatar';\nimport useOutsideClick from '~effects/useOutsideClick';\n\nimport { showSuccessNotification, showErrorNotification } from '~/utils';\nimport { postAnnotation } from '~/clients/jsonApi';\n\nimport { useAnnotationsDispatch } from '../../../../AnnotationsContext';\nimport { ADD_ANNOTATION } from '../../../../constants';\n\nimport AnnotationInput from '../AnnotationInput';\n\nimport styles from './style.css';\nimport { withUniversalLocationHOC } from '~components/DevCenter';\n\nconst PAGE_NAME = 'AppAnnotationsPo';\n\nconst ANNOTATION_PLACEHOLDER = 'Type annotation here';\n\nconst muiStyles = theme => ({\n inputLabel: {\n color: theme.palette.grey[700],\n fontWeight: 200,\n width: '100%',\n },\n});\n\nconst AddAnnotationForm = ({\n appId,\n assetId,\n assetCompanyId,\n appSettings,\n currentUser,\n classes,\n location,\n dashboardType,\n}) => {\n const dispatch = useAnnotationsDispatch();\n\n const [inputIsOpen, setInputIsOpen] = useState(false);\n\n const containerRef = useRef(null);\n useOutsideClick(containerRef, () => {\n setInputIsOpen(false);\n });\n\n const handlePost = async (body, period, attachment) => {\n try {\n const annotation = {\n app_id: appId,\n asset_id: assetId,\n body,\n active_until: period,\n attachment: {\n file_name: attachment && attachment.attachmentName,\n s3_link: attachment && attachment.attachmentUrl,\n },\n settings: appSettings,\n };\n const options = {};\n if (dashboardType) options.dashboard_type = dashboardType;\n\n const queryTime = get(location, 'query.time');\n if (queryTime) annotation.data_timestamp = moment(queryTime).format();\n\n const newAnnotation = await postAnnotation(annotation, options);\n dispatch({ type: ADD_ANNOTATION, annotation: newAnnotation });\n } catch (e) {\n showErrorNotification('Error during annotation creation');\n console.error(e);\n return;\n }\n\n showSuccessNotification('Annotation has been added');\n setInputIsOpen(false);\n };\n\n return (\n <div className={styles.cAddAnnotationFormInput}>\n <Avatar\n displayName={`${currentUser.first_name} ${currentUser.last_name}`}\n imgSrc={currentUser.profile_photo}\n size={36}\n />\n <div\n className={classNames(styles.cAddAnnotationFormInputPaper, {\n [styles.cAddAnnotationFormInputPaperOpened]: inputIsOpen,\n [styles.cAddAnnotationFormInputPaperClosed]: !inputIsOpen,\n })}\n >\n <Fade in={!inputIsOpen} timeout={500}>\n <Paper className={styles.cAddAnnotationFormInputPaperLabel}>\n <Typography\n variant=\"body2\"\n data-testid={`${PAGE_NAME}_collapsedInput`}\n className={classes.inputLabel}\n onClick={() => setInputIsOpen(true)}\n >\n {ANNOTATION_PLACEHOLDER}\n </Typography>\n </Paper>\n </Fade>\n <Fade in={inputIsOpen} timeout={100}>\n <div className={styles.cAddAnnotationFormInputPaperAddAnnotation}>\n {inputIsOpen && (\n <AnnotationInput\n onSend={handlePost}\n assetCompanyId={assetCompanyId}\n currentUser={currentUser}\n />\n )}\n </div>\n </Fade>\n </div>\n </div>\n );\n};\n\nAddAnnotationForm.propTypes = {\n appId: number.isRequired,\n assetId: number.isRequired,\n assetCompanyId: number.isRequired,\n appSettings: shape().isRequired,\n currentUser: shape({}),\n classes: shape().isRequired,\n location: shape().isRequired,\n dashboardType: string,\n};\n\nAddAnnotationForm.defaultProps = {\n currentUser: {},\n dashboardType: null,\n};\n\nexport default flowRight([withStyles(muiStyles), withUniversalLocationHOC])(\n memo(AddAnnotationForm)\n);\n"],"names":["PAGE_NAME","ANNOTATION_PLACEHOLDER","muiStyles","theme","inputLabel","color","palette","grey","fontWeight","width","AddAnnotationForm","appId","assetId","assetCompanyId","appSettings","currentUser","classes","location","dashboardType","dispatch","useAnnotationsDispatch","useState","inputIsOpen","setInputIsOpen","containerRef","useRef","useOutsideClick","handlePost","body","period","attachment","annotation","app_id","asset_id","active_until","file_name","attachmentName","s3_link","attachmentUrl","settings","options","dashboard_type","queryTime","get","data_timestamp","moment","format","postAnnotation","newAnnotation","type","ADD_ANNOTATION","showErrorNotification","console","error","showSuccessNotification","_jsxs","styles","cAddAnnotationFormInput","_jsx","first_name","last_name","profile_photo","classNames","cAddAnnotationFormInputPaper","cAddAnnotationFormInputPaperOpened","cAddAnnotationFormInputPaperClosed","cAddAnnotationFormInputPaperLabel","cAddAnnotationFormInputPaperAddAnnotation","propTypes","number","isRequired","shape","string","defaultProps","flowRight","withStyles","withUniversalLocationHOC","memo"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AD,CALU;AAM5BvD,EAAAA,OAAO,EAAEuD,KAAK,GAAGD,UANW;AAO5BrD,EAAAA,QAAQ,EAAEsD,KAAK,GAAGD,UAPU;AAQ5BpD,EAAAA,aAAa,EAAEsD;AARa,CAA9B;AAWA9D,iBAAiB,CAAC+D,YAAlB,GAAiC;AAC/B1D,EAAAA,WAAW,EAAE,EADkB;AAE/BG,EAAAA,aAAa,EAAE;AAFgB,CAAjC;AAKA,0BAAewD,SAAS,CAAC,CAACC,UAAU,CAACzE,SAAD,CAAX,EAAwB0E,wBAAxB,CAAD,CAAT,CACbC,IAAI,CAACnE,iBAAD,CADS,CAAf;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,wBAAwB,gEAAqE;AAC7F;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../src/components/Annotations/components/AnnotationsList/components/Annotation/index.js"],"sourcesContent":["import { useState } from 'react';\nimport classNames from 'classnames';\nimport { shape, string, arrayOf, func, node, oneOf, number } from 'prop-types';\nimport { withStyles } from '@material-ui/core/styles';\nimport { flowRight } from 'lodash';\nimport withWidth, { isWidthUp } from '@material-ui/core/withWidth';\nimport moment from 'moment';\n\nimport { Paper, Typography, Divider, MenuItem, IconButton, Menu } from '@material-ui/core';\nimport grey from '@material-ui/core/colors/grey';\nimport MoreVertIcon from '@material-ui/icons/MoreVert';\n\nimport Avatar from '~components/Avatar';\nimport UserCardPopover from '~components/UserCardPopover';\nimport ConfirmationDialog from '~components/ConfirmationDialog';\nimport CommentsInfo from '~components/CommentsInfo';\nimport { formatMentionText } from '~components/UserMention/utils';\nimport Attachment from '~components/Attachment';\nimport { isNativeDetected as isNative } from '~/utils/mobileDetect';\n\nimport { deleteAnnotation, patchAnnotation } from '~/clients/jsonApi';\n\nimport AnnotationComments from '../AnnotationComments';\n\nimport { useAnnotationsDispatch } from '../../../../AnnotationsContext';\nimport { DELETE_ANNOTATION, EDIT_ANNOTATION } from '../../../../constants';\nimport AnnotationInput from '../AnnotationInput';\n\nimport styles from './style.css';\n\nconst PAGE_NAME = 'AppAnnotationItemPo';\n\nconst CREATED_AT_FORMAT = 'MM/DD/YY H:mm';\n\nconst muiStyles = theme => ({\n container: { backgroundColor: '#3b3b3be6', marginBottom: 16, marginLeft: 26 },\n headerDividerRoot: { margin: '10px 0' },\n createdAt: { color: theme.palette.grey[700], marginLeft: 5 },\n link: { cursor: 'pointer' },\n iconButtonRoot: {\n height: 24,\n width: 24,\n padding: 0,\n margin: '0 -10px 0 5px',\n },\n});\n\nconst UserAvatar = ({ user, currentUser, classes }) => (\n <div className={styles.cAnnotationUserAvatar}>\n {isNative ? (\n <Avatar\n // eslint-disable-next-line camelcase\n displayName={`${user.first_name} ${user.last_name}`}\n imgSrc={user.profile_photo}\n size={38}\n className={classes.avatar}\n />\n ) : (\n <UserCardPopover user={user} currentUser={currentUser}>\n <Avatar\n displayName={`${user.first_name} ${user.last_name}`}\n imgSrc={user.profile_photo}\n size={38}\n className={classes.avatar}\n />\n </UserCardPopover>\n )}\n </div>\n);\n\nconst MenuButton = ({\n actionsMenuAnchorEl,\n handleToggleActionsMenu,\n classes,\n handleEdit,\n handleDelete,\n}) => (\n <>\n <IconButton\n data-testid={`${PAGE_NAME}_menuButton`}\n aria-label=\"Actions\"\n aria-owns={actionsMenuAnchorEl ? styles.cAnnotationContainerActionsMenu : undefined}\n aria-haspopup=\"true\"\n className={classes.iconButtonRoot}\n onClick={handleToggleActionsMenu}\n >\n <MoreVertIcon htmlColor={grey[400]} />\n </IconButton>\n\n <Menu\n id=\"cAnnotationContainerActionsMenu\"\n anchorOrigin={{ vertical: 'top', horizontal: 'right' }}\n transformOrigin={{ vertical: 'top', horizontal: 'right' }}\n anchorEl={actionsMenuAnchorEl}\n open={!!actionsMenuAnchorEl}\n onClick={handleToggleActionsMenu}\n >\n <MenuItem data-testid={`${PAGE_NAME}_editMenuItem`} onClick={handleEdit}>\n Edit\n </MenuItem>\n <MenuItem data-testid={`${PAGE_NAME}_deleteMenuItem`} onClick={handleDelete}>\n Delete\n </MenuItem>\n </Menu>\n </>\n);\n\nconst Annotation = ({\n included,\n annotation,\n assetCompanyId,\n classes,\n showSuccessNotification,\n width,\n}) => {\n const [commentInputIsOpen, setCommentInputIsOpen] = useState(false);\n const [actionsMenuAnchorEl, setActionsMenuAnchorEl] = useState(null);\n const [isEdit, setIsEdit] = useState(false);\n const [deleteDialogOpen, setDeleteDialogOpen] = useState(false);\n const isSmallScreen = !isWidthUp('sm', width);\n\n const initialCommentsCount = annotation.attributes.comments_count || 0;\n const [commentsCount, setCommentsCount] = useState(initialCommentsCount);\n\n const dispatch = useAnnotationsDispatch();\n\n const activeUsersList = annotation.relationships.comment_users.data.reduce((users, { id }) => {\n const userData = included.find(user => user.id === id);\n if (userData) {\n users.push(userData.attributes);\n }\n return users;\n }, []);\n\n const userWhoCommented = activeUsersList.map(\n // eslint-disable-next-line camelcase\n ({ last_name, first_name }) => `${first_name} ${last_name}`\n );\n\n const handleToggleActionsMenu = event => {\n const currentT = event.currentTarget;\n setActionsMenuAnchorEl(actionsMenuAnchorEl ? null : currentT);\n };\n\n const handleDelete = async () => {\n try {\n const response = await deleteAnnotation(annotation.id);\n if (response) dispatch({ type: DELETE_ANNOTATION, id: annotation.id });\n } catch (e) {\n console.error(e);\n }\n };\n\n const handleEdit = async (body, period, attachment) => {\n try {\n const changedAnnotation = {\n body,\n active_until: period,\n attachment: {\n file_name: attachment && attachment.attachmentName,\n s3_link: attachment && attachment.attachmentUrl,\n },\n };\n const updatedAnnotation = await patchAnnotation(annotation.id, changedAnnotation);\n dispatch({ type: EDIT_ANNOTATION, annotation: updatedAnnotation, id: annotation.id });\n } catch (e) {\n console.error(e);\n return;\n }\n\n showSuccessNotification('Annotation has been changed');\n setIsEdit(false);\n };\n\n const userId = annotation.relationships.user.data.id;\n const currentUser = included.find(({ type, id }) => type === 'user' && id === userId);\n const userData = currentUser.attributes;\n const { attachment } = annotation.attributes;\n\n return (\n <Paper className={classes.container} elevation={0}>\n <div\n data-testid={`${PAGE_NAME}_annotation_${annotation.attributes.body}`}\n className={styles.cAnnotationContainer}\n >\n <UserAvatar\n user={userData}\n classes={classes}\n isNative={isNative}\n currentUser={currentUser}\n />\n\n <div className={styles.cAnnotationContainerTop}>\n <div className={styles.cAnnotationContainerTopMainInfo}>\n <Typography variant=\"body2\" data-testid={`${PAGE_NAME}_userName`}>\n {`${userData.first_name} ${userData.last_name}`}\n </Typography>\n <Typography\n data-testid={`${PAGE_NAME}_addDate`}\n variant=\"caption\"\n className={classes.createdAt}\n >\n {moment(annotation.attributes.created_at).format(CREATED_AT_FORMAT)}\n </Typography>\n </div>\n <div\n className={classNames(styles.cAnnotationContainerTopMenu, {\n [styles.cAnnotationContainerTopMenuSmall]: isSmallScreen,\n })}\n >\n <MenuButton\n actionsMenuAnchorEl={actionsMenuAnchorEl}\n handleToggleActionsMenu={handleToggleActionsMenu}\n handleEdit={() => setIsEdit(true)}\n handleDelete={() => setDeleteDialogOpen(true)}\n classes={classes}\n />\n </div>\n </div>\n\n <Divider className={classes.headerDividerRoot} />\n\n <div data-testid={`${PAGE_NAME}_message`} className={styles.cAnnotationContainerContent}>\n {isEdit ? (\n <AnnotationInput\n initialText={annotation.attributes.body}\n assetCompanyId={assetCompanyId}\n initialPeriod={annotation.attributes.created_at}\n initialAttachment={attachment}\n onSend={handleEdit}\n onClose={() => setIsEdit(false)}\n closeOnEsc\n />\n ) : (\n <>\n {formatMentionText(\n annotation.attributes.body,\n annotation.relationships.mentioned_users.data,\n isNative,\n null,\n currentUser\n )}\n {attachment && attachment.signed_url && (\n <Attachment attachmentUrl={attachment.signed_url} size=\"small\" />\n )}\n </>\n )}\n </div>\n </div>\n <div\n data-testid={`${PAGE_NAME}_comments_${annotation.attributes.body}`}\n className={styles.cAnnotationComments}\n >\n <div className={styles.cAnnotationCommentsInfo}>\n <Typography\n data-testid={`${PAGE_NAME}_commentButton`}\n variant=\"caption\"\n color=\"primary\"\n className={classes.link}\n onClick={() => setCommentInputIsOpen(true)}\n >\n Comment\n </Typography>\n <CommentsInfo\n commentsCount={commentsCount}\n usersWhoCommented={userWhoCommented}\n activeUsersList={activeUsersList}\n currentUser={currentUser}\n small\n />\n </div>\n <AnnotationComments\n annotationId={annotation.id}\n commentInputIsOpen={commentInputIsOpen}\n setCommentInputIsOpen={setCommentInputIsOpen}\n commentsCount={commentsCount}\n initialCommentsCount={initialCommentsCount}\n assetCompanyId={assetCompanyId}\n setCommentsCount={setCommentsCount}\n currentUser={currentUser}\n />\n </div>\n {deleteDialogOpen && (\n <ConfirmationDialog\n open={deleteDialogOpen}\n text=\"Do you really want to delete annotation?\"\n handleClose={() => setDeleteDialogOpen(false)}\n handleOk={handleDelete}\n okText=\"Delete\"\n />\n )}\n </Paper>\n );\n};\n\nUserAvatar.propTypes = {\n user: shape({\n id: number.isRequired,\n first_name: string.isRequired,\n last_name: string.isRequired,\n profile_photo: string.isRequired,\n }).isRequired,\n currentUser: shape({}).isRequired,\n classes: shape({}).isRequired,\n};\n\nMenuButton.propTypes = {\n actionsMenuAnchorEl: oneOf([node, null]).isRequired,\n handleToggleActionsMenu: func.isRequired,\n classes: shape({}).isRequired,\n handleDelete: func.isRequired,\n handleEdit: func.isRequired,\n};\n\nAnnotation.propTypes = {\n included: arrayOf(shape({})).isRequired,\n annotation: shape({\n relationships: shape({\n user: shape({ data: shape({ id: string.isRequired }).isRequired }).isRequired,\n mentioned_users: shape({ data: arrayOf(shape({})).isRequired }).isRequired,\n }).isRequired,\n attributes: shape({ body: string.isRequired, created_at: string.isRequired }),\n }).isRequired,\n classes: shape({}).isRequired,\n showSuccessNotification: func,\n width: string.isRequired,\n assetCompanyId: number.isRequired,\n};\n\nAnnotation.defaultProps = {\n showSuccessNotification: () => undefined,\n};\n\nexport default flowRight([withStyles(muiStyles), withWidth()])(Annotation);\n"],"names":["PAGE_NAME","CREATED_AT_FORMAT","muiStyles","theme","container","backgroundColor","marginBottom","marginLeft","headerDividerRoot","margin","createdAt","color","palette","grey","link","cursor","iconButtonRoot","height","width","padding","UserAvatar","user","currentUser","classes","_jsx","styles","cAnnotationUserAvatar","isNative","first_name","last_name","profile_photo","avatar","MenuButton","actionsMenuAnchorEl","handleToggleActionsMenu","handleEdit","handleDelete","_jsxs","cAnnotationContainerActionsMenu","undefined","vertical","horizontal","Annotation","included","annotation","assetCompanyId","showSuccessNotification","useState","commentInputIsOpen","setCommentInputIsOpen","setActionsMenuAnchorEl","isEdit","setIsEdit","deleteDialogOpen","setDeleteDialogOpen","isSmallScreen","isWidthUp","initialCommentsCount","attributes","comments_count","commentsCount","setCommentsCount","dispatch","useAnnotationsDispatch","activeUsersList","relationships","comment_users","data","reduce","users","id","userData","find","push","userWhoCommented","map","event","currentT","currentTarget","deleteAnnotation","response","type","DELETE_ANNOTATION","console","error","body","period","attachment","changedAnnotation","active_until","file_name","attachmentName","s3_link","attachmentUrl","patchAnnotation","updatedAnnotation","EDIT_ANNOTATION","userId","cAnnotationContainer","cAnnotationContainerTop","cAnnotationContainerTopMainInfo","moment","created_at","format","classNames","cAnnotationContainerTopMenu","cAnnotationContainerTopMenuSmall","cAnnotationContainerContent","formatMentionText","mentioned_users","signed_url","cAnnotationComments","cAnnotationCommentsInfo","propTypes","shape","number","isRequired","string","oneOf","node","func","arrayOf","defaultProps","flowRight","withStyles","withWidth"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,IAAMA,SAAS,GAAG,qBAAlB;AAEA,IAAMC,iBAAiB,GAAG,eAA1B;;AAEA,IAAMC,SAAS,GAAG,SAAZA,SAAY,CAAAC,KAAK;AAAA,SAAK;AAC1BC,IAAAA,SAAS,EAAE;AAAEC,MAAAA,eAAe,EAAE,WAAnB;AAAgCC,MAAAA,YAAY,EAAE,EAA9C;AAAkDC,MAAAA,UAAU,EAAE;AAA9D,KADe;AA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AAEmG,MAAM,CAACD,UAXO;AAYrBvE,EAAAA,cAAc,EAAEsE,MAAM,CAACC;AAZF,CAAvB;AAeA1E,UAAU,CAACgF,YAAX,GAA0B;AACxB5E,EAAAA,uBAAuB,EAAE;AAAA,WAAMP,SAAN;AAAA;AADD,CAA1B;AAIA,mBAAeoF,SAAS,CAAC,CAACC,UAAU,CAAC1H,SAAD,CAAX,EAAwB2H,SAAS,EAAjC,CAAD,CAAT,CAAgDnF,UAAhD,CAAf;;;;"}
|
package/components/Annotations/components/AnnotationsList/components/Annotation/style.css.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,wBAAwB,gEAAqE;AAC7F;AACA;AACA;AACA;AACA;AACA;"}
|
package/components/Annotations/components/AnnotationsList/components/AnnotationComments/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../src/components/Annotations/components/AnnotationsList/components/AnnotationComments/index.js"],"sourcesContent":["import { useEffect, useState, useRef } from 'react';\nimport { shape, string, bool, number, func } from 'prop-types';\nimport { withStyles } from '@material-ui/core/styles';\n\nimport { Button, Typography } from '@material-ui/core';\n\nimport { getAnnotationComments, postAnnotationComment } from '~/clients/jsonApi';\n\nimport LoadingIndicator from '~components/LoadingIndicator';\nimport CommentInput from '~components/CommentInput';\nimport CommentLoader from '~components/CommentLoader';\nimport Comment from '~components/Comment';\n\nimport styles from './style.css';\n\nconst PAGE_NAME = 'annotationComments';\n\nconst INITIAL_VISIBLE_COMMENTS_COUNT = 3;\nconst MORE_COMMENTS_FIRST_INCREMENT = 7;\nconst MORE_COMMENTS_INCREMENT = 10;\n\nconst muiStyles = {\n showMore: {\n textTransform: 'none',\n backgroundColor: 'transparent!important',\n padding: 0,\n },\n};\n\nconst AnnotationComments = ({\n annotationId,\n commentInputIsOpen,\n commentsCount,\n setCommentsCount,\n initialCommentsCount,\n classes,\n assetCompanyId,\n currentUser,\n}) => {\n const inputRef = useRef();\n\n const [comments, setComments] = useState([]);\n const [isLoading, setIsLoading] = useState(false);\n const [isPosting, setIsPosting] = useState(false);\n\n const [nextPageToRequest, setNextPageToRequest] = useState(1);\n const [visibleCommentsСount, setVisibleCommentsCount] = useState(INITIAL_VISIBLE_COMMENTS_COUNT);\n\n const activateInput = () => {\n const { current } = inputRef;\n\n if (current) {\n current.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'start' });\n current.focus();\n }\n };\n\n const postCommentCallback = comment => {\n setComments([comment, ...comments]);\n setCommentsCount(commentsCount + 1);\n };\n\n const patchCommentCallback = comment => {\n const commentIndex = comments.findIndex(({ id }) => id === comment.id);\n\n const updatedComments = [...comments];\n updatedComments.splice(commentIndex, 1, comment);\n\n setComments(updatedComments);\n };\n\n const deleteCommentCallback = commentId => {\n setComments(comments.filter(({ id }) => id !== commentId));\n setCommentsCount(commentsCount - 1);\n };\n\n useEffect(() => {\n async function handleFetchComments() {\n if (!annotationId) return;\n\n setIsLoading(true);\n\n try {\n const response = await getAnnotationComments(annotationId, {\n page: nextPageToRequest,\n per_page: INITIAL_VISIBLE_COMMENTS_COUNT,\n order: 'desc',\n });\n setComments(response);\n } catch (e) {\n console.error(e);\n }\n\n setIsLoading(false);\n }\n\n handleFetchComments();\n }, []); // eslint-disable-line react-hooks/exhaustive-deps\n\n const handleShowMoreComments = async () => {\n setIsLoading(true);\n\n const isFirstIncrement = visibleCommentsСount === INITIAL_VISIBLE_COMMENTS_COUNT;\n const perPage = isFirstIncrement ? MORE_COMMENTS_FIRST_INCREMENT : MORE_COMMENTS_INCREMENT;\n\n setVisibleCommentsCount(perPage + visibleCommentsСount);\n\n try {\n const response = await getAnnotationComments(annotationId, {\n page: isFirstIncrement ? 1 : nextPageToRequest,\n per_page: perPage,\n order: 'desc',\n offset:\n nextPageToRequest === 1\n ? comments.length\n : MORE_COMMENTS_INCREMENT + (commentsCount - initialCommentsCount),\n });\n setComments([...comments, ...response]);\n if (!isFirstIncrement) setNextPageToRequest(nextPageToRequest + 1);\n } catch (e) {\n console.error(e);\n }\n\n setIsLoading(false);\n };\n\n // NOTE: Slice and show recent comments last\n const commentsToDisplay = comments.slice(0, visibleCommentsСount).reverse();\n const showShowMore = commentsCount > visibleCommentsСount;\n\n if (isLoading && !comments.length) return <LoadingIndicator fullscreen={false} />;\n\n return (\n <div className={styles.cAnnotationCommentsList}>\n {showShowMore && (\n <Button\n data-testid={`${PAGE_NAME}_viewMoreComments`}\n className={classes.showMore}\n onClick={handleShowMoreComments}\n >\n <Typography variant=\"caption\" color=\"primary\">\n View more comments\n </Typography>\n </Button>\n )}\n <div className={styles.cAnnotationCommentsListItems}>\n {isLoading && comments.length && <LoadingIndicator fullscreen={false} size={30} />}\n {commentsToDisplay.map(c => (\n <Comment\n key={c.id}\n comment={c}\n handleDeleteCallback={deleteCommentCallback}\n patchCommentCallback={patchCommentCallback}\n companyId={assetCompanyId}\n currentUser={currentUser}\n />\n ))}\n </div>\n\n {isPosting && <CommentLoader spaceAround />}\n\n {commentInputIsOpen && (\n <div className={styles.cAnnotationCommentsListInput}>\n <CommentInput\n inputRef={inputRef}\n postComment={comment => postAnnotationComment(annotationId, comment)}\n setIsPosting={setIsPosting}\n postCommentCallback={postCommentCallback}\n onMount={activateInput}\n companyId={assetCompanyId}\n currentUser={currentUser}\n />\n </div>\n )}\n </div>\n );\n};\n\nAnnotationComments.propTypes = {\n annotationId: string.isRequired,\n commentInputIsOpen: bool.isRequired,\n commentsCount: number.isRequired,\n initialCommentsCount: number.isRequired,\n setCommentsCount: func.isRequired,\n classes: shape().isRequired,\n assetCompanyId: number.isRequired,\n currentUser: shape({}).isRequired,\n};\n\nexport default withStyles(muiStyles)(AnnotationComments);\n"],"names":["PAGE_NAME","INITIAL_VISIBLE_COMMENTS_COUNT","MORE_COMMENTS_FIRST_INCREMENT","MORE_COMMENTS_INCREMENT","muiStyles","showMore","textTransform","backgroundColor","padding","AnnotationComments","annotationId","commentInputIsOpen","commentsCount","setCommentsCount","initialCommentsCount","classes","assetCompanyId","currentUser","inputRef","useRef","useState","comments","setComments","isLoading","setIsLoading","isPosting","setIsPosting","nextPageToRequest","setNextPageToRequest","visibleCommentsСount","setVisibleCommentsCount","activateInput","current","scrollIntoView","behavior","block","inline","focus","postCommentCallback","comment","patchCommentCallback","commentIndex","findIndex","id","updatedComments","splice","deleteCommentCallback","commentId","filter","useEffect","handleFetchComments","getAnnotationComments","page","per_page","order","response","console","error","handleShowMoreComments","isFirstIncrement","perPage","offset","length","commentsToDisplay","slice","reverse","showShowMore","_jsx","_jsxs","styles","cAnnotationCommentsList","cAnnotationCommentsListItems","map","c","cAnnotationCommentsListInput","postAnnotationComment","propTypes","string","isRequired","bool","number","func","shape","withStyles"],"mappings":";;;;;;;;;;;;;;;;AAeA,IAAMA,SAAS,GAAG,oBAAlB;AAEA,IAAMC,8BAA8B,GAAG,CAAvC;AACA,IAAMC,6BAA6B,GAAG,CAAtC;AACA,IAAMC,uBAAuB,GAAG,EAAhC;AAEA,IAAMC,SAAS,GAAG;AAChBC,EAAAA,QAAQ,EAAE;AACRC,IAAAA,aAAa,EAAE,MADP;AAERC,IAAAA,eAAe,EAAE,uBAFT;AAGRC,IAAAA,OAAO,EAAE;AAHD;AADM,CAAlB;;AAQA,IAAMC,kBAAkB,GAAG,SAArBA,kBAAqB,OASrB;AAAA,MARJC,YAQI,QARJA,YAQI;AAAA,MAPJC,kBAOI,QAPJA,kBAOI;AAAA,MANJC,aAMI,QANJA,aAMI;AAAA,MALJC,gBAKI,QALJA,gBAKI;AAAA,MAJJC,oBAII,QAJJA,oBAII;AAAA,MAHJC,OAGI,QAHJA,OAGI;AAAA,MAFJC,cAEI,QAFJA,cAEI;AAAA,MADJC,WACI,QADJA,WACI;AACJ,MAAMC,QAAQ,GAAGC,MAAM,EAAvB;;AADI,kBAG4BC,QAAQ,CAAC,EAAD,CAHpC;AAAA;AAAA,MAGGC,QAHH;AAAA,MAGaC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AAnB,GAA+B;AAC7BlE,EAAAA,YAAY,EAAEmE,MAAM,CAACC,UADQ;AAE7BnE,EAAAA,kBAAkB,EAAEoE,IAAI,CAACD,UAFI;AAG7BlE,EAAAA,aAAa,EAAEoE,MAAM,CAACF,UAHO;AAI7BhE,EAAAA,oBAAoB,EAAEkE,MAAM,CAACF,UAJA;AAK7BjE,EAAAA,gBAAgB,EAAEoE,IAAI,CAACH,UALM;AAM7B/D,EAAAA,OAAO,EAAEmE,KAAK,GAAGJ,UANY;AAO7B9D,EAAAA,cAAc,EAAEgE,MAAM,CAACF,UAPM;AAQ7B7D,EAAAA,WAAW,EAAEiE,KAAK,CAAC,EAAD,CAAL,CAAUJ;AARM,CAA/B;AAWA,2BAAeK,UAAU,CAAC/E,SAAD,CAAV,CAAsBK,kBAAtB,CAAf;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,wBAAwB,gEAAqE;AAC7F;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StyledSelect.js","sources":["../../../../../../../src/components/Annotations/components/AnnotationsList/components/AnnotationInput/StyledSelect.js"],"sourcesContent":["import PropTypes from 'prop-types';\nimport { Select } from '@material-ui/core';\nimport { withStyles } from '@material-ui/core/styles';\n\nconst muiStyles = {\n rootParent: {\n overflow: 'hidden',\n },\n root: {\n fontSize: '10px',\n lineHeight: '12px',\n },\n select: {\n padding: '0 40px 0 0',\n },\n};\n\nfunction StyledSelect({ classes, ...props }) {\n return <Select classes={classes} className={classes.rootParent} {...props} />;\n}\n\nStyledSelect.propTypes = {\n classes: PropTypes.shape().isRequired,\n};\n\nexport default withStyles(muiStyles, { withTheme: true })(StyledSelect);\n"],"names":["muiStyles","rootParent","overflow","root","fontSize","lineHeight","select","padding","StyledSelect","classes","props","_jsx","propTypes","PropTypes","shape","isRequired","withStyles","withTheme"],"mappings":";;;;;;;;;;AAIA,IAAMA,SAAS,GAAG;AAChBC,EAAAA,UAAU,EAAE;AACVC,IAAAA,QAAQ,EAAE;AADA,GADI;AAIhBC,EAAAA,IAAI,EAAE;AACJC,IAAAA,QAAQ,EAAE,MADN;AAEJC,IAAAA,UAAU,EAAE;AAFR,GAJU;AAQhBC,EAAAA,MAAM,EAAE;AACNC,IAAAA,OAAO,EAAE;AADH;AARQ,CAAlB;;AAaA,SAASC,YAAT,OAA6C;AAAA,MAArBC,OAAqB,QAArBA,OAAqB;AAAA,MAATC,KAAS;;AAC3C,sBAAOC,IAAC,MAAD;AAAQ,IAAA,OAAO,EAAEF,OAAjB;AAA0B,IAAA,SAAS,EAAEA,OAAO,CAACR;AAA7C,KAA6DS,KAA7D,EAAP;AACD;;AAEDF,YAAY,CAACI,SAAb,GAAyB;AACvBH,EAAAA,OAAO,EAAEI,SAAS,CAACC,KAAV,GAAkBC;AADJ,CAAzB;AAIA,qBAAeC,UAAU,CAAChB,SAAD,EAAY;AAAEiB,EAAAA,SAAS,EAAE;AAAb,CAAZ,CAAV,CAA2CT,YAA3C,CAAf;;;;"}
|
package/components/Annotations/components/AnnotationsList/components/AnnotationInput/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../src/components/Annotations/components/AnnotationsList/components/AnnotationInput/index.js"],"sourcesContent":["import { useState } from 'react';\nimport moment from 'moment';\nimport { string, bool, shape, func, number } from 'prop-types';\n\nimport { withStyles } from '@material-ui/core/styles';\nimport {\n Paper,\n Input,\n Tooltip,\n Typography,\n IconButton,\n FormControl,\n InputLabel,\n MenuItem,\n} from '@material-ui/core';\n\nimport SendIcon from '@material-ui/icons/Send';\nimport grey from '@material-ui/core/colors/grey';\n\nimport UserMention from '~components/UserMention';\nimport EmojiIconButton from '~components/EmojiIconButton';\nimport FileUploadIconButton from '~components/FileUploadIconButton';\nimport FailedFileUploading from '~components/FailedFileUploading';\nimport FilePreview from '~components/FilePreview';\n\nimport { isSuggestionsListOpened } from '~components/UserMention/utils';\n\nimport useEscPress from '~/effects/useEscPress';\n\nimport { ANNOTATION_ACTIVE_PERIODS } from '../../../../constants';\n\nimport StyledSelect from './StyledSelect';\nimport styles from './style.css';\n\nconst PAGE_NAME = 'AppAnnotationsPo';\n\nconst ANNOTATION_ACTIVE_PERIODS_KEYS = Object.keys(ANNOTATION_ACTIVE_PERIODS);\nconst ANNOTATION_PLACEHOLDER = 'Type annotation here';\n\nconst muiStyles = theme => ({\n inputLabel: {\n color: theme.palette.grey[700],\n fontWeight: 200,\n width: '100%',\n },\n inputRoot: {\n lineHeight: 15,\n },\n sendLabel: {\n display: 'flex',\n alignItems: 'center',\n fontWeight: 200,\n color: theme.palette.grey[700],\n marginRight: 22,\n fontSize: 10,\n },\n sendButton: {\n padding: 5,\n },\n labelHighlighter: {\n fontWeight: 200,\n fontSize: 10,\n },\n selectLabel: {\n fontSize: 10,\n lineHeight: '14px',\n color: theme.palette.grey[500],\n },\n uploadingError: {\n paddingTop: '10px',\n },\n});\n\nconst getAnnotationActiveUntil = (value, initialPeriod) => {\n if (value === 'forever') return null;\n\n const period = ANNOTATION_ACTIVE_PERIODS[value];\n return moment(initialPeriod).add(period.time.amount, period.time.key).format();\n};\n\nconst AnnotationInput = ({\n initialText,\n initialPeriod,\n onSend,\n onClose,\n closeOnEsc,\n classes,\n initialAttachment,\n assetCompanyId,\n currentUser,\n}) => {\n const [annotationText, setAnnotationText] = useState(initialText);\n const [attachment, setAttachment] = useState(() =>\n initialAttachment\n ? {\n attachmentName: initialAttachment.file_name,\n attachmentUrl: initialAttachment.s3_link,\n }\n : null\n );\n const [uploadError, setUploadError] = useState(null);\n const [isShiftKeyDown, setIsShiftKeyDown] = useState(false);\n const [period, setPeriod] = useState(ANNOTATION_ACTIVE_PERIODS_KEYS[0]);\n\n useEscPress(() => {\n if (closeOnEsc) onClose();\n });\n\n const handleSend = () => {\n if (annotationText) {\n const formattedPeriod = getAnnotationActiveUntil(period, initialPeriod);\n onSend(annotationText, formattedPeriod, attachment);\n }\n };\n\n const handlePeriodChange = e => setPeriod(e.target.value);\n\n const handleKeyDown = e => {\n if (e.key === 'Shift') setIsShiftKeyDown(true);\n\n if (e.key === 'Enter' && !isShiftKeyDown && !isSuggestionsListOpened()) {\n e.preventDefault(); // NOTE: Don't add linebreak to the post\n handleSend();\n }\n };\n\n const handleKeyUp = e => {\n if (e.key === 'Shift') setIsShiftKeyDown(false);\n };\n\n const handleSelectEmoji = emoji => setAnnotationText(`${annotationText}${emoji.native}`);\n\n const handleAnnotationTextChange = text => setAnnotationText(text);\n\n const onFileUploaded = (attachmentUrl, attachmentName, attachmentSize) => {\n setAttachment({ attachmentUrl, attachmentName, attachmentSize });\n setUploadError(null);\n };\n\n const onUploadingError = error => {\n setAttachment(null);\n setUploadError(error);\n };\n\n const onAttachmentDelete = () => {\n setAttachment(null);\n setUploadError(null);\n };\n\n return (\n <div className={styles.cAnnotationInput}>\n <Paper className={styles.cAnnotationInputContent}>\n <Input\n data-testid={`${PAGE_NAME}_annotationsInput`}\n inputComponent={UserMention}\n inputProps={{\n withLightTheme: false,\n onChange: handleAnnotationTextChange,\n onKeyDown: handleKeyDown,\n onKeyUp: handleKeyUp,\n companyId: assetCompanyId,\n currentUser,\n }}\n placeholder={ANNOTATION_PLACEHOLDER}\n fullWidth\n disableUnderline\n multiline\n rows=\"3\"\n className={classes.inputRoot}\n value={annotationText}\n />\n <div className={styles.cAnnotationInputContentActions}>\n <Tooltip title=\"Attach File\" placement=\"bottom\">\n <div className={styles.cAnnotationInputContentActionsButton}>\n <FileUploadIconButton\n data-testid={`${PAGE_NAME}_attachFileButton`}\n openPreviewDialogOnUpload={false}\n disableRipple\n onFinish={onFileUploaded}\n onError={onUploadingError}\n htmlColor=\"action\"\n />\n </div>\n </Tooltip>\n <Tooltip title=\"Add Emoji\" placement=\"bottom\">\n <div className={styles.cAnnotationInputContentActionsButton}>\n <EmojiIconButton\n data-testid={`${PAGE_NAME}_emojiButton`}\n htmlColor={grey[400]}\n handleSelectEmoji={handleSelectEmoji}\n />\n </div>\n </Tooltip>\n </div>\n </Paper>\n {uploadError && (\n <FailedFileUploading className={classes.uploadingError} errorMessage={uploadError} />\n )}\n {attachment && attachment.attachmentUrl && (\n <FilePreview\n fileName={attachment.attachmentName}\n fileUrl={attachment.attachmentUrl}\n handleFileDelete={onAttachmentDelete}\n />\n )}\n <div className={styles.cAnnotationInputActions}>\n <FormControl className={classes.formControl}>\n <InputLabel shrink id=\"periods-label-label\" className={classes.selectLabel}>\n Active\n </InputLabel>\n <StyledSelect\n data-testid={`${PAGE_NAME}_periodDropdown`}\n labelId=\"periods-label-label\"\n id=\"periods-label\"\n value={period}\n disableUnderline\n onChange={handlePeriodChange}\n >\n {ANNOTATION_ACTIVE_PERIODS_KEYS.map(key => (\n <MenuItem\n data-testid={`${PAGE_NAME}_period_${ANNOTATION_ACTIVE_PERIODS[key].label}MenuItem`}\n key={key}\n value={key}\n >\n {ANNOTATION_ACTIVE_PERIODS[key].label}\n </MenuItem>\n ))}\n </StyledSelect>\n </FormControl>\n <div className={styles.cAnnotationInputActionsSend}>\n <Typography variant=\"caption\" className={classes.sendLabel}>\n Press \n <Typography\n variant=\"caption\"\n color=\"primary\"\n component=\"span\"\n className={classes.labelHighlighter}\n >\n Enter \n </Typography>\n to send \n </Typography>\n <Tooltip title=\"Send\" placement=\"bottom\">\n <div>\n {/* div to display label since button is disabled */}\n <IconButton\n data-testid={`${PAGE_NAME}_sendButton`}\n className={classes.sendButton}\n onClick={handleSend}\n disabled={!annotationText}\n >\n <SendIcon color=\"primary\" />\n </IconButton>\n </div>\n </Tooltip>\n </div>\n </div>\n </div>\n );\n};\n\nAnnotationInput.propTypes = {\n initialText: string,\n initialPeriod: string,\n initialAttachment: shape({\n file_name: string,\n s3_link: string,\n }),\n onSend: func,\n onClose: func,\n closeOnEsc: bool,\n assetCompanyId: number.isRequired,\n currentUser: shape().isRequired,\n\n classes: shape().isRequired,\n};\n\nAnnotationInput.defaultProps = {\n initialText: '',\n initialPeriod: undefined,\n initialAttachment: null,\n onSend: () => undefined,\n onClose: () => undefined,\n closeOnEsc: false,\n};\n\nexport default withStyles(muiStyles)(AnnotationInput);\n"],"names":["PAGE_NAME","ANNOTATION_ACTIVE_PERIODS_KEYS","Object","keys","ANNOTATION_ACTIVE_PERIODS","ANNOTATION_PLACEHOLDER","muiStyles","theme","inputLabel","color","palette","grey","fontWeight","width","inputRoot","lineHeight","sendLabel","display","alignItems","marginRight","fontSize","sendButton","padding","labelHighlighter","selectLabel","uploadingError","paddingTop","getAnnotationActiveUntil","value","initialPeriod","period","moment","add","time","amount","key","format","AnnotationInput","initialText","onSend","onClose","closeOnEsc","classes","initialAttachment","assetCompanyId","currentUser","useState","annotationText","setAnnotationText","attachmentName","file_name","attachmentUrl","s3_link","attachment","setAttachment","uploadError","setUploadError","isShiftKeyDown","setIsShiftKeyDown","setPeriod","useEscPress","handleSend","formattedPeriod","handlePeriodChange","e","target","handleKeyDown","isSuggestionsListOpened","preventDefault","handleKeyUp","handleSelectEmoji","emoji","native","handleAnnotationTextChange","text","onFileUploaded","attachmentSize","onUploadingError","error","onAttachmentDelete","_jsxs","styles","cAnnotationInput","cAnnotationInputContent","_jsx","UserMention","withLightTheme","onChange","onKeyDown","onKeyUp","companyId","cAnnotationInputContentActions","cAnnotationInputContentActionsButton","cAnnotationInputActions","formControl","map","label","cAnnotationInputActionsSend","propTypes","string","shape","func","bool","number","isRequired","defaultProps","undefined","withStyles"],"mappings":";;;;;;;;;;;;;;;;;;;;AAkCA,IAAMA,SAAS,GAAG,kBAAlB;AAEA,IAAMC,8BAA8B,GAAGC,MAAM,CAACC,IAAP,CAAYC,yBAAZ,CAAvC;AACA,IAAMC,sBAAsB,GAAG,sBAA/B;;AAEA,IAAMC,SAAS,GAAG,SAAZA,SAAY,CAAAC,KAAK;AAAA,SAAK;AAC1BC,IAAAA,UAAU,EAAE;AACVC,MAAAA,KAAK,EAAEF,K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iB,EAAEyD,KAAK,CAAC;AACvBlD,IAAAA,SAAS,EAAEiD,MADY;AAEvB/C,IAAAA,OAAO,EAAE+C;AAFc,GAAD,CAHE;AAO1B5D,EAAAA,MAAM,EAAE8D,IAPkB;AAQ1B7D,EAAAA,OAAO,EAAE6D,IARiB;AAS1B5D,EAAAA,UAAU,EAAE6D,IATc;AAU1B1D,EAAAA,cAAc,EAAE2D,MAAM,CAACC,UAVG;AAW1B3D,EAAAA,WAAW,EAAEuD,KAAK,GAAGI,UAXK;AAa1B9D,EAAAA,OAAO,EAAE0D,KAAK,GAAGI;AAbS,CAA5B;AAgBAnE,eAAe,CAACoE,YAAhB,GAA+B;AAC7BnE,EAAAA,WAAW,EAAE,EADgB;AAE7BT,EAAAA,aAAa,EAAE6E,SAFc;AAG7B/D,EAAAA,iBAAiB,EAAE,IAHU;AAI7BJ,EAAAA,MAAM,EAAE;AAAA,WAAMmE,SAAN;AAAA,GAJqB;AAK7BlE,EAAAA,OAAO,EAAE;AAAA,WAAMkE,SAAN;AAAA,GALoB;AAM7BjE,EAAAA,UAAU,EAAE;AANiB,CAA/B;AASA,wBAAekE,UAAU,CAACrG,SAAD,CAAV,CAAsB+B,eAAtB,CAAf;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,wBAAwB,gEAAqE;AAC7F;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/components/Annotations/components/AnnotationsList/index.js"],"sourcesContent":["import { memo, useState, useEffect, useRef } from 'react';\nimport { func, bool, shape, number, string } from 'prop-types';\nimport classNames from 'classnames';\nimport { withStyles } from '@material-ui/core/styles';\nimport { Paper, Typography, IconButton, Tooltip, RootRef } from '@material-ui/core';\nimport BackIcon from '@material-ui/icons/ChevronLeft';\n\nimport { showSuccessNotification } from '~/utils';\nimport { isNativeDetected } from '~/utils/mobileDetect';\nimport InfiniteList from '~components/InfiniteList';\nimport useOutsideClick from '~effects/useOutsideClick';\n\nimport AddAnnotationForm from './components/AddAnnotationForm';\nimport Annotation from './components/Annotation';\n\nimport { getAnnotations } from '../../../../clients/jsonApi';\nimport { useAnnotationsState, useAnnotationsDispatch } from '../../AnnotationsContext';\nimport { SET_ANNOTATIONS, APPEND_ANNOTATIONS } from '../../constants';\n\nimport styles from './style.css';\n\nconst PAGE_NAME = 'AppAnnotationsPo';\n\nconst muiStyles = theme => ({\n title: { fontWeight: 200, marginBottom: 20 },\n secondaryTitle: {\n fontWeight: 200,\n textTransform: 'uppercase',\n color: theme.palette.grey[600],\n },\n annotateIcon: {\n padding: 0,\n '&:hover': {\n backgroundColor: 'transparent',\n boxShadow: 'none',\n },\n },\n noAnnotations: { marginTop: 16 },\n backIcon: { cursor: 'pointer', color: theme.palette.grey[600], padding: 5 },\n});\n\nconst PER_PAGE = 4;\n\nconst AnnotationsList = ({\n appId,\n appTitle,\n assetId,\n assetCompanyId,\n appSettings,\n currentUser,\n onClose,\n isNative,\n classes,\n dashboardType,\n}) => {\n const { annotations } = useAnnotationsState();\n const dispatch = useAnnotationsDispatch();\n\n const rootRef = useRef();\n const footerRef = useRef();\n\n const infiniteContainerHeight = () => {\n if (rootRef.current && footerRef.current)\n return rootRef.current.clientHeight - footerRef.current.clientHeight;\n return null;\n };\n\n useOutsideClick(rootRef, onClose);\n\n const [isOpen, setIsOpen] = useState(false);\n const [isInfiniteLoading, setIsInfiniteLoading] = useState(true);\n const [moreItemsMayExist, setMoreItemsMayExist] = useState(true);\n const [page, setPage] = useState(1);\n\n async function handleFetchAnnotations() {\n if (!(appId && assetId)) return;\n setIsInfiniteLoading(true);\n\n let response;\n try {\n const options = {\n page,\n per_page: PER_PAGE,\n sort: 'created_at',\n order: 'desc',\n };\n if (dashboardType) options.dashboard_type = dashboardType;\n\n response = await getAnnotations(appId, assetId, options);\n dispatch({\n type: page === 1 ? SET_ANNOTATIONS : APPEND_ANNOTATIONS,\n annotations: response,\n });\n } catch (e) {\n console.error(e);\n }\n\n const lessThanPerPage = response && response.data.length < PER_PAGE;\n\n setPage(page + 1);\n setMoreItemsMayExist(!lessThanPerPage);\n setIsInfiniteLoading(false);\n }\n\n useEffect(() => {\n setIsOpen(true); // NOTE: Opens here because of for the sliding effect on open\n }, []); // eslint-disable-line react-hooks/exhaustive-deps\n\n return (\n <RootRef rootRef={rootRef}>\n <Paper\n className={classNames(styles.cAnnotationsList, {\n [styles.cAnnotationsListOpen]: isOpen,\n [styles.cAnnotationsListOpenNative]: isNative,\n })}\n >\n <InfiniteList\n infiniteClassName={styles.cAnnotationsListContentContainer}\n headerComponent={\n <>\n <Typography\n data-testid={`${PAGE_NAME}_appTitle`}\n variant=\"body1\"\n className={classes.title}\n >\n {appTitle}\n </Typography>\n\n <div className={styles.cAnnotationsListContentTop}>\n <Typography\n data-testid={`${PAGE_NAME}_annotationsTitle`}\n variant=\"caption\"\n className={classes.secondaryTitle}\n >\n Annotations ({annotations.data ? annotations.data.length : 0})\n </Typography>\n </div>\n\n <AddAnnotationForm\n appId={appId}\n assetId={assetId}\n assetCompanyId={assetCompanyId}\n appSettings={appSettings}\n currentUser={currentUser}\n dashboardType={dashboardType}\n />\n </>\n }\n useWindow={isNative}\n items={annotations.data || []}\n showNoItemsFound={\n (!annotations.data || annotations.data.length === 0) && !isInfiniteLoading\n }\n noItemsFoundLabel={\n <Typography\n variant=\"body2\"\n data-testid={`${PAGE_NAME}_noAnnotations`}\n className={classes.noAnnotations}\n >\n No Annotations yet\n </Typography>\n }\n threshold={50}\n infiniteContainerHeight={infiniteContainerHeight()}\n moreItemsMayExist={moreItemsMayExist}\n pathToCreatedAt={['attributes', 'created_at']}\n renderItem={item => (\n <Annotation\n key={item.id}\n isNative={isNative}\n annotation={item}\n assetCompanyId={assetCompanyId}\n included={annotations.included}\n currentUser={currentUser}\n showSuccessNotification={showSuccessNotification}\n />\n )}\n loadItems={handleFetchAnnotations}\n />\n <div className={styles.cAnnotationsListActions} ref={footerRef}>\n <Tooltip title=\"Hide\" placement=\"bottom\">\n <IconButton\n data-testid={`${PAGE_NAME}_hideButton`}\n onClick={onClose}\n className={classes.backIcon}\n >\n <BackIcon />\n </IconButton>\n </Tooltip>\n </div>\n </Paper>\n </RootRef>\n );\n};\n\nAnnotationsList.propTypes = {\n appId: number.isRequired,\n appTitle: string.isRequired,\n assetId: number.isRequired,\n assetCompanyId: number.isRequired,\n appSettings: shape(),\n classes: shape().isRequired,\n onClose: func.isRequired,\n currentUser: shape({}).isRequired,\n isNative: bool,\n dashboardType: string,\n};\n\nAnnotationsList.defaultProps = {\n appSettings: {},\n isNative: isNativeDetected,\n dashboardType: null,\n};\n\nexport default withStyles(muiStyles)(memo(AnnotationsList));\n"],"names":["PAGE_NAME","muiStyles","theme","title","fontWeight","marginBottom","secondaryTitle","textTransform","color","palette","grey","annotateIcon","padding","backgroundColor","boxShadow","noAnnotations","marginTop","backIcon","cursor","PER_PAGE","AnnotationsList","appId","appTitle","assetId","assetCompanyId","appSettings","currentUser","onClose","isNative","classes","dashboardType","useAnnotationsState","annotations","dispatch","useAnnotationsDispatch","rootRef","useRef","footerRef","infiniteContainerHeight","current","clientHeight","useOutsideClick","useState","isOpen","setIsOpen","isInfiniteLoading","setIsInfiniteLoading","moreItemsMayExist","setMoreItemsMayExist","page","setPage","handleFetchAnnotations","options","per_page","sort","order","dashboard_type","getAnnotations","response","type","SET_ANNOTATIONS","APPEND_ANNOTATIONS","console","error","lessThanPerPage","data","length","useEffect","_jsx","_jsxs","classNames","styles","cAnnotationsList","cAnnotationsListOpen","cAnnotationsListOpenNative","cAnnotationsListContentContainer","cAnnotationsListContentTop","item","included","showSuccessNotification","id","cAnnotationsListActions","propTypes","number","isRequired","string","shape","func","bool","defaultProps","isNativeDetected","withStyles","memo"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAqBA,IAAMA,SAAS,GAAG,kBAAlB;;AAEA,IAAMC,SAAS,GA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BAFmB;AAG7B5D,EAAAA,aAAa,EAAE;AAHc,CAA/B;AAMA,wBAAe6D,UAAU,CAAC1F,SAAD,CAAV,CAAsB2F,IAAI,CAACxE,eAAD,CAA1B,CAAf;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,wBAAwB,0DAA+D;AACvF;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/components/Annotations/components/LastAnnotation/index.js"],"sourcesContent":["import { memo, useMemo } from 'react';\nimport { shape, string, bool, arrayOf, func, number } from 'prop-types';\nimport classNames from 'classnames';\nimport { flowRight } from 'lodash';\nimport { withStyles } from '@material-ui/core/styles';\nimport withWidth, { isWidthUp } from '@material-ui/core/withWidth';\n\nimport Paper from '@material-ui/core/Paper';\nimport Typography from '@material-ui/core/Typography';\nimport CommentIcon from '@material-ui/icons/Comment';\nimport CloseButton from '@material-ui/icons/Close';\n\nimport UserCardPopover from '~components/UserCardPopover';\nimport Avatar from '~components/Avatar';\nimport { formatMentionText } from '~components/UserMention/utils';\n\nimport { isNativeDetected } from '~/utils/mobileDetect';\nimport { closeLastAnnotation } from '../../../../clients/jsonApi';\n\nimport styles from './style.css';\n\nconst PAGE_NAME = 'lastAnnotation';\n\nconst muiStyles = theme => ({\n container: {\n height: 56,\n margin: '10px 0',\n padding: '0 20px',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n flex: 'auto 1',\n width: '100%',\n cursor: 'pointer',\n },\n body: { margin: '0 16px ', minWidth: 100 },\n avatar: { border: '1px solid #909090' },\n commentIcon: { marginRight: 16, color: theme.palette.grey[500] },\n commentText: { marginRight: 16, color: theme.palette.grey[500] },\n closeButton: { color: theme.palette.grey[500] },\n avatarInList: { marginLeft: -4 },\n});\n\n/* eslint-disable react/prop-types */\nconst CreatorAvatar = ({ user, currentUser, isNative, className, size }) => {\n const children = (\n <Avatar\n displayName={`${user.first_name} ${user.last_name}`}\n imgSrc={user.profile_photo}\n size={size}\n className={className}\n />\n );\n\n if (isNative) return children;\n return (\n <UserCardPopover user={user} currentUser={currentUser}>\n {children}\n </UserCardPopover>\n );\n};\n\nconst Reactions = ({ commentsCount, commentUsers, isSmallScreen, isNative, currentUser, classes }) => {\n if (!commentsCount) return null;\n\n return (\n <div className={styles.cTopAnnotationAdditionalReactions}>\n <CommentIcon className={classes.commentIcon} />\n {!isSmallScreen && (\n <Typography\n variant=\"body2\"\n data-testid={`${PAGE_NAME}_comments`}\n noWrap\n className={classes.commentText}\n component=\"div\"\n >\n Comments {commentsCount}\n </Typography>\n )}\n\n <div className={styles.cTopAnnotationAdditionalReactionsList}>\n {commentUsers.map(({ attributes }, index) => (\n <CreatorAvatar\n key={attributes.id}\n user={attributes}\n currentUser={currentUser}\n isNative={isNative}\n className={classNames(classes.avatar, { [classes.avatarInList]: index !== 0 })}\n size={25}\n />\n ))}\n </div>\n </div>\n );\n};\n/* eslint-enable */\n\nconst LastAnnotation = ({\n isNative,\n appId,\n annotation,\n openAnnotationsList,\n currentUser,\n updateCurrentDashboardAppLastAnnotation: updateLastAnnotation,\n width,\n classes,\n}) => {\n const { data, included } = annotation;\n const creator = included.find(\n ({ id, type }) => id === data.relationships.user.data.id && type === 'user'\n );\n\n const mentionedUsers = useMemo(\n () =>\n data.relationships.mentioned_users.data.map(({ id: mentionedUserId }) =>\n included.find(({ id }) => id === mentionedUserId)\n ),\n [data.relationships.mentioned_users.data, included]\n );\n\n const commentUsers = useMemo(\n () =>\n data.relationships.comment_users.data.map(({ id: commentUserId }) =>\n included.find(({ id }) => id === commentUserId)\n ),\n [data.relationships.comment_users.data, included]\n );\n\n const isSmallScreen = !isWidthUp('sm', width);\n\n const handleCloseClick = async e => {\n e.stopPropagation();\n\n try {\n const response = await closeLastAnnotation(data.id);\n updateLastAnnotation(data.id, appId, response);\n } catch (error) {\n console.error(error);\n }\n };\n\n return (\n <Paper\n data-testid={`${PAGE_NAME}_lastAnnotation`}\n className={classes.container}\n onClick={openAnnotationsList}\n >\n <div className={styles.cTopAnnotationMain}>\n <CreatorAvatar\n user={creator.attributes}\n currentUser={currentUser}\n isNative={isNative}\n className={classes.avatar}\n size={38}\n />\n <Typography\n variant=\"body2\"\n data-testid={`${PAGE_NAME}_message`}\n noWrap\n className={classes.body}\n >\n {formatMentionText(data.attributes.body, mentionedUsers, isNative, null, currentUser)}\n </Typography>\n </div>\n <div className={styles.cTopAnnotationAdditional}>\n <Reactions\n commentsCount={data.attributes.comments_count}\n commentUsers={commentUsers}\n classes={classes}\n isSmallScreen={isSmallScreen}\n currentUser={currentUser}\n />\n <CloseButton\n data-testid={`${PAGE_NAME}_closeButton`}\n fontSize=\"small\"\n className={classes.closeButton}\n onClick={handleCloseClick}\n />\n </div>\n </Paper>\n );\n};\n\nLastAnnotation.propTypes = {\n appId: number.isRequired,\n annotation: shape({\n included: arrayOf(shape({})).isRequired,\n data: shape({\n relationships: shape({\n user: shape({ data: shape({ id: string.isRequired }).isRequired }).isRequired,\n mentioned_users: shape({ data: arrayOf(shape()).isRequired }).isRequired,\n }).isRequired,\n attributes: shape({ body: string.isRequired, created_at: string.isRequired }),\n }).isRequired,\n }).isRequired,\n classes: shape({}).isRequired,\n isNative: bool,\n width: string.isRequired,\n openAnnotationsList: func.isRequired,\n updateCurrentDashboardAppLastAnnotation: func,\n currentUser: shape({}),\n};\n\nLastAnnotation.defaultProps = {\n isNative: isNativeDetected,\n updateCurrentDashboardAppLastAnnotation: () => undefined,\n currentUser: {},\n};\n\nexport default flowRight([withStyles(muiStyles), withWidth()])(memo(LastAnnotation));\n"],"names":["PAGE_NAME","muiStyles","theme","container","height","margin","padding","display","alignItems","justifyContent","flex","width","cursor","body","minWidth","avatar","border","commentIcon","marginRight","color","palette","grey","commentText","closeButton","avatarInList","marginLeft","CreatorAvatar","user","currentUser","isNative","className","size","children","_jsx","first_name","last_name","profile_photo","Reactions","commentsCount","commentUsers","isSmallScreen","classes","_jsxs","styles","cTopAnnotationAdditionalReactions","cTopAnnotationAdditionalReactionsList","map","index","attributes","classNames","id","LastAnnotation","appId","annotation","openAnnotationsList","updateLastAnnotation","updateCurrentDashboardAppLastAnnotation","data","included","creator","find","type","relationships","mentionedUsers","useMemo","mentioned_users","mentionedUserId","comment_users","commentUserId","isWidthUp","handleCloseClick","e","stopPropagation","closeLastAnnotation","response","console","error","cTopAnnotationMain","formatMentionText","cTopAnnotationAdditional","comments_count","CloseButton","propTypes","number","isRequired","shape","arrayOf","string","created_at","bool","func","defaultProps","isNativeDetected","undefined","flowRight","withStyles","withWidth","memo"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAqBA,IAAMA,SAAS,GAAG,gBAAlB;;AAEA,IAAMC,SAAS,GAAG,SAAZA,SAAY,CAAAC,KAAK;AAAA,SAAK;AAC1BC,IAAAA,SAAS,EAAE;AACTC,MAAAA,MAAM,EAAE,EADC;AAETC,MAAAA,MAAM,EAAE,QAFC;AAGTC,MAAAA,OAAO,EAAE,QAHA;AAITC,MAAAA,OAAO,EAAE,MAJA;AAKTC,MAAAA,UAAU,EAAE,QALH;AAMTC,MAAAA,cAAc,EAAE,eANP;AAOTC,MAAAA,IAAI,EAAE,QAPG;AAQTC,MAAAA,KAAK,EAAE,MARE;AASTC,MAAAA,MAAM,EAAE;AATC,KADe;AAY1BC,IAAAA,IAAI,EAAE;AAAER,MAAAA,MAAM,EAAE,SAAV;AAAqBS,MAAAA,QAAQ,EAAE;AAA/B,KAZoB;AAa1BC,IAAAA,MAAM,EAAE;AAAEC,MAAAA,MAAM,EAAE;AAAV,KAbkB;AAc1BC,IAAAA,WAAW,EAAE;AAAEC,MAAAA,WAAW,EAAE,EAAf;AAAmBC,MAAAA,KAAK,EAAEjB,KAAK,CAACkB,OAAN,CAAcC,IAAd,CAAmB,GAAnB;AAA1B,KAda;AAe1BC,IAAAA,WAAW,EAAE;AAAEJ,MAAAA,WAAW,EAAE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ASTA,UAXsB;AAYzB3C,EAAAA,OAAO,EAAE4C,KAAK,CAAC,EAAD,CAAL,CAAUD,UAZM;AAazBvD,EAAAA,QAAQ,EAAE4D,IAbe;AAczB9E,EAAAA,KAAK,EAAE4E,MAAM,CAACH,UAdW;AAezB9B,EAAAA,mBAAmB,EAAEoC,IAAI,CAACN,UAfD;AAgBzB5B,EAAAA,uCAAuC,EAAEkC,IAhBhB;AAiBzB9D,EAAAA,WAAW,EAAEyD,KAAK,CAAC,EAAD;AAjBO,CAA3B;AAoBAlC,cAAc,CAACwC,YAAf,GAA8B;AAC5B9D,EAAAA,QAAQ,EAAE+D,gBADkB;AAE5BpC,EAAAA,uCAAuC,EAAE;AAAA,WAAMqC,SAAN;AAAA,GAFb;AAG5BjE,EAAAA,WAAW,EAAE;AAHe,CAA9B;AAMA,uBAAekE,SAAS,CAAC,CAACC,UAAU,CAAC9F,SAAD,CAAX,EAAwB+F,SAAS,EAAjC,CAAD,CAAT,CAAgDC,IAAI,CAAC9C,cAAD,CAApD,CAAf;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,wBAAwB,0DAA+D;AACvF;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../src/components/Annotations/constants.js"],"sourcesContent":["export const SET_ANNOTATIONS = 'SET_ANNOTATIONS';\nexport const APPEND_ANNOTATIONS = 'APPEND_ANNOTATIONS';\nexport const ADD_ANNOTATION = 'ADD_ANNOTATION';\nexport const DELETE_ANNOTATION = 'DELETE_ANNOTATION';\nexport const EDIT_ANNOTATION = 'EDIT_ANNOTATION';\n\nexport const ANNOTATION_ACTIVE_PERIODS = {\n '24h': { label: 'Next 24 hrs', time: { amount: 24, key: 'h' } },\n '12h': { label: 'Next 12 hrs', time: { amount: 12, key: 'h' } },\n '48h': { label: 'Next 48 hrs', time: { amount: 48, key: 'h' } },\n forever: { label: 'Forever' },\n};\n"],"names":["SET_ANNOTATIONS","APPEND_ANNOTATIONS","ADD_ANNOTATION","DELETE_ANNOTATION","EDIT_ANNOTATION","ANNOTATION_ACTIVE_PERIODS","label","time","amount","key","forever"],"mappings":"IAAaA,eAAe,GAAG;IAClBC,kBAAkB,GAAG;IACrBC,cAAc,GAAG;IACjBC,iBAAiB,GAAG;IACpBC,eAAe,GAAG;IAElBC,yBAAyB,GAAG;AACvC,SAAO;AAAEC,IAAAA,KAAK,EAAE,aAAT;AAAwBC,IAAAA,IAAI,EAAE;AAAEC,MAAAA,MAAM,EAAE,EAAV;AAAcC,MAAAA,GAAG,EAAE;AAAnB;AAA9B,GADgC;AAEvC,SAAO;AAAEH,IAAAA,KAAK,EAAE,aAAT;AAAwBC,IAAAA,IAAI,EAAE;AAAEC,MAAAA,MAAM,EAAE,EAAV;AAAcC,MAAAA,GAAG,EAAE;AAAnB;AAA9B,GAFgC;AAGvC,SAAO;AAAEH,IAAAA,KAAK,EAAE,aAAT;AAAwBC,IAAAA,IAAI,EAAE;AAAEC,MAAAA,MAAM,EAAE,EAAV;AAAcC,MAAAA,GAAG,EAAE;AAAnB;AAA9B,GAHgC;AAIvCC,EAAAA,OAAO,EAAE;AAAEJ,IAAAA,KAAK,EAAE;AAAT;AAJ8B;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"@babel/runtime/helpers/defineProperty";import{maxBy as e}from"lodash";import"@babel/runtime/helpers/toConsumableArray";import"../../constants/completion.js";import"../../constants/alerts.js";import t from"@babel/runtime/helpers/slicedToArray";import"../../constants/goals.js";import"../../constants/segment.js";import"../../constants/apps.js";import"../../constants/drillstring.js";import{PACKAGE_STATUSES as r}from"../../constants/appPackages.js";import"../../constants/notifications.js";import"../../constants/feed.js";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/asyncToGenerator";import"../../utils/mobileDetect.js";import"@babel/runtime/helpers/typeof";import"../../utils/index.js";import{jsx as o,jsxs as i}from"react/jsx-runtime";import{makeStyles as n,Grid as s,FormControl as p,InputLabel as a,Select as m,ListSubheader as l,MenuItem as d}from"@material-ui/core";import{useState as c,useMemo as j,useEffect as u}from"react";import"querystring";import"uuid/v1";import"../../clients/jsonApi/index.js";import"../../clients/subscriptions.js";import"uuid";import"@babel/runtime/helpers/objectWithoutProperties";import{string as C,func as v,shape as A}from"prop-types";import"classnames";import"../Modal/index.js";import"../IconMenu/index.js";import"../StyledMenuItem/index.js";import"../LoadingIndicator/LoadingIndicator.js";import"../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../DevCenter/DevCenterAppContainer/components/DcTooltipsCoordinatorProvider/DcTooltipsCoordinatorProvider.js";import"../Tooltip/MuiTooltipDcWrapper.js";import"../Avatar/index.js";import"../Annotations/AnnotationsContext.js";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"react-router";import"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import{isUserDeveloperAdmin as D}from"../../utils/user.js";import"../IconButton/index.js";import"../ConfirmationDialog.js";import"../Annotations/components/AnnotationsList/index.js";import"../Annotations/components/LastAnnotation/index.js";import"../PadModeSelect/PadModeSelect.js";import"../DevCenter/AppHeader/AppHeaderNew.js";import"../DevCenter/AppHeader/AppHeader.js";import"../DevCenter/AppSideBar/AppSideBar.js";import"../DevCenter/AppContext.js";import"../DevCenter/AppsDataProvider/AppsDataProvider.js";import"@material-ui/icons/Help";import"../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../EmptyView/EmptyAppView/EmptyAppView.js";import"../ErrorBoundary/ErrorBoundary.js";import"../Typography.js";import"../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../DevCenter/DevCenterAppContainer/components/DisabledSettingsMessage/DisabledSettingsMessage.js";import"slate";import"../SlateFormattedText/RenderElements.js";import"../SlateFormattedText/SlateFormattedText.js";import"../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../DevCenter/DevCenterAppContainer/components/HelpCenterDialog/HelpCenterDialog.js";import"../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../DevCenter/NavigationBar/NavigationBar.js";import"../DevCenter/SideBar/SideBar.js";import"../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../DevCenter/IsolatedDevCenterAppContainer/AppsGridDragHandle.js";import b from"../TruncatedText/index.js";import"../AssetEditor/SingleAssetEditor.js";import"../AssetEditor/AssetEditorAutocomplete.js";import"../AssetEditor/index.js";import g from"./effects/index.js";import"../CollapsableSidebar.js";import"../DateTimePicker/index.js";import"../DatePicker/index.js";import"../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../ColorPicker/ColorPicker.js";import"../ParameterCharts/AddEditTrack.js";import"../ParameterCharts/ParameterCharts.js";import"../ChartActionsList/ChartActionsList.js";import"../SettingEditors/ColorEditor/index.js";import"../SettingEditors/DropdownEditor/index.js";import"../SettingEditors/RadioEditor/index.js";import"../SwitchControl/index.js";import"../RangeSlider/RangeSlider.js";import"../Login/components/Login.js";import"../Login/components/PasswordField.js";import"../Login/components/Chip.js";import"../Login/components/StepFooter.js";import"../Login/components/StepContent.js";import"../Login/components/StepHeader.js";import"../Login/components/Step.js";import"../Login/components/OrDivider.js";import"../Login/components/HiddenEmailField.js";import"../Login/components/EmailField.js";import"../Breadcrumbs/index.js";import"../VirtualizedTable/index.js";import"../EmptyView/EmptyView.js";import"../Button/index.js";import"../MenuItem/index.js";import"../ContextMenuItem/index.js";import"../FolderMenuItem/index.js";import"../EditableItem/EditableItem/index.js";import"../EditableItem/EditableItemWithBadge/index.js";import"../Checkbox/index.js";import"../FolderMenuItemWithLinks/index.js";import"../TextField/index.js";import"../Chip/index.js";import"../Counter/index.js";import"../AnchorsList/AnchorsList.js";import"../Select/index.js";import"../CustomSelect/index.js";import"../Tabs/Tabs.js";import"../Tabs/Tab.js";import"../ResizableTable/ResizableTable.js";import"../Drillstring/BHASchematic.js";import"../Drillstring/BHAComponentIcon.js";import"../Drillstring/BHATable/index.js";import"../Drillstring/BHAComponentDetail/index.js";import"../Casing/CasingComponentIcon.js";import"../Casing/CasingTable/index.js";import"../WellSummary/WellSummaryItemLabel.js";import"../WellSummary/WellSummaryItemTitle.js";import"../WellSummary/WellSummaryItemValue.js";import"../WellSummary/ActivitySummaryChart.js";import"../WellSummary/FracWirelineTimeChart.js";import"../BICOffsetPickerDialog/index.js";import"../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../Notifications/Notifications.js";import"../TextLink/index.js";import"../Template/TemplatePopover/index.js";import"../PinnableFilters/PinnableFilters.js";import"../HeaderLayout/HeaderLayout.js";import"../PadOffsetsPicker/PadOffsetsPicker.js";import"../PadOffsetsPicker/OffsetAssetChip.js";import"../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../PadOffsetsPicker/StagesSelector.js";import"../Table/TableToolbar/TableToolbar.js";import"../PriceInput/PriceInput.js";import"../LabelsCounter/LabelsCounter.js";import"../Stepper/Step.js";import"../Stepper/StepsWrapper.js";import"../Stepper/Stepper.js";import"../Comment/CommentIcon/index.js";import"../FilesLoader/FilesLoader.js";import"../SearchInput/index.js";import"../StageDesignVActual/ComparisonHeader.js";import"../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../StageDesignVActual/ComparisonRow.js";import"../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../FeedItem/FeedItem.js";import"../KeyboardDateTimePicker.js";import"../PostInput/PostInput.js";import"../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../AddComment/Popover.js";import"../AddComment/Popup.js";var S=r,P=n({select:{width:250,margin:"8px 0"},menuListRoot:{maxWidth:580},group:{fontStyle:"italic",fontWeight:"bold",fontSize:"12px",color:"#999"}}),f=function(r){var n=r.value,C=r.onChange,v=r.appId,A=r.currentUser,f=P(),x=g(v,{status:[S.DRAFT,S.PUBLISHED]}),h=x.isLoading,I=x.packages,y=D(A),E=c(n),T=t(E,2),L=T[0],B=T[1],k=j((function(){var e={},t=[{label:"Stable Release - no stable version",value:"PROD",disabled:!0},{label:"Beta - no beta version",value:"BETA",disabled:!0}],r=[];return I.filter((function(e){return e.attributes.status!==S.FAILURE})).forEach((function(o){var i=o.attributes,n=i.version,s=i.package_code_version,p=i.notes,a=i.label,m=i.status,l="v".concat(s||n);if(a){var d="PROD"===a?t[0]:t[1];d.label="".concat("PROD"===a?"Stable Release":"Beta"," ").concat(l," ").concat(p?"- ".concat(p):""),d.disabled=!1,e[d.value]=o}else y&&(e[n]=o,r.push({label:"".concat(l," ").concat(p?"- ".concat(p):""),value:n,status:m}))})),{labeled:t,unlabeled:r,packageByValue:e}}),[I,y]),V=k.labeled,F=k.unlabeled,R=k.packageByValue,w=function(e){return C(e,R[e])};return u((function(){if(y&&!n){var t=V.find((function(e){return!e.disabled}))||e(F.filter((function(e){return"published"===e.status})),"value");B(null==t?void 0:t.value),w(null==t?void 0:t.value)}}),[V,F]),o(s,{children:i(p,{className:f.select,children:[o(a,{shrink:!(!n&&!L),htmlFor:"appVersion",children:"App Version"}),i(m,{"data-testid":"".concat("DC_versionSelect","_dropdown"),value:n||L,onChange:function(e){return w(e.target.value)},disabled:h,label:"App Version",inputProps:{name:"appVersion",id:"appVersion"},MenuProps:{MenuListProps:{classes:{root:f.menuListRoot}}},children:[y&&o(l,{className:f.group,children:"Labelled Versions (When selected always shows current Beta or Stable Release Versions)"}),V.map((function(e){var t=e.label,r=e.value,i=e.disabled;return o(d,{"data-testid":"".concat("DC_versionSelect","_option_").concat(t,"MenuItem"),value:r,disabled:i,children:t})})),y&&o(l,{className:f.group,children:"Other versions (App will always show selected version until version is deleted)"}),F.map((function(e){var t=e.label,r=e.value;return o(d,{"data-testid":"".concat("DC_versionSelect","_option_").concat(t,"MenuItem"),value:r,children:o(b,{children:t})})}))]})]})})};f.propTypes={value:C,onChange:v.isRequired,appId:C.isRequired,currentUser:A({}).isRequired},f.defaultProps={value:null};export default f;
|
|
1
|
+
import"@babel/runtime/helpers/defineProperty";import{maxBy as e}from"lodash";import"@babel/runtime/helpers/toConsumableArray";import"../../constants/completion.js";import"../../constants/alerts.js";import t from"@babel/runtime/helpers/slicedToArray";import"../../constants/goals.js";import"../../constants/segment.js";import"../../constants/apps.js";import"../../constants/drillstring.js";import{PACKAGE_STATUSES as r}from"../../constants/appPackages.js";import"../../constants/notifications.js";import"../../constants/feed.js";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/asyncToGenerator";import"../../utils/mobileDetect.js";import"@babel/runtime/helpers/typeof";import"../../utils/index.js";import{jsx as o,jsxs as i}from"react/jsx-runtime";import{makeStyles as n,Grid as s,FormControl as p,InputLabel as a,Select as m,ListSubheader as l,MenuItem as d}from"@material-ui/core";import{useState as c,useMemo as j,useEffect as u}from"react";import"querystring";import"uuid/v1";import"../../clients/jsonApi/index.js";import"../../clients/subscriptions.js";import"uuid";import"@babel/runtime/helpers/objectWithoutProperties";import{string as C,func as v,shape as A}from"prop-types";import"classnames";import"../Modal/index.js";import"../IconMenu/index.js";import"../StyledMenuItem/index.js";import"../LoadingIndicator/LoadingIndicator.js";import"../DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../DevCenter/DevCenterAppContainer/components/DcTooltipsCoordinatorProvider/DcTooltipsCoordinatorProvider.js";import"../Tooltip/MuiTooltipDcWrapper.js";import"../Avatar/index.js";import"../Annotations/AnnotationsContext.js";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"react-router";import"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import{isUserDeveloperAdmin as D}from"../../utils/user.js";import"../IconButton/index.js";import"../ConfirmationDialog.js";import"../Annotations/components/AnnotationsList/index.js";import"../Annotations/components/LastAnnotation/index.js";import"../PadModeSelect/PadModeSelect.js";import"../DevCenter/AppHeader/AppHeaderNew.js";import"../DevCenter/AppHeader/AppHeader.js";import"../DevCenter/AppSideBar/AppSideBar.js";import"../DevCenter/AppContext.js";import"../DevCenter/AppsDataProvider/AppsDataProvider.js";import"@material-ui/icons/Help";import"../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../EmptyView/EmptyAppView/EmptyAppView.js";import"../ErrorBoundary/ErrorBoundary.js";import"../Typography.js";import"../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../DevCenter/DevCenterAppContainer/components/DisabledSettingsMessage/DisabledSettingsMessage.js";import"slate";import"../SlateFormattedText/RenderElements.js";import"../SlateFormattedText/SlateFormattedText.js";import"../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../EmptyView/EmptyAppView/components/ErrorSubtitleWithIntercomLink.js";import"../DevCenter/DevCenterAppContainer/components/DevCenterAppView/components/ChooseAssetButton/index.js";import"../DevCenter/DevCenterAppContainer/components/HelpCenterDialog/HelpCenterDialog.js";import"../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../DevCenter/NavigationBar/NavigationBar.js";import"../DevCenter/SideBar/SideBar.js";import"../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../DevCenter/IsolatedDevCenterAppContainer/AppsGridDragHandle.js";import b from"../TruncatedText/index.js";import"../AssetEditor/SingleAssetEditor.js";import"../AssetEditor/AssetEditorAutocomplete.js";import"../AssetEditor/index.js";import g from"./effects/index.js";import"../CollapsableSidebar.js";import"../DateTimePicker/index.js";import"../DatePicker/index.js";import"../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../ColorPicker/ColorPicker.js";import"../ParameterCharts/AddEditTrack.js";import"../ParameterCharts/ParameterCharts.js";import"../ChartActionsList/ChartActionsList.js";import"../SettingEditors/ColorEditor/index.js";import"../SettingEditors/DropdownEditor/index.js";import"../SettingEditors/RadioEditor/index.js";import"../SwitchControl/index.js";import"../RangeSlider/RangeSlider.js";import"../Login/components/Login.js";import"../Login/components/PasswordField.js";import"../Login/components/Chip.js";import"../Login/components/StepFooter.js";import"../Login/components/StepContent.js";import"../Login/components/StepHeader.js";import"../Login/components/Step.js";import"../Login/components/OrDivider.js";import"../Login/components/HiddenEmailField.js";import"../Login/components/EmailField.js";import"../Breadcrumbs/index.js";import"../VirtualizedTable/index.js";import"../EmptyView/EmptyView.js";import"../Button/index.js";import"../MenuItem/index.js";import"../ContextMenuItem/index.js";import"../FolderMenuItem/index.js";import"../EditableItem/EditableItem/index.js";import"../EditableItem/EditableItemWithBadge/index.js";import"../Checkbox/index.js";import"../FolderMenuItemWithLinks/index.js";import"../TextField/index.js";import"../Chip/index.js";import"../Counter/index.js";import"../AnchorsList/AnchorsList.js";import"../Select/index.js";import"../CustomSelect/index.js";import"../Tabs/Tabs.js";import"../Tabs/Tab.js";import"../ResizableTable/ResizableTable.js";import"../Drillstring/BHASchematic.js";import"../Drillstring/BHAComponentIcon.js";import"../Drillstring/BHATable/index.js";import"../Drillstring/BHAComponentDetail/index.js";import"../Casing/CasingComponentIcon.js";import"../Casing/CasingTable/index.js";import"../WellSummary/WellSummaryItemLabel.js";import"../WellSummary/WellSummaryItemTitle.js";import"../WellSummary/WellSummaryItemValue.js";import"../WellSummary/ActivitySummaryChart.js";import"../WellSummary/FracWirelineTimeChart.js";import"../BICOffsetPickerDialog/index.js";import"../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../Notifications/Notifications.js";import"../TextLink/index.js";import"../Template/TemplatePopover/index.js";import"../PinnableFilters/PinnableFilters.js";import"../HeaderLayout/HeaderLayout.js";import"../PadOffsetsPicker/PadOffsetsPicker.js";import"../PadOffsetsPicker/OffsetAssetChip.js";import"../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../PadOffsetsPicker/StagesSelector.js";import"../Table/TableToolbar/TableToolbar.js";import"../PriceInput/PriceInput.js";import"../LabelsCounter/LabelsCounter.js";import"../Stepper/Step.js";import"../Stepper/StepsWrapper.js";import"../Stepper/Stepper.js";import"../Comment/CommentIcon/index.js";import"../FilesLoader/FilesLoader.js";import"../SearchInput/index.js";import"../StageDesignVActual/ComparisonHeader.js";import"../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../StageDesignVActual/ComparisonRow.js";import"../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../FeedItem/FeedItem.js";import"../KeyboardDateTimePicker.js";import"../PostInput/PostInput.js";import"../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../AddComment/Popover.js";import"../AddComment/Popup.js";import"../EmbeddedApp/DevCenterEmbeddedApp.js";import"../EmbeddedApp/EmbeddedApp.js";var S=r,P=n({select:{width:250,margin:"8px 0"},menuListRoot:{maxWidth:580},group:{fontStyle:"italic",fontWeight:"bold",fontSize:"12px",color:"#999"}}),f=function(r){var n=r.value,C=r.onChange,v=r.appId,A=r.currentUser,f=P(),x=g(v,{status:[S.DRAFT,S.PUBLISHED]}),h=x.isLoading,I=x.packages,E=D(A),y=c(n),T=t(y,2),L=T[0],B=T[1],k=j((function(){var e={},t=[{label:"Stable Release - no stable version",value:"PROD",disabled:!0},{label:"Beta - no beta version",value:"BETA",disabled:!0}],r=[];return I.filter((function(e){return e.attributes.status!==S.FAILURE})).forEach((function(o){var i=o.attributes,n=i.version,s=i.package_code_version,p=i.notes,a=i.label,m=i.status,l="v".concat(s||n);if(a){var d="PROD"===a?t[0]:t[1];d.label="".concat("PROD"===a?"Stable Release":"Beta"," ").concat(l," ").concat(p?"- ".concat(p):""),d.disabled=!1,e[d.value]=o}else E&&(e[n]=o,r.push({label:"".concat(l," ").concat(p?"- ".concat(p):""),value:n,status:m}))})),{labeled:t,unlabeled:r,packageByValue:e}}),[I,E]),V=k.labeled,F=k.unlabeled,R=k.packageByValue,w=function(e){return C(e,R[e])};return u((function(){if(E&&!n){var t=V.find((function(e){return!e.disabled}))||e(F.filter((function(e){return"published"===e.status})),"value");B(null==t?void 0:t.value),w(null==t?void 0:t.value)}}),[V,F]),o(s,{children:i(p,{className:f.select,children:[o(a,{shrink:!(!n&&!L),htmlFor:"appVersion",children:"App Version"}),i(m,{"data-testid":"".concat("DC_versionSelect","_dropdown"),value:n||L,onChange:function(e){return w(e.target.value)},disabled:h,label:"App Version",inputProps:{name:"appVersion",id:"appVersion"},MenuProps:{MenuListProps:{classes:{root:f.menuListRoot}}},children:[E&&o(l,{className:f.group,children:"Labelled Versions (When selected always shows current Beta or Stable Release Versions)"}),V.map((function(e){var t=e.label,r=e.value,i=e.disabled;return o(d,{"data-testid":"".concat("DC_versionSelect","_option_").concat(t,"MenuItem"),value:r,disabled:i,children:t})})),E&&o(l,{className:f.group,children:"Other versions (App will always show selected version until version is deleted)"}),F.map((function(e){var t=e.label,r=e.value;return o(d,{"data-testid":"".concat("DC_versionSelect","_option_").concat(t,"MenuItem"),value:r,children:o(b,{children:t})})}))]})]})})};f.propTypes={value:C,onChange:v.isRequired,appId:C.isRequired,currentUser:A({}).isRequired},f.defaultProps={value:null};export default f;
|