Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scala 3.5.0 #196

Merged
merged 7 commits into from
Aug 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import java.nio.charset.StandardCharsets
import org.scalajs.linker.interface.ModuleSplitStyle

val scala33 = "3.4.2"
val scala33 = "3.5.0"

val tapirVersion = "1.11.1"

val laminarVersion = "17.0.0"
val laminarVersion = "17.1.0"

inThisBuild(
List(
@@ -161,6 +161,7 @@ lazy val core = scalajsProject("core", false)
.settings(scalacOptions ++= usedScalacOptions)
.settings(
libraryDependencies ++= Seq(
"io.github.cquiroz" %%% "scala-java-time" % "2.6.0",
"com.softwaremill.magnolia1_3" %%% "magnolia" % "1.3.7",
"com.raquo" %%% "laminar" % laminarVersion,
// "io.laminext" %%% "websocket" % laminarVersion,
@@ -182,7 +183,7 @@ lazy val ui5 = scalajsProject("ui5", false)
.dependsOn(core)
.settings(
libraryDependencies ++= Seq(
"be.doeraene" %%% "web-components-ui5" % "1.21.0"
"be.doeraene" %%% "web-components-ui5" % "2.0.0-RC1"
)
)

120 changes: 68 additions & 52 deletions examples/client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions examples/client/package.json
Original file line number Diff line number Diff line change
@@ -11,9 +11,9 @@
},
"license": "MIT",
"dependencies": {
"@ui5/webcomponents": "1.24.0",
"@ui5/webcomponents-fiori": "1.24.0",
"@ui5/webcomponents-icons": "1.24.0",
"@ui5/webcomponents": "2.0.1",
"@ui5/webcomponents-fiori": "2.0.1",
"@ui5/webcomponents-icons": "2.0.1",
"highlight.js": "^11.8.0",
"jsdom": "^9.9.0"
},
2 changes: 1 addition & 1 deletion examples/client/src/main/scala/HelloWorld.scala
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ case class Sample(name: String, component: HtmlElement)

object App extends App {

val sample = Var(samples.tree.component)
val sample = Var(samples.list.component)

private def item(name: String) = SideNavigation.item(
_.text := name,
2 changes: 1 addition & 1 deletion examples/client/src/main/scala/samples/EitherSample.scala
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ val either = Sample(
s"$item"
)
},
Form.renderVar(eitherVar)
eitherVar.asForm
)
}
)
2 changes: 1 addition & 1 deletion examples/client/src/main/scala/samples/EnumSample.scala
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ val enums = Sample(
s"$item"
)
},
Form.renderVar(eitherVar)
eitherVar.asForm
)
}
)
14 changes: 9 additions & 5 deletions examples/client/src/main/scala/samples/ListElement.scala
Original file line number Diff line number Diff line change
@@ -4,15 +4,19 @@ import dev.cheleb.scalamigen.{*, given}

import com.raquo.laminar.api.L.*

case class Person2(name: String, age: Int)
case class Person2(id: Int, name: String, age: Int)

case class ListElement(
ints: List[Person2]
)

val listPersonVar = Var(ListElement(List(1, 2, 3).map(Person2("Vlad", _))))
val listPersonVar = Var(
ListElement(List(1, 2, 3).map(id => Person2(id, "Vlad", 20)))
)
val listIntVar = Var(List(1, 2, 3))

given (Person2 => Int) = _.id

val list = Sample(
"List",
div(
@@ -21,12 +25,12 @@ val list = Sample(
s"$item"
)
},
Form.renderVar(listPersonVar),
listPersonVar.asForm,
child <-- listIntVar.signal.map { item =>
div(
s"$item"
)
},
Form.renderVar(listIntVar)
}
// Form.renderVar(listIntVar)
)
)
8 changes: 7 additions & 1 deletion examples/client/src/main/scala/samples/Persons.scala
Original file line number Diff line number Diff line change
@@ -7,10 +7,14 @@ import magnolia1.*

import io.github.iltotore.iron.*
import io.github.iltotore.iron.constraint.all.*
import samples.model.Password
import java.time.LocalDate

// Define some models
case class Person(
name: String,
password: Password,
birthDate: LocalDate,
fav: Pet,
pet: Option[Pet],
email: Option[String],
@@ -34,6 +38,8 @@ given Defaultable[Pet] with
val vlad =
Person(
"Vlad",
Password("not a password"),
LocalDate.of(1431, 11, 8),
Pet("Batman", 666, House(2), 169),
Some(Pet("Wolfy", 12, House(1), 42)),
Some("[email protected]"),
@@ -51,6 +57,6 @@ val person = Sample(
s"$item"
)
},
Form.renderVar(personVar)
personVar.asForm
)
)
2 changes: 1 addition & 1 deletion examples/client/src/main/scala/samples/SimpleSample.scala
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ val simple = Sample(
s"$item"
)
},
Form.renderVar(eitherVar)
eitherVar.asForm
)
}
)
2 changes: 1 addition & 1 deletion examples/client/src/main/scala/samples/Tree.scala
Original file line number Diff line number Diff line change
@@ -110,7 +110,7 @@ val tree = Sample(
child <-- treeVar2.signal
.distinctByFn(Tree.isSameStructure)
.map { item =>
Form.renderVar(treeVar2)
treeVar2.asForm
}
)
}
2 changes: 1 addition & 1 deletion examples/client/src/main/scala/samples/Validation.scala
Original file line number Diff line number Diff line change
@@ -38,6 +38,6 @@ val validation = Sample(
s"$item"
)
},
Form.renderVar(ironSampleVar)
ironSampleVar.asForm
)
)
Loading