diff --git a/explore/src/main/scala/explore/attachments/ObsAttachmentsTableBody.scala b/explore/src/main/scala/explore/attachments/ObsAttachmentsTableBody.scala index 36b0cfd3ba..8b34b963b0 100644 --- a/explore/src/main/scala/explore/attachments/ObsAttachmentsTableBody.scala +++ b/explore/src/main/scala/explore/attachments/ObsAttachmentsTableBody.scala @@ -36,6 +36,7 @@ import japgolly.scalajs.react.vdom.html_<^.* import lucuma.core.model.ObsAttachment as ObsAtt import lucuma.core.model.Program import lucuma.core.util.Enumerated +import lucuma.core.util.NewType import lucuma.core.util.Timestamp import lucuma.react.common.ReactFnProps import lucuma.react.common.style.Css @@ -58,7 +59,6 @@ import org.scalajs.dom.File as DomFile import org.typelevel.log4cats.Logger import scala.collection.immutable.SortedSet -import lucuma.core.util.NewType object ObsAttachmentsTableTileState extends NewType[Action]: def apply(): ObsAttachmentsTableTileState = ObsAttachmentsTableTileState(Action.None) diff --git a/explore/src/main/scala/explore/components/ColumnSelectorInTitle.scala b/explore/src/main/scala/explore/components/ColumnSelectorInTitle.scala index 26bdd7a2a8..09b5659923 100644 --- a/explore/src/main/scala/explore/components/ColumnSelectorInTitle.scala +++ b/explore/src/main/scala/explore/components/ColumnSelectorInTitle.scala @@ -3,15 +3,15 @@ package explore.components -import crystal.react.View import cats.syntax.all.* +import crystal.react.View import explore.components.ui.ExploreStyles import japgolly.scalajs.react.* import japgolly.scalajs.react.vdom.html_<^.* import lucuma.react.common.ReactFnProps +import lucuma.react.table.ColumnId import lucuma.react.table.Table import lucuma.ui.table.ColumnSelector -import lucuma.react.table.ColumnId case class ColumnSelectorState[A, B]( table: Option[Table[A, B]] = None diff --git a/explore/src/main/scala/explore/config/sequence/GeneratedSequenceBody.scala b/explore/src/main/scala/explore/config/sequence/GeneratedSequenceBody.scala index d625d29776..bc06a0bfab 100644 --- a/explore/src/main/scala/explore/config/sequence/GeneratedSequenceBody.scala +++ b/explore/src/main/scala/explore/config/sequence/GeneratedSequenceBody.scala @@ -11,10 +11,13 @@ import crystal.react.* import crystal.react.given import crystal.react.hooks.* import explore.* +import explore.components.HelpIcon import explore.components.ui.ExploreStyles import explore.model.AppContext +import explore.model.Execution import explore.model.Observation import explore.model.reusability.given +import explore.syntax.ui.* import japgolly.scalajs.react.* import japgolly.scalajs.react.vdom.html_<^.* import lucuma.core.enums.ObserveClass @@ -22,23 +25,19 @@ import lucuma.core.math.SignalToNoise import lucuma.core.model.Program import lucuma.core.model.Target import lucuma.core.model.sequence.InstrumentExecutionConfig +import lucuma.core.util.TimeSpan import lucuma.react.common.ReactFnProps import lucuma.react.primereact.Message +import lucuma.refined.* import lucuma.schemas.model.ExecutionVisits import lucuma.schemas.odb.SequenceQueriesGQL.* import lucuma.schemas.odb.input.* +import lucuma.ui.components.TimeSpanView import lucuma.ui.syntax.all.* import lucuma.ui.syntax.all.given import queries.common.ObsQueriesGQL import queries.common.TargetQueriesGQL import queries.common.VisitQueriesGQL.* -import explore.model.Execution -import explore.syntax.ui.* -import lucuma.core.util.TimeSpan - -import explore.components.HelpIcon -import lucuma.ui.components.TimeSpanView -import lucuma.refined.* case class GeneratedSequenceBody( programId: Program.Id, diff --git a/explore/src/main/scala/explore/constraints/ConstraintSummaryTile.scala b/explore/src/main/scala/explore/constraints/ConstraintSummaryTile.scala index 5d9c14ea29..7241db0af2 100644 --- a/explore/src/main/scala/explore/constraints/ConstraintSummaryTile.scala +++ b/explore/src/main/scala/explore/constraints/ConstraintSummaryTile.scala @@ -9,8 +9,8 @@ import crystal.react.* import explore.Icons import explore.common.UserPreferencesQueries import explore.common.UserPreferencesQueries.TableStore -import explore.components.ui.ExploreStyles import explore.components.ColumnSelectorState +import explore.components.ui.ExploreStyles import explore.model.AppContext import explore.model.ConstraintGroup import explore.model.ConstraintGroupList diff --git a/explore/src/main/scala/explore/findercharts/FinderChartsBody.scala b/explore/src/main/scala/explore/findercharts/FinderChartsBody.scala index 22c22fd60e..1d000494f5 100644 --- a/explore/src/main/scala/explore/findercharts/FinderChartsBody.scala +++ b/explore/src/main/scala/explore/findercharts/FinderChartsBody.scala @@ -31,9 +31,9 @@ import lucuma.ui.components.SolarProgress import lucuma.ui.reusability.given import lucuma.ui.syntax.all.given import lucuma.ui.syntax.pot.* +import monocle.Focus import scala.collection.immutable.SortedSet -import monocle.Focus case class FinderChartsTileState(chartSelector: ChartSelector, selected: Option[ObsAtt.Id]) diff --git a/explore/src/main/scala/explore/itc/ItcPanelTile.scala b/explore/src/main/scala/explore/itc/ItcPanelTile.scala index 3bf5684eaa..ae93dd84f8 100644 --- a/explore/src/main/scala/explore/itc/ItcPanelTile.scala +++ b/explore/src/main/scala/explore/itc/ItcPanelTile.scala @@ -21,8 +21,8 @@ import japgolly.scalajs.react.vdom.html_<^.* import lucuma.core.model.User import lucuma.react.common.ReactFnProps import lucuma.ui.syntax.all.given -import monocle.Lens import monocle.Focus +import monocle.Lens case class ItcPanelTileState( selectedTarget: Option[ItcTarget] = None diff --git a/explore/src/main/scala/explore/notes/NotesTile.scala b/explore/src/main/scala/explore/notes/NotesTile.scala index 96b95eeb9b..96b3b77141 100644 --- a/explore/src/main/scala/explore/notes/NotesTile.scala +++ b/explore/src/main/scala/explore/notes/NotesTile.scala @@ -12,6 +12,7 @@ import explore.components.Tile import explore.components.ui.ExploreStyles import explore.model.ObsTabTilesIds import explore.model.Observation +import explore.model.enums.TileSizeState import japgolly.scalajs.react.* import japgolly.scalajs.react.vdom.html_<^.* import lucuma.core.util.NewType @@ -27,7 +28,6 @@ import lucuma.ui.primereact.* import lucuma.ui.primereact.given import monocle.Focus import monocle.Lens -import explore.model.enums.TileSizeState object NotesTile: diff --git a/explore/src/main/scala/explore/observationtree/ObsSummaryTable.scala b/explore/src/main/scala/explore/observationtree/ObsSummaryTable.scala index 2aca837dd8..d7154a5d46 100644 --- a/explore/src/main/scala/explore/observationtree/ObsSummaryTable.scala +++ b/explore/src/main/scala/explore/observationtree/ObsSummaryTable.scala @@ -14,6 +14,7 @@ import crystal.react.syntax.pot.given import explore.Icons import explore.common.UserPreferencesQueries import explore.common.UserPreferencesQueries.TableStore +import explore.components.ColumnSelectorState import explore.components.ui.ExploreStyles import explore.model.AppContext import explore.model.Asterism @@ -58,7 +59,6 @@ import queries.schemas.odb.ObsQueries.ObservationList import java.time.Instant import java.util.UUID -import explore.components.ColumnSelectorState final case class ObsSummaryTable( userId: Option[User.Id], diff --git a/explore/src/main/scala/explore/proposal/ProgramUsers.scala b/explore/src/main/scala/explore/proposal/ProgramUsers.scala index 6dd50fa5ba..a28536c2e0 100644 --- a/explore/src/main/scala/explore/proposal/ProgramUsers.scala +++ b/explore/src/main/scala/explore/proposal/ProgramUsers.scala @@ -20,13 +20,13 @@ import japgolly.scalajs.react.vdom.html_<^.* import lucuma.core.enums.InvitationStatus import lucuma.core.model.Program import lucuma.core.util.Enumerated +import lucuma.core.util.NewType import lucuma.react.common.ReactFnProps import lucuma.react.primereact.Button import lucuma.react.primereact.OverlayPanelRef import lucuma.ui.primereact.* import lucuma.ui.syntax.all.given import org.typelevel.log4cats.Logger -import lucuma.core.util.NewType enum CreateInviteProcess(private val tag: String) derives Enumerated: case Idle extends CreateInviteProcess("idle") diff --git a/explore/src/main/scala/explore/proposal/ProposalDetailsTile.scala b/explore/src/main/scala/explore/proposal/ProposalDetailsTile.scala index 41bdbab495..25ae97eae2 100644 --- a/explore/src/main/scala/explore/proposal/ProposalDetailsTile.scala +++ b/explore/src/main/scala/explore/proposal/ProposalDetailsTile.scala @@ -33,8 +33,9 @@ import explore.model.Proposal import explore.model.ProposalType import explore.model.ProposalType.* import explore.model.display.given -import explore.model.reusability.given +import explore.model.enums.TileSizeState import explore.model.enums.Visible +import explore.model.reusability.given import explore.syntax.ui.* import explore.undo.* import japgolly.scalajs.react.* @@ -62,7 +63,6 @@ import lucuma.ui.syntax.all.given import lucuma.ui.syntax.pot.* import org.typelevel.log4cats.Logger import spire.std.any.* -import explore.model.enums.TileSizeState case class ProposalDetailsBody( proposal: View[Proposal], diff --git a/explore/src/main/scala/explore/tabs/ConstraintsTabContents.scala b/explore/src/main/scala/explore/tabs/ConstraintsTabContents.scala index a7229c96ff..0d9b138747 100644 --- a/explore/src/main/scala/explore/tabs/ConstraintsTabContents.scala +++ b/explore/src/main/scala/explore/tabs/ConstraintsTabContents.scala @@ -11,10 +11,11 @@ import crystal.react.hooks.* import crystal.react.reuse.* import explore.* import explore.common.TimingWindowsQueries +import explore.components.ColumnSelectorInTitle +import explore.components.ColumnSelectorState import explore.components.FocusedStatus import explore.components.Tile import explore.components.TileController -import explore.components.ColumnSelectorState import explore.constraints.ConstraintsPanel import explore.constraints.ConstraintsSummaryTableBody import explore.data.KeyedIndexedList @@ -53,7 +54,6 @@ import monocle.Iso import scala.collection.immutable.SortedSet import scala.scalajs.LinkingInfo -import explore.components.ColumnSelectorInTitle case class ConstraintsTabContents( userId: Option[User.Id], diff --git a/explore/src/main/scala/explore/tabs/FinderChartsTile.scala b/explore/src/main/scala/explore/tabs/FinderChartsTile.scala index 5a6ed4958e..e5521b7c0e 100644 --- a/explore/src/main/scala/explore/tabs/FinderChartsTile.scala +++ b/explore/src/main/scala/explore/tabs/FinderChartsTile.scala @@ -10,8 +10,8 @@ import explore.components.Tile import explore.components.ui.ExploreStyles import explore.findercharts.ChartSelector import explore.findercharts.FinderChartsBody -import explore.findercharts.FinderChartsTitle import explore.findercharts.FinderChartsTileState +import explore.findercharts.FinderChartsTitle import explore.model.ObsAttachmentList import explore.model.ObsTabTilesIds import explore.model.Observation diff --git a/explore/src/main/scala/explore/tabs/ItcTile.scala b/explore/src/main/scala/explore/tabs/ItcTile.scala index 86401c0de2..873749d353 100644 --- a/explore/src/main/scala/explore/tabs/ItcTile.scala +++ b/explore/src/main/scala/explore/tabs/ItcTile.scala @@ -7,8 +7,8 @@ import crystal.Pot import crystal.react.View import explore.components.Tile import explore.itc.ItcPanelBody -import explore.itc.ItcPanelTitle import explore.itc.ItcPanelTileState +import explore.itc.ItcPanelTitle import explore.itc.ItcProps import explore.model.GlobalPreferences import explore.model.LoadingState diff --git a/explore/src/main/scala/explore/tabs/ObsTabContents.scala b/explore/src/main/scala/explore/tabs/ObsTabContents.scala index 060a153948..1e4defd6e2 100644 --- a/explore/src/main/scala/explore/tabs/ObsTabContents.scala +++ b/explore/src/main/scala/explore/tabs/ObsTabContents.scala @@ -11,6 +11,8 @@ import crystal.react.hooks.* import eu.timepit.refined.types.numeric.NonNegInt import explore.* import explore.Icons +import explore.components.ColumnSelectorInTitle +import explore.components.ColumnSelectorState import explore.components.Tile import explore.components.ui.ExploreStyles import explore.data.KeyedIndexedList @@ -43,6 +45,7 @@ import lucuma.react.hotkeys.hooks.* import lucuma.react.primereact.Button import lucuma.react.resizeDetector.* import lucuma.react.resizeDetector.hooks.* +import lucuma.react.table.Expandable import lucuma.refined.* import lucuma.ui.optics.* import lucuma.ui.primereact.* @@ -50,9 +53,6 @@ import lucuma.ui.reusability.given import lucuma.ui.sso.UserVault import lucuma.ui.syntax.all.given import monocle.Iso -import lucuma.react.table.Expandable -import explore.components.ColumnSelectorState -import explore.components.ColumnSelectorInTitle object DeckShown extends NewType[Boolean]: inline def Shown: DeckShown = DeckShown(true) diff --git a/explore/src/main/scala/explore/tabs/OverviewTabContents.scala b/explore/src/main/scala/explore/tabs/OverviewTabContents.scala index 094621f9b7..365ab81a10 100644 --- a/explore/src/main/scala/explore/tabs/OverviewTabContents.scala +++ b/explore/src/main/scala/explore/tabs/OverviewTabContents.scala @@ -7,8 +7,8 @@ import cats.effect.IO import cats.syntax.all.* import crystal.react.* import explore.attachments.ObsAttachmentsTableBody -import explore.attachments.ObsAttachmentsTableTitle import explore.attachments.ObsAttachmentsTableTileState +import explore.attachments.ObsAttachmentsTableTitle import explore.components.Tile import explore.components.TileController import explore.model.AppContext diff --git a/explore/src/main/scala/explore/tabs/TargetTabContents.scala b/explore/src/main/scala/explore/tabs/TargetTabContents.scala index f26a81dcf1..7f6618c476 100644 --- a/explore/src/main/scala/explore/tabs/TargetTabContents.scala +++ b/explore/src/main/scala/explore/tabs/TargetTabContents.scala @@ -11,6 +11,7 @@ import crystal.react.* import crystal.react.hooks.* import eu.timepit.refined.types.string.NonEmptyString import explore.* +import explore.components.ColumnSelectorState import explore.components.FocusedStatus import explore.components.Tile import explore.components.TileController @@ -28,12 +29,12 @@ import explore.model.syntax.all.* import explore.observationtree.AsterismGroupObsList import explore.shortcuts.* import explore.shortcuts.given -import explore.targets.ObservationPasteAction import explore.targets.DeletingTargets +import explore.targets.ObservationPasteAction import explore.targets.TargetPasteAction import explore.targets.TargetSummaryBody -import explore.targets.TargetSummaryTitle import explore.targets.TargetSummaryTileState +import explore.targets.TargetSummaryTitle import explore.undo.* import explore.utils.* import japgolly.scalajs.react.* @@ -62,7 +63,6 @@ import queries.schemas.odb.ObsQueries import java.time.Instant import scala.collection.immutable.SortedSet import scala.scalajs.LinkingInfo -import explore.components.ColumnSelectorState case class TargetTabContents( userId: Option[User.Id], diff --git a/explore/src/main/scala/explore/targeteditor/AsterismEditorBody.scala b/explore/src/main/scala/explore/targeteditor/AsterismEditorBody.scala index 4377ebfef1..6804cc251f 100644 --- a/explore/src/main/scala/explore/targeteditor/AsterismEditorBody.scala +++ b/explore/src/main/scala/explore/targeteditor/AsterismEditorBody.scala @@ -6,6 +6,8 @@ package explore.targeteditor import cats.syntax.all.* import crystal.react.* import crystal.react.hooks.* +import explore.components.ColumnSelectorInTitle +import explore.components.ColumnSelectorState import explore.components.ui.ExploreStyles import explore.config.ObsTimeEditor import explore.model.AladinFullScreen @@ -30,16 +32,14 @@ import lucuma.core.model.Target import lucuma.core.model.User import lucuma.core.util.NewType import lucuma.react.common.ReactFnProps +import lucuma.schemas.model.SiderealTargetWithId import lucuma.ui.reusability.given import lucuma.ui.syntax.all.given +import monocle.Focus import monocle.Iso +import monocle.Lens import java.time.Instant -import monocle.Lens -import monocle.Focus -import explore.components.ColumnSelectorInTitle -import explore.components.ColumnSelectorState -import lucuma.schemas.model.SiderealTargetWithId case class AsterismTileState( table: ColumnSelectorState[SiderealTargetWithId, TargetTable.TableMeta] = diff --git a/explore/src/main/scala/explore/targets/TargetSummaryBody.scala b/explore/src/main/scala/explore/targets/TargetSummaryBody.scala index 700de0fbed..c5322daa77 100644 --- a/explore/src/main/scala/explore/targets/TargetSummaryBody.scala +++ b/explore/src/main/scala/explore/targets/TargetSummaryBody.scala @@ -10,6 +10,7 @@ import crystal.react.* import explore.Icons import explore.common.UserPreferencesQueries import explore.common.UserPreferencesQueries.TableStore +import explore.components.ColumnSelectorState import explore.components.HelpIcon import explore.components.ui.ExploreStyles import explore.model.AppContext @@ -45,11 +46,10 @@ import lucuma.ui.reusability.given import lucuma.ui.syntax.all.given import lucuma.ui.table.* import lucuma.ui.table.hooks.* +import monocle.Focus import org.scalajs.dom.File as DOMFile import scala.collection.immutable.SortedSet -import monocle.Focus -import explore.components.ColumnSelectorState case class TargetSummaryTileState( filesToImport: List[DOMFile], diff --git a/explore/src/main/scala/explore/timingwindows/TimingWindowsTile.scala b/explore/src/main/scala/explore/timingwindows/TimingWindowsTile.scala index 5e3b7bdc39..cd5d14538a 100644 --- a/explore/src/main/scala/explore/timingwindows/TimingWindowsTile.scala +++ b/explore/src/main/scala/explore/timingwindows/TimingWindowsTile.scala @@ -14,6 +14,7 @@ import explore.components.Tile import explore.components.ui.ExploreStyles import explore.model.Constants.BadTimingWindow import explore.model.ObsTabTilesIds +import explore.model.enums.TileSizeState import explore.model.formats.* import explore.model.reusability.given import explore.model.syntax.all.* @@ -53,7 +54,6 @@ import java.time.Duration import java.time.Instant import java.time.ZoneOffset import java.time.ZonedDateTime -import explore.model.enums.TileSizeState case class TimingWindowsTileState( setRowSelection: RowSelection => Callback = _ => Callback.empty diff --git a/explore/src/main/scala/explore/validations/ObservationValidationsTableBody.scala b/explore/src/main/scala/explore/validations/ObservationValidationsTableBody.scala index 958c497ec1..ddc75e06c8 100644 --- a/explore/src/main/scala/explore/validations/ObservationValidationsTableBody.scala +++ b/explore/src/main/scala/explore/validations/ObservationValidationsTableBody.scala @@ -3,8 +3,8 @@ package explore.validations -import crystal.react.View import cats.syntax.all.* +import crystal.react.View import explore.Icons import explore.components.ui.ExploreStyles import explore.model.AppContext @@ -12,6 +12,7 @@ import explore.model.Focused import explore.model.Observation import explore.model.ObservationList import explore.model.enums.AppTab +import explore.model.enums.TileSizeState import explore.model.reusability.given import japgolly.scalajs.react.* import japgolly.scalajs.react.ScalaFnComponent @@ -20,6 +21,7 @@ import japgolly.scalajs.react.vdom.html_<^.* import lucuma.core.enums.ObservationValidationCode import lucuma.core.model.ObservationValidation import lucuma.core.model.Program +import lucuma.core.util.NewType import lucuma.react.common.ReactFnProps import lucuma.react.primereact.* import lucuma.react.primereact.tooltip.* @@ -32,8 +34,6 @@ import lucuma.ui.primereact.* import lucuma.ui.table.* import scala.scalajs.js -import lucuma.core.util.NewType -import explore.model.enums.TileSizeState object ObservationValidationsTableTileState extends NewType[Boolean => Callback] type ObservationValidationsTableTileState = ObservationValidationsTableTileState.Type