You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@causeway.apache.org by jo...@apache.org on 2024/01/22 16:43:40 UTC

(causeway) branch spring6-kroviz updated (4df1aaf6cc -> e9159896f3)

This is an automated email from the ASF dual-hosted git repository.

joergrade pushed a change to branch spring6-kroviz
in repository https://gitbox.apache.org/repos/asf/causeway.git


    from 4df1aaf6cc CAUSEWAY-3264 VegaEmbed still not working
     new 94158be595 CAUSEWAY-3264 TO added for VegaLite, amended for Vega
     new e9159896f3 CAUSEWAY-3264 ExtProxy cleanup

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../proxy/impl/CausewayModuleExtProxyImplTest.java |   7 +-
 .../causeway/client/kroviz/handler/VegaHandler.kt  |   7 +-
 .../apache/causeway/client/kroviz/to/Vega5TOs.kt   |  55 +++++-
 .../kroviz/to/{Action.kt => VegaLite5TOs.kt}       |  46 ++---
 .../causeway/client/kroviz/ui/core/RoMenuBar.kt    |   4 +-
 .../causeway/client/kroviz/ui/dialog/VegaPanel.kt  |   5 +-
 .../{VEGA_SAMPLE2.kt => VEGA_LITE_SAMPLE.kt}       |   2 +-
 .../causeway/client/kroviz/ui/samples/dummy.json   |  21 +++
 .../client/kroviz/handler/VegaHandlerTest.kt       |  25 ++-
 .../client/kroviz/vega_samples/VEGA_LITE.kt        |  30 ++++
 .../causeway/client/kroviz/vega_samples/dummy.json | 192 ++++++++++++++++++---
 11 files changed, 331 insertions(+), 63 deletions(-)
 copy incubator/clients/kroviz/src/jsMain/kotlin/org/apache/causeway/client/kroviz/to/{Action.kt => VegaLite5TOs.kt} (61%)
 rename incubator/clients/kroviz/src/jsMain/kotlin/org/apache/causeway/client/kroviz/ui/samples/{VEGA_SAMPLE2.kt => VEGA_LITE_SAMPLE.kt} (98%)
 create mode 100644 incubator/clients/kroviz/src/jsMain/kotlin/org/apache/causeway/client/kroviz/ui/samples/dummy.json
 create mode 100644 incubator/clients/kroviz/src/jsTest/kotlin/org/apache/causeway/client/kroviz/vega_samples/VEGA_LITE.kt


(causeway) 01/02: CAUSEWAY-3264 TO added for VegaLite, amended for Vega

Posted by jo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

joergrade pushed a commit to branch spring6-kroviz
in repository https://gitbox.apache.org/repos/asf/causeway.git

commit 94158be5954e3daac0b97ab49e8096b036d887b1
Author: Jörg Rade <jo...@kuehne-nagel.com>
AuthorDate: Thu Jan 4 00:13:24 2024 +0100

    CAUSEWAY-3264 TO added for VegaLite, amended for Vega
---
 .../causeway/client/kroviz/handler/VegaHandler.kt  |   7 +-
 .../apache/causeway/client/kroviz/to/Vega5TOs.kt   |  55 +++++-
 .../{handler/VegaHandler.kt => to/VegaLite5TOs.kt} |  46 +++--
 .../causeway/client/kroviz/ui/core/RoMenuBar.kt    |   4 +-
 .../causeway/client/kroviz/ui/dialog/VegaPanel.kt  |   5 +-
 .../{VEGA_SAMPLE2.kt => VEGA_LITE_SAMPLE.kt}       |   2 +-
 .../causeway/client/kroviz/ui/samples/dummy.json   |  21 +++
 .../client/kroviz/handler/VegaHandlerTest.kt       |  25 ++-
 .../client/kroviz/vega_samples/VEGA_LITE.kt        |  30 ++++
 .../causeway/client/kroviz/vega_samples/dummy.json | 192 ++++++++++++++++++---
 10 files changed, 332 insertions(+), 55 deletions(-)

