diff --git a/build.sbt b/build.sbt index cf13aac..01d386c 100644 --- a/build.sbt +++ b/build.sbt @@ -51,9 +51,9 @@ lazy val client = libraryDependencies ++= Seq( "org.scala-js" %%% "scalajs-dom" % Versions.scalaJsDomVersion, "com.raquo" %%% "laminar" % Versions.laminarVersion, - "io.laminext" %%% "core" % Versions.laminextVersion, - "io.laminext" %%% "websocket" % Versions.laminextVersion, - "io.laminext" %%% "websocket-circe" % Versions.laminextVersion + "dev.laminext" %%% "core" % Versions.laminextVersion, + "dev.laminext" %%% "websocket" % Versions.laminextVersion, + "dev.laminext" %%% "websocket-circe" % Versions.laminextVersion ) ) .dependsOn(shared.js % "compile->compile;test->test", sharedCirce.js) diff --git a/client/src/main/scala/io/github/mahh/doko/client/components/Tables.scala b/client/src/main/scala/io/github/mahh/doko/client/components/Tables.scala index e8f6b67..01e5441 100644 --- a/client/src/main/scala/io/github/mahh/doko/client/components/Tables.scala +++ b/client/src/main/scala/io/github/mahh/doko/client/components/Tables.scala @@ -136,9 +136,9 @@ object Tables: val names: Signal[List[String]] = teamScore .map(_.team.toList) - .flatMap { t => + .flatMapSwitch { t => playerNames.map(pn => t.map(p => pn(p))) - }(SwitchSignalStrategy) + } stringsWithLineBreaks(names) // TODO: translation instead of hardcoded titles diff --git a/client/src/main/scala/io/github/mahh/doko/client/components/components.scala b/client/src/main/scala/io/github/mahh/doko/client/components/components.scala index 7187a70..1275a34 100644 --- a/client/src/main/scala/io/github/mahh/doko/client/components/components.scala +++ b/client/src/main/scala/io/github/mahh/doko/client/components/components.scala @@ -21,7 +21,7 @@ private def observeClicksWithActions[Action]( val clickEventStream = new EventBus[org.scalajs.dom.MouseEvent] val clickActions: Observable[Action] = actionOpt - .flatMap(a => clickEventStream.toObservable.map(_ => a))(SwitchStreamStrategy) + .flatMapSwitch(a => clickEventStream.toObservable.map(_ => a)) .collect { case Some(a) => a } Seq( onClick --> clickEventStream, diff --git a/client/src/main/scala/io/github/mahh/doko/client/state/ConfigurableCountdown.scala b/client/src/main/scala/io/github/mahh/doko/client/state/ConfigurableCountdown.scala index 417c721..8b683df 100644 --- a/client/src/main/scala/io/github/mahh/doko/client/state/ConfigurableCountdown.scala +++ b/client/src/main/scala/io/github/mahh/doko/client/state/ConfigurableCountdown.scala @@ -9,7 +9,7 @@ object ConfigurableCountdown { intervalMs: Int = 1000 ): Signal[Option[Int]] = { activeTimeOut.toObservable - .flatMap { + .flatMapSwitch { case Some(to) => EventStream.periodic(intervalMs, resetOnStop = true).map { tick => Some(math.max(to - tick, 0)) diff --git a/project/Versions.scala b/project/Versions.scala index 1ba02f2..88d847b 100644 --- a/project/Versions.scala +++ b/project/Versions.scala @@ -9,8 +9,8 @@ object Versions { val log4CatsVersion = "2.7.0" val circeVersion = "0.14.10" val scalaJsDomVersion = "2.8.0" - val laminarVersion = "16.0.0" - val laminextVersion = "0.16.2" + val laminarVersion = "17.2.0" + val laminextVersion = "0.17.1" val munitVersion = "1.0.3" val munitScalacheckVersion = "1.0.0" val scalacheckDerivedVersion = "0.5.0"