@corva/ui 3.74.0-0 → 3.74.0-10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs-bundle/components/AddComment/Popover.js +1 -1
- package/cjs-bundle/components/AddComment/Popover.js.map +1 -1
- package/cjs-bundle/components/AddComment/components/Content.js +1 -1
- package/cjs-bundle/components/AddComment/components/Content.js.map +1 -1
- package/cjs-bundle/components/AssetEditor/AssetEditorAutocomplete.js +1 -1
- package/cjs-bundle/components/AssetEditor/AssetEditorAutocomplete.js.map +1 -1
- package/cjs-bundle/components/AssetEditorV2/index.js +1 -1
- package/cjs-bundle/components/AssetEditorV2/index.js.map +1 -1
- package/cjs-bundle/components/AttachmentLightbox/AttachmentDocument.js +2 -0
- package/cjs-bundle/components/AttachmentLightbox/AttachmentDocument.js.map +1 -0
- package/cjs-bundle/components/AttachmentLightbox/AttachmentLightbox.js +1 -1
- package/cjs-bundle/components/AttachmentLightbox/AttachmentLightbox.js.map +1 -1
- package/cjs-bundle/components/AttachmentLightbox/AttachmentLightbox.scss.js +1 -1
- package/cjs-bundle/components/AttachmentLightbox/AttachmentPreviewPane.js +2 -0
- package/cjs-bundle/components/AttachmentLightbox/AttachmentPreviewPane.js.map +1 -0
- package/cjs-bundle/components/AttachmentLightbox/copyImageToClipboard.js +2 -0
- package/cjs-bundle/components/AttachmentLightbox/copyImageToClipboard.js.map +1 -0
- package/cjs-bundle/components/AttachmentLightbox/downloadAttachment.js +2 -0
- package/cjs-bundle/components/AttachmentLightbox/downloadAttachment.js.map +1 -0
- package/cjs-bundle/components/AttachmentLightbox/useAttachmentLightbox.js +1 -1
- package/cjs-bundle/components/AttachmentLightbox/useAttachmentLightbox.js.map +1 -1
- package/cjs-bundle/components/AttachmentLightbox/useZoomPan.js +2 -0
- package/cjs-bundle/components/AttachmentLightbox/useZoomPan.js.map +1 -0
- package/cjs-bundle/components/AttachmentPreview/AttachmentActionsMenu.js +2 -0
- package/cjs-bundle/components/AttachmentPreview/AttachmentActionsMenu.js.map +1 -0
- package/cjs-bundle/components/AttachmentPreview/AttachmentDownloadLink.js +2 -0
- package/cjs-bundle/components/AttachmentPreview/AttachmentDownloadLink.js.map +1 -0
- package/cjs-bundle/components/AttachmentPreview/AttachmentImage.js +2 -0
- package/cjs-bundle/components/AttachmentPreview/AttachmentImage.js.map +1 -0
- package/cjs-bundle/components/AttachmentPreview/AttachmentPreview.js +1 -1
- package/cjs-bundle/components/AttachmentPreview/AttachmentPreview.js.map +1 -1
- package/cjs-bundle/components/AttachmentPreview/AttachmentPreview.scss.js +1 -1
- package/cjs-bundle/components/AttachmentPreview/AttachmentRow.js +1 -1
- package/cjs-bundle/components/AttachmentPreview/AttachmentRow.js.map +1 -1
- package/cjs-bundle/components/AttachmentPreview/AttachmentTile.js +1 -1
- package/cjs-bundle/components/AttachmentPreview/AttachmentTile.js.map +1 -1
- package/cjs-bundle/components/AttachmentPreview/useStoredAttachment.js +2 -0
- package/cjs-bundle/components/AttachmentPreview/useStoredAttachment.js.map +1 -0
- package/cjs-bundle/components/AttachmentPreview/useStoredAttachments.js +1 -1
- package/cjs-bundle/components/AttachmentPreview/useStoredAttachments.js.map +1 -1
- package/cjs-bundle/components/BICOffsetPickerDialog/index.js +1 -1
- package/cjs-bundle/components/BICOffsetPickerDialog/index.js.map +1 -1
- package/cjs-bundle/components/Casing/CasingTableV2/components/CasingJoints/Editor.js +1 -1
- package/cjs-bundle/components/Casing/CasingTableV2/components/CasingJoints/Editor.js.map +1 -1
- package/cjs-bundle/components/Casing/CasingTableV2/components/Component.js +1 -1
- package/cjs-bundle/components/Casing/CasingTableV2/components/Component.js.map +1 -1
- package/cjs-bundle/components/Casing/CasingTableV2/components/DrillPipe/Editor.js +1 -1
- package/cjs-bundle/components/Casing/CasingTableV2/components/DrillPipe/Editor.js.map +1 -1
- package/cjs-bundle/components/CollapsableSidebar.js +1 -1
- package/cjs-bundle/components/CollapsableSidebar.js.map +1 -1
- package/cjs-bundle/components/CommentCard/CommentCard.js +1 -1
- package/cjs-bundle/components/CommentCard/CommentCard.js.map +1 -1
- package/cjs-bundle/components/CommentCard/CommentCardReactions.js +1 -1
- package/cjs-bundle/components/CommentCard/CommentCardReactions.js.map +1 -1
- package/cjs-bundle/components/CommentCard/CommentMenu.js +1 -1
- package/cjs-bundle/components/CommentCard/CommentMenu.js.map +1 -1
- package/cjs-bundle/components/CommentComposer/CommentComposer.js +1 -1
- package/cjs-bundle/components/CommentComposer/CommentComposer.js.map +1 -1
- package/cjs-bundle/components/CommentComposer/CommentReplyInput.js +1 -1
- package/cjs-bundle/components/CommentComposer/CommentReplyInput.js.map +1 -1
- package/cjs-bundle/components/CommentComposer/ShareToChatRow.js +1 -1
- package/cjs-bundle/components/CommentComposer/ShareToChatRow.js.map +1 -1
- package/cjs-bundle/components/CommentComposer/useAttachmentUpload.js +1 -1
- package/cjs-bundle/components/CommentComposer/useAttachmentUpload.js.map +1 -1
- package/cjs-bundle/components/CommentInputNext/CommentInputNext.js +1 -1
- package/cjs-bundle/components/CommentInputNext/CommentInputNext.js.map +1 -1
- package/cjs-bundle/components/CommentInputNext/useFilePaste.js +2 -0
- package/cjs-bundle/components/CommentInputNext/useFilePaste.js.map +1 -0
- package/cjs-bundle/components/DevCenter/AppsDataProvider/AppsDataProvider.js +1 -1
- package/cjs-bundle/components/DevCenter/AppsDataProvider/AppsDataProvider.js.map +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js.map +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.js +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.js.map +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js.map +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.js +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.js.map +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/effects/useAppMaximized.js +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/effects/useAppMaximized.js.map +1 -1
- package/cjs-bundle/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js +1 -1
- package/cjs-bundle/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js.map +1 -1
- package/cjs-bundle/components/DevCenter/IsolatedDevCenterAppContainer/useFullscreenModes.js +2 -0
- package/cjs-bundle/components/DevCenter/IsolatedDevCenterAppContainer/useFullscreenModes.js.map +1 -0
- package/cjs-bundle/components/DocumentViewer/DocumentViewer.js +1 -1
- package/cjs-bundle/components/DocumentViewer/DocumentViewer.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Component.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Component.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js.map +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js +1 -1
- package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js.map +1 -1
- package/cjs-bundle/components/FeedItem/FeedItem.js +1 -1
- package/cjs-bundle/components/FeedItem/FeedItem.js.map +1 -1
- package/cjs-bundle/components/FeedItem/components/FeedComments.js +1 -1
- package/cjs-bundle/components/FeedItem/components/FeedComments.js.map +1 -1
- package/cjs-bundle/components/IconMenu/index.js +1 -1
- package/cjs-bundle/components/IconMenu/index.js.map +1 -1
- package/cjs-bundle/components/KeyboardDateTimePicker.js +1 -1
- package/cjs-bundle/components/KeyboardDateTimePicker.js.map +1 -1
- package/cjs-bundle/components/LinkedText/LinkedText.js +2 -0
- package/cjs-bundle/components/LinkedText/LinkedText.js.map +1 -0
- package/cjs-bundle/components/LinkedText/LinkedText.scss.js +2 -0
- package/cjs-bundle/components/LinkedText/LinkedText.scss.js.map +1 -0
- package/cjs-bundle/components/NewDocumentViewer/utils.js +1 -1
- package/cjs-bundle/components/NewDocumentViewer/utils.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/index.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/index.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/index.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/index.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/WellHubView/index.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/WellHubView/index.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/AppHeader/components/HeaderActions/HeaderActions.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/AppHeader/components/HeaderActions/HeaderActions.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/AppHeader/components/LoadAllWellsToggle/LoadAllWellsToggle.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/AppHeader/components/LoadAllWellsToggle/LoadAllWellsToggle.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/Filter.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/Filter.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/PeriodFilterSelect/PeriodFilterSelect.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/PeriodFilterSelect/PeriodFilterSelect.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/SingleFilterSelect/SingleFilterSelect.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/SingleFilterSelect/SingleFilterSelect.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/ClusterTooltip/ClusterTooltip.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/ClusterTooltip/ClusterTooltip.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/LayerSwitcher/LayerSwitcher.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/LayerSwitcher/LayerSwitcher.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapControls/MapControls.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapControls/MapControls.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapHints/MapHintsStash.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapHints/MapHintsStash.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/SubjectWellMarker/SubjectWellMarker.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/SubjectWellMarker/SubjectWellMarker.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AssetResultSection/AssetResultSection.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AssetResultSection/AssetResultSection.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AutoCompleteAssetSearch/AutoCompleteAssetSearch.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AutoCompleteAssetSearch/AutoCompleteAssetSearch.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/CompanyCell/CompanyCell.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/CompanyCell/CompanyCell.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/FormationCell/FormationCell.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/FormationCell/FormationCell.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/InterventionAssetCell/InterventionAssetCell.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/InterventionAssetCell/InterventionAssetCell.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/PadNameCell/PadNameCell.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/PadNameCell/PadNameCell.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/RigCell/RigCell.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/RigCell/RigCell.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/WellNameCell/WellNameCell.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/WellNameCell/WellNameCell.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/SettingsMenu.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/SettingsMenu.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/MetricsSettingsSection/MetricsSettingsSection.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/MetricsSettingsSection/MetricsSettingsSection.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/TableSettingsSection/TableSettingsSection.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/TableSettingsSection/TableSettingsSection.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/WellNameHeaderCell/WellNameHeaderCell.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/WellNameHeaderCell/WellNameHeaderCell.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/PickerModalActions/PickerModalActions.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/PickerModalActions/PickerModalActions.js.map +1 -1
- package/cjs-bundle/components/PadOffsetsPicker/StagesSelector.js +1 -1
- package/cjs-bundle/components/PadOffsetsPicker/StagesSelector.js.map +1 -1
- package/cjs-bundle/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js +1 -1
- package/cjs-bundle/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js.map +1 -1
- package/cjs-bundle/components/Popover/Popover.js +1 -1
- package/cjs-bundle/components/Popover/Popover.js.map +1 -1
- package/cjs-bundle/components/Popper/Popper.js +1 -1
- package/cjs-bundle/components/Popper/Popper.js.map +1 -1
- package/cjs-bundle/components/PostInput/PostInput.js +1 -1
- package/cjs-bundle/components/PostInput/PostInput.js.map +1 -1
- package/cjs-bundle/components/RealTimeValuesSidebar/SidebarFooter.js +1 -1
- package/cjs-bundle/components/RealTimeValuesSidebar/SidebarFooter.js.map +1 -1
- package/cjs-bundle/components/UserMention/constants.js +1 -1
- package/cjs-bundle/components/UserMention/constants.js.map +1 -1
- package/cjs-bundle/components/UserMention/index.js +1 -1
- package/cjs-bundle/components/UserMention/index.js.map +1 -1
- package/cjs-bundle/components/index.js +1 -1
- package/cjs-bundle/componentsV2/AppCommonsProvider/AppCommonsContext.js.map +1 -1
- package/cjs-bundle/componentsV2/AppCommonsProvider/utils.js +1 -1
- package/cjs-bundle/componentsV2/AppCommonsProvider/utils.js.map +1 -1
- package/cjs-bundle/componentsV2/AppHeader/V3/Actions/Actions.constants.js +1 -1
- package/cjs-bundle/componentsV2/AppHeader/V3/Actions/Actions.constants.js.map +1 -1
- package/cjs-bundle/componentsV2/AppHeader/V3/Actions/Actions.js +1 -1
- package/cjs-bundle/componentsV2/AppHeader/V3/Actions/Actions.js.map +1 -1
- package/cjs-bundle/componentsV2/AppHeader/V3/AppHeaderV3.js +1 -1
- package/cjs-bundle/componentsV2/AppHeader/V3/AppHeaderV3.js.map +1 -1
- package/cjs-bundle/componentsV2/ButtonIcon/ButtonIcon.js +1 -1
- package/cjs-bundle/componentsV2/ButtonIcon/ButtonIcon.js.map +1 -1
- package/cjs-bundle/componentsV2/ButtonIcon/ButtonIcon.scss.js +1 -1
- package/cjs-bundle/componentsV2/Chip/Chip.js +1 -1
- package/cjs-bundle/componentsV2/Chip/Chip.js.map +1 -1
- package/cjs-bundle/componentsV2/ColorPicker/ColorPicker.js +1 -1
- package/cjs-bundle/componentsV2/ColorPicker/ColorPicker.js.map +1 -1
- package/cjs-bundle/componentsV2/ColorPicker/ColorPicker.scss.js +1 -1
- package/cjs-bundle/componentsV2/ColorPicker/OpacityDragtracker/OpacityDragtracker.js +1 -1
- package/cjs-bundle/componentsV2/ColorPicker/OpacityDragtracker/OpacityDragtracker.js.map +1 -1
- package/cjs-bundle/componentsV2/ColorPicker/Swatches/Swatches.scss.js +1 -1
- package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/Map/Map.js +1 -1
- package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/Map/Map.js.map +1 -1
- package/cjs-bundle/componentsV2/InterventionEventSelector/InterventionEventSelector.js +2 -0
- package/cjs-bundle/componentsV2/InterventionEventSelector/InterventionEventSelector.js.map +1 -0
- package/cjs-bundle/componentsV2/InterventionEventSelector/InterventionEventSelector.scss.js +2 -0
- package/cjs-bundle/componentsV2/InterventionEventSelector/InterventionEventSelector.scss.js.map +1 -0
- package/cjs-bundle/componentsV2/InterventionEventSelector/useInterventionUnitEvents.js +2 -0
- package/cjs-bundle/componentsV2/InterventionEventSelector/useInterventionUnitEvents.js.map +1 -0
- package/cjs-bundle/componentsV2/InterventionEventSelector/utils.js +2 -0
- package/cjs-bundle/componentsV2/InterventionEventSelector/utils.js.map +1 -0
- package/cjs-bundle/componentsV2/Modal/Modal.js +1 -1
- package/cjs-bundle/componentsV2/Modal/Modal.js.map +1 -1
- package/cjs-bundle/componentsV2/Modal/constants.js +2 -0
- package/cjs-bundle/componentsV2/Modal/constants.js.map +1 -0
- package/cjs-bundle/componentsV2/WellArchivedMessage/WellArchivedMessage.js +1 -1
- package/cjs-bundle/componentsV2/WellArchivedMessage/WellArchivedMessage.js.map +1 -1
- package/cjs-bundle/componentsV2/index.js +1 -1
- package/cjs-bundle/effects/useOutsideClick.js +1 -1
- package/cjs-bundle/effects/useOutsideClick.js.map +1 -1
- package/cjs-bundle/testing/AppTestWrapper/AppTestWrapper.js +1 -1
- package/cjs-bundle/testing/AppTestWrapper/AppTestWrapper.js.map +1 -1
- package/cjs-bundle/utils/devcenter.js +1 -1
- package/cjs-bundle/utils/devcenter.js.map +1 -1
- package/cjs-bundle/utils/fetchAttachment.js +2 -0
- package/cjs-bundle/utils/fetchAttachment.js.map +1 -0
- package/cjs-bundle/utils/fileExtension.js +1 -1
- package/cjs-bundle/utils/fileExtension.js.map +1 -1
- package/cjs-bundle/utils/links.js +2 -0
- package/cjs-bundle/utils/links.js.map +1 -0
- package/components/AddComment/Popover.js +1 -1
- package/components/AddComment/Popover.js.map +1 -1
- package/components/AddComment/components/Content.js +1 -1
- package/components/AddComment/components/Content.js.map +1 -1
- package/components/AssetEditor/AssetEditorAutocomplete.d.ts +96 -13
- package/components/AssetEditor/AssetEditorAutocomplete.d.ts.map +1 -1
- package/components/AssetEditor/AssetEditorAutocomplete.js +1 -1
- package/components/AssetEditor/AssetEditorAutocomplete.js.map +1 -1
- package/components/AssetEditorV2/index.d.ts +28 -12
- package/components/AssetEditorV2/index.d.ts.map +1 -1
- package/components/AssetEditorV2/index.js +1 -1
- package/components/AssetEditorV2/index.js.map +1 -1
- package/components/AttachmentLightbox/AttachmentDocument.d.ts +6 -0
- package/components/AttachmentLightbox/AttachmentDocument.d.ts.map +1 -0
- package/components/AttachmentLightbox/AttachmentDocument.js +2 -0
- package/components/AttachmentLightbox/AttachmentDocument.js.map +1 -0
- package/components/AttachmentLightbox/AttachmentLightbox.d.ts +9 -8
- package/components/AttachmentLightbox/AttachmentLightbox.d.ts.map +1 -1
- package/components/AttachmentLightbox/AttachmentLightbox.js +1 -1
- package/components/AttachmentLightbox/AttachmentLightbox.js.map +1 -1
- package/components/AttachmentLightbox/AttachmentLightbox.scss.js +1 -1
- package/components/AttachmentLightbox/AttachmentPreviewPane.d.ts +9 -0
- package/components/AttachmentLightbox/AttachmentPreviewPane.d.ts.map +1 -0
- package/components/AttachmentLightbox/AttachmentPreviewPane.js +2 -0
- package/components/AttachmentLightbox/AttachmentPreviewPane.js.map +1 -0
- package/components/AttachmentLightbox/__tests__/AttachmentDocument.test.d.ts +2 -0
- package/components/AttachmentLightbox/__tests__/AttachmentDocument.test.d.ts.map +1 -0
- package/components/AttachmentLightbox/__tests__/AttachmentLightbox.test.d.ts +2 -0
- package/components/AttachmentLightbox/__tests__/AttachmentLightbox.test.d.ts.map +1 -0
- package/components/AttachmentLightbox/__tests__/copyImageToClipboard.test.d.ts +2 -0
- package/components/AttachmentLightbox/__tests__/copyImageToClipboard.test.d.ts.map +1 -0
- package/components/AttachmentLightbox/__tests__/downloadAttachment.test.d.ts +2 -0
- package/components/AttachmentLightbox/__tests__/downloadAttachment.test.d.ts.map +1 -0
- package/components/AttachmentLightbox/__tests__/useZoomPan.test.d.ts +2 -0
- package/components/AttachmentLightbox/__tests__/useZoomPan.test.d.ts.map +1 -0
- package/components/AttachmentLightbox/copyImageToClipboard.d.ts +4 -0
- package/components/AttachmentLightbox/copyImageToClipboard.d.ts.map +1 -0
- package/components/AttachmentLightbox/copyImageToClipboard.js +2 -0
- package/components/AttachmentLightbox/copyImageToClipboard.js.map +1 -0
- package/components/AttachmentLightbox/downloadAttachment.d.ts +10 -0
- package/components/AttachmentLightbox/downloadAttachment.d.ts.map +1 -0
- package/components/AttachmentLightbox/downloadAttachment.js +2 -0
- package/components/AttachmentLightbox/downloadAttachment.js.map +1 -0
- package/components/AttachmentLightbox/useAttachmentLightbox.d.ts +6 -2
- package/components/AttachmentLightbox/useAttachmentLightbox.d.ts.map +1 -1
- package/components/AttachmentLightbox/useAttachmentLightbox.js +1 -1
- package/components/AttachmentLightbox/useAttachmentLightbox.js.map +1 -1
- package/components/AttachmentLightbox/useZoomPan.d.ts +29 -0
- package/components/AttachmentLightbox/useZoomPan.d.ts.map +1 -0
- package/components/AttachmentLightbox/useZoomPan.js +2 -0
- package/components/AttachmentLightbox/useZoomPan.js.map +1 -0
- package/components/AttachmentPreview/AttachmentActionsMenu.d.ts +16 -0
- package/components/AttachmentPreview/AttachmentActionsMenu.d.ts.map +1 -0
- package/components/AttachmentPreview/AttachmentActionsMenu.js +2 -0
- package/components/AttachmentPreview/AttachmentActionsMenu.js.map +1 -0
- package/components/AttachmentPreview/AttachmentDownloadLink.d.ts +11 -0
- package/components/AttachmentPreview/AttachmentDownloadLink.d.ts.map +1 -0
- package/components/AttachmentPreview/AttachmentDownloadLink.js +2 -0
- package/components/AttachmentPreview/AttachmentDownloadLink.js.map +1 -0
- package/components/AttachmentPreview/AttachmentImage.d.ts +12 -0
- package/components/AttachmentPreview/AttachmentImage.d.ts.map +1 -0
- package/components/AttachmentPreview/AttachmentImage.js +2 -0
- package/components/AttachmentPreview/AttachmentImage.js.map +1 -0
- package/components/AttachmentPreview/AttachmentPreview.d.ts.map +1 -1
- package/components/AttachmentPreview/AttachmentPreview.js +1 -1
- package/components/AttachmentPreview/AttachmentPreview.js.map +1 -1
- package/components/AttachmentPreview/AttachmentPreview.scss.js +1 -1
- package/components/AttachmentPreview/AttachmentPreview.types.d.ts +7 -0
- package/components/AttachmentPreview/AttachmentPreview.types.d.ts.map +1 -1
- package/components/AttachmentPreview/AttachmentRow.d.ts +7 -3
- package/components/AttachmentPreview/AttachmentRow.d.ts.map +1 -1
- package/components/AttachmentPreview/AttachmentRow.js +1 -1
- package/components/AttachmentPreview/AttachmentRow.js.map +1 -1
- package/components/AttachmentPreview/AttachmentTile.d.ts +5 -1
- package/components/AttachmentPreview/AttachmentTile.d.ts.map +1 -1
- package/components/AttachmentPreview/AttachmentTile.js +1 -1
- package/components/AttachmentPreview/AttachmentTile.js.map +1 -1
- package/components/AttachmentPreview/__tests__/AttachmentActionsMenu.test.d.ts +2 -0
- package/components/AttachmentPreview/__tests__/AttachmentActionsMenu.test.d.ts.map +1 -0
- package/components/AttachmentPreview/__tests__/AttachmentDownloadLink.test.d.ts +2 -0
- package/components/AttachmentPreview/__tests__/AttachmentDownloadLink.test.d.ts.map +1 -0
- package/components/AttachmentPreview/__tests__/AttachmentImage.test.d.ts +2 -0
- package/components/AttachmentPreview/__tests__/AttachmentImage.test.d.ts.map +1 -0
- package/components/AttachmentPreview/__tests__/AttachmentTile.test.d.ts +2 -0
- package/components/AttachmentPreview/__tests__/AttachmentTile.test.d.ts.map +1 -0
- package/components/AttachmentPreview/__tests__/useStoredAttachments.test.d.ts +2 -0
- package/components/AttachmentPreview/__tests__/useStoredAttachments.test.d.ts.map +1 -0
- package/components/AttachmentPreview/useStoredAttachment.d.ts +8 -0
- package/components/AttachmentPreview/useStoredAttachment.d.ts.map +1 -1
- package/components/AttachmentPreview/useStoredAttachment.js +2 -0
- package/components/AttachmentPreview/useStoredAttachment.js.map +1 -0
- package/components/AttachmentPreview/useStoredAttachments.d.ts +1 -1
- package/components/AttachmentPreview/useStoredAttachments.d.ts.map +1 -1
- package/components/AttachmentPreview/useStoredAttachments.js +1 -1
- package/components/AttachmentPreview/useStoredAttachments.js.map +1 -1
- package/components/BICOffsetPickerDialog/index.js +1 -1
- package/components/BICOffsetPickerDialog/index.js.map +1 -1
- package/components/Casing/CasingTableV2/components/CasingJoints/Editor.js +1 -1
- package/components/Casing/CasingTableV2/components/CasingJoints/Editor.js.map +1 -1
- package/components/Casing/CasingTableV2/components/Component.js +1 -1
- package/components/Casing/CasingTableV2/components/Component.js.map +1 -1
- package/components/Casing/CasingTableV2/components/DrillPipe/Editor.js +1 -1
- package/components/Casing/CasingTableV2/components/DrillPipe/Editor.js.map +1 -1
- package/components/CollapsableSidebar.js +1 -1
- package/components/CollapsableSidebar.js.map +1 -1
- package/components/CommentCard/CommentCard.d.ts.map +1 -1
- package/components/CommentCard/CommentCard.js +1 -1
- package/components/CommentCard/CommentCard.js.map +1 -1
- package/components/CommentCard/CommentCard.types.d.ts +2 -0
- package/components/CommentCard/CommentCard.types.d.ts.map +1 -1
- package/components/CommentCard/CommentCardReactions.js +1 -1
- package/components/CommentCard/CommentCardReactions.js.map +1 -1
- package/components/CommentCard/CommentMenu.d.ts.map +1 -1
- package/components/CommentCard/CommentMenu.js +1 -1
- package/components/CommentCard/CommentMenu.js.map +1 -1
- package/components/CommentComposer/CommentComposer.d.ts.map +1 -1
- package/components/CommentComposer/CommentComposer.js +1 -1
- package/components/CommentComposer/CommentComposer.js.map +1 -1
- package/components/CommentComposer/CommentReplyInput.d.ts.map +1 -1
- package/components/CommentComposer/CommentReplyInput.js +1 -1
- package/components/CommentComposer/CommentReplyInput.js.map +1 -1
- package/components/CommentComposer/ShareToChatRow.js +1 -1
- package/components/CommentComposer/ShareToChatRow.js.map +1 -1
- package/components/CommentComposer/__tests__/useAttachmentUpload.linked.test.d.ts +2 -0
- package/components/CommentComposer/__tests__/useAttachmentUpload.linked.test.d.ts.map +1 -0
- package/components/CommentComposer/useAttachmentUpload.d.ts +1 -0
- package/components/CommentComposer/useAttachmentUpload.d.ts.map +1 -1
- package/components/CommentComposer/useAttachmentUpload.js +1 -1
- package/components/CommentComposer/useAttachmentUpload.js.map +1 -1
- package/components/CommentInputNext/CommentInputNext.d.ts +2 -0
- package/components/CommentInputNext/CommentInputNext.d.ts.map +1 -1
- package/components/CommentInputNext/CommentInputNext.js +1 -1
- package/components/CommentInputNext/CommentInputNext.js.map +1 -1
- package/components/CommentInputNext/__tests__/useFilePaste.test.d.ts +2 -0
- package/components/CommentInputNext/__tests__/useFilePaste.test.d.ts.map +1 -0
- package/components/CommentInputNext/useFilePaste.d.ts +17 -0
- package/components/CommentInputNext/useFilePaste.d.ts.map +1 -0
- package/components/CommentInputNext/useFilePaste.js +2 -0
- package/components/CommentInputNext/useFilePaste.js.map +1 -0
- package/components/DevCenter/AppsDataProvider/AppsDataProvider.d.ts +5 -1
- package/components/DevCenter/AppsDataProvider/AppsDataProvider.d.ts.map +1 -1
- package/components/DevCenter/AppsDataProvider/AppsDataProvider.js +1 -1
- package/components/DevCenter/AppsDataProvider/AppsDataProvider.js.map +1 -1
- package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.d.ts +9 -1
- package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.d.ts.map +1 -1
- package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js.map +1 -1
- package/components/DevCenter/DevCenterAppContainer/__tests__/DevCenterAppContainer.registerAITools.test.d.ts +2 -0
- package/components/DevCenter/DevCenterAppContainer/__tests__/DevCenterAppContainer.registerAITools.test.d.ts.map +1 -0
- package/components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.js.map +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js.map +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.js.map +1 -1
- package/components/DevCenter/DevCenterAppContainer/effects/useAppMaximized.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/effects/useAppMaximized.js.map +1 -1
- package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.d.ts.map +1 -1
- package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js +1 -1
- package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js.map +1 -1
- package/components/DevCenter/IsolatedDevCenterAppContainer/__tests__/useFullscreenModes.test.d.ts +2 -0
- package/components/DevCenter/IsolatedDevCenterAppContainer/__tests__/useFullscreenModes.test.d.ts.map +1 -0
- package/components/DevCenter/IsolatedDevCenterAppContainer/useFullscreenModes.d.ts +10 -0
- package/components/DevCenter/IsolatedDevCenterAppContainer/useFullscreenModes.d.ts.map +1 -0
- package/components/DevCenter/IsolatedDevCenterAppContainer/useFullscreenModes.js +2 -0
- package/components/DevCenter/IsolatedDevCenterAppContainer/useFullscreenModes.js.map +1 -0
- package/components/DocumentViewer/DocumentViewer.js +1 -1
- package/components/DocumentViewer/DocumentViewer.js.map +1 -1
- package/components/Drillstring/BHAComponentDetail/constants.d.ts +2 -2
- package/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Component.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Component.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js.map +1 -1
- package/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js +1 -1
- package/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js.map +1 -1
- package/components/FeedItem/FeedItem.js +1 -1
- package/components/FeedItem/FeedItem.js.map +1 -1
- package/components/FeedItem/components/FeedComments.js +1 -1
- package/components/FeedItem/components/FeedComments.js.map +1 -1
- package/components/IconMenu/index.d.ts +67 -21
- package/components/IconMenu/index.d.ts.map +1 -1
- package/components/IconMenu/index.js +1 -1
- package/components/IconMenu/index.js.map +1 -1
- package/components/KeyboardDateTimePicker.d.ts +6 -7
- package/components/KeyboardDateTimePicker.d.ts.map +1 -1
- package/components/KeyboardDateTimePicker.js +1 -1
- package/components/KeyboardDateTimePicker.js.map +1 -1
- package/components/LinkedText/LinkedText.d.ts +17 -0
- package/components/LinkedText/LinkedText.d.ts.map +1 -0
- package/components/LinkedText/LinkedText.js +2 -0
- package/components/LinkedText/LinkedText.js.map +1 -0
- package/components/LinkedText/LinkedText.scss.js +2 -0
- package/components/LinkedText/LinkedText.scss.js.map +1 -0
- package/components/LinkedText/__tests__/LinkedText.test.d.ts +2 -0
- package/components/LinkedText/__tests__/LinkedText.test.d.ts.map +1 -0
- package/components/LinkedText/index.d.ts +2 -0
- package/components/LinkedText/index.d.ts.map +1 -0
- package/components/NewDocumentViewer/utils.d.ts.map +1 -1
- package/components/NewDocumentViewer/utils.js +1 -1
- package/components/NewDocumentViewer/utils.js.map +1 -1
- package/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js +1 -1
- package/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js.map +1 -1
- package/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js +1 -1
- package/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js.map +1 -1
- package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js +1 -1
- package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js.map +1 -1
- package/components/OffsetWellPickerV3/components/CustomSelectionView/index.js +1 -1
- package/components/OffsetWellPickerV3/components/CustomSelectionView/index.js.map +1 -1
- package/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js +1 -1
- package/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js.map +1 -1
- package/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js +1 -1
- package/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js.map +1 -1
- package/components/OffsetWellPickerV3/components/TabSelection/index.js +1 -1
- package/components/OffsetWellPickerV3/components/TabSelection/index.js.map +1 -1
- package/components/OffsetWellPickerV3/components/WellHubView/index.js +1 -1
- package/components/OffsetWellPickerV3/components/WellHubView/index.js.map +1 -1
- package/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js +1 -1
- package/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js.map +1 -1
- package/components/OffsetWellPickerV5/components/AppHeader/components/HeaderActions/HeaderActions.js +1 -1
- package/components/OffsetWellPickerV5/components/AppHeader/components/HeaderActions/HeaderActions.js.map +1 -1
- package/components/OffsetWellPickerV5/components/AppHeader/components/LoadAllWellsToggle/LoadAllWellsToggle.js +1 -1
- package/components/OffsetWellPickerV5/components/AppHeader/components/LoadAllWellsToggle/LoadAllWellsToggle.js.map +1 -1
- package/components/OffsetWellPickerV5/components/Filter/Filter.js +1 -1
- package/components/OffsetWellPickerV5/components/Filter/Filter.js.map +1 -1
- package/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js +1 -1
- package/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js.map +1 -1
- package/components/OffsetWellPickerV5/components/Filter/components/PeriodFilterSelect/PeriodFilterSelect.js +1 -1
- package/components/OffsetWellPickerV5/components/Filter/components/PeriodFilterSelect/PeriodFilterSelect.js.map +1 -1
- package/components/OffsetWellPickerV5/components/Filter/components/SingleFilterSelect/SingleFilterSelect.js +1 -1
- package/components/OffsetWellPickerV5/components/Filter/components/SingleFilterSelect/SingleFilterSelect.js.map +1 -1
- package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/ClusterTooltip/ClusterTooltip.js +1 -1
- package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/ClusterTooltip/ClusterTooltip.js.map +1 -1
- package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/LayerSwitcher/LayerSwitcher.js +1 -1
- package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/LayerSwitcher/LayerSwitcher.js.map +1 -1
- package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapControls/MapControls.js +1 -1
- package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapControls/MapControls.js.map +1 -1
- package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapHints/MapHintsStash.js +1 -1
- package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapHints/MapHintsStash.js.map +1 -1
- package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/SubjectWellMarker/SubjectWellMarker.js +1 -1
- package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/SubjectWellMarker/SubjectWellMarker.js.map +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js.map +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AssetResultSection/AssetResultSection.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AssetResultSection/AssetResultSection.js.map +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AutoCompleteAssetSearch/AutoCompleteAssetSearch.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AutoCompleteAssetSearch/AutoCompleteAssetSearch.js.map +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/CompanyCell/CompanyCell.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/CompanyCell/CompanyCell.js.map +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/FormationCell/FormationCell.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/FormationCell/FormationCell.js.map +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/InterventionAssetCell/InterventionAssetCell.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/InterventionAssetCell/InterventionAssetCell.js.map +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/PadNameCell/PadNameCell.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/PadNameCell/PadNameCell.js.map +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/RigCell/RigCell.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/RigCell/RigCell.js.map +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/WellNameCell/WellNameCell.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/WellNameCell/WellNameCell.js.map +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/SettingsMenu.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/SettingsMenu.js.map +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/MetricsSettingsSection/MetricsSettingsSection.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/MetricsSettingsSection/MetricsSettingsSection.js.map +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/TableSettingsSection/TableSettingsSection.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/TableSettingsSection/TableSettingsSection.js.map +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/WellNameHeaderCell/WellNameHeaderCell.js +1 -1
- package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/WellNameHeaderCell/WellNameHeaderCell.js.map +1 -1
- package/components/OffsetWellPickerV5/components/PickerModalActions/PickerModalActions.js +1 -1
- package/components/OffsetWellPickerV5/components/PickerModalActions/PickerModalActions.js.map +1 -1
- package/components/PadOffsetsPicker/StagesSelector.js +1 -1
- package/components/PadOffsetsPicker/StagesSelector.js.map +1 -1
- package/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js +1 -1
- package/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js.map +1 -1
- package/components/Popover/Popover.js +1 -1
- package/components/Popover/Popover.js.map +1 -1
- package/components/Popper/Popper.js +1 -1
- package/components/Popper/Popper.js.map +1 -1
- package/components/PostInput/PostInput.d.ts +20 -10
- package/components/PostInput/PostInput.d.ts.map +1 -1
- package/components/PostInput/PostInput.js +1 -1
- package/components/PostInput/PostInput.js.map +1 -1
- package/components/RealTimeValuesSidebar/SidebarFooter.js +1 -1
- package/components/RealTimeValuesSidebar/SidebarFooter.js.map +1 -1
- package/components/UserMention/__tests__/highlightLinks.test.d.ts +2 -0
- package/components/UserMention/__tests__/highlightLinks.test.d.ts.map +1 -0
- package/components/UserMention/constants.d.ts +1 -0
- package/components/UserMention/constants.d.ts.map +1 -1
- package/components/UserMention/constants.js +1 -1
- package/components/UserMention/constants.js.map +1 -1
- package/components/UserMention/index.js +1 -1
- package/components/UserMention/index.js.map +1 -1
- package/components/index.d.ts +2 -0
- package/components/index.d.ts.map +1 -1
- package/components/index.js +1 -1
- package/componentsV2/AppCommonsProvider/AppCommonsContext.d.ts +4 -2
- package/componentsV2/AppCommonsProvider/AppCommonsContext.d.ts.map +1 -1
- package/componentsV2/AppCommonsProvider/AppCommonsContext.js.map +1 -1
- package/componentsV2/AppCommonsProvider/utils.d.ts +1 -1
- package/componentsV2/AppCommonsProvider/utils.d.ts.map +1 -1
- package/componentsV2/AppCommonsProvider/utils.js +1 -1
- package/componentsV2/AppCommonsProvider/utils.js.map +1 -1
- package/componentsV2/AppHeader/V3/Actions/Actions.constants.d.ts +4 -1
- package/componentsV2/AppHeader/V3/Actions/Actions.constants.d.ts.map +1 -1
- package/componentsV2/AppHeader/V3/Actions/Actions.constants.js +1 -1
- package/componentsV2/AppHeader/V3/Actions/Actions.constants.js.map +1 -1
- package/componentsV2/AppHeader/V3/Actions/Actions.d.ts.map +1 -1
- package/componentsV2/AppHeader/V3/Actions/Actions.js +1 -1
- package/componentsV2/AppHeader/V3/Actions/Actions.js.map +1 -1
- package/componentsV2/AppHeader/V3/AppHeaderV3.d.ts.map +1 -1
- package/componentsV2/AppHeader/V3/AppHeaderV3.js +1 -1
- package/componentsV2/AppHeader/V3/AppHeaderV3.js.map +1 -1
- package/componentsV2/ButtonIcon/ButtonIcon.d.ts +2 -0
- package/componentsV2/ButtonIcon/ButtonIcon.d.ts.map +1 -1
- package/componentsV2/ButtonIcon/ButtonIcon.js +1 -1
- package/componentsV2/ButtonIcon/ButtonIcon.js.map +1 -1
- package/componentsV2/ButtonIcon/ButtonIcon.scss.js +1 -1
- package/componentsV2/ButtonIcon/ButtonIcon.stories.d.ts +1 -0
- package/componentsV2/ButtonIcon/ButtonIcon.stories.d.ts.map +1 -1
- package/componentsV2/Chip/Chip.d.ts +1 -0
- package/componentsV2/Chip/Chip.d.ts.map +1 -1
- package/componentsV2/Chip/Chip.js +1 -1
- package/componentsV2/Chip/Chip.js.map +1 -1
- package/componentsV2/Chip/Chip.stories.d.ts.map +1 -1
- package/componentsV2/ColorPicker/ColorPicker.d.ts +2 -1
- package/componentsV2/ColorPicker/ColorPicker.d.ts.map +1 -1
- package/componentsV2/ColorPicker/ColorPicker.js +1 -1
- package/componentsV2/ColorPicker/ColorPicker.js.map +1 -1
- package/componentsV2/ColorPicker/ColorPicker.scss.js +1 -1
- package/componentsV2/ColorPicker/ColorPicker.stories.d.ts.map +1 -1
- package/componentsV2/ColorPicker/OpacityDragtracker/OpacityDragtracker.d.ts.map +1 -1
- package/componentsV2/ColorPicker/OpacityDragtracker/OpacityDragtracker.js +1 -1
- package/componentsV2/ColorPicker/OpacityDragtracker/OpacityDragtracker.js.map +1 -1
- package/componentsV2/ColorPicker/Swatches/Swatches.scss.js +1 -1
- package/componentsV2/CompletionsOffsetWellPicker/Map/Map.js +1 -1
- package/componentsV2/CompletionsOffsetWellPicker/Map/Map.js.map +1 -1
- package/componentsV2/InterventionEventSelector/InterventionEventSelector.d.ts +3 -0
- package/componentsV2/InterventionEventSelector/InterventionEventSelector.d.ts.map +1 -0
- package/componentsV2/InterventionEventSelector/InterventionEventSelector.js +2 -0
- package/componentsV2/InterventionEventSelector/InterventionEventSelector.js.map +1 -0
- package/componentsV2/InterventionEventSelector/InterventionEventSelector.scss.js +2 -0
- package/componentsV2/InterventionEventSelector/InterventionEventSelector.scss.js.map +1 -0
- package/componentsV2/InterventionEventSelector/InterventionEventSelector.stories.d.ts +9 -0
- package/componentsV2/InterventionEventSelector/InterventionEventSelector.stories.d.ts.map +1 -0
- package/componentsV2/InterventionEventSelector/__tests__/InterventionEventSelector.test.d.ts +2 -0
- package/componentsV2/InterventionEventSelector/__tests__/InterventionEventSelector.test.d.ts.map +1 -0
- package/componentsV2/InterventionEventSelector/index.d.ts +5 -0
- package/componentsV2/InterventionEventSelector/index.d.ts.map +1 -0
- package/componentsV2/InterventionEventSelector/types.d.ts +22 -0
- package/componentsV2/InterventionEventSelector/types.d.ts.map +1 -0
- package/componentsV2/InterventionEventSelector/useInterventionUnitEvents.d.ts +8 -0
- package/componentsV2/InterventionEventSelector/useInterventionUnitEvents.d.ts.map +1 -0
- package/componentsV2/InterventionEventSelector/useInterventionUnitEvents.js +2 -0
- package/componentsV2/InterventionEventSelector/useInterventionUnitEvents.js.map +1 -0
- package/componentsV2/InterventionEventSelector/utils.d.ts +6 -0
- package/componentsV2/InterventionEventSelector/utils.d.ts.map +1 -0
- package/componentsV2/InterventionEventSelector/utils.js +2 -0
- package/componentsV2/InterventionEventSelector/utils.js.map +1 -0
- package/componentsV2/Modal/Modal.d.ts.map +1 -1
- package/componentsV2/Modal/Modal.js +1 -1
- package/componentsV2/Modal/Modal.js.map +1 -1
- package/componentsV2/Modal/constants.d.ts +3 -0
- package/componentsV2/Modal/constants.d.ts.map +1 -0
- package/componentsV2/Modal/constants.js +2 -0
- package/componentsV2/Modal/constants.js.map +1 -0
- package/componentsV2/WellArchivedMessage/WellArchivedMessage.js +1 -1
- package/componentsV2/WellArchivedMessage/WellArchivedMessage.js.map +1 -1
- package/componentsV2/index.d.ts +1 -0
- package/componentsV2/index.d.ts.map +1 -1
- package/componentsV2/index.js +1 -1
- package/effects/__tests__/useOutsideClick.test.d.ts.map +1 -1
- package/effects/useOutsideClick.d.ts.map +1 -1
- package/effects/useOutsideClick.js +1 -1
- package/effects/useOutsideClick.js.map +1 -1
- package/mcp-server/server.mjs +108 -24
- package/package.json +1 -1
- package/testing/AppTestWrapper/AppTestWrapper.js +1 -1
- package/testing/AppTestWrapper/AppTestWrapper.js.map +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/types/shared/Common.d.ts +9 -0
- package/types/shared/Common.d.ts.map +1 -1
- package/utils/__tests__/fetchAttachment.test.d.ts +2 -0
- package/utils/__tests__/fetchAttachment.test.d.ts.map +1 -0
- package/utils/__tests__/links.test.d.ts +2 -0
- package/utils/__tests__/links.test.d.ts.map +1 -0
- package/utils/devcenter.d.ts +1 -0
- package/utils/devcenter.d.ts.map +1 -1
- package/utils/devcenter.js +1 -1
- package/utils/devcenter.js.map +1 -1
- package/utils/fetchAttachment.d.ts +3 -0
- package/utils/fetchAttachment.d.ts.map +1 -0
- package/utils/fetchAttachment.js +2 -0
- package/utils/fetchAttachment.js.map +1 -0
- package/utils/fileExtension.d.ts.map +1 -1
- package/utils/fileExtension.js +1 -1
- package/utils/fileExtension.js.map +1 -1
- package/utils/links.d.ts +14 -0
- package/utils/links.d.ts.map +1 -0
- package/utils/links.js +2 -0
- package/utils/links.js.map +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPicker.js","sources":["../../../../src/componentsV2/ColorPicker/ColorPicker.tsx"],"sourcesContent":["import classNames from 'classnames';\nimport {\n CSSProperties,\n KeyboardEventHandler,\n MouseEventHandler,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { ChromePicker, ColorResult } from 'react-color';\nimport { throttle } from 'lodash';\nimport { v4 as uuidv4 } from 'uuid';\n\nimport { TextInputNext, TextInputNextProps } from '../TextInputNext';\nimport { Popover, PopoverProps } from '../Popover';\nimport { ButtonIcon } from '../ButtonIcon';\nimport { Tooltip } from '../Tooltip';\nimport useOutsideClick from '../../effects/useOutsideClick';\n\nimport { Swatches } from './Swatches';\nimport { channelsToHex, channelsToRgba, ColorChannels, defaultColor, parseColor } from './utils';\nimport { OpacityDragTracker } from './OpacityDragtracker';\nimport { useChromePickerAccessibility } from './useChromePickerAccessibility';\n\nimport styles from './ColorPicker.scss';\n\nimport { PaletteIcon, PickerIcon } from '~/icons';\n\nexport type ColorPickerProps = {\n value?: string;\n onChange?: (value: string) => void;\n\n size?: TextInputNextProps['size'];\n label?: TextInputNextProps['label'];\n labelPlacement?: TextInputNextProps['labelPlacement'];\n disabled?: boolean;\n /**\n * Disables drag to change opacity functinality\n */\n disableOpacityDrag?: boolean;\n /**\n * Determines base format of the colour `rgb(RRR, GGG, BBB[, AAA])` or `#RRGGBB[AA]`\n */\n format?: 'rgb' | 'hex';\n /**\n * Allows user to control color's opacity, adds alpha channel to resulting color string\n */\n enableAlpha?: boolean;\n\n popoverPlacement?: PopoverProps['placement'];\n\n onOpen?: () => void;\n onClose?: () => void;\n\n className?: string;\n testId?: string;\n};\n\nconst SizeToClassMap: Record<Required<ColorPickerProps>['size'], string> = {\n small: styles.small,\n medium: styles.medium,\n large: styles.large,\n};\n\nconst elementsClassNames: TextInputNextProps['elementsClassNames'] = {\n inputContainer: styles.inputContainer,\n numberStepButtons: styles.numberStepButtons,\n prefix: styles.prefixContainer,\n suffix: styles.suffixContainer,\n input: styles.input,\n label: styles.label,\n};\n\ntype FocusTarget = 'palette' | 'picker';\n\nexport const ColorPicker = ({\n format = 'hex',\n className,\n label,\n labelPlacement = 'top',\n popoverPlacement = 'bottom-start',\n testId,\n disabled,\n size = 'small',\n onOpen,\n onClose,\n value = defaultColor,\n onChange,\n disableOpacityDrag,\n enableAlpha = false,\n}: ColorPickerProps) => {\n const valueChannels = useMemo(() => {\n try {\n const channels = parseColor(value);\n\n return { ...channels, a: enableAlpha ? channels.a : 1 };\n } catch (_) {\n return parseColor(defaultColor);\n }\n }, [value, enableAlpha]);\n\n const [isMenuOpen, setIsOpen] = useState(false);\n const inputContainerRef = useRef<HTMLDivElement>(null);\n const indicatorRef = useRef<HTMLDivElement>(null);\n const [isSwatches, setIsSwatches] = useState(true);\n const [focusTarget, setFocusTarget] = useState<FocusTarget | null>(null);\n const [internalValue, setInternalValue] = useState<ColorChannels>(valueChannels);\n const popoverRef = useRef<HTMLDivElement>(null);\n const accessibilityId = useMemo(() => `corva-color-picker-${uuidv4()}`, []);\n const inputId = `${accessibilityId}-opacity-input`;\n const labelId = `${accessibilityId}-label`;\n const opacityLabelId = `${accessibilityId}-opacity-label`;\n const hasLabel = Boolean(label);\n\n const openMenu = useCallback(() => {\n setIsOpen(true);\n onOpen?.();\n }, [onOpen]);\n\n const openMenuSwatch = useCallback<MouseEventHandler>(\n e => {\n e.preventDefault();\n setFocusTarget(null);\n openMenu();\n },\n [openMenu]\n );\n\n const openMenuFocus = useCallback(() => {\n setFocusTarget(null);\n openMenu();\n }, [openMenu]);\n\n const openMenuKeyDown = useCallback<KeyboardEventHandler<HTMLDivElement>>(\n event => {\n if (!disabled && (event.key === 'Enter' || event.key === ' ' || event.key === 'ArrowDown')) {\n event.preventDefault();\n setFocusTarget('palette');\n openMenu();\n }\n },\n [disabled, openMenu]\n );\n\n const closeMenu = useCallback(() => {\n const isFocusInPopover = !!popoverRef.current?.contains(document.activeElement);\n\n setFocusTarget(null);\n setIsOpen(false);\n onClose?.();\n\n // Return focus to the trigger so keyboard flow is not lost after Escape/outside dismiss\n if (isFocusInPopover) {\n indicatorRef.current?.focus({ preventScroll: true });\n }\n }, [onClose]);\n\n const setSwatches = useCallback<MouseEventHandler<HTMLButtonElement>>(event => {\n setFocusTarget(event.detail === 0 ? 'palette' : null);\n setIsSwatches(true);\n }, []);\n\n const setPicker = useCallback<MouseEventHandler<HTMLButtonElement>>(event => {\n setFocusTarget(event.detail === 0 ? 'picker' : null);\n setIsSwatches(false);\n }, []);\n\n const clearFocusTarget = useCallback(() => setFocusTarget(null), []);\n\n const onInternalValueChange = useCallback(\n (color: ColorResult) => setInternalValue(color.rgb),\n []\n );\n\n const onActualChange = useCallback(\n (color: ColorChannels) => {\n const formatted =\n format === 'hex' ? channelsToHex(color, enableAlpha) : channelsToRgba(color, enableAlpha);\n onChange?.(formatted);\n },\n [format, onChange, enableAlpha]\n );\n\n const onKeyboardPickerChange = useCallback(\n (color: ColorChannels) => {\n setInternalValue(color);\n onActualChange(color);\n },\n [onActualChange]\n );\n\n const { pickerRef, onKeyDown: onPickerKeyDown } = useChromePickerAccessibility({\n color: internalValue,\n enableAlpha,\n isActive: !isSwatches,\n onChange: onKeyboardPickerChange,\n });\n\n useEffect(() => {\n if (focusTarget !== 'picker' || isSwatches) {\n return;\n }\n\n const firstControl = pickerRef.current?.querySelector<HTMLElement>(\n '[data-color-picker-control=\"saturation\"]'\n );\n\n if (firstControl) {\n firstControl.focus({ preventScroll: true });\n clearFocusTarget();\n }\n }, [clearFocusTarget, focusTarget, isSwatches, pickerRef]);\n\n const onOpacityInputChange = useCallback(\n (opacityString: string) => {\n const opacityNumber = Number(opacityString);\n\n if (Number.isNaN(opacityNumber) || opacityNumber < 0 || opacityNumber > 100) {\n return;\n }\n\n const color = { ...valueChannels, a: opacityNumber / 100 };\n onActualChange(color);\n },\n [valueChannels, onActualChange]\n );\n\n const pickerOnChange = useCallback(\n (color: ColorResult) => {\n onActualChange(color.rgb);\n },\n [onActualChange]\n );\n\n const swatchOnChange = useCallback(\n (color: ColorChannels) => {\n const nonZeroAlpha = valueChannels.a || 1;\n const alpha = enableAlpha && color.a === 0 ? 0 : nonZeroAlpha;\n onActualChange({ ...color, a: alpha });\n },\n [onActualChange, valueChannels.a, enableAlpha]\n );\n\n // Prevents focus on opacity drag end\n const onOpacityDragEnd = useCallback(() => {\n setTimeout(() => {\n setIsOpen(false);\n (document.activeElement as HTMLElement | null)?.blur?.();\n }, 0);\n }, []);\n\n const onOpacityDrag = useMemo(\n () =>\n throttle((percent: number) => {\n const newFieldValue = String(Math.round(percent));\n onOpacityInputChange(newFieldValue);\n }, 100),\n [onOpacityInputChange]\n );\n\n useEffect(() => {\n setInternalValue(valueChannels);\n }, [valueChannels]);\n\n useEffect(() => {\n if (isMenuOpen) {\n setIsSwatches(true);\n }\n }, [isMenuOpen]);\n\n useOutsideClick(popoverRef, closeMenu, [inputContainerRef.current]);\n\n const inputValue = String(Math.round(internalValue.a * 100));\n\n const hasVerticalMargin =\n popoverPlacement?.startsWith('top') || popoverPlacement?.startsWith('bottom');\n const hasHorizontalMargin =\n popoverPlacement?.startsWith('left') || popoverPlacement?.startsWith('right');\n const accessibleLabel = hasLabel ? (\n <>\n <label id={labelId} htmlFor={inputId}>\n {typeof label === 'string' ? <TextInputNext.Label>{label}</TextInputNext.Label> : label}\n </label>\n <span id={opacityLabelId} hidden>\n Opacity\n </span>\n </>\n ) : undefined;\n const inputHtmlAttributes: TextInputNextProps['htmlAttributes'] = useMemo(\n () =>\n hasLabel\n ? {\n id: inputId,\n 'aria-labelledby': `${labelId} ${opacityLabelId}`,\n }\n : {\n id: inputId,\n 'aria-label': 'Opacity',\n },\n [hasLabel, inputId, labelId, opacityLabelId]\n );\n\n return (\n <>\n <TextInputNext\n label={accessibleLabel}\n labelPlacement={labelPlacement}\n disabled={disabled}\n size={size}\n rootTagName=\"div\"\n prefix={\n <>\n <div className={styles.fakeValue}>\n {inputValue}\n <span className={styles.fakeValuePercent}>%</span>\n </div>\n\n <div\n ref={indicatorRef}\n className={classNames(styles.indicator, internalValue.a === 0 && styles.transparent)}\n style={\n {\n '--corvaui-colorpicker-indicatorcolor': channelsToHex(internalValue, false),\n } as CSSProperties\n }\n onClick={disabled ? undefined : openMenuSwatch}\n onKeyDown={openMenuKeyDown}\n role=\"button\"\n aria-label={hasLabel ? undefined : 'Color picker'}\n aria-labelledby={hasLabel ? labelId : undefined}\n aria-expanded={isMenuOpen}\n aria-disabled={disabled}\n tabIndex={disabled ? -1 : 0}\n />\n </>\n }\n suffix={\n enableAlpha &&\n !disableOpacityDrag &&\n !disabled && (\n <OpacityDragTracker\n value={Number(inputValue)}\n onDrag={onOpacityDrag}\n onDragEnd={onOpacityDragEnd}\n />\n )\n }\n className={classNames(\n styles.root,\n SizeToClassMap[size],\n !enableAlpha && styles.noAlpha,\n className\n )}\n testId={testId}\n inputContainerRef={inputContainerRef}\n value={inputValue}\n onChange={onOpacityInputChange}\n onFocus={openMenuFocus}\n inputType=\"number\"\n inputMode=\"numeric\"\n htmlAttributes={inputHtmlAttributes}\n elementsClassNames={elementsClassNames}\n />\n\n <Popover\n ref={popoverRef}\n anchorEl={inputContainerRef.current}\n open={isMenuOpen}\n onClose={closeMenu}\n placement={popoverPlacement}\n className={classNames(\n styles.popover,\n hasVerticalMargin && styles.marginVertical,\n hasHorizontalMargin && styles.marginHorizontal,\n internalValue.a === 0 && styles.isTransparent\n )}\n backdrop={false}\n >\n {isSwatches ? (\n <Swatches\n onChange={swatchOnChange}\n value={valueChannels}\n addTransparent={enableAlpha}\n autoFocus={focusTarget === 'palette'}\n onAutoFocus={clearFocusTarget}\n />\n ) : (\n <div ref={pickerRef} className={styles.pickerContainer} onKeyDown={onPickerKeyDown}>\n <ChromePicker\n color={internalValue}\n onChange={onInternalValueChange}\n onChangeComplete={pickerOnChange}\n disableAlpha={!enableAlpha}\n className={styles.picker}\n />\n </div>\n )}\n <div className={styles.switchButtons}>\n <Tooltip title=\"Palette\">\n <ButtonIcon\n ariaLabel=\"Show color palette\"\n size=\"medium\"\n type={isSwatches ? 'secondary' : 'tertiary'}\n onClick={setSwatches}\n >\n <PaletteIcon />\n </ButtonIcon>\n </Tooltip>\n <Tooltip title=\"Pick your own\">\n <ButtonIcon\n ariaLabel=\"Show custom color picker\"\n size=\"medium\"\n type={!isSwatches ? 'secondary' : 'tertiary'}\n onClick={setPicker}\n >\n <PickerIcon />\n </ButtonIcon>\n </Tooltip>\n </div>\n </Popover>\n </>\n );\n};\n"],"names":["SizeToClassMap","small","styles","medium","large","elementsClassNames","inputContainer","numberStepButtons","prefix","prefixContainer","suffix","suffixContainer","input","label","_ref","_ref$format","format","className","_ref$labelPlacement","labelPlacement","_ref$popoverPlacement","popoverPlacement","testId","disabled","_ref$size","size","onOpen","onClose","_ref$value","value","defaultColor","onChange","disableOpacityDrag","_ref$enableAlpha","enableAlpha","valueChannels","useMemo","channels","parseColor","_objectSpread","a","_","useState","_useState2","_slicedToArray","_useState","isMenuOpen","setIsOpen","inputContainerRef","useRef","indicatorRef","_useState4","_useState3","isSwatches","setIsSwatches","_useState6","_useState5","focusTarget","setFocusTarget","_useState8","_useState7","internalValue","setInternalValue","popoverRef","accessibilityId","concat","uuidv4","v4","inputId","labelId","opacityLabelId","hasLabel","Boolean","openMenu","useCallback","openMenuSwatch","e","preventDefault","openMenuFocus","openMenuKeyDown","event","key","closeMenu","_popoverRef$current","_indicatorRef$current","isFocusInPopover","current","contains","document","activeElement","focus","preventScroll","setSwatches","detail","setPicker","clearFocusTarget","onInternalValueChange","color","rgb","onActualChange","formatted","channelsToHex","channelsToRgba","onKeyboardPickerChange","_useChromePickerAcces","useChromePickerAccessibility","isActive","pickerRef","onPickerKeyDown","onKeyDown","useEffect","_pickerRef$current","firstControl","querySelector","onOpacityInputChange","opacityString","opacityNumber","Number","isNaN","pickerOnChange","swatchOnChange","nonZeroAlpha","alpha","onOpacityDragEnd","setTimeout","_document$activeEleme","_document$activeEleme2","blur","call","onOpacityDrag","throttle","percent","newFieldValue","String","Math","round","useOutsideClick","inputValue","hasVerticalMargin","startsWith","hasHorizontalMargin","accessibleLabel","_jsxs","jsxs","_Fragment","children","_jsx","jsx","id","htmlFor","TextInputNext","Label","hidden","undefined","inputHtmlAttributes","rootTagName","fakeValue","fakeValuePercent","ref","classNames","indicator","transparent","style","onClick","role","tabIndex","OpacityDragTracker","onDrag","onDragEnd","root","noAlpha","onFocus","inputType","inputMode","htmlAttributes","Popover","anchorEl","open","placement","popover","marginVertical","marginHorizontal","isTransparent","backdrop","Swatches","addTransparent","autoFocus","onAutoFocus","pickerContainer","ChromePicker","onChangeComplete","disableAlpha","picker","switchButtons","Tooltip","title","ButtonIcon","ariaLabel","type","PaletteIcon","PickerIcon"],"mappings":"osKA4DA,IAAMA,EAAqE,CACzEC,MAAOC,EAAOD,MACdE,OAAQD,EAAOC,OACfC,MAAOF,EAAOE,OAGVC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,CACPzJ,SAAUyF,GACV3F,MAAOM,EACPsJ,eAAgBvJ,EAChBwJ,UAA2B,YAAhBjI,GACXkI,YAAa5F,KAGfmD,EAAAC,IAAA,MAAA,CAAKW,IAAKnD,GAAW1F,UAAWf,EAAO0L,gBAAiB/E,UAAWD,GAAgBqC,SACjFC,MAAC2C,eAAY,CACX5F,MAAOpC,GACP9B,SAAUiE,GACV8F,iBAAkBvE,GAClBwE,cAAe7J,EACfjB,UAAWf,EAAO8L,WAIxBlD,EAAAC,KAAA,MAAA,CAAK9H,UAAWf,EAAO+L,cAAchD,SAAA,CACnCC,MAACgD,UAAO,CAACC,MAAM,UAASlD,SACtBC,MAACkD,aAAU,CACTC,UAAU,qBACV5K,KAAK,SACL6K,KAAMjJ,EAAa,YAAc,WACjC8G,QAASvE,GAAYqD,SAErBC,EAAAA,IAACqD,EAAWA,YAAA,QAGhBrD,MAACgD,UAAO,CAACC,MAAM,gBAAelD,SAC5BC,MAACkD,aAAU,CACTC,UAAU,2BACV5K,KAAK,SACL6K,KAAOjJ,EAA2B,WAAd,YACpB8G,QAASrE,GAAUmD,SAEnBC,EAAAA,IAACsD,EAAUA,WAAA,gBAOzB"}
|
|
1
|
+
{"version":3,"file":"ColorPicker.js","sources":["../../../../src/componentsV2/ColorPicker/ColorPicker.tsx"],"sourcesContent":["import classNames from 'classnames';\nimport {\n CSSProperties,\n KeyboardEventHandler,\n MouseEventHandler,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { ChromePicker, ColorResult } from 'react-color';\nimport { throttle } from 'lodash';\nimport { v4 as uuidv4 } from 'uuid';\n\nimport { TextInputNext, TextInputNextProps } from '../TextInputNext';\nimport { Popover, PopoverProps } from '../Popover';\nimport { ButtonIcon } from '../ButtonIcon';\nimport { Tooltip } from '../Tooltip';\nimport { Popper } from '../Popper';\n\nimport { Swatches } from './Swatches';\nimport { channelsToHex, channelsToRgba, ColorChannels, defaultColor, parseColor } from './utils';\nimport { OpacityDragTracker } from './OpacityDragtracker';\nimport { useChromePickerAccessibility } from './useChromePickerAccessibility';\n\nimport styles from './ColorPicker.scss';\n\nimport { PaletteIcon, PickerIcon } from '~/icons';\n\nexport type ColorPickerProps = {\n value?: string;\n onChange?: (value: string) => void;\n\n size?: TextInputNextProps['size'];\n label?: TextInputNextProps['label'];\n labelPlacement?: TextInputNextProps['labelPlacement'];\n disabled?: boolean;\n /**\n * Disables drag to change opacity functinality\n */\n disableOpacityDrag?: boolean;\n /**\n * Determines base format of the colour `rgb(RRR, GGG, BBB[, AAA])` or `#RRGGBB[AA]`\n */\n format?: 'rgb' | 'hex';\n /**\n * Allows user to control color's opacity, adds alpha channel to resulting color string\n */\n enableAlpha?: boolean;\n\n popoverPlacement?: PopoverProps['placement'];\n\n onOpen?: () => void;\n onClose?: () => void;\n\n elementsClassNames?: Partial<\n Omit<\n Required<TextInputNextProps>['elementsClassNames'],\n 'message' | 'numberStepButtons' | 'prefix' | 'suffix'\n > &\n Record<'indicator' | 'popover', string>\n >;\n\n className?: string;\n testId?: string;\n};\n\nconst SizeToClassMap: Record<Required<ColorPickerProps>['size'], string> = {\n small: styles.small,\n medium: styles.medium,\n large: styles.large,\n};\n\ntype FocusTarget = 'palette' | 'picker';\n\nexport const ColorPicker = ({\n format = 'hex',\n className,\n label,\n labelPlacement = 'top',\n popoverPlacement = 'bottom-start',\n testId,\n disabled,\n size = 'small',\n onOpen,\n onClose,\n value = defaultColor,\n onChange,\n disableOpacityDrag,\n enableAlpha = false,\n elementsClassNames = {},\n}: ColorPickerProps) => {\n const inputElementsClassNames = useMemo<TextInputNextProps['elementsClassNames']>(\n () => ({\n input: classNames(styles.input, elementsClassNames.input),\n inputContainer: classNames(styles.inputContainer, elementsClassNames.inputContainer),\n label: classNames(styles.label, elementsClassNames.label),\n prefix: styles.prefixContainer,\n suffix: styles.suffixContainer,\n numberStepButtons: styles.numberStepButtons,\n }),\n [elementsClassNames.input, elementsClassNames.inputContainer, elementsClassNames.label]\n );\n\n const valueChannels = useMemo(() => {\n try {\n const channels = parseColor(value);\n\n return { ...channels, a: enableAlpha ? channels.a : 1 };\n } catch (_) {\n return parseColor(defaultColor);\n }\n }, [value, enableAlpha]);\n\n const [isMenuOpen, setIsOpen] = useState(false);\n const inputContainerRef = useRef<HTMLDivElement>(null);\n const indicatorRef = useRef<HTMLDivElement>(null);\n const [isSwatches, setIsSwatches] = useState(true);\n const [focusTarget, setFocusTarget] = useState<FocusTarget | null>(null);\n const [internalValue, setInternalValue] = useState<ColorChannels>(valueChannels);\n const popoverRef = useRef<HTMLDivElement>(null);\n const accessibilityId = useMemo(() => `corva-color-picker-${uuidv4()}`, []);\n const inputId = `${accessibilityId}-opacity-input`;\n const labelId = `${accessibilityId}-label`;\n const opacityLabelId = `${accessibilityId}-opacity-label`;\n const hasLabel = Boolean(label);\n\n const openMenu = useCallback(() => {\n setIsOpen(true);\n onOpen?.();\n }, [onOpen]);\n\n const openMenuSwatch = useCallback<MouseEventHandler>(\n e => {\n e.preventDefault();\n setFocusTarget(null);\n openMenu();\n },\n [openMenu]\n );\n\n const openMenuFocus = useCallback(() => {\n setFocusTarget(null);\n openMenu();\n }, [openMenu]);\n\n const openMenuKeyDown = useCallback<KeyboardEventHandler<HTMLDivElement>>(\n event => {\n if (!disabled && (event.key === 'Enter' || event.key === ' ' || event.key === 'ArrowDown')) {\n event.preventDefault();\n setFocusTarget('palette');\n openMenu();\n }\n },\n [disabled, openMenu]\n );\n\n const closeMenu = useCallback(() => {\n const isFocusInPopover = !!popoverRef.current?.contains(document.activeElement);\n\n setFocusTarget(null);\n setIsOpen(false);\n onClose?.();\n\n // Return focus to the trigger so keyboard flow is not lost after Escape/outside dismiss\n if (isFocusInPopover) {\n indicatorRef.current?.focus({ preventScroll: true });\n }\n }, [onClose]);\n\n const setSwatches = useCallback<MouseEventHandler<HTMLButtonElement>>(event => {\n setFocusTarget(event.detail === 0 ? 'palette' : null);\n setIsSwatches(true);\n }, []);\n\n const setPicker = useCallback<MouseEventHandler<HTMLButtonElement>>(event => {\n setFocusTarget(event.detail === 0 ? 'picker' : null);\n setIsSwatches(false);\n }, []);\n\n const clearFocusTarget = useCallback(() => setFocusTarget(null), []);\n\n const onInternalValueChange = useCallback(\n (color: ColorResult) => setInternalValue(color.rgb),\n []\n );\n\n const onActualChange = useCallback(\n (color: ColorChannels) => {\n const formatted =\n format === 'hex' ? channelsToHex(color, enableAlpha) : channelsToRgba(color, enableAlpha);\n onChange?.(formatted);\n },\n [format, onChange, enableAlpha]\n );\n\n const onKeyboardPickerChange = useCallback(\n (color: ColorChannels) => {\n setInternalValue(color);\n onActualChange(color);\n },\n [onActualChange]\n );\n\n const { pickerRef, onKeyDown: onPickerKeyDown } = useChromePickerAccessibility({\n color: internalValue,\n enableAlpha,\n isActive: !isSwatches,\n onChange: onKeyboardPickerChange,\n });\n\n useEffect(() => {\n if (focusTarget !== 'picker' || isSwatches) {\n return;\n }\n\n const firstControl = pickerRef.current?.querySelector<HTMLElement>(\n '[data-color-picker-control=\"saturation\"]'\n );\n\n if (firstControl) {\n firstControl.focus({ preventScroll: true });\n clearFocusTarget();\n }\n }, [clearFocusTarget, focusTarget, isSwatches, pickerRef]);\n\n const onOpacityInputChange = useCallback(\n (opacityString: string) => {\n const opacityNumber = Number(opacityString);\n\n if (Number.isNaN(opacityNumber) || opacityNumber < 0 || opacityNumber > 100) {\n return;\n }\n\n const color = { ...valueChannels, a: opacityNumber / 100 };\n onActualChange(color);\n },\n [valueChannels, onActualChange]\n );\n\n const pickerOnChange = useCallback(\n (color: ColorResult) => {\n onActualChange(color.rgb);\n },\n [onActualChange]\n );\n\n const swatchOnChange = useCallback(\n (color: ColorChannels) => {\n const nonZeroAlpha = valueChannels.a || 1;\n const alpha = enableAlpha && color.a === 0 ? 0 : nonZeroAlpha;\n onActualChange({ ...color, a: alpha });\n },\n [onActualChange, valueChannels.a, enableAlpha]\n );\n\n // Prevents focus on opacity drag end\n const onOpacityDragEnd = useCallback(() => {\n setTimeout(() => {\n setIsOpen(false);\n (document.activeElement as HTMLElement | null)?.blur?.();\n }, 0);\n }, []);\n\n const onOpacityDrag = useMemo(\n () =>\n throttle((percent: number) => {\n const newFieldValue = String(Math.round(percent));\n onOpacityInputChange(newFieldValue);\n }, 100),\n [onOpacityInputChange]\n );\n\n useEffect(() => {\n setInternalValue(valueChannels);\n }, [valueChannels]);\n\n useEffect(() => {\n if (isMenuOpen) {\n setIsSwatches(true);\n }\n }, [isMenuOpen]);\n\n const inputValue = String(Math.round(internalValue.a * 100));\n\n const hasVerticalMargin =\n popoverPlacement?.startsWith('top') || popoverPlacement?.startsWith('bottom');\n const hasHorizontalMargin =\n popoverPlacement?.startsWith('left') || popoverPlacement?.startsWith('right');\n const accessibleLabel = hasLabel ? (\n <>\n <label id={labelId} htmlFor={inputId}>\n {typeof label === 'string' ? <TextInputNext.Label>{label}</TextInputNext.Label> : label}\n </label>\n <span id={opacityLabelId} hidden>\n Opacity\n </span>\n </>\n ) : undefined;\n const inputHtmlAttributes: TextInputNextProps['htmlAttributes'] = useMemo(\n () =>\n hasLabel\n ? {\n id: inputId,\n 'aria-labelledby': `${labelId} ${opacityLabelId}`,\n }\n : {\n id: inputId,\n 'aria-label': 'Opacity',\n },\n [hasLabel, inputId, labelId, opacityLabelId]\n );\n\n return (\n <>\n <TextInputNext\n label={accessibleLabel}\n labelPlacement={labelPlacement}\n disabled={disabled}\n size={size}\n rootTagName=\"div\"\n prefix={\n <>\n <div className={styles.fakeValue}>\n {inputValue}\n <span className={styles.fakeValuePercent}>%</span>\n </div>\n\n <div\n ref={indicatorRef}\n className={classNames(\n styles.indicator,\n internalValue.a === 0 && styles.transparent,\n elementsClassNames.indicator\n )}\n style={\n {\n '--corvaui-colorpicker-indicatorcolor': channelsToHex(internalValue, false),\n } as CSSProperties\n }\n onClick={disabled ? undefined : openMenuSwatch}\n onKeyDown={openMenuKeyDown}\n role=\"button\"\n aria-label={hasLabel ? undefined : 'Color picker'}\n aria-labelledby={hasLabel ? labelId : undefined}\n aria-expanded={isMenuOpen}\n aria-disabled={disabled}\n tabIndex={disabled ? -1 : 0}\n />\n </>\n }\n suffix={\n !isMenuOpen &&\n enableAlpha &&\n !disableOpacityDrag &&\n !disabled && (\n <OpacityDragTracker\n value={Number(inputValue)}\n onDrag={onOpacityDrag}\n onDragEnd={onOpacityDragEnd}\n />\n )\n }\n className={classNames(\n styles.root,\n SizeToClassMap[size],\n !enableAlpha && styles.noAlpha,\n className\n )}\n testId={testId}\n inputContainerRef={inputContainerRef}\n value={inputValue}\n onChange={onOpacityInputChange}\n onFocus={openMenuFocus}\n inputType=\"number\"\n inputMode=\"numeric\"\n htmlAttributes={inputHtmlAttributes}\n elementsClassNames={inputElementsClassNames}\n />\n\n {/* Popover backdrop is needed for ColorPicker to work better in popovers: click outside will close the ColorPicker but not the popover */}\n <Popover\n ref={popoverRef}\n anchorEl={inputContainerRef.current}\n open={isMenuOpen}\n onClose={closeMenu}\n placement={popoverPlacement}\n className={classNames(\n styles.popover,\n hasVerticalMargin && styles.marginVertical,\n hasHorizontalMargin && styles.marginHorizontal,\n internalValue.a === 0 && styles.isTransparent,\n elementsClassNames.popover\n )}\n >\n {isSwatches ? (\n <Swatches\n onChange={swatchOnChange}\n value={valueChannels}\n addTransparent={enableAlpha}\n autoFocus={focusTarget === 'palette'}\n onAutoFocus={clearFocusTarget}\n />\n ) : (\n <div ref={pickerRef} className={styles.pickerContainer} onKeyDown={onPickerKeyDown}>\n <ChromePicker\n color={internalValue}\n onChange={onInternalValueChange}\n onChangeComplete={pickerOnChange}\n disableAlpha={!enableAlpha}\n className={styles.picker}\n />\n </div>\n )}\n <div className={styles.switchButtons}>\n <Tooltip title=\"Palette\">\n <ButtonIcon\n ariaLabel=\"Show color palette\"\n size=\"medium\"\n type={isSwatches ? 'secondary' : 'tertiary'}\n onClick={setSwatches}\n >\n <PaletteIcon />\n </ButtonIcon>\n </Tooltip>\n <Tooltip title=\"Pick your own\">\n <ButtonIcon\n ariaLabel=\"Show custom color picker\"\n size=\"medium\"\n type={!isSwatches ? 'secondary' : 'tertiary'}\n onClick={setPicker}\n >\n <PickerIcon />\n </ButtonIcon>\n </Tooltip>\n </div>\n </Popover>\n\n {/* Opacity Drag Tracker should work even with popover open with a backdrop */}\n {isMenuOpen && enableAlpha && !disableOpacityDrag && (\n <Popper\n open={isMenuOpen}\n anchorEl={inputContainerRef.current}\n className={styles.dragTrackerPopper}\n placement=\"right\"\n >\n <OpacityDragTracker onDrag={onOpacityDrag} onDragEnd={onOpacityDragEnd} />\n </Popper>\n )}\n </>\n );\n};\n"],"names":["SizeToClassMap","small","styles","medium","large","_ref","_ref$format","format","className","label","_ref$labelPlacement","labelPlacement","_ref$popoverPlacement","popoverPlacement","testId","disabled","_ref$size","size","onOpen","onClose","_ref$value","value","defaultColor","onChange","disableOpacityDrag","_ref$enableAlpha","enableAlpha","_ref$elementsClassNam","elementsClassNames","inputElementsClassNames","useMemo","input","classNames","inputContainer","prefix","prefixContainer","suffix","suffixContainer","numberStepButtons","valueChannels","channels","parseColor","_objectSpread","a","_","useState","_useState2","_slicedToArray","_useState","isMenuOpen","setIsOpen","inputContainerRef","useRef","indicatorRef","_useState4","_useState3","isSwatches","setIsSwatches","_useState6","_useState5","focusTarget","setFocusTarget","_useState8","_useState7","internalValue","setInternalValue","popoverRef","accessibilityId","concat","uuidv4","v4","inputId","labelId","opacityLabelId","hasLabel","Boolean","openMenu","useCallback","openMenuSwatch","e","preventDefault","openMenuFocus","openMenuKeyDown","event","key","closeMenu","_popoverRef$current","_indicatorRef$current","isFocusInPopover","current","contains","document","activeElement","focus","preventScroll","setSwatches","detail","setPicker","clearFocusTarget","onInternalValueChange","color","rgb","onActualChange","formatted","channelsToHex","channelsToRgba","onKeyboardPickerChange","_useChromePickerAcces","useChromePickerAccessibility","isActive","pickerRef","onPickerKeyDown","onKeyDown","useEffect","_pickerRef$current","firstControl","querySelector","onOpacityInputChange","opacityString","opacityNumber","Number","isNaN","pickerOnChange","swatchOnChange","nonZeroAlpha","alpha","onOpacityDragEnd","setTimeout","_document$activeEleme","_document$activeEleme2","blur","call","onOpacityDrag","throttle","percent","newFieldValue","String","Math","round","inputValue","hasVerticalMargin","startsWith","hasHorizontalMargin","accessibleLabel","_jsxs","jsxs","_Fragment","children","_jsx","jsx","id","htmlFor","TextInputNext","Label","hidden","undefined","inputHtmlAttributes","rootTagName","fakeValue","fakeValuePercent","ref","indicator","transparent","style","onClick","role","tabIndex","OpacityDragTracker","onDrag","onDragEnd","root","noAlpha","onFocus","inputType","inputMode","htmlAttributes","Popover","anchorEl","open","placement","popover","marginVertical","marginHorizontal","isTransparent","Swatches","addTransparent","autoFocus","onAutoFocus","pickerContainer","ChromePicker","onChangeComplete","disableAlpha","picker","switchButtons","Tooltip","title","ButtonIcon","ariaLabel","type","PaletteIcon","PickerIcon","Popper","dragTrackerPopper"],"mappings":"urKAoEA,IAAMA,EAAqE,CACzEC,MAAOC,EAAOD,MACdE,OAAQD,EAAOC,OACfC,MAAOF,EAAOE,2BAKW,SAgBHC,GAAA,IAAAC,EAAAD,EAftBE,OAAAA,aAAS,MAAKD,EACdE,IAAAA,UACAC,IAAAA,MAAKC,EAAAL,EACLM,eAAAA,aAAiB,MAAKD,EAAAE,EAAAP,EACtBQ,iBAAAA,aAAmB,eAAcD,EACjCE,IAAAA,OACAC,IAAAA,SAAQC,EAAAX,EACRY,KAAAA,aAAO,QAAOD,EACdE,IAAAA,OACAC,IAAAA,QAAOC,EAAAf,EACPgB,MAAAA,aAAQC,EAAYA,aAAAF,EACpBG,IAAAA,SACAC,IAAAA,mBAAkBC,EAAApB,EAClBqB,YAAAA,cAAmBD,EAAAE,EAAAtB,EACnBuB,mBAAAA,OAAkB,IAAAD,EAAG,CAAA,EAAEA,EAEjBE,EAA0BC,EAAAA,SAC9B,WAAA,MAAO,CACLC,MAAOC,EAAAA,QAAW9B,EAAO6B,MAAOH,EAAmBG,OACnDE,eAAgBD,EAAAA,QAAW9B,EAAO+B,eAAgBL,EAAmBK,g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ACnCC,MAAC8C,UAAO,CAACC,MAAM,UAAShD,SACtBC,MAACgD,aAAU,CACTC,UAAU,qBACVpL,KAAK,SACLqL,KAAM9I,EAAa,YAAc,WACjC4G,QAASrE,GAAYoD,SAErBC,EAAAA,IAACmD,EAAWA,YAAA,QAGhBnD,MAAC8C,UAAO,CAACC,MAAM,gBAAehD,SAC5BC,MAACgD,aAAU,CACTC,UAAU,2BACVpL,KAAK,SACLqL,KAAO9I,EAA2B,WAAd,YACpB4G,QAASnE,GAAUkD,SAEnBC,EAAAA,IAACoD,EAAUA,WAAA,cAOlBvJ,GAAcvB,IAAgBF,GAC7B4H,EAAAA,IAACqD,EAAAA,OAAM,CACLvB,KAAMjI,EACNgI,SAAU9H,EAAkBsC,QAC5BjF,UAAWN,EAAOwM,kBAClBvB,UAAU,QAAOhC,SAEjBC,MAACmB,qBAAkB,CAACC,OAAQpC,GAAeqC,UAAW3C,SAKhE"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";require('./../../ext-esm/style-inject/dist/style-inject.es.js')('.ColorPicker_root__cuK3O{pointer-events:none}.ColorPicker_root__cuK3O .ColorPicker_inputContainer__m2fxo{flex:0 0 auto;pointer-events:auto;width:var(--corvaui-colorpicker-fieldwidth)}.ColorPicker_root__cuK3O .ColorPicker_label__c3tdQ{display:table;pointer-events:auto}.ColorPicker_indicator__8cXCM{background:#fff repeating-conic-gradient(#ccc 0 25%,transparent 0 50%) 50%;background-size:4px 4px;border-radius:6px;cursor:pointer;height:var(--corvaui-colorpicker-indicatorsize);margin:-1px;overflow:hidden;position:relative;width:var(--corvaui-colorpicker-indicatorsize)}.ColorPicker_indicator__8cXCM:before{border:1px solid red;border-radius:2px;content:"";left:50%;position:absolute;top:50%;transform:translate(-50%,-50%) rotate(-45deg);width:90%}.ColorPicker_indicator__8cXCM:focus-visible{box-shadow:0 0 0 1px var(--palette-primary-main),0 0 0 5px rgb(from var(--palette-primary-main) r g b/.12);outline:2px solid transparent}.ColorPicker_indicator__8cXCM:after{background:var(--corvaui-colorpicker-indicatorcolor);content:"";inset:0;position:absolute;transition:opacity .15s cubic-bezier(.4,0,.2,1)}.ColorPicker_transparent__qdIVz:after{opacity:0}.ColorPicker_popover__XC1n6{--corvaui-background:$palette_b8;background-color:var(--palette-background-b-8);overflow:hidden;width:230px!important}.ColorPicker_marginVertical__NvPrm{margin:8px 0}.ColorPicker_marginHorizontal__OU5sQ{margin:0 8px}.ColorPicker_switchButtons__XSdR3{display:flex;flex-flow:row nowrap;gap:4px;justify-content:center;padding:8px}.ColorPicker_numberStepButtons__8ed-p{display:none}.ColorPicker_prefixContainer__XyJxU,.ColorPicker_suffixContainer__KzygM{position:relative}.ColorPicker_fakeValue__L1ty9{color:transparent;left:calc(100% + 8px);pointer-events:none;position:absolute;top:50%;transform:translateY(-50%);user-select:none}.ColorPicker_fakeValuePercent__fBPcp{color:var(--palette-primary-text-1)}.ColorPicker_small__aZqd8{--corvaui-colorpicker-indicatorsize:20px;--corvaui-colorpicker-fieldwidth:78px}.ColorPicker_medium__dMpzx{--corvaui-colorpicker-indicatorsize:24px;--corvaui-colorpicker-fieldwidth:82px}.ColorPicker_large__lyQRv{--corvaui-colorpicker-indicatorsize:28px;--corvaui-colorpicker-fieldwidth:91px}.ColorPicker_noAlpha__o9BSY .ColorPicker_inputContainer__m2fxo{display:inline-block;vertical-align:top;width:auto}.ColorPicker_noAlpha__o9BSY .ColorPicker_fakeValue__L1ty9,.ColorPicker_noAlpha__o9BSY .ColorPicker_input__59TsK{display:none}.ColorPicker_pickerContainer__ASGM6 [data-color-picker-control]:focus-visible{border-radius:4px;box-shadow:0 0 0 1px var(--palette-primary-main),0 0 0 5px rgb(from var(--palette-primary-main) r g b/.12);outline:2px solid transparent}.ColorPicker_picker__GHZdT{background:transparent!important;border-radius:0!important;box-shadow:none!important;width:100%!important}.ColorPicker_picker__GHZdT .hue-horizontal{border-radius:5px}.ColorPicker_picker__GHZdT>div:first-child{height:135px;padding:0!important}.ColorPicker_picker__GHZdT>div:last-child{padding:0!important}.ColorPicker_picker__GHZdT>div:last-child>div:first-child{align-items:center!important;display:flex!important;flex-flow:row nowrap!important;gap:16px!important;overflow:hidden!important;padding:16px!important}.ColorPicker_picker__GHZdT>div:last-child>div:first-child>div:first-child{flex:0 0 auto!important;width:auto!important}.ColorPicker_picker__GHZdT>div:last-child>div:first-child>div:first-child>div{background-color:#fff!important;border-radius:4px!important;box-shadow:none!important;height:32px!important;margin:0!important;overflow:hidden!important;width:32px!important}.ColorPicker_picker__GHZdT>div:last-child>div:first-child>div:first-child>div>div:first-child{animation-name:ColorPicker_active__DFLPz;border-radius:0!important;box-shadow:none!important}.ColorPicker_picker__GHZdT>div:last-child>div:first-child>div:last-child{padding-left:6px!important}.ColorPicker_picker__GHZdT>div:last-child>div:first-child>div:last-child>div:first-child{margin:0!important}.ColorPicker_picker__GHZdT>div:last-child>div:first-child>div:last-child>div:last-child{margin-top:12px!important}.ColorPicker_picker__GHZdT>div:last-child>div:first-child>div:last-child>div:last-child>div>div:first-child{display:none}.ColorPicker_picker__GHZdT>div:last-child>div:first-child>div:last-child>div:last-child>div>div:nth-child(2){border-radius:5px!important}.ColorPicker_picker__GHZdT>div:last-child>div:first-child>div:last-child>div:last-child>div>div:last-child{margin:0!important}.ColorPicker_picker__GHZdT>div:last-child>div:last-child{display:none!important}.ColorPicker_isTransparent__TPLhY .ColorPicker_picker__GHZdT>div:last-child>div:first-child>div:first-child>div>div:last-child{position:relative}.ColorPicker_isTransparent__TPLhY .ColorPicker_picker__GHZdT>div:last-child>div:first-child>div:first-child>div>div:last-child:before{border:2px solid red;border-radius:2px;content:"";left:50%;position:absolute;top:50%;transform:translate(-50%,-50%) rotate(-45deg);width:90%}'),module.exports={spacing:"8",root:"ColorPicker_root__cuK3O",inputContainer:"ColorPicker_inputContainer__m2fxo",label:"ColorPicker_label__c3tdQ",indicator:"ColorPicker_indicator__8cXCM",transparent:"ColorPicker_transparent__qdIVz",popover:"ColorPicker_popover__XC1n6",marginVertical:"ColorPicker_marginVertical__NvPrm",marginHorizontal:"ColorPicker_marginHorizontal__OU5sQ",switchButtons:"ColorPicker_switchButtons__XSdR3",numberStepButtons:"ColorPicker_numberStepButtons__8ed-p",prefixContainer:"ColorPicker_prefixContainer__XyJxU",suffixContainer:"ColorPicker_suffixContainer__KzygM",fakeValue:"ColorPicker_fakeValue__L1ty9",fakeValuePercent:"ColorPicker_fakeValuePercent__fBPcp",small:"ColorPicker_small__aZqd8",medium:"ColorPicker_medium__dMpzx",large:"ColorPicker_large__lyQRv",noAlpha:"ColorPicker_noAlpha__o9BSY",input:"ColorPicker_input__59TsK",pickerContainer:"ColorPicker_pickerContainer__ASGM6",picker:"ColorPicker_picker__GHZdT",active:"ColorPicker_active__DFLPz",isTransparent:"ColorPicker_isTransparent__TPLhY"};
|
|
1
|
+
"use strict";require('./../../ext-esm/style-inject/dist/style-inject.es.js')('.ColorPicker_root__cuK3O{pointer-events:none}.ColorPicker_root__cuK3O .ColorPicker_inputContainer__m2fxo{flex:0 0 auto;pointer-events:auto;width:var(--corvaui-colorpicker-fieldwidth)}.ColorPicker_root__cuK3O .ColorPicker_label__c3tdQ{display:table;pointer-events:auto}.ColorPicker_indicator__8cXCM{background:#fff repeating-conic-gradient(#ccc 0 25%,transparent 0 50%) 50%;background-size:4px 4px;border-radius:6px;cursor:pointer;height:var(--corvaui-colorpicker-indicatorsize);margin:-1px;overflow:hidden;position:relative;width:var(--corvaui-colorpicker-indicatorsize)}.ColorPicker_indicator__8cXCM:before{border:1px solid red;border-radius:2px;content:"";left:50%;position:absolute;top:50%;transform:translate(-50%,-50%) rotate(-45deg);width:90%}.ColorPicker_indicator__8cXCM:focus-visible{box-shadow:0 0 0 1px var(--palette-primary-main),0 0 0 5px rgb(from var(--palette-primary-main) r g b/.12);outline:2px solid transparent}.ColorPicker_indicator__8cXCM:after{background:var(--corvaui-colorpicker-indicatorcolor);content:"";inset:0;position:absolute;transition:opacity .15s cubic-bezier(.4,0,.2,1)}.ColorPicker_transparent__qdIVz:after{opacity:0}.ColorPicker_popover__XC1n6{--corvaui-background:$palette_b8;background-color:var(--palette-background-b-8);overflow:hidden;width:230px!important}.ColorPicker_marginVertical__NvPrm{margin:8px 0}.ColorPicker_marginHorizontal__OU5sQ{margin:0 8px}.ColorPicker_switchButtons__XSdR3{display:flex;flex-flow:row nowrap;gap:4px;justify-content:center;padding:8px}.ColorPicker_numberStepButtons__8ed-p{display:none}.ColorPicker_prefixContainer__XyJxU,.ColorPicker_suffixContainer__KzygM{position:relative}.ColorPicker_fakeValue__L1ty9{color:transparent;left:calc(100% + 8px);pointer-events:none;position:absolute;top:50%;transform:translateY(-50%);user-select:none}.ColorPicker_fakeValuePercent__fBPcp{color:var(--palette-primary-text-1)}.ColorPicker_small__aZqd8{--corvaui-colorpicker-indicatorsize:20px;--corvaui-colorpicker-fieldwidth:78px}.ColorPicker_medium__dMpzx{--corvaui-colorpicker-indicatorsize:24px;--corvaui-colorpicker-fieldwidth:82px}.ColorPicker_large__lyQRv{--corvaui-colorpicker-indicatorsize:28px;--corvaui-colorpicker-fieldwidth:91px}.ColorPicker_noAlpha__o9BSY .ColorPicker_inputContainer__m2fxo{display:inline-block;vertical-align:top;width:auto}.ColorPicker_noAlpha__o9BSY .ColorPicker_fakeValue__L1ty9,.ColorPicker_noAlpha__o9BSY .ColorPicker_input__59TsK{display:none}.ColorPicker_dragTrackerPopper__zaNX-{margin-left:-8px;z-index:var(--z-index-modal)}.ColorPicker_pickerContainer__ASGM6 [data-color-picker-control]:focus-visible{border-radius:4px;box-shadow:0 0 0 1px var(--palette-primary-main),0 0 0 5px rgb(from var(--palette-primary-main) r g b/.12);outline:2px solid transparent}.ColorPicker_picker__GHZdT{background:transparent!important;border-radius:0!important;box-shadow:none!important;width:100%!important}.ColorPicker_picker__GHZdT .hue-horizontal{border-radius:5px}.ColorPicker_picker__GHZdT>div:first-child{height:135px;padding:0!important}.ColorPicker_picker__GHZdT>div:last-child{padding:0!important}.ColorPicker_picker__GHZdT>div:last-child>div:first-child{align-items:center!important;display:flex!important;flex-flow:row nowrap!important;gap:16px!important;overflow:hidden!important;padding:16px!important}.ColorPicker_picker__GHZdT>div:last-child>div:first-child>div:first-child{flex:0 0 auto!important;width:auto!important}.ColorPicker_picker__GHZdT>div:last-child>div:first-child>div:first-child>div{background-color:#fff!important;border-radius:4px!important;box-shadow:none!important;height:32px!important;margin:0!important;overflow:hidden!important;width:32px!important}.ColorPicker_picker__GHZdT>div:last-child>div:first-child>div:first-child>div>div:first-child{animation-name:ColorPicker_active__DFLPz;border-radius:0!important;box-shadow:none!important}.ColorPicker_picker__GHZdT>div:last-child>div:first-child>div:last-child{padding-left:6px!important}.ColorPicker_picker__GHZdT>div:last-child>div:first-child>div:last-child>div:first-child{margin:0!important}.ColorPicker_picker__GHZdT>div:last-child>div:first-child>div:last-child>div:last-child{margin-top:12px!important}.ColorPicker_picker__GHZdT>div:last-child>div:first-child>div:last-child>div:last-child>div>div:first-child{display:none}.ColorPicker_picker__GHZdT>div:last-child>div:first-child>div:last-child>div:last-child>div>div:nth-child(2){border-radius:5px!important}.ColorPicker_picker__GHZdT>div:last-child>div:first-child>div:last-child>div:last-child>div>div:last-child{margin:0!important}.ColorPicker_picker__GHZdT>div:last-child>div:last-child{display:none!important}.ColorPicker_isTransparent__TPLhY .ColorPicker_picker__GHZdT>div:last-child>div:first-child>div:first-child>div>div:last-child{position:relative}.ColorPicker_isTransparent__TPLhY .ColorPicker_picker__GHZdT>div:last-child>div:first-child>div:first-child>div>div:last-child:before{border:2px solid red;border-radius:2px;content:"";left:50%;position:absolute;top:50%;transform:translate(-50%,-50%) rotate(-45deg);width:90%}'),module.exports={spacing:"8",root:"ColorPicker_root__cuK3O",inputContainer:"ColorPicker_inputContainer__m2fxo",label:"ColorPicker_label__c3tdQ",indicator:"ColorPicker_indicator__8cXCM",transparent:"ColorPicker_transparent__qdIVz",popover:"ColorPicker_popover__XC1n6",marginVertical:"ColorPicker_marginVertical__NvPrm",marginHorizontal:"ColorPicker_marginHorizontal__OU5sQ",switchButtons:"ColorPicker_switchButtons__XSdR3",numberStepButtons:"ColorPicker_numberStepButtons__8ed-p",prefixContainer:"ColorPicker_prefixContainer__XyJxU",suffixContainer:"ColorPicker_suffixContainer__KzygM",fakeValue:"ColorPicker_fakeValue__L1ty9",fakeValuePercent:"ColorPicker_fakeValuePercent__fBPcp",small:"ColorPicker_small__aZqd8",medium:"ColorPicker_medium__dMpzx",large:"ColorPicker_large__lyQRv",noAlpha:"ColorPicker_noAlpha__o9BSY",input:"ColorPicker_input__59TsK",dragTrackerPopper:"ColorPicker_dragTrackerPopper__zaNX-",pickerContainer:"ColorPicker_pickerContainer__ASGM6",picker:"ColorPicker_picker__GHZdT",active:"ColorPicker_active__DFLPz",isTransparent:"ColorPicker_isTransparent__TPLhY"};
|
|
2
2
|
//# sourceMappingURL=ColorPicker.scss.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/slicedToArray"),a=require("react"),r=require("classnames"),t=require("./OpacityDragTracker.scss.js"),n=require("react/jsx-runtime");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=u(e),i=u(r),c=function(e){return Math.min(100,Math.max(0,e))};exports.OpacityDragTracker=function(e){var r=e.value,u=void 0===r?0:r,s=e.onDrag,l=e.onDragEnd,f=a.useRef(null),v=a.useState(!1),d=o.default(v,2),m=d[0],
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/slicedToArray"),a=require("react"),r=require("classnames"),t=require("./OpacityDragTracker.scss.js"),n=require("react/jsx-runtime");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=u(e),i=u(r),c=function(e){return Math.min(100,Math.max(0,e))};exports.OpacityDragTracker=function(e){var r=e.value,u=void 0===r?0:r,s=e.onDrag,l=e.onDragEnd,f=a.useRef(null),v=a.useState(!1),d=o.default(v,2),m=d[0],p=d[1],b=Math.round(u),g=a.useCallback((function(e){e.preventDefault(),e.stopPropagation(),p(!1),null==l||l()}),[l]),k=a.useCallback((function(e){e.preventDefault(),p(!0)}),[]),h=a.useCallback((function(e){var a=e.currentTarget.getBoundingClientRect(),r=100*(e.clientX-a.left-5)/(a.width-10),t=Math.min(100,Math.max(0,r));null==s||s(t)}),[s]),w=a.useCallback((function(e){var a,r=e.shiftKey?10:1;switch(e.key){case"ArrowRight":case"ArrowUp":a=c(b+r);break;case"ArrowLeft":case"ArrowDown":a=c(b-r);break;case"PageUp":a=c(b+10);break;case"PageDown":a=c(b-10);break;case"Home":a=0;break;case"End":a=100;break;default:return}e.preventDefault(),null==s||s(a)}),[s,b]);return a.useEffect((function(){if(m&&f.current){var e=f.current;return document.addEventListener("mouseup",g),e.addEventListener("mousemove",h),function(){document.removeEventListener("mouseup",g),e.removeEventListener("mousemove",h)}}}),[m,g,h]),n.jsx("div",{onMouseDown:k,onKeyDown:w,ref:f,className:i.default(t.root,m&&t.dragging),role:"slider","aria-label":"Opacity","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":b,"aria-valuetext":"".concat(b,"% opacity"),"aria-orientation":"horizontal",tabIndex:0})};
|
|
2
2
|
//# sourceMappingURL=OpacityDragtracker.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpacityDragtracker.js","sources":["../../../../../src/componentsV2/ColorPicker/OpacityDragtracker/OpacityDragtracker.tsx"],"sourcesContent":["import {\n KeyboardEventHandler,\n MouseEventHandler,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport classNames from 'classnames';\n\nimport styles from './OpacityDragTracker.scss';\n\nconst margin = 5;\n\nexport type DragTrackerProps = {\n value?: number;\n onDrag?: (percent: number) => void;\n onDragEnd?: () => void;\n};\n\nconst clampPercent = (value: number) => Math.min(100, Math.max(0, value));\n\nexport const OpacityDragTracker = ({ value = 0, onDrag, onDragEnd }: DragTrackerProps) => {\n const dragZoneRef = useRef<HTMLDivElement>(null);\n const [isDragging, setIsDragging] = useState(false);\n const roundedValue = Math.round(value);\n\n const handleMouseUp = useCallback(\n (e: MouseEvent) => {\n e.preventDefault();\n setIsDragging(false);\n onDragEnd?.();\n },\n [onDragEnd]\n );\n\n const handleMouseDown = useCallback<MouseEventHandler<HTMLElement>>(e => {\n e.preventDefault();\n\n setIsDragging(true);\n }, []);\n\n const handleMouseMove = useCallback(\n (e: MouseEvent) => {\n const rect = (e.currentTarget as HTMLElement).getBoundingClientRect();\n const x = e.clientX - rect.left - margin;\n const width = rect.width - margin * 2;\n\n const percentWithMargin = (100 * x) / width;\n const percent = Math.min(100, Math.max(0, percentWithMargin));\n\n onDrag?.(percent);\n },\n [onDrag]\n );\n\n const handleKeyDown = useCallback<KeyboardEventHandler<HTMLDivElement>>(\n event => {\n const arrowStep = event.shiftKey ? 10 : 1;\n let nextValue: number | undefined;\n\n switch (event.key) {\n case 'ArrowRight':\n case 'ArrowUp':\n nextValue = clampPercent(roundedValue + arrowStep);\n break;\n case 'ArrowLeft':\n case 'ArrowDown':\n nextValue = clampPercent(roundedValue - arrowStep);\n break;\n case 'PageUp':\n nextValue = clampPercent(roundedValue + 10);\n break;\n case 'PageDown':\n nextValue = clampPercent(roundedValue - 10);\n break;\n case 'Home':\n nextValue = 0;\n break;\n case 'End':\n nextValue = 100;\n break;\n default:\n return;\n }\n\n event.preventDefault();\n onDrag?.(nextValue);\n },\n [onDrag, roundedValue]\n );\n\n useEffect(() => {\n if (isDragging && dragZoneRef.current) {\n const ref = dragZoneRef.current;\n\n document.addEventListener('mouseup', handleMouseUp);\n ref.addEventListener('mousemove', handleMouseMove);\n\n return () => {\n document.removeEventListener('mouseup', handleMouseUp);\n ref.removeEventListener('mousemove', handleMouseMove);\n };\n }\n\n return undefined;\n }, [isDragging, handleMouseUp, handleMouseMove]);\n\n return (\n <div\n onMouseDown={handleMouseDown}\n onKeyDown={handleKeyDown}\n ref={dragZoneRef}\n className={classNames(styles.root, isDragging && styles.dragging)}\n role=\"slider\"\n aria-label=\"Opacity\"\n aria-valuemin={0}\n aria-valuemax={100}\n aria-valuenow={roundedValue}\n aria-valuetext={`${roundedValue}% opacity`}\n aria-orientation=\"horizontal\"\n tabIndex={0}\n />\n );\n};\n"],"names":["clampPercent","value","Math","min","max","_ref","_ref$value","onDrag","onDragEnd","dragZoneRef","useRef","useState","_useState2","_slicedToArray","_useState","isDragging","setIsDragging","roundedValue","round","handleMouseUp","useCallback","e","preventDefault","handleMouseDown","handleMouseMove","rect","currentTarget","getBoundingClientRect","percentWithMargin","clientX","left","width","margin","percent","handleKeyDown","event","nextValue","arrowStep","shiftKey","key","useEffect","current","ref","document","addEventListener","removeEventListener","_jsx","onMouseDown","onKeyDown","className","classNames","styles","root","dragging","role","concat","tabIndex"],"mappings":"wUAoBMA,EAAe,SAACC,GAAa,OAAKC,KAAKC,IAAI,IAAKD,KAAKE,IAAI,EAAGH,GAAO,6BAEvC,SAAwDI,GAAA,IAAAC,EAAAD,EAArDJ,MAAAA,aAAQ,EAACK,EAAEC,IAAAA,OAAQC,IAAAA,UAChDC,EAAcC,SAAuB,MACPC,EAAAA,EAAQA,UAAC,GAAMC,EAAAC,EAAAA,QAAAC,EAAA,GAA5CC,EAAUH,EAAA,GAAEI,EAAaJ,EAAA,GAC1BK,EAAef,KAAKgB,MAAMjB,GAE1BkB,EAAgBC,eACpB,SAACC,GACCA,EAAEC,
|
|
1
|
+
{"version":3,"file":"OpacityDragtracker.js","sources":["../../../../../src/componentsV2/ColorPicker/OpacityDragtracker/OpacityDragtracker.tsx"],"sourcesContent":["import {\n KeyboardEventHandler,\n MouseEventHandler,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport classNames from 'classnames';\n\nimport styles from './OpacityDragTracker.scss';\n\nconst margin = 5;\n\nexport type DragTrackerProps = {\n value?: number;\n onDrag?: (percent: number) => void;\n onDragEnd?: () => void;\n};\n\nconst clampPercent = (value: number) => Math.min(100, Math.max(0, value));\n\nexport const OpacityDragTracker = ({ value = 0, onDrag, onDragEnd }: DragTrackerProps) => {\n const dragZoneRef = useRef<HTMLDivElement>(null);\n const [isDragging, setIsDragging] = useState(false);\n const roundedValue = Math.round(value);\n\n const handleMouseUp = useCallback(\n (e: MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n setIsDragging(false);\n onDragEnd?.();\n },\n [onDragEnd]\n );\n\n const handleMouseDown = useCallback<MouseEventHandler<HTMLElement>>(e => {\n e.preventDefault();\n\n setIsDragging(true);\n }, []);\n\n const handleMouseMove = useCallback(\n (e: MouseEvent) => {\n const rect = (e.currentTarget as HTMLElement).getBoundingClientRect();\n const x = e.clientX - rect.left - margin;\n const width = rect.width - margin * 2;\n\n const percentWithMargin = (100 * x) / width;\n const percent = Math.min(100, Math.max(0, percentWithMargin));\n\n onDrag?.(percent);\n },\n [onDrag]\n );\n\n const handleKeyDown = useCallback<KeyboardEventHandler<HTMLDivElement>>(\n event => {\n const arrowStep = event.shiftKey ? 10 : 1;\n let nextValue: number | undefined;\n\n switch (event.key) {\n case 'ArrowRight':\n case 'ArrowUp':\n nextValue = clampPercent(roundedValue + arrowStep);\n break;\n case 'ArrowLeft':\n case 'ArrowDown':\n nextValue = clampPercent(roundedValue - arrowStep);\n break;\n case 'PageUp':\n nextValue = clampPercent(roundedValue + 10);\n break;\n case 'PageDown':\n nextValue = clampPercent(roundedValue - 10);\n break;\n case 'Home':\n nextValue = 0;\n break;\n case 'End':\n nextValue = 100;\n break;\n default:\n return;\n }\n\n event.preventDefault();\n onDrag?.(nextValue);\n },\n [onDrag, roundedValue]\n );\n\n useEffect(() => {\n if (isDragging && dragZoneRef.current) {\n const ref = dragZoneRef.current;\n\n document.addEventListener('mouseup', handleMouseUp);\n ref.addEventListener('mousemove', handleMouseMove);\n\n return () => {\n document.removeEventListener('mouseup', handleMouseUp);\n ref.removeEventListener('mousemove', handleMouseMove);\n };\n }\n\n return undefined;\n }, [isDragging, handleMouseUp, handleMouseMove]);\n\n return (\n <div\n onMouseDown={handleMouseDown}\n onKeyDown={handleKeyDown}\n ref={dragZoneRef}\n className={classNames(styles.root, isDragging && styles.dragging)}\n role=\"slider\"\n aria-label=\"Opacity\"\n aria-valuemin={0}\n aria-valuemax={100}\n aria-valuenow={roundedValue}\n aria-valuetext={`${roundedValue}% opacity`}\n aria-orientation=\"horizontal\"\n tabIndex={0}\n />\n );\n};\n"],"names":["clampPercent","value","Math","min","max","_ref","_ref$value","onDrag","onDragEnd","dragZoneRef","useRef","useState","_useState2","_slicedToArray","_useState","isDragging","setIsDragging","roundedValue","round","handleMouseUp","useCallback","e","preventDefault","stopPropagation","handleMouseDown","handleMouseMove","rect","currentTarget","getBoundingClientRect","percentWithMargin","clientX","left","width","margin","percent","handleKeyDown","event","nextValue","arrowStep","shiftKey","key","useEffect","current","ref","document","addEventListener","removeEventListener","_jsx","onMouseDown","onKeyDown","className","classNames","styles","root","dragging","role","concat","tabIndex"],"mappings":"wUAoBMA,EAAe,SAACC,GAAa,OAAKC,KAAKC,IAAI,IAAKD,KAAKE,IAAI,EAAGH,GAAO,6BAEvC,SAAwDI,GAAA,IAAAC,EAAAD,EAArDJ,MAAAA,aAAQ,EAACK,EAAEC,IAAAA,OAAQC,IAAAA,UAChDC,EAAcC,SAAuB,MACPC,EAAAA,EAAQA,UAAC,GAAMC,EAAAC,EAAAA,QAAAC,EAAA,GAA5CC,EAAUH,EAAA,GAAEI,EAAaJ,EAAA,GAC1BK,EAAef,KAAKgB,MAAMjB,GAE1BkB,EAAgBC,eACpB,SAACC,GACCA,EAAEC,iBACFD,EAAEE,kBACFP,GAAc,GACdR,SAAAA,GACF,GACA,CAACA,IAGGgB,EAAkBJ,eAA4C,SAAAC,GAClEA,EAAEC,iBAEFN,GAAc,EACf,GAAE,IAEGS,EAAkBL,eACtB,SAACC,GACC,IAAMK,EAAQL,EAAEM,cAA8BC,wBAIxCC,EAAqB,KAHjBR,EAAES,QAAUJ,EAAKK,KAlClB,IAmCKL,EAAKM,MAAQC,IAGrBC,EAAUhC,KAAKC,IAAI,IAAKD,KAAKE,IAAI,EAAGyB,IAE1CtB,SAAAA,EAAS2B,EACX,GACA,CAAC3B,IAGG4B,EAAgBf,eACpB,SAAAgB,GACE,IACIC,EADEC,EAAYF,EAAMG,SAAW,GAAK,EAGxC,OAAQH,EAAMI,KACZ,IAAK,aACL,IAAK,UACHH,EAAYrC,EAAaiB,EAAeqB,GACxC,MACF,IAAK,YACL,IAAK,YACHD,EAAYrC,EAAaiB,EAAeqB,GACxC,MACF,IAAK,SACHD,EAAYrC,EAAaiB,EAAe,IACxC,MACF,IAAK,WACHoB,EAAYrC,EAAaiB,EAAe,IACxC,MACF,IAAK,OACHoB,EAAY,EACZ,MACF,IAAK,MACHA,EAAY,IACZ,MACF,QACE,OAGJD,EAAMd,iBACNf,SAAAA,EAAS8B,EACX,GACA,CAAC9B,EAAQU,IAmBX,OAhBAwB,EAAAA,WAAU,WACR,GAAI1B,GAAcN,EAAYiC,QAAS,CACrC,IAAMC,EAAMlC,EAAYiC,QAKxB,OAHAE,SAASC,iBAAiB,UAAW1B,GACrCwB,EAAIE,iBAAiB,YAAapB,GAE3B,WACLmB,SAASE,oBAAoB,UAAW3B,GACxCwB,EAAIG,oBAAoB,YAAarB,GAEzC,CAGD,GAAE,CAACV,EAAYI,EAAeM,IAG7BsB,EAAAA,IAAA,MAAA,CACEC,YAAaxB,EACbyB,UAAWd,EACXQ,IAAKlC,EACLyC,UAAWC,EAAU,QAACC,EAAOC,KAAMtC,GAAcqC,EAAOE,UACxDC,KAAK,SACL,aAAW,UACX,gBAAe,EACf,gBAAe,IACf,gBAAetC,EACf,iBAAA,GAAAuC,OAAmBvC,EAAwB,aAC3C,mBAAiB,aACjBwC,SAAU,GAGhB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";require('./../../../ext-esm/style-inject/dist/style-inject.es.js')('.Swatches_root__y8Whk{display:flex;flex-flow:row wrap;gap:2px;padding:8px}.Swatches_swatch__XqSvY{--corvaui-swatches-accentColor:#fff;border:1px solid transparent;border-radius:2px;color:transparent;cursor:pointer;height:16px;overflow:hidden;position:relative;transition:border-color .15s cubic-bezier(.4,0,.2,1);width:16px}.Swatches_swatch__XqSvY.Swatches_selected__QjCnc,.Swatches_swatch__XqSvY:hover{border-color:#fff}.Swatches_swatch__XqSvY:focus-visible{box-shadow:0 0 0 1px var(--palette-primary-main),0 0 0 5px rgb(from var(--palette-primary-main) r g b/.12);outline:2px solid transparent}.Swatches_swatch__XqSvY.Swatches_selected__QjCnc{color:var(--corvaui-swatches-accentColor)}.Swatches_darkAccent__1AE5s{--corvaui-swatches-accentColor:#000}.Swatches_transparent__x91vF{background:#fff repeating-conic-gradient(#ccc 0 25%,transparent 0 50%) 50%;background-size:4px 4px;position:relative}.Swatches_transparent__x91vF:before{border:1px solid red;border-radius:2px;content:"";left:50%;position:absolute;top:50%;transform:translate(-50%,-50%) rotate(-45deg);width:90%}.Swatches_transparent__x91vF.Swatches_selected__QjCnc:before{display:none}.Swatches_icon__BYDT5{display:block;margin-top:-1px}'),module.exports={spacing:"8",root:"Swatches_root__y8Whk",swatch:"Swatches_swatch__XqSvY",selected:"Swatches_selected__QjCnc",darkAccent:"Swatches_darkAccent__1AE5s",transparent:"Swatches_transparent__x91vF",icon:"Swatches_icon__BYDT5"};
|
|
1
|
+
"use strict";require('./../../../ext-esm/style-inject/dist/style-inject.es.js')('.Swatches_root__y8Whk{display:flex;flex-flow:row wrap;gap:2px;padding:8px}.Swatches_swatch__XqSvY{--corvaui-swatches-accentColor:#fff;border:1px solid transparent;border-radius:2px;color:transparent;cursor:pointer;height:16px;overflow:hidden;position:relative;transition:border-color .15s cubic-bezier(.4,0,.2,1);width:16px}.Swatches_swatch__XqSvY.Swatches_selected__QjCnc,.Swatches_swatch__XqSvY:hover{border-color:#fff}.Swatches_swatch__XqSvY:focus-visible{box-shadow:0 0 0 1px var(--palette-primary-main),0 0 0 5px rgb(from var(--palette-primary-main) r g b/.12);outline:2px solid transparent}.Swatches_swatch__XqSvY.Swatches_selected__QjCnc{color:var(--corvaui-swatches-accentColor)}.Swatches_darkAccent__1AE5s{--corvaui-swatches-accentColor:#000}.Swatches_transparent__x91vF{background:#fff repeating-conic-gradient(#ccc 0 25%,transparent 0 50%) 50%;background-size:4px 4px;position:relative}.Swatches_transparent__x91vF:before{border:1px solid red;border-radius:2px;content:"";left:50%;position:absolute;top:50%;transform:translate(-50%,-50%) rotate(-45deg);width:90%}.Swatches_transparent__x91vF.Swatches_selected__QjCnc:before{display:none}.Swatches_icon__BYDT5{display:block!important;margin-top:-1px}'),module.exports={spacing:"8",root:"Swatches_root__y8Whk",swatch:"Swatches_swatch__XqSvY",selected:"Swatches_selected__QjCnc",darkAccent:"Swatches_darkAccent__1AE5s",transparent:"Swatches_transparent__x91vF",icon:"Swatches_icon__BYDT5"};
|
|
2
2
|
//# sourceMappingURL=Swatches.scss.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),s=require("@babel/runtime/helpers/defineProperty"),r=require("react"),i=require("../../Text/Text.js");require("../../Grid/Grid.js"),require("../../Grid/Cell.js"),require("classnames"),require("../../Header/Header.scss.js");var o=require("react/jsx-runtime");require("../../Button/Button.js"),require("../../ButtonIcon/ButtonIcon.js"),require("@babel/runtime/helpers/objectWithoutProperties"),require("@material-ui/core"),require("../../../components/DevCenter/DevCenterAppContainer/components/IsInsideIsolatedDcAppProvider/IsInsideIsolatedDcAppProvider.js"),require("../../../components/DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js"),require("../../../components/DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js"),require("@babel/runtime/helpers/slicedToArray"),require("uuid"),require("../../Tooltip/Tooltip.scss.js"),require("../../Popover/Popover.js"),require("../../PopoverPanel/PopoverPanel.js"),require("../../Radio/Radio.js"),require("../../RadioAndCheckboxGroup/RadioAndCheckboxGroup.scss.js"),require("../../Checkbox/Checkbox.js");var n=require("../../TextInput/TextInput.js");require("../../TextInputNext/TextInputNext.js"),require("../../Label/Label.js"),require("lodash"),require("../../TextEndTruncated/TextEndTruncated.scss.js"),require("../../TextMiddleTruncated/TextMiddleTruncated.constants.js"),require("../../TextMiddleTruncated/TextMiddleTruncated.scss.js"),require("../../TextLink/TextLink.js"),require("../../Chip/Chip.js"),require("../../ChipAlert/ChipAlert.js"),require("../../ChipIndicator/ChipIndicator.js"),require("../../Avatar/Avatar.js"),require("../../AvatarGroup/AvatarGroup.js"),require("@material-ui/lab"),require("../../ToggleButtons/ToggleButtons.scss.js"),require("../../Paper/Paper.js"),require("../../ModalWindow/ModalWindow.js"),require("../../Modal/Modal.scss.js"),require("../../Menu/Menu.js"),require("@icon-park/react/es/all"),require("../../../icons/IconParkProvider.js"),require("../../../icons/customIcons/icons/AddMessage.js"),require("../../../icons/customIcons/icons/DragOne.js"),require("../../../icons/customIcons/icons/Attention.js"),require("../../../icons/customIcons/icons/Collapse.js"),require("../../../icons/customIcons/icons/Dashboard.js"),require("../../../icons/customIcons/icons/Expand.js"),require("../../../icons/customIcons/icons/FolderClosed.js"),require("../../../icons/customIcons/icons/FolderClosedFilled.js"),require("../../../icons/customIcons/icons/FolderOpened.js"),require("../../../icons/customIcons/icons/GreaterOrEqual.js"),require("../../../icons/customIcons/icons/LessOrEqual.js"),require("../../../icons/customIcons/icons/Search.js"),require("../../../icons/customIcons/icons/SearchOne.js"),require("../../../icons/customIcons/icons/Wellhub.js"),require("../../../icons/customIcons/icons/MultiRuler.js"),require("../../../icons/customIcons/icons/Checkbox.js"),require("../../../icons/customIcons/icons/CheckboxChecked.js"),require("../../../icons/customIcons/icons/CheckboxIndeterminate.js"),require("../../../icons/customIcons/icons/Radio.js"),require("../../../icons/customIcons/icons/RadioChecked.js"),require("../../../icons/customIcons/icons/SimulFrac.js"),require("../../../icons/customIcons/icons/ZipperFrac.js"),require("../../../icons/customIcons/icons/CautionFilled.js"),require("../../../icons/customIcons/icons/MoreApp.js"),require("../../../icons/customIcons/icons/Pad.js"),require("../../../icons/customIcons/icons/DrilloutUnit.js"),require("../../../icons/customIcons/icons/FracFleet.js"),require("../../../icons/customIcons/icons/Global.js"),require("../../../icons/customIcons/icons/Program.js"),require("../../../icons/customIcons/icons/Rig.js"),require("../../../icons/customIcons/icons/Well.js"),require("../../../icons/customIcons/icons/Gap.js"),require("../../../icons/customIcons/icons/Pin.js"),require("../../../icons/customIcons/icons/CloseOneFilled.js"),require("../../../icons/customIcons/icons/AttentionFilled.js"),require("../../../icons/customIcons/icons/CheckOneFilled.js"),require("../../../icons/customIcons/icons/Archive.js"),require("../../../icons/customIcons/icons/ArchiveCancel.js"),require("../../../icons/customIcons/icons/Unarchive.js"),require("../../../icons/customIcons/icons/Archived.js"),require("../../../icons/customIcons/icons/InterventionUnit.js"),require("../../../icons/customIcons/icons/CloudDelete.js"),require("../../../icons/customIcons/icons/Lasso.js"),require("../../../icons/customIcons/icons/Radius.js"),require("../../../icons/customIcons/icons/ErrorOps.js"),require("../../../icons/customIcons/icons/DataTypeOps.js"),require("../../../icons/customIcons/icons/FalsePositiveOps.js"),require("../../../icons/customIcons/icons/CalibrationOps.js"),require("../../../icons/customIcons/icons/CriticalOps.js"),require("../../../icons/customIcons/icons/Company.js"),require("../../../icons/customIcons/icons/ArchiveOne.js"),require("../../../icons/customIcons/icons/ParseBotFusion.js"),require("../../../icons/customIcons/icons/Connect.js"),require("../../../icons/customIcons/icons/PuzzleOne.js"),require("../../../icons/customIcons/icons/Feed.js"),require("../../../icons/customIcons/icons/Prompt.js"),require("../../../icons/customIcons/icons/Companies.js"),require("../../../icons/customIcons/icons/ClipboardAi.js"),require("../../../icons/customIcons/icons/Key.js"),require("../../../icons/customIcons/icons/AtSignCrossed.js"),require("../../../icons/customIcons/icons/MappingManual.js"),require("../../../icons/customIcons/icons/Mapping.js"),require("../../../icons/customIcons/icons/Metrics.js"),require("../../../icons/customIcons/icons/Drops.js"),require("../../../icons/customIcons/icons/ClipboardSearch.js"),require("../../../icons/customIcons/icons/Template.js"),require("../../../icons/customIcons/icons/ClipboardMetrics.js"),require("../../../icons/customIcons/icons/ClipboardBuilder.js"),require("../../../icons/customIcons/icons/UnitConversion.js"),require("../../../icons/customIcons/icons/NPT.js"),require("../../../icons/customIcons/icons/GuidedFrac.js"),require("../../utils.js"),require("../../Hint/Hint.scss.js"),require("../../Counter/Counter.js"),require("../../BadgeBase/BadgeBase.scss.js"),require("../../TemplatesControl/TemplatesControl.js"),require("zustand"),require("../../TemplatesControl/utils.js"),require("../../TemplatesControl/icons/folder/index.js"),require("../../TemplatesControl/Store/utils.js"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("../../TemplatesControl/types.js"),require("../../../utils/index.js"),require("../../../clients/jsonApi/index.js"),require("../../../permissions/PermissionsContext.js"),require("../../../permissions/constants/index.js"),require("../../../permissions/withPermissionsHOC.js"),require("../../../permissions/ProvidePermissions.js"),require("../../BadgeDot/BadgeDot.scss.js"),require("../../LoaderLinear/LoaderLinear.scss.js"),require("../../LoaderLogo/LoaderLogo.constants.js"),require("../../LoaderLogo/LoaderLogo.scss.js"),require("../../Switch/Switch.js"),require("../../Tabs/Tabs.js"),require("../../EmptyState/EmptyState.scss.js"),require("../../FileIcon/FileIcon.js"),require("../../Tag/Tag.js"),require("react-dropzone"),require("../../FilesDropzone/FilesDropzone.scss.js"),require("../../FilesLoader/FilesLoader.scss.js"),require("file-extension"),require("image-extensions"),require("video-extensions"),require("../../FilesProcessor/FilesProcessor.scss.js"),require("../../Skeleton/Skeleton.scss.js"),require("../../../utils/main.js"),require("../../CopyToClipboard/CopyToClipboard.scss.js"),require("../../Stepper/Step/Step.scss.js"),require("../../Stepper/Stepper.scss.js"),require("../../ButtonLive/ButtonLive.js"),require("../../ButtonText/ButtonText.js"),require("../../IndicatorLive/IndicatorLive.js"),require("../../Accordion/Accordion.scss.js"),require("../../Breadcrumbs/Breadcrumbs.scss.js"),require("../../BadgeComment/BadgeComment.js"),require("../../AppContainer/AppContainer.js"),require("../../AppContainer/AppContainer.constants.js"),require("../../AppFooter/AppFooter.js"),require("immutable"),require("query-string"),require("../../../constants/goals.js"),require("../../../constants/segment.js"),require("../../../constants/alerts.js"),require("../../../constants/apps.js"),require("../../../constants/drillstring.js"),require("../../../constants/completion.js"),require("../../../constants/appPackages.js"),require("../../../constants/notifications.js"),require("../../../constants/feed.js"),require("../../../constants/bha.js"),require("../../../constants/corvaCompanyId.js"),require("../../../components/GradientManager/configuration/constants.js"),require("../../AppCommonsProvider/AppCommonsContext.js"),require("../../AppHeader/AppHeader.constants.js"),require("../../AppHeader/AppBadge/AppBadge.scss.js"),require("../../../components/DevCenter/DevCenterRouterContext/DevCenterRouterContext.js"),require("../../../components/DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js"),require("react-router-dom"),require("../../AppHeader/AppAssets/utils.js"),require("../../AppHeader/AppAssets/AppAssets.scss.js"),require("../../../components/PadModeSelect/PadModeSelect.js"),require("../../AppHeader/PadMode/PadMode.scss.js"),require("../../../constants/streamSourceType.js"),require("../../PadModeSelect/PadModeSelect.js"),require("../../PadModeSelect/PadModeSelect.constants.js"),require("../../AppCommonsProvider/AppCommonsProvider.js"),require("../../../utils/mobileDetect.js"),require("../../AppHeader/V3/VersionSelect/VersionSelect.js"),require("../../UniversalLink/UniversalLink.scss.js"),require("../../AppHeader/V3/AssetChips/AssetChips.scss.js"),require("moment"),require("../../AppHeader/V3/DqStatusIcon/DqStatusIcon.js"),require("../../AppHeader/V3/DqStatusIcon/DqStatusIcon.constants.js"),require("../../AppFooter/DqPopover/DqStatusIcon/DqStatusIcon.js"),require("../../AppDqPopover/DqAlertTooltip/DqAlertTooltip.scss.js"),require("../../AppDqPopover/DqAlert/DqAlert.scss.js"),require("../../AppDqPopover/DqAsset/DqAsset.scss.js"),require("../../AppDqPopover/AppDqPopover.scss.js"),require("../../../components/AppIcon/AppIcon.js"),require("../../../utils/getSingleAsset.js"),require("../../AppHeader/V3/AssetSelector/AssetSelectorChip/AssetSelectorChip.js"),require("../../AppHeader/V3/AssetSelector/constants.js"),require("../../AppHeader/V3/AssetSelector/AssetSelectorSelect/AssetSelectorSelect.scss.js"),require("../../AppHeader/V3/AssetSelector/AssetSelectorSelect/loadAssets.js"),require("../../AppHeader/V3/AssetSelector/AssetSelector.scss.js"),require("../../../clients/subscriptions/constants.js"),require("querystring"),require("uuid/v1"),require("../../../clients/subscriptions.v1.js"),require("../../../clients/subscriptions/subscriptions-client.factory.js"),require("jsona"),require("../../../utils/env.js"),require("../../../components/StatusBadge/constants.js"),require("lodash/set"),require("lodash/get"),require("lodash/unset"),require("../../../clients/api/apiCore.js"),require("../../../clients/constants.js"),require("../../../clients/sso/auth0.js"),require("../../../clients/sso/oauth2.js"),require("../../../clients/api/rateLimiter.js"),require("lodash/isEmpty"),require("lodash/sortBy"),require("../../../components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchContext.js"),require("../../AppSettings/AppSettingsPinningContext.js"),require("../../AppHeader/V3/AppTitle/AppTitle.constants.js"),require("../../AppHeader/V3/AppTitle/AppTitle.scss.js"),require("../../AppHeader/V3/constants.scss.js"),require("@babel/runtime/helpers/typeof"),require("../../AppHeader/V3/SettingsButton/SettingsButton.js"),require("../../AppHeader/V3/SettingsButton/SettingsButton.constants.js"),require("../../AppSettings/AppSettings.js"),require("../../AppSettings/AppSettings.constants.js"),require("../../AppSizeProvider/AppSizeProvider.js"),require("../../AppHeader/V3/Actions/Actions.constants.js"),require("../../AppHeader/V3/Actions/Actions.scss.js"),require("../../AppHeader/V3/AppHeaderV3.scss.js"),require("../../AppHeader/AppHeader.scss.js"),require("../../OffsetWellsButton/OffsetWellsButton.js"),require("../../ChartAxisExtreme/ChartAxisExtreme.scss.js"),require("highcharts"),require("../../ChartAxisExtreme/ChartAxisExtremeDragTracker.js"),require("../../Autocomplete/Autocomplete.js"),require("../../Select/Select.js"),require("../../AppSettingsDivider/AppSettingsDivider.scss.js"),require("../../WellArchivedMessage/WellArchivedMessage.js"),require("../../DatePicker/DatePicker.js"),require("../../DragHandle/DragHandle.js"),require("../CompletionsOffsetWellPicker.js"),require("../../Slider/constants.js"),require("../../Slider/components/SliderThumb.js"),require("../../Slider/Slider.scss.js"),require("../../SliderAdvanced/SliderAdvanced.js"),require("react-color"),require("../../ColorPicker/Swatches/Swatches.scss.js"),require("../../ColorPicker/OpacityDragtracker/OpacityDragTracker.scss.js"),require("../../ColorPicker/ColorPicker.scss.js"),require("../../ChartHelper/ChartHelper.scss.js"),require("../../Hotkey/Hotkey.js");var t=require("../../../components/OffsetWellMap/OffsetWellMap.js"),c=require("./Map.scss.js");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=u(e),l=u(s);function p(e,s){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);s&&(i=i.filter((function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable}))),r.push.apply(r,i)}return r}function q(e){for(var s=1;s<arguments.length;s++){var r=null!=arguments[s]?arguments[s]:{};s%2?p(Object(r),!0).forEach((function(s){l.default(e,s,r[s])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(r,s))}))}return e}var j=r.memo((function(e){var s=e.well,u=e.wells,l=e.pads,p=e.selectedOffsetWellsIds,j=e.onOffsetWellIdsSelect,d=e.radiusMiles,m=e.setFilters,A=e.maxRadiusInMiles,C=r.useMemo((function(){return l?l.flatMap((function(e){return e.wells})):[]}),[l]),I=r.useMemo((function(){return s?q({},C.find((function(e){return e.id.toString()===s.id.toString()}))):u?q({},C.find((function(e){return e.id.toString()===u[0].id.toString()}))):void 0}),[C,s,u]),v=r.useCallback((function(e){var s=l.find((function(s){return s.wells.some((function(s){return s.id===e}))})),r=s?s.wells.map((function(e){return e.id})):[],i=p.some((function(e){return r.includes(e)}));j(i?p.filter((function(e){return!r.includes(e)})):[].concat(a.default(p),a.default(r)))}),[j,l,p]),S=r.useCallback((function(e){var s=""===e?void 0:Number(e);m((function(e){return q(q({},e),{},{radiusMiles:s})}))}),[m]);return o.jsxs("div",{className:c.map,children:[o.jsxs("div",{className:c.radiusContainer,children:[o.jsx(i.Text,{color:"T6",children:"Radius (mi):"}),o.jsx(n.TextInput,{className:c.textInputWrapper,value:null!=d?d:"",placeholder:"0",onChange:S,inputType:"number",htmlAttributes:{min:0,max:A}})]}),o.jsx(t,{classes:{root:c.offsetWellMapRoot,map:c.offsetWellMapRoot},isClickable:!0,isViewOnly:!1,subjectWell:I,wells:C,offsetWellIds:p,radius:null!=d?d:0,activeWellId:(null==I?void 0:I.id)||0,handleChangeOffsetWell:function(e){return e&&v(e.id)}})]})}));module.exports=j;
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),s=require("@babel/runtime/helpers/defineProperty"),r=require("react"),i=require("../../Text/Text.js");require("../../Grid/Grid.js"),require("../../Grid/Cell.js"),require("classnames"),require("../../Header/Header.scss.js");var o=require("react/jsx-runtime");require("../../Button/Button.js"),require("../../ButtonIcon/ButtonIcon.js"),require("@babel/runtime/helpers/objectWithoutProperties"),require("@material-ui/core"),require("../../../components/DevCenter/DevCenterAppContainer/components/IsInsideIsolatedDcAppProvider/IsInsideIsolatedDcAppProvider.js"),require("../../../components/DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js"),require("../../../components/DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js"),require("@babel/runtime/helpers/slicedToArray"),require("uuid"),require("../../Tooltip/Tooltip.scss.js"),require("../../Popover/Popover.js"),require("../../PopoverPanel/PopoverPanel.js"),require("../../Radio/Radio.js"),require("../../RadioAndCheckboxGroup/RadioAndCheckboxGroup.scss.js"),require("../../Checkbox/Checkbox.js");var n=require("../../TextInput/TextInput.js");require("../../TextInputNext/TextInputNext.js"),require("../../Label/Label.js"),require("lodash"),require("../../TextEndTruncated/TextEndTruncated.scss.js"),require("../../TextMiddleTruncated/TextMiddleTruncated.constants.js"),require("../../TextMiddleTruncated/TextMiddleTruncated.scss.js"),require("../../TextLink/TextLink.js"),require("../../Chip/Chip.js"),require("../../ChipAlert/ChipAlert.js"),require("../../ChipIndicator/ChipIndicator.js"),require("../../Avatar/Avatar.js"),require("../../AvatarGroup/AvatarGroup.js"),require("@material-ui/lab"),require("../../ToggleButtons/ToggleButtons.scss.js"),require("../../Paper/Paper.js"),require("../../ModalWindow/ModalWindow.js"),require("../../Modal/Modal.scss.js"),require("../../Menu/Menu.js"),require("@icon-park/react/es/all"),require("../../../icons/IconParkProvider.js"),require("../../../icons/customIcons/icons/AddMessage.js"),require("../../../icons/customIcons/icons/DragOne.js"),require("../../../icons/customIcons/icons/Attention.js"),require("../../../icons/customIcons/icons/Collapse.js"),require("../../../icons/customIcons/icons/Dashboard.js"),require("../../../icons/customIcons/icons/Expand.js"),require("../../../icons/customIcons/icons/FolderClosed.js"),require("../../../icons/customIcons/icons/FolderClosedFilled.js"),require("../../../icons/customIcons/icons/FolderOpened.js"),require("../../../icons/customIcons/icons/GreaterOrEqual.js"),require("../../../icons/customIcons/icons/LessOrEqual.js"),require("../../../icons/customIcons/icons/Search.js"),require("../../../icons/customIcons/icons/SearchOne.js"),require("../../../icons/customIcons/icons/Wellhub.js"),require("../../../icons/customIcons/icons/MultiRuler.js"),require("../../../icons/customIcons/icons/Checkbox.js"),require("../../../icons/customIcons/icons/CheckboxChecked.js"),require("../../../icons/customIcons/icons/CheckboxIndeterminate.js"),require("../../../icons/customIcons/icons/Radio.js"),require("../../../icons/customIcons/icons/RadioChecked.js"),require("../../../icons/customIcons/icons/SimulFrac.js"),require("../../../icons/customIcons/icons/ZipperFrac.js"),require("../../../icons/customIcons/icons/CautionFilled.js"),require("../../../icons/customIcons/icons/MoreApp.js"),require("../../../icons/customIcons/icons/Pad.js"),require("../../../icons/customIcons/icons/DrilloutUnit.js"),require("../../../icons/customIcons/icons/FracFleet.js"),require("../../../icons/customIcons/icons/Global.js"),require("../../../icons/customIcons/icons/Program.js"),require("../../../icons/customIcons/icons/Rig.js"),require("../../../icons/customIcons/icons/Well.js"),require("../../../icons/customIcons/icons/Gap.js"),require("../../../icons/customIcons/icons/Pin.js"),require("../../../icons/customIcons/icons/CloseOneFilled.js"),require("../../../icons/customIcons/icons/AttentionFilled.js"),require("../../../icons/customIcons/icons/CheckOneFilled.js"),require("../../../icons/customIcons/icons/Archive.js"),require("../../../icons/customIcons/icons/ArchiveCancel.js"),require("../../../icons/customIcons/icons/Unarchive.js"),require("../../../icons/customIcons/icons/Archived.js"),require("../../../icons/customIcons/icons/InterventionUnit.js"),require("../../../icons/customIcons/icons/CloudDelete.js"),require("../../../icons/customIcons/icons/Lasso.js"),require("../../../icons/customIcons/icons/Radius.js"),require("../../../icons/customIcons/icons/ErrorOps.js"),require("../../../icons/customIcons/icons/DataTypeOps.js"),require("../../../icons/customIcons/icons/FalsePositiveOps.js"),require("../../../icons/customIcons/icons/CalibrationOps.js"),require("../../../icons/customIcons/icons/CriticalOps.js"),require("../../../icons/customIcons/icons/Company.js"),require("../../../icons/customIcons/icons/ArchiveOne.js"),require("../../../icons/customIcons/icons/ParseBotFusion.js"),require("../../../icons/customIcons/icons/Connect.js"),require("../../../icons/customIcons/icons/PuzzleOne.js"),require("../../../icons/customIcons/icons/Feed.js"),require("../../../icons/customIcons/icons/Prompt.js"),require("../../../icons/customIcons/icons/Companies.js"),require("../../../icons/customIcons/icons/ClipboardAi.js"),require("../../../icons/customIcons/icons/Key.js"),require("../../../icons/customIcons/icons/AtSignCrossed.js"),require("../../../icons/customIcons/icons/MappingManual.js"),require("../../../icons/customIcons/icons/Mapping.js"),require("../../../icons/customIcons/icons/Metrics.js"),require("../../../icons/customIcons/icons/Drops.js"),require("../../../icons/customIcons/icons/ClipboardSearch.js"),require("../../../icons/customIcons/icons/Template.js"),require("../../../icons/customIcons/icons/ClipboardMetrics.js"),require("../../../icons/customIcons/icons/ClipboardBuilder.js"),require("../../../icons/customIcons/icons/UnitConversion.js"),require("../../../icons/customIcons/icons/NPT.js"),require("../../../icons/customIcons/icons/GuidedFrac.js"),require("../../utils.js"),require("../../Hint/Hint.scss.js"),require("../../Counter/Counter.js"),require("../../BadgeBase/BadgeBase.scss.js"),require("../../TemplatesControl/TemplatesControl.js"),require("zustand"),require("../../TemplatesControl/utils.js"),require("../../TemplatesControl/icons/folder/index.js"),require("../../TemplatesControl/Store/utils.js"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("../../TemplatesControl/types.js"),require("../../../utils/index.js"),require("../../../clients/jsonApi/index.js"),require("../../../permissions/PermissionsContext.js"),require("../../../permissions/constants/index.js"),require("../../../permissions/withPermissionsHOC.js"),require("../../../permissions/ProvidePermissions.js"),require("../../BadgeDot/BadgeDot.scss.js"),require("../../LoaderLinear/LoaderLinear.scss.js"),require("../../LoaderLogo/LoaderLogo.constants.js"),require("../../LoaderLogo/LoaderLogo.scss.js"),require("../../Switch/Switch.js"),require("../../Tabs/Tabs.js"),require("../../EmptyState/EmptyState.scss.js"),require("../../FileIcon/FileIcon.js"),require("../../Tag/Tag.js"),require("react-dropzone"),require("../../FilesDropzone/FilesDropzone.scss.js"),require("../../FilesLoader/FilesLoader.scss.js"),require("file-extension"),require("image-extensions"),require("video-extensions"),require("../../FilesProcessor/FilesProcessor.scss.js"),require("../../Skeleton/Skeleton.scss.js"),require("../../../utils/main.js"),require("../../CopyToClipboard/CopyToClipboard.scss.js"),require("../../Stepper/Step/Step.scss.js"),require("../../Stepper/Stepper.scss.js"),require("../../ButtonLive/ButtonLive.js"),require("../../ButtonText/ButtonText.js"),require("../../IndicatorLive/IndicatorLive.js"),require("../../Accordion/Accordion.scss.js"),require("../../Breadcrumbs/Breadcrumbs.scss.js"),require("../../BadgeComment/BadgeComment.js"),require("../../AppContainer/AppContainer.js"),require("../../AppContainer/AppContainer.constants.js"),require("../../AppFooter/AppFooter.js"),require("immutable"),require("query-string"),require("../../../constants/goals.js"),require("../../../constants/segment.js"),require("../../../constants/alerts.js"),require("../../../constants/apps.js"),require("../../../constants/drillstring.js"),require("../../../constants/completion.js"),require("../../../constants/appPackages.js"),require("../../../constants/notifications.js"),require("../../../constants/feed.js"),require("../../../constants/bha.js"),require("../../../constants/corvaCompanyId.js"),require("../../../components/GradientManager/configuration/constants.js"),require("../../AppCommonsProvider/AppCommonsContext.js"),require("../../AppHeader/AppHeader.constants.js"),require("../../AppHeader/AppBadge/AppBadge.scss.js"),require("../../../components/DevCenter/DevCenterRouterContext/DevCenterRouterContext.js"),require("../../../components/DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js"),require("react-router-dom"),require("../../AppHeader/AppAssets/utils.js"),require("../../AppHeader/AppAssets/AppAssets.scss.js"),require("../../../components/PadModeSelect/PadModeSelect.js"),require("../../AppHeader/PadMode/PadMode.scss.js"),require("../../../constants/streamSourceType.js"),require("../../PadModeSelect/PadModeSelect.js"),require("../../PadModeSelect/PadModeSelect.constants.js"),require("../../AppCommonsProvider/AppCommonsProvider.js"),require("../../../utils/mobileDetect.js"),require("../../AppHeader/V3/VersionSelect/VersionSelect.js"),require("../../UniversalLink/UniversalLink.scss.js"),require("../../AppHeader/V3/AssetChips/AssetChips.scss.js"),require("moment"),require("../../AppHeader/V3/DqStatusIcon/DqStatusIcon.js"),require("../../AppHeader/V3/DqStatusIcon/DqStatusIcon.constants.js"),require("../../AppFooter/DqPopover/DqStatusIcon/DqStatusIcon.js"),require("../../AppDqPopover/DqAlertTooltip/DqAlertTooltip.scss.js"),require("../../AppDqPopover/DqAlert/DqAlert.scss.js"),require("../../AppDqPopover/DqAsset/DqAsset.scss.js"),require("../../AppDqPopover/AppDqPopover.scss.js"),require("../../../components/AppIcon/AppIcon.js"),require("../../../utils/getSingleAsset.js"),require("../../AppHeader/V3/AssetSelector/AssetSelectorChip/AssetSelectorChip.js"),require("../../AppHeader/V3/AssetSelector/constants.js"),require("../../AppHeader/V3/AssetSelector/AssetSelectorSelect/AssetSelectorSelect.scss.js"),require("../../AppHeader/V3/AssetSelector/AssetSelectorSelect/loadAssets.js"),require("../../AppHeader/V3/AssetSelector/AssetSelector.scss.js"),require("../../../clients/subscriptions/constants.js"),require("querystring"),require("uuid/v1"),require("../../../clients/subscriptions.v1.js"),require("../../../clients/subscriptions/subscriptions-client.factory.js"),require("jsona"),require("../../../utils/env.js"),require("../../../components/StatusBadge/constants.js"),require("lodash/set"),require("lodash/get"),require("lodash/unset"),require("../../../clients/api/apiCore.js"),require("../../../clients/constants.js"),require("../../../clients/sso/auth0.js"),require("../../../clients/sso/oauth2.js"),require("../../../clients/api/rateLimiter.js"),require("lodash/isEmpty"),require("lodash/sortBy"),require("../../../components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchContext.js"),require("../../AppSettings/AppSettingsPinningContext.js"),require("../../AppHeader/V3/AppTitle/AppTitle.constants.js"),require("../../AppHeader/V3/AppTitle/AppTitle.scss.js"),require("../../AppHeader/V3/constants.scss.js"),require("@babel/runtime/helpers/typeof"),require("../../AppHeader/V3/SettingsButton/SettingsButton.js"),require("../../AppHeader/V3/SettingsButton/SettingsButton.constants.js"),require("../../AppSettings/AppSettings.js"),require("../../AppSettings/AppSettings.constants.js"),require("../../AppSizeProvider/AppSizeProvider.js"),require("../../AppHeader/V3/Actions/Actions.constants.js"),require("../../AppHeader/V3/Actions/Actions.scss.js"),require("../../AppHeader/V3/AppHeaderV3.scss.js"),require("../../AppHeader/AppHeader.scss.js"),require("../../OffsetWellsButton/OffsetWellsButton.js"),require("../../ChartAxisExtreme/ChartAxisExtreme.scss.js"),require("highcharts"),require("../../ChartAxisExtreme/ChartAxisExtremeDragTracker.js"),require("../../Autocomplete/Autocomplete.js"),require("../../Select/Select.js"),require("../../AppSettingsDivider/AppSettingsDivider.scss.js"),require("../../WellArchivedMessage/WellArchivedMessage.js"),require("../../DatePicker/DatePicker.js"),require("../../DragHandle/DragHandle.js"),require("../CompletionsOffsetWellPicker.js"),require("../../Slider/constants.js"),require("../../Slider/components/SliderThumb.js"),require("../../Slider/Slider.scss.js"),require("../../SliderAdvanced/SliderAdvanced.js"),require("react-color"),require("../../ColorPicker/Swatches/Swatches.scss.js"),require("../../ColorPicker/OpacityDragtracker/OpacityDragTracker.scss.js"),require("../../ColorPicker/ColorPicker.scss.js"),require("../../ChartHelper/ChartHelper.scss.js"),require("../../Hotkey/Hotkey.js"),require("@tanstack/react-query"),require("../../InterventionEventSelector/useInterventionUnitEvents.js"),require("../../InterventionEventSelector/InterventionEventSelector.scss.js");var t=require("../../../components/OffsetWellMap/OffsetWellMap.js"),c=require("./Map.scss.js");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=u(e),l=u(s);function p(e,s){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);s&&(i=i.filter((function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable}))),r.push.apply(r,i)}return r}function q(e){for(var s=1;s<arguments.length;s++){var r=null!=arguments[s]?arguments[s]:{};s%2?p(Object(r),!0).forEach((function(s){l.default(e,s,r[s])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(r,s))}))}return e}var j=r.memo((function(e){var s=e.well,u=e.wells,l=e.pads,p=e.selectedOffsetWellsIds,j=e.onOffsetWellIdsSelect,d=e.radiusMiles,m=e.setFilters,A=e.maxRadiusInMiles,I=r.useMemo((function(){return l?l.flatMap((function(e){return e.wells})):[]}),[l]),C=r.useMemo((function(){return s?q({},I.find((function(e){return e.id.toString()===s.id.toString()}))):u?q({},I.find((function(e){return e.id.toString()===u[0].id.toString()}))):void 0}),[I,s,u]),v=r.useCallback((function(e){var s=l.find((function(s){return s.wells.some((function(s){return s.id===e}))})),r=s?s.wells.map((function(e){return e.id})):[],i=p.some((function(e){return r.includes(e)}));j(i?p.filter((function(e){return!r.includes(e)})):[].concat(a.default(p),a.default(r)))}),[j,l,p]),S=r.useCallback((function(e){var s=""===e?void 0:Number(e);m((function(e){return q(q({},e),{},{radiusMiles:s})}))}),[m]);return o.jsxs("div",{className:c.map,children:[o.jsxs("div",{className:c.radiusContainer,children:[o.jsx(i.Text,{color:"T6",children:"Radius (mi):"}),o.jsx(n.TextInput,{className:c.textInputWrapper,value:null!=d?d:"",placeholder:"0",onChange:S,inputType:"number",htmlAttributes:{min:0,max:A}})]}),o.jsx(t,{classes:{root:c.offsetWellMapRoot,map:c.offsetWellMapRoot},isClickable:!0,isViewOnly:!1,subjectWell:C,wells:I,offsetWellIds:p,radius:null!=d?d:0,activeWellId:(null==C?void 0:C.id)||0,handleChangeOffsetWell:function(e){return e&&v(e.id)}})]})}));module.exports=j;
|
|
2
2
|
//# sourceMappingURL=Map.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Map.js","sources":["../../../../../src/componentsV2/CompletionsOffsetWellPicker/Map/Map.tsx"],"sourcesContent":["import { Dispatch, FC, memo, SetStateAction, useCallback, useMemo } from 'react';\n\nimport { Text, TextInput } from '../../../componentsV2';\nimport OffsetWellMap from '../../../components/OffsetWellMap';\nimport { Filters, MappedPad, Well } from '../types';\n\nimport styles from './Map.scss';\n\ntype Props = {\n well?: Well;\n wells?: Well[];\n pads: MappedPad[];\n selectedOffsetWellsIds: number[];\n onOffsetWellIdsSelect: (offsetWellIds: number[]) => void;\n radiusMiles?: number;\n setFilters: Dispatch<SetStateAction<Filters>>;\n maxRadiusInMiles?: number;\n};\n\nconst Map: FC<Props> = memo(\n ({\n well,\n wells,\n pads,\n selectedOffsetWellsIds,\n onOffsetWellIdsSelect,\n radiusMiles,\n setFilters,\n maxRadiusInMiles,\n }) => {\n const allWells = useMemo(() => {\n if (pads) {\n return pads.flatMap(pad => pad.wells);\n }\n return [];\n }, [pads]);\n\n const subjectWell = useMemo(() => {\n if (well) {\n return {\n ...allWells.find(w => w.id.toString() === well.id.toString()),\n };\n }\n\n if (wells) {\n return {\n ...allWells.find(w => w.id.toString() === wells[0].id.toString()),\n };\n }\n\n return undefined;\n }, [allWells, well, wells]);\n\n const handleChangeOffsetWell = useCallback(\n (wellId: number) => {\n const pad = pads.find(p => p.wells.some(w => w.id === wellId));\n\n const wellIds = pad ? pad.wells.map(w => w.id) : [];\n\n const isSelected = selectedOffsetWellsIds.some(wellId => wellIds.includes(wellId));\n\n if (isSelected) {\n onOffsetWellIdsSelect(selectedOffsetWellsIds.filter(id => !wellIds.includes(id)));\n } else {\n onOffsetWellIdsSelect([...selectedOffsetWellsIds, ...wellIds]);\n }\n },\n [onOffsetWellIdsSelect, pads, selectedOffsetWellsIds]\n );\n\n const handleChangeRadius = useCallback(\n (value: string) => {\n const numeric = value === '' ? undefined : Number(value);\n setFilters(prev => ({ ...prev, radiusMiles: numeric }));\n },\n [setFilters]\n );\n\n return (\n <div className={styles.map}>\n <div className={styles.radiusContainer}>\n <Text color=\"T6\">Radius (mi):</Text>\n <TextInput\n className={styles.textInputWrapper}\n // Use empty string when undefined so the component stays controlled\n value={radiusMiles ?? ''}\n placeholder=\"0\"\n onChange={handleChangeRadius}\n inputType=\"number\"\n htmlAttributes={{\n min: 0,\n max: maxRadiusInMiles,\n }}\n />\n </div>\n <OffsetWellMap\n classes={{\n root: styles.offsetWellMapRoot,\n map: styles.offsetWellMapRoot,\n }}\n isClickable\n isViewOnly={false}\n subjectWell={subjectWell}\n wells={allWells}\n offsetWellIds={selectedOffsetWellsIds}\n radius={radiusMiles ?? 0}\n activeWellId={subjectWell?.id || 0}\n handleChangeOffsetWell={params => params && handleChangeOffsetWell(params.id)}\n />\n </div>\n );\n }\n);\n\nexport default Map;\n"],"names":["Map","memo","_ref","well","wells","pads","selectedOffsetWellsIds","onOffsetWellIdsSelect","radiusMiles","setFilters","maxRadiusInMiles","allWells","useMemo","flatMap","pad","subjectWell","_objectSpread","find","w","id","toString","handleChangeOffsetWell","useCallback","wellId","p","some","wellIds","map","isSelected","includes","filter","handleChangeRadius","value","numeric","undefined","Number","prev","_jsxs","className","styles","children","jsxs","radiusContainer","_jsx","Text","color","TextInput","textInputWrapper","placeholder","onChange","inputType","htmlAttributes","min","max","OffsetWellMap","classes","root","offsetWellMapRoot","isClickable","isViewOnly","offsetWellIds","radius","activeWellId","params"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Map.js","sources":["../../../../../src/componentsV2/CompletionsOffsetWellPicker/Map/Map.tsx"],"sourcesContent":["import { Dispatch, FC, memo, SetStateAction, useCallback, useMemo } from 'react';\n\nimport { Text, TextInput } from '../../../componentsV2';\nimport OffsetWellMap from '../../../components/OffsetWellMap';\nimport { Filters, MappedPad, Well } from '../types';\n\nimport styles from './Map.scss';\n\ntype Props = {\n well?: Well;\n wells?: Well[];\n pads: MappedPad[];\n selectedOffsetWellsIds: number[];\n onOffsetWellIdsSelect: (offsetWellIds: number[]) => void;\n radiusMiles?: number;\n setFilters: Dispatch<SetStateAction<Filters>>;\n maxRadiusInMiles?: number;\n};\n\nconst Map: FC<Props> = memo(\n ({\n well,\n wells,\n pads,\n selectedOffsetWellsIds,\n onOffsetWellIdsSelect,\n radiusMiles,\n setFilters,\n maxRadiusInMiles,\n }) => {\n const allWells = useMemo(() => {\n if (pads) {\n return pads.flatMap(pad => pad.wells);\n }\n return [];\n }, [pads]);\n\n const subjectWell = useMemo(() => {\n if (well) {\n return {\n ...allWells.find(w => w.id.toString() === well.id.toString()),\n };\n }\n\n if (wells) {\n return {\n ...allWells.find(w => w.id.toString() === wells[0].id.toString()),\n };\n }\n\n return undefined;\n }, [allWells, well, wells]);\n\n const handleChangeOffsetWell = useCallback(\n (wellId: number) => {\n const pad = pads.find(p => p.wells.some(w => w.id === wellId));\n\n const wellIds = pad ? pad.wells.map(w => w.id) : [];\n\n const isSelected = selectedOffsetWellsIds.some(wellId => wellIds.includes(wellId));\n\n if (isSelected) {\n onOffsetWellIdsSelect(selectedOffsetWellsIds.filter(id => !wellIds.includes(id)));\n } else {\n onOffsetWellIdsSelect([...selectedOffsetWellsIds, ...wellIds]);\n }\n },\n [onOffsetWellIdsSelect, pads, selectedOffsetWellsIds]\n );\n\n const handleChangeRadius = useCallback(\n (value: string) => {\n const numeric = value === '' ? undefined : Number(value);\n setFilters(prev => ({ ...prev, radiusMiles: numeric }));\n },\n [setFilters]\n );\n\n return (\n <div className={styles.map}>\n <div className={styles.radiusContainer}>\n <Text color=\"T6\">Radius (mi):</Text>\n <TextInput\n className={styles.textInputWrapper}\n // Use empty string when undefined so the component stays controlled\n value={radiusMiles ?? ''}\n placeholder=\"0\"\n onChange={handleChangeRadius}\n inputType=\"number\"\n htmlAttributes={{\n min: 0,\n max: maxRadiusInMiles,\n }}\n />\n </div>\n <OffsetWellMap\n classes={{\n root: styles.offsetWellMapRoot,\n map: styles.offsetWellMapRoot,\n }}\n isClickable\n isViewOnly={false}\n subjectWell={subjectWell}\n wells={allWells}\n offsetWellIds={selectedOffsetWellsIds}\n radius={radiusMiles ?? 0}\n activeWellId={subjectWell?.id || 0}\n handleChangeOffsetWell={params => params && handleChangeOffsetWell(params.id)}\n />\n </div>\n );\n }\n);\n\nexport default Map;\n"],"names":["Map","memo","_ref","well","wells","pads","selectedOffsetWellsIds","onOffsetWellIdsSelect","radiusMiles","setFilters","maxRadiusInMiles","allWells","useMemo","flatMap","pad","subjectWell","_objectSpread","find","w","id","toString","handleChangeOffsetWell","useCallback","wellId","p","some","wellIds","map","isSelected","includes","filter","handleChangeRadius","value","numeric","undefined","Number","prev","_jsxs","className","styles","children","jsxs","radiusContainer","_jsx","Text","color","TextInput","textInputWrapper","placeholder","onChange","inputType","htmlAttributes","min","max","OffsetWellMap","classes","root","offsetWellMapRoot","isClickable","isViewOnly","offsetWellIds","radius","activeWellId","params"],"mappings":"k7bAm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IAGH,OACE4B,EAAAA,KAAA,MAAA,CAAKC,UAAWC,EAAOZ,IAAIa,SACzB,CAAAH,EAAAI,KAAA,MAAA,CAAKH,UAAWC,EAAOG,gBAAgBF,SAAA,CACrCG,MAACC,OAAI,CAACC,MAAM,KAAIL,SAAA,iBAChBG,MAACG,YAAS,CACRR,UAAWC,EAAOQ,iBAElBf,MAAOxB,QAAAA,EAAe,GACtBwC,YAAY,IACZC,SAAUlB,EACVmB,UAAU,SACVC,eAAgB,CACdC,IAAK,EACLC,IAAK3C,QAIXiC,MAACW,EAAa,CACZC,QAAS,CACPC,KAAMjB,EAAOkB,kBACb9B,IAAKY,EAAOkB,mBAEdC,aAAW,EACXC,YAAY,EACZ5C,YAAaA,EACbX,MAAOO,EACPiD,cAAetD,EACfuD,OAAQrD,QAAAA,EAAe,EACvBsD,cAAc/C,eAAAA,EAAaI,KAAM,EACjCE,uBAAwB,SAAA0C,GAAM,OAAIA,GAAU1C,EAAuB0C,EAAO5C,GAAG,MAIrF"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var s=require("@babel/runtime/helpers/defineProperty"),e=require("@babel/runtime/helpers/slicedToArray"),n=require("react"),o=require("@tanstack/react-query"),c=require("../Chip/Chip.js"),i=require("../Menu/Menu.js"),r=require("./useInterventionUnitEvents.js"),t=require("./utils.js"),u=require("./InterventionEventSelector.scss.js"),l=require("../../icons/iconParkIcons.js");require("../../icons/customIcons/icons/AddMessage.js"),require("../../icons/customIcons/icons/DragOne.js"),require("../../icons/customIcons/icons/Attention.js"),require("../../icons/customIcons/icons/Collapse.js"),require("../../icons/customIcons/icons/Dashboard.js"),require("../../icons/customIcons/icons/Expand.js"),require("../../icons/customIcons/icons/FolderClosed.js"),require("../../icons/customIcons/icons/FolderClosedFilled.js"),require("../../icons/customIcons/icons/FolderOpened.js"),require("../../icons/customIcons/icons/GreaterOrEqual.js"),require("../../icons/customIcons/icons/LessOrEqual.js"),require("../../icons/customIcons/icons/Search.js"),require("../../icons/customIcons/icons/SearchOne.js"),require("../../icons/customIcons/icons/Wellhub.js"),require("../../icons/customIcons/icons/MultiRuler.js"),require("../../icons/customIcons/icons/Checkbox.js"),require("../../icons/customIcons/icons/CheckboxChecked.js"),require("../../icons/customIcons/icons/CheckboxIndeterminate.js"),require("../../icons/customIcons/icons/Radio.js"),require("../../icons/customIcons/icons/RadioChecked.js"),require("../../icons/customIcons/icons/SimulFrac.js"),require("../../icons/customIcons/icons/ZipperFrac.js"),require("../../icons/customIcons/icons/CautionFilled.js"),require("../../icons/customIcons/icons/MoreApp.js"),require("../../icons/customIcons/icons/Pad.js"),require("../../icons/customIcons/icons/DrilloutUnit.js"),require("../../icons/customIcons/icons/FracFleet.js"),require("../../icons/customIcons/icons/Global.js"),require("../../icons/customIcons/icons/Program.js"),require("../../icons/customIcons/icons/Rig.js"),require("../../icons/customIcons/icons/Well.js"),require("../../icons/customIcons/icons/Gap.js"),require("../../icons/customIcons/icons/Pin.js"),require("../../icons/customIcons/icons/CloseOneFilled.js"),require("../../icons/customIcons/icons/AttentionFilled.js"),require("../../icons/customIcons/icons/CheckOneFilled.js"),require("../../icons/customIcons/icons/Archive.js"),require("../../icons/customIcons/icons/ArchiveCancel.js"),require("../../icons/customIcons/icons/Unarchive.js"),require("../../icons/customIcons/icons/Archived.js"),require("../../icons/customIcons/icons/InterventionUnit.js"),require("../../icons/customIcons/icons/CloudDelete.js"),require("../../icons/customIcons/icons/Lasso.js"),require("../../icons/customIcons/icons/Radius.js"),require("../../icons/customIcons/icons/ErrorOps.js"),require("../../icons/customIcons/icons/DataTypeOps.js"),require("../../icons/customIcons/icons/FalsePositiveOps.js"),require("../../icons/customIcons/icons/CalibrationOps.js"),require("../../icons/customIcons/icons/CriticalOps.js"),require("../../icons/customIcons/icons/Company.js"),require("../../icons/customIcons/icons/ArchiveOne.js"),require("../../icons/customIcons/icons/ParseBotFusion.js"),require("../../icons/customIcons/icons/Connect.js"),require("../../icons/customIcons/icons/PuzzleOne.js"),require("../../icons/customIcons/icons/Feed.js"),require("../../icons/customIcons/icons/Prompt.js"),require("../../icons/customIcons/icons/Companies.js"),require("../../icons/customIcons/icons/ClipboardAi.js"),require("../../icons/customIcons/icons/Key.js"),require("../../icons/customIcons/icons/AtSignCrossed.js"),require("../../icons/customIcons/icons/MappingManual.js"),require("../../icons/customIcons/icons/Mapping.js"),require("../../icons/customIcons/icons/Metrics.js"),require("../../icons/customIcons/icons/Drops.js"),require("../../icons/customIcons/icons/ClipboardSearch.js"),require("../../icons/customIcons/icons/Template.js"),require("../../icons/customIcons/icons/ClipboardMetrics.js"),require("../../icons/customIcons/icons/ClipboardBuilder.js"),require("../../icons/customIcons/icons/UnitConversion.js"),require("../../icons/customIcons/icons/NPT.js"),require("../../icons/customIcons/icons/GuidedFrac.js");var a=require("react/jsx-runtime");function m(s){return s&&"object"==typeof s&&"default"in s?s:{default:s}}var j=m(s),I=m(e);function q(s,e){var n=Object.keys(s);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(s);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(s,e).enumerable}))),n.push.apply(n,o)}return n}function d(s){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?q(Object(n),!0).forEach((function(e){j.default(s,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(n)):q(Object(n)).forEach((function(e){Object.defineProperty(s,e,Object.getOwnPropertyDescriptor(n,e))}))}return s}function p(s){var e=s.wellId,o=s.selectedEventId,m=s.onChange,j=s.className,q=n.useState(!1),d=I.default(q,2),p=d[0],v=d[1],h=n.useRef(null),f=r.useInterventionUnitEvents(e),C=f.data,b=void 0===C?[]:C,O=f.isSuccess,E=n.useMemo((function(){var s;return null!==(s=b.find((function(s){return t.isSameEventId(s.id,o)})))&&void 0!==s?s:null}),[b,o]);if(n.useEffect((function(){O&&null!=o&&!E&&m(null,null)}),[O,o,E,m]),!(null!=o||e&&b.length))return null;var x=p?l.UpIcon:l.DownIcon,y=function(s){v(!1),m(s?Number(s.id):null,s)};return a.jsxs(a.Fragment,{children:[a.jsx(c.Chip,{ref:h,className:j,size:"small",onClick:function(){return v(!0)},suffix:a.jsx(x,{}),testId:"interventionEventSelectorChip",children:t.getEventChipLabel(E,o)}),a.jsxs(i.Menu,{open:p,anchorEl:h.current,onClose:function(){return v(!1)},className:u.menu,children:[a.jsx(i.Menu.Item,{selected:null==o,onClick:function(){return y(null)},testId:"interventionEventSelectorAllEvents",children:t.ALL_EVENTS_LABEL}),b.map((function(s){var e;return a.jsx(i.Menu.Item,{size:"large",selected:t.isSameEventId(s.id,o),onClick:function(){return y(s)},testId:"interventionEventSelectorEvent-".concat(s.id),children:a.jsxs("div",{className:u.eventItem,children:[a.jsxs("div",{className:u.eventItemMain,children:[a.jsx("span",{className:u.eventItemOperation,children:s.operation}),a.jsx("span",{className:u.eventItemDate,children:t.formatEventDate(s)})]}),(null===(e=s.intervention_unit)||void 0===e?void 0:e.name)&&a.jsx("div",{className:u.eventItemUnit,children:s.intervention_unit.name})]})},s.id)}))]})]})}exports.InterventionEventSelector=function(s){return a.jsx(o.QueryClientProvider,{client:r.interventionEventSelectorQueryClient,children:a.jsx(p,d({},s))})};
|
|
2
|
+
//# sourceMappingURL=InterventionEventSelector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InterventionEventSelector.js","sources":["../../../../src/componentsV2/InterventionEventSelector/InterventionEventSelector.tsx"],"sourcesContent":["import { useEffect, useMemo, useRef, useState } from 'react';\nimport { QueryClientProvider } from '@tanstack/react-query';\n\nimport { Chip } from '../Chip';\nimport { Menu } from '../Menu';\n\nimport { InterventionEventSelectorProps, InterventionUnitEvent } from './types';\nimport {\n interventionEventSelectorQueryClient,\n useInterventionUnitEvents,\n} from './useInterventionUnitEvents';\nimport { ALL_EVENTS_LABEL, formatEventDate, getEventChipLabel, isSameEventId } from './utils';\n\nimport styles from './InterventionEventSelector.scss';\n\nimport { DownIcon, UpIcon } from '~/icons';\n\nfunction InterventionEventSelectorInner({\n wellId,\n selectedEventId,\n onChange,\n className,\n}: InterventionEventSelectorProps) {\n const [isOpen, setIsOpen] = useState(false);\n const anchorRef = useRef<HTMLDivElement>(null);\n\n const { data: events = [], isSuccess } = useInterventionUnitEvents(wellId);\n\n const selectedEvent = useMemo(\n () => events.find(event => isSameEventId(event.id, selectedEventId)) ?? null,\n [events, selectedEventId]\n );\n\n // A persisted selection may belong to another well (e.g. the app well changed\n // while unmounted). Once the current well's events are known, an unknown id is\n // reset to \"All events\" so consumers drop the dead filter. Only a successful\n // fetch may reset — a failed one must not wipe a valid selection.\n useEffect(() => {\n if (!isSuccess || selectedEventId == null || selectedEvent) return;\n onChange(null, null);\n }, [isSuccess, selectedEventId, selectedEvent, onChange]);\n\n // With an active selection the chip must stay reachable even when the events\n // cannot be listed (failed fetch, missing well id) — it is the only control\n // that can clear the persisted filter.\n if (selectedEventId == null && (!wellId || !events.length)) return null;\n\n const ArrowIcon = isOpen ? UpIcon : DownIcon;\n\n const handleSelect = (event: InterventionUnitEvent | null) => {\n setIsOpen(false);\n onChange(event ? Number(event.id) : null, event);\n };\n\n return (\n <>\n <Chip\n ref={anchorRef}\n className={className}\n size=\"small\"\n onClick={() => setIsOpen(true)}\n suffix={<ArrowIcon />}\n testId=\"interventionEventSelectorChip\"\n >\n {getEventChipLabel(selectedEvent, selectedEventId)}\n </Chip>\n <Menu\n open={isOpen}\n anchorEl={anchorRef.current}\n onClose={() => setIsOpen(false)}\n className={styles.menu}\n >\n <Menu.Item\n // An unresolvable active selection (failed fetch) still filters the\n // consumer's data, so it must not present as \"All events\" here\n selected={selectedEventId == null}\n onClick={() => handleSelect(null)}\n testId=\"interventionEventSelectorAllEvents\"\n >\n {ALL_EVENTS_LABEL}\n </Menu.Item>\n {events.map(event => (\n <Menu.Item\n key={event.id}\n size=\"large\"\n selected={isSameEventId(event.id, selectedEventId)}\n onClick={() => handleSelect(event)}\n testId={`interventionEventSelectorEvent-${event.id}`}\n >\n <div className={styles.eventItem}>\n <div className={styles.eventItemMain}>\n <span className={styles.eventItemOperation}>{event.operation}</span>\n <span className={styles.eventItemDate}>{formatEventDate(event)}</span>\n </div>\n {event.intervention_unit?.name && (\n <div className={styles.eventItemUnit}>{event.intervention_unit.name}</div>\n )}\n </div>\n </Menu.Item>\n ))}\n </Menu>\n </>\n );\n}\n\n// The host app may bundle a different @tanstack/react-query instance than this\n// library, making an app-level QueryClientProvider invisible to the hook above.\n// Shipping our own provider keeps the component self-contained in any DC app.\nexport function InterventionEventSelector(props: InterventionEventSelectorProps) {\n return (\n <QueryClientProvider client={interventionEventSelectorQueryClient}>\n <InterventionEventSelectorInner {...props} />\n </QueryClientProvider>\n );\n}\n"],"names":["InterventionEventSelectorInner","_ref","wellId","selectedEventId","onChange","className","useState","_useState2","_slicedToArray","_useState","isOpen","setIsOpen","anchorRef","useRef","useInterventionUnitEvents","_useInterventionUnitE2","_useInterventionUnitE","data","events","isSuccess","selectedEvent","useMemo","_events$find","find","event","isSameEventId","id","useEffect","length","ArrowIcon","UpIcon","DownIcon","handleSelect","Number","_jsxs","_Fragment","children","_jsx","Chip","ref","size","onClick","suffix","testId","getEventChipLabel","Menu","open","anchorEl","current","onClose","styles","menu","Item","selected","ALL_EVENTS_LABEL","map","_event$intervention_u","jsx","jsxs","eventItem","eventItemMain","eventItemOperation","operation","eventItemDate","formatEventDate","intervention_unit","name","eventItemUnit","props","QueryClientProvider","client","interventionEventSelectorQueryClient","_objectSpread"],"mappings":"s6JAiBA,SAASA,EAK0BC,GAAA,IAJjCC,IAAAA,OACAC,IAAAA,gBACAC,IAAAA,SACAC,IAAAA,UAE4BC,EAAAA,EAAQA,UAAC,GAAMC,EAAAC,EAAAA,QAAAC,EAAA,GAApCC,EAAMH,EAAA,GAAEI,EAASJ,EAAA,GAClBK,EAAYC,SAAuB,MAEAC,EAAAA,EAAyBA,0BAACZ,GAAO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ACnCmB,OAA0CnB,kCAAAA,OAAAA,EAAME,IAAKU,SAErDF,EAAAwB,KAAA,MAAA,CAAKrD,UAAW6C,EAAOS,UAAUvB,SAC/B,CAAAF,EAAAwB,KAAA,MAAA,CAAKrD,UAAW6C,EAAOU,cAAcxB,SACnC,CAAAC,EAAAoB,IAAA,OAAA,CAAMpD,UAAW6C,EAAOW,mBAAmBzB,SAAEZ,EAAMsC,YACnDzB,EAAAoB,IAAA,OAAA,CAAMpD,UAAW6C,EAAOa,cAAc3B,SAAE4B,EAAeA,gBAACxC,SAEzD,UAAAA,EAAMyC,yBAAN,IAAAT,OAAA,EAAAA,EAAyBU,OACxB7B,EAAAA,IAAA,MAAA,CAAKhC,UAAW6C,EAAOiB,cAAc/B,SAAEZ,EAAMyC,kBAAkBC,WAZ9D1C,EAAME,GAeD,SAKtB,mCAKO,SAAmC0C,GACxC,OACE/B,EAAAA,IAACgC,EAAAA,oBAAmB,CAACC,OAAQC,EAAqCA,qCAAAnC,SAChEC,EAAAoB,IAACzD,EAA8BwE,EAAA,CAAA,EAAKJ,KAG1C"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";require('./../../ext-esm/style-inject/dist/style-inject.es.js')(".InterventionEventSelector_menu__kjVhB{max-height:360px;max-width:320px;min-width:240px}.InterventionEventSelector_eventItem__XC1Z4{display:flex;flex-direction:column;gap:2px;min-width:0;width:100%}.InterventionEventSelector_eventItemMain__SYYAI{align-items:baseline;display:flex;gap:12px;justify-content:space-between;min-width:0}.InterventionEventSelector_eventItemOperation__3VEM8{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.InterventionEventSelector_eventItemDate__fAZXc{color:var(--palette-primary-text-6);flex-shrink:0;font-size:12px}.InterventionEventSelector_eventItemUnit__GwdHJ{color:var(--palette-primary-text-6);font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}"),module.exports={spacing:"8",menu:"InterventionEventSelector_menu__kjVhB",eventItem:"InterventionEventSelector_eventItem__XC1Z4",eventItemMain:"InterventionEventSelector_eventItemMain__SYYAI",eventItemOperation:"InterventionEventSelector_eventItemOperation__3VEM8",eventItemDate:"InterventionEventSelector_eventItemDate__fAZXc",eventItemUnit:"InterventionEventSelector_eventItemUnit__GwdHJ"};
|
|
2
|
+
//# sourceMappingURL=InterventionEventSelector.scss.js.map
|
package/cjs-bundle/componentsV2/InterventionEventSelector/InterventionEventSelector.scss.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,qBAAqB,sDAAyD;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/asyncToGenerator"),r=require("@babel/runtime/regenerator"),t=require("jsona"),n=require("@tanstack/react-query");require("@babel/runtime/helpers/defineProperty"),require("uuid"),require("lodash"),require("@babel/runtime/helpers/toConsumableArray"),require("lodash/set"),require("lodash/get"),require("lodash/unset"),require("moment");var i=require("../../clients/jsonApi/index.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("../../clients/subscriptions/constants.js"),require("../../clients/subscriptions.v1.js"),require("../../clients/subscriptions/subscriptions-client.factory.js"),require("../../clients/api/apiCore.js"),require("../../clients/constants.js"),require("../../clients/sso/auth0.js"),require("../../clients/sso/oauth2.js"),require("../../clients/api/rateLimiter.js");var u=s(e),a=s(r),o=new(s(t).default),l=new n.QueryClient,c={byWellId:function(e){return["intervention_unit_events",e]}},p=function(){var e=u.default(a.default.mark((function e(r){return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",i.getInterventionUnitEvents({well_id:r,fields:"all",per_page:100,order:"asc",sort:"created_at"}).then((function(e){return o.deserialize(e)})));case 1:case"end":return e.stop()}}),e)})));return function(r){return e.apply(this,arguments)}}();exports.interventionEventSelectorQueryClient=l,exports.interventionUnitEventsQueryKeys=c,exports.useInterventionUnitEvents=function(e){return n.useQuery({queryKey:c.byWellId(e),queryFn:function(){return p(e)},enabled:!!e,staleTime:15e3})};
|
|
2
|
+
//# sourceMappingURL=useInterventionUnitEvents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useInterventionUnitEvents.js","sources":["../../../../src/componentsV2/InterventionEventSelector/useInterventionUnitEvents.ts"],"sourcesContent":["import Jsona from 'jsona';\nimport { QueryClient, useQuery } from '@tanstack/react-query';\n\nimport { jsonApi } from '../../clients';\n\nimport { InterventionUnitEvent } from './types';\n\nconst dataFormatter = new Jsona();\n\n// The component ships its own client (see InterventionEventSelector.tsx) —\n// exported so stories and tests can seed or clear the cache.\nexport const interventionEventSelectorQueryClient = new QueryClient();\n\nconst PER_PAGE = 100;\nconst STALE_TIME = 15_000;\n\nexport const interventionUnitEventsQueryKeys = {\n byWellId: (wellId?: number | null) => ['intervention_unit_events', wellId] as const,\n};\n\nconst fetchInterventionUnitEvents = async (wellId: number): Promise<InterventionUnitEvent[]> =>\n jsonApi\n .getInterventionUnitEvents({\n well_id: wellId,\n fields: 'all',\n per_page: PER_PAGE,\n order: 'asc',\n sort: 'created_at',\n })\n .then(response => dataFormatter.deserialize(response) as InterventionUnitEvent[]);\n\nexport function useInterventionUnitEvents(wellId?: number | null) {\n return useQuery({\n queryKey: interventionUnitEventsQueryKeys.byWellId(wellId),\n queryFn: () => fetchInterventionUnitEvents(wellId as number),\n enabled: !!wellId,\n staleTime: STALE_TIME,\n });\n}\n"],"names":["dataFormatter","Jsona","interventionEventSelectorQueryClient","QueryClient","interventionUnitEventsQueryKeys","byWellId","wellId","fetchInterventionUnitEvents","_ref","_asyncToGenerator","_regeneratorRuntime","mark","wrap","_context","prev","next","jsonApi","well_id","fields","per_page","order","sort","then","response","deserialize","stop","_callee","_x","apply","this","arguments","useQuery","queryKey","queryFn","enabled","staleTime"],"mappings":"i7BAOMA,EAAgB,SAAIC,SAIbC,EAAuC,IAAIC,EAAAA,YAK3CC,EAAkC,CAC7CC,SAAU,SAACC,GAAsB,MAAK,CAAC,2BAA4BA,EAAO,GAGtEC,EAA2B,WAAA,IAAAC,EAAAC,EAAAA,QAAAC,EAAAA,QAAAC,MAAG,WAAOL,GAAc,OAAAI,UAAAE,MAAA,SAAAC,GAAA,OAAA,OAAAA,EAAAC,KAAAD,EAAAE,MAAA,KAAA,EAAA,OACvDC,EAAAA,OAAAA,SAAAA,4BAC6B,CACzBC,QAASX,EACTY,OAAQ,MACRC,SAZW,IAaXC,MAAO,MACPC,KAAM,eAEPC,MAAK,SAAAC,GAAQ,OAAIvB,EAAcwB,YAAYD,EAAoC,KAAC,KAAA,EAAA,IAAA,MAAA,OAAAV,EAAAY,OAAA,GAAAC,EAAA,KAAA,OAAA,SATpDC,GAAA,OAAAnB,EAAAoB,MAAAC,KAAAC,UAAA,CAAA,CAAA,8HAW1B,SAAmCxB,GACxC,OAAOyB,WAAS,CACdC,SAAU5B,EAAgCC,SAASC,GACnD2B,QAAS,WAAA,OAAM1B,EAA4BD,EAAiB,EAC5D4B,UAAW5B,EACX6B,UAtBe,MAwBnB"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";function t(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}Object.defineProperty(exports,"__esModule",{value:!0});var e=t(require("moment")),n=function(t){var n=function(t){return t.start_at||t.set_at||null}(t);return n?e.default(n).format("M/D/YYYY"):""};exports.ALL_EVENTS_LABEL="All events",exports.formatEventDate=n,exports.getEventChipLabel=function(t,e){if(!t)return null==e?"All events":"Event ".concat(e);var r=n(t);return r?"".concat(t.operation," (").concat(r,")"):t.operation},exports.isSameEventId=function(t,e){return null!=t&&null!=e&&String(t)===String(e)};
|
|
2
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../../src/componentsV2/InterventionEventSelector/utils.ts"],"sourcesContent":["import moment from 'moment';\n\nimport { InterventionUnitEvent } from './types';\n\nexport const ALL_EVENTS_LABEL = 'All events';\n\nconst EVENT_DATE_FORMAT = 'M/D/YYYY';\n\nconst getEventStartDate = (event: InterventionUnitEvent): string | null =>\n event.start_at || event.set_at || null;\n\nexport const formatEventDate = (event: InterventionUnitEvent): string => {\n const startDate = getEventStartDate(event);\n return startDate ? moment(startDate).format(EVENT_DATE_FORMAT) : '';\n};\n\nexport const getEventChipLabel = (\n event: InterventionUnitEvent | null,\n selectedEventId?: number | string | null\n): string => {\n if (!event) {\n // An active selection whose event cannot be resolved (failed fetch, foreign\n // well) must not masquerade as \"All events\" — the filter is still applied\n return selectedEventId == null ? ALL_EVENTS_LABEL : `Event ${selectedEventId}`;\n }\n const formattedDate = formatEventDate(event);\n return formattedDate ? `${event.operation} (${formattedDate})` : event.operation;\n};\n\nexport const isSameEventId = (\n a: number | string | null | undefined,\n b: number | string | null | undefined\n): boolean => a != null && b != null && String(a) === String(b);\n"],"names":["formatEventDate","event","startDate","start_at","set_at","getEventStartDate","moment","format","selectedEventId","concat","formattedDate","operation","a","b","String"],"mappings":"uKAWaA,EAAkB,SAACC,GAC9B,IAAMC,EAJkB,SAACD,GAA4B,OACrDA,EAAME,UAAYF,EAAMG,QAAU,IAAI,CAGpBC,CAAkBJ,GACpC,OAAOC,EAAYI,EAAAA,QAAOJ,GAAWK,OAPb,YAOyC,EACnE,2BAVgC,iEAYC,SAC/BN,EACAO,GAEA,IAAKP,EAGH,OAA0B,MAAnBO,EAnBqB,aAmBqB,SAAAC,OAAYD,GAE/D,IAAME,EAAgBV,EAAgBC,GACtC,OAAOS,EAAmBT,GAAAA,OAAAA,EAAMU,uBAAcD,EAAa,KAAMT,EAAMU,SACzE,wBAE6B,SAC3BC,EACAC,GAAqC,OACpB,MAALD,GAAkB,MAALC,GAAaC,OAAOF,KAAOE,OAAOD,EAAE"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),r=require("@babel/runtime/helpers/objectWithoutProperties"),o=require("@material-ui/core"),n=require("react"),t=require("../../effects/useDelayedDcFullscreenElemOpen.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),r=require("@babel/runtime/helpers/objectWithoutProperties"),o=require("@material-ui/core"),n=require("react"),t=require("classnames"),s=require("../../effects/useDelayedDcFullscreenElemOpen.js"),c=require("../../components/DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js"),l=require("../../components/DevCenter/DevCenterAppContainer/components/IsInsideIsolatedDcAppProvider/IsInsideIsolatedDcAppProvider.js"),i=require("../ModalWindow/ModalWindow.js"),u=require("./constants.js"),a=require("./Modal.scss.js"),p=require("react/jsx-runtime");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=d(e),O=d(r),j=d(t),b=["open","onClose","size","showCloseButton","closeOnBackdropClick","closeOnEscape"],v=["open"];function C(e,r){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),o.push.apply(o,n)}return o}function m(e){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?C(Object(o),!0).forEach((function(r){f.default(e,r,o[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):C(Object(o)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r))}))}return e}var D=function(e){var r=e.open,t=e.onClose,s=e.size,c=void 0===s?"medium":s,l=e.showCloseButton,d=void 0===l||l,f=e.closeOnBackdropClick,v=void 0===f||f,C=e.closeOnEscape,D=void 0===C||C,y=O.default(e,b),I=n.useCallback((function(e,r){t&&("backdropClick"===r&&v&&t("backdropClick"),"escapeKeyDown"===r&&D&&t("escapeKey"))}),[t,v,D]),P=n.useCallback((function(){null==t||t("closeButtonClick")}),[t]);return p.jsx(o.Modal,{open:r,className:j.default(u.MODAL_ROOT_CLASS,a.root),onClose:I,children:p.jsx(i.ModalWindow,m(m({},y),{},{onClose:P,showCloseButton:d,size:c}))})},y=function(e){var r=e.open,o=O.default(e,v),n=s.useDelayedDcFullscreenElemOpen({isOpen:r},!0).delayedIsOpen;return p.jsx(c.IsInsideDcFullscreenElemProvider,{children:p.jsx(D,m({open:n},o))})};exports.Modal=function(e){var r=l.useIsInsideIsolatedDcApp(),o=c.useIsInsideDcFullscreenElem(),n=r&&!o?y:D;return p.jsx(n,m({},e))};
|
|
2
2
|
//# sourceMappingURL=Modal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.js","sources":["../../../../src/componentsV2/Modal/Modal.tsx"],"sourcesContent":["// TODO Move these hooks to better place so the imports won't be as hideous\nimport { Modal as MuiModal, ModalProps as MuiModalProps } from '@material-ui/core';\nimport { useCallback } from 'react';\n\nimport { useDelayedDcFullscreenElemOpen } from '../../effects/useDelayedDcFullscreenElemOpen';\nimport {\n IsInsideDcFullscreenElemProvider,\n useIsInsideDcFullscreenElem,\n} from '../../components/DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider';\nimport { useIsInsideIsolatedDcApp } from '../../components/DevCenter/DevCenterAppContainer/components/IsInsideIsolatedDcAppProvider';\nimport { ModalWindow, ModalWindowProps } from '../ModalWindow';\n\nimport styles from './Modal.scss';\n\nexport type ModalProps = Omit<ModalWindowProps, 'onClose'> & {\n open: boolean;\n onClose?: (reason: 'backdropClick' | 'escapeKey' | 'closeButtonClick') => void;\n closeOnBackdropClick?: boolean;\n closeOnEscape?: boolean;\n};\n\nconst ActualModal = ({\n open,\n onClose,\n size = 'medium',\n showCloseButton = true,\n closeOnBackdropClick = true,\n closeOnEscape = true,\n ...restProps\n}: ModalProps) => {\n const modalCloseHandler = useCallback<Required<MuiModalProps>['onClose']>(\n (_event, reason) => {\n if (onClose) {\n if (reason === 'backdropClick' && closeOnBackdropClick) {\n onClose('backdropClick');\n }\n if (reason === 'escapeKeyDown' && closeOnEscape) {\n onClose('escapeKey');\n }\n }\n },\n [onClose, closeOnBackdropClick, closeOnEscape]\n );\n\n const closeButtonClickHandler = useCallback(() => {\n onClose?.('closeButtonClick');\n }, [onClose]);\n\n return (\n <MuiModal
|
|
1
|
+
{"version":3,"file":"Modal.js","sources":["../../../../src/componentsV2/Modal/Modal.tsx"],"sourcesContent":["// TODO Move these hooks to better place so the imports won't be as hideous\nimport { Modal as MuiModal, ModalProps as MuiModalProps } from '@material-ui/core';\nimport { useCallback } from 'react';\nimport classNames from 'classnames';\n\nimport { useDelayedDcFullscreenElemOpen } from '../../effects/useDelayedDcFullscreenElemOpen';\nimport {\n IsInsideDcFullscreenElemProvider,\n useIsInsideDcFullscreenElem,\n} from '../../components/DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider';\nimport { useIsInsideIsolatedDcApp } from '../../components/DevCenter/DevCenterAppContainer/components/IsInsideIsolatedDcAppProvider';\nimport { ModalWindow, ModalWindowProps } from '../ModalWindow';\n\nimport { MODAL_ROOT_CLASS } from './constants';\n\nimport styles from './Modal.scss';\n\nexport type ModalProps = Omit<ModalWindowProps, 'onClose'> & {\n open: boolean;\n onClose?: (reason: 'backdropClick' | 'escapeKey' | 'closeButtonClick') => void;\n closeOnBackdropClick?: boolean;\n closeOnEscape?: boolean;\n};\n\nconst ActualModal = ({\n open,\n onClose,\n size = 'medium',\n showCloseButton = true,\n closeOnBackdropClick = true,\n closeOnEscape = true,\n ...restProps\n}: ModalProps) => {\n const modalCloseHandler = useCallback<Required<MuiModalProps>['onClose']>(\n (_event, reason) => {\n if (onClose) {\n if (reason === 'backdropClick' && closeOnBackdropClick) {\n onClose('backdropClick');\n }\n if (reason === 'escapeKeyDown' && closeOnEscape) {\n onClose('escapeKey');\n }\n }\n },\n [onClose, closeOnBackdropClick, closeOnEscape]\n );\n\n const closeButtonClickHandler = useCallback(() => {\n onClose?.('closeButtonClick');\n }, [onClose]);\n\n return (\n <MuiModal\n open={open}\n className={classNames(MODAL_ROOT_CLASS, styles.root)}\n onClose={modalCloseHandler}\n >\n <ModalWindow\n {...restProps}\n onClose={closeButtonClickHandler}\n showCloseButton={showCloseButton}\n size={size}\n />\n </MuiModal>\n );\n};\n\nconst DcModal = ({ open: openProp, ...otherProps }: ModalProps) => {\n const { delayedIsOpen } = useDelayedDcFullscreenElemOpen({ isOpen: openProp }, true);\n\n return (\n <IsInsideDcFullscreenElemProvider>\n <ActualModal open={delayedIsOpen} {...otherProps} />\n </IsInsideDcFullscreenElemProvider>\n );\n};\n\nexport const Modal = (props: ModalProps) => {\n const isInsideDcApp = useIsInsideIsolatedDcApp();\n const isInsideDcFullscreenElem = useIsInsideDcFullscreenElem();\n\n const ModalComponent = isInsideDcApp && !isInsideDcFullscreenElem ? DcModal : ActualModal;\n\n return <ModalComponent {...props} />;\n};\n"],"names":["ActualModal","_ref","open","onClose","_ref$size","size","_ref$showCloseButton","showCloseButton","_ref$closeOnBackdropC","closeOnBackdropClick","_ref$closeOnEscape","closeOnEscape","restProps","_objectWithoutProperties","_excluded","modalCloseHandler","useCallback","_event","reason","closeButtonClickHandler","_jsx","MuiModal","className","classNames","MODAL_ROOT_CLASS","styles","root","children","ModalWindow","_objectSpread","DcModal","_ref2","openProp","otherProps","_excluded2","delayedIsOpen","useDelayedDcFullscreenElemOpen","isOpen","IsInsideDcFullscreenElemProvider","props","isInsideDcApp","useIsInsideIsolatedDcApp","isInsideDcFullscreenElem","useIsInsideDcFullscreenElem","ModalComponent"],"mappings":"m+CAwBA,IAAMA,EAAc,SAQFC,GAAA,IAPhBC,IAAAA,KACAC,IAAAA,QAAOC,EAAAH,EACPI,KAAAA,aAAO,SAAQD,EAAAE,EAAAL,EACfM,gBAAAA,cAAsBD,EAAAE,EAAAP,EACtBQ,qBAAAA,cAA2BD,EAAAE,EAAAT,EAC3BU,cAAAA,cAAoBD,EACjBE,EAASC,EAAA,QAAAZ,EAAAa,GAENC,EAAoBC,EAAAA,aACxB,SAACC,EAAQC,GACHf,IACa,kBAAXe,GAA8BT,GAChCN,EAAQ,iBAEK,kBAAXe,GAA8BP,GAChCR,EAAQ,aAGb,GACD,CAACA,EAASM,EAAsBE,IAG5BQ,EAA0BH,EAAAA,aAAY,WAC1Cb,SAAAA,EAAU,mBACZ,GAAG,CAACA,IAEJ,OACEiB,EAAAA,IAACC,EAAAA,MAAQ,CACPnB,KAAMA,EACNoB,UAAWC,EAAU,QAACC,mBAAkBC,EAAOC,MAC/CvB,QAASY,EAAkBY,SAE3BP,EAAAA,IAACQ,EAAAA,YAAWC,EAAAA,EAAA,GACNjB,GAAS,GAAA,CACbT,QAASgB,EACTZ,gBAAiBA,EACjBF,KAAMA,MAId,EAEMyB,EAAU,SAAmDC,GAAA,IAA1CC,IAAN9B,KAAmB+B,EAAUpB,EAAA,QAAAkB,EAAAG,GACtCC,EAAkBC,EAAAA,+BAA+B,CAAEC,OAAQL,IAAY,GAAvEG,cAER,OACEf,EAAAA,IAACkB,EAAAA,iCAAgC,CAAAX,SAC/BP,EAAAA,IAACpB,EAAW6B,EAAA,CAAC3B,KAAMiC,GAAmBF,KAG5C,gBAEqB,SAACM,GACpB,IAAMC,EAAgBC,EAAAA,2BAChBC,EAA2BC,EAAAA,8BAE3BC,EAAiBJ,IAAkBE,EAA2BZ,EAAU9B,EAE9E,OAAOoB,EAAAA,IAACwB,EAAmBL,EAAAA,CAAAA,EAAAA,GAC7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../../src/componentsV2/Modal/constants.ts"],"sourcesContent":["/** MUI v4's Modal root carries no class of its own, so outside-click logic has nothing to test. */\nexport const MODAL_ROOT_CLASS = 'corva-modal-root';\n"],"names":[],"mappings":"6FACgC"}
|