From 947fde5a86dfbf0cd9ab17368fd3c0f1dc999302 Mon Sep 17 00:00:00 2001 From: Olivier NOUGUIER Date: Thu, 3 Oct 2024 23:25:54 +0200 Subject: [PATCH] Validator (#215) * feat: add Validador support * Error bus * Refactor Sample layout --- examples/client/index.html | 4 + examples/client/package.json | 8 +- examples/client/src/main/scala/Index.scala | 59 ++++- .../facades/highlightjs/HljsLanguage.scala | 7 + .../main/scala/facades/highlightjs/hljs.scala | 16 ++ .../scala/facades/highlightjs/hljsScala.scala | 8 + .../src/main/scala/samples/EitherSample.scala | 22 +- .../src/main/scala/samples/EnumSample.scala | 37 ++- .../src/main/scala/samples/ListElement.scala | 20 +- .../src/main/scala/samples/Persons.scala | 72 +++++- .../src/main/scala/samples/Sealed.scala | 112 +++++---- .../src/main/scala/samples/SimpleSample.scala | 29 ++- .../client/src/main/scala/samples/Tree.scala | 154 ++++++------ .../src/main/scala/samples/Validation.scala | 65 ++++- examples/client/style.css | 14 ++ .../dev/cheleb/scalamigen/Defaultable.scala | 6 +- .../scala/dev/cheleb/scalamigen/Form.scala | 232 ++++++++++++------ .../cheleb/scalamigen/ValidationEvent.scala | 18 ++ .../dev/cheleb/scalamigen/Validator.scala | 5 + .../scala/dev/cheleb/scalamigen/package.scala | 74 +++++- 20 files changed, 698 insertions(+), 264 deletions(-) create mode 100644 examples/client/src/main/scala/facades/highlightjs/HljsLanguage.scala create mode 100644 examples/client/src/main/scala/facades/highlightjs/hljs.scala create mode 100644 examples/client/src/main/scala/facades/highlightjs/hljsScala.scala create mode 100644 modules/core/src/main/scala/dev/cheleb/scalamigen/ValidationEvent.scala create mode 100644 modules/core/src/main/scala/dev/cheleb/scalamigen/Validator.scala diff --git a/examples/client/index.html b/examples/client/index.html index 0d748c4..2f83519 100644 --- a/examples/client/index.html +++ b/examples/client/index.html @@ -5,6 +5,10 @@ + Demo Laminar SAP UI5 bindings