Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
44 changes: 40 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.flowingcode.vaadin.addons.demo</groupId>
<artifactId>commons-demo</artifactId>
<version>4.3.1-SNAPSHOT</version>
<version>4.4.0-SNAPSHOT</version>

<name>Commons Demo</name>
<description>Common classes for add-ons demo</description>
Expand All @@ -24,7 +24,7 @@
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<vaadin.version>24.3.13</vaadin.version>
<jetty.version>11.0.12</jetty.version>
<jetty.version>11.0.26</jetty.version>
</properties>

<organization>
Expand Down Expand Up @@ -55,6 +55,13 @@
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>flowing-snapshots</id>
<url>https://maven.flowingcode.com/snapshots</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>

<dependencyManagement>
Expand Down Expand Up @@ -96,6 +103,12 @@
<version>1.2.0</version>
</dependency>

<dependency>
<groupId>com.flowingcode.vaadin</groupId>
<artifactId>json-migration-helper</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand Down Expand Up @@ -167,6 +180,7 @@
<licenseName>apache_v2</licenseName>
<addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
<excludes>
<exclude>**/AppShellConfiguratorImpl.class</exclude>
<exclude>**/main/resources/META-INF/resources/frontend/prism.js</exclude>
<exclude>**/main/resources/META-INF/resources/frontend/prism.css</exclude>
<exclude>**/test/resources/**</exclude>
Expand All @@ -186,12 +200,12 @@
<supportedPackagings>
<supportedPackaging>jar</supportedPackaging>
</supportedPackagings>
<webAppConfig>
<webApp>
<resourceBases>
<resourceBase>src/main/resources/META-INF/resources</resourceBase>
<resourceBase>src/test/resources/META-INF/resources</resourceBase>
</resourceBases>
</webAppConfig>
</webApp>
</configuration>
</plugin>
</plugins>
Expand Down Expand Up @@ -302,6 +316,28 @@
</build>
</profile>

<profile>
<id>v25</id>
<properties>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<vaadin.version>25.0.0-beta2</vaadin.version>
</properties>
<repositories>
<repository>
<id>vaadin-prerelease</id>
<url>https://maven.vaadin.com/vaadin-prereleases</url>
</repository>
</repositories>

<pluginRepositories>
<pluginRepository>
<id>vaadin-prerelease</id>
<url>https://maven.vaadin.com/vaadin-prereleases</url>
</pluginRepository>
</pluginRepositories>
</profile>

</profiles>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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;
Expand All @@ -46,7 +47,7 @@ public MultiSourceCodeViewer(List<SourceCodeTab> sourceCodeTabs, Map<String, Str
selectedTab = tabs.getSelectedTab();

getElement().addEventListener("fragment-request", ev -> {
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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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;
Expand Down Expand Up @@ -85,7 +86,7 @@ private void setProperties(Map<String, String> properties) {
env.put(k, Json.create(v));
}
});
codeViewer.setPropertyJson("env", env);
JsonMigration.setPropertyJson(codeViewer, "env", env);
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -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 {

}