diff --git a/incubator/clients/kroviz/src/jsMain/kotlin/org/apache/causeway/client/kroviz/handler/VegaHandler.kt b/incubator/clients/kroviz/src/jsMain/kotlin/org/apache/causeway/client/kroviz/handler/VegaHandler.kt
index 360c12f335..644a3959e3 100644
--- a/incubator/clients/kroviz/src/jsMain/kotlin/org/apache/causeway/client/kroviz/handler/VegaHandler.kt
+++ b/incubator/clients/kroviz/src/jsMain/kotlin/org/apache/causeway/client/kroviz/handler/VegaHandler.kt
@@ -22,13 +22,18 @@ import kotlinx.serialization.json.Json
 import org.apache.causeway.client.kroviz.core.aggregator.ActionDispatcher
 import org.apache.causeway.client.kroviz.to.TransferObject
 import org.apache.causeway.client.kroviz.to.Vega5
+import org.apache.causeway.client.kroviz.to.VegaLite5
 
 class VegaHandler : BaseHandler() {
 
     override fun parse(response: String): TransferObject {
         console.log("[VH_parse]")
         console.log(response)
-        return Json.decodeFromString<Vega5>(response)
+        return if (response.contains("vega-lite/v5")) {
+            Json.decodeFromString<VegaLite5>(response)
+        } else {
+            Json.decodeFromString<Vega5>(response)
+        }
     }
 
     override fun doHandle() {
diff --git a/incubator/clients/kroviz/src/jsMain/kotlin/org/apache/causeway/client/kroviz/to/Vega5TOs.kt b/incubator/clients/kroviz/src/jsMain/kotlin/org/apache/causeway/client/kroviz/to/Vega5TOs.kt
index 52e6830364..5164e2556b 100644
--- a/incubator/clients/kroviz/src/jsMain/kotlin/org/apache/causeway/client/kroviz/to/Vega5TOs.kt
+++ b/incubator/clients/kroviz/src/jsMain/kotlin/org/apache/causeway/client/kroviz/to/Vega5TOs.kt
@@ -21,7 +21,6 @@ package org.apache.causeway.client.kroviz.to
 import kotlinx.serialization.Contextual
 import kotlinx.serialization.SerialName
 import kotlinx.serialization.Serializable
-import kotlinx.serialization.json.JsonObject
 
 @Serializable
 data class Vega5(
@@ -29,8 +28,10 @@ data class Vega5(
     val description: String? = null,
     val width: Int,
     val height: Int,
-    val padding: Float? = null,
+    val padding: Int, // List<Padding> = emptyList(),
+    val autosize: String? = null,
     val data: List<Data> = emptyList(),
+    val projections: List<Projection> = emptyList(),
     val signals: List<Signal> = emptyList(),
     val scales: List<Scale> = emptyList(),
     val axes: List<Axis> = emptyList(),
@@ -42,7 +43,9 @@ data class Data(
     val name: String,
     val values: List<VegaValue> = emptyList(),
     val source: String? = null,
-    val transform: List<Transformation> = emptyList()
+    val transform: List<Transformation> = emptyList(),
+    val format: Format? = null,
+    val url: String? = null,
 ) : TransferObject
 
 @Serializable
@@ -66,16 +69,52 @@ data class Size(
 data class VegaValue(
     val category: String? = null,
     val amount: Float? = null,
+    val link: String? = null,
     val id: String? = null,
     val parent: String? = null,
     val title: String? = null,
+    val type: String? = null,
+) : TransferObject
+
+@Serializable
+data class Format(
+    val type: String,
+    val feature: String? = null,
+    val property: String? = null,
+) : TransferObject
+
+@Serializable
+data class Projection(
+    val name: String,
+    val scale: Float,
+    val type: String? = null,
+    val translate: Translation? = null,
+    val rotate: List<Rotation> = emptyList(),
+) : TransferObject
+
+@Serializable
+data class Rotation(
+    val signal: String,
+) : TransferObject
+
+@Serializable
+data class Translation(
+    val signal: String,
 ) : TransferObject
 
 @Serializable
 data class Signal(
     val name: String,
-    val value: JsonObject? = null,
-    val on: List<Event> = emptyList()
+    val value: Float? = null,
+    val on: List<Event> = emptyList(),
+    val bind: Bind? = null
+) : TransferObject
+
+@Serializable
+data class Bind(
+    val input: String,
+    val min: Float? = null,
+    val max: Float? = null
 ) : TransferObject
 
 @Serializable
@@ -132,6 +171,7 @@ data class Update(
     val y: UpdateGroup? = null,
     val text: UpdateGroup? = null,
     val fill: StringValue? = null,
+    val href: Href? = null,
     val fillOpacity: List<FillOpacity>? = null,
 ) : TransferObject
 
@@ -154,6 +194,11 @@ data class Fill(
     val fill: StringValue? = null
 ) : TransferObject
 
+@Serializable
+data class Href(
+    val signal: String? = null
+) : TransferObject
+
 @Serializable
 data class Enter(
     val stroke: StringValue? = null,
diff --git a/incubator/clients/kroviz/src/jsMain/kotlin/org/apache/causeway/client/kroviz/handler/VegaHandler.kt b/incubator/clients/kroviz/src/jsMain/kotlin/org/apache/causeway/client/kroviz/to/VegaLite5TOs.kt
similarity index 54%
copy from incubator/clients/kroviz/src/jsMain/kotlin/org/apache/causeway/client/kroviz/handler/VegaHandler.kt
copy to incubator/clients/kroviz/src/jsMain/kotlin/org/apache/causeway/client/kroviz/to/VegaLite5TOs.kt
index 360c12f335..eb60ffb540 100644
--- a/incubator/clients/kroviz/src/jsMain/kotlin/org/apache/causeway/client/kroviz/handler/VegaHandler.kt
+++ b/incubator/clients/kroviz/src/jsMain/kotlin/org/apache/causeway/client/kroviz/to/VegaLite5TOs.kt
@@ -16,25 +16,37 @@
  *  specific language governing permissions and limitations
  *  under the License.
  */
-package org.apache.causeway.client.kroviz.handler
+package org.apache.causeway.client.kroviz.to
 
-import kotlinx.serialization.json.Json
-import org.apache.causeway.client.kroviz.core.aggregator.ActionDispatcher
-import org.apache.causeway.client.kroviz.to.TransferObject
-import org.apache.causeway.client.kroviz.to.Vega5
+import kotlinx.serialization.SerialName
+import kotlinx.serialization.Serializable
 
-class VegaHandler : BaseHandler() {
+@Serializable
+data class VegaLite5(
+    @SerialName("\$schema") val schema: String,
+    val data: VlData,
+    val mark: String,
+    val encoding: VlEncoding
+) : TransferObject
 
-    override fun parse(response: String): TransferObject {
-        console.log("[VH_parse]")
-        console.log(response)
-        return Json.decodeFromString<Vega5>(response)
-    }
+@Serializable
+data class VlData(
+    val values: List<VlValue> = emptyList(),
+) : TransferObject
+@Serializable
+data class VlValue(
+    val a: String,
+    val b: Int
+) : TransferObject
 
-    override fun doHandle() {
-        logEntry.addAggregator(ActionDispatcher())
-        update()
-    }
-
-}
+@Serializable
+data class VlEncoding(
+    val x: FieldType,
+    val y: FieldType
+) : TransferObject
 
+@Serializable
+data class FieldType(
+    val field: String,
+    val type: String
+) : TransferObject
\ No newline at end of file
diff --git a/incubator/clients/kroviz/src/jsMain/kotlin/org/apache/causeway/client/kroviz/ui/core/RoMenuBar.kt b/incubator/clients/kroviz/src/jsMain/kotlin/org/apache/causeway/client/kroviz/ui/core/RoMenuBar.kt
index 7513da84c9..879533a408 100644
--- a/incubator/clients/kroviz/src/jsMain/kotlin/org/apache/causeway/client/kroviz/ui/core/RoMenuBar.kt
+++ b/incubator/clients/kroviz/src/jsMain/kotlin/org/apache/causeway/client/kroviz/ui/core/RoMenuBar.kt
@@ -40,7 +40,7 @@ import org.apache.causeway.client.kroviz.ui.menu.DropDownMenuBuilder
 import org.apache.causeway.client.kroviz.ui.panel.GeoMap
 import org.apache.causeway.client.kroviz.ui.panel.ImageSample
 import org.apache.causeway.client.kroviz.ui.panel.SvgMap
-import org.apache.causeway.client.kroviz.ui.samples.VEGA_SAMPLE
+import org.apache.causeway.client.kroviz.ui.samples.VEGA_LITE_SAMPLE
 import org.apache.causeway.client.kroviz.utils.IconManager
 import org.apache.causeway.client.kroviz.utils.Point
 
@@ -204,7 +204,7 @@ class RoMenuBar : SimplePanel() {
         )
 
         val vegaTitle = "Vega Sample"
-        val vegaPanel = VegaPanel(VEGA_SAMPLE.str)
+        val vegaPanel = VegaPanel(VEGA_LITE_SAMPLE.str)
         subMenu.add(
             buildMenuEntry(vegaTitle, "Image", { ViewManager.add(vegaTitle, vegaPanel) })
         )
diff --git a/incubator/clients/kroviz/src/jsMain/kotlin/org/apache/causeway/client/kroviz/ui/dialog/VegaPanel.kt b/incubator/clients/kroviz/src/jsMain/kotlin/org/apache/causeway/client/kroviz/ui/dialog/VegaPanel.kt
index 22283eeed8..28d8a3c33e 100644
--- a/incubator/clients/kroviz/src/jsMain/kotlin/org/apache/causeway/client/kroviz/ui/dialog/VegaPanel.kt
+++ b/incubator/clients/kroviz/src/jsMain/kotlin/org/apache/causeway/client/kroviz/ui/dialog/VegaPanel.kt
@@ -26,8 +26,11 @@ import org.apache.causeway.client.kroviz.utils.js.Vega
 class VegaPanel(val json: String) : SimplePanel() {
 
     init {
+        val spec = JSON.parse<Vega5>(json)
+        console.log("[VP_init]")
+//        console.log(spec.width)
+//        console.log(spec.height)
         this.addAfterInsertHook {
-            val spec = JSON.parse<Vega5>(json)
             buildVega(spec)
         }
     }
diff --git a/incubator/clients/kroviz/src/jsMain/kotlin/org/apache/causeway/client/kroviz/ui/samples/VEGA_SAMPLE2.kt b/incubator/clients/kroviz/src/jsMain/kotlin/org/apache/causeway/client/kroviz/ui/samples/VEGA_LITE_SAMPLE.kt
similarity index 98%
rename from incubator/clients/kroviz/src/jsMain/kotlin/org/apache/causeway/client/kroviz/ui/samples/VEGA_SAMPLE2.kt
rename to incubator/clients/kroviz/src/jsMain/kotlin/org/apache/causeway/client/kroviz/ui/samples/VEGA_LITE_SAMPLE.kt
index 422a4ebdb7..6d1d3edd3c 100644
--- a/incubator/clients/kroviz/src/jsMain/kotlin/org/apache/causeway/client/kroviz/ui/samples/VEGA_SAMPLE2.kt
+++ b/incubator/clients/kroviz/src/jsMain/kotlin/org/apache/causeway/client/kroviz/ui/samples/VEGA_LITE_SAMPLE.kt
@@ -18,7 +18,7 @@
  */
 package org.apache.causeway.client.kroviz.ui.samples
 
-object VEGA_SAMPLE2 {
+object VEGA_LITE_SAMPLE {
     val schema = "\$schema"
 
     val url = "https://vega.github.io/vega/examples/packed-bubble-chart/"
diff --git a/incubator/clients/kroviz/src/jsMain/kotlin/org/apache/causeway/client/kroviz/ui/samples/dummy.json b/incubator/clients/kroviz/src/jsMain/kotlin/org/apache/causeway/client/kroviz/ui/samples/dummy.json
new file mode 100644
index 0000000000..6a1f2175b7
--- /dev/null
+++ b/incubator/clients/kroviz/src/jsMain/kotlin/org/apache/causeway/client/kroviz/ui/samples/dummy.json
@@ -0,0 +1,21 @@
+{
+  "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
+  "data": {
+    "values": [
+      {"a": "C", "b": 2},
+      {"a": "C", "b": 7},
+      {"a": "C", "b": 4},
+      {"a": "D", "b": 1},
+      {"a": "D", "b": 2},
+      {"a": "D", "b": 6},
+      {"a": "E", "b": 8},
+      {"a": "E", "b": 4},
+      {"a": "E", "b": 7}
+    ]
+  },
+  "mark": "point",
+  "encoding": {
+    "x": {"field": "a", "type": "nominal"},
+    "y": {"field": "b", "type": "quantitative"}
+  }
+}
\ No newline at end of file
diff --git a/incubator/clients/kroviz/src/jsTest/kotlin/org/apache/causeway/client/kroviz/handler/VegaHandlerTest.kt b/incubator/clients/kroviz/src/jsTest/kotlin/org/apache/causeway/client/kroviz/handler/VegaHandlerTest.kt
index 0b35c7663a..560f64d7cb 100644
--- a/incubator/clients/kroviz/src/jsTest/kotlin/org/apache/causeway/client/kroviz/handler/VegaHandlerTest.kt
+++ b/incubator/clients/kroviz/src/jsTest/kotlin/org/apache/causeway/client/kroviz/handler/VegaHandlerTest.kt
@@ -20,8 +20,8 @@
 package org.apache.causeway.client.kroviz.handler
 
 import org.apache.causeway.client.kroviz.to.Vega5
-import org.apache.causeway.client.kroviz.vega_samples.BAR_CHART
-import org.apache.causeway.client.kroviz.vega_samples.UML_DIAGRAM
+import org.apache.causeway.client.kroviz.to.VegaLite5
+import org.apache.causeway.client.kroviz.vega_samples.*
 import kotlin.test.Test
 import kotlin.test.assertTrue
 
@@ -34,6 +34,13 @@ class VegaHandlerTest {
         assertTrue(vega is Vega5)
     }
 
+    @Test
+    fun testParseBarChartWithLinks() {
+        val json = BAR_CHART_WITH_LINKS.str
+        val vega = VegaHandler().parse(json)
+        assertTrue(vega is Vega5)
+    }
+
     @Test
     fun testParseUmlDiagram() {
         val json = UML_DIAGRAM.str
@@ -41,4 +48,18 @@ class VegaHandlerTest {
         assertTrue(vega is Vega5)
     }
 
+    @Test
+    fun testParseEarthquakes() {
+        val json = EARTHQUAKES.str
+        val vega = VegaHandler().parse(json)
+        assertTrue(vega is Vega5)
+    }
+
+    @Test
+    fun testParseVegaLite() {
+        val json = VEGA_LITE.str
+        val vega = VegaHandler().parse(json)
+        assertTrue(vega is VegaLite5)
+    }
+
 }
diff --git a/incubator/clients/kroviz/src/jsTest/kotlin/org/apache/causeway/client/kroviz/vega_samples/VEGA_LITE.kt b/incubator/clients/kroviz/src/jsTest/kotlin/org/apache/causeway/client/kroviz/vega_samples/VEGA_LITE.kt
new file mode 100644
index 0000000000..2cc1a3476d
--- /dev/null
+++ b/incubator/clients/kroviz/src/jsTest/kotlin/org/apache/causeway/client/kroviz/vega_samples/VEGA_LITE.kt
@@ -0,0 +1,30 @@
+package org.apache.causeway.client.kroviz.vega_samples
+
+object VEGA_LITE {
+    val schema = "\$schema"
+
+    val url = ""
+    val str = """
+{
+  "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
+  "data": {
+    "values": [
+      {"a": "C", "b": 2},
+      {"a": "C", "b": 7},
+      {"a": "C", "b": 4},
+      {"a": "D", "b": 1},
+      {"a": "D", "b": 2},
+      {"a": "D", "b": 6},
+      {"a": "E", "b": 8},
+      {"a": "E", "b": 4},
+      {"a": "E", "b": 7}
+    ]
+  },
+  "mark": "point",
+  "encoding": {
+    "x": {"field": "a", "type": "nominal"},
+    "y": {"field": "b", "type": "quantitative"}
+  }
+}
+"""
+}
diff --git a/incubator/clients/kroviz/src/jsTest/kotlin/org/apache/causeway/client/kroviz/vega_samples/dummy.json b/incubator/clients/kroviz/src/jsTest/kotlin/org/apache/causeway/client/kroviz/vega_samples/dummy.json
index 438f873fa1..8823498990 100644
--- a/incubator/clients/kroviz/src/jsTest/kotlin/org/apache/causeway/client/kroviz/vega_samples/dummy.json
+++ b/incubator/clients/kroviz/src/jsTest/kotlin/org/apache/causeway/client/kroviz/vega_samples/dummy.json
@@ -1,35 +1,175 @@
 {
-  "id" : "strings",
-  "memberType" : "action",
-  "links" : [
-    {
-      "rel" : "self",
-      "href" : "http://localhost:8080/restful/domain-types/demo.JavaLangTypesMenu/actions/strings",
-      "method" : "GET",
-      "type" : "application/json;profile=\"urn:org.restfulobjects:repr-types/action-description\""
+  "$schema" : "https://vega.github.io/schema/vega/v5.json",
+  "description" : "An interactive globe depicting earthquake locations and magnitudes.",
+  "padding" : 10,
+  "width" : 450,
+  "height" : 450,
+  "autosize" : "none",
+  "signals" : [
+    {
+      "name" : "quakeSize",
+      "value" : 6,
+      "bind" : {
+        "input" : "range",
+        "min" : 0,
+        "max" : 12
+      }
     },
     {
-      "rel" : "up",
-      "href" : "http://localhost:8080/restful/domain-types/demo.JavaLangTypesMenu",
-      "method" : "GET",
-      "type" : "application/json;profile=\"urn:org.restfulobjects:repr-types/domain-type\""
+      "name" : "rotate0",
+      "value" : 90,
+      "bind" : {
+        "input" : "range",
+        "min" : -180,
+        "max" : 180
+      }
     },
     {
-      "rel" : "urn:org.restfulobjects:rels/return-type",
-      "href" : "http://localhost:8080/restful/domain-types/demo.JavaLangStrings",
-      "method" : "GET",
-      "type" : "application/json;profile=\"urn:org.restfulobjects:repr-types/domain-type\""
+      "name" : "rotate1",
+      "value" : -5,
+      "bind" : {
+        "input" : "range",
+        "min" : -180,
+        "max" : 180
+      }
+    }
+  ],
+  "data" : [
+    {
+      "name" : "sphere",
+      "values" : [
+        {
+          "type" : "Sphere"
+        }
+      ]
     },
     {
-      "rel" : "urn:org.restfulobjects:rels/element-type",
-      "href" : "http://localhost:8080/restful/domain-types/demo.JavaLangStrings",
-      "method" : "GET",
-      "type" : "application/json;profile=\"urn:org.restfulobjects:repr-types/domain-type\""
+      "name" : "world",
+      "url" : "data/world-110m.json",
+      "format" : {
+        "type" : "topojson",
+        "feature" : "countries"
+      }
+    },
+    {
+      "name" : "earthquakes",
+      "url" : "data/earthquakes.json",
+      "format" : {
+        "type" : "json",
+        "property" : "features"
+      }
+    }
+  ],
+  "projections" : [
+    {
+      "name" : "projection",
+      "scale" : 225,
+      "type" : "orthographic",
+      "translate" : {
+        "signal" : "[width/2, height/2]"
+      },
+      "rotate" : [
+        {
+          "signal" : "rotate0"
+        },
+        {
+          "signal" : "rotate1"
+        },
+        0
+      ]
     }
   ],
-  "parameters" : [],
-  "extensions" : {
-    "friendlyName" : "Strings",
-    "friendlyNameForm" : "static"
-  }
-}
+  "scales" : [
+    {
+      "name" : "size",
+      "type" : "sqrt",
+      "domain" : [
+        0,
+        100
+      ],
+      "range" : [
+        0,
+        {
+          "signal" : "quakeSize"
+        }
+      ]
+    }
+  ],
+  "marks" : [
+    {
+      "type" : "shape",
+      "from" : {
+        "data" : "sphere"
+      },
+      "encode" : {
+        "update" : {
+          "fill" : {
+            "value" : "aliceblue"
+          },
+          "stroke" : {
+            "value" : "black"
+          },
+          "strokeWidth" : {
+            "value" : 1.5
+          }
+        }
+      },
+      "transform" : [
+        {
+          "type" : "geoshape",
+          "projection" : "projection"
+        }
+      ]
+    },
+    {
+      "type" : "shape",
+      "from" : {
+        "data" : "world"
+      },
+      "encode" : {
+        "update" : {
+          "fill" : {
+            "value" : "mintcream"
+          },
+          "stroke" : {
+            "value" : "black"
+          },
+          "strokeWidth" : {
+            "value" : 0.35
+          }
+        }
+      },
+      "transform" : [
+        {
+          "type" : "geoshape",
+          "projection" : "projection"
+        }
+      ]
+    },
+    {
+      "type" : "shape",
+      "from" : {
+        "data" : "earthquakes"
+      },
+      "encode" : {
+        "update" : {
+          "opacity" : {
+            "value" : 0.25
+          },
+          "fill" : {
+            "value" : "red"
+          }
+        }
+      },
+      "transform" : [
+        {
+          "type" : "geoshape",
+          "projection" : "projection",
+          "pointRadius" : {
+            "expr" : "scale('size', exp(datum.properties.mag))"
+          }
+        }
+      ]
+    }
+  ]
+}
\ No newline at end of file


(causeway) 02/02: CAUSEWAY-3264 ExtProxy cleanup

Posted by jo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

joergrade pushed a commit to branch spring6-kroviz
in repository https://gitbox.apache.org/repos/asf/causeway.git

commit e9159896f3d9dde935428bc4c89f753733b58ce0
Author: Jörg Rade <jo...@kuehne-nagel.com>
AuthorDate: Mon Jan 22 17:43:23 2024 +0100

    CAUSEWAY-3264 ExtProxy cleanup
---
 .../extensions/proxy/impl/CausewayModuleExtProxyImplTest.java      | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/extensions/vro/proxy/impl/src/test/java/org/apache/causeway/extensions/proxy/impl/CausewayModuleExtProxyImplTest.java b/extensions/vro/proxy/impl/src/test/java/org/apache/causeway/extensions/proxy/impl/CausewayModuleExtProxyImplTest.java
index 5ebaa03394..83a4615aaa 100644
--- a/extensions/vro/proxy/impl/src/test/java/org/apache/causeway/extensions/proxy/impl/CausewayModuleExtProxyImplTest.java
+++ b/extensions/vro/proxy/impl/src/test/java/org/apache/causeway/extensions/proxy/impl/CausewayModuleExtProxyImplTest.java
@@ -24,7 +24,6 @@ import org.junit.jupiter.api.Test;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import org.apache.causeway.core.config.CausewayConfiguration;
-import org.apache.causeway.core.config.RestEasyConfiguration;
 import org.apache.causeway.core.metamodel._testing.MetaModelContext_forTesting;
 
 import lombok.val;
@@ -32,23 +31,21 @@ import lombok.val;
 class CausewayModuleExtProxyImplTest {
 
     private CausewayConfiguration causewayDefaultConfiguration;
-    private RestEasyConfiguration restEasyConfiguration;
 
     @BeforeEach
     void setUp() {
         causewayDefaultConfiguration = MetaModelContext_forTesting
                 .buildDefault()
                 .getConfiguration();
-        restEasyConfiguration = new RestEasyConfiguration();
     }
 
     @Test
     void defaultCausewayConfiguration_shouldYieldCorsUrlPatternWithWildcard() {
         // given
-        val causewayModuleExtCors = new CausewayModuleExtProxy();
+        val causewayModuleExtProxy = new CausewayModuleExtProxy();
 
         // when
-        val filterRegistration = causewayModuleExtCors.createCorsFilterRegistration(causewayDefaultConfiguration); //, restEasyConfiguration
+        val filterRegistration = causewayModuleExtProxy.createCorsFilterRegistration(causewayDefaultConfiguration); //, restEasyConfiguration
 
         // then
         assertTrue(filterRegistration.getUrlPatterns().contains("/restful/*"));