diff --git a/.gitignore b/.gitignore index 407f945..53dc944 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,5 @@ vite.generated.ts vite.config.ts /src/main/dev-bundle /src/main/bundles +/src/main/frontend/generated +/src/main/frontend/index.html \ No newline at end of file diff --git a/pom.xml b/pom.xml index 61de6a0..26275c2 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ com.flowingcode.vaadin.addons.demo commons-demo - 4.3.1-SNAPSHOT + 4.4.0-SNAPSHOT Commons Demo Common classes for add-ons demo @@ -24,7 +24,7 @@ 17 17 24.3.13 - 11.0.12 + 11.0.26 @@ -55,6 +55,13 @@ false + + flowing-snapshots + https://maven.flowingcode.com/snapshots + + true + + @@ -96,6 +103,12 @@ 1.2.0 + + com.flowingcode.vaadin + json-migration-helper + 0.0.1-SNAPSHOT + + junit junit @@ -167,6 +180,7 @@ apache_v2 false + **/AppShellConfiguratorImpl.class **/main/resources/META-INF/resources/frontend/prism.js **/main/resources/META-INF/resources/frontend/prism.css **/test/resources/** @@ -186,12 +200,12 @@ jar - + src/main/resources/META-INF/resources src/test/resources/META-INF/resources - + @@ -302,6 +316,28 @@ + + v25 + + 21 + 21 + 25.0.0-beta2 + + + + vaadin-prerelease + https://maven.vaadin.com/vaadin-prereleases + + + + + + vaadin-prerelease + https://maven.vaadin.com/vaadin-prereleases + + + + diff --git a/src/main/java/com/flowingcode/vaadin/addons/demo/MultiSourceCodeViewer.java b/src/main/java/com/flowingcode/vaadin/addons/demo/MultiSourceCodeViewer.java index 45c139b..2b7110b 100644 --- a/src/main/java/com/flowingcode/vaadin/addons/demo/MultiSourceCodeViewer.java +++ b/src/main/java/com/flowingcode/vaadin/addons/demo/MultiSourceCodeViewer.java @@ -2,7 +2,7 @@ * #%L * Commons Demo * %% - * Copyright (C) 2020 - 2024 Flowing Code + * Copyright (C) 2020 - 2025 Flowing Code * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,6 +20,7 @@ package com.flowingcode.vaadin.addons.demo; import com.flowingcode.vaadin.addons.enhancedtabs.EnhancedTabs; +import com.flowingcode.vaadin.jsonmigration.JsonMigration; import com.vaadin.flow.component.ComponentUtil; import com.vaadin.flow.component.html.Div; import com.vaadin.flow.component.tabs.Tab; @@ -46,7 +47,7 @@ public MultiSourceCodeViewer(List sourceCodeTabs, Map { - JsonValue filename = ev.getEventData().get("event.detail.filename"); + JsonValue filename = JsonMigration.getEventData(ev).get("event.detail.filename"); findTabWithFilename(Optional.ofNullable(filename).map(JsonValue::asString).orElse(null)) .ifPresent(tab -> { tabs.setSelectedTab(tab); diff --git a/src/main/java/com/flowingcode/vaadin/addons/demo/SourceCodeViewer.java b/src/main/java/com/flowingcode/vaadin/addons/demo/SourceCodeViewer.java index 89a40f1..82d59e4 100644 --- a/src/main/java/com/flowingcode/vaadin/addons/demo/SourceCodeViewer.java +++ b/src/main/java/com/flowingcode/vaadin/addons/demo/SourceCodeViewer.java @@ -2,7 +2,7 @@ * #%L * Commons Demo * %% - * Copyright (C) 2020 - 2024 Flowing Code + * Copyright (C) 2020 - 2025 Flowing Code * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,6 +20,7 @@ package com.flowingcode.vaadin.addons.demo; import com.flowingcode.vaadin.addons.DevSourceRequestHandler; +import com.flowingcode.vaadin.jsonmigration.JsonMigration; import com.vaadin.flow.component.ClickNotifier; import com.vaadin.flow.component.Component; import com.vaadin.flow.component.HasElement; @@ -85,7 +86,7 @@ private void setProperties(Map properties) { env.put(k, Json.create(v)); } }); - codeViewer.setPropertyJson("env", env); + JsonMigration.setPropertyJson(codeViewer, "env", env); } } diff --git a/src/test/java/com/flowingcode/vaadin/addons/demo/AppShellConfiguratorImpl.java b/src/test/java/com/flowingcode/vaadin/addons/demo/AppShellConfiguratorImpl.java new file mode 100644 index 0000000..95407e9 --- /dev/null +++ b/src/test/java/com/flowingcode/vaadin/addons/demo/AppShellConfiguratorImpl.java @@ -0,0 +1,9 @@ +package com.flowingcode.vaadin.addons.demo; + +import com.vaadin.flow.component.page.AppShellConfigurator; +import com.vaadin.flow.theme.Theme; + +@Theme +public class AppShellConfiguratorImpl implements AppShellConfigurator { + +}