- API: new:
input
/textArea
.changes
/.value
/.checked
/.files
now have additional overloaded versions that accept achangeStreamTransform: EventStream[Event] => EventStream[Event]
parameter (can be used, for example, to debounce the "changed" events) - API: new:
input
/textArea
.validated
/.validatedCheckBox
/.validatedFile
/.validatedFiles
now accept a second (optional) parameter –changeStreamTransform: EventStream[Event] => EventStream[Event]
– which is passed to the.value
/.checked
/.files
- API: additional validation builders accepting a functions like
check: A => Option[Err]
that can construct error messages using the value that is being validated
- update to
Laminar
v0.13.1 - API: new:
ValidatedElement
now exposes the.resetError
observer
- API: new:
mutationObserver
- Fix: stored vars now check if local storage is accessible
- API: observable extension methods are now source extension methods
- API: now accepting source and sink where observable and observer where expected before
- API: new:
.addSwitchingObserver
and.addOptionalSwitchingObserver
- Bugfix: websocket client was failing to connect when no sub-protocol was specified (defaulting to "", which was incorrect)
- Minor changes to improve error handling in the
fetch
moduleResponseDecodeFailed
is gone,ResponseError
is used instead
hostname
renamed intohost
to reflect that it can contain the portpath
renamed intosegments
to better reflect what it isuri
function renamed tourl
RequestUrl
now makes sure to not contain empty segments (thus it is no longer possible, accidentally or otherwise, to have a double/
in the request URL)- new
RequestUrl.fromLocation(location: dom.raw.Location)
builder - Breaking:
addPath(path: String*)
renamed toaddSegments(path: String*)
- New:
withParams(params: Map[String, Seq[String]])
- New:
withSegments(segments: String*)
*path
methods will split the argument by /
into a Seq[String]
, ensuring there are
no empty segments.
url
, RequestUrl.apply
and RequestUrl.fromLocation
ensure there are no empty segments as well.
UrlString
objectparse
– parse a string into adom.raw.Location
val myUrl = "https://laminext.dev/path?param=1" val location: dom.raw.Location = UrlString.parse(myUrl) console.print(location.origin)
UrlUtils
objectencodeSearchParams(params: Map[String, Seq[String]]): String
– encode the given parameters into a URL search string (?param=1&...
)decodeSearchParams(search: String): Map[String, Seq[String]]
– decode a URL search string into a map of parameters
Sourcemaps are now pointing to GitHub.
Update to circe 0.14.1.
- new:
protocol
parameter for WebSocket (thanks @ghostdogpr!)
Laminar 0.13.0, Scala 3.0.0
Laminar 0.13.0, Scala 3-RC3
- New:
websocket-zio-json
module. Thanks Kit Langton for the contribution - Updated to Laminar v0.12.2
- Bugfix: in
SignalOfBooleanOps
, the&&
operator was actually doing||
(thanks @ngochai94 for the PR!)
First usable release.