@corva/ui 3.70.0-3 → 3.70.0-5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs-bundle/components/AddComment/Popover.js +1 -1
- package/cjs-bundle/components/AddComment/Popover.js.map +1 -1
- package/cjs-bundle/components/AddComment/components/Content.js +1 -1
- package/cjs-bundle/components/AddComment/components/Content.js.map +1 -1
- package/cjs-bundle/components/AdvancedSlider/Handle.js +1 -1
- package/cjs-bundle/components/AdvancedSlider/Handle.js.map +1 -1
- package/cjs-bundle/components/AttachFileButton/AttachFileButton.js +1 -1
- package/cjs-bundle/components/Attachment/index.js +1 -1
- package/cjs-bundle/components/Attachment/index.js.map +1 -1
- package/cjs-bundle/components/AttachmentPreview/AttachmentPreview.js +1 -1
- package/cjs-bundle/components/AttachmentPreview/AttachmentPreview.scss.js +1 -1
- package/cjs-bundle/components/BICOffsetPickerDialog/index.js +1 -1
- package/cjs-bundle/components/BICOffsetPickerDialog/index.js.map +1 -1
- package/cjs-bundle/components/Breadcrumbs/index.js +1 -1
- package/cjs-bundle/components/Button/components/LiveButton/index.js +1 -1
- package/cjs-bundle/components/Button/index.js +1 -1
- package/cjs-bundle/components/Casing/CasingTableV2/components/CasingJoints/Editor.js +1 -1
- package/cjs-bundle/components/Casing/CasingTableV2/components/CasingJoints/Editor.js.map +1 -1
- package/cjs-bundle/components/Casing/CasingTableV2/components/Component.js +1 -1
- package/cjs-bundle/components/Casing/CasingTableV2/components/Component.js.map +1 -1
- package/cjs-bundle/components/Casing/CasingTableV2/components/DrillPipe/Editor.js +1 -1
- package/cjs-bundle/components/Casing/CasingTableV2/components/DrillPipe/Editor.js.map +1 -1
- package/cjs-bundle/components/Chart/components/AxisDropdown.js +1 -1
- package/cjs-bundle/components/Chart/components/AxisDropdown.js.map +1 -1
- package/cjs-bundle/components/Chart/components/ChartSelect.js +1 -1
- package/cjs-bundle/components/Chart/components/ChartSelect.js.map +1 -1
- package/cjs-bundle/components/Chart/components/buttons/ChartTypeButton.js +1 -1
- package/cjs-bundle/components/Chart/components/buttons/ChartTypeButton.js.map +1 -1
- package/cjs-bundle/components/Chart/components/buttons/DragToZoomButton.js +1 -1
- package/cjs-bundle/components/Chart/components/buttons/DragToZoomButton.js.map +1 -1
- package/cjs-bundle/components/Chart/components/buttons/HideAxesButton.js +1 -1
- package/cjs-bundle/components/Chart/components/buttons/HideAxesButton.js.map +1 -1
- package/cjs-bundle/components/Chart/components/buttons/PanButton.js +1 -1
- package/cjs-bundle/components/Chart/components/buttons/PanButton.js.map +1 -1
- package/cjs-bundle/components/Chart/components/buttons/ResetZoomButton.js +1 -1
- package/cjs-bundle/components/Chart/components/buttons/ResetZoomButton.js.map +1 -1
- package/cjs-bundle/components/Chart/components/buttons/ZoomInButton.js +1 -1
- package/cjs-bundle/components/Chart/components/buttons/ZoomInButton.js.map +1 -1
- package/cjs-bundle/components/Chart/components/buttons/ZoomOutButton.js +1 -1
- package/cjs-bundle/components/Chart/components/buttons/ZoomOutButton.js.map +1 -1
- package/cjs-bundle/components/Chip/index.js +1 -1
- package/cjs-bundle/components/CollapsableSidebar.js +1 -1
- package/cjs-bundle/components/CollapsableSidebar.js.map +1 -1
- package/cjs-bundle/components/ColorPicker/ColorPicker.js +1 -1
- package/cjs-bundle/components/ColorPicker/PaletteChromePicker/PaletteChromePicker.js +1 -1
- package/cjs-bundle/components/CommentCard/CommentCard.js +1 -1
- package/cjs-bundle/components/CommentCard/CommentCardReactions.js +1 -1
- package/cjs-bundle/components/CommentCard/CommentCardReplies.js +1 -1
- package/cjs-bundle/components/CommentCard/buildCommentReply.js +1 -1
- package/cjs-bundle/components/CommentComposer/ChatChannelSelector.js +1 -1
- package/cjs-bundle/components/CommentComposer/CommentComposer.js +1 -1
- package/cjs-bundle/components/CommentInputNext/CommentInputNext.js +1 -1
- package/cjs-bundle/components/CopyToClipboard/CopyToClipboard.js +1 -1
- package/cjs-bundle/components/Counter/index.js +1 -1
- package/cjs-bundle/components/DatePicker/index.js +1 -1
- package/cjs-bundle/components/DateTimePicker/index.js +1 -1
- package/cjs-bundle/components/DevCenter/AppFilterPanelLayout/AppFilterPanelLayout.js +1 -1
- package/cjs-bundle/components/DevCenter/AppSettingsPopover/AppSettingsPopover.js +1 -1
- package/cjs-bundle/components/DevCenter/AppSideBar/AppSideBar.js +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js.map +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js.map +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/components/RemoveAppButton.js +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/components/RemoveAppButton.js.map +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.js +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.js +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.js.map +1 -1
- package/cjs-bundle/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js +1 -1
- package/cjs-bundle/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js.map +1 -1
- package/cjs-bundle/components/DocumentViewer/DocumentViewer.js +1 -1
- package/cjs-bundle/components/DocumentViewer/DocumentViewer.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Component.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Component.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js.map +1 -1
- package/cjs-bundle/components/EChartsWrapper/components/Toolbox/Toolbox.js +1 -1
- package/cjs-bundle/components/ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js +1 -1
- package/cjs-bundle/components/ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js.map +1 -1
- package/cjs-bundle/components/FeedCard/useFeedActivity.js +1 -1
- package/cjs-bundle/components/FeedItem/FeedItem.js +1 -1
- package/cjs-bundle/components/FeedItem/FeedItem.js.map +1 -1
- package/cjs-bundle/components/FeedItem/components/FeedComments.js +1 -1
- package/cjs-bundle/components/FeedItem/components/FeedComments.js.map +1 -1
- package/cjs-bundle/components/FilesDropzone/FilesDropzone.js +1 -1
- package/cjs-bundle/components/FilesLoader/FilesLoader.js +1 -1
- package/cjs-bundle/components/FilesLoaderV2/FilesLoaderV2.js +1 -1
- package/cjs-bundle/components/Formula/CloseSuggestion.js +1 -1
- package/cjs-bundle/components/Formula/CloseSuggestion.js.map +1 -1
- package/cjs-bundle/components/Formula/Formula.js +1 -1
- package/cjs-bundle/components/GradientManager/GradientManager.js +1 -1
- package/cjs-bundle/components/GradientManager/GradientSelect.js +1 -1
- package/cjs-bundle/components/GradientPicker/GradientPicker.js +1 -1
- package/cjs-bundle/components/HelpCenter/HelpCenterIcon.js +1 -1
- package/cjs-bundle/components/HelpCenter/HelpCenterIcon.js.map +1 -1
- package/cjs-bundle/components/Hint/Hint.js +1 -1
- package/cjs-bundle/components/Modal/CorvaModal.js +1 -1
- package/cjs-bundle/components/NewCommentCursor/NewCommentCursor.js +1 -1
- package/cjs-bundle/components/NewCommentCursor/NewCommentCursor.scss.js +1 -1
- package/cjs-bundle/components/Notifications/Toast.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/index.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/index.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/index.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/index.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/WellHubView/index.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/WellHubView/index.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/AppHeader/components/HeaderActions/HeaderActions.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/AppHeader/components/LoadAllWellsToggle/LoadAllWellsToggle.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/CustomInfoIcon/CustomInfoIcon.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/Filter.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/PeriodFilterSelect/PeriodFilterSelect.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/SingleFilterSelect/SingleFilterSelect.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/ClusterTooltip/ClusterTooltip.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/LayerSwitcher/LayerSwitcher.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapControls/MapControls.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapHints/MapHintsStash.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/SelectionToast/SelectionToast.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/SubjectWellMarker/SubjectWellMarker.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/WellTooltip/WellTooltip.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/AdvancedSearch.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AssetResultSection/AssetResultSection.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AutoCompleteAssetSearch/AutoCompleteAssetSearch.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/CompanyCell/CompanyCell.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/FormationCell/FormationCell.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/InterventionAssetCell/InterventionAssetCell.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/PadNameCell/PadNameCell.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/RigCell/RigCell.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/WellNameCell/WellNameCell.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/SettingsMenu.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/MetricsSettingsSection/MetricsSettingsSection.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/SettingsAccordion/SettingsAccordion.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/TableSettingsSection/TableSettingsSection.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/WellNameHeaderCell/WellNameHeaderCell.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/PickerModalActions/PickerModalActions.js +1 -1
- package/cjs-bundle/components/PadModeSelect/FracModeLabel.js +1 -1
- package/cjs-bundle/components/PadModeSelect/PadModeSelect.js +1 -1
- package/cjs-bundle/components/PadOffsetsPicker/StagesSelector.js +1 -1
- package/cjs-bundle/components/PadOffsetsPicker/StagesSelector.js.map +1 -1
- package/cjs-bundle/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js +1 -1
- package/cjs-bundle/components/ParameterCharts/components/TraceHeader.js +1 -1
- package/cjs-bundle/components/ParameterCharts/components/TraceHeader.js.map +1 -1
- package/cjs-bundle/components/PinnableFilters/components/FiltersToggler.js +1 -1
- package/cjs-bundle/components/PinnableFilters/components/FiltersToggler.js.map +1 -1
- package/cjs-bundle/components/Popover/Popover.js +1 -1
- package/cjs-bundle/components/Popper/Popper.js +1 -1
- package/cjs-bundle/components/RealTimeValuesSidebar/RealTimeValuesBox/RealTimeBoxEditDialog.js +1 -1
- package/cjs-bundle/components/RealTimeValuesSidebar/SidebarFooter.js +1 -1
- package/cjs-bundle/components/Search/Search.js +1 -1
- package/cjs-bundle/components/Select/SelectFilterBy.js +1 -1
- package/cjs-bundle/components/SettingEditors/ColorEditor/index.js +1 -1
- package/cjs-bundle/components/Stepper/Step/Step.js +1 -1
- package/cjs-bundle/components/Table/TableCell/TableCell.js +1 -1
- package/cjs-bundle/components/Table/TablePaginationActions/TablePaginationActions.js +1 -1
- package/cjs-bundle/components/Table/TableSortLabel/TableSortLabel.js +1 -1
- package/cjs-bundle/components/Toaster/Toaster.js +1 -1
- package/cjs-bundle/componentsV2/Accordion/Accordion.js +1 -1
- package/cjs-bundle/componentsV2/AppDqPopover/DqAlertTooltip/DqAlertTooltip.js +1 -1
- package/cjs-bundle/componentsV2/AppDqPopover/DqAsset/DqAsset.js +1 -1
- package/cjs-bundle/componentsV2/AppFooter/DqPopover/DqStatusIcon/DqStatusIcon.js +1 -1
- package/cjs-bundle/componentsV2/AppFooter/Warning.js +1 -1
- package/cjs-bundle/componentsV2/AppHeader/AppAssets/utils.js +1 -1
- package/cjs-bundle/componentsV2/AppHeader/V3/Actions/Actions.js +1 -1
- package/cjs-bundle/componentsV2/AppHeader/V3/AppTitle/AppTitle.js +1 -1
- package/cjs-bundle/componentsV2/AppHeader/V3/AssetSelector/AssetSelectorChip/AssetSelectorChip.js +1 -1
- package/cjs-bundle/componentsV2/AppHeader/V3/AssetSelector/AssetSelectorSelect/AssetSelectorContent.js +1 -1
- package/cjs-bundle/componentsV2/AppHeader/V3/AssetSelector/constants.js +1 -1
- package/cjs-bundle/componentsV2/AppHeader/V3/DqStatusIcon/DqStatusIcon.js +1 -1
- package/cjs-bundle/componentsV2/AppHeader/V3/SettingsButton/SettingsButton.js +1 -1
- package/cjs-bundle/componentsV2/AppHeader/V3/VersionSelect/VersionSelect.js +1 -1
- package/cjs-bundle/componentsV2/AppSettings/AppSettings.js +1 -1
- package/cjs-bundle/componentsV2/Autocomplete/Autocomplete.js +1 -1
- package/cjs-bundle/componentsV2/Breadcrumbs/Breadcrumbs.js +1 -1
- package/cjs-bundle/componentsV2/ButtonLive/ButtonLive.js +1 -1
- package/cjs-bundle/componentsV2/Chip/Chip.js +1 -1
- package/cjs-bundle/componentsV2/Chip/Chip.scss.js +1 -1
- package/cjs-bundle/componentsV2/ColorPicker/ColorPicker.js +1 -1
- package/cjs-bundle/componentsV2/ColorPicker/Swatches/Swatches.js +1 -1
- package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/AssetSearchInput/AssetSearchInput.js +1 -1
- package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/CompletionsOffsetWellPicker.js +1 -1
- package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/Map/Map.js +1 -1
- package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/ModalTitle/ModalTitle.js +1 -1
- package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/PadsTable/PadsTable.js +1 -1
- package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/PadsTable/helpers/columns.js +1 -1
- package/cjs-bundle/componentsV2/CopyToClipboard/CopyToClipboard.js +1 -1
- package/cjs-bundle/componentsV2/Counter/Counter.js +1 -1
- package/cjs-bundle/componentsV2/DatePicker/CalendarControls/CalendarControls.js +1 -1
- package/cjs-bundle/componentsV2/DatePicker/Input/Input.js +1 -1
- package/cjs-bundle/componentsV2/DragHandle/DragHandle.js +1 -1
- package/cjs-bundle/componentsV2/FilesDropzone/FilesDropzone.js +1 -1
- package/cjs-bundle/componentsV2/FilesLoader/FilesLoader.js +1 -1
- package/cjs-bundle/componentsV2/Hint/Hint.js +1 -1
- package/cjs-bundle/componentsV2/ImageViewer/ImageViewer.js +1 -1
- package/cjs-bundle/componentsV2/ModalWindow/ModalWindow.js +1 -1
- package/cjs-bundle/componentsV2/OffsetWellsButton/OffsetWellsButton.js +1 -1
- package/cjs-bundle/componentsV2/OffsetWellsButton/useOffsetWellsIcon.js +1 -1
- package/cjs-bundle/componentsV2/PadModeSelect/FracModeLabel/FracModeLabel.js +1 -1
- package/cjs-bundle/componentsV2/PadModeSelect/PadModeSelect.js +1 -1
- package/cjs-bundle/componentsV2/PopoverPanel/PopoverPanelHeader/PopoverPanelHeader.js +1 -1
- package/cjs-bundle/componentsV2/SliderAdvanced/Bar.js +2 -0
- package/cjs-bundle/componentsV2/SliderAdvanced/Bar.js.map +1 -0
- package/cjs-bundle/componentsV2/SliderAdvanced/HandleWrapper.js +2 -0
- package/cjs-bundle/componentsV2/SliderAdvanced/HandleWrapper.js.map +1 -0
- package/cjs-bundle/componentsV2/SliderAdvanced/SliderAdvanced.js +2 -0
- package/cjs-bundle/componentsV2/SliderAdvanced/SliderAdvanced.js.map +1 -0
- package/cjs-bundle/componentsV2/SliderAdvanced/SliderAdvanced.scss.js +2 -0
- package/cjs-bundle/componentsV2/SliderAdvanced/SliderAdvanced.scss.js.map +1 -0
- package/cjs-bundle/componentsV2/SliderAdvanced/handles/HandleEditable.js +2 -0
- package/cjs-bundle/componentsV2/SliderAdvanced/handles/HandleEditable.js.map +1 -0
- package/cjs-bundle/componentsV2/SliderAdvanced/handles/HandleMinimal.js +2 -0
- package/cjs-bundle/componentsV2/SliderAdvanced/handles/HandleMinimal.js.map +1 -0
- package/cjs-bundle/componentsV2/SliderAdvanced/handles/HandleReadonly.js +2 -0
- package/cjs-bundle/componentsV2/SliderAdvanced/handles/HandleReadonly.js.map +1 -0
- package/cjs-bundle/componentsV2/SliderAdvanced/handles/Handles.scss.js +2 -0
- package/cjs-bundle/componentsV2/SliderAdvanced/handles/Handles.scss.js.map +1 -0
- package/cjs-bundle/componentsV2/SliderAdvanced/utils.js +2 -0
- package/cjs-bundle/componentsV2/SliderAdvanced/utils.js.map +1 -0
- package/cjs-bundle/componentsV2/Stepper/Step/Step.js +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/FolderMenu/FolderMenu.js +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/MoveToFolderMenu/MoveToFolderMenu.js +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/Popover/Popover.js +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/PopoverFooter/PopoverFooter.js +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/PopoverSearch/PopoverSearch.js +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/ShareModal/ShareModal.js +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/TemplateMenu/IconMenu/IconMenu.js +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/TemplatesTreeMenuHeader/TemplatesTreeMenuHeader.js +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/TemplatesTreeNodeItem/TemplatesTreeNodeItem.js +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/Toggle/Toggle.js +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/templateMenuItems/CopyTemplate.js +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/templateMenuItems/ExportTemplate.js +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/templateMenuItems/MoveTemplateOutOfFolder.js +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/templateMenuItems/MoveTemplateToFolder.js +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/templateMenuItems/RemoveTemplate.js +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/templateMenuItems/RevertTemplate.js +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/templateMenuItems/ShareTemplate.js +1 -1
- package/cjs-bundle/componentsV2/TemplatesControl/templateMenuItems/UnfollowTemplate.js +1 -1
- package/cjs-bundle/componentsV2/TextInput/TextInput.js +1 -1
- package/cjs-bundle/componentsV2/TextInputNext/TextInputNext.js +1 -1
- package/cjs-bundle/componentsV2/TextInputNext/components/InfoIcon.js +1 -1
- package/cjs-bundle/componentsV2/WellArchivedMessage/WellArchivedMessage.js +1 -1
- package/cjs-bundle/componentsV2/index.js +1 -1
- package/cjs-bundle/config/theme/index.js +1 -1
- package/cjs-bundle/config/theme/index.js.map +1 -1
- package/cjs-bundle/icons/customIcons/icons/DragOne.js +2 -0
- package/cjs-bundle/icons/customIcons/icons/DragOne.js.map +1 -0
- package/cjs-bundle/icons/index.js +1 -1
- package/cjs-bundle/testing/AppTestWrapper/AppTestWrapper.js +1 -1
- package/components/AddComment/Popover.js +1 -1
- package/components/AddComment/Popover.js.map +1 -1
- package/components/AddComment/components/Content.js +1 -1
- package/components/AddComment/components/Content.js.map +1 -1
- package/components/AdvancedSlider/Handle.js +1 -1
- package/components/AdvancedSlider/Handle.js.map +1 -1
- package/components/AdvancedSlider/styles/handleStyles.d.ts +1 -1
- package/components/AdvancedSlider/styles/sliderStyles.d.ts +1 -1
- package/components/AttachFileButton/AttachFileButton.js +1 -1
- package/components/Attachment/index.js +1 -1
- package/components/Attachment/index.js.map +1 -1
- package/components/AttachmentPreview/AttachmentPreview.d.ts.map +1 -1
- package/components/AttachmentPreview/AttachmentPreview.js +1 -1
- package/components/AttachmentPreview/AttachmentPreview.scss.js +1 -1
- package/components/BICOffsetPickerDialog/index.js +1 -1
- package/components/BICOffsetPickerDialog/index.js.map +1 -1
- package/components/Breadcrumbs/index.js +1 -1
- package/components/Button/components/LiveButton/index.js +1 -1
- package/components/Button/index.js +1 -1
- package/components/Casing/CasingTableV2/components/CasingJoints/Editor.js +1 -1
- package/components/Casing/CasingTableV2/components/CasingJoints/Editor.js.map +1 -1
- package/components/Casing/CasingTableV2/components/Component.js +1 -1
- package/components/Casing/CasingTableV2/components/Component.js.map +1 -1
- package/components/Casing/CasingTableV2/components/DrillPipe/Editor.js +1 -1
- package/components/Casing/CasingTableV2/components/DrillPipe/Editor.js.map +1 -1
- package/components/Chart/components/AxisDropdown.js +1 -1
- package/components/Chart/components/AxisDropdown.js.map +1 -1
- package/components/Chart/components/ChartSelect.js +1 -1
- package/components/Chart/components/ChartSelect.js.map +1 -1
- package/components/Chart/components/buttons/ChartTypeButton.js +1 -1
- package/components/Chart/components/buttons/ChartTypeButton.js.map +1 -1
- package/components/Chart/components/buttons/DragToZoomButton.js +1 -1
- package/components/Chart/components/buttons/DragToZoomButton.js.map +1 -1
- package/components/Chart/components/buttons/HideAxesButton.js +1 -1
- package/components/Chart/components/buttons/HideAxesButton.js.map +1 -1
- package/components/Chart/components/buttons/PanButton.js +1 -1
- package/components/Chart/components/buttons/PanButton.js.map +1 -1
- package/components/Chart/components/buttons/ResetZoomButton.js +1 -1
- package/components/Chart/components/buttons/ResetZoomButton.js.map +1 -1
- package/components/Chart/components/buttons/ZoomInButton.js +1 -1
- package/components/Chart/components/buttons/ZoomInButton.js.map +1 -1
- package/components/Chart/components/buttons/ZoomOutButton.js +1 -1
- package/components/Chart/components/buttons/ZoomOutButton.js.map +1 -1
- package/components/Chip/index.js +1 -1
- package/components/CollapsableSidebar.js +1 -1
- package/components/CollapsableSidebar.js.map +1 -1
- package/components/ColorPicker/ColorPicker.js +1 -1
- package/components/ColorPicker/PaletteChromePicker/PaletteChromePicker.js +1 -1
- package/components/CommentCard/CommentCard.js +1 -1
- package/components/CommentCard/CommentCardReactions.js +1 -1
- package/components/CommentCard/CommentCardReplies.js +1 -1
- package/components/CommentCard/buildCommentReply.js +1 -1
- package/components/CommentComposer/ChatChannelSelector.js +1 -1
- package/components/CommentComposer/CommentComposer.js +1 -1
- package/components/CommentInputNext/CommentInputNext.js +1 -1
- package/components/CopyToClipboard/CopyToClipboard.js +1 -1
- package/components/Counter/index.js +1 -1
- package/components/DatePicker/index.js +1 -1
- package/components/DateTimePicker/index.js +1 -1
- package/components/DevCenter/AppFilterPanelLayout/AppFilterPanelLayout.js +1 -1
- package/components/DevCenter/AppSettingsPopover/AppSettingsPopover.js +1 -1
- package/components/DevCenter/AppSideBar/AppSideBar.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js.map +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js.map +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/components/RemoveAppButton.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/components/RemoveAppButton.js.map +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.js.map +1 -1
- package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js +1 -1
- package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js.map +1 -1
- package/components/DocumentViewer/DocumentViewer.js +1 -1
- package/components/DocumentViewer/DocumentViewer.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Component.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Component.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js.map +1 -1
- package/components/EChartsWrapper/components/Toolbox/Toolbox.js +1 -1
- package/components/ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js +1 -1
- package/components/ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js.map +1 -1
- package/components/FeedCard/useFeedActivity.js +1 -1
- package/components/FeedItem/FeedItem.js +1 -1
- package/components/FeedItem/FeedItem.js.map +1 -1
- package/components/FeedItem/components/FeedComments.js +1 -1
- package/components/FeedItem/components/FeedComments.js.map +1 -1
- package/components/FilesDropzone/FilesDropzone.js +1 -1
- package/components/FilesLoader/FilesLoader.js +1 -1
- package/components/FilesLoaderV2/FilesLoaderV2.js +1 -1
- package/components/Formula/CloseSuggestion.js +1 -1
- package/components/Formula/CloseSuggestion.js.map +1 -1
- package/components/Formula/Formula.js +1 -1
- package/components/GradientManager/GradientManager.js +1 -1
- package/components/GradientManager/GradientSelect.js +1 -1
- package/components/GradientPicker/GradientPicker.js +1 -1
- package/components/HelpCenter/HelpCenterIcon.js +1 -1
- package/components/HelpCenter/HelpCenterIcon.js.map +1 -1
- package/components/Hint/Hint.js +1 -1
- package/components/Modal/CorvaModal.js +1 -1
- package/components/NewCommentCursor/NewCommentCursor.d.ts.map +1 -1
- package/components/NewCommentCursor/NewCommentCursor.js +1 -1
- package/components/NewCommentCursor/NewCommentCursor.scss.js +1 -1
- package/components/Notifications/Toast.js +1 -1
- package/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js +1 -1
- package/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js.map +1 -1
- package/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js +1 -1
- package/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js.map +1 -1
- package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js +1 -1
- package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js.map +1 -1
- package/components/OffsetWellPickerV3/components/CustomSelectionView/index.js +1 -1
- package/components/OffsetWellPickerV3/components/CustomSelectionView/index.js.map +1 -1
- package/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js +1 -1
- package/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js.map +1 -1
- package/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js +1 -1
- package/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js.map +1 -1
- package/components/OffsetWellPickerV3/components/TabSelection/index.js +1 -1
- package/components/OffsetWellPickerV3/components/TabSelection/index.js.map +1 -1
- package/components/OffsetWellPickerV3/components/WellHubView/index.js +1 -1
- package/components/OffsetWellPickerV3/components/WellHubView/index.js.map +1 -1
- package/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js +1 -1
- package/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js.map +1 -1
- package/components/OffsetWellPickerV5/components/AppHeader/components/HeaderActions/HeaderActions.js +1 -1
- package/components/OffsetWellPickerV5/components/AppHeader/components/LoadAllWellsToggle/LoadAllWellsToggle.js +1 -1
- package/components/OffsetWellPickerV5/components/CustomInfoIcon/CustomInfoIcon.js +1 -1
- package/components/OffsetWellPickerV5/components/Filter/Filter.js +1 -1
- package/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js +1 -1
- package/components/OffsetWellPickerV5/components/Filter/components/PeriodFilterSelect/PeriodFilterSelect.js +1 -1
- package/components/OffsetWellPickerV5/components/Filter/components/SingleFilterSelect/SingleFilterSelect.js +1 -1
- package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/ClusterTooltip/ClusterTooltip.js +1 -1
- package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/LayerSwitcher/LayerSwitcher.js +1 -1
- package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapControls/MapControls.js +1 -1
- package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapHints/MapHintsStash.js +1 -1
- package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/SelectionToast/SelectionToast.js +1 -1
- package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/SubjectWellMarker/SubjectWellMarker.js +1 -1
- package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/WellTooltip/WellTooltip.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/AdvancedSearch.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AssetResultSection/AssetResultSection.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AutoCompleteAssetSearch/AutoCompleteAssetSearch.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/CompanyCell/CompanyCell.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/FormationCell/FormationCell.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/InterventionAssetCell/InterventionAssetCell.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/PadNameCell/PadNameCell.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/RigCell/RigCell.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/WellNameCell/WellNameCell.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/SettingsMenu.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/MetricsSettingsSection/MetricsSettingsSection.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/SettingsAccordion/SettingsAccordion.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/TableSettingsSection/TableSettingsSection.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/WellNameHeaderCell/WellNameHeaderCell.js +1 -1
- package/components/OffsetWellPickerV5/components/PickerModalActions/PickerModalActions.js +1 -1
- package/components/PadModeSelect/FracModeLabel.js +1 -1
- package/components/PadModeSelect/PadModeSelect.js +1 -1
- package/components/PadOffsetsPicker/StagesSelector.js +1 -1
- package/components/PadOffsetsPicker/StagesSelector.js.map +1 -1
- package/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js +1 -1
- package/components/ParameterCharts/components/TraceHeader.js +1 -1
- package/components/ParameterCharts/components/TraceHeader.js.map +1 -1
- package/components/PinnableFilters/components/FiltersToggler.js +1 -1
- package/components/PinnableFilters/components/FiltersToggler.js.map +1 -1
- package/components/Popover/Popover.js +1 -1
- package/components/Popper/Popper.js +1 -1
- package/components/RealTimeValuesSidebar/RealTimeValuesBox/RealTimeBoxEditDialog.js +1 -1
- package/components/RealTimeValuesSidebar/SidebarFooter.js +1 -1
- package/components/Search/Search.js +1 -1
- package/components/Select/SelectFilterBy.js +1 -1
- package/components/SettingEditors/ColorEditor/index.js +1 -1
- package/components/Stepper/Step/Step.js +1 -1
- package/components/Table/TableCell/TableCell.js +1 -1
- package/components/Table/TablePaginationActions/TablePaginationActions.js +1 -1
- package/components/Table/TableSortLabel/TableSortLabel.js +1 -1
- package/components/Toaster/Toaster.js +1 -1
- package/componentsV2/Accordion/Accordion.js +1 -1
- package/componentsV2/AppDqPopover/DqAlertTooltip/DqAlertTooltip.js +1 -1
- package/componentsV2/AppDqPopover/DqAsset/DqAsset.js +1 -1
- package/componentsV2/AppFooter/DqPopover/DqStatusIcon/DqStatusIcon.js +1 -1
- package/componentsV2/AppFooter/Warning.js +1 -1
- package/componentsV2/AppHeader/AppAssets/utils.js +1 -1
- package/componentsV2/AppHeader/V3/Actions/Actions.js +1 -1
- package/componentsV2/AppHeader/V3/AppTitle/AppTitle.js +1 -1
- package/componentsV2/AppHeader/V3/AssetSelector/AssetSelectorChip/AssetSelectorChip.js +1 -1
- package/componentsV2/AppHeader/V3/AssetSelector/AssetSelectorSelect/AssetSelectorContent.js +1 -1
- package/componentsV2/AppHeader/V3/AssetSelector/constants.js +1 -1
- package/componentsV2/AppHeader/V3/DqStatusIcon/DqStatusIcon.js +1 -1
- package/componentsV2/AppHeader/V3/SettingsButton/SettingsButton.js +1 -1
- package/componentsV2/AppHeader/V3/VersionSelect/VersionSelect.js +1 -1
- package/componentsV2/AppSettings/AppSettings.js +1 -1
- package/componentsV2/Autocomplete/Autocomplete.js +1 -1
- package/componentsV2/Breadcrumbs/Breadcrumbs.js +1 -1
- package/componentsV2/ButtonLive/ButtonLive.js +1 -1
- package/componentsV2/Chip/Chip.d.ts.map +1 -1
- package/componentsV2/Chip/Chip.js +1 -1
- package/componentsV2/Chip/Chip.scss.js +1 -1
- package/componentsV2/ColorPicker/ColorPicker.js +1 -1
- package/componentsV2/ColorPicker/Swatches/Swatches.js +1 -1
- package/componentsV2/CompletionsOffsetWellPicker/AssetSearchInput/AssetSearchInput.js +1 -1
- package/componentsV2/CompletionsOffsetWellPicker/CompletionsOffsetWellPicker.js +1 -1
- package/componentsV2/CompletionsOffsetWellPicker/Map/Map.js +1 -1
- package/componentsV2/CompletionsOffsetWellPicker/ModalTitle/ModalTitle.js +1 -1
- package/componentsV2/CompletionsOffsetWellPicker/PadsTable/PadsTable.js +1 -1
- package/componentsV2/CompletionsOffsetWellPicker/PadsTable/helpers/columns.js +1 -1
- package/componentsV2/CopyToClipboard/CopyToClipboard.js +1 -1
- package/componentsV2/Counter/Counter.js +1 -1
- package/componentsV2/DatePicker/CalendarControls/CalendarControls.js +1 -1
- package/componentsV2/DatePicker/Input/Input.js +1 -1
- package/componentsV2/DragHandle/DragHandle.js +1 -1
- package/componentsV2/FilesDropzone/FilesDropzone.js +1 -1
- package/componentsV2/FilesLoader/FilesLoader.js +1 -1
- package/componentsV2/Hint/Hint.js +1 -1
- package/componentsV2/ImageViewer/ImageViewer.js +1 -1
- package/componentsV2/ModalWindow/ModalWindow.js +1 -1
- package/componentsV2/OffsetWellsButton/OffsetWellsButton.js +1 -1
- package/componentsV2/OffsetWellsButton/useOffsetWellsIcon.js +1 -1
- package/componentsV2/PadModeSelect/FracModeLabel/FracModeLabel.js +1 -1
- package/componentsV2/PadModeSelect/PadModeSelect.js +1 -1
- package/componentsV2/PopoverPanel/PopoverPanelHeader/PopoverPanelHeader.js +1 -1
- package/componentsV2/SliderAdvanced/Bar.d.ts +13 -0
- package/componentsV2/SliderAdvanced/Bar.d.ts.map +1 -0
- package/componentsV2/SliderAdvanced/Bar.js +2 -0
- package/componentsV2/SliderAdvanced/Bar.js.map +1 -0
- package/componentsV2/SliderAdvanced/HandleWrapper.d.ts +15 -0
- package/componentsV2/SliderAdvanced/HandleWrapper.d.ts.map +1 -0
- package/componentsV2/SliderAdvanced/HandleWrapper.js +2 -0
- package/componentsV2/SliderAdvanced/HandleWrapper.js.map +1 -0
- package/componentsV2/SliderAdvanced/SliderAdvanced.d.ts +62 -0
- package/componentsV2/SliderAdvanced/SliderAdvanced.d.ts.map +1 -0
- package/componentsV2/SliderAdvanced/SliderAdvanced.js +2 -0
- package/componentsV2/SliderAdvanced/SliderAdvanced.js.map +1 -0
- package/componentsV2/SliderAdvanced/SliderAdvanced.scss.js +2 -0
- package/componentsV2/SliderAdvanced/SliderAdvanced.scss.js.map +1 -0
- package/componentsV2/SliderAdvanced/SliderAdvanced.stories.d.ts +12 -0
- package/componentsV2/SliderAdvanced/SliderAdvanced.stories.d.ts.map +1 -0
- package/componentsV2/SliderAdvanced/handles/HandleEditable.d.ts +17 -0
- package/componentsV2/SliderAdvanced/handles/HandleEditable.d.ts.map +1 -0
- package/componentsV2/SliderAdvanced/handles/HandleEditable.js +2 -0
- package/componentsV2/SliderAdvanced/handles/HandleEditable.js.map +1 -0
- package/componentsV2/SliderAdvanced/handles/HandleMinimal.d.ts +5 -0
- package/componentsV2/SliderAdvanced/handles/HandleMinimal.d.ts.map +1 -0
- package/componentsV2/SliderAdvanced/handles/HandleMinimal.js +2 -0
- package/componentsV2/SliderAdvanced/handles/HandleMinimal.js.map +1 -0
- package/componentsV2/SliderAdvanced/handles/HandleReadonly.d.ts +4 -0
- package/componentsV2/SliderAdvanced/handles/HandleReadonly.d.ts.map +1 -0
- package/componentsV2/SliderAdvanced/handles/HandleReadonly.js +2 -0
- package/componentsV2/SliderAdvanced/handles/HandleReadonly.js.map +1 -0
- package/componentsV2/SliderAdvanced/handles/Handles.scss.js +2 -0
- package/componentsV2/SliderAdvanced/handles/Handles.scss.js.map +1 -0
- package/componentsV2/SliderAdvanced/handles/index.d.ts +4 -0
- package/componentsV2/SliderAdvanced/handles/index.d.ts.map +1 -0
- package/componentsV2/SliderAdvanced/index.d.ts +3 -0
- package/componentsV2/SliderAdvanced/index.d.ts.map +1 -0
- package/componentsV2/SliderAdvanced/utils.d.ts +20 -0
- package/componentsV2/SliderAdvanced/utils.d.ts.map +1 -0
- package/componentsV2/SliderAdvanced/utils.js +2 -0
- package/componentsV2/SliderAdvanced/utils.js.map +1 -0
- package/componentsV2/Stepper/Step/Step.js +1 -1
- package/componentsV2/TemplatesControl/FolderMenu/FolderMenu.js +1 -1
- package/componentsV2/TemplatesControl/MoveToFolderMenu/MoveToFolderMenu.js +1 -1
- package/componentsV2/TemplatesControl/Popover/Popover.js +1 -1
- package/componentsV2/TemplatesControl/PopoverFooter/PopoverFooter.js +1 -1
- package/componentsV2/TemplatesControl/PopoverSearch/PopoverSearch.js +1 -1
- package/componentsV2/TemplatesControl/ShareModal/ShareModal.js +1 -1
- package/componentsV2/TemplatesControl/TemplateMenu/IconMenu/IconMenu.js +1 -1
- package/componentsV2/TemplatesControl/TemplatesTreeMenuHeader/TemplatesTreeMenuHeader.js +1 -1
- package/componentsV2/TemplatesControl/TemplatesTreeNodeItem/TemplatesTreeNodeItem.js +1 -1
- package/componentsV2/TemplatesControl/Toggle/Toggle.js +1 -1
- package/componentsV2/TemplatesControl/templateMenuItems/CopyTemplate.js +1 -1
- package/componentsV2/TemplatesControl/templateMenuItems/ExportTemplate.js +1 -1
- package/componentsV2/TemplatesControl/templateMenuItems/MoveTemplateOutOfFolder.js +1 -1
- package/componentsV2/TemplatesControl/templateMenuItems/MoveTemplateToFolder.js +1 -1
- package/componentsV2/TemplatesControl/templateMenuItems/RemoveTemplate.js +1 -1
- package/componentsV2/TemplatesControl/templateMenuItems/RevertTemplate.js +1 -1
- package/componentsV2/TemplatesControl/templateMenuItems/ShareTemplate.js +1 -1
- package/componentsV2/TemplatesControl/templateMenuItems/UnfollowTemplate.js +1 -1
- package/componentsV2/TextInput/TextInput.js +1 -1
- package/componentsV2/TextInputNext/TextInputNext.js +1 -1
- package/componentsV2/TextInputNext/components/InfoIcon.js +1 -1
- package/componentsV2/WellArchivedMessage/WellArchivedMessage.js +1 -1
- package/componentsV2/index.d.ts +1 -0
- package/componentsV2/index.d.ts.map +1 -1
- package/componentsV2/index.js +1 -1
- package/config/theme/index.js +1 -1
- package/config/theme/index.js.map +1 -1
- package/icons/customIcons/icons/DragOne.d.ts +2 -0
- package/icons/customIcons/icons/DragOne.d.ts.map +1 -0
- package/icons/customIcons/icons/DragOne.js +2 -0
- package/icons/customIcons/icons/DragOne.js.map +1 -0
- package/icons/customIcons/icons/index.d.ts +1 -0
- package/icons/customIcons/icons/index.d.ts.map +1 -1
- package/icons/index.js +1 -1
- package/mcp-server/server.mjs +257 -8
- package/package.json +1 -1
- package/testing/AppTestWrapper/AppTestWrapper.js +1 -1
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Content.js","sources":["../../../../src/components/AddComment/components/Content.js"],"sourcesContent":["import { useRef } from 'react';\nimport { node, number, func, bool, shape } from 'prop-types';\nimport { makeStyles } from '@material-ui/core';\n\nimport { PostInput } from '~/components';\nimport { isSuggestionsListOpened } from '~/components/UserMention/utils';\n\nconst useStyles = makeStyles({\n postInput: { paddingBottom: 8 },\n filePreviewWrapper: ({ smallerView }) => ({\n width: '100%',\n marginLeft: 0,\n maxHeight: smallerView ? 127 : 251,\n }),\n});\nfunction Content({\n userCompanyId,\n startAdornment,\n endAdornment,\n customContent,\n setComment,\n smallerView,\n onSave,\n comment,\n}) {\n const classes = useStyles({ smallerView });\n const wrapperRef = useRef();\n\n const onKeyDown = e => {\n if (e.key === 'Enter' && !e.shiftKey && !isSuggestionsListOpened()) {\n e.preventDefault();\n onSave(comment);\n }\n };\n\n return (\n <div ref={wrapperRef}>\n {startAdornment}\n\n {customContent || (\n <PostInput\n userCompanyId={userCompanyId}\n onChange={setComment}\n filePreviewWrapperClass={classes.filePreviewWrapper}\n className={classes.postInput}\n smallerView={smallerView}\n onKeyDown={onKeyDown}\n suggestionsPortalHost={wrapperRef.current}\n allowSuggestionsAboveCursor\n />\n )}\n\n {endAdornment}\n </div>\n );\n}\n\nContent.propTypes = {\n startAdornment: node,\n endAdornment: node,\n customContent: node,\n userCompanyId: number.isRequired,\n setComment: func,\n onSave: func,\n smallerView: bool,\n comment: shape(),\n};\n\nContent.defaultProps = {\n startAdornment: null,\n endAdornment: null,\n customContent: null,\n setComment: () => undefined,\n onSave: () => undefined,\n smallerView: false,\n comment: undefined,\n};\n\nexport default Content;\n"],"names":["useStyles","makeStyles","postInput","paddingBottom","filePreviewWrapper","_ref","width","marginLeft","maxHeight","smallerView","Content","_ref2","userCompanyId","startAdornment","endAdornment","customContent","setComment","onSave","comment","classes","wrapperRef","useRef","_jsxs","ref","children","_jsx","PostInput","onChange","filePreviewWrapperClass","className","onKeyDown","e","key","shiftKey","isSuggestionsListOpened","preventDefault","suggestionsPortalHost","current","allowSuggestionsAboveCursor","propTypes","node","number","isRequired","func","bool","shape","defaultProps","undefined"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Content.js","sources":["../../../../src/components/AddComment/components/Content.js"],"sourcesContent":["import { useRef } from 'react';\nimport { node, number, func, bool, shape } from 'prop-types';\nimport { makeStyles } from '@material-ui/core';\n\nimport { PostInput } from '~/components';\nimport { isSuggestionsListOpened } from '~/components/UserMention/utils';\n\nconst useStyles = makeStyles({\n postInput: { paddingBottom: 8 },\n filePreviewWrapper: ({ smallerView }) => ({\n width: '100%',\n marginLeft: 0,\n maxHeight: smallerView ? 127 : 251,\n }),\n});\nfunction Content({\n userCompanyId,\n startAdornment,\n endAdornment,\n customContent,\n setComment,\n smallerView,\n onSave,\n comment,\n}) {\n const classes = useStyles({ smallerView });\n const wrapperRef = useRef();\n\n const onKeyDown = e => {\n if (e.key === 'Enter' && !e.shiftKey && !isSuggestionsListOpened()) {\n e.preventDefault();\n onSave(comment);\n }\n };\n\n return (\n <div ref={wrapperRef}>\n {startAdornment}\n\n {customContent || (\n <PostInput\n userCompanyId={userCompanyId}\n onChange={setComment}\n filePreviewWrapperClass={classes.filePreviewWrapper}\n className={classes.postInput}\n smallerView={smallerView}\n onKeyDown={onKeyDown}\n suggestionsPortalHost={wrapperRef.current}\n allowSuggestionsAboveCursor\n />\n )}\n\n {endAdornment}\n </div>\n );\n}\n\nContent.propTypes = {\n startAdornment: node,\n endAdornment: node,\n customContent: node,\n userCompanyId: number.isRequired,\n setComment: func,\n onSave: func,\n smallerView: bool,\n comment: shape(),\n};\n\nContent.defaultProps = {\n startAdornment: null,\n endAdornment: null,\n customContent: null,\n setComment: () => undefined,\n onSave: () => undefined,\n smallerView: false,\n comment: undefined,\n};\n\nexport default Content;\n"],"names":["useStyles","makeStyles","postInput","paddingBottom","filePreviewWrapper","_ref","width","marginLeft","maxHeight","smallerView","Content","_ref2","userCompanyId","startAdornment","endAdornment","customContent","setComment","onSave","comment","classes","wrapperRef","useRef","_jsxs","ref","children","_jsx","PostInput","onChange","filePreviewWrapperClass","className","onKeyDown","e","key","shiftKey","isSuggestionsListOpened","preventDefault","suggestionsPortalHost","current","allowSuggestionsAboveCursor","propTypes","node","number","isRequired","func","bool","shape","defaultProps","undefined"],"mappings":"8s3BAOA,IAAMA,EAAYC,EAAW,CAC3BC,UAAW,CAAEC,cAAe,GAC5BC,mBAAoB,SAAAC,GAAc,MAAQ,CACxCC,MAAO,OACPC,WAAY,EACZC,YAHqBC,YAGI,IAAM,IAChC,IAEH,SAASC,EASNC,GAAA,IARDC,IAAAA,cACAC,IAAAA,eACAC,IAAAA,aACAC,IAAAA,cACAC,IAAAA,WACAP,IAAAA,YACAQ,IAAAA,OACAC,IAAAA,QAEMC,EAAUnB,EAAU,CAAES,YAAAA,IACtBW,EAAaC,IASnB,OACEC,EAAA,MAAA,CAAKC,IAAKH,EAAWI,SAAA,CAClBX,EAEAE,GACCU,EAACC,EAAS,CACRd,cAAeA,EACfe,SAAUX,EACVY,wBAAyBT,EAAQf,mBACjCyB,UAAWV,EAAQjB,UACnBO,YAAaA,EACbqB,UAlBU,SAAAC,GACF,UAAVA,EAAEC,KAAoBD,EAAEE,UAAaC,MACvCH,EAAEI,iBACFlB,EAAOC,KAgBHkB,sBAAuBhB,EAAWiB,QAClCC,6BAA2B,IAI9BxB,IAGP,CAEAJ,EAAQ6B,UAAY,CAClB1B,eAAgB2B,EAChB1B,aAAc0B,EACdzB,cAAeyB,EACf5B,cAAe6B,EAAOC,WACtB1B,WAAY2B,EACZ1B,OAAQ0B,EACRlC,YAAamC,EACb1B,QAAS2B,KAGXnC,EAAQoC,aAAe,CACrBjC,eAAgB,KAChBC,aAAc,KACdC,cAAe,KACfC,WAAY,WAAe,EAC3BC,OAAQ,WAAe,EACvBR,aAAa,EACbS,aAAS6B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import o from"@babel/runtime/helpers/defineProperty";import s from"@babel/runtime/helpers/slicedToArray";import{useState as i,useRef as n,useEffect as c}from"react";import{Input as t}from"@material-ui/core";import r from"classnames";import"./styles/sliderStyles.js";import{useHandleStyles as e}from"./styles/handleStyles.js";import{getIsInputValueValid as m,getValidatedValue as a}from"./utils.js";import{HOVER_AREA_WIDTH_BY_DIMENSION as l,HOVER_AREA_HEIGHT as u,HORIZONTAL_ORIENTATION as p,VERTICAL_ORIENTATION as d,HEAD_PLACEMENT as I}from"./constants.js";import{LeftIcon as j,RightIcon as v}from"../../icons/iconParkIcons.js";import"../../icons/customIcons/icons/AddMessage.js";import"../../icons/customIcons/icons/Attention.js";import"../../icons/customIcons/icons/Collapse.js";import"../../icons/customIcons/icons/Dashboard.js";import"../../icons/customIcons/icons/Expand.js";import"../../icons/customIcons/icons/FolderClosed.js";import"../../icons/customIcons/icons/FolderClosedFilled.js";import"../../icons/customIcons/icons/FolderOpened.js";import"../../icons/customIcons/icons/GreaterOrEqual.js";import"../../icons/customIcons/icons/LessOrEqual.js";import"../../icons/customIcons/icons/Search.js";import"../../icons/customIcons/icons/SearchOne.js";import"../../icons/customIcons/icons/Wellhub.js";import"../../icons/customIcons/icons/MultiRuler.js";import"../../icons/customIcons/icons/Checkbox.js";import"../../icons/customIcons/icons/CheckboxChecked.js";import"../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../icons/customIcons/icons/Radio.js";import"../../icons/customIcons/icons/RadioChecked.js";import"../../icons/customIcons/icons/SimulFrac.js";import"../../icons/customIcons/icons/ZipperFrac.js";import"../../icons/customIcons/icons/CautionFilled.js";import"../../icons/customIcons/icons/MoreApp.js";import"../../icons/customIcons/icons/Pad.js";import"../../icons/customIcons/icons/DrilloutUnit.js";import"../../icons/customIcons/icons/FracFleet.js";import"../../icons/customIcons/icons/Global.js";import"../../icons/customIcons/icons/Program.js";import"../../icons/customIcons/icons/Rig.js";import"../../icons/customIcons/icons/Well.js";import"../../icons/customIcons/icons/Gap.js";import"../../icons/customIcons/icons/Pin.js";import"../../icons/customIcons/icons/CloseOneFilled.js";import"../../icons/customIcons/icons/AttentionFilled.js";import"../../icons/customIcons/icons/CheckOneFilled.js";import"../../icons/customIcons/icons/Archive.js";import"../../icons/customIcons/icons/ArchiveCancel.js";import"../../icons/customIcons/icons/Unarchive.js";import"../../icons/customIcons/icons/Archived.js";import"../../icons/customIcons/icons/InterventionUnit.js";import"../../icons/customIcons/icons/CloudDelete.js";import"../../icons/customIcons/icons/Lasso.js";import"../../icons/customIcons/icons/Radius.js";import"../../icons/customIcons/icons/ErrorOps.js";import"../../icons/customIcons/icons/DataTypeOps.js";import"../../icons/customIcons/icons/FalsePositiveOps.js";import"../../icons/customIcons/icons/CalibrationOps.js";import"../../icons/customIcons/icons/CriticalOps.js";import"../../icons/customIcons/icons/Company.js";import"../../icons/customIcons/icons/ArchiveOne.js";import"../../icons/customIcons/icons/ParseBotFusion.js";import"../../icons/customIcons/icons/Connect.js";import"../../icons/customIcons/icons/PuzzleOne.js";import"../../icons/customIcons/icons/Feed.js";import"../../icons/customIcons/icons/Prompt.js";import"../../icons/customIcons/icons/Companies.js";import"../../icons/customIcons/icons/ClipboardAi.js";import"../../icons/customIcons/icons/Key.js";import"../../icons/customIcons/icons/AtSignCrossed.js";import"../../icons/customIcons/icons/MappingManual.js";import"../../icons/customIcons/icons/Mapping.js";import"../../icons/customIcons/icons/Metrics.js";import"../../icons/customIcons/icons/Drops.js";import"../../icons/customIcons/icons/ClipboardSearch.js";import"../../icons/customIcons/icons/Template.js";import"../../icons/customIcons/icons/ClipboardMetrics.js";import"../../icons/customIcons/icons/ClipboardBuilder.js";import"../../icons/customIcons/icons/UnitConversion.js";import"../../icons/customIcons/icons/NPT.js";import"../../icons/customIcons/icons/GuidedFrac.js";import{jsxs as h,jsx as C}from"react/jsx-runtime";var f=function(f){var b,A,F,g,
|
|
1
|
+
import o from"@babel/runtime/helpers/defineProperty";import s from"@babel/runtime/helpers/slicedToArray";import{useState as i,useRef as n,useEffect as c}from"react";import{Input as t}from"@material-ui/core";import r from"classnames";import"./styles/sliderStyles.js";import{useHandleStyles as e}from"./styles/handleStyles.js";import{getIsInputValueValid as m,getValidatedValue as a}from"./utils.js";import{HOVER_AREA_WIDTH_BY_DIMENSION as l,HOVER_AREA_HEIGHT as u,HORIZONTAL_ORIENTATION as p,VERTICAL_ORIENTATION as d,HEAD_PLACEMENT as I}from"./constants.js";import{LeftIcon as j,RightIcon as v}from"../../icons/iconParkIcons.js";import"../../icons/customIcons/icons/AddMessage.js";import"../../icons/customIcons/icons/DragOne.js";import"../../icons/customIcons/icons/Attention.js";import"../../icons/customIcons/icons/Collapse.js";import"../../icons/customIcons/icons/Dashboard.js";import"../../icons/customIcons/icons/Expand.js";import"../../icons/customIcons/icons/FolderClosed.js";import"../../icons/customIcons/icons/FolderClosedFilled.js";import"../../icons/customIcons/icons/FolderOpened.js";import"../../icons/customIcons/icons/GreaterOrEqual.js";import"../../icons/customIcons/icons/LessOrEqual.js";import"../../icons/customIcons/icons/Search.js";import"../../icons/customIcons/icons/SearchOne.js";import"../../icons/customIcons/icons/Wellhub.js";import"../../icons/customIcons/icons/MultiRuler.js";import"../../icons/customIcons/icons/Checkbox.js";import"../../icons/customIcons/icons/CheckboxChecked.js";import"../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../icons/customIcons/icons/Radio.js";import"../../icons/customIcons/icons/RadioChecked.js";import"../../icons/customIcons/icons/SimulFrac.js";import"../../icons/customIcons/icons/ZipperFrac.js";import"../../icons/customIcons/icons/CautionFilled.js";import"../../icons/customIcons/icons/MoreApp.js";import"../../icons/customIcons/icons/Pad.js";import"../../icons/customIcons/icons/DrilloutUnit.js";import"../../icons/customIcons/icons/FracFleet.js";import"../../icons/customIcons/icons/Global.js";import"../../icons/customIcons/icons/Program.js";import"../../icons/customIcons/icons/Rig.js";import"../../icons/customIcons/icons/Well.js";import"../../icons/customIcons/icons/Gap.js";import"../../icons/customIcons/icons/Pin.js";import"../../icons/customIcons/icons/CloseOneFilled.js";import"../../icons/customIcons/icons/AttentionFilled.js";import"../../icons/customIcons/icons/CheckOneFilled.js";import"../../icons/customIcons/icons/Archive.js";import"../../icons/customIcons/icons/ArchiveCancel.js";import"../../icons/customIcons/icons/Unarchive.js";import"../../icons/customIcons/icons/Archived.js";import"../../icons/customIcons/icons/InterventionUnit.js";import"../../icons/customIcons/icons/CloudDelete.js";import"../../icons/customIcons/icons/Lasso.js";import"../../icons/customIcons/icons/Radius.js";import"../../icons/customIcons/icons/ErrorOps.js";import"../../icons/customIcons/icons/DataTypeOps.js";import"../../icons/customIcons/icons/FalsePositiveOps.js";import"../../icons/customIcons/icons/CalibrationOps.js";import"../../icons/customIcons/icons/CriticalOps.js";import"../../icons/customIcons/icons/Company.js";import"../../icons/customIcons/icons/ArchiveOne.js";import"../../icons/customIcons/icons/ParseBotFusion.js";import"../../icons/customIcons/icons/Connect.js";import"../../icons/customIcons/icons/PuzzleOne.js";import"../../icons/customIcons/icons/Feed.js";import"../../icons/customIcons/icons/Prompt.js";import"../../icons/customIcons/icons/Companies.js";import"../../icons/customIcons/icons/ClipboardAi.js";import"../../icons/customIcons/icons/Key.js";import"../../icons/customIcons/icons/AtSignCrossed.js";import"../../icons/customIcons/icons/MappingManual.js";import"../../icons/customIcons/icons/Mapping.js";import"../../icons/customIcons/icons/Metrics.js";import"../../icons/customIcons/icons/Drops.js";import"../../icons/customIcons/icons/ClipboardSearch.js";import"../../icons/customIcons/icons/Template.js";import"../../icons/customIcons/icons/ClipboardMetrics.js";import"../../icons/customIcons/icons/ClipboardBuilder.js";import"../../icons/customIcons/icons/UnitConversion.js";import"../../icons/customIcons/icons/NPT.js";import"../../icons/customIcons/icons/GuidedFrac.js";import{jsxs as h,jsx as C}from"react/jsx-runtime";var f=function(f){var b,A,F,g,O=f.value,R=f.orientation,y=f.placement,E=f.dimension,H=f.readOnly,N=f.onChange,w=f.min,P=f.max,M=f.displayFormatter,T=f.isInsideArrowsVisible,S=f.arrowsOutsideConfig,k=f.classes,z=f.minimal,x=f["data-testid"],D=i(!1),G=s(D,2),U=G[0],B=G[1],L=i(O),_=s(L,2),W=_[0],q=_[1],K=i(!1),V=s(K,2),X=V[0],Z=V[1],J=n(null),Q=R===p,Y=R===d,$=y===I,oo=(H||!X)&&Boolean(M),so=e({distance:null==S?void 0:S.distance,minimal:z,hoverAreaHeight:Q?l[E]:u,hoverAreaWidth:Q?u:l[E]}),io=function(o){if(!H){var s=Number(o);m(s)?N(a(s,w,P)):B(!0)}};return c((function(){q(O),U&&B(!1)}),[O]),h("div",{className:r(so.root,k.handleRoot,so[E],(b={},o(b,so.horizontalHeadRoot,Q&&$),o(b,so.horizontalTailRoot,Q&&!$),o(b,so.verticalHeadRoot,Y&&$),o(b,so.verticalTailRoot,Y&&!$),o(b,so.minimalHandleRoot,z),b)),children:[C(j,{size:16,className:r(so.leftArrow,(A={},o(A,so.reversedLeftArrow,Y),o(A,so.isInvisible,T&&!$||$&&(null==S?void 0:S.isLeftArrowInvisible)),A)),fill:"white"}),C("div",{className:r(so.handle,k.handle,(F={},o(F,so.horizontalHeadHandle,Q&&$),o(F,so.horizontalTailHandle,Q&&!$),o(F,so.verticalHeadHandle,Y&&$),o(F,so.verticalTailHandle,Y&&!$),o(F,so.minimalHandle,z),o(F,so.minimalVerticalHandle,z&&Y),F)),"data-testid":x,children:!z&&C(t,{inputProps:{"data-testid":"handle-input"},readOnly:H,inputRef:J,onKeyDown:function(o){var s=o.keyCode,i=o.target;13===s&&io(i.value)},onFocus:function(){Z(!0)},onBlur:function(o){var s=o.target;io(s.value),Z(!1)},classes:{root:r(so.inputRoot,U&&so.hasError)},value:oo?M(W):W,onChange:function(o){var s=o.target.value;(function(o){var s,i,n=null==o||null===(s=o.target)||void 0===s?void 0:s.value,c=n?parseFloat(n):0,t=c>=Number.MIN_SAFE_INTEGER&&c<Number.MAX_SAFE_INTEGER,r=null==o||null===(i=o.nativeEvent)||void 0===i?void 0:i.data,e=n.split(".").length-1;return!t||!(!r||"."===r||"-"===r||r>="0"&&r<="9")||e>1||"-"===r&&""===n})(o)||(q(s),U&&B(!1))},disableUnderline:!0,error:!(Number.isFinite(+W)&&+W>=w&&+W<=P)})}),C(v,{size:16,className:r(so.rightArrow,(g={},o(g,so.reversedRightArrow,Y),o(g,so.isInvisible,T&&$||!$&&(null==S?void 0:S.isRightArrowInvisible)),g)),fill:"white"})]})};export{f as Handle};
|
|
2
2
|
//# sourceMappingURL=Handle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Handle.js","sources":["../../../src/components/AdvancedSlider/Handle.js"],"sourcesContent":["/* eslint-disable no-use-before-define */\nimport { useEffect, useRef, useState } from 'react';\nimport { Input } from '@material-ui/core';\nimport classnames from 'classnames';\n\nimport { useHandleStyles } from './styles';\nimport { getIsInputValueValid, getValidatedValue } from './utils';\nimport {\n HEAD_PLACEMENT,\n HORIZONTAL_ORIENTATION,\n HOVER_AREA_HEIGHT,\n HOVER_AREA_WIDTH_BY_DIMENSION,\n VERTICAL_ORIENTATION,\n} from './constants';\n\nimport { LeftIcon, RightIcon } from '~/icons';\n\nconst isBuggySymbolEntered = event => {\n const value = event?.target?.value;\n const floatValue = value ? parseFloat(value) : 0;\n const isValidValue =\n floatValue >= Number.MIN_SAFE_INTEGER && floatValue < Number.MAX_SAFE_INTEGER;\n const char = event?.nativeEvent?.data;\n const pointCount = value.split('.').length - 1;\n const isValidChar = !char || char === '.' || char === '-' || (char >= '0' && char <= '9');\n const isNotValidMinus = char === '-' && value === '';\n return !isValidValue || !isValidChar || pointCount > 1 || isNotValidMinus;\n};\n\n/*\ninterface HandleProps {\n value: number | string;\n orientation: 'vertical' | 'horizontal';\n placement: 'head' | 'tail';\n onChange: (newValue: number) => void;\n min: number;\n max: number;\n minimal?: boolean;\n}\n*/\nexport const Handle = ({\n value,\n orientation,\n placement,\n dimension,\n readOnly,\n onChange,\n min,\n max,\n displayFormatter,\n isInsideArrowsVisible,\n arrowsOutsideConfig,\n classes,\n minimal,\n 'data-testid': dataTestId,\n}) => {\n const [hasError, setHasError] = useState(false);\n const [internal, setInternal] = useState(value);\n const [isFocused, setIsFocused] = useState(false);\n const inputRef = useRef(null);\n const isHorizontalOrientation = orientation === HORIZONTAL_ORIENTATION;\n const isVerticalOrientation = orientation === VERTICAL_ORIENTATION;\n const isHeadPlacement = placement === HEAD_PLACEMENT;\n const showFormatedValue = (readOnly || !isFocused) && Boolean(displayFormatter);\n\n const styles = useHandleStyles({\n distance: arrowsOutsideConfig?.distance,\n minimal,\n hoverAreaHeight: isHorizontalOrientation\n ? HOVER_AREA_WIDTH_BY_DIMENSION[dimension]\n : HOVER_AREA_HEIGHT,\n hoverAreaWidth: isHorizontalOrientation\n ? HOVER_AREA_HEIGHT\n : HOVER_AREA_WIDTH_BY_DIMENSION[dimension],\n });\n\n const onChangeValue = e => {\n const newValue = e.target.value;\n if (isBuggySymbolEntered(e)) {\n return;\n }\n\n setInternal(newValue);\n if (hasError) setHasError(false);\n };\n\n const handleKeyDown = ({ keyCode, target }) => {\n if (keyCode !== 13) return;\n handleValueSubmit(target.value);\n };\n\n const handleFocus = () => {\n setIsFocused(true);\n };\n\n const handleBlur = ({ target }) => {\n handleValueSubmit(target.value);\n setIsFocused(false);\n };\n\n const handleValueSubmit = value => {\n if (readOnly) {\n return;\n }\n\n const formattedValue = Number(value);\n const isInputValid = getIsInputValueValid(formattedValue);\n if (!isInputValid) {\n setHasError(true);\n return;\n }\n\n onChange(getValidatedValue(formattedValue, min, max));\n };\n\n useEffect(() => {\n setInternal(value);\n if (hasError) setHasError(false);\n }, [value]);\n\n return (\n <div\n className={classnames(styles.root, classes.handleRoot, styles[dimension], {\n [styles.horizontalHeadRoot]: isHorizontalOrientation && isHeadPlacement,\n [styles.horizontalTailRoot]: isHorizontalOrientation && !isHeadPlacement,\n [styles.verticalHeadRoot]: isVerticalOrientation && isHeadPlacement,\n [styles.verticalTailRoot]: isVerticalOrientation && !isHeadPlacement,\n [styles.minimalHandleRoot]: minimal,\n })}\n >\n <LeftIcon\n size={16}\n className={classnames(styles.leftArrow, {\n [styles.reversedLeftArrow]: isVerticalOrientation,\n [styles.isInvisible]:\n (isInsideArrowsVisible && !isHeadPlacement) ||\n (isHeadPlacement && arrowsOutsideConfig?.isLeftArrowInvisible),\n })}\n fill=\"white\"\n />\n\n <div\n className={classnames(styles.handle, classes.handle, {\n [styles.horizontalHeadHandle]: isHorizontalOrientation && isHeadPlacement,\n [styles.horizontalTailHandle]: isHorizontalOrientation && !isHeadPlacement,\n [styles.verticalHeadHandle]: isVerticalOrientation && isHeadPlacement,\n [styles.verticalTailHandle]: isVerticalOrientation && !isHeadPlacement,\n [styles.minimalHandle]: minimal,\n [styles.minimalVerticalHandle]: minimal && isVerticalOrientation,\n })}\n data-testid={dataTestId}\n >\n {!minimal && (\n <Input\n inputProps={{\n 'data-testid': 'handle-input',\n }}\n readOnly={readOnly}\n inputRef={inputRef}\n onKeyDown={handleKeyDown}\n onFocus={handleFocus}\n onBlur={handleBlur}\n classes={{\n root: classnames(styles.inputRoot, hasError && styles.hasError),\n }}\n value={showFormatedValue ? displayFormatter(internal) : internal}\n onChange={onChangeValue}\n disableUnderline\n error={!(Number.isFinite(+internal) && +internal >= min && +internal <= max)}\n />\n )}\n </div>\n\n <RightIcon\n size={16}\n className={classnames(styles.rightArrow, {\n [styles.reversedRightArrow]: isVerticalOrientation,\n [styles.isInvisible]:\n (isInsideArrowsVisible && isHeadPlacement) ||\n (!isHeadPlacement && arrowsOutsideConfig?.isRightArrowInvisible),\n })}\n fill=\"white\"\n />\n </div>\n );\n};\n"],"names":["Handle","_ref","_classnames","_classnames2","_classnames3","_classnames4","value","orientation","placement","dimension","readOnly","onChange","min","max","displayFormatter","isInsideArrowsVisible","arrowsOutsideConfig","classes","minimal","dataTestId","useState","_useState2","_slicedToArray","_useState","hasError","setHasError","_useState4","_useState3","internal","setInternal","_useState6","_useState5","isFocused","setIsFocused","inputRef","useRef","isHorizontalOrientation","HORIZONTAL_ORIENTATION","isVerticalOrientation","VERTICAL_ORIENTATION","isHeadPlacement","HEAD_PLACEMENT","showFormatedValue","Boolean","styles","useHandleStyles","distance","hoverAreaHeight","HOVER_AREA_WIDTH_BY_DIMENSION","HOVER_AREA_HEIGHT","hoverAreaWidth","handleValueSubmit","formattedValue","Number","getIsInputValueValid","getValidatedValue","useEffect","_jsxs","className","classnames","root","handleRoot","horizontalHeadRoot","horizontalTailRoot","verticalHeadRoot","verticalTailRoot","minimalHandleRoot","children","_jsx","LeftIcon","size","leftArrow","_defineProperty","reversedLeftArrow","isInvisible","isLeftArrowInvisible","fill","handle","horizontalHeadHandle","horizontalTailHandle","verticalHeadHandle","verticalTailHandle","minimalHandle","minimalVerticalHandle","Input","inputProps","onKeyDown","_ref2","keyCode","target","onFocus","onBlur","_ref3","inputRoot","e","newValue","event","_event$target","_event$nativeEvent","floatValue","parseFloat","isValidValue","MIN_SAFE_INTEGER","MAX_SAFE_INTEGER","char","nativeEvent","data","pointCount","split","length","isBuggySymbolEntered","disableUnderline","error","isFinite","RightIcon","rightArrow","reversedRightArrow","isRightArrowInvisible"],"mappings":"usIAiBA,IAuBaA,EAAS,SAehBC,GAAA,IAAAC,EAAAC,EAAAC,EAAAC,EAdJC,IAAAA,MACAC,IAAAA,YACAC,IAAAA,UACAC,IAAAA,UACAC,IAAAA,SACAC,IAAAA,SACAC,IAAAA,IACAC,IAAAA,IACAC,IAAAA,iBACAC,IAAAA,sBACAC,IAAAA,oBACAC,IAAAA,QACAC,IAAAA,QACeC,IAAf,eAEgCC,EAAAA,GAAS,GAAMC,EAAAC,EAAAC,EAAA,GAAxCC,EAAQH,EAAA,GAAEI,EAAWJ,EAAA,GACID,EAAAA,EAASd,GAAMoB,EAAAJ,EAAAK,EAAA,GAAxCC,EAAQF,EAAA,GAAEG,EAAWH,EAAA,GACMN,EAAAA,GAAS,GAAMU,EAAAR,EAAAS,EAAA,GAA1CC,EAASF,EAAA,GAAEG,EAAYH,EAAA,GACxBI,EAAWC,EAAO,MAClBC,EAA0B7B,IAAgB8B,EAC1CC,EAAwB/B,IAAgBgC,EACxCC,EAAkBhC,IAAciC,EAChCC,IAAqBhC,IAAasB,IAAcW,QAAQ7B,GAExD8B,GAASC,EAAgB,CAC7BC,SAAU9B,aAAAA,EAAAA,EAAqB8B,SAC/B5B,QAAAA,EACA6B,gBAAiBX,EACbY,EAA8BvC,GAC9BwC,EACJC,eAAgBd,EACZa,EACAD,EAA8BvC,KA2B9B0C,GAAoB,SAAA7C,GACxB,IAAII,EAAJ,CAIA,IAAM0C,EAAiBC,OAAO/C,GACTgD,EAAqBF,GAM1CzC,EAAS4C,EAAkBH,EAAgBxC,EAAKC,IAJ9CY,GAAY,EALd,GAiBF,OALA+B,GAAU,WACR3B,EAAYvB,GACRkB,GAAUC,GAAY,EAC5B,GAAG,CAACnB,IAGFmD,EAAA,MAAA,CACEC,UAAWC,EAAWf,GAAOgB,KAAM3C,EAAQ4C,WAAYjB,GAAOnC,IAC3DmC,EAAAA,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S,CACP2C,KAAMD,EAAWf,GAAOiD,UAAWrE,GAAYoB,GAAOpB,WAExDlB,MAAOoC,GAAoB5B,EAAiBc,GAAYA,EACxDjB,SA1FY,SAAAmF,GACpB,IAAMC,EAAWD,EAAEL,OAAOnF,OA5DD,SAAA0F,GAAS,IAAAC,EAAAC,EAC9B5F,EAAQ0F,SAAA,QAAAA,EAAAA,EAAOP,cAAP,IAAAQ,OAAAD,EAAAC,EAAe3F,MACvB6F,EAAa7F,EAAQ8F,WAAW9F,GAAS,EACzC+F,EACJF,GAAc9C,OAAOiD,kBAAoBH,EAAa9C,OAAOkD,iBACzDC,EAAOR,SAAA,QAAAA,EAAAA,EAAOS,mBAAP,IAAAP,OAAAF,EAAAE,EAAoBQ,KAC3BC,EAAarG,EAAMsG,MAAM,KAAKC,OAAS,EAG7C,OAAQR,MAFaG,GAAiB,MAATA,GAAyB,MAATA,GAAiBA,GAAQ,KAAOA,GAAQ,MAE7CG,EAAa,GADpB,MAATH,GAA0B,KAAVlG,CAE1C,EAmDQwG,CAAqBhB,KAIzBjE,EAAYkE,GACRvE,GAAUC,GAAY,KAoFlBsF,kBAAgB,EAChBC,QAAS3D,OAAO4D,UAAUrF,KAAcA,GAAYhB,IAAQgB,GAAYf,OAK9EuD,EAAC8C,EAAS,CACR5C,KAAM,GACNZ,UAAWC,EAAWf,GAAOuE,YAAU9G,EAAA,CAAA,EAAAmE,EAAAnE,EACpCuC,GAAOwE,mBAAqB9E,GAAqBkC,EAAAnE,EACjDuC,GAAO8B,YACL3D,GAAyByB,IACxBA,IAAmBxB,aAAAA,EAAAA,EAAqBqG,wBAC3ChH,IACHuE,KAAK,YAIb"}
|
|
1
|
+
{"version":3,"file":"Handle.js","sources":["../../../src/components/AdvancedSlider/Handle.js"],"sourcesContent":["/* eslint-disable no-use-before-define */\nimport { useEffect, useRef, useState } from 'react';\nimport { Input } from '@material-ui/core';\nimport classnames from 'classnames';\n\nimport { useHandleStyles } from './styles';\nimport { getIsInputValueValid, getValidatedValue } from './utils';\nimport {\n HEAD_PLACEMENT,\n HORIZONTAL_ORIENTATION,\n HOVER_AREA_HEIGHT,\n HOVER_AREA_WIDTH_BY_DIMENSION,\n VERTICAL_ORIENTATION,\n} from './constants';\n\nimport { LeftIcon, RightIcon } from '~/icons';\n\nconst isBuggySymbolEntered = event => {\n const value = event?.target?.value;\n const floatValue = value ? parseFloat(value) : 0;\n const isValidValue =\n floatValue >= Number.MIN_SAFE_INTEGER && floatValue < Number.MAX_SAFE_INTEGER;\n const char = event?.nativeEvent?.data;\n const pointCount = value.split('.').length - 1;\n const isValidChar = !char || char === '.' || char === '-' || (char >= '0' && char <= '9');\n const isNotValidMinus = char === '-' && value === '';\n return !isValidValue || !isValidChar || pointCount > 1 || isNotValidMinus;\n};\n\n/*\ninterface HandleProps {\n value: number | string;\n orientation: 'vertical' | 'horizontal';\n placement: 'head' | 'tail';\n onChange: (newValue: number) => void;\n min: number;\n max: number;\n minimal?: boolean;\n}\n*/\nexport const Handle = ({\n value,\n orientation,\n placement,\n dimension,\n readOnly,\n onChange,\n min,\n max,\n displayFormatter,\n isInsideArrowsVisible,\n arrowsOutsideConfig,\n classes,\n minimal,\n 'data-testid': dataTestId,\n}) => {\n const [hasError, setHasError] = useState(false);\n const [internal, setInternal] = useState(value);\n const [isFocused, setIsFocused] = useState(false);\n const inputRef = useRef(null);\n const isHorizontalOrientation = orientation === HORIZONTAL_ORIENTATION;\n const isVerticalOrientation = orientation === VERTICAL_ORIENTATION;\n const isHeadPlacement = placement === HEAD_PLACEMENT;\n const showFormatedValue = (readOnly || !isFocused) && Boolean(displayFormatter);\n\n const styles = useHandleStyles({\n distance: arrowsOutsideConfig?.distance,\n minimal,\n hoverAreaHeight: isHorizontalOrientation\n ? HOVER_AREA_WIDTH_BY_DIMENSION[dimension]\n : HOVER_AREA_HEIGHT,\n hoverAreaWidth: isHorizontalOrientation\n ? HOVER_AREA_HEIGHT\n : HOVER_AREA_WIDTH_BY_DIMENSION[dimension],\n });\n\n const onChangeValue = e => {\n const newValue = e.target.value;\n if (isBuggySymbolEntered(e)) {\n return;\n }\n\n setInternal(newValue);\n if (hasError) setHasError(false);\n };\n\n const handleKeyDown = ({ keyCode, target }) => {\n if (keyCode !== 13) return;\n handleValueSubmit(target.value);\n };\n\n const handleFocus = () => {\n setIsFocused(true);\n };\n\n const handleBlur = ({ target }) => {\n handleValueSubmit(target.value);\n setIsFocused(false);\n };\n\n const handleValueSubmit = value => {\n if (readOnly) {\n return;\n }\n\n const formattedValue = Number(value);\n const isInputValid = getIsInputValueValid(formattedValue);\n if (!isInputValid) {\n setHasError(true);\n return;\n }\n\n onChange(getValidatedValue(formattedValue, min, max));\n };\n\n useEffect(() => {\n setInternal(value);\n if (hasError) setHasError(false);\n }, [value]);\n\n return (\n <div\n className={classnames(styles.root, classes.handleRoot, styles[dimension], {\n [styles.horizontalHeadRoot]: isHorizontalOrientation && isHeadPlacement,\n [styles.horizontalTailRoot]: isHorizontalOrientation && !isHeadPlacement,\n [styles.verticalHeadRoot]: isVerticalOrientation && isHeadPlacement,\n [styles.verticalTailRoot]: isVerticalOrientation && !isHeadPlacement,\n [styles.minimalHandleRoot]: minimal,\n })}\n >\n <LeftIcon\n size={16}\n className={classnames(styles.leftArrow, {\n [styles.reversedLeftArrow]: isVerticalOrientation,\n [styles.isInvisible]:\n (isInsideArrowsVisible && !isHeadPlacement) ||\n (isHeadPlacement && arrowsOutsideConfig?.isLeftArrowInvisible),\n })}\n fill=\"white\"\n />\n\n <div\n className={classnames(styles.handle, classes.handle, {\n [styles.horizontalHeadHandle]: isHorizontalOrientation && isHeadPlacement,\n [styles.horizontalTailHandle]: isHorizontalOrientation && !isHeadPlacement,\n [styles.verticalHeadHandle]: isVerticalOrientation && isHeadPlacement,\n [styles.verticalTailHandle]: isVerticalOrientation && !isHeadPlacement,\n [styles.minimalHandle]: minimal,\n [styles.minimalVerticalHandle]: minimal && isVerticalOrientation,\n })}\n data-testid={dataTestId}\n >\n {!minimal && (\n <Input\n inputProps={{\n 'data-testid': 'handle-input',\n }}\n readOnly={readOnly}\n inputRef={inputRef}\n onKeyDown={handleKeyDown}\n onFocus={handleFocus}\n onBlur={handleBlur}\n classes={{\n root: classnames(styles.inputRoot, hasError && styles.hasError),\n }}\n value={showFormatedValue ? displayFormatter(internal) : internal}\n onChange={onChangeValue}\n disableUnderline\n error={!(Number.isFinite(+internal) && +internal >= min && +internal <= max)}\n />\n )}\n </div>\n\n <RightIcon\n size={16}\n className={classnames(styles.rightArrow, {\n [styles.reversedRightArrow]: isVerticalOrientation,\n [styles.isInvisible]:\n (isInsideArrowsVisible && isHeadPlacement) ||\n (!isHeadPlacement && arrowsOutsideConfig?.isRightArrowInvisible),\n })}\n fill=\"white\"\n />\n </div>\n );\n};\n"],"names":["Handle","_ref","_classnames","_classnames2","_classnames3","_classnames4","value","orientation","placement","dimension","readOnly","onChange","min","max","displayFormatter","isInsideArrowsVisible","arrowsOutsideConfig","classes","minimal","dataTestId","useState","_useState2","_slicedToArray","_useState","hasError","setHasError","_useState4","_useState3","internal","setInternal","_useState6","_useState5","isFocused","setIsFocused","inputRef","useRef","isHorizontalOrientation","HORIZONTAL_ORIENTATION","isVerticalOrientation","VERTICAL_ORIENTATION","isHeadPlacement","HEAD_PLACEMENT","showFormatedValue","Boolean","styles","useHandleStyles","distance","hoverAreaHeight","HOVER_AREA_WIDTH_BY_DIMENSION","HOVER_AREA_HEIGHT","hoverAreaWidth","handleValueSubmit","formattedValue","Number","getIsInputValueValid","getValidatedValue","useEffect","_jsxs","className","classnames","root","handleRoot","horizontalHeadRoot","horizontalTailRoot","verticalHeadRoot","verticalTailRoot","minimalHandleRoot","children","_jsx","LeftIcon","size","leftArrow","_defineProperty","reversedLeftArrow","isInvisible","isLeftArrowInvisible","fill","handle","horizontalHeadHandle","horizontalTailHandle","verticalHeadHandle","verticalTailHandle","minimalHandle","minimalVerticalHandle","Input","inputProps","onKeyDown","_ref2","keyCode","target","onFocus","onBlur","_ref3","inputRoot","e","newValue","event","_event$target","_event$nativeEvent","floatValue","parseFloat","isValidValue","MIN_SAFE_INTEGER","MAX_SAFE_INTEGER","char","nativeEvent","data","pointCount","split","length","isBuggySymbolEntered","disableUnderline","error","isFinite","RightIcon","rightArrow","reversedRightArrow","isRightArrowInvisible"],"mappings":"wvIAiBA,IAuBaA,EAAS,SAehBC,GAAA,IAAAC,EAAAC,EAAAC,EAAAC,EAdJC,IAAAA,MACAC,IAAAA,YACAC,IAAAA,UACAC,IAAAA,UACAC,IAAAA,SACAC,IAAAA,SACAC,IAAAA,IACAC,IAAAA,IACAC,IAAAA,iBACAC,IAAAA,sBACAC,IAAAA,oBACAC,IAAAA,QACAC,IAAAA,QACeC,IAAf,eAEgCC,EAAAA,GAAS,GAAMC,EAAAC,EAAAC,EAAA,GAAxCC,EAAQH,EAAA,GAAEI,EAAWJ,EAAA,GACID,EAAAA,EAASd,GAAMoB,EAAAJ,EAAAK,EAAA,GAAxCC,EAAQF,EAAA,GAAEG,EAAWH,EAAA,GACMN,EAAAA,GAAS,GAAMU,EAAAR,EAAAS,EAAA,GAA1CC,EAASF,EAAA,GAAEG,EAAYH,EAAA,GACxBI,EAAWC,EAAO,MAClBC,EAA0B7B,IAAgB8B,EAC1CC,EAAwB/B,IAAgBgC,EACxCC,EAAkBhC,IAAciC,EAChCC,IAAqBhC,IAAasB,IAAcW,QAAQ7B,GAExD8B,GAASC,EAAgB,CAC7BC,SAAU9B,aAAAA,EAAAA,EAAqB8B,SAC/B5B,QAAAA,EACA6B,gBAAiBX,EACbY,EAA8BvC,GAC9BwC,EACJC,eAAgBd,EACZa,EACAD,EAA8BvC,KA2B9B0C,GAAoB,SAAA7C,GACxB,IAAII,EAAJ,CAIA,IAAM0C,EAAiBC,OAAO/C,GACTgD,EAAqBF,GAM1CzC,EAAS4C,EAAkBH,EAAgBxC,EAAKC,IAJ9CY,GAAY,EALd,GAiBF,OALA+B,GAAU,WACR3B,EAAYvB,GACRkB,GAAUC,GAAY,EAC5B,GAAG,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" | "handle" | "inputRoot" | "hasError" | "horizontalHeadRoot" | "horizontalTailRoot" | "verticalHeadRoot" | "verticalTailRoot" | "horizontalHeadHandle" | "horizontalTailHandle" | "verticalHeadHandle" | "verticalTailHandle" | "
|
|
1
|
+
export const useHandleStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<"medium" | "large" | "root" | "handle" | "inputRoot" | "hasError" | "minimalHandle" | "horizontalHeadRoot" | "horizontalTailRoot" | "verticalHeadRoot" | "verticalTailRoot" | "horizontalHeadHandle" | "horizontalTailHandle" | "verticalHeadHandle" | "verticalTailHandle" | "minimalVerticalHandle" | "minimalHandleRoot" | "leftArrow" | "rightArrow" | "reversedLeftArrow" | "reversedRightArrow" | "isInvisible">;
|
|
2
2
|
//# sourceMappingURL=handleStyles.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const useSliderStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<"body" | "root" | "
|
|
1
|
+
export const useSliderStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<"body" | "root" | "minimal" | "resizable" | "rootWrapper" | "horizontalRoot" | "verticalRoot" | "horizontalBodyHandle" | "verticalBodyHandle" | "leftBodyHandle" | "rightBodyHandle" | "topBodyHandle" | "bottomBodyHandle" | "bodyHandle" | "bodyHandleIcon" | "rootMinimal" | "horizontal-small" | "horizontal-medium" | "horizontal-large" | "vertical-small" | "vertical-medium" | "vertical-large">;
|
|
2
2
|
//# sourceMappingURL=sliderStyles.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as o,Fragment as s,jsx as c}from"react/jsx-runtime";import{ButtonIcon as i}from"../../componentsV2/ButtonIcon/ButtonIcon.js";import{Tooltip as n}from"../../componentsV2/Tooltip/Tooltip.js";import{PaperclipIcon as t}from"../../icons/iconParkIcons.js";import"../../icons/customIcons/icons/AddMessage.js";import"../../icons/customIcons/icons/Attention.js";import"../../icons/customIcons/icons/Collapse.js";import"../../icons/customIcons/icons/Dashboard.js";import"../../icons/customIcons/icons/Expand.js";import"../../icons/customIcons/icons/FolderClosed.js";import"../../icons/customIcons/icons/FolderClosedFilled.js";import"../../icons/customIcons/icons/FolderOpened.js";import"../../icons/customIcons/icons/GreaterOrEqual.js";import"../../icons/customIcons/icons/LessOrEqual.js";import"../../icons/customIcons/icons/Search.js";import"../../icons/customIcons/icons/SearchOne.js";import"../../icons/customIcons/icons/Wellhub.js";import"../../icons/customIcons/icons/MultiRuler.js";import"../../icons/customIcons/icons/Checkbox.js";import"../../icons/customIcons/icons/CheckboxChecked.js";import"../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../icons/customIcons/icons/Radio.js";import"../../icons/customIcons/icons/RadioChecked.js";import"../../icons/customIcons/icons/SimulFrac.js";import"../../icons/customIcons/icons/ZipperFrac.js";import"../../icons/customIcons/icons/CautionFilled.js";import"../../icons/customIcons/icons/MoreApp.js";import"../../icons/customIcons/icons/Pad.js";import"../../icons/customIcons/icons/DrilloutUnit.js";import"../../icons/customIcons/icons/FracFleet.js";import"../../icons/customIcons/icons/Global.js";import"../../icons/customIcons/icons/Program.js";import"../../icons/customIcons/icons/Rig.js";import"../../icons/customIcons/icons/Well.js";import"../../icons/customIcons/icons/Gap.js";import"../../icons/customIcons/icons/Pin.js";import"../../icons/customIcons/icons/CloseOneFilled.js";import"../../icons/customIcons/icons/AttentionFilled.js";import"../../icons/customIcons/icons/CheckOneFilled.js";import"../../icons/customIcons/icons/Archive.js";import"../../icons/customIcons/icons/ArchiveCancel.js";import"../../icons/customIcons/icons/Unarchive.js";import"../../icons/customIcons/icons/Archived.js";import"../../icons/customIcons/icons/InterventionUnit.js";import"../../icons/customIcons/icons/CloudDelete.js";import"../../icons/customIcons/icons/Lasso.js";import"../../icons/customIcons/icons/Radius.js";import"../../icons/customIcons/icons/ErrorOps.js";import"../../icons/customIcons/icons/DataTypeOps.js";import"../../icons/customIcons/icons/FalsePositiveOps.js";import"../../icons/customIcons/icons/CalibrationOps.js";import"../../icons/customIcons/icons/CriticalOps.js";import"../../icons/customIcons/icons/Company.js";import"../../icons/customIcons/icons/ArchiveOne.js";import"../../icons/customIcons/icons/ParseBotFusion.js";import"../../icons/customIcons/icons/Connect.js";import"../../icons/customIcons/icons/PuzzleOne.js";import"../../icons/customIcons/icons/Feed.js";import"../../icons/customIcons/icons/Prompt.js";import"../../icons/customIcons/icons/Companies.js";import"../../icons/customIcons/icons/ClipboardAi.js";import"../../icons/customIcons/icons/Key.js";import"../../icons/customIcons/icons/AtSignCrossed.js";import"../../icons/customIcons/icons/MappingManual.js";import"../../icons/customIcons/icons/Mapping.js";import"../../icons/customIcons/icons/Metrics.js";import"../../icons/customIcons/icons/Drops.js";import"../../icons/customIcons/icons/ClipboardSearch.js";import"../../icons/customIcons/icons/Template.js";import"../../icons/customIcons/icons/ClipboardMetrics.js";import"../../icons/customIcons/icons/ClipboardBuilder.js";import"../../icons/customIcons/icons/UnitConversion.js";import"../../icons/customIcons/icons/NPT.js";import"../../icons/customIcons/icons/GuidedFrac.js";import m from"./AttachFileButton.scss.js";var r="image/*,video/*,audio/*,.pdf,.doc,.docx,.xlsx,.xls,.ppt,.pptx,.txt,.csv,.zip,.rar",p=function(p){var e=p.inputRef,u=p.onClick,I=p.onFileSelect,j=p.disabled,
|
|
1
|
+
import{jsxs as o,Fragment as s,jsx as c}from"react/jsx-runtime";import{ButtonIcon as i}from"../../componentsV2/ButtonIcon/ButtonIcon.js";import{Tooltip as n}from"../../componentsV2/Tooltip/Tooltip.js";import{PaperclipIcon as t}from"../../icons/iconParkIcons.js";import"../../icons/customIcons/icons/AddMessage.js";import"../../icons/customIcons/icons/DragOne.js";import"../../icons/customIcons/icons/Attention.js";import"../../icons/customIcons/icons/Collapse.js";import"../../icons/customIcons/icons/Dashboard.js";import"../../icons/customIcons/icons/Expand.js";import"../../icons/customIcons/icons/FolderClosed.js";import"../../icons/customIcons/icons/FolderClosedFilled.js";import"../../icons/customIcons/icons/FolderOpened.js";import"../../icons/customIcons/icons/GreaterOrEqual.js";import"../../icons/customIcons/icons/LessOrEqual.js";import"../../icons/customIcons/icons/Search.js";import"../../icons/customIcons/icons/SearchOne.js";import"../../icons/customIcons/icons/Wellhub.js";import"../../icons/customIcons/icons/MultiRuler.js";import"../../icons/customIcons/icons/Checkbox.js";import"../../icons/customIcons/icons/CheckboxChecked.js";import"../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../icons/customIcons/icons/Radio.js";import"../../icons/customIcons/icons/RadioChecked.js";import"../../icons/customIcons/icons/SimulFrac.js";import"../../icons/customIcons/icons/ZipperFrac.js";import"../../icons/customIcons/icons/CautionFilled.js";import"../../icons/customIcons/icons/MoreApp.js";import"../../icons/customIcons/icons/Pad.js";import"../../icons/customIcons/icons/DrilloutUnit.js";import"../../icons/customIcons/icons/FracFleet.js";import"../../icons/customIcons/icons/Global.js";import"../../icons/customIcons/icons/Program.js";import"../../icons/customIcons/icons/Rig.js";import"../../icons/customIcons/icons/Well.js";import"../../icons/customIcons/icons/Gap.js";import"../../icons/customIcons/icons/Pin.js";import"../../icons/customIcons/icons/CloseOneFilled.js";import"../../icons/customIcons/icons/AttentionFilled.js";import"../../icons/customIcons/icons/CheckOneFilled.js";import"../../icons/customIcons/icons/Archive.js";import"../../icons/customIcons/icons/ArchiveCancel.js";import"../../icons/customIcons/icons/Unarchive.js";import"../../icons/customIcons/icons/Archived.js";import"../../icons/customIcons/icons/InterventionUnit.js";import"../../icons/customIcons/icons/CloudDelete.js";import"../../icons/customIcons/icons/Lasso.js";import"../../icons/customIcons/icons/Radius.js";import"../../icons/customIcons/icons/ErrorOps.js";import"../../icons/customIcons/icons/DataTypeOps.js";import"../../icons/customIcons/icons/FalsePositiveOps.js";import"../../icons/customIcons/icons/CalibrationOps.js";import"../../icons/customIcons/icons/CriticalOps.js";import"../../icons/customIcons/icons/Company.js";import"../../icons/customIcons/icons/ArchiveOne.js";import"../../icons/customIcons/icons/ParseBotFusion.js";import"../../icons/customIcons/icons/Connect.js";import"../../icons/customIcons/icons/PuzzleOne.js";import"../../icons/customIcons/icons/Feed.js";import"../../icons/customIcons/icons/Prompt.js";import"../../icons/customIcons/icons/Companies.js";import"../../icons/customIcons/icons/ClipboardAi.js";import"../../icons/customIcons/icons/Key.js";import"../../icons/customIcons/icons/AtSignCrossed.js";import"../../icons/customIcons/icons/MappingManual.js";import"../../icons/customIcons/icons/Mapping.js";import"../../icons/customIcons/icons/Metrics.js";import"../../icons/customIcons/icons/Drops.js";import"../../icons/customIcons/icons/ClipboardSearch.js";import"../../icons/customIcons/icons/Template.js";import"../../icons/customIcons/icons/ClipboardMetrics.js";import"../../icons/customIcons/icons/ClipboardBuilder.js";import"../../icons/customIcons/icons/UnitConversion.js";import"../../icons/customIcons/icons/NPT.js";import"../../icons/customIcons/icons/GuidedFrac.js";import m from"./AttachFileButton.scss.js";var r="image/*,video/*,audio/*,.pdf,.doc,.docx,.xlsx,.xls,.ppt,.pptx,.txt,.csv,.zip,.rar",p=function(p){var e=p.inputRef,u=p.onClick,I=p.onFileSelect,j=p.disabled,a=p.tooltip,l=void 0===a?"Attach file":a,d=p.accept,C=void 0===d?r:d,h=p.testId,F=void 0===h?"attach-file-button":h;return o(s,{children:[c("input",{ref:e,type:"file",accept:C,className:m.input,onChange:I}),c(n,{title:l,children:c("span",{className:m.trigger,children:c(i,{size:"xs",type:"tertiary",disabled:j,onClick:u,testId:F,children:c(t,{size:16})})})})]})};export{r as ACCEPTED_ATTACHMENT_TYPES,p as AttachFileButton};
|
|
2
2
|
//# sourceMappingURL=AttachFileButton.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import o from"@babel/runtime/helpers/slicedToArray";import{useState as s,useCallback as i}from"react";import t from"prop-types";import e from"react-player";import n from"classnames";import{withStyles as c}from"@material-ui/core/styles";import{Typography as a}from"@material-ui/core";import m from"@material-ui/icons/Image";import r from"@material-ui/icons/Fullscreen";import l from"@material-ui/core/colors/grey";import p from"../NewDocumentViewer/NewDocumentViewer.js";import{UnavailableFileIcon as u}from"../NewDocumentViewer/icons/UnavailableFileIcon.js";import{ImageViewer as d}from"../../componentsV2/ImageViewer/ImageViewer.js";import h from"./styles.css.js";import j from"../FileTypeIcon.js";import I from"../IconButton/index.js";import{isNativeDetected as g}from"../../utils/mobileDetect.js";import{getIsImage as f,getIsVideo as v}from"../../utils/fileExtension.js";import{getIsPreviewUnavailable as b}from"../../utils/filePreview.js";import{DownloadIcon as C}from"../../icons/iconParkIcons.js";import"../../icons/customIcons/icons/AddMessage.js";import"../../icons/customIcons/icons/Attention.js";import"../../icons/customIcons/icons/Collapse.js";import"../../icons/customIcons/icons/Dashboard.js";import"../../icons/customIcons/icons/Expand.js";import"../../icons/customIcons/icons/FolderClosed.js";import"../../icons/customIcons/icons/FolderClosedFilled.js";import"../../icons/customIcons/icons/FolderOpened.js";import"../../icons/customIcons/icons/GreaterOrEqual.js";import"../../icons/customIcons/icons/LessOrEqual.js";import"../../icons/customIcons/icons/Search.js";import"../../icons/customIcons/icons/SearchOne.js";import"../../icons/customIcons/icons/Wellhub.js";import"../../icons/customIcons/icons/MultiRuler.js";import"../../icons/customIcons/icons/Checkbox.js";import"../../icons/customIcons/icons/CheckboxChecked.js";import"../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../icons/customIcons/icons/Radio.js";import"../../icons/customIcons/icons/RadioChecked.js";import"../../icons/customIcons/icons/SimulFrac.js";import"../../icons/customIcons/icons/ZipperFrac.js";import"../../icons/customIcons/icons/CautionFilled.js";import"../../icons/customIcons/icons/MoreApp.js";import"../../icons/customIcons/icons/Pad.js";import"../../icons/customIcons/icons/DrilloutUnit.js";import"../../icons/customIcons/icons/FracFleet.js";import"../../icons/customIcons/icons/Global.js";import"../../icons/customIcons/icons/Program.js";import"../../icons/customIcons/icons/Rig.js";import"../../icons/customIcons/icons/Well.js";import"../../icons/customIcons/icons/Gap.js";import"../../icons/customIcons/icons/Pin.js";import"../../icons/customIcons/icons/CloseOneFilled.js";import"../../icons/customIcons/icons/AttentionFilled.js";import"../../icons/customIcons/icons/CheckOneFilled.js";import"../../icons/customIcons/icons/Archive.js";import"../../icons/customIcons/icons/ArchiveCancel.js";import"../../icons/customIcons/icons/Unarchive.js";import"../../icons/customIcons/icons/Archived.js";import"../../icons/customIcons/icons/InterventionUnit.js";import"../../icons/customIcons/icons/CloudDelete.js";import"../../icons/customIcons/icons/Lasso.js";import"../../icons/customIcons/icons/Radius.js";import"../../icons/customIcons/icons/ErrorOps.js";import"../../icons/customIcons/icons/DataTypeOps.js";import"../../icons/customIcons/icons/FalsePositiveOps.js";import"../../icons/customIcons/icons/CalibrationOps.js";import"../../icons/customIcons/icons/CriticalOps.js";import"../../icons/customIcons/icons/Company.js";import"../../icons/customIcons/icons/ArchiveOne.js";import"../../icons/customIcons/icons/ParseBotFusion.js";import"../../icons/customIcons/icons/Connect.js";import"../../icons/customIcons/icons/PuzzleOne.js";import"../../icons/customIcons/icons/Feed.js";import"../../icons/customIcons/icons/Prompt.js";import"../../icons/customIcons/icons/Companies.js";import"../../icons/customIcons/icons/ClipboardAi.js";import"../../icons/customIcons/icons/Key.js";import"../../icons/customIcons/icons/AtSignCrossed.js";import"../../icons/customIcons/icons/MappingManual.js";import"../../icons/customIcons/icons/Mapping.js";import"../../icons/customIcons/icons/Metrics.js";import"../../icons/customIcons/icons/Drops.js";import"../../icons/customIcons/icons/ClipboardSearch.js";import"../../icons/customIcons/icons/Template.js";import"../../icons/customIcons/icons/ClipboardMetrics.js";import"../../icons/customIcons/icons/ClipboardBuilder.js";import"../../icons/customIcons/icons/UnitConversion.js";import"../../icons/customIcons/icons/NPT.js";import"../../icons/customIcons/icons/GuidedFrac.js";import"../../clients/subscriptions/constants.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"lodash";import"../../clients/subscriptions.v1.js";import"../../clients/jsonApi/index.js";import"../../clients/subscriptions/subscriptions-client.factory.js";import"immutable";import"query-string";import"../../constants/goals.js";import"../../constants/segment.js";import"../../constants/alerts.js";import"../../constants/apps.js";import"../../constants/drillstring.js";import"../../constants/completion.js";import"../../constants/appPackages.js";import"../../constants/notifications.js";import"../../constants/feed.js";import"../../constants/bha.js";import"../../constants/corvaCompanyId.js";import"../GradientManager/configuration/constants.js";import N from"../../effects/useSignedURL.js";import"../../utils/index.js";import"uuid";import"jsona";import"../../utils/env.js";import"../StatusBadge/constants.js";import"@babel/runtime/helpers/toConsumableArray";import"lodash/set";import"lodash/get";import"lodash/unset";import"moment";import"../../clients/api/apiCore.js";import"../../clients/constants.js";import"../../clients/sso/auth0.js";import"../../clients/sso/oauth2.js";import"../../clients/api/rateLimiter.js";import"lodash/isEmpty";import"lodash/sortBy";import"../../constants/streamSourceType.js";import"../DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchContext.js";import"../../componentsV2/AppCommonsProvider/AppCommonsProvider.js";import"../../componentsV2/AppCommonsProvider/AppCommonsContext.js";import"../../componentsV2/AppSettings/AppSettingsPinningContext.js";import w from"../../utils/main.js";import{jsx as y,jsxs as x,Fragment as A}from"react/jsx-runtime";var F=l[200],P=l[400],D={label:"small",value:135},O={label:"medium",value:300},S={fileImage:function(o,s){return{maxWidth:"100%",borderRadius:4,overflow:"hidden",maxHeight:s===D.label?D.value:O.value,display:o?"initial":"none",cursor:"pointer"}},fileDownloadWrapper:{padding:"10px 10px 10px 5px",border:"1px solid #616161",borderRadius:3,maxWidth:500,width:"75%"},imagePlaceholder:{position:"relative",backgroundColor:F,borderRadius:3,marginTop:10,height:135,width:135}},W=function(o){var s,i,t=N(o.attachmentFileName)||o.attachmentUrl;return x(A,{children:[x("div",{onClick:o.openLightbox,className:h.cAttachmentImg,children:[y("img",{"data-testid":"".concat("Attachment","_image"),src:t,style:S.fileImage(!!o.imageDimensions,o.size),alt:"Attachment",onLoad:o.onImageLoaded}),y("div",{"data-testid":"".concat("Attachment","_button"),className:h.cAttachmentImgPreviwBtn,children:y(r,{})})]}),!o.imageDimensions&&y("div",{style:S.imagePlaceholder,children:y(m,{"data-testid":"".concat("Attachment","_placeholder"),className:o.classes.imageIconRoot,htmlColor:P,fontSize:"large"})}),o.lightboxIsOpen&&y(d,{src:t,onClose:o.handleLightboxClose,onOpen:o.handleLightboxOpen,width:null===(s=o.imageDimensions)||void 0===s?void 0:s.width,height:null===(i=o.imageDimensions)||void 0===i?void 0:i.height})]})},z=function(o){var s=w.getFileNameWithExtensionFromPath(o.displayName||o.attachmentUrl),i=N(o.attachmentFileName,"inline"),t=N(o.attachmentFileName,"attachment"),e=b(s);return x("div",{className:h.cAttachmentFileWrapper,children:[x("div",{className:n(h.cAttachmentFileDownloadWrapper,e&&o.classes.disabledPreview),style:S.fileDownloadWrapper,onClick:function(){e||o.openPreview()},children:[e?y(u,{className:o.classes.unavailableFileIcon}):y(j,{fileName:o.displayName||o.attachmentUrl,className:h.cAttachmentFileDownloadWrapperFileIcon,size:o.small?25:50}),x("div",{className:o.classes.titleContainer,children:[e&&y("div",{className:o.classes.caption,children:"Preview unavailable"}),y("div",{"data-testid":"".concat("Attachment","_name"),className:n(h.cAttachmentFileDownloadWrapperFileName,e&&o.classes.fileName),children:y(a,{variant:"subtitle2",noWrap:!0,className:o.classes.unavailableFileName,children:s})})]}),y(p,{fileUrl:i,classes:{root:o.classes.dialogRoot,paper:g?o.classes.nativeDialog:o.classes.dialog},fileName:s,fileSize:o.attachmentSize,onClose:o.closePreview,open:o.previewIsOpen})]}),y("a",{download:o.displayName,href:t,className:h.cAttachmentFileDownloadWrapperForm,children:y(I,{"data-testid":"".concat("Attachment","_downloadButton"),className:o.classes.downloadIcon,type:"submit",children:y(C,{size:24,className:o.classes.downloadIcon})})})]})};function R(t){var n=s(void 0),c=o(n,2),a=c[0],m=c[1],r=s(!1),l=o(r,2),p=l[0],u=l[1],d=s(!1),j=o(d,2),I=j[0],b=j[1],C=t.displayName||t.attachmentUrl||t.fileName,w=f(C),x=v(C),A=N(!t.attachmentUrl&&t.fileName),F=t.attachmentUrl||A,P=i((function(o){return o.preventDefault()}),[]),S=i((function(){g&&document.documentElement.addEventListener("touchmove",P,{passive:!1})}),[P]),R=i((function(){g&&document.documentElement.removeEventListener("touchmove",P),u(!1)}),[P]),U=i((function(){return u(!0)}),[]),L=i((function(o){var s=o.currentTarget,i=s.naturalWidth,t=s.naturalHeight;m({width:i,height:t})}),[]),k=i((function(){return b(!0)}),[]),E=i((function(o){o.stopPropagation(),b(!1)}),[]);return w?y("div",{className:h.cAttachment,children:y(W,{size:t.size,openLightbox:U,attachmentFileName:t.fileName,attachmentUrl:t.attachmentUrl,onImageLoaded:L,imageDimensions:a,lightboxIsOpen:p,handleLightboxOpen:S,handleLightboxClose:R,classes:t.classes})}):x&&e.canPlay(F)?y("div",{className:h.cAttachment,children:y(e,{"data-testid":"".concat("Attachment","_player"),className:h.cAttachmentReactPlayer,url:F,config:{file:{attributes:{preload:"metadata"}}},controls:!0,height:t.size===D.label?D.value:O.value,width:null})}):y("div",{className:h.cAttachment,children:y(z,{attachmentUrl:F,attachmentFileName:t.fileName,attachmentSize:t.attachmentSize,displayName:t.displayName,openPreview:k,closePreview:E,previewIsOpen:I,classes:t.classes,small:t.small})})}R.propTypes={attachmentUrl:t.string.isRequired,attachmentSize:t.number,displayName:t.string,fileName:t.string,size:t.oneOf([D.label,O.label]),classes:t.shape({}).isRequired,small:t.bool},R.defaultProps={displayName:null,fileName:null,attachmentSize:void 0,size:O.label,small:!1};var U=c((function(o){return{imageIconRoot:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},dialog:{width:"95%",height:"95%",maxWidth:"100%",position:"relative"},nativeDialog:{width:"100%",height:"100%",maxWidth:"100%",maxHeight:"100%",margin:0},dialogRoot:{backgroundColor:"rgba(0, 0, 0, 0.85)"},fileName:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",fontWeight:400},downloadIcon:{color:o.palette.primary.text3},disabledPreview:{backgroundColor:o.palette.primary.text9},unavailableFileIcon:{marginRight:12,minWidth:32},titleContainer:{display:"flex",flexDirection:"column",width:"100%"},caption:{fontSize:12,fontWeight:400,width:"fit-content"},unavailableFileName:{fontSize:12,fontWeight:400}}}))(R);export{U as default};
|
|
1
|
+
import o from"@babel/runtime/helpers/slicedToArray";import{useState as s,useCallback as i}from"react";import t from"prop-types";import n from"react-player";import e from"classnames";import{withStyles as c}from"@material-ui/core/styles";import{Typography as a}from"@material-ui/core";import m from"@material-ui/icons/Image";import r from"@material-ui/icons/Fullscreen";import l from"@material-ui/core/colors/grey";import p from"../NewDocumentViewer/NewDocumentViewer.js";import{UnavailableFileIcon as u}from"../NewDocumentViewer/icons/UnavailableFileIcon.js";import{ImageViewer as d}from"../../componentsV2/ImageViewer/ImageViewer.js";import h from"./styles.css.js";import j from"../FileTypeIcon.js";import I from"../IconButton/index.js";import{isNativeDetected as g}from"../../utils/mobileDetect.js";import{getIsImage as f,getIsVideo as v}from"../../utils/fileExtension.js";import{getIsPreviewUnavailable as b}from"../../utils/filePreview.js";import{DownloadIcon as C}from"../../icons/iconParkIcons.js";import"../../icons/customIcons/icons/AddMessage.js";import"../../icons/customIcons/icons/DragOne.js";import"../../icons/customIcons/icons/Attention.js";import"../../icons/customIcons/icons/Collapse.js";import"../../icons/customIcons/icons/Dashboard.js";import"../../icons/customIcons/icons/Expand.js";import"../../icons/customIcons/icons/FolderClosed.js";import"../../icons/customIcons/icons/FolderClosedFilled.js";import"../../icons/customIcons/icons/FolderOpened.js";import"../../icons/customIcons/icons/GreaterOrEqual.js";import"../../icons/customIcons/icons/LessOrEqual.js";import"../../icons/customIcons/icons/Search.js";import"../../icons/customIcons/icons/SearchOne.js";import"../../icons/customIcons/icons/Wellhub.js";import"../../icons/customIcons/icons/MultiRuler.js";import"../../icons/customIcons/icons/Checkbox.js";import"../../icons/customIcons/icons/CheckboxChecked.js";import"../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../icons/customIcons/icons/Radio.js";import"../../icons/customIcons/icons/RadioChecked.js";import"../../icons/customIcons/icons/SimulFrac.js";import"../../icons/customIcons/icons/ZipperFrac.js";import"../../icons/customIcons/icons/CautionFilled.js";import"../../icons/customIcons/icons/MoreApp.js";import"../../icons/customIcons/icons/Pad.js";import"../../icons/customIcons/icons/DrilloutUnit.js";import"../../icons/customIcons/icons/FracFleet.js";import"../../icons/customIcons/icons/Global.js";import"../../icons/customIcons/icons/Program.js";import"../../icons/customIcons/icons/Rig.js";import"../../icons/customIcons/icons/Well.js";import"../../icons/customIcons/icons/Gap.js";import"../../icons/customIcons/icons/Pin.js";import"../../icons/customIcons/icons/CloseOneFilled.js";import"../../icons/customIcons/icons/AttentionFilled.js";import"../../icons/customIcons/icons/CheckOneFilled.js";import"../../icons/customIcons/icons/Archive.js";import"../../icons/customIcons/icons/ArchiveCancel.js";import"../../icons/customIcons/icons/Unarchive.js";import"../../icons/customIcons/icons/Archived.js";import"../../icons/customIcons/icons/InterventionUnit.js";import"../../icons/customIcons/icons/CloudDelete.js";import"../../icons/customIcons/icons/Lasso.js";import"../../icons/customIcons/icons/Radius.js";import"../../icons/customIcons/icons/ErrorOps.js";import"../../icons/customIcons/icons/DataTypeOps.js";import"../../icons/customIcons/icons/FalsePositiveOps.js";import"../../icons/customIcons/icons/CalibrationOps.js";import"../../icons/customIcons/icons/CriticalOps.js";import"../../icons/customIcons/icons/Company.js";import"../../icons/customIcons/icons/ArchiveOne.js";import"../../icons/customIcons/icons/ParseBotFusion.js";import"../../icons/customIcons/icons/Connect.js";import"../../icons/customIcons/icons/PuzzleOne.js";import"../../icons/customIcons/icons/Feed.js";import"../../icons/customIcons/icons/Prompt.js";import"../../icons/customIcons/icons/Companies.js";import"../../icons/customIcons/icons/ClipboardAi.js";import"../../icons/customIcons/icons/Key.js";import"../../icons/customIcons/icons/AtSignCrossed.js";import"../../icons/customIcons/icons/MappingManual.js";import"../../icons/customIcons/icons/Mapping.js";import"../../icons/customIcons/icons/Metrics.js";import"../../icons/customIcons/icons/Drops.js";import"../../icons/customIcons/icons/ClipboardSearch.js";import"../../icons/customIcons/icons/Template.js";import"../../icons/customIcons/icons/ClipboardMetrics.js";import"../../icons/customIcons/icons/ClipboardBuilder.js";import"../../icons/customIcons/icons/UnitConversion.js";import"../../icons/customIcons/icons/NPT.js";import"../../icons/customIcons/icons/GuidedFrac.js";import"../../clients/subscriptions/constants.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"lodash";import"../../clients/subscriptions.v1.js";import"../../clients/jsonApi/index.js";import"../../clients/subscriptions/subscriptions-client.factory.js";import"immutable";import"query-string";import"../../constants/goals.js";import"../../constants/segment.js";import"../../constants/alerts.js";import"../../constants/apps.js";import"../../constants/drillstring.js";import"../../constants/completion.js";import"../../constants/appPackages.js";import"../../constants/notifications.js";import"../../constants/feed.js";import"../../constants/bha.js";import"../../constants/corvaCompanyId.js";import"../GradientManager/configuration/constants.js";import N from"../../effects/useSignedURL.js";import"../../utils/index.js";import"uuid";import"jsona";import"../../utils/env.js";import"../StatusBadge/constants.js";import"@babel/runtime/helpers/toConsumableArray";import"lodash/set";import"lodash/get";import"lodash/unset";import"moment";import"../../clients/api/apiCore.js";import"../../clients/constants.js";import"../../clients/sso/auth0.js";import"../../clients/sso/oauth2.js";import"../../clients/api/rateLimiter.js";import"lodash/isEmpty";import"lodash/sortBy";import"../../constants/streamSourceType.js";import"../DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchContext.js";import"../../componentsV2/AppCommonsProvider/AppCommonsProvider.js";import"../../componentsV2/AppCommonsProvider/AppCommonsContext.js";import"../../componentsV2/AppSettings/AppSettingsPinningContext.js";import w from"../../utils/main.js";import{jsx as y,jsxs as x,Fragment as A}from"react/jsx-runtime";var F=l[200],P=l[400],D={label:"small",value:135},O={label:"medium",value:300},S={fileImage:function(o,s){return{maxWidth:"100%",borderRadius:4,overflow:"hidden",maxHeight:s===D.label?D.value:O.value,display:o?"initial":"none",cursor:"pointer"}},fileDownloadWrapper:{padding:"10px 10px 10px 5px",border:"1px solid #616161",borderRadius:3,maxWidth:500,width:"75%"},imagePlaceholder:{position:"relative",backgroundColor:F,borderRadius:3,marginTop:10,height:135,width:135}},W=function(o){var s,i,t=N(o.attachmentFileName)||o.attachmentUrl;return x(A,{children:[x("div",{onClick:o.openLightbox,className:h.cAttachmentImg,children:[y("img",{"data-testid":"".concat("Attachment","_image"),src:t,style:S.fileImage(!!o.imageDimensions,o.size),alt:"Attachment",onLoad:o.onImageLoaded}),y("div",{"data-testid":"".concat("Attachment","_button"),className:h.cAttachmentImgPreviwBtn,children:y(r,{})})]}),!o.imageDimensions&&y("div",{style:S.imagePlaceholder,children:y(m,{"data-testid":"".concat("Attachment","_placeholder"),className:o.classes.imageIconRoot,htmlColor:P,fontSize:"large"})}),o.lightboxIsOpen&&y(d,{src:t,onClose:o.handleLightboxClose,onOpen:o.handleLightboxOpen,width:null===(s=o.imageDimensions)||void 0===s?void 0:s.width,height:null===(i=o.imageDimensions)||void 0===i?void 0:i.height})]})},z=function(o){var s=w.getFileNameWithExtensionFromPath(o.displayName||o.attachmentUrl),i=N(o.attachmentFileName,"inline"),t=N(o.attachmentFileName,"attachment"),n=b(s);return x("div",{className:h.cAttachmentFileWrapper,children:[x("div",{className:e(h.cAttachmentFileDownloadWrapper,n&&o.classes.disabledPreview),style:S.fileDownloadWrapper,onClick:function(){n||o.openPreview()},children:[n?y(u,{className:o.classes.unavailableFileIcon}):y(j,{fileName:o.displayName||o.attachmentUrl,className:h.cAttachmentFileDownloadWrapperFileIcon,size:o.small?25:50}),x("div",{className:o.classes.titleContainer,children:[n&&y("div",{className:o.classes.caption,children:"Preview unavailable"}),y("div",{"data-testid":"".concat("Attachment","_name"),className:e(h.cAttachmentFileDownloadWrapperFileName,n&&o.classes.fileName),children:y(a,{variant:"subtitle2",noWrap:!0,className:o.classes.unavailableFileName,children:s})})]}),y(p,{fileUrl:i,classes:{root:o.classes.dialogRoot,paper:g?o.classes.nativeDialog:o.classes.dialog},fileName:s,fileSize:o.attachmentSize,onClose:o.closePreview,open:o.previewIsOpen})]}),y("a",{download:o.displayName,href:t,className:h.cAttachmentFileDownloadWrapperForm,children:y(I,{"data-testid":"".concat("Attachment","_downloadButton"),className:o.classes.downloadIcon,type:"submit",children:y(C,{size:24,className:o.classes.downloadIcon})})})]})};function R(t){var e=s(void 0),c=o(e,2),a=c[0],m=c[1],r=s(!1),l=o(r,2),p=l[0],u=l[1],d=s(!1),j=o(d,2),I=j[0],b=j[1],C=t.displayName||t.attachmentUrl||t.fileName,w=f(C),x=v(C),A=N(!t.attachmentUrl&&t.fileName),F=t.attachmentUrl||A,P=i((function(o){return o.preventDefault()}),[]),S=i((function(){g&&document.documentElement.addEventListener("touchmove",P,{passive:!1})}),[P]),R=i((function(){g&&document.documentElement.removeEventListener("touchmove",P),u(!1)}),[P]),U=i((function(){return u(!0)}),[]),L=i((function(o){var s=o.currentTarget,i=s.naturalWidth,t=s.naturalHeight;m({width:i,height:t})}),[]),k=i((function(){return b(!0)}),[]),E=i((function(o){o.stopPropagation(),b(!1)}),[]);return w?y("div",{className:h.cAttachment,children:y(W,{size:t.size,openLightbox:U,attachmentFileName:t.fileName,attachmentUrl:t.attachmentUrl,onImageLoaded:L,imageDimensions:a,lightboxIsOpen:p,handleLightboxOpen:S,handleLightboxClose:R,classes:t.classes})}):x&&n.canPlay(F)?y("div",{className:h.cAttachment,children:y(n,{"data-testid":"".concat("Attachment","_player"),className:h.cAttachmentReactPlayer,url:F,config:{file:{attributes:{preload:"metadata"}}},controls:!0,height:t.size===D.label?D.value:O.value,width:null})}):y("div",{className:h.cAttachment,children:y(z,{attachmentUrl:F,attachmentFileName:t.fileName,attachmentSize:t.attachmentSize,displayName:t.displayName,openPreview:k,closePreview:E,previewIsOpen:I,classes:t.classes,small:t.small})})}R.propTypes={attachmentUrl:t.string.isRequired,attachmentSize:t.number,displayName:t.string,fileName:t.string,size:t.oneOf([D.label,O.label]),classes:t.shape({}).isRequired,small:t.bool},R.defaultProps={displayName:null,fileName:null,attachmentSize:void 0,size:O.label,small:!1};var U=c((function(o){return{imageIconRoot:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},dialog:{width:"95%",height:"95%",maxWidth:"100%",position:"relative"},nativeDialog:{width:"100%",height:"100%",maxWidth:"100%",maxHeight:"100%",margin:0},dialogRoot:{backgroundColor:"rgba(0, 0, 0, 0.85)"},fileName:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",fontWeight:400},downloadIcon:{color:o.palette.primary.text3},disabledPreview:{backgroundColor:o.palette.primary.text9},unavailableFileIcon:{marginRight:12,minWidth:32},titleContainer:{display:"flex",flexDirection:"column",width:"100%"},caption:{fontSize:12,fontWeight:400,width:"fit-content"},unavailableFileName:{fontSize:12,fontWeight:400}}}))(R);export{U as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/Attachment/index.js"],"sourcesContent":["import { useCallback, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport ReactPlayer from 'react-player';\nimport classNames from 'classnames';\nimport { withStyles } from '@material-ui/core/styles';\nimport { Typography } from '@material-ui/core';\nimport ImageIcon from '@material-ui/icons/Image';\nimport FullSizeIcon from '@material-ui/icons/Fullscreen';\nimport grey from '@material-ui/core/colors/grey';\n\nimport { NewDocumentViewer } from '../NewDocumentViewer';\nimport { UnavailableFileIcon } from '../NewDocumentViewer/icons/UnavailableFileIcon';\nimport { ImageViewer } from '../../componentsV2/ImageViewer';\n\nimport styles from './styles.css';\n\nimport FileTypeIcon from '~components/FileTypeIcon';\nimport IconButton from '~components/IconButton';\nimport { isNativeDetected } from '~/utils/mobileDetect';\nimport { getIsImage, getIsVideo } from '~/utils/fileExtension';\nimport { getIsPreviewUnavailable } from '~/utils/filePreview';\nimport { DownloadIcon } from '~/icons';\nimport { useSignedURL } from '~/effects';\nimport utils from '~utils/main';\n\nconst PAGE_NAME = 'Attachment';\n\nconst grey200 = grey[200];\nconst grey400 = grey[400];\n\nconst SIZES = {\n small: { label: 'small', value: 135 },\n medium: { label: 'medium', value: 300 },\n};\n\nconst style = {\n fileImage: (imageIsLoaded, size) => ({\n maxWidth: '100%',\n borderRadius: 4,\n overflow: 'hidden',\n // NOTE: Makes one-line comment with image fits into comments container. Equals to\n // imagePlaceholder height\n maxHeight: size === SIZES.small.label ? SIZES.small.value : SIZES.medium.value,\n display: imageIsLoaded ? 'initial' : 'none',\n cursor: 'pointer',\n }),\n fileDownloadWrapper: {\n padding: '10px 10px 10px 5px',\n border: `1px solid #616161`,\n borderRadius: 3,\n maxWidth: 500, // NOTE: Corresponds to react-player max width\n width: '75%',\n },\n imagePlaceholder: {\n position: 'relative',\n backgroundColor: grey200,\n borderRadius: 3,\n marginTop: 10,\n height: 135,\n width: 135,\n },\n};\n\nconst muiStyles = theme => ({\n imageIconRoot: {\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n },\n dialog: {\n width: '95%',\n height: '95%',\n maxWidth: '100%',\n position: 'relative',\n },\n nativeDialog: {\n width: '100%',\n height: '100%',\n maxWidth: '100%',\n maxHeight: '100%',\n margin: 0,\n },\n dialogRoot: {\n // NOTE: Make background color similar to lightbox\n backgroundColor: 'rgba(0, 0, 0, 0.85)',\n },\n fileName: {\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n fontWeight: 400,\n },\n downloadIcon: {\n color: theme.palette.primary.text3,\n },\n disabledPreview: {\n backgroundColor: theme.palette.primary.text9,\n },\n unavailableFileIcon: {\n marginRight: 12,\n minWidth: 32,\n },\n titleContainer: {\n display: 'flex',\n flexDirection: 'column',\n width: '100%',\n },\n caption: {\n fontSize: 12,\n fontWeight: 400,\n width: 'fit-content',\n },\n unavailableFileName: {\n fontSize: 12,\n fontWeight: 400,\n },\n});\n\n/* eslint-disable react/prop-types */\nconst ImageAttachment = props => {\n const downloadLink = useSignedURL(props.attachmentFileName) || props.attachmentUrl;\n\n return (\n <>\n <div onClick={props.openLightbox} className={styles.cAttachmentImg}>\n <img\n data-testid={`${PAGE_NAME}_image`}\n src={downloadLink}\n style={style.fileImage(!!props.imageDimensions, props.size)}\n alt=\"Attachment\"\n onLoad={props.onImageLoaded}\n />\n <div data-testid={`${PAGE_NAME}_button`} className={styles.cAttachmentImgPreviwBtn}>\n <FullSizeIcon />\n </div>\n </div>\n\n {!props.imageDimensions && (\n <div style={style.imagePlaceholder}>\n <ImageIcon\n data-testid={`${PAGE_NAME}_placeholder`}\n className={props.classes.imageIconRoot}\n htmlColor={grey400}\n fontSize=\"large\"\n />\n </div>\n )}\n\n {props.lightboxIsOpen && (\n <ImageViewer\n src={downloadLink}\n onClose={props.handleLightboxClose}\n onOpen={props.handleLightboxOpen}\n width={props.imageDimensions?.width}\n height={props.imageDimensions?.height}\n />\n )}\n </>\n );\n};\n\nconst FileAttachment = props => {\n const fileName = utils.getFileNameWithExtensionFromPath(props.displayName || props.attachmentUrl);\n\n const previewUrl = useSignedURL(props.attachmentFileName, 'inline');\n const downloadUrl = useSignedURL(props.attachmentFileName, 'attachment');\n\n const isPreviewUnavailable = getIsPreviewUnavailable(fileName);\n\n const handleFilePreviewOpen = () => {\n if (isPreviewUnavailable) return;\n props.openPreview();\n };\n\n return (\n <div className={styles.cAttachmentFileWrapper}>\n <div\n className={classNames(\n styles.cAttachmentFileDownloadWrapper,\n isPreviewUnavailable && props.classes.disabledPreview\n )}\n style={style.fileDownloadWrapper}\n onClick={handleFilePreviewOpen}\n >\n {isPreviewUnavailable ? (\n <UnavailableFileIcon className={props.classes.unavailableFileIcon} />\n ) : (\n <FileTypeIcon\n fileName={props.displayName || props.attachmentUrl}\n className={styles.cAttachmentFileDownloadWrapperFileIcon}\n size={props.small ? 25 : 50}\n />\n )}\n <div className={props.classes.titleContainer}>\n {isPreviewUnavailable && <div className={props.classes.caption}>Preview unavailable</div>}\n <div\n data-testid={`${PAGE_NAME}_name`}\n className={classNames(\n styles.cAttachmentFileDownloadWrapperFileName,\n isPreviewUnavailable && props.classes.fileName\n )}\n >\n <Typography variant=\"subtitle2\" noWrap className={props.classes.unavailableFileName}>\n {fileName}\n </Typography>\n </div>\n </div>\n <NewDocumentViewer\n fileUrl={previewUrl}\n classes={{\n root: props.classes.dialogRoot,\n paper: isNativeDetected ? props.classes.nativeDialog : props.classes.dialog,\n }}\n fileName={fileName}\n fileSize={props.attachmentSize}\n onClose={props.closePreview}\n open={props.previewIsOpen}\n />\n </div>\n <a\n download={props.displayName}\n href={downloadUrl}\n className={styles.cAttachmentFileDownloadWrapperForm}\n >\n <IconButton\n data-testid={`${PAGE_NAME}_downloadButton`}\n className={props.classes.downloadIcon}\n type=\"submit\"\n >\n <DownloadIcon size={24} className={props.classes.downloadIcon} />\n </IconButton>\n </a>\n </div>\n );\n};\n\n/* eslint-enable react/prop-types */\n\nfunction Attachment(props) {\n const [imageDimensions, setImageDimensions] = useState(undefined);\n const [isLightboxOpen, setIsLightboxOpen] = useState(false);\n const [isPreviewOpen, setIsPreviewOpen] = useState(false);\n\n const fileName = props.displayName || props.attachmentUrl || props.fileName;\n const isImage = getIsImage(fileName);\n const isVideo = getIsVideo(fileName);\n\n // Don't fetch download link if attachmentUrl is provided\n const downloadLink = useSignedURL(!props.attachmentUrl && props.fileName);\n const attachmentUrl = props.attachmentUrl || downloadLink;\n const preventIOSScroll = useCallback(e => e.preventDefault(), []);\n\n // NOTE: iOS WebView has a bug when background content of React Modal is scrollable\n // Source: https://github.com/reactjs/react-modal/issues/369\n const handleLightboxOpen = useCallback(() => {\n if (isNativeDetected) {\n // document.documentElement.style.overflowY = 'hidden';\n document.documentElement.addEventListener('touchmove', preventIOSScroll, {\n passive: false,\n });\n }\n }, [preventIOSScroll]);\n\n const handleLightboxClose = useCallback(() => {\n if (isNativeDetected) {\n // document.documentElement.style.overflowY = 'visible';\n document.documentElement.removeEventListener('touchmove', preventIOSScroll);\n }\n setIsLightboxOpen(false);\n }, [preventIOSScroll]);\n\n const openLightbox = useCallback(() => setIsLightboxOpen(true), []);\n const onImageLoaded = useCallback(e => {\n const { naturalWidth, naturalHeight } = e.currentTarget;\n setImageDimensions({ width: naturalWidth, height: naturalHeight });\n }, []);\n const openPreview = useCallback(() => setIsPreviewOpen(true), []);\n const closePreview = useCallback(e => {\n e.stopPropagation();\n setIsPreviewOpen(false);\n }, []);\n\n if (isImage)\n return (\n <div className={styles.cAttachment}>\n <ImageAttachment\n size={props.size}\n openLightbox={openLightbox}\n attachmentFileName={props.fileName}\n attachmentUrl={props.attachmentUrl}\n onImageLoaded={onImageLoaded}\n imageDimensions={imageDimensions}\n lightboxIsOpen={isLightboxOpen}\n handleLightboxOpen={handleLightboxOpen}\n handleLightboxClose={handleLightboxClose}\n classes={props.classes}\n />\n </div>\n );\n\n if (isVideo && ReactPlayer.canPlay(attachmentUrl))\n return (\n <div className={styles.cAttachment}>\n <ReactPlayer\n data-testid={`${PAGE_NAME}_player`}\n className={styles.cAttachmentReactPlayer}\n url={attachmentUrl}\n config={{ file: { attributes: { preload: 'metadata' } } }}\n controls\n height={props.size === SIZES.small.label ? SIZES.small.value : SIZES.medium.value}\n width={null}\n />\n </div>\n );\n\n return (\n <div className={styles.cAttachment}>\n <FileAttachment\n attachmentUrl={attachmentUrl}\n attachmentFileName={props.fileName}\n attachmentSize={props.attachmentSize}\n displayName={props.displayName}\n openPreview={openPreview}\n closePreview={closePreview}\n previewIsOpen={isPreviewOpen}\n classes={props.classes}\n small={props.small}\n />\n </div>\n );\n}\n\nAttachment.propTypes = {\n attachmentUrl: PropTypes.string.isRequired,\n attachmentSize: PropTypes.number,\n displayName: PropTypes.string,\n fileName: PropTypes.string,\n size: PropTypes.oneOf([SIZES.small.label, SIZES.medium.label]),\n classes: PropTypes.shape({}).isRequired,\n small: PropTypes.bool,\n};\n\nAttachment.defaultProps = {\n displayName: null,\n fileName: null,\n attachmentSize: undefined,\n size: SIZES.medium.label,\n small: false,\n};\n\nexport default withStyles(muiStyles)(Attachment);\n"],"names":["grey200","grey","grey400","SIZES","label","value","style","fileImage","imageIsLoaded","size","maxWidth","borderRadius","overflow","maxHeight","display","cursor","fileDownloadWrapper","padding","border","width","imagePlaceholder","position","backgroundColor","marginTop","height","ImageAttachment","props","_props$imageDimension","_props$imageDimension2","downloadLink","useSignedURL","attachmentFileName","attachmentUrl","_jsxs","_Fragment","children","onClick","openLightbox","className","styles","cAttachmentImg","_jsx","concat","src","imageDimensions","alt","onLoad","onImageLoaded","cAttachmentImgPreviwBtn","FullSizeIcon","ImageIcon","classes","imageIconRoot","htmlColor","fontSize","lightboxIsOpen","ImageViewer","onClose","handleLightboxClose","onOpen","handleLightboxOpen","FileAttachment","fileName","utils","getFileNameWithExtensionFromPath","displayName","previewUrl","downloadUrl","isPreviewUnavailable","getIsPreviewUnavailable","cAttachmentFileWrapper","classNames","cAttachmentFileDownloadWrapper","disabledPreview","openPreview","UnavailableFileIcon","unavailableFileIcon","FileTypeIcon","cAttachmentFileDownloadWrapperFileIcon","small","titleContainer","caption","cAttachmentFileDownloadWrapperFileName","Typography","variant","noWrap","unavailableFileName","NewDocumentViewer","fileUrl","root","dialogRoot","paper","isNativeDetected","nativeDialog","dialog","fileSize","attachmentSize","closePreview","open","previewIsOpen","download","href","cAttachmentFileDownloadWrapperForm","IconButton","downloadIcon","type","DownloadIcon","Attachment","useState","undefined","_useState2","_slicedToArray","_useState","setImageDimensions","_useState4","_useState3","isLightboxOpen","setIsLightboxOpen","_useState6","_useState5","isPreviewOpen","setIsPreviewOpen","isImage","getIsImage","isVideo","getIsVideo","preventIOSScroll","useCallback","e","preventDefault","document","documentElement","addEventListener","passive","removeEventListener","currentTarget","naturalWidth","naturalHeight","stopPropagation","cAttachment","ReactPlayer","canPlay","cAttachmentReactPlayer","url","config","file","attributes","preload","controls","propTypes","PropTypes","string","isRequired","number","oneOf","shape","bool","defaultProps","Attachment$1","withStyles","theme","top","left","transform","margin","whiteSpace","textOverflow","fontWeight","color","palette","primary","text3","text9","marginRight","minWidth","flexDirection"],"mappings":"0yMAyBA,IAEMA,EAAUC,EAAK,KACfC,EAAUD,EAAK,KAEfE,EACG,CAAEC,MAAO,QAASC,MAAO,KAD5BF,EAEI,CAAEC,MAAO,SAAUC,MAAO,KAG9BC,EAAQ,CACZC,UAAW,SAACC,EAAeC,GAAI,MAAM,CACnCC,SAAU,OACVC,aAAc,EACdC,SAAU,SAGVC,UAAWJ,IAASN,EAAYC,MAAQD,EAAYE,MAAQF,EAAaE,MACzES,QAASN,EAAgB,UAAY,OACrCO,OAAQ,UACR,EACFC,oBAAqB,CACnBC,QAAS,qBACTC,OAA2B,oBAC3BP,aAAc,EACdD,SAAU,IACVS,MAAO,OAETC,iBAAkB,CAChBC,SAAU,WACVC,gBAAiBtB,EACjBW,aAAc,EACdY,UAAW,GACXC,OAAQ,IACRL,MAAO,MA6DLM,EAAkB,SAAAC,GAAS,IAAAC,EAAAC,EACzBC,EAAeC,EAAaJ,EAAMK,qBAAuBL,EAAMM,cAErE,OACEC,EAAAC,EAAA,CAAAC,SACE,CAAAF,EAAA,MAAA,CAAKG,QAASV,EAAMW,aAAcC,UAAWC,EAAOC,eAAeL,SACjE,CAAAM,EAAA,MAAA,CACE,cAAA,GAAAC,OAtGQ,aAsG0B,UAClCC,IAAKd,EACLvB,MAAOA,EAAMC,YAAYmB,EAAMkB,gBAAiBlB,EAAMjB,MACtDoC,IAAI,aACJC,OAAQpB,EAAMqB,gBAEhBN,EAAA,MAAA,CAAK,cAAA,GAAAC,OA5GK,aA4G8B,WAACJ,UAAWC,EAAOS,wBAAwBb,SACjFM,EAACQ,EAAY,UAIfvB,EAAMkB,iBACNH,EAAA,MAAA,CAAKnC,MAAOA,EAAMc,iBAAiBe,SACjCM,EAACS,EAAS,CACR,cAAA,GAAAR,OApHM,aAoHkC,gBACxCJ,UAAWZ,EAAMyB,QAAQC,cACzBC,UAAWnD,EACXoD,SAAS,YAKd5B,EAAM6B,gBACLd,EAACe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4B,EAAW0C,UAAY,CACrBrH,cAAesH,EAAUC,OAAOC,WAChCxD,eAAgBsD,EAAUG,OAC1BxF,YAAaqF,EAAUC,OACvBzF,SAAUwF,EAAUC,OACpB9I,KAAM6I,EAAUI,MAAM,CAACvJ,EAAYC,MAAOD,EAAaC,QACvD+C,QAASmG,EAAUK,MAAM,CAAA,GAAIH,WAC7BzE,MAAOuE,EAAUM,MAGnBjD,EAAWkD,aAAe,CACxB5F,YAAa,KACbH,SAAU,KACVkC,oBAAgBa,EAChBpG,KAAMN,EAAaC,MACnB2E,OAAO,GAGT,IAAA+E,EAAeC,GAhSG,SAAAC,GAAK,MAAK,CAC1B5G,cAAe,CACb/B,SAAU,WACV4I,IAAK,MACLC,KAAM,MACNC,UAAW,yBAEbrE,OAAQ,CACN3E,MAAO,MACPK,OAAQ,MACRd,SAAU,OACVW,SAAU,YAEZwE,aAAc,CACZ1E,MAAO,OACPK,OAAQ,OACRd,SAAU,OACVG,UAAW,OACXuJ,OAAQ,GAEV1E,WAAY,CAEVpE,gBAAiB,uBAEnBwC,SAAU,CACRlD,SAAU,SACVyJ,WAAY,SACZC,aAAc,WACdC,WAAY,KAEd/D,aAAc,CACZgE,MAAOR,EAAMS,QAAQC,QAAQC,OAE/BlG,gBAAiB,CACfnD,gBAAiB0I,EAAMS,QAAQC,QAAQE,OAEzChG,oBAAqB,CACnBiG,YAAa,GACbC,SAAU,IAEZ9F,eAAgB,CACdlE,QAAS,OACTiK,cAAe,SACf5J,MAAO,QAET8D,QAAS,CACP3B,SAAU,GACViH,WAAY,IACZpJ,MAAO,eAETmE,oBAAqB,CACnBhC,SAAU,GACViH,WAAY,KAEf,GA0OcR,CAAsBpD"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/Attachment/index.js"],"sourcesContent":["import { useCallback, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport ReactPlayer from 'react-player';\nimport classNames from 'classnames';\nimport { withStyles } from '@material-ui/core/styles';\nimport { Typography } from '@material-ui/core';\nimport ImageIcon from '@material-ui/icons/Image';\nimport FullSizeIcon from '@material-ui/icons/Fullscreen';\nimport grey from '@material-ui/core/colors/grey';\n\nimport { NewDocumentViewer } from '../NewDocumentViewer';\nimport { UnavailableFileIcon } from '../NewDocumentViewer/icons/UnavailableFileIcon';\nimport { ImageViewer } from '../../componentsV2/ImageViewer';\n\nimport styles from './styles.css';\n\nimport FileTypeIcon from '~components/FileTypeIcon';\nimport IconButton from '~components/IconButton';\nimport { isNativeDetected } from '~/utils/mobileDetect';\nimport { getIsImage, getIsVideo } from '~/utils/fileExtension';\nimport { getIsPreviewUnavailable } from '~/utils/filePreview';\nimport { DownloadIcon } from '~/icons';\nimport { useSignedURL } from '~/effects';\nimport utils from '~utils/main';\n\nconst PAGE_NAME = 'Attachment';\n\nconst grey200 = grey[200];\nconst grey400 = grey[400];\n\nconst SIZES = {\n small: { label: 'small', value: 135 },\n medium: { label: 'medium', value: 300 },\n};\n\nconst style = {\n fileImage: (imageIsLoaded, size) => ({\n maxWidth: '100%',\n borderRadius: 4,\n overflow: 'hidden',\n // NOTE: Makes one-line comment with image fits into comments container. Equals to\n // imagePlaceholder height\n maxHeight: size === SIZES.small.label ? SIZES.small.value : SIZES.medium.value,\n display: imageIsLoaded ? 'initial' : 'none',\n cursor: 'pointer',\n }),\n fileDownloadWrapper: {\n padding: '10px 10px 10px 5px',\n border: `1px solid #616161`,\n borderRadius: 3,\n maxWidth: 500, // NOTE: Corresponds to react-player max width\n width: '75%',\n },\n imagePlaceholder: {\n position: 'relative',\n backgroundColor: grey200,\n borderRadius: 3,\n marginTop: 10,\n height: 135,\n width: 135,\n },\n};\n\nconst muiStyles = theme => ({\n imageIconRoot: {\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n },\n dialog: {\n width: '95%',\n height: '95%',\n maxWidth: '100%',\n position: 'relative',\n },\n nativeDialog: {\n width: '100%',\n height: '100%',\n maxWidth: '100%',\n maxHeight: '100%',\n margin: 0,\n },\n dialogRoot: {\n // NOTE: Make background color similar to lightbox\n backgroundColor: 'rgba(0, 0, 0, 0.85)',\n },\n fileName: {\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n fontWeight: 400,\n },\n downloadIcon: {\n color: theme.palette.primary.text3,\n },\n disabledPreview: {\n backgroundColor: theme.palette.primary.text9,\n },\n unavailableFileIcon: {\n marginRight: 12,\n minWidth: 32,\n },\n titleContainer: {\n display: 'flex',\n flexDirection: 'column',\n width: '100%',\n },\n caption: {\n fontSize: 12,\n fontWeight: 400,\n width: 'fit-content',\n },\n unavailableFileName: {\n fontSize: 12,\n fontWeight: 400,\n },\n});\n\n/* eslint-disable react/prop-types */\nconst ImageAttachment = props => {\n const downloadLink = useSignedURL(props.attachmentFileName) || props.attachmentUrl;\n\n return (\n <>\n <div onClick={props.openLightbox} className={styles.cAttachmentImg}>\n <img\n data-testid={`${PAGE_NAME}_image`}\n src={downloadLink}\n style={style.fileImage(!!props.imageDimensions, props.size)}\n alt=\"Attachment\"\n onLoad={props.onImageLoaded}\n />\n <div data-testid={`${PAGE_NAME}_button`} className={styles.cAttachmentImgPreviwBtn}>\n <FullSizeIcon />\n </div>\n </div>\n\n {!props.imageDimensions && (\n <div style={style.imagePlaceholder}>\n <ImageIcon\n data-testid={`${PAGE_NAME}_placeholder`}\n className={props.classes.imageIconRoot}\n htmlColor={grey400}\n fontSize=\"large\"\n />\n </div>\n )}\n\n {props.lightboxIsOpen && (\n <ImageViewer\n src={downloadLink}\n onClose={props.handleLightboxClose}\n onOpen={props.handleLightboxOpen}\n width={props.imageDimensions?.width}\n height={props.imageDimensions?.height}\n />\n )}\n </>\n );\n};\n\nconst FileAttachment = props => {\n const fileName = utils.getFileNameWithExtensionFromPath(props.displayName || props.attachmentUrl);\n\n const previewUrl = useSignedURL(props.attachmentFileName, 'inline');\n const downloadUrl = useSignedURL(props.attachmentFileName, 'attachment');\n\n const isPreviewUnavailable = getIsPreviewUnavailable(fileName);\n\n const handleFilePreviewOpen = () => {\n if (isPreviewUnavailable) return;\n props.openPreview();\n };\n\n return (\n <div className={styles.cAttachmentFileWrapper}>\n <div\n className={classNames(\n styles.cAttachmentFileDownloadWrapper,\n isPreviewUnavailable && props.classes.disabledPreview\n )}\n style={style.fileDownloadWrapper}\n onClick={handleFilePreviewOpen}\n >\n {isPreviewUnavailable ? (\n <UnavailableFileIcon className={props.classes.unavailableFileIcon} />\n ) : (\n <FileTypeIcon\n fileName={props.displayName || props.attachmentUrl}\n className={styles.cAttachmentFileDownloadWrapperFileIcon}\n size={props.small ? 25 : 50}\n />\n )}\n <div className={props.classes.titleContainer}>\n {isPreviewUnavailable && <div className={props.classes.caption}>Preview unavailable</div>}\n <div\n data-testid={`${PAGE_NAME}_name`}\n className={classNames(\n styles.cAttachmentFileDownloadWrapperFileName,\n isPreviewUnavailable && props.classes.fileName\n )}\n >\n <Typography variant=\"subtitle2\" noWrap className={props.classes.unavailableFileName}>\n {fileName}\n </Typography>\n </div>\n </div>\n <NewDocumentViewer\n fileUrl={previewUrl}\n classes={{\n root: props.classes.dialogRoot,\n paper: isNativeDetected ? props.classes.nativeDialog : props.classes.dialog,\n }}\n fileName={fileName}\n fileSize={props.attachmentSize}\n onClose={props.closePreview}\n open={props.previewIsOpen}\n />\n </div>\n <a\n download={props.displayName}\n href={downloadUrl}\n className={styles.cAttachmentFileDownloadWrapperForm}\n >\n <IconButton\n data-testid={`${PAGE_NAME}_downloadButton`}\n className={props.classes.downloadIcon}\n type=\"submit\"\n >\n <DownloadIcon size={24} className={props.classes.downloadIcon} />\n </IconButton>\n </a>\n </div>\n );\n};\n\n/* eslint-enable react/prop-types */\n\nfunction Attachment(props) {\n const [imageDimensions, setImageDimensions] = useState(undefined);\n const [isLightboxOpen, setIsLightboxOpen] = useState(false);\n const [isPreviewOpen, setIsPreviewOpen] = useState(false);\n\n const fileName = props.displayName || props.attachmentUrl || props.fileName;\n const isImage = getIsImage(fileName);\n const isVideo = getIsVideo(fileName);\n\n // Don't fetch download link if attachmentUrl is provided\n const downloadLink = useSignedURL(!props.attachmentUrl && props.fileName);\n const attachmentUrl = props.attachmentUrl || downloadLink;\n const preventIOSScroll = useCallback(e => e.preventDefault(), []);\n\n // NOTE: iOS WebView has a bug when background content of React Modal is scrollable\n // Source: https://github.com/reactjs/react-modal/issues/369\n const handleLightboxOpen = useCallback(() => {\n if (isNativeDetected) {\n // document.documentElement.style.overflowY = 'hidden';\n document.documentElement.addEventListener('touchmove', preventIOSScroll, {\n passive: false,\n });\n }\n }, [preventIOSScroll]);\n\n const handleLightboxClose = useCallback(() => {\n if (isNativeDetected) {\n // document.documentElement.style.overflowY = 'visible';\n document.documentElement.removeEventListener('touchmove', preventIOSScroll);\n }\n setIsLightboxOpen(false);\n }, [preventIOSScroll]);\n\n const openLightbox = useCallback(() => setIsLightboxOpen(true), []);\n const onImageLoaded = useCallback(e => {\n const { naturalWidth, naturalHeight } = e.currentTarget;\n setImageDimensions({ width: naturalWidth, height: naturalHeight });\n }, []);\n const openPreview = useCallback(() => setIsPreviewOpen(true), []);\n const closePreview = useCallback(e => {\n e.stopPropagation();\n setIsPreviewOpen(false);\n }, []);\n\n if (isImage)\n return (\n <div className={styles.cAttachment}>\n <ImageAttachment\n size={props.size}\n openLightbox={openLightbox}\n attachmentFileName={props.fileName}\n attachmentUrl={props.attachmentUrl}\n onImageLoaded={onImageLoaded}\n imageDimensions={imageDimensions}\n lightboxIsOpen={isLightboxOpen}\n handleLightboxOpen={handleLightboxOpen}\n handleLightboxClose={handleLightboxClose}\n classes={props.classes}\n />\n </div>\n );\n\n if (isVideo && ReactPlayer.canPlay(attachmentUrl))\n return (\n <div className={styles.cAttachment}>\n <ReactPlayer\n data-testid={`${PAGE_NAME}_player`}\n className={styles.cAttachmentReactPlayer}\n url={attachmentUrl}\n config={{ file: { attributes: { preload: 'metadata' } } }}\n controls\n height={props.size === SIZES.small.label ? SIZES.small.value : SIZES.medium.value}\n width={null}\n />\n </div>\n );\n\n return (\n <div className={styles.cAttachment}>\n <FileAttachment\n attachmentUrl={attachmentUrl}\n attachmentFileName={props.fileName}\n attachmentSize={props.attachmentSize}\n displayName={props.displayName}\n openPreview={openPreview}\n closePreview={closePreview}\n previewIsOpen={isPreviewOpen}\n classes={props.classes}\n small={props.small}\n />\n </div>\n );\n}\n\nAttachment.propTypes = {\n attachmentUrl: PropTypes.string.isRequired,\n attachmentSize: PropTypes.number,\n displayName: PropTypes.string,\n fileName: PropTypes.string,\n size: PropTypes.oneOf([SIZES.small.label, SIZES.medium.label]),\n classes: PropTypes.shape({}).isRequired,\n small: PropTypes.bool,\n};\n\nAttachment.defaultProps = {\n displayName: null,\n fileName: null,\n attachmentSize: undefined,\n size: SIZES.medium.label,\n small: false,\n};\n\nexport default withStyles(muiStyles)(Attachment);\n"],"names":["grey200","grey","grey400","SIZES","label","value","style","fileImage","imageIsLoaded","size","maxWidth","borderRadius","overflow","maxHeight","display","cursor","fileDownloadWrapper","padding","border","width","imagePlaceholder","position","backgroundColor","marginTop","height","ImageAttachment","props","_props$imageDimension","_props$imageDimension2","downloadLink","useSignedURL","attachmentFileName","attachmentUrl","_jsxs","_Fragment","children","onClick","openLightbox","className","styles","cAttachmentImg","_jsx","concat","src","imageDimensions","alt","onLoad","onImageLoaded","cAttachmentImgPreviwBtn","FullSizeIcon","ImageIcon","classes","imageIconRoot","htmlColor","fontSize","lightboxIsOpen","ImageViewer","onClose","handleLightboxClose","onOpen","handleLightboxOpen","FileAttachment","fileName","utils","getFileNameWithExtensionFromPath","displayName","previewUrl","downloadUrl","isPreviewUnavailable","getIsPreviewUnavailable","cAttachmentFileWrapper","classNames","cAttachmentFileDownloadWrapper","disabledPreview","openPreview","UnavailableFileIcon","unavailableFileIcon","FileTypeIcon","cAttachmentFileDownloadWrapperFileIcon","small","titleContainer","caption","cAttachmentFileDownloadWrapperFileName","Typography","variant","noWrap","unavailableFileName","NewDocumentViewer","fileUrl","root","dialogRoot","paper","isNativeDetected","nativeDialog","dialog","fileSize","attachmentSize","closePreview","open","previewIsOpen","download","href","cAttachmentFileDownloadWrapperForm","IconButton","downloadIcon","type","DownloadIcon","Attachment","useState","undefined","_useState2","_slicedToArray","_useState","setImageDimensions","_useState4","_useState3","isLightboxOpen","setIsLightboxOpen","_useState6","_useState5","isPreviewOpen","setIsPreviewOpen","isImage","getIsImage","isVideo","getIsVideo","preventIOSScroll","useCallback","e","preventDefault","document","documentElement","addEventListener","passive","removeEventListener","currentTarget","naturalWidth","naturalHeight","stopPropagation","cAttachment","ReactPlayer","canPlay","cAttachmentReactPlayer","url","config","file","attributes","preload","controls","propTypes","PropTypes","string","isRequired","number","oneOf","shape","bool","defaultProps","Attachment$1","withStyles","theme","top","left","transform","margin","whiteSpace","textOverflow","fontWeight","color","palette","primary","text3","text9","marginRight","minWidth","flexDirection"],"mappings":"21MAyBA,IAEMA,EAAUC,EAAK,KACfC,EAAUD,EAAK,KAEfE,EACG,CAAEC,MAAO,QAASC,MAAO,KAD5BF,EAEI,CAAEC,MAAO,SAAUC,MAAO,KAG9BC,EAAQ,CACZC,UAAW,SAACC,EAAeC,GAAI,MAAM,CACnCC,SAAU,OACVC,aAAc,EACdC,SAAU,SAGVC,UAAWJ,IAASN,EAAYC,MAAQD,EAAYE,MAAQF,EAAaE,MACzES,QAASN,EAAgB,UAAY,OACrCO,OAAQ,UACR,EACFC,oBAAqB,CACnBC,QAAS,qBACTC,OAA2B,oBAC3BP,aAAc,EACdD,SAAU,IACVS,MAAO,OAETC,iBAAkB,CAChBC,SAAU,WACVC,gBAAiBtB,EACjBW,aAAc,EACdY,UAAW,GACXC,OAAQ,IACRL,MAAO,MA6DLM,EAAkB,SAAAC,GAAS,IAAAC,EAAAC,EACzBC,EAAeC,EAAaJ,EAAMK,qBAAuBL,EAAMM,cAErE,OACEC,EAAAC,EAAA,CAAAC,SACE,CAAAF,EAAA,MAAA,CAAKG,QAASV,EAAMW,aAAcC,UAAWC,EAAOC,eAAeL,SACjE,CAAAM,EAAA,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QAAQC,OAE/BlG,gBAAiB,CACfnD,gBAAiB0I,EAAMS,QAAQC,QAAQE,OAEzChG,oBAAqB,CACnBiG,YAAa,GACbC,SAAU,IAEZ9F,eAAgB,CACdlE,QAAS,OACTiK,cAAe,SACf5J,MAAO,QAET8D,QAAS,CACP3B,SAAU,GACViH,WAAY,IACZpJ,MAAO,eAETmE,oBAAqB,CACnBhC,SAAU,GACViH,WAAY,KAEf,GA0OcR,CAAsBpD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttachmentPreview.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentPreview/AttachmentPreview.tsx"],"names":[],"mappings":"AASA,OAAO,EAAyB,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"AttachmentPreview.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentPreview/AttachmentPreview.tsx"],"names":[],"mappings":"AASA,OAAO,EAAyB,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAsK1F,eAAO,MAAM,iBAAiB,mHAkB7B,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as o,jsxs as s,Fragment as i}from"react/jsx-runtime";import{forwardRef as c}from"react";import n from"classnames";import{FileIcon as t}from"../../componentsV2/FileIcon/FileIcon.js";import{ButtonIcon as r}from"../../componentsV2/ButtonIcon/ButtonIcon.js";import{Tooltip as e}from"../../componentsV2/Tooltip/Tooltip.js";import{LoaderCircular as m}from"../../componentsV2/LoaderCircular/LoaderCircular.js";import{PlayOneIcon as a,DownloadIcon as l,UndoIcon as p,CloseSmallIcon as u}from"../../icons/iconParkIcons.js";import"../../icons/customIcons/icons/AddMessage.js";import"../../icons/customIcons/icons/Attention.js";import"../../icons/customIcons/icons/Collapse.js";import"../../icons/customIcons/icons/Dashboard.js";import"../../icons/customIcons/icons/Expand.js";import"../../icons/customIcons/icons/FolderClosed.js";import"../../icons/customIcons/icons/FolderClosedFilled.js";import"../../icons/customIcons/icons/FolderOpened.js";import"../../icons/customIcons/icons/GreaterOrEqual.js";import"../../icons/customIcons/icons/LessOrEqual.js";import"../../icons/customIcons/icons/Search.js";import"../../icons/customIcons/icons/SearchOne.js";import"../../icons/customIcons/icons/Wellhub.js";import"../../icons/customIcons/icons/MultiRuler.js";import"../../icons/customIcons/icons/Checkbox.js";import"../../icons/customIcons/icons/CheckboxChecked.js";import"../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../icons/customIcons/icons/Radio.js";import"../../icons/customIcons/icons/RadioChecked.js";import"../../icons/customIcons/icons/SimulFrac.js";import"../../icons/customIcons/icons/ZipperFrac.js";import"../../icons/customIcons/icons/CautionFilled.js";import"../../icons/customIcons/icons/MoreApp.js";import"../../icons/customIcons/icons/Pad.js";import"../../icons/customIcons/icons/DrilloutUnit.js";import"../../icons/customIcons/icons/FracFleet.js";import"../../icons/customIcons/icons/Global.js";import"../../icons/customIcons/icons/Program.js";import"../../icons/customIcons/icons/Rig.js";import"../../icons/customIcons/icons/Well.js";import"../../icons/customIcons/icons/Gap.js";import"../../icons/customIcons/icons/Pin.js";import"../../icons/customIcons/icons/CloseOneFilled.js";import"../../icons/customIcons/icons/AttentionFilled.js";import"../../icons/customIcons/icons/CheckOneFilled.js";import"../../icons/customIcons/icons/Archive.js";import"../../icons/customIcons/icons/ArchiveCancel.js";import"../../icons/customIcons/icons/Unarchive.js";import"../../icons/customIcons/icons/Archived.js";import"../../icons/customIcons/icons/InterventionUnit.js";import"../../icons/customIcons/icons/CloudDelete.js";import"../../icons/customIcons/icons/Lasso.js";import"../../icons/customIcons/icons/Radius.js";import"../../icons/customIcons/icons/ErrorOps.js";import"../../icons/customIcons/icons/DataTypeOps.js";import"../../icons/customIcons/icons/FalsePositiveOps.js";import"../../icons/customIcons/icons/CalibrationOps.js";import"../../icons/customIcons/icons/CriticalOps.js";import"../../icons/customIcons/icons/Company.js";import"../../icons/customIcons/icons/ArchiveOne.js";import"../../icons/customIcons/icons/ParseBotFusion.js";import"../../icons/customIcons/icons/Connect.js";import"../../icons/customIcons/icons/PuzzleOne.js";import"../../icons/customIcons/icons/Feed.js";import"../../icons/customIcons/icons/Prompt.js";import"../../icons/customIcons/icons/Companies.js";import"../../icons/customIcons/icons/ClipboardAi.js";import"../../icons/customIcons/icons/Key.js";import"../../icons/customIcons/icons/AtSignCrossed.js";import"../../icons/customIcons/icons/MappingManual.js";import"../../icons/customIcons/icons/Mapping.js";import"../../icons/customIcons/icons/Metrics.js";import"../../icons/customIcons/icons/Drops.js";import"../../icons/customIcons/icons/ClipboardSearch.js";import"../../icons/customIcons/icons/Template.js";import"../../icons/customIcons/icons/ClipboardMetrics.js";import"../../icons/customIcons/icons/ClipboardBuilder.js";import"../../icons/customIcons/icons/UnitConversion.js";import"../../icons/customIcons/icons/NPT.js";import"../../icons/customIcons/icons/GuidedFrac.js";import d from"./AttachmentPreview.scss.js";import I from"../../utils/main.js";var j=function(o){var s,i=o.split(".");return i.length>1?(null!==(s=i.pop())&&void 0!==s?s:"").toUpperCase():""},h=function(o){return function(s){s.stopPropagation(),o()}},v=function(c){var t=c.item,a=c.onRemove,l=c.onRetry;return s(i,{children:[t.isUploading&&s(i,{children:[o("div",{className:d.uploadingOverlay}),o("div",{className:d.uploadingSpinner,children:o(m,{size:"xs",className:d.loader})})]}),!!t.error&&s(i,{children:[o("div",{className:d.errorOverlay}),l&&o(e,{title:"Retry upload",children:o("div",{className:d.retryButton,children:o(r,{size:"xs",type:"tertiaryBg",onClick:h((function(){return l(t.id)})),testId:"attachment-retry",children:o(p,{size:"small"})})})})]}),a&&!t.isUploading&&o("div",{className:n(d.removeButton,!!t.error&&d.removeButtonVisible),children:o(r,{size:"xs",type:"tertiaryBg",onClick:h((function(){return a(t.id)})),testId:"attachment-remove",children:o(u,{size:"small"})})})]})},C=function(c){var
|
|
1
|
+
import{jsx as o,jsxs as s,Fragment as i}from"react/jsx-runtime";import{forwardRef as c}from"react";import n from"classnames";import{FileIcon as t}from"../../componentsV2/FileIcon/FileIcon.js";import{ButtonIcon as r}from"../../componentsV2/ButtonIcon/ButtonIcon.js";import{Tooltip as e}from"../../componentsV2/Tooltip/Tooltip.js";import{LoaderCircular as m}from"../../componentsV2/LoaderCircular/LoaderCircular.js";import{PlayOneIcon as a,DownloadIcon as l,UndoIcon as p,CloseSmallIcon as u}from"../../icons/iconParkIcons.js";import"../../icons/customIcons/icons/AddMessage.js";import"../../icons/customIcons/icons/DragOne.js";import"../../icons/customIcons/icons/Attention.js";import"../../icons/customIcons/icons/Collapse.js";import"../../icons/customIcons/icons/Dashboard.js";import"../../icons/customIcons/icons/Expand.js";import"../../icons/customIcons/icons/FolderClosed.js";import"../../icons/customIcons/icons/FolderClosedFilled.js";import"../../icons/customIcons/icons/FolderOpened.js";import"../../icons/customIcons/icons/GreaterOrEqual.js";import"../../icons/customIcons/icons/LessOrEqual.js";import"../../icons/customIcons/icons/Search.js";import"../../icons/customIcons/icons/SearchOne.js";import"../../icons/customIcons/icons/Wellhub.js";import"../../icons/customIcons/icons/MultiRuler.js";import"../../icons/customIcons/icons/Checkbox.js";import"../../icons/customIcons/icons/CheckboxChecked.js";import"../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../icons/customIcons/icons/Radio.js";import"../../icons/customIcons/icons/RadioChecked.js";import"../../icons/customIcons/icons/SimulFrac.js";import"../../icons/customIcons/icons/ZipperFrac.js";import"../../icons/customIcons/icons/CautionFilled.js";import"../../icons/customIcons/icons/MoreApp.js";import"../../icons/customIcons/icons/Pad.js";import"../../icons/customIcons/icons/DrilloutUnit.js";import"../../icons/customIcons/icons/FracFleet.js";import"../../icons/customIcons/icons/Global.js";import"../../icons/customIcons/icons/Program.js";import"../../icons/customIcons/icons/Rig.js";import"../../icons/customIcons/icons/Well.js";import"../../icons/customIcons/icons/Gap.js";import"../../icons/customIcons/icons/Pin.js";import"../../icons/customIcons/icons/CloseOneFilled.js";import"../../icons/customIcons/icons/AttentionFilled.js";import"../../icons/customIcons/icons/CheckOneFilled.js";import"../../icons/customIcons/icons/Archive.js";import"../../icons/customIcons/icons/ArchiveCancel.js";import"../../icons/customIcons/icons/Unarchive.js";import"../../icons/customIcons/icons/Archived.js";import"../../icons/customIcons/icons/InterventionUnit.js";import"../../icons/customIcons/icons/CloudDelete.js";import"../../icons/customIcons/icons/Lasso.js";import"../../icons/customIcons/icons/Radius.js";import"../../icons/customIcons/icons/ErrorOps.js";import"../../icons/customIcons/icons/DataTypeOps.js";import"../../icons/customIcons/icons/FalsePositiveOps.js";import"../../icons/customIcons/icons/CalibrationOps.js";import"../../icons/customIcons/icons/CriticalOps.js";import"../../icons/customIcons/icons/Company.js";import"../../icons/customIcons/icons/ArchiveOne.js";import"../../icons/customIcons/icons/ParseBotFusion.js";import"../../icons/customIcons/icons/Connect.js";import"../../icons/customIcons/icons/PuzzleOne.js";import"../../icons/customIcons/icons/Feed.js";import"../../icons/customIcons/icons/Prompt.js";import"../../icons/customIcons/icons/Companies.js";import"../../icons/customIcons/icons/ClipboardAi.js";import"../../icons/customIcons/icons/Key.js";import"../../icons/customIcons/icons/AtSignCrossed.js";import"../../icons/customIcons/icons/MappingManual.js";import"../../icons/customIcons/icons/Mapping.js";import"../../icons/customIcons/icons/Metrics.js";import"../../icons/customIcons/icons/Drops.js";import"../../icons/customIcons/icons/ClipboardSearch.js";import"../../icons/customIcons/icons/Template.js";import"../../icons/customIcons/icons/ClipboardMetrics.js";import"../../icons/customIcons/icons/ClipboardBuilder.js";import"../../icons/customIcons/icons/UnitConversion.js";import"../../icons/customIcons/icons/NPT.js";import"../../icons/customIcons/icons/GuidedFrac.js";import d from"./AttachmentPreview.scss.js";import I from"../../utils/main.js";var j=function(o){var s,i=o.split(".");return i.length>1?(null!==(s=i.pop())&&void 0!==s?s:"").toUpperCase():""},h=function(o){return function(s){s.stopPropagation(),o()}},v=function(c){var t=c.item,a=c.onRemove,l=c.onRetry;return s(i,{children:[t.isUploading&&s(i,{children:[o("div",{className:d.uploadingOverlay}),o("div",{className:d.uploadingSpinner,children:o(m,{size:"xs",className:d.loader})})]}),!!t.error&&s(i,{children:[o("div",{className:d.errorOverlay}),l&&o(e,{title:"Retry upload",children:o("div",{className:d.retryButton,children:o(r,{size:"xs",type:"tertiaryBg",onClick:h((function(){return l(t.id)})),testId:"attachment-retry",children:o(p,{size:"small"})})})})]}),a&&!t.isUploading&&o(e,{title:"Remove",children:o("div",{className:n(d.removeButton,!!t.error&&d.removeButtonVisible),children:o(r,{size:"xs",type:"tertiaryBg",onClick:h((function(){return a(t.id)})),testId:"attachment-remove",children:o(u,{size:"small"})})})})]})},C=function(c){var m,p,u=c.item,h=c.onRemove,C=c.onRetry,f=c.onItemClick,g=null!==(m=u.kind)&&void 0!==m?m:"file",N=o(v,{item:u,onRemove:h,onRetry:C}),y=I.getFileNameWithExtensionFromPath(u.name);if("image"===g||"video"===g){var b=!!f&&!u.isUploading&&!u.error;return s("div",{className:n(d.thumbnail,b&&d.clickable,!!u.error&&d.thumbnailError),onClick:b?function(){return null==f?void 0:f(u)}:void 0,children:[o("div",{className:d.thumbnailInner,children:"image"===g?o("img",{src:u.src,alt:y,className:d.thumbnailImage}):o("video",{src:(p=u.src,p&&!p.includes("#t=")?"".concat(p,"#t=0.1"):p),className:d.thumbnailImage,preload:"metadata",playsInline:!0,muted:!0})}),"video"===g&&o("div",{className:d.videoOverlay,children:o(a,{theme:"filled",className:d.playIcon})}),N]})}var F,O=!(!u.downloadUrl||h||u.isUploading||u.error),R=s(i,{children:[s("div",{className:d.fileCardContent,children:[o(t,{name:y}),s("div",{className:d.fileInfo,children:[o(e,{title:y,children:o("div",{className:d.fileName,children:(F=y,F.replace(/\.[^/.]+$/,""))})}),o("div",{className:d.fileType,children:j(y)})]})]}),O&&o(e,{title:"Download",children:o("div",{className:d.downloadButton,children:o(r,{size:"xs",type:"tertiaryBg",testId:"attachment-download-button",children:o(l,{size:"small"})})})}),N]});return O?o("a",{href:u.downloadUrl,download:y,className:n(d.fileCard,d.fileCardLink),"data-testid":"attachment-download",children:R}):o("div",{className:n(d.fileCard,!!u.error&&d.thumbnailError),children:R})},f=c((function(s,i){var c=s.items,t=s.onRemove,r=s.onRetry,e=s.onItemClick,m=s.className,a=s.testId;return c.length?o("div",{ref:i,"data-testid":a,className:n(d.scroller,m),children:c.map((function(s){return o(C,{item:s,onRemove:t,onRetry:r,onItemClick:e},s.id)}))}):null}));export{f as AttachmentPreview};
|
|
2
2
|
//# sourceMappingURL=AttachmentPreview.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import t from'./../../ext-esm/style-inject/dist/style-inject.es.js';var e={spacing:"8",scroller:"AttachmentPreview_scroller__ZqYC8",thumbnail:"AttachmentPreview_thumbnail__ytI2L",clickable:"AttachmentPreview_clickable__BEXzK",thumbnailInner:"AttachmentPreview_thumbnailInner__9Ex4-",thumbnailImage:"AttachmentPreview_thumbnailImage__RQ4fL",videoOverlay:"AttachmentPreview_videoOverlay__5Lgi1",playIcon:"AttachmentPreview_playIcon__OOnql",fileCard:"AttachmentPreview_fileCard__oxDbD",fileCardLink:"AttachmentPreview_fileCardLink__TDpvh",fileCardContent:"AttachmentPreview_fileCardContent__c-99Q",fileInfo:"AttachmentPreview_fileInfo__eqJ-B",fileName:"AttachmentPreview_fileName__1Ccg0",fileType:"AttachmentPreview_fileType__0v6E4",downloadButton:"AttachmentPreview_downloadButton__9oBz-",removeButton:"AttachmentPreview_removeButton__aX-qu",removeButtonVisible:"AttachmentPreview_removeButtonVisible__BVjYB",thumbnailError:"AttachmentPreview_thumbnailError__yyH08",uploadingOverlay:"AttachmentPreview_uploadingOverlay__leV1D",uploadingSpinner:"AttachmentPreview_uploadingSpinner__u-t7d",loader:"AttachmentPreview_loader__HK5bZ",errorOverlay:"AttachmentPreview_errorOverlay__8sM1d",retryButton:"AttachmentPreview_retryButton__tKVV0"};t(".AttachmentPreview_scroller__ZqYC8{-ms-overflow-style:none;align-items:flex-start;display:flex;gap:8px;overflow-x:auto;overflow-y:visible;padding-top:6px;scroll-behavior:smooth;scrollbar-width:none}.AttachmentPreview_scroller__ZqYC8::-webkit-scrollbar{display:none}.AttachmentPreview_thumbnail__ytI2L{border-radius:8px;flex-shrink:0;height:64px;overflow:visible;position:relative;width:64px}.AttachmentPreview_clickable__BEXzK{cursor:pointer}.AttachmentPreview_clickable__BEXzK:hover{opacity:.9}.AttachmentPreview_thumbnailInner__9Ex4-{border-radius:8px;inset:0;overflow:hidden;pointer-events:none;position:absolute}.AttachmentPreview_thumbnailImage__RQ4fL{height:100%;left:50%;max-width:none;min-width:100%;object-fit:cover;pointer-events:none;position:absolute;top:0;transform:translateX(-50%);width:auto}.AttachmentPreview_videoOverlay__5Lgi1{align-items:center;background:rgb(from var(--palette-background-b-1) r g b/.5);border-radius:8px;display:flex;inset:0;justify-content:center;pointer-events:none;position:absolute}.AttachmentPreview_playIcon__OOnql{color:var(--palette-primary-text-1);font-size:32px}.AttachmentPreview_fileCard__oxDbD{align-items:flex-start;border:1px solid rgb(from var(--palette-primary-text-1) r g b/.08);border-radius:8px;display:flex;flex-direction:column;flex-shrink:0;height:64px;justify-content:center;padding:8px 16px;position:relative;width:142px}.AttachmentPreview_fileCardLink__TDpvh{color:inherit;cursor:pointer;text-decoration:none}.AttachmentPreview_fileCardLink__TDpvh:hover{border-color:rgb(from var(--palette-primary-text-1) r g b/.16)}.AttachmentPreview_fileCardContent__c-99Q{align-items:center;display:flex;gap:8px;width:100%}.AttachmentPreview_fileInfo__eqJ-B{align-items:flex-start;display:flex;flex:1 0 0;flex-direction:column;justify-content:center;min-width:0}.AttachmentPreview_fileName__1Ccg0{color:var(--palette-primary-text-1)}.AttachmentPreview_fileName__1Ccg0,.AttachmentPreview_fileType__0v6E4{font-size:14px;line-height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.AttachmentPreview_fileType__0v6E4{color:var(--palette-primary-text-6);text-transform:uppercase}.AttachmentPreview_downloadButton__9oBz-{opacity:0;position:absolute;right:-6px;top:-6px;transition:opacity .2s;z-index:3}.AttachmentPreview_downloadButton__9oBz- button{backdrop-filter:blur(4px);background-color:rgb(from var(--palette-primary-text-1) r g b/.08)!important}.AttachmentPreview_downloadButton__9oBz- button:hover{background-color:rgb(from var(--palette-primary-text-1) r g b/.15)!important}.AttachmentPreview_fileCard__oxDbD:hover .AttachmentPreview_downloadButton__9oBz-{opacity:1}.AttachmentPreview_removeButton__aX-qu{opacity:0;position:absolute;right:-6px;top:-6px;transition:opacity .2s;z-index:3}.AttachmentPreview_removeButton__aX-qu button{backdrop-filter:blur(4px);background-color:rgb(from var(--palette-primary-text-1) r g b/.08)!important}.AttachmentPreview_removeButton__aX-qu button:hover{background-color:rgb(from var(--palette-primary-text-1) r g b/.15)!important}.AttachmentPreview_fileCard__oxDbD:hover .AttachmentPreview_removeButton__aX-qu,.AttachmentPreview_removeButtonVisible__BVjYB,.AttachmentPreview_thumbnail__ytI2L:hover .AttachmentPreview_removeButton__aX-qu{opacity:1}.AttachmentPreview_thumbnailError__yyH08{border:1px solid rgb(from var(--palette-error-main) r g b/.4)}.AttachmentPreview_uploadingOverlay__leV1D{background:rgb(from var(--palette-background-b-1) r g b/.5);border-radius:8px;inset:0;pointer-events:none;position:absolute}.AttachmentPreview_uploadingSpinner__u-t7d{align-items:center;backdrop-filter:blur(4px);background-color:rgb(from var(--palette-primary-text-1) r g b/.08);border-radius:6px;display:flex;height:24px;justify-content:center;position:absolute;right:-6px;top:-6px;width:24px;z-index:2}.AttachmentPreview_loader__HK5bZ{color:var(--palette-primary-text-6)!important;height:14px!important;width:14px!important}.AttachmentPreview_errorOverlay__8sM1d{background:rgb(from var(--palette-error-main) r g b/.08);border-radius:8px;inset:0;pointer-events:none;position:absolute}.AttachmentPreview_retryButton__tKVV0{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:2}.AttachmentPreview_retryButton__tKVV0 button{backdrop-filter:blur(4px);background-color:rgb(from var(--palette-primary-text-1) r g b/.08)!important}.AttachmentPreview_retryButton__tKVV0 button:hover{background-color:rgb(from var(--palette-primary-text-1) r g b/.15)!important}");export{e as default};
|
|
2
2
|
//# sourceMappingURL=AttachmentPreview.scss.js.map
|